summaryrefslogtreecommitdiff
path: root/gcc/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite')
-rw-r--r--gcc/testsuite/ChangeLog6811
-rw-r--r--gcc/testsuite/ChangeLog-1993-20073
-rw-r--r--gcc/testsuite/ChangeLog-20082
-rw-r--r--gcc/testsuite/ChangeLog-20092
-rw-r--r--gcc/testsuite/ChangeLog-201016
-rw-r--r--gcc/testsuite/ChangeLog-201211183
-rw-r--r--gcc/testsuite/ChangeLog-201312405
-rw-r--r--gcc/testsuite/ChangeLog.ptr2
-rw-r--r--gcc/testsuite/ChangeLog.tree-ssa2
-rw-r--r--gcc/testsuite/README2
-rw-r--r--gcc/testsuite/README.compat2
-rw-r--r--gcc/testsuite/README.gcc2
-rw-r--r--gcc/testsuite/ada/.gitignore2
-rw-r--r--gcc/testsuite/ada/acats/ada95.lst31
-rw-r--r--gcc/testsuite/ada/acats/floatstore.lst1
-rwxr-xr-xgcc/testsuite/ada/acats/run_all.sh10
-rw-r--r--gcc/testsuite/ada/acats/tests/cd/cdd1001.a2
-rw-r--r--gcc/testsuite/ada/acats/tests/gcc/template.ada16
-rw-r--r--gcc/testsuite/c-c++-common/Wfloat-conversion.c58
-rw-r--r--gcc/testsuite/c-c++-common/Wpointer-arith-1.c26
-rw-r--r--gcc/testsuite/c-c++-common/Wsequence-point-1.c17
-rw-r--r--gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c161
-rw-r--r--gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c482
-rw-r--r--gcc/testsuite/c-c++-common/Wvarargs-2.c33
-rw-r--r--gcc/testsuite/c-c++-common/Wvarargs.c54
-rw-r--r--gcc/testsuite/c-c++-common/asan/asan-interface-1.c14
-rw-r--r--gcc/testsuite/c-c++-common/asan/attrib-1.c62
-rw-r--r--gcc/testsuite/c-c++-common/asan/bitfield-1.c25
-rw-r--r--gcc/testsuite/c-c++-common/asan/bitfield-2.c25
-rw-r--r--gcc/testsuite/c-c++-common/asan/bitfield-3.c25
-rw-r--r--gcc/testsuite/c-c++-common/asan/bitfield-4.c25
-rw-r--r--gcc/testsuite/c-c++-common/asan/clone-test-1.c46
-rw-r--r--gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c16
-rw-r--r--gcc/testsuite/c-c++-common/asan/global-overflow-1.c28
-rw-r--r--gcc/testsuite/c-c++-common/asan/heap-overflow-1.c31
-rw-r--r--gcc/testsuite/c-c++-common/asan/inc.c21
-rw-r--r--gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c10
-rw-r--r--gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c16
-rw-r--r--gcc/testsuite/c-c++-common/asan/memcmp-1.c20
-rw-r--r--gcc/testsuite/c-c++-common/asan/memcmp-2.c10
-rw-r--r--gcc/testsuite/c-c++-common/asan/misalign-1.c42
-rw-r--r--gcc/testsuite/c-c++-common/asan/misalign-2.c42
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-asan-globals.c13
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-asan-stack.c16
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-instrument-reads.c13
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-instrument-writes.c13
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c68
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c26
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c18
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c17
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c18
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c20
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c27
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c20
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-9.c13
-rw-r--r--gcc/testsuite/c-c++-common/asan/no-use-after-return.c13
-rw-r--r--gcc/testsuite/c-c++-common/asan/null-deref-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr56330.c24
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr59029.c7
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr59063-1.c11
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr59063-2.c12
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr61530.c17
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr62089.c38
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr62140-1.c10
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr62140-2.c11
-rw-r--r--gcc/testsuite/c-c++-common/asan/pr63638.c20
-rw-r--r--gcc/testsuite/c-c++-common/asan/rlimit-mmap-test-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c16
-rw-r--r--gcc/testsuite/c-c++-common/asan/sleep-before-dying-1.c14
-rw-r--r--gcc/testsuite/c-c++-common/asan/stack-overflow-1.c23
-rw-r--r--gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c15
-rw-r--r--gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c30
-rw-r--r--gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c21
-rw-r--r--gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c63
-rw-r--r--gcc/testsuite/c-c++-common/asan/use-after-free-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/asan/use-after-return-1.c53
-rw-r--r--gcc/testsuite/c-c++-common/attributes-1.c23
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/an-if.c48
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/array_test1.c84
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/array_test2.c128
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/array_test_ND.c102
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_custom.c69
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c69
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double.c124
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double2.c77
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/comma_exp.c55
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/conditional.c44
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c19
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/dimensionless-arrays.c10
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once.c44
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once2.c87
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/fn_ptr.c21
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c28
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/gather-scatter-errors.c19
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c60
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/if_test.c306
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/if_test_errors.c56
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/misc.c112
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/n-ptr-test.c48
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors.c11
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors2.c12
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors3.c12
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors4.c11
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c15
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457.c39
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57490.c28
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c15
-rwxr-xr-xgcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c26
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr57577.c12
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c8
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c10
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c13
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c9
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c9
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c10
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch.c18
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch2.c27
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch3.c19
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit.c11
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit2.c11
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit_ex.c29
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c21
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c17
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_return.c29
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c26
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/test_builtin_return.c73
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/test_sec_limits.c18
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/tst_lngth.c19
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/AN/vla.c20
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/compound_cilk_spawn.c26
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c20
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/fib.c54
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/fib_init_expr_xy.c68
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_return.c73
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_sync.c67
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc9
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c11
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr59631.c15
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c35
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c66
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c15
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c8
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/spawnee_inline.c80
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c67
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c37
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c43
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/sync_wo_spawn.c9
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/test__cilk.c10
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/CK/varargs_test.c47
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/body.c34
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/clauses1.c80
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/clauses2.c18
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/clauses3.c39
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/for1.c132
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/for2.c8
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/for3.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-1.c38
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-2.c36
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-3.c41
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/run-1.c28
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/safelen.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-2.c12
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-3.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c21
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c32
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error2.c14
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error3.c13
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test.c78
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test2.c16
-rw-r--r--gcc/testsuite/c-c++-common/cilk-plus/SE/vlength_errors.c59
-rw-r--r--gcc/testsuite/c-c++-common/convert-vec-1.c4
-rw-r--r--gcc/testsuite/c-c++-common/cpp/diagnostic-pragma-1.c11
-rw-r--r--gcc/testsuite/c-c++-common/cpp/openmp-define-1.c6
-rw-r--r--gcc/testsuite/c-c++-common/cpp/openmp-define-2.c7
-rw-r--r--gcc/testsuite/c-c++-common/cpp/openmp-define-3.c11
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr58844-1.c8
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr58844-2.c8
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr60400-1.h3
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr60400-2.h4
-rw-r--r--gcc/testsuite/c-c++-common/cpp/pr60400.c13
-rw-r--r--gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c15
-rw-r--r--gcc/testsuite/c-c++-common/cpp/warning-zero-in-literals-1.cbin0 -> 240 bytes
-rw-r--r--gcc/testsuite/c-c++-common/cpp/warning-zero-location-2.c10
-rw-r--r--gcc/testsuite/c-c++-common/cpp/warning-zero-location.c8
-rw-r--r--gcc/testsuite/c-c++-common/fold-divmul-1.c11
-rw-r--r--gcc/testsuite/c-c++-common/gomp/atomic-15.c34
-rw-r--r--gcc/testsuite/c-c++-common/gomp/atomic-16.c34
-rw-r--r--gcc/testsuite/c-c++-common/gomp/cancel-1.c396
-rw-r--r--gcc/testsuite/c-c++-common/gomp/depend-1.c79
-rw-r--r--gcc/testsuite/c-c++-common/gomp/depend-2.c19
-rw-r--r--gcc/testsuite/c-c++-common/gomp/map-1.c109
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr56883.c57
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr57824.c14
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58257.c15
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58472.c16
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58551.c33
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58703.c6
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr58809.c31
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr59073.c12
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr59152.c40
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr59467.c68
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr59917-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr59917-2.c22
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr60823-1.c19
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr60823-2.c44
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr60823-3.c32
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr61200.c13
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr61486-1.c13
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr61486-2.c458
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr63249.c16
-rw-r--r--gcc/testsuite/c-c++-common/gomp/pr63328.c5
-rw-r--r--gcc/testsuite/c-c++-common/gomp/sections1.c73
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd1.c31
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd2.c29
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd3.c26
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd4.c21
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd5.c19
-rw-r--r--gcc/testsuite/c-c++-common/gomp/simd6.c27
-rw-r--r--gcc/testsuite/c-c++-common/gomp/single1.c15
-rw-r--r--gcc/testsuite/c-c++-common/init-vec-1.c4
-rw-r--r--gcc/testsuite/c-c++-common/opaque-vector.c22
-rw-r--r--gcc/testsuite/c-c++-common/pr20318.c3
-rw-r--r--gcc/testsuite/c-c++-common/pr28656.c29
-rw-r--r--gcc/testsuite/c-c++-common/pr36282-1.c12
-rw-r--r--gcc/testsuite/c-c++-common/pr36282-2.c10
-rw-r--r--gcc/testsuite/c-c++-common/pr36282-3.c13
-rw-r--r--gcc/testsuite/c-c++-common/pr36282-4.c13
-rw-r--r--gcc/testsuite/c-c++-common/pr37743.c13
-rw-r--r--gcc/testsuite/c-c++-common/pr41779.c2
-rw-r--r--gcc/testsuite/c-c++-common/pr43772.c45
-rw-r--r--gcc/testsuite/c-c++-common/pr48418.c20
-rw-r--r--gcc/testsuite/c-c++-common/pr51294.c9
-rw-r--r--gcc/testsuite/c-c++-common/pr51712.c19
-rw-r--r--gcc/testsuite/c-c++-common/pr53633.c16
-rw-r--r--gcc/testsuite/c-c++-common/pr54486.c1
-rw-r--r--gcc/testsuite/c-c++-common/pr55619.c11
-rw-r--r--gcc/testsuite/c-c++-common/pr55771.c12
-rw-r--r--gcc/testsuite/c-c++-common/pr56302.c9
-rw-r--r--gcc/testsuite/c-c++-common/pr56566.c14
-rw-r--r--gcc/testsuite/c-c++-common/pr56607.c29
-rw-r--r--gcc/testsuite/c-c++-common/pr57793.c23
-rw-r--r--gcc/testsuite/c-c++-common/pr58346-1.c24
-rw-r--r--gcc/testsuite/c-c++-common/pr58346-2.c8
-rw-r--r--gcc/testsuite/c-c++-common/pr58346-3.c16
-rw-r--r--gcc/testsuite/c-c++-common/pr59032.c30
-rw-r--r--gcc/testsuite/c-c++-common/pr59037.c12
-rw-r--r--gcc/testsuite/c-c++-common/pr59223.c13
-rw-r--r--gcc/testsuite/c-c++-common/pr59280.c4
-rw-r--r--gcc/testsuite/c-c++-common/pr60101.c112
-rw-r--r--gcc/testsuite/c-c++-common/pr60689.c10
-rw-r--r--gcc/testsuite/c-c++-common/pr61741.c22
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-13.c272
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-14.c39
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-15.c272
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-16.c33
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-17.c30
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-18.c21
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-19.c22
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-2.c12
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-3.c32
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-4.c10
-rw-r--r--gcc/testsuite/c-c++-common/raw-string-5.c10
-rw-r--r--gcc/testsuite/c-c++-common/rotate-1.c581
-rw-r--r--gcc/testsuite/c-c++-common/rotate-1a.c49
-rw-r--r--gcc/testsuite/c-c++-common/rotate-2.c583
-rw-r--r--gcc/testsuite/c-c++-common/rotate-2a.c6
-rw-r--r--gcc/testsuite/c-c++-common/rotate-3.c581
-rw-r--r--gcc/testsuite/c-c++-common/rotate-3a.c6
-rw-r--r--gcc/testsuite/c-c++-common/rotate-4.c583
-rw-r--r--gcc/testsuite/c-c++-common/rotate-4a.c6
-rw-r--r--gcc/testsuite/c-c++-common/rotate-5.c43
-rw-r--r--gcc/testsuite/c-c++-common/scal-to-vec1.c43
-rw-r--r--gcc/testsuite/c-c++-common/scal-to-vec2.c21
-rw-r--r--gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c2
-rw-r--r--gcc/testsuite/c-c++-common/tm/attrib-1.c2
-rw-r--r--gcc/testsuite/c-c++-common/tm/pr54893.c16
-rw-r--r--gcc/testsuite/c-c++-common/tm/trxn-expr-3.c2
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr57945.c11
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr58794-1.c29
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr58794-2.c21
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr60026.c28
-rw-r--r--gcc/testsuite/c-c++-common/torture/pr60971.c34
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-compare-1.c124
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-compare-2.c29
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-shift.c49
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-shift1.c18
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-shift2.c60
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-subscript-1.c61
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-subscript-2.c69
-rw-r--r--gcc/testsuite/c-c++-common/torture/vector-subscript-3.c26
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-16.inc (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-16.inc)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-2.inc (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-2.inc)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-4.inc (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-4.inc)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-8.inc (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-8.inc)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-main.inc (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-main.inc)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v16hi.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v16hi.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v16qi.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v2df.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v2df.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v2di.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v2di.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v2sf.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v2sf.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v2si.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v2si.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v4df.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v4df.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v4di.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v4di.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v4hi.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v4hi.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v4sf.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v4sf.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v4si.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v4si.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v8hi.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v8hi.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v8qi.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v8qi.c)0
-rw-r--r--gcc/testsuite/c-c++-common/torture/vshuf-v8si.c (renamed from gcc/testsuite/gcc.c-torture/execute/vshuf-v8si.c)0
-rw-r--r--gcc/testsuite/c-c++-common/tsan/atomic_stack.c31
-rw-r--r--gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c36
-rw-r--r--gcc/testsuite/c-c++-common/tsan/free_race.c27
-rw-r--r--gcc/testsuite/c-c++-common/tsan/free_race2.c28
-rw-r--r--gcc/testsuite/c-c++-common/tsan/mutexset1.c40
-rw-r--r--gcc/testsuite/c-c++-common/tsan/race_on_barrier.c32
-rw-r--r--gcc/testsuite/c-c++-common/tsan/race_on_barrier2.c32
-rw-r--r--gcc/testsuite/c-c++-common/tsan/race_on_mutex.c43
-rw-r--r--gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c25
-rw-r--r--gcc/testsuite/c-c++-common/tsan/simple_race.c50
-rw-r--r--gcc/testsuite/c-c++-common/tsan/simple_stack.c65
-rw-r--r--gcc/testsuite/c-c++-common/tsan/sleep_sync.c30
-rw-r--r--gcc/testsuite/c-c++-common/tsan/thread_leak.c16
-rw-r--r--gcc/testsuite/c-c++-common/tsan/thread_leak1.c18
-rw-r--r--gcc/testsuite/c-c++-common/tsan/thread_leak2.c21
-rw-r--r--gcc/testsuite/c-c++-common/tsan/tiny_race.c22
-rw-r--r--gcc/testsuite/c-c++-common/tsan/tls_race.c20
-rw-r--r--gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c36
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/attrib-1.c33
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/const-char-1.c9
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/const-expr-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c24
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c23
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c21
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c11
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/div-by-zero-5.c8
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c29
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-1.c12
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-10.c13
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-11.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-2.c12
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-3.c18
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-4.c14
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-5.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-6.c13
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-7.c17
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-8.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/null-9.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-1.c269
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-2.c7
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-add-1.c67
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c60
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-int128.c47
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-1.c53
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c26
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-3.c46
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c86
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c38
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-negate-2.c45
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-sub-1.c69
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c54
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr58443-1.c11
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr58443-2.c11
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr58443-3.c18
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59333.c18
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59397.c10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59503.c21
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr59667.c14
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr60613-1.c41
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr60613-2.c36
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/pr60636.c15
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/save-expr-1.c19
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/save-expr-2.c14
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/save-expr-3.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/save-expr-4.c16
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-1.c31
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-2.c23
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-3.c19
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-4.c14
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-5.c33
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/shift-6.c38
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/typedef-1.c12
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/undefined-1.c33
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/unreachable-1.c10
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/vla-1.c119
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/vla-2.c22
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/vla-3.c25
-rw-r--r--gcc/testsuite/c-c++-common/ubsan/vla-4.c21
-rw-r--r--gcc/testsuite/c-c++-common/uninit-17.c4
-rw-r--r--gcc/testsuite/c-c++-common/vector-1.c (renamed from gcc/testsuite/gcc.dg/vector-1.c)0
-rw-r--r--gcc/testsuite/c-c++-common/vector-2.c20
-rw-r--r--gcc/testsuite/c-c++-common/vector-3.c8
-rw-r--r--gcc/testsuite/c-c++-common/vector-4.c (renamed from gcc/testsuite/gcc.dg/vector-4.c)0
-rw-r--r--gcc/testsuite/c-c++-common/vector-compare-1.c22
-rw-r--r--gcc/testsuite/c-c++-common/vector-compare-2.c31
-rw-r--r--gcc/testsuite/c-c++-common/vector-compare-3.c25
-rw-r--r--gcc/testsuite/c-c++-common/vector-init-1.c (renamed from gcc/testsuite/gcc.dg/vector-init-1.c)0
-rw-r--r--gcc/testsuite/c-c++-common/vector-init-2.c (renamed from gcc/testsuite/gcc.dg/vector-init-2.c)0
-rw-r--r--gcc/testsuite/c-c++-common/vector-scalar-2.c14
-rw-r--r--gcc/testsuite/c-c++-common/vector-scalar.c10
-rw-r--r--gcc/testsuite/c-c++-common/vector-shift.c15
-rw-r--r--gcc/testsuite/c-c++-common/vector-shift1.c19
-rw-r--r--gcc/testsuite/c-c++-common/vector-shift3.c16
-rw-r--r--gcc/testsuite/c-c++-common/vector-subscript-1.c16
-rw-r--r--gcc/testsuite/c-c++-common/vector-subscript-2.c12
-rw-r--r--gcc/testsuite/c-c++-common/vector-subscript-3.c18
-rw-r--r--gcc/testsuite/c-c++-common/warn-ommitted-condop.c2
-rw-r--r--gcc/testsuite/config/default.exp2
-rw-r--r--gcc/testsuite/g++.dg/README2
-rw-r--r--gcc/testsuite/g++.dg/abi/aarch64_guard1.C17
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag1.C19
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag2.C5
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag3.C35
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag4.C8
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag5.C7
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag6.C25
-rw-r--r--gcc/testsuite/g++.dg/abi/abi-tag7.C9
-rw-r--r--gcc/testsuite/g++.dg/abi/anon2.C66
-rw-r--r--gcc/testsuite/g++.dg/abi/anon3.C19
-rw-r--r--gcc/testsuite/g++.dg/abi/arm_va_list.C5
-rw-r--r--gcc/testsuite/g++.dg/abi/forced.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/guard2.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/main.C24
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C55
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle3-2.C20
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle3.C1
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle32.C6
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle33.C4
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle37.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle39.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle42.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle45.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle47.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle48.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle49.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle50.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle51.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle53.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle54.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle55.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle56.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle57.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle58.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle59.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle62.C11
-rw-r--r--gcc/testsuite/g++.dg/abi/mangle62a.C11
-rw-r--r--gcc/testsuite/g++.dg/abi/no-weak1.C13
-rw-r--r--gcc/testsuite/g++.dg/abi/regparm1.C2
-rw-r--r--gcc/testsuite/g++.dg/abi/rtti3.C6
-rw-r--r--gcc/testsuite/g++.dg/abi/spec1.C4
-rw-r--r--gcc/testsuite/g++.dg/abi/thunk4.C3
-rw-r--r--gcc/testsuite/g++.dg/abi/thunk6.C19
-rw-r--r--gcc/testsuite/g++.dg/asan/asan.exp38
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_globals_test-wrapper.cc2
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_globals_test.cc43
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_mem_test.cc231
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_oob_test.cc126
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_str_test.cc570
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_test.C16
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_test.cc1179
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_test_config.h58
-rw-r--r--gcc/testsuite/g++.dg/asan/asan_test_utils.h109
-rw-r--r--gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C39
-rw-r--r--gcc/testsuite/g++.dg/asan/deep-tail-call-1.C22
-rw-r--r--gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C56
-rw-r--r--gcc/testsuite/g++.dg/asan/default-options-1.C15
-rw-r--r--gcc/testsuite/g++.dg/asan/dejagnu-gtest.h120
-rw-r--r--gcc/testsuite/g++.dg/asan/dlclose-test-1-so.cc32
-rw-r--r--gcc/testsuite/g++.dg/asan/interception-failure-test-1.C22
-rw-r--r--gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C25
-rw-r--r--gcc/testsuite/g++.dg/asan/interception-test-1.C25
-rw-r--r--gcc/testsuite/g++.dg/asan/large-func-test-1.C45
-rw-r--r--gcc/testsuite/g++.dg/asan/pr55617.C8
-rw-r--r--gcc/testsuite/g++.dg/asan/pr62017.C17
-rw-r--r--gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h78
-rw-r--r--gcc/testsuite/g++.dg/asan/shared-lib-test-1-so.cc20
-rw-r--r--gcc/testsuite/g++.dg/asan/symbolize-callback-1.C21
-rw-r--r--gcc/testsuite/g++.dg/bprob/bprob.exp2
-rw-r--r--gcc/testsuite/g++.dg/cdce3.C5
-rw-r--r--gcc/testsuite/g++.dg/charset/charset.exp2
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/array_test1_tplt.cc118
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/array_test2_tplt.cc141
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/array_test_ND_tplt.cc115
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/braced_list.cc13
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc126
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc134
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c36
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/postincr_test.cc107
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/AN/preincr_test.cc106
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc67
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/const_spawn.cc78
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/fib-opr-overload.cc94
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/fib-tplt.cc53
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns.cc237
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc174
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp71
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/ef_test.C37
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/for.C26
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/for2.C43
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/for3.C18
-rw-r--r--gcc/testsuite/g++.dg/cilk-plus/for4.C22
-rw-r--r--gcc/testsuite/g++.dg/compat/break/README2
-rw-r--r--gcc/testsuite/g++.dg/compat/compat.exp2
-rw-r--r--gcc/testsuite/g++.dg/compat/struct-layout-1.exp6
-rw-r--r--gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c6
-rw-r--r--gcc/testsuite/g++.dg/constexpr-null1.C2
-rw-r--r--gcc/testsuite/g++.dg/conversion/ambig2.C18
-rw-r--r--gcc/testsuite/g++.dg/conversion/dr195.C17
-rw-r--r--gcc/testsuite/g++.dg/conversion/op4.C2
-rw-r--r--gcc/testsuite/g++.dg/conversion/ref1.C9
-rw-r--r--gcc/testsuite/g++.dg/conversion/simd1.C3
-rw-r--r--gcc/testsuite/g++.dg/conversion/void2.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp/limits.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp/paste1.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp/paste2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp/syshdr3.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp/syshdr3.h7
-rw-r--r--gcc/testsuite/g++.dg/cpp/ucn-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wunused-parm.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/__func__.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/access01.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/access02.C39
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-11.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-19.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-21.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-23.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-24.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-25.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-27.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-28.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-30.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-32.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-33.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-33a.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-34.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-35.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-36.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-37.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C41
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-39.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-40.C33
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-41.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286a.C60
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286b.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alias-decl-enum-1.C47
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alignof.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alignof2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alignof3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/alignof4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto1.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto10.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto11.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto14.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto18.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto27.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto29.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto3.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto34.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto35.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto36.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto37.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto38.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto39.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto40.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto41.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto42.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/auto9.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bad_array_new1.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bad_array_new2.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bind.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket3.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/bracket4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/cast-bug.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/cast.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/catch1.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/collapse-bug.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/collapse.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-46420.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-52672.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-53094-1.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-55708.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-56302.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-63241.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-99.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-access.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-aggr1.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-and.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C54
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-array7.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-attribute.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C33
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-auto.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-base.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-builtin2.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-complex.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-condition2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor10.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ctor9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-decl.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-default-ctor.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-delegating.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-delete.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-expinst.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-explicit-inst.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-friend-2.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-function3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-generated1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice10.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice12.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice13.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice14.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice8.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ice9.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist7.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C36
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-is_literal.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-main.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-missing.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-neg2.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept7.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-pedantic.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-pos1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-pure.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ref3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C37
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static10.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-string.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-switch2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template4.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-template7.C32
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-throw.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-typeid.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union4.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-union5.C42
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-using.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-value.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-value2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-virtual.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-wstring1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc7.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dc8.C66
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-1212.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-33837.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-33838.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-54581.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-call1.C32
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-call2.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-call3.C132
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype10.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype12.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype15.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype17.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype2.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype27.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype28.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype29.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype3.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype31.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype32.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype33.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype34.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype35.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype36.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype39.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype40.C101
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype41.C43
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype42.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype43.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype44.C44
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype45.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype46.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype47.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype48.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype49.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype50.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype51.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype52.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype53.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype54.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype55.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype56.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype57.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/decltype9.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/deduce.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted13.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted15.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted19.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted19a.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted2.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted22.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted23.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted26.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted27.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted31.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted32.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted34.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted35.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted37.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted38.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted39.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted40.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted41.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted42.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted43.C60
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted44.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted45.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted46.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted47.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted48.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted49.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/defaulted9.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/deleted1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/deleted2.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/deleted3.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dependent1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/diag1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/dyncast1.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/elision.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/elision2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/elision_neg.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum11.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum12.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum13.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum15.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum19.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum21b.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum22.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum23.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum24.C57
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum25.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum26.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum27.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum28.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum8.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum_base.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum_base2.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error1.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error6.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/error8.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit3.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/explicit7.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/extern_template-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/extern_template-2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum10.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum11.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum6.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum7.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum8.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/forw_enum9.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/friend1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/friend2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-10.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-11.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-12.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-13.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-14.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-15.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-16.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.2.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-18.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-19.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-2-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-2.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-22.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-23.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-24.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-25.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-26.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-27.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-28.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-29.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-3.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-30.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-31.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-32.C37
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-33.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-34.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-35.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-38.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-39-1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-39.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-40.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-41.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-43.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-44.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-45.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-46.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-47-1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-47.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-48-2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-48.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-49.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-5.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-50.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-51.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-53.C39
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-54.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-56.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-57.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-6.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-7.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gen-attrs-9.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C115
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C115
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit-copy.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit11.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/implicit9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor1.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor10.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor13.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor14.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor16.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C45
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor2.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor4.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor7.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor8.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-array2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-array4.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-explicit-sfinae.C46
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-lifetime1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-lifetime2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-opt.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-protected.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-pure.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-value.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist-value2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist13.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist16.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist18.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist21.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist22.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist25.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist26.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist27.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist31.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist32.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist33.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist34.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist35.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist36.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist37.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist38.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist39.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist40.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist41.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist42.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist43.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist44.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist45.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist46.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist47.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist48.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist49.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist50.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist51.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist52.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist53.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist54.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist55.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist56.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist57.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist58.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist59.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist62.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist63.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist64.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist65.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist66.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist67.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist68.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist69.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist70.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist71.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist72.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist73.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist74.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist75.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist76.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist77.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist78.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist79.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist80.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist81.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist82.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist84.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist86.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/initlist9.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inline-ns1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inline-ns2.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/inline-ns3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/iop.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-50220.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-anon1.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-redundancy.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C38
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv8.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctor-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctors.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-debug.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg4.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-diag1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-direct-init.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err3.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-field-names.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-for.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice11.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice12.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice8.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-init.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist3.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-intname.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-lookup-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable2.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi3.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi4.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C47
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-qualified.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-sfinae1.C55
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-syntax1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template10.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template11.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template7.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template8.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this10.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this11.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this12.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this13.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this14.C49
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this15.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this16.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this18.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this5.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-type.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-typedef.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval2.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C57
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn4.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/linkage2.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/local-targ1.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/long_long.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/move1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/named.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/named_refs.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/new1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept01.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept02.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept03.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept04.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept05.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept06.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept07.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept08.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept09.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept15.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept17.C54
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept18.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept19.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept21.C87
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/noexcept22.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nolinkage1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/not_special.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-list1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-list3.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-sizeof.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template10.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template11.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template12.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template13.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template3.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template4.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C38
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-union1.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-union4.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual2.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi7.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi8.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nsdmi9.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr01.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr02.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr03.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr04.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr05.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr06.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr07.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr08.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr09.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr10.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr11.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr12.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr13.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr14.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr15.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr16.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr17.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr18.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr19.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr20.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr21.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr22.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr23.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr27.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr29.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/nullptr30.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overflow1.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overload.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overload2.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overload3.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/overloadn.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/override1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/override2.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/override4.C45
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/parse1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/parse2.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31431-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31431.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31432.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31434.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31437.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31438.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31439.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31442.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31443.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31444.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31445.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr31993.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32114.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32115.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32125.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32126.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32127.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32128.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32252.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32253.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr32566.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr33839.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr33930.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr33955.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr33996.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34054.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34056.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34057.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34058.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34060.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr34061.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr38646.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr38795.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr39639.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr42844-2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr45908.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr47416.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr47476.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr48522.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr50025.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr50491.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr50901.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51150.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51216.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51225.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51226.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51313.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51420.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51463.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51547.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51619.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr51786.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr52440.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr52744.C83
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr54318.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr54323.C37
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr57101.C221
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr57172.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr57416.C45
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr57981.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58072.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58080.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58155.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58510.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58563.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58674.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58707.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58781.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr58871.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr59111.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr59641.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr60047.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr60215.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/pr60249.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for10.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for11.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for12.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for13.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for14.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for15.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for16.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for17.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for18.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for19.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for23.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for25.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for26.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for27.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for28.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for3.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for5.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for6.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for7.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/range-for8.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual-mangle1.C37
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual-multi-neg.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual1.C30
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual10.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual11.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual12.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual13.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual14.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual15.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual2.C75
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual3.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual4.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual5.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual6.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual7.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual8.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/ref-qual9.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/README3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/array1.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/bitfield-err1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/call1.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/condition1.C80
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/ctor1.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/enum1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/ext-label10.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/isnan.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/no-elide1.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/parse-ambig5.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/ptrmem1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress2.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress3.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress4.C62
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress5.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/regress6.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/template-const1.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/regress/value-dep1.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/reinterpret_cast1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-cast.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-cast2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-cond1.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-conv1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-copy1.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-deduce.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-dotstar.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-func.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-func2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-func3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-restrict.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-return.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-template1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-this.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv1n.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv1p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv2n.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv2p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv3n.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv3p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv4n.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv4p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv5n.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv5p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv6n.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv6p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv7n.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv7p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv8p.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rv9p.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/rvo.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/scoped_enum.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae16.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae21.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae24.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae27.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae31.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae32.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae33.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae34.C27
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae35.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae36.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae37.C36
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae38.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae39.C146
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae40.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae41.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae42.C46
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae43.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae44.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae45.C35
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae46.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae47.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae48.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae49.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae50.C41
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/sfinae9.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert10.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert11.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert3.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert4.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert7.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert8.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/static_assert9.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/std-layout1.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C115
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C115
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/stddef.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/stdint.C135
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/syntax-err1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default4.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/temp_default5.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/template_deduction.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing1.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing2.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing3.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trailing8.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/traits1.C133
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/trivial1.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-addr.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-args.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-args2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-concat.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-constexpr.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-declare-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-friend.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-general.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-inline.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-linkage-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-nonempty-str-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-nospace-neg.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C19
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-string-length.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.h22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-systemheader.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-template.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms-neg.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/union1.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/union2.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/union3.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/union4.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/union5.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-104.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-bind.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-default.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-diag1.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-function.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-init.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-new.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-new2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-rref.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-throw.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-unify.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic10.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic100.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic101.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic102.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic103.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic105.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic106.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic107.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic108.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic109.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic11.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic110.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic111.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic112.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic113.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic114.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic115.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic116.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic117.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic118.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic12.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic121.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic122.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic124.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic126.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic127.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic13.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic130.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic135.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic139.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic14.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic140.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic141.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic142.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic143.C63
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic144.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic145.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic146.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic147.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic148.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic149.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic15.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic150.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic151.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic152.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic153.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic154.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic155.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic156.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic158.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic159.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic16.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic160.C49
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic161.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic162.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic17.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic18.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic19.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic20.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic21.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic22.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic23.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic24.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic25.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic26.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic27.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic28.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic29.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic3.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic30.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic31.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic32.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic33.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic34.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic35.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic36.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic37.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic38.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic39.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic4.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic40.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic41.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic42.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic43.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic44.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic45.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic46.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic47.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic48.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic49.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic5.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic50.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic51.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic52.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic53.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic54.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic55.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic56.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic57.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic58.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic59.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic6.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic60.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic63.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic64.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic65.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic66.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic67.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic68.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic69.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic7.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic70.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic71.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic72.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic73.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic74.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic75.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic76.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic77.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic78.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic79.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic8.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic80.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic81.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic82.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic83.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic84.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic85.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic86.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic87.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic88.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic89.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic9.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic90.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic91.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic92.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic93.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic94.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic95.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic96.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic97.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic98.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/variadic99.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-33964.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34050.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34051.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34052.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34055.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34102.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34103.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34219.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34314.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34399.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34606.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34751.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34753.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34754.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34755.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34919.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-34961.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35023.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35024.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35026.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35147.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35242.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35243.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-35331.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-40092.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-51314.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-55323.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/vt-55542.C2
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C1
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C58
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/attr-deprecated.C58
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-dtor1.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn1.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn10.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn11.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn12.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn13.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn14.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn15.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn16.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn17.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn18.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn19.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn2.C3
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn20.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn21.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn22.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn23.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn24.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn25.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn3.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn4.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn5.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn6.C18
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn7.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn8.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-fn9.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-mangle1.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/auto-neg1.C16
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/complex_literals.h12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/context-conv1.C32
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/cplusplus.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/digit-sep-neg.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/digit-sep.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C81
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C231
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C99
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C36
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-deduce-mult.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-cfun.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C42
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-udt.C51
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C25
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-xcfun.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic-xudt.C5
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-generic.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init1.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init2.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init3.C11
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init4.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init5.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init6.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/lambda-init7.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/mangle1.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/paren1.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/phoobhar.h16
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr57640.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr57644.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58500.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58533.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58534.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58535.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58536.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58548.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58549.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58637.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr58708.C59
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59110.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59112.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59113.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59629.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59635.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59636.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59638.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr59867.C52
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60033.C20
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60052.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60053.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60064.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60065.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60190.C4
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60311.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60332.C6
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60376.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60377.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60384.C9
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60390.C26
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60391.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60393.C10
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60573.C28
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60626.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/pr60627.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/regress1.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/system-binary-constants-1.C13
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h0
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-empty-string-neg.C21
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C17
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla-initlist1.C22
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla1.C40
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla10.C24
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla11.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla12.C7
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla13.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla2.C14
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla3.C29
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla4.C23
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla5.C8
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla6.C15
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla7.C12
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla8.C31
-rw-r--r--gcc/testsuite/g++.dg/cpp1y/vla9.C31
-rw-r--r--gcc/testsuite/g++.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/auto1.C31
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/block.C29
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C46
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/enum1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C32
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C3
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C6
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C6
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C10
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C14
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C39
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C36
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C8
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C67
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C23
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C193
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C193
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/rv1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C3
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C4
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C9
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C3
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C3
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C13
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C2
-rw-r--r--gcc/testsuite/g++.dg/debug/localclass1.C3
-rw-r--r--gcc/testsuite/g++.dg/debug/nullptr01.C5
-rw-r--r--gcc/testsuite/g++.dg/debug/pr46583.C1
-rw-r--r--gcc/testsuite/g++.dg/debug/pr47106.C1
-rw-r--r--gcc/testsuite/g++.dg/debug/pr53466.C39
-rw-r--r--gcc/testsuite/g++.dg/debug/pr53860.C14
-rw-r--r--gcc/testsuite/g++.dg/debug/pr54499.C22
-rw-r--r--gcc/testsuite/g++.dg/debug/pr54831.C20
-rw-r--r--gcc/testsuite/g++.dg/debug/pr56294.C31
-rw-r--r--gcc/testsuite/g++.dg/debug/pr56819.C1
-rw-r--r--gcc/testsuite/g++.dg/debug/ra1.C77
-rw-r--r--gcc/testsuite/g++.dg/debug/template2.C14
-rw-r--r--gcc/testsuite/g++.dg/dfp/dfp.exp2
-rw-r--r--gcc/testsuite/g++.dg/dg.exp7
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/method1.C4
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/pr58979.C4
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/pr59838.C4
-rw-r--r--gcc/testsuite/g++.dg/diagnostic/variadic1.C9
-rw-r--r--gcc/testsuite/g++.dg/eh/anon1.C26
-rw-r--r--gcc/testsuite/g++.dg/eh/anon1a.cc10
-rw-r--r--gcc/testsuite/g++.dg/eh/anon2.C24
-rw-r--r--gcc/testsuite/g++.dg/eh/ctor1.C8
-rw-r--r--gcc/testsuite/g++.dg/eh/dtor3.C36
-rw-r--r--gcc/testsuite/g++.dg/eh/goto2.C12
-rw-r--r--gcc/testsuite/g++.dg/eh/init-temp1.C8
-rw-r--r--gcc/testsuite/g++.dg/eh/ppc64-sighandle-cr.C54
-rw-r--r--gcc/testsuite/g++.dg/eh/sighandle.C38
-rw-r--r--gcc/testsuite/g++.dg/eh/spbp.C2
-rw-r--r--gcc/testsuite/g++.dg/eh/uncaught1.C2
-rw-r--r--gcc/testsuite/g++.dg/eh/uncaught4.C29
-rw-r--r--gcc/testsuite/g++.dg/eh/unwind-direct.C15
-rw-r--r--gcc/testsuite/g++.dg/expr/bitfield12.C19
-rw-r--r--gcc/testsuite/g++.dg/expr/cast2.C2
-rw-r--r--gcc/testsuite/g++.dg/expr/cond12.C12
-rw-r--r--gcc/testsuite/g++.dg/expr/cond8.C2
-rw-r--r--gcc/testsuite/g++.dg/expr/const1.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/alias-decl-attr1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/alias-decl-attr2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/alias-decl-attr3.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/alias-decl-attr4.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/altivec-2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/altivec-7.C22
-rw-r--r--gcc/testsuite/g++.dg/ext/anon-struct4.C6
-rw-r--r--gcc/testsuite/g++.dg/ext/anon-struct5.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/anon-struct6.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/asm12.C14
-rw-r--r--gcc/testsuite/g++.dg/ext/attr-alias-3.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib32.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib46.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib47.C21
-rw-r--r--gcc/testsuite/g++.dg/ext/attrib48.C6
-rw-r--r--gcc/testsuite/g++.dg/ext/attribute-test-1.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/attribute-test-2.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/attribute-test-3.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/attribute-test-4.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/bases.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin-bswap1.C22
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin-line1.C17
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin-offsetof1.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/builtin30.C27
-rw-r--r--gcc/testsuite/g++.dg/ext/cleanup-1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/cleanup-10.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/cleanup-11.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/cleanup-8.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/cleanup-9.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/complex8.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/complit13.C11
-rw-r--r--gcc/testsuite/g++.dg/ext/complit14.C11
-rw-r--r--gcc/testsuite/g++.dg/ext/desig5.C7
-rw-r--r--gcc/testsuite/g++.dg/ext/desig6.C18
-rw-r--r--gcc/testsuite/g++.dg/ext/flexary3.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/int128-3.C12
-rw-r--r--gcc/testsuite/g++.dg/ext/int128-4.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/is_base_of_incomplete-2.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/is_empty2.C11
-rw-r--r--gcc/testsuite/g++.dg/ext/is_final.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/is_literal_type1.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/is_pod.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/ivdep-1.C18
-rw-r--r--gcc/testsuite/g++.dg/ext/label13.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/label13a.C25
-rw-r--r--gcc/testsuite/g++.dg/ext/label14.C17
-rw-r--r--gcc/testsuite/g++.dg/ext/label5.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/mv1.C132
-rw-r--r--gcc/testsuite/g++.dg/ext/mv10.C12
-rw-r--r--gcc/testsuite/g++.dg/ext/mv11.C23
-rw-r--r--gcc/testsuite/g++.dg/ext/mv12-aux.cc10
-rw-r--r--gcc/testsuite/g++.dg/ext/mv12.C22
-rw-r--r--gcc/testsuite/g++.dg/ext/mv12.h4
-rw-r--r--gcc/testsuite/g++.dg/ext/mv13.C18
-rw-r--r--gcc/testsuite/g++.dg/ext/mv14.C40
-rw-r--r--gcc/testsuite/g++.dg/ext/mv15.C40
-rw-r--r--gcc/testsuite/g++.dg/ext/mv16.C65
-rw-r--r--gcc/testsuite/g++.dg/ext/mv2.C118
-rw-r--r--gcc/testsuite/g++.dg/ext/mv3.C36
-rw-r--r--gcc/testsuite/g++.dg/ext/mv4.C24
-rw-r--r--gcc/testsuite/g++.dg/ext/mv5.C25
-rw-r--r--gcc/testsuite/g++.dg/ext/mv6.C28
-rw-r--r--gcc/testsuite/g++.dg/ext/mv7.C12
-rw-r--r--gcc/testsuite/g++.dg/ext/mv8.C7
-rw-r--r--gcc/testsuite/g++.dg/ext/mv9.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/pr56790-1.C17
-rw-r--r--gcc/testsuite/g++.dg/ext/pr57362.C198
-rw-r--r--gcc/testsuite/g++.dg/ext/pr57509.C15
-rw-r--r--gcc/testsuite/g++.dg/ext/pr57548.C25
-rw-r--r--gcc/testsuite/g++.dg/ext/pr57735.C145
-rw-r--r--gcc/testsuite/g++.dg/ext/pr58834.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/pr59378.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/pr59706.C21
-rw-r--r--gcc/testsuite/g++.dg/ext/restrict2.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/sizeof-complit.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/stmtexpr15.C7
-rw-r--r--gcc/testsuite/g++.dg/ext/stmtexpr16.C10
-rw-r--r--gcc/testsuite/g++.dg/ext/strncpy-chk1.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/sync-4.C121
-rw-r--r--gcc/testsuite/g++.dg/ext/timevar2.C14
-rw-r--r--gcc/testsuite/g++.dg/ext/traits1.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/transparent-union.C5
-rw-r--r--gcc/testsuite/g++.dg/ext/typeof10.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type10.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type3.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type5.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type6.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type7.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type8.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/underlying_type9.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-array.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-badconcat.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-badconcat2.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-cvt.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-cxx0x.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-cxx98.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-dflt.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-dflt2.C1
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-gnuxx98.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-mangle.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-rtti.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-type.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-typedef-cxx0x.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf-typespec.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf16-1.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf16-2.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf16-3.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf16-4.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf32-1.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf32-2.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf32-3.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf32-4.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/utf8-1.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/utf8-2.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/va-arg1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/vector17.C12
-rw-r--r--gcc/testsuite/g++.dg/ext/vector18.C13
-rw-r--r--gcc/testsuite/g++.dg/ext/vector19.C51
-rw-r--r--gcc/testsuite/g++.dg/ext/vector20.C6
-rw-r--r--gcc/testsuite/g++.dg/ext/vector21.C39
-rw-r--r--gcc/testsuite/g++.dg/ext/vector22.C22
-rw-r--r--gcc/testsuite/g++.dg/ext/vector23.C28
-rw-r--r--gcc/testsuite/g++.dg/ext/vector24.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/vector25.C6
-rw-r--r--gcc/testsuite/g++.dg/ext/vector26.C9
-rw-r--r--gcc/testsuite/g++.dg/ext/vector27.C7
-rw-r--r--gcc/testsuite/g++.dg/ext/vector5.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/anon6.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/anon8.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/visibility/template11.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/vla1.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/vla11.C3
-rw-r--r--gcc/testsuite/g++.dg/ext/vla12.C28
-rw-r--r--gcc/testsuite/g++.dg/ext/vla13.C8
-rw-r--r--gcc/testsuite/g++.dg/ext/vla14.C23
-rw-r--r--gcc/testsuite/g++.dg/ext/vla15.C20
-rw-r--r--gcc/testsuite/g++.dg/ext/vla4.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/vla5.C2
-rw-r--r--gcc/testsuite/g++.dg/ext/vla8.C4
-rw-r--r--gcc/testsuite/g++.dg/ext/weak5.C12
-rw-r--r--gcc/testsuite/g++.dg/fstack-protector-strong.C35
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov-8.C35
-rw-r--r--gcc/testsuite/g++.dg/gcov/gcov.exp2
-rw-r--r--gcc/testsuite/g++.dg/gomp/block-0.C6
-rw-r--r--gcc/testsuite/g++.dg/gomp/block-3.C6
-rw-r--r--gcc/testsuite/g++.dg/gomp/clause-3.C10
-rw-r--r--gcc/testsuite/g++.dg/gomp/declare-simd-1.C243
-rw-r--r--gcc/testsuite/g++.dg/gomp/declare-simd-2.C98
-rw-r--r--gcc/testsuite/g++.dg/gomp/depend-1.C70
-rw-r--r--gcc/testsuite/g++.dg/gomp/depend-2.C87
-rw-r--r--gcc/testsuite/g++.dg/gomp/for-19.C8
-rw-r--r--gcc/testsuite/g++.dg/gomp/for-20.C16
-rw-r--r--gcc/testsuite/g++.dg/gomp/gomp.exp6
-rw-r--r--gcc/testsuite/g++.dg/gomp/openmp-simd-1.C47
-rw-r--r--gcc/testsuite/g++.dg/gomp/openmp-simd-2.C45
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr34964.C2
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr38639.C6
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr58567.C15
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr58702.C10
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr58874.C14
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr59150.C25
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr59297.C25
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr60682.C44
-rw-r--r--gcc/testsuite/g++.dg/gomp/pr63249.C35
-rw-r--r--gcc/testsuite/g++.dg/gomp/simd-1.C31
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-1.C32
-rw-r--r--gcc/testsuite/g++.dg/gomp/target-2.C32
-rw-r--r--gcc/testsuite/g++.dg/gomp/taskgroup-1.C32
-rw-r--r--gcc/testsuite/g++.dg/gomp/teams-1.C66
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-5.C12
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-template1.C13
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-wrap1.C13
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-wrap2.C16
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-wrap3.C15
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-wrap4.C14
-rw-r--r--gcc/testsuite/g++.dg/gomp/tls-wrapper-cse.C18
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-1.C119
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-2.C119
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-3.C191
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-4.C14
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-5.C41
-rw-r--r--gcc/testsuite/g++.dg/gomp/udr-6.C59
-rw-r--r--gcc/testsuite/g++.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/g++.dg/guality/guality.exp8
-rw-r--r--gcc/testsuite/g++.dg/guality/pr55665.C33
-rw-r--r--gcc/testsuite/g++.dg/inherit/covariant21.C17
-rw-r--r--gcc/testsuite/g++.dg/inherit/crash4.C10
-rw-r--r--gcc/testsuite/g++.dg/inherit/pr57942.C9
-rw-r--r--gcc/testsuite/g++.dg/inherit/using5.C2
-rw-r--r--gcc/testsuite/g++.dg/inherit/virtual10.C11
-rw-r--r--gcc/testsuite/g++.dg/inherit/virtual11.C17
-rw-r--r--gcc/testsuite/g++.dg/inherit/virtual9.C44
-rw-r--r--gcc/testsuite/g++.dg/init/aggr10.C6
-rw-r--r--gcc/testsuite/g++.dg/init/array21.C4
-rw-r--r--gcc/testsuite/g++.dg/init/array24.C4
-rw-r--r--gcc/testsuite/g++.dg/init/array26.C2
-rw-r--r--gcc/testsuite/g++.dg/init/array30.C7
-rw-r--r--gcc/testsuite/g++.dg/init/array31.C10
-rw-r--r--gcc/testsuite/g++.dg/init/array32.C7
-rw-r--r--gcc/testsuite/g++.dg/init/array35.C3
-rw-r--r--gcc/testsuite/g++.dg/init/array36.C8
-rw-r--r--gcc/testsuite/g++.dg/init/array37.C14
-rw-r--r--gcc/testsuite/g++.dg/init/bitfield3.C11
-rw-r--r--gcc/testsuite/g++.dg/init/bitfield4.C24
-rw-r--r--gcc/testsuite/g++.dg/init/bitfield5.C12
-rw-r--r--gcc/testsuite/g++.dg/init/brace2.C2
-rw-r--r--gcc/testsuite/g++.dg/init/brace6.C2
-rw-r--r--gcc/testsuite/g++.dg/init/const10.C33
-rw-r--r--gcc/testsuite/g++.dg/init/const11.C29
-rw-r--r--gcc/testsuite/g++.dg/init/const9.C2
-rw-r--r--gcc/testsuite/g++.dg/init/copy7.C9
-rw-r--r--gcc/testsuite/g++.dg/init/ctor11.C19
-rw-r--r--gcc/testsuite/g++.dg/init/ctor4-1.C21
-rw-r--r--gcc/testsuite/g++.dg/init/ctor4.C8
-rw-r--r--gcc/testsuite/g++.dg/init/ctor8.C5
-rw-r--r--gcc/testsuite/g++.dg/init/delete1.C4
-rw-r--r--gcc/testsuite/g++.dg/init/dso_handle2.C11
-rw-r--r--gcc/testsuite/g++.dg/init/explicit1.C9
-rw-r--r--gcc/testsuite/g++.dg/init/explicit2.C8
-rw-r--r--gcc/testsuite/g++.dg/init/new34.C11
-rw-r--r--gcc/testsuite/g++.dg/init/new35.C13
-rw-r--r--gcc/testsuite/g++.dg/init/new36.C153
-rw-r--r--gcc/testsuite/g++.dg/init/new37.C63
-rw-r--r--gcc/testsuite/g++.dg/init/new38.C54
-rw-r--r--gcc/testsuite/g++.dg/init/new39.C68
-rw-r--r--gcc/testsuite/g++.dg/init/new40.C114
-rw-r--r--gcc/testsuite/g++.dg/init/no-elide1.C14
-rw-r--r--gcc/testsuite/g++.dg/init/null1.C2
-rw-r--r--gcc/testsuite/g++.dg/init/pr25811.C84
-rw-r--r--gcc/testsuite/g++.dg/init/pr29043.C19
-rw-r--r--gcc/testsuite/g++.dg/init/pr43719.C68
-rw-r--r--gcc/testsuite/g++.dg/init/pr44086.C10
-rw-r--r--gcc/testsuite/g++.dg/init/pr55497.C15
-rw-r--r--gcc/testsuite/g++.dg/init/pr58811.C11
-rw-r--r--gcc/testsuite/g++.dg/init/pr60572.C13
-rw-r--r--gcc/testsuite/g++.dg/init/ref14.C2
-rw-r--r--gcc/testsuite/g++.dg/init/static-init3.C9
-rw-r--r--gcc/testsuite/g++.dg/init/uninitialized1.C12
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-10.C34
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-11.C49
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-12.C22
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-13.C20
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-14.C34
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-15.C40
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-16.C39
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-17.C44
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-18.C37
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-19.C32
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-20.C31
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-21.C41
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-22.C41
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-23.C49
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-24.C42
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-25.C26
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-26.C29
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-27.C27
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-28.C17
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-28a.C15
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-29.C75
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-30.C25
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-31.C23
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-39.C27
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-40.C21
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-9.C33
-rw-r--r--gcc/testsuite/g++.dg/ipa/devirt-c-7.C1
-rw-r--r--gcc/testsuite/g++.dg/ipa/imm-devirt-1.C62
-rw-r--r--gcc/testsuite/g++.dg/ipa/imm-devirt-2.C95
-rw-r--r--gcc/testsuite/g++.dg/ipa/inline-1.C36
-rw-r--r--gcc/testsuite/g++.dg/ipa/inline-2.C36
-rw-r--r--gcc/testsuite/g++.dg/ipa/inline-3.C29
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-1.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-2.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-3.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-4.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-5.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-7.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-8.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/ivinline-9.C2
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr56310.C36
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr57670.C37
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr58371.C204
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr59176.C41
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr59355.C14
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr59737.C48
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60419.C80
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60457.C17
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60600.C34
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-1.C50
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-2.C15
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-3.C81
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr60640-4.C85
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61085.C33
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61160-1.C32
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61160-2.C44
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61160-3.C37
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61540.C38
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr61654.C40
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr62015.C55
-rw-r--r--gcc/testsuite/g++.dg/ipa/pr63306.C14
-rw-r--r--gcc/testsuite/g++.dg/ipa/remref-1.C36
-rw-r--r--gcc/testsuite/g++.dg/ipa/remref-2.C37
-rw-r--r--gcc/testsuite/g++.dg/ipa/type-inheritance-1.C28
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig1.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig2.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig3.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig4.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/ambig5.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/anon6.C8
-rw-r--r--gcc/testsuite/g++.dg/lookup/crash3.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/crash6.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/crash8.C13
-rw-r--r--gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/friend15.C1
-rw-r--r--gcc/testsuite/g++.dg/lookup/hidden-class17.C22
-rw-r--r--gcc/testsuite/g++.dg/lookup/linkage1.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/name-clash10.C8
-rw-r--r--gcc/testsuite/g++.dg/lookup/name-clash5.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/name-clash6.C2
-rw-r--r--gcc/testsuite/g++.dg/lookup/strong-using-2.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/using16.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/using17.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/using18.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/using20.C4
-rw-r--r--gcc/testsuite/g++.dg/lookup/using53.C53
-rw-r--r--gcc/testsuite/g++.dg/lookup/using9.C4
-rw-r--r--gcc/testsuite/g++.dg/lto/20090303_0.C1
-rw-r--r--gcc/testsuite/g++.dg/lto/lto.exp14
-rw-r--r--gcc/testsuite/g++.dg/lto/pr42987_0.C22
-rw-r--r--gcc/testsuite/g++.dg/lto/pr42987_1.C14
-rw-r--r--gcc/testsuite/g++.dg/lto/pr51992_0.C1
-rw-r--r--gcc/testsuite/g++.dg/lto/pr54625-1_0.c10
-rw-r--r--gcc/testsuite/g++.dg/lto/pr54625-1_1.C19
-rw-r--r--gcc/testsuite/g++.dg/lto/pr54625-2_0.c9
-rw-r--r--gcc/testsuite/g++.dg/lto/pr54625-2_1.C24
-rw-r--r--gcc/testsuite/g++.dg/lto/pr60150.H20
-rw-r--r--gcc/testsuite/g++.dg/lto/pr60150_0.C8
-rw-r--r--gcc/testsuite/g++.dg/lto/pr60150_1.C4
-rw-r--r--gcc/testsuite/g++.dg/lto/pr60567_0.C23
-rw-r--r--gcc/testsuite/g++.dg/lto/pr62026.C22
-rw-r--r--gcc/testsuite/g++.dg/lto/v1-plugin-api-not-supported_0.C54
-rw-r--r--gcc/testsuite/g++.dg/opt/builtins2.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/const5.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/declone1.C21
-rw-r--r--gcc/testsuite/g++.dg/opt/devirt3.C24
-rw-r--r--gcc/testsuite/g++.dg/opt/devirt4.C15
-rw-r--r--gcc/testsuite/g++.dg/opt/devirt5.C19
-rw-r--r--gcc/testsuite/g++.dg/opt/dump1.C768
-rw-r--r--gcc/testsuite/g++.dg/opt/enum2.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/life1.C2
-rw-r--r--gcc/testsuite/g++.dg/opt/longbranch1.C4
-rw-r--r--gcc/testsuite/g++.dg/opt/longbranch2.C4
-rw-r--r--gcc/testsuite/g++.dg/opt/pr42295.C18
-rw-r--r--gcc/testsuite/g++.dg/opt/pr48549.C1
-rw-r--r--gcc/testsuite/g++.dg/opt/pr52643.C64
-rw-r--r--gcc/testsuite/g++.dg/opt/pr52727.C1
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55081.C17
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55137.C4
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55281.C17
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55329.C73
-rw-r--r--gcc/testsuite/g++.dg/opt/pr55717.C107
-rw-r--r--gcc/testsuite/g++.dg/opt/pr56381.C156
-rw-r--r--gcc/testsuite/g++.dg/opt/pr56999.C189
-rw-r--r--gcc/testsuite/g++.dg/opt/pr57411.C23
-rw-r--r--gcc/testsuite/g++.dg/opt/pr57661.C76
-rw-r--r--gcc/testsuite/g++.dg/opt/pr58006.C22
-rw-r--r--gcc/testsuite/g++.dg/opt/pr58165.C14
-rw-r--r--gcc/testsuite/g++.dg/opt/pr58864.C21
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59470.C188
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59622-2.C21
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59622-3.C21
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59622-4.C23
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59622-5.C26
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59622.C19
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59647.C32
-rw-r--r--gcc/testsuite/g++.dg/opt/pr59947.C34
-rw-r--r--gcc/testsuite/g++.dg/opt/pr60002.C12
-rw-r--r--gcc/testsuite/g++.dg/opt/pr60597.C46
-rw-r--r--gcc/testsuite/g++.dg/opt/pr60849.C13
-rw-r--r--gcc/testsuite/g++.dg/opt/pr60912.C18
-rw-r--r--gcc/testsuite/g++.dg/opt/pr61456.C26
-rw-r--r--gcc/testsuite/g++.dg/opt/pr61654.C27
-rw-r--r--gcc/testsuite/g++.dg/opt/pr62146.C51
-rw-r--r--gcc/testsuite/g++.dg/opt/typeinfo1.C27
-rw-r--r--gcc/testsuite/g++.dg/opt/value-init1.C14
-rw-r--r--gcc/testsuite/g++.dg/opt/vt2.C24
-rw-r--r--gcc/testsuite/g++.dg/opt/vt3.C43
-rw-r--r--gcc/testsuite/g++.dg/opt/vt4.C31
-rw-r--r--gcc/testsuite/g++.dg/other/PR23205.C2
-rw-r--r--gcc/testsuite/g++.dg/other/abstract4.C18
-rw-r--r--gcc/testsuite/g++.dg/other/abstract5.C6
-rw-r--r--gcc/testsuite/g++.dg/other/abstract6.C10
-rw-r--r--gcc/testsuite/g++.dg/other/anon-union2.C10
-rw-r--r--gcc/testsuite/g++.dg/other/anon-union3.C25
-rw-r--r--gcc/testsuite/g++.dg/other/anon3.C2
-rw-r--r--gcc/testsuite/g++.dg/other/anon4.C2
-rw-r--r--gcc/testsuite/g++.dg/other/anon5.C6
-rw-r--r--gcc/testsuite/g++.dg/other/anon6.C8
-rw-r--r--gcc/testsuite/g++.dg/other/armv7m-1.C69
-rw-r--r--gcc/testsuite/g++.dg/other/crash-6.C4
-rw-r--r--gcc/testsuite/g++.dg/other/crash-7.C4
-rw-r--r--gcc/testsuite/g++.dg/other/crash-8.C3
-rw-r--r--gcc/testsuite/g++.dg/other/cv_func.C2
-rw-r--r--gcc/testsuite/g++.dg/other/cv_func3.C10
-rw-r--r--gcc/testsuite/g++.dg/other/darwin-cfstring1.C2
-rw-r--r--gcc/testsuite/g++.dg/other/default5.C4
-rw-r--r--gcc/testsuite/g++.dg/other/default8.C43
-rw-r--r--gcc/testsuite/g++.dg/other/dump-ada-spec-1.C10
-rw-r--r--gcc/testsuite/g++.dg/other/dump-ada-spec-2.C11
-rw-r--r--gcc/testsuite/g++.dg/other/enum3.C10
-rw-r--r--gcc/testsuite/g++.dg/other/error10.C3
-rw-r--r--gcc/testsuite/g++.dg/other/error15.C28
-rw-r--r--gcc/testsuite/g++.dg/other/error16.C2
-rw-r--r--gcc/testsuite/g++.dg/other/error20.C2
-rw-r--r--gcc/testsuite/g++.dg/other/error4.C2
-rw-r--r--gcc/testsuite/g++.dg/other/error8.C2
-rw-r--r--gcc/testsuite/g++.dg/other/final1.C4
-rw-r--r--gcc/testsuite/g++.dg/other/final2.C3
-rw-r--r--gcc/testsuite/g++.dg/other/gc5.C4
-rw-r--r--gcc/testsuite/g++.dg/other/i386-2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/i386-3.C2
-rw-r--r--gcc/testsuite/g++.dg/other/isnan.C8
-rw-r--r--gcc/testsuite/g++.dg/other/java3.C7
-rw-r--r--gcc/testsuite/g++.dg/other/packed1.C2
-rw-r--r--gcc/testsuite/g++.dg/other/pr23205-2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/pr39496.C2
-rw-r--r--gcc/testsuite/g++.dg/other/pr42685.C1
-rw-r--r--gcc/testsuite/g++.dg/other/pr43631.C15
-rw-r--r--gcc/testsuite/g++.dg/other/pr55650.C22
-rw-r--r--gcc/testsuite/g++.dg/other/pr55650.cc4
-rw-r--r--gcc/testsuite/g++.dg/other/pr59492.C18
-rw-r--r--gcc/testsuite/g++.dg/other/pragma-ep-1.C27
-rw-r--r--gcc/testsuite/g++.dg/other/ptrmem10.C5
-rw-r--r--gcc/testsuite/g++.dg/other/ptrmem11.C5
-rw-r--r--gcc/testsuite/g++.dg/other/redecl2.C2
-rw-r--r--gcc/testsuite/g++.dg/other/unused1.C2
-rw-r--r--gcc/testsuite/g++.dg/other/var_copy-1.C3
-rw-r--r--gcc/testsuite/g++.dg/other/vararg-4.C12
-rw-r--r--gcc/testsuite/g++.dg/other/vector-compare.C36
-rw-r--r--gcc/testsuite/g++.dg/other/warning1.C4
-rw-r--r--gcc/testsuite/g++.dg/overload/addr2.C13
-rw-r--r--gcc/testsuite/g++.dg/overload/defarg1.C4
-rw-r--r--gcc/testsuite/g++.dg/overload/defarg5.C4
-rw-r--r--gcc/testsuite/g++.dg/overload/defarg6.C7
-rw-r--r--gcc/testsuite/g++.dg/overload/defarg7.C12
-rw-r--r--gcc/testsuite/g++.dg/overload/defarg8.C22
-rw-r--r--gcc/testsuite/g++.dg/overload/ellipsis2.C13
-rw-r--r--gcc/testsuite/g++.dg/overload/new1.C3
-rw-r--r--gcc/testsuite/g++.dg/overload/operator6.C27
-rw-r--r--gcc/testsuite/g++.dg/overload/using2.C8
-rw-r--r--gcc/testsuite/g++.dg/overload/using3.C16
-rw-r--r--gcc/testsuite/g++.dg/parse/access11.C35
-rw-r--r--gcc/testsuite/g++.dg/parse/access8.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/ambig4.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/ambig6.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/ambig7.C16
-rw-r--r--gcc/testsuite/g++.dg/parse/ambig8.C15
-rw-r--r--gcc/testsuite/g++.dg/parse/ambig9.C10
-rw-r--r--gcc/testsuite/g++.dg/parse/bitfield4.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/bitfield5.C8
-rw-r--r--gcc/testsuite/g++.dg/parse/crash16.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/crash21.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/crash22.C8
-rw-r--r--gcc/testsuite/g++.dg/parse/crash28.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/crash38.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/crash40.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/crash48.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/crash53.C8
-rw-r--r--gcc/testsuite/g++.dg/parse/crash56.C3
-rw-r--r--gcc/testsuite/g++.dg/parse/crash62.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/crash63.C10
-rw-r--r--gcc/testsuite/g++.dg/parse/crash64.C7
-rw-r--r--gcc/testsuite/g++.dg/parse/crash65.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/crash66.C11
-rw-r--r--gcc/testsuite/g++.dg/parse/defarg16.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/dtor16.C8
-rw-r--r--gcc/testsuite/g++.dg/parse/dtor6.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/enum10.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/enum11.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/enum5.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error11.C36
-rw-r--r--gcc/testsuite/g++.dg/parse/error12.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/error14.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error15.C18
-rw-r--r--gcc/testsuite/g++.dg/parse/error19.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error26.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/error3.C1
-rw-r--r--gcc/testsuite/g++.dg/parse/error30.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/error36.C1
-rw-r--r--gcc/testsuite/g++.dg/parse/error47.C9
-rw-r--r--gcc/testsuite/g++.dg/parse/error48.C10
-rw-r--r--gcc/testsuite/g++.dg/parse/error49.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/error50.C18
-rw-r--r--gcc/testsuite/g++.dg/parse/error51.C13
-rw-r--r--gcc/testsuite/g++.dg/parse/error52.C11
-rw-r--r--gcc/testsuite/g++.dg/parse/error53.C3
-rw-r--r--gcc/testsuite/g++.dg/parse/fn-typedef2.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/friend-main.C30
-rw-r--r--gcc/testsuite/g++.dg/parse/friend5.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/ivdep.C11
-rw-r--r--gcc/testsuite/g++.dg/parse/namespace-alias-1.C7
-rw-r--r--gcc/testsuite/g++.dg/parse/namespace10.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/non-dependent2.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/parameter-declaration-2.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/parser-pr28152-2.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/parser-pr28152.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/pr18770.C12
-rw-r--r--gcc/testsuite/g++.dg/parse/pr29234.C16
-rw-r--r--gcc/testsuite/g++.dg/parse/pr31952-1.C41
-rw-r--r--gcc/testsuite/g++.dg/parse/pr31952-2.C49
-rw-r--r--gcc/testsuite/g++.dg/parse/pr31952-3.C25
-rw-r--r--gcc/testsuite/g++.dg/parse/pr43765.C14
-rw-r--r--gcc/testsuite/g++.dg/parse/pr52071.C23
-rw-r--r--gcc/testsuite/g++.dg/parse/pr56037.C12
-rw-r--r--gcc/testsuite/g++.dg/parse/pr58705.C5
-rw-r--r--gcc/testsuite/g++.dg/parse/redef2.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/ref-qual1.C29
-rw-r--r--gcc/testsuite/g++.dg/parse/ref-qual2.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/struct-5.C3
-rw-r--r--gcc/testsuite/g++.dg/parse/struct-as-enum1.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/template21.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/template23.C4
-rw-r--r--gcc/testsuite/g++.dg/parse/template25.C1
-rw-r--r--gcc/testsuite/g++.dg/parse/template27.C12
-rw-r--r--gcc/testsuite/g++.dg/parse/tmpl-outside1.C2
-rw-r--r--gcc/testsuite/g++.dg/parse/tmpl-outside2.C19
-rw-r--r--gcc/testsuite/g++.dg/parse/typename7.C8
-rw-r--r--gcc/testsuite/g++.dg/parse/unnamed1.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/unnamed2.C6
-rw-r--r--gcc/testsuite/g++.dg/parse/using4.C20
-rw-r--r--gcc/testsuite/g++.dg/pch/pch.exp4
-rw-r--r--gcc/testsuite/g++.dg/plugin/dumb_plugin.c54
-rw-r--r--gcc/testsuite/g++.dg/plugin/header_plugin.c1
-rw-r--r--gcc/testsuite/g++.dg/plugin/plugin.exp4
-rw-r--r--gcc/testsuite/g++.dg/plugin/selfassign.c78
-rw-r--r--gcc/testsuite/g++.dg/pr49718.C44
-rw-r--r--gcc/testsuite/g++.dg/pr49847.C7
-rw-r--r--gcc/testsuite/g++.dg/pr51264-4.C30
-rw-r--r--gcc/testsuite/g++.dg/pr53055.C5
-rw-r--r--gcc/testsuite/g++.dg/pr54655.C35
-rw-r--r--gcc/testsuite/g++.dg/pr55106.C67
-rw-r--r--gcc/testsuite/g++.dg/pr55263.C68
-rw-r--r--gcc/testsuite/g++.dg/pr55513.C12
-rw-r--r--gcc/testsuite/g++.dg/pr55604.C11
-rw-r--r--gcc/testsuite/g++.dg/pr57175.C18
-rw-r--r--gcc/testsuite/g++.dg/pr57662.C339
-rw-r--r--gcc/testsuite/g++.dg/pr57878.C227
-rw-r--r--gcc/testsuite/g++.dg/pr58389.C54
-rw-r--r--gcc/testsuite/g++.dg/pr58438.C45
-rw-r--r--gcc/testsuite/g++.dg/pr58950.C8
-rw-r--r--gcc/testsuite/g++.dg/pr59445.C81
-rw-r--r--gcc/testsuite/g++.dg/pr59477.C24
-rw-r--r--gcc/testsuite/g++.dg/pr59482.C7
-rw-r--r--gcc/testsuite/g++.dg/pr59510.C82
-rw-r--r--gcc/testsuite/g++.dg/pr59695.C125
-rw-r--r--gcc/testsuite/g++.dg/pr60518.C13
-rw-r--r--gcc/testsuite/g++.dg/pr60969.C32
-rw-r--r--gcc/testsuite/g++.dg/pr61094.C31
-rw-r--r--gcc/testsuite/g++.dg/pr61289-2.c62
-rw-r--r--gcc/testsuite/g++.dg/pr61289.C63
-rw-r--r--gcc/testsuite/g++.dg/pr62079.C78
-rw-r--r--gcc/testsuite/g++.dg/predict-loop-exit-1.C13
-rw-r--r--gcc/testsuite/g++.dg/predict-loop-exit-2.C13
-rw-r--r--gcc/testsuite/g++.dg/predict-loop-exit-3.C13
-rw-r--r--gcc/testsuite/g++.dg/pubtypes.C2
-rw-r--r--gcc/testsuite/g++.dg/rtti/dyncast6.C59
-rw-r--r--gcc/testsuite/g++.dg/rtti/fn-quals.C12
-rw-r--r--gcc/testsuite/g++.dg/rtti/typeid10.C36
-rw-r--r--gcc/testsuite/g++.dg/simulate-thread/atomics-1.C5
-rw-r--r--gcc/testsuite/g++.dg/simulate-thread/atomics-2.C4
-rw-r--r--gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp2
-rw-r--r--gcc/testsuite/g++.dg/special/ecos.exp2
-rw-r--r--gcc/testsuite/g++.dg/system-binary-constants-1.C18
-rw-r--r--gcc/testsuite/g++.dg/system-binary-constants-1.h3
-rw-r--r--gcc/testsuite/g++.dg/tc1/dr217.C2
-rw-r--r--gcc/testsuite/g++.dg/template/abstract-dr337.C13
-rw-r--r--gcc/testsuite/g++.dg/template/abstract1.C12
-rw-r--r--gcc/testsuite/g++.dg/template/access23.C16
-rw-r--r--gcc/testsuite/g++.dg/template/access24.C8
-rw-r--r--gcc/testsuite/g++.dg/template/access25.C20
-rw-r--r--gcc/testsuite/g++.dg/template/access26.C6
-rw-r--r--gcc/testsuite/g++.dg/template/access27.C17
-rw-r--r--gcc/testsuite/g++.dg/template/access28.C61
-rw-r--r--gcc/testsuite/g++.dg/template/access7.C2
-rw-r--r--gcc/testsuite/g++.dg/template/aggr-init1.C8
-rw-r--r--gcc/testsuite/g++.dg/template/alignof2.C9
-rw-r--r--gcc/testsuite/g++.dg/template/arg2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/arg9.C8
-rw-r--r--gcc/testsuite/g++.dg/template/array26.C40
-rw-r--r--gcc/testsuite/g++.dg/template/array27.C16
-rw-r--r--gcc/testsuite/g++.dg/template/arrow2.C12
-rw-r--r--gcc/testsuite/g++.dg/template/arrow3.C38
-rw-r--r--gcc/testsuite/g++.dg/template/arrow4.C19
-rw-r--r--gcc/testsuite/g++.dg/template/bitfield2.C16
-rw-r--r--gcc/testsuite/g++.dg/template/canon-type-12.C2
-rw-r--r--gcc/testsuite/g++.dg/template/canon-type-9.C3
-rw-r--r--gcc/testsuite/g++.dg/template/cast2.C13
-rw-r--r--gcc/testsuite/g++.dg/template/cast3.C22
-rw-r--r--gcc/testsuite/g++.dg/template/cond2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/condition1.C79
-rw-r--r--gcc/testsuite/g++.dg/template/const5.C2
-rw-r--r--gcc/testsuite/g++.dg/template/const6.C7
-rw-r--r--gcc/testsuite/g++.dg/template/const7.C8
-rw-r--r--gcc/testsuite/g++.dg/template/const8.C13
-rw-r--r--gcc/testsuite/g++.dg/template/conv14.C30
-rw-r--r--gcc/testsuite/g++.dg/template/crash105.C5
-rw-r--r--gcc/testsuite/g++.dg/template/crash106.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash108.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash112.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash113.C50
-rw-r--r--gcc/testsuite/g++.dg/template/crash114.C5
-rw-r--r--gcc/testsuite/g++.dg/template/crash116.C13
-rw-r--r--gcc/testsuite/g++.dg/template/crash117.C9
-rw-r--r--gcc/testsuite/g++.dg/template/crash118.C11
-rw-r--r--gcc/testsuite/g++.dg/template/crash119.C8
-rw-r--r--gcc/testsuite/g++.dg/template/crash39.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash41.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash74.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash84.C7
-rw-r--r--gcc/testsuite/g++.dg/template/crash89.C6
-rw-r--r--gcc/testsuite/g++.dg/template/crash90.C3
-rw-r--r--gcc/testsuite/g++.dg/template/crash92.C4
-rw-r--r--gcc/testsuite/g++.dg/template/crash95.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash97.C2
-rw-r--r--gcc/testsuite/g++.dg/template/crash98.C4
-rw-r--r--gcc/testsuite/g++.dg/template/defarg12.C2
-rw-r--r--gcc/testsuite/g++.dg/template/defarg15.C19
-rw-r--r--gcc/testsuite/g++.dg/template/defarg16.C28
-rw-r--r--gcc/testsuite/g++.dg/template/defarg17.C9
-rw-r--r--gcc/testsuite/g++.dg/template/defarg6.C6
-rw-r--r--gcc/testsuite/g++.dg/template/delete2.C26
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-args1.C2
-rw-r--r--gcc/testsuite/g++.dg/template/dependent-expr8.C3
-rw-r--r--gcc/testsuite/g++.dg/template/dtor9.C12
-rw-r--r--gcc/testsuite/g++.dg/template/enum7.C8
-rw-r--r--gcc/testsuite/g++.dg/template/enum8.C7
-rw-r--r--gcc/testsuite/g++.dg/template/error-recovery3.C8
-rw-r--r--gcc/testsuite/g++.dg/template/error2.C5
-rw-r--r--gcc/testsuite/g++.dg/template/error48.C15
-rw-r--r--gcc/testsuite/g++.dg/template/error5.C4
-rw-r--r--gcc/testsuite/g++.dg/template/error50.C19
-rw-r--r--gcc/testsuite/g++.dg/template/error51.C9
-rw-r--r--gcc/testsuite/g++.dg/template/error52.C19
-rw-r--r--gcc/testsuite/g++.dg/template/error53.C13
-rw-r--r--gcc/testsuite/g++.dg/template/error54.C10
-rw-r--r--gcc/testsuite/g++.dg/template/explicit-args2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/fn-ptr2.C14
-rw-r--r--gcc/testsuite/g++.dg/template/friend44.C4
-rw-r--r--gcc/testsuite/g++.dg/template/friend53.C23
-rw-r--r--gcc/testsuite/g++.dg/template/friend54.C18
-rw-r--r--gcc/testsuite/g++.dg/template/friend55.C18
-rw-r--r--gcc/testsuite/g++.dg/template/friend56.C13
-rw-r--r--gcc/testsuite/g++.dg/template/inherit6.C3
-rw-r--r--gcc/testsuite/g++.dg/template/inherit7.C3
-rw-r--r--gcc/testsuite/g++.dg/template/inherit8.C4
-rw-r--r--gcc/testsuite/g++.dg/template/inherit9.C15
-rw-r--r--gcc/testsuite/g++.dg/template/injected1.C2
-rw-r--r--gcc/testsuite/g++.dg/template/instantiate3.C2
-rw-r--r--gcc/testsuite/g++.dg/template/koenig10.C12
-rw-r--r--gcc/testsuite/g++.dg/template/local-fn1.C8
-rw-r--r--gcc/testsuite/g++.dg/template/loop1.C9
-rw-r--r--gcc/testsuite/g++.dg/template/memclass5.C26
-rw-r--r--gcc/testsuite/g++.dg/template/meminit1.C2
-rw-r--r--gcc/testsuite/g++.dg/template/memtmpl4.C10
-rw-r--r--gcc/testsuite/g++.dg/template/new12.C12
-rw-r--r--gcc/testsuite/g++.dg/template/non-const1.C8
-rw-r--r--gcc/testsuite/g++.dg/template/non-deducible1.C8
-rw-r--r--gcc/testsuite/g++.dg/template/nontype25.C6
-rw-r--r--gcc/testsuite/g++.dg/template/nontype26.C20
-rw-r--r--gcc/testsuite/g++.dg/template/operator12.C9
-rw-r--r--gcc/testsuite/g++.dg/template/overload10.C4
-rw-r--r--gcc/testsuite/g++.dg/template/overload13.C16
-rw-r--r--gcc/testsuite/g++.dg/template/overload6.C5
-rw-r--r--gcc/testsuite/g++.dg/template/partial-specialization2.C8
-rw-r--r--gcc/testsuite/g++.dg/template/partial14.C16
-rw-r--r--gcc/testsuite/g++.dg/template/partial15.C19
-rw-r--r--gcc/testsuite/g++.dg/template/partial5.C4
-rw-r--r--gcc/testsuite/g++.dg/template/pr17410.C17
-rw-r--r--gcc/testsuite/g++.dg/template/pr29633.C29
-rw-r--r--gcc/testsuite/g++.dg/template/pr58878.C61
-rw-r--r--gcc/testsuite/g++.dg/template/pr61537.C23
-rw-r--r--gcc/testsuite/g++.dg/template/pseudodtor2.C2
-rw-r--r--gcc/testsuite/g++.dg/template/pseudodtor3.C10
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem24.C20
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem25.C8
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem26.C12
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem27.C22
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem28.C10
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem29.C10
-rw-r--r--gcc/testsuite/g++.dg/template/ptrmem4.C4
-rw-r--r--gcc/testsuite/g++.dg/template/qualified-id6.C14
-rw-r--r--gcc/testsuite/g++.dg/template/qualttp18.C2
-rw-r--r--gcc/testsuite/g++.dg/template/redecl3.C2
-rw-r--r--gcc/testsuite/g++.dg/template/ref7.C10
-rw-r--r--gcc/testsuite/g++.dg/template/ref8.C8
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae-dr657.C22
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae10.C57
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae15.C3
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae16.C3
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae20.C2
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae22.C2
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae23.C2
-rw-r--r--gcc/testsuite/g++.dg/template/sfinae6_neg.C10
-rw-r--r--gcc/testsuite/g++.dg/template/shadow1.C4
-rw-r--r--gcc/testsuite/g++.dg/template/sizeof14.C4
-rw-r--r--gcc/testsuite/g++.dg/template/sizeof15.C13
-rw-r--r--gcc/testsuite/g++.dg/template/spec25.C4
-rw-r--r--gcc/testsuite/g++.dg/template/spec38.C6
-rw-r--r--gcc/testsuite/g++.dg/template/static30.C2
-rw-r--r--gcc/testsuite/g++.dg/template/static33.C18
-rw-r--r--gcc/testsuite/g++.dg/template/static34.C21
-rw-r--r--gcc/testsuite/g++.dg/template/static35.C21
-rw-r--r--gcc/testsuite/g++.dg/template/ttp28.C21
-rw-r--r--gcc/testsuite/g++.dg/template/typedef11.C6
-rw-r--r--gcc/testsuite/g++.dg/template/typedef25.C3
-rw-r--r--gcc/testsuite/g++.dg/template/typedef38.C3
-rw-r--r--gcc/testsuite/g++.dg/template/typedef39.C4
-rw-r--r--gcc/testsuite/g++.dg/template/typedef41.C8
-rw-r--r--gcc/testsuite/g++.dg/template/typeid1.C17
-rw-r--r--gcc/testsuite/g++.dg/template/unify11.C2
-rw-r--r--gcc/testsuite/g++.dg/template/using21.C43
-rw-r--r--gcc/testsuite/g++.dg/template/using22.C51
-rw-r--r--gcc/testsuite/g++.dg/template/using23.C15
-rw-r--r--gcc/testsuite/g++.dg/template/using24.C30
-rw-r--r--gcc/testsuite/g++.dg/template/using25.C17
-rw-r--r--gcc/testsuite/g++.dg/template/using26.C49
-rw-r--r--gcc/testsuite/g++.dg/template/using27.C33
-rw-r--r--gcc/testsuite/g++.dg/template/using28.C17
-rw-r--r--gcc/testsuite/g++.dg/template/using29.C21
-rw-r--r--gcc/testsuite/g++.dg/template/value-dep1.C6
-rw-r--r--gcc/testsuite/g++.dg/template/virtual4.C30
-rw-r--r--gcc/testsuite/g++.dg/tls/diag-3.C4
-rw-r--r--gcc/testsuite/g++.dg/tls/init-2.C6
-rw-r--r--gcc/testsuite/g++.dg/tls/static2.C18
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-cse.C20
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-ice.C6
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-ice2.C11
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-order1.C25
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-order2.C28
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-wrap1.C13
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-wrap2.C16
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-wrap3.C15
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local-wrap4.C15
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local1.C21
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local10.C23
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local2.C27
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local2g.C28
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local3.C38
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local3g.C36
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local4.C49
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local4g.C47
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local5.C48
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local5g.C46
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local6.C33
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local6g.C31
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local7.C10
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local7g.C12
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local8.C12
-rw-r--r--gcc/testsuite/g++.dg/tls/thread_local9.C23
-rw-r--r--gcc/testsuite/g++.dg/tls/tls.exp2
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-1.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-2.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-3.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-4.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-5.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/noexcept-6.C23
-rw-r--r--gcc/testsuite/g++.dg/tm/pr47530-2.C6
-rw-r--r--gcc/testsuite/g++.dg/tm/pr47530.C5
-rw-r--r--gcc/testsuite/g++.dg/tm/pr51516.C1
-rw-r--r--gcc/testsuite/g++.dg/tm/pr56419.C13
-rw-r--r--gcc/testsuite/g++.dg/tm/pr58516.C7
-rw-r--r--gcc/testsuite/g++.dg/tm/pr58635-1.C14
-rw-r--r--gcc/testsuite/g++.dg/tm/pr58635-2.C8
-rw-r--r--gcc/testsuite/g++.dg/tm/pr60004.C10
-rw-r--r--gcc/testsuite/g++.dg/tm/template-2.C4
-rw-r--r--gcc/testsuite/g++.dg/tm/tm.exp2
-rw-r--r--gcc/testsuite/g++.dg/tm/wrap-2.C2
-rw-r--r--gcc/testsuite/g++.dg/torture/20070621-1.C1
-rw-r--r--gcc/testsuite/g++.dg/torture/20120420-1.C29
-rw-r--r--gcc/testsuite/g++.dg/torture/20121105-1.C4
-rw-r--r--gcc/testsuite/g++.dg/torture/PR58294.C20
-rw-r--r--gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C716
-rw-r--r--gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C730
-rw-r--r--gcc/testsuite/g++.dg/torture/builtin-location.C31
-rw-r--r--gcc/testsuite/g++.dg/torture/pr35634.C19
-rw-r--r--gcc/testsuite/g++.dg/torture/pr38565.C1
-rw-r--r--gcc/testsuite/g++.dg/torture/pr40991.C2
-rw-r--r--gcc/testsuite/g++.dg/torture/pr47559.C4
-rw-r--r--gcc/testsuite/g++.dg/torture/pr49309.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/pr49770.C4
-rw-r--r--gcc/testsuite/g++.dg/torture/pr50672.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr51198.C2
-rw-r--r--gcc/testsuite/g++.dg/torture/pr51737.C30
-rw-r--r--gcc/testsuite/g++.dg/torture/pr52638.C15
-rw-r--r--gcc/testsuite/g++.dg/torture/pr52772.C85
-rw-r--r--gcc/testsuite/g++.dg/torture/pr52918-1.C39
-rw-r--r--gcc/testsuite/g++.dg/torture/pr52918-2.C40
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53011.C66
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53161.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53321.C36
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53336.C45
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53602.C3
-rw-r--r--gcc/testsuite/g++.dg/torture/pr53970.C17
-rw-r--r--gcc/testsuite/g++.dg/torture/pr54647.C25
-rw-r--r--gcc/testsuite/g++.dg/torture/pr54684.C63
-rw-r--r--gcc/testsuite/g++.dg/torture/pr54838.C102
-rw-r--r--gcc/testsuite/g++.dg/torture/pr55260-1.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr55260-2.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/pr55740.C19
-rw-r--r--gcc/testsuite/g++.dg/torture/pr55789.C30
-rw-r--r--gcc/testsuite/g++.dg/torture/pr55875.C55
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56029.C126
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56302.C41
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56398.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56635.C17
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56694.C31
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56768.C3
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56817.C38
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56837.C20
-rw-r--r--gcc/testsuite/g++.dg/torture/pr56854.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57107.C193
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57140.C186
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57190.C42
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57235.C156
-rw-r--r--gcc/testsuite/g++.dg/torture/pr57499.C14
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58201.h24
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58201_0.C9
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58201_1.C10
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58252.C142
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58369.C109
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58380.C173
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58464.C268
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58552.C29
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58555.C114
-rw-r--r--gcc/testsuite/g++.dg/torture/pr58585.C20
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59163.C30
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59208.C25
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59226.C27
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59265.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59775.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59822.C14
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59882.C30
-rw-r--r--gcc/testsuite/g++.dg/torture/pr59918.C18
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60058.C30
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60131.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60315.C19
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60438-1.C26
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60438-2.C3
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60474.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60609.C252
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60648.C70
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60659.C58
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60746.C23
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60750.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60854.C13
-rw-r--r--gcc/testsuite/g++.dg/torture/pr60895.C32
-rw-r--r--gcc/testsuite/g++.dg/torture/pr62121.C12
-rw-r--r--gcc/testsuite/g++.dg/torture/pr62175.C36
-rw-r--r--gcc/testsuite/g++.dg/torture/pr63632.C5
-rw-r--r--gcc/testsuite/g++.dg/torture/predcom-1.C2
-rw-r--r--gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp3
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-16.inc50
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-2.inc22
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-4.inc25
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-8.inc56
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-main.inc28
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v16hi.C7
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v16qi.C7
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v2df.C16
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v2di.C17
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v2sf.C22
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v2si.C19
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v4df.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v4di.C21
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v4sf.C28
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v4si.C24
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v8hi.C25
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v8qi.C25
-rw-r--r--gcc/testsuite/g++.dg/torture/vshuf-v8si.C32
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/partition1.C1
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/partition2.C3
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/partition3.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/pr57451.C26
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/pr59255.C29
-rw-r--r--gcc/testsuite/g++.dg/tree-prof/tree-prof.exp3
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C11
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/inline-1.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/inline-2.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/inline-3.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr18178.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C16
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19476-2.C17
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19476-3.C11
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19476-4.C11
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C11
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr19807.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr45453.C2
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr53844.C78
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr57380.C21
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr58404.C20
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/pr61009.C53
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/ssa-dom.C104
-rw-r--r--gcc/testsuite/g++.dg/tree-ssa/stabilize1.C14
-rw-r--r--gcc/testsuite/g++.dg/tsan/aligned_vs_unaligned_race.C29
-rw-r--r--gcc/testsuite/g++.dg/tsan/atomic_free.C20
-rw-r--r--gcc/testsuite/g++.dg/tsan/atomic_free2.C20
-rw-r--r--gcc/testsuite/g++.dg/tsan/benign_race.C38
-rw-r--r--gcc/testsuite/g++.dg/tsan/cond_race.C36
-rw-r--r--gcc/testsuite/g++.dg/tsan/default_options.C31
-rw-r--r--gcc/testsuite/g++.dg/tsan/fd_close_norace.C30
-rw-r--r--gcc/testsuite/g++.dg/tsan/fd_close_norace2.C29
-rw-r--r--gcc/testsuite/g++.dg/tsan/tsan.exp47
-rw-r--r--gcc/testsuite/g++.dg/ubsan/cxx11-shift-1.C18
-rw-r--r--gcc/testsuite/g++.dg/ubsan/cxx11-shift-2.C10
-rw-r--r--gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C13
-rw-r--r--gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C10
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr59250.C18
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr59306.C13
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr59331.C8
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr59415.C8
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr59437.C24
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr60569.C21
-rw-r--r--gcc/testsuite/g++.dg/ubsan/pr61272.C24
-rw-r--r--gcc/testsuite/g++.dg/ubsan/return-1.C27
-rw-r--r--gcc/testsuite/g++.dg/ubsan/return-2.C33
-rw-r--r--gcc/testsuite/g++.dg/ubsan/ubsan.exp34
-rw-r--r--gcc/testsuite/g++.dg/uninit-pred-4.C16
-rw-r--r--gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc38
-rw-r--r--gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc25
-rw-r--r--gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc30
-rw-r--r--gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc18
-rw-r--r--gcc/testsuite/g++.dg/vect/pr58513.cc13
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60000.cc13
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60023.cc80
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60559.cc8
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60729.cc10
-rw-r--r--gcc/testsuite/g++.dg/vect/pr60836.cc39
-rw-r--r--gcc/testsuite/g++.dg/vect/slp-pr50413.cc2
-rw-r--r--gcc/testsuite/g++.dg/vect/slp-pr50819.cc2
-rw-r--r--gcc/testsuite/g++.dg/vect/slp-pr56812.cc21
-rw-r--r--gcc/testsuite/g++.dg/vect/vect.exp2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wbraces3.C34
-rw-r--r--gcc/testsuite/g++.dg/warn/Wbraces4.C34
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconditionally-supported-1.C25
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-null-2.C31
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-null-3.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-real-integer-3.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C33
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C7
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdiv-by-zero-2.C35
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus-2.C18
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C30
-rw-r--r--gcc/testsuite/g++.dg/warn/Wdouble-promotion.C26
-rw-r--r--gcc/testsuite/g++.dg/warn/Weff1.C5
-rw-r--r--gcc/testsuite/g++.dg/warn/Winit-self.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/Wno-return-local-addr.C26
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-2.C30
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-3.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor-4.C75
-rw-r--r--gcc/testsuite/g++.dg/warn/Wnvdtor.C1
-rw-r--r--gcc/testsuite/g++.dg/warn/Wparentheses-26.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/Wparentheses-27.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/Wpointer-arith-1.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/Wredundant-decls-spec.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C11
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-local-addr.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-type-10.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-type-8.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wreturn-type-9.C60
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsequence-point-2.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-1.C6
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-6.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/Wshadow-7.C10
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsign-compare-5.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsign-compare-6.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsign-compare-7.C18
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsign-conversion-2.C11
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsign-conversion.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C13
-rw-r--r--gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C6
-rw-r--r--gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wtype-limits.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-3.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-2.C20
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-3.C35
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C16
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-parm-5.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-parm-6.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-17.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-18.C14
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-19.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-20.C19
-rw-r--r--gcc/testsuite/g++.dg/warn/Wunused-var-21.C31
-rw-r--r--gcc/testsuite/g++.dg/warn/Wuseless-cast.C129
-rw-r--r--gcc/testsuite/g++.dg/warn/Wvla-2.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/anonymous-namespace-4.C12
-rw-r--r--gcc/testsuite/g++.dg/warn/anonymous-namespace-4.h14
-rw-r--r--gcc/testsuite/g++.dg/warn/anonymous-namespace-5.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/anonymous-namespace-6.C8
-rw-r--r--gcc/testsuite/g++.dg/warn/conversion-real-integer-3.h3
-rw-r--r--gcc/testsuite/g++.dg/warn/delete-array-1.C11
-rw-r--r--gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/deprecated-7.C17
-rw-r--r--gcc/testsuite/g++.dg/warn/deprecated-8.C15
-rw-r--r--gcc/testsuite/g++.dg/warn/format8.C7
-rw-r--r--gcc/testsuite/g++.dg/warn/miss-format-1.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/pmf2.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/pr13358-3.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/pr13358-4.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/pr15774-1.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/pr23075.C2
-rw-r--r--gcc/testsuite/g++.dg/warn/pr31246.C1
-rw-r--r--gcc/testsuite/g++.dg/warn/pr33738.C1
-rw-r--r--gcc/testsuite/g++.dg/warn/pr35635.C4
-rw-r--r--gcc/testsuite/g++.dg/warn/warn_unused.C22
-rw-r--r--gcc/testsuite/g++.dg/warn/wdate-time.C6
-rw-r--r--gcc/testsuite/g++.dg/warn/weak1.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/aggregates.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/align.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/bitfields.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C21
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C10
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/README2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/array1.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash16.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash18.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash42.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash52.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash55.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/crash64.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/enum11.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/enum8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/enum9.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/friend3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/init2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/init4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/misc14.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.brendan/static3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ext/attrib5.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/binding.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/cond.C15
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/conversion2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/crash4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/crash7.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/enum6.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/lineno.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/local.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload20.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload21.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/overload5.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/redecl1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/scoping7.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.jason/thunk3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/arm8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/cvt20.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/cvt8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/enum9.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init5.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/init8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/operators32.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/visibility3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.law/weak.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.martin/ambig1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.martin/typedef2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/for2.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/misc3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/misc9.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/net12.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/net44.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/net8.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/ns3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p10769b.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p11110.C5
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p1989.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p2793.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p3836.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p418.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p701.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/p807.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/pmf1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.mike/pmf3.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/alias4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/ns11.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-20052
-rw-r--r--gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.oliva/overload1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/ambig1.C12
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/anon9.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash23.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/crash28.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/decl8.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/enum4.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/init19.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/lineno2.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/linkage4.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/main1.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/overload11.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/store-expr1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/store-expr2.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/typeck1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/typedef5.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.other/using3.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/asm1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/assign1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash10.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/crash58.C4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/enum6.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit34.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/explicit70.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/friend36.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/koenig1.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/mangle1.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C3
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/overload13.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/overload5.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C6
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec22.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/spec40.C27
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/t29.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.pt/t30.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/README2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb109.C8
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb121.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb125.C2
-rw-r--r--gcc/testsuite/g++.old-deja/g++.robertl/eb76.C1
-rw-r--r--gcc/testsuite/g++.old-deja/g++.warn/impint.C4
-rw-r--r--gcc/testsuite/g++.old-deja/old-deja.exp3
-rw-r--r--gcc/testsuite/gcc.c-torture/ChangeLog.02
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20000326-1.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20001226-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20010327-1.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20020604-1.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20030305-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20031125-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20040621-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20080625-1.c3
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20101216-1.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20120524-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20120727-1.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20120727-2.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/20140213.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/990617-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/calls.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/compile.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/labels-3.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-declparen.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/limits-pointer.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr28865.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr38621.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr39423-1.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr39423-2.c57
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr39834.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr40797.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr41181.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr43791.c1
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr44687.c65
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr44707.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr45085.c45
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr48596.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr48929.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr49206.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr49220.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr50380.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr52306.c84
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr52533.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr52555.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr52714.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53058.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53226.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53411.c33
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53495.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53748.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr53886.c68
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54321.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54713-1.c70
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54713-2.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54713-3.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr54925.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55273.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55350.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55569.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55832.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55851.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55920.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55921.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr55955.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56405.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56448.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56484.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56571.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56745.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr56984.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr57108.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr57331.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr57441.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr57698.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58088.c5
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58164.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58332.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58340.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58343.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58344.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58775.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58946.c20
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58970-1.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58970-2.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58978.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr58997.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59102.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59119.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59134.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59322.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59362.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59386.c24
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59417.c39
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59569-1.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59569-2.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59743.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59803.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr59919.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60071.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60268.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60502.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60556.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60655-1.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr60655-2.c30
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr61684.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr62312.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/pr63282.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/sra-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/unalign-1.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/vector-5.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/compile/vector-6.c7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20001229-1.c8
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20010724-1.c59
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20010724-1.x3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20011008-3.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20020418-1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20030125-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20030125-1.x5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040208-2.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20040208-2.x1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20050316-1.x1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20050316-3.x (renamed from gcc/testsuite/gcc.c-torture/execute/vector-compare-2.x)0
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20050604-1.x1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20061220-1.x6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20071018-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20101011-1.c41
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20111227-2.c44
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20111227-3.c45
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120427-2.c38
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120615-1.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120808-1.c37
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120817-1.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120919-1.c37
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20120919-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20121108-1.c51
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20131127-1.c34
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20140212-1.c37
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20140326-1.c10
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/20140425-1.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/921202-1.c4
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/990127-2.x1
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/bitfld-6.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/bswap-1.c51
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp8
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/stpncpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/execute.exp3
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/nest-align-1.x5
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr15296.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr19449.c20
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr22098-1.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr22098-2.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr22098-3.c6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr23135.x2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr28865.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr33992.c2
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr43220.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr46309.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr47237.x6
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr48814-1.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr48814-2.c18
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr51447.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr51581-1.c157
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr51581-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr51581-2.c173
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr51581-2.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr52760.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr52979-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr52979-2.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr53366-1.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr53645-2.c120
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr53645.c96
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr53688.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr54471.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr54937.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr55137.c30
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr55750.c29
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr55875.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56205.c61
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56799.c43
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56799.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56837.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56866.c45
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56899.c47
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56962.c30
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr56982.c45
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57124.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57124.x9
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57130.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57131.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57144.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57281.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57321.c24
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57344-1.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57344-2.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57344-2.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57344-3.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57344-4.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57568.c12
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57829.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57860.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57861.c33
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57875.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57876.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr57877.c28
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58209.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58277-1.c102
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58277-2.c98
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58364.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58365.c35
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58385.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58387.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58419.c36
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58431.c33
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58564.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58570.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58570.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58574.c219
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58640-2.c35
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58640.c32
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58662.c22
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58726.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58831.c40
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58943.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr58984.c57
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59014-2.c23
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59014.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59101.c15
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59221.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59229.c29
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59358.c44
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59387.c19
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59388.c11
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59413.c21
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59643.c39
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr59747.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60003.c48
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60017.c33
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60062.c25
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60072.c16
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60454.c31
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr60960.c38
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61306-1.c39
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61306-2.c40
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61306-3.c13
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61375.c35
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61673.c50
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr61725.c14
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr63209.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/pr63302.c60
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c123
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c27
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-shift.c48
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-shift1.c17
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-shift2.c59
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c60
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c67
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c26
-rw-r--r--gcc/testsuite/gcc.c-torture/execute/zerolen-2.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/DFcmp.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/SFset.x7
-rw-r--r--gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp2
-rw-r--r--gcc/testsuite/gcc.dg/20011021-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/20020108-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20020219-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/20020220-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/20020312-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/20040813-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20041106-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/20050503-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20050811-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/20050811-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/20050922-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/20050922-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/20081223-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/54455.c1
-rw-r--r--gcc/testsuite/gcc.dg/README2
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-10.c25
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/Warray-bounds-9.c19
-rw-r--r--gcc/testsuite/gcc.dg/Wconversion-real-integer.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wcxx-compat-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/Wreturn-local-addr.c9
-rw-r--r--gcc/testsuite/gcc.dg/Wshadow-4.c38
-rw-r--r--gcc/testsuite/gcc.dg/Wshadow-4.h3
-rw-r--r--gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c456
-rw-r--r--gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/Wstrict-aliasing-converted-assigned.c1
-rw-r--r--gcc/testsuite/gcc.dg/Wstrict-overflow-24.c10
-rw-r--r--gcc/testsuite/gcc.dg/Wunused-local-typedefs.c36
-rw-r--r--gcc/testsuite/gcc.dg/array-10.c12
-rw-r--r--gcc/testsuite/gcc.dg/asan/asan.exp40
-rw-r--r--gcc/testsuite/gcc.dg/asan/nosanitize-and-inline.c57
-rw-r--r--gcc/testsuite/gcc.dg/asan/pr56417.c9
-rw-r--r--gcc/testsuite/gcc.dg/assign-warn-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/assign-warn-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-exchange-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/atomic-exchange-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/atomic-exchange-3.c16
-rw-r--r--gcc/testsuite/gcc.dg/atomic-exchange-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/atomic-exchange-5.c16
-rw-r--r--gcc/testsuite/gcc.dg/atomic-fence.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-flag.c2
-rw-r--r--gcc/testsuite/gcc.dg/atomic-generic-aux.c2
-rw-r--r--gcc/testsuite/gcc.dg/atomic-generic.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-invalid.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-load-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-load-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-load-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-load-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-load-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-lockfree.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-noinline.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-op-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-op-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-op-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-op-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-op-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-param.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/atomic-store-6.c13
-rw-r--r--gcc/testsuite/gcc.dg/atomic/atomic.exp34
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-1.c88
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c171
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c85
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c209
-rw-r--r--gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c542
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-1.c81
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-2.c81
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-3.c81
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-4.c81
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-1.c46
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-2.c46
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-3.c46
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-4.c46
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-fence.c26
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c39
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-generic.c52
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-kill-dep.c19
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-load-1.c44
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-load-2.c44
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-load-3.c44
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-load-4.c44
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-lockfree.c68
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-op-1.c341
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-op-2.c341
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-op-3.c341
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-op-4.c341
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-store-1.c43
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-store-2.c43
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-store-3.c43
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-store-4.c43
-rw-r--r--gcc/testsuite/gcc.dg/atomic/stdatomic-vm.c68
-rw-r--r--gcc/testsuite/gcc.dg/attr-alias-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/attr-alias-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_align-1.c39
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_align-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_align-3.c56
-rw-r--r--gcc/testsuite/gcc.dg/attr-alloc_size.c2
-rw-r--r--gcc/testsuite/gcc.dg/attr-assume_aligned-1.c39
-rw-r--r--gcc/testsuite/gcc.dg/attr-assume_aligned-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/attr-assume_aligned-3.c24
-rw-r--r--gcc/testsuite/gcc.dg/attr-hotcold-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c28
-rw-r--r--gcc/testsuite/gcc.dg/attr-isr-trap_exit.c23
-rw-r--r--gcc/testsuite/gcc.dg/attr-isr-trapa.c17
-rw-r--r--gcc/testsuite/gcc.dg/attr-weakref-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/auto-type-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/auto-type-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/autopar/autopar.exp2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/outer-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/parallelization-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/autopar/pr49960.c9
-rw-r--r--gcc/testsuite/gcc.dg/autopar/pr57103.c19
-rw-r--r--gcc/testsuite/gcc.dg/autopar/pr57185.c29
-rw-r--r--gcc/testsuite/gcc.dg/bf-ms-layout.c16
-rw-r--r--gcc/testsuite/gcc.dg/binary-constants-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/binary-constants-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/binop-xor1.c2
-rw-r--r--gcc/testsuite/gcc.dg/binop-xor3.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-apply2.c7
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-4.c15
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-5.c3
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-6.c42
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-6a.c44
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-7.c43
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-7a.c44
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-8.c46
-rw-r--r--gcc/testsuite/gcc.dg/builtin-bswap-9.c46
-rw-r--r--gcc/testsuite/gcc.dg/builtin-complex-err-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-complex-err-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-10.c9
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-11.c1
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-13.c351
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-14.c28
-rw-r--r--gcc/testsuite/gcc.dg/builtin-object-size-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/builtin-stringop-chk-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-5.c23
-rw-r--r--gcc/testsuite/gcc.dg/builtin-unreachable-6.c21
-rw-r--r--gcc/testsuite/gcc.dg/builtins-85.c25
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-2.c92
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-3.c43
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-4.c9
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-5.c28
-rw-r--r--gcc/testsuite/gcc.dg/c11-align-6.c40
-rw-r--r--gcc/testsuite/gcc.dg/c11-anon-struct-1.c72
-rw-r--r--gcc/testsuite/gcc.dg/c11-anon-struct-2.c57
-rw-r--r--gcc/testsuite/gcc.dg/c11-anon-struct-3.c34
-rw-r--r--gcc/testsuite/gcc.dg/c11-atomic-1.c267
-rw-r--r--gcc/testsuite/gcc.dg/c11-atomic-2.c165
-rw-r--r--gcc/testsuite/gcc.dg/c11-atomic-3.c174
-rw-r--r--gcc/testsuite/gcc.dg/c11-complex-1.c43
-rw-r--r--gcc/testsuite/gcc.dg/c11-float-1.c169
-rw-r--r--gcc/testsuite/gcc.dg/c11-generic-1.c57
-rw-r--r--gcc/testsuite/gcc.dg/c11-generic-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/c11-noreturn-1.c59
-rw-r--r--gcc/testsuite/gcc.dg/c11-noreturn-2.c77
-rw-r--r--gcc/testsuite/gcc.dg/c11-noreturn-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/c11-noreturn-4.c11
-rw-r--r--gcc/testsuite/gcc.dg/c11-noreturn-5.c17
-rw-r--r--gcc/testsuite/gcc.dg/c11-pointer-float-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-2.c41
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-3.c28
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-4.c13
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-5.c5
-rw-r--r--gcc/testsuite/gcc.dg/c11-static-assert-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/c11-stdatomic-1.c119
-rw-r--r--gcc/testsuite/gcc.dg/c11-thread-local-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/c11-thread-local-2.c46
-rw-r--r--gcc/testsuite/gcc.dg/c11-typedef-1.c70
-rw-r--r--gcc/testsuite/gcc.dg/c11-uni-string-1.c112
-rw-r--r--gcc/testsuite/gcc.dg/c11-uni-string-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/c1x-align-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/c1x-align-2.c92
-rw-r--r--gcc/testsuite/gcc.dg/c1x-align-3.c42
-rw-r--r--gcc/testsuite/gcc.dg/c1x-align-4.c8
-rw-r--r--gcc/testsuite/gcc.dg/c1x-anon-struct-1.c72
-rw-r--r--gcc/testsuite/gcc.dg/c1x-anon-struct-2.c57
-rw-r--r--gcc/testsuite/gcc.dg/c1x-anon-struct-3.c34
-rw-r--r--gcc/testsuite/gcc.dg/c1x-float-1.c169
-rw-r--r--gcc/testsuite/gcc.dg/c1x-noreturn-1.c59
-rw-r--r--gcc/testsuite/gcc.dg/c1x-noreturn-2.c77
-rw-r--r--gcc/testsuite/gcc.dg/c1x-noreturn-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/c1x-noreturn-4.c11
-rw-r--r--gcc/testsuite/gcc.dg/c1x-noreturn-5.c17
-rw-r--r--gcc/testsuite/gcc.dg/c1x-pointer-float-1.c28
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-2.c41
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-3.c28
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-4.c13
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-5.c5
-rw-r--r--gcc/testsuite/gcc.dg/c1x-static-assert-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/c1x-typedef-1.c70
-rw-r--r--gcc/testsuite/gcc.dg/c1x-uni-string-1.c112
-rw-r--r--gcc/testsuite/gcc.dg/c1x-uni-string-2.c8
-rw-r--r--gcc/testsuite/gcc.dg/c90-array-lval-8.c20
-rw-r--r--gcc/testsuite/gcc.dg/c90-atomic-1.c7
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-6.c8
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-8.c3
-rw-r--r--gcc/testsuite/gcc.dg/c90-const-expr-9.c5
-rw-r--r--gcc/testsuite/gcc.dg/c90-float-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/c90-fordecl-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/c90-thread-local-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/c99-atomic-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/c99-complit-2.c28
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-8.c3
-rw-r--r--gcc/testsuite/gcc.dg/c99-const-expr-9.c4
-rw-r--r--gcc/testsuite/gcc.dg/c99-float-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-init-5.c9
-rw-r--r--gcc/testsuite/gcc.dg/c99-init-6.c6
-rw-r--r--gcc/testsuite/gcc.dg/c99-predef-1.c63
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/c99-stdint-6.c3
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-tgmath-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/c99-thread-local-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/call-diag-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/cast-function-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/cast-qual-3.c11
-rw-r--r--gcc/testsuite/gcc.dg/cdce1.c3
-rw-r--r--gcc/testsuite/gcc.dg/charset/charset.exp2
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp63
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/for1.c12
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/for2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/jump-openmp.c49
-rw-r--r--gcc/testsuite/gcc.dg/cilk-plus/jump.c27
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-10.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/cleanup-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/compat/compat.exp2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1.exp2
-rw-r--r--gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c4
-rw-r--r--gcc/testsuite/gcc.dg/complex-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/const-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/const-uniq-1.c11
-rw-r--r--gcc/testsuite/gcc.dg/convert-vec-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/cpp/_Pragma7.c14
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assembl2.S2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/assert4.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-10.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-12.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-13.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-14.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-15.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-16.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-17.c4
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-18.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-19.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-20.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-21.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-22.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cmdlne-dU-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/cpp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/direct2.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/direct2s.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/expr-overflow-1.c44
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c18
-rw-r--r--gcc/testsuite/gcc.dg/cpp/mi5.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/multiline.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste12-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste12.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste13.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste14-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste14.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste17.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste18.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste6.c5
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste8-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/cpp/paste8.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr28709.c8
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pr7263-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/cpp/syshdr3.c16
-rw-r--r--gcc/testsuite/gcc.dg/cpp/syshdr3.h7
-rw-r--r--gcc/testsuite/gcc.dg/cpp/sysmac1.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/sysmac2.c2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/trad/trad.exp2
-rw-r--r--gcc/testsuite/gcc.dg/cpp/ucnid-9.c8
-rw-r--r--gcc/testsuite/gcc.dg/darwin-minversion-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/darwin-minversion-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/darwin-minversion-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/darwin-minversion-4.c12
-rw-r--r--gcc/testsuite/gcc.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c4
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c18
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c8
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h10
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp6
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c5
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c36
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c7
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c10
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/static1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/var1.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/dwarf2/var2.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr49032.c2
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr55730.c24
-rw-r--r--gcc/testsuite/gcc.dg/debug/pr57351.c54
-rw-r--r--gcc/testsuite/gcc.dg/decl-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/decl-10.c13
-rw-r--r--gcc/testsuite/gcc.dg/delay-slot-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/composite-type.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/dfp.exp2
-rw-r--r--gcc/testsuite/gcc.dg/dfp/pr35739.c16
-rw-r--r--gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/dg.exp2
-rw-r--r--gcc/testsuite/gcc.dg/di-sync-multithread.c4
-rw-r--r--gcc/testsuite/gcc.dg/dump-ada-spec-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/fdata-sections-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/composite-type.c2
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-4.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c33
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-float-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-float-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-float-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-float-4.c20
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert-sat.c45
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert.c432
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/convert.h359
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp2
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/operator-bitwise.c2
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/view-convert-2.c139
-rw-r--r--gcc/testsuite/gcc.dg/fixed-point/view-convert.c122
-rw-r--r--gcc/testsuite/gcc.dg/float-exact-1.c3178
-rw-r--r--gcc/testsuite/gcc.dg/fold-bitand-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/fold-compare-7.c8
-rw-r--r--gcc/testsuite/gcc.dg/fold-cstvecshift.c13
-rw-r--r--gcc/testsuite/gcc.dg/fold-minus-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/fold-notunord.c10
-rw-r--r--gcc/testsuite/gcc.dg/fold-overflow-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/fold-perm.c20
-rw-r--r--gcc/testsuite/gcc.dg/fold-reassoc-2.c14
-rw-r--r--gcc/testsuite/gcc.dg/foo.specs2
-rw-r--r--gcc/testsuite/gcc.dg/fork-instrumentation.c8
-rw-r--r--gcc/testsuite/gcc.dg/format/c90-printf-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/cast-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/format/format.exp2
-rw-r--r--gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/fshort-wchar.c2
-rw-r--r--gcc/testsuite/gcc.dg/fstack-protector-strong.c134
-rw-r--r--gcc/testsuite/gcc.dg/ftrapv-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/ftrapv-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c4
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/block-3.c7
-rw-r--r--gcc/testsuite/gcc.dg/gomp/clause-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/gomp/combined-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/gomp/declare-simd-1.c100
-rw-r--r--gcc/testsuite/gcc.dg/gomp/declare-simd-2.c54
-rw-r--r--gcc/testsuite/gcc.dg/gomp/gomp.exp6
-rw-r--r--gcc/testsuite/gcc.dg/gomp/nesting-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/gomp/openmp-simd-1.c47
-rw-r--r--gcc/testsuite/gcc.dg/gomp/openmp-simd-2.c43
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr57412.c10
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr58809.c13
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr59669-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr59669-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/gomp/pr60534.c16
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-2.c26
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-4.c11
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-5.c12
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-6.c11
-rw-r--r--gcc/testsuite/gcc.dg/gomp/simd-clones-7.c16
-rw-r--r--gcc/testsuite/gcc.dg/gomp/target-1.c29
-rw-r--r--gcc/testsuite/gcc.dg/gomp/target-2.c29
-rw-r--r--gcc/testsuite/gcc.dg/gomp/taskgroup-1.c29
-rw-r--r--gcc/testsuite/gcc.dg/gomp/teams-1.c61
-rw-r--r--gcc/testsuite/gcc.dg/gomp/udr-1.c46
-rw-r--r--gcc/testsuite/gcc.dg/gomp/udr-2.c42
-rw-r--r--gcc/testsuite/gcc.dg/gomp/udr-3.c77
-rw-r--r--gcc/testsuite/gcc.dg/gomp/udr-4.c6
-rw-r--r--gcc/testsuite/gcc.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/id-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr33766.c22
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr35356-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr46966.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr50561.c2
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr54094.c10
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr55022.c27
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr59817-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr59817-2.c15
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60740.c16
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60785.c27
-rw-r--r--gcc/testsuite/gcc.dg/graphite/pr60979.c37
-rw-r--r--gcc/testsuite/gcc.dg/graphite/scop-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/guality/guality.exp8
-rw-r--r--gcc/testsuite/gcc.dg/guality/param-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/guality/param-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/guality/param-3.c33
-rw-r--r--gcc/testsuite/gcc.dg/guality/param-4.c20
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr36728-1.c46
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr36728-2.c46
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr36728-3.c51
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr36728-4.c51
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr49888.c26
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54200.c28
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-1.c48
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-2.c45
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-3.c42
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-4.c39
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-5.c45
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54519-6.c27
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54551.c28
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54693-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54693.c29
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54796.c25
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr54970.c47
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr56154-1.c29
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr56154-2.c39
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr56154-3.c31
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr56154-4.c34
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr56154-aux.c11
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr58791-1.c34
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr58791-2.c36
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr58791-3.c28
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr58791-4.c41
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr58791-5.c29
-rw-r--r--gcc/testsuite/gcc.dg/guality/pr59776.c29
-rw-r--r--gcc/testsuite/gcc.dg/hoist-register-pressure-1.c32
-rw-r--r--gcc/testsuite/gcc.dg/hoist-register-pressure-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/hoist-register-pressure-3.c33
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-3.c23
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-4.c23
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-5.c23
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-6.c23
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-7.c20
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-8.c20
-rw-r--r--gcc/testsuite/gcc.dg/iec-559-macros-9.c23
-rw-r--r--gcc/testsuite/gcc.dg/init-vec-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/inline-23.c7
-rw-r--r--gcc/testsuite/gcc.dg/inline-35.c19
-rw-r--r--gcc/testsuite/gcc.dg/inline_3.c3
-rw-r--r--gcc/testsuite/gcc.dg/inline_4.c3
-rw-r--r--gcc/testsuite/gcc.dg/intmax_t-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/invalid-call-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/ipa/iinline-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/ipa/iinline-4.c221
-rw-r--r--gcc/testsuite/gcc.dg/ipa/iinline-5.c124
-rw-r--r--gcc/testsuite/gcc.dg/ipa/iinline-6.c72
-rw-r--r--gcc/testsuite/gcc.dg/ipa/iinline-7.c157
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inline-6.c42
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inlinehint-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inlinehint-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/ipa/inlinehint-3.c37
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-3.c6
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-5.c13
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-8.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-pta-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-pta-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-7.c42
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c41
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c44
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipa.exp2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-4.c4
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c43
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c44
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c62
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-5.c68
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c75
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-7.c54
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-8.c52
-rw-r--r--gcc/testsuite/gcc.dg/ipa/ipcp-agg-9.c45
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr55260.c38
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr56988.c38
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr57294.c18
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr57347.c27
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr57358.c9
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr57539.c218
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr58106.c50
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr58492.c7
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr59008.c32
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr59610.c11
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pr61986.c48
-rw-r--r--gcc/testsuite/gcc.dg/ipa/pure-const-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/ipa/remref-0.c30
-rw-r--r--gcc/testsuite/gcc.dg/ipa/remref-1a.c34
-rw-r--r--gcc/testsuite/gcc.dg/ipa/remref-1b.c37
-rw-r--r--gcc/testsuite/gcc.dg/ipa/remref-2a.c90
-rw-r--r--gcc/testsuite/gcc.dg/ipa/remref-2b.c94
-rw-r--r--gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c31
-rw-r--r--gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c36
-rw-r--r--gcc/testsuite/gcc.dg/ivdep.c11
-rw-r--r--gcc/testsuite/gcc.dg/large-size-array-6.c6
-rw-r--r--gcc/testsuite/gcc.dg/long-long-compare-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/long-long-cst1.c2
-rw-r--r--gcc/testsuite/gcc.dg/lower-subreg-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20090206-1_0.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20090206-2_0.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20090210_0.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20090914-2_0.c1
-rw-r--r--gcc/testsuite/gcc.dg/lto/20091013-1_1.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20091013-1_2.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/20120723_0.c54
-rw-r--r--gcc/testsuite/gcc.dg/lto/20120723_1.c39
-rw-r--r--gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c29
-rw-r--r--gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c7
-rw-r--r--gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c7
-rw-r--r--gcc/testsuite/gcc.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr52097_0.c20
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr52634_0.c7
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr52634_1.c6
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr53470_0.c4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr54702_0.c10
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr54702_1.c16
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr54709_0.c10
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr54709_1.c5
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr55113_0.c14
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr55525_0.c8
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr55525_1.c1
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr55703_0.c59
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr56168_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr56168_1.c4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr56297_0.c13
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr56297_1.c5
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59323-2_0.c37
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59323_0.c37
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr59626_1.c4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60404_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60404_1.c4
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60404_2.c9
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60449_0.c30
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60449_1.c76
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60461_0.c37
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60720_0.c15
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60720_1.c1
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr60911_0.c21
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr61526_0.c6
-rw-r--r--gcc/testsuite/gcc.dg/lto/pr61526_1.c2
-rw-r--r--gcc/testsuite/gcc.dg/lto/resolutions_0.c10
-rw-r--r--gcc/testsuite/gcc.dg/lto/save-temps_0.c9
-rw-r--r--gcc/testsuite/gcc.dg/m-un-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/macro-fusion-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/macro-fusion-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/mallign.c2
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-1.c92
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-2.c115
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-3.c99
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-4.c97
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-5.c98
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix-6.c97
-rw-r--r--gcc/testsuite/gcc.dg/matrix/matrix.exp67
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-1.c98
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-2.c95
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-3.c101
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-4.c100
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-5.c96
-rw-r--r--gcc/testsuite/gcc.dg/matrix/transpose-6.c96
-rw-r--r--gcc/testsuite/gcc.dg/max-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/misaligned-expand-1.c41
-rw-r--r--gcc/testsuite/gcc.dg/misaligned-expand-2.c40
-rw-r--r--gcc/testsuite/gcc.dg/misaligned-expand-3.c43
-rw-r--r--gcc/testsuite/gcc.dg/mismatch-decl-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/no-strict-overflow-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/nofixed-point-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/950825-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/noncompile/noncompile.exp2
-rw-r--r--gcc/testsuite/gcc.dg/noreturn-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/ident-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pch/ident-1.hs1
-rw-r--r--gcc/testsuite/gcc.dg/pch/pch.exp5
-rw-r--r--gcc/testsuite/gcc.dg/pch/valid-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/pch/valid-1.hs1
-rw-r--r--gcc/testsuite/gcc.dg/pch/valid-1b.c1
-rw-r--r--gcc/testsuite/gcc.dg/pch/valid-1b.hs1
-rw-r--r--gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c12
-rw-r--r--gcc/testsuite/gcc.dg/plugin/ggcplug.c12
-rw-r--r--gcc/testsuite/gcc.dg/plugin/one_time_plugin.c77
-rw-r--r--gcc/testsuite/gcc.dg/plugin/plugin.exp2
-rw-r--r--gcc/testsuite/gcc.dg/plugin/selfassign.c78
-rw-r--r--gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c15
-rw-r--r--gcc/testsuite/gcc.dg/pointer-arith-10.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr10474.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr14092-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr17055-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr19105.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr19340.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr21643.c90
-rw-r--r--gcc/testsuite/gcc.dg/pr23623.c48
-rw-r--r--gcc/testsuite/gcc.dg/pr24683.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr25682.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr25805.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr26570.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr27095.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr28796-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr30286.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr30360.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr30744-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr31490.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr32773.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr32912-2.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr34856.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr35635.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr37303.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr37561.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr37858.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr37985.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr38364.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr38700.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr38984.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr39323-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr39464.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr40209.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr41241.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr41345.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr41488.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr41551.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr42611.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr42629.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42630.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42631.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42719.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42728.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42889.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr42916.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr43084.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr43670.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr44023.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr44024.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr44194-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr44214-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr44214-2.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr44214-3.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr44971.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr44974.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr45416.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr45449.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr46309-2.c147
-rw-r--r--gcc/testsuite/gcc.dg/pr46309.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr46647.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr46728-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr46771.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr47684.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr47881.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr48186.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr48189.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr48616.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr48768.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr48774.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr48784-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr48784-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr50017.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr50763.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr51034.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr51721.c31
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-12.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-16.c32
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-17.c32
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-18.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-3.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-6.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr51879-7.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr51879.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr52134.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr52267.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr52283.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr52448.c30
-rw-r--r--gcc/testsuite/gcc.dg/pr52549.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr52558-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr52558-2.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr52578.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr52803.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr52808.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr53060.c4
-rw-r--r--gcc/testsuite/gcc.dg/pr53153.c61
-rw-r--r--gcc/testsuite/gcc.dg/pr53196-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr53196-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr53265.c157
-rw-r--r--gcc/testsuite/gcc.dg/pr53352.c42
-rw-r--r--gcc/testsuite/gcc.dg/pr53532.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr53701.c2
-rw-r--r--gcc/testsuite/gcc.dg/pr53749.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr53849.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr53881-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr53881-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr53887.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr54087.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr54113.c5
-rw-r--r--gcc/testsuite/gcc.dg/pr54355.c11
-rw-r--r--gcc/testsuite/gcc.dg/pr54472.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr54669.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr54676.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr54782.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr54838.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr54919.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr54921.c32
-rw-r--r--gcc/testsuite/gcc.dg/pr54981.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr55010.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr55027.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr55122.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr55150-1.c73
-rw-r--r--gcc/testsuite/gcc.dg/pr55150-2.c54
-rw-r--r--gcc/testsuite/gcc.dg/pr55153.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr55191.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr55430.c46
-rw-r--r--gcc/testsuite/gcc.dg/pr55702.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr55831.c39
-rw-r--r--gcc/testsuite/gcc.dg/pr55833.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr56023.c1
-rw-r--r--gcc/testsuite/gcc.dg/pr56035.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr56078.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr56094.c81
-rw-r--r--gcc/testsuite/gcc.dg/pr56098-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr56117.c9
-rw-r--r--gcc/testsuite/gcc.dg/pr56144.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr56167.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr56228.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr56341-1.c40
-rw-r--r--gcc/testsuite/gcc.dg/pr56341-2.c40
-rw-r--r--gcc/testsuite/gcc.dg/pr56355-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr56396.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr56424.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr56436.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr56466.c31
-rw-r--r--gcc/testsuite/gcc.dg/pr56494.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr56510.c3
-rw-r--r--gcc/testsuite/gcc.dg/pr56548.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr56724-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/pr56724-2.c31
-rw-r--r--gcc/testsuite/gcc.dg/pr56809.c32
-rw-r--r--gcc/testsuite/gcc.dg/pr56824.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr56837.c67
-rw-r--r--gcc/testsuite/gcc.dg/pr56847.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr56890-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr56890-2.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr56977.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr56990.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr56992.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr56997-1.c44
-rw-r--r--gcc/testsuite/gcc.dg/pr56997-2.c45
-rw-r--r--gcc/testsuite/gcc.dg/pr56997-3.c44
-rw-r--r--gcc/testsuite/gcc.dg/pr56997-4.c23
-rw-r--r--gcc/testsuite/gcc.dg/pr57104.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr57105.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr57134.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr57149.c50
-rw-r--r--gcc/testsuite/gcc.dg/pr57154.c44
-rw-r--r--gcc/testsuite/gcc.dg/pr57184.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr57233.c172
-rw-r--r--gcc/testsuite/gcc.dg/pr57286.c7
-rw-r--r--gcc/testsuite/gcc.dg/pr57287-2.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr57287.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr57300.c21
-rw-r--r--gcc/testsuite/gcc.dg/pr57518.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr57662.c47
-rw-r--r--gcc/testsuite/gcc.dg/pr57773.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr57980.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr58010.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr58145-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/pr58145-2.c51
-rw-r--r--gcc/testsuite/gcc.dg/pr58346.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr58432.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr58463.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr58668.c25
-rw-r--r--gcc/testsuite/gcc.dg/pr58742-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr58742-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/pr58742-3.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr58805.c24
-rw-r--r--gcc/testsuite/gcc.dg/pr58981.c55
-rw-r--r--gcc/testsuite/gcc.dg/pr59011.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr59020.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr59261.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr59350-2.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr59350.c82
-rw-r--r--gcc/testsuite/gcc.dg/pr59351.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr59418.c35
-rw-r--r--gcc/testsuite/gcc.dg/pr59471.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr59523.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr59605-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/pr59605.c57
-rw-r--r--gcc/testsuite/gcc.dg/pr59630.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr59643.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr59670.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr59722.c36
-rw-r--r--gcc/testsuite/gcc.dg/pr59827.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr59846.c39
-rw-r--r--gcc/testsuite/gcc.dg/pr59860.c15
-rw-r--r--gcc/testsuite/gcc.dg/pr59871.c22
-rw-r--r--gcc/testsuite/gcc.dg/pr59920-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/pr59920-2.c30
-rw-r--r--gcc/testsuite/gcc.dg/pr59920-3.c47
-rw-r--r--gcc/testsuite/gcc.dg/pr59924.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr59940.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr59963-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr59963-2.c36
-rw-r--r--gcc/testsuite/gcc.dg/pr59963-3.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr59992.c17
-rw-r--r--gcc/testsuite/gcc.dg/pr60013.c47
-rw-r--r--gcc/testsuite/gcc.dg/pr60036.c28
-rw-r--r--gcc/testsuite/gcc.dg/pr60087.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr60195.c56
-rw-r--r--gcc/testsuite/gcc.dg/pr60267.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr60485-1.c29
-rw-r--r--gcc/testsuite/gcc.dg/pr60485-2.c38
-rw-r--r--gcc/testsuite/gcc.dg/pr60598.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr60647-1.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr60647-2.c26
-rw-r--r--gcc/testsuite/gcc.dg/pr60704.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr60797.c8
-rw-r--r--gcc/testsuite/gcc.dg/pr60844.c16
-rw-r--r--gcc/testsuite/gcc.dg/pr60866.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr61045.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr61053.c75
-rw-r--r--gcc/testsuite/gcc.dg/pr61060.c19
-rw-r--r--gcc/testsuite/gcc.dg/pr61158.c12
-rw-r--r--gcc/testsuite/gcc.dg/pr61583.c18
-rw-r--r--gcc/testsuite/gcc.dg/pr61756.c14
-rw-r--r--gcc/testsuite/gcc.dg/pr61776.c27
-rw-r--r--gcc/testsuite/gcc.dg/pr62004.c47
-rw-r--r--gcc/testsuite/gcc.dg/pr62030.c50
-rw-r--r--gcc/testsuite/gcc.dg/pr62294.c10
-rw-r--r--gcc/testsuite/gcc.dg/pr62294.h3
-rw-r--r--gcc/testsuite/gcc.dg/pr63186.c30
-rw-r--r--gcc/testsuite/gcc.dg/pr63284.c42
-rw-r--r--gcc/testsuite/gcc.dg/pr63342.c26
-rw-r--r--gcc/testsuite/gcc.dg/pragma-ep-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/pragma-ep-2.c7
-rw-r--r--gcc/testsuite/gcc.dg/pragma-ep-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/pragma-init-fini-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/pragma-init-fini.c1
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c20
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c17
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr-trapa.c17
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr-trapa2.c24
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr.c17
-rw-r--r--gcc/testsuite/gcc.dg/pragma-isr2.c16
-rw-r--r--gcc/testsuite/gcc.dg/predict-1.c27
-rw-r--r--gcc/testsuite/gcc.dg/predict-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/predict-3.c25
-rw-r--r--gcc/testsuite/gcc.dg/predict-4.c19
-rw-r--r--gcc/testsuite/gcc.dg/predict-5.c25
-rw-r--r--gcc/testsuite/gcc.dg/predict-6.c25
-rw-r--r--gcc/testsuite/gcc.dg/predict-7.c17
-rw-r--r--gcc/testsuite/gcc.dg/predict-8.c12
-rw-r--r--gcc/testsuite/gcc.dg/pthread-init-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/pubtypes-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/pure-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/scal-to-vec1.c43
-rw-r--r--gcc/testsuite/gcc.dg/scal-to-vec2.c18
-rw-r--r--gcc/testsuite/gcc.dg/sequence-pt-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/setjmp-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/setjmp-5.c22
-rw-r--r--gcc/testsuite/gcc.dg/shrink-wrap-alloca.c11
-rw-r--r--gcc/testsuite/gcc.dg/shrink-wrap-pretend.c36
-rw-r--r--gcc/testsuite/gcc.dg/shrink-wrap-sibcall.c26
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/sibcall-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp7
-rw-r--r--gcc/testsuite/gcc.dg/simulate-thread/speculative-store-2.c74
-rw-r--r--gcc/testsuite/gcc.dg/simulate-thread/speculative-store-3.c71
-rw-r--r--gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c54
-rw-r--r--gcc/testsuite/gcc.dg/sms-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/sms-6.c11
-rw-r--r--gcc/testsuite/gcc.dg/spec-options.c17
-rw-r--r--gcc/testsuite/gcc.dg/special/mips-abi.exp2
-rw-r--r--gcc/testsuite/gcc.dg/special/special.exp2
-rw-r--r--gcc/testsuite/gcc.dg/split-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/split-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/split-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/stack-usage-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/stack-usage-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/stmt-expr-4.c22
-rw-r--r--gcc/testsuite/gcc.dg/strict-overflow-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-1.c8
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-10.c5
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-11.c14
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-12g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-13.c16
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-14g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-14gf.c12
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-16g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-17g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-18g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-1f.c8
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-22g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-23.c15
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-24.c17
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-25.c18
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-26.c25
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-2f.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-4.c12
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-4g.c2
-rw-r--r--gcc/testsuite/gcc.dg/strlenopt-4gf.c14
-rw-r--r--gcc/testsuite/gcc.dg/struct-ret-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/superblock.c24
-rw-r--r--gcc/testsuite/gcc.dg/system-binary-constants-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/system-binary-constants-1.h3
-rw-r--r--gcc/testsuite/gcc.dg/tail-merge-store.c22
-rw-r--r--gcc/testsuite/gcc.dg/tls/diag-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tls/pr42894.c1
-rw-r--r--gcc/testsuite/gcc.dg/tls/pr58595.c29
-rw-r--r--gcc/testsuite/gcc.dg/tls/tls.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tm/clone-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/tm/debug-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/instrumented-mask.c16
-rw-r--r--gcc/testsuite/gcc.dg/tm/irrevocable-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/irrevocable-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/memopt-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tm/memopt-10.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/memopt-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/memopt-16.c43
-rw-r--r--gcc/testsuite/gcc.dg/tm/memopt-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr52173-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr52173-2.c12
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr53850.c15
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr55401.c22
-rw-r--r--gcc/testsuite/gcc.dg/tm/pr56108.c9
-rw-r--r--gcc/testsuite/gcc.dg/tm/props-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/tm/reg-promotion.c2
-rw-r--r--gcc/testsuite/gcc.dg/tm/tm.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tm/wrap-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/tm/wrap-4.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/20090618-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/20131115-1.c38
-rw-r--r--gcc/testsuite/gcc.dg/torture/20131122-0.c34
-rw-r--r--gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c712
-rw-r--r--gcc/testsuite/gcc.dg/torture/alias-1.c39
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-complex-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-explog-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-logb-1.c34
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-power-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtin-self.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/builtins-1.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/c99-contract-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-div-underflow.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c41
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-extend-nan.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-mul-underflow.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-truncdf-underflow.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/float128-truncsf-underflow.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-compare.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/fp-int-convert.h2
-rw-r--r--gcc/testsuite/gcc.dg/torture/ldist-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-1.c90
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-2.c113
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-3.c97
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-4.c95
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-5.c96
-rw-r--r--gcc/testsuite/gcc.dg/torture/matrix-6.c97
-rw-r--r--gcc/testsuite/gcc.dg/torture/memcpy-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr35634.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr37868.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39074-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr39074.c5
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr41993.c7
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr47917.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr49518.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr50222.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr51071-2.c6
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr51106-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr51238.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr51244-21.c75
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52402.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52530.c (renamed from gcc/testsuite/gcc.dg/pr52530.c)0
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52756.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52881.c35
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52912.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52913.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr52996.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53070.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53168.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53366-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53390.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53695.c14
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53703.c149
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr53922.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54027.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54098.c72
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54109.c29
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54132.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54261-1.c42
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54327.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54409.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54458.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54520.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54824.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr54894.c1
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55011.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55018.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55111.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55124.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55238.c44
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55253.c48
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55270.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55305.c151
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55555.c34
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55633.c39
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55684.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55687.c29
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55862.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55888.c116
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55964-2.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr55964.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56034.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56150.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56157.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56181.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56195.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56264.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56321.c11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56349.c41
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56366.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56384.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56407.c48
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56420.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56478.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56488.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56661.c46
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56689.c46
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56756.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr56778.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57026.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57036-1.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57036-2.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57075.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57081.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57083.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57122.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57147-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57147-2.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57147-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57214.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57251.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57303.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57330.c11
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57341.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57343.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57381.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57393-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57393-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57393-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57417.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57425-1.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57425-2.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57425-3.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57478.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57488.c58
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57517.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57521.c51
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57569.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57584.c74
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57656.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57685.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57748-1.c49
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57748-2.c43
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57748-3.c40
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57748-4.c40
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57864.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57993-2.cpp213
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr57993.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58018.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58041.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58079.c107
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58131.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58143-1.c51
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58143-2.c34
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58143-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58223.c16
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58228.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58246.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58326-1.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58326-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58417.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58539.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58553.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58554.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58626.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58670.c47
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58779.c12
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58830.c42
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58921.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58941.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58955-1.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58955-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr58956.c30
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59006.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59038.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59047.c39
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59058.c19
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59139.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59164.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59166.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59216.c32
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59245.c28
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59288.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59330.c17
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59338.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59374-1.c24
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59374-2.c26
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59374-3.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59651.c20
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59715.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59891.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59903.c56
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59990.c18
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr59993.c13
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60092.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60115.c14
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60183.c39
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60733.c36
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60766.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60891.c23
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60903.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr60930.c22
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61010.c8
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61383-1.c35
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61452.c31
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61681.c37
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr61964.c33
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr62031.c52
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr63380-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/torture/pr63380-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-callused-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-escape-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/torture/restrict-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/torture/restrict-3.c26
-rw-r--r--gcc/testsuite/gcc.dg/torture/restrict-4.c26
-rw-r--r--gcc/testsuite/gcc.dg/torture/restrict-5.c25
-rw-r--r--gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c9
-rw-r--r--gcc/testsuite/gcc.dg/torture/stackalign/setjmp-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp3
-rw-r--r--gcc/testsuite/gcc.dg/torture/tls/tls-reload-1.c49
-rw-r--r--gcc/testsuite/gcc.dg/torture/tls/tls.exp2
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-1.c97
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-2.c94
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-3.c101
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-4.c100
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-5.c96
-rw-r--r--gcc/testsuite/gcc.dg/torture/transpose-6.c96
-rw-r--r--gcc/testsuite/gcc.dg/torture/va-arg-25.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/vec-cvt-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/torture/vector-shuffle1.c21
-rw-r--r--gcc/testsuite/gcc.dg/torture/vshuf-16.inc4
-rw-r--r--gcc/testsuite/gcc.dg/torture/vshuf-32.inc4
-rw-r--r--gcc/testsuite/gcc.dg/torture/vshuf-4.inc6
-rw-r--r--gcc/testsuite/gcc.dg/torture/vshuf-8.inc4
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/20041218-1.c119
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c38
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c166
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c40
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/inliner-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/peel-1.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr45354.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr50907.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr52027.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/pr59003.c30
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c40
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c40
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c50
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp5
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/unroll-1.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/update-loopch.c9
-rw-r--r--gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c145
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-11.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-19.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-21.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-22.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-23.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-24.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-25.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-26.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-27.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-28.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-29.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-30.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-31.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/alias-6.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/andor-3.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/andor-4.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/andor-5.c50
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/asm-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/asm-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/assign-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/assign-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/assign-3.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/attr-alias-2.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/attr-alias.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/coalesce-1.c195
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/coalesce-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-1.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-10.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-3.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-4.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-5.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/cunroll-9.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/foldconst-6.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-17.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-19.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-20.c70
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-21.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-23.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-25.c43
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-26.c64
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-27.c40
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c80
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/inline-11.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/inline-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c60
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c43
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c65
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c52
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-11.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-17.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-19.c71
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-20.c37
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-21.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-22.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-23.c34
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-19.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-23.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-31.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-38.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-39.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/loop-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-11.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/phi-opt-9.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18133-1.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-3.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-4.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-5.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-6.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-7.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-8.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18589-9.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr18908.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr19431.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr20318.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21001.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21090.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr21559.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr31261.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr36881.c5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr37508.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr42585.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr43491.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr44258.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr45085.c46
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr45685.c41
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr52631.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr54211.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr54245.c49
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr54915.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr55008.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr55579.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr57361.c10
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr57385.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr58480.c19
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr58958.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr59597.c58
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pr61144.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/predcom-6.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/predcom-7.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-26.c12
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c11
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-28.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-29.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-30.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sccp-1.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/scev-3.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/scev-4.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/scev-5.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/scev-6.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/scev-7.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-10.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-11.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-12.c30
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-14.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-15.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-16.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-17.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-18.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-19.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-20.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-21.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-22.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-23.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-24.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-25.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-26.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-27.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-28.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-29.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-31.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-32.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-33.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-34.c43
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-35.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-36.c29
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-37.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-38.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c26
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-4.c37
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-40.c27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-41.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-5.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-6.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c24
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/slsr-9.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-12.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/sra-13.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-23.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c48
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-33.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-37.c15
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-38.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-10.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-11.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-12.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-8.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-9.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c14
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c17
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c20
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c13
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c25
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-27.c7
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-29.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-30.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-31.c47
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/stdarg-6.c36
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/unreachable.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vector-2.c4
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vector-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vector-4.c16
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp.h27
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp06.c6
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp47.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp55.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp58.c3
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp63.c345
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp64.c152
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp65.c376
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp66-int16-sw.c914
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp66.c861
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp67.c38
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp68.c18
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp69.c38
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp70.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp71.c22
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp72.c31
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp73.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp74.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp75.c32
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp76.c35
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp77.c47
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp78.c34
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp79.c23
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp80.c33
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp81.c38
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp82.c57
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp83.c60
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp84.c21
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp85.c40
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp86.c28
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp87.c84
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp88.c39
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp89.c57
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp90.c36
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/vrp93.c36
-rw-r--r--gcc/testsuite/gcc.dg/tsan/tsan.exp47
-rw-r--r--gcc/testsuite/gcc.dg/typeof-2.c28
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/c-shift-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/c99-shift-1.c10
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/c99-shift-2.c10
-rw-r--r--gcc/testsuite/gcc.dg/ubsan/ubsan.exp36
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-10.c1
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-13.c1
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-7.c1
-rw-r--r--gcc/testsuite/gcc.dg/ucnid-8.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-6-O0.c6
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pred-5_a.c3
-rw-r--r--gcc/testsuite/gcc.dg/uninit-pred-5_b.c3
-rw-r--r--gcc/testsuite/gcc.dg/unroll_1.c10
-rw-r--r--gcc/testsuite/gcc.dg/unroll_2.c7
-rw-r--r--gcc/testsuite/gcc.dg/unroll_3.c7
-rw-r--r--gcc/testsuite/gcc.dg/unroll_4.c7
-rw-r--r--gcc/testsuite/gcc.dg/unroll_5.c35
-rw-r--r--gcc/testsuite/gcc.dg/unused-8b.c4
-rw-r--r--gcc/testsuite/gcc.dg/utf-cvt.c2
-rw-r--r--gcc/testsuite/gcc.dg/var-expand1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/O3-pr36098.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-10.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-13.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-14.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-15.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-16.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-17.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-18.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-19.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-20.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-21.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-22.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-23.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-24.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-25.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-26.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-27.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-28.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-29.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-30.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-31.c13
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-32.c23
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-4.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-6.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-7.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-8.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-8a.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-8b.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-9.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/bb-slp-pattern-2.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-31.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp5
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp5
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp4
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp5
-rw-r--r--gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-1.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/fast-math-pr55281.c30
-rw-r--r--gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c22
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-34.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-tree-reassoc-bb-slp-12.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c55
-rw-r--r--gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c187
-rw-r--r--gcc/testsuite/gcc.dg/vect/nodump-forwprop-22.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr18536.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr22506.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr34005.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr48765.c5
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr49352.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr51581-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr51581-2.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr51581-3.c118
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr51581-4.c166
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr53185-2.c27
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr53185.c16
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr53773.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr55857-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr55857-2.c21
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56695.c14
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56787.c35
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56826.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56918.c31
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56920.c21
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr56933.c46
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr57705.c67
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr57741-1.c21
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr57741-2.c45
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr57741-3.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr58508.c71
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59519-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59519-2.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59591-1.c55
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59591-2.c56
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59594.c31
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59651.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr59984.c65
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60012.c22
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60092-2.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60196-1.c34
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60196-2.c33
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60276.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60382.c32
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60482.c20
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60505.c14
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60656.c47
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr60841.c183
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr61680.c51
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr62073.c40
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr62075.c22
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr63189.c26
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr63341-1.c32
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr63341-2.c35
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr63379.c43
-rw-r--r--gcc/testsuite/gcc.dg/vect/pr63530.c30
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-24-big-array.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-24.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-26.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-39.c25
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-cond-3.c84
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-cond-4.c86
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-perm-2.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-perm-8.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/slp-perm-9.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vec-scal-opt.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vec-scal-opt1.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vec-scal-opt2.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-119.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-123.c15
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-124.c30
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-82_64.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-83_64.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-alias-check.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-align-3.c54
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cond-11.c116
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-cond-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-iv-11.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-iv-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-iv-7.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c18
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c34
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-mask-load-1.c52
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-mask-loadstore-1.c50
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-neg-store-1.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-neg-store-2.c39
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-nop-move.c83
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1a.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-1b.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-2b.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-3a.c3
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-3b.c4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-outer-4c.c1
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c73
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-3.c41
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-btrunc.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-btruncf.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-ceil.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-ceilf.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-floor.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-floorf.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-lceil.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-lfloor.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyint.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyintf.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-round.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-rounding-roundf.c17
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c59
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c85
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.h4
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-10a.c19
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-11.c67
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c9
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-12a.c19
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-2.c53
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-3.c46
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-4.c49
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-5.c44
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c75
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-7.c75
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-8.c95
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-simd-clone-9.c95
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-singleton_1.c38
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-mult.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-mult.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-mult-char-ls.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-mult.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-same-dr.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u16-i2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u16-i4.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u32-i4.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u32-i8.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2-gap.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c7
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8.c6
-rw-r--r--gcc/testsuite/gcc.dg/vect/vect.exp13
-rw-r--r--gcc/testsuite/gcc.dg/vector-2.c21
-rw-r--r--gcc/testsuite/gcc.dg/vector-3.c5
-rw-r--r--gcc/testsuite/gcc.dg/vector-compare-1.c19
-rw-r--r--gcc/testsuite/gcc.dg/vector-compare-2.c28
-rw-r--r--gcc/testsuite/gcc.dg/vector-shift-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/vector-shift.c17
-rw-r--r--gcc/testsuite/gcc.dg/vector-shift1.c18
-rw-r--r--gcc/testsuite/gcc.dg/vector-shift3.c16
-rw-r--r--gcc/testsuite/gcc.dg/vector-subscript-1.c17
-rw-r--r--gcc/testsuite/gcc.dg/vector-subscript-2.c13
-rw-r--r--gcc/testsuite/gcc.dg/vector-subscript-3.c19
-rw-r--r--gcc/testsuite/gcc.dg/visibility-21.c14
-rw-r--r--gcc/testsuite/gcc.dg/vla-11.c2
-rw-r--r--gcc/testsuite/gcc.dg/vmx/3b-13.c2
-rw-r--r--gcc/testsuite/gcc.dg/vmx/3c-01a.c1
-rw-r--r--gcc/testsuite/gcc.dg/vmx/eg-5.c2
-rw-r--r--gcc/testsuite/gcc.dg/vmx/extract-be-order.c33
-rw-r--r--gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c19
-rw-r--r--gcc/testsuite/gcc.dg/vmx/extract-vsx.c16
-rw-r--r--gcc/testsuite/gcc.dg/vmx/extract.c21
-rw-r--r--gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c15
-rw-r--r--gcc/testsuite/gcc.dg/vmx/insert-be-order.c65
-rw-r--r--gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c34
-rw-r--r--gcc/testsuite/gcc.dg/vmx/insert-vsx.c28
-rw-r--r--gcc/testsuite/gcc.dg/vmx/insert.c37
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ld-be-order.c107
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c44
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ld-vsx.c39
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ld.c91
-rw-r--r--gcc/testsuite/gcc.dg/vmx/lde-be-order.c73
-rw-r--r--gcc/testsuite/gcc.dg/vmx/lde.c59
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ldl-be-order.c107
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c44
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ldl-vsx.c39
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ldl.c91
-rw-r--r--gcc/testsuite/gcc.dg/vmx/merge-be-order.c96
-rw-r--r--gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c84
-rw-r--r--gcc/testsuite/gcc.dg/vmx/merge-vsx.c71
-rw-r--r--gcc/testsuite/gcc.dg/vmx/merge.c77
-rw-r--r--gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c64
-rw-r--r--gcc/testsuite/gcc.dg/vmx/mult-even-odd.c43
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ops-long-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ops.c1
-rw-r--r--gcc/testsuite/gcc.dg/vmx/pack-be-order.c136
-rw-r--r--gcc/testsuite/gcc.dg/vmx/pack.c108
-rw-r--r--gcc/testsuite/gcc.dg/vmx/perm-be-order.c74
-rw-r--r--gcc/testsuite/gcc.dg/vmx/perm.c69
-rw-r--r--gcc/testsuite/gcc.dg/vmx/sn7153.c4
-rw-r--r--gcc/testsuite/gcc.dg/vmx/splat-be-order.c59
-rw-r--r--gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c37
-rw-r--r--gcc/testsuite/gcc.dg/vmx/splat-vsx.c31
-rw-r--r--gcc/testsuite/gcc.dg/vmx/splat.c47
-rw-r--r--gcc/testsuite/gcc.dg/vmx/st-be-order.c83
-rw-r--r--gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c34
-rw-r--r--gcc/testsuite/gcc.dg/vmx/st-vsx.c29
-rw-r--r--gcc/testsuite/gcc.dg/vmx/st.c67
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ste-be-order.c53
-rw-r--r--gcc/testsuite/gcc.dg/vmx/ste.c41
-rw-r--r--gcc/testsuite/gcc.dg/vmx/stl-be-order.c83
-rw-r--r--gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c34
-rw-r--r--gcc/testsuite/gcc.dg/vmx/stl-vsx.c29
-rw-r--r--gcc/testsuite/gcc.dg/vmx/stl.c67
-rw-r--r--gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c19
-rw-r--r--gcc/testsuite/gcc.dg/vmx/sum2s.c13
-rw-r--r--gcc/testsuite/gcc.dg/vmx/unpack-be-order.c88
-rw-r--r--gcc/testsuite/gcc.dg/vmx/unpack.c67
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vec-set.c14
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vmx.exp2
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vsums-be-order.c20
-rw-r--r--gcc/testsuite/gcc.dg/vmx/vsums.c12
-rw-r--r--gcc/testsuite/gcc.dg/vxworks/vxworks.exp2
-rw-r--r--gcc/testsuite/gcc.dg/warn-nsstring.c2
-rw-r--r--gcc/testsuite/gcc.dg/wdate-time.c6
-rw-r--r--gcc/testsuite/gcc.dg/weak/typeof-2.c2
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-1.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-15.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-16.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-2.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-3.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-4.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak-5.c1
-rw-r--r--gcc/testsuite/gcc.dg/weak/weak.exp2
-rw-r--r--gcc/testsuite/gcc.dg/webizer.c36
-rw-r--r--gcc/testsuite/gcc.dg/winline-3.c2
-rw-r--r--gcc/testsuite/gcc.dg/wmul-1.c19
-rw-r--r--gcc/testsuite/gcc.misc-tests/acker1.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/arm-isr.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/bprob.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/dectest.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/dhry.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov-14.c2
-rw-r--r--gcc/testsuite/gcc.misc-tests/gcov.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/help.exp6
-rw-r--r--gcc/testsuite/gcc.misc-tests/i386-prefetch.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/linkage.exp19
-rw-r--r--gcc/testsuite/gcc.misc-tests/matrix1.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/mg-2.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/mg.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/options.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/sieve.exp2
-rw-r--r--gcc/testsuite/gcc.misc-tests/sort2.exp2
-rw-r--r--gcc/testsuite/gcc.target/aarch64/121127.c4
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp67
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-2.h101
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-common.h139
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S59
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.h159
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-1.c44
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-2.c71
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.c93
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.c27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/ice_1.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/ice_2.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/ice_3.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/ice_4.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/ice_5.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h286
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_1.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_10.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_11.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_12.c44
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_13.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_14.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_15.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_16.c32
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_17.c37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_18.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_19.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_2.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_20.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_21.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_22.c19
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_23.c42
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_24.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_25.c61
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_26.c54
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_3.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_4.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_5.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_6.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_7.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_8.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_9.c32
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-1.c126
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-2.c42
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-3.c46
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-4.c42
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_complex.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_int128.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/test_quad_double.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h164
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-1.c50
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-10.c29
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-11.c32
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-12.c60
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c59
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c39
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-2.c59
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-3.c86
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-4.c93
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-5.c47
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-6.c40
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-7.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-8.c25
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-9.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aapcs64/validate_memory.h81
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aarch64.exp45
-rw-r--r--gcc/testsuite/gcc.target/aarch64/abs_1.c53
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adc-1.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adc-2.c277
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adds.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adds1.c149
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adds2.c155
-rw-r--r--gcc/testsuite/gcc.target/aarch64/adds3.c61
-rw-r--r--gcc/testsuite/gcc.target/aarch64/aes_1.c40
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ands_1.c151
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ands_2.c157
-rw-r--r--gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/asm-1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c23
-rw-r--r--gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c23
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.x36
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-char.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-char.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-imm.c78
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-int.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-int.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-long.c45
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-release.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-release.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-short.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/atomic-op-short.x37
-rw-r--r--gcc/testsuite/gcc.target/aarch64/bfxil_1.c40
-rw-r--r--gcc/testsuite/gcc.target/aarch64/bfxil_2.c42
-rw-r--r--gcc/testsuite/gcc.target/aarch64/bics_1.c107
-rw-r--r--gcc/testsuite/gcc.target/aarch64/bics_2.c111
-rw-r--r--gcc/testsuite/gcc.target/aarch64/builtin-bswap-1.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/builtin-bswap-2.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/c-output-template-2.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/c-output-template-3.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/c-output-template.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/clrsb.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/clz.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cmn-neg.c33
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cmn-neg2.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cmn.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cmp-1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cmp.c61
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csinc-1.c72
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csinc-2.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csinv-1.c50
-rw-r--r--gcc/testsuite/gcc.target/aarch64/csneg-1.c50
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ctz.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/extend.c170
-rw-r--r--gcc/testsuite/gcc.target/aarch64/extr.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fabd.c38
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt.x55
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_double_int.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_double_long.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_double_uint.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_double_ulong.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_float_int.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_float_long.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_float_uint.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fcvt_float_ulong.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ffs.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmadd.c55
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c116
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c117
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmovd-zero.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmovd.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmovf-zero.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmovf.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c116
-rw-r--r--gcc/testsuite/gcc.target/aarch64/fnmadd-fastmath.c19
-rw-r--r--gcc/testsuite/gcc.target/aarch64/frint.x66
-rw-r--r--gcc/testsuite/gcc.target/aarch64/frint_double.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/frint_float.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/index.c111
-rw-r--r--gcc/testsuite/gcc.target/aarch64/insv_1.c85
-rw-r--r--gcc/testsuite/gcc.target/aarch64/insv_2.c85
-rw-r--r--gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mla_intrinsic_1.c84
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mls_intrinsic_1.c89
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mneg-1.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mneg-2.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mneg-3.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mnegl-1.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mnegl-2.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/movdi_1.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/movi_1.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/movk.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/mul_intrinsic_1.c83
-rw-r--r--gcc/testsuite/gcc.target/aarch64/narrow_high-intrinsics.c125
-rw-r--r--gcc/testsuite/gcc.target/aarch64/neg_1.c67
-rw-r--r--gcc/testsuite/gcc.target/aarch64/negs.c108
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ngc.c66
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c128
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pmull_1.c23
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr58460.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr60034.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr60580_1.c45
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr60675.C277
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr60697.c638
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr61325.c19
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr62040.c21
-rw-r--r--gcc/testsuite/gcc.target/aarch64/pr62262.c20
-rw-r--r--gcc/testsuite/gcc.target/aarch64/predefine_large.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/predefine_small.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/predefine_tiny.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c66
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ror.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sbc.c41
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar-mov.c9
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar-vca.c72
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c1301
-rw-r--r--gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c263
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sha1_1.c55
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sha256_1.c40
-rw-r--r--gcc/testsuite/gcc.target/aarch64/sshr64_1.c115
-rw-r--r--gcc/testsuite/gcc.target/aarch64/subs.c30
-rw-r--r--gcc/testsuite/gcc.target/aarch64/subs1.c149
-rw-r--r--gcc/testsuite/gcc.target/aarch64/subs2.c155
-rw-r--r--gcc/testsuite/gcc.target/aarch64/subs3.c61
-rw-r--r--gcc/testsuite/gcc.target/aarch64/table-intrinsics.c439
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test-ptr-arg-on-stack-1.c39
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test_fp_attribute_1.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/test_fp_attribute_2.c26
-rw-r--r--gcc/testsuite/gcc.target/aarch64/tst-1.c49
-rw-r--r--gcc/testsuite/gcc.target/aarch64/tst_1.c150
-rw-r--r--gcc/testsuite/gcc.target/aarch64/tst_2.c156
-rw-r--r--gcc/testsuite/gcc.target/aarch64/ushr64_1.c84
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vabs_intrinsic_1.c101
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vadd_f64.c114
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic-compile.c11
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.c28
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.x27
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vclz.c574
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vdiv_f.c361
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-abs-compile.c12
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-abs.c134
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-abs.x36
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-clz.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-compile.c22
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-faddv-compile.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-faddv.c31
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-faddv.x23
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c16
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fcm.x124
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin-compile.c7
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.c105
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.x32
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv-compile.c10
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv.x43
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmovd.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fmovf.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fp-compile.c14
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fp.c148
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-fp.x60
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile-fp.c13
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile.c18
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-ld1r-fp.c51
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-ld1r.c65
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-ld1r.x15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-movi.c74
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c24
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-mull.c138
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-mull.x49
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vaddv.c128
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vca.c89
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vcvt.c132
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vfmaxv.c169
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vmaxv.c117
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect-vrnd.c117
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect.c97
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect.x154
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect_saddl_1.c315
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vect_smlal_1.c325
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vector_intrinsics.c803
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vfp-1.c109
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vld1-vst1_1.c52
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vmlsq_laneq.c158
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vmov_n_1.c349
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vneg_f.c270
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vneg_s.c309
-rw-r--r--gcc/testsuite/gcc.target/aarch64/volatile-bitfields-1.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/volatile-bitfields-2.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/volatile-bitfields-3.c17
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlalh_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlals_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsl_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlslh_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmlsls_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulhh_lane_s16.c36
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulhs_lane_s32.c34
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmullh_lane_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqdmulls_lane_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulhh_lane_s16.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s16.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s32.c15
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vqrdmulhs_lane_s32.c35
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vrecps.c144
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vrecpx.c54
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vsqrt.c72
-rw-r--r--gcc/testsuite/gcc.target/aarch64/vsub_f64.c116
-rw-r--r--gcc/testsuite/gcc.target/alpha/alpha.exp2
-rw-r--r--gcc/testsuite/gcc.target/alpha/pr61586.c10
-rw-r--r--gcc/testsuite/gcc.target/arc/arc.exp41
-rw-r--r--gcc/testsuite/gcc.target/arc/barrel-shifter-1.c10
-rw-r--r--gcc/testsuite/gcc.target/arc/barrel-shifter-2.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/builtin_arc_aligned-1.c16
-rw-r--r--gcc/testsuite/gcc.target/arc/builtin_arc_aligned-2.c28
-rw-r--r--gcc/testsuite/gcc.target/arc/builtin_arc_aligned-3.c67
-rw-r--r--gcc/testsuite/gcc.target/arc/cond-set-use.c128
-rw-r--r--gcc/testsuite/gcc.target/arc/interrupt-1.c5
-rw-r--r--gcc/testsuite/gcc.target/arc/interrupt-2.c5
-rw-r--r--gcc/testsuite/gcc.target/arc/interrupt-3.c14
-rw-r--r--gcc/testsuite/gcc.target/arc/jump-around-jump.c123
-rw-r--r--gcc/testsuite/gcc.target/arc/long-calls.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mA6.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mA7.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mARC600.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mARC601.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mARC700.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mcpu-arc600.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mcpu-arc601.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mcpu-arc700.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mcrc.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mdpfp.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mdsp-packa.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mdvbf.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mlock.c12
-rw-r--r--gcc/testsuite/gcc.target/arc/mmac-24.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mmac-d16.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-crc.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-dsp-packa.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-dvbf.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-lock.c14
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-mac-24.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-mac-d16.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-rtsc.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-swape.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mno-xy.c10
-rw-r--r--gcc/testsuite/gcc.target/arc/mrtsc.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mspfp.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/mswape.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC600.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC601.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC700-xmac4
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC700.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC725D.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mtune-ARC750D.c4
-rw-r--r--gcc/testsuite/gcc.target/arc/mul64.c13
-rw-r--r--gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c28
-rw-r--r--gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c30
-rw-r--r--gcc/testsuite/gcc.target/arc/mxy.c8
-rw-r--r--gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c11
-rw-r--r--gcc/testsuite/gcc.target/arc/nv-cache.c9
-rw-r--r--gcc/testsuite/gcc.target/arc/sdata-1.c10
-rw-r--r--gcc/testsuite/gcc.target/arc/sdata-2.c10
-rw-r--r--gcc/testsuite/gcc.target/arc/v-cache.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/20131120.c14
-rw-r--r--gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/acle.exp35
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32b.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32cb.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32cd.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32ch.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32cw.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32d.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32h.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/acle/crc32w.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/anddi3-opt.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/anddi3-opt2.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/arm.exp5
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-acquire.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-char.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-consume.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-int.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-release.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/atomic-op-short.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/builtin-bswap-1.c81
-rw-r--r--gcc/testsuite/gcc.target/arm/builtin-bswap16-1.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/builtin-trap.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vaesdq_u8.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vaeseq_u8.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vaesimcq_u8.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vaesmcq_u8.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vldrq_p128.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vmull_high_p64.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vmullp64.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1cq_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1h_u32.c14
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1mq_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1pq_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1su0q_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha1su1q_u32.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha256h2q_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha256hq_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha256su0q_u32.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vsha256su1q_u32.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/crypto-vstrq_p128.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/div64-unwinding.c24
-rw-r--r--gcc/testsuite/gcc.target/arm/epilog-1.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/fixed_float_conversion.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/fma-sp.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/fma.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/fma.h50
-rw-r--r--gcc/testsuite/gcc.target/arm/frame-pointer-1.c1
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c25
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c34
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7em-thumb.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c31
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c40
-rw-r--r--gcc/testsuite/gcc.target/arm/ftest-support.h156
-rw-r--r--gcc/testsuite/gcc.target/arm/interrupt-1.c14
-rw-r--r--gcc/testsuite/gcc.target/arm/interrupt-2.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/iordi3-opt.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/its.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/ivopts-orig_biv-inc.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/ldrd-strd-offset.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/lp1189445.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/lp1243022.c201
-rw-r--r--gcc/testsuite/gcc.target/arm/minmax_minus.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/mmx-2.c166
-rw-r--r--gcc/testsuite/gcc.target/arm/naked-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/negdi-1.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/negdi-2.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/negdi-3.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c16
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-extend-1.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-extend-2.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-for-64bits-1.c54
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-modes-3.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-nested-apcs.c48
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vceq_p64.c38
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vcond-gt.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vcond-ltgt.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vcond-unordered.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-1.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-10.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-11.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-12.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-13.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-14.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-15.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-16.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-17.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-18.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-19.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-2.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-3.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-4.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-5.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-6.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-7.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-8.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vdup-9.c17
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vext-execute.c341
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vext.c115
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vfma-1.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vfms-1.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vld1_dupQ.c24
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vmla-1.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vmls-1.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/neon-vtst_p64.c38
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/neon.exp2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vbslQp64.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vbslp64.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vcombinep64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vcreatep64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vcvtf16_f32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vcvtf32_f16.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vdupQ_lanep64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vdupQ_np64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vdup_lanep64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vdup_np64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vextQp64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vextp64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vfmaQf32.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vfmaf32.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vfmsQf32.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vfmsf32.c22
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vgetQ_lanes64.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vgetQ_laneu64.c4
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vget_highp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vget_lowp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1Q_dupp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1Q_dups64.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1Q_dupu64.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1Q_lanep64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1Qp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1_dupp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1_lanep64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld1p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld2_dupp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld2p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld3_dupp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld3p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld4_dupp64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vld4p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_f32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_f32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p128.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretf32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_f32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u16.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u32.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u8.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretp8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterprets16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterprets32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterprets64_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterprets8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretu16_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretu32_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretu64_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vreinterpretu8_p64.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndaf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndmf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndnf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndpf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndqaf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndqf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndqmf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndqnf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vrndqpf32.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vsliQ_np64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vsli_np64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vsriQ_np64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vsri_np64.c21
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst1Q_lanep64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst1Q_laneu64-1.c25
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst1Qp64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst1_lanep64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst1p64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst2p64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst3p64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vst4p64.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vtrnf32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vtrns32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vtrnu32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vzipf32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vzips32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/neon/vzipu32.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/nested-apcs.c34
-rw-r--r--gcc/testsuite/gcc.target/arm/peep-ldrd-1.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/peep-strd-1.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/pr19599.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/pr40457-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/pr40457-2.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/pr40457-3.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/pr40887.c5
-rw-r--r--gcc/testsuite/gcc.target/arm/pr46975-2.c10
-rw-r--r--gcc/testsuite/gcc.target/arm/pr48252.c6
-rw-r--r--gcc/testsuite/gcc.target/arm/pr50318-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/pr52686.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53447-1.c8
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53447-2.c8
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53447-3.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53447-4.c9
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53636.c48
-rw-r--r--gcc/testsuite/gcc.target/arm/pr53859.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/pr54051.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/pr54300.C61
-rw-r--r--gcc/testsuite/gcc.target/arm/pr55073.C74
-rw-r--r--gcc/testsuite/gcc.target/arm/pr55642.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/pr56184.C258
-rw-r--r--gcc/testsuite/gcc.target/arm/pr56732-1.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/pr57637.c206
-rw-r--r--gcc/testsuite/gcc.target/arm/pr58041.c30
-rw-r--r--gcc/testsuite/gcc.target/arm/pr58578.c54
-rw-r--r--gcc/testsuite/gcc.target/arm/pr58784.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59575.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59858.c163
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59896.c1375
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59923.c24
-rw-r--r--gcc/testsuite/gcc.target/arm/pr59985.C69
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60264.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60650-2.c37
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60650.c41
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60657.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/pr60663.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/require-pic-register-loc.c29
-rw-r--r--gcc/testsuite/gcc.target/arm/sat-1.c64
-rw-r--r--gcc/testsuite/gcc.target/arm/smlaltb-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/smlaltt-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/stack-red-zone.c1
-rw-r--r--gcc/testsuite/gcc.target/arm/synchronize.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c203
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-builtin-trap.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-cbranchqi.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-find-work-register.c1
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-ifcvt-2.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-ifcvt.c19
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb-ltu.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c34
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c57
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-far-jump-3.c108
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-imm.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data.c74
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c7
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c11
-rw-r--r--gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vect-noalign.c20
-rw-r--r--gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c18
-rw-r--r--gcc/testsuite/gcc.target/arm/vfp-1.c2
-rw-r--r--gcc/testsuite/gcc.target/arm/vmaxnmdf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vmaxnmsf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vminnmdf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vminnmsf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrinta-ce.c15
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintaf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintaf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintmf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintmf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintpf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintpf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintrf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintrf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintxf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintxf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintzf32.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vrintzf64.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vseleqdf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vseleqsf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselgedf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselgesf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselgtdf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselgtsf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselledf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vsellesf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselltdf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselltsf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselnedf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselnesf.c13
-rw-r--r--gcc/testsuite/gcc.target/arm/vselvcdf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vselvcsf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vselvsdf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/vselvssf.c12
-rw-r--r--gcc/testsuite/gcc.target/arm/xordi3-opt.c9
-rw-r--r--gcc/testsuite/gcc.target/avr/avr.exp2
-rw-r--r--gcc/testsuite/gcc.target/avr/dev-specific-rmw.c13
-rw-r--r--gcc/testsuite/gcc.target/avr/pr58545.c23
-rw-r--r--gcc/testsuite/gcc.target/avr/pr60991.c21
-rw-r--r--gcc/testsuite/gcc.target/avr/progmem-error-1.cpp2
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/avr-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c171
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c164
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/builtins-5-countlsfx.c82
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/fix-types.h134
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/pr57631.c17
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/pr61055.c88
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/pr61443.c134
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-hr-plus-minus.c98
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-k-plus-minus.c108
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-llk-plus-minus.c108
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-r-plus-minus.c107
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-uhr-plus-minus.c73
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-uk-plus-minus.c82
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-ullk-plus-minus.c82
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/sat-ur-plus-minus.c82
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-hr.def12
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-k.def32
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-llk.def32
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-r.def30
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-uhr.def13
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-uk.def23
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-ullk.def20
-rw-r--r--gcc/testsuite/gcc.target/avr/torture/vals-ur.def17
-rw-r--r--gcc/testsuite/gcc.target/bfin/bfin.exp2
-rw-r--r--gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp2
-rw-r--r--gcc/testsuite/gcc.target/cris/20011127-1.c1
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-other.S15
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-v10.S6
-rw-r--r--gcc/testsuite/gcc.target/cris/asm-v8.S6
-rw-r--r--gcc/testsuite/gcc.target/cris/cris.exp2
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-other.c23
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-v10.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/inasm-v8.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/peep2-andu2.c17
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-1-v10.c5
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-1-v32.c5
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-1.c35
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-2c.c8
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-2i.c10
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-2s.c10
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-3i.c12
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-3s.c12
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-4c.c8
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-4i.c9
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-4s.c9
-rw-r--r--gcc/testsuite/gcc.target/cris/sync-xchg-1.c21
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/cris-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c126
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c6
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c4
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-1.c13
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-2.c11
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-3.c10
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-v0.c11
-rw-r--r--gcc/testsuite/gcc.target/cris/torture/trap-v3.c12
-rw-r--r--gcc/testsuite/gcc.target/epiphany/epiphany.exp2
-rw-r--r--gcc/testsuite/gcc.target/epiphany/fnma-1.c9
-rw-r--r--gcc/testsuite/gcc.target/frv/frv.exp2
-rw-r--r--gcc/testsuite/gcc.target/h8300/h8300.exp82
-rw-r--r--gcc/testsuite/gcc.target/h8300/pragma-isr.c40
-rw-r--r--gcc/testsuite/gcc.target/h8300/pragma-isr2.c42
-rw-r--r--gcc/testsuite/gcc.target/i386/20000724-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/20030217-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/20030217-2.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/387-3.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/387-4.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx32-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx32-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx32-3.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx64-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx64-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-addcarryx64-3.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/adx-check.h40
-rw-r--r--gcc/testsuite/gcc.target/i386/align-main-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/andor-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/asm-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/asm-dialect-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/asm-dialect-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-1.c213
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-additional-reg-names.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-inline.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-os-support.h12
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-pr51581-1.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-pr51581-2.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-pr57233.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vmovapd-256-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vmovapd-256-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-10.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-11.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-12.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-16.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-18.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-27.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-8.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx-vzeroupper-9.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-gather-5.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-gather-6.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-pr51581-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-pr51581-2.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-pr57233.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpand-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpblendd128-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpop-check.h4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-check.h46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c39
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c39
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-check.h46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-2.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-check.h47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-dummy.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-gather-1.c217
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-gather-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-gather-3.c169
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-gather-4.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-gather-5.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-helper.h96
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-2.c51
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-inline-asm.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kandw-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kmovw-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kortestw-1.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kortestw-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-korw-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kunpckbw-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kxnorw-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-kxorw-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-mask-type.h10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-os-support.h10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-pr57233.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-rounding.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-1.c45
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-2.c49
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-3.c45
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-4.c119
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-5.c119
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16si-1.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c49
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16si-3.c45
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16si-4.c119
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v16si-5.c119
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8df-1.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8df-2.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8df-3.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8df-4.c87
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8df-5.c87
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8di-1.c39
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8di-2.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8di-3.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8di-4.c87
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-set-v8di-5.c87
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-setzero-pd-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-setzero-ps-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-setzero-si512-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vaddss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-valignd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-valignd-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-valignq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-valignq-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-2.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vblendmps-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vblendmps-2.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmppd-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmppd-2.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpps-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpps-2.c80
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-2.c67
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpss-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcmpss-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcomisd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcomiss-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcompressps-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcompressps-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-2.c84
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c84
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-2.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si64-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2ss-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-2.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-2.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2sd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si64-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-2.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-2.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-2.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-2.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-2.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-2.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-2.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivsd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vdivss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vec-init.c121
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vec-unpack.c127
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-2.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vexpandps-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vexpandps-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c117
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c122
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c119
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c120
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-2.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-2.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-2.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-2.c69
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-2.c36
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-2.c36
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-1.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-2.c124
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-1.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-2.c125
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-2.c95
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-2.c100
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmaxss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vminss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovapd-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovapd-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovaps-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovaps-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovddup-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovddup-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-1.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-2.c80
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-2.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-2.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-2.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntps-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovupd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovupd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovups-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmovups-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vmulss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpabsd-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpabsd512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpabsq-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpabsq512-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpaddd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpaddd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpaddq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpaddq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandd-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandnd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandnd-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandnq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandnq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpandq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-2.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-2.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-2.c72
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-2.c72
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-2.c46
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilps-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilps-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-2.c82
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermpd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermpd-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermps-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermps-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-1.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-2.c66
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminsd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminsd-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminsq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminsq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminud-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminud-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminuq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpminuq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-2.c75
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-2.c67
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c79
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-2.c67
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-2.c73
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmulld-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmulld-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpord-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpord-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vporq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vporq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprold-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprold-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolvd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolvd-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolvq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprolvq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprord-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprord-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorvd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorvd-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorvq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vprorvq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpshufd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpshufd-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpslld-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpslld-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpslldi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpslldi-2.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllq-2.c62
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-2.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrad-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrad-2.c64
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsradi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsradi-2.c78
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsraq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsraq-2.c65
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-2.c80
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravd-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravq-2.c58
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrld-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrld-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-2.c76
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-2.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-2.c77
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-2.c47
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsubd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsubd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsubq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpsubq-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-2.c71
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-2.c73
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestmd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestmd-2.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestmq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestmq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-2.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpxord-1.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpxord-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpxorq-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vpxorq-2.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-2.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-2.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-2.c94
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-2.c92
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c50
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c52
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-2.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-2.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefps-2.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c37
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c39
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-2.c68
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufpd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufpd-2.c61
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vshufps-2.c74
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-2.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubpd-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubps-1.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubps-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubsd-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vsubss-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vucomisd-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vucomiss-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-2.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f_cond_move.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-2.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dpd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dps-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qpd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qps-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dpd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dps-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qpd-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qps-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-1.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-2.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-bextr-3.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-bextr-4.c49
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi-bextr-5.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/builtin-bswap-4.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/builtin-ucmp.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/builtin_target.c284
-rw-r--r--gcc/testsuite/gcc.target/i386/cleanup-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/clearcap.map3
-rw-r--r--gcc/testsuite/gcc.target/i386/clearcapv2.map7
-rw-r--r--gcc/testsuite/gcc.target/i386/cold-attribute-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/excess-precision-1.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/excess-precision-3.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/fma4-builtin.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/fma4-fma-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/fma4-fma.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/fma4-vector-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/fma4-vector.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/fma_double_3.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/fma_double_5.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/fma_float_3.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/fma_float_5.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-3.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-5.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/funcspec-9.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/fxrstor-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/fxrstor64-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/fxsave-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/fxsave64-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-add-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-add-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-and-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-and-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-clear-rel.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-or-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-or-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-store-rel.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xchg-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/i386.exp116
-rw-r--r--gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-10.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-11.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/incoming-5.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/inline-mcpy.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/inline_error.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_3.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_4.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_5.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/intrinsics_6.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/isa-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_1.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_2.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_3.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_4.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_5.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_double_6.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_1.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_2.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_3.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_4.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_5.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/l_fma_float_6.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/large-frame.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-4.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-5.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-6.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-7.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-8.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-128-9.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-4.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-5.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-6.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-7.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-8.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-64-9.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-10.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-4.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-5.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-6.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-7.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-8.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/long-double-80-9.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/m128-check.h25
-rw-r--r--gcc/testsuite/gcc.target/i386/m512-check.h83
-rw-r--r--gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp2
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-3.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-strategy-1.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/merge-1.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/mmx-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/movabs-1.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/movti.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/nest-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pad-10.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/perm-concat.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr19398.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr20020-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/pr20020-2.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr20020-3.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr22076.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr22152.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr23943.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr27971.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr28946.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr30315.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/pr30970.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr32268.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr33329.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr34283.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr36578-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/pr36578-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr36613.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr38988.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39013-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39013-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39082-1.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39162.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr39496.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr40906-3.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr42542-4a.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr43546.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr44578.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/pr45830.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46084.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46295.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46716.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46829.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr46843.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr47735.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr49002-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr49168-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr49715-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr50725.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52146.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52698.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52857-1.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52857-2.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52876.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52882.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr52883.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53249.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53315.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53397-1.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53397-2.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53425-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53425-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53623.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53698.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53712.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr53907.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54157.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54400.c53
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54445-1.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54445-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54457.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54592.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr54694.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55049-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55093.c81
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55116-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55116-2.c86
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55130.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55141.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55142-1.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55142-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55147.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55151.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55154.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55247-2.c37
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55247.c35
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55277.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55342.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55359.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55433.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55448.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55458.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55512-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55512-2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55512-3.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55512-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55590-1.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55590-2.c27
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55597.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55672.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55686.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55775.c56
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55829.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55845.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55934.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr55981.c (renamed from gcc/testsuite/gcc.target/pr55981.c)0
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56022.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56114.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56148.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56151.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56225.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56246.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56348.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56560.c19
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56564-1.c26
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56564-2.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56564-3.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56564-4.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56866.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr56903.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57003.c54
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57018.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57046.c77
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57091.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57097.c29
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57098.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57106.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57189.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57233.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57264.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57275.c39
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57293.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57410.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57459.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57655.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57736.c41
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57756.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57756_2.c132
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57777.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57807.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57819.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57848.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr57915.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58048.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58137.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58218.c5
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58418.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58679-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58679-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58690.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58759.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58853.c9
-rw-r--r--gcc/testsuite/gcc.target/i386/pr58944.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59021.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59034-1.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59034-2.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59099.c77
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59133.c42
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59153.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59363.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59390.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59390_1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59390_2.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59405.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59470.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-1.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-1a.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-2.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-2a.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-3.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-3a.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-4.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-4a.c8
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-5.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59501-6.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59539-1.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59539-2.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59544.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59588-1.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59588-2.c7
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59591-1.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59591-2.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59625.c36
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59644.c42
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59789.c22
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-2.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-3.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-4.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-5.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-6.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59794-7.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59839.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59880.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59927.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr59929.c55
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60077-1.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60077-2.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60205-1.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60205-2.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60508.c31
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60516.c20
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60693.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60700.c59
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60868.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60901.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60902.c32
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60909-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr60909-2.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61423.c38
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61446.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61794.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61801.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61855.c10
-rw-r--r--gcc/testsuite/gcc.target/i386/pr61923.c36
-rw-r--r--gcc/testsuite/gcc.target/i386/pr63285.c28
-rw-r--r--gcc/testsuite/gcc.target/i386/pr63448.c120
-rw-r--r--gcc/testsuite/gcc.target/i386/pr63495.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/pr63563.c17
-rw-r--r--gcc/testsuite/gcc.target/i386/pr9771-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/prefetchw-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/prefetchwt1-1.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/rdseed16-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/rdseed32-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/rdseed64-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/readeflags-1.c40
-rw-r--r--gcc/testsuite/gcc.target/i386/recip-vec-divf.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/recip-vec-sqrtf.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/retarg.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-3.c18
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-3a.c24
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-4.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-4a.c34
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-5.c15
-rw-r--r--gcc/testsuite/gcc.target/i386/rotate-5a.c23
-rw-r--r--gcc/testsuite/gcc.target/i386/rtm-check.h32
-rw-r--r--gcc/testsuite/gcc.target/i386/rtm-xabort-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/rtm-xbegin-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/rtm-xend-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/rtm-xtest-1.c11
-rw-r--r--gcc/testsuite/gcc.target/i386/sha-check.h37
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1msg1-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1msg1-2.c42
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1msg2-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1msg2-2.c44
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1nexte-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1nexte-2.c36
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1rnds4-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha1rnds4-2.c93
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256msg1-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256msg1-2.c48
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256msg2-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256msg2-2.c49
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256rnds2-1.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sha256rnds2-2.c85
-rw-r--r--gcc/testsuite/gcc.target/i386/shuf-concat.c13
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-12.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-13.c207
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-14.c469
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-22.c457
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-23.c209
-rw-r--r--gcc/testsuite/gcc.target/i386/sse-5.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c3
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-movapd-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-movapd-2.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/sse2-pr57233.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c6
-rw-r--r--gcc/testsuite/gcc.target/i386/sse4_1-pmuldq.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-1.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-2.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/ssetype-5.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp3
-rw-r--r--gcc/testsuite/gcc.target/i386/sw-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/testimm-10.c192
-rw-r--r--gcc/testsuite/gcc.target/i386/testround-1.c507
-rw-r--r--gcc/testsuite/gcc.target/i386/testround-2.c57
-rw-r--r--gcc/testsuite/gcc.target/i386/vec-may_alias.c25
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-abs-s16.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-abs-s32.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-abs-s8.c14
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-cond-1.c21
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-div-1.c43
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-double-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-rebuild.c33
-rw-r--r--gcc/testsuite/gcc.target/i386/vect-sizes-1.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/vect8-ret.c2
-rw-r--r--gcc/testsuite/gcc.target/i386/writeeflags-1.c30
-rw-r--r--gcc/testsuite/gcc.target/i386/xop-frczX.c60
-rw-r--r--gcc/testsuite/gcc.target/i386/xop-imul64-vector.c1
-rw-r--r--gcc/testsuite/gcc.target/i386/xop-pr57233.c16
-rw-r--r--gcc/testsuite/gcc.target/i386/xorps-sse2.c4
-rw-r--r--gcc/testsuite/gcc.target/i386/xrstor-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/xrstor64-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/xsave-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/xsave64-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/xsaveopt-1.c12
-rw-r--r--gcc/testsuite/gcc.target/i386/xsaveopt64-1.c12
-rw-r--r--gcc/testsuite/gcc.target/ia64/ia64.exp2
-rw-r--r--gcc/testsuite/gcc.target/ia64/pr52731.c19
-rw-r--r--gcc/testsuite/gcc.target/m68k/m68k.exp2
-rw-r--r--gcc/testsuite/gcc.target/m68k/pr36134.c9
-rw-r--r--gcc/testsuite/gcc.target/m68k/pr52573.c157
-rw-r--r--gcc/testsuite/gcc.target/m68k/pr54041.c10
-rw-r--r--gcc/testsuite/gcc.target/m68k/stack-limit-1.c6
-rw-r--r--gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c9
-rw-r--r--gcc/testsuite/gcc.target/microblaze/microblaze.exp8
-rw-r--r--gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c8
-rw-r--r--gcc/testsuite/gcc.target/microblaze/others/mem_reload.c74
-rw-r--r--gcc/testsuite/gcc.target/mips/20020620-1.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-eabi32-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-eabi32-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-eabi64-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-eabi64-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long32-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long32-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long64-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long64-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n32-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long32-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long32-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long64-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long64-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-n64-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long32-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long32-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long64-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long64-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o32-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long32-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long32-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long32.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long64-no-shared.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long64-pic.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/abi-o64-long64.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/args-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/asm-1.c1
-rw-r--r--gcc/testsuite/gcc.target/mips/atomic-memory-2.c9
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-10.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-11.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-12.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-13.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-8.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-9.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-cost-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/branch-cost-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-2.c9
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-3.c14
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-4.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-5.c20
-rw-r--r--gcc/testsuite/gcc.target/mips/bswap-6.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/cache-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/call-1.c25
-rw-r--r--gcc/testsuite/gcc.target/mips/call-2.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/call-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/call-4.c9
-rw-r--r--gcc/testsuite/gcc.target/mips/call-5.c51
-rw-r--r--gcc/testsuite/gcc.target/mips/call-6.c50
-rw-r--r--gcc/testsuite/gcc.target/mips/call-saved-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/call-saved-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/clear-cache-1.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/clear-cache-2.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-1.c33
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-2.c32
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-3.c32
-rw-r--r--gcc/testsuite/gcc.target/mips/code-readable-4.c51
-rw-r--r--gcc/testsuite/gcc.target/mips/const-anchor-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/const-anchor-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/div-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-10.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-11.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-12.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-13.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/div-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-5.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-6.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-7.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/div-9.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/dse-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/dsp-ctrl.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/dsp-lhx.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/dsp-no-lhx.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/dspr2-MULT.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/dspr2-MULTU.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-1.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-2.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-3.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-4.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-7.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/ext-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/ext_ins.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/extend-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/extend-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fabs-2008.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fabs-legacy.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fabsf-2008.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fabsf-legacy.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-10.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-11.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-12.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-13.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-14.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-15.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-5.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-6.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-7.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r10000-9.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-10.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-11.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-12.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-7.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-8.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fix-r4000-9.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/fixed-scalar-type.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fixed-vector-type.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fneg-2008.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fneg-legacy.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fnegf-2008.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fnegf-legacy.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/fpcmp-1.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/fpcmp-2.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-4.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-7.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/fpr-moves-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/get-fcsr-1.c9
-rw-r--r--gcc/testsuite/gcc.target/mips/get-fcsr-2.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/ins-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/ins-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/int-moves-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/int-moves-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp2
-rw-r--r--gcc/testsuite/gcc.target/mips/interrupt_handler-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/interrupt_handler-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/lazy-binding-1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/long-calls-pg.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/loongson-shift-count-truncated-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/loongson3a-muldiv-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/loongson3a-muldiv-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-7.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-8.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/madd-9.c9
-rw-r--r--gcc/testsuite/gcc.target/mips/maddu-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/maddu-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/maddu-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/maddu-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/memcpy-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-5.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-6.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-7.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-3d-9.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-nonpic/README2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-5.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-6.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-7.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-type-2.c31
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-ps-type.c29
-rw-r--r--gcc/testsuite/gcc.target/mips/mips-sched-madd.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mips.exp64
-rw-r--r--gcc/testsuite/gcc.target/mips/mips16-attributes-5.c22
-rw-r--r--gcc/testsuite/gcc.target/mips/mips16-attributes-6.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/mips16e-extends.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-1.c22
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-2.c23
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp-run.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp-type.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dsp.c200
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32-dspr2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/mips64-dsp-ldx.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mmcount-ra-address-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/mmcount-ra-address-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mmcount-ra-address-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-2.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/movcc-3.c19
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-7.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msub-8.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-2.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/msubu-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mulsize-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/mulsize-2.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/mulsize-3.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/mulsize-4.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-1.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-10.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-11.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-12.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-13.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-14.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-15.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-16.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-17.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-18.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-19.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-7.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-8.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/mult-9.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/nan-2008.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nan-legacy.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nanf-2008.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nanf-legacy.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nans-2008.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nans-legacy.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nansf-2008.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/nansf-legacy.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/near-far-3.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/near-far-4.c6
-rw-r--r--gcc/testsuite/gcc.target/mips/neg-abs-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/neg-abs-2.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/nmadd-1.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/nmadd-2.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/nmadd-3.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/no-dsp-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/nor.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-baddu-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-bbit-1.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-bbit-2.c24
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-bbit-3.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-cins-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-cins-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-dmul-2.c1
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-dmul-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-4.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-exts-7.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-pipe-1.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-pop-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-pop-2.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-seq-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon-seq-4.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon2-lx-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon2-lx-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon2-lx-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c5
-rw-r--r--gcc/testsuite/gcc.target/mips/pr26765.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr33256.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr33635-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr33755.c1
-rw-r--r--gcc/testsuite/gcc.target/mips/pr35802.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr37362.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr45074.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/pr52125.c20
-rw-r--r--gcc/testsuite/gcc.target/mips/pr54240.c28
-rw-r--r--gcc/testsuite/gcc.target/mips/pr55315.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/pr56524.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/pr59137.c34
-rw-r--r--gcc/testsuite/gcc.target/mips/pr59317.c83
-rw-r--r--gcc/testsuite/gcc.target/mips/pr62030-octeon.c50
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-1.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-2.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-3.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/rsqrt-4.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/save-restore-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/save-restore-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/save-restore-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/save-restore-4.c4
-rw-r--r--gcc/testsuite/gcc.target/mips/save-restore-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/sb1-1.c11
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/scc-4.c7
-rw-r--r--gcc/testsuite/gcc.target/mips/sdata-1.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/sdata-2.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/sdata-3.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/sdata-4.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/set-fcsr-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/set-fcsr-2.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-lwxs.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-1.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-2.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-3.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/smartmips-ror-4.c2
-rw-r--r--gcc/testsuite/gcc.target/mips/soft-float-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/stack-1.c8
-rw-r--r--gcc/testsuite/gcc.target/mips/timode-1.c45
-rw-r--r--gcc/testsuite/gcc.target/mips/timode-2.c57
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-2.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-3.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-4.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-5.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-6.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/truncate-8.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-branch-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-branch-2.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-branch-3.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-branch-4.c12
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-constraints-1.c14
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-constraints-2.c14
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-1.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-2.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-3.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-4.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-5.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-6.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-7.c41
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-8.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c42
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-movep-1.c16
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-movep-2.c13
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-1.c18
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-2.c16
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-save-restore-3.c14
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-1.c10
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-2.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-3.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-4.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-5.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-6.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/umips-swp-7.c17
-rw-r--r--gcc/testsuite/gcc.target/mips/unaligned-1.c45
-rw-r--r--gcc/testsuite/gcc.target/mips/vr-mult-1.c3
-rw-r--r--gcc/testsuite/gcc.target/mips/vr-mult-2.c3
-rw-r--r--gcc/testsuite/gcc.target/nds32/basic-main.c9
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-isb.c11
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-isync.c12
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-mfsr-mtsr.c17
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-mfusr-mtusr.c17
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-setgie-dis.c11
-rw-r--r--gcc/testsuite/gcc.target/nds32/builtin-setgie-en.c11
-rw-r--r--gcc/testsuite/gcc.target/nds32/nds32.exp45
-rw-r--r--gcc/testsuite/gcc.target/nios2/biggot-1.c67
-rw-r--r--gcc/testsuite/gcc.target/nios2/biggot-2.c68
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-1.c22
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-2.c26
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-3.c26
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-4.c29
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-5.c26
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-6.c30
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-7.c33
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-8.c24
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-cmp-1.c53
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-conversion.c66
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-double.c86
-rw-r--r--gcc/testsuite/gcc.target/nios2/custom-fp-float.c80
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-ashlsi3-one_shift.c10
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-builtin-custom.c9
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-builtin-io.c26
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-cache-1.c21
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-cache-2.c21
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-custom-1.c64
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-custom-2.c7
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-int-types.c34
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-mul-options-1.c11
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-mul-options-2.c11
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-mul-options-3.c11
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-mul-options-4.c11
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-nor.c8
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-rdctl.c8
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c14
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-stack-check-1.c9
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-stack-check-2.c9
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-stxio.c25
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-trap-insn.c7
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-wrctl-not-zero.c7
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-wrctl-zero.c7
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2-wrctl.c7
-rw-r--r--gcc/testsuite/gcc.target/nios2/nios2.exp41
-rw-r--r--gcc/testsuite/gcc.target/powerpc/20020118-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/405-dlmzb-strlen-1.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/440-dlmzb-strlen-1.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-20.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-6.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-consts.c163
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-perm-3.c23
-rw-r--r--gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/atomic-p7.c207
-rw-r--r--gcc/testsuite/gcc.target/powerpc/atomic-p8.c237
-rw-r--r--gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bcd-1.c27
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bcd-2.c44
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bcd-3.c103
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool2-av.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool2-p5.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool2-p7.c31
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool2-p8.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool2.h29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-av.c37
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-p7.c37
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3-p8.c36
-rw-r--r--gcc/testsuite/gcc.target/powerpc/bool3.h186
-rw-r--r--gcc/testsuite/gcc.target/powerpc/crypto-builtin-1.c130
-rw-r--r--gcc/testsuite/gcc.target/powerpc/darwin-longlong.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfmode_off.c47
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp-builtin-1.c88
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp-builtin-2.c88
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp-dd-2.c26
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp-td-2.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dfp-td-3.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/dimode_off.c50
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-double1.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-double2.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-float1.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-float2.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-long1.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-long2.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/direct-move.h188
-rw-r--r--gcc/testsuite/gcc.target/powerpc/e500-ord-1.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/e500-ord-2.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/e500-unord-1.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/e500-unord-2.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/extend-divide-1.c34
-rw-r--r--gcc/testsuite/gcc.target/powerpc/extend-divide-2.c34
-rw-r--r--gcc/testsuite/gcc.target/powerpc/fusion.c24
-rw-r--r--gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c51
-rw-r--r--gcc/testsuite/gcc.target/powerpc/htm-ttest.c14
-rw-r--r--gcc/testsuite/gcc.target/powerpc/htm-xl-intrin-1.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c253
-rw-r--r--gcc/testsuite/gcc.target/powerpc/loop_align.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/medium_offset.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/mmfpgpr.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/no-r11-1.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/no-r11-2.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/no-r11-3.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-1.c65
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-2.c204
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-3.c104
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-4.c249
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-5.c105
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-6.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-builtin-7.c32
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-fp.c139
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-int128-1.c85
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-int128-2.c177
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c42
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vbpermq.c27
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-1.c200
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c30
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-3.c29
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-4.c69
-rw-r--r--gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-5.c87
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pack01.c91
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pack02.c96
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pack03.c88
-rw-r--r--gcc/testsuite/gcc.target/powerpc/powerpc.exp13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-eabi.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-get-timebase.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-mftb.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c33
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-pow.c7
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-target-1.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-target-2.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c8
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c30
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c9
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr16458-1.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr16458-2.c18
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr16458-3.c41
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr16458-4.c44
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr42747.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr43154.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-1.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-10.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-11.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-13.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-14.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-15.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-2.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-3.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-4.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-5.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-7.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr46728-8.c5
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr47197.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr48258-1.c1
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr48258-2.c15
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr51623.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr53487.c27
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr54009.c43
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr54240.c27
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr55033.c23
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr56256.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr56605.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr57150.c23
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr57363.c19
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr57744.c39
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr57949-1.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr57949-2.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr58330.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr58673-1.c78
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr58673-2.c217
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr59054.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60032.c13
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60102.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60137.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60203.c40
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60676.c128
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr60735.c11
-rw-r--r--gcc/testsuite/gcc.target/powerpc/pr63335.c30
-rw-r--r--gcc/testsuite/gcc.target/powerpc/quad-atomic.c67
-rw-r--r--gcc/testsuite/gcc.target/powerpc/recip-1.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/recip-3.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/recip-4.c4
-rw-r--r--gcc/testsuite/gcc.target/powerpc/recip-5.c12
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rs6000-ldouble-3.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rs6000-power2-1.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/rs6000-power2-2.c22
-rw-r--r--gcc/testsuite/gcc.target/powerpc/savres.c1228
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sd-pwr6.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/sd-vsx.c21
-rw-r--r--gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c3
-rw-r--r--gcc/testsuite/gcc.target/powerpc/tfmode_off.c52
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ti_math1.c20
-rw-r--r--gcc/testsuite/gcc.target/powerpc/ti_math2.c73
-rw-r--r--gcc/testsuite/gcc.target/powerpc/timode_off.c57
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c6
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c2
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-extract-1.c10
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-extract-2.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-extract-3.c17
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-float0.c16
-rw-r--r--gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c104
-rw-r--r--gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c14
-rw-r--r--gcc/testsuite/gcc.target/rx/rx.exp2
-rw-r--r--gcc/testsuite/gcc.target/s390/20030123-1.c2
-rw-r--r--gcc/testsuite/gcc.target/s390/20140327-1.c10
-rw-r--r--gcc/testsuite/gcc.target/s390/fp2int1.c95
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-1.c20
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-10.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-11.c20
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-12.c20
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-2.c20
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-3.c20
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-4.c26
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-5.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-6.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-7.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-8.c28
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-9.c21
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c27
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c27
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c27
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c11
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c28
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c11
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c68
-rw-r--r--gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c23
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-1.c1073
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-2.c682
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c164
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-compile-2.c12
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c37
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-nofloat-1.c50
-rw-r--r--gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c12
-rw-r--r--gcc/testsuite/gcc.target/s390/nearestint-1.c48
-rw-r--r--gcc/testsuite/gcc.target/s390/pr55718.c29
-rw-r--r--gcc/testsuite/gcc.target/s390/pr57559.c24
-rw-r--r--gcc/testsuite/gcc.target/s390/pr57960.c30
-rw-r--r--gcc/testsuite/gcc.target/s390/s390.exp15
-rw-r--r--gcc/testsuite/gcc.target/sh/20080410-1.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/attr-isr-nosave_low_regs.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/attr-isr-trap_exit.c31
-rw-r--r--gcc/testsuite/gcc.target/sh/attr-isr-trapa.c18
-rw-r--r--gcc/testsuite/gcc.target/sh/cmpstr.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/cmpstrn.c28
-rw-r--r--gcc/testsuite/gcc.target/sh/fpul-usage-1.c24
-rw-r--r--gcc/testsuite/gcc.target/sh/mfmovd.c11
-rw-r--r--gcc/testsuite/gcc.target/sh/pr21255-1.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr21255-2-mb.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr21255-2-ml.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr21255-3.c3
-rw-r--r--gcc/testsuite/gcc.target/sh/pr33135-1.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/pr33135-2.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/pr33135-3.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/pr33135-4.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/pr39423-1.c48
-rw-r--r--gcc/testsuite/gcc.target/sh/pr39423-2.c14
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49263.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49468-di.c23
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49468-si.c3
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49880-1.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49880-2.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49880-3.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49880-4.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr49880-5.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-1.c34
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-2.c70
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-3.c40
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-4.c46
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-1.c28
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-2.c58
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-3.c37
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-4.c43
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-1.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-2.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-3.c17
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-4.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-predec-1.c13
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-predec-2.c23
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-predec-3.c16
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50749-sf-predec-4.c18
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-1.c30
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-2.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-3.c26
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-4.c30
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-5.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-6.c26
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-7.c35
-rw-r--r--gcc/testsuite/gcc.target/sh/pr50751-8.c100
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-1.c32
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-10.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-11.c24
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-12.c68
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-13.c85
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-14.c107
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-15.c71
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-16.c11
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-17.c297
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-18.c102
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-19.c75
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-2.c18
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-20-sh2a.c14
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-20.c103
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-3.c16
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-4.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-5.c50
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-6.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-7.c26
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-8.c27
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51244-9.c35
-rw-r--r--gcc/testsuite/gcc.target/sh/pr51697.c21
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52483-1.c54
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52483-2.c110
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52483-3.c43
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52483-4.c18
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52483-5.c28
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52933-1.c168
-rw-r--r--gcc/testsuite/gcc.target/sh/pr52933-2.c12
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53511-1.c14
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53512-1.c26
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53512-2.c26
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53512-3.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53512-4.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53568-1.c82
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53976-1.c41
-rw-r--r--gcc/testsuite/gcc.target/sh/pr53988.c74
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-1.c174
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-2.c22
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-3.c40
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-4.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-5.c14
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-6.c36
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-7.c63
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-8.c203
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54089-9.c63
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54236-1.c83
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54236-2.c270
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54386.c41
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54602-1.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54602-2.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54602-3.c12
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54602-4.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54680.c66
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54685.c58
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54760-1.c20
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54760-2.c259
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54760-3.c69
-rw-r--r--gcc/testsuite/gcc.target/sh/pr54760-4.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/pr55146.c50
-rw-r--r--gcc/testsuite/gcc.target/sh/pr55160.c25
-rw-r--r--gcc/testsuite/gcc.target/sh/pr55303-1.c87
-rw-r--r--gcc/testsuite/gcc.target/sh/pr55303-2.c35
-rw-r--r--gcc/testsuite/gcc.target/sh/pr55303-3.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/pr56547-1.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/pr56547-2.c18
-rw-r--r--gcc/testsuite/gcc.target/sh/pr61996.c12
-rw-r--r--gcc/testsuite/gcc.target/sh/pr6526.c64
-rw-r--r--gcc/testsuite/gcc.target/sh/pragma-isr-nosave_low_regs.c23
-rw-r--r--gcc/testsuite/gcc.target/sh/pragma-isr-trap-exit.c24
-rw-r--r--gcc/testsuite/gcc.target/sh/pragma-isr-trapa.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/pragma-isr-trapa2.c24
-rw-r--r--gcc/testsuite/gcc.target/sh/prefetch.c35
-rw-r--r--gcc/testsuite/gcc.target/sh/rte-delay-slot.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh.exp2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-band.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bclr.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bclrmem.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bld.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bor.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bset.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bsetmem.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-bxor.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-jsrn.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-movi20s.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-movrt.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-prefetch.c34
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-resbank.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-rtsn.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c30
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-cos.c11
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-cosf.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-fprun.c28
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-fsrra.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-sin.c11
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-sincos.c12
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-sincosf.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sh4a-sinf.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/sp-switch.c10
-rw-r--r--gcc/testsuite/gcc.target/sh/strlen.c19
-rw-r--r--gcc/testsuite/gcc.target/sh/struct-arg-dw2.c2
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pr30807.c218
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pr34777.c30
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pr58314.c102
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pr58475.c15
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pragma-isr.c20
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/pragma-isr2.c21
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/sh-torture.exp41
-rw-r--r--gcc/testsuite/gcc.target/sh/torture/strncmp.c22
-rw-r--r--gcc/testsuite/gcc.target/sparc/bmaskbshuf.c3
-rw-r--r--gcc/testsuite/gcc.target/sparc/pdistn-2.c16
-rw-r--r--gcc/testsuite/gcc.target/sparc/pdistn.c10
-rw-r--r--gcc/testsuite/gcc.target/sparc/setcc-4.c44
-rw-r--r--gcc/testsuite/gcc.target/sparc/setcc-5.c42
-rw-r--r--gcc/testsuite/gcc.target/sparc/sparc-constant-1.c2
-rw-r--r--gcc/testsuite/gcc.target/sparc/sparc.exp2
-rw-r--r--gcc/testsuite/gcc.target/sparc/struct-ret-check.c2
-rw-r--r--gcc/testsuite/gcc.target/spu/ea/ea.exp2
-rw-r--r--gcc/testsuite/gcc.target/spu/spu.exp2
-rw-r--r--gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp2
-rw-r--r--gcc/testsuite/gcc.target/tic6x/tic6x.exp2
-rw-r--r--gcc/testsuite/gcc.target/vax/pr56875.c13
-rw-r--r--gcc/testsuite/gcc.target/vax/vax.exp41
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/README.gcc2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp18
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c6
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp53
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/args.h184
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S98
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h41
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_m512_returning.c32
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c168
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_structs.c65
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_unions.c180
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/test_passing_unions.c2
-rw-r--r--gcc/testsuite/gcc.target/x86_64/abi/test_struct_returning.c2
-rw-r--r--gcc/testsuite/gcc.target/xstormy16/xstormy16.exp2
-rw-r--r--gcc/testsuite/gcc.test-framework/README2
-rwxr-xr-xgcc/testsuite/gcc.test-framework/gen_directive_tests2
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.awk3
-rw-r--r--gcc/testsuite/gcc.test-framework/test-framework.exp3
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_2.f031
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_4.f031
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_5.f031
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_6.f033
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_7.f031
-rw-r--r--gcc/testsuite/gfortran.dg/abstract_type_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/access_spec_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/access_spec_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/access_spec_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/actual_array_constructor_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/actual_array_result_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/actual_array_vect_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/actual_procedure_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/aint_anint_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/aliasing_array_result_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/aliasing_dummy_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_assign_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_basics_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_basics_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_basics_6.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_class_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_constraint_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_initializer_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/alloc_comp_result_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_function_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_function_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_function_6.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_function_7.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_function_8.f9059
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_module_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/allocatable_scalar_9.f905
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_class_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_class_2.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_class_3.f90107
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_derived_1.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_stat.f901
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_source_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_source_3.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_source_4.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_typespec_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_5.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_7.f905
-rw-r--r--gcc/testsuite/gfortran.dg/altreturn_8.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/ambiguous_reference_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/ambiguous_reference_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/ambiguous_specific_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/ambiguous_specific_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/argument_checking_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/argument_checking_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/array_5.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/array_assignment_5.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_18.f901
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_20.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_21.f901
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_26.f032
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_38.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_39.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_40.f9052
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_41.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_42.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_43.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_44.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_45.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_46.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_47.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_48.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_49.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_type_14.f032
-rw-r--r--gcc/testsuite/gfortran.dg/array_constructor_type_15.f032
-rw-r--r--gcc/testsuite/gfortran.dg/array_function_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_function_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/array_memset_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/array_temporaries_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_13.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_14.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_15.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/arrayio_16.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/assignment_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assignment_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assignment_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assignment_4.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/associate_11.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/associate_12.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/associate_13.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/associate_14.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/associate_15.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/associate_16.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/associate_17.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/associate_6.f031
-rw-r--r--gcc/testsuite/gfortran.dg/associate_9.f031
-rw-r--r--gcc/testsuite/gfortran.dg/associated_6.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/associated_7.f909
-rw-r--r--gcc/testsuite/gfortran.dg/associated_target_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/associated_target_5.f0340
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_dummy_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_1.f90145
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_10.f90106
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_11.f9052
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_12.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_13.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_1_c.c16
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_2.f90135
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_3.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_4.f9050
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_5.f909
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_6.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_7.f9064
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_8.f9071
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_8_c.c25
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_9.f90139
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_bounds_1.f90143
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_rank_bounds_2.f90112
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_shape_ranks_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_size_1.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_size_dt_dummy.f902
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_1.f9054
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_2.f90178
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_3.f90119
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_4.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_5.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_6.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_7.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/assumed_type_8.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/asynchronous_4.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/auto_char_len_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/auto_char_len_4.f906
-rw-r--r--gcc/testsuite/gfortran.dg/auto_dealloc_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/auto_dealloc_2.f906
-rw-r--r--gcc/testsuite/gfortran.dg/automatic_default_init_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/automatic_module_variable.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bad_automatic_objects_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bessel_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_array_params.f035
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_array_params_2.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_bool_1.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_coms.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_dts.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_dts_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_dts_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_dts_4.f033
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_dts_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_implicit_vars.f033
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_module.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_procs.f033
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_procs_2.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_13.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_16.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_18.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_21.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_24.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_25.f9058
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_26.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_27.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_28.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_usage_8.f033
-rw-r--r--gcc/testsuite/gfortran.dg/bind_c_vars.f902
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests.f032
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_10.f033
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_10_main.f037
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_11.f033
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_11_main.f037
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_13.f031
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f037
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_16.f031
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_17.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_18.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_19.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_20.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_21.f908
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_22.f908
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_23.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_24.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_25.f9061
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_26a.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_26b.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_3.f034
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_4.f034
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_5.f034
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_6.f034
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_7.f036
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_8.f034
-rw-r--r--gcc/testsuite/gfortran.dg/binding_label_tests_9.f032
-rw-r--r--gcc/testsuite/gfortran.dg/block_11.f9066
-rw-r--r--gcc/testsuite/gfortran.dg/blockdata_7.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/blockdata_8.f9048
-rw-r--r--gcc/testsuite/gfortran.dg/bound_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/bound_simplification_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_17.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_18.f909
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_fail_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/bounds_check_strlen_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_assoc.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_assoc_2.f038
-rw-r--r--gcc/testsuite/gfortran.dg/c_assoc_4.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/c_assoc_5.f9069
-rw-r--r--gcc/testsuite/gfortran.dg/c_by_val_5.f904
-rw-r--r--gcc/testsuite/gfortran.dg/c_char_tests.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_complex.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_logical.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f909
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f034
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests_5.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests_7.f909
-rw-r--r--gcc/testsuite/gfortran.dg/c_f_pointer_tests_8.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_2.f036
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_5.f035
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_6.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_7.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/c_funloc_tests_8.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/c_kind_params.f901
-rw-r--r--gcc/testsuite/gfortran.dg/c_kind_tests_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test.f901
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_17.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_18.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_19.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_20.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_21.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_test_22.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_10.f033
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_11.f0310
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_12.f033
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_16.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_17.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_2.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_4.f034
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_5.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_6.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_7.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_loc_tests_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_11.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_12.f033
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_13.f034
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_14.f907
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_15.f907
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_7.f031
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c2
-rw-r--r--gcc/testsuite/gfortran.dg/c_ptr_tests_9.f036
-rw-r--r--gcc/testsuite/gfortran.dg/c_size_t_test.f032
-rw-r--r--gcc/testsuite/gfortran.dg/c_sizeof_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/c_sizeof_5.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/char_array_constructor.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_array_constructor_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/char_array_structure_constructor.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_19.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/char_length_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_result_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_result_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/char_result_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/character_assign_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/character_comparison_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/character_comparison_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/character_comparison_9.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/class_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_13.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_14.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_15.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_16.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_17.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_19.f034
-rw-r--r--gcc/testsuite/gfortran.dg/class_21.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_22.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_25.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_26.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_27.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_28.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_29.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_30.f901
-rw-r--r--gcc/testsuite/gfortran.dg/class_32.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_33.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_34.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_35.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_37.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_39.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_40.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_41.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_42.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_45a.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_45b.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_46.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_47.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_4a.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_4b.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_4c.f033
-rw-r--r--gcc/testsuite/gfortran.dg/class_5.f033
-rw-r--r--gcc/testsuite/gfortran.dg/class_51.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/class_52.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/class_53.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/class_54.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/class_56.f901
-rw-r--r--gcc/testsuite/gfortran.dg/class_57.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/class_7.f033
-rw-r--r--gcc/testsuite/gfortran.dg/class_9.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_11.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_14.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_15.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_16.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_allocate_9.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_13.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_14.f9053
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_15.f03119
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_16.f9071
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_17.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_18.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_19.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_4.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_5.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_6.f031
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_7.f033
-rw-r--r--gcc/testsuite/gfortran.dg/class_array_9.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_defined_operator_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_dummy_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_dummy_4.f0344
-rw-r--r--gcc/testsuite/gfortran.dg/class_nameclash.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/class_optional_1.f90175
-rw-r--r--gcc/testsuite/gfortran.dg/class_optional_2.f90800
-rw-r--r--gcc/testsuite/gfortran.dg/class_result_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/class_result_2.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/class_to_type_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/caf.exp5
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/lib_realloc_1.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/move_alloc_1.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/registering_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray/sync_3.f9075
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_14.f904
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_19.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_21.f903
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_27.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_29_1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_29_2.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_30.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_31.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_6.f904
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_8.f904
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_allocate_1.f9095
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_args_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_class_1.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_alloc_3.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_move_alloc_1.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_realloc_1.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_token_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lib_token_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lock_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_lock_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/coarray_poly_3.f908
-rw-r--r--gcc/testsuite/gfortran.dg/com_block_driver.f902
-rw-r--r--gcc/testsuite/gfortran.dg/common_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/common_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/common_17.f901
-rw-r--r--gcc/testsuite/gfortran.dg/common_18.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/common_19.f909
-rw-r--r--gcc/testsuite/gfortran.dg/common_20.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/common_21.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/complex_intrinsic_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/constructor_9.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/contained_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/contained_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/contained_module_proc_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/contains_empty_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/contiguous_1.f904
-rw-r--r--gcc/testsuite/gfortran.dg/continuation_9.f906
-rw-r--r--gcc/testsuite/gfortran.dg/convert_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/cray_pointers_10.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/cray_pointers_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/cray_pointers_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/data_constraints_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/data_constraints_3.f908
-rw-r--r--gcc/testsuite/gfortran.dg/data_namelist_conflict.f901
-rw-r--r--gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/debug/debug.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f2
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_denormal_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/default_format_denormal_2.f905
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/default_initialization_7.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_component_1.f9060
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_component_2.f9060
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_3.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_4.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_5.f9051
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_6.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_8.f9054
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_param_9.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_1.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_2.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_1.f9090
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_10.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_11.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_2.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_3.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_4.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_5.f9076
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_6.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_7.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_8.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/defined_assignment_9.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/defined_operators_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_19.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_23.f903
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_24.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_25.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_26.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_28.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_34.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_35.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_36.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_37.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_39.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_41.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_42.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_43.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/dependency_44.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/der_charlen_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/der_io_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/der_io_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/der_pointer_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/der_pointer_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/der_pointer_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/derived_comp_array_ref_8.f908
-rw-r--r--gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_constructor_comps_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_external_function_1.f9027
-rw-r--r--gcc/testsuite/gfortran.dg/derived_function_interface_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_init_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/derived_pointer_recursion.f902
-rw-r--r--gcc/testsuite/gfortran.dg/derived_pointer_recursion_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/derived_recursion.f902
-rw-r--r--gcc/testsuite/gfortran.dg/derived_sub.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dg.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/do_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/do_3.F902
-rw-r--r--gcc/testsuite/gfortran.dg/do_5.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_10.f907
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_6.f9084
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_7.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_8.f9059
-rw-r--r--gcc/testsuite/gfortran.dg/do_check_9.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/do_concurrent_3.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/dollar_sym_1.f906
-rw-r--r--gcc/testsuite/gfortran.dg/dollar_sym_3.f10
-rw-r--r--gcc/testsuite/gfortran.dg/dot_product_2.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/dot_product_3.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_functions_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_10.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_8.f9088
-rw-r--r--gcc/testsuite/gfortran.dg/dummy_procedure_9.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f031
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_11.f033
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f031
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_8.f033
-rw-r--r--gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f033
-rw-r--r--gcc/testsuite/gfortran.dg/edit_real_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_args_check_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_args_check_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_args_check_7.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_by_value_1.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_dependency_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_initializer_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_non_intrinsic_dummy_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_optional_args_5.f03160
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_optional_args_6.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_pointer_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_result_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_10.f9068
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_8.f9050
-rw-r--r--gcc/testsuite/gfortran.dg/elemental_subroutine_9.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/empty_derived_type.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/entry_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/entry_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_16.f901
-rw-r--r--gcc/testsuite/gfortran.dg/entry_18.f901
-rw-r--r--gcc/testsuite/gfortran.dg/entry_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_7.f903
-rw-r--r--gcc/testsuite/gfortran.dg/entry_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/entry_dummy_ref_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/enum_10.f904
-rw-r--r--gcc/testsuite/gfortran.dg/enum_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/eof_4.f90130
-rw-r--r--gcc/testsuite/gfortran.dg/eof_5.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/equiv_constraint_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/equiv_constraint_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/erf_3.F9054
-rw-r--r--gcc/testsuite/gfortran.dg/error_recovery_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/extends_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_13.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_14.f033
-rw-r--r--gcc/testsuite/gfortran.dg/extends_15.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/extends_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/extends_8.f031
-rw-r--r--gcc/testsuite/gfortran.dg/extends_9.f031
-rw-r--r--gcc/testsuite/gfortran.dg/external_procedures_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_1.f082
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_10.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_11.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_12.f90175
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_13.f90161
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_14.f90220
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_15.f90238
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_16.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_17.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_18.f9047
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_19.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_21.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_22.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_23.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_24.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_25.f9055
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_4.f035
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_5.f035
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_6.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_7.f035
-rw-r--r--gcc/testsuite/gfortran.dg/finalize_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/fmt_en.f90186
-rw-r--r--gcc/testsuite/gfortran.dg/fmt_g_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/forall_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/forall_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/fraction.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/func_assign.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_assign_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/func_derived_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_derived_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_derived_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_derived_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_derived_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/func_result_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/function_charlen_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_charlen_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_kinds_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_kinds_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/function_kinds_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/function_kinds_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_optimize_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/function_optimize_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_types_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_types_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/function_types_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/g77/19990826-3.f2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/20020307-1.f2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/980310-3.f4
-rw-r--r--gcc/testsuite/gfortran.dg/g77/README2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/cabs.f1
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f2
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-t-out.f4
-rw-r--r--gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f2
-rw-r--r--gcc/testsuite/gfortran.dg/generic_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_11.f903
-rw-r--r--gcc/testsuite/gfortran.dg/generic_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_13.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_15.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_16.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_17.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_18.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_19.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_20.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_21.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_22.f031
-rw-r--r--gcc/testsuite/gfortran.dg/generic_23.f032
-rw-r--r--gcc/testsuite/gfortran.dg/generic_24.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_25.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/generic_26.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/generic_27.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/generic_28.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/generic_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/generic_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_actual_arg.f901
-rw-r--r--gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/global_references_1.f906
-rw-r--r--gcc/testsuite/gfortran.dg/global_vars_c_init.f902
-rw-r--r--gcc/testsuite/gfortran.dg/global_vars_f90_init.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/affinity-1.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/allocatable_components_1.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.11.2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.26.2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/associate1.f9083
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/declare-simd-1.f909
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/depend-1.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/gomp.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/intentin1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/omp_do_concurrent.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/omp_threadprivate1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/openmp-simd-1.f90137
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr35786-1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr57089.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr59467.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr59488-1.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr59488-2.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/pr62131.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/proc_ptr_1.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/proc_ptr_2.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/reduction1.f9068
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/reduction3.f909
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/target1.f90520
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/target2.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/target3.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr1.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr2.f9053
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr3.f9075
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr4.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr5.f9059
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr6.f90205
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr7.f9090
-rw-r--r--gcc/testsuite/gfortran.dg/gomp/udr8.f90351
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/graphite.exp2
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-18.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-21.f2
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/id-4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr37980.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr38953.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr40982.f902
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr41924.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42050.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42180.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42181.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42185.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42186.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42393-1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr42393.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr45758.f901
-rw-r--r--gcc/testsuite/gfortran.dg/graphite/pr59817.f14
-rw-r--r--gcc/testsuite/gfortran.dg/guality/guality.exp8
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_call_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_function_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_types_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_types_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_assoc_variable_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/host_used_types_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/ichar_3.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_actual.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_class_1.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_derived_type_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_pure_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_pure_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/implicit_pure_4.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/import.f901
-rw-r--r--gcc/testsuite/gfortran.dg/import2.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/import4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/import5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/import6.f903
-rw-r--r--gcc/testsuite/gfortran.dg/import7.f903
-rw-r--r--gcc/testsuite/gfortran.dg/impure_1.f082
-rw-r--r--gcc/testsuite/gfortran.dg/impure_2.f082
-rw-r--r--gcc/testsuite/gfortran.dg/impure_actual_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/impure_assignment_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/impure_assignment_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/impure_constructor_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/impure_spec_expr_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/include_3.f951
-rw-r--r--gcc/testsuite/gfortran.dg/include_6.f905
-rw-r--r--gcc/testsuite/gfortran.dg/include_7.f905
-rw-r--r--gcc/testsuite/gfortran.dg/include_8.f906
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_11.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/init_flag_12.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_19.f902
-rw-r--r--gcc/testsuite/gfortran.dg/initialization_23.f903
-rw-r--r--gcc/testsuite/gfortran.dg/inline_sum_5.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/inquire_10.f903
-rw-r--r--gcc/testsuite/gfortran.dg/inquire_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/inquire_15.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/inquire_16.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/int_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/int_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/int_range_io_1.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_3.F902
-rw-r--r--gcc/testsuite/gfortran.dg/integer_exponentiation_5.F902
-rw-r--r--gcc/testsuite/gfortran.dg/intent_out_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/intent_out_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/intent_out_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/intent_out_7.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/intent_out_8.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/intent_used_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_16.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_17.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_19.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_20.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_21.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_22.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_23.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_24.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_25.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_26.f906
-rw-r--r--gcc/testsuite/gfortran.dg/interface_27.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_28.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_29.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_31.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_32.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_33.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_35.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_37.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/interface_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_9.f903
-rw-r--r--gcc/testsuite/gfortran.dg/interface_assignment_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_assignment_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_assignment_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_assignment_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/interface_derived_type_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interface_proc_end.f902
-rw-r--r--gcc/testsuite/gfortran.dg/internal_dummy_2.f082
-rw-r--r--gcc/testsuite/gfortran.dg/internal_dummy_3.f082
-rw-r--r--gcc/testsuite/gfortran.dg/internal_dummy_4.f081
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_pack_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_readwrite_3.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/internal_references_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/internal_references_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/interop_params.f031
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_actual_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_shadow_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_shadow_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_shadow_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/intrinsic_shadow_4.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/invalid_interface_assignment.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/io_constraints_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/io_err_1.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/io_real_boz_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_real_boz_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/io_real_boz_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/ipcp-array-1.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_compiler_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f034
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_only.f032
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_rename_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/iso_c_binding_rename_3.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/iso_fortran_env_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/iso_fortran_env_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/iso_fortran_env_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/kind_tests_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/kind_tests_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/large_integer_kind_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/large_real_kind_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/ldist-pr43023.f902
-rw-r--r--gcc/testsuite/gfortran.dg/ldist-pr45199.f2
-rw-r--r--gcc/testsuite/gfortran.dg/list_read_11.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/list_read_12.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/list_read_13.f13
-rw-r--r--gcc/testsuite/gfortran.dg/lto/20100222-1_0.f031
-rw-r--r--gcc/testsuite/gfortran.dg/lto/lto.exp12
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr40725_0.f032
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr45586-2_0.f902
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr45586_0.f902
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr47839_0.f902
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr60635_0.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/lto/pr60635_1.c14
-rw-r--r--gcc/testsuite/gfortran.dg/mapping_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/mapping_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/maxloc_bounds_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/maxloc_bounds_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/maxloc_bounds_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/merge_char_1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/merge_char_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/merge_init_expr_2.f9058
-rw-r--r--gcc/testsuite/gfortran.dg/min_max_conformance_2.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/minloc_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/minlocval_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/missing_derived_type_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/missing_optional_dummy_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/missing_optional_dummy_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/mod_large_1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/mod_sign0_1.f9054
-rw-r--r--gcc/testsuite/gfortran.dg/module_blank_common.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_commons_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_commons_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_commons_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_double_reuse.f903
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/module_equivalence_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_function_type_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/module_implicit_conversion.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_interface_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_interface_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_md5_1.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/module_naming_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_nan.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_parameter_array_refs_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_parameter_array_refs_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_private_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_private_array_refs_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_proc_external_dummy.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_procedure_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_procedure_double_colon_3.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/module_procedure_double_colon_4.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/module_read_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/module_read_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_variable_1.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/module_variable_2.f906
-rw-r--r--gcc/testsuite/gfortran.dg/module_widestring_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/module_write_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_14.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_4.f903
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/move_alloc_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/mvbits_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/mvbits_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/named_interface.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_33.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_34.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_36.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_40.f901
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_47.f901
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_52.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_62.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_75.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_77.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_78.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_79.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_81.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_82.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_83.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_83_2.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_84.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_print_1.f2
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_use.f902
-rw-r--r--gcc/testsuite/gfortran.dg/namelist_use_only.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nan_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nan_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/nested_forall_1.f1
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nested_modules_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/newunit_3.f907
-rw-r--r--gcc/testsuite/gfortran.dg/nint_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/no_arg_check_1.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/no_arg_check_2.f90153
-rw-r--r--gcc/testsuite/gfortran.dg/no_arg_check_3.f90124
-rw-r--r--gcc/testsuite/gfortran.dg/nosigned_zero_3.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/null_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/null_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/null_7.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/null_8.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/nullify_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/nullify_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/oldstyle_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/oldstyle_4.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/oldstyle_5.f8
-rw-r--r--gcc/testsuite/gfortran.dg/open_negative_unit_1.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/openmp-define-1.f907
-rw-r--r--gcc/testsuite/gfortran.dg/openmp-define-2.f907
-rw-r--r--gcc/testsuite/gfortran.dg/openmp-define-3.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/operator_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/operator_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/operator_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/operator_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/operator_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/operator_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/operator_c1202.f902
-rw-r--r--gcc/testsuite/gfortran.dg/optional_absent_3.f9083
-rw-r--r--gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/optional_class_1.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/optional_dim_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/overload_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/parameter_array_element_2.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/parameter_array_init_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/parameter_array_init_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/parameter_array_section_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/parens_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/parens_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/parent_result_ref_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_assign_10.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_assign_11.f9051
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_assign_8.f9046
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_assign_9.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_check_13.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_check_6.f903
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_check_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_comp_init_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_2.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_6.f904
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_7.f9056
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_init_8.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_intent_7.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/pointer_remapping_8.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/power_3.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/power_4.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/power_5.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/power_6.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/pr15164.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr16597.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr16861.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr17615.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr19926.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr20163-2.f1
-rw-r--r--gcc/testsuite/gfortran.dg/pr21177.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr25923.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr26246_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr32222.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr32238.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr32242.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr32535.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr32601.f037
-rw-r--r--gcc/testsuite/gfortran.dg/pr32601_1.f034
-rw-r--r--gcc/testsuite/gfortran.dg/pr32738.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr32921.f1
-rw-r--r--gcc/testsuite/gfortran.dg/pr33646.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr33794.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr36680.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/pr37243.f10
-rw-r--r--gcc/testsuite/gfortran.dg/pr37286.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr37287-1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr37287-2.F901
-rw-r--r--gcc/testsuite/gfortran.dg/pr41347.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr41928.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr42051.f032
-rw-r--r--gcc/testsuite/gfortran.dg/pr42119.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr42166.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr43505.f903
-rw-r--r--gcc/testsuite/gfortran.dg/pr43793.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr43866.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr43984.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pr45636.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr46519-2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr48636-2.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/pr48636.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/pr50875.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pr52370.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/pr52608.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/pr53217.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/pr53787.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/pr54131.f23
-rw-r--r--gcc/testsuite/gfortran.dg/pr54889.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/pr54967.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/pr55330.f9073
-rw-r--r--gcc/testsuite/gfortran.dg/pr57393-1.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/pr57393-2.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/pr57904.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/pr57987.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/pr58290.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/pr58484.f15
-rw-r--r--gcc/testsuite/gfortran.dg/pr58968.f96
-rw-r--r--gcc/testsuite/gfortran.dg/pr59440-1.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/pr59440-2.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/pr59440-3.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/pr59700.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/pr59706.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/present_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_13.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/private_type_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_assign_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_assign_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_18.f904
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_2.f908
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_20.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_23.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_27.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_28.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_29.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_decl_9.f906
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_11.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_15.f909
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_20.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_22.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_26.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_27.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_28.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_29.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_32.f904
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_33.f904
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_34.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_35.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_36.f9046
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_37.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_38.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_39.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_40.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_41.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_42.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_43.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_44.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_45.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_46.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_12.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f908
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_23.f901
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f906
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_31.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_32.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_33.f907
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_34.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_36.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_38.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_7.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_1.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_3.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_4.f908
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_6.f903
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_7.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/proc_ptr_result_8.f9069
-rw-r--r--gcc/testsuite/gfortran.dg/procedure_lvalue.f902
-rw-r--r--gcc/testsuite/gfortran.dg/promotion_2.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/protected_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/protected_8.f902
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module.f901
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_2.f9070
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_3.f9059
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_4.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_5.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_6.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_7.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/public_private_module_8.f9049
-rw-r--r--gcc/testsuite/gfortran.dg/pure_byref_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/pure_formal_3.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/pure_formal_proc_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/pure_initializer_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/quad_2.f904
-rw-r--r--gcc/testsuite/gfortran.dg/quad_3.f9031
-rw-r--r--gcc/testsuite/gfortran.dg/random_seed_3.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/read_float_4.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/read_repeat_2.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/read_x_eor.f902
-rw-r--r--gcc/testsuite/gfortran.dg/real_compare_1.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_14.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_16.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_17.f9047
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_18.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_19.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_20.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_21.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_22.f9013
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_23.f9030
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_24.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_4.f033
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_6.f033
-rw-r--r--gcc/testsuite/gfortran.dg/realloc_on_assign_9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_10.f17
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_11.f17
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_12.f9074
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_4.f3
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_7.f16
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_8.f17
-rw-r--r--gcc/testsuite/gfortran.dg/reassoc_9.f17
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_13.f901
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_check_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_interface_1.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_interface_2.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/recursive_reference_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f901
-rw-r--r--gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/repeat_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_5.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_6.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/reshape_zerosize_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/result_in_spec_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/result_in_spec_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/result_in_spec_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/round_1.f034
-rw-r--r--gcc/testsuite/gfortran.dg/round_3.f0841
-rw-r--r--gcc/testsuite/gfortran.dg/round_4.f90121
-rw-r--r--gcc/testsuite/gfortran.dg/same_name_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/same_name_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/same_type_as_1.f036
-rw-r--r--gcc/testsuite/gfortran.dg/save_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/save_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/save_5.f9052
-rw-r--r--gcc/testsuite/gfortran.dg/save_parameter.f902
-rw-r--r--gcc/testsuite/gfortran.dg/scan_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/scan_2.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/select_char_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_15.f033
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_16.f033
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_18.f032
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_26.f03110
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_27.f03115
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_28.f0336
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_30.f0329
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_31.f0352
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_32.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_33.f0343
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_34.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/select_type_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/sequence_types_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/shape_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/simplify_argN_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/size_kind_2.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/size_kind_3.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/sizeof_2.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/sizeof_3.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/sizeof_proc.f908
-rw-r--r--gcc/testsuite/gfortran.dg/spec_expr_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/spec_expr_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/specification_type_resolution_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/specification_type_resolution_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/spread_bounds_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/stfunc_5.f903
-rw-r--r--gcc/testsuite/gfortran.dg/stfunc_8.f909
-rw-r--r--gcc/testsuite/gfortran.dg/storage_size_2.f084
-rw-r--r--gcc/testsuite/gfortran.dg/storage_size_4.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/str_comp_optimize_1.f9022
-rw-r--r--gcc/testsuite/gfortran.dg/string_assign_1.f9011
-rw-r--r--gcc/testsuite/gfortran.dg/string_assign_2.f909
-rw-r--r--gcc/testsuite/gfortran.dg/string_compare_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/string_compare_4.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/string_length_2.f9032
-rw-r--r--gcc/testsuite/gfortran.dg/structure_constructor_10.f903
-rw-r--r--gcc/testsuite/gfortran.dg/structure_constructor_11.f9096
-rw-r--r--gcc/testsuite/gfortran.dg/structure_constructor_8.f031
-rw-r--r--gcc/testsuite/gfortran.dg/substr_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/substring_equivalence.f902
-rw-r--r--gcc/testsuite/gfortran.dg/tab_continuation.f8
-rw-r--r--gcc/testsuite/gfortran.dg/test_com_block.f902
-rw-r--r--gcc/testsuite/gfortran.dg/test_common_binding_labels.f0314
-rw-r--r--gcc/testsuite/gfortran.dg/test_common_binding_labels_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/test_common_binding_labels_2_main.f0314
-rw-r--r--gcc/testsuite/gfortran.dg/test_common_binding_labels_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/test_common_binding_labels_3_main.f037
-rw-r--r--gcc/testsuite/gfortran.dg/test_only_clause.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_assumed_size_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_check_4.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_class_2.f9045
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_resolve_2.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_resolve_3.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/transfer_resolve_4.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/transpose_2.f903
-rw-r--r--gcc/testsuite/gfortran.dg/transpose_4.f9078
-rw-r--r--gcc/testsuite/gfortran.dg/transpose_optimization_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/transpose_optimization_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/trim_optimize_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/trim_optimize_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/type_decl_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_4.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_5.f0344
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_6.f0343
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_assignment_7.f9066
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_10.f033
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_11.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_12.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_13.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_14.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_15.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_16.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_17.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_18.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_19.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_20.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_21.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_22.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_23.f0328
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_24.f0324
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_25.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_call_9.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_deferred_1.f9023
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_12.f0326
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_13.f0328
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_14.f0327
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_15.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_3.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_4.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_generic_9.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_1.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_10.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_12.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_13.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_16.f0349
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_17.f9043
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_18.f9025
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_19.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_2.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_6.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_8.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_operator_9.f031
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_1.f9012
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_3.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_4.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_5.f9040
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_6.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_override_7.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_1.f082
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_10.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_11.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_13.f0311
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_14.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_15.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_16.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_17.f033
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_18.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_19.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_20.f905
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_21.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_23.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_24.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_25.f902
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_26.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_27.f0392
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_28.f0330
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_29.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_3.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_30.f9038
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_31.f9028
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_32.f9035
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_33.f9039
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_4.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_5.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_6.f036
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_7.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_8.f032
-rw-r--r--gcc/testsuite/gfortran.dg/typebound_proc_9.f034
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03211
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_10.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_11.f9014
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_12.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f9073
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_14.f9026
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f9017
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f9024
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f9051
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f0380
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_3.f0353
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_4.f0341
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_5.f9041
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_6.f9037
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_7.f9019
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/unlimited_polymorphic_9.f9020
-rw-r--r--gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/unresolved_fixup_1.f9044
-rw-r--r--gcc/testsuite/gfortran.dg/unresolved_fixup_2.f9036
-rw-r--r--gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_10.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_12.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_13.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_14.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_15.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_16.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_19.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_20.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_21.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_28.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/use_29.f9015
-rw-r--r--gcc/testsuite/gfortran.dg/use_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_allocated_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_iso_c_binding.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_3.f905
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_only_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_rename_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_rename_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_rename_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/use_rename_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/use_rename_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_before_typed_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_4.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_6.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_dummy_types_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_interface_ref.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_11.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_12.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_13.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_14.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_15.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_16.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_17.f904
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_19.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_20.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_23.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_24.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_25.f903
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_26.f902
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_3.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_6.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_7.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/used_types_9.f901
-rw-r--r--gcc/testsuite/gfortran.dg/userdef_operator_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/userdef_operator_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/value_1.f901
-rw-r--r--gcc/testsuite/gfortran.dg/value_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/value_6.f031
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f11
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-pr37021.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f902
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-real8-pr40801.f901
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-rnflow-trs2a2.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr32380.f4
-rw-r--r--gcc/testsuite/gfortran.dg/vect/pr46213.f901
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-8.f901
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect-gems.f907
-rw-r--r--gcc/testsuite/gfortran.dg/vect/vect.exp8
-rw-r--r--gcc/testsuite/gfortran.dg/vector_subscript_7.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/volatile10.f901
-rw-r--r--gcc/testsuite/gfortran.dg/volatile5.f901
-rw-r--r--gcc/testsuite/gfortran.dg/volatile9.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_alias.f9033
-rw-r--r--gcc/testsuite/gfortran.dg/warn_conversion_4.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/warn_function_without_result_2.f901
-rw-r--r--gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_intent_out_not_set.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_target_lifetime_1.f9047
-rw-r--r--gcc/testsuite/gfortran.dg/warn_target_lifetime_2.f9010
-rw-r--r--gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f9029
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_4.f9016
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_function.f9021
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_function_2.f9034
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_var_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warn_unused_var_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/warning-directive-2.F902
-rw-r--r--gcc/testsuite/gfortran.dg/wdate-time.F906
-rw-r--r--gcc/testsuite/gfortran.dg/wextra_1.f9
-rw-r--r--gcc/testsuite/gfortran.dg/where_4.f9018
-rw-r--r--gcc/testsuite/gfortran.dg/where_operator_assign_1.f902
-rw-r--r--gcc/testsuite/gfortran.dg/where_operator_assign_2.f902
-rw-r--r--gcc/testsuite/gfortran.dg/where_operator_assign_3.f902
-rw-r--r--gcc/testsuite/gfortran.dg/where_operator_assign_4.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_11.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_14.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_15.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_16.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_17.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_18.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_19.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_20.f036
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_21.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_22.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_23.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_24.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_25.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_26.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_27.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_28.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_29.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_30.f901
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_31.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_33.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_35.f902
-rw-r--r--gcc/testsuite/gfortran.dg/whole_file_7.f902
-rw-r--r--gcc/testsuite/gfortran.dg/widechar_5.f902
-rw-r--r--gcc/testsuite/gfortran.dg/widechar_6.f902
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/compile/compile.exp67
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f9013
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/execute.exp67
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_associated.f902
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x4
-rw-r--r--gcc/testsuite/gfortran.fortran-torture/execute/pr57396.f9033
-rw-r--r--gcc/testsuite/gnat.dg/aggr21.adb14
-rw-r--r--gcc/testsuite/gnat.dg/aggr21_pkg.adb8
-rw-r--r--gcc/testsuite/gnat.dg/aggr21_pkg.ads11
-rw-r--r--gcc/testsuite/gnat.dg/aliasing1.adb2
-rw-r--r--gcc/testsuite/gnat.dg/array21.adb16
-rw-r--r--gcc/testsuite/gnat.dg/array22.adb21
-rw-r--r--gcc/testsuite/gnat.dg/array23.adb10
-rw-r--r--gcc/testsuite/gnat.dg/array23_pkg1.ads13
-rw-r--r--gcc/testsuite/gnat.dg/array23_pkg2.ads11
-rw-r--r--gcc/testsuite/gnat.dg/array23_pkg3.ads5
-rw-r--r--gcc/testsuite/gnat.dg/array_bounds_test2.adb25
-rw-r--r--gcc/testsuite/gnat.dg/constant4.adb12
-rw-r--r--gcc/testsuite/gnat.dg/constant4_pkg.ads15
-rw-r--r--gcc/testsuite/gnat.dg/deep_old.adb10
-rw-r--r--gcc/testsuite/gnat.dg/derived_type4.adb16
-rw-r--r--gcc/testsuite/gnat.dg/dg.exp2
-rw-r--r--gcc/testsuite/gnat.dg/discr36.adb19
-rw-r--r--gcc/testsuite/gnat.dg/discr36.ads12
-rw-r--r--gcc/testsuite/gnat.dg/discr36_pkg.adb10
-rw-r--r--gcc/testsuite/gnat.dg/discr36_pkg.ads7
-rw-r--r--gcc/testsuite/gnat.dg/discr38.adb80
-rw-r--r--gcc/testsuite/gnat.dg/discr39.adb22
-rw-r--r--gcc/testsuite/gnat.dg/discr40.adb12
-rw-r--r--gcc/testsuite/gnat.dg/discr40.ads26
-rw-r--r--gcc/testsuite/gnat.dg/discr41.adb12
-rw-r--r--gcc/testsuite/gnat.dg/discr41.ads20
-rw-r--r--gcc/testsuite/gnat.dg/entry_queues2.adb45
-rw-r--r--gcc/testsuite/gnat.dg/enum3.adb23
-rw-r--r--gcc/testsuite/gnat.dg/fp_exception.adb24
-rw-r--r--gcc/testsuite/gnat.dg/in_out_parameter4.adb30
-rw-r--r--gcc/testsuite/gnat.dg/incomplete3.adb15
-rw-r--r--gcc/testsuite/gnat.dg/incomplete3.ads22
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization11.adb38
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads22
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization12.adb22
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization12.ads27
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization13.adb21
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization13.ads17
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization13_pkg.ads5
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization14.adb29
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization14.ads13
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads5
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization15.adb20
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization15.ads9
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization16.adb24
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb8
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads7
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization17.adb22
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization17_pkg.adb5
-rw-r--r--gcc/testsuite/gnat.dg/loop_optimization17_pkg.ads29
-rw-r--r--gcc/testsuite/gnat.dg/misaligned_volatile.adb28
-rw-r--r--gcc/testsuite/gnat.dg/nested_generic1.adb12
-rw-r--r--gcc/testsuite/gnat.dg/nested_generic1_pkg.adb11
-rw-r--r--gcc/testsuite/gnat.dg/nested_generic1_pkg.ads8
-rw-r--r--gcc/testsuite/gnat.dg/noinline2.adb22
-rw-r--r--gcc/testsuite/gnat.dg/noinline2.ads5
-rw-r--r--gcc/testsuite/gnat.dg/noreturn4.adb21
-rw-r--r--gcc/testsuite/gnat.dg/noreturn4.ads10
-rw-r--r--gcc/testsuite/gnat.dg/noreturn4_pkg.ads18
-rw-r--r--gcc/testsuite/gnat.dg/noreturn5.adb32
-rw-r--r--gcc/testsuite/gnat.dg/noreturn5.ads6
-rw-r--r--gcc/testsuite/gnat.dg/object_overflow.adb13
-rw-r--r--gcc/testsuite/gnat.dg/object_overflow1.adb13
-rw-r--r--gcc/testsuite/gnat.dg/object_overflow2.adb13
-rw-r--r--gcc/testsuite/gnat.dg/object_overflow3.adb19
-rw-r--r--gcc/testsuite/gnat.dg/object_overflow4.adb20
-rw-r--r--gcc/testsuite/gnat.dg/old_errors.adb47
-rw-r--r--gcc/testsuite/gnat.dg/opt27.adb29
-rw-r--r--gcc/testsuite/gnat.dg/opt27_pkg.adb32
-rw-r--r--gcc/testsuite/gnat.dg/opt27_pkg.ads33
-rw-r--r--gcc/testsuite/gnat.dg/opt28.adb31
-rw-r--r--gcc/testsuite/gnat.dg/opt28.ads8
-rw-r--r--gcc/testsuite/gnat.dg/opt28_pkg.ads11
-rw-r--r--gcc/testsuite/gnat.dg/opt29.adb13
-rw-r--r--gcc/testsuite/gnat.dg/opt29.ads28
-rw-r--r--gcc/testsuite/gnat.dg/opt30.adb20
-rw-r--r--gcc/testsuite/gnat.dg/opt31.adb43
-rw-r--r--gcc/testsuite/gnat.dg/opt32.adb37
-rw-r--r--gcc/testsuite/gnat.dg/opt33.adb41
-rw-r--r--gcc/testsuite/gnat.dg/opt38.adb9
-rw-r--r--gcc/testsuite/gnat.dg/opt38_pkg.adb33
-rw-r--r--gcc/testsuite/gnat.dg/opt38_pkg.ads5
-rw-r--r--gcc/testsuite/gnat.dg/opt39.adb31
-rw-r--r--gcc/testsuite/gnat.dg/opt41.adb15
-rw-r--r--gcc/testsuite/gnat.dg/opt41_pkg.adb53
-rw-r--r--gcc/testsuite/gnat.dg/opt41_pkg.ads28
-rw-r--r--gcc/testsuite/gnat.dg/overflow_fixed.adb19
-rw-r--r--gcc/testsuite/gnat.dg/pack18.adb12
-rw-r--r--gcc/testsuite/gnat.dg/pack18_pkg.ads21
-rw-r--r--gcc/testsuite/gnat.dg/pack19.adb56
-rw-r--r--gcc/testsuite/gnat.dg/pack20.adb9
-rw-r--r--gcc/testsuite/gnat.dg/pack20.ads15
-rw-r--r--gcc/testsuite/gnat.dg/pack20_pkg.ads7
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr5.ads19
-rw-r--r--gcc/testsuite/gnat.dg/specs/aggr6.ads25
-rw-r--r--gcc/testsuite/gnat.dg/specs/array1.ads10
-rw-r--r--gcc/testsuite/gnat.dg/specs/array2.ads12
-rw-r--r--gcc/testsuite/gnat.dg/specs/array3.ads18
-rw-r--r--gcc/testsuite/gnat.dg/specs/clause_on_volatile.ads85
-rw-r--r--gcc/testsuite/gnat.dg/specs/last_bit.ads19
-rw-r--r--gcc/testsuite/gnat.dg/specs/limited_with4.ads23
-rw-r--r--gcc/testsuite/gnat.dg/specs/limited_with4_pkg.ads15
-rw-r--r--gcc/testsuite/gnat.dg/specs/linker_alias.ads10
-rw-r--r--gcc/testsuite/gnat.dg/specs/linker_section.ads2
-rw-r--r--gcc/testsuite/gnat.dg/specs/machine_attribute.ads8
-rw-r--r--gcc/testsuite/gnat.dg/specs/noinline1.ads21
-rw-r--r--gcc/testsuite/gnat.dg/specs/noinline3.ads9
-rw-r--r--gcc/testsuite/gnat.dg/specs/noinline3_pkg.adb16
-rw-r--r--gcc/testsuite/gnat.dg/specs/noinline3_pkg.ads11
-rw-r--r--gcc/testsuite/gnat.dg/specs/opt1.ads28
-rw-r--r--gcc/testsuite/gnat.dg/specs/pack9.ads15
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming1.ads16
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2.ads11
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2_pkg1.ads17
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2_pkg2.ads14
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2_pkg3.ads25
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2_pkg4.adb12
-rw-r--r--gcc/testsuite/gnat.dg/specs/renaming2_pkg4.ads25
-rw-r--r--gcc/testsuite/gnat.dg/specs/renamings.ads14
-rw-r--r--gcc/testsuite/gnat.dg/specs/specs.exp2
-rw-r--r--gcc/testsuite/gnat.dg/stack_usage1b.adb39
-rw-r--r--gcc/testsuite/gnat.dg/stack_usage1c.adb39
-rw-r--r--gcc/testsuite/gnat.dg/stack_usage2.adb26
-rw-r--r--gcc/testsuite/gnat.dg/style/style.exp36
-rw-r--r--gcc/testsuite/gnat.dg/test_raise_from_pure.adb2
-rw-r--r--gcc/testsuite/gnat.dg/unchecked_convert9.adb15
-rw-r--r--gcc/testsuite/gnat.dg/unchecked_convert9.ads20
-rw-r--r--gcc/testsuite/gnat.dg/uninit_array.adb22
-rw-r--r--gcc/testsuite/gnat.dg/uninit_array.ads5
-rw-r--r--gcc/testsuite/gnat.dg/uninit_array_pkg.ads11
-rw-r--r--gcc/testsuite/gnat.dg/valued_proc.adb12
-rw-r--r--gcc/testsuite/gnat.dg/valued_proc_pkg.ads15
-rw-r--r--gcc/testsuite/gnat.dg/vect10.adb30
-rw-r--r--gcc/testsuite/gnat.dg/vect10.ads17
-rw-r--r--gcc/testsuite/gnat.dg/vect7.adb20
-rw-r--r--gcc/testsuite/gnat.dg/vect7.ads15
-rw-r--r--gcc/testsuite/gnat.dg/vect9.adb45
-rw-r--r--gcc/testsuite/gnat.dg/vect9.ads14
-rw-r--r--gcc/testsuite/gnat.dg/vect9_pkg.ads17
-rw-r--r--gcc/testsuite/gnat.dg/volatile11.adb41
-rw-r--r--gcc/testsuite/gnat.dg/volatile11_pkg.adb25
-rw-r--r--gcc/testsuite/gnat.dg/volatile11_pkg.ads15
-rw-r--r--gcc/testsuite/gnat.dg/warn10.adb12
-rw-r--r--gcc/testsuite/gnat.dg/warn10.ads11
-rw-r--r--gcc/testsuite/gnat.dg/warn10_pkg.ads12
-rw-r--r--gcc/testsuite/gnat.dg/warn6.adb13
-rw-r--r--gcc/testsuite/gnat.dg/warn6.ads15
-rw-r--r--gcc/testsuite/gnat.dg/warn7.adb18
-rw-r--r--gcc/testsuite/gnat.dg/warn8.adb8
-rw-r--r--gcc/testsuite/gnat.dg/warn9.adb10
-rw-r--r--gcc/testsuite/gnat.dg/weak2.adb10
-rw-r--r--gcc/testsuite/gnat.dg/weak2.ads9
-rw-r--r--gcc/testsuite/go.dg/dg.exp2
-rw-r--r--gcc/testsuite/go.go-torture/execute/execute.exp2
-rw-r--r--gcc/testsuite/go.test/go-test.exp628
-rw-r--r--gcc/testsuite/go.test/test/235.go5
-rw-r--r--gcc/testsuite/go.test/test/64bit.go29
-rw-r--r--gcc/testsuite/go.test/test/alias.go7
-rw-r--r--gcc/testsuite/go.test/test/alias1.go14
-rw-r--r--gcc/testsuite/go.test/test/append.go19
-rw-r--r--gcc/testsuite/go.test/test/args.go4
-rw-r--r--gcc/testsuite/go.test/test/assign.go5
-rw-r--r--gcc/testsuite/go.test/test/assign1.go5
-rw-r--r--gcc/testsuite/go.test/test/bench/garbage/Makefile17
-rw-r--r--gcc/testsuite/go.test/test/bench/garbage/parser.go112
-rw-r--r--gcc/testsuite/go.test/test/bench/garbage/peano.go2
-rw-r--r--gcc/testsuite/go.test/test/bench/garbage/stats.go18
-rw-r--r--gcc/testsuite/go.test/test/bench/garbage/tree2.go23
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/Makefile7
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/_testmain.go40
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/dummy.go3
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/fasta_test.go17
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/fmt_test.go68
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/gob_test.go4
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/gzip_test.go10
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/http_test.go45
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/json_test.go19
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/jsondata_test.go3607
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/mandel_test.go41
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/parser_test.go43
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/parserdata_test.go245
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/regexp_test.go59
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/revcomp_test.go6
-rw-r--r--gcc/testsuite/go.test/test/bench/go1/time_test.go25
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/Makefile14
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/binary-tree.c1
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/k-nucleotide.c2
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/mandelbrot.go16
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/threadring.c5
-rw-r--r--gcc/testsuite/go.test/test/bench/shootout/timing.log352
-rwxr-xr-xgcc/testsuite/go.test/test/bench/shootout/timing.sh44
-rw-r--r--gcc/testsuite/go.test/test/bigalg.go19
-rw-r--r--gcc/testsuite/go.test/test/bigmap.go107
-rw-r--r--gcc/testsuite/go.test/test/blank.go40
-rw-r--r--gcc/testsuite/go.test/test/blank1.go17
-rw-r--r--gcc/testsuite/go.test/test/bom.go26
-rw-r--r--gcc/testsuite/go.test/test/bombad.go18
-rw-r--r--gcc/testsuite/go.test/test/bounds.go270
-rw-r--r--gcc/testsuite/go.test/test/bugs/bug395.go3
-rw-r--r--gcc/testsuite/go.test/test/chan/doubleselect.go7
-rw-r--r--gcc/testsuite/go.test/test/chan/fifo.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/goroutines.go6
-rw-r--r--gcc/testsuite/go.test/test/chan/nonblock.go6
-rw-r--r--gcc/testsuite/go.test/test/chan/perm.go6
-rw-r--r--gcc/testsuite/go.test/test/chan/powser1.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/powser2.go11
-rw-r--r--gcc/testsuite/go.test/test/chan/select.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/select2.go7
-rw-r--r--gcc/testsuite/go.test/test/chan/select3.go8
-rw-r--r--gcc/testsuite/go.test/test/chan/select4.go8
-rw-r--r--gcc/testsuite/go.test/test/chan/select5.go9
-rw-r--r--gcc/testsuite/go.test/test/chan/select6.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/select7.go2
-rw-r--r--gcc/testsuite/go.test/test/chan/sendstmt.go2
-rw-r--r--gcc/testsuite/go.test/test/chan/sieve1.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/sieve2.go4
-rw-r--r--gcc/testsuite/go.test/test/chan/zerosize.go4
-rw-r--r--gcc/testsuite/go.test/test/chancap.go4
-rw-r--r--gcc/testsuite/go.test/test/char_lit.go4
-rw-r--r--gcc/testsuite/go.test/test/char_lit1.go5
-rw-r--r--gcc/testsuite/go.test/test/closedchan.go2
-rw-r--r--gcc/testsuite/go.test/test/closure.go16
-rw-r--r--gcc/testsuite/go.test/test/cmp.go37
-rw-r--r--gcc/testsuite/go.test/test/cmp6.go10
-rw-r--r--gcc/testsuite/go.test/test/cmplx.go31
-rw-r--r--gcc/testsuite/go.test/test/cmplxdivide.c1
-rw-r--r--gcc/testsuite/go.test/test/cmplxdivide.go5
-rw-r--r--gcc/testsuite/go.test/test/cmplxdivide1.go1
-rw-r--r--gcc/testsuite/go.test/test/complit.go4
-rw-r--r--gcc/testsuite/go.test/test/complit1.go5
-rw-r--r--gcc/testsuite/go.test/test/compos.go4
-rw-r--r--gcc/testsuite/go.test/test/const.go45
-rw-r--r--gcc/testsuite/go.test/test/const1.go68
-rw-r--r--gcc/testsuite/go.test/test/const2.go11
-rw-r--r--gcc/testsuite/go.test/test/const3.go4
-rw-r--r--gcc/testsuite/go.test/test/const4.go82
-rw-r--r--gcc/testsuite/go.test/test/const5.go33
-rw-r--r--gcc/testsuite/go.test/test/const6.go30
-rw-r--r--gcc/testsuite/go.test/test/convT2X.go195
-rw-r--r--gcc/testsuite/go.test/test/convert.go4
-rw-r--r--gcc/testsuite/go.test/test/convert1.go5
-rw-r--r--gcc/testsuite/go.test/test/convert3.go5
-rw-r--r--gcc/testsuite/go.test/test/convlit.go9
-rw-r--r--gcc/testsuite/go.test/test/convlit1.go5
-rw-r--r--gcc/testsuite/go.test/test/copy.go9
-rw-r--r--gcc/testsuite/go.test/test/crlf.go4
-rw-r--r--gcc/testsuite/go.test/test/ddd.go18
-rw-r--r--gcc/testsuite/go.test/test/ddd1.go15
-rw-r--r--gcc/testsuite/go.test/test/ddd2.dir/ddd2.go16
-rw-r--r--gcc/testsuite/go.test/test/ddd2.dir/ddd3.go28
-rw-r--r--gcc/testsuite/go.test/test/ddd2.go13
-rw-r--r--gcc/testsuite/go.test/test/ddd3.go28
-rw-r--r--gcc/testsuite/go.test/test/decl.go9
-rw-r--r--gcc/testsuite/go.test/test/declbad.go13
-rw-r--r--gcc/testsuite/go.test/test/defer.go6
-rw-r--r--gcc/testsuite/go.test/test/deferfin.go63
-rw-r--r--gcc/testsuite/go.test/test/deferprint.go7
-rw-r--r--gcc/testsuite/go.test/test/divide.go12
-rw-r--r--gcc/testsuite/go.test/test/divmod.go460
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/main.go32
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z1.go (renamed from gcc/testsuite/go.test/test/dwarf/z1.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z10.go (renamed from gcc/testsuite/go.test/test/dwarf/z10.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z11.go (renamed from gcc/testsuite/go.test/test/dwarf/z11.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z12.go (renamed from gcc/testsuite/go.test/test/dwarf/z12.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z13.go (renamed from gcc/testsuite/go.test/test/dwarf/z13.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z14.go (renamed from gcc/testsuite/go.test/test/dwarf/z14.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z15.go (renamed from gcc/testsuite/go.test/test/dwarf/z15.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z16.go (renamed from gcc/testsuite/go.test/test/dwarf/z16.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z17.go (renamed from gcc/testsuite/go.test/test/dwarf/z17.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z18.go (renamed from gcc/testsuite/go.test/test/dwarf/z18.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z19.go (renamed from gcc/testsuite/go.test/test/dwarf/z19.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z2.go (renamed from gcc/testsuite/go.test/test/dwarf/z2.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z20.go (renamed from gcc/testsuite/go.test/test/dwarf/z20.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z3.go (renamed from gcc/testsuite/go.test/test/dwarf/z3.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z4.go (renamed from gcc/testsuite/go.test/test/dwarf/z4.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z5.go (renamed from gcc/testsuite/go.test/test/dwarf/z5.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z6.go (renamed from gcc/testsuite/go.test/test/dwarf/z6.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z7.go (renamed from gcc/testsuite/go.test/test/dwarf/z7.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z8.go (renamed from gcc/testsuite/go.test/test/dwarf/z8.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.dir/z9.go (renamed from gcc/testsuite/go.test/test/dwarf/z9.go)0
-rw-r--r--gcc/testsuite/go.test/test/dwarf/dwarf.go10
-rw-r--r--gcc/testsuite/go.test/test/dwarf/linedirectives.go2
-rw-r--r--gcc/testsuite/go.test/test/dwarf/main.go29
-rw-r--r--gcc/testsuite/go.test/test/empty.go5
-rw-r--r--gcc/testsuite/go.test/test/env.go2
-rw-r--r--gcc/testsuite/go.test/test/eof.go5
-rw-r--r--gcc/testsuite/go.test/test/eof1.go7
-rwxr-xr-xgcc/testsuite/go.test/test/errchk4
-rw-r--r--gcc/testsuite/go.test/test/escape.go35
-rw-r--r--gcc/testsuite/go.test/test/escape2.go321
-rw-r--r--gcc/testsuite/go.test/test/escape3.go4
-rw-r--r--gcc/testsuite/go.test/test/escape4.go57
-rw-r--r--gcc/testsuite/go.test/test/escape5.go151
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug000.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug002.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug003.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug004.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug005.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug006.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug007.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug008.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug009.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug010.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug011.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug012.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug013.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug014.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug015.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug016.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug017.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug020.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug021.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug022.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug023.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug024.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug026.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug027.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug028.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug030.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug031.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug035.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug036.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug037.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug038.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug039.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug040.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug045.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug046.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug047.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug048.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug049.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug050.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug051.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug052.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug053.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug054.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug055.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug056.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug057.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug058.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug059.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug060.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug061.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug062.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug063.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug064.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug065.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug066.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug067.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug068.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug069.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug070.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug071.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug072.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug073.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug074.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug075.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug076.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug077.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug078.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug080.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug081.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug082.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug083.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug084.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug085.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug086.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug087.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug088.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug089.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug090.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug091.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug092.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug093.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug094.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug096.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug097.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug098.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug099.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug101.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug102.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug103.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug104.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug106.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug107.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug108.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug109.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug110.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug111.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug112.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug113.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug114.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug115.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug116.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug117.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug118.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug119.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug120.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug121.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug122.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug123.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug126.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug127.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug128.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug129.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug130.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug131.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug132.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug133.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug135.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug136.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug137.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug139.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug140.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug141.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug142.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug143.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug144.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug145.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug146.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug147.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug148.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug149.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug150.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug151.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug1515.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug152.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug154.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug155.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug156.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug157.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug158.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug159.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug160.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug161.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug163.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug164.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug165.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug167.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug168.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug169.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug170.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug171.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug172.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug173.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug174.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug175.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug176.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug177.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug178.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug179.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug180.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug181.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug182.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug183.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug184.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug185.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug186.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug187.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug188.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug189.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug190.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug191.dir/a.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug191.dir/b.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug191.dir/main.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug191.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug192.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug193.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug194.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug195.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug196.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug197.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug198.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug199.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug200.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug201.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug202.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug203.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug204.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug205.go8
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug206.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug206.out2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug207.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug208.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug209.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug211.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug212.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug213.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug214.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug215.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug216.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug217.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug218.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug219.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug221.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug2.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug222.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug223.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug224.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug225.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug227.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug228.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug229.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug230.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug231.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug232.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug233.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug234.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug235.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug236.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug237.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug238.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug239.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug240.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug241.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug242.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug243.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug244.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug245.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug246.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug247.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug0.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug1.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug2.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug3.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug248.go3
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug249.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug250.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug251.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug252.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug253.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug254.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug255.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug256.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug257.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug258.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug259.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug260.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug261.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug262.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug263.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug264.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug265.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug266.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug267.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug269.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug271.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug272.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug273.go45
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug274.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug275.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug276.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug277.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug278.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug279.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug280.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug281.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug282.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug283.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug284.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug285.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug286.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug287.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug288.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug289.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug290.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug291.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug292.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug293.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug294.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug295.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug296.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug297.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug298.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug299.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug300.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug301.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug302.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug303.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug304.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug305.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug306.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug307.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug308.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug309.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug311.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug312.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug313.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug314.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug315.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug316.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug317.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug318.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug319.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug320.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug321.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug322.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug323.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug324.dir/prog.go (renamed from gcc/testsuite/go.test/test/fixedbugs/bug324.dir/main.go)0
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug324.go8
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug325.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug326.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug327.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug328.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug329.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug330.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug331.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug332.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug333.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug334.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug335.dir/a.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug335.dir/b.go6
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug335.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug336.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug337.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug338.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug339.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug340.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug341.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug342.go8
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug343.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug344.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug345.go3
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug346.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug347.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug348.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug349.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug350.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug351.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug352.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug353.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug354.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug355.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug356.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug357.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug358.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug361.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug362.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug363.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug364.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug365.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug366.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug367.dir/p.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug367.dir/prog.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug367.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug368.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug369.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug370.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug371.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug372.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug373.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug374.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug375.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug376.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug377.dir/one.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug377.dir/two.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug377.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug378.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug379.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug380.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug381.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug382.dir/prog.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug382.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug383.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug384.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug385_32.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug385_64.go220
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug386.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug387.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug388.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug389.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug390.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug391.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug392.dir/one.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg2.go25
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg3.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug392.dir/two.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug392.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug393.go4
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug394.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug396.dir/one.go1
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug396.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug397.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug398.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug399.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug401.go46
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug402.go31
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug403.go23
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug404.dir/one.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug404.dir/two.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug404.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug405.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug406.go25
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug407.dir/one.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug407.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug409.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug409.out1
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug410.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug411.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug412.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug413.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug414.dir/p1.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug414.dir/prog.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug414.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug415.dir/p.go14
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug415.dir/prog.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug415.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug416.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug417.go32
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug418.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug419.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug420.go14
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug421.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug422.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug423.go277
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug424.dir/lib.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug424.dir/main.go97
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug424.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug425.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug426.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug427.go39
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug428.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug429.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug430.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug431.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug432.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug433.go39
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug434.go32
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug435.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug436.go32
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug437.dir/one.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug437.dir/two.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug437.dir/x.go25
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug437.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug438.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug439.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug440_32.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug440_64.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug441.go36
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug442.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug443.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug444.go36
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug445.go14
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug446.go36
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug447.go105
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg1.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg2.go14
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug448.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug449.go69
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug450.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug451.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug452.go38
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug453.go39
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug454.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug455.go54
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug456.go26
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug457.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug458.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug459.go35
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug460.dir/a.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug460.dir/b.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug460.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug461.go23
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug462.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug463.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug464.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug465.dir/a.go76
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug465.dir/b.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug465.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug466.dir/a.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug466.dir/b.go30
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug466.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p1.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p2.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p3.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug467.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p1.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p2.go25
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug468.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug470.go26
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug471.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p1.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p2.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug472.dir/z.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug472.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug473.go69
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug474.go29
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug475.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug476.go23
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug477.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug478.dir/a.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug478.dir/b.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug478.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug479.dir/a.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug479.dir/b.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug479.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug480.dir/a.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug480.dir/b.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug480.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug481.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/bug482.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue2615.go547
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/one.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/two.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3552.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3705.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3783.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3924.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue3925.go23
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4066.go37
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4085a.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4085b.go49
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4097.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4099.go26
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4162.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4167.go50
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4232.go33
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4251.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/a.go35
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/main.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4252.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4264.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4283.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4313.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4316.go64
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4323.go31
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p1.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p2.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q1.go8
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q2.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/z.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4326.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4348.go29
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4353.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4359.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p1.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p2.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p3.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4370.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4396a.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4396b.go29
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4399.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4405.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4429.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4448.go37
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4452.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4458.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4463.go87
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4468.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4470.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4495.go29
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f1.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f2.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4510.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4517a.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4517b.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4517c.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4517d.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4518.go67
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4529.go33
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4545.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4562.go49
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4585.go151
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg1.go26
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg2.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/prog.go25
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4590.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4610.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4614.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4618.go41
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4620.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4654.go71
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4663.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4667.go37
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4734.go21
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4748.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4752.go26
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4776.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4785.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4813.go52
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4847.go24
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/a.go33
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/b.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4879.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4909a.go35
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4909b.go80
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/foo.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state.go28
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state2.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4932.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/a.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/b.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue4964.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5002.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5056.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5089.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/a.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/b.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5105.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/bug.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/main.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5125.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5162.go88
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5172.go19
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5231.go45
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5244.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/bug.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/main.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5259.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/a.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/b.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5260.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/pkg1.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/prog.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5291.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5358.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/a.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/b.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5470.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5493.go59
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5515.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5581.go34
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5607.go36
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5609.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/rethinkgo.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/x.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/y.go5
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5614.go11
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5698.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5704.go46
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5753.go29
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/a.go60
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/main.go23
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5755.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5809.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5820.go18
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5841.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5856.go38
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/a.go22
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/main.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5910.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/a.go3
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/b.go2
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5957.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue5963.go50
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6004.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6036.go44
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6055.go35
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6131.go20
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6140.go31
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6247.go17
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6269.go39
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6298.go15
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6399.go27
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/a.go7
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/b.go9
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/main.go16
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6513.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/a.go14
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/b.go12
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6789.go10
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6899.go13
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue6899.out1
-rw-r--r--gcc/testsuite/go.test/test/fixedbugs/issue887.go36
-rw-r--r--gcc/testsuite/go.test/test/float_lit.go8
-rw-r--r--gcc/testsuite/go.test/test/floatcmp.go7
-rw-r--r--gcc/testsuite/go.test/test/for.go4
-rw-r--r--gcc/testsuite/go.test/test/func.go3
-rw-r--r--gcc/testsuite/go.test/test/func1.go9
-rw-r--r--gcc/testsuite/go.test/test/func2.go5
-rw-r--r--gcc/testsuite/go.test/test/func3.go5
-rw-r--r--gcc/testsuite/go.test/test/func4.go5
-rw-r--r--gcc/testsuite/go.test/test/func5.go4
-rw-r--r--gcc/testsuite/go.test/test/func6.go4
-rw-r--r--gcc/testsuite/go.test/test/func7.go7
-rw-r--r--gcc/testsuite/go.test/test/func8.go49
-rw-r--r--gcc/testsuite/go.test/test/funcdup.go27
-rw-r--r--gcc/testsuite/go.test/test/funcdup2.go17
-rw-r--r--gcc/testsuite/go.test/test/gc.go4
-rw-r--r--gcc/testsuite/go.test/test/gc1.go4
-rw-r--r--gcc/testsuite/go.test/test/gc2.go4
-rw-r--r--gcc/testsuite/go.test/test/golden.out5
-rw-r--r--gcc/testsuite/go.test/test/goprint.go6
-rw-r--r--gcc/testsuite/go.test/test/goto.go5
-rwxr-xr-xgcc/testsuite/go.test/test/hashmap.go181
-rw-r--r--gcc/testsuite/go.test/test/helloworld.go4
-rw-r--r--gcc/testsuite/go.test/test/if.go4
-rw-r--r--gcc/testsuite/go.test/test/import.go6
-rw-r--r--gcc/testsuite/go.test/test/import1.go8
-rw-r--r--gcc/testsuite/go.test/test/import2.dir/import2.go42
-rw-r--r--gcc/testsuite/go.test/test/import2.dir/import3.go52
-rw-r--r--gcc/testsuite/go.test/test/import2.go40
-rw-r--r--gcc/testsuite/go.test/test/import3.go54
-rw-r--r--gcc/testsuite/go.test/test/import4.dir/empty.go10
-rw-r--r--gcc/testsuite/go.test/test/import4.dir/import4.go24
-rw-r--r--gcc/testsuite/go.test/test/import4.go23
-rw-r--r--gcc/testsuite/go.test/test/import5.go55
-rw-r--r--gcc/testsuite/go.test/test/index.go161
-rw-r--r--gcc/testsuite/go.test/test/index0.go12
-rw-r--r--gcc/testsuite/go.test/test/index1.go12
-rw-r--r--gcc/testsuite/go.test/test/index2.go12
-rw-r--r--gcc/testsuite/go.test/test/indirect.go4
-rw-r--r--gcc/testsuite/go.test/test/indirect1.go5
-rw-r--r--gcc/testsuite/go.test/test/init.go5
-rw-r--r--gcc/testsuite/go.test/test/init1.go17
-rw-r--r--gcc/testsuite/go.test/test/initcomma.go12
-rw-r--r--gcc/testsuite/go.test/test/initialize.go4
-rw-r--r--gcc/testsuite/go.test/test/initializerr.go17
-rw-r--r--gcc/testsuite/go.test/test/initsyscall.go26
-rw-r--r--gcc/testsuite/go.test/test/int_lit.go4
-rw-r--r--gcc/testsuite/go.test/test/intcvt.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/bigdata.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/convert.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/convert1.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/convert2.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/embed.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/embed0.go29
-rw-r--r--gcc/testsuite/go.test/test/interface/embed1.dir/embed0.go27
-rw-r--r--gcc/testsuite/go.test/test/interface/embed1.dir/embed1.go43
-rw-r--r--gcc/testsuite/go.test/test/interface/embed1.go42
-rw-r--r--gcc/testsuite/go.test/test/interface/embed2.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/explicit.go32
-rw-r--r--gcc/testsuite/go.test/test/interface/fail.go23
-rw-r--r--gcc/testsuite/go.test/test/interface/fake.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/noeq.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/pointer.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/private.dir/private1.go18
-rw-r--r--gcc/testsuite/go.test/test/interface/private.dir/prog.go33
-rw-r--r--gcc/testsuite/go.test/test/interface/private.go30
-rw-r--r--gcc/testsuite/go.test/test/interface/private1.go18
-rw-r--r--gcc/testsuite/go.test/test/interface/receiver.go6
-rw-r--r--gcc/testsuite/go.test/test/interface/receiver1.go5
-rw-r--r--gcc/testsuite/go.test/test/interface/recursive.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/recursive1.dir/recursive1.go15
-rw-r--r--gcc/testsuite/go.test/test/interface/recursive1.dir/recursive2.go20
-rw-r--r--gcc/testsuite/go.test/test/interface/recursive1.go12
-rw-r--r--gcc/testsuite/go.test/test/interface/recursive2.go22
-rw-r--r--gcc/testsuite/go.test/test/interface/returntype.go4
-rw-r--r--gcc/testsuite/go.test/test/interface/struct.go4
-rw-r--r--gcc/testsuite/go.test/test/iota.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/array.go7
-rw-r--r--gcc/testsuite/go.test/test/ken/chan.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/chan1.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/complit.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/convert.go5
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx0.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx1.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx2.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx3.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx4.go5
-rw-r--r--gcc/testsuite/go.test/test/ken/cplx5.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/divconst.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/divmod.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/embed.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/for.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/interbasic.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/interfun.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/intervar.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/label.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/litfun.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/mfunc.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/modconst.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/ptrfun.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/ptrvar.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/range.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/rob1.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/rob2.go5
-rw-r--r--gcc/testsuite/go.test/test/ken/robfor.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/robfunc.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/shift.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/simparray.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/simpbool.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/simpconv.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/simpfun.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/simpswitch.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/simpvar.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/slicearray.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/sliceslice.go4
-rw-r--r--gcc/testsuite/go.test/test/ken/string.go3
-rw-r--r--gcc/testsuite/go.test/test/ken/strvar.go3
-rw-r--r--gcc/testsuite/go.test/test/label.go6
-rw-r--r--gcc/testsuite/go.test/test/label1.go7
-rw-r--r--gcc/testsuite/go.test/test/linkx.go20
-rw-r--r--gcc/testsuite/go.test/test/literal.go7
-rw-r--r--gcc/testsuite/go.test/test/mallocfin.go4
-rw-r--r--gcc/testsuite/go.test/test/map.go365
-rw-r--r--gcc/testsuite/go.test/test/map1.go23
-rw-r--r--gcc/testsuite/go.test/test/mapnan.go56
-rw-r--r--gcc/testsuite/go.test/test/method.go194
-rw-r--r--gcc/testsuite/go.test/test/method1.go5
-rw-r--r--gcc/testsuite/go.test/test/method2.go10
-rw-r--r--gcc/testsuite/go.test/test/method3.go4
-rw-r--r--gcc/testsuite/go.test/test/method4.dir/method4a.go37
-rw-r--r--gcc/testsuite/go.test/test/method4.dir/prog.go104
-rw-r--r--gcc/testsuite/go.test/test/method4.go8
-rw-r--r--gcc/testsuite/go.test/test/method5.go297
-rw-r--r--gcc/testsuite/go.test/test/named.go2
-rw-r--r--gcc/testsuite/go.test/test/named1.go3
-rw-r--r--gcc/testsuite/go.test/test/nil.go12
-rw-r--r--gcc/testsuite/go.test/test/nilcheck.go184
-rw-r--r--gcc/testsuite/go.test/test/nilptr.go55
-rw-r--r--gcc/testsuite/go.test/test/nilptr2.go128
-rw-r--r--gcc/testsuite/go.test/test/nilptr3.go191
-rw-r--r--gcc/testsuite/go.test/test/nul1.go5
-rw-r--r--gcc/testsuite/go.test/test/parentype.go4
-rw-r--r--gcc/testsuite/go.test/test/peano.go5
-rw-r--r--gcc/testsuite/go.test/test/printbig.go4
-rw-r--r--gcc/testsuite/go.test/test/range.go35
-rw-r--r--gcc/testsuite/go.test/test/recover.go273
-rw-r--r--gcc/testsuite/go.test/test/recover1.go2
-rw-r--r--gcc/testsuite/go.test/test/recover2.go2
-rw-r--r--gcc/testsuite/go.test/test/recover3.go11
-rw-r--r--gcc/testsuite/go.test/test/rename.go118
-rw-r--r--gcc/testsuite/go.test/test/rename1.go72
-rw-r--r--gcc/testsuite/go.test/test/reorder.go33
-rw-r--r--gcc/testsuite/go.test/test/reorder2.go174
-rw-r--r--gcc/testsuite/go.test/test/return.go2821
-rw-r--r--gcc/testsuite/go.test/test/rotate.go166
-rw-r--r--gcc/testsuite/go.test/test/rotate0.go12
-rw-r--r--gcc/testsuite/go.test/test/rotate1.go12
-rw-r--r--gcc/testsuite/go.test/test/rotate2.go12
-rw-r--r--gcc/testsuite/go.test/test/rotate3.go12
-rwxr-xr-xgcc/testsuite/go.test/test/run24
-rw-r--r--gcc/testsuite/go.test/test/run.go916
-rw-r--r--gcc/testsuite/go.test/test/rune.go7
-rw-r--r--gcc/testsuite/go.test/test/runtime.go7
-rw-r--r--gcc/testsuite/go.test/test/safe/main.go14
-rw-r--r--gcc/testsuite/go.test/test/safe/nousesafe.go8
-rw-r--r--gcc/testsuite/go.test/test/safe/pkg.go16
-rw-r--r--gcc/testsuite/go.test/test/safe/usesafe.go8
-rw-r--r--gcc/testsuite/go.test/test/shift1.go209
-rw-r--r--gcc/testsuite/go.test/test/shift2.go5
-rw-r--r--gcc/testsuite/go.test/test/sieve.go5
-rw-r--r--gcc/testsuite/go.test/test/sigchld.go6
-rw-r--r--gcc/testsuite/go.test/test/simassign.go4
-rw-r--r--gcc/testsuite/go.test/test/sinit.go16
-rw-r--r--gcc/testsuite/go.test/test/sizeof.go137
-rw-r--r--gcc/testsuite/go.test/test/slice3.go156
-rw-r--r--gcc/testsuite/go.test/test/slice3err.go121
-rw-r--r--gcc/testsuite/go.test/test/solitaire.go6
-rw-r--r--gcc/testsuite/go.test/test/stack.go3
-rw-r--r--gcc/testsuite/go.test/test/stress/maps.go111
-rw-r--r--gcc/testsuite/go.test/test/stress/parsego.go220
-rw-r--r--gcc/testsuite/go.test/test/stress/runstress.go169
-rw-r--r--gcc/testsuite/go.test/test/string_lit.go34
-rw-r--r--gcc/testsuite/go.test/test/stringrange.go11
-rw-r--r--gcc/testsuite/go.test/test/struct0.go8
-rw-r--r--gcc/testsuite/go.test/test/switch.go123
-rw-r--r--gcc/testsuite/go.test/test/switch1.go20
-rw-r--r--gcc/testsuite/go.test/test/switch3.go16
-rw-r--r--gcc/testsuite/go.test/test/switch4.go36
-rw-r--r--gcc/testsuite/go.test/test/syntax/chan.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/chan1.go6
-rw-r--r--gcc/testsuite/go.test/test/syntax/composite.go11
-rw-r--r--gcc/testsuite/go.test/test/syntax/else.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/forvar.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/if.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/import.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/interface.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi1.go4
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi2.go4
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi3.go4
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi4.go4
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi5.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi6.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/semi7.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/topexpr.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/typesw.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/vareq.go2
-rw-r--r--gcc/testsuite/go.test/test/syntax/vareq1.go2
-rw-r--r--gcc/testsuite/go.test/test/test0.go92
-rw-r--r--gcc/testsuite/go.test/test/testlib170
-rw-r--r--gcc/testsuite/go.test/test/times.out632
-rw-r--r--gcc/testsuite/go.test/test/torture.go339
-rw-r--r--gcc/testsuite/go.test/test/turing.go4
-rw-r--r--gcc/testsuite/go.test/test/typecheck.go18
-rw-r--r--gcc/testsuite/go.test/test/typeswitch.go4
-rw-r--r--gcc/testsuite/go.test/test/typeswitch1.go4
-rw-r--r--gcc/testsuite/go.test/test/typeswitch2.go5
-rw-r--r--gcc/testsuite/go.test/test/typeswitch3.go37
-rw-r--r--gcc/testsuite/go.test/test/undef.go5
-rw-r--r--gcc/testsuite/go.test/test/utf.go4
-rw-r--r--gcc/testsuite/go.test/test/varerr.go5
-rw-r--r--gcc/testsuite/go.test/test/varinit.go4
-rw-r--r--gcc/testsuite/go.test/test/zerodivide.go7
-rw-r--r--gcc/testsuite/lib/asan-dg.exp327
-rw-r--r--gcc/testsuite/lib/atomic-dg.exp104
-rw-r--r--gcc/testsuite/lib/c-compat.exp34
-rw-r--r--gcc/testsuite/lib/c-torture.exp6
-rw-r--r--gcc/testsuite/lib/cilk-plus-dg.exp104
-rw-r--r--gcc/testsuite/lib/clearcap.exp58
-rw-r--r--gcc/testsuite/lib/compat.exp3
-rw-r--r--gcc/testsuite/lib/copy-file.exp2
-rw-r--r--gcc/testsuite/lib/dejapatches.exp2
-rw-r--r--gcc/testsuite/lib/dg-pch.exp59
-rw-r--r--gcc/testsuite/lib/file-format.exp5
-rw-r--r--gcc/testsuite/lib/fortran-modules.exp98
-rw-r--r--gcc/testsuite/lib/fortran-torture.exp9
-rw-r--r--gcc/testsuite/lib/g++-dg.exp6
-rw-r--r--gcc/testsuite/lib/g++.exp10
-rw-r--r--gcc/testsuite/lib/gcc-defs.exp4
-rw-r--r--gcc/testsuite/lib/gcc-dg.exp93
-rw-r--r--gcc/testsuite/lib/gcc-gdb-test.exp6
-rw-r--r--gcc/testsuite/lib/gcc-simulate-thread.exp2
-rw-r--r--gcc/testsuite/lib/gcc.exp8
-rw-r--r--gcc/testsuite/lib/gcov.exp81
-rw-r--r--gcc/testsuite/lib/gfortran-dg.exp6
-rw-r--r--gcc/testsuite/lib/gfortran.exp3
-rw-r--r--gcc/testsuite/lib/gnat-dg.exp2
-rw-r--r--gcc/testsuite/lib/gnat.exp3
-rw-r--r--gcc/testsuite/lib/go-dg.exp2
-rw-r--r--gcc/testsuite/lib/go-torture.exp2
-rw-r--r--gcc/testsuite/lib/go.exp3
-rw-r--r--gcc/testsuite/lib/lto.exp34
-rw-r--r--gcc/testsuite/lib/mike-g++.exp3
-rw-r--r--gcc/testsuite/lib/mike-gcc.exp3
-rw-r--r--gcc/testsuite/lib/obj-c++-dg.exp2
-rw-r--r--gcc/testsuite/lib/obj-c++.exp4
-rw-r--r--gcc/testsuite/lib/objc-dg.exp3
-rw-r--r--gcc/testsuite/lib/objc-torture.exp3
-rw-r--r--gcc/testsuite/lib/objc.exp3
-rw-r--r--gcc/testsuite/lib/options.exp2
-rw-r--r--gcc/testsuite/lib/plugin-support.exp15
-rw-r--r--gcc/testsuite/lib/profopt.exp5
-rw-r--r--gcc/testsuite/lib/prune.exp13
-rw-r--r--gcc/testsuite/lib/scanasm.exp49
-rw-r--r--gcc/testsuite/lib/scandump.exp3
-rw-r--r--gcc/testsuite/lib/scanipa.exp2
-rw-r--r--gcc/testsuite/lib/scanrtl.exp12
-rw-r--r--gcc/testsuite/lib/scantree.exp3
-rw-r--r--gcc/testsuite/lib/target-libpath.exp62
-rw-r--r--gcc/testsuite/lib/target-supports-dg.exp66
-rw-r--r--gcc/testsuite/lib/target-supports.exp1324
-rw-r--r--gcc/testsuite/lib/timeout-dg.exp2
-rw-r--r--gcc/testsuite/lib/timeout.exp2
-rw-r--r--gcc/testsuite/lib/torture-options.exp2
-rw-r--r--gcc/testsuite/lib/tsan-dg.exp138
-rw-r--r--gcc/testsuite/lib/ubsan-dg.exp105
-rw-r--r--gcc/testsuite/lib/wrapper.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/attributes/attributes.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm13
-rw-r--r--gcc/testsuite/obj-c++.dg/dg.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/dwarf-2.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/invalid-method-2.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/method-12.mm11
-rw-r--r--gcc/testsuite/obj-c++.dg/method-8.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/property/dotsyntax-4.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/property/property.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/proto-lossage-7.mm11
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm2
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/const-str-12.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/strings/strings.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/syntax-error-1.mm10
-rw-r--r--gcc/testsuite/obj-c++.dg/tls/diag-3.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/tls/init-2.mm6
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm4
-rw-r--r--gcc/testsuite/obj-c++.dg/torture/strings/strings.exp2
-rw-r--r--gcc/testsuite/obj-c++.dg/try-catch-13.mm6
-rw-r--r--gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m2
-rw-r--r--gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h2
-rw-r--r--gcc/testsuite/objc.dg/attributes/attributes.exp2
-rw-r--r--gcc/testsuite/objc.dg/dg.exp2
-rw-r--r--gcc/testsuite/objc.dg/dwarf-1.m2
-rw-r--r--gcc/testsuite/objc.dg/dwarf-2.m2
-rw-r--r--gcc/testsuite/objc.dg/encode-7-next-64bit.m83
-rw-r--r--gcc/testsuite/objc.dg/foreach-7.m9
-rw-r--r--gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp2
-rw-r--r--gcc/testsuite/objc.dg/image-info.m9
-rw-r--r--gcc/testsuite/objc.dg/lto/lto.exp2
-rw-r--r--gcc/testsuite/objc.dg/method-6.m19
-rw-r--r--gcc/testsuite/objc.dg/no-extra-load.m2
-rw-r--r--gcc/testsuite/objc.dg/objc-foreach-4.m14
-rw-r--r--gcc/testsuite/objc.dg/objc-foreach-5.m4
-rw-r--r--gcc/testsuite/objc.dg/pch/pch.exp6
-rw-r--r--gcc/testsuite/objc.dg/pr23214.m18
-rw-r--r--gcc/testsuite/objc.dg/property/property.exp2
-rw-r--r--gcc/testsuite/objc.dg/proto-lossage-7.m11
-rw-r--r--gcc/testsuite/objc.dg/special/special.exp2
-rw-r--r--gcc/testsuite/objc.dg/stabs-1.m2
-rw-r--r--gcc/testsuite/objc.dg/strings/const-cfstring-5.m6
-rw-r--r--gcc/testsuite/objc.dg/strings/const-str-12b.m10
-rw-r--r--gcc/testsuite/objc.dg/strings/strings.exp2
-rw-r--r--gcc/testsuite/objc.dg/symtab-1.m4
-rw-r--r--gcc/testsuite/objc.dg/tls/diag-2.m2
-rw-r--r--gcc/testsuite/objc.dg/torture/strings/const-str-10.m4
-rw-r--r--gcc/testsuite/objc.dg/torture/strings/const-str-11.m4
-rw-r--r--gcc/testsuite/objc.dg/torture/strings/const-str-9.m4
-rw-r--r--gcc/testsuite/objc.dg/torture/strings/strings.exp2
-rw-r--r--gcc/testsuite/objc.dg/zero-link-1.m5
-rw-r--r--gcc/testsuite/objc.dg/zero-link-2.m4
-rw-r--r--gcc/testsuite/objc.dg/zero-link-3.m12
-rw-r--r--gcc/testsuite/objc/compile/compile.exp3
-rw-r--r--gcc/testsuite/objc/execute/exceptions/exceptions.exp3
-rw-r--r--gcc/testsuite/objc/execute/execute.exp3
11407 files changed, 278033 insertions, 20831 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index 7f9145bd69..cac2f59c96 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,4435 +1,5292 @@
-2013-04-11 Release Manager
+2014-10-30 Release Manager
- * GCC 4.7.3 released.
+ * GCC 4.9.2 released.
-2013-04-03 Jakub Jelinek <jakub@redhat.com>
+2014-10-29 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- PR debug/56819
- * g++.dg/debug/pr56819.C: New test.
+ * gcc.target/aarch64/madd_after_asm_1.c: New test.
-2013-04-03 Tobias Burnus <burnus@net-b.de>
+2014-10-27 Guozhi Wei <carrot@google.com>
- Backport from mainline:
- 2013-03-29 Tobias Burnus <burnus@net-b.de>
+ PR tree-optimization/63530
+ gcc.dg/vect/pr63530.c: New test.
- PR fortran/56737
- * testsuite/gfortran.dg/fmt_cache_3.f90: New.
+2014-10-27 Eric Botcazou <ebotcazou@adacore.com>
-2013-04-03 Richard Biener <rguenther@suse.de>
+ * gnat.dg/entry_queues2.adb: New test.
- PR tree-optimization/56501
- * gcc.dg/torture/pr56501.c: New testcase.
+2014-10-25 Yury Gribov <y.gribov@samsung.com>
-2013-04-03 Tobias Burnus <burnus@net-b.de>
+ PR sanitizer/63638
+ * c-c++-common/asan/pr63638.c: New test.
- Backport from mainline:
- 2013-03-28 Tobias Burnus <burnus@net-b.de>
+2014-10-24 Markus Trippelsdorf <markus@trippelsdorf.de>
+
+ PR bootstrap/63632
+ * g++.dg/torture/pr63632.C: New test.
- PR fortran/56735
- * gfortran.dg/namelist_80.f90: New.
+2014-10-21 Jakub Jelinek <jakub@redhat.com>
-2013-04-03 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/63563
+ * gcc.target/i386/pr63563.c: New test.
+
+2014-10-20 Yury Gribov <y.gribov@samsung.com>
Backported from mainline
- 2013-03-06 Jakub Jelinek <jakub@redhat.com>
+ 2014-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/asan/misalign-1.c: New test.
+ * c-c++-common/asan/misalign-2.c: New test.
- PR tree-optimization/56539
- * gcc.c-torture/compile/pr56539.c: New test.
+2014-10-17 Jakub Jelinek <jakub@redhat.com>
- 2013-03-05 Jakub Jelinek <jakub@redhat.com>
+ * c-c++-common/asan/instrument-with-calls-1.c: Add
+ -fno-sanitize=address -fsanitize=kernel-address to dg-options.
+ * c-c++-common/asan/instrument-with-calls-2.c: Likewise.
- PR debug/56510
- * gcc.dg/pr56510.c: New test.
+ PR tree-optimization/63302
+ * gcc.c-torture/execute/pr63302.c: New test.
-2013-04-02 Richard Biener <rguenther@suse.de>
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
- * gcc.dg/pr45472.c: Remove copies.
+ Backport from mainline
+ 2014-09-01 Yury Gribov <y.gribov@samsung.com>
-2013-04-02 Richard Biener <rguenther@suse.de>
+ PR sanitizer/61897
+ PR sanitizer/62140
- PR middle-end/56768
- * g++.dg/torture/pr56768.C: New testcase.
+ * c-c++-common/asan/pr62140-1.c: New test.
+ * c-c++-common/asan/pr62140-2.c: New test.
-2013-04-01 Andrey Belevantsev <abel@ispras.ru>
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
Backport from mainline
- 2013-02-27 Andrey Belevantsev <abel@ispras.ru>
-
- PR middle-end/45472
- * gcc.dg/pr45472.c: New test.
+ 2014-08-18 Yury Gribov <y.gribov@samsung.com>
+
+ PR sanitizer/62089
-2013-03-26 Richard Biener <rguenther@suse.de>
+ * c-c++-common/asan/pr62089.c: New test.
+ * c-c++-common/asan/bitfield-1.c: New test.
+ * c-c++-common/asan/bitfield-2.c: New test.
+ * c-c++-common/asan/bitfield-3.c: New test.
+ * c-c++-common/asan/bitfield-4.c: New test.
Backport from mainline
- 2013-03-13 Richard Biener <rguenther@suse.de>
+ 2014-08-28 Yury Gribov <y.gribov@samsung.com>
- PR tree-optimization/56608
- * gcc.dg/vect/fast-math-bb-slp-call-3.c: New testcase.
+ * c-c++-common/asan/pr62089.c: Fix test on 32-bit platforms.
- 2013-03-05 Richard Biener <rguenther@suse.de>
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
- PR tree-optimization/56270
- * gcc.dg/vect/slp-38.c: New testcase.
+ Backport from mainline
+ 2014-08-11 Yury Gribov <y.gribov@samsung.com>
+
+ * c-c++-common/asan/inc.c: Update test.
+ * c-c++-common/asan/instrument-with-calls-2.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-1.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-2.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-3.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-4.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-9.c: Likewise.
+
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
-2013-03-25 Oleg Endo <olegendo@gcc.gnu.org>
+ Backport from mainline
+ 2014-06-24 Max Ostapenko <m.ostapenko@partner.samsung.com>
- Backport from mainline:
- 2013-03-13 Oleg Endo <olegendo@gcc.gnu.org>
+ * c-c++-common/asan/no-redundant-instrumentation-9.c: New test.
- PR target/49880
- * gcc.target/sh/pr49880-1.c: New.
- * gcc.target/sh/pr49880-2.c: New.
- * gcc.target/sh/pr49880-3.c: New.
- * gcc.target/sh/pr49880-4.c: New.
- * gcc.target/sh/pr49880-5.c: New.
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
-2013-03-22 H.J. Lu <hongjiu.lu@intel.com>
+ Backport from mainline
+ 2014-06-16 Yury Gribov <y.gribov@samsung.com>
+
+ * c-c++-common/asan/instrument-with-calls-1.c: New test.
+ * c-c++-common/asan/instrument-with-calls-2.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-1.c: Update
+ test patterns.
+ * c-c++-common/asan/no-redundant-instrumentation-2.c:
+ Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-4.c:
+ Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-5.c:
+ Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-6.c:
+ Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-7.c:
+ Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-8.c:
+ Likewise.
- PR target/56560
- * gcc.target/i386/pr56560.c: New file.
+ Backport from mainline
+ 2014-06-18 Yury Gribov <y.gribov@samsung.com>
-2013-03-15 Tobias Burnus <burnus@net-b.de>
+ PR sanitizer/61530
- PR fortran/56615
- * gfortran.dg/transfer_intrinsic_5.f90: New.
+ * c-c++-common/asan/pr61530.c: New test.
-2013-03-14 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline
+ 2014-06-18 Yury Gribov <y.gribov@samsung.com>
- PR c++/56403
- * g++.dg/torture/pr56403.C: New test.
+ PR sanitizer/61547
-2013-03-13 Paul Thomas <pault@gcc.gnu.org>
+ * c-c++-common/asan/strlen-overflow-1.c: New test.
- PR fortran/56575
- * gfortran.dg/class_56.f90: New test.
+2014-10-16 Yury Gribov <y.gribov@samsung.com>
+
+ Backport from mainline
+ 2014-05-14 Yury Gribov <y.gribov@samsung.com>
-2013-03-10 Paul Thomas <pault@gcc.gnu.org>
+ PR sanitizer/61100
- PR fortran/55362
- * gfortran.dg/intrinsic_size_4.f90 : New test.
+ * c-c++-common/asan/asan-interface-1.c: New test.
+ * lib/asan-dg.exp (asan_include_flags): New function.
+ (asan_init): Call asan_include_flags to obtain path
+ to sanitizer headers.
-2013-03-09 Paolo Carlini <paolo.carlini@oracle.com>
+2014-10-15 Vladimir Makarov <vmakarov@redhat.com>
- PR c++/56534
- * g++.dg/template/crash115.C: New.
+ PR rtl-optimization/63448
+ * gcc.target/i386/pr63448.c: New test.
-2013-03-06 Jakub Jelinek <jakub@redhat.com>
+2014-10-15 Eric Botcazou <ebotcazou@adacore.com>
- PR c++/56543
- * g++.dg/template/typename20.C: New test.
+ * gnat.dg/opt41.adb: New test.
+ * gnat.dg/opt41_pkg.ad[sb]: New helper.
-2013-03-01 Richard Biener <rguenther@suse.de>
+2014-10-15 Richard Biener <rguenther@suse.de>
Backport from mainline
- 2012-12-12 Zdenek Dvorak <ook@ucw.cz>
+ 2014-08-15 Richard Biener <rguenther@suse.de>
- PR tree-optimization/55481
- * gcc.dg/torture/pr55481.c: New testcase.
- * gcc.dg/torture/pr56488.c: Likewise.
+ PR tree-optimization/62031
+ * gcc.dg/torture/pr62031.c: New testcase.
-2013-02-26 Jakub Jelinek <jakub@redhat.com>
+2014-10-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR tree-optimization/56443
- * gcc.dg/torture/pr56443.c: New test.
+ Backport from mainline r215880
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2013-02-22 Janus Weil <janus@gcc.gnu.org>
+ * g++.dg/ext/altivec-2.C: Compile with -Wno-deprecated to avoid
+ failing with the new warning message.
+ * gcc.dg/vmx/3c-01a.c: Likewise.
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
+ * gcc.dg/vmx/ops.c: Likewise.
+ * gcc.target/powerpc/altivec-20.c: Likewise.
+ * gcc.target/powerpc/altivec-6.c: Likewise.
+ * gcc.target/powerpc/altivec-vec-merge.c: Likewise.
+ * gcc.target/powerpc/vsx-builtin-8.c: Likewise.
+ * gcc.target/powerpc/warn-lvsl-lvsr.c: New test.
- PR fortran/56385
- * gfortran.dg/proc_ptr_comp_37.f90: New.
+ Backport from mainline r215882
+ 2014-10-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2013-02-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ * gcc.target/powerpc/lvsl-lvsr.c: New test.
- Backport from mainline:
- 2012-06-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ Backport from mainline r216017
+ 2014-10-08 Pat Haugen <pthaugen@us.ibm.com>
- * gcc.target/i386/clearcapv2.map: New file.
- * gcc.target/i386/i386.exp: Try it first before clearcap.map.
+ * gcc.dg/vmx/3c-01a.c: Add default options from vmx.exp.
+ * gcc.dg/vmx/ops.c: Likewise.
+ * gcc.dg/vmx/ops-long-1.c: Likewise.
-2013-02-19 Jakub Jelinek <jakub@redhat.com>
+2014-10-11 Christophe Lyon <christophe.lyon@linaro.org>
- Backported from mainline
- 2013-02-19 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline r216117.
+ 2014-10-11 Christophe Lyon <christophe.lyon@linaro.org>
+ * lib/target-supports.exp (check_effective_target_shared): New
+ function.
+ * g++.dg/ipa/devirt-28a.C: Check if -shared is supported.
- PR tree-optimization/56350
- * gcc.dg/pr56350.c: New test.
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
- 2013-02-08 Jakub Jelinek <jakub@redhat.com>
+ PR c/63495
+ * gcc.target/i386/pr63495.c: New test.
- PR tree-optimization/56250
- * gcc.c-torture/execute/pr56250.c: New test.
+2014-10-10 Richard Biener <rguenther@suse.de>
- 2013-02-07 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/63379
+ * gcc.dg/vect/pr63379.c: New testcase.
- PR c++/56241
- * g++.dg/parse/crash61.C: New test.
+2014-10-10 Jakub Jelinek <jakub@redhat.com>
- PR c++/56239
- * g++.dg/parse/pr56239.C: New test.
+ PR fortran/59488
+ * gfortran.dg/gomp/pr59488-1.f90: New test.
+ * gfortran.dg/gomp/pr59488-2.f90: New test.
- PR c++/56237
- * g++.dg/abi/mangle61.C: New test.
+2014-10-10 Richard Biener <rguenther@suse.de>
- 2013-02-06 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/63380
+ * gcc.dg/torture/pr63380-1.c: New testcase.
+ * gcc.dg/torture/pr63380-2.c: Likewise.
- PR middle-end/56217
- * g++.dg/gomp/pr56217.C: New test.
+2014-10-10 Uros Bizjak <ubizjak@gmail.com>
- 2012-11-27 Jakub Jelinek <jakub@redhat.com>
+ * g++.dg/cpp1y/feat-cxx14.C: Variable templates not in yet.
+ (dg-do): Use c++1y target.
- PR tree-optimization/55110
- * gcc.dg/pr55110.c: New test.
+2014-10-08 Edward Smith-Rowland <3dw4rd@verizon.net>
-2013-02-18 Richard Biener <rguenther@suse.de>
+ Implement SD-6: SG10 Feature Test Recommendations
+ * g++.dg/cpp1y/feat-cxx11-neg.C: New.
+ * g++.dg/cpp1y/feat-cxx11.C: New.
+ * g++.dg/cpp1y/feat-cxx14.C: New.
+ * g++.dg/cpp1y/feat-cxx98.C: New.
+ * g++.dg/cpp1y/feat-cxx98-neg.C: New.
+ * g++.dg/cpp1y/phoobhar.h: New.
+ * g++.dg/cpp1y/testinc/phoobhar.h: New.
- Revert
- 2013-02-04 Richard Biener <rguenther@suse.de>
+2014-10-03 Jan Hubicka <hubicka@ucw.cz>
- Backport from mainline
- 2012-07-04 Richard Guenther <rguenther@suse.de>
+ PR ipa/61144
+ * gcc.dg/tree-ssa/pr61144.c: New testcase.
- PR tree-optimization/53844
- * g++.dg/tree-ssa/pr53844.C: New testcase.
+2014-10-03 Jan Hubicka <hubicka@ucw.cz>
-2013-02-17 Tobias Burnus <burnus@net-b.de>
- Mikael Morin <mikael@gcc.gnu.org>
+ PR ipa/62121
+ * g++.dg/torture/pr62121.C: New testcase.
- Backport from trunk
- 2013-01-28 Tobias Burnus <burnus@net-b.de>
- Mikael Morin <mikael@gcc.gnu.org>
+2014-10-03 Jan Hubicka <hubicka@ucw.cz>
+
+ PR lto/62026
+ * g++.dg/lto/pr62026.C: New testcase.
+
+2014-10-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/61200
+ * c-c++-common/gomp/pr61200.c: New test.
+
+2014-10-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/63342
+ * gcc.dg/pr63342.c: New test.
+
+ PR target/63428
+ * gcc.dg/torture/vshuf-4.inc: Move test 122 from EXPTESTS
+ to test 24 in TESTS.
+
+ PR c++/63306
+ * g++.dg/ipa/pr63306.C: New test.
+
+ 2014-09-18 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR debug/63285
+ * gcc.target/i386/pr63285.c: New test.
+
+ 2014-09-10 Jan Hubicka <hubicka@ucw.cz>
+
+ PR tree-optimization/63186
+ * gcc.dg/pr63186.c: New testcase.
+
+2014-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/63282
+ * gcc.c-torture/compile/pr63282.c: New test.
+
+2014-09-29 James Clarke <jrtc27@jrtc27.com>
+
+ PR target/61407
+ * gcc.dg/darwin-minversion-1.c: Fixed formatting.
+ * gcc.dg/darwin-minversion-2.c: Fixed formatting.
+ * gcc.dg/darwin-minversion-3.c: Fixed formatting.
+ * gcc.dg/darwin-minversion-4.c: Added test for OS X 10.10.
+
+2014-09-26 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/compat/struct-layout-1_generate.c: Add -Wno-abi
+ to default options.
+
+2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR fortran/53537
- * gfortran.dg/import2.f90: Adjust undeclared type error messages.
- * gfortran.dg/import8.f90: Likewise.
- * gfortran.dg/interface_derived_type_1.f90: Likewise.
- * gfortran.dg/import10.f90: New test.
- * gfortran.dg/import11.f90: Likewise
+ Backport from mainline r215559
+ 2014-09-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2013-02-15 Tobias Burnus <burnus@net-b.de>
+ PR target/63335
+ * gcc.target/powerpc/pr63335.c: New test.
- PR fortran/56318
- * gcc/testsuite/gfortran.dg/matmul_9.f90: New.
+2014-09-25 Jakub Jelinek <jakub@redhat.com>
-2012-02-13 Tobias Burnus <burnus@net-b.de>
+ PR tree-optimization/63341
+ * gcc.dg/vect/pr63341-1.c: New test.
+ * gcc.dg/vect/pr63341-2.c: New test.
+
+ PR c++/63249
+ * g++.dg/gomp/pr63249.C: New test.
+ * c-c++-common/gomp/pr63249.c: New test.
+
+2014-09-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/62219
+ * g++.dg/cpp0x/lambda/lambda-template14.C: New.
+
+2014-09-22 Marek Polacek <polacek@redhat.com>
Backport from mainline
- 2012-01-09 Uros Bizjak <ubizjak@gmail.com>
+ 2014-05-21 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/61272
+ * g++.dg/ubsan/pr61272.C: New test.
- PR fortran/55852
- * gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times
- number matching more robust.
+2014-09-22 Jakub Jelinek <jakub@redhat.com>
-2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+ PR debug/63328
+ * c-c++-common/gomp/pr63328.c: New test.
+
+2014-09-18 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
- 2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+ 2014-09-18 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.dg/pr61053.c: Updated for x32.
+
+2014-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/62017
+ * g++.dg/asan/pr62017.C: New test.
+
+ PR testsuite/63292
+ * gcc.dg/vect/pr59594.c (b): Increase size to N + 2 elements.
+
+2014-09-18 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/torture/float128-exact-underflow.c: New test.
+
+2014-09-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/63284
+ * gcc.dg/pr63284.c: New test.
+
+2014-09-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/63241
+ * g++.dg/cpp0x/constexpr-63241.C: New.
+
+2014-09-12 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61654
+ * g++.dg/ipa/pr61654.C: New test.
+
+2014-09-11 Alan Lawrence <alan.lawrence@arm.com>
- PR rtl-optimization/56275
- * gcc.dg/pr56275.c: New test.
+ Backport r214953 from mainline
+ 2014-09-05 Alan Lawrence <alan.lawrence@arm.com>
-2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+ * gcc.target/aarch64/scalar_intrinsics.c (*): Replace all
+ int{32,16,8}x1_t with int{32,16,8}_t.
+ * gcc.target/aarch64/simd/vqdmlalh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmlslh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmullh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/simd/vqdmulls_lane_s32.c: Likewise.
+
+2014-09-10 Xinliang David Li <davidxl@google.com>
Backport from mainline
- 2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+ PR target/63209
+ * gcc.c-torture/execute/pr63209.c: New test.
- PR target/56043
- * gcc.target/powerpc/vsx-mass-1.c: Only run this test on
- powerpc*-*-linux*.
+2014-09-09 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ Backported from mainline
+ 2014-09-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/vsx-extract-1.c: Test 0th doubleword
+ regardless of endianness.
-2013-02-05 Richard Biener <rguenther@suse.de>
+2014-09-09 Richard Biener <rguenther@suse.de>
Backport from mainline
- 2012-12-10 Richard Biener <rguenther@suse.de>
+ 2014-08-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/62075
+ * gcc.dg/vect/pr62075.c: New testcase.
+
+ 2014-08-14 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/62079
+ * g++.dg/pr62079.C: New testcase.
+
+ 2014-08-26 Richard Biener <rguenther@suse.de>
- PR tree-optimization/55107
- * gcc.dg/torture/pr55107.c: New testcase.
- * gcc.dg/tree-ssa/ssa-pre-5.c: Adjust.
+ PR tree-optimization/62175
+ * g++.dg/torture/pr62175.C: New testcase.
-2013-02-15 Richard Biener <rguenther@suse.de>
+2014-09-08 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/54767
- * gfortran.fortran-torture/execute/pr54767.f90: New testcase.
+ PR tree-optimization/60196
+ PR tree-optimization/63189
+ * gcc.dg/vect/pr63189.c: New test.
+ * gcc.dg/vect/pr60196-1.c: New test.
+ * gcc.dg/vect/pr60196-2.c: New test.
-2013-02-04 Janis Johnson <janisjo@codesourcery.com>
+2014-09-06 John David Anglin <danglin@gcc.gnu.org>
- PR testsuite/56206
- * lib/target-supports.exp (check_effective_target_arm_hard_vfp_ok):
- Fix typo.
+ PR testsuite/56194
+ * g++.dg/init/const9.C: Skip scan-assembler-not "rodata" on hppa*-*-*.
-2013-02-04 Richard Biener <rguenther@suse.de>
+2014-09-05 Easwaran Raman <eraman@google.com>
Backport from mainline
- 2012-01-11 Richard Guenther <rguenther@suse.de>
+ PR rtl-optimization/62146
+ * testsuite/g++.dg/opt/pr62146.C: New.
- PR tree-optimization/44061
- * gcc.dg/pr44061.c: New testcase.
+2014-09-04 Guozhi Wei <carrot@google.com>
- 2013-01-08 Jakub Jelinek <jakub@redhat.com>
+ PR target/62040
+ * gcc.target/aarch64/pr62040.c: New test.
- PR middle-end/55890
- * gcc.dg/torture/pr55890-3.c: New test.
+2014-09-03 Martin Jambor <mjambor@suse.cz>
-2013-02-04 Richard Biener <rguenther@suse.de>
+ PR ipa/62015
+ * g++.dg/ipa/pr62015.C: New test.
+
+2014-09-03 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61986
+ * gcc.dg/ipa/pr61986.c: New test.
+
+2014-09-03 Marek Polacek <polacek@redhat.com>
Backport from mainline
- 2012-07-04 Richard Guenther <rguenther@suse.de>
+ 2014-09-02 Marek Polacek <polacek@redhat.com>
- PR tree-optimization/53844
- * g++.dg/tree-ssa/pr53844.C: New testcase.
+ PR fortran/62270
+ * gfortran.dg/pointer_intent_7.f90: Adjust dg-error.
- 2012-12-13 Richard Biener <rguenther@suse.de>
+2014-09-03 Marek Polacek <polacek@redhat.com>
- PR lto/55660
- * gcc.dg/lto/pr55660_0.c: New testcase.
- * gcc.dg/lto/pr55660_1.c: Likewise.
+ PR c/62294
+ * gcc.dg/pr56724-1.c: New test.
+ * gcc.dg/pr56724-2.c: New test.
+ * gcc.dg/pr62294.c: New test.
+ * gcc.dg/pr62294.h: New file.
-2013-02-04 Richard Biener <rguenther@suse.de>
+2014-09-01 Oleg Endo <olegendo@gcc.gnu.org>
- PR middle-end/55890
- * gcc.dg/torture/pr55890-1.c: New testcase.
- * gcc.dg/torture/pr55890-2.c: Likewise.
+ Backport from mainline
+ 2014-09-01 Oleg Endo <olegendo@gcc.gnu.org>
-2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
+ PR target/62312
+ * gcc.c-torture/compile/pr62312.c: New.
- Backport from trunk
- PR fortran/50627
- PR fortran/56054
- * gfortran.dg/block_12.f90: New test.
- * gfortran.dg/module_error_1.f90: New test.
+2014-09-01 Maciej W. Rozycki <macro@codesourcery.com>
-2013-02-01 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline
+ 2014-09-01 Maciej W. Rozycki <macro@codesourcery.com>
- Backported from mainline
- 2013-01-28 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/tree-ssa/loop-19.c: Exclude classic FPU Power targets.
- PR tree-optimization/56125
- * gcc.dg/pr56125.c: New test.
+2014-08-27 Guozhi Wei <carrot@google.com>
- 2013-01-25 Jakub Jelinek <jakub@redhat.com>
+ PR target/62262
+ * gcc.target/aarch64/pr62262.c: New test.
- PR tree-optimization/56098
- * gcc.dg/pr56098-1.c: New test.
+2014-08-26 Dominik Vogt <vogt@linux.vnet.ibm.com>
- 2013-01-23 Jakub Jelinek <jakub@redhat.com>
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
+ failure on s390*-*-linux-gnu.
- PR fortran/56052
- * gfortran.dg/gomp/pr56052.f90: New test.
+2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
- 2013-01-23 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline
+ 2014-08-24 Oleg Endo <olegendo@gcc.gnu.org>
- PR target/49069
- * gcc.dg/pr49069.c: New test.
+ PR target/61996
+ * gcc.target/sh/pr61996.c: New.
- 2013-01-21 Jakub Jelinek <jakub@redhat.com>
+2014-08-22 Igor Zamyatin <igor.zamyatin@intel.com>
- PR tree-optimization/56051
- * gcc.c-torture/execute/pr56051.c: New test.
+ PR other/62008
+ * c-c++-common/cilk-plus/AN/pr62008.c: New test.
- 2013-01-18 Jakub Jelinek <jakub@redhat.com>
+2014-08-21 Thomas Koenig <tkoenig@gcc.gnu.org>
- PR middle-end/56015
- * gfortran.dg/pr56015.f90: New test.
+ Backport from trunk
+ PR fortran/62214
+ * gfortran.dg/array_assignment_5.f90: New test.
- 2013-01-15 Jakub Jelinek <jakub@redhat.com>
+2014-08-20 Martin Jambor <mjambor@suse.cz>
+ Wei Mi <wmi@google.com>
- PR target/55940
- * gcc.dg/pr55940.c: New test.
+ PR ipa/60449
+ PR middle-end/61776
+ * testsuite/gcc.dg/lto/pr60449_1.c: New test.
+ * testsuite/gcc.dg/lto/pr60449_0.c: New test.
+ * testsuite/gcc.dg/pr61776.c: New test.
- 2013-01-10 Jakub Jelinek <jakub@redhat.com>
+2014-08-19 Janis Johnson <janisjo@codesourcery.com>
- PR tree-optimization/55921
- * gcc.c-torture/compile/pr55921.c: New test.
+ Backport from mainline:
+ 2014-08-19 Janis Johnson <janisjo@codesourcery.com>
- 2013-01-03 Jakub Jelinek <jakub@redhat.com>
+ * lib/target-supports.exp
+ (check_effective_target_arm_v8_neon_ok_nocache): Add
+ "-march-armv8-a" to compile flags.
- PR rtl-optimization/55838
- * gcc.dg/pr55838.c: New test.
+2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
- 2012-12-13 Jakub Jelinek <jakub@redhat.com>
+ Backport from trunk
+ PR fortran/62142
+ * gfortran.dg/realloc_on_assign_24.f90: New test.
- PR c++/55652
- * g++.dg/cpp0x/noexcept19.C: New test.
+2014-08-15 Tom de Vries <tom@codesourcery.com>
- 2012-12-06 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline:
+ 2014-08-14 Tom de Vries <tom@codesourcery.com>
- PR c++/54207
- * g++.dg/cpp0x/noexcept18.C: New test.
+ PR rtl-optimization/62004
+ PR rtl-optimization/62030
+ * gcc.dg/pr62004.c: New test.
+ * gcc.dg/pr62030.c: Same.
+ * gcc.target/mips/pr62030-octeon.c: Same.
- 2012-12-01 Jakub Jelinek <jakub@redhat.com>
+2014-08-15 Thomas Koenig <tkoenig@gcc.gnu.org>
- PR c++/55542
- * g++.dg/cpp0x/vt-55542.C: New test.
+ Backport from trunk
+ PR fortran/62106
+ * gfortran.dg/array_constructor_49.f90: New test.
- 2012-11-23 Jakub Jelinek <jakub@redhat.com>
+2014-08-15 Jakub Jelinek <jakub@redhat.com>
+ Tobias Burnus <burnus@net-b.de>
- PR c++/54046
- * g++.dg/warn/Wreturn-type-8.C: New test.
+ PR fortran/62131
+ * gfortran.dg/gomp/pr62131.f90: New test.
- 2012-11-20 Jakub Jelinek <jakub@redhat.com>
+2014-08-14 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- PR middle-end/55094
- * gcc.dg/pr55094.c: New test.
+ Backport from mainline
+ 2014-08-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
- 2012-11-17 Jakub Jelinek <jakub@redhat.com>
+ PR target/61713
+ * gcc.dg/pr61756.c: New test.
- PR tree-optimization/55236
- * gcc.dg/pr55236.c: New test.
+2014-08-14 Thomas Preud'homme <thomas.preudhomme@arm.com>
- 2012-11-13 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline
+ 2014-08-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
- PR rtl-optimization/54127
- * gcc.dg/torture/pr54127.c: New test.
+ PR middle-end/62103
+ * gcc.c-torture/execute/bitfld-6.c: New test.
-2013-02-01 Eric Botcazou <ebotcazou@adacore.com>
+2014-08-12 Felix Yang <fei.yang0953@gmail.com>
- * gnat.dg/opt26.adb: New test.
+ PR tree-optimization/62073
+ * gcc.dg/vect/pr62073.c: New test.
-2013-01-27 Uros Bizjak <ubizjak@gmail.com>
+2014-08-12 Janis Johnson <janisjo@codesourcery.com>
Backport from mainline
- 2013-01-22 Uros Bizjak <ubizjak@gmail.com>
+ 2014-08-12 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/target/supports.exp
+ (check_effective_target_arm_v8_neon_ok_nocache): Check for armv8
+ or later.
- PR target/56028
- * gcc.target/i386/pr56028.c: New test.
+ * gcc.dg/pr59418.c: Don't add ARM options for a Thumb1 multilib.
- 2013-01-24 Uros Bizjak <ubizjak@gmail.com>
+ * gcc.target/arm/neon-vext-execute.c: Skip if the test won't run
+ on Neon hardware.
- * gcc.target/i386/movsd.c: New test.
+ * gcc.target/arm/pr48784.c: Skip for thumb1 multilib.
+ * gcc.target/arm/pr59985.c: Likewise.
-2013-01-24 Janis Johnson <janisjo@codesourcery.com>
+2014-08-12 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/61962
+ * c-c++-common/cilk-plus/AN/pr61962.c: New test.
+
+2014-08-12 Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
Backport from mainline
- 2013-01-16 Janis Johnson <janisjo@codesourcery.com>
+ 2014-06-16 Ganesh Gopalasubramanian
+ <Ganesh.Gopalasubramanian@amd.com>
+
+ * gcc.target/i386/xop-imul64-vector.c: Remove the check for
+ vpmacsdql instruction.
- PR testsuite/55994
- * gcc.c-torture/execute/builtins/builtins.exp: Add
- -Wl,--allow-multiple-definition for eabi and elf targets.
+2014-08-11 Janis Johnson <janisjo@codesourcery.com>
Backport from mainline
- 2013-01-17 Janis Johnson <janisjo@codesourcery.com>
+ 2014-08-11 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_thumb1_ok,
+ check_effective_target_arm_thumb2_ok): Test with code that passes
+ an argument and returns a result.
+
+ * gcc.target/arm/frame-pointer-1.c: Skip if Thumb is not supported.
+ * gcc.target/arm/pr56184.C: Likewise.
+ * gcc.target/arm/pr59896.c: Likewise.
+ * gcc.target/arm/stack-red-zone.c: Likewise.
+ * gcc.target/arm/thumb-find-work-register.c: Likewise.
+
+2014-08-10 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ Backport from trunk
+ PR fortran/61999
+ * gfortran.dg/dot_product_3.f90: New test case.
+
+2014-08-07 John David Anglin <danglin@gcc.gnu.org>
- * gcc.target/arm/pr51835.c: Avoid conflicts with multilib flags.
- * gcc.target/arm/pr51915.c: Likewise.
- * gcc.target/arm/pr52006.c: Likewise.
- * gcc.target/arm/pr53187.c: Likewise.
+ PR tree-optimization/60707
+ * gfortran.dg/pr45636.f90: xfail on 32-bit hppa*-*-*.
+
+ * gcc.dg/atomic/c11-atomic-exec-4.c: Undefine _POSIX_C_SOURCE before
+ defining in dg-options.
+ * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
+
+ * gcc.dg/atomic/stdatomic-flag.c: Add xfail comment.
+
+ * gcc.c-torture/compile/pr60655-1.c: Don't add -fdata-sections option
+ on 32-bit hppa-hpux.
+
+ * gcc.dg/pr57233.c: Add -fno-common option on hppa*-*-hpux*.
+
+2014-08-07 Petr Murzin <petr.murzin@intel.com>
+
+ * gcc.target/i386/avx512f-vfixupimmpd-2.c: Include float.h instead of
+ values.h, change MAXDOUBLE for DBL_MAX.
+ * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmps-2.c: Include float.h instead of
+ values.h, change MAXFLOAT for FLT_MAX.
+ * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2d-2.c: Do not include values.h.
+ * gcc.target/i386/avx512f-vpermi2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2q-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2d-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2q-2.c: Ditto.
+
+2014-08-06 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR debug/61923
+ * gcc.target/i386/pr61923.c: New test.
+
+2014-08-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: Rewritten.
+
+2014-08-04 Rohit <rohitarulraj@freescale.com>
+
+ PR target/60102
+ * gcc.target/powerpc/pr60102.c: New testcase.
+
+2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR other/61963
+ * c-c++-common/cilk-plus/AN/pr61963.c: New test.
+
+2014-08-01 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/61455
+ * c-c++-common/cilk-plus/AN/pr61455.c: New test.
+ * c-c++-common/cilk-plus/AN/pr61455-2.c: Likewise.
+
+2014-08-01 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
- 2012-10-12 Janis Johnson <janisjo@codesourcery.com>
+ 2014-06-13 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR tree-optimization/61375
+ * gcc.c-torture/execute/pr61375-1.c: New test.
+
+2014-08-01 Richard Biener <rguenther@suse.de>
- * lib/target-supports.exp (check_effective_target_arm_hard_vfp_ok):
- Return 0 if already specifying -mfloat-abi other than hard.
+ PR tree-optimization/61964
+ * gcc.dg/torture/pr61964.c: New testcase.
+ * gcc.dg/pr51879-18.c: XFAIL.
+
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: Fix testcase.
+
+2014-07-28 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/61801
+ * gcc.target/i386/pr61801.c: New testcase.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Backport from mainline
- 2012-09-27 Janis Johnson <janisjo@codesourcery.com>
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
- * gcc.target/arm/unsigned-extend-1.c: Omit -march option.
+ * gcc.target/powerpc/ppc64-abi-warn-3.c: New test.
+
+ * gcc.c-torture/execute/20050316-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050604-1.x: Add -Wno-psabi.
+ * gcc.c-torture/execute/20050316-3.x: New file. Add -Wno-psabi.
+ * gcc.c-torture/execute/pr23135.x: Likewise.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Backport from mainline
- 2012-09-26 Janis Johnson <janisjo@codesourcery.com>
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-warn-2.c: New test.
- * gcc.target/arm/pr42879.c: Handle big-endian.
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Backport from mainline
- 2012-09-26 Janis Johnson <janisjo@codesourcery.com>
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
- * gcc.target/arm/combine-movs.c
+ * gcc.target/powerpc/ppc64-abi-warn-1.c: New test.
+
+2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
Backport from mainline
- 2012-09-11 Christophe Lyon <christophe.lyon@linaro.org>
+ 2014-07-24 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
- * gcc.target/arm/neon-vset_lanes8.c: Fix for big-endian support.
+ * g++.dg/compat/struct-layout-1.exp: Load g++-dg.exp.
-2013-01-24 Janus Weil <janus@gcc.gnu.org>
+2014-07-24 Martin Jambor <mjambor@suse.cz>
- PR fortran/56081
- * gfortran.dg/select_8.f90: New.
+ PR ipa/61160
+ * g++.dg/ipa/pr61160-2.C (main): Return zero.
+ * g++.dg/ipa/pr61160-3.C (main): Likewise.
-2013-01-24 Martin Jambor <mjambor@suse.cz>
+2014-07-21 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
- 2013-01-04 Martin Jambor <mjambor@suse.cz>
+ 2014-07-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/61855
+ * gcc.target/i386/pr61855.c: New test.
- PR tree-optimization/55755
- * gcc.dg/torture/pr55755.c: New test.
- * gcc.dg/tree-ssa/sra-13.c: Likewise.
- * gcc.dg/tree-ssa/pr45144.c: Update.
+2014-07-20 Eric Botcazou <ebotcazou@adacore.com>
-2013-01-21 Uros Bizjak <ubizjak@gmail.com>
+ * gnat.dg/pack20.ad[sb]: New test.
+ * gnat.dg/pack20_pkg.ads: New helper.
- PR rtl-optimization/56023
- * gcc.dg/pr56023.c: New test.
+2014-07-19 Eric Botcazou <ebotcazou@adacore.com>
-2013-01-21 Martin Jambor <mjambor@suse.cz>
+ * gcc.dg/stack-usage-2.c: Adjust.
+
+2014-07-19 Paul Thomas <pault@gcc.gnu.org>
Backport from mainline
- 2013-01-17 Martin Jambor <mjambor@suse.cz>
+ PR fortran/61780
+ * gfortran.dg/dependency_44.f90 : New test
+
+2014-07-18 Uros Bizjak <ubizjak@gmail.com>
- PR tree-optimizations/55264
- * g++.dg/ipa/pr55264.C: New test.
+ Backport from mainline
+ 2014-07-18 Uros Bizjak <ubizjak@gmail.com>
-2013-01-17 Uros Bizjak <ubizjak@gmail.com>
+ PR target/61794
+ * gcc.target/i386/pr61794.c: New test.
+
+2014-07-17 Richard Biener <rguenther@suse.de>
Backport from mainline
- 2013-01-17 Uros Bizjak <ubizjak@gmail.com>
+ 2014-07-10 Richard Biener <rguenther@suse.de>
- PR target/55981
- * gcc.target/pr55981.c: New test.
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: Use signed char.
-2013-01-17 Janus Weil <janus@gcc.gnu.org>
+ 2014-07-09 Richard Biener <rguenther@suse.de>
- PR fortran/55983
- * gfortran.dg/class_55.f90: New.
+ PR c-family/61741
+ * c-c++-common/torture/pr61741.c: New testcase.
-2013-01-16 Richard Biener <rguenther@suse.de>
+2014-07-17 Richard Biener <rguenther@suse.de>
- PR middle-end/55882
- * gcc.dg/torture/pr55882.c: New testcase.
+ Backport from mainline
+ 2014-07-14 Richard Biener <rguenther@suse.de>
-2013-01-13 Janus Weil <janus@gcc.gnu.org>
+ PR tree-optimization/61779
+ * gcc.dg/tree-ssa/ssa-copyprop-2.c: New testcase.
- PR fortran/55072
- * gfortran.dg/internal_pack_13.f90: New test.
- * gfortran.dg/internal_pack_14.f90: New test.
+2014-07-16 Release Manager
-2013-01-13 Paul Thomas <pault@gcc.gnu.org>
+ * GCC 4.9.1 released.
- PR fortran/55618
- * gfortran.dg/elemental_scalar_args_2.f90: New test.
+2014-07-10 Eric Botcazou <ebotcazou@adacore.com>
-2013-01-08 Mikael Morin <mikael@gcc.gnu.org>
+ * gnat.dg/opt39.adb: New test.
- PR fortran/42769
- PR fortran/45836
- PR fortran/45900
- * gfortran.dg/use_23.f90: New test.
- * gfortran.dg/use_24.f90: New test.
- * gfortran.dg/use_25.f90: New test.
- * gfortran.dg/use_26.f90: New test.
- * gfortran.dg/use_27.f90: New test.
+2014-07-09 Edward Smith-Rowland <3dw4rd@verizon.net>
-2013-01-07 Tobias Burnus <burnus@net-b.de>
+ PR c++/58155 - -Wliteral-suffix warns about tokens which are skipped
+ g++.dg/cpp0x/pr58155.C: New.
- PR fortran/55852
- * gfortran.dg/intrinsic_size_3.f90: New.
+2014-07-09 Alan Lawrence <alan.lawrence@arm.com>
-2013-01-07 Steven G. Kargl <kargl@gcc.gnu.org>
- Mikael Morin <mikael@gcc.gnu.org>
+ Backport r211369 from trunk.
+ 2014-06-09 Alan Lawrence <alan.lawrence@arm.com>
- PR fortran/55827
- * gfortran.dg/use_22.f90: New test.
+ PR target/61062
+ * gcc.target/arm/pr48252.c (main): Expect same result as
+ endian-neutral.
-2013-01-07 Terry Guo <terry.guo@arm.com>
+2014-07-08 Jakub Jelinek <jakub@redhat.com>
- Backport from mainline
- 2012-12-19 Terry Guo <terry.guo@arm.com>
+ PR rtl-optimization/61673
+ * gcc.c-torture/execute/pr61673.c: New test.
- * gcc.target/arm/thumb-find-work-register.c: New.
+2014-07-08 Richard Biener <rguenther@suse.de>
-2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
+ PR tree-optimization/61680
+ * gcc.dg/vect/pr61680.c: New testcase.
- * gnat.dg/alignment10.adb: New test.
+ PR tree-optimization/61681
+ * gcc.dg/torture/pr61681.c: New testcase.
-2012-12-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-07-08 Alan Lawrence <alan.lawrence@arm.com>
- Backport from mainline:
- 2012-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ Backport r211502 from mainline.
+ 2014-06-10 Alan Lawrence <alan.lawrence@arm.com>
- * gcc.misc-tests/gcov-12.c: Fix dg order.
+ PR target/59843
+ * gcc.dg/vect/vect-singleton_1.c: New file.
- 2012-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-07-08 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/torture/pr47917.c: Change "dg-xfail-if" to "dg-xfail-run-if"
- for *-*-hpux10*.
+ PR tree-optimization/61725
+ * gcc.dg/tree-ssa/vrp93.c: New test.
+ * gcc.c-torture/execute/pr61725.c: New test.
- 2012-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-07-07 Paul Thomas <pault@gcc.gnu.org>
- * gcc.dg/20030711-1.c: Define MAP_FAILED if not defined.
- * gcc.dg/20050826-1.c: Likewise.
+ PR fortran/61459
+ PR fortran/58883
+ * gfortran.dg/allocatable_function_8.f90 : New test
-2012-12-21 Martin Jambor <mjambor@suse.cz>
+2014-07-07 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Mikael Morin <mikael@gcc.gnu.org>
- PR tree-optimization/55355
- * g++.dg/torture/pr55355.C: New test.
+ PR fortran/41936
+ * gfortran.dg/class_array_15.f03: Check memory leaks.
-2012-12-20 Tobias Burnus <burnus@net-b.de>
+2014-07-06 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ Backport from mainline.
+ PR libgfortran/61640
+ * gfortran.dg/arrayio_16.f90: New test.
- PR fortran/54818
- * gfortran.dg/transfer_intrinsic_4.f: New.
+2014-07-04 Jakub Jelinek <jakub@redhat.com>
-2012-12-18 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
+ PR middle-end/61654
+ * g++.dg/opt/pr61654.C: New test.
+ PR tree-optimization/61684
+ * gcc.c-torture/compile/pr61684.c: New test.
+
+ PR c++/61382
Backport from mainline
- 2012-10-15 Matthias Klose <doko@ubuntu.com>
+ 2014-06-05 Andreas Schwab <schwab@suse.de>
+
+ * g++.dg/cpp0x/initlist86.C (main): Initialize i.
+
+2014-07-02 Jakub Jelinek <jakub@redhat.com>
+ Fritz Reese <Reese-Fritz@zai.com>
- * lib/target-supports.exp (check_profiling_available): Match
- arm*-*-linux-* for ARM Linux/GNU.
- * g++.dg/torture/predcom-1.C: Match arm*-*-linux-* for ARM Linux/GNU.
- * gfortran.dg/enum_10.f90: Likewise.
- * gfortran.dg/enum_9.f90: Likewise.
- * gcc.target/arm/synchronize.c: Likewise.
- * g++.old-deja/g++.jason/enum6.C: Likewise.
- * g++.old-deja/g++.other/enum4.C: Likewise.
- * g++.old-deja/g++.law/enum9.C: Likewise.
+ * gfortran.dg/oldstyle_5.f: New test.
-2012-12-15 Eric Botcazou <ebotcazou@adacore.com>
+2014-07-01 Paul Pluzhnikov <ppluzhnikov@google.com>
- PR ada/53766
- * gnat.dg/controlled7.ad[sb]: New test.
+ PR c++/58753
+ PR c++/58930
+ PR c++/58704
+
+ Backported from mainline
+ 2014-05-20 Paolo Carlini <paolo.carlini@oracle.com>
-2012-12-11 Jakub Jelinek <jakub@redhat.com>
+ * g++.dg/cpp0x/nsdmi-template11.C: New.
+ * g++.dg/cpp0x/nsdmi-template12.C: Likewise.
+ * g++.dg/cpp0x/nsdmi-template13.C: Likewise.
- PR c++/55643
- * g++.dg/warn/Wunused-var-19.C: New test.
+2014-06-28 Edward Smith-Rowland <3dw4rd@verizon.net>
-2012-12-11 Eric Botcazou <ebotcazou@adacore.com>
+ PR c++/58781
+ PR c++/60249
+ PR c++/59867
+ * testsuite/g++.dg/cpp0x/pr58781.C: New.
+ * testsuite/g++.dg/cpp0x/pr60249.C: New.
+ * testsuite/g++.dg/cpp1y/pr59867.C: New.
- * gcc.dg/pr54121.c: New test.
+2014-06-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-12-07 Uros Bizjak <ubizjak@gmail.com>
+ * gfortran.dg/round_4.f90: Skip for powerpc*-*-linux* since the
+ test requires greater precision than the current PowerPC long
+ double implementation supports.
+
+2014-06-30 Jakub Jelinek <jakub@redhat.com>
+
+ Backported from mainline
+ 2014-06-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57233
+ PR tree-optimization/61299
+ * gcc.dg/pr57233.c: New test.
+ * gcc.target/i386/pr57233.c: New test.
+ * gcc.target/i386/sse2-pr57233.c: New test.
+ * gcc.target/i386/avx-pr57233.c: New test.
+ * gcc.target/i386/avx2-pr57233.c: New test.
+ * gcc.target/i386/avx512f-pr57233.c: New test.
+ * gcc.target/i386/xop-pr57233.c: New test.
+
+ 2014-06-24 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/udr2.f90 (f7, f9): Add !$omp parallel with
+ reduction clause.
+ * gfortran.dg/gomp/udr4.f90 (f4): Likewise.
+ Remove Label is never defined expected error.
+ * gfortran.dg/gomp/udr8.f90: New test.
+
+ 2014-06-18 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/declare-simd-1.f90: New test.
+ * gfortran.dg/gomp/depend-1.f90: New test.
+ * gfortran.dg/gomp/target1.f90: New test.
+ * gfortran.dg/gomp/target2.f90: New test.
+ * gfortran.dg/gomp/target3.f90: New test.
+ * gfortran.dg/gomp/udr4.f90: Adjust expected diagnostics.
+ * gfortran.dg/openmp-define-3.f90: Expect _OPENMP 201307 instead of
+ 201107.
+
+ 2014-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/60928
+ * gfortran.dg/gomp/allocatable_components_1.f90: Remove dg-error
+ directives.
+ * gfortran.dg/gomp/associate1.f90: New test.
+ * gfortran.dg/gomp/intentin1.f90: New test.
+ * gfortran.dg/gomp/openmp-simd-1.f90: New test.
+ * gfortran.dg/gomp/openmp-simd-2.f90: New test.
+ * gfortran.dg/gomp/openmp-simd-3.f90: New test.
+ * gfortran.dg/gomp/proc_ptr_2.f90: New test.
+
+ 2014-06-09 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/udr6.f90 (f1, f2, f3): Use complex(kind=8)
+ instead of complex(kind=16).
+
+ 2014-06-06 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/allocatable_components_1.f90: Adjust for
+ reduction clause diagnostic changes.
+ * gfortran.dg/gomp/appendix-a/a.31.3.f90: Likewise.
+ * gfortran.dg/gomp/reduction1.f90: Likewise.
+ * gfortran.dg/gomp/reduction3.f90: Likewise.
+ * gfortran.dg/gomp/udr1.f90: New test.
+ * gfortran.dg/gomp/udr2.f90: New test.
+ * gfortran.dg/gomp/udr3.f90: New test.
+ * gfortran.dg/gomp/udr4.f90: New test.
+ * gfortran.dg/gomp/udr5.f90: New test.
+ * gfortran.dg/gomp/udr6.f90: New test.
+ * gfortran.dg/gomp/udr7.f90: New test.
+
+ 2014-05-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/60127
+ * gfortran.dg/gomp/omp_do_concurrent.f90: New.
+
+ 2014-05-11 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/gomp/affinity-1.f90: New test.
+
+2014-06-30 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * gcc.dg/typeof-2.c: New testcase.
+
+2014-06-30 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/vqdmulhh_lane_s16.c: New test.
+ * gcc.target/aarch64/vqdmulhs_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqrdmulhh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqrdmulhs_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_high_lane_s16.c: New test.
+ * gcc.target/aarch64/vqdmlal_high_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_high_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_high_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlal_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlalh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlals_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_high_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_high_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_high_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_high_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlsl_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmlslh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmlsls_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmulh_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmulh_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmulhq_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmulhq_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmull_high_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmull_high_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmull_high_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmull_high_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmull_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmull_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmull_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmull_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqdmullh_lane_s16.c: Likewise.
+ * gcc.target/aarch64/vqdmulls_lane_s32.c: Likewise.
+ * gcc.target/aarch64/vqrdmulh_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqrdmulh_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vqrdmulhq_laneq_s16.c: Likewise.
+ * gcc.target/aarch64/vqrdmulhq_laneq_s32.c: Likewise.
+ * gcc.target/aarch64/vector_intrinsics.c: Simplify arm_neon.h include.
+ (test_vqdmlal_high_lane_s16): Fix parameter type.
+ (test_vqdmlal_high_lane_s32): Likewise.
+ (test_vqdmull_high_lane_s16): Likewise.
+ (test_vqdmull_high_lane_s32): Likewise.
+ (test_vqdmlsl_high_lane_s32): Likewise.
+ (test_vqdmlsl_high_lane_s16): Likewise.
+ * gcc.target/aarch64/scalar_intrinsics.c (test_vqdmlalh_lane_s16):
+ Fix argument type.
+ (test_vqdmlals_lane_s32): Likewise.
+ (test_vqdmlslh_lane_s16): Likewise.
+ (test_vqdmlsls_lane_s32): Likewise.
+ (test_vqdmulhh_lane_s16): Likewise.
+ (test_vqdmulhs_lane_s32): Likewise.
+ (test_vqdmullh_lane_s16): Likewise.
+ (test_vqdmulls_lane_s32): Likewise.
+ (test_vqrdmulhh_lane_s16): Likewise.
+ (test_vqrdmulhs_lane_s32): Likewise.
+
+2014-06-30 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ PR middle-end/57541
+ * c-c++-common/cilk-plus/AN/pr57541.c: New case added.
+ * c-c++-common/cilk-plus/AN/pr57541-2.c: New test.
+
+2014-06-30 Thomas Preud'homme <thomas.preudhomme@arm.com>
Backport from mainline
- 2012-12-06 Uros Bizjak <ubizjak@gmail.com>
+ 2014-06-11 Thomas Preud'homme <thomas.preudhomme@arm.com>
+
+ PR tree-optimization/61306
+ * gcc.c-torture/execute/pr61306-1.c: New test.
+ * gcc.c-torture/execute/pr61306-2.c: Likewise.
+ * gcc.c-torture/execute/pr61306-3.c: Likewise.
- PR target/55597
- * gcc.target/i386/pr55597.c: New test.
+2014-06-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
-2012-12-03 Richard Biener <rguenther@suse.de>
+ Backport from mainline.
+ PR libgfortran/61499
+ * gfortran.dg/arrayio_15.f90: New test.
+
+2014-06-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gfortran.dg/nint_2.f90: Don't XFAIL for powerpc64le-*-linux*.
+
+2014-06-27 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/61614
+ * g++.dg/ext/complit14.C: New.
+
+2014-06-27 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61160
+ * g++.dg/ipa/pr61160-2.C: New test.
+ * g++.dg/ipa/pr61160-3.C: Likewise.
+
+2014-06-27 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
- 2012-09-24 Richard Guenther <rguenther@suse.de>
+ 2014-06-26 Uros Bizjak <ubizjak@gmail.com>
- PR tree-optimization/53663
- * gcc.dg/torture/pr53663-1.c: New testcase.
- * gcc.dg/torture/pr53663-2.c: Likewise.
- * gcc.dg/torture/pr53663-3.c: Likewise.
+ PR target/61586
+ * gcc.target/alpha/pr61586.c: New test.
-2012-12-03 Marek Polacek <polacek@redhat.com>
+2014-06-26 Adam Butcher <adam@jessamine.co.uk>
- Backported from mainline
- 2012-12-03 Marek Polacek <polacek@redhat.com>
+ PR c++/61537
+ * g++.dg/template/pr61537.C: New testcase.
- PR c/55570
- * gcc.dg/pr55570.c: New test.
+2014-06-26 Martin Jambor <mjambor@suse.cz>
-2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ * g++.dg/ipa/pr60600.C: Fix typo.
+ * g++.dg/ipa/devirt-25.C: Likewise.
+ * g++.dg/ipa/pr61540.C: Likewise.
- * gcc.dg/torture/pr54920.c: Add "-fno-common" option on hppa*-*-hpux*.
+2014-06-26 Martin Jambor <mjambor@suse.cz>
-2012-11-29 Jason Merrill <jason@redhat.com>
+ * g++.dg/ipa/pr61540.C: Remove dumping test.
- PR c++/53862
- * g++.dg/cpp0x/variadic134.C: New.
+2014-06-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR c++/53858
- * g++.dg/cpp0x/alias-decl-20.C: New.
+ * gfortran.dg/default_format_denormal_2.f90: Remove xfail for
+ powerpc*-*-linux*.
+
+2014-06-23 Alan Modra <amodra@gmail.com>
+
+ * gcc.dg/pr61583.c: New.
+
+2014-06-20 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/61540
+ * g++.dg/ipa/pr61540.C: New test.
- PR c++/50852
- * g++.dg/template/typedef39.C: New.
+2014-06-17 Yufeng Zhang <yufeng.zhang@arm.com>
- PR c++/53039
- * g++.dg/cpp0x/variadic133.C: New.
- * g++.dg/template/param1.C: Adjust.
+ PR target/61483
+ * gcc.target/aarch64/aapcs64/type-def.h (struct hfa_fx2_t): New type.
+ * gcc.target/aarch64/aapcs64/va_arg-13.c: New test.
+ * gcc.target/aarch64/aapcs64/va_arg-14.c: Ditto.
+ * gcc.target/aarch64/aapcs64/va_arg-15.c: Ditto.
-2012-11-27 Richard Biener <rguenther@suse.de>
+2014-06-17 Richard Biener <rguenther@suse.de>
- PR middle-end/55331
- * g++.dg/opt/pr55331.C: New testcase.
+ PR lto/61012
+ * gcc.dg/lto/pr61526_0.c: New testcase.
+ * gcc.dg/lto/pr61526_1.c: Likewise.
-2012-11-26 Richard Biener <rguenther@suse.de>
+2014-06-17 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
- 2012-10-12 Richard Biener <rguenther@suse.de>
+ 2014-06-06 Uros Bizjak <ubizjak@gmail.com>
- PR tree-optimization/54894
- * gcc.dg/torture/pr54894.c: New testcase.
+ PR target/61423
+ * gcc.target/i386/pr61423.c: New test.
- 2012-10-02 Richard Guenther <rguenther@suse.de>
+2014-06-15 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
- PR middle-end/54735
- * g++.dg/torture/pr54735.C: New testcase.
+ Backport from trunk.
+ PR fortran/45187
+ * gfortran.dg/cray_pointers_10.f90: New file.
-2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
+2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
- PR c++/55446
- * g++.dg/init/new41.C: New.
+ Backport from mainline
-2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+ 2014-06-13 Peter Bergner <bergner@vnet.ibm.com>
+ PR target/61415
+ * lib/target-supports.exp (check_effective_target_longdouble128): New.
+ * gcc.target/powerpc/pack02.c: Use it.
+ * gcc.target/powerpc/tfmode_off.c: Likewise.
- PR fortran/55314
- Backport from trunk
- * gfortran.dg/allocate_error_4.f90: New test.
+2014-06-13 Jeff Law <law@redhat.com>
-2012-11-23 Janus Weil <janus@gcc.gnu.org>
+ Backports from mainline:
- PR fortran/55352
- * gfortran.dg/namelist_76.f90: New.
+ 2014-06-13 Ilya Enkovich <ilya.enkovich@intel.com>
-2012-11-19 H.J. Lu <hongjiu.lu@intel.com>
+ PR rtl-optimization/61094
+ PR rtl-optimization/61446
+ * gcc.target/i386/pr61446.c : New.
- Backported from mainline
- 2012-11-13 H.J. Lu <hongjiu.lu@intel.com>
+ 2014-06-02 Jeff Law <law@redhat.com>
- PR middle-end/55142
- * gcc.target/i386/pr55142-1.c: New file.
- * gcc.target/i386/pr55142-2.c: Likewise.
+ PR rtl-optimization/61094
+ * g++.dg/pr61094: New test.
-2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+2014-06-12 Jakub Jelinek <jakub@redhat.com>
- * gnat.dg/stack_check3.ad[sb]: New test.
+ PR middle-end/61486
+ * c-c++-common/gomp/pr61486-1.c: New test.
+ * c-c++-common/gomp/pr61486-2.c: New test.
-2012-11-07 Eric Botcazou <ebotcazou@adacore.com>
+2014-06-12 Jeff Law <law@redhat.com>
- * gcc.c-torture/compile/20121107-1.c: New test.
+ Backports from mainline:
+ 2014-06-05 Jeff Law <law@redhat.com>
-2012-11-06 Janus Weil <janus@gcc.gnu.org>
+ PR tree-optimization/61289
+ * g++.dg/pr61289.C: New test.
+ * g++.dg/pr61289-2.C: New test.
- PR fortran/54917
- * gfortran.dg/transfer_class_1.f90: New.
+2014-06-12 Georg-Johann Lay <avr@gjlay.de>
-2012-11-05 Eric Botcazou <ebotcazou@adacore.com>
+ Backport from 2014-06-12 trunk r211491
- * g++.dg/torture/20121105-1.C: New test.
+ PR target/61443
+ * gcc.target/avr/torture/pr61443.c: New test.
-2012-11-05 Jakub Jelinek <jakub@redhat.com>
+2014-06-11 Richard Biener <rguenther@suse.de>
- Backported from mainline
- 2012-10-24 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/61452
+ * gcc.dg/torture/pr61452.c: New testcase.
- PR debug/54828
- * g++.dg/debug/pr54828.C: New test.
+2014-06-11 Richard Biener <rguenther@suse.de>
- 2012-10-23 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/61456
+ * g++.dg/opt/pr61456.C: New testcase.
- PR c++/54988
- * c-c++-common/pr54988.c: New test.
+2014-06-09 Paul Thomas <pault@gcc.gnu.org>
- 2012-10-10 Jakub Jelinek <jakub@redhat.com>
+ Backport from trunk.
+ PR fortran/61406
+ * gfortran.dg/associate_17.f90 : New test
- PR tree-optimization/54877
- * gcc.dg/torture/pr54877.c: New test.
+2014-06-07 Jerry DeLisle <jvdelisle@gcc.gnu>
-2012-11-02 Jeff Law <law@redhat.com>
+ Backport from trunk.
+ PR libfortran/61173
+ * gfortran.dg/arrayio_14.f90: New test.
- * gcc.c-torture/execute/pr54985.c: New test.
+2014-06-07 Eric Botcazou <ebotcazou@adacore.com>
-2012-10-29 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/opt38.adb: New test.
+ * gnat.dg/opt38_pkg.ad[sb]: New helper.
- PR ada/53517
- * gnat.dg/lto14.adb: Skip on Solaris.
+2014-06-04 Richard Biener <rguenther@suse.de>
-2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
+ PR tree-optimization/61383
+ * gcc.dg/torture/pr61383-1.c: New testcase.
- PR c++/54984
- * g++.dg/template/new11.C: New.
+2014-06-04 Igor Zamyatin <igor.zamyatin@intel.com>
-2012-10-26 Terry Guo <terry.guo@arm.com>
+ PR c/58942
+ * c-c++-common/cilk-plus/AN/pr58942.c: Check for correct handling of
+ the case with a pointer.
- Backport from mainline
- 2012-10-23 Terry Guo <terry.guo@arm.com>
+2014-06-04 Marek Polacek <polacek@redhat.com>
- PR target/55019
- * gcc.dg/pr55019.c: New.
+ Backport from mainline
+ 2014-05-08 Marek Polacek <polacek@redhat.com>
-2012-10-25 Richard Biener <rguenther@suse.de>
+ PR c/61053
+ * gcc.dg/pr61053.c: New test.
- PR tree-optimization/54902
- * g++.dg/torture/pr54902.C: New testcase.
+2014-06-03 Martin Jambor <mjambor@suse.cz>
-2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+ PR ipa/61160
+ * g++.dg/ipa/pr61160-1.C: New test.
- * gnat.dg/modular4.adb: New test.
- * gnat.dg/modular4_pkg.ads: New helper.
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
-2012-10-21 Eric Botcazou <ebotcazou@adacore.com>
+ Backport from mainline
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
- * gnat.dg/specs/atomic1.ads: XFAIL on MIPS.
- * gnat.dg/specs/addr1.ads: Likewise.
+ PR rtl-optimization/60866
+ * gcc.dg/pr60866.c: New test.
-2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+2014-06-03 Andrey Belevantsev <abel@ispras.ru>
Backport from mainline
- 2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+ 2014-05-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/60901
+ * gcc.target/i386/pr60901.c: New test.
+
+2014-06-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/pr60969.C (dg-do compile): Change ilp32 target to ia32.
- PR target/54892
- * gcc.target/arm/pr54892.c: New.
+2014-05-29 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/61325
+ * gcc.target/aarch64/pr61325.c: New.
+
+2014-05-29 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/60834
+ Backport from mainline
+ * gfortran.dg/associate_16.f90: New test.
-2012-10-16 Andrey Belevantsev <abel@ispras.ru>
+2014-05-28 Eric Botcazou <ebotcazou@adacore.com>
Backport from mainline
- 2012-08-09 Andrey Belevantsev <abel@ispras.ru>
+ 2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
- PR rtl-optimization/53701
- * gcc.dg/pr53701.c: New test.
+ * gnat.dg/overflow_fixed.adb: New test.
-2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+2014-05-28 Richard Biener <rguenther@suse.de>
Backport from mainline
- 2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+ 2014-05-28 Richard Biener <rguenther@suse.de>
- * gcc.target/i386/avx256-unaligned-load-1.c: Update asm scan patterns.
- * gcc.target/i386/avx256-unaligned-load-2.c: Ditto.
- * gcc.target/i386/avx256-unaligned-load-3.c: Ditto.
- * gcc.target/i386/avx256-unaligned-load-4.c: Ditto.
- * gcc.target/i386/avx256-unaligned-store-1.c: Ditto.
- * gcc.target/i386/avx256-unaligned-store-2.c: Ditto.
- * gcc.target/i386/avx256-unaligned-store-3.c: Ditto.
- * gcc.target/i386/avx256-unaligned-store-4.c: Ditto.
+ PR middle-end/61045
+ * gcc.dg/pr61045.c: New testcase.
-2012-10-15 Richard Guenther <rguenther@suse.de>
+ 2014-05-05 Richard Biener <rguenther@suse.de>
- PR tree-optimization/54920
- * gcc.dg/torture/pr54920.c: New testcase.
+ PR middle-end/61010
+ * gcc.dg/torture/pr61010.c: New testcase.
-2012-10-14 Janus Weil <janus@gcc.gnu.org>
+ 2014-04-28 Richard Biener <rguenther@suse.de>
- PR fortran/54784
- * gfortran.dg/class_allocate_13.f90: New.
+ PR tree-optimization/60979
+ * gcc.dg/graphite/pr60979.c: New testcase.
-2012-10-08 Terry Guo <terry.guo@arm.com>
+2014-05-28 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- Backported from mainline
- 2012-09-19 Terry Guo <terry.guo@arm.com>
+ * lib/clearcap.exp: New file.
+ * gcc.dg/vect/vect.exp: Load clearcap.exp.
+ Remove clearcap_ldflags handling.
+ Call clearcap-init, clearcap-finish.
+ * gcc.target/i386/i386.exp: Likewise.
+ * gcc.target/i386/clearcap.map: Move to ../config/sol2-clearcap.map.
+ * gcc.target/i386/clearcapv2.map: Move to
+ ../config/sol2-clearcapv2.map.
+ * gcc.target/x86_64/abi/avx/abi-avx.exp: Likewise.
+ * gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: Likewise.
- * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
- extra prune rules that will be applied to all tests in a .exp file.
- (gcc-dg-prune): Use rules defined by the above variable.
- * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
- harmless warnings on architecture switch conflict.
+2014-05-27 Eric Botcazou <ebotcazou@adacore.com>
-2012-10-08 Jakub Jelinek <jakub@redhat.com>
+ * gnat.dg/aliasing1.adb (dg-final): Robustify pattern matching.
- PR c++/54858
- * g++.dg/template/pr54858.C: New test.
+2014-05-26 Uros Bizjak <ubizjak@gmail.com>
-2012-10-05 Jakub Jelinek <jakub@redhat.com>
+ * c-c++-common/cilk-plus/AN/pr61191.c: Fix dg-error directives.
- PR tree-optimization/33763
- * c-c++-common/pr33763.c: New test.
+2014-05-26 Igor Zamyatin <igor.zamyatin@intel.com>
-2012-10-03 Jakub Jelinek <jakub@redhat.com>
+ PR c/61191
+ * c-c++-common/cilk-plus/AN/pr61191.c: Check for correct handling of
+ the case with syntax error.
- PR c++/54777
- * g++.dg/cpp0x/constexpr-ref4.C: New test.
+2014-05-22 Peter Bergner <bergner@vnet.ibm.com>
-2012-09-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ * gcc.target/powerpc/htm-ttest.c: New test.
- PR target/54083
- * gcc.dg/torture/pr53922.c: Skip on 32-bit hppa-*-hpux*.
+2014-05-21 Igor Zamyatin <igor.zamyatin@intel.com>
-2012-09-27 Jakub Jelinek <jakub@redhat.com>
+ PR c++/60189
+ * c-c++-common/cilk-plus/CK/invalid_sync.cc: New test.
- PR target/54703
- * gcc.target/i386/pr54703.c: New test.
+2014-05-18 Jan Hubicka <hubicka@ucw.cz>
-2012-09-24 Janis Johnson <janisjo@codesourcery.com>
+ PR middle-end/58094
+ * g++.dg/ipa/devirt-11.C: Be lax about number of devirtualizations.
- Backport from mainline:
+2014-05-18 Eric Botcazou <ebotcazou@adacore.com>
- 2012-07-24 Janis Johnson <janisjo@codesourcery.com>
- * lib/gcc-dg.exp (process-message): Don't ignore errors.
+ * gnat.dg/enum3.adb: New test.
- 2012-07-25 Janis Johnson <janisjo@codesourcery.com>
- * g++.dg/cpp0x/nullptr21.c: Remove printfs, make self-checking.
+2014-04-16 Jan Hubicka <hubicka@ucw.cz>
- 2012-07-26 Janis Johnson <janisjo@codesourcery.com>
- * gcc.dg/pr45259.c: Only -fpic depends on fpic support.
+ PR ipa/60854
+ * g++.dg/torture/pr60854.C: New testcase.
- 2012-09-18 Janis Johnson <janisjo@codesourcery.com>
- * gcc.dg/vect/pr52298.c: Remove "dg-do run".
+2014-05-17 Uros Bizjak <ubizjak@gmail.com>
- 2012-09-18 Janis Johnson <janisjo@codesourcery.com>
- * lib/target-supports.exp
- (check_effective_target_vect_widen_mult_qi_to_hi,
- check_effective_target_vect_widen_mult_hi_to_si,
- check_effective_target_vect_widen_mult_qi_to_hi_pattern,
- check_effective_target_vect_widen_mult_hi_to_si_pattern,
- check_effective_target_vect_pack_trunc,
- check_effective_target_vect_unpack,
- check_effective_target_vect_multiple_sizes): Check arm_neon_ok
- instead of arm_none.
-
- 2012-09-18 Janis Johnson <janisjo@codesourcery.com>
- * gcc.dg/vect/no-vfa-vect-101.c: Skip a check for an irrelevant
- target instead of xfailing it.
- * gcc.dg/vect/no-vfa-vect-102.c: Likewise.
- * gcc.dg/vect/no-vfa-vect-102a.c: Likewise.
- * gcc.dg/vect/no-vfa-vect-37.c: Likewise.
- * gcc.dg/vect/no-vfa-vect-79.c: Likewise.
- * gcc.dg/vect/vect-104.c: Likewise.
- * gcc.dg/vect/vect-outer-1-big-array.c: Likewise.
- * gcc.dg/vect/vect-outer-1.c: Likewise.
- * gcc.dg/vect/vect-outer-1a-big-array.c: Likewise.
- * gcc.dg/vect/vect-outer-1a.c: Likewise.
- * gcc.dg/vect/vect-outer-1b-big-array.c: Likewise.
- * gcc.dg/vect/vect-outer-1b.c: Likewise.
- * gcc.dg/vect/vect-outer-2b.c: Likewise.
- * gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
- * gcc.dg/vect/vect-outer-3a.c: Likewise.
- * gcc.dg/vect/vect-outer-3b.c: Likewise.
- * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.
-
- 2012-09-18 Janis Johnson <janisjo@codesourcery.com>
- * gcc.dg/vect/fast-math-pr35982.c: Skip check instead of xfail.
-
-2012-09-22 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ * g++.dg/pr60969.C: Compile for all ilp32 x86 targets.
+ (dg-options): Add -mfpmath=387.
+ (dg-final): Check that no MMX registers are used.
- Backport from mainline:
- 2012-09-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-05-16 Vladimir Makarov <vmakarov@redhat.com>
- PR testsuite/54007
- * gnat.dg/lto15.adb: Require lto.
+ PR rtl-optimization/60969
+ * g++.dg/pr60969.C: New.
-2012-09-20 Eric Botcazou <ebotcazou@adacore.com>
+2014-05-15 Martin Jambor <mjambor@suse.cz>
- * gnat.dg/opt20.ads: Move dg directive to...
- * gnat.dg/opt20.adb: ...here.
- * gnat.dg/addr1.ad[sb]: Likewise.
- * gnat.dg/concat2.ad[sb]: Likewise.
- * gnat.dg/array16.ad[sb]: Likewise.
- * gnat.dg/atomic5.ad[sb]: Likewise.
- * gnat.dg/discr29.ad[sb]: Likewise.
- * gnat.dg/noreturn5.ad[sb]: Likewise.
- * gnat.dg/vect8.ad[sb]: Likewise. Add dg-options.
- * gnat.dg/discr23.ads: Remove dg directive.
- * gnat.dg/nested_float_packed.ads: Likewise.
- * gnat.dg/oconst6.ads: Move to...
- * gnat.dg/specs/oconst6.ads: ...here.
+ PR ipa/61085
+ * g++.dg/ipa/pr61085.C: New test.
-2012-09-20 Joseph Myers <joseph@codesourcery.com>
+2014-05-15 Jakub Jelinek <jakub@redhat.com>
- PR c/54552
- * gcc.c-torture/compile/pr54552-1.c: New test.
+ PR tree-optimization/61158
+ * gcc.dg/pr61158.c: New test.
-2012-09-20 Joseph Myers <joseph@codesourcery.com>
+2014-05-14 Matthias Klose <doko@ubuntu.com>
- PR c/54103
- * gcc.c-torture/compile/pr54103-1.c,
- gcc.c-torture/compile/pr54103-2.c,
- gcc.c-torture/compile/pr54103-3.c,
- gcc.c-torture/compile/pr54103-4.c,
- gcc.c-torture/compile/pr54103-5.c,
- gcc.c-torture/compile/pr54103-6.c: New tests.
- * gcc.dg/c90-const-expr-8.c: Update expected column number.
+ PR driver/61106
+ * gcc-dg/unused-8a.c: Remove.
-2012-09-20 Jakub Jelinek <jakub@redhat.com>
+2014-05-13 Peter Bergner <bergner@vnet.ibm.com>
- Backported from mainline
- 2012-09-17 Jakub Jelinek <jakub@redhat.com>
+ * lib/target-support.exp (check_dfp_hw_available): New function.
+ (is-effective-target): Check $arg for dfp_hw.
+ (is-effective-target-keyword): Likewise.
+ * gcc.target/powerpc/pack03.c: (dg-require-effective-target):
+ Change target to dfp_hw.
- PR tree-optimization/54563
- * g++.dg/torture/pr54563.C: New test.
+2014-05-13 Jeff Law <law@redhat.com>
-2012-09-20 Release Manager
+ Backports from mainline
- * GCC 4.7.2 released.
+ 2014-05-08 Jeff Law <law@redhat.com>
-2012-09-14 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/61009
+ * g++.dg/tree-ssa/pr61009.C: New test.
- PR c++/53661
- * g++.dg/init/aggr9.C: New.
+ 2014-04-23 Jeff Law <law@redhat.com>
-2012-09-13 Tobias Burnus <burnus@net-b.de>
+ PR tree-optimization/60902
+ * gcc.target/i386/pr60902.c: New test.
- PR fortran/54556
- * gfortran.dg/implicit_pure_3.f90: New.
+2014-05-13 Jakub Jelinek <jakub@redhat.com>
-2012-09-13 Jakub Jelinek <jakub@redhat.com>
+ PR target/61060
+ * gcc.dg/pr61060.c: New test.
- PR c/54559
- * gcc.c-torture/compile/pr54559.c: New test.
+2014-05-12 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
-2012-09-13 Jason Merrill <jason@redhat.com>
+ Backport from mainline
+ 2014-05-12 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
- PR c++/53839
- * g++.dg/cpp0x/constexpr-temp1.C: New.
+ PR target/60991
+ * gcc.target/avr/pr60991.c: New testcase.
-2012-09-13 Jason Merrill <jason@redhat.com>
+2014-05-10 Jerry DeLisle <jvdelisle@gcc.gnu>
- PR c++/54511
- * g++.dg/template/anonunion2.C: New.
+ Backport from trunk.
+ PR libfortran/61049
+ * gfortran.dg/list_read_13.f: New test.
-2012-09-13 Jason Merrill <jason@redhat.com>
+2014-05-09 Georg-Johann Lay <avr@gjlay.de>
- PR c++/53836
- * g++.dg/template/init10.C: New.
+ Backport from 2014-05-09 trunk r210267
-2012-09-12 Tobias Burnus <burnus@net-b.de>
+ PR target/61055
+ * gcc.target/avr/torture/pr61055.c: New test.
- PR fortran/54225
- PR fortran/53306
- * gfortran.dg/coarray_10.f90: Update dg-error.
- * gfortran.dg/coarray_28.f90: New.
- * gfortran.dg/array_section_3.f90: New.
+2014-05-08 Matthias Klose <doko@ubuntu.com>
-2012-09-10 Jason Merrill <jason@redhat.com>
+ PR driver/61106
+ * gcc-dg/unused-8a.c: New.
+ * gcc-dg/unused-8b.c: Likewise.
- PR c++/54506
- * g++.dg/cpp0x/implicit14.C: New.
+2014-05-07 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/54341
- PR c++/54253
- * g++.dg/cpp0x/constexpr-virtual2.C: New.
- * g++.dg/cpp0x/constexpr-virtual3.C: New.
+ PR c++/61083
+ * g++.dg/cpp0x/sfinae50.C: New.
-2012-09-10 Janus Weil <janus@gcc.gnu.org>
+2014-05-07 Richard Biener <rguenther@suse.de>
- PR fortran/54435
- PR fortran/54443
- * gfortran.dg/select_type_29.f03: New.
+ PR tree-optimization/57864
+ * gcc.dg/torture/pr57864.c: New testcase.
-2012-09-10 Markus Trippelsdorf <markus@trippelsdorf.de>
+2014-05-06 Paolo Carlini <paolo.carlini@oracle.com>
- PR middle-end/54515
- * g++.dg/tree-ssa/pr54515.C: new testcase
+ PR c++/60999
+ * g++.dg/cpp0x/nsdmi-template9.C: New.
+ * g++.dg/cpp0x/nsdmi-template10.C: Likewise.
-2012-09-08 Mikael Morin <mikael@gcc.gnu.org>
+2014-05-04 Jan Hubicka <hubicka@ucw.cz>
- PR fortran/54208
- * gfortran.dg/bound_simplification_3.f90: New test.
+ PR ipa/60965
+ * g++.dg/ipa/devirt-31.C: New testcase.
+ * g++.dg/ipa/devirt-11.C: Adjust testcase.
-2012-09-07 Richard Guenther <rguenther@suse.de>
+2014-05-04 Peter Bergner <bergner@vnet.ibm.com>
- Backport from mainline
- 2012-07-13 Richard Guenther <rguenther@suse.de>
+ * gcc.target/powerpc/pack02.c (dg-options): Add -mhard-float.
+ (dg-require-effective-target): Change target to powerpc_fprs.
+ * gcc.target/powerpc/pack03.c (dg-options): Add -mhard-dfp.
+ (dg-require-effective-target): Change target to dfprt.
- PR tree-optimization/53922
- * gcc.dg/torture/pr53922.c: New testcase.
+2014-05-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-09-07 Eric Botcazou <ebotcazou@adacore.com>
+ PR tree-optimization/60930
+ * gcc.dg/torture/pr60930.c: New test.
- * gcc.dg/pr44194-1.c: Skip on Alpha and adjust regexp for SPARC64.
+2014-04-30 Michael Meissner <meissner@linux.vnet.ibm.com>
-2012-09-07 Jakub Jelinek <jakub@redhat.com>
+ Back port from mainline
+ 2014-04-24 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pack01.c: New test to test the new pack and
+ unpack builtin functionss for 128-bit types.
+ * gcc.target/powerpc/pack02.c: Likewise.
+ * gcc.target/powerpc/pack03.c: Likewise.
+ * gcc.target/powerpc/extend-divide-1.c: New test to test extended
+ divide builtin functionss.
+ * gcc.target/powerpc/extend-divide-2.c: Likewise.
+ * gcc.target/powerpc/bcd-1.c: New test for the new BCD builtin
+ functions.
+ * gcc.target/powerpc/bcd-2.c: Likewise.
+ * gcc.target/powerpc/bcd-3.c: Likewise.
+ * gcc.target/powerpc/dfp-builtin-1.c: New test for the new DFP
+ builtin functionss.
+ * gcc.target/powerpc/dfp-builtin-2.c: Likewise.
+
+2014-04-29 Pat Haugen <pthaugen@us.ibm.com>
- Backported from mainline
- 2012-09-06 Jakub Jelinek <jakub@redhat.com>
+ Backport from mainline
+ 2014-04-17 Pat Haugen <pthaugen@us.ibm.com>
- PR rtl-optimization/54455
- * gcc.dg/54455.c: New test.
+ * gcc.target/powerpc/ti_math1.c: New.
+ * gcc.target/powerpc/ti_math2.c: New.
-2012-09-06 Andrew Pinski <apinski@cavium.com>
+2014-04-29 Jakub Jelinek <jakub@redhat.com>
- PR tree-opt/54494
- * gcc.dg/tree-ssa/strlen-1.c: New testcase.
+ PR tree-optimization/60971
+ * c-c++-common/turtore/pr60971.c: New test.
-2012-09-05 Jakub Jelinek <jakub@redhat.com>
+2014-04-26 Uros Bizjak <ubizjak@gmail.com>
- PR middle-end/54486
- * c-c++-common/pr54486.c: New test.
+ * gcc.dg/tree-ssa/alias-30.c (dg-options): Dump only fre1 details.
+ * gcc.dg/vect/pr60505.c: Cleanup vect tree dump.
+ * g++.dg/ipa/devirt-27.C (dg-options): Remove -fdump-ipa-devirt.
-2012-09-05 Joey Ye <joey.ye@arm.com>
+2014-04-25 Uros Bizjak <ubizjak@gmail.com>
- Backported from trunk
- 2012-08-28 Joey Ye <joey.ye@arm.com>
+ * c-c++-common/gomp/pr60823-2.c: Require effective target
+ vect_simd_clones.
- * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Add -fno-short-enums.
+2014-04-25 Jakub Jelinek <jakub@redhat.com>
-2012-09-03 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/60960
+ * gcc.c-torture/execute/pr60960.c: New test.
- Backported from mainline
- 2012-09-01 Jakub Jelinek <jakub@redhat.com>
+2014-04-25 Eric Botcazou <ebotcazou@adacore.com>
- PR target/54436
- * gcc.dg/torture/pr54436.c: New test.
+ * gcc.c-torture/execute/20140425-1.c: New test.
- 2012-08-31 Jakub Jelinek <jakub@redhat.com>
+2014-04-25 Richard Biener <rguenther@suse.de>
- PR c/54428
- * gcc.c-torture/compile/pr54428.c: New test.
+ PR ipa/60912
+ * g++.dg/opt/pr60912.C: New testcase.
- 2012-08-24 Jakub Jelinek <jakub@redhat.com>
+2014-04-25 Richard Biener <rguenther@suse.de>
- PR c/54363
- * gcc.dg/pr54363.c: New test.
+ PR ipa/60911
+ * gcc.dg/lto/pr60911_0.c: New testcase.
-2012-08-31 Ollie Wild <aaw@google.com>
+2014-04-24 Jakub Jelinek <jakub@redhat.com>
- PR c++/54197
- * g++.dg/init/lifetime3.C: New test.
+ * c-c++-common/gomp/atomic-16.c: Remove all dg-error directives.
+ Replace load with read and store with write.
-2012-08-28 Uros Bizjak <ubizjak@gmail.com>
+2014-04-23 Uros Bizjak <ubizjak@gmail.com>
Backport from mainline
- 2012-08-27 Uros Bizjak <ubizjak@gmail.com>
+ 2014-04-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/60909
+ * gcc.target/i386/pr60909-1.c: New test.
+ * gcc.target/i386/pr60909-2.c: Ditto.
- PR target/46254
- * gcc.target/i386/pr46254.c: New test.
+2014-04-23 Richard Biener <rguenther@suse.de>
-2012-08-20 Patrick Marlier <patrick.marlier@gmail.com>
+ PR tree-optimization/60903
+ * gcc.dg/torture/pr60903.c: New testcase.
- Backported from trunk
- 2012-08-20 Patrick Marlier <patrick.marlier@gmail.com>
+2014-04-23 Richard Biener <rguenther@suse.de>
+
+ Backport from mainline
+ 2014-04-14 Richard Biener <rguenther@suse.de>
- PR middle-end/53992
- * gcc.dg/gomp/pr53992.c: New test.
+ PR lto/60720
+ * gcc.dg/lto/pr60720_0.c: New testcase.
+ * gcc.dg/lto/pr60720_1.c: Likewise.
-2012-08-13 Jakub Jelinek <jakub@redhat.com>
+2014-04-23 Richard Biener <rguenther@suse.de>
- Backported from trunk
- 2012-07-19 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/60895
+ * g++.dg/torture/pr60895.C: New testcase.
- PR rtl-optimization/53942
- * gcc.dg/pr53942.c: New test.
+2014-04-23 Richard Biener <rguenther@suse.de>
-2012-08-10 Ulrich Weigand <ulrich.weigand@linaro.org>
+ PR middle-end/60891
+ * gcc.dg/torture/pr60891.c: New testcase.
+
+2014-04-22 Michael Meissner <meissner@linux.vnet.ibm.com>
Backport from mainline
- 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
+ 2014-04-21 Michael Meissner <meissner@linux.vnet.ibm.com>
- * lib/target-supports.exp
- (check_effective_target_vect_natural_alignment): New function.
- * gcc.dg/align-2.c: Only run on targets with natural alignment
- of vector types.
- * gcc.dg/vect/slp-25.c: Adjust tests for targets without natural
- alignment of vector types.
+ PR target/60735
+ * gcc.target/powerpc/pr60735.c: New test. Insure _Decimal64 does
+ not cause errors if -mspe.
-2012-08-09 H.J. Lu <hongjiu.lu@intel.com>
+2014-04-22 Tobias Burnus <burnus@net-b.de>
Backport from mainline
- 2012-08-08 H.J. Lu <hongjiu.lu@intel.com>
+ 2014-04-11 Tobias Burnus <burnus@net-b.de>
- PR rtl-optimization/54157
- * gcc.target/i386/pr54157.c: New file.
+ PR fortran/58880
+ PR fortran/60495
+ * gfortran.dg/finalize_25.f90: New.
-2012-08-01 Uros Bizjak <ubizjak@gmail.com>
+2014-04-22 H.J. Lu <hongjiu.lu@intel.com>
Backport from mainline
- 2012-03-11 Uros Bizjak <ubizjak@gmail.com>
+ 2014-04-22 H.J. Lu <hongjiu.lu@intel.com>
- PR target/52530
- * gcc.dg/torture/pr52530.c: New test.
+ * gcc.target/i386/pr60868.c: New testcase.
-2012-07-27 Anna Tikhonova <anna.tikhonova@intel.com>
+2014-04-22 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/20020201-1.c: Remove declarations for exit, abort,
- rand, srand. Include <stdlib.h>.
+ PR c/59073
+ * c-c++-common/gomp/pr59073.c: New test.
-2012-07-20 Jason Merrill <jason@redhat.com>
+2014-04-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR c++/54038
- * g++.dg/other/array7.C: New.
+ * gcc.dg/vmx/merge-vsx.c: Add V4SI and V4SF tests.
+ * gcc.dg/vmx/merge-vsx-be-order.c: Likewise.
-2012-07-19 Jason Merrill <jason@redhat.com>
+2014-04-22 Richard Biener <rguenther@suse.de>
- PR c++/54026
- * g++.dg/init/mutable1.C: New.
+ Backport from mainline
+ 2014-04-14 Richard Biener <rguenther@suse.de>
-2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+ PR middle-end/55022
+ * gcc.dg/graphite/pr55022.c: New testcase.
- * gnat.dg/opt25.adb: New test.
- * gnat.dg/opt25_pkg1.ad[sb]: New helper.
- * gnat.dg/opt25_pkg2.ad[sb]: Likewise.
+2014-04-22 Richard Biener <rguenther@suse.de>
-2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+ Backport from mainline
+ 2014-04-17 Richard Biener <rguenther@suse.de>
- * gnat.dg/aggr20.ad[sb]: New test.
- * gnat.dg/aggr20_pkg.ads: New helper.
+ PR middle-end/60849
+ * g++.dg/opt/pr60849.C: New testcase.
-2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+2014-04-22 Richard Biener <rguenther@suse.de>
- * gnat.dg/derived_type3.adb: New test.
- * gnat.dg/derived_type3_pkg.ad[sb]: New helper.
+ Backport from mainline
+ 2014-04-17 Richard Biener <rguenther@suse.de>
-2012-07-19 Richard Guenther <rguenther@suse.de>
- Eric Botcazou <ebotcazou@adacore.com>
+ PR tree-optimization/60841
+ * gcc.dg/vect/pr60841.c: New testcase.
- * gnat.dg/loop_optimization11.adb: New testcase.
- * gnat.dg/loop_optimization11_pkg.ads: Likewise.
+2014-04-22 Richard Biener <rguenther@suse.de>
-2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+ Backport from mainline
+ 2014-04-17 Richard Biener <rguenther@suse.de>
- * gnat.dg/discr38.adb: New test.
+ PR tree-optimization/60836
+ * g++.dg/vect/pr60836.cc: New testcase.
-2012-07-19 Jakub Jelinek <jakub@redhat.com>
+2014-04-22 Richard Biener <rguenther@suse.de>
- PR middle-end/54017
- * c-c++-common/gomp/pr54017.c: New test.
+ Backport from mainline
+ 2014-04-14 Richard Biener <rguenther@suse.de>
+ Marc Glisse <marc.glisse@inria.fr>
-2012-07-18 Richard Guenther <rguenther@suse.de>
+ PR c/60819
+ * gcc.target/i386/vec-may_alias.c: New testcase.
+
+2014-04-22 Richard Biener <rguenther@suse.de>
Backport from mainline
- 2012-05-03 Richard Guenther <rguenther@suse.de>
+ 2014-04-14 Richard Biener <rguenther@suse.de>
- * gfortran.dg/pr52621.f90: Add -w to avoid diagnostic about
- unsupported prefetching support.
+ PR tree-optimization/59817
+ PR tree-optimization/60453
+ * gfortran.dg/graphite/pr59817.f: New testcase.
+ * gcc.dg/graphite/pr59817-1.c: Likewise.
+ * gcc.dg/graphite/pr59817-2.c: Likewise.
-2012-07-17 Jason Merrill <jason@redhat.com>
+2014-04-22 Jakub Jelinek <jakub@redhat.com>
- PR c++/53995
- * g++.dg/parse/enum9.C: New.
+ PR tree-optimization/60823
+ * c-c++-common/gomp/pr60823-1.c: New test.
+ * c-c++-common/gomp/pr60823-2.c: New test.
+ * c-c++-common/gomp/pr60823-3.c: New test.
-2012-07-17 Jason Merrill <jason@redhat.com>
+ Backported from mainline
+ 2014-04-16 Jakub Jelinek <jakub@redhat.com>
- PR c++/53989
- * g++.dg/template/array23.C: New.
+ PR tree-optimization/60844
+ * gcc.dg/pr60844.c: New test.
-2012-07-17 Jason Merrill <jason@redhat.com>
+2014-04-22 Release Manager
- PR c++/53549
- * g++.dg/template/current-inst1.C: New.
- * g++.dg/parse/crash35.C: Adjust.
+ * GCC 4.9.0 released.
-2012-07-13 Hans-Peter Nilsson <hp@axis.com>
+2014-04-17 Jakub Jelinek <jakub@redhat.com>
- PR rtl-optimization/53908
- * gcc.dg/torture/pr53908.c: New test.
+ PR target/60847
+ Forward port from 4.8 branch
+ 2013-07-19 Kirill Yukhin <kirill.yukhin@intel.com>
-2012-07-10 Uros Bizjak <ubizjak@gmail.com>
+ * gcc.target/i386/bmi-1.c: Extend with new instrinsics.
+ Fix scan patterns.
+ * gcc.target/i386/bmi-2.c: Ditto.
- Backport from mainline
- 2012-07-03 Uros Bizjak <ubizjak@gmail.com>
+2014-04-15 Igor Zamyatin <igor.zamyatin@intel.com>
- PR target/53811
- * g++.dg/other/pr53811.C: New test.
+ PR middle-end/60467
+ * c-c++-common/cilk-plus/CK/invalid_spawns.c: Add new invalid
+ case to check.
-2012-07-10 Jason Merrill <jason@redhat.com>
+2014-04-15 Igor Zamyatin <igor.zamyatin@intel.com>
- PR c++/53733
- * g++.dg/cpp0x/defaulted36.C: New.
- * g++.dg/cpp0x/defaulted21.C: Adjust.
+ PR middle-end/60469
+ * c-c++-common/cilk-plus/CK/pr60469.c: New test.
- * g++.dg/cpp0x/implicit13.C: New.
+2014-04-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-2012-07-09 Janis Johnson <janisjo@codesourcery.com>
+ * gcc.dg/lto/pr55113_0.c: Skip on i?86-*-solaris2.1[0-1]*.
- Backport from mainline.
- 2012-06-28 Janis Johnson <janisjo@codesourcery.com>
-
- * g++.dg/cpp0x/nullptr19.c: Remove exta directives on same line.
-
- * g++.dg/template/error46.C: Add missing comment to dg-message.
- * g++.dg/template/crash107.C: Likewise.
- * g++.dg/template/error47.C: Likewise.
- * g++.dg/template/crash108.C: Likewise.
- * g++.dg/overload/operator5.C: Likewise.
-
- * gcc.dg/Wstrict-aliasing-converted-assigned.c: Fix syntax
- errors in dg-message directives, add comments.
-
- 2012-06-26 Janis Johnson <janisjo@codesourcery.com>
-
- * lib/scandump.exp (scan-dump, scan-dump-not, scan-dump-dem,
- scan-dump-dem-not): Use printable pattern in test name.
-
- 2012-06-25 Janis Johnson <janisjo@codesourcery.com>
-
- * lib/target-supports-dg.exp (testname-for-summary): New.
- * lib/profopt.exp (profopt_execute): Define testname_with_flags.
- * lib/gcc-dg.exp (cleanup-coverage-files, cleanup-repo-notes,
- cleanup-stack-usage, cleanup-dump, cleanup-saved-temps, scan-module,
- scan-module-absence, output-exists, output-exists-not: Use
- testname-for-summary.
- (dg-test): Clean up testname_with_flags.
- * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden,
- scan-not-hidden, scan-file, scan-file-not, scan-stack-usage,
- scan-stack-usage-not, scan-assembler-times, scan-assembler-dem,
- scan-assembler-dem-not, object-size: Use testname-for-summary.
- * lib/gcov.exp (run-gcov): Likewise.
- * lib/scandump.exp (scan-dump, scan-dump-times, scan-dump-not,
- scan-dump-dem, scan-dump-dem-note): Likewise.
-
- * lib/profopt.exp: Make prof_option_list local to profopt-execute.
- * g++.dg/tree-prof/tree-prof.exp (PROFOPT_OPTIONS): Define after
- including profopt.opt; save and restore existing value.
- * g++.dg/bprob/bprob.exp: Likewise.
- * gcc.dg/matrix/matrix.exp: Likewise.
- * gcc.dg/tree-prof/tree-prof.exp: Likewise.
- * gcc.misc-tests/bprob.exp: Likewise; also replace formerly-ignored
- PROFOPT_OPTIONS.
-
- 2012-06-15 Janis Johnson <janosjo@codesourcery.com>
-
- * lib/gcov.exp (verify-lines, verify-branches, verify-calls): Use
- testname that includes flags, passed in as new argument, in
- pass/fail messages.
- (run_gcov): Get testname from dg-test, use it in pass/fail messages
- and pass it to verify-* procedures.
-
- * g++.dg/torture/stackalign/stackalign.exp: Combine stack
- alignment torture options with usual torture options.
-
- * g++.dg/cpp0x/auto27.C: Add comments to checks for multiple
- messages reported for one line of source code.
- * g++.dg/cpp0x/constexpr-decl.C: Likewise.
- * g++.dg/cpp0x/decltype2.C: Likewise.
- * g++.dg/cpp0x/decltype3.C: Likewise.
- * g++.dg/cpp0x/lambda/lambda-syntax1.C: Likewise.
- * g++.dg/cpp0x/regress/error-recovery1.C: Likewise.
- * g++.dg/cpp0x/static_assert3.C: Likewise.
- * g++.dg/cpp0x/udlit-cpp98-neg.C: Likewise.
- * g++.dg/cpp0x/udlit-shadow-neg.C: Likewise.
- * g++.dg/cpp0x/union1.C: Likewise.
- * g++.dg/cpp0x/variadic-ex10.C: Likewise.
- * g++.dg/cpp0x/variadic-ex14.C: Likewise.
- * g++.dg/cpp0x/variadic2.C: Likewise.
- * g++.dg/cpp0x/variadic20.C: Likewise.
- * g++.dg/cpp0x/variadic74.C: Likewise.
- * g++.dg/diagnostic/bitfld2.C: Likewise.
- * g++.dg/ext/attrib44.C: Likewise.
- * g++.dg/ext/no-asm-1.C: Likewise.
- * g++.dg/other/error34.C: Likewise.
- * g++.dg/parse/crash46.C: Likewise.
- * g++.dg/parse/error10.C: Likewise.
- * g++.dg/parse/error2.C: Likewise.
- * g++.dg/parse/error3.C: Likewise.
- * g++.dg/parse/error36.C: Likewise.
- * g++.dg/parse/error8.C: Likewise.
- * g++.dg/parse/error9.C: Likewise.
- * g++.dg/parse/parser-pr28152-2.C: Likewise.
- * g++.dg/parse/parser-pr28152.C: Likewise.
- * g++.dg/parse/template25.C: Likewise.
- * g++.dg/parse/typename11.C: Likewise.
- * g++.dg/tc1/dr147.C: Likewise.
- * g++.dg/template/deduce3.C: Likewise.
- * g++.dg/template/koenig9.C: Likewise.
- * g++.dg/template/pr23510.C: Likewise.
- * g++.dg/warn/pr12242.C: Likewise.
- * g++.dg/warn/pr30551-2.C: Likewise.
- * g++.dg/warn/pr30551.C: Likewise.
- * g++.old-deja/g++.other/typename1.C: Likewise.
- * g++.old-deja/g++.pt/niklas01a.C: Likewise.
-
- 2012-06-13 Janis Johnson <janisjo@codesourcery.com>
-
- PR testsuite/20771
- * lib/dg-pch.exp (dg-flags-pch): Add flags to make compile lines in
- test summary unique.
-
- * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden,
- scan-not-hiddent, scan-file, scan-file-not, scan-stack-usage,
- scan-stack-usage-not): Don't strip torture options from test name.
-
- * lib/scandump.exp (scan-dump-times): Use printable version of
- regexp in test summary line.
-
- * gcc.dg/di-longlong64-sync-1.c: Add comments to checks for multiple
- messages reported for one line of source code.
- * gcc.dg/format/few-1.c: Likewise.
- * gcc.dg/ia64-sync-2.c: Likewise.
- * gcc.dg/sync-2.c: Likewise.
- * gcc.dg/noncompile/pr44517.c: Likewise.
-
- 2012-06-12 Janis Johnson <janisjo@codesourcery.com>
-
- * gcc.dg/torture/stackalign/stackalign.exp: Combine stack
- alignment torture options with usual torture options.
- * gcc.dg/torture/stackalign/alloca-2.c: Use dg-additional-options
- instead of dg-options.
- * gcc.dg/torture/stackalign/alloca-3.c: Likewise.
- * gcc.dg/torture/stackalign/alloca-4.c: Likewise.
- * gcc.dg/torture/stackalign/alloca-5.c: Likewise.
- * gcc.dg/torture/stackalign/alloca-6.c: Likewise.
- * gcc.dg/torture/stackalign/push-1.c: Likewise.
- * gcc.dg/torture/stackalign/vararg-3.c: Likewise.
-
- * gcc.target/arm/di-longlong64-sync-withhelpers.c: Add comments
- to checks for multiple messages reported for one line of source code.
- * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.
-
- * gcc.c-torture/compile/sync-1.c: Add comments to checks for multiple
- messages reported for one line of source code.
-
- * gcc.dg/20031223-1.c: Add comments to check for multiple
- messages reported for one line of source code.
- * gcc.dg/Wconversion-integer.c: Likewise.
- * gcc.dg/Wfatal-2.c: Likewise.
- * gcc.dg/Wfatal.c: Likewise.
- * gcc.dg/Wobjsize-1.c: Likewise.
- * gcc.dg/c99-vla-jump-1.c: Likewise.
- * gcc.dg/c99-vla-jump-2.c: Likewise.
- * gcc.dg/c99-vla-jump-3.c: Likewise.
- * gcc.dg/c99-vla-jump-4.c: Likewise.
- * gcc.dg/c99-vla-jump-5.c: Likewise.
- * gcc.dg/decl-9.c: Likewise.
- * gcc.dg/declspec-10.c: Likewise.
- * gcc.dg/declspec-18.c: Likewise.
- * gcc.dg/mtune.c: Likewise.
- * gcc.dg/parser-pr28152-2.c: Likewise.
- * gcc.dg/parser-pr28152.c: Likewise.
- * gcc.dg/pr14475.c: Likewise.
- * gcc.dg/pr27953.c: Likewise.
- * gcc.dg/pr28322-3.c: Likewise.
- * gcc.dg/pr30457.c: Likewise.
- * gcc.dg/pr30551-2.c: Likewise.
- * gcc.dg/pr30551-3.c: Likewise.
- * gcc.dg/pr30551-4.c: Likewise.
- * gcc.dg/pr30551-5.c: Likewise.
- * gcc.dg/pr30551-6.c: Likewise.
- * gcc.dg/pr30551.c: Likewise.
- * gcc.dg/pr45461.c: Likewise.
- * gcc.dg/pr48552-1.c: Likewise.
- * gcc.dg/pr48552-2.c: Likewise.
- * gcc.dg/redecl-1.c: Likewise.
- * gcc.dg/transparent-union-3.c: Likewise.
- * gcc.dg/utf-dflt.c: Likewise.
- * gcc.dg/utf-dflt2.c: Likewise.
- * gcc.dg/vla-8.c: Likewise.
- * gcc.dg/vla-init-1.c: Likewise.
- * gcc.dg/wtr-int-type-1.c: Likewise.
-
- * c-c++-common/raw-string-3.c: Add comments to checks for multiple
- messages reported for for one line of source code.
- * c-c++-common/raw-string-5.c: Likewise.
- * c-c++-common/raw-string-4.c: Likewise.
- * c-c++-common/raw-string-6.c: Likewise.
- * c-c++-common/pr20000.c: Likewise.
-
- * gcc.dg/cpp/include2a.c: Add comments to checks for multiple
- messages reported for one line of source code.
- * gcc.dg/cpp/pr30786.c: Likewise.
- * gcc.dg/cpp/pr28709.c: Likewise.
- * gcc.dg/cpp/missing-header-MD.c: Likewise.
- * gcc.dg/cpp/macspace2.c: Likewise.
- * gcc.dg/cpp/missing-header-1.c: Likewise.
- * gcc.dg/cpp/missing-header-MMD.c: Likewise.
- * gcc.dg/cpp/missing-sysheader-MD.c: Likewise.
- * gcc.dg/cpp/missing-sysheader-MMD.c: Likewise.
-
-2012-07-09 Jason Merrill <jason@redhat.com>
-
- PR c++/53882
- * g++.dg/cpp0x/nullptr29.C: New.
-
-2012-07-06 Mikael Morin <mikael@gcc.gnu.org>
-
- PR fortran/53732
- * gfortran.dg/inline_sum_4.f90: New test.
-
-2012-07-06 Richard Guenther <rguenther@suse.de>
+2014-04-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- Backport from mainline
- 2012-06-18 Richard Guenther <rguenther@suse.de>
+ * lib/target-supports.exp
+ (check_effective_target_vect_widen_mult_si_to_di_pattern):
+ Initialize et_vect_widen_mult_si_to_di_pattern_saved.
+ Fix formatting.
- PR tree-optimization/53693
- * g++.dg/torture/pr53693.C: New testcase.
+2014-04-14 Jason Merrill <jason@redhat.com>
-2012-07-06 Richard Guenther <rguenther@suse.de>
+ Revert:
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
- Backport from mainline
- 2012-04-11 Richard Guenther <rguenther@suse.de>
+2014-04-13 Paul Thomas <pault@gcc.gnu.org>
- PR middle-end/52621
- * gfortran.dg/pr52621.f90: New testcase.
+ PR fortran/60717
+ * gfortran.dg/unlimited_polymorphic_17.f90: New test.
-2012-07-05 Pat Haugen <pthaugen@us.ibm.com>
+ PR fortran/58085
+ * gfortran.dg/associate_15.f90: New test.
- Backport from mainline
- 2012-05-24 Pat Haugen <pthaugen@us.ibm.com>
+2014-04-12 Jerry DeLisle <jvdelisle@gcc.gnu>
- * gcc.target/powerpc/lhs-1.c: New.
- * gcc.target/powerpc/lhs-2.c: New.
- * gcc.target/powerpc/lhs-3.c: New.
+ PR libfortran/60810
+ * gfortran.dg/arrayio_13.f90: New test.
-2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
+2014-04-11 Steve Ellcey <sellcey@mips.com>
+ Jakub Jelinek <jakub@redhat.com>
- * gnat.dg/recursive_call.adb: New test.
+ PR middle-end/60556
+ * gcc.c-torture/compile/pr60556.c: New test.
-2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
+2014-04-11 Richard Biener <rguenther@suse.de>
- * gnat.dg/discr37.ad[sb]: New test.
+ PR middle-end/60797
+ * gcc.dg/pr60797.c: New testcase.
-2012-07-02 Jason Merrill <jason@redhat.com>
+2014-04-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- PR c++/53816
- * g++.dg/template/ref6.C: New.
+ * gcc.target/s390/htm-nofloat-1.c: Rename to ...
+ * gcc.target/s390/htm-nofloat-compile-1.c: ... this one.
+ * gcc.target/s390/htm-nofloat-2.c: Add check for htm target and
+ rename to ...
+ * gcc.target/s390/htm-nofloat-1.c: ... this one.
+ * gcc.target/s390/s390.exp: Make sure the assembler supports htm
+ instructions as well.
- PR c++/53821
- * g++.dg/cpp0x/lambda/lambda-template6.C: New.
+2014-04-11 Jakub Jelinek <jakub@redhat.com>
-2012-06-29 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+ PR rtl-optimization/60663
+ * gcc.target/arm/pr60663.c: New test.
- Backport from mainline.
- 2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
- * gcc.target/arm/neon-vrev.c: New.
+2014-04-10 Jason Merrill <jason@redhat.com>
-2012-06-28 Richard Guenther <rguenther@suse.de>
+ * g++.dg/dso/dlclose1.C: Disable for 4.9.
- PR middle-end/53790
- * gcc.dg/torture/pr53790.c: New testcase.
+2014-04-10 Jakub Jelinek <jakub@redhat.com>
-2012-06-27 Fabien Chêne <fabien@gcc.gnu.org>
+ PR lto/60567
+ * g++.dg/lto/pr60567_0.C: New test.
- PR c++/51214
- * g++.dg/cpp0x/forw_enum11.C: New.
+2014-04-10 Bernd Edlinger <bernd.edlinger@hotmail.de>
-2012-06-26 Richard Guenther <rguenther@suse.de>
+ * gfortran.dg/class_nameclash.f90: New test.
- PR c++/53752
- * g++.dg/torture/pr53752.C: New testcase.
+2014-04-10 Paolo Carlini <paolo.carlini@oracle.com>
-2012-06-25 Jason Merrill <jason@redhat.com>
+ PR c++/52844
+ * g++.dg/cpp0x/variadic156.C: New.
- PR c++/53498
- PR c++/53305
- * g++.dg/cpp0x/decltype38.C: New.
- * g++.dg/cpp0x/variadic132.C: New.
+2014-04-10 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- PR c++/52988
- * g++.dg/cpp0x/nullptr28.C: New.
+ * gcc.target/s390/htm-builtins-compile-1.c: Replace long long with
+ long.
- PR c++/53202
- * g++.dg/cpp0x/constexpr-tuple.C: New.
+2014-04-10 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
-2012-06-25 Jakub Jelinek <jakub@redhat.com>
+ PR debug/60655
+ * gcc.c-torture/compile/pr60655-2.c: Copy from pr60655-1.c without
+ -fdata-sections.
- PR target/53759
- * gcc.target/i386/pr53759.c: New test.
+2014-04-09 Steve Ellcey <sellcey@mips.com>
- PR c++/53594
- * g++.dg/cpp0x/nsdmi7.C: New test.
+ * gcc.dg/tree-ssa/ssa-ifcombine-13.c: Remove mips*-*-* from option
+ and scan lists.
-2012-06-22 Tobias Burnus <burnus@net-b.de>
+2014-04-09 Cong Hou <congh@google.com>
- Backport from mainline
- 2012-06-17 Tobias Burnus <burnus@net-b.de>
+ PR testsuite/60773
+ * lib/target-supports.exp:
+ (check_effective_target_vect_widen_si_to_di_pattern): New.
+ * gcc.dg/vect/pr60656.c: Require vect_long effective target.
+ Use scan-tree-dump-times for vect_widen_mult_si_to_di_pattern
+ targets only.
+ (foo): Fix up formatting.
+ (main): Call check_vect.
- PR fortran/53691
- PR fortran/53685
- * gfortran.dg/transfer_check_3.f90: New.
+2014-04-08 Paolo Carlini <paolo.carlini@oracle.com>
-2012-06-22 Eric Botcazou <ebotcazou@adacore.com>
+ PR c++/59115
+ * g++.dg/template/crash119.C: New.
- * gnat.dg/lto15.ad[sb]: New test.
+2014-04-08 Pat Haugen <pthaugen@us.ibm.com>
-2012-06-19 Kaz Kojima <kkojima@gcc.gnu.org>
+ * gcc.target/powerpc/atomic_load_store-p8.c: New.
- * gcc.dg/stack-usage-1.c: Remove dg-options line for sh targets
- and add __sh__ case.
+2014-04-08 Jason Merrill <jason@redhat.com>
-2012-06-19 Jason Merrill <jason@redhat.com>
+ * lib/gcc-dg.exp (dg-build-dso): Reset dg-do-what-default to compile.
- PR c++/53651
- * g++.dg/cpp0x/decltype37.C: New.
+2014-04-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- PR c++/52637
- * g++.dg/debug/localclass1.C: New.
+ PR rtl-optimization/60776
+ * gcc.dg/builtin-bswap-6.c: Use -mbranch-cost=0 for s390.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+ * gcc.dg/builtin-bswap-6a.c: New testcase.
+ * gcc.dg/builtin-bswap-7a.c: New testcase.
- * g++.dg/debug/dwarf2/namespace-2.C: New.
- * g++.dg/debug/dwarf2/localclass3.C: New.
+ Revert
+ 2014-04-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-2012-06-19 Richard Guenther <rguenther@suse.de>
+ * gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
+ optimization.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
- PR middle-end/53470
- * g++.dg/lto/pr53470_0.C: New testcase.
- * gcc.dg/lto/pr53470_0.c: Likewise.
+2014-04-08 Richard Biener <rguenther@suse.de>
-2012-06-19 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/60785
+ * gcc.dg/graphite/pr60785.c: New testcase.
- Reapply:
- PR c++/53137
- * g++.dg/cpp0x/lambda/lambda-template5.C: New.
+2014-04-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR c++/53599
- * g++.dg/template/local7.C: New.
+ PR target/60602
+ * gcc.c-torture/compile/pr28865.c: XFAIL on sparc*-*-solaris2.9*
+ with as at -O0.
-2012-06-16 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
+2014-04-08 Nathan Sidwell <nathan@codesourcery.com>
- Back port from mainline
- 2012-05-09 Uros Bizjak <ubizjak@gmail.com>
+ * g++.dg/warn/Wnvdtor-2.C: Add more cases.
+ * g++.dg/warn/Wnvdtor-3.C: Likewise.
+ * g++.dg/warn/Wnvdtor-4.C: Likewise.
- PR target/52908
- * gcc.target/i386/xop-imul32widen-vector.c: Update scan-assembler
- directive to Scan for vpmuldq, not vpmacsdql.
+2014-04-07 Eric Botcazou <ebotcazou@adacore.com>
-2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
+ * gnat.dg/test_raise_from_pure.adb: UnXFAIL for ARM.
- * gnat.dg/vect8.ad[sb]: New test.
+2014-04-07 Charles Baylis <charles.baylis@linaro.org>
-2012-06-14 Jakub Jelinek <jakub@redhat.com>
+ PR target/60609
+ * g++.dg/torture/pr60609.C: New test.
- Backported from mainline
- 2012-06-12 Jakub Jelinek <jakub@redhat.com>
+2014-04-07 Richard Biener <rguenther@suse.de>
- PR rtl-optimization/53589
- * gcc.dg/torture/pr53589.c: New test.
+ PR tree-optimization/60766
+ * gcc.dg/torture/pr60766.c: New testcase.
- 2012-06-07 Jakub Jelinek <jakub@redhat.com>
+2014-04-07 Jason Merrill <jason@redhat.com>
- PR middle-end/53580
- * gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
- * gcc.dg/gomp/critical-4.c: Likewise.
- * gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
- * gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
- * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
- * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
- * c-c++-common/gomp/pr53580.c: New test.
+ * lib/gcc-dg.exp (dg-build-dso): New.
+ (gcc-dg-test-1): Handle dg-do-what "dso".
+ * lib/target-supports.exp (add_options_for_dlopen): New.
+ (check_effective_target_dlopen): Use it.
-2012-06-14 Tobias Burnus <burnus@net-b.de>
+2014-04-07 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
- Backport from mainline
- 2012-06-04 Tobias Burnus <burnus@net-b.de>
+ * gcc.target/arm/pr60657.c: Fix missing curly brace.
- PR fortran/50619
- * gfortran.dg/init_flag_10.f90: New.
+2014-04-07 Richard Biener <rguenther@suse.de>
-2012-06-14 Richard Guenther <rguenther@suse.de>
+ PR middle-end/60750
+ * g++.dg/torture/pr60750.C: New testcase.
+ * gcc.dg/tree-ssa/20040517-1.c: Adjust.
- Backport from mainline
- 2012-06-11 Richard Guenther <rguenther@suse.de>
+2014-04-06 Andreas Schwab <schwab@linux-m68k.org>
- PR c++/53616
- * g++.dg/ext/pr53605.C: New testcase.
+ * gcc.c-torture/compile/pr60655-1.c: Use __SIZE_TYPE__ for size_t.
-2012-06-14 Tobias Burnus <burnus@net-b.de>
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
- PR fortran/53597
- * gfortran.dg/save_4.f90: New.
+ PR testsuite/60671
+ g++.dg/pr49718.C: Adjust scan-assembler-times for hppa*-*-hpux*.
-2012-06-14 Richard Guenther <rguenther@suse.de>
+2014-04-06 John David Anglin <danglin@gcc.gnu.org>
- Backport from mainline
- 2012-06-06 Fabien Chêne <fabien@gcc.gnu.org>
+ PR testsuite/60672
+ * g++.dg/cpp1y/auto-fn25.C: Require lto.
- PR c++/52841
- * g++.dg/cpp0x/pr52841.C: New testcase.
+ * gcc.dg/atomic/stdatomic-flag.c: xfail on hppa*-*-hpux*.
-2012-06-13 Christian Bruel <christian.bruel@st.com>
+2014-04-05 Dominique d'Humieres <dominiq@lps.ens.fr>
- PR target/53621
- * gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
+ * gfortran.dg/warn_conversion_4.f90: Adjust test.
-2012-06-14 Release Manager
+2014-05-04 Pitchumani Sivanupandi <Pitchumani.S@atmel.com>
- * GCC 4.7.1 released.
+ * gcc.target/avr/dev-specific-rmw.c: New test.
-2012-06-12 Jason Merrill <jason@redhat.com>
+2014-04-04 Cong Hou <congh@google.com>
- PR c++/53599
- * g++.dg/template/local7.C: New.
+ PR tree-optimization/60656
+ * gcc.dg/vect/pr60656.c: New test.
- Revert:
- PR c++/53137
- * g++.dg/cpp0x/lambda/lambda-template5.C: New.
+2014-04-04 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+ * gcc.dg/builtin-bswap-6.c: Adjust return value to disable GCC
+ optimization.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
- PR c++/53524
- * g++.dg/warn/Wenum-compare-no-2: New.
+2014-04-04 Paolo Carlini <paolo.carlini@oracle.com>
-2012-06-04 Edmar Wienskoski <edmar@freescale.com>
+ PR c++/58207
+ * g++.dg/cpp0x/constexpr-ice15.C: New.
- PR target/53559
- * gcc.target/powerpc/cell_builtin_1.c: New test case.
- * gcc.target/powerpc/cell_builtin_2.c: Ditto.
- * gcc.target/powerpc/cell_builtin_3.c: Ditto.
- * gcc.target/powerpc/cell_builtin_4.c: Ditto.
- * gcc.target/powerpc/cell_builtin_5.c: Ditto.
- * gcc.target/powerpc/cell_builtin_6.c: Ditto.
- * gcc.target/powerpc/cell_builtin_7.c: Ditto.
- * gcc.target/powerpc/cell_builtin_8.c: Ditto.
+2014-04-04 Jan Hubicka <hubicka@ucw.cz>
-2012-06-04 Richard Guenther <rguenther@suse.de>
+ PR ipa/59626
+ testcase by Richard Biener
+ * gcc.dg/lto/pr59626_0.c: New testcase.
+ * gcc.dg/lto/pr59626_1.c: New testcase.
- Backport from mainline
- 2012-04-25 Jakub Jelinek <jakub@redhat.com>
+2014-04-04 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
- PR middle-end/52979
- * gcc.c-torture/compile/pr52979-1.c: New test.
- * gcc.c-torture/execute/pr52979-1.c: New test.
- * gcc.c-torture/execute/pr52979-2.c: New test.
+ PR debug/60655
+ * gcc.c-torture/compile/pr60655-1.c: New test.
-2012-06-04 Jakub Jelinek <jakub@redhat.com>
+2014-04-04 Martin Jambor <mjambor@suse.cz>
- PR tree-optimization/53550
- * gcc.dg/pr53550.c: New test.
+ PR ipa/60640
+ * g++.dg/ipa/pr60640-1.C: New test.
+ * g++.dg/ipa/pr60640-2.C: Likewise.
+ * g++.dg/ipa/pr60640-3.C: Likewise.
+ * g++.dg/ipa/pr60640-4.C: Likewise.
-2012-06-04 Richard Guenther <rguenther@suse.de>
- Eric Botcazou <ebotcazou@adacore.com>
+2014-04-04 Jeff Law <law@redhat.com>
- Backport from mainline
- PR middle-end/52080
- PR middle-end/52097
- PR middle-end/48124
- * gcc.dg/torture/pr48124-1.c: New testcase.
- * gcc.dg/torture/pr48124-2.c: Likewise.
- * gcc.dg/torture/pr48124-3.c: Likewise.
- * gcc.dg/torture/pr48124-4.c: Likewise.
- * gnat.dg/pack16.adb: Likewise.
- * gnat.dg/pack16_pkg.ads: Likewise.
- * gnat.dg/pack17.adb: Likewise.
- * gnat.dg/specs/pack7.ads: Likewise.
- * gnat.dg/specs/pack8.ads: Likewise.
- * gnat.dg/specs/pack8_pkg.ads: Likewise.
+ PR target/60657
+ * gcc.target/arm/pr60657.c: New test.
-2012-06-01 Jason Merrill <jason@redhat.com>
+2014-04-04 Richard Biener <rguenther@suse.de>
- PR c++/52973
- * g++.dg/ext/visibility/template12.C: New.
- * g++.dg/ext/attrib14.C: Adjust warning line.
+ PR ipa/60746
+ * g++.dg/torture/pr60746.C: New testcase.
- PR c++/52725
- * g++.dg/parse/new6.C: New.
- * g++.dg/template/sizeof-template-argument.C: Adjust error message.
+2014-04-04 Fabien Chêne <fabien@gcc.gnu.org>
-2012-06-01 Jason Merrill <jason@redhat.com>
+ * g++.old-deja/g++.robertl/eb121.C: Adjust.
+ * g++.old-deja/g++.jason/overload21.C: Likewise.
+ * g++.old-deja/g++.law/init5.C: Likewise.
- PR c++/53137
- * g++.dg/cpp0x/lambda/lambda-template5.C: New.
+2014-04-03 Cong Hou <congh@google.com>
-2012-06-01 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/60505
+ * gcc.dg/vect/pr60505.c: New test.
- PR c++/53484
- * g++.dg/cpp0x/auto33.C: New.
+2014-04-03 Richard Biener <rguenther@suse.de>
-2012-06-01 Eric Botcazou <ebotcazou@adacore.com>
+ PR tree-optimization/60740
+ * gcc.dg/graphite/pr60740.c: New testcase.
- * c-c++-common/restrict-2.c: Revert previous change.
+2014-04-03 Nathan Sidwell <nathan@codesourcery.com>
-2012-06-01 Eric Botcazou <ebotcazou@adacore.com>
+ * g++.dg/warn/Wnvdtor.C: Add non-polymorphic case.
+ * g++.dg/warn/Wnvdtor-2.C: New.
+ * g++.dg/warn/Wnvdtor-3.C: New.
+ * g++.dg/warn/Wnvdtor-4.C: New.
+ * g++.dg/warn/Weff1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-1.C: Delete.
+ * g++.old-deja/g++.benjamin/15309-2.C: Delete.
- PR ada/53517
- * gnat.dg/lto14.adb: Skip on Solaris.
+2014-04-02 Jan Hubicka <hubicka@ucw.cz>
-2012-05-31 Jason Merrill <jason@redhat.com>
+ PR ipa/60659
+ * testsuite/g++.dg/torture/pr60659.C: New testcase.
- PR c++/52905
- * g++.dg/cpp0x/initlist-ctor1.C: New.
+2014-04-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-05-31 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/60733
+ * gcc.dg/torture/pr60733.c: New test.
- PR middle-end/48493
- * gcc.dg/torture/pr48493.c: New testcase.
+2014-04-02 Vladimir Makarov <vmakarov@redhat.com>
-2012-05-30 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/60650
+ * gcc.target/arm/pr60650-2.c: New.
- PR c++/53356
- * g++.dg/init/new33.C: New test.
+2014-04-02 Joseph Myers <joseph@codesourcery.cmo>
-2012-05-30 Jason Merrill <jason@redhat.com>
+ * gcc.target/i386/avx2-vpand-3.c,
+ gcc.target/i386/avx256-unaligned-load-2.c: Use -mno-prefer-avx128.
- PR c++/53220
- * c-c++-common/array-lit.c: New.
- * g++.dg/ext/complit12.C: #if 0 out decay-to-pointer test.
+2014-04-02 Joseph Myers <joseph@codesourcery.com>
-2012-05-30 Richard Guenther <rguenther@suse.de>
+ * gcc.target/i386/funcspec-2.c, gcc.target/i386/funcspec-3.c,
+ gcc.target/i386/funcspec-9.c, gcc.target/i386/isa-1.c,
+ gcc.target/i386/memcpy-strategy-1.c,
+ gcc.target/i386/memcpy-strategy-2.c,
+ gcc.target/i386/memcpy-vector_loop-1.c,
+ gcc.target/i386/memcpy-vector_loop-2.c,
+ gcc.target/i386/memset-vector_loop-1.c,
+ gcc.target/i386/memset-vector_loop-2.c,
+ gcc.target/i386/sse2-init-v2di-2.c, gcc.target/i386/ssetype-1.c,
+ gcc.target/i386/ssetype-2.c, gcc.target/i386/ssetype-5.c: Skip for
+ -march= options different from those in dg-options.
- PR middle-end/53501
- * gcc.dg/torture/pr53501.c: New testcase.
- * c-c++-common/restrict-2.c: Adjust.
+2014-04-02 Joseph Myers <joseph@codesourcery.com>
-2012-05-30 Jakub Jelinek <jakub@redhat.com>
+ * gcc.target/i386/387-3.c, gcc.target/i386/387-4.c,
+ gcc.target/i386/pr30970.c: Use -mtune=generic.
+ * gcc.target/i386/avx2-vpaddb-3.c,
+ gcc.target/i386/avx2-vpaddd-3.c, gcc.target/i386/avx2-vpaddq-3.c,
+ gcc.target/i386/avx2-vpaddw-3.c, gcc.target/i386/avx2-vpmulld-3.c,
+ gcc.target/i386/avx2-vpmullw-3.c, gcc.target/i386/avx2-vpsrad-3.c,
+ gcc.target/i386/avx2-vpsraw-3.c, gcc.target/i386/avx2-vpsrld-3.c,
+ gcc.target/i386/avx2-vpsrlw-3.c, gcc.target/i386/avx2-vpsubb-3.c,
+ gcc.target/i386/avx2-vpsubd-3.c, gcc.target/i386/avx2-vpsubq-3.c,
+ gcc.target/i386/avx2-vpsubw-3.c,
+ gcc.target/i386/avx256-unaligned-load-1.c,
+ gcc.target/i386/avx256-unaligned-load-4.c,
+ gcc.target/i386/avx256-unaligned-store-1.c,
+ gcc.target/i386/avx256-unaligned-store-2.c,
+ gcc.target/i386/avx256-unaligned-store-4.c: Use
+ -mno-prefer-avx128.
- PR rtl-optimization/53519
- * gcc.c-torture/compile/pr53519.c: New test.
+2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Iain Sandoe <iain@codesourcery.com>
-2012-05-29 Richard Guenther <rguenther@suse.de>
+ PR target/54083
+ * gcc.dg/attr-weakref-1.c: Allow the test on darwin
+ with the additional options -Wl,-undefined,dynamic_lookup
+ and -Wl,-flat_namespace.
+ * gcc.dg/torture/pr53922.c: Additional option
+ -Wl,-flat_namespace for darwin[89].
+ * gcc.dg/torture/pr60092.c: Additional options
+ -Wl,-undefined,dynamic_lookup and -Wl,-flat_namespace
+ for darwin[89].
- PR tree-optimization/53516
- * gcc.dg/torture/pr53516.c: New testcase.
+2014-03-26 Dominique d'Humieres <dominiq@lps.ens.fr>
-2012-05-29 Paolo Carlini <paolo.carlini@oracle.com>
+ PR target/43751
+ * lib/prune.exp: Modify the regular express to prune
+ the new warnings introduced by r205679 on darwin9.
- PR c++/53491
- * g++.dg/parse/crash60.C: New.
+2014-04-01 Fabien Chêne <fabien@gcc.gnu.org>
-2012-05-28 Jakub Jelinek <jakub@redhat.com>
+ * g++.dg/init/ctor4.C: Adjust.
+ * g++.dg/init/ctor4-1.C: New.
+ * g++.dg/cpp0x/defaulted2.C: Adjust.
- PR tree-optimization/53505
- * c-c++-common/torture/pr53505.c: New test.
+2014-04-01 Richard Henderson <rth@redhat.com>
-2012-05-25 Ian Lance Taylor <iant@google.com>
+ PR target/60704
+ * gcc.dg/pr60704.c: New file.
- * gcc.dg/split-6.c: New test.
+2014-04-01 Bin Cheng <bin.cheng@arm.com>
-2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+ PR target/60363
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Xfail for
+ logical_op_short_circuit targets.
- * gnat.dg/lto14.adb: New test.
+2014-04-01 Dominique d'Humieres <dominiq@lps.ens.fr>
-2012-05-24 Richard Guenther <rguenther@suse.de>
+ PR libfortran/60128
+ * gfortran.dg/fmt_en.f90: Skip unsupported rounding tests.
+ XFAIL for i?86-*-solaris2.9* and hppa*-*-hpux*.
- PR middle-end/53460
- * g++.dg/tree-prof/pr53460.C: New testcase.
+2014-03-31 H.J. Lu <hongjiu.lu@intel.com>
-2012-05-24 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/60700
+ * gcc.target/i386/pr60700.c: New test.
- PR tree-optimization/53465
- * gcc.c-torture/execute/pr53465.c: New test.
+2014-03-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
-2012-05-23 Tobias Burnus <burnus@net-b.de>
+ PR target/60650
+ * gcc.target/arm/pr60650.c: Adjust command line options.
- PR fortran/53389
- * gfortran.dg/realloc_on_assign_15.f90: New.
+2014-03-31 Martin Jambor <mjambor@suse.cz>
-2012-05-22 Richard Guenther <rguenther@suse.de>
+ PR middle-end/60647
+ * gcc.dg/pr60647-1.c: New test.
+ * gcc.dg/pr60647-2.c: Likewise.
- PR tree-optimization/53408
- * gcc.dg/torture/pr53408.c: New testcase.
+2014-03-31 Richard Biener <rguenther@suse.de>
-2012-05-22 Richard Guenther <rguenther@suse.de>
+ * gcc.dg/lto/pr55113_0.c: Skip also for 32bit multilib on x86_64.
- PR middle-end/51071
- * gcc.dg/torture/pr51071-2.c: New testcase.
+2014-03-31 Kugan Vivekanandarajah <kuganv@linaro.org>
-2012-05-21 Jakub Jelinek <jakub@redhat.com>
+ PR target/60034
+ * gcc.target/aarch64/pr60034.c: New file.
- PR tree-optimization/53366
- * gcc.dg/torture/pr53366-1.c: New test.
- * gcc.dg/torture/pr53366-2.c: New test.
- * gcc.target/i386/pr53366-1.c: New test.
- * gcc.target/i386/pr53366-2.c: New test.
+2014-03-29 Adam Butcher <adam@jessamine.co.uk>
- PR tree-optimization/53409
- * gcc.c-torture/compile/pr53409.c: New test.
+ PR c++/60626
+ * g++.dg/cpp1y/pr60626.C: New testcase.
- PR tree-optimization/53410
- * gcc.c-torture/compile/pr53410-1.c: New test.
- * gcc.c-torture/compile/pr53410-2.c: New test.
+2014-03-29 Joseph Myers <joseph@codesourcery.com>
-2012-05-21 Joseph Myers <joseph@codesourcery.com>
+ * gcc.dg/pr45416.c: Allow bextr on x86.
+ * gcc.target/i386/fma4-builtin.c, gcc.target/i386/fma4-fma-2.c,
+ gcc.target/i386/fma4-fma.c, gcc.target/i386/fma4-vector-2.c,
+ gcc.target/i386/fma4-vector.c: Use -mno-fma.
+ * gcc.target/i386/l_fma_double_1.c,
+ gcc.target/i386/l_fma_double_2.c,
+ gcc.target/i386/l_fma_double_3.c,
+ gcc.target/i386/l_fma_double_4.c,
+ gcc.target/i386/l_fma_double_5.c,
+ gcc.target/i386/l_fma_double_6.c, gcc.target/i386/l_fma_float_1.c,
+ gcc.target/i386/l_fma_float_2.c, gcc.target/i386/l_fma_float_3.c,
+ gcc.target/i386/l_fma_float_4.c, gcc.target/i386/l_fma_float_5.c,
+ gcc.target/i386/l_fma_float_6.c: Use -mno-fma4.
+ * gcc.target/i386/pr27971.c: Use -mno-tbm.
+ * gcc.target/i386/pr42542-4a.c: Use -mno-avx.
+ * gcc.target/i386/pr59390.c: Use -mno-fma -mno-fma4.
- PR c/53418
- * gcc.c-torture/compile/pr53418-1.c,
- gcc.c-torture/compile/pr53418-2.c: New tests.
+2014-03-29 Jakub Jelinek <jakub@redhat.com>
-2012-05-21 Patrick Marlier <patrick.marlier@gmail.com>
+ PR target/60648
+ * g++.dg/pr60648.C: Move test to...
+ * g++.dg/torture/pr60648.C: ... here. Run on all targets, remove
+ dg-options, add for fpic targets dg-additional-options -fPIC.
- * gcc.dg/tm/indirect-2.c: New test.
+2014-03-28 Eric Botcazou <ebotcazou@adacore.com>
-2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
+ * gnat.dg/opt33.adb: New testcase.
- Backport from mainline
- 2012-05-21 Uros Bizjak <ubizjak@gmail.com>
- H.J. Lu <hongjiu.lu@intel.com>
+2014-03-28 Vladimir Makarov <vmakarov@redhat.com>
- PR target/53416
- * gcc.target/i386/pr53416.c: New file.
+ PR target/60697
+ * gcc.target/aarch64/pr60697.c: New.
-2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
+2014-03-27 Jeff Law <law@redhat.com>
- * gnat.dg/lto13.adb: New test.
- * gnat.dg/lto13_pkg.ad[sb]: New helper.
+ PR target/60648
+ * g++.dg/pr60648.C: New test.
-2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
+2014-03-28 Adam Butcher <adam@jessamine.co.uk>
- * gnat.dg/specs/lto12.ads: New test.
- * gnat.dg/specs/lto12_pkg.ads: New helper.
+ PR c++/60573
+ * g++.dg/cpp1y/pr60573.C: New testcase.
-2012-05-17 David S. Miller <davem@davemloft.net>
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
- * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
- failure on sparc-*-linux-gnu.
+ PR target/60693
+ * gcc.target/i386/pr60693.c: New test.
-2012-05-16 Richard Henderson <rth@redhat.com>
+2014-03-28 Vishnu K S <Vishnu.k_s@atmel.com>
- PR debug/52727
- * g++.dg/opt/pr52727.C: New testcase.
+ * gcc.dg/pr59940.c (si): Use 32-bit SI mode instead of int.
-2012-05-16 Richard Guenther <rguenther@suse.de>
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/53364
- * g++.dg/torture/pr53364.C: New testcase.
+ PR c++/60689
+ * c-c++-common/pr60689.c: New test.
-2012-05-15 Jakub Jelinek <jakub@redhat.com>
+ PR c++/58678
+ * g++.dg/abi/thunk6.C: Scan assembler for _ZTv0_n32_N1CD1Ev
+ only for lp64 targets and scan for _ZTv0_n16_N1CD1Ev for ilp32
+ targets.
- PR target/53358
- * gcc.dg/pr53358.c: New test.
+2014-03-28 Vladimir Makarov <vmakarov@redhat.com>
-2012-05-14 Uros Bizjak <ubizjak@gmail.com>
+ PR target/60675
+ * gcc.target/aarch64/pr60675.C: New.
- * gcc.target/i386/avx256-unaligned-load-[1234].c: Update scan strings.
- * gcc.target/i386/avx256-unaligned-store-[1234].c: Ditto.
+2014-03-28 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Remove s390 special option.
+ * lib/target-supports.exp: Return true for s390
+ in check_effective_logical_op_short_circuit.
- * gnat.dg/null_pointer_deref3.adb: New test.
+2014-03-28 Kirill Yukhin <kirill.yukhin@intel.com>
-2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
+ * gcc.target/i386/avx512f-vshuff32x4-2.c: Fix initialization
+ of second source operand.
+ * gcc.target/i386/avx512f-vshuff64x2-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi64x2-2.c: Ditto.
- PR c++/53301
- * g++.dg/warn/Wzero-as-null-pointer-constant-6.C: New.
+2014-03-28 Jakub Jelinek <jakub@redhat.com>
-2012-05-10 Eric Botcazou <ebotcazou@adacore.com>
+ PR ipa/60315
+ * g++.dg/torture/pr60315.C: Add -std=c++11 to dg-options.
- * gnat.dg/lto11.ad[sb]: New test.
+2014-03-28 Tobias Burnus <burnus@net-b.de>
-2012-05-08 Hans-Peter Nilsson <hp@axis.com>
+ * lib/cilk-plus-dg.exp: New.
+ * g++.dg/cilk-plus/cilk-plus.exp: Use it.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Use it.
- PR target/53272
- * gcc.dg/torture/pr53272-1.c, gcc.dg/torture/pr53272-2.c: New test.
+2014-03-27 Thomas Koenig <tkoenig@gcc.gnu.org>
-2012-05-07 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/60522
+ * gfortran.dg/where_4.f90: New test case.
- PR tree-optimization/53239
- * g++.dg/opt/vrp3.C: New test.
- * g++.dg/opt/vrp3-aux.cc: New file.
- * g++.dg/opt/vrp3.h: New file.
+2014-03-27 Tobias Burnus <burnus@net-b.de>
-2012-05-07 Tobias Burnus <burnus@net-b.de>
+ PR fortran/58880
+ * gfortran.dg/finalize_24.f90: New.
- Backport from mainline:
- 2012-05-07 Tobias Burnus <burnus@net-b.de>
+2014-03-27 Michael Meissner <meissner@linux.vnet.ibm.com>
- PR fortran/53255
- * gfortran.dg/typebound_operator_15.f90: New.
+ * gcc.target/powerpc/p8vector-vbpermq.c: New test to test the
+ vbpermq builtin.
-2012-05-05 Tobias Burnus <burnus@net-b.de>
+ * gcc.target/powerpc/vsx-extract-1.c: New test to test VSX
+ vec_select optimizations.
+ * gcc.target/powerpc/vsx-extract-2.c: Likewise.
+ * gcc.target/powerpc/vsx-extract-3.c: Likewise.
- Backport from mainline:
- 2012-05-04 Tobias Burnus <burnus@net-b.de>
+ PR target/60672
+ * gcc.target/powerpc/pr60676.c: New file, make sure xxsldwi and
+ xxpermdi builtins are supported.
- PR fortran/53111
- * gfortran.dg/constructor_7.f90: New.
- * gfortran.dg/constructor_8.f90: New.
+2014-03-27 Vladimir Makarov <vmakarov@redhat.com>
-2012-05-04 Ulrich Weigand <ulrich.weigand@linaro.org>
+ PR rtl-optimization/60650
+ * gcc.target/arm/pr60650.c: New.
- Backport from mainline:
+2014-03-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- 2012-05-04 Ulrich Weigand <ulrich.weigand@linaro.org>
+ * gcc.target/s390/20140327-1.c: New testcase.
- PR tree-optimization/52633
- * gcc.dg/vect/vect-over-widen-1.c: Two patterns should now be
- recognized as widening shifts instead of over-widening.
- * gcc.dg/vect/vect-over-widen-1-big-array.c: Likewise.
- * gcc.dg/vect/vect-over-widen-4.c: Likewise.
- * gcc.dg/vect/vect-over-widen-4-big-array.c: Likewise.
- * gcc.target/arm/pr52633.c: New test.
+2014-03-27 Jakub Jelinek <jakub@redhat.com>
- 2012-04-10 Ulrich Weigand <ulrich.weigand@linaro.org>
+ PR middle-end/60682
+ * g++.dg/gomp/pr60682.C: New test.
- PR tree-optimization/52870
- * gcc.dg/vect/pr52870.c: New test.
+2014-03-27 John David Anglin <danglin@gcc.gnu.org>
-2012-05-04 Richard Guenther <rguenther@suse.de>
+ * gcc.dg/torture/pr60092.c: Remove default dg-skip-if arguments.
- * gcc.dg/lto/pr53214_0.c: New testcase.
+2014-03-27 Marcus Shawcroft <marcus.shawcroft@arm.com>
-2012-05-04 Eric Botcazou <ebotcazou@adacore.com>
+ PR target/60580
+ * gcc.target/aarch64/pr60580_1.c: New.
+ * gcc.target/aarch64/test_fp_attribute_1.c: New.
+ * gcc.target/aarch64/test_fp_attribute_2.c: New.
- * gcc.target/ia64/pr48496.c: New test.
- * gcc.target/ia64/pr52657.c: Likewise.
+2014-03-26 Dehao Chen <dehao@google.com>
-2012-05-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+ * gcc.dg/predict-8.c: New test.
- Backport from mainline
- 2012-05-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+2014-03-26 Fabien Chêne <fabien@gcc.gnu.org>
- PR target/53199
- * gcc.target/powwerpc/pr53199.c: New file.
+ PR c++/52369
+ * g++.dg/init/const10.C: New.
+ * g++.dg/init/const11.C: New.
+ * g++.dg/init/pr25811.C: Adjust.
+ * g++.dg/init/pr29043.C: Likewise.
+ * g++.dg/init/pr43719.C: Likewise.
+ * g++.dg/init/pr44086.C: Likewise.
+ * g++.dg/init/ctor8.C: Likewise.
+ * g++.dg/init/uninitialized1.C: Likewise.
-2012-05-03 Martin Jambor <mjambor@suse.cz>
+2014-03-26 Jakub Jelinek <jakub@redhat.com>
- Backport from mainline
- 2012-05-02 Martin Jambor <mjambor@suse.cz>
+ PR sanitizer/60636
+ * c-c++-common/ubsan/pr60636.c: New test.
- PR lto/52605
- * g++.dg/lto/pr52605_0.C: New test.
+2014-03-26 Andreas Schwab <schwab@suse.de>
-2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
+ * g++.dg/torture/pr60315.C: Remove duplication.
- PR c++/53186
- * g++.dg/other/final2.C: New.
+2014-03-26 Eric Botcazou <ebotcazou@adacore.com>
-2012-05-03 Jakub Jelinek <jakub@redhat.com>
+ * gcc.c-torture/execute/20140326-1.c: New test.
- PR debug/53174
- * gcc.dg/pr53174.c: New test.
+2014-03-25 Jan Hubicka <hubicka@ucw.cz>
- PR target/53187
- * gcc.target/arm/pr53187.c: New test.
- * gcc.c-torture/compile/pr53187.c: New test.
+ PR ipa/60315
+ * g++.dg/torture/pr60315.C: New testcase.
-2012-05-03 Richard Guenther <rguenther@suse.de>
+2014-03-25 Martin Jambor <mjambor@suse.cz>
- PR tree-optimization/53144
- * gcc.dg/torture/pr53144.c: New testcase.
+ PR ipa/60600
+ * g++.dg/ipa/pr60600.C: New test.
-2012-05-02 Tobias Burnus <burnus@net-b.de>
+2014-03-25 John David Anglin <danglin@gcc.gnu.org>
- Backport from mainline
- 2012-04-16 Tobias Burnus <burnus@net-b.de>
+ PR testsuite/58013
+ * g++.dg/opt/pr56999.C: Pop hidden visibility.
- PR fortran/52864
- * gfortran.dg/pointer_intent_6.f90: New.
+2014-03-25 Richard Biener <rguenther@suse.de>
-2012-05-02 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/60635
+ * gfortran.dg/lto/pr60635_0.f90: New testcase.
+ * gfortran.dg/lto/pr60635_1.c: Likewise.
- PR tree-optimization/53163
- * gcc.c-torture/compile/pr53163.c: New test.
+2014-03-24 Adam Butcher <adam@jessamine.co.uk>
- PR rtl-optimization/53160
- * gcc.c-torture/execute/pr53160.c: New test.
+ PR c++/60627
+ * g++.dg/cpp1y/pr60627.C: New testcase.
-2012-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+2014-03-24 Alex Velenko <Alex.Velenko@arm.com>
- PR fortran/53148
- Backport from trunk
- * gfortran.dg/function_optimize_12.f90: New test.
+ * gcc.target/aarch64/ushr64_1.c: New.
-2012-04-30 Uros Bizjak <ubizjak@gmail.com>
+2014-03-24 James Greenhalgh <james.greenhalgh@arm.com>
- Backport from mainline
- 2012-04-27 Paolo Bonzini <bonzini@gnu.org>
+ * gcc.target/aarch64/vect-abs.c (dg-options): Add -std=c99.
+ (LONG_LONG): Use LLONG.
+ (set_rvector_long): Explicitly return void.
+ (set_vector_long): Likewise.
+ (check_vector_long): Likewise.
- PR target/53138
- * gcc.c-torture/execute/20120427-1.c: New testcase.
+2014-03-24 Marek Polacek <polacek@redhat.com>
-2012-04-26 Hans-Peter Nilsson <hp@axis.com>
+ * c-c++-common/ubsan/div-by-zero-4.c: Don't include limits.h.
+ Define INT_MIN.
+ * c-c++-common/ubsan/overflow-1.c: Check for unwanted output.
+ * c-c++-common/ubsan/overflow-add-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-3.c: Likewise.
+ * c-c++-common/ubsan/overflow-negate-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-sub-1.c: Likewise.
+ * c-c++-common/ubsan/pr59503.c: Likewise.
+ * c-c++-common/ubsan/pr60613-1.c: Likewise.
+ * c-c++-common/ubsan/save-expr-1.c: Likewise.
+ * c-c++-common/ubsan/shift-3.c: Likewise.
+ * c-c++-common/ubsan/shift-6.c: Likewise.
+ * c-c++-common/ubsan/undefined-1.c: Likewise.
+ * c-c++-common/ubsan/vla-2.c: Likewise.
+ * c-c++-common/ubsan/vla-3.c: Likewise.
+ * c-c++-common/ubsan/vla-4.c: Likewise.
+ * g++.dg/ubsan/cxx11-shift-1.C: Likewise.
+ * g++.dg/ubsan/return-2.C: Likewise.
- PR target/53120
- * gcc.dg/torture/pr53120.c: New test.
+2014-03-23 John David Anglin <danglin@gcc.gnu.org>
-2012-04-25 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/tree-prof/pr59003.c: Add -fno-common to dg-options on
+ hppa*-*-hpux*.
- PR c/52880
- * gcc.dg/pr52880.c: New test.
+ * gcc.dg/torture/pr60092.c: Skip on 32-bit hpux.
-2012-04-24 Georg-Johann Lay <avr@gjlay.de>
+ PR libfortran/59313
+ PR libfortran/58015
+ * gfortran.dg/erf_3.F90: Skip on hppa*-*-hpux*.
+ * gfortran.dg/round_4.f90: Likewise.
- PR testsuite/52641
- PR tree-optimizations/52891
+2014-03-23 Dominique d'Humieres <dominiq@lps.ens.fr>
- * gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.
+ PR libfortran/60128
+ * gfortran.dg/fmt_en.f90: Update test. XFAIL for
+ i?86-*-solaris2.9*.
-2012-04-24 Richard Guenther <rguenther@suse.de>
+2014-03-22 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/53085
- * g++.dg/torture/pr53085.C: New testcase.
+ PR sanitizer/60613
+ * c-c++-common/ubsan/pr60613-1.c: New test.
+ * c-c++-common/ubsan/pr60613-2.c: New test.
-2012-04-23 Richard Guenther <rguenther@suse.de>
+2014-03-22 Matthias Klose <doko@ubuntu.com>
- PR c/53060
- * gcc.dg/pr53060.c: New testcase.
+ * g++.dg/cpp0x/regress: Remove empty directory.
-2012-04-23 Jakub Jelinek <jakub@redhat.com>
+2014-03-22 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimizations/52891
- * gcc.c-torture/compile/pr52891-1.c: New test.
- * gcc.c-torture/compile/pr52891-2.c: New test.
+ PR debug/60603
+ * gcc.dg/debug/dwarf2/dwarf2-macro2.c: New test.
-2012-04-20 Ian Lance Taylor <iant@google.com>
+2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
- * go.test/go-test.exp (go-set-goarch): Recognize powerpc*-*-*.
- (go-gc-tests): Skip nilptr.go on powerpc*-*-*.
+ * g++.dg/cpp1y/pr60033.C: Use target c++1y.
+ * g++.dg/cpp1y/pr60393.C: Likewise.
-2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
+2014-03-21 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/53003
- * g++.dg/parse/crash59.C: New.
+ PR c++/60384
+ * g++.dg/cpp1y/pr60384.C: New.
-2012-04-16 Jason Merrill <jason@redhat.com>
+2014-03-21 Jakub Jelinek <jakub@redhat.com>
- PR c++/38543
- * g++.dg/cpp0x/variadic131.C: New.
+ PR target/60598
+ * gcc.dg/pr60598.c: New test.
-2012-04-16 Jason Merrill <jason@redhat.com>
+2014-03-21 Martin Jambor <mjambor@suse.cz>
- PR c++/50830
- * g++.dg/cpp0x/variadic129.C: New.
+ PR ipa/59176
+ * g++.dg/torture/pr59176.C: New test.
- PR c++/50303
- * g++.dg/cpp0x/variadic128.C: New.
+2014-03-21 Martin Jambor <mjambor@suse.cz>
-2012-04-16 Uros Bizjak <ubizjak@gmail.com>
+ PR ipa/60419
+ * g++.dg/ipa/pr60419.C: New test.
- Backport from mainline
- 2012-04-12 Uros Bizjak <ubizjak@gmail.com>
+2014-03-21 Richard Biener <rguenther@suse.de>
- PR target/52932
- * gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
- second function argument.
- * gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
- (calc_permps): Update declaration. Calculate result correctly.
- (avx2_test): Change src2 type to union256i_d.
- * gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
- correctly.
+ PR tree-optimization/60577
+ * gcc.dg/tree-ssa/ssa-lim-11.c: New testcase.
-2012-04-16 Martin Jambor <mjambor@suse.cz>
+2014-03-21 Tobias Burnus <burnus@net-b.de>
- Backported from mainline
+ PR fortran/60599
+ * lib/gcc-dg.exp (scan-module): Uncompress .mod files for reading.
- 2012-04-13 Martin Jambor <mjambor@suse.cz>
- PR middle-end/52939
+2014-03-20 Jakub Jelinek <jakub@redhat.com>
- * g++.dg/ipa/pr52939.C: New test.
+ PR middle-end/60597
+ * g++.dg/opt/pr60597.C: New test.
-2012-04-15 Jason Merrill <jason@redhat.com>
+ PR c++/60572
+ * g++.dg/init/pr60572.C: New test.
- PR c++/52380
- * g++.dg/cpp0x/variadic125.C: New.
+2014-03-20 Zhenqiang Chen <zhenqiang.chen@linaro.org>
- PR c++/52292
- * g++.dg/cpp0x/variadic124.C: New.
+ * gcc.target/arm/neon-modes-3.c: Add "-g" option.
-2012-04-15 Fabien Chêne <fabien@gcc.gnu.org>
+2014-03-19 Tobias Burnus <burnus@net-b.de>
- PR c++/52465
- * g++.dg/lookup/using52.C: New.
+ PR fortran/60543
+ PR fortran/60283
+ * gfortran.dg/implicit_pure_4.f90: New.
-2012-04-13 Jason Merrill <jason@redhat.com>
+2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/52824
- * g++.dg/cpp0x/variadic123.C: New.
- * g++.dg/cpp0x/alias-decl-15.C: Remove dg-errors.
+ PR c++/51474
+ * g++.dg/cpp0x/nsdmi-virtual2.C: New.
-2012-04-11 Jason Merrill <jason@redhat.com>
+2014-03-19 H.J. Lu <hongjiu.lu@intel.com>
- PR c++/52906
- * g++.dg/ext/attrib45.C: New.
+ PR testsuite/60590
+ * lib/target-libpath.exp (set_ld_library_path_env_vars): Log
+ LD_LIBRARY_PATH, LD_RUN_PATH, SHLIB_PATH, LD_LIBRARY_PATH_32,
+ LD_LIBRARY_PATH_64 and DYLD_LIBRARY_PATH.
-2012-04-13 Tom de Vries <tom@codesourcery.com>
+2014-03-19 Paolo Carlini <paolo.carlini@oracle.com>
- Backport from mainline r186419.
+ PR c++/60332
+ * g++.dg/cpp1y/pr60332.C: New.
- 2012-04-13 Tom de Vries <tom@codesourcery.com>
+2014-03-19 Marek Polacek <polacek@redhat.com>
- * gcc.dg/pr52734.c: New test.
+ PR sanitizer/60569
+ * g++.dg/ubsan/pr60569.C: New test.
-2012-04-13 Richard Guenther <rguenther@suse.de>
+2014-03-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR tree-optimization/52969
- * gcc.dg/torture/pr52969.c: New testcase.
+ * gcc.dg/tls/pr58595.c: Require tls_runtime instead of tls.
-2012-04-13 Richard Guenther <rguenther@suse.de>
+2014-03-19 Jakub Jelinek <jakub@redhat.com>
- PR c/52862
- * gcc.dg/pr52862.c: New testcase.
+ PR tree-optimization/60559
+ * g++.dg/vect/pr60559.cc: New test.
-2012-04-12 Michael Meissner <meissner@linux.vnet.ibm.com>
+2014-03-18 Ian Lance Taylor <iant@google.com>
- Backport from mainline
- 2012-04-12 Michael Meissner <meissner@linux.vnet.ibm.com>
-
- PR target/52775
- * gcc.target/powerpc/pr52775.c: New file.
-
-2012-04-12 Richard Guenther <rguenther@suse.de>
-
- PR tree-optimization/52943
- * gcc.dg/torture/pr52943.c: New testcase.
-
-2012-04-09 Mike Stump <mikestump@comcast.net>
-
- * g++.dg/cpp0x/udlit-raw-op.C: Don't use CRLF endings.
- * gcc.dg/tree-ssa/vrp59.c: Likewise.
- * gcc.dg/tree-ssa/vrp60.c: Likewise.
- * gnat.dg/aggr11.adb: Likewise.
- * gnat.dg/aggr11_pkg.ads: Likewise.
- * gnat.dg/aggr15.adb: Likewise.
- * gnat.dg/aggr15.ads: Likewise.
- * gnat.dg/aggr17.adb: Likewise.
- * gnat.dg/aggr18.adb: Likewise.
- * gnat.dg/array14.adb: Likewise.
- * gnat.dg/array14.ads: Likewise.
- * gnat.dg/array14_pkg.ads: Likewise.
- * gnat.dg/array19.adb: Likewise.
- * gnat.dg/array19.ads: Likewise.
- * gnat.dg/discr27.adb: Likewise.
- * gnat.dg/discr27.ads: Likewise.
- * gnat.dg/discr35.adb: Likewise.
- * gnat.dg/discr35.ads: Likewise.
- * gnat.dg/discr6.adb: Likewise.
- * gnat.dg/discr6_pkg.ads: Likewise.
- * gnat.dg/import1.adb: Likewise.
- * gnat.dg/import1.ads: Likewise.
- * gnat.dg/loop_address2.adb: Likewise.
- * gnat.dg/opt7.adb: Likewise.
- * gnat.dg/opt7.ads: Likewise.
- * gnat.dg/pointer_variable_bounds.adb: Likewise.
- * gnat.dg/pointer_variable_bounds.ads: Likewise.
- * gnat.dg/rep_clause2.adb: Likewise.
- * gnat.dg/rep_clause2.ads: Likewise.
- * gnat.dg/slice2.adb: Likewise.
- * gnat.dg/slice2.ads: Likewise.
- * gnat.dg/slice6.adb: Likewise.
- * gnat.dg/slice6_pkg.ads: Likewise.
- * gnat.dg/specs/unchecked_union2.ads: Likewise.
- * gnat.dg/taft_type2.adb: Likewise.
- * gnat.dg/taft_type2.ads: Likewise.
- * gnat.dg/taft_type2_pkg.ads: Likewise.
- * gnat.dg/volatile10.adb: Likewise.
- * gnat.dg/volatile10_pkg.ads: Likewise.
-
- * gcc.dg/dll-8.c: Remove execute permissions.
- * g++.dg/ext/dllexport5.C: Likewise.
-
-2012-04-09 Eric Botcazou <ebotcazou@adacore.com>
-
- * lib/target-supports.exp (check_effective_target_sparc_v9): New.
- (check_effective_target_sync_long_long): Add SPARC case.
- (check_effective_target_sync_long_long_runtime): Likewise.
- (check_effective_target_sync_int_long): Adjust SPARC case.
- (check_effective_target_sync_char_short): Likewise.
-
-2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
-
- PR fortran/52893
- Backport from trunk
- * gfortran.dg/function_optimize_11.f90: New test.
+ PR target/60563
+ * g++.dg/ext/sync-4.C (int32_t): Remove typedef.
+ (ditype): Rename typedef from int64_t.
-2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+2014-03-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
- PR fortran/52668
- Backport from trunk
- * gfortran.dg/use_only_6.f90: New test.
+ PR c/55383
+ * gcc.dg/cast-qual-3.c: New.
+ Revert:
+ 2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
+ * c-c++-common/Wcast-qual-1.c: More precise match text.
-2012-04-06 Mike Stump <mikestump@comcast.net>
+2014-03-18 Janus Weil <janus@gcc.gnu.org>
- PR testsuite/50722
- * gcc.dg/pr49994-3.c: Use -w to squelch non-portable warnings.
+ PR fortran/55207
+ PR fortran/60549
+ * gfortran.dg/assumed_rank_7.f90: Revert r208590.
+ * gfortran.dg/c_ptr_tests_16.f90: Ditto.
+ * gfortran.dg/inline_sum_bounds_check_1.f90: Ditto.
+ * gfortran.dg/intent_optimize_1.f90: Ditto.
+ * gfortran.dg/pointer_init_9.f90: Ditto.
+ * gfortran.dg/volatile4.f90: Ditto.
+ * gfortran.dg/volatile6.f90: Ditto.
-2012-04-05 Jason Merrill <jason@redhat.com>
+2014-03-18 Manuel López-Ibáñez <manu@gcc.gnu.org>
- PR c++/52596
- * g++.dg/template/qualified-id5.C: New.
+ PR c/55383
+ * c-c++-common/Wcast-qual-1.c: More precise match text.
-2012-04-03 Jason Merrill <jason@redhat.com>
+2014-03-18 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/52796
- * g++.dg/cpp0x/variadic-value1.C: New.
+ PR c++/60305
+ * g++.dg/cpp0x/constexpr-ice14.C: New.
-2012-04-03 Richard Guenther <rguenther@suse.de>
+2014-03-18 Paolo Carlini <paolo.carlini@oracle.com>
- Backport from mainline
- 2012-03-02 Richard Guenther <rguenther@suse.de>
+ PR c++/54250
+ * g++.dg/cpp0x/lambda/lambda-ice12.C: New.
- PR tree-optimization/52406
- * gcc.dg/torture/pr52406.c: New testcase.
+2014-03-18 Jakub Jelinek <jakub@redhat.com>
-2012-04-03 Richard Guenther <rguenther@suse.de>
+ PR sanitizer/60535
+ * c-c++-common/ubsan/null-1.c: Don't skip if -flto.
+ * c-c++-common/ubsan/null-2.c: Likewise.
+ * c-c++-common/ubsan/null-3.c: Likewise.
+ * c-c++-common/ubsan/null-4.c: Likewise.
+ * c-c++-common/ubsan/null-5.c: Likewise.
+ * c-c++-common/ubsan/null-6.c: Likewise.
+ * c-c++-common/ubsan/null-7.c: Likewise.
+ * c-c++-common/ubsan/null-8.c: Likewise.
+ * c-c++-common/ubsan/null-9.c: Likewise.
+ * c-c++-common/ubsan/null-10.c: Likewise.
+ * c-c++-common/ubsan/null-11.c: Likewise.
+ * c-c++-common/ubsan/overflow-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-add-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-add-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-int128.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-3.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-4.c: Likewise.
+ * c-c++-common/ubsan/overflow-negate-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-negate-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-sub-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-sub-2.c: Likewise.
+ * c-c++-common/ubsan/pr59333.c: Likewise.
+ * c-c++-common/ubsan/pr59503.c: Likewise.
+ * c-c++-common/ubsan/pr59667.c: Likewise.
+ * c-c++-common/ubsan/undefined-1.c: Likewise.
+ * g++.dg/ubsan/pr59250.C: Likewise.
+ * g++.dg/ubsan/pr59306.C: Likewise.
- Backport from mainline
- 2012-03-15 Richard Guenther <rguenther@suse.de>
+2014-03-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR middle-end/52580
- * gfortran.dg/vect/pr52580.f: New testcase.
+ * gcc.dg/tls/pr58595.c: Add tls options.
-2012-04-03 Richard Guenther <rguenther@suse.de>
+2014-03-18 Kirill Yukhin <kirill.yukhin@intel.com>
- Backport from mainline
- 2012-03-06 Richard Guenther <rguenther@suse.de>
+ * gcc.target/i386/avx-additional-reg-names.c: New.
+ * gcc.target/i386/avx512f-additional-reg-names.c: Ditto.
- PR middle-end/52493
- * gcc.dg/torture/pr52493.c: New testcase.
+2014-03-17 Adam Butcher <adam@jessamine.co.uk>
- 2012-03-23 Richard Guenther <rguenther@suse.de>
+ PR c++/60390
+ * g++.dg/cpp1y/pr60390.C: New testcase.
- PR tree-optimization/52678
- * gfortran.dg/pr52678.f: New testcase.
+ PR c++/60391
+ * g++.dg/cpp1y/pr60391.C: New testcase.
- 2012-03-26 Richard Guenther <rguenther@suse.de>
+2014-03-17 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/52701
- * gfortran.dg/pr52701.f90: New testcase.
+ PR target/60516
+ * gcc.target/i386/pr60516.c: New test.
- 2012-03-30 Richard Guenther <rguenther@suse.de>
+2014-03-17 Paolo Carlini <paolo.carlini@oracle.com>
- PR tree-optimization/52754
- * gcc.target/i386/pr52754.c: New testcase.
+ PR c++/59571
+ * g++.dg/cpp0x/constexpr-ice13.C: New.
-2012-04-03 Jakub Jelinek <jakub@redhat.com>
+2014-03-17 Marek Polacek <polacek@redhat.com>
- PR tree-optimization/52835
- * gfortran.dg/pr52835.f90: New test.
+ PR middle-end/60534
+ * gcc.dg/gomp/pr60534.c: New test.
-2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
+2014-03-17 Kai Tietz <ktietz@redhat.com>
- * gnat.dg/controlled6.adb: New test.
- * gnat.dg/controlled6_pkg.ads: New helper.
- * gnat.dg/controlled6_pkg-iterators.ad[sb]: Likewise.
+ * gcc.c-torture/compile/20010327-1.c: Disable test for LLP64 targets.
-2012-03-29 Meador Inge <meadori@codesourcery.com>
+2014-03-17 Andreas Schwab <schwab@linux-m68k.org>
- PR c++/52672
- * g++.dg/cpp0x/constexpr-52672.C: New testcase.
+ PR testsuite/58851
+ * gfortran.dg/unlimited_polymorphic_13.f90: Properly compute
+ storage size.
-2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
+2014-03-15 Jerry DeLisle <jvdelisle@gcc.gnu>
- PR c++/52718
- * g++.dg/warn/Wzero-as-null-pointer-constant-5.C: New.
+ PR libfortran/58324
+ * gfortran.dg/list_read_12.f90: New test.
-2012-03-29 Jason Merrill <jason@redhat.com>
+2014-03-15 Janus Weil <janus@gcc.gnu.org>
- PR c++/52685
- * g++.dg/template/inherit8.C: New.
+ PR fortran/55207
+ * gfortran.dg/assumed_rank_7.f90: Explicitly deallocate variables.
+ * gfortran.dg/c_ptr_tests_16.f90: Put into subroutine.
+ * gfortran.dg/inline_sum_bounds_check_1.f90: Add
+ -Wno-aggressive-loop-optimizations and remove an unused variable.
+ * gfortran.dg/intent_optimize_1.f90: Put into subroutine.
+ * gfortran.dg/pointer_init_9.f90: New.
+ * gfortran.dg/volatile4.f90: Put into subroutine.
+ * gfortran.dg/volatile6.f90: Ditto.
-2012-03-29 Jakub Jelinek <jakub@redhat.com>
+2014-03-14 Mikael Morin <mikael@gcc.gnu.org>
- PR c++/52759
- * g++.dg/ext/weak4.C: New test.
+ PR fortran/60392
+ * gfortran.dg/transpose_4.f90: New test.
-2012-03-29 Jason Merrill <jason@redhat.com>
+2014-03-14 Vladimir Makarov <vmakarov@redhat.com>
- PR c++/52743
- * g++.dg/cpp0x/initlist-array3.C: New.
+ PR rtl-optimization/60508
+ * gcc.target/i386/pr60508.c: New.
-2012-03-28 Jason Merrill <jason@redhat.com>
+2014-03-14 Richard Biener <rguenther@suse.de>
- PR c++/52746
- * g++.dg/overload/virtual2.C: New.
+ PR middle-end/60518
+ * g++.dg/pr60518.C: New testcase.
-2012-03-28 Martin Jambor <mjambor@suse.cz>
+2014-03-14 Martin Jambor <mjambor@suse.cz>
- Backported from mainline
- 2012-03-27 Martin Jambor <mjambor@suse.cz>
+ PR lto/60461
+ * gcc.dg/lto/pr60461_0.c: New test.
- PR middle-end/52693
- * gcc.dg/torture/pr52693.c: New test.
+2014-03-14 Cesar Philippidis <cesar@codesourcery.com>
-2012-03-28 Jakub Jelinek <jakub@redhat.com>
+ * lib/gcc-dg.exp (cleanup-saved-temps): Handle LTO temporaries.
+ * lib/lto.exp (lto-execute): Cleanup LTO temporaries.
+ * gcc.dg/lto/save-temps_0.c: New testcase.
- PR middle-end/52691
- * gcc.dg/pr52691.c: New test.
+2014-03-13 Jakub Jelinek <jakub@redhat.com>
- PR middle-end/52750
- * gcc.c-torture/compile/pr52750.c: New test.
+ PR middle-end/36282
+ * c-c++-common/pr36282-1.c: New test.
+ * c-c++-common/pr36282-2.c: New test.
+ * c-c++-common/pr36282-3.c: New test.
+ * c-c++-common/pr36282-4.c: New test.
-2012-03-28 Georg-Johann Lay <avr@gjlay.de>
+2014-03-13 Richard Henderson <rth@redhat.com>
- Backport from 2012-03-28 mainline r185910.
+ PR debug/60438
+ * g++.dg/torture/pr60438-1.C, g++.dg/torture/pr60438-2.C: New.
- PR target/52692
- * gcc.target/avr/torture/builtins-2.c: New test.
+2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
-2012-03-28 Jakub Jelinek <jakub@redhat.com>
+ PR c++/60383
+ * g++.dg/template/crash118.C: New.
+ * g++.dg/template/crash95.C: Adjust.
- PR target/52736
- * gcc.target/i386/pr52736.c: New test.
+2014-03-13 Vladimir Makarov <vmakarov@redhat.com>
-2012-03-27 Richard Guenther <rguenther@suse.de>
+ PR rtl-optimization/57189
+ * gcc.target/i386/pr57189.c: New.
- PR middle-end/52720
- * gcc.dg/torture/pr52720.c: New testcase.
+2014-03-13 Paolo Carlini <paolo.carlini@oracle.com>
-2012-03-26 Georg-Johann Lay <avr@gjlay.de>
+ PR c++/60254
+ * g++.dg/cpp0x/static_assert10.C: New.
+ * g++.dg/cpp0x/static_assert11.C: Likewise.
+ * g++.dg/cpp0x/static_assert3.C: Adjust.
- Backport from 2012-03-26 mainline r185793.
+2014-03-13 Richard Biener <rguenther@suse.de>
- * gcc.target/avr/torture/avr-torture.exp (AVR_TORTURE_OPTIONS):
- Add "-Os -flto" to list.
+ * lib/lto.exp (lto-execute): Fix error catching for dg-final.
-2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
+2014-03-12 Michael Meissner <meissner@linux.vnet.ibm.com>
- * gnat.dg/concat2.ad[sb]: New test.
+ * gcc.target/powerpc/p8vector-int128-1.c: New test to test ISA
+ 2.07 128-bit arithmetic.
+ * gcc.target/powerpc/p8vector-int128-2.c: Likewise.
-2012-03-24 Steven Bosscher <steven@gcc.gnu.org>
+ * gcc.target/powerpc/timode_off.c: Restrict cpu type to power5,
+ due to when TImode is allowed in VSX registers, the allowable
+ address modes for TImode is just a single indirect address in
+ order for the value to be loaded and store in either GPR or VSX
+ registers. This affects the generated code, and it would cause
+ this test to fail, when such an option is used.
- PR middle-end/52640
- * gcc.c-torture/compile/limits-externdecl.c: New test.
+2014-03-12 Marcus Shawcroft <marcus.shawcroft@arm.com>
-2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
+ * lib/profopt.exp (profopt-execute): Use $testcase in unsupported.
- PR c++/52487
- * g++.dg/cpp0x/lambda/lambda-ice7.C: New.
+2014-03-12 Jakub Jelinek <jakub@redhat.com>
-2012-03-22 Tobias Burnus <burnus@net-b.de>
+ * gcc.dg/tree-ssa/ssa-ifcombine-12.c: New test.
+ * gcc.dg/tree-ssa/ssa-ifcombine-13.c: New test.
+ * gcc.dg/tree-ssa/phi-opt-2.c: Pass -mbranch-cost=1 if possible,
+ only test for exactly one if if -mbranch-cost=1 has been passed.
- PR fortran/52452
- * gfortran.dg/intrinsic_8.f90: New.
+2014-03-12 Christian Bruel <christian.bruel@st.com>
-2012-03-22 Jakub Jelinek <jakub@redhat.com>
+ PR target/60264
+ * gcc.target/arm/pr60264.c
- PR c++/52671
- * g++.dg/ext/attrib44.C: New test.
+2014-03-12 Thomas Preud'homme <thomas.preudhomme@arm.com>
-2012-03-22 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/60454
+ * gcc.c-torture/execute/pr60454.c: New test.
- * g++.dg/torture/pr52582.C: New.
+2014-03-12 Jakub Jelinek <jakub@redhat.com>
+ Marc Glisse <marc.glisse@inria.fr>
-2012-03-22 Georg-Johann Lay <avr@gjlay.de>
+ PR tree-optimization/60502
+ * gcc.c-torture/compile/pr60502.c: New test.
- Backport from 2012-03-20 mainline r185583.
+2014-03-12 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/avr/progmem.h (pgm_read_char): Define depending on
- __AVR_HAVE_LPMX__
+ PR middle-end/60482
+ * gcc.dg/vect/pr60482.c: New test.
- Backport from 2012-03-20 mainline r185570.
+2014-03-11 Paolo Carlini <paolo.carlini@oracle.com>
- PR target/49868
- * gcc.target/avr/torture/addr-space-2.h: New file.
- * gcc.target/avr/torture/addr-space-2-g.h: New test.
- * gcc.target/avr/torture/addr-space-2-0.h: New test.
- * gcc.target/avr/torture/addr-space-2-1.h: New test.
- * gcc.target/avr/torture/addr-space-2-x.h: New test.
+ PR c++/60389
+ * g++.dg/cpp0x/inh-ctor19.C: New.
- Backport from 2012-03-12 mainline r185255.
+2014-03-11 Richard Biener <rguenther@suse.de>
- PR target/49868
- * gcc.target/avr/torture/addr-space-1.h: New file.
- * gcc.target/avr/torture/addr-space-g.h: New test.
- * gcc.target/avr/torture/addr-space-0.h: New test.
- * gcc.target/avr/torture/addr-space-1.h: New test.
- * gcc.target/avr/torture/addr-space-x.h: New test.
+ PR tree-optimization/60429
+ PR tree-optimization/60485
+ * gcc.dg/pr60485-1.c: New testcase.
+ * gcc.dg/pr60485-2.c: Likewise.
-2012-03-22 Jakub Jelinek <jakub@redhat.com>
+2014-03-10 Jakub Jelinek <jakub@redhat.com>
- Backported from mainline
- 2012-03-14 Jakub Jelinek <jakub@redhat.com>
+ PR ipa/60457
+ * g++.dg/ipa/pr60457.C: New test.
- PR c++/52521
- * g++.dg/cpp0x/udlit-args2.C: New test.
+2014-03-10 Richard Biener <rguenther@suse.de>
- 2012-03-13 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/60474
+ * g++.dg/torture/pr60474.C: New testcase.
- PR c/52577
- * gcc.dg/Wunused-var-3.c: New test.
+2014-03-09 Andreas Schwab <schwab@linux-m68k.org>
-2012-03-22 Release Manager
+ * g++.dg/cpp0x/alias-decl-debug-0.C: Move dg-skip after dg-do.
- * GCC 4.7.0 released.
+2014-03-08 Paulo Matos <paulo@matos-sorge.com>
-2012-03-20 Jason Merrill <jason@redhat.com>
+ * gcc.dg/lto/pr55113_0.c: New testcase.
- * g++.dg/cpp0x/auto32.C: New.
+2014-03-08 Adam Butcher <adam@jessamine.co.uk>
-2012-03-15 Jakub Jelinek <jakub@redhat.com>
- Andrew Pinski <apinski@cavium.com>
+ PR c++/60033
+ * g++.dg/cpp1y/pr60033.C: New testcase.
- PR middle-end/52592
- * gcc.dg/pr52592.c: New test.
+ PR c++/60393
+ * g++.dg/cpp1y/pr60393.C: New testcase.
-2012-03-14 Jakub Jelinek <jakub@redhat.com>
+2014-03-08 Dominique d'Humieres <dominiq@lps.ens.fr>
- PR c++/52582
- * g++.dg/opt/pr52582.C: New test.
+ PR libfortran/60128
+ * gfortran.dg/fmt_en.f90: New test.
-2012-03-12 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-03-07 Jason Merrill <jason@redhat.com>
- PR target/52450
- * gcc.dg/torture/pr52402.c: Skip execution on 32-bit hppa*-*-hpux*.
+ * lib/g++-dg.exp (g++-dg-runtest): Run tests in C++1y mode, too.
+ * lib/target-supports.exp (check_effective_target_c++11): Now
+ means C++11 and up.
+ (check_effective_target_c++11_only): New.
+ (check_effective_target_c++11_down): New.
+ (check_effective_target_c++1y): New.
+ (check_effective_target_c++1y_only): New.
+ (check_effective_target_c++98_only): Rename from
+ check_effective_target_c++98.
+ * g++.dg/*: Use { target c++11 } instead of -std=c++11.
- * gcc.dg/torture/pr52407.c: Add -fno-common option on hppa*-*-hpux*.
+2014-03-07 Paolo Carlini <paolo.carlini@oracle.com>
-2012-03-10 Tobias Burnus <burnus@net-b.de>
+ PR c++/58609
+ * g++.dg/cpp0x/constexpr-ice12.C: New.
- PR fortran/52469
- * gfortran.dg/proc_ptr_34.f90: New.
+2014-03-07 Thomas Schwinge <thomas@codesourcery.com>
-2012-03-07 Jason Merrill <jason@redhat.com>
+ * c-c++-common/gomp/map-1.c: Extend.
- PR c++/52521
- * g++.dg/cpp0x/udlit-mangle.C: New.
+2014-03-06 Paul Thomas <pault@gcc.gnu.org>
+ Janus Weil <janus@gcc.gnu.org>
-2012-03-04 Georg-Johann Lay <avr@gjlay.de>
+ PR fortran/51976
+ * gfortran.dg/deferred_type_component_1.f90 : New test.
+ * gfortran.dg/deferred_type_component_2.f90 : New test.
- Backport from mainline r184894.
- * gcc.dg/torture/pr52402.c: Add dg-require-effective-target
- int32plus.
+2014-03-06 Marek Polacek <polacek@redhat.com>
-2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
+ PR c/60197
+ * c-c++-common/cilk-plus/CK/pr60197.c: New test.
+ * c-c++-common/cilk-plus/CK/pr60197-2.c: New test.
- Backport from mainline
- 2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
+2014-03-06 Jakub Jelinek <jakub@redhat.com>
- * gcc.target/powerpc/pr52457.c: New test.
+ PR target/58595
+ * gcc.dg/tls/pr58595.c: New test.
-2012-03-01 Kai Tietz <ktietz@redhat.com>
+2014-03-06 Richard Biener <rguenther@suse.de>
- * gcc.dg/torture/pr47917.c: Make test using POSIX-printf
- routines on mingw targets.
- * gcc.dg/vect/pr46126.c (uintptr_t): Add support for
- LLP64 target.
+ PR middle-end/60445
+ PR lto/60424
+ PR lto/60427
+ Revert
+ 2014-03-04 Paulo Matos <paulo@matos-sorge.com>
-2012-03-01 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/lto/pr55113_0.c: New testcase.
- PR tree-optimization/52445
- * gcc.dg/pr52445.c: New test.
+2014-03-05 Jakub Jelinek <jakub@redhat.com>
-2012-02-29 Jakub Jelinek <jakub@redhat.com>
+ PR testsuite/59308
+ * gcc.dg/pr46309.c: Don't compile on logical_op_short_circuit targets
+ other than mips/avr. Use -mbranch-cost=2 even for i?86/x86_64.
+ * gcc.dg/tree-ssa/reassoc-32.c: Use -mbranch-cost=2 even for
+ s390*/i?86/x86_64.
+ * gcc.dg/tree-ssa/reassoc-33.c: Likewise.
+ * gcc.dg/tree-ssa/reassoc-34.c: Likewise.
+ * gcc.dg/tree-ssa/reassoc-35.c: Likewise.
+ * gcc.dg/tree-ssa/reassoc-36.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Don't compile on
+ logical_op_short_circuit targets other than avr. Use -mbranch-cost=2
+ even for mips*/s390*/i?86/x86_64.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise.
- PR target/52437
- * gcc.c-torture/compile/pr52437.c: New test.
-
- PR middle-end/52419
- * gcc.dg/torture/pr52419.c: New test.
-
- PR tree-optimization/52429
- * gcc.dg/torture/pr52429.c: New test.
- * g++.dg/opt/pr52429.C: New test.
-
-2012-02-29 Richard Guenther <rguenther@suse.de>
-
- PR testsuite/52297
- * gcc.dg/lto/trans-mem-1_0.c: Remove.
- * gcc.dg/lto/trans-mem-1_1.c: Likewise.
- * gcc.dg/lto/trans-mem-2_0.c: Likewise.
- * gcc.dg/lto/trans-mem-2_1.c: Likewise.
- * gcc.dg/lto/trans-mem-4_0.c: Likewise.
- * gcc.dg/lto/trans-mem-4_1.c: Likewise.
-
-2012-02-29 Jakub Jelinek <jakub@redhat.com>
-
- * gcc.dg/torture/pr52402.c: Add -w -Wno-psabi to dg-options.
-
-2012-02-29 Paul Thomas <pault@gcc.gnu.org>
-
- PR fortran/52386
- * gfortran.dg/realloc_on_assign_13.f90 : New test.
-
-2012-02-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
-
- PR target/51534
- * gcc.target/arm/neon/pr51534.c: New testcase.
-
-2012-02-28 Richard Guenther <rguenther@suse.de>
-
- PR target/52407
- * gcc.dg/torture/pr52407.c: New testcase.
-
-2012-02-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
-
- * gcc.target/arm/vfp1.c (dg_do run): Run on all eabi variants.
- * gcc.target/arm/vfp2.c: Likewise.
- * gcc.target/arm/vfp3.c: Likewise.
- * gcc.target/arm/vfp4.c: Likewise.
- * gcc.target/arm/vfp5.c: Likewise.
- * gcc.target/arm/vfp6.c: Likewise.
- * gcc.target/arm/vfp7.c: Likewise.
- * gcc.target/arm/vfp8.c: Likewise.
- * gcc.target/arm/vfp9.c: Likewise.
- * gcc.target/arm/vfp10.c: Likewise.
- * gcc.target/arm/vfp11.c: Likewise.
- * gcc.target/arm/vfp12.c: Likewise.
- * gcc.target/arm/vfp13.c: Likewise.
- * gcc.target/arm/vfp14.c: Likewise.
- * gcc.target/arm/vfp15.c: Likewise.
- * gcc.target/arm/vfp16.c: Likewise.
- * gcc.target/arm/vfp17.c: Likewise.
- * gcc.target/arm/neon-constants.h: New file.
- * gcc.target/arm/neon-vect1.c: New test.
- * gcc.target/arm/neon-vect2.c: New test.
- * gcc.target/arm/neon-vect3.c: New test.
- * gcc.target/arm/neon-vect4.c: New test.
- * gcc.target/arm/neon-vect5.c: New test.
- * gcc.target/arm/neon-vect6.c: New test.
- * gcc.target/arm/neon-vect7.c: New test.
- * gcc.target/arm/neon-vect8.c: New test.
-
-2012-02-28 Richard Guenther <rguenther@suse.de>
-
- PR tree-optimization/52402
- * gcc.dg/torture/pr52402.c: New testcase.
-
-2012-02-28 Richard Guenther <rguenther@suse.de>
-
- PR lto/52400
- * g++.dg/lto/pr52400_0.C: New testcase.
-
-2012-02-28 Georg-Johann Lay <avr@gjlay.de>
-
- * gcc.target/avr/torture/builtins-1.c: New test.
- * gcc.target/avr/torture/builtins-error.c: New test.
-
-2012-02-28 Kai Tietz <ktietz@redhat.com>
-
- * gcc.target/i386/pr46939.c (long): Fix LP64 vs LLP64
- issue.
- * gcc.target/i386/pr45352-2.c: Likewise.
- * gcc.target/i386/bitfield3.c: Add -mno-ms-bitfields for
- mingw targets.
- * gcc.target/i386/xop-vshift-1.c(random): Use on mingw
- targets instead rand.
- * gcc.target/i386/sse4_1-blendps-2.c: Likewise.
- * gcc.target/i386/sse2-mul-1.c: Likewise.
- * gcc.target/i386/sse4_1-blendps.c: Likewise.
- * gcc.target/i386/pad-6b.c: Adjust test for x64 mingw
- target.
- * gcc.target/i386/pad-1.c: Likewise.
- * gcc.target/i386/pad-9.c: Likewise.
- * gcc.target/i386/pad-2.c: Likewise.
- * gcc.target/i386/pad-5b.c: Likewise.
- * gcc.target/i386/pad-8.c: Likewise.
- * gcc.target/i386/pr46470.c: Skip for x64 mingw target.
- * gcc.target/i386/pr44130.c: Likewise.
- * gcc.target/i386/align-main-1.c: Likewise.
- * gcc.target/i386/align-main-2.c: Likewise.
- * gcc.target/i386/sw-1.c: Likewise.
- * gcc.target/i386/avx-vzeroupper-5.c: Add -mabi=sysv
- on x64 mingw target.
- * gcc.target/i386/avx-vzeroupper-4.c: Likewise.
- * gcc.target/i386/pr46295.c: Likewise.
- * gcc.target/i386/amd64-abi-1.c: Likewise.
- * gcc.target/i386/amd64-abi-2.c: Likewise.
- * gcc.target/i386/pr39082-1.c: Likewise.
- * gcc.target/i386/pr39162.c: Likewise.
- * gcc.target/i386/pr22152.c: Likewise.
- * gcc.target/i386/wrgsbase-2.c: Adjust dg-final rule.
- * gcc.target/i386/wrfsbase-2.c: Likewise.
- * gcc.target/i386/local.c: Likewise
- * gcc.target/i386/wrgsbase-1.c: Likewise.
- * gcc.target/i386/wrfsbase-1.c: Likewise.
- * gcc.target/i386/pr39315-3.c: Likewise.
- * gcc.target/i386/pr35767-4.c: Likewise.
- * gcc.target/i386/pr45336-3.c (pextrd): Don't check for
- x64 mingw target.
- * gcc.target/i386/pr45336-2.c: Likewise.
- * gcc.target/i386/pr45336-1.c: Likewise.
- * gcc.target/i386/pr45336-4.c: Likewise.
-
-2012-02-27 Tristan Gingold <gingold@adacore.com>
-
- * gnat.dg/array20.ad[sb]: New test.
-
-2012-02-27 Jakub Jelinek <jakub@redhat.com>
-
- PR target/52375
- * gcc.target/arm/pr52375.c: New test.
- * gcc.c-torture/compile/pr52375.c: New test.
-
-2012-02-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
-
- * gfortran.dg/typebound_operator_9.f03: Skip on SPU.
- * gcc.dg/torture/builtin-complex-1.c: Skip "float" tests on SPU.
-
-2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
-
- * gnat.dg/aggr19.adb: New test.
- * gnat.dg/aggr19_pkg.ad[sb]: New helper.
-
-2012-02-26 Oleg Endo <olegendo@gcc.gnu.org>
-
- PR target/49263
- * gcc.target/sh/pr49263.c: New.
-
-2012-02-24 Andrew MacLeod <amacleod@redhat.com>
-
- * gcc.dg/simulate-thread/simulate-thread.gdb: Use return value from
- simulate_thread_wrapper_other_threads
- * gcc.dg/simulate-thread/atomic-load-int128.c (simulate_thread_main):
- Move initialization of 'value' to main().
- (main): Initialize 'value';
- * gcc.dg/simulate-thread/speculative-store.c
- (simulate_thread_step_verify): Return 0 when successful.
- * gcc.dg/simulate-thread/simulate-thread.h (HOSTILE_THREAD_THRESHOLD):
- Reduce threshold.
- (INSN_COUNT_THRESHOLD): New. Instruction limit to terminate test.
- (simulate_thread_wrapper_other_threads): Return a success/fail value
- and issue an error if the instruction count threshold is exceeded.
-
-2012-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-
- PR target/50580
- * gcc.target/mips/interrupt_handler-2.c: Skip on mips-sgi-irix6*.
- * gcc.target/mips/interrupt_handler-3.c: Likewise.
-
-2012-02-24 Richard Guenther <rguenther@suse.de>
-
- PR middle-end/52355
- * gcc.dg/pr52355.c: New testcase.
-
-2012-02-23 Kai Tietz <ktietz@redhat.com>
-
- * gcc.dg/pack-test-5.c: Add -mno-ms-bitfields option
- for mingw-targets.
- * gcc.dg/Wpadded.c: Likewise.
- * gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield
- structure-layout.
- * gcc.dg/di-sync-multithread.c: Replace for mingw-target the use
- for sleep by Sleep and add windows.h include for this function.
- * gcc.dg/format/dfp-printf-1.c: Adjust dg-skip-if rule for mingw
- targets.
- * gcc.dg/stack-usage-1.c (SIZE): Provide proper SIZE for x64 mingw
- target.
- * gcc.dg/tls/thr-cse-1.c: Provide proper pattern for x64 mingw
- target.
- * gcc.dg/tls/opt-11.c (memset): Use __extension__ to avoid fail
- on x64 mingw target.
- * gcc.dg/bf-ms-attrib.c: Adjust expected size for ms_struct layout.
- * gcc.dg/pr50251.c: Disable test for x64 mingw target.
- * gcc.c-torture/execute/930930-1.c (long): Replace by ptr_t to avoid
- failure on LLP64 target.
+ PR lto/60404
+ * gcc.dg/lto/pr60404_0.c: New test.
+ * gcc.dg/lto/pr60404_1.c: New file.
+ * gcc.dg/lto/pr60404_2.c: New file.
-2012-02-23 Uros Bizjak <ubizjak@gmail.com>
+2014-03-04 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR c/52290
- * gcc.dg/noncompile/pr52290.c: New test.
+ * gcc.dg/vmx/extract-vsx.c: Replace "vector long" with "vector
+ long long" throughout.
+ * gcc.dg/vmx/extract-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/insert-vsx.c: Likewise.
+ * gcc.dg/vmx/insert-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/ld-vsx.c: Likewise.
+ * gcc.dg/vmx/ld-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/ldl-vsx.c: Likewise.
+ * gcc.dg/vmx/ldl-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/merge-vsx.c: Likewise.
+ * gcc.dg/vmx/merge-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/st-vsx.c: Likewise.
+ * gcc.dg/vmx/st-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/stl-vsx.c: Likewise.
+ * gcc.dg/vmx/stl-vsx-be-order.c: Likewise.
-2012-02-23 Jakub Jelinek <jakub@redhat.com>
+2014-03-04 Paulo Matos <paulo@matos-sorge.com>
- PR tree-optimization/52019
- * gcc.dg/tree-ssa/ipa-split-6.c: New test.
+ * gcc.dg/lto/pr55113_0.c: New testcase.
-2012-02-22 Kai Tietz <ktietz@redhat.com>
+2014-03-04 Paolo Carlini <paolo.carlini@oracle.com>
- * g++.dg/opt/devirt2.C: Add rule for *-*-mingw* target.
- * g++.dg/opt/pr48549.C (long): Replace by long by __PTRDIFF_TYPE__
- derived pdiff_t type.
- * g++.dg/torture/pr49720.C: Likewise
+ PR c++/60376
+ * g++.dg/cpp1y/pr60376.C: New.
-2012-02-22 Uros Bizjak <ubizjak@gmail.com>
+2014-03-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR target/52330
- * gcc.target/i386/pr52330.c: New test.
+ * g++.dg/abi/anon2.C: Don't scan assembler for c++98.
-2012-02-22 Tobias Burnus <burnus@net-b.de>
+2014-03-04 Richard Biener <rguenther@suse.de>
- PR fortran/52335
- * gfortran.dg/io_constraints_10.f90: New.
+ PR tree-optimization/60382
+ * gcc.dg/vect/pr60382.c: New testcase.
-2012-02-22 Ulrich Weigand <ulrich.weigand@linaro.org>
+2014-03-03 Jerry DeLisle <jvdelisle@gcc.gnu>
- * lib/target-supports.exp (check_effective_target_vect_condition):
- Return true for NEON.
+ PR libfortran/60148
+ * gfortran.dg/namelist_84.f90: New test.
-2012-02-21 Kai Tietz <ktietz@redhat.com>
+2014-03-03 Kirill Yukhin <kirill.yukhin@intel.com>
- * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield as extension.
+ * gcc.target/i386/avx512er-vexp2ps-2.c: Decrease exponent
+ argument to avoid inf values.
+ * gcc.target/i386/avx512f-vdivps-2.c: Compare results with
+ UNION_FP_CHECK machinery.
-2012-02-21 Richard Guenther <rguenther@suse.de>
+2014-03-03 Renlin Li <Renlin.Li@arm.com>
- PR tree-optimization/52324
- * gcc.dg/tree-ssa/ssa-lim-10.c: New testcase.
+ * gcc.target/aarch64/aapcs64/validate_memory.h: Move f32in64 and
+ i32in128 cases outside special big-endian processing block.
-2012-02-21 Georg-Johann Lay <avr@gjlay.de>
+2014-03-03 Jakub Jelinek <jakub@redhat.com>
- PR middle-end/51782
- * gcc.target/avr/torture/pr51782-1.c: New test.
+ PR preprocessor/60400
+ * c-c++-common/cpp/pr60400.c: New test.
+ * c-c++-common/cpp/pr60400-1.h: New file.
+ * c-c++-common/cpp/pr60400-2.h: New file.
-2012-02-21 Jakub Jelinek <jakub@redhat.com>
+ PR objc++/60398
+ * obj-c++.dg/invalid-method-2.mm: Adjust dg-error regexps.
- PR tree-optimization/52318
- * gcc.dg/pr52318.c: New test.
+ * c-c++-common/cilk-plus/PS/vectorlength-2.c: New test.
+ * c-c++-common/cilk-plus/PS/vectorlength-3.c: New test.
-2012-02-20 Kai Tietz <ktietz@redhat.com>
+2014-03-02 Jan Hubicka <hubicka@ucw.cz>
- * gcc.dg/bf-ms-layout-3.c: New testcase.
+ PR ipa/60150
+ * g++.dg/lto/pr60150.H: New testcase.
+ * g++.dg/lto/pr60150_0.C: New testcase.
+ * g++.dg/lto/pr60150_1.C: New testcase.
-2012-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
+2014-03-02 Jan Hubicka <hubicka@ucw.cz>
- PR testsuite/52229
- PR fortran/32380
- * gfortran.dg/vect/pr32380.f: XFAIL on PowerPC and ia-64.
+ PR ipa/60306
+ * testsuite/g++.dg/ipa/devirt-29.C: New testcase
-2012-02-20 Richard Guenther <rguenther@suse.de>
+2014-03-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
- PR tree-optimization/52298
- * gcc.dg/torture/pr52298.c: New testcase.
- * gcc.dg/vect/pr52298.c: Likewise.
+ PR fortran/60236
+ * gfortran.dg/vect/pr32380.f: Fix expected test results.
-2012-02-20 Georg-Johann Lay <avr@gjlay.de>
+2014-03-01 Edward Smith-Rowland <3dw4rd@verizon.net>
- * gcc.dg/pr52132.c: Fix FAIL on 16-bit int platforms.
- * gcc.c-torture/execute/pr52286.c: Ditto.
+ PR c++/50025
+ * g++.dg/cpp0x/pr50025.C: New.
-2012-02-20 Jakub Jelinek <jakub@redhat.com>
+2014-03-01 Adam Butcher <adam@jessamine.co.uk>
- PR tree-optimization/52286
- * gcc.c-torture/execute/pr52286.c: New test.
+ PR c++/60377
+ * g++.dg/cpp1y/pr60377.C: New testcase.
-2012-02-18 Tobias Burnus <burnus@net-b.de>
+2014-03-01 Mikael Morin <mikael@gcc.gnu.org>
- PR fortran/52295
- * gfortran.dg/interface_35.f90: Use -std=f2003.
- * gfortran.dg/proc_ptr_comp_20.f90: Remove dg-warning.
- * gfortran.dg/interface_assignment_4.f90: Ditto.
- * gfortran.dg/bessel_1.f90: Ditto.
- * gfortran.dg/func_result_6.f90: Ditto.
- * gfortran.dg/hypot_1.f90: Ditto.
- * gfortran.dg/proc_ptr_comp_21.f90: Ditto.
+ PR fortran/60341
+ * gfortran.dg/str_comp_optimize_1.f90: New test.
-2012-02-17 Tobias Burnus <burnus@net-b.de>
+2014-03-01 Oleg Endo <olegendo@gcc.gnu.org>
- PR translation/52232
- PR translation/52234
- PR translation/52245
- PR translation/52246
- PR translation/52262
- PR translation/52273
- * gfortran.dg/coarray_22.f90: Update dg-error.
- * gfortran.dg/allocate_alloc_opt_4.f90: Ditto.
+ PR target/60071
+ * gcc.c-torture/compile/pr60071.c: New.
-2012-02-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2014-02-28 Janus Weil <janus@gcc.gnu.org>
- PR target/51753
- * lib/gcc-simulate-thread.exp: Load timeout.exp.
- (simulate-thread): Use default timeout.
+ PR fortran/60359
+ * gfortran.dg/unlimited_polymorphic_16.f90: New.
-2012-02-16 Jason Merrill <jason@redhat.com>
+2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/52248
- * g++.dg/ext/timevar1.C: New.
+ PR c++/58610
+ * g++.dg/cpp0x/constexpr-ice11.C: New.
-2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
+2014-02-28 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/52126
- * g++.dg/template/using21.C: New.
- * g++.dg/template/using22.C: Likewise.
+ PR c++/60314
+ * g++.dg/cpp1y/auto-fn24.C: New.
-2012-02-16 Jason Merrill <jason@redhat.com>
+2014-02-28 Joey Ye <joey.ye@arm.com>
- PR c++/51415
- * g++.dg/cpp0x/lambda/lambda-err1.C: New.
+ PR target/PR60169
+ * gcc.target/arm/thumb1-far-jump-3.c: New case.
-2012-02-16 Jakub Jelinek <jakub@redhat.com>
+2014-02-27 Paolo Carlini <paolo.carlini@oracle.com>
- PR tree-optimization/52255
- * gcc.c-torture/compile/pr52255.c: New test.
+ PR c++/60253
+ * g++.dg/overload/ellipsis2.C: New.
- PR debug/52260
- * g++.dg/debug/dwarf2/pr52260.C: New test.
+2014-02-27 Jeff Law <law@redhat.com>
- PR middle-end/51929
- * g++.dg/ipa/pr51929.C: New test.
+ PR rtl-optimization/52714
+ * gcc.c-torture/compile/pr52714.c: New test.
-2012-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
+2014-02-27 Mikael Pettersson <mikpe@it.uu.se>
+ Jeff Law <law@redhat.com>
- PR target/52199
- * gcc.target/powerpc/pr52199.c: New file.
+ PR rtl-optimization/49847
+ * g++.dg/pr49847.C: New test.
-2012-02-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2014-02-27 Marek Polacek <polacek@redhat.com>
- PR target/52152
- * objc.dg/stabs-1.m: xfail on mips-sgi-irix6.5.
+ PR middle-end/59223
+ * c-c++-common/pr59223.c: New test.
-2012-02-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2014-02-26 Ilya Tocar <ilya.tocar@intel.com>
- * gcc.dg/pr51867.c: Don't include <math.h>.
- (sqrtf): Declare.
+ * common/config/i386/predicates.md (const1256_operand): Remove.
+ (const2356_operand): New.
+ (const_1_to_2_operand): Remove.
+ * config/i386/sse.md (avx512pf_gatherpf<mode>sf): Change hint value.
+ (*avx512pf_gatherpf<mode>sf_mask): Ditto.
+ (*avx512pf_gatherpf<mode>sf): Ditto.
+ (avx512pf_gatherpf<mode>df): Ditto.
+ (*avx512pf_gatherpf<mode>df_mask): Ditto.
+ (*avx512pf_gatherpf<mode>df): Ditto.
+ (avx512pf_scatterpf<mode>sf): Ditto.
+ (*avx512pf_scatterpf<mode>sf_mask): Ditto.
+ (*avx512pf_scatterpf<mode>sf): Ditto.
+ (avx512pf_scatterpf<mode>df): Ditto.
+ (*avx512pf_scatterpf<mode>df_mask): Ditto.
+ (*avx512pf_scatterpf<mode>df): Ditto.
+ * common/config/i386/xmmintrin.h (_mm_hint): Add _MM_HINT_ET0.
-2012-02-15 Georg-Johann Lay <avr@gjlay.de>
+2014-02-26 Ilya Tocar <ilya.tocar@intel.com>
- * gcc.dg/lto/20091013-1_1.c: xfail for avr.
- * gcc.dg/lto/20091013-1_2.c: xfail for avr.
+ * gcc.target/i386/avx512cd-vptestnmd-1.c: Change into ...
+ * gcc.target/i386/avx512f-vptestnmd-1.c: This.
+ * gcc.target/i386/avx512cd-vptestnmq-1.c: Change into ...
+ * gcc.target/i386/avx512f-vptestnmq-1.c: This.
+ * gcc.target/i386/avx512cd-vptestnmd-2.c: Change into ...
+ * gcc.target/i386/avx512f-vptestnmd-2.c: This.
+ * gcc.target/i386/avx512cd-vptestnmq-2.c: Change into ...
+ * gcc.target/i386/avx512f-vptestnmq-2.c: This.
-2012-02-15 Tobias Grosser <grosser@fim.uni-passau.de>
+2014-02-26 Bin Cheng <bin.cheng@arm.com>
- PR tree-optimization/50561
- * gcc.dg/graphite/pr50561.c: New testcase.
+ PR target/60280
+ * gnat.dg/renaming5.adb: Change to two expected gotos.
+ * gcc.dg/tree-ssa/pr21559.c: Change back to three expected
+ jump threads.
+ * gcc.dg/tree-prof/update-loopch.c: Check two "Invalid sum"
+ messages for removed basic block.
+ * gcc.dg/tree-ssa/ivopt_1.c: Fix unreliable scanning string.
+ * gcc.dg/tree-ssa/ivopt_2.c: Ditto.
+ * gcc.dg/tree-ssa/ivopt_3.c: Ditto.
+ * gcc.dg/tree-ssa/ivopt_4.c: Ditto.
-2012-02-15 Georg-Johann Lay <avr@gjlay.de>
+2014-02-25 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- * gcc.target/avr/torture/builtin_insert_bits-1.c: New test.
- * gcc.target/avr/torture/builtin_insert_bits-2.c: New test.
+ * gcc.dg/vmx/ld-vsx.c: Don't use vec_all_eq.
+ * gcc.dg/vmx/ld-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/ldl-vsx.c: Likewise.
+ * gcc.dg/vmx/ldl-vsx-be-order.c: Likewise.
+ * gcc.dg/vmx/merge-vsx.c: Likewise.
+ * gcc.dg/vmx/merge-vsx-be-order.c: Likewise.
-2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
+2014-02-25 Ilya Tocar <ilya.tocar@intel.com>
- * gnat.dg/discr35.ad[sb]: New test.
+ * gcc.target/i386/avx-1.c: Update __builtin_prefetch.
+ * gcc.target/i386/prefetchwt1-1.c: New.
+ * g++.dg/other/i386-2.C: Add new option.
+ * g++.dg/other/i386-3.C: Ditto.
+ * gcc.target/i386/sse-12.c: Ditto.
+ * gcc.target/i386/sse-13.c: Update __builtin_prefetch, add new option.
+ * gcc.target/i386/sse-22.c: Add new option.
+ * gcc.target/i386/sse-23.c: Update __builtin_prefetch, add new option.
-2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
+2014-02-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- * gnat.dg/volatile10.adb: New test.
- * gnat.dg/volatile10_pkg.ads: New helper.
+ PR libfortran/59313
+ * gfortran.dg/erf_3.F90: Skip on sparc*-*-solaris2.9*.
-2012-02-14 Jason Merrill <jason@redhat.com>
+ PR libfortran/58015
+ * gfortran.dg/round_4.f90: Skip on *-*-solaris2.9*.
- * g++.dg/ext/attrib43.C: New.
+2014-02-25 Adam Butcher <adam@jessamine.co.uk>
-2012-02-14 Hans-Peter Nilsson <hp@axis.com>
+ PR c++/60311
+ * g++.dg/cpp1y/pr60311.C: New testcase.
- * lib/target-supports.exp (check_effective_target_fgnu_tm): New proc.
- * gfortran.dg/trans-mem-skel.f90: Gate test on effective_target
- fgnu_tm.
- * gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c,
- gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto.
- * gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on
- effective_target fgnu_tm.
- * g++.dg/tm/tm.exp: Ditto for g++.dg/tm.
+ * g++.dg/cpp1y/fn-generic-member-ool.C: New testcase.
-2012-02-14 Jakub Jelinek <jakub@redhat.com>
+ PR c++/60065
+ * g++.dg/cpp1y/pr60065.C: New testcase.
- PR c++/52247
- * g++.dg/template/asmgoto1.C: New test.
+2014-02-24 Andrey Belevantsev <abel@ispras.ru>
-2012-02-14 Ian Lance Taylor <iant@google.com>
+ PR rtl-optimization/60268
+ * gcc.c-torture/compile/pr60268.c: New test.
- PR go/48501
- * go.test/go-test.exp (go-gc-tests): Disable optimizations when
- compiling generated file for 64bit and index tests.
+2014-02-23 David Holsgrove <david.holsgrove@xilinx.com>
-2012-02-14 Uros Bizjak <ubizjak@gmail.com>
+ * gcc.target/microblaze/others/mem_reload.c: New test.
- * gcc.dg/lower-subreg-1.c: Fix and simplify target selector.
+2014-02-23 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-02-14 Richard Guenther <rguenther@suse.de>
+ * gcc.dg/vmx/lde.c: New test.
+ * gcc.dg/vmx/lde-be-order.c: New test.
+ * gcc.dg/vmx/ste.c: New test.
+ * gcc.dg/vmx/ste-be-order.c: New test.
- PR tree-optimization/52244
- PR tree-optimization/51528
- * gcc.dg/torture/pr52244.c: New testcase.
+2014-02-22 Hans-Peter Nilsson <hp@axis.com>
-2012-02-14 Walter Lee <walt@tilera.com>
+ PR testsuite/60173
+ * lib/target-supports.exp
+ (check_effective_target_logical_op_short_circuit): Add cris-*-*
+ and crisv32-*-* to list.
- * g++.dg/other/PR23205.C: Disable test on tile.
- * g++.dg/other/pr23205-2.C: Disable test on tile.
- * gcc.dg/20020312-2.c: Add a condition for __tile__.
- * gcc.dg/20040813-1.c: Disable test on tile.
- * gcc.dg/lower-subreg-1.c: Disable test on tilegx.
- * gcc.misc-tests/linkage.exp: Handle tilegx.
+2014-02-21 Janus Weil <janus@gcc.gnu.org>
-2012-02-14 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/60302
+ * gfortran.dg/c_f_pointer_shape_tests_6.f90: New.
- PR tree-optimization/52210
- * gcc.dg/pr52210.c: New test.
+2014-02-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-02-14 Jason Merrill <jason@redhat.com>
+ * gcc.dg/vmx/vsums.c: Check entire result vector.
+ * gcc.dg/vmx/vsums-be-order.c: Likewise.
- PR c++/39055
- * g++.dg/overload/defarg5.C: New.
+2014-02-21 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-02-14 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/vmx/ld.c: New test.
+ * gcc.dg/vmx/ld-be-order.c: New test.
+ * gcc.dg/vmx/ld-vsx.c: New test.
+ * gcc.dg/vmx/ld-vsx-be-order.c: New test.
+ * gcc.dg/vmx/ldl.c: New test.
+ * gcc.dg/vmx/ldl-be-order.c: New test.
+ * gcc.dg/vmx/ldl-vsx.c: New test.
+ * gcc.dg/vmx/ldl-vsx-be-order.c: New test.
+ * gcc.dg/vmx/st.c: New test.
+ * gcc.dg/vmx/st-be-order.c: New test.
+ * gcc.dg/vmx/st-vsx.c: New test.
+ * gcc.dg/vmx/st-vsx-be-order.c: New test.
+ * gcc.dg/vmx/stl.c: New test.
+ * gcc.dg/vmx/stl-be-order.c: New test.
+ * gcc.dg/vmx/stl-vsx.c: New test.
+ * gcc.dg/vmx/stl-vsx-be-order.c: New test.
- PR c/52181
- * c-c++-common/pr52181.c: New test.
+2014-02-21 Uros Bizjak <ubizjak@gmail.com>
-2012-02-13 Jakub Jelinek <jakub@redhat.com>
+ * g++.dg/other/i386-2.C (dg-options): Add -mavx512pf.
+ * g++.dg/other/i386-3.C (dg-options): Ditto.
+ * gcc.target/i386/sse-12.c (dg-options): Add -msha.
+ * gcc.target/i386/sse-13.c (dg-options): Add -mavx512er, -mavx512cd,
+ -mavx512pf and -msha.
- PR c++/52215
- * g++.dg/ext/atomic-1.C: New test.
+2014-02-21 Richard Biener <rguenther@suse.de>
-2012-02-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+ PR tree-optimization/60276
+ * gcc.dg/vect/pr60276.c: New testcase.
- * gcc.c-torture/execute/pr51933.c: Modify for s390 31 bit.
+2014-02-21 Janus Weil <janus@gcc.gnu.org>
-2012-02-13 Jakub Jelinek <jakub@redhat.com>
+ PR fortran/60234
+ * gfortran.dg/finalize_23.f90: New.
- PR middle-end/52209
- * gcc.c-torture/execute/pr52209.c: New test.
+2014-02-21 Adam Butcher <adam@jessamine.co.uk>
-2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
+ PR c++/60052
+ PR c++/60053
+ * g++.dg/cpp1y/pr60052.C: New testcase.
+ * g++.dg/cpp1y/pr60053.C: New testcase.
- PR fortran/50981
- * gfortran.dg/elemental_optional_args_5.f03: New test.
+2014-02-21 Tobias Burnus <burnus@net-b.de>
-2012-02-12 Iain Sandoe <iains@gcc.gnu.org>
+ PR fortran/60286
+ * gfortran.dg/inquire_16.f90: New.
- PR testsuite/50076
- * c-c++-common/cxxbitfields-3.c: Adjust scan assembler for nonpic
- cases.
+2014-02-20 Sandra Loosemore <sandra@codesourcery.com>
-2012-02-11 Ian Lance Taylor <iant@google.com>
+ * gcc.target/nios2/biggot-1.c: New.
+ * gcc.target/nios2/biggot-2.c: New.
- PR go/51874
- * go.test/go-test.exp (go-gc-tests): Don't run nilptr test on
- SPARC Solaris. Don't run the test at all on systems where it may
- not work, rather than xfailing it.
+2014-02-20 Martin Jambor <mjambor@suse.cz>
-2012-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+ PR ipa/55260
+ * gcc.dg/ipa/pr55260.c: New test.
- PR rtl-optimization/52175
- * gcc.c-torture/compile/pr52175.c: New test.
+2014-02-20 Bin Cheng <bin.cheng@arm.com>
-2012-02-10 Jason Merrill <jason@redhat.com>
+ * gcc.dg/tree-prof/crossmodule-indircall-1.c: Return 0
+ for execution test case.
- PR c++/51910
- * g++.dg/template/repo10.C: New.
+2014-02-20 Jan Hubicka <hubicka@ucw.cz>
-2012-02-11 Jakub Jelinek <jakub@redhat.com>
+ PR ipa/58555
+ * g++.dg/torture/pr58555.C: New testcase.
- PR debug/52132
- * gcc.dg/pr52132.c: New test.
+2014-02-20 Ilya Tocar <ilya.tocar@intel.com>
-2012-02-10 Eric Botcazou <ebotcazou@adacore.com>
+ PR target/60204
+ * gcc.target/x86_64/abi/avx512f/test_passing_structs.c: Update to
+ reflect abi fix.
+ * gcc.target/x86_64/abi/avx512f/test_passing_unions.c: Ditto.
- * gnat.dg/specs/aggr4.ads: New test.
- * gnat.dg/specs/aggr4_pkg.ads: New helper.
+2014-02-20 Ilya Tocar <ilya.tocar@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
-2012-02-10 H.J. Lu <hongjiu.lu@intel.com>
+ * gcc.target/i386/avx512er-vrcp28sd-2.c: Distinguish src1 and src2.
+ * gcc.target/i386/avx512er-vrcp28ss-2.c: Call correct intrinsic.
+ * gcc.target/i386/avx512er-vrsqrt28sd-2.c: Distinguish src1 and src2.
+ * gcc.target/i386/avx512er-vrsqrt28ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-2.c: Fix reference calculation.
+ * gcc.target/i386/avx512f-vrcp14ss-2.c: Fix reference calculation.
- PR target/52146
- * gcc.target/i386/pr52146.c: New.
+2014-02-19 Jakub Jelinek <jakub@redhat.com>
-2012-02-10 Jakub Jelinek <jakub@redhat.com>
+ PR c/37743
+ * g++.dg/ext/builtin-bswap1.C: New test.
+ * c-c++-common/pr37743.c: New test.
- PR middle-end/52177
- * c-c++-common/pr52177.c: New test.
+2014-02-19 Prathamesh Kulkarni <bilbotheelffriend@gmail.com>
-2012-02-10 Jan Hubicka <jh@suse.cz>
+ * gcc.dg/decl-10.c: New test.
- PR middle-end/48600
- * g++.dg/torture/pr48600.C: New testcase.
+2014-02-19 Jakub Jelinek <jakub@redhat.com>
-2012-02-09 Peter Bergner <bergner@vnet.ibm.com>
+ PR c++/60267
+ * g++.dg/ext/ivdep-1.C: New test.
- PR middle-end/52140
- * gcc.dg/dfp/pr52140.c: New test.
+ PR c++/60267
+ * gcc.dg/pr60267.c: New test.
-2012-02-09 Jakub Jelinek <jakub@redhat.com>
+2014-02-19 Uros Bizjak <ubizjak@gmail.com>
- PR fortran/32380
- * gfortran.dg/vect/pr32380.f: Use dg-additional-options instead
- of dg-options.
+ PR target/59794
+ * gcc.target/i386/pr39162.c: Add dg-prune-output.
+ (dg-options): Remove -Wno-psabi.
+ * gcc.target/i386/pr59794-2.c: Ditto.
+ * gcc.target/i386/pr60205-1.c: Ditto.
+ * gcc.target/i386/sse-5.c: Ditto.
-2012-02-09 Bin Cheng <bin.cheng@arm.com>
+2014-02-18 Nick Clifton <nickc@redhat.com>
- PR middle-end/51867
- * testsuite/c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
- * testsuite/gcc.dg/pr51867.c: New test.
+ * gcc.dg/graphite/pr46966.c: Only run on 32-bit+ targets.
+ * gcc.dg/pr23623.c: Likewise.
+ * gcc.dg/pr48784-1.c: Likewise.
+ * gcc.dg/pr48784-2.c: Likewise.
+ * gcc.dg/pr56997-2.c: Likewise.
+ * gcc.dg/sms-6.c: Likewise.
+ * gcc.dg/torture/pr60183.c: Likewise.
+ * gcc.dg/torture/vec-cvt-1.c: Likewise.
+ * gcc.c-torture/execute/20061220-1.x: New.
+ * gcc.c-torture/execute/pr43220.x: New.
+ * gcc.c-torture/execute/pr51581-1.x: New.
+ * gcc.c-torture/execute/pr51581-2.x: New.
+ * gcc.c-torture/execute/pr58570.x: New.
+ * gcc.c-torture/unsorted/DFcmp.x: New.
+ * gcc.c-torture/unsorted/SFset.x: New.
-2012-02-09 Ian Lance Taylor <iant@google.com>
+2014-02-19 Eric Botcazou <ebotcazou@adacore.com>
- * go.test/go-test.exp (go-gc-tests): Don't run stack.go on systems
- which don't support -fsplit-stack. Turn off optimization when
- compiling select5-out.go.
+ * gnat.dg/opt31.adb: New test.
-2012-02-08 Ian Lance Taylor <iant@google.com>
+2014-02-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- * go.test/go-test.exp (go-gc-tests): Don't run chan/select2.go on
- systems which don't support -fsplit-stack.
+ * gcc.dg/torture/pr60092.c: xfail execution on *-*-solaris2.11* at -O0.
-2012-02-08 Andrew MacLeod <amacleod@redhat.com>
+2014-02-19 Janus Weil <janus@gcc.gnu.org>
- * gcc.dg/simulate-thread/simulate-thread.exp: Use -O0, -O2, and -O3.
- * gcc.dg/simulate-thread/simulate-thread.gdb: Don't display every
- machine instuction in the log.
+ PR fortran/60232
+ * gfortran.dg/typebound_proc_33.f90: New.
-2012-02-08 Jack Howarth <howarth@bromo.med.uc.edu>
+2014-02-19 Marek Polacek <polacek@redhat.com>
- * lib/gcc-simulate-thread.exp (simulate-thread): Increase timeout
- to 20 seconds.
+ PR c/60195
+ * gcc.dg/pr60195.c: New test.
-2012-02-08 Magnus Granberg <zorry@gentoo.org>
+2014-02-19 Paul Pluzhnikov <ppluzhnikov@google.com>
- PR driver/48524
- * gcc.dg/pr48524.c: New test.
- * gcc.dg/pr48524.spec: New spec file for test.
+ * gcc.dg/vect/no-vfa-vect-depend-2.c (main1): Fix buffer overflow.
-2012-02-08 Thomas Koenig <tkoenig@gcc.gnu.org>
+2014-02-19 Jakub Jelinek <jakub@redhat.com>
- PR fortran/32380
- * gfortran.dg/vect/pr32380.f90: New test.
+ PR preprocessor/58844
+ * c-c++-common/cpp/pr58844-1.c: New test.
+ * c-c++-common/cpp/pr58844-2.c: New test.
-2012-02-08 Tobias Burnus <burnus@net-b.de>
+2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
- PR fortran/52151
- * gfortran.dg/realloc_on_assign_12.f90: New.
+ PR c++/60225
+ * g++.dg/cpp0x/constexpr-ice10.C: New.
-2012-02-08 Richard Guenther <rguenther@suse.de>
+2014-02-18 Paolo Carlini <paolo.carlini@oracle.com>
- PR rtl-optimization/52170
- * gcc.dg/torture/pr52170.c: New testcase.
+ PR c++/60215
+ * g++.dg/cpp0x/pr60215.C: New.
-2012-02-08 Jakub Jelinek <jakub@redhat.com>
+2014-02-18 Tobias Burnus <burnus@net-b.de>
- PR gcov-profile/52150
- * gcc.dg/tree-prof/pr52150.c: New test.
+ PR fortran/49397
+ * gfortran.dg/proc_ptr_45.f90: New.
+ * gfortran.dg/proc_ptr_46.f90: New.
- PR rtl-optimization/52139
- * gcc.dg/pr52139.c: New test.
+2014-02-18 Adam Butcher <adam@jessamine.co.uk>
-2012-02-07 Jason Merrill <jason@redhat.com>
+ PR c++/60190
+ * g++.dg/cpp1y/pr60190.C: New testcase.
- PR c++/51675
- * g++.dg/cpp0x/constexpr-union3.C: New.
+ PR c++/60064
+ * g++.dg/cpp1y/pr60064.C: New testcase.
- PR c++/52035
- * g++.dg/lto/pr52035_0.C: New.
+2014-02-18 Uros Bizjak <ubizjak@gmail.com>
-2012-02-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ PR target/60205
+ * gcc.target/i386/pr60205-1.c: New test.
+ * gcc.target/i386/pr60205-2.c: Ditto.
- * gfortran.dg/guality/pr41558.f90: Use lp64 instead of hppa*64*-*-*.
- * gcc.dg/special/weak-1.c: Likewise.
- * gcc.dg/ucnid-12.c: Likewise.
- * gcc.dg/torture/pr45678-1.c: Likewise.
- * gcc.dg/torture/pr45678-2.c: Likewise.
- * gcc.dg/vector-4.c: Likewise.
- * gcc.dg/ipa/inline-5.c: Likewise.
- * gcc.dg/ucnid-11.c: Likewise.
- * gcc.misc-tests/gcov-13.c: Likewise.
- * gcc.misc-tests/gcov-14.c: Likewise.
- * g++.dg/ext/label13.C: Likewise.
- * gcc.dg/tree-ssa/ssa-fre-31.c: Use dg-additional-options for extra
- hppa*-*-hpux* options.
- * gcc.dg/tree-ssa/ssa-fre-33.c: Likewise.
- * gcc.dg/tree-ssa/ssa-fre-34.c: Likewise.
- * gcc.dg/pr48616.c: Likewise.
- * gcc.dg/pr17957.c: Likewise.
- * gcc.dg/pr17055-1.c: Likewise.
- * gcc.dg/pr32912-1.c: Likewise.
- * gcc.dg/tm/pr51472.c: Likewise.
- * c-c++-common/fold-bitand-4.c: Likewise.
- * c-c++-common/Wunused-var-12.c: Use lp64 instead of hppa*64*-*-*.
- Use dg-additional-options for extra options.
+2014-02-18 Kai Tietz <ktietz@redhat.com>
-2012-02-07 Joern Rennecke <joern.rennecke@embecosm.com>
+ PR target/60193
+ * gcc.target/i386/nest-1.c: New testcase.
- * gcc.target/epiphany/interrupt-2.c: New test.
+2014-02-18 Eric Botcazou <ebotcazou@adacore.com>
-2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+ * gnat.dg/opt32.adb: New test.
- PR target/52155
- * gcc.target/mips/mips.exp (mips-dg-options): Handle target.
- * gcc.target/mips/loongson-shift-count-truncated-1.c: Force -mlong64
- for MIPS ELF.
+2014-02-18 Janus Weil <janus@gcc.gnu.org>
-2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+ PR fortran/60231
+ * gfortran.dg/typebound_generic_15.f90: New.
- PR target/52152
- * objc.dg/stabs-1.m: XFAIL for mips*-*-elf*.
+2014-02-17 Janus Weil <janus@gcc.gnu.org>
-2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+ PR fortran/55907
+ * gfortran.dg/init_flag_12.f90: New.
- PR middle-end/24306
- PR target/52154
- * lib/target-supports.exp (check_effective_target_mips_eabi): New.
- * gcc.target/mips/va-arg-1.c: New test.
+2014-02-17 Kirill Yukhin <kirill.yukhin@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
-2012-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
+ * gcc.target/i386/avx512f-vpermd-2.c: Fix reference calculations.
+ * gcc.target/i386/avx512f-vpermpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-var-2.c: Ditto.
- * gcc.target/powerpc/no-r11-3.c (outer_func): Fix error message
- for -mno-pointers-to-nested-functions.
+2014-02-16 Richard Sandiford <rdsandiford@googlemail.com>
-2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
+ * lib/target-supports.exp
+ (check_effective_target_logical_op_short_circuit): New procedure.
+ * gcc.dg/binop-xor1.c: XFAIL for logical_op_short_circuit.
+ * gcc.dg/tree-ssa/forwprop-28.c: Use logical_op_short_circuit
+ instead of mips*-*-*, arc*-*-*, avr*-*-* and arm_cortex_m tests.
+ * gcc.dg/tree-ssa/vrp47.c: Likewise.
+ * gcc.dg/tree-ssa/vrp87.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Likewise. Also use
+ logical_op_short_circuit for the alternative test, extending
+ it to arm_cortex_m.
- * gcc.c-torture/execute/20120207-1.c: New test.
+2014-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
-2012-02-07 Jakub Jelinek <jakub@redhat.com>
+ PR target/60203
+ * gcc.target/powerpc/pr60203.c: New testsuite.
- PR rtl-optimization/52060
- * gcc.dg/torture/pr52060.c: New test.
+2014-02-15 Mikael Morin <mikael@gcc.gnu.org>
- PR middle-end/52074
- * gcc.c-torture/compile/pr52074.c: New test.
+ PR fortran/59599
+ * gfortran.dg/ichar_3.f90: New test.
-2012-02-07 Tobias Burnus <burnus@net-b.de>
+2014-02-15 Richard Biener <rguenther@suse.de>
- PR fortran/51514
- * gfortran.dg/class_to_type_2.f90: New.
+ PR tree-optimization/60183
+ * gcc.dg/torture/pr60183.c: New testcase.
-2012-02-06 Thomas König <tkoenig@gcc.gnu.org>
+2014-02-14 Jeff Law <law@redhat.com>
- PR fortran/32373
- * gfortran.dg/vect/vect-8.f90: Use vect_double effective target.
- Remove module.
+ PR rtl-optimization/60131
+ * g++.dg/torture/pr60131.C: New test.
-2012-02-06 Jason Merrill <jason@redhat.com>
+2014-02-14 Ian Bolton <ian.bolton@arm.com>
- PR c++/52088
- * g++.dg/template/conv13.C: New.
+ * gcc.target/arm/pr59858.c: Skip if -mfloat-abi=hard specified
+ on command-line.
-2012-02-06 Richard Guenther <rguenther@suse.de>
+2014-02-14 Bernd Edlinger <bernd.edlinger@hotmail.de>
- PR tree-optimization/52115
- * gcc.c-torture/compile/pr52115.c: New testcase.
+ * c-c++-common/ubsan/overflow-negate-2.c (main): Use signed char.
-2012-02-06 Jakub Jelinek <jakub@redhat.com>
+2014-02-14 Jakub Jelinek <jakub@redhat.com>
- PR target/52129
- * gcc.c-torture/execute/pr52129.c: New test.
+ * gcc.c-torture/compile/20140213.c: New test.
-2012-02-06 Andrey Belevantsev <abel@ispras.ru>
+2014-02-13 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/pr48374.c: Actually add the test I forgot
- in the 2012-01-25 commit.
+ PR target/43546
+ * gcc.target/i386/pr43546.c: New test.
-2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
+2014-02-13 Dominik Vogt <vogt@linux.vnet.ibm.com>
- PR fortran/32373
- * gfortran.dg/vect/vect-8.f90: New test case.
+ * gcc.target/s390/hotpatch-compile-8.c: New test.
-2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
+2014-02-13 Richard Sandiford <rdsandiford@googlemail.com>
- PR fortran/48847
- * gfortran.dg/warn_unused_dummy_argument_3.f90: New test.
+ * gcc.dg/pr59605.c: Convert to a compile test. Protect MAX_COPY
+ definition with an ifndef.
+ * gcc.dg/pr59605-2.c: New test.
-2012-02-05 Paul Thomas <pault@gcc.gnu.org>
+2014-02-13 Richard Sandiford <rdsandiford@googlemail.com>
- PR fortran/52102
- * gfortran.dg/class_48.f90 : Add test of allocate class array
- component with source in subroutine test3. Remove commenting
- out in subroutine test4, since branching on unitialized variable
- is now fixed (no PR for this last.).
+ * gcc.dg/gomp/simd-clones-5.c: Update comment for new warning message.
-2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+2014-02-12 Joseph Myers <joseph@codesourcery.com>
- * gcc.dg/tree-prof/stringop-2.c (main): Add a nomips16 attribute
- on MIPS targets.
- * gfortran.dg/pr45636.f90: XFAIL for MIPS16 targets.
+ * gcc.dg/torture/float128-mul-underflow.c,
+ gcc.dg/torture/float128-truncdf-underflow.c,
+ gcc.dg/torture/float128-truncsf-underflow.c: New tests.
-2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+2014-02-12 Jakub Jelinek <jakub@redhat.com>
- PR target/52125
- * lib/target-supports.exp (check_effective_target_mips_rel): New.
- * gcc.dg/pr48774.c: Skip on MIPS REL targets.
+ PR middle-end/59737
+ * g++.dg/ipa/pr59737.C: New test.
-2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+2014-02-12 H.J. Lu <hongjiu.lu@intel.com>
- * lib/target-supports.exp (check_effective_target_mips_llsc): New.
- (check_effective_target_sync_int_long): Use it.
- (check_effective_target_sync_char_short): Likewise.
- * gcc.target/mips/atomic-memory-1.c: Restrict error check to mips_llsc.
+ * g++.dg/opt/pr52727.C: Compile with -march=i686 for ia32.
-2012-02-05 Tobias Burnus <burnus@net-b.de>
+2014-02-12 Thomas Schwinge <thomas@codesourcery.com>
- PR fortran/51972
- * gfortran.dg/class_48.f90: Add some further checks.
+ * c-c++-common/raw-string-3.c: Fix typo in dg-error invocation.
-2012-02-05 Ira Rosen <irar@il.ibm.com>
+ * gcc.dg/cilk-plus/jump-openmp.c: New file.
- PR tree-optimization/52091
- * gcc.dg/vect/pr52091.c: New test.
+2014-02-12 Richard Biener <rguenther@suse.de>
-2012-02-04 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/60092
+ * gcc.dg/torture/pr60092.c: New testcase.
+ * gcc.dg/tree-ssa/alias-31.c: Disable SRA.
- PR rtl-optimization/52113
- * gcc.target/avr/pr52113.c: New test.
+2014-02-12 Eric Botcazou <ebotcazou@adacore.com>
-2012-02-03 Jakub Jelinek <jakub@redhat.com>
+ * gcc.c-torture/execute/20140212-1.c: New test.
- PR rtl-optimization/52092
- * gcc.c-torture/compile/pr52092.c: New test.
+2014-02-12 Paolo Carlini <paolo.carlini@oracle.com>
-2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
+ PR c++/60047
+ * g++.dg/cpp0x/pr60047.C: New.
- PR fortran/41587
- * gfortran.dg/class_array_10.f03: New test.
+2014-02-12 Jakub Jelinek <jakub@redhat.com>
- PR fortran/46356
- * gfortran.dg/class_array_11.f03: New test.
+ PR c/60101
+ * c-c++-common/pr60101.c: New test.
- PR fortran/51754
- * gfortran.dg/class_array_12.f03: New test.
+2014-02-11 Jan Hubicka <hubicka@ucw.cz>
-2012-02-02 Paul Thomas <pault@gcc.gnu.org>
+ PR lto/59468
+ * g++.dg/ipa/devirt-27.C: New testcase.
+ * g++.dg/ipa/devirt-26.C: New testcase.
- PR fortran/52012
- * gfortran.dg/realloc_on_assign_11.f90: New test.
+2014-02-11 Michael Meissner <meissner@linux.vnet.ibm.com>
-2012-02-02 Tobias Burnus <burnus@net-b.de>
+ PR target/60137
+ * gcc.target/powerpc/pr60137.c: New file.
- PR fortran/52093
- * gfortran.dg/shape_7.f90: New.
+2014-02-11 Jakub Jelinek <jakub@redhat.com>
-2012-02-02 Richard Sandiford <rdsandiford@googlemail.com>
+ PR fortran/52370
+ * gfortran.dg/pr52370.f90: New test.
- * gcc.target/mips/mips-prepend-1.c: New test.
+2014-02-11 Uros Bizjak <ubizjak@gmail.com>
-2012-02-02 Jan Hubicka <jh@suse.cz>
- Tom de Vries <tom@codesourcery.com>
+ PR target/59927
+ Revert
+ 2013-12-15 Uros Bizjak <ubizjak@gmail.com>
- PR middle-end/51998
- * testsuite/gcc.dg/alias-12.c: New testcase.
- * testsuite/gcc.dg/alias-13.c: New testcase.
+ PR testsuite/58630
+ * gcc.target/i386/pr43662.c (dg-options):
+ Add -maccumulate-outgoing-args.
+ * gcc.target/i386/pr43869.c (dg-options): Ditto.
+ * gcc.target/i386/pr57003.c (dg-options): Ditto.
+ * gcc.target/i386/avx-vzeroupper-16.c (dg-options):
+ Remove -mtune=generic and add -maccumulate-outgoing-args instead.
+ * gcc.target/i386/avx-vzeroupper-17.c (dg-options): Ditto.
+ * gcc.target/i386/avx-vzeroupper-18.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-1.c (dg-options):
+ Add -maccumulate-outgoing-args.
+ * gcc.target/x86_64/abi/callabi/func-2a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-2b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/leaf-1.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/leaf-2.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/pr38891.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-1.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-2.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-3.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-4a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-4b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-5a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-5b.c (dg-options): Ditto.
+
+2014-02-11 Richard Sandiford <rdsandiford@googlemail.com>
-2012-02-02 Jakub Jelinek <jakub@redhat.com>
+ * gcc.dg/vect/pr56787.c: Mark as xfail for vect_no_align.
- PR target/52086
- * gcc.dg/pr52086.c: New test.
+2014-02-11 Jakub Jelinek <jakub@redhat.com>
- PR tree-optimization/52073
- * gcc.c-torture/compile/pr52073.c: New test.
+ PR debug/59776
+ * gcc.dg/guality/pr59776.c: New test.
-2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
+2014-02-11 Renlin Li <Renlin.Li@arm.com>
- PR fortran/51958
- * gfortran.dg/function_optimize_10.f90: New test.
+ * gcc.target/arm/fixed_float_conversion.c: Add arm_vfp3 option.
+ * lib/target-supports.exp (check_effective_target_arm_vfp3_ok): New.
+ (add_options_for_arm_vfp3): New.
-2012-02-01 Uros Bizjak <ubizjak@gmail.com>
+2014-02-11 Jeff Law <law@redhat.com>
- * go.test/go-test.exp (go-gc-tests): xfail test/nilptr.go runtime
- test on alpha*-*-*.
+ PR middle-end/54041
+ * gcc.target/m68k/pr54041.c: New test.
-2012-02-01 Tobias Burnus <burnus@net-b.de>
+2014-02-11 Jakub Jelinek <jakub@redhat.com>
- PR fortran/52024
- * gfortran.dg/typebound_operator_14.f90: New.
+ PR target/59927
+ * gcc.target/i386/pr59927.c: New test.
-2012-02-01 Tobias Burnus <burnus@net-b.de>
+2014-02-10 Richard Sandiford <rdsandiford@googlemail.com>
- PR fortran/52059
- * gfortran.dg/elemental_function_1.f90: New.
+ * gcc.dg/vect/pr57741-3.c: Require vect_int.
+ * gcc.dg/vect/pr60012.c: Likewise.
+ * gcc.dg/vect/vect-119.c: Likewise.
+ * gcc.dg/vect/vect-outer-4c-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-4c.c: Likewise.
-2012-02-01 Georg-Johann Lay <avr@gjlay.de>
+2014-02-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR rtl-optimization/51374
- * gcc.target/avr/torture/pr51374-1.c:
- Also fail if SBIS is seen.
+ * gcc.dg/binop-xor1.c: Don't xfail scan-tree-dump-times.
-2012-02-01 Georg-Johann Lay <avr@gjlay.de>
+2014-02-10 Jeff Law <law@redhat.com>
- PR rtl-optimization/51374
- * gcc.target/avr/torture/pr51374-1.c: New.
+ PR middle-end-52306
+ * gcc.c-torture/compile/pr52306.c: New test.
-2012-01-31 Tobias Burnus <burnus@net-b.de>
+2014-02-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR fortran/52024
- * gfortran.dg/typebound_generic_11.f90: New.
+ * g++.dg/ext/vector26.C: Use -mmmx for 32-bit x86.
-2012-01-31 Tobias Burnus <burnus@net-b.de>
+2014-02-10 Richard Biener <rguenther@suse.de>
- PR fortran/52029
- * gfortran.dg/class_49.f90: New.
+ PR tree-optimization/60115
+ * gcc.dg/torture/pr60115.c: New testcase.
-2012-01-31 Tobias Burnus <burnus@net-b.de>
+2014-02-10 Eric Botcazou <ebotcazou@adacore.com>
- PR fortran/52013
- * gfortran.dg/elemental_args_check_6.f90: New.
+ * g++.dg/vect/pr33426-ivdep-3.cc: Require vect_int_mult as well.
+ * g++.dg/vect/pr33426-ivdep-4.cc: Likewise.
-2012-01-31 Jason Merrill <jason@redhat.com>
+2014-02-10 Kirill Yukhin <kirill.yukhin@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
- PR c++/52043
- * g++.dg/cpp0x/variadic122.C: New.
+ * gcc.target/i386/avx512f-vexpandpd-1.c: Update intrinsics.
+ * gcc.target/i386/avx512f-vexpandps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu32-1: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu32-2: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-1: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-2: Ditto.
+ * gcc.target/i386/avx512f-vpcmpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmupd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmupq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalepd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaleps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalepd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaleps-2.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: Update parameters.
+ * gcc.target/i386/avx512pf-vgatherpf0dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf0qpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf0qps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1dpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1qpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1qps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrad-2.c: Initialize 64 bits.
+ * gcc.target/i386/avx512f-vpslld-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrld-2.c: Ditto.
-2012-01-31 Paul Thomas <pault@gcc.gnu.org>
+2014-02-10 Jakub Jelinek <jakub@redhat.com>
- PR fortran/52012
- * gfortran.dg/realloc_on_assign_10.f90: New test.
+ * gcc.dg/vect/pr59984.c: Require effective target vect_simd_clones.
-2012-01-31 Richard Guenther <rguenther@suse.de>
+2014-02-09 Paul Thomas <pault@gcc.gnu.org>
- PR tree-optimization/51528
- * gcc.dg/torture/pr51528.c: New testcase.
+ PR fortran/57522
+ * gfortran.dg/associated_target_5.f03: New test.
-2012-01-30 Uros Bizjak <ubizjak@gmail.com>
+2014-02-09 Paul Thomas <pault@gcc.gnu.org>
- PR go/48501
- * lib/go.exp (go_target_compile): Append timeout= to options.
- * go.test/go-test.exp (go-gc-tests): Add dg-timeout-factor for
- select5-out.go test on alpha*-*-* targets.
+ PR fortran/59026
+ * gfortran.dg/elemental_by_value_1.f90: New test.
-2012-01-30 Richard Sandiford <rdsandiford@googlemail.com>
+2014-02-08 Janus Weil <janus@gcc.gnu.org>
- * gcc.target/mips/extend-1.c (TEST_CHAR): Use signed char.
- (TEST_SHORT): Reformat in the same way.
- * gcc.target/mips/octeon-exts-6.c (TEST_CHAR): Use signed char.
- (TEST_SHORT): Reformat in the same way.
- * gcc.target/mips/octeon2-lx-1.c (TEST): Make sign explicit.
- * gcc.target/mips/pr37362.c: Skip for mips-sde-elf.
- * gcc.target/mips/mmcount-ra-address-1.c (bazl): Add NOMIPS16.
- * gcc.target/mips/mmcount-ra-address-2.c (bar): Likewise.
- * gcc.target/mips/mmcount-ra-address-3.c (bar): Likewise.
+ PR fortran/58470
+ * gfortran.dg/finalize_22.f90: New.
-2012-01-30 Bin Cheng <bin.cheng@arm.com>
+2014-02-08 Paul Thomas <pault@gcc.gnu.org>
- PR target/51835
- * gcc.target/arm/pr51835.c: New testcase.
+ PR fortran/60066
+ * gfortran.dg/elemental_subroutine_10.f90: New test. This PR
+ was fixed by the patch for PR59906.
-2012-01-30 Richard Guenther <rguenther@suse.de>
+2014-02-08 Andreas Schwab <schwab@linux-m68k.org>
- PR tree-optimization/52028
- * gcc.dg/torture/pr52028.c: New testcase.
- * gfortran.dg/ldist-pr45199.f: Adjust.
- * gcc.dg/tree-ssa/ldist-16.c: Likewise.
- * gcc.dg/tree-ssa/ldist-17.c: Likewise.
- * gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
+ PR translation/52289
+ * gfortran.dg/coarray_8.f90: Update dg-error match.
-2012-01-30 Jakub Jelinek <jakub@redhat.com>
+2014-02-08 Jakub Jelinek <jakub@redhat.com>
- PR debug/52027
- * gcc.dg/tree-prof/pr52027.c: New test.
+ PR c/59984
+ * gcc.dg/vect/pr59984.c: New test.
- PR tree-optimization/52046
- * gcc.dg/pr52046.c: New test.
+ PR middle-end/60092
+ * gcc.dg/attr-alloc_align-1.c: New test.
+ * gcc.dg/attr-alloc_align-2.c: New test.
+ * gcc.dg/attr-alloc_align-3.c: New test.
+ * gcc.dg/attr-assume_aligned-1.c: New test.
+ * gcc.dg/attr-assume_aligned-2.c: New test.
+ * gcc.dg/attr-assume_aligned-3.c: New test.
- PR debug/52048
- * g++.dg/other/pr52048.C: New test.
+2014-02-08 Jakub Jelinek <jakub@redhat.com>
-2012-01-30 Richard Guenther <rguenther@suse.de>
+ PR target/60077
+ * gcc.target/i386/pr60077-1.c: New test.
+ * gcc.target/i386/pr60077-2.c: New test.
- PR tree-optimization/52045
- * gcc.dg/pr52045.c: New testcase.
+2014-02-07 Jakub Jelinek <jakub@redhat.com>
-2012-01-30 Greta Yorsh <Greta.Yorsh@arm.com>
+ PR preprocessor/56824
+ * gcc.dg/pr56824.c: New test.
- * gcc.target/arm/di-longlong64-sync-withldrexd.c: Accept
- new code generated for __sync_lock_release.
+2014-02-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
-2012-01-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+ * gcc.dg/gcc-have-sync-compare-and-swap.c: Align the 16 byte
+ variable used for atomic operations.
- * gcc.dg/dfp/fe-convert-2.c: Force use of soft dfp on s390 and s390x.
+2014-02-07 Richard Biener <rguenther@suse.de>
-2012-01-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+ PR middle-end/60092
+ * gcc.dg/vect/pr60092-2.c: New testcase.
- PR testsuite/51875
- * gfortran.dg/guality/pr41558.f90: Skip on 32-bit hppa*-*-hpux*.
+2014-02-07 Jakub Jelinek <jakub@redhat.com>
- * g++.dg/ext/visibility/template10.C: Fix typo.
+ PR c++/60082
+ Revert
+ 2014-02-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
- * gcc.dg/tm/pr51472.c: Add -fno-common option on hppa-*-hpux*.
+ * g++.dg/cilk-plus/CK/catch_exc.cc: Disable test for -O1.
+ * c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.
-2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
+2014-02-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- PR c++/51327
- * g++.dg/cpp0x/constexpr-ice6.C: New.
+ * gcc.target/s390/fp2int1.c: New testcase.
-2012-01-29 Tobias Burnus <burnus@net-b.de>
+2014-02-07 Richard Biener <rguenther@suse.de>
- PR fortran/41600
- * gfortran.dg/default_initialization_6.f90: New.
+ PR middle-end/60092
+ * gcc.dg/tree-ssa/alias-30.c: New testcase.
+ * gcc.dg/tree-ssa/alias-31.c: Likewise.
-2012-01-29 Tobias Burnus <burnus@net-b.de>
+2014-02-06 Jan Hubicka <hubicka@ucw.cz>
- PR fortran/51972
- * gfortran.dg/class_allocate_12.f90: Enable disabled test.
- * gfortran.dg/class_48.f90: New.
+ PR ipa/59918
+ * g++.dg/torture/pr59918.C: New testcase.
-2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
+2014-02-06 Jakub Jelinek <jakub@redhat.com>
- PR fortran/51808
- * gfortran.dg/module_md5_1.f90: Update MD5 sum.
+ PR target/59575
+ * gcc.target/arm/pr59575.c: New test.
-2012-01-28 Tobias Burnus <burnus@net-b.de>
+ PR debug/59992
+ * gcc.dg/pr59992.c: New test.
- PR fortran/51972
- * gfortran.dg/class_allocate_12.f90: New.
+2014-02-06 Marc Glisse <marc.glisse@inria.fr>
-2012-01-28 Eric Botcazou <ebotcazou@adacore.com>
+ * g++.dg/cpp0x/constexpr-attribute2.C: Restrict to target
+ init_priority. Test alignment of variable instead of function.
- * gcc.dg/torture/pr50444.c: Fix dg directives.
+2014-02-06 Marek Polacek <polacek@redhat.com>
-2012-01-28 Jakub Jelinek <jakub@redhat.com>
+ PR c/60087
+ * gcc.dg/pr60087.c: New test.
- PR target/52006
- * gcc.target/arm/pr52006.c: New test.
+2014-02-06 Alan Modra <amodra@gmail.com>
-2012-01-27 Aldy Hernandez <aldyh@redhat.com>
+ * gcc.target/powerpc/pr60032.c: New.
- PR testsuite/52011
- * gcc.dg/lto/trans-mem.h: New file.
- * gcc.dg/lto/trans-mem-2_0.c: Include it.
- * gcc.dg/lto/trans-mem-1_1.c: Same.
- * gcc.dg/lto/trans-mem-4_1.c: Same.
- * gcc.dg/lto/trans-mem-3_1.c: Same.
+2014-02-06 Jakub Jelinek <jakub@redhat.com>
-2012-01-27 Tobias Burnus <burnus@net-b.de>
+ PR target/60062
+ * gcc.c-torture/execute/pr60062.c: New test.
+ * gcc.c-torture/execute/pr60072.c: New test.
- PR fortran/52022
- * gfortran.dg/dummy_procedure_7.f90: New.
+2014-02-06 Ian Bolton <ian.bolton@arm.com>
-2012-01-27 Andreas Schwab <schwab@linux-m68k.org>
+ * gcc.dg/tree-ssa/pr59597.c: Make called function static
+ so that expected outcome works for PIC variants too.
- * g++.dg/cpp0x/constexpr-rom.C: Don't add -G0 on *-*-darwin*
- *-*-aix* alpha*-*-osf* alpha*-*-*vms*.
+2014-02-06 Yury Gribov <y.gribov@samsung.com>
+ Kugan Vivekanandarajah <kuganv@linaro.org>
-2012-01-27 Jakub Jelinek <jakub@redhat.com>
+ * gcc.target/arm/vect-noalign.c: New file.
- PR c++/51852
- * g++.dg/other/gc5.C: New test.
+2014-02-05 Jan Hubicka <hubicka@ucw.cz>
+ Jakub Jelinek <jakub@redhat.com>
-2012-01-27 Richard Guenther <rguenther@suse.de>
+ PR middle-end/60013
+ * gcc.dg/pr60013.c: New testcase.
- PR tree-optimization/50444
- * gcc.dg/torture/pr50444.c: New testcase.
+2014-02-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-01-27 Tobias Burnus <burnus@net-b.de>
+ * gcc.dg/vmx/sum2s.c: New.
+ * gcc.dg/vmx/sum2s-be-order.c: New.
- PR fortran/51970
- PR fortran/51977
- * gfortran.dg/move_alloc_13.f90: New.
+2014-02-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-01-27 Tobias Burnus <burnus@net-b.de>
+ * gcc.dg/vmx/pack.c: New.
+ * gcc.dg/vmx/pack-be-order.c: New.
+ * gcc.dg/vmx/unpack.c: New.
+ * gcc.dg/vmx/unpack-be-order.c: New.
- PR fortran/51953
- * gfortran.dg/allocate_alloc_opt_13.f90: New.
- * gfortran.dg/allocate_alloc_opt_4.f90: Add -std=f2003
- and change dg-error string.
+2014-02-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
-2012-01-27 Tobias Burnus <burnus@net-b.de>
+ * g++.dg/cilk-plus/CK/catch_exc.cc: Disable test for -O1.
+ * c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.
- PR fortran/52016
- * gfortran.dg/elemental_args_check_5.f90: New.
+2014-02-05 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-2012-01-27 Richard Guenther <rguenther@suse.de>
+ * gcc.target/i386/avx512f-vrndscaless-2.c (compute_rndscaless):
+ Use __builtin_floorf, __builtin_ceilf.
+ * gcc.target/i386/sse4_1-floorf-sfix-vec.c (floorf): Remove
+ declaration.
+ (TEST): Use __builtin_floorf.
+ * gcc.target/i386/sse4_1-floorf-vec.c: Likewise.
- PR middle-end/51959
- * g++.dg/torture/pr51959.C: New testcase.
+2014-02-05 Jakub Jelinek <jakub@redhat.com>
-2012-01-27 Tom de Vries <tom@codesourcery.com>
+ PR ipa/59947
+ * g++.dg/opt/pr59947.C: New test.
- PR tree-optimization/51990
- * gcc.dg/pr51990.c: New test.
- * gcc.dg/pr51990-2.c: Same.
+ PR c++/58703
+ * c-c++-common/gomp/pr58703.c: New test.
-2012-01-27 Paul Thomas <pault@gcc.gnu.org>
- Tobias Burnus <burnus@gcc.gnu.org>
+2014-02-05 Richard Biener <rguenther@suse.de>
- PR fortran/48705
- * gfortran.dg/class_allocate_11.f03: New.
+ PR testsuite/60076
+ * gcc.dg/vect/pr60012.c: Require vect_extract_even_odd and
+ avoid using unsigned long long.
- PR fortran/51870
- PR fortran/51943
- PR fortran/51946
- * gfortran.dg/class_allocate_7.f03: New.
- * gfortran.dg/class_allocate_8.f03: New.
- * gfortran.dg/class_allocate_9.f03: New.
- * gfortran.dg/class_allocate_10.f03: New.
+2014-02-05 Jakub Jelinek <jakub@redhat.com>
-2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+ PR middle-end/57499
+ * g++.dg/torture/pr57499.C: New test.
- * gnat.dg/discr34.adb: New test.
- * gnat.dg/discr34_pkg.ads: New helper.
+2014-02-05 Yury Gribov <y.gribov@samsung.com>
-2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.dg/asan/nosanitize-and-inline.c: New test.
- * gnat.dg/discr33.adb: New test.
+2014-02-04 Jan Hubicka <hubicka@ucw.cz>
-2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+ * g++.dg/ipa/devirrt-22.C: Fix template.
- * gnat.dg/limited_with3.ad[sb): New test.
- * gnat.dg/limited_with3_pkg1.ad[sb]: New helper.
- * gnat.dg/limited_with3_pkg2.ads: Likewise.
- * gnat.dg/limited_with3_pkg3.ads: Likewise.
+2014-02-04 Marek Polacek <polacek@redhat.com>
-2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+ PR c/60036
+ * gcc.dg/pr60036.c: New test.
- * gnat.dg/stack_usage1.adb: New test.
- * gnat.dg/stack_usage1_pkg.ad[sb]: New helper.
+2014-02-04 Markus Trippelsdorf <markus@trippelsdorf.de>
- * gcc.dg/pr44194-1.c: Remove superfluous include directive.
- * gcc.dg/pr44194-2.c: Likewise.
+ PR ipa/60058
+ * g++.dg/torture/pr60058.C: New testcase.
-2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
+2014-02-04 Max Ostapenko <m.ostapenko@partner.samsung.com>
- PR c++/51370
- * g++.dg/template/crash112.C: New.
+ * g++.dg/tsan/default_options.C: Invert check.
-2012-01-27 Richard Henderson <rth@redhat.com>
+2014-02-04 Jakub Jelinek <jakub@redhat.com>
- * gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
+ PR tree-optimization/60002
+ * g++.dg/opt/pr60002.C: New test.
-2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+ PR tree-optimization/60023
+ * g++.dg/vect/pr60023.cc: New test.
- * gfortran.dg/reassoc_4.f: Use dg-additional-options.
+ PR ipa/60026
+ * c-c++-common/torture/pr60026.c: New test.
-2012-01-26 Jakub Jelinek <jakub@redhat.com>
+ PR rtl-optimization/57915
+ * gcc.target/i386/pr57915.c: New test.
- PR middle-end/51895
- * g++.dg/opt/pr51895.C: New test.
+2014-02-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-2012-01-26 Michael Matz <matz@suse.de>
+ * g++.dg/init/dso_handle2.C: Compile with -fuse-cxa-atexit.
- PR tree-optimization/48794
- * gfortran.dg/gomp/pr48794-2.f90: New testcase.
+2014-02-04 Renlin Li <Renlin.Li@arm.com>
-2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+ * gcc.target/arm/ftest-armv7a-thumb.c: Change aramv7-a to armv7-a.
- * gcc.dg/ssa-dom-thread-4.c: Set -mbranch-cost=2 for s390 and s390x.
+2014-02-04 Jakub Jelinek <jakub@redhat.com>
-2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+ PR middle-end/59261
+ * gcc.dg/pr59261.c: New test.
- * gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
- * gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
- memory.
- * gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
- the default value for s390 and s390x.
+2014-02-04 Richard Biener <rguenther@suse.de>
-2012-01-25 Aldy Hernandez <aldyh@redhat.com>
+ PR tree-optimization/60012
+ * gcc.dg/vect/pr60012.c: New testcase.
- PR lto/51698
- * gcc.dg/lto/trans-mem-4_0.c: New.
- * gcc.dg/lto/trans-mem-4_1.c: New.
- * gcc.dg/lto/trans-mem-2_0.c: Provide correct argument types for
- TM builtins.
- * gcc.dg/lto/trans-mem-1_0.c: Require stdint_types.
- * gcc.dg/lto/trans-mem-1_1.c: Provide correct argument types for
- TM builtins.
- * gcc.dg/lto/trans-mem-3_0.c: Require stdint_types.
- * gcc.dg/lto/trans-mem-3_1.c: Provide correct argument types for
- TM builtins.
+2014-02-04 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-2012-01-25 Georg-Johann Lay <avr@gjlay.de>
+ PR target/59788
+ * g++.dg/eh/unwind-direct.C: New test.
- * gcc.target/avr/torture/int24-mul.c: Rename __pgm to __flash.
+2014-02-04 Uros Bizjak <ubizjak@gmail.com>
-2012-01-25 Ian Lance Taylor <iant@google.com>
+ * lib/tsan-dg.exp (tsan_init): Set trivial testcase
+ timeout value to 20s.
- * go.test/go-test.exp (go-gc-tests): Handle a few more test lines.
+2014-02-03 Jan Hubicka <hubicka@ucw.cz>
-2012-01-25 Tobias Burnus <burnus@net-b.de>
+ PR ipa/59882
+ * g++.dg/torture/pr59882.C: New testcase
- PR fortran/51995
- * gfortran.dg/typebound_proc_25.f90: New.
+2014-02-03 Jan Hubicka <jh@suse.cz>
-2012-01-25 Jason Merrill <jason@redhat.com>
+ PR ipa/59831
+ * g++.dg/ipa/devirt-22.C: New testcase.
- PR c++/51992
- * g++.dg/lto/pr51992_0.C: New.
+2014-02-03 Jan Hubicka <jh@suse.cz>
-2012-01-25 Jakub Jelinek <jakub@redhat.com>
+ * g++.dg/ipa/devirt-25.C: New testcase.
- PR tree-optimization/51987
- * gcc.target/i386/pr51987.c: New test.
+2014-02-04 Jakub Jelinek <jakub@redhat.com>
-2012-01-25 Greta Yorsh <Greta.Yorsh@arm.com>
+ PR tree-optimization/59924
+ * gcc.dg/pr59924.c: New test.
- * gcc.dg/tm/lto-1.c: Require lto support in target.
+2014-02-03 Jan Hubicka <hubicka@ucw.cz>
-2012-01-25 Andrey Belevantsev <abel@ispras.ru>
+ PR ipa/59831
+ * g++.dg/ipa/devirt-24.C: New testcase.
- PR rtl-optimization/48374
- * gcc.dg/pr48374.c: New test.
+2014-02-03 Marc Glisse <marc.glisse@inria.fr>
-2012-01-25 Greta Yorsh <Greta.Yorsh@arm.com>
+ PR c++/53017
+ PR c++/59211
+ * c-c++-common/attributes-1.c: New testcase.
+ * g++.dg/cpp0x/constexpr-attribute2.C: Likewise.
- * gcc.dg/pr50908-2.c (dg-options): Add -fno-short-enums.
+2014-02-03 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-25 Tobias Burnus <burnus@net-b.de>
+ PR c++/58871
+ * g++.dg/cpp0x/pr58871.C: New.
- PR fortran/51966
- * gfortran.dg/derived_constructor_char_3.f90: New.
+2014-02-03 Cong Hou <congh@google.com>
-2012-01-24 Ian Lance Taylor <iant@google.com>
+ PR tree-optimization/60000
+ * g++.dg/vect/pr60000.cc: New test.
- * go.test/go-test.exp (filecmp): New procedure.
- (errchk): Handle quoted square brackets.
- (go-gc-tests): Set go_compile_args. Handle various new test
- lines. Skip a few new tests.
- * lib/go-torture.exp (go-torture-execute): Use go_compile_args.
+2014-02-03 H.J. Lu <hongjiu.lu@intel.com>
-2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+ * gcc.target/i386/long-double-64-1.c: Verify __multf3 isn't used.
+ * gcc.target/i386/long-double-64-4.c: Likewise.
+ * gcc.target/i386/long-double-80-1.c: Likewise.
+ * gcc.target/i386/long-double-80-2.c: Likewise.
+ * gcc.target/i386/long-double-80-3.c: Likewise.
+ * gcc.target/i386/long-double-80-4.c: Likewise.
+ * gcc.target/i386/long-double-80-5.c: Likewise.
+ * gcc.target/i386/long-double-64-2.c: Limit to ia32. Verify
+ __multf3 isn't used.
+ * gcc.target/i386/long-double-64-3.c: Likewise.
+ * gcc.target/i386/long-double-128-1.c: New test.
+ * gcc.target/i386/long-double-128-2.c: Likewise.
+ * gcc.target/i386/long-double-128-3.c: Likewise.
+ * gcc.target/i386/long-double-128-4.c: Likewise.
+ * gcc.target/i386/long-double-128-5.c: Likewise.
+ * gcc.target/i386/long-double-128-6.c: Likewise.
+ * gcc.target/i386/long-double-128-7.c: Likewise.
+ * gcc.target/i386/long-double-128-8.c: Likewise.
+ * gcc.target/i386/long-double-128-9.c: Likewise.
+ * gcc.target/i386/long-double-64-5.c: Likewise.
+ * gcc.target/i386/long-double-64-6.c: Likewise.
+ * gcc.target/i386/long-double-64-7.c: Likewise.
+ * gcc.target/i386/long-double-64-8.c: Likewise.
+ * gcc.target/i386/long-double-64-9.c: Likewise.
+ * gcc.target/i386/long-double-80-10.c: Likewise.
+ * gcc.target/i386/long-double-80-8.c: Likewise.
+ * gcc.target/i386/long-double-80-9.c: Likewise.
- * lib/target-supports.exp (proc check_effective_target_vect_perm)
- (check_effective_target_vect_extract_even_odd)
- (check_effective_target_vect_interleave): Return true for MIPS
- paired-single.
+2014-02-03 Andrey Belevantsev <abel@ispras.ru>
-2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+ PR rtl-optimization/57662
+ * g++.dg/pr57662.C: New test.
- * gcc.c-torture/execute/scal-to-vec1.c (one): New volatile variable.
- (main): Use it instead of argc.
+2014-02-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-01-24 Jason Merrill <jason@redhat.com>
+ * gcc.dg/vmx/3b-15.c: Remove special handling for little endian.
+ * gcc.dg/vmx/perm.c: New.
+ * gcc.dg/vmx/perm-be-order.c: New.
- PR c++/51973
- * g++.dg/cpp0x/sfinae31.C: New.
+2014-02-02 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+ * gcc.dg/vmx/vsums.c: New.
+ * gcc.dg/vmx/vsums-be-order.c: New.
- * gcc.dg/memcpy-4.c: Don't expect /s on MEMs.
+2014-02-02 Jan Hubicka <hubicka@ucw.cz>
-2012-01-24 Jason Merrill <jason@redhat.com>
+ * g++.dg/ipa/devirt-23.C: New testcase.
+ * g++.dg/ipa/devirt-20.C: Fix template.
- PR c++/51812
- * g++.dg/inherit/covariant20.C: New.
+2014-02-02 Jan Hubicka <jh@suse.cz>
-2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
+ * g++.dg/ipa/devirt-21.C: New testcase.
- PR c++/51223
- * g++.dg/parse/crash58.C: New.
+2014-02-02 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-24 Jakub Jelinek <jakub@redhat.com>
+ * gcc.target/mips/get-fcsr-1.c, gcc.target/mips/get-fcsr-2.c,
+ gcc.target/mips/set-fcsr-1.c, gcc.target/mips/set-fcsr-2.c: New tests.
- PR target/51957
- * gcc.dg/pr51957-1.c: New test.
- * gcc.dg/pr51957-1.h: New file.
- * gcc.dg/pr51957-2.c: New test.
+2014-02-02 Uros Bizjak <ubizjak@gmail.com>
-2012-01-23 Jason Merrill <jason@redhat.com>
+ PR target/60017
+ * gcc.c-torture/execute/pr60017.c: New test.
- PR c++/51930
- * g++.dg/ext/visibility/template10.C: New.
+2014-02-02 Mikael Morin <mikael@gcc.gnu.org>
-2012-01-23 Tobias Burnus <burnus@net-b.de>
+ PR fortran/57033
+ * gfortran.dg/default_initialization_7.f90: New test.
- PR fortran/51948
- * gfortran.dg/move_alloc_12.f90: New.
+2014-02-01 Paul Thomas <pault@gcc.gnu.org>
-2012-01-23 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+ PR fortran/59906
+ * gfortran.dg/elemental_subroutine_9.f90: New test.
- PR middle-end/45416
- * gcc.dg/pr45416.c: Skip for Thumb1. Handle ubfx.
+2014-02-01 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Adjust expected MIPS output.
- PR c++/51398
- * g++.dg/template/crash111.C: New.
+2014-02-01 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-23 Arnaud Charlet <charlet@adacore.com>
+ * g++.dg/pr49718.C: Use -mno-relax-pic-calls for MIPS.
- * ada/acats/tests/cxh/cxh1001.a: Removed, test not suitable on all
- configurations.
- * ada/acats/run_all.sh: Simplify by removing cxh1001 special case.
+2014-02-01 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/ext/vector26.C: Restrict scan-assembler test to ! c++98.
+
+2014-02-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51219
+ * g++.dg/init/bitfield5.C: New.
+
+2014-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/60003
+ * gcc.c-torture/execute/pr60003.c: New test.
+
+2014-01-31 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR bootstrap/59985
+ * gcc.target/arm/pr59985.C: New.
+
+2014-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/59410
+ * lib/tsan-dg.exp (tsan_init): Instead of not running any
+ tsan tests if trivial testcase doesn't run, set dg-do-what-default
+ to compile.
+ (tsan_finish): Restore dg-do-what-default.
+ * g++.dg/tsan/atomic_free.C: Remove dg-do line.
+ * g++.dg/tsan/fd_close_norace2.C: Likewise.
+ * g++.dg/tsan/default_options.C: Likewise.
+ * g++.dg/tsan/aligned_vs_unaligned_race.C: Likewise.
+ * g++.dg/tsan/atomic_free2.C: Likewise.
+ * g++.dg/tsan/cond_race.C: Likewise.
+ * g++.dg/tsan/fd_close_norace.C: Likewise.
+ * g++.dg/tsan/benign_race.C: Likewise.
+ * c-c++-common/tsan/fd_pipe_race.c: Likewise.
+ * c-c++-common/tsan/simple_race.c: Likewise.
+ * c-c++-common/tsan/mutexset1.c: Likewise.
+ * c-c++-common/tsan/thread_leak2.c: Likewise.
+ * c-c++-common/tsan/tls_race.c: Likewise.
+ * c-c++-common/tsan/write_in_reader_lock.c: Likewise.
+ * c-c++-common/tsan/race_on_barrier2.c: Likewise.
+ * c-c++-common/tsan/free_race2.c: Likewise.
+ * c-c++-common/tsan/thread_leak.c: Likewise.
+ * c-c++-common/tsan/thread_leak1.c: Likewise.
+ * c-c++-common/tsan/race_on_barrier.c: Likewise.
+ * c-c++-common/tsan/free_race.c: Likewise.
+ * c-c++-common/tsan/sleep_sync.c: Likewise.
+ * c-c++-common/tsan/tiny_race.c: Likewise.
+ * c-c++-common/tsan/race_on_mutex2.c: Likewise.
+ * c-c++-common/tsan/atomic_stack.c: Likewise.
+ * c-c++-common/tsan/race_on_mutex.c: Likewise. Adjust line numbers
+ in dg-output regexps.
+ * c-c++-common/tsan/simple_stack.c: Likewise.
+
+2014-01-31 Richard Henderson <rth@redhat.com>
+
+ * g++.dg/tm/pr60004.C: New.
+
+2014-01-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59082
+ * g++.dg/inherit/crash4.C: New.
+
+2014-01-31 Maxim Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * c-c++-common/tsan/simple_race.c: Made test less flaky.
+
+2014-01-31 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/m512-check.h: Use correct rounding values.
+
+2014-01-31 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/avx-1.c: Use correct rounding values.
+ * gcc.target/i386/avx512f-vaddpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtdq2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2sd64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2ss64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtudq2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2sd64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubss-1.c: Ditto.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+
+2014-01-31 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/avx512f-inline-asm.c: Swap Yk and k.
+ * gcc.target/i386/avx512f-kmovw-1.c: Also allow k0.
+
+2014-01-31 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/59990
+ * gcc.dg/torture/pr59990.c: New testcase.
+
+2014-01-31 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/tsan-dg.exp (tsan_init): Try to run a trivial program,
+ if it fails don't run any tsan tests.
+
+2014-01-31 Marek Polacek <polacek@redhat.com>
+
+ PR c/59963
+ * gcc.dg/pr59940.c (g): Adjust dg-warning.
+ (y): Adjust dg-error.
+ * gcc.dg/cast-function-1.c (bar): Adjust dg-warnings.
+ * gcc.dg/pr59963-1.c: New test.
+ * gcc.dg/pr59963-2.c: New test.
+ * gcc.dg/pr59963-3.c: New test.
+
+2014-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/59923
+ * gcc.target/arm/pr59923.c: New test.
+
+2014-01-30 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vmx/splat.c: New.
+ * gcc.dg/vmx/splat-vsx.c: New.
+ * gcc.dg/vmx/splat-be-order.c: New.
+ * gcc.dg/vmx/splat-vsx-be-order.c: New.
+ * gcc.dg/vmx/eg-5.c: Remove special casing for little endian.
+ * gcc.dg/vmx/sn7153.c: Add special casing for little endian.
+
+2014-01-30 Richard Biener <rguenther@suse.de>
-2012-01-23 Dodji Seketeli <dodji@redhat.com>
+ PR tree-optimization/59993
+ * gcc.dg/torture/pr59993.c: New testcase.
- PR testsuite/51941
- * g++.dg/debug/dwarf2/nested-3.C: Accept multiple lines between
- the DW_TAG_class_type and DW_AT_name: "Executor".
+2014-01-30 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-23 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+ * g++.dg/vect/pr33426-ivdep.cc, g++.dg/vect/pr33426-ivdep-2.cc,
+ g++.dg/vect/pr33426-ivdep-3.cc, g++.dg/vect/pr33426-ivdep-4.cc,
+ gcc.dg/vect/vect-ivdep-1.c, gcc.dg/vect/vect-ivdep-2.c: Require
+ vect_int rather than vect_float.
- * lib/target-supports.exp
- (check_effective_target_vect_extract_even_odd): Handle ARM neon.
- (check_effective_target_vect_interleave): Likewise.
+2014-01-30 Marek Polacek <polacek@redhat.com>
-2012-01-22 Jason Merrill <jason@redhat.com>
+ * gcc.dg/Wconversion-real-integer.c: Properly end comment.
- PR c++/51925
- * g++.dg/template/using20.C: New.
- * g++.dg/template/template-id-2.C: Adjust diagnostic.
+2014-01-30 David Holsgrove <david.holsgrove@xilinx.com>
-2012-01-23 Jason Merrill <jason@redhat.com>
+ * gcc.target/microblaze/isa/fcmp4.c: New.
- PR target/51934
- * g++.dg/torture/pr51344.C: Limit to x86.
+2014-01-30 Marek Polacek <polacek@redhat.com>
-2012-01-23 Greta Yorsh <Greta.Yorsh@arm.com>
+ PR c/59940
+ * gcc.dg/pr59940.c: New test.
+ * gcc.dg/pr35635.c (func3): Move dg-warning.
- * c-c++-common/tm/omp.c: Require target with pthread support.
+2014-01-30 Richard Biener <rguenther@suse.de>
-2012-01-23 Richard Guenther <rguenther@suse.de>
+ PR tree-optimization/59903
+ * gcc.dg/torture/pr59903.c: New testcase.
- PR tree-optimization/51949
- * gcc.dg/torture/pr51949.c: New testcase.
+2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-23 Jakub Jelinek <jakub@redhat.com>
+ PR c++/58843
+ * g++.dg/lookup/crash8.C: New.
- PR rtl-optimization/51933
- * gcc.c-torture/execute/pr51933.c: New test.
+2014-01-30 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-22 Douglas B Rupp <rupp@gnat.com>
+ PR c++/58649
+ * g++.dg/template/crash117.C: New.
- * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME):
- Do not define for Interix.
+2014-01-30 Richard Biener <rguenther@suse.de>
-2012-01-22 Jason Merrill <jason@redhat.com>
+ PR c/59905
+ * gcc.dg/cast-function-1.c: Adjust to survive DCE.
+ * gcc.dg/call-diag-2.c: Remove expected warnings about calling
+ abort.
+ * gcc.dg/invalid-call-1.c: Likewise.
- PR c++/51832
- * g++.dg/lto/pr51832.h: New.
- * g++.dg/lto/pr51832_0.C: New.
- * g++.dg/lto/pr51832_1.C: New.
+2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-22 Eric Botcazou <ebotcazou@adacore.com>
+ PR c++/58561
+ * g++.dg/cpp1y/auto-fn23.C: New.
- * gcc.dg/ext-elim-1.c: New test.
+2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-22 Richard Sandiford <rdsandiford@googlemail.com>
+ PR c++/58846
+ * g++.dg/init/dso_handle2.C: New.
- PR target/51931
- * gcc.c-torture/compile/20001226-1.c: Add nomips16 attribute.
- * g++.dg/opt/longbranch1.C: Likewise.
+2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-22 Richard Sandiford <rdsandiford@googlemail.com>
+ PR c++/58674
+ * g++.dg/cpp0x/pr58674.C: New.
- * g++.old-deja/g++.pt/ptrmem6.C: xfail a test for ARM and MIPS
- in C++11 mode.
+2014-01-28 Kirill Yukhin <kirill.yukhin@intel.com>
-2012-01-21 Steven G. Kargl <kargl@gcc.gnu.org>
+ PR target/59617
+ * gcc.target/i386/avx512f-gather-2.c: Remove XPASS.
+ * gcc.target/i386/avx512f-gather-5.c: Ditto.
- PR fortran/50556
- * gfortran.dg/namelist_74.f90: New test.
- * gfortran.dg/namelist_59.f90: Remove SAVE attribute.
+2014-01-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
-2012-01-21 Tobias Burnus <burnus@net-b.de>
+ * gcc.dg/vmx/merge-be-order.c: New.
+ * gcc.dg/vmx/merge.c: New.
+ * gcc.dg/vmx/merge-vsx-be-order.c: New.
+ * gcc.dg/vmx/merge-vsx.c: New.
- PR fortran/51913
- * gfortran.dg/class_47.f90: New.
+2014-01-29 Richard Biener <rguenther@suse.de>
-2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
+ PR tree-optimization/58742
+ * gcc.dg/pr58742-1.c: New testcase.
+ * gcc.dg/pr58742-2.c: Likewise.
+ * gcc.dg/pr58742-3.c: Likewise.
- * gnat.dg/renaming5.ad[sb]: New test.
+2014-01-29 Renlin Li <Renlin.Li@arm.com>
-2012-01-20 Jason Merrill <jason@redhat.com>
+ * gcc.target/arm/ftest-armv7ve-arm.c: New.
+ * gcc.target/arm/ftest-armv7ve-thumb.c: New.
+ * lib/target-supports.exp: New armfunc, armflag and armdef for armv7ve.
- PR c++/51919
- * g++.dg/pch/mangle1.{C,Hs}: Remove.
+2014-01-29 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-20 Jason Merrill <jason@redhat.com>
+ PR c++/58702
+ * g++.dg/gomp/pr58702.C: New.
+
+2014-01-29 Dodji Seketeli <dodji@redhat.com>
+
+ * c-c++-common/cpp/warning-zero-location-2.c: Fix error message
+ selector.
+
+2014-01-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/59917
+ PR tree-optimization/59920
+ * gcc.dg/pr59920-1.c: New test.
+ * gcc.dg/pr59920-2.c: New test.
+ * gcc.dg/pr59920-3.c: New test.
+ * c-c++-common/gomp/pr59917-1.c: New test.
+ * c-c++-common/gomp/pr59917-2.c: New test.
+
+ PR tree-optimization/59594
+ * gcc.dg/vect/no-vfa-vect-depend-2.c: New test.
+ * gcc.dg/vect/no-vfa-vect-depend-3.c: New test.
+ * gcc.dg/vect/pr59594.c: New test.
+
+2014-01-28 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/59414
+ * gfortran.dg/allocate_class_3.f90: New test.
+
+2014-01-28 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/59935
+ * c-c++-common/cpp/warning-zero-location.c: New test.
+ * c-c++-common/cpp/warning-zero-location-2.c: Likewise.
+
+2014-01-27 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.target/mips/pr52125.c: Add -mno-optgp option.
+
+2014-01-27 Allan Sandfeld Jensen <sandfeld@kde.org>
+
+ * g++.dg/ext/mv16.C: New tests.
+
+2014-01-27 Ilya Tocar <ilya.tocar@intel.com>
+
+ * gcc.target/i386/avx512f-vexpandpd-1.c: Also test _mm512_expand_pd.
+ * gcc.target/i386/avx512f-vexpandpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandps-1.c: Also test _mm512_expand_ps.
+ * gcc.target/i386/avx512f-vexpandps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-1.c: Also test _mm512_storeu_epi64.
+ * gcc.target/i386/avx512f-vmovdqu64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpged-1.c: New.
+ * gcc.target/i386/avx512f-vpcmpged-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgeuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpled-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpled-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpleuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpltuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpneqq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpnequq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdb-1.c: Also test
+ _mm512_mask_cvtepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdw-1.c: Also test
+ _mm512_mask_cvtepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqb-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqw-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqd-1.c: Also test
+ _mm512_mask_cvtepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdb-1.c: Also test
+ _mm512_mask_cvtsepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdw-1.c: Also test
+ _mm512_mask_cvtsepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqb-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqw-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqd-1.c: Also test
+ _mm512_mask_cvtsepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdb-1.c: Also test
+ _mm512_mask_cvtusepi32_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovusdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdw-1.c: Also test
+ _mm512_mask_cvtusepi32_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovusdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqb-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi8.
+ * gcc.target/i386/avx512f-vpmovusqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqw-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi16.
+ * gcc.target/i386/avx512f-vpmovusqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqd-1.c: Also test
+ _mm512_mask_cvtusepi64_storeu_epi32.
+ * gcc.target/i386/avx512f-vpmovusqd-2.c: Ditto.
+ * gcc.target/i386/m128-check.h: Add checkVs, checkVb.
+
+2014-01-27 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/avx512pf-vgatherpf0dpd-1.c: New.
+ * gcc.target/i386/avx512pf-vgatherpf0qpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1dpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1qpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf0dpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf0qpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf1dpd-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf1qpd-1.c: Ditto.
+ * gcc.target/i386/sse-14.c: Add new built-ins, fix AVX-512ER
+ built-ins roudning immediate.
+ * gcc.target/i386/sse-22.c: Add new built-ins.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/avx-1.c: Ditto.
+
+2014-01-27 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.target/sh/torture/strncmp.c: New tests.
+
+2014-01-25 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/unroll_1.c: Add -fenable-rtl-loop2.
+
+2014-01-25 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.dg/vect/vect-nop-move.c (main): Check for vect runtime.
+
+2014-01-24 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/59919
+ * gcc.c-torture/compile/pr59919.c: New test.
+
+2014-01-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57524
+ * g++.dg/ext/timevar2.C: New.
+
+2014-01-24 Marek Polacek <polacek@redhat.com>
+
+ * gcc.dg/pr59846.c (fn1, fn2): Use ULL suffix.
+
+2014-01-23 H.J. Lu <hongjiu.lu@intel.com>
- PR c++/51922
- * g++.dg/ext/attrib42.C: Require ilp32.
+ PR target/59929
+ * gcc.target/i386/pr59929.c: New test.
-2012-01-20 Jakub Jelinek <jakub@redhat.com>
+2014-01-23 Michael Meissner <meissner@linux.vnet.ibm.com>
- PR target/51915
- * gcc.target/arm/pr51915.c: New test.
+ PR target/59909
+ * gcc.target/powerpc/quad-atomic.c: New file to test power8 quad
+ word atomic functions at runtime.
-2012-01-20 Cary Coutant <ccoutant@google.com>
- Dodji Seketeli <dodji@redhat.com>
+2014-01-23 Marek Polacek <polacek@redhat.com>
- PR debug/45682
- * g++.dg/debug/dwarf2/nested-3.C: New test.
+ PR c/59846
+ * gcc.dg/pr59846.c: New test.
-2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
+2014-01-23 Marek Polacek <polacek@redhat.com>
- PR c++/51402
- * g++.dg/template/crash110.C: New.
+ PR c/58346
+ * c-c++-common/pr58346-1.c: New test.
+ * c-c++-common/pr58346-2.c: New test.
+ * c-c++-common/pr58346-3.c: New test.
-2012-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2014-01-23 Marek Polacek <polacek@redhat.com>
- * gcc.misc-tests/gcov-14.c: Skip on alpha*-dec-osf*.
- Remove default options on hppa*-*-hpux*.
+ PR c/59871
+ * gcc.dg/20020220-2.c: Adjust dg-warning message.
+ * gcc.dg/pr59871.c: New test.
-2012-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+2014-01-23 Paolo Carlini <paolo.carlini@oracle.com>
- * g++.dg/ext/visibility/template9.C: Add dg-require-visibility.
+ PR c++/58980
+ * g++.dg/parse/enum11.C: New.
-2012-01-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+2014-01-23 Alex Velenko <Alex.Velenko@arm.com>
- * gcc.c-torture/compile/pr51856.c: New testcase.
+ * gcc.target/aarch64/sshr64_1.c: New testcase.
-2012-01-20 Uros Bizjak <ubizjak@gmail.com>
+2014-01-23 Balaji V. Iyer <balaji.v.iyer@intel.com>
- * go.test/go-test.exp (go-gc-tests): Pass correctly formatted
- options to go_target_compile.
+ * g++.dg/cilk-plus/cilk-plus.exp: Called the C/C++ common tests for
+ SIMD enabled function.
+ * g++.dg/cilk-plus/ef_test.C: New test.
+ * c-c++-common/cilk-plus/ef_error3.c: Made certain messages C specific
+ and added C++ ones.
+ * c-c++-common/cilk-plus/vlength_errors.c: Added new dg-error tags
+ to differenciate C error messages from C++ ones.
-2012-01-20 Kai Tietz <ktietz@redhat.com>
+2014-01-23 Alex Velenko <Alex.Velenko@arm.com>
- * g++.dg/torture/pr51344.C: Fix typo.
+ * gcc.target/aarch64/vld1-vst1_1.c: New test_case.
-2012-01-20 Richard Guenther <rguenther@suse.de>
+2014-01-23 David Holsgrove <david.holsgrove@xilinx.com>
- PR tree-optimization/51903
- * g++.dg/torture/pr51903.C: New testcase.
+ * gcc.target/microblaze/others/builtin-trap.c: New test,
-2012-01-20 Tobias Burnus <burnus@net-b.de>
- Janus Weil <janus@gcc.gnu.org>
+2014-01-23 Jakub Jelinek <jakub@redhat.com>
- PR fortran/51056
- * gfortran.dg/use_21.f90: New.
+ PR middle-end/58809
+ * c-c++-common/gomp/pr58809.c: New test.
-2012-01-20 Jakub Jelinek <jakub@redhat.com>
+2014-01-23 Dominique Dhumieres <dominiq@lps.ens.fr>
- PR target/51106
- * gcc.dg/torture/pr51106-1.c: New test.
- * gcc.dg/torture/pr51106-2.c: New test.
+ PR sanitizer/59897
+ * c-c++-common/asan/use-after-return-1.c: Fixed
+ to pass on darwin.
-2012-01-19 Kai Tietz <ktietz@redhat.com>
+2014-01-23 Dodji Seketeli <dodji@redhat.com>
- * g++.dg/torture/pr51344.C: New test.
+ PR preprocessor/58580
+ * c-c++-common/cpp/warning-zero-in-literals-1.c: New test file.
-2012-01-19 Tobias Burnus <burnus@net-b.de>
+2014-01-23 Kirill Yukhin <kirill.yukhin@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
- PR fortran/51904
- * gfortran.dg/intrinsic_size_2.f90: New.
+ * gcc.target/i386/avx512f-kmovw-1.c: New.
-2012-01-19 Jason Merrill <jason@redhat.com>
+2014-01-23 Kirill Yukhin <kirill.yukhin@intel.com>
- PR c++/51889
- * g++.dg/inherit/using7.C: New.
+ * gcc.target/i386/avx512f-vmovdqu32-1.c: Fix intrinsic name.
+ * gcc.target/i386/avx512f-vmovdqu32-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpuq-2.c: Ditto.
-2012-01-19 Richard Guenther <rguenther@suse.de>
+2014-01-23 Richard Sandiford <rdsandiford@googlemail.com>
- PR tree-optimization/37997
- * gcc.dg/tree-ssa/ssa-pre-28.c: New testcase.
+ PR target/52125
+ * gcc.dg/pr48774.c: Remove skip for mips_rel.
+ * gcc.target/mips/pr52125.c: New test.
-2012-01-19 Andrey Belevantsev <abel@ispras.ru>
+2014-01-22 Marek Polacek <polacek@redhat.com>
- PR rtl-optimization/51505
- * gcc.dg/pr51505.c: New test.
+ PR c/59891
+ * gcc.dg/torture/pr59891.c: New test.
-2012-01-18 Paul Thomas <pault@gcc.gnu.org>
+2014-01-22 Jeff Law <law@redhat.com>
- PR fortran/51634
- * gfortran.dg/typebound_operator_12.f03: New.
- * gfortran.dg/typebound_operator_13.f03: New.
+ PR tree-optimization/59597
+ * gcc.dg/tree-ssa/pr59597.c: New test.
-2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
+2014-01-22 Vladimir Makarov <vmakarov@redhat.com>
- PR c++/51225
- * g++.dg/cpp0x/pr51225.C: New.
+ PR rtl-optimization/59477
+ * g++.dg/pr59477.C: New.
-2012-01-17 Ian Lance Taylor <iant@google.com>
+2014-01-22 Richard Sandiford <rdsandiford@googlemail.com>
- PR go/50656
- * go.test/go-test.exp (go-gc-tests): Recognize some more test lines.
+ * gcc.dg/pr44194-1.c: Match "insn " and "insn:", but not "insn/f".
-2012-01-17 Tobias Burnus <burnus@net-b.de>
+2014-01-22 Ville Voutilainen <ville.voutilainen@gmail.com>
- PR fortran/51869
- * gfortran.dg/realloc_on_assign_9.f90: New.
+ PR c++/59482
+ * g++.dg/pr59482.C: New.
-2012-01-17 Aldy Hernandez <aldyh@redhat.com>
+2014-01-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
- PR other/51165
- * gcc.dg/tm/memopt-3.c: Remove xfail.
- * gcc.dg/tm/memopt-4.c: Remove xfail.
- * gcc.dg/tm/memopt-5.c: Remove xfail.
- * gcc.dg/tm/memopt-7.c: Remove xfail.
+ * gcc.dg/vmx/insert-vsx-be-order.c: New.
+ * gcc.dg/vmx/extract-vsx.c: New.
+ * gcc.dg/vmx/extract-vsx-be-order.c: New.
+ * gcc.dg/vmx/insert-vsx.c: New.
-2012-01-17 Jakub Jelinek <jakub@redhat.com>
+2014-01-21 Vladimir Makarov <vmakarov@redhat.com>
- PR tree-optimization/51877
- * gcc.c-torture/execute/pr51877.c: New test.
+ PR rtl-optimization/59896
+ * gcc.target/arm/pr59896.c: New.
-2012-01-17 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+2014-01-21 Vladimir Makarov <vmakarov@redhat.com>
- * gcc.dg/vect/no-section-anchors-vect-69.c: Change
- {!vect_align_arrays} to vect_sizes_32B_16B.
- * gcc.dg/vect/vect-multitypes-1.c: Ditto.
- * gcc.dg/vect/vect-peel-3.c: Ditto.
+ PR rtl-optimization/59858
+ * gcc.target/arm/pr59858.c: New.
-2012-01-16 Jason Merrill <jason@redhat.com>
+2014-01-21 Jakub Jelinek <jakub@redhat.com>
- PR c++/51854
- * g++.dg/abi/mangle60.C: New.
+ PR target/59003
+ * gcc.dg/tree-prof/pr59003.c: New test.
- PR c++/51827
- * g++.dg/pch/mangle1.{C,Hs}: New.
+ PR middle-end/59860
+ * gcc.dg/strlenopt-4.c: Expect the same counts on s390*-* as on all
+ other targets.
-2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
- Tobias Burnus <burnus@net-b.de>
+2014-01-20 Dominique d'Humieres <dominiq@lps.ens.fr>
- PR fortran/50981
- * gfortran.dg/elemental_optional_args_3.f90: New
- * gfortran.dg/elemental_optional_args_4.f90: New
+ * gfortran.dg/round_3.f08: Add more cases.
-2012-01-16 Tobias Burnus <burnus@net-b.de>
+2014-01-20 Richard Sandiford <rdsandiford@googlemail.com>
- PR fortran/51809
- * gfortran.dg/use_20.f90: New
+ * lib/target-supports.exp (force_conventional_output_for): New
+ procedure.
+ * lib/scanasm.exp (scan-assembler_required_options)
+ (scan-assembler-not_required_options)
+ (scan-assembler-times_required_options): Replace with
+ force_conventional_output_fors.
+ * lib/scanrtl.exp: Force conventional output for all rtl dump scans.
+ * gcc.target/mips/octeon-pipe-1.c: Remove -ffat-lto-objects.
-2012-01-16 Jason Merrill <jason@redhat.com>
+2014-01-20 H.J. Lu <hongjiu.lu@intel.com>
- PR c++/51868
- * g++.dg/cpp0x/rv-bitfield.C: New.
- * g++.dg/cpp0x/rv-bitfield2.C: New.
+ PR middle-end/59789
+ * gcc.target/i386/pr59789.c: New testcase.
-2012-01-16 Paul Thomas <pault@gcc.gnu.org>
+2014-01-20 Yufeng Zhang <yufeng.zhang@arm.com>
- * gfortran.dg/class_array_3.f03: Remove the explicit loop in
- subroutine 'qsort' and use index array to assign the result.
+ * g++.dg/debug/ra1.C (struct tree_base): Change the width of
+ the 'code' bitfield from 16 to 8.
-2012-01-16 Jakub Jelinek <jakub@redhat.com>
+2014-01-20 Alex Velenko <Alex.Velenko@arm.com>
- PR tree-optimization/51865
- * gcc.dg/pr51865.c: New test.
+ * lib/target-supports.exp
+ (check_effective_target_vect_perm): Exclude aarch64_be.
+ (check_effective_target_vect_perm_byte): Likewise.
+ (check_effective_target_vect_perm_short): Likewise.
-2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
+2014-01-20 Alex Velenko <Alex.Velenko@arm.com>
- * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Expect 4 threaded edges for MIPS.
+ * gcc.target/aarch64/vneg_f.c (STORE_INST): New macro.
+ (RUN_TEST): Use new macro.
+ (INDEX64_32): Delete.
+ (INDEX64_64): Likewise.
+ (INDEX128_32): Likewise.
+ (INDEX128_64): Likewise.
+ (INDEX): Likewise.
+ (test_vneg_f32): Use fixed RUN_TEST.
-2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
+2014-01-20 Richard Biener <rguenther@suse.de>
- * gcc.target/mips/code-readable-2.c: Allow the jump table address
- to be loaded from the constant pool, rather than via %hi and %lo.
+ PR middle-end/59860
+ * gcc.dg/pr59860.c: New testcase.
-2012-01-15 Uros Bizjak <ubizjak@gmail.com>
+2014-01-20 Jakub Jelinek <jakub@redhat.com>
- PR rtl-optimization/51821
- * gcc.dg/pr51821.c: New test.
+ PR target/59880
+ * gcc.target/i386/pr59880.c: New test.
-2012-01-15 Andreas Schwab <schwab@linux-m68k.org>
+2014-01-20 Renlin Li <renlin.li@arm.com>
- * gcc.dg/torture/pr8081.c: Fix char signedness assumption.
+ * gcc.dg/pr44194-1.c: Tweak regexp.
-2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
+2014-01-19 Steven G. Kargl <kargl@gcc.gnu.org>
- * g++.dg/cpp0x/constexpr-rom.C: Add -G0 where applicable.
+ PR libfortran/59771
+ PR libfortran/59774
+ PR libfortran/59836
+ * gfortran.dg/round_3.f08: New cases added.
+ * gfortran.dg/fmt_g_1.f90: New test.
-2012-01-14 Tobias Burnus <burnus@net-b.de>
+2014-01-19 Uros Bizjak <ubizjak@gmail.com>
- PR fortran/51800
- * gfortran.dg/init_flag_8.f90: New.
- * gfortran.dg/init_flag_9.f90: New.
+ * g++.dg/pr49718.C: Add "-mno-explicit-relocs" for alpha*-*-* targets.
-2011-01-14 Tobias Burnus <burnus@net-b.de>
+2014-01-19 Richard Sandiford <rdsandiford@googlemail.com>
- PR fortran/51816
- * gfortran.dg/use_18.f90: New.
- * gfortran.dg/use_19.f90: New.
+ * gcc.target/mips/pr54240.c: Add -ffat-lto-objects.
-2012-01-13 Ian Lance Taylor <iant@google.com>
+2014-01-19 Richard Sandiford <rdsandiford@googlemail.com>
- PR c++/50012
- * g++.dg/warn/Wsign-compare-4.C: New.
+ * gcc.dg/vect/pr57705.c: Require vect_int.
+ * gcc.dg/vect/pr58508.c: Fix order of dg-require-effective-target line.
+ * gcc.dg/vect/vect-alias-check.c: Likewise.
-2012-01-13 Paul Thomas <pault@gcc.gnu.org>
+2014-01-18 Mikael Morin <mikael@gcc.gnu.org>
- PR fortran/48351
- * gfortran.dg/alloc_comp_assign.f03: New.
- * gfortran.dg/allocatable_scalar_9.f90: Reduce count of
- __BUILTIN_FREE from 38 to 32.
+ PR fortran/58007
+ * gfortran.dg/unresolved_fixup_1.f90: New test.
+ * gfortran.dg/unresolved_fixup_2.f90: New test.
-2012-01-13 Jason Merrill <jason@redhat.com>
+2014-01-18 Jakub Jelinek <jakub@redhat.com>
- PR c++/20681
- * g++.dg/warn/Wreturn-type-7.C: New.
+ PR target/58944
+ * gcc.target/i386/pr58944.c: Drop -march=native from dg-options.
+ Remove dg-prune-output lines.
-2012-01-13 Georg-Johann Lay <avr@gjlay.de>
+2014-01-17 Jakub Jelinek <jakub@redhat.com>
- * gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
- assumption.
- * g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
- * gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
- * gcc.dg/cpp/warn-multichar-2.c: Ditto.
- * gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
- int32plus because of big array needed.
- * gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
- * gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy.
+ PR middle-end/59706
+ * gfortran.dg/pr59706.f90: New test.
+ * g++.dg/ext/pr59706.C: New test.
-2012-01-13 Jason Merrill <jason@redhat.com>
+2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
- PR c++/51813
- * g++.dg/ext/visibility/template9.C: New.
+ PR c++/59270
+ PR c++/58811
+ * g++.dg/cpp0x/decltype-incomplete1.C: New.
+ * g++.dg/init/pr58811.C: Likewise.
- PR c++/51620
- * g++.dg/cpp0x/defaulted34.C: New.
- * g++.dg/template/virtual3.C: New.
+2014-01-17 Jeff Law <law@redhat.com>
-2012-01-13 Richard Guenther <rguenther@suse.de>
+ PR middle-end/57904
+ * gfortran.dg/pr57904.f90: New test.
- PR middle-end/8081
- * gcc.dg/torture/pr8081.c: New testcase.
+2014-01-17 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-13 Georg-Johann Lay <avr@gjlay.de>
+ PR c++/59269
+ * g++.dg/cpp0x/nsdmi-union4.C: New.
- * gcc.dg/pr46309.c: Set branch cost to greater 1 for avr.
+2014-01-17 Marek Polacek <polacek@redhat.com>
-2012-01-12 Jason Merrill <jason@redhat.com>
+ PR c++/59838
+ * g++.dg/diagnostic/pr59838.C: New test.
- PR c++/51714
- * g++.dg/ext/stmtexpr14.C: New.
+2014-01-17 Marek Polacek <polacek@redhat.com>
-2012-01-13 Dodji Seketeli <dodji@redhat.com>
+ PR c/58346
+ * gcc.dg/pr58346.c: New test.
- PR c++/51633
- * g++.dg/cpp0x/constexpr-diag4.C: New test.
+2014-01-17 Jakub Jelinek <jakub@redhat.com>
-2012-01-12 Jason Merrill <jason@redhat.com>
+ PR testsuite/58776
+ * gcc.dg/tree-ssa/gen-vect-32.c: Add -fno-vect-cost-model to
+ dg-options, use dg-additional-options for i?86/x86_64 to avoid
+ option duplication.
- PR c++/48051
- * g++.dg/abi/mangle48.C: Test qualified-names, too.
- * g++.dg/abi/mangle58.C: Likewise.
+ PR fortran/59440
+ * gfortran.dg/pr59440-1.f90: New test.
+ * gfortran.dg/pr59440-2.f90: New test.
+ * gfortran.dg/pr59440-3.f90: New test.
- PR c++/51403
- * g++.dg/template/arg8.C: New.
+ PR testsuite/59064
+ * gcc.dg/vect/vect-ivdep-1.c: Replace two dg-bogus lines separately
+ testing for " version" and " alias" with one testing for
+ " version\[^\n\r]* alias".
+ * gcc.dg/vect/vect-ivdep-2.c: Likewise.
+ * gfortran.dg/vect/vect-do-concurrent-1.f90: Likewise.
+ * g++.dg/vect/pr33426-ivdep.cc: Likewise.
+ * g++.dg/vect/pr33426-ivdep-2.cc: Likewise.
+ * g++.dg/vect/pr33426-ivdep-3.cc: Likewise.
+ * g++.dg/vect/pr33426-ivdep-4.cc: Adjust comments similarly.
-2012-01-12 Ira Rosen <irar@il.ibm.com>
+ PR c++/57945
+ * c-c++-common/torture/pr57945.c: New test.
- PR tree-optimization/51799
- * gcc.dg/vect/pr51799.c: New test.
- * gcc.dg/vect/vect-widen-shift-u8.c: Expect two widening shift
- patterns.
+2014-01-17 Zhenqiang Chen <zhenqiang.chen@arm.com>
-2012-01-12 Dominique d'Humieres <dominiq@lps.ens.fr>
- Tobias Burnus <burnus@net-b.de>
+ * gcc.target/arm/its.c: New testcase.
- PR fortran/51057
- PR fortran/51616
- * lib/target-supports.exp
- (check_effective_target_fortran_largest_fp_has_sqrt): New.
- * gfortran.dg/quad_2.f90: Use it, add pattern for IBM's real(16).
+2014-01-16 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/59775
+ * g++.dg/torture/pr59775.C: New testcase.
+
+2014-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58344
+ * gcc.c-torture/compile/pr58344.c: New test.
+
+ PR target/59839
+ * gcc.target/i386/pr59839.c: New test.
+
+ PR debug/54694
+ * gcc.target/i386/pr9771-1.c (main): Rename to...
+ (real_main): ... this. Add __asm name "main".
+ (ASMNAME, ASMNAME2, STRING): Define.
+
+2014-01-16 Nick Clifton <nickc@redhat.com>
+
+ PR middle-end/28865
+ * gcc.c-torture/compile/pr28865.c: New.
+ * gcc.c-torture/execute/pr28865.c: New.
+
+2014-01-16 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/59827
+ * gcc.dg/pr59827.c: New test.
+
+2014-01-16 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.c-torture/execute/pr59747.c (fn1): Return a value.
+
+2014-01-15 Richard Henderson <rth@redhat.com>
-2012-01-11 Jason Merrill <jason@redhat.com>
+ PR debug/54694
+ * gcc.target/i386/pr54694.c: New test.
- PR c++/51565
- * g++.dg/ext/attrib42.C: New.
+2014-01-15 Laurent Alfonsi <laurent.alfonsi@st.com>
-2012-01-11 Jakub Jelinek <jakub@redhat.com>
+ PR c++/49718
+ * g++.dg/pr49718.C: New test.
- PR bootstrap/51796
- * gcc.dg/pr51796.c: New test.
+2014-01-15 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-11 Jason Merrill <jason@redhat.com>
+ * gcc.target/mips/umips-branch-4.c: Add addressing=absolute.
- PR c++/51818
- * g++.dg/cpp0x/lambda/lambda-mangle3.C: New.
+2014-01-15 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
-2012-01-11 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.dg/vmx/mult-even-odd.c: New.
+ * gcc.dg/vmx/mult-even-odd-be-order.c: New.
- * gnat.dg/array19.ad[sb]: New test.
+2014-01-15 Balaji V. Iyer <balaji.v.iyer@intel.com>
-2012-01-11 Eric Botcazou <ebotcazou@adacore.com>
+ * lib/target-supports.exp (check_libcilkrts_available): Added an
+ extern "C" if we are using C++ along with a function prototype.
- * gnat.dg/opt23.ad[sb]: New test.
- * gnat.dg/opt23_pkg.ad[sb]: New helper.
- * gnat.dg/opt24.ad[sb]: New test.
+2014-01-15 Jeff Law <law@redhat.com>
-2012-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ PR tree-optimization/59747
+ * gcc.c-torture/execute/pr59747.c: New test.
- PR tree-optimization/49642
- * gcc.dg/tree-ssa/pr49642-1.c: New test.
- * gcc.dg/tree-ssa/pr49642-2.c: New test.
+2014-01-15 H.J. Lu <hongjiu.lu@intel.com>
-2012-01-11 Jason Merrill <jason@redhat.com>
+ PR target/59794
+ * c-c++-common/convert-vec-1.c: Also prune ABI change for
+ Linux/x86.
+ * g++.dg/cpp0x/constexpr-53094-2.C: Likewise.
+ * g++.dg/ext/attribute-test-1.C: Likewise.
+ * g++.dg/ext/attribute-test-2.C: Likewise.
+ * g++.dg/ext/attribute-test-3.C: Likewise.
+ * g++.dg/ext/attribute-test-4.C: Likewise.
+ * g++.dg/ext/pr56790-1.C: Likewise.
+ * g++.dg/torture/pr38565.C: Likewise.
+ * gcc.dg/pr53060.c: Likewise.
+ * c-c++-common/scal-to-vec2.c: Add -msse2 for x86.
+ * c-c++-common/vector-compare-2.c: Likewise.
+ * gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c: Likewise.
+ * g++.dg/conversion/simd1.C: Add -msse2 for x86. Adjust
+ dg-message line number.
- PR c++/51613
- * g++.dg/template/explicit-args5.C: New.
+2014-01-15 Matthias Klose <doko@ubuntu.com>
-2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+ * go.test/go-test.exp: Set goarch for aarch64*-*-*.
- * gcc.c-torture/execute/20120110-1.c: New testcase.
+2014-01-15 Richard Biener <rguenther@suse.de>
-2012-01-10 Jason Merrill <jason@redhat.com>
+ PR tree-optimization/59822
+ * g++.dg/torture/pr59822.C: New testcase.
- PR c++/51614
- * g++.dg/inherit/ambig1.C: New.
+2014-01-15 Kirill Yukhin <kirill.yukhin@intel.com>
- PR c++/51433
- * g++.dg/cpp0x/constexpr-cache1.C: New.
+ PR target/59808
+ * gcc.target/i386/sse-12.c: Add `-mavx512[cd, er, pf]' options.
+ * gcc.target/i386/sse-14.c: Update constants avx512erintrin.h tests.
-2012-01-10 Richard Guenther <rguenther@suse.de>
+2014-01-15 Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>
+ Kugan Vivekanandarajah <kuganv@linaro.org>
- PR tree-optimization/51801
- * gcc.dg/torture/pr51801.c: New testcase.
+ PR target/59695
+ * g++.dg/pr59695.C: New testcase.
-2012-01-10 Tobias Burnus <burnus@net-b.de>
+2014-01-15 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
- PR fortran/51652
- * gfortran.dg/allocate_with_typespec_5.f90: New.
+ PR target/59803
+ * gcc.c-torture/compile/pr59803.c: New testcase.
-2012-01-10 Tobias Burnus <burnus@net-b.de>
+2014-01-15 Jakub Jelinek <jakub@redhat.com>
- * gfortran.dg/class_39.f03: Update dg-error string.
+ PR c/58943
+ * gcc.c-torture/execute/pr58943.c: New test.
+ * gcc.dg/tree-ssa/ssa-fre-33.c (main): Avoid using += in the test.
-2012-01-10 Richard Guenther <rguenther@suse.de>
+2014-01-14 H.J. Lu <hongjiu.lu@intel.com>
- PR tree-optimization/50913
- * gcc.dg/graphite/interchange-16.c: New testcase.
- * gcc.dg/graphite/scop-20.c: XFAIL.
- * gfortran.dg/graphite/interchange-1.f: Likewise.
- * gfortran.dg/graphite/block-1.f90: Likewise.
- * gfortran.dg/graphite/block-2.f: Likewise.
+ PR target/59794
+ * g++.dg/ext/vector23.C: Also prune ABI change for Linux/x86.
+ * gcc.target/i386/pr39162.c (y): New __m256i variable.
+ (bar): Change return type to void. Set y to x.
+ * gcc.target/i386/pr59794-1.c: New testcase.
+ * gcc.target/i386/pr59794-2.c: Likewise.
+ * gcc.target/i386/pr59794-3.c: Likewise.
+ * gcc.target/i386/pr59794-4.c: Likewise.
+ * gcc.target/i386/pr59794-5.c: Likewise.
+ * gcc.target/i386/pr59794-6.c: Likewise.
+ * gcc.target/i386/pr59794-7.c: Likewise.
-2012-01-10 Richard Henderson <rth@redhat.com>
+2014-01-14 Richard Biener <rguenther@suse.de>
- * lib/target-supports.exp (check_effective_target_vect_perm,
- check_effective_target_vect_perm_byte,
- check_effective_target_vect_perm_short): Enable for arm neon.
+ PR tree-optimization/58921
+ PR tree-optimization/59006
+ * gcc.dg/torture/pr58921.c: New testcase.
+ * gcc.dg/torture/pr59006.c: Likewise.
+ * gcc.dg/vect/pr58508.c: XFAIL no longer handled cases.
+
+2014-01-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/59494
+ * gfortran.dg/vect/fast-math-mgrid-resid.f: Change
+ -fdump-tree-optimized to -fdump-tree-pcom-details in dg-options and
+ cleanup-tree-dump from optimized to pcom. Remove scan-tree-dump-times
+ for vect_\[^\\n\]*\\+, add scan-tree-dump-times for no suitable
+ chains and Executing predictive commoning without unrolling.
+
+2014-01-14 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/avx-1.c: Fix __builtin_ia32_exp2ps_mask,
+ __builtin_ia32_exp2pd_mask, __builtin_ia32_rcp28ps_mask,
+ __builtin_ia32_rcp28pd_mask, __builtin_ia32_rsqrt28ps_mask,
+ __builtin_ia32_rsqrt28pd_mask. Add __builtin_ia32_rcp28ss_round,
+ __builtin_ia32_rcp28sd_round, __builtin_ia32_rsqrt28ss_round,
+ __builtin_ia32_rsqrt28sd_round.
+ * gcc.target/i386/avx512er-vexp2pd-1.c: Fix rounding mode.
+ * gcc.target/i386/avx512er-vexp2ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28pd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28pd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28sd-1.c: New.
+ * gcc.target/i386/avx512er-vrcp28sd-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28ss-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28ss-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28sd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28sd-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28ss-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntdqa-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntdqa-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-2.c: Fix.
+ * gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.
+ * gcc.target/i386/sse-22.c: Extend with new built-ins,
+ fix wrong rounding mode (see above).
+ * gcc.target/i386/sse-23.c: Ditto.
+
+2014-01-13 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vmx/insert.c: New.
+ * gcc.dg/vmx/insert-be-order.c: New.
+ * gcc.dg/vmx/extract.c: New.
+ * gcc.dg/vmx/extract-be-order.c: New.
+
+2014-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59387
+ * gcc.c-torture/execute/pr59387.c: New test.
+
+2014-01-13 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/lto/lto.exp: Do check_effective_target_lto check before
+ adjusting mathlib options.
+ * gfortran.dg/lto/lto.exp: Likewise.
+
+2014-01-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization17.adb: New test.
+ * gnat.dg/loop_optimization17_pkg.ad[sb]: New helper.
+
+2014-01-13 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.target/sh/cmpstrn.c: New case.
+
+2014-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vect/vect-simd-clone-10.c: Add dg-do run.
+ * gcc.dg/vect/vect-simd-clone-12.c: Likewise.
+
+2014-01-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58026
+ * gfortran.dg/alloc_comp_basics_6.f90: New.
+
+2014-01-11 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/59700
+ * gfortran.dg/pr59700.f90: New test.
+
+2014-01-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gfortran.dg/binding_label_tests_10_main.f03: Cleanup mod file.
+ * gfortran.dg/use_only_3.f90: Likewise.
+ * gfortran.dg/inquire_10.f90: Delete opened file.
+ * gfortran.dg/inquire_15.f90: Likewise.
+ * gfortran.dg/pr16597.f90: Likewise.
+ * gfortran.dg/open_negative_unit_1.f90: Likewise + test
+ for PR59419.
+
+2014-01-10 Jeff Law <law@redhat.com>
+
+ PR middle-end/59743
+ * gcc.c-torture/compile/pr59743.c: New test.
+
+2014-01-10 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/58585
+ * g++.dg/torture/pr58585.C: New testcase.
+
+2014-01-10 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/pr46309.c: Disable for cris*-*-*.
+
+2014-01-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/arm/neon-nested-apcs.c: Tweak dg directives.
+
+2014-01-10 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/59744
+ * gcc.target/aarch64/cmn-neg.c: Use equality comparisons.
+ * gcc.target/aarch64/cmn-neg2.c: New test.
+
+2014-01-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59374
+ * gcc.dg/torture/pr59374-3.c: New testcase.
+
+2014-01-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_crypto_ok_nocache): New.
+ (check_effective_target_arm_crypto_ok): Use above procedure.
+ (add_options_for_arm_crypto): Use et_arm_crypto_flags.
-2012-01-09 Tobias Burnus <burnus@net-b.de>
+2014-01-10 Jan Hubicka <hubicka@ucw.cz>
- PR fortran/46328
- * gfortran.dg/typebound_operator_11.f90: New.
+ PR ipa/58252
+ PR ipa/59226
+ * g++.dg/ipa/devirt-20.C: New testcase.
+ * g++.dg/torture/pr58252.C: Likewise.
+ * g++.dg/torture/pr59226.C: Likewise.
-2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
+2014-01-10 Max Ostapenko <m.ostapenko@partner.samsung.com>
- * gnat.dg/array18.adb: New test.
- * gnat.dg/array18_pkg.ads: New helper.
+ * c-c++-common/asan/no-asan-stack.c: New test.
-2012-01-09 Paul Thomas <pault@gcc.gnu.org>
+2014-01-10 Jakub Jelinek <jakub@redhat.com>
- PR fortran/51791
- * gfortran.dg/typebound_operator_7.f03: Insert parentheses
- around base object in first assignment in main program.
- * gfortran.dg/typebound_operator_10.f03: New test.
+ PR middle-end/59670
+ * gcc.dg/pr59670.c: New test.
-2012-01-09 Martin Jambor <mjambor@suse.cz>
+2014-01-09 Steve Ellcey <sellcey@mips.com>
- PR tree-optimization/51759
- * g++.dg/ipa/pr51759.C: New test.
+ * gcc.dg/delay-slot-1.c: Restrict -mabi=64 to 64 bit processors.
-2012-01-09 Tobias Burnus <burnus@net-b.de>
+2014-01-09 Jakub Jelinek <jakub@redhat.com>
- PR fortran/51758
- * gfortran.dg/optional_absent_2.f90: New.
+ PR middle-end/47735
+ * gcc.target/i386/pr47735.c: New test.
-2012-01-09 Tobias Burnus <burnus@net-b.de>
+ PR tree-optimization/59622
+ * g++.dg/opt/pr59622-2.C: New test.
+ * g++.dg/opt/pr59622-3.C: New test.
+ * g++.dg/opt/pr59622-4.C: New test.
+ * g++.dg/opt/pr59622-5.C: New test.
- PR fortran/51578
- * gfortran.dg/use_17.f90: New.
+ PR sanitizer/59136
+ * c-c++-common/asan/strip-path-prefix-1.c: Allow also the
+ filename:line instead of (modulename+offset) form with stripped
+ initial / from the filename.
-2012-01-09 Gary Funck <gary@intrepid.com>
+2014-01-09 Ian Lance Taylor <iant@google.com>
- PR preprocessor/33919
- * gcc.dg/pr33919.c: New test.
- * gcc.dg/pr33919-0.h: New test header file.
- * gcc.dg/pr33919-1.h: Ditto.
- * gcc.dg/pr33919-2.h: Ditto.
+ * go.test/go-test.exp (go-gc-tests): Skip nilptr tests that test
+ the other Go compiler.
-2012-01-07 Jan Hubicka <jh@suse.cz>
+2014-01-09 Paolo Carlini <paolo.carlini@oracle.com>
- PR tree-optimize/51694
- * gcc.c-torture/compile/pr51694.c: new testcase.
+ PR c++/59730
+ * g++.dg/cpp0x/variadic145.C: New.
-2012-01-07 Jan Hubicka <jh@suse.cz>
+2014-01-09 Uros Bizjak <ubizjak@gmail.com>
- PR tree-optimization/51600
- * g++.dg/torture/pr51600.C: New testcase.
+ * go.test/go-test.exp (go-gc-tests): Don't run peano.go on systems
+ which don't support -fsplit-stack. Skip rotate[0123].go tests.
-2012-01-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
- PR gcov-profile/51715
- PR gcov-profile/51717
- * gcc.misc-tests/gcov-13.c: Skip on 32-bit hppa*-*-hpux*.
- * gcc.misc-tests/gcov-14.c: Likewise.
+ PR testsuite/59524
+ * gcc.dg/cilk-plus/cilk-plus.exp: Make sure the cilk keywords tests
+ are run only if the Cilk library is available/enabled.
+ * g++.dg/cilk-plus/cilk-plus.exp: Likewise.
+ * lib/target-supports.exp (check_libcilkrts_available): New function.
-2012-01-06 Jason Merrill <jason@redhat.com>
+2014-01-09 Balaji V. Iyer <balaji.v.iyer@intel.com>
- * g++.dg/parse/new5.C: New.
+ PR c++/59631
+ * gcc.dg/cilk-plus/cilk-plus.exp: Removed "-fcilkplus" from flags list.
+ * g++.dg/cilk-plus/cilk-plus.exp: Likewise.
+ * c-c++-common/cilk-plus/CK/spawnee_inline.c: Replaced second dg-option
+ with dg-additional-options.
+ * c-c++-common/cilk-plus/CK/varargs_test.c: Likewise.
+ * c-c++-common/cilk-plus/CK/steal_check.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawning_arg.c: Likewise.
+ * c-c++-common/cilk-plus/CK/invalid_spawns.c: Added a dg-options tag.
+ * c-c++-common/cilk-plus/CK/pr59631.c: New testcase.
-2012-01-06 Patrick Marlier <patrick.marlier@gmail.com>
+2014-01-09 Richard Biener <rguenther@suse.de>
- PR testsuite/51655
- * c-c++-common/tm/memcpy-1.c: Declare memcpy instead of
- including <string.h>.
+ PR tree-optimization/59715
+ * gcc.dg/torture/pr59715.c: New testcase.
-2012-01-06 Jason Merrill <jason@redhat.com>
+2014-01-09 Max Ostapenko <m.ostapenko@partner.samsung.com>
- * g++.dg/abi/mangle51.C: New.
- * g++.dg/abi/mangle52.C: New.
- * g++.dg/abi/mangle53.C: New.
- * g++.dg/abi/mangle54.C: New.
- * g++.dg/abi/mangle55.C: New.
- * g++.dg/abi/mangle56.C: New.
- * g++.dg/abi/mangle57.C: New.
- * g++.dg/abi/mangle58.C: New.
- * g++.dg/abi/mangle59.C: New.
- * g++.dg/cpp0x/trailing3.C: Update mangling.
- * g++.dg/cpp0x/variadic111.C: Update mangling.
- * g++.dg/cpp0x/variadic4.C: Update mangling.
- * g++.dg/cpp0x/variadic42.C: Pass -fabi-version=5.
- * g++.dg/template/nontype22.C: Works now.
- * g++.dg/template/pr35240.C: Works now.
+ * c-c++-common/asan/no-asan-globals.c: New test.
+ * c-c++-common/asan/no-instrument-reads.c: Likewise.
+ * c-c++-common/asan/no-instrument-writes.c: Likewise.
+ * c-c++-common/asan/use-after-return-1.c: Likewise.
+ * c-c++-common/asan/no-use-after-return.c: Likewise.
- * g++.dg/cpp0x/error7.C: New.
+2014-01-08 Eric Botcazou <ebotcazou@adacore.com>
-2012-01-06 Tobias Burnus <burnus@net-b.de>
+ * gnat.dg/weak2.ad[sb]: New test.
- * gfortran.dg/deallocate_stat_2.f90: New.
- * coarray/allocate_errgmsg.f90: New.
- * gfortran.dg/coarray_lib_alloc_1.f90: New.
- * gfortran.dg/coarray_lib_alloc_2.f90: New.
- * coarray/subobject_1.f90: Fix for num_images > 1.
- * gfortran.dg/deallocate_stat.f90: Update due to changed
- stat= handling.
+2014-01-08 Jakub Jelinek <jakub@redhat.com>
-2012-01-06 Andrew Stubbs <ams@codesourcery.com>
+ PR middle-end/59471
+ * gcc.dg/pr59471.c (foo): Avoid vector type arguments or return
+ type, use pointers to vector type instead.
- * gcc.target/arm/headmerge-2.c: Adjust scan pattern.
+2014-01-08 Catherine Moore <clm@codesourcery.com>
-2012-01-06 Eric Botcazou <ebotcazou@adacore.com>
+ * gcc.target/mips/umips-branch-3.c: New test.
+ * gcc.target/mips/umips-branch-4.c: New test.
- * ada/acats/overflow.lst: Add cb20004.
+2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-05 Dodji Seketeli <dodji@redhat.com>
+ * gcc.dg/tree-ssa/reassoc-32.c, gcc.dg/tree-ssa/reassoc-33.c,
+ gcc.dg/tree-ssa/reassoc-34.c, gcc.dg/tree-ssa/reassoc-35.c,
+ gcc.dg/tree-ssa/reassoc-36.c: Extend -mbranch-cost handling to MIPS.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c,
+ gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c,
+ gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c,
+ gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c,
+ gcc.dg/tree-ssa/vrp87.c, gcc.dg/tree-ssa/forwprop-28.c: Skip for MIPS.
- PR c++/51541
- * g++.dg/cpp0x/alias-decl-18.C: New test.
+2014-01-08 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
+ PR rtl-optimization/59137
+ * gcc.target/mips/pr59137.c: New test.
- * gcc.c-torture/execute/20120104-1.c: New test.
+2014-01-08 Uros Bizjak <ubizjak@gmail.com>
-2012-01-05 Paul Thomas <pault@gcc.gnu.org>
+ * gcc.target/i386/asm-1.c (dg-options): Remove -m32.
+ * gcc.target/i386/incoming-5.c (dg-options): Ditto.
+ * gcc.target/i386/pr55433.c (dg-options): Ditto.
+ * gcc.target/i386/pr57848.c (dg-options): Ditto.
+ * gcc.target/i386/pr59099.c (dg-options): Ditto.
+ Require fpic effective target.
+ * gcc.target/i386/pr56246.c (dg-do): Compile for fpic target only.
- PR fortran/PR48946
- * gfortran.dg/typebound_operator_9.f03: This is now a copy of
- the old typebound_operator_8.f03.
- * gfortran.dg/typebound_operator_8.f03: New version of
- typebound_operator_7.f03 with 'u' a derived type instead of a
- class object.
+2014-01-08 Jakub Jelinek <jakub@redhat.com>
-2012-01-05 Richard Guenther <rguenther@suse.de>
+ PR ipa/59722
+ * gcc.dg/pr59722.c: New test.
- * g++.dg/torture/pr49309.C: Skip for -flto.
+2014-01-08 Bernd Edlinger <bernd.edlinger@hotmail.de>
-2012-01-05 Jakub Jelinek <jakub@redhat.com>
+ PR middle-end/57748
+ * gcc.dg/torture/pr57748-3.c: New test.
+ * gcc.dg/torture/pr57748-4.c: New test.
- PR middle-end/51761
- * gcc.c-torture/compile/pr51761.c: New test.
+2014-01-08 Marek Polacek <polacek@redhat.com>
-2012-01-05 Richard Guenther <rguenther@suse.de>
+ PR middle-end/59669
+ * gcc.dg/gomp/pr59669-1.c: New test.
+ * gcc.dg/gomp/pr59669-2.c: New test.
- PR tree-optimization/51760
- * gcc.dg/torture/pr51760.c: New testcase.
+2014-01-08 Martin Jambor <mjambor@suse.cz>
-2012-01-05 Aldy Hernandez <aldyh@redhat.com>
+ PR ipa/59610
+ * gcc.dg/ipa/pr59610.c: New test.
- PR middle-end/51472
- * gcc.dg/tm/memopt-6.c: Adjust regexp.
+2014-01-08 Janus Weil <janus@gcc.gnu.org>
-2012-01-05 Richard Guenther <rguenther@suse.de>
+ PR fortran/58182
+ * gfortran.dg/binding_label_tests_26a.f90: New.
+ * gfortran.dg/binding_label_tests_26b.f90: New.
- PR lto/41576
- * gfortran.dg/lto/pr41576_0.f90: New testcase.
- * gfortran.dg/lto/pr41576_1.f90: Likewise.
+2014-01-08 Marek Polacek <polacek@redhat.com>
-2012-01-04 Jakub Jelinek <jakub@redhat.com>
+ PR sanitizer/59667
+ * c-c++-common/ubsan/pr59667.c: New test.
- PR debug/51695
- * gcc.dg/pr51695.c: New test.
+2014-01-08 Richard Biener <rguenther@suse.de>
-2012-01-04 Andrew Pinski <apinski@cavium.com>
+ PR middle-end/59630
+ * gcc.dg/pr59630.c: New testcase.
- * gcc.target/mips/mips64-dsp-ldx1.c: New test.
- * gcc.target/mips/octeon2-lx-1.c: New test.
- * gcc.target/mips/mips64-dsp-ldx.c: New test.
- * gcc.target/mips/octeon2-lx-2.c: New test.
- * gcc.target/mips/octeon2-lx-3.c: New test.
+2014-01-08 Richard Biener <rguenther@suse.de>
-2012-01-04 Patrick Marlier <patrick.marlier@gmail.com>
+ PR middle-end/59471
+ * gcc.dg/pr59471.c: New testcase.
- PR other/51163
- PR other/51164
- * gcc.dg/tm/alias-1.c: Adjust regexp.
- * gcc.dg/tm/alias-2.c: Adjust regexp.
+2014-01-07 Jeff Law <law@redhat.com>
-2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
+ PR middle-end/53623
+ * gcc.target/i386/pr53623.c: New test.
- PR c++/51064
- * g++.dg/warn/Wparentheses-26.C: New.
+2014-01-07 Adam Butcher <adam@jessamine.co.uk>
-2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
+ * g++.dg/cpp1y/pr58500.C: Hoist PR reference to first line and remove
+ blanks at EOF.
+ * g++.dg/cpp1y/pr58534.C: Likewise.
+ * g++.dg/cpp1y/pr58536.C: Likewise.
+ * g++.dg/cpp1y/pr58548.C: Likewise.
+ * g++.dg/cpp1y/pr58549.C: Likewise.
+ * g++.dg/cpp1y/pr58637.C: Likewise.
+ * g++.dg/cpp1y/pr59112.C: Likewise.
+ * g++.dg/cpp1y/pr59113.C: Likewise.
+ * g++.dg/cpp1y/pr59629.C: Likewise.
+ * g++.dg/cpp1y/pr59635.C: Likewise.
+ * g++.dg/cpp1y/pr59636.C: Likewise.
+ * g++.dg/cpp1y/pr59638.C: Likewise.
- * gfortran.dg/elemental_optional_args_2.f90: New test.
+2014-01-07 Yufeng Zhang <yufeng.zhang@arm.com>
-2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
+ * gcc.target/arm/neon/vst1Q_laneu64-1.c: New test.
- PR fortran/49693
- * gfortran.dg/common_17.f90: New test.
+2014-01-07 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-04 Richard Guenther <rguenther@suse.de>
+ * gcc.target/i386/intrinsics_4.c (bar): New function.
- PR tree-optimization/49651
- * gcc.dg/tree-ssa/pta-ptrarith-1.c: Adjust.
- * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
+2014-01-07 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+ * g++.dg/ext/is_base_of_incomplete-2.C: New.
- PR c++/51738
- * g++.dg/cpp0x/initlist-postfix-open-square.C: New.
+2014-01-07 Jakub Jelinek <jakub@redhat.com>
-2012-01-03 Andrew Pinski <apinski@cavium.com>
+ PR rtl-optimization/58668
+ * gcc.dg/pr58668.c: New test.
- * lib/scanasm.exp (dg-function-on-line): Always use a special format
- for all mips targets. Also allow an optional .cfi_startproc.
+ PR tree-optimization/59643
+ * gcc.dg/pr59643.c: New test.
+ * gcc.c-torture/execute/pr59643.c: New test.
-2012-01-03 Uros Bizjak <ubizjak@gmail.com>
+2014-01-06 Janus Weil <janus@gcc.gnu.org>
- * gfortran.dg/typebound_operator_8.f03: Use dg-add-options ieee.
+ PR fortran/59589
+ * gfortran.dg/class_allocate_16.f90: New.
-2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+2014-01-06 Jakub Jelinek <jakub@redhat.com>
- PR c++/29273
- * g++.dg/rtti/dyncast5.C: New.
+ PR target/59644
+ * gcc.target/i386/pr59644.c: New test.
-2012-01-03 Richard Guenther <rguenther@suse.de>
+2014-01-06 Marek Polacek <polacek@redhat.com>
- PR tree-optimization/51070
- * gcc.dg/torture/pr51070-2.c: New testcase.
+ PR c/57773
+ * gcc.dg/pr57773.c: New test.
-2012-01-03 Richard Guenther <rguenther@suse.de>
+2014-01-06 Adam Butcher <adam@jessamine.co.uk>
- PR tree-optimization/51692
- * gcc.dg/torture/pr51692.c: New testcase.
+ PR c++/59635
+ PR c++/59636
+ PR c++/59629
+ PR c++/59638
+ * g++.dg/cpp1y/pr59635.C: New testcase.
+ * g++.dg/cpp1y/pr59636.C: New testcase.
+ * g++.dg/cpp1y/pr59629.C: New testcase.
+ * g++.dg/cpp1y/pr59638.C: New testcase.
-2012-01-03 Richard Guenther <rguenther@suse.de>
+2014-01-06 Martin Jambor <mjambor@suse.cz>
- PR debug/51650
- * g++.dg/lto/pr51650-3_0.C: New testcase.
+ PR ipa/59008
+ * gcc.dg/ipa/pr59008.c: New test.
-2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR c++/15867
- * g++.dg/warn/Wredundant-decls-spec.C: New.
+ * gcc.dg/vect/vect.exp: Add clearcap_ldflags to DEFAULT_VECTCFLAGS
+ if supported.
-2012-01-03 Jakub Jelinek <jakub@redhat.com>
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR tree-optimization/51719
- * g++.dg/tree-prof/pr51719.C: New test.
+ * gcc.target/i386/avx512f-vcmppd-2.c: Add -std=c99.
+ Require c99_runtime.
+ * gcc.target/i386/avx512f-vcmpps-2.c: Likewise.
-2012-01-03 Richard Guenther <rguenther@suse.de>
+ * gcc.target/i386/avx512f-vfixupimmpd-2.c: Add -std=gnu99.
+ Require c99_runtime.
+ * gcc.target/i386/avx512f-vfixupimmps-2.c: Likewise.
+ * gcc.target/i386/avx512f-vfixupimmsd-2.c: Likewise.
+ * gcc.target/i386/avx512f-vfixupimmss-2.c: Likewise.
- PR middle-end/51730
- * gcc.dg/fold-compare-6.c: New testcase.
+ * gcc.target/i386/avx512f-vgetmantpd-2.c: Add -std=c99.
+ Require c99_runtime.
+ Make CALC void static.
+ * gcc.target/i386/avx512f-vgetmantps-2.c: Likewise.
-2012-01-03 Jakub Jelinek <jakub@redhat.com>
+ * gcc.target/i386/avx512f-vgetmantsd-2.c: Add -std=c99.
+ Require c99_runtime.
+ * gcc.target/i386/avx512f-vgetmantss-2.c: Likewise.
- PR c++/51669
- * g++.dg/gomp/pr51669.C: New test.
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
-2012-01-02 Jason Merrill <jason@redhat.com>
+ * gcc.target/i386/pr59501-1.c: Require avx effective target.
+ * gcc.target/i386/pr59501-2.c: Likewise.
+ * gcc.target/i386/pr59501-3.c: Likewise.
+ * gcc.target/i386/pr59501-4.c: Likewise.
+ * gcc.target/i386/pr59501-5.c: Likewise.
+ * gcc.target/i386/pr59501-6.c: Likewise.
- PR c++/51675
- * g++.dg/cpp0x/constexpr-union2.C: New.
+2014-01-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
- PR c++/51666
- * g++.dg/cpp0x/nsdmi-defer5.C: New.
+ * gcc.target/i386/pr59390.c: Replace math.h by fma declaration.
+ * gcc.target/i386/pr59390_1.c: Likewise.
+ * gcc.target/i386/pr59390_2.c: Likewise.
-2012-01-02 Dodji Seketeli <dodji@redhat.com>
+2014-01-06 Eric Botcazou <ebotcazou@adacore.com>
- PR c++/51462
- * g++.dg/cpp0x/constexpr-99.C: New test.
+ * gcc.dg/pr59350.c: Tweak.
+ * gcc.dg/pr59350-2.c: New test.
+ * g++.dg/pr59510.C: Likewise.
-2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
+2014-01-06 Janus Weil <janus@gcc.gnu.org>
- PR c++/20140
- * g++.dg/template/init9.C: New.
+ PR fortran/59023
+ * gfortran.dg/bind_c_procs_2.f90: New.
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+2014-01-05 John David Anglin <danglin@gcc.gnu.org>
- * gcc.dg/memcpy-4.c: Add nomips16 attribute for MIPS targets.
- Increase copy to 5 bytes. Look for at least two "mem/s/u"s,
- rather than a specific number.
+ * gcc.dg/tree-ssa/reassoc-33.c: Don't run on hppa*-*-*.
+ * gcc.dg/tree-ssa/reassoc-34.c: Likewise.
+ * gcc.dg/tree-ssa/reassoc-35.c: Likewise.
+ * gcc.dg/tree-ssa/reassoc-36.c: Likewise.
+ * gcc.dg/tree-ssa/forwprop-28.c: Skip compile on hppa*-*-*.
+ * gcc.dg/tree-ssa/vrp47.c: Likewise.
+ * gcc.dg/tree-ssa/vrp87.c: Likewise.
-2012-01-02 Paul Thomas <pault@gcc.gnu.org>
+2014-01-04 Eric Botcazou <ebotcazou@adacore.com>
- PR fortran/46262
- PR fortran/46328
- PR fortran/51052
- * gfortran.dg/typebound_operator_7.f03: New.
- * gfortran.dg/typebound_operator_8.f03: New.
+ * gcc.target/arm/neon-nested-apcs.c: New test.
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+2014-01-04 Jakub Jelinek <jakub@redhat.com>
- PR target/51729
- * gcc.target/mips/dspr2-MULT.c: Remove -ffixed-hi -ffixed-lo.
- XFAIL.
- * gcc.target/mips/dspr2-MULTU.c: Likewise.
+ PR tree-optimization/59519
+ * gcc.dg/vect/pr59519-1.c: New test.
+ * gcc.dg/vect/pr59519-2.c: New test.
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+ * gcc.target/i386/avx512f-vmovdqu32-1.c: Allow vmovdqu64 instead of
+ vmovdqu32.
- * gcc.dg/pr46309.c: Add -mtune=octeon2 for MIPS.
+2014-01-04 Janus Weil <janus@gcc.gnu.org>
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+ PR fortran/59547
+ * gfortran.dg/typebound_proc_32.f90: New.
- * g++.dg/cpp0x/constexpr-rom.C: Look for .rdata rather than rodata
- for MIPS.
+2014-01-03 Marc Glisse <marc.glisse@inria.fr>
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+ PR c++/58950
+ * g++.dg/pr58950.C: New file.
- * gfortran.dg/io_real_boz_3.f90: Require fortran_real_16.
- * gfortran.dg/io_real_boz_4.f90: Likewise.
- * gfortran.dg/io_real_boz_5.f90: Likewise.
+2014-01-03 Tobias Burnus <burnus@net-b.de>
-2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+ PR c++/58567
+ * g++.dg/gomp/pr58567.C: New.
- * g++.dg/opt/devirt2.C: Add -mno-abicalls for MIPS.
+2014-01-03 Bingfeng Mei <bmei@broadcom.com>
-2012-01-02 Revital Eres <revital.eres@linaro.org>
+ PR tree-optimization/59651
+ * gcc.dg/torture/pr59651.c: New test.
+ * gcc.dg/vect/pr59651.c: Ditto.
- * gcc.dg/sms-11.c: New file.
+2014-01-03 Jakub Jelinek <jakub@redhat.com>
-2012-01-02 Tobias Burnus <burnus@net-b.de>
+ PR target/59625
+ * gcc.target/i386/pr59625.c: New test.
- PR fortran/51682
- * gfortran.dg/coarray/image_index_3.f90: New.
+2014-01-03 Paolo Carlini <paolo.carlini@oracle.com>
-2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+ Core DR 1442
+ PR c++/59165
+ * g++.dg/cpp0x/range-for28.C: New.
+ * g++.dg/cpp0x/range-for3.C: Update.
- PR c++/16603
- * g++.dg/parse/enum8.C: New.
+2014-01-02 Joseph Myers <joseph@codesourcery.com>
-2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+ * gcc.target/powerpc/rs6000-ldouble-3.c: New test.
- PR c++/51379
- * g++.dg/conversion/reinterpret4.C: New.
- * g++.dg/conversion/reinterpret1.C: Adjust.
+2014-01-02 Marc Glisse <marc.glisse@inria.fr>
-2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+ PR c++/59641
+ * g++.dg/cpp0x/pr59641.C: New file.
- * g++.dg/cpp0x/constexpr-delegating2.C: Add missing piece.
+2014-01-02 Marc Glisse <marc.glisse@inria.fr>
-2012-01-01 Fabien Chêne <fabien@gcc.gnu.org>
+ * g++.dg/cpp0x/initlist-explicit-sfinae.C: New file.
- * g++.old-deja/g++.brendan/crash25.C: Adjust.
- * g++.old-deja/g++.brendan/crash56.C: Likewise.
- * g++.old-deja/g++.jason/access14.C: Likewise.
- * g++.old-deja/g++.jason/access8.C: Likewise.
- * g++.old-deja/g++.jason/access1.C: Likewise.
- * g++.old-deja/g++.other/access3.C: Likewise.
- * g++.old-deja/g++.other/access5.C: Likewise.
- * g++.old-deja/g++.law/unsorted1.C: Likewise.
- * g++.old-deja/g++.law/visibility22.C: Likewise.
- * g++.old-deja/g++.law/visibility26.C: Likewise.
- * g++.old-deja/g++.mike/p2746.C: Likewise.
- * g++.dg/debug/using1.C: Likewise.
- * g++.dg/lookup/using51.C: Likewise.
- * g++.dg/inherit/using5.C: Likewise.
- * g++.dg/inherit/pr30297.C: Likewise.
- * g++.dg/inherit/access8.C: Likewise.
- * g++.dg/torture/pr39362.C: Likewise.
- * g++.dg/template/crash13.C: Likewise.
- * g++.dg/template/using10.C: Likewise.
+2014-01-02 Marc Glisse <marc.glisse@inria.fr>
-2012-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
+ PR c++/59378
+ * g++.dg/ext/pr59378.C: New file.
- PR fortran/51502
- * lib/gcc-dg.exp (scan-module-absence): Really commit last
- change.
+2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-01 Ira Rosen <irar@il.ibm.com>
+ Update copyright years
- PR tree-optimization/51704
- * gfortran.dg/vect/no-fre-no-copy-prop-O3-pr51704.f90: New.
- * gfortran.dg/vect/vect.exp: Run no-fre-no-copy-prop-O3-* with
- corresponding flags.
+2014-01-02 Richard Sandiford <rdsandiford@googlemail.com>
-2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+ * gcc.target/arc/arc.exp: Use the standard form for the copyright
+ notice.
- PR c++/51723
- * g++.dg/cpp0x/constexpr-delegating2.C: New.
+2014-01-02 Janus Weil <janus@gcc.gnu.org>
-2012-01-01 Jan Hubicka <jh@suse.cz>
+ PR fortran/59654
+ * gfortran.dg/dynamic_dispatch_12.f90: New.
- PR rtl-optimization/51069
- * gcc.c-torture/compile/pr51069.c: New testcase.
+2014-01-01 Jakub Jelinek <jakub@redhat.com>
-2012-01-01 Jakub Jelinek <jakub@redhat.com>
+ * lib/target-supports.exp (check_effective_target_avx512f): Make sure
+ the builtin isn't optimized away as unused.
- PR tree-optimization/51683
- * gcc.dg/pr51683.c: New test.
+ PR rtl-optimization/59647
+ * g++.dg/opt/pr59647.C: New test.
-Copyright (C) 2012 Free Software Foundation, Inc.
+Copyright (C) 2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/ChangeLog-1993-2007 b/gcc/testsuite/ChangeLog-1993-2007
index d15b8f1b08..cf9bb00ba8 100644
--- a/gcc/testsuite/ChangeLog-1993-2007
+++ b/gcc/testsuite/ChangeLog-1993-2007
@@ -60910,8 +60910,7 @@ rlsruhe.de>
* New file.
-Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+Copyright (C) 1993-2007 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/ChangeLog-2008 b/gcc/testsuite/ChangeLog-2008
index ca95319cbd..2c354ff448 100644
--- a/gcc/testsuite/ChangeLog-2008
+++ b/gcc/testsuite/ChangeLog-2008
@@ -1814,7 +1814,7 @@
* gcc.dg/Warray-bounds-5.c: New test.
* gcc.dg/Warray-bounds-6.c: New test.
-2008-11-05 Fabien Chene <fabien.chene@gmail.com>
+2008-11-05 Fabien Chene <fabien@gcc.gnu.org>
PR c++/32519
* g++.dg/template/pr32519.C: New test.
diff --git a/gcc/testsuite/ChangeLog-2009 b/gcc/testsuite/ChangeLog-2009
index a4614a03ec..4c14e744fa 100644
--- a/gcc/testsuite/ChangeLog-2009
+++ b/gcc/testsuite/ChangeLog-2009
@@ -4683,7 +4683,7 @@
* gcc.c-torture/compile/limits-fndefn.c: Add dg-timeout-factor.
-2009-08-25 Ville Voutilainen <ville.voutilainen@gmail.com>
+2009-08-25 Ville Voutilainen <ville.voutilainen@gmail.com>
* g++.dg/cpp0x/alignof.C: New. Tests that the alignof
keyword works in the same manner as __alignof.
diff --git a/gcc/testsuite/ChangeLog-2010 b/gcc/testsuite/ChangeLog-2010
index b8d94644a4..47f39a3bc4 100644
--- a/gcc/testsuite/ChangeLog-2010
+++ b/gcc/testsuite/ChangeLog-2010
@@ -11264,7 +11264,7 @@
* g++.dg/cpp0x/initlist26.C: Adjust.
* g++.dg/cpp0x/initlist28.C: Adjust.
-2010-05-10 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-10 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43719
* g++.dg/init/pr43719.C: New.
@@ -11389,7 +11389,7 @@
* gnat.dg/sizetype3.ad[sb]: New test.
* gnat.dg/sizetype3_pkg.ads: New helper.
-2010-05-07 Fabien Chêne <fabien.chene@gmail.com>
+2010-05-07 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/43951
* g++.dg/init/new29.C: New.
@@ -11738,12 +11738,6 @@
* gcc.dg/tree-ssa/builtin-free.c: New testcase.
-2010-04-29 Fabien Chêne <fabien.chene@gmail.com>
-
- PR c++/43890
- * init.c (diagnose_uninitialized_cst_or_ref_member): check for
- user-provided constructor while recursing.
-
2010-04-29 Janus Weil <janus@gcc.gnu.org>
PR fortran/42274
@@ -11866,7 +11860,7 @@
* g++.dg/template/pr23510.C: Update.
* lib/prune.exp: Filter out 'recursively instantiated'.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
PR c++/29043
* g++.dg/init/pr29043.C: New.
@@ -11898,7 +11892,7 @@
* g++.dg/template/sfinae17.C: New.
* g++.dg/template/sfinae18.C: New.
-2010-04-27 Fabien Chêne <fabien.chene@gmail.com>
+2010-04-27 Fabien Chêne <fabien@gcc.gnu.org>
* g++.dg/init/pr42844.C: New.
* g++.dg/cpp0x/pr42844-2.C: New.
@@ -12500,7 +12494,7 @@
* g++.dg/cpp0x/lambda/lambda-conv4.C: New.
* g++.dg/cpp0x/lambda/lambda-deduce2.C: New.
-2010-04-12 Fabien Chene <fabien.chene@gmail.com>
+2010-04-12 Fabien Chene <fabien@gcc.gnu.org>
PR c++/25811
* g++.dg/init/pr25811.C: New test.
diff --git a/gcc/testsuite/ChangeLog-2012 b/gcc/testsuite/ChangeLog-2012
new file mode 100644
index 0000000000..83c15e1f4a
--- /dev/null
+++ b/gcc/testsuite/ChangeLog-2012
@@ -0,0 +1,11183 @@
+2012-12-31 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/ipa/devirt-9.C: Cleanup inline ipa dump.
+
+2012-12-31 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/builtin_target.c (vendor_signatures): Remove.
+ (check_detailed): Use signature_INTEL_ebx and signature_AMD_ebx
+ to check vendor signature.
+
+2012-12-28 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55692
+ * gfortran.dg/associated_7.f90: New.
+
+2012-12-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55763
+ * gfortran.dg/unlimited_polymorphic_5.f90
+
+2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/48960
+ * gfortran.dg/newunit_3.f90: New.
+
+2012-12-27 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/48976
+ * gfortran.dg/inquire_15.f90: New.
+
+2012-12-27 Sriraman Tallam <tmsriram@google.com>
+
+ * testsuite/g++.dg/mv1.C: Remove target options.
+ * testsuite/g++.dg/mv2.C: Ditto.
+ * testsuite/g++.dg/mv3.C: Ditto.
+ * testsuite/g++.dg/mv4.C: Ditto.
+ * testsuite/g++.dg/mv5.C: Ditto.
+
+2012-12-26 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/55539
+ * gfortran.dg/nosigned_zero_3.f90: New testcase.
+
+2012-12-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54884
+ * gfortran.dg/public_private_module_8.f90: New.
+
+2012-12-23 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/r10k-cache-barrier-10.c: Make a branch-likely
+ instruction more likely.
+
+2012-12-23 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/pr55315.c: Cast to long rather than int.
+
+2012-12-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55763
+ * gfortran.dg/unlimited_polymorphic_6.f90: New.
+
+2012-12-21 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55355
+ * g++.dg/torture/pr55355.C: New test.
+
+2012-12-21 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR middle-end/55775
+ * gcc.target/i386/pr55775.c: New test.
+
+2012-12-21 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/pthread-init-2.c (dg-options): Define _XOPEN_SOURCE=500
+ on AIX.
+
+ * lib/target-supports.exp (add_options_for_tls): Add -pthread for
+ AIX as well.
+ (check_effective_target_powerpc_vsx_ok): Only test VSX on AIX 7.1
+ and above.
+
+ * gcc.c-torture/compile/pr44707.c: Do not try to assemble on AIX.
+
+ * c-c++-common/pr43942.c: Remove XFAIL for AIX.
+
+2012-12-21 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55763
+ * gfortran.dg/unlimited_polymorphic_4.f03: New test.
+
+2012-12-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/52996
+ * gcc.dg/torture/pr52996.c: New testcase.
+
+2012-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/55750
+ * gcc.c-torture/execute/pr55750.c: New test.
+
+2012-12-20 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55740
+ * g++.dg/torture/pr55740.C: New testcase.
+
+2012-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55619
+ * c-c++-common/pr55619.c: New test.
+
+2012-12-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54818
+ * gfortran.dg/transfer_intrinsic_4.f: New.
+
+2012-12-19 Paul Thomas <pault@gcc.gnu.org>
+
+ * gfortran.dg/unlimited_polymorphic_1.f03: New test.
+ * gfortran.dg/unlimited_polymorphic_2.f03: New test.
+ * gfortran.dg/unlimited_polymorphic_3.f03: New test.
+ * gfortran.dg/same_type_as_1.f03: Correct for improved message.
+
+2012-12-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/vmaxnmdf.c: New test.
+ * gcc.target/arm/vmaxnmsf.c: Likewise.
+ * gcc.target/arm/vminnmsf.c: Likewise.
+ * gcc.target/arm/vminnmdf.c: Likewise.
+
+2012-12-19 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/gomp/use_intrinsic_1.f90: Moved
+ to libgomp/testsuite/libgomp.fortran/use_intrinsic_1.f90.
+
+2012-12-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55736
+ PR tree-optimization/55703
+ * gcc.dg/lto/pr55703_0.c: New testcase.
+
+2012-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/55730
+ * gcc.dg/debug/pr55730.c: New test.
+
+2012-12-18 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55683
+ * g++.dg/ipa/devirt-9.C: New testcase.
+
+2012-12-19 Terry Guo <terry.guo@arm.com>
+
+ * gcc.target/arm/thumb-find-work-register.c: New.
+
+2012-12-19 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55733
+ * gfortran.dg/save_5.f90: New.
+
+2012-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/39464
+ * gcc.dg/pr39464.c: New test.
+
+2012-12-18 Ian Lance Taylor <iant@google.com>
+
+ PR go/55201
+ * lib/go.exp: Revert last patch.
+
+2012-12-18 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/54838
+ * g++.dg/torture/pr54838.C: New testcase.
+
+2012-12-18 Andreas Schwab <schwab@linux-m68k.org>
+
+ * lib/go.exp (go_link_flags): Add libatomic location to flags and
+ ld_library_path.
+
+2012-12-18 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/reassoc-19.c: Adjust.
+
+2012-12-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55555
+ * gcc.dg/torture/pr55555.c: New testcase.
+ * gcc.dg/vect/vect-iv-11.c: Adjust.
+
+2012-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/55717
+ * testsuite/g++.dg/opt/pr55717.C: New test.
+
+2012-12-17 Andrew Stubbs <ams@codesourcery.com>
+ Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.target/arm/neon-extend-1.c: New file.
+ * gcc.target/arm/neon-extend-2.c: New file.
+
+2012-12-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (add_options_for_arm_v8_neon):
+ Add -march=armv8-a.
+
+2012-12-17 James Greenhalgh <james.greenhalgh@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_multiple_sizes): Enable for AArch64.
+
+2012-12-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55197
+ * gfortran.dg/gomp/use_intrinsic_1.f90: New.
+
+2012-12-16 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/move_alloc_14.f90: New.
+
+2012-12-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55638
+ * gfortran.dg/elemental_args_check_3.f90: Update dg-error.
+ * gfortran.dg/elemental_args_check_7.f90: New.
+
+2012-12-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lib/scanasm.exp (get_ada_spec_filename): Use procedural form.
+
+2012-12-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/52735
+ * gnat.dg/nested_generic1.adb: New test.
+ * gnat.dg/nested_generic1_pkg.ad[sb]: New helper.
+
+2012-12-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/53766
+ * gnat.dg/controlled7.ad[sb]: New test.
+
+2012-12-14 Steve Ellcey <sellcey@mips.com>
+
+ PR regression/55688
+ * g++.dg/other/pr55650.C: Add dg-require-profiling.
+
+2012-12-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55684
+ * gcc.dg/torture/pr55684.c: New testcase.
+
+2012-12-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55687
+ * gcc.dg/torture/pr55687.c: New testcase.
+
+2012-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55652
+ * g++.dg/cpp0x/noexcept19.C: New test.
+
+2012-12-13 Richard Biener <rguenther@suse.de>
+
+ PR lto/55660
+ * gcc.dg/lto/pr55660_0.c: New testcase.
+ * gcc.dg/lto/pr55660_1.c: Likewise.
+
+2012-12-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR gcov-profile/55650
+ * g++.dg/other/pr55650.C: New test.
+ * g++.dg/other/pr55650.cc: New file.
+
+2012-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/55665
+ * g++.dg/guality/pr55665.C: New test.
+
+ * lib/gcc-dg.exp (${tool}_load): Handle non-existing
+ set_target_env_var the same as if it is empty list.
+ (dg-set-target-env-var): Fix up error message.
+ (set-target-env-var): Record both preexisting env var values
+ as well as info that env wasn't set.
+ (restore-target-env-var): Iterate on reversed list, if second
+ sublist element is 1, setenv the env var to the third sublist
+ element, otherwise unsetenv it.
+ (gcc-dg-runtest): Don't initialize set_target_env_var.
+ (dg-test): Unset set_target_env_var if it was set.
+
+ * g++.dg/asan/deep-tail-call-1.C: Whitespace fixes. Don't rely
+ on argc being one.
+ * g++.dg/asan/interception-malloc-test-1.C: Only run on linux.
+ Whitespace fixes. Avoid unnecessary * sizeof(char).
+ * g++.dg/asan/deep-thread-stack-1.C: Add -lasan -lpthread to
+ dg-options. Whitespace fixes.
+ * g++.dg/asan/deep-stack-uaf-1.C: Skip for -flto. Whitespace fixes.
+ * g++.dg/asan/interception-test-1.C: Whitespace fixes.
+ * g++.dg/asan/interception-failure-test-1.C: Whitespace fixes.
+ Avoid unnecessary * sizeof(char). Remove // CHECK: comment.
+ * g++.dg/asan/default-options-1.C: Whitespace fixes.
+ * g++.dg/asan/symbolize-callback-1.C: Whitespace fixes. Make
+ first __asan_symbolize argument unnamed. Avoid unnecessary
+ * sizeof(char).
+ * g++.dg/asan/large-func-test-1.C: Whitespace fixes. Don't rely
+ on argc being one. Allow both _Znwj and _Znwm as operator new.
+ Ignore everything in the backtrace above operator new. Fix up
+ dg-output regexps.
+ * c-c++-common/asan/null-deref-1.c: Add -fno-omit-frame-pointer
+ and for x86 -mno-omit-leaf-frame-pointer. Fix up dg-output regexps.
+ * c-c++-common/asan/clone-test-1.c: Whitespace fixes. Return non-zero
+ on failures. Avoid pointless PASS dg-output check. Remove bogus
+ dg-shouldfail.
+ * c-c++-common/asan/sanity-check-pure-c-1.c: Fix up dg-output regexps.
+ Avoid unnecessary * sizeof(char).
+ * c-c++-common/asan/heap-overflow-1.c: Fix up dg-output regexps.
+ Don't rely on argc being one.
+ * c-c++-common/asan/sleep-before-dying-1.c: Whitespace fixes.
+ Avoid unnecessary * sizeof(char).
+ * c-c++-common/asan/rlimit-mmap-test-1.c: Whitespace fixes.
+ * c-c++-common/asan/stack-overflow-1.c: Fix up dg-output regexps.
+ * c-c++-common/asan/global-overflow-1.c: Add -fno-builtin-memset.
+ Fix up dg-output regexps.
+ * c-c++-common/asan/strncpy-overflow-1.c: Fix up dg-output regexps.
+ * c-c++-common/asan/memcmp-1.c: Don't rely on argc being one.
+ * c-c++-common/asan/use-after-free-1.c: Fix up dg-output regexps.
+ * c-c++-common/asan/swapcontext-test-1.c: Don't rely on argc being
+ one.
+ * c-c++-common/asan/force-inline-opt0-1.c: Remove dg-skip-if.
+ * c-c++-common/asan/strip-path-prefix-1.c: Whitespace fixes.
+ Avoid unnecessary * sizeof(char).
+
+2012-12-12 Wei Mi <wmi@google.com>
+
+ * lib/target-supports.exp (check_effective_target_dlopen,
+ check_effective_target_clone, check_effective_target_setrlimit,
+ check_effective_target_swapcontext): New procedures.
+ * lib/gcc-dg.exp (${tool}_load): Handle dg-set-target-env-var.
+ (dg-set-target-env-var, set-target-env-var,
+ restore-target-env-var): New procedures.
+ (gcc-dg-runtest): Set set_target_env_var.
+ * g++.dg/asan/symbolize-callback-1.C: New test.
+ * g++.dg/asan/shared-lib-test-1-so.cc: New file.
+ * g++.dg/asan/deep-tail-call-1.C: New test.
+ * g++.dg/asan/default-options-1.C: New test.
+ * g++.dg/asan/interception-test-1.C: New test.
+ * g++.dg/asan/dlclose-test-1-so.cc: New file.
+ * g++.dg/asan/deep-thread-stack-1.C: New test.
+ * g++.dg/asan/interception-malloc-test-1.C: New test.
+ * g++.dg/asan/deep-stack-uaf-1.C: New test.
+ * g++.dg/asan/large-func-test-1.C: New test.
+ * g++.dg/asan/interception-failure-test-1.C: New test.
+ * c-c++-common/asan/strip-path-prefix-1.c: New test.
+ * c-c++-common/asan/force-inline-opt0-1.c: New test.
+ * c-c++-common/asan/swapcontext-test-1.c: New test.
+ * c-c++-common/asan/null-deref-1.c: New test.
+ * c-c++-common/asan/global-overflow-1.c: New test.
+ * c-c++-common/asan/strncpy-overflow-1.c: New test.
+ * c-c++-common/asan/rlimit-mmap-test-1.c: New test.
+ * c-c++-common/asan/stack-overflow-1.c: New test.
+ * c-c++-common/asan/use-after-free-1.c: New test.
+ * c-c++-common/asan/sanity-check-pure-c-1.c: New test.
+ * c-c++-common/asan/clone-test-1.c: New test.
+ * c-c++-common/asan/heap-overflow-1.c: New test.
+ * c-c++-common/asan/sleep-before-dying-1.c: New test.
+
+2012-12-12 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.dg/pr55150-2.c: Add pic support check.
+ * gcc.dg/lto/pr54709_0.c: Ditto.
+
+2012-12-12 Zdenek Dvorak <ook@ucw.cz>
+
+ PR tree-optimization/55481
+ * gcc.dg/torture/pr55481.c: New testcase.
+
+2012-12-12 Steven Bosscher <steven@gcc.gnu.org>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/52640
+ * gcc.c-torture/compile/limits-externdecl.c: New test.
+
+2012-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ * gfortran.dg/vect/fast-math-pr38968.f90: Decrease n
+ from 2000 to 400.
+
+ PR fortran/55633
+ * gcc.dg/torture/pr55633.c: New test.
+
+2012-12-11 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/53094
+ * g++.dg/cpp0x/constexpr-53094-1.C: New testcase.
+ * g++.dg/cpp0x/constexpr-53094-2.C: Likewise.
+ * g++.dg/cpp0x/constexpr-53094-3.C: Likewise.
+
+2012-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55643
+ * g++.dg/warn/Wunused-var-19.C: New test.
+
+ * g++.dg/asan/asan_test.C: Link -lasan before -lpthread.
+
+2012-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr54121.c: New test.
+
+2012-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55619
+ * g++.dg/ext/asm12.C: New test.
+
+ PR tree-optimization/54570
+ * gcc.dg/builtin-object-size-8.c: Xfail.
+ * gcc.dg/builtin-object-size-13.c: New test.
+
+2012-12-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/55642
+ * gcc.target/arm/pr55642.c: New testcase.
+
+2012-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/43631
+ PR bootstrap/55615
+ * g++.dg/other/pr43631.C: New test.
+
+2012-12-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55079
+ * gcc.dg/Warray-bounds-9.c: New testcase.
+ * gcc.dg/Warray-bounds-10.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-1.c: Adjust.
+
+2012-12-10 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/52909
+ * gfortran.dg/proc_ptr_39.f90: New test case.
+
+2012-12-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/octeon-bbit-2.c: Restructure loops so that no
+ code duplication is required. Allow BNE to appear.
+
+2012-12-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/ext-2.c: Require -mlong64.
+
+2012-12-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55107
+ * gcc.dg/torture/pr55107.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-pre-5.c: Adjust.
+
+2012-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/asan/asan_test.cc: Sync from upstream.
+ * g++.dg/asan/asan_test_utils.h: Likewise.
+
+2012-12-10 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/neon/vrndaf32.c: New test.
+ * gcc.target/arm/neon/vrndqaf32.c: Likewise.
+ * gcc.target/arm/neon/vrndf32.c: Likewise.
+ * gcc.target/arm/neon/vrndqf32.c: Likewise.
+ * gcc.target/arm/neon/vrndmf32.c: Likewise.
+ * gcc.target/arm/neon/vrndqmf32.c: Likewise.
+ * gcc.target/arm/neon/vrndnf32.c: Likewise.
+ * gcc.target/arm/neon/vrndqnf32.c: Likewise.
+ * gcc.target/arm/neon/vrndpf32.c: Likewise.
+ * gcc.target/arm/neon/vrndqpf32.c: Likewise.
+
+2012-12-09 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.misc-tests/gcov-12.c: Fix dg order.
+
+ PR middle-end/54470
+ * gcc.dg/ipa/iinline-4.c: xfail hooray4 test on 32-bit hppa*-*-*.
+
+ * gcc.dg/torture/pr47917.c: Change "dg-xfail-if" to "dg-xfail-run-if"
+ for *-*-hpux10*.
+
+ * gcc.dg/20030711-1.c: Define MAP_FAILED if not defined.
+ * gcc.dg/20050826-1.c: Likewise.
+
+2012-12-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect9.adb: Add -w to dg-options.
+ * gnat.dg/vect10.adb: Likewise.
+
+2012-12-09 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55593
+ * gfortran.dg/do_check_8.f90: New test.
+
+2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect10.ad[sb]: New test.
+
+2012-12-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect9.ad[sb]: New test.
+ * gnat.dg/vect9_pkg.ads: New helper.
+
+2012-12-07 Mike Stump <mikestump@comcast.net>
+
+ * gnat.dg/discr38.adb: Don't use ^M line endings.
+ gnat.dg/loop_optimization13.adb: Likewise.
+ gnat.dg/loop_optimization13.ads: Likewise.
+ gnat.dg/discr36_pkg.adb: Likewise.
+ gnat.dg/discr36_pkg.ads: Likewise.
+ gnat.dg/loop_optimization11_pkg.ads: Likewise.
+ gnat.dg/discr36.ads: Likewise.
+ gnat.dg/loop_optimization11.adb: Likewise.
+
+2012-12-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55141
+ * gcc.target/i386/pr55141.c: New.
+
+2012-12-07 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54401
+ * g++.dg/cpp0x/alias-decl-28.C: New test.
+ * g++.dg/cpp0x/alias-decl-16.C: Update.
+
+2012-12-07 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55590
+ * gcc.target/i386/pr55590-1.c: New test.
+ * gcc.target/i386/pr55590-2.c: Likewise.
+
+2012-12-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54975
+ * g++.dg/cpp0x/lambda/lambda-typedef.C: New.
+
+2012-12-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/55597
+ * gcc.target/i386/pr55597.c: New test.
+
+2012-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54207
+ * g++.dg/cpp0x/noexcept18.C: New test.
+
+ PR c++/55573
+ * g++.dg/cpp0x/constexpr-55573.C: New test.
+
+ PR c++/55137
+ * g++.dg/opt/pr55137.C: New test.
+ * gcc.c-torture/execute/pr55137.c: New test.
+
+2012-12-06 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_v8_neon_ok):
+ New procedure.
+ (add_options_for_arm_v8_neon): Likewise.
+
+2012-12-05 Steven Bosscher <steven@gcc.gnu.org>
+
+ * g++.dg/pr55604.C: New test.
+
+2012-12-05 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_perm): Allow aarch64*-*-*.
+ (check_effective_target_vect_perm_byte): Likewise.
+ (check_effective_target_vect_perm_short): Likewise.
+ (check_effective_target_vect_char_mult): Likewise.
+ (check_effective_target_vect_extract_even_odd): Likewise.
+ (check_effective_target_vect_interleave): Likewise.
+
+2012-12-05 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * g++.dg/abi/mangle-neon-aarch64.C: New test.
+
+2012-12-05 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * g++.dg/abi/arm_va_list.C: Also test on aarch64*-*-*.
+
+2012-12-05 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.dg/vect/vect-rounding-btrunc.c: New test.
+ * gcc.dg/vect/vect-rounding-btruncf.c: Likewise.
+ * gcc.dg/vect/vect-rounding-ceil.c: Likewise.
+ * gcc.dg/vect/vect-rounding-ceilf.c: Likewise.
+ * gcc.dg/vect/vect-rounding-floor.c: Likewise.
+ * gcc.dg/vect/vect-rounding-floorf.c: Likewise.
+ * gcc.dg/vect/vect-rounding-lceil.c: Likewise.
+ * gcc.dg/vect/vect-rounding-lfloor.c: Likewise.
+ * gcc.dg/vect/vect-rounding-nearbyint.c: Likewise.
+ * gcc.dg/vect/vect-rounding-nearbyintf.c: Likewise.
+ * gcc.dg/vect/vect-rounding-round.c: Likewise.
+ * gcc.dg/vect/vect-rounding-roundf.c: Likewise.
+ * target-supports.exp
+ (check_effective_target_vect_call_btrunc): New.
+ (check_effective_target_vect_call_btruncf): Likewise.
+ (check_effective_target_vect_call_ceil): Likewise.
+ (check_effective_target_vect_call_ceilf): Likewise.
+ (check_effective_target_vect_call_floor): Likewise.
+ (check_effective_target_vect_call_floorf): Likewise.
+ (check_effective_target_vect_call_lceil): Likewise.
+ (check_effective_target_vect_call_lfloor): Likewise.
+ (check_effective_target_vect_call_nearbyint): Likewise.
+ (check_effective_target_vect_call_nearbyintf): Likewise.
+ (check_effective_target_vect_call_round): Likewise.
+ (check_effective_target_vect_call_roundf): Likewise.
+
+2012-12-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/51238
+ * gcc.dg/torture/pr51238.c: New testcase.
+
+2012-12-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/50222
+ * gcc.dg/torture/pr50222.c: New testcase.
+
+2012-12-05 Richard Biener <rguenther@suse.de>
+
+ PR lto/55525
+ * gcc.dg/lto/pr55525_0.c: New testcase.
+ * gcc.dg/lto/pr55525_1.c: Likewise.
+
+2012-12-04 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/quad_3.f90: Really fix an if condition.
+
+2012-12-04 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/quad_3.f90: Fix a condition,
+ which wrongly required ordered/lazy evaluation.
+
+2012-12-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * gcc.target/aarch64/121127.c: New test.
+
+2012-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/55587
+ * lib/asan-dg.exp (asan_init): Return 1 if libasan has been found,
+ 0 if not.
+ * g++.dg/asan/asan.exp: Don't run gcc-dg-runtest if [asan_init]
+ returned 0.
+ * gcc.dg/asan/asan.exp: Likewise.
+
+2012-12-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55124
+ * gcc.dg/torture/pr55124.c: New testcase.
+
+2012-12-03 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/quad_3.f90: New.
+
+2012-12-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54170
+ * g++.dg/cpp0x/lambda/lambda-nullptr.C: New.
+
+2012-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/55452
+ * gfortran.dg/reassoc_4.f: Use --param max-completely-peeled-insns=400
+ on all targets, not just s390*.
+
+2012-12-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/55570
+ * gcc.dg/pr55570.c: New test.
+
+2012-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/asan-dg.exp (asan_get_gtest_test_list,
+ asan_get_gtest_expect_death_list, asan-gtest): New procedures.
+ (proc ${tool}_load): Remember [asan_get_gtest_test_list "$output"]
+ and [asan_get_gtest_expect_death_list "$output"] in global vars.
+ (asan_symbolize): Sanitize [] characters from key.
+ * g++.dg/asan/asan_test_config.h: New file.
+ * g++.dg/asan/asan_globals_test.cc: New file.
+ * g++.dg/asan/asan_test_utils.h: New file.
+ * g++.dg/asan/dejagnu-gtest.h: New file.
+ * g++.dg/asan/asan_test.cc: New file.
+ * g++.dg/asan/asan_test.C: New test.
+
+2012-12-03 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/pr35634.c: Use signed char.
+ * g++.dg/torture/pr35634.C: Likewise.
+
+2012-12-02 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/54838
+ * gcc.dg/pr54838.c: New test.
+
+2012-12-01 Xinliang David Li <davidxl@google.com>
+
+ * gcc.target/i386/ifcvt-onecmpl-abs-1.c: Check for
+ cltd.
+
+2012-12-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55558
+ * g++.dg/cpp0x/decltype46.C: New.
+
+2012-12-01 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR middle-end/52450
+ * gcc.dg/torture/pr52402.c: Remove xfail for hppa*-*-hpux*.
+
+2012-12-01 Zdenek Sojka <zsojka@seznam.cz>
+
+ PR debug/53860
+ * g++.dg/debug/pr53860.C: New test.
+
+2012-12-01 Alessandro Fanfarillo <alessandro.fanfarillo@gmail.com>
+ Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/46897
+ * gfortran.dg/defined_assignment_1.f90: New test.
+ * gfortran.dg/defined_assignment_2.f90: New test.
+ * gfortran.dg/defined_assignment_3.f90: New test.
+ * gfortran.dg/defined_assignment_4.f90: New test.
+ * gfortran.dg/defined_assignment_5.f90: New test.
+
+2012-12-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55542
+ * g++.dg/cpp0x/vt-55542.C: New test.
+
+2012-11-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/pack9.ads: New test.
+
+2012-11-30 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/52890
+ PR tree-optimization/55415
+ PR tree-optimization/54386
+ PR target/55448
+ * gcc.dg/ipa/ipa-sra-7.c: New test.
+ * gcc.dg/ipa/ipa-sra-8.c: Likewise.
+ * gcc.dg/ipa/ipa-sra-9.c: Likewise.
+ * gcc.target/i386/pr55448.c: Likewise.
+
+2012-11-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * loop_optimization14.ad[sb]: New test.
+ * loop_optimization14_pkg.ads: New helper.
+
+2012-11-29 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/55073
+ * gcc.target/arm/pr55073.C: New test.
+
+2012-11-29 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/53094
+ * g++.dg/ext/vector20.C: New testcase.
+
+2012-11-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52161
+ * coarray/sync_3.f90: Extend test.
+
+2012-11-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/55512
+ * gcc.target/i386/pr55512-2.c: Remove unnecessary define.
+ * gcc.target/i386/pr55512-4.c: Likewise.
+
+2012-11-29 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/52654
+ * g++.dg/cpp0x/udlit-overflow.C: New.
+ * g++.dg/cpp0x/udlit-overflow-neg.C: New.
+
+2012-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/36728
+ PR debug/55467
+ PR middle-end/55507
+ PR bootstrap/55511
+ * gcc.dg/guality/pr36728-1.c: Include "../nop.h", make sure the asm
+ are non-empty and add dependency between the first and second asm.
+ * gcc.dg/guality/pr36728-2.c: Likewise.
+ * gcc.dg/guality/pr36728-3.c: New test.
+ * gcc.dg/guality/pr36728-4.c: New test.
+
+2012-11-28 Andrew Pinski <apinski@cavium.com>
+
+ PR bootstrap/54279
+ * lib/g++.exp (g++_init): Search for xg++ instead of g++ in the build
+ directories.
+ * lib/obj-c++.exp (obj-c++_init): Likewise.
+
+2012-11-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52161
+ * coarray/sync_3.f90: New.
+
+2012-11-28 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr55458.c: Require ia32 target instead of ilp32.
+
+2012-11-28 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55512
+ * gcc.target/i386/pr55512-[1234].c: New tests.
+
+2012-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/55505
+ * gcc.c-torture/execute/921202-1.c: Increase size of dx and dy arrays.
+
+ PR testsuite/55504
+ * gcc.c-torture/execute/20071018-1.c (foo): Add noinline/noclone
+ attributes. Avoid clobbering memory before malloced chunk.
+ (main): Pass 1 instead of 0 as argument.
+
+2012-11-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/object_overflow.adb: Rename to...
+ * gnat.dg/object_overflow1.adb: ...this.
+ * gnat.dg/object_overflow2.adb: New test.
+ * gnat.dg/object_overflow3.adb: Likewise.
+ * gnat.dg/object_overflow4.adb: Likewise.
+
+2012-11-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55497
+ * g++.dg/init/pr55497.C: New.
+
+2012-11-28 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/55327
+ * gcc.dg/vect/slp-perm-8.c: Mark worker as noinline.
+ * gcc.dg/vect/slp-perm-9.c: Likewise.
+
+2012-11-28 Richard Biener <rguenther@suse.de>
+
+ PR c/35634
+ * gcc.dg/torture/pr35634.c: New testcase.
+ * g++.dg/torture/pr35634.C: Likewise.
+ * gcc.dg/vect/pr18536.c: Mark worker function noinline.
+
+2012-11-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55476
+ * gfortran.dg/warn_target_lifetime_3.f90: New.
+
+2012-11-27 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55458
+ * gcc.target/i386/pr55458.c: New test.
+
+2012-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55110
+ * gcc.dg/pr55110.c: New test.
+
+2012-11-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55331
+ * g++.dg/opt/pr55331.C: New testcase.
+
+2012-11-26 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.dg/20050811-2.c: Change -dv option to -graph option.
+
+2012-11-26 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/54455.c: Require scheduling.
+ * gcc.dg/c1x-align-4.c: Skip avr.
+ * gcc.dg/pr44024.c: Skip avr in final scan.
+
+2012-11-26 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.c-torture/execute/20120919-1.x: New file (int32plus).
+ * gcc.dg/pr54676.c: Make work for 16-bit int.
+
+2012-11-26 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/55277
+ * gcc.target/i386/pr55227.c: New test.
+
+2012-11-26 Steven Bosscher <steven@gcc.gnu.org>
+
+ * testsuite/gcc.dg/20050811-1.c: Change -dv option to -graph option
+ to -fdump-rtl-all.
+ * testsuite/gcc.dg/pr37858.c: Remove -dv option.
+
+2012-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_v8_vfp_ok):
+ New procedure.
+ (add_options_for_arm_v8_vfp): New procedure.
+ * gcc.target/arm/vrintaf32.c: New test.
+ * gcc.target/arm/vrintaf64.c: Likewise.
+ * gcc.target/arm/vrintmf32.c: Likewise.
+ * gcc.target/arm/vrintmf64.c: Likewise.
+ * gcc.target/arm/vrintpf32.c: Likewise.
+ * gcc.target/arm/vrintpf64.c: Likewise.
+ * gcc.target/arm/vrintrf32.c: Likewise.
+ * gcc.target/arm/vrintrf64.c: Likewise.
+ * gcc.target/arm/vrintxf32.c: Likewise.
+ * gcc.target/arm/vrintxf64.c: Likewise.
+ * gcc.target/arm/vrintzf32.c: Likewise.
+ * gcc.target/arm/vrintzf64.c: Likewise.
+
+2012-11-26 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54997
+ * gfortran.dg/warn_unused_function_2.f90: New.
+
+2012-11-26 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54881
+ * gfortran.dg/associated_6.f90: New.
+ * gfortran.dg/select_type_30.f03: New.
+
+2012-11-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54471
+ * gcc.dg/tree-ssa/vrp86.c: New test.
+ * gcc.c-torture/execute/pr54471.c: New test.
+
+2012-11-26 Hans-Peter Nilsson <hp@bitrange.com>
+
+ PR middle-end/55030
+ * gcc.dg/guality/pr36728-1.c, gcc.dg/guality/pr36728-2.c (foo): Don't
+ use volatile asms, use plain asms. Where the output value for the
+ asm is unused, write a global variable.
+
+2012-11-25 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/sw-1.c (dg-options): Add -mtune=generic.
+
+2012-11-25 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/30146
+ * gfortran.dg/do_check_7.f90: New test.
+
+2012-11-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55446
+ * g++.dg/init/new41.C: New.
+
+2012-11-24 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55314
+ * gfortran.dg/allocate_error_4.f90: New test.
+
+2012-11-24 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * lib/gcc-gdb-test.exp (gdb-test): Pass -- as first argument
+ to send_log.
+
+2012-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/asan-dg.exp (asan_symbolize): Remove all "BFD: " prefixed lines
+ from the output.
+
+ PR c++/54046
+ * g++.dg/warn/Wreturn-type-8.C: New test.
+
+ PR middle-end/55430
+ * gcc.dg/pr55430.c: New test.
+
+2012-11-23 Kostya Serebryany <kcc@google.com>
+
+ * c-c++-common/asan/memcmp-1.c: Update to match the new libsanitizer.
+
+2012-11-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr40.ad[sb]: New test.
+
+2012-11-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr39.adb: New test.
+
+2012-11-23 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.dg/unroll_5.c: Add dg-require-effective-target int32plus.
+ * gcc.dg/pr55150-1.c: Same.
+ * gcc.dg/torture/pr54894.c: Add size32plus.
+
+2012-11-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/55435
+ * c-c++-common/asan/attrib-1.c: New test.
+
+2012-11-22 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/builtin-bswap-1.c: New test.
+ * gcc.target/aarch64/builtin-bswap-2.c: New test.
+
+2012-11-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55432
+ * g++.dg/cpp0x/constexpr-55432.C: New.
+
+2012-11-21 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55352
+ * gfortran.dg/namelist_76.f90: New.
+
+2012-11-21 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/ipcp-agg-7.c: New test.
+ * gcc.dg/ipa/ipcp-agg-8.c: Likewise.
+
+2012-11-21 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55260
+ * g++.dg/torture/pr55260-2.C: New test.
+
+2012-11-21 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/torture/pr55238.c: Remove hidden attribute.
+
+2012-11-21 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Skip on ARM Cortex-M0.
+ * gcc.dg/tree-ssa/vrp47.c: Ditto.
+
+2012-11-20 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/19398
+ * gcc.target/i386/pr19398.c: New test.
+
+2012-11-20 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55260
+ * g++.dg/torture/pr55260-1.C: New test.
+
+2012-11-20 Sofiane Naci <sofiane.naci@arm.com>
+
+ * gcc.target/aarch64/atomic-comp-swap-release-acquire.c: New testcase.
+ * gcc.target/aarch64/atomic-op-acq_rel.c: Likewise.
+ * gcc.target/aarch64/atomic-op-acquire.c: Likewise.
+ * gcc.target/aarch64/atomic-op-char.c: Likewise.
+ * gcc.target/aarch64/atomic-op-consume.c: Likewise.
+ * gcc.target/aarch64/atomic-op-imm.c: Likewise.
+ * gcc.target/aarch64/atomic-op-int.c: Likewise.
+ * gcc.target/aarch64/atomic-op-long.c: Likewise.
+ * gcc.target/aarch64/atomic-op-relaxed.c: Likewise.
+ * gcc.target/aarch64/atomic-op-release.c: Likewise.
+ * gcc.target/aarch64/atomic-op-seq_cst.c: Likewise.
+ * gcc.target/aarch64/atomic-op-short.c: Likewise.
+
+2012-11-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/55094
+ * gcc.dg/pr55094.c: New test.
+
+ PR rtl-optimization/54921
+ * gcc.dg/pr54921.c: New test.
+
+2012-11-19 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/i386/pr55359.c: New test.
+
+2012-11-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/tls/thread_local-order1.C: Add dg-require-cxa-atexit.
+ * g++.dg/tls/thread_local3g.C: Likewise.
+ * g++.dg/tls/thread_local4g.C: Likewise.
+ * g++.dg/tls/thread_local5g.C: Likewise.
+ * g++.dg/tls/thread_local6g.C: Likewise.
+ * g++.dg/tls/thread_local-cse.C: XFAIL on Solaris 9.
+ * g++.dg/tls/thread_local2.C: Likewise.
+ * g++.dg/tls/thread_local2g.C: Likewise.
+ * g++.dg/tls/thread_local6.C: Likewise.
+
+2012-11-19 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/tm/pr51516.C: Adjust for uninstrumented code path.
+ * gcc.dg/tm/clone-1.c: New test.
+
+2012-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55368
+ * g++.dg/parse/struct-5.C: New.
+
+2012-11-19 Tom de Vries <tom@codesourcery.com>
+
+ PR rtl-optimization/55315
+ * gcc.target/mips/pr55315.c: New test.
+
+2012-11-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55236
+ * gcc.dg/pr55236.c: New test.
+
+ PR testsuite/55188
+ * gcc.dg/pr19105.c: Accept also optimizing
+ -[2, 2] and -[3, 3] and -[4, 4] range tests together.
+
+ * lib/asan-dg.exp (asan_symbolize): Prune BFD: prefixed error messages
+ from addr2line_output. Increment idx if asking for more than one
+ address in one object.
+
+2012-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55329
+ * g++.dg/opt/pr55329.C: New test.
+
+2012-11-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55297
+ * gfortran.dg/typebound_operator_18.f90: New.
+
+2012-11-16 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55330
+ * gfortran.dg/pr55330.f90: New test.
+
+2012-11-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * lib/gcc-dg.exp (cleanup-saved-temps): Add .mii to suffixes.
+ * gcc.dg/hoist-register-pressure-1.c: Cleanup hoist rtl dump.
+ * gcc.dg/hoist-register-pressure-2.c: Ditto.
+ * gcc.dg/hoist-register-pressure-3.c: Ditto.
+ * gcc.dg/tree-prof/peel-1.c: Cleanup loop2_unroll rtl dump.
+ * gcc.dg/tree-prof/unroll-1.c: Ditto.
+
+2012-11-16 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54875
+ * g++.dg/cpp0x/alias-decl-27.C: New test.
+
+2012-11-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55337
+ * g++.dg/template/alignof2.C: New test.
+
+2012-11-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/mv1.C (dg-options): Add -march=x86-64.
+ * g++.dg/mv6.C (dg-options): Ditto.
+
+2012-11-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * lib/target_suports.exp
+ (check_effective_target_has_w_floating_suffix): New procedure.
+ (check_effective_target_has_q_floating_suffix): Ditto.
+ * g++.dg/cpp0x/gnu_fext-numeric-literals.C: Add dg-error directive
+ for unsupported non-standard suffix on floating constant.
+ * g++.dg/cpp0x/std_fext-numeric-literals.C: Ditto.
+
+2012-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/asan-dg.exp: New file.
+ * gcc.dg/asan/asan.exp: New file.
+ * g++.dg/dg.exp: Prune also asan tests.
+ * g++.dg/asan/asan.exp: New file.
+ * c-c++-common/asan/memcmp-1.c: New test.
+
+2012-11-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55323
+ * g++.dg/cpp0x/vt-55323.C: New.
+
+2012-11-13 Sriraman Tallam <tmsriram@google.com>
+
+ * g++.dg/mv4.C: Add require ifunc. Change error message.
+ * g++.dg/mv5.C: Add require ifunc.
+ * g++.dg/mv6.C: Add require ifunc.
+
+2012-11-13 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55253
+ * gcc.dg/torture/pr55253.c: New test.
+ * gcc.dg/torture/pr55305.c: Likewise.
+
+2012-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/55142
+ * gcc.target/i386/pr55142-1.c: New file.
+ * gcc.target/i386/pr55142-2.c: Likewise.
+
+2012-11-13 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54466
+ * g++.dg/cpp0x/alias-decl-26.C: New test file.
+
+2012-11-13 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/avx256-unaligned-load-2.c: Requre !ia32
+ instead of lp64.
+ * gcc.target/i386/avx256-unaligned-store-2.c: Likewise.
+ * gcc.target/i386/pr49715-2.c: Likewise.
+ * gcc.target/i386/retarg.c: Likewise. Scan both %rdi and %edi.
+
+2012-11-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55281
+ * gcc.dg/vect/fast-math-pr55281.c: New test.
+ * g++.dg/opt/pr55281.C: New test.
+
+ PR rtl-optimization/54127
+ * gcc.dg/torture/pr54127.c: New test.
+
+2012-11-12 Steven Bosscher <steven@gcc.gnu.org>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/51447
+ * gcc.c-torture/execute/pr51447.c: New test.
+
+2012-11-12 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/csinc-2.c: New test.
+
+2012-11-12 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/cmn.c: New test.
+ * gcc.target/aarch64/adds.c: New test.
+ * gcc.target/aarch64/subs.c: New test.
+
+2012-11-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55272
+ * gfortran.dg/coarray_29_1.f90: New.
+ * gfortran.dg/coarray_29_2.f90: New.
+
+2012-11-12 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.dg/hoist-register-pressure-3.c: New test.
+
+2012-11-11 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/sh4a-fprun.c: Add test_sinf and test_cosf noinline
+ wrappers around sinf and cosf.
+
+2012-11-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/55247
+ PR middle-end/55259
+ * gcc.target/i386/pr55247-2.c: New file.
+
+2012-11-11 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR middle-end/55263
+ * g++.dg/pr55263.C: New test.
+
+2012-11-11 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55238
+ * testsuite/gcc.dg/torture/pr55238.c: New test.
+
+2012-11-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.dg/torture/pr54920.c: Add "-fno-common" option on hppa*-*-hpux*.
+ * c-c++-common/torture/vector-subscript-1.c: Likewise.
+ * c-c++-common/torture/vector-subscript-2.c: Likewise.
+
+2012-11-10 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/cunroll-1.c: Fix bogus testcase.
+
+2012-11-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr55247.c: Require maybe_x32 target. Add
+ -mno-sse -mno-mmx to dg-options. Reformat.
+
+2012-11-10 David Edelsohn <dje.gcc@gmail.com>
+
+ * c-c++-common/scal-to-vec2.c: Ignore non-standard ABI message.
+ * c-c++-common/vector-compare-1.c: Same.
+ * c-c++-common/vector-compare-2.c: Same.
+ * g++.dg/other/unused1.C: Skip on AIX.
+ * g++.dg/other/anon5.C: Allow Undefined to be capitalized. Ignore
+ extra message on AIX.
+
+2012-11-10 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/55247
+ * gcc.target/i386/pr55247.c: New test.
+
+2012-11-09 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.c-torture/execute/20121108-1.c: New test.
+
+2012-11-09 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/54413
+ * g++.dg/cpp0x/gnu_fext-numeric-literals.C: New.
+ * g++.dg/cpp0x/std_fext-numeric-literals.C: New.
+ * g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C: New.
+ * g++.dg/cpp0x/std_fno-ext-numeric-literals.C: New.
+
+2012-11-09 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * gcc.dg/Warray-bounds-3.c (bar): Keep array access within
+ bounds for ABDAY, DAY, ABMON, MON, AM_PM.
+ * gcc.dg/vect/pr22506.c (foo): Reduce loop iterations to within
+ array bounds.
+ * gcc.dg/vect/pr34005.c (XdmcpUnwrap): Likewise.
+
+2012-11-09 Aldy Hernandez <aldyh@redhat.com>
+
+ * g++.dg/tm/pr47530-2.C: Adjust for uninstrumented code path.
+ * g++.dg/tm/pr47530.C: Same.
+
+2012-11-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/54859
+ * g++.dg/cpp0x/alias-decl-25.C: New.
+
+ * g++.dg/abi/abi-tag1.C: New.
+ * g++.dg/abi/abi-tag2.C: New.
+
+2012-11-09 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55154
+ * gcc.target/i386/pr55154.c: New test.
+
+2012-11-09 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55151
+ * gcc.dg/pr55151.c: Move ...
+ * gcc.target/i386/pr55151.c: ... here.
+
+2012-11-09 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/54472
+ * gcc.dg/pr54472.c: New test.
+
+2012-11-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/stack_check3.ad[sb]: New test.
+
+2012-11-08 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-gc-tests): Handle runoutput test type
+ with arguments. Handle errorcheckoutput and rundir test types.
+
+2012-11-08 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR tree-optimization/55191
+ * gcc.dg/pr55191.c: New test.
+
+2012-11-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54499
+ * g++.dg/debug/pr54499.C: New test.
+
+2012-11-08 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/48636
+ * gcc.dg/winline-3.c: Update.
+
+2012-11-08 Martin Jambor <mjambor@suse.cz>
+
+ * gfortran.dg/ipcp-array-1.f90: New test.
+
+2012-11-08 Florian Weimer <fweimer@redhat.com>
+
+ * g++.old-deja/g++.abi/cxa_vec.C: Fix typo in comment.
+
+2012-11-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55151
+ * gcc.dg/pr55151.c: Use ia32 instead of x86_64.
+
+2012-11-07 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/tree-ssa/cunroll-1.c: Scan cunrolli dump.
+
+2012-11-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/compile/20121107-1.c: New test.
+
+2012-11-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55151
+ * gcc.dg/pr55151.c: Compile it only for x86_64.
+
+2012-11-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55122
+ * gcc.dg/pr55122.c: New test.
+
+2012-11-07 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/pr46728-[1234578].c: Tighten regex to ignore
+ word powerpc.
+ * gcc.target/powerpc/vsx-mass-1.c: Escape [ and ] in regex.
+ * gcc.target/powerpc/loop_align.c: Skip on AIX.
+ * gcc.target/powerpc/ppc-pow.c: Allow dot symbols in branch.
+ * gcc.target/powerpc/tfmode_off.c: Skip on AIX.
+
+2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/53063
+ * gcc.dg/warn-nsstring.c: Use -Wformat explicitly.
+
+2012-11-07 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/51294
+ * c-c++-common/pr51294.c: New.
+
+2012-11-07 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/53787
+ * gcc.dg/ipa/ipa-5.c: Adjust.
+ * gcc.dg/ipa/ipcp-agg-1.c: New test.
+ * gcc.dg/ipa/ipcp-agg-2.c: Likewise.
+ * gcc.dg/ipa/ipcp-agg-3.c: Likewise.
+ * gcc.dg/ipa/ipcp-agg-4.c: Likewise.
+ * gcc.dg/ipa/ipcp-agg-5.c: Likewise.
+ * gcc.dg/ipa/ipcp-agg-6.c: Likewise.
+ * gfortran.dg/pr48636.f90: Add -fno-ipa-cp.
+ * gfortran.dg/pr48636-2.f90: New test.
+ * gfortran.dg/pr53787.f90: Likewise.
+
+2012-11-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55226
+ Revert:
+ 2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54922
+ * g++.dg/cpp0x/constexpr-union4.C: New.
+
+2012-11-07 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.target/aarch64/dwarf-cfa-reg.c: New test.
+
+2012-11-07 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ PR target/49220
+ * gcc.c-torture/compile/pr49220.c: New test.
+
+2012-11-07 Florian Weimer <fweimer@redhat.com>
+
+ * g++.dg/init/new40.C: New.
+
+2012-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54693
+ * gcc.dg/guality/pr54693-2.c: New test.
+
+2012-11-06 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/vect-fmaxv-fminv-compile.c: Add
+ -fno-vect-cost-model.
+
+2012-11-06 Aldy Hernandez <aldyh@redhat.com>
+
+ * c-c++-common/tm/trxn-expr-3.c: Adjust for uninstrumented code path.
+ * gcc.dg/tm/debug-1.c: Same.
+ * gcc.dg/tm/irrevocable-3.c: Same.
+ * gcc.dg/tm/irrevocable-4.c: Same.
+ * gcc.dg/tm/memopt-10.c: Same.
+ * gcc.dg/tm/memopt-11.c: Same.
+ * gcc.dg/tm/props-4.c: Same.
+ * gcc.dg/tm/wrap-3.c: Same.
+ * gcc.dg/tm/wrap-4.c: Same.
+
+2012-11-06 Andrew Pinski <apinski@cavium.com>
+
+ * g++.dg/abi/aarch64_guard1.C: Add -fno-section-anchors.
+
+2012-11-06 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/loop-1.c: Make to look like a good unroling
+ candidate still.
+ * gcc.dg/tree-ssa/loop-23.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-1.c: Unrolling now happens early.
+ * gcc.dg/tree-prof/unroll-1.c: Remove confused dg-options.
+
+2012-11-06 David Edelsohn <dje.gcc@gmail.com>
+
+ * const-uniq-1.c: Expand regex to match AIX XCOFF labels.
+
+2012-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/41993
+ * gcc.dg/torture/pr41993.c: New test.
+
+2012-11-06 Jan Hubicka <jh@suse.cz>
+
+ * gcc.target/i386/l_fma_float_?.c: Update.
+ * gcc.target/i386/l_fma_double_?.c: Update.
+
+2012-11-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-8.c: New.
+ * gcc.target/sh/pr54089-9.c: New.
+
+2012-11-06 Vladimir Yakovlev <vladimir.b.yakovlev@intel.com>
+
+ PR target/47440
+ * gcc.target/i386/avx-vzeroupper-5.c: Changed scan-assembler-times.
+ * gcc.target/i386/avx-vzeroupper-8.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-9.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-10.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-11.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-12.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-19.c: Likewis.
+ * gcc.target/i386/avx-vzeroupper-27.c: New.
+
+2012-11-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54917
+ * gfortran.dg/transfer_class_1.f90: New.
+ * gfortran.dg/transfer_class_2.f90: New.
+
+2012-11-05 Sriraman Tallam <tmsriram@google.com>
+
+ * testsuite/g++.dg/mv1.C: New test.
+ * testsuite/g++.dg/mv2.C: New test.
+ * testsuite/g++.dg/mv3.C: New test.
+ * testsuite/g++.dg/mv4.C: New test.
+ * testsuite/g++.dg/mv5.C: New test.
+ * testsuite/g++.dg/mv6.C: New test.
+
+2012-11-05 Hans-Peter Nilsson <hp@axis.com>
+
+ PR testsuite/55186
+ * gcc.dg/const-uniq-1.c (a): Increase length four times.
+
+2012-11-05 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ * gcc.dg/torture/pr53922.c: Use -Wl,-undefined,dynamic_lookup on
+ darwin.
+
+2012-11-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/torture/20121105-1.C: New test.
+
+2012-11-05 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.dg/torture/fp-compare.c: New testcase.
+
+2012-11-05 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/const-1.c: Update.
+ * gcc.dg/pure-1.c: Update.
+
+2012-11-05 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55151
+ * gcc.dg/pr55151.c: New test.
+
+2012-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54970
+ PR debug/54971
+ * gcc.dg/guality/pr54970.c: Use NOP instead of "NOP" in inline-asm.
+
+2012-11-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR testsuite/51128
+ * gcc.dg/torture/pr55018.c: Skip if -fno-fat-lto-objects was passed.
+
+2012-11-05 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/autopar/pr49960.c: Fix testcase.
+
+2012-11-05 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/tree-ssa/cunroll-9.c: Dump cunrolli details.
+ Fix scan-tree-dump-times directive.
+
+2012-11-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55199
+ * gfortran.dg/associate_12.f90: New.
+
+2012-11-03 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/54255
+ * lib/target-supports.exp (check_effective_target_masm_intel): New
+ proc.
+ * gcc.target/i386/asm-dialect-1.c: Use dg-require-effective-target
+ masm_intel.
+
+2012-11-03 H.J. Lu <hjl.tools@gmail.com>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+
+ * lib/target-supports.exp (check_effective_target_maybe_x32): New proc.
+ * gcc.target/i386/pr54457.c: Use dg-require-effective-target maybe_x32.
+ * gcc.target/i386/pr53249.c: Likewise.
+
+2012-11-03 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/octeon-bbit-3.c: Change the second call to abort to
+ call abort1 so that cross jumping does not happen.
+
+2012-11-03 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-18.c: New.
+ * gcc.target/sh/pr51244-19.c: New.
+
+2012-11-03 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/octeon-exts-7.c (bar): Make sure the extraction of
+ b requires a 64-bit operation followed by a truncation.
+
+2012-11-02 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/loop-38.c: Correct testcase.
+
+2012-11-02 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr48258-2.c: Simplfy the acceptance
+ conditions to verify the reduction code is vectorized.
+
+ * gcc.target/powerpc/pr46728-1.c: Pass -fno-ident to eliminate failures
+ in case 'pow', such as 'powerpc' is used in the compiler version name.
+ * gcc.target/powerpc/pr46728-2.c: Likewise.
+ * gcc.target/powerpc/pr46728-3.c: Likewise.
+ * gcc.target/powerpc/pr46728-4.c: Likewise.
+ * gcc.target/powerpc/pr46728-5.c: Likewise.
+ * gcc.target/powerpc/pr46728-7.c: Likewise.
+ * gcc.target/powerpc/pr46728-8.c: Likewise.
+ * gcc/testsuite/gcc.dg/pr46728-6.c: Likewise.
+
+2012-11-02 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/loop-38.c: New testcase.
+
+2012-11-02 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/cunroll-10.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-9.c: New testcase.
+
+2012-11-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR middle-end/55130
+ * gcc.target/i386/pr55130.c: New test.
+
+2012-11-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/55147
+ * gcc.target/i386/pr55147.c: New test.
+
+2012-11-01 David Edelsohn <dje.gcc@gmail.com>
+
+ * gfortran.dg/default_format_1.f90: XFAIL on AIX.
+ * gfortran.dg/default_format_denormal_1.f90: Same.
+
+2012-11-01 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/55001
+ * g++.dg/ext/vector19.C: Remove target restrictions.
+ * gcc.dg/fold-compare-7.c: New testcase.
+
+2012-11-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/55160
+ * gcc.target/sh/pr55160.c: New.
+
+2012-11-01 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/vsx-mass-1.c: Check for dot symbols in
+ scan-assembler regex.
+
+2012-11-01 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR middle-end/55150
+ * gcc.dg/pr55150.c: Rename to gcc.dg/pr55150-1.c.
+ * gcc.dg/pr55150-2.c: New test.
+
+2012-11-01 Sharad Singhai <singhai@google.com>
+
+ * testsuite/gcc.dg/plugin/selfassign.c: Add opgtroup_flags initializer.
+ * testsuite/gcc.dg/plugin/one_time_plugin.c: Likewise.
+ * testsuite/g++.dg/plugin/selfassign.c: Likewise.
+ * testsuite/g++.dg/plugin/dumb_plugin.c: Likewise.
+
+2012-10-31 Dehao Chen <dehao@google.com>
+
+ * g++.dg/debug/dwarf2/block.C: New testcase.
+
+2012-10-31 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/pr44974.c: Add noinline.
+
+2012-10-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/53718
+ * gfortran.dg/class_54.f90: New.
+
+2012-10-31 Steven Bosscher <steven@gcc.gnu.org>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55018
+ * gcc.dg/torture/pr55018.c: New test.
+
+2012-10-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54583
+ * g++.dg/ext/vla13.C: New.
+
+2012-10-31 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR middle-end/55150
+ * gcc.dg/pr55150.c: New test.
+
+2012-10-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55134
+ * gfortran.dg/associate_11.f90: New.
+
+2012-10-31 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/54955
+ * g++.dg/cpp0x/gen-attrs-48-2.C: New test.
+
+2012-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/19105
+ PR tree-optimization/21643
+ PR tree-optimization/46309
+ * gcc.dg/pr19105.c: New test.
+ * gcc.dg/pr21643.c: New test.
+ * gcc.dg/pr46309-2.c: New test.
+ * gcc.c-torture/execute/pr46309.c: New test.
+
+2012-10-31 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/dimode_off.c: New.
+ * gcc.target/powerpc/timode_off.c: New.
+ * gcc.target/powerpc/dfmode_off.c: New.
+ * gcc.target/powerpc/tfmode_off.c: New.
+
+2012-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/55093
+ * gcc.target/i386/pr55093.c: New file.
+
+2012-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr55116.c: Renamed to ...
+ * gcc.target/i386/pr55116-1.c: This.
+
+2012-10-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/pr55116-2.c: New file.
+
+2012-10-30 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/slp-perm-2.c: Adjust.
+
+2012-10-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55111
+ * gcc.dg/torture/pr55111.c: New testcase.
+
+2012-10-30 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53988
+ * gcc.target/sh/pr53988.c: New.
+
+2012-10-30 Bin Cheng <bin.cheng@arm.com>
+
+ PR target/54989
+ * gcc.dg/hoist-register-pressure-1.c: Rename from
+ hoist-register-pressure.c. Add nonpic condition.
+ * gcc.dg/hoist-register-pressure-2.c: New testcase.
+
+2012-10-29 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR c++/54930
+ * gcc.dg/Wreturn-local-addr.c: New.
+ * g++.dg/warn/Wno-return-local-addr.C: New.
+ * g++.dg/warn/Wreturn-local-addr.C: New.
+
+2012-10-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/55116
+ * gcc.target/i386/pr55116.c: New file.
+
+2012-10-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/53066
+ * gcc.dg/Wshadow-4.c: New.
+ * gcc.dg/Wshadow-4.h: New.
+
+2012-10-29 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/54693
+ * gcc.dg/guality/pr54693.c: New.
+
+2012-10-29 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/55027
+ * gcc.dg/pr55027.c: New testcase.
+
+2012-10-29 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/inline-6.c: New testcase.
+
+2012-10-29 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55106
+ * g++.dg/pr55106.C: New.
+
+2012-10-29 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53695
+ * gcc.dg/torture/pr53695.c: New testcase.
+
+2012-10-28 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/inlinehint-3.c: New testcase.
+
+2012-10-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54958
+ * gfortran.dg/do_check_6.f90: New.
+
+2012-10-27 Dominique Dhumieres <dominiq@lps.ens.fr>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR target/54404
+ * g++.dg/other/darwin-cfstring1.C: Add -ftrack-macro-expansion=0
+ to dg-options.
+ * obj-c++.dg/strings/const-cfstring-2.mm: Likewise.
+
+2012-10-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/34283
+ * gcc.target/i386/pr34283.c: New test.
+
+2012-10-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/55081
+ * g++.dg/opt/pr55081.C: New test.
+
+ PR debug/54970
+ PR debug/54971
+ * gcc.dg/guality/pr54970.c: New test.
+
+2012-10-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54984
+ * g++.dg/template/new11.C: New.
+
+2012-10-26 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/54824
+ * gcc.dg/torture/pr54824.c: New testcase.
+
+2012-10-26 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ * gcc.target/i386/fxsave-1.c: New.
+ * gcc.target/i386/fxsave64-1.c: Ditto.
+ * gcc.target/i386/fxrstor-1.c: Ditto.
+ * gcc.target/i386/fxrstor64-1.c: Ditto.
+ * gcc.target/i386/xsave-1.c: Ditto.
+ * gcc.target/i386/xsave64-1.c: Ditto.
+ * gcc.target/i386/xrstor-1.c: Ditto.
+ * gcc.target/i386/xrstor64-1.c: Ditto.
+ * gcc.target/i386/xsaveopt-1.c: Ditto.
+ * gcc.target/i386/xsaveopt64-1.c: Ditto.
+ * gcc.target/i386/sse-12.c: Add -mfxsr, -mxsaveopt.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2012-10-25 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/cunroll-4.c: Update; we now remove the loop
+ at ivcanon time.
+
+2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53761
+ * g++.dg/ext/transparent-union.C: New.
+
+2012-10-25 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/54427
+ * g++.dg/ext/vector19.C: New testcase.
+
+2012-10-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54902
+ * g++.dg/torture/pr54902.C: New testcase.
+
+2012-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/34892
+ * g++.dg/template/crash114.C: New.
+
+2012-10-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR bootstrap/55049
+ * gcc.target/i386/pr55049-1.c: New test.
+
+2012-10-24 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55037
+ * gfortran.dg/class_dummy_4.f03: New.
+
+2012-10-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/55010
+ * gcc.dg/pr55010.c: New test.
+
+ PR debug/54828
+ * g++.dg/debug/pr54828.C: New test.
+
+2012-10-23 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gcc.dg/vect/vect-82_64.c: Adjust the dump file.
+ * gcc.dg/vect/vect-83_64.c: Likewise.
+
+2012-10-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54922
+ * g++.dg/cpp0x/constexpr-union4.C: New.
+
+2012-10-23 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/pr54985.c: New test.
+
+2012-10-23 Paul Koning <ni1d@arrl.net>
+
+ PR debug/54508
+ * g++.dg/debug/dwarf2/pr54508.C: New.
+
+2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54844
+ * g++.dg/template/sizeof14.C: New test.
+
+2012-10-23 Ian Bolton <ian.bolton@arm.com>
+ Jim MacArthur <jim.macarthur@arm.com>
+ Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
+ Marcus Shawcroft <marcus.shawcroft@arm.com>
+ Nigel Stephens <nigel.stephens@arm.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Richard Earnshaw <rearnsha@arm.com>
+ Sofiane Naci <sofiane.naci@arm.com>
+ Stephen Thomas <stephen.thomas@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+ Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * lib/target-supports.exp
+ (check_profiling_available): Add AArch64.
+ (check_effective_target_vect_int): Likewise.
+ (check_effective_target_vect_shift): Likewise.
+ (check_effective_target_vect_float): Likewise.
+ (check_effective_target_vect_double): Likewise.
+ (check_effective_target_vect_widen_mult_qi_to_hi): Likewise.
+ (check_effective_target_vect_widen_mult_hi_to_si): Likewise.
+ (check_effective_target_vect_pack_trunc): Likewise.
+ (check_effective_target_vect_unpack): Likewise.
+ (check_effective_target_vect_hw_misalign): Likewise.
+ (check_effective_target_vect_short_mult): Likewise.
+ (check_effective_target_vect_int_mult): Likewise.
+ (check_effective_target_vect_stridedN): Likewise.
+ (check_effective_target_sync_int_long): Likewise.
+ (check_effective_target_sync_char_short): Likewise.
+ (check_vect_support_and_set_flags): Likewise.
+ (check_effective_target_aarch64_tiny): New.
+ (check_effective_target_aarch64_small): New.
+ (check_effective_target_aarch64_large): New.
+ * g++.dg/other/PR23205.C: Enable aarch64.
+ * g++.dg/other/pr23205-2.C: Likewise.
+ * g++.old-deja/g++.abi/ptrmem.C: Likewise.
+ * gcc.c-torture/execute/20101011-1.c: Likewise.
+ * gcc.dg/20020312-2.c: Likewise.
+ * gcc.dg/20040813-1.c: Likewise.
+ * gcc.dg/builtin-apply2.c: Likewise.
+ * gcc.dg/stack-usage-1.c: Likewise.
+
+2012-10-23 Ian Bolton <ian.bolton@arm.com>
+ Jim MacArthur <jim.macarthur@arm.com>
+ Chris Schlumberger-Socha <chris.schlumberger-socha@arm.com>
+ Marcus Shawcroft <marcus.shawcroft@arm.com>
+ Nigel Stephens <nigel.stephens@arm.com>
+ Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Richard Earnshaw <rearnsha@arm.com>
+ Sofiane Naci <sofiane.naci@arm.com>
+ Stephen Thomas <stephen.thomas@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+ Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.target/aarch64/aapcs/aapcs64.exp: New file.
+ * gcc.target/aarch64/aapcs/abitest-2.h: New file.
+ * gcc.target/aarch64/aapcs/abitest-common.h: New file.
+ * gcc.target/aarch64/aapcs/abitest.S: New file.
+ * gcc.target/aarch64/aapcs/abitest.h: New file.
+ * gcc.target/aarch64/aapcs/func-ret-1.c: New file.
+ * gcc.target/aarch64/aapcs/func-ret-2.c: New file.
+ * gcc.target/aarch64/aapcs/func-ret-3.c: New file.
+ * gcc.target/aarch64/aapcs/func-ret-3.x: New file.
+ * gcc.target/aarch64/aapcs/func-ret-4.c: New file.
+ * gcc.target/aarch64/aapcs/func-ret-4.x: New file.
+ * gcc.target/aarch64/aapcs/ice_1.c: New file.
+ * gcc.target/aarch64/aapcs/ice_2.c: New file.
+ * gcc.target/aarch64/aapcs/ice_3.c: New file.
+ * gcc.target/aarch64/aapcs/ice_4.c: New file.
+ * gcc.target/aarch64/aapcs/ice_5.c: New file.
+ * gcc.target/aarch64/aapcs/macro-def.h: New file.
+ * gcc.target/aarch64/aapcs/test_1.c: New file.
+ * gcc.target/aarch64/aapcs/test_10.c: New file.
+ * gcc.target/aarch64/aapcs/test_11.c: New file.
+ * gcc.target/aarch64/aapcs/test_12.c: New file.
+ * gcc.target/aarch64/aapcs/test_13.c: New file.
+ * gcc.target/aarch64/aapcs/test_14.c: New file.
+ * gcc.target/aarch64/aapcs/test_15.c: New file.
+ * gcc.target/aarch64/aapcs/test_16.c: New file.
+ * gcc.target/aarch64/aapcs/test_17.c: New file.
+ * gcc.target/aarch64/aapcs/test_18.c: New file.
+ * gcc.target/aarch64/aapcs/test_19.c: New file.
+ * gcc.target/aarch64/aapcs/test_2.c: New file.
+ * gcc.target/aarch64/aapcs/test_20.c: New file.
+ * gcc.target/aarch64/aapcs/test_21.c: New file.
+ * gcc.target/aarch64/aapcs/test_22.c: New file.
+ * gcc.target/aarch64/aapcs/test_23.c: New file.
+ * gcc.target/aarch64/aapcs/test_24.c: New file.
+ * gcc.target/aarch64/aapcs/test_25.c: New file.
+ * gcc.target/aarch64/aapcs/test_26.c: New file.
+ * gcc.target/aarch64/aapcs/test_3.c: New file.
+ * gcc.target/aarch64/aapcs/test_4.c: New file.
+ * gcc.target/aarch64/aapcs/test_5.c: New file.
+ * gcc.target/aarch64/aapcs/test_6.c: New file.
+ * gcc.target/aarch64/aapcs/test_7.c: New file.
+ * gcc.target/aarch64/aapcs/test_8.c: New file.
+ * gcc.target/aarch64/aapcs/test_9.c: New file.
+ * gcc.target/aarch64/aapcs/test_align-1.c: New file.
+ * gcc.target/aarch64/aapcs/test_align-2.c: New file.
+ * gcc.target/aarch64/aapcs/test_align-3.c: New file.
+ * gcc.target/aarch64/aapcs/test_align-4.c: New file.
+ * gcc.target/aarch64/aapcs/test_complex.c: New file.
+ * gcc.target/aarch64/aapcs/test_int128.c: New file.
+ * gcc.target/aarch64/aapcs/test_quad_double.c: New file.
+ * gcc.target/aarch64/aapcs/type-def.h: New file.
+ * gcc.target/aarch64/aapcs/va_arg-1.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-10.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-11.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-12.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-2.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-3.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-4.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-5.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-6.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-7.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-8.c: New file.
+ * gcc.target/aarch64/aapcs/va_arg-9.c: New file.
+ * gcc.target/aarch64/aapcs/validate_memory.h: New file.
+ * gcc.target/aarch64/aarch64.exp: New file.
+ * gcc.target/aarch64/adc-1.c: New file.
+ * gcc.target/aarch64/adc-2.c: New file.
+ * gcc.target/aarch64/asm-1.c: New file.
+ * gcc.target/aarch64/clrsb.c: New file.
+ * gcc.target/aarch64/clz.c: New file.
+ * gcc.target/aarch64/ctz.c: New file.
+ * gcc.target/aarch64/csinc-1.c: New file.
+ * gcc.target/aarch64/csinv-1.c: New file.
+ * gcc.target/aarch64/csneg-1.c: New file.
+ * gcc.target/aarch64/extend.c: New file.
+ * gcc.target/aarch64/fcvt.x: New file.
+ * gcc.target/aarch64/fcvt_double_int.c: New file.
+ * gcc.target/aarch64/fcvt_double_long.c: New file.
+ * gcc.target/aarch64/fcvt_double_uint.c: New file.
+ * gcc.target/aarch64/fcvt_double_ulong.c: New file.
+ * gcc.target/aarch64/fcvt_float_int.c: New file.
+ * gcc.target/aarch64/fcvt_float_long.c: New file.
+ * gcc.target/aarch64/fcvt_float_uint.c: New file.
+ * gcc.target/aarch64/fcvt_float_ulong.c: New file.
+ * gcc.target/aarch64/ffs.c: New file.
+ * gcc.target/aarch64/fmadd.c: New file.
+ * gcc.target/aarch64/fnmadd-fastmath.c: New file.
+ * gcc.target/aarch64/frint.x: New file.
+ * gcc.target/aarch64/frint_double.c: New file.
+ * gcc.target/aarch64/frint_float.c: New file.
+ * gcc.target/aarch64/index.c: New file.
+ * gcc.target/aarch64/mneg-1.c: New file.
+ * gcc.target/aarch64/mneg-2.c: New file.
+ * gcc.target/aarch64/mneg-3.c: New file.
+ * gcc.target/aarch64/mnegl-1.c: New file.
+ * gcc.target/aarch64/mnegl-2.c: New file.
+ * gcc.target/aarch64/narrow_high-intrinsics.c: New file.
+ * gcc.target/aarch64/pic-constantpool1.c: New file.
+ * gcc.target/aarch64/pic-symrefplus.c: New file.
+ * gcc.target/aarch64/predefine_large.c: New file.
+ * gcc.target/aarch64/predefine_small.c: New file.
+ * gcc.target/aarch64/predefine_tiny.c: New file.
+ * gcc.target/aarch64/reload-valid-spoff.c: New file.
+ * gcc.target/aarch64/scalar_intrinsics.c: New file.
+ * gcc.target/aarch64/table-intrinsics.c: New file.
+ * gcc.target/aarch64/tst-1.c: New file.
+ * gcc.target/aarch64/vect-abs-compile.c: New file.
+ * gcc.target/aarch64/vect-abs.c: New file.
+ * gcc.target/aarch64/vect-abs.x: New file.
+ * gcc.target/aarch64/vect-compile.c: New file.
+ * gcc.target/aarch64/vect-faddv-compile.c: New file.
+ * gcc.target/aarch64/vect-faddv.c: New file.
+ * gcc.target/aarch64/vect-faddv.x: New file.
+ * gcc.target/aarch64/vect-fmax-fmin-compile.c: New file.
+ * gcc.target/aarch64/vect-fmax-fmin.c: New file.
+ * gcc.target/aarch64/vect-fmax-fmin.x: New file.
+ * gcc.target/aarch64/vect-fmaxv-fminv-compile.c: New file.
+ * gcc.target/aarch64/vect-fmaxv-fminv.x: New file.
+ * gcc.target/aarch64/vect-fp-compile.c: New file.
+ * gcc.target/aarch64/vect-fp.c: New file.
+ * gcc.target/aarch64/vect-fp.x: New file.
+ * gcc.target/aarch64/vect-mull-compile.c: New file.
+ * gcc.target/aarch64/vect-mull.c: New file.
+ * gcc.target/aarch64/vect-mull.x: New file.
+ * gcc.target/aarch64/vect.c: New file.
+ * gcc.target/aarch64/vect.x: New file.
+ * gcc.target/aarch64/vector_intrinsics.c: New file.
+ * gcc.target/aarch64/vfp-1.c: New file.
+ * gcc.target/aarch64/volatile-bitfields-1.c: New file.
+ * gcc.target/aarch64/volatile-bitfields-2.c: New file.
+ * gcc.target/aarch64/volatile-bitfields-3.c: New file.
+ * g++.dg/abi/aarch64_guard1.C: New file.
+
+2012-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54988
+ * c-c++-common/pr54988.c: New test.
+
+2012-10-23 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-prof/peel-1.c: New testcase.
+
+2012-10-23 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR gcc/52945
+ * gcc.dg/lto/pr52634_0.c: Skip the test on Darwin.
+
+2012-10-23 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c99-predef-1.c: New test.
+ * gcc.dg/cpp/cmdlne-dU-1.c, gcc.dg/cpp/cmdlne-dU-2.c,
+ gcc.dg/cpp/cmdlne-dU-3.c, gcc.dg/cpp/cmdlne-dU-4.c,
+ gcc.dg/cpp/cmdlne-dU-5.c, gcc.dg/cpp/cmdlne-dU-6.c,
+ gcc.dg/cpp/cmdlne-dU-7.c, gcc.dg/cpp/cmdlne-dU-8.c,
+ gcc.dg/cpp/cmdlne-dU-9.c, gcc.dg/cpp/cmdlne-dU-10.c,
+ gcc.dg/cpp/cmdlne-dU-11.c, gcc.dg/cpp/cmdlne-dU-12.c,
+ gcc.dg/cpp/cmdlne-dU-13.c, gcc.dg/cpp/cmdlne-dU-14.c,
+ gcc.dg/cpp/cmdlne-dU-15.c, gcc.dg/cpp/cmdlne-dU-16.c,
+ gcc.dg/cpp/cmdlne-dU-17.c, gcc.dg/cpp/cmdlne-dU-18.c,
+ gcc.dg/cpp/cmdlne-dU-19.c, gcc.dg/cpp/cmdlne-dU-20.c,
+ gcc.dg/cpp/cmdlne-dU-21.c, gcc.dg/cpp/cmdlne-dU-22.c,
+ gcc.dg/cpp/mi5.c, gcc.dg/cpp/multiline.c: Add -nostdinc to dg-options.
+
+2012-10-23 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/foldconst-6.c: New testcase.
+
+2012-10-23 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/54937
+ * gcc.c-torture/execute/pr54937.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-2.c: Update.
+
+2012-10-23 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/54967
+ * gfortran.dg/pr54967.f90: New testcase.
+
+2012-10-23 Terry Guo <terry.guo@arm.com>
+
+ PR target/55019
+ * gcc.dg/pr55019.c: New.
+
+2012-10-22 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/55008
+ * gcc.dg/tree-ssa/pr55008.c: New test.
+
+2012-10-22 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55011
+ * gcc.dg/torture/pr55011.c: New testcase.
+
+2012-10-22 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/pr40457-1.c: Adjust expected output.
+ * gcc.target/arm/pr40457-2.c: Likewise.
+ * gcc.target/arm/pr40457-3.c: Likewise.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/limited_with4.ads: New test.
+ * gnat.dg/specs/limited_with4_pkg.ads: New helper.
+
+2012-10-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/modular4.adb: New test.
+ * gnat.dg/modular4_pkg.ads: New helper.
+
+2012-10-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/atomic1.ads: XFAIL on MIPS.
+ * gnat.dg/specs/addr1.ads: Likewise.
+
+2012-10-21 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gcc.dg/webizer.c (main): Add missing exit call.
+
+2012-10-21 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/54465
+ * gfortran.dg/wextra_1.f: New test.
+
+2012-10-20 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-prof/unroll-1.c: New testcase.
+
+2012-10-19 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54224
+ * gfortran.dg/warn_unused_function.f90: New.
+
+2012-10-19 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_prefer_ldrd_strd): New procedure.
+
+2012-10-19 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54981
+ * gcc.dg/pr54981.c: New testcase.
+
+2012-10-19 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ PR target/54892
+ * gcc.target/arm/pr54892.c: New.
+
+2012-10-19 Bin Cheng <bin.cheng@arm.com>
+
+ * testsuite/gcc.dg/hoist-register-pressure.c: New test.
+
+2012-10-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54501
+ * g++.dg/init/array30.C: New.
+ * g++.dg/init/array31.C: Likewise.
+
+2012-10-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54884
+ * gfortran.dg/public_private_module_7.f90: New.
+
+2012-10-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29633
+ * g++.dg/template/pr29633.C: New.
+
+2012-10-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization13.ad[sb]: New test.
+ * gnat.dg/loop_optimization13_pkg.ads: New helper.
+
+2012-10-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gcc.target/arm/neon/vfmaQf32.c: New testcase.
+ * gcc.target/arm/neon/vfmaf32.c: Likewise.
+ * gcc.target/arm/neon/vfmsQf32.c: Likewise.
+ * gcc.target/arm/neon/vfmsf32.c: Likewise.
+
+2012-10-18 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gcc.target/arm/ftest-armv8a-arm.c: New testcase.
+ * gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
+ * gcc.target/arm/ftest-support-arm.h (feature_matrix): Add ARMv8-A row.
+ * gcc.target/arm/ftest-support-thumb.h (feature_matrix): Likewise.
+ * gcc.target/arm/ftest-support.h (architecture): Add ARMv8-A.
+ * lib/target-supports.exp: Add ARMv8-A architecture expectation.
+
+2012-10-16 Jan Hubicka <jh@suse.cz>
+
+ * gcc.target/i386/l_fma_float_?.c: Update.
+ * gcc.target/i386/l_fma_double_?.c: Update.
+ * gfortran.dg/do_1.f90: XFAIL
+ * gcc.dg/tree-ssa/cunroll-1.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-2.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-3.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-4.c: New testcase.
+ * gcc.dg/tree-ssa/cunroll-5.c: New testcase.
+ * gcc.dg/tree-ssa/ldist-17.c: Block cunroll to make testcase still
+ valid.
+
+2012-10-16 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/53063
+ PR c/40989
+ * gcc.dg/Wstrict-overflow-24.c: New.
+
+2012-10-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/50981
+ PR fortran/54618
+ * gfortran.dg/class_optional_1.f90: New.
+ * gfortran.dg/class_optional_2.f90: New.
+
+2012-10-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/54796
+ * gcc.dg/guality/pr54796.c: New test.
+
+ PR tree-optimization/54889
+ * gfortran.dg/pr54889.f90: New test.
+
+2012-10-16 Eric Botcazou <ebotcazou@adacore.com>
+
+ * g++.dg/other/dump-ada-spec-2.C: New test.
+
+2012-10-16 Easwaran Raman <eraman@google.com>
+
+ * gcc.dg/tree-prof/switch-case-1.c: New test case.
+ * gcc.dg/tree-prof/switch-case-2.c: New test case.
+
+2012-10-16 Hans-Peter Nilsson <hp@bitrange.com>
+
+ * gcc.dg/torture/stackalign/builtin-apply-2.c,
+ gcc.dg/builtin-apply2.c: Correct STACK_ARGUMENTS_SIZE for MMIX.
+
+2012-10-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54925
+ * gcc.c-torture/compile/pr54925.c: New.
+
+2012-10-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-17.c: New.
+
+2012-10-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54760
+ * gcc.target/sh/pr54760-2.c: Add long long and unsigned long long test
+ functions.
+ * gcc.target/sh/pr54760-4.c: New.
+
+2012-10-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/34777
+ * gcc.target/sh/torture/sh-torture.exp: New.
+ * gcc.target/sh/torture/pr34777.c: New.
+
+2012-10-15 Matthias Klose <doko@ubuntu.com>
+
+ * lib/target-supports.exp (check_profiling_available): Match
+ arm*-*-linux-* for ARM Linux/GNU.
+ * g++.dg/torture/predcom-1.C: Match arm*-*-linux-* for ARM Linux/GNU.
+ * gfortran.dg/enum_10.f90: Likewise.
+ * gfortran.dg/enum_9.f90: Likewise.
+ * gcc.target/arm/synchronize.c: Likewise.
+ * g++.old-deja/g++.jason/enum6.C: Likewise.
+ * g++.old-deja/g++.other/enum4.C: Likewise.
+ * g++.old-deja/g++.law/enum9.C: Likewise.
+
+2012-10-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/tls/thread_local-cse.C: Move dg-do line.
+ * g++.dg/tls/thread_local-wrap4.C: Require fpic.
+
+2012-10-15 Alexandre Oliva <aoliva@redhat.com>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/17805
+ * g++.dg/overload/operator6.C: New.
+
+2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50080 (again)
+ * g++.dg/parse/tmpl-outside2.C: Tweak, error in C++98.
+ * g++.dg/parse/tmpl-outside1.C: Likewise.
+ * g++.dg/template/qualttp18.C: Likewise.
+ * g++.old-deja/g++.pt/memtemp87.C: Likewise.
+ * g++.old-deja/g++.pt/overload13.C: Likewise.
+
+2012-10-15 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx256-unaligned-load-1.c: Update asm scan patterns.
+ * gcc.target/i386/avx256-unaligned-load-2.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-load-3.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-load-4.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-1.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-2.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-3.c: Ditto.
+ * gcc.target/i386/avx256-unaligned-store-4.c: Ditto.
+
+2012-10-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50080
+ * g++.dg/parse/tmpl-outside2.C: New.
+ * g++.dg/parse/tmpl-outside1.C: Adjust.
+ * g++.dg/template/qualttp18.C: Likewise.
+ * g++.old-deja/g++.pt/memtemp87.C: Likewise.
+ * g++.old-deja/g++.pt/overload13.C: Likewise.
+
+2012-10-15 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/54915
+ * gcc.dg/tree-ssa/pr54915.c: New testcase.
+
+2012-10-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54920
+ * gcc.dg/torture/pr54920.c: New testcase.
+
+2012-10-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/unchecked_convert9.ad[sb]: New test.
+
+2012-10-13 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/tls/thread_local7g.C: Require tls_native.
+
+2012-10-14 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/inh-ctor1.C: New.
+ * g++.dg/cpp0x/inh-ctor2.C: New.
+ * g++.dg/cpp0x/inh-ctor3.C: New.
+ * g++.dg/cpp0x/inh-ctor4.C: New.
+ * g++.dg/cpp0x/inh-ctor5.C: New.
+ * g++.dg/cpp0x/inh-ctor6.C: New.
+ * g++.dg/cpp0x/inh-ctor7.C: New.
+ * g++.dg/cpp0x/inh-ctor8.C: New.
+ * g++.dg/cpp0x/inh-ctor9.C: New.
+ * g++.dg/cpp0x/inh-ctor10.C: New.
+ * g++.dg/cpp0x/inh-ctor11.C: New.
+ * g++.dg/cpp0x/inh-ctor12.C: New.
+ * g++.dg/cpp0x/inh-ctor13.C: New.
+
+2012-10-14 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR rtl-optimization/54919
+ * gcc.dg/pr54919.c: New testcase.
+
+2012-10-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53581
+ * g++.dg/template/crash113.C: New.
+
+2012-10-14 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/unroll_5.c: New testcase.
+
+2012-10-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52643
+ * g++.dg/opt/pr52643.C: New.
+
+2012-10-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54602
+ * gcc.target/sh/pr54602-1.c: New.
+ * gcc.target/sh/pr54602-2.c: New.
+ * gcc.target/sh/pr54602-3.c: New.
+ * gcc.target/sh/pr54602-4.c: New.
+
+2012-10-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54680
+ * gcc.target/sh/pr54680.c: New.
+
+2012-10-12 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/webizer.c: New testcase.
+
+2012-10-12 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/vect/pr48765.c: Skip for conflicting options, don't
+ specify -m64.
+
+ * gcc.target/arm/div64-unwinding.c: Skip, don't xfail, for GNU/Linux.
+
+ * lib/target-supports.exp (check_effective_target_arm_hard_vfp_ok):
+ Return 0 if already specifying -mfloat-abi other than hard.
+
+2012-10-12 Joe Seymour <jseymour@codesourcery.com>
+
+ * gcc.dg/pr53060.c: Prune irrelevant warning.
+
+2012-10-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54381
+ * c-c++-common/Wsizeof-pointer-memaccess1.c: New test.
+ * c-c++-common/Wsizeof-pointer-memaccess2.c: New test.
+ * gcc.dg/Wsizeof-pointer-memaccess1.c: New test.
+ * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: Test also stpncpy.
+ Adjust expected wording of warnings for *cmp* builtins.
+ * g++.dg/torture/Wsizeof-pointer-memaccess1.C: Likewise.
+ * g++.dg/torture/Wsizeof-pointer-memaccess2.C: Likewise.
+
+2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/24449
+ * g++.dg/parse/friend-main.C: New.
+
+2012-10-12 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/53055
+ * g++.dg/pr53055.C: New testcase.
+
+2012-10-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52744
+ * g++.dg/cpp0x/pr52744.C: New.
+
+2012-10-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40453
+ * gfortran.dg/dummy_procedure_9.f90: New.
+
+2012-10-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54894
+ * gcc.dg/torture/pr54894.c: New testcase.
+
+2012-10-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-13.c: New.
+ * gcc.target/sh/pr51244-14.c: New.
+ * gcc.target/sh/pr51244-15.c: New.
+ * gcc.target/sh/pr51244-16.c: New.
+
+2012-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51878
+ * g++.dg/cpp0x/decltype45.C: New.
+
+2012-10-11 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54784
+ * gfortran.dg/class_allocate_13.f90: New.
+
+2012-10-11 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/visibility/pragma-override1.C: Fix target markup.
+ * g++.dg/ext/visibility/pragma-override2.C: Fix target markup.
+
+ * g++.dg/gomp/tls-5.C: Require tls_native.
+ * g++.dg/tls/thread_local7.C: Require tls_native.
+ * g++.dg/tls/static2.C: New.
+
+2012-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/36107
+ * g++.dg/ext/weak5.C: New.
+
+2012-10-11 Marc Glisse <marc.glisse@inria.fr>
+
+ PR testsuite/54868
+ * gcc.dg/tree-ssa/forwprop-22.c: Move ...
+ * gcc.dg/vect/nodump-forwprop-22.c: ... here. Adapt options.
+
+2012-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/43765
+ * g++.dg/parse/pr43765.C: New.
+
+2012-10-11 Uros Bizjak <ubizjak@gmail.com>
+
+ * obj-c++.dg/tls/init-2.mm: Tweak errors.
+
+2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/43663
+ * g++.dg/init/bitfield3.C: New.
+
+2012-10-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips32-dsp-accinit-2.c: Fix test description.
+
+2012-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54877
+ * gcc.dg/torture/pr54877.c: New test.
+
+2012-10-10 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
+
+ PR testsuite/53397
+ * gcc.dg/pr53397-1.c: Moved to gcc.target/i386.
+ * gcc.target/i386/pr53397-1.c: Add -msse2 to dg-options
+ and remove target info from dg-do compile.
+ * gcc.dg/pr53397-2.c: Moved to gcc.target/i386.
+ * gcc.target/i386/pr53397-2.c: Add -msse2 to dg-options
+ and remove target info from dg-do compile.
+
+2012-10-10 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/pr54782.c: Require target with pthread support.
+
+2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53122
+ * g++.dg/cpp0x/auto35.C: New.
+
+2012-10-10 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53540 - using fails to be equivalent to typedef
+ * g++.dg/cpp0x/alias-decl-24.C: New test.
+
+2012-10-10 Dodji Seketeli <dodji@redhat.com>
+
+ * g++.dg/cpp0x/gen-attrs-8.C: Update the test to reflect the fact
+ that c++11 attributes to types are ignored for now.
+ * g++.dg/cpp0x/gen-attrs-36.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-37.C: Likewise
+
+2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53741
+ * g++.dg/cpp0x/lambda/lambda-ice9.C: New.
+
+2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50478
+ * g++.dg/cpp0x/initlist67.C: New.
+
+2012-10-10 Dehao Chen <dehao@google.com>
+
+ * g++.dg/debug/dwarf2/deallocator.C: Cover more deallocator cases.
+
+2012-10-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52480
+ * gcc.target/sh/sh4a-bitmovua.c: Compact skip-if list.
+ Add runtime tests.
+
+2012-10-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53307
+ * g++.dg/cpp0x/decltype44.C: New.
+
+2012-10-09 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.target/ext_ins.c: Modify f2 to aviod uninitialized data.
+
+2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53763
+ * g++.dg/cpp0x/decltype43.C: New.
+
+2012-10-09 Venkataramanan Kumar <venkataramanan.kumar@amd.com>
+
+ PR middle-end/53397
+ * gcc.dg/pr53397-1.c: New test case.
+ * gcc.dg/pr53397-2.c: New test case.
+
+2012-10-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54194
+ * g++.dg/warn/Wparentheses-26.C: Adjust.
+ * g++.dg/warn/Wparentheses-27.C: New.
+
+2012-10-09 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/54427
+ * c-c++-common/vector-scalar.c: New testcase.
+ * g++.dg/ext/vector18.C: New testcase.
+ * g++.dg/ext/vector5.C: This is not an error anymore.
+ * gcc.dg/init-vec-1.c: Move ...
+ * c-c++-common/init-vec-1.c: ... here. Adapt error message.
+ * gcc.c-torture/execute/vector-shift1.c: Move ...
+ * c-c++-common/torture/vector-shift1.c: ... here.
+ * gcc.dg/scal-to-vec1.c: Move ...
+ * c-c++-common/scal-to-vec1.c: ... here. Avoid narrowing for
+ C++11. Adapt error messages.
+ * gcc.dg/convert-vec-1.c: Move ...
+ * c-c++-common/convert-vec-1.c: ... here.
+ * gcc.dg/scal-to-vec2.c: Move ...
+ * c-c++-common/scal-to-vec2.c: ... here.
+
+2012-10-08 Marc Glisse <marc.glisse@inria.fr>
+
+ PR target/54400
+ * gcc.target/i386/pr54400.c: New testcase.
+
+2012-10-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54858
+ * g++.dg/template/pr54858.C: New test.
+
+2012-10-08 Marek Polacek <polacek@redhat.com>
+
+ PR debug/54831
+ * g++.dg/debug/pr54831.C: New test.
+
+2012-10-08 Dehao Chen <dehao@google.com>
+
+ * g++.dg/predict-loop-exit-1.C: New.
+ * g++.dg/predict-loop-exit-2.C: New.
+ * g++.dg/predict-loop-exit-3.C: New.
+
+2012-10-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/pr54445-1.c: Require tls_runtime, add tls options.
+
+2012-10-08 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/gomp/tls-5.C: New.
+ * g++.dg/gomp/tls-wrap1.C: New.
+ * g++.dg/gomp/tls-wrap2.C: New.
+ * g++.dg/gomp/tls-wrap3.C: New.
+ * g++.dg/gomp/tls-wrap4.C: New.
+ * g++.dg/gomp/tls-wrapper-cse.C: New.
+ * g++.dg/tls/thread_local-cse.C: New.
+ * g++.dg/tls/thread_local-order1.C: New.
+ * g++.dg/tls/thread_local-order2.C: New.
+ * g++.dg/tls/thread_local-wrap1.C: New.
+ * g++.dg/tls/thread_local-wrap2.C: New.
+ * g++.dg/tls/thread_local-wrap3.C: New.
+ * g++.dg/tls/thread_local-wrap4.C: New.
+ * g++.dg/tls/thread_local2g.C: New.
+ * g++.dg/tls/thread_local3g.C: New.
+ * g++.dg/tls/thread_local4g.C: New.
+ * g++.dg/tls/thread_local5g.C: New.
+ * g++.dg/tls/thread_local6g.C: New.
+ * g++.dg/tls/thread_local7g.C: New.
+
+ * g++.dg/tls/thread_local3.C: New.
+ * g++.dg/tls/thread_local4.C: New.
+ * g++.dg/tls/thread_local5.C: New.
+ * g++.dg/tls/thread_local6.C: New.
+
+ * g++.dg/tls/init-2.C: Tweak errors.
+ * g++.dg/tls/thread_local1.C: New.
+ * g++.dg/tls/thread_local2.C: New.
+ * g++.dg/tls/thread_local7.C: New.
+
+2012-10-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/54866
+ * gcc.target/i386/long-double-80-7.c: Add -msse2 to dg-options.
+
+2012-10-08 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54685
+ * gcc.target/sh/pr54685.c: New.
+
+2012-10-08 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53528 C++11 attribute support
+ * g++.dg/cpp0x/gen-attrs-1.C: New test.
+ * g++.dg/cpp0x/gen-attrs-2.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-2-1.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-3.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-4.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-5.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-6.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-7.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-8.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-9.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-10.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-11.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-12.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-13.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-14.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-15.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-16.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-17.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-18.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-19.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-20.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-21.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-22.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-23.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-24.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-25.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-26.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-27.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-28.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-29.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-30.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-31.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-32.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-33.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-34.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-35.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-36.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-36-1.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-37.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-38.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-39.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-39-1.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-40.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-41.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-42.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-43.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-44.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-45.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-46.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-47.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-47-1.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-48.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-49.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-50.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-51.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-52.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-53.C: Likewise.
+
+2012-10-08 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/tree-ssa/slsr-30.c: Use correct cleanup directive.
+ * gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-21.c: Add missing cleanup directive.
+
+2012-10-08 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54760
+ * gcc.target/sh/pr54760-2.c: New.
+ * gcc.target/sh/pr54760-3.c: New.
+
+2012-10-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51422
+ * g++.dg/cpp0x/lambda/lambda-ice8.C: New.
+
+2012-10-07 Richard Sandiford <rdsandiford@googlemail.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.target/mips/madd-9.c: Force code to be tuned for the 4kc
+ and test that the accumulator is initialized using MULT.
+ * gcc.target/mips/mips32-dsp-accinit-1.c: New test.
+ * gcc.target/mips/mips32-dsp-accinit-2.c: Likewise.
+
+2012-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52764
+ * g++.dg/cpp0x/stdint.C: New.
+
+2012-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54249
+ * g++.dg/cpp0x/stddef.C: New.
+
+2012-10-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54832
+ * gfortran.dg/typebound_operator_17.f90: New.
+
+2012-10-06 Jan Hubicka <jh@suse.cz>
+
+ PR lto/53831
+ PR lto/54776
+ * g++.dg/lto/v1-plugin-api-not-supported.C: New testcase.
+
+2012-10-06 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/lto/resolutions_0.c: New testcase.
+
+2012-10-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/45521
+ * gfortran.dg/generic_25.f90: New.
+ * gfortran.dg/generic_26.f90: New.
+ * gfortran.dg/generic_27.f90: New.
+
+2012-10-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54760
+ * gcc.target/sh/pr54760-1.c: New.
+
+2012-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/torture/Wsizeof-pointer-memaccess1.C: New test.
+ * g++.dg/torture/Wsizeof-pointer-memaccess2.C: New test.
+ * g++.dg/warn/Wsign-compare-5.C: New test.
+ * g++.dg/warn/Wsizeof-pointer-memaccess-1.C: New test.
+ * g++.dg/warn/Wnull-conversion-1.C: For c++11 add dg-error.
+ * g++.dg/ext/builtin30.C: New test.
+ * g++.dg/ext/vla12.C: New test.
+ * gcc.dg/builtins-85.c: New test.
+
+ PR debug/54519
+ * gcc.dg/guality/pr54519-1.c: New test.
+ * gcc.dg/guality/pr54519-2.c: New test.
+ * gcc.dg/guality/pr54519-3.c: New test.
+ * gcc.dg/guality/pr54519-4.c: New test.
+ * gcc.dg/guality/pr54519-5.c: New test.
+ * gcc.dg/guality/pr54519-6.c: New test.
+
+2012-10-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50893
+ * g++.dg/cpp0x/defaulted38.C: New.
+
+2012-10-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/33763
+ * c-c++-common/pr33763.c: New test.
+
+ PR tree-optimization/54810
+ * gcc.dg/tree-ssa/vrp85.c: New test.
+
+2012-10-04 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/ucnid-7.c: Skip on AIX.
+ * gcc.dg/ucnid-8.c: Same.
+ * gcc.dg/ucnid-10.c: Same.
+ * gcc.dg/ucnid-13.c: Same.
+ * gcc.dg/attr-alias-3.c: Same.
+ * gcc.dg/attr-alias-5.c: Same.
+ * gcc.dg/torture/pr51106-2.c: Same.
+ * gcc.dg/vmx/3b-13.c: Use valid splat index.
+
+2012-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52233
+ * g++.dg/cpp0x/alias-decl-23.C: New.
+
+2012-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53403
+ * g++.dg/template/friend53.C: New.
+
+2012-10-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lib/gcc-dg.exp (cleanup-ada-spec): New procedure.
+ * lib/scanasm.exp (get_ada_spec_filename): Likewise.
+ (scan-ada-spec): Likewise.
+ (scan-ada-spec-not): Likewise.
+ * gcc.dg/dump-ada-spec-1.c: New test.
+ * g++.dg/other/dump-ada-spec-1.C: Likewise.
+
+2012-10-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/lto/20120723_0.c: Skip on SPARC 32-bit.
+
+2012-10-04 Florian Weimer <fweimer@redhat.com>
+
+ * c-c++-common/cpp/diagnostic-pragma-1.c: New testcase.
+
+2012-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54323
+ * g++.dg/cpp0x/pr54323.C: New.
+
+2012-10-04 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54735
+ * g++.dg/torture/pr54735.C: New testcase.
+
+2012-10-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR rtl-optimization/54739
+ * gcc.dg/lower-subreg-1.c: Also skip on SPARC.
+
+2012-10-03 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-12.c: New.
+
+2012-10-03 Dehao Chen <dehao@google.com>
+
+ PR middle-end/54782
+ * gcc.dg/pr54782.c: New test.
+
+2012-10-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/54777
+ * g++.dg/cpp0x/constexpr-ref4.C: New test.
+
+2012-10-02 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54778
+ * gfortran.dg/class_53.f90: New.
+
+2012-10-02 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/54551
+ * gcc.dg/guality/pr54551.c: New.
+
+2012-10-02 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.target/powerpc/pr46728-1.c: Accept xssqrtdp.
+ * gcc.target/powerpc/pr46728-2.c: Likewise.
+
+2012-10-02 Sharad Singhai <singhai@google.com>
+
+ PR testsuite/54772
+ * gfortran.dg/vect/vect.exp: Change verbose vectorizor dump options
+ to fix test failures caused by r191883.
+ * gcc.dg/tree-ssa/gen-vect-11.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-32.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-26.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-11b.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-11c.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-28.c: Likewise.
+
+2012-09-30 Sharad Singhai <singhai@google.com>
+
+ * gcc.target/i386/vect-double-1.c: Fix test.
+
+2012-10-01 Andrew MacLeod <amacleod@redhat.com>
+
+ PR target/54087
+ * gcc.dg/pr54087.c: New testcase for atomic_sub -> atomic_add when
+ atomic_sub fails.
+
+2012-10-01 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/54457
+ * gcc.target/i386/pr54457.c: New test.
+
+2012-10-01 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.dg/lower-subreg-1.c: Disable on arm*-*-* targets.
+
+2012-10-01 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.target/i386/vect-rebuild.c: New testcase.
+
+2012-09-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pad-10.c (foo2): Return x - z.
+
+2012-09-30 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/pr37362.c: Fix target selector.
+
+2012-09-30 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/54083
+ * gcc.dg/torture/pr53922.c: Skip on 32-bit hppa-*-hpux*.
+
+2012-09-30 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.dg/ucnid-8.c: Update line number.
+ * gcc.dg/torture/pr51106-2.c: Likewise.
+
+2012-09-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54667
+ * gfortran.dg/c_funloc_tests_6.f90: Modified error message.
+ * gfortran.dg/c_f_pointer_shape_test.f90: Ditto.
+ * gfortran.dg/c_f_pointer_tests_5.f90: New.
+
+2012-09-30 Janus Weil <janus@gcc.gnu.org>
+
+ * gfortran.dg/allocate_derived_1.f90: Re-enable class array checks,
+ partially reverting r170092.
+ * gfortran.dg/class_7.f03: Ditto.
+ * gfortran.dg/coarray_14.f90: Ditto.
+ * gfortran.dg/typebound_proc_13.f03: Ditto.
+
+2012-09-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54738
+ * g++.dg/cpp0x/sfinae42.C: New.
+
+2012-09-29 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/405-dlmzb-strlen-1.c: Skip on AIX.
+ * gcc.target/powerpc/440-dlmzb-strlen-1.c: Same.
+ * gcc.dg/ucnid-5.c: Remove XFAIL on AIX.
+ * gcc.dg/pr42629.c: XFAIL on AIX.
+ * gcc.dg/pr47684.c: Same.
+ * gcc.dg/pr43670.c: Same.
+ * gcc.dg/pr42916.c: Same.
+ * gcc.dg/pr45449.c: Same.
+ * gcc.dg/pr50017.c: Same.
+ * gcc.dg/pr42728.c: Same.
+ * gcc.dg/pr47881.c: Same.
+ * gcc.dg/pr44023.c: Same.
+ * gcc.dg/pr41345.c: Same.
+ * gcc.dg/pr42630.c: Same.
+ * gcc.dg/pr44971.c: Same.
+ * gcc.dg/pr46771.c: Same.
+ * gcc.dg/ucnid-8.c: Same.
+ * gcc.dg/ucnid-10.c: Same.
+ * gcc.dg/ucnid-13.c: Same.
+ * gcc.dg/torture/pr51106-2.c: Same.
+ * gcc.dg/pr48768.c: Same.
+ * gcc.dg/pr42631.c: Same.
+ * gcc.dg/pr43084.c: Same.
+ * gcc.dg/ucnid-7.c: Same.
+ * gcc.dg/pr42889.c: Same.
+ * gcc.dg/pr41241.c: Same.
+ * gcc.dg/pr42719.c: Same.
+ * g++.dg/debug/pr46583.C: Same.
+ * g++.dg/debug/pr47106.C: Same.
+ * g++.dg/opt/pr48549.C: Same.
+ * g++.dg/other/pr42685.C: Same.
+ * c-c++-common/pr43942.c: Same.
+
+2012-09-29 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp: Update for latest version of Go testsuite.
+
+2012-09-29 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/52724
+ * gfortran.dg/internal_readwrite_3.f90: New test.
+
+2012-09-28 Dodji Seketeli <dodji@redhat.com>
+
+ * g++.dg/warn/Wunused-local-typedefs-3.C: Move the c++-only test
+ c-c++-common/Wunused-local-typedefs-2.c to here.
+
+ PR c++/54372 - unused attribute inactive on dependant entities
+ * c-c++-common/Wunused-local-typedefs-2.c: New test.
+
+2012-09-25 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/29028 - Missed unused warning on using declaration
+ * g++.dg/warn/Wunused-var-18.C: New test.
+
+2012-09-25 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53551 - -Wunused-local-typedefs misses uses
+ * g++.dg/warn/Wunused-local-typedefs-2.C: New test.
+
+2012-09-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/54716
+ * gcc.target/i386/xorps-sse2.c: Remove xfails.
+
+ PR tree-optimization/54713
+ * gcc.c-torture/compile/pr54713-1.c: New test.
+ * gcc.c-torture/compile/pr54713-2.c: New test.
+ * gcc.c-torture/compile/pr54713-3.c: New test.
+
+2012-09-27 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/arm/unsigned-extend-1.c: Omit -march option.
+
+2012-09-27 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.dg/lower-subreg-1.c: Disable on arm-*-* targets.
+
+2012-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/54703
+ * gcc.target/i386/pr54703.c: New test.
+
+2012-09-27 Richard Guenther <rguenther@suse.de>
+
+ PR lto/54709
+ * gcc.dg/lto/pr54709_0.c: New testcase.
+ * gcc.dg/lto/pr54709_1.c: Likewise.
+
+2012-09-26 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/arm/div64-unwinding.c: XFAIL for GNU/Linux.
+
+ * gcc.target/arm/mmx-2.c: Specify -mcpu=iwmmxt.
+
+ * gcc.target/arm/combine-movs.c: Use effective target arm_thumb2.
+
+ * gcc.target/arm/pr42879.c: Handle big-endian.
+
+2012-09-26 Steve Ellcey <sellcey@mips.com>
+
+ PR c/37303
+ * gcc.dg/pr37303.c: Check for rdata or rodata.
+
+2012-09-26 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/builtin-bswap16-1.c: New testcase.
+
+2012-09-25 Segher Boessenkool <segher@kernel.crashing.org>
+
+ PR target/51274
+ PR target/53087
+ * gcc.target/powerpc/ppc-ne0-1.c: New.
+
+2012-09-25 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-1.c (test_15, test_16, test_17, test_18,
+ test_19, test_20, test_21, test_22, test_23): New functions.
+ * gcc.target/sh/pr54089-4.c: New.
+ * gcc.target/sh/pr54089-5.c: New.
+ * gcc.target/sh/pr54089-6.c: New.
+ * gcc.target/sh/pr54089-7.c: New.
+
+2012-09-25 Richard Guenther <rguenther@suse.de>
+
+ PR lto/54625
+ * gcc.dg/lto/pr54702_0.c: New testcase.
+ * gcc.dg/lto/pr54702_1.c: Likewise.
+ * gcc.dg/lto/pr54625-1_0.c: Likewise.
+ * gcc.dg/lto/pr54625-1_1.C: Likewise.
+ * gcc.dg/lto/pr54625-2_0.c: Likewise.
+ * gcc.dg/lto/pr54625-2_1.C: Likewise.
+
+2012-09-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54526
+ * g++.dg/cpp0x/parse2.C: New.
+ * g++.dg/parse/error11.C: Adjust.
+ * g++.dg/parse/error12.C: Likewise.
+
+2012-09-25 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ * gcc.target/i386/20030217-1.c: Added check for
+ large_long_double effective target.
+ * gcc.target/i386/387-3.c: Likewise.
+ * gcc.target/i386/387-4.c: Likewise.
+ * gcc.target/i386/pr36578-1.c: Likewise.
+ * gcc.target/i386/excess-precision-1.c: Added new code for the case
+ when long double size is equal double size.
+ * gcc.target/i386/excess-precision-1.c: Likewise.
+ * gcc.target/i386/pr36578-2.c: Likewise.
+ * gcc.target/i386/20030217-2.c: New testcase.
+
+2012-09-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54676
+ * gcc.dg/pr54676.c: New test.
+
+2012-09-25 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53663
+ * gcc.dg/torture/pr53663-1.c: New testcase.
+ * gcc.dg/torture/pr53663-2.c: Likewise.
+ * gcc.dg/torture/pr53663-3.c: Likewise.
+
+2012-09-25 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr50725.c: Change 'long' to 'long long'.
+
+2012-09-24 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/target-supports-dg.exp (dg-require-effective-target,
+ dg-skip-if, dg-xfail-if, dg-xfail-run-if, dg-shouldfail): Call
+ dg-process-target-1 instead of dg-process-target.
+ (dg-process-target-1): Rename from dg-process-target.
+ (dg-process-target): New.
+
+2012-09-24 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54684
+ * g++.dg/torture/pr54684.C: New testcase.
+
+2012-09-24 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-23.c: New testcase.
+
+2012-09-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52173
+ * gcc.dg/tm/pr52173-1.c: New.
+ * gcc.dg/tm/pr52173-2.c: New.
+
+2012-09-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr54669.c: New test.
+
+2012-09-23 Paolo Carlini <paolo.carlini@oracle.com>
+ Dominique Dhumieres <dominiq@lps.ens.fr>
+
+ PR testsuite/54677
+ * g++.dg/cpp0x/decltype32.C: Add -ftemplate-depth=10.
+
+2012-09-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54618
+ * gfortran.dg/class_array_14.f90: New.
+
+2012-09-22 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/tree-ssa/scev-3.c: Add llp64 to xfail.
+ * gcc.dg/tree-ssa/scev-4.c: Likewise.
+
+2012-09-21 Dehao Chen <dehao@google.com>
+
+ PR go/54649
+ PR tree-optimization/54655
+ * g++.dg/pr54655.C: New testcase.
+
+2012-09-21 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54647
+ * g++.dg/torture/pr54647.C: New testcase.
+
+2012-09-21 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/54427
+ * c-c++-common/torture/vector-compare-2.c: Add -w.
+
+2012-09-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt20.ads: Move dg directive to...
+ * gnat.dg/opt20.adb: ...here.
+ * gnat.dg/addr1.ad[sb]: Likewise.
+ * gnat.dg/concat2.ad[sb]: Likewise.
+ * gnat.dg/array16.ad[sb]: Likewise.
+ * gnat.dg/atomic5.ad[sb]: Likewise.
+ * gnat.dg/discr29.ad[sb]: Likewise.
+ * gnat.dg/noreturn5.ad[sb]: Likewise.
+ * gnat.dg/vect8.ad[sb]: Likewise. Add dg-options.
+ * gnat.dg/discr23.ads: Remove dg directive.
+ * gnat.dg/nested_float_packed.ads: Likewise.
+ * gnat.dg/oconst6.ads: Move to...
+ * gnat.dg/specs/oconst6.ads: ...here.
+
+2012-09-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52432
+ * g++.dg/cpp0x/decltype32.C: Tweak.
+
+2012-09-20 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-19.c: Check in forwprop1.
+ * gcc.dg/tree-ssa/forwprop-20.c: Check in forwprop1.
+ * gcc.dg/tree-ssa/forwprop-21.c: Check in copyprop1.
+ * gcc.dg/tree-ssa/forwprop-22.c: Check in copyprop1.
+
+2012-09-19 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/54581
+ * g++.dg/cpp0x/decltype-54581.C: New testcase.
+
+2012-09-19 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.target/mips/pr37362.c: Add mips*-mti-elf exception.
+
+2012-09-19 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/ppc-get-timebase.c: New file.
+ * gcc.target/powerpc/ppc-mftb.c: New file.
+
+2012-09-19 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-1.c (test_11, test_12, test_13, test_14): New
+ functions.
+
+2012-09-19 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54236
+ * gcc.target/sh/pr54236-1.c (test_08): Add one bit left shift case.
+
+2012-09-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20120919-1.c: New test.
+
+2012-09-19 Richard Guenther <rguenther@suse.de>
+
+ * lib/c-torture.exp (TORTURE_OPTIONS): Add -Og -g.
+
+2012-09-19 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/builtin-unreachable-6.c: Adjust.
+
+2012-09-19 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/builtin-object-size-10.c: Adjust.
+ * gcc.dg/builtin-unreachable-5.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-fprintf-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-fprintf-chk-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-printf-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-printf-chk-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-vfprintf-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-vprintf-1.c: Adjust.
+ * gcc.dg/tree-ssa/builtin-vprintf-chk-1.c: Adjust.
+ * gcc.dg/tree-ssa/ssa-ccp-10.c: Adjust.
+ * gcc.dg/vect/vec-scal-opt.c: Adjust.
+ * gcc.dg/vect/vec-scal-opt1.c: Adjust.
+ * gcc.dg/vect/vec-scal-opt2.c: Adjust.
+
+2012-09-19 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54132
+ * gcc.dg/tree-ssa/ldist-21.c: New testcase.
+ * gcc.dg/torture/pr54132.c: Likewise.
+
+2012-09-19 Terry Guo <terry.guo@arm.com>
+
+ * lib/gcc-dg.exp (dg_runtest_extra_prunes): New variable to define
+ extra prune rules that will be applied to all tests in a .exp file.
+ (gcc-dg-prune): Use rules defined by the above variable.
+ * gcc.target/arm/arm.exp (dg_runtest_extra_prunes): Skip all the
+ harmless warnings on architecture switch conflict.
+
+2012-09-19 Hans-Peter Nilsson <hp@axis.com>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Match a sequence
+ of asm-comment characters instead of a single one.
+ * g++.dg/debug/dwarf2/nested-2.C: Similar.
+
+2012-09-18 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/vect/fast-math-pr35982.c: Skip check instead of xfail.
+
+ * gcc.dg/vect/no-vfa-vect-101.c: Skip a check for an irrelevant
+ target instead of xfailing it.
+ * gcc.dg/vect/no-vfa-vect-102.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-102a.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-37.c: Likewise.
+ * gcc.dg/vect/no-vfa-vect-79.c: Likewise.
+ * gcc.dg/vect/vect-104.c: Likewise.
+ * gcc.dg/vect/vect-outer-1-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-1.c: Likewise.
+ * gcc.dg/vect/vect-outer-1a-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-1a.c: Likewise.
+ * gcc.dg/vect/vect-outer-1b-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-1b.c: Likewise.
+ * gcc.dg/vect/vect-outer-2b.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a-big-array.c: Likewise.
+ * gcc.dg/vect/vect-outer-3a.c: Likewise.
+ * gcc.dg/vect/vect-outer-3b.c: Likewise.
+ * gcc.dg/vect/vect-reduc-dot-s8b.c: Likewise.
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_widen_mult_qi_to_hi,
+ check_effective_target_vect_widen_mult_hi_to_si,
+ check_effective_target_vect_widen_mult_qi_to_hi_pattern,
+ check_effective_target_vect_widen_mult_hi_to_si_pattern,
+ check_effective_target_vect_pack_trunc,
+ check_effective_target_vect_unpack,
+ check_effective_target_vect_multiple_sizes): Check arm_neon_ok
+ instead of arm_none.
+
+ * gcc.dg/vect/pr52298.c: Remove "dg-do run".
+
+2012-09-18 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * lib/target-supports-dg.exp (check-flags): Add cflags from board
+ config to compiler_flags.
+
+2012-09-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/54592
+ * gcc.target/i386/pr54592.c: New test.
+
+ PR tree-optimization/54610
+ * gcc.target/i386/pr54610.c: New test.
+
+2012-09-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/54575
+ * g++.dg/cpp0x/alias-decl-21.C: New.
+ * g++.dg/cpp0x/alias-decl-22.C: New.
+
+2012-09-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54608
+ * gfortran.dg/scan_2.f90: New.
+
+2012-09-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/53661
+ * g++.dg/init/aggr9.C: New.
+
+2012-09-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization12.ad[sb]: New test.
+
+2012-09-17 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54285
+ * gfortran.dg/proc_ptr_result_7.f90: New.
+
+2012-09-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54603
+ * gfortran.dg/structure_constructor_11.f90: New.
+
+2012-09-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54563
+ * g++.dg/torture/pr54563.C: New test.
+
+2012-09-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54594
+ * gfortran.dg/typebound_generic_14.f03: New.
+
+2012-09-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54387
+ * gfortran.dg/proc_ptr_38.f90: New.
+
+2012-09-16 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR debug/54460
+ * g++.dg/debug/dwarf2/nested-3.C: Add hppa assembler comment character
+ to scary regexp.
+
+ PR testsuite/54007
+ * gnat.dg/lto15.adb: Require lto.
+
+ * gfortran.dg/bind_c_array_params_2.f90: Adjust scan-assembler-times
+ "myBindC" for hppa*-*-hpux*.
+
+2012-09-16 Mikael Morin <mikael@gcc.gnu.org>
+
+ * gfortran.dg/namelist_75.f90: New test.
+
+2012-09-15 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/tree-ssa/vrp82.c: New test.
+ * gcc.dg/tree-ssa/vrp83.c: Same.
+ * gcc.dg/tree-ssa/vrp84.c: Same.
+
+2012-09-15 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/tree-ssa/vrp80-2.c: Rename to ...
+ * gcc.dg/tree-ssa/vrp81.c: ... this.
+
+2012-09-15 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/54222
+ * gcc.target/avr/torture/fix-types.h: New.
+ * gcc.target/avr/torture/vals-hr.def: New.
+ * gcc.target/avr/torture/vals-r.def: New.
+ * gcc.target/avr/torture/vals-k.def: New.
+ * gcc.target/avr/torture/vals-ur.def: New.
+ * gcc.target/avr/torture/vals-uk.def: New.
+ * gcc.target/avr/torture/vals-uhr.def: New.
+ * gcc.target/avr/torture/vals-llk.def: New.
+ * gcc.target/avr/torture/vals-ullk.def: New.
+ * gcc.target/avr/torture/sat-hr-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-r-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-k-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-ur-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-uk-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-uhr-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-llk-plus-minus.c: New.
+ * gcc.target/avr/torture/sat-ullk-plus-minus.c: New.
+
+2012-09-14 Dehao Chen <dehao@google.com>
+
+ * g++.dg/debug/dwarf2/deallocator.C: New test.
+
+2012-09-14 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/54552
+ * gcc.c-torture/compile/pr54552-1.c: New test.
+
+2012-09-14 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/54427
+ * g++.dg/other/vector-compare.C: New testcase.
+ * c-c++-common/vector-compare-3.c: New testcase.
+ * gcc.dg/vector-shift.c: Move ...
+ * c-c++-common/vector-shift.c: ... here.
+ * gcc.dg/vector-shift1.c: Move ...
+ * c-c++-common/vector-shift1.c: ... here.
+ * gcc.dg/vector-shift3.c: Move ...
+ * c-c++-common/vector-shift3.c: ... here.
+ * gcc.dg/vector-compare-1.c: Move ...
+ * c-c++-common/vector-compare-1.c: ... here.
+ * gcc.dg/vector-compare-2.c: Move ...
+ * c-c++-common/vector-compare-2.c: ... here.
+ * gcc.c-torture/execute/vector-compare-1.c: Move ...
+ * c-c++-common/torture/vector-compare-1.c: ... here.
+ * gcc.c-torture/execute/vector-compare-2.x: Delete.
+ * gcc.c-torture/execute/vector-compare-2.c: Move ...
+ * c-c++-common/torture/vector-compare-2.c: ... here.
+ * gcc.c-torture/execute/vector-shift.c: Move ...
+ * c-c++-common/torture/vector-shift.c: ... here.
+ * gcc.c-torture/execute/vector-shift2.c: Move ...
+ * c-c++-common/torture/vector-shift2.c: ... here.
+ * gcc.c-torture/execute/vector-subscript-1.c: Move ...
+ * c-c++-common/torture/vector-subscript-1.c: ... here.
+ * gcc.c-torture/execute/vector-subscript-2.c: Move ...
+ * c-c++-common/torture/vector-subscript-2.c: ... here.
+ * gcc.c-torture/execute/vector-subscript-3.c: Move ...
+ * c-c++-common/torture/vector-subscript-3.c: ... here.
+
+2012-09-14 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/54103
+ * gcc.c-torture/compile/pr54103-1.c,
+ gcc.c-torture/compile/pr54103-2.c,
+ gcc.c-torture/compile/pr54103-3.c,
+ gcc.c-torture/compile/pr54103-4.c,
+ gcc.c-torture/compile/pr54103-5.c,
+ gcc.c-torture/compile/pr54103-6.c: New tests.
+ * gcc.dg/c90-const-expr-8.c: Update expected column number.
+
+2012-09-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr44194-1.c: Check that there are no memory accesses left.
+
+2012-09-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54565
+ * gcc.dg/tree-ssa/ssa-ccp-17.c: Adjust.
+ * gcc.dg/tree-ssa/forwprop-6.c: Likewise. Remove XFAIL.
+
+2012-09-14 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.target/arm/combine-movs.c: Add missing space.
+
+2012-09-14 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/torture/builtin-location.C: New testcase.
+
+2012-09-13 Paolo Carlini <paolo.carlini@oracle.com>
+ Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c++/53210
+ * g++.dg/warn/Wuninitialized-self.C: New.
+
+2012-09-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54559
+ * gcc.c-torture/compile/pr54559.c: New test.
+
+2012-09-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/53839
+ * g++.dg/cpp0x/constexpr-temp1.C: New.
+
+ PR c++/54511
+ * g++.dg/template/anonunion2.C: New.
+
+ PR c++/53836
+ * g++.dg/template/init10.C: New.
+
+2012-09-13 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54556
+ * gfortran.dg/implicit_pure_3.f90: New.
+
+2012-09-13 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-fre-37.c: New testcase.
+
+2012-09-13 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/builtin-bswap-1.c: New testcase.
+
+2012-09-12 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * c-c++-common/pr51712.c: Handle for short-enum targets.
+
+2012-09-12 Terry Guo <terry.guo@arm.com>
+
+ * gcc.target/arm/combine-movs.c: Check movs for ARM mode
+ and lsrs for Thumb2 mode.
+
+2012-09-12 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/inlinehint-2.c: New testcase.
+
+2012-09-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/54445
+ * gcc.target/i386/pr54445-1.c: New file.
+ * gcc.target/i386/pr54445-2.c: Likewise.
+
+2012-09-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54225
+ PR fortran/53306
+ * gfortran.dg/coarray_10.f90: Update dg-error.
+ * gfortran.dg/coarray_28.f90: New.
+ * gfortran.dg/array_section_3.f90: New.
+
+2012-09-11 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/neon-vset_lanes8.c, gcc.target/arm/pr51835.c,
+ gcc.target/arm/pr48252.c: Fix for big-endian support.
+
+2012-09-11 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-22.c: New testcase.
+
+2012-09-11 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+ Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gcc.target/arm/neon-vfma-1.c: New testcase.
+ * gcc.target/arm/neon-vfms-1.c: Likewise.
+ * gcc.target/arm/neon-vmla-1.c: Update test to use int instead
+ of float.
+ * gcc.target/arm/neon-vmls-1.c: Likewise.
+ * lib/target-supports.exp (add_options_for_arm_neonv2): New
+ function.
+ (check_effective_target_arm_neonv2_ok_nocache): Likewise.
+ (check_effective_target_arm_neonv2_ok): Likewise.
+ (check_effective_target_arm_neonv2_hw): Likewise.
+ (check_effective_target_arm_neonv2): Likewise.
+
+2012-09-11 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54515
+ * g++.dg/tree-ssa/pr54515.C: New testcase.
+
+2012-09-10 Andrew Pinski <apinski@cavium.com>
+
+ PR tree-opt/c54362
+ * gcc.dg/tm/memopt-16.c: New testcase.
+
+2012-09-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54541
+ PR c++/54542
+ * g++.dg/cpp0x/sfinae40.C: New.
+ * g++.dg/cpp0x/sfinae41.C: Likewise.
+
+2012-09-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/54538
+ * g++.dg/cpp0x/lambda/lambda-mangle4.C: New.
+
+2012-09-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-3.c: New.
+
+2012-09-10 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-21.c: New testcase.
+
+2012-09-10 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/tm/reg-promotion.c: Modify dump message check.
+
+2012-09-10 Aldy Hernandez <aldyh@redhat.com>
+
+ * gcc.dg/pr52558-2.c: Delete.
+ * gcc.dg/simulate-thread/speculative-store-3.c: New.
+
+2012-09-10 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-20.c: New testcase.
+
+2012-09-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54520
+ * gcc.dg/torture/pr54520.c: New testcase.
+
+2012-09-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/54506
+ * g++.dg/cpp0x/implicit14.C: New.
+
+2012-09-07 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54208
+ * gfortran.dg/bound_simplification_3.f90: New test.
+
+2012-09-07 Aldy Hernandez <aldyh@redhat.com>
+
+ PR testsuite/54184
+ * gcc.dg/pr52558-1.c: Delete.
+ * gcc.dg/simulate-thread/speculative-store-2.c: New.
+
+2012-09-07 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/pr50318-1.c: Scan for smlal.
+ * gcc.target/arm/smlaltb-1.c: XFAIL test.
+ * gcc.target/arm/smlaltt-1.c: Likewise.
+
+2012-09-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr44194-1.c: Skip on Alpha and adjust regexp for SPARC64.
+
+2012-09-07 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/53986
+ * gcc.dg/tree-ssa/vrp80.c: New test.
+ * gcc.dg/tree-ssa/vrp80-2.c: Same.
+
+2012-09-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/54341
+ PR c++/54253
+ * g++.dg/cpp0x/constexpr-virtual2.C: New.
+ * g++.dg/cpp0x/constexpr-virtual3.C: New.
+
+2012-09-06 Andrew Pinski <apinski@cavium.com>
+
+ PR tree-opt/54494
+ * gcc.dg/tree-ssa/strlen-1.c: New testcase.
+
+2012-09-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/54455
+ * gcc.dg/54455.c: New test.
+
+2012-09-06 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54463
+ * gfortran.dg/promotion_2.f90: New.
+
+2012-09-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/54486
+ * c-c++-common/pr54486.c: New test.
+
+2012-09-05 Dominique Dhumieres <dominiq@lps.ens.fr>
+
+ PR fortran/54474
+ * gfortran.dg/coarray_poly_3.f90: Adjust error messages.
+
+2012-09-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54191
+ * g++.dg/cpp0x/sfinae39.C: New.
+
+2012-09-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/54441
+ * g++.dg/ext/flexary3.C: New.
+
+ PR c++/54420
+ * g++.dg/cpp0x/lambda/lambda-intname.C: New.
+
+ PR c++/54198
+ * g++.dg/template/defarg15.C: New.
+
+ PR c++/54437
+ * g++.dg/template/access24.C: New.
+
+2012-09-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54458
+ * gcc.dg/torture/pr54458.c: New testcase.
+
+2012-09-04 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/neon-vext.c: New test.
+ * gcc.target/arm/neon-vext-execute.c: Ditto.
+
+2012-09-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54243
+ PR fortran/54244
+ * gfortran.dg/select_type_29.f03: New.
+
+2012-09-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/fold-perm.c: Improve test.
+
+2012-09-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51632
+ * gfortran.dg/coarray_class_1.f90: New.
+
+2012-09-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/49206
+ * gcc.c-torture/compile/pr49206.c: New test.
+
+2012-09-02 Dominique Dhumieres <dominiq@lps.ens.fr>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/36680
+ * gfortran.dg/pr36680.f90: New test.
+
+2012-09-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/42295
+ * g++.dg/opt/pr42295.C: New test.
+
+2012-09-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/54436
+ * gcc.dg/torture/pr54436.c: New test.
+
+2012-09-01 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/truncate-8.c: New testcase.
+
+2012-09-01 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/46829
+ PR target/46843
+ * gcc.target/i386/pr46829.c: New test.
+ * gcc.target/i386/pr46843.c: Ditto.
+
+2012-08-31 Paolo Carlini <paolo.carlini@oracle.com>
+ Jason Merrill <jason@redhat.com>
+
+ PR c++/18747
+ * g++.dg/parse/error50.C: New.
+
+2012-08-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54428
+ * gcc.c-torture/compile/pr54428.c: New test.
+
+2012-08-31 Ollie Wild <aaw@google.com>
+
+ PR c++/54197
+ * g++.dg/init/lifetime3.C: New test.
+
+2012-08-31 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/54409
+ * gcc.dg/torture/pr54409.c: New test.
+
+2012-08-31 Martin Jambor <mjambor@suse.cz>
+
+ * gfortran.dg/pr48636.f90: Add dump scan checks.
+
+2012-08-29 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Work out default -msynci setting.
+
+2012-08-28 Joey Ye <joey.ye@arm.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Add -fno-short-enums.
+
+2012-08-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/46254
+ * gcc.target/i386/pr46254.c: New test.
+
+2012-08-27 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/ext_ins.c, gcc.target/mips/octeon-pop-2.c,
+ gcc.target/mips/pr54240.c, gcc.target/mips/stack-1.c,
+ gcc.target/mips/unaligned-1.c: Add NOMIPS16.
+
+2012-08-27 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/20020620-1.c, gcc.target/mips/atomic-memory-2.c,
+ gcc.target/mips/branch-2.c, gcc.target/mips/branch-3.c,
+ gcc.target/mips/clear-cache-1.c, gcc.target/mips/const-anchor-1.c,
+ gcc.target/mips/const-anchor-2.c, gcc.target/mips/dspr2-MULT.c,
+ gcc.target/mips/dspr2-MULTU.c, gcc.target/mips/ext-1.c,
+ gcc.target/mips/ext-2.c, gcc.target/mips/ext-3.c,
+ gcc.target/mips/ext-4.c, gcc.target/mips/ext_ins.c,
+ gcc.target/mips/fpcmp-1.c, gcc.target/mips/fpcmp-2.c,
+ gcc.target/mips/mips16e-extends.c, gcc.target/mips/mips32-dsp.c,
+ gcc.target/mips/mips32-dsp-type.c, gcc.target/mips/mips32r2-mxhc1.c,
+ gcc.target/mips/mips-ps-5.c, gcc.target/mips/mips-ps-7.c,
+ gcc.target/mips/mips-ps-type-2.c, gcc.target/mips/mips-ps-type.c,
+ gcc.target/mips/movcc-1.c, gcc.target/mips/movcc-2.c,
+ gcc.target/mips/movcc-3.c, gcc.target/mips/neg-abs-1.c,
+ gcc.target/mips/neg-abs-2.c, gcc.target/mips/nmadd-1.c,
+ gcc.target/mips/nmadd-2.c, gcc.target/mips/nmadd-3.c,
+ gcc.target/mips/octeon-exts-7.c, gcc.target/mips/octeon-seq-4.c,
+ gcc.target/mips/rsqrt-1.c, gcc.target/mips/rsqrt-2.c,
+ gcc.target/mips/rsqrt-3.c, gcc.target/mips/sb1-1.c,
+ gcc.target/mips/scc-4.c, gcc.target/mips/stack-1.c,
+ gcc.target/mips/unaligned-1.c: Tighten regexps.
+
+2012-08-27 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Use gcc-dg-runtest rather than dg-runtest.
+ (mips_option_groups): Remove optimization. Add various -f options.
+ (mips-dg-options): Make -funroll-loops imply -funroll-all-loops
+ and -pg imply -fno-omit-frame-pointer.
+ * gcc.target/mips/abi-eabi32-long32.c: Remove optimization flag.
+ * gcc.target/mips/abi-eabi32-long64.c: Likewise.
+ * gcc.target/mips/abi-eabi64-long32.c: Likewise.
+ * gcc.target/mips/abi-eabi64-long64.c: Likewise.
+ * gcc.target/mips/abi-n32-long32-no-shared.c: Likewise.
+ * gcc.target/mips/abi-n32-long32-pic.c: Likewise.
+ * gcc.target/mips/abi-n32-long32.c: Likewise.
+ * gcc.target/mips/abi-n32-long64-no-shared.c: Likewise.
+ * gcc.target/mips/abi-n32-long64-pic.c: Likewise.
+ * gcc.target/mips/abi-n32-long64.c: Likewise.
+ * gcc.target/mips/abi-n64-long32-no-shared.c: Likewise.
+ * gcc.target/mips/abi-n64-long32-pic.c: Likewise.
+ * gcc.target/mips/abi-n64-long32.c: Likewise.
+ * gcc.target/mips/abi-n64-long64-no-shared.c: Likewise.
+ * gcc.target/mips/abi-n64-long64-pic.c: Likewise.
+ * gcc.target/mips/abi-n64-long64.c: Likewise.
+ * gcc.target/mips/abi-o32-long32-no-shared.c: Likewise.
+ * gcc.target/mips/abi-o32-long32-pic.c: Likewise.
+ * gcc.target/mips/abi-o32-long32.c: Likewise.
+ * gcc.target/mips/abi-o32-long64-no-shared.c: Likewise.
+ * gcc.target/mips/abi-o32-long64-pic.c: Likewise.
+ * gcc.target/mips/abi-o32-long64.c: Likewise.
+ * gcc.target/mips/abi-o64-long32-no-shared.c: Likewise.
+ * gcc.target/mips/abi-o64-long32-pic.c: Likewise.
+ * gcc.target/mips/abi-o64-long32.c: Likewise.
+ * gcc.target/mips/abi-o64-long64-no-shared.c: Likewise.
+ * gcc.target/mips/abi-o64-long64-pic.c: Likewise.
+ * gcc.target/mips/abi-o64-long64.c: Likewise.
+ * gcc.target/mips/asm-1.c: Likewise.
+ * gcc.target/mips/branch-1.c: Likewise.
+ * gcc.target/mips/call-3.c: Likewise.
+ * gcc.target/mips/call-saved-3.c: Likewise.
+ * gcc.target/mips/clear-cache-1.c: Likewise.
+ * gcc.target/mips/div-1.c: Likewise.
+ * gcc.target/mips/div-2.c: Likewise.
+ * gcc.target/mips/div-3.c: Likewise.
+ * gcc.target/mips/div-4.c: Likewise.
+ * gcc.target/mips/div-5.c: Likewise.
+ * gcc.target/mips/div-6.c: Likewise.
+ * gcc.target/mips/div-7.c: Likewise.
+ * gcc.target/mips/div-8.c: Likewise.
+ * gcc.target/mips/div-9.c: Likewise.
+ * gcc.target/mips/div-10.c: Likewise.
+ * gcc.target/mips/div-11.c: Likewise.
+ * gcc.target/mips/div-12.c: Likewise.
+ * gcc.target/mips/dsp-ctrl.c: Likewise.
+ * gcc.target/mips/dsp-no-lhx.c: Likewise.
+ * gcc.target/mips/ext-8.c: Likewise.
+ * gcc.target/mips/extend-2.c: Likewise.
+ * gcc.target/mips/fix-r10000-1.c: Likewise.
+ * gcc.target/mips/fix-r10000-2.c: Likewise.
+ * gcc.target/mips/fix-r10000-3.c: Likewise.
+ * gcc.target/mips/fix-r10000-4.c: Likewise.
+ * gcc.target/mips/fix-r10000-5.c: Likewise.
+ * gcc.target/mips/fix-r10000-6.c: Likewise.
+ * gcc.target/mips/fix-r10000-7.c: Likewise.
+ * gcc.target/mips/fix-r10000-8.c: Likewise.
+ * gcc.target/mips/fix-r10000-9.c: Likewise.
+ * gcc.target/mips/fix-r10000-10.c: Likewise.
+ * gcc.target/mips/fix-r10000-11.c: Likewise.
+ * gcc.target/mips/fix-r10000-12.c: Likewise.
+ * gcc.target/mips/fix-r10000-13.c: Likewise.
+ * gcc.target/mips/fix-r10000-14.c: Likewise.
+ * gcc.target/mips/fix-r10000-15.c: Likewise.
+ * gcc.target/mips/fpcmp-1.c: Likewise.
+ * gcc.target/mips/fpcmp-2.c: Likewise.
+ * gcc.target/mips/fpr-moves-7.c: Likewise.
+ * gcc.target/mips/fpr-moves-8.c: Likewise.
+ * gcc.target/mips/int-moves-1.c: Likewise.
+ * gcc.target/mips/int-moves-2.c: Likewise.
+ * gcc.target/mips/long-calls-pg.c: Likewise.
+ * gcc.target/mips/loongson-muldiv-1.c: Likewise.
+ * gcc.target/mips/loongson-muldiv-2.c: Likewise.
+ * gcc.target/mips/loongson-shift-count-truncated-1.c: Likewise.
+ * gcc.target/mips/loongson3a-muldiv-1.c: Likewise.
+ * gcc.target/mips/loongson3a-muldiv-2.c: Likewise.
+ * gcc.target/mips/mips-3d-1.c: Likewise.
+ * gcc.target/mips/mips-3d-2.c: Likewise.
+ * gcc.target/mips/mips-3d-3.c: Likewise.
+ * gcc.target/mips/mips-3d-4.c: Likewise.
+ * gcc.target/mips/mips-3d-5.c: Likewise.
+ * gcc.target/mips/mips-3d-6.c: Likewise.
+ * gcc.target/mips/mips-3d-7.c: Likewise.
+ * gcc.target/mips/mips-3d-8.c: Likewise.
+ * gcc.target/mips/mips-3d-9.c: Likewise.
+ * gcc.target/mips/mips-ps-1.c: Likewise.
+ * gcc.target/mips/mips-ps-2.c: Likewise.
+ * gcc.target/mips/mips-ps-3.c: Likewise.
+ * gcc.target/mips/mips-ps-4.c: Likewise.
+ * gcc.target/mips/mips-ps-6.c: Likewise.
+ * gcc.target/mips/mips32-dspr2.c: Likewise.
+ * gcc.target/mips/mmcount-ra-address-1.c: Likewise.
+ * gcc.target/mips/neg-abs-1.c: Likewise.
+ * gcc.target/mips/neg-abs-2.c: Likewise.
+ * gcc.target/mips/nmadd-3.c: Likewise.
+ * gcc.target/mips/no-smartmips-lwxs.c: Likewise.
+ * gcc.target/mips/no-smartmips-ror-1.c: Likewise.
+ * gcc.target/mips/octeon-pop-1.c: Likewise.
+ * gcc.target/mips/pr26765.c: Likewise.
+ * gcc.target/mips/pr33256.c: Likewise.
+ * gcc.target/mips/pr33635-1.c: Likewise.
+ * gcc.target/mips/pr33755.c: Likewise.
+ * gcc.target/mips/pr35802.c: Likewise.
+ * gcc.target/mips/pr45074.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-1.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-2.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-3.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-4.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-5.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-6.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-7.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-8.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-9.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-11.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-12.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-13.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-14.c: Likewise.
+ * gcc.target/mips/r10k-cache-barrier-15.c: Likewise.
+ * gcc.target/mips/save-restore-1.c: Likewise.
+ * gcc.target/mips/save-restore-3.c: Likewise.
+ * gcc.target/mips/save-restore-5.c: Likewise.
+ * gcc.target/mips/smartmips-ror-1.c: Likewise.
+ * gcc.target/mips/smartmips-ror-2.c: Likewise.
+ * gcc.target/mips/smartmips-ror-3.c: Likewise.
+ * gcc.target/mips/smartmips-ror-4.c: Likewise.
+ * gcc.target/mips/stack-1.c: Likewise.
+
+ * gcc.target/mips/clear-cache-2.c: Remove optimization flag.
+ Tighten regexps.
+
+ * gcc.target/mips/branch-8.c: Arrange for the delay slot of the
+ branch under test to be filled with preceding rather than
+ following instructions.
+ * gcc.target/mips/branch-10.c: Likewise.
+ * gcc.target/mips/branch-11.c: Likewise.
+ * gcc.target/mips/branch-12.c: Likewise.
+ * gcc.target/mips/branch-13.c: Likewise.
+ * gcc.target/mips/branch-9.c: Likewise. Allow the frame pointer
+ to be eliminated. Tighten $28 scan-assembler-not test.
+
+ * gcc.target/mips/call-2.c: Remove optimization flag. Move second
+ function to...
+ * gcc.target/mips/call-4.c: ...this new test.
+
+ * gcc.target/mips/code-readable-2.c: Rework to make a jump table
+ more likely.
+ * gcc.target/mips/code-readable-3.c: Likewise.
+ * gcc.target/mips/code-readable-1.c: Likewise. Remove optimization
+ flag but skip for -O0.
+ * gcc.target/mips/code-readable-4.c: Likewise.
+
+ * gcc.target/mips/mips32-dsp-run.c: Prevent compile-time reduction
+ of operations under test.
+ * gcc.target/mips/mips32-dsp.c: Likewise. Remove optimization flag.
+
+ * gcc.target/mips/near-far-3.c: Remove optimization flag.
+ Don't require sibling-call optimization.
+ * gcc.target/mips/near-far-4.c: Likewise.
+
+ * gcc.target/mips/no-dsp-1.c: Require -ffat-lto-objects.
+ Make sure that the register variable is used.
+ * gcc.target/mips/soft-float-1.c: Likewise.
+
+ * gcc.target/mips/sdata-1.c: Make static data volatile.
+ * gcc.target/mips/sdata-2.c: Likewise.
+ * gcc.target/mips/sdata-3.c: Likewise.
+ * gcc.target/mips/sdata-4.c: Likewise.
+
+ * gcc.target/mips/20020620-1.c: Remove optimization flag but
+ skip for -O0.
+ * gcc.target/mips/atomic-memory-2.c: Likewise.
+ * gcc.target/mips/branch-cost-1.c: Likewise.
+ * gcc.target/mips/branch-cost-2.c: Likewise.
+ * gcc.target/mips/cache-1.c: Likewise.
+ * gcc.target/mips/call-1.c: Likewise.
+ * gcc.target/mips/call-saved-2.c: Likewise.
+ * gcc.target/mips/const-anchor-1.c: Likewise.
+ * gcc.target/mips/const-anchor-2.c: Likewise.
+ * gcc.target/mips/dse-1.c: Likewise.
+ * gcc.target/mips/dsp-lhx.c: Likewise.
+ * gcc.target/mips/dspr2-MULTU.c: Likewise.
+ * gcc.target/mips/ext-1.c: Likewise.
+ * gcc.target/mips/ext-2.c: Likewise.
+ * gcc.target/mips/ext-3.c: Likewise.
+ * gcc.target/mips/ext-4.c: Likewise.
+ * gcc.target/mips/ext-5.c: Likewise.
+ * gcc.target/mips/ext-6.c: Likewise.
+ * gcc.target/mips/ext-7.c: Likewise.
+ * gcc.target/mips/extend-1.c: Likewise.
+ * gcc.target/mips/fix-r4000-1.c: Likewise.
+ * gcc.target/mips/fix-r4000-3.c: Likewise.
+ * gcc.target/mips/fix-r4000-5.c: Likewise.
+ * gcc.target/mips/fix-r4000-6.c: Likewise.
+ * gcc.target/mips/fix-r4000-8.c: Likewise.
+ * gcc.target/mips/fix-r4000-10.c: Likewise.
+ * gcc.target/mips/fixed-scalar-type.c: Likewise.
+ * gcc.target/mips/fixed-vector-type.c: Likewise.
+ * gcc.target/mips/fpr-moves-1.c: Likewise.
+ * gcc.target/mips/fpr-moves-2.c: Likewise.
+ * gcc.target/mips/fpr-moves-3.c: Likewise.
+ * gcc.target/mips/fpr-moves-4.c: Likewise.
+ * gcc.target/mips/fpr-moves-5.c: Likewise.
+ * gcc.target/mips/fpr-moves-6.c: Likewise.
+ * gcc.target/mips/ins-1.c: Likewise.
+ * gcc.target/mips/ins-2.c: Likewise.
+ * gcc.target/mips/interrupt_handler-2.c: Likewise.
+ * gcc.target/mips/interrupt_handler-3.c: Likewise.
+ * gcc.target/mips/lazy-binding-1.c: Likewise.
+ * gcc.target/mips/madd-3.c: Likewise.
+ * gcc.target/mips/madd-5.c: Likewise.
+ * gcc.target/mips/madd-6.c: Likewise.
+ * gcc.target/mips/madd-8.c: Likewise.
+ * gcc.target/mips/madd-9.c: Likewise.
+ * gcc.target/mips/memcpy-1.c: Likewise.
+ * gcc.target/mips/mips-ps-type.c: Likewise.
+ * gcc.target/mips/mips-ps-type-2.c: Likewise.
+ * gcc.target/mips/mips-sched-madd.c: Likewise.
+ * gcc.target/mips/mips16e-extends.c: Likewise.
+ * gcc.target/mips/mips32r2-mxhc1.c: Likewise.
+ * gcc.target/mips/mips64-dsp-ldx.c: Likewise.
+ * gcc.target/mips/movcc-1.c: Likewise.
+ * gcc.target/mips/movcc-2.c: Likewise.
+ * gcc.target/mips/movcc-3.c: Likewise.
+ * gcc.target/mips/msub-5.c: Likewise.
+ * gcc.target/mips/msub-6.c: Likewise.
+ * gcc.target/mips/msub-8.c: Likewise.
+ * gcc.target/mips/mult-2.c: Likewise.
+ * gcc.target/mips/mult-3.c: Likewise.
+ * gcc.target/mips/mult-5.c: Likewise.
+ * gcc.target/mips/mult-6.c: Likewise.
+ * gcc.target/mips/mult-7.c: Likewise.
+ * gcc.target/mips/mult-12.c: Likewise.
+ * gcc.target/mips/mult-13.c: Likewise.
+ * gcc.target/mips/mult-14.c: Likewise.
+ * gcc.target/mips/mult-15.c: Likewise.
+ * gcc.target/mips/mult-17.c: Likewise.
+ * gcc.target/mips/mult-18.c: Likewise.
+ * gcc.target/mips/mult-19.c: Likewise.
+ * gcc.target/mips/nmadd-1.c: Likewise.
+ * gcc.target/mips/nmadd-2.c: Likewise.
+ * gcc.target/mips/octeon-baddu-1.c: Likewise.
+ * gcc.target/mips/octeon-cins-1.c: Likewise.
+ * gcc.target/mips/octeon-cins-2.c: Likewise.
+ * gcc.target/mips/octeon-dmul-3.c: Likewise.
+ * gcc.target/mips/octeon-exts-2.c: Likewise.
+ * gcc.target/mips/octeon-exts-3.c: Likewise.
+ * gcc.target/mips/octeon-exts-4.c: Likewise.
+ * gcc.target/mips/octeon-exts-5.c: Likewise.
+ * gcc.target/mips/octeon-exts-6.c: Likewise.
+ * gcc.target/mips/octeon-exts-7.c: Likewise.
+ * gcc.target/mips/octeon-pop-2.c: Likewise.
+ * gcc.target/mips/octeon-seq-3.c: Likewise.
+ * gcc.target/mips/octeon-seq-4.c: Likewise.
+ * gcc.target/mips/octeon2-lx-1.c: Likewise.
+ * gcc.target/mips/octeon2-lx-2.c: Likewise.
+ * gcc.target/mips/octeon2-lx-3.c: Likewise.
+ * gcc.target/mips/pr54240.c: Likewise.
+ * gcc.target/mips/rsqrt-1.c: Likewise.
+ * gcc.target/mips/rsqrt-2.c: Likewise.
+ * gcc.target/mips/rsqrt-3.c: Likewise.
+ * gcc.target/mips/rsqrt-4.c: Likewise.
+ * gcc.target/mips/save-restore-2.c: Likewise.
+ * gcc.target/mips/save-restore-4.c: Likewise.
+ * gcc.target/mips/sb1-1.c: Likewise.
+ * gcc.target/mips/scc-1.c: Likewise.
+ * gcc.target/mips/scc-2.c: Likewise.
+ * gcc.target/mips/scc-3.c: Likewise.
+ * gcc.target/mips/scc-4.c: Likewise.
+ * gcc.target/mips/smartmips-lwxs.c: Likewise.
+ * gcc.target/mips/truncate-1.c: Likewise.
+ * gcc.target/mips/truncate-2.c: Likewise.
+ * gcc.target/mips/truncate-3.c: Likewise.
+ * gcc.target/mips/truncate-4.c: Likewise.
+ * gcc.target/mips/truncate-5.c: Likewise.
+ * gcc.target/mips/truncate-6.c: Likewise.
+ * gcc.target/mips/unaligned-1.c: Likewise.
+
+ * gcc.target/mips/dpaq_sa_l_w.c: Remove optimization flag but
+ skip for -O0. Require -fexpensive-optimizations.
+ * gcc.target/mips/dpsq_sa_l_w.c: Likewise.
+ * gcc.target/mips/dspr2-MULT.c: Likewise.
+ * gcc.target/mips/fix-r4000-2.c: Likewise.
+ * gcc.target/mips/fix-r4000-4.c: Likewise.
+ * gcc.target/mips/fix-r4000-7.c: Likewise.
+ * gcc.target/mips/fix-r4000-9.c: Likewise.
+ * gcc.target/mips/madd-1.c: Likewise.
+ * gcc.target/mips/madd-2.c: Likewise.
+ * gcc.target/mips/madd-4.c: Likewise.
+ * gcc.target/mips/maddu-1.c: Likewise.
+ * gcc.target/mips/maddu-2.c: Likewise.
+ * gcc.target/mips/maddu-3.c: Likewise.
+ * gcc.target/mips/maddu-4.c: Likewise.
+ * gcc.target/mips/msub-1.c: Likewise.
+ * gcc.target/mips/msub-2.c: Likewise.
+ * gcc.target/mips/msub-3.c: Likewise.
+ * gcc.target/mips/msub-4.c: Likewise.
+ * gcc.target/mips/msubu-1.c: Likewise.
+ * gcc.target/mips/msubu-2.c: Likewise.
+ * gcc.target/mips/msubu-3.c: Likewise.
+ * gcc.target/mips/msubu-4.c: Likewise.
+ * gcc.target/mips/mult-1.c: Likewise.
+ * gcc.target/mips/mult-4.c: Likewise.
+ * gcc.target/mips/mult-8.c: Likewise.
+ * gcc.target/mips/mult-9.c: Likewise.
+ * gcc.target/mips/mult-10.c: Likewise.
+ * gcc.target/mips/mult-11.c: Likewise.
+ * gcc.target/mips/mult-16.c: Likewise.
+
+ * gcc.target/mips/fix-r4000-11.c: Remove optimization flag but
+ skip for -O0 and -Os.
+ * gcc.target/mips/fix-r4000-12.c: Likewise.
+ * gcc.target/mips/madd-7.c: Likewise.
+ * gcc.target/mips/mips-ps-5.c: Likewise.
+ * gcc.target/mips/mips-ps-7.c: Likewise.
+ * gcc.target/mips/msub-7.c: Likewise.
+
+ * gcc.target/mips/mmcount-ra-address-2.c: Remove optimization flag but
+ skip for -O0. Require -mno-abicalls.
+ * gcc.target/mips/mmcount-ra-address-3.c: Likewise.
+
+ * gcc.target/mips/octeon-bbit-1.c: Remove optimization flag but
+ skip for -O0. Require a total number of BBIT instructions and
+ at least one of each kind.
+
+ * gcc.target/mips/octeon-bbit-2.c: Remove optimization flag but
+ skip for -O0. Require -fno-unroll-loops.
+
+ * gcc.target/mips/octeon-bbit-3.c: Remove optimization flag but
+ skip for -O0. Allow BLTZ as well as BGEZ.
+
+ * gcc.target/mips/octeon-dmul-2.c: Skip for -Os.
+
+ * gcc.target/mips/octeon-pipe-1.c: Remove optimization flag but
+ skip for -O0. Require -fschedule-insns2.
+ * gcc.target/mips/octeon2-pipe-1.c: Likewise.
+
+ * gcc.target/mips/r10k-cache-barrier-10.c: Remove optimization flag
+ but skip for -O0. Make a branch-likely more likely.
+
+ * gcc.target/mips/timode-2.c: Split each test into its own function.
+ * gcc.target/mips/timode-1.c: Likewise. Skip for -Os.
+
+ * gcc.target/mips/vr-mult-1.c: Remove optimization flag but
+ skip for -O0. Require -fpeephole2.
+ * gcc.target/mips/vr-mult-2.c: Likewise.
+
+2012-05-25 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/53469
+ * gcc.dg/cpp/_Pragma7.c: New test case.
+
+2012-08-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54370
+ * gfortran.dg/do_5.f90: New.
+
+2012-08-27 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/bessel_5.f90: Remove -Wno-compare-reals
+ from dg-options as -Wall no longer implies it.
+
+2012-08-26 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * lib/scanasm.exp (scan-assembler-times_required_options): New proc.
+
+2012-08-25 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/fntmpdefarg3.C: New.
+
+2012-08-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51421
+ * g++.dg/cpp0x/auto34.C: New.
+
+2012-08-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/54363
+ * gcc.dg/pr54363.c: New test.
+
+ PR c/54355
+ * gcc.dg/pr54355.c: New test.
+
+2012-08-24 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR debug/52857
+ * gcc.target/i386/pr52857-1.c: New.
+ * gcc.target/i386/pr52857-2.c: Likewise.
+
+2012-08-23 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/code-readable-4.c: New test.
+
+2012-08-23 Julian Brown <julian@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.target/mips/code-readable-1.c: Add -O to options.
+
+2012-08-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/20420
+ * g++.dg/lookup/using53.C: New.
+
+2012-08-23 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/fixed-point/convert.c: Split into manageable parts:
+ * gcc.dg/fixed-point/convert-1.c: New.
+ * gcc.dg/fixed-point/convert-2.c: New.
+ * gcc.dg/fixed-point/convert-3.c: New.
+ * gcc.dg/fixed-point/convert-4.c: New.
+ * gcc.dg/fixed-point/convert-float-1.c: New.
+ * gcc.dg/fixed-point/convert-float-2.c: New.
+ * gcc.dg/fixed-point/convert-float-3.c: New.
+ * gcc.dg/fixed-point/convert-float-4.c: New.
+ * gcc.dg/fixed-point/convert-accum-neg.c: New.
+ * gcc.dg/fixed-point/convert-sat.c: New.
+ * gcc.dg/fixed-point/convert.h: New.
+
+2012-08-22 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-2.c: New.
+
+2012-08-22 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/long-double-64-1.c: New file.
+ * gcc.target/i386/long-double-64-2.c: Likewise.
+ * gcc.target/i386/long-double-64-3.c: Likewise.
+ * gcc.target/i386/long-double-64-4.c: Likewise.
+ * gcc.target/i386/long-double-80-1.c: Likewise.
+ * gcc.target/i386/long-double-80-2.c: Likewise.
+ * gcc.target/i386/long-double-80-3.c: Likewise.
+ * gcc.target/i386/long-double-80-4.c: Likewise.
+ * gcc.target/i386/long-double-80-5.c: Likewise.
+ * gcc.target/i386/long-double-80-6.c: Likewise.
+ * gcc.target/i386/long-double-80-7.c: Likewise.
+
+2012-08-22 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/54317
+ * gcc.dg/tree-ssa/vrp79.c: New testcase.
+
+2012-08-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/39423
+ * gcc.target/sh/pr39423-2.c: New.
+
+2012-08-21 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-19.c: New testcase.
+ * gcc.dg/fold-perm.c: Likewise.
+
+2012-08-20 Jan Hubicka <jh@suse.cz>
+
+ PR fortran/48636
+ * gcc.dg/ipa/inlinehint-1.c: New.
+
+2012-08-20 Florian Weimer <fweimer@redhat.com>
+
+ PR c++/19351
+ * g++.dg/init/new38.C: New test.
+ * g++.dg/init/new39.C: New test.
+
+2012-08-20 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54089
+ * gcc.target/sh/pr54089-1.c: New.
+
+2012-08-20 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-11.c: New.
+
+2012-08-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54301
+ * gfortran.dg/warn_target_lifetime_2.f90: New.
+
+2012-08-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/10416
+ * g++.dg/warn/Wunused-var-17.C: New.
+
+2012-08-20 Patrick Marlier <patrick.marlier@gmail.com>
+
+ PR middle-end/53992
+ * gcc.dg/gomp/pr53992.c: New test.
+
+2012-08-20 Richard Earnshaw <rearnsha@arm.com>
+
+ PR tree-ssa/54295
+ * gcc.c-torture/execute/20120817-1.c: New test.
+
+2012-08-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/thumb-16bit-ops.c (f): This test uses a 16-bit
+ add instruction.
+ (f2): New test that really does need adds.
+
+2012-08-20 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54327
+ * gcc.dg/torture/pr54327.c: New testcase.
+
+2012-08-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/54321
+ * gcc.c-torture/compile/pr54321.c: New test.
+
+2012-08-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54301
+ * gfortran.dg/warn_target_lifetime_1.f90: New.
+
+2012-08-19 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/54298
+ * gfortran.dg/real_compare_1.f90: New test case.
+ * gfortran.dg/bessel_5.f90: Add -Wno-compare-reals to options.
+
+2012-08-18 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/iinline-1.c: Update testcase to test inline hints.
+
+2012-08-18 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/39290
+ * gfortran.dg/interface_37.f90: New test.
+
+2012-08-17 H.J. Lu <hongjiu.lu@intel.com>
+ Gary Funck <gary@intrepid.com>
+
+ PR target/20020
+ * gcc.target/i386/pr20020-1.c: New test.
+ * gcc.target/i386/pr20020-2.c: Likewise.
+ * gcc.target/i386/pr20020-3.c: Likewise.
+
+2012-08-17 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.target/i386/perm-concat.c: New test.
+
+2012-08-17 Julian Brown <julian@codesourcery.com>
+
+ * gcc.target/arm/div64-unwinding.c: New test.
+
+2012-08-17 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/torture/Wsizeof-pointer-memaccess1.c: New test.
+
+2012-08-16 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54236
+ * gcc.target/sh/pr54236-1.c: New.
+
+2012-08-16 Hans-Peter Nilsson <hp@axis.com>
+
+ * lib/target-supports.exp (check_effective_target_sync_int_long)
+ (check_effective_target_sync_char_short): Enable for crisv32-*
+ and cris-*.
+
+ PR middle-end/54261
+ * gcc.dg/torture/pr54261-1.c: New test.
+
+2012-08-15 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54243
+ PR fortran/54244
+ * gfortran.dg/typebound_call_24.f03: New.
+
+2012-08-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/54245
+ * gcc.dg/tree-ssa/pr54245.c: New test.
+
+2012-08-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/54240
+ * gcc.target/powerpc/pr54240.c: New test.
+ * gcc.target/mips/pr54240.c: Likewise.
+
+2012-08-14 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52933
+ * gcc.target/sh/pr52933-1.c: New.
+ * gcc.target/sh/pr52933-2.c: New.
+
+2012-08-14 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/50751
+ * gcc.target/sh/pr50751-8.c: New.
+
+2012-08-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/47586
+ * gfortran.dg/typebound_proc_20.f90: Enable runtime test.
+ * gfortran.dg/typebound_proc_27.f03: New test.
+
+2012-08-14 Sterling Augustine <saugustine@google.com>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: Adjust.
+
+2012-08-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/40881
+ * gfortran.dg/data_constraints_3.f90: New.
+ * gfortran.dg/data_constraints_1.f90: Add dg-options ""
+ to disable -pedantic compilation.
+ * gfortran.dg/pr37243.f: Ditto.
+ * gfortran.dg/g77/19990826-3.f: Ditto.
+ * gfortran.dg/g77/20020307-1.f : Ditto.
+ * gfortran.dg/g77/980310-3.f: Ditto.
+
+2012-08-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54234
+ * gfortran.dg/warn_conversion_4.f90: New.
+
+2012-08-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/53411
+ PR rtl-optimization/53495
+ * gcc.c-torture/compile/pr53411.c: New test.
+ * gcc.c-torture/compile/pr53495.c: New test.
+
+2012-08-13 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-prof/update-loopch.c: Adjust.
+
+2012-08-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54200
+ * gcc.dg/guality/pr54200.c: New testcase.
+ * gcc.dg/tree-ssa/slsr-8.c: Adjust.
+
+2012-08-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/prefetch.c: Add -m3* to inclusion list.
+
+2012-08-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-7.c: New.
+ * gcc.target/sh/pr51244-8.c: New.
+ * gcc.target/sh/pr51244-9.c: New.
+ * gcc.target/sh/pr51244-10.c: New.
+
+2012-08-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/pr50749-sf-postinc-1.c: Skip for -m3. Don't skip for
+ -m2e or -m2a.
+ * gcc.target/sh/pr50749-sf-postinc-3.c: Likewise.
+ * gcc.target/sh/pr53511-1.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-1.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-3.c: Likewise.
+ * gcc.target/sh/pr53512-1.c: Skip for -m3*.
+ * gcc.target/sh/pr53512-3.c: Likewise.
+ * gcc.target/sh/pr21255-3.c: Skip for single precision FPU targets.
+
+2012-08-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/39423
+ * gcc.c-torture/compile/pr39423-1.c: New.
+ * gcc.c-torture/compile/pr39423-2.c: New.
+
+2012-08-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54221
+ * vect/vect-gems.f90: Don't mark module vars as PRIVATE as
+ they appear uninitialized on the RHS.
+ * gfortran.dg/public_private_module_6.f90: New.
+
+2012-08-11 Martin Jambor <mjambor@suse.cz>
+
+ PR fortran/48636
+ * gfortran.dg/pr48636.f90: New test.
+
+2012-08-10 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/torture/vector-shuffle1.c (f): Pass vectors indirectly
+ to avoid warnings.
+ (main): Adjust caller.
+
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/matrix/*.c: Adjust and move ...
+ * gcc.dg/torture/: ... here.
+ * gcc.dg/matrix: Remove directory.
+
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/54219
+ * gcc.dg/torture/vector-shuffle1.c: New testcase.
+
+2012-08-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR middle-end/54211
+ * gcc.dg/tree-ssa/pr54211.c: New test.
+
+2012-08-10 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * lib/target-supports.exp (check_effective_target_long_neq_int): New.
+ * gcc.dg/tree-ssa/slsr-30.c: Check for long_neq_int effective target.
+
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54109
+ * gcc.dg/torture/pr54109.c: New testcase.
+ * gcc.dg/tree-ssa/forwprop-1.c: Adjust.
+ * gcc.dg/tree-ssa/forwprop-2.c: Likewise.
+
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54027
+ * gcc.dg/torture/pr54027.c: New testcase.
+
+2012-08-10 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/plugin/selfassign.c: Adjust.
+ * gcc.dg/plugin/selfassign.c: Likewise.
+ * gcc.dg/strlenopt-11.c: Likewise.
+ * gcc.dg/strlenopt-13.c: Likewise.
+ * gcc.dg/no-strict-overflow-4.c: Likewise.
+ * gcc.dg/strict-overflow-4.c: Likewise.
+ * gcc.dg/tree-ssa/alias-11.c: Likewise.
+ * gcc.dg/tree-ssa/alias-6.c: Likewise.
+ * gcc.dg/tree-ssa/asm-3.c: Likewise.
+ * gcc.dg/tree-ssa/pr18908.c: Likewise.
+ * gcc.dg/tree-ssa/pr19431.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-pre-21.c: Likewise.
+ * gcc.dg/tree-ssa/phi-opt-10.c: Likewise.
+ * gcc.dg/tree-ssa/phi-opt-7.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-27.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-28.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-29.c: Likewise.
+ * gcc.dg/pr46309.c: Likewise.
+ * gcc.dg/tree-ssa/loop-5.c: Likewise.
+
+2012-08-09 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.c-torture/compile/20120727-1.c (dg-options): Add -mfpmath=387
+ for x86 targets.
+ * gcc.c-torture/compile/20120727-2.c: New test.
+
+2012-08-09 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/iinline-4.c: New test.
+ * gcc.dg/ipa/iinline-5.c: Likewise.
+ * gcc.dg/ipa/iinline-6.c: Likewise.
+ * gcc.dg/ipa/iinline-7.c: Likewise.
+ * gcc.dg/lto/20120723_0.c: Likewise.
+ * gcc.dg/lto/20120723_1.c: Likewise.
+
+2012-08-09 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/39423
+ * gcc.target/sh/pr39423-1.c: New.
+
+2012-08-09 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-5: New.
+ * gcc.target/sh/pr51244-6: New.
+
+2012-08-09 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/adx-addxcarry32-3.c: New.
+ * gcc.target/i386/adx-addxcarry64-3.c: New.
+
+2012-08-09 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/53701
+ * gcc.dg/pr53701.c: New test.
+
+2012-08-09 Bernd Schmidt <bernds@codesourcery.com>
+
+ * gcc.c-torture/compile/20120727-1.c: New test.
+
+2012-08-09 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/54199
+ * gfortran.dg/intrinsic_shadow_4.f90: New.
+
+2012-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.dg/tree-ssa/slsr-30.c: Require non-ilp32. Remove dg-skip-if.
+
+2012-08-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.c-torture/execute/20120808-1.c: New test.
+
+2012-08-08 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/54157
+ * gcc.target/i386/pr54157.c: New file.
+
+2012-08-08 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/adx-addcarryx32-1.c: New.
+ * gcc.target/i386/adx-addcarryx32-2.c: New.
+ * gcc.target/i386/adx-addcarryx64-1.c: New.
+ * gcc.target/i386/adx-addcarryx64-2.c: New.
+ * gcc.target/i386/adx-check.h: New.
+ * gcc.target/i386/i386.exp (check_effective_target_adx): New.
+ * gcc.target/i386/sse-12.c: Add -madx.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2012-08-07 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/tree-ssa/slsr-5.c: New.
+ * gcc.dg/tree-ssa/slsr-6.c: New.
+ * gcc.dg/tree-ssa/slsr-7.c: New.
+ * gcc.dg/tree-ssa/slsr-8.c: New.
+ * gcc.dg/tree-ssa/slsr-9.c: New.
+ * gcc.dg/tree-ssa/slsr-10.c: New.
+ * gcc.dg/tree-ssa/slsr-11.c: New.
+ * gcc.dg/tree-ssa/slsr-12.c: New.
+ * gcc.dg/tree-ssa/slsr-13.c: New.
+ * gcc.dg/tree-ssa/slsr-14.c: New.
+ * gcc.dg/tree-ssa/slsr-15.c: New.
+ * gcc.dg/tree-ssa/slsr-16.c: New.
+ * gcc.dg/tree-ssa/slsr-17.c: New.
+ * gcc.dg/tree-ssa/slsr-18.c: New.
+ * gcc.dg/tree-ssa/slsr-19.c: New.
+ * gcc.dg/tree-ssa/slsr-20.c: New.
+ * gcc.dg/tree-ssa/slsr-21.c: New.
+ * gcc.dg/tree-ssa/slsr-22.c: New.
+ * gcc.dg/tree-ssa/slsr-23.c: New.
+ * gcc.dg/tree-ssa/slsr-24.c: New.
+ * gcc.dg/tree-ssa/slsr-25.c: New.
+ * gcc.dg/tree-ssa/slsr-26.c: New.
+ * gcc.dg/tree-ssa/slsr-30.c: New.
+ * gcc.dg/tree-ssa/slsr-31.c: New.
+
+2012-08-07 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.dg/tree-prof/update-loopch.c: Ask for dump with blocks info.
+ * gcc.dg/tree-ssa/attr-hotcold-2.c: Likewise.
+ * gcc.dg/tree-ssa/pr18133-1.c: Likewise.
+
+2012-08-06 Cary Coutant <ccoutant@google.com>
+
+ * g++.dg/debug/dwarf2/non-virtual-thunk.C: New test case.
+
+2012-08-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/35831
+ * gfortran.dg/dummy_procedure_5.f90: Modified.
+ * gfortran.dg/dummy_procedure_8.f90: New.
+ * gfortran.dg/interface_26.f90: Modified.
+ * gfortran.dg/proc_ptr_11.f90: Modified.
+ * gfortran.dg/proc_ptr_15.f90: Modified.
+ * gfortran.dg/proc_ptr_result_5.f90: Modified.
+ * gfortran.dg/typebound_override_1.f90: Modified.
+ * gfortran.dg/typebound_proc_6.f03: Modified.
+
+2012-08-06 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/51938
+ PR tree-optimization/52005
+ * gcc.dg/tree-ssa/ssa-ifcombine-8.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-ifcombine-9.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-10.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-11.c: Likewise.
+
+2012-08-06 Dodji Seketeli <dodji@redhat.com>
+
+ Avoid crashing on erroneous static_assert usage
+ * g++.dg/cpp0x/static_assert8.C: New test.
+
+2012-08-06 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/sfinae38.C: New.
+
+2012-08-06 Marc Glisse <marc.glisse@inria.fr>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54165
+ * g++.dg/conversion/void2.C: New.
+
+2012-08-06 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/tree-ssa/vrp78.c: New test.
+
+2012-08-04 Sandra Loosemore <sandra@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/opt/enum2.C: Require fpic target.
+ * g++.dg/lto/20090303_0.C: Likewise.
+
+2012-08-04 Sandra Loosemore <sandra@codesourcery.com>
+ Catherine Moore <clm@codesourcery.com>
+
+ * gcc.target/mips/clear-cache-1.c: Test for alternate cache
+ flush function names too.
+ * gcc.target/mips/clear-cache-1.c: Likewise.
+
+2012-08-03 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR target/54156
+ * gcc.dg/vect/pr53773.c: Change to use optimized dump.
+
+2012-08-03 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54166
+ * gfortran.dg/array_5.f90: New test.
+
+2012-08-03 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/30318
+ * gcc.dg/tree-ssa/vrp77.c: New testcase.
+
+2012-08-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector17.C: New testcase.
+
+2012-08-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/51931
+ * gcc.c-torture/compile/20001226-1.c: Remove nomips16 attribute.
+ * g++.dg/opt/longbranch1.C: Likewise.
+
+2012-08-02 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/53805
+ * gcc.dg/fold-notunord.c: New testcase.
+
+2012-08-02 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_rank_bounds_1.f90: New test.
+ * gfortran.dg/assumed_rank_bounds_2.f90: New test.
+
+2012-08-02 Jason Merrill <jason@redhat.com>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51213 (again)
+ * g++.dg/cpp0x/sfinae37.C: Extend.
+
+2012-08-02 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50672
+ * g++.dg/torture/pr50672.C: New testcase.
+
+2012-08-02 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54147
+ * gfortran.dg/abstract_type_6.f03: Modified.
+ * gfortran.dg/proc_ptr_comp_3.f90: Modified.
+ * gfortran.dg/proc_ptr_comp_35.f90: New.
+ * gfortran.dg/typebound_proc_9.f03: Modified.
+ * gfortran.dg/typebound_proc_26.f90: New.
+
+2012-08-02 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/pta-callused-1.c: Adjust.
+ * gcc.dg/torture/pta-ptrarith-3.c: Likewise.
+ * gcc.dg/torture/ssa-pta-fn-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-19.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-1.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
+ * gcc.dg/tree-ssa/pta-ptrarith-1.c: Likewise.
+ * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
+
+2012-08-01 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/54033
+ * gfortran.dg/include_6.f90: New test case.
+ * gfortran.dg/include_7.f90: New test case.
+ * gfortran.dg/include_3.f90: Add dg-warning for missing directory.
+
+2012-08-01 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/tree-ssa/vrp76.c: New test.
+
+2012-08-01 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/46556
+ * gcc.dg/tree-ssa/slsr-27.c: New.
+ * gcc.dg/tree-ssa/slsr-28.c: New.
+ * gcc.dg/tree-ssa/slsr-29.c: New.
+
+2012-07-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/42418
+ * gfortran.dg/proc_decl_29.f90: New.
+
+2012-07-31 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/predict-7.c: New test.
+
+2012-07-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54134
+ * gfortran.dg/typebound_override_3.f90: New.
+
+2012-07-31 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/53773
+ * gcc.dg/vect/pr53773.c: New test.
+
+2012-07-31 Nick Clifton <nickc@redhat.com>
+
+ * gcc.dg/stack-usage-1.c (SIZE): Define for FRV,
+ and for XStormy16.
+
+2012-07-31 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/c_funloc_tests_6.f90: New.
+ * gfortran.dg/c_funloc_tests_7.f90: New.
+ * gfortran.dg/c_funloc_tests_5.f03: Compile with -std=f2003.
+
+2012-07-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53624
+ * g++.dg/cpp0x/temp_default5.C: New.
+
+2012-07-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/51081
+ * gfortran.dg/proc_ptr_37.f90: New.
+
+2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_natural_alignment): New function.
+ * gcc.dg/align-2.c: Only run on targets with natural alignment
+ of vector types.
+ * gcc.dg/vect/slp-25.c: Adjust tests for targets without natural
+ alignment of vector types.
+
+2012-07-30 Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/rdseed16-1.c: New.
+ * gcc.target/i386/rdseed32-1.c: Ditto
+ * gcc.target/i386/rdseed64-1.c: Ditto
+ * gcc.target/i386/sse-12.c: Add -mrdseed.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2012-07-30 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-4.c: New.
+
+2012-07-27 Uros Bizjak <ubizjak@gmail.com>
+
+ * gfortran.dg/bind_c_array_params_2.f90: Add "-mno-explicit-relocs"
+ for alpha*-*-* targets. Cleanup original tree dump.
+
+2012-07-27 Segher Boessenkool <segher@kernel.crashing.org>
+
+ * gcc.target/powerpc/rs6000-power2-1.c: Delete.
+ * gcc.target/powerpc/rs6000-power2-2.c: Delete.
+
+2012-07-27 Anna Tikhonova <anna.tikhonova@intel.com>
+
+ * gcc.dg/20020201-1.c: Remove declarations for exit, abort,
+ rand, srand. Include <stdlib.h>.
+
+2012-07-26 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/pr45259.c: Only -fpic depends on fpic support.
+
+2012-07-26 Richard Henderson <rth@redhat.com>
+
+ * gcc.dg/attr-hotcold-1.c: New.
+ * gcc.dg/tree-ssa/attr-hotcold-2.c: New.
+
+2012-07-26 Andrew Jenner <andrew@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.c-torture/compile/pr50380.c: Add code to cause cycle of length 2.
+
+2012-07-26 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/contiguous_1.f90: Update dg-error.
+ * gfortran.dg/proc_ptr_32.f90: Ditto.
+
+2012-07-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/54098
+ * gcc.dg/torture/pr54098.c: New testcase.
+
+2012-07-26 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * gcc.target/arm/neon/vld1Q_dupu64.c: Regenerate.
+ * gcc.target/arm/neon/vld1Q_dups64.c: Likewise.
+
+2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/44354
+ * gfortran.dg/array_constructor_39.f90: New test.
+
+2012-07-26 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/44354
+ * gfortran.dg/array_constructor_38.f90: New test.
+
+2012-07-25 Janis Johnson <janisjo@codesourcery.com>
+
+ * g++.dg/cpp0x/nullptr21.c: Remove printfs, make self-checking.
+
+2012-07-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/noreturn5.ad[sb]: New test.
+
+2012-07-25 Sandra Loosemore <sandra@codesourcery.com>
+ Paul Brook <paul@codesourcery.com>
+
+ PR target/53633
+
+ * lib/target-suports.exp (check_effective_target_naked_functions): New.
+ * c-c++-common/pr53633.c: New test.
+
+2012-07-25 Siddhesh Poyarekar <siddhesh@redhat.com>
+
+ * gcc.target/i386/asm-dialect-1.c: New test case.
+
+2012-07-25 Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/prefetchw-1.c: New.
+ * gcc.target/i386/sse-12.c: Add -mprfchw.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2012-07-24 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/gcc-dg.exp (process-message): Don't ignore errors.
+
+2012-07-24 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ PR target/54051
+ * gcc.target/arm/pr54051.c: New.
+ * gcc.target/arm/vfp-1.c: Adjust test.
+
+2012-07-24 Julian Brown <julian@codesourcery.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_hf_eabi): New.
+ * gcc.dg/torture/stackalign/builtin-apply-2.c: Skip for
+ hard-float ARM.
+
+2012-07-23 Paul Brook <paul@codesourcery.com>
+
+ * g++.dg/other/armv7m-1.c: New test.
+
+2012-07-23 Julian Brown <julian@codesourcery.com>
+
+ * gcc.c-torture/execute/20101011-1.c (__aeabi_idiv0): Define for
+ ARM.
+ (DO_TEST): Define to 1 for appropriate ARM targets.
+
+2012-07-22 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR tree-optimization/53881
+ * gcc.dg/pr53881.c: Renamed to ...
+ * gcc.dg/pr53881-1.c: ... this.
+ * gcc.dg/pr53881-2.c: New test.
+
+2012-07-22 Hans-Peter Nilsson <hp@axis.com>
+
+ Handle recent changes in default atomics for cris*-*-linux*.
+ * gcc.target/cris/torture/sync-mis-xchg-i-1ml.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-2ml.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-3ml.c,
+ gcc.target/cris/torture/sync-mis-xchg-s-1ml.c,
+ gcc.target/cris/torture/sync-mis-op-i-1ml.c,
+ gcc.target/cris/torture/sync-mis-op-i-2ml.c,
+ gcc.target/cris/torture/sync-mis-op-i-3ml.c,
+ gcc.target/cris/torture/sync-mis-op-s-1ml.c: New tests.
+ * gcc.target/cris/torture/sync-mis-op-i-2a.c: Make sure
+ -mno-unaligned-atomic-may-use-library is in effect for
+ cris*-*-linux*.
+ * gcc.target/cris/torture/sync-mis-xchg-i-1.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-2.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-3.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-2a.c,
+ gcc.target/cris/torture/sync-mis-xchg-s-1.c,
+ gcc.target/cris/torture/sync-mis-op-i-1.c,
+ gcc.target/cris/torture/sync-mis-op-i-2.c,
+ gcc.target/cris/torture/sync-mis-op-i-1a.c,
+ gcc.target/cris/torture/sync-mis-op-i-3.c,
+ gcc.target/cris/torture/sync-mis-op-i-3a.c,
+ gcc.target/cris/torture/sync-mis-op-s-1a.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-1a.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-3a.c,
+ gcc.target/cris/torture/sync-mis-xchg-s-1a.c: Similar.
+ * gcc.target/cris/torture/sync-mis-op-s-1.c: Ditto.
+ (main): Remove local variable x.
+ [mis_ok]: Check that atomics don't fail.
+
+2012-07-21 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.dg/tree-ssa/vrp72.c: New test.
+ * gcc.dg/tree-ssa/vrp73.c: New test.
+ * gcc.dg/tree-ssa/vrp74.c: New test.
+ * gcc.dg/tree-ssa/vrp75.c: New test.
+
+2012-07-21 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.dg/tree-ssa/alias-21.c: New testcase.
+ * gcc.dg/tree-ssa/alias-22.c: New testcase.
+
+2012-07-21 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/octeon-pop-2.c: New testcase.
+
+2012-07-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_rank_3.f90: New.
+ * gfortran.dg/assumed_rank_11.f90: New.
+ * gfortran.dg/assumed_rank_1.f90: Update dg-error.
+ * gfortran.dg/assumed_rank_2.f90: Update dg-error.
+ * gfortran.dg/assumed_rank_7.f90: Update dg-error.
+
+2012-07-21 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/unaligned-1.c: New testcase.
+
+2012-07-21 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.c-torture/execute/20101011-1.c (DO_TEST): Define as 0 for CRIS.
+
+2012-07-20 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/bind_c_array_params_2.f90: New.
+ * gfortran.dg/bind_c_array_params.f03: Add -std=f2003
+ and update dg-error.
+
+2012-07-20 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/assumed_rank_12.f90: Update dg-error.
+
+2012-07-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/54038
+ * g++.dg/other/array7.C: New.
+
+2012-07-20 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.dg/tree-prof/update-loopch.c: Look for counts on the dumps of
+ the basic block and check loop depth.
+ * gcc.dg/tree-ssa/pr18133-1.c: Dump details, not blocks. Update
+ matching patterns and comments.
+ * gcc.dg/tree-ssa/20031021-1.c: Fix check patterns.
+ * gcc.dg/tree-ssa/vector-2.c: Likewise.
+
+2012-07-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/28656
+ * c-c++-common/pr28656.c: New test.
+
+2012-07-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/54026
+ * g++.dg/init/mutable1.C: New.
+
+2012-07-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_type_3.f90: Update dg-error.
+ * gfortran.dg/assumed_rank_1.f90: New.
+ * gfortran.dg/assumed_rank_1_c.c: New.
+ * gfortran.dg/assumed_rank_2.f90: New.
+ * gfortran.dg/assumed_rank_4.f90: New.
+ * gfortran.dg/assumed_rank_5.f90: New.
+ * gfortran.dg/assumed_rank_6.f90: New.
+ * gfortran.dg/assumed_rank_7.f90: New.
+ * gfortran.dg/assumed_rank_8.f90: New.
+ * gfortran.dg/assumed_rank_8_c.c: New.
+ * gfortran.dg/assumed_rank_9.f90: New.
+ * gfortran.dg/assumed_rank_10.f90: New.
+ * gfortran.dg/assumed_rank_12.f90: New.
+
+2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt25.adb: New test.
+ * gnat.dg/opt25_pkg1.ad[sb]: New helper.
+ * gnat.dg/opt25_pkg2.ad[sb]: Likewise.
+
+2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aggr20.ad[sb]: New test.
+ * gnat.dg/aggr20_pkg.ads: New helper.
+
+2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/derived_type3.adb: New test.
+ * gnat.dg/derived_type3_pkg.ad[sb]: New helper.
+
+2012-07-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53942
+ * gcc.dg/pr53942.c: New test.
+
+2012-07-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/54021
+ * g++.dg/cpp0x/constexpr-builtin2.C: New.
+
+2012-07-19 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr38.adb: New test.
+
+2012-07-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/54017
+ * c-c++-common/gomp/pr54017.c: New test.
+
+2012-07-19 Richard Guenther <rguenther@suse.de>
+ Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization11.adb: New testcase.
+ * gnat.dg/loop_optimization11_pkg.ads: Likewise.
+
+2012-07-18 Paolo Carlini <paolo.carlini@oracle.com>
+ Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/sfinae37.C: New.
+ * g++.dg/template/access23.C: New.
+ * g++.dg/template/access7.C: Adjust.
+ * g++.dg/template/sfinae10.C: Don't expect errors.
+ * g++.dg/template/sfinae6_neg.C: Don't expect errors.
+
+2012-07-18 Julian Brown <julian@codesourcery.com>
+ Sandra Loosemore <sandra@codesroucery.com>
+
+ * gcc.c-torture/execute/20101011-1.c: Skip on bare-metal m68k.
+
+2012-07-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/noreturn4.ad[sb]: New test.
+ * gnat.dg/noreturn4_pkg.ads: New helper.
+
+2012-07-18 Jie Zhang <jzhang918@gmail.com>
+ Julian Brown <julian@codesourcery.com>
+
+ * gcc.target/arm/neon-vdup-1.c: New test case.
+ * gcc.target/arm/neon-vdup-2.c: New test case.
+ * gcc.target/arm/neon-vdup-3.c: New test case.
+ * gcc.target/arm/neon-vdup-4.c: New test case.
+ * gcc.target/arm/neon-vdup-5.c: New test case.
+ * gcc.target/arm/neon-vdup-6.c: New test case.
+ * gcc.target/arm/neon-vdup-7.c: New test case.
+ * gcc.target/arm/neon-vdup-8.c: New test case.
+ * gcc.target/arm/neon-vdup-9.c: New test case.
+ * gcc.target/arm/neon-vdup-10.c: New test case.
+ * gcc.target/arm/neon-vdup-11.c: New test case.
+ * gcc.target/arm/neon-vdup-12.c: New test case.
+ * gcc.target/arm/neon-vdup-13.c: New test case.
+ * gcc.target/arm/neon-vdup-14.c: New test case.
+ * gcc.target/arm/neon-vdup-15.c: New test case.
+ * gcc.target/arm/neon-vdup-16.c: New test case.
+ * gcc.target/arm/neon-vdup-17.c: New test case.
+ * gcc.target/arm/neon-vdup-18.c: New test case.
+ * gcc.target/arm/neon-vdup-19.c: New test case.
+ * gcc.target/arm/neon-combine-sub-abs-into-vabd.c: Make intrinsic
+ arguments non-constant.
+
+2012-07-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53970
+ * g++.dg/torture/pr53970.C: New testcase.
+
+2012-07-18 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/38621
+ * gcc.c-torture/compile/pr38621.c: New.
+
+2012-07-18 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/33135
+ * gcc.target/sh/pr33135-1.c: New.
+ * gcc.target/sh/pr33135-2.c: New.
+ * gcc.target/sh/pr33135-3.c: New.
+ * gcc.target/sh/pr33135-4.c: New.
+
+2012-07-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/53995
+ * g++.dg/parse/enum9.C: New.
+
+2012-07-17 Kazu Hirata <kazu@codesourcery.com>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.target/m68k/pr36134.c: Use dg-skip-if to skip the testcase
+ if there is a conflict with -mcpu=. Use -mcpu=5208.
+
+2012-07-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/53989
+ * g++.dg/template/array23.C: New.
+
+2012-07-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53985
+ * gfortran.dg/bind_c_usage_26.f90: New.
+ * gfortran.dg/bind_c_procs.f03: Add dg-options "-Wc-binding-type".
+ * gfortran.dg/bind_c_usage_13.f03: Ditto.
+ * gfortran.dg/bind_c_usage_18.f90: Ditto.
+ * gfortran.dg/interop_params.f03: Ditto.
+
+2012-07-17 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/inherit8.C: Adjust.
+ * g++.dg/template/using21.C: Adjust.
+ * g++.dg/template/using22.C: Adjust.
+
+ PR c++/53549
+ * g++.dg/template/current-inst1.C: New.
+ * g++.dg/parse/crash35.C: Adjust.
+
+2012-07-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52101
+ * gfortran.dg/oldstyle_4.f90: New.
+
+2012-07-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49265
+ * gfortran.dg/module_procedure_double_colon_3.f90: New.
+ * gfortran.dg/module_procedure_double_colon_4.f90: New.
+
+2012-07-16 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/parse/access8.C: Adjust.
+ * g++.dg/template/sfinae6_neg.C: Adjust.
+
+2012-07-16 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/53824
+ * gfortran.dg/coarray_allocate_1.f90: New test.
+
+2012-07-16 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.c-torture/execute/bswap-1.c: New testcase.
+ * gcc.c-torture/compile/unalign-1.c: New testcase.
+ * gcc.c-torture/compile/20120524-1.c: New testcase.
+ * gcc.c-torture/compile/20101216-1.c: New testcase.
+
+2012-07-16 Dehao Chen <dehao@google.com>
+
+ Revert
+ 2012-07-10 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/debug_info_inline.c: New test.
+
+2012-07-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/53956
+ * gfortran.dg/proc_decl_28.f90: New.
+
+2012-07-16 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.dg/torture/builtins-1.c: New testcase.
+
+2012-07-16 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/sync-2i.c, gcc.target/cris/sync-2s.c,
+ gcc.target/cris/sync-3i.c, gcc.target/cris/sync-3s.c,
+ gcc.target/cris/sync-4i.c, gcc.target/cris/sync-4s.c,
+ gcc.target/cris/sync-1-v10.c,
+ gcc.target/cris/sync-1-v32.c: For cris*-*-linux*, also
+ pass -mno-unaligned-atomic-may-use-library.
+ * gcc.target/cris/sync-xchg-1.c: New test.
+ * gcc.target/cris/20011127-1.c: Adjust to %P being a
+ valid register operand output modifier.
+
+2012-07-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: Support all known comment
+ characters.
+
+2012-07-13 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/octeon2-pipe-1.c: Use cleanup-rtl-dump
+ rather than cleanup-tree-dump.
+ * gcc.target/mips/octeon-pipe-1.c: Likewise.
+
+2012-07-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53907
+ * gcc.target/i386/pr53907.c: New testcase.
+
+2012-07-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53922
+ * gcc.dg/torture/pr53922.c: New testcase.
+
+2012-07-13 Hans-Peter Nilsson <hp@axis.com>
+
+ PR rtl-optimization/53908
+ * gcc.dg/torture/pr53908.c: New test.
+
+2012-07-13 Jonathan Wakely <jwakely.gcc@gmail.com>
+
+ PR c++/53531
+ * g++.dg/cpp0x/variadic135.C: New.
+
+2012-07-12 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/sfinae6_neg.C: Adjust.
+
+2012-07-12 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/c_f_pointer_shape_tests_5.f90: New.
+ * gfortran.dg/c_f_pointer_tests_3.f90: Update
+ scan-tree-dump-times pattern.
+
+2012-07-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: Allow for / comments.
+
+2012-07-11 Jason Merrill <jason@redhat.com>
+
+ DR 1402
+ * g++.g/cpp0x/defaulted37.C: New.
+
+2012-07-11 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ PR target/53859
+ * gcc.target/arm/pr53859.c: New test.
+
+2012-07-10 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53886
+ * gcc.c-torture/compile/pr53886.c: New.
+
+2012-07-10 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/debug_info_inline.c: New test.
+
+2012-07-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/53733
+ * g++.dg/cpp0x/defaulted36.C: New.
+ * g++.dg/cpp0x/defaulted21.C: Adjust.
+
+ * g++.dg/cpp0x/implicit13.C: Add vbase and member tests.
+
+2012-07-09 Sterling Augustine <saugustine@google.com>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: New.
+
+2012-07-09 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR tree-optimization/53887
+ * gcc.dg/pr53887.c: New test.
+
+2012-07-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/53882
+ * g++.dg/cpp0x/nullptr29.C: New.
+
+2012-07-09 Tom de Vries <tom@codesourcery.com>
+ Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/builtin-unreachable-6.c: New test.
+ * gcc.dg/builtin-unreachable-5.c: New test.
+
+2012-07-07 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR tree-optimization/53881
+ * gcc.dg/pr53881.c: New test.
+
+2012-07-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/53862
+ * g++.dg/cpp0x/variadic134.C: New.
+
+ PR c++/53858
+ * g++.dg/cpp0x/alias-decl-20.C: New.
+
+2012-07-06 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/51879
+ * gcc.dg/pr51879-16.c: New test.
+ * gcc.dg/pr51879-17.c: Same.
+
+2012-07-06 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/52009
+ * gcc.dg/pr51879-7.c: New test.
+ * gcc.dg/pr51879-18.c: New test.
+
+2012-07-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/50852
+ * g++.dg/template/typedef39.C: New.
+
+ PR c++/53039
+ * g++.dg/cpp0x/variadic133.C: New.
+ * g++.dg/template/param1.C: Adjust.
+
+2012-07-05 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ PR target/48941
+ PR target/51980
+ * gcc.target/arm/neon/vtrnf32.c: Update.
+ * gcc.target/arm/neon/vtrns32.c: Update.
+ * gcc.target/arm/neon/vtrnu32.c: Update.
+ * gcc.target/arm/neon/vzipf32.c: Update.
+ * gcc.target/arm/neon/vzips32.c: Update.
+ * gcc.target/arm/neon/vzipu32.c: Update.
+
+2012-07-05 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/53732
+ * gfortran.dg/inline_sum_4.f90: New test.
+
+2012-07-05 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.c-torture/compile/20000326-1.c: Fix to not optimize to empty.
+
+2012-07-05 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gcc.target/arm/fma-sp.c: New testcase.
+ * gcc.target/arm/fma.c: Likewise.
+ * gcc.target/arm/fma.h: Likewise.
+
+2012-07-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/53848
+ * g++.dg/other/enum3.C: New.
+
+2012-07-04 Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/53321
+ * g++.dg/torture/pr53321.C: New test.
+
+2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53844
+ * g++.dg/tree-ssa/pr53844.C: New testcase.
+
+2012-07-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53849
+ * gcc.dg/pr53849.c: New testcase.
+
+2012-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/53812
+ * g++.dg/ext/label14.C: New test.
+
+2012-07-03 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/53811
+ * g++.dg/other/pr53811.C: New test.
+
+2012-07-03 Andreas Schwab <schwab@linux-m68k.org>
+
+ PR target/28896
+ * gcc.target/m68k/stack-limit-1.c: New testcase.
+
+2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/recursive_call.adb: New test.
+
+2012-07-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr37.ad[sb]: New test.
+
+2012-07-03 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * g++.dg/other/packed1.C: Remove SH from xfail list.
+
+2012-07-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/53619
+ * g++.dg/cpp0x/lambda/lambda-this5.C: New.
+
+ PR c++/53783
+ * g++.dg/cpp0x/lambda/lambda-template7.C: New.
+
+ PR c++/53788
+ * g++.dg/cpp0x/decltype39.C: New.
+ * g++.dg/diagnostic/method1.C: Adjust.
+
+ PR c++/53816
+ * g++.dg/template/ref6.C: New.
+
+2012-07-02 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53568
+ * gcc.target/sh/pr53568-1.c: New.
+
+2012-07-02 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-1.c: Check that movt insn is not generated.
+
+2012-07-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/53821
+ * g++.dg/cpp0x/lambda/lambda-template6.C: New.
+
+ PR c++/53524
+ * g++.dg/template/enum7.C: New.
+ * g++.dg/other/ptrmem10.C: Adjust.
+ * g++.dg/other/ptrmem11.C: Adjust.
+ * g++.dg/cpp0x/scoped_enum.C: Adjust.
+
+2012-07-02 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.dg/tree-ssa/pr36881.c: Fix test case to not expand as bit tests.
+
+2012-07-01 Wei Guozhi <carrot@google.com>
+
+ PR target/53447
+ * gcc.target/arm/pr53447-1.c: New testcase.
+ * gcc.target/arm/pr53447-2.c: New testcase.
+ * gcc.target/arm/pr53447-3.c: New testcase.
+ * gcc.target/arm/pr53447-4.c: New testcase.
+
+2012-06-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/47061
+ * gcc.dg/tree-ssa/vrp71.c: New testcase.
+
+2012-06-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/37541
+ * gcc.dg/tree-ssa/pr37508.c: Adjust and un-XFAIL.
+
+2012-06-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52589
+ * gcc.dg/tree-ssa/vrp70.c: New testcase.
+
+2012-06-28 Janis Johnson <janisjo@codesourcery.com>
+
+ * g++.dg/cpp0x/nullptr19.c: Remove exta directives on same line.
+
+ * g++.dg/template/error46.C: Add missing comment to dg-message.
+ * g++.dg/template/crash107.C: Likewise.
+ * g++.dg/template/error47.C: Likewise.
+ * g++.dg/template/crash108.C: Likewise.
+ * g++.dg/overload/operator5.C: Likewise.
+
+ * gcc.dg/Wstrict-aliasing-converted-assigned.c: Fix syntax
+ errors in dg-message directives, add comments.
+
+2012-06-28 Kai Tietz <ktietz@redhat.com>
+
+ * g++.dg/cpp0x/constexpr-52672.C (ul_ptr): Use SIZE_TYPE instead of
+ hard-coded 'unsigned long'.
+
+2012-06-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51581
+ * gcc.dg/vect/pr51581-4.c: New test.
+
+ PR tree-optimization/53645
+ * gcc.c-torture/execute/pr53645-2.c: New test.
+
+2012-06-28 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53790
+ * gcc.dg/torture/pr53790.c: New testcase.
+
+2012-06-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53645
+ * gcc.c-torture/execute/pr53645.c: New test.
+
+2012-06-28 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/deep_old.adb, gnat.dg/old_errors.adb: Removed, obsolete.
+
+2012-06-28 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/53671
+ PR debug/49888
+ * gcc.dg/guality/pr49888.c: Account for the possibility that
+ the variable is optimized out at the first test.
+
+2012-06-27 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/override2.C: Adjust.
+ * g++.dg/template/error5.C: Adjust.
+ * g++.dg/parse/crash28.C: Adjust.
+
+ PR c++/53563
+ * g++.dg/parse/template27.C: New.
+ * g++.dg/template/crash74.C: Adjust expected output.
+
+2012-06-27 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/41951
+ PR fortran/49591
+ * gfortran.dg/typebound_operator_16.f03: New.
+
+2012-06-27 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/sse4_1-pmuldq.c (TEST): Initialize
+ even src1.i and src2.i fields even in the second half of the arrays.
+
+2012-06-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ PR c++/51033.
+ * g++.dg/torture/vshuf-16.inc: New test.
+ * g++.dg/torture/vshuf-2.inc: New test.
+ * g++.dg/torture/vshuf-4.inc: New test.
+ * g++.dg/torture/vshuf-8.inc: New test.
+ * g++.dg/torture/vshuf-main.inc: New test.
+ * g++.dg/torture/vshuf-v16hi.C: New test.
+ * g++.dg/torture/vshuf-v16qi.C: New test.
+ * g++.dg/torture/vshuf-v2df.C: New test.
+ * g++.dg/torture/vshuf-v2di.C: New test.
+ * g++.dg/torture/vshuf-v2sf.C: New test.
+ * g++.dg/torture/vshuf-v2si.C: New test.
+ * g++.dg/torture/vshuf-v4df.C: New test.
+ * g++.dg/torture/vshuf-v4di.C: New test.
+ * g++.dg/torture/vshuf-v4sf.C: New test.
+ * g++.dg/torture/vshuf-v4si.C: New test.
+ * g++.dg/torture/vshuf-v8hi.C: New test.
+ * g++.dg/torture/vshuf-v8qi.C: New test.
+ * g++.dg/torture/vshuf-v8si.C: New test.
+
+2012-06-27 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53676
+ * gcc.dg/tree-ssa/scev-6.c: New testcase.
+
+2012-06-26 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/scandump.exp (scan-dump, scan-dump-not, scan-dump-dem,
+ scan-dump-dem-not): Use printable pattern in test name.
+
+2012-06-26 Sterling Augustine <saugustine@google.com>
+ Dominique Dhumieres <dominiq@lps.ens.fr>
+
+ * gcc.dg/pubtypes-2.c: Update expected output.
+ * gcc.dg/pubtypes-3.c: Likewise.
+ * gcc.dg/pubtypes-4.c: Likewise.
+
+2012-06-26 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ * gcc.dg/tree-ssa/slsr-1.c: New test.
+ * gcc.dg/tree-ssa/slsr-2.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-3.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-4.c: Likewise.
+
+2012-06-26 Matt Turner <mattst88@gmail.com>
+
+ PR target/35294
+ * gcc.target/arm/mmx-2.c: New.
+
+2012-06-26 Richard Guenther <rguenther@suse.de>
+
+ PR c++/53752
+ * g++.dg/torture/pr53752.C: New testcase.
+
+2012-06-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53748
+ * gcc.c-torture/compile/pr53748.c: New test.
+
+2012-06-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/53498
+ PR c++/53305
+ * g++.dg/cpp0x/decltype38.C: New.
+ * g++.dg/cpp0x/variadic132.C: Remove dg-error.
+
+2012-06-25 Janis Johnson <janisjo@codesourcery.com>
+
+ * lib/target-supports-dg.exp (testname-for-summary): New.
+ * lib/profopt.exp (profopt_execute): Define testname_with_flags.
+ * lib/gcc-dg.exp (cleanup-coverage-files, cleanup-repo-notes,
+ cleanup-stack-usage, cleanup-dump, cleanup-saved-temps, scan-module,
+ scan-module-absence, output-exists, output-exists-not: Use
+ testname-for-summary.
+ (dg-test): Clean up testname_with_flags.
+ * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden,
+ scan-not-hidden, scan-file, scan-file-not, scan-stack-usage,
+ scan-stack-usage-not, scan-assembler-times, scan-assembler-dem,
+ scan-assembler-dem-not, object-size: Use testname-for-summary.
+ * lib/gcov.exp (run-gcov): Likewise.
+ * lib/scandump.exp (scan-dump, scan-dump-times, scan-dump-not,
+ scan-dump-dem, scan-dump-dem-note): Likewise.
+
+ * lib/profopt.exp: Make prof_option_list local to profopt-execute.
+ * g++.dg/tree-prof/tree-prof.exp (PROFOPT_OPTIONS): Define after
+ including profopt.opt; save and restore existing value.
+ * g++.dg/bprob/bprob.exp: Likewise.
+ * gcc.dg/matrix/matrix.exp: Likewise.
+ * gcc.dg/tree-prof/tree-prof.exp: Likewise.
+ * gcc.misc-tests/bprob.exp: Likewise; also replace formerly-ignored
+ PROFOPT_OPTIONS.
+
+2012-06-25 Richard Henderson <rth@redhat.com>
+
+ * gcc.dg/pr53749.c: New.
+
+2012-06-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/52988
+ * g++.dg/cpp0x/nullptr28.C: New.
+
+2012-06-25 Christophe Lyon <christophe.lyon@st.com>
+
+ * gcc.target/arm/neon-vld1_dupQ.c: New.
+
+2012-06-25 Florian Weimer <fweimer@redhat.com>
+
+ * g++.dg/init/new35.C: New.
+ * g++.dg/init/new36.C: New.
+ * g++.dg/init/new37.C: New.
+ * g++.dg/ext/vla5.C: New warning.
+ * g++.dg/ext/vla8.C: New warning.
+ * g++.dg/cpp0x/regress/debug-debug7.C: Update diagnostics.
+
+2012-06-25 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+ James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/arm/ftest-support-arm.h New testcase.
+ * gcc.target/arm/ftest-support-thumb.h Likewise.
+ * gcc.target/arm/ftest-support.h Likewise.
+ * gcc.target/arm/ftest-armv4-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv4t-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv5t-arm.c Likewise.
+ * gcc.target/arm/ftest-armv5t-thumb.c Likewise.
+ * gcc.target/arm/ftest-armv5te-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6-arm.c Likewise.
+ * gcc.target/arm/ftest-armv6-thumb.c Likewise.
+ * gcc.target/arm/ftest-armv6k-arm.c Likewise.
+ * gcc.target/arm/ftest-armv6k-thumb.c Likewise.
+ * gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6z-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7a-arm.c Likewise.
+ * gcc.target/arm/ftest-armv7a-thumb.c Likewise.
+ * gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7r-arm.c Likewise.
+ * gcc.target/arm/ftest-armv7r-thumb.c Likewise.
+ * lib/target-supports.exp
+ (check_effective_target_arm_arch_FUNC): Add support for more
+ architectures.
+ (add_options_for_arm_arch_FUNC): Likewise.
+ (check_effective_target_arm_arch_FUNC_multilib): New functions.
+
+2012-06-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/53202
+ * g++.dg/cpp0x/constexpr-tuple.C: New.
+
+2012-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/53759
+ * gcc.target/i386/pr53759.c: New test.
+
+ PR c++/53594
+ * g++.dg/cpp0x/nsdmi7.C: New test.
+
+2012-06-24 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.target/i386/pr23943.c (size_t): Use compatible type-definition
+ for LLP64 targets.
+ * gcc.target/i386/pr38988.c: Likewise.
+
+2012-06-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/47710
+ PR fortran/53328
+ * gfortran.dg/typebound_generic_12.f03: New.
+ * gfortran.dg/typebound_generic_13.f03: New.
+
+2012-06-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/lto15.ad[sb]: New test.
+
+2012-06-21 Meador Inge <meadori@codesourcery.com>
+
+ PR c/53702
+ * gcc.dg/Wunused-local-typedefs.c: New testcase.
+
+2012-06-21 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.dg/pch/ident-1.c: New test.
+ * gcc.dg/pch/ident-1.hs: Header file for new test.
+
+2012-06-21 Michael Matz <matz@suse.de>
+
+ PR middle-end/53688
+ * gcc.c-torture/execute/pr53688.c: New test.
+
+2012-06-20 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/30318
+ * gcc.dg/tree-ssa/vrp69.c: New testcase.
+
+2012-06-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Add ARM comment character to regexp.
+
+2012-06-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/clearcapv2.map: New file.
+ * gcc.target/i386/i386.exp: Try it first before clearcap.map.
+
+2012-06-19 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * gcc.dg/stack-usage-1.c: Remove dg-options line for sh targets
+ and add __sh__ case.
+
+2012-06-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/52637
+ * g++.dg/debug/localclass1.C: New.
+
+2012-06-16 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ * g++.dg/cpp0x/override4.C: New.
+
+2012-06-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/53651
+ * g++.dg/cpp0x/decltype37.C: New.
+
+2012-06-19 Kaz Kojima <kkojima@gcc.gnu.org>
+
+ * gcc.dg/stack-usage-1.c: Use sh*-*-* instead of sh-*-*.
+
+2012-06-19 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.c-torture/compile/vector-5.c,
+ gcc.c-torture/compile/vector-6.c: New tests.
+
+2012-06-19 Richard Henderson <rth@redhat.com>
+
+ * gcc.target/i386/pr33329.c: Change multiplier constant to 12345.
+
+2012-06-19 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/vrp68.c: Adjust testcase.
+
+2012-06-18 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/53712
+ * gcc.target/i386/pr53712.c: New test.
+
+2012-06-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53692
+ * gfortran.dg/elemental_optional_args_6.f90: New.
+
+2012-06-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53526
+ * gfortran.dg/coarray_lib_move_alloc_1.f90: New.
+ * gfortran.dg/coarray/move_alloc_1.f90
+
+2012-06-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53526
+ * gfortran.dg/coarray_27.f90: New.
+
+2012-06-18 Joey Ye <Joey.Ye@arm.com>
+ Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/epilog-1.c: New test.
+
+2012-06-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53693
+ * g++.dg/torture/pr53693.C: New testcase.
+
+2012-06-18 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR tree-optimization/53703
+ * gcc.dg/torture/pr53703.c: New test.
+
+2012-06-18 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR middle-end/53698
+ * gcc.target/i386/pr53698.c: New test.
+
+2012-06-17 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr33329.c (f): Increase tabs array to 1024.
+
+2012-06-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53691
+ PR fortran/53685
+ * gfortran.dg/transfer_check_3.f90: New.
+
+2012-06-17 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/tree-ssa/vrp68.c: Fix scan-tree-dump-times argument order.
+
+2012-06-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53642
+ PR fortran/45170
+ * gfortran.dg/deferred_type_param_8.f90: New.
+
+2012-06-15 Janis Johnson <janosjo@codesourcery.com>
+
+ * lib/gcov.exp (verify-lines, verify-branches, verify-calls): Use
+ testname that includes flags, passed in as new argument, in
+ pass/fail messages.
+ (run_gcov): Get testname from dg-test, use it in pass/fail messages
+ and pass it to verify-* procedures.
+
+ * g++.dg/torture/stackalign/stackalign.exp: Combine stack
+ alignment torture options with usual torture options.
+
+ * g++.dg/cpp0x/auto27.C: Add comments to checks for multiple
+ messages reported for one line of source code.
+ * g++.dg/cpp0x/constexpr-decl.C: Likewise.
+ * g++.dg/cpp0x/decltype2.C: Likewise.
+ * g++.dg/cpp0x/decltype3.C: Likewise.
+ * g++.dg/cpp0x/lambda/lambda-syntax1.C: Likewise.
+ * g++.dg/cpp0x/regress/error-recovery1.C: Likewise.
+ * g++.dg/cpp0x/static_assert3.C: Likewise.
+ * g++.dg/cpp0x/udlit-cpp98-neg.C: Likewise.
+ * g++.dg/cpp0x/udlit-shadow-neg.C: Likewise.
+ * g++.dg/cpp0x/union1.C: Likewise.
+ * g++.dg/cpp0x/variadic-ex10.C: Likewise.
+ * g++.dg/cpp0x/variadic-ex14.C: Likewise.
+ * g++.dg/cpp0x/variadic2.C: Likewise.
+ * g++.dg/cpp0x/variadic20.C: Likewise.
+ * g++.dg/cpp0x/variadic74.C: Likewise.
+ * g++.dg/diagnostic/bitfld2.C: Likewise.
+ * g++.dg/ext/attrib44.C: Likewise.
+ * g++.dg/ext/no-asm-1.C: Likewise.
+ * g++.dg/other/error34.C: Likewise.
+ * g++.dg/parse/crash46.C: Likewise.
+ * g++.dg/parse/error10.C: Likewise.
+ * g++.dg/parse/error2.C: Likewise.
+ * g++.dg/parse/error3.C: Likewise.
+ * g++.dg/parse/error36.C: Likewise.
+ * g++.dg/parse/error8.C: Likewise.
+ * g++.dg/parse/error9.C: Likewise.
+ * g++.dg/parse/parser-pr28152-2.C: Likewise.
+ * g++.dg/parse/parser-pr28152.C: Likewise.
+ * g++.dg/parse/template25.C: Likewise.
+ * g++.dg/parse/typename11.C: Likewise.
+ * g++.dg/tc1/dr147.C: Likewise.
+ * g++.dg/template/deduce3.C: Likewise.
+ * g++.dg/template/koenig9.C: Likewise.
+ * g++.dg/template/pr23510.C: Likewise.
+ * g++.dg/warn/pr12242.C: Likewise.
+ * g++.dg/warn/pr30551-2.C: Likewise.
+ * g++.dg/warn/pr30551.C: Likewise.
+ * g++.old-deja/g++.other/typename1.C: Likewise.
+ * g++.old-deja/g++.pt/niklas01a.C: Likewise.
+
+2012-06-15 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ PR c++/51033
+ * c-c++-common/torture/vshuf-16.inc: Move from gcc.c-torture/execute/.
+ * c-c++-common/torture/vshuf-2.inc: Likewise.
+ * c-c++-common/torture/vshuf-4.inc: Likewise.
+ * c-c++-common/torture/vshuf-8.inc: Likewise.
+ * c-c++-common/torture/vshuf-main.inc: Likewise.
+ * c-c++-common/torture/vshuf-v16hi.c: Likewise.
+ * c-c++-common/torture/vshuf-v16qi.c: Likewise.
+ * c-c++-common/torture/vshuf-v2df.c: Likewise.
+ * c-c++-common/torture/vshuf-v2di.c: Likewise.
+ * c-c++-common/torture/vshuf-v2sf.c: Likewise.
+ * c-c++-common/torture/vshuf-v2si.c: Likewise.
+ * c-c++-common/torture/vshuf-v4df.c: Likewise.
+ * c-c++-common/torture/vshuf-v4di.c: Likewise.
+ * c-c++-common/torture/vshuf-v4hi.c: Likewise.
+ * c-c++-common/torture/vshuf-v4sf.c: Likewise.
+ * c-c++-common/torture/vshuf-v4si.c: Likewise.
+ * c-c++-common/torture/vshuf-v8hi.c: Likewise.
+ * c-c++-common/torture/vshuf-v8qi.c: Likewise.
+ * c-c++-common/torture/vshuf-v8si.c: Likewise.
+
+2012-06-15 Michael Matz <matz@suse.de>
+
+ * gcc.dg/tree-ssa/vector-4.c: New test.
+
+2012-06-15 Michael Matz <matz@suse.de>
+
+ * gcc.dg/debug/dwarf2/inline3.c: Adjust.
+ * gcc.dg/tree-ssa/foldstring-1.c: Adjust.
+
+2012-06-15 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ PR tree-optimization/53636
+ * gcc.target/arm/pr53636.c: New test.
+
+2012-06-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51581
+ * gcc.c-torture/execute/pr51581-1.c: New test.
+ * gcc.c-torture/execute/pr51581-2.c: New test.
+ * gcc.dg/vect/pr51581-1.c: New test.
+ * gcc.dg/vect/pr51581-2.c: New test.
+ * gcc.dg/vect/pr51581-3.c: New test.
+ * gcc.target/i386/avx-pr51581-1.c: New test.
+ * gcc.target/i386/avx-pr51581-2.c: New test.
+ * gcc.target/i386/avx2-pr51581-1.c: New test.
+ * gcc.target/i386/avx2-pr51581-2.c: New test.
+ * gcc.dg/vect/slp-26.c (main1): Divide by 0x8031 instead of 3.
+
+2012-06-15 Richard Guenther <rguenther@suse.de>
+
+ * gcc.c-torture/execute/20120615-1.c: New testcase.
+
+2012-06-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect8.ad[sb]: New test.
+
+2012-06-14 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/vrp.h: New testcase.
+ * gcc.dg/tree-ssa/vrp68.c: Likewise.
+
+2012-06-13 Christian Bruel <christian.bruel@st.com>
+
+ PR target/53621
+ * gcc.dg/stack-usage-1.c: Force -fomit-frame-pointer on SH.
+
+2012-06-14 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp (mips-dg-options): Handle -msynci.
+
+2012-06-13 Janis Johnson <janisjo@codesourcery.com>
+
+ PR testsuite/20771
+ * lib/dg-pch.exp (dg-flags-pch): Add flags to make compile lines in
+ test summary unique.
+
+ * lib/scanasm.exp (scan-assembler, scan-assembler-not, scan-hidden,
+ scan-not-hiddent, scan-file, scan-file-not, scan-stack-usage,
+ scan-stack-usage-not): Don't strip torture options from test name.
+
+ * lib/scandump.exp (scan-dump-times): Use printable version of
+ regexp in test summary line.
+
+ * gcc.dg/di-longlong64-sync-1.c: Add comments to checks for multiple
+ messages reported for one line of source code.
+ * gcc.dg/format/few-1.c: Likewise.
+ * gcc.dg/ia64-sync-2.c: Likewise.
+ * gcc.dg/sync-2.c: Likewise.
+ * gcc.dg/noncompile/pr44517.c: Likewise.
+
+2012-06-13 Alexandre Oliva <aoliva@redhat.com>
+
+ PR debug/49888
+ * gcc.dg/guality/pr49888.c: New.
+
+2012-06-13 Alexandre Oliva <aoliva@redhat.com>
+
+ * g++.dg/tree-ssa/ivopts-2.C: Adjust for coalescing.
+ * gcc.dg/tree-ssa/forwprop-11.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-1.c: Likewise.
+
+2012-06-13 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53643
+ * gfortran.dg/intent_out_7.f90: New.
+
+2012-06-13 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53597
+ * gfortran.dg/save_4.f90: New.
+
+2012-06-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/53532
+ PR c/51034
+ PR c/53196
+ * gcc.dg/pr53532.c: New test.
+ * gcc.dg/c99-complit-2.c: Add two new dg-error directives,
+ adjust line numbers.
+ * gcc.dg/noncompile/950825-1.c: Expect incomplete type error message.
+ * gcc.dg/Wcxx-compat-8.c: Likewise.
+ * gcc.dg/pr51034.c: New test.
+ * gcc.dg/pr53196-1.c: New test.
+ * gcc.dg/pr53196-2.c: New test.
+
+2012-06-12 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/torture/stackalign/stackalign.exp: Combine stack
+ alignment torture options with usual torture options.
+ * gcc.dg/torture/stackalign/alloca-2.c: Use dg-additional-options
+ instead of dg-options.
+ * gcc.dg/torture/stackalign/alloca-3.c: Likewise.
+ * gcc.dg/torture/stackalign/alloca-4.c: Likewise.
+ * gcc.dg/torture/stackalign/alloca-5.c: Likewise.
+ * gcc.dg/torture/stackalign/alloca-6.c: Likewise.
+ * gcc.dg/torture/stackalign/push-1.c: Likewise.
+ * gcc.dg/torture/stackalign/vararg-3.c: Likewise.
+
+ * gcc.target/arm/di-longlong64-sync-withhelpers.c: Add comments
+ to checks for multiple messages reported for one line of source code.
+ * gcc.target/arm/di-longlong64-sync-withldrexd.c: Likewise.
+
+ * gcc.c-torture/compile/sync-1.c: Add comments to checks for multiple
+ messages reported for one line of source code.
+
+ * gcc.dg/20031223-1.c: Add comments to check for multiple
+ messages reported for one line of source code.
+ * gcc.dg/Wconversion-integer.c: Likewise.
+ * gcc.dg/Wfatal-2.c: Likewise.
+ * gcc.dg/Wfatal.c: Likewise.
+ * gcc.dg/Wobjsize-1.c: Likewise.
+ * gcc.dg/c99-vla-jump-1.c: Likewise.
+ * gcc.dg/c99-vla-jump-2.c: Likewise.
+ * gcc.dg/c99-vla-jump-3.c: Likewise.
+ * gcc.dg/c99-vla-jump-4.c: Likewise.
+ * gcc.dg/c99-vla-jump-5.c: Likewise.
+ * gcc.dg/decl-9.c: Likewise.
+ * gcc.dg/declspec-10.c: Likewise.
+ * gcc.dg/declspec-18.c: Likewise.
+ * gcc.dg/mtune.c: Likewise.
+ * gcc.dg/parser-pr28152-2.c: Likewise.
+ * gcc.dg/parser-pr28152.c: Likewise.
+ * gcc.dg/pr14475.c: Likewise.
+ * gcc.dg/pr27953.c: Likewise.
+ * gcc.dg/pr28322-3.c: Likewise.
+ * gcc.dg/pr30457.c: Likewise.
+ * gcc.dg/pr30551-2.c: Likewise.
+ * gcc.dg/pr30551-3.c: Likewise.
+ * gcc.dg/pr30551-4.c: Likewise.
+ * gcc.dg/pr30551-5.c: Likewise.
+ * gcc.dg/pr30551-6.c: Likewise.
+ * gcc.dg/pr30551.c: Likewise.
+ * gcc.dg/pr45461.c: Likewise.
+ * gcc.dg/pr48552-1.c: Likewise.
+ * gcc.dg/pr48552-2.c: Likewise.
+ * gcc.dg/redecl-1.c: Likewise.
+ * gcc.dg/transparent-union-3.c: Likewise.
+ * gcc.dg/utf-dflt.c: Likewise.
+ * gcc.dg/utf-dflt2.c: Likewise.
+ * gcc.dg/vla-8.c: Likewise.
+ * gcc.dg/vla-init-1.c: Likewise.
+ * gcc.dg/wtr-int-type-1.c: Likewise.
+
+ * c-c++-common/raw-string-3.c: Add comments to checks for multiple
+ messages reported for for one line of source code.
+ * c-c++-common/raw-string-5.c: Likewise.
+ * c-c++-common/raw-string-4.c: Likewise.
+ * c-c++-common/raw-string-6.c: Likewise.
+ * c-c++-common/pr20000.c: Likewise.
+
+ * gcc.dg/cpp/include2a.c: Add comments to checks for multiple
+ messages reported for one line of source code.
+ * gcc.dg/cpp/pr30786.c: Likewise.
+ * gcc.dg/cpp/pr28709.c: Likewise.
+ * gcc.dg/cpp/missing-header-MD.c: Likewise.
+ * gcc.dg/cpp/macspace2.c: Likewise.
+ * gcc.dg/cpp/missing-header-1.c: Likewise.
+ * gcc.dg/cpp/missing-header-MMD.c: Likewise.
+ * gcc.dg/cpp/missing-sysheader-MD.c: Likewise.
+ * gcc.dg/cpp/missing-sysheader-MMD.c: Likewise.
+
+2012-06-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/53599
+ * g++.dg/template/local7.C: New.
+
+2012-06-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53511
+ * gcc.target/sh/pr51340-1.c: Delete obsolete test case.
+ * gcc.target/sh/pr51340-2.c: Likewise.
+ * gcc.target/sh/pr51340-3.c: Likewise.
+
+2012-06-12 Michael Matz <matz@suse.de>
+
+ * gcc.dg/torture/alias-1.c: New test.
+
+2012-06-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53589
+ * gcc.dg/torture/pr53589.c: New test.
+
+2012-06-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/50749
+ * gcc.target/sh/pr50749-sf-postinc-2.c: New.
+ * gcc.target/sh/pr50749-sf-postinc-4.c: New.
+ * gcc.target/sh/pr50749-qihisi-postinc-2.c: New.
+ * gcc.target/sh/pr50749-qihisi-postinc-4.c: New.
+ * gcc.target/sh/pr50749-sf-predec-2.c: New.
+ * gcc.target/sh/pr50749-sf-predec-4.c: New.
+ * gcc.target/sh/pr50749-qihisi-predec-1.c: New.
+ * gcc.target/sh/pr50749-qihisi-predec-3.c: New.
+ * gcc.target/sh/pr50749-sf-postinc-1.c: New.
+ * gcc.target/sh/pr50749-sf-postinc-3.c: New.
+ * gcc.target/sh/pr50749-qihisi-postinc-1.c: New.
+ * gcc.target/sh/pr50749-qihisi-postinc-3.c: New.
+ * gcc.target/sh/pr50749-sf-predec-1.c: New.
+ * gcc.target/sh/pr50749-sf-predec-3.c: New.
+ * gcc.target/sh/pr50749-qihisi-predec-2.c: New.
+ * gcc.target/sh/pr50749-qihisi-predec-4.c: New.
+
+2012-06-11 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/i386/builtin_target.c (vendor_signatures): New enum.
+ (check_intel_cpu_model): New function.
+ (check_amd_cpu_model): New function.
+ (check_features): New function.
+ (__get_cpuid_output): New function.
+ (check_detailed): New function.
+ (fn1): Rename to quick_check.
+ (main): Update to call quick_check and call check_detailed.
+
+2012-06-11 Richard Henderson <rth@redhat.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_sync_long_long_runtime): Use
+ check_effective_target_lp64 instead of
+ check_effective_target_powerpc64 for powerpc targets.
+
+2012-06-11 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53511
+ * gcc.target/sh/pr53511-1.c: New.
+
+2012-06-11 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53470
+ * g++.dg/lto/pr53470_0.C: New testcase.
+ * gcc.dg/lto/pr53470_0.c: Likewise.
+
+2012-06-11 Richard Guenther <rguenther@suse.de>
+
+ PR c++/53605
+ * g++.dg/ext/pr53605.C: New testcase.
+
+2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/array1.ads: New test.
+ * gnat.dg/specs/array2.ads: Likewise.
+ * gnat.dg/array22.adb: Likewise.
+
+2012-06-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/constant4.adb: New test.
+ * gnat.dg/constant4_pkg.ads: New helper.
+
+2012-06-08 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/52552
+ * gfortran.dg/allocate_alloc_opt_1.f90: Modified.
+ * gfortran.dg/allocate_class_1.f90: Modified.
+ * gfortran.dg/allocate_with_typespec_4.f90: Modified.
+ * gfortran.dg/allocate_class_2.f90: New.
+
+2012-06-07 Hans-Peter Nilsson <hp@axis.com>
+
+ PR middle-end/53535
+ * gcc.dg/pr46647.c: xfail for cris-* and crisv32-*.
+
+2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/52861
+ * gfortran.dg/string_assign_2.f90: New test case.
+
+2012-06-07 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/52861
+ * gfortran.dg/string_assign_1.f90: New test case.
+
+2012-06-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/53580
+ * gcc.dg/gomp/nesting-1.c: Expect errors rather than warnings.
+ * gcc.dg/gomp/critical-4.c: Likewise.
+ * gfortran.dg/gomp/appendix-a/a.35.1.f90: Likewise.
+ * gfortran.dg/gomp/appendix-a/a.35.3.f90: Likewise.
+ * gfortran.dg/gomp/appendix-a/a.35.4.f90: Likewise.
+ * gfortran.dg/gomp/appendix-a/a.35.6.f90: Likewise.
+ * c-c++-common/gomp/pr53580.c: New test.
+
+2012-06-07 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/51214
+ * g++.dg/cpp0x/forw_enum11.C: New.
+
+2012-06-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53567
+ * g++.dg/cpp0x/alias-decl-19.C: New.
+
+2012-06-06 Steven Bosscher <steven@gcc.gnu.org>
+
+ * g++.old-deja/g++.brendan/array1.C: Remove dg-options.
+
+2012-06-06 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx-os-support.h (XCR_XFEATURE_ENABLED_MASK): New.
+ (XSTATE_FP): Ditto.
+ (XSTATE_SSE): Ditto.
+ (XSTATE_YMM): Ditto.
+ (avx_os_support): Use new defines.
+
+2012-06-06 Richard Guenther <rguenther@suse.de>
+
+ PR testsuite/32380
+ * gfortran.dg/vect/pr32380.f: Adjust number of expected vectorized
+ loops.
+
+2012-06-06 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52841
+ * g++.dg/cpp0x/pr52841.C: New testcase.
+
+2012-06-06 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53081
+ * gcc.dg/tree-ssa/ldist-20.c: New testcase.
+ * gcc.dg/tree-ssa/loop-19.c: Add -fno-tree-loop-distribute-patterns.
+
+2012-06-05 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr53487.c: New test.
+
+2012-06-05 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.target/powerpc/lhs-1.c: Use parm instead of stack space.
+
+2012-06-05 Edmar Wienskoski <edmar@freescale.com>
+
+ * gcc.dg/tree-ssa/vector-3.c: Adjust regular expression.
+
+2012-06-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/30442
+ * gcc.dg/vect/bb-slp-30.c: New testcase.
+
+2012-06-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53081
+ * gcc.dg/tree-ssa/ldist-19.c: New testcase.
+ * gcc.c-torture/execute/builtins/builtins.exp: Always pass
+ -fno-tree-loop-distribute-patterns.
+
+2012-06-05 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/savres.c: Add -mdynamic-no-pic for darwin.
+ Check static chain in nested funcs.
+
+2012-06-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/50619
+ * gfortran.dg/init_flag_10.f90: New.
+
+2012-06-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53524
+ * g++.dg/warn/Wenum-compare-no-2: New.
+
+2012-06-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/53463
+ * g++.dg/cpp/limits.C: New test.
+ * g++.dg/parse/error19.C: Adjust.
+ * g++.dg/warn/Wconversion-real-integer2.C: Likewise.
+ * g++.dg/warn/pr35635.C: Likewise.
+ * g++.old-deja/g++.pt/assign1.C: Likewise.
+
+2012-06-04 Edmar Wienskoski <edmar@freescale.com>
+
+ PR target/53559
+ * gcc.target/powerpc/cell_builtin_1.c: New test case.
+ * gcc.target/powerpc/cell_builtin_2.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_3.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_4.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_5.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_6.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_7.c: Ditto.
+ * gcc.target/powerpc/cell_builtin_8.c: Ditto.
+
+2012-06-04 Andreas Schwab <schwab@linux-m68k.org>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Allow for | comments.
+
+2012-06-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53550
+ * gcc.dg/pr53550.c: New test.
+
+2012-06-04 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-11.c: Enable -ftree-loop-distribute-patterns.
+ * gcc.dg/tree-ssa/ldist-17.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
+
+2012-06-03 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
+
+ PR fortran/48831
+ * gfortran.dg/parameter_array_element_2.f90: New.
+
+2012-06-03 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53512
+ * gcc.target/sh/pr53512-1.c: New.
+ * gcc.target/sh/pr53512-2.c: New.
+ * gcc.target/sh/pr53512-3.c: New.
+ * gcc.target/sh/pr53512-4.c: New.
+
+2012-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/52973
+ * g++.dg/ext/visibility/template12.C: New.
+ * g++.dg/ext/attrib14.C: Adjust warning line.
+
+ PR c++/52725
+ * g++.dg/parse/new6.C: New.
+ * g++.dg/template/sizeof-template-argument.C: Adjust error message.
+
+2012-06-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * c-c++-common/restrict-2.c: Revert previous change.
+
+2012-06-01 Jason Merrill <jason@redhat.com>
+
+ PR c++/53137
+ * g++.dg/cpp0x/lambda/lambda-template5.C: New.
+
+ PR c++/53484
+ * g++.dg/cpp0x/auto33.C: New.
+
+2012-06-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/26155
+ * g++.dg/parse/namespace-alias-1.C: New.
+
+2012-06-01 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.dg/spec-options.c: New test.
+ * gcc.dg/foo.specs: New file.
+
+2012-06-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/53517
+ * gnat.dg/lto14.adb: Skip on Solaris.
+
+2012-06-01 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/sync-1-v10.c,
+ gcc.target/cris/sync-1-v32.c, gcc.target/cris/sync-1.c,
+ gcc.target/cris/sync-2c.c, gcc.target/cris/sync-2i.c,
+ gcc.target/cris/sync-2s.c, gcc.target/cris/sync-3i.c,
+ gcc.target/cris/sync-3s.c, gcc.target/cris/sync-4c.c,
+ gcc.target/cris/sync-4i.c, gcc.target/cris/sync-4s.c,
+ gcc.target/cris/torture/sync-mis-op-i-1.c,
+ gcc.target/cris/torture/sync-mis-op-i-1a.c,
+ gcc.target/cris/torture/sync-mis-op-i-2.c,
+ gcc.target/cris/torture/sync-mis-op-i-2a.c,
+ gcc.target/cris/torture/sync-mis-op-i-3.c,
+ gcc.target/cris/torture/sync-mis-op-i-3a.c,
+ gcc.target/cris/torture/sync-mis-op-s-1.c,
+ gcc.target/cris/torture/sync-mis-op-s-1a.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-1.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-1a.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-2.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-2a.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-3.c,
+ gcc.target/cris/torture/sync-mis-xchg-i-3a.c,
+ gcc.target/cris/torture/sync-mis-xchg-s-1.c,
+ gcc.target/cris/torture/sync-mis-xchg-s-1a.c: New tests.
+
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-pr45948-2.c: New testcase copy of
+ ldist-pr45948.c with disabled SCCP.
+
+2012-05-31 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/48493
+ * gcc.dg/torture/pr48493.c: New testcase.
+
+2012-05-31 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_vect_char_mult): Add
+ arm32 to targets.
+ * gcc.dg/vect/slp-perm-8.c (main): Prevent vectorization
+ of the initialization loop.
+ (dg-final): Adjust the expected number of vectorized loops depending
+ on vect_char_mult target selector.
+
+2012-05-31 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/asm-v8.S, gcc.target/cris/asm-v10.S,
+ gcc.target/cris/asm-other.S, gcc.target/cris/inasm-v8.c,
+ gcc.target/cris/inasm-v10.c, gcc.target/cris/inasm-other.c:
+ New tests.
+
+2012-05-30 Jason Merrill <jason@redhat.com>
+
+ PR c++/53356
+ * g++.dg/init/new34.C: New.
+ * g++.dg/tree-ssa/stabilize1.C: New.
+
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/53356
+ * g++.dg/init/new33.C: New test.
+
+2012-05-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53501
+ * gcc.dg/torture/pr53501.c: New testcase.
+ * c-c++-common/restrict-2.c: Adjust.
+
+2012-05-30 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/powerpc.exp: Load torture-options.exp, call
+ torture-finish.
+
+2012-05-30 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.target/i386/shuf-concat.c: New test.
+
+2012-05-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/53519
+ * gcc.c-torture/compile/pr53519.c: New test.
+
+2012-05-30 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * gcc.target/arm/neon-vrev.c: New.
+
+2012-05-29 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51340
+ * gcc.target/sh/pr51340-1.c: New.
+ * gcc.target/sh/pr51340-2.c: New.
+ * gcc.target/sh/pr51340-3.c: New.
+
+2012-05-29 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53516
+ * gcc.dg/torture/pr53516.c: New testcase.
+
+2012-05-29 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/53229
+ * gcc.dg/cpp/paste6.c: Force to run without
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste8.c: Likewise.
+ * gcc.dg/cpp/paste8-2.c: New test, like paste8.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste12.c: Force to run without
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste12-2.c: New test, like paste12.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste13.c: Likewise.
+ * gcc.dg/cpp/paste14.c: Likewise.
+ * gcc.dg/cpp/paste14-2.c: New test, like paste14.c but run with
+ -ftrack-macro-expansion.
+ * gcc.dg/cpp/paste18.c: New test.
+
+2012-05-29 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.target/cris/torture/trap-1.c,
+ gcc.target/cris/torture/trap-2.c,
+ gcc.target/cris/torture/trap-3.c,
+ gcc.target/cris/torture/trap-v0.c,
+ gcc.target/cris/torture/trap-v3.c: New tests.
+
+2012-05-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25137
+ * g++.dg/warn/Wbraces3.C: New.
+ * g++.dg/warn/Wbraces4.C: Likewise.
+
+2012-05-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53505
+ * c-c++-common/torture/pr53505.c: New test.
+
+2012-05-27 Nathan Sidwell <nathan@acm.org>
+
+ * gcc.dg/stmt-expr-4.c: New.
+
+2012-05-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53491
+ * g++.dg/parse/crash60.C: New.
+
+2012-05-26 Jason Merrill <jason@redhat.com>
+
+ PR c++/53220
+ * c-c++-common/array-lit.c: New.
+ * g++.dg/ext/complit12.C: #if 0 out decay-to-pointer test.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ PR ada/50294
+ * gnat.dg/array21.adb: New test.
+
+2012-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/renaming5.adb: Adjust dg-final directive.
+
+2012-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32054
+ * g++.dg/other/anon-union3.C: New.
+
+2012-05-25 Ian Lance Taylor <iant@google.com>
+
+ * gcc.dg/split-6.c: New test.
+
+2012-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/lto14.adb: New test.
+
+2012-05-25 Tristan Gingold <gingold@adacore.com>
+
+ * gcc.target/i386/large-frame.c: New.
+
+2012-05-24 Pat Haugen <pthaugen@us.ibm.com>
+ * gcc.target/powerpc/lhs-1.c: New.
+ * gcc.target/powerpc/lhs-2.c: New.
+ * gcc.target/powerpc/lhs-3.c: New.
+
+2012-05-24 Dodji Seketeli <dodji@redhat.com>
+
+ Make unwound macro expansion trace less redundant
+ * gcc.dg/cpp/macro-exp-tracking-1.c: Adjust.
+ * gcc.dg/cpp/macro-exp-tracking-2.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-3.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-4.c: Likewise.
+ * gcc.dg/cpp/macro-exp-tracking-5.c: Likewise.
+ * gcc.dg/cpp/pragma-diagnostic-2.c: Likewise.
+
+2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53464
+ * g++.dg/cpp0x/constexpr-default1.C: New.
+
+2012-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/32080
+ * g++.dg/eh/goto2.C: New.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53460
+ * g++.dg/tree-prof/pr53460.C: New testcase.
+
+2012-05-24 Richard Guenther <rguenther@suse.de>
+
+ PR bootstrap/53466
+ * g++.dg/debug/pr53466.C: New testcase.
+
+2012-05-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53465
+ * gcc.c-torture/execute/pr53465.c: New test.
+
+2012-05-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51055
+ PR fortran/45170
+ * gfortran.dg/allocate_with_typespec_6.f90: New.
+
+2012-05-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29185
+ * g++.dg/warn/delete-array-1.C: New.
+
+2012-05-23 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/pr39074-2.c: Adjust.
+ * gcc.dg/torture/pr39074.c: Likewise.
+ * gcc.dg/torture/pta-structcopy-1.c: Likewise.
+ * gcc.dg/tree-ssa/alias-19.c: Likewise.
+
+2012-05-22 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/53161
+ * g++.dg/torture/pr53161.C: New testcase.
+
+2012-05-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53389
+ * gfortran.dg/realloc_on_assign_15.f90: New.
+
+2012-05-22 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/51071
+ * gcc.dg/torture/pr51071-2.c: New testcase.
+
+2012-05-22 Paolo Bonzini <bonzini@gnu.org>
+
+ PR tree-optimization/53336
+ * g++.dg/torture/pr53336.C: New testcase.
+
+2012-05-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53322
+ * g++.dg/warn/Wunused-local-typedefs.C: Adjust to use -Wunused
+ instead of -Wunused-local-typedefs.
+
+2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51184
+ * g++.dg/other/abstract4.C: New-
+
+2012-05-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/40821
+ * g++.dg/ext/attrib46.C: New.
+
+2012-05-21 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/53418
+ * gcc.c-torture/compile/pr53418-1.c,
+ gcc.c-torture/compile/pr53418-2.c: New tests.
+
+2012-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53366
+ * gcc.dg/torture/pr53366-1.c: New test.
+ * gcc.dg/torture/pr53366-2.c: New test.
+ * gcc.target/i386/pr53366-1.c: New test.
+ * gcc.target/i386/pr53366-2.c: New test.
+
+ PR tree-optimization/53409
+ * gcc.c-torture/compile/pr53409.c: New test.
+
+ PR tree-optimization/53410
+ * gcc.c-torture/compile/pr53410-1.c: New test.
+ * gcc.c-torture/compile/pr53410-2.c: New test.
+
+2012-05-21 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/53425
+ * gcc.target/i386/pr53425-1.c: New file.
+ * gcc.target/i386/pr53425-2.c: Likewise.
+
+2012-05-21 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53408
+ * gcc.dg/torture/pr53408.c: New testcase.
+
+2012-05-21 Uros Bizjak <ubizjak@gmail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/53416
+ * gcc.target/i386/pr53416.c: New file.
+
+2012-05-21 Richard Guenther <rguenther@suse.de>
+
+ * gfortran.dg/pr46519-2.f90: Adjust to avoid memset transform.
+
+2012-05-21 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/torture/ldist-1.c: New testcase.
+
+2012-05-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/lto13.adb: New test.
+ * gnat.dg/lto13_pkg.ad[sb]: New helper.
+
+2012-05-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/lto12.ads: New test.
+ * gnat.dg/specs/lto12_pkg.ads: New helper.
+
+2012-05-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53346
+ * gcc.dg/tree-ssa/ldist-18.c: New testcase.
+ * gcc.target/i386/incoming-10.c: Adjust.
+ * gcc.target/i386/incoming-11.c: Likewise.
+ * gcc.target/i386/pr46295.c: Likewise.
+
+2012-05-18 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/pr53352.c: Return zero.
+
+2012-05-18 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53390
+ * gcc.dg/torture/pr53390.c: New testcase.
+
+2012-05-18 Meador Inge <meadori@codesourcery.com>
+
+ PR rtl-optimization/53352
+ * gcc.dg/pr53352.c: New test.
+
+2012-05-17 David S. Miller <davem@davemloft.net>
+
+ * gfortran.dg/bessel_7.f90: Bump allowed precision to avoid
+ failure on sparc-*-linux-gnu.
+
+2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/39681
+ * g++.dg/parse/error49.C: New.
+ * g++.dg/cpp0x/error8.C: Likewise.
+ * g++.dg/ext/utf-cxx98.C: Adjust dg-error directive.
+ * g++.dg/ext/utf-dflt2.C: Likewise.
+ * g++.dg/ext/utf-gnuxx98.C: Likewise.
+ * g++.dg/ext/utf-dflt.C: Likewise.
+ * c-c++-common/raw-string-3.c: Likewise.
+ * c-c++-common/raw-string-4.c: Likewise.
+
+2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53371
+ * g++.dg/cpp0x/catch1.C: New.
+
+2012-05-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/44516
+ * g++.dg/parse/error48.C: New.
+ * g++.dg/template/crash89.C: Adjust dg-error line numbers.
+ * g++.old-deja/g++.robertl/eb109.C: Add column info to dg-error string.
+
+2012-05-16 Patrick Marlier <patrick.marlier@gmail.com>
+
+ * gcc.dg/tm/indirect-2.c: New test.
+
+2012-05-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/53217
+ * gfortran.dg/pr53217.f90: New test.
+
+2012-05-16 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53364
+ * g++.dg/torture/pr53364.C: New testcase.
+
+2012-05-16 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.dg/pr52549.c: Fix test for long != void*
+ * gcc.c-torture/execute/pr52979-1.x: New file.
+ * gcc.c-torture/execute/pr52979-2.x: New file.
+
+2012-05-16 Dodji Seketeli <dodji@redhat.com>
+
+ PR preprocessor/7263
+ * gcc.dg/binary-constants-2.c: Run without tracking locations
+ accross macro expansion.
+ * gcc.dg/binary-constants-3.c: Likewise.
+ * gcc.dg/cpp/sysmac2.c: Likewise.
+ * gcc.dg/nofixed-point-2.c: Adjust for more precise
+ location.
+ * gcc.dg/cpp/syshdr3.c: New test.
+ * gcc.dg/cpp/syshdr3.h: New header for the new test above.
+ * gcc.dg/system-binary-constants-1.c: New test.
+ * gcc.dg/system-binary-constants-1.h: New header for the new test
+ above.
+ * g++.dg/cpp/syshdr3.C: New test.
+ * g++.dg/cpp/syshdr3.h: New header the new test above.
+ * g++.dg/system-binary-constants-1.C: New test.
+ * g++.dg/system-binary-constants-1.h: New header the new test
+ above.
+
+2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.old-deja/g++.pt/crash10.C: Adjust post PR11586.
+
+2012-05-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/53358
+ * gcc.dg/pr53358.c: New test.
+
+2012-05-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/11856
+ * g++.dg/warn/Wtype-limits.C: Don't warn in templates.
+ * g++.dg/warn/Wtype-limits-Wextra.C: Likewise.
+
+2012-05-15 Olivier Hainque <hainque@adacore.com>
+
+ * g++.dg/eh/sighandle.C: New testcase.
+
+2012-05-15 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53355
+ * gcc.dg/tree-ssa/vrp67.c: New testcase.
+
+2012-05-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ * gfortran.dg/*.f90: Remove now redundant manual
+ cleanup-modules directive.
+
+2012-05-14 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/avx256-unaligned-load-[1234].c: Update scan strings.
+ * gcc.target/i386/avx256-unaligned-store-[1234].c: Ditto.
+
+2012-05-14 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/52428
+ * gfortran.dg/int_range_io_1.f90: New test.
+
+2012-05-14 Andi Kleen <ak@linux.intel.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/53315
+ * gcc.target/i386/i386.exp (check_effective_target_rtm): New.
+ * gcc.target/i386/rtm-check.h: New file.
+ * gcc.target/i386/pr53315.c: New test.
+
+2012-05-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49110
+ PR fortran/51055
+ PR fortran/53329
+ * gfortran.dg/deferred_type_param_4.f90: New.
+ * gfortran.dg/deferred_type_param_6.f90: New.
+
+2012-05-14 Bernd Schmidt <bernds@codesourcery.com>
+
+ * gcc.target/i386/retarg.c: New test.
+
+2012-05-13 Alessandro Fanfarillo <fanfarillo.gcc@gmail.com>
+
+ PR fortran/45170
+ * gfortran.dg/deferred_type_param_3.f90: New.
+ * gfortran.dg/deferred_type_proc_pointer_1.f90: New.
+ * gfortran.dg/deferred_type_proc_pointer_2.f90: New.
+
+2012-05-12 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/null_pointer_deref3.adb: New test.
+
+2012-05-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/49110
+ PR fortran/52843
+ * gfortran.dg/deferred_type_param_5.f90: New.
+
+2012-05-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/parse/error47.C: New.
+
+2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52537
+ * gfortran.dg/string_compare_4.f90: Change option
+ to -fdump-tree-original. Add test case for kind=4.
+
+2012-05-11 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52537
+ * gfortran.dg/string_compare_4.f90: New test.
+
+2012-05-11 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Allow for ! comments.
+
+2012-05-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53305
+ * g++.dg/cpp0x/variadic132.C: New.
+
+2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53158
+ * g++.dg/cpp0x/lambda/lambda-err2.C: New.
+ * g++.dg/parse/error26.C: Tweak dg-error column number.
+
+2012-05-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53301
+ * g++.dg/warn/Wzero-as-null-pointer-constant-6.C: New.
+
+2012-05-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/lto11.ad[sb]: New test.
+
+2012-05-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52908
+ * gcc.target/i386/xop-imul32widen-vector.c: Update scan-assembler
+ directive to Scan for vpmuldq, not vpmacsdql.
+
+2012-05-09 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/53185
+ * gcc.dg/vect/pr53185.c: New test.
+
+2012-05-09 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/53249
+ * gcc.target/i386/pr53249.c: New.
+
+2012-05-09 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/18437
+ * gfortran.dg/vect/rnflow-trs2a2.f90: Move ...
+ * gfortran.dg/vect/fast-math-rnflow-trs2a2.f90: ... here.
+
+2012-05-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53226
+ * gcc.c-torture/compile/pr53226.c: New test.
+
+2012-05-09 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.target/i386/hle-add-acq-1.c: Allow for ; after lock.
+ * gcc.target/i386/hle-add-rel-1.c: Likewise.
+ * gcc.target/i386/hle-and-acq-1.c: Likewise.
+ * gcc.target/i386/hle-and-rel-1.c: Likewise.
+ * gcc.target/i386/hle-cmpxchg-acq-1.c: Likewise.
+ * gcc.target/i386/hle-cmpxchg-rel-1.c: Likewise.
+ * gcc.target/i386/hle-or-acq-1.c: Likewise.
+ * gcc.target/i386/hle-or-rel-1.c: Likewise.
+ * gcc.target/i386/hle-sub-acq-1.c: Likewise.
+ * gcc.target/i386/hle-sub-rel-1.c: Likewise.
+ * gcc.target/i386/hle-xadd-acq-1.c: Likewise.
+ * gcc.target/i386/hle-xadd-rel-1.c: Likewise.
+ * gcc.target/i386/hle-xor-acq-1.c: Likewise.
+ * gcc.target/i386/hle-xor-rel-1.c: Likewise.
+
+2012-05-09 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/predict-1.c: Remove the replicated text in this test.
+ * gcc.dg/predict-2.c: Likewise.
+ * gcc.dg/predict-3.c: Likewise.
+ * gcc.dg/predict-4.c: Likewise.
+ * gcc.dg/predict-5.c: Likewise.
+ * gcc.dg/predict-6.c: Likewise.
+
+2012-05-08 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/53272
+ * gcc.dg/torture/pr53272-1.c, gcc.dg/torture/pr53272-2.c: New test.
+
+2012-05-08 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/fold-bitand-4.c: New testcase.
+
+2012-05-08 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/predict-1.c: Check if LOOP_IV_COMPARE static predict
+ heuristic is working properly.
+ * gcc.dg/predict-2.c: Likewise.
+ * gcc/dg/predict-3.c: Likewise.
+ * gcc/dg/predict-4.c: Likewise.
+ * gcc/dg/predict-5.c: Likewise.
+ * gcc/dg/predict-6.c: Likewise.
+
+2012-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53239
+ * g++.dg/opt/vrp3.C: New test.
+ * g++.dg/opt/vrp3-aux.cc: New file.
+ * g++.dg/opt/vrp3.h: New file.
+
+2012-05-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Allow for / comments and missing
+ .uleb128 support in assembler output.
+
+2012-05-07 Richard Guenther <rguenther@suse.de>
+
+ PR lto/42987
+ * g++.dg/lto/pr42987_0.C: New testcase.
+ * g++.dg/lto/pr42987_1.C: Likewise.
+
+2012-05-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53255
+ * gfortran.dg/typebound_operator_15.f90: New.
+
+2012-05-06 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/41587
+ * gfortran.dg/class_array_13.f90: New.
+
+2012-05-06 Tristan Gingold <gingold@adacore.com>
+
+ * gnat.dg/warn7.adb: New test.
+
+2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/renamings.ads: Rename to...
+ * gnat.dg/specs/renaming1.ads: ...this.
+ * gnat.dg/specs/renaming2.ads: New test.
+ * gnat.dg/specs/renaming2_pkg1.ads: New helper.
+ * gnat.dg/specs/renaming2_pkg2.ads: Likewise.
+ * gnat.dg/specs/renaming2_pkg3.ads: Likewise.
+ * gnat.dg/specs/renaming2_pkg4.ad[sb]: Likewise.
+
+2012-05-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr36.ad[sb]: New test.
+ * gnat.dg/discr36_pkg.ad[sb]: New helper.
+
+2012-05-05 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/43772
+ * c-c++-common/pr43772.c: New.
+
+2012-05-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/41600
+ * gfortran.dg/select_type_26.f03 : New test.
+ * gfortran.dg/select_type_27.f03 : New test.
+
+ PR fortran/53191
+ * gfortran.dg/select_type_28.f03 : New test.
+
+2012-05-05 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/49010
+ PR fortran/24518
+ * gfortran.dg/mod_sign0_1.f90: New test.
+ * gfortran.dg/mod_large_1.f90: New test.
+
+2012-05-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53175
+ gfortran.dg/public_private_module_5.f90: New.
+
+2012-05-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53111
+ * gfortran.dg/constructor_7.f90: New.
+ * gfortran.dg/constructor_8.f90: New.
+
+2012-05-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53166
+ * g++.dg/cpp0x/static_assert7.C: New.
+
+2012-05-04 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ PR tree-optimization/52633
+ * gcc.dg/vect/vect-over-widen-1.c: Two patterns should now be
+ recognized as widening shifts instead of over-widening.
+ * gcc.dg/vect/vect-over-widen-1-big-array.c: Likewise.
+ * gcc.dg/vect/vect-over-widen-4.c: Likewise.
+ * gcc.dg/vect/vect-over-widen-4-big-array.c: Likewise.
+ * gcc.target/arm/pr52633.c: New test.
+
+2012-05-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53168
+ * gcc.dg/torture/pr53168.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-pre-30.c: Likewise.
+
+2012-05-04 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/lto/pr53214_0.c: New testcase.
+
+2012-05-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/ia64/pr48496.c: New test.
+ * gcc.target/ia64/pr52657.c: Likewise.
+
+2012-05-04 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR c/51712
+ * c-c++-common/pr51712.c: New.
+
+2012-05-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/53199
+ * gcc.target/powwerpc/pr53199.c: New file.
+
+2012-05-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/debug/dwarf2/nested-3.C: Adjust pattern.
+
+ * gcc.dg/debug/dwarf2/dups-types.c: New.
+ * gcc.dg/debug/dwarf2/dups-types.h: New.
+
+2012-05-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/debug/dwarf2/namespace-2.C: New.
+ * g++.dg/debug/dwarf2/localclass3.C: New.
+
+2012-05-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/debug/dwarf2/thunk1.C: New.
+
+2012-05-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53186
+ * g++.dg/other/final2.C: New.
+
+2012-05-03 Richard Guenther <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-pre-27.c: Remove XFAIL.
+
+2012-05-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/hle-cmpxchg-acq-1.c (dg-options): Add -march=x86-64.
+ * gcc.target/i386/hle-xadd-acq-1.c (dg-options): Ditto.
+ * gcc.target/i386/hle-cmpxchg-rel-1.c (dg-options): Ditto.
+ * gcc.target/i386/hle-xadd-rel-1.c (dg-options): Ditto.
+
+2012-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/hle-xadd-rel-1.c: Match .byte 0xf3 instead of
+ .byte 0xf2.
+ * gcc.target/i386/hle-sub-rel-1.c: Likewise.
+ * gcc.target/i386/hle-xchg-rel-1.c: Likewise.
+ * gcc.target/i386/hle-add-rel-1.c: Likewise.
+
+ PR debug/53174
+ * gcc.dg/pr53174.c: New test.
+
+ PR target/53187
+ * gcc.target/arm/pr53187.c: New test.
+ * gcc.c-torture/compile/pr53187.c: New test.
+
+2012-05-03 Richard Guenther <rguenther@suse.de>
+
+ * gfortran.dg/pr52621.f90: Add -w to avoid diagnostic about
+ unsupported prefetching support.
+
+2012-05-03 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/fixed-point/composite-type.c (dg-options): Add
+ option -ftrack-macro-expansion=0.
+ * gcc.dg/fixed-point/operator-bitwise.c (dg-options): Add
+ option -ftrack-macro-expansion=0.
+
+2012-05-03 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/builtin-stringop-chk-1.c (dg-options): Replace
+ dg-options for target arm with dg-additional-options.
+
+2012-05-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53144
+ * gcc.dg/torture/pr53144.c: New testcase.
+
+2012-05-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52864
+ * gfortran.dg/pointer_intent_7.f90: New.
+ * gfortran.dg/pure_formal_3.f90: New.
+
+2012-05-02 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.target/s390/20030123-1.c: Add missing "volatile".
+
+2012-05-02 Martin Jambor <mjambor@suse.cz>
+
+ PR lto/52605
+ * g++.dg/lto/pr52605_0.C: New test.
+
+2012-05-02 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/hle-cmpxchg-acq-1.c: New.
+ * gcc.target/i386/hle-cmpxchg-rel-1.c: Ditto.
+ * gcc.target/i386/hle-add-acq-1.c: Ditto.
+ * gcc.target/i386/hle-add-rel-1.c: Ditto.
+ * gcc.target/i386/hle-and-acq-1.c: Ditto.
+ * gcc.target/i386/hle-and-rel-1.c: Ditto.
+ * gcc.target/i386/hle-or-acq-1.c: Ditto.
+ * gcc.target/i386/hle-or-rel-1.c: Ditto.
+ * gcc.target/i386/hle-sub-acq-1.c: Ditto.
+ * gcc.target/i386/hle-sub-rel-1.c: Ditto.
+ * gcc.target/i386/hle-xadd-acq-1.c: Ditto.
+ * gcc.target/i386/hle-xadd-rel-1.c: Ditto.
+ * gcc.target/i386/hle-xchg-acq-1.c: Ditto.
+ * gcc.target/i386/hle-xchg-rel-1.c: Ditto.
+ * gcc.target/i386/hle-xor-acq-1.c: Ditto.
+ * gcc.target/i386/hle-xor-rel-1.c: Ditto.
+
+2012-05-02 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR middle-end/53153
+ * gcc.dg/pr53153.c: New test.
+
+2012-05-02 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/tree-ssa/pr19807.C: Adjust.
+
+2012-05-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53163
+ * gcc.c-torture/compile/pr53163.c: New test.
+
+ PR rtl-optimization/53160
+ * gcc.c-torture/execute/pr53160.c: New test.
+
+2012-05-01 Ian Lance Taylor <iant@google.com>
+
+ PR c/37303
+ * gcc.dg/pr37303.c: New test.
+
+2012-05-01 Richard Henderson <rth@redhat.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_sync_long_long_runtime): True for
+ check_effective_target_powerpc64.
+
+2012-04-30 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/51033
+ * gcc.dg/vector-1.c: Move to ...
+ * c-c++-common/vector-1.c: ... here.
+ * gcc.dg/vector-2.c: Move to ...
+ * c-c++-common/vector-2.c: ... here.
+ * gcc.dg/vector-3.c: Move to ...
+ * c-c++-common/vector-3.c: ... here. Adapt to C++.
+ * gcc.dg/vector-4.c: Move to ...
+ * c-c++-common/vector-4.c: ... here.
+ * gcc.dg/vector-init-1.c: Move to ...
+ * c-c++-common/vector-init-1.c: ... here.
+ * gcc.dg/vector-init-2.c: Move to ...
+ * c-c++-common/vector-init-2.c: ... here.
+ * gcc.dg/vector-subscript-1.c: Move to ... Adapt to C++.
+ * c-c++-common/vector-subscript-1.c: ... here.
+ * gcc.dg/vector-subscript-2.c: Move to ...
+ * c-c++-common/vector-subscript-2.c: ... here.
+ * gcc.dg/vector-subscript-3.c: Move to ...
+ * c-c++-common/vector-subscript-3.c: ... here.
+
+ PR c++/51314
+ * g++.dg/cpp0x/vt-51314.C: New test.
+ * g++.dg/cpp0x/variadic76.C: Fix.
+
+2012-04-30 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/pr52283.c: Add missing dg-warning and dg-options.
+
+2012-04-30 Dodji Seketeli <dodji@redhat.com>
+
+ Add -Wvarargs option
+ * c-c++-common/Wvarargs.c: New test case.
+ * c-c++-common/Wvarargs-2.c: Likewise.
+
+2012-04-30 Dodji Seketeli <dodji@redhat.com>
+
+ Adjust relevant test cases wrt -ftrack-macro-expansion=[0|2]
+ * objc.dg/foreach-7.m: Force the test case to run without
+ -ftrack-macro-expansion.
+ * c-c++-common/tm/attrib-1.c: Likewise.
+ * c-c++-common/warn-ommitted-condop.c: Likewise.
+ * gcc.dg/assign-warn-1.c: Likewise.
+ * gcc.dg/assign-warn-2.c: Likewise.
+ * gcc.dg/attr-alloc_size.c: Likewise.
+ * gcc.dg/builtin-stringop-chk-1.c: Likewise.
+ * gcc.dg/builtin-stringop-chk-2.c: Likewise.
+ * gcc.dg/builtin-strncat-chk-1.c: Likewise.
+ * gcc.dg/c90-const-expr-9.c: Likewise.
+ * gcc.dg/c99-const-expr-9.c: Likewise.
+ * gcc.dg/cpp/direct2.c: Likewise. Adjust.
+ * gcc.dg/cpp/direct2s.c: Likewise.
+ * gcc.dg/cpp/pr28709.c: Likewise.
+ * gcc.dg/cpp/pragma-diagnostic-1.c: Likewise.
+ * gcc.dg/dfp/composite-type.c: Likewise.
+ * gcc.dg/uninit-6-O0.c: Adjust the test case and force it to run
+ with -ftrack-macro-expansion
+ * g++.dg/cpp0x/constexpr-ex3.C: Likewise.
+ * g++.dg/cpp0x/constexpr-overflow.C: Likewise.
+ * g++.dg/ext/cleanup-1.C: Likewise.
+ * g++.dg/ext/gnu-inline-global-reject.C: Likewise.
+ * g++.dg/template/sfinae10.C: Likewise.
+ * g++.dg/tm/wrap-2.C: Likewise.
+ * g++.dg/warn/Wconversion-real-integer.C: Likewise.
+ * g++.dg/warn/Wsign-conversion.C: Likewise.
+ * g++.dg/warn/multiple-overflow-warn-1.C: Likewise.
+ * g++.old-deja/g++.mike/p10769b.C: Likewise.
+ * g++.dg/warn/Wdouble-promotion.C: Adjust the test case and force
+ it to run with -ftrack-macro-expansion.
+ * libstdc++-v3/scripts/testsuite_flags.in: By default, run the
+ test cases without -ftrack-macro-expansion.
+
+ Fix location for static class members
+ * g++.dg/template/sfinae6_neg.C: Adjust.
+
+ Make conversion warnings work on NULL with -ftrack-macro-expansion
+ * g++.dg/warn/Wconversion-null-2.C: Add testing for __null,
+ alongside the previous testing for NULL.
+
+ Fix -Wuninitialized for -ftrack-macro-expansion
+ * gcc.dg/cpp/pragma-diagnostic-2.c: Fix this.
+
+ Strip "<built-in>" loc from displayed expansion context
+ * g++.dg/warn/Wconversion-real-integer2.C: New test.
+ * g++.dg/warn/Wconversion-real-integer-3.C: Likewise.
+ * g++.dg/warn/conversion-real-integer-3.h: New header used by the
+ new test above.
+
+ Fix expansion point loc for macro-like tokens
+ * gcc.dg/debug/dwarf2/pr41445-5.c: Adjust.
+ * gcc.dg/debug/dwarf2/pr41445-6.c: Likewise.
+
+ Fix token pasting with -ftrack-macro-expansion
+ * gcc.dg/cpp/paste17.c: New test case for
+ -ftrack-macro-expansion=2 mode only.
+ * gcc.dg/cpp/macro-exp-tracking-5.c: Likewise.
+
+2012-04-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn6.ad[sb]: New test.
+
+2012-04-29 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR 53149
+ * gcc.dg/20011021-1.c: Adjust testcase.
+
+2012-04-29 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/53148
+ * gfortran.dg/function_optimize_12.f90: New test.
+
+2012-04-29 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/53156
+ * gcc.target/cris/peep2-andu2.c: Tweak expected assembly
+ code to match current output and cover new peephole2 pattern.
+
+2012-04-27 Ollie Wild <aaw@google.com>
+
+ * g++.dg/cpp0x/Wliteral-suffix.c: New test.
+
+2012-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ * gcc.c-torture/execute/20120427-2.c: New testcase.
+ * gcc.dg/tree-ssa/phi-opt-10.c: New testcase.
+ * gcc.dg/tree-ssa/ssa-pre-28.c: Bypass new optimization.
+ * gcc.dg/tree-ssa/ssa-ifcombine-7.c: Look into ifcombine dump.
+
+2012-04-27 Paolo Bonzini <bonzini@gnu.org>
+
+ PR target/53138
+ * gcc.c-torture/execute/20120427-1.c: New testcase.
+
+2012-04-27 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/27139
+ * gcc.dg/tree-ssa/forwprop-18.c: New test.
+
+2012-04-27 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/51879
+ * gcc.dg/pr51879.c: New test.
+ * gcc.dg/pr51879-2.c: Same.
+ * gcc.dg/pr51879-3.c: Same.
+ * gcc.dg/pr51879-4.c: Same.
+ * gcc.dg/pr51879-6.c: Same.
+
+2012-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53096
+ * g++.dg/cpp0x/defaulted35.C: New.
+ * g++.dg/cpp0x/defaulted15.C: Adjust.
+
+2012-04-26 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/bf-ms-layout.c: Adjust offsets to fit ms-bitfield
+ structure layout.
+
+2012-04-25 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/i386/builtin_target.c: Check avx2.
+
+2012-04-26 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/savres.c: New test.
+ * gcc.target/powerpc/powerpc.exp: Run it.
+
+2012-04-26 Hans-Peter Nilsson <hp@axis.com>
+
+ PR target/53120
+ * gcc.dg/torture/pr53120.c: New test.
+
+2012-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/52979
+ * gcc.c-torture/compile/pr52979-1.c: New test.
+ * gcc.c-torture/execute/pr52979-1.c: New test.
+ * gcc.c-torture/execute/pr52979-2.c: New test.
+
+2012-04-25 Richard Guenther <rguenther@suse.de>
+
+ * gcc.target/i386/l_fma_float_5.c: Adjust.
+ * gcc.target/i386/l_fma_double_4.c: Likewise.
+ * gcc.target/i386/l_fma_float_2.c: Likewise.
+ * gcc.target/i386/l_fma_float_6.c: Likewise.
+ * gcc.target/i386/l_fma_double_1.c: Likewise.
+ * gcc.target/i386/l_fma_double_5.c: Likewise.
+ * gcc.target/i386/l_fma_float_3.c: Likewise.
+ * gcc.target/i386/l_fma_double_2.c: Likewise.
+ * gcc.target/i386/l_fma_double_6.c: Likewise.
+ * gcc.target/i386/l_fma_float_4.c: Likewise.
+ * gcc.target/i386/l_fma_double_3.c: Likewise.
+ * gcc.target/i386/l_fma_float_1.c: Likewise.
+
+2012-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53058
+ * gcc.c-torture/compile/pr53058.c: New test.
+
+2012-04-25 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/53088
+ * gcc.target/i386/pr39082-1.c: Update warning location.
+
+2012-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/52880
+ * gcc.dg/pr52880.c: New test.
+
+2012-04-25 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * gcc.dg/m-un-2.c: Update.
+ * gcc.dg/20011021-1.c: Update.
+
+2012-04-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52196
+ * gfortran.dg/realloc_on_assign_14.f90: New.
+
+2012-04-24 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ PR tree-optimizations/52891
+ * gcc.c-torture/compile/pr52891-2.c: Fix test for 16-bit int.
+
+2012-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52363
+ * g++.dg/cpp0x/sfinae35.C: New.
+ * g++.dg/cpp0x/sfinae36.C: Likewise.
+
+2012-04-24 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/builtin_target.c: New testcase.
+
+2012-04-24 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/47197
+ * gcc.target/powerpc/pr47197.c: New test.
+
+2012-04-24 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53085
+ * g++.dg/torture/pr53085.C: New testcase.
+
+2012-04-24 Andrew Pinski <apinski@cavium.com>
+
+ PR tree-opt/33512
+ * gcc.dg/tree-ssa/andor-3.c: New testcase.
+ * gcc.dg/tree-ssa/andor-4.c: New testcase.
+ * gcc.dg/tree-ssa/andor-5.c: New testcase.
+
+2012-04-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/53084
+ * gcc.c-torture/execute/pr53084.c: New test.
+
+2012-04-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/noexcept15.C: Adjust for Rev 186726 library changes.
+
+2012-04-23 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.dg/tree-ssa/forwprop-17.c: New testcase.
+
+2012-04-23 Bill Schmidt <wschmidt@linux.ibm.com>
+
+ PR regression/53076
+ * gcc.dg/torture/builtin-explog-1.c: Skip if -O0.
+ * gcc.dg/torture/builtin-power-1.c: Likewise.
+
+2012-04-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/53070
+ * gcc.dg/torture/pr53070.c: New testcase.
+
+2012-04-23 Richard Guenther <rguenther@suse.de>
+
+ PR c/53060
+ * gcc.dg/pr53060.c: New testcase.
+
+2012-04-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimizations/52891
+ * gcc.c-torture/compile/pr52891-1.c: New test.
+ * gcc.c-torture/compile/pr52891-2.c: New test.
+
+2012-04-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53051
+ * gfortran.dg/read_float_4.f90: New.
+
+2012-04-21 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR 35441
+ * c-c++-common/pr35441.C: New.
+
+2012-04-20 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-set-goarch): Recognize powerpc*-*-*.
+ (go-gc-tests): Skip nilptr.go on powerpc*-*-*.
+
+2012-04-20 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/x86_64/abi/avx/test_passing_unions.c: Avoid undefined
+ array access.
+ * gcc.target/x86_64/abi/avx/test_passing_structs.c: Likewise.
+
+2012-04-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR rtl-optimization/44214
+ * gcc.dg/pr44214-1.c: New test.
+ * gcc.dg/pr44214-2.c: Likewise.
+ * gcc.dg/pr44214-3.c: Likewise.
+
+2012-04-20 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/torture/20120420-1.C: New testcase.
+
+2012-04-19 Steven Bosscher <steven@gcc.gnu.org>
+
+ * gcc.target/i386/pr45830.c: Update scan-tree-dump.
+
+2012-04-19 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.dg/pr52283.c: New test.
+
+2012-04-19 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * gcc.dg/pr37985.c: New test.
+
+2012-04-19 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/44688
+ * gcc.dg/var-expand1.c: Increase array size to make unrolling
+ possibly profitable.
+
+2012-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/52976
+ * gfortran.dg/reassoc_11.f: New test.
+
+2012-04-18 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/52976
+ * gfortran.dg/reassoc_7.f: New test.
+ * gfortran.dg/reassoc_8.f: Likewise.
+ * gfortran.dg/reassoc_9.f: Likewise.
+ * gfortran.dg/reassoc_10.f: Likewise.
+
+2012-04-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52422
+ * g++.dg/cpp0x/sfinae33.C: New.
+ * g++.dg/cpp0x/sfinae34.C: Likewise.
+
+2012-04-18 Joey Ye <joey.ye@arm.com>
+
+ * gcc.target/arm/thumb1-imm.c: Skip it in non-thumb1 target.
+
+2012-04-18 Richard Guenther <rguenther@suse.de>
+
+ * gcc.target/x86_64/abi/test_passing_unions.c: Avoid undefined
+ array access.
+ * gcc.target/x86_64/abi/test_passing_structs.c: Likewise.
+ * gcc.target/i386/avx256-unaligned-load-4.c: Fix array sizes.
+
+2012-04-17 Tom de Vries <tom@codesourcery.com>
+
+ * g++.dg/pr51264-4.C: New test.
+
+2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52599
+ * g++.dg/cpp0x/constexpr-ctor10.C: New.
+
+2012-04-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53003
+ * g++.dg/parse/crash59.C: New.
+
+2012-04-17 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/18437
+ * gfortran.dg/vect/rnflow-trs2a2.f90: New test.
+
+2012-04-17 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/53011
+ * g++.dg/torture/pr53011.C: New testcase.
+
+2012-04-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/38543
+ * g++.dg/cpp0x/variadic131.C: New.
+
+ PR c++/52008
+ * g++.dg/cpp0x/variadic130.C: New.
+
+ PR c++/50830
+ * g++.dg/cpp0x/variadic129.C: New.
+
+ PR c++/50303
+ * g++.dg/cpp0x/variadic128.C: New.
+
+2012-04-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52864
+ * gfortran.dg/pointer_intent_6.f90: New.
+
+2012-04-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52916
+ * gfortran.dg/public_private_module_3.f90: Use dg-additional-sources
+ to include public_private_module_4.f90.
+ * gfortran.dg/public_private_module_4.f90: Skip this test on all
+ targets.
+
+2012-04-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/49152
+ * g++.dg/diagnostic/operator1.C: New.
+ * g++.dg/ext/label5.C: Adjust.
+ * g++.dg/ext/va-arg1.C: Likewise.
+ * g++.dg/other/error20.C: Likewise.
+ * g++.dg/other/error20.C: Likewise.
+ * g++.dg/other/error16.C: Likewise.
+ * g++.dg/other/error10.C: Likewise.
+ * g++.dg/parse/error30.C: Likewise.
+ * g++.dg/cpp0x/lambda/lambda-err1.C: Likewise.
+
+2012-04-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51148
+ * g++.dg/cpp0x/variadic127.C: New.
+
+2012-04-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * lib/plugin-support.exp (plugin-test-execute): Properly determine
+ testcase name.
+ Use fail, pass instead of unresolved.
+ Don't log $optstr.
+
+ PR testsuite/52948
+ * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Remove
+ TODO_dump_func.
+ * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
+ * gcc.dg/plugin/one_time_plugin.c (one_pass): Likewise.
+ * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Likewise.
+
+2012-04-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/52968
+ * gfortran.dg/typebound_call_23.f03: New test case.
+
+2012-04-15 Jason Merrill <jason@redhat.com>
+
+ PR c++/47220
+ * g++.dg/cpp0x/variadic126.C: New.
+
+ PR c++/52380
+ * g++.dg/cpp0x/variadic125.C: New.
+
+ PR c++/52292
+ * g++.dg/cpp0x/variadic124.C: New.
+
+ PR c++/52706
+ * g++.dg/cpp0x/nullptr27.C: New.
+
+ PR c++/52818
+ * g++.dg/warn/format8.C: New.
+
+2012-04-15 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/51082
+ * gfortran.dg/proc_ptr_comp_34.f90: New test case.
+
+2012-04-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52916
+ PR fortran/40973
+ * gfortran.dg/public_private_module_3.f90: New.
+ * gfortran.dg/public_private_module_4.f90: New.
+
+2012-04-14 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/superblock.c: New test.
+
+2012-04-14 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr51879-12.c: New test.
+
+2012-04-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/52824
+ * g++.dg/cpp0x/variadic123.C: New.
+ * g++.dg/cpp0x/alias-decl-15.C: Remove dg-errors.
+
+ PR c++/52905
+ * g++.dg/cpp0x/initlist-ctor1.C: New.
+
+ PR c++/52915
+ * g++.dg/other/anon-union2.C: New.
+
+2012-04-13 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/52939
+ * g++.dg/ipa/pr52939.C: New test.
+
+2012-04-13 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr52734.c: New test.
+
+2012-04-13 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52969
+ * gcc.dg/torture/pr52969.c: New testcase.
+
+2012-04-13 Richard Guenther <rguenther@suse.de>
+
+ PR c/52549
+ * gcc.dg/pr52549.c: New testcase.
+
+2012-04-13 Richard Guenther <rguenther@suse.de>
+
+ PR c/52862
+ * gcc.dg/pr52862.c: New testcase.
+
+2012-04-13 Joey Ye <joey.ye@arm.com>
+
+ * gcc.target/arm/thumb1-imm.c: New testcase.
+
+2012-04-12 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52932
+ * gcc.target/i386/avx2-vpermps-1.c (avx2_test): Use __m256i type for
+ second function argument.
+ * gcc.target/i386/avx2-vpermps-2.c (init_permps): Update declaration.
+ (calc_permps): Update declaration. Calculate result correctly.
+ (avx2_test): Change src2 type to union256i_d.
+ * gcc.target/i386/avx2-vpermd-2.c (calc_permd): Calculate result
+ correctly.
+
+2012-04-12 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/52775
+ * gcc.target/powerpc/pr52775.c: New file.
+
+2012-04-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/18589
+ * gcc.dg/tree-ssa/pr18589-1.c: New test.
+ * gcc.dg/tree-ssa/pr18589-2.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-3.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-4.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-5.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-6.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-7.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-8.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-9.c: Likewise.
+ * gcc.dg/tree-ssa/pr18589-10.c: Likewise.
+
+2012-04-12 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52943
+ * gcc.dg/torture/pr52943.c: New testcase.
+
+2012-04-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/50751
+ * gcc/target/sh/pr50751-4.c: New.
+ * gcc/target/sh/pr50751-5.c: New.
+ * gcc/target/sh/pr50751-6.c: New.
+ * gcc/target/sh/pr50751-7.c: New.
+
+2012-04-11 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52465
+ * g++.dg/lookup/using52.C: New.
+
+2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * lib/prune.exp (TEST_ALWAYS_FLAGS): If undefined, set to empty.
+
+2012-04-11 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR rtl-optimization/52876
+ * gcc.target/i386/pr52876.c: New.
+
+2012-04-11 Bernd Schmidt <bernds@codesourcery.com>
+
+ * gcc.dg/c99-const-expr-9.c (old_offsetof): Insert a cast to
+ __UINTPTR_TYPE__.
+ * gcc.c-torture/execute/pr15296.c (intptr_t): Likewise, with
+ __INTPTR_TYPE__.
+ * gcc.dg/pr14092-1.c (intptr_t): Likewise.
+ * gcc.dg/tree-ssa/foldcast-1.c (ssize_t): Likewise.
+ * gcc.dg/c90-const-expr-6.c (intptr_t): New typedef to replace ...
+ (ptrdiff_t): ... this. All uses changed.
+ * gcc.dg/c99-const-expr-6.c (intptr_t, ptrdiff_t): Likewise.
+ * gcc.dg/torture/pta-escape-1.c (foo): Change arg type to
+ __INTPTR_TYPE__.
+ (main): Cast argument to __INTPTR_TYPE__.
+ * gcc.dg/20041106-1.c (main): Cast to __UINTPTR_TYPE__ rather than
+ size_t.
+ * gcc.dg/mallign.c (main): Likewise.
+ * gcc.dg/pr38700.c (foo): Likewise.
+ * gcc.dg/long-long-cst1.c (t): Likewise.
+ * gcc.dg/c99-const-expr-10.c (p, q, f, h, h2): Likewise.
+ * gcc.dg/array-10.c (c0, c1, c2, c3, c4, c5): Likewise.
+ * gcc.dg/pointer-arith-10.c (foo): Likewise.
+ * gcc.dg/pr25682.c (d, foo): Likewise.
+ * gcc.dg/format/cast-1.c (f): Likewise.
+ * gcc.dg/c90-const-expr-10.c
+ * gcc.dg/pr41551.c (uintptr_t): New typedef, replacing...
+ (size_t): ...this. All uses changed.
+ * gcc.c-torture/execute/pr22098-1.c (uintptr_t): Likewise.
+ * gcc.c-torture/execute/pr22098-2.c (uintptr_t): Likewise.
+ * gcc.c-torture/execute/pr22098-3.c (uintptr_t): Likewise.
+ * gcc.dg/pr34856.c (uintptr_t): Likewise.
+ * gcc.dg/sequence-pt-1.c: Likewise.
+ * gcc.dg/c90-const-expr-9.c (uintptr_t): Likewise.
+ * gcc.dg/max-1.c (intptr_t): Likewise, replacing ssize_t.
+ * gcc.dg/pr39074.c (intptr_t): Define using __INTPTR_TYPE__.
+ * gcc.dg/pr30744-1.c (my_intptr_t): New typedef. Replace all uses
+ of ptrdiff_t with it.
+ * gcc.dg/inline-23.c (my_intptr_t): Likewise.
+ * gcc.dg/pr37561.c (p): Use __INTPTR_TYPE__.
+ * gcc.dg/vla-11.c (foo11b): Use __UINTPTR_TYPE__.
+
+2012-04-11 Jason Merrill <jason@redhat.com>
+
+ PR debug/45088
+ * g++.dg/debug/dwarf2/self-ref-1.C: Define virtual destructor.
+ * g++.dg/debug/dwarf2/self-ref-1.C: Likewise.
+
+ PR c++/52906
+ * g++.dg/ext/attrib45.C: New.
+
+ * g++.dg/eh/dtor3.C: New.
+
+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52621
+ * gfortran.dg/pr52621.f90: New testcase.
+
+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52918
+ * g++.dg/torture/pr52918-1.C: New testcase.
+ * g++.dg/torture/pr52918-2.C: Likewise.
+
+2012-04-11 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52729
+ * gfortran.dg/block_11.f90: New.
+
+2012-04-11 Nick Clifton <nickc@redhat.com>
+
+ * gcc.dg/stack-usage-1.c (SIZE): Define for the RL78.
+
+2012-04-11 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR target/16458
+ * gcc.target/powerpc/pr16458-1.c: New test.
+ * gcc.target/powerpc/pr16458-2.c: Likewise.
+ * gcc.target/powerpc/pr16458-3.c: Likewise.
+ * gcc.target/powerpc/pr16458-4.c: Likewise.
+
+2012-04-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/builtin-bswap-1.c: Test __builtin_bswap16 & __builtin_bswap64.
+ * gcc.dg/builtin-bswap-4.c: Test __builtin_bswap16.
+ * gcc.dg/builtin-bswap-5.c: Likewise.
+ * gcc.target/i386/builtin-bswap-4.c: New test.
+
+2012-04-11 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ PR 24985
+ * lib/prune.exp: Add -fno-diagnostics-show-caret.
+
+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/52881
+ * gcc.dg/torture/pr52881.c: New testcase.
+ * gcc.dg/torture/pr52913.c: Likewise.
+
+2012-04-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52912
+ * gcc.dg/torture/pr52912.c: New testcase.
+
+2010-04-10 Michael Matz <matz@suse.de>
+
+ * gcc.dg/vect/vect-outer-1-big-array.c: Adjust.
+ * gcc.dg/vect/vect-outer-1.c: Adjust.
+ * gcc.dg/vect/vect-outer-1a-big-array.c: Adjust.
+ * gcc.dg/vect/vect-outer-1a.c: Adjust.
+ * gcc.dg/vect/vect-outer-1b-big-array.c: Adjust.
+ * gcc.dg/vect/vect-outer-1b.c: Adjust.
+ * gcc.dg/vect/vect-outer-2b.c: Adjust.
+ * gcc.dg/vect/vect-outer-3b.c: Adjust.
+
+2012-04-10 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ PR tree-optimization/52870
+ * gcc.dg/vect/pr52870.c: New test.
+
+2012-04-09 Mike Stump <mikestump@comcast.net>
+
+ * g++.dg/cpp0x/udlit-raw-op.C: Don't use CRLF endings.
+ * gcc.dg/tree-ssa/vrp59.c: Likewise.
+ * gcc.dg/tree-ssa/vrp60.c: Likewise.
+ * gnat.dg/aggr11.adb: Likewise.
+ * gnat.dg/aggr11_pkg.ads: Likewise.
+ * gnat.dg/aggr15.adb: Likewise.
+ * gnat.dg/aggr15.ads: Likewise.
+ * gnat.dg/aggr17.adb: Likewise.
+ * gnat.dg/aggr18.adb: Likewise.
+ * gnat.dg/array14.adb: Likewise.
+ * gnat.dg/array14.ads: Likewise.
+ * gnat.dg/array14_pkg.ads: Likewise.
+ * gnat.dg/array19.adb: Likewise.
+ * gnat.dg/array19.ads: Likewise.
+ * gnat.dg/discr27.adb: Likewise.
+ * gnat.dg/discr27.ads: Likewise.
+ * gnat.dg/discr35.adb: Likewise.
+ * gnat.dg/discr35.ads: Likewise.
+ * gnat.dg/discr6.adb: Likewise.
+ * gnat.dg/discr6_pkg.ads: Likewise.
+ * gnat.dg/import1.adb: Likewise.
+ * gnat.dg/import1.ads: Likewise.
+ * gnat.dg/loop_address2.adb: Likewise.
+ * gnat.dg/opt7.adb: Likewise.
+ * gnat.dg/opt7.ads: Likewise.
+ * gnat.dg/pointer_variable_bounds.adb: Likewise.
+ * gnat.dg/pointer_variable_bounds.ads: Likewise.
+ * gnat.dg/rep_clause2.adb: Likewise.
+ * gnat.dg/rep_clause2.ads: Likewise.
+ * gnat.dg/slice2.adb: Likewise.
+ * gnat.dg/slice2.ads: Likewise.
+ * gnat.dg/slice6.adb: Likewise.
+ * gnat.dg/slice6_pkg.ads: Likewise.
+ * gnat.dg/specs/unchecked_union2.ads: Likewise.
+ * gnat.dg/taft_type2.adb: Likewise.
+ * gnat.dg/taft_type2.ads: Likewise.
+ * gnat.dg/taft_type2_pkg.ads: Likewise.
+ * gnat.dg/volatile10.adb: Likewise.
+ * gnat.dg/volatile10_pkg.ads: Likewise.
+
+ * gcc.dg/dll-8.c: Remove execute permissions.
+ * g++.dg/ext/dllexport5.C: Likewise.
+
+2012-04-09 Jan Hubicka <jh@suse.cz>
+
+ PR lto/52722
+ PR lto/51765
+ PR lto/52634
+ * gcc.dg/lto/pr52634_1.c: New testcase.
+ * gcc.dg/lto/pr52634_0.c: New testcase.
+
+2012-04-09 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52883
+ * gcc.target/i386/pr52883.c: New testcase.
+
+2012-04-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * lib/target-supports.exp (check_effective_target_sparc_v9): New.
+ (check_effective_target_sync_long_long): Add SPARC case.
+ (check_effective_target_sync_long_long_runtime): Likewise.
+ (check_effective_target_sync_int_long): Adjust SPARC case.
+ (check_effective_target_sync_char_short): Likewise.
+
+2012-04-08 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/sh2a-prefetch.c: Rename to ...
+ * gcc.target/sh/prefetch.c: ... this. Enable test case for m4*.
+
+2012-04-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/40973
+ PR fortran/52751
+ * gfortran.dg/public_private_module_2.f90: New.
+
+2012-04-08 Manuel López-Ibáñez <manu@gcc.gnu.org>
+
+ * g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C: Add labels to
+ directives.
+
+2012-04-07 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52893
+ * gfortran.dg/function_optimize_11.f90: New test.
+
+2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52668
+ * gfortran.dg/use_only_6.f90: New test.
+
+2012-04-06 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52668
+ * gfortran.dg/use_only_6.f90: New test.
+2012-04-06 Mike Stump <mikestump@comcast.net>
+
+ PR testsuite/50722
+ * gcc.dg/pr49994-3.c: Use -w to squelch non-portable warnings.
+
+2012-04-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/52596
+ * g++.dg/template/qualified-id5.C: New.
+
+2012-04-05 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52882
+ * gcc.target/i386/pr52882.c: New test.
+
+2012-04-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+ Dominique D'Humieures <dominiq@lps.ens.fr>
+
+ PR testsuite/52614
+ * gcc.dg/vect/vect.exp: Use -fno-common on all targets.
+ * gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp: Likewise.
+
+2012-04-04 Jason Merrill <jason@redhat.com>
+
+ PR c++/52845
+ * g++.dg/cpp0x/lambda/lambda-warn4.C: New.
+
+2012-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/52796
+ * g++.dg/cpp0x/variadic-value1.C: New.
+
+2012-04-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack18.adb: New test.
+ * gnat.dg/pack18_pkg.ads: New helper.
+
+2012-04-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52808
+ * gcc.dg/pr52808.c: New testcase.
+
+2012-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52835
+ * gfortran.dg/pr52835.f90: New test.
+
+2012-04-03 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/aggr5.ads: New test.
+
+2012-04-02 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52756
+ * gcc.dg/torture/pr52756.c: New testcase.
+
+2012-04-02 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52803
+ * gcc.dg/pr52803.c: New testcase.
+
+2012-04-02 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/40942
+ * g++.old-deja/g++.pt/spec40.C: Adjust to take the resolution of
+ DR 214 in account.
+
+2012-04-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/50043
+ * g++.dg/cpp0x/noexcept17.C: New.
+ * g++.old-deja/g++.eh/cleanup1.C: Adjust.
+ * g++.dg/tree-ssa/ehcleanup-1.C: Likewise.
+ * g++.dg/cpp0x/noexcept01.C: Likewise.
+ * g++.dg/eh/init-temp1.C: Likewise.
+ * g++.dg/eh/ctor1.C: Likwise.
+
+2012-03-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/controlled6.adb: New test.
+ * gnat.dg/controlled6_pkg.ads: New helper.
+ * gnat.dg/controlled6_pkg-iterators.ad[sb]: Likewise.
+
+2012-03-30 Richard Henderson <rth@redhat.com>
+
+ PR debug/52727
+ * g++.dg/opt/pr52727.C: New testcase.
+
+2012-03-30 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52754
+ * gcc.target/i386/pr52754.c: New testcase.
+
+2012-03-30 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52772
+ * g++.dg/torture/pr52772.C: New testcase.
+
+2012-03-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52718
+ * g++.dg/warn/Wzero-as-null-pointer-constant-5.C: New.
+
+2012-03-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/52685
+ * g++.dg/template/inherit8.C: New.
+
+2012-03-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52759
+ * g++.dg/ext/weak4.C: New test.
+
+ PR tree-optimization/52760
+ * gcc.c-torture/execute/pr52760.c: New test.
+
+2012-03-29 Jason Merrill <jason@redhat.com>
+
+ PR c++/52743
+ * g++.dg/cpp0x/initlist-array3.C: New.
+
+2012-03-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/52746
+ * g++.dg/overload/virtual2.C: New.
+
+2012-03-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/vect7.ad[sb]: New test.
+
+2012-03-28 Paul Thomas <pault@gcc.gnu.org>
+ Tobias Burnus <burnus@gcc.gnu.org>
+
+ PR fortran/52652
+ * gfortran.dg/allocate_class_1.f90 : Change error test.
+ * gfortran.dg/allocate_with_typespec_4.f90 : Change error test.
+ * gfortran.dg/allocate_alloc_opt_1.f90 : Change error test.
+ * gfortran.dg/deallocate_alloc_opt_1.f90 : Change error test.
+
+2012-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/52691
+ * gcc.dg/pr52691.c: New test.
+
+ PR middle-end/52750
+ * gcc.c-torture/compile/pr52750.c: New test.
+
+2012-03-28 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/52692
+ * gcc.target/avr/torture/builtins-2.c: New test.
+
+2012-03-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52736
+ * gcc.target/i386/pr52736.c: New test.
+
+2012-03-27 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/52693
+ * gcc.dg/torture/pr52693.c: New test.
+
+2012-03-27 Meador Inge <meadori@codesourcery.com>
+
+ PR c++/52672
+ * g++.dg/cpp0x/constexpr-52672.C: New testcase.
+
+2012-03-27 Mike Stump <mikestump@comcast.net>
+
+ PR target/52665
+ * gcc.target/i386/pr28946.c: Use -fno-ident to avoid spurious
+ failures that match branch names.
+
+2012-03-27 Uros Bizjak <ubizjak@gmail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/52698
+ * gcc.target/i386/pr52698.c: New test.
+
+2012-03-27 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52720
+ * gcc.dg/torture/pr52720.c: New testcase.
+
+2012-03-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack17.adb: New test.
+
+2012-03-27 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * gcc.target/arm/thumb-ifcvt.c: Only run for -mthumb.
+ * gcc.target/arm/thumb-16bit-ops.c: Likewise.
+
+2012-03-26 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/50052
+ * gcc.dg/ipa/ipa-sra-2.c: Also run on strict-alignment platforms.
+
+2012-03-26 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52701
+ * gfortran.dg/pr52701.f90: New testcase.
+
+2012-03-26 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ PR tree-optimization/52686
+ * gcc.target/arm/pr52686.c: New test.
+
+2012-03-26 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.target/avr/torture/avr-torture.exp (AVR_TORTURE_OPTIONS):
+ Add "-Os -flto" to list.
+
+2012-03-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/concat2.ad[sb]: New test.
+
+2012-03-24 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/auto3.C: Compile with -pedantic-errors.
+ * g++.dg/cpp0x/trailing2.C: Likewise.
+ * g++.dg/warn/pr23075.C: Change dg-warning to dg-bogus.
+ * g++.dg/cpp1y/auto-fn1.C: New.
+ * g++.dg/cpp1y/auto-fn2.C: New.
+ * g++.dg/cpp1y/auto-fn3.C: New.
+ * g++.dg/cpp1y/auto-fn4.C: New.
+ * g++.dg/cpp1y/auto-fn5.C: New.
+ * g++.dg/cpp1y/auto-fn6.C: New.
+ * g++.dg/cpp1y/auto-fn7.C: New.
+ * g++.dg/cpp1y/auto-fn8.C: New.
+ * g++.dg/cpp1y/auto-fn9.C: New.
+ * g++.dg/cpp1y/auto-fn10.C: New.
+ * g++.dg/cpp1y/auto-fn11.C: New.
+
+2012-03-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52678
+ * gfortran.dg/pr52678.f: New testcase.
+
+2012-03-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52638
+ * g++.dg/torture/pr52638.C: New testcase.
+
+2012-03-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52487
+ * g++.dg/cpp0x/lambda/lambda-ice7.C: New.
+
+2012-03-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52671
+ * g++.dg/ext/attrib44.C: New test.
+
+2012-03-22 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/51737
+ * g++.dg/torture/pr51737.C: New testcase
+
+2012-03-22 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52548
+ * gcc.dg/tree-ssa/ssa-pre-29.c: New testcase.
+
+2012-03-22 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ * lib/fortran-modules.exp (list-module-names-1): Remove
+ warning.
+
+2012-03-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/50751
+ * gcc.target/sh/pr50751-1.c: New.
+ * gcc.target/sh/pr50751-2.c: New.
+ * gcc.target/sh/pr50751-3.c: New.
+
+2012-03-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52479
+ * gcc.target/sh/sh4a-cos.c: Remove.
+ * gcc.target/sh/sh4a-sin.c: Remove.
+ * gcc.target/sh/sh4a-sincos.c: Remove.
+
+2012-03-21 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/neon/vgetQ_laneu64.c: Regenerated.
+ * gcc.target/arm/neon/vgetQ_lanes64.c: Likewise.
+
+2012-03-21 Martin Jambor <mjambor@suse.cz>
+
+ PR testsuite/52641
+ * gcc.dg/misaligned-expand-1.c (cst): Cast to int.
+ * gcc.dg/misaligned-expand-2.c (cst): Likewise.
+
+2012-03-21 Andrew Stubbs <ams@codesourcery.com>
+
+ * gcc.target/arm/thumb-16bit-ops.c: New file.
+ * gcc.target/arm/thumb-ifcvt.c: New file.
+
+2012-03-20 Jason Merrill <jason@redhat.com>
+
+ * lib/target-supports.exp: Add { target c++1y }.
+
+ * g++.dg/cpp0x/auto32.C: New.
+
+2012-03-20 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.dg/torture/pr48124-1.c: Add dg-require-effective-target
+ int32plus.
+ * gcc.dg/torture/pr48124-4.c: Ditto:
+ * gcc.dg/torture/pr52530.c: Use long instead of int if int=16.
+
+2012-03-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/52510
+ * g++.dg/cpp0x/initlist66.C: New.
+
+2012-03-20 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.target/avr/progmem.h (pgm_read_char): Define depending on
+ __AVR_HAVE_LPMX__
+
+2012-03-20 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/49868
+ * gcc.target/avr/torture/addr-space-2.h: New file.
+ * gcc.target/avr/torture/addr-space-2-g.h: New test.
+ * gcc.target/avr/torture/addr-space-2-0.h: New test.
+ * gcc.target/avr/torture/addr-space-2-1.h: New test.
+ * gcc.target/avr/torture/addr-space-2-x.h: New test.
+
+2012-03-20 Richard Guenther <rguenther@suse.de>
+
+ * gnat.dg/pack16.adb: New testcase.
+ * gnat.dg/pack16_pkg.ads: Likewise.
+ * gnat.dg/specs/pack8.ads: Likewise.
+ * gnat.dg/specs/pack8_pkg.ads: Likewise.
+
+2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/warn/Wuseless-cast.C: Extend.
+
+2012-03-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/14710
+ * g++.dg/warn/Wuseless-cast.C: New.
+
+2012-03-17 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR libfortran/52608
+ * gfortran.dg/pr52608.f90: New test.
+
+2012-03-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52585
+ * gfortran.dg/proc_ptr_36.f90: New.
+
+2012-03-16 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/misaligned-expand-1.c: New test.
+ * gcc.dg/misaligned-expand-3.c: Likewise.
+
+2012-03-16 Richard Guenther <rguenther@suse.de>
+ Kai Tietz <ktietz@redhat.com>
+
+ PR middle-end/48814
+ * gcc.c-torture/execute/pr48814-1.c: New test.
+ * gcc.c-torture/execute/pr48814-2.c: New test.
+ * gcc.dg/tree-ssa/assign-1.c: New test.
+ * gcc.dg/tree-ssa/assign-2.c: New test.
+ * gcc.dg/tree-ssa/assign-3.c: New test.
+
+2012-03-16 Richard Guenther <rguenther@suse.de>
+
+ * gnat.dg/specs/pack7.ads: New testcase.
+
+2012-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52568
+ * gcc.dg/torture/vshuf-4.inc: Add two new tests.
+ * gcc.dg/torture/vshuf-8.inc: Likewise.
+ * gcc.dg/torture/vshuf-16.inc: Likewise.
+ * gcc.dg/torture/vshuf-32.inc: Likewise.
+
+2012-03-15 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/torture/pr52582.C: New.
+
+2012-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ * lib/fortran-modules.exp: New file which was forgotten in r185430.
+
+2012-03-15 Ira Rosen <irar@il.ibm.com>
+ Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.dg/vect/slp-cond-3.c: New test.
+ * gcc.dg/vect/slp-cond-4.c: New test.
+
+2012-03-15 Ira Rosen <irar@il.ibm.com>
+ Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.dg/vect/bb-slp-pattern-1.c: New test.
+ * gcc.dg/vect/bb-slp-pattern-2.c: New test.
+
+2012-03-15 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR libfortran/52434
+ PR libfortran/48878
+ PR libfortran/38199
+ * gfortran.dg/edit_real_1.f90: Don't assume roundTiesToAway.
+ * gfortran.dg/round_1.f03: Likewise.
+
+2012-03-15 Jakub Jelinek <jakub@redhat.com>
+ Andrew Pinski <apinski@cavium.com>
+
+ PR middle-end/52592
+ * gcc.dg/pr52592.c: New test.
+
+2012-03-15 Bernhard Reutner-Fischer <aldot@gcc.gnu.org>
+
+ * gfortran.fortran-torture/compile/compile.exp: Simplify.
+ * gfortran.fortran-torture/execute/execute.exp: Likewise.
+ * lib/gcc-dg.exp (cleanup-modules): Move to ..
+ * lib/fortran-modules.exp: .. this new file. Adjust users.
+ * lib/gfortran-dg.exp (gfortran-dg-runtest,
+ gfortran-dg-debug-runtest): Call cleanup-modules.
+ * lib/fortran-torture.exp (fortran-torture-execute,
+ fortran-torture): Likewise.
+ * gfortran.dg/coarray/caf.exp: Likewise.
+ * lib/lto.exp: Likewise.
+ * gfortran.dg/class_4a.f03: Adjust cleanup-modules and keep-modules.
+ * gfortran.dg/class_4b.f03: Likewise.
+ * gfortran.dg/class_4c.f03: Likewise.
+ * gfortran.dg/class_45a.f03: Likewise.
+ * gfortran.dg/binding_label_tests_10.f03: Likewise.
+ * gfortran.dg/binding_label_tests_10_main.f03: Likewise.
+ * gfortran.dg/binding_label_tests_11.f03: Likewise.
+ * gfortran.dg/binding_label_tests_11_main.f03: Likewise.
+ * gfortran.dg/binding_label_tests_13.f03: Likewise.
+ * gfortran.dg/binding_label_tests_13_main.f03: Likewise.
+ * gfortran.dg/test_common_binding_labels_2.f03: Likewise.
+ * gfortran.dg/test_common_binding_labels_2_main.f03: Likewise.
+ * gfortran.dg/test_common_binding_labels_3.f03: Likewise.
+ * gfortran.dg/test_common_binding_labels_3_main.f03: Likewise.
+ * gfortran.dg/whole_file_28.f90: Likewise.
+ * gfortran.dg/whole_file_29.f90: Likewise.
+ * gfortran.dg/whole_file_30.f90: Likewise.
+ * gfortran.dg/whole_file_31.f90: Likewise.
+
+2012-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52267
+ * gcc.dg/pr52267.c: New test.
+ * gcc.dg/tree-ssa/vrp65.c: New test.
+ * gcc.dg/tree-ssa/vrp66.c: New test.
+
+2012-03-15 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52580
+ * gfortran.dg/vect/pr52580.f: New testcase.
+
+2012-03-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/fpul-usage-1.c: New.
+
+2012-03-14 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49468
+ * gcc.target/sh/pr49468-si.c: Make dg-skip-if not the first directive.
+ * gcc.target/sh/pr49468-di.c: Likewise.
+
+2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/warn/miss-format-1.C: Remove *-*-solaris2.8 handling.
+ * gcc.dg/c99-stdint-6.c: Likewise.
+ * gcc.dg/lto/20090210_0.c: Likewise.
+ * gcc.dg/pr28796-2.c: Don't skip on sparc*-sun-solaris2.8.
+ * gcc.dg/pragma-init-fini.c: Don't skip on i?86-*-solaris2.8.
+ * gcc.dg/pragma-init-fini-2.c: Likewise.
+ * gcc.dg/torture/pr47917.c: Remove *-*-solaris2.8 handling.
+ * gcc.target/i386/pr22076.c: Remove i?86-*-solaris2.8 handling.
+ * gcc.target/i386/pr22152.c: Likewise.
+ * gcc.target/i386/vect8-ret.c: Likewise.
+ * lib/target-supports.exp (add_options_for_tls): Remove Solaris 8
+ handling.
+
+2012-03-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/other/anon5.C: Don't skip on mips-sgi-irix*.
+ * g++.dg/tree-prof/partition1.C: Likewise.
+ * g++.dg/tree-prof/partition2.C: Likewise.
+ * g++.old-deja/g++.other/init19.C: Remove mips-sgi-irix*
+ handling.
+ * gcc.c-torture/compile/labels-3.c: Remove dg-options.
+ * gcc.c-torture/execute/20010724-1.c: Remove.
+ * gcc.c-torture/execute/20010724-1.x: Remove.
+ * gcc.c-torture/execute/20040208-2.c: Remove.
+ * gcc.c-torture/execute/20040208-2.x: Remove.
+ * gcc.c-torture/execute/ieee/20000320-1.c [__mips__ && __sgi__]:
+ Remove.
+ (main) [__mips__ && __sgi__]: Remove.
+ * gcc.c-torture/execute/ieee/copysign1.c: Remove IRIX reference.
+ * gcc.c-torture/execute/ieee/copysign2.c: Likewise.
+ * gcc.c-torture/execute/ieee/mul-subnormal-single-1.x: Remove
+ mips-sgi-irix6* handling.
+ * gcc.dg/cpp/assert4.c [__mips__]: Remove __sgi__, sgi.
+ * gcc.dg/torture/20090618-1.c: Don't skip on mips-sgi-irix*.
+ * gcc.dg/torture/builtin-frexp-1.c: Remove mips*-*-irix6*
+ handling.
+ * gcc.dg/torture/builtin-logb-1.c: Likewise.
+ * gcc.dg/torture/pr47917.c: Remove mips-sgi-irix6.5 handling.
+ * gcc.dg/tree-ssa/ssa-store-ccp-3.c: Don't skip on mips*-*-irix*.
+ * gcc.misc-tests/linkage.exp: Remove mips-sgi-irix6* handling.
+ * gcc.target/mips/args-1.c [!__sgi__]: Remove.
+ * gcc.target/mips/interrupt_handler-2.c: Don't skip on
+ mips-sgi-irix6*.
+ * gcc.target/mips/interrupt_handler-3.c: Likewise.
+ * gcc.target/mips/save-restore-1.c: Don't skip on mips-sgi-irix6*.
+ * gcc.target/mips/save-restore-3.c: Likewise.
+ * gcc.target/mips/save-restore-4.c: Likewise.
+ * gcc.target/mips/save-restore-5.c: Likewise.
+ * gfortran.dg/g77/cabs.f: Don't xfail on mips-sgi-irix6*.
+ * lib/prune.exp (prune_gcc_output): Remove pruning of IRIX 6 ld
+ messages.
+ * lib/target-libpath.exp (set_ld_library_path_env_vars): Remove
+ IRIX 6 handling.
+ (restore_ld_library_path_env_vars): Likewise.
+ * lib/target-supports.exp (check_profiling_available): Remove
+ mips*-*-irix* handling.
+ (check_ascii_locale_available): Remove mips-sgi-irix* handling.
+ (add_options_for_c99_runtime): Remove mips-sgi-irix6.5* handling.
+ * objc.dg/stabs-1.m: Don't xfail on mips-sgi-irix6.5.
+
+2012-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52582
+ * g++.dg/opt/pr52582.C: New test.
+
+2012-03-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52571
+ * gcc.dg/vect/vect-2.c: Initialize arrays.
+ * gcc.dg/vect/no-section-anchors-vect-34.c: Likewise.
+ * gcc.target/i386/recip-vec-divf.c: Use -fno-common.
+ * gcc.target/i386/recip-vec-sqrtf.c: Likewise.
+
+2012-03-14 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52080
+ PR middle-end/52097
+ PR middle-end/48124
+ * gcc.dg/torture/pr48124-1.c: New testcase.
+ * gcc.dg/torture/pr48124-2.c: Likewise.
+ * gcc.dg/torture/pr48124-3.c: Likewise.
+ * gcc.dg/torture/pr48124-4.c: Likewise.
+
+2012-03-14 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52578
+ * gcc.dg/pr52578.c: New testcase.
+
+2012-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52521
+ * g++.dg/cpp0x/udlit-args2.C: New test.
+
+2012-03-13 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/48596
+ * gcc.target/sh/pr48596.c: Move accidentally added new test case to ...
+ * gcc.c-torture/compile/pr48596.c: ... here.
+
+2012-01-30 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51641
+ * g++.dg/lookup/hidden-class17.C: New test.
+
+2012-03-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/52577
+ * gcc.dg/Wunused-var-3.c: New test.
+
+2012-03-13 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/misaligned-expand-2.c: New test.
+
+2012-03-13 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52134
+ * gcc.dg/pr52134.c: New testcase.
+
+2012-03-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * ada/acats/tests/cd/cdd1001.a (CDD1001): Fix typo.
+
+2012-03-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/46728
+ * gcc.target/powerpc/pr46728-4.c: Use preferred syntax.
+ * gcc.target/powerpc/pr46728-5.c: Likewise.
+ * gcc.target/powerpc/pr46728-8.c: Likewise.
+ * gcc.target/powerpc/pr46728-10.c: Likewise.
+ * gcc.target/powerpc/pr46728-11.c: Likewise.
+ * gcc.target/powerpc/pr46728-13.c: Likewise.
+ * gcc.target/powerpc/pr46728-14.c: Likewise.
+ * gcc.target/powerpc/pr46728-15.c: Likewise.
+
+2012-03-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52299
+ * g++.dg/warn/Wdiv-by-zero-bogus.C: New.
+
+2012-03-12 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/46728
+ * gcc.target/powerpc/pr46728-4.c: Skip for powerpc*-*-darwin*.
+ * gcc.target/powerpc/pr46728-5.c: Likewise.
+ * gcc.target/powerpc/pr46728-8.c: Likewise.
+ * gcc.target/powerpc/pr46728-10.c: Likewise.
+ * gcc.target/powerpc/pr46728-11.c: Likewise.
+ * gcc.target/powerpc/pr46728-13.c: Likewise.
+ * gcc.target/powerpc/pr46728-14.c: Likewise.
+ * gcc.target/powerpc/pr46728-15.c: Likewise.
+
+2012-03-12 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/49868
+ * gcc.target/avr/torture/addr-space-1.h: New file.
+ * gcc.target/avr/torture/addr-space-1-g.h: New test.
+ * gcc.target/avr/torture/addr-space-1-0.h: New test.
+ * gcc.target/avr/torture/addr-space-1-1.h: New test.
+ * gcc.target/avr/torture/addr-space-1-x.h: New test.
+
+2012-03-12 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.dg/tree-ssa/phi-opt-7.c: New testcase.
+
+2012-03-12 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/abi/rtti3.C: Remove alpha*-dec-osf* handling.
+ * g++.dg/abi/thunk4.C: Likewise.
+ * g++.dg/cdce3.C: Don't skip on*-dec-osf5*.
+ Adapt line numbers.
+ * g++.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf*
+ handling.
+ * g++.dg/cpp0x/constexpr-rom.C: Likewise.
+ * g++.dg/eh/spbp.C: Likewise.
+ * g++.dg/ext/label13.C: Likewise.
+ * g++.dg/guality/guality.exp: Likewise.
+ * g++.dg/other/anon5.C: Likewise.
+ * g++.dg/other/pragma-ep-1.C: Remove.
+ * g++.dg/warn/miss-format-1.C: Remove alpha*-dec-osf* handling.
+ * g++.dg/warn/pr31246.C: Likewise.
+ * g++.dg/warn/weak1.C: Likewise.
+ * g++.old-deja/g++.eh/badalloc1.C: Likewise.
+ * g++.old-deja/g++.ext/attrib5.C: Likewise.
+ * gcc.c-torture/compile/limits-declparen.c: Likewise.
+ * gcc.c-torture/compile/limits-pointer.c: Likewise.
+ * gcc.c-torture/execute/20001229-1.c: Remove __osf__ handling.
+ * gcc.dg/attr-weakref-1.c: Remove alpha*-dec-osf* handling.
+ * gcc.dg/c99-stdint-6.c: Remove alpha*-dec-osf5* handling.
+ * gcc.dg/c99-tgmath-1.c: Likewise.
+ * gcc.dg/c99-tgmath-2.c: Likewise.
+ * gcc.dg/c99-tgmath-3.c: Likewise.
+ * gcc.dg/c99-tgmath-4.c: Likewise.
+ * gcc.dg/compat/struct-layout-1_generate.c: Remove alpha*-dec-osf*
+ handling.
+ * gcc.dg/debug/pr49032.c: Likewise.
+ * gcc.dg/guality/guality.exp: Likewise.
+ * gcc.dg/intmax_t-1.c: Likewise.
+ * gcc.dg/pr48616.c: Likewise.
+ * gcc.dg/pragma-ep-1.c: Remove.
+ * gcc.dg/pragma-ep-2.c: Remove.
+ * gcc.dg/pragma-ep-3.c: Remove.
+ * gcc.dg/torture/pr47917.c: Remove alpha*-dec-osf5* handling.
+ * gcc.dg/tree-ssa/pr42585.c: Remove alpha*-dec-osf* handling.
+ * gcc.misc-tests/gcov-14.c: Likewise.
+ * gfortran.dg/guality/guality.exp: Likewise.
+ * lib/target-supports.exp (check_weak_available): Likewise.
+ (add_options_for_tls): Likewise.
+ (check_ascii_locale_available): Likewise.
+ * obj-c++.dg/dwarf-2.mm: Likewise.
+ * objc.dg/dwarf-1.m: Likewise.
+ * objc.dg/dwarf-2.m: Likewise.
+
+2012-03-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51721
+ * gcc.dg/tree-ssa/vrp64.c: New test.
+
+ PR tree-optimization/52533
+ * gcc.c-torture/compile/pr52533.c: New test.
+
+2012-03-12 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/rtm-xabort-1.c: New.
+ * gcc.target/i386/rtm-xbegin-1.c: Ditto.
+ * gcc.target/i386/rtm-xend-1.c: Ditto.
+ * gcc.target/i386/rtm-xtest-1.c: Ditto.
+ * gcc.target/i386/sse-12.c: Test RTM intrinsics.
+ * gcc.target/i386/sse-13.c: Ditto.
+ * gcc.target/i386/sse-14.c: Ditto.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * g++.dg/other/i386-2.C: Ditto.
+ * g++.dg/other/i386-3.C: Ditto.
+
+2012-03-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52542
+ * gfortran.dg/proc_ptr_35.f90: New.
+
+2012-03-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52530
+ * gcc.dg/torture/pr52530.c: New test.
+
+2012-03-11 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-1.c: Fix thinkos.
+
+2012-03-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR target/52450
+ * gcc.dg/torture/pr52402.c: Skip execution on 32-bit hppa*-*-hpux*.
+
+ * gcc.dg/torture/pr52407.c: Add -fno-common option on hppa*-*-hpux*.
+
+2012-03-09 Andrew Pinski <apinski@cavium.com>
+
+ PR middle-end/51988
+ * gcc.dg/tree-ssa/phi-opt-8.c: New testcase.
+ * gcc.dg/tree-ssa/phi-opt-9.c: New testcase.
+
+2012-03-09 Jiangning Liu <jiangning.liu@arm.com>
+
+ * gcc.dg/tree-ssa/scev-3.c: New.
+ * gcc.dg/tree-ssa/scev-4.c: New.
+
+2012-03-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52469
+ * gfortran.dg/proc_ptr_34.f90
+
+2012-03-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/52521
+ * g++.dg/cpp0x/udlit-mangle.C: New.
+
+2012-03-06 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.dg/torture/va-arg-25.c: Fix typo for powerpc64-*-* check.
+
+2012-03-06 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52493
+ * gcc.dg/torture/pr52493.c: New testcase.
+
+2012-03-06 Richard Guenther <rguenther@suse.de>
+
+ PR lto/52097
+ * gcc.dg/lto/pr52097_0.c: New testcase.
+
+2012-03-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.target/sh/pr51244-1.c: New.
+ * gcc.target/sh/pr51244-2.c: New.
+ * gcc.target/sh/pr51244-3.c: New.
+
+2012-03-05 Jason Merrill <jason@redhat.com>
+
+ PR c++/51930
+ * g++.dg/ext/visibility/template11.C: New.
+
+ * g++.dg/cpp0x/implicit13.C: New.
+
+2012-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51721
+ * gcc.dg/tree-ssa/vrp63.c: New test.
+ * gcc.dg/pr51721.c: New test.
+
+2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/50981
+ * gfortran.dg/elemental_optional_args_5.f03: Add subcomponent actual
+ argument checks.
+
+2012-03-04 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/52146
+ * gcc.target/i386/pr52146.c: Update final-scan to allow $-18874240.
+
+2012-03-04 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/50981
+ * gfortran.dg/elemental_optional_args_5.f03: Add array checks.
+
+2012-03-04 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/torture/pr52402.c: Add dg-require-effective-target
+ int32plus.
+
+2012-03-03 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/cpp0x/nsdmi-defer6.C: New.
+
+ Core 1270
+ * g++.dg/cpp0x/initlist65.C: New.
+
+ PR c++/36797
+ * g++.dg/ext/is_empty2.C: New.
+
+2012-03-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_type_3.f90: Undo previous commit.
+
+2012-03-03 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/bind_c_dts_4.f03: Add dg-options -Wc-binding-type.
+ * gfortran.dg/bind_c_implicit_vars.f03: Ditto.
+ * gfortran.dg/bind_c_usage_8.f03: Ditto.
+ * gfortran.dg/c_kind_tests_2.f03: Ditto.
+ * gfortran.dg/class_30.f90: Remove dg-warning line.
+ * gfortran.dg/bind_c_usage_25.f90: New.
+
+2012-03-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_type_1.f90: Correct dg-error.
+ * gfortran.dg/assumed_type_3.f90: Correct dg-error.
+ * gfortran.dg/assumed_type_4.f90: Correct dg-error.
+
+2012-03-03 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48820
+ * gfortran.dg/assumed_type_1.f90: New.
+ * gfortran.dg/assumed_type_2.f90: New.
+ * gfortran.dg/assumed_type_3.f90: New.
+ * gfortran.dg/assumed_type_4.f90: New.
+
+2012-03-02 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49486
+ * gcc.target/sh/pr49468-si.c: Skip unsupported test for SH64.
+ * gcc.target/sh/pr49468-di.c: New.
+
+2012-03-02 Maxim Kuvyrkov <maxim@codesourcery.com>
+
+ * gcc.dg/graphite/pr50561.c: Update.
+
+2012-03-02 Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/pr52457.c: New test.
+
+2012-03-02 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * gcc.target/arm/sat-1.c: New test.
+
+2012-03-02 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/46716
+ * gcc.target/i386/pr46716.c: New test.
+
+2012-03-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51989
+ * g++.dg/cpp0x/sfinae32.C: New.
+
+2012-03-02 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52406
+ * gcc.dg/torture/pr52406.c: New testcase.
+
+2012-03-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52325
+ * gfortran.dg/derived_comp_array_ref_8.f90: New.
+ * gfortran.dg/nullify_2.f90: Update dg-error.
+ * gfortran.dg/nullify_4.f90: Ditto.
+ * gfortran.dg/pointer_init_6.f90: Ditto.
+
+2012-03-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52270
+ * gfortran.dg/class_51.f90: New.
+
+2012-03-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52452
+ * gfortran.dg/intrinsic_8.f90: New.
+
+2012-03-01 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/torture/pr47917.c: Make test using POSIX-printf
+ routines on mingw targets.
+ * gcc.dg/vect/pr46126.c (uintptr_t): Add support for LLP64 target.
+
+2012-03-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52445
+ * gcc.dg/pr52445.c: New test.
+
+2012-02-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52437
+ * gcc.c-torture/compile/pr52437.c: New test.
+
+ PR middle-end/52419
+ * gcc.dg/torture/pr52419.c: New test.
+
+ PR tree-optimization/52429
+ * gcc.dg/torture/pr52429.c: New test.
+ * g++.dg/opt/pr52429.C: New test.
+
+2012-02-29 Richard Guenther <rguenther@suse.de>
+
+ PR testsuite/52297
+ * gcc.dg/lto/trans-mem-1_0.c: Remove.
+ * gcc.dg/lto/trans-mem-1_1.c: Likewise.
+ * gcc.dg/lto/trans-mem-2_0.c: Likewise.
+ * gcc.dg/lto/trans-mem-2_1.c: Likewise.
+ * gcc.dg/lto/trans-mem-4_0.c: Likewise.
+ * gcc.dg/lto/trans-mem-4_1.c: Likewise.
+
+2012-02-29 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/torture/pr52402.c: Add -w -Wno-psabi to dg-options.
+
+2012-02-29 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/52386
+ * gfortran.dg/realloc_on_assign_13.f90 : New test.
+
+2012-02-28 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ PR target/51534
+ * gcc.target/arm/neon/pr51534.c: New testcase.
+
+2012-02-28 Richard Guenther <rguenther@suse.de>
+
+ PR target/52407
+ * gcc.dg/torture/pr52407.c: New testcase.
+
+2012-02-28 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * gcc.target/arm/vfp1.c (dg_do run): Run on all eabi variants.
+ * gcc.target/arm/vfp2.c: Likewise.
+ * gcc.target/arm/vfp3.c: Likewise.
+ * gcc.target/arm/vfp4.c: Likewise.
+ * gcc.target/arm/vfp5.c: Likewise.
+ * gcc.target/arm/vfp6.c: Likewise.
+ * gcc.target/arm/vfp7.c: Likewise.
+ * gcc.target/arm/vfp8.c: Likewise.
+ * gcc.target/arm/vfp9.c: Likewise.
+ * gcc.target/arm/vfp10.c: Likewise.
+ * gcc.target/arm/vfp11.c: Likewise.
+ * gcc.target/arm/vfp12.c: Likewise.
+ * gcc.target/arm/vfp13.c: Likewise.
+ * gcc.target/arm/vfp14.c: Likewise.
+ * gcc.target/arm/vfp15.c: Likewise.
+ * gcc.target/arm/vfp16.c: Likewise.
+ * gcc.target/arm/vfp17.c: Likewise.
+ * gcc.target/arm/neon-constants.h: New file.
+ * gcc.target/arm/neon-vect1.c: New test.
+ * gcc.target/arm/neon-vect2.c: New test.
+ * gcc.target/arm/neon-vect3.c: New test.
+ * gcc.target/arm/neon-vect4.c: New test.
+ * gcc.target/arm/neon-vect5.c: New test.
+ * gcc.target/arm/neon-vect6.c: New test.
+ * gcc.target/arm/neon-vect7.c: New test.
+ * gcc.target/arm/neon-vect8.c: New test.
+
+2012-02-28 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52402
+ * gcc.dg/torture/pr52402.c: New testcase.
+
+2012-02-28 Richard Guenther <rguenther@suse.de>
+
+ PR lto/52400
+ * g++.dg/lto/pr52400_0.C: New testcase.
+
+2012-02-28 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.target/avr/torture/builtins-1.c: New test.
+ * gcc.target/avr/torture/builtins-error.c: New test.
+
+2012-02-28 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.target/i386/pr46939.c (long): Fix LP64 vs LLP64 issue.
+ * gcc.target/i386/pr45352-2.c: Likewise.
+ * gcc.target/i386/bitfield3.c: Add -mno-ms-bitfields for mingw targets.
+ * gcc.target/i386/xop-vshift-1.c (random): Use on mingw
+ targets instead rand.
+ * gcc.target/i386/sse4_1-blendps-2.c: Likewise.
+ * gcc.target/i386/sse2-mul-1.c: Likewise.
+ * gcc.target/i386/sse4_1-blendps.c: Likewise.
+ * gcc.target/i386/pad-6b.c: Adjust test for x64 mingw target.
+ * gcc.target/i386/pad-1.c: Likewise.
+ * gcc.target/i386/pad-9.c: Likewise.
+ * gcc.target/i386/pad-2.c: Likewise.
+ * gcc.target/i386/pad-5b.c: Likewise.
+ * gcc.target/i386/pad-8.c: Likewise.
+ * gcc.target/i386/pr46470.c: Skip for x64 mingw target.
+ * gcc.target/i386/pr44130.c: Likewise.
+ * gcc.target/i386/align-main-1.c: Likewise.
+ * gcc.target/i386/align-main-2.c: Likewise.
+ * gcc.target/i386/sw-1.c: Likewise.
+ * gcc.target/i386/avx-vzeroupper-5.c: Add -mabi=sysv
+ on x64 mingw target.
+ * gcc.target/i386/avx-vzeroupper-4.c: Likewise.
+ * gcc.target/i386/pr46295.c: Likewise.
+ * gcc.target/i386/amd64-abi-1.c: Likewise.
+ * gcc.target/i386/amd64-abi-2.c: Likewise.
+ * gcc.target/i386/pr39082-1.c: Likewise.
+ * gcc.target/i386/pr39162.c: Likewise.
+ * gcc.target/i386/pr22152.c: Likewise.
+ * gcc.target/i386/wrgsbase-2.c: Adjust dg-final rule.
+ * gcc.target/i386/wrfsbase-2.c: Likewise.
+ * gcc.target/i386/local.c: Likewise
+ * gcc.target/i386/wrgsbase-1.c: Likewise.
+ * gcc.target/i386/wrfsbase-1.c: Likewise.
+ * gcc.target/i386/pr39315-3.c: Likewise.
+ * gcc.target/i386/pr35767-4.c: Likewise.
+ * gcc.target/i386/pr45336-3.c (pextrd): Don't check for
+ x64 mingw target.
+ * gcc.target/i386/pr45336-2.c: Likewise.
+ * gcc.target/i386/pr45336-1.c: Likewise.
+ * gcc.target/i386/pr45336-4.c: Likewise.
+
+2012-02-27 Tristan Gingold <gingold@adacore.com>
+
+ * gnat.dg/array20.ad[sb]: New test.
+
+2012-02-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52375
+ * gcc.target/arm/pr52375.c: New test.
+ * gcc.c-torture/compile/pr52375.c: New test.
+
+2012-02-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gfortran.dg/typebound_operator_9.f03: Skip on SPU.
+ * gcc.dg/torture/builtin-complex-1.c: Skip "float" tests on SPU.
+
+2012-02-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/aggr19.adb: New test.
+ * gnat.dg/aggr19_pkg.ad[sb]: New helper.
+
+2012-02-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49263
+ * gcc.target/sh/pr49263.c: New.
+
+2012-02-24 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/simulate-thread/simulate-thread.gdb: Use return value from
+ simulate_thread_wrapper_other_threads
+ * gcc.dg/simulate-thread/atomic-load-int128.c (simulate_thread_main):
+ Move initialization of 'value' to main().
+ (main): Initialize 'value';
+ * gcc.dg/simulate-thread/speculative-store.c
+ (simulate_thread_step_verify): Return 0 when successful.
+ * gcc.dg/simulate-thread/simulate-thread.h (HOSTILE_THREAD_THRESHOLD):
+ Reduce threshold.
+ (INSN_COUNT_THRESHOLD): New. Instruction limit to terminate test.
+ (simulate_thread_wrapper_other_threads): Return a success/fail value
+ and issue an error if the instruction count threshold is exceeded.
+
+2012-02-24 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/50580
+ * gcc.target/mips/interrupt_handler-2.c: Skip on mips-sgi-irix6*.
+ * gcc.target/mips/interrupt_handler-3.c: Likewise.
+
+2012-02-24 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/52355
+ * gcc.dg/pr52355.c: New testcase.
+
+2012-02-23 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/pack-test-5.c: Add -mno-ms-bitfields option for mingw-targets.
+ * gcc.dg/Wpadded.c: Likewise.
+ * gcc.dg/bf-ms-layout-2.c: Adjust offsets to fit ms-bitfield
+ structure-layout.
+ * gcc.dg/di-sync-multithread.c: Replace for mingw-target the use
+ for sleep by Sleep and add windows.h include for this function.
+ * gcc.dg/format/dfp-printf-1.c: Adjust dg-skip-if rule for mingw
+ targets.
+ * gcc.dg/stack-usage-1.c (SIZE): Provide proper SIZE for x64 mingw
+ target.
+ * gcc.dg/tls/thr-cse-1.c: Provide proper pattern for x64 mingw target.
+ * gcc.dg/tls/opt-11.c (memset): Use __extension__ to avoid fail
+ on x64 mingw target.
+ * gcc.dg/bf-ms-attrib.c: Adjust expected size for ms_struct layout.
+ * gcc.dg/pr50251.c: Disable test for x64 mingw target.
+ * gcc.c-torture/execute/930930-1.c (long): Replace by ptr_t to avoid
+ failure on LLP64 target.
+
+2012-02-23 Uros Bizjak <ubizjak@gmail.com>
+
+ PR c/52290
+ * gcc.dg/noncompile/pr52290.c: New test.
+
+2012-02-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52019
+ * gcc.dg/tree-ssa/ipa-split-6.c: New test.
+
+2012-02-22 Kai Tietz <ktietz@redhat.com>
+
+ * g++.dg/opt/devirt2.C: Add rule for *-*-mingw* target.
+ * g++.dg/opt/pr48549.C (long): Replace by long by __PTRDIFF_TYPE__
+ derived pdiff_t type.
+ * g++.dg/torture/pr49720.C: Likewise
+
+2012-02-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/52330
+ * gcc.target/i386/pr52330.c: New test.
+
+2012-02-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52335
+ * gfortran.dg/io_constraints_10.f90: New.
+
+2012-02-22 Ulrich Weigand <ulrich.weigand@linaro.org>
+
+ * lib/target-supports.exp (check_effective_target_vect_condition):
+ Return true for NEON.
+
+2012-02-21 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/bf-ms-layout-3.c: Mark char typed bitfield as extension.
+
+2012-02-21 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52324
+ * gcc.dg/tree-ssa/ssa-lim-10.c: New testcase.
+
+2012-02-21 Georg-Johann Lay <avr@gjlay.de>
+
+ PR middle-end/51782
+ * gcc.target/avr/torture/pr51782-1.c: New test.
+
+2012-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52318
+ * gcc.dg/pr52318.c: New test.
+
+2012-02-20 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/bf-ms-layout-3.c: New testcase.
+
+2012-02-20 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR testsuite/52229
+ PR fortran/32380
+ * gfortran.dg/vect/pr32380.f: XFAIL on PowerPC and ia-64.
+
+2012-02-20 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52298
+ * gcc.dg/torture/pr52298.c: New testcase.
+ * gcc.dg/vect/pr52298.c: Likewise.
+
+2012-02-20 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/pr52132.c: Fix FAIL on 16-bit int platforms.
+ * gcc.c-torture/execute/pr52286.c: Ditto.
+
+2012-02-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52286
+ * gcc.c-torture/execute/pr52286.c: New test.
+
+2012-02-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52295
+ * gfortran.dg/interface_35.f90: Use -std=f2003.
+ * gfortran.dg/proc_ptr_comp_20.f90: Remove dg-warning.
+ * gfortran.dg/interface_assignment_4.f90: Ditto.
+ * gfortran.dg/bessel_1.f90: Ditto.
+ * gfortran.dg/func_result_6.f90: Ditto.
+ * gfortran.dg/hypot_1.f90: Ditto.
+ * gfortran.dg/proc_ptr_comp_21.f90: Ditto.
+
+2012-02-17 Tobias Burnus <burnus@net-b.de>
+
+ PR translation/52232
+ PR translation/52234
+ PR translation/52245
+ PR translation/52246
+ PR translation/52262
+ PR translation/52273
+ * gfortran.dg/coarray_22.f90: Update dg-error.
+ * gfortran.dg/allocate_alloc_opt_4.f90: Ditto.
+
+2012-02-17 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/51753
+ * lib/gcc-simulate-thread.exp: Load timeout.exp.
+ (simulate-thread): Use default timeout.
+
+2012-02-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/52248
+ * g++.dg/ext/timevar1.C: New.
+
+2012-02-16 Fabien Chêne <fabien@gcc.gnu.org>
+
+ PR c++/52126
+ * g++.dg/template/using21.C: New.
+ * g++.dg/template/using22.C: Likewise.
+
+2012-02-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51415
+ * g++.dg/cpp0x/lambda/lambda-err1.C: New.
+
+2012-02-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52255
+ * gcc.c-torture/compile/pr52255.c: New test.
+
+ PR debug/52260
+ * g++.dg/debug/dwarf2/pr52260.C: New test.
+
+ PR middle-end/51929
+ * g++.dg/ipa/pr51929.C: New test.
+
+2012-02-15 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/52199
+ * gcc.target/powerpc/pr52199.c: New file.
+
+2012-02-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR target/52152
+ * objc.dg/stabs-1.m: xfail on mips-sgi-irix6.5.
+
+2012-02-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/pr51867.c: Don't include <math.h>.
+ (sqrtf): Declare.
+
+2012-02-15 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/lto/20091013-1_1.c: xfail for avr.
+ * gcc.dg/lto/20091013-1_2.c: xfail for avr.
+
+2012-02-15 Tobias Grosser <grosser@fim.uni-passau.de>
+
+ PR tree-optimization/50561
+ * gcc.dg/graphite/pr50561.c: New testcase.
+
+2012-02-15 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.target/avr/torture/builtin_insert_bits-1.c: New test.
+ * gcc.target/avr/torture/builtin_insert_bits-2.c: New test.
+
+2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr35.ad[sb]: New test.
+
+2012-02-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/volatile10.adb: New test.
+ * gnat.dg/volatile10_pkg.ads: New helper.
+
+2012-02-14 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/ext/attrib43.C: New.
+
+2012-02-14 Hans-Peter Nilsson <hp@axis.com>
+
+ * lib/target-supports.exp (check_effective_target_fgnu_tm): New proc.
+ * gfortran.dg/trans-mem-skel.f90: Gate test on effective_target
+ fgnu_tm.
+ * gcc.dg/lto/trans-mem-1_0.c, gcc.dg/lto/trans-mem-2_0.c,
+ gcc.dg/lto/trans-mem-3_0.c, gcc.dg/lto/trans-mem-4_0.c: Ditto.
+ * gcc.dg/tm/tm.exp: Gate the whole of gcc.dg/tm on
+ effective_target fgnu_tm.
+ * g++.dg/tm/tm.exp: Ditto for g++.dg/tm.
+
+2012-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52247
+ * g++.dg/template/asmgoto1.C: New test.
+
+2012-02-14 Ian Lance Taylor <iant@google.com>
+
+ PR go/48501
+ * go.test/go-test.exp (go-gc-tests): Disable optimizations when
+ compiling generated file for 64bit and index tests.
+
+2012-02-14 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/lower-subreg-1.c: Fix and simplify target selector.
+
+2012-02-14 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52244
+ PR tree-optimization/51528
+ * gcc.dg/torture/pr52244.c: New testcase.
+
+2012-02-14 Walter Lee <walt@tilera.com>
+
+ * g++.dg/other/PR23205.C: Disable test on tile.
+ * g++.dg/other/pr23205-2.C: Disable test on tile.
+ * gcc.dg/20020312-2.c: Add a condition for __tile__.
+ * gcc.dg/20040813-1.c: Disable test on tile.
+ * gcc.dg/lower-subreg-1.c: Disable test on tilegx.
+ * gcc.misc-tests/linkage.exp: Handle tilegx.
+
+2012-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/52210
+ * gcc.dg/pr52210.c: New test.
+
+2012-02-14 Jason Merrill <jason@redhat.com>
+
+ PR c++/39055
+ * g++.dg/overload/defarg5.C: New.
+
+2012-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/52181
+ * c-c++-common/pr52181.c: New test.
+
+2012-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/52215
+ * g++.dg/ext/atomic-1.C: New test.
+
+2012-02-13 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.c-torture/execute/pr51933.c: Modify for s390 31 bit.
+
+2012-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/52209
+ * gcc.c-torture/execute/pr52209.c: New test.
+
+2012-02-12 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/50981
+ * gfortran.dg/elemental_optional_args_5.f03: New test.
+
+2012-02-12 Iain Sandoe <iains@gcc.gnu.org>
+
+ PR testsuite/50076
+ * c-c++-common/cxxbitfields-3.c: Adjust scan assembler for nonpic
+ cases.
+
+2012-02-11 Ian Lance Taylor <iant@google.com>
+
+ PR go/51874
+ * go.test/go-test.exp (go-gc-tests): Don't run nilptr test on
+ SPARC Solaris. Don't run the test at all on systems where it may
+ not work, rather than xfailing it.
+
+2012-02-11 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR rtl-optimization/52175
+ * gcc.c-torture/compile/pr52175.c: New test.
+
+2012-02-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/51910
+ * g++.dg/template/repo10.C: New.
+
+2012-02-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/52132
+ * gcc.dg/pr52132.c: New test.
+
+2012-02-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/aggr4.ads: New test.
+ * gnat.dg/specs/aggr4_pkg.ads: New helper.
+
+2012-02-10 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/52146
+ * gcc.target/i386/pr52146.c: New.
+
+2012-02-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/52177
+ * c-c++-common/pr52177.c: New test.
+
+2012-02-10 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/48600
+ * g++.dg/torture/pr48600.C: New testcase.
+
+2012-02-09 Peter Bergner <bergner@vnet.ibm.com>
+
+ PR middle-end/52140
+ * gcc.dg/dfp/pr52140.c: New test.
+
+2012-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/32380
+ * gfortran.dg/vect/pr32380.f: Use dg-additional-options instead
+ of dg-options.
+
+2012-02-09 Bin Cheng <bin.cheng@arm.com>
+
+ PR middle-end/51867
+ * c-c++-common/dfp/signbit-2.c: Change '-O0' to '-O1'.
+ * gcc.dg/pr51867.c: New test.
+
+2012-02-09 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-gc-tests): Don't run stack.go on systems
+ which don't support -fsplit-stack. Turn off optimization when
+ compiling select5-out.go.
+
+2012-02-08 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-gc-tests): Don't run chan/select2.go on
+ systems which don't support -fsplit-stack.
+
+2012-02-08 Andrew MacLeod <amacleod@redhat.com>
+
+ * gcc.dg/simulate-thread/simulate-thread.exp: Use -O0, -O2, and -O3.
+ * gcc.dg/simulate-thread/simulate-thread.gdb: Don't display every
+ machine instuction in the log.
+
+2012-02-08 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ * lib/gcc-simulate-thread.exp (simulate-thread): Increase timeout
+ to 20 seconds.
+
+2012-02-08 Magnus Granberg <zorry@gentoo.org>
+
+ PR driver/48524
+ * gcc.dg/pr48524.c: New test.
+ * gcc.dg/pr48524.spec: New spec file for test.
+
+2012-02-08 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/32380
+ * gfortran.dg/vect/pr32380.f90: New test.
+
+2012-02-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52151
+ * gfortran.dg/realloc_on_assign_12.f90: New.
+
+2012-02-08 Richard Guenther <rguenther@suse.de>
+
+ PR rtl-optimization/52170
+ * gcc.dg/torture/pr52170.c: New testcase.
+
+2012-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR gcov-profile/52150
+ * gcc.dg/tree-prof/pr52150.c: New test.
+
+ PR rtl-optimization/52139
+ * gcc.dg/pr52139.c: New test.
+
+2012-02-07 Jason Merrill <jason@redhat.com>
+
+ PR c++/51675
+ * g++.dg/cpp0x/constexpr-union3.C: New.
+
+ PR c++/52035
+ * g++.dg/lto/pr52035_0.C: New.
+
+2012-02-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gfortran.dg/guality/pr41558.f90: Use lp64 instead of hppa*64*-*-*.
+ * gcc.dg/special/weak-1.c: Likewise.
+ * gcc.dg/ucnid-12.c: Likewise.
+ * gcc.dg/torture/pr45678-1.c: Likewise.
+ * gcc.dg/torture/pr45678-2.c: Likewise.
+ * gcc.dg/vector-4.c: Likewise.
+ * gcc.dg/ipa/inline-5.c: Likewise.
+ * gcc.dg/ucnid-11.c: Likewise.
+ * gcc.misc-tests/gcov-13.c: Likewise.
+ * gcc.misc-tests/gcov-14.c: Likewise.
+ * g++.dg/ext/label13.C: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-31.c: Use dg-additional-options for extra
+ hppa*-*-hpux* options.
+ * gcc.dg/tree-ssa/ssa-fre-33.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-fre-34.c: Likewise.
+ * gcc.dg/pr48616.c: Likewise.
+ * gcc.dg/pr17957.c: Likewise.
+ * gcc.dg/pr17055-1.c: Likewise.
+ * gcc.dg/pr32912-1.c: Likewise.
+ * gcc.dg/tm/pr51472.c: Likewise.
+ * c-c++-common/fold-bitand-4.c: Likewise.
+ * c-c++-common/Wunused-var-12.c: Use lp64 instead of hppa*64*-*-*.
+ Use dg-additional-options for extra options.
+
+2012-02-07 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/epiphany/interrupt-2.c: New test.
+
+2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/52155
+ * gcc.target/mips/mips.exp (mips-dg-options): Handle target.
+ * gcc.target/mips/loongson-shift-count-truncated-1.c: Force -mlong64
+ for MIPS ELF.
+
+2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/52152
+ * objc.dg/stabs-1.m: XFAIL for mips*-*-elf*.
+
+2012-02-07 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR middle-end/24306
+ PR target/52154
+ * lib/target-supports.exp (check_effective_target_mips_eabi): New.
+ * gcc.target/mips/va-arg-1.c: New test.
+
+2012-02-07 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/no-r11-3.c (outer_func): Fix error message
+ for -mno-pointers-to-nested-functions.
+
+2012-02-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20120207-1.c: New test.
+
+2012-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/52060
+ * gcc.dg/torture/pr52060.c: New test.
+
+ PR middle-end/52074
+ * gcc.c-torture/compile/pr52074.c: New test.
+
+2012-02-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51514
+ * gfortran.dg/class_to_type_2.f90: New.
+
+2012-02-06 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/32373
+ * gfortran.dg/vect/vect-8.f90: Use vect_double effective target.
+ Remove module.
+
+2012-02-06 Jason Merrill <jason@redhat.com>
+
+ PR c++/52088
+ * g++.dg/template/conv13.C: New.
+
+2012-02-06 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52115
+ * gcc.c-torture/compile/pr52115.c: New testcase.
+
+2012-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52129
+ * gcc.c-torture/execute/pr52129.c: New test.
+
+2012-02-06 Andrey Belevantsev <abel@ispras.ru>
+
+ * gcc.dg/pr48374.c: Actually add the test I forgot
+ in the 2012-01-25 commit.
+
+2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/32373
+ * gfortran.dg/vect/vect-8.f90: New test case.
+
+2012-02-05 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/48847
+ * gfortran.dg/warn_unused_dummy_argument_3.f90: New test.
+
+2012-02-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/52102
+ * gfortran.dg/class_48.f90 : Add test of allocate class array
+ component with source in subroutine test3. Remove commenting
+ out in subroutine test4, since branching on unitialized variable
+ is now fixed (no PR for this last.).
+
+2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/tree-prof/stringop-2.c (main): Add a nomips16 attribute
+ on MIPS targets.
+ * gfortran.dg/pr45636.f90: XFAIL for MIPS16 targets.
+
+2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/52125
+ * lib/target-supports.exp (check_effective_target_mips_rel): New.
+ * gcc.dg/pr48774.c: Skip on MIPS REL targets.
+
+2012-02-05 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * lib/target-supports.exp (check_effective_target_mips_llsc): New.
+ (check_effective_target_sync_int_long): Use it.
+ (check_effective_target_sync_char_short): Likewise.
+ * gcc.target/mips/atomic-memory-1.c: Restrict error check to mips_llsc.
+
+2012-02-05 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51972
+ * gfortran.dg/class_48.f90: Add some further checks.
+
+2012-02-05 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/52091
+ * gcc.dg/vect/pr52091.c: New test.
+
+2012-02-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/52113
+ * gcc.target/avr/pr52113.c: New test.
+
+2012-02-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/52092
+ * gcc.c-torture/compile/pr52092.c: New test.
+
+2012-02-02 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/41587
+ * gfortran.dg/class_array_10.f03: New test.
+
+ PR fortran/46356
+ * gfortran.dg/class_array_11.f03: New test.
+
+ PR fortran/51754
+ * gfortran.dg/class_array_12.f03: New test.
+
+2012-02-02 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/52012
+ * gfortran.dg/realloc_on_assign_11.f90: New test.
+
+2012-02-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52093
+ * gfortran.dg/shape_7.f90: New.
+
+2012-02-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips-prepend-1.c: New test.
+
+2012-02-02 Jan Hubicka <jh@suse.cz>
+ Tom de Vries <tom@codesourcery.com>
+
+ PR middle-end/51998
+ * gcc.dg/alias-12.c: New testcase.
+ * gcc.dg/alias-13.c: New testcase.
+
+2012-02-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52086
+ * gcc.dg/pr52086.c: New test.
+
+ PR tree-optimization/52073
+ * gcc.c-torture/compile/pr52073.c: New test.
+
+2012-02-01 Thomas König <tkoenig@gcc.gnu.org>
+
+ PR fortran/51958
+ * gfortran.dg/function_optimize_10.f90: New test.
+
+2012-02-01 Uros Bizjak <ubizjak@gmail.com>
+
+ * go.test/go-test.exp (go-gc-tests): xfail test/nilptr.go runtime
+ test on alpha*-*-*.
+
+2012-02-01 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52024
+ * gfortran.dg/typebound_operator_14.f90: New.
+
+2012-02-01 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52059
+ * gfortran.dg/elemental_function_1.f90: New.
+
+2012-02-01 Georg-Johann Lay <avr@gjlay.de>
+
+ PR rtl-optimization/51374
+ * gcc.target/avr/torture/pr51374-1.c:
+ Also fail if SBIS is seen.
+
+2012-02-01 Georg-Johann Lay <avr@gjlay.de>
+
+ PR rtl-optimization/51374
+ * gcc.target/avr/torture/pr51374-1.c: New.
+
+2012-01-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52024
+ * gfortran.dg/typebound_generic_11.f90: New.
+
+2012-01-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52029
+ * gfortran.dg/class_49.f90: New.
+
+2012-01-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52013
+ * gfortran.dg/elemental_args_check_6.f90: New.
+
+2012-01-31 Jason Merrill <jason@redhat.com>
+
+ PR c++/52043
+ * g++.dg/cpp0x/variadic122.C: New.
+
+2012-01-31 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/52012
+ * gfortran.dg/realloc_on_assign_10.f90: New test.
+
+2012-01-31 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51528
+ * gcc.dg/torture/pr51528.c: New testcase.
+
+2012-01-30 Uros Bizjak <ubizjak@gmail.com>
+
+ PR go/48501
+ * lib/go.exp (go_target_compile): Append timeout= to options.
+ * go.test/go-test.exp (go-gc-tests): Add dg-timeout-factor for
+ select5-out.go test on alpha*-*-* targets.
+
+2012-01-30 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/extend-1.c (TEST_CHAR): Use signed char.
+ (TEST_SHORT): Reformat in the same way.
+ * gcc.target/mips/octeon-exts-6.c (TEST_CHAR): Use signed char.
+ (TEST_SHORT): Reformat in the same way.
+ * gcc.target/mips/octeon2-lx-1.c (TEST): Make sign explicit.
+ * gcc.target/mips/pr37362.c: Skip for mips-sde-elf.
+ * gcc.target/mips/mmcount-ra-address-1.c (bazl): Add NOMIPS16.
+ * gcc.target/mips/mmcount-ra-address-2.c (bar): Likewise.
+ * gcc.target/mips/mmcount-ra-address-3.c (bar): Likewise.
+
+2012-01-30 Bin Cheng <bin.cheng@arm.com>
+
+ PR target/51835
+ * gcc.target/arm/pr51835.c: New testcase.
+
+2012-01-30 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52028
+ * gcc.dg/torture/pr52028.c: New testcase.
+ * gfortran.dg/ldist-pr45199.f: Adjust.
+ * gcc.dg/tree-ssa/ldist-16.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-17.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
+
+2012-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/52027
+ * gcc.dg/tree-prof/pr52027.c: New test.
+
+ PR tree-optimization/52046
+ * gcc.dg/pr52046.c: New test.
+
+ PR debug/52048
+ * g++.dg/other/pr52048.C: New test.
+
+2012-01-30 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/52045
+ * gcc.dg/pr52045.c: New testcase.
+
+2012-01-30 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/di-longlong64-sync-withldrexd.c: Accept
+ new code generated for __sync_lock_release.
+
+2012-01-30 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/dfp/fe-convert-2.c: Force use of soft dfp on s390 and s390x.
+
+2012-01-29 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR testsuite/51875
+ * gfortran.dg/guality/pr41558.f90: Skip on 32-bit hppa*-*-hpux*.
+
+ * g++.dg/ext/visibility/template10.C: Fix typo.
+
+ * gcc.dg/tm/pr51472.c: Add -fno-common option on hppa-*-hpux*.
+
+2012-01-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51327
+ * g++.dg/cpp0x/constexpr-ice6.C: New.
+
+2012-01-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/41600
+ * gfortran.dg/default_initialization_6.f90: New.
+
+2012-01-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51972
+ * gfortran.dg/class_allocate_12.f90: Enable disabled test.
+ * gfortran.dg/class_48.f90: New.
+
+2012-01-29 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/51808
+ * gfortran.dg/module_md5_1.f90: Update MD5 sum.
+
+2012-01-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51972
+ * gfortran.dg/class_allocate_12.f90: New.
+
+2012-01-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/torture/pr50444.c: Fix dg directives.
+
+2012-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/52006
+ * gcc.target/arm/pr52006.c: New test.
+
+2012-01-27 Aldy Hernandez <aldyh@redhat.com>
+
+ PR testsuite/52011
+ * gcc.dg/lto/trans-mem.h: New file.
+ * gcc.dg/lto/trans-mem-2_0.c: Include it.
+ * gcc.dg/lto/trans-mem-1_1.c: Same.
+ * gcc.dg/lto/trans-mem-4_1.c: Same.
+ * gcc.dg/lto/trans-mem-3_1.c: Same.
+
+2012-01-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52022
+ * gfortran.dg/dummy_procedure_7.f90: New.
+
+2012-01-27 Andreas Schwab <schwab@linux-m68k.org>
+
+ * g++.dg/cpp0x/constexpr-rom.C: Don't add -G0 on *-*-darwin*
+ *-*-aix* alpha*-*-osf* alpha*-*-*vms*.
+
+2012-01-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51852
+ * g++.dg/other/gc5.C: New test.
+
+2012-01-27 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50444
+ * gcc.dg/torture/pr50444.c: New testcase.
+
+2012-01-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51970
+ PR fortran/51977
+ * gfortran.dg/move_alloc_13.f90: New.
+
+2012-01-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51953
+ * gfortran.dg/allocate_alloc_opt_13.f90: New.
+ * gfortran.dg/allocate_alloc_opt_4.f90: Add -std=f2003
+ and change dg-error string.
+
+2012-01-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/52016
+ * gfortran.dg/elemental_args_check_5.f90: New.
+
+2012-01-27 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/51959
+ * g++.dg/torture/pr51959.C: New testcase.
+
+2012-01-27 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/51990
+ * gcc.dg/pr51990.c: New test.
+ * gcc.dg/pr51990-2.c: Same.
+
+2012-01-27 Paul Thomas <pault@gcc.gnu.org>
+ Tobias Burnus <burnus@gcc.gnu.org>
+
+ PR fortran/48705
+ * gfortran.dg/class_allocate_11.f03: New.
+
+ PR fortran/51870
+ PR fortran/51943
+ PR fortran/51946
+ * gfortran.dg/class_allocate_7.f03: New.
+ * gfortran.dg/class_allocate_8.f03: New.
+ * gfortran.dg/class_allocate_9.f03: New.
+ * gfortran.dg/class_allocate_10.f03: New.
+
+2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr34.adb: New test.
+ * gnat.dg/discr34_pkg.ads: New helper.
+
+2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr33.adb: New test.
+
+2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/limited_with3.ad[sb): New test.
+ * gnat.dg/limited_with3_pkg1.ad[sb]: New helper.
+ * gnat.dg/limited_with3_pkg2.ads: Likewise.
+ * gnat.dg/limited_with3_pkg3.ads: Likewise.
+
+2012-01-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/stack_usage1.adb: New test.
+ * gnat.dg/stack_usage1_pkg.ad[sb]: New helper.
+
+ * gcc.dg/pr44194-1.c: Remove superfluous include directive.
+ * gcc.dg/pr44194-2.c: Likewise.
+
+2012-01-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51370
+ * g++.dg/template/crash112.C: New.
+
+2012-01-27 Richard Henderson <rth@redhat.com>
+
+ * gcc.dg/atomic-flag.c: Adjust for __GCC_ATOMIC_TEST_AND_SET_TRUEVAL.
+
+2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gfortran.dg/reassoc_4.f: Use dg-additional-options.
+
+2012-01-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/51895
+ * g++.dg/opt/pr51895.C: New test.
+
+2012-01-26 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/48794
+ * gfortran.dg/gomp/pr48794-2.f90: New testcase.
+
+2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/ssa-dom-thread-4.c: Set -mbranch-cost=2 for s390 and s390x.
+
+2012-01-26 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.dg/pr46309.c: Set branch-cost to 2 for s390 and s390x.
+ * gcc.dg/pr44194-1.c: Disable since s390 returns structs always in
+ memory.
+ * gfortran.dg/reassoc_4.f: Force max-completely-peeled-insns to
+ the default value for s390 and s390x.
+
+2012-01-25 Aldy Hernandez <aldyh@redhat.com>
+
+ PR lto/51698
+ * gcc.dg/lto/trans-mem-4_0.c: New.
+ * gcc.dg/lto/trans-mem-4_1.c: New.
+ * gcc.dg/lto/trans-mem-2_0.c: Provide correct argument types for
+ TM builtins.
+ * gcc.dg/lto/trans-mem-1_0.c: Require stdint_types.
+ * gcc.dg/lto/trans-mem-1_1.c: Provide correct argument types for
+ TM builtins.
+ * gcc.dg/lto/trans-mem-3_0.c: Require stdint_types.
+ * gcc.dg/lto/trans-mem-3_1.c: Provide correct argument types for
+ TM builtins.
+
+2012-01-25 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.target/avr/torture/int24-mul.c: Rename __pgm to __flash.
+
+2012-01-25 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-gc-tests): Handle a few more test lines.
+
+2012-01-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51995
+ * gfortran.dg/typebound_proc_25.f90: New.
+
+2012-01-25 Jason Merrill <jason@redhat.com>
+
+ PR c++/51992
+ * g++.dg/lto/pr51992_0.C: New.
+
+2012-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51987
+ * gcc.target/i386/pr51987.c: New test.
+
+2012-01-25 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/tm/lto-1.c: Require lto support in target.
+
+2012-01-25 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/48374
+ * gcc.dg/pr48374.c: New test.
+
+2012-01-25 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/pr50908-2.c (dg-options): Add -fno-short-enums.
+
+2012-01-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51966
+ * gfortran.dg/derived_constructor_char_3.f90: New.
+
+2012-01-24 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (filecmp): New procedure.
+ (errchk): Handle quoted square brackets.
+ (go-gc-tests): Set go_compile_args. Handle various new test
+ lines. Skip a few new tests.
+ * lib/go-torture.exp (go-torture-execute): Use go_compile_args.
+
+2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * lib/target-supports.exp (proc check_effective_target_vect_perm)
+ (check_effective_target_vect_extract_even_odd)
+ (check_effective_target_vect_interleave): Return true for MIPS
+ paired-single.
+
+2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.c-torture/execute/scal-to-vec1.c (one): New volatile variable.
+ (main): Use it instead of argc.
+
+2012-01-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/51973
+ * g++.dg/cpp0x/sfinae31.C: New.
+
+2012-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/memcpy-4.c: Don't expect /s on MEMs.
+
+2012-01-24 Jason Merrill <jason@redhat.com>
+
+ PR c++/51812
+ * g++.dg/inherit/covariant20.C: New.
+
+2012-01-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51223
+ * g++.dg/parse/crash58.C: New.
+
+2012-01-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/51957
+ * gcc.dg/pr51957-1.c: New test.
+ * gcc.dg/pr51957-1.h: New file.
+ * gcc.dg/pr51957-2.c: New test.
+
+2012-01-23 Jason Merrill <jason@redhat.com>
+
+ PR c++/51930
+ * g++.dg/ext/visibility/template10.C: New.
+
+2012-01-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51948
+ * gfortran.dg/move_alloc_12.f90: New.
+
+2012-01-23 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ PR middle-end/45416
+ * gcc.dg/pr45416.c: Skip for Thumb1. Handle ubfx.
+
+2012-01-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51398
+ * g++.dg/template/crash111.C: New.
+
+2012-01-23 Arnaud Charlet <charlet@adacore.com>
+
+ * ada/acats/tests/cxh/cxh1001.a: Removed, test not suitable on all
+ configurations.
+ * ada/acats/run_all.sh: Simplify by removing cxh1001 special case.
+
+2012-01-23 Dodji Seketeli <dodji@redhat.com>
+
+ PR testsuite/51941
+ * g++.dg/debug/dwarf2/nested-3.C: Accept multiple lines between
+ the DW_TAG_class_type and DW_AT_name: "Executor".
+
+2012-01-23 Ramana Radhakrishnan <ramana.radhakrishnan@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_extract_even_odd): Handle ARM neon.
+ (check_effective_target_vect_interleave): Likewise.
+
+2012-01-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/51925
+ * g++.dg/template/using20.C: New.
+ * g++.dg/template/template-id-2.C: Adjust diagnostic.
+
+2012-01-23 Jason Merrill <jason@redhat.com>
+
+ PR target/51934
+ * g++.dg/torture/pr51344.C: Limit to x86.
+
+2012-01-23 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * c-c++-common/tm/omp.c: Require target with pthread support.
+
+2012-01-23 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51949
+ * gcc.dg/torture/pr51949.c: New testcase.
+
+2012-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/51933
+ * gcc.c-torture/execute/pr51933.c: New test.
+
+2012-01-22 Douglas B Rupp <rupp@gnat.com>
+
+ * gcc.dg/builtins-config.h (HAVE_C99_RUNTIME):
+ Do not define for Interix.
+
+2012-01-22 Jason Merrill <jason@redhat.com>
+
+ PR c++/51832
+ * g++.dg/lto/pr51832.h: New.
+ * g++.dg/lto/pr51832_0.C: New.
+ * g++.dg/lto/pr51832_1.C: New.
+
+2012-01-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/ext-elim-1.c: New test.
+
+2012-01-22 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/51931
+ * gcc.c-torture/compile/20001226-1.c: Add nomips16 attribute.
+ * g++.dg/opt/longbranch1.C: Likewise.
+
+2012-01-22 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.old-deja/g++.pt/ptrmem6.C: xfail a test for ARM and MIPS
+ in C++11 mode.
+
+2012-01-21 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/50556
+ * gfortran.dg/namelist_74.f90: New test.
+ * gfortran.dg/namelist_59.f90: Remove SAVE attribute.
+
+2012-01-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51913
+ * gfortran.dg/class_47.f90: New.
+
+2012-01-21 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/renaming5.ad[sb]: New test.
+
+2012-01-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/51919
+ * g++.dg/pch/mangle1.{C,Hs}: Remove.
+
+2012-01-20 Jason Merrill <jason@redhat.com>
+
+ PR c++/51922
+ * g++.dg/ext/attrib42.C: Require ilp32.
+
+2012-01-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/51915
+ * gcc.target/arm/pr51915.c: New test.
+
+2012-01-20 Cary Coutant <ccoutant@google.com>
+ Dodji Seketeli <dodji@redhat.com>
+
+ PR debug/45682
+ * g++.dg/debug/dwarf2/nested-3.C: New test.
+
+2012-01-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51402
+ * g++.dg/template/crash110.C: New.
+
+2012-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.misc-tests/gcov-14.c: Skip on alpha*-dec-osf*.
+ Remove default options on hppa*-*-hpux*.
+
+2012-01-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/ext/visibility/template9.C: Add dg-require-visibility.
+
+2012-01-20 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.c-torture/compile/pr51856.c: New testcase.
+
+2012-01-20 Uros Bizjak <ubizjak@gmail.com>
+
+ * go.test/go-test.exp (go-gc-tests): Pass correctly formatted
+ options to go_target_compile.
+
+2012-01-20 Kai Tietz <ktietz@redhat.com>
+
+ * g++.dg/torture/pr51344.C: Fix typo.
+
+2012-01-20 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51903
+ * g++.dg/torture/pr51903.C: New testcase.
+
+2012-01-20 Tobias Burnus <burnus@net-b.de>
+ Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/51056
+ * gfortran.dg/use_21.f90: New.
+
+2012-01-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/51106
+ * gcc.dg/torture/pr51106-1.c: New test.
+ * gcc.dg/torture/pr51106-2.c: New test.
+
+2012-01-19 Kai Tietz <ktietz@redhat.com>
+
+ * g++.dg/torture/pr51344.C: New test.
+
+2012-01-19 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51904
+ * gfortran.dg/intrinsic_size_2.f90: New.
+
+2012-01-19 Jason Merrill <jason@redhat.com>
+
+ PR c++/51889
+ * g++.dg/inherit/using7.C: New.
+
+2012-01-19 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/37997
+ * gcc.dg/tree-ssa/ssa-pre-28.c: New testcase.
+
+2012-01-19 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/51505
+ * gcc.dg/pr51505.c: New test.
+
+2012-01-18 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/51634
+ * gfortran.dg/typebound_operator_12.f03: New.
+ * gfortran.dg/typebound_operator_13.f03: New.
+
+2012-01-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51225
+ * g++.dg/cpp0x/pr51225.C: New.
+
+2012-01-17 Ian Lance Taylor <iant@google.com>
+
+ PR go/50656
+ * go.test/go-test.exp (go-gc-tests): Recognize some more test lines.
+
+2012-01-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51869
+ * gfortran.dg/realloc_on_assign_9.f90: New.
+
+2012-01-17 Aldy Hernandez <aldyh@redhat.com>
+
+ PR other/51165
+ * gcc.dg/tm/memopt-3.c: Remove xfail.
+ * gcc.dg/tm/memopt-4.c: Remove xfail.
+ * gcc.dg/tm/memopt-5.c: Remove xfail.
+ * gcc.dg/tm/memopt-7.c: Remove xfail.
+
+2012-01-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51877
+ * gcc.c-torture/execute/pr51877.c: New test.
+
+2012-01-17 Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.dg/vect/no-section-anchors-vect-69.c: Change
+ {!vect_align_arrays} to vect_sizes_32B_16B.
+ * gcc.dg/vect/vect-multitypes-1.c: Ditto.
+ * gcc.dg/vect/vect-peel-3.c: Ditto.
+
+2012-01-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51854
+ * g++.dg/abi/mangle60.C: New.
+
+ PR c++/51827
+ * g++.dg/pch/mangle1.{C,Hs}: New.
+
+2012-01-16 Mikael Morin <mikael@gcc.gnu.org>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/50981
+ * gfortran.dg/elemental_optional_args_3.f90: New
+ * gfortran.dg/elemental_optional_args_4.f90: New
+
+2012-01-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51809
+ * gfortran.dg/use_20.f90: New
+
+2012-01-16 Jason Merrill <jason@redhat.com>
+
+ PR c++/51868
+ * g++.dg/cpp0x/rv-bitfield.C: New.
+ * g++.dg/cpp0x/rv-bitfield2.C: New.
+
+2012-01-16 Paul Thomas <pault@gcc.gnu.org>
+
+ * gfortran.dg/class_array_3.f03: Remove the explicit loop in
+ subroutine 'qsort' and use index array to assign the result.
+
+2012-01-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51865
+ * gcc.dg/pr51865.c: New test.
+
+2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Expect 4 threaded edges for MIPS.
+
+2012-01-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/code-readable-2.c: Allow the jump table address
+ to be loaded from the constant pool, rather than via %hi and %lo.
+
+2012-01-15 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/51821
+ * gcc.dg/pr51821.c: New test.
+
+2012-01-15 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.dg/torture/pr8081.c: Fix char signedness assumption.
+
+2012-01-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * g++.dg/cpp0x/constexpr-rom.C: Add -G0 where applicable.
+
+2012-01-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51800
+ * gfortran.dg/init_flag_8.f90: New.
+ * gfortran.dg/init_flag_9.f90: New.
+
+2011-01-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51816
+ * gfortran.dg/use_18.f90: New.
+ * gfortran.dg/use_19.f90: New.
+
+2012-01-13 Ian Lance Taylor <iant@google.com>
+
+ PR c++/50012
+ * g++.dg/warn/Wsign-compare-4.C: New.
+
+2012-01-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/48351
+ * gfortran.dg/alloc_comp_assign.f03: New.
+ * gfortran.dg/allocatable_scalar_9.f90: Reduce count of
+ __BUILTIN_FREE from 38 to 32.
+
+2012-01-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/20681
+ * g++.dg/warn/Wreturn-type-7.C: New.
+
+2012-01-13 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.c-torture/execute/20120111-1.c: Fix wrong int = int32_t
+ assumption.
+ * g++.dg/ipa/pr51759.C: Fix assumption sizeof(int) > 2.
+ * gcc.dg/cpp/warn-multichar.c: Fix to work on int=16 platforms.
+ * gcc.dg/cpp/warn-multichar-2.c: Ditto.
+ * gcc.dg/debug/dwarf2/pr49871.c: Add dg-require-effective-target
+ int32plus because of big array needed.
+ * gcc.dg/pr50527.c: Don't FAIL if sizeof(void*) = 2
+ * gcc.dg/lto/20090218-2_1.c: Fix prototype of malloc, memcpy.
+
+2012-01-13 Jason Merrill <jason@redhat.com>
+
+ PR c++/51813
+ * g++.dg/ext/visibility/template9.C: New.
+
+ PR c++/51620
+ * g++.dg/cpp0x/defaulted34.C: New.
+ * g++.dg/template/virtual3.C: New.
+
+2012-01-13 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/8081
+ * gcc.dg/torture/pr8081.c: New testcase.
+
+2012-01-13 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/pr46309.c: Set branch cost to greater 1 for avr.
+
+2012-01-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/51714
+ * g++.dg/ext/stmtexpr14.C: New.
+
+2012-01-13 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51633
+ * g++.dg/cpp0x/constexpr-diag4.C: New test.
+
+2012-01-12 Jason Merrill <jason@redhat.com>
+
+ PR c++/48051
+ * g++.dg/abi/mangle48.C: Test qualified-names, too.
+ * g++.dg/abi/mangle58.C: Likewise.
+
+ PR c++/51403
+ * g++.dg/template/arg8.C: New.
+
+2012-01-12 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/51799
+ * gcc.dg/vect/pr51799.c: New test.
+ * gcc.dg/vect/vect-widen-shift-u8.c: Expect two widening shift
+ patterns.
+
+2012-01-12 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51057
+ PR fortran/51616
+ * lib/target-supports.exp
+ (check_effective_target_fortran_largest_fp_has_sqrt): New.
+ * gfortran.dg/quad_2.f90: Use it, add pattern for IBM's real(16).
+
+2012-01-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/51565
+ * g++.dg/ext/attrib42.C: New.
+
+2012-01-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR bootstrap/51796
+ * gcc.dg/pr51796.c: New test.
+
+2012-01-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/51818
+ * g++.dg/cpp0x/lambda/lambda-mangle3.C: New.
+
+2012-01-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array19.ad[sb]: New test.
+
+2012-01-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt23.ad[sb]: New test.
+ * gnat.dg/opt23_pkg.ad[sb]: New helper.
+ * gnat.dg/opt24.ad[sb]: New test.
+
+2012-01-11 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/49642
+ * gcc.dg/tree-ssa/pr49642-1.c: New test.
+ * gcc.dg/tree-ssa/pr49642-2.c: New test.
+
+2012-01-11 Jason Merrill <jason@redhat.com>
+
+ PR c++/51613
+ * g++.dg/template/explicit-args5.C: New.
+
+2012-01-11 Matthew Gretton-Dann <matthew.gretton-dann@arm.com>
+
+ * gcc.c-torture/execute/20120110-1.c: New testcase.
+
+2012-01-10 Jason Merrill <jason@redhat.com>
+
+ PR c++/51614
+ * g++.dg/inherit/ambig1.C: New.
+
+ PR c++/51433
+ * g++.dg/cpp0x/constexpr-cache1.C: New.
+
+2012-01-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51801
+ * gcc.dg/torture/pr51801.c: New testcase.
+
+2012-01-10 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51652
+ * gfortran.dg/allocate_with_typespec_5.f90: New.
+
+2012-01-10 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/class_39.f03: Update dg-error string.
+
+2012-01-10 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/50913
+ * gcc.dg/graphite/interchange-16.c: New testcase.
+ * gcc.dg/graphite/scop-20.c: XFAIL.
+ * gfortran.dg/graphite/interchange-1.f: Likewise.
+ * gfortran.dg/graphite/block-1.f90: Likewise.
+ * gfortran.dg/graphite/block-2.f: Likewise.
+
+2012-01-10 Richard Henderson <rth@redhat.com>
+
+ * lib/target-supports.exp (check_effective_target_vect_perm,
+ check_effective_target_vect_perm_byte,
+ check_effective_target_vect_perm_short): Enable for arm neon.
+
+2012-01-09 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/46328
+ * gfortran.dg/typebound_operator_11.f90: New.
+
+2012-01-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array18.adb: New test.
+ * gnat.dg/array18_pkg.ads: New helper.
+
+2012-01-09 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/51791
+ * gfortran.dg/typebound_operator_7.f03: Insert parentheses
+ around base object in first assignment in main program.
+ * gfortran.dg/typebound_operator_10.f03: New test.
+
+2012-01-09 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/51759
+ * g++.dg/ipa/pr51759.C: New test.
+
+2012-01-09 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51758
+ * gfortran.dg/optional_absent_2.f90: New.
+
+2012-01-09 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51578
+ * gfortran.dg/use_17.f90: New.
+
+2012-01-09 Gary Funck <gary@intrepid.com>
+
+ PR preprocessor/33919
+ * gcc.dg/pr33919.c: New test.
+ * gcc.dg/pr33919-0.h: New test header file.
+ * gcc.dg/pr33919-1.h: Ditto.
+ * gcc.dg/pr33919-2.h: Ditto.
+
+2012-01-07 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimize/51694
+ * gcc.c-torture/compile/pr51694.c: new testcase.
+
+2012-01-07 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/51600
+ * g++.dg/torture/pr51600.C: New testcase.
+
+2012-01-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR gcov-profile/51715
+ PR gcov-profile/51717
+ * gcc.misc-tests/gcov-13.c: Skip on 32-bit hppa*-*-hpux*.
+ * gcc.misc-tests/gcov-14.c: Likewise.
+
+2012-01-06 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/parse/new5.C: New.
+
+2012-01-06 Patrick Marlier <patrick.marlier@gmail.com>
+
+ PR testsuite/51655
+ * c-c++-common/tm/memcpy-1.c: Declare memcpy instead of
+ including <string.h>.
+
+2012-01-06 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/abi/mangle51.C: New.
+ * g++.dg/abi/mangle52.C: New.
+ * g++.dg/abi/mangle53.C: New.
+ * g++.dg/abi/mangle54.C: New.
+ * g++.dg/abi/mangle55.C: New.
+ * g++.dg/abi/mangle56.C: New.
+ * g++.dg/abi/mangle57.C: New.
+ * g++.dg/abi/mangle58.C: New.
+ * g++.dg/abi/mangle59.C: New.
+ * g++.dg/cpp0x/trailing3.C: Update mangling.
+ * g++.dg/cpp0x/variadic111.C: Update mangling.
+ * g++.dg/cpp0x/variadic4.C: Update mangling.
+ * g++.dg/cpp0x/variadic42.C: Pass -fabi-version=5.
+ * g++.dg/template/nontype22.C: Works now.
+ * g++.dg/template/pr35240.C: Works now.
+
+ * g++.dg/cpp0x/error7.C: New.
+
+2012-01-06 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/deallocate_stat_2.f90: New.
+ * coarray/allocate_errgmsg.f90: New.
+ * gfortran.dg/coarray_lib_alloc_1.f90: New.
+ * gfortran.dg/coarray_lib_alloc_2.f90: New.
+ * coarray/subobject_1.f90: Fix for num_images > 1.
+ * gfortran.dg/deallocate_stat.f90: Update due to changed
+ stat= handling.
+
+2012-01-06 Andrew Stubbs <ams@codesourcery.com>
+
+ * gcc.target/arm/headmerge-2.c: Adjust scan pattern.
+
+2012-01-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ada/acats/overflow.lst: Add cb20004.
+
+2012-01-05 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51541
+ * g++.dg/cpp0x/alias-decl-18.C: New test.
+
+2012-01-05 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20120104-1.c: New test.
+
+2012-01-05 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/PR48946
+ * gfortran.dg/typebound_operator_9.f03: This is now a copy of
+ the old typebound_operator_8.f03.
+ * gfortran.dg/typebound_operator_8.f03: New version of
+ typebound_operator_7.f03 with 'u' a derived type instead of a
+ class object.
+
+2012-01-05 Richard Guenther <rguenther@suse.de>
+
+ * g++.dg/torture/pr49309.C: Skip for -flto.
+
+2012-01-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/51761
+ * gcc.c-torture/compile/pr51761.c: New test.
+
+2012-01-05 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51760
+ * gcc.dg/torture/pr51760.c: New testcase.
+
+2012-01-05 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/51472
+ * gcc.dg/tm/memopt-6.c: Adjust regexp.
+
+2012-01-05 Richard Guenther <rguenther@suse.de>
+
+ PR lto/41576
+ * gfortran.dg/lto/pr41576_0.f90: New testcase.
+ * gfortran.dg/lto/pr41576_1.f90: Likewise.
+
+2012-01-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/51695
+ * gcc.dg/pr51695.c: New test.
+
+2012-01-04 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/mips/mips64-dsp-ldx1.c: New test.
+ * gcc.target/mips/octeon2-lx-1.c: New test.
+ * gcc.target/mips/mips64-dsp-ldx.c: New test.
+ * gcc.target/mips/octeon2-lx-2.c: New test.
+ * gcc.target/mips/octeon2-lx-3.c: New test.
+
+2012-01-04 Patrick Marlier <patrick.marlier@gmail.com>
+
+ PR other/51163
+ PR other/51164
+ * gcc.dg/tm/alias-1.c: Adjust regexp.
+ * gcc.dg/tm/alias-2.c: Adjust regexp.
+
+2012-01-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51064
+ * g++.dg/warn/Wparentheses-26.C: New.
+
+2012-01-04 Mikael Morin <mikael@gcc.gnu.org>
+
+ * gfortran.dg/elemental_optional_args_2.f90: New test.
+
+2012-01-04 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/49693
+ * gfortran.dg/common_17.f90: New test.
+
+2012-01-04 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/49651
+ * gcc.dg/tree-ssa/pta-ptrarith-1.c: Adjust.
+ * gcc.dg/tree-ssa/pta-ptrarith-2.c: Likewise.
+
+2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51738
+ * g++.dg/cpp0x/initlist-postfix-open-square.C: New.
+
+2012-01-03 Andrew Pinski <apinski@cavium.com>
+
+ * lib/scanasm.exp (dg-function-on-line): Always use a special format
+ for all mips targets. Also allow an optional .cfi_startproc.
+
+2012-01-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * gfortran.dg/typebound_operator_8.f03: Use dg-add-options ieee.
+
+2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29273
+ * g++.dg/rtti/dyncast5.C: New.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51070
+ * gcc.dg/torture/pr51070-2.c: New testcase.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/51692
+ * gcc.dg/torture/pr51692.c: New testcase.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
+ PR debug/51650
+ * g++.dg/lto/pr51650-3_0.C: New testcase.
+
+2012-01-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/15867
+ * g++.dg/warn/Wredundant-decls-spec.C: New.
+
+2012-01-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51719
+ * g++.dg/tree-prof/pr51719.C: New test.
+
+2012-01-03 Richard Guenther <rguenther@suse.de>
+
+ PR middle-end/51730
+ * gcc.dg/fold-compare-6.c: New testcase.
+
+2012-01-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/51669
+ * g++.dg/gomp/pr51669.C: New test.
+
+2012-01-02 Jason Merrill <jason@redhat.com>
+
+ PR c++/51675
+ * g++.dg/cpp0x/constexpr-union2.C: New.
+
+ PR c++/51666
+ * g++.dg/cpp0x/nsdmi-defer5.C: New.
+
+2012-01-02 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/51462
+ * g++.dg/cpp0x/constexpr-99.C: New test.
+
+2012-01-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/20140
+ * g++.dg/template/init9.C: New.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/memcpy-4.c: Add nomips16 attribute for MIPS targets.
+ Increase copy to 5 bytes. Look for at least two "mem/s/u"s,
+ rather than a specific number.
+
+2012-01-02 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/46262
+ PR fortran/46328
+ PR fortran/51052
+ * gfortran.dg/typebound_operator_7.f03: New.
+ * gfortran.dg/typebound_operator_8.f03: New.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/51729
+ * gcc.target/mips/dspr2-MULT.c: Remove -ffixed-hi -ffixed-lo.
+ XFAIL.
+ * gcc.target/mips/dspr2-MULTU.c: Likewise.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/pr46309.c: Add -mtune=octeon2 for MIPS.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/cpp0x/constexpr-rom.C: Look for .rdata rather than rodata
+ for MIPS.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gfortran.dg/io_real_boz_3.f90: Require fortran_real_16.
+ * gfortran.dg/io_real_boz_4.f90: Likewise.
+ * gfortran.dg/io_real_boz_5.f90: Likewise.
+
+2012-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/opt/devirt2.C: Add -mno-abicalls for MIPS.
+
+2012-01-02 Revital Eres <revital.eres@linaro.org>
+
+ * gcc.dg/sms-11.c: New file.
+
+2012-01-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/51682
+ * gfortran.dg/coarray/image_index_3.f90: New.
+
+2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/16603
+ * g++.dg/parse/enum8.C: New.
+
+2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51379
+ * g++.dg/conversion/reinterpret4.C: New.
+ * g++.dg/conversion/reinterpret1.C: Adjust.
+
+2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/constexpr-delegating2.C: Add missing piece.
+
+2012-01-01 Fabien Chêne <fabien@gcc.gnu.org>
+
+ * g++.old-deja/g++.brendan/crash25.C: Adjust.
+ * g++.old-deja/g++.brendan/crash56.C: Likewise.
+ * g++.old-deja/g++.jason/access14.C: Likewise.
+ * g++.old-deja/g++.jason/access8.C: Likewise.
+ * g++.old-deja/g++.jason/access1.C: Likewise.
+ * g++.old-deja/g++.other/access3.C: Likewise.
+ * g++.old-deja/g++.other/access5.C: Likewise.
+ * g++.old-deja/g++.law/unsorted1.C: Likewise.
+ * g++.old-deja/g++.law/visibility22.C: Likewise.
+ * g++.old-deja/g++.law/visibility26.C: Likewise.
+ * g++.old-deja/g++.mike/p2746.C: Likewise.
+ * g++.dg/debug/using1.C: Likewise.
+ * g++.dg/lookup/using51.C: Likewise.
+ * g++.dg/inherit/using5.C: Likewise.
+ * g++.dg/inherit/pr30297.C: Likewise.
+ * g++.dg/inherit/access8.C: Likewise.
+ * g++.dg/torture/pr39362.C: Likewise.
+ * g++.dg/template/crash13.C: Likewise.
+ * g++.dg/template/using10.C: Likewise.
+
+2012-01-01 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/51502
+ * lib/gcc-dg.exp (scan-module-absence): Really commit last change.
+
+2012-01-01 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/51704
+ * gfortran.dg/vect/no-fre-no-copy-prop-O3-pr51704.f90: New.
+ * gfortran.dg/vect/vect.exp: Run no-fre-no-copy-prop-O3-* with
+ corresponding flags.
+
+2012-01-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51723
+ * g++.dg/cpp0x/constexpr-delegating2.C: New.
+
+2012-01-01 Jan Hubicka <jh@suse.cz>
+
+ PR rtl-optimization/51069
+ * gcc.c-torture/compile/pr51069.c: New testcase.
+
+2012-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/51683
+ * gcc.dg/pr51683.c: New test.
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/gcc/testsuite/ChangeLog-2013 b/gcc/testsuite/ChangeLog-2013
new file mode 100644
index 0000000000..0d840b14cc
--- /dev/null
+++ b/gcc/testsuite/ChangeLog-2013
@@ -0,0 +1,12405 @@
+2013-12-31 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59622
+ * g++.dg/opt/pr59622.C: New test.
+
+2013-12-31 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuznetsov <maxim.kuznetsov@intel.com>
+ Sergey Lega <sergey.s.lega@intel.com>
+ Anna Tikhonova <anna.tikhonova@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/avx-1.c: Update for AVX-512 scalar insns.
+ * gcc.target/i386/avx512f-vaddsd-1.c: New.
+ * gcc.target/i386/avx512f-vaddss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vextractf32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vextracti32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalesd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalesd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaless-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaless-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubss-1.c: Ditto.
+ * gcc.target/i386/sse-14.c: Update for AVX-512 scalar insns.
+ * gcc.target/i386/sse-23.c: Ditto.
+ * gcc.target/i386/testimm-10.c: Ditto.
+
+2013-12-31 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuznetsov <maxim.kuznetsov@intel.com>
+ Sergey Lega <sergey.s.lega@intel.com>
+ Anna Tikhonova <anna.tikhonova@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/avx-1.c: Add define for __builtin_ia32_sha1rnds4.
+ * gcc.target/i386/i386.exp (check_effective_target_sha): New.
+ * gcc.target/i386/sha-check.h: New file.
+ * gcc.target/i386/sha1msg1-1.c: Ditto.
+ * gcc.target/i386/sha1msg1-2.c: Ditto.
+ * gcc.target/i386/sha1msg2-1.c: Ditto.
+ * gcc.target/i386/sha1msg2-2.c: Ditto.
+ * gcc.target/i386/sha1nexte-1: Ditto.
+ * gcc.target/i386/sha1nexte-2: Ditto.
+ * gcc.target/i386/sha1rnds4-1.c: Ditto.
+ * gcc.target/i386/sha1rnds4-2.c: Ditto.
+ * gcc.target/i386/sha256msg1-1.c: Ditto.
+ * gcc.target/i386/sha256msg1-2.c: Ditto.
+ * gcc.target/i386/sha256msg2-1.c: Ditto.
+ * gcc.target/i386/sha256msg2-2.c: Ditto.
+ * gcc.target/i386/sha256rnds2-1.c: Ditto.
+ * gcc.target/i386/sha256rnds2-2.c: Ditto.
+ * gcc.target/i386/sse-13.c: Add __builtin_ia32_sha1rnds4.
+ * gcc.target/i386/sse-14.c: Add _mm_sha1rnds4_epu32.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Add __builtin_ia32_sha1rnds4.
+
+2013-12-31 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuznetsov <maxim.kuznetsov@intel.com>
+ Sergey Lega <sergey.s.lega@intel.com>
+ Anna Tikhonova <anna.tikhonova@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/avx512cd-check.h: New file.
+ * gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vpconflictd-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vpconflictd-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vpconflictq-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vpconflictq-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vplzcntd-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vplzcntd-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vplzcntq-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vplzcntq-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vptestnmd-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vptestnmd-2.c: Ditto.
+ * gcc.target/i386/avx512cd-vptestnmq-1.c: Ditto.
+ * gcc.target/i386/avx512cd-vptestnmq-2.c: Ditto.
+ * gcc.target/i386/avx512er-vexp2pd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vexp2pd-2.c: Ditto.
+ * gcc.target/i386/avx512er-vexp2ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vexp2ps-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28pd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28pd-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrcp28ps-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28pd-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28pd-2.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28ps-1.c: Ditto.
+ * gcc.target/i386/avx512er-vrsqrt28ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-broadcast-gpr-1.c: Ditto.
+ * gcc.target/i386/avx512f-broadcast-gpr-2.c: Ditto.
+ * gcc.target/i386/avx512f-ceil-sfix-vec-1.c: Ditto.
+ * gcc.target/i386/avx512f-ceil-sfix-vec-2.c: Ditto.
+ * gcc.target/i386/avx512f-dummy.c: Ditto.
+ * gcc.target/i386/avx512f-floor-sfix-vec-1.c: Ditto.
+ * gcc.target/i386/avx512f-floor-sfix-vec-2.c: Ditto.
+ * gcc.target/i386/avx512f-gather-1.c: Ditto.
+ * gcc.target/i386/avx512f-gather-2.c: Ditto.
+ * gcc.target/i386/avx512f-gather-3.c: Ditto.
+ * gcc.target/i386/avx512f-gather-4.c: Ditto.
+ * gcc.target/i386/avx512f-gather-5.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherpd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherpd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherps512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherps512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32gatherq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterpd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterpd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterps512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterps512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i32scatterq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherpd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherpd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherps512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherps512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64gatherq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterpd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterpd512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterps512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterps512-2.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-i64scatterq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-inline-asm.c: Ditto.
+ * gcc.target/i386/avx512f-kandnw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kandw-1.c: Ditto.
+ * gcc.target/i386/avx512f-klogic-2.c: Ditto.
+ * gcc.target/i386/avx512f-knotw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kortestw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kortestw-2.c: Ditto.
+ * gcc.target/i386/avx512f-korw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kunpckbw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kxnorw-1.c: Ditto.
+ * gcc.target/i386/avx512f-kxorw-1.c: Ditto.
+ * gcc.target/i386/avx512f-rounding.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16sf-1.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16sf-2.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16sf-3.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16sf-4.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16sf-5.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16si-1.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16si-2.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16si-3.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16si-4.c: Ditto.
+ * gcc.target/i386/avx512f-set-v16si-5.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8df-1.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8df-2.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8df-3.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8df-4.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8df-5.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8di-1.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8di-2.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8di-3.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8di-4.c: Ditto.
+ * gcc.target/i386/avx512f-set-v8di-5.c: Ditto.
+ * gcc.target/i386/avx512f-setzero-pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-setzero-ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-setzero-si512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vaddps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vaddsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vaddss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vaddss-2.c: Ditto.
+ * gcc.target/i386/avx512f-valignd-1.c: Ditto.
+ * gcc.target/i386/avx512f-valignd-2.c: Ditto.
+ * gcc.target/i386/avx512f-valignq-1.c: Ditto.
+ * gcc.target/i386/avx512f-valignq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vblendmpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vblendmpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vblendmps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vblendmps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastf32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastf32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastf64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastf64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcasti32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcasti32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcasti64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcasti64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vbroadcastss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcmppd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcmppd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcmpss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcomisd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcomiss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcompresspd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcompresspd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcompressps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcompressps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtdq2pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtdq2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtdq2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtdq2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2dq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtpd2udq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtph2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtph2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2dq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2ph-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2ph-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtps2udq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsd2usi64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2sd64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtsi2ss64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtss2usi64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttpd2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttpd2dq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttpd2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttpd2udq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttps2dq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttps2dq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttps2udq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttps2udq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2si-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2si64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2usi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttsd2usi64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2si-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2si-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2si64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2si64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2usi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2usi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2usi64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvttss2usi64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtudq2pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtudq2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtudq2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtudq2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2sd64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2sd64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vcvtusi2ss64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vdivpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vdivps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vdivsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vdivss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vdivss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vec-init.c: Ditto.
+ * gcc.target/i386/avx512f-vec-unpack.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vexpandps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vextractf32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vextractf32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vextractf64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vextractf64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vextracti32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vextracti32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vextracti64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vextracti64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfixupimmss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddXXXss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmaddsubXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubXXXss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfmsubaddXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmaddXXXss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vfnmsubXXXss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexppd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexppd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetexpss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vgetmantss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vinsertf32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vinsertf32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vinsertf64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vinsertf64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vinserti32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vinserti32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vinserti64x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vinserti64x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmaxss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vminpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vminps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vminsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vminss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vminss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovapd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovapd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovaps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovaps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovddup-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovddup-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqa32-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqa32-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqa64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqa64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu32-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu32-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovdqu64-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovntps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovshdup-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovshdup-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovsldup-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovsldup-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovupd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovupd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmovups-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmovups-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmulpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmulps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmulsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vmulss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vmulss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpabsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpabsd512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpabsq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpabsq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpaddd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpaddd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpaddq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpaddq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpandd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpandd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpandnd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpandnd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpandnq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpandnq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpandq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpandq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpblendmd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpblendmd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpblendmq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpblendmq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpbroadcastd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpbroadcastd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpbroadcastq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpbroadcastq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpeqq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpgtq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcmpuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcompressd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcompressd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpcompressq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpcompressq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2d-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2d-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2q-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermi2q-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpdi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpdi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpsi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermilpsi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermpdi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermpdi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-imm-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-imm-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-var-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermq-var-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2d-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2d-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2q-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpermt2q-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpexpandd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpexpandd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpexpandq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpexpandq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxsq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxsq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmaxuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpminsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpminsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpminsq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpminsq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpminud-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpminud-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpminuq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpminuq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxbd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxbd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxbq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxbq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxwd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxwd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxwq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovsxwq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusdw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqb-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqb-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqw-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovusqw-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxbd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxbd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxbq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxbq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxwd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxwd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxwq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmovzxwq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmuldq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmuldq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmulld-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmulld-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpmuludq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpmuludq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpord-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpord-2.c: Ditto.
+ * gcc.target/i386/avx512f-vporq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vporq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprold-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprold-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprolq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprolq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprolvd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprolvd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprolvq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprolvq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprord-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprord-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprorq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprorq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprorvd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprorvd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vprorvq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vprorvq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpshufd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpshufd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpslld-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpslld-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpslldi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpslldi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllqi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllqi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsllvq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrad-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrad-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsradi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsradi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsraq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsraq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsraqi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsraqi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsravq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrld-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrld-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrldi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrldi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlqi-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlqi-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvq512-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsrlvq512-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsubd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsubd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpsubq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpsubq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpternlogd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpternlogd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpternlogq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpternlogq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vptestmd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vptestmd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vptestmq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vptestmq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckhdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckhdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckhqdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckhqdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckldq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpckldq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpcklqdq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpunpcklqdq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpxord-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpxord-2.c: Ditto.
+ * gcc.target/i386/avx512f-vpxorq-1.c: Ditto.
+ * gcc.target/i386/avx512f-vpxorq-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrcp14ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalepd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalepd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaleps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaleps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalesd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscalesd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaless-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrndscaless-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14pd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14pd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14sd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14sd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vrsqrt14ss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vscalefss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshuff32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshuff32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshuff64x2-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshuff64x2-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi32x4-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi32x4-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi64x2-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshufi64x2-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshufpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vshufps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vshufps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsqrtss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsubpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsubps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsubsd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubsd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vsubss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vsubss-2.c: Ditto.
+ * gcc.target/i386/avx512f-vucomisd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vucomiss-1.c: Ditto.
+ * gcc.target/i386/avx512f-vunpckhpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vunpckhpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vunpckhps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vunpckhps-2.c: Ditto.
+ * gcc.target/i386/avx512f-vunpcklpd-1.c: Ditto.
+ * gcc.target/i386/avx512f-vunpcklpd-2.c: Ditto.
+ * gcc.target/i386/avx512f-vunpcklps-1.c: Ditto.
+ * gcc.target/i386/avx512f-vunpcklps-2.c: Ditto.
+ * gcc.target/i386/avx512f_cond_move.c: Ditto.
+ * gcc.target/i386/avx512f_evex_reg_asm-1.c: Ditto.
+ * gcc.target/i386/avx512f_evex_reg_asm-2.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf0dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf0qps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vgatherpf1qps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf0dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf0qps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf1dps-1.c: Ditto.
+ * gcc.target/i386/avx512pf-vscatterpf1qps-1.c: Ditto.
+ * gcc.target/i386/sse-12.c: Updated options.
+ * gcc.target/i386/sse-13.c: Updated options, added defines for
+ __builtin_ia32_addpd512_mask, __builtin_ia32_addps512_mask,
+ __builtin_ia32_addsd_mask, __builtin_ia32_addss_mask,
+ __builtin_ia32_alignd512_mask, __builtin_ia32_alignq512_mask,
+ __builtin_ia32_cmpd512_mask, __builtin_ia32_cmppd512_mask,
+ __builtin_ia32_cmpps512_mask, __builtin_ia32_cmpq512_mask,
+ __builtin_ia32_cmpsd_mask, __builtin_ia32_cmpss_mask,
+ __builtin_ia32_cvtdq2ps512_mask, __builtin_ia32_cvtpd2dq512_mask,
+ __builtin_ia32_cvtpd2ps512_mask, __builtin_ia32_cvtpd2udq512_mask,
+ __builtin_ia32_cvtps2dq512_mask, __builtin_ia32_cvtps2pd512_mask,
+ __builtin_ia32_cvtps2udq512_mask, __builtin_ia32_cvtsd2ss_mask,
+ __builtin_ia32_cvtsi2sd64, __builtin_ia32_cvtsi2ss32,
+ __builtin_ia32_cvtsi2ss64, __builtin_ia32_cvtss2sd_mask,
+ __builtin_ia32_cvttpd2dq512_mask, __builtin_ia32_cvttpd2udq512_mask,
+ __builtin_ia32_cvttps2dq512_mask, __builtin_ia32_cvttps2udq512_mask,
+ __builtin_ia32_cvtudq2ps512_mask, __builtin_ia32_cvtusi2sd64,
+ __builtin_ia32_cvtusi2ss32, __builtin_ia32_cvtusi2ss64,
+ __builtin_ia32_divpd512_mask, __builtin_ia32_divps512_mask,
+ __builtin_ia32_divsd_mask, __builtin_ia32_divss_mask,
+ __builtin_ia32_extractf32x4_mask, __builtin_ia32_extractf64x4_mask,
+ __builtin_ia32_extracti32x4_mask, __builtin_ia32_extracti64x4_mask,
+ __builtin_ia32_fixupimmpd512_mask, __builtin_ia32_fixupimmpd512_maskz,
+ __builtin_ia32_fixupimmps512_mask, __builtin_ia32_fixupimmps512_maskz,
+ __builtin_ia32_fixupimmsd_mask, __builtin_ia32_fixupimmsd_maskz,
+ __builtin_ia32_fixupimmss_mask, __builtin_ia32_fixupimmss_maskz,
+ __builtin_ia32_gatherdiv8df, __builtin_ia32_gatherdiv8di,
+ __builtin_ia32_gatherdiv16sf, __builtin_ia32_gatherdiv16si,
+ __builtin_ia32_gathersiv16sf, __builtin_ia32_gathersiv16si,
+ __builtin_ia32_gathersiv8df, __builtin_ia32_gathersiv8di,
+ __builtin_ia32_getexppd512_mask, __builtin_ia32_getexpps512_mask,
+ __builtin_ia32_getexpsd128_mask, __builtin_ia32_getexpss128_mask,
+ __builtin_ia32_getmantpd512_mask, __builtin_ia32_getmantps512_mask,
+ __builtin_ia32_getmantsd_mask, __builtin_ia32_getmantss_mask,
+ __builtin_ia32_insertf32x4_mask, __builtin_ia32_insertf64x4_mask,
+ __builtin_ia32_inserti32x4_mask, __builtin_ia32_inserti64x4_mask,
+ __builtin_ia32_maxpd512_mask, __builtin_ia32_maxps512_mask,
+ __builtin_ia32_maxsd_mask, __builtin_ia32_maxss_mask,
+ __builtin_ia32_minpd512_mask, __builtin_ia32_minps512_mask,
+ __builtin_ia32_minsd_mask, __builtin_ia32_minss_mask,
+ __builtin_ia32_mulpd512_mask, __builtin_ia32_mulps512_mask,
+ __builtin_ia32_mulsd_mask, __builtin_ia32_mulss_mask,
+ __builtin_ia32_permdf512_mask, __builtin_ia32_permdi512_mask,
+ __builtin_ia32_prold512_mask, __builtin_ia32_prolq512_mask,
+ __builtin_ia32_prord512_mask, __builtin_ia32_prorq512_mask,
+ __builtin_ia32_pshufd512_mask, __builtin_ia32_pslldi512_mask,
+ __builtin_ia32_psllqi512_mask, __builtin_ia32_psradi512_mask,
+ __builtin_ia32_psraqi512_mask, __builtin_ia32_psrldi512_mask,
+ __builtin_ia32_psrlqi512_mask, __builtin_ia32_pternlogd512_mask,
+ __builtin_ia32_pternlogd512_maskz, __builtin_ia32_pternlogq512_mask,
+ __builtin_ia32_pternlogq512_maskz, __builtin_ia32_rndscalepd_mask,
+ __builtin_ia32_rndscaleps_mask, __builtin_ia32_rndscalesd_mask,
+ __builtin_ia32_rndscaless_mask, __builtin_ia32_scalefpd512_mask,
+ __builtin_ia32_scalefps512_mask, __builtin_ia32_scalefsd_mask,
+ __builtin_ia32_scalefss_mask, __builtin_ia32_scatterdiv8df,
+ __builtin_ia32_scatterdiv8di, __builtin_ia32_scatterdiv16sf,
+ __builtin_ia32_scatterdiv16si, __builtin_ia32_scattersiv16sf,
+ __builtin_ia32_scattersiv16si, __builtin_ia32_scattersiv8df,
+ __builtin_ia32_scattersiv8di, __builtin_ia32_shuf_f32x4_mask,
+ __builtin_ia32_shuf_f64x2_mask, __builtin_ia32_shuf_i32x4_mask,
+ __builtin_ia32_shuf_i64x2_mask, __builtin_ia32_shufpd512_mask,
+ __builtin_ia32_shufps512_mask, __builtin_ia32_sqrtpd512_mask,
+ __builtin_ia32_sqrtps512_mask, __builtin_ia32_sqrtsd_mask,
+ __builtin_ia32_sqrtss_mask, __builtin_ia32_subpd512_mask,
+ __builtin_ia32_subps512_mask, __builtin_ia32_subsd_mask,
+ __builtin_ia32_subss_mask, __builtin_ia32_ucmpd512_mask,
+ __builtin_ia32_ucmpq512_mask, __builtin_ia32_vcomisd,
+ __builtin_ia32_vcomiss, __builtin_ia32_vcvtph2ps512_mask,
+ __builtin_ia32_vcvtps2ph512_mask, __builtin_ia32_vcvtsd2si32,
+ __builtin_ia32_vcvtsd2si64, __builtin_ia32_vcvtsd2usi32,
+ __builtin_ia32_vcvtsd2usi64, __builtin_ia32_vcvtss2si32,
+ __builtin_ia32_vcvtss2si64, __builtin_ia32_vcvtss2usi32,
+ __builtin_ia32_vcvtss2usi64, __builtin_ia32_vcvttsd2si32,
+ __builtin_ia32_vcvttsd2si64, __builtin_ia32_vcvttsd2usi32,
+ __builtin_ia32_vcvttsd2usi64, __builtin_ia32_vcvttss2si32,
+ __builtin_ia32_vcvttss2si64, __builtin_ia32_vcvttss2usi32,
+ __builtin_ia32_vcvttss2usi64, __builtin_ia32_vfmaddpd512_mask,
+ __builtin_ia32_vfmaddpd512_mask3, __builtin_ia32_vfmaddpd512_maskz,
+ __builtin_ia32_vfmaddps512_mask, __builtin_ia32_vfmaddps512_mask3,
+ __builtin_ia32_vfmaddps512_maskz, __builtin_ia32_vfmaddsd3_mask,
+ __builtin_ia32_vfmaddsd3_mask3, __builtin_ia32_vfmaddsd3_maskz,
+ __builtin_ia32_vfmaddss3_mask, __builtin_ia32_vfmaddss3_mask3,
+ __builtin_ia32_vfmaddss3_maskz, __builtin_ia32_vfmaddsubpd512_mask,
+ __builtin_ia32_vfmaddsubpd512_mask3,
+ __builtin_ia32_vfmaddsubpd512_maskz,
+ __builtin_ia32_vfmaddsubps512_mask,
+ __builtin_ia32_vfmaddsubps512_mask3,
+ __builtin_ia32_vfmaddsubps512_maskz,
+ __builtin_ia32_vfmsubaddpd512_mask3,
+ __builtin_ia32_vfmsubaddps512_mask3, __builtin_ia32_vfmsubpd512_mask3,
+ __builtin_ia32_vfmsubps512_mask3, __builtin_ia32_vfmsubsd3_mask3,
+ __builtin_ia32_vfmsubss3_mask3, __builtin_ia32_vfnmaddpd512_mask,
+ __builtin_ia32_vfnmaddps512_mask, __builtin_ia32_vfnmsubpd512_mask,
+ __builtin_ia32_vfnmsubpd512_mask3, __builtin_ia32_vfnmsubps512_mask,
+ __builtin_ia32_vfnmsubps512_mask3, __builtin_ia32_vpermilpd512_mask,
+ __builtin_ia32_vpermilps512_mask, __builtin_ia32_exp2ps_mask,
+ __builtin_ia32_exp2pd_mask, __builtin_ia32_exp2ps_mask,
+ __builtin_ia32_exp2pd_mask, __builtin_ia32_rsqrt28ps_mask,
+ __builtin_ia32_rsqrt28pd_mask, __builtin_ia32_gatherpfdps,
+ __builtin_ia32_gatherpfqps, __builtin_ia32_scatterpfdps,
+ __builtin_ia32_scatterpfqps, __builtin_ia32_addpd512_mask,
+ __builtin_ia32_addps512_mask, __builtin_ia32_addsd_mask,
+ __builtin_ia32_addss_mask, __builtin_ia32_alignd512_mask,
+ __builtin_ia32_alignq512_mask, __builtin_ia32_cmpd512_mask,
+ __builtin_ia32_cmppd512_mask, __builtin_ia32_cmpps512_mask,
+ __builtin_ia32_cmpq512_mask, __builtin_ia32_cmpsd_mask,
+ __builtin_ia32_cmpss_mask, __builtin_ia32_cvtdq2ps512_mask,
+ __builtin_ia32_cvtpd2dq512_mask, __builtin_ia32_cvtpd2ps512_mask,
+ __builtin_ia32_cvtpd2udq512_mask, __builtin_ia32_cvtps2dq512_mask,
+ __builtin_ia32_cvtps2pd512_mask, __builtin_ia32_cvtps2udq512_mask,
+ __builtin_ia32_cvtsd2ss_mask, __builtin_ia32_cvtsi2sd64,
+ __builtin_ia32_cvtsi2ss32, __builtin_ia32_cvtsi2ss64,
+ __builtin_ia32_cvtss2sd_mask, __builtin_ia32_cvttpd2dq512_mask,
+ __builtin_ia32_cvttpd2udq512_mask, __builtin_ia32_cvttps2dq512_mask,
+ __builtin_ia32_cvttps2udq512_mask, __builtin_ia32_cvtudq2ps512_mask,
+ __builtin_ia32_cvtusi2sd64, __builtin_ia32_cvtusi2ss32,
+ __builtin_ia32_cvtusi2ss64, __builtin_ia32_divpd512_mask,
+ __builtin_ia32_divps512_mask, __builtin_ia32_divsd_mask,
+ __builtin_ia32_divss_mask, __builtin_ia32_extractf32x4_mask,
+ __builtin_ia32_extractf64x4_mask, __builtin_ia32_extracti32x4_mask,
+ __builtin_ia32_extracti64x4_mask, __builtin_ia32_fixupimmpd512_mask,
+ __builtin_ia32_fixupimmpd512_maskz, __builtin_ia32_fixupimmps512_mask,
+ __builtin_ia32_fixupimmps512_maskz, __builtin_ia32_fixupimmsd_mask,
+ __builtin_ia32_fixupimmsd_maskz, __builtin_ia32_fixupimmss_mask,
+ __builtin_ia32_fixupimmss_maskz, __builtin_ia32_gatherdiv8df,
+ __builtin_ia32_gatherdiv8di, __builtin_ia32_gatherdiv16sf,
+ __builtin_ia32_gatherdiv16si, __builtin_ia32_gathersiv16sf,
+ __builtin_ia32_gathersiv16si, __builtin_ia32_gathersiv8df,
+ __builtin_ia32_gathersiv8di, __builtin_ia32_getexppd512_mask,
+ __builtin_ia32_getexpps512_mask, __builtin_ia32_getexpsd128_mask,
+ __builtin_ia32_getexpss128_mask, __builtin_ia32_getmantpd512_mask,
+ __builtin_ia32_getmantps512_mask, __builtin_ia32_getmantsd_mask,
+ __builtin_ia32_getmantss_mask, __builtin_ia32_insertf32x4_mask,
+ __builtin_ia32_insertf64x4_mask, __builtin_ia32_inserti32x4_mask,
+ __builtin_ia32_inserti64x4_mask, __builtin_ia32_maxpd512_mask,
+ __builtin_ia32_maxps512_mask, __builtin_ia32_maxsd_mask,
+ __builtin_ia32_maxss_mask, __builtin_ia32_minpd512_mask,
+ __builtin_ia32_minps512_mask, __builtin_ia32_minsd_mask,
+ __builtin_ia32_minss_mask, __builtin_ia32_mulpd512_mask,
+ __builtin_ia32_mulps512_mask, __builtin_ia32_mulsd_mask,
+ __builtin_ia32_mulss_mask, __builtin_ia32_permdf512_mask,
+ __builtin_ia32_permdi512_mask, __builtin_ia32_prold512_mask,
+ __builtin_ia32_prolq512_mask, __builtin_ia32_prord512_mask,
+ __builtin_ia32_prorq512_mask, __builtin_ia32_pshufd512_mask,
+ __builtin_ia32_pslldi512_mask, __builtin_ia32_psllqi512_mask,
+ __builtin_ia32_psradi512_mask, __builtin_ia32_psraqi512_mask,
+ __builtin_ia32_psrldi512_mask, __builtin_ia32_psrlqi512_mask,
+ __builtin_ia32_pternlogd512_mask, __builtin_ia32_pternlogd512_maskz,
+ __builtin_ia32_pternlogq512_mask, __builtin_ia32_pternlogq512_maskz,
+ __builtin_ia32_rndscalepd_mask, __builtin_ia32_rndscaleps_mask,
+ __builtin_ia32_rndscalesd_mask, __builtin_ia32_rndscaless_mask,
+ __builtin_ia32_scalefpd512_mask, __builtin_ia32_scalefps512_mask,
+ __builtin_ia32_scalefsd_mask, __builtin_ia32_scalefss_mask,
+ __builtin_ia32_scatterdiv8df, __builtin_ia32_scatterdiv8di,
+ __builtin_ia32_scatterdiv16sf, __builtin_ia32_scatterdiv16si,
+ __builtin_ia32_scattersiv16sf, __builtin_ia32_scattersiv16si,
+ __builtin_ia32_scattersiv8df, __builtin_ia32_scattersiv8di,
+ __builtin_ia32_shuf_f32x4_mask, __builtin_ia32_shuf_f64x2_mask,
+ __builtin_ia32_shuf_i32x4_mask, __builtin_ia32_shuf_i64x2_mask,
+ __builtin_ia32_shufpd512_mask, __builtin_ia32_shufps512_mask,
+ __builtin_ia32_sqrtpd512_mask, __builtin_ia32_sqrtps512_mask,
+ __builtin_ia32_sqrtsd_mask, __builtin_ia32_sqrtss_mask,
+ __builtin_ia32_subpd512_mask, __builtin_ia32_subps512_mask,
+ __builtin_ia32_subsd_mask, __builtin_ia32_subss_mask,
+ __builtin_ia32_ucmpd512_mask, __builtin_ia32_ucmpq512_mask,
+ __builtin_ia32_vcomisd, __builtin_ia32_vcomiss,
+ __builtin_ia32_vcvtph2ps512_mask, __builtin_ia32_vcvtps2ph512_mask,
+ __builtin_ia32_vcvtsd2si32, __builtin_ia32_vcvtsd2si64,
+ __builtin_ia32_vcvtsd2usi32, __builtin_ia32_vcvtsd2usi64,
+ __builtin_ia32_vcvtss2si32, __builtin_ia32_vcvtss2si64,
+ __builtin_ia32_vcvtss2usi32, __builtin_ia32_vcvtss2usi64,
+ __builtin_ia32_vcvttsd2si32, __builtin_ia32_vcvttsd2si64,
+ __builtin_ia32_vcvttsd2usi32, __builtin_ia32_vcvttsd2usi64,
+ __builtin_ia32_vcvttss2si32, __builtin_ia32_vcvttss2si64,
+ __builtin_ia32_vcvttss2usi32, __builtin_ia32_vcvttss2usi64,
+ __builtin_ia32_vfmaddpd512_mask, __builtin_ia32_vfmaddpd512_mask3,
+ __builtin_ia32_vfmaddpd512_maskz, __builtin_ia32_vfmaddps512_mask,
+ __builtin_ia32_vfmaddps512_mask3, __builtin_ia32_vfmaddps512_maskz,
+ __builtin_ia32_vfmaddsd3_mask, __builtin_ia32_vfmaddsd3_mask3,
+ __builtin_ia32_vfmaddsd3_maskz, __builtin_ia32_vfmaddss3_mask,
+ __builtin_ia32_vfmaddss3_mask3, __builtin_ia32_vfmaddss3_maskz,
+ __builtin_ia32_vfmaddsubpd512_mask,
+ __builtin_ia32_vfmaddsubpd512_mask3,
+ __builtin_ia32_vfmaddsubpd512_maskz,
+ __builtin_ia32_vfmaddsubps512_mask,
+ __builtin_ia32_vfmaddsubps512_mask3,
+ __builtin_ia32_vfmaddsubps512_maskz,
+ __builtin_ia32_vfmsubaddpd512_mask3,
+ __builtin_ia32_vfmsubaddps512_mask3, __builtin_ia32_vfmsubpd512_mask3,
+ __builtin_ia32_vfmsubps512_mask3, __builtin_ia32_vfmsubsd3_mask3,
+ __builtin_ia32_vfmsubss3_mask3, __builtin_ia32_vfnmaddpd512_mask,
+ __builtin_ia32_vfnmaddps512_mask, __builtin_ia32_vfnmsubpd512_mask,
+ __builtin_ia32_vfnmsubpd512_mask3, __builtin_ia32_vfnmsubps512_mask,
+ __builtin_ia32_vfnmsubps512_mask3, __builtin_ia32_vpermilpd512_mask,
+ __builtin_ia32_vpermilps512_mask, __builtin_ia32_gatherpfdps,
+ __builtin_ia32_gatherpfqps, __builtin_ia32_scatterpfdps,
+ __builtin_ia32_scatterpfqps, __builtin_ia32_exp2pd_mask,
+ __builtin_ia32_exp2ps_mask, __builtin_ia32_rcp28pd_mask,
+ __builtin_ia32_rcp28ps_mask, __builtin_ia32_rsqrt28pd_mask,
+ __builtin_ia32_rsqrt28ps_mask.
+ * gcc.target/i386/sse-14.c (test_1y): New.
+ (test_2y): Ditto.
+ (test_2vx): Ditto.
+ (test_3x): Ditto.
+ (test_3v): Ditto.
+ (test_3vx): Ditto.
+ (test_4x): Ditto.
+ (test_4y): Ditto.
+ (test_4v): Ditto.
+ (pragma GCC target): Add avx512f, avx512er, avx512cd, avx512pf.
+ (tests): Add _mm512_cvt_roundepi32_ps, _mm512_cvt_roundepu32_ps,
+ _mm512_cvt_roundpd_epi32, _mm512_cvt_roundpd_epu32,
+ _mm512_cvt_roundpd_ps, _mm512_cvt_roundph_ps,
+ _mm512_cvt_roundps_epi32, _mm512_cvt_roundps_epu32,
+ _mm512_cvt_roundps_pd, _mm512_cvtps_ph, _mm512_cvtt_roundpd_epi32,
+ _mm512_cvtt_roundpd_epu32, _mm512_cvtt_roundps_epi32,
+ _mm512_cvtt_roundps_epu32, _mm512_extractf32x4_ps,
+ _mm512_extractf64x4_pd, _mm512_extracti32x4_epi32,
+ _mm512_extracti64x4_epi64, _mm512_getexp_round_pd,
+ _mm512_getexp_round_ps, _mm512_getmant_round_pd,
+ _mm512_getmant_round_ps, _mm512_permute_pd, _mm512_permute_ps,
+ _mm512_permutex_epi64, _mm512_permutex_pd, _mm512_rol_epi32,
+ _mm512_rol_epi64, _mm512_ror_epi32, _mm512_ror_epi64,
+ _mm512_shuffle_epi32, _mm512_slli_epi32, _mm512_slli_epi64,
+ _mm512_sqrt_round_pd, _mm512_sqrt_round_ps, _mm512_srai_epi32,
+ _mm512_srai_epi64, _mm512_srli_epi32, _mm512_srli_epi64,
+ _mm_cvt_roundsd_i32, _mm_cvt_roundsd_u32, _mm_cvt_roundss_i32,
+ _mm_cvt_roundss_u32, _mm_cvtt_roundsd_i32, _mm_cvtt_roundsd_u32,
+ _mm_cvtt_roundss_i32, _mm_cvtt_roundss_u32, _mm512_getmant_pd,
+ _mm512_getmant_ps, _mm_cvt_roundi32_ss, _mm512_add_round_pd,
+ _mm512_add_round_ps, _mm512_alignr_epi32, _mm512_alignr_epi64,
+ _mm512_cmp_epi32_mask, _mm512_cmp_epi64_mask, _mm512_cmp_epu32_mask,
+ _mm512_cmp_epu64_mask, _mm512_cmp_pd_mask, _mm512_cmp_ps_mask,
+ _mm512_div_round_pd, _mm512_div_round_ps, _mm512_i32gather_epi32,
+ _mm512_i32gather_epi64, _mm512_i32gather_pd, _mm512_i32gather_ps,
+ _mm512_i64gather_epi32, _mm512_i64gather_epi64, _mm512_i64gather_pd,
+ _mm512_i64gather_ps, _mm512_insertf32x4, _mm512_insertf64x4,
+ _mm512_inserti32x4, _mm512_inserti64x4,
+ _mm512_maskz_cvt_roundepi32_ps, _mm512_maskz_cvt_roundepu32_ps,
+ _mm512_maskz_cvt_roundpd_epi32, _mm512_maskz_cvt_roundpd_epu32,
+ _mm512_maskz_cvt_roundpd_ps, _mm512_maskz_cvt_roundph_ps,
+ _mm512_maskz_cvt_roundps_epi32, _mm512_maskz_cvt_roundps_epu32,
+ _mm512_maskz_cvt_roundps_pd, _mm512_maskz_cvtps_ph,
+ _mm512_maskz_cvtt_roundpd_epi32, _mm512_maskz_cvtt_roundpd_epu32,
+ _mm512_maskz_cvtt_roundps_epi32, _mm512_maskz_cvtt_roundps_epu32,
+ _mm512_maskz_extractf32x4_ps, _mm512_maskz_extractf64x4_pd,
+ _mm512_maskz_extracti32x4_epi32, _mm512_maskz_extracti64x4_epi64,
+ _mm512_maskz_getexp_round_pd, _mm512_maskz_getexp_round_ps,
+ _mm512_maskz_getmant_round_pd, _mm512_maskz_getmant_round_ps,
+ _mm512_maskz_permute_pd, _mm512_maskz_permute_ps,
+ _mm512_maskz_permutex_epi64, _mm512_maskz_permutex_pd,
+ _mm512_maskz_rol_epi32, _mm512_maskz_rol_epi64,
+ _mm512_maskz_ror_epi32, _mm512_maskz_ror_epi64,
+ _mm512_maskz_shuffle_epi32, _mm512_maskz_slli_epi32,
+ _mm512_maskz_slli_epi64, _mm512_maskz_sqrt_round_pd,
+ _mm512_maskz_sqrt_round_ps, _mm512_maskz_srai_epi32,
+ _mm512_maskz_srai_epi64, _mm512_maskz_srli_epi32,
+ _mm512_maskz_srli_epi64, _mm512_max_round_pd, _mm512_max_round_ps,
+ _mm512_min_round_pd, _mm512_min_round_ps, _mm512_mul_round_pd,
+ _mm512_mul_round_ps, _mm512_scalef_round_pd, _mm512_scalef_round_ps,
+ _mm512_shuffle_f32x4, _mm512_shuffle_f64x2, _mm512_shuffle_i32x4,
+ _mm512_shuffle_i64x2, _mm512_shuffle_pd, _mm512_shuffle_ps,
+ _mm512_sub_round_pd, _mm512_sub_round_ps, _mm_add_round_sd,
+ _mm_add_round_ss, _mm_cmp_sd_mask, _mm_cmp_ss_mask,
+ _mm_cvt_roundi64_sd, _mm_cvt_roundi64_ss, _mm_cvt_roundsd_ss,
+ _mm_cvt_roundss_sd, _mm_cvt_roundu32_ss, _mm_cvt_roundu64_sd,
+ _mm_cvt_roundu64_ss, _mm_div_round_sd, _mm_div_round_ss,
+ _mm_getexp_round_sd, _mm_getexp_round_ss, _mm_getmant_round_sd,
+ _mm_getmant_round_ss, _mm_mul_round_sd, _mm_mul_round_ss,
+ _mm_scalef_round_sd, _mm_scalef_round_ss, _mm_sqrt_round_sd,
+ _mm_sqrt_round_ss, _mm_sub_round_sd, _mm_sub_round_ss,
+ _mm512_cmp_round_pd_mask, _mm512_cmp_round_ps_mask,
+ _mm512_maskz_roundscale_round_pd, _mm512_maskz_roundscale_round_ps,
+ _mm_cmp_round_sd_mask, _mm_cmp_round_ss_mask, _mm_comi_round_sd,
+ _mm_comi_round_ss, _mm_roundscale_round_sd, _mm_roundscale_round_ss,
+ _mm512_fmadd_round_pd, _mm512_fmadd_round_ps,
+ _mm512_fmaddsub_round_pd, _mm512_fmaddsub_round_ps,
+ _mm512_fmsub_round_pd, _mm512_fmsub_round_ps,
+ _mm512_fmsubadd_round_pd, _mm512_fmsubadd_round_ps,
+ _mm512_fnmadd_round_pd, _mm512_fnmadd_round_ps,
+ _mm512_fnmsub_round_pd, _mm512_fnmsub_round_ps,
+ _mm512_mask_cmp_epi32_mask, _mm512_mask_cmp_epi64_mask,
+ _mm512_mask_cmp_epu32_mask, _mm512_mask_cmp_epu64_mask,
+ _mm512_mask_cmp_pd_mask, _mm512_mask_cmp_ps_mask,
+ _mm512_mask_cvt_roundepi32_ps, _mm512_mask_cvt_roundepu32_ps,
+ _mm512_mask_cvt_roundpd_epi32, _mm512_mask_cvt_roundpd_epu32,
+ _mm512_mask_cvt_roundpd_ps, _mm512_mask_cvt_roundph_ps,
+ _mm512_mask_cvt_roundps_epi32, _mm512_mask_cvt_roundps_epu32,
+ _mm512_mask_cvt_roundps_pd, _mm512_mask_cvtps_ph,
+ _mm512_mask_cvtt_roundpd_epi32, _mm512_mask_cvtt_roundpd_epu32,
+ _mm512_mask_cvtt_roundps_epi32, _mm512_mask_cvtt_roundps_epu32,
+ _mm512_mask_extractf32x4_ps, _mm512_mask_extractf64x4_pd,
+ _mm512_mask_extracti32x4_epi32, _mm512_mask_extracti64x4_epi64,
+ _mm512_mask_getexp_round_pd, _mm512_mask_getexp_round_ps,
+ _mm512_mask_getmant_round_pd, _mm512_mask_getmant_round_ps,
+ _mm512_mask_permute_pd, _mm512_mask_permute_ps,
+ _mm512_mask_permutex_epi64, _mm512_mask_permutex_pd,
+ _mm512_mask_rol_epi32, _mm512_mask_rol_epi64, _mm512_mask_ror_epi32,
+ _mm512_mask_ror_epi64, _mm512_mask_shuffle_epi32,
+ _mm512_mask_slli_epi32, _mm512_mask_slli_epi64,
+ _mm512_mask_sqrt_round_pd, _mm512_mask_sqrt_round_ps,
+ _mm512_mask_srai_epi32, _mm512_mask_srai_epi64,
+ _mm512_mask_srli_epi32, _mm512_mask_srli_epi64,
+ _mm512_maskz_add_round_pd, _mm512_maskz_add_round_ps,
+ _mm512_maskz_alignr_epi32, _mm512_maskz_alignr_epi64,
+ _mm512_maskz_div_round_pd, _mm512_maskz_div_round_ps,
+ _mm512_maskz_insertf32x4, _mm512_maskz_insertf64x4,
+ _mm512_maskz_inserti32x4, _mm512_maskz_inserti64x4,
+ _mm512_maskz_max_round_pd, _mm512_maskz_max_round_ps,
+ _mm512_maskz_min_round_pd, _mm512_maskz_min_round_ps,
+ _mm512_maskz_mul_round_pd, _mm512_maskz_mul_round_ps,
+ _mm512_maskz_scalef_round_pd, _mm512_maskz_scalef_round_ps,
+ _mm512_maskz_shuffle_f32x4, _mm512_maskz_shuffle_f64x2,
+ _mm512_maskz_shuffle_i32x4, _mm512_maskz_shuffle_i64x2,
+ _mm512_maskz_shuffle_pd, _mm512_maskz_shuffle_ps,
+ _mm512_maskz_sub_round_pd, _mm512_maskz_sub_round_ps,
+ _mm512_ternarylogic_epi32, _mm512_ternarylogic_epi64,
+ _mm_fmadd_round_sd, _mm_fmadd_round_ss, _mm_fmsub_round_sd,
+ _mm_fmsub_round_ss, _mm_fnmadd_round_sd, _mm_fnmadd_round_ss,
+ _mm_fnmsub_round_sd, _mm_fnmsub_round_ss, _mm_mask_cmp_sd_mask,
+ _mm_mask_cmp_ss_mask, _mm_maskz_add_round_sd, _mm_maskz_add_round_ss,
+ _mm_maskz_cvt_roundsd_ss, _mm_maskz_cvt_roundss_sd,
+ _mm_maskz_div_round_sd, _mm_maskz_div_round_ss,
+ _mm_maskz_getexp_round_sd, _mm_maskz_getexp_round_ss,
+ _mm_maskz_getmant_round_sd, _mm_maskz_getmant_round_ss,
+ _mm_maskz_mul_round_sd, _mm_maskz_mul_round_ss,
+ _mm_maskz_scalef_round_sd, _mm_maskz_scalef_round_ss,
+ _mm_maskz_sqrt_round_sd, _mm_maskz_sqrt_round_ss,
+ _mm_maskz_sub_round_sd, _mm_maskz_sub_round_ss,
+ _mm512_i32scatter_epi32, _mm512_i32scatter_epi64,
+ _mm512_i32scatter_pd, _mm512_i32scatter_ps, _mm512_i64scatter_epi32,
+ _mm512_i64scatter_epi64, _mm512_i64scatter_pd, _mm512_i64scatter_ps,
+ _mm512_mask_roundscale_round_pd, _mm512_mask_roundscale_round_ps,
+ _mm512_mask_cmp_round_pd_mask, _mm512_mask_cmp_round_ps_mask,
+ _mm_fixupimm_round_sd, _mm_fixupimm_round_ss,
+ _mm_mask_cmp_round_sd_mask, _mm_mask_cmp_round_ss_mask,
+ _mm_maskz_roundscale_round_sd, _mm_maskz_roundscale_round_ss,
+ _mm512_mask3_fmadd_round_pd, _mm512_mask3_fmadd_round_ps,
+ _mm512_mask3_fmaddsub_round_pd, _mm512_mask3_fmaddsub_round_ps,
+ _mm512_mask3_fmsub_round_pd, _mm512_mask3_fmsub_round_ps,
+ _mm512_mask3_fmsubadd_round_pd, _mm512_mask3_fmsubadd_round_ps,
+ _mm512_mask3_fnmadd_round_pd, _mm512_mask3_fnmadd_round_ps,
+ _mm512_mask3_fnmsub_round_pd, _mm512_mask3_fnmsub_round_ps,
+ _mm512_mask_add_round_pd, _mm512_mask_add_round_ps,
+ _mm512_mask_alignr_epi32, _mm512_mask_alignr_epi64,
+ _mm512_mask_div_round_pd, _mm512_mask_div_round_ps,
+ _mm512_mask_fmadd_round_pd, _mm512_mask_fmadd_round_ps,
+ _mm512_mask_fmaddsub_round_pd, _mm512_mask_fmaddsub_round_ps,
+ _mm512_mask_fmsub_round_pd, _mm512_mask_fmsub_round_ps,
+ _mm512_mask_fmsubadd_round_pd, _mm512_mask_fmsubadd_round_ps,
+ _mm512_mask_fnmadd_round_pd, _mm512_mask_fnmadd_round_ps,
+ _mm512_mask_fnmsub_round_pd, _mm512_mask_fnmsub_round_ps,
+ _mm512_mask_i32gather_epi32, _mm512_mask_i32gather_epi64,
+ _mm512_mask_i32gather_pd, _mm512_mask_i32gather_ps,
+ _mm512_mask_i64gather_epi32, _mm512_mask_i64gather_epi64,
+ _mm512_mask_i64gather_pd, _mm512_mask_i64gather_ps,
+ _mm512_mask_insertf32x4, _mm512_mask_insertf64x4,
+ _mm512_mask_inserti32x4, _mm512_mask_inserti64x4,
+ _mm512_mask_max_round_pd, _mm512_mask_max_round_ps,
+ _mm512_mask_min_round_pd, _mm512_mask_min_round_ps,
+ _mm512_mask_mul_round_pd, _mm512_mask_mul_round_ps,
+ _mm512_mask_scalef_round_pd, _mm512_mask_scalef_round_ps,
+ _mm512_mask_shuffle_f32x4, _mm512_mask_shuffle_f64x2,
+ _mm512_mask_shuffle_i32x4, _mm512_mask_shuffle_i64x2,
+ _mm512_mask_shuffle_pd, _mm512_mask_shuffle_ps,
+ _mm512_mask_sub_round_pd, _mm512_mask_sub_round_ps,
+ _mm512_mask_ternarylogic_epi32, _mm512_mask_ternarylogic_epi64,
+ _mm512_maskz_fmadd_round_pd, _mm512_maskz_fmadd_round_ps,
+ _mm512_maskz_fmaddsub_round_pd, _mm512_maskz_fmaddsub_round_ps,
+ _mm512_maskz_fmsub_round_pd, _mm512_maskz_fmsub_round_ps,
+ _mm512_maskz_fmsubadd_round_pd, _mm512_maskz_fmsubadd_round_ps,
+ _mm512_maskz_fnmadd_round_pd, _mm512_maskz_fnmadd_round_ps,
+ _mm512_maskz_fnmsub_round_pd, _mm512_maskz_fnmsub_round_ps,
+ _mm512_maskz_ternarylogic_epi32, _mm512_maskz_ternarylogic_epi64,
+ _mm_mask3_fmadd_round_sd, _mm_mask3_fmadd_round_ss,
+ _mm_mask3_fmsub_round_sd, _mm_mask3_fmsub_round_ss,
+ _mm_mask3_fnmadd_round_sd, _mm_mask3_fnmadd_round_ss,
+ _mm_mask3_fnmsub_round_sd, _mm_mask3_fnmsub_round_ss,
+ _mm_mask_add_round_sd, _mm_mask_add_round_ss, _mm_mask_cvt_roundsd_ss,
+ _mm_mask_cvt_roundss_sd, _mm_mask_div_round_sd, _mm_mask_div_round_ss,
+ _mm_mask_fmadd_round_sd, _mm_mask_fmadd_round_ss,
+ _mm_mask_fmsub_round_sd, _mm_mask_fmsub_round_ss,
+ _mm_mask_fnmadd_round_sd, _mm_mask_fnmadd_round_ss,
+ _mm_mask_fnmsub_round_sd, _mm_mask_fnmsub_round_ss,
+ _mm_mask_getexp_round_sd, _mm_mask_getexp_round_ss,
+ _mm_mask_getmant_round_sd, _mm_mask_getmant_round_ss,
+ _mm_mask_mul_round_sd, _mm_mask_mul_round_ss,
+ _mm_mask_scalef_round_sd, _mm_mask_scalef_round_ss,
+ _mm_mask_sqrt_round_sd, _mm_mask_sqrt_round_ss, _mm_mask_sub_round_sd,
+ _mm_mask_sub_round_ss, _mm_maskz_fmadd_round_sd,
+ _mm_maskz_fmadd_round_ss, _mm_maskz_fmsub_round_sd,
+ _mm_maskz_fmsub_round_ss, _mm_maskz_fnmadd_round_sd,
+ _mm_maskz_fnmadd_round_ss, _mm_maskz_fnmsub_round_sd,
+ _mm_maskz_fnmsub_round_ss, _mm512_mask_i32scatter_epi32,
+ _mm512_mask_i32scatter_epi64, _mm512_mask_i32scatter_pd,
+ _mm512_mask_i32scatter_ps, _mm512_mask_i64scatter_epi32,
+ _mm512_mask_i64scatter_epi64, _mm512_mask_i64scatter_pd,
+ _mm512_mask_i64scatter_ps, _mm_mask_getmant_sd, _mm_mask_getmant_ss,
+ _mm_mask_roundscale_round_sd, _mm_mask_roundscale_round_ss,
+ _mm512_mask_fixupimm_round_pd, _mm512_mask_fixupimm_round_ps,
+ _mm512_maskz_fixupimm_round_pd, _mm512_maskz_fixupimm_round_ps,
+ _mm_mask_fixupimm_round_sd, _mm_mask_fixupimm_round_ss,
+ _mm_maskz_fixupimm_round_sd, _mm_maskz_fixupimm_round_ss,
+ _mm512_mask_prefetch_i32gather_ps, _mm512_mask_prefetch_i32scatter_ps,
+ _mm512_mask_prefetch_i64gather_ps, _mm512_mask_prefetch_i64scatter_ps,
+ _mm512_exp2a23_round_pd, _mm512_exp2a23_round_ps,
+ _mm512_rcp28_round_pd, _mm512_rcp28_round_ps, _mm512_rsqrt28_round_pd,
+ _mm512_rsqrt28_round_ps, _mm512_maskz_exp2a23_round_pd,
+ _mm512_maskz_exp2a23_round_ps, _mm512_maskz_rcp28_round_pd,
+ _mm512_maskz_rcp28_round_ps, _mm512_maskz_rsqrt28_round_pd,
+ _mm512_maskz_rsqrt28_round_ps, _mm512_mask_exp2a23_round_pd,
+ _mm512_mask_exp2a23_round_ps, _mm512_mask_rcp28_round_pd,
+ _mm512_mask_rcp28_round_ps, _mm512_mask_rsqrt28_round_pd,
+ _mm512_mask_rsqrt28_round_ps.
+ * gcc.target/i386/testimm-10.c: New file.
+ * gcc.target/i386/testround-1.c: Ditto.
+ * gcc.target/i386/testround-2.c: Ditto.
+ * gcc.target/x86_64/abi/avx512f/test_m512_returning.c: Ditto.
+ * gcc.target/x86_64/abi/avx512f/test_passing_m512.c: Ditto.
+ * gcc.target/x86_64/abi/avx512f/test_passing_structs.c: Ditto.
+ * gcc.target/x86_64/abi/avx512f/test_passing_unions.c: Ditto.
+ * gcc.target/i386/avx512cd-check.h: Ditto.
+ * gcc.target/i386/avx512er-check.h: Ditto.
+ * gcc.target/i386/avx512f-check.h: Ditto.
+ * gcc.target/i386/avx512f-helper.h: Ditto.
+ * gcc.target/i386/avx512f-mask-type.h: Ditto.
+ * gcc.target/i386/avx512f-os-support.h: Ditto.
+ * gcc.target/i386/i386.exp (check_effective_target_avx512f): New.
+ (check_effective_target_avx512cd): Ditto.
+ (check_effective_target_avx512er): Ditto.
+ * gcc.target/i386/m128-check.h (CHECK_FP_EXP): Ditto.
+ * gcc.target/i386/m512-check.h: Ditto.
+ * gcc.target/x86_64/abi/avx512f/abi-avx512f.exp: New file.
+ * gcc.target/x86_64/abi/avx512f/args.h: Ditto.
+ * gcc.target/x86_64/abi/avx512f/asm-support.S: Ditto.
+ * gcc.target/x86_64/abi/avx512f/avx512f-check.h: Ditto.
+ * lib/target-supports.exp (check_effective_target_avx512f): New.
+
+2013-12-31 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuznetsov <maxim.kuznetsov@intel.com>
+ Sergey Lega <sergey.s.lega@intel.com>
+ Anna Tikhonova <anna.tikhonova@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/avx-1.c: Extend to AVX-512.
+ * gcc.target/i386/sse-22.c: Ditto.
+ * gcc.target/i386/sse-23.c: Ditto.
+
+2013-12-31 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuznetsov <maxim.kuznetsov@intel.com>
+ Sergey Lega <sergey.s.lega@intel.com>
+ Anna Tikhonova <anna.tikhonova@intel.com>
+ Ilya Tocar <ilya.tocar@intel.com>
+ Andrey Turetskiy <andrey.turetskiy@intel.com>
+ Ilya Verbin <ilya.verbin@intel.com>
+ Kirill Yukhin <kirill.yukhin@intel.com>
+ Michael Zolotukhin <michael.v.zolotukhin@intel.com>
+
+ * gcc.target/i386/pr49002-2.c: allow vmovapd generation.
+
+2013-12-31 Sandra Loosemore <sandra@codesourcery.com>
+ Chung-Lin Tang <cltang@codesourcery.com>
+ Based on patches from Altera Corporation
+
+ * gcc.dg/stack-usage-1.c (SIZE): Define case for __nios2__.
+ * gcc.dg/20040813-1.c: Skip for nios2-*-*.
+ * gcc.dg/20020312-2.c: Add __nios2__ case.
+ * g++.dg/other/PR23205.C: Skip for nios2-*-*.
+ * g++.dg/other/pr23205-2.C: Skip for nios2-*-*.
+ * g++.dg/cpp0x/constexpr-rom.C: Skip for nios2-*-*.
+ * g++.dg/cpp0x/alias-decl-debug-0.C: Skip for nios2-*-*.
+ * g++.old-deja/g++.jason/thunk3.C: Skip for nios2-*-*.
+ * lib/target-supports.exp (check_profiling_available): Check for
+ nios2-*-elf.
+ * gcc.c-torture/execute/pr47237.x:: Skip for nios2-*-*.
+ * gcc.c-torture/execute/20101011-1.c: Skip for nios2-*-*.
+ * gcc.c-torture/execute/builtins/lib/chk.c (memset): Place
+ char-based memset loop before inline check, to prevent
+ problems when called to initialize .bss. Update comments.
+ * gcc.target/nios2/nios2.exp: New DejaGNU file.
+ * gcc.target/nios2/nios2-custom-1.c: New test.
+ * gcc.target/nios2/nios2-trap-insn.c: New test.
+ * gcc.target/nios2/nios2-builtin-custom.c: New test.
+ * gcc.target/nios2/nios2-builtin-io.c: New test.
+ * gcc.target/nios2/nios2-stack-check-1.c: New test.
+ * gcc.target/nios2/nios2-stack-check-2.c: New test.
+ * gcc.target/nios2/nios2-rdctl.c: New test.
+ * gcc.target/nios2/nios2-wrctl.c: New test.
+ * gcc.target/nios2/nios2-wrctl-zero.c: New test.
+ * gcc.target/nios2/nios2-wrctl-not-zero.c: New test.
+ * gcc.target/nios2/nios2-rdwrctl-1.c: New test.
+ * gcc.target/nios2/nios2-reg-constraints.c: New test.
+ * gcc.target/nios2/nios2-ashlsi3-one_shift.c: New test.
+ * gcc.target/nios2/nios2-mul-options-1.c: New test.
+ * gcc.target/nios2/nios2-mul-options-2.c: New test.
+ * gcc.target/nios2/nios2-mul-options-3.c: New test.
+ * gcc.target/nios2/nios2-mul-options-4.c: New test.
+ * gcc.target/nios2/nios2-nor.c: New test.
+ * gcc.target/nios2/nios2-stxio.c: New test.
+ * gcc.target/nios2/custom-fp-1.c: New test.
+ * gcc.target/nios2/custom-fp-2.c: New test.
+ * gcc.target/nios2/custom-fp-3.c: New test.
+ * gcc.target/nios2/custom-fp-4.c: New test.
+ * gcc.target/nios2/custom-fp-5.c: New test.
+ * gcc.target/nios2/custom-fp-6.c: New test.
+ * gcc.target/nios2/custom-fp-7.c: New test.
+ * gcc.target/nios2/custom-fp-8.c: New test.
+ * gcc.target/nios2/custom-fp-cmp-1.c: New test.
+ * gcc.target/nios2/custom-fp-conversion.c: New test.
+ * gcc.target/nios2/custom-fp-double.c: New test.
+ * gcc.target/nios2/custom-fp-float.c: New test.
+ * gcc.target/nios2/nios2-int-types.c: New test.
+ * gcc.target/nios2/nios2-cache-1.c: New test.
+ * gcc.target/nios2/nios2-cache-2.c: New test.
+
+2013-12-30 Mike Stump <mikestump@comcast.net>
+
+ PR c++/41090
+ * g++.dg/ext/label13.C: Update to not expect failures.
+
+2013-12-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58998
+ * gfortran.dg/generic_28.f90: New.
+
+2013-12-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59591
+ * gcc.dg/vect/pr59591-1.c: New test.
+ * gcc.dg/vect/pr59591-2.c: New test.
+ * gcc.target/i386/pr59591-1.c: New test.
+ * gcc.target/i386/pr59591-2.c: New test.
+
+ PR target/59501
+ * gcc.target/i386/pr59501-1.c: New test.
+ * gcc.target/i386/pr59501-1a.c: New test.
+ * gcc.target/i386/pr59501-2.c: New test.
+ * gcc.target/i386/pr59501-2a.c: New test.
+ * gcc.target/i386/pr59501-3.c: New test.
+ * gcc.target/i386/pr59501-3a.c: New test.
+ * gcc.target/i386/pr59501-4.c: New test.
+ * gcc.target/i386/pr59501-4a.c: New test.
+ * gcc.target/i386/pr59501-5.c: New test.
+ * gcc.target/i386/pr59501-6.c: New test.
+
+2013-12-30 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59605
+ * gcc.dg/pr59605.c: New test.
+
+2013-12-27 Yury Gribov <y.gribov@samsung.com>
+
+ PR target/59585
+ * c-c++-common/ubsan/div-by-zero-1.c: Fixed pattern.
+ * c-c++-common/ubsan/div-by-zero-2.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-3.c: Likewise.
+ * c-c++-common/ubsan/load-bool-enum.c: Likewise.
+ * c-c++-common/ubsan/overflow-add-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-2.c: Likewise.
+ * c-c++-common/ubsan/overflow-mul-4.c: Likewise.
+ * c-c++-common/ubsan/overflow-negate-1.c: Likewise.
+ * c-c++-common/ubsan/overflow-sub-2.c: Likewise.
+ * c-c++-common/ubsan/pr59333.c: Likewise.
+ * c-c++-common/ubsan/shift-1.c: Likewise.
+ * c-c++-common/ubsan/shift-2.c: Likewise.
+ * c-c++-common/ubsan/shift-4.c: Likewise.
+ * c-c++-common/ubsan/vla-1.c: Likewise.
+
+2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * g++.old-deja/g++.other/store-expr1.C (dg-options): Replace
+ -mtune=i686 with -mtune=generic.
+ * g++.old-deja/g++.other/store-expr2.C (dg-options): Likewise.
+
+2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.target/i386/andor-2.c (dg-options): Replace -mtune=i686
+ with -mtune=generic.
+
+2013-12-26 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59588
+ * gcc.target/i386/pr59588-1.c: New file.
+ * gcc.target/i386/pr59588-2.c: Likewise.
+
+2013-12-26 Uros Bizjak <ubizjak@gmail.com>
+ H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59601
+ * g++.dg/ext/mv14.C: New tests.
+ * g++.dg/ext/mv15.C: Likewise.
+
+2013-12-25 Allan Sandfeld Jensen <sandfeld@kde.org>
+
+ PR target/59422
+ * gcc.target/i386/funcspec-5.c (test_fma, test_xop, test_no_fma,
+ test_no_xop, test_arch_corei7, test_arch_corei7_avx,
+ test_arch_core_avx2, test_arch_bdver1, test_arch_bdver2,
+ test_arch_bdver3, test_tune_corei7, test_tune_corei7_avx,
+ test_tune_core_avx2, test_tune_bdver1, test_tune_bdver2 and
+ test_tune_bdver3): New function prototypes.
+
+2013-12-24 Renlin Li <Renlin.Li@arm.com>
+
+ * gcc.target/arm/fixed_float_conversion.c: New test case.
+
+2013-12-23 Bingfeng Mei <bmei@broadcom.com>
+
+ * gcc.dg/vect/vect-neg-store-1.c: New test.
+ * gcc.dg/vect/vect-neg-store-2.c: Ditto.
+
+2013-12-23 Bingfeng Mei <bmei@broadcom.com>
+
+ PR middle-end/59569
+ * gcc.c-torture/compile/pr59569-1.c: New test.
+ * gcc.c-torture/compile/pr59569-2.c: Ditto.
+
+2013-12-23 Marek Polacek <polacek@redhat.com>
+
+ PR c++/59111
+ * g++.dg/cpp0x/pr59111.C: New test.
+ * g++.dg/cpp1y/pr59110.C: New test.
+
+2013-12-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/x86_64/abi/callabi/func-2a.c (dg-do): Remove
+ target selector.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2a.c (dg-do): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-4a.c (dg-do): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-5a.c (dg-do): Ditto.
+
+2013-12-20 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/nested-apcs.c: New test.
+
+2013-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/59255
+ * g++.dg/tree-prof/pr59255.C: New test.
+
+2013-12-20 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/neon-vceq_p64.c: New test.
+ * gcc.target/arm/neon-vtst_p64.c: Likewise.
+
+2013-12-20 Bingfeng Mei <bmei@broadcom.com>
+
+ PR tree-optimization/59544
+ * gcc.target/i386/pr59544.c: New test.
+
+2013-12-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59413
+ * gcc.c-torture/execute/pr59413.c: New test.
+
+ * c-c++-common/ubsan/load-bool-enum.c: New test.
+
+2013-12-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_crypto_ok):
+ New procedure.
+ (add_options_for_arm_crypto): Likewise.
+ * gcc.target/arm/crypto-vaesdq_u8.c: New test.
+ * gcc.target/arm/crypto-vaeseq_u8.c: Likewise.
+ * gcc.target/arm/crypto-vaesimcq_u8.c: Likewise.
+ * gcc.target/arm/crypto-vaesmcq_u8.c: Likewise.
+ * gcc.target/arm/crypto-vldrq_p128.c: Likewise.
+ * gcc.target/arm/crypto-vmull_high_p64.c: Likewise.
+ * gcc.target/arm/crypto-vmullp64.c: Likewise.
+ * gcc.target/arm/crypto-vsha1cq_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha1h_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha1mq_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha1pq_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha1su0q_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha1su1q_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha256h2q_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha256hq_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha256su0q_u32.c: Likewise.
+ * gcc.target/arm/crypto-vsha256su1q_u32.c: Likewise.
+ * gcc.target/arm/crypto-vstrq_p128.c: Likewise.
+ * gcc.target/arm/neon/vbslQp64: Generate.
+ * gcc.target/arm/neon/vbslp64: Likewise.
+ * gcc.target/arm/neon/vcombinep64: Likewise.
+ * gcc.target/arm/neon/vcreatep64: Likewise.
+ * gcc.target/arm/neon/vdupQ_lanep64: Likewise.
+ * gcc.target/arm/neon/vdupQ_np64: Likewise.
+ * gcc.target/arm/neon/vdup_lanep64: Likewise.
+ * gcc.target/arm/neon/vdup_np64: Likewise.
+ * gcc.target/arm/neon/vextQp64: Likewise.
+ * gcc.target/arm/neon/vextp64: Likewise.
+ * gcc.target/arm/neon/vget_highp64: Likewise.
+ * gcc.target/arm/neon/vget_lowp64: Likewise.
+ * gcc.target/arm/neon/vld1Q_dupp64: Likewise.
+ * gcc.target/arm/neon/vld1Q_lanep64: Likewise.
+ * gcc.target/arm/neon/vld1Qp64: Likewise.
+ * gcc.target/arm/neon/vld1_dupp64: Likewise.
+ * gcc.target/arm/neon/vld1_lanep64: Likewise.
+ * gcc.target/arm/neon/vld1p64: Likewise.
+ * gcc.target/arm/neon/vld2_dupp64: Likewise.
+ * gcc.target/arm/neon/vld2p64: Likewise.
+ * gcc.target/arm/neon/vld3_dupp64: Likewise.
+ * gcc.target/arm/neon/vld3p64: Likewise.
+ * gcc.target/arm/neon/vld4_dupp64: Likewise.
+ * gcc.target/arm/neon/vld4p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQf32_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQf32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_f32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_p16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_p8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_s16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_s32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_s64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_s8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_u16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_u32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_u64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp128_u8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp16_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_f32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_p16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_p8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_s16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_s32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_s64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_s8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_u16: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_u32: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_u64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp64_u8: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp8_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQp8_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs16_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs32_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs64_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs64_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs8_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQs8_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu16_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu32_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu64_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu64_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu8_p128: Likewise.
+ * gcc.target/arm/neon/vreinterpretQu8_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretf32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretp16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_f32: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_p16: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_p8: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_s16: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_s32: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_s64: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_s8: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_u16: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_u32: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_u64: Likewise.
+ * gcc.target/arm/neon/vreinterpretp64_u8: Likewise.
+ * gcc.target/arm/neon/vreinterpretp8_p64: Likewise.
+ * gcc.target/arm/neon/vreinterprets16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterprets32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterprets64_p64: Likewise.
+ * gcc.target/arm/neon/vreinterprets8_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretu16_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretu32_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretu64_p64: Likewise.
+ * gcc.target/arm/neon/vreinterpretu8_p64: Likewise.
+ * gcc.target/arm/neon/vsliQ_np64: Likewise.
+ * gcc.target/arm/neon/vsli_np64: Likewise.
+ * gcc.target/arm/neon/vsriQ_np64: Likewise.
+ * gcc.target/arm/neon/vsri_np64: Likewise.
+ * gcc.target/arm/neon/vst1Q_lanep64: Likewise.
+ * gcc.target/arm/neon/vst1Qp64: Likewise.
+ * gcc.target/arm/neon/vst1_lanep64: Likewise.
+ * gcc.target/arm/neon/vst1p64: Likewise.
+ * gcc.target/arm/neon/vst2p64: Likewise.
+ * gcc.target/arm/neon/vst3p64: Likewise.
+ * gcc.target/arm/neon/vst4p64: Likewise.
+
+2013-12-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (add_options_for_arm_crc): New procedure.
+ (check_effective_target_arm_crc_ok_nocache): Likewise.
+ (check_effective_target_arm_crc_ok): Likewise.
+ * gcc.target/arm/acle/: New directory.
+ * gcc.target/arm/acle/acle.exp: New.
+ * gcc.target/arm/acle/crc32b.c: New test.
+ * gcc.target/arm/acle/crc32h.c: Likewise.
+ * gcc.target/arm/acle/crc32w.c: Likewise.
+ * gcc.target/arm/acle/crc32d.c: Likewise.
+ * gcc.target/arm/acle/crc32cb.c: Likewise.
+ * gcc.target/arm/acle/crc32ch.c: Likewise.
+ * gcc.target/arm/acle/crc32cw.c: Likewise.
+ * gcc.target/arm/acle/crc32cd.c: Likewise.
+
+2013-12-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * c-c++-common/cilk-plus/SE/ef_error.c: Use -fopen-simd.
+
+2013-12-19 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.dg/long-long-compare-1.c: Don't use deprecated -mcbranchdi option
+ for target sh4-*-*.
+
+2013-12-19 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/pmull_1.c: New.
+
+2013-12-19 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/sha256_1.c: New.
+
+2013-12-19 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/sha1_1.c: New.
+
+2013-12-19 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/aes_1.c: New.
+
+2013-12-19 Dominik Vogt <vogt@linux.vnet.ibm.com>
+ Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/hotpatch-1.c: New test
+ * gcc.target/s390/hotpatch-2.c: New test
+ * gcc.target/s390/hotpatch-3.c: New test
+ * gcc.target/s390/hotpatch-4.c: New test
+ * gcc.target/s390/hotpatch-5.c: New test
+ * gcc.target/s390/hotpatch-6.c: New test
+ * gcc.target/s390/hotpatch-7.c: New test
+ * gcc.target/s390/hotpatch-8.c: New test
+ * gcc.target/s390/hotpatch-9.c: New test
+ * gcc.target/s390/hotpatch-10.c: New test
+ * gcc.target/s390/hotpatch-11.c: New test
+ * gcc.target/s390/hotpatch-12.c: New test
+ * gcc.target/s390/hotpatch-compile-1.c: New test
+ * gcc.target/s390/hotpatch-compile-2.c: New test
+ * gcc.target/s390/hotpatch-compile-3.c: New test
+ * gcc.target/s390/hotpatch-compile-4.c: New test
+ * gcc.target/s390/hotpatch-compile-5.c: New test
+ * gcc.target/s390/hotpatch-compile-6.c: New test
+ * gcc.target/s390/hotpatch-compile-7.c: New test
+
+2013-12-19 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * c-c++-common/cilk-plus/SE/ef_error.c: Add fopenmp effective
+ target check.
+
+2013-12-18 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ * gfortran.dg/io_err_1.f90: New test.
+
+2013-12-18 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/SE/ef_test.c: New test.
+ * c-c++-common/cilk-plus/SE/ef_test2.c: Likewise.
+ * c-c++-common/cilk-plus/SE/vlength_errors.c: Likewise.
+ * c-c++-common/cilk-plus/SE/ef_error.c: Likewise.
+ * c-c++-common/cilk-plus/SE/ef_error2.c: Likewise.
+ * c-c++-common/cilk-plus/SE/ef_error3.c: Likewise.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Added calls for the above tests.
+
+2013-12-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/59539
+ * gcc.target/i386/pr59539-1.c: New test.
+ * gcc.target/i386/pr59539-2.c: New test.
+
+2013-12-18 Nick Clifton <nickc@redhat.com>
+
+ * gcc.dg/pr32912-2.c: Fix for 16-bit targets.
+
+2013-12-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr59418.c: New test.
+
+2013-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59523
+ * gcc.dg/pr59523.c: New test.
+
+2013-12-17 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/overflow-int128.c: New test.
+
+2013-12-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR ipa/58290
+ * gfortran.dg/pr58290.f90: New test.
+
+2013-12-17 Thomas Schwinge <thomas@codesourcery.com>
+
+ * gcc.dg/dfp/wtr-conversion-1.c (testfunc1): Fix typo.
+
+2013-12-17 Jan Hubicka <hubicka@ucw.cz>
+
+ * g++.dg/ipa/devirt-13.C: Update template.
+
+2013-12-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54949
+ * gfortran.dg/proc_ptr_44.f90: New.
+
+2013-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/ubsan/overflow-mul-3.c: New test.
+ * c-c++-common/ubsan/overflow-mul-4.c: New test.
+
+ PR libgomp/59337
+ * gfortran.dg/gomp/pr59337.f90: New test.
+
+2013-12-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58956
+ PR middle-end/59470
+ * gcc.target/i386/pr59470.c: New test.
+
+2013-12-14 Jan Hubicka <jh@suse.cz>
+
+ PR ipa/59265
+ * g++.dg/torture/pr59265.C: New testcase.
+
+2013-12-15 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/vect/vect-nop-move.c (foo32x2_be): Call
+ __builtin_ia32_emms for 32bit x86 targets.
+ (foo32x2_le): Ditto.
+ (main): Reorder function calls.
+
+2013-12-15 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr57756.c (dg-options): Add -mno-sse3.
+
+2013-12-15 Uros Bizjak <ubizjak@gmail.com>
+
+ PR testsuite/58630
+ * gcc.target/i386/pr43662.c (dg-options):
+ Add -maccumulate-outgoing-args.
+ * gcc.target/i386/pr43869.c (dg-options): Ditto.
+ * gcc.target/i386/pr57003.c (dg-options): Ditto.
+ * gcc.target/i386/avx-vzeroupper-16.c (dg-options):
+ Remove -mtune=generic and add -maccumulate-outgoing-args instead.
+ * gcc.target/i386/avx-vzeroupper-17.c (dg-options): Ditto.
+ * gcc.target/i386/avx-vzeroupper-18.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-1.c (dg-options):
+ Add -maccumulate-outgoing-args.
+ * gcc.target/x86_64/abi/callabi/func-2a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-2b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/func-indirect-2b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/leaf-1.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/leaf-2.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/pr38891.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-1.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-2.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-3.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-4a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-4b.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-5a.c (dg-options): Ditto.
+ * gcc.target/x86_64/abi/callabi/vaarg-5b.c (dg-options): Ditto.
+
+2013-12-15 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59493
+ * gfortran.dg/unlimited_polymorphic_15.f90: New.
+
+2013-12-14 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/58477
+ * g++.dg/ipa/devirt-19.C: New testcase.
+
+2013-12-14 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/overflow-negate-1.c: Add more testing. Don't
+ require int128 target.
+ * c-c++-common/ubsan/overflow-negate-2.c: New test.
+
+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59502
+ * gfortran.dg/class_57.f90: New.
+
+2013-12-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59492
+ * g++.dg/other/pr59492.C: New file.
+
+2013-12-14 Andreas Schwab <schwab@linux-m68k.org>
+
+ * g++.dg/cilk-plus/cilk-plus.exp: Fix last change.
+
+2013-12-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr59350.c: New test.
+
+2013-12-14 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/overflow-1.c: New test.
+ * c-c++-common/ubsan/overflow-2.c: New test.
+
+2013-12-14 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59503
+ * c-c++-common/ubsan/pr59503.c: New test.
+
+2013-12-14 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59450
+ * gfortran.dg/typebound_proc_31.f90: New.
+
+2013-12-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/cilk-plus/cilk-plus.exp: Properly set ld_library_path.
+ Use TEST_EXTRA_LIBS instead of ALWAYS_CFLAGS.
+
+2013-12-03 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/45685
+ * gcc.dg/tree-ssa/pr45685.c: New test.
+
+2013-12-13 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/58296
+ PR tree-optimization/41488
+ * gcc.dg/tree-ssa/scev-7.c: New test.
+ * gcc.dg/pr41488.c: New test.
+ * g++.dg/pr59445.C: New test.
+
+2013-12-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/59440
+ * gfortran.dg/namelist_83.f90: New.
+ * gfortran.dg/namelist_83_2.f90: New.
+
+2013-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/59470
+ * g++.dg/opt/pr59470.C: New test.
+
+2013-12-12 Max Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * c-c++-common/tsan/free_race2.c: New file.
+ * c-c++-common/tsan/race_on_barrier2.c: Likewise.
+ * c-c++-common/tsan/race_on_mutex.c: Likewise.
+ * c-c++-common/tsan/race_on_mutex2.c: Likewise.
+ * c-c++-common/tsan/simple_race.c: Likewise.
+ * c-c++-common/tsan/simple_stack.c: Likewise.
+ * g++.dg/tsan/aligned_vs_unaligned_race.C: Likewise.
+ * g++.dg/tsan/atomic_free.C: Likewise.
+ * g++.dg/tsan/atomic_free2.C: Likewise.
+ * g++.dg/tsan/benign_race.C: Likewise.
+ * g++.dg/tsan/cond_race.C: Likewise.
+ * g++.dg/tsan/default_options.C: Likewise.
+ * g++.dg/tsan/fd_close_norace.C: Likewise.
+ * g++.dg/tsan/fd_close_norace2.C: Likewise.
+ * g++-dg/tsan/tsan.exp: Modified to run additional C++ tests.
+
+2013-12-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR libgomp/59467
+ * gfortran.dg/gomp/pr59467.f90: New test.
+ * c-c++-common/gomp/pr59467.c: New test.
+
+2013-12-12 Ryan Mansfield <rmansfield@qnx.com>
+
+ PR testsuite/59442
+ * gcc.target/i386/sse2-movapd-1.c: Fix alignment attributes.
+ * gcc.target/i386/sse2-movapd-2.c: Likewise.
+ * gcc.target/i386/avx-vmovapd-256-1.c: Likewise.
+ * gcc.target/i386/avx-vmovapd-256-2.c: Likewise.
+
+2013-12-11 Sriraman Tallam <tmsriram@google.com>
+
+ PR target/59390
+ * gcc.target/i386/pr59390.c: New test.
+ * gcc.target/i386/pr59390_1.c: New test.
+ * gcc.target/i386/pr59390_2.c: New test.
+
+2013-12-11 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * g++.dg/cilk-plus/CK/catch_exc.cc: New test case.
+ * g++.dg/cilk-plus/CK/const_spawn.cc: Likewise.
+ * g++.dg/cilk-plus/CK/fib-opr-overload.cc: Likewise.
+ * g++.dg/cilk-plus/CK/fib-tplt.cc: Likewise.
+ * g++.dg/cilk-plus/CK/lambda_spawns.cc: Likewise.
+ * g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc: Likewise.
+ * g++.dg/cilk-plus/cilk-plus.exp: Added support to run Cilk Keywords
+ test stored in c-c++-common. Also, added the Cilk runtime's library
+ to the ld_library_path.
+
+2013-12-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/59134
+ * gcc.c-torture/compile/pr59134.c: New test.
+ * gnat.dg/misaligned_volatile.adb: New test.
+
+2013-12-11 Bernd Edlinger <bernd.edlinger@hotmail.de>
+ Sandra Loosemore <sandra@codesourcery.com>
+
+ * gcc.dg/pr23623.c: Update to test interaction with C++ memory model.
+
+2013-12-11 Sandra Loosemore <sandra@codesourcery.com>
+
+ PR middle-end/23623
+ PR middle-end/48784
+ PR middle-end/56341
+ PR middle-end/56997
+ * gcc.dg/pr23623.c: New test.
+ * gcc.dg/pr48784-1.c: New test.
+ * gcc.dg/pr48784-2.c: New test.
+ * gcc.dg/pr56341-1.c: New test.
+ * gcc.dg/pr56341-2.c: New test.
+ * gcc.dg/pr56997-1.c: New test.
+ * gcc.dg/pr56997-2.c: New test.
+ * gcc.dg/pr56997-3.c: New test.
+
+2013-12-11 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58916
+ * gfortran.dg/allocate_with_source_4.f90: New.
+
+2013-12-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59417
+ * gcc.c-torture/compile/pr59417.c: New test.
+
+ PR tree-optimization/59386
+ * gcc.c-torture/compile/pr59386.c: New test.
+
+2013-12-11 Bin Cheng <bin.cheng@arm.com>
+
+ Reverted:
+ 2013-12-10 Bin Cheng <bin.cheng@arm.com>
+ PR tree-optimization/41488
+ * gcc.dg/tree-ssa/scev-7.c: New test.
+ * gcc.dg/pr41488.c: New test.
+
+2013-12-10 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/35831
+ * gfortran.dg/c_by_val_5.f90: Modified.
+ * gfortran.dg/dummy_procedure_10.f90: New.
+
+2013-12-10 Yury Gribov <y.gribov@samsung.com>
+
+ * gcc-dg/tsan/tsan.exp: Added missing call to torture-finish.
+ * g++-dg/tsan/tsan.exp: Likewise.
+
+2013-12-10 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/38474
+ * gcc.dg/ipa/ipa-pta-14.c: Un-XFAIL.
+
+2013-12-10 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vect/vect-cond-11.c: New test.
+ * gcc.target/i386/vect-cond-1.c: New test.
+ * gcc.target/i386/avx2-gather-5.c: New test.
+ * gcc.target/i386/avx2-gather-6.c: New test.
+ * gcc.dg/vect/vect-mask-loadstore-1.c: New test.
+ * gcc.dg/vect/vect-mask-load-1.c: New test.
+
+2013-12-09 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59437
+ * g++.dg/ubsan/pr59437.C: New test.
+
+2013-12-10 Max Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * c-c++-common/tsan/thread_leak2.c: `dg-skip-if' removed.
+ * gcc-dg/tsan/tsan.exp: Run only with '-O0' and '-O2' options.
+ * g++-dg/tsan/tsan.exp: Likewise.
+
+2013-12-10 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/vect/pr58508.c: XFAIL for vect_no_align.
+ * gcc.dg/vect/vect-reduc-pattern-3.c: Require vect_int_mult.
+
+2013-12-10 Bin Cheng <bin.cheng@arm.com>
+
+ PR tree-optimization/41488
+ * gcc.dg/tree-ssa/scev-7.c: New test.
+ * gcc.dg/pr41488.c: New test.
+
+2013-12-09 Joseph Myers <joseph@codesourcery.com>
+
+ PR preprocessor/55715
+ * gcc.dg/cpp/expr-overflow-1.c: New test.
+
+2013-12-10 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/59428
+ PR fortran/58099
+ PR fortran/58676
+ PR fortran/41724
+ * gfortran.dg/proc_ptr_result_4.f90: Fix proc-ptr interface.
+
+2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59435
+ * g++.dg/cpp0x/variadic-sizeof3.C: New.
+
+2013-12-09 David Malcolm <dmalcolm@redhat.com>
+
+ * g++.dg/plugin/selfassign.c (execute_warn_self_assign): Eliminate
+ use of FOR_EACH_BB in favor of FOR_EACH_BB_FN, to make use of cfun
+ explicit.
+ * gcc.dg/plugin/selfassign.c (execute_warn_self_assign): Likewise.
+
+2013-12-09 Richard Earnshaw <rearnsha@arm.com>
+
+ * gcc.target/arm/ldrd-strd-offset.c: New.
+
+2013-12-09 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.c-torture/compile/pr39834.c: Remove optimization level option.
+ * gcc.c-torture/compile/pr48929.c: Likewise.
+ * gcc.c-torture/compile/pr55569.c: Likewise.
+ * gcc.c-torture/compile/sra-1.c: Likewise.
+ * gcc.c-torture/compile/pr45085.c: Moved to...
+ * gcc.dg/tree-ssa/pr45085.c: ...here, added compile dg-do.
+
+2013-12-09 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59415
+ * g++.dg/ubsan/pr59415.C: New test.
+
+2013-12-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52707
+ * g++.dg/cpp0x/deleted2.C: New.
+
+2013-12-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.dg/tree-ssa/loop-31.c: Update scan pattern.
+
+2013-12-09 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * lib/asan-dg.exp (asan-gtest): Remove expected output from the
+ pass/fail line and add it to the log instead.
+
+2013-12-08 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52898
+ PR target/51697
+ * gcc.target/sh/pr51697.c: New.
+
+2013-12-08 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/macro-fusion-1.c: Cleanup sched2 rtl dump.
+ * gcc.dg/macro-fusion-2.c: Ditto.
+ * gcc.dg/vect/vect-simd-clone-10a.c: Cleanup vect tree dump.
+ * gcc.dg/vect/vect-simd-clone-12a.c: Ditto.
+
+2013-12-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58099
+ PR fortran/58676
+ PR fortran/41724
+ * gfortran.dg/elemental_subroutine_8.f90: New.
+ * gfortran.dg/proc_decl_9.f90: Add ELEMENTAL to make valid.
+ * gfortran.dg/proc_ptr_11.f90: Ditto.
+ * gfortran.dg/proc_ptr_result_8.f90: Ditto.
+ * gfortran.dg/proc_ptr_32.f90: Update dg-error.
+ * gfortran.dg/proc_ptr_33.f90: Ditto.
+ * gfortran.dg/proc_ptr_result_1.f90: Add abstract interface
+ which is not elemental.
+ * gfortran.dg/proc_ptr_result_7.f90: Ditto.
+
+2013-12-07 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59414
+ * gfortran.dg/class_result_2.f90: New.
+
+2013-12-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59388
+ * gcc.c-torture/execute/pr59388.c: New test.
+
+2013-12-06 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR testsuite/59043
+ * g++.dg/pubtypes.C: Adjust the regular expression.
+ * gcc.dg/pubtypes-1.c: Likewise.
+ * gcc.dg/pubtypes-2.c: Likewise.
+ * gcc.dg/pubtypes-3.c: Likewise.
+ * gcc.dg/pubtypes-4.c: Likewise.
+
+2013-12-06 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.dg/vect/vect-nop-move.c: Fix dg options.
+
+2013-12-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/59405
+ * gcc.target/i386/pr59405.c: New test.
+
+2013-12-06 Ian Bolton <ian.bolton@arm.com>
+ Mark Mitchell <mark@codesourcery.com>
+
+ PR target/59091
+ * gcc.target/arm/builtin-trap.c: New test.
+ * gcc.target/arm/thumb-builtin-trap.c: Likewise.
+
+2013-12-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/sparc/pdistn.c: New test.
+ * gcc.target/sparc/pdistn-2.c: Likewise.
+
+2013-12-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59058
+ * gcc.dg/torture/pr59058.c: New testcase.
+
+2013-12-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/warn/pr15774-1.C: Adjust expected message.
+
+2013-12-05 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/59317
+ * gcc.target/mips/pr59317.c: New.
+
+2013-12-05 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59333
+ PR sanitizer/59397
+ * c-c++-common/ubsan/pr59333.c: New test.
+ * c-c++-common/ubsan/pr59397.c: New test.
+
+2013-12-05 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.dg/vect/vect-nop-move.c: New test.
+
+2013-12-05 Max Ostapenko <m.ostapenko@partner.samsung.com>
+
+ * c-c++-common/tsan/atomic_stack.c: New test.
+ * c-c++-common/tsan/fd_pipe_race.c: New test.
+ * c-c++-common/tsan/free_race.c: New test.
+ * c-c++-common/tsan/mutexset1.c: New test.
+ * c-c++-common/tsan/race_on_barrier.c: New test.
+ * c-c++-common/tsan/sleep_sync.c: New test.
+ * c-c++-common/tsan/thread_leak.c: New test.
+ * c-c++-common/tsan/thread_leak1.c: New test.
+ * c-c++-common/tsan/thread_leak2.c: New test.
+ * c-c++-common/tsan/tiny_race.c: New test.
+ * c-c++-common/tsan/tls_race.c: New test.
+ * c-c++-common/tsan/write_in_reader_lock.c: New test.
+ * lib/tsan-dg.exp: New file.
+ * gcc.dg/tsan/tsan.exp: New file.
+ * g++.dg/tsan/tsan.exp: New file.
+ * g++.dg/dg.exp: Prune tsan subdirectory.
+
+2013-12-05 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/readeflags-1.c: New.
+ * gcc.target/i386/writeeflags-1.c: Ditto.
+
+2013-12-05 Yury Gribov <y.gribov@samsung.com>
+
+ PR sanitizer/59369
+ * c-c++-common/asan/pr59063-1.c: Disable on non-Linux platforms.
+ * c-c++-common/asan/pr59063-2.c: Likewise.
+
+2013-12-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/constexpr-46336.C: Adjust expected messages.
+ * g++.dg/cpp0x/defaulted2.C: Likewise.
+ * g++.dg/cpp1y/auto-fn8.C: Likewise.
+ * g++.dg/gomp/udr-3.C: Likewise.
+ * g++.dg/lookup/extern-c-redecl5.C: Likewise.
+ * g++.dg/lookup/linkage1.C: Likewise.
+ * g++.dg/overload/new1.C: Likewise.
+ * g++.dg/parse/friend5.C: Likewise.
+ * g++.dg/parse/namespace-alias-1.C: Likewise.
+ * g++.dg/parse/namespace10.C: Likewise.
+ * g++.dg/parse/redef2.C: Likewise.
+ * g++.dg/template/friend44.C: Likewise.
+ * g++.old-deja/g++.brendan/crash42.C: Likewise.
+ * g++.old-deja/g++.brendan/crash52.C: Likewise.
+ * g++.old-deja/g++.brendan/crash55.C: Likewise.
+ * g++.old-deja/g++.jason/overload21.C: Likewise.
+ * g++.old-deja/g++.jason/overload5.C: Likewise.
+ * g++.old-deja/g++.jason/redecl1.C: Likewise.
+ * g++.old-deja/g++.law/arm8.C: Likewise.
+ * g++.old-deja/g++.other/main1.C: Likewise.
+
+2013-12-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56787
+ * gcc.dg/vect/pr56787.c: Adjust to not require vector float division.
+
+2013-12-05 Kostya Serebryany <kcc@google.com>
+
+ * c-c++-common/asan/null-deref-1.c: Update the test
+ to match the fresh asan run-time.
+
+2013-12-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59374
+ * gcc.dg/torture/pr59374-1.c: New testcase.
+ * gcc.dg/torture/pr59374-2.c: Likewise.
+
+2013-12-05 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/ia64/pr52731.c: New.
+
+2013-12-04 Jeff Law <law@redhat.com>
+
+ * gcc.dg/pr38984.c: Use -fno-isolate-erroneous-paths-dereference.
+ * gcc.dg/tree-ssa/isolate-2.c: Explicitly turn on
+ -fisolate-erroneous-paths-attribute.
+ * gcc.dg/tree-ssa/isolate-4.c: Likewise.
+
+2013-12-04 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/52023
+ * gcc.dg/c11-align-6.c: New test.
+
+2013-12-04 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/overflow-mul-2.c: New test.
+ * c-c++-common/ubsan/overflow-add-1.c: New test.
+ * c-c++-common/ubsan/overflow-add-2.c: New test.
+ * c-c++-common/ubsan/overflow-mul-1.c: New test.
+ * c-c++-common/ubsan/overflow-sub-1.c: New test.
+ * c-c++-common/ubsan/overflow-sub-2.c: New test.
+ * c-c++-common/ubsan/overflow-negate-1.c: New test.
+
+2013-12-04 Marek Polacek <polacek@redhat.com>
+
+ PR c/54113
+ * gcc.dg/pr54113.c: New test.
+
+2013-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/59268
+ * g++.dg/cpp0x/constexpr-template6.C: New test.
+
+2013-12-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/pack19.adb: New test.
+
+2013-12-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/58726
+ * gcc.c-torture/execute/pr58726.c: New test.
+
+ PR target/59163
+ * g++.dg/torture/pr59163.C: New test.
+
+ PR tree-optimization/59355
+ * g++.dg/ipa/pr59355.C: New test.
+
+2013-12-04 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/tree-ssa/slsr-39.c: Update.
+ * gcc.dg/tree-ssa/slsr-41.c: New test.
+
+2013-12-03 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr57363.c: New test.
+
+2013-12-03 Wei Mi <wmi@google.com>
+
+ PR rtl-optimization/59020
+ * gcc.dg/pr59020.c: New.
+ * gcc.dg/macro-fusion-1.c: New.
+ * gcc.dg/macro-fusion-2.c: New.
+
+2013-12-03 Yury Gribov <y.gribov@samsung.com>
+
+ PR sanitizer/59063
+ * lib/asan-dg.exp: Don't add anything to flags if libsanitizer
+ has not been found.
+ * lib/ubsan-dg.exp: Likewise. Append to flags also
+ -B${gccpath}/libsanitizer/.
+
+2013-12-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c: Skip for little endian.
+
+2013-12-03 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59363
+ * gcc.target/i386/pr59363.c: New file.
+
+2013-12-03 Marek Polacek <polacek@redhat.com>
+
+ PR c/59351
+ * gcc.dg/pr59351.c: New test.
+
+2013-12-03 Chung-Ju Wu <jasonwucj@gmail.com>
+
+ * gcc.dg/20020312-2.c: Add __nds32__ case.
+ * gcc.dg/builtin-apply2.c: Skip for nds32*-*-*.
+ * gcc.dg/sibcall-3.c: Expected fail for nds32*-*-*.
+ * gcc.dg/sibcall-4.c: Expected fail for nds32*-*-*.
+ * gcc.dg/stack-usage-1.c (SIZE): Define case for __nds32__.
+ * gcc.dg/torture/pr37868.c: Skip for nds32*-*-*.
+ * gcc.dg/torture/stackalign/builtin-apply-2.c: Skip for nds32*-*-*.
+ * gcc.dg/tree-ssa/20040204-1.c: Expected fail for nds32*-*-*.
+ * gcc.dg/tree-ssa/pr42585.c: Skip for nds32*-*-*.
+ * gcc.dg/tree-ssa/sra-12.c: Skip for nds32*-*-*.
+ * gcc.target/nds32: New nds32 specific directory and testcases.
+ * lib/target-supports.exp (check_profiling_available): Check for
+ nds32*-*-elf.
+
+2013-12-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59362
+ * gcc.c-torture/compile/pr59362.c: New test.
+
+ PR middle-end/59011
+ * gcc.dg/pr59011.c: New test.
+
+ PR target/58864
+ * g++.dg/opt/pr58864.C: New test.
+
+2013-12-02 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/59322
+ * gcc.c-torture/compile/pr59322.c: New test.
+
+2013-12-02 Sriraman Tallam <tmsriram@google.com>
+
+ PR target/58944
+ * gcc.target/i386/pr58944.c: New test.
+
+2013-12-02 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/58235
+ * gcc.dg/c90-array-lval-8.c: New test.
+
+2013-12-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59358
+ * gcc.c-torture/execute/pr59358.c: New test.
+
+ PR lto/59326
+ * gcc.target/i386/i386.exp (check_effective_target_avx2): Move to...
+ * lib/target-supports.exp (check_effective_target_avx2): ... here.
+ (check_effective_target_vect_simd_clones): New.
+ * gcc.dg/vect/vect-simd-clone-1.c: Add dg-require-effective-target
+ vect_simd_clones.
+ * gcc.dg/vect/vect-simd-clone-2.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-3.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-4.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-5.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-6.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-7.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-8.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-9.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-10.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-11.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-12.c: Likewise.
+
+2013-12-02 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.dg/pr56997-4.c: New testcase.
+
+2013-12-02 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/vla-1.c: Split the tests into individual
+ functions.
+
+2013-12-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59139
+ * gcc.dg/torture/pr59139.c: New testcase.
+
+2013-12-02 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt30.adb: New test.
+
+2013-12-01 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/57354
+ * gfortran.dg/realloc_on_assign_23.f90 : New test
+
+2013-12-01 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/34547
+ * gfortran.dg/null_5.f90 : Include new error.
+ * gfortran.dg/null_6.f90 : Include new error.
+
+2013-11-29 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59331
+ * g++.dg/ubsan/pr59331.C: New test.
+ * g++.dg/ubsan/cxx1y-vla.C: Enable -Wall -Wno-unused-variable.
+ Disable the -w option.
+ * c-c++-common/ubsan/vla-1.c: Likewise.
+ * c-c++-common/ubsan/vla-2.c: Likewise.
+ * c-c++-common/ubsan/vla-3.c: Don't use the -w option.
+
+2013-11-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/42262
+ * gcc.dg/c99-init-5.c, gcc.dg/c99-init-6.c: New tests.
+
+2013-11-29 H.J. Lu <hongjiu.lu@intel.com>
+
+ * lib/asan-dg.exp (asan_link_flags): Properly add path to
+ libsanitizer.spec to cflags.
+
+2013-11-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/59208
+ * g++.dg/torture/pr59208.C: New testcase.
+
+2013-11-29 Jakub Jelinek <jakub@redhat.com>
+ Yury Gribov <y.gribov@samsung.com>
+
+ PR sanitizer/59063
+ * c-c++-common/asan/pr59063-1.c: New test.
+ * c-c++-common/asan/pr59063-2.c: Likewise.
+ * lib/asan-dg.exp: Add path to libsanitizer.spec to cflags.
+ * lib/ubsan-dg.exp: Likewise.
+
+2013-11-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt29.ad[sb]: New test.
+
+2013-11-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/59338
+ * gcc.dg/torture/pr59338.c: New testcase.
+
+2013-11-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR lto/59326
+ * gcc.dg/vect/vect-simd-clone-12.c: New test.
+ * gcc.dg/vect/vect-simd-clone-12a.c: New test.
+ * gcc.dg/vect/vect-simd-clone-10a.c: Remove extern keywords.
+
+ PR c/59280
+ * c-c++-common/pr59280.c: New test.
+
+2013-11-29 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/lp1243022.c: Skip target arm-neon.
+
+2013-11-29 Joseph Myers <joseph@codesourcery.com>
+
+ PR c/57574
+ * gcc.dg/inline-35.c: New test.
+
+2013-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/59297
+ * g++.dg/gomp/pr59297.C: New test.
+
+2013-11-28 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/57293
+ * gcc.target/i386/pr57293.c: New.
+
+2013-11-28 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/vrinta-ce.c: New testcase.
+
+2013-11-28 Richard Biener <rguenther@suse.de>
+
+ PR lto/59323
+ * gcc.dg/lto/pr59323-2_0.c: New testcase.
+
+2013-11-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59330
+ * gcc.dg/torture/pr59330.c: New testcase.
+
+2013-11-28 Richard Biener <rguenther@suse.de>
+
+ PR lto/59323
+ * gcc.dg/lto/pr59323_0.c: New testcase.
+
+2013-11-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/57393
+ PR tree-optimization/58018
+ PR tree-optimization/58131
+ * gcc.dg/torture/pr57393-1.c: New test.
+ * gcc.dg/torture/pr57393-2.c: New test.
+ * gcc.dg/torture/pr57393-3.c: New test.
+ * gcc.dg/torture/pr58018.c: New test.
+ * gcc.dg/torture/pr58131.c: New test.
+ * gfortran.dg/pr57393-1.f90: New test.
+ * gfortran.dg/pr57393-2.f90: New test.
+
+2013-11-27 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gfortran.dg/nan_7.f90: Disable for little endian PowerPC.
+
+2013-11-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/guality/param-3.c: New test.
+
+2013-11-27 Uros Bizjak <ubizjak@gmail.com>
+ Ganesh Gopalasubramanian <Ganesh.Gopalasubramanian@amd.com>
+
+ PR target/56788
+ * gcc.target/i386/xop-frczX.c: New test.
+
+2013-11-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59014
+ * gcc.c-torture/execute/pr59014-2.c: New test.
+
+2013-11-27 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58647
+ * g++.dg/parse/crash66.C: New.
+
+2013-11-27 Kenneth Zadeck <zadeck@naturalbridge.com>
+
+ * gcc.dg/c90-const-expr-8.c: Look for overflow on INT_MIN % -1.
+ * gcc.dg/c99-const-expr-8.c: Look for overflow on INT_MIN % -1.
+
+2013-11-27 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59306
+ * g++.dg/ubsan/pr59306.C: New test.
+
+2013-11-27 Aldy Hernandez <aldyh@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/declare-simd-1.C (f38): Make sure
+ simdlen is a power of two.
+ * gcc.dg/gomp/simd-clones-2.c: Compile on all targets.
+ Remove -msse2. Adjust regexps for name mangling changes.
+ * gcc.dg/gomp/simd-clones-3.c: Likewise.
+ * gcc.dg/vect/vect-simd-clone-1.c: New test.
+ * gcc.dg/vect/vect-simd-clone-2.c: New test.
+ * gcc.dg/vect/vect-simd-clone-3.c: New test.
+ * gcc.dg/vect/vect-simd-clone-4.c: New test.
+ * gcc.dg/vect/vect-simd-clone-5.c: New test.
+ * gcc.dg/vect/vect-simd-clone-6.c: New test.
+ * gcc.dg/vect/vect-simd-clone-7.c: New test.
+ * gcc.dg/vect/vect-simd-clone-8.c: New test.
+ * gcc.dg/vect/vect-simd-clone-9.c: New test.
+ * gcc.dg/vect/vect-simd-clone-10.c: New test.
+ * gcc.dg/vect/vect-simd-clone-10.h: New file.
+ * gcc.dg/vect/vect-simd-clone-10a.c: New file.
+ * gcc.dg/vect/vect-simd-clone-11.c: New test.
+
+2013-11-27 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/cilk-plus/cilk-plus.exp: Append to ld_library_path.
+ Call set_ld_library_path_env_vars.
+ * g++.dg/cilk-plus/cilk-plus.exp: Likewise.
+
+2013-11-27 Tom de Vries <tom@codesourcery.com>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/59032
+ * c-c++-common/pr59032.c: New testcase.
+
+2013-11-27 Tom de Vries <tom@codesourcery.com>
+ Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/59037
+ * c-c++-common/pr59037.c: New testcase.
+
+2013-11-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20131127-1.c: New test.
+
+2013-11-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59288
+ * gcc.dg/torture/pr59288.c: New testcase.
+
+2013-11-27 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/undefined-1.c: New test.
+
+2013-11-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/59014
+ * gcc.c-torture/execute/pr59014.c: New test.
+
+ PR target/59229
+ * gcc.c-torture/execute/pr59229.c: New test.
+
+ PR rtl-optimization/59166
+ * gcc.dg/torture/pr59166.c: New test.
+
+ PR c++/58874
+ * g++.dg/gomp/pr58874.C: New test.
+
+ PR middle-end/59150
+ * g++.dg/gomp/pr59150.C: New test.
+
+ PR middle-end/59152
+ * c-c++-common/gomp/pr59152.c: New test.
+
+2013-11-26 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/gomp/openmp-simd-1.c: Cleanup original tree dump.
+ * gcc.dg/gomp/openmp-simd-2.c: Ditto.
+ * g++.dg/gomp/openmp-simd-1.C: Ditto.
+ * g++.dg/gomp/openmp-simd-2.C: Ditto.
+ * gfortran.dg/c_loc_test_22.f90: Ditto.
+ * gcc.dg/tree-ssa/attr-alias-2.c: Cleanup optimized tree dump.
+ * gcc.dg/tree-ssa/isolate-5.c: Ditto.
+ * gcc.dg/tree-ssa/pr57361.c: Cleanup dse1 tree dump.
+ * gcc.dg/vect/vect-124.c: Cleanup vect tree dump.
+ * gcc.dg/pr57518.c: Cleanup ira rtl dump.
+ * gcc.dg/tree-prof/cold_partition_label.c: Cleanup saved temps.
+
+2013-11-26 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.target/arm/20131120.c: New test.
+
+2013-11-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59245
+ * gcc.dg/torture/pr59245.c: New testcase.
+
+2013-11-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/59290
+ * gcc.target/arm/negdi-2.c: Scan more general register names.
+
+2013-11-26 Terry Guo <terry.guo@arm.com>
+
+ * gcc.target/arm/thumb1-pic-high-reg.c: New case.
+ * gcc.target/arm/thumb1-pic-single-base.c: New case.
+
+2013-11-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58700
+ * g++.dg/parse/bitfield4.C: New.
+
+2013-11-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59287
+ * gcc.dg/tree-ssa/alias-29.c: New testcase.
+
+2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54485
+ * g++.dg/other/default8.C: New.
+ * g++.dg/tc1/dr217.C: Remove xfail.
+ * g++.dg/other/default5.C: Adjust.
+ * g++.old-deja/g++.mike/p1989.C: Likewise.
+
+2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58607
+ * g++.dg/cpp0x/constexpr-ice9.C: New.
+
+2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58810
+ * g++.dg/other/cv_func3.C: New.
+ * g++.dg/other/cv_func.C: Adjust.
+ * g++.dg/parse/fn-typedef2.C: Likewise.
+
+2013-11-25 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/59250
+ * g++.dg/ubsan/pr59250.C: New test.
+
+2013-11-25 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59143
+ * gfortran.dg/typebound_proc_30.f90: New.
+
+2013-11-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59080
+ * g++.dg/cpp0x/initlist75.C: New.
+
+ PR c++/59096
+ * g++.dg/cpp0x/gen-attrs-57.C: New.
+
+2013-11-25 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/59112
+ PR c++/59113
+ * g++.dg/cpp1y/pr58533.C: Updated testcase.
+ * g++.dg/cpp1y/pr59112.C: New testcase.
+ * g++.dg/cpp1y/pr59113.C: New testcase.
+
+2013-11-25 Terry Guo <terry.guo@arm.com>
+
+ * gcc.target/arm/thumb2-slow-flash-data.c: New.
+
+2013-11-23 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/float-exact-1.c: Use dg-add-options ieee.
+ [LDBL_MANT_DIG == 113]: Fix wrong variable name.
+
+2013-11-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/59228
+ * gfortran.dg/asynchronous_4.f90: New.
+
+2013-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/asan/no-redundant-instrumentation-7.c: Fix
+ cleanup-tree-dump directive.
+
+2013-11-22 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/20081223-1.c: Add -ffat-lto-objects.
+ * gcc.dg/vect/vect.exp: Add -ffat-lto-objects.
+
+2013-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/ubsan/return-1.C: New test.
+ * g++.dg/ubsan/return-2.C: New test.
+
+ * c-c++-common/asan/no-redundant-instrumentation-1.c: Tweak to avoid
+ optimizing away some __asan_report* calls.
+
+2013-11-22 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/pr10474.c: Also test ppc64.
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Also test ppc64, change all ints
+ to longs.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+
+2013-11-22 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/59054
+ * gcc.target/powerpc/direct-move.h (VSX_REG_ATTR): Allow test to
+ specify an appropriate register class for VSX operations.
+ (load_vsx): Use it.
+ (load_gpr_to_vsx): Likewise.
+ (load_vsx_to_gpr): Likewise.
+ * gcc.target/powerpc/direct-move-vint1.c: Use an appropriate
+ register class for VSX registers that the type can handle. Remove
+ checks for explicit number of instructions generated, just check
+ if the instruction is generated.
+ * gcc.target/powerpc/direct-move-vint2.c: Likewise.
+ * gcc.target/powerpc/direct-move-float1.c: Likewise.
+ * gcc.target/powerpc/direct-move-float2.c: Likewise.
+ * gcc.target/powerpc/direct-move-double1.c: Likewise.
+ * gcc.target/powerpc/direct-move-double2.c: Likewise.
+ * gcc.target/powerpc/direct-move-long1.c: Likewise.
+ * gcc.target/powerpc/direct-move-long2.c: Likewise.
+
+ * gcc.target/powerpc/pr59054.c: Remove duplicate code.
+
+ * gcc.target/powerpc/bool3-av.c: Limit to 64-bit mode for now.
+ * gcc.target/powerpc/bool3-p7.c: Likewise.
+ * gcc.target/powerpc/bool3-p8.c: Likewise.
+
+ * gcc.target/powerpc/p8vector-ldst.c: Just check that the
+ appropriate instructions are generated, don't check the count.
+
+2013-11-22 Richard Earnshaw <rearnsha@arm.com>
+
+ PR target/59216
+ * gcc.target/arm/negdi-4.c: Delete invalid test.
+ * gcc.dg/torture/pr59216.c: New test.
+
+2013-11-22 Alex Velenko <Alex.Velenko@arm.com>
+
+ * gcc.target/aarch64/vmov_n_1.c: New testcase.
+
+2013-11-22 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/20131122-0.c: New testcase.
+
+2013-11-22 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vect/vect-124.c: New test.
+
+2013-11-21 Cary Coutant <ccoutant@google.com>
+
+ * gcc.dg/debug/dwarf2/mlt1.c: New test.
+ * gcc.dg/debug/dwarf2/mlt2.c: New test.
+
+2013-11-21 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/59221
+ * gcc.c-torture/execute/pr59221.c: New test.
+
+2013-11-21 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR libfortran/59227
+ * gfortran.dg/erf_3.F90: XFAIL on spu-* and ia64-*-linux*.
+ Make more generic for other platforms.
+
+2013-11-21 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/53976
+ * gcc.target/sh/pr53976-1.c: New.
+
+2013-11-20 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ PR libfortran/49024
+ * gfortran.dg/erf_3.F90: New file.
+
+2013-11-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr48258-1.c: Skip for little endian.
+
+2013-11-20 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/59133
+ * gcc.target/i386/pr59133.c: New.
+
+2013-11-20 Joseph Myers <joseph@codesourcery.com>
+
+ PR middle-end/21718
+ * gcc.dg/float-exact-1.c: New test.
+
+2013-11-20 Richard Earnshaw <rearnsha@arm.com>
+
+ PR rtl-optimization/54300
+ * gcc.target/arm/pr54300.C: New test.
+
+2013-11-20 Diego Novillo <dnovillo@google.com>
+
+ PR 59212
+ * g++.dg/plugin/selfassign.c: Include stringpool.h
+
+2013-11-20 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/darwin-longlong.c (msw): Make endian-safe.
+
+2013-11-20 Dominik Vogt <vogt@linux.vnet.ibm.com>
+
+ * gcc.target/s390/htm-1.c: Rename to ...
+ * gcc.target/s390/htm-builtins-compile-1.c: ... this one.
+ * gcc.target/s390/htm-xl-intrin-1.c: Rename to ...
+ * gcc.target/s390/htm-builtins-compile-3.c: ... this one.
+ * gcc.target/s390/htm-builtins-compile-2.c: New testcase.
+ * gcc.target/s390/htm-builtins-1.c: New testcase.
+ * gcc.target/s390/htm-builtins-2.c: New testcase.
+ * gcc.target/s390/s390.exp: Add check for htm machine.
+
+2013-11-19 Joshua J Cogliati <jrincayc@yahoo.com>
+
+ PR c/53001
+ * c-c++-common/Wfloat-conversion.c: Copies relevant
+ tests from c-c++-common/Wconversion-real.c,
+ gcc.dg/Wconversion-real-integer.c and gcc.dg/pr35635.c into
+ new testcase for conversions that are warned about by
+ -Wfloat-conversion.
+
+2013-11-19 Martin Jambor <mjambor@suse.cz>
+
+ PR rtl-optimization/59099
+ * gcc.target/i386/pr59099.c: New test.
+
+2013-11-19 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.dg/tree-prof/cold_partition_label.c: New testcase.
+
+2013-11-19 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-2.c (MAKE_SLOT): New macro to
+ construct parameter slot value in endian-independent way.
+ (fcevv, fciievv, fcvevv): Use it.
+
+2013-11-19 Jan Hubicka <jh@suse.cz>
+
+ * ipa/devirt9.C: Fix prevoius change.
+
+2013-11-19 Cesar Philippidis <cesar@codesourcery.com>
+
+ * gcc.c-torture/execute/20101011-1.c (__aarch64__):
+ Remove defined(__linux__).
+
+2013-11-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59164
+ * gcc.dg/torture/pr59164.c: New testcase.
+
+2013-11-19 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58956
+ * gcc.dg/torture/pr58956.c: New testcase.
+
+2013-11-19 Marek Polacek <polacek@redhat.com>
+
+ * c-c++-common/ubsan/null-1.c: New test.
+ * c-c++-common/ubsan/null-2.c: New test.
+ * c-c++-common/ubsan/null-3.c: New test.
+ * c-c++-common/ubsan/null-4.c: New test.
+ * c-c++-common/ubsan/null-5.c: New test.
+ * c-c++-common/ubsan/null-6.c: New test.
+ * c-c++-common/ubsan/null-7.c: New test.
+ * c-c++-common/ubsan/null-8.c: New test.
+ * c-c++-common/ubsan/null-9.c: New test.
+ * c-c++-common/ubsan/null-10.c: New test.
+ * c-c++-common/ubsan/null-11.c: New test.
+ * gcc.dg/ubsan/c99-shift-2.c: Adjust dg-output.
+ * c-c++-common/ubsan/shift-1.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-3.c: Likewise.
+
+2013-11-19 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/c11-complex-1.c: Use dg-add-options ieee.
+
+2013-11-19 Jan Hubicka <jh@suse.cz>
+
+ * ipa/devirt9.C: Verify that the optimization happens already before.
+ whole-program.
+
+2013-11-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57517
+ * gfortran.fortran-torture/compile/pr57517.f90: New testcase.
+ * gcc.dg/torture/pr57517.c: Likewise.
+
+2013-11-19 Jan Hubicka <jh@suse.cz>
+
+ * gcc.target/i386/memcpy-3.c: New testcase.
+
+2013-11-18 Jan Hubicka <jh@suse.cz>
+ Uros Bizjak <ubizjak@gmail.com>
+
+ PR middle-end/59175
+ * gcc.target/i386/memcpy-2.c: Fix template;
+ add +1 so the testcase passes at 32bit.
+
+2013-11-18 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * c-c++-common/cilk-plus/PS/reduction-3.c: Use stdlib.h.
+ Remove spurious FIXME.
+
+2013-11-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * c-c++-common/cilk-plus/PS/body.c: Add fopenmp effective target check.
+
+2013-11-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53473
+ * g++.dg/cpp0x/constexpr-noexcept7.C: New.
+
+2013-11-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59125
+ PR tree-optimization/54570
+ * gcc.dg/builtin-object-size-8.c: Un-xfail.
+ * gcc.dg/builtin-object-size-14.c: New testcase.
+ * gcc.dg/strlenopt-14gf.c: Adjust.
+ * gcc.dg/strlenopt-1f.c: Likewise.
+ * gcc.dg/strlenopt-4gf.c: Likewise.
+
+2013-11-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/volatile11.adb: New test.
+ * gnat.dg/volatile11_pkg.ad[sb]: New helper.
+
+2013-11-18 Yury Gribov <y.gribov@samsung.com>
+
+ PR sanitizer/59106
+ * c-c++-common/asan/pr59106.c: New test.
+
+2013-11-17 Jan Hubicka <jh@suse.cz>
+
+ * gcc.target/i386/memcpy-2.c: New testcase.
+
+2013-11-17 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/59153
+ * gcc.target/i386/pr59153.c: New test.
+
+2013-11-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/59123
+ * g++.dg/cpp0x/constexpr-redeclaration1.C: New.
+ * g++.dg/cpp0x/constexpr-decl.C: Adjust.
+
+2013-11-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29143
+ * g++.dg/overload/addr2.C: New.
+ * g++.old-deja/g++.other/overload11.C: Adjust.
+
+2013-11-15 Mike Stump <mikestump@comcast.net>
+
+ * lib/gcc.exp (gcc_target_compile): Add support for random runtime
+ * lib/g++.exp (g++_target_compile): Likewise.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Improve support for runtime
+ libraries. Remove debugging.
+ * g++.dg/cilk-plus/cilk-plus.exp: Add support to find runtime
+ libraries. Remove -O0, redundant with default.
+
+2013-11-15 Joseph Myers <joseph@codesourcery.com>
+
+ * c-c++-common/cpp/ucnid-2011-1.c: New test.
+
+2013-11-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58188
+ * g++.dg/cpp0x/nsdmi-template8.C: New.
+
+2013-11-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58725
+ * g++.dg/cpp0x/nsdmi-template7.C: New.
+
+2013-11-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58829
+ * g++.dg/cpp0x/nsdmi-template6.C: New.
+
+2013-11-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58599
+ * g++.dg/cpp0x/nsdmi-template5.C: New.
+
+2013-11-15 Aldy Hernandez <aldyh@redhat.com>
+
+ * c-c++-common/cilk-plus/PS: New directory.
+ * g++.dg/cilk-plus/cilk-plus.exp: Run shared tests.
+ * g++.dg/dg.exp: Run Cilk Plus tests.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Run shared tests.
+
+2013-11-15 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vmx/3b-15.c: Revise for little endian.
+
+2013-11-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/50262
+ * gcc.dg/tree-ssa/alias-28.c: New testcase.
+ * gcc.dg/strlenopt-1.c: Adjust.
+ * gcc.dg/strlenopt-1f.c: Likewise.
+
+2013-11-15 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/20131115-1.c: New testcase.
+
+2013-11-15 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/cpp/ucnid-9.c: New test.
+
+2013-11-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/stack_usage1b.adb: New test.
+ * gnat.dg/stack_usage1c.adb: Likewise.
+
+2013-11-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gnat.dg/specs/addr1.ads: Revert the last change.
+ * gnat.dg/specs/atomic1.ads: Likewise.
+
+2013-11-14 Cong Hou <congh@google.com>
+
+ * gcc.dg/vect/vect-alias-check.c: Update.
+
+2013-11-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57887
+ * g++.dg/cpp0x/nsdmi-template3.C: New.
+ * g++.dg/cpp0x/nsdmi-template4.C: Likewise.
+
+2013-11-14 Diego Novillo <dnovillo@google.com>
+
+ * gcc.dg/plugin/selfassign.c: Include stringpool.h.
+ * gcc.dg/plugin/start_unit_plugin.c: Likewise.
+
+2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-1.c (stack_frame_t): Remove
+ compiler and linker field if _CALL_ELF == 2.
+ * gcc.target/powerpc/ppc64-abi-2.c (stack_frame_t): Likewise.
+ * gcc.target/powerpc/ppc64-abi-dfp-1.c (stack_frame_t): Likewise.
+ * gcc.dg/stack-usage-1.c (SIZE): Update value for _CALL_ELF == 2.
+
+2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * gcc.target/powerpc/ppc64-abi-dfp-1.c (FUNC_START): New macro.
+ (WRAPPER): Use it.
+ * gcc.target/powerpc/no-r11-1.c: Skip on powerpc_elfv2.
+ * gcc.target/powerpc/no-r11-2.c: Skip on powerpc_elfv2.
+ * gcc.target/powerpc/no-r11-3.c: Skip on powerpc_elfv2.
+
+2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * lib/target-supports.exp (check_effective_target_powerpc_elfv2):
+ New function.
+ * gcc.target/powerpc/pr57949-1.c: Disable for powerpc_elfv2.
+ * gcc.target/powerpc/pr57949-2.c: Likewise.
+
+2013-11-14 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
+
+ * g++.dg/eh/ppc64-sighandle-cr.C: New test.
+
+2013-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/torture/float128-cmp-invalid.c: Require fenv_exceptions.
+ * gcc.dg/torture/float128-div-underflow.c: Likewise.
+ * gcc.dg/torture/float128-extend-nan.c: Likewise.
+
+2013-11-14 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Fix target selector.
+
+2013-11-14 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gnat.dg/specs/addr1.ads: XFAIL on x32.
+ * gnat.dg/specs/atomic1.ads: Likewise.
+
+2013-11-14 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/cpu-diagnostics-2.c: Change "-mcpu="
+ to "cortex-a53".
+ * gcc.target/aarch64/cpu-diagnostics-3.c: Change "-mcpu="
+ to "cortex-a53".
+
+2013-11-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/atomic/c11-atomic-exec-4.c: Define _XOPEN_SOURCE=600 on
+ *-*-solaris2.1[0-9]*.
+ * gcc.dg/atomic/c11-atomic-exec-5.c: Likewise.
+
+2013-11-14 Joey Ye <joey.ye@arm.com>
+
+ * gcc.dg/tree-ssa/forwprop-28.c: Disable for cortex_m.
+ * gcc.dg/tree-ssa/vrp47.c: Likewise.
+ * gcc.dg/tree-ssa/vrp87.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Ingore for cortex_m.
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: Likewise.
+
+2013-11-14 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/58533
+ * g++.dg/cpp1y/pr58533.C: New testcase (fixed by r204714).
+
+2013-11-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/59101
+ * gcc.c-torture/execute/pr59101.c: New test.
+
+2013-11-13 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/59102
+ * gcc.c-torture/compile/pr59102.c: New test.
+
+2013-11-13 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/tail-merge-store.c: New test.
+
+2013-11-13 Andrew MacLeod <amacleod@redhat.com>
+
+ * g++.dg/plugin/selfassign.c: Include gimple-iterator.h.
+ * gcc.dg/plugin/selfassign.c: Likewise.
+
+2013-11-13 Jeff Law <law@redhat.com>
+
+ * PR middle-end/59119
+ * gcc.c-torture/compile/pr59119.c: New test.
+
+2013-11-13 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Add lp64 to target requirements.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+ * gcc.dg/pr10474.c: Likewise.
+
+2013-11-13 Cesar Philippidis <cesar@codesourcery.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_vect_cmdline_neeed): Add AArch64 to the list
+ of targets that do not need command line argument to enable SIMD.
+
+2013-11-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/guality/param-4.c: New test.
+
+2013-11-13 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c11-complex-1.c: New test.
+
+2013-11-13 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/atomic/stdatomic-vm.c, gcc.dg/auto-type-1.c,
+ gcc.dg/auto-type-2.c: New tests.
+
+2013-11-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/cilk-plus.exp: Added a check for LTO before running
+ LTO tests.
+
+2013-11-12 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/isolate-1.c: Update expected output.
+ * gcc.dg/tree-ssa/isolate-5.c: Verify the load survives through
+ the SSA optimizers.
+
+2013-11-12 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/59054
+ * gcc.target/powerpc/pr59054.c: New test.
+
+2013-11-12 Adam Butcher <adam@jessamine.co.uk>
+
+ * g++.dg/cpp1y/lambda-generic.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-cfun.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-dep.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-udt.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-variadic.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-x.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-xcfun.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-xudt.C: New test case.
+ * g++.dg/cpp1y/lambda-generic-mixed.C: New test case.
+
+2013-11-12 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/58534
+ PR c++/58536
+ PR c++/58548
+ PR c++/58549
+ PR c++/58637
+ * g++.dg/cpp1y/pr58534.C: New testcase.
+ * g++.dg/cpp1y/pr58536.C: New testcase.
+ * g++.dg/cpp1y/pr58548.C: New testcase.
+ * g++.dg/cpp1y/pr58549.C: New testcase.
+ * g++.dg/cpp1y/pr58637.C: New testcase.
+
+2013-11-12 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c90-thread-local-1.c, gcc.dg/c99-thread-local-1.c,
+ gcc.dg/c11-thread-local-1.c, gcc.dg/c11-thread-local-2.c: New tests.
+ * gcc.dg/tls/diag-2.c, objc.dg/tls/diag-2.m: Update expected
+ diagnostics.
+
+2013-11-12 Tristan Gingold <gingold@adacore.com>
+
+ * gnat.dg/aggr21.adb: New test.
+ * gnat.dg/aggr21_pkg.ad[sb]: New helper.
+
+2013-11-12 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/isolate-1.c: Update expected output.
+ * gcc.dg/tree-ssa/isolate-5.c: New test.
+
+2013-11-12 Martin Jambor <mjambor@suse.cz>
+
+ PR rtl-optimization/10474
+ * gcc.dg/pr10474.c: New testcase.
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Likewise.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+
+2013-11-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57734
+ * g++.dg/cpp0x/alias-decl-enum-1.C: New.
+
+2013-11-11 Martin Liska <marxin.liska@gmail.com>
+
+ * gcc.dg/time-profiler-1.c: New test.
+ * gcc.dg/time-profiler-2.c: Ditto.
+
+2013-11-11 Marc Glisse <marc.glisse@inria.fr>
+ Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/alias-27.c: New testcase.
+
+2013-11-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/58853
+ * gcc.target/i386/pr58853.c: New test.
+
+2013-11-11 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/tree-ssa/forwprop-28.c: Adjust for ARC
+ LOGICAL_OP_NON_SHORT_CIRCUIT definition.
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: Likewise.
+ * gcc.dg/tree-ssa/vrp47.c: Likewise.
+ * gcc.dg/tree-ssa/vrp87.c: Likewise.
+
+2013-11-08 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/atomic/stdatomic-compare-exchange-1.c,
+ gcc.dg/atomic/stdatomic-compare-exchange-2.c,
+ gcc.dg/atomic/stdatomic-compare-exchange-3.c,
+ gcc.dg/atomic/stdatomic-compare-exchange-4.c,
+ gcc.dg/atomic/stdatomic-exchange-1.c,
+ gcc.dg/atomic/stdatomic-exchange-2.c,
+ gcc.dg/atomic/stdatomic-exchange-3.c,
+ gcc.dg/atomic/stdatomic-exchange-4.c,
+ gcc.dg/atomic/stdatomic-fence.c, gcc.dg/atomic/stdatomic-flag.c,
+ gcc.dg/atomic/stdatomic-generic.c,
+ gcc.dg/atomic/stdatomic-kill-dep.c,
+ gcc.dg/atomic/stdatomic-load-1.c,
+ gcc.dg/atomic/stdatomic-load-2.c,
+ gcc.dg/atomic/stdatomic-load-3.c,
+ gcc.dg/atomic/stdatomic-load-4.c,
+ gcc.dg/atomic/stdatomic-lockfree.c,
+ gcc.dg/atomic/stdatomic-op-1.c, gcc.dg/atomic/stdatomic-op-2.c,
+ gcc.dg/atomic/stdatomic-op-3.c, gcc.dg/atomic/stdatomic-op-4.c,
+ gcc.dg/atomic/stdatomic-store-1.c,
+ gcc.dg/atomic/stdatomic-store-2.c,
+ gcc.dg/atomic/stdatomic-store-3.c,
+ gcc.dg/atomic/stdatomic-store-4.c, gcc.dg/c11-stdatomic-1.c: New
+ tests.
+
+2013-11-08 Cong Hou <congh@google.com>
+
+ PR tree-optimization/58508
+ * gcc.dg/vect/pr58508.c: Update.
+
+2013-11-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59047
+ * gcc.dg/torture/pr59047.c: New testcase.
+
+2013-11-08 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/59038
+ PR tree-optimization/58955
+ * gcc.dg/torture/pr59038.c: New testcase.
+
+2013-11-07 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58471
+ * gfortran.dg/constructor_9.f90: New.
+
+2013-11-07 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/atomic-compare-exchange-1.c,
+ gcc.dg/atomic-compare-exchange-2.c,
+ gcc.dg/atomic-compare-exchange-3.c,
+ gcc.dg/atomic-compare-exchange-4.c,
+ gcc.dg/atomic-compare-exchange-5.c, gcc.dg/atomic-exchange-1.c,
+ gcc.dg/atomic-exchange-2.c, gcc.dg/atomic-exchange-3.c,
+ gcc.dg/atomic-exchange-4.c, gcc.dg/atomic-exchange-5.c,
+ gcc.dg/atomic-fence.c, gcc.dg/atomic-flag.c,
+ gcc.dg/atomic-generic.c, gcc.dg/atomic-invalid.c,
+ gcc.dg/atomic-load-1.c, gcc.dg/atomic-load-2.c,
+ gcc.dg/atomic-load-3.c, gcc.dg/atomic-load-4.c,
+ gcc.dg/atomic-load-5.c, gcc.dg/atomic-lockfree.c,
+ gcc.dg/atomic-noinline.c, gcc.dg/atomic-op-1.c,
+ gcc.dg/atomic-op-2.c, gcc.dg/atomic-op-3.c, gcc.dg/atomic-op-4.c,
+ gcc.dg/atomic-op-5.c, gcc.dg/atomic-param.c,
+ gcc.dg/atomic-store-1.c, gcc.dg/atomic-store-2.c,
+ gcc.dg/atomic-store-3.c, gcc.dg/atomic-store-4.c,
+ gcc.dg/atomic-store-5.c: Declare main as returning int.
+ * gcc.dg/atomic-exchange-1.c, gcc.dg/atomic-exchange-2.c,
+ gcc.dg/atomic-exchange-3.c, gcc.dg/atomic-exchange-4.c,
+ gcc.dg/atomic-exchange-5.c: Separate increments of count from
+ expression using value of count.
+
+2013-11-07 Joseph Myers <joseph@codesourcery.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_fenv_exceptions): New function.
+ * lib/atomic-dg.exp, gcc.dg/atomic/atomic.exp: New files.
+ * gcc.dg/atomic/c11-atomic-exec-1.c,
+ gcc.dg/atomic/c11-atomic-exec-2.c,
+ gcc.dg/atomic/c11-atomic-exec-3.c,
+ gcc.dg/atomic/c11-atomic-exec-4.c,
+ gcc.dg/atomic/c11-atomic-exec-5.c, gcc.dg/c11-atomic-1.c,
+ gcc.dg/c11-atomic-2.c, gcc.dg/c11-atomic-3.c,
+ gcc.dg/c90-atomic-1.c, gcc.dg/c99-atomic-1.c: New tests.
+
+2013-11-07 Cong Hou <congh@google.com>
+
+ * gcc.dg/vect/vect-alias-check.c: New.
+
+2013-11-07 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/tree-ssa/loop-39.c: New test.
+
+ * gcc.dg/unroll_1.c: Add -fno-tree-vrp to dg-options.
+ * gcc.dg/unroll_2.c: Likewise.
+ * gcc.dg/unroll_3.c: Likewise.
+ * gcc.dg/unroll_4.c: Likewise.
+ * gcc.dg/vrp90.c: New test.
+
+2013-11-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58176
+ * g++.dg/cpp0x/nullptr30.C: New.
+
+2013-11-07 Yury Gribov <y.gribov@samsung.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/59029
+ * c-c++-common/asan/pr59029.c: New test.
+
+2013-11-07 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/59034
+ * gcc.target/i386/pr59034-1.c: New test.
+ * gcc.target/i386/pr59034-2.c: Likewise.
+
+2013-11-07 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.dg/tree-ssa/loop-2.c: Refine check condition.
+ * gcc.dg/tree-ssa/ivopt_infer_2.c: Ditto.
+ * gcc.dg/tree-ssa/ivopt_mult_3.c: Ditto.
+
+2013-11-06 DJ Delorie <dj@redhat.com>
+
+ * gcc.dg/mismatch-decl-1.c: New test.
+
+2013-11-06 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/torture/float128-cmp-invalid.c,
+ gcc.dg/torture/float128-div-underflow.c,
+ gcc.dg/torture/float128-extend-nan.c,
+ gcc.dg/torture/fp-int-convert-float128-timode-3.c: New tests.
+
+2013-11-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/pr51244-11.c: Remove target line.
+ * gcc.target/sh/sh4a-sincosf.c: Likewise.
+ * gcc.target/sh/attr-isr-trap_exit.c: Likewise.
+ * gcc.target/sh/pr51244-15.c: Likewise.
+ * gcc.target/sh/pr51244-19.c: Likewise.
+ * gcc.target/sh/cmpstr.c: Likewise.
+ * gcc.target/sh/pr33135-3.c: Likewise.
+ * gcc.target/sh/pr53512-2.c: Likewise.
+ * gcc.target/sh/pr54602-2.c: Likewise.
+ * gcc.target/sh/pr52483-1.c: Likewise.
+ * gcc.target/sh/pr21255-2-ml.c: Likewise.
+ * gcc.target/sh/pr54760-4.c: Likewise.
+ * gcc.target/sh/pr52483-5.c: Likewise.
+ * gcc.target/sh/pr54089-2.c: Likewise.
+ * gcc.target/sh/pr56547-2.c: Likewise.
+ * gcc.target/sh/pr54089-6.c: Likewise.
+ * gcc.target/sh/pr51244-20.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-4.c: Likewise.
+ * gcc.target/sh/sh4a-fsrra.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-predec-1.c: Likewise.
+ * gcc.target/sh/pr50749-sf-postinc-2.c: Likewise.
+ * gcc.target/sh/pr55303-2.c: Likewise.
+ * gcc.target/sh/sh2a-resbank.c: Likewise.
+ * gcc.target/sh/sp-switch.c: Likewise.
+ * gcc.target/sh/pr51244-3.c: Likewise.
+ * gcc.target/sh/pr50751-3.c: Likewise.
+ * gcc.target/sh/pr51244-7.c: Likewise.
+ * gcc.target/sh/struct-arg-dw2.c: Likewise.
+ * gcc.target/sh/pr50751-7.c: Likewise.
+ * gcc.target/sh/pr49468-di.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-postinc-4.c: Likewise.
+ * gcc.target/sh/pr49880-3.c: Likewise.
+ * gcc.target/sh/pr51244-12.c: Likewise.
+ * gcc.target/sh/pr53988.c: Likewise.
+ * gcc.target/sh/pr6526.c: Likewise.
+ * gcc.target/sh/sh2a-bxor.c: Likewise.
+ * gcc.target/sh/pr51244-16.c: Likewise.
+ * gcc.target/sh/sh2a-bclrmem.c: Likewise.
+ * gcc.target/sh/sh2a-bor.c: Likewise.
+ * gcc.target/sh/pr53511-1.c: Likewise.
+ * gcc.target/sh/pr21255-3.c: Likewise.
+ * gcc.target/sh/pr53512-3.c: Likewise.
+ * gcc.target/sh/pr33135-4.c: Likewise.
+ * gcc.target/sh/pr54602-3.c: Likewise.
+ * gcc.target/sh/pr54760-1.c: Likewise.
+ * gcc.target/sh/pr52483-2.c: Likewise.
+ * gcc.target/sh/sh2a-bsetmem.c: Likewise.
+ * gcc.target/sh/pr54680.c: Likewise.
+ * gcc.target/sh/pr54386.c: Likewise.
+ * gcc.target/sh/pr51244-20-sh2a.c: Likewise.
+ * gcc.target/sh/pr54089-3.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-1.c: Likewise.
+ * gcc.target/sh/pr54089-7.c: Likewise.
+ * gcc.target/sh/strlen.c: Likewise.
+ * gcc.target/sh/pr50749-sf-postinc-3.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-predec-2.c: Likewise.
+ * gcc.target/sh/pr55303-3.c: Likewise.
+ * gcc.target/sh/pr51244-4.c: Likewise.
+ * gcc.target/sh/pr50751-4.c: Likewise.
+ * gcc.target/sh/pr39423-1.c: Likewise.
+ * gcc.target/sh/pr51244-8.c: Likewise.
+ * gcc.target/sh/pr55146.c: Likewise.
+ * gcc.target/sh/pr50751-8.c: Likewise.
+ * gcc.target/sh/sh2a-bset.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-postinc-1.c: Likewise.
+ * gcc.target/sh/sh2a-movi20s.c: Likewise.
+ * gcc.target/sh/20080410-1.c: Likewise.
+ * gcc.target/sh/pr49880-4.c: Likewise.
+ * gcc.target/sh/pr51244-13.c: Likewise.
+ * gcc.target/sh/sh2a-movrt.c: Likewise.
+ * gcc.target/sh/pr51244-17.c: Likewise.
+ * gcc.target/sh/pr21255-2-mb.c: Likewise.
+ * gcc.target/sh/sh2a-bclr.c: Likewise.
+ * gcc.target/sh/pr33135-1.c: Likewise.
+ * gcc.target/sh/pr53512-4.c: Likewise.
+ * gcc.target/sh/pr54602-4.c: Likewise.
+ * gcc.target/sh/sh4a-bitmovua.c: Likewise.
+ * gcc.target/sh/pr54760-2.c: Likewise.
+ * gcc.target/sh/pr52483-3.c: Likewise.
+ * gcc.target/sh/sh2a-bld.c: Likewise.
+ * gcc.target/sh/pr54089-4.c: Likewise.
+ * gcc.target/sh/pr54685.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-2.c: Likewise.
+ * gcc.target/sh/pr54089-8.c: Likewise.
+ * gcc.target/sh/pragma-isr-trap-exit.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-predec-3.c: Likewise.
+ * gcc.target/sh/pr50749-sf-postinc-4.c: Likewise.
+ * gcc.target/sh/pr51244-1.c: Likewise.
+ * gcc.target/sh/pr50751-1.c: Likewise.
+ * gcc.target/sh/pr55160.c: Likewise.
+ * gcc.target/sh/pr51244-5.c: Likewise.
+ * gcc.target/sh/pr54236-1.c: Likewise.
+ * gcc.target/sh/pr50751-5.c: Likewise.
+ * gcc.target/sh/pr52933-1.c: Likewise.
+ * gcc.target/sh/pr39423-2.c: Likewise.
+ * gcc.target/sh/pr51244-9.c: Likewise.
+ * gcc.target/sh/pr49263.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-postinc-2.c: Likewise.
+ * gcc.target/sh/pr49880-1.c: Likewise.
+ * gcc.target/sh/sh2a-band.c: Likewise.
+ * gcc.target/sh/pr51244-10.c: Likewise.
+ * gcc.target/sh/pr49880-5.c: Likewise.
+ * gcc.target/sh/prefetch.c: Likewise.
+ * gcc.target/sh/pr51244-14.c: Likewise.
+ * gcc.target/sh/rte-delay-slot.c: Likewise.
+ * gcc.target/sh/fpul-usage-1.c: Likewise.
+ * gcc.target/sh/pr51244-18.c: Likewise.
+ * gcc.target/sh/pr21255-1.c: Likewise.
+ * gcc.target/sh/pr33135-2.c: Likewise.
+ * gcc.target/sh/pr53512-1.c: Likewise.
+ * gcc.target/sh/pr54602-1.c: Likewise.
+ * gcc.target/sh/sh2a-rtsn.c: Likewise.
+ * gcc.target/sh/torture/pragma-isr.c: Likewise.
+ * gcc.target/sh/torture/pragma-isr2.c: Likewise.
+ * gcc.target/sh/torture/pr58314.c: Likewise.
+ * gcc.target/sh/torture/pr34777.c: Likewise.
+ * gcc.target/sh/torture/pr58475.c: Likewise.
+ * gcc.target/sh/pr54760-3.c: Likewise.
+ * gcc.target/sh/sh4a-cosf.c: Likewise.
+ * gcc.target/sh/pr52483-4.c: Likewise.
+ * gcc.target/sh/mfmovd.c: Likewise.
+ * gcc.target/sh/pr54089-1.c: Likewise.
+ * gcc.target/sh/pr56547-1.c: Likewise.
+ * gcc.target/sh/pr54089-5.c: Likewise.
+ * gcc.target/sh/pr50749-sf-predec-3.c: Likewise.
+ * gcc.target/sh/pr54089-9.c: Likewise.
+ * gcc.target/sh/sh2a-jsrn.c: Likewise.
+ * gcc.target/sh/pr49468-si.c: Likewise.
+ * gcc.target/sh/pr50749-sf-postinc-1.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-predec-4.c: Likewise.
+ * gcc.target/sh/pr55303-1.c: Likewise.
+ * gcc.target/sh/pr51244-2.c: Likewise.
+ * gcc.target/sh/pr50751-2.c: Likewise.
+ * gcc.target/sh/pr54236-2.c: Likewise.
+ * gcc.target/sh/pr51244-6.c: Likewise.
+ * gcc.target/sh/cmpstrn.c: Likewise.
+ * gcc.target/sh/pr50751-6.c: Likewise.
+ * gcc.target/sh/pr52933-2.c: Likewise.
+ * gcc.target/sh/pr53568-1.c: Likewise.
+ * gcc.target/sh/pr50749-qihisi-postinc-3.c: Likewise.
+ * gcc.target/sh/sh2a-tbr-jump.c: Likewise.
+ * gcc.target/sh/sh4a-sinf.c: Likewise.
+ * gcc.target/sh/pr49880-2.c: Likewise.
+
+2013-11-06 Tobias Burnus <burnus@net-b.de>
+
+ * g++.dg/warn/wdate-time.C: Update dg-error pattern.
+ * gcc.dg/wdate-time.c: Ditto.
+ * gfortran.dg/wdate-time.F90: Ditto.
+
+2013-11-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/30807
+ * gcc.target/sh/torture/pr30807.c: New.
+
+2013-11-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/11006
+ * g++.dg/other/java3.C: New.
+
+2013-11-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/59021
+ * gcc.target/i386/pr59021.c: New test.
+
+2013-11-06 James Lemke <jwlemke@codesourcery.com>
+
+ * lib/gcc-defs.exp (dg-additional-files-options): Extend regsub for
+ dg-additional-files to also match BOL.
+
+2013-11-06 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/torture/c99-contract-1.c: New test.
+
+2013-11-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58653
+ * gcc.dg/tree-ssa/predcom-6.c: New testcase.
+ * gcc.dg/tree-ssa/predcom-7.c: Likewise.
+
+2013-11-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/CK/fib.c: Reduced the iteration from
+ 40 to 30. Replaced iteration variable with a #define. Instead of
+ returning non-zero value for error, called __builtin_abort (). Fixed
+ a bug of calling fib_serial in serial case instead of fib.
+ * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Removed duplicate/un-necessary
+ compiler flag testing.
+
+2013-11-06 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.target/sh/strlen.c: New test.
+
+2013-11-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58970
+ * gcc.c-torture/compile/pr58970.c: New test.
+
+2013-11-05 Wei Mi <wmi@google.com>
+
+ PR regression/58985
+ * gcc.dg/pr57518.c: Add subreg in regexp pattern.
+
+2013-11-05 Tobias Burnus <burnus@net-b.de>
+
+ * g++.dg/warn/wdate-time.C: New.
+ * gcc.dg/wdate-time.c: New.
+ * gfortran.dg/wdate-time.F90: New.
+
+2013-11-05 Steven G. Kargl <kargl@gcc.gnu.org>
+
+ PR fortran/58989
+ * gfortran.dg/reshape_6.f90: New test.
+
+2013-11-05 Jeff Law <law@redhat.com>
+
+ * gcc.dg/pr38984.c: Add -fno-isolate-erroneous-paths.
+ * gcc.dg/tree-ssa/isolate-1.c: New test.
+ * gcc.dg/tree-ssa/isolate-2.c: New test.
+ * gcc.dg/tree-ssa/isolate-3.c: New test.
+ * gcc.dg/tree-ssa/isolate-4.c: New test.
+
+2013-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/58997
+ * gcc.c-torture/compile/pr58997.c: New test.
+
+2013-11-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58724
+ * g++.dg/cpp0x/gen-attrs-56.C: New.
+
+2013-11-05 Richard Biener <rguenther@suse.de>
+
+ PR ipa/58492
+ * gcc.dg/ipa/pr58492.c: New testcase.
+
+2013-11-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58955
+ * gcc.dg/torture/pr58955-1.c: New testcase.
+ * gcc.dg/torture/pr58955-2.c: Likewise.
+
+2013-11-05 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR middle-end/58981
+ * gcc.dg/pr58981.c: New test.
+
+2013-11-05 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58941
+ * gcc.dg/torture/pr58941.c: New testcase.
+
+2013-11-05 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/58958
+ * gcc.dg/tree-ssa/pr58958.c: New file.
+
+2013-11-05 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/alias-26.c: New file.
+
+2013-11-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58984
+ * gcc.c-torture/execute/pr58984.c: New test.
+
+2013-11-05 Andreas Schwab <schwab@suse.de>
+
+ * g++.dg/ext/sync-4.C: Require sync_long_long_runtime support.
+
+2013-11-05 Tobias Burnus <burnus@net-b.de>
+
+ * g++.dg/gomp/openmp-simd-1.C: New.
+ * g++.dg/gomp/openmp-simd-2.C: New.
+ * gcc.dg/gomp/openmp-simd-1.c: New.
+ * gcc.dg/gomp/openmp-simd-2.c: New.
+
+2013-11-04 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/superblock.c: Require scheduling support.
+
+2013-11-04 Kostya Serebryany <kcc@google.com>
+
+ * g++.dg/asan/asan_test.cc: Update the test
+ to match the fresh asan run-time.
+ * c-c++-common/asan/stack-overflow-1.c: Ditto.
+
+2013-11-04 Ian Lance Taylor <iant@google.com>
+
+ * g++.dg/ext/sync-4.C: New test.
+
+2013-11-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/58771
+ * gfortran.dg/derived_external_function_1.f90 : New test
+
+2013-11-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58978
+ * gcc.c-torture/compile/pr58978.c: New test.
+
+2013-11-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/57445
+ * gfortran.dg/optional_class_1.f90 : New test
+
+2013-11-04 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58968
+ * gfortran.dg/pr58968.f: New
+
+2013-11-04 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58979
+ * g++.dg/diagnostic/pr58979.C: New test.
+
+2013-11-04 Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/iec-559-macros-1.c, gcc.dg/iec-559-macros-2.c,
+ gcc.dg/iec-559-macros-3.c, gcc.dg/iec-559-macros-4.c,
+ gcc.dg/iec-559-macros-5.c, gcc.dg/iec-559-macros-6.c,
+ gcc.dg/iec-559-macros-7.c, gcc.dg/iec-559-macros-8.c,
+ gcc.dg/iec-559-macros-9.c: New tests.
+
+2013-11-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58946
+ * gcc.c-torture/compile/pr58946.c: New test.
+
+2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52071
+ * g++.dg/parse/pr52071.C: New.
+
+2013-11-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/38313
+ * g++.dg/lookup/name-clash10.C: New.
+
+2013-11-03 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ * gcc.target/arm/neon-vcond-gt.c: Scan for vbsl or vbit or vbif.
+ * gcc.target/arm/neon-vcond-ltgt.c: Scan for vbsl or vbit or vbif.
+ * gcc.target/arm/neon-vcond-unordered.c: Scan for vbsl or vbit or vbif.
+
+2013-11-03 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/ubsan/cxx1y-vla.C: New test.
+ * c-c++-common/ubsan/vla-3.c: New test.
+ * c-c++-common/ubsan/vla-2.c: New test.
+ * c-c++-common/ubsan/vla-4.c: New test.
+ * c-c++-common/ubsan/vla-1.c: New test.
+
+2013-11-02 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
+
+ * gcc.dg/vmx/vec-set.c: New.
+
+2013-11-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/29234
+ PR c++/56037
+ * g++.dg/parse/pr29234.C: New.
+ * g++.dg/parse/pr56037.C: Likewise.
+
+2013-11-01 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * gcc.dg/cilk-plus/cilk-plus.exp: Loaded libcilkrts library path and
+ passed it in as one of the options to all Cilk keywords test.
+
+2013-11-01 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/58708
+ * g++.dg/cpp1y/pr58708.C: New.
+
+2013-11-01 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/58834
+ * g++.dg/ext/pr58834.C: New file.
+
+2013-11-01 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/gomp/declare-simd-2.c (f12, f13, f14, f15, f16, f17): New
+ tests.
+ * g++.dg/gomp/declare-simd-2.C (f15, f16, f17, f18, f19, f20): New
+ tests.
+
+2013-11-01 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/57893
+ * gfortran.dg/unlimited_polymorphic_13.f90 : Break up select
+ type block.
+
+2013-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/gomp/simd-1.C: New test.
+ * g++.dg/gomp/declare-simd-1.C (f32): Fix up aligned clause argument.
+ * g++.dg/gomp/declare-simd-2.C (fn13, fn14): Add new tests.
+ * gcc.dg/gomp/declare-simd-2.c (fn7, fn8, fn9, fn10, fn11): Likewise.
+ * c-c++-common/gomp/simd6.c: New test.
+
+2013-10-31 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ Implement C++14 digit separators.
+ * g++.dg/cpp1y/digit-sep.C: New.
+ * g++.dg/cpp1y/digit-sep-neg.C: New.
+ * g++.dg/cpp1y/digit-sep-cxx11-neg.C: New.
+
+2013-10-31 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vect/vect-align-3.c: New test.
+
+ * g++.dg/warn/pr33738.C (main): Initialize a2 again to make sure
+ we warn about it already during VRP1 pass.
+
+2013-10-31 Martin Jambor <mjambor@suse.cz>
+
+ PR rtl-optimization/58934
+ Revert:
+ 2013-10-30 Martin Jambor <mjambor@suse.cz>
+ PR rtl-optimization/10474
+ * gcc.dg/pr10474.c: New testcase.
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Likewise.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+
+2013-10-31 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58932
+ Revert:
+ 2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58466
+ * g++.dg/cpp0x/variadic145.C: New.
+
+ * g++.dg/cpp0x/sfinae49.C: New.
+
+2013-10-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58581
+ * g++.dg/cpp0x/deleted1.C: New.
+
+2013-10-31 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/lp1243022.c: New test.
+
+2013-10-30 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR other/58545
+ * gcc.target/avr/pr58545.c: New test.
+
+2013-10-30 Tobias Burnus <burnus@net-b.de>
+
+ Revert:
+ 2013-10-30 Tobias Burnus <burnus@net-b.de>
+ * gcc.dg/cilk-plus/cilk-plus.exp: Add the libcilkrts library
+ path to the compile flags.
+
+2013-10-30 Cong Hou <congh@google.com>
+
+ * gcc.target/i386/vect-abs-s8.c: New test.
+ * gcc.target/i386/vect-abs-s16.c: New test.
+ * gcc.target/i386/vect-abs-s32.c: New test.
+
+2013-10-30 Tobias Burnus <burnus@net-b.de>
+
+ * gcc.dg/cilk-plus/cilk-plus.exp: Add the libcilkrts library
+ path to the compile flags.
+
+2013-10-30 Mikael Pettersson <mikpe@it.uu.se>
+
+ PR rtl-optimization/58369
+ * g++.dg/torture/pr58369.C: New test.
+
+2013-10-30 Tobias Burnus <burnus@net-b.de>
+
+ PR other/33426
+ * g++.dg/vect/pr33426-ivdep-2.cc: New.
+ * g++.dg/vect/pr33426-ivdep-3.cc: New.
+ * g++.dg/vect/pr33426-ivdep-4.cc: New.
+
+2013-10-30 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/58784
+ * gcc.target/arm/pr58784.c: New.
+
+2013-10-30 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/alias-24.c: New file.
+
+2013-10-30 Vladimir Makarov <vmakarov@redhat.com>
+
+ * gcc.target/i386/fma_double_3.c: Use pattern for
+ scan-assembler-times instead of just one insn name.
+ * gcc.target/i386/fma_double_5.c: Ditto.
+ * gcc.target/i386/fma_float_3.c: Ditto.
+ * gcc.target/i386/fma_float_5.c: Ditto.
+ * gcc.target/i386/l_fma_double_1.c: Ditto.
+ * gcc.target/i386/l_fma_double_2.c: Ditto.
+ * gcc.target/i386/l_fma_double_3.c: Ditto.
+ * gcc.target/i386/l_fma_double_4.c: Ditto.
+ * gcc.target/i386/l_fma_double_5.c: Ditto.
+ * gcc.target/i386/l_fma_double_6.c: Ditto.
+ * gcc.target/i386/l_fma_float_1.c: Ditto.
+ * gcc.target/i386/l_fma_float_2.c: Ditto.
+ * gcc.target/i386/l_fma_float_3.c: Ditto.
+ * gcc.target/i386/l_fma_float_4.c: Ditto.
+ * gcc.target/i386/l_fma_float_5.c: Ditto.
+ * gcc.target/i386/l_fma_float_6.c: Ditto.
+
+2013-10-30 Christian Bruel <christian.bruel@st.com>
+
+ * gcc.c-torture/execute/builtins/strncmp-2.c: Enable for SH.
+ * gcc.target/sh/cmpstr.c: New test.
+ * gcc.target/sh/cmpstrn.c: New test.
+
+2013-10-30 Martin Jambor <mjambor@suse.cz>
+
+ PR rtl-optimization/10474
+ * gcc.dg/pr10474.c: New testcase.
+ * gcc.dg/ira-shrinkwrap-prep-1.c: Likewise.
+ * gcc.dg/ira-shrinkwrap-prep-2.c: Likewise.
+
+2013-10-29 Andrew Pinski <apinski@cavium.com>
+ Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c: New test case.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c: New test case.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c: New test case.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c: New test case.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c: New test case.
+ * gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c: New test case.
+ * gcc.dg/tree-ssa/phi-opt-9.c: Use a function call to prevent
+ conditional move to be used.
+ * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Remove.
+
+2013-10-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44350
+ * gfortran.dg/blockdata_8.f90: New.
+
+2013-10-29 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54236
+ * gcc.target/sh/pr54236-2: New.
+ * gcc.target/sh/pr54089-6: Add another rotl special case.
+
+2013-10-29 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/58793
+ * gfortran.dg/unlimited_polymorphic_13.f90: Use real variables
+ to determine sizes of real kinds.
+
+ PR fortran/58858
+ * gfortran.dg/unlimited_polymorphic_14.f90: New test.
+
+2013-10-29 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/CK/compound_cilk_spawn.c: New test.
+ * c-c++-common/cilk-plus/CK/concec_cilk_spawn.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib.c: Likewise.
+ * c-c++-common/cilk-plus/CK/no_args_error.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawnee_inline.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawner_inline.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawning_arg.c: Likewise.
+ * c-c++-common/cilk-plus/CK/steal_check.c: Likewise.
+ * c-c++-common/cilk-plus/CK/test__cilk.c: Likewise.
+ * c-c++-common/cilk-plus/CK/varargs_test.c: Likewise.
+ * c-c++-common/cilk-plus/CK/sync_wo_spawn.c: Likewise.
+ * c-c++-common/cilk-plus/CK/invalid_spawn.c: Likewise.
+ * c-c++-common/cilk-plus/CK/spawn_in_return.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib_init_expr_xy.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib_no_sync.c: Likewise.
+ * c-c++-common/cilk-plus/CK/fib_no_return.c: Likewise.
+ * gcc.dg/cilk-plus/cilk-plus.exp: Added support to run Cilk Keywords
+ test stored in c-c++-common. Also, added the Cilk runtime's library
+ to the ld_library_path.
+
+2013-10-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58888
+ * g++.dg/cpp0x/auto40.C: New.
+ * g++.dg/other/warning1.C: Adjust.
+
+2013-10-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/restrict-2.c: New testcase.
+ * gcc.dg/torture/restrict-3.c: Likewise.
+ * gcc.dg/torture/restrict-4.c: Likewise.
+ * gcc.dg/torture/restrict-5.c: Likewise.
+
+2013-10-29 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/19831
+ * gcc.dg/tree-ssa/alias-25.c: New file.
+
+2013-10-29 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr56812.cc: Adjust with respect to -fvect-cost-model
+ changes.
+ * gcc.dg/vect/bb-slp-32.c: Likewise.
+ * gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp: Likewise.
+ * gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp: Likewise.
+ * gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp: Likewise.
+ * gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp: Likewise.
+ * gcc.target/powerpc/crypto-builtin-1.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-1.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-2.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-3.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-4.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-5.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-1.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-2.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-3.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-4.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-5.c: Likewise.
+ * gfortran.dg/vect/vect.exp: Likewise.
+
+2013-10-28 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/vmx/gcc-bug-i.c: Add little endian variant.
+ * gcc.dg/vmx/eg-5.c: Likewise.
+
+2013-10-28 Claudiu Zissulescu <claziss@synopsys.com>
+ Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/arc/jump-around-jump.c: New test.
+
+2013-10-27 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.target/arm/require-pic-register-loc.c: New test.
+
+2013-10-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/58679
+ * gcc.target/i386/pr58679-1.c: New test.
+ * gcc.target/i386/pr58679-2.c: Ditto.
+
+2013-10-27 Tobias Burnus <burnus@net-b.de>
+
+ PR other/33426
+ * gcc.dg/vect/vect-ivdep-2.c: New.
+
+2013-10-26 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52483
+ * gcc.target/sh/pr52483-1.c: Add tests for memory stores.
+ * gcc.target/sh/pr52483-2.c: Likewise.
+ * gcc.target/sh/pr52483-3.c: Likewise.
+ * gcc.target/sh/pr52483-4.c: Likewise.
+
+2013-10-26 Jeff Law <law@redhat.com>
+
+ * g++.dg/torture/pr49309.C: Removed.
+ * gcc.dg/dfp/pr35739.c: Removed.
+
+2013-10-25 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58759
+ * gcc.target/i386/pr58759.c: New.
+
+2013-10-25 Tobias Burnus <burnus@net-b.de>
+
+ * g++.dg/vect/pr33426-ivdep.cc: Use dg-options.
+ * gfortran.dg/vect/vect-do-concurrent-1.f90: Ditto.
+ * gcc.dg/vect/vect-ivdep-1.c: Ditto.
+
+2013-10-25 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/wmul-1.c: New test.
+
+2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58878
+ * g++.dg/template/pr58878.C: New.
+
+2013-10-25 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/alias-23.c: New file.
+
+2013-10-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58626
+ * gcc.dg/torture/pr58626.c: New testcase.
+
+2013-10-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54812
+ * g++.dg/cpp0x/defaulted47.C: New.
+
+2013-10-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/pr58831.c: New test.
+
+2013-10-25 Nick Clifton <nickc@redhat.com>
+
+ * c-c++-common/pr57793.c: Add expected error messages for
+ targets with small integers.
+ * gcc.dg/c99-stdint-1.c: Only run on 32-bit plus targets.
+ * gcc.dg/c99-stdint-2.c: Likewise.
+ * gcc.dg/cdce1.c: Likewise.
+ * gcc.dg/fold-overflow-1.c: Likewise.
+ * gcc.dg/utf-cvt.c: Likewise.
+ * gcc.dg/ftrapv-1.c: Only run on targets that support trapping
+ arithmetic.
+ * gcc.dg/ftrapv-2.c: Likewise.
+ * gcc.dg/pr30286.c: Likewise.
+ * gcc.dg/pr19340.c: Only run on targets that support scheduling.
+ * lib/target-supports.exp (check_effective_target_trapping): New
+ proc. Returns true if the target supports trapping arithmetic.
+
+2013-10-25 Tobias Burnus <burnus@net-b.de>
+
+ * g++.dg/parse/ivdep.C: New.
+ * g++.dg/vect/pr33426-ivdep.cc: New.
+
+2013-10-24 Richard Henderson <rth@redhat.com>
+
+ PR rtl/58542
+ * gcc.dg/atomic-store-6.c: New.
+
+2013-10-24 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (errchk): Combine quoted strings in comments.
+
+2013-10-24 Cong Hou <congh@google.com>
+
+ * gcc.c-torture/execute/20030125-1.c: Update.
+
+2013-10-24 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/44646
+ * gfortran.dg/vect/vect-do-concurrent-1.f90: New.
+
+2013-10-24 Dehao Chen <dehao@google.com>
+
+ * g++.dg/opt/devirt3.C: New test.
+
+2013-08-24 Tobias Burnus <burnus@net-b.de>
+
+ PR other/33426
+ * gcc.dg/ivdep.c: New.
+ * gcc.dg/vect/vect-ivdep-1.c: New.
+
+2013-10-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/c-output-mod-2.c: Fix for -fPIC.
+ * gcc.target/aarch64/c-output-mod-3.c: Likewise.
+
+2013-10-24 Nick Clifton <nickc@redhat.com>
+
+ * gcc.dg/20020312-2.c: No PIC register for RL78 or MSP430.
+
+2013-10-24 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58705
+ * g++.dg/parse/pr58705.C: New test.
+
+2013-10-24 Marek Polacek <polacek@redhat.com>
+
+ * gcc.dg/c11-align-5.c: Add more testing.
+
+2013-10-23 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.target/powerpc/direct-move.h: Fix header for executable tests.
+
+2013-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58775
+ PR tree-optimization/58791
+ * gcc.dg/guality/pr58791-1.c: New test.
+ * gcc.dg/guality/pr58791-2.c: New test.
+ * gcc.dg/guality/pr58791-3.c: New test.
+ * gcc.dg/guality/pr58791-4.c: New test.
+ * gcc.dg/guality/pr58791-5.c: New test.
+ * gcc.c-torture/compile/pr58775.c: New test.
+ * gcc.dg/tree-ssa/reassoc-28.c: Don't scan reassoc1 dump.
+
+2013-10-23 Tom de Vries <tom@codesourcery.com>
+
+ PR tree-optimization/58805
+ * gcc.dg/pr58805.c: New test.
+
+2013-10-23 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/vect-div-1.c: New test.
+
+ * gcc.dg/vect/pr58508.c: Remove dg-options.
+
+2013-10-23 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/torture/pr58830.c: New testcase.
+
+2013-10-23 Edward Smith-Rowland <3dw4rd@verizon.net>
+
+ Implement C++14 [[deprecated]] modulo [[gnu::deprecated]] bugs.
+ * g++.dg/cpp1y/attr-deprecated.C: New.
+ * g++.dg/cpp1y/attr-deprecated-neg.C: New.
+
+2013-10-23 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58793
+ * gfortran.dg/assumed_type_8.f90: New.
+
+2013-10-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/58779
+ * gcc.target/i386/pr30315.c: Remove MINUSCC, DECCC, MINUSCCONLY
+ and MINUSCCZEXT defines. Update scan-assembler dg directive.
+ * gcc.dg/torture/pr58779.c: New test.
+
+2013-10-22 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.target/mips/nor.c: New.
+
+2013-10-22 Bill Schmidt <wschmidt@vnet.ibm.com>
+
+ * gcc.target/powerpc/altivec-perm-1.c: Move the two vector pack
+ tests into...
+ * gcc.target/powerpc/altivec-perm-3.c: ...this new test, which is
+ restricted to big-endian targets.
+
+2013-10-22 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran 57893
+ * gfortran.dg/unlimited_polymorphic_13.f90 : New test.
+
+2013-10-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58803
+ * gfortran.dg/proc_ptr_comp_38.f90: New.
+
+2013-10-21 Marek Polacek <polacek@redhat.com>
+
+ PR middle-end/58809
+ * gcc.dg/gomp/pr58809.c: New test.
+
+2013-10-21 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.dg/20050922-1.c: Remove stdlib.h and declare abort().
+ * gcc.dg/20050922-1.c: Remove stdlib.h and declare abort() and exit().
+
+2013-10-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58794
+ * c-c++-common/torture/pr58794-1.c: New testcase.
+ * c-c++-common/torture/pr58794-2.c: Likewise.
+
+2013-10-21 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58742
+ * c-c++-common/fold-divmul-1.c: New testcase.
+
+2013-10-21 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
+
+ * gcc.target/i386/memset-vector_loop-1.c: New test.
+ * gcc.target/i386/memset-vector_loop-2.c: New test.
+
+2013-10-21 Diego Novillo <dnovillo@google.com>
+
+ * g++.dg/plugin/selfassign.c: Include tree.h.
+ * gcc.dg/plugin/finish_unit_plugin.c: Likewise.
+ * gcc.dg/plugin/ggcplug.c: Likewise.
+ * gcc.dg/plugin/one_time_plugin.c: Likewise.
+ * gcc.dg/plugin/selfassign.c: Likewise.
+ * gcc.dg/plugin/start_unit_plugin.c: Likewise.
+
+2013-10-20 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips-ps-5.c: Add alignment attributes.
+ * gcc.target/mips/mips-ps-7.c: Likewise.
+
+2013-10-20 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/bswap-1.c, gcc.target/mips/bswap-2.c,
+ gcc.target/mips/bswap-3.c, gcc.target/mips/bswap-4.c,
+ gcc.target/mips/bswap-5.c, gcc.target/mips/bswap-6.c: New tests.
+
+2013-10-19 John David Anglin <danglin@gcc.gnu.org>
+
+ * c-c++-common/opaque-vector.c: Skip long double test on hppa.
+
+ PR testsuite/58645
+ * gnat.dg/specs/linker_alias.ads: Skip on hppa*-*-hpux*.
+
+2013-10-19 Mike Stump <mikestump@comcast.net>
+
+ * g++.dg/lto/lto.exp: Add support for C/C++ mix language testing.
+
+ * gcc.dg/lto/pr54625-1_0.c: Move from here...
+ * g++.dg/lto/pr54625-1_0.c: ... to here.
+ * gcc.dg/lto/pr54625-1_1.C: Likewise.
+ * g++.dg/lto/pr54625-1_1.C: Likewise.
+ * gcc.dg/lto/pr54625-2_0.c: Likewise.
+ * g++.dg/lto/pr54625-2_0.c: Likewise.
+ * gcc.dg/lto/pr54625-2_1.C: Likewise.
+ * g++.dg/lto/pr54625-2_1.C: Likewise.
+
+2013-10-19 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/sh/pr54089-3.c: Fix test for load of constant 31.
+
+2013-10-18 Cong Hou <congh@google.com>
+
+ * gcc.dg/vect/pr58508.c: New test.
+
+2013-10-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58466
+ * g++.dg/cpp0x/variadic145.C: New.
+
+2013-10-18 Andrew MacLeod <amacleod@redhat.com>
+
+ * g++.dg/plugin/header_plugin.c: Don't include tree-flow.h.
+
+2013-10-18 Hans-Peter Nilsson <hp@axis.com>
+
+ * gcc.dg/tree-ssa/gen-vect-11.c: Use dynamic vector cost model.
+ * gcc.dg/tree-ssa/gen-vect-11a.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-2.c: Likewise.
+ * gcc.dg/tree-ssa/gen-vect-25.c: Likewise.
+
+2013-10-17 Charles Baylis <charles.baylis@linaro.org>
+
+ * gcc.dg/builtin-apply2.c: Skip test on arm hardfloat ABI targets.
+ * gcc.dg/tls/pr42894.c: Remove dg-options for arm*-*-* targets.
+ * gcc.target/arm/thumb-ltu.c: Remove dg-skip-if and require
+ effective target arm_thumb1_ok.
+ * lib/target-supports.exp
+ (check_effective_target_arm_fp16_ok_nocache): Don't force
+ -mfloat-abi=soft when building for hardfloat target.
+
+2013-10-17 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/58673
+ * gcc.target/powerpc/pr58673-1.c: New file to test whether
+ -mquad-word + -mno-vsx-timode causes errors.
+ * gcc.target/powerpc/pr58673-2.c: Likewise.
+
+2013-10-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58596
+ * g++.dg/cpp0x/lambda/lambda-nsdmi5.C: New
+
+2013-10-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/c-output-template.c: New testcase.
+ * gcc.target/aarch64/c-output-template-2.c: Likewise.
+ * gcc.target/aarch64/c-output-template-3.c: Likewise.
+
+2013-10-17 Michael Hudson-Doyle <michael.hudson@linaro.org>
+
+ * lib/target-supports.exp
+ (check_effective_target_sync_long_long): AArch64 supports
+ atomic operations on "long long".
+ (check_effective_target_sync_long_long_runtime): AArch64 can
+ execute atomic operations on "long long".
+
+2013-10-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58143
+ * gcc.dg/torture/pr58143-1.c: New testcase.
+ * gcc.dg/torture/pr58143-2.c: Likewise.
+ * gcc.dg/torture/pr58143-3.c: Likewise.
+
+2013-10-17 Marek Polacek <polacek@redhat.com>
+
+ PR c/58267
+ * gcc.dg/c1x-align-5.c: New test.
+
+2013-10-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58652
+ * gfortran.dg/unlimited_polymorphic_12.f90: New.
+
+2013-10-16 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/cpp/openmp-define-1.c: Move
+ dg-require-effective-target fopenmp after dg-do directive.
+ * c-c++-common/cpp/openmp-define-2.c: Likewise.
+ * gfortran.dg/openmp-define-1.f90: Likewise.
+ * gfortran.dg/openmp-define-2.f90: Likewise.
+ * gfortran.dg/openmp-define-3.f90: Likewise.
+
+2013-10-16 Paulo Matos <pmatos@broadcom.com>
+
+ * gcc.dg/tree-prof/tree-prof.exp: Fix comment.
+
+2013-10-15 Sriraman Tallam <tmsriram@google.com>
+
+ PR target/57756
+ * gcc.target/i386/pr57756.c: New test.
+ * gcc.target/i386/pr57756_2.c: New test.
+
+2013-10-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/torture/builtin-self.c: New file.
+
+2013-10-15 Zhenqiang Chen <zhenqiang.chen@arm.com>
+
+ * gcc.dg/tree-ssa/reassoc-32.c: New test case.
+ * gcc.dg/tree-ssa/reassoc-33.c: New test case.
+ * gcc.dg/tree-ssa/reassoc-34.c: New test case.
+ * gcc.dg/tree-ssa/reassoc-35.c: New test case.
+ * gcc.dg/tree-ssa/reassoc-36.c: New test case.
+
+2013-10-15 Cong Hou <congh@google.com>
+
+ * gcc.dg/vect/vect-reduc-pattern-3.c: New test.
+
+2013-10-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58707
+ * g++.dg/cpp0x/pr58707.C: New.
+
+2013-10-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * c-c++-common/cpp/openmp-define-3.c: Move effective target check
+ after other directives.
+
+2013-10-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58652
+ * gfortran.dg/unlimited_polymorphic_11.f90: New.
+
+2013-10-14 Ian Lance Taylor <iant@google.com>
+
+ * go.test/go-test.exp (go-find-packages): New proc.
+ (go-gc-tests): Skip stress and safe tests. Skip *.dir
+ subdirectories. Do simple +build line matching. Handle run with
+ arguments. Handle errorcheckdir and rundircmpout. Use packages
+ for rundir. Remove special handling for bug191 and dwarf.
+
+2013-10-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58658
+ * gfortran.dg/unlimited_polymorphic_10.f90: New.
+
+2013-10-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/torture/pr58670.c (ASM_STR) [__i386__ || __x86_64__]:
+ Use btsl.
+
+2013-10-14 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/opt1.ads: New test.
+
+2013-10-14 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58640
+ * gcc.c-torture/execute/pr58640-2.c: New testcase.
+
+2013-10-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/uninit_array.ad[sn]: New test.
+ * gnat.dg/uninit_array_pkg.ads: New helper.
+
+2013-10-13 Richard Biener <rguenther@suse.de>
+
+ * gcc.c-torture/execute/pr58662.c: New test.
+
+2013-10-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/51244
+ * gcc.dg/torture/p51244-21.c: New.
+ * gcc.target/sh/pr51244-20.c: New.
+ * gcc.target/sh/pr51244-20-sh2a.c: New.
+
+2013-10-12 Arnaud Charlet <charlet@adacore.com>
+
+ * gnat.dg/specs/linker_section.ads: Update test.
+
+2013-10-12 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR target/58690
+ * gcc.target/i386/pr58690.c: New test
+
+2013-10-12 Alexander Monakov <amonakov@ispras.ru>
+
+ * gcc.target/i386/builtin-ucmp.c: New test.
+
+2013-10-11 Brooks Moses <bmoses@google.com>
+
+ * g++.dg/ext/altivec-7.C: Check for standard vector-type name mangling.
+
+2013-10-11 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/pr58640.c: New test.
+
+2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58633
+ * g++.dg/cpp0x/decltype57.C: New.
+
+2013-10-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/31671
+ * g++.dg/template/nontype26.C: New.
+
+2013-10-11 Thomas Schwinge <thomas@codesourcery.com>
+
+ * c-c++-common/cpp/openmp-define-1.c: New file.
+ * c-c++-common/cpp/openmp-define-2.c: Likewise.
+ * c-c++-common/cpp/openmp-define-3.c: Likewise.
+ * gfortran.dg/openmp-define-1.f90: Likewise.
+ * gfortran.dg/openmp-define-2.f90: Likewise.
+ * gfortran.dg/openmp-define-3.f90: Likewise.
+
+ * g++.dg/gomp/gomp.exp: Recurse into subdirectories when looking
+ for test source files.
+ * gcc.dg/gomp/gomp.exp: Likewise.
+ * gcc.dg/gomp/appendix-a/a.35.1.c: Expect error.
+ * gcc.dg/gomp/appendix-a/a.35.3.c: Likewise.
+ * gcc.dg/gomp/appendix-a/a.35.4.c: Likewise.
+ * gcc.dg/gomp/appendix-a/a.35.5.c: Likewise.
+ * gcc.dg/gomp/appendix-a/a.35.6.c: Likewise.
+
+2013-10-11 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/gomp/atomic-15.c: Adjust for C diagnostics.
+ Remove error test that is now valid in OpenMP 4.0.
+ * c-c++-common/gomp/atomic-16.c: New test.
+ * c-c++-common/gomp/cancel-1.c: New test.
+ * c-c++-common/gomp/depend-1.c: New test.
+ * c-c++-common/gomp/depend-2.c: New test.
+ * c-c++-common/gomp/map-1.c: New test.
+ * c-c++-common/gomp/pr58472.c: New test.
+ * c-c++-common/gomp/sections1.c: New test.
+ * c-c++-common/gomp/simd1.c: New test.
+ * c-c++-common/gomp/simd2.c: New test.
+ * c-c++-common/gomp/simd3.c: New test.
+ * c-c++-common/gomp/simd4.c: New test.
+ * c-c++-common/gomp/simd5.c: New test.
+ * c-c++-common/gomp/single1.c: New test.
+ * g++.dg/gomp/block-0.C: Adjust for stricter #pragma omp sections
+ parser.
+ * g++.dg/gomp/block-3.C: Likewise.
+ * g++.dg/gomp/clause-3.C: Adjust error messages.
+ * g++.dg/gomp/declare-simd-1.C: New test.
+ * g++.dg/gomp/declare-simd-2.C: New test.
+ * g++.dg/gomp/depend-1.C: New test.
+ * g++.dg/gomp/depend-2.C: New test.
+ * g++.dg/gomp/target-1.C: New test.
+ * g++.dg/gomp/target-2.C: New test.
+ * g++.dg/gomp/taskgroup-1.C: New test.
+ * g++.dg/gomp/teams-1.C: New test.
+ * g++.dg/gomp/udr-1.C: New test.
+ * g++.dg/gomp/udr-2.C: New test.
+ * g++.dg/gomp/udr-3.C: New test.
+ * g++.dg/gomp/udr-4.C: New test.
+ * g++.dg/gomp/udr-5.C: New test.
+ * g++.dg/gomp/udr-6.C: New test.
+ * gcc.dg/autopar/outer-1.c: Expect 4 instead of 5 loopfn matches.
+ * gcc.dg/autopar/outer-2.c: Likewise.
+ * gcc.dg/autopar/outer-3.c: Likewise.
+ * gcc.dg/autopar/outer-4.c: Likewise.
+ * gcc.dg/autopar/outer-5.c: Likewise.
+ * gcc.dg/autopar/outer-6.c: Likewise.
+ * gcc.dg/autopar/parallelization-1.c: Likewise.
+ * gcc.dg/gomp/block-3.c: Adjust for stricter #pragma omp sections
+ parser.
+ * gcc.dg/gomp/clause-1.c: Adjust error messages.
+ * gcc.dg/gomp/combined-1.c: Look for GOMP_parallel_loop_runtime
+ instead of GOMP_parallel_loop_runtime_start.
+ * gcc.dg/gomp/declare-simd-1.c: New test.
+ * gcc.dg/gomp/declare-simd-2.c: New test.
+ * gcc.dg/gomp/nesting-1.c: Adjust for stricter #pragma omp sections
+ parser. Add further #pragma omp sections nesting tests.
+ * gcc.dg/gomp/target-1.c: New test.
+ * gcc.dg/gomp/target-2.c: New test.
+ * gcc.dg/gomp/taskgroup-1.c: New test.
+ * gcc.dg/gomp/teams-1.c: New test.
+ * gcc.dg/gomp/udr-1.c: New test.
+ * gcc.dg/gomp/udr-2.c: New test.
+ * gcc.dg/gomp/udr-3.c: New test.
+ * gcc.dg/gomp/udr-4.c: New test.
+ * gfortran.dg/gomp/appendix-a/a.35.5.f90: Add dg-error.
+
+2013-10-10 Jan Hubicka <jh@suse.cz>
+
+ * gcc.target/i386/avx256-unaligned-store-3.c: Update template for
+ tuning change.
+ * gcc.target/i386/avx256-unaligned-store-1.c: Likewise.
+ * gcc.target/i386/pr49168-1.c: Likewise.
+ * gcc.target/i386/pr49002-2.c: Likewise.
+
+2013-10-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58670
+ * gcc.dg/torture/pr58670.c: New test.
+
+2013-10-09 Zhenqiang Chen <zhenqiang.chen@arm.com>
+
+ * gcc.dg/tree-ssa/phi-opt-11.c: New test.
+
+2013-10-09 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58635
+ * g++.dg/tm/pr58635-1.C: New test.
+ * g++.dg/tm/pr58635-2.C: New test.
+
+2013-10-09 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vect/bb-slp-31.c: Add cleanup-tree-dump.
+
+2013-10-09 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/20318
+ * c-c++-common/pr20318.c: New file.
+ * gcc.dg/tree-ssa/pr20318.c: New file.
+
+2013-10-09 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/pr58570.c: New test.
+
+2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
+
+ * gcc.target/aarch64/vclz.c: New testcase.
+
+2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
+
+ * gcc.target/aarch64/vadd_f64.c: New testcase.
+ * gcc.target/aarch64/vsub_f64.c: New testcase.
+
+2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
+
+ * gcc.target/aarch64/vdiv_f.c: New testcase.
+
+2013-10-09 Alex Velenko <Alex.Velenko@arm.com>
+
+ * gcc.target/aarch64/vneg_f.c: New testcase.
+ * gcc.target/aarch64/vneg_s.c: New testcase.
+
+2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58568
+ * g++.dg/cpp0x/lambda/lambda-ice10.C: New.
+ * g++.old-deja/g++.mike/misc9.C: Adjust.
+
+2013-10-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58665
+ Revert:
+ 2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58448
+ * g++.dg/template/crash117.C: New.
+
+2013-10-08 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-nofloat-2.c: Add -mzarch to asm options.
+
+2013-10-08 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/58480
+ * gcc.dg/tree-ssa/pr58480.c: New file.
+
+2013-10-07 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr43154.c: Skip for ppc64 little endian.
+ * gcc.target/powerpc/fusion.c: Likewise.
+
+2013-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-nofloat-2.c: New testcase.
+
+2013-10-07 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-1.c: Add more tests to cover different
+ operand types.
+
+2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58126
+ * g++.dg/init/uninitialized1.C: New.
+
+2013-10-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56060
+ * g++.dg/cpp0x/variadic144.C: New.
+
+2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58560
+ * g++.dg/cpp0x/auto39.C: New.
+
+2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58503
+ * g++.dg/cpp0x/range-for26.C: New.
+ * g++.dg/cpp0x/range-for27.C: Likewise.
+
+2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58448
+ * g++.dg/template/crash117.C: New.
+
+2013-10-04 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/19476
+ * g++.dg/tree-ssa/pr19476-5.C: New file.
+ * g++.dg/tree-ssa/pr19476-1.C: Mention pr19476-5.C.
+
+2013-10-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58584
+ * g++.dg/cpp0x/gen-attrs-55.C: New.
+
+2013-10-03 Easwaran Raman <eraman@google.com>
+
+ PR c++/33911
+ * g++.dg/ext/attribute47.C: New.
+
+2013-10-03 Rong Xu <xur@google.com>
+
+ * gcc.target/i386/cold-attribute-2.c: Fix the test by using original
+ probability.
+ * gcc.dg/tree-ssa/ipa-split-5.c: Ditto.
+ * gcc.dg/tree-ssa/ipa-split-6.c: Ditto.
+
+2013-10-03 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58510
+ * g++.dg/cpp0x/pr58510.C: New test.
+
+2013-10-03 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/19476
+ * g++.dg/tree-ssa/pr19476-1.C: New file.
+ * g++.dg/tree-ssa/pr19476-2.C: Likewise.
+ * g++.dg/tree-ssa/pr19476-3.C: Likewise.
+ * g++.dg/tree-ssa/pr19476-4.C: Likewise.
+
+2013-10-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/p8vector-fp.c: New test for floating point
+ scalar operations when using -mupper-regs-sf and -mupper-regs-df.
+ * gcc.target/powerpc/ppc-target-1.c: Update tests to allow either
+ VSX scalar operations or the traditional floating point form of
+ the instruction.
+ * gcc.target/powerpc/ppc-target-2.c: Likewise.
+ * gcc.target/powerpc/recip-3.c: Likewise.
+ * gcc.target/powerpc/recip-5.c: Likewise.
+ * gcc.target/powerpc/pr72747.c: Likewise.
+ * gcc.target/powerpc/vsx-builtin-3.c: Likewise.
+
+2013-10-03 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ PR target/58460
+ * gcc.target/aarch64/pr58460.c: New file.
+
+2013-10-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58593
+ * gfortran.dg/char_length_19.f90: New.
+
+2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58535
+ * g++.dg/parse/crash65.C: New.
+ * g++.dg/cpp1y/pr58535.C: Likewise.
+
+2013-10-02 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-11.c: Adjust.
+ * gcc.dg/tree-ssa/ldist-17.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-23.c: Likewise.
+ * gcc.dg/tree-ssa/ldist-pr45948.c: Likewise.
+ * gfortran.dg/ldist-pr45199.f: Likewise.
+
+2013-10-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58565
+ * g++.dg/parse/crash64.C: New.
+
+2013-10-02 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/tree-ssa/slsr-40.c: New test.
+
+2013-10-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58563
+ * g++.dg/cpp0x/pr58563.C: New.
+
+2013-10-01 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.target/aarch64/vect_saddl_1.c: New.
+
+2013-10-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/58574
+ * gcc.c-torture/execute/pr58574.c: New testcase.
+
+2013-10-01 Kugan Vivekanandarajah <kuganv@linaro.org>
+
+ PR Target/58578
+ * gcc.target/arm/pr58578.c: New test.
+
+2013-10-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR tree-optimization/58556
+ * gcc.dg/tree-ssa/gen-vect-26.c: Use dynamic vector cost model.
+ * gcc.dg/tree-ssa/gen-vect-28.c: Likewise.
+
+2013-10-01 Nick Clifton <nickc@redhat.com>
+
+ * lib/target-supports.exp (check_effective_target_ptr32plus): Fail
+ for MSP430.
+ * gcc.c-torture/compile/20010327-1.c: Only run the test for
+ ptr32plus targets.
+ * gcc.c-torture/compile/pr41181.c: Likewise.
+ * gcc.c-torture/compile/calls.c: Likewise.
+ * gcc.c-torture/compile/990617-1.c: Likewise.
+ * gcc.c-torture/compile/pr55955.c: Only run the test for
+ int32plus targets.
+ * gcc.c-torture/compile/limits-externdecl.c: Likewise.
+
+2013-10-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58553
+ * gcc.dg/torture/pr58553.c: New testcase.
+
+2013-09-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58564
+ * gcc.c-torture/execute/pr58564.c: New test.
+
+2013-09-30 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-3.c (expand_one_var):
+ Update for additional dump message.
+
+2013-09-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58554
+ * gcc.dg/torture/pr58554.c: New testcase.
+
+2013-09-30 Simon Cook <simon.cook@embecosm.com>
+ Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/arc/barrel-shifter-1.c: New test.
+ * gcc.target/arc/barrel-shifter-2.c: Likewise.
+ * gcc.target/arc/long-calls.c, gcc.target/arc/mA6.c: Likewise.
+ * gcc.target/arc/mA7.c, gcc.target/arc/mARC600.c: Likewise.
+ * gcc.target/arc/mARC601.c, gcc.target/arc/mARC700.c: Likewise.
+ * gcc.target/arc/mcpu-arc600.c, gcc.target/arc/mcpu-arc601.c: Likewise.
+ * gcc.target/arc/mcpu-arc700.c, gcc.target/arc/mcrc.c: Likewise.
+ * gcc.target/arc/mdpfp.c, gcc.target/arc/mdsp-packa.c: Likewise.
+ * gcc.target/arc/mdvbf.c, gcc.target/arc/mlock.c: Likewise.
+ * gcc.target/arc/mmac-24.c, gcc.target/arc/mmac-d16.c: Likewise.
+ * gcc.target/arc/mno-crc.c, gcc.target/arc/mno-dsp-packa.c: Likewise.
+ * gcc.target/arc/mno-dvbf.c, gcc.target/arc/mno-lock.c: Likewise.
+ * gcc.target/arc/mno-mac-24.c, gcc.target/arc/mno-mac-d16.c: Likewise.
+ * gcc.target/arc/mno-rtsc.c, gcc.target/arc/mno-swape.c: Likewise.
+ * gcc.target/arc/mno-xy.c, gcc.target/arc/mrtsc.c: Likewise.
+ * gcc.target/arc/mspfp.c, gcc.target/arc/mswape.c: Likewise.
+ * gcc.target/arc/mtune-ARC600.c: Likewise.
+ * gcc.target/arc/mtune-ARC601.c: Likewise.
+ * gcc.target/arc/mtune-ARC700-xmac: Likewise.
+ * gcc.target/arc/mtune-ARC700.c: Likewise.
+ * gcc.target/arc/mtune-ARC725D.c: Likewise.
+ * gcc.target/arc/mtune-ARC750D.c: Likewise.
+ * gcc.target/arc/mul64.c, gcc.target/arc/mxy.c: Likewise.
+ * gcc.target/arc/no-dpfp-lrsr.c: Likewise.
+
+2013-09-30 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58532
+ * g++.dg/torture/pr58552.C: New testcase.
+
+2013-09-27 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/p8vector-ldst.c: New test for -mupper-regs-sf
+ and -mupper-regs-df.
+
+2013-09-27 Paulo Matos <pmatos@broadcom.com>
+
+ PR middle-end/58463
+ * gcc.dg/pr58463.c: New test.
+
+2013-09-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58551
+ * c-c++-common/gomp/pr58551.c: New test.
+
+2013-09-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58459
+ * gcc.dg/tree-ssa/ssa-pre-31.c: New testcase.
+
+2013-09-26 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR fortran/58113
+ * gfortran.dg/round_4.f90: Check for rounding support.
+
+2013-09-26 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * g++.dg/vect/pr58513.cc (op): Make static.
+
+2013-09-26 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/coalesce-2.c: New testcase.
+
+2013-09-26 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58539
+ * gcc.dg/torture/pr58539.c: New testcase.
+
+2013-09-25 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Update expected output.
+
+2013-09-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58436
+ * gfortran.dg/finalize_21.f90: New.
+
+2013-09-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57697
+ PR fortran/58469
+ * gfortran.dg/defined_assignment_8.f90: New.
+ * gfortran.dg/defined_assignment_9.f90: New.
+
+2013-09-25 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/58413
+ * c-c++-common/ubsan/shift-5.c: New test.
+ * c-c++-common/ubsan/shift-6.c: New test.
+ * c-c++-common/ubsan/div-by-zero-5.c: New test.
+ * gcc.dg/ubsan/c-shift-1.c: New test.
+
+2013-09-25 Marek Polacek <polacek@redhat.com>
+
+ PR c++/58516
+ * g++.dg/tm/pr58516.C: New test.
+
+2013-09-24 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_cond_exec):
+ New procedure.
+ * gcc.target/arm/minmax_minus.c: Check for cond_exec target.
+
+2013-09-24 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58513
+ * g++.dg/vect/pr58513.cc: New testcase.
+
+2013-09-24 Yvan Roux <yvan.roux@linaro.org>
+
+ * gcc.target/arm/atomic-comp-swap-release-acquire.c: Adjust expected
+ output.
+
+2013-09-23 Adam Butcher <adam@jessamine.co.uk>
+
+ PR c++/58500
+ * g++.dg/cpp1y/pr58500.C: New testcase.
+
+2013-09-23 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt28.ad[sb]: New test.
+ * gnat.dg/opt28_pkg.ads: New helper.
+
+2013-09-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58464
+ * g++.dg/torture/pr58464.C: New testcase.
+
+2013-09-23 Christian Bruel <christian.bruel@st.com>
+
+ PR target/58475
+ * gcc.target/sh/torture/pr58475.c: New test.
+
+2013-09-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58355
+ * gfortran.dg/extends_15.f90: New.
+
+2013-09-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58481
+ * g++.dg/cpp0x/lambda/lambda-this17.C: New.
+
+2013-09-20 Jan-Benedict Glaw <jbglaw@lug-owl.de>
+
+ PR target/56875
+ * gcc.target/vax/vax.exp: New.
+ * gcc.target/vax/pr56875.c: Ditto.
+
+2013-09-20 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58484
+ * gfortran.dg/pr58484.f: New testcase.
+
+2013-09-20 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-3.c: Add missing dg-final clause.
+
+2013-09-20 Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ PR middle-end/57748
+ * gcc.dg/torture/pr57748-1.c: New test.
+ * gcc.dg/torture/pr57748-2.c: New test.
+
+2013-09-20 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/58413
+ * c-c++-common/ubsan/shift-4.c: New test.
+
+2013-09-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58453
+ * gcc.dg/tree-ssa/ldist-23.c: New testcase.
+
+2013-09-20 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58099
+ * gfortran.dg/proc_ptr_43.f90: New.
+
+2013-09-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57697
+ * gfortran.dg/defined_assignment_11.f90: New.
+
+2013-09-18 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58438
+ * g++.dg/pr58438.C: New test.
+
+2013-09-18 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/43366
+ * gfortran.dg/class_39.f03: Update dg-error.
+ * gfortran.dg/class_5.f03: Ditto.
+ * gfortran.dg/class_53.f90: Ditto.
+ * gfortran.dg/realloc_on_assign_20.f90: New.
+ * gfortran.dg/realloc_on_assign_21.f90: New.
+ * gfortran.dg/realloc_on_assign_22.f90: New.
+
+2013-09-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58457
+ * g++.dg/parse/using4.C: New.
+
+2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.c-torture/execute/pr58419.c (b): Change type to signed char.
+
+2013-09-18 Marek Polacek <polacek@redhat.com>
+
+ PR sanitize/58443
+ * g++.dg/ubsan/div-by-zero-1.C: Use the integer-divide-by-zero option
+ instead of the shift option.
+ * c-c++-common/ubsan/pr58443-1.c: New test.
+ * c-c++-common/ubsan/pr58443-3.c: New test.
+ * c-c++-common/ubsan/pr58443-2.c: New test.
+
+2013-09-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58417
+ * gcc.dg/torture/pr58417.c: New testcase.
+
+2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array_bounds_test2.adb: New test.
+
+2013-09-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * g++.dg/debug/dwarf2/omp-fesdr.C: Check for fopenmp effective target.
+ * gcc.dg/debug/dwarf2/omp-fesdr.c: Likewise.
+
+2013-09-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/in_out_parameter4.adb: New test.
+
+2013-09-18 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/58411
+ * c-c++-common/ubsan/attrib-1.c: New test.
+
+2013-09-17 Cong Hou <congh@google.com>
+
+ * gcc.dg/vect/vect-reduc-dot-s16c.c: Add a test case with dot product
+ on two arrays with short and int types. This should not be recognized
+ as a dot product pattern.
+
+2013-09-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58435
+ * pt.c (tsubst, [BOUND_TEMPLATE_TEMPLATE_PARM]): Take into account
+ the cp_type_quals (r) too.
+
+2013-09-17 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/58332
+ * gcc.c-torture/compile/pr58332.c: New testcase.
+
+2013-09-17 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/pr58387.c: New test.
+
+2013-09-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR tree-optimization/58088
+ * gcc.c-torture/compile/pr58088.c: New test.
+
+2013-09-17 Nick Clifton <nickc@redhat.com>
+
+ * lib/target-supports.exp (check_effective_target_trampolines):
+ Add MSP430 to the list of targets that do not support trampolines.
+ (check_profiling_available): Add MSP430 to the list of targets
+ that do not support profiling.
+ (check_effective_target_tls_runtime): Add MSP430 to the list of
+ targets that do not support TLS.
+
+2013-09-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt27.adb: New test.
+ * gnat.dg/opt27_pkg.ad[sb]: New helper.
+
+2013-09-17 Andreas Schwab <schwab@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-22.c (main): Return zero.
+
+2013-09-17 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58432
+ * gcc.dg/pr58432.c: New testcase.
+
+2013-09-17 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.dg/tree-ssa/slsr-39.c: New test.
+
+2013-09-16 Xinliang David Li <davidxl@google.com>
+
+ * gcc.misc-tests/help.exp: Optimizer help change.
+
+2013-09-16 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/execute/pr58419.c: New test.
+ * gcc.c-torture/execute/pr58431.c: New test.
+
+2013-09-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/58356
+ * gfortran.dg/finalize_19.f90: New.
+
+2013-09-16 Vladimir Makarov <vmakarov@redhat.com>
+
+ * gcc.target/i386/pr58418.c: New.
+
+2013-09-16 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/fmla-intrinsic.c: New.
+ * gcc.target/aarch64/mla-intrinsic.c: Likewise.
+ * gcc.target/aarch64/fmls-intrinsic.c: Likewise.
+ * gcc.target/aarch64/mls-intrinsic.c: Likewise.
+
+2013-09-16 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/mul_intrinsic_1.c: New.
+ * gcc.target/aarch64/fmul_intrinsic_1.c: Likewise.
+
+2013-09-16 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-22.c: New testcase.
+
+2013-09-16 Adam Butcher <adam@jessamine.co.uk>
+
+ * g++.dg/cpp0x/auto9.C: Downgrade two previously expected errors (now
+ interpreted as implicit templates) to be expected pedwarns instead.
+
+2013-09-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57697
+ * gfortran.dg/defined_assignment_10.f90: Comment print statement.
+
+2013-09-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57697
+ * gfortran.dg/defined_assignment_10.f90: New.
+
+2013-09-13 Evgeny Gavrin <e.gavrin@samsung.com>
+
+ * gcc.dg/debug/dwarf2/omp-fesdr.c: Add test.
+ * g++.dg/debug/dwarf2/omp-fesdr.C: Add test.
+
+2013-09-13 Jacek Caban <jacek@codeweavers.com>
+
+ * g++.dg/abi/main.C: Added implicit C linkage tests
+
+2013-09-13 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.target/i386/pr57848.c: New file.
+
+2013-09-13 Christian Bruel <christian.bruel@st.com>
+
+ PR target/58314
+ * gcc.target/sh/torture/pr58314.c: New test.
+
+2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/torture/pr58380.C: Suppress warnings with "-w".
+
+2013-09-12 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/58389
+ * g++.dg/pr58389.C: New test.
+
+2013-09-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/template/pseudodtor2.C: Add column number to dg-error strings.
+ * g++.dg/template/pseudodtor3.C: Likewise.
+
+2013-09-12 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58404
+ * g++.dg/tree-ssa/pr58404.C: New testcase.
+
+2013-09-12 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/58371
+ * g++.dg/ipa/pr58371.C: New test.
+
+2013-09-12 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/ldist-4.c: Remove undefined behavior. Adjust
+ expected outcome and comment why that happens.
+
+2013-09-11 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58377
+ * g++.dg/uninit-pred-4.C: New testcase.
+
+2013-09-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58385
+ * gcc.c-torture/execute/pr58385.c: New test.
+
+2013-09-11 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/thumb-ifcvt-2.c: New test.
+
+2013-09-10 Jeff Law <law@redhat.com>
+
+ * g++.dg/torture/pr58380.C: New test.
+
+2013-09-10 Jan Hubicka <jh@suse.cz>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/template/cond2.C: Tweak, do not expect a "required from".
+
+2013-09-10 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/compile/pr58343.c: New test.
+
+2013-09-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/58365
+ * gcc.c-torture/execute/pr58365.c: New test.
+
+2013-09-10 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
+
+ * gcc.dg/torture/memcpy-1.c: New test.
+
+2013-09-10 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/pr58330.c: New.
+
+2013-09-10 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/medium_offset.c: New.
+
+2013-09-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/58325
+ * g++.dg/warn/Wunused-var-21.C: New test.
+
+ PR tree-optimization/58364
+ * gcc.c-torture/execute/pr58364.c: New test.
+
+2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/43452
+ * g++.dg/warn/Wdelete-incomplete-1.C: New.
+ * g++.dg/warn/Wdelete-incomplete-2.C: Likewise.
+ * g++.dg/init/delete1.C: Adjust.
+
+2013-09-09 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/movdi_1.c: New test.
+
+2013-09-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58362
+ * g++.dg/warn/Wunused-parm-5.C: New.
+
+2013-09-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/cmn-neg.c: New test.
+
+2013-09-09 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/58326
+ * gcc.dg/torture/pr58326-1.c: New testcase.
+ * gcc.dg/torture/pr58326-2.c: Likewise.
+
+2013-09-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/57735
+ * g++.dg/ext/pr57735.C: New test.
+
+2013-09-09 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/58294
+ * g++.dg/torture/PR58294.C: New testcase.
+
+2013-09-08 Jeff Law <law@redhat.com>
+
+ * gcc.c-torture/compile/pr58340.c: New test.
+
+2013-09-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * g++.dg/debug/ra1.C: New test.
+
+2013-09-08 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-11.C: Update template.
+ * g++.dg/ipa/devirt-16.C: New testcase.
+ * g++.dg/ipa/devirt-17.C: New testcase.
+ * g++.dg/ipa/devirt-18.C: New testcase.
+
+2013-09-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54941
+ * g++.dg/overload/new1.C: Adjust.
+
+2013-09-08 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * c-c++-common/opaque-vector.c: New test.
+
+2013-09-08 Tom de Vries <tom@codesourcery.com>
+
+ PR c++/58282
+ * g++.dg/tm/noexcept-6.C: New test.
+
+2013-09-06 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/arc/cond-set-use.c: New test.
+
+2013-09-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/stack_usage2.adb: New test.
+
+2013-09-06 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/table-intrinsics.c
+ (qtbl_tests8_< ,2,3,4>): Fix control vector parameter type.
+ (qtb_tests8_< ,2,3,4>): Likewise.
+ (qtblq_tests8_< ,2,3,4>): Likewise.
+ (qtbxq_tests8_< ,2,3,4>): Likewise.
+
+2013-09-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn10.ad[sb]: New test.
+ * gnat.dg/warn10_pkg.ads: New helper.
+
+2013-09-06 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/ipa/ipa-pta-14.c (scan-ipa-dump) [keeps_null_pointer_checks]:
+ Don't expect NULL in foo.result set.
+ * gcc.dg/tree-ssa/pta-escape-1.c (scan-tree-dump): Don't expect NULL
+ in ESCAPED set.
+ * gcc.dg/tree-ssa/pta-escape-2.c: Likewise.
+ * gcc.dg/tree-ssa/pta-escape-3.c: Likewise.
+
+2013-09-06 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/nearestint-1.c: New testcase.
+
+2013-09-06 Joern Rennecke <joern.rennecke@embecosm.com>
+ Vineet Gupta <Vineet.Gupta@synopsys.com>
+
+ * gcc.c-torture/execute/20101011-1.c [__arc__] (DO_TEST): Define as 0.
+ * gcc.target/arc: New directory.
+ * gcc.dg/torture/pr37868.c: Also skip for arc*-*-*.
+ * gcc.dg/stack-usage-1.c [__arc__] (SIZE): Define.
+ * gcc.dg/torture/stackalign/builtin-apply-2.c
+ [__arc__] (STACK_ARGUMENTS_SIZE): Set to 0.
+ * gcc.dg/builtin-apply2.c
+ [__arc__] (STACK_ARGUMENTS_SIZE): Set to 0.
+
+2013-09-04 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/58201
+ * g++.dg/torture/pr58201_0.C: New testcase.
+ * g++.dg/torture/pr58201_1.C: New testcase.
+ * g++.dg/torture/pr58201.h: New testcase.
+
+2013-09-05 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/autopar/pr49960.c: Disable partial inlining
+
+2013-09-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58137
+ * gcc.target/i386/pr58137.c: New testcase.
+
+2013-09-05 Martin Jambor <mjambor@suse.cz>
+
+ * g++.dg/ipa/remref-1.C: New test.
+ * g++.dg/ipa/remref-2.C: Likewise.
+
+2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/24926
+ * g++.dg/parse/access11.C: New.
+
+2013-09-04 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/warn/weak1.C: Skip on AIX.
+
+2013-09-04 Easwaran Raman <eraman@google.com>
+
+ PR middle-end/57370
+ PR tree-optimization/58011
+ * gfortran.dg/reassoc_12.f90: New testcase.
+ * gcc.dg/tree-ssa/reassoc-31.c: New testcase.
+
+2013-09-04 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/attr-weakref-1.c: Skip on AIX.
+ * gcc.dg/torture/pr53922.c: Skip on AIX.
+ * lib/file-format.exp (gcc_target_object_format): AIX is COFF.
+
+2013-09-04 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/unroll_1.c: Test dumping to stderr.
+
+2013-09-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58305
+ * g++.dg/warn/deprecated-8.C: New.
+
+2013-09-03 Jeff Law <law@redhat.com>
+
+ * tree-ssa/ssa-dom-thread-3.c: Update due to changes in debug
+ dump output.
+
+2013-09-03 Meador Inge <meadori@codesourcery.com>
+
+ Revert:
+
+ 2013-08-30 Meador Inge <meadori@codesourcery.com>
+
+ * gcc.dg/Warray-bounds-11.c: New testcase.
+
+2013-09-03 David Edelsohn <dje.gcc@gmail.com>
+
+ * lib/target-supports.exp (check_weak_available): Return true for AIX.
+
+2013-09-03 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-15.C: Fix testcase.
+
+2013-09-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57656
+ * gcc.dg/torture/pr57656.c: New testcase.
+
+2013-09-03 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57287
+ * gcc.dg/pr57287-2.c: Use setjmp, not __sigsetjmp.
+
+2013-09-02 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/PR56519
+ * gfortran.dg/do_concurrent_3.f90: New test case.
+
+2013-09-02 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/fnsplit-1.c: New testcase.
+
+2013-09-02 Martin Jambor <mjambor@suse.cz>
+
+ PR ipa/58106
+ * gcc.dg/ipa/pr58106.c: New test.
+
+2013-09-02 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c
+ (vdup<bhsd>_lane<su><8,16,32,64>): Force values to SIMD registers.
+
+2013-09-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57511
+ * gcc.dg/tree-ssa/sccp-1.c: New testcase.
+
+2013-09-02 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/loop-4.c: Adjust scan looking for one memory
+ reference.
+
+2013-09-02 Bin Cheng <bin.cheng@arm.com>
+
+ * gcc.target/arm/ivopts-orig_biv-inc.c: New testcase.
+
+2013-09-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/21682, implement DR 565
+ * g++.dg/template/using24.C: New.
+ * g++.dg/template/using25.C: Likewise.
+ * g++.dg/template/using26.C: Likewise.
+
+2013-09-01 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-15.C: New testcase.
+
+2013-09-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/linker_alias.ads: Skip on Darwin.
+
+2013-08-31 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-11.C: Use -fno-devirtualize-speuclatively
+ * g++.dg/tree-ssa/pr45453.C: Likewise.
+
+2013-08-31 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/fork-instrumentation.c: New testcase.
+
+2013-08-30 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/abi/mangle33.C (dg-final): Use match count in scan RE.
+
+2013-08-30 Meador Inge <meadori@codesourcery.com>
+
+ * gcc.dg/Warray-bounds-11.c: New testcase.
+
+2013-08-30 Marek Polacek <polacek@redhat.com>
+
+ * g++.dg/ubsan/div-by-zero-1.C: New test.
+ * c-c++-common/ubsan/save-expr-1.c: New test.
+ * c-c++-common/ubsan/save-expr-2.c: New test.
+ * c-c++-common/ubsan/save-expr-3.c: New test.
+ * c-c++-common/ubsan/save-expr-4.c: New test.
+ * c-c++-common/ubsan/typedef-1.c: New test.
+ * c-c++-common/ubsan/const-char-1.c: New test.
+ * c-c++-common/ubsan/const-expr.c: New test.
+ * c-c++-common/ubsan/div-by-zero-1.c: Likewise.
+ * c-c++-common/ubsan/shift-1.c: Likewise.
+ * c-c++-common/ubsan/shift-2.c: Likewise.
+ * c-c++-common/ubsan/div-by-zero-2.c: Likewise.
+ * lib/ubsan-dg.exp: New file.
+ * g++.dg/dg.exp: Add ubsan tests.
+ * g++.dg/ubsan/ubsan.exp: New file.
+ * gcc.dg/ubsan/ubsan.exp: New file.
+ * g++.dg/ubsan/cxx11-shift-1.C: New test.
+ * g++.dg/ubsan/cxx11-shift-2.C: New test.
+ * c-c++-common/ubsan/div-by-zero-3.c: New test.
+ * c-c++-common/ubsan/div-by-zero-1.c: New test.
+ * c-c++-common/ubsan/div-by-zero-4.c: New test.
+ * c-c++-common/ubsan/shift-3.c: New test.
+ * c-c++-common/ubsan/unreachable-1.c: New test.
+ * c-c++-common/ubsan/shift-1.c: New test.
+ * c-c++-common/ubsan/shift-2.c: New test.
+ * c-c++-common/ubsan/div-by-zero-2.c: New test.
+ * gcc.dg/ubsan/c99-shift-2.c: New test.
+ * gcc.dg/ubsan/c99-shift-1.c: New test.
+
+2013-08-29 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/attr-alias.c: Rename test3 to test1
+ to match template and comment.
+
+2013-08-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51424
+ * g++.dg/cpp0x/dc8.C: New.
+ * g++.dg/template/meminit1.C: Adjust.
+
+2013-08-30 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/inline-dump.c: Delete inadvertant commit.
+
+2013-08-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58277
+ * gcc.c-torture/execute/pr58277-1.c: New test.
+ * gcc.c-torture/execute/pr58277-2.c: New test.
+
+2013-08-30 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/guality/param-1.c: New test.
+ * gcc.dg/guality/param-2.c: Likewise.
+
+2013-08-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58228
+ * gcc.dg/torture/pr58228.c: New testcase.
+
+2013-08-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58223
+ * gcc.dg/torture/pr58223.c: New testcase.
+ * gcc.dg/tree-ssa/ldist-16.c: Flip expected behavior.
+
+2013-08-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58010
+ * gcc.dg/pr58010.c: New testcase.
+
+2013-08-29 Xinliang DavidLi <davidxl@google.com>
+
+ * gcc.dg/unroll_3.c: Message change.
+ * gcc.dg/unroll_4.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-1.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-2.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-3.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-4.c: Likewise.
+ * gcc.dg/tree-ssa/cunroll-5.c: Likewise.
+ * gcc.dg/tree-ssa/loop-23.c: Likewise.
+ * gcc.dg/tree-ssa/loop-1.c: Likewise.
+ * gcc.dg/unroll_1.c: Likewise.
+ * gcc.dg/vect/bb-slp-31.c: Likewise.
+ * gcc.dg/vect/bb-slp-14.c: Likewise.
+ * gcc.dg/vect/bb-slp-8.c: Likewise.
+ * gcc.dg/vect/bb-slp-23.c: Likewise.
+ * gcc.dg/vect/bb-slp-15.c: Likewise.
+ * gcc.dg/vect/bb-slp-9.c: Likewise.
+ * gcc.dg/vect/bb-slp-24.c: Likewise.
+ * gcc.dg/vect/bb-slp-16.c: Likewise.
+ * gcc.dg/vect/bb-slp-25.c: Likewise.
+ * gcc.dg/vect/bb-slp-17.c: Likewise.
+ * gcc.dg/vect/bb-slp-26.c: Likewise.
+ * gcc.dg/vect/bb-slp-18.c: Likewise.
+ * gcc.dg/vect/no-tree-reassoc-bb-slp-12.c: Likewise.
+ * gcc.dg/vect/bb-slp-27.c: Likewise.
+ * gcc.dg/vect/bb-slp-19.c: Likewise.
+ * gcc.dg/vect/bb-slp-28.c: Likewise.
+ * gcc.dg/vect/bb-slp-cond-1.c: Likewise.
+ * gcc.dg/vect/bb-slp-29.c: Likewise.
+ * gcc.dg/vect/bb-slp-8a.c: Likewise.
+ * gcc.dg/vect/bb-slp-pattern-2.c: Likewise.
+ * gcc.dg/vect/bb-slp-1.c: Likewise.
+ * gcc.dg/vect/bb-slp-8b.c: Likewise.
+ * gcc.dg/vect/bb-slp-2.c: Likewise.
+ * gcc.dg/vect/bb-slp-3.c: Likewise.
+ * gcc.dg/vect/bb-slp-10.c: Likewise.
+ * gcc.dg/vect/fast-math-bb-slp-call-1.c: Likewise.
+ * gcc.dg/vect/bb-slp-4.c: Likewise.
+ * gcc.dg/vect/bb-slp-11.c: Likewise.
+ * gcc.dg/vect/fast-math-bb-slp-call-2.c: Likewise.
+ * gcc.dg/vect/bb-slp-5.c: Likewise.
+ * gcc.dg/vect/bb-slp-20.c: Likewise.
+ * gcc.dg/vect/bb-slp-6.c: Likewise.
+ * gcc.dg/vect/bb-slp-21.c: Likewise.
+ * gcc.dg/vect/bb-slp-30.c: Likewise.
+ * gcc.dg/vect/bb-slp-13.c: Likewise.
+ * gcc.dg/vect/bb-slp-7.c: Likewise.
+ * gcc.dg/vect/bb-slp-22.c: Likewise.
+ * gcc.dg/unroll_2.c: Likewise.
+ * g++.dg/vect/slp-pr50413.cc: Likewise.
+ * g++.dg/vect/slp-pr56812.cc: Likewise.
+ * g++.dg/vect/slp-pr50819.cc: Likewise.
+
+2013-08-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/tree-ssa/ipa-cp-1.c: Adjust regexp.
+
+2013-08-29 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/pr40209.c: Use -fopt-info.
+ * gcc.dg/pr26570.c: Ditto.
+ * gcc.dg/pr32773.c: Ditto.
+ * g++.dg/tree-ssa/dom-invalid.C: Ditto.
+
+2013-08-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/58246
+ * gcc.dg/torture/pr58246.c: New testcase.
+
+2013-08-29 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52243
+ * gfortran.dg/realloc_on_assign_14.f90: Remove warning made
+ obsolete by patch.
+ * gfortran.dg/realloc_on_assign_19.f90: New test.
+
+2013-08-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57287
+ * gcc.dg/pr57287-2.c: New testcase.
+
+2013-08-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57685
+ * gcc.dg/torture/pr57685.c: New testcase.
+
+2013-08-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58255
+ * g++.dg/cpp0x/dc7.C: New.
+
+2013-08-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/58257
+ * c-c++-common/gomp/pr58257.c: New test.
+
+2013-08-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56933
+ * gcc.dg/vect/pr56933.c: Properly guard runtime with check_vect ().
+
+2013-08-27 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.target/aarch64/scalar_shift_1.c: New.
+
+2013-08-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57521
+ * gcc.dg/torture/pr57521.c: New testcase.
+
+2013-08-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/57860
+ PR rtl-optimization/57861
+ PR rtl-optimization/57875
+ PR rtl-optimization/57876
+ PR rtl-optimization/57877
+ * gcc.c-torture/execute/pr57860.c: New test.
+ * gcc.c-torture/execute/pr57861.c: New test.
+ * gcc.c-torture/execute/pr57875.c: New test.
+ * gcc.c-torture/execute/pr57876.c: New test.
+ * gcc.c-torture/execute/pr57877.c: New test.
+
+2013-08-26 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/58146
+ * gfortran.dg/bounds_check_18.f90: New test.
+
+2013-08-23 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-14.C: Fix typo.
+
+2013-08-23 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/57798
+ * gfortran.dg/inline_sum_5.f90: New.
+
+2013-08-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/57843
+ * gfortran.dg/typebound_assignment_7.f90: New.
+
+2013-08-23 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/devirt-13.C: New testcase.
+ * g++.dg/ipa/devirt-14.C: New testcase.
+
+2013-08-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/58218
+ * gcc.target/i386/pr58218.c: New test.
+
+ PR tree-optimization/58209
+ * gcc.c-torture/execute/pr58209.c: New test.
+
+2013-08-22 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/pr57744.c: Declare abort.
+
+2013-08-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56380
+ * g++.dg/template/error54.C: New.
+
+2013-08-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58185
+ * gfortran.dg/select_type_34.f90: New.
+
+2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56130
+ * g++.dg/warn/deprecated-7.C: New.
+
+2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/tree-prof/pr57451.C: Remove spurious dg-do directive.
+
+2013-08-21 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/ssa-vrp-thread-1.c: New test.
+
+2013-08-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56134
+ * g++.dg/ext/attr-alias-3.C: New.
+
+2013-08-20 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/53655
+ * gfortran.dg/intent_out_8.f90: New.
+
+2013-08-20 Teresa Johnson <tejohnson@google.com>
+
+ PR rtl-optimizations/57451
+ * g++.dg/tree-prof/pr57451.C: New test.
+
+2013-08-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58190
+ * g++.dg/pr57878.C: Use __SIZE_TYPE__.
+
+2013-08-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57490
+ * c-c++-common/cilk-plus/AN/pr57490.c: New test.
+
+2013-08-19 Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/dfp-dd-2.c: New test.
+ * gcc.target/powerpc/dfp-td-2.c: Likewise.
+ * gcc.target/powerpc/dfp-td-3.c: Likewise.
+
+2013-08-19 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mulsize-1.c: Check for SLL as well as SUBU.
+ * gcc.target/mips/mulsize-2.c: Check for ADDU rather than SUBU.
+ Check for SLL too.
+
+2013-08-19 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.target/avr/progmem-error-1.cpp: Update linenumber of error.
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c [avr-*-*]: Expect 6 times
+ "Threaded".
+
+ * gcc.dg/tree-ssa/vrp55.c: Use keeps_null_pointer_checks to determine
+ correct test response.
+
+ PR testsuite/52641
+ * gcc.dg/tree-ssa/pr31261.c [int16]: Change expected unsigned type.
+ * gcc.dg/tree-ssa/ssa-pre-21.c [! size32plus]: Mark as xfail.
+ * gcc.dg/tree-ssa/vector-4.c (SItype): New typedef.
+ (v4si): Use it.
+ * gcc.dg/tree-ssa/ssa-pre-30.c: Test requires int32.
+ * gcc.dg/tree-ssa/vrp58.c: Adjust scan expression for int16.
+
+ * gcc.dg/tree-ssa/vrp87.c [avr-*-*] (dg-additional-options): New.
+
+2013-08-18 Jan Hubicka <jh@suse.cz>
+
+ * g++.dg/ipa/type-inheritance-1.C: New testcase.
+
+2013-08-19 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46271
+ * gfortran.dg/gomp/proc_ptr_1.f90: New.
+
+2013-08-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58006
+ * g++.dg/opt/pr58006.C: New test.
+
+2013-08-18 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/linker_alias.ads: New test.
+
+2013-08-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58164
+ * gcc.c-torture/compile/pr58164.c: New test.
+
+ PR tree-optimization/58165
+ * g++.dg/opt/pr58165.C: New test.
+
+2013-08-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51912
+ * g++.dg/cpp0x/enum28.C: New.
+ * g++.dg/cpp0x/enum15.C: Adjust.
+
+2013-08-14 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/57949
+ * gcc.target/powerpc/pr57949-1.c: New.
+ * gcc.target/powerpc/pr57949-2.c: New.
+
+2013-08-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/58145
+ * gcc.dg/pr58145-1.c: New test.
+ * gcc.dg/pr58145-2.c: New test.
+
+2013-08-14 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/debug/dwarf2/dwarf2.exp: Replace -gdwarf-2 with -gdwarf.
+ * gcc.dg/debug/dwarf2/dwarf-die7.c: Likewise.
+ * gcc.dg/debug/dwarf2/static1.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-dfp.c: Likewise.
+ * gcc.dg/debug/dwarf2/fesd-any.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-uninit.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-die1.c: Likewise.
+ * gcc.dg/debug/dwarf2/var1.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr29609-2.c: Likewise.
+ * gcc.dg/debug/dwarf2/aranges-fnsec-1.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-die3.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-merge.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-char1.c: Likewise.
+ * gcc.dg/debug/dwarf2/discriminator.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-char2.c: Likewise.
+ * gcc.dg/debug/dwarf2/fesd-baseonly.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr36690-3.c: Likewise.
+ * gcc.dg/debug/dwarf2/const-2.c: Likewise.
+ * gcc.dg/debug/dwarf2/ipa-cp1.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-char3.c: Likewise.
+ * gcc.dg/debug/dwarf2/var2.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr36690-2.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr31230.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-float.c: Likewise.
+ * gcc.dg/debug/dwarf2/short-circuit.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr36690-1.c: Likewise.
+ * gcc.dg/debug/dwarf2/fesd-reduced.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr37616.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-die2.c: Likewise.
+ * gcc.dg/debug/dwarf2/inline1.c: Likewise.
+ * gcc.dg/debug/dwarf2/fesd-sys.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr29609-1.c: Likewise.
+ * gcc.dg/debug/dwarf2/asm-line1.c: Likewise.
+ * gcc.dg/debug/dwarf2/c99-typedef1.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf2-macro.c: Likewise.
+ * gcc.dg/debug/dwarf2/fesd-none.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr51410.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-file1.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-die6.c: Likewise.
+ * gcc.dg/debug/dwarf2/const-2b.c: Likewise.
+ * gcc.dg/debug/dwarf2/dwarf-die5.c: Likewise.
+
+ PR testsuite/52641
+ * gcc.c-torture/execute/pr56799.x: New file.
+
+ * gcc.dg/c99-stdint-1.c [avr-*-*]: Update line number for dg-bogus.
+
+ * gcc.dg/torture/stackalign/builtin-apply-2.c: Also skip for avr.
+
+ * gcc.dg/pr44214-1.c (v2df): Define size using sizeof (double).
+ * gcc.dg/pr44214-3.c (v2df): Likewise.
+
+ * gcc.dg/pr46647.c: xfail for avr-*-*.
+
+ * gcc.dg/strlenopt-10.c [avr-*-*]: Reduce number of expected
+ memcpy by one.
+ * gcc.dg/strlenopt-11.c [avr-*-*]: Likewise.
+ Expect l to be optimized away.
+ * gcc.dg/strlenopt-13.c [avr-*-*]: Likewise.
+
+ PR testsuite/52641
+ * c-c++-common/scal-to-vec1.c: Add !int16 and large_double conditions
+ to tests that assume int/double are larger than short/float.
+
+ PR testsuite/52641
+ * c-c++-common/simulate-thread/bitfields-2.c: Run test only for
+ target { ! int16 }.
+ * gcc.dg/tree-ssa/pr54245.c: Do slsr scan only for target { ! int16 }.
+ * gcc.dg/tree-ssa/slsr-1.c: Adjust multiplicators to scan for for
+ target { int16 }. Restrict existing tests to target { int32 }
+ where appropriate.
+ * gcc.dg/tree-ssa/slsr-2.c, gcc.dg/tree-ssa/slsr-27.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-28.c, gcc.dg/tree-ssa/slsr-29.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-3.c, gcc.dg/tree-ssa/ssa-ccp-23.c: Likewise.
+ * lib/target-supports.exp (check_effective_target_int32): New proc.
+
+ * gcc.dg/tree-ssa/pr42585.c: Add avr-*-* to list of targets to
+ exclude from scan test.
+
+ * gcc.dg/debug/dwarf2/global-used-types.c: Request dwarf output.
+ * gcc.dg/debug/dwarf2/inline2.c: Likewise.
+ * gcc.dg/debug/dwarf2/inline3.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr37726.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-1.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-2.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-3.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-4.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-5.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41445-6.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41543.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr41695.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr43237.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr47939-1.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr47939-2.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr47939-3.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr47939-4.c: Likewise.
+ * gcc.dg/debug/dwarf2/pr53948.c: Likewise.
+ * gcc.dg/debug/dwarf2/struct-loc1.c: Likewise.
+
+2013-08-14 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/arm/pr19599.c: Skip for -mthumb.
+
+ * gcc.target/arm/atomic-comp-swap-release-acquire.c: Move dg-do
+ to be the first test directive.
+ * gcc.target/arm/atomic-op-acq_rel.c: Likewise.
+ * gcc.target/arm/atomic-op-acquire.c: Likewise.
+ * gcc.target/arm/atomic-op-char.c: Likewise.
+ * gcc.target/arm/atomic-op-consume.c: Likewise.
+ * gcc.target/arm/atomic-op-int.c: Likewise.
+ * gcc.target/arm/atomic-op-relaxed.c: Likewise.
+ * gcc.target/arm/atomic-op-release.c: Likewise.
+ * gcc.target/arm/atomic-op-seq_cst.c: Likewise.
+ * gcc.target/arm/atomic-op-short.c: Likewise.
+
+2013-08-14 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/57662
+ * gcc.dg/pr57662.c: New test.
+
+2013-08-13 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gcc.target/mips/nan-legacy.c: Accept 4294967295 as an
+ alternative to -1.
+ * gcc.target/mips/nans-legacy.c: Likewise.
+
+2013-08-13 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gcc.target/mips/fabs-2008.c: Correct scan-assembler pattern
+ escapes.
+ * gcc.target/mips/fabs-legacy.c: Likewise.
+ * gcc.target/mips/fabsf-2008.c: Likewise.
+ * gcc.target/mips/fabsf-legacy.c: Likewise.
+ * gcc.target/mips/fneg-2008.c: Likewise.
+ * gcc.target/mips/fneg-legacy.c: Likewise.
+ * gcc.target/mips/fnegf-2008.c: Likewise.
+ * gcc.target/mips/fnegf-legacy.c: Likewise.
+ * gcc.target/mips/nan-2008.c: Likewise.
+ * gcc.target/mips/nan-legacy.c: Likewise.
+ * gcc.target/mips/nanf-2008.c: Likewise.
+ * gcc.target/mips/nanf-legacy.c: Likewise.
+ * gcc.target/mips/nans-2008.c: Likewise.
+ * gcc.target/mips/nans-legacy.c: Likewise.
+ * gcc.target/mips/nansf-2008.c: Likewise.
+ * gcc.target/mips/nansf-legacy.c: Likewise.
+
+2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/valued_proc.adb: New test.
+ * gnat.dg/valued_proc_pkg.ads: New helper.
+
+2013-08-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57661
+ * g++.dg/opt/pr57661.C: New test.
+
+ PR sanitizer/56417
+ * gcc.dg/asan/pr56417.c: New test.
+
+2013-08-13 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization16.adb: New test.
+ * gnat.dg/loop_optimization16_pkg.ad[sb]: New helper.
+
+2013-08-13 Marek Polacek <polacek@redhat.com>
+
+ * gcc.dg/pr57980.c: Use vector of two elements, not just one.
+
+2013-08-13 David Malcolm <dmalcolm@redhat.com>
+
+ Example of converting global state to per-pass state.
+
+ * gcc.dg/plugin/one_time_plugin.c (one_pass::execute): Convert
+ global state "static int counter" to...
+ (one_pass::counter): ...this instance data.
+
+2013-08-13 David Malcolm <dmalcolm@redhat.com>
+
+ * gcc.dg/plugin/one_time_plugin.c: (one_pass_gate): Convert
+ to member function...
+ (one_pass::gate): ...this.
+ (one_pass_exec): Convert to member function...
+ (one_pass::impl_execute): ...this.
+
+2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57416
+ * g++.dg/cpp0x/pr57416.C: New.
+
+2013-08-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/constexpr-function2.C: Adjust for error -> inform
+ changes.
+ * g++.dg/cpp0x/constexpr-neg1.C: Likewise.
+ * g++.dg/cpp0x/defaulted2.C: Likewise.
+ * g++.dg/cpp0x/defaulted31.C: Likewise.
+ * g++.dg/cpp0x/error6.C: Likewise.
+ * g++.dg/cpp0x/gen-attrs-32.C: Likewise.
+ * g++.dg/cpp0x/override2.C: Likewise.
+ * g++.dg/cpp0x/parse1.C: Likewise.
+ * g++.dg/cpp0x/scoped_enum.C: Likewise.
+ * g++.dg/cpp0x/temp_default4.C: Likewise.
+ * g++.dg/ext/attrib32.C: Likewise.
+ * g++.dg/ext/gnu-inline-global-reject.C: Likewise.
+ * g++.dg/ext/mv13.C: Likewise.
+ * g++.dg/ext/mv7.C: Likewise.
+ * g++.dg/ext/mv9.C: Likewise.
+ * g++.dg/ext/pr57362.C: Likewise.
+ * g++.dg/ext/typeof10.C: Likewise.
+ * g++.dg/lookup/anon6.C: Likewise.
+ * g++.dg/lookup/crash6.C: Likewise.
+ * g++.dg/lookup/name-clash5.C: Likewise.
+ * g++.dg/lookup/name-clash6.C: Likewise.
+ * g++.dg/other/anon4.C: Likewise.
+ * g++.dg/other/error15.C: Likewise.
+ * g++.dg/other/error8.C: Likewise.
+ * g++.dg/other/redecl2.C: Likewise.
+ * g++.dg/parse/crash16.C: Likewise.
+ * g++.dg/parse/crash21.C: Likewise.
+ * g++.dg/parse/crash38.C: Likewise.
+ * g++.dg/parse/redef2.C: Likewise.
+ * g++.dg/parse/struct-as-enum1.C: Likewise.
+ * g++.dg/template/crash39.C: Likewise.
+ * g++.dg/template/redecl3.C: Likewise.
+ * g++.dg/tls/diag-3.C: Likewise.
+ * g++.dg/warn/Wredundant-decls-spec.C: Likewise.
+ * g++.old-deja/g++.benjamin/typedef01.C: Likewise.
+ * g++.old-deja/g++.benjamin/warn02.C: Likewise.
+ * g++.old-deja/g++.brendan/crash16.C: Likewise.
+ * g++.old-deja/g++.brendan/crash18.C: Likewise.
+ * g++.old-deja/g++.brendan/err-msg4.C: Likewise.
+ * g++.old-deja/g++.brendan/redecl1.C: Likewise.
+ * g++.old-deja/g++.brendan/static3.C: Likewise.
+ * g++.old-deja/g++.bugs/900127_02.C: Likewise.
+ * g++.old-deja/g++.jason/binding.C: Likewise.
+ * g++.old-deja/g++.jason/crash4.C: Likewise.
+ * g++.old-deja/g++.jason/crash7.C: Likewise.
+ * g++.old-deja/g++.jason/lineno.C: Likewise.
+ * g++.old-deja/g++.jason/scoping7.C: Likewise.
+ * g++.old-deja/g++.mike/misc3.C: Likewise.
+ * g++.old-deja/g++.mike/net44.C: Likewise.
+ * g++.old-deja/g++.mike/ns3.C: Likewise.
+ * g++.old-deja/g++.ns/alias4.C: Likewise.
+ * g++.old-deja/g++.ns/ns11.C: Likewise.
+ * g++.old-deja/g++.other/crash23.C: Likewise.
+ * g++.old-deja/g++.other/decl8.C: Likewise.
+ * g++.old-deja/g++.other/linkage3.C: Likewise.
+ * g++.old-deja/g++.other/typeck1.C: Likewise.
+ * g++.old-deja/g++.other/typedef5.C: Likewise.
+ * g++.old-deja/g++.pt/explicit34.C: Likewise.
+ * g++.old-deja/g++.pt/friend36.C: Likewise.
+ * obj-c++.dg/method-8.mm: Likewise.
+ * obj-c++.dg/tls/diag-3.mm: Likewise.
+
+2013-08-12 Perez Read <netfirewall@gmail.com>
+
+ PR target/58132
+ * gcc.target/i386/movabs-1.c: New test.
+
+2013-08-12 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/57980
+ * gcc.dg/pr57980.c: New test.
+
+2013-08-12 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56666
+ * gfortran.dg/do_check_10.f90: New test.
+ * gfortran.dg/array_constructor_11.f90: Add -Wzerotrip to dg-options.
+ * gfortran.dg/array_constructor_18.f90: Likewise.
+ * gfortran.dg/array_constructor_22.f90: Likewise.
+ * gfortran.dg/coarray_15.f90: Likewise.
+ * gfortran.dg/do_1.f90: Add -Wall to dg-options.
+ * gfortran.dg/do_3.F90: Add -Wzerotrip to dg-options.
+ * gfortran.dg/do_check_5.f90: Add -Wall to gd-options.
+
+2013-08-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53349
+ * g++.dg/cpp0x/constexpr-ice8.C: New.
+
+2013-08-09 Xinliang David Li <davidxl@google.com>
+
+ * gcc.target/i386/memcpy-strategy-1.c: New test.
+ * gcc.target/i386/memcpy-strategy-2.c: Ditto.
+ * gcc.target/i386/memset-strategy-1.c: Ditto.
+ * gcc.target/i386/memcpy-strategy-3.c: Ditto.
+
+2013-08-09 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-prof/crossmodule-indircall-1.c: New testcase.
+ * gcc.dg/tree-prof/crossmodule-indircall-1a.c: New testcase.
+
+2013-08-09 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/lower-subreg-1.c: Skip aarch64*-*-*.
+
+2013-08-09 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/58058
+ * gfortran.dg/transfer_intrinsic_6.f90: New.
+
+2013-08-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ Revert:
+ 2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/46206
+ * g++.dg/lookup/typedef2.C: New.
+
+2013-08-09 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c: Update expected
+ output of vdup intrinsics.
+
+2013-08-09 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/lp1189445.c: New testcase.
+
+2013-08-08 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR rtl-optimization/58079
+ * gcc.dg/torture/pr58079.c: New test.
+
+2013-08-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn9.adb: New test.
+
+2013-08-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/46206
+ * g++.dg/lookup/typedef2.C: New.
+
+2013-08-07 David Malcolm <dmalcolm@redhat.com>
+
+ * lib/plugin-support.exp (plugin-test-execute): Add -fno-rtti
+ to optstr when building plugins on darwin.
+
+2013-08-06 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/57539
+ * gcc.dg/ipa/pr57539.c: New test.
+
+2013-08-06 Martin Jambor <mjambor@suse.cz>
+ Bernd Edlinger <bernd.edlinger@hotmail.de>
+
+ * gcc.dg/torture/pr58041.c (foo): Accept z by reference.
+ (a): Fix constructor.
+
+2013-08-06 Martin Jambor <mjambor@suse.cz>
+
+ PR fortran/57987
+ * gfortran.dg/pr57987.f90: New test.
+
+2013-08-06 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/58041
+ * gcc.dg/torture/pr58041.c: New test.
+ * gcc.target/arm/pr58041.c: Likewise.
+
+2013-08-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/57306
+ * gfortran.dg/pointer_init_8.f90: New.
+
+2013-08-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/58080
+ * g++.dg/cpp0x/pr58080.C: New.
+
+2013-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ * lib/plugin-support.exp (plugin-test-execute): Add -fno-rtti
+ to optstr when building plugins.
+
+2013-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ Patch autogenerated by refactor_passes.py from
+ https://github.com/davidmalcolm/gcc-refactoring-scripts
+ revision 03fe39476a4c4ea450b49e087cfa817b5f92021e
+
+ * gcc.dg/plugin/one_time_plugin.c (one_pass): Convert from a global
+ struct to a subclass of gimple_opt_pass along with...
+ (pass_data_one_pass): ...new pass_data instance and...
+ (make_one_pass): ...new function.
+ * gcc.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
+ global struct to a subclass of gimple_opt_pass along with...
+ (pass_data_warn_self_assign): ...new pass_data instance and...
+ (make_pass_warn_self_assign): ...new function.
+ * g++.dg/plugin/dumb_plugin.c (pass_dumb_plugin_example): Convert from
+ a global struct to a subclass of gimple_opt_pass along with...
+ (pass_data_dumb_plugin_example): ...new pass_data instance and...
+ (make_pass_dumb_plugin_example): ...new function.
+ * g++.dg/plugin/selfassign.c (pass_warn_self_assign): Convert from a
+ global struct to a subclass of gimple_opt_pass along with...
+ (pass_data_warn_self_assign): ...new pass_data instance and...
+ (make_pass_warn_self_assign): ...new function.
+
+2013-08-05 David Malcolm <dmalcolm@redhat.com>
+
+ * g++.dg/plugin/dumb_plugin.c (plugin_init): Rework how the pass
+ is created and added to the pass_manager to reflect
+ autogenerated changes.
+ * g++.dg/plugin/selfassign.c (plugin_init): Likewise.
+ * gcc.dg/plugin/one_time_plugin.c (plugin_init): Likewise.
+ * gcc.dg/plugin/selfassign.c (plugin_init): Likewise.
+
+2013-08-04 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/58072
+ * g++.dg/cpp0x/pr58072.C: New.
+
+2013-08-03 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
+
+ * gcc.dg/torture/pr57993-2.cpp: New.
+
+2013-08-02 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/ipa/ipa-1.c: Update.
+ * gcc.dg/ipa/ipa-2.c: Update.
+ * gcc.dg/ipa/ipa-3.c: Update.
+ * gcc.dg/ipa/ipa-4.c: Update.
+ * gcc.dg/ipa/ipa-5.c: Update.
+ * gcc.dg/ipa/ipa-7.c: Update.
+ * gcc.dg/ipa/ipa-8.c: Update.
+ * gcc.dg/ipa/ipcp-1.c: Update.
+ * gcc.dg/ipa/ipcp-2.c: Update.
+
+2013-08-02 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/58048
+ * gcc.target/i386/pr58048.c: New.
+
+2013-08-02 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/neon-for-64bits-2.c: Delete.
+
+2013-08-01 Fabien Chêne <fabien@gcc.gnu.org>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ PR c++/54537
+ * g++.dg/overload/using3.C: New.
+ * g++.dg/overload/using2.C: Adjust.
+ * g++.dg/lookup/using9.C: Likewise.
+
+2013-08-01 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/pr46972-2.c: New test.
+
+2013-08-01 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.dg/vect/vect-iv-5.c: Make xfail conditional with !arm_neon_ok.
+
+2013-07-31 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/fusion.c: New file, test power8 fusion support.
+
+2013-07-31 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp (mips-dg-options): Test for mabicalls
+ rather than addressing!=absolute when deciding how to handle MIPS16
+ when the test forces an ABI.
+
+2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57673
+ * g++.dg/cpp0x/nsdmi-sizeof.C: New.
+
+2013-07-30 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.target/mips/code-readable-1.c: Increase switch size.
+ * gcc.target/mips/code-readable-2.c: Ditto.
+ * gcc.target/mips/code-readable-3.c: Ditto.
+ * gcc.target/mips/code-readable-4.c: Ditto.
+
+2013-07-30 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57947
+ * g++.dg/parse/crash63.C: New.
+
+2013-07-30 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57530
+ * gfortran.dg/pointer_assign_8.f90: New.
+ * gfortran.dg/pointer_assign_9.f90: New.
+ * gfortran.dg/pointer_assign_10.f90: New.
+ * gfortran.dg/pointer_assign_11.f90: New.
+
+2013-07-30 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.target/arm/pr57637.c: New testcase.
+
+2013-07-29 Bill Schmidt <wschmidt@vnet.linux.ibm.com>
+
+ PR tree-optimization/57993
+ * gcc.dg/torture/pr57993.c: New test.
+
+2013-07-29 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/tree-ssa/pr44258.c: Disable scan test for Epiphany.
+
+2013-07-29 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57948
+ * g++.dg/conversion/ambig2.C: New.
+
+2013-07-29 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gcc.target/mips/fabs-2008.c: New test case.
+ * gcc.target/mips/fabs-legacy.c: New test case.
+ * gcc.target/mips/fabsf-2008.c: New test case.
+ * gcc.target/mips/fabsf-legacy.c: New test case.
+ * gcc.target/mips/fneg-2008.c: New test case.
+ * gcc.target/mips/fneg-legacy.c: New test case.
+ * gcc.target/mips/fneg-2008.c: New test case.
+ * gcc.target/mips/fneg-legacy.c: New test case.
+ * gcc.target/mips/nan-2008.c: New test case.
+ * gcc.target/mips/nan-legacy.c: New test case.
+ * gcc.target/mips/nanf-2008.c: New test case.
+ * gcc.target/mips/nanf-legacy.c: New test case.
+ * gcc.target/mips/nans-2008.c: New test case.
+ * gcc.target/mips/nans-legacy.c: New test case.
+ * gcc.target/mips/nansf-2008.c: New test case.
+ * gcc.target/mips/nansf-legacy.c: New test case.
+ * gcc.target/mips/mips.exp: Handle `-mabs=' and `-mnan='.
+
+2013-07-29 Alexander Ivchenko <alexander.ivchenko@intel.com>
+ Maxim Kuvyrkov <maxim@kugelworks.com>
+
+ * lib/target-supports.exp (check_effective_target_non_bionic): New
+ effective-target test.
+ * g++.dg/tls/thread_local4.C: Disable test for Bionic.
+ * g++.dg/tls/thread_local4g.C: Ditto.
+
+2013-07-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/58009
+ * gfortran.dg/vector_subsript_7.f90: New test.
+
+2013-07-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57991
+ * gfortran.dg/warn_alias.f90: New.
+
+2013-07-27 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/57285
+ * gfortran.dg/class_array_19.f90: New.
+
+2013-07-27 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/vect/pr57705.c: Adjust for a !vect_pack_trunc target.
+ * gcc.dg/vect/pr57741-2.c: Require a vect_float target.
+ * gcc.dg/vect/pr57741-3.c: Likewise.
+ * gcc.dg/vect/bb-slp-32.c: XFAIL for a vect_no_align target.
+
+2013-07-26 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ Skip tests that make assumptions about struct layout that don't hold
+ on epiphany:
+ * g++.dg/cpp0x/cast.C: Skip for epiphany-*-*.
+ * g++.dg/cpp0x/iop.C: Likewise.
+ * g++.dg/cpp0x/named_refs.C: Likewise.
+ * g++.dg/cpp0x/rv1p.C: Likewise.
+ * g++.dg/cpp0x/rv2p.C: Likewise.
+ * g++.dg/cpp0x/rv3p.C: Likewise.
+ * g++.dg/cpp0x/rv4p.C: Likewise.
+ * g++.dg/cpp0x/rv5p.C: Likewise.
+ * g++.dg/cpp0x/rv6p.C: Likewise.
+ * g++.dg/cpp0x/rv7p.C: Likewise.
+ * g++.dg/cpp0x/rv8p.C: Likewise.
+ * g++.dg/ext/strncpy-chk1.C: Likewise.
+ * gcc.dg/builtin-object-size-10.c: Likewise.
+ * gcc.dg/builtin-object-size-11.c: Likewise.
+ * gcc.dg/builtin-stringop-chk-1.c: Likewise.
+ * gcc.dg/pr25805.c: Likewise.
+ * gcc.c-torture/execute/builtins/memcpy-chk.x: New file.
+ * gcc.c-torture/execute/builtins/memmove-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/mempcpy-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/memset-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/snprintf-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/sprintf-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/strcat-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/strcpy-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/strncat-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/strncpy-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/vsnprintf-chk.x: Likewise.
+ * gcc.c-torture/execute/builtins/vsprintf-chk.x: Likewise.
+ * gcc.c-torture/execute/zerolen-2.x: Likewise.
+ * gcc.c-torture/execute/builtins/stpcpy-chk.x: Likewise.
+
+ * gcc.dg/pr27095.c: For Epiphany, add -mshort-calls.
+ * gcc.dg/tree-ssa/loop-1.c: Likewise.
+
+ * gcc.dg/torture/pr37868.c: Disable for epiphany.
+ * gcc.dg/sibcall-6.c: Enable for epiphany.
+
+2013-07-26 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/minmax_minus.c: Scan for absence of mov.
+
+2013-07-26 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/ppc-vector-memcpy.c: Test use of VMX for
+ memcpy not initializers.
+
+ * gcc.dg/guality/guality.exp: Skip on AIX.
+
+2013-07-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57101
+ * g++.dg/cpp0x/pr57101.C: New.
+
+2013-07-26 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/neg_1.c: New test.
+
+2013-07-25 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/57966
+ * gfortran.dg/typebound_call_25.f90: New.
+
+2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57981
+ * g++.dg/cpp0x/pr57981.C: New.
+
+2013-07-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57880
+ * g++.dg/cpp1y/udlit-empty-string-neg.C: New.
+
+2013-07-25 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/57960
+ * gcc.target/s390/pr57960.c: New.
+
+2013-07-25 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/57639
+ * gfortran.dg/unlimited_polymorphic_9.f90: New.
+
+2013-07-25 Terry Guo <terry.guo@arm.com>
+
+ * gcc.target/arm/thumb1-Os-mult.c: New test case.
+
+2013-07-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57942
+ * g++.dg/inherit/pr57942.C: New.
+
+2013-07-23 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/bool2.h: New file, test the code generation
+ of logical operations for power5, altivec, power7, and power8 systems.
+ * gcc.target/powerpc/bool2-p5.c: Likewise.
+ * gcc.target/powerpc/bool2-av.c: Likewise.
+ * gcc.target/powerpc/bool2-p7.c: Likewise.
+ * gcc.target/powerpc/bool2-p8.c: Likewise.
+ * gcc.target/powerpc/bool3.h: Likewise.
+ * gcc.target/powerpc/bool3-av.c: Likewise.
+ * gcc.target/powerpc/bool2-p7.c: Likewise.
+ * gcc.target/powerpc/bool2-p8.c: Likewise.
+
+2013-07-23 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.target/aarch64/vect_smlal_1.c: Replace 'long' with 'long long'.
+
+2013-07-23 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.target/aarch64/test-ptr-arg-on-stack-1.c: New test.
+
+2013-07-23 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/20020219-1.c: Skip the test on aarch64*-*-* in ilp32.
+ * gcc.target/aarch64/aapcs64/test_18.c (struct y): Change the field
+ type from long to long long.
+ * gcc.target/aarch64/atomic-op-long.c: Update dg-final directives
+ to have effective-target keywords of lp64 and ilp32.
+ * gcc.target/aarch64/fcvt_double_int.c: Likewise.
+ * gcc.target/aarch64/fcvt_double_long.c: Likewise.
+ * gcc.target/aarch64/fcvt_double_uint.c: Likewise.
+ * gcc.target/aarch64/fcvt_double_ulong.c: Likewise.
+ * gcc.target/aarch64/fcvt_float_int.c: Likewise.
+ * gcc.target/aarch64/fcvt_float_long.c: Likewise.
+ * gcc.target/aarch64/fcvt_float_uint.c: Likewise.
+ * gcc.target/aarch64/fcvt_float_ulong.c: Likewise.
+ * gcc.target/aarch64/vect_smlal_1.c: Replace 'long' with 'long long'.
+
+2013-07-23 Tom Tromey <tromey@redhat.com>
+ Joseph Myers <joseph@codesourcery.com>
+
+ * gcc.dg/c11-generic-1.c: New file.
+ * gcc.dg/c11-generic-2.c: New file.
+
+2013-07-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57906
+ PR fortran/52052
+ * coarray/lib_realloc_1.f90: Permit optimization.
+ * gfortran.dg/coarray_31.f90: New.
+
+2013-07-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57762
+ * gfortran.dg/class_array_7.f03: Fix memory leak.
+
+2013-07-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52816
+ * g++.dg/cpp0x/decltype56.C: New.
+
+2013-07-22 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.dg/pr53265.c: Correct line number in dg-message.
+
+2013-07-22 Diego Novillo <dnovillo@google.com>
+
+ * g++.dg/pr57878.C: Do not force -m32. Use target ilp32.
+
+2013-07-22 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.c-torture/execute/pr57124.x: Skip int16 platforms.
+ * gcc.c-torture/execute/pr53366-1.x: New: Skip int16 platforms.
+
+2013-07-22 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ * gcc.c-torture/execute/pr57344-2.x: New. Skip int16.
+ * gcc.dg/pr53265.c: Add dg-require-effective-target size32plus.
+ * gcc.dg/torture/pr53366-1.c: Same.
+ * gcc.dg/torture/pr57381.c: Add dg-require-effective-target int32plus.
+ * gcc.dg/torture/pr56488.c: Same.
+ * gcc.dg/torture/pr57584.c: Same.
+ * gcc.dg/tree-ssa/pr57385.c: Same.
+ * gcc.dg/pr57154.c: Add dg-require-effective-target scheduling.
+
+2013-07-21 Ondřej Bílka <neleai@seznam.cz>
+
+ * c-c++-common/pr41779.c: Fix typos.
+ * gcc.c-torture/compile/20031125-2.c: Likewise.
+ * gcc.c-torture/compile/20040621-1.c: Likewise.
+ * gcc.c-torture/execute/20020418-1.c: Likewise.
+ * gcc.dg/20020108-1.c: Likewise.
+ * gcc.dg/atomic-generic-aux.c: Likewise.
+ * gcc.dg/builtin-complex-err-2.c: Likewise.
+ * gcc.dg/decl-1.c: Likewise.
+ * gcc.dg/di-sync-multithread.c: Likewise.
+ * gcc.dg/format/c90-printf-1.c: Likewise.
+ * gcc.dg/format/ms_c90-printf-1.c: Likewise.
+ * gcc.dg/long-long-compare-1.c: Likewise.
+ * gcc.dg/plugin/start_unit_plugin.c: Likewise.
+ * gcc.dg/pr17055-1.c: Likewise.
+ * gcc.dg/pr27095.c: Likewise.
+ * gcc.dg/torture/fp-int-convert.h: Likewise.
+ * gcc.dg/tree-prof/inliner-1.c: Likewise.
+ * gcc.dg/tree-ssa/20030731-1.c: Likewise.
+ * gcc.dg/tree-ssa/forwprop-6.c: Likewise.
+ * gcc.dg/tree-ssa/ipa-cp-1.c: Likewise.
+ * gcc.dg/tree-ssa/loop-19.c: Likewise.
+ * gcc.dg/tree-ssa/loop-1.c: Likewise.
+ * gcc.dg/tree-ssa/pr21001.c: Likewise.
+ * gcc.dg/tree-ssa/pr42585.c: Likewise.
+ * gcc.dg/tree-ssa/ssa-dse-5.c: Likewise.
+ * gcc.dg/vect/vect-cond-5.c: Likewise.
+ * gcc.dg/weak/typeof-2.c: Likewise.
+ * gcc.target/aarch64/aapcs64/abitest-common.h: Likewise.
+ * gcc.target/arm/naked-1.c: Likewise.
+ * gcc.target/i386/pr9771-1.c: Likewise.
+ * gcc.target/sparc/sparc-constant-1.c: Likewise.
+ * gcc.target/sparc/struct-ret-check.c: Likewise.
+ * gcc.target/x86_64/abi/test_struct_returning.c: Likewise.
+ * gfortran.dg/c_ptr_tests_8_funcs.c: Likewise.
+ * objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h:
+ Likewise.
+
+2013-07-21 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56937
+ * gfortran.dg/dependency_42.f90: New test.
+ * gfortran.dg/dependency_43.f90: New test.
+
+2013-07-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/35862
+ * gfortran.dg/round_4.f90: New.
+
+2013-07-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57894
+ * gfortran.dg/min_max_conformance_2.f90: New.
+
+2013-07-20 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/57620
+ * c-c++-common/raw-string-2.c (s12, u12, U12, L12): Remove.
+ (main): Don't test {s,u,U,L}12.
+ * c-c++-common/raw-string-13.c: New test.
+ * c-c++-common/raw-string-14.c: New test.
+ * c-c++-common/raw-string-15.c: New test.
+ * c-c++-common/raw-string-16.c: New test.
+
+2013-07-20 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vabs_intrinsic_1.c: New file.
+
+2013-07-20 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/pr57154.c: Add dg-require-effective-target scheduling.
+
+ * gcc.dg/tree-ssa/pr21090.c: Do vrp1 scan check only for
+ target { ! keeps_null_pointer_checks }.
+ * gcc.dg/tree-ssa/unreachable.c: Do optimized scan check only for
+ target { ! keeps_null_pointer_checks }.
+
+ * gcc.dg/torture/pr53366-1.c: Only run for target { size32plus }.
+ * gcc.dg/torture/pr56488.c: Likewise.
+
+2013-07-19 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c (test_vabs_s64): Added
+ new testcase.
+
+2013-07-19 David Edelsohn <dje.gcc@gmail.com>
+
+ * gfortran.fortran-torture/execute/intrinsic_nearest.x: Skip on AIX.
+ * gfortran.dg/nint_2.f90: Correct AIX target name to skip.
+ * gfortran.dg/guality/guality.exp: Skip on AIX.
+
+ * lib/dg-pch.exp (dg-flags-pch): Skip on AIX.
+
+ * g++.dg/debug/pr56819.C: Skip on AIX.
+ * g++.dg/ext/vector23.C: Ignore vector ABI warning.
+ * g++.dg/guality/guality.exp: Skip on AIX.
+
+ * g++.old-deja/g++.other/init19.C: Require cxa_atext.
+
+ * gcc.misc-tests/gcov-14.c: Skip on AIX.
+
+ * gcc.dg/simulate-thread/simulate-thread.exp: Skip on AIX.
+
+2013-07-19 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/57516
+ * gcc.target/avr/torture/builtins-4-roundfx.c (test2hr, test2k):
+ Adjust to corrected rounding.
+
+2013-07-19 Georg-Johann Lay <avr@gjlay.de>
+
+ * lib/target-supports.exp (check_effective_target_cilkplus): New proc.
+ * gcc.dg/cilk-plus/cilk-plus.exp: only run if
+ check_effective_target_cilkplus.
+ * g++.dg/cilk-plus/cilk-plus.exp: Same.
+
+2013-07-18 Pat Haugen <pthaugen@us.ibm.com>
+
+ * gcc.target/powerpc/pr57744.c: Fix typo.
+
+2013-07-18 Sriraman Tallam <tmsriram@google.com>
+
+ PR middle-end/57698
+ * gcc.c-torture/compile/pr57698.c: New test.
+ * gcc.c-torture/compile/pr43791.c: Remove prune output directive.
+ * gcc.c-torture/compile/pr44043.c: Ditto.
+
+2013-07-18 Wei Mi <wmi@google.com>
+
+ PR rtl-optimization/57878
+ * g++.dg/pr57878.C: New test.
+
+2013-07-18 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.dg/pr42611.c: Move dg-error to correct line.
+
+2013-07-17 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57895
+ * gfortran.dg/dollar_sym_3.f: New.
+ * gfortran.dg/dollar_sym_1.f90: Update dg-error.
+
+2013-07-16 Iain Sandoe <iain@codesourcery.com>
+
+ PR target/55654
+ PR target/55656
+ PR target/55657
+ * obj-c++.dg/cxx-ivars-3.mm: Use NSObject instead of Object.
+ * obj-c++.dg/strings/const-cfstring-5.mm: Likewise.
+ * obj-c++.dg/torture/strings/const-str-10.mm: Likewise.
+ * obj-c++.dg/torture/strings/const-str-9.mm: Likewise.
+ * objc.dg/image-info.m: Likewise.
+ * objc.dg/symtab-1.m: Likewise.
+ * objc.dg/torture/strings/const-str-10.m: Likewise.
+ * objc.dg/torture/strings/const-str-11.m: Likewise.
+ * objc.dg/torture/strings/const-str-9.m: Likewise.
+ * objc.dg/zero-link-1.m: Likewise.
+ * objc.dg/zero-link-2.m: Likewise.
+ * objc.dg/no-extra-load.m: Avoid Foundation.h.
+ * objc.dg/objc-foreach-4.m: Likewise.
+ * objc.dg/objc-foreach-5.m: Likewise.
+ * obj-c++.dg/proto-lossage-7.mm: Use NSObject instead of Object
+ (for Darwin).
+ * obj-c++.dg/strings/const-str-12.mm: Likewise.
+ * obj-c++.dg/syntax-error-1.mm: Likewise.
+ * objc.dg/method-6.m: Likewise.
+ * objc.dg/pr23214.m: Likewise.
+ * objc.dg/proto-lossage-7.m: Likewise.
+ * objc.dg/strings/const-str-12b.m: Likewise.
+ * objc.dg/zero-link-3.m: Likewise.
+ * obj-c++.dg/method-12.mm: Skip on Darwin versions without 'Object'.
+ * objc.dg/encode-7-next-64bit.m: Use NSObject instead of Object,
+ adjust headers, interfaces and encoded types to reflect current system
+ versions. Add FIXME and outputs from current system compiler for
+ reference.
+
+2013-07-15 Cong Hou <congh@google.com>
+
+ * gcc.target/i386/l_fma_float_1.c: Update the instruction to be
+ counted.
+ * gcc.target/i386/l_fma_float_3.c: Likewise.
+ * gcc.target/i386/l_fma_double_1.c: Likewise.
+ * gcc.target/i386/l_fma_double_3.c: Likewise.
+
+2013-07-15 Peter Bergner <bergner@vnet.ibm.com>
+
+ * lib/target-supports.exp (check_effective_target_powerpc_htm_ok): New
+ function to test if HTM is available.
+ * gcc.target/powerpc/htm-xl-intrin-1.c: New test.
+ * gcc.target/powerpc/htm-builtin-1.c: New test.
+
+2013-07-15 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/coarray_lib_realloc_1.f90: New.
+ * gfortran.dg/coarray/lib_realloc_1.f90: New.
+ * gfortran.dg/coarray_6.f90: Add dg-error.
+
+2013-07-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_18.f90: New.
+
+2013-07-14 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/52669
+ * fortran.dg/module_variable_1.f90: New test.
+ * fortran.dg/module_variable_2.f90: New test.
+
+2013-07-14 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector19.C: Adapt.
+ * g++.dg/ext/vector23.C: New testcase.
+
+2013-07-12 Michael Matz <matz@suse.de>
+
+ PR middle-end/55771
+ * c-c++-common/pr55771.c: New test.
+
+2013-07-12 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/vect-movi.c: New.
+
+2013-07-11 Sriraman Tallam <tmsriram@google.com>
+
+ PR target/57362
+ * g++.dg/ext/pr57362.C: New.
+
+2013-07-11 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/57631
+ * gcc.target/avr/torture/pr57631.c: New test.
+
+2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57827
+ * g++.dg/cpp0x/constexpr-ice7.C: New.
+
+2013-07-10 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/powerpc/20020118-1.c: Force 128-bit stack alignment
+ for EABI targets.
+ * gcc.c-torture/execute/nest-align-1.x: New.
+
+2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57874
+ * g++.dg/cpp0x/sfinae48.C: New.
+
+2013-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR preprocessor/57824
+ * c-c++-common/raw-string-17.c: New test.
+ * c-c++-common/gomp/pr57824.c: New test.
+
+2013-07-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57869
+ * g++.dg/cpp0x/reinterpret_cast1.C: New.
+ * g++.dg/warn/Wconditionally-supported-1.C: Likewise.
+ * g++.dg/conversion/dr195.C: Update.
+ * g++.dg/expr/cast2.C: Likewise.
+
+2013-07-10 Jakub Jelinek <jakub@redhat.com>
+
+ * c-c++-common/raw-string-18.c: New test.
+ * c-c++-common/raw-string-19.c: New test.
+
+ PR preprocessor/57757
+ * g++.dg/cpp/paste1.C: New test.
+ * g++.dg/cpp/paste2.C: New test.
+
+2013-07-10 Graham Stott <grahams@btinternet.com>
+
+ * gcc.target/mips/mulsize-1.c: New.
+ * gcc.target/mips/mulsize-2.c: New.
+ * gcc.target/mips/mulsize-3.c: New.
+ * gcc.target/mips/mulsize-4.c: New.
+
+2013-07-09 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/53094
+ * g++.dg/cpp0x/constexpr-53094-1.C: Adjust.
+ * g++.dg/ext/vector24.C: New testcase.
+
+2013-07-09 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/53000
+ * g++.dg/cpp0x/decltype17.C: Adjust.
+
+2013-07-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51786
+ * g++.dg/cpp0x/pr51786.C: New.
+
+2013-07-08 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/powerpc/tfmode_off.c: Skip for EABI targets.
+
+ * gcc.target/powerpc/ppc-spe64-1.c: Update expected error message.
+
+ * gcc.target/powerpc/pr47197.c: Require powerpc_altivec_ok.
+
+ * gcc.target/powerpc/sd-vsx.c: Require dfp.
+ * gcc.target/powerpc/sd-pwr6.c: Likewise.
+
+2013-07-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57834
+ * gfortran.dg/c_f_pointer_tests_8.f90: New.
+
+2013-07-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/50554
+ * gfortran.dg/do_check_9.f90: New.
+
+2013-07-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57785
+ * gfortran.dg/dot_product_2.f90: New.
+
+2013-07-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57469
+ * gfortran.dg/warn_unused_dummy_argument_4.f90: New.
+
+2013-07-08 Manfred Schwarb <manfred99@gmx.ch>
+
+ * gfortran.dg/defined_assignment_7.f90: Fix dg-do.
+ * gfortran.dg/finalize_10.f90: Fix dg-final.
+
+2013-07-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57819
+ * gcc.target/i386/pr57819.c: New test.
+
+ PR rtl-optimization/57829
+ * gcc.c-torture/execute/pr57829.c: New test.
+
+2013-07-08 Michael Zolotukhin <michael.v.zolotukhin@gmail.com>
+
+ * gcc.target/i386/memcpy-vector_loop-1.c: New.
+ * gcc.target/i386/memcpy-vector_loop-2.c: New.
+
+2013-07-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/57807
+ * gcc.target/i386/pr57807.c: New test.
+
+2013-07-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/29776
+ * gcc.dg/tree-ssa/vrp89.c: New test.
+
+2013-07-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/28262
+ * g++.dg/parse/defarg16.C: New.
+
+2013-07-05 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55342
+ * gcc.target/i386/pr55342.c: New.
+
+2013-07-05 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * gcc.dg/pr57518.c: Adjust scan-rtl-dump-not pattern.
+
+2013-07-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/14263
+ * g++.dg/inherit/virtual10.C: New.
+
+2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR c/57821
+ * gcc.dg/large-size-array-6.c: New test.
+
+2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/38634
+ * g++.dg/template/crash116.C: New.
+
+2013-07-04 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.dg/tree-ssa/vrp66.c: Make conditional on { target { ! int16 } } .
+ * gcc.dg/tree-ssa/vrp66-int16-sw.c: New test.
+
+2013-07-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54998
+ * g++.dg/cpp0x/nsdmi-list3.C: New.
+
+2013-07-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57777
+ * gcc.target/i386/pr57777.c: New test.
+
+ PR c++/57771
+ * g++.dg/template/arg9.C: New test.
+
+2013-07-02 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/i386/avx-inline.c: New test.
+
+2013-07-02 Maciej W. Rozycki <macro@codesourcery.com>
+
+ * gcc.target/mips/call-1.c: Accept JALRS and JALR.
+ * gcc.target/mips/call-2.c: Likewise.
+ * gcc.target/mips/call-3.c: Likewise.
+ * gcc.target/mips/lazy-binding-1.c: Likewise.
+
+2013-07-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57741
+ * gcc.dg/vect/pr57741-1.c: New test.
+ * gcc.dg/vect/pr57741-2.c: New test.
+ * gcc.dg/vect/pr57741-3.c: New test.
+
+2013-07-02 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/config/aarch64/insv_1.c: Update to show it doesn't work
+ on big endian.
+ * gcc.target/config/aarch64/insv_2.c: New test for big endian.
+ * lib/target-supports.exp: Define aarch64_little_endian.
+
+2013-07-02 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/abs_1.c: New test.
+
+2013-07-02 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/bfxil_1.c: New test.
+ * gcc.target/aarch64/bfxil_2.c: Likewise.
+
+2013-07-01 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57766
+ * c-c++-common/cilk-plus/AN/sec_implicit_ex.c (NUMBER): Changed
+ array sizes from 100 to 20.
+
+2013-07-01 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/54788
+ * gfortran.dg/pointer_remapping_8.f90: New.
+
+2013-06-28 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ * g++.dg/cpp0x/udlit-nospace-neg.C: Adjust.
+ * g++.dg/cpp1y/udlit-enc-prefix-neg.C: New.
+ * g++.dg/cpp1y/udlit-userdef-string.C: New.
+ * g++.dg/cpp1y/complex_literals.h: New.
+
+2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57645
+ * g++.dg/cpp0x/noexcept21.C: New.
+
+2013-06-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57736
+ * gcc.target/i386/pr57736.c: New test.
+
+2013-06-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Made this testcase
+ c specific.
+ * c-c++-common/cilk-plus/AN/decl-ptr-colon.c (main): Changed dg-error
+ strings to match the fixed error messages.
+ * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/rank_mismatch.c (main): Added a new error
+ message check.
+
+2013-06-28 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/57744
+ * gcc.target/powerpc/pr57744.c: New test to make sure lqarx and
+ stqcx. get even registers.
+
+2013-06-28 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/57509
+ * g++.dg/ext/pr57509.C: Pass vectors by reference to avoid warnings.
+
+2013-06-28 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/bmi-1.c: Extend with new instrinsic.
+ Fix scan patterns.
+ * gcc.target/i386/bmi-1.c: Ditto.
+ * gcc.target/i386/bmi-bextr-4.c: New.
+ * gcc.target/i386/bmi-bextr-5.c: Ditto.
+
+2013-06-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57682
+ * g++.dg/cpp0x/initlist73.C: New.
+
+2013-06-27 Meador Inge <meadori@codesourcery.com>
+
+ * gcc.dg/atomic-flag.c: Add dg-require-effective-target sync_*.
+ * g++.dg/simulate-thread/atomics-2.C: Likewise.
+ * g++.dg/simulate-thread/atomics-1.C: Likewise.
+
+2013-06-27 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/57509
+ * g++.dg/ext/pr57509.C: New file.
+
+2013-06-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57623
+ * gcc.target/i386/bmi-bextr-3.c: New test.
+
+ PR target/57623
+ * gcc.target/i386/bmi2-bzhi-1.c: New test.
+
+2013-06-27 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/57172
+ * g++.dg/cpp0x/pr57172.C: New testcase.
+
+2013-06-27 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ * gcc.target/s390/htm-1.c: New file.
+ * gcc.target/s390/htm-nofloat-1.c: New file.
+ * gcc.target/s390/htm-xl-intrin-1.c: New file.
+
+2013-06-26 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/29800
+ * gfortran.dg/bounds_check_17.f90: New.
+
+2013-06-25 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/57640
+ * g++.dg/cpp1y/pr57640.C: New.
+
+2013-06-25 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57692
+ * c-c++-common/cilk-plus/AN/gather_scatter.c: Fixed a bug of stack
+ overflow due to size of arrays.
+
+2013-06-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57705
+ * gcc.dg/vect/pr57705.c: New test.
+ * gcc.dg/vect/vect-iv-7.c: Add noclone attribute, remove xfail.
+
+2013-06-25 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/57670
+ * g++.dg/ipa/pr57670.C: New test.
+
+2013-06-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56977
+ * gcc.dg/pr56977.c: New testcase.
+
+2013-06-24 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/57358
+ * gcc.dg/ipa/pr57358.c: New test.
+
+2013-06-24 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/57686
+ * gcc.dg/torture/pr57584.c: Remove target specific bits.
+
+2013-06-24 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57488
+ * gcc.dg/torture/pr57488.c: New testcase.
+
+2013-06-24 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+ Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ PR fortran/52413
+ * gfortran.dg/fraction.f90: New.
+
+2013-06-24 Alan Modra <amodra@gmail.com>
+
+ * gcc.target/powerpc/altivec-consts.c: Correct for little-endian.
+ Add scan-assembler-not "lvx".
+ * gcc.target/powerpc/le-altivec-consts.c: New.
+
+2013-06-23 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/sfinae47.C: New.
+
+2013-06-23 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/52483
+ * gcc.target/sh/pr52483-1.c: New.
+ * gcc.target/sh/pr52483-2.c: New.
+ * gcc.target/sh/pr52483-3.c: New.
+ * gcc.target/sh/pr52483-4.c: New.
+ * gcc.target/sh/pr52483-5.c: New.
+
+2013-06-23 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/i386/intrinsics_1.c: New test.
+ * gcc.target/i386/intrinsics_2.c: Ditto.
+ * gcc.target/i386/intrinsics_3.c: Ditto.
+ * gcc.target/i386/intrinsics_4.c: Ditto.
+ * gcc.target/i386/intrinsics_5.c: Ditto.
+ * gcc.target/i386/intrinsics_6.c: Ditto.
+ * gcc.target/i386/avx-1.c: Provide macros for builtins
+ needing immediate arguments in f16cintrin.h and rtmintrin.h.
+
+2013-06-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_17.f90: New.
+
+2013-06-21 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/realloc_on_assign_18.f90: New.
+
+2013-06-21 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/array_test1.c: Make this an execution test.
+ Also changed the returns from error as distinct values so that
+ debugging can get easier.
+ * c-c++-common/cilk-plus/AN/if_test_errors.c (main): Made certain
+ errors specific to C, if necessary. Also added new error
+ hooks for C++.
+ * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/pr57541.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors4.c (main): In addition to
+ the same changes as parser_errors3.c, spaces were added between colons
+ to not confuse C++ compiler with 2 colons as scope.
+ * c-c++-common/cilk-plus/AN/vla.c: Make this test C specific.
+ * g++.dg/cilk-plus/AN/array_test1_tplt.cc: New test.
+ * g++.dg/cilk-plus/AN/array_test2_tplt.cc: Likewise.
+ * g++.dg/cilk-plus/AN/array_test_ND_tplt.cc: Likewise.
+ * g++.dg/cilk-plus/AN/braced_list.cc: Likewise.
+ * g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc: Likewise.
+ * g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc: Likewise.
+ * g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c: Likewise.
+ * g++.dg/cilk-plus/AN/preincr_test.cc: Likewise.
+ * g++.dg/cilk-plus/AN/postincr_test.cc: Likewise.
+ * g++.dg/cilk-plus/cilk-plus.exp: New script.
+ * g++.dg/dg.exp: Included Cilk Plus C++ tests
+ in the list.
+
+2013-06-21 Joseph Myers <joseph@codesourcery.com>
+
+ PR other/53317
+ * gcc.dg/torture/fp-int-convert-float128-timode-2.c: New test.
+
+2013-06-20 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/57655
+ * gcc.target/i386/pr57655.c: New test.
+
+2013-06-20 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ada/acats/tests/gcc: Delete.
+ * gnat.dg/style: Likewise.
+
+2013-06-20 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/57660
+ * gcc.dg/tree-ssa/forwprop-28.c: Don't run test on various targets
+ based on their branch cost.
+
+ * gcc.dg/tree-ssa/forwprop-28.c: Add missing dg-final.
+
+2013-06-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57633
+ * gfortran.dg/list_read_11.f90: New.
+
+2013-06-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57584
+ * gcc.dg/torture/pr57584.c: New testcase.
+
+2013-06-19 Sharad Singhai <singhai@google.com>
+
+ * g++.dg/gcov/gcov-8.C: New testcase.
+ * lib/gcov.exp: Handle intermediate format.
+
+2013-06-19 Wei Mi <wmi@google.com>
+
+ PR rtl-optimization/57518
+ * gcc.dg/pr57518.c: New test.
+
+2013-06-19 Igor Zamyatin <igor.zamyatin@intel.com>
+
+ * gcc.dg/tree-ssa/loop-19.c: Add -fno-common.
+
+2013-06-19 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/attr-alias-2.c: New testcase.
+
+2013-06-19 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Replaced all the
+ hard-coded values of array sizes with a #define.
+ * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise.
+ * c-c++-common/cilk-plus/AN/pr57577.c: Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise.
+
+2013-06-19 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * gcc.dg/torture/stackalign/builtin-apply-2.c: set
+ STACK_ARGUMENTS_SIZE with 0 if __aarch64__ is defined.
+
+2013-06-19 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/forwprop-28.c: New test.
+
+2013-06-19 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
+
+ PR c++/57638
+ * g++.dg/template/error53.C: New.
+
+2013-06-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ PR target/55033
+ * gcc.target/powerpc/pr55033.c: Fix options.
+
+2013-06-18 Sriraman Tallam <tmsriram@google.com>
+
+ * gcc.target/i386/inline_error.c: New test.
+ * gcc.c-torture/compile/pr44043.c: Fix test to expect an error.
+ * gcc.c-torture/compile/pr43791.c: Fix test to expect an error.
+
+2013-06-18 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53211
+ * g++.dg/cpp0x/decltype55.C: New.
+
+2013-06-18 Marek Polacek <polacek@redhat.com>
+
+ * gcc.dg/c90-fordecl-1.c: Adjust expected message.
+
+2013-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c: New test.
+
+2013-06-17 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/array_test1.c: Make this an execution test.
+ Also changed the returns from error as distinct values so that it is
+ easier to debug.
+
+2013-06-17 Sofiane Naci <sofiane.naci@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c: Update.
+
+2013-06-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/16128
+ * g++.dg/template/error52.C: New.
+ * g++.dg/lookup/friend15.C: Update.
+ * g++.dg/parse/error11.C: Likewise.
+ * g++.dg/parse/error14.C: Likewise.
+ * g++.dg/parse/parser-pr28152-2.C: Likewise.
+ * g++.dg/parse/template25.C: Likewise.
+ * g++.old-deja/g++.jason/cond.C: Likewise.
+ * g++.old-deja/g++.mike/for2.C: Likewise.
+ * g++.old-deja/g++.robertl/eb125.C: Likewise.
+ * obj-c++.dg/property/dotsyntax-4.mm: Likewise.
+
+2013-06-17 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/unaligned-memcpy-2.c (dest): Initialize to
+ ensure alignment.
+
+2013-06-16 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/if_test.c (main2): Fixed a bug of
+ accidentally placing minus sign for length instead of stride.
+
+2013-06-16 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR rtl-optimization/57425
+ PR rtl-optimization/57569
+ * gcc.dg/torture/pr57425-1.c, gcc.dg/torture/pr57425-2.c: New files.
+ * gcc.dg/torture/pr57425-3.c, gcc.dg/torture/pr57569.c: Likewise.
+
+2013-06-15 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/49074
+ PR fortran/56136
+ * gfortran.dg/typebound_assignment_5.f03: Check the absence of any
+ packing.
+ * gfortran.dg/typebound_assignment_6.f03: New.
+
+2013-06-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ * gcc.target/h8300/h8300.exp: New.
+ * gcc.dg/pragma-isr.c: Move to ...
+ * gcc.target/sh/torture/pragma-isr.c: ... here ...
+ * gcc.target/h8300/pragma-isr.c: ... and here.
+ * gcc.dg/pragma-isr2.c: Move to ...
+ * gcc.target/sh/torture/pragma-isr2.c: ... here ...
+ * gcc.target/h8300/pragma-isr2.c: ... and here.
+ * gcc.dg/pragma-isr-trapa.c: Move to ...
+ * gcc.target/sh/pragma-isr-trapa.c: ... here.
+ * gcc.dg/pragma-isr-trapa2.c: Move to ...
+ * gcc.target/sh/pragma-isr-trapa2.c: ... here.
+ * gcc.dg/pragma-isr-trap_exit.c: Move to ...
+ * gcc.target/sh/pragma-isr-trap-exit.c: ... here.
+ * gcc.dg/pragma-isr-nosave_low_regs.c: Move to ...
+ * gcc.target/sh/pragma-isr-nosave_low_regs.c: ... here.
+ * gcc.dg/attr-isr-nosave_low_regs.c: Move to ...
+ * gcc.target/sh/attr-isr-nosave_low_regs.c: ... here.
+ * gcc.dg/attr-isr-trap_exit.c: Move to ...
+ * gcc.target/sh/attr-isr-trap_exit.c: ... here.
+ * gcc.dg/attr-isr-trapa.c: Move to ...
+ * gcc.target/sh/attr-isr-trapa.c: ... here.
+
+2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51413
+ * g++.dg/ext/builtin-offsetof1.C: New.
+
+2013-06-14 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.target/aarch64/vect_smlal_1.c: New file.
+
+2013-06-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57508
+ * gfortran.dg/defined_assignment_7.f90: New.
+
+2013-06-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57599
+ * g++.dg/rtti/dyncast6.C: New.
+ * g++.dg/cpp0x/dyncast1.C: Likewise.
+
+2013-06-14 Alan Modra <amodra@gmail.com>
+
+ PR middle-end/57134
+ * gcc.dg/pr57134.c: New.
+
+2013-06-14 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57596
+ * gfortran.dg/deferred_type_param_9.f90: New.
+
+2013-06-13 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/fold-minus-1.c: New testcase.
+
+2013-06-13 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/49074
+ * gfortran.dg/typebound_assignment_5.f03: New.
+
+2013-06-13 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/tree-ssa/forwprop-27.c: New testcase.
+
+2013-06-12 Michael Meissner <meissner@linux.vnet.ibm.com>
+ Pat Haugen <pthaugen@us.ibm.com>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/atomic-p7.c: New file, add tests for atomic
+ load/store instructions on power7, power8.
+ * gcc.target/powerpc/atomic-p8.c: Likewise.
+
+2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57577
+ * c-c++-common/cilk-plus/AN/pr57577.c: New testcase.
+
+2013-06-12 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/38958
+ * g++.dg/warn/Wunused-var-20.C: New.
+
+2013-06-12 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Handle -f{no-,}common.
+ * gcc.target/mips/memcpy-1.c: Remove redundant dg-do.
+ Run with -fno-common.
+
+2013-06-12 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/sec_implicit_ex.c (main): Replaced abort
+ and exit function calls with return 1 and return 0, respectively.
+
+2013-06-12 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/umips-branch-1.c, gcc.target/mips/umips-branch-2.c:
+ New tests.
+
+2013-06-12 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/57361
+ * gcc.dg/tree-ssa/pr57361.c: New file.
+
+2013-06-12 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ * gcc.target/arm/unaligned-memcpy-4.c (src, dst): Initialize
+ to ensure alignment.
+ * gcc.target/arm/unaligned-memcpy-3.c (src): Likewise.
+
+2013-06-12 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/finalize_10.f90: Update scan-tree-dump.
+
+2013-06-12 Tobias Burnus <burnus@net-b.de>
+ Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gfortran.dg/finalize_10.f90: Update scan-tree-dump.
+
+2013-06-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/56564
+ * gcc.target/i386/pr56564-1.c: Skip on darwin, mingw and cygwin.
+ * gcc.target/i386/pr56564-3.c: Likewise.
+
+2013-06-11 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57535
+ * gfortran.dg/class_array_18.f90: New.
+
+2013-06-11 Jan Hubicka <jh@suse.cz>
+
+ PR c++/57551
+ * g++.dg/ext/visibility/anon6.C: Update testcase.
+
+2013-06-10 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57563
+ * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c (main): Fixed a bug
+ in how we check __sec_reduce_mutating function's result.
+
+2013-06-10 Michael Meissner <meissner@linux.vnet.ibm.com>
+ Pat Haugen <pthaugen@us.ibm.com>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/direct-move-vint1.c: New tests for power8
+ direct move instructions.
+ * gcc.target/powerpc/direct-move-vint2.c: Likewise.
+ * gcc.target/powerpc/direct-move.h: Likewise.
+ * gcc.target/powerpc/direct-move-float1.c: Likewise.
+ * gcc.target/powerpc/direct-move-float2.c: Likewise.
+ * gcc.target/powerpc/direct-move-double1.c: Likewise.
+ * gcc.target/powerpc/direct-move-double2.c: Likewise.
+ * gcc.target/powerpc/direct-move-long1.c: Likewise.
+ * gcc.target/powerpc/direct-move-long2.c: Likewise.
+
+2013-06-10 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52440
+ * g++.dg/cpp0x/pr52440.C: New.
+
+2013-06-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/56564
+ * gcc.target/i386/pr56564-1.c: New test.
+ * gcc.target/i386/pr56564-2.c: New test.
+ * gcc.target/i386/pr56564-3.c: New test.
+ * gcc.target/i386/pr56564-4.c: New test.
+ * gcc.target/i386/avx256-unaligned-load-4.c: Add -fno-common.
+ * gcc.target/i386/avx256-unaligned-store-1.c: Likewise.
+ * gcc.target/i386/avx256-unaligned-store-3.c: Likewise.
+ * gcc.target/i386/avx256-unaligned-store-4.c: Likewise.
+ * gcc.target/i386/vect-sizes-1.c: Likewise.
+ * gcc.target/i386/memcpy-1.c: Likewise.
+ * gcc.dg/vect/costmodel/i386/costmodel-vect-31.c (tmp): Initialize.
+ * gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c (tmp): Likewise.
+
+2013-06-10 Thomas Schwinge <thomas@codesourcery.com>
+
+ * g++.dg/abi/forced.C: Extend current handling of Linux-based x86
+ systems to cover all GNU systems.
+ * g++.dg/abi/guard2.C: Likewise.
+ * g++.dg/cpp0x/constexpr-rom.C: Likewise.
+ * g++.dg/eh/sighandle.C: Likewise.
+ * g++.dg/ext/cleanup-10.C: Likewise.
+ * g++.dg/ext/cleanup-11.C: Likewise.
+ * g++.dg/ext/cleanup-8.C: Likewise.
+ * g++.dg/ext/cleanup-9.C: Likewise.
+ * g++.dg/opt/const5.C: Likewise.
+ * g++.dg/opt/life1.C: Likewise.
+ * g++.dg/other/pr39496.C: Likewise.
+ * g++.old-deja/g++.abi/aggregates.C: Likewise.
+ * g++.old-deja/g++.abi/align.C: Likewise.
+ * g++.old-deja/g++.abi/bitfields.C: Likewise.
+ * g++.old-deja/g++.law/weak.C: Likewise.
+ * g++.old-deja/g++.pt/asm1.C: Likewise.
+ * gcc.c-torture/execute/20030125-1.x: Likewise.
+ * gcc.c-torture/execute/990127-2.x: Likewise.
+ * gcc.dg/20041106-1.c: Likewise.
+ * gcc.dg/20050503-1.c: Likewise.
+ * gcc.dg/builtin-object-size-5.c: Likewise.
+ * gcc.dg/cleanup-10.c: Likewise.
+ * gcc.dg/cleanup-11.c: Likewise.
+ * gcc.dg/cleanup-8.c: Likewise.
+ * gcc.dg/cleanup-9.c: Likewise.
+ * gcc.dg/complex-5.c: Likewise.
+ * gcc.dg/debug/dwarf2/asm-line1.c: Likewise.
+ * gcc.dg/debug/dwarf2/discriminator.c: Likewise.
+ * gcc.dg/dfp/convert-dfp-round-thread.c: Likewise.
+ * gcc.dg/dfp/pr35739.c: Likewise.
+ * gcc.dg/fdata-sections-1.c: Likewise.
+ * gcc.dg/lto/20090206-1_0.c: Likewise.
+ * gcc.dg/lto/20090206-2_0.c: Likewise.
+ * gcc.dg/pr30360.c: Likewise.
+ * gcc.dg/pr37303.c: Likewise.
+ * gcc.dg/pr39323-1.c: Likewise.
+ * gcc.dg/pr39323-2.c: Likewise.
+ * gcc.dg/pr39323-3.c: Likewise.
+ * gcc.dg/pr45416.c: Likewise.
+ * gcc.dg/setjmp-2.c: Likewise.
+ * gcc.dg/split-1.c: Likewise.
+ * gcc.dg/split-3.c: Likewise.
+ * gcc.dg/split-4.c: Likewise.
+ * gcc.dg/strlenopt-12g.c: Likewise.
+ * gcc.dg/strlenopt-14g.c: Likewise.
+ * gcc.dg/strlenopt-14gf.c: Likewise.
+ * gcc.dg/strlenopt-16g.c: Likewise.
+ * gcc.dg/strlenopt-17g.c: Likewise.
+ * gcc.dg/strlenopt-18g.c: Likewise.
+ * gcc.dg/strlenopt-1f.c: Likewise.
+ * gcc.dg/strlenopt-22g.c: Likewise.
+ * gcc.dg/strlenopt-2f.c: Likewise.
+ * gcc.dg/strlenopt-4g.c: Likewise.
+ * gcc.dg/strlenopt-4gf.c: Likewise.
+ * gcc.dg/struct-ret-3.c: Likewise.
+ * gcc.dg/torture/stackalign/setjmp-2.c: Likewise.
+ * gcc.misc-tests/linkage.exp: Likewise.
+ * gcc.target/i386/20000724-1.c: Likewise.
+ * gcc.target/i386/align-main-3.c: Likewise.
+ * gcc.target/i386/cleanup-1.c: Likewise.
+ * gcc.target/i386/inline-mcpy.c: Likewise.
+ * gcc.target/i386/pr32268.c: Likewise.
+ * gcc.target/i386/pr36613.c: Likewise.
+ * gcc.target/i386/pr39013-1.c: Likewise.
+ * gcc.target/i386/pr39013-2.c: Likewise.
+ * gcc.target/i386/pr39496.c: Likewise.
+ * gcc.target/i386/pr40906-3.c: Likewise.
+ * gcc.target/i386/pr46084.c: Likewise.
+ * lib/target-supports.exp (check_effective_target_pie): Likewise.
+
+2013-06-09 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/6526
+ * gcc.target/sh/pr6526.c: New.
+
+2013-06-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/57568
+ * gcc.c-torture/execute/pr57568.c: New test.
+
+2013-06-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/37404
+ * g++.dg/other/vararg-4.C: New.
+
+2013-06-08 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/57559
+ * gcc.target/s390/pr57559.c : New test.
+
+2013-06-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_10.f90: New.
+ * gfortran.dg/auto_dealloc_2.f90: Update tree-dump.
+ * gfortran.dg/finalize_15.f90: New.
+
+2013-06-08 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57553
+ * gfortran.dg/storage_size_4.f90: New.
+
+2013-06-07 Sriraman Tallam <tmsriram@google.com>
+
+ PR c++/57548
+ * g++.dg/ext/pr57548.C: New test.
+
+2013-06-07 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR middle-end/57541
+ * c-c++-common/cilk-plus/AN/pr57541.c: New test case.
+
+2013-06-07 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/attr-alias.c: Remove brackets in template.
+
+2013-06-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57549
+ * gfortran.dg/array_constructor_48.f90: New.
+ * gfortran.dg/array_constructor_type_14.f03: Correct test case.
+ * gfortran.dg/array_constructor_type_15.f03: Ditto.
+
+2013-06-07 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/56315
+ * gcc.target/arm/xordi3-opt.c: New test.
+
+2013-06-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/debug/dwarf2/discriminator.c: Fix wording.
+ Revert to dg-options.
+
+2013-06-07 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ PR target/55033
+ * gcc.target/powerpc/pr55033.c: New.
+
+2013-06-07 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53658
+ * g++.dg/cpp0x/alias-decl-36.C: New.
+
+2013-06-06 Michael Meissner <meissner@linux.vnet.ibm.com>
+ Pat Haugen <pthaugen@us.ibm.com>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/p8vector-builtin-1.c: New test to test
+ power8 builtin functions.
+ * gcc.target/powerpc/p8vector-builtin-2.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-3.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-4.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-5.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-6.c: Likewise.
+ * gcc.target/powerpc/p8vector-builtin-7.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-1.c: New
+ tests to test power8 auto-vectorization.
+ * gcc.target/powerpc/p8vector-vectorize-2.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-3.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-4.c: Likewise.
+ * gcc.target/powerpc/p8vector-vectorize-5.c: Likewise.
+
+ * gcc.target/powerpc/crypto-builtin-1.c: Use effective target
+ powerpc_p8vector_ok instead of powerpc_vsx_ok.
+
+ * gcc.target/powerpc/bool.c: New file, add eqv, nand, nor tests.
+
+ * lib/target-supports.exp (check_p8vector_hw_available) Add power8
+ support.
+ (check_effective_target_powerpc_p8vector_ok): Likewise.
+ (is-effective-target): Likewise.
+ (check_vect_support_and_set_flags): Likewise.
+
+2013-06-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/43652
+ * g++.dg/parse/error53.C: New.
+
+2013-06-06 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/57459
+ * gcc.target/i386/pr57459.c: New test.
+
+2013-06-06 Teresa Johnson <tejohnson@google.com>
+
+ PR c++/53743
+ * gcc.dg/tree-prof/va-arg-pack-1.c: Cloned from c-torture, made
+ into -freorder-blocks-and-partition test.
+ * gcc.dg/tree-prof/comp-goto-1.c: Ditto.
+ * gcc.dg/tree-prof/20041218-1.c: Ditto.
+ * gcc.dg/tree-prof/pr52027.c: Use -O2.
+ * gcc.dg/tree-prof/pr50907.c: Ditto.
+ * gcc.dg/tree-prof/pr45354.c: Ditto.
+ * g++.dg/tree-prof/partition2.C: Ditto.
+ * g++.dg/tree-prof/partition3.C: Ditto.
+
+2013-06-06 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57542
+ * gfortran.dg/finalize_16.f90: New.
+
+2013-06-06 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * gcc.dg/vect/no-section-anchors-vect-68.c:
+ Add dg-skip-if aarch64_tiny.
+
+2013-06-05 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR C/57457
+ * c-c++-common/cilk-plus/AN/pr57457.c: New test.
+ * c-c++-common/cilk-plus/AN/pr57457-2.c: Likewise.
+
+2013-06-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51908
+ * g++.dg/cpp0x/decltype54.C: New.
+
+2013-06-05 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.dg/fshort-wchar.c: Add extra dg-options for
+ arm*-*-*eabi* targets.
+ * gcc.dg/tree-ssa/pr42585.c: Change dg-final to catch
+ arm*-*-* targets.
+ * gcc.dg/tree-ssa/pr43491.c: Likewise.
+
+2013-06-05 Manfred Schwarb <manfred99@gmx.ch>
+ Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/string_length_2.f90: Fix dg-do run.
+ * gfortran.dg/io_real_boz_3.f90: Remove extra space in "dg-do run".
+ * gfortran.dg/io_real_boz_4.f90: Ditto.
+ * gfortran.dg/io_real_boz_5.f90: Ditto.
+
+2013-06-05 Andreas Schwab <schwab@suse.de>
+
+ * gcc.dg/tree-ssa/attr-alias.c: Remove duplicated contents.
+
+2013-06-04 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/tree-ssa/attr-alias.c: New testcase.
+
+2013-06-04 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/array_test1.c (main): Replaced argc, argv
+ parameters with void.
+ (main2): Removed argc parameter.
+ * c-c++-common/cilk-plus/AN/array_test2.c (main2): Likewise.
+ (main): Replaced argc, argv parameters with void.
+ * c-c++-common/cilk-plus/AN/array_test_ND.c (main): Likewise.
+ (main2): Removed argc parameter.
+ * c-c++-common/cilk-plus/AN/builtin_fn_custom.c (main): Replaced argc
+ argv parameters with void. Added __asm volatile to avoid optimization
+ on argc, if necessary.
+ * c-c++-common/cilk-plus/AN/builtin_fn_mutating (main): Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_func_double.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_func_double2.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/conditional.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/exec-once.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/exec-once2.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/fn_ptr.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/gather-scatter-errors.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/gather_scatter.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/misc.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors2.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors3.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors4.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/rank_mismatch2.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit_ex.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/sec_reduce_return.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/test_builtin_return.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/vla.c (main): Likewise.
+ * c-c++-common/cilk-plus/AN/comma-exp.c (main): Replaced argc, argv
+ parameters with void.
+ (main2): Removed argc parameter.
+ * c-c++-common/cilk-plus/AN/if_test.c (main2): Likewise.
+ (main): Replaced argc, argv parameters with void.
+ * c-c++-common/cilk-plus/AN/fp_triplet_values (main2): Replace argc,
+ argv parameters with void. Also renamed this function as main, and
+ delete the existing main.
+ * c-c++-common/cilk-plus/AN/sec_implicit.c (main2): Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit2.c (main2): Likewise.
+ * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c (main2): Likewise.
+
+2013-06-04 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/movi_1.c: New test.
+
+2013-06-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_12.f90: New.
+ * gfortran.dg/alloc_comp_basics_1.f90: Add BLOCK for
+ end of scope finalization.
+ * gfortran.dg/alloc_comp_constructor_1.f90: Ditto.
+ * gfortran.dg/allocatable_scalar_9.f90: Ditto.
+ * gfortran.dg/auto_dealloc_2.f90: Ditto.
+ * gfortran.dg/class_19.f03: Ditto.
+ * gfortran.dg/coarray_lib_alloc_1.f90: Ditto.
+ * gfortran.dg/coarray_lib_alloc_2.f90: Ditto.
+ * gfortran.dg/extends_14.f03: Ditto.
+ * gfortran.dg/move_alloc_4.f90: Ditto.
+ * gfortran.dg/typebound_proc_27.f03: Ditto.
+
+2013-06-04 Manfred Schwarb <manfred99@gmx.ch>
+
+ * gfortran.dg/bounds_check_7.f90: Remove "! {".
+ * gfortran.dg/coarray_poly_3.f90: Remove inactive, broken dg-*.
+ * gfortran.dg/default_initialization_5.f90: Update dg-do.
+ * gfortran.dg/g77/f77-edit-s-out.f: Fix broken dg-output.
+ * gfortran.dg/g77/f77-edit-t-out.f: Fix broken dg-output.
+ * gfortran.dg/g77/f77-edit-x-out.f: Fix broken dg-output.
+ * gfortran.dg/init_flag_11.f90: Fix broken dg-options.
+ * gfortran.dg/io_real_boz_3.f90: Add comment regarding dg-do run.
+ * gfortran.dg/io_real_boz_4.f90: Ditto.
+ * gfortran.dg/io_real_boz_5.f90: Ditto.
+ * gfortran.dg/namelist_print_1.f: Fix broken dg-output.
+ * gfortran.dg/read_x_eor.f90: Fix broken dg-output.
+ * gfortran.dg/repeat_1.f90: Improve dg-output pattern.
+ * gfortran.dg/spread_bounds_1.f90: Fix broken dg-output.
+ * gfortran.dg/transpose_2.f90: Fix dg-output.
+
+2013-06-03 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/if_test_errors.c (main): New testcase.
+ * c-c++-common/cilk-plus/AN/rank_mismatch.c: Added a '-w' option to
+ dg-option and an header comment.
+
+2013-06-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57419
+ * g++.dg/cpp0x/sfinae46.C: New.
+ * g++.dg/cpp0x/defaulted13.C: Adjust.
+ * g++.dg/cpp0x/defaulted2.C: Likewise.
+ * g++.dg/cpp0x/defaulted26.C: Likewise.
+ * g++.dg/cpp0x/defaulted3.C: Likewise.
+ * g++.dg/cpp0x/error1.C: Likewise.
+ * g++.dg/cpp0x/implicit1.C: Likewise.
+ * g++.dg/cpp0x/implicit11.C: Likewise.
+ * g++.dg/cpp0x/inh-ctor13.C: Likewise.
+ * g++.dg/cpp0x/initlist47.C: Likewise.
+ * g++.dg/cpp0x/initlist9.C: Likewise.
+ * g++.dg/cpp0x/lambda/lambda-errloc.C: Likewise.
+ * g++.dg/cpp0x/lambda/lambda-errloc2.C: Likewise.
+ * g++.dg/cpp0x/nsdmi-local.C: Likewise.
+ * g++.dg/cpp0x/union4.C: Likewise.
+ * g++.dg/template/crash108.C: Likewise.
+ * g++.dg/template/crash41.C: Likewise.
+ * g++.old-deja/g++.jason/local.C: Likewise.
+ * g++.old-deja/g++.law/visibility3.C: Likewise.
+
+2013-06-03 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/vect/bb-slp-31.c: Update vect dump message.
+ * gcc.dg/vect/bb-slp-14.c: Ditto.
+ * gcc.dg/vect/fast-math-bb-slp-call-1.c: Ditto.
+ * gcc.dg/vect/bb-slp-23.c: Ditto.
+ * gcc.dg/vect/bb-slp-15.c: Ditto.
+ * gcc.dg/vect/fast-math-bb-slp-call-2.c: Ditto.
+ * gcc.dg/vect/bb-slp-24.c: Ditto.
+ * gcc.dg/vect/bb-slp-16.c: Ditto.
+ * gcc.dg/vect/bb-slp-25.c: Ditto.
+ * gcc.dg/vect/bb-slp-pattern-2.c: Ditto.
+ * gcc.dg/vect/bb-slp-17.c: Ditto.
+ * gcc.dg/vect/bb-slp-1.c: Ditto.
+ * gcc.dg/vect/bb-slp-26.c: Ditto.
+ * gcc.dg/vect/bb-slp-18.c: Ditto.
+ * gcc.dg/vect/bb-slp-2.c: Ditto.
+ * gcc.dg/vect/no-tree-reassoc-bb-slp-12.c: Ditto.
+ * gcc.dg/vect/bb-slp-27.c: Ditto.
+ * gcc.dg/vect/bb-slp-19.c: Ditto.
+ * gcc.dg/vect/bb-slp-3.c: Ditto.
+ * gcc.dg/vect/bb-slp-28.c: Ditto.
+ * gcc.dg/vect/bb-slp-4.c: Ditto.
+ * gcc.dg/vect/bb-slp-29.c: Ditto.
+ * gcc.dg/vect/bb-slp-5.c: Ditto.
+ * gcc.dg/vect/bb-slp-6.c: Ditto.
+ * gcc.dg/vect/bb-slp-8a.c: Ditto.
+ * gcc.dg/vect/bb-slp-7.c: Ditto.
+ * gcc.dg/vect/bb-slp-8b.c: Ditto.
+ * gcc.dg/vect/bb-slp-8.c: Ditto.
+ * gcc.dg/vect/bb-slp-9.c: Ditto.
+ * gcc.dg/vect/bb-slp-10.c: Ditto.
+ * gcc.dg/vect/bb-slp-11.c: Ditto.
+ * gcc.dg/vect/bb-slp-20.c: Ditto.
+ * gcc.dg/vect/bb-slp-cond-1.c: Ditto.
+ * gcc.dg/vect/bb-slp-21.c: Ditto.
+ * gcc.dg/vect/bb-slp-30.c: Ditto.
+ * gcc.dg/vect/bb-slp-13.c: Ditto.
+ * gcc.dg/vect/bb-slp-22.c: Ditto.
+ * g++.dg/vect/slp-pr50413.cc: Ditto.
+ * g++.dg/vect/slp-pr56812.cc: Ditto.
+ * g++.dg/vect/slp-pr50819.cc: Ditto.
+
+2013-06-01 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57456
+ * gfortran.dg/class_array_17.f90: New.
+
+2013-05-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * ada/acats/floatstore.lst: New.
+ * ada/acats/run_all.sh: Process it.
+
+2013-05-31 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/powerpc/e500-ord-1.c: New test.
+ * gcc.target/powerpc/e500-ord-2.c: Likewise.
+ * gcc.target/powerpc/e500-unord-1.c: Likewise.
+ * gcc.target/powerpc/e500-unord-2.c: Likewise.
+
+2013-05-31 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * g++.dg/torture/pr54684.C: Add -fno-short-enums.
+
+2013-05-31 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * gcc.target/arm/pr56184.C: Add -fno-short-enums.
+
+2013-05-31 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * g++.old-deja/g++.robertl/eb76.C: Add -fno-short-enums.
+
+2013-05-31 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ PR c/57452
+ * c-c++-common/cilk-plus/AN/if_test.c: Fixed out of bounds issue in
+ test-case.
+
+2013-05-31 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/shrink-wrap-alloca.c: Use __builtin_alloca.
+
+2013-05-31 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/57478
+ PR tree-optimization/57453
+ * gcc.dg/torture/pr57478.c: New test.
+
+2013-05-31 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57456
+ * gfortran.dg/class_array_17.f90: New.
+
+2013-05-31 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/56315
+ * gcc.target/arm/iordi3-opt.c: New test.
+
+2013-05-31 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54190
+ PR fortran/57217
+ * gfortran.dg/dummy_procedure_5.f90: Modified error message.
+ * gfortran.dg/interface_26.f90: Ditto.
+ * gfortran.dg/proc_ptr_11.f90: Ditto.
+ * gfortran.dg/proc_ptr_15.f90: Ditto.
+ * gfortran.dg/proc_ptr_comp_20.f90: Ditto.
+ * gfortran.dg/proc_ptr_comp_33.f90: Ditto.
+ * gfortran.dg/proc_ptr_result_5.f90: Ditto.
+ * gfortran.dg/typebound_override_1.f90: Ditto.
+ * gfortran.dg/typebound_override_4.f90: Ditto.
+ * gfortran.dg/typebound_proc_6.f03: Ditto.
+ * gfortran.dg/assumed_type_7.f90: New test.
+ * gfortran.dg/typebound_override_5.f90: New test.
+ * gfortran.dg/typebound_override_6.f90: New test.
+ * gfortran.dg/typebound_override_7.f90: New test.
+
+2013-05-30 Tobias Burnus <burnus@net-b.de>
+
+ PR middle-end/57073
+ * gfortran.dg/power_6.f90: New.
+
+2013-05-30 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/insv_1.c: New test.
+
+2013-05-30 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * g++.dg/cpp0x/alias-decl-debug-0.C: Add aarch64*-*-* to the
+ dg-skip-if "No stabs".
+
+2013-05-30 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/54189
+ * gfortran.dg/assumed_size_1.f90: New.
+
+2013-05-30 Zhenqiang Chen <zhenqiang.chen@linaro.org>
+
+ * gcc.dg/shrink-wrap-alloca.c: New added.
+ * gcc.dg/shrink-wrap-pretend.c: New added.
+ * gcc.dg/shrink-wrap-sibcall.c: New added.
+
+2013-05-30 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57458
+ * gfortran.dg/assumed_rank_13.f90: New.
+
+2013-05-29 Easwaran Raman <eraman@google.com>
+
+ PR tree-optimization/57442
+ * gcc.dg/tree-ssa/reassoc-30.c: New testcase.
+
+2013-05-29 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR tree-optimization/57441
+ * gcc.c-torture/compile/pr57441.c: New.
+
+2013-05-29 Dehao Chen <dehao@google.com>
+
+ PR testsuite/57413
+ * gcc.dg/debug/dwarf2/discriminator.c: Restrict the test to linux-gnu.
+
+2013-05-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/auto_dealloc_2.f90: Update _free count in the dump.
+ * gfortran.dg/class_19.f03: Ditto.
+
+2013-05-29 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/bb-slp-32.c: New testcase.
+
+2013-05-28 Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+ * c-c++-common/cilk-plus/AN/array_test1.c: New test.
+ * c-c++-common/cilk-plus/AN/array_test2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/array_test_ND.c: Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_func_double.c: Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_func_double2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/gather-scatter-errors.c: Likewise.
+ * c-c++-common/cilk-plus/AN/if_test.c: Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit_ex.c: Likewise.
+ * c-c++-common/cilk-plus/AN/decl-ptr-colon.c: Likewise.
+ * c-c++-common/cilk-plus/AN/dimensionless-arrays.c: Likewise.
+ * c-c++-common/cilk-plus/AN/fn_ptr.c: Likewise.
+ * c-c++-common/cilk-plus/AN/fp_triplet_values.c: Likewise.
+ * c-c++-common/cilk-plus/AN/gather-scatter.c: Likewise.
+ * c-c++-common/cilk-plus/AN/misc.c: Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors.c: Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors3.c: Likewise.
+ * c-c++-common/cilk-plus/AN/parser_errors4.c: Likewise.
+ * c-c++-common/cilk-plus/AN/rank_mismatch.c: Likewise.
+ * c-c++-common/cilk-plus/AN/rank_mismatch2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/rank_mismatch3.c: Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit.c: Likewise.
+ * c-c++-common/cilk-plus/AN/sec_implicit2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c: Likewise.
+ * c-c++-common/cilk-plus/AN/tst_lngth.c: Likewise.
+ * c-c++-common/cilk-plus/AN/vla.c: Likewise.
+ * c-c++-common/cilk-plus/AN/an-if.c: Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_fn_custom.c: Likewise.
+ * c-c++-common/cilk-plus/AN/builtin_fn_mutating.c: Likewise.
+ * c-c++-common/cilk-plus/AN/comma_exp.c: Likewise.
+ * c-c++-common/cilk-plus/AN/conditional.c: Likewise.
+ * c-c++-common/cilk-plus/AN/exec-once.c: Likewise.
+ * c-c++-common/cilk-plus/AN/exec-once2.c: Likewise.
+ * c-c++-common/cilk-plus/AN/gather_scatter.c: Likewise.
+ * c-c++-common/cilk-plus/AN/n-ptr-test.c: Likewise.
+ * c-c++-common/cilk-plus/AN/side-effects-1.c: Likewise.
+ * c-c++-common/cilk-plus/AN/test_builtin_return.c: Likewise.
+ * c-c++-common/cilk-plus/AN/test_sec_limits.c: Likewise.
+ * gcc.dg/cilk-plus/cilk-plus.exp: New script.
+
+2013-05-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/37336
+ * gfortran.dg/finalize_11.f90: New.
+ * gfortran.dg/finalize_4.f03: Remove dg-error.
+ * gfortran.dg/finalize_5.f03: Ditto.
+ * gfortran.dg/finalize_6.f03: Ditto.
+ * gfortran.dg/finalize_7.f03: Ditto.
+
+2013-05-28 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/class_array_16.f90: New.
+
+2013-05-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57435
+ * gfortran.dg/use_29.f90: New.
+
+2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/fp_exception.adb: New test.
+
+2013-05-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56787
+ * gcc.dg/vect/pr56787.c: New testcase.
+
+2013-05-28 Janus Weil <janus@gcc.gnu.org>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57217
+ * gfortran.dg/typebound_override_4.f90: New.
+
+2013-05-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57411
+ * g++.dg/opt/pr57411.C: New testcase.
+
+2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/builtin-bswap-8.c: Compile at -O2.
+ * gcc.dg/builtin-bswap-9.c: Likewise.
+
+2013-05-28 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.target/sparc/bmaskbshuf.c: Remove superfluous options.
+
+2013-05-27 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57412
+ * gcc.dg/gomp/pr57412.c: New testcase.
+
+2013-05-27 Bud Davis <jmdavis@link.com>
+
+ PR fortran/50405
+ * gfortran.dg/stfunc_8.f90: New.
+
+2013-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57343
+ * gcc.dg/torture/pr57343.c: New testcase.
+
+2013-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57417
+ * gcc.dg/torture/pr57417.c: New testcase.
+
+2013-05-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57396
+ * gfortran.fortran-torture/execute/pr57396.f90: New testcase.
+
+2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/last_bit.ads: New test.
+
+2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/machine_attribute.ads: New test.
+
+2013-05-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/incomplete3.ad[sb]: New test.
+
+2013-05-25 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/53916
+ * gcc.target/mips/div-13.c: New test.
+
+2013-05-25 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/55777
+ * gcc.target/mips/mips16-attributes-5.c,
+ * gcc.target/mips/mips16-attributes-6.c: New tests.
+
+2013-05-25 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/builtin-bswap-6.c: Use same options as optimize-bswapsi-1.c.
+ * gcc.dg/builtin-bswap-8.c: Likewise.
+
+2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52216
+ * g++.dg/cpp0x/new1.C: New.
+
+2013-05-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25666
+ * g++.dg/parse/dtor16.C: New.
+ * g++.dg/parse/dtor6.C: Adjust.
+
+2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/19618
+ * g++.dg/expr/bitfield12.C: New.
+
+2013-05-24 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/57124
+ * gcc.c-torture/execute/pr57124.c: New test.
+ * gcc.c-torture/execute/pr57124.x: Set -fno-strict-overflow.
+
+2013-05-24 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/57294
+ * gcc.dg/ipa/pr57294.c: New test.
+
+2013-05-24 Dehao Chen <dehao@google.com>
+
+ * gcc.dg/debug/dwarf2/discriminator.c: New Testcase.
+
+2013-05-24 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c
+ (force_simd): Use a valid instruction.
+ (test_vdupd_lane_s64): Pass a valid lane argument.
+ (test_vdupd_lane_u64): Likewise.
+
+2013-05-24 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57287
+ * gcc.dg/pr57287.c: New testcase.
+
+2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/26572
+ * g++.dg/template/error51.C: New.
+
+2013-05-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/25503
+ * g++.dg/template/bitfield2.C: New.
+
+2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/noinline1.ads: New test.
+ * gnat.dg/noinline2.ad[sb]: Likewise.
+ * gnat.dg/specs/noinline3.ads: Likewise.
+ * gnat.dg/specs/noinline3_pkg.ad[sb]: New helper.
+
+2013-05-24 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ PR tree-ssa/57385
+ * gcc.dg/tree-ssa/pr57385.c: New test.
+
+2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/derived_type4.adb: New test.
+
+2013-05-24 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/builtin-bswap-6.c: New test.
+ * gcc.dg/builtin-bswap-7.c: Likewise.
+ * gcc.dg/builtin-bswap-8.c: Likewise.
+ * gcc.dg/builtin-bswap-9.c: Likewise.
+
+2013-05-23 Christian Bruel <christian.bruel@st.com>
+
+ PR debug/57351
+ * gcc.dg/debug/pr57351.c: New test
+
+2013-05-23 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.target/aarch64/vect-clz.c: New file.
+
+2013-05-23 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/57347
+ * gcc.dg/ipa/pr57347.c: New test.
+
+2013-05-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57380
+ * g++.dg/tree-ssa/pr57380.C: New testcase.
+
+2013-05-23 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57381
+ * gcc.dg/torture/pr57381.c: New testcase.
+
+2013-05-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/57344
+ * gcc.c-torture/execute/pr57344-1.c: New test.
+ * gcc.c-torture/execute/pr57344-2.c: New test.
+ * gcc.c-torture/execute/pr57344-3.c: New test.
+ * gcc.c-torture/execute/pr57344-4.c: New test.
+
+2013-05-23 Richard Biener <rguenther@suse.de>
+
+ PR rtl-optimization/57341
+ * gcc.dg/torture/pr57341.c: New testcase.
+
+2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57352
+ * g++.dg/parse/crash62.C: New.
+
+2013-05-22 Michael Meissner <meissner@linux.vnet.ibm.com>
+ Pat Haugen <pthaugen@us.ibm.com>
+ Peter Bergner <bergner@vnet.ibm.com>
+
+ * gcc.target/powerpc/crypto-builtin-1.c: New file, test for power8
+ crypto builtins.
+
+2013-05-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57364
+ * gfortran.dg/defined_assignment_6.f90: New.
+
+2013-05-22 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57338
+ * gfortran.dg/assumed_type_6.f90: New.
+
+2013-05-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57211
+ * g++.dg/cpp0x/Wunused-parm.C: New.
+
+2013-05-21 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/explicit3.C: Add column in dg-error strings.
+ * g++.dg/warn/Wdouble-promotion.C: Likewise.
+
+2013-05-21 Easwaran Raman <eraman@google.com>
+
+ PR tree-optimization/57322
+ * gcc.dg/tree-ssa/reassoc-29.c: New testcase.
+
+2013-05-21 Graham Stott <graham.stott@btinternet.com>
+
+ * lib/scanasm.exp (dg-function-on-line): Make MIPS targets match
+ .set (no)?micromips
+
+2013-05-21 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57035
+ * gfortran.dg/assumed_type_5.f90: New.
+ * gfortran.dg/assumed_rank_1.f90: Comment invalid statement.
+ * gfortran.dg/assumed_rank_2.f90: Ditto.
+ * gfortran.dg/assumed_type_3.f90: Update dg-error.
+ * gfortran.dg/no_arg_check_3.f90: Ditto.
+
+2013-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57331
+ * gcc.c-torture/compile/pr57331.c: New test.
+
+2013-05-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57330
+ * gcc.dg/torture/pr57330.c: New testcase.
+
+2013-05-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57303
+ * gcc.dg/torture/pr57303.c: New testcase.
+
+2013-05-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57321
+ * gcc.c-torture/execute/pr57321.c: New test.
+
+2013-05-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48858
+ PR fortran/55465
+ * gfortran.dg/binding_label_tests_10_main.f03: Update dg-error.
+ * gfortran.dg/binding_label_tests_11_main.f03: Ditto.
+ * gfortran.dg/binding_label_tests_13_main.f03: Ditto.
+ * gfortran.dg/binding_label_tests_3.f03: Ditto.
+ * gfortran.dg/binding_label_tests_4.f03: Ditto.
+ * gfortran.dg/binding_label_tests_5.f03: Ditto.
+ * gfortran.dg/binding_label_tests_6.f03: Ditto.
+ * gfortran.dg/binding_label_tests_7.f03: Ditto.
+ * gfortran.dg/binding_label_tests_8.f03: Ditto.
+ * gfortran.dg/c_loc_tests_12.f03: Fix test case.
+ * gfortran.dg/binding_label_tests_24.f90: New.
+ * gfortran.dg/binding_label_tests_25.f90: New.
+
+2013-05-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48858
+ * gfortran.dg/binding_label_tests_17.f90: New.
+ * gfortran.dg/binding_label_tests_18.f90: New.
+ * gfortran.dg/binding_label_tests_19.f90: New.
+ * gfortran.dg/binding_label_tests_20.f90: New.
+ * gfortran.dg/binding_label_tests_21.f90: New.
+ * gfortran.dg/binding_label_tests_22.f90: New.
+ * gfortran.dg/binding_label_tests_23.f90: New.
+
+2013-05-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/48858
+ * gfortran.dg/test_common_binding_labels.f03: Update dg-error.
+ * gfortran.dg/test_common_binding_labels_2_main.f03: Ditto.
+ * gfortran.dg/test_common_binding_labels_3_main.f03: Ditto.
+ * gfortran.dg/common_18.f90: New.
+ * gfortran.dg/common_19.f90: New.
+ * gfortran.dg/common_20.f90: New.
+ * gfortran.dg/common_21.f90: New.
+
+2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/12288
+ * g++.dg/parse/error52.C: New.
+ * g++.dg/parse/error3.C: Adjust.
+ * g++.dg/parse/error36.C: Likewise.
+
+2013-05-20 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/56547
+ * gcc.target/sh/pr56547-1.c: New.
+ * gcc.target/sh/pr56547-2.c: New.
+
+2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/23608
+ * g++.dg/warn/Wsign-compare-6.C: New.
+ * g++.dg/warn/Wdouble-promotion.C: Adjust.
+
+2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57327
+ * g++.dg/template/error50.C: New.
+
+2013-05-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/10207
+ * g++.dg/ext/complit13.C: New.
+
+2013-05-20 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/57175
+ * g++.dg/pr57175.C: New testcase.
+
+2013-05-17 Easwaran Raman <eraman@google.com>
+
+ * gcc.dg/tree-ssa/reassoc-28.c: New testcase.
+
+2013-05-17 Marc Glisse <marc.glisse@inria.fr>
+
+ PR testsuite/57313
+ * gcc.dg/binop-xor3.c: Restrict to platforms known to work (x86).
+
+2013-05-17 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/57281
+ PR rtl-optimization/57300
+ * gcc.dg/pr57300.c: New test.
+ * gcc.c-torture/execute/pr57281.c: New test.
+
+2013-05-17 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/18126
+ * g++.dg/ext/sizeof-complit.C: New.
+
+2013-05-17 Marek Polacek <polacek@redhat.com>
+
+ * gcc.dg/strlenopt-25.c: New test.
+ * gcc.dg/strlenopt-26.c: Likewise.
+
+2013-05-17 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/rotate-4.c: Compile only with -mavx
+ instead of -mavx2, require only avx instead of avx2.
+ * gcc.target/i386/rotate-4a.c: Include avx-check.h instead
+ of avx2-check.h and turn into an avx runtime test instead of
+ avx2 runtime test.
+
+2013-05-16 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector22.C: Uncomment working test.
+
+2013-05-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/17410
+ * g++.dg/template/pr17410.C: New.
+
+2013-05-16 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/rotate-3.c: New test.
+ * gcc.target/i386/rotate-3a.c: New test.
+ * gcc.target/i386/rotate-4.c: New test.
+ * gcc.target/i386/rotate-4a.c: New test.
+ * gcc.target/i386/rotate-5.c: New test.
+ * gcc.target/i386/rotate-5a.c: New test.
+
+2013-05-16 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/visibility-21.c: Require section_anchors.
+
+2013-05-16 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/unaligned-memcpy-2.c: Adjust expected output.
+ * gcc.target/arm/unaligned-memcpy-3.c: Likewise.
+ * gcc.target/arm/unaligned-memcpy-4.c: Likewise.
+
+2013-05-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * gcc.dg/visibility-21.c: New.
+
+2013-05-16 Marc Glisse <marc.glisse@inria.fr>
+
+ PR middle-end/57286
+ * gcc.dg/pr57286.c: New testcase.
+ * gcc.dg/vector-shift-2.c: Don't assume int has size 4.
+ * g++.dg/ext/vector22.C: Comment out transformations not
+ performed anymore.
+
+2013-05-15 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR target/57260
+ * gcc.target/mips/call-1.c: Restrict to o32.
+ * gcc.target/mips/call-5.c, gcc.target/mips/call-6.c: New test.
+
+2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/lambda/lambda-shadow1.C: Replace dg-warnings with
+ dg-messages.
+ * g++.dg/warn/Wshadow-1.C: Likewise.
+ * g++.dg/warn/Wshadow-6.C: Likewise.
+ * g++.dg/warn/Wshadow-7.C: Likewise.
+
+2013-05-15 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/31952
+ * g++.dg/parse/pr31952-1.C: New.
+ * g++.dg/parse/pr31952-2.C: Likewise.
+ * g++.dg/parse/pr31952-3.C: Likewise.
+
+ * g++.dg/parse/pr18770.C: Adjust dg-errors to dg-messages.
+ * g++.old-deja/g++.jason/cond.C: Likewise.
+ * g++.dg/cpp0x/range-for5.C: Likewise.
+
+2013-05-15 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ PR target/19599
+ * gcc.target/arm/pr40887.c: Adjust testcase.
+ * gcc.target/arm/pr19599.c: New test.
+
+2013-05-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57275
+ * gcc.target/i386/pr57275.c: New testcase.
+
+2013-05-15 Jan Hubicka <jh@suse.cz>
+
+ * gcc.dg/lto/attr-weakref-1_0.c: New testcase.
+ * gcc.dg/lto/attr-weakref-1_1.c: New testcase.
+ * gcc.dg/lto/attr-weakref-1_2.c: New testcase.
+
+2013-05-14 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/torture/alias-1.c: Add dg-require-effective-target
+ scheduling.
+
+2013-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/57274
+ * c-c++-common/Wsequence-point-1.c: New test.
+
+2013-05-14 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector22.C: New testcase.
+ * gcc.dg/binop-xor3.c: Remove xfail.
+
+2013-05-14 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-fcm.x: Add cases testing
+ FLOAT cmp FLOAT ? INT : INT.
+ * gcc.target/aarch64/vect-fcm-eq-d.c: Define IMODE.
+ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
+
+2013-05-14 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53903
+ * g++.dg/cpp0x/defaulted43.C: New.
+
+2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/fstack-protector-strong.c: Don't include <stdlib.h>.
+ (alloca): Remove declaration.
+ (foo9): Replace alloca by __builtin_alloca.
+
+2013-05-14 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ * gcc.c-torture/compile/limits-externdecl.c [target avr-*-*]:
+ Expect "size of array is too large" error.
+
+2013-05-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/fstack-protector-strong.c (alloca): Declare.
+
+2013-05-14 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57235
+ * g++.dg/torture/pr57235.C: New testcase.
+
+2013-05-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/57251
+ * gcc.dg/torture/pr57251.c: New test.
+
+2013-05-13 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/57264
+ * gcc.target/i386/pr57264.c: New test.
+
+2013-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/vector-shift-2.c: Add -O to dg-options.
+
+2013-05-13 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.dg/tree-ssa/forwprop-26.c: Add -fno-short-enums to dg-options.
+
+2013-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/45216
+ PR tree-optimization/57157
+ * c-c++-common/rotate-1.c: Add 32 tests with +.
+ * c-c++-common/rotate-1a.c: Adjust.
+ * c-c++-common/rotate-2.c: Add 32 tests with +, expect only 48 rotates.
+ * c-c++-common/rotate-2b.c: New test.
+ * c-c++-common/rotate-3.c: Add 32 tests with +.
+ * c-c++-common/rotate-4.c: Add 32 tests with +, expect only 48 rotates.
+ * c-c++-common/rotate-4b.c: New test.
+ * c-c++-common/rotate-5.c: New test.
+
+2013-05-13 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/42371
+ * gcc.dg/ipa/remref-0.c: New test.
+ * gcc.dg/ipa/remref-1a.c: Likewise.
+ * gcc.dg/ipa/remref-1b.c: Likewise.
+ * gcc.dg/ipa/remref-2a.c: Likewise.
+ * gcc.dg/ipa/remref-2b.c: Likewise.
+
+2013-05-13 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/vector-shift-2.c: New testcase.
+
+2013-05-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57230
+ * gcc.dg/strlenopt-24.c: New test.
+
+ PR tree-optimization/57230
+ * gcc.dg/strlenopt-23.c: New test.
+
+2013-05-12 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/57108
+ * gcc.target/sh/pr57108.c: Move this test case to ...
+ * gcc.c-torture/compile/pr57108.c: ... here.
+
+2013-05-10 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57214
+ * gcc.dg/torture/pr57214.c: New testcase.
+
+2013-05-10 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/vector-shift.c: New testcase.
+
+2013-05-10 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.target/i386/rotate-1.c: Accept rolb or rorb instruction.
+
+ PR tree-optimization/45216
+ PR tree-optimization/57157
+ * c-c++-common/rotate-1.c: New test.
+ * c-c++-common/rotate-1a.c: New test.
+ * c-c++-common/rotate-2.c: New test.
+ * c-c++-common/rotate-2a.c: New test.
+ * c-c++-common/rotate-3.c: New test.
+ * c-c++-common/rotate-3a.c: New test.
+ * c-c++-common/rotate-4.c: New test.
+ * c-c++-common/rotate-4a.c: New test.
+
+2013-05-10 Richard Biener <rguenther@suse.de>
+
+ * gcc.target/i386/avx256-unaligned-load-2.c: Make well-defined.
+ * gcc.target/i386/l_fma_double_1.c: Adjust.
+ * gcc.target/i386/l_fma_double_2.c: Likewise.
+ * gcc.target/i386/l_fma_double_3.c: Likewise.
+ * gcc.target/i386/l_fma_double_4.c: Likewise.
+ * gcc.target/i386/l_fma_double_5.c: Likewise.
+ * gcc.target/i386/l_fma_double_6.c: Likewise.
+ * gcc.target/i386/l_fma_float_1.c: Likewise.
+ * gcc.target/i386/l_fma_float_2.c: Likewise.
+ * gcc.target/i386/l_fma_float_3.c: Likewise.
+ * gcc.target/i386/l_fma_float_4.c: Likewise.
+ * gcc.target/i386/l_fma_float_5.c: Likewise.
+ * gcc.target/i386/l_fma_float_6.c: Likewise.
+
+2013-05-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51226
+ * g++.dg/cpp0x/pr51226.C: New.
+
+2013-04-16 Han Shen <shenhan@google.com>
+
+ Test cases for '-fstack-protector-strong'.
+ * gcc.dg/fstack-protector-strong.c: New.
+ * g++.dg/fstack-protector-strong.C: New.
+
+2013-05-07 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/ands_1.c: New test.
+ * gcc.target/aarch64/ands_2.c: Likewise
+
+2013-05-07 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * lib/target-supports.exp (check_effective_target_hw): New
+ function.
+ * c-c++-common/asan/clone-test-1.c: Call
+ check_effective_target_hw.
+ * c-c++-common/asan/rlimit-mmap-test-1.c: Likewise.
+ * c-c++-common/asan/heap-overflow-1.c: Update regexps to accept
+ possible decorations.
+ * c-c++-common/asan/null-deref-1.c: Likewise.
+ * c-c++-common/asan/stack-overflow-1.c: Likewise.
+ * c-c++-common/asan/strncpy-overflow-1.c: Likewise.
+ * c-c++-common/asan/use-after-free-1.c: Likewise.
+ * g++.dg/asan/deep-thread-stack-1.C: Likewise.
+ * g++.dg/asan/large-func-test-1.C: Likewise.
+
+2013-05-07 Sofiane Naci <sofiane.naci@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c: Update.
+
+2013-05-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57190
+ * g++.dg/torture/pr57190.C: New testcase.
+
+2013-05-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57149
+ * gcc.dg/pr57149.c: New test.
+
+ PR debug/57184
+ * gcc.dg/pr57184.c: New test.
+
+2013-05-07 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/array3.ads: New test.
+
+2013-05-06 Marc Glisse <marc.glisse@inria.fr>
+
+ * c-c++-common/vector-scalar-2.c: New testcase.
+
+2013-05-06 Maxim Kuznetsov <maks.kuznetsov@gmail.com>
+
+ * gcc.target/i386/asm-dialect-2.c: New testcase.
+
+2013-05-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57183
+ * g++.dg/cpp0x/auto38.C: New.
+
+2013-05-06 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57185
+ * gcc.dg/autopar/pr57185.c: New testcase.
+
+2013-05-06 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/57106
+ * gcc.target/i386/pr57106.c: New test.
+
+2013-05-06 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/tree-ssa/slsr-32.c: Re-enable.
+ * gcc.dg/tree-ssa/slsr-33.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-34.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-35.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-36.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-37.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-38.c: Likewise.
+
+2013-05-06 Teresa Johnson <tejohnson@google.com>
+
+ PR bootstrap/57154
+ * gcc.dg/pr57154.c: New test.
+
+2013-05-06 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57147
+ * gcc.dg/torture/pr57147-1.c: New testcase.
+ * gcc.dg/torture/pr57147-2.c: Likewise.
+ * gcc.dg/torture/pr57147-3.c: Likewise.
+
+2013-05-06 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/55303
+ * gcc.target/sh/pr55303-1.c: New.
+ * gcc.target/sh/pr55303-2.c: New.
+ * gcc.target/sh/pr55303-3.c: New.
+
+2013-05-05 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/allocate_with_source_3.f90: New.
+
+2013-05-05 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57141
+ * gfortran.dg/null_8.f90: New.
+
+2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/53745
+ * g++.dg/cpp0x/enum27.C: New.
+ * g++.dg/cpp0x/enum_base.C: Adjust.
+
+2013-05-04 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56205
+ * gcc.dg/tree-ssa/stdarg-6.c: Add cleanup-tree-dump "stdarg".
+
+2013-05-04 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/bind_c_array_params.f03: Update dg-error.
+ * gfortran.dg/bind_c_usage_27.f90: New.
+ * gfortran.dg/bind_c_usage_28.f90: New.
+
+2013-05-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51927
+ * g++.dg/cpp0x/lambda/lambda-nsdmi4.C: New.
+
+2013-05-03 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/57150
+ * gcc.target/powerpc/pr57150.c: New file.
+
+2013-05-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/tree-ssa/slsr-32.c: Skip test for now.
+ * gcc.dg/tree-ssa/slsr-33.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-34.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-35.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-36.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-37.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-38.c: Likewise.
+
+2013-05-03 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gcc.target/i386/sse2-init-v2di-2.c: Remove "\\" from
+ scan-assembler-times.
+
+2013-05-03 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ * gcc.dg/tree-ssa/slsr-32.c: New.
+ * gcc.dg/tree-ssa/slsr-33.c: New.
+ * gcc.dg/tree-ssa/slsr-34.c: New.
+ * gcc.dg/tree-ssa/slsr-35.c: New.
+ * gcc.dg/tree-ssa/slsr-36.c: New.
+ * gcc.dg/tree-ssa/slsr-37.c: New.
+ * gcc.dg/tree-ssa/slsr-38.c: New.
+
+2013-05-03 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/tst_1.c: New test.
+ * gcc.target/aarch64/tst_2.c: Likewise
+
+2013-05-02 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/57144
+ * gcc.c-torture/execute/pr57144.c: New test.
+
+2013-05-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/57130
+ * gcc.c-torture/execute/pr57130.c: New test.
+
+2013-05-03 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/sse2-init-v2di-2.c: Update scan assembler string.
+
+2013-05-03 Vidya Praveen <vidyapraveen@arm.com>
+
+ * gcc.target/aarch64/fabd.c: New file.
+
+2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54318
+ * g++.dg/cpp0x/pr54318.C: New.
+
+2013-05-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/14283
+ * g++.dg/parse/error51.C: New.
+ * g++.dg/parse/error15.C: Adjust column numbers.
+
+2013-05-02 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57142
+ * gfortran.dg/size_kind_2.f90: New.
+ * gfortran.dg/size_kind_3.f90: New.
+
+2013-05-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57140
+ * g++.dg/torture/pr57140.C: New testcase.
+
+2013-05-02 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ PR target/56732
+ * gcc.target/arm/pr56732-1.c: New test.
+
+2013-05-02 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/56988
+ * gcc.dg/ipa/pr56988.c: New test.
+
+2013-05-02 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/bics_1.c: New test.
+ * gcc.target/aarch64/bics_2.c: Likewise.
+
+2013-05-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/57131
+ * gcc.c-torture/execute/pr57131.c: New test.
+
+2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57132
+ * g++.dg/warn/Wdiv-by-zero-bogus-2.C: New.
+
+2013-05-01 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/57091
+ * gcc.target/i386/pr57091.c: New test.
+
+2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-vaddv.c: New.
+
+2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-vmaxv.c: New.
+ * gcc.target/aarch64/vect-vfmaxv.c: Likewise.
+
+2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/scalar-vca.c: New.
+ * gcc.target/aarch64/vect-vca.c: Likewise.
+
+2013-05-01 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/scalar_intrinsics.c (force_simd): New.
+ (test_vceqd_s64): Force arguments to SIMD registers.
+ (test_vceqzd_s64): Likewise.
+ (test_vcged_s64): Likewise.
+ (test_vcled_s64): Likewise.
+ (test_vcgezd_s64): Likewise.
+ (test_vcged_u64): Likewise.
+ (test_vcgtd_s64): Likewise.
+ (test_vcltd_s64): Likewise.
+ (test_vcgtzd_s64): Likewise.
+ (test_vcgtd_u64): Likewise.
+ (test_vclezd_s64): Likewise.
+ (test_vcltzd_s64): Likewise.
+ (test_vtst_s64): Likewise.
+ (test_vtst_u64): Likewise.
+
+2013-05-01 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/57092
+ * g++.dg/cpp0x/decltype53.C: New.
+
+2013-04-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/57071
+ * gfortran.dg/power_5.f90: New test.
+
+2013-04-30 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57122
+ * gcc.dg/torture/pr57122.c: New testcase.
+
+2013-04-30 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57107
+ * g++.dg/torture/pr57107.C: New testcase.
+
+2013-04-30 Andrey Belevantsev <abel@ispras.ru>
+
+ PR rtl-optimization/57105
+ * gcc.dg/pr57105.c: New test.
+
+2013-04-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57104
+ * gcc.dg/pr57104.c: New test.
+
+2013-04-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/44578
+ * gcc.target/i386/pr44578.c: New test.
+
+2013-04-29 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/57097
+ * gcc.target/i386/pr57097.c: New test.
+
+2013-04-29 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/57098
+ * gcc.target/i386/pr57098.c: New test.
+
+2013-04-29 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.c-torture/execute/pr55875.c: New test.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57075
+ * gcc.dg/torture/pr57075.c: New testcase.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57103
+ * gcc.dg/autopar/pr57103.c: New testcase.
+
+2013-04-29 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@atmel.com>
+
+ * gcc.dg/c1x-align-3.c: Add test for negative power of 2.
+
+2013-04-29 Tom de Vries <tom@codesourcery.com>
+
+ * gcc.dg/pr50763.c: Update test.
+
+2013-04-26 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/vrp88.c: New test.
+
+2013-04-29 Christian Bruel <christian.bruel@st.com>
+
+ PR target/57108
+ * gcc.target/sh/pr57108.c: New test.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57089
+ * gfortran.dg/gomp/pr57089.f90: New testcase.
+
+2013-04-29 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * lib/target-supports.exp (vect_uintfloat_cvt): Enable for AArch64.
+
+2013-04-29 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-vcvt.c: New.
+
+2013-04-29 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-vrnd.c: New.
+
+2013-04-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57081
+ * gcc.dg/torture/pr57081.c: New testcase.
+
+2013-04-29 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/57083
+ * gcc.dg/torture/pr57083.c: New test.
+
+2013-04-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56450
+ * g++.dg/cpp0x/decltype52.C: New.
+
+2013-04-28 Jakub Jelinek <jakub@redhat.com>
+
+ N3472 binary constants
+ * g++.dg/cpp/limits.C: Adjust warning wording.
+ * g++.dg/system-binary-constants-1.C: Likewise.
+ * g++.dg/cpp1y/system-binary-constants-1.C: New test.
+
+2013-04-28 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/57093
+ * gfortran.dg/coarray_30.f90: New.
+
+2013-04-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/57071
+ * frontend-passes (optimize_power): New function.
+ (optimize_op): Use it.
+
+2013-04-27 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/56866
+ * gcc.c-torture/execute/pr56866.c: New test.
+ * gcc.target/i386/pr56866.c: New test.
+
+2013-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR go/57045
+ * gcc.dg/setjmp-5.c: New test.
+
+2013-04-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55708
+ * g++.dg/cpp0x/constexpr-55708.C: New.
+
+2013-04-26 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-prof/update-loopch.c: Revert last change.
+ * gcc.dg/graphite/pr33766.c: Fix undefined behavior.
+ * gcc.dg/pr53265.c: Remove XFAILs.
+ * gcc.dg/tree-ssa/loop-38.c: Remove unreliable dump scanning.
+ * gcc.dg/tree-ssa/pr21559.c: Change back to two expected jump threads.
+
+2013-04-26 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/prune.exp: Add -fdiagnostics-color=never to TEST_ALWAYS_FLAGS.
+ * lib/c-compat.exp (compat-use-alt-compiler, compat_setup_dfp): Handle
+ -fdiagnostics-color=never option similarly to
+ -fno-diagnostics-show-caret option.
+
+2013-04-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/57003
+ * gcc.target/i386/pr57003.c: New test.
+
+2013-04-25 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/57066
+ * gcc.dg/torture/builtin-logb-1.c: Adjust testcase.
+
+2013-04-25 James Greenhalgh <james.greenhalgh@arm.com>
+ Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/vaddv-intrinsic.c: New.
+ * gcc.target/aarch64/vaddv-intrinsic-compile.c: Likewise.
+ * gcc.target/aarch64/vaddv-intrinsic.x: Likewise.
+
+2013-04-25 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/cmp.c: New.
+
+2013-04-25 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/ngc.c: New.
+
+2013-04-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp
+ (check_effective_target_arm_neon_fp16_ok_nocache): New procedure.
+ (check_effective_target_arm_neon_fp16_ok): Likewise.
+ (add_options_for_arm_neon_fp16): Likewise.
+ * gcc.target/arm/neon/vcvtf16_f32.c: New test. Generated.
+ * gcc.target/arm/neon/vcvtf32_f16.c: Likewise.
+
+2013-04-24 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimizations/57046
+ * gcc.target/i386/pr57046.c: New test.
+
+2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp1y/cplusplus.C: New.
+
+2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp1y/cxx1y_macro.C: Remove.
+
+2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * c-c++-common/Wpointer-arith-1.c: New.
+
+2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp1y/cxx1y_macro.C: New.
+
+2013-04-24 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56970
+ * g++.dg/cpp0x/sfinae45.C: New.
+
+2013-04-24 Richard Biener <rguenther@suse.de>
+
+ PR testsuite/57050
+ * gcc.c-torture/execute/pr56982.c: Avoid sigjmp_buf use.
+
+2013-04-23 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/57036
+ * gcc.dg/torture/pr57036-1.c: New testcase.
+ * gcc.dg/torture/pr57036-2.c: Likewise.
+
+2013-04-23 Sofiane Naci <sofiane.naci@arm.com>
+
+ * gcc.target/aarch64/scalar-mov.c: New testcase.
+
+2013-04-23 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57026
+ * gcc.dg/torture/pr57026.c: New testcase.
+
+2013-04-22 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/53685
+ PR fortran/57022
+ * gfortran.dg/transfer_check_4.f90: New.
+
+2013-04-22 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/56990
+ * gcc.dg/pr56990.c: New test.
+
+2013-04-22 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/57018
+ * gcc.target/i386/pr57018.c: New test.
+
+2013-04-22 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vrecps.c: New.
+ * gcc.target/aarch64/vrecpx.c: Likewise.
+
+2013-04-22 Christian Bruel <christian.bruel@st.com>
+
+ PR target/56995
+ * gcc.target/sh/mfmovd.c: Add new function and check hard_float.
+
+2013-04-21 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/forwprop-26.c: New test.
+
+2013-04-20 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56907
+ * gfortran.dg/c_loc_test_22.f90: New.
+
+2013-04-19 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56847
+ * gcc.dg/pr56847.c: New test.
+
+2013-04-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56982
+ * gcc.c-torture/execute/pr56982.c: New testcase.
+
+2013-04-19 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/56718
+ * g++.dg/ipa/imm-devirt-1.C: New test.
+ * g++.dg/ipa/imm-devirt-2.C: Likewise.
+
+2013-04-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/57000
+ * gcc.dg/tree-ssa/reassoc-27.c: New testcase.
+
+2013-04-19 Thomas Koenig <tkoenig@gcc.gnu.org>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56872
+ * gfortran.dg/array_constructor_45.f90: New test.
+ * gfortran.dg/array_constructor_46.f90: New test.
+ * gfortran.dg/array_constructor_47.f90: New test.
+ * gfortran.dg/array_constructor_40.f90: Adjust number of while loops.
+
+2013-04-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56999
+ * g++.dg/opt/pr56999.C: New test.
+
+2013-04-18 Cary Coutant <ccoutant@google.com>
+
+ * g++.dg/debug/dwarf2/pubnames-2.C: Add -fno-debug-types-section.
+ * g++.dg/debug/dwarf2/pubnames-3.C: New test case.
+
+2013-04-18 Cary Coutant <ccoutant@google.com>
+
+ * g++.dg/debug/dwarf2/typedef2.C: Add -fno-debug-types-section flag.
+ * g++.dg/debug/dwarf2/typedef4.C: Likewise.
+ * g++.dg/debug/dwarf2/static-data-member1.C: Likewise.
+ * g++.dg/debug/dwarf2/global-used-types-1.C: Likewise.
+ * g++.dg/debug/dwarf2/self-ref-1.C: Likewise.
+ * g++.dg/debug/dwarf2/nested-2.C: Likewise.
+ * g++.dg/debug/dwarf2/typedef1.C: Likewise.
+ * g++.dg/debug/dwarf2/namespace-2.C: Likewise.
+ * g++.dg/debug/dwarf2/integer-typedef.C: Likewise.
+ * g++.dg/debug/dwarf2/self-ref-2.C: Likewise.
+ * g++.dg/debug/dwarf2/explicit-constructor.C: Likewise.
+
+2013-04-18 Grigoriy Kraynov <grigoriy.kraynov@intel.com>
+
+ * gcc.target/i386/avx2-vpop-check.h: Cast away volatility in memcmp().
+
+2013-04-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56984
+ * gcc.c-torture/compile/pr56984.c: New test.
+
+ PR rtl-optimization/56992
+ * gcc.dg/pr56992.c: New test.
+
+2013-04-17 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56814
+ * gfortran.dg/proc_ptr_42.f90: New.
+
+2013-04-17 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/discr41.ad[sb]: New test.
+ * gcc.dg/tree-ssa/ssa-fre-38.c: Likewise.
+ * gcc.dg/vect/slp-24-big-array.c: Beef up anti-vectorization trick.
+ * gcc.dg/vect/slp-24.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-mult.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u16-i2.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u16-i4.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u16-mult.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u8-i2-gap.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u8-i8-gap2.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c: Likewise.
+ * gcc.dg/vect/vect-strided-a-u8-i8-gap7.c: Likewise.
+ * gcc.dg/vect/vect-strided-mult-char-ls.c: Likewise.
+ * gcc.dg/vect/vect-strided-mult.c: Likewise.
+ * gcc.dg/vect/vect-strided-same-dr.c: Likewise.
+ * gcc.dg/vect/vect-strided-u16-i2.c: Likewise.
+ * gcc.dg/vect/vect-strided-u16-i4.c: Likewise.
+ * gcc.dg/vect/vect-strided-u32-i4.c: Likewise.
+ * gcc.dg/vect/vect-strided-u32-i8.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i2-gap.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i2.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap2.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap4.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8-gap7.c: Likewise.
+ * gcc.dg/vect/vect-strided-u8-i8.c: Likewise.
+
+2013-04-17 Janne Blomqvist <jb@gcc.gnu.org>
+
+ PR fortran/40958
+ * lib/gcc-dg.exp (scan-module): Uncompress module file before scanning.
+ * gfortran.dg/module_md5_1.f90: Remove.
+
+2013-04-16 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/adds3.c: New.
+ * gcc.target/aarch64/subs3.c: New.
+
+2013-04-16 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/adds1.c: New.
+ * gcc.target/aarch64/adds2.c: New.
+ * gcc.target/aarch64/subs1.c: New.
+ * gcc.target/aarch64/subs2.c: New.
+
+2013-04-16 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ Implement n3599 - Literal operator templates for strings.
+ * g++.dg/cpp1y/udlit-char-template.C: New test.
+ * g++.dg/cpp1y/udlit-char-template-neg.C: New test.
+
+2013-04-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/39505
+ * gfortran.dg/no_arg_check_1.f90: New.
+ * gfortran.dg/no_arg_check_2.f90: New.
+ * gfortran.dg/no_arg_check_3.f90: New.
+
+2013-04-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56968
+ * gfortran.dg/proc_ptr_41.f90: New.
+
+2013-04-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56756
+ * gcc.dg/torture/pr56756.c: New testcase.
+
+2013-04-16 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56969
+ * gfortran.dg/c_assoc_5.f90: New.
+
+2013-04-16 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/ipa/devirt-c-7.C: Require nonpic effective target.
+ * gcc.c-torture/execute/pr33992.x: Remove.
+ * gcc.c-torture/execute/pr33992.c (foo): Declare as static.
+ * gcc.dg/uninit-pred-5_a.c (foo): Ditto.
+ * gcc.dg/uninit-pred-5_b.c (foo): Ditto.
+
+2013-04-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56962
+ * gcc.c-torture/execute/pr56962.c: New test.
+
+2013-04-15 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56933
+ * gcc.dg/vect/pr56933.c: New testcase.
+
+2013-04-15 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/anddi3-opt.c: New test.
+ * gcc.target/arm/anddi3-opt2.c: Likewise.
+
+2013-04-15 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr56890-1.c: New test.
+ * gcc.dg/pr56890-2.c: Likewise.
+
+2013-04-15 Joey Ye <joey.ye@arm.com>
+
+ * gcc.target/arm/thumb1-far-jump-1.c: New test.
+ * gcc.target/arm/thumb1-far-jump-2.c: New test.
+
+2013-04-14 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56816
+ * gfortran.dg/select_type_33.f03: New test.
+
+2013-04-13 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55959
+ * gfortran.dg/typebound_proc_29.f03: New.
+
+2013-04-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56266
+ * gfortran.dg/typebound_proc_28.f03: New.
+
+2013-04-12 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/vrp87.c: Do not run test on ppc and xtensa
+ either.
+
+2013-04-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56929
+ * gfortran.dg/coarray/alloc_comp_2.f90: New.
+
+2013-04-12 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/56903
+ * gcc.target/i386/pr56903.c: New test.
+
+2013-04-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56261
+ * gfortran.dg/auto_char_len_4.f90: Add -pedantic. Changed error.
+ * gfortran.dg/assumed_rank_4.f90: Modified error wording.
+ * gfortran.dg/block_11.f90: Fix invalid test case.
+ * gfortran.dg/function_types_3.f90: Add new error message.
+ * gfortran.dg/global_references_1.f90: Ditto.
+ * gfortran.dg/import2.f90: Remove unneeded parts.
+ * gfortran.dg/import6.f90: Fix invalid test case.
+ * gfortran.dg/proc_decl_2.f90: Ditto.
+ * gfortran.dg/proc_decl_9.f90: Ditto.
+ * gfortran.dg/proc_decl_18.f90: Ditto.
+ * gfortran.dg/proc_ptr_40.f90: New.
+ * gfortran.dg/whole_file_7.f90: Modified error wording.
+ * gfortran.dg/whole_file_16.f90: Ditto.
+ * gfortran.dg/whole_file_17.f90: Add -pedantic.
+ * gfortran.dg/whole_file_18.f90: Modified error wording.
+ * gfortran.dg/whole_file_20.f03: Ditto.
+ * gfortran.fortran-torture/execute/intrinsic_associated.f90: Fix
+ invalid test case.
+
+2013-04-12 Richard Biener <rguenther@suse.de>
+
+ Revert
+ 2013-04-10 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/pr55604.C: Use -fdump-rtl-ira.
+
+2013-04-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56845
+ * gfortran.dg/class_allocate_15.f90: New.
+
+ Revert:
+ 2013-04-12 Tobias Burnus <burnus@net-b.de>
+
+ * gfortran.dg/coarray_lib_alloc_2.f90: Update
+ scan-tree-dump-times.
+
+2013-04-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56918
+ PR tree-optimization/56920
+ * gcc.dg/vect/pr56918.c: New test.
+ * gcc.dg/vect/pr56920.c: New test.
+
+2013-04-12 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56845
+ * gfortran.dg/class_allocate_14.f90: New.
+ * gfortran.dg/coarray_lib_alloc_2.f90: Update scan-tree-dump-times.
+ * gfortran.dg/coarray_lib_alloc_3.f90: New.
+
+2013-04-12 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/fold-cstvecshift.c: New testcase.
+
+2013-04-11 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/negs.c: New.
+
+2013-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56895
+ * g++.dg/template/arrow4.C: New test.
+
+2013-04-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/array23.adb: New test.
+ * gnat.dg/array23_pkg[123].ads: New helpers.
+
+2013-04-11 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/56900
+ * gcc.dg/tree-ssa/vrp87.c: Do not run test on various targets.
+
+2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56913
+ * g++.dg/cpp0x/sfinae44.C: New.
+
+2013-04-11 Arnaud Charlet <charlet@adacore.com>
+
+ * ada/acats/run_all.sh: Remove special handling of -gnat95 switch.
+ * ada/acats/ada95.lst: Remove special handling of -gnat95 switch.
+
+2013-04-11 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54216
+ * g++.dg/cpp0x/enum26.C: New.
+ * g++.old-deja/g++.pt/mangle1.C: Adjust.
+
+2013-04-11 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-fcm.x: Add check for zero forms of
+ inverse operands.
+ * gcc.target/aarch64/vect-fcm-eq-d.c: Check that new zero form
+ loop is vectorized.
+ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-d.c: Check that new zero form
+ loop is vectorized and that the correct instruction is generated.
+ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
+
+2013-04-11 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56899
+ * gcc.c-torture/execute/pr56899.c: New test.
+
+2013-04-10 David S. Miller <davem@davemloft.net>
+
+ * gcc.target/sparc/setcc-4.c: New test.
+ * gcc.target/sparc/setcc-5.c: New test.
+
+2013-04-10 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/pr55604.C: Use -fdump-rtl-ira.
+
+2013-04-10 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/slp-39.c: New testcase.
+
+2013-04-10 Joern Rennecke <joern.rennecke@embecosm.com>
+
+ PR tree-optimization/55524
+ * gcc.target/epiphany/fnma-1.c: New test.
+
+2013-04-10 Zhouyi Zhou <yizhouzhou@ict.ac.cn>
+
+ * gcc.dg/tree-ssa/inline-11.c: New test
+
+2013-04-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56895
+ * g++.dg/template/arrow3.C: New test.
+
+2013-04-09 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/minmax_minus.c: New test.
+
+2013-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56883
+ * c-c++-common/gomp/pr56883.c: New test.
+
+2013-04-09 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/vrp87.c: New test.
+
+2013-04-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56854
+ * g++.dg/torture/pr56854.C: New test.
+
+2013-04-08 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/56782
+ * gfortran.dg/array_constructor_44.f90: New test.
+
+2013-04-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56871
+ * g++.dg/cpp0x/constexpr-specialization.C: New.
+
+2013-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.c-torture/execute/pr56837.c: New test.
+
+ PR c++/34949
+ PR c++/50243
+ * g++.dg/opt/vt3.C: New test.
+ * g++.dg/opt/vt4.C: New test.
+
+2013-04-08 Jeff Law <law@redhat.com>
+
+ * gcc.dg/tree-ssa/forwprop-25.c: New test.
+
+2013-04-08 Richard Biener <rguenther@suse.de>
+
+ * gfortran.dg/vect/fast-math-mgrid-resid.f: Adjust.
+
+2013-04-08 Richard Biener <rguenther@suse.de>
+
+ * gfortran.dg/vect/fast-math-pr37021.f90: Adjust.
+
+2013-04-08 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr56812.cc: Adjust.
+
+2013-04-08 Jakub Jelinek <jakub@redhat.com>
+
+ * gcc.dg/pr56837.c: New test.
+ * gcc.dg/tree-ssa/ldist-19.c: Don't check for
+ "generated memset minus one".
+
+2013-04-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56849
+ * gfortran.dg/reshape_5.f90: New.
+
+2013-04-05 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR target/56843
+ * gcc.target/powerpc/recip-1.c: Modify expected output.
+ * gcc.target/powerpc/recip-3.c: Likewise.
+ * gcc.target/powerpc/recip-4.c: Likewise.
+ * gcc.target/powerpc/recip-5.c: Add expected output for iterations.
+
+2013-04-05 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/peep-ldrd-1.c: New test.
+ * gcc.target/arm/peep-strd-1.c: Likewise.
+
+2013-04-05 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/negdi-1.c: New test.
+ * gcc.target/arm/negdi-2.c: Likewise.
+ * gcc.target/arm/negdi-3.c: Likewise.
+ * gcc.target/arm/negdi-4.c: Likewise.
+
+2013-04-05 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (add_options_for_arm_v8_neon):
+ Add -march=armv8-a when we use v8 NEON.
+ (check_effective_target_vect_call_btruncf): Remove arm-*-*-*.
+ (check_effective_target_vect_call_ceilf): Likewise.
+ (check_effective_target_vect_call_floorf): Likewise.
+ (check_effective_target_vect_call_roundf): Likewise.
+ (check_vect_support_and_set_flags): Remove check for arm_v8_neon.
+ * gcc.target/arm/vect-rounding-btruncf.c: New testcase.
+ * gcc.target/arm/vect-rounding-ceilf.c: Likewise.
+ * gcc.target/arm/vect-rounding-floorf.c: Likewise.
+ * gcc.target/arm/vect-rounding-roundf.c: Likewise.
+
+2013-04-05 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.target/powerpc/sd-vsx.c: Skip on AIX.
+ * gcc.target/powerpc/sd-pwr6.c: Same.
+ * gcc.dg/stack-usage-1.c: Define SIZE on AIX.
+ * g++.dg/debug/pr56294.C: XFAIL on AIX.
+
+2013-04-05 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ * g++.dg/cpp0x/ref-qual-multi-neg.C: New test.
+
+2013-04-04 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/40881
+ * gfortran.dg/altreturn_1.f90: Add -std=gnu.
+ * gfortran.dg/altreturn_4.f90: Ditto.
+ * gfortran.dg/altreturn_3.f90: Replace -std=legacy by -std=gnu.
+ * gfortran.dg/altreturn_5.f90: Ditto.
+ * gfortran.dg/altreturn_6.f90: Ditto.
+ * gfortran.dg/altreturn_7.f90: Ditto.
+
+2013-04-04 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * lib/target-supports.exp (check_effective_target_arm_v8_neon_hw):
+ New procedure.
+ (check_effective_target_arm_v8_neon_ok_nocache):
+ Likewise.
+ (check_effective_target_arm_v8_neon_ok): Change to use
+ check_effective_target_arm_v8_neon_ok_nocache.
+ (add_options_for_arm_v8_neon): Use et_arm_v8_neon_flags to set ARMv8
+ NEON flags.
+ (check_effective_target_vect_call_btruncf):
+ Enable for arm and ARMv8 NEON.
+ (check_effective_target_vect_call_ceilf): Likewise.
+ (check_effective_target_vect_call_floorf): Likewise.
+ (check_effective_target_vect_call_roundf): Likewise.
+ (check_vect_support_and_set_flags): Handle ARMv8 NEON effective
+ target.
+
+2013-04-04 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/48186
+ * gcc.dg/pr48186.c: New test.
+
+2013-04-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56826
+ * gcc.dg/vect/pr56826.c: New testcase.
+ * gcc.dg/vect/O3-pr36098.c: Adjust.
+
+2013-04-04 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/inc/asm-adder-clobber-lr.c: Remove duplication.
+ * gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-1.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-2.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-3.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-4.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-5.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-6.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-7.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-8.c: Likewise.
+
+2013-04-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56213
+ * gcc.dg/vect/vect-123.c: New testcase.
+
+2013-04-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56810
+ * gfortran.dg/read_repeat_2.f90: New.
+
+2013-04-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56837
+ * g++.dg/torture/pr56837.C: New testcase.
+
+2013-04-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/50269
+ * gfortran.dg/c_loc_test_21.f90: New.
+ * gfortran.dg/c_loc_test_19.f90: Update dg-error.
+ * gfortran.dg/c_loc_tests_10.f03: Update dg-error.
+ * gfortran.dg/c_loc_tests_11.f03: Update dg-error.
+ * gfortran.dg/c_loc_tests_4.f03: Update dg-error.
+ * gfortran.dg/c_loc_tests_16.f90: Update dg-error.
+
+2013-04-03 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/56799
+ * gcc.c-torture/execute/pr56799.c: New test.
+
+2013-04-03 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56815
+ * g++.dg/warn/Wpointer-arith-1.C: New.
+ * g++.dg/gomp/for-19.C: Adjust.
+
+2013-04-03 Marek Polacek <polacek@redhat.com>
+
+ PR sanitizer/55702
+ * gcc.dg/pr55702.c: New test.
+
+2013-04-03 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/56809
+ * gcc.dg/pr56809.c: New testcase.
+
+2013-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/56819
+ * g++.dg/debug/pr56819.C: New test.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56817
+ * g++.dg/torture/pr56817.C: New testcase.
+
+2013-04-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.dg/vect/bb-slp-31.c: New file.
+
+2013-04-03 Jason Merrill <jason@redhat.com>
+
+ PR c++/34949
+ * g++.dg/tree-ssa/ehcleanup-1.C: Adjust unreachable count.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ * g++.dg/vect/slp-pr56812.cc: Use dg-additional-options.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55964
+ * gcc.dg/torture/pr55964-2.c: New testcase.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56501
+ * gcc.dg/torture/pr56501.c: New testcase.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56407
+ * gcc.dg/torture/pr56407.c: New testcase.
+
+2013-04-03 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/56790
+ * g++.dg/ext/pr56790-1.C: New testcase.
+
+2013-04-03 Marc Glisse <marc.glisse@inria.fr>
+
+ * gcc.target/i386/merge-1.c: New testcase.
+ * gcc.target/i386/avx2-vpblendd128-1.c: Make it non-trivial.
+
+2013-04-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/19449
+ * gcc.c-torture/execute/pr19449.c: New test.
+
+2013-04-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56812
+ * g++.dg/vect/slp-pr56812.cc: New testcase.
+
+2013-04-03 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56284
+ PR fortran/40881
+ * gfortran.dg/altreturn_8.f90: New.
+ * gfortran.dg/altreturn_2.f90: Add -std=legacy.
+ * gfortran.dg/intrinsic_actual_3.f90: Ditto.
+ * gfortran.dg/invalid_interface_assignment.f90: Ditto.
+
+2013-04-02 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56745
+ * gcc.c-torture/compile/pr56745.c: New test.
+
+2013-04-02 Pitchumani Sivanupandi <pitchumani.s@atmel.com>
+
+ * gcc.dg/tree-ssa/sra-13.c: Fix for 16 bit int.
+
+2013-04-02 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56778
+ * gcc.dg/torture/pr56778.c: New testcase.
+
+2013-04-02 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56768
+ * g++.dg/torture/pr56768.C: New testcase.
+
+2013-04-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * obj-c++.dg/try-catch-13.mm: Update per PR56725.
+
+2013-04-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/56660
+ * gfortran.dg/namelist_82.f90: New test.
+
+2013-04-01 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56500
+ * gfortran.dg/implicit_class_1.f90: New.
+
+2013-03-31 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/56786
+ * gfortran.dg/namelist_81.f90: New test.
+
+2013-03-30 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ * gfortran.dg/character_comparison_3.f90: Adjust for use of memcmp
+ for constant and equal string lengths.
+ * gfortran.dg/character_comparison_5.f90: Likewise.
+ * gfortran.dg/character_comparison_9.f90: New test.
+
+2013-03-27 Kirill Yukhin <kirill.yukhin@intel.com>
+
+ * gcc.target/i386/avx2-vbroadcastsi128-1.c: Fix intrinsic name.
+ * gcc.target/i386/avx2-vbroadcastsi128-1.c: Ditto.
+
+2013-03-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/35203
+ * gfortran.dg/optional_absent_3.f90: New.
+
+2013-03-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56737
+ * gfortran.dg/fmt_cache_3.f90: New.
+
+2013-03-29 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56735
+ * gfortran.dg/namelist_80.f90: New.
+
+2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/45159
+ * gfortran.dg/string_length_2.f90: New test.
+ * gfortran.dg/dependency_41.f90: New test.
+
+2013-03-28 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55806
+ * gfortran.dg/array_constructor_43.f90: New test.
+ * gfortran.dg/random_seed_3.f90: New test.
+
+2013-03-28 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/inc/asm-adder-clobber-lr.c: New test.
+ * gcc.target/aarch64/inc/asm-adder-no-clobber-lr.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-1.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-2.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-3.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-4.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-5.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-6.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-7.c: Likewise.
+ * gcc.target/aarch64/test-framepointer-8.c: Likewise.
+
+2013-03-28 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56725
+ * g++.dg/conversion/op4.C: Adjust.
+ * g++.dg/cpp0x/rv1n.C: Likewise.
+ * g++.dg/cpp0x/rv2n.C: Likewise.
+ * g++.dg/cpp0x/template_deduction.C: Likewise.
+ * g++.dg/expr/cond8.C: Likewise.
+ * g++.dg/other/error4.C: Likewise.
+ * g++.old-deja/g++.bugs/900514_03.C: Likewise.
+ * g++.old-deja/g++.bugs/900519_02.C: Likewise.
+ * g++.old-deja/g++.bugs/900519_03.C: Likewise.
+ * g++.old-deja/g++.bugs/900520_02.C: Likewise.
+ * g++.old-deja/g++.jason/conversion2.C: Likewise.
+ * g++.old-deja/g++.law/cvt20.C: Likewise.
+ * g++.old-deja/g++.law/cvt8.C: Likewise.
+ * g++.old-deja/g++.law/init8.C: Likewise.
+ * g++.old-deja/g++.mike/net12.C: Likewise.
+ * g++.old-deja/g++.mike/net8.C: Likewise.
+ * g++.old-deja/g++.mike/p2793.C: Likewise.
+ * g++.old-deja/g++.mike/p3836.C: Likewise.
+ * g++.old-deja/g++.mike/p418.C: Likewise.
+ * g++.old-deja/g++.mike/p701.C: Likewise.
+ * g++.old-deja/g++.mike/p807.C: Likewise.
+
+2013-03-28 Tejas Belagod <tejas.belagod@arm.com>
+
+ PR middle-end/56694
+ * g++.dg/torture/pr56694.C: Fix test case to build on bare-metal
+ targets.
+
+2013-03-28 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56695
+ * gcc.dg/vect/pr56695.c: New test.
+
+2013-03-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/37021
+ * gcc.dg/vect/fast-math-slp-38.c: New testcase.
+ * gcc.dg/vect/O3-pr36098.c: Un-XFAIL.
+
+2013-03-27 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56650
+ PR fortran/36437
+ * gfortran.dg/sizeof_2.f90: New.
+ * gfortran.dg/sizeof_3.f90: New.
+ * gfortran.dg/sizeof_proc.f90: Update dg-error.
+
+2013-03-27 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/37021
+ * gfortran.dg/vect/fast-math-pr37021.f90: New testcase.
+
+2013-03-27 Alexander Ivchenko <alexander.ivchenko@intel.com>
+
+ * g++.dg/ipa/ivinline-1.C: Add target nonpic.
+ * g++.dg/ipa/ivinline-2.C: Likewise.
+ * g++.dg/ipa/ivinline-3.C: Likewise.
+ * g++.dg/ipa/ivinline-4.C: Likewise.
+ * g++.dg/ipa/ivinline-5.C: Likewise.
+ * g++.dg/ipa/ivinline-7.C: Likewise.
+ * g++.dg/ipa/ivinline-8.C: Likewise.
+ * g++.dg/ipa/ivinline-9.C: Likewise.
+ * g++.dg/cpp0x/noexcept03.C: Likewise.
+ * gcc.dg/const-1.c: Likewise.
+ * gcc.dg/ipa/pure-const-1.c: Likewise.
+ * gcc.dg/noreturn-8.c: Likewise.
+ * gcc.target/i386/mmx-1.c: Likewise.
+ * gcc.dg/tree-ssa/ipa-split-5.c: Likewise.
+ * gcc.dg/tree-ssa/loadpre6.c: Likewise.
+ * gcc.c-torture/execute/pr33992.x: New file.
+
+2013-03-26 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.c-torture/execute/20011008-3.c: Cap VLEN with STACK_SIZE too.
+
+2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55951
+ * g++.dg/ext/desig5.C: New.
+
+2013-03-26 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56649
+ * gfortran.dg/merge_init_expr_2.f90: New.
+ * gfortran.dg/merge_char_1.f90: Modify test to
+ stay a run-time test.
+ * gfortran.dg/merge_char_3.f90: Ditto.
+
+2013-03-26 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/constexpr-friend-2.C: New.
+ * g++.dg/cpp0x/constexpr-main.C: Likewise.
+
+2013-03-25 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56722
+ * g++.dg/cpp0x/range-for23.C: New.
+
+2013-03-25 Tilo Schwarz <tilo@tilo-schwarz.de>
+
+ PR libfortran/52512
+ * gfortran.dg/namelist_79.f90: New.
+
+2013-03-25 Martin Jambor <mjambor@suse.cz>
+
+ * gcc.dg/ipa/ipcp-agg-9.c: New test.
+
+2013-03-25 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/38536
+ PR fortran/38813
+ PR fortran/38894
+ PR fortran/39288
+ PR fortran/40963
+ PR fortran/45824
+ PR fortran/47023
+ PR fortran/47034
+ PR fortran/49023
+ PR fortran/50269
+ PR fortran/50612
+ PR fortran/52426
+ PR fortran/54263
+ PR fortran/55343
+ PR fortran/55444
+ PR fortran/55574
+ PR fortran/56079
+ PR fortran/56378
+ * gfortran.dg/c_assoc_2.f03: Update dg-error wording.
+ * gfortran.dg/c_f_pointer_shape_test.f90: Ditto.
+ * gfortran.dg/c_f_pointer_shape_tests_3.f03: Ditto.
+ * gfortran.dg/c_f_pointer_tests_5.f90: Ditto.
+ * gfortran.dg/c_funloc_tests_2.f03: Ditto.
+ * gfortran.dg/c_funloc_tests_5.f03: Ditto.
+ * gfortran.dg/c_funloc_tests_6.f90: Ditto.
+ * gfortran.dg/c_loc_tests_10.f03: Add -std=f2008.
+ * gfortran.dg/c_loc_tests_11.f03: Ditto, update dg-error.
+ * gfortran.dg/c_loc_tests_16.f90: Ditto.
+ * gfortran.dg/c_loc_tests_4.f03: Ditto.
+ * gfortran.dg/c_loc_tests_15.f90: Update dg-error wording.
+ * gfortran.dg/c_loc_tests_3.f03: Valid since F2003 TC5.
+ * gfortran.dg/c_loc_tests_8.f03: Ditto.
+ * gfortran.dg/c_ptr_tests_14.f90: Update scan-tree-dump-times.
+ * gfortran.dg/c_ptr_tests_15.f90: Ditto.
+ * gfortran.dg/c_sizeof_1.f90: Fix invalid code.
+ * gfortran.dg/iso_c_binding_init_expr.f03: Update dg-error wording.
+ * gfortran.dg/pr32601_1.f03: Ditto.
+ * gfortran.dg/storage_size_2.f08: Remove dg-error.
+ * gfortran.dg/blockdata_7.f90: New.
+ * gfortran.dg/c_assoc_4.f90: New.
+ * gfortran.dg/c_f_pointer_tests_6.f90: New.
+ * gfortran.dg/c_f_pointer_tests_7.f90: New.
+ * gfortran.dg/c_funloc_tests_8.f90: New.
+ * gfortran.dg/c_loc_test_17.f90: New.
+ * gfortran.dg/c_loc_test_18.f90: New.
+ * gfortran.dg/c_loc_test_19.f90: New.
+ * gfortran.dg/c_loc_test_20.f90: New.
+ * gfortran.dg/c_sizeof_5.f90: New.
+ * gfortran.dg/iso_c_binding_rename_3.f90: New.
+ * gfortran.dg/transfer_resolve_2.f90: New.
+ * gfortran.dg/transfer_resolve_3.f90: New.
+ * gfortran.dg/transfer_resolve_4.f90: New.
+ * gfortran.dg/pr32601.f03: Update dg-error.
+ * gfortran.dg/c_ptr_tests_13.f03: Update dg-error.
+ * gfortran.dg/c_ptr_tests_9.f03: Fix test case.
+
+2013-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/arm/vseleqdf.c: New test.
+ * gcc.target/arm/vseleqsf.c: Likewise.
+ * gcc.target/arm/vselgedf.c: Likewise.
+ * gcc.target/arm/vselgesf.c: Likewise.
+ * gcc.target/arm/vselgtdf.c: Likewise.
+ * gcc.target/arm/vselgtsf.c: Likewise.
+ * gcc.target/arm/vselledf.c: Likewise.
+ * gcc.target/arm/vsellesf.c: Likewise.
+ * gcc.target/arm/vselltdf.c: Likewise.
+ * gcc.target/arm/vselltsf.c: Likewise.
+ * gcc.target/arm/vselnedf.c: Likewise.
+ * gcc.target/arm/vselnesf.c: Likewise.
+ * gcc.target/arm/vselvcdf.c: Likewise.
+ * gcc.target/arm/vselvcsf.c: Likewise.
+ * gcc.target/arm/vselvsdf.c: Likewise.
+ * gcc.target/arm/vselvssf.c: Likewise.
+
+2013-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ * gcc.target/aarch64/atomic-comp-swap-release-acquire.c: Move test
+ body from here...
+ * gcc.target/aarch64/atomic-comp-swap-release-acquire.x: ... to here.
+ * gcc.target/aarch64/atomic-op-acq_rel.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-acq_rel.x: ... to here.
+ * gcc.target/aarch64/atomic-op-acquire.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-acquire.x: ... to here.
+ * gcc.target/aarch64/atomic-op-char.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-char.x: ... to here.
+ * gcc.target/aarch64/atomic-op-consume.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-consume.x: ... to here.
+ * gcc.target/aarch64/atomic-op-int.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-int.x: ... to here.
+ * gcc.target/aarch64/atomic-op-relaxed.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-relaxed.x: ... to here.
+ * gcc.target/aarch64/atomic-op-release.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-release.x: ... to here.
+ * gcc.target/aarch64/atomic-op-seq_cst.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-seq_cst.x: ... to here.
+ * gcc.target/aarch64/atomic-op-short.c: Move test body from here...
+ * gcc.target/aarch64/atomic-op-short.x: ... to here.
+ * gcc.target/arm/atomic-comp-swap-release-acquire.c: New test.
+ * gcc.target/arm/atomic-op-acq_rel.c: Likewise.
+ * gcc.target/arm/atomic-op-acquire.c: Likewise.
+ * gcc.target/arm/atomic-op-char.c: Likewise.
+ * gcc.target/arm/atomic-op-consume.c: Likewise.
+ * gcc.target/arm/atomic-op-int.c: Likewise.
+ * gcc.target/arm/atomic-op-relaxed.c: Likewise.
+ * gcc.target/arm/atomic-op-release.c: Likewise.
+ * gcc.target/arm/atomic-op-seq_cst.c: Likewise.
+ * gcc.target/arm/atomic-op-short.c: Likewise.
+
+2013-03-25 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56694
+ * g++.dg/torture/pr56694.C: New testcase.
+
+2013-03-25 Kyrylo Tkachov <kyrylo.tkachov@arm.com>
+
+ PR target/56720
+ * gcc.target/arm/neon-vcond-gt.c: New test.
+ * gcc.target/arm/neon-vcond-ltgt.c: Likewise.
+ * gcc.target/arm/neon-vcond-unordered.c: Likewise.
+
+2013-03-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56689
+ * gcc.dg/torture/pr56689.c: New testcase.
+
+2013-03-25 Kai Tietz <ktietz@redhat.com>
+
+ * g++.dg/torture/20121105-1.C: Adjust for LLP64 targets.
+
+2013-03-24 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56696
+ * gfortran.dg/eof_5.f90: New.
+
+2013-03-23 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * gcc.c-torture/execute/builtins/builtins.exp: Sort targets
+ alphabetically.
+
+2013-03-22 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/pr22152.c (dg-options): Add -mtune=core2.
+
+2013-03-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ PR testsuite/55994
+ * gcc.c-torture/execute/builtins/builtins.exp: Add
+ -Wl,--allow-multiple-definition for RTEMS targets.
+
+2013-03-22 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/movk.c: New test.
+
+2013-03-21 Marc Glisse <marc.glisse@inria.fr>
+
+ * g++.dg/ext/vector21.C: New testcase.
+
+2013-03-21 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * gcc.target/arm/neon-for-64bits-1.c: New tests.
+ * gcc.target/arm/neon-for-64bits-2.c: Likewise.
+
+2013-03-21 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/vect/vect-outer-3a-big-array.c: Adjust.
+ * gcc.dg/vect/vect-outer-3a.c: Likewise.
+
+2013-03-21 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.target/aarch64/vect.c: Test and result vector added
+ for sabd and saba instructions.
+ * gcc.target/aarch64/vect-compile.c: Check for sabd and saba
+ instructions in assembly.
+ * gcc.target/aarch64/vect.x: Add sabd and saba test functions.
+ * gcc.target/aarch64/vect-fp.c: Test and result vector added
+ for fabd instruction.
+ * gcc.target/aarch64/vect-fp-compile.c: Check for fabd
+ instruction in assembly.
+ * gcc.target/aarch64/vect-fp.x: Add fabd test function.
+
+2013-03-20 Jeff Law <law@redhat.com>
+
+ * g++.dg/tree-ssa/ssa-dom.C: New test.
+
+2013-03-20 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ * gcc.target/powerpc/mmfpgpr.c: New test.
+ * gcc.target/powerpc/sd-vsx.c: Likewise.
+ * gcc.target/powerpc/sd-pwr6.c: Likewise.
+ * gcc.target/powerpc/vsx-float0.c: Likewise.
+
+2013-03-20 Marc Glisse <marc.glisse@inria.fr>
+
+ PR tree-optimization/56355
+ * gcc.dg/pr56355-1.c: New file.
+
+2013-03-20 Catherine Moore <clm@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Add microMIPS support.
+ * gcc.target/mips/umips-movep-2.c: New test.
+ * gcc.target/mips/umips-lwp-2.c: New test.
+ * gcc.target/mips/umips-swp-5.c: New test.
+ * gcc.target/mips/umips-constraints-1.c: New test.
+ * gcc.target/mips/umips-lwp-3.c: New test.
+ * gcc.target/mips/umips-swp-6.c: New test.
+ * gcc.target/mips/umips-constraints-2.c: New test.
+ * gcc.target/mips/umips-save-restore-1.c: New test.
+ * gcc.target/mips/umips-lwp-4.c: New test.
+ * gcc.target/mips/umips-swp-7.c: New test.
+ * gcc.target/mips/umips-save-restore-2.c: New test.
+ * gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+ * gcc.target/mips/umips-lwp-5.c: New test.
+ * gcc.target/mips/umips-save-restore-3.c: New test.
+ * gcc.target/mips/umips-lwp-6.c: New test.
+ * gcc.target/mips/umips-swp-1.c: New test.
+ * gcc.target/mips/umips-lwp-7.c: New test.
+ * gcc.target/mips/umips-swp-2.c: New test.
+ * gcc.target/mips/umips-lwp-8.c: New test.
+ * gcc.target/mips/umips-swp-3.c: New test.
+ * gcc.target/mips/umips-movep-1.c: New test.
+ * gcc.target/mips/umips-lwp-1.c: New test.
+ * gcc.target/mips/umips-swp-4.c: New test.
+
+2013-03-20 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56661
+ * gcc.dg/torture/pr56661.c: New testcase.
+
+2013-03-20 Bill Schmidt <wschmidt@linux.vnet.ibm.com>
+
+ PR rtl-optimization/56605
+ * gcc.target/powerpc/pr56605.c: New.
+
+2013-03-20 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR fortran/54932
+ * gfortran.dg/do_1.f90: Don't xfail.
+
+2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de>
+
+ PR libfortran/51825
+ * gfortran.dg/namelist_77.f90: New.
+ * gfortran.dg/namelist_78.f90: New.
+
+2013-03-20 Tilo Schwarz <tilo@tilo-schwarz.de>
+
+ PR libfortran/48618
+ * gfortran.dg/open_negative_unit_1.f90: New.
+
+2013-03-19 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/sbc.c: New test.
+
+2013-03-19 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/ror.c: New test.
+
+2013-03-19 Ian Bolton <ian.bolton@arm.com>
+
+ * gcc.target/aarch64/extr.c: New test.
+
+2013-03-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ * gcc.dg/tree-ssa/vrp47.c: Adjust.
+ * c-c++-common/uninit-17.c: Likewise.
+
+2013-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56635
+ * g++.dg/torture/pr56635.C: New test.
+
+2013-03-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/3713
+ * g++.dg/ipa/devirt-12.C: New testcase.
+
+2013-03-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/56566
+ * c-c++-common/pr56566.c: New test.
+
+2013-03-17 Jason Merrill <jason@redhat.com>
+
+ * g++.dg/template/abstract-dr337.C: XFAIL.
+
+2013-03-16 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56607
+ * g++.dg/warn/Wdiv-by-zero-2.C: New test.
+ * c-c++-common/pr56607.c: New test.
+
+2013-03-16 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56582
+ * g++.dg/cpp0x/constexpr-array5.C: New.
+
+2013-03-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56615
+ * gfortran.dg/transfer_intrinsic_5.f90: New.
+
+2013-03-15 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.target/i386/movti.c: Don't test for x64 mingw.
+ * gcc.target/i386/pr20020-1.c: Likewise.
+ * gcc.target/i386/pr20020-2.c: Likewise.
+ * gcc.target/i386/pr20020-3.c: Likewise.
+ * gcc.target/i386/pr53425-1.c: Likewise.
+ * gcc.target/i386/pr53425-2.c: Likewise.
+ * gcc.target/i386/pr55093.c: Likewise.
+ * gcc.target/i386/pr53907.c: Adjust test for LLP64 targets.
+
+2013-03-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/56307
+ * gcc.dg/tree-ssa/pr55579.c: Add -fvar-tracking-assignments to
+ dg-options. Remove 32-bit hppa*-*-hpux* xfail.
+
+2013-03-14 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/53265
+ * gcc.dg/graphite/scop-3.c (toto): Increase array size to avoid
+ undefined behavior.
+ * gcc.dg/graphite/id-6.c (test): Likewise.
+ * gcc.dg/graphite/pr35356-2.c: Adjust regexp patterns to only look for
+ MIN_EXPR and MAX_EXPR in GIMPLE stmts.
+
+ PR tree-optimization/53265
+ * gcc.dg/pr53265.c: New test.
+ * gcc.dg/torture/pr49518.c: Add -Wno-aggressive-loop-optimizations
+ to dg-options.
+ * g++.dg/opt/longbranch2.C (EBCOTLut): Double sizes of a2 and a3
+ arrays.
+ * gcc.dg/tree-ssa/cunroll-10.c (main): Rename to foo. Add argument
+ n, use it as high bound instead of 4.
+
+2013-03-13 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/49880
+ * gcc.target/sh/pr49880-1.c: New.
+ * gcc.target/sh/pr49880-2.c: New.
+ * gcc.target/sh/pr49880-3.c: New.
+ * gcc.target/sh/pr49880-4.c: New.
+ * gcc.target/sh/pr49880-5.c: New.
+
+2013-03-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ * g++.dg/cpp0x/alias-decl-32.C: Remove redundant bits.
+
+2013-03-13 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56608
+ * gcc.dg/vect/fast-math-bb-slp-call-3.c: New testcase.
+
+2013-03-13 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56611
+ * g++.dg/cpp0x/alias-decl-32.C: New.
+
+2013-03-11 Jan Hubicka <jh@suse.cz>
+
+ PR middle-end/56571
+ * gcc.c-torture/compile/pr56571.c: New testcase.
+
+2013-03-11 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.dg/tree-ssa/vector-4.c: Add comment regarding xfail.
+ * gcc.dg/tree-ssa/pr55579.c: Likewise.
+
+2013-03-11 Dominique d'Humieres <dominiq@lps.ens.fr>
+
+ * gcc.dg/inline_3.c: Remove target and dg-excess-errors.
+ * gcc.dg/inline_4.c: Likewise.
+ * gcc.dg/unroll_2.c: Likewise.
+ * gcc.dg/unroll_3.c: Likewise.
+ * gcc.dg/unroll_4.c: Likewise.
+
+2013-03-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR testsuite/54119
+ * gcc.dg/tree-ssa/vector-4.c: xfail on 32-bit hppa*-*-*.
+
+ PR debug/56307
+ * gcc.dg/tree-ssa/pr55579.c: xfail 32-bit hppa*-*-hpux*.
+
+2013-03-11 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/40797
+ * gcc.c-torture/compile/pr40797.c: New.
+
+2013-03-10 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.dg/pr44194-1.c: Skip compilation on hppa*64*-*-*.
+
+2013-03-10 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/56575
+ * gfortran.dg/class_56.f90: New test.
+
+2013-03-09 Richard Sandiford <rdsandiford@googlemail.com>
+
+ PR middle-end/56524
+ * gcc.target/mips/pr56524.c: New test.
+
+2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56565
+ * g++.dg/cpp0x/lambda/lambda-nsdmi2.C: New.
+
+2013-03-08 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51412
+ * g++.dg/cpp0x/lambda/lambda-err3.C: New.
+
+2013-03-08 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56478
+ * gcc.dg/torture/pr56478.c: New test.
+
+2013-03-08 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.c-torture/execute/builtins/builtins.exp: Add for mingw
+ targets linker option --allow-multiple-definition.
+
+ * gcc.dg/pr14092-1.c: Mark intptr_t typedef to use extension.
+ * gcc.dg/pr24683.c: Avoid warning about casting constant string.
+ * gcc.dg/pr52549.c: Add LLP64 case.
+ * gcc.dg/pr53701.c: Use for uintptr_t typedef __UINTPTR_TYPE__.
+ * gcc.dg/pr56510.c: Adjust for LLP64 targets.
+ * gcc.dg/torture/pr51071-2.c: Likewise.
+ * gcc.dg/tree-ssa/vrp72.c: Likewise.
+ * gcc.dg/tree-ssa/vrp73.c: Likewise.
+ * gcc.dg/tree-ssa/vrp75.c: Likewise.
+ * gcc.dg/torture/pr53922.c: Skip test for mingw-targets.
+ * gcc.dg/weak/weak-1.c: Likewise.
+ * gcc.dg/weak/weak-2.c: Likewise.
+ * gcc.dg/weak/weak-3.c: Likewise.
+ * gcc.dg/weak/weak-4.c: Likewise.
+ * gcc.dg/weak/weak-5.c: Likewise.
+ * gcc.dg/weak/weak-15.c: Likewise.
+ * gcc.dg/weak/weak-16.c: Likewise.
+
+ * c-c++-common/pr54486.c: Skip test for mingw-targets.
+
+2013-03-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56559
+ * gcc.dg/tree-ssa/reassoc-26.c: New test.
+
+2013-03-07 Andreas Schwab <schwab@suse.de>
+
+ * gcc.dg/pr31490.c: Fix last change.
+
+2013-03-06 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56534
+ * g++.dg/template/crash115.C: New.
+
+2013-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56539
+ * gcc.c-torture/compile/pr56539.c: New test.
+
+2013-03-06 Kai Tietz <ktietz@redhat.com>
+
+ * gcc.dg/lto/20090914-2_0.c: Skip for mingw and cygwin
+ targets.
+ * gcc.dg/lto/20091013-1_1.c: Set x64-mingw as xfail.
+ * gcc.dg/lto/20091013-1_2.c: Likewise.
+ * gcc.dg/pr31490.c: Adjust for LLP64 targets.
+
+2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/specs/aggr6.ads: New test.
+
+2013-03-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/loop_optimization15.ad[sb]: New test.
+
+2013-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56548
+ * gcc.dg/pr56548.c: New test.
+
+2013-03-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR debug/53363
+ * g++.dg/debug/dwarf2/thunk1.C: Skip on darwin.
+
+2013-03-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56543
+ * g++.dg/template/typename20.C: New test.
+
+2013-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/56510
+ * gcc.dg/pr56510.c: New test.
+
+ PR rtl-optimization/56484
+ * gcc.c-torture/compile/pr56484.c: New test.
+
+2013-03-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56530
+ * g++.dg/warn/Wsign-conversion-2.C: New.
+
+2013-03-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56270
+ * gcc.dg/vect/slp-38.c: New testcase.
+
+2013-03-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56494
+ * gcc.dg/pr56494.c: New test.
+
+2013-01-04 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gcc.dg/pr56424.c: New test.
+
+2013-03-04 Georg-Johann Lay <avr@gjlay.de>
+
+ * gcc.dg/pr55153.c: Add dg-require-effective-target scheduling.
+ * gcc.dg/pr56228.c <avr>: Skip.
+
+2013-03-04 Georg-Johann Lay <avr@gjlay.de>
+
+ PR testsuite/52641
+ PR tree-optimization/52631
+ * gcc.dg/tree-ssa/pr52631.c: Fix 16-bit int.
+
+2013-03-03 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/vect/vect-82_64.c: Skip on AIX.
+ * gcc.dg/vect/vect-83_64.c: Same.
+
+2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/56477
+ * gfortran.dg/pointer_check_13.f90: New test.
+
+2013-03-03 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54730
+ * gfortran.dg/array_constructor_42.f90: New test.
+
+2013-03-02 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/52688
+ * g++.dg/template/static33.C: New.
+ * g++.dg/template/static34.C: Likewise.
+
+ PR c++/10291
+ * g++.dg/template/static35.C: New.
+
+2013-03-01 Steve Ellcey <sellcey@mips.com>
+
+ * gcc.dg/pr56396.c: Require pic support.
+
+2013-03-01 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55481
+ * gcc.dg/torture/pr56488.c: New testcase.
+
+2013-02-28 Konstantin Serebryany <konstantin.s.serebryany@gmail.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/56454
+ * g++.dg/asan/default-options-1.C (__asan_default_options): Use
+ no_sanitize_address attribute rather than no_address_safety_analysis.
+ * g++.dg/asan/sanitizer_test_utils.h
+ (ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS): Likewise.
+ * c-c++-common/asan/attrib-1.c: Test no_sanitize_address attribute
+ in addition to no_address_safety_analysis.
+
+2013-02-28 Jason Merrill <jason@redhat.com>
+
+ PR c++/56481
+ * g++.dg/cpp0x/constexpr-and.C: New.
+
+2013-02-28 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/56294
+ * g++.dg/debug/pr56294.C: New test.
+
+2013-02-28 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
+ * g++.old-deja/g++.pt/ptrmem6.C(main): Add xfail aarch64*-*-*.
+
+2013-02-27 Marek Polacek <polacek@redhat.com>
+
+ PR rtl-optimization/56466
+ * gcc.dg/pr56466.c: New test.
+
+2013-02-28 Naveen H.S <Naveen.Hurugalawadi@caviumnetworks.com>
+
+ * gcc.dg/tree-ssa/slsr-1.c: Allow widening multiplications.
+ * gcc.dg/tree-ssa/slsr-2.c: Likewise.
+ * gcc.dg/tree-ssa/slsr-3.c: Likewise.
+
+2013-02-27 Andrey Belevantsev <abel@ispras.ru>
+
+ PR middle-end/45472
+ * gcc.dg/pr45472.c: New test.
+
+2013-02-26 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56426
+ * gcc.dg/pr56436.c: New test.
+
+2013-02-26 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56448
+ * gcc.c-torture/compile/pr56448.c: New test.
+
+ PR tree-optimization/56443
+ * gcc.dg/torture/pr56443.c: New test.
+
+2013-02-25 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56175
+ * gcc.dg/tree-ssa/forwprop-24.c: New testcase.
+
+2013-02-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56403
+ * g++.dg/torture/pr56403.C: New test.
+
+2013-02-25 Catherine Moore <clm@codesourcery.com>
+
+ Revert:
+ 2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Add microMIPS support.
+ * gcc.target/mips/umips-movep-2.c: New test.
+ * gcc.target/mips/umips-lwp-2.c: New test.
+ * gcc.target/mips/umips-swp-5.c: New test.
+ * gcc.target/mips/umips-constraints-1.c: New test.
+ * gcc.target/mips/umips-lwp-3.c: New test.
+ * gcc.target/mips/umips-swp-6.c: New test.
+ * gcc.target/mips/umips-constraints-2.c: New test.
+ * gcc.target/mips/umips-save-restore-1.c: New test.
+ * gcc.target/mips/umips-lwp-4.c: New test.
+ * gcc.target/mips/umips-swp-7.c: New test.
+ * gcc.target/mips/umips-save-restore-2.c: New test.
+ * gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+ * gcc.target/mips/umips-lwp-5.c: New test.
+ * gcc.target/mips/umips-save-restore-3.c: New test.
+ * gcc.target/mips/umips-lwp-6.c: New test.
+ * gcc.target/mips/umips-swp-1.c: New test.
+ * gcc.target/mips/umips-lwp-7.c: New test.
+ * gcc.target/mips/umips-swp-2.c: New test.
+ * gcc.target/mips/umips-lwp-8.c: New test.
+ * gcc.target/mips/umips-swp-3.c: New test.
+ * gcc.target/mips/umips-movep-1.c: New test.
+ * gcc.target/mips/umips-lwp-1.c: New test.
+ * gcc.target/mips/umips-swp-4.c: New test.
+
+2013-02-24 Catherine Moore <clm@codesourcery.com>
+ Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/mips.exp: Add microMIPS support.
+ * gcc.target/mips/umips-movep-2.c: New test.
+ * gcc.target/mips/umips-lwp-2.c: New test.
+ * gcc.target/mips/umips-swp-5.c: New test.
+ * gcc.target/mips/umips-constraints-1.c: New test.
+ * gcc.target/mips/umips-lwp-3.c: New test.
+ * gcc.target/mips/umips-swp-6.c: New test.
+ * gcc.target/mips/umips-constraints-2.c: New test.
+ * gcc.target/mips/umips-save-restore-1.c: New test.
+ * gcc.target/mips/umips-lwp-4.c: New test.
+ * gcc.target/mips/umips-swp-7.c: New test.
+ * gcc.target/mips/umips-save-restore-2.c: New test.
+ * gcc.target/mips/umips-lwp-swp-volatile.c: New test.
+ * gcc.target/mips/umips-lwp-5.c: New test.
+ * gcc.target/mips/umips-save-restore-3.c: New test.
+ * gcc.target/mips/umips-lwp-6.c: New test.
+ * gcc.target/mips/umips-swp-1.c: New test.
+ * gcc.target/mips/umips-lwp-7.c: New test.
+ * gcc.target/mips/umips-swp-2.c: New test.
+ * gcc.target/mips/umips-lwp-8.c: New test.
+ * gcc.target/mips/umips-swp-3.c: New test.
+ * gcc.target/mips/umips-movep-1.c: New test.
+ * gcc.target/mips/umips-lwp-1.c: New test.
+ * gcc.target/mips/umips-swp-4.c: New test.
+
+2013-02-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/56393
+ * lib/asan-dg.exp (asan_link_flags): Add
+ -B${gccpath}/libsanitizer/asan/ to flags.
+
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56420
+ * gcc.dg/torture/pr56420.c: New test.
+
+2013-02-20 Aldy Hernandez <aldyh@redhat.com>
+
+ PR middle-end/56108
+ * gcc.dg/tm/memopt-1.c: Declare functions transaction_safe.
+
+2013-02-21 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/56310
+ * g++.dg/ipa/pr56310.C: New test.
+
+2013-02-21 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56385
+ * gfortran.dg/proc_ptr_comp_37.f90: New.
+
+2013-02-21 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56415
+ Revert
+ 2013-02-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ * g++.dg/warn/Warray-bounds-6.C: New testcase.
+ * gcc.dg/tree-ssa/pr21559.c: Adjust.
+ * gcc.dg/tree-ssa/vrp17.c: Likewise.
+ * gcc.dg/tree-ssa/vrp18.c: Likewise.
+ * gcc.dg/tree-ssa/vrp23.c: Likewise.
+ * gcc.dg/tree-ssa/vrp24.c: Likewise.
+
+2013-02-21 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56398
+ * g++.dg/torture/pr56398.C: New test.
+
+2013-02-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR inline-asm/56405
+ * gcc.c-torture/compile/pr56405.c: New test.
+
+2013-02-20 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/56265
+ * g++.dg/ipa/devirt-11.C: New testcase.
+
+2013-02-20 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/tree-ssa/forwprop-8.c: Adjust.
+
+2013-02-20 Richard Biener <rguenther@suse.de>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56396
+ * gcc.dg/pr56396.c: New testcase.
+
+2013-02-20 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/56373
+ * g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C: New.
+
+2013-02-19 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56384
+ * gcc.dg/torture/pr56384.c: New testcase.
+
+2013-02-19 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56350
+ * gcc.dg/pr56350.c: New test.
+
+ PR tree-optimization/56381
+ * g++.dg/opt/pr56381.C: New test.
+
+2013-02-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR pch/54117
+ * lib/dg-pch.exp (pch-init, pch-finish,
+ check_effective_target_pch_supported_debug): New procs.
+ (dg-flags-pch): If $pch_unsupported, make tests UNSUPPORTED.
+ Likewise if $pch_unsupported_debug and $flags include -g.
+ Skip FAILs about missing *.gch file if $pch_unsupported_debug
+ and dg-require-effective-target pch_unsupported_debug.
+ * g++.dg/pch/pch.exp: Call pch-init and pch-finish.
+ * objc.dg/pch/pch.exp: Likewise.
+ * gcc.dg/pch/pch.exp: Likewise.
+ * gcc.dg/pch/valid-1.c: Add dg-require-effective-target
+ pch_unsupported_debug.
+ * gcc.dg/pch/valid-1.hs: Likewise.
+ * gcc.dg/pch/valid-1b.c: Likewise.
+ * gcc.dg/pch/valid-1b.hs: Likewise.
+
+2013-02-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56366
+ * gcc.dg/torture/pr56366.c: New testcase.
+
+2013-02-18 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56349
+ * gcc.dg/torture/pr56349.c: New testcase.
+
+2013-02-18 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56321
+ * gcc.dg/torture/pr56321.c: New testcase.
+
+2013-02-16 Edgar E. Iglesias <edgar.iglesias@gmail.com>
+
+ * gcc.dg/20020312-2.c: Define MicroBlaze PIC register
+
+2013-02-16 Jakub Jelinek <jakub@redhat.com>
+ Dodji Seketeli <dodji@redhat.com>
+
+ PR asan/56330
+ * c-c++-common/asan/no-redundant-instrumentation-4.c: New test file.
+ * c-c++-common/asan/no-redundant-instrumentation-5.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-6.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-7.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-8.c: Likewise.
+ * c-c++-common/asan/pr56330.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-1.c (test1):
+ Ensure the size argument of __builtin_memcpy is a constant.
+
+2013-02-15 Jonathan Wakely <jwakely.gcc@gmail.com>
+ Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/51242
+ * g++.dg/cpp0x/enum23.C: New.
+
+2013-02-15 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/54685
+ * gcc.target/sh/pr54685.c: Fix scanning of not insn.
+
+2013-02-15 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56348
+ * gcc.target/i386/pr56348.c: New test.
+
+2013-02-15 Greta Yorsh <Greta.Yorsh@arm.com>
+
+ * gcc.target/arm/interrupt-1.c: Fix for thumb mode.
+ * gcc.target/arm/interrupt-2.c: Likewise.
+
+2013-02-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56318
+ * gfortran.dg/matmul_9.f90: New.
+
+2013-02-15 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/53818
+ * gfortran.dg/init_flag_11.f90: New.
+
+2013-02-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/debug/dwarf2/pr53948.c: Allow for more whitespace.
+
+2013-02-14 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * gcc.dg/debug/dwarf2/pr53948.c: Allow for / and ! as comment
+ characters.
+
+2013-02-14 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR testsuite/56138
+ * gfortran.dg/allocatable_function_7.f90: New.
+
+2013-02-14 Jakub Jelinek <jakub@redhat.com>
+
+ * g++.dg/asan/dejagnu-gtest.h: Add multiple inclusion guards.
+ * asan_globals_test-wrapper.cc: New file.
+ * g++.dg/asan/asan_test.C: Use asan_globals_test-wrapper.cc
+ instead of asan_globals_test.cc as dg-additional-sources.
+ Include asan_mem_test.cc, asan_str_test.cc and asan_oob_test.cc.
+ * g++.dg/asan/asan_test_utils.h: Synced from upstream. Include
+ "sanitizer_test_utils.h" instead of
+ "sanitizer_common/tests/sanitizer_test_utils.h".
+ * g++.dg/asan/asan_str_test.cc: New file, synced from upstream.
+ * g++.dg/asan/asan_mem_test.cc: New file, synced from upstream.
+ * g++.dg/asan/asan_oob_test.cc: New file, synced from upstream.
+ * g++.dg/asan/asan_globals_test.cc: Synced from upstream.
+ * g++.dg/asan/asan_test.cc: Synced from upstream.
+ * g++.dg/asan/sanitizer_test_utils.h: New file, synced from upstream.
+
+2013-02-14 Dodji Seketeli <dodji@redhat.com>
+
+ Fix an asan crash
+ * c-c++-common/asan/memcmp-2.c: New test.
+
+2013-02-13 Ed Smith-Rowland <3dw4rd@verizon.net>
+
+ PR c++/55582
+ * g++.dg/cpp0x/udlit-string-literal.h: New.
+ * g++.dg/cpp0x/udlit-string-literal.C: New.
+
+2013-02-13 Sriraman Tallam <tmsriram@google.com>
+
+ * g++.dg/ext/mv12-aux.C: Add directives to match mv12.C.
+
+2013-02-13 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/56184
+ * gcc.target/arm/pr56184.C: New test.
+
+2013-02-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56302
+ * g++.dg/torture/pr56302.C: New test.
+ * g++.dg/cpp0x/constexpr-56302.C: New test.
+ * c-c++-common/pr56302.c: New test.
+
+2013-02-13 Tobias Burnus <burnus@net-b.de>
+ Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR fortran/56204
+ * gfortran.dg/quad_2.f90: Use "< epsilon" instead of "==".
+ * gfortran.dg/quad_3.f90: Ditto.
+
+2013-02-13 Kostya Serebryany <kcc@google.com>
+
+ * c-c++-common/asan/strncpy-overflow-1.c: Update the test
+ to match the fresh asan run-time.
+ * c-c++-common/asan/rlimit-mmap-test-1.c: Ditto.
+
+2013-02-12 Dodji Seketeli <dodji@redhat.com>
+
+ Avoid instrumenting duplicated memory access in the same basic block
+ * c-c++-common/asan/no-redundant-instrumentation-1.c: New test.
+ * c-c++-common/asan/no-redundant-instrumentation-2.c: Likewise.
+ * c-c++-common/asan/no-redundant-instrumentation-3.c: Likewise.
+ * c-c++-common/asan/inc.c: Likewise.
+
+2013-02-12 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR inline-asm/56148
+ * gcc.target/i386/pr56148.c: New test.
+
+2013-02-12 Dominique d'Humieres <dominiq@lps.ens.fr>
+ Tobias Burnus <burnus@net-b.de>
+
+ PR testsuite/56082
+ * gfortran.dg/bind_c_bool_1.f90 (sub): Change kind=4
+ to kind=2.
+
+2013-02-12 Richard Biener <rguenther@suse.de>
+
+ PR lto/56297
+ * gcc.dg/lto/pr56297_0.c: New testcase.
+ * gcc.dg/lto/pr56297_0.c: Likewise.
+
+2013-02-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/46952
+ * gfortran.dg/typebound_deferred_1.f90: New.
+
+2013-02-12 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56151
+ * gcc.target/i386/pr56151.c: New test.
+
+2013-02-11 Sriraman Tallam <tmsriram@google.com>
+
+ * g++.dg/ext/mv12.C: New test.
+ * g++.dg/ext/mv12.h: New file.
+ * g++.dg/ext/mv12-aux.C: New file.
+ * g++.dg/ext/mv13.C: New test.
+
+2013-02-11 Sebastian Huber <sebastian.huber@embedded-brains.de>
+
+ * lib/target-supports.exp
+ (check_effective_target_powerpc_eabi_ok): New.
+ * gcc.target/powerpc/ppc-eabi.c: Use require effective target
+ powerpc_eabi_ok.
+ * gcc.target/powerpc/ppc-sdata-1.c: Likewise.
+ * gcc.target/powerpc/spe-small-data-2.c: Likewise. Do not run, compile
+ only.
+ * gcc.target/powerpc/ppc-sdata-2.c: Add powerpc-*-rtems*.
+ * gcc.target/powerpc/pr51623.c: Likewise.
+ * gcc.target/powerpc/ppc-stackalign-1.c: Likewise.
+ * gcc.target/powerpc/ppc-ldstruct.c: Likewise.
+
+2013-02-11 Alexander Potapenko <glider@google.com>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/55617
+ * g++.dg/asan/pr55617.C: Run on all targets.
+
+2013-02-11 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/56275
+ * gcc.dg/pr56275.c: New test.
+
+2013-02-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ * gcc.dg/tree-ssa/vrp17.c: Disable tail-merging.
+
+2013-02-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56264
+ * gcc.dg/torture/pr56264.c: New testcase.
+
+2013-02-11 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56273
+ * g++.dg/warn/Warray-bounds-6.C: New testcase.
+ * gcc.dg/tree-ssa/pr21559.c: Adjust.
+ * gcc.dg/tree-ssa/vrp17.c: Likewise.
+ * gcc.dg/tree-ssa/vrp18.c: Likewise.
+ * gcc.dg/tree-ssa/vrp23.c: Likewise.
+ * gcc.dg/tree-ssa/vrp24.c: Likewise.
+
+2013-02-09 Uros Bizjak <ubizjak@gmail.com>
+
+ * g++.dg/asan/asan_test.C: Compile with -D__NO_INLINE__
+ for *-*-linux-gnu targets.
+ * g++.dg/asan/interception-test-1.c: Ditto.
+ * g++.dg/asan/interception-failure-test-1.C: Ditto.
+ * g++.dg/asan/interception-malloc-test-1.C: Ditto.
+
+2013-02-09 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55362
+ * gfortran.dg/intrinsic_size_4.f90 : New test.
+
+2013-02-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/56256
+ * gcc.target/powerpc/pr56256.c: New test.
+
+2013-02-08 Ian Lance Taylor <iant@google.com>
+
+ * lib/go.exp: Load timeout.exp.
+
+2013-02-08 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56246
+ * gcc.target/i386/pr56246.c: New test.
+
+2013-02-08 Jeff Law <law@redhat.com>
+
+ PR debug/53948
+ * gcc.dg/debug/dwarf2/pr53948.c: New test.
+
+2013-02-08 Michael Meissner <meissner@linux.vnet.ibm.com>
+
+ PR target/56043
+ * gcc.target/powerpc/vsx-mass-1.c: Only run this test on
+ powerpc*-*-linux*.
+
+2013-02-08 Edgar E. Iglesias <edgar.iglesias@gmail.com>
+
+ * 20101011-1.c: Add __MICROBLAZE__ exception to set DO_TEST 0
+
+2013-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56195
+ * gcc.dg/torture/pr56195.c: New test.
+
+2013-02-08 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54107
+ * gfortran.dg/recursive_interface_2.f90: New test.
+
+2013-02-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56250
+ * gcc.c-torture/execute/pr56250.c: New test.
+
+2013-02-08 Georg-Johann Lay <avr@gjlay.de>
+
+ PR tree-optimization/56064
+ * gcc.dg/fixed-point/view-convert-2.c: New test.
+
+2013-02-08 Michael Matz <matz@suse.de>
+
+ PR tree-optimization/52448
+ * gcc.dg/pr52448.c: New test.
+
+2013-02-08 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/56181
+ * gcc.dg/torture/pr56181.c: New testcase.
+
+2013-02-08 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/54222
+ * gcc.target/avr/torture/builtins-4-roundfx.c: New test.
+ * gcc.target/avr/torture/builtins-5-countlsfx.c: New test.
+
+2013-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/56241
+ * g++.dg/parse/crash61.C: New test.
+
+ PR c++/56239
+ * g++.dg/parse/pr56239.C: New test.
+
+ PR c++/56237
+ * g++.dg/abi/mangle61.C: New test.
+
+2013-02-07 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56225
+ * gcc.target/i386/pr56225.c: New test.
+
+2013-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR debug/56154
+ * gcc.dg/guality/pr56154-1.c: New test.
+ * gcc.dg/guality/pr56154-2.c: New test.
+ * gcc.dg/guality/pr56154-3.c: New test.
+ * gcc.dg/guality/pr56154-4.c: New test.
+ * gcc.dg/guality/pr56154-aux.c: New file.
+
+ PR tree-optimization/55789
+ * g++.dg/ipa/inline-3.C: Use cleanup-ipa-dump instead of
+ cleanup-tree-dump.
+ * gcc.dg/tree-ssa/inline-3.c: Add
+ --param max-early-inliner-iterations=2 option.
+
+2013-02-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ PR debug/53363
+ * g++.dg/debug/dwarf2/thunk1.C: Restrict to 32-bit x86.
+ Add -fno-dwarf2-cfi-asm to dg-options.
+ Adapt match count.
+
+2013-02-07 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/56228
+ * gcc.dg/pr56228.c: New test.
+
+2013-02-07 Alan Modra <amodra@gmail.com>
+
+ PR target/54009
+ * gcc.target/powerpc/pr54009.c: New test.
+ PR target/54131
+ * gfortran.dg/pr54131.f: New test.
+
+2013-02-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55789
+ * gfortran.dg/array_constructor_41.f90: New test.
+
+2013-02-06 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55978
+ * gfortran.dg/class_optional_2.f90: Uncomment some cases which work now.
+
+2013-02-06 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56217
+ * g++.dg/gomp/pr56217.C: New test.
+
+2013-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56205
+ * gcc.dg/tree-ssa/stdarg-6.c: New test.
+ * gcc.c-torture/execute/pr56205.c: New test.
+
+2013-02-05 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/53342
+ PR tree-optimization/53185
+ * gcc.dg/vect/pr53185-2.c: New testcase.
+
+2013-02-05 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55789
+ * g++.dg/tree-ssa/inline-1.C: Update max-inliner-iterations.
+ * g++.dg/tree-ssa/inline-2.C: Update max-inliner-iterations.
+ * g++.dg/tree-ssa/inline-3.C: Update max-inliner-iterations.
+ * g++.dg/ipa/inline-1.C: New testcase.
+ * g++.dg/ipa/inline-2.C: New testcase.
+ * g++.dg/ipa/inline-3.C: New testcase.
+
+2013-02-05 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55789
+ * g++.dg/torture/pr55789.C: New testcase.
+
+2013-02-05 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56167
+ * gcc.dg/pr56167.c: New test.
+
+2013-02-04 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR target/55146
+ * gcc.target/sh/pr55146.c: New.
+
+2013-02-04 Oleg Endo <olegendo@gcc.gnu.org>
+
+ PR tree-optimization/54386
+ * gcc.target/sh/pr54386.c: New.
+
+2013-02-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/56008
+ * gfortran.dg/realloc_on _assign_16.f90 : New test.
+
+ PR fortran/47517
+ * gfortran.dg/realloc_on _assign_17.f90 : New test.
+
+2013-02-04 Alexander Potapenko <glider@google.com>
+ Jack Howarth <howarth@bromo.med.uc.edu>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/55617
+ * g++.dg/asan/pr55617.C: New test.
+
+2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54195
+ * gfortran.dg/typebound_operator_19.f90: New test.
+ * gfortran.dg/typebound_assignment_4.f90: New test.
+
+2013-02-04 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54107
+ * gfortran.dg/recursive_interface_1.f90: New test.
+
+2013-02-04 Richard Guenther <rguenther@suse.de>
+
+ PR lto/56168
+ * gcc.dg/lto/pr56168_0.c: New testcase.
+ * gcc.dg/lto/pr56168_1.c: Likewise.
+
+2013-02-02 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/50627
+ PR fortran/56054
+ * gfortran.dg/block_12.f90: New test.
+ * gfortran.dg/module_error_1.f90: New test.
+
+2013-02-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * lib/target-supports.exp (check_effective_target_vect_float)
+ (check_effective_target_vect_no_align): Add mips-sde-elf.
+
+2013-02-01 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/gcc-dg.exp (restore-target-env-var): Avoid using lreverse.
+
+2013-02-01 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/pr56023.c: XFAIL on AIX.
+ * gcc.dg/vect/pr49352.c: Same.
+
+2013-02-01 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/opt26.adb: New test.
+
+2013-01-31 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
+
+ Revert.
+ 2013-01-27 Amol Pise <amolpise15@gmail.com>
+
+ * gcc.target/arm/neon-vfnms-1.c: New test.
+ * gcc.target/arm/neon-vfnma-1.c: New test.
+
+2013-01-31 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56157
+ * gcc.dg/torture/pr56157.c: New testcase.
+
+2013-01-30 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56150
+ * gcc.dg/torture/pr56150.c: New testcase.
+
+2013-01-30 Jakub Jelinek <jakub@redhat.com>
+
+ PR sanitizer/55374
+ * g++.dg/asan/large-func-test-1.C: Allow both _Zna[jm] in addition
+ to _Znw[jm] in the backtrace. Allow _Zna[jm] to be the first frame
+ printed in backtrace.
+ * g++.dg/asan/deep-stack-uaf-1.C: Use malloc instead of operator new
+ to avoid errors about mismatched allocation vs. deallocation.
+
+ PR c++/55742
+ * g++.dg/mv1.C: Moved to...
+ * g++.dg/ext/mv1.C: ... here. Adjust test.
+ * g++.dg/mv2.C: Moved to...
+ * g++.dg/ext/mv2.C: ... here. Adjust test.
+ * g++.dg/mv3.C: Moved to...
+ * g++.dg/ext/mv3.C: ... here.
+ * g++.dg/mv4.C: Moved to...
+ * g++.dg/ext/mv4.C: ... here.
+ * g++.dg/mv5.C: Moved to...
+ * g++.dg/ext/mv5.C: ... here. Adjust test.
+ * g++.dg/mv6.C: Moved to...
+ * g++.dg/ext/mv6.C: ... here. Adjust test.
+ * g++.dg/ext/mv7.C: New test.
+ * g++.dg/ext/mv8.C: New test.
+ * g++.dg/ext/mv9.C: New test.
+ * g++.dg/ext/mv10.C: New test.
+ * g++.dg/ext/mv11.C: New test.
+
+2013-01-30 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/56144
+ * gcc.dg/pr56144.c: New.
+
+2013-01-30 David Edelsohn <dje.gcc@gmail.com>
+
+ * g++.dg/cpp0x/constexpr-53094-2.C: Ignore non-standard ABI
+ message.
+ * g++.dg/cpp0x/constexpr-53094-3.C: Same.
+ * g++.dg/cpp0x/constexpr-55573.C: Same
+
+2013-01-30 Georg-Johann Lay <avr@gjlay.de>
+
+ PR tree-optimization/56064
+ * gcc.dg/fixed-point/view-convert.c: New test.
+
+2013-01-30 Andreas Schwab <schwab@suse.de>
+
+ * lib/target-supports-dg.exp (dg-process-target): Use expr to
+ evaluate the end index in string range.
+
+2013-01-30 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/56138
+ * gfortran.dg/allocatable_function_6.f90: New.
+
+2013-01-29 Janus Weil <janus@gcc.gnu.org>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/54107
+ * gfortran.dg/proc_ptr_comp_36.f90: New.
+
+2013-01-29 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55270
+ * gcc.dg/torture/pr55270.c: New testcase.
+
+2013-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/56117
+ * gcc.dg/pr56117.c: New test.
+
+2013-01-28 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/56034
+ * gcc.dg/torture/pr56034.c: New testcase.
+
+2013-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56125
+ * gcc.dg/pr56125.c: New test.
+
+2013-01-28 Tobias Burnus <burnus@net-b.de>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/53537
+ * gfortran.dg/import2.f90: Adjust undeclared type error messages.
+ * gfortran.dg/import8.f90: Likewise.
+ * gfortran.dg/interface_derived_type_1.f90: Likewise.
+ * gfortran.dg/import10.f90: New test.
+ * gfortran.dg/import11.f90: Likewise
+
+2013-01-28 Jakub Jelinek <jakub@redhat.com>
+
+ PR testsuite/56053
+ * c-c++-common/asan/heap-overflow-1.c: Don't include stdlib.h and
+ string.h. Provide memset, malloc and free prototypes, adjust line
+ numbers in dg-output.
+ * c-c++-common/asan/stack-overflow-1.c: Don't include string.h.
+ Provide memset prototype and adjust line numbers in dg-output.
+ * c-c++-common/asan/global-overflow-1.c: Likewise.
+
+ PR tree-optimization/56094
+ * gcc.dg/pr56094.c: New test.
+
+2013-01-27 Amol Pise <amolpise15@gmail.com>
+
+ * gcc.target/arm/neon-vfnms-1.c: New test.
+ * gcc.target/arm/neon-vfnma-1.c: New test.
+
+2013-01-27 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/56114
+ * gcc.target/i386/pr56114.c: New test.
+
+2013-01-27 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55984
+ * gfortran.dg/associate_14.f90: New test.
+
+ PR fortran/56047
+ * gfortran.dg/associate_13.f90: New test.
+
+2013-01-25 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56098
+ * gcc.dg/pr56098-1.c: New test.
+ * gcc.dg/pr56098-2.c: New test.
+
+2013-01-25 Georg-Johann Lay <avr@gjlay.de>
+
+ PR target/54222
+ * gcc.target/avr/torture/builtins-3-absfx.c: New test.
+
+2013-01-22 Marek Polacek <polacek@redhat.com>
+
+ PR tree-optimization/56035
+ * gcc.dg/pr56035.c: New test.
+
+2013-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gfortran.dg/bind_c_array_params_2.f90: Require -mno-relax-pic-calls
+ for MIPS.
+
+2013-01-24 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.target/mips/octeon-pipe-1.c: Add -ffat-lto-objects
+
+2013-01-24 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/56078
+ * gcc.dg/pr56078.c: New test.
+ * gcc.c-torture/compile/20030305-1.c: Add dg-error lines.
+
+2013-01-24 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55927
+ * g++.dg/ipa/devirt-10.C: Disable early inlining.
+
+2013-01-24 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.target/i386/movsd.c: New test.
+
+2013-01-24 Steven Bosscher <steven@gcc.gnu.org>
+
+ PR inline-asm/55934
+ * gcc.target/i386/pr55934.c: New test.
+
+2013-01-23 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/56081
+ * gfortran.dg/select_8.f90: New.
+
+2013-01-23 David Holsgrove <david.holsgrove@xilinx.com>
+
+ * gcc.target/microblaze/microblaze.exp: Remove
+ target_config_cflags check.
+
+2013-01-23 Jakub Jelinek <jakub@redhat.com>
+
+ PR fortran/56052
+ * gfortran.dg/gomp/pr56052.f90: New test.
+
+ PR target/49069
+ * gcc.dg/pr49069.c: New test.
+
+2013-01-22 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55944
+ * g++.dg/cpp0x/constexpr-static10.C: New.
+
+2013-01-22 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/56028
+ * gcc.target/i386/pr56028.c: New test.
+
+2013-01-22 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/55686
+ * gcc.target/i386/pr55686.c: New test.
+
+2013-01-22 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/53609
+ * g++.dg/cpp0x/variadic139.C: New test.
+ * g++.dg/cpp0x/variadic140.C: Likewise.
+ * g++.dg/cpp0x/variadic141.C: Likewise.
+
+2013-01-22 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/warn8.adb: New test.
+
+2013-01-21 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55919
+ * gfortran.dg/include_8.f90: New test.
+
+2013-01-21 Uros Bizjak <ubizjak@gmail.com>
+
+ * gcc.dg/tree-ssa/pr55579.c: Cleanup esra tree dump.
+ * gfortran.dg/unlimited_polymorphic_8.f90: Cleanup original tree dump.
+
+2013-01-21 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56051
+ * gcc.c-torture/execute/pr56051.c: New test.
+
+2013-01-21 Uros Bizjak <ubizjak@gmail.com>
+
+ PR rtl-optimization/56023
+ * gcc.dg/pr56023.c: New test.
+
+2013-01-21 Martin Jambor <mjambor@suse.cz>
+
+ PR middle-end/56022
+ * gcc.target/i386/pr56022.c: New test.
+
+2013-01-21 Jason Merrill <jason@redhat.com>
+
+ * lib/target-supports.exp (check_effective_target_alias): New.
+
+2013-01-20 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR debug/53235
+ * g++.dg/debug/dwarf2/nested-4.C: XFAIL on darwin.
+
+2013-01-20 Hans-Peter Nilsson <hp@axis.com>
+
+ * gfortran.dg/inquire_10.f90: Run only for non-newlib targets.
+
+2013-01-19 Jeff Law <law@redhat.com>
+
+ PR tree-optimization/52631
+ * tree-ssa/pr52631.c: New test.
+ * tree-ssa/ssa-fre-9: Update expected output.
+
+2013-01-19 Anthony Green <green@moxielogic.com>
+
+ * gcc.dg/tree-ssa/asm-2.c (REGISTER): Pick an appropriate register
+ for moxie.
+
+2013-01-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/56029
+ * g++.dg/torture/pr56029.C: New test.
+
+2013-01-18 Sharad Singhai <singhai@google.com>
+
+ PR tree-optimization/55995
+ * gcc.dg/vect/vect.exp: Use "details" flags for dump info.
+
+2013-01-18 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR target/55433
+ * gcc.target/i386/pr55433.c: New.
+
+2013-01-18 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/56015
+ * gfortran.dg/pr56015.f90: New test.
+
+2013-01-18 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/vect/vect-multitypes-12.c: Refactor dg-final directive.
+
+2013-01-18 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-fcm-gt-f.c: Change expected output.
+ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+
+2013-01-17 Jeff Law <law@redhat.com>
+
+ * gcc.dg/pr52573.c: Move to...
+ * gcc.target/m68k/pr52573.c: Here. Eliminate target selector.
+
+ PR rtl-optimization/52573
+ * gcc.dg/pr52573.c: New test.
+
+2013-01-17 Jack Howarth <howarth@bromo.med.uc.edu>
+
+ PR sanitizer/55679
+ * g++.dg/asan/interception-test-1.C: Skip on darwin.
+ * lib/target-supports.exp (check_effective_target_swapcontext): Use
+ check_no_compiler_messages to test support in ucontext.h.
+ (check_effective_target_setrlimit): Return 0 for Darwin's non-posix
+ compliant RLIMIT_AS.
+
+2013-01-17 Marek Polacek <polacek@redhat.com>
+
+ PR rtl-optimization/55833
+ * gcc.dg/pr55833.c: New test.
+
+2013-01-17 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55273
+ * gcc.c-torture/compile/pr55273.c: New testcase.
+
+2013-01-17 Uros Bizjak <ubizjak@gmail.com>
+
+ PR target/55981
+ * gcc.target/pr55981.c: New test.
+
+2013-01-17 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/arm/pr40887.c: Require at least armv5.
+ * gcc.target/arm/pr51835.c: Avoid conflicts with multilib flags.
+ * gcc.target/arm/pr51915.c: Likewise.
+ * gcc.target/arm/pr52006.c: Likewise.
+ * gcc.target/arm/pr53187.c: Likewise.
+
+ * gcc.target/arm/ftest-support.h: Replace for compile-only tests.
+ * gcc.target/arm/ftest-support-arm.h: Delete.
+ * gcc.target/arm/ftest-support-thumb.h: Delete.
+ * gcc.target/arm/ftest-armv4-arm.c: Replace with compile-only test.
+ * gcc.target/arm/ftest-armv4t-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv4t-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv5t-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv5t-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv5te-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv5te-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6k-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6k-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6m-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6t2-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6t2-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv6z-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv6z-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7a-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv7a-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7em-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7m-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv7r-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv7r-thumb.c: Likewise.
+ * gcc.target/arm/ftest-armv8a-arm.c: Likewise.
+ * gcc.target/arm/ftest-armv8a-thumb.c: Likewise.
+
+2013-01-17 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimizations/55264
+ * g++.dg/ipa/pr55264.C: New test.
+
+2013-01-16 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55983
+ * gfortran.dg/class_55.f90: New.
+
+2013-01-16 Janis Johnson <janisjo@codesourcery.com>
+
+ PR testsuite/55994
+ * gcc.c-torture/execute/builtins/builtins.exp: Add
+ -Wl,--allow-multiple-definition for eabi and elf targets.
+
+ PR testsuite/54622
+ * lib/target-supports.exp (check_effective_target_vect_perm_byte,
+ check_effective_target_vect_perm_short,
+ check_effective_target_vect_widen_mult_qi_to_hi_pattern,
+ check_effective_target_vect64): Return 0 for big-endian ARM.
+ (check_effective_target_vect_widen_sum_qi_to_hi): Return 1 for ARM.
+
+ * gcc.target/arm/neon-vld1_dupQ.c: Use types that match function
+ prototypes.
+
+2013-01-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55964
+ * gcc.dg/torture/pr55964.c: New testcase.
+
+2013-01-16 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/54767
+ PR tree-optimization/53465
+ * gfortran.fortran-torture/execute/pr54767.f90: New testcase.
+
+2013-01-16 Christian Bruel <christian.bruel@st.com>
+
+ PR target/55301
+ * gcc.target/sh/sh-switch.c: New testcase.
+
+2013-01-15 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.dg/webizer.c: Increase the array size.
+
+2013-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR target/55940
+ * gcc.dg/pr55940.c: New test.
+
+2013-01-15 Manfred Schwarb <manfred99@gmx.ch>
+ Harald Anlauf <anlauf@gmx.de>
+
+ * gfortran.dg/bounds_check_4.f90: Add dg-options "-fbounds-check".
+ * gfortran.dg/bounds_check_5.f90: Likewise.
+ * gfortran.dg/class_array_10.f03: Fix syntax of dg-directive.
+ * gfortran.dg/continuation_9.f90: Likewise.
+ * gfortran.dg/move_alloc_13.f90: Likewise.
+ * gfortran.dg/structure_constructor_11.f90: Likewise.
+ * gfortran.dg/tab_continuation.f: Likewise.
+ * gfortran.dg/warning-directive-2.F90: Likewise.
+ * gfortran.dg/coarray_lib_token_4.f90: Remove misspelled directive.
+
+2013-01-15 Janis Johnson <janisjo@codesourcery.com>
+
+ * gcc.target/arm/fma.c: Skip for conflicting multilib options.
+ * gcc.target/arm/fma-sp.c: Likewise.
+
+2013-01-15 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55153
+ * gcc.dg/pr55153.c: New.
+
+2013-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55920
+ * gcc.c-torture/compile/pr55920.c: New test.
+
+2013-01-15 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55882
+ * gcc.dg/torture/pr55882.c: New testcase.
+
+2013-01-15 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55955
+ * gcc.c-torture/compile/pr55955.c: New test.
+
+2013-01-15 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/55663
+ * g++.dg/cpp0x/alias-decl-31.C: New test.
+
+2013-01-15 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/54286
+ * gfortran.dg/proc_ptr_result_8.f90 : Add module 'm' to check
+ case where interface is null.
+
+2013-01-14 Thomas Koenig <tkoenig@gcc.gnu.org>
+
+ PR fortran/55806
+ * gfortran.dg/array_constructor_40.f90: New test.
+
+2013-01-14 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/tree-ssa/slsr-8.c: Allow widening multiplications.
+
+2013-01-14 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/aarch64/vect-ld1r-compile-fp.c: New.
+ * gcc.target/aarch64/vect-ld1r-compile.c: New.
+ * gcc.target/aarch64/vect-ld1r-fp.c: New.
+ * gcc.target/aarch64/vect-ld1r.c: New.
+ * gcc.target/aarch64/vect-ld1r.x: New.
+
+2013-01-14 Andi Kleen <ak@linux.intel.com>
+
+ PR target/55948
+ * gcc.target/i386/hle-clear-rel.c: New file
+ * gcc.target/i386/hle-store-rel.c: New file.
+
+2013-01-14 Harald Anlauf <anlauf@gmx.de>
+
+ * gfortran.dg/aint_anint_1.f90: Add dg-do run.
+ * gfortran.dg/bounds_check_4.f90: Likewise.
+ * gfortran.dg/inquire_10.f90: Likewise.
+ * gfortran.dg/minloc_3.f90: Likewise.
+ * gfortran.dg/minlocval_3.f90: Likewise.
+ * gfortran.dg/module_double_reuse.f90: Likewise.
+ * gfortran.dg/mvbits_1.f90: Likewise.
+ * gfortran.dg/oldstyle_1.f90: Likewise.
+ * gfortran.dg/pr20163-2.f: Likewise.
+ * gfortran.dg/save_1.f90: Likewise.
+ * gfortran.dg/scan_1.f90: Likewise.
+ * gfortran.dg/select_char_1.f90: Likewise.
+ * gfortran.dg/shape_4.f90: Likewise.
+ * gfortran.dg/coarray_29_2.f90: Fix dg-do directive.
+ * gfortran.dg/function_optimize_10.f90: Likewise.
+ * gfortran.dg/gomp/appendix-a/a.11.2.f90: Likewise.
+ * gfortran.dg/used_types_17.f90: Likewise.
+ * gfortran.dg/used_types_18.f90: Likewise.
+
+2013-01-13 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/54286
+ * gfortran.dg/proc_ptr_result_8.f90 : New test.
+
+2013-01-13 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/unroll_5.c: Add nomips16 attributes.
+
+2013-01-13 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/tree-ssa/ssa-dom-thread-4.c: Update expected results for MIPS.
+
+2013-01-12 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55072
+ * gfortran.dg/assumed_type_2.f90: Fix test case.
+ * gfortran.dg/internal_pack_13.f90: New test.
+ * gfortran.dg/internal_pack_14.f90: New test.
+
+2013-01-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55868
+ * gfortran.dg/unlimited_polymorphic_8.f90: Update
+ scan-tree-dump-times for foo.0.x._vptr to deal with change from
+ $tar to STAR.
+
+2013-01-11 Andreas Schwab <schwab@linux-m68k.org>
+
+ * gcc.c-torture/compile/pr55921.c: Don't use matching constraints.
+
+2013-01-11 Andreas Krebbel <Andreas.Krebbel@de.ibm.com>
+
+ PR target/55719
+ * gcc.target/s390/pr55719.c: New testcase.
+
+2013-01-11 Richard Guenther <rguenther@suse.de>
+
+ PR tree-optimization/44061
+ * gcc.dg/pr44061.c: New testcase.
+
+2013-01-10 Richard Sandiford <rdsandiford@googlemail.com>
+
+ Update copyright years.
+
+2013-01-10 Aldy Hernandez <aldyh@redhat.com>
+ Jakub Jelinek <jakub@redhat.com>
+
+ PR target/55565
+ * gcc.target/powerpc/ppc-mov-1.c: Update scan-assembler-not regex.
+
+2013-01-10 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55672
+ * gcc.target/i386/pr55672.c: New.
+
+2013-01-10 Jeff Law <law@redhat.com>
+
+ * gcc/dg/tree-ssa/vrp06.c: Tighten expected output. Make each
+ pass/fail message unique.
+
+
+2013-01-10 Jason Merrill <jason@redhat.com>
+
+ * ada/.gitignore: New.
+
+2013-01-10 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/tls/thread_local-cse.C: Don't xfail on *-*-solaris2.9.
+ Add tls options.
+ * g++.dg/tls/thread_local2.C: Likewise.
+ * g++.dg/tls/thread_local2g.C: Likewise.
+ * g++.dg/tls/thread_local6.C: Likewise.
+ * g++.dg/tls/thread_local-order1.C: Add tls options.
+ * g++.dg/tls/thread_local-order2.C: Likewise.
+ * g++.dg/tls/thread_local3.C: Likewise.
+ * g++.dg/tls/thread_local3g.C: Likewise.
+ * g++.dg/tls/thread_local4.C: Likewise.
+ * g++.dg/tls/thread_local4g.C: Likewise.
+ * g++.dg/tls/thread_local5.C: Likewise.
+ * g++.dg/tls/thread_local5g.C: Likewise.
+ * g++.dg/tls/thread_local6g.C: Likewise.
+
+2013-01-10 Kostya Serebryany <kcc@google.com>
+
+ * g++.dg/asan/asan_test.cc: Sync from upstream.
+
+2013-01-10 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55921
+ * gcc.c-torture/compile/pr55921.c: New test.
+
+2013-01-09 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55569
+ * gcc.c-torture/compile/pr55569.c: New testcase.
+
+2013-01-09 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/47203
+ * gfortran.dg/use_28.f90: New test.
+
+2013-01-09 Uros Bizjak <ubizjak@gmail.com>
+
+ * gfortran.dg/intrinsic_size_3.f90: Make scan-tree-dump-times
+ number matching more robust.
+
+2013-01-09 Vladimir Makarov <vmakarov@redhat.com>
+
+ PR rtl-optimization/55829
+ * gcc.target/i386/pr55829.c: New.
+
+2013-01-09 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55758
+ * gfortran.dg/bind_c_bool_1.f90: New.
+ * gfortran.dg/do_5.f90: Add dg-warning.
+
+2013-01-09 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55875
+ * gcc.c-torture/execute/pr55875.c: New testcase.
+ * g++.dg/torture/pr55875.C: New testcase.
+
+2013-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR c/48418
+ * c-c++-common/pr48418.c: New test.
+
+2013-01-09 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55801
+ * g++.dg/tls/thread_local-ice.C: New.
+
+2013-01-09 Andreas Schwab <schwab@suse.de>
+
+ * gcc.dg/guality/pr54693.c: Null-terminate arr.
+
+2013-01-09 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/48189
+ * gcc.dg/pr48189.c: New test.
+
+2013-01-04 Jan Hubicka <jh@suse.cz>
+
+ PR tree-optimization/55823
+ * g++.dg/ipa/devirt-10.C: New testcase.
+
+2013-01-08 Uros Bizjak <ubizjak@gmail.com>
+ Vladimir Yakovlev <vladimir.b.yakovlev@intel.com>
+
+ PR rtl-optimization/55845
+ * gcc.target/i386/pr55845.c: New test.
+
+2013-01-08 Tejas Belagod <tejas.belagod@arm.com>
+
+ * gcc.target/aarch64/vect-mull-compile.c: Explicitly scan for
+ instructions generated instead of number of occurances.
+
+2013-01-08 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vect-fcm-eq-d.c: New.
+ * gcc.target/aarch64/vect-fcm-eq-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-ge-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-d.c: Likewise.
+ * gcc.target/aarch64/vect-fcm-gt-f.c: Likewise.
+ * gcc.target/aarch64/vect-fcm.x: Likewise.
+ * lib/target-supports.exp
+ (check_effective_target_vect_cond): Enable for AArch64.
+
+2013-01-08 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/vsqrt.c (test_square_root_v2sf): Use
+ endian-safe float pool loading.
+ (test_square_root_v4sf): Likewise.
+ (test_square_root_v2df): Likewise.
+ * lib/target-supports.exp
+ (check_effective_target_vect_call_sqrtf): Add AArch64.
+
+2013-01-08 Martin Jambor <mjambor@suse.cz>
+
+ PR debug/55579
+ * gcc.dg/tree-ssa/pr55579.c: New test.
+
+2013-01-08 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
+ * g++.dg/debug/dwarf2/pr54508.C: Allow for more whitespace after
+ asm comments.
+
+2013-01-08 Jakub Jelinek <jakub@redhat.com>
+
+ PR middle-end/55890
+ * gcc.dg/torture/pr55890-3.c: New test.
+
+ PR middle-end/55851
+ * gcc.c-torture/compile/pr55851.c: New test.
+
+ PR sanitizer/55844
+ * c-c++-common/asan/null-deref-1.c: Add -fno-shrink-wrap to
+ dg-options.
+
+2013-01-08 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55618
+ * gfortran.dg/elemental_scalar_args_2.f90: New test.
+
+2013-01-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55763
+ * gfortran.dg/pointer_init_2.f90: Update dg-error.
+ * gfortran.dg/pointer_init_7.f90: New.
+
+2013-01-07 Richard Biener <rguenther@suse.de>
+
+ * gcc.dg/lto/pr55525_0.c (s): Size like char *.
+
+2013-01-07 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55890
+ * gcc.dg/torture/pr55890-1.c: New testcase.
+ * gcc.dg/torture/pr55890-2.c: Likewise.
+
+2013-01-07 James Greenhalgh <james.greenhalgh@arm.com>
+
+ * gcc.target/aarch64/fmovd.c: New.
+ * gcc.target/aarch64/fmovf.c: Likewise.
+ * gcc.target/aarch64/fmovd-zero.c: Likewise.
+ * gcc.target/aarch64/fmovf-zero.c: Likewise.
+ * gcc.target/aarch64/vect-fmovd.c: Likewise.
+ * gcc.target/aarch64/vect-fmovf.c: Likewise.
+ * gcc.target/aarch64/vect-fmovd-zero.c: Likewise.
+ * gcc.target/aarch64/vect-fmovf-zero.c: Likewise.
+
+2013-01-07 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55888
+ PR tree-optimization/55862
+ * gcc.dg/torture/pr55888.c: New testcase.
+
+2013-01-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55852
+ * gfortran.dg/intrinsic_size_3.f90: New.
+
+2013-01-07 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55763
+ * gfortran.dg/select_type_32.f90: New.
+
+2013-01-04 Dodji Seketeli <dodji@redhat.com>
+
+ PR c++/52343
+ * g++.dg/cpp0x/alias-decl-29.C: New test.
+
+2013-01-06 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/53876
+ PR fortran/54990
+ PR fortran/54992
+ * gfortran.dg/class_array_15.f03: New test.
+
+2013-01-06 Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/42769
+ PR fortran/45836
+ PR fortran/45900
+ * gfortran.dg/use_23.f90: New test.
+ * gfortran.dg/use_24.f90: New test.
+ * gfortran.dg/use_25.f90: New test.
+ * gfortran.dg/use_26.f90: New test.
+ * gfortran.dg/use_27.f90: New test.
+
+2013-01-06 Olivier Hainque <hainque@adacore.com>
+
+ * gnat.dg/specs/clause_on_volatile.ads: New test.
+
+2013-01-06 Eric Botcazou <ebotcazou@adacore.com>
+
+ * gnat.dg/alignment10.adb: New test.
+
+2013-01-05 Steven G. Kargl <kargl@gcc.gnu.org>
+ Mikael Morin <mikael@gcc.gnu.org>
+
+ PR fortran/55827
+ * gfortran.dg/use_22.f90: New test.
+
+2013-01-04 Andrew Pinski <apinski@cavium.com>
+
+ * gcc.target/aarch64/cmp-1.c: New testcase.
+
+2013-01-04 Paul Thomas <pault@gcc.gnu.org>
+
+ PR fortran/55172
+ * gfortran.dg/select_type_31.f03: New test.
+
+2013-01-04 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/54526 (again)
+ * g++.dg/cpp0x/parse2.C: Extend.
+ * g++.old-deja/g++.other/crash28.C: Adjust.
+
+2013-01-04 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55862
+ * gcc.dg/torture/pr55862.c: New testcase.
+
+2013-01-04 Martin Jambor <mjambor@suse.cz>
+
+ PR tree-optimization/55755
+ * gcc.dg/torture/pr55755.c: New test.
+ * gcc.dg/tree-ssa/sra-13.c: Likewise.
+ * gcc.dg/tree-ssa/pr45144.c: Update.
+
+2013-01-04 Richard Biener <rguenther@suse.de>
+
+ PR middle-end/55863
+ * gcc.dg/fold-reassoc-2.c: New testcase.
+
+2013-01-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55763
+ * gfortran.dg/null_7.f90: New.
+
+2013-01-04 Tobias Burnus <burnus@net-b.de>
+
+ PR fortran/55854
+ PR fortran/55763
+ * gfortran.dg/unlimited_polymorphic_3.f03: Remove invalid code.
+ * gfortran.dg/unlimited_polymorphic_7.f90: New.
+ * gfortran.dg/unlimited_polymorphic_8.f90: New.
+
+2013-01-03 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/torture/tls/tls-reload-1.c (main): Make testing more thorough.
+
+2013-01-03 Janus Weil <janus@gcc.gnu.org>
+
+ PR fortran/55855
+ * gfortran.dg/assignment_1.f90: Modified.
+ * gfortran.dg/assignment_4.f90: New.
+
+2013-01-03 David Edelsohn <dje.gcc@gmail.com>
+
+ * gcc.dg/torture/tls/tls-reload-1.c: Add tls options.
+
+2013-01-03 Richard Biener <rguenther@suse.de>
+
+ PR tree-optimization/55857
+ * gcc.dg/vect/pr55857-1.c: New testcase.
+ * gcc.dg/vect/pr55857-2.c: Likewise.
+
+2013-01-03 Jakub Jelinek <jakub@redhat.com>
+
+ PR rtl-optimization/55838
+ * gcc.dg/pr55838.c: New test.
+
+ PR tree-optimization/55832
+ * gcc.c-torture/compile/pr55832.c: New test.
+
+2013-01-02 Teresa Johnson <tejohnson@google.com>
+
+ * gcc.dg/tree-ssa/loop-1.c: Update expected dump message.
+ * gcc.dg/tree-ssa/loop-23.c: Ditto.
+ * gcc.dg/tree-ssa/cunroll-1.c: Ditto.
+ * gcc.dg/tree-ssa/cunroll-2.c: Ditto.
+ * gcc.dg/tree-ssa/cunroll-3.c: Ditto.
+ * gcc.dg/tree-ssa/cunroll-4.c: Ditto.
+ * gcc.dg/tree-ssa/cunroll-5.c: Ditto.
+ * gcc.dg/unroll_1.c: Ditto.
+ * gcc.dg/unroll_2.c: Ditto.
+ * gcc.dg/unroll_3.c: Ditto.
+ * gcc.dg/unroll_4.c: Ditto.
+
+2013-01-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ * gcc.dg/pr55430.c: Define MAP_FAILED if not defined.
+
+2013-01-02 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ PR fortran/55818
+ * gfortran.dg/eof_4.f90: New test.
+
+2013-01-02 Jakub Jelinek <jakub@redhat.com>
+
+ * lib/c-compat.exp (compat-use-alt-compiler): Remove
+ -fno-diagnostics-show-caret from TEST_ALWAYS_FLAGS if needed.
+ (compat-use-tst-compiler): Restore TEST_ALWAYS_FLAGS.
+ (compat_setup_dfp): Initialize compat_alt_caret and
+ compat_save_TEST_ALWAYS_FLAGS.
+
+2013-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/torture/tls/tls-reload-1.c: New test.
+
+2013-01-02 Richard Sandiford <rdsandiford@googlemail.com>
+
+ * gcc.dg/torture/fp-int-convert-2.c: New test.
+
+2013-01-01 Jerry DeLisle <jvdelisle@gcc.gnu.org>
+
+ * gfortran.dg/newunit_3.f90: Add dg-do run.
+ * gfortran.dg/inquire_15.f90: Add dg-do run.
+
+2013-01-01 Jakub Jelinek <jakub@redhat.com>
+
+ PR tree-optimization/55831
+ * gcc.dg/pr55831.c: New test.
+
+Copyright (C) 2013 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/gcc/testsuite/ChangeLog.ptr b/gcc/testsuite/ChangeLog.ptr
index 2c9bed875d..e61330fe47 100644
--- a/gcc/testsuite/ChangeLog.ptr
+++ b/gcc/testsuite/ChangeLog.ptr
@@ -58,7 +58,7 @@
have a cast which is PREd.
-Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+Copyright (C) 2006-2007 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/ChangeLog.tree-ssa b/gcc/testsuite/ChangeLog.tree-ssa
index 7d1029c5b7..fa5b2d4501 100644
--- a/gcc/testsuite/ChangeLog.tree-ssa
+++ b/gcc/testsuite/ChangeLog.tree-ssa
@@ -1204,7 +1204,7 @@
* gcc.c-torture/execute/20020819-1.c: Add exit(0).
-Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002-2004 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/README b/gcc/testsuite/README
index 7b41475682..6e137c3bfd 100644
--- a/gcc/testsuite/README
+++ b/gcc/testsuite/README
@@ -61,7 +61,7 @@ where
testsuite directory.
-Copyright (C) 1998, 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+Copyright (C) 1998-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/README.compat b/gcc/testsuite/README.compat
index 7eee66d1c0..df75eff06f 100644
--- a/gcc/testsuite/README.compat
+++ b/gcc/testsuite/README.compat
@@ -85,7 +85,7 @@ Janis Johnson, <janis187@us.ibm.com>
October 2002
-Copyright (C) 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2002-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/README.gcc b/gcc/testsuite/README.gcc
index 998c2d9e50..1d6f4631d9 100644
--- a/gcc/testsuite/README.gcc
+++ b/gcc/testsuite/README.gcc
@@ -80,7 +80,7 @@ For execution tests, put them in execute.
If a test does not fit into the torture framework, use the dg framework.
-Copyright (C) 1997, 1998, 2004 Free Software Foundation, Inc.
+Copyright (C) 1997-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/ada/.gitignore b/gcc/testsuite/ada/.gitignore
new file mode 100644
index 0000000000..a499072f4e
--- /dev/null
+++ b/gcc/testsuite/ada/.gitignore
@@ -0,0 +1,2 @@
+# In the Ada testsuite, .a is an ada source file, not a library.
+!*.a
diff --git a/gcc/testsuite/ada/acats/ada95.lst b/gcc/testsuite/ada/acats/ada95.lst
deleted file mode 100644
index 839d5dfb37..0000000000
--- a/gcc/testsuite/ada/acats/ada95.lst
+++ /dev/null
@@ -1,31 +0,0 @@
-ac3106a
-c34005p
-c34005r
-c34005s
-c34005u
-c34005v
-c34006g
-c34006j
-c34006l
-c34008a
-c3a0014
-c41103b
-c41203b
-c41306a
-c460a01
-c650001
-c74302b
-c74306a
-c85014a
-c85014b
-c85014c
-c87b26b
-c87b41a
-c99004a
-cb40005
-cc3019c
-cc51b03
-cc51d02
-cd10002
-cdd2a03
-cxac005
diff --git a/gcc/testsuite/ada/acats/floatstore.lst b/gcc/testsuite/ada/acats/floatstore.lst
new file mode 100644
index 0000000000..fe1746983e
--- /dev/null
+++ b/gcc/testsuite/ada/acats/floatstore.lst
@@ -0,0 +1 @@
+cxg2021
diff --git a/gcc/testsuite/ada/acats/run_all.sh b/gcc/testsuite/ada/acats/run_all.sh
index c3c104a86b..5ec3e13083 100755
--- a/gcc/testsuite/ada/acats/run_all.sh
+++ b/gcc/testsuite/ada/acats/run_all.sh
@@ -216,7 +216,7 @@ for chapter in $chapters; do
counti=0
for i in `cat $dir/tests/$chapter/${chapter}.lst`; do
counti=`expr $counti + 1`
- extraflags=""
+ extraflags="-gnat95"
grep $i $testdir/overflow.lst > /dev/null 2>&1
if [ $? -eq 0 ]; then
extraflags="$extraflags -gnato"
@@ -225,13 +225,13 @@ for chapter in $chapters; do
if [ $? -eq 0 ]; then
extraflags="$extraflags -gnatE"
fi
- grep $i $testdir/stackcheck.lst > /dev/null 2>&1
+ grep $i $testdir/floatstore.lst > /dev/null 2>&1
if [ $? -eq 0 ]; then
- extraflags="$extraflags -fstack-check"
+ extraflags="$extraflags -ffloat-store"
fi
- grep $i $testdir/ada95.lst > /dev/null 2>&1
+ grep $i $testdir/stackcheck.lst > /dev/null 2>&1
if [ $? -eq 0 ]; then
- extraflags="$extraflags -gnat95"
+ extraflags="$extraflags -fstack-check"
fi
test=$dir/tests/$chapter/$i
mkdir $test && cd $test >> $dir/acats.log 2>&1
diff --git a/gcc/testsuite/ada/acats/tests/cd/cdd1001.a b/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
index 3e16f5d4f9..0641798b15 100644
--- a/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
+++ b/gcc/testsuite/ada/acats/tests/cd/cdd1001.a
@@ -84,7 +84,7 @@ begin
for I in B'Range loop
if B (I).all /= Stream_Element
(Ident_Int (Integer (I)) * Ident_Int (3)) then
- Failed ("Unable to build access values desginating elements " &
+ Failed ("Unable to build access values designating elements " &
"of a Stream_Element_Array");
end if;
end loop;
diff --git a/gcc/testsuite/ada/acats/tests/gcc/template.ada b/gcc/testsuite/ada/acats/tests/gcc/template.ada
deleted file mode 100644
index d1a0945eea..0000000000
--- a/gcc/testsuite/ada/acats/tests/gcc/template.ada
+++ /dev/null
@@ -1,16 +0,0 @@
-with Report; use Report;
-
-procedure Template is
-begin
- -- Test header
- Test ("TEMPLATE", "Template test for GNU Ada test suite");
-
- begin
- -- Body of test
- -- Call procedure Failed when detecting a failure
- Failed ("Pretend this test failed");
- end;
-
- -- Display result
- Result;
-end Template;
diff --git a/gcc/testsuite/c-c++-common/Wfloat-conversion.c b/gcc/testsuite/c-c++-common/Wfloat-conversion.c
new file mode 100644
index 0000000000..e872755902
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wfloat-conversion.c
@@ -0,0 +1,58 @@
+/* Test for diagnostics for Wconversion for floating-point. */
+
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -Wfloat-conversion" { target c } } */
+/* { dg-options "-Wfloat-conversion" { target c++ } } */
+/* { dg-require-effective-target large_double } */
+/* { dg-require-effective-target int32plus } */
+/* { dg-require-effective-target double64plus } */
+#include <limits.h>
+
+float vfloat;
+double vdouble;
+long double vlongdouble;
+int bar;
+
+void fsi (signed int x);
+void fui (unsigned int x);
+void ffloat (float f);
+void fdouble (double d);
+void flongdouble (long double ld);
+
+void h (void)
+{
+ unsigned int ui = 3;
+ int si = 3;
+ unsigned char uc = 3;
+ signed char sc = 3;
+ float f = 0;
+ double d = 0;
+ long double ld = 0;
+
+ ffloat (3.1); /* { dg-warning "conversion to 'float' alters 'double' constant value" } */
+ vfloat = 3.1; /* { dg-warning "conversion to 'float' alters 'double' constant value" } */
+ ffloat (3.1L); /* { dg-warning "conversion to 'float' alters 'long double' constant value" } */
+ vfloat = 3.1L; /* { dg-warning "conversion to 'float' alters 'long double' constant value" } */
+ fdouble (3.1L); /* { dg-warning "conversion to 'double' alters 'long double' constant value" "" { target large_long_double } } */
+ vdouble = 3.1L; /* { dg-warning "conversion to 'double' alters 'long double' constant value" "" { target large_long_double } } */
+ ffloat (vdouble); /* { dg-warning "conversion to 'float' from 'double' may alter its value" } */
+ vfloat = vdouble; /* { dg-warning "conversion to 'float' from 'double' may alter its value" } */
+ ffloat (vlongdouble); /* { dg-warning "conversion to 'float' from 'long double' may alter its value" } */
+ vfloat = vlongdouble; /* { dg-warning "conversion to 'float' from 'long double' may alter its value" } */
+ fdouble (vlongdouble); /* { dg-warning "conversion to 'double' from 'long double' may alter its value" "" { target large_long_double } } */
+ vdouble = vlongdouble; /* { dg-warning "conversion to 'double' from 'long double' may alter its value" "" { target large_long_double } } */
+
+ fsi (3.1f); /* { dg-warning "conversion to 'int' alters 'float' constant value" } */
+ si = 3.1f; /* { dg-warning "conversion to 'int' alters 'float' constant value" } */
+ fsi (3.1); /* { dg-warning "conversion to 'int' alters 'double' constant value" } */
+ si = 3.1; /* { dg-warning "conversion to 'int' alters 'double' constant value" } */
+ fsi (d); /* { dg-warning "conversion to 'int' from 'double' may alter its value" } */
+ si = d; /* { dg-warning "conversion to 'int' from 'double' may alter its value" } */
+ ffloat (INT_MAX); /* { dg-warning "conversion to 'float' alters 'int' constant value" } */
+ vfloat = INT_MAX; /* { dg-warning "conversion to 'float' alters 'int' constant value" } */
+ ffloat (16777217); /* { dg-warning "conversion to 'float' alters 'int' constant value" } */
+ vfloat = 16777217; /* { dg-warning "conversion to 'float' alters 'int' constant value" } */
+
+ sc = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion to 'signed char' alters 'double' constant value" } */
+ uc = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion to 'unsigned char' alters 'double' constant value" } */
+}
diff --git a/gcc/testsuite/c-c++-common/Wpointer-arith-1.c b/gcc/testsuite/c-c++-common/Wpointer-arith-1.c
new file mode 100644
index 0000000000..86668ef1b7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wpointer-arith-1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-Wpedantic -Wno-pointer-arith" } */
+
+void h(void)
+{
+ typedef void (*pft) ();
+ typedef void (ft) ();
+
+ void *pv = 0;
+ pft pf = 0;
+
+ pv++;
+ pf++;
+
+ --pv;
+ --pf;
+
+ pv += 1;
+ pf += 1;
+
+ pv = pv - 1;
+ pf = pf - 1;
+
+ sizeof (void);
+ sizeof (ft);
+}
diff --git a/gcc/testsuite/c-c++-common/Wsequence-point-1.c b/gcc/testsuite/c-c++-common/Wsequence-point-1.c
new file mode 100644
index 0000000000..60dd55bbb0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wsequence-point-1.c
@@ -0,0 +1,17 @@
+/* PR c++/57274 */
+/* { dg-do compile } */
+/* { dg-options "-Wsequence-point" } */
+
+void foo (int, int);
+
+void
+bar (int *x)
+{
+ foo (*x++, sizeof (*x)); /* { dg-bogus "may be undefined" } */
+}
+
+void
+baz (int *x)
+{
+ foo (*x, sizeof (*x++) + sizeof (*x++)); /* { dg-bogus "may be undefined" } */
+}
diff --git a/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c b/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c
new file mode 100644
index 0000000000..2a5f4193b2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess1.c
@@ -0,0 +1,161 @@
+/* Test -Wsizeof-pointer-memaccess warnings. */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern int snprintf (char *, size_t, const char *, ...);
+extern int vsnprintf (char *, size_t, const char *, __builtin_va_list);
+extern void *memchr (const void *, int, size_t);
+#ifdef __cplusplus
+}
+#endif
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+void foo (void **);
+
+void
+f1 (void *x)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ void *arr[100];
+ int i = 0;
+ arr[i++] = memchr (&a, 0, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ arr[i++] = memchr (pa1, 0, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pa2, 0, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pa3, 0, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pa4, 0, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pa1, 0, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pa2, 0, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pa3, 0, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pa4, 0, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ arr[i++] = memchr (&a, 0, sizeof a);
+ arr[i++] = memchr (&a, 0, sizeof (a));
+ arr[i++] = memchr (&a, 0, sizeof (struct A));
+ arr[i++] = memchr (&a, 0, sizeof (const struct A));
+ arr[i++] = memchr (&a, 0, sizeof (volatile struct A));
+ arr[i++] = memchr (&a, 0, sizeof (volatile const struct A));
+ arr[i++] = memchr (&a, 0, sizeof (TA));
+ arr[i++] = memchr (&a, 0, sizeof (__typeof (*&a)));
+ arr[i++] = memchr (pa1, 0, sizeof (*pa1));
+ arr[i++] = memchr (pa2, 0, sizeof (*pa3));
+ arr[i++] = memchr (pa3, 0, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ arr[i++] = memchr ((void *) &a, 0, sizeof (&a));
+ arr[i++] = memchr ((char *) &a, 0, sizeof (&a));
+ arr[i++] = memchr (&a, 0, sizeof (&a) + 0);
+ arr[i++] = memchr (&a, 0, 0 + sizeof (&a));
+
+ foo (arr);
+}
+
+void
+f2 (void *x)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ void *arr[100];
+ int i = 0;
+ arr[i++] = memchr (&b, 0, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ arr[i++] = memchr (pb1, 0, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pb2, 0, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pb3, 0, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pb4, 0, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ arr[i++] = memchr (pb1, 0, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pb2, 0, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pb3, 0, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ arr[i++] = memchr (pb4, 0, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ arr[i++] = memchr (&b, 0, sizeof b);
+ arr[i++] = memchr (&b, 0, sizeof (b));
+ arr[i++] = memchr (&b, 0, sizeof (struct B));
+ arr[i++] = memchr (&b, 0, sizeof (const struct B));
+ arr[i++] = memchr (&b, 0, sizeof (volatile struct B));
+ arr[i++] = memchr (&b, 0, sizeof (volatile const struct B));
+ arr[i++] = memchr (&b, 0, sizeof (TB));
+ arr[i++] = memchr (&b, 0, sizeof (__typeof (*&b)));
+ arr[i++] = memchr (pb1, 0, sizeof (*pb1));
+ arr[i++] = memchr (pb2, 0, sizeof (*pb3));
+ arr[i++] = memchr (pb3, 0, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ arr[i++] = memchr ((void *) &b, 0, sizeof (&b));
+ arr[i++] = memchr ((char *) &b, 0, sizeof (&b));
+ arr[i++] = memchr (&b, 0, sizeof (&b) + 0);
+ arr[i++] = memchr (&b, 0, 0 + sizeof (&b));
+
+ foo (arr);
+}
+
+void
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ void *arr[100];
+ int i = 0;
+ arr[i++] = memchr (y, 0, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ arr[i++] = memchr (y1, 0, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ arr[i++] = memchr (y2, 0, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ arr[i++] = memchr (&c, 0, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ arr[i++] = memchr (w, 0, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ /* These are correct, no warning. */
+ arr[i++] = memchr (y, 0, sizeof (*y));
+ arr[i++] = memchr (y1, 0, sizeof (*y2));
+ arr[i++] = memchr (buf1, 0, sizeof buf1);
+ arr[i++] = memchr (buf3, 0, sizeof (buf3));
+ arr[i++] = memchr (&buf3[0], 0, sizeof (buf3));
+ arr[i++] = memchr (&buf4[0], 0, sizeof (buf4));
+ arr[i++] = memchr (w, 0, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ arr[i++] = memchr ((void *) y, 0, sizeof (y));
+ arr[i++] = memchr ((char *) y1, 0, sizeof (y2));
+ arr[i++] = memchr (y, 0, sizeof (y) + 0);
+ arr[i++] = memchr (y1, 0, 0 + sizeof (y2));
+ arr[i++] = memchr ((void *) &c, 0, sizeof (&c));
+ arr[i++] = memchr ((signed char *) &c, 0, sizeof (&c));
+ arr[i++] = memchr (&c, 0, sizeof (&c) + 0);
+ arr[i++] = memchr (&c, 0, 0 + sizeof (&c));
+
+ foo (arr);
+}
+
+void
+f4 (char x[64], char *y, __builtin_va_list ap)
+{
+ char buf[128], *p = buf;
+ snprintf (x, sizeof (x), "%s", y); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ vsnprintf (x, sizeof (x), "%s", ap); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ snprintf (p, sizeof (p), "%s", y); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ vsnprintf (p, sizeof (p), "%s", ap); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+
+ /* These are correct, no warning. */
+ snprintf (buf, sizeof (buf), "%s", y);
+ vsnprintf (buf, sizeof (buf), "%s", ap);
+ snprintf (p, sizeof (buf), "%s", y);
+ vsnprintf (p, sizeof (buf), "%s", ap);
+}
diff --git a/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c b/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c
new file mode 100644
index 0000000000..73cdf0eaba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wsizeof-pointer-memaccess2.c
@@ -0,0 +1,482 @@
+/* Test -Wsizeof-pointer-memaccess warnings. */
+/* { dg-do compile } */
+/* { dg-options "-Wall -O2" } */
+
+#define bos(ptr) __builtin_object_size (ptr, 1)
+#define bos0(ptr) __builtin_object_size (ptr, 0)
+
+#define memset(dst, val, sz) __builtin___memset_chk (dst, val, sz, bos (dst))
+#define memcpy(dst, src, sz) __builtin___memcpy_chk (dst, src, sz, bos (dst))
+#define memmove(dst, src, sz) __builtin___memmove_chk (dst, src, sz, bos (dst))
+#define strncpy(dst, src, sz) __builtin___strncpy_chk (dst, src, sz, bos (dst))
+#define strncat(dst, src, sz) __builtin___strncat_chk (dst, src, sz, bos (dst))
+#define stpncpy(dst, src, sz) __builtin___stpncpy_chk (dst, src, sz, bos (dst))
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+void
+f1 (void *x)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ memset (&a, 0, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (pa1, 0, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa2, 0, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa3, 0, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa4, 0, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa1, 0, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa2, 0, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa3, 0, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa4, 0, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa4, x, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa4, x, sizeof (__typeof (pa4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa4, sizeof (__typeof (pa4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ memset (&a, 0, sizeof a);
+ memset (&a, 0, sizeof (a));
+ memset (&a, 0, sizeof (struct A));
+ memset (&a, 0, sizeof (const struct A));
+ memset (&a, 0, sizeof (volatile struct A));
+ memset (&a, 0, sizeof (volatile const struct A));
+ memset (&a, 0, sizeof (TA));
+ memset (&a, 0, sizeof (__typeof (*&a)));
+ memset (pa1, 0, sizeof (*pa1));
+ memset (pa2, 0, sizeof (*pa3));
+ memset (pa3, 0, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) &a, 0, sizeof (&a));
+ memset ((char *) &a, 0, sizeof (&a));
+ memset (&a, 0, sizeof (&a) + 0);
+ memset (&a, 0, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memcpy (&a, x, sizeof a);
+ memcpy (&a, x, sizeof (a));
+ memcpy (&a, x, sizeof (struct A));
+ memcpy (&a, x, sizeof (const struct A));
+ memcpy (&a, x, sizeof (volatile struct A));
+ memcpy (&a, x, sizeof (volatile const struct A));
+ memcpy (&a, x, sizeof (TA));
+ memcpy (&a, x, sizeof (__typeof (*&a)));
+ memcpy (pa1, x, sizeof (*pa1));
+ memcpy (pa2, x, sizeof (*pa3));
+ memcpy (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) &a, x, sizeof (&a));
+ memcpy ((char *) &a, x, sizeof (&a));
+ memcpy (&a, x, sizeof (&a) + 0);
+ memcpy (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memcpy (x, &a, sizeof a);
+ memcpy (x, &a, sizeof (a));
+ memcpy (x, &a, sizeof (struct A));
+ memcpy (x, &a, sizeof (const struct A));
+ memcpy (x, &a, sizeof (volatile struct A));
+ memcpy (x, &a, sizeof (volatile const struct A));
+ memcpy (x, &a, sizeof (TA));
+ memcpy (x, &a, sizeof (__typeof (*&a)));
+ memcpy (x, pa1, sizeof (*pa1));
+ memcpy (x, pa2, sizeof (*pa3));
+ memcpy (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) &a, sizeof (&a));
+ memcpy (x, (char *) &a, sizeof (&a));
+ memcpy (x, &a, sizeof (&a) + 0);
+ memcpy (x, &a, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memmove (&a, x, sizeof a);
+ memmove (&a, x, sizeof (a));
+ memmove (&a, x, sizeof (struct A));
+ memmove (&a, x, sizeof (const struct A));
+ memmove (&a, x, sizeof (volatile struct A));
+ memmove (&a, x, sizeof (volatile const struct A));
+ memmove (&a, x, sizeof (TA));
+ memmove (&a, x, sizeof (__typeof (*&a)));
+ memmove (pa1, x, sizeof (*pa1));
+ memmove (pa2, x, sizeof (*pa3));
+ memmove (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) &a, x, sizeof (&a));
+ memmove ((char *) &a, x, sizeof (&a));
+ memmove (&a, x, sizeof (&a) + 0);
+ memmove (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memmove (x, &a, sizeof a);
+ memmove (x, &a, sizeof (a));
+ memmove (x, &a, sizeof (struct A));
+ memmove (x, &a, sizeof (const struct A));
+ memmove (x, &a, sizeof (volatile struct A));
+ memmove (x, &a, sizeof (volatile const struct A));
+ memmove (x, &a, sizeof (TA));
+ memmove (x, &a, sizeof (__typeof (*&a)));
+ memmove (x, pa1, sizeof (*pa1));
+ memmove (x, pa2, sizeof (*pa3));
+ memmove (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) &a, sizeof (&a));
+ memmove (x, (char *) &a, sizeof (&a));
+ memmove (x, &a, sizeof (&a) + 0);
+ memmove (x, &a, 0 + sizeof (&a));
+}
+
+void
+f2 (void *x)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ memset (&b, 0, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (pb1, 0, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb2, 0, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb3, 0, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb4, 0, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb1, 0, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb2, 0, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb3, 0, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb4, 0, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb4, x, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb4, x, sizeof (__typeof (pb4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb4, sizeof (__typeof (pb4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ memset (&b, 0, sizeof b);
+ memset (&b, 0, sizeof (b));
+ memset (&b, 0, sizeof (struct B));
+ memset (&b, 0, sizeof (const struct B));
+ memset (&b, 0, sizeof (volatile struct B));
+ memset (&b, 0, sizeof (volatile const struct B));
+ memset (&b, 0, sizeof (TB));
+ memset (&b, 0, sizeof (__typeof (*&b)));
+ memset (pb1, 0, sizeof (*pb1));
+ memset (pb2, 0, sizeof (*pb3));
+ memset (pb3, 0, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) &b, 0, sizeof (&b));
+ memset ((char *) &b, 0, sizeof (&b));
+ memset (&b, 0, sizeof (&b) + 0);
+ memset (&b, 0, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memcpy (&b, x, sizeof b);
+ memcpy (&b, x, sizeof (b));
+ memcpy (&b, x, sizeof (struct B));
+ memcpy (&b, x, sizeof (const struct B));
+ memcpy (&b, x, sizeof (volatile struct B));
+ memcpy (&b, x, sizeof (volatile const struct B));
+ memcpy (&b, x, sizeof (TB));
+ memcpy (&b, x, sizeof (__typeof (*&b)));
+ memcpy (pb1, x, sizeof (*pb1));
+ memcpy (pb2, x, sizeof (*pb3));
+ memcpy (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) &b, x, sizeof (&b));
+ memcpy ((char *) &b, x, sizeof (&b));
+ memcpy (&b, x, sizeof (&b) + 0);
+ memcpy (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memcpy (x, &b, sizeof b);
+ memcpy (x, &b, sizeof (b));
+ memcpy (x, &b, sizeof (struct B));
+ memcpy (x, &b, sizeof (const struct B));
+ memcpy (x, &b, sizeof (volatile struct B));
+ memcpy (x, &b, sizeof (volatile const struct B));
+ memcpy (x, &b, sizeof (TB));
+ memcpy (x, &b, sizeof (__typeof (*&b)));
+ memcpy (x, pb1, sizeof (*pb1));
+ memcpy (x, pb2, sizeof (*pb3));
+ memcpy (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) &b, sizeof (&b));
+ memcpy (x, (char *) &b, sizeof (&b));
+ memcpy (x, &b, sizeof (&b) + 0);
+ memcpy (x, &b, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memmove (&b, x, sizeof b);
+ memmove (&b, x, sizeof (b));
+ memmove (&b, x, sizeof (struct B));
+ memmove (&b, x, sizeof (const struct B));
+ memmove (&b, x, sizeof (volatile struct B));
+ memmove (&b, x, sizeof (volatile const struct B));
+ memmove (&b, x, sizeof (TB));
+ memmove (&b, x, sizeof (__typeof (*&b)));
+ memmove (pb1, x, sizeof (*pb1));
+ memmove (pb2, x, sizeof (*pb3));
+ memmove (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) &b, x, sizeof (&b));
+ memmove ((char *) &b, x, sizeof (&b));
+ memmove (&b, x, sizeof (&b) + 0);
+ memmove (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memmove (x, &b, sizeof b);
+ memmove (x, &b, sizeof (b));
+ memmove (x, &b, sizeof (struct B));
+ memmove (x, &b, sizeof (const struct B));
+ memmove (x, &b, sizeof (volatile struct B));
+ memmove (x, &b, sizeof (volatile const struct B));
+ memmove (x, &b, sizeof (TB));
+ memmove (x, &b, sizeof (__typeof (*&b)));
+ memmove (x, pb1, sizeof (*pb1));
+ memmove (x, pb2, sizeof (*pb3));
+ memmove (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) &b, sizeof (&b));
+ memmove (x, (char *) &b, sizeof (&b));
+ memmove (x, &b, sizeof (&b) + 0);
+ memmove (x, &b, 0 + sizeof (&b));
+}
+
+void
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ char *y3;
+ memset (y, 0, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (y1, 0, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (y2, 0, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (&c, 0, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (w, 0, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memcpy (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (w, x, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memcpy (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, w, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ memmove (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (w, x, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memmove (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, w, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ /* These are correct, no warning. */
+ memset (y, 0, sizeof (*y));
+ memset (y1, 0, sizeof (*y2));
+ memset (buf1, 0, sizeof buf1);
+ memset (buf3, 0, sizeof (buf3));
+ memset (&buf3[0], 0, sizeof (buf3));
+ memset (&buf4[0], 0, sizeof (buf4));
+ memset (w, 0, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) y, 0, sizeof (y));
+ memset ((char *) y1, 0, sizeof (y2));
+ memset (y, 0, sizeof (y) + 0);
+ memset (y1, 0, 0 + sizeof (y2));
+ memset ((void *) &c, 0, sizeof (&c));
+ memset ((signed char *) &c, 0, sizeof (&c));
+ memset (&c, 0, sizeof (&c) + 0);
+ memset (&c, 0, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memcpy (y, x, sizeof (*y));
+ memcpy (y1, x, sizeof (*y2));
+ memcpy (buf1, x, sizeof buf1);
+ memcpy (buf3, x, sizeof (buf3));
+ memcpy (&buf3[0], x, sizeof (buf3));
+ memcpy (&buf4[0], x, sizeof (buf4));
+ memcpy (&y3, y, sizeof (y3));
+ memcpy ((char *) &y3, y, sizeof (y3));
+ memcpy (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) y, x, sizeof (y));
+ memcpy ((char *) y1, x, sizeof (y2));
+ memcpy (y, x, sizeof (y) + 0);
+ memcpy (y1, x, 0 + sizeof (y2));
+ memcpy ((void *) &c, x, sizeof (&c));
+ memcpy ((signed char *) &c, x, sizeof (&c));
+ memcpy (&c, x, sizeof (&c) + 0);
+ memcpy (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memcpy (x, y, sizeof (*y));
+ memcpy (x, y1, sizeof (*y2));
+ memcpy (x, buf1, sizeof buf1);
+ memcpy (x, buf3, sizeof (buf3));
+ memcpy (x, &buf3[0], sizeof (buf3));
+ memcpy (x, &buf4[0], sizeof (buf4));
+ memcpy (y, &y3, sizeof (y3));
+ memcpy (y, (char *) &y3, sizeof (y3));
+ memcpy (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) y, sizeof (y));
+ memcpy (x, (char *) y1, sizeof (y2));
+ memcpy (x, y, sizeof (y) + 0);
+ memcpy (x, y1, 0 + sizeof (y2));
+ memcpy (x, (void *) &c, sizeof (&c));
+ memcpy (x, (signed char *) &c, sizeof (&c));
+ memcpy (x, &c, sizeof (&c) + 0);
+ memcpy (x, &c, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memmove (y, x, sizeof (*y));
+ memmove (y1, x, sizeof (*y2));
+ memmove (buf1, x, sizeof buf1);
+ memmove (buf3, x, sizeof (buf3));
+ memmove (&buf3[0], x, sizeof (buf3));
+ memmove (&buf4[0], x, sizeof (buf4));
+ memmove (&y3, y, sizeof (y3));
+ memmove ((char *) &y3, y, sizeof (y3));
+ memmove (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) y, x, sizeof (y));
+ memmove ((char *) y1, x, sizeof (y2));
+ memmove (y, x, sizeof (y) + 0);
+ memmove (y1, x, 0 + sizeof (y2));
+ memmove ((void *) &c, x, sizeof (&c));
+ memmove ((signed char *) &c, x, sizeof (&c));
+ memmove (&c, x, sizeof (&c) + 0);
+ memmove (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memmove (x, y, sizeof (*y));
+ memmove (x, y1, sizeof (*y2));
+ memmove (x, buf1, sizeof buf1);
+ memmove (x, buf3, sizeof (buf3));
+ memmove (x, &buf3[0], sizeof (buf3));
+ memmove (x, &buf4[0], sizeof (buf4));
+ memmove (y, &y3, sizeof (y3));
+ memmove (y, (char *) &y3, sizeof (y3));
+ memmove (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) y, sizeof (y));
+ memmove (x, (char *) y1, sizeof (y2));
+ memmove (x, y, sizeof (y) + 0);
+ memmove (x, y1, 0 + sizeof (y2));
+ memmove (x, (void *) &c, sizeof (&c));
+ memmove (x, (signed char *) &c, sizeof (&c));
+ memmove (x, &c, sizeof (&c) + 0);
+ memmove (x, &c, 0 + sizeof (&c));
+}
+
+void
+f4 (char *x, char **y, int z, char w[64])
+{
+ const char *s1 = "foobarbaz";
+ const char *s2 = "abcde12345678";
+ strncpy (x, s1, sizeof (s1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ strncat (x, s2, sizeof (s2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ stpncpy (x, s1, sizeof (s1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+
+ strncpy (w, s1, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ strncat (w, s2, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ stpncpy (w, s1, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+
+ /* These are correct, no warning. */
+ const char s3[] = "foobarbaz";
+ const char s4[] = "abcde12345678";
+ strncpy (x, s3, sizeof (s3));
+ strncat (x, s4, sizeof (s4));
+ stpncpy (x, s3, sizeof (s3));
+}
+
+/* { dg-prune-output "\[\n\r\]*will always overflow\[\n\r\]*" } */
diff --git a/gcc/testsuite/c-c++-common/Wvarargs-2.c b/gcc/testsuite/c-c++-common/Wvarargs-2.c
new file mode 100644
index 0000000000..a2e031f914
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wvarargs-2.c
@@ -0,0 +1,33 @@
+/*
+ { dg-options "-Wno-varargs" }
+ { dg-do compile }
+ */
+
+#include <stdarg.h>
+
+void
+err (int a)
+{
+ va_list vp;
+ va_start (vp, a); // { dg-error "used in function with fixed args" }
+}
+
+void
+foo0 (int a, int b, ...)
+{
+ va_list vp;
+ /* 'a' is not the last argument of the enclosing function, but
+ don't warn because we are ignoring -Wvarargs. */
+ va_start (vp, a);
+ va_end (vp);
+}
+
+void
+foo1 (int a, register int b, ...)
+{
+ va_list vp;
+ /* 'b' is declared with register storage, but don't warn
+ because we are ignoring -Wvarargs. */
+ va_start (vp, b);
+ va_end (vp);
+}
diff --git a/gcc/testsuite/c-c++-common/Wvarargs.c b/gcc/testsuite/c-c++-common/Wvarargs.c
new file mode 100644
index 0000000000..408f427b5c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/Wvarargs.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+
+#include <stdarg.h>
+
+void
+err (int a)
+{
+ va_list vp;
+ va_start (vp, a); // { dg-error "used in function with fixed args" }
+}
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wvarargs"
+
+void
+foo0 (int a, int b, ...)
+{
+ va_list vp;
+ /* 'a' is not the last argument of the enclosing function, but
+ don't warn because we are ignoring -Wvarargs. */
+ va_start (vp, a);
+ va_end (vp);
+}
+
+void
+foo1 (int a, register int b, ...)
+{
+ va_list vp;
+ /* 'b' is declared with register storage, but don't warn
+ because we are ignoring -Wvarargs. */
+ va_start (vp, b);
+ va_end (vp);
+}
+
+#pragma GCC diagnostic pop
+
+void
+foo2 (int a, int b, ...)
+{
+ va_list vp;
+ /* 'a' is not the last argument of the enclosing function, so
+ warn. */
+ va_start (vp, a); /* { dg-warning "second parameter" } */
+ va_end (vp);
+}
+
+void
+foo3 (int a, register int b, ...)
+{
+ va_list vp;
+ /* 'b' is declared with register storage, so warn. */
+ va_start (vp, b); /* { dg-warning "undefined behaviour" } */
+ va_end (vp);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/asan-interface-1.c b/gcc/testsuite/c-c++-common/asan/asan-interface-1.c
new file mode 100644
index 0000000000..8cd80caaa3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/asan-interface-1.c
@@ -0,0 +1,14 @@
+/* Check that interface headers work. */
+
+/* { dg-do run { target { *-*-linux* } } } */
+
+#include <stdbool.h>
+#include <sanitizer/asan_interface.h>
+
+int main() {
+ char tmp;
+ if (__asan_address_is_poisoned((volatile char *)&tmp + 1))
+ return 0;
+ return 1;
+}
+
diff --git a/gcc/testsuite/c-c++-common/asan/attrib-1.c b/gcc/testsuite/c-c++-common/asan/attrib-1.c
new file mode 100644
index 0000000000..a2a7f7c9f9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/attrib-1.c
@@ -0,0 +1,62 @@
+/* PR sanitizer/55435 */
+/* { dg-do compile } */
+
+__attribute__((no_sanitize_address)) int
+f1 (int *p, int *q)
+{
+ *p = 42;
+ return *q;
+}
+
+void f2 (char *);
+void f2 (char *) __attribute__((no_sanitize_address));
+void f2 (char *) __attribute__((no_sanitize_address));
+void f2 (char *);
+
+void
+f2 (char *p)
+{
+ *p = 42;
+}
+
+void f3 (short *);
+__typeof (f3) f3 __attribute__((__no_sanitize_address__));
+
+void
+f3 (short *p)
+{
+ *p = 42;
+}
+
+__attribute__((no_sanitize_address)) int
+f4 (int *p, int *q)
+{
+ *p = 42;
+ return *q;
+}
+
+void f5 (char *);
+void f5 (char *) __attribute__((no_sanitize_address));
+void f5 (char *) __attribute__((no_sanitize_address));
+void f5 (char *);
+
+void
+f5 (char *p)
+{
+ *p = 42;
+}
+
+void f6 (short *);
+__typeof (f6) f6 __attribute__((__no_address_safety_analysis__));
+
+void
+f6 (short *p)
+{
+ *p = 42;
+}
+
+int v __attribute__((no_sanitize_address)); /* { dg-warning "attribute ignored" } */
+int v2 __attribute__((no_address_safety_analysis)); /* { dg-warning "attribute ignored" } */
+
+/* { dg-final { scan-assembler-not "__asan_report_store" } } */
+/* { dg-final { scan-assembler-not "__asan_report_load" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/bitfield-1.c b/gcc/testsuite/c-c++-common/asan/bitfield-1.c
new file mode 100644
index 0000000000..b3f300c648
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/bitfield-1.c
@@ -0,0 +1,25 @@
+/* Check that Asan correctly instruments bitfields with non-round size. */
+
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+struct A
+{
+ char base;
+ int : 4;
+ long x : 7;
+};
+
+int __attribute__ ((noinline, noclone))
+f (void *p) {
+ return ((struct A *)p)->x;
+}
+
+int
+main ()
+{
+ char a = 0;
+ return f (&a);
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
diff --git a/gcc/testsuite/c-c++-common/asan/bitfield-2.c b/gcc/testsuite/c-c++-common/asan/bitfield-2.c
new file mode 100644
index 0000000000..8ab0f8069f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/bitfield-2.c
@@ -0,0 +1,25 @@
+/* Check that Asan correctly instruments bitfields with non-round offset. */
+
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+struct A
+{
+ char base;
+ int : 7;
+ int x : 8;
+};
+
+int __attribute__ ((noinline, noclone))
+f (void *p) {
+ return ((struct A *)p)->x;
+}
+
+int
+main ()
+{
+ char a = 0;
+ return f (&a);
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
diff --git a/gcc/testsuite/c-c++-common/asan/bitfield-3.c b/gcc/testsuite/c-c++-common/asan/bitfield-3.c
new file mode 100644
index 0000000000..c5907786f7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/bitfield-3.c
@@ -0,0 +1,25 @@
+/* Check that Asan correctly instruments bitfields with round offset. */
+
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+struct A
+{
+ char base;
+ int : 8;
+ int x : 8;
+};
+
+int __attribute__ ((noinline, noclone))
+f (void *p) {
+ return ((struct A *)p)->x;
+}
+
+int
+main ()
+{
+ char a = 0;
+ return f (&a);
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
diff --git a/gcc/testsuite/c-c++-common/asan/bitfield-4.c b/gcc/testsuite/c-c++-common/asan/bitfield-4.c
new file mode 100644
index 0000000000..94de9a4376
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/bitfield-4.c
@@ -0,0 +1,25 @@
+/* Check that Asan correctly instruments bitfields with round offset. */
+
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+struct A
+{
+ char base;
+ int : 0;
+ int x : 8;
+};
+
+int __attribute__ ((noinline, noclone))
+f (void *p) {
+ return ((struct A *)p)->x;
+}
+
+int
+main ()
+{
+ char a = 0;
+ return f (&a);
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
diff --git a/gcc/testsuite/c-c++-common/asan/clone-test-1.c b/gcc/testsuite/c-c++-common/asan/clone-test-1.c
new file mode 100644
index 0000000000..fd187aaadd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/clone-test-1.c
@@ -0,0 +1,46 @@
+/* Regression test for:
+ http://code.google.com/p/address-sanitizer/issues/detail?id=37 */
+
+/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-require-effective-target clone } */
+/* { dg-require-effective-target hw } */
+/* { dg-options "-D_GNU_SOURCE" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sched.h>
+#include <sys/syscall.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <unistd.h>
+
+int Child(void *arg) {
+ char x[32] = {0}; /* Stack gets poisoned. */
+ printf("Child: %p\n", x);
+ _exit(1); /* NoReturn, stack will remain unpoisoned unless we do something. */
+}
+
+volatile int zero = 0;
+
+int main(int argc, char **argv) {
+ int i;
+ const int kStackSize = 1 << 20;
+ char child_stack[kStackSize + 1];
+ char *sp = child_stack + kStackSize; /* Stack grows down. */
+ printf("Parent: %p\n", sp);
+ pid_t clone_pid = clone(Child, sp, CLONE_FILES | CLONE_VM, NULL, 0, 0, 0);
+ int status;
+ pid_t wait_result = waitpid(clone_pid, &status, __WCLONE);
+ if (wait_result < 0) {
+ perror("waitpid");
+ return 1;
+ }
+ if (wait_result == clone_pid && WIFEXITED(status)) {
+ /* Make sure the child stack was indeed unpoisoned. */
+ for (i = 0; i < kStackSize; i++)
+ child_stack[i] = i;
+ int ret = child_stack[zero];
+ return ret;
+ }
+ return 1;
+}
diff --git a/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c b/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c
new file mode 100644
index 0000000000..0576155c28
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/force-inline-opt0-1.c
@@ -0,0 +1,16 @@
+/* This test checks that we are no instrumenting a memory access twice
+ (before and after inlining) */
+
+/* { dg-do compile } */
+/* { dg-final { scan-assembler-not "__asan_report_load" } } */
+
+__attribute__((always_inline))
+inline void foo(int *x) {
+ *x = 0;
+}
+
+int main() {
+ int x;
+ foo(&x);
+ return x;
+}
diff --git a/gcc/testsuite/c-c++-common/asan/global-overflow-1.c b/gcc/testsuite/c-c++-common/asan/global-overflow-1.c
new file mode 100644
index 0000000000..66e91479cf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/global-overflow-1.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-memset" } */
+/* { dg-shouldfail "asan" } */
+
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void *memset (void *, int, __SIZE_TYPE__);
+
+volatile int ten = 10;
+
+int main() {
+ static char XXX[10];
+ static char YYY[10];
+ static char ZZZ[10];
+ memset(XXX, 0, 10);
+ memset(YYY, 0, 10);
+ memset(ZZZ, 0, 10);
+ int res = YYY[ten]; /* BOOOM */
+ res += XXX[ten/10] + ZZZ[ten/10];
+ return res;
+}
+
+/* { dg-output "READ of size 1 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*global-overflow-1.c:20|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r).*" } */
+/* { dg-output "0x\[0-9a-f\]+ is located 0 bytes to the right of global variable" } */
+/* { dg-output ".*YYY\[^\n\r]* of size 10\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/heap-overflow-1.c b/gcc/testsuite/c-c++-common/asan/heap-overflow-1.c
new file mode 100644
index 0000000000..996909d3c8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/heap-overflow-1.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-free -fno-builtin-memset" } */
+/* { dg-shouldfail "asan" } */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void *memset (void *, int, __SIZE_TYPE__);
+void *malloc (__SIZE_TYPE__);
+void free (void *);
+
+#ifdef __cplusplus
+}
+#endif
+
+volatile int ten = 10;
+int main(int argc, char **argv) {
+ char *x = (char*)malloc(10);
+ memset(x, 0, 10);
+ int res = x[ten]; /* BOOOM */
+ free(x);
+ return res;
+}
+
+/* { dg-output "READ of size 1 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*heap-overflow-1.c:21|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 0 bytes to the right of 10-byte region\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*heap-overflow-1.c:19|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/inc.c b/gcc/testsuite/c-c++-common/asan/inc.c
new file mode 100644
index 0000000000..36cc3d8d81
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/inc.c
@@ -0,0 +1,21 @@
+/* { dg-options "-fdump-tree-asan0" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+void
+foo(int *a)
+{
+ (*a)++;
+}
+
+int
+main ()
+{
+ int a = 0;
+ foo (&a);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "ASAN_" 1 "asan0" } } */
+/* { dg-final { scan-tree-dump "ASAN_CHECK \\(.*, 4\\);" "asan0" } } */
+/* { dg-final { cleanup-tree-dump "asan0" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c b/gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c
new file mode 100644
index 0000000000..32e32a600c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/instrument-with-calls-1.c
@@ -0,0 +1,10 @@
+/* { dg-do assemble } */
+/* { dg-options "-fno-sanitize=address -fsanitize=kernel-address --param asan-instrumentation-with-call-threshold=0 -save-temps" } */
+
+void f(char *a, int *b) {
+ *b = *a;
+}
+
+/* { dg-final { scan-assembler "__asan_load1" } } */
+/* { dg-final { scan-assembler "__asan_store4" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c b/gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c
new file mode 100644
index 0000000000..1b361e6270
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/instrument-with-calls-2.c
@@ -0,0 +1,16 @@
+/* { dg-do assemble } */
+/* { dg-options "-fno-sanitize=address -fsanitize=kernel-address --param asan-instrumentation-with-call-threshold=1 -save-temps" } */
+
+int x;
+
+void f(int *a, int *b) {
+ *a = 0;
+ asm volatile ("" ::: "memory");
+ x = *b;
+}
+
+/* { dg-final { scan-assembler "__asan_store4" } } */
+/* { dg-final { scan-assembler-not "__asan_report_store4" } } */
+/* { dg-final { scan-assembler "__asan_load4" } } */
+/* { dg-final { scan-assembler-not "__asan_report_load4" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/memcmp-1.c b/gcc/testsuite/c-c++-common/asan/memcmp-1.c
new file mode 100644
index 0000000000..03f32e92a3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/memcmp-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-memcmp" } */
+/* { dg-shouldfail "asan" } */
+
+#include <string.h>
+
+volatile int one = 1;
+
+int
+main ()
+{
+ char a1[] = {one, 2, 3, 4};
+ char a2[] = {1, 2*one, 3, 4};
+ int res = memcmp (a1, a2, 5 + one);
+ return res;
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)memcmp |\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/memcmp-2.c b/gcc/testsuite/c-c++-common/asan/memcmp-2.c
new file mode 100644
index 0000000000..be20cd81ee
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/memcmp-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+int
+foo ()
+{
+ char s0[5] = {0};
+ char s1[5] = {1};
+
+ return __builtin_memcmp (s0, s1, 2);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/misalign-1.c b/gcc/testsuite/c-c++-common/asan/misalign-1.c
new file mode 100644
index 0000000000..0c5b6e0c75
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/misalign-1.c
@@ -0,0 +1,42 @@
+/* { dg-do run { target { ilp32 || lp64 } } } */
+/* { dg-options "-O2" } */
+/* { dg-shouldfail "asan" } */
+
+struct S { int i; } __attribute__ ((packed));
+
+__attribute__((noinline, noclone)) int
+foo (struct S *s)
+{
+ return s->i;
+}
+
+__attribute__((noinline, noclone)) int
+bar (int *s)
+{
+ return *s;
+}
+
+__attribute__((noinline, noclone)) struct S
+baz (struct S *s)
+{
+ return *s;
+}
+
+int
+main ()
+{
+ struct T { char a[3]; struct S b[3]; char c; } t;
+ int v = 5;
+ struct S *p = t.b;
+ asm volatile ("" : "+rm" (p));
+ p += 3;
+ if (bar (&v) != 5) __builtin_abort ();
+ volatile int w = foo (p);
+ return 0;
+}
+
+/* { dg-output "ERROR: AddressSanitizer:\[^\n\r]*on address\[^\n\r]*" } */
+/* { dg-output "0x\[0-9a-f\]+ at pc 0x\[0-9a-f\]+ bp 0x\[0-9a-f\]+ sp 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*READ of size 4 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*foo(\[^\n\r]*misalign-1.c:10|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*misalign-1.c:34|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/misalign-2.c b/gcc/testsuite/c-c++-common/asan/misalign-2.c
new file mode 100644
index 0000000000..7fbe299cc5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/misalign-2.c
@@ -0,0 +1,42 @@
+/* { dg-do run { target { ilp32 || lp64 } } } */
+/* { dg-options "-O2" } */
+/* { dg-shouldfail "asan" } */
+
+struct S { int i; } __attribute__ ((packed));
+
+__attribute__((noinline, noclone)) int
+foo (struct S *s)
+{
+ return s->i;
+}
+
+__attribute__((noinline, noclone)) int
+bar (int *s)
+{
+ return *s;
+}
+
+__attribute__((noinline, noclone)) struct S
+baz (struct S *s)
+{
+ return *s;
+}
+
+int
+main ()
+{
+ struct T { char a[3]; struct S b[3]; char c; } t;
+ int v = 5;
+ struct S *p = t.b;
+ asm volatile ("" : "+rm" (p));
+ p += 3;
+ if (bar (&v) != 5) __builtin_abort ();
+ volatile struct S w = baz (p);
+ return 0;
+}
+
+/* { dg-output "ERROR: AddressSanitizer:\[^\n\r]*on address\[^\n\r]*" } */
+/* { dg-output "0x\[0-9a-f\]+ at pc 0x\[0-9a-f\]+ bp 0x\[0-9a-f\]+ sp 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*READ of size 4 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*baz(\[^\n\r]*misalign-2.c:22|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*misalign-2.c:34|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-asan-globals.c b/gcc/testsuite/c-c++-common/asan/no-asan-globals.c
new file mode 100644
index 0000000000..70a1f95a3a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-asan-globals.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "-save-temps --param asan-globals=0" } */
+
+volatile int ten = 10;
+
+int main() {
+ volatile static char XXX[10];
+ XXX[ten];
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "__asan_register_globals" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-asan-stack.c b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c
new file mode 100644
index 0000000000..0f65ab3f7a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-asan-stack.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && lp64 } } } */
+/* { dg-options "--param asan-stack=0" } */
+#include <string.h>
+
+volatile int one = 1;
+
+int
+main ()
+{
+ volatile char a1[] = {one, 2, 3, 4};
+ volatile char a2[] = {1, 2*one, 3, 4};
+ volatile int res = memcmp ((void *)a1,(void *)a2, 5 + one);
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "0x41b58ab3|0x41B58AB3|1102416563" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-instrument-reads.c b/gcc/testsuite/c-c++-common/asan/no-instrument-reads.c
new file mode 100644
index 0000000000..df75878de2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-instrument-reads.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "--param asan-instrument-reads=0 -save-temps" } */
+
+volatile int ten = 10;
+
+int main() {
+ volatile char x[10];
+ x[ten];
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "__asan_load" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-instrument-writes.c b/gcc/testsuite/c-c++-common/asan/no-instrument-writes.c
new file mode 100644
index 0000000000..c1500b9fb3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-instrument-writes.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "--param asan-instrument-writes=0 -save-temps" } */
+
+volatile int ten = 10;
+
+int main() {
+ volatile char x[10];
+ x[ten] = 1;
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "__asan_store" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c
new file mode 100644
index 0000000000..028f8d7152
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-1.c
@@ -0,0 +1,68 @@
+/* This tests that when faced with two references to the same memory
+ location in the same basic block, the second reference should not
+ be instrumented by the Address Sanitizer. */
+
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+extern char tab[4];
+
+static int
+test0 ()
+{
+ /* __builtin___asan_report_store1 called 2 times for the two stores
+ below. */
+ tab[0] = 1;
+ tab[1] = 2;
+
+ /* This load should not be instrumented because it is to the same
+ memory location as above. */
+ char t0 = tab[1];
+
+ /* Likewise. */
+ char t1 = tab[1];
+
+ return t0 + t1;
+}
+
+__attribute__((noinline, noclone)) static int
+test1 (int i)
+{
+ char foo[4] = {};
+
+ /*__builtin___asan_report_store1 called 1 time here to instrument
+ the initialization. */
+ foo[i] = 1;
+
+ /*__builtin___asan_report_store_n called once here to instrument
+ the store to the memory region of tab. */
+ __builtin_memset (tab, 3, sizeof (tab));
+
+ /* There is no instrumentation for the two memset calls below. */
+ __builtin_memset (tab, 4, sizeof (tab));
+ __builtin_memset (tab, 5, sizeof (tab));
+
+ /* There is a call to __builtin___asan_report_store_n and a call
+ to __builtin___asan_report_load_n to instrument the store to
+ (subset of) the memory region of tab. */
+ __builtin_memcpy (&tab[1], foo + i, 3);
+
+ /* This should not generate a __builtin___asan_report_load1 because
+ the reference to tab[1] has been already instrumented above. */
+ return tab[1];
+
+ /* So for these functions, there should be 3 calls to
+ __builtin___asan_report_store1. */
+}
+
+int
+main ()
+{
+ return test0 () && test1 (0);
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store1" 3 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 2 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c
new file mode 100644
index 0000000000..a58411c3af
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-2.c
@@ -0,0 +1,26 @@
+/* This tests that when faced with two references to the same memory
+ location in the same basic block, the second reference should not
+ be instrumented by the Address Sanitizer. But in case of access to
+ overlapping regions we must be precise. */
+
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+int
+main ()
+{
+ char tab[5];
+
+ /* Here, we instrument the access at offset 0 and access at offset
+ 4. */
+ __builtin_memset (tab, 1, sizeof (tab));
+ /* We instrumented access at offset 0 above already, so only access
+ at offset 3 is instrumented. */
+ __builtin_memset (tab, 1, 3);
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 3 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 2 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report" 2 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c
new file mode 100644
index 0000000000..5193ae06f4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-3.c
@@ -0,0 +1,18 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+char
+foo (__INT32_TYPE__ *p)
+{
+ /* This generates a __builtin___asan_report_load1. */
+ __INT32_TYPE__ ret = *(char *) p;
+ /* This generates a __builtin___asan_report_store4 depending on the. */
+ *p = 26;
+ return ret;
+}
+
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report" 2 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c
new file mode 100644
index 0000000000..c3632aa3d2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-4.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+void
+foo (int *a, char *b, char *c)
+{
+ /* One check for c[0], one check for a[], one check for c, two checks for b. */
+ __builtin_memmove (c, b, a[c[0]]);
+ /* For a total of 5 checks. */
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 5 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c
new file mode 100644
index 0000000000..077ea34d02
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-5.c
@@ -0,0 +1,18 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+void
+foo (int *a, char *b, char *c)
+{
+ /* One check for b[0], one check for a[], 2 checks for c and one checks for b. */
+ __builtin_memmove (c, b, a[b[0]]);
+ /* For a total of 5 checks. */
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 5 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load4" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c
new file mode 100644
index 0000000000..6d87104aac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-6.c
@@ -0,0 +1,20 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+void
+foo (int *a, char *b, char *c)
+{
+ /* One check for c[0], one check for a[], one check for c and 2 checks for b. */
+ __builtin_memmove (c, b, a[c[0]]);
+ /* One check for a[], one check for c and one check for b. */
+ __builtin_memmove (c, b, a[b[0]]);
+ /* For a total of 8 checks. */
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 8 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load4" 2 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 2 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 2 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c
new file mode 100644
index 0000000000..5baa10dcd7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-7.c
@@ -0,0 +1,27 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+char e[200];
+
+struct S
+{
+ char a[100];
+ char b[100];
+} s;
+
+int
+foo (int *a, char *b, char *c)
+{
+ /* 2 checks for s.a, 2 checks for e. */
+ int d = __builtin_memcmp (s.a, e, 100);
+ /* One check for s.a and one check for e. */
+ d += __builtin_memcmp (s.a, e, 200);
+ /* For a total of 6 checks. */
+ return d;
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 6 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 4 "sanopt" } } */
+/* { dg-final { scan-tree-dump-not "__builtin___asan_report_store" "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c
new file mode 100644
index 0000000000..2a4c0812f3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-8.c
@@ -0,0 +1,20 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+char
+foo (int *a, char *b, char *c)
+{
+ /* One check for b[0], one check for a[], two checks for c and one check for b. */
+ __builtin_memmove (c, b, a[b[0]]);
+ /* No checks here. */
+ return c[0] + b[0];
+ /* For a total of 5 checks. */
+}
+
+/* { dg-final { scan-tree-dump-times "& 7" 5 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load4" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_load_n" 1 "sanopt" } } */
+/* { dg-final { scan-tree-dump-times "__builtin___asan_report_store_n" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-9.c b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-9.c
new file mode 100644
index 0000000000..9449de5788
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-redundant-instrumentation-9.c
@@ -0,0 +1,13 @@
+/* { dg-options "-fdump-tree-sanopt" } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+__SIZE_TYPE__
+f (char *a)
+{
+ a[0] = '1';
+ return __builtin_strlen (a);
+}
+
+/* { dg-final { scan-tree-dump-times "__asan_report_load1" 1 "sanopt" } } */
+/* { dg-final { cleanup-tree-dump "sanopt" } } */
diff --git a/gcc/testsuite/c-c++-common/asan/no-use-after-return.c b/gcc/testsuite/c-c++-common/asan/no-use-after-return.c
new file mode 100644
index 0000000000..f326e0caee
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/no-use-after-return.c
@@ -0,0 +1,13 @@
+/* { dg-do assemble } */
+/* { dg-options "--param asan-use-after-return=0 -save-temps" } */
+
+extern void f(char *);
+
+int main() {
+ char buf[64];
+ f(buf);
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "__asan_option_detect_stack_use_after_return" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/asan/null-deref-1.c b/gcc/testsuite/c-c++-common/asan/null-deref-1.c
new file mode 100644
index 0000000000..6aea9d295f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/null-deref-1.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "-fno-omit-frame-pointer -fno-shrink-wrap" } */
+/* { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-shouldfail "asan" } */
+
+__attribute__((noinline, noclone))
+static void
+NullDeref(int *ptr)
+{
+ ptr[10]++;
+}
+
+int main()
+{
+ NullDeref((int*)0);
+ return 0;
+}
+
+/* { dg-output "ERROR: AddressSanitizer:? SEGV on unknown address\[^\n\r]*" } */
+/* { dg-output "0x\[0-9a-f\]+ \[^\n\r]*pc 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in \[^\n\r]*NullDeref\[^\n\r]* (\[^\n\r]*null-deref-1.c:10|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*null-deref-1.c:15|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/pr56330.c b/gcc/testsuite/c-c++-common/asan/pr56330.c
new file mode 100644
index 0000000000..25759f4ec9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr56330.c
@@ -0,0 +1,24 @@
+/* PR sanitizer/56330 */
+/* { dg-do compile } */
+
+char e[200];
+
+struct S
+{
+ char a[100];
+ char b[100];
+} s;
+
+int
+foo (void)
+{
+ int i = __builtin_memcmp (s.a, e, 100);
+ i += __builtin_memcmp (s.a, e, 200);
+ return i;
+}
+
+void
+bar (int *a, char *b, char *c)
+{
+ __builtin_memmove (c, b, a[b[0]]);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/pr59029.c b/gcc/testsuite/c-c++-common/asan/pr59029.c
new file mode 100644
index 0000000000..a1319b2720
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr59029.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+
+int
+foo ()
+{
+ return __sync_fetch_and_add ((int *) 0, 1);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/pr59063-1.c b/gcc/testsuite/c-c++-common/asan/pr59063-1.c
new file mode 100644
index 0000000000..a22db6a0d8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr59063-1.c
@@ -0,0 +1,11 @@
+/* { dg-do run { target { *-*-linux* } } } */
+
+#include <time.h>
+static int weak_gettime (clockid_t clk_id, struct timespec *tp)
+ __attribute__((__weakref__("clock_gettime")));
+int main() {
+ if (!clock_gettime)
+ return 0;
+ struct timespec ts;
+ return weak_gettime(CLOCK_MONOTONIC, &ts);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/pr59063-2.c b/gcc/testsuite/c-c++-common/asan/pr59063-2.c
new file mode 100644
index 0000000000..759b7f24d0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr59063-2.c
@@ -0,0 +1,12 @@
+/* { dg-do run { target { *-*-linux* } } } */
+/* { dg-options "-static-libasan" } */
+
+#include <time.h>
+static int weak_gettime (clockid_t clk_id, struct timespec *tp)
+ __attribute__((__weakref__("clock_gettime")));
+int main() {
+ if (!clock_gettime)
+ return 0;
+ struct timespec ts;
+ return weak_gettime(CLOCK_MONOTONIC, &ts);
+}
diff --git a/gcc/testsuite/c-c++-common/asan/pr61530.c b/gcc/testsuite/c-c++-common/asan/pr61530.c
new file mode 100644
index 0000000000..e306a71be9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr61530.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+__attribute__((noinline,noclone)) void
+foo (char *a, char *b) {
+ a[0] = b[0] = 0;
+ __builtin_memcpy(a, b, 4);
+}
+
+int
+main () {
+ char a, b;
+ foo (&a, &b);
+ return 0;
+}
+
+/* { dg-output "ERROR: AddressSanitizer: stack-buffer-overflow" } */
diff --git a/gcc/testsuite/c-c++-common/asan/pr62089.c b/gcc/testsuite/c-c++-common/asan/pr62089.c
new file mode 100644
index 0000000000..9b92e9bbf1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr62089.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdbool.h>
+#include <sanitizer/asan_interface.h>
+
+struct vfsmount {};
+struct dentry {};
+
+struct path {
+ struct vfsmount *mnt;
+ struct dentry *dentry;
+};
+
+struct fs_struct {
+ int users;
+ int lock;
+ int seq;
+ int umask;
+ int in_exec;
+ struct path root, pwd;
+};
+
+void __attribute__((noinline, noclone))
+copy_fs_struct(struct fs_struct *a, struct fs_struct *b) {
+ a->root = b->root;
+}
+
+struct fs_struct a, b;
+
+int
+main () {
+ __asan_poison_memory_region (&a.root, sizeof (a.root));
+ copy_fs_struct (&a, &b);
+ return 0;
+}
+
+/* { dg-output "ERROR: AddressSanitizer:\[^\n\r]*on address\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/asan/pr62140-1.c b/gcc/testsuite/c-c++-common/asan/pr62140-1.c
new file mode 100644
index 0000000000..f0b026de2a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr62140-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-w -fpermissive" } */
+
+int memcmp (const void *p, const void *q, int len);
+
+int f (int *p, int *q, int len)
+{
+ return memcmp (p, q, len);
+}
+
diff --git a/gcc/testsuite/c-c++-common/asan/pr62140-2.c b/gcc/testsuite/c-c++-common/asan/pr62140-2.c
new file mode 100644
index 0000000000..0bb2563aba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr62140-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-w -fpermissive" } */
+
+int strlen (const char *p);
+
+int f (char *p)
+{
+ int x = strlen (p);
+ return x;
+}
+
diff --git a/gcc/testsuite/c-c++-common/asan/pr63638.c b/gcc/testsuite/c-c++-common/asan/pr63638.c
new file mode 100644
index 0000000000..a8bafc5aad
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/pr63638.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void *memcpy (void *, const void *, __SIZE_TYPE__);
+
+struct S{
+ long d0, d1, d2, d3, d4, d5, d6;
+};
+
+struct S s[6];
+
+int f(struct S *p)
+{
+ memcpy(p, &s[2], sizeof(*p));
+ memcpy(p, &s[1], sizeof(*p));
+}
+
diff --git a/gcc/testsuite/c-c++-common/asan/rlimit-mmap-test-1.c b/gcc/testsuite/c-c++-common/asan/rlimit-mmap-test-1.c
new file mode 100644
index 0000000000..9dbbc85f4f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/rlimit-mmap-test-1.c
@@ -0,0 +1,22 @@
+/* Check that we properly report mmap failure. */
+
+/* { dg-do run { target setrlimit } } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+/* { dg-require-effective-target hw } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+#include <assert.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+
+static volatile void *x;
+
+int main(int argc, char **argv) {
+ struct rlimit mmap_resource_limit = { 0, 0 };
+ if (setrlimit(RLIMIT_AS, &mmap_resource_limit)) return 1;
+ x = malloc(10000000);
+ return 0;
+}
+
+/* { dg-output "ERROR: Failed to mmap" } */
diff --git a/gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c b/gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c
new file mode 100644
index 0000000000..78d15e1aad
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/sanity-check-pure-c-1.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-free" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return x[5];
+}
+
+/* { dg-output "heap-use-after-free.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|)free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:8|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output " #0 \[^\n\r]*(in _*(interceptor_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 \[^\n\r]*(in _*main (\[^\n\r]*sanity-check-pure-c-1.c:7|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/sleep-before-dying-1.c b/gcc/testsuite/c-c++-common/asan/sleep-before-dying-1.c
new file mode 100644
index 0000000000..e50885907d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/sleep-before-dying-1.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-set-target-env-var ASAN_OPTIONS "sleep_before_dying=1" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-free" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return x[5];
+}
+
+/* { dg-output "Sleeping for 1 second" } */
diff --git a/gcc/testsuite/c-c++-common/asan/stack-overflow-1.c b/gcc/testsuite/c-c++-common/asan/stack-overflow-1.c
new file mode 100644
index 0000000000..c717650971
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/stack-overflow-1.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-memset" } */
+/* { dg-shouldfail "asan" } */
+
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void *memset (void *, int, __SIZE_TYPE__);
+
+volatile int ten = 10;
+
+int main() {
+ char x[10];
+ memset(x, 0, 10);
+ int res = x[ten]; /* BOOOM */
+ return res;
+}
+
+/* { dg-output "READ of size 1 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*stack-overflow-1.c:16|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*Address 0x\[0-9a-f\]+ is located in stack of thread T0.*(\n|\r\n|\r)" */
+/* { dg-output "\[^\n\r]*in main.*stack-overflow-1.c.*(\n|\r\n|\r)" */
diff --git a/gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c b/gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c
new file mode 100644
index 0000000000..812aa37e2d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/strip-path-prefix-1.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O2" } } */
+/* { dg-set-target-env-var ASAN_OPTIONS "strip_path_prefix='/'" } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-free" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return x[5];
+}
+
+/* { dg-output "heap-use-after-free.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ \[(\]?\[^/\]\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c b/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c
new file mode 100644
index 0000000000..4833dc7789
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/strlen-overflow-1.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdbool.h>
+#include <sanitizer/asan_interface.h>
+
+char a[2] = "0";
+
+#ifdef __cplusplus
+extern "C"
+#endif
+
+__attribute__((no_sanitize_address, noinline)) __SIZE_TYPE__
+strlen (const char *p) {
+
+ __SIZE_TYPE__ n = 0;
+ for (; *p; ++n, ++p);
+ return n;
+}
+
+int main () {
+ char *p = &a[0];
+ asm ("" : "+r"(p));
+ __asan_poison_memory_region ((char *)&a[1], 1);
+ return __builtin_strlen (a);
+}
+
+/* { dg-output "READ of size 1 at 0x\[0-9a-f\]+ thread T0.*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*strlen-overflow-1.c:26|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c b/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c
new file mode 100644
index 0000000000..3ed9fd6dd5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/strncpy-overflow-1.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-strncpy" } */
+/* { dg-shouldfail "asan" } */
+
+#include <string.h>
+#include <stdlib.h>
+int main(int argc, char **argv) {
+ char *hello = (char*)malloc(6);
+ strcpy(hello, "hello");
+ char *short_buffer = (char*)malloc(9);
+ strncpy(short_buffer, hello, 10); /* BOOM */
+ return short_buffer[8];
+}
+
+/* { dg-output "WRITE of size \[0-9\]* at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)strncpy|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*strncpy-overflow-1.c:11|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 0 bytes to the right of 9-byte region\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*strncpy-overflow-1.c:10|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c b/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c
new file mode 100644
index 0000000000..23d3db0655
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/swapcontext-test-1.c
@@ -0,0 +1,63 @@
+/* Check that ASan plays well with easy cases of makecontext/swapcontext. */
+
+/* { dg-do run { target swapcontext } } */
+
+#include <stdio.h>
+#include <ucontext.h>
+#include <unistd.h>
+
+ucontext_t orig_context;
+ucontext_t child_context;
+
+void Child(int mode) {
+ char x[32] = {0}; /* Stack gets poisoned. */
+ printf("Child: %p\n", x);
+ /* (a) Do nothing, just return to parent function.
+ (b) Jump into the original function. Stack remains poisoned unless we do
+ something. */
+ if (mode == 1) {
+ if (swapcontext(&child_context, &orig_context) < 0) {
+ perror("swapcontext");
+ _exit(0);
+ }
+ }
+}
+
+int Run(int arg, int mode) {
+ int i;
+ const int kStackSize = 1 << 20;
+ char child_stack[kStackSize + 1];
+ printf("Child stack: %p\n", child_stack);
+ /* Setup child context. */
+ getcontext(&child_context);
+ child_context.uc_stack.ss_sp = child_stack;
+ child_context.uc_stack.ss_size = kStackSize / 2;
+ if (mode == 0) {
+ child_context.uc_link = &orig_context;
+ }
+ makecontext(&child_context, (void (*)())Child, 1, mode);
+ if (swapcontext(&orig_context, &child_context) < 0) {
+ perror("swapcontext");
+ return 0;
+ }
+ /* Touch childs's stack to make sure it's unpoisoned. */
+ for (i = 0; i < kStackSize; i++) {
+ child_stack[i] = i;
+ }
+ return child_stack[arg];
+}
+
+volatile int zero = 0;
+
+int main(int argc, char **argv) {
+ int ret = 0;
+ ret += Run(zero, 0);
+ printf("Test1 passed\n");
+ ret += Run(zero, 1);
+ printf("Test2 passed\n");
+ return ret;
+}
+
+/* { dg-output "WARNING: ASan doesn't fully support makecontext/swapcontext.*" } */
+/* { dg-output "Test1 passed.*" } */
+/* { dg-output "Test2 passed.*" } */
diff --git a/gcc/testsuite/c-c++-common/asan/use-after-free-1.c b/gcc/testsuite/c-c++-common/asan/use-after-free-1.c
new file mode 100644
index 0000000000..25e9be827f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/use-after-free-1.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "-fno-builtin-malloc -fno-builtin-free" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdlib.h>
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return x[5];
+}
+
+/* { dg-output "ERROR: AddressSanitizer:? heap-use-after-free on address\[^\n\r]*" } */
+/* { dg-output "0x\[0-9a-f\]+ at pc 0x\[0-9a-f\]+ bp 0x\[0-9a-f\]+ sp 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*READ of size 1 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*use-after-free-1.c:9|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 5 bytes inside of 10-byte region .0x\[0-9a-f\]+,0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*freed by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)free|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*use-after-free-1.c:8|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*previously allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #0 0x\[0-9a-f\]+ (in _*(interceptor_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
+/* { dg-output " #1 0x\[0-9a-f\]+ (in _*main (\[^\n\r]*use-after-free-1.c:7|\[^\n\r]*:0)|\[(\])\[^\n\r]*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/asan/use-after-return-1.c b/gcc/testsuite/c-c++-common/asan/use-after-return-1.c
new file mode 100644
index 0000000000..49933e531b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/asan/use-after-return-1.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-set-target-env-var ASAN_OPTIONS "detect_stack_use_after_return=1" } */
+/* { dg-shouldfail "asan" } */
+
+#include <stdio.h>
+#include <pthread.h>
+
+#ifndef kSize
+# define kSize 1
+#endif
+
+#ifndef UseThread
+# define UseThread 0
+#endif
+
+__attribute__((noinline))
+char *Ident(char *x) {
+ fprintf(stderr, "1: %p\n", x);
+ return x;
+}
+
+__attribute__((noinline))
+char *Func1() {
+ char local[kSize];
+ return Ident(local);
+}
+
+__attribute__((noinline))
+void Func2(char *x) {
+ fprintf(stderr, "2: %p\n", x);
+ *x = 1;
+}
+
+void *Thread(void *unused) {
+ Func2(Func1());
+ return NULL;
+}
+
+int main(int argc, char **argv) {
+#if UseThread
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ pthread_join(t, 0);
+#else
+ Func2(Func1());
+#endif
+ return 0;
+}
+
+/* { dg-output "WRITE of size 1 at .* thread T0.*" } */
+/* { dg-output " #0.*(Func2)?.*use-after-return-1.(c:31)?.*" } */
+/* { dg-output "is located in stack of thread T0 at offset.*" } */
+/* { dg-output "\'local\' <== Memory access at offset 32 is inside this variable" } */
diff --git a/gcc/testsuite/c-c++-common/attributes-1.c b/gcc/testsuite/c-c++-common/attributes-1.c
new file mode 100644
index 0000000000..af4dd12275
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/attributes-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-prune-output "undeclared here \\(not in a function\\)|\[^\n\r\]* was not declared in this scope" } */
+
+void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,bar))); /* { dg-warning "outside range" } */
+void* my_realloc(void*, unsigned) __attribute__((alloc_size(bar))); /* { dg-warning "outside range" } */
+
+typedef char vec __attribute__((vector_size(bar))); /* { dg-warning "ignored" } */
+
+void f1(char*) __attribute__((nonnull(bar))); /* { dg-error "invalid operand" } */
+void f2(char*) __attribute__((nonnull(1,bar))); /* { dg-error "invalid operand" } */
+
+void g() __attribute__((aligned(bar))); /* { dg-error "invalid value|not an integer" } */
+
+void foo(void);
+void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(1,foo))); /* { dg-warning "outside range" } */
+void* my_realloc(void*, unsigned) __attribute__((alloc_size(foo))); /* { dg-warning "outside range" } */
+
+typedef char vec __attribute__((vector_size(foo))); /* { dg-warning "ignored" } */
+
+void f1(char*) __attribute__((nonnull(foo))); /* { dg-error "invalid operand" } */
+void f2(char*) __attribute__((nonnull(1,foo))); /* { dg-error "invalid operand" } */
+
+void g() __attribute__((aligned(foo))); /* { dg-error "invalid value|not an integer" } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/an-if.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/an-if.c
new file mode 100644
index 0000000000..4bf85b5ca9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/an-if.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+#include <assert.h>
+
+const int n = 8;
+
+float x[8], y[8], z[8];
+
+int main() {
+ int i = 0;
+ float x_sum =0;
+ for(i=1; i<=5; i+=4 ) {
+ x[0:n] = 3;
+ y[0:n] = i;
+ z[0:n] = 0;
+#if HAVE_IO
+ printf("x\ty\tz\n");
+ for( size_t k=0; k<n; ++k ) {
+ printf("%g\t%g\t%g\n",x[k],y[k],z[k]);
+ }
+ x_sum = __sec_reduce_add (x[0:n]);
+ printf("sec_reduce_add (x[0:n]) = %6.3f\n", x_sum);
+#endif
+ assert( __sec_reduce_add(x[0:n])==3*n );
+ assert( __sec_reduce_add(y[0:n])==i*n );
+ assert( __sec_reduce_add(z[0:n])==0 );
+
+ if (x[0:n] >= y[0:n]) {
+ z[0:n] = x[0:n] - y[0:n];
+ } else {
+ z[0:n] = x[0:n] + y[0:n];
+ }
+#if HAVE_IO
+ printf("x\ty\tz\n");
+ for( size_t k=0; k<n; ++k ) {
+ printf("%g\t%g\t%g\n",x[k],y[k],z[k]);
+ }
+#endif
+ assert( __sec_reduce_add(x[0:n])==3*n );
+ assert( __sec_reduce_add(y[0:n])==i*n );
+ assert( __sec_reduce_add(z[0:n])==(3>=i?3-i:3+i)*n );
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test1.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test1.c
new file mode 100644
index 0000000000..282a55d6fc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test1.c
@@ -0,0 +1,84 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+
+int main2 (char **argv);
+
+int main(void)
+{
+ int x = 0;
+ const char *array[] = {"a.out", "5"};
+ x = main2 ((char **)array);
+ return x;
+}
+
+int main2 (char **argv)
+{
+ int array[10], ii = 0, x = 2, z= 0 , y = 0 ;
+ for (ii = 0; ii < 10; ii++)
+ array[ii] = 10;
+
+ array[0:10:1] = 15;
+
+ for (ii = 0; ii < 10; ii++)
+ if (array[ii] != 15)
+ return 5;
+ array[0:5:2] = 20;
+
+ for (ii = 0; ii < 10; ii += 2)
+ if (array[ii] != 20)
+ return 4;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+
+ array[x:5:z] = 50;
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != 50)
+ return 3;
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[x:y:z] = 505;
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != 505)
+ return 4;
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] = 25;
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != 25)
+ return 5;
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
+ 1400;
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != 1400)
+ return 6;
+
+
+ array[atoi("5"):5:1] = 5555;
+
+ for (ii = atoi ("5"); ii < 10; ii++)
+ if (array[ii] != 5555)
+ return 7;
+
+
+ array[atoi("5"):atoi("5"):atoi("1")] = 9999;
+ for (ii = atoi ("5"); ii < (atoi ("5") + atoi ("5")); ii += atoi ("1"))
+ if (array[ii] != 9999)
+ return 8;
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test2.c
new file mode 100644
index 0000000000..60f2de2834
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test2.c
@@ -0,0 +1,128 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+int main2 (char **argv);
+int main(void)
+{
+ int x = 0;
+ const char *array[] = {"a.out", "5"};
+ x = main2 ((char **)array);
+ return x;
+}
+
+
+int main2(char **argv)
+{
+ int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+
+ array2[0:10:1] = array[0:10:1];
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2[ii] != array[ii])
+ return 1;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+
+ array2[0:5:2] = array[0:5:2];
+
+ for (ii = 0; ii < 10; ii += 2)
+ if (array[ii] != array2[ii])
+ return 2;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+
+ array2[x:5:z] = array[x:5:z];
+
+ for (ii = x; ii < 5; ii += z)
+ if (array2[ii] != array[ii])
+ return 3;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array2[x:y:z] = array[x:y:z];
+ for (ii = x; ii < 10; ii = ii + z)
+ if (array2[ii] != array[ii])
+ return 4;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] =
+ array2[x:y:((10-atoi(argv[1]))/atoi(argv[1]))];
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != array2[ii])
+ return 5;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+
+ array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
+ array2[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))];
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != array2[ii])
+ return 6;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 4;
+ array2[ii] = 2;
+ }
+
+ array[atoi("5"):5:1] = array2[atoi("5"):5:1];
+
+ for (ii = atoi ("5"); ii < 10; ii++)
+ if (array[ii] != array2[ii])
+ return (7);
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 5;
+ array2[ii] = 1;
+ }
+ array[atoi("5"):atoi("5"):atoi("1")] = array2[atoi("5"):atoi("5"):atoi("1")];
+
+ for (ii = 5; ii < 10; ii++)
+ if (array2[ii] != array[ii])
+ return 8;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test_ND.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test_ND.c
new file mode 100644
index 0000000000..e89bbab268
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/array_test_ND.c
@@ -0,0 +1,102 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+int main2(char **argv);
+int main(void)
+{
+ int x = 0;
+ const char *array[] = {"a.out", "10", "15"};
+ x = main2 ((char **)array);
+ return x;
+}
+
+int main2(char **argv)
+{
+ int array[10][15], ii = 0, jj = 0,x = 0, z= 1 , y = 10 ;
+ int array_2[10][15];
+ int argc = 3;
+ __asm volatile ("" : "+r" (argc));
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ array_2[0:5:2][0:5:3] = array[0:5:2][0:5:3] + 1 + 5 + array[0][5] + x;
+
+ for (ii = 0; ii < 10; ii += 2)
+ {
+ for (jj = 0; jj < 15; jj += 3)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + 1 + 5 + array[0][5] + x)
+ return 2;
+ }
+ }
+
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = atoi(argv[1]);
+ y = atoi(argv[2]);
+ array_2[0:x:1][0:y:1] = array[0:x:1][0:y:1] + x + y + array[0:x:1][0:y:1];
+
+ for (ii = 0; ii < x; ii++)
+ {
+ for (jj = 0; jj < y; jj++)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + x + y + array[ii][jj])
+ return 3;
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = atoi(argv[1]);
+ y = atoi(argv[2]);
+ z = (20- atoi (argv[1]))/atoi(argv[1]);
+ /* (20-10)/10 evaluates to 1 all the time :-). */
+ array_2[0:x:z][0:y:z] = array[0:x:z][0:y:z] + array[0:x:z][0:y:z] + y + z;
+
+ for (ii = 0; ii < x; ii += z)
+ {
+ for (jj = 0; jj < y; jj += z)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] + y + z)
+ return 4;
+ }
+ }
+
+
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = argc-3;
+ y = 20-atoi(argv[1]);
+ z = (20- atoi (argv[1]))/atoi(argv[1]);
+ /* (20-10)/10 evaluates to 1 all the time :-). */
+ array_2[(argc-3):(20-atoi(argv[1])):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): ((30-atoi(argv[2]))/atoi(argv[2]))] = array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] + array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] * array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])];
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ for (jj = 0; jj < 15; jj++)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] * array[ii][jj])
+ return 5;
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_custom.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_custom.c
new file mode 100644
index 0000000000..0f066d4a6e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_custom.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 100
+#if HAVE_IO
+#include <stdio.h>
+#endif
+/* #include <stdlib.h> */
+
+double my_func (double x, double y)
+{
+ if (x > y)
+ return x;
+ else
+ return y;
+}
+
+
+/* char __sec_reduce_add (int *); */
+int main(void)
+{
+ int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER];
+ double x, yy, array3[NUMBER], array4[NUMBER];
+ double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
+ int max_index = 0, min_index = 0;
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ array[ii] = 1+ii;
+ array2[ii]= 2;
+ }
+
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ if (ii%2 && ii)
+ array3[ii] = (double)(1.0000/(double)ii);
+ else
+ array3[ii] = (double) ii + 0.10;
+ array4[ii] = (double) (1.00000/ (double)(ii+1));
+ }
+
+ /* array[:] = 5; */
+ x = __sec_reduce (0, array3[:] * array4[:], my_func);
+ y = __sec_reduce_max_ind ( array3[:] * array4[:]);
+
+ /* Initialize it to the first variable. */
+ max_value = array3[0] * array4[0];
+ for (ii = 0; ii < NUMBER; ii++)
+ if (array3[ii] * array4[ii] > max_value) {
+ max_value = array3[ii] * array4[ii];
+ max_index = ii;
+ }
+
+
+
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Max = %5.3f\t Max Index = %2d\n", x, y);
+#endif
+
+ if (x != max_value)
+ return 1;
+
+ if (y != max_index)
+ return 2;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
new file mode 100644
index 0000000000..e01fbb1b34
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_fn_mutating.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 100
+#if HAVE_IO
+#include <stdio.h>
+#endif
+/* #include <stdlib.h> */
+
+void my_func (double *x, double y)
+{
+ if (*x < y)
+ *x = y;
+}
+
+
+int main(void)
+{
+ int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER];
+ double x = 0.000, yy, array3[NUMBER], array4[NUMBER];
+ double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
+ int max_index = 0, min_index = 0;
+#if 1
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ array[ii] = 1+ii;
+ array2[ii]= 2;
+ }
+
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ if (ii%2 && ii)
+ array3[ii] = (double)(1.0000/(double)ii);
+ else
+ array3[ii] = (double) ii + 0.10;
+ array4[ii] = (double) (1.00000/ (double)(ii+1));
+ }
+#endif
+ /* array[:] = 5; */
+ __sec_reduce_mutating (&x, array3[:] * array4[:], my_func);
+#if 1
+ y = __sec_reduce_max_ind ( array3[:] * array4[:]);
+
+ /* Initialize it to the first variable. */
+ max_value = array3[0] * array4[0];
+ for (ii = 0; ii < NUMBER; ii++)
+ if (array3[ii] * array4[ii] > max_value) {
+ max_index = ii;
+ }
+
+ for (ii = 0; ii < NUMBER; ii++)
+ my_func (&max_value, array3[ii] * array4[ii]);
+
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Max = %5.3f\t Max Index = %2d\n", x, y);
+ printf("Max = %5.3f\t Max Index = %2d\n", max_value, max_index);
+#endif
+
+ if (x != max_value)
+ return 1;
+
+ if (y != max_index)
+ return 2;
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double.c
new file mode 100644
index 0000000000..0c05994ee3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double.c
@@ -0,0 +1,124 @@
+#if HAVE_IO
+#include <stdio.h>
+#endif
+/* #include <stdlib.h> */
+
+/* char __sec_reduce_add (int *); */
+int main(void)
+{
+ int ii,array[10], y = 0, y_int = 0, array2[10];
+ double x, yy, array3[10], array4[10];
+ double max_value = 0.000, min_value = 0.000, add_value, mul_value = 1.00;
+ int max_index = 0, min_index = 0;
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 1+ii;
+ array2[ii]= 2;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ if (ii%2 && ii)
+ array3[ii] = (double)(1.0000/(double)ii);
+ else
+ array3[ii] = (double) ii + 0.10;
+ array4[ii] = (double) (1.00000/ (double)(ii+1));
+ }
+
+ /* array[:] = 5; */
+ x = __sec_reduce_max (array3[:] * array4[:]);
+ y = __sec_reduce_max_ind ( array3[:] * array4[:]);
+
+ /* Initialize it to the first variable. */
+ max_value = array3[0] * array4[0];
+ for (ii = 0; ii < 10; ii++)
+ if (array3[ii] * array4[ii] > max_value) {
+ max_value = array3[ii] * array4[ii];
+ max_index = ii;
+ }
+
+
+
+#if HAVE_IO
+ for (ii = 0; ii < 10; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Max = %5.3f\t Max Index = %2d\n", x, y);
+#endif
+
+ if (x != max_value)
+ return 1;
+
+ if (y != max_index)
+ return 2;
+
+ x = __sec_reduce_min (array3[:] * array4[:]);
+ y = __sec_reduce_min_ind ( array3[:] * array4[:]);
+#if HAVE_IO
+ for (ii = 0; ii < 10; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Min = %5.3f\t Min Index = %2d\n", x, y);
+#endif
+
+ /* Initialize it to the first variable. */
+ min_value = array3[0] * array4[0];
+ for (ii = 0; ii < 10; ii++)
+ if (array3[ii] * array4[ii] < min_value) {
+ min_value = array3[ii] * array4[ii];
+ min_index = ii;
+ }
+
+ if (x != min_value)
+ return 3;
+ if (y != min_index)
+ return 4;
+
+ x = __sec_reduce_add (array3[:] * array4[:]);
+ yy = __sec_reduce_mul ( array3[:] * array4[:]);
+#if HAVE_IO
+ for (ii = 0; ii < 10; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Add = %5.3f\t Mul = %f\n", x, yy);
+#endif
+
+ /* Initialize it to the first variable. */
+ add_value = 0.0000;
+ mul_value = 1.0000;
+ for (ii = 0; ii < 10; ii++)
+ {
+ add_value += (array3[ii] * array4[ii]);
+ mul_value *= (array3[ii] * array4[ii]);
+ }
+
+ if (x != add_value)
+ return 5;
+ if (yy != mul_value)
+ return 6;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ if (ii%2 && ii)
+ array3[ii] = (double)(1.0000/(double)ii);
+ else
+ array3[ii] = (double) ii + 0.00;
+ array4[ii] = (double) (1.00000/ (double)(ii+1));
+ }
+ y_int = __sec_reduce_any_zero (array3[:] * array4[:]);
+ y = __sec_reduce_all_zero ( array3[:] * array4[:]);
+
+ if (y_int != 1)
+ return 7;
+
+ if (y != 0)
+ return 8;
+
+#if HAVE_IO
+ for (ii = 0; ii < 10; ii++)
+ printf("%5.3f ", array3[ii] * array4[ii]);
+ printf("\n");
+ printf("Any Zeros = %d\t All Zeros = %d\n", y_int, y);
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double2.c
new file mode 100644
index 0000000000..65549121b1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/builtin_func_double2.c
@@ -0,0 +1,77 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 100
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+int main(void)
+{
+ int argc = 1;
+ int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER], y_int2=0, y2=0;
+ double x, yy, array3[NUMBER], array4[NUMBER];
+ int all_zero, all_nonzero, any_zero, any_nonzero;
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ array[ii] = 0;
+ array2[ii] = 5;
+ if (ii%2 && ii)
+ array3[ii] = (double)(1.0000/(double)ii);
+ else
+ array3[ii] = (double) ii + 0.00;
+ array4[ii] = (double) (1.00000/ (double)(ii+1));
+ }
+ __asm volatile ("" : "+r" (argc));
+ y_int = __sec_reduce_any_nonzero (array3[:] + array[4]);
+ y_int2 = __sec_reduce_any_zero (array3[:] + array[4]);
+ y = __sec_reduce_all_nonzero ((array3[:] + array4[:]) * (argc-1));
+ y2 = __sec_reduce_all_zero ((array3[:] + array4[:]) * (argc-1));
+
+ any_zero = 0;
+ any_nonzero = 0;
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ if ((array3[ii] + array[4]) == 0)
+ any_zero = 1;
+ else
+ any_nonzero = 1;
+ }
+
+ if (any_nonzero != y_int)
+ return 1;
+ if (any_zero != y_int2)
+ return 2;
+
+
+ all_zero = 0;
+ all_nonzero = 0;
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ if (((array3[ii] + array4[ii]) * (argc-1)) == 0)
+ all_zero = 1;
+ else
+ all_nonzero = 1;
+ }
+
+ if (y != all_nonzero)
+ return 3;
+ if (all_zero != y2)
+ return 4;
+
+
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++) {
+ printf("%5.3f ", array3[ii] +array4[ii]);
+ }
+ printf("\n");
+ for (ii = 0; ii < NUMBER; ii++) {
+ printf("%5.3f ", (array3[ii] + array4[ii]) * (argc-1));
+ }
+ printf("\n");
+ printf("Any Non-zeros (1st line) = %d\t All non-zeros (1st line) = %d\n",
+ y_int, y);
+ printf("Any zeros (2nd line) = %d\t All zeros (2nd line) = %d\n", y_int2, y2);
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/comma_exp.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/comma_exp.c
new file mode 100644
index 0000000000..845d916ab9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/comma_exp.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+
+int main2 (char **argv);
+int main(void)
+{
+ int x = 0;
+ const char *array[] = {"a.out", "5"};
+ x = main2 ((char **)array);
+ return x;
+}
+
+int main2 (char **argv)
+{
+ int argc = 2;
+ int array[10], array2[10], ii = 0, x = 2, z= 0 , y = 0 ;
+ __asm volatile ("" : "+r" (argc));
+ for (ii = 0; ii < 10; ii++)
+ array[ii] = 10;
+
+ for (ii = 0; ii < 10; ii++)
+ array2[ii] = 1;
+
+ array[0:10:1] = (array[:], 15);
+
+ for (ii = 0; ii < 10; ii++)
+ if (array[ii] != 15)
+ return 1;
+ array[0:5:2] = (argc+2, 20);
+
+ for (ii = 0; ii < 10; ii += 2)
+ if (array[ii] != 20)
+ return 2;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+
+ array[x:5:z] = 50;
+
+ array[:] = (atoi(argv[1]), (array2[0:10]+5));
+
+ for (ii = 0; ii < 10; ii++)
+ if (array[ii] != 6)
+ return (3);
+
+ array[:] = (atoi(argv[1]), (array2[0:10]+array2[0:10]));
+ for (ii = 0; ii < 10; ii++)
+ if (array[ii] != 2)
+ return 4;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/conditional.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/conditional.c
new file mode 100644
index 0000000000..07c50173bf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/conditional.c
@@ -0,0 +1,44 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+int main(void)
+{
+ int argc = 1;
+ short array[1000], array2[1000], *array3, cond[1000], ii = 0;
+
+ __asm volatile ("" : "+r" (argc));
+ for (ii = 0; ii < 1000; ii++) {
+ cond[ii] = 1;
+ array[ii] = 1000;
+ array2[ii] = 2000;
+ }
+ array2[:] = cond[:] ? array[:] : array2[:];
+
+ for (ii = 0; ii < 1000; ii++) {
+ if (array2[ii] != 1000)
+ return 1;
+ }
+
+ array2[0:500:2] = cond[0:500] ? array[0:500:1] : array2[0:500:2];
+
+ for (ii = 0; ii < 1000; ii++) {
+ if (array2[ii] != 1000)
+ return 2;
+ }
+
+ for (ii = 0; ii < 1000; ii++) {
+ cond[ii] = ii % 2; /* This should give 0, 1, 0, 1, 0, 1, 0,... */
+ array2[ii] = 5;
+ array[ii] = 3;
+ }
+ array3 = (short *) malloc (sizeof (short) * 1000);
+ array3[0:1000:argc] = cond[:] ? array[0:(argc * 1000)] : array2[argc-1:1000];
+
+ for (ii = 0; ii < 1000; ii++) {
+ if ((cond[ii] == 0 && array3[ii] != 5)
+ || (cond[ii] == 1 && array3[ii] != 3))
+ return 3;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c
new file mode 100644
index 0000000000..4b54f4d06f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/decl-ptr-colon.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target c } } */
+/* { dg-options "-fcilkplus" } */
+
+int main(void)
+{
+ extern int func(int);
+ int array3[:], x, q; /* { dg-error "array notations cannot be used in declaration" } */
+ int array3[1:2:x]; /* { dg-error "array notations cannot be used in declaration" } */
+ extern char array3[1:func(x)]; /* { dg-error "array notations cannot be used in declaration" } */
+ int *a, ***b;
+ extern char *c;
+ int array2[10];
+
+ a[:] = 5; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
+ c[1:2] = 3; /* This is OK. */
+ (array2)[:] = 5; /* This is OK. */
+ b[1:2][1:func(x)][:] = 3; /* { dg-error "start-index and length fields necessary for using array notations in pointers" } */
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/dimensionless-arrays.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/dimensionless-arrays.c
new file mode 100644
index 0000000000..690e89a27d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/dimensionless-arrays.c
@@ -0,0 +1,10 @@
+/* { dg-options "-fcilkplus" } */
+
+extern int a[];
+extern int *b;
+
+void foo()
+{
+ a[:] = 5; // { dg-error "start-index and length fields necessary for using array notation" }
+ b[:] = 5; // { dg-error "start-index and length fields necessary for using" }
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once.c
new file mode 100644
index 0000000000..00b018a2c8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once.c
@@ -0,0 +1,44 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 1000
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+int func (int *x)
+{
+ int q = *x;
+ q++;
+ *x = q;
+#if HAVE_IO
+ printf("%d\n", (q));
+#endif
+ return *x;
+}
+int main (void)
+{
+ char array[NUMBER], array2[NUMBER];
+ int ii, d = 2;
+#if 1
+ for (ii = 0; ii < NUMBER; ii++) {
+ array[ii] = 5;
+ array2[ii]= 2;
+ }
+#endif
+ d = func (&d); /* d = 1 */
+ array2[:] = d * array[:] + (char) func (&d); /* 3 * 5 + 4 */
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++)
+ printf("array2[%d] = %d\n", ii, array2[ii]);
+#endif
+ for (ii = 0; ii < NUMBER; ii++)
+ if (array2[ii] != (3 * 5 + 4))
+ return 1;
+
+ return 0;
+}
+
+
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once2.c
new file mode 100644
index 0000000000..d9f39dd66a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/exec-once2.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#ifdef HAVE_IO
+#include <stdio.h>
+#endif
+
+
+int func1(int x)
+{
+ /* If x == 2 then it should return 0. */
+ return (x - 2);
+}
+
+int func2(int x)
+{
+ /* If x == 2 then it should return 1000. */
+ return (x * 500);
+}
+
+int func3 (int x)
+{
+ /* If x == 2 then it should return 1. */
+ /* If x == 1 then it should return 0. */
+ return (x-1);
+}
+
+int func4(int x)
+{
+ if (x > 0)
+ return x;
+ else
+ return x--;
+}
+
+
+/* This program makes an assumption that argc == 1. */
+int main (void)
+{
+ int argc = 1;
+ int array[2500];
+
+ /* This is done to make sure the compiler does not optimize out argc. */
+ __asm volatile ("" : "+r" (argc));
+ /* This should set array[0->999] to 5. */
+ array[argc-1:func2(++argc):1] = 5;
+ array[1000:500:1] = 10; /* set all variables in array[1000-->1499] to 10. */
+ array[1500:500:1] = 15; /* set all variables in array[1500-->1999] to 15. */
+ array[2000:500:1] = 20; /* set all variables in array[2000-->2499] to 20. */
+ array[2000:500:1] = 25; /* set all variables in array[2500-->2999] to 25. */
+ array[2000:500:1] = 30; /* set all variables in array[3000-->3499] to 30. */
+
+ argc = func3 (argc); /* This will set argc back to 1. */
+#if HAVE_IO
+ printf("argc = %d\n", argc);
+#endif
+ /* If the parameters inside the function get evaluated only once, then this
+ if statement must work fine, i.e. the triplet values will be 0, 1000, 1.
+
+ Otherwise, the program should crash or give some uneasy value. */
+
+ /* If done correctly, it should boil down to: array[0:1000:1]. */
+ if (array[func3(argc):func2(++argc)] != 5) {
+#ifdef HAVE_IO
+ printf ("Should not be there(1).\n");
+#endif
+ return 1;
+ }
+
+ /* If done correctly, it should boil down to: array[999:500:-1]. */
+ if (func4(array[func2(argc)-1:func2(argc--):func1(argc)]) != 5) {
+#ifdef HAVE_IO
+ printf ("Should not be there(2).\n");
+#endif
+ return 2;
+ }
+
+ /* If done correctly, it should boil down to: array[1000:500:1]. */
+ if (func4 (func4(array[func2(argc++):500: func1(argc--)])) != 5) {
+#ifdef HAVE_IO
+ printf ("Should not be there(3).\n");
+#endif
+ return 3;
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/fn_ptr.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/fn_ptr.c
new file mode 100644
index 0000000000..fa6d9003a0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/fn_ptr.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+typedef int (*foo)(int);
+
+int main(void)
+{
+ int array[10], array2[10][10];
+ foo func_array[10];
+ foo func_array2[10][10];
+ foo ***func_array_ptr;
+ int argc = 5;
+
+ array[:] = func_array[:](10);
+ func_array[0:5](10);
+ func_array2[0:5][:](10);
+ array2[0:5][:] = func_array2[0:5][:](10);
+ func_array_ptr[0:5][0:4][0:argc:2](argc);
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c
new file mode 100644
index 0000000000..b2ac7bcc85
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/fp_triplet_values.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+float q;
+
+void func (int *x)
+{
+ *x = 5;
+}
+
+int main (void)
+{
+ int array[10], array2[10];
+ array2[:] = array[1.5:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[:] = array[1:2.32333333333]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[1:2:1.5] = array[:]; /* { dg-error "stride of array notation triplet is not an integer" } */
+ func (&array2[1:2.34:3]); /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[1.43:9]++; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[1:9.3]++; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[1:9:0.3]++; /* { dg-error "stride of array notation triplet is not an integer" } */
+
+ ++array2[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[:] = array[q:1:3]; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[:] = array[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[:] = array[1:3:q]; /* { dg-error "stride of array notation triplet is not an integer" } */
+ func (&array2[1:q:3]); /* { dg-error "length of array notation triplet is not an integer" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/gather-scatter-errors.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/gather-scatter-errors.c
new file mode 100644
index 0000000000..f425fbec0f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/gather-scatter-errors.c
@@ -0,0 +1,19 @@
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ extern int func (int);
+ int array[10][10], array2[10];
+ int argc = 1;
+ array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
+
+ array2[array[:][:]] = 5; /* { dg-error "rank of the array's index is greater than 1" } */
+ func (array2[array[:][:]]); /* { dg-error "rank of the array's index is greater than 1" } */
+ func (array2[array[argc:func(5)][0:10:2]]); /* { dg-error "rank of the array's index is greater than 1" } */
+
+ array[array2[:]][array2[:]] = 5; /* This is OK. */
+ array[array2[:]][array2[:]] = array2[array[:][:]]; /* { dg-error "rank of the array's index is greater than 1" } */
+ array[array2[:]][array2[:]] = array2[array[0:10:1][:]]; /* { dg-error "rank of the array's index is greater than 1" } */
+ array[array2[:]][array2[:]] = array2[array[:][argc:func (argc)]]; /* { dg-error "rank of the array's index is greater than 1" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c
new file mode 100644
index 0000000000..faee3fcebf
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/gather_scatter.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 20
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+float array4[NUMBER][NUMBER][NUMBER][NUMBER];
+int main(void)
+{
+ int array[NUMBER][NUMBER], array2[NUMBER], array3[NUMBER], x = 0, y;
+ int x_correct, y_correct, ii, jj = 0, kk = 0, ll = 0;
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ for (jj = 0; jj < NUMBER; jj++)
+ {
+ array[ii][jj] = 1+ii;
+ array2[ii]= 2;
+ array3[ii]= 3;
+ }
+ }
+
+ array[array2[:]][array3[:]] = 1000;
+
+ for (ii = 0; ii < NUMBER; ii++)
+ if (array[array2[ii]][array3[ii]] != 1000)
+ return 1;
+
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++) {
+ for (jj = 0; jj < NUMBER; jj++) {
+ printf("%4d\t", array[ii][jj]);
+ }
+ printf("\n");
+ }
+#endif
+
+ array4[array2[:]][array3[0:NUMBER:1]][array2[0:NUMBER:1]][array3[0:NUMBER:1]] =
+ (float)array[array2[:]][array3[:]];
+
+ for (ii = 0; ii < NUMBER; ii++)
+ if (array4[array2[ii]][array3[ii]][array2[ii]][array3[ii]] !=
+ (float)array[array2[ii]][array3[ii]])
+ return 2;
+
+#if HAVE_IO
+ for (ii = 0; ii < NUMBER; ii++) {
+ for (jj = 0; jj < NUMBER; jj++) {
+ for (kk = 0; kk < NUMBER; kk++) {
+ for (ll = 0; ll < NUMBER; ll++) {
+ printf("%4d\n", array4[ii][jj][kk][ll]);
+ }
+ }
+ }
+ }
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test.c
new file mode 100644
index 0000000000..4e5b158377
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test.c
@@ -0,0 +1,306 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+#include <stdlib.h>
+int main2 (char **argv);
+int main(int argc, char **argv)
+{
+ int x = 0;
+ const char *array[] = {"a.out", "10", "15"};
+ x = main2 ((char **) array);
+ return x;
+}
+
+
+int main2 (char **argv)
+{
+ int x = 3, y, z, array[10], array2[10], TwodArray[10][10], jj,kk,ll ;
+ int array2_check[10], array2d_check[10][10], array2d[10][10];
+ int FourDArray[10][10][10][10], array4[10][10][10][10];
+ int array4_check[10][10][10][10];
+ int ii = 0, argc = 3;
+
+ __asm volatile ("" : "+r" (argc));
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = argc%3;
+ array2[ii]= 10;
+ array2_check[ii] = 10;
+ }
+
+ if (!array[:])
+ array2[:] = 5;
+ else
+ array2[:] = 10;
+
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ if (!array[ii])
+ array2_check[ii] = 5;
+ else
+ array2_check[ii] = 10;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2_check[ii] != array2[ii])
+ return 2;
+
+
+
+ if (!(array[0:10:1] + array[0:10:1]))
+ array2[:] = 5;
+ else
+ array2[:] = 10;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ if (!(array[ii]+ array[ii]))
+ array2_check[ii] = 5;
+ else
+ array2_check[ii] = 10;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2_check[ii] != array2[ii])
+ return 3;
+
+ x = atoi (argv[1])-10;
+ y = atoi (argv[1])/2;
+ z = (atoi (argv[1]))/5;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ if (ii % 2)
+ array[ii] = 0;
+ else
+ array[ii] = 1;
+ }
+
+ /*printf("x = %2d y = %2d z = %2d\n", x, y, z); */
+
+ for (ii = 0; ii < 10; ii++)
+ array[ii] = 10;
+
+ /* This if loop will change all the 10's to 5's */
+ if (array[x:y:z] != 9)
+ array2[:] = 5;
+ else
+ array2[:] = 10;
+
+ for (ii = x; ii < (x+y); ii += z)
+ {
+ if (array[ii] != 9)
+ array2_check[ii] = 5;
+ else
+ array2_check[ii] = 10;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2_check[ii] != array2[ii])
+ return 4;
+
+ for (ii = 0; ii < 10; ii++) {
+ array2[ii] = 10;
+ array2_check[ii] = 10;
+ }
+
+ /* This if loop will change all the 10's to 5's */
+ if (array[atoi(argv[1])-10:atoi(argv[1])/2: atoi(argv[1])/5])
+ array2[atoi(argv[1])-10: atoi (argv[1])/2: atoi(argv[1])/5] = 5;
+ else
+ array2[atoi(argv[1])-10: atoi (argv[1])/2: atoi(argv[1])/5] = 10;
+
+ for (ii = atoi(argv[1])-10; ii < atoi(argv[1]) + (atoi (argv[1])-10);
+ ii +=atoi(argv[1])/5)
+ if (array[ii])
+ array2_check[ii] = 5;
+ else
+ array2_check[ii] = 10;
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2_check[ii] != array2[ii]) {
+#if HAVE_IO
+ printf("array2[%2d] = %2d array2_check[%2d] = %2d\n", ii, array2[ii],
+ ii, array2_check[ii]);
+#endif
+ return 5;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ TwodArray[ii][jj] = atoi(argv[1]);
+
+
+ for (ii = 0; ii < 10; ii++)
+ for (ii = 0; ii < 10; ii++) {
+ array2d[ii][jj] = 10;
+ array2d_check[ii][jj] = 10;
+ }
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (TwodArray[:][:] != 10)
+ array2d[:][:] = 10;
+ else
+ array2d[:][:] = 5;
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj < 10; jj++) {
+ if (TwodArray[ii][jj] != 10)
+ array2d_check[ii][jj] = 10;
+ else
+ array2d_check[ii][jj] = 5;
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ if (array2d[ii][jj] != array2d_check[ii][jj])
+ return 6;
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ {
+ array4[ii][jj][kk][ll] = 10;
+ array4_check[ii][jj][kk][ll] = 10;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (FourDArray[:][:][:][:] != 10)
+ array4[:][:][:][:] = 10;
+ else
+ array4[:][:][:][:] = 5;
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj < 10; jj++) {
+ for (kk = 0; kk < 10; kk++) {
+ for (ll = 0; ll < 10; ll++) {
+ if (FourDArray[ii][jj][kk][ll] != 10)
+ array4_check[ii][jj][kk][ll] = 10;
+ else
+ array4_check[ii][jj][kk][ll] = 5;
+ }
+ }
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll])
+ return 7;
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ {
+ array4[ii][jj][kk][ll] = 10;
+ array4_check[ii][jj][kk][ll] = 10;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (FourDArray[0:10:1][0:5:2][9:10:-1][0:5:2] != 10)
+ array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 10;
+ else
+ array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 5;
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj < 10; jj += 2) {
+ for (kk = 9; kk >= 0; kk--) {
+ for (ll = 0; ll < 10; ll += 2) {
+ if (FourDArray[ii][jj][kk][ll] != 10)
+ array4_check[ii][jj][kk][ll] = 10;
+ else
+ array4_check[ii][jj][kk][ll] = 5;
+ }
+ }
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll]) {
+#if HAVE_IO
+ printf("array4_check[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
+ array4_check[ii][jj][kk][ll]);
+ printf("array4[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
+ array4[ii][jj][kk][ll]);
+#endif
+ return 8;
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ FourDArray[ii][jj][kk][ll] = atoi(argv[1]);
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ {
+ array4[ii][jj][kk][ll] = 10;
+ array4_check[ii][jj][kk][ll] = 10;
+ }
+
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] +
+ FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] != 20)
+ array4[0:10:1][0:5:2][9:10:-1][x:y:z] = 10;
+ else
+ array4[0:10][0:5:2][9:10:-1][x:y:z] = 5;
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj < 10; jj += 2) {
+ for (kk = 9; kk >= 0; kk--) {
+ for (ll = 0; ll < 10; ll += 2) {
+ if (FourDArray[ii][jj][kk][ll] != 10)
+ array4_check[ii][jj][kk][ll] = 10;
+ else
+ array4_check[ii][jj][kk][ll] = 5;
+ }
+ }
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++)
+ for (jj = 0; jj < 10; jj++)
+ for (kk = 0; kk < 10; kk++)
+ for (ll = 0; ll < 10; ll++)
+ if (array4_check[ii][jj][kk][ll] != array4[ii][jj][kk][ll]) {
+#if HAVE_IO
+ printf("array4_check[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
+ array4_check[ii][jj][kk][ll]);
+ printf("array4[%d][%d][%d][%d] = %d\n",ii, jj, kk, ll,
+ array4[ii][jj][kk][ll]);
+#endif
+ return 9;
+ }
+
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test_errors.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test_errors.c
new file mode 100644
index 0000000000..579d396948
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/if_test_errors.c
@@ -0,0 +1,56 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+#include <stdlib.h>
+int main (void)
+{
+ int x = 3, y, z, array[10], array2[10], TwodArray[10][10], jj,kk,ll ;
+ int array2_check[10], array2d_check[10][10], array2d[10][10];
+ int FourDArray[10][10][10][10], array4[10][10][10][10];
+ int array4_check[10][10][10][10];
+ int ii = 0;
+
+ x = 5;
+ y = 10;
+ z = 2;
+
+ if (!array[:]) /* This is OK! */
+ array2[:] = 5;
+ else
+ array2[:] = 10;
+ if (!(array[0:10:1] + array[0:10:1])) /* { dg-error "condition and the then-block" "" { target c } } */
+ array2d[:][:] = 5; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
+ else
+ array2[:] = 10;
+
+ if (!(array[0:10:1] + array[0:10:1])) /* { dg-error "condition and the else-block" "" { target c } } */
+ array2[:] = 5;
+ else
+ array2d[:][:] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
+
+
+ if (TwodArray[:][:] != 10) /* { dg-error "condition and the then-block" "" { target c } } */
+ array2[:] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
+ else
+ array2[:] = 5;
+
+ if (FourDArray[43][:][:][:] != 10) /* This is OK! */
+ array4[45][:][:][:] = 10;
+ else
+ array4[32][:][:][:] = 5;
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (FourDArray[42][0:10:1][9:10:-1][0:5:2] != 10) /* { dg-error "condition and the then-block" "" { target c } } */
+ array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 10; /* { dg-error "rank mismatch with controlling expression of parent" "" { target c++ } } */
+ else
+ array4[0:10:1][0:5:2][9:10:-1][0:5:2] = 5;
+
+ /* atoi(argv[1]) == 10, so it will convert all 10's to 5's */
+ if (FourDArray[0:10:1][0:5:2][9:10:-1][x:y:z] +
+ FourDArray[0:10:1][0:5:2][9:-10:1][x:y:z] != 20)
+ array4[0:10:1][0:5:2][9:10:-1][x:y:z] = 10;
+ else
+ array4[0:10][0:5:2][9:10:-1][x:y:z] = 5;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/misc.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/misc.c
new file mode 100644
index 0000000000..814786b996
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/misc.c
@@ -0,0 +1,112 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10], array2[10][10];
+ int x, ii, jj ;
+
+ switch (array[:]) { /* { dg-error "cannot be used as a condition for switch statement" } */
+ case 1:
+ x = 5;
+ break;
+ case 2:
+ x = 2;
+ break;
+ default:
+ x = 9;
+ }
+
+ switch (array2[:][:]) { /* { dg-error "cannot be used as a condition for switch statement" } */
+ case 1:
+ x = 5;
+ break;
+ case 2:
+ x = 2;
+ break;
+ default:
+ x = 9;
+ }
+
+ switch (array[:] + x) { /* { dg-error "cannot be used as a condition for switch statement" } */
+ case 1:
+ x = 5;
+ break;
+ case 2:
+ x = 2;
+ break;
+ default:
+ x = 9;
+ }
+
+ switch (array2[:][1:x:4] + x) { /* { dg-error "cannot be used as a condition for switch statement" } */
+ case 1:
+ x = 5;
+ break;
+ case 2:
+ x = 2;
+ break;
+ default:
+ x = 9;
+ }
+
+ for (ii = 0; ii < array[:]; ii++) /* { dg-error "cannot be used in a condition for a for-loop" } */
+ {
+ x = 2;
+ }
+
+ for (ii = 0; ii < array2[:][:]; ii++) /* { dg-error "cannot be used in a condition for a for-loop" } */
+ {
+ x = 3;
+ }
+
+ for (; array2[:][:] < 2;) /* { dg-error "cannot be used in a condition for a for-loop" } */
+ x = 4;
+
+
+ while (array2[:][:]) /* { dg-error "cannot be used as a condition for while statement" } */
+ x = 3;
+
+ while (array[1:1:1]) /* { dg-error "cannot be used as a condition for while statement" } */
+ x = 1;
+
+ while (ii != array2[1:x:3][1:2:1]) /* { dg-error "cannot be used as a condition for while statement" } */
+ x = 2;
+
+ do { /* { dg-error "cannot be used as a condition for a do-while statement" "" { target c } } */
+ x = 3;
+ } while (ii != array2[:][:]); /* { dg-error "cannot be used as a condition for a do-while statement" "" { target c++ } } */
+
+ do { /* { dg-error "cannot be used as a condition for a do-while statement" "" { target c } } */
+ x = 2;
+ } while (ii != (x + array2[:][1:x:2]) + 2); /* { dg-error "cannot be used as a condition for a do-while statement" "" { target c++ } } */
+
+ do {
+ x += 3;
+ if (x == 5)
+ return array2[:][:]; /* { dg-error "array notation expression cannot be used as a return value" } */
+ } while (ii != 0);
+
+ for (ii = 0; ii < 10; ii++)
+ if (ii % 2)
+ return array[1:x:ii]; /* { dg-error "array notation expression cannot be used as a return value" } */
+
+ for (ii = 0; ii < x; ii++)
+ if (ii)
+ return array2[:][:]; /* { dg-error "array notation expression cannot be used as a return value" } */
+
+ for (array[:] = 0; ii < x; ii++) /* This should be OK. */
+ x= 2;
+
+ for (ii = 0; ii < 10; array[:]++) /* This is OK. */
+ x = 5;
+
+ for (jj = 0; jj < 10; array2[:][:]++) /* This is OK. */
+ x = 3;
+
+ for (jj = 0; jj < 10; array2[:][1:x:4]++, jj++) /* This is OK. */
+ x = 3;
+
+ return x;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/n-ptr-test.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/n-ptr-test.c
new file mode 100644
index 0000000000..750446c87d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/n-ptr-test.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 10
+#include <stdlib.h>
+
+int ***func2 (int ***a1, int ***a2, int size)
+{
+ a1[0:size:1][0:size:1][0:size] += (a2[0:size][0:size][0:size:1] + size);
+ return a1;
+}
+
+int main (void)
+{
+ int ii, jj, kk;
+ int ***array3, ***array2 = NULL, ***array = NULL;
+
+ array = (int ***) malloc (sizeof (int **) * NUMBER);
+ array2 = (int ***) malloc (sizeof (int **) * NUMBER);
+ for (ii = 0; ii < NUMBER; ii++) {
+ array[ii] = (int **) malloc (sizeof (int *) * NUMBER);
+ array2[ii] = (int **) malloc (sizeof (int *) * NUMBER);
+ for (jj = 0; jj < NUMBER; jj++) {
+ array[ii][jj] = (int *) malloc (sizeof (int) * NUMBER);
+ array2[ii][jj] = (int *) malloc (sizeof (int) * NUMBER);
+ }
+ }
+
+ for (ii = 0; ii < NUMBER; ii++) {
+ for (jj = 0; jj < NUMBER; jj++) {
+ for (kk = 0; kk < NUMBER; kk++) {
+ array[ii][jj][kk] = 5;
+ array2[ii][jj][kk]= 2;
+ }
+ }
+ }
+ array3 = func2 ((int ***)array, (int ***)array2, NUMBER);
+
+ for (ii = 0; ii < NUMBER; ii++) {
+ for (jj = 0; jj < NUMBER; jj++) {
+ for (kk = 0; kk < NUMBER; kk++) {
+ if (array3[ii][jj][kk] != (7 + NUMBER))
+ return 1;
+ }
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors.c
new file mode 100644
index 0000000000..18816e0ec6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+
+ array2[:] = array2[: ; /* { dg-error "expected ']'" } */
+
+ return 0;
+} /* { dg-error "expected ';' before" "" { target c } } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors2.c
new file mode 100644
index 0000000000..4314090f42
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+
+ array2[:] = array2[1:2:] ; /* { dg-error "expected expression before" "" { target c } } */
+ /* { dg-error "expected primary-expression before" "" { target c++ } 8 } */
+
+ return 0; /* { dg-error "expected ';' before" "" { target c } } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors3.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors3.c
new file mode 100644
index 0000000000..47b5979867
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors3.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+
+ array2[:] = array2[1: :] ; /* { dg-error "expected expression before" "" { target c } } */
+ /* { dg-error "expected primary-expression before" "" { target c++ } 8 } */
+
+ return 0; /* { dg-error "expected ';' before" "" { target c } } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors4.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors4.c
new file mode 100644
index 0000000000..a0efc04d25
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/parser_errors4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+
+ array2[:] = array2[ : : ] ; /* { dg-error " expected ']' before ':' token" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c
new file mode 100644
index 0000000000..ac11b9209b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+/* Test-case contains no array notation but is compiled with -fcilkplus.
+ It will still print the too few arguments func, thereby saying the
+ if-statement after the for-loop to check for !flag_enable_cilkplus ||
+ !is_cilkplus_reduce_function (fundecl) is not valid is always taken. */
+
+int func (int, int); /* { dg-message "declared here" } */
+
+int main (void)
+{
+ int a = 5, b = 2;
+ return func (a); /* { dg-error "too few arguments to function" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457.c
new file mode 100644
index 0000000000..68a1fd8118
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57457.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+/* This test has no array notation components in it and thus should compile
+ fine without crashing. */
+
+typedef unsigned int size_t;
+typedef int (*__compar_fn_t) (const void *, const void *);
+extern void *bsearch (const void *__key, const void *__base,
+ size_t __nmemb, size_t __size, __compar_fn_t
+ __compar)
+ __attribute__ ((__nonnull__ (1, 2, 5))) ;
+extern __inline __attribute__ ((__gnu_inline__)) void *
+bsearch (const void *__key, const void *__base, size_t __nmemb, size_t
+ __size,
+ __compar_fn_t __compar)
+{
+ size_t __l, __u, __idx;
+ const void *__p;
+ int __comparison;
+ __l = 0;
+ __u = __nmemb;
+ while (__l < __u)
+ {
+ __idx = (__l + __u) / 2;
+ __p = (void *) (((const char *) __base) +
+ (__idx * __size));
+ __comparison = (*__compar) (__key,
+ __p);
+ if (__comparison < 0)
+ __u = __idx;
+ else if (__comparison > 0)
+ __l = __idx + 1;
+ else
+ return (void *)
+ __p;
+ }
+ return ((void *)0);
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57490.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57490.c
new file mode 100644
index 0000000000..db38b30b5f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57490.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+const int n = 8;
+float x[8], y[8], z[8];
+int main() {
+ int i = 0;
+ float x_sum =0;
+ for(i=1; i<=5; i+=4 ) {
+ x[0:n] = 3;
+ y[0:n] = i;
+ z[0:n] = 0;
+ (void)((__sec_reduce_add(x[0:n])==3*n) || (__builtin_abort (), 0));
+ (void)((__sec_reduce_add(y[0:n])==i*n) || (__builtin_abort (), 0));
+ (void)((__sec_reduce_add(z[0:n])==0) || (__builtin_abort (), 0));
+
+ if (x[0:n] >= y[0:n]) {
+ z[0:n] = x[0:n] - y[0:n];
+ } else {
+ z[0:n] = x[0:n] + y[0:n];
+ }
+ (void)((__sec_reduce_add(x[0:n])==3*n) || (__builtin_abort (), 0));
+ (void)((__sec_reduce_add(y[0:n])==i*n) || (__builtin_abort (), 0));
+ (void)((__sec_reduce_add(z[0:n])==(3>=i?3-i:3+i)*n)
+ || (__builtin_abort (), 0));
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
new file mode 100644
index 0000000000..83325a7750
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541-2.c
@@ -0,0 +1,15 @@
+/* PR middle-end/57541 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int foo1 ()
+{
+ int a;
+ a = __sec_reduce_add (1); /* { dg-error "Invalid builtin arguments" } */
+}
+
+int foo2 ()
+{
+ int a;
+ a = __sec_reduce_add (); /* { dg-error "Invalid builtin arguments" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
new file mode 100755
index 0000000000..f379e461c5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57541.c
@@ -0,0 +1,26 @@
+/* PR middle-end/57541 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int A[10];
+
+int foo () {
+
+ /* C compiler uses the term "undeclared" whereas C++ compiler uses
+ "not declared". Thus, grepping for declared seem to be the easiest. */
+ char c = (char)N; /* { dg-error "declared" } */
+ short s = (short)N;
+ long l = (long)N;
+ A[l:s:c];
+}
+
+int foo1 (int N) {
+
+ char c = (char)N;
+ short s = (short)N;
+ A[l:s:c]; /* { dg-error "declared" } */
+}
+
+
+/* { dg-message "note: each" "defined" { target c } 11 } */
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57577.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57577.c
new file mode 100644
index 0000000000..98ab9e1665
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr57577.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 100
+int A[NUMBER], B[NUMBER][NUMBER];
+int foo (int a);
+
+int main () {
+ A[:] = foo (B[:][:]); /* { dg-error "rank mismatch between" } */
+ A[0] = foo (B[:][:]); /* { dg-error "cannot be scalar when" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c
new file mode 100644
index 0000000000..87903af3c8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr58942.c
@@ -0,0 +1,8 @@
+/* PR c/58942 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int foo (int*p, int i)
+{
+ return __sec_reduce_max_ind(p[1:i]);
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c
new file mode 100644
index 0000000000..deb8392183
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61191.c
@@ -0,0 +1,10 @@
+/* PR c/61191 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+double f(double * A, double * B)
+{
+ return __sec_reduce_add((B[0:500])(; /* { dg-error "called object" "" { target c } } */
+/* { dg-error "expected expression before ';' token" "" { target c } 7 } */
+/* { dg-error "expected primary-expression before ';' token" "" { target c++ } 7 } */
+} /* { dg-error "expected" "" { target c } } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
new file mode 100644
index 0000000000..60b424873d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455-2.c
@@ -0,0 +1,13 @@
+/* PR c++/61455 */
+/* { dg-options "-fcilkplus" } */
+
+int a[3] = {2, 3, 4};
+
+int main ()
+{
+ int c = 10;
+ int b = __sec_reduce_add(a[:]);
+ if (b+c != 19)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
new file mode 100644
index 0000000000..35a11b66c9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61455.c
@@ -0,0 +1,9 @@
+/* PR c++/61455 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void foo ()
+{
+ int a[2];
+ int b = a[:]; /* { dg-error "cannot be scalar" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c
new file mode 100644
index 0000000000..08d4fe2362
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61962.c
@@ -0,0 +1,14 @@
+/* PR other/61962 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+struct FloatStruct
+{
+ float *f;
+};
+
+/* Either SRC or DST must be a struct, otherwise the bug does not occur. */
+void f (struct FloatStruct* dst, float *src, unsigned int length)
+{
+ dst->f[0:length] = src[0:length];
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
new file mode 100644
index 0000000000..dfa713c4df
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr61963.c
@@ -0,0 +1,9 @@
+/* PR other/61963 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void f (int * int *a) /* { dg-error "expected" } */
+{
+ a[0:64] = 0; /* { dg-error "was not declared" "" { target c++ } 7 } */
+ a[0:64] = 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
new file mode 100644
index 0000000000..05734c5601
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/pr62008.c
@@ -0,0 +1,10 @@
+/* PR other/62008 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void f(int *a, int w, int h)
+{
+ int tmp[w][h];
+ tmp[:][:] = a[0:w][0:h]; /* { dg-error "base of array section must be pointer or array type" } */
+ /* { dg-error "start-index and length fields necessary" "" { target c } 8 } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch.c
new file mode 100644
index 0000000000..eb3c1f1d68
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -w" } */
+
+/* We use -w because in the first error, there will be a warning of setting an
+ integer to a pointer. Just ignore it to expose the rank mismatch error. */
+
+int main (void)
+{
+ int x = 0;
+ int array[10][10], array2[10];
+
+ array[:][:] = array[:]; /* { dg-error "rank mismatch between" } */
+ /* { dg-error "invalid conversion" "" { target c++ } 12 } */
+
+ x = array2[:]; /* { dg-error "cannot be scalar when" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch2.c
new file mode 100644
index 0000000000..4a4882dbae
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch2.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int function_call (int x);
+int function_call (int x)
+{
+ return x;
+}
+
+int main (void)
+{
+ int array[100], array2[100][100];
+ int argc = 4;
+ array[:] = array[:] + array2[:][:]; /* { dg-error "rank mismatch between" } */
+
+ if (array[:] + array2[:][:]) /* { dg-error "rank mismatch between" } */
+ return argc == 5;
+
+ argc += function_call (array[:] + array2[5:10:2][:]); /* { dg-error "rank mismatch between" } */
+
+ argc += function_call (function_call (array[:] + array2[5:10:2][:])); /* { dg-error "rank mismatch between" } */
+
+ argc += __sec_reduce_add (array[:], array2[:][:]); /* { dg-error "rank mismatch between" } */
+
+ argc += __sec_reduce_add (array2[:][:]) + argc; /* This is OK. */
+ return argc;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch3.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch3.c
new file mode 100644
index 0000000000..de335922f8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/rank_mismatch3.c
@@ -0,0 +1,19 @@
+/* { dg-options "-fcilkplus" } */
+
+int funct (int x, int y);
+void funct_void (int x, int y, int z);
+int main(void)
+{
+ int y, array[100], array2[100], array3[100][100], array4[100];
+
+ array[:] = ((array2[:] + array[:]) * array4[:]) + array3[:][:]; /* { dg-error "rank mismatch between" } */
+ array[:] = funct (array2[:], array3[:][:]); /* { dg-error "rank mismatch between" } */
+ array[:] = array3[:][:]; /* { dg-error "rank mismatch between" } */
+ array3[:][:] = array[:]; /* { dg-error "rank mismatch between" } */
+ array3[:][:] = array[5]; /* This is OK! */
+ funct_void (array2[:], array3[:][:], array[:]); /* { dg-error "rank mismatch between" } */
+ funct_void (array2[:], array3[:][:], array[:]); /* { dg-error "rank mismatch between" } */
+ funct_void (array3[:][:], array2[:], array[:]); /* { dg-error "rank mismatch between" } */
+ funct_void (array2[:], array[:], array3[:][0:10:1]); /* { dg-error "rank mismatch between" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit.c
new file mode 100644
index 0000000000..bacbf35056
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+
+ array[:][:] = __sec_implicit_index(5) + array[:][:]; /* { dg-error "__sec_implicit_index argument" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit2.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit2.c
new file mode 100644
index 0000000000..0aef0c29ac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int argc = 2;
+ int array[10][10], array2[10];
+ __asm volatile ("" : "+r" (argc));
+ array[:][:] = __sec_implicit_index(argc) + array[:][:]; /* { dg-error "__sec_implicit_index parameter" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit_ex.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit_ex.c
new file mode 100644
index 0000000000..419799a3b2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_implicit_ex.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define NUMBER 20
+
+int main(void)
+{
+ int jj, kk, array_3C[NUMBER][NUMBER][NUMBER];
+ int ii,array[NUMBER], y = 0, y_int = 0, array2[NUMBER],
+ array_3[NUMBER][NUMBER][NUMBER];
+ double x, yy, array3[NUMBER], array4[NUMBER];
+
+ array[:] = __sec_implicit_index (0);
+ array_3[:][:][:] = __sec_implicit_index (1) + __sec_implicit_index(0) +
+ __sec_implicit_index (2);
+
+ for (ii = 0; ii < NUMBER; ii++)
+ for (jj = 0; jj < NUMBER; jj++)
+ for (kk = 0; kk < NUMBER; kk++)
+ array_3C[ii][jj][kk] = ii+jj+kk;
+
+ for (ii = 0; ii < NUMBER; ii++)
+ for (jj = 0; jj < NUMBER; jj++)
+ for (kk = 0; kk < NUMBER; kk++)
+ if (array_3[ii][jj][kk] != array_3C[ii][jj][kk])
+ return 1;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c
new file mode 100644
index 0000000000..34c6f12846
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_ind_same_value.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+int A[256];
+
+int main () {
+ A[:] = 2;
+ int max_index = 0, min_index = 0;
+
+ max_index = __sec_reduce_max_ind (A[:]);
+
+ if (max_index != 255)
+ return 1;
+
+ min_index = __sec_reduce_min_ind (A[:]);
+ if (min_index != 255)
+ return 2;
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c
new file mode 100644
index 0000000000..9652e1594b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_max_min_ind.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int array[10][10], array2[10];
+ int x, y;
+ x = __sec_reduce_max_ind (array[:][:]); /* { dg-error "cannot have arrays with dimension greater than" } */
+
+ y = __sec_reduce_max_ind (array2[:]); /* this should be OK. */
+
+ x = __sec_reduce_min_ind (array[:][:]); /* { dg-error "cannot have arrays with dimension greater than" } */
+
+ y = __sec_reduce_min_ind (array2[:]); /* this should be OK. */
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_return.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_return.c
new file mode 100644
index 0000000000..034017146f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/sec_reduce_return.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+int add_all (int *my_array, int size)
+{
+ return __sec_reduce_add (my_array[0:size]);
+}
+
+int mult_all (int *my_array, int size)
+{
+ return __sec_reduce_mul (my_array[0:size]);
+}
+
+int main (void)
+{
+ int argc = 1;
+ int array[10000];
+
+ __asm volatile ("" : "+r" (argc));
+ array[:] = argc; /* All elements should be one. */
+
+ if (add_all (array, 10000) != 10000)
+ return 1;
+
+ if (mult_all (array, 10000) != 1)
+ return 2;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c
new file mode 100644
index 0000000000..8b0034e727
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/side-effects-1.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+/* Test that the array index, limit, and stride are evaluated only
+ once. */
+
+int array[1000];
+
+int func1_times = 0;
+int func2_times = 0;
+int func3_times = 0;
+int func1() { func1_times++; return 0; }
+int func2() { func2_times++; return 0; }
+int func3() { func3_times++; return 0; }
+
+int main()
+{
+ array[func1() + 11 : func2() + 22 : func3() + 33] = 666;
+
+ if (func1_times != 1
+ || func2_times != 1
+ || func3_times != 1)
+ return 1;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/test_builtin_return.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/test_builtin_return.c
new file mode 100644
index 0000000000..b9f9f8d650
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/test_builtin_return.c
@@ -0,0 +1,73 @@
+/* { dg-options "-lm -fcilkplus" } */
+/* { dg-do run } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+#include <math.h>
+#define NUMBER 5
+
+int func1 (int *a1, int *a2)
+{
+ return __sec_reduce_add (a1[0:NUMBER] * a2[0:NUMBER:1]);
+}
+
+int func2 (int *a1, int *a2)
+{
+ return (__sec_reduce_add (a1[0:NUMBER] * a2[0:NUMBER]) +
+ __sec_reduce_mul (a1[0:NUMBER] + a2[0:NUMBER]));
+}
+
+int func3 (int *a1, int *a2)
+{
+ return (int) sqrt ((double)(__sec_reduce_add (a1[0:NUMBER] * a2[0:NUMBER]) +
+ a2[0] + a2[1] + a2[3]));
+}
+
+int func4 (int *a1, int *a2)
+{
+ return a1[NUMBER-1] * (__sec_reduce_add (a1[0:NUMBER] * a2[0:NUMBER]) + a2[0] + a2[1] + a2[3])/a1[NUMBER-2];
+}
+int main(void)
+{
+ int array[NUMBER], array2[NUMBER];
+ int return_value = 0;
+ int ii = 0;
+ int argc = 1;
+ __asm volatile ("" : "+r" (argc));
+ for (ii = 0; ii < NUMBER; ii++)
+ {
+ array[ii] = argc; /* This should calculate to 1. */
+ array2[ii] = argc * argc + argc; /* This should calculate to 2. */
+ }
+
+ return_value = func1 (array, array2);
+#if HAVE_IO
+ printf("Return_value = %d\n", return_value);
+#endif
+ if (return_value != (2+2+2+2+2))
+ return 1;
+
+ return_value = func2 (array2, array);
+#if HAVE_IO
+ printf("Return_value = %d\n", return_value);
+#endif
+ if (return_value != (3*3*3*3*3) + (2+2+2+2+2))
+ return 2;
+
+ return_value = func3 (array, array2);
+#if HAVE_IO
+ printf("Return_value = %d\n", return_value);
+#endif
+ if (return_value != 4)
+ return 3;
+
+ return_value = func4 (array, array2);
+#if HAVE_IO
+ printf("Return_value = %d\n", return_value);
+#endif
+ if (return_value != 16)
+ return 4;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/test_sec_limits.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/test_sec_limits.c
new file mode 100644
index 0000000000..f4f3ca5a6b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/test_sec_limits.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <limits.h>
+int A[16];
+int a = 0;
+
+int main () {
+ if (__sec_reduce_max(A[0:0:2]) != INT_MIN)
+ a++;
+
+ if (__sec_reduce_min(A[0:0:2]) != INT_MAX)
+ a++;
+
+ return a;
+}
+
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/tst_lngth.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/tst_lngth.c
new file mode 100644
index 0000000000..015a7eb737
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/tst_lngth.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options " -fcilkplus " } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+#define N 256
+int A[N], B[N];
+
+int
+main ()
+{
+ A[0:(N / 4)] = A[4]+ B[0:(N / 2):2]; /* { dg-error "length mismatch between" } */
+ A[0:(N / 4)] = B[0:(N / 2):2] + N; /* { dg-error "length mismatch between" } */
+ A[0:(N / 4)] = B[0:(N / 2):2] + A[4]; /* { dg-error "length mismatch between" } */
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/AN/vla.c b/gcc/testsuite/c-c++-common/cilk-plus/AN/vla.c
new file mode 100644
index 0000000000..3b0777e0f3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/AN/vla.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target c } } */
+/* { dg-options "-fcilkplus -std=c99 -w" } */
+
+int func (int x)
+{
+ return x++;
+}
+int main(void)
+{
+ int argc = 1;
+ __asm volatile ("" : "+r" (argc));
+ int array[argc];
+
+ array[:] = 5; /* { dg-error "start-index and length fields necessary for using array notations in variable-length arrays." } */
+ array[0:argc] = 5; /* This is OK. */
+ array[0:5:2] = 5; /* This is OK. */
+ array[0:argc:2] = 5; /* This is OK. */
+ array[0:argc:func (argc-2)] = 5; /* This is OK. */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/compound_cilk_spawn.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/compound_cilk_spawn.c
new file mode 100644
index 0000000000..5e687bd0a0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/compound_cilk_spawn.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+/* <feature>
+ A program is considered ill formed if the _Cilk_spawn form of this
+ expression appears other than in one of the following contexts:
+ as the entire body of an expression statement,
+ as the entire right hand side of an assignment expression that is the entire
+ body of an expression statement, or as the entire initializer-clause in a
+ simple declaration.
+ </feature>
+*/
+
+int spawn_func (int arg)
+{
+ return arg + 1;
+}
+
+int check()
+{
+ int z;
+ z = 23, _Cilk_spawn spawn_func (3), 3424; /* { dg-error "spawned function call cannot be part of a comma expression" } */
+ 23, spawn_func (5), _Cilk_spawn spawn_func (3); /* { dg-error "spawned function call cannot be part of a comma expression" } */
+ _Cilk_spawn spawn_func (0), _Cilk_spawn spawn_func (3), 3, spawn_func (0); /* { dg-error "spawned function call cannot be part of a comma expression" } */
+ return 23;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c
new file mode 100644
index 0000000000..b93c9626d1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/concec_cilk_spawn.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+/* <feature> Consecutive _Cilk_spawn tokens are not permitted
+ </feature>
+*/
+
+int spawn_func (int arg)
+{
+ return arg + 1;
+}
+
+void func ()
+{
+ int a;
+ a = _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */
+ a = _Cilk_spawn _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */
+ a = _Cilk_spawn _Cilk_spawn _Cilk_spawn _Cilk_spawn spawn_func (4); /* { dg-error "consecutive" } */
+ return;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/fib.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib.c
new file mode 100644
index 0000000000..a8849fb9e6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib.c
@@ -0,0 +1,54 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+int fib (int);
+int fib_serial (int);
+
+#define FIB_ITERATION 30
+
+int main(void)
+{
+ int ii = 0;
+ int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
+#if HAVE_IO
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ printf("fib (%2d) = %10d\n", ii, fib (ii));
+#else
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ fib_result[ii] = fib (ii);
+ }
+
+ fib_serial_result[0] = 0;
+ fib_serial_result[1] = 1;
+ for (ii = 2; ii <= FIB_ITERATION; ii++)
+ fib_serial_result[ii] = fib_serial_result[ii-1] + fib_serial_result[ii-2];
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ if (fib_result[ii] != fib_serial_result[ii])
+ __builtin_abort ();
+ }
+#endif
+ return 0;
+}
+
+int fib(int n)
+{
+ int x = 0, y = 0;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = _Cilk_spawn fib(n-1);
+ y = fib(n-2);
+ _Cilk_sync;
+ return (x+y);
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_init_expr_xy.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_init_expr_xy.c
new file mode 100644
index 0000000000..0196a8daba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_init_expr_xy.c
@@ -0,0 +1,68 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+int fib (int);
+int fib_serial (int);
+
+#define FIB_ITERATION 30
+
+int main(void)
+{
+ int ii = 0;
+ int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
+#if HAVE_IO
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ printf("fib (%2d) = %10d\n", ii, fib (ii));
+#else
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ fib_result[ii] = fib (ii);
+ }
+
+ fib_serial_result[0] = 0;
+ fib_serial_result[1] = 1;
+
+ for (ii = 2; ii <= FIB_ITERATION; ii++)
+ fib_serial_result[ii] = fib_serial_result[ii-1] + fib_serial_result[ii-2];
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ if (fib_result[ii] != fib_serial_result[ii])
+ __builtin_abort ();
+ }
+
+#endif
+ return 0;
+}
+
+int fib_serial (int n)
+{
+ int x = 0, y = 0;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = fib_serial (n-1);
+ y = fib_serial (n-2);
+ return (x+y);
+ }
+}
+
+int fib(int n)
+{
+ if (n < 2)
+ return n;
+ else
+ {
+ int x = _Cilk_spawn fib(n-1);
+ int y = fib(n-2);
+ _Cilk_sync;
+ return (x+y);
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_return.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_return.c
new file mode 100644
index 0000000000..47ebef5203
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_return.c
@@ -0,0 +1,73 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+#define FIB_ITERATION 30
+
+void fib (int *, int);
+int fib_serial (int);
+
+int main(void)
+{
+ int ii = 0, error = 0;
+ int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
+
+#if HAVE_IO
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ int result = 0;
+ fib (&result, ii);
+ printf("fib (%2d) = %10d\n", ii, result);
+ }
+#else
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ fib (&fib_result[ii], ii);
+ }
+
+ fib_serial_result[0] = 0;
+ fib_serial_result[1] = 1;
+
+ for (ii = 2; ii <= FIB_ITERATION; ii++)
+ fib_serial_result[ii] = fib_serial_result[ii-1] + fib_serial_result[ii-2];
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ if (fib_result[ii] != fib_serial_result[ii])
+ __builtin_abort ();
+ }
+#endif
+
+ return 0;
+}
+
+int fib_serial (int n)
+{
+ int x = 0, y = 0;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = fib_serial (n-1);
+ y = fib_serial (n-2);
+ return (x+y);
+ }
+}
+
+void fib(int *result, int n)
+{
+ int x = 0, y = 0;
+ if (n < 2)
+ x = n;
+ else
+ {
+ _Cilk_spawn fib(&x, n-1);
+ fib(&y, n-2);
+ _Cilk_sync;
+ }
+ *result = (x+y);
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_sync.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_sync.c
new file mode 100644
index 0000000000..a23051d481
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/fib_no_sync.c
@@ -0,0 +1,67 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+#define FIB_ITERATION 30
+
+int fib (int);
+int fib_serial (int);
+
+int main(void)
+{
+ int ii = 0;
+ int fib_result[FIB_ITERATION+1], fib_serial_result[FIB_ITERATION+1];
+#if HAVE_IO
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ printf("fib (%2d) = %10d\n", ii, fib (ii));
+#else
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ fib_result[ii] = fib (ii);
+ }
+
+ fib_serial_result[0] = 0;
+ fib_serial_result[1] = 1;
+
+ for (ii = 2; ii <= FIB_ITERATION; ii++)
+ fib_serial_result[ii] = fib_serial_result[ii-1] + fib_serial_result[ii-2];
+
+ for (ii = 0; ii <= FIB_ITERATION; ii++)
+ {
+ if (fib_result[ii] != fib_serial_result[ii])
+ __builtin_abort ();
+ }
+
+#endif
+ return 0;
+}
+
+int fib_serial (int n)
+{
+ int x = 0, y = 0;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = fib_serial (n-1);
+ y = fib_serial (n-2);
+ return (x+y);
+ }
+}
+
+int fib(int n)
+{
+ if (n < 2)
+ return n;
+ else
+ {
+ int x = _Cilk_spawn fib(n-1);
+ int y = fib(n-2);
+ return (x+y);
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
new file mode 100644
index 0000000000..5b43be7601
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_spawns.c
@@ -0,0 +1,14 @@
+/* { dg-options "-fcilkplus" } */
+
+extern int foo ();
+int bar = _Cilk_spawn foo (); /* { dg-error "may only be used inside a function" } */
+
+
+int main (void)
+{
+ int x;
+
+ _Cilk_spawn foo; /* { dg-error "only function calls can be spawned" } */
+ _Cilk_spawn x; /* { dg-error "only function calls can be spawned" } */
+ return x;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc
new file mode 100644
index 0000000000..cf1caf12b3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/invalid_sync.cc
@@ -0,0 +1,9 @@
+/* PR c/60189 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ _Cilk_sync return; /* { dg-error " expected ';' before 'return'" } */
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c
new file mode 100644
index 0000000000..593732ef5a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/no_args_error.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int spawn_1 ();
+typedef int(*func) (int);
+
+void check () {
+ func var = spawn_1; /* { dg-error "invalid conversion from" "" { target c++ } 8 } */
+ _Cilk_spawn var (); /* { dg-error "too few arguments to function" } */
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr59631.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr59631.c
new file mode 100644
index 0000000000..389ee7c5da
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr59631.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options " " } */
+
+/* Tests the errors when Cilk keywords are used without -fcilkplus. */
+
+void foo()
+{
+ _Cilk_spawn foo(); /* { dg-error "must be enabled to use" } */
+}
+
+void foo2 ()
+{
+ _Cilk_spawn foo (); /* { dg-error "must be enabled to use" } */
+ _Cilk_sync; /* { dg-error "must be enabled to use" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
new file mode 100644
index 0000000000..1e5ca00a40
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197-2.c
@@ -0,0 +1,35 @@
+/* PR c/60197 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+extern int foo (void);
+
+int
+fn1 (void)
+{
+ int i;
+ i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn2 (void)
+{
+ int i = (_Cilk_spawn foo ()) + 1; /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn3 (int j, int k, int l)
+{
+ int i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
+ return i;
+}
+
+int
+fn4 (int j, int k, int l)
+{
+ int i;
+ i = (((((_Cilk_spawn foo ()) + 1) - l) * k) / j); /* { dg-error "invalid use of" } */
+ return i;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c
new file mode 100644
index 0000000000..2b47d1efb7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60197.c
@@ -0,0 +1,66 @@
+/* PR c/60197 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+extern int foo (void);
+extern int bar (int);
+
+int
+fn1 (void)
+{
+ return (_Cilk_spawn foo ()) * 2; /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn2 (void)
+{
+ return (_Cilk_spawn foo ()) > 2; /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn3 (int i, int j, int k)
+{
+ return ((((((_Cilk_spawn foo () + i) - j) * k) / j) | i) ^ k) ; /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn4 (int i, int j, int k)
+{
+ return (((((i - _Cilk_spawn foo ()) * k) / j) | i) ^ k); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn5 (void)
+{
+ return _Cilk_spawn foo (); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn6 (void)
+{
+ return _Cilk_spawn foo () + _Cilk_spawn foo (); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn7 (void)
+{
+ return 5 % _Cilk_spawn foo (); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn8 (void)
+{
+ return !_Cilk_spawn foo (); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn9 (void)
+{
+ return foo () && _Cilk_spawn foo (); /* { dg-error "in a return statement is not allowed" } */
+}
+
+int
+fn10 (void)
+{
+ return bar (_Cilk_spawn foo ()); /* { dg-error "in a return statement is not allowed" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c
new file mode 100644
index 0000000000..ca0cf7f68b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/pr60469.c
@@ -0,0 +1,15 @@
+/* PR middle-end/60469 */
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+void foo() {}
+
+#define ALEN 1024
+
+int main(int argc, char* argv[])
+{
+ int b[ALEN];
+ b[:] = 100;
+ _Cilk_spawn foo();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c
new file mode 100644
index 0000000000..14b7eef127
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawn_in_return.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ extern int foo ();
+ return _Cilk_spawn foo (); /* { dg-error "return statement is not allowed" } */
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawnee_inline.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawnee_inline.c
new file mode 100644
index 0000000000..233a371f14
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawnee_inline.c
@@ -0,0 +1,80 @@
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus -w" } */
+/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#define DEFAULT_VALUE "30"
+
+int fib (char *n_char)
+{
+ int n;
+ char n_char_minus_one[20], n_char_minus_two[20];
+ if (n_char)
+ n = atoi (n_char);
+ else
+ n = atoi(DEFAULT_VALUE);
+
+ if (n < 2)
+ return n;
+ else
+ {
+ int x, y;
+ sprintf (n_char_minus_one,"%d", n-1);
+ sprintf (n_char_minus_two,"%d", n-2);
+ x = _Cilk_spawn fib (n_char_minus_one);
+ y = _Cilk_spawn fib (n_char_minus_two);
+ _Cilk_sync;
+ return (x+y);
+ }
+}
+
+int fib_serial (int n)
+{
+ int x, y;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = fib_serial (n-1);
+ y = fib_serial (n-2);
+ return (x+y);
+ }
+ return 0;
+}
+
+int main2_parallel (int argc, char *argv[])
+{
+ int n, result_parallel = 0;
+
+ if (argc == 2)
+ {
+ result_parallel = _Cilk_spawn fib (argv[1]);
+ _Cilk_sync;
+ }
+ else
+ {
+ result_parallel = _Cilk_spawn fib((char *)"30");
+ _Cilk_sync;
+ }
+ return result_parallel;
+}
+
+int main2_serial (int argc, char *argv[])
+{
+ int n, result_serial = 0;
+ if (argc == 2)
+ result_serial = fib_serial (atoi (argv[1]));
+ else
+ result_serial = fib_serial (atoi (DEFAULT_VALUE));
+
+ return result_serial;
+}
+
+int main (void)
+{
+ if (main2_serial (1, 0) != main2_parallel (1,0))
+ return 1;
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c
new file mode 100644
index 0000000000..55ec223abb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawner_inline.c
@@ -0,0 +1,67 @@
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#include <stdlib.h>
+#define DEFAULT_VALUE 30
+int fib (int n)
+{
+ if (n<2)
+ return n;
+ else
+ {
+ int x, y;
+ x = _Cilk_spawn fib (n-1);
+ y = _Cilk_spawn fib (n-2);
+ _Cilk_sync;
+ return (x+y);
+ return 5;
+ }
+}
+
+int main_parallel (int argc, char *argv[])
+{
+ int n, result;
+ if (argc == 2)
+ n = atoi(argv[1]);
+ else
+ n = DEFAULT_VALUE;
+ result = _Cilk_spawn fib(n);
+ _Cilk_sync;
+ return result;
+}
+
+int fib_serial (int n)
+{
+ int x, y;
+ if (n < 2)
+ return n;
+ else
+ {
+ x = fib (n-1);
+ y = fib (n-2);
+ return (x+y);
+ }
+}
+
+int main_serial (int argc, char *argv[])
+{
+ int n, result;
+
+ if (argc == 2)
+ n = atoi (argv[1]);
+ else
+ n = DEFAULT_VALUE;
+ result = fib_serial (n);
+
+ return result;
+}
+
+int main (void)
+{
+ if (main_serial (1, 0) != main_parallel (1,0))
+ return 1;
+ else
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c
new file mode 100644
index 0000000000..95e6cab02c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/spawning_arg.c
@@ -0,0 +1,37 @@
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+void f0(volatile int *steal_flag)
+{
+ int i = 0;
+ /* Wait for steal_flag to be set */
+ while (!*steal_flag)
+ ;
+}
+
+int f1()
+{
+
+ volatile int steal_flag = 0;
+ _Cilk_spawn f0(&steal_flag);
+ steal_flag = 1; // Indicate stolen
+ _Cilk_sync;
+ return 0;
+}
+
+void f2(int q)
+{
+ q = 5;
+}
+
+void f3()
+{
+ _Cilk_spawn f2(f1());
+}
+
+int main()
+{
+ f3();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c
new file mode 100644
index 0000000000..6e2876531c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/steal_check.c
@@ -0,0 +1,43 @@
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+// #include <cilk/cilk_api.h>
+extern void __cilkrts_set_param (char *, char *);
+
+void foo(volatile int *);
+
+void main2(void);
+
+int main(void)
+{
+ // __cilkrts_set_param ((char *)"nworkers", (char *)"2");
+ main2();
+ return 0;
+}
+
+
+void main2(void)
+{
+ int some_var = 0;
+
+ _Cilk_spawn foo(&some_var);
+
+ some_var=1;
+ some_var=5;
+ some_var=3;
+ some_var=4;
+
+ _Cilk_sync;
+ return;
+}
+
+void foo(volatile int *some_other_var)
+{
+ while (*some_other_var == 0)
+ {
+ ;
+ }
+}
+
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/sync_wo_spawn.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/sync_wo_spawn.c
new file mode 100644
index 0000000000..51be796e56
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/sync_wo_spawn.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ _Cilk_sync; /* { dg-error "expected '_Cilk_spawn' before '_Cilk_sync'" } */
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/test__cilk.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/test__cilk.c
new file mode 100644
index 0000000000..2b37cd664c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/test__cilk.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ if (__cilk == 200)
+ return 0;
+ return 1;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/CK/varargs_test.c b/gcc/testsuite/c-c++-common/cilk-plus/CK/varargs_test.c
new file mode 100644
index 0000000000..2714600244
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/CK/varargs_test.c
@@ -0,0 +1,47 @@
+/* { dg-do run { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus" } */
+/* { dg-additional-options "-lcilkrts" { target { i?86-*-* x86_64-*-* } } } */
+
+#include <stdarg.h>
+#include <stdlib.h>
+
+
+double compute_total (int no_elements, ...);
+
+int main(void)
+{
+ double array[5] = {5.0, 4.0, 9.0, 3.0, 4.0};
+ double array2[5] = {5.0, 6.0, 8.0, 6.0};
+ double yy=0, xx=0, xx_serial, yy_serial;
+
+ yy = _Cilk_spawn compute_total(5,array[0],array[1],array[2],
+ array[3], array[4]);
+ xx= compute_total(4,array2[0],array2[1],array2[2], array2[3]);
+
+ _Cilk_sync;
+
+ yy_serial = compute_total(5,array[0],array[1],array[2], array[3], array[4]);
+ xx_serial = compute_total(4,array2[0],array2[1],array2[2], array2[3]);
+
+ if ((xx + yy) != (xx_serial + yy_serial))
+ return 1;
+ return 0;
+
+}
+
+
+double compute_total (int no_elements, ...)
+{
+ double total = 0;
+ va_list args;
+ va_start(args, no_elements);
+ int ii = 0;
+ for (ii = 0; ii < no_elements; ii++)
+ {
+ total += va_arg(args,double);
+ }
+ va_end(args);
+
+ return total;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/body.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/body.c
new file mode 100644
index 0000000000..82c0a0c20b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/body.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -fopenmp" } */
+/* { dg-require-effective-target fopenmp } */
+
+int *a, *b, c;
+void *jmpbuf[10];
+
+void foo()
+{
+ int j;
+
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ if (c == 6)
+ __builtin_setjmp (jmpbuf); /* { dg-error "setjmp" } */
+ a[i] = b[i];
+ }
+
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ if (c==5)
+ break; /* { dg-error "break statement " } */
+ }
+
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+#pragma omp for /* { dg-error "OpenMP constructs may not" } */
+ for (j=0; j < 1000; ++j)
+ a[i] = b[i];
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses1.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses1.c
new file mode 100644
index 0000000000..27d117ec2f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses1.c
@@ -0,0 +1,80 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Werror -Wunknown-pragmas -fcilkplus" } */
+
+volatile int *a, *b;
+
+void foo()
+{
+ int i, j, k;
+
+#pragma simd assert /* { dg-error "expected '#pragma simd' clause" } */
+ for (i=0; i < 100; ++i)
+ a[i] = b[i];
+
+#pragma simd vectorlength /* { dg-error "expected '\\('" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd vectorlength /* { dg-error "expected '\\('" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd vectorlength(sizeof (a) == sizeof (float) ? 4 : 8)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd vectorlength(4,8) /* { dg-error "expected '\\)'" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd vectorlength(i) /* { dg-error "\(vectorlength must be an integer\|in a constant\)" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(35) /* { dg-error "expected identifier" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(blah) /* { dg-error "'blah' \(undeclared\|has not been\)" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(j, 36, k) /* { dg-error "expected" } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(i, j)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(i)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(i : 4)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(i : 2, j : 4, k)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(j : sizeof (a) == sizeof (float) ? 4 : 8)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+ // And now everyone in unison!
+#pragma simd linear(j : 4) vectorlength(4)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(blah2, 36)
+ /* { dg-error "'blah2' \(undeclared\|has not been\)" "undeclared" { target *-*-* } 71 } */
+ /* { dg-error "expected" "expected" { target *-*-* } 71 } */
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+
+#pragma simd linear(j : k)
+ for (int i=0; i < 1234; ++i)
+ a[i] = b[j];
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses2.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses2.c
new file mode 100644
index 0000000000..71589c2b17
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-original -fcilkplus" } */
+
+volatile int *a, *b;
+
+void foo()
+{
+ int j, k;
+
+#pragma simd linear(j : 4, k) vectorlength(4)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[j];
+}
+
+/* { dg-final { scan-tree-dump-times "linear\\(j:4\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "linear\\(k:1\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "safelen\\(4\\)" 1 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses3.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses3.c
new file mode 100644
index 0000000000..579b718a01
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/clauses3.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+#define N 1000
+
+int A[N], B[N], C[N];
+int main (void)
+{
+#pragma simd private (B) linear(B:1) /* { dg-error "more than one clause" } */
+ for (int ii = 0; ii < N; ii++)
+ {
+ A[ii] = B[ii] + C[ii];
+ }
+
+#pragma simd private (B, C) linear(B:1) /* { dg-error "more than one clause" } */
+ for (int ii = 0; ii < N; ii++)
+ {
+ A[ii] = B[ii] + C[ii];
+ }
+
+#pragma simd private (B) linear(C:2, B:1) /* { dg-error "more than one clause" } */
+ for (int ii = 0; ii < N; ii++)
+ {
+ A[ii] = B[ii] + C[ii];
+ }
+
+#pragma simd reduction (+:B) linear(B:1) /* { dg-error "more than one clause" } */
+ for (int ii = 0; ii < N; ii++)
+ {
+ A[ii] = B[ii] + C[ii];
+ }
+
+#pragma simd reduction (+:B) linear(B) /* { dg-error "more than one clause" } */
+ for (int ii = 0; ii < N; ii++)
+ {
+ A[ii] = B[ii] + C[ii];
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/for1.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/for1.c
new file mode 100644
index 0000000000..3b678952c7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/for1.c
@@ -0,0 +1,132 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+int *a, *b, *c;
+int something;
+
+void foo()
+{
+ int i, j;
+
+ // Declaration and initialization is allowed.
+#pragma simd
+ for (int i=0; i < 1000; i++)
+ a[i] = b[j];
+
+ // Empty initialization is not allowed.
+#pragma simd
+ for (; i < 5; ++i) // { dg-error "expected iteration" }
+ a[i] = i;
+
+ // Empty condition is not allowed.
+#pragma simd
+ for (int i=0; ; ++i) /* { dg-error "missing controlling" } */
+ a[i] = i;
+
+ // Empty increment is not allowed.
+#pragma simd
+ for (int i=0; i < 1234; ) /* { dg-error "missing increment" } */
+ a[i] = i*2;
+
+#pragma simd
+ i = 5; /* { dg-error "for statement expected" } */
+
+ // Initialization variables must be either integral or pointer types.
+ struct S {
+ int i;
+ };
+#pragma simd
+ for (struct S ss = { 0 }; ss.i <= 1000; ++ss.i) /* { dg-error "invalid controlling\|invalid type for iteration\|invalid increment" } */
+ a[ss.i] = b[ss.i];
+
+ #pragma simd
+ for (float f=0.0; f < 15.0; ++f) /* { dg-error "invalid type" } */
+ a[(int)f] = (int) f;
+
+ // Pointers are OK.
+ #pragma simd
+ for (int *i=c; i < &c[100]; ++i)
+ *a = '5';
+
+ // Condition of '==' is not allowed.
+#pragma simd
+ for (int i=j; i == 5; ++i) /* { dg-error "invalid controlling predicate" } */
+ a[i] = b[i];
+
+ // The LHS or RHS of the condition must be the initialization variable.
+#pragma simd
+ for (int i=0; i+j < 1234; ++i) /* { dg-error "invalid controlling predicate" } */
+ a[i] = b[i];
+
+ // Likewise.
+#pragma simd
+ for (int i=0; 1234 < i + j; ++i) /* { dg-error "invalid controlling predicate" } */
+ a[i] = b[i];
+
+ // Likewise, this is ok.
+#pragma simd
+ for (int i=0; 1234 + j < i; ++i)
+ a[i] = b[i];
+
+ // According to the CilkPlus forum, casts are not allowed, even if
+ // they are no-ops.
+#pragma simd
+ for (int i=0; (char)i < 1234; ++i) /* { dg-error "invalid controlling predicate" } */
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=255; i != something; --i)
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=100; i != 5; i += something)
+ a[i] = b[i];
+
+ // Increment must be on the induction variable.
+#pragma simd
+ for (int i=0; i < 100; j++) /* { dg-error "invalid increment expression" } */
+ a[i] = b[i];
+
+ // Likewise.
+#pragma simd
+ for (int i=0; i < 100; j = i + 1) /* { dg-error "invalid increment expression" } */
+ a[i] = b[i];
+
+ // Likewise.
+#pragma simd
+ for (int i=0; i < 100; i = j + 1) /* { dg-error "invalid increment expression" } */
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=0; i < 100; i = i + 5)
+ a[i] = b[i];
+
+ // Only PLUS and MINUS increments are allowed.
+#pragma simd
+ for (int i=0; i < 100; i *= 5) /* { dg-error "invalid increment expression" } */
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=0; i < 100; i -= j)
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=0; i < 100; i = i + j)
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=0; i < 100; i = j + i)
+ a[i] = b[i];
+
+#pragma simd
+ for (int i=0; i < 100; ++i, ++j) /* { dg-error "invalid increment expression" } */
+ a[i] = b[i];
+
+#pragma simd
+ for (int *point=0; point < b; ++point)
+ *point = 555;
+
+#pragma simd
+ for (int *point=0; point > b; --point)
+ *point = 555;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/for2.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/for2.c
new file mode 100644
index 0000000000..86606275ac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/for2.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+#pragma simd /* { dg-error "must be inside a function" } */
+
+void foo()
+{
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/for3.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/for3.c
new file mode 100644
index 0000000000..2da8235f31
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/for3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+int *a, *c;
+
+void foo()
+{
+ int i, j;
+
+ // Pointers are OK.
+ #pragma simd
+ for (int *i=c; i < c; ++i)
+ *a = '5';
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-1.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-1.c
new file mode 100644
index 0000000000..d8cec84f14
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-1.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+/* FIXME: This test has been xfailed until reductions are fixed. */
+
+int argc = 1;
+
+/* This is a simple vectorization test. It tests if reduction works
+ and if it can vectorize the loop in func correctly. */
+#define N 1000
+
+int func (int *p, int *q) {
+ int x = 0;
+#pragma simd reduction (+:x)
+ for (int ii = 0; ii < N; ii++) {
+ x += (q[ii] + p[ii]);
+ }
+ return x;
+
+}
+
+int main ()
+{
+ int ii = 0, x;
+ int Array[N], Array2[N];
+
+ for (ii = 0; ii < N; ii++)
+ {
+ Array[ii] = 5 + argc;
+ Array2[ii] = argc;
+ }
+ x = func (Array, Array2);
+
+ if (x != N * 7)
+ return 1;
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-2.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-2.c
new file mode 100644
index 0000000000..f5554f6b1a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-2.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+/* FIXME: This test has been xfailed until reductions are fixed. */
+
+#include <stdio.h>
+
+#define ARRAY_SIZE (256)
+int a[ARRAY_SIZE];
+
+__attribute__((noinline))
+int addit (int *arr, int N)
+{
+ int s=0;
+#pragma simd reduction (+:s)
+ for (int i = 0; i < N; i++)
+ s += arr[i];
+ return s;
+}
+
+int main () {
+ int i, s = 0, r = 0;
+ for (i = 0; i < ARRAY_SIZE; i++)
+ {
+ a[i] = i;
+ }
+
+ s = addit (a, ARRAY_SIZE);
+
+ for (i = 0; i < ARRAY_SIZE; i++)
+ r += i;
+
+ if (s == r)
+ return 0;
+ return 1;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-3.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-3.c
new file mode 100644
index 0000000000..35cb904a54
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/reduction-3.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+#define N 256
+#if HAVE_IO
+#include <stdio.h>
+#endif
+#include <stdlib.h>
+
+int
+reduction_simd (int *a)
+{
+ int s = 0;
+
+#pragma simd reduction (+:s)
+ for (int i = 0; i < N; i++)
+ {
+ s += a[i];
+ }
+
+ return s;
+}
+
+int
+main ()
+{
+ int *a = (int *) malloc (N * sizeof (int));
+ int i, s = (N - 1) * N / 2;
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i;
+ }
+#if HAVE_IO
+ printf ("%d, %d\n", s, reduction_simd (a));
+#endif
+ if (s == reduction_simd (a))
+ return 0;
+ else
+ return 1;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/run-1.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/run-1.c
new file mode 100644
index 0000000000..c8fe1c762b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/run-1.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus -O3" } */
+
+#include <stdlib.h>
+
+#define N 4
+
+float f1[] = { 2.0, 3.0, 4.0, 5.0 };
+float f2[] = { 1.0, 6.0, -1.0, -2.0 };
+float res[] = { 3.0, 9.0, 3.0, 3.0 };
+
+__attribute__((noinline))
+void verify (float *sum)
+{
+ for (int i=0; i < N; ++i)
+ if (sum[i] != res[i])
+ abort ();
+}
+
+int main()
+{
+ float sum[N];
+#pragma simd
+ for (int i=0; i < N; ++i)
+ sum[i] = f1[i] + f2[i];
+ verify (sum);
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/safelen.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/safelen.c
new file mode 100644
index 0000000000..2c59de9b02
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/safelen.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-gimple -fcilkplus" } */
+
+int *a, *b;
+
+void foo()
+{
+#pragma simd vectorlength(8)
+ for (int i=0; i < 1000; ++i)
+ a[i] = b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "safelen\\(8\\)" 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-2.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-2.c
new file mode 100644
index 0000000000..d90397717a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcilkplus" } */
+
+#define vl(n) vectorlength(2*n)
+void
+foo (int *a, int *b, int *c)
+{
+ int i;
+#pragma simd vl(4)
+ for (i = 0; i < 64; i++)
+ a[i] = b[i] * c[i];
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-3.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-3.c
new file mode 100644
index 0000000000..9cef5a5812
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcilkplus -save-temps" } */
+
+#define vl(n) vectorlength(2*n)
+void
+foo (int *a, int *b, int *c)
+{
+ int i;
+#pragma simd vl(4)
+ for (i = 0; i < 64; i++)
+ a[i] = b[i] * c[i];
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c
new file mode 100644
index 0000000000..9aa4a68290
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/PS/vectorlength.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+volatile int *a, *b, N;
+typedef int tint;
+struct someclass {
+ int a;
+ char b;
+ int *p;
+};
+
+void foo()
+{
+#pragma simd vectorlength(4) vectorlength(8) /* { dg-error "too many 'vectorlength' clauses" } */
+ for (int i=0; i < N; ++i)
+ a[i] = b[i];
+
+#pragma simd vectorlength(3) /* { dg-error "must be a power of 2" } */
+ for (int i=0; i < N; ++i)
+ a[i] = b[i];
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
new file mode 100644
index 0000000000..5312992ff6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -fopenmp-simd" } */
+
+#pragma omp declare simd linear(y:1) simdlen(4)
+__attribute__((vector (linear (y:1), vectorlength(4))))
+int func (int x, int y) { /* { dg-error "cannot be used in the same function marked as a Cilk Plus SIMD-enabled" } */
+ return (x+y);
+}
+__attribute__((vector (linear (y:1), private (x)))) /* { dg-error "is not valid for" } */
+int func2 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (linear (y:1), simdlen (4)))) /* { dg-error "is not valid for" } */
+int func2_1 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (linear (y:1), inbranch))) /* { dg-error "is not valid for" } */
+int func2_3 (int x, int y) {
+ return (x+y);
+}
+
+__attribute__((vector (notinbranch, vectorlength (4)))) /* { dg-error "is not valid for" } */
+int func2_2 (int x, int y) {
+ return (x+y);
+}
+
+int main (void)
+{
+ return (func (5,6));
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error2.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error2.c
new file mode 100644
index 0000000000..518d6407ee
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus -Wall" } */
+
+__attribute__((vector (vectorlength(32))))
+//#pragma omp simd simdlen (32)
+int func2 (int x, int y) /* { dg-warning "unsupported simdlen" } */
+{
+ return (x+y);
+}
+
+int main (void)
+{
+ return (func2 (5,6));
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error3.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error3.c
new file mode 100644
index 0000000000..195e9f1d7a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_error3.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-fcilkplus -Wall" } */
+
+__attribute__((vector (linear (x:y)))) /* { dg-message "parameter" "" { target c++ } } */
+int func2 (int x, int y)
+{ /* { dg-message "using parameters for" "" { target c } } */
+ return (x+y);
+}
+
+int main (void)
+{
+ return (func2 (5,6));
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test.c
new file mode 100644
index 0000000000..e606acac16
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test.c
@@ -0,0 +1,78 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -Wunknown-pragmas" } */
+
+/* Tests the clauses in several combinations put in different locations. */
+/* This is mostly a parser test. */
+#define Q 4
+
+int z = Q;
+
+ __attribute__ ((vector (uniform(x), linear (y:1), vectorlength (4) )))
+int func (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+ __attribute__ ((__vector__ (uniform(x), vectorlength (2), linear (y:1) )))
+int func2 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(y), linear (x), vectorlength (4) )))
+int func3 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), mask)))
+int func4 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), nomask)))
+int func5 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), mask, linear (y:1))))
+int func6 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform (x), mask, linear (y:1)), vector))
+int func7 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform (x), mask, linear (y:1)), vector (uniform (y), mask)))
+int func8 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector, vector (uniform (y), mask)))
+int func9 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+int main (int argc, char *argv[])
+{
+ int ii = 0, q = 5;
+ for (ii = 0; ii < 10; ii++)
+ q += func (argc, ii);
+ return q;
+}
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test2.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test2.c
new file mode 100644
index 0000000000..7ec0578b41
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/ef_test2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+void func (int x, int y) __attribute__((vector(linear(x:1), uniform (y)),
+ vector));
+
+int q;
+int main (void)
+{
+ int ii = 0;
+ q = 5;
+ for (ii = 0; ii < 100; ii++)
+ func (ii, q);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/cilk-plus/SE/vlength_errors.c b/gcc/testsuite/c-c++-common/cilk-plus/SE/vlength_errors.c
new file mode 100644
index 0000000000..1bcf2a27ab
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cilk-plus/SE/vlength_errors.c
@@ -0,0 +1,59 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -Wunknown-pragmas" } */
+
+#define Q 4
+
+int z = Q;
+
+__attribute__ ((vector (uniform(x), vectorlength (), linear (y:1) ))) /* { dg-error "expected expression" "" { target c } } */
+ /* { dg-error "expected primary-expression" "" { target c++ } 8 } */
+int func2 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), vectorlength (4.5) ))) /* { dg-error "vectorlength must be an integer" } */
+int func3 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), vectorlength (z) ))) /* { dg-error "vectorlength must be an integer" "" { target c } } */
+ /* { dg-error "constant" "" { target c++ } 23 } */
+int func4 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), vectorlength (Q) ))) /* This is OK! */
+int func5 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), vectorlength (z), linear (y:1)))) /* { dg-error "vectorlength must be an integer" "" { target c } } */
+ /* { dg-error "constant" "" { target c++ } 38 } */
+int func6 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+__attribute__ ((vector (uniform(x), linear (y:1), vectorlength (sizeof (int)) ))) /* This is OK too! */
+int func7 (int x, int y)
+{
+ int zq = 5;
+ return x + (y*zq);
+}
+
+int main (void)
+{
+ int ii = 0, q = 5;
+ for (ii = 0; ii < 10; ii++)
+ q += func2 (z, ii);
+ return q;
+}
diff --git a/gcc/testsuite/c-c++-common/convert-vec-1.c b/gcc/testsuite/c-c++-common/convert-vec-1.c
new file mode 100644
index 0000000000..862190d609
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/convert-vec-1.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-prune-output "changes the ABI" } */
+typedef float v2sf __attribute__ ((vector_size (8)));
+v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */
diff --git a/gcc/testsuite/c-c++-common/cpp/diagnostic-pragma-1.c b/gcc/testsuite/c-c++-common/cpp/diagnostic-pragma-1.c
new file mode 100644
index 0000000000..9867c94a8d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/diagnostic-pragma-1.c
@@ -0,0 +1,11 @@
+// { dg-do compile }
+
+#pragma GCC warning "warn-a" // { dg-warning warn-a }
+#pragma GCC error "err-b" // { dg-error err-b }
+
+#define CONST1 _Pragma("GCC warning \"warn-c\"") 1
+#define CONST2 _Pragma("GCC error \"err-d\"") 2
+
+char a[CONST1]; // { dg-warning warn-c }
+char b[CONST2]; // { dg-error err-d }
+
diff --git a/gcc/testsuite/c-c++-common/cpp/openmp-define-1.c b/gcc/testsuite/c-c++-common/cpp/openmp-define-1.c
new file mode 100644
index 0000000000..c5379223c8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/openmp-define-1.c
@@ -0,0 +1,6 @@
+/* { dg-do preprocess } */
+/* { dg-require-effective-target fopenmp } */
+
+#ifdef _OPENMP
+# error _OPENMP defined
+#endif
diff --git a/gcc/testsuite/c-c++-common/cpp/openmp-define-2.c b/gcc/testsuite/c-c++-common/cpp/openmp-define-2.c
new file mode 100644
index 0000000000..8823e291b8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/openmp-define-2.c
@@ -0,0 +1,7 @@
+/* { dg-options "-fno-openmp" } */
+/* { dg-do preprocess } */
+/* { dg-require-effective-target fopenmp } */
+
+#ifdef _OPENMP
+# error _OPENMP defined
+#endif
diff --git a/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c b/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c
new file mode 100644
index 0000000000..6986c5507b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/openmp-define-3.c
@@ -0,0 +1,11 @@
+/* { dg-options "-fopenmp" } */
+/* { dg-do preprocess } */
+/* { dg-require-effective-target fopenmp } */
+
+#ifndef _OPENMP
+# error _OPENMP not defined
+#endif
+
+#if _OPENMP != 201307
+# error _OPENMP defined to wrong value
+#endif
diff --git a/gcc/testsuite/c-c++-common/cpp/pr58844-1.c b/gcc/testsuite/c-c++-common/cpp/pr58844-1.c
new file mode 100644
index 0000000000..3abf8a7680
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr58844-1.c
@@ -0,0 +1,8 @@
+/* PR preprocessor/58844 */
+/* { dg-do compile } */
+/* { dg-options "-ftrack-macro-expansion=0" } */
+
+#define A x######x
+int A = 1;
+#define A x######x /* { dg-message "previous definition" } */
+#define A x##x /* { dg-warning "redefined" } */
diff --git a/gcc/testsuite/c-c++-common/cpp/pr58844-2.c b/gcc/testsuite/c-c++-common/cpp/pr58844-2.c
new file mode 100644
index 0000000000..1e219152fc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr58844-2.c
@@ -0,0 +1,8 @@
+/* PR preprocessor/58844 */
+/* { dg-do compile } */
+/* { dg-options "-ftrack-macro-expansion=2" } */
+
+#define A x######x
+int A = 1;
+#define A x######x /* { dg-message "previous definition" } */
+#define A x##x /* { dg-warning "redefined" } */
diff --git a/gcc/testsuite/c-c++-common/cpp/pr60400-1.h b/gcc/testsuite/c-c++-common/cpp/pr60400-1.h
new file mode 100644
index 0000000000..3e32175fe2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr60400-1.h
@@ -0,0 +1,3 @@
+??=ifndef PR60400_1_H
+??=define PR60400_1_H
+??=endif
diff --git a/gcc/testsuite/c-c++-common/cpp/pr60400-2.h b/gcc/testsuite/c-c++-common/cpp/pr60400-2.h
new file mode 100644
index 0000000000..d9a590636d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr60400-2.h
@@ -0,0 +1,4 @@
+??=ifndef PR60400_2_H
+??=define PR60400_2_H
+??=include "pr60400-1.h"
+??=endif
diff --git a/gcc/testsuite/c-c++-common/cpp/pr60400.c b/gcc/testsuite/c-c++-common/cpp/pr60400.c
new file mode 100644
index 0000000000..fc3e0d9f49
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/pr60400.c
@@ -0,0 +1,13 @@
+/* PR preprocessor/60400 */
+/* { dg-do compile } */
+/* { dg-options "-trigraphs -Wtrigraphs" } */
+
+??=include "pr60400-1.h"
+??=include "pr60400-2.h"
+
+/* { dg-warning "trigraph" "" { target *-*-* } 1 } */
+/* { dg-warning "trigraph" "" { target *-*-* } 2 } */
+/* { dg-warning "trigraph" "" { target *-*-* } 3 } */
+/* { dg-warning "trigraph" "" { target *-*-* } 4 } */
+/* { dg-warning "trigraph" "" { target *-*-* } 5 } */
+/* { dg-warning "trigraph" "" { target *-*-* } 6 } */
diff --git a/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c
new file mode 100644
index 0000000000..e3c6d26085
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/ucnid-2011-1.c
@@ -0,0 +1,15 @@
+/* { dg-do preprocess } */
+/* { dg-options "-std=c11 -pedantic -fextended-identifiers" { target c } } */
+/* { dg-options "-std=c++11 -pedantic -fextended-identifiers" { target c++ } } */
+
+\u00A8
+
+B\u0300
+
+\u0300 /* { dg-error "not valid at the start of an identifier" } */
+
+A\u0300 /* { dg-warning "not in NFC" } */
+
+\U00010000
+\U0001FFFD
+\U000E1234
diff --git a/gcc/testsuite/c-c++-common/cpp/warning-zero-in-literals-1.c b/gcc/testsuite/c-c++-common/cpp/warning-zero-in-literals-1.c
new file mode 100644
index 0000000000..ff2ed962ac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/warning-zero-in-literals-1.c
Binary files differ
diff --git a/gcc/testsuite/c-c++-common/cpp/warning-zero-location-2.c b/gcc/testsuite/c-c++-common/cpp/warning-zero-location-2.c
new file mode 100644
index 0000000000..e919bca697
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/warning-zero-location-2.c
@@ -0,0 +1,10 @@
+/*
+ { dg-options "-D _GNU_SOURCE -fdiagnostics-show-caret" }
+ { dg-do compile }
+ */
+
+#line 4636 "configure"
+#include <xxxxxxxxxxxx.h>
+int main() { return 0; }
+
+/* { dg-message "" "#include" {target *-*-* } 0 }
diff --git a/gcc/testsuite/c-c++-common/cpp/warning-zero-location.c b/gcc/testsuite/c-c++-common/cpp/warning-zero-location.c
new file mode 100644
index 0000000000..ca2e102bba
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/cpp/warning-zero-location.c
@@ -0,0 +1,8 @@
+/*
+ { dg-options "-D _GNU_SOURCE -fdiagnostics-show-caret" }
+ { dg-do compile }
+ */
+
+#define _GNU_SOURCE /* { dg-warning "redefined" } */
+
+/* { dg-message "" "#define _GNU_SOURCE" {target *-*-* } 0 }
diff --git a/gcc/testsuite/c-c++-common/fold-divmul-1.c b/gcc/testsuite/c-c++-common/fold-divmul-1.c
new file mode 100644
index 0000000000..5c867923d2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/fold-divmul-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+int *
+fx (int *b, int *e)
+{
+ return b + (e - b);
+}
+
+/* { dg-final { scan-tree-dump-not "/\\\[ex\\\]" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-15.c b/gcc/testsuite/c-c++-common/gomp/atomic-15.c
index 13a9e0ce48..5e669fa354 100644
--- a/gcc/testsuite/c-c++-common/gomp/atomic-15.c
+++ b/gcc/testsuite/c-c++-common/gomp/atomic-15.c
@@ -8,39 +8,37 @@ main ()
{
int v;
#pragma omp atomic
- x = x * 7 + 6; /* { dg-error "expected" } */
+ x = x * 7 + 6; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic
- x = x * 7 ^ 6; /* { dg-error "expected" } */
+ x = x * 7 ^ 6; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic update
- x = x - 8 + 6; /* { dg-error "expected" } */
+ x = x - 8 + 6; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic
- x = x ^ 7 | 2; /* { dg-error "expected" } */
+ x = x ^ 7 | 2; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic
- x = x / 7 * 2; /* { dg-error "expected" } */
+ x = x / 7 * 2; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic
- x = x / 7 / 2; /* { dg-error "expected" } */
+ x = x / 7 / 2; /* { dg-error "expected|invalid form of" } */
#pragma omp atomic capture
- v = x = x | 6; /* { dg-error "invalid operator" } */
+ { v = x; x = x * 7 + 6; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x * 7 + 6; } /* { dg-error "expected" } */
+ { v = x; x = x * 7 ^ 6; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x * 7 ^ 6; } /* { dg-error "expected" } */
+ { v = x; x = x - 8 + 6; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x - 8 + 6; } /* { dg-error "expected" } */
+ { v = x; x = x ^ 7 | 2; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x ^ 7 | 2; } /* { dg-error "expected" } */
+ { v = x; x = x / 7 * 2; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x / 7 * 2; } /* { dg-error "expected" } */
+ { v = x; x = x / 7 / 2; } /* { dg-error "expected" "" { target c++ } } */
#pragma omp atomic capture
- { v = x; x = x / 7 / 2; } /* { dg-error "expected" } */
+ { x = x * 7 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
#pragma omp atomic capture
- { x = x * 7 + 6; v = x; } /* { dg-error "expected" } */
+ { x = x * 7 ^ 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
#pragma omp atomic capture
- { x = x * 7 ^ 6; v = x; } /* { dg-error "expected" } */
+ { x = x - 8 + 6; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
#pragma omp atomic capture
- { x = x - 8 + 6; v = x; } /* { dg-error "expected" } */
- #pragma omp atomic capture
- { x = x ^ 7 | 2; v = x; } /* { dg-error "expected" } */
+ { x = x ^ 7 | 2; v = x; } /* { dg-error "expected|uses two different expressions for memory" } */
(void) v;
return 0;
}
diff --git a/gcc/testsuite/c-c++-common/gomp/atomic-16.c b/gcc/testsuite/c-c++-common/gomp/atomic-16.c
new file mode 100644
index 0000000000..9332396eaa
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/atomic-16.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+int x = 6;
+
+void
+foo ()
+{
+ int v;
+ #pragma omp atomic seq_cst read
+ v = x;
+ #pragma omp atomic seq_cst, read
+ v = x;
+ #pragma omp atomic seq_cst write
+ x = v;
+ #pragma omp atomic seq_cst ,write
+ x = v;
+ #pragma omp atomic seq_cst update
+ x += v;
+ #pragma omp atomic seq_cst , update
+ x += v;
+ #pragma omp atomic seq_cst capture
+ v = x += 2;
+ #pragma omp atomic seq_cst, capture
+ v = x += 2;
+ #pragma omp atomic read , seq_cst
+ v = x;
+ #pragma omp atomic write ,seq_cst
+ x = v;
+ #pragma omp atomic update, seq_cst
+ x += v;
+ #pragma omp atomic capture, seq_cst
+ v = x += 2;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/cancel-1.c b/gcc/testsuite/c-c++-common/gomp/cancel-1.c
new file mode 100644
index 0000000000..d8f7bc1b8f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/cancel-1.c
@@ -0,0 +1,396 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+f1 (void)
+{
+ #pragma omp cancel parallel /* { dg-error "orphaned" } */
+ #pragma omp cancel for /* { dg-error "orphaned" } */
+ #pragma omp cancel sections /* { dg-error "orphaned" } */
+ #pragma omp cancel taskgroup /* { dg-error "orphaned" } */
+ #pragma omp cancellation point parallel /* { dg-error "orphaned" } */
+ #pragma omp cancellation point for /* { dg-error "orphaned" } */
+ #pragma omp cancellation point sections /* { dg-error "orphaned" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "orphaned" } */
+}
+
+void
+f2 (void)
+{
+ int i;
+ #pragma omp parallel
+ {
+ #pragma omp cancel parallel
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp master
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp single
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp critical
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp taskgroup
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp task
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup
+ }
+ #pragma omp for
+ for (i = 0; i < 10; i++)
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for ordered
+ for (i = 0; i < 10; i++)
+ #pragma omp ordered
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp sections
+ {
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp section
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ }
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ }
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp target teams
+ {
+ #pragma omp cancel parallel /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancel for /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancel sections /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancel taskgroup /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancellation point parallel /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancellation point for /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancellation point sections /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "only distribute or parallel constructs are allowed to be closely nested" } */
+ }
+ #pragma omp target teams distribute
+ for (i = 0; i < 10; i++)
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for
+ for (i = 0; i < 10; i++)
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for
+ for (i = 0; i < 10; i++)
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for
+ for (i = 0; i < 10; i++)
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for ordered
+ for (i = 0; i < 10; i++)
+ #pragma omp ordered
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp for ordered
+ for (i = 0; i < 10; i++)
+ #pragma omp ordered
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup/* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp sections
+ {
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp section
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ }
+ #pragma omp sections
+ {
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp section
+ #pragma omp target data
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ }
+ #pragma omp sections
+ {
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ #pragma omp section
+ #pragma omp target
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ }
+ #pragma omp task
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup
+ #pragma omp taskgroup
+ {
+ #pragma omp cancel parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancel taskgroup /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point parallel /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point for /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point sections /* { dg-error "not closely nested inside" } */
+ #pragma omp cancellation point taskgroup /* { dg-error "not closely nested inside" } */
+ }
+ }
+}
+
+void
+f3 (void)
+{
+ int i;
+ #pragma omp for nowait
+ for (i = 0; i < 10; i++)
+ {
+ #pragma omp cancel for /* { dg-warning "nowait" } */
+ }
+ #pragma omp sections nowait
+ {
+ {
+ #pragma omp cancel sections /* { dg-warning "nowait" } */
+ }
+ #pragma omp section
+ {
+ #pragma omp cancel sections /* { dg-warning "nowait" } */
+ }
+ }
+ #pragma omp for ordered
+ for (i = 0; i < 10; i++)
+ {
+ #pragma omp cancel for /* { dg-warning "ordered" } */
+ #pragma omp ordered
+ {
+ }
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/depend-1.c b/gcc/testsuite/c-c++-common/gomp/depend-1.c
new file mode 100644
index 0000000000..8a5850e45f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/depend-1.c
@@ -0,0 +1,79 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+extern int a[][10], a2[][10];
+int b[10], c[10][2], d[10], e[10], f[10];
+int b2[10], c2[10][2], d2[10], e2[10], f2[10];
+int k[10], l[10], m[10], n[10], o;
+int *p;
+void bar (void);
+int t[10];
+#pragma omp threadprivate (t)
+
+void
+foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
+ int g2[3][10], int h2[4][8], int i2[2][10], int j2[][9])
+{
+ #pragma omp task depend(in: bar[2:5]) /* { dg-error "is not a variable" } */
+ ;
+ #pragma omp task depend(out: t[2:5])
+ ;
+ #pragma omp task depend(inout: k[0.5:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp task depend(in: l[:7.5f]) /* { dg-error "length \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp task depend(out: m[p:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp task depend(inout: n[:p]) /* { dg-error "length \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp task depend(in: o[2:5]) /* { dg-error "does not have pointer or array type" } */
+ ;
+ #pragma omp task depend(out: a[:][2:4]) /* { dg-error "array type length expression must be specified" } */
+ ;
+ #pragma omp task depend(inout: b[-1:]) /* { dg-error "negative low bound in array section" } */
+ ;
+ #pragma omp task depend(inout: c[:-3][1:1]) /* { dg-error "negative length in array section" } */
+ ;
+ #pragma omp task depend(in: d[11:]) /* { dg-error "low bound \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(out: e[:11]) /* { dg-error "length \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(out: f[1:10]) /* { dg-error "high bound \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(in: g[:][2:4]) /* { dg-error "for pointer type length expression must be specified" } */
+ ;
+ #pragma omp task depend(in: h[2:2][-1:]) /* { dg-error "negative low bound in array section" } */
+ ;
+ #pragma omp task depend(inout: h[:1][:-3]) /* { dg-error "negative length in array section" } */
+ ;
+ #pragma omp task depend(out: i[:1][11:]) /* { dg-error "low bound \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(in: j[3:4][:10]) /* { dg-error "length \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(out: j[30:10][5:5]) /* { dg-error "high bound \[^\n\r]* above array section size" } */
+ ;
+ #pragma omp task depend(out: a2[:3][2:4])
+ ;
+ #pragma omp task depend(inout: b2[0:])
+ ;
+ #pragma omp task depend(inout: c2[:3][1:1])
+ ;
+ #pragma omp task depend(in: d2[9:])
+ ;
+ #pragma omp task depend(out: e2[:10])
+ ;
+ #pragma omp task depend(out: f2[1:9])
+ ;
+ #pragma omp task depend(in: g2[:2][2:4])
+ ;
+ #pragma omp task depend(in: h2[2:2][0:])
+ ;
+ #pragma omp task depend(inout: h2[:1][:3])
+ ;
+ #pragma omp task depend(out: i2[:1][9:])
+ ;
+ #pragma omp task depend(in: j2[3:4][:9])
+ ;
+ #pragma omp task depend(out: j2[30:10][5:4])
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/depend-2.c b/gcc/testsuite/c-c++-common/gomp/depend-2.c
new file mode 100644
index 0000000000..99bf8ae1b8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/depend-2.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void bar (int a[10][10][10]);
+void
+foo (int a[10][10][10], int **b)
+{
+ int c[10][10][10];
+ #pragma omp task depend(out: a[2:4][3:][:7], b[1:7][2:8])
+ bar (a);
+ int i = 1, j = 3, k = 2, l = 6;
+ #pragma omp task depend(in: a[++i:++j][++k:][:++l])
+ bar (a);
+ #pragma omp task depend(out: a[7:2][:][:], c[5:2][:][:])
+ {
+ bar (c);
+ bar (a);
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/map-1.c b/gcc/testsuite/c-c++-common/gomp/map-1.c
new file mode 100644
index 0000000000..5dad7d6a9a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/map-1.c
@@ -0,0 +1,109 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+extern int a[][10], a2[][10];
+int b[10], c[10][2], d[10], e[10], f[10];
+int b2[10], c2[10][2], d2[10], e2[10], f2[10];
+int k[10], l[10], m[10], n[10], o;
+int *p;
+int **q;
+int r[4][4][4][4][4];
+extern struct s s1;
+extern struct s s2[1]; /* { dg-error "array type has incomplete element type" "" { target c } } */
+int t[10];
+#pragma omp threadprivate (t)
+#pragma omp declare target
+void bar (int *);
+#pragma omp end declare target
+
+void
+foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
+ int g2[3][10], int h2[4][8], int i2[2][10], int j2[][9])
+{
+ #pragma omp target map(to: bar[2:5]) /* { dg-error "is not a variable" } */
+ ;
+ #pragma omp target map(from: t[2:5]) /* { dg-error "is threadprivate variable" } */
+ ;
+ #pragma omp target map(tofrom: k[0.5:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp target map(from: l[:7.5f]) /* { dg-error "length \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp target map(to: m[p:]) /* { dg-error "low bound \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp target map(tofrom: n[:p]) /* { dg-error "length \[^\n\r]* of array section does not have integral type" } */
+ ;
+ #pragma omp target map(to: o[2:5]) /* { dg-error "does not have pointer or array type" } */
+ ;
+ #pragma omp target map(alloc: s1) /* { dg-error "'s1' does not have a mappable type in 'map' clause" } */
+ ;
+ #pragma omp target map(alloc: s2) /* { dg-error "'s2' does not have a mappable type in 'map' clause" } */
+ ;
+ #pragma omp target map(to: a[:][:]) /* { dg-error "array type length expression must be specified" } */
+ bar (&a[0][0]); /* { dg-error "referenced in target region does not have a mappable type" } */
+ #pragma omp target map(tofrom: b[-1:]) /* { dg-error "negative low bound in array section" } */
+ bar (b);
+ #pragma omp target map(tofrom: c[:-3][:]) /* { dg-error "negative length in array section" } */
+ bar (&c[0][0]);
+ #pragma omp target map(from: d[11:]) /* { dg-error "low bound \[^\n\r]* above array section size" } */
+ bar (d);
+ #pragma omp target map(to: e[:11]) /* { dg-error "length \[^\n\r]* above array section size" } */
+ bar (e);
+ #pragma omp target map(to: f[1:10]) /* { dg-error "high bound \[^\n\r]* above array section size" } */
+ bar (f);
+ #pragma omp target map(from: g[:][0:10]) /* { dg-error "for pointer type length expression must be specified" } */
+ bar (&g[0][0]);
+ #pragma omp target map(from: h[2:1][-1:]) /* { dg-error "negative low bound in array section" } */
+ bar (&h[0][0]);
+ #pragma omp target map(tofrom: h[:1][:-3]) /* { dg-error "negative length in array section" } */
+ bar (&h[0][0]);
+ #pragma omp target map(i[:1][11:]) /* { dg-error "low bound \[^\n\r]* above array section size" } */
+ bar (&i[0][0]);
+ #pragma omp target map(from: j[3:1][:10]) /* { dg-error "length \[^\n\r]* above array section size" } */
+ bar (&j[0][0]);
+ #pragma omp target map(to: j[30:1][5:5]) /* { dg-error "high bound \[^\n\r]* above array section size" } */
+ bar (&j[0][0]);
+ #pragma omp target map(to: a2[:1][2:4])
+ bar (&a2[0][0]);
+ #pragma omp target map(a2[3:5][:])
+ bar (&a2[0][0]);
+ #pragma omp target map(to: a2[3:5][:10])
+ bar (&a2[0][0]);
+ #pragma omp target map(tofrom: b2[0:])
+ bar (b2);
+ #pragma omp target map(tofrom: c2[:3][:])
+ bar (&c2[0][0]);
+ #pragma omp target map(from: d2[9:])
+ bar (d2);
+ #pragma omp target map(to: e2[:10])
+ bar (e2);
+ #pragma omp target map(to: f2[1:9])
+ bar (f2);
+ #pragma omp target map(g2[:1][2:4])
+ bar (&g2[0][0]);
+ #pragma omp target map(from: h2[2:2][0:])
+ bar (&h2[0][0]);
+ #pragma omp target map(tofrom: h2[:1][:3])
+ bar (&h2[0][0]);
+ #pragma omp target map(to: i2[:1][9:])
+ bar (&i2[0][0]);
+ #pragma omp target map(from: j2[3:4][:9])
+ bar (&j2[0][0]);
+ #pragma omp target map(to: j2[30:1][5:4])
+ bar (&j2[0][0]);
+ #pragma omp target map(q[1:2])
+ ;
+ #pragma omp target map(tofrom: q[3:5][:10]) /* { dg-error "array section is not contiguous" } */
+ ;
+ #pragma omp target map(r[3:][2:1][1:2])
+ ;
+ #pragma omp target map(r[3:][2:1][1:2][:][0:4])
+ ;
+ #pragma omp target map(r[3:][2:1][1:2][1:][0:4]) /* { dg-error "array section is not contiguous" } */
+ ;
+ #pragma omp target map(r[3:][2:1][1:2][:3][0:4]) /* { dg-error "array section is not contiguous" } */
+ ;
+ #pragma omp target map(r[3:][2:1][1:2][:][1:]) /* { dg-error "array section is not contiguous" } */
+ ;
+ #pragma omp target map(r[3:][2:1][1:2][:][:3]) /* { dg-error "array section is not contiguous" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr56883.c b/gcc/testsuite/c-c++-common/gomp/pr56883.c
new file mode 100644
index 0000000000..443906d868
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr56883.c
@@ -0,0 +1,57 @@
+/* PR middle-end/56883 */
+/* { dg-do compile }
+/* { dg-options "-O2 -fopenmp" } */
+
+void
+f1 (int ***x)
+{
+ int i, j, k;
+#pragma omp parallel for
+ for (i = 0; i < 10; ++i)
+ {
+ #pragma omp parallel shared(j)
+ #pragma omp for
+ for (j = 0; j < 10; ++j)
+ {
+ #pragma omp parallel for
+ for (k = 0; k < 10; ++k)
+ x[i][j][k] = k;
+ }
+ }
+}
+
+void
+f2 (int ***x)
+{
+ int i, j, k;
+#pragma omp parallel for schedule(static,1)
+ for (i = 0; i < 10; ++i)
+ {
+ #pragma omp parallel shared(j)
+ #pragma omp for schedule(static,1)
+ for (j = 0; j < 10; ++j)
+ {
+ #pragma omp parallel for schedule(static,1)
+ for (k = 0; k < 10; ++k)
+ x[i][j][k] = k;
+ }
+ }
+}
+
+void
+f3 (int ***x)
+{
+ int i, j, k;
+#pragma omp parallel for schedule(runtime)
+ for (i = 0; i < 10; ++i)
+ {
+ #pragma omp parallel shared(j)
+ #pragma omp for schedule(runtime)
+ for (j = 0; j < 10; ++j)
+ {
+ #pragma omp parallel for schedule(runtime)
+ for (k = 0; k < 10; ++k)
+ x[i][j][k] = k;
+ }
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr57824.c b/gcc/testsuite/c-c++-common/gomp/pr57824.c
new file mode 100644
index 0000000000..a303da24c6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr57824.c
@@ -0,0 +1,14 @@
+/* PR preprocessor/57824 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -fopenmp" { target c } } */
+/* { dg-options "-std=c++11 -fopenmp" { target c++ } } */
+
+void bar ();
+
+void foo ()
+{
+#pragma omp parallel num_threads(sizeof R"(
+abc
+)")
+ bar ();
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58257.c b/gcc/testsuite/c-c++-common/gomp/pr58257.c
new file mode 100644
index 0000000000..8f8d24a998
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58257.c
@@ -0,0 +1,15 @@
+/* PR middle-end/58257 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp -Wall" } */
+
+int
+foo (int n)
+{
+ int a[10][10];
+ int x, y;
+#pragma omp parallel for collapse(2) /* { dg-bogus "may be used uninitialized in this function" } */
+ for (x = 0; x < n; x++) /* { dg-bogus "may be used uninitialized in this function" } */
+ for (y = 0; y < n; y++)
+ a[x][y] = x + y * y;
+ return a[0][0];
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58472.c b/gcc/testsuite/c-c++-common/gomp/pr58472.c
new file mode 100644
index 0000000000..355ca4008b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58472.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/58472 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall -fopenmp" } */
+
+float a[1024], b[1024];
+
+float
+foo ()
+{
+ float s = 0.f;
+ unsigned int i;
+#pragma omp simd reduction(+:s)
+ for (i = 0; i < 1024; ++i)
+ s += a[i] * b[i];
+ return s;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58551.c b/gcc/testsuite/c-c++-common/gomp/pr58551.c
new file mode 100644
index 0000000000..e2db70f9e8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58551.c
@@ -0,0 +1,33 @@
+/* PR middle-end/58551 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -fopenmp" } */
+
+void
+foo (int *a)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ #pragma omp task
+ if (a[i])
+ __builtin_abort ();
+}
+
+void bar (int, int);
+
+void
+baz (int *a)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ #pragma omp task
+ if (a[i])
+ {
+ int j, k;
+ for (j = 0; j < 10; j++)
+ for (k = 0; k < 8; k++)
+ bar (j, k);
+ for (k = 0; k < 12; k++)
+ bar (-1, k);
+ __builtin_abort ();
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58703.c b/gcc/testsuite/c-c++-common/gomp/pr58703.c
new file mode 100644
index 0000000000..6a3a5f5050
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58703.c
@@ -0,0 +1,6 @@
+/* PR c++/58703 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare reduction (+ : char[] : omp_out += omp_in) /* { dg-error "function or array type" } */
+#pragma omp declare reduction (+ : char() : omp_out += omp_in) /* { dg-error "function or array type" } */
diff --git a/gcc/testsuite/c-c++-common/gomp/pr58809.c b/gcc/testsuite/c-c++-common/gomp/pr58809.c
new file mode 100644
index 0000000000..f4fd7c4834
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr58809.c
@@ -0,0 +1,31 @@
+/* PR middle-end/58809 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+_Complex int j;
+_Complex double d;
+
+void
+foo (void)
+{
+ #pragma omp parallel reduction (&:j) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (|:j) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (^:j) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (min:j) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (max:j) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (&:d) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (|:d) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (^:d) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (min:d) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+ #pragma omp parallel reduction (max:d) /* { dg-error "has invalid type for|user defined reduction not found for" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr59073.c b/gcc/testsuite/c-c++-common/gomp/pr59073.c
new file mode 100644
index 0000000000..543ff5d349
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr59073.c
@@ -0,0 +1,12 @@
+/* PR c/59073 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo ()
+{
+ int i;
+#pragma omp distribute parallel for
+ for (i = 0; i < 10; i) /* { dg-error "invalid increment expression" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr59152.c b/gcc/testsuite/c-c++-common/gomp/pr59152.c
new file mode 100644
index 0000000000..bcccb1be34
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr59152.c
@@ -0,0 +1,40 @@
+/* PR middle-end/59152 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fipa-pure-const" } */
+
+extern int b[];
+void
+foo (void)
+{
+ unsigned long v1, v2, v3;
+ #pragma omp parallel for schedule(static, 32) collapse(3)
+ for (v1 = 0; v1 < 20; v1 += 2)
+ for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3)
+ for (v3 = 10; v3 > 0; v3--)
+ #pragma omp atomic
+ b[v3]++;
+}
+
+void
+bar (void)
+{
+ unsigned long v1, v2, v3;
+ #pragma omp parallel for schedule(static) collapse(3)
+ for (v1 = 0; v1 < 20; v1 += 2)
+ for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3)
+ for (v3 = 10; v3 > 0; v3--)
+ #pragma omp atomic
+ b[v3]++;
+}
+
+void
+baz (void)
+{
+ unsigned long v1, v2, v3;
+ #pragma omp parallel for schedule(runtime) collapse(3)
+ for (v1 = 0; v1 < 20; v1 += 2)
+ for (v2 = __LONG_MAX__; v2 > __LONG_MAX__ - 30; v2 -= 3)
+ for (v3 = 10; v3 > 0; v3--)
+ #pragma omp atomic
+ b[v3]++;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr59467.c b/gcc/testsuite/c-c++-common/gomp/pr59467.c
new file mode 100644
index 0000000000..475182a623
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr59467.c
@@ -0,0 +1,68 @@
+/* PR libgomp/59467 */
+
+int v;
+
+void
+foo (void)
+{
+ int x = 0, y = 0;
+ #pragma omp parallel
+ {
+ int z;
+ #pragma omp single copyprivate (x) /* { dg-error "is not threadprivate or private in outer context" } */
+ {
+ #pragma omp atomic write
+ x = 6;
+ }
+ #pragma omp atomic read
+ z = x;
+ #pragma omp atomic
+ y += z;
+ }
+ #pragma omp parallel
+ {
+ int z;
+ #pragma omp single copyprivate (v) /* { dg-error "is not threadprivate or private in outer context" } */
+ {
+ #pragma omp atomic write
+ v = 6;
+ }
+ #pragma omp atomic read
+ z = v;
+ #pragma omp atomic
+ y += z;
+ }
+ #pragma omp parallel private (x)
+ {
+ int z;
+ #pragma omp single copyprivate (x)
+ {
+ #pragma omp atomic write
+ x = 6;
+ }
+ #pragma omp atomic read
+ z = x;
+ #pragma omp atomic
+ y += z;
+ }
+ x = 0;
+ #pragma omp parallel reduction (+:x)
+ {
+ #pragma omp single copyprivate (x)
+ {
+ #pragma omp atomic write
+ x = 6;
+ }
+ #pragma omp atomic
+ y += x;
+ }
+ #pragma omp single copyprivate (x)
+ {
+ x = 7;
+ }
+ #pragma omp single copyprivate (v) /* { dg-error "is not threadprivate or private in outer context" } */
+ {
+ #pragma omp atomic write
+ v = 6;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr59917-1.c b/gcc/testsuite/c-c++-common/gomp/pr59917-1.c
new file mode 100644
index 0000000000..cca3976ccb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr59917-1.c
@@ -0,0 +1,22 @@
+/* PR middle-end/59917 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp" } */
+
+struct J { long buf[8]; };
+extern int setjmp (struct J[1]);
+extern struct J j[1];
+void foo (int);
+
+void
+bar (void)
+{
+ if (setjmp (j) == 0)
+ {
+ int k;
+ foo (-1);
+#pragma omp parallel
+ for (k = 0; k < 10; ++k)
+ foo (k);
+ foo (-2);
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr59917-2.c b/gcc/testsuite/c-c++-common/gomp/pr59917-2.c
new file mode 100644
index 0000000000..1d603422f6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr59917-2.c
@@ -0,0 +1,22 @@
+/* PR middle-end/59917 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp" } */
+
+struct J { long buf[8]; };
+extern int setjmp (struct J[1]);
+void foo (int);
+
+void
+bar (void)
+{
+ int k;
+ foo (-1);
+#pragma omp parallel
+ for (k = 0; k < 10; ++k)
+ {
+ struct J j[1];
+ if (setjmp (j) == 0)
+ foo (k);
+ }
+ foo (-2);
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr60823-1.c b/gcc/testsuite/c-c++-common/gomp/pr60823-1.c
new file mode 100644
index 0000000000..5f985724da
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr60823-1.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/60823 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd" } */
+
+#pragma omp declare simd simdlen(4) notinbranch
+int
+foo (const double c1, const double c2)
+{
+ double z1 = c1, z2 = c2;
+ int res = 100, i;
+
+ for (i = 0; i < 100; i++)
+ {
+ res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res;
+ z1 = c1 + z1 * z1 - z2 * z2;
+ z2 = c2 + 2.0 * z1 * z2;
+ }
+ return res;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr60823-2.c b/gcc/testsuite/c-c++-common/gomp/pr60823-2.c
new file mode 100644
index 0000000000..4c87620076
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr60823-2.c
@@ -0,0 +1,44 @@
+/* PR tree-optimization/60823 */
+/* { dg-do run } */
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-options "-O2 -fopenmp-simd" } */
+
+#pragma omp declare simd simdlen(4) notinbranch
+__attribute__((noinline)) int
+foo (double c1, double c2)
+{
+ double z1 = c1, z2 = c2;
+ int res = 100, i;
+
+ for (i = 0; i < 5; i++)
+ {
+ res = (z1 * z1 + z2 * z2 > 4.0) ? (i < res ? i : res) : res;
+ z1 = c1 + z1 * z1 - z2 * z2;
+ z2 = c2 + 2.0 * z1 * z2;
+ c1 += 0.5;
+ c2 += 0.5;
+ }
+ return res;
+}
+
+__attribute__((noinline, noclone)) void
+bar (double *x, double *y)
+{
+ asm volatile ("" : : "rm" (x), "rm" (y) : "memory");
+}
+
+int
+main ()
+{
+ int i;
+ double c[4] = { 0.0, 1.0, 0.0, 1.0 };
+ double d[4] = { 0.0, 1.0, 2.0, 0.0 };
+ int e[4];
+ bar (c, d);
+#pragma omp simd safelen(4)
+ for (i = 0; i < 4; i++)
+ e[i] = foo (c[i], d[i]);
+ if (e[0] != 3 || e[1] != 1 || e[2] != 1 || e[3] != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr60823-3.c b/gcc/testsuite/c-c++-common/gomp/pr60823-3.c
new file mode 100644
index 0000000000..93e9fbe3a1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr60823-3.c
@@ -0,0 +1,32 @@
+/* PR tree-optimization/60823 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing" } */
+
+void bar (char *, double *);
+
+#if __SIZEOF_DOUBLE__ >= 4
+
+struct S { char c[sizeof (double)]; };
+void baz (struct S, struct S);
+union U { struct S s; double d; };
+
+#pragma omp declare simd simdlen(4) notinbranch
+__attribute__((noinline)) int
+foo (double c1, double c2)
+{
+ double *a = &c1;
+ char *b = (char *) &c1 + 2;
+
+ b[-2]++;
+ b[1]--;
+ *a++;
+ c2++;
+ bar ((char *) &c2 + 1, &c2);
+ c2 *= 3.0;
+ bar (b, a);
+ baz (((union U) { .d = c1 }).s, ((union U) { .d = c2 }).s);
+ baz (*(struct S *)&c1, *(struct S *)&c2);
+ return c1 + c2 + ((struct S *)&c1)->c[1];
+}
+
+#endif
diff --git a/gcc/testsuite/c-c++-common/gomp/pr61200.c b/gcc/testsuite/c-c++-common/gomp/pr61200.c
new file mode 100644
index 0000000000..d0d699dfa0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr61200.c
@@ -0,0 +1,13 @@
+/* PR libgomp/61200 */
+
+int
+main ()
+{
+ int var = 1;
+ #pragma omp parallel
+ if (var != 1)
+ __builtin_abort ();
+ #pragma omp task shared(var)
+ var = 2;
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr61486-1.c b/gcc/testsuite/c-c++-common/gomp/pr61486-1.c
new file mode 100644
index 0000000000..9ada58c8cc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr61486-1.c
@@ -0,0 +1,13 @@
+/* PR middle-end/61486 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+int
+foo (int *a)
+{
+ int i, j = 0;
+ #pragma omp target teams distribute simd linear(i, j) map(a[:10])
+ for (i = 0; i < 10; i++)
+ a[i] = j++;
+ return i + j;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr61486-2.c b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c
new file mode 100644
index 0000000000..729438101e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr61486-2.c
@@ -0,0 +1,458 @@
+/* PR middle-end/61486 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare target
+void dosomething (int *a, int n, int m);
+#pragma omp end declare target
+
+void
+test (int n, int o, int p, int q, int r, int s, int *pp)
+{
+ int a[o], i, j;
+ #pragma omp target data device (n + 1) if (n != 6) map (tofrom: n, r)
+ {
+ #pragma omp target device (n + 1) if (n != 6) map (from: n) map (alloc: a[2:o-2])
+ dosomething (a, n, 0);
+ #pragma omp target teams device (n + 1) num_teams (n + 4) thread_limit (n * 2) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target teams distribute device (n + 1) num_teams (n + 4) collapse (2) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target teams distribute device (n + 1) num_teams (n + 4) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target teams distribute parallel for device (n + 1) num_teams (n + 4) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ #pragma omp ordered
+ p = q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams distribute parallel for device (n + 1) num_teams (n + 4) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) \
+ proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp ordered
+ p = q;
+ s = i * 10;
+ }
+ #pragma omp target teams distribute parallel for simd device (n + 1) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ schedule (static, 8) num_teams (n + 4) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams distribute parallel for simd device (n + 1) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) \
+ proc_bind (master) lastprivate (s) schedule (static, 8) \
+ num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp target teams distribute simd device (n + 1) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ lastprivate (s) num_teams (n + 4) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams distribute simd device (n + 1) \
+ if (n != 6)map (from: n) map (alloc: a[2:o-2]) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) lastprivate (s) \
+ num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams num_teams (n + 4) thread_limit (n * 2) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute num_teams (n + 4) collapse (2) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute num_teams (n + 4) default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute parallel for num_teams (n + 4) if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ #pragma omp ordered
+ p = q;
+ s = i * 10 + j;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute parallel for num_teams (n + 4) if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) \
+ proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp ordered
+ p = q;
+ s = i * 10;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ schedule (static, 8) num_teams (n + 4) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) \
+ proc_bind (master) lastprivate (s) schedule (static, 8) \
+ num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute simd default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) collapse (2) \
+ lastprivate (s) num_teams (n + 4) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2])
+ #pragma omp teams distribute simd default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ thread_limit (n * 2) dist_schedule (static, 4) lastprivate (s) \
+ num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2)default(shared) shared(n) \
+ private (p) reduction (+: r)
+ #pragma omp distribute collapse (2) dist_schedule (static, 4) firstprivate (q)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2) shared(n) private(p) reduction (+ : r) \
+ default(shared)
+ #pragma omp distribute dist_schedule (static, 4) firstprivate (q)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2)
+ #pragma omp distribute parallel for if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ #pragma omp ordered
+ p = q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2)
+ #pragma omp distribute parallel for if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ num_threads (n + 4) dist_schedule (static, 4) \
+ proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp ordered
+ p = q;
+ s = i * 10;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2)
+ #pragma omp distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ schedule (static, 8) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2)
+ #pragma omp distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ num_threads (n + 4) dist_schedule (static, 4) \
+ proc_bind (master) lastprivate (s) schedule (static, 8) \
+ safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2) default(shared) shared(n) private(p) \
+ reduction(+:r)
+ #pragma omp distribute simd private (p) firstprivate (q) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) lastprivate (s) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp target teams device (n + 1) if (n != 6)map(from:n) map(alloc:a[2:o-2]) \
+ num_teams (n + 4) thread_limit (n * 2) default(shared) shared(n) private(p) \
+ reduction(+:r)
+ #pragma omp distribute simd private (p) firstprivate (q) reduction (+: r) \
+ lastprivate (s) dist_schedule (static, 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ }
+}
+
+int q, i, j;
+
+void
+test2 (int n, int o, int p, int r, int s, int *pp)
+{
+ int a[o];
+ #pragma omp distribute collapse (2) dist_schedule (static, 4) firstprivate (q)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp distribute dist_schedule (static, 4) firstprivate (q)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp distribute parallel for if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ #pragma omp ordered
+ p = q;
+ s = i * 10 + j;
+ }
+ #pragma omp distribute parallel for if (n != 6) \
+ default(shared) private (p) firstprivate (q) shared (n) reduction (+: r) \
+ num_threads (n + 4) dist_schedule (static, 4) \
+ proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ dosomething (a, n, p + q);
+ }
+ #pragma omp ordered
+ p = q;
+ s = i * 10;
+ }
+ #pragma omp distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) \
+ num_threads (n + 4) proc_bind (spread) lastprivate (s) \
+ schedule (static, 8) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp distribute parallel for simd if (n != 6)default(shared) \
+ private (p) firstprivate (q) shared (n) reduction (+: r) \
+ num_threads (n + 4) dist_schedule (static, 4) \
+ proc_bind (master) lastprivate (s) schedule (static, 8) \
+ safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+ #pragma omp distribute simd private (p) firstprivate (q) reduction (+: r) \
+ collapse (2) dist_schedule (static, 4) lastprivate (s) safelen(8)
+ for (i = 0; i < 10; i++)
+ for (j = 0; j < 10; j++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i*10+j] = p + q;
+ s = i * 10 + j;
+ }
+ #pragma omp distribute simd private (p) firstprivate (q) reduction (+: r) \
+ lastprivate (s) dist_schedule (static, 4) safelen(16) linear(i:1) aligned (pp:4)
+ for (i = 0; i < 10; i++)
+ {
+ r = r + 1;
+ p = q;
+ a[2+i] = p + q;
+ s = i * 10;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr63249.c b/gcc/testsuite/c-c++-common/gomp/pr63249.c
new file mode 100644
index 0000000000..878788ad7e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr63249.c
@@ -0,0 +1,16 @@
+/* PR c++/63249 */
+/* { dg-do compile } */
+/* { dg-options "-Wall -W -fopenmp" } */
+
+int
+foo (int *v, int A, int B) /* { dg-bogus "set but not used" } */
+{
+ int r = 0;
+ int a = 2; /* { dg-bogus "set but not used" } */
+ int b = 4; /* { dg-bogus "set but not used" } */
+#pragma omp target map(to: v[a:b])
+ r |= v[3];
+#pragma omp target map(to: v[A:B])
+ r |= v[3];
+ return r;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/pr63328.c b/gcc/testsuite/c-c++-common/gomp/pr63328.c
new file mode 100644
index 0000000000..3958abe166
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/pr63328.c
@@ -0,0 +1,5 @@
+/* PR debug/63328 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fopenmp-simd -fno-strict-aliasing -fcompare-debug" } */
+
+#include "pr60823-3.c"
diff --git a/gcc/testsuite/c-c++-common/gomp/sections1.c b/gcc/testsuite/c-c++-common/gomp/sections1.c
new file mode 100644
index 0000000000..8c8ab91f7f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/sections1.c
@@ -0,0 +1,73 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void bar (int);
+
+void
+foo ()
+{
+ #pragma omp sections
+ {
+ bar (1);
+ #pragma omp section
+ {
+ bar (2);
+ }
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ bar (3);
+ #pragma omp section
+ {
+ bar (4);
+ bar (5);
+ }
+ }
+ #pragma omp sections
+ {
+ {
+ bar (6);
+ bar (7);
+ }
+ #pragma omp section
+ bar (8);
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ {
+ bar (9);
+ }
+ #pragma omp section
+ bar (10);
+ #pragma omp section
+ bar (11);
+ }
+ #pragma omp sections
+ {
+ } /* { dg-error "expression before" } */
+ #pragma omp sections
+ {
+ bar (12);
+ bar (13); /* { dg-error "pragma omp section" } */
+ #pragma omp section
+ bar (14);
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ } /* { dg-error "expression before" } */
+ #pragma omp sections
+ {
+ bar (15);
+ #pragma omp section
+ bar (16);
+ bar (17); /* { dg-error "pragma omp section" } */
+ }
+ #pragma omp sections
+ {
+ bar (18);
+ #pragma omp section
+ } /* { dg-error "expression before" } */
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/simd1.c b/gcc/testsuite/c-c++-common/gomp/simd1.c
new file mode 100644
index 0000000000..29e464ca03
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-additional-options "-std=c99" { target c } } */
+
+extern int a[1024], b[1024], k, l, m;
+
+void
+foo ()
+{
+ int i;
+ #pragma omp simd safelen(16) aligned(a, b : 32)
+ for (i = 0; i < 1024; i++)
+ a[i] *= b[i];
+}
+
+void
+bar (int *p)
+{
+ int i;
+ #pragma omp simd safelen(16) aligned(a, p : 32) linear(k, l : m + 1)
+ for (i = 0; i < 1024; i++)
+ a[i] *= p[i], k += m + 1;
+}
+
+void
+baz (int *p)
+{
+ #pragma omp simd safelen(16) aligned(a, p : 32) linear(k, l : m + 1)
+ for (int i = 0; i < 1024; i++)
+ a[i] *= p[i], k += m + 1;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/simd2.c b/gcc/testsuite/c-c++-common/gomp/simd2.c
new file mode 100644
index 0000000000..dda9c62d6d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-additional-options "-std=c99" { target c } } */
+
+extern int a[13][13][13][13], k, l, m;
+
+void
+foo (int *q, float *p)
+{
+ int i, j, n, o;
+#pragma omp simd collapse (4) linear(k : m + 1) aligned(p, q)
+ for (i = 0; i < 13; i++)
+ for (j = 0; j < 13; j++)
+ for (n = 0; n < 13; n++)
+ for (o = 0; o < 13; o += 2)
+ q[k] *= p[k] + 7 * i + 14 * j + 21 * n + 28 * o, k += m + 1;
+}
+
+void
+bar (float *p)
+{
+ int i, j, n, o;
+#pragma omp simd collapse (4) linear(k : m + 1)
+ for (i = 0; i < 13; i++)
+ for (j = 0; j < 13; j++)
+ for (n = 0; n < 13; n++)
+ for (o = 0; o < 13; o += 2)
+ a[i][j][n][o] *= p[k], k += m + 1;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/simd3.c b/gcc/testsuite/c-c++-common/gomp/simd3.c
new file mode 100644
index 0000000000..e8270fc452
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd3.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-additional-options "-std=c99" { target c } } */
+
+extern int a[13*13*13*13*2], b[1024], *k, l, m;
+
+void
+foo (int *q, float *p)
+{
+ int *i, *j, *n, *o;
+#pragma omp simd collapse (4) linear(k : m + 1) aligned(p, q)
+ for (i = &a[0]; i < &a[13*13*13*13*2]; i += 13*13*13*2)
+ for (j = &a[0]; j < &a[13*13*13*2]; j += 13*13*2)
+ for (n = &a[0]; n < &a[13*13*2]; n += 13*2)
+ for (o = &a[0]; o < &a[13*2]; o += 2)
+ q[k - &a[0]] *= p[k - &a[0]] + 7 * (i-&a[0]) + 14 * (j-&a[0]) + 21 * (n-&a[0]) + 28 * (o-&a[0]), k += m + 1;
+}
+
+void
+bar ()
+{
+ int *i;
+ #pragma omp simd safelen(16) aligned(a, b : 32)
+ for (i = &a[0]; i < &a[1024]; i++)
+ *i *= b[i - &a[0]];
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/simd4.c b/gcc/testsuite/c-c++-common/gomp/simd4.c
new file mode 100644
index 0000000000..37901b6a07
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd4.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-additional-options "-std=c99" { target c } } */
+
+struct S *p; /* { dg-error "forward declaration" "" { target c++ } } */
+float f;
+int j;
+
+void
+foo (void)
+{
+#pragma omp simd linear(p) linear(f : 1)
+ for (int i = 0; i < 10; i++)
+ ;
+#pragma omp simd linear(j : 7.0) /* { dg-error "step expression must be integral" } */
+ for (int i = 0; i < 10; i++)
+ ;
+}
+
+/* { dg-error "linear clause applied to" "" { target *-*-* } 12 } */
+/* { dg-error "(incomplete|undefined) type" "" { target *-*-* } 12 } */
diff --git a/gcc/testsuite/c-c++-common/gomp/simd5.c b/gcc/testsuite/c-c++-common/gomp/simd5.c
new file mode 100644
index 0000000000..a57896d870
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd5.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+/* { dg-additional-options "-std=c99" { target c } } */
+
+void baz (void) __attribute__((noreturn));
+
+void
+foo (int x)
+{
+ if (x)
+ #pragma omp simd
+ for (int i = 0; i < 10; i++)
+ baz ();
+#pragma omp simd collapse(3)
+ for (int i = 0; i < 10; i++)
+ for (int j = 0; j < 10; j++)
+ for (int k = 0; k < 10; k++)
+ baz ();
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/simd6.c b/gcc/testsuite/c-c++-common/gomp/simd6.c
new file mode 100644
index 0000000000..3a90c225e9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/simd6.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+extern int a[1024];
+
+struct S { int i; } s;
+
+void
+f1 (int x, float f, int *p)
+{
+ int i;
+ #pragma omp simd aligned(x : 32) /* { dg-error "neither a pointer nor an array" } */
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(f) /* { dg-error "neither a pointer nor an array" } */
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(s : 16) /* { dg-error "neither a pointer nor an array" } */
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(a : 8)
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(p : 8)
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+}
diff --git a/gcc/testsuite/c-c++-common/gomp/single1.c b/gcc/testsuite/c-c++-common/gomp/single1.c
new file mode 100644
index 0000000000..c080a8804c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/gomp/single1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+void
+foo (int i)
+{
+ #pragma omp single copyprivate (i)
+ ;
+ #pragma omp single nowait
+ ;
+ #pragma omp single copyprivate (i) nowait /* { dg-error "clause must not be used together with" } */
+ ;
+ #pragma omp single nowait copyprivate (i) /* { dg-error "clause must not be used together with" } */
+ ;
+}
diff --git a/gcc/testsuite/c-c++-common/init-vec-1.c b/gcc/testsuite/c-c++-common/init-vec-1.c
new file mode 100644
index 0000000000..68243cd302
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/init-vec-1.c
@@ -0,0 +1,4 @@
+/* Don't ICE or emit spurious errors when init a vector with a scalar. */
+/* { dg-do compile } */
+typedef float v2sf __attribute__ ((vector_size (8)));
+v2sf a = 0.0; /* { dg-error "incompatible types|cannot convert" } */
diff --git a/gcc/testsuite/c-c++-common/opaque-vector.c b/gcc/testsuite/c-c++-common/opaque-vector.c
new file mode 100644
index 0000000000..bac3497be3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/opaque-vector.c
@@ -0,0 +1,22 @@
+#define B_TEST(TYPE) { TYPE v __attribute__((vector_size(16))); (void)((v < v) < v); }
+#ifdef __cplusplus
+#define T_TEST(TYPE) { TYPE s; TYPE v __attribute__((vector_size(16))); __typeof((v<v)[0]) iv __attribute__((vector_size(16))); (void)((iv ? s : s) < v); }
+#else
+#define T_TEST(TYPE)
+#endif
+#define T(TYPE) B_TEST(TYPE) T_TEST(TYPE)
+
+void f ()
+{
+ T(short)
+ T(int)
+ T(long)
+ T(long long)
+
+ T_TEST(float)
+ T_TEST(double)
+ /* Avoid trouble with non-power-of-two sizes. */
+#if !defined(__i386__) && !defined(__x86_64__) && !defined(__m68k__) && !defined(__ia64__) && !defined(__hppa__)
+ T_TEST(long double)
+#endif
+}
diff --git a/gcc/testsuite/c-c++-common/pr20318.c b/gcc/testsuite/c-c++-common/pr20318.c
new file mode 100644
index 0000000000..c6e9639fc4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr20318.c
@@ -0,0 +1,3 @@
+/* { dg-do compile } */
+
+extern int f() __attribute__((returns_nonnull)); /* { dg-error "not returning a pointer" } */
diff --git a/gcc/testsuite/c-c++-common/pr28656.c b/gcc/testsuite/c-c++-common/pr28656.c
new file mode 100644
index 0000000000..a0c2339f59
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr28656.c
@@ -0,0 +1,29 @@
+/* PR c++/28656 */
+/* { dg-do compile } */
+/* { dg-options "-Wnonnull" } */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+extern void *memcpy (void *__restrict, const void *__restrict, __SIZE_TYPE__)
+ __attribute__((nonnull (1), nonnull (2), nonnull (1, 2), nonnull));
+#ifdef __cplusplus
+}
+#endif
+
+extern void bar (void *p1, void *p2, void *p3, void *p4, void *p5)
+ __attribute__((nonnull (1), nonnull (1, 3), nonnull (3, 5), nonnull (4)));
+
+void
+foo (void)
+{
+ memcpy (0, 0, 0);
+ bar (0, 0, 0, 0, 0);
+}
+
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 1" "" { target *-*-* } 20 } */
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 2" "" { target *-*-* } 20 } */
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 1" "" { target *-*-* } 21 } */
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 3" "" { target *-*-* } 21 } */
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 4" "" { target *-*-* } 21 } */
+/* { dg-warning "null argument where non-null required\[^\n\r\]*argument 5" "" { target *-*-* } 21 } */
diff --git a/gcc/testsuite/c-c++-common/pr36282-1.c b/gcc/testsuite/c-c++-common/pr36282-1.c
new file mode 100644
index 0000000000..abe11e7ec7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr36282-1.c
@@ -0,0 +1,12 @@
+/* PR middle-end/36282 */
+/* { dg-do compile } */
+
+#pragma weak bar
+
+extern void *baz (void *dest, const void *src, __SIZE_TYPE__ n);
+extern __typeof (baz) baz __asm("bazfn"); /* { dg-bogus "asm declaration ignored due to conflict with previous rename" } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/pr36282-2.c b/gcc/testsuite/c-c++-common/pr36282-2.c
new file mode 100644
index 0000000000..86d3ad657a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr36282-2.c
@@ -0,0 +1,10 @@
+/* PR middle-end/36282 */
+/* { dg-do compile } */
+
+extern void *baz (void *dest, const void *src, __SIZE_TYPE__ n);
+extern __typeof (baz) baz __asm("bazfn"); /* { dg-bogus "asm declaration ignored due to conflict with previous rename" } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/pr36282-3.c b/gcc/testsuite/c-c++-common/pr36282-3.c
new file mode 100644
index 0000000000..8982470c09
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr36282-3.c
@@ -0,0 +1,13 @@
+/* PR middle-end/36282 */
+/* { dg-do compile } */
+
+void bar (void);
+#pragma weak bar
+
+extern void *baz (void *dest, const void *src, __SIZE_TYPE__ n);
+extern __typeof (baz) baz __asm("bazfn"); /* { dg-bogus "asm declaration ignored due to conflict with previous rename" } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/pr36282-4.c b/gcc/testsuite/c-c++-common/pr36282-4.c
new file mode 100644
index 0000000000..f6f40f8e4a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr36282-4.c
@@ -0,0 +1,13 @@
+/* PR middle-end/36282 */
+/* { dg-do compile } */
+
+#pragma weak bar
+void bar (void);
+
+extern void *baz (void *dest, const void *src, __SIZE_TYPE__ n);
+extern __typeof (baz) baz __asm("bazfn"); /* { dg-bogus "asm declaration ignored due to conflict with previous rename" } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/pr37743.c b/gcc/testsuite/c-c++-common/pr37743.c
new file mode 100644
index 0000000000..2ea678e09a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr37743.c
@@ -0,0 +1,13 @@
+/* PR c/37743 */
+/* This needs to be run only on targets where __UINT32_TYPE__ is defined
+ to unsigned int. */
+/* { dg-do compile { target *-*-linux-gnu* } } */
+/* { dg-options "-Wformat" } */
+
+int foo (const char *, ...) __attribute__ ((format (printf, 1, 2)));
+
+void
+bar (unsigned int x)
+{
+ foo ("%x", __builtin_bswap32 (x));
+}
diff --git a/gcc/testsuite/c-c++-common/pr41779.c b/gcc/testsuite/c-c++-common/pr41779.c
index 80c8e6b1dd..25b0b681ca 100644
--- a/gcc/testsuite/c-c++-common/pr41779.c
+++ b/gcc/testsuite/c-c++-common/pr41779.c
@@ -1,4 +1,4 @@
-/* PR41779: Wconversion cannot see throught real*integer promotions. */
+/* PR41779: Wconversion cannot see through real*integer promotions. */
/* { dg-do compile } */
/* { dg-skip-if "doubles are floats" { "avr-*-*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -Wconversion" { target c } } */
diff --git a/gcc/testsuite/c-c++-common/pr43772.c b/gcc/testsuite/c-c++-common/pr43772.c
new file mode 100644
index 0000000000..8bf09a420f
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr43772.c
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+/* { dg-options "-Wlogical-op -Wtype-limits" } */
+#include <limits.h>
+long long
+emacs_lseek (long long offset)
+{
+ return -1-9223372036854775807LL <= offset && offset <= 9223372036854775807LL;
+}
+
+long long
+foo (long long offset)
+{
+ return -1-9223372036854775807LL > offset && offset > 9223372036854775807LL;
+}
+
+long long
+foo3 (long long offset)
+{
+ return -1-9223372036854775807LL > offset && offset < 9223372036854775807LL;
+}
+
+long long
+foo2 (long long offset)
+{
+ if (-1-9223372036854775807LL <= offset) return 0;
+ if (offset <= 9223372036854775807LL) return 0;
+ if (-1-9223372036854775807LL > offset) return 0;
+ if (offset > 9223372036854775807LL) return 0;
+ return 1;
+}
+
+# define BOT INT_MIN
+# define TOP INT_MAX
+
+long long get_intmax(void);
+int get_int(void);
+extern void do_something(void);
+int main(void)
+{
+ int i = get_int();
+ long long x = get_intmax();
+ i = (i > BOT && i < TOP); //OK
+ i = (i >= BOT+1 && i <= TOP-1); //OK
+ i = (i >= BOT && i <= TOP); //Oops!
+}
diff --git a/gcc/testsuite/c-c++-common/pr48418.c b/gcc/testsuite/c-c++-common/pr48418.c
new file mode 100644
index 0000000000..95ff855b89
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr48418.c
@@ -0,0 +1,20 @@
+/* PR c/48418 */
+/* { dg-do compile } */
+/* { dg-options "-Wall -O2" } */
+
+int
+foo (int x)
+{
+ const int a = sizeof (int) * __CHAR_BIT__;
+ const int b = -7;
+ int c = 0;
+ c += x << a; /* { dg-warning "left shift count >= width of type" } */
+ c += x << b; /* { dg-warning "left shift count is negative" } */
+ c += x << (sizeof (int) * __CHAR_BIT__); /* { dg-warning "left shift count >= width of type" } */
+ c += x << -7; /* { dg-warning "left shift count is negative" } */
+ c += x >> a; /* { dg-warning "right shift count >= width of type" } */
+ c += x >> b; /* { dg-warning "right shift count is negative" } */
+ c += x >> (sizeof (int) * __CHAR_BIT__); /* { dg-warning "right shift count >= width of type" } */
+ c += x >> -7; /* { dg-warning "right shift count is negative" } */
+ return c;
+}
diff --git a/gcc/testsuite/c-c++-common/pr51294.c b/gcc/testsuite/c-c++-common/pr51294.c
new file mode 100644
index 0000000000..395e6b2dfc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr51294.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-Wconversion -Wsign-conversion" } */
+
+void foo(int haveBar, char bar_)
+{
+ char zuul = haveBar?bar_:0;
+ char zuul2 = haveBar?bar_:bar_;
+ char zuul3 = haveBar?0:bar_;
+}
diff --git a/gcc/testsuite/c-c++-common/pr51712.c b/gcc/testsuite/c-c++-common/pr51712.c
new file mode 100644
index 0000000000..69e316d245
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr51712.c
@@ -0,0 +1,19 @@
+/* PR c/51712 */
+/* { dg-do compile } */
+/* { dg-options "-Wtype-limits" } */
+/* { dg-additional-options "-fno-short-enums" { target short_enums } } */
+
+enum test_enum {
+ FOO,
+ BAR
+};
+
+int valid(enum test_enum arg)
+{
+ return arg >= 0 && arg <= BAR;
+}
+
+int valid2(unsigned int arg2)
+{
+ return arg2 >= FOO && arg2 <= BAR; /* { dg-bogus "comparison of unsigned expression" "" { xfail *-*-* } } */
+}
diff --git a/gcc/testsuite/c-c++-common/pr53633.c b/gcc/testsuite/c-c++-common/pr53633.c
new file mode 100644
index 0000000000..db7e1ceb82
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr53633.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target naked_functions } */
+/* { dg-options "-O2 -Wall" } */
+/* Check that we do not get warnings about missing return statements
+ or bogus looking noreturn functions. */
+int __attribute__((naked))
+foo(void)
+{
+ __asm__ ("");
+}
+
+int __attribute__((naked,noreturn))
+bar(void)
+{
+ __asm__ ("");
+}
diff --git a/gcc/testsuite/c-c++-common/pr54486.c b/gcc/testsuite/c-c++-common/pr54486.c
index e8125fcf39..b4bcf3b101 100644
--- a/gcc/testsuite/c-c++-common/pr54486.c
+++ b/gcc/testsuite/c-c++-common/pr54486.c
@@ -1,6 +1,7 @@
/* PR middle-end/54486 */
/* { dg-do compile } */
/* { dg-options "-Wformat" } */
+/* { dg-skip-if "no POSIX printf" { *-*-mingw* } { "*" } { "" } } */
#ifdef __cplusplus
extern "C" {
diff --git a/gcc/testsuite/c-c++-common/pr55619.c b/gcc/testsuite/c-c++-common/pr55619.c
new file mode 100644
index 0000000000..f1b4e9c002
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr55619.c
@@ -0,0 +1,11 @@
+/* PR c++/55619 */
+/* { dg-do compile } */
+
+int y[4];
+
+void
+f ()
+{
+ int x[4] = { 0, 1, 2, 3 };
+ __asm volatile ("" : : "m" (x), "m" (y));
+}
diff --git a/gcc/testsuite/c-c++-common/pr55771.c b/gcc/testsuite/c-c++-common/pr55771.c
new file mode 100644
index 0000000000..16f02442c1
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr55771.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+
+float global;
+int main()
+{
+ unsigned long z = 1;
+ float x = -z;
+ global = x;
+ if (global < 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/pr56302.c b/gcc/testsuite/c-c++-common/pr56302.c
new file mode 100644
index 0000000000..fb67d12717
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr56302.c
@@ -0,0 +1,9 @@
+/* PR c++/56302 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void
+foo (int x)
+{
+ __asm__ __volatile__ ("" : : "n" (-1 * (int) sizeof (&x)));
+}
diff --git a/gcc/testsuite/c-c++-common/pr56566.c b/gcc/testsuite/c-c++-common/pr56566.c
new file mode 100644
index 0000000000..e753d933a4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr56566.c
@@ -0,0 +1,14 @@
+/* PR c/56566 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct S1 { enum E1 { N1 = -1, Z1 = 0 } e : 1; };
+struct S2 { enum E2 { N2 = -1 } e : 1; };
+struct S3 { enum E3 { Z3 = 0 } e : 1; };
+struct S4 { enum E4 { N4 = -2, Z4 = 1 } e : 2; };
+struct S5 { enum E5 { N5 = -3, Z5 = 1 } e : 3; };
+struct S6 { enum E6 { N6 = -2, Z6 = 1 } e : 1; }; // { dg-warning "too small|narrower" }
+struct S7 { enum E7 { N7 = -3, Z7 = 1 } e : 2; }; // { dg-warning "too small|narrower" }
+struct S8 { enum E8 { Z8 = 1 } e : 1; };
+struct S9 { enum E9 { Z9 = 2 } e : 2; };
+struct S0 { enum E0 { Z0 = 2 } e : 1; }; // { dg-warning "too small|narrower" }
diff --git a/gcc/testsuite/c-c++-common/pr56607.c b/gcc/testsuite/c-c++-common/pr56607.c
new file mode 100644
index 0000000000..d7faa81151
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr56607.c
@@ -0,0 +1,29 @@
+/* PR c++/56607 */
+/* { dg-do compile { target { { lp64 || ilp32 } || llp64 } } } */
+/* { dg-options "-O2 -Wdiv-by-zero" } */
+
+int
+f1 (void)
+{
+ return 1 / (sizeof (char) - 1); /* { dg-warning "division by zero" } */
+}
+
+int
+f2 (void)
+{
+ const int x = sizeof (char) - 1;
+ return 1 / x; /* { dg-warning "division by zero" "" { target c++ } } */
+}
+
+int
+f3 (void)
+{
+ return 1 / (sizeof (int) / 3 - 1); /* { dg-warning "division by zero" } */
+}
+
+int
+f4 (void)
+{
+ const int x = sizeof (int) / 3 - 1;
+ return 1 / x; /* { dg-warning "division by zero" "" { target c++ } } */
+}
diff --git a/gcc/testsuite/c-c++-common/pr57793.c b/gcc/testsuite/c-c++-common/pr57793.c
new file mode 100644
index 0000000000..f2719529eb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr57793.c
@@ -0,0 +1,23 @@
+/* PR c++/57793 */
+
+struct A { unsigned a : 1; unsigned b : 1; };
+struct B /* { dg-error "type .B. is too large" "" { target { c++ && ilp32 } } } */
+{
+ unsigned char c[0x40000000]; /* { dg-error "size of array .c. is too large" "" { target { ! int32plus } } } */
+ unsigned char d[0x40000ff0];/* { dg-error "size of array .d. is too large" "" { target { ! int32plus } } } */
+ struct A e;
+}; /* { dg-error "type .struct B. is too large" "" { target { c && ilp32 } } } */
+
+void *foo (struct B *p)
+{
+ if (p->e.a)
+ return (void *) 0;
+ p->e.b = 1;
+ return p->c;
+}
+
+void
+bar (struct B *p)
+{
+ foo (p);
+}
diff --git a/gcc/testsuite/c-c++-common/pr58346-1.c b/gcc/testsuite/c-c++-common/pr58346-1.c
new file mode 100644
index 0000000000..371fcf4845
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr58346-1.c
@@ -0,0 +1,24 @@
+/* PR c/58346 */
+/* { dg-do compile } */
+
+struct U {
+#ifdef __cplusplus
+ char a[0];
+#endif
+};
+static struct U b[6];
+static struct U *u1, *u2;
+
+int
+foo (struct U *p, struct U *q)
+{
+ return q - p; /* { dg-error "arithmetic on pointer to an empty aggregate" } */
+}
+
+void
+bar (void)
+{
+ __PTRDIFF_TYPE__ d = u1 - u2; /* { dg-error "arithmetic on pointer to an empty aggregate" } */
+ __asm volatile ("" : "+g" (d));
+ foo (&b[0], &b[4]);
+}
diff --git a/gcc/testsuite/c-c++-common/pr58346-2.c b/gcc/testsuite/c-c++-common/pr58346-2.c
new file mode 100644
index 0000000000..195060e420
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr58346-2.c
@@ -0,0 +1,8 @@
+/* PR c/58346 */
+/* { dg-do compile } */
+
+__PTRDIFF_TYPE__
+foo (int p[3][0], int q[3][0])
+{
+ return p - q; /* { dg-error "arithmetic on pointer to an empty aggregate" } */
+}
diff --git a/gcc/testsuite/c-c++-common/pr58346-3.c b/gcc/testsuite/c-c++-common/pr58346-3.c
new file mode 100644
index 0000000000..41627ed953
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr58346-3.c
@@ -0,0 +1,16 @@
+/* PR c/58346 */
+/* { dg-do compile } */
+
+void
+foo (void)
+{
+ __PTRDIFF_TYPE__ d;
+ const int i = 0;
+ int a1[2][0], a2[2][0];
+ int b1[3][i], b2[4][i];
+ d = a1 - a2; /* { dg-error "arithmetic on pointer to an empty aggregate" } */
+ __asm volatile ("" : "+g" (d));
+ /* No error here for C. */
+ d = b1 - b2; /* { dg-error "arithmetic on pointer to an empty aggregate" "" { target c++ } } */
+ __asm volatile ("" : "+g" (d));
+}
diff --git a/gcc/testsuite/c-c++-common/pr59032.c b/gcc/testsuite/c-c++-common/pr59032.c
new file mode 100644
index 0000000000..327f5aeb6b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr59032.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo()
+{
+ float v __attribute__((vector_size(8)));
+ v++;
+}
+
+void
+foo2 ()
+{
+ float v __attribute__((vector_size(8)));
+ ++v;
+}
+
+void
+foo3 ()
+{
+ float v __attribute__((vector_size(8)));
+ v--;
+}
+
+void
+foo4 ()
+{
+ float v __attribute__((vector_size(8)));
+ --v;
+}
diff --git a/gcc/testsuite/c-c++-common/pr59037.c b/gcc/testsuite/c-c++-common/pr59037.c
new file mode 100644
index 0000000000..fae13c2fa9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr59037.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef int v4si __attribute__ ((vector_size (16)));
+
+int
+main (int argc, char** argv)
+{
+ v4si x = {0,1,2,3};
+ x = (v4si) {(x)[3], (x)[2], (x)[1], (x)[0]};
+ return x[4];
+}
diff --git a/gcc/testsuite/c-c++-common/pr59223.c b/gcc/testsuite/c-c++-common/pr59223.c
new file mode 100644
index 0000000000..471c0625df
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr59223.c
@@ -0,0 +1,13 @@
+/* PR c/59223 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wmaybe-uninitialized" } */
+
+int foo (int x)
+{
+ int y;
+ if (x == 0)
+ y = 1;
+ else if (x == 1)
+ y = 2;
+ return y; /* { dg-warning "may be used uninitialized in this function" } */
+}
diff --git a/gcc/testsuite/c-c++-common/pr59280.c b/gcc/testsuite/c-c++-common/pr59280.c
new file mode 100644
index 0000000000..779f0fb858
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr59280.c
@@ -0,0 +1,4 @@
+/* PR c/59280 */
+/* { dg-do compile } */
+
+void bar (char *) __attribute__((constructor(foo))); /* { dg-error "constructor priorities must be integers|was not declared|constructor priorities are not supported" } */
diff --git a/gcc/testsuite/c-c++-common/pr60101.c b/gcc/testsuite/c-c++-common/pr60101.c
new file mode 100644
index 0000000000..b1634c49f0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr60101.c
@@ -0,0 +1,112 @@
+/* PR c/60101 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+extern int *a, b, *c, *d;
+
+void
+foo (double _Complex *x, double _Complex *y, double _Complex *z, unsigned int l, int w)
+{
+ unsigned int e = (unsigned int) a[3];
+ double _Complex (*v)[l][4][e][l][4] = (double _Complex (*)[l][4][e][l][4]) z;
+ double _Complex (*f)[l][b][l] = (double _Complex (*)[l][b][l]) y;
+ unsigned int g = c[0] * c[1] * c[2];
+ unsigned int h = d[0] + c[0] * (d[1] + c[1] * d[2]);
+ unsigned int i;
+
+ for (i = 0; i < e; i++)
+ {
+ int j = e * d[3] + i;
+
+ unsigned int n0, n1, n2, n3, n4, n5, n6, n7, n8, n9, n10, n11;
+ float _Complex s = 0.;
+ unsigned int t = 0;
+
+ for (n0 = 0; n0 < l; n0++)
+ for (n1 = 0; n1 < l; n1++)
+ for (n2 = 0; n2 < l; n2++)
+ for (n3 = 0; n3 < l; n3++)
+ for (n4 = 0; n4 < l; n4++)
+ for (n5 = 0; n5 < l; n5++)
+ for (n6 = 0; n6 < l; n6++)
+ for (n7 = 0; n7 < l; n7++)
+ for (n8 = 0; n8 < l; n8++)
+ for (n9 = 0; n9 < l; n9++)
+ for (n10 = 0; n10 < l; n10++)
+ for (n11 = 0; n11 < l; n11++)
+ {
+ if (t % g == h)
+ s
+ += f[n0][n4][j][n8] * f[n1][n5][j][n9] * ~(f[n2][n6][w][n10]) * ~(f[n3][n7][w][n11])
+ * (+0.25 * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.25 * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ - 0.5 * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.25 * v[0][n2][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ - 0.5 * v[0][n2][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ + 0.25 * v[0][n2][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.25 * v[0][n3][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ - 0.5 * v[0][n3][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ + 0.25 * v[0][n3][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n10][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.25 * v[0][n3][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ + 0.25 * v[0][n3][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ - 0.5 * v[0][n3][0][i][n9][1] * v[0][n10][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.25 * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ + 0.25 * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 1. * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n2][0][i][n5][1] * v[0][n3][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ + 0.25 * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n6][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ + 0.25 * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n11][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ - 0.5 * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n6][1][i][n1][0] * v[0][n7][1][i][n0][0]
+ + 1. * v[0][n10][0][i][n9][1] * v[0][n3][0][i][n5][1] * v[0][n2][0][i][n4][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n6][1][i][n0][0]
+ + 0.5 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n7][1][i][n1][0] * v[0][n11][1][i][n0][0] * v[0][n10][0][i][n8][0]
+ - 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n11][1][i][n1][0] * v[0][n7][1][i][n0][0] * v[0][n10][0][i][n8][0]
+ - 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n0][0] * v[0][n10][0][i][n1][0]
+ + 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n1][0] * v[0][n10][0][i][n0][0]
+ + 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n0][0] * v[0][n10][0][i][n1][0]
+ - 0.5 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n3][0][i][n5][1]
+ * v[0][n11][1][i][n8][0] * v[0][n7][1][i][n1][0] * v[0][n10][0][i][n0][0]
+ - 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n10][0][i][n5][1]
+ * v[0][n7][1][i][n1][0] * v[0][n11][1][i][n0][0] * v[0][n3][0][i][n8][0]
+ - 0.25 * v[0][n6][1][i][n4][1] * v[0][n2][0][i][n9][1] * v[0][n10][0][i][n5][1]
+ * v[0][n7][1][i][n8][0] * v[0][n11][1][i][n0][0] * v[0][n3][0][i][n1][0]);
+ t++;
+ }
+ int u = (j - w + b) % b;
+ int q = (j >= w ? +1 : -1);
+ int r = q;
+ x[u] += r * s;
+ }
+}
diff --git a/gcc/testsuite/c-c++-common/pr60689.c b/gcc/testsuite/c-c++-common/pr60689.c
new file mode 100644
index 0000000000..9475bd835c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr60689.c
@@ -0,0 +1,10 @@
+/* PR c++/60689 */
+/* { dg-do compile } */
+
+struct S { char x[9]; };
+
+void
+foo (struct S *x, struct S *y, struct S *z)
+{
+ __atomic_exchange (x, y, z, __ATOMIC_SEQ_CST);
+}
diff --git a/gcc/testsuite/c-c++-common/pr61741.c b/gcc/testsuite/c-c++-common/pr61741.c
new file mode 100644
index 0000000000..a2bc4bda38
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr61741.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+int a = 1, b;
+
+void
+foo (void)
+{
+ signed char c = 0;
+ for (; a; a--)
+ for (; c >= 0; c++);
+ if (!c)
+ b = 1;
+}
+
+int
+main ()
+{
+ foo ();
+ if (b != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/raw-string-13.c b/gcc/testsuite/c-c++-common/raw-string-13.c
new file mode 100644
index 0000000000..1b37405cee
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-13.c
@@ -0,0 +1,272 @@
+// PR preprocessor/57620
+// { dg-do run }
+// { dg-require-effective-target wchar }
+// { dg-options "-std=gnu99 -Wno-c++-compat -trigraphs" { target c } }
+// { dg-options "-std=c++11" { target c++ } }
+
+#ifndef __cplusplus
+#include <wchar.h>
+
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+#define R
+#define u
+#define uR
+#define U
+#define UR
+#define u8
+#define u8R
+#define L
+#define LR
+
+const char s00[] = R"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char s01[] = R"a(
+)\
+a"
+)a";
+const char s02[] = R"a(
+)a\
+"
+)a";
+const char s03[] = R"ab(
+)a\
+b"
+)ab";
+const char s04[] = R"a??/(x)a??/";
+const char s05[] = R"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char s06[] = R"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char s07[] = R"abc(??)\
+abc";)abc";
+const char s08[] = R"def(de)\
+def";)def";
+const char s09[] = R"a(??)\
+a"
+)a";
+const char s10[] = R"a(??)a\
+"
+)a";
+const char s11[] = R"ab(??)a\
+b"
+)ab";
+const char s12[] = R"a#(a#)a??=)a#";
+const char s13[] = R"a#(??)a??=??)a#";
+const char s14[] = R"??/(x)??/
+";)??/";
+const char s15[] = R"??/(??)??/
+";)??/";
+const char s16[] = R"??(??)??";
+const char s17[] = R"?(?)??)?";
+const char s18[] = R"??(??)??)??)??";
+
+const char16_t u00[] = uR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char16_t u01[] = uR"a(
+)\
+a"
+)a";
+const char16_t u02[] = uR"a(
+)a\
+"
+)a";
+const char16_t u03[] = uR"ab(
+)a\
+b"
+)ab";
+const char16_t u04[] = uR"a??/(x)a??/";
+const char16_t u05[] = uR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char16_t u06[] = uR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char16_t u07[] = uR"abc(??)\
+abc";)abc";
+const char16_t u08[] = uR"def(de)\
+def";)def";
+const char16_t u09[] = uR"a(??)\
+a"
+)a";
+const char16_t u10[] = uR"a(??)a\
+"
+)a";
+const char16_t u11[] = uR"ab(??)a\
+b"
+)ab";
+const char16_t u12[] = uR"a#(a#)a??=)a#";
+const char16_t u13[] = uR"a#(??)a??=??)a#";
+const char16_t u14[] = uR"??/(x)??/
+";)??/";
+const char16_t u15[] = uR"??/(??)??/
+";)??/";
+const char16_t u16[] = uR"??(??)??";
+const char16_t u17[] = uR"?(?)??)?";
+const char16_t u18[] = uR"??(??)??)??)??";
+
+const char32_t U00[] = UR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char32_t U01[] = UR"a(
+)\
+a"
+)a";
+const char32_t U02[] = UR"a(
+)a\
+"
+)a";
+const char32_t U03[] = UR"ab(
+)a\
+b"
+)ab";
+const char32_t U04[] = UR"a??/(x)a??/";
+const char32_t U05[] = UR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char32_t U06[] = UR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char32_t U07[] = UR"abc(??)\
+abc";)abc";
+const char32_t U08[] = UR"def(de)\
+def";)def";
+const char32_t U09[] = UR"a(??)\
+a"
+)a";
+const char32_t U10[] = UR"a(??)a\
+"
+)a";
+const char32_t U11[] = UR"ab(??)a\
+b"
+)ab";
+const char32_t U12[] = UR"a#(a#)a??=)a#";
+const char32_t U13[] = UR"a#(??)a??=??)a#";
+const char32_t U14[] = UR"??/(x)??/
+";)??/";
+const char32_t U15[] = UR"??/(??)??/
+";)??/";
+const char32_t U16[] = UR"??(??)??";
+const char32_t U17[] = UR"?(?)??)?";
+const char32_t U18[] = UR"??(??)??)??)??";
+
+const wchar_t L00[] = LR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const wchar_t L01[] = LR"a(
+)\
+a"
+)a";
+const wchar_t L02[] = LR"a(
+)a\
+"
+)a";
+const wchar_t L03[] = LR"ab(
+)a\
+b"
+)ab";
+const wchar_t L04[] = LR"a??/(x)a??/";
+const wchar_t L05[] = LR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const wchar_t L06[] = LR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const wchar_t L07[] = LR"abc(??)\
+abc";)abc";
+const wchar_t L08[] = LR"def(de)\
+def";)def";
+const wchar_t L09[] = LR"a(??)\
+a"
+)a";
+const wchar_t L10[] = LR"a(??)a\
+"
+)a";
+const wchar_t L11[] = LR"ab(??)a\
+b"
+)ab";
+const wchar_t L12[] = LR"a#(a#)a??=)a#";
+const wchar_t L13[] = LR"a#(??)a??=??)a#";
+const wchar_t L14[] = LR"??/(x)??/
+";)??/";
+const wchar_t L15[] = LR"??/(??)??/
+";)??/";
+const wchar_t L16[] = LR"??(??)??";
+const wchar_t L17[] = LR"?(?)??)?";
+const wchar_t L18[] = LR"??(??)??)??)??";
+
+int
+main (void)
+{
+#define TEST(str, val) \
+ if (sizeof (str) != sizeof (val) \
+ || __builtin_memcmp (str, val, sizeof (str)) != 0) \
+ __builtin_abort ()
+ TEST (s00, "??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (s01, "\n)\\\na\"\n");
+ TEST (s02, "\n)a\\\n\"\n");
+ TEST (s03, "\n)a\\\nb\"\n");
+ TEST (s04, "x");
+ TEST (s05, "abc");
+ TEST (s06, "abc");
+ TEST (s07, "??"")\\\nabc\";");
+ TEST (s08, "de)\\\ndef\";");
+ TEST (s09, "??"")\\\na\"\n");
+ TEST (s10, "??"")a\\\n\"\n");
+ TEST (s11, "??"")a\\\nb\"\n");
+ TEST (s12, "a#)a??""=");
+ TEST (s13, "??"")a??""=??");
+ TEST (s14, "x)??""/\n\";");
+ TEST (s15, "??"")??""/\n\";");
+ TEST (s16, "??");
+ TEST (s17, "?)??");
+ TEST (s18, "??"")??"")??");
+ TEST (u00, u"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (u01, u"\n)\\\na\"\n");
+ TEST (u02, u"\n)a\\\n\"\n");
+ TEST (u03, u"\n)a\\\nb\"\n");
+ TEST (u04, u"x");
+ TEST (u05, u"abc");
+ TEST (u06, u"abc");
+ TEST (u07, u"??"")\\\nabc\";");
+ TEST (u08, u"de)\\\ndef\";");
+ TEST (u09, u"??"")\\\na\"\n");
+ TEST (u10, u"??"")a\\\n\"\n");
+ TEST (u11, u"??"")a\\\nb\"\n");
+ TEST (u12, u"a#)a??""=");
+ TEST (u13, u"??"")a??""=??");
+ TEST (u14, u"x)??""/\n\";");
+ TEST (u15, u"??"")??""/\n\";");
+ TEST (u16, u"??");
+ TEST (u17, u"?)??");
+ TEST (u18, u"??"")??"")??");
+ TEST (U00, U"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (U01, U"\n)\\\na\"\n");
+ TEST (U02, U"\n)a\\\n\"\n");
+ TEST (U03, U"\n)a\\\nb\"\n");
+ TEST (U04, U"x");
+ TEST (U05, U"abc");
+ TEST (U06, U"abc");
+ TEST (U07, U"??"")\\\nabc\";");
+ TEST (U08, U"de)\\\ndef\";");
+ TEST (U09, U"??"")\\\na\"\n");
+ TEST (U10, U"??"")a\\\n\"\n");
+ TEST (U11, U"??"")a\\\nb\"\n");
+ TEST (U12, U"a#)a??""=");
+ TEST (U13, U"??"")a??""=??");
+ TEST (U14, U"x)??""/\n\";");
+ TEST (U15, U"??"")??""/\n\";");
+ TEST (U16, U"??");
+ TEST (U17, U"?)??");
+ TEST (U18, U"??"")??"")??");
+ TEST (L00, L"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (L01, L"\n)\\\na\"\n");
+ TEST (L02, L"\n)a\\\n\"\n");
+ TEST (L03, L"\n)a\\\nb\"\n");
+ TEST (L04, L"x");
+ TEST (L05, L"abc");
+ TEST (L06, L"abc");
+ TEST (L07, L"??"")\\\nabc\";");
+ TEST (L08, L"de)\\\ndef\";");
+ TEST (L09, L"??"")\\\na\"\n");
+ TEST (L10, L"??"")a\\\n\"\n");
+ TEST (L11, L"??"")a\\\nb\"\n");
+ TEST (L12, L"a#)a??""=");
+ TEST (L13, L"??"")a??""=??");
+ TEST (L14, L"x)??""/\n\";");
+ TEST (L15, L"??"")??""/\n\";");
+ TEST (L16, L"??");
+ TEST (L17, L"?)??");
+ TEST (L18, L"??"")??"")??");
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/raw-string-14.c b/gcc/testsuite/c-c++-common/raw-string-14.c
new file mode 100644
index 0000000000..2eeb7258f4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-14.c
@@ -0,0 +1,39 @@
+// PR preprocessor/57620
+// { dg-do compile }
+// { dg-options "-std=gnu99 -trigraphs" { target c } }
+// { dg-options "-std=c++11" { target c++ } }
+
+const void *s0 = R"abc\
+def()abcdef";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 6 }
+ // { dg-error "stray" "stray" { target *-*-* } 6 }
+const void *s1 = R"??/
+()??/";
+ // { dg-error "invalid new-line" "invalid" { target *-*-* } 10 }
+ // { dg-error "stray" "stray" { target *-*-* } 10 }
+ // { dg-warning "missing terminating" "missing" { target *-*-* } 10 }
+ // { dg-error "missing terminating" "missing" { target *-*-* } 10 }
+const void *s2 = R"abcdefghijklmn??/(a)abcdefghijklmn???";
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 16 }
+ // { dg-error "stray" "stray" { target *-*-* } 16 }
+ // { dg-error "expected" "expected" { target *-*-* } 16 }
+const void *s3 = R"abcdefghijklmno??/(a)abcdefghijklmno???";
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 20 }
+ // { dg-error "stray" "stray" { target *-*-* } 20 }
+const void *s4 = R"abcdefghijklmnop??=(a)abcdefghijklmnop??=";
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 23 }
+ // { dg-error "stray" "stray" { target *-*-* } 23 }
+const void *s5 = R"abc\
+()abcdef";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 26 }
+ // { dg-error "stray" "stray" { target *-*-* } 26 }
+const void *s6 = R"\
+()";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 30 }
+ // { dg-error "stray" "stray" { target *-*-* } 30 }
+const void *s7 = R"\
+a()a";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 34 }
+ // { dg-error "stray" "stray" { target *-*-* } 34 }
+
+int main () {}
diff --git a/gcc/testsuite/c-c++-common/raw-string-15.c b/gcc/testsuite/c-c++-common/raw-string-15.c
new file mode 100644
index 0000000000..9dfdaabd87
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-15.c
@@ -0,0 +1,272 @@
+// PR preprocessor/57620
+// { dg-do run }
+// { dg-require-effective-target wchar }
+// { dg-options "-std=gnu99 -Wno-c++-compat -Wtrigraphs" { target c } }
+// { dg-options "-std=gnu++11 -Wtrigraphs" { target c++ } }
+
+#ifndef __cplusplus
+#include <wchar.h>
+
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+#endif
+
+#define R
+#define u
+#define uR
+#define U
+#define UR
+#define u8
+#define u8R
+#define L
+#define LR
+
+const char s00[] = R"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char s01[] = R"a(
+)\
+a"
+)a";
+const char s02[] = R"a(
+)a\
+"
+)a";
+const char s03[] = R"ab(
+)a\
+b"
+)ab";
+const char s04[] = R"a??/(x)a??/";
+const char s05[] = R"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char s06[] = R"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char s07[] = R"abc(??)\
+abc";)abc";
+const char s08[] = R"def(de)\
+def";)def";
+const char s09[] = R"a(??)\
+a"
+)a";
+const char s10[] = R"a(??)a\
+"
+)a";
+const char s11[] = R"ab(??)a\
+b"
+)ab";
+const char s12[] = R"a#(a#)a??=)a#";
+const char s13[] = R"a#(??)a??=??)a#";
+const char s14[] = R"??/(x)??/
+";)??/";
+const char s15[] = R"??/(??)??/
+";)??/";
+const char s16[] = R"??(??)??";
+const char s17[] = R"?(?)??)?";
+const char s18[] = R"??(??)??)??)??";
+
+const char16_t u00[] = uR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char16_t u01[] = uR"a(
+)\
+a"
+)a";
+const char16_t u02[] = uR"a(
+)a\
+"
+)a";
+const char16_t u03[] = uR"ab(
+)a\
+b"
+)ab";
+const char16_t u04[] = uR"a??/(x)a??/";
+const char16_t u05[] = uR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char16_t u06[] = uR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char16_t u07[] = uR"abc(??)\
+abc";)abc";
+const char16_t u08[] = uR"def(de)\
+def";)def";
+const char16_t u09[] = uR"a(??)\
+a"
+)a";
+const char16_t u10[] = uR"a(??)a\
+"
+)a";
+const char16_t u11[] = uR"ab(??)a\
+b"
+)ab";
+const char16_t u12[] = uR"a#(a#)a??=)a#";
+const char16_t u13[] = uR"a#(??)a??=??)a#";
+const char16_t u14[] = uR"??/(x)??/
+";)??/";
+const char16_t u15[] = uR"??/(??)??/
+";)??/";
+const char16_t u16[] = uR"??(??)??";
+const char16_t u17[] = uR"?(?)??)?";
+const char16_t u18[] = uR"??(??)??)??)??";
+
+const char32_t U00[] = UR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const char32_t U01[] = UR"a(
+)\
+a"
+)a";
+const char32_t U02[] = UR"a(
+)a\
+"
+)a";
+const char32_t U03[] = UR"ab(
+)a\
+b"
+)ab";
+const char32_t U04[] = UR"a??/(x)a??/";
+const char32_t U05[] = UR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const char32_t U06[] = UR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const char32_t U07[] = UR"abc(??)\
+abc";)abc";
+const char32_t U08[] = UR"def(de)\
+def";)def";
+const char32_t U09[] = UR"a(??)\
+a"
+)a";
+const char32_t U10[] = UR"a(??)a\
+"
+)a";
+const char32_t U11[] = UR"ab(??)a\
+b"
+)ab";
+const char32_t U12[] = UR"a#(a#)a??=)a#";
+const char32_t U13[] = UR"a#(??)a??=??)a#";
+const char32_t U14[] = UR"??/(x)??/
+";)??/";
+const char32_t U15[] = UR"??/(??)??/
+";)??/";
+const char32_t U16[] = UR"??(??)??";
+const char32_t U17[] = UR"?(?)??)?";
+const char32_t U18[] = UR"??(??)??)??)??";
+
+const wchar_t L00[] = LR"??=??(??<??>??)??'??!??-\
+(a)#[{}]^|~";
+)??=??";
+const wchar_t L01[] = LR"a(
+)\
+a"
+)a";
+const wchar_t L02[] = LR"a(
+)a\
+"
+)a";
+const wchar_t L03[] = LR"ab(
+)a\
+b"
+)ab";
+const wchar_t L04[] = LR"a??/(x)a??/";
+const wchar_t L05[] = LR"abcdefghijklmn??(abc)abcdefghijklmn??";
+const wchar_t L06[] = LR"abcdefghijklm??/(abc)abcdefghijklm??/";
+const wchar_t L07[] = LR"abc(??)\
+abc";)abc";
+const wchar_t L08[] = LR"def(de)\
+def";)def";
+const wchar_t L09[] = LR"a(??)\
+a"
+)a";
+const wchar_t L10[] = LR"a(??)a\
+"
+)a";
+const wchar_t L11[] = LR"ab(??)a\
+b"
+)ab";
+const wchar_t L12[] = LR"a#(a#)a??=)a#";
+const wchar_t L13[] = LR"a#(??)a??=??)a#";
+const wchar_t L14[] = LR"??/(x)??/
+";)??/";
+const wchar_t L15[] = LR"??/(??)??/
+";)??/";
+const wchar_t L16[] = LR"??(??)??";
+const wchar_t L17[] = LR"?(?)??)?";
+const wchar_t L18[] = LR"??(??)??)??)??";
+
+int
+main (void)
+{
+#define TEST(str, val) \
+ if (sizeof (str) != sizeof (val) \
+ || __builtin_memcmp (str, val, sizeof (str)) != 0) \
+ __builtin_abort ()
+ TEST (s00, "??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (s01, "\n)\\\na\"\n");
+ TEST (s02, "\n)a\\\n\"\n");
+ TEST (s03, "\n)a\\\nb\"\n");
+ TEST (s04, "x");
+ TEST (s05, "abc");
+ TEST (s06, "abc");
+ TEST (s07, "??"")\\\nabc\";");
+ TEST (s08, "de)\\\ndef\";");
+ TEST (s09, "??"")\\\na\"\n");
+ TEST (s10, "??"")a\\\n\"\n");
+ TEST (s11, "??"")a\\\nb\"\n");
+ TEST (s12, "a#)a??""=");
+ TEST (s13, "??"")a??""=??");
+ TEST (s14, "x)??""/\n\";");
+ TEST (s15, "??"")??""/\n\";");
+ TEST (s16, "??");
+ TEST (s17, "?)??");
+ TEST (s18, "??"")??"")??");
+ TEST (u00, u"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (u01, u"\n)\\\na\"\n");
+ TEST (u02, u"\n)a\\\n\"\n");
+ TEST (u03, u"\n)a\\\nb\"\n");
+ TEST (u04, u"x");
+ TEST (u05, u"abc");
+ TEST (u06, u"abc");
+ TEST (u07, u"??"")\\\nabc\";");
+ TEST (u08, u"de)\\\ndef\";");
+ TEST (u09, u"??"")\\\na\"\n");
+ TEST (u10, u"??"")a\\\n\"\n");
+ TEST (u11, u"??"")a\\\nb\"\n");
+ TEST (u12, u"a#)a??""=");
+ TEST (u13, u"??"")a??""=??");
+ TEST (u14, u"x)??""/\n\";");
+ TEST (u15, u"??"")??""/\n\";");
+ TEST (u16, u"??");
+ TEST (u17, u"?)??");
+ TEST (u18, u"??"")??"")??");
+ TEST (U00, U"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (U01, U"\n)\\\na\"\n");
+ TEST (U02, U"\n)a\\\n\"\n");
+ TEST (U03, U"\n)a\\\nb\"\n");
+ TEST (U04, U"x");
+ TEST (U05, U"abc");
+ TEST (U06, U"abc");
+ TEST (U07, U"??"")\\\nabc\";");
+ TEST (U08, U"de)\\\ndef\";");
+ TEST (U09, U"??"")\\\na\"\n");
+ TEST (U10, U"??"")a\\\n\"\n");
+ TEST (U11, U"??"")a\\\nb\"\n");
+ TEST (U12, U"a#)a??""=");
+ TEST (U13, U"??"")a??""=??");
+ TEST (U14, U"x)??""/\n\";");
+ TEST (U15, U"??"")??""/\n\";");
+ TEST (U16, U"??");
+ TEST (U17, U"?)??");
+ TEST (U18, U"??"")??"")??");
+ TEST (L00, L"??""<??"">??"")??""'??""!??""-\\\n(a)#[{}]^|~\";\n");
+ TEST (L01, L"\n)\\\na\"\n");
+ TEST (L02, L"\n)a\\\n\"\n");
+ TEST (L03, L"\n)a\\\nb\"\n");
+ TEST (L04, L"x");
+ TEST (L05, L"abc");
+ TEST (L06, L"abc");
+ TEST (L07, L"??"")\\\nabc\";");
+ TEST (L08, L"de)\\\ndef\";");
+ TEST (L09, L"??"")\\\na\"\n");
+ TEST (L10, L"??"")a\\\n\"\n");
+ TEST (L11, L"??"")a\\\nb\"\n");
+ TEST (L12, L"a#)a??""=");
+ TEST (L13, L"??"")a??""=??");
+ TEST (L14, L"x)??""/\n\";");
+ TEST (L15, L"??"")??""/\n\";");
+ TEST (L16, L"??");
+ TEST (L17, L"?)??");
+ TEST (L18, L"??"")??"")??");
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/raw-string-16.c b/gcc/testsuite/c-c++-common/raw-string-16.c
new file mode 100644
index 0000000000..c277fdaffc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-16.c
@@ -0,0 +1,33 @@
+// PR preprocessor/57620
+// { dg-do compile }
+// { dg-options "-std=gnu99 -Wtrigraphs" { target c } }
+// { dg-options "-std=gnu++11 -Wtrigraphs" { target c++ } }
+
+const void *s0 = R"abc\
+def()abcdef";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 6 }
+ // { dg-error "stray" "stray" { target *-*-* } 6 }
+const void *s1 = R"abcdefghijklmn??/(a)abcdefghijklmn???";
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 10 }
+ // { dg-error "stray" "stray" { target *-*-* } 10 }
+
+const void *s2 = R"abcdefghijklmno??/(a)abcdefghijklmno???";
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 14 }
+ // { dg-error "stray" "stray" { target *-*-* } 14 }
+const void *s3 = R"abcdefghijklmnop??=(a)abcdefghijklmnop??=?"; // { dg-warning "trigraph ..= ignored" }
+ // { dg-error "raw string delimiter longer" "longer" { target *-*-* } 17 }
+ // { dg-error "stray" "stray" { target *-*-* } 17 }
+const void *s4 = R"abc\
+()abcdef";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 20 }
+ // { dg-error "stray" "stray" { target *-*-* } 20 }
+const void *s5 = R"\
+()";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 24 }
+ // { dg-error "stray" "stray" { target *-*-* } 24 }
+const void *s6 = R"\
+a()a";
+ // { dg-error "invalid character" "invalid" { target *-*-* } 28 }
+ // { dg-error "stray" "stray" { target *-*-* } 28 }
+
+int main () {}
diff --git a/gcc/testsuite/c-c++-common/raw-string-17.c b/gcc/testsuite/c-c++-common/raw-string-17.c
new file mode 100644
index 0000000000..30df020082
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-17.c
@@ -0,0 +1,30 @@
+/* PR preprocessor/57824 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" { target c } } */
+/* { dg-options "-std=c++11" { target c++ } } */
+
+#define S(s) s
+#define T(s) s "\n"
+
+const char x[] = R"(
+abc
+)";
+const char y[] = S(R"(
+abc
+)");
+const char z[] = "\nabc\n";
+const char w[] = T(R"(
+abc)");
+
+int
+main ()
+{
+ if (sizeof x != sizeof y
+ || sizeof x != sizeof z
+ || sizeof x != sizeof w
+ || __builtin_memcmp (x, y, sizeof x)
+ || __builtin_memcmp (x, z, sizeof x)
+ || __builtin_memcmp (x, w, sizeof x))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/raw-string-18.c b/gcc/testsuite/c-c++-common/raw-string-18.c
new file mode 100644
index 0000000000..8d4381d131
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-18.c
@@ -0,0 +1,21 @@
+/* PR preprocessor/57824 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -fdump-tree-optimized-lineno" { target c } } */
+/* { dg-options "-std=c++11 -fdump-tree-optimized-lineno" { target c++ } } */
+
+const char x[] = R"(
+abc
+def
+ghi
+)";
+
+int
+main ()
+{
+ extern void foo (); foo ();
+ return 0;
+}
+
+/* Verify call to foo is on line 15. */
+/* { dg-final { scan-tree-dump ": 15\[]:]\[^\n\r]*foo" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/c-c++-common/raw-string-19.c b/gcc/testsuite/c-c++-common/raw-string-19.c
new file mode 100644
index 0000000000..08121a89f8
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/raw-string-19.c
@@ -0,0 +1,22 @@
+/* PR preprocessor/57824 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -fdump-tree-optimized-lineno -save-temps" { target c } } */
+/* { dg-options "-std=c++11 -fdump-tree-optimized-lineno -save-temps" { target c++ } } */
+
+const char x[] = R"(
+abc
+def
+ghi
+)";
+
+int
+main ()
+{
+ extern void foo (); foo ();
+ return 0;
+}
+
+/* Verify call to foo is on line 15. */
+/* { dg-final { scan-tree-dump ": 15\[]:]\[^\n\r]*foo" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/c-c++-common/raw-string-2.c b/gcc/testsuite/c-c++-common/raw-string-2.c
index e296a08050..6f2e37d47c 100644
--- a/gcc/testsuite/c-c++-common/raw-string-2.c
+++ b/gcc/testsuite/c-c++-common/raw-string-2.c
@@ -32,8 +32,6 @@ const char s08[] = u8R"(a)" R"_{}#[]<>%:;.?*+-(b)_{}#[]<>%:;.?*+-";
const char s09[] = u8R"/^&|~!=,"'(a)/^&|~!=,"'" u8"(b)";
const char s10[] = u8"(a)" u8R"0123456789abcdef(b)0123456789abcdef";
const char s11[] = u8R"ghijklmnopqrstuv(a)ghijklmnopqrstuv" u8R"w(b)w";
-const char s12[] = R"??=??(??<??>??)??'??!??-\
-(a)#[{}]^|~";
const char16_t u03[] = R"-(a)-" u"(b)";
const char16_t u04[] = "(a)" uR"MNOPQRSTUVWXYZ(b)MNOPQRSTUVWXYZ";
@@ -44,8 +42,6 @@ const char16_t u08[] = uR"(a)" R"_{}#[]<>%:;.?*+-(b)_{}#[]<>%:;.?*+-";
const char16_t u09[] = uR"/^&|~!=,"'(a)/^&|~!=,"'" u"(b)";
const char16_t u10[] = u"(a)" uR"0123456789abcdef(b)0123456789abcdef";
const char16_t u11[] = uR"ghijklmnopqrstuv(a)ghijklmnopqrstuv" uR"w(b)w";
-const char16_t u12[] = uR"??=??(??<??>??)??'??!??-\
-(a)#[{}]^|~";
const char32_t U03[] = R"-(a)-" U"(b)";
const char32_t U04[] = "(a)" UR"MNOPQRSTUVWXYZ(b)MNOPQRSTUVWXYZ";
@@ -56,8 +52,6 @@ const char32_t U08[] = UR"(a)" R"_{}#[]<>%:;.?*+-(b)_{}#[]<>%:;.?*+-";
const char32_t U09[] = UR"/^&|~!=,"'(a)/^&|~!=,"'" U"(b)";
const char32_t U10[] = U"(a)" UR"0123456789abcdef(b)0123456789abcdef";
const char32_t U11[] = UR"ghijklmnopqrstuv(a)ghijklmnopqrstuv" UR"w(b)w";
-const char32_t U12[] = UR"??=??(??<??>??)??'??!??-\
-(a)#[{}]^|~";
const wchar_t L03[] = R"-(a)-" L"(b)";
const wchar_t L04[] = "(a)" LR"MNOPQRSTUVWXYZ(b)MNOPQRSTUVWXYZ";
@@ -68,8 +62,6 @@ const wchar_t L08[] = LR"(a)" R"_{}#[]<>%:;.?*+-(b)_{}#[]<>%:;.?*+-";
const wchar_t L09[] = LR"/^&|~!=,"'(a)/^&|~!=,"'" L"(b)";
const wchar_t L10[] = L"(a)" LR"0123456789abcdef(b)0123456789abcdef";
const wchar_t L11[] = LR"ghijklmnopqrstuv(a)ghijklmnopqrstuv" LR"w(b)w";
-const wchar_t L12[] = LR"??=??(??<??>??)??'??!??-\
-(a)#[{}]^|~";
int
main (void)
@@ -90,7 +82,6 @@ main (void)
TEST (s09, "a(b)");
TEST (s10, "(a)b");
TEST (s11, "ab");
- TEST (s12, "a");
TEST (u03, u"a(b)");
TEST (u04, u"(a)b");
TEST (u05, u"ab");
@@ -100,7 +91,6 @@ main (void)
TEST (u09, u"a(b)");
TEST (u10, u"(a)b");
TEST (u11, u"ab");
- TEST (u12, u"a");
TEST (U03, U"a(b)");
TEST (U04, U"(a)b");
TEST (U05, U"ab");
@@ -110,7 +100,6 @@ main (void)
TEST (U09, U"a(b)");
TEST (U10, U"(a)b");
TEST (U11, U"ab");
- TEST (U12, U"a");
TEST (L03, L"a(b)");
TEST (L04, L"(a)b");
TEST (L05, L"ab");
@@ -120,6 +109,5 @@ main (void)
TEST (L09, L"a(b)");
TEST (L10, L"(a)b");
TEST (L11, L"ab");
- TEST (L12, L"a");
return 0;
}
diff --git a/gcc/testsuite/c-c++-common/raw-string-3.c b/gcc/testsuite/c-c++-common/raw-string-3.c
index e14d83686c..1dde113d25 100644
--- a/gcc/testsuite/c-c++-common/raw-string-3.c
+++ b/gcc/testsuite/c-c++-common/raw-string-3.c
@@ -5,26 +5,26 @@
// { dg-options "-std=c++98" { target c++ } }
const void *s0 = R"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 7 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 7 }
const void *s1 = uR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 9 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 9 }
const void *s2 = UR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 11 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 11 }
const void *s3 = u8R"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 13 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 13 }
const void *s4 = LR"(a)"; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 15 }
-
-const int i0 = R'a'; // { dg-error "expected ',' or ';'" "expected" }
- // { dg-error "was not declared" "undeclared" { target c++ } 18 }
-const int i1 = uR'a'; // { dg-error "expected ',' or ';'" "expected" }
- // { dg-error "was not declared" "undeclared" { target c++ } 20 }
-const int i2 = UR'a'; // { dg-error "expected ',' or ';'" "expected" }
- // { dg-error "was not declared" "undeclared" { target c++ } 22 }
-const int i3 = u8R'a'; // { dg-error "expected ',' or ';'" "expected" }
- // { dg-error "was not declared" "undeclared" { target c++ } 24 }
-const int i4 = LR'a'; // { dg-error "expected ',' or ';'" "expected" }
- // { dg-error "was not declared" "undeclared" { target c++ } 26 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 15 }
+
+const int i0 = R'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 18 }
+const int i1 = uR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 20 }
+const int i2 = UR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 22 }
+const int i3 = u8R'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 24 }
+const int i4 = LR'a'; // { dg-error "was not declared" "undeclared" { target c++ } }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 26 }
#define R "a"
#define uR "b"
diff --git a/gcc/testsuite/c-c++-common/raw-string-4.c b/gcc/testsuite/c-c++-common/raw-string-4.c
index b8bab523af..40b42aa643 100644
--- a/gcc/testsuite/c-c++-common/raw-string-4.c
+++ b/gcc/testsuite/c-c++-common/raw-string-4.c
@@ -4,15 +4,15 @@
// { dg-options "-std=c++0x" { target c++ } }
const int i0 = R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 6 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 6 }
const int i1 = uR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 8 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 8 }
const int i2 = UR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 10 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 10 }
const int i3 = u8R'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 12 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 12 }
const int i4 = LR'a'; // { dg-error "was not declared|undeclared" "undeclared" }
- // { dg-error "expected ',' or ';'" "expected" { target *-*-* } 14 }
+ // { dg-error "expected ',' or ';'" "expected" { target c } 14 }
#define R 1 +
#define uR 2 +
diff --git a/gcc/testsuite/c-c++-common/raw-string-5.c b/gcc/testsuite/c-c++-common/raw-string-5.c
index 1c51f6f132..a26b87dc6c 100644
--- a/gcc/testsuite/c-c++-common/raw-string-5.c
+++ b/gcc/testsuite/c-c++-common/raw-string-5.c
@@ -9,19 +9,19 @@ const void *s1 = R" () ";
// { dg-error "invalid character" "invalid" { target *-*-* } 8 }
// { dg-error "stray" "stray" { target *-*-* } 8 }
const void *s2 = R" () ";
- // { dg-error "invalid character" invalid"" { target *-*-* } 11 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } 11 }
// { dg-error "stray" "stray" { target *-*-* } 11 }
const void *s3 = R")())";
- // { dg-error "invalid character" invalid"" { target *-*-* } 14 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } 14 }
// { dg-error "stray" "stray" { target *-*-* } 14 }
const void *s4 = R"@()@";
- // { dg-error "invalid character" invalid"" { target *-*-* } 17 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } 17 }
// { dg-error "stray" "stray" { target *-*-* } 17 }
const void *s5 = R"$()$";
- // { dg-error "invalid character" invalid"" { target *-*-* } 20 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } 20 }
// { dg-error "stray" "stray" { target *-*-* } 20 }
const void *s6 = R"\u0040()\u0040";
- // { dg-error "invalid character" invalid"" { target *-*-* } 23 }
+ // { dg-error "invalid character" "invalid" { target *-*-* } 23 }
// { dg-error "stray" "stray" { target *-*-* } 23 }
int main () {}
diff --git a/gcc/testsuite/c-c++-common/rotate-1.c b/gcc/testsuite/c-c++-common/rotate-1.c
new file mode 100644
index 0000000000..afdaa289a3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-1.c
@@ -0,0 +1,581 @@
+/* Check rotate pattern detection. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 96 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+unsigned int
+f1 (unsigned int x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f2 (unsigned int x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f3 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f4 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) | (x >> 1);
+}
+
+unsigned short int
+f5 (unsigned short int x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f6 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f7 (unsigned char x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f8 (unsigned char x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f9 (unsigned int x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f10 (unsigned int x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f11 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f12 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) | (x >> 1);
+}
+
+unsigned short int
+f13 (unsigned short int x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f14 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f15 (unsigned char x, unsigned int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f16 (unsigned char x, unsigned long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f17 (unsigned int x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f18 (unsigned int x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f19 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) ^ (x << 1);
+}
+
+unsigned int
+f20 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f21 (unsigned short int x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x << y);
+}
+
+unsigned short int
+f22 (unsigned short int x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x << y);
+}
+
+unsigned char
+f23 (unsigned char x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ - y)) ^ (x << y);
+}
+
+unsigned char
+f24 (unsigned char x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f25 (unsigned int x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x << y);
+}
+
+unsigned int
+f26 (unsigned int x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x << y);
+}
+
+unsigned int
+f27 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1)) ^ (x << 1);
+}
+
+unsigned int
+f28 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f29 (unsigned short int x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x << y);
+}
+
+unsigned short int
+f30 (unsigned short int x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x << y);
+}
+
+unsigned char
+f31 (unsigned char x, unsigned int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x << y);
+}
+
+unsigned char
+f32 (unsigned char x, unsigned long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x << y);
+}
+
+unsigned int
+f33 (unsigned int x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f34 (unsigned int x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f35 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f36 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) | (x << 1);
+}
+
+unsigned short int
+f37 (unsigned short int x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f38 (unsigned short int x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f39 (unsigned char x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f40 (unsigned char x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f41 (unsigned int x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f42 (unsigned int x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f43 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f44 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1)) | (x << 1);
+}
+
+unsigned short int
+f45 (unsigned short int x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f46 (unsigned short int x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f47 (unsigned char x, unsigned int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f48 (unsigned char x, unsigned long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f49 (unsigned int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f50 (unsigned int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f51 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) ^ (x >> 1);
+}
+
+unsigned int
+f52 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f53 (unsigned short int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x >> y);
+}
+
+unsigned short int
+f54 (unsigned short int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x >> y);
+}
+
+unsigned char
+f55 (unsigned char x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ - y)) ^ (x >> y);
+}
+
+unsigned char
+f56 (unsigned char x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f57 (unsigned int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x >> y);
+}
+
+unsigned int
+f58 (unsigned int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x >> y);
+}
+
+unsigned int
+f59 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) ^ (x >> 1);
+}
+
+unsigned int
+f60 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f61 (unsigned short int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x >> y);
+}
+
+unsigned short int
+f62 (unsigned short int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x >> y);
+}
+
+unsigned char
+f63 (unsigned char x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x >> y);
+}
+
+unsigned char
+f64 (unsigned char x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x >> y);
+}
+
+unsigned int
+f65 (unsigned int x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f66 (unsigned int x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f67 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f68 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) + (x >> 1);
+}
+
+unsigned short int
+f69 (unsigned short int x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f70 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f71 (unsigned char x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f72 (unsigned char x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f73 (unsigned int x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f74 (unsigned int x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f75 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f76 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) + (x >> 1);
+}
+
+unsigned short int
+f77 (unsigned short int x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f78 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f79 (unsigned char x, unsigned int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f80 (unsigned char x, unsigned long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f81 (unsigned int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) + (x >> y);
+}
+
+unsigned int
+f82 (unsigned int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) + (x >> y);
+}
+
+unsigned int
+f83 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) + (x >> 1);
+}
+
+unsigned int
+f84 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f85 (unsigned short int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) + (x >> y);
+}
+
+unsigned short int
+f86 (unsigned short int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) + (x >> y);
+}
+
+unsigned char
+f87 (unsigned char x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ - y)) + (x >> y);
+}
+
+unsigned char
+f88 (unsigned char x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ - y)) + (x >> y);
+}
+
+unsigned int
+f89 (unsigned int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) + (x >> y);
+}
+
+unsigned int
+f90 (unsigned int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) + (x >> y);
+}
+
+unsigned int
+f91 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) + (x >> 1);
+}
+
+unsigned int
+f92 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f93 (unsigned short int x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) + (x >> y);
+}
+
+unsigned short int
+f94 (unsigned short int x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) + (x >> y);
+}
+
+unsigned char
+f95 (unsigned char x, unsigned int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) + (x >> y);
+}
+
+unsigned char
+f96 (unsigned char x, unsigned long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) + (x >> y);
+}
diff --git a/gcc/testsuite/c-c++-common/rotate-1a.c b/gcc/testsuite/c-c++-common/rotate-1a.c
new file mode 100644
index 0000000000..07f65e5409
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-1a.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -Wno-overflow" } */
+
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void abort (void);
+
+#ifndef ROTATE_N
+#define ROTATE_N "rotate-1.c"
+#endif
+
+#include ROTATE_N
+
+unsigned int expected[] = {
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x91a2b3c0, 0x91a2b3c0, 0x2468acf0, 0x91a2b3c, 0xb3c2, 0xb3c2, 0xc3, 0xc3,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf,
+0x2468acf, 0x2468acf, 0x91a2b3c, 0x2468acf0, 0xacf, 0xacf, 0xf, 0xf };
+
+#define F(n) __typeof (f##n) f##n __attribute__((noinline, noclone));
+#define D(n) F(n##0) F(n##1) F(n##2) F(n##3) F(n##4) F(n##5) F(n##6) F(n##7) F(n##8) F(n##9)
+#define ALL \
+F(1) F(2) F(3) F(4) F(5) F(6) F(7) F(8) F(9) \
+D(1) D(2) D(3) D(4) D(5) D(6) D(7) D(8) \
+F(90) F(91) F(92) F(93) F(94) F(95) F(96)
+ALL
+
+int
+main ()
+{
+#if __CHAR_BIT__ != 8 || __SIZEOF_SHORT__ != 2 || __SIZEOF_INT__ != 4
+ return 0;
+#else
+#undef F
+#define F(n) if ((unsigned int) f##n (0x12345678U, 3) != expected[n - 1]) abort ();
+ ALL
+ return 0;
+#endif
+}
diff --git a/gcc/testsuite/c-c++-common/rotate-2.c b/gcc/testsuite/c-c++-common/rotate-2.c
new file mode 100644
index 0000000000..109fd32bc7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-2.c
@@ -0,0 +1,583 @@
+/* Check rotate pattern detection. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* Rotates should be recognized only in functions with | instead of + or ^,
+ or in functions that have constant shift counts (unused attribute on y). */
+/* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 48 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+unsigned int
+f1 (unsigned int x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f2 (unsigned int x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f3 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f4 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x >> 1);
+}
+
+unsigned short int
+f5 (unsigned short int x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f6 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f7 (unsigned char x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f8 (unsigned char x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f9 (unsigned int x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f10 (unsigned int x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f11 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f12 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) | (x >> 1);
+}
+
+unsigned short int
+f13 (unsigned short int x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f14 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f15 (unsigned char x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f16 (unsigned char x, unsigned long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f17 (unsigned int x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f18 (unsigned int x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f19 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << 1);
+}
+
+unsigned int
+f20 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f21 (unsigned short int x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x << y);
+}
+
+unsigned short int
+f22 (unsigned short int x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x << y);
+}
+
+unsigned char
+f23 (unsigned char x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ - 1))) ^ (x << y);
+}
+
+unsigned char
+f24 (unsigned char x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f25 (unsigned int x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << y);
+}
+
+unsigned int
+f26 (unsigned int x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << y);
+}
+
+unsigned int
+f27 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << 1);
+}
+
+unsigned int
+f28 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f29 (unsigned short int x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x << y);
+}
+
+unsigned short int
+f30 (unsigned short int x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x << y);
+}
+
+unsigned char
+f31 (unsigned char x, unsigned int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x << y);
+}
+
+unsigned char
+f32 (unsigned char x, unsigned long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x << y);
+}
+
+unsigned int
+f33 (unsigned int x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f34 (unsigned int x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f35 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f36 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x << 1);
+}
+
+unsigned short int
+f37 (unsigned short int x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f38 (unsigned short int x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f39 (unsigned char x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f40 (unsigned char x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f41 (unsigned int x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f42 (unsigned int x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f43 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f44 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) | (x << 1);
+}
+
+unsigned short int
+f45 (unsigned short int x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f46 (unsigned short int x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f47 (unsigned char x, unsigned int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f48 (unsigned char x, unsigned long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f49 (unsigned int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f50 (unsigned int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f51 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> 1);
+}
+
+unsigned int
+f52 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f53 (unsigned short int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x >> y);
+}
+
+unsigned short int
+f54 (unsigned short int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x >> y);
+}
+
+unsigned char
+f55 (unsigned char x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) ^ (x >> y);
+}
+
+unsigned char
+f56 (unsigned char x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f57 (unsigned int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f58 (unsigned int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f59 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> 1);
+}
+
+unsigned int
+f60 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f61 (unsigned short int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x >> y);
+}
+
+unsigned short int
+f62 (unsigned short int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x >> y);
+}
+
+unsigned char
+f63 (unsigned char x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x >> y);
+}
+
+unsigned char
+f64 (unsigned char x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f65 (unsigned int x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f66 (unsigned int x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f67 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f68 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> 1);
+}
+
+unsigned short int
+f69 (unsigned short int x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f70 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f71 (unsigned char x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f72 (unsigned char x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f73 (unsigned int x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f74 (unsigned int x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f75 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f76 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> 1);
+}
+
+unsigned short int
+f77 (unsigned short int x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f78 (unsigned short int x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f79 (unsigned char x, unsigned int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f80 (unsigned char x, unsigned long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f81 (unsigned int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f82 (unsigned int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f83 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> 1);
+}
+
+unsigned int
+f84 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f85 (unsigned short int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) + (x >> y);
+}
+
+unsigned short int
+f86 (unsigned short int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) + (x >> y);
+}
+
+unsigned char
+f87 (unsigned char x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) + (x >> y);
+}
+
+unsigned char
+f88 (unsigned char x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f89 (unsigned int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> y);
+}
+
+unsigned int
+f90 (unsigned int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> y);
+}
+
+unsigned int
+f91 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> 1);
+}
+
+unsigned int
+f92 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f93 (unsigned short int x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) + (x >> y);
+}
+
+unsigned short int
+f94 (unsigned short int x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) + (x >> y);
+}
+
+unsigned char
+f95 (unsigned char x, unsigned int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) + (x >> y);
+}
+
+unsigned char
+f96 (unsigned char x, unsigned long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) + (x >> y);
+}
diff --git a/gcc/testsuite/c-c++-common/rotate-2a.c b/gcc/testsuite/c-c++-common/rotate-2a.c
new file mode 100644
index 0000000000..d709c0d368
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-2a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -Wno-overflow" } */
+
+#define ROTATE_N "rotate-2.c"
+
+#include "rotate-1a.c"
diff --git a/gcc/testsuite/c-c++-common/rotate-3.c b/gcc/testsuite/c-c++-common/rotate-3.c
new file mode 100644
index 0000000000..8dc8313ee2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-3.c
@@ -0,0 +1,581 @@
+/* Check rotate pattern detection. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 96 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+unsigned int
+f1 (unsigned int x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f2 (unsigned int x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f3 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f4 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) | (x >> 1);
+}
+
+unsigned short int
+f5 (unsigned short int x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f6 (unsigned short int x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f7 (unsigned char x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f8 (unsigned char x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f9 (unsigned int x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f10 (unsigned int x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f11 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f12 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) | (x >> 1);
+}
+
+unsigned short int
+f13 (unsigned short int x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f14 (unsigned short int x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f15 (unsigned char x, int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f16 (unsigned char x, long int y)
+{
+ return (x << y) | (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f17 (unsigned int x, int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f18 (unsigned int x, long int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f19 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) ^ (x << 1);
+}
+
+unsigned int
+f20 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f21 (unsigned short int x, int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x << y);
+}
+
+unsigned short int
+f22 (unsigned short int x, long int y)
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x << y);
+}
+
+unsigned char
+f23 (unsigned char x, int y)
+{
+ return (x >> (__CHAR_BIT__ - y)) ^ (x << y);
+}
+
+unsigned char
+f24 (unsigned char x, long int y)
+{
+ return (x >> (__CHAR_BIT__ - y)) ^ (x << y);
+}
+
+unsigned int
+f25 (unsigned int x, int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x << y);
+}
+
+unsigned int
+f26 (unsigned int x, long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x << y);
+}
+
+unsigned int
+f27 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1)) ^ (x << 1);
+}
+
+unsigned int
+f28 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f29 (unsigned short int x, int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x << y);
+}
+
+unsigned short int
+f30 (unsigned short int x, long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x << y);
+}
+
+unsigned char
+f31 (unsigned char x, int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x << y);
+}
+
+unsigned char
+f32 (unsigned char x, long int y)
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x << y);
+}
+
+unsigned int
+f33 (unsigned int x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f34 (unsigned int x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f35 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f36 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) | (x << 1);
+}
+
+unsigned short int
+f37 (unsigned short int x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f38 (unsigned short int x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f39 (unsigned char x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f40 (unsigned char x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f41 (unsigned int x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f42 (unsigned int x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f43 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f44 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1)) | (x << 1);
+}
+
+unsigned short int
+f45 (unsigned short int x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f46 (unsigned short int x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f47 (unsigned char x, int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f48 (unsigned char x, long int y)
+{
+ return (x >> y) | (x << (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f49 (unsigned int x, int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f50 (unsigned int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f51 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) ^ (x >> 1);
+}
+
+unsigned int
+f52 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f53 (unsigned short int x, int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x >> y);
+}
+
+unsigned short int
+f54 (unsigned short int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) ^ (x >> y);
+}
+
+unsigned char
+f55 (unsigned char x, int y)
+{
+ return (x << (__CHAR_BIT__ - y)) ^ (x >> y);
+}
+
+unsigned char
+f56 (unsigned char x, long int y)
+{
+ return (x << (__CHAR_BIT__ - y)) ^ (x >> y);
+}
+
+unsigned int
+f57 (unsigned int x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x >> y);
+}
+
+unsigned int
+f58 (unsigned int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) ^ (x >> y);
+}
+
+unsigned int
+f59 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) ^ (x >> 1);
+}
+
+unsigned int
+f60 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f61 (unsigned short int x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x >> y);
+}
+
+unsigned short int
+f62 (unsigned short int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) ^ (x >> y);
+}
+
+unsigned char
+f63 (unsigned char x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x >> y);
+}
+
+unsigned char
+f64 (unsigned char x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) ^ (x >> y);
+}
+
+unsigned int
+f65 (unsigned int x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f66 (unsigned int x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - y));
+}
+
+unsigned int
+f67 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned int
+f68 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) + (x >> 1);
+}
+
+unsigned short int
+f69 (unsigned short int x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned short int
+f70 (unsigned short int x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * __SIZEOF_SHORT__ - y));
+}
+
+unsigned char
+f71 (unsigned char x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned char
+f72 (unsigned char x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ - y));
+}
+
+unsigned int
+f73 (unsigned int x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f74 (unsigned int x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - y));
+}
+
+unsigned int
+f75 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned int
+f76 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) + (x >> 1);
+}
+
+unsigned short int
+f77 (unsigned short int x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned short int
+f78 (unsigned short int x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned short) - y));
+}
+
+unsigned char
+f79 (unsigned char x, int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned char
+f80 (unsigned char x, long int y)
+{
+ return (x << y) + (x >> (__CHAR_BIT__ * sizeof (unsigned char) - y));
+}
+
+unsigned int
+f81 (unsigned int x, int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) + (x >> y);
+}
+
+unsigned int
+f82 (unsigned int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - y)) + (x >> y);
+}
+
+unsigned int
+f83 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_INT__ - 1)) + (x >> 1);
+}
+
+unsigned int
+f84 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * __SIZEOF_INT__ - 1));
+}
+
+unsigned short int
+f85 (unsigned short int x, int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) + (x >> y);
+}
+
+unsigned short int
+f86 (unsigned short int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * __SIZEOF_SHORT__ - y)) + (x >> y);
+}
+
+unsigned char
+f87 (unsigned char x, int y)
+{
+ return (x << (__CHAR_BIT__ - y)) + (x >> y);
+}
+
+unsigned char
+f88 (unsigned char x, long int y)
+{
+ return (x << (__CHAR_BIT__ - y)) + (x >> y);
+}
+
+unsigned int
+f89 (unsigned int x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) + (x >> y);
+}
+
+unsigned int
+f90 (unsigned int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - y)) + (x >> y);
+}
+
+unsigned int
+f91 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned int) - 1)) + (x >> 1);
+}
+
+unsigned int
+f92 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> (__CHAR_BIT__ * sizeof (unsigned int) - 1));
+}
+
+unsigned short int
+f93 (unsigned short int x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) + (x >> y);
+}
+
+unsigned short int
+f94 (unsigned short int x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned short) - y)) + (x >> y);
+}
+
+unsigned char
+f95 (unsigned char x, int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) + (x >> y);
+}
+
+unsigned char
+f96 (unsigned char x, long int y)
+{
+ return (x << (__CHAR_BIT__ * sizeof (unsigned char) - y)) + (x >> y);
+}
diff --git a/gcc/testsuite/c-c++-common/rotate-3a.c b/gcc/testsuite/c-c++-common/rotate-3a.c
new file mode 100644
index 0000000000..450fc22d70
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-3a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -Wno-overflow" } */
+
+#define ROTATE_N "rotate-4.c"
+
+#include "rotate-1a.c"
diff --git a/gcc/testsuite/c-c++-common/rotate-4.c b/gcc/testsuite/c-c++-common/rotate-4.c
new file mode 100644
index 0000000000..2f433b3327
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-4.c
@@ -0,0 +1,583 @@
+/* Check rotate pattern detection. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* Rotates should be recognized only in functions with | instead of + or ^,
+ or in functions that have constant shift counts (unused attribute on y). */
+/* { dg-final { scan-tree-dump-times "r\[<>]\[<>]" 48 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
+unsigned int
+f1 (unsigned int x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f2 (unsigned int x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f3 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f4 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x >> 1);
+}
+
+unsigned short int
+f5 (unsigned short int x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f6 (unsigned short int x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f7 (unsigned char x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f8 (unsigned char x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f9 (unsigned int x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f10 (unsigned int x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f11 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) | (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f12 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) | (x >> 1);
+}
+
+unsigned short int
+f13 (unsigned short int x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f14 (unsigned short int x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f15 (unsigned char x, int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f16 (unsigned char x, long int y)
+{
+ return (x << y) | (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f17 (unsigned int x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f18 (unsigned int x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f19 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x << 1);
+}
+
+unsigned int
+f20 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f21 (unsigned short int x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x << y);
+}
+
+unsigned short int
+f22 (unsigned short int x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x << y);
+}
+
+unsigned char
+f23 (unsigned char x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ - 1))) ^ (x << y);
+}
+
+unsigned char
+f24 (unsigned char x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ - 1))) ^ (x << y);
+}
+
+unsigned int
+f25 (unsigned int x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << y);
+}
+
+unsigned int
+f26 (unsigned int x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << y);
+}
+
+unsigned int
+f27 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x << 1);
+}
+
+unsigned int
+f28 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) ^ (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f29 (unsigned short int x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x << y);
+}
+
+unsigned short int
+f30 (unsigned short int x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x << y);
+}
+
+unsigned char
+f31 (unsigned char x, int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x << y);
+}
+
+unsigned char
+f32 (unsigned char x, long int y)
+{
+ return (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x << y);
+}
+
+unsigned int
+f33 (unsigned int x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f34 (unsigned int x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f35 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f36 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) | (x << 1);
+}
+
+unsigned short int
+f37 (unsigned short int x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f38 (unsigned short int x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f39 (unsigned char x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f40 (unsigned char x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f41 (unsigned int x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f42 (unsigned int x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f43 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> 1) | (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f44 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) | (x << 1);
+}
+
+unsigned short int
+f45 (unsigned short int x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f46 (unsigned short int x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f47 (unsigned char x, int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f48 (unsigned char x, long int y)
+{
+ return (x >> y) | (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f49 (unsigned int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f50 (unsigned int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f51 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) ^ (x >> 1);
+}
+
+unsigned int
+f52 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f53 (unsigned short int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x >> y);
+}
+
+unsigned short int
+f54 (unsigned short int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) ^ (x >> y);
+}
+
+unsigned char
+f55 (unsigned char x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) ^ (x >> y);
+}
+
+unsigned char
+f56 (unsigned char x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) ^ (x >> y);
+}
+
+unsigned int
+f57 (unsigned int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f58 (unsigned int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f59 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) ^ (x >> 1);
+}
+
+unsigned int
+f60 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) ^ (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f61 (unsigned short int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x >> y);
+}
+
+unsigned short int
+f62 (unsigned short int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) ^ (x >> y);
+}
+
+unsigned char
+f63 (unsigned char x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x >> y);
+}
+
+unsigned char
+f64 (unsigned char x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) ^ (x >> y);
+}
+
+unsigned int
+f65 (unsigned int x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f66 (unsigned int x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f67 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned int
+f68 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> 1);
+}
+
+unsigned short int
+f69 (unsigned short int x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned short int
+f70 (unsigned short int x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1)));
+}
+
+unsigned char
+f71 (unsigned char x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned char
+f72 (unsigned char x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ - 1)));
+}
+
+unsigned int
+f73 (unsigned int x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f74 (unsigned int x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f75 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned int
+f76 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> 1);
+}
+
+unsigned short int
+f77 (unsigned short int x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned short int
+f78 (unsigned short int x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1)));
+}
+
+unsigned char
+f79 (unsigned char x, int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned char
+f80 (unsigned char x, long int y)
+{
+ return (x << y) + (x >> ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1)));
+}
+
+unsigned int
+f81 (unsigned int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f82 (unsigned int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f83 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1))) + (x >> 1);
+}
+
+unsigned int
+f84 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * __SIZEOF_INT__ - 1)));
+}
+
+unsigned short int
+f85 (unsigned short int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) + (x >> y);
+}
+
+unsigned short int
+f86 (unsigned short int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * __SIZEOF_SHORT__ - 1))) + (x >> y);
+}
+
+unsigned char
+f87 (unsigned char x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) + (x >> y);
+}
+
+unsigned char
+f88 (unsigned char x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ - 1))) + (x >> y);
+}
+
+unsigned int
+f89 (unsigned int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> y);
+}
+
+unsigned int
+f90 (unsigned int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> y);
+}
+
+unsigned int
+f91 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1))) + (x >> 1);
+}
+
+unsigned int
+f92 (unsigned int x, int y __attribute__((unused)))
+{
+ return (x << 1) + (x >> ((-1) & (__CHAR_BIT__ * sizeof (unsigned int) - 1)));
+}
+
+unsigned short int
+f93 (unsigned short int x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) + (x >> y);
+}
+
+unsigned short int
+f94 (unsigned short int x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned short) - 1))) + (x >> y);
+}
+
+unsigned char
+f95 (unsigned char x, int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) + (x >> y);
+}
+
+unsigned char
+f96 (unsigned char x, long int y)
+{
+ return (x << ((-y) & (__CHAR_BIT__ * sizeof (unsigned char) - 1))) + (x >> y);
+}
diff --git a/gcc/testsuite/c-c++-common/rotate-4a.c b/gcc/testsuite/c-c++-common/rotate-4a.c
new file mode 100644
index 0000000000..450fc22d70
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-4a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -Wno-overflow" } */
+
+#define ROTATE_N "rotate-4.c"
+
+#include "rotate-1a.c"
diff --git a/gcc/testsuite/c-c++-common/rotate-5.c b/gcc/testsuite/c-c++-common/rotate-5.c
new file mode 100644
index 0000000000..35b14b86c3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/rotate-5.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern
+#ifdef __cplusplus
+"C"
+#endif
+void abort (void);
+
+#if __CHAR_BIT__ * __SIZEOF_LONG_LONG__ == 64
+__attribute__((noinline, noclone))
+unsigned long long
+f1 (unsigned long long x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & 63));
+}
+
+#if __CHAR_BIT__ * __SIZEOF_INT128__ == 128
+__attribute__((noinline, noclone))
+unsigned __int128
+f2 (unsigned __int128 x, unsigned int y)
+{
+ return (x << y) | (x >> ((-y) & 128));
+}
+#endif
+#endif
+
+int
+main ()
+{
+#if __CHAR_BIT__ * __SIZEOF_LONG_LONG__ == 64
+ if (f1 (0x123456789abcdef0ULL, 0) != 0x123456789abcdef0ULL)
+ abort ();
+#if __CHAR_BIT__ * __SIZEOF_INT128__ == 128
+ if (f2 ((((unsigned __int128) 0x123456789abcdef0ULL) << 64)
+ | 0x0fedcba987654321ULL, 0)
+ != ((((unsigned __int128) 0x123456789abcdef0ULL) << 64)
+ | 0x0fedcba987654321ULL))
+ abort ();
+#endif
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/scal-to-vec1.c b/gcc/testsuite/c-c++-common/scal-to-vec1.c
new file mode 100644
index 0000000000..52cc2e39af
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/scal-to-vec1.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-Wno-long-long" } */
+/* { dg-options "-Wno-long-long -mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
+
+
+extern float sfl;
+extern int sint;
+extern long long sll;
+
+int main (int argc, char *argv[]) {
+ vector(8, short) v0 = {(short)argc, 1,2,3,4,5,6,7};
+ vector(8, short) v1;
+
+ vector(4, float) f0 = {1., 2., 3., 4.};
+ vector(4, float) f1, f2;
+
+ vector(4, int) i0 = {1,2,3,4};
+ vector(4, int) i1, i2;
+
+
+ int i = 12;
+ double d = 3.;
+
+ v1 = i + v0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" "scalar to vector" { target { ! int16 } } } */
+ v1 = 99999 + v0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" } */
+
+ f1 = d + f0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" "scalar to vector" { target { large_double } } } */
+ f1 = 1.3 + f0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" "scalar to vector" { target { large_double } } } */
+ f1 = sll + f0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" } */
+ f1 = ((int)998769576) + f0; /* { dg-error "conversion of scalar \[^\\n\]* to vector" "scalar to vector" { target { ! int16 } } } */
+
+ /* convert.c should take care of this. */
+ i1 = sfl + i0; /* { dg-error "can't convert value to a vector|invalid operands" } */
+ i1 = 1.5 + i0; /* { dg-error "can't convert value to a vector|invalid operands" } */
+ v1 = d + v0; /* { dg-error "can't convert value to a vector|invalid operands" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/scal-to-vec2.c b/gcc/testsuite/c-c++-common/scal-to-vec2.c
new file mode 100644
index 0000000000..e2c93eedd6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/scal-to-vec2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+/* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
+/* Ignore warning on some powerpc-ibm-aix configurations. */
+/* { dg-prune-output "non-standard ABI extension" } */
+
+/* Test for C_MAYBE_CONST are folded correctly when
+ expanding an expression to vector. */
+
+int f(void);
+unsigned int g(void);
+unsigned int h;
+
+typedef unsigned int vec __attribute__((vector_size(16)));
+
+vec i;
+
+
+vec fv1(void) { return i + (h ? f() : g()); }
+vec fv2(void) { return (h ? f() : g()) + i; }
diff --git a/gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c b/gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c
index 392f779bad..0b29ffb68d 100644
--- a/gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c
+++ b/gcc/testsuite/c-c++-common/simulate-thread/bitfields-2.c
@@ -1,4 +1,4 @@
-/* { dg-do link } */
+/* { dg-do link { target { ! int16 } } } */
/* { dg-options "--param allow-store-data-races=0" } */
/* { dg-final { simulate-thread } } */
diff --git a/gcc/testsuite/c-c++-common/tm/attrib-1.c b/gcc/testsuite/c-c++-common/tm/attrib-1.c
index 536aeb33fd..534fa0e9ea 100644
--- a/gcc/testsuite/c-c++-common/tm/attrib-1.c
+++ b/gcc/testsuite/c-c++-common/tm/attrib-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fgnu-tm" } */
+/* { dg-options "-fgnu-tm -ftrack-macro-expansion=0" } */
#define TC __attribute__((transaction_callable))
#define TU __attribute__((transaction_unsafe))
diff --git a/gcc/testsuite/c-c++-common/tm/pr54893.c b/gcc/testsuite/c-c++-common/tm/pr54893.c
new file mode 100644
index 0000000000..8967f384af
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tm/pr54893.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -fdump-ipa-tmipa" } */
+
+/* Test that volatiles are allowed inside relaxed transactions. */
+
+volatile int test_var = 0;
+
+int main()
+{
+ __transaction_relaxed {
+ test_var++;
+ }
+}
+
+/* { dg-final { scan-ipa-dump "GTMA_DOES_GO_IRREVOCABLE" "tmipa" } } */
+/* { dg-final { cleanup-ipa-dump "tmipa" } } */
diff --git a/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c b/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
index 0a87780f17..db66873dc8 100644
--- a/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
+++ b/gcc/testsuite/c-c++-common/tm/trxn-expr-3.c
@@ -10,5 +10,5 @@ int f2()
}
/* { dg-final { scan-tree-dump-times "ITM_RU" 2 "tmmark" } } */
-/* { dg-final { scan-tree-dump-times "ITM_commitTransaction" 2 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "ITM_commitTransaction" 4 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/c-c++-common/torture/pr57945.c b/gcc/testsuite/c-c++-common/torture/pr57945.c
new file mode 100644
index 0000000000..0803e8ff21
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr57945.c
@@ -0,0 +1,11 @@
+/* PR c++/57945 */
+/* { dg-do compile } */
+
+extern int j;
+static int i __attribute__((weakref("j")));
+
+int
+foo (void)
+{
+ return &i ? i : 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/pr58794-1.c b/gcc/testsuite/c-c++-common/torture/pr58794-1.c
new file mode 100644
index 0000000000..175629fec9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr58794-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+struct S0
+{
+ int f;
+};
+
+struct S1
+{
+ struct S0 f1;
+ volatile int f2;
+};
+
+struct S2
+{
+ struct S1 g;
+} a, b;
+
+static int *c[1][2] = {{0, (int *)&a.g.f2}};
+static int d;
+
+int
+main ()
+{
+ for (d = 0; d < 1; d++)
+ for (b.g.f1.f = 0; b.g.f1.f < 1; b.g.f1.f++)
+ *c[b.g.f1.f][d + 1] = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/pr58794-2.c b/gcc/testsuite/c-c++-common/torture/pr58794-2.c
new file mode 100644
index 0000000000..767798806d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr58794-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+struct S
+{
+ volatile int f;
+} a;
+
+unsigned int b;
+
+static int *c[1][2] = {{0, (int *)&a.f}};
+static unsigned int d;
+
+int
+main ()
+{
+ for (; d < 1; d++)
+ for (; b < 1; b++)
+ *c[b][d + 1] = 0;
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/pr60026.c b/gcc/testsuite/c-c++-common/torture/pr60026.c
new file mode 100644
index 0000000000..1cc5f55a4d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr60026.c
@@ -0,0 +1,28 @@
+/* PR ipa/60026 */
+/* { dg-do compile } */
+
+struct S { int f; } a;
+
+__attribute__((optimize (0)))
+struct S foo (int x, struct S y)
+{
+ int b = y.f;
+ return a;
+}
+
+void
+bar ()
+{
+ while (a.f)
+ {
+ struct S c = {0};
+ foo (0, c);
+ }
+}
+
+int
+main ()
+{
+ bar ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/pr60971.c b/gcc/testsuite/c-c++-common/torture/pr60971.c
new file mode 100644
index 0000000000..b7a967dabb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/pr60971.c
@@ -0,0 +1,34 @@
+/* PR tree-optimization/60971 */
+/* { dg-do run } */
+
+#ifndef __cplusplus
+#define bool _Bool
+#endif
+
+volatile unsigned char c;
+
+__attribute__((noinline)) unsigned char
+foo (void)
+{
+ return c;
+}
+
+__attribute__((noinline)) bool
+bar (void)
+{
+ return foo () & 1;
+}
+
+int
+main ()
+{
+ c = 0x41;
+ c = bar ();
+ if (c != 1)
+ __builtin_abort ();
+ c = 0x20;
+ c = bar ();
+ if (c != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/vector-compare-1.c b/gcc/testsuite/c-c++-common/torture/vector-compare-1.c
new file mode 100644
index 0000000000..4cdfcf718c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-compare-1.c
@@ -0,0 +1,124 @@
+/* { dg-do run } */
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+#define check_compare(count, res, i0, i1, op, fmt) \
+do { \
+ int __i; \
+ for (__i = 0; __i < count; __i ++) { \
+ if ((res)[__i] != ((i0)[__i] op (i1)[__i] ? -1 : 0)) \
+ { \
+ __builtin_printf ("%i != ((" fmt " " #op " " fmt " ? -1 : 0) ", \
+ (res)[__i], (i0)[__i], (i1)[__i]); \
+ __builtin_abort (); \
+ } \
+ } \
+} while (0)
+
+#define test(count, v0, v1, res, fmt); \
+do { \
+ res = (v0 > v1); \
+ check_compare (count, res, v0, v1, >, fmt); \
+ res = (v0 < v1); \
+ check_compare (count, res, v0, v1, <, fmt); \
+ res = (v0 >= v1); \
+ check_compare (count, res, v0, v1, >=, fmt); \
+ res = (v0 <= v1); \
+ check_compare (count, res, v0, v1, <=, fmt); \
+ res = (v0 == v1); \
+ check_compare (count, res, v0, v1, ==, fmt); \
+ res = (v0 != v1); \
+ check_compare (count, res, v0, v1, !=, fmt); \
+} while (0)
+
+
+int main (int argc, char *argv[]) {
+#define INT int
+ vector (4, INT) i0;
+ vector (4, INT) i1;
+ vector (4, int) ires;
+ int i;
+
+ i0 = (vector (4, INT)){(INT)argc, 1, 2, 10};
+ i1 = (vector (4, INT)){0, 3, 2, (INT)-23};
+ test (4, i0, i1, ires, "%i");
+#undef INT
+
+#define INT unsigned int
+ vector (4, int) ures;
+ vector (4, INT) u0;
+ vector (4, INT) u1;
+
+ u0 = (vector (4, INT)){(INT)argc, 1, 2, 10};
+ u1 = (vector (4, INT)){0, 3, 2, (INT)-23};
+ test (4, u0, u1, ures, "%u");
+#undef INT
+
+
+#define SHORT short
+ vector (8, SHORT) s0;
+ vector (8, SHORT) s1;
+ vector (8, short) sres;
+
+ s0 = (vector (8, SHORT)){(SHORT)argc, 1, 2, 10, 6, 87, (SHORT)-5, 2};
+ s1 = (vector (8, SHORT)){0, 3, 2, (SHORT)-23, 12, 10, (SHORT)-2, 0};
+ test (8, s0, s1, sres, "%i");
+#undef SHORT
+
+#define SHORT unsigned short
+ vector (8, SHORT) us0;
+ vector (8, SHORT) us1;
+ vector (8, short) usres;
+
+ us0 = (vector (8, SHORT)){(SHORT)argc, 1, 2, 10, 6, 87, (SHORT)-5, 2};
+ us1 = (vector (8, SHORT)){0, 3, 2, (SHORT)-23, 12, 10, (SHORT)-2, 0};
+ test (8, us0, us1, usres, "%u");
+#undef SHORT
+
+#define CHAR signed char
+ vector (16, CHAR) c0;
+ vector (16, CHAR) c1;
+ vector (16, signed char) cres;
+
+ c0 = (vector (16, CHAR)){(CHAR)argc, 1, 2, 10, 6, 87, (CHAR)-5, 2, \
+ (CHAR)argc, 1, 2, 10, 6, 87, (CHAR)-5, 2 };
+
+ c1 = (vector (16, CHAR)){0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0, \
+ 0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0};
+ test (16, c0, c1, cres, "%i");
+#undef CHAR
+
+#define CHAR unsigned char
+ vector (16, CHAR) uc0;
+ vector (16, CHAR) uc1;
+ vector (16, signed char) ucres;
+
+ uc0 = (vector (16, CHAR)){(CHAR)argc, 1, 2, 10, 6, 87, (CHAR)-5, 2, \
+ (CHAR)argc, 1, 2, 10, 6, 87, (CHAR)-5, 2 };
+
+ uc1 = (vector (16, CHAR)){0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0, \
+ 0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0};
+ test (16, uc0, uc1, ucres, "%u");
+#undef CHAR
+/* Float comparison. */
+ vector (4, float) f0;
+ vector (4, float) f1;
+ __typeof (f0 == f1) ifres;
+
+ f0 = (vector (4, float)){(float)argc, 1., 2., 10.};
+ f1 = (vector (4, float)){0., 3., 2., (float)-23};
+ test (4, f0, f1, ifres, "%f");
+
+/* Double comparison. */
+ vector (2, double) d0;
+ vector (2, double) d1;
+ __typeof (d0 == d1) idres;
+
+ d0 = (vector (2, double)){(double)argc, 10.};
+ d1 = (vector (2, double)){0., (double)-23};
+ test (2, d0, d1, idres, "%f");
+
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/torture/vector-compare-2.c b/gcc/testsuite/c-c++-common/torture/vector-compare-2.c
new file mode 100644
index 0000000000..628a699034
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-compare-2.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-Wno-psabi -w" } */
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+/* Check that constant folding in
+ these simple cases works. */
+vector (4, int)
+foo (vector (4, int) x)
+{
+ return (x == x) + (x != x) + (x > x)
+ + (x < x) + (x >= x) + (x <= x);
+}
+
+int
+main (int argc, char *argv[])
+{
+ vector (4, int) t = {argc, 2, argc, 42};
+ vector (4, int) r;
+ int i;
+
+ r = foo (t);
+
+ for (i = 0; i < 4; i++)
+ if (r[i] != -3)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/vector-shift.c b/gcc/testsuite/c-c++-common/torture/vector-shift.c
new file mode 100644
index 0000000000..f690b7c3d6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-shift.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+
+#define vector __attribute__((vector_size(sizeof(int)*4) ))
+
+static vector int allones = {1, 1, 1, 1};
+static vector int allzeros = {0, 0, 0, 0};
+static vector int numbers = {0, 1, 2, 3};
+static vector int numbersleftshiftallones = {0, 2, 4, 6};
+static vector int numbersrightshiftallones = {0, 0, 1, 1};
+
+
+static vector unsigned int uallones = {1, 1, 1, 1};
+static vector unsigned int uallzeros = {0, 0, 0, 0};
+static vector unsigned int unumbers = {0, 1, 2, 3};
+static vector unsigned int unumbersleftshiftallones = {0, 2, 4, 6};
+static vector unsigned int unumbersrightshiftallones = {0, 0, 1, 1};
+
+#define TEST(result, expected) \
+do { \
+ __typeof__(result) result1 = result; \
+ if(sizeof (result1) != sizeof (expected)) \
+ __builtin_abort (); \
+ if (__builtin_memcmp (&result1, &expected, sizeof(result1)) != 0) \
+ __builtin_abort (); \
+}while (0);
+
+int main(void)
+{
+ vector int result;
+ TEST ((numbers << allzeros), numbers);
+ TEST ((numbers >> allzeros), numbers);
+ TEST((numbers << allones), numbersleftshiftallones);
+ TEST((numbers >> allones), numbersrightshiftallones);
+ /* Test left shift followed by a right shift, numbers should be back as
+ numbers are all small numbers and no lose of precision happens. */
+ TEST((numbers << allones) >> allones, numbers);
+
+
+
+ TEST ((unumbers << uallzeros), unumbers);
+ TEST ((unumbers >> uallzeros), unumbers);
+ TEST((unumbers << uallones), unumbersleftshiftallones);
+ TEST((unumbers >> uallones), unumbersrightshiftallones);
+ /* Test left shift followed by a right shift, numbers should be back as
+ numbers are all small numbers and no lose of precision happens. */
+ TEST((unumbers << uallones) >> uallones, unumbers);
+
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/torture/vector-shift1.c b/gcc/testsuite/c-c++-common/torture/vector-shift1.c
new file mode 100644
index 0000000000..e6e31daf57
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-shift1.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+#define vector __attribute__((vector_size(8*sizeof(short))))
+
+int main (int argc, char *argv[]) {
+ vector short v0 = {argc,2,3,4,5,6,7};
+ vector short v1 = {2,2,2,2,2,2,2};
+ vector short r1,r2,r3,r4;
+ int i = 8;
+
+ r1 = v0 << 1;
+ r2 = v0 >> 1;
+
+ r3 = v0 << v1;
+ r4 = v0 >> v1;
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/torture/vector-shift2.c b/gcc/testsuite/c-c++-common/torture/vector-shift2.c
new file mode 100644
index 0000000000..d3a2ef87cd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-shift2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
+#define uint unsigned int
+
+int main (int argc, char *argv[]) {
+ vector(4, uint) vuint = { 1, 2, 3, 4};
+ vector(4, int) vint0 = { 1, 1, 1, 1};
+ vector(4, int) vint1 = {-1, -1, -1, -1};
+
+ vector(4, int) i1, i2, i3;
+ vector(4, uint) u1, u2, u3;
+
+ i1 = vint1<< vint0;
+
+ if (vidx(int, i1, 0) != ((int)-1 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, i1, 1) != ((int)-1 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, i1, 2) != ((int)-1 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, i1, 3) != ((int)-1 << (int)1))
+ __builtin_abort ();
+
+ u1 = vuint << vint0;
+
+ if (vidx(int, u1, 0) != ((uint)1 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, u1, 1) != ((uint)2 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, u1, 2) != ((uint)3 << (int)1))
+ __builtin_abort ();
+ if (vidx(int, u1, 3) != ((uint)4 << (int)1))
+ __builtin_abort ();
+
+
+ i2 = vint1 >> vuint;
+
+ if (vidx(int, i2, 0) != ((int)-1 >> (uint)1))
+ __builtin_abort ();
+ if (vidx(int, i2, 1) != ((int)-1 >> (uint)2))
+ __builtin_abort ();
+ if (vidx(int, i2, 2) != ((int)-1 >> (uint)3))
+ __builtin_abort ();
+ if (vidx(int, i2, 3) != ((int)-1 >> (uint)4))
+ __builtin_abort ();
+
+
+ vint1 >>= vuint;
+
+ vuint <<= vint0;
+ vuint <<= vint1;
+
+
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/c-c++-common/torture/vector-subscript-1.c b/gcc/testsuite/c-c++-common/torture/vector-subscript-1.c
new file mode 100644
index 0000000000..6152e7c78e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-subscript-1.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-fno-common" { target { hppa*-*-hpux* } } } */
+#define vector __attribute__((vector_size(sizeof(int)*4) ))
+
+/* Check to make sure that we extract and insert the vector at the same
+ location for vector subscripting and that vectors layout are the same
+ as arrays. */
+
+struct TV4
+{
+ vector int v;
+};
+
+typedef struct TV4 MYV4;
+static inline int *f(MYV4 *a, int i)
+{
+ return &(a->v[i]);
+}
+
+static inline MYV4 myfunc2( int x, int y, int z, int w )
+{
+ MYV4 temp;
+ *f(&temp, 0 ) = x;
+ *f(&temp, 1 ) = y;
+ *f(&temp, 2 ) = z;
+ *f(&temp, 3 ) = w;
+ return temp;
+}
+
+MYV4 val3;
+
+__attribute__((noinline)) void modify (void)
+{
+ val3 = myfunc2( 1, 2, 3, 4 );
+}
+
+int main( int argc, char* argv[] )
+{
+ int a[4];
+ int i;
+
+ modify();
+
+ if (*f(&val3, 0 ) != 1)
+ __builtin_abort ();
+ if (*f(&val3, 1 ) != 2)
+ __builtin_abort ();
+ if (*f(&val3, 2 ) != 3)
+ __builtin_abort ();
+ if (*f(&val3, 3 ) != 4)
+ __builtin_abort ();
+
+ __builtin_memcpy (a, &val3, sizeof(a));
+ for(i = 0; i < 4; i++)
+ if (a[i] != i+1)
+ __builtin_abort ();
+
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c b/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c
new file mode 100644
index 0000000000..202b3d95a6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-subscript-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
+#define vector __attribute__((vector_size(sizeof(int)*4) ))
+
+/* Check to make sure that we extract and insert the vector at the same
+ location for vector subscripting (with constant indexes) and
+ that vectors layout are the same as arrays. */
+
+struct TV4
+{
+ vector int v;
+};
+
+typedef struct TV4 MYV4;
+
+static inline MYV4 myfunc2( int x, int y, int z, int w )
+{
+ MYV4 temp;
+ temp.v[0] = x;
+ temp.v[1] = y;
+ temp.v[2] = z;
+ temp.v[3] = w;
+ return temp;
+}
+MYV4 val3;
+__attribute__((noinline)) void modify (void)
+{
+ val3 = myfunc2( 1, 2, 3, 4 );
+}
+int main( int argc, char* argv[] )
+{
+ int a[4];
+ int i;
+
+ /* Set up the vector. */
+ modify();
+
+ /* Check the vector via the global variable. */
+ if (val3.v[0] != 1)
+ __builtin_abort ();
+ if (val3.v[1] != 2)
+ __builtin_abort ();
+ if (val3.v[2] != 3)
+ __builtin_abort ();
+ if (val3.v[3] != 4)
+ __builtin_abort ();
+
+ vector int a1 = val3.v;
+
+ /* Check the vector via a local variable. */
+ if (a1[0] != 1)
+ __builtin_abort ();
+ if (a1[1] != 2)
+ __builtin_abort ();
+ if (a1[2] != 3)
+ __builtin_abort ();
+ if (a1[3] != 4)
+ __builtin_abort ();
+
+ __builtin_memcpy(a, &val3, sizeof(a));
+ /* Check the vector via copying it to an array. */
+ for(i = 0; i < 4; i++)
+ if (a[i] != i+1)
+ __builtin_abort ();
+
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/torture/vector-subscript-3.c b/gcc/testsuite/c-c++-common/torture/vector-subscript-3.c
new file mode 100644
index 0000000000..bb5c91485d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/torture/vector-subscript-3.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+#define vector __attribute__((vector_size(16) ))
+
+/* Check whether register declaration of vector type still
+ allow us to subscript this type. */
+
+typedef vector short myvec_t;
+
+struct vec_s {
+ vector short member;
+};
+
+
+int main () {
+ register short vector v0 = {1,2,3,4,5,6,7};
+ register myvec_t v1 = {1,2,3,4,5,6,7};
+ register struct vec_s v2;
+
+ v2.member = v1;
+
+ short r = v0[0] + v1[1] + v2.member[2];
+ if (r != 6)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-16.inc b/gcc/testsuite/c-c++-common/torture/vshuf-16.inc
index 68f2646d86..68f2646d86 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-16.inc
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-16.inc
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-2.inc b/gcc/testsuite/c-c++-common/torture/vshuf-2.inc
index ef778e5941..ef778e5941 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-2.inc
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-2.inc
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-4.inc b/gcc/testsuite/c-c++-common/torture/vshuf-4.inc
index d6e6e10229..d6e6e10229 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-4.inc
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-4.inc
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-8.inc b/gcc/testsuite/c-c++-common/torture/vshuf-8.inc
index e6475226a1..e6475226a1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-8.inc
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-8.inc
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-main.inc b/gcc/testsuite/c-c++-common/torture/vshuf-main.inc
index 8487131b12..8487131b12 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-main.inc
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-main.inc
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v16hi.c b/gcc/testsuite/c-c++-common/torture/vshuf-v16hi.c
index 98b329dbf9..98b329dbf9 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v16hi.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v16hi.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v16qi.c b/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c
index dcd1de1e64..dcd1de1e64 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v16qi.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v16qi.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2df.c b/gcc/testsuite/c-c++-common/torture/vshuf-v2df.c
index e88ec08ddf..e88ec08ddf 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2df.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v2df.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2di.c b/gcc/testsuite/c-c++-common/torture/vshuf-v2di.c
index 0985a0de02..0985a0de02 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2di.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v2di.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2sf.c b/gcc/testsuite/c-c++-common/torture/vshuf-v2sf.c
index f9c40b2239..f9c40b2239 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2sf.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v2sf.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2si.c b/gcc/testsuite/c-c++-common/torture/vshuf-v2si.c
index 414743c892..414743c892 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v2si.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v2si.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4df.c b/gcc/testsuite/c-c++-common/torture/vshuf-v4df.c
index c4030a7dba..c4030a7dba 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4df.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v4df.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4di.c b/gcc/testsuite/c-c++-common/torture/vshuf-v4di.c
index a84aebefb6..a84aebefb6 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4di.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v4di.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4hi.c b/gcc/testsuite/c-c++-common/torture/vshuf-v4hi.c
index 64a2bb4ac8..64a2bb4ac8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4hi.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v4hi.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4sf.c b/gcc/testsuite/c-c++-common/torture/vshuf-v4sf.c
index 283672560a..283672560a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4sf.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v4sf.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4si.c b/gcc/testsuite/c-c++-common/torture/vshuf-v4si.c
index 289ec1b501..289ec1b501 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v4si.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v4si.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8hi.c b/gcc/testsuite/c-c++-common/torture/vshuf-v8hi.c
index ce442c5d99..ce442c5d99 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8hi.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v8hi.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8qi.c b/gcc/testsuite/c-c++-common/torture/vshuf-v8qi.c
index 349ec6db69..349ec6db69 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8qi.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v8qi.c
diff --git a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8si.c b/gcc/testsuite/c-c++-common/torture/vshuf-v8si.c
index 5b0a2c33e2..5b0a2c33e2 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vshuf-v8si.c
+++ b/gcc/testsuite/c-c++-common/torture/vshuf-v8si.c
diff --git a/gcc/testsuite/c-c++-common/tsan/atomic_stack.c b/gcc/testsuite/c-c++-common/tsan/atomic_stack.c
new file mode 100644
index 0000000000..6a37951201
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/atomic_stack.c
@@ -0,0 +1,31 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+int Global;
+
+void *Thread1(void *x) {
+ sleep(1);
+ __atomic_fetch_add(&Global, 1, __ATOMIC_RELAXED);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ Global++;
+ return NULL;
+}
+
+int main() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output " Atomic write of size 4.*" } */
+/* { dg-output " #0 __tsan_atomic32_fetch_add.*" } */
+/* { dg-output " #1 Thread1.*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c b/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c
new file mode 100644
index 0000000000..28cd630d2c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/fd_pipe_race.c
@@ -0,0 +1,36 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int fds[2];
+
+void *Thread1(void *x) {
+ write(fds[1], "a", 1);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ sleep(1);
+ close(fds[0]);
+ close(fds[1]);
+ return NULL;
+}
+
+int main() {
+ pipe(fds);
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*\n" } */
+/* { dg-output " Write of size 8.*\n" } */
+/* { dg-output " #0 close.*\n" } */
+/* { dg-output " #1 Thread2.*\n" } */
+/* { dg-output " Previous read of size 8.*\n" } */
+/* { dg-output " #0 write.*\n" } */
+/* { dg-output " #1 Thread1.*\n" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/free_race.c b/gcc/testsuite/c-c++-common/tsan/free_race.c
new file mode 100644
index 0000000000..258f7b7420
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/free_race.c
@@ -0,0 +1,27 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <stdlib.h>
+
+void __attribute__((noinline)) foo(int *mem) {
+ free(mem);
+}
+
+void __attribute__((noinline)) bar(int *mem) {
+ mem[0] = 42;
+}
+
+int main() {
+ int *mem =(int*)malloc (100);
+ foo(mem);
+ bar(mem);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: heap-use-after-free.*(\n|\r\n|\r)" } */
+/* { dg-output " Write of size 4 at.* by main thread:(\n|\r\n|\r)" } */
+/* { dg-output " #0 bar.*(\n|\r\n|\r)" } */
+/* { dg-output " #1 main.*(\n|\r\n|\r)" } */
+/* { dg-output " Previous write of size 8 at.* by main thread:(\n|\r\n|\r)" } */
+/* { dg-output " #0 free.*(\n|\r\n|\r)" } */
+/* { dg-output " #\(1|2\) foo.*(\n|\r\n|\r)" } */
+/* { dg-output " #\(2|3\) main.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/free_race2.c b/gcc/testsuite/c-c++-common/tsan/free_race2.c
new file mode 100644
index 0000000000..3971180c22
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/free_race2.c
@@ -0,0 +1,28 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <stdlib.h>
+
+void __attribute__((noinline)) foo(int *mem) {
+ free(mem);
+}
+
+void __attribute__((noinline)) bar(int *mem) {
+ mem[0] = 42;
+}
+
+int main() {
+ int *mem = (int*)malloc(100);
+ foo(mem);
+ bar(mem);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: heap-use-after-free.*(\n|\r\n|\r)" } */
+/* { dg-output " Write of size 4.* by main thread:(\n|\r\n|\r)" } */
+/* { dg-output " #0 bar.*" } */
+/* { dg-output " #1 main .*" } */
+/* { dg-output " Previous write of size 8 at .* by main thread:(\n|\r\n|\r)" } */
+/* { dg-output " #0 free .*" } */
+/* { dg-output " #\(1|2\) foo.*(\n|\r\n|\r)" } */
+/* { dg-output " #\(2|3\) main .*" } */
+
diff --git a/gcc/testsuite/c-c++-common/tsan/mutexset1.c b/gcc/testsuite/c-c++-common/tsan/mutexset1.c
new file mode 100644
index 0000000000..7c32a8524b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/mutexset1.c
@@ -0,0 +1,40 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int Global;
+pthread_mutex_t mtx;
+
+void *Thread1(void *x) {
+ sleep(1);
+ pthread_mutex_lock(&mtx);
+ Global++;
+ pthread_mutex_unlock(&mtx);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ Global--;
+ return NULL;/* { dg-output ".*" } */
+
+}
+
+int main() {
+ pthread_mutex_init(&mtx, 0);
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ pthread_mutex_destroy(&mtx);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output " Read of size 4 at 0x\[0-9a-f\]+ by thread T1 \\(mutexes: write M\[0-9\]\\):.*" } */
+/* { dg-output " Previous write of size 4 at 0x\[0-9a-f\]+ by thread T2:.*" } */
+/* { dg-output " Mutex M\[0-9\] created at:.*" } */
+/* { dg-output " #0 pthread_mutex_init.*" } */
+/* { dg-output " #1 main (.*mutexset1.c|\\?{2}):\[0-9]+.*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c b/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c
new file mode 100644
index 0000000000..0a0e5faba0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/race_on_barrier.c
@@ -0,0 +1,32 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+pthread_barrier_t B;
+int Global;
+
+void *Thread1(void *x) {
+ pthread_barrier_init(&B, 0, 2);
+ pthread_barrier_wait(&B);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ sleep(1);
+ pthread_barrier_wait(&B);
+ return NULL;
+}
+
+int main() {
+ pthread_t t;
+ pthread_create(&t, NULL, Thread1, NULL);
+ Thread2(0);
+ pthread_join(t, NULL);
+ pthread_barrier_destroy(&B);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_barrier2.c b/gcc/testsuite/c-c++-common/tsan/race_on_barrier2.c
new file mode 100644
index 0000000000..b01a5cc21a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/race_on_barrier2.c
@@ -0,0 +1,32 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+pthread_barrier_t B;
+int Global;
+
+void *Thread1(void *x) {
+ if (pthread_barrier_wait(&B) == PTHREAD_BARRIER_SERIAL_THREAD)
+ pthread_barrier_destroy(&B);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ if (pthread_barrier_wait(&B) == PTHREAD_BARRIER_SERIAL_THREAD)
+ pthread_barrier_destroy(&B);
+ return NULL;
+}
+
+int main() {
+ pthread_barrier_init(&B, 0, 2);
+ pthread_t t;
+ pthread_create(&t, NULL, Thread1, NULL);
+ Thread2(0);
+ pthread_join(t, NULL);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
new file mode 100644
index 0000000000..5dad345d85
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/race_on_mutex.c
@@ -0,0 +1,43 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+pthread_mutex_t Mtx;
+int Global;
+
+void *Thread1(void *x) {
+ pthread_mutex_init(&Mtx, 0);
+ pthread_mutex_lock(&Mtx);
+ Global = 42;
+ pthread_mutex_unlock(&Mtx);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ sleep(1);
+ pthread_mutex_lock(&Mtx);
+ Global = 43;
+ pthread_mutex_unlock(&Mtx);
+ return NULL;
+}
+
+int main() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ pthread_mutex_destroy(&Mtx);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output " Atomic read of size 1 at .* by thread T2:(\n|\r\n|\r)" } */
+/* { dg-output " #0 pthread_mutex_lock.*" } */
+/* { dg-output " #1 Thread2.* .*(race_on_mutex.c:21|\\?{2}:0) (.*)" } */
+/* { dg-output " Previous write of size 1 at .* by thread T1:(\n|\r\n|\r)" } */
+/* { dg-output " #0 pthread_mutex_init .* (.)*" } */
+/* { dg-output " #1 Thread1.* .*(race_on_mutex.c:12|\\?{2}:0) .*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c b/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c
new file mode 100644
index 0000000000..80a6fb6c0e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/race_on_mutex2.c
@@ -0,0 +1,25 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <stddef.h>
+#include <unistd.h>
+
+void *Thread(void *x) {
+ pthread_mutex_lock((pthread_mutex_t*)x);
+ pthread_mutex_unlock((pthread_mutex_t*)x);
+ return 0;
+}
+
+int main() {
+ pthread_mutex_t Mtx;
+ pthread_mutex_init(&Mtx, 0);
+ pthread_t t;
+ pthread_create(&t, 0, Thread, &Mtx);
+ sleep(1);
+ pthread_mutex_destroy(&Mtx);
+ pthread_join(t, 0);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/simple_race.c b/gcc/testsuite/c-c++-common/tsan/simple_race.c
new file mode 100644
index 0000000000..a40accd40a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/simple_race.c
@@ -0,0 +1,50 @@
+/* { dg-set-target-env-var TSAN_OPTIONS "halt_on_error=1" } */
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#define MAX_ITERATIONS_NUMBER 100
+#define SLEEP_STEP 128000
+
+unsigned int delay_time = 1000;
+
+static inline void delay () {
+ usleep(delay_time);
+}
+
+extern int main_1();
+
+int main() {
+ int i;
+ for (i = 0; i < MAX_ITERATIONS_NUMBER; i++) {
+ main_1();
+ delay_time += delay_time < 256000 ? delay_time : SLEEP_STEP;
+ }
+ return 0;
+}
+
+int Global;
+
+void *Thread1(void *x) {
+ delay();
+ Global = 42;
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ Global = 43;
+ return NULL;
+}
+
+int main_1() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/simple_stack.c b/gcc/testsuite/c-c++-common/tsan/simple_stack.c
new file mode 100644
index 0000000000..b66a67085c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/simple_stack.c
@@ -0,0 +1,65 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int Global;
+
+void __attribute__((noinline)) foo1() {
+ Global = 42;
+}
+
+void __attribute__((noinline)) bar1() {
+ volatile int tmp = 42; (void)tmp;
+ foo1();
+}
+
+void __attribute__((noinline)) foo2() {
+ volatile int v = Global; (void)v;
+}
+
+void __attribute__((noinline)) bar2() {
+ volatile int tmp = 42; (void)tmp;
+ foo2();
+}
+
+void *Thread1(void *x) {
+ sleep(1);
+ bar1();
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ bar2();
+ return NULL;
+}
+
+void StartThread(pthread_t *t, void *(*f)(void*)) {
+ pthread_create(t, NULL, f, NULL);
+}
+
+int main() {
+ pthread_t t[2];
+ StartThread(&t[0], Thread1);
+ StartThread(&t[1], Thread2);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*" } */
+/* { dg-output " Write of size 4 at .* by thread T1:(\n|\r\n|\r)" } */
+/* { dg-output " #0 foo1.* .*(simple_stack.c:10|\\?{2}:0) (.*)" } */
+/* { dg-output " #1 bar1.* .*(simple_stack.c:15|\\?{2}:0) (.*)" } */
+/* { dg-output " #2 Thread1.* .*(simple_stack.c:29|\\?{2}:0) (.*)" } */
+/* { dg-output " Previous read of size 4 at .* by thread T2:(\n|\r\n|\r)" } */
+/* { dg-output " #0 foo2.* .*(simple_stack.c:19|\\?{2}:0) (.*)" } */
+/* { dg-output " #1 bar2.* .*(simple_stack.c:24|\\?{2}:0) (.*)" } */
+/* { dg-output " #2 Thread2.* .*(simple_stack.c:34|\\?{2}:0) (.*)" } */
+/* { dg-output " Thread T1 \\(tid=.*, running\\) created by main thread at:(\n|\r\n|\r)" } */
+/* { dg-output " #0 pthread_create .* (.*)" } */
+/* { dg-output " #1 StartThread.* .*(simple_stack.c:39|\\?{2}:0) (.*)" } */
+/* { dg-output " Thread T2 (.*) created by main thread at:(\n|\r\n|\r)" } */
+/* { dg-output " #0 pthread_create .* (.*)" } */
+/* { dg-output " #1 StartThread.* .*(simple_stack.c:39|\\?{2}:0) (.*)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/sleep_sync.c b/gcc/testsuite/c-c++-common/tsan/sleep_sync.c
new file mode 100644
index 0000000000..44d44554c2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/sleep_sync.c
@@ -0,0 +1,30 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+int X = 0;
+
+void MySleep() {
+ sleep(1);
+}
+
+void *Thread(void *p) {
+ MySleep(); // Assume the main thread has done the write.
+ X = 42;
+ return 0;
+}
+
+int main() {
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ X = 43;
+ pthread_join(t, 0);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r).*} */
+/* { dg-output " As if synchronized via sleep:(\n|\r\n|\r)} */
+/* { dg-output " #0 sleep.*"*} */
+/* { dg-output " #1 MySleep.*"*} */
+/* { dg-output " #2 Thread.*"*} */
diff --git a/gcc/testsuite/c-c++-common/tsan/thread_leak.c b/gcc/testsuite/c-c++-common/tsan/thread_leak.c
new file mode 100644
index 0000000000..02deaba584
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/thread_leak.c
@@ -0,0 +1,16 @@
+#include <pthread.h>
+#include <stdio.h>
+
+void *Thread(void *x) {
+ return 0;
+}
+
+int main() {
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ pthread_join(t, 0);
+ printf("PASS\n");
+ return 0;
+}
+
+/* { dg-prune-output "WARNING: ThreadSanitizer: thread leak.*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/thread_leak1.c b/gcc/testsuite/c-c++-common/tsan/thread_leak1.c
new file mode 100644
index 0000000000..ce28ee487e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/thread_leak1.c
@@ -0,0 +1,18 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+void *Thread(void *x) {
+ return 0;
+}
+
+int main() {
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ sleep(1);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: thread leak.*(\n|\r\n|\r)" } */
+/* { dg-output "SUMMARY: ThreadSanitizer: thread leak.*main.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/thread_leak2.c b/gcc/testsuite/c-c++-common/tsan/thread_leak2.c
new file mode 100644
index 0000000000..c9b8046652
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/thread_leak2.c
@@ -0,0 +1,21 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+void *Thread(void *x) {
+ return 0;
+}
+
+int main() {
+ int i;
+ for (i = 0; i < 5; i++) {
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ }
+ sleep(1);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: thread leak.*(\n|\r\n|\r)" } */
+/* { dg-output " And 4 more similar thread leaks.*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/tiny_race.c b/gcc/testsuite/c-c++-common/tsan/tiny_race.c
new file mode 100644
index 0000000000..962497b282
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/tiny_race.c
@@ -0,0 +1,22 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+int Global;
+
+void *Thread1(void *x) {
+ sleep(1);
+ Global = 42;
+ return x;
+}
+
+int main() {
+ pthread_t t;
+ pthread_create(&t, 0, Thread1, 0);
+ Global = 43;
+ pthread_join(t, 0);
+ return Global;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/tls_race.c b/gcc/testsuite/c-c++-common/tsan/tls_race.c
new file mode 100644
index 0000000000..423867e382
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/tls_race.c
@@ -0,0 +1,20 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <stddef.h>
+
+void *Thread(void *a) {
+ *(int*)a = 43;
+ return 0;
+}
+
+int main() {
+ static __thread int Var = 42;
+ pthread_t t;
+ pthread_create(&t, 0, Thread, &Var);
+ Var = 43;
+ pthread_join(t, 0);
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r).*" } */
+/* { dg-output " Location is TLS of main thread.(\n|\r\n|\r).*" } */
diff --git a/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c b/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c
new file mode 100644
index 0000000000..898d23d50b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/tsan/write_in_reader_lock.c
@@ -0,0 +1,36 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+pthread_rwlock_t rwlock;
+int GLOB;
+
+void *Thread1(void *p) {
+ (void)p;
+ pthread_rwlock_rdlock(&rwlock);
+ // Write under reader lock.
+ sleep(1);
+ GLOB++;
+ pthread_rwlock_unlock(&rwlock);
+ return 0;
+}
+
+int main(int argc, char *argv[]) {
+ pthread_rwlock_init(&rwlock, NULL);
+ pthread_rwlock_rdlock(&rwlock);
+ pthread_t t;
+ pthread_create(&t, 0, Thread1, 0);
+ volatile int x = GLOB;
+ (void)x;
+ pthread_rwlock_unlock(&rwlock);
+ pthread_join(t, 0);
+ pthread_rwlock_destroy(&rwlock);
+ return 0;
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output " Write of size 4 at 0x\[0-9a-f\]+ by thread T1.*:(\n|\r\n|\r).*" } */
+/* { dg-output " #0 Thread1.*\(write_in_reader_lock.c|\\?{2}\):\[0-9\]+ .*" } */
+/* { dg-output " Previous read of size 4 at.* by main thread.*:(\n|\r\n|\r).*" } */
+/* { dg-output " #0 main.*\(write_in_reader_lock.c|\\?{2}\):\[0-9\]+.*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/attrib-1.c b/gcc/testsuite/c-c++-common/ubsan/attrib-1.c
new file mode 100644
index 0000000000..2e9141ca04
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/attrib-1.c
@@ -0,0 +1,33 @@
+/* PR sanitizer/58411 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=undefined -w" } */
+
+__attribute__((no_sanitize_undefined)) int
+f1 (int i)
+{
+ return 16 << i;
+}
+
+int f2 (int i);
+int f2 (int i) __attribute__((no_sanitize_undefined));
+int f2 (int i) __attribute__((no_sanitize_undefined));
+int f2 (int i);
+
+int
+f2 (int i)
+{
+ return 1 / i;
+}
+
+void f3 (void);
+__typeof (f3) f3 __attribute__((__no_sanitize_undefined__));
+
+void
+f3 (void)
+{
+ __builtin_unreachable ();
+}
+
+/* { dg-final { scan-assembler-not "__ubsan_handle_shift_out_of_bounds" } } */
+/* { dg-final { scan-assembler-not "__ubsan_handle_divrem_overflow" } } */
+/* { dg-final { scan-assembler-not "__ubsan_handle_builtin_unreachable" } } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/const-char-1.c b/gcc/testsuite/c-c++-common/ubsan/const-char-1.c
new file mode 100644
index 0000000000..6c2c3f8c3a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/const-char-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift" } */
+
+void
+foo (void)
+{
+ int y = 1 << 2;
+ __builtin_printf ("%d\n", y);
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/const-expr-1.c b/gcc/testsuite/c-c++-common/ubsan/const-expr-1.c
new file mode 100644
index 0000000000..f474ec64ef
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/const-expr-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+enum e { A = 1 << 1, B, };
+const int arr[] = {
+ 1 << 2,
+ 1 << 3,
+};
+
+int
+bar (int a, int b)
+{
+ return a >> b;
+}
+
+int
+foo (void)
+{
+ int i = 1;
+ int vla[B << 3];
+ return bar (A, (i <<= 6, i + 2));
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c
new file mode 100644
index 0000000000..ec391e40be
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-1.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=integer-divide-by-zero -Wno-div-by-zero" } */
+
+int
+main (void)
+{
+ volatile int a = 0;
+ volatile long long int b = 0;
+ volatile unsigned int c = 1;
+
+ a / b;
+ 0 / 0;
+ a / 0;
+ 0 / b;
+ 2 / --c;
+
+ return 0;
+}
+
+/* { dg-output "division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c
new file mode 100644
index 0000000000..c8820fa946
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-2.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=integer-divide-by-zero -Wno-div-by-zero" } */
+
+int
+main (void)
+{
+ volatile const unsigned long int o = 1UL;
+ int zero = 0;
+
+ o / 0;
+ 1UL / 0;
+ 1UL / zero;
+ o / zero;
+ o / (++zero - 1);
+
+ return 0;
+}
+
+/* { dg-output "division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division by zero" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c
new file mode 100644
index 0000000000..399071ee7a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-3.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=integer-divide-by-zero -Wno-overflow" } */
+
+#include <limits.h>
+
+int
+main (void)
+{
+ volatile int min = INT_MIN;
+ volatile int zero = 0;
+
+ INT_MIN / -1;
+ min / -1;
+ min / (10 * zero - (2 - 1));
+
+ return 0;
+}
+
+/* { dg-output "division of -2147483648 by -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*division of -2147483648 by -1 cannot be represented in type 'int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c
new file mode 100644
index 0000000000..02162e139e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-4.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=integer-divide-by-zero -Wno-overflow" } */
+
+#define INT_MIN (-__INT_MAX__ - 1)
+
+int
+main (void)
+{
+ /* This should not fail. */
+ return (unsigned int) INT_MIN / -1;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/div-by-zero-5.c b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-5.c
new file mode 100644
index 0000000000..7a28bacd14
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/div-by-zero-5.c
@@ -0,0 +1,8 @@
+/* { dg-do compile} */
+/* { dg-options "-fsanitize=integer-divide-by-zero" } */
+
+void
+foo (void)
+{
+ int A[-2 / -1] = {};
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c b/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c
new file mode 100644
index 0000000000..96f7984f86
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/load-bool-enum.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=bool,enum" } */
+
+#ifndef __cplusplus
+#define bool _Bool
+#endif
+enum A { B = -3, C = 2 } a;
+bool b;
+
+__attribute__((noinline, noclone)) enum A
+foo (bool *p)
+{
+ *p = b; /* { dg-output "load-bool-enum.c:13:\[^\n\r]*runtime error: load of value 4, which is not a valid value for type '(_B|b)ool'(\n|\r\n|\r)*" } */
+ return a; /* { dg-output "\[^\n\r]*load-bool-enum.c:14:\[^\n\r]*runtime error: load of value 9, which is not a valid value for type 'A'(\n|\r\n|\r)*" { target c++ } } */
+}
+
+int
+main ()
+{
+ char c = 4;
+ int d = 9;
+ if (sizeof (int) != sizeof (a) || sizeof (b) != 1)
+ return 0;
+ __builtin_memcpy (&a, &d, sizeof (int));
+ __builtin_memcpy (&b, &c, 1);
+ bool e;
+ foo (&e);
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-1.c b/gcc/testsuite/c-c++-common/ubsan/null-1.c
new file mode 100644
index 0000000000..08d547f3aa
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-1.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ int *p = 0;
+ return *p;
+}
+
+/* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-10.c b/gcc/testsuite/c-c++-common/ubsan/null-10.c
new file mode 100644
index 0000000000..c3d61a01d5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-10.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ short *p = 0, *u;
+ *(u + *p) = 23;
+ return 0;
+}
+
+/* { dg-output "load of null pointer of type 'short int'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-11.c b/gcc/testsuite/c-c++-common/ubsan/null-11.c
new file mode 100644
index 0000000000..6645f2acfc
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-11.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+struct S {
+ int i;
+};
+
+int
+main (void)
+{
+ struct S **s = 0;
+ return (*s)->i;
+}
+
+/* { dg-output "load of null pointer of type 'struct S \\*'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-2.c b/gcc/testsuite/c-c++-common/ubsan/null-2.c
new file mode 100644
index 0000000000..cb3907fa5c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-2.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ int ***ppp = 0;
+ return ***ppp;
+}
+
+/* { dg-output "load of null pointer of type 'int \\*\\*'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-3.c b/gcc/testsuite/c-c++-common/ubsan/null-3.c
new file mode 100644
index 0000000000..f58562c63b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-3.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+foo (int *p)
+{
+ return *p;
+}
+
+int
+main (void)
+{
+ int **p = 0;
+ return foo (*p);
+}
+
+/* { dg-output "load of null pointer of type 'int \\*'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-4.c b/gcc/testsuite/c-c++-common/ubsan/null-4.c
new file mode 100644
index 0000000000..18506afb3c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-4.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ _Complex double *p = 0;
+ if (p[0])
+ return 42;
+ return 0;
+}
+
+/* { dg-output "load of null pointer of type 'complex double'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-5.c b/gcc/testsuite/c-c++-common/ubsan/null-5.c
new file mode 100644
index 0000000000..c3c45b7c47
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-5.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+typedef volatile const _Complex float *T;
+
+int
+main (void)
+{
+ T t = 0;
+ if (*t)
+ return 42;
+ return 0;
+}
+
+/* { dg-output "load of null pointer of type 'volatile const complex float'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-6.c b/gcc/testsuite/c-c++-common/ubsan/null-6.c
new file mode 100644
index 0000000000..63fade5a6e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-6.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ unsigned long int *p = 0;
+ *p = 42;
+ return 0;
+}
+
+/* { dg-output "store to null pointer of type 'long unsigned int'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-7.c b/gcc/testsuite/c-c++-common/ubsan/null-7.c
new file mode 100644
index 0000000000..bf30a0b9b3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-7.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int *
+gao (void)
+{
+ return 0;
+}
+
+int
+main (void)
+{
+ return *gao ();
+}
+
+/* { dg-output "load of null pointer of type 'int'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-8.c b/gcc/testsuite/c-c++-common/ubsan/null-8.c
new file mode 100644
index 0000000000..170377ee4d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-8.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+struct S {
+ int i;
+};
+
+int
+main (void)
+{
+ struct S *s = 0;
+ return s->i;
+}
+
+/* { dg-output "member access within null pointer of type 'struct S'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/null-9.c b/gcc/testsuite/c-c++-common/ubsan/null-9.c
new file mode 100644
index 0000000000..ab43d22a32
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/null-9.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=null -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+union U {
+ int i;
+};
+
+int
+main (void)
+{
+ union U *u = 0;
+ return u->i;
+}
+
+/* { dg-output "member access within null pointer of type 'union U'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-1.c
new file mode 100644
index 0000000000..68199551b4
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-1.c
@@ -0,0 +1,269 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+#include <stdio.h>
+
+#ifndef ASM1
+# define ASM1(a) /* Nothing */
+#endif
+#ifndef ASM2
+# define ASM2(a, b) /* Nothing */
+#endif
+
+#define CHECK(A, B) ({ if ((A) != (B)) __builtin_abort (); })
+
+#define FN1(T1, T2, OP) \
+ ({ \
+ T1 a = 14; \
+ T2 b = 9; \
+ ASM2 (a, b); \
+ a OP b; \
+ })
+
+#define FN2(T, OP) \
+ ({ \
+ T a = 14; \
+ ASM1 (a); \
+ a OP 7; \
+ })
+
+#define FN3(T1, T2, OP) \
+ ({ \
+ T1 a = 4; \
+ T2 b = 1; \
+ ASM2 (a, b); \
+ ~a OP b; \
+ })
+
+#define FN4(T1, T2, OP) \
+ ({ \
+ T1 a = 4; \
+ T2 b = 1; \
+ ASM2 (a, b); \
+ a OP ~b; \
+ })
+
+#define FN5(T) \
+ ({ \
+ T a = 77; \
+ ASM1 (a); \
+ -a; \
+ })
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ CHECK (FN1 (char, char, +), 23);
+ CHECK (FN1 (char, char, -), 5);
+ CHECK (FN1 (char, char, *), 126);
+ CHECK (FN1 (unsigned char, unsigned char, +), 23);
+ CHECK (FN1 (unsigned char, unsigned char, -), 5);
+ CHECK (FN1 (unsigned char, unsigned char, *), 126);
+ CHECK (FN1 (short, short, +), 23);
+ CHECK (FN1 (short, short, -), 5);
+ CHECK (FN1 (short, short, *), 126);
+ CHECK (FN1 (unsigned short, unsigned short, +), 23);
+ CHECK (FN1 (unsigned short, unsigned short, -), 5);
+ CHECK (FN1 (unsigned short, unsigned short, *), 126);
+ CHECK (FN1 (int, int, +), 23);
+ CHECK (FN1 (int, int, -), 5);
+ CHECK (FN1 (int, int, *), 126);
+ CHECK (FN1 (unsigned int, unsigned int, +), 23);
+ CHECK (FN1 (unsigned int, unsigned int, -), 5);
+ CHECK (FN1 (unsigned int, unsigned int, *), 126);
+ CHECK (FN1 (long int, long int, +), 23);
+ CHECK (FN1 (long int, long int, -), 5);
+ CHECK (FN1 (long int, long int, *), 126);
+ CHECK (FN1 (unsigned long int, unsigned long int, +), 23);
+ CHECK (FN1 (unsigned long int, unsigned long int, -), 5);
+ CHECK (FN1 (unsigned long int, unsigned long int, *), 126);
+ CHECK (FN1 (long long int, long int, +), 23);
+ CHECK (FN1 (long long int, long int, -), 5);
+ CHECK (FN1 (long long int, long int, *), 126);
+ CHECK (FN1 (unsigned long long int, unsigned long long int, +), 23);
+ CHECK (FN1 (unsigned long long int, unsigned long long int, -), 5);
+ CHECK (FN1 (unsigned long long int, unsigned long long int, *), 126);
+ CHECK (FN1 (int, unsigned char, +), 23);
+ CHECK (FN1 (int, unsigned char, -), 5);
+ CHECK (FN1 (int, unsigned char, *), 126);
+ CHECK (FN1 (unsigned char, int, +), 23);
+ CHECK (FN1 (unsigned char, int, -), 5);
+ CHECK (FN1 (unsigned char, int, *), 126);
+ CHECK (FN1 (int, long int, +), 23);
+ CHECK (FN1 (int, long int, -), 5);
+ CHECK (FN1 (int, long int, *), 126);
+ CHECK (FN1 (long int, int, +), 23);
+ CHECK (FN1 (long int, int, -), 5);
+ CHECK (FN1 (long int, int, *), 126);
+ CHECK (FN1 (unsigned int, int, +), 23);
+ CHECK (FN1 (unsigned int, int, -), 5);
+ CHECK (FN1 (unsigned int, int, *), 126);
+ CHECK (FN1 (int, unsigned int, +), 23);
+ CHECK (FN1 (int, unsigned int, -), 5);
+ CHECK (FN1 (int, unsigned int, *), 126);
+ CHECK (FN1 (unsigned long int, int, +), 23);
+ CHECK (FN1 (unsigned long int, int, -), 5);
+ CHECK (FN1 (unsigned long int, int, *), 126);
+ CHECK (FN1 (int, unsigned long int, +), 23);
+ CHECK (FN1 (int, unsigned long int, -), 5);
+ CHECK (FN1 (int, unsigned long int, *), 126);
+
+ CHECK (FN2 (char, +), 21);
+ CHECK (FN2 (char, -), 7);
+ CHECK (FN2 (char, *), 98);
+ CHECK (FN2 (unsigned char, +), 21);
+ CHECK (FN2 (unsigned char, -), 7);
+ CHECK (FN2 (unsigned char, *), 98);
+ CHECK (FN2 (short, +), 21);
+ CHECK (FN2 (short, -), 7);
+ CHECK (FN2 (short, *), 98);
+ CHECK (FN2 (unsigned short, +), 21);
+ CHECK (FN2 (unsigned short, -), 7);
+ CHECK (FN2 (unsigned short, *), 98);
+ CHECK (FN2 (int, +), 21);
+ CHECK (FN2 (int, -), 7);
+ CHECK (FN2 (int, *), 98);
+ CHECK (FN2 (unsigned int, +), 21);
+ CHECK (FN2 (unsigned int, -), 7);
+ CHECK (FN2 (unsigned int, *), 98);
+ CHECK (FN2 (long int, +), 21);
+ CHECK (FN2 (long int, -), 7);
+ CHECK (FN2 (long int, *), 98);
+ CHECK (FN2 (unsigned long int, +), 21);
+ CHECK (FN2 (unsigned long int, -), 7);
+ CHECK (FN2 (unsigned long int, *), 98);
+ CHECK (FN2 (long long int, +), 21);
+ CHECK (FN2 (long long int, -), 7);
+ CHECK (FN2 (long long int, *), 98);
+ CHECK (FN2 (unsigned long long int, +), 21);
+ CHECK (FN2 (unsigned long long int, -), 7);
+ CHECK (FN2 (unsigned long long int, *), 98);
+
+ CHECK (FN3 (char, char, +), -4);
+ CHECK (FN3 (char, char, -), -6);
+ CHECK (FN3 (char, char, *), -5);
+ CHECK (FN3 (unsigned char, unsigned char, +), -4);
+ CHECK (FN3 (unsigned char, unsigned char, -), -6);
+ CHECK (FN3 (unsigned char, unsigned char, *), -5);
+ CHECK (FN3 (short, short, +), -4);
+ CHECK (FN3 (short, short, -), -6);
+ CHECK (FN3 (short, short, *), -5);
+ CHECK (FN3 (unsigned short, unsigned short, +), -4);
+ CHECK (FN3 (unsigned short, unsigned short, -), -6);
+ CHECK (FN3 (unsigned short, unsigned short, *), -5);
+ CHECK (FN3 (int, int, +), -4);
+ CHECK (FN3 (int, int, -), -6);
+ CHECK (FN3 (int, int, *), -5);
+ CHECK (FN3 (unsigned int, unsigned int, +), -4);
+ CHECK (FN3 (unsigned int, unsigned int, -), -6);
+ CHECK (FN3 (unsigned int, unsigned int, *), -5);
+ CHECK (FN3 (long int, long int, +), -4);
+ CHECK (FN3 (long int, long int, -), -6);
+ CHECK (FN3 (long int, long int, *), -5);
+ CHECK (FN3 (unsigned long int, unsigned long int, +), -4);
+ CHECK (FN3 (unsigned long int, unsigned long int, -), -6);
+ CHECK (FN3 (unsigned long int, unsigned long int, *), -5);
+ CHECK (FN3 (long long int, long int, +), -4);
+ CHECK (FN3 (long long int, long int, -), -6);
+ CHECK (FN3 (long long int, long int, *), -5);
+ CHECK (FN3 (unsigned long long int, unsigned long long int, +), -4);
+ CHECK (FN3 (unsigned long long int, unsigned long long int, -), -6);
+ CHECK (FN3 (unsigned long long int, unsigned long long int, *), -5);
+ CHECK (FN3 (int, unsigned char, +), -4);
+ CHECK (FN3 (int, unsigned char, -), -6);
+ CHECK (FN3 (int, unsigned char, *), -5);
+ CHECK (FN3 (unsigned char, int, +), -4);
+ CHECK (FN3 (unsigned char, int, -), -6);
+ CHECK (FN3 (unsigned char, int, *), -5);
+ CHECK (FN3 (int, long int, +), -4);
+ CHECK (FN3 (int, long int, -), -6);
+ CHECK (FN3 (int, long int, *), -5);
+ CHECK (FN3 (long int, int, +), -4);
+ CHECK (FN3 (long int, int, -), -6);
+ CHECK (FN3 (long int, int, *), -5);
+ CHECK (FN3 (unsigned int, int, +), -4);
+ CHECK (FN3 (unsigned int, int, -), -6);
+ CHECK (FN3 (unsigned int, int, *), -5);
+ CHECK (FN3 (int, unsigned int, +), -4);
+ CHECK (FN3 (int, unsigned int, -), -6);
+ CHECK (FN3 (int, unsigned int, *), -5);
+ CHECK (FN3 (unsigned long int, int, +), -4);
+ CHECK (FN3 (unsigned long int, int, -), -6);
+ CHECK (FN3 (unsigned long int, int, *), -5);
+ CHECK (FN3 (int, unsigned long int, +), -4);
+ CHECK (FN3 (int, unsigned long int, -), -6);
+ CHECK (FN3 (int, unsigned long int, *), -5);
+
+ CHECK (FN4 (char, char, +), 2);
+ CHECK (FN4 (char, char, -), 6);
+ CHECK (FN4 (char, char, *), -8);
+ CHECK (FN4 (unsigned char, unsigned char, +), 2);
+ CHECK (FN4 (unsigned char, unsigned char, -), 6);
+ CHECK (FN4 (unsigned char, unsigned char, *), -8);
+ CHECK (FN4 (short, short, +), 2);
+ CHECK (FN4 (short, short, -), 6);
+ CHECK (FN4 (short, short, *), -8);
+ CHECK (FN4 (unsigned short, unsigned short, +), 2);
+ CHECK (FN4 (unsigned short, unsigned short, -), 6);
+ CHECK (FN4 (unsigned short, unsigned short, *), -8);
+ CHECK (FN4 (int, int, +), 2);
+ CHECK (FN4 (int, int, -), 6);
+ CHECK (FN4 (int, int, *), -8);
+ CHECK (FN4 (unsigned int, unsigned int, +), 2);
+ CHECK (FN4 (unsigned int, unsigned int, -), 6);
+ CHECK (FN4 (unsigned int, unsigned int, *), -8);
+ CHECK (FN4 (long int, long int, +), 2);
+ CHECK (FN4 (long int, long int, -), 6);
+ CHECK (FN4 (long int, long int, *), -8);
+ CHECK (FN4 (unsigned long int, unsigned long int, +), 2);
+ CHECK (FN4 (unsigned long int, unsigned long int, -), 6);
+ CHECK (FN4 (unsigned long int, unsigned long int, *), -8);
+ CHECK (FN4 (long long int, long int, +), 2);
+ CHECK (FN4 (long long int, long int, -), 6);
+ CHECK (FN4 (long long int, long int, *), -8);
+ CHECK (FN4 (unsigned long long int, unsigned long long int, +), 2);
+ CHECK (FN4 (unsigned long long int, unsigned long long int, -), 6);
+ CHECK (FN4 (unsigned long long int, unsigned long long int, *), -8);
+ CHECK (FN4 (int, unsigned char, +), 2);
+ CHECK (FN4 (int, unsigned char, -), 6);
+ CHECK (FN4 (int, unsigned char, *), -8);
+ CHECK (FN4 (unsigned char, int, +), 2);
+ CHECK (FN4 (unsigned char, int, -), 6);
+ CHECK (FN4 (unsigned char, int, *), -8);
+ CHECK (FN4 (int, long int, +), 2);
+ CHECK (FN4 (int, long int, -), 6);
+ CHECK (FN4 (int, long int, *), -8);
+ CHECK (FN4 (long int, int, +), 2);
+ CHECK (FN4 (long int, int, -), 6);
+ CHECK (FN4 (long int, int, *), -8);
+ CHECK (FN4 (unsigned int, int, +), 2);
+ CHECK (FN4 (unsigned int, int, -), 6);
+ CHECK (FN4 (unsigned int, int, *), -8);
+ CHECK (FN4 (int, unsigned int, +), 2);
+ CHECK (FN4 (int, unsigned int, -), 6);
+ CHECK (FN4 (int, unsigned int, *), -8);
+ CHECK (FN4 (unsigned long int, int, +), 2);
+ CHECK (FN4 (unsigned long int, int, -), 6);
+ CHECK (FN4 (unsigned long int, int, *), -8);
+ CHECK (FN4 (int, unsigned long int, +), 2);
+ CHECK (FN4 (int, unsigned long int, -), 6);
+ CHECK (FN4 (int, unsigned long int, *), -8);
+
+ CHECK (FN5 (char), -77);
+ CHECK (FN5 (unsigned char), -77);
+ CHECK (FN5 (short), -77);
+ CHECK (FN5 (unsigned short), -77);
+ CHECK (FN5 (int), -77);
+ CHECK (FN5 (unsigned int), -77);
+ CHECK (FN5 (long int), -77);
+ CHECK (FN5 (unsigned long int), -77);
+ CHECK (FN5 (long long int), -77);
+ CHECK (FN5 (unsigned long long int), -77);
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-2.c
new file mode 100644
index 0000000000..aeca04d341
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-2.c
@@ -0,0 +1,7 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+#define ASM1(a) asm volatile ("" : "+g" (a))
+#define ASM2(a, b) asm volatile ("" : "+g" (a), "+g" (b))
+
+#include "overflow-1.c"
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-add-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-add-1.c
new file mode 100644
index 0000000000..fd6c6d325e
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-add-1.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#include <stdio.h>
+
+#define SCHAR_MAX __SCHAR_MAX__
+#define SHRT_MAX __SHRT_MAX__
+#define INT_MAX __INT_MAX__
+#define INT_MIN (-__INT_MAX__ - 1)
+
+void __attribute__((noinline,noclone))
+check (int i, int j)
+{
+ if (i != j)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+#if __INT_MAX__ == 2147483647
+ /* Here, nothing should fail. */
+ volatile int j = INT_MAX;
+ volatile int i = -1;
+ volatile int k = j + i;
+ check (k, 2147483646);
+ k = i + j;
+ check (k, 2147483646);
+ j--;
+ check (j, 2147483646);
+
+ i = 1;
+ j = INT_MIN;
+ k = i + j;
+ check (k, -2147483647);
+ k = j + i;
+ check (k, -2147483647);
+ j++;
+ check (j, -2147483647);
+#endif
+
+ /* Test integer promotion. */
+#if __SCHAR_MAX__ == 127
+ volatile signed char a = SCHAR_MAX;
+ volatile signed char b = 1;
+ volatile signed char c = a + b;
+ check (c, -128);
+ a++;
+ check (a, -128);
+#endif
+
+#if __SHRT_MAX__ == 32767
+ volatile short d = SHRT_MAX;
+ volatile short e = 1;
+ volatile short f = d + e;
+ check (f, -32768);
+ d++;
+ check (d, -32768);
+#endif
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c
new file mode 100644
index 0000000000..85499d86c2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-add-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#define INT_MAX __INT_MAX__
+#define INT_MIN (-__INT_MAX__ - 1)
+#define LONG_MAX __LONG_MAX__
+#define LONG_MIN (-__LONG_MAX__ - 1L)
+#define LLONG_MAX __LONG_LONG_MAX__
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1L)
+
+int
+main (void)
+{
+ volatile int j = INT_MAX;
+ volatile int i = 1;
+ volatile int k = j + i;
+ k = i + j;
+ j++;
+ j = INT_MAX - 100;
+ j += (1 << 10);
+
+ j = INT_MIN;
+ i = -1;
+ k = i + j;
+ k = j + i;
+ j = INT_MIN + 100;
+ j += -(1 << 10);
+
+ volatile long int m = LONG_MAX;
+ volatile long int n = 1;
+ volatile long int o = m + n;
+ o = n + m;
+ m++;
+ m = LONG_MAX - 100;
+ m += (1 << 10);
+
+ m = LONG_MIN;
+ n = -1;
+ o = m + n;
+ o = n + m;
+ m = LONG_MIN + 100;
+ m += -(1 << 10);
+
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ 2147483647 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2147483647 \\+ 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2147483547 \\+ 1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -2147483648 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ \[^\n\r]* cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\+ 1024 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ -\[^\n\r]* cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c b/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c
new file mode 100644
index 0000000000..9a850243d3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-int128.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+/* 2^127 - 1 */
+#define INT128_MAX (__int128) (((unsigned __int128) 1 << ((__SIZEOF_INT128__ * __CHAR_BIT__) - 1)) - 1)
+#define INT128_MIN (-INT128_MAX - 1)
+
+int
+main (void)
+{
+ volatile __int128 i = INT128_MAX;
+ volatile __int128 j = 1;
+ volatile __int128 k = i + j;
+ k = j + i;
+ i++;
+ j = INT128_MAX - 100;
+ j += (1 << 10);
+
+ j = INT128_MIN;
+ i = -1;
+ k = i + j;
+ k = j + i;
+ j--;
+ j = INT128_MIN + 100;
+ j += -(1 << 10);
+
+ i = INT128_MAX;
+ j = 2;
+ k = i * j;
+
+ i = INT128_MIN;
+ i = -i;
+
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: 0x7fffffffffffffffffffffffffffffff \\+ 1 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 1 \\+ 0x7fffffffffffffffffffffffffffffff cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x7fffffffffffffffffffffffffffffff \\+ 1 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x7fffffffffffffffffffffffffffff9b \\+ 1024 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -1 \\+ 0x80000000000000000000000000000000 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x80000000000000000000000000000000 \\+ -1 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x80000000000000000000000000000000 \\+ -1 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x80000000000000000000000000000064 \\+ -1024 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 0x7fffffffffffffffffffffffffffffff \\* 2 cannot be represented in type '__int128'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of 0x80000000000000000000000000000000 cannot be represented in type '__int128'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-1.c
new file mode 100644
index 0000000000..afb1a25967
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-1.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#include <stdio.h>
+
+#define SCHAR_MAX __SCHAR_MAX__
+#define SHRT_MAX __SHRT_MAX__
+#define INT_MAX __INT_MAX__
+#define INT_MIN (-__INT_MAX__ - 1)
+
+void __attribute__((noinline,noclone))
+check (int i, int j)
+{
+ if (i != j)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ /* Test integer promotion. */
+#if __SCHAR_MAX__ == 127
+ volatile signed char a = -2;
+ volatile signed char b = SCHAR_MAX;
+ volatile signed char c = a * b;
+ check (c, 2);
+#endif
+
+#if __SHRT_MAX__ == 32767
+ volatile short d = SHRT_MAX;
+ volatile short e = 2;
+ volatile short f = d * e;
+ check (f, -2);
+#endif
+
+#if __INT_MAX__ == 2147483647
+ volatile int m = INT_MAX;
+ volatile int n = 1;
+ volatile int o = m * n;
+ check (o, INT_MAX);
+
+ m = INT_MIN;
+ o = m * n;
+ check (o, INT_MIN);
+#endif
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c
new file mode 100644
index 0000000000..ece25a354b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-2.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#define INT_MAX __INT_MAX__
+#define LONG_MAX __LONG_MAX__
+
+int
+main (void)
+{
+ volatile int j = INT_MAX;
+ volatile int i = 2;
+ volatile int k = j * i;
+ k = i * j;
+
+ volatile long int m = LONG_MAX;
+ volatile long int n = 2;
+ volatile long int o = m * n;
+ o = n * m;
+
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: 2147483647 \\* 2 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* 2147483647 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: \[^\n\r]* \\* 2 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 2 \\* \[^\n\r]* cannot be represented in type 'long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-3.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-3.c
new file mode 100644
index 0000000000..037609be0a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-3.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+#include <stdio.h>
+
+__attribute__((noinline, noclone)) long long
+mul (long long x, long long y)
+{
+ return x * y;
+}
+
+long long tab[] = {
+ 0x7fffffffLL, 0x7fffffffLL, 0x3fffffff00000001LL,
+ -0x80000000LL, -0x80000000LL, 0x4000000000000000LL,
+ 0x7fffffffLL, -0x80000000LL, -0x3fffffff80000000LL,
+ -0x80000000LL, 0x7fffffffLL, -0x3fffffff80000000LL,
+ 3LL, 5LL, 15LL,
+ -3LL, -9LL, 27LL,
+ 6LL, -7LL, -42LL,
+ -12LL, 13LL, -156LL,
+ 0x1555555555555555LL, 6LL, 0x7ffffffffffffffeLL,
+ -0x1555555555555555LL, -6LL, 0x7ffffffffffffffeLL,
+ 0x1555555555555555LL, -6LL, -0x7ffffffffffffffeLL,
+ -0x1555555555555555LL, 6LL, -0x7ffffffffffffffeLL,
+ 0x81234567LL, 0xfdbe971fLL, 0x7fffffffbea72879LL,
+ -0x81234567LL, -0xfdbe971fLL, 0x7fffffffbea72879LL,
+ 0x81234567LL, -0xfdbe971fLL, -0x7fffffffbea72879LL,
+ -0x81234567LL, 0xfdbe971fLL, -0x7fffffffbea72879LL
+};
+
+int
+main ()
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ unsigned int i;
+ for (i = 0; i < sizeof (tab) / sizeof (long long); i += 3)
+ if (mul (tab[i], tab[i + 1]) != tab[i + 2]
+ || mul (tab[i + 1], tab[i]) != tab[i + 2])
+ __builtin_abort ();
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c
new file mode 100644
index 0000000000..82e114001b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-mul-4.c
@@ -0,0 +1,86 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+
+int
+main ()
+{
+#define MUL_WITH_CHECK(xv, yv, zv) \
+ do { \
+ long long x = xv; \
+ long long y = yv; \
+ long long z; \
+ asm ("" : "+g" (x)); \
+ asm ("" : "+g" (y)); \
+ z = x * y; \
+ asm ("" : "+g" (z)); \
+ if (z != zv) \
+ __builtin_abort (); \
+ } while (0)
+ MUL_WITH_CHECK (0x1555555555555556LL, 6LL, -0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (-0x1555555555555556LL, -6LL, -0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (0x1555555555555556LL, -6LL, 0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (-0x1555555555555556LL, 6LL, 0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (0x81234568LL, 0xfdbe971fLL, -0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (-0x81234568LL, -0xfdbe971fLL, -0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (0x81234568LL, -0xfdbe971fLL, 0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (-0x81234568LL, 0xfdbe971fLL, 0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (0x1555555555555555LL, 7LL, -0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (-0x1555555555555555LL, -7LL, -0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (0x1555555555555555LL, -7LL, 0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (-0x1555555555555555LL, 7LL, 0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (0x81234567LL, 0xfdbe9720LL, -0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (-0x81234567LL, -0xfdbe9720LL, -0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (0x81234567LL, -0xfdbe9720LL, 0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (-0x81234567LL, 0xfdbe9720LL, 0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (6LL, 0x1555555555555556LL, -0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (-6LL, -0x1555555555555556LL, -0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (-6LL, 0x1555555555555556LL, 0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (6LL, -0x1555555555555556LL, 0x7ffffffffffffffcLL);
+ MUL_WITH_CHECK (0xfdbe971fLL, 0x81234568LL, -0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (-0xfdbe971fLL, -0x81234568LL, -0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (-0xfdbe971fLL, 0x81234568LL, 0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (0xfdbe971fLL, -0x81234568LL, 0x7fffffff439a4068LL);
+ MUL_WITH_CHECK (7LL, 0x1555555555555555LL, -0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (-7LL, -0x1555555555555555LL, -0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (-7LL, 0x1555555555555555LL, 0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (7LL, -0x1555555555555555LL, 0x6aaaaaaaaaaaaaadLL);
+ MUL_WITH_CHECK (0xfdbe9720LL, 0x81234567LL, -0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (-0xfdbe9720LL, -0x81234567LL, -0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (-0xfdbe9720LL, 0x81234567LL, 0x7fffffffc0359220LL);
+ MUL_WITH_CHECK (0xfdbe9720LL, -0x81234567LL, 0x7fffffffc0359220LL);
+ return 0;
+}
+
+/* { dg-output "overflow-mul-4.c:20:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* 6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:21:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* -6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:22:\[^\n\r]*signed integer overflow: 1537228672809129302 \\* -6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:23:\[^\n\r]*signed integer overflow: -1537228672809129302 \\* 6 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:24:\[^\n\r]*signed integer overflow: 2166572392 \\* 4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:25:\[^\n\r]*signed integer overflow: -2166572392 \\* -4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:26:\[^\n\r]*signed integer overflow: 2166572392 \\* -4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:27:\[^\n\r]*signed integer overflow: -2166572392 \\* 4257126175 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:28:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* 7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:29:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* -7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:30:\[^\n\r]*signed integer overflow: 1537228672809129301 \\* -7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:31:\[^\n\r]*signed integer overflow: -1537228672809129301 \\* 7 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:32:\[^\n\r]*signed integer overflow: 2166572391 \\* 4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:33:\[^\n\r]*signed integer overflow: -2166572391 \\* -4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:34:\[^\n\r]*signed integer overflow: 2166572391 \\* -4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:35:\[^\n\r]*signed integer overflow: -2166572391 \\* 4257126176 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:36:\[^\n\r]*signed integer overflow: 6 \\* 1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:37:\[^\n\r]*signed integer overflow: -6 \\* -1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:38:\[^\n\r]*signed integer overflow: -6 \\* 1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:39:\[^\n\r]*signed integer overflow: 6 \\* -1537228672809129302 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:40:\[^\n\r]*signed integer overflow: 4257126175 \\* 2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:41:\[^\n\r]*signed integer overflow: -4257126175 \\* -2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:42:\[^\n\r]*signed integer overflow: -4257126175 \\* 2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:43:\[^\n\r]*signed integer overflow: 4257126175 \\* -2166572392 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:44:\[^\n\r]*signed integer overflow: 7 \\* 1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:45:\[^\n\r]*signed integer overflow: -7 \\* -1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:46:\[^\n\r]*signed integer overflow: -7 \\* 1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:47:\[^\n\r]*signed integer overflow: 7 \\* -1537228672809129301 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:48:\[^\n\r]*signed integer overflow: 4257126176 \\* 2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:49:\[^\n\r]*signed integer overflow: -4257126176 \\* -2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:50:\[^\n\r]*signed integer overflow: -4257126176 \\* 2166572391 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*overflow-mul-4.c:51:\[^\n\r]*signed integer overflow: 4257126176 \\* -2166572391 cannot be represented in type 'long long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c
new file mode 100644
index 0000000000..85f81d8b54
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-1.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#define INT_MIN (-__INT_MAX__ - 1)
+#define LONG_MIN (-__LONG_MAX__ - 1L)
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL)
+
+int
+main (void)
+{
+ int e = 1, f = -1;
+ volatile int i = INT_MIN;
+ volatile int i2 = i & (((((((-i) + 1) - 1) + 1) - 1) + 1) - 1);
+ i2 = -(i + e + f);
+ i = -i;
+
+ volatile long int li = LONG_MIN;
+ volatile long int li2 = li & (((((((-li) + 1) - 1) + 1) - 1) + 1) - 1);
+ li2 = -(li + e + f);
+ li = -li;
+
+ volatile long long int lli = LLONG_MIN;
+ volatile long long int lli2 = lli & (((((((-lli) + 1) - 1) + 1) - 1) + 1) - 1);
+ lli2 = -(lli + e + f);
+ lli = -lli;
+
+ return 0;
+}
+
+/* { dg-output "negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -2147483648 cannot be represented in type 'int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -\[^\n\r]* cannot be represented in type 'long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*negation of -9223372036854775808 cannot be represented in type 'long long int'; cast to an unsigned type to negate this value to itself" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-negate-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-2.c
new file mode 100644
index 0000000000..6a4f288bbe
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-negate-2.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#include <stdio.h>
+
+#define SCHAR_MIN (-__SCHAR_MAX__ - 1)
+#define SHRT_MIN (-__SHRT_MAX__ - 1)
+#define INT_MIN (-__INT_MAX__ - 1)
+#define LONG_MIN (-__LONG_MAX__ - 1L)
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1LL)
+
+#define CHECK(A, B) ({ if ((A) != (B)) __builtin_abort (); })
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ volatile signed char c = -SCHAR_MIN;
+ CHECK (c, -128);
+
+ volatile short s = -SHRT_MIN;
+ CHECK (s, -32768);
+
+ volatile int i = INT_MIN;
+ i = -(unsigned) i;
+ CHECK (i, -0x80000000);
+
+ volatile long int li = LONG_MIN;
+ li = -(unsigned long) li;
+#if __LONG_MAX__ == 2147483647L
+ CHECK (li, -0x80000000L);
+#elif __LONG_MAX__ == 9223372036854775807L
+ CHECK (li, -0x8000000000000000L);
+#endif
+
+ volatile long long lli = LLONG_MIN;
+ lli = -(unsigned long long) lli;
+ CHECK (lli, -0x8000000000000000L);
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-sub-1.c b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-1.c
new file mode 100644
index 0000000000..15f04455e6
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-1.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#include <stdio.h>
+
+#define SCHAR_MAX __SCHAR_MAX__
+#define SCHAR_MIN (-__SCHAR_MAX__ - 1)
+#define SHRT_MAX __SHRT_MAX__
+#define SHRT_MIN (-__SHRT_MAX__ - 1)
+#define INT_MAX __INT_MAX__
+#define INT_MIN (-__INT_MAX__ - 1)
+
+void __attribute__((noinline,noclone))
+check (int i, int j)
+{
+ if (i != j)
+ __builtin_abort ();
+}
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+#if __INT_MAX__ == 2147483647
+ /* Here, nothing should fail. */
+ volatile int i = -1;
+ volatile int j = INT_MIN;
+ volatile int k = j - i;
+ check (k, -2147483647);
+ k = i - j;
+ check (k, 2147483647);
+ j++;
+ check (j, -2147483647);
+
+ i = 1;
+ j = INT_MAX;
+ k = i - j;
+ check (k, -2147483646);
+ k = j - i;
+ check (k, 2147483646);
+ j--;
+ check (k, 2147483646);
+#endif
+
+ /* Test integer promotion. */
+#if __SCHAR_MAX__ == 127
+ volatile signed char a = SCHAR_MIN;
+ volatile signed char b = 1;
+ volatile signed char c = a - b;
+ check (c, 127);
+ a--;
+ check (a, 127);
+#endif
+
+#if __SHRT_MAX__ == 32767
+ volatile short d = SHRT_MIN;
+ volatile short e = 1;
+ volatile short f = d - e;
+ check (f, 32767);
+ d--;
+ check (d, 32767);
+#endif
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c
new file mode 100644
index 0000000000..6476b65d2a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/overflow-sub-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow -Wno-unused-variable" } */
+
+#define INT_MAX __INT_MAX__
+#define INT_MIN (-__INT_MAX__ - 1)
+#define LONG_MAX __LONG_MAX__
+#define LONG_MIN (-__LONG_MAX__ - 1L)
+#define LLONG_MAX __LONG_LONG_MAX__
+#define LLONG_MIN (-__LONG_LONG_MAX__ - 1L)
+
+int
+main (void)
+{
+ volatile int j = INT_MIN;
+ volatile int i = 1;
+ volatile int k = j - i;
+ j--;
+ j = INT_MIN + 100;
+ j -= (1 << 10);
+
+ j = INT_MIN;
+ i = -1;
+ k = j - -i;
+
+ i = INT_MIN + 1000;
+ i -= (1 << 20);
+
+ volatile long int l = LONG_MIN;
+ volatile long int m = 1;
+ volatile long int n = l - m;
+ l--;
+ l = LONG_MIN + 100;
+ l -= (1 << 10);
+
+ l = LONG_MIN;
+ m = -1;
+ n = l - -m;
+
+ m = LONG_MIN + 1000;
+ m -= (1 << 20);
+
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: -2147483648 - 1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483548 \\+ -1024 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147483648 \\+ -1 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -2147482648 \\+ -1048576 cannot be represented in type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* - 1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1024 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1 cannot be represented in type 'long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: -\[^\n\r]* \\+ -1048576 cannot be represented in type 'long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr58443-1.c b/gcc/testsuite/c-c++-common/ubsan/pr58443-1.c
new file mode 100644
index 0000000000..76f1dda07a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr58443-1.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/58443 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift,unreachable -w" } */
+
+int
+foo (int u, int o)
+{
+ return u / o;
+}
+
+/* { dg-final { scan-assembler-not "__ubsan_handle_divrem_overflow" } } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr58443-2.c b/gcc/testsuite/c-c++-common/ubsan/pr58443-2.c
new file mode 100644
index 0000000000..a135758a86
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr58443-2.c
@@ -0,0 +1,11 @@
+/* PR sanitizer/58443 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=unreachable,integer-divide-by-zero -w" } */
+
+int
+foo (int u, int o)
+{
+ return u >> o;
+}
+
+/* { dg-final { scan-assembler-not "__ubsan_handle_shift_out_of_bounds" } } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr58443-3.c b/gcc/testsuite/c-c++-common/ubsan/pr58443-3.c
new file mode 100644
index 0000000000..5696a62dff
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr58443-3.c
@@ -0,0 +1,18 @@
+/* PR sanitizer/58443 */
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=undefined -w" } */
+
+int
+foo (int u, int o)
+{
+ return u >> o;
+}
+
+int
+bar (int u, int o)
+{
+ return u / o;
+}
+
+/* { dg-final { scan-assembler "__ubsan_handle_divrem_overflow" } } */
+/* { dg-final { scan-assembler "__ubsan_handle_shift_out_of_bounds" } } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59333.c b/gcc/testsuite/c-c++-common/ubsan/pr59333.c
new file mode 100644
index 0000000000..b68775702b
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59333.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+
+long long int __attribute__ ((noinline, noclone))
+foo (long long int i, long long int j)
+{
+ asm ("");
+ return i + j;
+}
+
+int
+main (void)
+{
+ foo (2LL, __LONG_LONG_MAX__);
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: 2 \\+ 9223372036854775807 cannot be represented in type 'long long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59397.c b/gcc/testsuite/c-c++-common/ubsan/pr59397.c
new file mode 100644
index 0000000000..0de0258351
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59397.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+typedef enum E { A = -1 } e;
+int
+foo (void)
+{
+ e e = A;
+ return e + 1;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59503.c b/gcc/testsuite/c-c++-common/ubsan/pr59503.c
new file mode 100644
index 0000000000..1637f01b5a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59503.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=signed-integer-overflow" } */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ long long int a = 14;
+ long int b = 9;
+ asm volatile ("" : "+r" (a), "+r" (b));
+ if ((a - b) != 5)
+ __builtin_abort ();
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr59667.c b/gcc/testsuite/c-c++-common/ubsan/pr59667.c
new file mode 100644
index 0000000000..7fad702990
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr59667.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ unsigned int len = 1;
+ float (*P)[len][len] = 0;
+ (*P)[0][0] = 1;
+ return 0;
+}
+
+/* { dg-output "store to null pointer of type 'float'(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr60613-1.c b/gcc/testsuite/c-c++-common/ubsan/pr60613-1.c
new file mode 100644
index 0000000000..6794532a48
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr60613-1.c
@@ -0,0 +1,41 @@
+/* PR sanitizer/60613 */
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+
+#include <stdio.h>
+
+long long y;
+
+__attribute__((noinline, noclone)) long long
+foo (long long x)
+{
+ asm ("");
+ if (x >= 0 || x < -2040)
+ return 23;
+ x += 2040;
+ return x - y;
+}
+
+__attribute__((noinline, noclone)) long long
+bar (long long x)
+{
+ asm ("");
+ return 8LL - x;
+}
+
+int
+main ()
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ y = 1;
+ if (foo (8 - 2040) != 8 - 1)
+ __builtin_abort ();
+ if (bar (1) != 8 - 1)
+ __builtin_abort ();
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c b/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c
new file mode 100644
index 0000000000..92c2de81eb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr60613-2.c
@@ -0,0 +1,36 @@
+/* PR sanitizer/60613 */
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+
+long long y;
+
+__attribute__((noinline, noclone)) long long
+foo (long long x)
+{
+ asm ("");
+ if (x >= 0 || x < -2040)
+ return 23;
+ x += 2040;
+ return x - y;
+}
+
+__attribute__((noinline, noclone)) long long
+bar (long long x)
+{
+ asm ("");
+ return 8LL - x;
+}
+
+int
+main ()
+{
+ y = -__LONG_LONG_MAX__ + 6;
+ if (foo (8 - 2040) != -__LONG_LONG_MAX__)
+ __builtin_abort ();
+ if (bar (-__LONG_LONG_MAX__ + 5) != -__LONG_LONG_MAX__ + 1)
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-output "signed integer overflow: 8 \\- -9223372036854775801 cannot be represented in type 'long long int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*signed integer overflow: 8 \\- -9223372036854775802 cannot be represented in type 'long long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/pr60636.c b/gcc/testsuite/c-c++-common/ubsan/pr60636.c
new file mode 100644
index 0000000000..4164341375
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/pr60636.c
@@ -0,0 +1,15 @@
+/* PR sanitizer/60636 */
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+
+volatile long long int a;
+
+int
+main ()
+{
+ long long int u = -__LONG_LONG_MAX__ - 1;
+ a = u > 0 ? u : -u;
+ return 0;
+}
+
+/* { dg-output "negation of -9223372036854775808 cannot be represented in type 'long long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/save-expr-1.c b/gcc/testsuite/c-c++-common/ubsan/save-expr-1.c
new file mode 100644
index 0000000000..19b1eb08bd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/save-expr-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
+
+#include <stdio.h>
+
+static int x;
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ int o = 1;
+ int y = x << o;
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return y;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/save-expr-2.c b/gcc/testsuite/c-c++-common/ubsan/save-expr-2.c
new file mode 100644
index 0000000000..14ac17def9
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/save-expr-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
+
+int
+foo (int i, unsigned int u)
+{
+ return u / i;
+}
+
+int
+bar (int i, unsigned int u)
+{
+ return u % i;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/save-expr-3.c b/gcc/testsuite/c-c++-common/ubsan/save-expr-3.c
new file mode 100644
index 0000000000..dd2903bd68
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/save-expr-3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
+
+int x;
+
+int
+foo (int i, int u)
+{
+ return (i << u) << x;
+}
+
+int
+bar (int i, int u)
+{
+ return (i >> u) >> x;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/save-expr-4.c b/gcc/testsuite/c-c++-common/ubsan/save-expr-4.c
new file mode 100644
index 0000000000..aa34a70ede
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/save-expr-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -Wall -Werror -O" } */
+
+int x;
+
+int
+foo (int i, unsigned int u)
+{
+ return (i % u) << (x / u);
+}
+
+int
+bar (int i, unsigned int u)
+{
+ return (((x % u) << (u / i)) >> x);
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-1.c b/gcc/testsuite/c-c++-common/ubsan/shift-1.c
new file mode 100644
index 0000000000..d2538802aa
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-1.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+typedef const unsigned long long int CULLI;
+typedef volatile int VI;
+struct s { signed long int a; };
+
+int
+main (void)
+{
+ int a = 1;
+ struct s s = { .a = 400 };
+ CULLI culli = 42;
+ VI vi = 370;
+ volatile int shiftcount = 153;
+
+ a <<= 152;
+ 1 << shiftcount;
+ 1 << 154;
+ culli << 524;
+ 1 << vi++;
+ (long) 1 << (s.a + 2);
+
+ return 0;
+}
+/* { dg-output "shift exponent 152 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 153 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 154 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 524 is too large for \[^\n\r]*-bit type 'long long unsigned int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 370 is too large for \[^\n\r]*-bit type 'int'(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent 402 is too large for \[^\n\r]*-bit type 'long int'" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-2.c b/gcc/testsuite/c-c++-common/ubsan/shift-2.c
new file mode 100644
index 0000000000..aaaeb6fcc0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-2.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+int
+main (void)
+{
+ int a = 1;
+ volatile int b = -5;
+ long long int c = -6;
+
+ a << -3;
+ 1 << -4;
+ 1 << b;
+ a << c;
+ a << (b + c);
+
+ return 0;
+}
+/* { dg-output "shift exponent -3 is negative(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -4 is negative(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -5 is negative(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -6 is negative(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*shift exponent -11 is negative" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-3.c b/gcc/testsuite/c-c++-common/ubsan/shift-3.c
new file mode 100644
index 0000000000..65ee5d8821
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-3.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ unsigned int a = 1;
+ a <<= 31;
+ a <<= 1;
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-4.c b/gcc/testsuite/c-c++-common/ubsan/shift-4.c
new file mode 100644
index 0000000000..5f095b61ac
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-4.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+struct S { unsigned long long int b:40; } s;
+
+int
+main ()
+{
+ s.b = 2;
+ s.b <<= 120;
+ return 0;
+}
+
+/* { dg-output "shift exponent 120 is too large\[^\n\r]*" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-5.c b/gcc/testsuite/c-c++-common/ubsan/shift-5.c
new file mode 100644
index 0000000000..6f9c52a728
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-5.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=shift -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int x;
+int
+foo (void)
+{
+ /* None of the following should pass. */
+ switch (x)
+ {
+ case 1 >> -1:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 12 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 12 } */
+ case -1 >> -1:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 15 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 15 } */
+ case 1 << -1:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 18 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 18 } */
+ case -1 << -1:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 21 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 21 } */
+ case -1 >> 200:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 24 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 24 } */
+ case 1 << 200:
+/* { dg-error "case label does not reduce to an integer constant" "" {target c } 27 } */
+/* { dg-error "is not a constant expression" "" { target c++ } 27 } */
+ return 1;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/shift-6.c b/gcc/testsuite/c-c++-common/ubsan/shift-6.c
new file mode 100644
index 0000000000..d88a42910a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/shift-6.c
@@ -0,0 +1,38 @@
+/* PR sanitizer/58413 */
+/* { dg-do run { target int32plus } } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+#include <stdio.h>
+
+int x = 7;
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ /* All of the following should pass. */
+ int A[128 >> 5] = {};
+ int B[128 << 5] = {};
+
+ static int e =
+ ((int)
+ (0x00000000 | ((31 & ((1 << (4)) - 1)) << (((15) + 6) + 4)) |
+ ((0) << ((15) + 6)) | ((0) << (15))));
+
+ if (e != 503316480)
+ __builtin_abort ();
+
+ switch (x)
+ {
+ case 1 >> 4:
+ case 1 << 4:
+ case 128 << (4 + 1):
+ case 128 >> (4 + 1):
+ return 1;
+ }
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/typedef-1.c b/gcc/testsuite/c-c++-common/ubsan/typedef-1.c
new file mode 100644
index 0000000000..8dcf451c34
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/typedef-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=undefined" } */
+
+typedef int V;
+int
+foo (void)
+{
+ V v = 9;
+ int a = 3;
+ v += v % a;
+ return v / 3;
+}
diff --git a/gcc/testsuite/c-c++-common/ubsan/undefined-1.c b/gcc/testsuite/c-c++-common/ubsan/undefined-1.c
new file mode 100644
index 0000000000..d1b9ce7877
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/undefined-1.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=undefined" } */
+
+#include <stdio.h>
+
+int
+foo (int x, int y)
+{
+ const int z = 2;
+ if (z & 1)
+ return x << y;
+ return 0;
+}
+
+int
+bar (int x, int y)
+{
+ return x + y;
+}
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ foo (3, 2);
+ bar (12, 42);
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/unreachable-1.c b/gcc/testsuite/c-c++-common/ubsan/unreachable-1.c
new file mode 100644
index 0000000000..336240c96c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/unreachable-1.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=unreachable" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ __builtin_unreachable ();
+}
+ /* { dg-output "execution reached a __builtin_unreachable\\(\\) call" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/vla-1.c b/gcc/testsuite/c-c++-common/ubsan/vla-1.c
new file mode 100644
index 0000000000..0fecfa2a3d
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/vla-1.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
+
+typedef long int V;
+int x = -1;
+double di = -3.2;
+V v = -6;
+
+static int __attribute__ ((noinline, noclone))
+bar (void)
+{
+ return -4;
+}
+
+static void __attribute__ ((noinline, noclone))
+fn1 (void)
+{
+ int a[x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn2 (void)
+{
+ int a[x][x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn3 (void)
+{
+ int a[x][x][x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn4 (void)
+{
+ int b[x - 4];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn5 (void)
+{
+ int c[(int) di];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn6 (void)
+{
+ int d[1 + x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn7 (void)
+{
+ int e[1 ? x : -1];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn8 (void)
+{
+ int f[++x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn9 (void)
+{
+ int g[(signed char) --x];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn10 (void)
+{
+ int h[(++x, --x, x)];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn11 (void)
+{
+ int i[v];
+}
+
+static void __attribute__ ((noinline, noclone))
+fn12 (void)
+{
+ int j[bar ()];
+}
+
+int
+main (void)
+{
+ fn1 ();
+ fn2 ();
+ fn3 ();
+ fn4 ();
+ fn5 ();
+ fn6 ();
+ fn7 ();
+ fn8 ();
+ fn9 ();
+ fn10 ();
+ fn11 ();
+ fn12 ();
+ return 0;
+}
+
+/* { dg-output "variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -5(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -3(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value 0(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -1(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -6(\n|\r\n|\r)" } */
+/* { dg-output "\[^\n\r]*variable length array bound evaluates to non-positive value -4" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/vla-2.c b/gcc/testsuite/c-c++-common/ubsan/vla-2.c
new file mode 100644
index 0000000000..a11e4e7227
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/vla-2.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ const int t = 0;
+ struct s {
+ int x;
+ /* Don't instrument this one. */
+ int g[t];
+ };
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/vla-3.c b/gcc/testsuite/c-c++-common/ubsan/vla-3.c
new file mode 100644
index 0000000000..7772857fde
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/vla-3.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=vla-bound" } */
+
+#include <stdio.h>
+
+/* Don't instrument the arrays here. */
+int
+foo (int n, int a[])
+{
+ return a[n - 1];
+}
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ int a[6] = { };
+ int ret = foo (3, a);
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return ret;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/ubsan/vla-4.c b/gcc/testsuite/c-c++-common/ubsan/vla-4.c
new file mode 100644
index 0000000000..8a7bbac9a7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/ubsan/vla-4.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=vla-bound" } */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ int x = 1;
+ /* Check that the size of an array is evaluated only once. */
+ int a[++x];
+ if (x != 2)
+ __builtin_abort ();
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/c-c++-common/uninit-17.c b/gcc/testsuite/c-c++-common/uninit-17.c
index 1719ae85f9..fd773da78a 100644
--- a/gcc/testsuite/c-c++-common/uninit-17.c
+++ b/gcc/testsuite/c-c++-common/uninit-17.c
@@ -11,9 +11,9 @@ static void bar(int a, int *ptr)
{
int b; /* { dg-message "declared" } */
if (b < 40) {
- ptr[0] = b;
+ ptr[0] = b; /* { dg-warning "may be used uninitialized" } */
}
- b += 1; /* { dg-warning "may be used uninitialized" } */
+ b += 1;
ptr++;
}
while (--a != 0);
diff --git a/gcc/testsuite/gcc.dg/vector-1.c b/gcc/testsuite/c-c++-common/vector-1.c
index 288dd1e924..288dd1e924 100644
--- a/gcc/testsuite/gcc.dg/vector-1.c
+++ b/gcc/testsuite/c-c++-common/vector-1.c
diff --git a/gcc/testsuite/c-c++-common/vector-2.c b/gcc/testsuite/c-c++-common/vector-2.c
new file mode 100644
index 0000000000..e9f40a3589
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+/* Check for application of |, ^, and & on vector types. */
+#define vector __attribute__((vector_size(16) ))
+
+vector float a;
+vector int a1;
+vector float b;
+vector int b1;
+
+int f(void)
+{
+ a = a | b; /* { dg-error "" } */
+ a = a & b; /* { dg-error "" } */
+ a = a ^ b; /* { dg-error "" } */
+ a1 = a1 | b1;
+ a1 = a1 & b1;
+ a1 = a1 ^ b1;
+}
diff --git a/gcc/testsuite/c-c++-common/vector-3.c b/gcc/testsuite/c-c++-common/vector-3.c
new file mode 100644
index 0000000000..0f5d3c4115
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-3.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+/* Check that we error out when using vector_size on the bool type. */
+
+#ifdef __cplusplus
+#define _Bool bool
+#endif
+__attribute__((vector_size(16) )) _Bool a; /* { dg-error "" } */
diff --git a/gcc/testsuite/gcc.dg/vector-4.c b/gcc/testsuite/c-c++-common/vector-4.c
index cc4d5041f6..cc4d5041f6 100644
--- a/gcc/testsuite/gcc.dg/vector-4.c
+++ b/gcc/testsuite/c-c++-common/vector-4.c
diff --git a/gcc/testsuite/c-c++-common/vector-compare-1.c b/gcc/testsuite/c-c++-common/vector-compare-1.c
new file mode 100644
index 0000000000..8416c8df56
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-compare-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+/* { dg-prune-output "operand types are" } */
+/* Ignore warning on some powerpc-ibm-aix configurations. */
+/* { dg-prune-output "non-standard ABI extension" } */
+
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+void
+foo (vector (4, int) x, vector (4, float) y)
+{
+ vector (4, int) p4;
+ vector (4, int) r4;
+ vector (4, unsigned int) q4;
+ vector (8, int) r8;
+ vector (4, float) f4;
+
+ r4 = x > y; /* { dg-error "comparing vectors with different element types" } */
+ r8 = (x != p4); /* { dg-error "incompatible types when assigning to type|cannot convert" } */
+ r8 == r4; /* { dg-error "comparing vectors with different number of elements" } */
+}
diff --git a/gcc/testsuite/c-c++-common/vector-compare-2.c b/gcc/testsuite/c-c++-common/vector-compare-2.c
new file mode 100644
index 0000000000..5ebe9e3ca5
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-compare-2.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
+/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+/* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
+/* Ignore warning on some powerpc-ibm-aix configurations. */
+/* { dg-prune-output "non-standard ABI extension" } */
+
+/* Test if C_MAYBE_CONST are folded correctly when
+ creating VEC_COND_EXPR. */
+
+typedef int vec __attribute__((vector_size(16)));
+
+vec i,j;
+extern vec a, b, c;
+
+extern int p, q, z;
+extern vec foo (int);
+
+vec
+foo (int x)
+{
+ return foo (p ? q :z) > a;
+}
+
+vec
+bar (int x)
+{
+ return b > foo (p ? q :z);
+}
+
+
diff --git a/gcc/testsuite/c-c++-common/vector-compare-3.c b/gcc/testsuite/c-c++-common/vector-compare-3.c
new file mode 100644
index 0000000000..d6b0dac7cb
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-compare-3.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef int v4i __attribute__((vector_size(4*sizeof(int))));
+
+// fold should not turn (vec_other)(x<y) into (x<y)?vec_other(-1):vec_other(0).
+
+void use (v4i const *z);
+
+void
+f (v4i *x, v4i *y)
+{
+ v4i const zz = *x < *y;
+ use (&zz);
+}
+
+// Optimizations shouldn't introduce a boolean type in there
+
+void
+g (v4i *x, v4i const *y, v4i *z, v4i *t)
+{
+ *z = *x < *y | *x == *y;
+ *t = *x < *y & *x > *y;
+}
+
diff --git a/gcc/testsuite/gcc.dg/vector-init-1.c b/gcc/testsuite/c-c++-common/vector-init-1.c
index 5baf956884..5baf956884 100644
--- a/gcc/testsuite/gcc.dg/vector-init-1.c
+++ b/gcc/testsuite/c-c++-common/vector-init-1.c
diff --git a/gcc/testsuite/gcc.dg/vector-init-2.c b/gcc/testsuite/c-c++-common/vector-init-2.c
index 6527f495d8..6527f495d8 100644
--- a/gcc/testsuite/gcc.dg/vector-init-2.c
+++ b/gcc/testsuite/c-c++-common/vector-init-2.c
diff --git a/gcc/testsuite/c-c++-common/vector-scalar-2.c b/gcc/testsuite/c-c++-common/vector-scalar-2.c
new file mode 100644
index 0000000000..f624c4c751
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-scalar-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-gimple" } */
+
+typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
+
+int c;
+
+void f (veci *a)
+{
+ *a = *a + ++c;
+}
+
+/* { dg-final { scan-tree-dump-times " \\\+ 1" 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/c-c++-common/vector-scalar.c b/gcc/testsuite/c-c++-common/vector-scalar.c
new file mode 100644
index 0000000000..1b32cc67bd
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-scalar.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+typedef float vecf __attribute__ ((vector_size (4 * sizeof (float))));
+typedef short veci __attribute__ ((vector_size (8 * sizeof (short))));
+
+void f (vecf *d, veci *i)
+{
+ (void) ((*d *= 2) < 0);
+ (void) ((((*i - 1) >> 2) != 0) | *i);
+}
diff --git a/gcc/testsuite/c-c++-common/vector-shift.c b/gcc/testsuite/c-c++-common/vector-shift.c
new file mode 100644
index 0000000000..593bb36694
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-shift.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-prune-output "in evaluation of" } */
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+int main (int argc, char *argv[]) {
+ vector(4,char) vchar = {1,2,3,4};
+ vector(4, int) vint = {1,1,1,1};
+
+ vint <<= vchar; /* { dg-error "nvalid operands to binary <<" } */
+ vchar >>= vint; /* { dg-error "nvalid operands to binary >>" } */
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/vector-shift1.c b/gcc/testsuite/c-c++-common/vector-shift1.c
new file mode 100644
index 0000000000..db8035667a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-shift1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-prune-output "in evaluation of" } */
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+int main (int argc, char *argv[]) {
+ vector(4, float) vfloat0 = {1., 2., 3., 4.};
+ vector(4, float) vfloat1 = {1., 2., 3., 4.};
+
+ vector(4, int) vint = {1, 1, 1, 1 };
+
+ vint <<= vfloat0; /* { dg-error "nvalid operands to binary <<" } */
+ vfloat0 >>= vint; /* { dg-error "nvalid operands to binary >>" } */
+
+ vfloat0 <<= vfloat1; /* { dg-error "nvalid operands" } */
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/vector-shift3.c b/gcc/testsuite/c-c++-common/vector-shift3.c
new file mode 100644
index 0000000000..c26fb8d98c
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-shift3.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+#define vector(elcount, type) \
+__attribute__((vector_size((elcount)*sizeof(type)))) type
+
+
+int main (int argc, char *argv[]) {
+ vector(8, short) v0 = {(short)argc,2,3,4,5,6,7};
+ short sc;
+
+
+ scalar1 <<= v0; /* { dg-error "scalar1.*(undeclared|was not declared)" } */
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/c-c++-common/vector-subscript-1.c b/gcc/testsuite/c-c++-common/vector-subscript-1.c
new file mode 100644
index 0000000000..c18b7b674a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-subscript-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+#define vector __attribute__((vector_size(16) ))
+/* Check that vector[index] works and index[vector] is rejected. */
+
+float vf(vector float a)
+{
+ return 0[a]; /* { dg-error "subscripted value is neither array nor pointer nor vector|invalid types .* for array subscript" } */
+}
+
+
+float fv(vector float a)
+{
+ return a[0];
+}
diff --git a/gcc/testsuite/c-c++-common/vector-subscript-2.c b/gcc/testsuite/c-c++-common/vector-subscript-2.c
new file mode 100644
index 0000000000..84d55b91d2
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-subscript-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+/* Check that subscripting of vectors work with register storage class decls. */
+
+#define vector __attribute__((vector_size(16) ))
+
+
+float vf(int i)
+{
+ register vector float a;
+ return a[0];
+}
diff --git a/gcc/testsuite/c-c++-common/vector-subscript-3.c b/gcc/testsuite/c-c++-common/vector-subscript-3.c
new file mode 100644
index 0000000000..22cd089ade
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/vector-subscript-3.c
@@ -0,0 +1,18 @@
+/* Check the case when index is out of bound */
+/* { dg-do compile } */
+/* { dg-options "-Warray-bounds" } */
+
+#define vector __attribute__((vector_size(16) ))
+
+
+int test0(void)
+{
+ vector int a;
+ return a[10]; /* { dg-warning "index value is out of bound" } */
+}
+
+int test1(void)
+{
+ vector int a;
+ return a[-1]; /* { dg-warning "index value is out of bound" } */
+}
diff --git a/gcc/testsuite/c-c++-common/warn-ommitted-condop.c b/gcc/testsuite/c-c++-common/warn-ommitted-condop.c
index de92b8f2cd..0726f04391 100644
--- a/gcc/testsuite/c-c++-common/warn-ommitted-condop.c
+++ b/gcc/testsuite/c-c++-common/warn-ommitted-condop.c
@@ -1,4 +1,4 @@
-/* { dg-options "-Wparentheses" } */
+/* { dg-options "-Wparentheses -ftrack-macro-expansion=0" } */
extern void f2 (int);
diff --git a/gcc/testsuite/config/default.exp b/gcc/testsuite/config/default.exp
index 7e8b785611..651993d7fe 100644
--- a/gcc/testsuite/config/default.exp
+++ b/gcc/testsuite/config/default.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/README b/gcc/testsuite/g++.dg/README
index fe308a5421..998f8ece6b 100644
--- a/gcc/testsuite/g++.dg/README
+++ b/gcc/testsuite/g++.dg/README
@@ -33,7 +33,7 @@ special Tests that need custom expect code to run them; see special/ecos.exp
for an example.
-Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+Copyright (C) 2001-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/g++.dg/abi/aarch64_guard1.C b/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
new file mode 100644
index 0000000000..ca1778b873
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/aarch64_guard1.C
@@ -0,0 +1,17 @@
+// Check that the initialization guard variable is an 8-byte aligned,
+// 8-byte doubleword and that only the least significant bit is used
+// for initialization guard variables.
+// { dg-do compile { target aarch64*-*-* } }
+// { dg-options "-O -fdump-tree-original -fno-section-anchors" }
+
+int bar();
+
+int *foo ()
+{
+ static int x = bar ();
+ return &x;
+}
+
+// { dg-final { scan-assembler _ZGVZ3foovE1x,8,8 } }
+// { dg-final { scan-tree-dump "_ZGVZ3foovE1x & 1" "original" } }
+// { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag1.C b/gcc/testsuite/g++.dg/abi/abi-tag1.C
new file mode 100644
index 0000000000..942929cdd3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag1.C
@@ -0,0 +1,19 @@
+// { dg-options "-Wabi-tag" }
+
+// { dg-final { scan-assembler "_Z1fB3barB3fooi" } }
+void f(int) __attribute ((abi_tag ("foo","bar")));
+
+struct __attribute ((abi_tag ("bar"))) A { };
+
+struct B: A { }; // { dg-warning "bar. abi tag" }
+struct D { A* ap; }; // { dg-warning "bar. abi tag" }
+
+// { dg-final { scan-assembler "_Z1gB3baz1AB3bar" } }
+void g(A) __attribute ((abi_tag ("baz")));
+void g(A) __attribute ((abi_tag ("baz")));
+
+int main()
+{
+ f(42);
+ g(A());
+}
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag2.C b/gcc/testsuite/g++.dg/abi/abi-tag2.C
new file mode 100644
index 0000000000..0e92dcc1dc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag2.C
@@ -0,0 +1,5 @@
+void f(int);
+void f(int) __attribute ((abi_tag ("foo"))); // { dg-error "adds abi tag" }
+
+struct C;
+struct __attribute ((abi_tag ("foo"))) C; // { dg-error "adds abi tag" }
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag3.C b/gcc/testsuite/g++.dg/abi/abi-tag3.C
new file mode 100644
index 0000000000..13cb3c2f2e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag3.C
@@ -0,0 +1,35 @@
+// An explicit specialization gets the tag from its template.
+
+// { dg-final { scan-assembler "_ZN3FooB5cxx11IcE1fEv" } }
+template<typename T>
+struct __attribute ((abi_tag("cxx11"))) Foo
+{
+ int f();
+};
+
+// { dg-final { scan-assembler "_ZN3FooB5cxx11IiE1fEv" } }
+template<>
+struct
+__attribute ((abi_tag("cxx11")))
+Foo<int> // { dg-warning "attribute" }
+{
+ int f();
+};
+
+// { dg-final { scan-assembler "_ZN3FooB5cxx11IdE1fEv" } }
+template<>
+struct
+Foo<double>
+{
+ int f();
+};
+
+int main()
+{
+ Foo<int> f;
+ f.f();
+ Foo<char> f1;
+ f1.f();
+ Foo<double> f2;
+ f2.f();
+}
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag4.C b/gcc/testsuite/g++.dg/abi/abi-tag4.C
new file mode 100644
index 0000000000..3f8d7bfbc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag4.C
@@ -0,0 +1,8 @@
+// { dg-options "-Wabi-tag" }
+
+struct __attribute ((abi_tag ("X"))) A { };
+
+struct B // { dg-warning "abi tag" }
+{
+ virtual void f(A); // { dg-message "declared here" }
+};
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag5.C b/gcc/testsuite/g++.dg/abi/abi-tag5.C
new file mode 100644
index 0000000000..95e367ef93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag5.C
@@ -0,0 +1,7 @@
+// { dg-options -Wabi-tag }
+// { dg-final { scan-assembler "_Z1f1BI1AB3fooE" } }
+
+struct __attribute__ ((abi_tag ("foo"))) A { };
+template <class T> struct B: T { };
+
+void f(B<A>) {}
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag6.C b/gcc/testsuite/g++.dg/abi/abi-tag6.C
new file mode 100644
index 0000000000..94ea2f37b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag6.C
@@ -0,0 +1,25 @@
+// PR c++/60642
+
+struct __attribute((abi_tag("test"))) foo
+{
+ void f();
+ virtual ~foo();
+};
+
+template<typename>
+struct __attribute((abi_tag("test"))) bar
+{
+ void f();
+ virtual ~bar();
+};
+
+int main()
+{
+ foo f;
+ f.f();
+
+ bar<int> b;
+ b.f();
+}
+
+// { dg-final { scan-assembler "_ZTV3barB4testIiE" } }
diff --git a/gcc/testsuite/g++.dg/abi/abi-tag7.C b/gcc/testsuite/g++.dg/abi/abi-tag7.C
new file mode 100644
index 0000000000..4c47725c53
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/abi-tag7.C
@@ -0,0 +1,9 @@
+// PR c++/60642
+
+template<typename T>
+class __attribute((abi_tag("foo"))) test{ };
+
+template class __attribute((abi_tag("foo"))) test<int>; // { dg-warning "attribute" }
+
+void f(test<char>*) {}
+// { dg-final { scan-assembler "_Z1fP4testB3fooIcE" } }
diff --git a/gcc/testsuite/g++.dg/abi/anon2.C b/gcc/testsuite/g++.dg/abi/anon2.C
new file mode 100644
index 0000000000..cee9237104
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/anon2.C
@@ -0,0 +1,66 @@
+// PR c++/55877
+// { dg-require-weak "" }
+
+namespace N1 {
+ typedef struct {
+ typedef enum { X, Y } A;
+ typedef struct { } B;
+ struct C {
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn1ENS0_1BE" { target c++11 } } }
+ static void fn1 (B) { }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N11D1C3fn2ES1_" { target c++11 } } }
+ static void fn2 (C) { }
+ };
+ } D;
+
+ void *p = (void *) D::C::fn1;
+ void *q = (void *) D::C::fn2;
+}
+
+namespace N2 {
+ typedef struct {
+ typedef enum { X, Y } A;
+ typedef struct { } B;
+ struct C {
+ // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn1ENS0_1BE" { target c++11 } } }
+ static void fn1 (B) { } // { dg-error "no linkage" "" { target { ! c++11 } } }
+ // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N23._31C3fn2ES1_" { target c++11 } } }
+ static void fn2 (C) { } // { dg-error "no linkage" "" { target { ! c++11 } } }
+ };
+ } const D;
+
+ void *p = (void *) D::C::fn1;
+ void *q = (void *) D::C::fn2;
+}
+
+namespace N3 {
+ typedef struct {
+ typedef enum { X, Y } A;
+ typedef struct { } B;
+ template <class T> struct C {
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn1ENS0_1BE" { target c++11 } } }
+ static void fn1 (B) { }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN2N31D1CIiE3fn2ES2_" { target c++11 } } }
+ static void fn2 (C) { }
+ };
+ } D;
+
+ void *p = (void *) D::C<int>::fn1;
+ void *q = (void *) D::C<int>::fn2;
+}
+
+namespace N4 {
+ typedef struct {
+ typedef enum { X, Y } A;
+ typedef struct { } B;
+ template <class T> struct C {
+ // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn1ENS0_1BE" { target c++11 } } }
+ static void fn1 (B) { } // { not-dg-error "no linkage" "" { target { ! c++11 } } }
+ // { dg-final { scan-assembler-not ".weak\(_definition\)?\[ \t\]_?_ZN2N43._91CIiE3fn2ES2_" { target c++11 } } }
+ static void fn2 (C) { } // { not-dg-error "no linkage" "" { target { ! c++11 } } }
+ };
+ } const D;
+
+ void *p = (void *) D::C<int>::fn1;
+ void *q = (void *) D::C<int>::fn2;
+}
diff --git a/gcc/testsuite/g++.dg/abi/anon3.C b/gcc/testsuite/g++.dg/abi/anon3.C
new file mode 100644
index 0000000000..623c7f5c6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/anon3.C
@@ -0,0 +1,19 @@
+// { dg-require-weak "" }
+
+typedef struct {
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN4Heya4blahEv" } }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZTI4Heya" } }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZTV4Heya" } }
+ virtual const char *blah() {
+ return "Heya::blah";
+ }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZN4Heya1A1fEv" } }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZTIN4Heya1AE" } }
+ // { dg-final { scan-assembler ".weak\(_definition\)?\[ \t\]_?_ZTVN4Heya1AE" } }
+ struct A {
+ virtual void f() { }
+ };
+} Heya;
+
+Heya h;
+Heya::A a;
diff --git a/gcc/testsuite/g++.dg/abi/arm_va_list.C b/gcc/testsuite/g++.dg/abi/arm_va_list.C
index 45a426a4f3..4f6f3a46da 100644
--- a/gcc/testsuite/g++.dg/abi/arm_va_list.C
+++ b/gcc/testsuite/g++.dg/abi/arm_va_list.C
@@ -1,9 +1,10 @@
-// { dg-do compile }
+// { dg-do compile { target { aarch64*-*-* arm*-*-* } } }
// { dg-options "-Wno-abi" }
-// { dg-require-effective-target arm_eabi }
+// { dg-require-effective-target arm_eabi { target arm*-*-* } }
// AAPCS \S 7.1.4 requires that va_list be a typedef for "struct
// __va_list". The mangling is as if it were "std::__va_list".
+// AAPCS64 \S 7.1.4 has the same requirement for AArch64 targets.
// #include <stdarg.h>
typedef __builtin_va_list va_list;
diff --git a/gcc/testsuite/g++.dg/abi/forced.C b/gcc/testsuite/g++.dg/abi/forced.C
index 7a9c35964f..0e6be28bd4 100644
--- a/gcc/testsuite/g++.dg/abi/forced.C
+++ b/gcc/testsuite/g++.dg/abi/forced.C
@@ -1,5 +1,4 @@
-// This test only applies to glibc (NPTL) targets.
-// { dg-do run { target *-*-linux* } }
+// { dg-do run { target *-*-linux* *-*-gnu* } }
// { dg-options "-pthread" }
#include <pthread.h>
diff --git a/gcc/testsuite/g++.dg/abi/guard2.C b/gcc/testsuite/g++.dg/abi/guard2.C
index 988fd385bf..c35fa7e1c8 100644
--- a/gcc/testsuite/g++.dg/abi/guard2.C
+++ b/gcc/testsuite/g++.dg/abi/guard2.C
@@ -1,6 +1,6 @@
// PR c++/41611
// Test that the guard gets its own COMDAT group.
-// { dg-final { scan-assembler "_ZGVZN1A1fEvE1i,comdat" { target *-*-linux* } } }
+// { dg-final { scan-assembler "_ZGVZN1A1fEvE1i,comdat" { target *-*-linux* *-*-gnu* } } }
struct A {
static int f()
diff --git a/gcc/testsuite/g++.dg/abi/main.C b/gcc/testsuite/g++.dg/abi/main.C
new file mode 100644
index 0000000000..4c5f1ea213
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/main.C
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+/* Check if entry points get implicit C linkage. If they don't, compiler will
+ * error on incompatible declarations */
+
+int main();
+extern "C" int main();
+
+#ifdef __MINGW32__
+
+int wmain();
+extern "C" int wmain();
+
+int DllMain();
+extern "C" int DllMain();
+
+int WinMain();
+extern "C" int WinMain();
+
+int wWinMain();
+extern "C" int wWinMain();
+
+#endif
+
diff --git a/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C b/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C
new file mode 100644
index 0000000000..09540e8414
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle-neon-aarch64.C
@@ -0,0 +1,55 @@
+// Test that AArch64 AdvSIMD (NEON) vector types have their names mangled
+// correctly.
+
+// { dg-do compile { target { aarch64*-*-* } } }
+
+#include <arm_neon.h>
+
+void f0 (int8x8_t a) {}
+void f1 (int16x4_t a) {}
+void f2 (int32x2_t a) {}
+void f3 (uint8x8_t a) {}
+void f4 (uint16x4_t a) {}
+void f5 (uint32x2_t a) {}
+void f6 (float32x2_t a) {}
+void f7 (poly8x8_t a) {}
+void f8 (poly16x4_t a) {}
+
+void f9 (int8x16_t a) {}
+void f10 (int16x8_t a) {}
+void f11 (int32x4_t a) {}
+void f12 (int64x2_t a) {}
+void f13 (uint8x16_t a) {}
+void f14 (uint16x8_t a) {}
+void f15 (uint32x4_t a) {}
+void f16 (uint64x2_t a) {}
+void f17 (float32x4_t a) {}
+void f18 (float64x2_t a) {}
+void f19 (poly8x16_t a) {}
+void f20 (poly16x8_t a) {}
+
+void f21 (int8x16_t, int8x16_t) {}
+
+
+// { dg-final { scan-assembler "_Z2f010__Int8x8_t:" } }
+// { dg-final { scan-assembler "_Z2f111__Int16x4_t:" } }
+// { dg-final { scan-assembler "_Z2f211__Int32x2_t:" } }
+// { dg-final { scan-assembler "_Z2f311__Uint8x8_t:" } }
+// { dg-final { scan-assembler "_Z2f412__Uint16x4_t:" } }
+// { dg-final { scan-assembler "_Z2f512__Uint32x2_t:" } }
+// { dg-final { scan-assembler "_Z2f613__Float32x2_t:" } }
+// { dg-final { scan-assembler "_Z2f711__Poly8x8_t:" } }
+// { dg-final { scan-assembler "_Z2f812__Poly16x4_t:" } }
+// { dg-final { scan-assembler "_Z2f911__Int8x16_t:" } }
+// { dg-final { scan-assembler "_Z3f1011__Int16x8_t:" } }
+// { dg-final { scan-assembler "_Z3f1111__Int32x4_t:" } }
+// { dg-final { scan-assembler "_Z3f1211__Int64x2_t:" } }
+// { dg-final { scan-assembler "_Z3f1312__Uint8x16_t:" } }
+// { dg-final { scan-assembler "_Z3f1412__Uint16x8_t:" } }
+// { dg-final { scan-assembler "_Z3f1512__Uint32x4_t:" } }
+// { dg-final { scan-assembler "_Z3f1612__Uint64x2_t:" } }
+// { dg-final { scan-assembler "_Z3f1713__Float32x4_t:" } }
+// { dg-final { scan-assembler "_Z3f1813__Float64x2_t:" } }
+// { dg-final { scan-assembler "_Z3f1912__Poly8x16_t:" } }
+// { dg-final { scan-assembler "_Z3f2012__Poly16x8_t:" } }
+// { dg-final { scan-assembler "_Z3f2111__Int8x16_tS_:" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle3-2.C b/gcc/testsuite/g++.dg/abi/mangle3-2.C
new file mode 100644
index 0000000000..ac85fb0456
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle3-2.C
@@ -0,0 +1,20 @@
+// Test mangling of type casts
+// { dg-options "-fabi-version=0" }
+// { dg-do compile }
+
+template<int i> class A {};
+template<bool b> class B {};
+
+template<int i> void f(A<i> &, B<bool(i)> &) {}
+template<int i> void g(A<i> &, B<static_cast<bool>(i)> &) {}
+
+int main()
+{
+ A<1> a;
+ B<true> b;
+ f(a, b);
+ g(a, b);
+}
+
+// { dg-final { scan-assembler "\n_?_Z1fILi1EEvR1AIXT_EER1BIXcvbT_EE\[: \t\n\]" } }
+// { dg-final { scan-assembler "\n_?_Z1gILi1EEvR1AIXT_EER1BIXscbT_EE\[: \t\n\]" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle3.C b/gcc/testsuite/g++.dg/abi/mangle3.C
index a20b877f47..5f44f76773 100644
--- a/gcc/testsuite/g++.dg/abi/mangle3.C
+++ b/gcc/testsuite/g++.dg/abi/mangle3.C
@@ -1,4 +1,5 @@
// Test mangling of type casts
+// { dg-options "-fabi-version=2" }
// { dg-do compile }
template<int i> class A {};
diff --git a/gcc/testsuite/g++.dg/abi/mangle32.C b/gcc/testsuite/g++.dg/abi/mangle32.C
index 244d07490f..6ae0113a27 100644
--- a/gcc/testsuite/g++.dg/abi/mangle32.C
+++ b/gcc/testsuite/g++.dg/abi/mangle32.C
@@ -3,7 +3,7 @@
// namespace-scope unnamed types have no linkage, so we only test that they
// are distinct.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef struct { } *A;
typedef struct { } *B;
@@ -14,7 +14,7 @@ void f(B) { }
struct C
{
typedef struct { }* D;
- typedef enum { }* E;
+ typedef enum { e }* E;
};
// { dg-final { scan-assembler "_Z2g1PN1CUt_E" } }
@@ -30,7 +30,7 @@ void h2(T t) { }
inline void j()
{
- typedef enum { }* F;
+ typedef enum { f }* F;
// { dg-final { scan-assembler "_Z2h1IPZ1jvEUt_EvT_" } }
h1(F());
typedef struct { }* G;
diff --git a/gcc/testsuite/g++.dg/abi/mangle33.C b/gcc/testsuite/g++.dg/abi/mangle33.C
index f0a4e5012d..8c77f1f0d0 100644
--- a/gcc/testsuite/g++.dg/abi/mangle33.C
+++ b/gcc/testsuite/g++.dg/abi/mangle33.C
@@ -15,5 +15,5 @@ namespace N {
int j;
}
-// { dg-final { scan-assembler "_ZN4043abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklm1iE" } }
-// { dg-final { scan-assembler "_ZN4041abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyzabcdefghijk1jE" } }
+// { dg-final { scan-assembler "_ZN4043(abcdefghijklmnopqrstuvwxyz){155}abcdefghijklm1iE" } }
+// { dg-final { scan-assembler "_ZN4041(abcdefghijklmnopqrstuvwxyz){155}abcdefghijk1jE" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle37.C b/gcc/testsuite/g++.dg/abi/mangle37.C
index 7270861ac5..691566b384 100644
--- a/gcc/testsuite/g++.dg/abi/mangle37.C
+++ b/gcc/testsuite/g++.dg/abi/mangle37.C
@@ -1,5 +1,5 @@
// Testcase for mangling of expressions involving operator names.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_Z1fI1AEDTclonplfp_fp_EET_" } }
// { dg-final { scan-assembler "_Z1gI1AEDTclonplIT_Efp_fp_EES1_" } }
// { dg-final { scan-assembler "_Z1hI1AEDTcldtfp_miEET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle39.C b/gcc/testsuite/g++.dg/abi/mangle39.C
index 2896356106..a36f98127c 100644
--- a/gcc/testsuite/g++.dg/abi/mangle39.C
+++ b/gcc/testsuite/g++.dg/abi/mangle39.C
@@ -1,5 +1,6 @@
// PR c++/42338
-// { dg-options "-std=c++0x -fabi-version=5" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=5" }
// { dg-final { scan-assembler "_Z1fIPiEDTcmppfp_Li0EET_" } }
// { dg-final { scan-assembler "_Z1gIiEvRK1AIT_EDTixfL0p_Li0EE" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle42.C b/gcc/testsuite/g++.dg/abi/mangle42.C
index b7e3bd561e..c7cce5e7ff 100644
--- a/gcc/testsuite/g++.dg/abi/mangle42.C
+++ b/gcc/testsuite/g++.dg/abi/mangle42.C
@@ -1,6 +1,7 @@
// Origin: PR c++/43375
// { dg-do compile { target i?86-*-* x86_64-*-* } }
-// { dg-options "-msse2 -std=gnu++0x" }
+// { dg-require-effective-target c++11 }
+// { dg-options "-msse2" }
// { dg-require-effective-target sse2 }
typedef float __v4sf __attribute__ ((__vector_size__ (16)));
diff --git a/gcc/testsuite/g++.dg/abi/mangle45.C b/gcc/testsuite/g++.dg/abi/mangle45.C
index 3ce9abcb0e..5e202a2f52 100644
--- a/gcc/testsuite/g++.dg/abi/mangle45.C
+++ b/gcc/testsuite/g++.dg/abi/mangle45.C
@@ -1,5 +1,6 @@
// Testcase for mangling of parameters used other than in a trailing return type
-// { dg-options "-std=c++0x -fabi-version=5" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=5" }
template<class T> void f(T p, decltype(p)) { } // L = 1
template<class T> void g(T p, decltype(p) (*)()) { } // L = 1
diff --git a/gcc/testsuite/g++.dg/abi/mangle47.C b/gcc/testsuite/g++.dg/abi/mangle47.C
index 2c1b636dc0..3bb5e9ab7e 100644
--- a/gcc/testsuite/g++.dg/abi/mangle47.C
+++ b/gcc/testsuite/g++.dg/abi/mangle47.C
@@ -1,5 +1,5 @@
// PR c++/47132
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_Z1fIiEDToRfp_Li1EET_" } }
template <typename T>
diff --git a/gcc/testsuite/g++.dg/abi/mangle48.C b/gcc/testsuite/g++.dg/abi/mangle48.C
index 6c0e99c8de..f9afa1ad0b 100644
--- a/gcc/testsuite/g++.dg/abi/mangle48.C
+++ b/gcc/testsuite/g++.dg/abi/mangle48.C
@@ -1,5 +1,5 @@
// Testcase for 'this' mangling
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct B
{
diff --git a/gcc/testsuite/g++.dg/abi/mangle49.C b/gcc/testsuite/g++.dg/abi/mangle49.C
index a258dc2d44..3795c556d0 100644
--- a/gcc/testsuite/g++.dg/abi/mangle49.C
+++ b/gcc/testsuite/g++.dg/abi/mangle49.C
@@ -1,5 +1,6 @@
// PR c++/49932
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
template < typename T >
auto
diff --git a/gcc/testsuite/g++.dg/abi/mangle50.C b/gcc/testsuite/g++.dg/abi/mangle50.C
index df7afb97ed..90566c2198 100644
--- a/gcc/testsuite/g++.dg/abi/mangle50.C
+++ b/gcc/testsuite/g++.dg/abi/mangle50.C
@@ -1,5 +1,5 @@
// DR 342, PR c++/48582
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A;
template < void * = nullptr > void f() { }
diff --git a/gcc/testsuite/g++.dg/abi/mangle51.C b/gcc/testsuite/g++.dg/abi/mangle51.C
index 4992f1a327..e7c2c747a9 100644
--- a/gcc/testsuite/g++.dg/abi/mangle51.C
+++ b/gcc/testsuite/g++.dg/abi/mangle51.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
void* operator new (__SIZE_TYPE__, void *p) { return p; }
int i;
diff --git a/gcc/testsuite/g++.dg/abi/mangle53.C b/gcc/testsuite/g++.dg/abi/mangle53.C
index b279182d8c..13f9e711c1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle53.C
+++ b/gcc/testsuite/g++.dg/abi/mangle53.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
bool b;
// { dg-final { scan-assembler "_Z1fIiEDTquL_Z1bEfp_twLi42EET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle54.C b/gcc/testsuite/g++.dg/abi/mangle54.C
index ea98df17d3..926275c8cb 100644
--- a/gcc/testsuite/g++.dg/abi/mangle54.C
+++ b/gcc/testsuite/g++.dg/abi/mangle54.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
int i;
// { dg-final { scan-assembler "_Z2f1IiEDTppfp_ET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle55.C b/gcc/testsuite/g++.dg/abi/mangle55.C
index 72caadcc24..72ea83444c 100644
--- a/gcc/testsuite/g++.dg/abi/mangle55.C
+++ b/gcc/testsuite/g++.dg/abi/mangle55.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A { int i; };
// { dg-final { scan-assembler "_Z2f1Ii1AEDTdsfp_fp0_ET0_MS2_T_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle56.C b/gcc/testsuite/g++.dg/abi/mangle56.C
index 0fd270169d..5c66db5581 100644
--- a/gcc/testsuite/g++.dg/abi/mangle56.C
+++ b/gcc/testsuite/g++.dg/abi/mangle56.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T> T g(T t1, T t2) { return t2; }
// { dg-final { scan-assembler "_Z2f1IiEDTcl1gfp_ilEEET_" } }
diff --git a/gcc/testsuite/g++.dg/abi/mangle57.C b/gcc/testsuite/g++.dg/abi/mangle57.C
index 3d9d81e55b..cd59cb87b1 100644
--- a/gcc/testsuite/g++.dg/abi/mangle57.C
+++ b/gcc/testsuite/g++.dg/abi/mangle57.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
template<typename T> int cmp1(T a, T b);
int cmp2(char a, char b);
diff --git a/gcc/testsuite/g++.dg/abi/mangle58.C b/gcc/testsuite/g++.dg/abi/mangle58.C
index 54b16f2569..abcb3ca47a 100644
--- a/gcc/testsuite/g++.dg/abi/mangle58.C
+++ b/gcc/testsuite/g++.dg/abi/mangle58.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
template<typename T, int (*cmp)(T, T)> struct A { };
struct B {
diff --git a/gcc/testsuite/g++.dg/abi/mangle59.C b/gcc/testsuite/g++.dg/abi/mangle59.C
index 3c88ec8748..ba0befddc5 100644
--- a/gcc/testsuite/g++.dg/abi/mangle59.C
+++ b/gcc/testsuite/g++.dg/abi/mangle59.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
// { dg-final { scan-assembler "_Z1fIiEDTcmdlfp_psfp_EPT_" } }
template <class T> auto f (T* p) -> decltype(delete p, +p) { return p; }
diff --git a/gcc/testsuite/g++.dg/abi/mangle62.C b/gcc/testsuite/g++.dg/abi/mangle62.C
new file mode 100644
index 0000000000..6dbfd7865c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle62.C
@@ -0,0 +1,11 @@
+// Before v8, we mistakenly treated an unqualified function type
+// as a substitution candidate for a function type with function-cv-quals.
+// Test for the conformant behavior.
+
+// { dg-options -fabi-version=0 }
+
+template <class T, class U> struct A { };
+// { dg-final { scan-assembler "_Z1fP1AIKFvvEFvvEE" } }
+void f (A<void()const, void()> *){}
+// { dg-final { scan-assembler "_Z1gP1AIFvvEKFvvEE" } }
+void g (A<void(), void()const> *){}
diff --git a/gcc/testsuite/g++.dg/abi/mangle62a.C b/gcc/testsuite/g++.dg/abi/mangle62a.C
new file mode 100644
index 0000000000..fca1cb6c43
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/mangle62a.C
@@ -0,0 +1,11 @@
+// Before v8, we mistakenly treated an unqualified function type
+// as a substitution candidate for a function type with function-cv-quals.
+// Test for that for backward compatibility.
+
+// { dg-options -fabi-version=7 }
+
+template <class T, class U> struct A { };
+// { dg-final { scan-assembler "_Z1fP1AIKFvvES0_E" } }
+void f (A<void()const, void()> *){}
+// { dg-final { scan-assembler "_Z1gP1AIFvvEKS0_E" } }
+void g (A<void(), void()const> *){}
diff --git a/gcc/testsuite/g++.dg/abi/no-weak1.C b/gcc/testsuite/g++.dg/abi/no-weak1.C
new file mode 100644
index 0000000000..d539015312
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/no-weak1.C
@@ -0,0 +1,13 @@
+// { dg-options "-fno-weak" }
+// { dg-final { scan-assembler "local\[ \t\]*_ZZL1fvE1i" { target x86_64-*-*gnu } } }
+
+static inline void f()
+{
+ static int i;
+ ++i;
+};
+
+int main()
+{
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/abi/regparm1.C b/gcc/testsuite/g++.dg/abi/regparm1.C
index 42a54a0e02..c4710464ac 100644
--- a/gcc/testsuite/g++.dg/abi/regparm1.C
+++ b/gcc/testsuite/g++.dg/abi/regparm1.C
@@ -1,6 +1,6 @@
// PR c++/29911 (9381)
-// { dg-options -std=c++0x }
// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target c++11 }
extern "C" int printf(const char *, ...);
diff --git a/gcc/testsuite/g++.dg/abi/rtti3.C b/gcc/testsuite/g++.dg/abi/rtti3.C
index 60dc9b8d62..c03e4611c0 100644
--- a/gcc/testsuite/g++.dg/abi/rtti3.C
+++ b/gcc/testsuite/g++.dg/abi/rtti3.C
@@ -3,12 +3,10 @@
// { dg-require-weak "" }
// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } }
-// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } }
+// { dg-final { scan-assembler ".weak\[ \t\]_?_ZTSPP1A" { target { ! { *-*-darwin* } } } } }
+// { dg-final { scan-assembler-not ".weak\[ \t\]_?_ZTIPP1A" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZTSPP1A" { target { *-*-darwin* } } } }
// { dg-final { scan-assembler-not ".weak_definition\[ \t\]_?_ZTIPP1A" { target { *-*-darwin* } } } }
-// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZTSPP1A" { target { alpha*-dec-osf* } } } }
-// { dg-final { scan-assembler-not ".weakext\[ \t\]_?_ZTIPP1A" { target { alpha*-dec-osf* } } } }
struct A;
diff --git a/gcc/testsuite/g++.dg/abi/spec1.C b/gcc/testsuite/g++.dg/abi/spec1.C
new file mode 100644
index 0000000000..153c0cfe7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/spec1.C
@@ -0,0 +1,4 @@
+// { dg-final { scan-assembler-not "weak" } }
+
+template <class T> struct A { static int i; };
+template<> int A<int>::i = 42;
diff --git a/gcc/testsuite/g++.dg/abi/thunk4.C b/gcc/testsuite/g++.dg/abi/thunk4.C
index cd9eac3ea1..fa5fbd4327 100644
--- a/gcc/testsuite/g++.dg/abi/thunk4.C
+++ b/gcc/testsuite/g++.dg/abi/thunk4.C
@@ -1,8 +1,7 @@
// { dg-require-weak "" }
// { dg-skip-if "Linkonce not weak" { *-*-mingw* *-*-cygwin } { "*" } { "" } }
-// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* alpha*-dec-osf* } } } } }
+// { dg-final { scan-assembler ".weak\[ \t\]_?_ZThn._N7Derived3FooEv" { target { ! { *-*-darwin* } } } } }
// { dg-final { scan-assembler ".weak_definition\[ \t\]_?_ZThn._N7Derived3FooEv" { target { *-*-darwin* } } } }
-// { dg-final { scan-assembler ".weakext\[ \t\]_?_ZThn._N7Derived3FooEv" { target { alpha*-dec-osf* } } } }
struct Base
{
diff --git a/gcc/testsuite/g++.dg/abi/thunk6.C b/gcc/testsuite/g++.dg/abi/thunk6.C
new file mode 100644
index 0000000000..6df51c24b1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/abi/thunk6.C
@@ -0,0 +1,19 @@
+// PR c++/60566
+// We need to emit the construction vtable thunk for ~C even if we aren't
+// going to use it.
+
+struct A
+{
+ virtual void f() = 0;
+ virtual ~A() {}
+};
+
+struct B: virtual A { int i; };
+struct C: virtual A { int i; ~C(); };
+
+C::~C() {}
+
+int main() {}
+
+// { dg-final { scan-assembler "_ZTv0_n32_N1CD1Ev" { target lp64 } } }
+// { dg-final { scan-assembler "_ZTv0_n16_N1CD1Ev" { target ilp32 } } }
diff --git a/gcc/testsuite/g++.dg/asan/asan.exp b/gcc/testsuite/g++.dg/asan/asan.exp
new file mode 100644
index 0000000000..30fbb1d91a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan.exp
@@ -0,0 +1,38 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Load support procs.
+load_lib g++-dg.exp
+load_lib asan-dg.exp
+
+if ![check_effective_target_faddress_sanitizer] {
+ return
+}
+
+# Initialize `dg'.
+dg-init
+if [asan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/asan/*.c]] ""
+
+}
+
+# All done.
+asan_finish
+dg-finish
diff --git a/gcc/testsuite/g++.dg/asan/asan_globals_test-wrapper.cc b/gcc/testsuite/g++.dg/asan/asan_globals_test-wrapper.cc
new file mode 100644
index 0000000000..97f53123f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_globals_test-wrapper.cc
@@ -0,0 +1,2 @@
+#define DEJAGNU_GTEST_H 1
+#include "asan_globals_test.cc"
diff --git a/gcc/testsuite/g++.dg/asan/asan_globals_test.cc b/gcc/testsuite/g++.dg/asan/asan_globals_test.cc
new file mode 100644
index 0000000000..38e71360b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_globals_test.cc
@@ -0,0 +1,43 @@
+//===-- asan_globals_test.cc ----------------------------------------------===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+// Some globals in a separate file.
+//===----------------------------------------------------------------------===//
+#include "asan_test_utils.h"
+
+char glob1[1];
+char glob2[2];
+char glob3[3];
+char glob4[4];
+char glob5[5];
+char glob6[6];
+char glob7[7];
+char glob8[8];
+char glob9[9];
+char glob10[10];
+char glob11[11];
+char glob12[12];
+char glob13[13];
+char glob14[14];
+char glob15[15];
+char glob16[16];
+char glob17[17];
+char glob1000[1000];
+char glob10000[10000];
+char glob100000[100000];
+
+static char static10[10];
+
+int GlobalsTest(int zero) {
+ static char func_static15[15];
+ glob5[zero] = 0;
+ static10[zero] = 0;
+ func_static15[zero] = 0;
+ return glob5[1] + func_static15[2];
+}
diff --git a/gcc/testsuite/g++.dg/asan/asan_mem_test.cc b/gcc/testsuite/g++.dg/asan/asan_mem_test.cc
new file mode 100644
index 0000000000..5656aab0ba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_mem_test.cc
@@ -0,0 +1,231 @@
+//===-- asan_mem_test.cc --------------------------------------------------===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#include "asan_test_utils.h"
+
+template<typename T>
+void MemSetOOBTestTemplate(size_t length) {
+ if (length == 0) return;
+ size_t size = Ident(sizeof(T) * length);
+ T *array = Ident((T*)malloc(size));
+ int element = Ident(42);
+ int zero = Ident(0);
+ void *(*MEMSET)(void *s, int c, size_t n) = Ident(memset);
+ // memset interval inside array
+ MEMSET(array, element, size);
+ MEMSET(array, element, size - 1);
+ MEMSET(array + length - 1, element, sizeof(T));
+ MEMSET(array, element, 1);
+
+ // memset 0 bytes
+ MEMSET(array - 10, element, zero);
+ MEMSET(array - 1, element, zero);
+ MEMSET(array, element, zero);
+ MEMSET(array + length, 0, zero);
+ MEMSET(array + length + 1, 0, zero);
+
+ // try to memset bytes to the right of array
+ EXPECT_DEATH(MEMSET(array, 0, size + 1),
+ RightOOBWriteMessage(0));
+ EXPECT_DEATH(MEMSET((char*)(array + length) - 1, element, 6),
+ RightOOBWriteMessage(0));
+ EXPECT_DEATH(MEMSET(array + 1, element, size + sizeof(T)),
+ RightOOBWriteMessage(0));
+ // whole interval is to the right
+ EXPECT_DEATH(MEMSET(array + length + 1, 0, 10),
+ RightOOBWriteMessage(sizeof(T)));
+
+ // try to memset bytes to the left of array
+ EXPECT_DEATH(MEMSET((char*)array - 1, element, size),
+ LeftOOBWriteMessage(1));
+ EXPECT_DEATH(MEMSET((char*)array - 5, 0, 6),
+ LeftOOBWriteMessage(5));
+ if (length >= 100) {
+ // Large OOB, we find it only if the redzone is large enough.
+ EXPECT_DEATH(memset(array - 5, element, size + 5 * sizeof(T)),
+ LeftOOBWriteMessage(5 * sizeof(T)));
+ }
+ // whole interval is to the left
+ EXPECT_DEATH(MEMSET(array - 2, 0, sizeof(T)),
+ LeftOOBWriteMessage(2 * sizeof(T)));
+
+ // try to memset bytes both to the left & to the right
+ EXPECT_DEATH(MEMSET((char*)array - 2, element, size + 4),
+ LeftOOBWriteMessage(2));
+
+ free(array);
+}
+
+TEST(AddressSanitizer, MemSetOOBTest) {
+ MemSetOOBTestTemplate<char>(100);
+ MemSetOOBTestTemplate<int>(5);
+ MemSetOOBTestTemplate<double>(256);
+ // We can test arrays of structres/classes here, but what for?
+}
+
+// Try to allocate two arrays of 'size' bytes that are near each other.
+// Strictly speaking we are not guaranteed to find such two pointers,
+// but given the structure of asan's allocator we will.
+static bool AllocateTwoAdjacentArrays(char **x1, char **x2, size_t size) {
+ vector<char *> v;
+ bool res = false;
+ for (size_t i = 0; i < 1000U && !res; i++) {
+ v.push_back(new char[size]);
+ if (i == 0) continue;
+ sort(v.begin(), v.end());
+ for (size_t j = 1; j < v.size(); j++) {
+ assert(v[j] > v[j-1]);
+ if ((size_t)(v[j] - v[j-1]) < size * 2) {
+ *x2 = v[j];
+ *x1 = v[j-1];
+ res = true;
+ break;
+ }
+ }
+ }
+
+ for (size_t i = 0; i < v.size(); i++) {
+ if (res && v[i] == *x1) continue;
+ if (res && v[i] == *x2) continue;
+ delete [] v[i];
+ }
+ return res;
+}
+
+TEST(AddressSanitizer, LargeOOBInMemset) {
+ for (size_t size = 200; size < 100000; size += size / 2) {
+ char *x1, *x2;
+ if (!Ident(AllocateTwoAdjacentArrays)(&x1, &x2, size))
+ continue;
+ // fprintf(stderr, " large oob memset: %p %p %zd\n", x1, x2, size);
+ // Do a memset on x1 with huge out-of-bound access that will end up in x2.
+ EXPECT_DEATH(Ident(memset)(x1, 0, size * 2),
+ "is located 0 bytes to the right");
+ delete [] x1;
+ delete [] x2;
+ return;
+ }
+ assert(0 && "Did not find two adjacent malloc-ed pointers");
+}
+
+// Same test for memcpy and memmove functions
+template <typename T, class M>
+void MemTransferOOBTestTemplate(size_t length) {
+ if (length == 0) return;
+ size_t size = Ident(sizeof(T) * length);
+ T *src = Ident((T*)malloc(size));
+ T *dest = Ident((T*)malloc(size));
+ int zero = Ident(0);
+
+ // valid transfer of bytes between arrays
+ M::transfer(dest, src, size);
+ M::transfer(dest + 1, src, size - sizeof(T));
+ M::transfer(dest, src + length - 1, sizeof(T));
+ M::transfer(dest, src, 1);
+
+ // transfer zero bytes
+ M::transfer(dest - 1, src, 0);
+ M::transfer(dest + length, src, zero);
+ M::transfer(dest, src - 1, zero);
+ M::transfer(dest, src, zero);
+
+ // try to change mem to the right of dest
+ EXPECT_DEATH(M::transfer(dest + 1, src, size),
+ RightOOBWriteMessage(0));
+ EXPECT_DEATH(M::transfer((char*)(dest + length) - 1, src, 5),
+ RightOOBWriteMessage(0));
+
+ // try to change mem to the left of dest
+ EXPECT_DEATH(M::transfer(dest - 2, src, size),
+ LeftOOBWriteMessage(2 * sizeof(T)));
+ EXPECT_DEATH(M::transfer((char*)dest - 3, src, 4),
+ LeftOOBWriteMessage(3));
+
+ // try to access mem to the right of src
+ EXPECT_DEATH(M::transfer(dest, src + 2, size),
+ RightOOBReadMessage(0));
+ EXPECT_DEATH(M::transfer(dest, (char*)(src + length) - 3, 6),
+ RightOOBReadMessage(0));
+
+ // try to access mem to the left of src
+ EXPECT_DEATH(M::transfer(dest, src - 1, size),
+ LeftOOBReadMessage(sizeof(T)));
+ EXPECT_DEATH(M::transfer(dest, (char*)src - 6, 7),
+ LeftOOBReadMessage(6));
+
+ // Generally we don't need to test cases where both accessing src and writing
+ // to dest address to poisoned memory.
+
+ T *big_src = Ident((T*)malloc(size * 2));
+ T *big_dest = Ident((T*)malloc(size * 2));
+ // try to change mem to both sides of dest
+ EXPECT_DEATH(M::transfer(dest - 1, big_src, size * 2),
+ LeftOOBWriteMessage(sizeof(T)));
+ // try to access mem to both sides of src
+ EXPECT_DEATH(M::transfer(big_dest, src - 2, size * 2),
+ LeftOOBReadMessage(2 * sizeof(T)));
+
+ free(src);
+ free(dest);
+ free(big_src);
+ free(big_dest);
+}
+
+class MemCpyWrapper {
+ public:
+ static void* transfer(void *to, const void *from, size_t size) {
+ return Ident(memcpy)(to, from, size);
+ }
+};
+
+TEST(AddressSanitizer, MemCpyOOBTest) {
+ MemTransferOOBTestTemplate<char, MemCpyWrapper>(100);
+ MemTransferOOBTestTemplate<int, MemCpyWrapper>(1024);
+}
+
+class MemMoveWrapper {
+ public:
+ static void* transfer(void *to, const void *from, size_t size) {
+ return Ident(memmove)(to, from, size);
+ }
+};
+
+TEST(AddressSanitizer, MemMoveOOBTest) {
+ MemTransferOOBTestTemplate<char, MemMoveWrapper>(100);
+ MemTransferOOBTestTemplate<int, MemMoveWrapper>(1024);
+}
+
+
+TEST(AddressSanitizer, MemCmpOOBTest) {
+ size_t size = Ident(100);
+ char *s1 = MallocAndMemsetString(size);
+ char *s2 = MallocAndMemsetString(size);
+ // Normal memcmp calls.
+ Ident(memcmp(s1, s2, size));
+ Ident(memcmp(s1 + size - 1, s2 + size - 1, 1));
+ Ident(memcmp(s1 - 1, s2 - 1, 0));
+ // One of arguments points to not allocated memory.
+ EXPECT_DEATH(Ident(memcmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(memcmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(memcmp)(s1 + size, s2, 1), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(memcmp)(s1, s2 + size, 1), RightOOBReadMessage(0));
+ // Hit unallocated memory and die.
+ EXPECT_DEATH(Ident(memcmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(memcmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0));
+ // Zero bytes are not terminators and don't prevent from OOB.
+ s1[size - 1] = '\0';
+ s2[size - 1] = '\0';
+ EXPECT_DEATH(Ident(memcmp)(s1, s2, size + 1), RightOOBReadMessage(0));
+ free(s1);
+ free(s2);
+}
+
+
+
diff --git a/gcc/testsuite/g++.dg/asan/asan_oob_test.cc b/gcc/testsuite/g++.dg/asan/asan_oob_test.cc
new file mode 100644
index 0000000000..61d5055370
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_oob_test.cc
@@ -0,0 +1,126 @@
+//===-- asan_oob_test.cc --------------------------------------------------===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#include "asan_test_utils.h"
+
+NOINLINE void asan_write_sized_aligned(uint8_t *p, size_t size) {
+ EXPECT_EQ(0U, ((uintptr_t)p % size));
+ if (size == 1) asan_write((uint8_t*)p);
+ else if (size == 2) asan_write((uint16_t*)p);
+ else if (size == 4) asan_write((uint32_t*)p);
+ else if (size == 8) asan_write((uint64_t*)p);
+}
+
+template<typename T>
+NOINLINE void oob_test(int size, int off) {
+ char *p = (char*)malloc_aaa(size);
+ // fprintf(stderr, "writing %d byte(s) into [%p,%p) with offset %d\n",
+ // sizeof(T), p, p + size, off);
+ asan_write((T*)(p + off));
+ free_aaa(p);
+}
+
+template<typename T>
+void OOBTest() {
+ char expected_str[100];
+ for (int size = sizeof(T); size < 20; size += 5) {
+ for (int i = -5; i < 0; i++) {
+ const char *str =
+ "is located.*%d byte.*to the left";
+ sprintf(expected_str, str, abs(i));
+ EXPECT_DEATH(oob_test<T>(size, i), expected_str);
+ }
+
+ for (int i = 0; i < (int)(size - sizeof(T) + 1); i++)
+ oob_test<T>(size, i);
+
+ for (int i = size - sizeof(T) + 1; i <= (int)(size + 2 * sizeof(T)); i++) {
+ const char *str =
+ "is located.*%d byte.*to the right";
+ int off = i >= size ? (i - size) : 0;
+ // we don't catch unaligned partially OOB accesses.
+ if (i % sizeof(T)) continue;
+ sprintf(expected_str, str, off);
+ EXPECT_DEATH(oob_test<T>(size, i), expected_str);
+ }
+ }
+
+ EXPECT_DEATH(oob_test<T>(kLargeMalloc, -1),
+ "is located.*1 byte.*to the left");
+ EXPECT_DEATH(oob_test<T>(kLargeMalloc, kLargeMalloc),
+ "is located.*0 byte.*to the right");
+}
+
+// TODO(glider): the following tests are EXTREMELY slow on Darwin:
+// AddressSanitizer.OOB_char (125503 ms)
+// AddressSanitizer.OOB_int (126890 ms)
+// AddressSanitizer.OOBRightTest (315605 ms)
+// AddressSanitizer.SimpleStackTest (366559 ms)
+
+TEST(AddressSanitizer, OOB_char) {
+ OOBTest<U1>();
+}
+
+TEST(AddressSanitizer, OOB_int) {
+ OOBTest<U4>();
+}
+
+TEST(AddressSanitizer, OOBRightTest) {
+ for (size_t access_size = 1; access_size <= 8; access_size *= 2) {
+ for (size_t alloc_size = 1; alloc_size <= 8; alloc_size++) {
+ for (size_t offset = 0; offset <= 8; offset += access_size) {
+ void *p = malloc(alloc_size);
+ // allocated: [p, p + alloc_size)
+ // accessed: [p + offset, p + offset + access_size)
+ uint8_t *addr = (uint8_t*)p + offset;
+ if (offset + access_size <= alloc_size) {
+ asan_write_sized_aligned(addr, access_size);
+ } else {
+ int outside_bytes = offset > alloc_size ? (offset - alloc_size) : 0;
+ const char *str =
+ "is located.%d *byte.*to the right";
+ char expected_str[100];
+ sprintf(expected_str, str, outside_bytes);
+ EXPECT_DEATH(asan_write_sized_aligned(addr, access_size),
+ expected_str);
+ }
+ free(p);
+ }
+ }
+ }
+}
+
+#if ASAN_ALLOCATOR_VERSION == 2 // Broken with the asan_allocator1
+TEST(AddressSanitizer, LargeOOBRightTest) {
+ size_t large_power_of_two = 1 << 19;
+ for (size_t i = 16; i <= 256; i *= 2) {
+ size_t size = large_power_of_two - i;
+ char *p = Ident(new char[size]);
+ EXPECT_DEATH(p[size] = 0, "is located 0 bytes to the right");
+ delete [] p;
+ }
+}
+#endif // ASAN_ALLOCATOR_VERSION == 2
+
+TEST(AddressSanitizer, DISABLED_DemoOOBLeftLow) {
+ oob_test<U1>(10, -1);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoOOBLeftHigh) {
+ oob_test<U1>(kLargeMalloc, -1);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoOOBRightLow) {
+ oob_test<U1>(10, 10);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoOOBRightHigh) {
+ oob_test<U1>(kLargeMalloc, kLargeMalloc);
+}
diff --git a/gcc/testsuite/g++.dg/asan/asan_str_test.cc b/gcc/testsuite/g++.dg/asan/asan_str_test.cc
new file mode 100644
index 0000000000..1b9805e8eb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_str_test.cc
@@ -0,0 +1,570 @@
+//=-- asan_str_test.cc ----------------------------------------------------===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#include "asan_test_utils.h"
+
+// Used for string functions tests
+static char global_string[] = "global";
+static size_t global_string_length = 6;
+
+// Input to a test is a zero-terminated string str with given length
+// Accesses to the bytes to the left and to the right of str
+// are presumed to produce OOB errors
+void StrLenOOBTestTemplate(char *str, size_t length, bool is_global) {
+ // Normal strlen calls
+ EXPECT_EQ(strlen(str), length);
+ if (length > 0) {
+ EXPECT_EQ(length - 1, strlen(str + 1));
+ EXPECT_EQ(0U, strlen(str + length));
+ }
+ // Arg of strlen is not malloced, OOB access
+ if (!is_global) {
+ // We don't insert RedZones to the left of global variables
+ EXPECT_DEATH(Ident(strlen(str - 1)), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(strlen(str - 5)), LeftOOBReadMessage(5));
+ }
+ EXPECT_DEATH(Ident(strlen(str + length + 1)), RightOOBReadMessage(0));
+ // Overwrite terminator
+ str[length] = 'a';
+ // String is not zero-terminated, strlen will lead to OOB access
+ EXPECT_DEATH(Ident(strlen(str)), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(strlen(str + length)), RightOOBReadMessage(0));
+ // Restore terminator
+ str[length] = 0;
+}
+TEST(AddressSanitizer, StrLenOOBTest) {
+ // Check heap-allocated string
+ size_t length = Ident(10);
+ char *heap_string = Ident((char*)malloc(length + 1));
+ char stack_string[10 + 1];
+ break_optimization(&stack_string);
+ for (size_t i = 0; i < length; i++) {
+ heap_string[i] = 'a';
+ stack_string[i] = 'b';
+ }
+ heap_string[length] = 0;
+ stack_string[length] = 0;
+ StrLenOOBTestTemplate(heap_string, length, false);
+ // TODO(samsonov): Fix expected messages in StrLenOOBTestTemplate to
+ // make test for stack_string work. Or move it to output tests.
+ // StrLenOOBTestTemplate(stack_string, length, false);
+ StrLenOOBTestTemplate(global_string, global_string_length, true);
+ free(heap_string);
+}
+
+#ifndef __APPLE__
+TEST(AddressSanitizer, StrNLenOOBTest) {
+ size_t size = Ident(123);
+ char *str = MallocAndMemsetString(size);
+ // Normal strnlen calls.
+ Ident(strnlen(str - 1, 0));
+ Ident(strnlen(str, size));
+ Ident(strnlen(str + size - 1, 1));
+ str[size - 1] = '\0';
+ Ident(strnlen(str, 2 * size));
+ // Argument points to not allocated memory.
+ EXPECT_DEATH(Ident(strnlen(str - 1, 1)), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(strnlen(str + size, 1)), RightOOBReadMessage(0));
+ // Overwrite the terminating '\0' and hit unallocated memory.
+ str[size - 1] = 'z';
+ EXPECT_DEATH(Ident(strnlen(str, size + 1)), RightOOBReadMessage(0));
+ free(str);
+}
+#endif
+
+TEST(AddressSanitizer, StrDupOOBTest) {
+ size_t size = Ident(42);
+ char *str = MallocAndMemsetString(size);
+ char *new_str;
+ // Normal strdup calls.
+ str[size - 1] = '\0';
+ new_str = strdup(str);
+ free(new_str);
+ new_str = strdup(str + size - 1);
+ free(new_str);
+ // Argument points to not allocated memory.
+ EXPECT_DEATH(Ident(strdup(str - 1)), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(strdup(str + size)), RightOOBReadMessage(0));
+ // Overwrite the terminating '\0' and hit unallocated memory.
+ str[size - 1] = 'z';
+ EXPECT_DEATH(Ident(strdup(str)), RightOOBReadMessage(0));
+ free(str);
+}
+
+TEST(AddressSanitizer, StrCpyOOBTest) {
+ size_t to_size = Ident(30);
+ size_t from_size = Ident(6); // less than to_size
+ char *to = Ident((char*)malloc(to_size));
+ char *from = Ident((char*)malloc(from_size));
+ // Normal strcpy calls.
+ strcpy(from, "hello");
+ strcpy(to, from);
+ strcpy(to + to_size - from_size, from);
+ // Length of "from" is too small.
+ EXPECT_DEATH(Ident(strcpy(from, "hello2")), RightOOBWriteMessage(0));
+ // "to" or "from" points to not allocated memory.
+ EXPECT_DEATH(Ident(strcpy(to - 1, from)), LeftOOBWriteMessage(1));
+ EXPECT_DEATH(Ident(strcpy(to, from - 1)), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(strcpy(to, from + from_size)), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(strcpy(to + to_size, from)), RightOOBWriteMessage(0));
+ // Overwrite the terminating '\0' character and hit unallocated memory.
+ from[from_size - 1] = '!';
+ EXPECT_DEATH(Ident(strcpy(to, from)), RightOOBReadMessage(0));
+ free(to);
+ free(from);
+}
+
+TEST(AddressSanitizer, StrNCpyOOBTest) {
+ size_t to_size = Ident(20);
+ size_t from_size = Ident(6); // less than to_size
+ char *to = Ident((char*)malloc(to_size));
+ // From is a zero-terminated string "hello\0" of length 6
+ char *from = Ident((char*)malloc(from_size));
+ strcpy(from, "hello");
+ // copy 0 bytes
+ strncpy(to, from, 0);
+ strncpy(to - 1, from - 1, 0);
+ // normal strncpy calls
+ strncpy(to, from, from_size);
+ strncpy(to, from, to_size);
+ strncpy(to, from + from_size - 1, to_size);
+ strncpy(to + to_size - 1, from, 1);
+ // One of {to, from} points to not allocated memory
+ EXPECT_DEATH(Ident(strncpy(to, from - 1, from_size)),
+ LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(strncpy(to - 1, from, from_size)),
+ LeftOOBWriteMessage(1));
+ EXPECT_DEATH(Ident(strncpy(to, from + from_size, 1)),
+ RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(strncpy(to + to_size, from, 1)),
+ RightOOBWriteMessage(0));
+ // Length of "to" is too small
+ EXPECT_DEATH(Ident(strncpy(to + to_size - from_size + 1, from, from_size)),
+ RightOOBWriteMessage(0));
+ EXPECT_DEATH(Ident(strncpy(to + 1, from, to_size)),
+ RightOOBWriteMessage(0));
+ // Overwrite terminator in from
+ from[from_size - 1] = '!';
+ // normal strncpy call
+ strncpy(to, from, from_size);
+ // Length of "from" is too small
+ EXPECT_DEATH(Ident(strncpy(to, from, to_size)),
+ RightOOBReadMessage(0));
+ free(to);
+ free(from);
+}
+
+// Users may have different definitions of "strchr" and "index", so provide
+// function pointer typedefs and overload RunStrChrTest implementation.
+// We can't use macro for RunStrChrTest body here, as this macro would
+// confuse EXPECT_DEATH gtest macro.
+typedef char*(*PointerToStrChr1)(const char*, int);
+typedef char*(*PointerToStrChr2)(char*, int);
+
+USED static void RunStrChrTest(PointerToStrChr1 StrChr) {
+ size_t size = Ident(100);
+ char *str = MallocAndMemsetString(size);
+ str[10] = 'q';
+ str[11] = '\0';
+ EXPECT_EQ(str, StrChr(str, 'z'));
+ EXPECT_EQ(str + 10, StrChr(str, 'q'));
+ EXPECT_EQ(NULL, StrChr(str, 'a'));
+ // StrChr argument points to not allocated memory.
+ EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0));
+ // Overwrite the terminator and hit not allocated memory.
+ str[11] = 'z';
+ EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0));
+ free(str);
+}
+USED static void RunStrChrTest(PointerToStrChr2 StrChr) {
+ size_t size = Ident(100);
+ char *str = MallocAndMemsetString(size);
+ str[10] = 'q';
+ str[11] = '\0';
+ EXPECT_EQ(str, StrChr(str, 'z'));
+ EXPECT_EQ(str + 10, StrChr(str, 'q'));
+ EXPECT_EQ(NULL, StrChr(str, 'a'));
+ // StrChr argument points to not allocated memory.
+ EXPECT_DEATH(Ident(StrChr(str - 1, 'z')), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrChr(str + size, 'z')), RightOOBReadMessage(0));
+ // Overwrite the terminator and hit not allocated memory.
+ str[11] = 'z';
+ EXPECT_DEATH(Ident(StrChr(str, 'a')), RightOOBReadMessage(0));
+ free(str);
+}
+
+TEST(AddressSanitizer, StrChrAndIndexOOBTest) {
+ RunStrChrTest(&strchr);
+ RunStrChrTest(&index);
+}
+
+TEST(AddressSanitizer, StrCmpAndFriendsLogicTest) {
+ // strcmp
+ EXPECT_EQ(0, strcmp("", ""));
+ EXPECT_EQ(0, strcmp("abcd", "abcd"));
+ EXPECT_GT(0, strcmp("ab", "ac"));
+ EXPECT_GT(0, strcmp("abc", "abcd"));
+ EXPECT_LT(0, strcmp("acc", "abc"));
+ EXPECT_LT(0, strcmp("abcd", "abc"));
+
+ // strncmp
+ EXPECT_EQ(0, strncmp("a", "b", 0));
+ EXPECT_EQ(0, strncmp("abcd", "abcd", 10));
+ EXPECT_EQ(0, strncmp("abcd", "abcef", 3));
+ EXPECT_GT(0, strncmp("abcde", "abcfa", 4));
+ EXPECT_GT(0, strncmp("a", "b", 5));
+ EXPECT_GT(0, strncmp("bc", "bcde", 4));
+ EXPECT_LT(0, strncmp("xyz", "xyy", 10));
+ EXPECT_LT(0, strncmp("baa", "aaa", 1));
+ EXPECT_LT(0, strncmp("zyx", "", 2));
+
+ // strcasecmp
+ EXPECT_EQ(0, strcasecmp("", ""));
+ EXPECT_EQ(0, strcasecmp("zzz", "zzz"));
+ EXPECT_EQ(0, strcasecmp("abCD", "ABcd"));
+ EXPECT_GT(0, strcasecmp("aB", "Ac"));
+ EXPECT_GT(0, strcasecmp("ABC", "ABCd"));
+ EXPECT_LT(0, strcasecmp("acc", "abc"));
+ EXPECT_LT(0, strcasecmp("ABCd", "abc"));
+
+ // strncasecmp
+ EXPECT_EQ(0, strncasecmp("a", "b", 0));
+ EXPECT_EQ(0, strncasecmp("abCD", "ABcd", 10));
+ EXPECT_EQ(0, strncasecmp("abCd", "ABcef", 3));
+ EXPECT_GT(0, strncasecmp("abcde", "ABCfa", 4));
+ EXPECT_GT(0, strncasecmp("a", "B", 5));
+ EXPECT_GT(0, strncasecmp("bc", "BCde", 4));
+ EXPECT_LT(0, strncasecmp("xyz", "xyy", 10));
+ EXPECT_LT(0, strncasecmp("Baa", "aaa", 1));
+ EXPECT_LT(0, strncasecmp("zyx", "", 2));
+
+ // memcmp
+ EXPECT_EQ(0, memcmp("a", "b", 0));
+ EXPECT_EQ(0, memcmp("ab\0c", "ab\0c", 4));
+ EXPECT_GT(0, memcmp("\0ab", "\0ac", 3));
+ EXPECT_GT(0, memcmp("abb\0", "abba", 4));
+ EXPECT_LT(0, memcmp("ab\0cd", "ab\0c\0", 5));
+ EXPECT_LT(0, memcmp("zza", "zyx", 3));
+}
+
+typedef int(*PointerToStrCmp)(const char*, const char*);
+void RunStrCmpTest(PointerToStrCmp StrCmp) {
+ size_t size = Ident(100);
+ int fill = 'o';
+ char *s1 = MallocAndMemsetString(size, fill);
+ char *s2 = MallocAndMemsetString(size, fill);
+ s1[size - 1] = '\0';
+ s2[size - 1] = '\0';
+ // Normal StrCmp calls
+ Ident(StrCmp(s1, s2));
+ Ident(StrCmp(s1, s2 + size - 1));
+ Ident(StrCmp(s1 + size - 1, s2 + size - 1));
+ s1[size - 1] = 'z';
+ s2[size - 1] = 'x';
+ Ident(StrCmp(s1, s2));
+ // One of arguments points to not allocated memory.
+ EXPECT_DEATH(Ident(StrCmp)(s1 - 1, s2), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrCmp)(s1, s2 - 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrCmp)(s1 + size, s2), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(StrCmp)(s1, s2 + size), RightOOBReadMessage(0));
+ // Hit unallocated memory and die.
+ s1[size - 1] = fill;
+ EXPECT_DEATH(Ident(StrCmp)(s1, s1), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(StrCmp)(s1 + size - 1, s2), RightOOBReadMessage(0));
+ free(s1);
+ free(s2);
+}
+
+TEST(AddressSanitizer, StrCmpOOBTest) {
+ RunStrCmpTest(&strcmp);
+}
+
+TEST(AddressSanitizer, StrCaseCmpOOBTest) {
+ RunStrCmpTest(&strcasecmp);
+}
+
+typedef int(*PointerToStrNCmp)(const char*, const char*, size_t);
+void RunStrNCmpTest(PointerToStrNCmp StrNCmp) {
+ size_t size = Ident(100);
+ char *s1 = MallocAndMemsetString(size);
+ char *s2 = MallocAndMemsetString(size);
+ s1[size - 1] = '\0';
+ s2[size - 1] = '\0';
+ // Normal StrNCmp calls
+ Ident(StrNCmp(s1, s2, size + 2));
+ s1[size - 1] = 'z';
+ s2[size - 1] = 'x';
+ Ident(StrNCmp(s1 + size - 2, s2 + size - 2, size));
+ s2[size - 1] = 'z';
+ Ident(StrNCmp(s1 - 1, s2 - 1, 0));
+ Ident(StrNCmp(s1 + size - 1, s2 + size - 1, 1));
+ // One of arguments points to not allocated memory.
+ EXPECT_DEATH(Ident(StrNCmp)(s1 - 1, s2, 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrNCmp)(s1, s2 - 1, 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(Ident(StrNCmp)(s1 + size, s2, 1), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(StrNCmp)(s1, s2 + size, 1), RightOOBReadMessage(0));
+ // Hit unallocated memory and die.
+ EXPECT_DEATH(Ident(StrNCmp)(s1 + 1, s2 + 1, size), RightOOBReadMessage(0));
+ EXPECT_DEATH(Ident(StrNCmp)(s1 + size - 1, s2, 2), RightOOBReadMessage(0));
+ free(s1);
+ free(s2);
+}
+
+TEST(AddressSanitizer, StrNCmpOOBTest) {
+ RunStrNCmpTest(&strncmp);
+}
+
+TEST(AddressSanitizer, StrNCaseCmpOOBTest) {
+ RunStrNCmpTest(&strncasecmp);
+}
+TEST(AddressSanitizer, StrCatOOBTest) {
+ // strcat() reads strlen(to) bytes from |to| before concatenating.
+ size_t to_size = Ident(100);
+ char *to = MallocAndMemsetString(to_size);
+ to[0] = '\0';
+ size_t from_size = Ident(20);
+ char *from = MallocAndMemsetString(from_size);
+ from[from_size - 1] = '\0';
+ // Normal strcat calls.
+ strcat(to, from);
+ strcat(to, from);
+ strcat(to + from_size, from + from_size - 2);
+ // Passing an invalid pointer is an error even when concatenating an empty
+ // string.
+ EXPECT_DEATH(strcat(to - 1, from + from_size - 1), LeftOOBAccessMessage(1));
+ // One of arguments points to not allocated memory.
+ EXPECT_DEATH(strcat(to - 1, from), LeftOOBAccessMessage(1));
+ EXPECT_DEATH(strcat(to, from - 1), LeftOOBReadMessage(1));
+ EXPECT_DEATH(strcat(to + to_size, from), RightOOBWriteMessage(0));
+ EXPECT_DEATH(strcat(to, from + from_size), RightOOBReadMessage(0));
+
+ // "from" is not zero-terminated.
+ from[from_size - 1] = 'z';
+ EXPECT_DEATH(strcat(to, from), RightOOBReadMessage(0));
+ from[from_size - 1] = '\0';
+ // "to" is not zero-terminated.
+ memset(to, 'z', to_size);
+ EXPECT_DEATH(strcat(to, from), RightOOBWriteMessage(0));
+ // "to" is too short to fit "from".
+ to[to_size - from_size + 1] = '\0';
+ EXPECT_DEATH(strcat(to, from), RightOOBWriteMessage(0));
+ // length of "to" is just enough.
+ strcat(to, from + 1);
+
+ free(to);
+ free(from);
+}
+
+TEST(AddressSanitizer, StrNCatOOBTest) {
+ // strncat() reads strlen(to) bytes from |to| before concatenating.
+ size_t to_size = Ident(100);
+ char *to = MallocAndMemsetString(to_size);
+ to[0] = '\0';
+ size_t from_size = Ident(20);
+ char *from = MallocAndMemsetString(from_size);
+ // Normal strncat calls.
+ strncat(to, from, 0);
+ strncat(to, from, from_size);
+ from[from_size - 1] = '\0';
+ strncat(to, from, 2 * from_size);
+ // Catenating empty string with an invalid string is still an error.
+ EXPECT_DEATH(strncat(to - 1, from, 0), LeftOOBAccessMessage(1));
+ strncat(to, from + from_size - 1, 10);
+ // One of arguments points to not allocated memory.
+ EXPECT_DEATH(strncat(to - 1, from, 2), LeftOOBAccessMessage(1));
+ EXPECT_DEATH(strncat(to, from - 1, 2), LeftOOBReadMessage(1));
+ EXPECT_DEATH(strncat(to + to_size, from, 2), RightOOBWriteMessage(0));
+ EXPECT_DEATH(strncat(to, from + from_size, 2), RightOOBReadMessage(0));
+
+ memset(from, 'z', from_size);
+ memset(to, 'z', to_size);
+ to[0] = '\0';
+ // "from" is too short.
+ EXPECT_DEATH(strncat(to, from, from_size + 1), RightOOBReadMessage(0));
+ // "to" is not zero-terminated.
+ EXPECT_DEATH(strncat(to + 1, from, 1), RightOOBWriteMessage(0));
+ // "to" is too short to fit "from".
+ to[0] = 'z';
+ to[to_size - from_size + 1] = '\0';
+ EXPECT_DEATH(strncat(to, from, from_size - 1), RightOOBWriteMessage(0));
+ // "to" is just enough.
+ strncat(to, from, from_size - 2);
+
+ free(to);
+ free(from);
+}
+
+static string OverlapErrorMessage(const string &func) {
+ return func + "-param-overlap";
+}
+
+TEST(AddressSanitizer, StrArgsOverlapTest) {
+ size_t size = Ident(100);
+ char *str = Ident((char*)malloc(size));
+
+// Do not check memcpy() on OS X 10.7 and later, where it actually aliases
+// memmove().
+#if !defined(__APPLE__) || !defined(MAC_OS_X_VERSION_10_7) || \
+ (MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7)
+ // Check "memcpy". Use Ident() to avoid inlining.
+ memset(str, 'z', size);
+ Ident(memcpy)(str + 1, str + 11, 10);
+ Ident(memcpy)(str, str, 0);
+ EXPECT_DEATH(Ident(memcpy)(str, str + 14, 15), OverlapErrorMessage("memcpy"));
+ EXPECT_DEATH(Ident(memcpy)(str + 14, str, 15), OverlapErrorMessage("memcpy"));
+#endif
+
+ // We do not treat memcpy with to==from as a bug.
+ // See http://llvm.org/bugs/show_bug.cgi?id=11763.
+ // EXPECT_DEATH(Ident(memcpy)(str + 20, str + 20, 1),
+ // OverlapErrorMessage("memcpy"));
+
+ // Check "strcpy".
+ memset(str, 'z', size);
+ str[9] = '\0';
+ strcpy(str + 10, str);
+ EXPECT_DEATH(strcpy(str + 9, str), OverlapErrorMessage("strcpy"));
+ EXPECT_DEATH(strcpy(str, str + 4), OverlapErrorMessage("strcpy"));
+ strcpy(str, str + 5);
+
+ // Check "strncpy".
+ memset(str, 'z', size);
+ strncpy(str, str + 10, 10);
+ EXPECT_DEATH(strncpy(str, str + 9, 10), OverlapErrorMessage("strncpy"));
+ EXPECT_DEATH(strncpy(str + 9, str, 10), OverlapErrorMessage("strncpy"));
+ str[10] = '\0';
+ strncpy(str + 11, str, 20);
+ EXPECT_DEATH(strncpy(str + 10, str, 20), OverlapErrorMessage("strncpy"));
+
+ // Check "strcat".
+ memset(str, 'z', size);
+ str[10] = '\0';
+ str[20] = '\0';
+ strcat(str, str + 10);
+ EXPECT_DEATH(strcat(str, str + 11), OverlapErrorMessage("strcat"));
+ str[10] = '\0';
+ strcat(str + 11, str);
+ EXPECT_DEATH(strcat(str, str + 9), OverlapErrorMessage("strcat"));
+ EXPECT_DEATH(strcat(str + 9, str), OverlapErrorMessage("strcat"));
+ EXPECT_DEATH(strcat(str + 10, str), OverlapErrorMessage("strcat"));
+
+ // Check "strncat".
+ memset(str, 'z', size);
+ str[10] = '\0';
+ strncat(str, str + 10, 10); // from is empty
+ EXPECT_DEATH(strncat(str, str + 11, 10), OverlapErrorMessage("strncat"));
+ str[10] = '\0';
+ str[20] = '\0';
+ strncat(str + 5, str, 5);
+ str[10] = '\0';
+ EXPECT_DEATH(strncat(str + 5, str, 6), OverlapErrorMessage("strncat"));
+ EXPECT_DEATH(strncat(str, str + 9, 10), OverlapErrorMessage("strncat"));
+
+ free(str);
+}
+
+void CallAtoi(const char *nptr) {
+ Ident(atoi(nptr));
+}
+void CallAtol(const char *nptr) {
+ Ident(atol(nptr));
+}
+void CallAtoll(const char *nptr) {
+ Ident(atoll(nptr));
+}
+typedef void(*PointerToCallAtoi)(const char*);
+
+void RunAtoiOOBTest(PointerToCallAtoi Atoi) {
+ char *array = MallocAndMemsetString(10, '1');
+ // Invalid pointer to the string.
+ EXPECT_DEATH(Atoi(array + 11), RightOOBReadMessage(1));
+ EXPECT_DEATH(Atoi(array - 1), LeftOOBReadMessage(1));
+ // Die if a buffer doesn't have terminating NULL.
+ EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
+ // Make last symbol a terminating NULL or other non-digit.
+ array[9] = '\0';
+ Atoi(array);
+ array[9] = 'a';
+ Atoi(array);
+ Atoi(array + 9);
+ // Sometimes we need to detect overflow if no digits are found.
+ memset(array, ' ', 10);
+ EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
+ array[9] = '-';
+ EXPECT_DEATH(Atoi(array), RightOOBReadMessage(0));
+ EXPECT_DEATH(Atoi(array + 9), RightOOBReadMessage(0));
+ array[8] = '-';
+ Atoi(array);
+ free(array);
+}
+
+TEST(AddressSanitizer, AtoiAndFriendsOOBTest) {
+ RunAtoiOOBTest(&CallAtoi);
+ RunAtoiOOBTest(&CallAtol);
+ RunAtoiOOBTest(&CallAtoll);
+}
+
+void CallStrtol(const char *nptr, char **endptr, int base) {
+ Ident(strtol(nptr, endptr, base));
+}
+void CallStrtoll(const char *nptr, char **endptr, int base) {
+ Ident(strtoll(nptr, endptr, base));
+}
+typedef void(*PointerToCallStrtol)(const char*, char**, int);
+
+void RunStrtolOOBTest(PointerToCallStrtol Strtol) {
+ char *array = MallocAndMemsetString(3);
+ char *endptr = NULL;
+ array[0] = '1';
+ array[1] = '2';
+ array[2] = '3';
+ // Invalid pointer to the string.
+ EXPECT_DEATH(Strtol(array + 3, NULL, 0), RightOOBReadMessage(0));
+ EXPECT_DEATH(Strtol(array - 1, NULL, 0), LeftOOBReadMessage(1));
+ // Buffer overflow if there is no terminating null (depends on base).
+ Strtol(array, &endptr, 3);
+ EXPECT_EQ(array + 2, endptr);
+ EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
+ array[2] = 'z';
+ Strtol(array, &endptr, 35);
+ EXPECT_EQ(array + 2, endptr);
+ EXPECT_DEATH(Strtol(array, NULL, 36), RightOOBReadMessage(0));
+ // Add terminating zero to get rid of overflow.
+ array[2] = '\0';
+ Strtol(array, NULL, 36);
+ // Don't check for overflow if base is invalid.
+ Strtol(array - 1, NULL, -1);
+ Strtol(array + 3, NULL, 1);
+ // Sometimes we need to detect overflow if no digits are found.
+ array[0] = array[1] = array[2] = ' ';
+ EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
+ array[2] = '+';
+ EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
+ array[2] = '-';
+ EXPECT_DEATH(Strtol(array, NULL, 0), RightOOBReadMessage(0));
+ array[1] = '+';
+ Strtol(array, NULL, 0);
+ array[1] = array[2] = 'z';
+ Strtol(array, &endptr, 0);
+ EXPECT_EQ(array, endptr);
+ Strtol(array + 2, NULL, 0);
+ EXPECT_EQ(array, endptr);
+ free(array);
+}
+
+TEST(AddressSanitizer, StrtollOOBTest) {
+ RunStrtolOOBTest(&CallStrtoll);
+}
+TEST(AddressSanitizer, StrtolOOBTest) {
+ RunStrtolOOBTest(&CallStrtol);
+}
+
+
diff --git a/gcc/testsuite/g++.dg/asan/asan_test.C b/gcc/testsuite/g++.dg/asan/asan_test.C
new file mode 100644
index 0000000000..e11531e07d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_test.C
@@ -0,0 +1,16 @@
+// { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && sse2_runtime } } }
+// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
+// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+// { dg-additional-sources "asan_globals_test-wrapper.cc" }
+// { dg-options "-fsanitize=address -fno-builtin -Wall -Wno-format -Werror -g -DASAN_UAR=0 -DASAN_HAS_EXCEPTIONS=1 -DASAN_HAS_BLACKLIST=0 -DASAN_USE_DEJAGNU_GTEST=1 -lasan -lpthread -ldl" }
+// { dg-additional-options "-DASAN_NEEDS_SEGV=1" { target { ! arm*-*-* } } }
+// { dg-additional-options "-DASAN_LOW_MEMORY=1 -DASAN_NEEDS_SEGV=0" { target arm*-*-* } }
+// { dg-additional-options "-DASAN_AVOID_EXPENSIVE_TESTS=1" { target { ! run_expensive_tests } } }
+// { dg-additional-options "-msse2" { target { i?86-*-linux* x86_64-*-linux* } } }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-final { asan-gtest } }
+
+#include "asan_test.cc"
+#include "asan_mem_test.cc"
+#include "asan_str_test.cc"
+#include "asan_oob_test.cc"
diff --git a/gcc/testsuite/g++.dg/asan/asan_test.cc b/gcc/testsuite/g++.dg/asan/asan_test.cc
new file mode 100644
index 0000000000..2df8c62cbb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_test.cc
@@ -0,0 +1,1179 @@
+//===-- asan_test.cc ------------------------------------------------------===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#include "asan_test_utils.h"
+
+NOINLINE void *malloc_fff(size_t size) {
+ void *res = malloc/**/(size); break_optimization(0); return res;}
+NOINLINE void *malloc_eee(size_t size) {
+ void *res = malloc_fff(size); break_optimization(0); return res;}
+NOINLINE void *malloc_ddd(size_t size) {
+ void *res = malloc_eee(size); break_optimization(0); return res;}
+NOINLINE void *malloc_ccc(size_t size) {
+ void *res = malloc_ddd(size); break_optimization(0); return res;}
+NOINLINE void *malloc_bbb(size_t size) {
+ void *res = malloc_ccc(size); break_optimization(0); return res;}
+NOINLINE void *malloc_aaa(size_t size) {
+ void *res = malloc_bbb(size); break_optimization(0); return res;}
+
+#ifndef __APPLE__
+NOINLINE void *memalign_fff(size_t alignment, size_t size) {
+ void *res = memalign/**/(alignment, size); break_optimization(0); return res;}
+NOINLINE void *memalign_eee(size_t alignment, size_t size) {
+ void *res = memalign_fff(alignment, size); break_optimization(0); return res;}
+NOINLINE void *memalign_ddd(size_t alignment, size_t size) {
+ void *res = memalign_eee(alignment, size); break_optimization(0); return res;}
+NOINLINE void *memalign_ccc(size_t alignment, size_t size) {
+ void *res = memalign_ddd(alignment, size); break_optimization(0); return res;}
+NOINLINE void *memalign_bbb(size_t alignment, size_t size) {
+ void *res = memalign_ccc(alignment, size); break_optimization(0); return res;}
+NOINLINE void *memalign_aaa(size_t alignment, size_t size) {
+ void *res = memalign_bbb(alignment, size); break_optimization(0); return res;}
+#endif // __APPLE__
+
+
+NOINLINE void free_ccc(void *p) { free(p); break_optimization(0);}
+NOINLINE void free_bbb(void *p) { free_ccc(p); break_optimization(0);}
+NOINLINE void free_aaa(void *p) { free_bbb(p); break_optimization(0);}
+
+
+template<typename T>
+NOINLINE void uaf_test(int size, int off) {
+ char *p = (char *)malloc_aaa(size);
+ free_aaa(p);
+ for (int i = 1; i < 100; i++)
+ free_aaa(malloc_aaa(i));
+ fprintf(stderr, "writing %ld byte(s) at %p with offset %d\n",
+ (long)sizeof(T), p, off);
+ asan_write((T*)(p + off));
+}
+
+TEST(AddressSanitizer, HasFeatureAddressSanitizerTest) {
+#if defined(__has_feature) && __has_feature(address_sanitizer)
+ bool asan = 1;
+#elif defined(__SANITIZE_ADDRESS__)
+ bool asan = 1;
+#else
+ bool asan = 0;
+#endif
+ EXPECT_EQ(true, asan);
+}
+
+TEST(AddressSanitizer, SimpleDeathTest) {
+ EXPECT_DEATH(exit(1), "");
+}
+
+TEST(AddressSanitizer, VariousMallocsTest) {
+ int *a = (int*)malloc(100 * sizeof(int));
+ a[50] = 0;
+ free(a);
+
+ int *r = (int*)malloc(10);
+ r = (int*)realloc(r, 2000 * sizeof(int));
+ r[1000] = 0;
+ free(r);
+
+ int *b = new int[100];
+ b[50] = 0;
+ delete [] b;
+
+ int *c = new int;
+ *c = 0;
+ delete c;
+
+#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__)
+ int *pm;
+ int pm_res = posix_memalign((void**)&pm, kPageSize, kPageSize);
+ EXPECT_EQ(0, pm_res);
+ free(pm);
+#endif
+
+#if !defined(__APPLE__)
+ int *ma = (int*)memalign(kPageSize, kPageSize);
+ EXPECT_EQ(0U, (uintptr_t)ma % kPageSize);
+ ma[123] = 0;
+ free(ma);
+#endif // __APPLE__
+}
+
+TEST(AddressSanitizer, CallocTest) {
+ int *a = (int*)calloc(100, sizeof(int));
+ EXPECT_EQ(0, a[10]);
+ free(a);
+}
+
+TEST(AddressSanitizer, VallocTest) {
+ void *a = valloc(100);
+ EXPECT_EQ(0U, (uintptr_t)a % kPageSize);
+ free(a);
+}
+
+#ifndef __APPLE__
+TEST(AddressSanitizer, PvallocTest) {
+ char *a = (char*)pvalloc(kPageSize + 100);
+ EXPECT_EQ(0U, (uintptr_t)a % kPageSize);
+ a[kPageSize + 101] = 1; // we should not report an error here.
+ free(a);
+
+ a = (char*)pvalloc(0); // pvalloc(0) should allocate at least one page.
+ EXPECT_EQ(0U, (uintptr_t)a % kPageSize);
+ a[101] = 1; // we should not report an error here.
+ free(a);
+}
+#endif // __APPLE__
+
+void *TSDWorker(void *test_key) {
+ if (test_key) {
+ pthread_setspecific(*(pthread_key_t*)test_key, (void*)0xfeedface);
+ }
+ return NULL;
+}
+
+void TSDDestructor(void *tsd) {
+ // Spawning a thread will check that the current thread id is not -1.
+ pthread_t th;
+ PTHREAD_CREATE(&th, NULL, TSDWorker, NULL);
+ PTHREAD_JOIN(th, NULL);
+}
+
+// This tests triggers the thread-specific data destruction fiasco which occurs
+// if we don't manage the TSD destructors ourselves. We create a new pthread
+// key with a non-NULL destructor which is likely to be put after the destructor
+// of AsanThread in the list of destructors.
+// In this case the TSD for AsanThread will be destroyed before TSDDestructor
+// is called for the child thread, and a CHECK will fail when we call
+// pthread_create() to spawn the grandchild.
+TEST(AddressSanitizer, DISABLED_TSDTest) {
+ pthread_t th;
+ pthread_key_t test_key;
+ pthread_key_create(&test_key, TSDDestructor);
+ PTHREAD_CREATE(&th, NULL, TSDWorker, &test_key);
+ PTHREAD_JOIN(th, NULL);
+ pthread_key_delete(test_key);
+}
+
+TEST(AddressSanitizer, UAF_char) {
+ const char *uaf_string = "AddressSanitizer:.*heap-use-after-free";
+ EXPECT_DEATH(uaf_test<U1>(1, 0), uaf_string);
+ EXPECT_DEATH(uaf_test<U1>(10, 0), uaf_string);
+ EXPECT_DEATH(uaf_test<U1>(10, 10), uaf_string);
+ EXPECT_DEATH(uaf_test<U1>(kLargeMalloc, 0), uaf_string);
+ EXPECT_DEATH(uaf_test<U1>(kLargeMalloc, kLargeMalloc / 2), uaf_string);
+}
+
+#if ASAN_HAS_BLACKLIST
+TEST(AddressSanitizer, IgnoreTest) {
+ int *x = Ident(new int);
+ delete Ident(x);
+ *x = 0;
+}
+#endif // ASAN_HAS_BLACKLIST
+
+struct StructWithBitField {
+ int bf1:1;
+ int bf2:1;
+ int bf3:1;
+ int bf4:29;
+};
+
+TEST(AddressSanitizer, BitFieldPositiveTest) {
+ StructWithBitField *x = new StructWithBitField;
+ delete Ident(x);
+ EXPECT_DEATH(x->bf1 = 0, "use-after-free");
+ EXPECT_DEATH(x->bf2 = 0, "use-after-free");
+ EXPECT_DEATH(x->bf3 = 0, "use-after-free");
+ EXPECT_DEATH(x->bf4 = 0, "use-after-free");
+}
+
+struct StructWithBitFields_8_24 {
+ int a:8;
+ int b:24;
+};
+
+TEST(AddressSanitizer, BitFieldNegativeTest) {
+ StructWithBitFields_8_24 *x = Ident(new StructWithBitFields_8_24);
+ x->a = 0;
+ x->b = 0;
+ delete Ident(x);
+}
+
+#if ASAN_NEEDS_SEGV
+namespace {
+
+const char kUnknownCrash[] = "AddressSanitizer: SEGV on unknown address";
+const char kOverriddenHandler[] = "ASan signal handler has been overridden\n";
+
+TEST(AddressSanitizer, WildAddressTest) {
+ char *c = (char*)0x123;
+ EXPECT_DEATH(*c = 0, kUnknownCrash);
+}
+
+void my_sigaction_sighandler(int, siginfo_t*, void*) {
+ fprintf(stderr, kOverriddenHandler);
+ exit(1);
+}
+
+void my_signal_sighandler(int signum) {
+ fprintf(stderr, kOverriddenHandler);
+ exit(1);
+}
+
+TEST(AddressSanitizer, SignalTest) {
+ struct sigaction sigact;
+ memset(&sigact, 0, sizeof(sigact));
+ sigact.sa_sigaction = my_sigaction_sighandler;
+ sigact.sa_flags = SA_SIGINFO;
+ // ASan should silently ignore sigaction()...
+ EXPECT_EQ(0, sigaction(SIGSEGV, &sigact, 0));
+#ifdef __APPLE__
+ EXPECT_EQ(0, sigaction(SIGBUS, &sigact, 0));
+#endif
+ char *c = (char*)0x123;
+ EXPECT_DEATH(*c = 0, kUnknownCrash);
+ // ... and signal().
+ EXPECT_EQ(0, signal(SIGSEGV, my_signal_sighandler));
+ EXPECT_DEATH(*c = 0, kUnknownCrash);
+}
+} // namespace
+#endif
+
+static void MallocStress(size_t n) {
+ uint32_t seed = my_rand();
+ for (size_t iter = 0; iter < 10; iter++) {
+ vector<void *> vec;
+ for (size_t i = 0; i < n; i++) {
+ if ((i % 3) == 0) {
+ if (vec.empty()) continue;
+ size_t idx = my_rand_r(&seed) % vec.size();
+ void *ptr = vec[idx];
+ vec[idx] = vec.back();
+ vec.pop_back();
+ free_aaa(ptr);
+ } else {
+ size_t size = my_rand_r(&seed) % 1000 + 1;
+#ifndef __APPLE__
+ size_t alignment = 1 << (my_rand_r(&seed) % 7 + 3);
+ char *ptr = (char*)memalign_aaa(alignment, size);
+#else
+ char *ptr = (char*) malloc_aaa(size);
+#endif
+ vec.push_back(ptr);
+ ptr[0] = 0;
+ ptr[size-1] = 0;
+ ptr[size/2] = 0;
+ }
+ }
+ for (size_t i = 0; i < vec.size(); i++)
+ free_aaa(vec[i]);
+ }
+}
+
+TEST(AddressSanitizer, MallocStressTest) {
+ MallocStress((ASAN_LOW_MEMORY) ? 20000 : 200000);
+}
+
+static void TestLargeMalloc(size_t size) {
+ char buff[1024];
+ sprintf(buff, "is located 1 bytes to the left of %lu-byte", (long)size);
+ EXPECT_DEATH(Ident((char*)malloc(size))[-1] = 0, buff);
+}
+
+TEST(AddressSanitizer, LargeMallocTest) {
+ for (int i = 113; i < (1 << 28); i = i * 2 + 13) {
+ TestLargeMalloc(i);
+ }
+}
+
+#if ASAN_LOW_MEMORY != 1
+TEST(AddressSanitizer, HugeMallocTest) {
+#ifdef __APPLE__
+ // It was empirically found out that 1215 megabytes is the maximum amount of
+ // memory available to the process under AddressSanitizer on 32-bit Mac 10.6.
+ // 32-bit Mac 10.7 gives even less (< 1G).
+ // (the libSystem malloc() allows allocating up to 2300 megabytes without
+ // ASan).
+ size_t n_megs = SANITIZER_WORDSIZE == 32 ? 500 : 4100;
+#else
+ size_t n_megs = SANITIZER_WORDSIZE == 32 ? 2600 : 4100;
+#endif
+ TestLargeMalloc(n_megs << 20);
+}
+#endif
+
+#ifndef __APPLE__
+void MemalignRun(size_t align, size_t size, int idx) {
+ char *p = (char *)memalign(align, size);
+ Ident(p)[idx] = 0;
+ free(p);
+}
+
+TEST(AddressSanitizer, memalign) {
+ for (int align = 16; align <= (1 << 23); align *= 2) {
+ size_t size = align * 5;
+ EXPECT_DEATH(MemalignRun(align, size, -1),
+ "is located 1 bytes to the left");
+ EXPECT_DEATH(MemalignRun(align, size, size + 1),
+ "is located 1 bytes to the right");
+ }
+}
+#endif
+
+TEST(AddressSanitizer, ThreadedMallocStressTest) {
+ const int kNumThreads = 4;
+ const int kNumIterations = (ASAN_LOW_MEMORY) ? 10000 : 100000;
+ pthread_t t[kNumThreads];
+ for (int i = 0; i < kNumThreads; i++) {
+ PTHREAD_CREATE(&t[i], 0, (void* (*)(void *x))MallocStress,
+ (void*)kNumIterations);
+ }
+ for (int i = 0; i < kNumThreads; i++) {
+ PTHREAD_JOIN(t[i], 0);
+ }
+}
+
+void *ManyThreadsWorker(void *a) {
+ for (int iter = 0; iter < 100; iter++) {
+ for (size_t size = 100; size < 2000; size *= 2) {
+ free(Ident(malloc(size)));
+ }
+ }
+ return 0;
+}
+
+TEST(AddressSanitizer, ManyThreadsTest) {
+ const size_t kNumThreads =
+ (SANITIZER_WORDSIZE == 32 || ASAN_AVOID_EXPENSIVE_TESTS) ? 30 : 1000;
+ pthread_t t[kNumThreads];
+ for (size_t i = 0; i < kNumThreads; i++) {
+ PTHREAD_CREATE(&t[i], 0, ManyThreadsWorker, (void*)i);
+ }
+ for (size_t i = 0; i < kNumThreads; i++) {
+ PTHREAD_JOIN(t[i], 0);
+ }
+}
+
+TEST(AddressSanitizer, ReallocTest) {
+ const int kMinElem = 5;
+ int *ptr = (int*)malloc(sizeof(int) * kMinElem);
+ ptr[3] = 3;
+ for (int i = 0; i < 10000; i++) {
+ ptr = (int*)realloc(ptr,
+ (my_rand() % 1000 + kMinElem) * sizeof(int));
+ EXPECT_EQ(3, ptr[3]);
+ }
+ free(ptr);
+ // Realloc pointer returned by malloc(0).
+ int *ptr2 = Ident((int*)malloc(0));
+ ptr2 = Ident((int*)realloc(ptr2, sizeof(*ptr2)));
+ *ptr2 = 42;
+ EXPECT_EQ(42, *ptr2);
+ free(ptr2);
+}
+
+TEST(AddressSanitizer, ZeroSizeMallocTest) {
+ // Test that malloc(0) and similar functions don't return NULL.
+ void *ptr = Ident(malloc(0));
+ EXPECT_TRUE(NULL != ptr);
+ free(ptr);
+#if !defined(__APPLE__) && !defined(ANDROID) && !defined(__ANDROID__)
+ int pm_res = posix_memalign(&ptr, 1<<20, 0);
+ EXPECT_EQ(0, pm_res);
+ EXPECT_TRUE(NULL != ptr);
+ free(ptr);
+#endif
+ int *int_ptr = new int[0];
+ int *int_ptr2 = new int[0];
+ EXPECT_TRUE(NULL != int_ptr);
+ EXPECT_TRUE(NULL != int_ptr2);
+ EXPECT_NE(int_ptr, int_ptr2);
+ delete[] int_ptr;
+ delete[] int_ptr2;
+}
+
+#ifndef __APPLE__
+static const char *kMallocUsableSizeErrorMsg =
+ "AddressSanitizer: attempting to call malloc_usable_size()";
+
+TEST(AddressSanitizer, MallocUsableSizeTest) {
+ const size_t kArraySize = 100;
+ char *array = Ident((char*)malloc(kArraySize));
+ int *int_ptr = Ident(new int);
+ EXPECT_EQ(0U, malloc_usable_size(NULL));
+ EXPECT_EQ(kArraySize, malloc_usable_size(array));
+ EXPECT_EQ(sizeof(int), malloc_usable_size(int_ptr));
+ EXPECT_DEATH(malloc_usable_size((void*)0x123), kMallocUsableSizeErrorMsg);
+ EXPECT_DEATH(malloc_usable_size(array + kArraySize / 2),
+ kMallocUsableSizeErrorMsg);
+ free(array);
+ EXPECT_DEATH(malloc_usable_size(array), kMallocUsableSizeErrorMsg);
+}
+#endif
+
+void WrongFree() {
+ int *x = (int*)malloc(100 * sizeof(int));
+ // Use the allocated memory, otherwise Clang will optimize it out.
+ Ident(x);
+ free(x + 1);
+}
+
+TEST(AddressSanitizer, WrongFreeTest) {
+ EXPECT_DEATH(WrongFree(),
+ "ERROR: AddressSanitizer: attempting free.*not malloc");
+}
+
+void DoubleFree() {
+ int *x = (int*)malloc(100 * sizeof(int));
+ fprintf(stderr, "DoubleFree: x=%p\n", x);
+ free(x);
+ free(x);
+ fprintf(stderr, "should have failed in the second free(%p)\n", x);
+ abort();
+}
+
+TEST(AddressSanitizer, DoubleFreeTest) {
+ EXPECT_DEATH(DoubleFree(), ASAN_PCRE_DOTALL
+ "ERROR: AddressSanitizer: attempting double-free"
+ ".*is located 0 bytes inside of 400-byte region"
+ ".*freed by thread T0 here"
+ ".*previously allocated by thread T0 here");
+}
+
+template<int kSize>
+NOINLINE void SizedStackTest() {
+ char a[kSize];
+ char *A = Ident((char*)&a);
+ for (size_t i = 0; i < kSize; i++)
+ A[i] = i;
+ EXPECT_DEATH(A[-1] = 0, "");
+ EXPECT_DEATH(A[-20] = 0, "");
+ EXPECT_DEATH(A[-31] = 0, "");
+ EXPECT_DEATH(A[kSize] = 0, "");
+ EXPECT_DEATH(A[kSize + 1] = 0, "");
+ EXPECT_DEATH(A[kSize + 10] = 0, "");
+ EXPECT_DEATH(A[kSize + 31] = 0, "");
+}
+
+TEST(AddressSanitizer, SimpleStackTest) {
+ SizedStackTest<1>();
+ SizedStackTest<2>();
+ SizedStackTest<3>();
+ SizedStackTest<4>();
+ SizedStackTest<5>();
+ SizedStackTest<6>();
+ SizedStackTest<7>();
+ SizedStackTest<16>();
+ SizedStackTest<25>();
+ SizedStackTest<34>();
+ SizedStackTest<43>();
+ SizedStackTest<51>();
+ SizedStackTest<62>();
+ SizedStackTest<64>();
+ SizedStackTest<128>();
+}
+
+TEST(AddressSanitizer, ManyStackObjectsTest) {
+ char XXX[10];
+ char YYY[20];
+ char ZZZ[30];
+ Ident(XXX);
+ Ident(YYY);
+ EXPECT_DEATH(Ident(ZZZ)[-1] = 0, ASAN_PCRE_DOTALL "XXX.*YYY.*ZZZ");
+}
+
+NOINLINE void LongJmpFunc1(jmp_buf buf) {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ longjmp(buf, 1);
+}
+
+NOINLINE void BuiltinLongJmpFunc1(jmp_buf buf) {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ __builtin_longjmp((void**)buf, 1);
+}
+
+NOINLINE void UnderscopeLongJmpFunc1(jmp_buf buf) {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ _longjmp(buf, 1);
+}
+
+NOINLINE void SigLongJmpFunc1(sigjmp_buf buf) {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ siglongjmp(buf, 1);
+}
+
+
+NOINLINE void TouchStackFunc() {
+ int a[100]; // long array will intersect with redzones from LongJmpFunc1.
+ int *A = Ident(a);
+ for (int i = 0; i < 100; i++)
+ A[i] = i*i;
+}
+
+// Test that we handle longjmp and do not report fals positives on stack.
+TEST(AddressSanitizer, LongJmpTest) {
+ static jmp_buf buf;
+ if (!setjmp(buf)) {
+ LongJmpFunc1(buf);
+ } else {
+ TouchStackFunc();
+ }
+}
+
+#if not defined(__ANDROID__)
+TEST(AddressSanitizer, BuiltinLongJmpTest) {
+ static jmp_buf buf;
+ if (!__builtin_setjmp((void**)buf)) {
+ BuiltinLongJmpFunc1(buf);
+ } else {
+ TouchStackFunc();
+ }
+}
+#endif // not defined(__ANDROID__)
+
+TEST(AddressSanitizer, UnderscopeLongJmpTest) {
+ static jmp_buf buf;
+ if (!_setjmp(buf)) {
+ UnderscopeLongJmpFunc1(buf);
+ } else {
+ TouchStackFunc();
+ }
+}
+
+TEST(AddressSanitizer, SigLongJmpTest) {
+ static sigjmp_buf buf;
+ if (!sigsetjmp(buf, 1)) {
+ SigLongJmpFunc1(buf);
+ } else {
+ TouchStackFunc();
+ }
+}
+
+#ifdef __EXCEPTIONS
+NOINLINE void ThrowFunc() {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ ASAN_THROW(1);
+}
+
+TEST(AddressSanitizer, CxxExceptionTest) {
+ if (ASAN_UAR) return;
+ // TODO(kcc): this test crashes on 32-bit for some reason...
+ if (SANITIZER_WORDSIZE == 32) return;
+ try {
+ ThrowFunc();
+ } catch(...) {}
+ TouchStackFunc();
+}
+#endif
+
+void *ThreadStackReuseFunc1(void *unused) {
+ // create three red zones for these two stack objects.
+ int a;
+ int b;
+
+ int *A = Ident(&a);
+ int *B = Ident(&b);
+ *A = *B;
+ pthread_exit(0);
+ return 0;
+}
+
+void *ThreadStackReuseFunc2(void *unused) {
+ TouchStackFunc();
+ return 0;
+}
+
+TEST(AddressSanitizer, ThreadStackReuseTest) {
+ pthread_t t;
+ PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc1, 0);
+ PTHREAD_JOIN(t, 0);
+ PTHREAD_CREATE(&t, 0, ThreadStackReuseFunc2, 0);
+ PTHREAD_JOIN(t, 0);
+}
+
+#if defined(__i386__) || defined(__x86_64__)
+TEST(AddressSanitizer, Store128Test) {
+ char *a = Ident((char*)malloc(Ident(12)));
+ char *p = a;
+ if (((uintptr_t)a % 16) != 0)
+ p = a + 8;
+ assert(((uintptr_t)p % 16) == 0);
+ __m128i value_wide = _mm_set1_epi16(0x1234);
+ EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
+ "AddressSanitizer: heap-buffer-overflow");
+ EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
+ "WRITE of size 16");
+ EXPECT_DEATH(_mm_store_si128((__m128i*)p, value_wide),
+ "located 0 bytes to the right of 12-byte");
+ free(a);
+}
+#endif
+
+string RightOOBErrorMessage(int oob_distance, bool is_write) {
+ assert(oob_distance >= 0);
+ char expected_str[100];
+ sprintf(expected_str, ASAN_PCRE_DOTALL "%s.*located %d bytes to the right",
+ is_write ? "WRITE" : "READ", oob_distance);
+ return string(expected_str);
+}
+
+string RightOOBWriteMessage(int oob_distance) {
+ return RightOOBErrorMessage(oob_distance, /*is_write*/true);
+}
+
+string RightOOBReadMessage(int oob_distance) {
+ return RightOOBErrorMessage(oob_distance, /*is_write*/false);
+}
+
+string LeftOOBErrorMessage(int oob_distance, bool is_write) {
+ assert(oob_distance > 0);
+ char expected_str[100];
+ sprintf(expected_str, ASAN_PCRE_DOTALL "%s.*located %d bytes to the left",
+ is_write ? "WRITE" : "READ", oob_distance);
+ return string(expected_str);
+}
+
+string LeftOOBWriteMessage(int oob_distance) {
+ return LeftOOBErrorMessage(oob_distance, /*is_write*/true);
+}
+
+string LeftOOBReadMessage(int oob_distance) {
+ return LeftOOBErrorMessage(oob_distance, /*is_write*/false);
+}
+
+string LeftOOBAccessMessage(int oob_distance) {
+ assert(oob_distance > 0);
+ char expected_str[100];
+ sprintf(expected_str, "located %d bytes to the left", oob_distance);
+ return string(expected_str);
+}
+
+char* MallocAndMemsetString(size_t size, char ch) {
+ char *s = Ident((char*)malloc(size));
+ memset(s, ch, size);
+ return s;
+}
+
+char* MallocAndMemsetString(size_t size) {
+ return MallocAndMemsetString(size, 'z');
+}
+
+#if defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
+#define READ_TEST(READ_N_BYTES) \
+ char *x = new char[10]; \
+ int fd = open("/proc/self/stat", O_RDONLY); \
+ ASSERT_GT(fd, 0); \
+ EXPECT_DEATH(READ_N_BYTES, \
+ ASAN_PCRE_DOTALL \
+ "AddressSanitizer: heap-buffer-overflow" \
+ ".* is located 0 bytes to the right of 10-byte region"); \
+ close(fd); \
+ delete [] x; \
+
+TEST(AddressSanitizer, pread) {
+ READ_TEST(pread(fd, x, 15, 0));
+}
+
+TEST(AddressSanitizer, pread64) {
+ READ_TEST(pread64(fd, x, 15, 0));
+}
+
+TEST(AddressSanitizer, read) {
+ READ_TEST(read(fd, x, 15));
+}
+#endif // defined(__linux__) && !defined(ANDROID) && !defined(__ANDROID__)
+
+// This test case fails
+// Clang optimizes memcpy/memset calls which lead to unaligned access
+TEST(AddressSanitizer, DISABLED_MemIntrinsicUnalignedAccessTest) {
+ int size = Ident(4096);
+ char *s = Ident((char*)malloc(size));
+ EXPECT_DEATH(memset(s + size - 1, 0, 2), RightOOBWriteMessage(0));
+ free(s);
+}
+
+// TODO(samsonov): Add a test with malloc(0)
+// TODO(samsonov): Add tests for str* and mem* functions.
+
+NOINLINE static int LargeFunction(bool do_bad_access) {
+ int *x = new int[100];
+ x[0]++;
+ x[1]++;
+ x[2]++;
+ x[3]++;
+ x[4]++;
+ x[5]++;
+ x[6]++;
+ x[7]++;
+ x[8]++;
+ x[9]++;
+
+ x[do_bad_access ? 100 : 0]++; int res = __LINE__;
+
+ x[10]++;
+ x[11]++;
+ x[12]++;
+ x[13]++;
+ x[14]++;
+ x[15]++;
+ x[16]++;
+ x[17]++;
+ x[18]++;
+ x[19]++;
+
+ delete x;
+ return res;
+}
+
+// Test the we have correct debug info for the failing instruction.
+// This test requires the in-process symbolizer to be enabled by default.
+TEST(AddressSanitizer, DISABLED_LargeFunctionSymbolizeTest) {
+ int failing_line = LargeFunction(false);
+ char expected_warning[128];
+ sprintf(expected_warning, "LargeFunction.*asan_test.*:%d", failing_line);
+ EXPECT_DEATH(LargeFunction(true), expected_warning);
+}
+
+// Check that we unwind and symbolize correctly.
+TEST(AddressSanitizer, DISABLED_MallocFreeUnwindAndSymbolizeTest) {
+ int *a = (int*)malloc_aaa(sizeof(int));
+ *a = 1;
+ free_aaa(a);
+ EXPECT_DEATH(*a = 1, "free_ccc.*free_bbb.*free_aaa.*"
+ "malloc_fff.*malloc_eee.*malloc_ddd");
+}
+
+static bool TryToSetThreadName(const char *name) {
+#if defined(__linux__) && defined(PR_SET_NAME)
+ return 0 == prctl(PR_SET_NAME, (unsigned long)name, 0, 0, 0);
+#else
+ return false;
+#endif
+}
+
+void *ThreadedTestAlloc(void *a) {
+ EXPECT_EQ(true, TryToSetThreadName("AllocThr"));
+ int **p = (int**)a;
+ *p = new int;
+ return 0;
+}
+
+void *ThreadedTestFree(void *a) {
+ EXPECT_EQ(true, TryToSetThreadName("FreeThr"));
+ int **p = (int**)a;
+ delete *p;
+ return 0;
+}
+
+void *ThreadedTestUse(void *a) {
+ EXPECT_EQ(true, TryToSetThreadName("UseThr"));
+ int **p = (int**)a;
+ **p = 1;
+ return 0;
+}
+
+void ThreadedTestSpawn() {
+ pthread_t t;
+ int *x;
+ PTHREAD_CREATE(&t, 0, ThreadedTestAlloc, &x);
+ PTHREAD_JOIN(t, 0);
+ PTHREAD_CREATE(&t, 0, ThreadedTestFree, &x);
+ PTHREAD_JOIN(t, 0);
+ PTHREAD_CREATE(&t, 0, ThreadedTestUse, &x);
+ PTHREAD_JOIN(t, 0);
+}
+
+TEST(AddressSanitizer, ThreadedTest) {
+ EXPECT_DEATH(ThreadedTestSpawn(),
+ ASAN_PCRE_DOTALL
+ "Thread T.*created"
+ ".*Thread T.*created"
+ ".*Thread T.*created");
+}
+
+void *ThreadedTestFunc(void *unused) {
+ // Check if prctl(PR_SET_NAME) is supported. Return if not.
+ if (!TryToSetThreadName("TestFunc"))
+ return 0;
+ EXPECT_DEATH(ThreadedTestSpawn(),
+ ASAN_PCRE_DOTALL
+ "WRITE .*thread T. .UseThr."
+ ".*freed by thread T. .FreeThr. here:"
+ ".*previously allocated by thread T. .AllocThr. here:"
+ ".*Thread T. .UseThr. created by T.*TestFunc"
+ ".*Thread T. .FreeThr. created by T"
+ ".*Thread T. .AllocThr. created by T"
+ "");
+ return 0;
+}
+
+TEST(AddressSanitizer, ThreadNamesTest) {
+ // Run ThreadedTestFunc in a separate thread because it tries to set a
+ // thread name and we don't want to change the main thread's name.
+ pthread_t t;
+ PTHREAD_CREATE(&t, 0, ThreadedTestFunc, 0);
+ PTHREAD_JOIN(t, 0);
+}
+
+#if ASAN_NEEDS_SEGV
+TEST(AddressSanitizer, ShadowGapTest) {
+#if SANITIZER_WORDSIZE == 32
+ char *addr = (char*)0x22000000;
+#else
+ char *addr = (char*)0x0000100000080000;
+#endif
+ EXPECT_DEATH(*addr = 1, "AddressSanitizer: SEGV on unknown");
+}
+#endif // ASAN_NEEDS_SEGV
+
+extern "C" {
+NOINLINE static void UseThenFreeThenUse() {
+ char *x = Ident((char*)malloc(8));
+ *x = 1;
+ free_aaa(x);
+ *x = 2;
+}
+}
+
+TEST(AddressSanitizer, UseThenFreeThenUseTest) {
+ EXPECT_DEATH(UseThenFreeThenUse(), "freed by thread");
+}
+
+TEST(AddressSanitizer, StrDupTest) {
+ free(strdup(Ident("123")));
+}
+
+// Currently we create and poison redzone at right of global variables.
+static char static110[110];
+const char ConstGlob[7] = {1, 2, 3, 4, 5, 6, 7};
+static const char StaticConstGlob[3] = {9, 8, 7};
+
+TEST(AddressSanitizer, GlobalTest) {
+ static char func_static15[15];
+
+ static char fs1[10];
+ static char fs2[10];
+ static char fs3[10];
+
+ glob5[Ident(0)] = 0;
+ glob5[Ident(1)] = 0;
+ glob5[Ident(2)] = 0;
+ glob5[Ident(3)] = 0;
+ glob5[Ident(4)] = 0;
+
+ EXPECT_DEATH(glob5[Ident(5)] = 0,
+ "0 bytes to the right of global variable.*glob5.* size 5");
+ EXPECT_DEATH(glob5[Ident(5+6)] = 0,
+ "6 bytes to the right of global variable.*glob5.* size 5");
+ Ident(static110); // avoid optimizations
+ static110[Ident(0)] = 0;
+ static110[Ident(109)] = 0;
+ EXPECT_DEATH(static110[Ident(110)] = 0,
+ "0 bytes to the right of global variable");
+ EXPECT_DEATH(static110[Ident(110+7)] = 0,
+ "7 bytes to the right of global variable");
+
+ Ident(func_static15); // avoid optimizations
+ func_static15[Ident(0)] = 0;
+ EXPECT_DEATH(func_static15[Ident(15)] = 0,
+ "0 bytes to the right of global variable");
+ EXPECT_DEATH(func_static15[Ident(15 + 9)] = 0,
+ "9 bytes to the right of global variable");
+
+ Ident(fs1);
+ Ident(fs2);
+ Ident(fs3);
+
+ // We don't create left redzones, so this is not 100% guaranteed to fail.
+ // But most likely will.
+ EXPECT_DEATH(fs2[Ident(-1)] = 0, "is located.*of global variable");
+
+ EXPECT_DEATH(Ident(Ident(ConstGlob)[8]),
+ "is located 1 bytes to the right of .*ConstGlob");
+ EXPECT_DEATH(Ident(Ident(StaticConstGlob)[5]),
+ "is located 2 bytes to the right of .*StaticConstGlob");
+
+ // call stuff from another file.
+ GlobalsTest(0);
+}
+
+TEST(AddressSanitizer, GlobalStringConstTest) {
+ static const char *zoo = "FOOBAR123";
+ const char *p = Ident(zoo);
+ EXPECT_DEATH(Ident(p[15]), "is ascii string 'FOOBAR123'");
+}
+
+TEST(AddressSanitizer, FileNameInGlobalReportTest) {
+ static char zoo[10];
+ const char *p = Ident(zoo);
+ // The file name should be present in the report.
+ EXPECT_DEATH(Ident(p[15]), "zoo.*asan_test.");
+}
+
+int *ReturnsPointerToALocalObject() {
+ int a = 0;
+ return Ident(&a);
+}
+
+#if ASAN_UAR == 1
+TEST(AddressSanitizer, LocalReferenceReturnTest) {
+ int *(*f)() = Ident(ReturnsPointerToALocalObject);
+ int *p = f();
+ // Call 'f' a few more times, 'p' should still be poisoned.
+ for (int i = 0; i < 32; i++)
+ f();
+ EXPECT_DEATH(*p = 1, "AddressSanitizer: stack-use-after-return");
+ EXPECT_DEATH(*p = 1, "is located.*in frame .*ReturnsPointerToALocal");
+}
+#endif
+
+template <int kSize>
+NOINLINE static void FuncWithStack() {
+ char x[kSize];
+ Ident(x)[0] = 0;
+ Ident(x)[kSize-1] = 0;
+}
+
+static void LotsOfStackReuse() {
+ int LargeStack[10000];
+ Ident(LargeStack)[0] = 0;
+ for (int i = 0; i < 10000; i++) {
+ FuncWithStack<128 * 1>();
+ FuncWithStack<128 * 2>();
+ FuncWithStack<128 * 4>();
+ FuncWithStack<128 * 8>();
+ FuncWithStack<128 * 16>();
+ FuncWithStack<128 * 32>();
+ FuncWithStack<128 * 64>();
+ FuncWithStack<128 * 128>();
+ FuncWithStack<128 * 256>();
+ FuncWithStack<128 * 512>();
+ Ident(LargeStack)[0] = 0;
+ }
+}
+
+TEST(AddressSanitizer, StressStackReuseTest) {
+ LotsOfStackReuse();
+}
+
+TEST(AddressSanitizer, ThreadedStressStackReuseTest) {
+ const int kNumThreads = 20;
+ pthread_t t[kNumThreads];
+ for (int i = 0; i < kNumThreads; i++) {
+ PTHREAD_CREATE(&t[i], 0, (void* (*)(void *x))LotsOfStackReuse, 0);
+ }
+ for (int i = 0; i < kNumThreads; i++) {
+ PTHREAD_JOIN(t[i], 0);
+ }
+}
+
+static void *PthreadExit(void *a) {
+ pthread_exit(0);
+ return 0;
+}
+
+TEST(AddressSanitizer, PthreadExitTest) {
+ pthread_t t;
+ for (int i = 0; i < 1000; i++) {
+ PTHREAD_CREATE(&t, 0, PthreadExit, 0);
+ PTHREAD_JOIN(t, 0);
+ }
+}
+
+#ifdef __EXCEPTIONS
+NOINLINE static void StackReuseAndException() {
+ int large_stack[1000];
+ Ident(large_stack);
+ ASAN_THROW(1);
+}
+
+// TODO(kcc): support exceptions with use-after-return.
+TEST(AddressSanitizer, DISABLED_StressStackReuseAndExceptionsTest) {
+ for (int i = 0; i < 10000; i++) {
+ try {
+ StackReuseAndException();
+ } catch(...) {
+ }
+ }
+}
+#endif
+
+TEST(AddressSanitizer, MlockTest) {
+ EXPECT_EQ(0, mlockall(MCL_CURRENT));
+ EXPECT_EQ(0, mlock((void*)0x12345, 0x5678));
+ EXPECT_EQ(0, munlockall());
+ EXPECT_EQ(0, munlock((void*)0x987, 0x654));
+}
+
+struct LargeStruct {
+ int foo[100];
+};
+
+// Test for bug http://llvm.org/bugs/show_bug.cgi?id=11763.
+// Struct copy should not cause asan warning even if lhs == rhs.
+TEST(AddressSanitizer, LargeStructCopyTest) {
+ LargeStruct a;
+ *Ident(&a) = *Ident(&a);
+}
+
+ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
+static void NoAddressSafety() {
+ char *foo = new char[10];
+ Ident(foo)[10] = 0;
+ delete [] foo;
+}
+
+TEST(AddressSanitizer, AttributeNoAddressSafetyTest) {
+ Ident(NoAddressSafety)();
+}
+
+// It doesn't work on Android, as calls to new/delete go through malloc/free.
+#if !defined(ANDROID) && !defined(__ANDROID__)
+static string MismatchStr(const string &str) {
+ return string("AddressSanitizer: alloc-dealloc-mismatch \\(") + str;
+}
+
+TEST(AddressSanitizer, AllocDeallocMismatch) {
+ EXPECT_DEATH(free(Ident(new int)),
+ MismatchStr("operator new vs free"));
+ EXPECT_DEATH(free(Ident(new int[2])),
+ MismatchStr("operator new \\[\\] vs free"));
+ EXPECT_DEATH(delete (Ident(new int[2])),
+ MismatchStr("operator new \\[\\] vs operator delete"));
+ EXPECT_DEATH(delete (Ident((int*)malloc(2 * sizeof(int)))),
+ MismatchStr("malloc vs operator delete"));
+ EXPECT_DEATH(delete [] (Ident(new int)),
+ MismatchStr("operator new vs operator delete \\[\\]"));
+ EXPECT_DEATH(delete [] (Ident((int*)malloc(2 * sizeof(int)))),
+ MismatchStr("malloc vs operator delete \\[\\]"));
+}
+#endif
+
+// ------------------ demo tests; run each one-by-one -------------
+// e.g. --gtest_filter=*DemoOOBLeftHigh --gtest_also_run_disabled_tests
+TEST(AddressSanitizer, DISABLED_DemoThreadedTest) {
+ ThreadedTestSpawn();
+}
+
+void *SimpleBugOnSTack(void *x = 0) {
+ char a[20];
+ Ident(a)[20] = 0;
+ return 0;
+}
+
+TEST(AddressSanitizer, DISABLED_DemoStackTest) {
+ SimpleBugOnSTack();
+}
+
+TEST(AddressSanitizer, DISABLED_DemoThreadStackTest) {
+ pthread_t t;
+ PTHREAD_CREATE(&t, 0, SimpleBugOnSTack, 0);
+ PTHREAD_JOIN(t, 0);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoUAFLowIn) {
+ uaf_test<U1>(10, 0);
+}
+TEST(AddressSanitizer, DISABLED_DemoUAFLowLeft) {
+ uaf_test<U1>(10, -2);
+}
+TEST(AddressSanitizer, DISABLED_DemoUAFLowRight) {
+ uaf_test<U1>(10, 10);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoUAFHigh) {
+ uaf_test<U1>(kLargeMalloc, 0);
+}
+
+TEST(AddressSanitizer, DISABLED_DemoOOM) {
+ size_t size = SANITIZER_WORDSIZE == 64 ? (size_t)(1ULL << 40) : (0xf0000000);
+ printf("%p\n", malloc(size));
+}
+
+TEST(AddressSanitizer, DISABLED_DemoDoubleFreeTest) {
+ DoubleFree();
+}
+
+TEST(AddressSanitizer, DISABLED_DemoNullDerefTest) {
+ int *a = 0;
+ Ident(a)[10] = 0;
+}
+
+TEST(AddressSanitizer, DISABLED_DemoFunctionStaticTest) {
+ static char a[100];
+ static char b[100];
+ static char c[100];
+ Ident(a);
+ Ident(b);
+ Ident(c);
+ Ident(a)[5] = 0;
+ Ident(b)[105] = 0;
+ Ident(a)[5] = 0;
+}
+
+TEST(AddressSanitizer, DISABLED_DemoTooMuchMemoryTest) {
+ const size_t kAllocSize = (1 << 28) - 1024;
+ size_t total_size = 0;
+ while (true) {
+ char *x = (char*)malloc(kAllocSize);
+ memset(x, 0, kAllocSize);
+ total_size += kAllocSize;
+ fprintf(stderr, "total: %ldM %p\n", (long)total_size >> 20, x);
+ }
+}
+
+// http://code.google.com/p/address-sanitizer/issues/detail?id=66
+TEST(AddressSanitizer, BufferOverflowAfterManyFrees) {
+ for (int i = 0; i < 1000000; i++) {
+ delete [] (Ident(new char [8644]));
+ }
+ char *x = new char[8192];
+ EXPECT_DEATH(x[Ident(8192)] = 0, "AddressSanitizer: heap-buffer-overflow");
+ delete [] Ident(x);
+}
+
+
+// Test that instrumentation of stack allocations takes into account
+// AllocSize of a type, and not its StoreSize (16 vs 10 bytes for long double).
+// See http://llvm.org/bugs/show_bug.cgi?id=12047 for more details.
+TEST(AddressSanitizer, LongDoubleNegativeTest) {
+ long double a, b;
+ static long double c;
+ memcpy(Ident(&a), Ident(&b), sizeof(long double));
+ memcpy(Ident(&c), Ident(&b), sizeof(long double));
+}
diff --git a/gcc/testsuite/g++.dg/asan/asan_test_config.h b/gcc/testsuite/g++.dg/asan/asan_test_config.h
new file mode 100644
index 0000000000..b039dc8beb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_test_config.h
@@ -0,0 +1,58 @@
+//===-- asan_test_config.h --------------------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+#if !defined(INCLUDED_FROM_ASAN_TEST_UTILS_H)
+# error "This file should be included into asan_test_utils.h only"
+#endif
+
+#ifndef ASAN_TEST_CONFIG_H
+#define ASAN_TEST_CONFIG_H
+
+#include <vector>
+#include <string>
+#include <map>
+
+#if ASAN_USE_DEJAGNU_GTEST
+# include "dejagnu-gtest.h"
+#else
+# include "gtest/gtest.h"
+#endif
+
+using std::string;
+using std::vector;
+using std::map;
+
+#ifndef ASAN_UAR
+# error "please define ASAN_UAR"
+#endif
+
+#ifndef ASAN_HAS_EXCEPTIONS
+# error "please define ASAN_HAS_EXCEPTIONS"
+#endif
+
+#ifndef ASAN_HAS_BLACKLIST
+# error "please define ASAN_HAS_BLACKLIST"
+#endif
+
+#ifndef ASAN_NEEDS_SEGV
+# error "please define ASAN_NEEDS_SEGV"
+#endif
+
+#ifndef ASAN_LOW_MEMORY
+# define ASAN_LOW_MEMORY 0
+#endif
+
+#ifndef ASAN_AVOID_EXPENSIVE_TESTS
+# define ASAN_AVOID_EXPENSIVE_TESTS 0
+#endif
+
+#define ASAN_PCRE_DOTALL ""
+
+#endif // ASAN_TEST_CONFIG_H
diff --git a/gcc/testsuite/g++.dg/asan/asan_test_utils.h b/gcc/testsuite/g++.dg/asan/asan_test_utils.h
new file mode 100644
index 0000000000..5ea7d4449f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/asan_test_utils.h
@@ -0,0 +1,109 @@
+//===-- asan_test_utils.h ---------------------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef ASAN_TEST_UTILS_H
+#define ASAN_TEST_UTILS_H
+
+#if !defined(ASAN_EXTERNAL_TEST_CONFIG)
+# define INCLUDED_FROM_ASAN_TEST_UTILS_H
+# include "asan_test_config.h"
+# undef INCLUDED_FROM_ASAN_TEST_UTILS_H
+#endif
+
+#include "sanitizer_test_utils.h"
+#include <stdio.h>
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <strings.h>
+#include <pthread.h>
+#include <stdint.h>
+#include <setjmp.h>
+#include <assert.h>
+#include <algorithm>
+#include <sys/mman.h>
+
+#ifdef __linux__
+# include <sys/prctl.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# include <fcntl.h>
+#include <unistd.h>
+#endif
+
+#if defined(__i386__) || defined(__x86_64__)
+#include <emmintrin.h>
+#endif
+
+#ifndef __APPLE__
+#include <malloc.h>
+#endif
+
+// Check that pthread_create/pthread_join return success.
+#define PTHREAD_CREATE(a, b, c, d) ASSERT_EQ(0, pthread_create(a, b, c, d))
+#define PTHREAD_JOIN(a, b) ASSERT_EQ(0, pthread_join(a, b))
+
+#if ASAN_HAS_EXCEPTIONS
+# define ASAN_THROW(x) throw (x)
+#else
+# define ASAN_THROW(x)
+#endif
+
+typedef uint8_t U1;
+typedef uint16_t U2;
+typedef uint32_t U4;
+typedef uint64_t U8;
+
+static const int kPageSize = 4096;
+
+const size_t kLargeMalloc = 1 << 24;
+
+extern void free_aaa(void *p);
+extern void *malloc_aaa(size_t size);
+
+template<typename T>
+NOINLINE void asan_write(T *a) {
+ *a = 0;
+}
+
+string RightOOBErrorMessage(int oob_distance, bool is_write);
+string RightOOBWriteMessage(int oob_distance);
+string RightOOBReadMessage(int oob_distance);
+string LeftOOBErrorMessage(int oob_distance, bool is_write);
+string LeftOOBWriteMessage(int oob_distance);
+string LeftOOBReadMessage(int oob_distance);
+string LeftOOBAccessMessage(int oob_distance);
+char* MallocAndMemsetString(size_t size, char ch);
+char* MallocAndMemsetString(size_t size);
+
+extern char glob1[1];
+extern char glob2[2];
+extern char glob3[3];
+extern char glob4[4];
+extern char glob5[5];
+extern char glob6[6];
+extern char glob7[7];
+extern char glob8[8];
+extern char glob9[9];
+extern char glob10[10];
+extern char glob11[11];
+extern char glob12[12];
+extern char glob13[13];
+extern char glob14[14];
+extern char glob15[15];
+extern char glob16[16];
+extern char glob17[17];
+extern char glob1000[1000];
+extern char glob10000[10000];
+extern char glob100000[100000];
+extern int GlobalsTest(int x);
+
+#endif // ASAN_TEST_UTILS_H
diff --git a/gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C b/gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C
new file mode 100644
index 0000000000..6ffec4c4c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/deep-stack-uaf-1.C
@@ -0,0 +1,39 @@
+// Check that we can store lots of stack frames if asked to.
+
+// { dg-do run }
+// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+// { dg-set-target-env-var ASAN_OPTIONS "malloc_context_size=120:redzone=512" }
+// { dg-options "-fno-omit-frame-pointer -fno-optimize-sibling-calls" }
+// { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } }
+// { dg-shouldfail "asan" }
+
+#include <stdlib.h>
+#include <stdio.h>
+
+template <int depth>
+struct DeepFree {
+ static void __attribute__((noinline))
+ free(char *x) {
+ DeepFree<depth - 1>::free(x);
+ }
+};
+
+template<>
+struct DeepFree<0> {
+ static void __attribute__((noinline))
+ free(char *x) {
+ ::free(x);
+ }
+};
+
+int main() {
+ char *x = (char*)malloc(10);
+ // deep_free(x);
+ DeepFree<200>::free(x);
+ return x[5];
+}
+
+// { dg-output "ERROR: AddressSanitizer:? heap-use-after-free on address.*(\n|\r\n|\r)" }
+// { dg-output " #37 0x\[0-9a-f\]+ (in \[^\n\r]*DeepFree\[^\n\r]*36|\[(\]).*(\n|\r\n|\r)" }
+// { dg-output " #99 0x\[0-9a-f\]+ (in \[^\n\r]*DeepFree\[^\n\r]*98|\[(\]).*(\n|\r\n|\r)" }
+// { dg-output " #116 0x\[0-9a-f\]+ (in \[^\n\r]*DeepFree\[^\n\r]*115|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/asan/deep-tail-call-1.C b/gcc/testsuite/g++.dg/asan/deep-tail-call-1.C
new file mode 100644
index 0000000000..5ac63f1d54
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/deep-tail-call-1.C
@@ -0,0 +1,22 @@
+// { dg-do run }
+// { dg-options "-fno-omit-frame-pointer -fno-optimize-sibling-calls" }
+// { dg-additional-options "-mno-omit-leaf-frame-pointer" { target { i?86-*-* x86_64-*-* } } }
+// { dg-shouldfail "asan" }
+
+int global[10];
+void __attribute__((noinline)) call4(int i) { global[i+10]++; }
+void __attribute__((noinline)) call3(int i) { call4(i); }
+void __attribute__((noinline)) call2(int i) { call3(i); }
+void __attribute__((noinline)) call1(int i) { call2(i); }
+volatile int one = 1;
+int main() {
+ call1(one);
+ return global[0];
+}
+
+// { dg-output "AddressSanitizer:? global-buffer-overflow.*(\n|\r\n|\r)" }
+// { dg-output " #0 0x\[0-9a-f\]+ (in \[^\n\r]*call4\[^\n\r]*|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #1 0x\[0-9a-f\]+ (in \[^\n\r]*call3\[^\n\r]*|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #2 0x\[0-9a-f\]+ (in \[^\n\r]*call2\[^\n\r]*|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #3 0x\[0-9a-f\]+ (in \[^\n\r]*call1\[^\n\r]*|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #4 0x\[0-9a-f\]+ (in \[^\n\r]*main\[^\n\r]*|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C b/gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C
new file mode 100644
index 0000000000..d5d85c42d9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/deep-thread-stack-1.C
@@ -0,0 +1,56 @@
+// { dg-do run { target pthread } }
+// { dg-options "-lasan -lpthread" }
+// { dg-shouldfail "asan" }
+
+#include <pthread.h>
+
+int *x;
+
+void *AllocThread(void *arg) {
+ x = new int;
+ *x = 42;
+ return NULL;
+}
+
+void *FreeThread(void *arg) {
+ delete x;
+ return NULL;
+}
+
+void *AccessThread(void *arg) {
+ *x = 43; // BOOM
+ return NULL;
+}
+
+typedef void* (*callback_type)(void* arg);
+
+void *RunnerThread(void *function) {
+ pthread_t thread;
+ pthread_create(&thread, NULL, (callback_type)function, NULL);
+ pthread_join(thread, NULL);
+ return NULL;
+}
+
+void RunThread(callback_type function) {
+ pthread_t runner;
+ pthread_create(&runner, NULL, RunnerThread, (void*)function);
+ pthread_join(runner, NULL);
+}
+
+int main(int argc, char *argv[]) {
+ RunThread(AllocThread);
+ RunThread(FreeThread);
+ RunThread(AccessThread);
+ return (x != 0);
+}
+
+// { dg-output "ERROR: AddressSanitizer: heap-use-after-free.*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*WRITE of size 4 at 0x\[0-9a-f\]+ thread T(\[0-9\]+).*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*freed by thread T(\[0-9\]+) here:.*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*previously allocated by thread T(\[0-9\]+) here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\2 created by T(\[0-9\]+) here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\8 created by T0 here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\4 created by T(\[0-9\]+) here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\11 created by T0 here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\6 created by T(\[0-9\]+) here:.*(\n|\r\n|\r)" }
+// { dg-output "Thread T\\14 created by T0 here:" }
diff --git a/gcc/testsuite/g++.dg/asan/default-options-1.C b/gcc/testsuite/g++.dg/asan/default-options-1.C
new file mode 100644
index 0000000000..cdcb370d14
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/default-options-1.C
@@ -0,0 +1,15 @@
+// { dg-do run }
+
+const char *kAsanDefaultOptions="verbosity=1 foo=bar";
+
+extern "C"
+__attribute__((no_sanitize_address))
+const char *__asan_default_options() {
+ return kAsanDefaultOptions;
+}
+
+int main() {
+ return 0;
+}
+
+// { dg-output "Using the defaults from __asan_default_options:.* foo=bar.*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h b/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h
new file mode 100644
index 0000000000..2b4057c850
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/dejagnu-gtest.h
@@ -0,0 +1,120 @@
+#ifndef DEJAGNU_GTEST_H
+#define DEJAGNU_GTEST_H 1
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#ifdef __cplusplus
+#include <string>
+#endif
+
+struct dejagnu_gtest_test
+{
+ const char *name;
+ void (*fn) (void);
+ struct dejagnu_gtest_test *next;
+};
+struct dejagnu_gtest_test *dejagnu_gtest_test_first, *dejagnu_gtest_test_last;
+int dejagnu_gtest_test_death_num, dejagnu_gtest_test_death_cur_num;
+
+#define TEST(cond, name) \
+static void cond##_##name##_fn (void); \
+static struct dejagnu_gtest_test cond##_##name##_struct \
+ = { #cond "_" #name, cond##_##name##_fn, NULL }; \
+static __attribute__((__constructor__)) void \
+cond##_##name##_ctor (void) \
+{ \
+ if (strncmp (#name, "DISABLED_", 9) == 0) \
+ return; \
+ if (dejagnu_gtest_test_first == NULL) \
+ dejagnu_gtest_test_first = &cond##_##name##_struct; \
+ else \
+ dejagnu_gtest_test_last->next = &cond##_##name##_struct; \
+ dejagnu_gtest_test_last = &cond##_##name##_struct; \
+} \
+static void \
+cond##_##name##_fn (void)
+
+#ifndef __cplusplus
+# define DEJAGNU_GTEST_TOCSTR(regex) (regex)
+#else
+static inline const char *DEJAGNU_GTEST_TOCSTR(const char *x) { return x; }
+static inline const char *DEJAGNU_GTEST_TOCSTR(const std::string &x) { return x.c_str (); }
+#endif
+
+#define EXPECT_DEATH(statement, regex) \
+do \
+ { \
+ ++dejagnu_gtest_test_death_cur_num; \
+ if (dejagnu_gtest_test_death_num == 0) \
+ { \
+ fprintf (stderr, "DEJAGNU_GTEST_EXPECT_DEATH%d %s " \
+ "DEJAGNU_GTEST_EXPECT_DEATH%d %s " \
+ "DEJAGNU_GTEST_EXPECT_DEATH%d\n", \
+ dejagnu_gtest_test_death_cur_num, #statement, \
+ dejagnu_gtest_test_death_cur_num, \
+ DEJAGNU_GTEST_TOCSTR (regex), \
+ dejagnu_gtest_test_death_cur_num); \
+ } \
+ else if (dejagnu_gtest_test_death_cur_num \
+ == dejagnu_gtest_test_death_num) \
+ { \
+ statement; \
+ } \
+ } \
+while (0)
+
+#define EXPECT_TRUE(condition) \
+ if (!(condition)) \
+ { \
+ fprintf (stderr, "EXPECT_TRUE failed: " #condition "\n"); \
+ exit (1); \
+ }
+#define EXPECT_FALSE(condition) EXPECT_TRUE (!condition)
+#define EXPECT_EQ(expected, actual) EXPECT_TRUE ((expected) == (actual))
+#define EXPECT_NE(expected, actual) EXPECT_TRUE ((expected) != (actual))
+#define EXPECT_LT(expected, actual) EXPECT_TRUE ((expected) < (actual))
+#define EXPECT_LE(expected, actual) EXPECT_TRUE ((expected) <= (actual))
+#define EXPECT_GT(expected, actual) EXPECT_TRUE ((expected) > (actual))
+#define EXPECT_GE(expected, actual) EXPECT_TRUE ((expected) >= (actual))
+#define ASSERT_DEATH(statement, regex) EXPECT_DEATH (statement, regex)
+#define ASSERT_TRUE(condition) EXPECT_TRUE (condition)
+#define ASSERT_FALSE(condition) EXPECT_FALSE (condition)
+#define ASSERT_EQ(expected, actual) EXPECT_EQ (expected, actual)
+#define ASSERT_NE(expected, actual) EXPECT_NE (expected, actual)
+#define ASSERT_LT(expected, actual) EXPECT_LT (expected, actual)
+#define ASSERT_LE(expected, actual) EXPECT_LE (expected, actual)
+#define ASSERT_GT(expected, actual) EXPECT_GT (expected, actual)
+#define ASSERT_GE(expected, actual) EXPECT_GE (expected, actual)
+
+int
+main (int argc, const char **argv)
+{
+ const char *test = NULL;
+ struct dejagnu_gtest_test *t;
+ if (argc > 1)
+ test = argv[1];
+ else
+ test = getenv ("DEJAGNU_GTEST_ARG");
+ if (test == NULL)
+ for (t = dejagnu_gtest_test_first; t; t = t->next)
+ fprintf (stderr, "DEJAGNU_GTEST_TEST %s\n", t->name);
+ else
+ {
+ const char *p = strchr (test, ':');
+ if (p != NULL)
+ dejagnu_gtest_test_death_num = atoi (p + 1);
+ for (t = dejagnu_gtest_test_first; t; t = t->next)
+ if (p != NULL
+ ? (strncmp (test, t->name, p - test) == 0
+ && t->name[p - test] == '\0')
+ : (strcmp (test, t->name) == 0))
+ break;
+ EXPECT_TRUE (t != NULL);
+ t->fn ();
+ }
+ return 0;
+}
+
+#endif
diff --git a/gcc/testsuite/g++.dg/asan/dlclose-test-1-so.cc b/gcc/testsuite/g++.dg/asan/dlclose-test-1-so.cc
new file mode 100644
index 0000000000..99f00e2300
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/dlclose-test-1-so.cc
@@ -0,0 +1,32 @@
+//===----------- dlclose-test-so.cc -----------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+// Regression test for
+// http://code.google.com/p/address-sanitizer/issues/detail?id=19
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+static int pad1;
+static int static_var;
+static int pad2;
+
+extern "C"
+int *get_address_of_static_var() {
+ return &static_var;
+}
+
+__attribute__((constructor))
+void at_dlopen() {
+ printf("%s: I am being dlopened\n", __FILE__);
+}
+__attribute__((destructor))
+void at_dlclose() {
+ printf("%s: I am being dlclosed\n", __FILE__);
+}
diff --git a/gcc/testsuite/g++.dg/asan/interception-failure-test-1.C b/gcc/testsuite/g++.dg/asan/interception-failure-test-1.C
new file mode 100644
index 0000000000..d326e56cf9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/interception-failure-test-1.C
@@ -0,0 +1,22 @@
+// If user provides his own libc functions, ASan doesn't
+// intercept these functions.
+
+// { dg-do run }
+// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+
+#include <stdlib.h>
+#include <stdio.h>
+
+extern "C" long strtol(const char *nptr, char **endptr, int base) {
+ fprintf(stderr, "my_strtol_interceptor\n");
+ return 0;
+}
+
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return (int)strtol(x, 0, 10);
+}
+
+// { dg-output "my_strtol_interceptor" }
diff --git a/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C b/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C
new file mode 100644
index 0000000000..e64c184a48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/interception-malloc-test-1.C
@@ -0,0 +1,25 @@
+// ASan interceptor can be accessed with __interceptor_ prefix.
+
+// { dg-do run { target *-*-linux* } }
+// { dg-options "-fno-builtin-free" }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-shouldfail "asan" }
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <unistd.h>
+
+extern "C" void *__interceptor_malloc(size_t size);
+extern "C" void *malloc(size_t size) {
+ write(2, "malloc call\n", sizeof("malloc call\n") - 1);
+ return __interceptor_malloc(size);
+}
+
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return (int)strtol(x, 0, 10);
+}
+
+// { dg-output "malloc call.*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*heap-use-after-free" }
diff --git a/gcc/testsuite/g++.dg/asan/interception-test-1.C b/gcc/testsuite/g++.dg/asan/interception-test-1.C
new file mode 100644
index 0000000000..79248e06df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/interception-test-1.C
@@ -0,0 +1,25 @@
+// ASan interceptor can be accessed with __interceptor_ prefix.
+
+// { dg-do run }
+// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
+// { dg-additional-options "-D__NO_INLINE__" { target { *-*-linux-gnu } } }
+// { dg-shouldfail "asan" }
+// { dg-skip-if "Darwin uses mac function interposition" { *-*-darwin* } }
+
+#include <stdlib.h>
+#include <stdio.h>
+
+extern "C" long __interceptor_strtol(const char *nptr, char **endptr, int base);
+extern "C" long strtol(const char *nptr, char **endptr, int base) {
+ fprintf(stderr, "my_strtol_interceptor\n");
+ return __interceptor_strtol(nptr, endptr, base);
+}
+
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return (int)strtol(x, 0, 10);
+}
+
+// { dg-output "my_strtol_interceptor.*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*heap-use-after-free" }
diff --git a/gcc/testsuite/g++.dg/asan/large-func-test-1.C b/gcc/testsuite/g++.dg/asan/large-func-test-1.C
new file mode 100644
index 0000000000..9344c3bcff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/large-func-test-1.C
@@ -0,0 +1,45 @@
+// { dg-do run }
+// { dg-shouldfail "asan" }
+
+#include <stdlib.h>
+__attribute__((noinline))
+static void LargeFunction(int *x, int zero) {
+ x[0]++;
+ x[1]++;
+ x[2]++;
+ x[3]++;
+ x[4]++;
+ x[5]++;
+ x[6]++;
+ x[7]++;
+ x[8]++;
+ x[9]++;
+
+ x[zero + 111]++; // we should report this exact line
+
+ x[10]++;
+ x[11]++;
+ x[12]++;
+ x[13]++;
+ x[14]++;
+ x[15]++;
+ x[16]++;
+ x[17]++;
+ x[18]++;
+ x[19]++;
+}
+volatile int one = 1;
+int main() {
+ int *x = new int[100];
+ LargeFunction(x, one - 1);
+ delete x;
+}
+
+// { dg-output "ERROR: AddressSanitizer:? heap-buffer-overflow on address\[^\n\r]*" }
+// { dg-output "0x\[0-9a-f\]+ at pc 0x\[0-9a-f\]+ bp 0x\[0-9a-f\]+ sp 0x\[0-9a-f\]+\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*READ of size 4 at 0x\[0-9a-f\]+ thread T0\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #0 0x\[0-9a-f\]+ (in \[^\n\r]*LargeFunction\[^\n\r]*(large-func-test-1.C:18|\[^\n\r]*:0)|\[(\]).*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*0x\[0-9a-f\]+ is located 44 bytes to the right of 400-byte region.*(\n|\r\n|\r)" }
+// { dg-output "\[^\n\r]*allocated by thread T0 here:\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #0( 0x\[0-9a-f\]+ (in _*(interceptor_|)malloc|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
+// { dg-output " #1|) 0x\[0-9a-f\]+ (in (operator new|_*_Zn\[aw\]\[mj\])|\[(\])\[^\n\r]*(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/g++.dg/asan/pr55617.C b/gcc/testsuite/g++.dg/asan/pr55617.C
new file mode 100644
index 0000000000..02f0daea1e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr55617.C
@@ -0,0 +1,8 @@
+// { dg-do run }
+
+struct c18 {
+ virtual void bar() { }
+};
+c18 ret;
+int main () {
+}
diff --git a/gcc/testsuite/g++.dg/asan/pr62017.C b/gcc/testsuite/g++.dg/asan/pr62017.C
new file mode 100644
index 0000000000..74ef37fd2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/pr62017.C
@@ -0,0 +1,17 @@
+// PR c++/62017
+// { dg-do run }
+
+struct A
+{
+ int x;
+ virtual ~A () {}
+};
+struct B : public virtual A {};
+struct C : public virtual A {};
+struct D : public B, virtual public C {};
+
+int
+main ()
+{
+ D d;
+}
diff --git a/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h b/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h
new file mode 100644
index 0000000000..99720c354f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/sanitizer_test_utils.h
@@ -0,0 +1,78 @@
+//===-- sanitizer_test_utils.h ----------------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of *Sanitizer runtime.
+// Common unit tests utilities.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef SANITIZER_TEST_UTILS_H
+#define SANITIZER_TEST_UTILS_H
+
+#if defined(_WIN32)
+typedef unsigned __int8 uint8_t;
+typedef unsigned __int16 uint16_t;
+typedef unsigned __int32 uint32_t;
+typedef unsigned __int64 uint64_t;
+typedef __int8 int8_t;
+typedef __int16 int16_t;
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+# define NOINLINE __declspec(noinline)
+# define USED
+#else // defined(_WIN32)
+# define NOINLINE __attribute__((noinline))
+# define USED __attribute__((used))
+#include <stdint.h>
+#endif // defined(_WIN32)
+
+#if !defined(__has_feature)
+#define __has_feature(x) 0
+#endif
+
+#if __has_feature(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS \
+ __attribute__((no_sanitize_address))
+#else
+# define ATTRIBUTE_NO_ADDRESS_SAFETY_ANALYSIS
+#endif
+
+#if __LP64__ || defined(_WIN64)
+# define SANITIZER_WORDSIZE 64
+#else
+# define SANITIZER_WORDSIZE 32
+#endif
+
+// Make the compiler thinks that something is going on there.
+inline void break_optimization(void *arg) {
+ __asm__ __volatile__("" : : "r" (arg) : "memory");
+}
+
+// This function returns its parameter but in such a way that compiler
+// can not prove it.
+template<class T>
+NOINLINE
+static T Ident(T t) {
+ T ret = t;
+ break_optimization(&ret);
+ return ret;
+}
+
+// Simple stand-alone pseudorandom number generator.
+// Current algorithm is ANSI C linear congruential PRNG.
+static inline uint32_t my_rand_r(uint32_t* state) {
+ return (*state = *state * 1103515245 + 12345) >> 16;
+}
+
+static uint32_t global_seed = 0;
+
+static inline uint32_t my_rand() {
+ return my_rand_r(&global_seed);
+}
+
+
+#endif // SANITIZER_TEST_UTILS_H
diff --git a/gcc/testsuite/g++.dg/asan/shared-lib-test-1-so.cc b/gcc/testsuite/g++.dg/asan/shared-lib-test-1-so.cc
new file mode 100644
index 0000000000..7548bc02a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/shared-lib-test-1-so.cc
@@ -0,0 +1,20 @@
+//===----------- shared-lib-test-so.cc --------------------------*- C++ -*-===//
+//
+// This file is distributed under the University of Illinois Open Source
+// License. See LICENSE.TXT for details.
+//
+//===----------------------------------------------------------------------===//
+//
+// This file is a part of AddressSanitizer, an address sanity checker.
+//
+//===----------------------------------------------------------------------===//
+
+#include <stdio.h>
+
+int pad[10];
+int GLOB[10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+
+extern "C"
+void inc(int index) {
+ GLOB[index]++;
+}
diff --git a/gcc/testsuite/g++.dg/asan/symbolize-callback-1.C b/gcc/testsuite/g++.dg/asan/symbolize-callback-1.C
new file mode 100644
index 0000000000..9978958f9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/asan/symbolize-callback-1.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// { dg-skip-if "" { *-*-* } { "*" } { "-O2" } }
+// { dg-options "-fno-builtin-malloc -fno-builtin-free" }
+// { dg-shouldfail "asan" }
+
+#include <stdio.h>
+#include <stdlib.h>
+
+extern "C"
+bool __asan_symbolize(const void *, char *out_buffer, int out_size) {
+ snprintf(out_buffer, out_size, "MySymbolizer");
+ return true;
+}
+
+int main() {
+ char *x = (char*)malloc(10);
+ free(x);
+ return x[5];
+}
+
+// { dg-output "MySymbolizer" }
diff --git a/gcc/testsuite/g++.dg/bprob/bprob.exp b/gcc/testsuite/g++.dg/bprob/bprob.exp
index bb0d4643ac..8b68b859dd 100644
--- a/gcc/testsuite/g++.dg/bprob/bprob.exp
+++ b/gcc/testsuite/g++.dg/bprob/bprob.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/cdce3.C b/gcc/testsuite/g++.dg/cdce3.C
index 1174b19268..726e9ec512 100644
--- a/gcc/testsuite/g++.dg/cdce3.C
+++ b/gcc/testsuite/g++.dg/cdce3.C
@@ -1,12 +1,12 @@
/* { dg-do run } */
/* { dg-require-effective-target c99_runtime } */
-/* { dg-skip-if "exp2* missing despite C99 runtime" { alpha*-dec-osf5* } } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
/* { dg-additional-options "-DLARGE_LONG_DOUBLE" { target large_long_double } } */
/* { dg-additional-options "-DGNU_EXTENSION" { target pow10 } } */
/* { dg-add-options ieee } */
+/* { dg-final { scan-tree-dump "cdce3.C:92: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
/* { dg-final { scan-tree-dump "cdce3.C:93: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
-/* { dg-final { scan-tree-dump "cdce3.C:94: note: function call is shrink-wrapped into error conditions\." "cdce" { target pow10 } } } */
+/* { dg-final { scan-tree-dump "cdce3.C:95: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:96: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:97: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:98: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
@@ -20,7 +20,6 @@
/* { dg-final { scan-tree-dump "cdce3.C:106: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:107: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { scan-tree-dump "cdce3.C:108: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
-/* { dg-final { scan-tree-dump "cdce3.C:109: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { cleanup-tree-dump "cdce" } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/g++.dg/charset/charset.exp b/gcc/testsuite/g++.dg/charset/charset.exp
index fe35f6a440..3ca071eea5 100644
--- a/gcc/testsuite/g++.dg/charset/charset.exp
+++ b/gcc/testsuite/g++.dg/charset/charset.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/array_test1_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test1_tplt.cc
new file mode 100644
index 0000000000..e9ee7ec638
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test1_tplt.cc
@@ -0,0 +1,118 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <cstdlib>
+#include <string.h>
+#if HAVE_IO
+#include <cstdio>
+#endif
+template <class T> int main2 (char **argv);
+
+int main (void)
+{
+ int x = 1, y = 1, z = 1;
+ char *array[2];
+ array[0] = strdup ("a.out");
+ array[1] = strdup ("5");
+ x = main2<unsigned char> (array);
+ x += main2<char> (array);
+ y = main2<short> (array);
+ y += main2<unsigned short> (array);
+ y += main2<int> (array);
+ y += main2<unsigned int> (array);
+ z = main2<long> (array);
+ z += main2<long long> (array);
+ y += main2<float> (array);
+ z += main2<double> (array);
+
+ return x+y+z;
+}
+template <class T>
+int main2 (char **argv)
+{
+ T array[10];
+ int ii = 0, x = 2, z= 0 , y = 0;
+
+ for (ii = 0; ii < 10; ii++)
+ array[ii] = 10;
+
+ array[0:10:1] = (T)15;
+
+ for (ii = 0; ii < 10; ii++)
+ if (array[ii] != (T)15)
+ return 1;
+
+
+ array[0:5:2] = (T)20;
+
+ for (ii = 0; ii < 10; ii += 2)
+ if (array[ii] != (T)20)
+ return 2;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+
+ array[x:5:z] = (T)50;
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != (T)50)
+ return 3;
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]); /* (10 - 5) / 5 = 1 */
+ y = 10-atoi(argv[1]);
+
+ array[x:y:z] = (T)52;
+#if HAVE_IO
+ for (ii = atoi ("5"); ii < (atoi ("5") + atoi ("5")); ii += atoi ("1"))
+ std::printf("%d\t", (int)array[ii]);
+ std::printf("\n");
+#endif
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != (T)52)
+ return 4;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] = (T)25;
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != (T)25)
+ return 5;
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
+ (T)14;
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != (T)14)
+ return 6;
+
+
+ array[atoi("5"):5:1] = (T)65;
+
+ for (ii = atoi ("5"); ii < 10; ii++)
+ if (array[ii] != (T)65)
+ return 7;
+
+
+ array[atoi("5"):atoi("5"):atoi("1")] = 99;
+
+#if HAVE_IO
+ for (ii = atoi ("5"); ii < (atoi ("5") + atoi ("5")); ii += atoi ("1"))
+ std::printf("%d\t", (int)array[ii]);
+ std::printf("\n");
+#endif
+
+ for (ii = atoi ("5"); ii < (atoi ("5") + atoi ("5")); ii += atoi ("1"))
+ if (array[ii] != (T)99)
+ return 8;
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/array_test2_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test2_tplt.cc
new file mode 100644
index 0000000000..041c052897
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test2_tplt.cc
@@ -0,0 +1,141 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus -Wno-overflow" } */
+
+#include <cstdlib>
+#include <string.h>
+template <class T> int main2(char **argv);
+int main(void)
+{
+ int x = 1, y = 1, z = 1, w = 1;
+ char *array[2];
+ array[0] = strdup ("a.out");
+ array[1] = strdup ("5");
+ w = main2<short>(array);
+ w += main2<unsigned short> (array);
+ x = main2<char> (array);
+ x += main2<unsigned char> (array);
+ y = main2<int> (array);
+ y += main2<unsigned int> (array);
+ z = main2<long> (array);
+ z += main2<unsigned long> (array);
+ z += main2<long long> (array);
+
+ return (w+x+y+z);
+}
+
+template<class T>
+int main2(char **argv)
+{
+ T array[10], array2[10];
+ int ii = 0, x = 2, z= 0 , y = 0 ;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+
+ array2[0:10:1] = array[0:10:1];
+
+ for (ii = 0; ii < 10; ii++)
+ if (array2[ii] != array[ii])
+ return 1;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+
+ array2[0:5:2] = array[0:5:2];
+
+ for (ii = 0; ii < 10; ii += 2)
+ if (array[ii] != array2[ii])
+ return 2;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 10;
+ array2[ii] = 5000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+
+ array2[x:5:z] = array[x:5:z];
+
+ for (ii = x; ii < 5; ii += z)
+ if (array2[ii] != array[ii])
+ return 3;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array2[x:y:z] = array[x:y:z];
+ for (ii = x; ii < 10; ii = ii + z)
+ if (array2[ii] != array[ii])
+ return 4;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ array[x:y:((10-atoi(argv[1]))/atoi(argv[1]))] =
+ array2[x:y:((10-atoi(argv[1]))/atoi(argv[1]))];
+
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != array2[ii])
+ return 6;
+
+
+ x = atoi(argv[1]);
+ z = (10-atoi(argv[1]))/atoi(argv[1]);
+ y = 10-atoi(argv[1]);
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 500;
+ array2[ii] = 1000000;
+ }
+
+ array[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))] =
+ array2[atoi(argv[1]):(10-atoi(argv[1])):((10-atoi(argv[1]))/atoi(argv[1]))];
+ for (ii = x; ii < 10; ii += z)
+ if (array[ii] != array2[ii])
+ return 6;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 4;
+ array2[ii] = 2;
+ }
+
+ array[atoi("5"):5:1] = array2[atoi("5"):5:1];
+
+ for (ii = atoi ("5"); ii < 10; ii++)
+ if (array[ii] != array2[ii])
+ return 7;
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ array[ii] = 5;
+ array2[ii] = 1;
+ }
+ array[atoi("5"):atoi("5"):atoi("1")] = array2[atoi("5"):atoi("5"):atoi("1")];
+
+ for (ii = 5; ii < 10; ii++)
+ if (array2[ii] != array[ii])
+ return 8;
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/array_test_ND_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test_ND_tplt.cc
new file mode 100644
index 0000000000..479ba13489
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/array_test_ND_tplt.cc
@@ -0,0 +1,115 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#include <cstdlib>
+#include<string.h>
+template <class T> int main2(char **argv);
+
+int main(void)
+{
+ int x = 1, y=1, z=1, w = 1;
+ char *array[3];
+ array[0] = strdup ("a.out");
+ array[1] = strdup ("10");
+ array[2] = strdup ("15");
+ w = main2<char> (array);
+ w += main2<unsigned char> (array);
+ x = main2<int> (array);
+ x += main2<unsigned int> (array);
+ y = main2<long> (array);
+ y += main2<unsigned long> (array);
+ z = main2<short> (array);
+ z += main2<unsigned short> (array);
+ return x+y+z;
+}
+
+template <class T>
+int main2(char **argv)
+{
+ T array[10][15];
+ T array_2[10][15];
+ int ii = 0, jj = 0,x = 0, z= 1 , y = 10 ,argc = 3;
+
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ array_2[0:5:2][0:5:3] = array[0:5:2][0:5:3] + 1 + 5 + array[0][5] + x;
+
+ for (ii = 0; ii < 10; ii += 2)
+ {
+ for (jj = 0; jj < 15; jj += 3)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + 1 + 5 + array[0][5] + x)
+ return 1;
+ }
+ }
+
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = atoi(argv[1]);
+ y = atoi(argv[2]);
+ array_2[0:x:1][0:y:1] = array[0:x:1][0:y:1] + x + y + array[0:x:1][0:y:1];
+
+ for (ii = 0; ii < x; ii++)
+ {
+ for (jj = 0; jj < y; jj++)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + x + y + array[ii][jj])
+ return 2;
+ }
+ }
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = atoi(argv[1]);
+ y = atoi(argv[2]);
+ z = (20- atoi (argv[1]))/atoi(argv[1]);
+ /* (20-10)/10 evaluates to 1 all the time :-). */
+ array_2[0:x:z][0:y:z] = array[0:x:z][0:y:z] + array[0:x:z][0:y:z] + y + z;
+
+ for (ii = 0; ii < x; ii += z)
+ {
+ for (jj = 0; jj < y; jj += z)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] + y + z)
+ return 3;
+ }
+ }
+
+
+
+ for (ii = 0; ii < 10; ii++) {
+ for (jj = 0; jj< 15; jj++) {
+ array[ii][jj] = ii+jj;
+ array_2[ii][jj] = 0;
+ }
+ }
+ x = argc-3;
+ y = 20-atoi(argv[1]);
+ z = (20- atoi (argv[1]))/atoi(argv[1]);
+ /* (20-10)/10 evaluates to 1 all the time :-). */
+ array_2[(argc-3):(20-atoi(argv[1])):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): ((30-atoi(argv[2]))/atoi(argv[2]))] = array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] + array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])] * array[(argc-3):20-atoi(argv[1]):(20-atoi(argv[1]))/atoi(argv[1])][(argc-3):(30-atoi(argv[2])): (30-atoi(argv[2]))/atoi(argv[2])];
+
+ for (ii = 0; ii < 10; ii++)
+ {
+ for (jj = 0; jj < 15; jj++)
+ {
+ if (array_2[ii][jj] != array[ii][jj] + array[ii][jj] * array[ii][jj])
+ return 4;
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/braced_list.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/braced_list.cc
new file mode 100644
index 0000000000..3521f87258
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/braced_list.cc
@@ -0,0 +1,13 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-fcilkplus" } */
+
+int main (void)
+{
+ int Array[100], Array2[100];
+
+ Array[{1,2}:2] = 5; /* { dg-error "braced list index is not allowed" } */
+ Array[1:{1,2}:2] = 5; /* { dg-error "expected primary-expression before" } */
+ Array[1:10:{1,2}] = 5; /* { dg-error "expected primary-expression before" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc
new file mode 100644
index 0000000000..3d9e87bceb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_custom_tplt.cc
@@ -0,0 +1,126 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus " } */
+
+#if HAVE_IO
+#include <cstdio>
+#endif
+
+#include <cstdlib>
+
+template <class T>
+T my_func (T x, T y)
+{
+ if (x > y)
+ return x;
+ else
+ return y;
+}
+
+template <class T>
+T main_func (T *array, T *array2, T identity_val, int size)
+{
+ T result;
+
+ result = __sec_reduce (identity_val, array[0:size:1] * array2[0:size:1],
+ my_func); // my_func (identity_val, array[5] * array2[5]);
+ return result;
+}
+int main (void)
+{
+ int i_index = 0, f_index = 0, d_index = 0, l_index = 0;
+ int iarray[10], iarray2[10], i_result, i_max;
+ long larray[10], larray2[10], l_result, l_max;
+ float farray[10], farray2[10], f_result, f_max;
+ double darray[10], darray2[10], d_result, d_max;
+ for (int ii = 0; ii < 10; ii++)
+ {
+ if (ii%2 && ii)
+ {
+ darray[ii] = (double)(1.0000/(double)ii);
+ farray[ii] = (float)(1.00/(float)ii);
+ }
+ else
+ {
+ darray[ii] = (double) ii + 0.10;
+ farray[ii] = (float) (1.00/((float)(ii+1.000)));
+ }
+ darray2[ii] = (double) (1.00000/ (double)(ii+1));
+ farray2[ii] = (float) (1.00/ (float)(ii+1));
+ }
+
+ for (int ii = 0; ii < 10; ii++)
+ {
+ iarray[ii] = ii;
+ larray[ii] = (long)ii;
+ }
+
+ for (int ii = 0; ii < 10; ii++)
+ {
+ iarray2[ii] = (ii-5);
+ larray2[ii] = long (ii-5);
+ }
+#if HAVE_IO
+ printf("Int: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%2d ", iarray[ii] * iarray2[ii]);
+ }
+ printf("\nfloat: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%4.3f ", farray[ii] * farray2[ii]);
+ }
+
+ printf("\nlong: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%2d ", larray[ii] * larray2[ii]);
+ }
+
+ printf("\ndouble: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%4.3f ", (float) (darray[ii] * darray2[ii]));
+ }
+ printf("\n");
+#endif
+
+ i_result = main_func<int> (iarray, iarray2, iarray[0] * iarray2[0], 10);
+ f_result = main_func<float>(farray, farray2, 0.00, 10);
+ d_result = main_func<double>(darray, darray2, 0.0000, 10);
+ l_result = main_func<long>(larray, larray2, 0, 10);
+
+#if HAVE_IO
+ printf("int result = %2d\n", i_result);
+ printf ("long result = %2d\n", l_result);
+ printf("float result = %4.3f\n", f_result);
+ printf("double result = %4.3lf\n", d_result);
+#endif
+
+ i_max = iarray[0] * iarray2[0];
+ f_max = farray[0] * farray2[0];
+ d_max = darray[0] * darray2[0];
+ l_max = larray[0] * larray2[0];
+ for (int ii = 0; ii < 10; ii++)
+ {
+ if (i_max < iarray[ii] * iarray2[ii])
+ i_max = iarray[ii] * iarray2[ii];
+ if (f_max < farray[ii] * farray2[ii])
+ f_max = farray[ii] * farray2[ii];
+ if (d_max < darray[ii] * darray2[ii])
+ d_max = darray[ii] * darray2[ii];
+ if (l_max < larray[ii] * larray2[ii])
+ l_max = larray[ii] * larray2[ii];
+ }
+
+ if (i_max != i_result)
+ return 1;
+ if (f_max != f_result)
+ return 2;
+ if (d_max != d_result)
+ return 3;
+ if (l_max != l_result)
+ return 4;
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc
new file mode 100644
index 0000000000..db81912cbe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/builtin_fn_mutating_tplt.cc
@@ -0,0 +1,134 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#if HAVE_IO
+#include <cstdio>
+#include<iostream>
+#endif
+
+#include <cstdlib>
+
+template <class T>
+T my_func (T *x, T y)
+{
+ if (*x < y)
+ *x = y;
+ else
+ *x = *x;
+}
+
+template <class T> T my_func (T *x, T y);
+template <class T>
+T main_func (T *array, T *array2, T identity_val, int size)
+{
+ T result = identity_val;
+
+ __sec_reduce_mutating (&result, array[0:size] * array2[0:size:1], my_func);
+
+#if HAVE_IO
+ std::cout << "Result = " << result << std::endl;
+#endif
+ return result;
+}
+
+int main (void)
+{
+ int iarray[10], iarray2[10], i_result = 0, i_max;
+ long larray[10], larray2[10], l_result = 0, l_max;
+ float farray[10], farray2[10], f_result = 0, f_max;
+ double darray[10], darray2[10], d_result = 0, d_max;
+ for (int ii = 0; ii < 10; ii++)
+ {
+ if (ii%2 && ii)
+ {
+ darray[ii] = (double)(1.0000/(double)(ii));
+ farray[ii] = (float)(1.00/(float)(ii));
+ }
+ else
+ {
+ darray[ii] = (double) ii + 0.10;
+ farray[ii] = (float) (1.00/((float)(ii) + 0.10));
+ }
+ darray2[ii] = (double) (1.00000/ (double)(ii+1));
+ farray2[ii] = (float) (1.00/ (float)(ii+1));
+ }
+
+ for (int ii = 0; ii < 10; ii++)
+ {
+ iarray[ii] = ii;
+ larray[ii] = (long)ii;
+ }
+
+ for (int ii = 0; ii < 10; ii++)
+ {
+ iarray2[ii] = (ii-5);
+ larray2[ii] = (long)ii-5;
+ }
+#if HAVE_IO
+ printf("\nInt: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%2d ", iarray[ii] * iarray2[ii]);
+ }
+ printf("\nfloat: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%3.2f ", farray[ii] * farray2[ii]);
+ }
+
+ printf("\nlong: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%2d ", larray[ii] * larray2[ii]);
+ }
+
+ printf("\ndouble: ");
+ for (int ii=0; ii < 10; ii++)
+ {
+ printf("%4.3lf ", (float) (darray[ii] * darray2[ii]));
+ }
+ printf("\n");
+#endif
+
+ i_result = main_func<int> (iarray, iarray2, 0, 10);
+ l_result = main_func<long>(larray, larray2, 0, 10);
+ f_result = main_func<float>(farray, farray2, 0.00, 10);
+ d_result = main_func<double>(darray, darray2, 0.0000, 10);
+
+ i_max = iarray[0] * iarray2[0];
+ d_max = darray[0] * darray2[0];
+ f_max = farray[0] * farray2[0];
+ l_max = larray[0] * larray2[0];
+ for (int ii = 0; ii < 10; ii++)
+ {
+ if (iarray[ii] * iarray2[ii] > i_max)
+ i_max = iarray[ii] * iarray2[ii];
+ if (darray[ii] * darray2[ii] > d_max)
+ d_max = darray[ii] * darray2[ii];
+ if (farray[ii] * farray2[ii] > f_max)
+ f_max = farray[ii] * farray2[ii];
+ if (larray[ii] * larray2[ii] > l_max)
+ l_max = larray[ii] * larray2[ii];
+ }
+#if HAVE_IO
+ printf("int result = %2d\n", i_max);
+ printf("long result = %2d\n", l_max);
+ printf("float result = %4.3f\n", f_max);
+ printf("double result = %4.3lf\n", (float)d_max);
+#endif
+
+ if (i_max != i_result)
+ return 1;
+
+ if (f_max != f_result)
+ return 2;
+
+ if (l_max != l_result)
+ return 3;
+
+ if (d_max != d_result)
+ return 4;
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c b/gcc/testsuite/g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c
new file mode 100644
index 0000000000..1387558a83
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/fp_triplet_values_tplt.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+float q;
+
+void func (int *x)
+{
+ *x = 5;
+}
+template <class T> int main2 (T x, T y, T z);
+
+int main (void)
+{
+ main2 <float> (1.5, 2.3, 3.443);
+ main2 <double> (1.34393, 2.38383, 4.38383);
+ return 0;
+}
+template <class T>
+int main2 (T x, T y, T z)
+{
+ int array[10], array2[10];
+ array2[:] = array[x:2]; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[:] = array[1:y]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[1:2:z] = array[:]; /* { dg-error "stride of array notation triplet is not an integer" } */
+ func (&array2[1:x:3]); /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[y:9]++; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[1:x]++; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[1:9:x]++; /* { dg-error "stride of array notation triplet is not an integer" } */
+
+ ++array2[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[:] = array[q:1:3]; /* { dg-error "start-index of array notation triplet is not an integer" } */
+ array2[:] = array[1:q:3]; /* { dg-error "length of array notation triplet is not an integer" } */
+ array2[:] = array[1:3:q]; /* { dg-error "stride of array notation triplet is not an integer" } */
+ func (&array2[1:q:3]); /* { dg-error "length of array notation triplet is not an integer" } */
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/postincr_test.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/postincr_test.cc
new file mode 100644
index 0000000000..b0952c71bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/postincr_test.cc
@@ -0,0 +1,107 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+#define HAVE_IO 0
+
+#if HAVE_IO
+#include <cstdio>
+#endif
+
+#include <cstdlib>
+template <class T> int main2(int argc);
+
+int main (void)
+{
+ return (main2<int>(1) + main2<long> (1) + main2<long long> (1));
+}
+
+#if HAVE_IO
+template <class T> int print_array (T *array, int size);
+template <class T> int print_array (T *array, int size)
+{
+ for (int ii = 0; ii < size; ii++)
+ printf("%d ", array[ii]);
+ printf("\n");
+ return 0;
+}
+#endif
+
+template <class T>
+int main2(int argc)
+{
+ T array[10], array_serial[10];
+
+ for (int ii = 0; ii < 10; ii++) {
+ array[ii] = 0;
+ array_serial[ii] = 0;
+ }
+
+ array[:] = 19383;
+ for (int ii = 0; ii < 10; ii++)
+ array_serial[ii] = 19383;
+
+ array[:]++;
+
+ for (int ii = 0; ii < 10; ii++)
+ array_serial[ii]++;
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 1;
+
+ for (int ii = 0; ii < 10; ii++)
+ array[:]++;
+
+ for (int ii = 0; ii < 10; ii++)
+ for (int jj = 0; jj < 10; jj++)
+ array_serial[jj]++;
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 2;
+
+ if (argc == 2)
+ array[0:10:1]++;
+
+ if (argc == 2)
+ {
+ for (int ii = 0; ii < 10; ii++)
+ array_serial[ii]++;
+ }
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 3;
+
+ array[0:10/argc:argc]++;
+
+ for (int ii = 0; ii < 10; ii += argc)
+ array_serial[ii]++;
+
+
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 4;
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/AN/preincr_test.cc b/gcc/testsuite/g++.dg/cilk-plus/AN/preincr_test.cc
new file mode 100644
index 0000000000..f5552c7ed0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/AN/preincr_test.cc
@@ -0,0 +1,106 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+
+#define HAVE_IO 0
+
+#if HAVE_IO
+#include <cstdio>
+#endif
+
+#include <cstdlib>
+template <class T> int main2(int argc);
+
+int main (void)
+{
+ return (main2<int>(1) + main2<long> (1) + main2<long long> (1));
+}
+
+#if HAVE_IO
+template <class T> int print_array (T *array, int size);
+template <class T> int print_array (T *array, int size)
+{
+ for (int ii = 0; ii < size; ii++)
+ printf("%d ", array[ii]);
+ printf("\n");
+ return 0;
+}
+#endif
+
+template <class T>
+int main2(int argc)
+{
+ int array[10], array_serial[10];
+
+ for (int ii = 0; ii < 10; ii++) {
+ array[ii] = 0;
+ array_serial[ii] = 0;
+ }
+
+ array[:] = 19383;
+ for (int ii = 0; ii < 10; ii++)
+ array_serial[ii] = 19383;
+
+ ++array[:];
+
+ for (int ii = 0; ii < 10; ii++)
+ ++array_serial[ii];
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 1;
+
+ for (int ii = 0; ii < 10; ii++)
+ ++array[:];
+
+ for (int ii = 0; ii < 10; ii++)
+ for (int jj = 0; jj < 10; jj++)
+ ++array_serial[jj];
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 2;
+
+ if (argc == 2)
+ ++array[0:10:1];
+
+ if (argc == 2)
+ {
+ for (int ii = 0; ii < 10; ii++)
+ ++array_serial[ii];
+ }
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 3;
+
+ ++array[0:10/argc:argc];
+
+ for (int ii = 0; ii < 10; ii += argc)
+ {
+ ++array_serial[ii];
+ }
+
+#if HAVE_IO
+ print_array<T>(array, 10);
+ print_array<T>(array_serial, 10);
+#endif
+
+ for (int ii = 0; ii < 10; ii++)
+ if (array_serial[ii] != array[ii])
+ return 4;
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc
new file mode 100644
index 0000000000..0633d19030
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/catch_exc.cc
@@ -0,0 +1,67 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
+
+#include <assert.h>
+#include <unistd.h>
+#if HAVE_IO
+#include <cstdio>
+#include <cilk/cilk_api.h>
+#endif
+#include <cstdlib>
+
+
+void func(int volatile* steal_me)
+{
+ while (! (*steal_me))
+ {
+ usleep(2000);
+ }
+#if HAVE_IO
+ printf("Foo executing on %d\n", __cilkrts_get_worker_number());
+#endif
+ throw 5;
+}
+
+void my_test()
+{
+ volatile int steal_me = 0;
+
+ try
+ {
+ _Cilk_spawn func(&steal_me);
+#if HAVE_IO
+ printf("Continuation executing on %d\n",
+ __cilkrts_get_worker_number());
+#endif
+ steal_me = 1;
+ _Cilk_sync;
+ goto bad;
+ }
+
+ catch (int x)
+ {
+#if HAVE_IO
+ printf("We caught x = %d\n", x);
+#endif
+ assert(x == 5);
+ }
+ if (0)
+ {
+ bad:
+#if HAVE_IO
+ printf("We should not be here!\n");
+#endif
+ __builtin_abort ();
+ }
+}
+
+
+int main()
+{
+ my_test();
+#if HAVE_IO
+ printf("PASSED\n");
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/const_spawn.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/const_spawn.cc
new file mode 100644
index 0000000000..1ea473f1d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/const_spawn.cc
@@ -0,0 +1,78 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
+
+class Rectangle
+{
+ int area_val, h, w;
+ public:
+ Rectangle (int, int);
+ Rectangle (int, int, int);
+ ~Rectangle ();
+ int area ();
+};
+Rectangle::~Rectangle ()
+{
+ h = 0;
+ w = 0;
+ area_val = 0;
+}
+Rectangle::Rectangle (int height, int width)
+{
+ h = height;
+ w = width;
+ area_val = 0;
+}
+
+Rectangle::Rectangle (int height, int width, int area_orig)
+{
+ h = height;
+ w = width;
+ area_val = area_orig;
+}
+
+int Rectangle::area()
+{
+ return (area_val += (h*w));
+}
+
+/* Spawning constructor. */
+int main1 (void)
+{
+ Rectangle r = _Cilk_spawn Rectangle (4, 3);
+ return r.area();
+}
+
+/* Spawning constructor 2. */
+int main2 (void)
+{
+ Rectangle r (_Cilk_spawn Rectangle (4, 3));
+ return r.area();
+}
+
+/* Spawning copy constructor. */
+int main3 (void)
+{
+ Rectangle r = _Cilk_spawn Rectangle (4, 3, 2);
+ return r.area ();
+}
+
+/* Spawning copy constructor 2. */
+int main4 (void)
+{
+ Rectangle r ( _Cilk_spawn Rectangle (4, 3, 2));
+ return r.area();
+}
+
+int main (void)
+{
+ if (main1 () != 12)
+ __builtin_abort ();
+ if (main2 () != 12)
+ __builtin_abort ();
+ if (main3 () != 14)
+ __builtin_abort ();
+ if (main4() != 14)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/fib-opr-overload.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/fib-opr-overload.cc
new file mode 100644
index 0000000000..6af4a367b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/fib-opr-overload.cc
@@ -0,0 +1,94 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
+
+#if HAVE_IO
+#include <iostream>
+#endif
+
+class Some_Struct
+{
+ int calculated_value;
+ short some_unused_value;
+public:
+ Some_Struct () {
+ this->calculated_value = 0;
+ }
+ Some_Struct (int value) {
+ this->calculated_value = value;
+ }
+ Some_Struct operator=(Some_Struct f) {
+ this->calculated_value = f.calculated_value;
+ return *this;
+ }
+ bool operator!=(Some_Struct f) {
+ return (this->calculated_value != f.calculated_value);
+ }
+ Some_Struct operator+(Some_Struct &f) {
+ Some_Struct z;
+ z.calculated_value = this->calculated_value + f.calculated_value;
+ return z;
+ }
+ Some_Struct operator-(int x) {
+ Some_Struct z;
+ z.calculated_value = this->calculated_value - x;
+ return z;
+ }
+ bool operator<(int x) {
+ return (this->calculated_value < x);
+ }
+ int get_calculated_value () {
+ return this->calculated_value;
+ }
+};
+
+
+template <class T>
+T fibonacci_serial (T f)
+{
+ if (f < 2)
+ return f;
+ T a = fibonacci_serial (f-1);
+ T b = fibonacci_serial (f-2);
+ return (a+b);
+}
+
+template <class T>
+T fibonacci (T f)
+{
+ if (f < 2)
+ return f;
+ T a = _Cilk_spawn fibonacci (f-1);
+ T b = fibonacci (f-2);
+ _Cilk_sync;
+ return (a+b);
+}
+
+int main (void)
+{
+ Some_Struct f (40), f_serial(40);
+ f = fibonacci (f);
+ f_serial = fibonacci_serial (f_serial);
+
+ if (f != f_serial)
+ __builtin_abort ();
+
+ int t = 40, t_serial = 40;
+ t = fibonacci (t);
+ t_serial = fibonacci_serial (t_serial);
+ if (t != t_serial)
+ __builtin_abort ();
+
+ short s = 20, s_serial = 20;
+ s = fibonacci (s);
+ s_serial = fibonacci_serial (s_serial);
+ if (s != s_serial)
+ __builtin_abort ();
+
+#if HAVE_IO
+ std::cout << "Fib_Parallel (40) = " << f.get_calculated_value() << std::endl;
+ std::cout << "Fib_Serial (40) = " << f_serial.get_calculated_value()
+ << std::endl;
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/fib-tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/fib-tplt.cc
new file mode 100644
index 0000000000..dbc2da881a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/fib-tplt.cc
@@ -0,0 +1,53 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-*-* } } } */
+
+struct fib_struct
+{
+ int x;
+ int *y;
+ int z[3];
+ struct fib_struct *ptr_next;
+ struct fib_struct operator+(struct fib_struct &other) {
+ struct fib_struct z ;
+ z.x = (*this).x + (other.x);
+ return z;
+ }
+ struct fib_struct operator-(int other) {
+ struct fib_struct z ;
+ z.x = this->x - other;
+ return z;
+ }
+ bool operator<(int number) {
+ return (this->x < number);
+ }
+
+};
+
+template <typename T>
+T fib (T z) {
+ if (z < 2) return z;
+ T a = _Cilk_spawn fib<T>(z - 1);
+ T b = fib<T>(z - 2);
+ T c = a + b;
+ return (a+b);
+}
+
+
+int sfib(int x)
+{
+ if (x < 2) return x;
+ int a = sfib(x-1);
+ int b = sfib(x-2);
+ return (a+b);
+}
+
+int main () {
+ int z = 30;
+ int parallel_fib = fib<int>(z);
+ int serial_fib = sfib(z);
+ if (serial_fib != parallel_fib)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns.cc
new file mode 100644
index 0000000000..9b3d2cc26e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns.cc
@@ -0,0 +1,237 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+// { dg-require-effective-target c++11 }
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
+#define FIRST_NUMBER 5
+#define SECOND_NUMBER 3
+#define HAVE_IO 0
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+#include <stdlib.h>
+
+int global_var;
+
+void foo1(int *array, int size)
+{
+#if HAVE_IO
+ for (int ii = 0; ii < size; ii++)
+ printf("%2d\t", array[ii]);
+ printf("\n");
+ fflush (stdout);
+#else
+ if (size != 2)
+ __builtin_abort ();
+ if (array[0] != FIRST_NUMBER)
+ __builtin_abort ();
+ if (array[1] != SECOND_NUMBER)
+ __builtin_abort ();
+#endif
+ global_var++;
+}
+void foo1_c(const int *array, int size)
+{
+#if HAVE_IO
+ for (int ii = 0; ii < size; ii++)
+ printf("%2d\t", array[ii]);
+ printf("\n");
+ fflush (stdout);
+#else
+ if (size != 2)
+ __builtin_abort ();
+ if (array[0] != FIRST_NUMBER)
+ __builtin_abort ();
+ if (array[1] != SECOND_NUMBER)
+ __builtin_abort ();
+#endif
+ global_var++;
+}
+
+
+int main2 (int argc) {
+ int A[2] = {FIRST_NUMBER, SECOND_NUMBER};
+ int B[2] = {FIRST_NUMBER, SECOND_NUMBER};
+ int main_size = argc+1; /* We know argc is 1, and so 1+1 = 2. */
+ int q = 0;
+
+ global_var = 0;
+ auto func0 = [=](){ foo1_c(A, 2); };
+ _Cilk_spawn func0();
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func1 = [=](int *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func1 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func2 = [=](int *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func2 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func3 = [=](int *Aa, int size){ int new_size = (size % 2 + 2);
+ foo1(Aa, size); };
+ _Cilk_spawn func3 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func4 = [](int *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func4 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func5 = [](int *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func5 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func6 = [&](int *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func6 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func7 = [&](int *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func7 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func8 = [&](){ foo1(A, 2); };
+ _Cilk_spawn func8 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ /* We ignore the first param here and pass in A from the outer fn. */
+ auto func9 = [&](int *Aa, int size){ foo1(A, size); };
+ _Cilk_spawn func9 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func10 = [=](){ foo1_c(A, main_size); };
+ _Cilk_spawn func10 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ auto func11 = [&](){ foo1(A, main_size); };
+ _Cilk_spawn func11 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ /* We ignore the first & second param here and pass in A from the
+ outer fn. */
+ auto func12 = [&](int *Aa, int size){ foo1(A, main_size); };
+ _Cilk_spawn func12 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [&](int *Aa){ foo1(Aa, 2); }(A);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [&](int *Aa, int size){ foo1(Aa, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [=](int *Aa){ foo1(Aa, 2); }(A);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [=](int *Aa, int size){ foo1(Aa, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ /* We ignore the first param here. */
+ _Cilk_spawn [=](int *Aa, int size){ foo1_c(A, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ /* We ignore the first and second param here. */
+ _Cilk_spawn [=](int *Aa, int size){ foo1_c(A, size); }(B, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [&](){ foo1(A, 2); }();
+ [&](){ foo1(A, 2); }();
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [=](){ foo1_c (A, main_size); }();
+ foo1 (A, 2);
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ global_var = 0;
+ _Cilk_spawn [&](){ foo1(A, main_size); }();
+ [&](){ foo1(A, 2); }();
+ _Cilk_sync;
+ if (global_var != 2)
+ return (++q);
+
+ return q;
+}
+
+int main (void)
+{
+ return main2 (1);
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc b/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc
new file mode 100644
index 0000000000..b6e3fea853
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/CK/lambda_spawns_tplt.cc
@@ -0,0 +1,174 @@
+/* { dg-options "-fcilkplus" } */
+/* { dg-do run { target i?86-*-* x86_64-*-* arm*-*-* } } */
+// { dg-require-effective-target c++11 }
+/* { dg-options "-fcilkplus -lcilkrts" { target { i?86-*-* x86_64-*-* arm*-*-* } } } */
+
+#define FIRST_NUMBER 5
+#define SECOND_NUMBER 3
+#define HAVE_IO 0
+#if HAVE_IO
+#include <stdio.h>
+#endif
+
+#include <stdlib.h>
+
+template <class T>
+void foo1(T *array, int size)
+{
+#if HAVE_IO
+ for (int ii = 0; ii < size; ii++)
+ printf("%2d\t", (int)array[ii]);
+ printf("\n");
+ fflush (stdout);
+#else
+ if (size != 2)
+ __builtin_abort ();
+ if (array[0] != FIRST_NUMBER)
+ __builtin_abort ();
+ if (array[1] != SECOND_NUMBER)
+ __builtin_abort ();
+#endif
+}
+template <class T>
+void foo1_c(const T *array, int size)
+{
+#if HAVE_IO
+ for (int ii = 0; ii < size; ii++)
+ printf("%2d\t", (int)array[ii]);
+ printf("\n");
+ fflush (stdout);
+#else
+ if (size != 2)
+ __builtin_abort ();
+ if (array[0] != FIRST_NUMBER)
+ __builtin_abort ();
+ if (array[1] != SECOND_NUMBER)
+ __builtin_abort ();
+#endif
+}
+template <class T>
+int main2 (int argc, char **argv) {
+ T A[2] = {FIRST_NUMBER, SECOND_NUMBER};
+ int main_size = argc+1; /* We know argc is 1, and so 1+1 = 2. */
+ auto func0 = [=](){ foo1_c(A, 2); };
+ _Cilk_spawn func0();
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func1 = [=](T *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func1 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func2 = [=](T *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func2 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func3 = [=](T *Aa, int size){ int new_size = (size % 2 + 2);
+ foo1(Aa, size); };
+ _Cilk_spawn func3 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func4 = [](T *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func4 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func5 = [](T *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func5 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func6 = [&](T *Aa){ foo1(Aa, 2); };
+ _Cilk_spawn func6 (A);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func7 = [&](T *Aa, int size){ foo1(Aa, size); };
+ _Cilk_spawn func7 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func8 = [&](){ foo1(A, 2); };
+ _Cilk_spawn func8 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ /* We ignore the first param here and pass in A from the outer fn. */
+ auto func9 = [&](T *Aa, int size){ foo1(A, size); };
+ _Cilk_spawn func9 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func10 = [=](){ foo1_c(A, main_size); };
+ _Cilk_spawn func10 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ auto func11 = [&](){ foo1(A, main_size); };
+ _Cilk_spawn func11 ();
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ /* We ignore the first & second param here and pass in A from the
+ outer fn. */
+ auto func12 = [&](T *Aa, int size){ foo1(A, main_size); };
+ _Cilk_spawn func12 (A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [&](T *Aa){ foo1(Aa, 2); }(A);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [&](T *Aa, int size){ foo1(Aa, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [=](T *Aa){ foo1(Aa, 2); }(A);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [=](T *Aa, int size){ foo1(Aa, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ /* We ignore the first param here. */
+ _Cilk_spawn [=](T *Aa, int size){ foo1_c(A, size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ /* We ignore the first and second param here. */
+ _Cilk_spawn [=](T *Aa, int size){ foo1_c(A, main_size); }(A, 2);
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [&](){ foo1(A, 2); }();
+ [&](){ foo1(A, 2); }();
+ _Cilk_sync;
+
+ _Cilk_spawn [=](){ foo1_c(A, main_size); }();
+ foo1 (A, 2);
+ _Cilk_sync;
+
+ _Cilk_spawn [&](){ foo1(A, main_size); }();
+ [&](){ foo1(A, 2); }();
+ _Cilk_sync;
+
+ return 0;
+}
+
+int main (void)
+{
+ int argc = 1;
+ char **argv = NULL;
+ int x = 1, y = 1, z = 1, q = 1, p = 1;
+ x = main2<char>(argc,argv);
+ y = main2<short>(argc,argv);
+ z = main2<int>(argc,argv);
+ p = main2<long>(argc,argv);
+ q = main2<long long>(argc,argv);
+ return (x+y+z+p+q);
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
new file mode 100644
index 0000000000..0cb6539cb0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/cilk-plus.exp
@@ -0,0 +1,71 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Written by Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+load_lib g++-dg.exp
+load_lib cilk-plus-dg.exp
+
+if { ![check_effective_target_cilkplus] } {
+ return;
+}
+
+dg-init
+if [cilkplus_init] {
+ # Run the tests that are shared with C.
+ g++-dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/PS/*.c]] ""
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] "-O3" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] " " " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] "-g -O2" " "
+ # Run the C++ only tests.
+ g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] ""
+
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O2 -ftree-vectorize -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O2 -ftree-vectorize -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -ftree-vectorize -fcilkplus -g" " "
+
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -O0 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -O2 -ftree-vectorize -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -g -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -g -O0 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -g -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -g -O2 -ftree-vectorize -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -g -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/AN/*.cc]] " -O3 -ftree-vectorize -fcilkplus -g" " "
+
+ if { [check_libcilkrts_available] } {
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/CK/*.cc]] " -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/CK/*.cc]] " -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/CK/*.cc]] " -g -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/g++.dg/cilk-plus/CK/*.cc]] " -g -O2 -fcilkplus" " "
+
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g -O2" " "
+ }
+}
+cilkplus_finish
+dg-finish
diff --git a/gcc/testsuite/g++.dg/cilk-plus/ef_test.C b/gcc/testsuite/g++.dg/cilk-plus/ef_test.C
new file mode 100644
index 0000000000..3e75cbd925
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/ef_test.C
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-fcilkplus" } */
+
+
+__attribute__((vector (nomask), vector(mask), vector(mask,linear(x:1))))
+int func (int x)
+{
+ return x+5;
+}
+
+
+__attribute__((vector(mask,uniform (y), linear(x:1))))
+__attribute__((vector (nomask, uniform (x), linear(y:1))))
+int func2 (int x, int y)
+{
+ return x+y;
+}
+
+int func4 (int x, int y) __attribute__((vector, vector (nomask), vector (uniform(y), linear(x:1))));
+
+
+template <class T, class R>
+__attribute__((vector, vector(mask,uniform (y), linear(x:1))))
+T func3 (T x, R y)
+{
+ return x+(T)y;
+}
+
+
+
+int main (void)
+{
+ if ((func3 (5, 4) + func2 (5, 4) + func (5) + (int) func3<long, int> (5, 4)) !=
+ (5 + 4) + (5 + 4) + (5 + 5) + (int) ((long)5 +(int)4))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/for.C b/gcc/testsuite/g++.dg/cilk-plus/for.C
new file mode 100644
index 0000000000..6e16cfcd1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/for.C
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+// Test storage classes in the initialization of a <#pragma simd> for
+// loop.
+
+int *a, *b;
+
+void foo()
+{
+#pragma simd
+ for (static int tt=5; tt < 10; ++tt) /* { dg-error "before 'static'\|not declared\|expected" } */
+ a[tt] = b[tt];
+
+#pragma simd
+ for (extern int var=0; var < 1000; ++var) /* { dg-error "before 'extern'\|not declared\|expected" } */
+ a[var] = var;
+
+#pragma simd
+ for (register int regj = 0; regj < 1000; ++regj) /* { dg-error "before 'register'\|not declared\|expected" } */
+ b[regj] = a[regj] * 2;
+
+#pragma simd
+ for (volatile int vj=0; vj<1000; ++vj) /* { dg-error "iteration variable cannot be volatile" } */
+ a[vj] = b[vj];
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/for2.C b/gcc/testsuite/g++.dg/cilk-plus/for2.C
new file mode 100644
index 0000000000..345e54236f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/for2.C
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int *p;
+extern int stuff();
+
+template <int value>
+void foobar(int a)
+{
+#pragma simd
+ for (int i=0; i < a; ++i)
+ p[i] = value;
+}
+
+template <int value>
+void foobar2(int a)
+{
+ int j = 123;
+#pragma simd linear(j : value)
+ for (int i=0; i < a; ++i)
+ {
+ p[i] = value;
+ j += stuff();
+ }
+}
+
+void funky()
+{
+ foobar <69> (1000);
+ foobar2 <123> (2000);
+}
+
+void foobar3(int a)
+{
+ int j = 123;
+#pragma simd linear(j : a + a) /* { dg-error "step size must be an integer" } */
+ for (int i=0; i < a; ++i)
+ {
+ p[i] = 1234;
+ extern int bar();
+ j += bar();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/for3.C b/gcc/testsuite/g++.dg/cilk-plus/for3.C
new file mode 100644
index 0000000000..28dbdee433
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/for3.C
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+// Test storage classes in the initialization of a <#pragma simd> for
+// loop.
+
+int *a, *b;
+
+void foo()
+{
+#pragma simd
+ for (int tt=5; tt < 10; ++tt)
+ {
+ a[tt] = b[tt];
+ if (tt == 8)
+ throw 1; /* { dg-error "throw expressions are not allowed" } */
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cilk-plus/for4.C b/gcc/testsuite/g++.dg/cilk-plus/for4.C
new file mode 100644
index 0000000000..5b86b9f7db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cilk-plus/for4.C
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int *p;
+extern int stuff();
+
+template <int value>
+void foobar(int a)
+{
+ int j = 123;
+#pragma simd linear(j : value + 1)
+ for (int i=0; i < a; ++i)
+ {
+ p[i] = value;
+ j += stuff();
+ }
+}
+
+void funky()
+{
+ foobar <69> (1000);
+}
diff --git a/gcc/testsuite/g++.dg/compat/break/README b/gcc/testsuite/g++.dg/compat/break/README
index 0b8ea0247e..adbaf4fced 100644
--- a/gcc/testsuite/g++.dg/compat/break/README
+++ b/gcc/testsuite/g++.dg/compat/break/README
@@ -11,7 +11,7 @@ ABI-compliant should also be covered by a test for -Wabi to ensure that
there is a warning for the construct.
-Copyright (C) 2002 Free Software Foundation, Inc.
+Copyright (C) 2002-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/g++.dg/compat/compat.exp b/gcc/testsuite/g++.dg/compat/compat.exp
index 7fb16fed95..1a7cdb8396 100644
--- a/gcc/testsuite/g++.dg/compat/compat.exp
+++ b/gcc/testsuite/g++.dg/compat/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
index 7fa89470e1..4c7d4c43fd 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -90,6 +89,9 @@ proc compat-use-tst-compiler { } {
# This must be done after the compat-use-*-compiler definitions.
load_lib compat.exp
+# Provide the g++-dg-prune routine (gcc-dp.exp is loaded by compat.exp)
+load_lib g++-dg.exp
+
g++_init
# Save variables for the C++ compiler under test, which each test will
diff --git a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
index 5ad3f4409f..2884c25f33 100644
--- a/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/g++.dg/compat/struct-layout-1_generate.c
@@ -1,5 +1,5 @@
/* Structure layout test generator.
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011
+ Copyright (C) 2004-2014
Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -44,9 +44,9 @@ along with GCC; see the file COPYING3. If not see
#endif
const char *dg_options[] = {
-"/* { dg-options \"%s-I%s\" } */\n",
+"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
+"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* *-*-mingw32* *-*-cygwin* } } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* i?86-*-mingw32* x86_64-*-mingw32* i?86-*-cygwin* } } */\n",
"/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
diff --git a/gcc/testsuite/g++.dg/constexpr-null1.C b/gcc/testsuite/g++.dg/constexpr-null1.C
index 44cf9a0b9c..b9ec7b5f3f 100644
--- a/gcc/testsuite/g++.dg/constexpr-null1.C
+++ b/gcc/testsuite/g++.dg/constexpr-null1.C
@@ -1,5 +1,5 @@
// PR c++/46670
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern unsigned char __TBB_ReverseByte(unsigned char src);
extern unsigned char *reversed;
diff --git a/gcc/testsuite/g++.dg/conversion/ambig2.C b/gcc/testsuite/g++.dg/conversion/ambig2.C
new file mode 100644
index 0000000000..a9d9d699cf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/ambig2.C
@@ -0,0 +1,18 @@
+// PR c++/57948
+
+struct Base { };
+struct Derived : Base
+{
+ struct Derived2 : Base
+ {
+ struct ConvertibleToBothDerivedRef
+ {
+ operator Derived&();
+ operator Derived2&();
+ void bind_lvalue_to_conv_lvalue_ambig(ConvertibleToBothDerivedRef both)
+ {
+ Base &br1 = both; // { dg-error "ambiguous" }
+ }
+ };
+ };
+};
diff --git a/gcc/testsuite/g++.dg/conversion/dr195.C b/gcc/testsuite/g++.dg/conversion/dr195.C
index 8502c1578b..cb26623e11 100644
--- a/gcc/testsuite/g++.dg/conversion/dr195.C
+++ b/gcc/testsuite/g++.dg/conversion/dr195.C
@@ -1,11 +1,12 @@
// Copyright (C) 2004 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 20 Oct 2004 <nathan@codesourcery.com>
-// DR 195 will allow conversions between function and object pointers
-// under some circumstances. It is in drafting, so we don't implement
-// it (yet).
+// DR 195 was about allowing conversions between function and object
+// pointers under some circumstances. The issue got resolved for C++11,
+// which, in 5.2.10 p8 says that: "Converting a function pointer to an
+// object pointer type or vice versa is conditionally-supported."
-// This checks we warn when being pedantic.
+// This checks we don't warn anymore with -pedantic.
typedef void (*PF)(void);
typedef void *PV;
@@ -18,12 +19,12 @@ void foo ()
PO po;
/* the following two will almost definitly be ok with 195. */
- pf = reinterpret_cast <PF>(pv); // { dg-warning "casting between" "" }
- pv = reinterpret_cast <PV>(pf); // { dg-warning "casting between" "" }
+ pf = reinterpret_cast <PF>(pv);
+ pv = reinterpret_cast <PV>(pf);
/* the following two might or might not be ok with 195. */
- pf = reinterpret_cast <PF>(po); // { dg-warning "casting between" "" }
- po = reinterpret_cast <PO>(pf); // { dg-warning "casting between" "" }
+ pf = reinterpret_cast <PF>(po);
+ po = reinterpret_cast <PO>(pf);
/* These will never be ok, as they are implicit. */
pv = pf; // { dg-error "invalid conversion" "" }
diff --git a/gcc/testsuite/g++.dg/conversion/op4.C b/gcc/testsuite/g++.dg/conversion/op4.C
index 5f8214bc0c..7ef4b6a0c6 100644
--- a/gcc/testsuite/g++.dg/conversion/op4.C
+++ b/gcc/testsuite/g++.dg/conversion/op4.C
@@ -9,7 +9,7 @@ struct X {
}
};
-void add_one (X & ref) { /* { dg-error "in passing argument" } */
+void add_one (X & ref) { /* { dg-message "in passing argument" } */
++ ref.x;
}
diff --git a/gcc/testsuite/g++.dg/conversion/ref1.C b/gcc/testsuite/g++.dg/conversion/ref1.C
new file mode 100644
index 0000000000..c0b3684341
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/ref1.C
@@ -0,0 +1,9 @@
+// PR c++/60345
+
+struct C {};
+struct J : C {};
+struct A {
+ operator J* ();
+};
+A p;
+C* const& q = p;
diff --git a/gcc/testsuite/g++.dg/conversion/simd1.C b/gcc/testsuite/g++.dg/conversion/simd1.C
index fa40b0eaad..522d8b5470 100644
--- a/gcc/testsuite/g++.dg/conversion/simd1.C
+++ b/gcc/testsuite/g++.dg/conversion/simd1.C
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-msse2" { target { i?86-*-* x86_64-*-* } } } */
/* Test overload resolution of vector types.
From Janis Johnson and Paolo Bonzini, based on PR/16882 */
@@ -17,7 +18,7 @@ extern const vector signed short *cvssp;
void foo ()
{
vss = vld(i, vscp); /* { dg-error "no matching function for call" } */
- // { dg-message "candidate" "candidate note" { target *-*-* } 19 }
+ // { dg-message "candidate" "candidate note" { target *-*-* } 20 }
vss = vld(i, vssp);
vss = vld(i, cvssp);
}
diff --git a/gcc/testsuite/g++.dg/conversion/void2.C b/gcc/testsuite/g++.dg/conversion/void2.C
new file mode 100644
index 0000000000..9bd6d9f4c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/conversion/void2.C
@@ -0,0 +1,16 @@
+// PR c++/54165
+
+struct A
+{
+ template<typename T>
+ operator T()
+ {
+ T l[];
+ }
+};
+
+int main()
+{
+ A a;
+ (void)a;
+}
diff --git a/gcc/testsuite/g++.dg/cpp/limits.C b/gcc/testsuite/g++.dg/cpp/limits.C
new file mode 100644
index 0000000000..5824e01931
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/limits.C
@@ -0,0 +1,21 @@
+// { dg-options "-pedantic" }
+// { dg-do compile }
+
+#include <limits>
+
+// Compiling this with -pedantic was wrongly triggering this error:
+// libstdc++-v3/include/limits:1269:45: warning : use of C++11 long long integer constant [-Wlong-long]
+// min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
+// ^
+// libstdc++-v3/include/limits:1272:44: warning : use of C++11 long long integer constant [-Wlong-long]
+// max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
+// ^
+// libstdc++-v3/include/limits:1342:44: warning : use of C++11 long long integer constant [-Wlong-long]
+// max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1
+// ^
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp/paste1.C b/gcc/testsuite/g++.dg/cpp/paste1.C
new file mode 100644
index 0000000000..accc762cac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/paste1.C
@@ -0,0 +1,13 @@
+// PR preprocessor/57757
+// { dg-do compile { target c++11 } }
+
+#define S(x) x
+extern S("C")void exit (int);
+int
+main ()
+{
+ (void) (S("foo")and 0);
+ const wchar_t *p = S(L"foo")L"bar";
+ const char *a = S("foo")R"(bar)";
+ exit (0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp/paste2.C b/gcc/testsuite/g++.dg/cpp/paste2.C
new file mode 100644
index 0000000000..6f83a86410
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/paste2.C
@@ -0,0 +1,15 @@
+// PR preprocessor/57757
+// { dg-do compile { target c++11 } }
+// { dg-options "-save-temps" }
+// { dg-final cleanup-saved-temps }
+
+#define S(x) x
+extern S("C")void exit (int);
+int
+main ()
+{
+ (void) (S("foo")and 0);
+ const wchar_t *p = S(L"foo")L"bar";
+ const char *a = S("foo")R"(bar)";
+ exit (0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp/syshdr3.C b/gcc/testsuite/g++.dg/cpp/syshdr3.C
new file mode 100644
index 0000000000..39168239a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/syshdr3.C
@@ -0,0 +1,16 @@
+/* Contributed by Dodji Seketeli <dodji@redhat.com> */
+/* Origin: PR preprocessor/7263 */
+/* { dg-options "-pedantic -std=c++98 -ftrack-macro-expansion=1" } */
+/* { dg-do compile } */
+
+/* This tests the proprer suppression of warning coming from macro
+ defined in system headers and expanded in a non-system header
+ location. */
+#include "syshdr3.h"
+
+static _Complex float c = _Complex_I + _Complex_I; /* These macros are defined in
+ system header so we should
+ have no warning here. */
+U_LL u = ONE_ULL; /* Likewise here. */
+
+unsigned long long v = 1ULL; /* { dg-warning "long long" } */
diff --git a/gcc/testsuite/g++.dg/cpp/syshdr3.h b/gcc/testsuite/g++.dg/cpp/syshdr3.h
new file mode 100644
index 0000000000..e5d502a24f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp/syshdr3.h
@@ -0,0 +1,7 @@
+#pragma GCC system_header
+
+#define _Complex __complex__
+#define _Complex_I 1.0iF
+
+#define U_LL unsigned long long
+#define ONE_ULL 1ULL
diff --git a/gcc/testsuite/g++.dg/cpp/ucn-1.C b/gcc/testsuite/g++.dg/cpp/ucn-1.C
index 354e1d976b..b2d4f98fa0 100644
--- a/gcc/testsuite/g++.dg/cpp/ucn-1.C
+++ b/gcc/testsuite/g++.dg/cpp/ucn-1.C
@@ -1,5 +1,6 @@
// http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2170.html
-// { dg-options "-std=c++0x -fextended-identifiers" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fextended-identifiers" }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C b/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C
new file mode 100644
index 0000000000..b9b975b5dc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/Wliteral-suffix.C
@@ -0,0 +1,28 @@
+// { dg-do run { target c++11 } }
+
+// Make sure -Wliteral-suffix is enabled by default and
+// triggers as expected.
+
+#define BAR "bar"
+#define PLUS_ONE + 1
+
+#include <cstdint>
+#include <cassert>
+
+
+void
+test()
+{
+ char c = '3'PLUS_ONE; // { dg-warning "invalid suffix on literal" }
+ char s[] = "foo"BAR; // { dg-warning "invalid suffix on literal" }
+
+ assert(c == '4');
+ assert(s[3] != '\0');
+ assert(s[3] == 'b');
+}
+
+int
+main()
+{
+ test();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wunused-parm.C b/gcc/testsuite/g++.dg/cpp0x/Wunused-parm.C
new file mode 100644
index 0000000000..232e484356
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/Wunused-parm.C
@@ -0,0 +1,24 @@
+// PR c++/57211
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-parameter" }
+
+template <class T> T&& move(T&);
+
+struct A
+{
+ struct B
+ {
+ B& operator=(B&&);
+ };
+
+ B f;
+
+ A& operator=(A&& p) = default;
+};
+
+int main()
+{
+ A a;
+ A b;
+ b = move(a);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C b/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C
index aad273792a..a9dd155475 100644
--- a/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-1.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -Wzero-as-null-pointer-constant" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wzero-as-null-pointer-constant" }
struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C b/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C
new file mode 100644
index 0000000000..5cb4022afa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/Wzero-as-null-pointer-constant-2.C
@@ -0,0 +1,15 @@
+// PR c++/56373
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wzero-as-null-pointer-constant" }
+
+struct shared_ptr
+{
+ shared_ptr(decltype(nullptr));
+};
+
+void f()
+{
+ shared_ptr a = 0; // { dg-warning "zero as null pointer" }
+ shared_ptr b(0); // { dg-warning "zero as null pointer" }
+ shared_ptr c{0}; // { dg-warning "zero as null pointer" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/__func__.C b/gcc/testsuite/g++.dg/cpp0x/__func__.C
index 1ac9065153..7c2a712d75 100644
--- a/gcc/testsuite/g++.dg/cpp0x/__func__.C
+++ b/gcc/testsuite/g++.dg/cpp0x/__func__.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
const char* foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/access01.C b/gcc/testsuite/g++.dg/cpp0x/access01.C
index 43e5e86372..55c951f97d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/access01.C
+++ b/gcc/testsuite/g++.dg/cpp0x/access01.C
@@ -1,5 +1,5 @@
// PR c++/49042
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
class A
diff --git a/gcc/testsuite/g++.dg/cpp0x/access02.C b/gcc/testsuite/g++.dg/cpp0x/access02.C
new file mode 100644
index 0000000000..74960a66a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/access02.C
@@ -0,0 +1,39 @@
+// PR c++/58954
+// { dg-require-effective-target c++11 }
+
+template<class T>
+T&& declval();
+
+template<class T>
+struct foo_argument
+{
+ template<class Ret, class C, class Arg>
+ static Arg test(Ret (C::*)(Arg));
+
+ typedef decltype(test(&T::template foo<>)) type;
+};
+
+template<class T, class>
+struct dependent { typedef T type; };
+
+template<class T>
+struct base
+{
+ template<class Ignore = void>
+ auto foo(int i) -> decltype(declval<
+ typename dependent<T&, Ignore>::type
+ >().foo_impl(i));
+};
+
+struct derived : base<derived>
+{
+ friend struct base<derived>;
+private:
+ int foo_impl(int i);
+};
+
+int main()
+{
+ foo_argument<derived>::type var = 0;
+ return var;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C
index c5760cfe53..bcefe3fc94 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-0.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<class> class TT> struct X { };
template<class> struct Y { };
@@ -10,14 +10,13 @@ void g(X<Z>);
void
foo()
{
- // Below x and y don't have the same type, because Y and Z don't
- // designate the same template ...
+ // Below x and y have the same type (DR 1286)
X<Y> y;
X<Z> z;
- // ... So these must fail to compile.
- f(z); // { dg-error "" }
- g(y); // { dg-error "" }
+ // ... So these must compile.
+ f(z); // { dg-bogus "" }
+ g(y); // { dg-bogus "" }
}
template<class> struct A0 {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C
index d0eda5ff1b..c52ab46aa5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-1.C
@@ -1,14 +1,14 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// These also represent tests for printing alias declarations and
// their instantiations.
template<class T, class U> struct A0 {};
template<class T, class U> using AA0 = A0<T, U>;
-template<class T> struct AA0<int, T> {}; // { dg-error "partial specialization" }
+template<class T> struct AA0<int, T> {}; // { dg-error "specialization" }
template <class U> using Ptr = U*;
-template<class U> struct Ptr<U*> {}; // { dg-error "partial specialization" }
+template<class U> struct Ptr<U*> {}; // { dg-error "specialization" }
struct A {
using A = int;//{ dg-error "nested|has|same name as|class|in which|declared" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-10.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-10.C
index 733e791c2b..7c8bad9834 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-10.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T> using Ptr = T*;
Ptr<unsigned>; // { dg-error "does not declare anything" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-11.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-11.C
index 43ef7ba45e..54574337b2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-11.C
@@ -1,8 +1,8 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
namespace N
{
template <class T> using U = T*;
-};
+}
void f(N::U<int>) { blah; } // { dg-error "void f(N::U<int>)|not declared" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-12.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-12.C
index 11c26865d9..df23e55198 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-12.C
@@ -1,4 +1,4 @@
// Origin: PR c++/51027
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
using INT = int // { dg-error "expected|;|at end of input" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
index 8555154c63..368e5af557 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-13.C
@@ -1,5 +1,5 @@
// Origin PR c++/51191
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template< class T >
class ClassTemplate {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-14.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-14.C
index 1a998022ad..52f2201a03 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-14.C
@@ -1,5 +1,5 @@
// Origin: PR c++/51145
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
index b23e4029f7..2d617ab81f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-15.C
@@ -1,5 +1,5 @@
// Origin PR c++/51194
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class U, class V> //#1
struct foo {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C
index d66660a5f4..d934a93bd4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-16.C
@@ -1,5 +1,5 @@
// Origin PR c++/51143
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
using A0 = struct B0 { void f() {} };
@@ -23,6 +23,6 @@ template<class T>
using A3 =
enum B3 {b = 0;}; //{ dg-error "types may not be defined in alias template" }
-A3<int> a3;
+A3<int> a3; // { dg-error "'A3' does not name a type" }
int main() { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C
index 41b1c950fc..bf947fb811 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-17.C
@@ -1,5 +1,5 @@
// Origin PR c++/51289
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
template<typename a, template <typename, typename> class b>
struct foo {
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C
index ba65561311..199b05483f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-18.C
@@ -1,5 +1,5 @@
// Origin: PR c++/51541
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template<typename Z> using ::T = void(int n); // { dg-error "" }
template<typename Z> using operator int = void(int n); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-19.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-19.C
new file mode 100644
index 0000000000..b101cb3b7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-19.C
@@ -0,0 +1,31 @@
+// PR c++/53567
+// { dg-do compile { target c++11 } }
+
+template <unsigned int, bool> struct IntegerType { typedef unsigned type; };
+
+template <class EnumT>
+using UnderlyingEnumType = typename IntegerType<sizeof(EnumT), (EnumT(-1) > EnumT(0))>::type;
+
+template <class EnumT, class UnderlyingT = UnderlyingEnumType<EnumT>>
+struct EnumMask
+{
+ constexpr EnumMask(EnumT val) : m_val(val) {}
+ operator EnumT() { return m_val; }
+
+ EnumT m_val;
+};
+
+enum class A : unsigned { x };
+
+template <class EnumT>
+EnumMask<EnumT> operator ~(EnumT lhs)
+{
+ return EnumT(~unsigned(lhs) & unsigned(EnumT::maskAll)); // { dg-error "not a member" }
+
+}
+
+int main()
+{
+ ~A::x;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C
index 6b5b42f7fd..0204f6454f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T> struct S0 {};
template<class T> using AS0 = S0<T>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-21.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-21.C
new file mode 100644
index 0000000000..463f539d38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-21.C
@@ -0,0 +1,23 @@
+// PR c++/54575
+// { dg-do compile { target c++11 } }
+
+template<typename _From, typename _To>
+struct is_convertible { static const bool value = true; };
+
+template<bool> struct enable_if { };
+template<> struct enable_if<true> { typedef int type; };
+
+template<typename _InIter>
+using _RequireInputIter
+= typename enable_if<is_convertible<_InIter,bool>::value>::type;
+
+template<typename _Tp> struct X {
+ template<typename _InputIterator,
+ typename = _RequireInputIter<_InputIterator>>
+ void insert(_InputIterator) {}
+};
+
+template<typename> void foo() {
+ X<int> subdomain_indices;
+ subdomain_indices.insert(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
new file mode 100644
index 0000000000..1f6cb8f40b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-22.C
@@ -0,0 +1,12 @@
+// The standard is unclear about whether this testcase is well-formed.
+// Clang considers it well-formed, EDG not. Let's go with EDG for now.
+// { dg-do compile { target c++11 } }
+
+template <class T>
+using foo = typename T::bar; // { dg-error "this context" }
+
+class B
+{
+ typedef int bar; // { dg-error "private" }
+ foo<B> f; // { dg-message "required" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-23.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-23.C
new file mode 100644
index 0000000000..0e4ba45aa2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-23.C
@@ -0,0 +1,17 @@
+// PR c++/52233
+// { dg-do compile { target c++11 } }
+
+template <typename t>
+struct foo
+{
+ template <template <typename...> class... xs>
+ using type = int;
+};
+
+template <typename t, template <typename...> class... xs>
+struct bar
+{
+ using type = typename foo<t>::template type<xs...>;
+};
+
+bar<int, foo> x;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-24.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-24.C
new file mode 100644
index 0000000000..b68fa9346b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-24.C
@@ -0,0 +1,24 @@
+// Origin: PR c++/53540
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct context
+{
+ typedef int type;
+};
+
+template <typename T>
+void function()
+{
+ using ctx1 = context<T>;
+ typename ctx1::type f1;
+
+ typedef context<T> ctx2;
+ typename ctx2::type f2;
+}
+
+int main()
+{
+ function<int>();
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-25.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-25.C
new file mode 100644
index 0000000000..a388ae4108
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-25.C
@@ -0,0 +1,10 @@
+// PR c++/54859
+// { dg-do compile { target c++11 } }
+
+template<unsigned N>
+ using Num = int;
+
+template<typename... Types>
+ using Count = Num<sizeof...(Types)>;
+
+Count<int, char, void> i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C
new file mode 100644
index 0000000000..dd4cc0286a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-26.C
@@ -0,0 +1,10 @@
+// Origin: PR c++/54466
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+ struct X { };
+
+template<typename T>
+ using Y = const X<T>;
+
+using Z = Y<int>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-27.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-27.C
new file mode 100644
index 0000000000..91208abf90
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-27.C
@@ -0,0 +1,11 @@
+// Origin: PR c++/54875
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+using AddConst = T const;
+
+enum FwdEnum : int;
+
+int main() {
+ AddConst<FwdEnum> *ptr = nullptr;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-28.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-28.C
new file mode 100644
index 0000000000..086b5e54f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-28.C
@@ -0,0 +1,7 @@
+// Origin: PR c++/54401
+// { dg-do compile { target c++11 } }
+
+template<typename>
+struct X {
+ using type = T; // { dg-error "expected type-specifier|does not name a type" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C
new file mode 100644
index 0000000000..f6cc6950ba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-29.C
@@ -0,0 +1,10 @@
+// Origin: PR c++/52343
+// { dg-do compile { target c++11 } }
+
+template<typename>
+using A = int;
+
+template<template<class> class>
+struct B {};
+
+B<A> b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C
index 5484efce19..2204c250ce 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Exercise some member alias templates ...
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-30.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-30.C
new file mode 100644
index 0000000000..7ad5e6d83d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-30.C
@@ -0,0 +1,15 @@
+// Origin PR c++/55311
+// { dg-do compile { target c++11 } }
+
+template <const char *const C, typename T>
+struct A
+{};
+
+struct B {};
+
+extern constexpr char HELLO_WORLD[] = "hello world";
+
+A<HELLO_WORLD, B> g; // <-- This works fine
+
+template <typename T>
+using PartiallySpecialized = A<HELLO_WORLD, T>; // <-- This fails
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C
new file mode 100644
index 0000000000..83eea471d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-31.C
@@ -0,0 +1,20 @@
+// Origin: PR c++/55663
+// { dg-do compile { target c++11 } }
+
+template <typename>
+constexpr bool the_truth () { return true; }
+
+template <bool>
+ struct Takes_bool { };
+
+template<bool B>
+ using Alias = Takes_bool<B>;
+
+template<typename T>
+ struct test { using type = Alias<the_truth<T>()>; };
+
+int main () {
+ test<int> a;
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-32.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-32.C
new file mode 100644
index 0000000000..cb39edde8f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-32.C
@@ -0,0 +1,20 @@
+// PR c++/56611
+// { dg-do compile { target c++11 } }
+
+template<class T> struct remove_reference { typedef T type; };
+template<class T> struct remove_reference<T&> { typedef T type; };
+template<class T> T declval() { return T(); }
+
+int f(int, int){return 0;}
+struct Func{};
+
+template<class... Args> using result2
+= decltype(f(declval<typename remove_reference<Args>::type>()...));
+
+template<class Sig> struct R;
+template<class This, class... Args> struct R< This(Args...) >
+{
+ typedef result2<Args...> type;
+};
+
+typedef R< Func(int, int) >::type R_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-33.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-33.C
new file mode 100644
index 0000000000..25781a484e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-33.C
@@ -0,0 +1,14 @@
+// PR c++/51239
+// { dg-require-effective-target c++11 }
+
+template<class... x>
+class list{};
+template<class a, class... b>
+using tail=list<b...>;
+template <class...T>
+void f(tail<T...>); // { dg-error "alias" }
+
+int main()
+{
+ f<int,int>({});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-33a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-33a.C
new file mode 100644
index 0000000000..a1c442eabe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-33a.C
@@ -0,0 +1,15 @@
+// PR c++/51239
+// { dg-require-effective-target c++11 }
+// This variant should work because tail is equivalent to list.
+
+template<class y, class... x>
+class list{};
+template<class a, class... b>
+using tail=list<a, b...>;
+template <class...T>
+void f(tail<T...>);
+
+int main()
+{
+ f<int,int>({});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-34.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-34.C
new file mode 100644
index 0000000000..4306ab7032
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-34.C
@@ -0,0 +1,23 @@
+// PR c++/57222
+// { dg-require-effective-target c++11 }
+
+template <template <typename T> class Templ>
+using Bool = Templ<bool>;
+
+template <typename T>
+class Foo {
+private:
+public:
+ template<template<typename U> class Templ>
+ void method(Bool<Templ> boolTempl);
+};
+
+template <typename T>
+template <template <typename U> class Templ>
+void Foo<T>::method(Bool<Templ> boolTempl) {
+}
+
+int main() {
+ Foo<char> foo;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-35.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-35.C
new file mode 100644
index 0000000000..f412b302d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-35.C
@@ -0,0 +1,9 @@
+// PR c++/57279
+// { dg-require-effective-target c++11 }
+
+typedef void fc1() const; // OK
+typedef void frr1() &&; // OK
+typedef void fcr1() const &;
+using fc2 = void() const; // #4
+using frr2 = void() &&; // OK
+using fcr2 = void() const &; // #6
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-36.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-36.C
new file mode 100644
index 0000000000..dd3a422c2a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-36.C
@@ -0,0 +1,6 @@
+// PR c++/53658
+// { dg-do compile { target c++11 } }
+
+struct A;
+template <typename> using Foo = const A;
+template <typename Item> Foo <Item> bar();
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-37.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-37.C
new file mode 100644
index 0000000000..d6a3e12cea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-37.C
@@ -0,0 +1,21 @@
+// PR c++/57138
+// { dg-do compile { target c++11 } }
+
+template <template <typename ... X> class T, typename ... Y>
+struct D
+{
+ template <typename ... Z>
+ using type = T <Y..., Z...>; // { dg-error "pack expansion" }
+};
+template <typename T>
+class A {};
+template <typename X, typename Y>
+struct B;
+template <typename T>
+struct B <int, T>
+{
+ typedef A <T> type;
+};
+template <typename X, typename Y>
+using C = typename B <X, Y>::type;
+struct E : public D <C> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C
new file mode 100644
index 0000000000..bc98737b84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-38.C
@@ -0,0 +1,41 @@
+// PR c++/58435
+// { dg-do compile { target c++11 } }
+
+template<typename T, typename U>
+struct same { static const bool value = false; };
+template<typename T>
+struct same<T, T> { static const bool value = true; };
+
+template <template <typename> class F, typename T> struct apply
+{ typedef F<T> type; };
+template <template <typename> class F, typename T> struct applyc
+{ typedef const F<T> type; };
+template <template <typename> class F, typename T> struct applyv
+{ typedef volatile F<T> type; };
+template <template <typename> class F, typename T> struct applycv
+{ typedef const volatile F<T> type; };
+
+template <typename T> using map = T;
+template <typename T> using mapc = const T;
+template <typename T> using mapv = volatile T;
+template <typename T> using mapcv = const volatile T;
+
+static_assert(same<apply<map, int>::type, int>::value, "");
+static_assert(same<apply<mapc, int>::type, const int>::value, "");
+static_assert(same<apply<mapv, int>::type, volatile int>::value, "");
+static_assert(same<apply<mapcv, int>::type, const volatile int>::value, "");
+
+static_assert(same<applyc<map, int>::type, const int>::value, "");
+static_assert(same<applyc<mapc, int>::type, const int>::value, "");
+static_assert(same<applyc<mapv, int>::type, const volatile int>::value, "");
+static_assert(same<applyc<mapcv, int>::type, const volatile int>::value, "");
+
+static_assert(same<applyv<map, int>::type, volatile int>::value, "");
+static_assert(same<applyv<mapc, int>::type, const volatile int>::value, "");
+static_assert(same<applyv<mapv, int>::type, volatile int>::value, "");
+static_assert(same<applyv<mapcv, int>::type, const volatile int>::value, "");
+
+static_assert(same<applycv<map, int>::type, const volatile int>::value, "");
+static_assert(same<applycv<mapc, int>::type, const volatile int>::value, "");
+static_assert(same<applycv<mapv, int>::type, const volatile int>::value, "");
+static_assert(same<applycv<mapcv, int>::type, const volatile int>::value, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-39.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-39.C
new file mode 100644
index 0000000000..9fe5538618
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-39.C
@@ -0,0 +1,11 @@
+// PR c++/58856
+// { dg-require-effective-target c++11 }
+
+template <typename T>
+struct U1 {};
+
+template <typename T1, typename... Ts>
+using U2 = U1<T1>;
+
+template <typename T1, typename... Ts>
+using U3 = U2<T1, Ts...>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C
index 876944e23c..60edaf7e53 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-4.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// [temp.alias]/3:
// The type-id in an alias template declaration shall not refer
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-40.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-40.C
new file mode 100644
index 0000000000..f8bff78203
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-40.C
@@ -0,0 +1,33 @@
+// PR c++/58170
+// { dg-require-effective-target c++11 }
+// { dg-prune-output "not declared" }
+// { dg-prune-output "expected" }
+
+template <typename T, typename U>
+struct base {
+ template <typename V>
+ struct derived;
+};
+
+template <typename T, typename U>
+template <typename V>
+struct base<T, U>::derived : public base<T, V> {
+};
+
+// This (wrong?) alias declaration provokes the crash.
+template <typename T, typename U, typename V>
+using alias = base<T, U>::derived<V>; // { dg-error "template|typename" }
+
+// This one works:
+// template <typename T, typename U, typename V>
+// using alias = typename base<T, U>::template derived<V>;
+
+template <typename T>
+void f() {
+ alias<T, bool, char> m{};
+ (void) m;
+}
+
+int main() {
+ f<int>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-41.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-41.C
new file mode 100644
index 0000000000..c444217b0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-41.C
@@ -0,0 +1,18 @@
+// PR c++/60182
+// { dg-require-effective-target c++11 }
+
+class B {};
+template <typename> using __allocator_base = B;
+template <typename> class F : __allocator_base<int> {};
+class C {};
+template <typename, typename = F<int> > class G : C {};
+template <typename> class D;
+class A {
+ using Container = G<D<char>>;
+ A();
+ A(D<char> const &);
+ Container m_elements;
+};
+template <template <class, class> class C, class A = F<D<int>>>
+void doSomething(C<D<char>, A> &);
+A::A(D<char> const &) : A() { doSomething(m_elements); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C
index 1a4cbd5e5b..559fc51c5c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-5.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// alias template of a partial specialization
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-6.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-6.C
index f60b2ea7fc..e0faf2bcb2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-6.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Alias template of non-class types.
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C
index 96c349a0da..f5911d9df5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-7.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Add arguments to unbound template template parameter.
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C
index c926df7539..c40fbbbbcc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-8.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {
template <class U> using C = U;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-9.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-9.C
index dcf642d768..5794617d51 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-9.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T>
struct A {
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
index 63655286b0..524216ad5c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-debug-0.C
@@ -1,6 +1,7 @@
// Origin: PR c++/51032
-// { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } }
-// { dg-options "-std=c++0x -gstabs+" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* nios2-*-* } { "*" } { "" } }
+// { dg-options "-gstabs+" }
template <class C>
struct A {
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286.C
new file mode 100644
index 0000000000..0c545c735f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286.C
@@ -0,0 +1,13 @@
+// DR 1286: An alias template can be equivalent to an underlying template.
+// { dg-do compile { target c++11 } }
+
+template <class T, class U> struct same;
+template <class T> struct same<T,T> {};
+
+template <class T> struct A {};
+template <class T> using B = A<T>;
+
+template <template <class> class T> class C {};
+
+void f(C<B>) { } // { dg-final { scan-assembler "_Z1f1CI1AE" } }
+same<C<A>, C<B> > s;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286a.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286a.C
new file mode 100644
index 0000000000..1780c9a47b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286a.C
@@ -0,0 +1,60 @@
+// DR 1286
+// { dg-do compile { target c++11 } }
+
+template <class,class> struct same;
+template <class T> struct same<T,T> {};
+
+template <class,class> struct different {};
+template <class T> struct different<T,T>;
+
+template<typename T, typename U = T> struct A;
+template<template <class...> class> struct X;
+
+// equivalent to A
+template<typename V, typename W>
+using B = A<V, W>;
+
+same<X<A>,X<B>> s1;
+
+// not equivalent to A: not all parameters used
+template<typename V, typename W>
+using C = A<V>;
+
+different<X<A>,X<C>> d1;
+
+// not equivalent to A: different number of parameters
+template<typename V>
+using D = A<V>;
+
+different<X<A>,X<D>> d2;
+
+// not equivalent to A: template-arguments in wrong order
+template<typename V, typename W>
+using E = A<W, V>;
+
+different<X<A>,X<E>> d3;
+
+// equivalent to A: default arguments not considered
+template<typename V, typename W = int>
+using F = A<V, W>;
+
+same<X<A>,X<F>> s2;
+
+// equivalent to A and B
+template<typename V, typename W>
+using G = A<V, W>;
+
+same<X<A>,X<G>> s3;
+same<X<B>,X<G>> s3b;
+
+// equivalent to E
+template<typename V, typename W>
+using H = E<V, W>;
+
+same<X<E>,X<H>> s4;
+
+// not equivalent to A: argument not identifier
+template<typename V, typename W>
+using I = A<V, typename W::type>;
+
+different<X<A>,X<I>> d4;
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286b.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286b.C
new file mode 100644
index 0000000000..fef981823b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-dr1286b.C
@@ -0,0 +1,12 @@
+// PR c++/60328
+// { dg-require-effective-target c++11 }
+
+template <class _T, class... _Rest>
+struct Foo
+{
+ template <class _TT, class... _RR>
+ using Bar = Foo<_TT, _RR...>;
+
+ using Normal = Foo<_Rest...>;
+ using Fail = Bar<_Rest...>;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/alias-decl-enum-1.C b/gcc/testsuite/g++.dg/cpp0x/alias-decl-enum-1.C
new file mode 100644
index 0000000000..260a193a08
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/alias-decl-enum-1.C
@@ -0,0 +1,47 @@
+// PR c++/57734
+// { dg-do compile { target c++11 } }
+
+template<typename T, typename U>
+struct same_type { static const bool value = false; };
+
+template<typename T>
+struct same_type<T, T> { static const bool value = true; };
+
+enum e { zero };
+enum class eclass { one };
+
+template<typename T>
+using enum_alias = e;
+
+template<typename T>
+using eclass_alias = eclass;
+
+typedef enum_alias<void> etest0;
+typedef enum_alias<void> etest0;
+typedef enum_alias<int> etest0;
+typedef enum_alias<int> etest1;
+
+static_assert (same_type<etest0, etest1>::value, "");
+
+typedef eclass_alias<void> ectest0;
+typedef eclass_alias<void> ectest0;
+typedef eclass_alias<int> ectest0;
+typedef eclass_alias<int> ectest1;
+
+static_assert (same_type<ectest0, ectest1>::value, "");
+
+template<typename T>
+enum_alias<T> efoo(T f) { return enum_alias<T>::zero; }
+
+template<typename T>
+constexpr enum_alias<T> cefoo(T f) { return enum_alias<T>::zero; }
+
+static_assert ( cefoo(1) == e::zero, "");
+
+template<typename T>
+eclass_alias<T> ecfoo(T f) { return eclass_alias<T>::one; }
+
+template<typename T>
+constexpr eclass_alias<T> cecfoo(T f) { return eclass_alias<T>::one; }
+
+static_assert ( cecfoo(1) == eclass::one, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignof.C b/gcc/testsuite/g++.dg/cpp0x/alignof.C
index 8e8f715cdf..92422f95a5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alignof.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alignof.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main(void)
{
static_assert(alignof(int) == __alignof(int), "alignof(int) does not equal __alignof(int)");
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignof2.C b/gcc/testsuite/g++.dg/cpp0x/alignof2.C
index 7c5aad3de2..d571d9d77d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alignof2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alignof2.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
int main(void)
{
alignof(int); //ok with a type but not with an expression
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignof3.C b/gcc/testsuite/g++.dg/cpp0x/alignof3.C
index 50c6ac915e..c349cec06e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alignof3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alignof3.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
int main(void)
{
alignof(void (void)); // { dg-warning "function type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/alignof4.C b/gcc/testsuite/g++.dg/cpp0x/alignof4.C
index 92d636faf0..ca3c47ad67 100644
--- a/gcc/testsuite/g++.dg/cpp0x/alignof4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/alignof4.C
@@ -1,5 +1,5 @@
// PR c++/51316
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto1.C b/gcc/testsuite/g++.dg/cpp0x/auto1.C
index f5c0ea6e4d..b8d3905182 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto1.C
@@ -1,3 +1,4 @@
+// { dg-do compile { target c++11 } }
// { dg-options "-std=c++98 -Wc++11-compat" }
// Test warning for use of auto in C++98 mode with C++11
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto10.C b/gcc/testsuite/g++.dg/cpp0x/auto10.C
index 9b89291d64..296873eeda 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto10.C
@@ -1,6 +1,5 @@
// Positive test for auto
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <typeinfo>
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto11.C b/gcc/testsuite/g++.dg/cpp0x/auto11.C
index bd21daef0c..208f512a68 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto11.C
@@ -1,5 +1,5 @@
// PR c++/38256
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> struct A
{
@@ -8,5 +8,5 @@ template<int> struct A
void foo()
{
- A<0>().operator auto(); // { dg-error "auto.*conversion" }
+ A<0>().operator auto(); // { dg-error "auto" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto14.C b/gcc/testsuite/g++.dg/cpp0x/auto14.C
index cb2c4e0351..0ada265446 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto14.C
@@ -1,6 +1,5 @@
// PR c++/40306, c++/40307
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
template< typename T >
struct test {
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto15.C b/gcc/testsuite/g++.dg/cpp0x/auto15.C
index b23e1e2fd6..ca5758ddf2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto15.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template< typename Fn > struct function;
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto16.C b/gcc/testsuite/g++.dg/cpp0x/auto16.C
index 1b4ae8f82b..e9754f3251 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto16.C
@@ -1,5 +1,5 @@
// PR c++/40619
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename U> struct X {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto17.C b/gcc/testsuite/g++.dg/cpp0x/auto17.C
index 03608d33ac..7f9529e3b5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto17.C
@@ -1,5 +1,5 @@
// PR c++/42567
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename B>
struct A {
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto18.C b/gcc/testsuite/g++.dg/cpp0x/auto18.C
index 17f7f99595..e6ddf0c247 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto18.C
@@ -1,6 +1,6 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void f()
{
- auto val = val; // { dg-error "auto. type used in its own initializer" }
+ auto val = val; // { dg-error "auto" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto19.C b/gcc/testsuite/g++.dg/cpp0x/auto19.C
index f709902871..d27d4375d4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto19.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Explicit {
Explicit() = default; // Line 2
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto2.C b/gcc/testsuite/g++.dg/cpp0x/auto2.C
index 626e9e245d..cff36d212a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto2.C
@@ -1,6 +1,5 @@
// Positive test for auto
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <typeinfo>
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto20.C b/gcc/testsuite/g++.dg/cpp0x/auto20.C
index 90f875114a..fe9925d0f3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto20.C
@@ -1,6 +1,6 @@
// Test for proper non-deduced context handling of the initializer
// for an auto declaration/new.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct with_apply
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto21.C b/gcc/testsuite/g++.dg/cpp0x/auto21.C
index 1cbcac58d6..a827b3df85 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto21.C
@@ -1,5 +1,5 @@
// Origin PR c++/47208
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
constexpr auto list = { }; // { dg-error "deducing from brace-enclosed initializer list requires #include <initializer_list>" }
static const int l = list.size();
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto22.C b/gcc/testsuite/g++.dg/cpp0x/auto22.C
index 66630e5367..4ae1d1cf51 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto22.C
@@ -1,5 +1,5 @@
// PR c++/47999
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int& identity(int& i)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto23.C b/gcc/testsuite/g++.dg/cpp0x/auto23.C
index 49b5a0eb9e..f14c2b8b28 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto23.C
@@ -1,4 +1,4 @@
// PR c++/46245
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<auto f()->int> struct A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto24.C b/gcc/testsuite/g++.dg/cpp0x/auto24.C
index b024ad5b2a..d370cc6f3d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto24.C
@@ -1,5 +1,5 @@
// PR c++/48599
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
int v[1];
auto (*p)[1] = &v; // { dg-error "array of .auto" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto25.C b/gcc/testsuite/g++.dg/cpp0x/auto25.C
index 2917c0e197..9e08a5bf38 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto25.C
@@ -1,5 +1,5 @@
// PR c++/42056
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<int> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto26.C b/gcc/testsuite/g++.dg/cpp0x/auto26.C
index 6e55aa451a..d355a63973 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto26.C
@@ -1,5 +1,5 @@
// PR c++/43321
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
void f(T t)
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto27.C b/gcc/testsuite/g++.dg/cpp0x/auto27.C
index 1921763607..f8e9097b2f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto27.C
@@ -1,6 +1,6 @@
// PR c++/51186
-auto main()->int // { dg-error "std=" "std" { target c++98 } }
- // { dg-error "auto" "auto" { target c++98 } 3 }
- // { dg-error "no type" "no type" { target c++98 } 3 }
+auto main()->int // { dg-error "std=" "std" { target { ! c++11 } } }
+ // { dg-error "auto" "auto" { target { ! c++11 } } 3 }
+ // { dg-error "no type" "no type" { target { ! c++11 } } 3 }
{ }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto28.C b/gcc/testsuite/g++.dg/cpp0x/auto28.C
index 8d250166a8..441d8843a6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto28.C
@@ -1,4 +1,4 @@
// PR c++/51404
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int i = auto().x; // { dg-error "invalid use of" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto29.C b/gcc/testsuite/g++.dg/cpp0x/auto29.C
index 818745751a..80fdc12b7d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto29.C
@@ -1,6 +1,5 @@
// PR c++/51401
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
template <int>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto3.C b/gcc/testsuite/g++.dg/cpp0x/auto3.C
index 860790d7d3..c2e5519ecf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto3.C
@@ -1,5 +1,5 @@
// Negative test for auto
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
@@ -10,7 +10,7 @@ auto x; // { dg-error "auto" }
auto i = 42, j = 42.0; // { dg-error "auto" }
// New CWG issue
-auto a[2] = { 1, 2 }; // { dg-error "initializer_list" }
+auto a[2] = { 1, 2 }; // { dg-error "auto|initializer_list" }
template<class T>
struct A { };
@@ -19,7 +19,7 @@ A<int> A1;
// CWG issue 625
A<auto> A2 = A1; // { dg-error "" }
-auto foo() { } // { dg-error "auto" }
+auto foo() { } // { dg-error "auto" "" { target { ! c++1y } } }
void bar(auto i) // { dg-error "incomplete|auto" }
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto30.C b/gcc/testsuite/g++.dg/cpp0x/auto30.C
index d26e290f5c..cce67d5560 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto30.C
@@ -1,5 +1,5 @@
// Origin PR c++/51473
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto34.C b/gcc/testsuite/g++.dg/cpp0x/auto34.C
new file mode 100644
index 0000000000..3682d60bf4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto34.C
@@ -0,0 +1,18 @@
+// PR c++/51421
+// { dg-do compile { target c++11 } }
+
+int foo1(int);
+
+void bar1()
+{
+ auto i = foo1(i); // { dg-error "before deduction" }
+}
+
+struct A {};
+
+A foo2(A);
+
+void bar2()
+{
+ auto a = foo2(a); // { dg-error "before deduction" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto35.C b/gcc/testsuite/g++.dg/cpp0x/auto35.C
new file mode 100644
index 0000000000..55eebbeffe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto35.C
@@ -0,0 +1,11 @@
+// PR c++/53122
+// { dg-do compile { target c++11 } }
+
+template<typename... Args>
+ void foo(Args&&...) { }
+
+template<typename... Args>
+ void bar(Args&&...)
+{
+ auto fn = foo<Args...>;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto36.C b/gcc/testsuite/g++.dg/cpp0x/auto36.C
new file mode 100644
index 0000000000..586bc6ebb5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto36.C
@@ -0,0 +1,18 @@
+// PR c++/54903
+// { dg-do compile { target c++11 } }
+
+template<int N, int D>
+struct Modulus
+{
+ static auto const value = N % D;
+};
+
+template<int N>
+struct Angle
+{
+ static auto const value = Modulus<N, 360>::value; // ERROR
+ //static int const value = Modulus<N, 360>::value; // OK
+ //static auto const value = N % 360; // OK
+
+ typedef Angle<value> type;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto37.C b/gcc/testsuite/g++.dg/cpp0x/auto37.C
new file mode 100644
index 0000000000..f4b29046d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto37.C
@@ -0,0 +1,14 @@
+// PR c++/55003
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct A {
+ static const auto t
+ = (typename T::type)42;
+};
+
+struct X {
+ typedef int type;
+};
+
+A<X> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto38.C b/gcc/testsuite/g++.dg/cpp0x/auto38.C
new file mode 100644
index 0000000000..070a39b9e3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto38.C
@@ -0,0 +1,8 @@
+// PR c++/57183
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-variable" }
+
+constexpr float PI_0 = 3.1415926F;
+constexpr auto PI_1 = 3.1415926F;
+const float PI_2 = 3.1415926F;
+const auto PI_3 = 3.1415926F;
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto39.C b/gcc/testsuite/g++.dg/cpp0x/auto39.C
new file mode 100644
index 0000000000..dfa1fb4e9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto39.C
@@ -0,0 +1,6 @@
+// PR c++/58560
+// { dg-do compile { target c++11 } }
+
+typedef auto T; // { dg-error "typedef declared 'auto'" }
+
+void foo() { T(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto4.C b/gcc/testsuite/g++.dg/cpp0x/auto4.C
index d47bca4369..36144fd9aa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto4.C
@@ -1,6 +1,5 @@
// Testcase for deduction of std::initializer_list for auto.
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <typeinfo>
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto40.C b/gcc/testsuite/g++.dg/cpp0x/auto40.C
new file mode 100644
index 0000000000..287191e591
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto40.C
@@ -0,0 +1,11 @@
+// PR c++/58888
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+struct A
+{
+ static constexpr auto b{1.0};
+};
+
+constexpr decltype(A::b) A::b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto41.C b/gcc/testsuite/g++.dg/cpp0x/auto41.C
new file mode 100644
index 0000000000..b2a77550fd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto41.C
@@ -0,0 +1,5 @@
+// PR c++/58550
+// { dg-do compile { target c++11 } }
+
+auto foo(); // { dg-error "auto" "" { target { ! c++1y } } }
+auto fp = foo; // { dg-error "auto" "" { target c++1y } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto42.C b/gcc/testsuite/g++.dg/cpp0x/auto42.C
new file mode 100644
index 0000000000..fea4c28d84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/auto42.C
@@ -0,0 +1,9 @@
+// PR c++/60628
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+void foo(int i)
+{
+ auto x[1] = { 0 }; // { dg-error "array of .auto" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto5.C b/gcc/testsuite/g++.dg/cpp0x/auto5.C
index ebe2df22e6..8ed66d1ea3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto5.C
@@ -1,5 +1,5 @@
// Testcase for non-dependent auto in templates
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto7.C b/gcc/testsuite/g++.dg/cpp0x/auto7.C
index 3b3b829016..c213c747bb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto7.C
@@ -1,6 +1,6 @@
// PR c++/37965
// Negative test for auto
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
auto i = 6;
auto j; // { dg-error "has no initializer" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/auto9.C b/gcc/testsuite/g++.dg/cpp0x/auto9.C
index 190bfa6e8f..205bb960cc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/auto9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/auto9.C
@@ -1,7 +1,6 @@
// PR c++/37962
// Negative test for auto
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <typeinfo>
#include <stdarg.h>
@@ -16,13 +15,13 @@ const std::type_info &t2 = typeid (auto *); // { dg-error "auto" }
struct A
{
- operator auto (); // { dg-error "auto" }
- operator auto *(); // { dg-error "auto" }
+ operator auto (); // { dg-error "auto" "" { target { ! c++1y } } }
+ operator auto *(); // { dg-error "auto" "" { target { ! c++1y } } }
};
struct A2
{
- operator auto () -> int; // { dg-error "invalid use of" }
+ operator auto () -> int; // { dg-error "invalid use of" "" { target { ! c++1y } } }
operator auto *() -> int; // { dg-error "auto" }
};
@@ -42,7 +41,7 @@ bool d = (auto (A::*)()) 0; // { dg-error "auto" }
void
foo ()
{
- (auto) { 0 }; // { dg-error "auto" }
+ __extension__ (auto) { 0 }; // { dg-error "auto" }
C<int> c;
dynamic_cast<auto> (c); // { dg-error "auto" }
reinterpret_cast<auto> (c); // { dg-error "auto" }
@@ -79,10 +78,10 @@ enum struct D : auto * { FF = 0 }; // { dg-error "must be an integral type|decl
void
bar ()
{
- try { } catch (auto i) { } // { dg-error "parameter declared" }
- try { } catch (auto) { } // { dg-error "parameter declared" }
- try { } catch (auto *i) { } // { dg-error "parameter declared" }
- try { } catch (auto *) { } // { dg-error "parameter declared" }
+ try { } catch (auto i) { } // { dg-error "parameter" }
+ try { } catch (auto) { } // { dg-error "parameter" }
+ try { } catch (auto *i) { } // { dg-error "parameter" }
+ try { } catch (auto *) { } // { dg-error "parameter" }
}
void
@@ -99,8 +98,8 @@ baz (int i, ...)
template <typename T = auto> struct E {}; // { dg-error "invalid use of" }
template <class T = auto *> struct F {}; // { dg-error "invalid use of|expected" }
-auto fnlate () -> auto; // { dg-error "invalid use of" }
-auto fnlate2 () -> auto *; // { dg-error "invalid use of|expected" }
+auto fnlate () -> auto; // { dg-error "invalid use of" "" { target { ! c++1y } } }
+auto fnlate2 () -> auto *; // { dg-error "invalid use of|expected" "" { target { ! c++1y } } }
void
badthrow () throw (auto) // { dg-error "invalid use of" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/bad_array_new1.C b/gcc/testsuite/g++.dg/cpp0x/bad_array_new1.C
new file mode 100644
index 0000000000..2052d3991e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/bad_array_new1.C
@@ -0,0 +1,19 @@
+// Test for throwing bad_array_new_length on invalid array length
+// { dg-do run { target c++11 } }
+
+#include <new>
+
+void * f(int i)
+{
+ return new int[i];
+}
+
+int main()
+{
+ try
+ {
+ f(-1);
+ }
+ catch (std::bad_array_new_length) { return 0; }
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/bad_array_new2.C b/gcc/testsuite/g++.dg/cpp0x/bad_array_new2.C
new file mode 100644
index 0000000000..bcc9b9ad5f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/bad_array_new2.C
@@ -0,0 +1,20 @@
+// Test for throwing bad_array_new_length on invalid array length
+// { dg-do run { target c++11 } }
+
+#include <new>
+
+void * f(int i)
+{
+ return new int[i]{1,2,3,4};
+}
+
+int main()
+{
+ f(4); // OK
+ try
+ {
+ f(3);
+ }
+ catch (std::bad_array_new_length) { return 0; }
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/bind.C b/gcc/testsuite/g++.dg/cpp0x/bind.C
index 42a2ac203d..9b7ce7dc0b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bind.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bind.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S{};
void f(S&&);
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket1.C b/gcc/testsuite/g++.dg/cpp0x/bracket1.C
index dfb5bf4ea4..6f5c297207 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bracket1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
struct list {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket2.C b/gcc/testsuite/g++.dg/cpp0x/bracket2.C
index 300015d01e..35c8608bd5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bracket2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int i> class X { /* ... */ };
X< 1>2 > x1; // // { dg-error "numeric constant" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket3.C b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
index f86aa041a2..93c714862b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bracket3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket3.C
@@ -1,3 +1,4 @@
+// { dg-do compile { target c++11 } }
// { dg-options "-std=c++98 -Wc++11-compat" }
template<int N> struct X {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/bracket4.C b/gcc/testsuite/g++.dg/cpp0x/bracket4.C
index 0e1985ceff..256f4cb6c9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/bracket4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/bracket4.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
struct vector {
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/cast-bug.C b/gcc/testsuite/g++.dg/cpp0x/cast-bug.C
index 211f88b2b1..2b8ef33e8e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/cast-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/cast-bug.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S
{
S();
diff --git a/gcc/testsuite/g++.dg/cpp0x/cast.C b/gcc/testsuite/g++.dg/cpp0x/cast.C
index 9162d09f3f..d11d724139 100644
--- a/gcc/testsuite/g++.dg/cpp0x/cast.C
+++ b/gcc/testsuite/g++.dg/cpp0x/cast.C
@@ -2,8 +2,8 @@
// Test cast from lvalue to rvalue
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/catch1.C b/gcc/testsuite/g++.dg/cpp0x/catch1.C
new file mode 100644
index 0000000000..81778ea780
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/catch1.C
@@ -0,0 +1,16 @@
+// PR c++/53371
+// { dg-do compile { target c++11 } }
+
+struct Abs
+{
+ virtual void a() = 0;
+};
+
+void foo()
+{
+ try {
+ } catch (Abs) { } // { dg-error "abstract class type" }
+
+ try {
+ } catch (int&&) { } // { dg-error "rvalue reference type" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C b/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C
index 02a59cd1d2..89fe0318fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/collapse-bug.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/collapse.C b/gcc/testsuite/g++.dg/cpp0x/collapse.C
index 96c3273246..b537bb5839 100644
--- a/gcc/testsuite/g++.dg/cpp0x/collapse.C
+++ b/gcc/testsuite/g++.dg/cpp0x/collapse.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C
index 3c51c2cbf5..746a84e7d2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-46336.C
@@ -1,10 +1,10 @@
// PR c++/46336
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern "C" {
enum A { };
inline constexpr A
- f(A a, A b) // { dg-error "previous declaration" }
+ f(A a, A b) // { dg-message "previous declaration" }
{ return A(static_cast<int>(a) & static_cast<int>(b)); }
enum B { };
inline constexpr B
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-46420.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-46420.C
index 757a6e315b..17a366e849 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-46420.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-46420.C
@@ -1,5 +1,5 @@
// PR c++/46420
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename> class vector { };
struct A{};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C
index c60ba86586..263a44bc0b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-47570.C
@@ -1,5 +1,5 @@
// PR c++/47570
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
unsigned int constexpr one()
{ return 1; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C
index c950a3642f..933831b94d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-47969.C
@@ -1,5 +1,5 @@
// PR c++/47969
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
index a6cf408075..88d442691c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-48089.C
@@ -1,5 +1,5 @@
// PR c++/48089
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// bang is ill-formed (diagnostic required) because its initializer is
// non-constant, because it uses the value of an uninitialized object.
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C
index 3fe3dcb86c..c1d1c37544 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-49776.C
@@ -1,5 +1,5 @@
// PR c++/49776
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct s
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C
index 6606be8b6f..413566f49d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-51369.C
@@ -1,6 +1,5 @@
// PR c++/51369
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
constexpr int x[2][2] = {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-52672.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-52672.C
index 9f878780c7..0ce07a5b01 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-52672.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-52672.C
@@ -1,8 +1,7 @@
// PR c++/52672
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
-typedef unsigned long * ul_ptr;
+__extension__ typedef __SIZE_TYPE__ * ul_ptr;
constexpr unsigned long a = *((ul_ptr)0x0); // { dg-error "" }
constexpr unsigned long b = *((ul_ptr)(*((ul_ptr)0x0))); // { dg-error "" }
constexpr unsigned long c = *((ul_ptr)*((ul_ptr)(*((ul_ptr)0x0)))); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-1.C
new file mode 100644
index 0000000000..c90fc765e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-1.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++11 } }
+
+typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
+constexpr V4 v = { 1, 1, 1, 0 };
+constexpr V4 r = v[0] + v;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
new file mode 100644
index 0000000000..f34619a6df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-2.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+// Ignore warning on some powerpc-ibm-aix configurations.
+// { dg-prune-output "non-standard ABI extension" }
+// { dg-prune-output "changes the ABI" }
+
+typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
+constexpr V4 build (float x, float y, float z) { return __extension__ (V4){ x, y, z, 0 };}
+constexpr V4 x = build (1, 0, 0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
new file mode 100644
index 0000000000..58c00ed4ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-53094-3.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+// Ignore warning on some powerpc-ibm-aix configurations.
+// { dg-prune-output "non-standard ABI extension" }
+
+typedef float __attribute__ ((vector_size (4 * sizeof (float)))) V4;
+
+struct Rot3 {
+ typedef float T;
+ typedef V4 Vec;
+ Vec axis[3];
+ constexpr Rot3 (V4 ix, V4 iy, V4 iz) : axis {ix, iy, iz} {}
+
+ constexpr Rot3(T xx, T xy, T xz, T yx, T yy, T yz, T zx, T zy, T zz) :
+ Rot3((Vec) { xx, xy, xz, 0 },
+ (Vec) { yx, yy, yz, 0 },
+ (Vec) { zx, zy, zz, 0 }) {}
+
+};
+
+constexpr Rot3 r1( 0, 1 ,0, 0, 0, 1, 1, 0, 0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C
new file mode 100644
index 0000000000..56b09bda01
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55432.C
@@ -0,0 +1,22 @@
+// PR c++/55432
+// { dg-do compile { target c++11 } }
+
+struct tag_t{} tag{};
+
+constexpr tag_t const& pass(tag_t & t)
+{
+ return t;
+}
+
+struct S
+{
+ constexpr S(tag_t) {};
+};
+
+struct T
+{
+ S mem;
+ T( tag_t & args ) : mem(pass(args)) {}
+};
+
+T t(tag);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C
new file mode 100644
index 0000000000..bec69c75d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55573.C
@@ -0,0 +1,24 @@
+// PR c++/55573
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+// Ignore warning on some powerpc-ibm-aix configurations.
+// { dg-prune-output "non-standard ABI extension" }
+
+template <typename T, int N>
+struct ExtVecTraits {
+ typedef T __attribute__((vector_size (N * sizeof (T)))) type;
+};
+
+template <typename T>
+using Vec4 = typename ExtVecTraits<T,4>::type;
+
+template <typename T>
+struct Rot3
+{
+ typedef Vec4<T> Vec;
+ Vec axis[3];
+ constexpr Rot3 (Vec4<T> ix, Vec4<T> iy, Vec4<T> iz) : axis {ix, iy, iz} {}
+};
+
+typedef Vec4<float> Vec;
+Rot3<float> r2 ((Vec) {0, 1, 0, 0}, (Vec){0, 0, 1, 0}, (Vec){1, 0, 0, 0});
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-55708.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-55708.C
new file mode 100644
index 0000000000..ffbefbbac4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-55708.C
@@ -0,0 +1,30 @@
+// PR c++/55708
+// { dg-do compile { target c++11 } }
+
+template<int N,int NNN>
+struct AA { static constexpr int val = N; };
+
+template<typename A,typename B>
+//constexpr unsigned long long mymax(A a,B b){ // <-- compiles
+constexpr unsigned long long mymax(A && a,const B& b){
+ return a<b?b:a;
+}
+
+template<char... List>
+constexpr long long operator"" _y() noexcept
+{
+ return AA<1, mymax(1,2)>::val; // <-- crashes gcc
+ // return mymax(1,2); // <-- compiles
+ // return AA<1,2>::val; // <-- compiles
+}
+
+template<char... List>
+constexpr unsigned long long do_y() noexcept
+{
+ return AA<1, mymax(1,2)>::val; // <-- crashes gcc
+}
+
+int main()
+{
+ return 1_y + do_y();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-56302.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-56302.C
new file mode 100644
index 0000000000..945bf020f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-56302.C
@@ -0,0 +1,12 @@
+// PR c++/56302
+// { dg-do compile { target c++11 } }
+// { dg-options "-O0" }
+
+constexpr int foo () { return 42; }
+constexpr int x = foo () + 2;
+
+void
+bar ()
+{
+ __asm ("" : : "n" (x), "n" (foo () * 7 + x));
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-63241.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-63241.C
new file mode 100644
index 0000000000..2553cae349
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-63241.C
@@ -0,0 +1,13 @@
+// PR c++/63241
+// { dg-do compile { target c++11 } }
+
+struct A {
+ constexpr A(int){}
+};
+
+int main() {
+ int i = 1;
+ A array[2][2] =
+ {{{0}, {i}},
+ {{0}, {0}}};
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-99.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-99.C
index 13a5ea3e6c..8d791dd032 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-99.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-99.C
@@ -1,5 +1,5 @@
// Origin PR c++/51462
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C
index e83f142300..418a202995 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-abi1.C
@@ -1,5 +1,6 @@
// PR c++/47301
-// { dg-options "-std=c++0x -fabi-version=1" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=1" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-access.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-access.C
index ee5fc9854f..569824dc57 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-access.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-access.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr1.C
new file mode 100644
index 0000000000..7e4da11a2d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-aggr1.C
@@ -0,0 +1,17 @@
+// PR c++/60951
+// { dg-do compile { target c++11 } }
+
+struct Foo {
+ constexpr Foo(int x = 0) : memb(x) {}
+ int memb;
+};
+
+struct FooContainer {
+ Foo foo[2];
+};
+
+void fubar() {
+ int nonConst = 0;
+ FooContainer fooContainer;
+ fooContainer = { { 0, nonConst } };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C
new file mode 100644
index 0000000000..ea86d7bc62
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-and.C
@@ -0,0 +1,20 @@
+// PR c++/56481
+// Non-linearity in potential_constant_expression_1
+// { dg-do compile { target c++11 } }
+
+struct S
+{
+ constexpr bool foo ();
+#define A(n) , f##n##0, f##n##1, f##n##2, f##n##3
+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3)
+#define C B(0) B(1) B(2) B(3)
+ bool f C;
+};
+
+constexpr bool
+S::foo ()
+{
+#undef A
+#define A(n) && f##n##0 && f##n##1 && f##n##2 && f##n##3
+ return f C;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr.C
index 36939e1afe..15d20f6926 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
constexpr T do_get(T* x, int n) {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr2.C
index 7cf733445d..9218196220 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
struct IsNegative {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C
index f84cb52577..2338f70f07 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr3.C
@@ -1,8 +1,8 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr bool is_negative(int x) {
return x < 0;
-};
+}
constexpr bool do_has_neg(const int* x, bool(*p)(int)) {
return p(x[0]) || p(x[1]); // Line 6
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C
index 697d2d9f70..3dd3f34e67 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr4.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr const int do_last(const int* x, int n) {
return x[n - 1];
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr5.C
index d58f254f6c..eec32d672a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
constexpr T do_last(T* x, int n) {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr6.C
index 17dd6e50be..3a483989c1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr6.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
typedef decltype(sizeof(char)) size_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
index 44775c0703..93f9141144 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr7.C
@@ -1,5 +1,5 @@
// PR c++/49290
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef unsigned T;
struct S
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C
new file mode 100644
index 0000000000..ee425ea1a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-ptr8.C
@@ -0,0 +1,54 @@
+// PR c++/57047
+// { dg-require-effective-target c++11 }
+
+template <typename>
+struct A;
+template <typename T>
+struct A <T &>
+{
+ typedef T type;
+};
+template <typename T>
+constexpr T && foo (typename A <T>::type & __t) noexcept
+{
+ return static_cast <T &&>(__t);
+}
+template <class T1, class T2>
+struct B
+{
+ T1 t1;
+ T2 t2;
+ template <class U>
+ constexpr B (U && __x, const T2 & __y) : t1 (foo <U> (__x)), t2 (__y) {}
+};
+static inline constexpr bool
+fn1 (const char c)
+{
+ return ('0' <= c) && (c <= '9');
+}
+static inline constexpr bool
+fn2 (const char c)
+{
+ return (('A' <= c) && (c <= 'Z')) || (('a' <= c) && (c <= 'z'));
+}
+static constexpr bool
+fn3 (const char *const x)
+{
+ return (x[1] == '\0' && x[0] == ']') ? true : (!fn1 (x[0])) ? false : fn3 (&x[1]);
+}
+static constexpr bool
+fn4 (const char *const x)
+{
+ return (x[0] == '\0') ? fn3 (&x[1]) : fn4 (&x[1]);
+}
+static inline constexpr bool
+fn5 (const char *const x)
+{
+ return fn2 (x[0]) ? fn4 (x) : false;
+}
+struct C final
+{
+ constexpr C (const char *const t1) : c (fn5 (t1) ? 199 : 69) {}
+ unsigned c;
+};
+B <C, C> p ("a", "b");
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
index c17090cc3b..02fba95545 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array-tparm.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <const int I[2]> struct A { int ir[I[0]]; };
extern constexpr int ar[2] = { 1, 2 };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C
index e37400a8bd..1614d6bd2c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler-not "static_initialization" } }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C
index 9577f75d9f..ad6b12171a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array2.C
@@ -1,5 +1,5 @@
// PR c++/46348
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<__SIZE_TYPE__ _Nw>
struct _Base
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C
index 145a4307e3..12f42f1834 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array3.C
@@ -1,5 +1,5 @@
// PR c++/48132
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct C
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C
index 9aeb75d6b0..aa95264941 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array4.C
@@ -1,5 +1,5 @@
// PR c++/49924
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { constexpr A() { } };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C
new file mode 100644
index 0000000000..4605b4be90
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array5.C
@@ -0,0 +1,9 @@
+// PR c++/56582
+// { dg-do compile { target c++11 } }
+
+// Reliable ICE
+constexpr int n[3] = {};
+constexpr int k = n[-1]; // { dg-error "negative" }
+
+// Some random byte
+constexpr char c = "foo"[-1000]; // { dg-error "negative" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-array7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-array7.C
new file mode 100644
index 0000000000..8f74675f27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-array7.C
@@ -0,0 +1,13 @@
+// PR c++/61994
+// { dg-do compile { target c++11 } }
+
+struct A { int i,j; };
+
+struct X {
+ A a = {1,1};
+};
+
+constexpr X table[1][1] = {{ {} }};
+
+#define SA(X) static_assert(X,#X)
+SA(table[0][0].a.i == 1);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute.C
index ac85c076d3..cda0e926bf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
//A few constexpr's
constexpr int foo() { return __alignof__(int); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C
new file mode 100644
index 0000000000..c174cb3ebc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-attribute2.C
@@ -0,0 +1,33 @@
+// { dg-do compile { target init_priority } }
+// { dg-require-effective-target c++11 }
+
+struct t { t(); };
+
+constexpr int prio = 123;
+constexpr int size = 8;
+constexpr int pos = 1;
+enum A { zero = 0, one, two };
+__attribute__((init_priority(prio))) t a;
+
+enum class E1 : int {
+ first = 101,
+ second,
+ third,
+};
+__attribute__((init_priority(E1::second))) t b; // Should not compile?
+
+enum E2 {
+ E2_first = 141,
+ E2_second,
+ E2_third,
+};
+__attribute__((init_priority(E2_second))) t c;
+
+void* my_calloc(unsigned, unsigned) __attribute__((alloc_size(pos,two)));
+void* my_realloc(void*, unsigned) __attribute__((alloc_size(two)));
+
+typedef char vec __attribute__((vector_size(size)));
+
+void f(char*) __attribute__((nonnull(pos)));
+
+char g __attribute__((aligned(size)));
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-auto.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-auto.C
index ddf0da0b9b..ae270dc1d3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-auto.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-auto.C
@@ -1,2 +1,2 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr auto value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-base.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-base.C
index 774df318ab..5f0b5cacf9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-base.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-base.C
@@ -1,5 +1,5 @@
// Test base/member class and static_assert with constexpr
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C
index 3ea75432a2..217687a3fb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-base2.C
@@ -1,5 +1,5 @@
// PR c++/46293
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C
index cffe9ea240..db867d4ef4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-base3.C
@@ -1,6 +1,5 @@
// PR c++/46526
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
struct Base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C
index ce23cb9dd1..ab664394e5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-base4.C
@@ -1,6 +1,5 @@
// PR c++/46626
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield.C
index 7eba49833f..a50ac36362 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield.C
@@ -1,5 +1,5 @@
// PR c++/46369
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield2.C
index 531bf31fc0..5b667208ed 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield2.C
@@ -1,6 +1,5 @@
// PR c++/49136
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct day
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield3.C
index b0ecbfb9ab..c393db4e6e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-bitfield3.C
@@ -1,6 +1,5 @@
// PR c++/49136
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C
index b3f5576360..d663f88234 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin1.C
@@ -1,5 +1,5 @@
// PR c++/49813
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
inline constexpr bool
isinf(long double __x)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin2.C
new file mode 100644
index 0000000000..dde38f05ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-builtin2.C
@@ -0,0 +1,16 @@
+// PR c++/54021
+// { dg-do compile { target c++11 } }
+
+extern int nonconst_func(int);
+constexpr int identity(int x) { return x; }
+constexpr int zero() { return identity(0); }
+constexpr int one() { return identity(1); }
+
+// These are the same. Only the latter is accepted, though.
+constexpr int rejected_const_4(int x)
+{ return __builtin_constant_p(x) ? 4 : nonconst_func(x); }
+constexpr int accepted_const_4(int x)
+{ return identity(__builtin_constant_p(x)) ? 4 : nonconst_func(x); }
+
+// This is rejected. I would like it to work.
+constexpr int four = accepted_const_4(1);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C
index b6d7b64713..8038b88140 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-cache1.C
@@ -1,5 +1,5 @@
// PR c++/51433
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int f();
constexpr int g() { return f(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C
index de17f3ddb2..bfba6fc9eb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-cleanup.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-complex.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-complex.C
index fbaae5dcd5..fa393484d6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-complex.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-complex.C
@@ -1,5 +1,6 @@
// Make sure C99 complex works with constexpr
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
struct complex
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C
index 81fcc54b3e..bfe4e13d4a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-compound.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
constexpr int f()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
index e2328fcc57..388a73488e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// Core DR 948
constexpr int something() { return 3; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition2.C
index 243409669b..3ce9b4c45f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-condition2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-condition2.C
@@ -1,5 +1,5 @@
// PR c++/48909
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert((X),#X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C
index 91c489db23..659e733cdc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor10.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor10.C
new file mode 100644
index 0000000000..1dbc3355e3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor10.C
@@ -0,0 +1,6 @@
+// PR c++/52599
+// { dg-do compile { target c++11 } }
+
+struct foo {
+ constexpr foo() try { } catch(...) { }; // { dg-error "constexpr" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C
index 4b526eaa79..e22c55f7a9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor11.C
@@ -1,5 +1,5 @@
// PR c++/55856
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
struct A
{
@@ -10,7 +10,7 @@ template <class T>
struct B
{
T t;
- template <class U> constexpr B(U&& u): t(u) { };
+ template <class U> constexpr B(U&& u): t(u) { }
};
B<A&&> b("");
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C
index a5a4b4d14a..45e1ed27fa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor12.C
@@ -1,5 +1,5 @@
// PR c++/55753
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template <typename Tp>
struct C {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C
new file mode 100644
index 0000000000..299db88326
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor13.C
@@ -0,0 +1,15 @@
+// PR c++/55753
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ double r,i;
+ constexpr A(double r = 0.0, double i = 0.0): r(r), i(i) {}
+};
+
+template <typename Tp>
+struct B {
+ B() {
+ A((true ? 1.0 : A()));
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor2.C
index 5280b131b7..30b01091fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor3.C
index d5bfbad3d6..36d1de4ac1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor3.C
@@ -1,5 +1,5 @@
// PR c++/46348
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
index 397b4b054e..c4947126bb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor4.C
@@ -1,5 +1,5 @@
// PR c++/46873
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C
index 36b01785fe..abfc72c8fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor5.C
@@ -1,5 +1,5 @@
// PR c++/46877
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct new_allocator
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor6.C
index 4f86f73a45..fd87fe495a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor6.C
@@ -1,5 +1,6 @@
// PR c++/47041
-// { dg-options "-std=c++0x -fno-elide-constructors" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-elide-constructors" }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C
index 8338bf1f7e..5d18e56435 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor7.C
@@ -1,5 +1,6 @@
// PR c++/47199
-// { dg-options "-std=c++0x -fno-elide-constructors" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-elide-constructors" }
template < int > struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C
index 81fc83737b..5b75e64750 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor8.C
@@ -1,5 +1,6 @@
// PR c++/46466
-// { dg-options "-std=c++0x -fno-elide-constructors" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-elide-constructors" }
struct S { bool b; };
constexpr S f() { return S{true}; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor9.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor9.C
index b7693f1e63..0763ee4bc9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ctor9.C
@@ -1,5 +1,5 @@
// PR c++/47774
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
index 0943fa4225..f49c56a4ba 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-data1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C
index 2d614ec32e..312760a376 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-data2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename _Tp, _Tp v>
struct A3
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-decl.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-decl.C
index 8c46fab333..2c88fe689e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-decl.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-decl.C
@@ -1,10 +1,9 @@
// PR c++/46930
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S {
static constexpr int size; // { dg-error "must have an initializer" "must have" }
- // { dg-error "previous declaration" "previous" { target *-*-* } 5 }
};
const int limit = 2 * S::size;
-constexpr int S::size = 256; // { dg-error "" }
+constexpr int S::size = 256;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C
index 1413b24bd8..eaa3fbdfdb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg.C
@@ -1,5 +1,5 @@
// PR c++/46335
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct T { };
struct A {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C
index faa8a3603f..f1ca05fe9e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-defarg2.C
@@ -1,5 +1,5 @@
// PR c++/46368
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-default-ctor.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-default-ctor.C
index d3868b599a..a67505d749 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-default-ctor.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-default-ctor.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C
new file mode 100644
index 0000000000..68d50b61b1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-default1.C
@@ -0,0 +1,22 @@
+// PR c++/53464
+// { dg-do compile { target c++11 } }
+
+template <int value>
+struct bar
+{
+ static constexpr int get()
+ {
+ return value;
+ }
+};
+
+template <typename A, int value = A::get()>
+struct foo
+{
+};
+
+int main()
+{
+ typedef foo<bar<0>> type;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating.C
index a020888767..f32dde60ea 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating.C
@@ -1,5 +1,5 @@
// PR c++/51526
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
const int j = 42;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
index c85ed2e819..35439423f7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-delegating2.C
@@ -1,5 +1,5 @@
// PR c++/51723
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <int... V>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-delete.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-delete.C
index 67c9503025..3cc4f55d07 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-delete.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-delete.C
@@ -1,3 +1,3 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr bool never() = delete; // useless, but OK
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C
index 7363e98ecb..ce898abfcf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-deref.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
index cbd4983e84..34cdb733e5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag1.C
@@ -1,5 +1,5 @@
// Test that we explain why a template instantiation isn't constexpr
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C
index c78416ec1a..04db4b3313 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag2.C
@@ -1,5 +1,5 @@
// PR c++/47207
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int X (X); // { dg-error "not usable" }
// { dg-message "own initializer" "" { target *-*-* } 4 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
index 100c17edb4..2a1897b6bf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag3.C
@@ -1,5 +1,5 @@
// PR c++/45923
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int f(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
index 371190e978..29f574df38 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag4.C
@@ -1,5 +1,5 @@
// Origin: PR c++/51633
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C
index c0cbfdd1c5..c8043e3bdb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-diag5.C
@@ -1,5 +1,5 @@
// Origin: PR c++/51633
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C
index 6d231fafad..93224b0c39 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-eh-spec.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T> class my_limits {
public:
static constexpr T min() throw() { return T(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis.C
index 5d090b541d..8c0783c9ac 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int ellipsis(...) { return 1; }
constexpr int ellipsis_c = ellipsis(); // OK
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis2.C
index 0bb6904061..b6a5323b0f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ellipsis2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty.C
index a9fc4388a3..42f873bb33 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Empty {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C
index ef21211944..51f3f554df 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct IsLiteral {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty3.C
index e0026fcc76..a9cd98fa4e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct IsLiteral {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C
index b07f924649..f61aa69326 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty4.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef decltype(sizeof(char)) size_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty5.C
index 9bd9aa583d..e74f5ba1e3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { };
struct B: A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C
new file mode 100644
index 0000000000..be9a6c6ad8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty6.C
@@ -0,0 +1,11 @@
+// PR c++/55993
+// { dg-do compile { target c++11 } }
+
+struct A {};
+struct B:A {};
+struct C:A {};
+struct D:B,C {};
+
+constexpr D d {};
+constexpr const C& e=d; // OK
+constexpr auto f=static_cast<const C&>(d); // FAIL
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
new file mode 100644
index 0000000000..f491994a1f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-empty7.C
@@ -0,0 +1,28 @@
+// PR c++/61959
+// { dg-do compile { target c++11 } }
+
+template <class Coord> struct BasePoint
+{
+ Coord x, y;
+ constexpr BasePoint (Coord, Coord) : x (0), y (0) {}
+};
+template <class T> struct BaseCoord
+{
+ int value;
+ constexpr BaseCoord (T) : value (1) {}
+};
+template <class units> struct IntCoordTyped : BaseCoord<int>, units
+{
+ typedef BaseCoord Super;
+ constexpr IntCoordTyped (int) : Super (0) {}
+};
+template <class units>
+struct IntPointTyped : BasePoint<IntCoordTyped<units> >, units
+{
+ typedef BasePoint<IntCoordTyped<units> > Super;
+ constexpr IntPointTyped (int, int) : Super (0, 0) {}
+};
+struct A
+{
+};
+IntPointTyped<A> a (0, 0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
index 3df7956fd2..e541bf9fbd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C
index 29e835c4bb..9e99d6da46 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C
index 08552cd7de..3e2685b1c5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex3.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-ftrack-macro-expansion=0" }
#define SA(X) static_assert (X, #X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C
index 4214f5c52d..7a9086cb7c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ex4.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-expinst.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-expinst.C
index 2089873698..08a0fe022c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-expinst.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-expinst.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// Error: Explicit instantiation of a function template shall not use the
// inline or constexpr specifiers
template<class T> constexpr inline T bar(T x) { return x; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-explicit-inst.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-explicit-inst.C
index 8f0da0af0c..f5137b3525 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-explicit-inst.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-explicit-inst.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T> constexpr inline T bar(T x) { return x; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C
index 4c84d827f0..2b08478ce9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-fnptr.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr bool is_negative(int x) { return x < 0; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-friend-2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-friend-2.C
new file mode 100644
index 0000000000..36799b4358
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-friend-2.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++11 } }
+
+template<typename T> void f(T);
+
+template <class T> class A {
+ friend constexpr void f<>(int); // { dg-error "'constexpr' is not allowed" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C
index 57782cf349..55a2329eb5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-friend.C
@@ -1,5 +1,5 @@
// PR c++/48948
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { A(); };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C
index c708b040f8..ce4520d557 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-function1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C
index 5a2ec76e3a..8cb32c9ad9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-function2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
@@ -38,7 +37,7 @@ constexpr int g(int x, int n) // error: body not just ‘‘return expr’’
} // { dg-error "not a return-statement" }
constexpr int
-bar(int x, int y) { return x + y + x * y; } // { dg-error "previously" }
+bar(int x, int y) { return x + y + x * y; } // { dg-message "previously" }
int bar(int x, int y) // { dg-error "redefinition" }
{ return x * 2 + 3 * y; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-function3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-function3.C
index e8ca7bc68c..ea4f4abae3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-function3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-function3.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-generated1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-generated1.C
index 73ddc8f5c2..39be3ed571 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-generated1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-generated1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C
index 3b72484a00..fb7570f5ff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice.C
@@ -1,5 +1,5 @@
// We used to crash on this instead of giving a decent error.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { int i; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice10.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice10.C
new file mode 100644
index 0000000000..f6fc80cdc7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice10.C
@@ -0,0 +1,8 @@
+// PR c++/60225
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ constexpr A() {}
+ static constexpr A a[2] = {}; // { dg-error "incomplete" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C
new file mode 100644
index 0000000000..3e32bf6407
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice11.C
@@ -0,0 +1,9 @@
+// PR c++/58610
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ template<typename> A();
+};
+
+constexpr A a; // { dg-error "literal|matching" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice12.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice12.C
new file mode 100644
index 0000000000..98f53b14c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice12.C
@@ -0,0 +1,9 @@
+// PR c++/58609
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ static constexpr int&& i = 0; // { dg-error "initialization" }
+};
+
+int j = A::i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice13.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice13.C
new file mode 100644
index 0000000000..4fe371696a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice13.C
@@ -0,0 +1,8 @@
+// PR c++/59571
+// { dg-do compile { target c++11 } }
+
+template <class>
+struct foo
+{
+ static constexpr int bar{(int)-1};
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice14.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice14.C
new file mode 100644
index 0000000000..f936fb9cd4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice14.C
@@ -0,0 +1,11 @@
+// PR c++/60305
+// { dg-do compile { target c++11 } }
+
+template<int I> int foo() { return I; }
+
+template<int... I> void bar()
+{
+ constexpr int (*X[])() = { foo<I>... };
+}
+
+template void bar<1,3,5>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
new file mode 100644
index 0000000000..576fd41508
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice15.C
@@ -0,0 +1,12 @@
+// PR c++/58207
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ virtual bool foo ();
+};
+
+struct B : public A
+{
+ constexpr B () : A (&::n) {} // { dg-error "declared" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C
index 856246fcc9..dee4817f67 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice2.C
@@ -1,3 +1,3 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int x;
constexpr int& rx = x;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice3.C
index 23903bca78..fccd120855 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice3.C
@@ -1,5 +1,5 @@
// PR c++/46289
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice4.C
index e1ee36dfc9..a083c85e75 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice4.C
@@ -1,5 +1,5 @@
// PR c++/51612
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
index b88ec66c9f..c5a117c02d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice5.C
@@ -1,5 +1,5 @@
// PR c++/51621
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C
index 1a494bb323..30e0a643bc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice6.C
@@ -1,5 +1,5 @@
// PR c++/51327
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
new file mode 100644
index 0000000000..4fa3a83145
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice7.C
@@ -0,0 +1,15 @@
+// PR c++/57827
+// { dg-do compile { target c++11 } }
+
+struct C
+{
+ constexpr int fun (int x)
+ {
+ return x + 1;
+ }
+
+ int a = 2;
+ int b = fun(a);
+};
+
+C c;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice8.C
new file mode 100644
index 0000000000..84bfae0007
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice8.C
@@ -0,0 +1,17 @@
+// PR c++/53349
+// { dg-do compile { target c++11 } }
+
+template <int N>
+struct Foo {
+ constexpr Foo(const Foo<N-1> a) : m_a(a) {}
+ constexpr Foo(const Foo<N> &a) : m_a(a.m_a) {}
+
+ Foo<N-1> m_a;
+};
+
+template <> struct Foo<0> {};
+
+constexpr Foo<1> catty1(Foo<1> x) { return x; }
+constexpr Foo<2> catty2(Foo<1> x) { return Foo<2>(catty1(x)); }
+
+constexpr auto res = catty2(Foo<1>(Foo<0>()));
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ice9.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice9.C
new file mode 100644
index 0000000000..50de3720b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ice9.C
@@ -0,0 +1,7 @@
+// PR c++/58607
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ constexpr A() { i; } // { dg-error "declared|empty body" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C
index 3f40e29aec..514cca59c3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
index f61535f06b..a8af2e66f2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete2.C
@@ -1,6 +1,6 @@
// A constructor that might or might not be constexpr still makes
// its class literal.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct B
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C
index 81822b07e2..c0516f089e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-incomplete3.C
@@ -1,5 +1,5 @@
// PR c++/49015
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C
index 6854e7341b..52fc9ea8ca 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
namespace xstd {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
index f34b980160..65a7036ef0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist3.C
index 7620e6b2c9..912cf910ec 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
#define SA(X) static_assert(X,#X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist4.C
index 8151857569..d4019b2b9c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist4.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { int i; };
struct B: A { constexpr B(): A{} {} };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist5.C
index 97f0399980..901510e106 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist5.C
@@ -1,5 +1,5 @@
// PR c++/50024
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template< class T >
struct Container
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C
index 6b822a1f77..8c344c0b28 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist6.C
@@ -1,5 +1,5 @@
// PR c++/55419
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
struct P
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist7.C
new file mode 100644
index 0000000000..6fea82f515
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist7.C
@@ -0,0 +1,7 @@
+// PR c++/60186
+// { dg-require-effective-target c++11 }
+
+template<typename> void foo(int i)
+{
+ constexpr int a[] = { i }; // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
new file mode 100644
index 0000000000..3d859a8524
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-initlist8.C
@@ -0,0 +1,7 @@
+// PR c++/63415
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct A {
+ static constexpr int value = int(T{});
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C
new file mode 100644
index 0000000000..e0ede738a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-invisiref1.C
@@ -0,0 +1,36 @@
+// PR c++/55879
+// { dg-do compile { target c++11 } }
+
+class CAddress
+{
+public:
+ constexpr CAddress(unsigned long begin) : m_Begin(begin) {}
+ constexpr CAddress(const CAddress &other) : m_Begin(other.m_Begin) {}
+
+private:
+ unsigned long m_Begin;
+};
+
+extern "C" char _lnkDDRRAM;
+/* internal compiler error on gcc 4.6.3 */
+const CAddress s_Memmap[2]
+{
+ {(unsigned long)&_lnkDDRRAM}, /* segmentation fault */
+ {0x40000000},
+};
+
+class CNested {
+public:
+ constexpr CNested(const CAddress primary)
+ : m_PrimaryBlock(primary) {}
+
+private:
+ CAddress m_PrimaryBlock;
+};
+
+/* internal compiler error on gcc 4.7.2 */
+const CNested s_taskDescriptions[2]
+{
+ {{0x42000000}},
+ {{0x43000000}},
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-is_literal.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-is_literal.C
index 82514ed865..f255b8d150 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-is_literal.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-is_literal.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <type_traits>
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-main.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-main.C
new file mode 100644
index 0000000000..42720adc53
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-main.C
@@ -0,0 +1,3 @@
+// { dg-do compile { target c++11 } }
+
+constexpr int main (); // { dg-error "constexpr" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
index ef7ac6b484..775c103161 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-memfn1.C
@@ -1,5 +1,5 @@
// PR c++/48296
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-missing.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-missing.C
index 547f552e37..afaf2e30e3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-missing.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-missing.C
@@ -1,6 +1,5 @@
// PR c++/48911
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert((X),#X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C
index a14d611cee..832a16197d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-mutable1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C
index 8294afa983..fb4c01274d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg1.C
@@ -1,5 +1,5 @@
// Negative examples from N3092 (FCD)
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// OK: declaration
constexpr int square(int x); // { dg-message "never defined" }
@@ -50,7 +50,7 @@ private:
bool flag;
};
// OK
-constexpr int bar(int x, int y) // { dg-error "previously defined here" }
+constexpr int bar(int x, int y) // { dg-message "previously defined here" }
{ return x + y + x*y; }
// ...
// error: redefinition of bar
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-neg2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg2.C
new file mode 100644
index 0000000000..793b4c3f5d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-neg2.C
@@ -0,0 +1,27 @@
+// PR c++/54020
+// { dg-do compile { target c++11 } }
+
+// Preliminaries.
+extern int nonconst_func(int);
+constexpr int identity(int x) { return x; }
+constexpr int zero() { return identity(0); }
+constexpr int one() { return identity(1); }
+
+// Correctly accepted.
+constexpr int three = one() ? 3 : nonconst_func(0);
+
+// Incorrectly accepted. See [dcl.constexpr] #5:
+// For a constexpr function, if no function argument values exist
+// such that the function invocation sub-stitution would produce a
+// constant expression (5.19), the program is ill-formed; no diagnostic
+// required.
+constexpr int bogus() { return zero () ? 3 : nonconst_func(0); } // { dg-error "nonconst_func" }
+
+// Correctly rejected (not sure why).
+constexpr int correct_error() { return nonconst_func(0); } // { dg-error "nonconst_func" }
+
+// Correctly rejected.
+constexpr int z = bogus(); // { dg-error "" }
+
+// This is also correctly rejected.
+constexpr int correct_failure() { return 0 ? 3 : nonconst_func(0); } // { dg-error "nonconst_func" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C
index 0476f90965..dbadaa8e3d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
struct is_funny {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
index 95a1443fa2..d10039a92e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
constexpr T value(T t) { return t; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C
index 6e76ea8fa0..9541bc0781 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int f(int i) { return i; }
#define SA(X) static_assert (X, #X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C
index 119d4e1673..eb7190023e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept4.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// A call is noexcept if it is a valid subexpression of a constant
// expression, even if it is not itself a constant expression.
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C
index 7bf961b3c4..7b0c835995 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct booleable {
bool data;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept6.C
index 91e93fd91b..76d9246d6f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept6.C
@@ -1,5 +1,5 @@
// PR c++/51305
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr bool ok() noexcept
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept7.C
new file mode 100644
index 0000000000..2a70d7bb52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-noexcept7.C
@@ -0,0 +1,9 @@
+// PR c++/53473
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ static constexpr T foo() noexcept { return 0; }
+};
+
+template<> constexpr int A<int>::foo() noexcept { return 0; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg.C
index 7637c0a05b..0f68643f14 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg.C
@@ -1,6 +1,6 @@
// Example from issue 1125 drafting; D() and v were well-formed with the
// wording approved in Rapperswil, now seems they should be ill-formed.
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
struct B {
constexpr B(int x) : i(0) { } // "x" is unused
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg2.C
index 20e05c3c06..32a023b9c8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg2.C
@@ -1,5 +1,6 @@
// PR c++/47200
-// { dg-options "-std=c++0x -w" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-w" }
template < int > struct duration
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg3.C
index 581be6d15c..d8603f838b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-non-const-arg3.C
@@ -1,6 +1,5 @@
// PR c++/49988
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
template<int ... I> struct X { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
index 9104c8afac..0534b41ad0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit.C
@@ -1,5 +1,5 @@
// FIXME this is currently invalid, but seems like it should be OK
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { A() { } };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit2.C
index 21e8bd5096..2d712b64a5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonlit2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C
index 3951fbdb15..bb0743adb7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nonstatic.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr.C
index 6381323cc0..8ff89982d2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-nullptr.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int zero() { return 0; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C
index 6c9d466441..41afbe969a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-object1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// From N2235
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C
index a038970f6a..d52967a7ed 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-object2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
constexpr int verysquare(int x) { return x * x; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C
index 9b3b1fa0ea..8406e4924e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -w" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-w -ftrack-macro-expansion=0" }
#include <limits.h>
extern constexpr int max_s = INT_MAX + 1; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C
index 5d5749ce2c..bd2e6875a9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-overflow2.C
@@ -1,5 +1,5 @@
// PR c++/47504
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
char constexpr sub(char arg)
{ return char(arg - char(1)); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-pedantic.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-pedantic.C
index dc393d7591..21f4c83b39 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-pedantic.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-pedantic.C
@@ -1,6 +1,7 @@
// The FCD doesn't allow typedefs and static_assert in constexpr functions,
// but it should.
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
template <class T>
constexpr T f(T t)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-pos1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-pos1.C
index 775080acce..8e82ef59eb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-pos1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-pos1.C
@@ -1,5 +1,5 @@
// Positive examples from N3092 (FCD)
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert(X, #X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C
index e933506b8a..f960e3afbd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-potential1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// We decided in Rapperswil that it's OK if any value of decide can produce
// a constant expression.
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C
index f6ed2f40af..c16fb15e7b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct C { // literal type
int m;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C
new file mode 100644
index 0000000000..86859aa12b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem2.C
@@ -0,0 +1,13 @@
+// PR c++/61661
+// { dg-do compile { target c++11 } }
+
+struct Outer {
+
+ void Bar();
+
+ struct Foo {
+ void (Outer::*ptr)() ;
+ };
+
+ static constexpr Foo foo = { &Outer::Bar };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C
new file mode 100644
index 0000000000..c5e2101c0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrmem3.C
@@ -0,0 +1,16 @@
+// PR c++/62129
+// { dg-do compile { target c++11 } }
+
+class Evaluator
+{
+ int MakeChangelist ();
+ typedef int (Evaluator::*fac_t)();
+ struct CreatorEntry
+ {
+ const char *type;
+ fac_t factory;
+ };
+ static constexpr CreatorEntry kCreators[] = { "", &Evaluator::MakeChangelist };
+};
+
+constexpr Evaluator::CreatorEntry Evaluator::kCreators[];
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C
index bccec73bb0..18648d92d2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ptrsub.C
@@ -1,6 +1,6 @@
// PR c++/51489
// DR 1313
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct array
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-pure.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-pure.C
index e17e02a422..f54b7c59f7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-pure.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-pure.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C
index 2f9b4887df..e3e13f755f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-recursion.C
@@ -1,5 +1,6 @@
// Test that we catch excessive recursion.
-// { dg-options "-std=c++0x -fconstexpr-depth=5" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fconstexpr-depth=5" }
// { dg-prune-output "in constexpr expansion" }
constexpr int f (int i) { return f (i-1); }
constexpr int i = f(42); // { dg-error "constexpr evaluation depth" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration1.C
new file mode 100644
index 0000000000..6010b20755
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-redeclaration1.C
@@ -0,0 +1,10 @@
+// PR c++/59123
+// { dg-do compile { target c++11 } }
+
+// Fwd-declarations
+struct S;
+extern const S s;
+
+// (... later) definitions
+struct S {};
+constexpr S s {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C
index 482e1ba369..f3e4cead14 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref1.C
@@ -1,9 +1,9 @@
// PR c++/49172
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert((X),#X)
-constexpr int g() { return 42; };
+constexpr int g() { return 42; }
constexpr int(&rg)() = g; // #1
SA(rg() == 42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C
index 2a86eb765c..76973638d5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref2.C
@@ -1,5 +1,5 @@
// Negative reference variable tests.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern int *p;
constexpr int& ri = *p; // { dg-error "p" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref3.C
index 24cc9c8244..7936536042 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref3.C
@@ -1,5 +1,5 @@
// PR c++/50298
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int global_variable;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C
index 6ae355a273..ce1ce5235c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-ref4.C
@@ -1,5 +1,5 @@
// PR c++/54777
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C
new file mode 100644
index 0000000000..69db98bc77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-reinterpret1.C
@@ -0,0 +1,37 @@
+// PR c++/56728
+// { dg-require-effective-target c++11 }
+
+class B {
+public:
+ static B instance;
+ class Inner
+ {
+ public:
+ class Wuzi
+ {
+ unsigned int m;
+ } m_Class[3];
+ unsigned m_Int[4];
+ };
+
+ constexpr static Inner & getInner()
+ {
+ /* I am surprised this is considered a constexpr */
+ return *((Inner *)4);
+ } // { dg-error "reinterpret_cast" }
+};
+
+B B::instance;
+
+class A
+{
+public:
+ constexpr A(B &bridge, B::Inner &bridge2, unsigned char index)
+ : m_Bridge(bridge), m_Wuz(bridge2.m_Class[index])
+ {}
+
+ B &m_Bridge;
+ B::Inner::Wuzi &m_Wuz;
+};
+A works{B::instance, B::getInner(), 3};
+A crashnkill[1]{{B::instance, B::getInner(), 3}};
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
index 5213d5930a..697203d729 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-rom.C
@@ -1,8 +1,8 @@
// PR c++/49673: check that test_data goes into .rodata
-// { dg-options -std=c++0x }
-// { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* powerpc*-*-* rs6000*-*-* score*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-osf* alpha*-*-*vms* } } } } }
+// { dg-do compile { target c++11 } }
+// { dg-additional-options -G0 { target { { alpha*-*-* frv*-*-* ia64-*-* lm32*-*-* m32r*-*-* microblaze*-*-* mips*-*-* nios2-*-* powerpc*-*-* rs6000*-*-* score*-*-* } && { ! { *-*-darwin* *-*-aix* alpha*-*-*vms* } } } } }
// { dg-final { scan-assembler "\\.rdata" { target mips*-*-* } } }
-// { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu || *-*-elf } && { ! mips*-*-* } } } } }
+// { dg-final { scan-assembler "rodata" { target { { *-*-linux-gnu *-*-gnu* *-*-elf } && { ! mips*-*-* } } } } }
struct Data
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C
index 3e08fb0efa..7f82671b44 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-sassert.C
@@ -1,5 +1,5 @@
// Allow static_assert in constexpr constructors, too.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C
new file mode 100644
index 0000000000..80f56a1961
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-specialization.C
@@ -0,0 +1,12 @@
+// PR c++/56871
+// { dg-do compile { target c++11 } }
+
+template<typename T> constexpr int foo(T);
+template<> int foo(int);
+template<> int foo(int); // { dg-error "previous" }
+template<> constexpr int foo(int); // { dg-error "redeclaration" }
+
+template<typename T> int bar(T);
+template<> constexpr int bar(int);
+template<> constexpr int bar(int); // { dg-error "previous" }
+template<> int bar(int); // { dg-error "redeclaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static.C
index 8ed2b5e82e..24174aca02 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static.C
@@ -1,6 +1,6 @@
// Test for constant initialization of non-literal class (e.g. mutex)
-// { dg-options "-std=c++0x -save-temps" }
-// { dg-do run }
+// { dg-options "-save-temps" }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static10.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static10.C
new file mode 100644
index 0000000000..e908fb3cb6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static10.C
@@ -0,0 +1,19 @@
+// PR c++/55944
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct Test
+{
+ constexpr Test(T val) : value(val) {}
+ static void test()
+ {
+ static constexpr Test<int> x(42); // ICE
+ }
+ T value;
+};
+
+int main()
+{
+ static constexpr Test<int> x(42); // OK
+ Test<double>::test();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C
new file mode 100644
index 0000000000..91cc25a71c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static11.C
@@ -0,0 +1,14 @@
+// PR c++/54532
+// { dg-do compile { target c++11 } }
+
+#define SA(X) static_assert(X,#X)
+
+struct A {
+ int i;
+ constexpr static int A::*p = &A::i;
+};
+
+constexpr A a = { 42 };
+SA(a.*A::p == 42);
+
+constexpr int A::* A::p;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static2.C
index 67c3530802..70a254c5dd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct IsLiteral {};
struct ShouldBeLiteral {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C
index dccdc854b3..6d65a62e5a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static3.C
@@ -1,8 +1,8 @@
// Test for constant initialization of class with vtable
-// { dg-options "-std=c++0x -save-temps" }
+// { dg-options "-save-temps" }
// { dg-final { scan-assembler-not "static_initialization" } }
// { dg-final cleanup-saved-temps }
-// { dg-do run }
+// { dg-do run { target c++11 } }
int r = 1;
// implicit default constructor for A and B is constexpr
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C
index 8189fc5de4..fa1a4c746d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static4.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
extern "C" void abort ();
extern int ar[2];
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C
index a401cc0b89..d161cf5445 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C
index a34704d839..78065c3068 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static6.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct B
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static7.C
index e46ddafd70..272ebd901d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static7.C
@@ -1,5 +1,5 @@
// PR c++/48945
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
static constexpr bool is();
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C
index 7c84cf8b07..34aa5afc00 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-static8.C
@@ -1,5 +1,6 @@
// PR c++/50258
-// { dg-options "-std=c++0x -fpermissive" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fpermissive" }
struct Foo {
static const double d = 3.14; // { dg-warning "constexpr" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C
index 40e0c2d65d..bebd4f6f41 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-stmtexpr.C
@@ -1,5 +1,6 @@
// PR c++/46977
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template < typename > void
foo ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-string.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-string.C
index e76d00d7e6..0f561a4360 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-string.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-string.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr char c1 = "hi"[1];
constexpr char c2 = "hi"[2];
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C
index d229304e41..ee94159f09 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-switch.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
constexpr T value(T t = T()) { return t; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-switch2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-switch2.C
index 55cf2ad7ce..652a08d92b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-switch2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-switch2.C
@@ -1,5 +1,5 @@
// Test for constexpr conversion in case context
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class E { e1, e2 };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C
index 9830939806..27375e2cf6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-synth1.C
@@ -1,5 +1,5 @@
// PR c++/46472
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T> struct A {
T t;
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C
index 0c8c73d2e1..b5171141f9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-targ.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
index 88077231b0..b949bd66bf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template1.C
@@ -1,5 +1,5 @@
// PR c++/50248, DR 1358
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class Elt, unsigned max>
struct earray
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
index 6786d1651e..a316b34bd7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C
index 75b2fc4634..f0ac2224af 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { constexpr operator int() { return 42; } };
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template4.C
new file mode 100644
index 0000000000..7adcae83ab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template4.C
@@ -0,0 +1,26 @@
+// PR c++/55931
+// { dg-do compile { target c++11 } }
+
+#include <type_traits>
+
+template<typename Type>
+class Test
+{
+ public:
+ constexpr Test(const Type val) : _value(val) {}
+ constexpr Type get() const {return _value;}
+ static void test()
+ {
+ static constexpr Test<int> x(42);
+ std::integral_constant<int, x.get()> i; // This is not working
+ }
+ protected:
+ Type _value;
+};
+
+int main()
+{
+ static constexpr Test<int> x(42);
+ std::integral_constant<int, x.get()> i; // This is working
+ Test<double>::test();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C
new file mode 100644
index 0000000000..aa80658036
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template5.C
@@ -0,0 +1,6 @@
+// PR c++/54946
+// { dg-do compile { target c++11 } }
+
+template<const char*s> static void testfunc();
+constexpr struct testtype { const char* str; } test = { "abc"} ;
+void (*functionpointer)() = testfunc<(const char*) test.str>; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
new file mode 100644
index 0000000000..fd0c957b0a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template6.C
@@ -0,0 +1,19 @@
+// PR c++/59268
+// { dg-do compile { target c++11 } }
+
+template <typename>
+struct A
+{
+ constexpr A (int) {}
+ virtual void foo ()
+ {
+ constexpr A<void> a (0);
+ }
+};
+
+void
+bar ()
+{
+ A<int> a (3);
+ a.foo ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-template7.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-template7.C
new file mode 100644
index 0000000000..e835dbf4db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-template7.C
@@ -0,0 +1,32 @@
+// PR c++/61556
+// { dg-do compile { target c++11 } }
+
+class ValueType {
+public:
+ constexpr operator int() const {return m_ID;};
+ constexpr ValueType(const int v)
+ : m_ID(v) {}
+private:
+ int m_ID;
+};
+
+class ValueTypeEnum {
+public:
+ static constexpr ValueType doubleval = ValueType(1);
+};
+
+template <int format>
+class ValueTypeInfo {
+};
+
+template <typename Format>
+class FillFunctor {
+public:
+ FillFunctor() {
+ ValueTypeInfo<ValueTypeEnum::doubleval> v;
+ }
+};
+
+int main() {
+ ValueTypeInfo<ValueTypeEnum::doubleval> v;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-throw.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-throw.C
index f1ef9dc7d0..5666629aca 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-throw.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-throw.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr int may_throw(bool decide) {
return decide ? 42 : throw -1; // { dg-error "throw" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C
index 2719e3aea1..98c2309abb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-typedef1.C
@@ -1,5 +1,5 @@
// PR c++/50508
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct integral_constant {
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid.C
index b523bb38cc..32af84eacb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-typeid.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <typeinfo>
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
index 3c7a7f38ec..0c3548c0ac 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union.C
@@ -1,6 +1,6 @@
// Test that we don't have to deal with type punning
// DR 1188 says this is ill-formed
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
union U
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C
index 0bf2aa7e2b..1a5e832ac3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union2.C
@@ -1,5 +1,5 @@
// PR c++/51675
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
union foo
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C
index bac9cabfe5..ecae28dcc5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union3.C
@@ -1,5 +1,5 @@
// PR c++/51675
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
union foo
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union4.C
new file mode 100644
index 0000000000..a8d6b8d3ea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union4.C
@@ -0,0 +1,18 @@
+// PR c++/54922
+// { dg-do compile { target c++11 } }
+
+struct nullable_int
+{
+ bool init_;
+ union {
+ unsigned char for_value_init;
+ int value_;
+ };
+
+ constexpr nullable_int() : init_(false), for_value_init() {}
+};
+
+#define SA(X) static_assert(X,#X)
+
+constexpr nullable_int n;
+SA((n.for_value_init == 0));
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-union5.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-union5.C
new file mode 100644
index 0000000000..57796664e0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-union5.C
@@ -0,0 +1,42 @@
+// PR c++/54922
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
+
+#define SA(X) static_assert(X,#X)
+
+struct A
+{
+ union {
+ union {
+ union {
+ unsigned char i;
+ int j;
+ };
+ };
+ };
+
+ constexpr A() : i(42) {}
+};
+
+constexpr A a;
+SA((a.i == 42));
+
+struct B
+{
+ struct {
+ int h;
+ struct {
+ union {
+ unsigned char i;
+ int j;
+ };
+ int k;
+ }; // { dg-warning "anonymous struct" }
+ }; // { dg-warning "anonymous struct" }
+ int l;
+
+ constexpr B(): h(1), i(2), k(3), l(4) {}
+};
+
+constexpr B b;
+SA((b.h == 1 && b.i == 2 && b.k == 3 && b.l == 4));
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-using.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-using.C
index fc794e9abd..e8e7de31e4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-using.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-using.C
@@ -1,5 +1,5 @@
// Core issue 898
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace N { const int i = 42; }
namespace M { const int j = 42; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C
index 6b282813e5..59a65e5058 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-using2.C
@@ -1,5 +1,5 @@
// PR c++/49520
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace x { void foo(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-value.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-value.C
index 85799d90b6..87311876e3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-value.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-value.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct HopefullyLiteral {
HopefullyLiteral() = default; // Should be a constexpr c'tor as of 12.1/6 and 8.4.2/4
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-value2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-value2.C
index 1b0e28f162..00797fa001 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-value2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-value2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
constexpr T value_init() { return T(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C
index 38d89936ec..8fd9c74453 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-value3.C
@@ -1,5 +1,5 @@
// PR c++/50234
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert((X),#X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C
new file mode 100644
index 0000000000..1fc3738554
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-value4.C
@@ -0,0 +1,16 @@
+// PR c++/57901
+// { dg-require-effective-target c++11 }
+
+struct Z {
+ Z() = default;
+ Z(Z const&) = default;
+ constexpr Z(Z&&) {} /* non-trivial (constexpr) move ctor */
+};
+
+template<typename T>
+constexpr int fn0(T v) { return 0; }
+template<typename T>
+constexpr int fn (T v) { return fn0(v); }
+
+constexpr auto t0 = fn0(Z()); // OK!
+constexpr auto t = fn (Z()); // error! (GCC 4.8.1)
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C
index 5d0ad05941..495c6e2b14 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-variadic.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class... T>
constexpr bool variadics(T&&...) { return true; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual.C
index 448ecb1dc7..2c13e3ef18 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual.C
@@ -1,5 +1,5 @@
// PR c++/47067
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct X {
virtual void x();
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
index 32cee96984..b938d6535c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-virtual4.C
@@ -1,5 +1,5 @@
// PR c++/56291
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
class Base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring1.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring1.C
index 059977bfff..dc1b7080a0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring1.C
@@ -1,6 +1,5 @@
// PR c++/48570
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
extern "C" void abort ();
constexpr wchar_t foo (int i) { return L"0123"[i]; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C
index 4fc8980ef9..db79a9c75e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/constexpr-wstring2.C
@@ -1,6 +1,5 @@
// PR c++/48570
-// { dg-do compile }
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr wchar_t c1 = L"hi"[3]; // { dg-error "out of bound" }
constexpr char16_t c2 = u"hi"[3]; // { dg-error "out of bound" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc1.C b/gcc/testsuite/g++.dg/cpp0x/dc1.C
index ba2e4f4fd0..e7ccb64a3b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dc1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dc1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options --std=c++0x }
+// { dg-do compile { target c++11 } }
struct B {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc2.C b/gcc/testsuite/g++.dg/cpp0x/dc2.C
index dda0b9fc69..665f79d425 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dc2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dc2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options --std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
int i, j;
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc3.C b/gcc/testsuite/g++.dg/cpp0x/dc3.C
index b411c997d8..9c6fd56564 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dc3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dc3.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options --std=c++0x }
+// { dg-do compile { target c++11 } }
struct X {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc5.C b/gcc/testsuite/g++.dg/cpp0x/dc5.C
index 0052b32111..57321626e9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dc5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dc5.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "--std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc7.C b/gcc/testsuite/g++.dg/cpp0x/dc7.C
new file mode 100644
index 0000000000..e48741e071
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/dc7.C
@@ -0,0 +1,7 @@
+// PR c++/58255
+// { dg-do compile { target c++11 } }
+
+struct A {
+ explicit A() { }
+ A(int x) : A() { }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/dc8.C b/gcc/testsuite/g++.dg/cpp0x/dc8.C
new file mode 100644
index 0000000000..e483f3e4ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/dc8.C
@@ -0,0 +1,66 @@
+// PR c++/51424
+// { dg-do compile { target c++11 } }
+
+template <class T >
+struct S
+{
+ S() : S() {} // { dg-error "delegates to itself" }
+ S(int x) : S(x) {} // { dg-error "delegates to itself" }
+};
+
+struct B1
+{
+ B1() : B1() {} // { dg-error "delegates to itself" }
+ B1(int y) : B1(y) {} // { dg-error "delegates to itself" }
+};
+
+struct V1 : virtual B1
+{
+ V1() : B1() {}
+ V1(int x) : B1(x) {}
+};
+
+struct B2
+{
+ B2() : B2() {} // { dg-error "delegates to itself" }
+ B2(int y) : B2(y) {} // { dg-error "delegates to itself" }
+};
+
+struct V2 : virtual B2
+{
+ V2() : V2() {} // { dg-error "delegates to itself" }
+ V2(int x) : V2(x) {} // { dg-error "delegates to itself" }
+};
+
+struct B3
+{
+ B3() {}
+ B3(int y) {}
+};
+
+struct V3 : virtual B3
+{
+ V3() : V3() {} // { dg-error "delegates to itself" }
+ V3(int x) : V3(x) {} // { dg-error "delegates to itself" }
+};
+
+struct CE1
+{
+ constexpr CE1() : CE1() {} // { dg-error "delegates to itself" }
+ constexpr CE1(int x) : CE1(x) {} // { dg-error "delegates to itself" }
+};
+
+struct CEB2
+{
+ constexpr CEB2() : CEB2() {} // { dg-error "delegates to itself" }
+ constexpr CEB2(int x) : CEB2(x) {} // { dg-error "delegates to itself" }
+};
+
+struct CE2 : CEB2
+{
+ constexpr CE2() : CEB2() {}
+ constexpr CE2(int x) : CEB2(x) {}
+};
+
+S<int> s1;
+S<int> s2(1);
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-1212.C b/gcc/testsuite/g++.dg/cpp0x/decltype-1212.C
index 38393d3b87..f9c879e952 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype-1212.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-1212.C
@@ -1,5 +1,5 @@
// Core 1212
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T, class U> struct assert_same_type;
template <class T> struct assert_same_type<T,T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C b/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C
index 2c263dd0a9..fbbc6a1497 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-33837.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// PR c++/33837
void foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C b/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
index 260a0d1cf0..effe08dcc4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-33838.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// PR c++/33838
template<typename T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-54581.C b/gcc/testsuite/g++.dg/cpp0x/decltype-54581.C
new file mode 100644
index 0000000000..4b81b5ab88
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-54581.C
@@ -0,0 +1,28 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-Wall" } */
+
+typedef float v4f __attribute__((vector_size(4*sizeof(float))));
+
+template <class T> void eat (T&&) {}
+
+void test1 ()
+{
+ v4f x = {0,1,2,3};
+ typedef decltype (x < x) v4i;
+ v4i y = {4,5,6,7}; // v4i is not opaque
+ eat (y);
+}
+
+template<class V>
+void test2 ()
+{
+ V x = {0,1,2,3};
+ typedef decltype (x < x) v4i;
+ v4i y = {4,5,6,7}; // v4i is not opaque
+ eat (y);
+}
+
+int main(){
+ test1();
+ test2<v4f>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C
new file mode 100644
index 0000000000..2616bb0904
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-call1.C
@@ -0,0 +1,32 @@
+// PR c++/52748
+// N3276
+// { dg-do compile { target c++11 } }
+
+struct A; // { dg-error "forward declaration" }
+A f();
+
+decltype(f()) g1(); // OK
+decltype(((f()))) g2b(); // OK
+decltype(42,f()) g3(); // OK
+decltype(42,45,f()) g3b(); // OK
+decltype(42,45,(f())) g3c(); // OK
+decltype(42,((45,(f())))) g3c(); // OK
+
+decltype(f(),42) g4(); // { dg-error "" }
+decltype(45,f(),42) g4b(); // { dg-error "" }
+
+class B
+{
+ ~B(); // { dg-error "private" }
+public:
+ int i;
+ void operator[](int);
+};
+B h();
+
+void i(const B&);
+
+decltype(h()) g5a(); // OK
+decltype(h().i) g5(); // { dg-error "" }
+decltype(h()[0]) g6(); // { dg-error "" }
+decltype(i(h())) g7(); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-call2.C b/gcc/testsuite/g++.dg/cpp0x/decltype-call2.C
new file mode 100644
index 0000000000..ad2322090e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-call2.C
@@ -0,0 +1,7 @@
+// PR c++/52748
+// We don't want to instantiate A<T> here.
+// { dg-require-effective-target c++11 }
+
+template <class T> struct A: T { };
+template <class T> A<T> f(T);
+decltype(f(42)) *p;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-call3.C b/gcc/testsuite/g++.dg/cpp0x/decltype-call3.C
new file mode 100644
index 0000000000..27797a2fa3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-call3.C
@@ -0,0 +1,132 @@
+// Testcase for N3276 and operator overloading
+// { dg-require-effective-target c++11 }
+
+struct A;
+struct B {
+ A operator()(int);
+ A operator[](int);
+ A operator=(int);
+ A operator+=(int);
+ A operator-=(int);
+ A operator*=(int);
+ A operator/=(int);
+ A operator^=(int);
+ A operator&=(int);
+ A operator|=(int);
+ A operator<<=(int);
+ A operator>>=(int);
+};
+
+A operator-(B);
+A operator+(B);
+A operator*(B);
+A operator&(B);
+A operator!(B);
+A operator~(B);
+A operator++(B);
+A operator--(B);
+
+A operator+(B,B);
+A operator-(B,B);
+A operator*(B,B);
+A operator/(B,B);
+A operator%(B,B);
+A operator^(B,B);
+A operator&(B,B);
+A operator|(B,B);
+A operator<(B,B);
+A operator>(B,B);
+A operator,(B,B);
+A operator<<(B,B);
+A operator>>(B,B);
+A operator==(B,B);
+A operator->*(B,B);
+
+#define TRY(E) static_cast<decltype(E)*>(0)
+
+template <class B>
+void f()
+{
+ B b;
+ TRY(b(0));
+ TRY(b[0]);
+ TRY(b=0);
+ TRY(b+=0);
+ TRY(b-=0);
+ TRY(b*=0);
+ TRY(b/=0);
+ TRY(b^=0);
+ TRY(b&=0);
+ TRY(b|=0);
+ TRY(b<<=0);
+ TRY(b>>=0);
+
+ TRY(-b);
+ TRY(+b);
+ TRY(*b);
+ TRY(&b);
+ TRY(!b);
+ TRY(~b);
+ TRY(++b);
+ TRY(--b);
+
+ TRY(b+b);
+ TRY(b-b);
+ TRY(b*b);
+ TRY(b/b);
+ TRY(b%b);
+ TRY(b^b);
+ TRY(b&b);
+ TRY(b|b);
+ TRY(b>b);
+ TRY(b<b);
+ TRY((b,b));
+ TRY(b<<b);
+ TRY(b>>b);
+ TRY(b==b);
+ TRY(b->*b);
+}
+
+int main()
+{
+ B b;
+ TRY(b(0));
+ TRY(b[0]);
+ TRY(b=0);
+ TRY(b+=0);
+ TRY(b-=0);
+ TRY(b*=0);
+ TRY(b/=0);
+ TRY(b^=0);
+ TRY(b&=0);
+ TRY(b|=0);
+ TRY(b<<=0);
+ TRY(b>>=0);
+
+ TRY(-b);
+ TRY(+b);
+ TRY(*b);
+ TRY(&b);
+ TRY(!b);
+ TRY(~b);
+ TRY(++b);
+ TRY(--b);
+
+ TRY(b+b);
+ TRY(b-b);
+ TRY(b*b);
+ TRY(b/b);
+ TRY(b%b);
+ TRY(b^b);
+ TRY(b&b);
+ TRY(b|b);
+ TRY(b>b);
+ TRY(b<b);
+ TRY((b,b));
+ TRY(b<<b);
+ TRY(b>>b);
+ TRY(b==b);
+ TRY(b->*b);
+
+ f<B>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C b/gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C
new file mode 100644
index 0000000000..f46d0ba419
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-incomplete1.C
@@ -0,0 +1,9 @@
+// PR c++/59270
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ struct B b; // { dg-error "incomplete type" }
+};
+
+decltype(A()) a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C b/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C
index 8e3c824072..cecff3c294 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype-refbug.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/33045
int && f ();
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype1.C b/gcc/testsuite/g++.dg/cpp0x/decltype1.C
index d1288e07d9..84c7a03f38 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype10.C b/gcc/testsuite/g++.dg/cpp0x/decltype10.C
index 6c488998c5..846d0bf57c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype10.C
@@ -1,6 +1,5 @@
// PR c++/34271
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype11.C b/gcc/testsuite/g++.dg/cpp0x/decltype11.C
index ac32d349a6..9fa8e230fc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype11.C
@@ -1,5 +1,5 @@
// PR c++/35316
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype12.C b/gcc/testsuite/g++.dg/cpp0x/decltype12.C
index 77c794bcf0..eae318db2d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype12.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype15.C b/gcc/testsuite/g++.dg/cpp0x/decltype15.C
index 5c2d445deb..f19819cfd1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype15.C
@@ -1,6 +1,5 @@
// PR c++/38640
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int N> void foo (decltype (N));
template<long int N> void foo (decltype (N));
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype16.C b/gcc/testsuite/g++.dg/cpp0x/decltype16.C
index 2002458b85..5cf8439536 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype16.C
@@ -1,5 +1,5 @@
// PR c++/39070
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename X> struct junk {
template<typename Z> static Z y();
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype17.C b/gcc/testsuite/g++.dg/cpp0x/decltype17.C
index 3c98105fce..6e5854db6c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype17.C
@@ -1,6 +1,5 @@
// PR c++/36628
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <typeinfo>
#include <string.h>
@@ -24,6 +23,6 @@ int main()
return 1;
if (strcmp (typeid(g).name(), "FRivE") != 0)
return 2;
- if (strcmp (typeid(h).name(), "FivE") != 0)
+ if (strcmp (typeid(h).name(), "FOivE") != 0)
return 3;
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype18.C b/gcc/testsuite/g++.dg/cpp0x/decltype18.C
index 0d44586e9d..4c1571a565 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype18.C
@@ -1,5 +1,5 @@
// PR c++/37875
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename> struct X {};
X<decltype(1 > 2)> x;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype2.C b/gcc/testsuite/g++.dg/cpp0x/decltype2.C
index e0c5900304..f316f50a02 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
@@ -46,7 +45,7 @@ int bar(int);
CHECK_DECLTYPE(decltype(foo), int(char));
decltype(bar) z; // { dg-error "overload" "overload" }
-// { dg-error "invalid type" "invalid" { target *-*-* } 48 }
+// { dg-error "invalid type" "invalid" { target *-*-* } 47 }
CHECK_DECLTYPE(decltype(&foo), int(*)(char));
CHECK_DECLTYPE(decltype(*&foo), int(&)(char));
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype20.C b/gcc/testsuite/g++.dg/cpp0x/decltype20.C
index 3155cdcf86..5fb3540428 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype20.C
@@ -1,5 +1,5 @@
// PR c++/42277
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S { int s; };
template <int N>
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype21.C b/gcc/testsuite/g++.dg/cpp0x/decltype21.C
index 733725626c..e4dc2011e3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype21.C
@@ -1,6 +1,6 @@
// PR c++/6709 (DR 743)
// PR c++/42603 (DR 950)
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
T make();
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype22.C b/gcc/testsuite/g++.dg/cpp0x/decltype22.C
index 74811cfe70..b3ff8b84a4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype22.C
@@ -1,5 +1,5 @@
// PR c++/42761
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename _Tp> _Tp* fn();
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype23.C b/gcc/testsuite/g++.dg/cpp0x/decltype23.C
index 78eb89d8ee..731eed708e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype23.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int x, &&y = static_cast<int &&>(x);
typedef decltype((y)) myInt; // `y' is a parenthesized id-expression of type int that is an lvalue
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype24.C b/gcc/testsuite/g++.dg/cpp0x/decltype24.C
index 16d0736d66..0ff9963e1b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype24.C
@@ -1,5 +1,5 @@
// PR c++/47068
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct broken {
int member;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype25.C b/gcc/testsuite/g++.dg/cpp0x/decltype25.C
index c9559f1511..e57376f9b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype25.C
@@ -1,5 +1,5 @@
// PR c++/47851
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Type {
void display_type();
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype26.C b/gcc/testsuite/g++.dg/cpp0x/decltype26.C
index a81d411558..0d320dadd2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype26.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype27.C b/gcc/testsuite/g++.dg/cpp0x/decltype27.C
index cb962ada52..3174a89cf0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype27.C
@@ -1,5 +1,5 @@
// PR c++/48617
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T, decltype(T())> // #
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype28.C b/gcc/testsuite/g++.dg/cpp0x/decltype28.C
index c97fd202c1..c1c5a1b305 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype28.C
@@ -1,5 +1,5 @@
// PR c++/44175
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <bool, class T> struct enable_if { };
template <class T> struct enable_if <true, T> { typedef T type; };
@@ -8,8 +8,8 @@ template <class F, int N>
void ft (F f, typename enable_if<N!=0, int>::type) {}
template< class F, int N >
-decltype(ft<F, N-1> (F(), 0))
-ft (F f, typename enable_if<N==0, int>::type) {} // { dg-error "depth" }
+decltype(ft<F, N-1> (F(), 0)) // { dg-error "depth" }
+ft (F f, typename enable_if<N==0, int>::type) {}
int main() {
ft<struct a*, 2> (0, 0); // { dg-message "from here" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype29.C b/gcc/testsuite/g++.dg/cpp0x/decltype29.C
index 70fe4412dc..d87299cccc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype29.C
@@ -1,5 +1,5 @@
// PR c++/44175
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <bool, class T> struct enable_if { };
template <class T> struct enable_if <true, T> { typedef T type; };
@@ -9,8 +9,8 @@ typename enable_if<x==0,int>::type
ft() {}
template<class F, int N>
-decltype (ft<F> (F()))
-ft() {} // { dg-error "depth" }
+decltype (ft<F> (F())) // { dg-error "depth" }
+ft() {}
int main() {
ft<struct a*, 0>(); // { dg-error "no match|wrong number" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype3.C b/gcc/testsuite/g++.dg/cpp0x/decltype3.C
index b44dd17c8e..aaff5df598 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype3.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
@@ -56,7 +55,7 @@ public:
CHECK_DECLTYPE(decltype(aa.*&A::a), int&);
decltype(aa.*&A::b) zz; // { dg-error "cannot create pointer to reference member" "cannot" }
-// { dg-error "invalid type" "invalid type" { target *-*-* } 58 }
+// { dg-error "invalid type" "invalid type" { target *-*-* } 57 }
CHECK_DECLTYPE(decltype(caa.*&A::a), const int&);
class X {
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype30.C b/gcc/testsuite/g++.dg/cpp0x/decltype30.C
index b23c9a94d8..25eeb9d295 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype30.C
@@ -1,5 +1,5 @@
// PR c++/49369
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class,class> struct assert_same;
template <class T> struct assert_same<T,T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype31.C b/gcc/testsuite/g++.dg/cpp0x/decltype31.C
index b9817eb9e1..bffcf1c0d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype31.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype31.C
@@ -1,5 +1,5 @@
// PR c++/49921
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Local
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype32.C b/gcc/testsuite/g++.dg/cpp0x/decltype32.C
index 66731cc947..02c6316e16 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype32.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype32.C
@@ -1,12 +1,13 @@
// PR c++/50075
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "-ftemplate-depth=10" }
template <typename T>
-auto make_array(const T& il) -> // { dg-error "not declared" }
-decltype(make_array(il))
+auto make_array(const T& il) ->
+decltype(make_array(il)) // { dg-error "not declared|no matching|exceeds" }
{ }
int main()
{
- int z = make_array(1); // { dg-error "no match" }
+ int z = make_array(1); // { dg-error "no matching" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype33.C b/gcc/testsuite/g++.dg/cpp0x/decltype33.C
index d022d16648..63d5a49139 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype33.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype33.C
@@ -1,5 +1,6 @@
// PR c++/50084
-// { dg-options "-std=c++0x -fno-inline" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-inline" }
template<typename> struct remove_reference;
template<typename T> struct remove_reference<T&> { typedef T type; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype34.C b/gcc/testsuite/g++.dg/cpp0x/decltype34.C
index fbd15c2797..028e50669f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype34.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype34.C
@@ -1,5 +1,5 @@
// PR c++/50870
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
struct impl
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype35.C b/gcc/testsuite/g++.dg/cpp0x/decltype35.C
index d1fd47638a..daffaf0306 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype35.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype35.C
@@ -1,5 +1,5 @@
// PR c++/50870
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class V>
struct impl
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype36.C b/gcc/testsuite/g++.dg/cpp0x/decltype36.C
index f3dfed992c..c426f69a6d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype36.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype36.C
@@ -1,5 +1,5 @@
// PR c++/51265
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Funny
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype39.C b/gcc/testsuite/g++.dg/cpp0x/decltype39.C
new file mode 100644
index 0000000000..4676d2de9b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype39.C
@@ -0,0 +1,19 @@
+// PR c++/53788
+// { dg-do compile { target c++11 } }
+
+struct t { static const bool value = true; };
+struct f { static const bool value = false; };
+
+template<typename T>
+struct has_static {
+ template<typename X>
+ static t check(X*, decltype(T::fun())* = 0); // { dg-error "without object" }
+ static f check(...);
+
+ typedef decltype(check((T*)(0))) ret;
+ static const bool value = ret::value;
+};
+
+struct test { int fun() { return 0; } };
+
+bool b = has_static<test>::value;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype4.C b/gcc/testsuite/g++.dg/cpp0x/decltype4.C
index cd715cb289..c14e156465 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype4.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype40.C b/gcc/testsuite/g++.dg/cpp0x/decltype40.C
new file mode 100644
index 0000000000..1b194ab1e6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype40.C
@@ -0,0 +1,101 @@
+// PR c++/51222
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct add_rref {
+ typedef T&& type;
+};
+
+template<>
+struct add_rref<void> {
+ typedef void type;
+};
+
+template<class T>
+typename add_rref<T>::type declval();
+
+template<class T, class U, class =
+ decltype(::delete ::new T(declval<U>()))
+>
+auto f(int) -> char;
+
+template<class, class>
+auto f(...) -> char(&)[2];
+
+template<class T, class =
+ decltype(::delete ::new T())
+>
+auto g(int) -> char;
+
+template<class>
+auto g(...) -> char(&)[2];
+
+template<class T, class U>
+auto f2(int) -> decltype(::delete ::new T(declval<U>()), char());
+
+template<class, class>
+auto f2(...) -> char(&)[2];
+
+template<class T>
+auto g2(int) -> decltype(::delete ::new T(), char());
+
+template<class>
+auto g2(...) -> char(&)[2];
+
+struct C { };
+
+struct A {
+ virtual ~A() = 0;
+};
+
+struct D1 {
+ D1() = delete;
+};
+
+struct D2 {
+ ~D2() = delete;
+};
+
+static_assert(sizeof(g<void>(0)) == 2, "Ouch");
+static_assert(sizeof(g<void()>(0)) == 2, "Ouch");
+static_assert(sizeof(g<void() const>(0)) == 2, "Ouch");
+static_assert(sizeof(g<A>(0)) == 2, "Ouch");
+static_assert(sizeof(g<D1>(0)) == 2, "Ouch");
+static_assert(sizeof(g<D2>(0)) == 2, "Ouch");
+static_assert(sizeof(g<int&>(0)) == 2, "Ouch");
+static_assert(sizeof(g<int&&>(0)) == 2, "Ouch");
+static_assert(sizeof(g<void(&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(g<void(&&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(f<void, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f<void(), void()>(0)) == 2, "Ouch");
+//static_assert(sizeof(f<void() const, void() const>(0)) == 2, "Ouch");
+static_assert(sizeof(f<int, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f<void, int>(0)) == 2, "Ouch");
+static_assert(sizeof(f<C, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f<C, int>(0)) == 2, "Ouch");
+static_assert(sizeof(f<int&, int&>(0)) == 2, "Ouch");
+static_assert(sizeof(f<int&&, int&&>(0)) == 2, "Ouch");
+static_assert(sizeof(f<void(&)(), void(&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(f<void(&&)(), void(&&)()>(0)) == 2, "Ouch");
+
+static_assert(sizeof(g2<void>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<void()>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<void() const>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<A>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<D1>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<D2>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<int&>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<int&&>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<void(&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(g2<void(&&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<void, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<void(), void()>(0)) == 2, "Ouch");
+//static_assert(sizeof(f2<void() const, void() const>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<int, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<void, int>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<C, void>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<C, int>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<int&, int&>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<int&&, int&&>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<void(&)(), void(&)()>(0)) == 2, "Ouch");
+static_assert(sizeof(f2<void(&&)(), void(&&)()>(0)) == 2, "Ouch");
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype41.C b/gcc/testsuite/g++.dg/cpp0x/decltype41.C
new file mode 100644
index 0000000000..1439e15c0d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype41.C
@@ -0,0 +1,43 @@
+// Core 1273
+// { dg-do compile { target c++11 } }
+
+template <class T> struct C;
+template <class T> struct D;
+
+class A
+{
+ int i;
+ static int j;
+ friend struct C<int>;
+ friend struct D<int>;
+} a;
+
+class B
+{
+ int i;
+ static int j;
+ friend struct C<float>;
+ friend struct D<float>;
+} b;
+
+template <class T>
+struct C
+{
+ template <class U> decltype (a.i) f() { } // #1
+ template <class U> decltype (b.i) f() { } // #2
+};
+
+template <class T>
+struct D
+{
+ template <class U> decltype (A::j) f() { } // #1
+ template <class U> decltype (B::j) f() { } // #2
+};
+
+int main()
+{
+ C<int>().f<int>(); // calls #1
+ C<float>().f<float>(); // calls #2
+ D<int>().f<int>(); // calls #1
+ D<float>().f<float>(); // calls #2
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype42.C b/gcc/testsuite/g++.dg/cpp0x/decltype42.C
new file mode 100644
index 0000000000..6c1aa43647
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype42.C
@@ -0,0 +1,31 @@
+// PR c++/50545
+// { dg-do compile { target c++11 } }
+
+template< class T >
+T&& declval();
+
+// #1
+template< class T >
+auto f( int )
+ -> decltype( int{ declval<T>() } );
+
+// #2
+template< class >
+void f( ... );
+
+
+#define STATIC_ASSERT( ... ) static_assert( __VA_ARGS__, #__VA_ARGS__ )
+
+template< class T, class U >
+struct is_same {
+ static constexpr bool value = false;
+};
+
+template< class T >
+struct is_same<T, T> {
+ static constexpr bool value = true;
+};
+
+
+STATIC_ASSERT( is_same< decltype( f<int>(0) ), int >::value ); // OK; f<int>(0) calls #1.
+STATIC_ASSERT( is_same< decltype( f<int*>(0) ), void >::value ); // static assertion fails; f<int*>(0) should call #2, because int{ (int*)0 } is ill-formed, but calls #1.
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype43.C b/gcc/testsuite/g++.dg/cpp0x/decltype43.C
new file mode 100644
index 0000000000..4df95a1047
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype43.C
@@ -0,0 +1,27 @@
+// PR c++/53763
+// { dg-do compile { target c++11 } }
+
+template<typename TYPE>
+struct A
+{
+ static int a(TYPE value)
+ {
+ return value;
+ }
+};
+
+template<typename... ARGS>
+struct B
+{
+ static int b(ARGS...)
+ {
+ return 0;
+ }
+};
+
+int main()
+{
+ int x = B<decltype(A<int>::a(1))>::b(A<int>::a(1));
+ int y = B<decltype(A ::a(2))>::b(A<int>::a(2)); // { dg-error "template argument" }
+ return x + y;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype44.C b/gcc/testsuite/g++.dg/cpp0x/decltype44.C
new file mode 100644
index 0000000000..2b2e62213e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype44.C
@@ -0,0 +1,44 @@
+// PR c++/53307
+// { dg-do compile { target c++11 } }
+
+template <class...Ts> struct tuple{};
+
+struct funct
+{
+ template <class T, class...argTs>
+ T operator()(T arg1, argTs...)
+ {
+ return arg1;
+ }
+};
+
+template <class...>class test;
+
+template < template <class...> class tp,
+ class...arg1Ts,
+ class...arg2Ts>
+class test<tp<arg1Ts...>, tp<arg2Ts...>>
+{
+ public:
+ template <class func>
+ auto test_pass(func fun, arg2Ts...arg2s)
+ -> decltype(fun(arg2s...))
+ {
+ return fun(arg2s...);
+ }
+
+ template <class func, class...arg3Ts>
+ auto testbug(func fun, arg2Ts...arg2s, arg3Ts...arg3s)
+ -> decltype(fun(arg2s..., arg3s...))
+ {
+ return fun(arg2s..., arg3s...);
+ }
+};
+
+int main()
+{
+ test<tuple<>, tuple<char, int>> t;
+ t.test_pass (funct(), 'a', 2);
+ t.testbug (funct(), 'a', 2, "fine");
+ t.testbug (funct(), 'a', 2);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype45.C b/gcc/testsuite/g++.dg/cpp0x/decltype45.C
new file mode 100644
index 0000000000..f768d8554e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype45.C
@@ -0,0 +1,40 @@
+// PR c++/51878
+// { dg-do compile { target c++11 } }
+
+template<class F, class... T>
+auto indirect_call(F f, T... t) -> decltype(f(t...))
+{
+ return f(t...);
+}
+
+template<class F, class T>
+struct VariadicBind
+{
+ F f;
+ T t;
+
+ template<class... A>
+ auto operator()(A... a) -> decltype(indirect_call(f, t, a...))
+ {
+ return indirect_call(f, t, a...);
+ }
+};
+
+template<class F>
+void apply(F f)
+{
+ f();
+}
+
+template<class F, class V1, class... V>
+void apply(F f, V1 v1, V... v)
+{
+ apply(VariadicBind<F, int>{f, v1}, v...);
+}
+
+void func(int, int) { }
+
+int main()
+{
+ apply(func, 0, 0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype46.C b/gcc/testsuite/g++.dg/cpp0x/decltype46.C
new file mode 100644
index 0000000000..f18354dfa8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype46.C
@@ -0,0 +1,12 @@
+// PR c++/55558
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ static int member;
+};
+
+template<typename T> void foobar ()
+{
+ typedef decltype (A::member) myType;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype47.C b/gcc/testsuite/g++.dg/cpp0x/decltype47.C
new file mode 100644
index 0000000000..f6700a33cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype47.C
@@ -0,0 +1,12 @@
+// PR c++/55564
+// { dg-do compile { target c++11 } }
+
+template <typename T, decltype(sizeof(T)) N>
+auto array_size(T(&)[N]) -> decltype(N) { return N; }
+
+int main() {
+ int simple[4] = {};
+ int result = array_size(simple);
+
+ return result;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype48.C b/gcc/testsuite/g++.dg/cpp0x/decltype48.C
index 5aa0174a1e..39fc4ebf55 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype48.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype48.C
@@ -1,13 +1,13 @@
// PR c++/56059
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
typedef int Int;
template<typename T> struct baz { };
template<typename T> T bar();
template<typename T, typename ... U>
-baz<decltype(bar<Int>(bar<U>() ...))>
-foo(); // { dg-error "no match" }
+baz<decltype(bar<Int>(bar<U>() ...))> // { dg-error "no match" }
+foo();
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype49.C b/gcc/testsuite/g++.dg/cpp0x/decltype49.C
new file mode 100644
index 0000000000..c3174982f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype49.C
@@ -0,0 +1,10 @@
+// PR c++/45282
+// { dg-require-effective-target c++11 }
+
+struct A { int i; };
+int A::*ipm = &A::i;
+
+template <class T, class U> class assert_same_type;
+template <class T> class assert_same_type<T,T> { };
+
+assert_same_type<decltype(A().*ipm),int> x2;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype5.C b/gcc/testsuite/g++.dg/cpp0x/decltype5.C
index 1391539873..3842e09c13 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype5.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype50.C b/gcc/testsuite/g++.dg/cpp0x/decltype50.C
new file mode 100644
index 0000000000..dc3332ac52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype50.C
@@ -0,0 +1,18 @@
+// PR c++/52597
+// { dg-require-effective-target c++11 }
+
+struct A {
+ int zip();
+
+ decltype(zip) bar0; // { dg-error "invalid use of non-static member function" }
+ void bar1() {
+ typedef decltype(this->A::zip) x; // { dg-error "invalid use of non-static member function" }
+ }
+ void bar2() {
+ typedef decltype(A::zip) x; // { dg-error "invalid use of non-static member function" }
+ }
+};
+
+typedef decltype(A().zip) x; // { dg-error "invalid use of non-static member function" }
+
+// { dg-prune-output "invalid type in declaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype51.C b/gcc/testsuite/g++.dg/cpp0x/decltype51.C
new file mode 100644
index 0000000000..9ab41467a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype51.C
@@ -0,0 +1,10 @@
+// PR c++/53721
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ void f() {};
+ auto g() -> decltype(this->f())
+ {
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype52.C b/gcc/testsuite/g++.dg/cpp0x/decltype52.C
new file mode 100644
index 0000000000..e6b5a4cafb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype52.C
@@ -0,0 +1,18 @@
+// PR c++/56450
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+T&& declval();
+
+template<typename, typename>
+struct is_same
+{ static constexpr bool value = false; };
+
+template<typename T>
+struct is_same<T, T>
+{ static constexpr bool value = true; };
+
+struct A { static const int dummy = 0; };
+
+static_assert(is_same<decltype(declval<A>().dummy), const int>::value, "");
+static_assert(!is_same<decltype(declval<A>().dummy), const int&>::value, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype53.C b/gcc/testsuite/g++.dg/cpp0x/decltype53.C
new file mode 100644
index 0000000000..4580e97b75
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype53.C
@@ -0,0 +1,11 @@
+// PR c++/57092
+// { dg-do compile { target c++11 } }
+
+template <void (*F)(int)>
+class B {
+ decltype(F) v;
+};
+
+void foo(int) {}
+
+B<foo> o;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype54.C b/gcc/testsuite/g++.dg/cpp0x/decltype54.C
new file mode 100644
index 0000000000..9d301c0a73
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype54.C
@@ -0,0 +1,26 @@
+// PR c++/51908
+// { dg-do compile { target c++11 } }
+
+struct foo1
+{
+ template <typename Ret, typename... Args>
+ operator decltype(static_cast<Ret (*)(Args...)>(nullptr)) () const;
+};
+
+struct foo2
+{
+ template <typename Ret, typename... Args>
+ operator decltype(static_cast<Ret (*)(Args... args)>(nullptr)) () const;
+};
+
+struct foo3
+{
+ template <typename Ret, typename Arg>
+ operator decltype(static_cast<Ret (*)(Arg)>(nullptr)) () const;
+};
+
+struct foo4
+{
+ template <typename Ret, typename Arg>
+ operator decltype(static_cast<Ret (*)(Arg arg)>(nullptr)) () const;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype55.C b/gcc/testsuite/g++.dg/cpp0x/decltype55.C
new file mode 100644
index 0000000000..95427fc001
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype55.C
@@ -0,0 +1,20 @@
+// PR c++/53211
+// { dg-do compile { target c++11 } }
+
+template<typename A, typename B>
+ struct is_same { static const bool value = false; };
+
+template<typename A>
+ struct is_same<A, A> { static const bool value = true; };
+
+template<typename... Args>
+void func(Args... args)
+{
+ int arr[] = { args... };
+ static_assert (is_same<decltype(arr), int[sizeof...(Args)]>::value, "");
+}
+
+int main()
+{
+ func(1, 2, 3, 4);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype56.C b/gcc/testsuite/g++.dg/cpp0x/decltype56.C
new file mode 100644
index 0000000000..b44fad098f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype56.C
@@ -0,0 +1,11 @@
+// PR c++/52816
+// { dg-do compile { target c++11 } }
+
+class c {
+ int f;
+ public:
+ template <typename A>
+ decltype(f) m(A) const;
+};
+
+decltype(c{}.m(0)) i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype57.C b/gcc/testsuite/g++.dg/cpp0x/decltype57.C
new file mode 100644
index 0000000000..353cc72c33
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype57.C
@@ -0,0 +1,8 @@
+// PR c++/58633
+// { dg-do compile { target c++11 } }
+
+void foo(int i)
+{
+ typedef int I;
+ decltype(i.I::~I())* p;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype6.C b/gcc/testsuite/g++.dg/cpp0x/decltype6.C
index 7aa8e1505e..10086c5fd9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype6.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
diff --git a/gcc/testsuite/g++.dg/cpp0x/decltype9.C b/gcc/testsuite/g++.dg/cpp0x/decltype9.C
index 4cd150ea6c..9db3db039a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/decltype9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/decltype9.C
@@ -1,6 +1,5 @@
// PR c++/34271
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/deduce.C b/gcc/testsuite/g++.dg/cpp0x/deduce.C
index 635228cca0..380ca280b3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/deduce.C
+++ b/gcc/testsuite/g++.dg/cpp0x/deduce.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted1.C b/gcc/testsuite/g++.dg/cpp0x/defaulted1.C
index e8fe37eb39..4956e88ed6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted1.C
@@ -1,6 +1,5 @@
// Positive test for defaulted/deleted fns
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted10.C b/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
index 64fa5f0193..8537268621 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted10.C
@@ -1,5 +1,5 @@
// PR c++/40381
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted11.C b/gcc/testsuite/g++.dg/cpp0x/defaulted11.C
index b9bed7e003..cd4e293f65 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted11.C
@@ -1,5 +1,5 @@
// Core issue 901
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted13.C b/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
index 8b23579217..68dc5d0a58 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted13.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T>
struct NonCopyable {
@@ -7,13 +7,13 @@ struct NonCopyable {
};
template<>
-NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-error "declared" }
+NonCopyable<int>::NonCopyable(NonCopyable<int> const&) = delete; // { dg-message "declared" }
template<typename T>
NonCopyable<T>::NonCopyable(NonCopyable<T> const&) = default;
template<>
-NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-error "declared" }
+NonCopyable<double>::NonCopyable(NonCopyable<double> const&) = delete; // { dg-message "declared" }
int main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
index e476d576cf..0c07fa701b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted14.C
@@ -1,5 +1,5 @@
// PR c++/39866
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {
A& operator=(const A&) = delete; // { dg-bogus "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted15.C b/gcc/testsuite/g++.dg/cpp0x/defaulted15.C
index 0a47c20f77..fabcc23a15 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted15.C
@@ -1,5 +1,5 @@
// PR c++/38796
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert ((X), #X)
@@ -43,7 +43,7 @@ SA(__has_trivial_copy(E));
struct F
{
- F(F&) = default; // { dg-error "non-const" }
+ F(F&) = default;
};
struct G: public F
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted16.C b/gcc/testsuite/g++.dg/cpp0x/defaulted16.C
index 741b43de27..f866c8e982 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted16.C
@@ -1,7 +1,7 @@
// Test that non-inline default causes the function to be defined even if
// it isn't used.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1AC1Ev" } }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted17.C b/gcc/testsuite/g++.dg/cpp0x/defaulted17.C
index 79e91a0eb6..0a3c0de268 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted17.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A // { dg-error "const|operator=" }
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C
index 559dfde483..6d84a1e881 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted18.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void f(char i, int j) = delete; // { dg-message "<deleted>" }
void f(int i, ...); // { dg-message "void f" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted19.C b/gcc/testsuite/g++.dg/cpp0x/defaulted19.C
index ea33df3983..2b93a7b091 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted19.C
@@ -1,6 +1,6 @@
-// We allocate a cookie to help us run the destructor even if it's deleted.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// We don't allocate a cookie to help us run the destructor if it's trivial,
+// even if it's deleted.
+// { dg-do run { target c++11 } }
struct A
{
@@ -17,5 +17,5 @@ void *operator new[](__SIZE_TYPE__ t)
int main()
{
A* ap = new A[5];
- return ap == p;
+ return ap != p;
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted19a.C b/gcc/testsuite/g++.dg/cpp0x/defaulted19a.C
new file mode 100644
index 0000000000..a082d51ab0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted19a.C
@@ -0,0 +1,23 @@
+// We allocate a cookie to help us run the destructor if it's non-trivial,
+// even if it's deleted.
+// { dg-do run { target c++11 } }
+
+struct B { ~B() {} };
+struct A
+{
+ B b;
+ ~A() = delete;
+};
+
+void *p = 0;
+void *operator new[](__SIZE_TYPE__ t)
+{
+ p = ::operator new (t);
+ return p;
+}
+
+int main()
+{
+ A* ap = new A[5];
+ return ap == p;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
index e3aac8f1a9..63be99754c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted2.C
@@ -1,18 +1,18 @@
// Negative test for defaulted/deleted fns.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
-void f(); // { dg-error "previous" }
+void f(); // { dg-message "previous" }
void f() = delete; // { dg-error "deleted" }
struct A
{
- A() { } // { dg-error "previous" }
+ A() { } // { dg-message "previous" }
void f() = default; // { dg-error "default" }
};
A::A() = default; // { dg-error "redefinition" }
-void g() {} // { dg-error "previous" }
+void g() {} // { dg-message "previous" }
void g() = delete; // { dg-error "redefinition" }
struct B // { dg-message "user-provided default constructor" }
@@ -35,14 +35,14 @@ struct D: public C
struct E
{
- const B b;
+ const B b; // { dg-message "should be initialized" }
E() { } // { dg-error "uninitialized" }
};
struct F
{
F() = default;
- F(const F&) = delete; // { dg-error "declared" }
+ F(const F&) = delete; // { dg-message "declared" }
};
struct G
@@ -62,7 +62,7 @@ int main()
{
F f;
F f2(f); // { dg-error "use" }
- B* b = new const B; // { dg-error "uninitialized const" }
+ const B* b = new const B; // { dg-error "uninitialized const" }
U u; // { dg-error "deleted" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C
index 9b8c697aba..affda20fdd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted20.C
@@ -1,5 +1,5 @@
// PR c++/46497
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
A(A&&) = default;
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted21.C b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C
index 51505dc460..63c98e6765 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted21.C
@@ -1,5 +1,5 @@
// PR c++/46736
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct U {
U();
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted22.C b/gcc/testsuite/g++.dg/cpp0x/defaulted22.C
index 61e9d32052..5afcd1deae 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted22.C
@@ -1,6 +1,5 @@
// Test that a virtual defaulted constructor is still virtual.
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
int r = 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted23.C b/gcc/testsuite/g++.dg/cpp0x/defaulted23.C
index 5b4438ddd0..9e6cbc37d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted23.C
@@ -1,27 +1,37 @@
// Test for checking of exception specifications on defaulted fns
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
A() noexcept = default;
};
+A a;
+
struct B
{
- B() throw (int) = default; // { dg-error "exception-specification that differs from the implicit declaration" }
+ B() throw (int) = default; // { dg-message "exception-specification" }
};
+B b; // { dg-error "deleted" }
+
struct C
{
C() throw (int) { }
};
+C c;
+
struct D: C
{
D() throw (int) = default;
};
+D d;
+
struct E
{
E() = default;
};
+
+E e;
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted24.C b/gcc/testsuite/g++.dg/cpp0x/defaulted24.C
index 307bf94ab8..32c6f2e546 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted24.C
@@ -1,5 +1,5 @@
// PR c++/48280
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S {
template < typename > S (const S &) = default; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted25.C b/gcc/testsuite/g++.dg/cpp0x/defaulted25.C
index 2a38fedb24..644fe1bb9d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted25.C
@@ -1,5 +1,5 @@
// PR c++/48930
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted26.C b/gcc/testsuite/g++.dg/cpp0x/defaulted26.C
index 69bd0accbd..f14a0e8855 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted26.C
@@ -1,7 +1,7 @@
// PR c++/49066
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
-void foo() = delete; // { dg-error "declared here" }
+void foo() = delete; // { dg-message "declared here" }
void foo();
int main() { foo(); } // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted27.C b/gcc/testsuite/g++.dg/cpp0x/defaulted27.C
index 7d9139d237..d26e744da7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted27.C
@@ -1,5 +1,5 @@
// PR c++/47544
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1sIiEC2Ev" } }
// { dg-final { scan-assembler-not "_ZN1sIiED2Ev" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted28.C b/gcc/testsuite/g++.dg/cpp0x/defaulted28.C
index bcbf763f6d..aa900998d2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted28.C
@@ -1,6 +1,6 @@
// PR c++/49102
// PR c++/50034
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
A() = default;
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted29.C b/gcc/testsuite/g++.dg/cpp0x/defaulted29.C
index 5fcf5b0c54..8e2989bac0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted29.C
@@ -1,5 +1,5 @@
// PR c++/46696
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted3.C b/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
index 5e2116b53b..75e89c8ff0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted3.C
@@ -1,10 +1,10 @@
// PR c++/37006
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
struct A {
template<class U>
- bool operator==(const A<U>&) = delete; // { dg-error "declared" }
+ bool operator==(const A<U>&) = delete; // { dg-message "declared" }
operator bool () { return true; }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted30.C b/gcc/testsuite/g++.dg/cpp0x/defaulted30.C
index 0bf4425b87..ce86f57577 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted30.C
@@ -1,5 +1,5 @@
// PR c++/49507
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T>
struct ConcretePoolKey
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted31.C b/gcc/testsuite/g++.dg/cpp0x/defaulted31.C
index de6a29854a..2ac28baf90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted31.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted31.C
@@ -1,9 +1,9 @@
// PR c++/39164
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
- A() { } // { dg-error "defined" }
+ A() { } // { dg-message "defined" }
~A() = default; // { dg-error "defaulted" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted32.C b/gcc/testsuite/g++.dg/cpp0x/defaulted32.C
index 351cdae110..e5b94b6351 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted32.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted32.C
@@ -1,5 +1,5 @@
// PR c++/50531
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename T>
class DataFilter
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted34.C b/gcc/testsuite/g++.dg/cpp0x/defaulted34.C
index 0821992673..ff777f6cf8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted34.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted34.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "__cxa_deleted_virtual" } }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted35.C b/gcc/testsuite/g++.dg/cpp0x/defaulted35.C
new file mode 100644
index 0000000000..adf9c82ef0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted35.C
@@ -0,0 +1,8 @@
+// PR c++/53096
+// { dg-do compile { target c++11 } }
+
+struct foo
+{
+ foo(foo&) = default;
+ foo& operator=(foo&) = default;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted37.C b/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
new file mode 100644
index 0000000000..1926f2eb4c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted37.C
@@ -0,0 +1,19 @@
+// DR 1402
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A& operator=(A&&);
+};
+
+struct B: virtual A { B& operator=(B&&) = default; }; // { dg-warning "virtual base" }
+struct C: virtual A { }; // { dg-warning "virtual base" }
+
+int main()
+{
+ B b1, b2;
+ b2 = static_cast<B&&>(b1);
+
+ C c1, c2;
+ c2 = static_cast<C&&>(c1);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted38.C b/gcc/testsuite/g++.dg/cpp0x/defaulted38.C
new file mode 100644
index 0000000000..39424f641c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted38.C
@@ -0,0 +1,14 @@
+// PR c++/50893
+// { dg-do compile { target c++11 } }
+
+class Base
+{
+ public:
+ virtual ~Base() = default;
+};
+
+class Derived : public Base
+{
+ public:
+ virtual ~Derived() = default;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted39.C b/gcc/testsuite/g++.dg/cpp0x/defaulted39.C
new file mode 100644
index 0000000000..a4963c4d13
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted39.C
@@ -0,0 +1,23 @@
+// DR 1402
+// { dg-do compile { target c++11 } }
+
+template <class T> T&& move(T& t);
+
+struct A
+{
+ A(const A&);
+};
+
+struct B
+{
+ B(B&&);
+};
+
+struct C
+{
+ A a;
+ B b;
+};
+
+extern C c1;
+C c2(move(c1));
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted4.C b/gcc/testsuite/g++.dg/cpp0x/defaulted4.C
index 56053840bd..ca07d76d7b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted4.C
@@ -1,7 +1,6 @@
// PR c++/37208: SFINAE and deleted functions.
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template<int> struct A { };
template<typename T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted40.C b/gcc/testsuite/g++.dg/cpp0x/defaulted40.C
new file mode 100644
index 0000000000..8da1364d82
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted40.C
@@ -0,0 +1,23 @@
+// DR 1402
+// { dg-do compile { target c++11 } }
+
+template <class T> T&& move(T& t);
+
+struct A
+{
+ A(const A&);
+};
+
+struct B
+{
+ B(B&&) = delete; // { dg-prune-output "declared" }
+};
+
+struct C // { dg-error "deleted" }
+{
+ A a;
+ B b;
+};
+
+extern C c1;
+C c2(move(c1)); // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted41.C b/gcc/testsuite/g++.dg/cpp0x/defaulted41.C
new file mode 100644
index 0000000000..4272012d5d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted41.C
@@ -0,0 +1,14 @@
+// PR c++/56343
+// { dg-do compile { target c++11 } }
+
+class B
+{
+public:
+ virtual ~B() noexcept(false) { }
+};
+
+class D : public B
+{
+public:
+ virtual ~D() = default;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted42.C b/gcc/testsuite/g++.dg/cpp0x/defaulted42.C
new file mode 100644
index 0000000000..1ac25a90b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted42.C
@@ -0,0 +1,10 @@
+// DR 941
+// { dg-require-effective-target c++11 }
+
+template <class T> T f(T) = delete;
+template<> int f(int) { return 42; }
+
+int main()
+{
+ f(42);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted43.C b/gcc/testsuite/g++.dg/cpp0x/defaulted43.C
new file mode 100644
index 0000000000..f2846fe390
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted43.C
@@ -0,0 +1,60 @@
+// PR c++/53903
+// { dg-do compile { target c++11 } }
+
+struct T
+{
+ T() noexcept(false) { }
+ ~T() noexcept(false) { }
+};
+
+T t;
+
+struct A
+{
+ A() noexcept;
+ ~A() noexcept;
+
+ T t;
+};
+
+A::A() noexcept = default; // { dg-error "defaulted" }
+A::~A() noexcept = default; // { dg-error "defaulted" }
+
+struct U
+{
+ U() noexcept(false) { }
+ ~U() noexcept(false) { }
+};
+
+U u;
+
+struct B
+{
+ B() noexcept(false);
+ ~B() noexcept(false);
+
+ U u;
+};
+
+B::B() noexcept(false) = default;
+B::~B() noexcept(false) = default;
+
+B b;
+
+struct V
+{
+ V() noexcept(false) { }
+ ~V() noexcept(false) { }
+};
+
+V v;
+
+struct C
+{
+ C() noexcept = default; // { dg-message "exception-specification" }
+ ~C() noexcept = default; // { dg-message "exception-specification" }
+
+ V v;
+};
+
+C c; // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted44.C b/gcc/testsuite/g++.dg/cpp0x/defaulted44.C
new file mode 100644
index 0000000000..213c1393e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted44.C
@@ -0,0 +1,24 @@
+// PR c++/57319
+// { dg-require-effective-target c++11 }
+
+namespace N1 {
+ struct A { };
+ struct B: virtual A { };
+ struct C: virtual B { };
+
+ struct D: C
+ {
+ void operator= (D &);
+ };
+}
+
+namespace N2 {
+ struct A { A& operator=(A&&); };
+ struct B: virtual A { }; // { dg-warning "move assignment" }
+ struct C: virtual B { }; // { dg-warning "move assignment" }
+
+ struct D: C
+ {
+ void operator= (D &);
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted45.C b/gcc/testsuite/g++.dg/cpp0x/defaulted45.C
new file mode 100644
index 0000000000..e91b3a1827
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted45.C
@@ -0,0 +1,20 @@
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int i;
+ A() = default;
+ A(int i): i{i} { }
+ ~A() {}
+};
+
+int main(int argc, char **argv)
+{
+ { int i[4] = { 42, 42, 42, 42 }; }
+ {
+ A a[4] = { argc };
+ if (a[1].i != 0)
+ __builtin_abort ();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted46.C b/gcc/testsuite/g++.dg/cpp0x/defaulted46.C
new file mode 100644
index 0000000000..d4562c9590
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted46.C
@@ -0,0 +1,17 @@
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+protected:
+ A() = default;
+ int i;
+};
+
+struct B: A {
+ B() = default;
+};
+
+int main()
+{
+ B();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted47.C b/gcc/testsuite/g++.dg/cpp0x/defaulted47.C
new file mode 100644
index 0000000000..f4b62a3c65
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted47.C
@@ -0,0 +1,16 @@
+// PR c++/54812
+// { dg-do compile { target c++11 } }
+
+class A
+{
+ A() = default; // { dg-error "private" }
+};
+
+A a; // { dg-error "context" }
+
+class B
+{
+ ~B() = default; // { dg-error "private" }
+};
+
+B b; // { dg-error "context" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted48.C b/gcc/testsuite/g++.dg/cpp0x/defaulted48.C
new file mode 100644
index 0000000000..727afc5ca5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted48.C
@@ -0,0 +1,17 @@
+// PR c++/60108
+// { dg-require-effective-target c++11 }
+
+template<int> struct A
+{
+ virtual ~A();
+};
+
+template<typename> struct B : A<0>, A<1>
+{
+ ~B() = default;
+};
+
+struct C : B<bool>
+{
+ C() {}
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted49.C b/gcc/testsuite/g++.dg/cpp0x/defaulted49.C
new file mode 100644
index 0000000000..357be419db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted49.C
@@ -0,0 +1,15 @@
+// PR c++/60980
+// { dg-do compile { target c++11 } }
+
+struct x0
+{
+ x0 () = default;
+};
+struct x1
+{
+ x0 x2[2];
+ void x3 ()
+ {
+ x1 ();
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted5.C b/gcc/testsuite/g++.dg/cpp0x/defaulted5.C
index b7bd16b406..96394ea5b1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted5.C
@@ -1,6 +1,5 @@
// PR c++/37234
-// { dg-do link }
-// { dg-options "-std=c++0x" }
+// { dg-do link { target c++11 } }
template <typename T>
class foo {
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted6.C b/gcc/testsuite/g++.dg/cpp0x/defaulted6.C
index c33d572922..440c58db46 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted6.C
@@ -1,5 +1,5 @@
// PR c++/37906
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct b
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted7.C b/gcc/testsuite/g++.dg/cpp0x/defaulted7.C
index 97c29258e9..089d618483 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted7.C
@@ -1,5 +1,5 @@
// PR c++/38701, 38702
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void foo() = default; // { dg-error "cannot be defaulted" }
namespace
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted8.C b/gcc/testsuite/g++.dg/cpp0x/defaulted8.C
index f446f81569..383766de2b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted8.C
@@ -1,5 +1,5 @@
// PR c++/38649
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/defaulted9.C b/gcc/testsuite/g++.dg/cpp0x/defaulted9.C
index 1e5e2cbf9f..8d3aef8904 100644
--- a/gcc/testsuite/g++.dg/cpp0x/defaulted9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/defaulted9.C
@@ -1,5 +1,6 @@
// PR c++/39153
-// { dg-options "-std=c++0x -fno-inline" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-inline" }
struct _Impl_base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/deleted1.C b/gcc/testsuite/g++.dg/cpp0x/deleted1.C
new file mode 100644
index 0000000000..0a632bfb30
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/deleted1.C
@@ -0,0 +1,6 @@
+// PR c++/58581
+// { dg-do compile { target c++11 } }
+
+template<typename T> int foo(T) noexcept(T()) = delete;
+
+int i = foo(0); // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/deleted2.C b/gcc/testsuite/g++.dg/cpp0x/deleted2.C
new file mode 100644
index 0000000000..8590c49f3c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/deleted2.C
@@ -0,0 +1,9 @@
+// PR c++/52707
+// { dg-do compile { target c++11 } }
+
+struct A {
+ int m;
+ A() = delete;
+};
+
+A a = {1};
diff --git a/gcc/testsuite/g++.dg/cpp0x/deleted3.C b/gcc/testsuite/g++.dg/cpp0x/deleted3.C
new file mode 100644
index 0000000000..67836773af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/deleted3.C
@@ -0,0 +1,11 @@
+// PR c++/60216
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ template<typename T> A(T) = delete;
+};
+
+template<> A::A<int>(int) {}
+
+A a(0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/dependent1.C b/gcc/testsuite/g++.dg/cpp0x/dependent1.C
index 1ceeeafd78..629b125f52 100644
--- a/gcc/testsuite/g++.dg/cpp0x/dependent1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/dependent1.C
@@ -1,5 +1,5 @@
// PR c++/48319
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// We were failing to recognize declval<_Args1> as dependent.
template<typename Tp> Tp declval() noexcept;
diff --git a/gcc/testsuite/g++.dg/cpp0x/diag1.C b/gcc/testsuite/g++.dg/cpp0x/diag1.C
index b3f30bcd0b..9bf7cfe5c8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/diag1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/diag1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <int U>
struct TypeA
diff --git a/gcc/testsuite/g++.dg/cpp0x/dyncast1.C b/gcc/testsuite/g++.dg/cpp0x/dyncast1.C
new file mode 100644
index 0000000000..1224f361ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/dyncast1.C
@@ -0,0 +1,31 @@
+// PR c++/57599
+// { dg-do compile { target c++11 } }
+
+struct A { };
+struct B : public A { };
+
+template<class, class>
+struct is_same { static constexpr bool value = false; };
+
+template<class T>
+struct is_same<T, T> { static constexpr bool value = true; };
+
+template<class T>
+T val();
+
+static_assert(is_same<decltype(dynamic_cast<A*>(val<B*>())),
+ A*>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<A&>(val<B&>())),
+ A&>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<const A*>(val<B*>())),
+ const A*>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<const A&>(val<B&>())),
+ const A&>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<volatile A*>(val<B*>())),
+ volatile A*>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<volatile A&>(val<B&>())),
+ volatile A&>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<const volatile A*>(val<B*>())),
+ const volatile A*>::value, "Ouch");
+static_assert(is_same<decltype(dynamic_cast<const volatile A&>(val<B&>())),
+ const volatile A&>::value, "Ouch");
diff --git a/gcc/testsuite/g++.dg/cpp0x/elision.C b/gcc/testsuite/g++.dg/cpp0x/elision.C
index 35d5e4b02f..4cc5653e24 100644
--- a/gcc/testsuite/g++.dg/cpp0x/elision.C
+++ b/gcc/testsuite/g++.dg/cpp0x/elision.C
@@ -2,8 +2,7 @@
// Test: Implicit cast to rvalue when eliding copy
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/elision2.C b/gcc/testsuite/g++.dg/cpp0x/elision2.C
index 216b1b59d1..b3d13fb187 100644
--- a/gcc/testsuite/g++.dg/cpp0x/elision2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/elision2.C
@@ -1,5 +1,5 @@
// Core 1148: should be able to move from value parameter on return
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/elision_neg.C b/gcc/testsuite/g++.dg/cpp0x/elision_neg.C
index 78feac72a5..0870a80930 100644
--- a/gcc/testsuite/g++.dg/cpp0x/elision_neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/elision_neg.C
@@ -2,8 +2,7 @@
// Test: Implicit cast to rvalue when eliding copy
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum1.C b/gcc/testsuite/g++.dg/cpp0x/enum1.C
index fb03692fab..bf17429524 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum1.C
@@ -1,6 +1,5 @@
// PR c++/38021
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
enum : { }; // { dg-error "expected" }
enum : 3 { }; // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum10.C b/gcc/testsuite/g++.dg/cpp0x/enum10.C
index 55a1ab46be..daffd19224 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum10.C
@@ -1,5 +1,5 @@
// PR c++/48534
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class OpSE : bool;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum11.C b/gcc/testsuite/g++.dg/cpp0x/enum11.C
index 156c765bea..a449f1c39a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum11.C
@@ -1,5 +1,6 @@
// PR c++/48969
-// { dg-options "-std=c++0x -ftemplate-depth=10" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-ftemplate-depth=10" }
template<unsigned int N> struct Pair { };
struct Foo { enum { Mask = 1 }; } foo;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum12.C b/gcc/testsuite/g++.dg/cpp0x/enum12.C
index b2ec91990e..ea55cfe971 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum12.C
@@ -1,5 +1,6 @@
// PR c++/48780
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum13.C b/gcc/testsuite/g++.dg/cpp0x/enum13.C
index ec02d3bf60..5e4a532ce7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum13.C
@@ -1,5 +1,6 @@
// PR c++/48780
-// { dg-options "-std=c++0x -fabi-version=5 -Wabi" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=5 -Wabi" }
typedef __builtin_va_list __gnuc_va_list;
typedef __gnuc_va_list va_list;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum14.C b/gcc/testsuite/g++.dg/cpp0x/enum14.C
index 709b201d1f..2be758db35 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum14.C
@@ -1,5 +1,5 @@
// PR c++/48106
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class E : char
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum15.C b/gcc/testsuite/g++.dg/cpp0x/enum15.C
index d653216498..07beee53a3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum15.C
@@ -1,5 +1,5 @@
// PR c++/44311
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class A { Val0, Val1 };
@@ -15,6 +15,6 @@ void foo (A a, int i)
{
case A::Val0: break; // { dg-error "" }
case 1: break;
- case 2.0: break;
+ case 2.0: break; // { dg-error "" }
}
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum16.C b/gcc/testsuite/g++.dg/cpp0x/enum16.C
index ebb48688b1..207fcab2b0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum16.C
@@ -1,5 +1,5 @@
// PR c++/48935
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class ENUM { a };
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum17.C b/gcc/testsuite/g++.dg/cpp0x/enum17.C
index 8ba827e50f..32c46096ff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum17.C
@@ -1,5 +1,5 @@
// PR c++/48536
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
#include <climits>
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum18.C b/gcc/testsuite/g++.dg/cpp0x/enum18.C
index 306ed8259f..de16596dfe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum18.C
@@ -1,5 +1,5 @@
// PR c++/47277
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int main(void) {
enum e {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum19.C b/gcc/testsuite/g++.dg/cpp0x/enum19.C
index acdd86c0ba..b04fd523f0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum19.C
@@ -1,5 +1,6 @@
// We shouldn't give an ABI warning about promotion in switch.
-// { dg-options "-std=c++0x -fabi-version=5 -Wabi" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=5 -Wabi" }
enum class Foo { X };
void test(Foo val)
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum2.C b/gcc/testsuite/g++.dg/cpp0x/enum2.C
index 21c265a923..c101134f8f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum2.C
@@ -1,5 +1,4 @@
// PR c++/38637
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> enum E : int { e }; // { dg-error "declaration|expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum20.C b/gcc/testsuite/g++.dg/cpp0x/enum20.C
index e5dc186e4a..8937cc7a3d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum20.C
@@ -1,5 +1,5 @@
// PR c++/47635
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum A { };
void A::f() { } // { dg-error "not a class" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum21b.C b/gcc/testsuite/g++.dg/cpp0x/enum21b.C
index 48989128d8..ac449f050d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum21b.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum21b.C
@@ -1,4 +1,4 @@
-// { dg-do compile }
-// { dg-options "-pedantic -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
enum x { y, };
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum22.C b/gcc/testsuite/g++.dg/cpp0x/enum22.C
new file mode 100644
index 0000000000..e87a31ce6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum22.C
@@ -0,0 +1,12 @@
+// PR c++/56155
+// { dg-do compile { target c++11 } }
+
+enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
+static_assert( E_ == 1, "E_ should be 1");
+
+template <class T>
+struct A {
+ enum e_ : unsigned char { Z_, E_=sizeof(Z_) };
+};
+
+static_assert ( A<double>::E_ == 1, "E_ should be 1");
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum23.C b/gcc/testsuite/g++.dg/cpp0x/enum23.C
new file mode 100644
index 0000000000..b2378e1b36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum23.C
@@ -0,0 +1,9 @@
+// PR c++/51242
+// { dg-do compile { target c++11 } }
+
+enum class MyEnum { A = 1 };
+
+struct MyClass
+{
+ MyEnum Field1 : 3; // { dg-bogus "warning: 'MyClass::Field1' is too small" "" { xfail *-*-* } }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum24.C b/gcc/testsuite/g++.dg/cpp0x/enum24.C
new file mode 100644
index 0000000000..60996563f4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum24.C
@@ -0,0 +1,57 @@
+// PR c++/56749
+// { dg-require-effective-target c++11 }
+
+enum normal_enum
+{
+ not_scoped1,
+ not_scoped2
+};
+
+enum class scoped_enum
+{
+ scoped1,
+ scoped2
+};
+
+template <normal_enum N=not_scoped1>
+class A
+{
+public:
+ template <typename T>
+ void fun ()
+ {
+ }
+};
+
+template <scoped_enum N=scoped_enum::scoped1>
+class B
+{
+public:
+ template <typename T>
+ void fun ()
+ {
+ }
+};
+
+
+template <typename T>
+void tfun ()
+{
+ A<> a;
+ a.fun<char>(); //<------------ THIS IS FINE
+
+ B<> b_defaulted;
+ B<scoped_enum::scoped1> b_explicited;
+
+ b_defaulted.fun<char>(); //<------------ UNEXPECTED: THIS FAILS
+ b_defaulted.template fun<char>(); //<------------ THIS IS FINE
+
+ b_explicited.fun<char>(); //<------------ UNEXPECTED: THIS FAILS
+ b_explicited.template fun<char>();//<------------ THIS IS FINE
+}
+
+int main(int argc, char const *argv[])
+{
+ tfun<int>();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum25.C b/gcc/testsuite/g++.dg/cpp0x/enum25.C
new file mode 100644
index 0000000000..cb2cf8f536
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum25.C
@@ -0,0 +1,18 @@
+// PR c++/56793
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ enum struct B {X, Y} b;
+} a;
+
+enum struct D {X,Y};
+struct C { } c;
+
+int main ()
+{
+ if (a.b == a.B::Y)
+ a.b = A::B::X;
+
+ c.D::Y; // { dg-error "not a member" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum26.C b/gcc/testsuite/g++.dg/cpp0x/enum26.C
new file mode 100644
index 0000000000..cfc5df3a3f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum26.C
@@ -0,0 +1,9 @@
+// PR c++/54216
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
+
+enum {}; // { dg-warning "empty anonymous" }
+
+enum class {}; // { dg-error "anonymous" }
+
+enum class { x }; // { dg-error "anonymous" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum27.C b/gcc/testsuite/g++.dg/cpp0x/enum27.C
new file mode 100644
index 0000000000..80ac98fc3d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum27.C
@@ -0,0 +1,4 @@
+// PR c++/53745
+// { dg-do compile { target c++11 } }
+
+enum E : unsigned { e = -1 }; // { dg-error "outside the range" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum28.C b/gcc/testsuite/g++.dg/cpp0x/enum28.C
new file mode 100644
index 0000000000..3967699dd0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum28.C
@@ -0,0 +1,17 @@
+// PR c++/51912
+// { dg-do compile { target c++11 } }
+
+constexpr double g() { return 2.0; }
+
+void f(int i)
+{
+ switch (i)
+ {
+ case 1.0:; // { dg-error "could not convert" }
+ }
+
+ switch (i)
+ {
+ case g():; // { dg-error "could not convert" }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum3.C b/gcc/testsuite/g++.dg/cpp0x/enum3.C
index 5ae5e1a9d6..940bc047a1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum3.C
@@ -1,6 +1,5 @@
// PR c++/38064
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
enum class E { elem };
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum4.C b/gcc/testsuite/g++.dg/cpp0x/enum4.C
index 002edf0923..9e908c0805 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum4.C
@@ -1,5 +1,5 @@
// PR c++/40633
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template< typename T >
struct wrap {
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum5.C b/gcc/testsuite/g++.dg/cpp0x/enum5.C
index c4ceebed71..f896440fe1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum5.C
@@ -1,5 +1,5 @@
// PR c++/40639
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template< typename T >
struct wrap {
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum6.C b/gcc/testsuite/g++.dg/cpp0x/enum6.C
index e063984712..c3832ae433 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum6.C
@@ -1,5 +1,5 @@
// PR c++/37946
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum class E : char
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum7.C b/gcc/testsuite/g++.dg/cpp0x/enum7.C
index 407672a479..6788f8accc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum7.C
@@ -1,5 +1,5 @@
// PR c++/37816
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum8.C b/gcc/testsuite/g++.dg/cpp0x/enum8.C
index 0075e2daa8..15bee8334f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum8.C
@@ -1,6 +1,5 @@
// PR c++/47704
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void
foo ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum9.C b/gcc/testsuite/g++.dg/cpp0x/enum9.C
index 10e510bcd2..f359b425fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum9.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class E { };
E f();
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum_base.C b/gcc/testsuite/g++.dg/cpp0x/enum_base.C
index 5607961f24..8e23179e18 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum_base.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum_base.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
typedef unsigned volatile long long uvlonglong;
@@ -6,11 +6,11 @@ enum E1 : char { };
enum E2 : signed const short { };
enum E3 : uvlonglong { };
enum E4 : char {
- val = 500 // { dg-error "too large" }
+ val = 500 // { dg-error "outside the range" }
};
enum class E5 {
- val = (unsigned long long)-1 // { dg-error "too large" }
+ val = (unsigned long long)-1 // { dg-error "outside the range" }
};
typedef float Float;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum_base2.C b/gcc/testsuite/g++.dg/cpp0x/enum_base2.C
new file mode 100644
index 0000000000..8c6a9011d3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/enum_base2.C
@@ -0,0 +1,9 @@
+// PR c++/60187
+// { dg-require-effective-target c++11 }
+
+template<typename... T> struct A
+{
+ enum E : T {}; // { dg-error "parameter pack" }
+};
+
+A<int> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C b/gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C
index 4b14cf65e0..82878a6bb5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C
+++ b/gcc/testsuite/g++.dg/cpp0x/enum_base_warn.C
@@ -1,5 +1,5 @@
-// { dg-do run }
-// { dg-options "-O2 -Wtype-limits -std=c++0x" }
+// { dg-do run { target c++11 } }
+// { dg-options "-O2 -Wtype-limits" }
extern void link_error (void);
enum Alpha : unsigned char {
diff --git a/gcc/testsuite/g++.dg/cpp0x/error1.C b/gcc/testsuite/g++.dg/cpp0x/error1.C
index 751b3b75e0..33557f2f80 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error1.C
@@ -1,8 +1,7 @@
// PR c++/34395
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
-template<int... N> void foo (int... x[N]) // { dg-error "int \\\[N\\\]\\.\\.\\. x" }
+template<int... N> void foo (int... x[N]) // { dg-message "int \\\[N\\\]\\.\\.\\. x" }
{
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/error2.C b/gcc/testsuite/g++.dg/cpp0x/error2.C
index ca681eb2f7..e6af294c18 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error2.C
@@ -1,5 +1,5 @@
// PR c++/38656
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> int foo();
diff --git a/gcc/testsuite/g++.dg/cpp0x/error3.C b/gcc/testsuite/g++.dg/cpp0x/error3.C
index e7da961950..75390f0bf2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error3.C
@@ -1,5 +1,5 @@
// PR c++/47336
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename T>
void g(T t)
diff --git a/gcc/testsuite/g++.dg/cpp0x/error4.C b/gcc/testsuite/g++.dg/cpp0x/error4.C
index 064c2f2f62..bd73b2a766 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error4.C
@@ -1,5 +1,5 @@
// PR c++/49156
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T> T declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/error5.C b/gcc/testsuite/g++.dg/cpp0x/error5.C
index 1931926422..e46c46d927 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error5.C
@@ -1,5 +1,5 @@
// PR c++/49181
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/error6.C b/gcc/testsuite/g++.dg/cpp0x/error6.C
index 35156520b8..515f8f5dcf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error6.C
@@ -1,8 +1,8 @@
// PR c++/48284
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename C>
-auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
+auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-message "decltype .c\\.f" }
template<typename C>
auto g(C& c) -> decltype (c.f()) { return c.f(); } // { dg-error "decltype .c\\.f" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/error7.C b/gcc/testsuite/g++.dg/cpp0x/error7.C
index 0dfbf9f040..3c9b8ba342 100644
--- a/gcc/testsuite/g++.dg/cpp0x/error7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/error7.C
@@ -1,5 +1,5 @@
// Test for printing the type of T{} in error messages.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T, T t> struct A { };
template <class T> A<T,T{}> f(T t); // { dg-message "T{}" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/error8.C b/gcc/testsuite/g++.dg/cpp0x/error8.C
new file mode 100644
index 0000000000..a99207792a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/error8.C
@@ -0,0 +1,7 @@
+// PR c++/39681
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int* p = new foo; // { dg-error "16:foo. does not name a type" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit1.C b/gcc/testsuite/g++.dg/cpp0x/explicit1.C
index fe164fc8cb..ea4fa8a857 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit1.C
@@ -1,5 +1,5 @@
// Test for explicit conversion ops from N2437.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class U; class V;
class T
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit2.C b/gcc/testsuite/g++.dg/cpp0x/explicit2.C
index c2327c140d..715855cfe9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit2.C
@@ -1,5 +1,5 @@
// Test for explicit conversion ops in various conversion situations.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
typedef void (*pfn)();
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit3.C b/gcc/testsuite/g++.dg/cpp0x/explicit3.C
index be0a14e7ad..678076c8e4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit3.C
@@ -1,5 +1,5 @@
// Test for "contextually converted to bool"
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
@@ -42,10 +42,9 @@ int main()
// These do not.
switch (a); // { dg-error "" }
bool b = a; // { dg-error "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 44 }
f(a); // { dg-error "" }
B b2 = { a }; // { dg-error "" }
- a + true; // { dg-message "" }
- b ? a : true; // { dg-message "" }
- a ? a : true; // { dg-message "" }
+ a + true; // { dg-error "5:no match" }
+ b ? a : true; // { dg-error "5:no match" }
+ a ? a : true; // { dg-error "5:no match" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit4.C b/gcc/testsuite/g++.dg/cpp0x/explicit4.C
index 0f3bc623a5..663878e55a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit4.C
@@ -1,5 +1,5 @@
// Negative explicit conv test.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {
A(const A&, int = 0); // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit5.C b/gcc/testsuite/g++.dg/cpp0x/explicit5.C
index 88a47071db..1adb8d67ec 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit5.C
@@ -1,6 +1,5 @@
// test for extension of DR 899 to handle template ctors
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
int r = 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit6.C b/gcc/testsuite/g++.dg/cpp0x/explicit6.C
index 0d620be080..18f31b42d5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit6.C
@@ -1,5 +1,6 @@
// PR c++/47080
-// { dg-options -std=c++0x }
+// { dg-options "" }
+// { dg-do compile { target c++11 } }
struct A {
explicit operator int(); // { dg-message "qualification conversion" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/explicit7.C b/gcc/testsuite/g++.dg/cpp0x/explicit7.C
index 7a0b73e9ba..574796d117 100644
--- a/gcc/testsuite/g++.dg/cpp0x/explicit7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/explicit7.C
@@ -3,7 +3,8 @@
// can be converted to type T with a qualification conversion (4.4) are
// also candidate functions.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
struct A { };
struct B: A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C b/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C
index ec2cb784e1..2779a2b5cd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/extern_template-1.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
template <typename> void f() {}
extern template void f<int>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/extern_template-2.C b/gcc/testsuite/g++.dg/cpp0x/extern_template-2.C
index 89a9ceb5a7..3eb870bb61 100644
--- a/gcc/testsuite/g++.dg/cpp0x/extern_template-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/extern_template-2.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
template <typename> class S {};
extern template class S<int>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg1.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg1.C
index 25192ad867..3081d67c54 100644
--- a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg1.C
@@ -1,5 +1,5 @@
// PR c++/37766
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int a = 1;
template<int& b = a> void f() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
index d94843c1fe..663f400484 100644
--- a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg2.C
@@ -1,5 +1,6 @@
// PR c++/46831
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
struct B { };
struct D : B { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C
new file mode 100644
index 0000000000..8e9b76fe0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg3.C
@@ -0,0 +1,26 @@
+// { dg-do compile { target c++11 } }
+
+template <class T, class = typename T::I> void f(T) {}
+template <class T, class = typename T::I> void g(T) {}
+template <class T, class = typename T::I> void h(T) {}
+template <class T, class = typename T::I> void i(T) {}
+template <class T, class = typename T::I> void j(T) {} // { dg-error "this context" }
+
+class A
+{
+ typedef int I; // { dg-error "private" }
+ template <class T, class> friend void f(T);
+ friend void g<A,I>(A);
+ friend void h<A>(A);
+ friend void i<>(A);
+};
+
+int main()
+{
+ A a;
+ f(a);
+ g(a);
+ h(a);
+ i(a);
+ j(a); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg4.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg4.C
index 0248b60599..52e6f38a0a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg4.C
@@ -1,5 +1,5 @@
// PR c++/55724
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template<int N> struct S {};
template<typename T = int, T N> void f(S<N>) {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
new file mode 100644
index 0000000000..0821fc0949
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/fntmpdefarg5.C
@@ -0,0 +1,17 @@
+// Only print template subst context when it isn't redundant.
+// { dg-require-effective-target c++11 }
+// { dg-prune-output "error" }
+
+template<class T> struct A { typedef typename T::type type; };
+
+template <class T, class U = typename A<T>::type>
+void f(T);
+
+template <class T, class U = typename T::type>
+void g(T);
+
+int main()
+{
+ f(1); // { dg-message "required from here" }
+ g(1); // { dg-bogus "required from here" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum1.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum1.C
index 2817ae5957..7ec5884abe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// opaque enum declarations
enum class E1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum10.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum10.C
index a57c0a9f41..609c272895 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum10.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
//This error is diagnosed at instantiation time
template<typename T> struct S1
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum11.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum11.C
index dd5fd9be78..8cabc038fc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum11.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
enum { A = 1 };
struct T
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum2.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum2.C
index b6ad871486..b8f062e11d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S1
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum3.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum3.C
index 4a7e9f98d4..c8cd6f61f8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum3.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
namespace S1
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum4.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum4.C
index 0fcc3bde0f..aee916e9d7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum4.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T> struct S1
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum5.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum5.C
index a2edfa7635..d1d6230ee9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum5.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
namespace one
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum6.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum6.C
index 51ef6e43ec..ccce13a79b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum6.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum class E1 : int; // { dg-error "previous definition" }
enum E1 : int; // { dg-error "scoped/unscoped mismatch" }
@@ -22,8 +21,8 @@ enum E6 : int; //ok
enum class E7;
enum class E7 : int; //ok
-enum class E3 e3; // { dg-warning "scoped enum must not use" }
-enum struct E3 e4; // { dg-warning "scoped enum must not use" }
+enum class E3 e3; // { dg-error "scoped enum must not use" }
+enum struct E3 e4; // { dg-error "scoped enum must not use" }
enum E5 : int e5; // { dg-error "expected|invalid type" }
enum E6 : int { a, b, c }; // { dg-error "previous definition" }
@@ -47,7 +46,7 @@ namespace N2
{
enum class N1::E6 { e1, e2, e3 }; // { dg-error "does not enclose" }
enum N1::E7 : int { e1, e2, e3 }; // { dg-error "does not enclose" }
-};
+}
enum class N1::E6 { e1, e2, e3 };
enum N1::E7 : int { e1, e2, e3 };
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum7.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum7.C
index 62e445c707..3c67f54705 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum7.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template<typename T> struct S1
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum8.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum8.C
index 69e73119e0..5174226a6f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum8.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
//This instatiation is ok
template<typename T> struct S1
diff --git a/gcc/testsuite/g++.dg/cpp0x/forw_enum9.C b/gcc/testsuite/g++.dg/cpp0x/forw_enum9.C
index da8cde27b4..4f1475acfd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/forw_enum9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/forw_enum9.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template<typename T> struct S1
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/friend1.C b/gcc/testsuite/g++.dg/cpp0x/friend1.C
index 2cf4c3c715..ae2c603aa8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/friend1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/friend1.C
@@ -1,5 +1,5 @@
// From N1791
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class C;
typedef C Ct;
diff --git a/gcc/testsuite/g++.dg/cpp0x/friend2.C b/gcc/testsuite/g++.dg/cpp0x/friend2.C
index 39276a05ac..c4df8a0f3b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/friend2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/friend2.C
@@ -1,5 +1,5 @@
// PR c++/47721
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// template type parameter friend:
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-1.C
new file mode 100644
index 0000000000..a55698c938
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-1.C
@@ -0,0 +1,3 @@
+// { dg-do compile { target c++11 } }
+
+int **** [[gnu::format(printf, 1, 2)]] foo(const char *, ...); // { dg-warning "ignored" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-10.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-10.C
new file mode 100644
index 0000000000..cac568e0b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-10.C
@@ -0,0 +1,9 @@
+// PR c++/12795
+// { dg-do compile { target c++11 } }
+// { dg-require-alias "" }
+
+void foo()
+{
+ extern void bar [[gnu::__alias__ ("BAR")]] (); // { dg-warning "ignored" }
+ bar ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-11.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-11.C
new file mode 100644
index 0000000000..504b456567
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-11.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+// PR c++/13791
+
+template <typename T> struct O {
+ struct [[gnu::packed]] I {
+ int i;
+ char c;
+ };
+
+ I* foo();
+};
+
+template <typename T>
+typename O<T>::I*
+O<T>::foo() { return 0; }
+
+template class O<int>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-12.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-12.C
new file mode 100644
index 0000000000..504b456567
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-12.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+// PR c++/13791
+
+template <typename T> struct O {
+ struct [[gnu::packed]] I {
+ int i;
+ char c;
+ };
+
+ I* foo();
+};
+
+template <typename T>
+typename O<T>::I*
+O<T>::foo() { return 0; }
+
+template class O<int>;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-13.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-13.C
new file mode 100644
index 0000000000..a1b4a84b7e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-13.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++11 } }
+// PR c++/13854
+
+extern char *rindex [[gnu::__pure__]] (__const char *__s, int __c) throw ();
+extern char *rindex [[gnu::__pure__]] (__const char *__s, int __c) throw ();
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-14.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-14.C
new file mode 100644
index 0000000000..d646d274df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-14.C
@@ -0,0 +1,14 @@
+// { dg-do compile { target c++11 } }
+// PR c++/13170
+// The bogus attribute is ignored, but was in TYPE_ATTRIBUTES during
+// parsing of the class, causing some variants to have it and some not.
+
+struct [[gnu::bogus]] A // { dg-warning "ignored" "" }
+{
+ virtual ~A();
+ void foo(const A&);
+ void bar(const A&);
+};
+
+void A::foo(const A&) {}
+void A::bar(const A& a) { foo(a); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-15.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-15.C
new file mode 100644
index 0000000000..bf05dbeb31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-15.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++11 } }
+// PR c++/15317
+
+struct A
+{
+ A(char);
+};
+A::A([[gnu::unused]] char i2)
+{}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-16.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-16.C
new file mode 100644
index 0000000000..4adefdb32d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-16.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+// Origin: <rguenth at tat dot physik dot uni-tuebingen dot de>
+// PR c++/10479: use of non dependent expressions in attributes in templates
+
+template <int i>
+struct foo2 {
+ float bar [[gnu::aligned(alignof(double))]];
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.2.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.2.C
new file mode 100644
index 0000000000..636f9a9ac8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.2.C
@@ -0,0 +1,19 @@
+// { dg-do compile { target c++11 } }
+// Origin: Benjamin Kosnik <bkoz at gcc dot gnu dot org>
+// PR c++/17743: Attributes applied to typedefs.
+
+struct A {
+ typedef char layout_type[sizeof(double)]
+ [[gnu::aligned(alignof(double)]]); // { dg-error "expected" }
+ layout_type data;
+};
+
+struct B {
+ typedef char layout_type[sizeof(double)];
+ layout_type data [[gnu::aligned(alignof(double))]];
+};
+
+template<bool> struct StaticAssert;
+template<> struct StaticAssert<true> {};
+
+StaticAssert<alignof(A) == alignof(B)> a1;// { dg-error "incomplete type and cannot be defined" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.C
new file mode 100644
index 0000000000..566461b0e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-17.C
@@ -0,0 +1,19 @@
+// { dg-do compile { target c++11 } }
+// Origin: Benjamin Kosnik <bkoz at gcc dot gnu dot org>
+// PR c++/17743: Attributes applied to typedefs.
+
+struct A {
+ typedef char layout_type[sizeof(double)]
+ [[gnu::aligned(alignof(double))]];
+ layout_type data;
+};
+
+struct B {
+ typedef char layout_type[sizeof(double)];
+ layout_type data [[gnu::aligned(alignof(double))]];
+};
+
+template<bool> struct StaticAssert;
+template<> struct StaticAssert<true> {};
+
+StaticAssert<alignof(A) == alignof(B)> a1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-18.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-18.C
new file mode 100644
index 0000000000..3df13e6440
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-18.C
@@ -0,0 +1,10 @@
+// PR c++/17542
+// Test that we warn when an attribute preceding the class-key is ignored.
+// { dg-do compile { target c++11 } }
+
+[[gnu::packed]] struct A // { dg-warning "attribute" }
+{
+ char c;
+ int x;
+ void f();
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-19.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-19.C
new file mode 100644
index 0000000000..5ac93d8459
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-19.C
@@ -0,0 +1,11 @@
+// PR c++/19739
+// { dg-do compile { target c++11 } }
+
+void Dummy() [[ , ]];
+void Dummy() {}
+
+int main (int argc, char **argv)
+{
+ Dummy();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2-1.C
new file mode 100644
index 0000000000..2f47b32557
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2-1.C
@@ -0,0 +1,3 @@
+// { dg-do compile { target c++11 } }
+
+struct [[gnu::unused]] A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2.C
new file mode 100644
index 0000000000..8c777c1df8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-2.C
@@ -0,0 +1,11 @@
+// { dg-do compile { target c++11 } }
+
+struct [[gnu::packed]] A
+{
+ void f () const;
+};
+
+void
+A::f () const
+{
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C
new file mode 100644
index 0000000000..f989ab2078
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-20.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+// Origin: <jan at etpmod dot phys dot tue dot nl>
+// PR c++/19508: avoid attributes for template parameters
+
+template <typename T>
+struct BVector
+{
+ typedef T T2;
+ typedef T value_type [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" }
+ typedef T2 value_type2 [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" }
+ value_type v;
+};
+BVector<int> m;
+
+template <template <class> class T>
+struct BV2
+{
+ typedef T<float> value_type [[gnu::aligned(8)]]; // { dg-bogus "attribute" "attribute" }
+ value_type v;
+};
+BV2<BVector> m2;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C
new file mode 100644
index 0000000000..2d5ad04b02
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-21.C
@@ -0,0 +1,21 @@
+// PR c++/20763
+// { dg-do compile { target c++11 } }
+
+typedef void *voidp;
+
+struct S
+{
+ char a;
+ voidp b [[gnu::aligned (16)]];
+};
+
+struct T
+{
+ char a;
+ void * b [[gnu::aligned (16)]];
+};
+
+static_assert (sizeof (S) == sizeof (T),
+ "struct S and T should have the same size");
+
+static_assert (sizeof (S) == 32, "sizeof (S) == 8 + 16 + 8");
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-22.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-22.C
new file mode 100644
index 0000000000..4c07df995c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-22.C
@@ -0,0 +1,7 @@
+// PR c++/27648
+// { dg-do compile { target c++11 } }
+
+void f()
+{
+ static_cast<float *[[gnu::unused]]>(0); // { dg-warning "ignored" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-23.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-23.C
new file mode 100644
index 0000000000..57ea6b8097
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-23.C
@@ -0,0 +1,11 @@
+// PR c++/28112
+// { dg-do compile { target c++11 } }
+
+int i [[gnu::init_priority(;)]]; // { dg-error "before" }
+int j [[gnu::vector_size(;)]]; // { dg-error "before" }
+int k [[gnu::visibility(;)]]; // { dg-error "before" }
+struct A {} [[gnu::aligned(;)]]; // { dg-error "before" }
+struct B {} [[gnu::mode(;)]]; // { dg-error "before" }
+void foo() [[gnu::alias(;)]]; // { dg-error "before" }
+void bar() [[gnu::nonnull(;)]]; // { dg-error "before" }
+void baz() [[gnu::section(;)]]; // { dg-error "before" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-24.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-24.C
new file mode 100644
index 0000000000..e1f26c3d33
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-24.C
@@ -0,0 +1,4 @@
+// PR c++/28387
+// { dg-do compile { target c++11 } }
+
+enum [[gnu::unused]] E; // { dg-error "without previous declaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-25.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-25.C
new file mode 100644
index 0000000000..09486d66b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-25.C
@@ -0,0 +1,12 @@
+// PR c++/28559
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ struct B;
+};
+
+struct C
+{
+ template<typename T> friend struct [[gnu::packed]] A<T>::B; // { dg-warning "uninstantiated" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-26.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-26.C
new file mode 100644
index 0000000000..00069b8f51
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-26.C
@@ -0,0 +1,15 @@
+// PR c++/28659
+// The attribute was causing us to get confused in merge_types when
+// combining the template type with an uninstantiated version.
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct [[gnu::aligned(1)]] A
+{
+ A& operator=(const A &t);
+};
+
+template<class T>
+A<T>& A<T>::operator=(const A<T> &t)
+{
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-27.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-27.C
new file mode 100644
index 0000000000..e38d8d3f6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-27.C
@@ -0,0 +1,6 @@
+//PR c++/29980
+// { dg-do compile { target c++11 } }
+
+struct A { typedef int X; }; // { dg-message "previous declaration" }
+
+struct [[gnu::unused]] A::X; // { dg-error "typedef-name" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-28.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-28.C
new file mode 100644
index 0000000000..94f1756ae2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-28.C
@@ -0,0 +1,13 @@
+// PR c++/28558
+// { dg-options "" }
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A(int) { }
+};
+
+int main()
+{
+ A a = (A [[gnu::unused]])0; // { dg-warning "attribute" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-29.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-29.C
new file mode 100644
index 0000000000..f3da452299
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-29.C
@@ -0,0 +1,10 @@
+// PR c++/33506
+// { dg-do compile { target c++11 } }
+
+extern int f1 [[gnu::warn_unused_result]] (char *) ;
+extern int f2 [[gnu::warn_unused_result]] (char *) throw () ;
+extern int f2 (char *) throw ();
+
+extern int f3 [[gnu::nonnull (1)]] (char *) ;
+extern int f4 [[gnu::nonnull (1)]] (char *) throw ();
+extern int f4 (char *) throw ();
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-3.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-3.C
new file mode 100644
index 0000000000..edd1067263
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-3.C
@@ -0,0 +1,22 @@
+// Test that attributes work in a variety of situations.
+// { dg-options "-O -ftrack-macro-expansion=0" }
+// { dg-do run { target c++11 } }
+
+#define attrib [[gnu::mode (QI)]]
+#define gnu_attrib __attribute((mode (QI)))
+
+attrib signed int a;
+static unsigned int b attrib;
+
+int foo(attrib int o)
+{
+ return (sizeof (a) != 1
+ || sizeof (b) != 1
+ || sizeof (o) != 1
+ || sizeof ((gnu_attrib signed int) b) != 1);
+}
+
+int main ()
+{
+ return foo (42);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-30.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-30.C
new file mode 100644
index 0000000000..537dec50e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-30.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++11 } }
+// PR c++/35074
+
+template<typename T> struct A
+{
+ void foo() const;
+} [[gnu::aligned(4)]]; // { dg-warning "ignored" }
+
+template<typename T> void A<T>::foo() const {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-31.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-31.C
new file mode 100644
index 0000000000..ab58e6e2b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-31.C
@@ -0,0 +1,16 @@
+// PR c++/35097
+// { dg-do compile { target c++11 } }
+
+template<int> struct A;
+
+template<> struct A<0>
+{
+ typedef int X [[gnu::aligned(4)]];
+};
+
+template<typename T> void foo(const A<0>::X&, T);
+
+void bar()
+{
+ foo(A<0>::X(), 0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-32.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-32.C
new file mode 100644
index 0000000000..6a1b235d7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-32.C
@@ -0,0 +1,37 @@
+// PR c++/35315
+// { dg-do compile { target c++11 } }
+
+typedef union { int i; } U [[gnu::transparent_union]]; // { dg-warning "ignored" }
+
+static void foo(U) {}
+static void foo(int) {}
+
+void bar()
+{
+ foo(0);
+}
+
+typedef union U1 { int i; } U2 [[gnu::transparent_union]]; // { dg-warning "ignored" }
+
+static void foo2(U1) {} // { dg-message "previously defined" }
+static void foo2(U2) {} // { dg-error "redefinition" }
+
+void bar2(U1 u1, U2 u2)
+{
+ foo2(u1);
+ foo2(u2);
+}
+
+// PR c++/36410
+struct A
+{
+ typedef union [[gnu::transparent_union]]
+ {
+ int i;
+ } B;
+};
+
+void foo(A::B b)
+{
+ b.i;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-33.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-33.C
new file mode 100644
index 0000000000..efb2a1ad6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-33.C
@@ -0,0 +1,19 @@
+// PR c++/35546
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+
+template <int N>
+struct T
+{
+ void foo [[gnu::format (printf,2,3)]] (char const * ...);
+};
+
+template struct T<3>;
+
+template <typename T>
+struct U
+{
+ typedef T V [[gnu::mode (SI)]];
+};
+
+U<int>::V v;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-34.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-34.C
new file mode 100644
index 0000000000..ae8e99090e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-34.C
@@ -0,0 +1,19 @@
+// PR c/37171
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2 -fdump-tree-optimized" }
+
+unsigned int f1 [[gnu::const]] ();
+unsigned int f2 [[gnu::__const]] () ;
+unsigned int f3 [[gnu::__const__]] () ;
+
+unsigned int f4 ()
+{
+ return f1 () + f1 () + f1 () + f1 ()
+ + f2 () + f2 () + f2 () + f2 ()
+ + f3 () + f3 () + f3 () + f3 ();
+}
+
+// { dg-final { scan-tree-dump-times "= f1 \\(\\)" 1 "optimized" } }
+// { dg-final { scan-tree-dump-times "= f2 \\(\\)" 1 "optimized" } }
+// { dg-final { scan-tree-dump-times "= f3 \\(\\)" 1 "optimized" } }
+// { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-35.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-35.C
new file mode 100644
index 0000000000..ccae6f0c84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-35.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-require-effective-target c++11 }
+// { dg-options "-O3 -msse2" }
+// { dg-require-effective-target sse2 }
+
+// You can make NON-template typedefs with a large alignment.
+typedef double AlignedDoubleType [[gnu::aligned(16)]];
+
+template <typename RealType>
+RealType f(const RealType* p)
+{
+ // But if you use a template parameter it complains.
+ typedef RealType AlignedRealType [[gnu::aligned(16)]];
+
+ return p[0];
+}
+
+double f2(const double* p)
+{
+ return f<double>(p);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
new file mode 100644
index 0000000000..2aae9cae00
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36-1.C
@@ -0,0 +1,11 @@
+// { dg-do compile { target c++11 } }
+
+struct S;
+
+typedef int (*F [[gnu::warn_unused_result]]) (int);
+
+typedef int (*F2 [[gnu::warn_unused_result]]) (int);
+
+typedef int (S::*F3 [[gnu::warn_unused_result]]) (int); // { dg-warning "only applies to function types" }
+
+typedef int [[gnu::warn_unused_result]] (*F5) (int); // { dg-warning "ignored" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
new file mode 100644
index 0000000000..3f0ef1461b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-36.C
@@ -0,0 +1,26 @@
+// PR c++/43031
+// { dg-options "-pedantic" }
+// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// { dg-require-effective-target c++11 }
+
+// c++11 attributes that apply to types are ignored for now
+
+class T;
+class L { };
+class P : public L
+{
+ typedef void (T::* [[gnu::__stdcall__]] F2) (L*); // { dg-warning "ignored" }
+ typedef void (T::*F) (L*) [[gnu::__stdcall__]]; // { dg-warning "ignored" }
+ void f(bool aAdd);
+};
+
+class T
+{
+public:
+ virtual void A(L *listener) [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
+ virtual void R(L *listener) [[gnu::__stdcall__]] = 0; // { dg-warning "ignored" }
+};
+void P::f(bool aAdd)
+{
+ F addRemoveEventListener = (aAdd ? &T::A : &T::R);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C
new file mode 100644
index 0000000000..59626b254e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-37.C
@@ -0,0 +1,18 @@
+// PR c++/43093
+// { dg-options "-pedantic" }
+// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// { dg-require-effective-target c++11 }
+
+// c++11 attributes that apply to types are ignored for now
+
+struct S {
+ int x;
+ S(const S &s) {}
+};
+
+S getS() [[gnu::__stdcall__]]; // { dg-warning "ignored" }
+
+void test()
+{
+ S s = getS();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-38.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-38.C
new file mode 100644
index 0000000000..3db981aeb2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-38.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+// PR c++/36625
+
+template <int N>
+struct A {
+ struct S { short f[3]; } [[gnu::aligned (N)]]; // { dg-warning "ignored" }
+};
+
+int main ()
+{
+ A<4>::S s;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39-1.C
new file mode 100644
index 0000000000..453fc01a2e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39-1.C
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++11 } }
+
+int fragile_block(void) {
+ typedef
+ [[gnu::aligned (16)]] // { dg-warning "ignored" }
+ struct {
+ int i;
+ } XmmUint16;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39.C
new file mode 100644
index 0000000000..83fa8b5e66
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-39.C
@@ -0,0 +1,10 @@
+// PR debug/43370
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+
+int fragile_block(void) {
+ typedef struct [[gnu::aligned (16)]] {
+ int i;
+ } XmmUint16;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C
new file mode 100644
index 0000000000..eb585a89be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-4.C
@@ -0,0 +1,30 @@
+// { dg-options "-Wunused -pedantic-errors" }
+// { dg-do compile { target c++11 } }
+// Test for syntax support of various attribute permutations.
+
+int
+[[noreturn]] // { dg-warning "ignored" }
+one
+[[gnu::unused]]
+(void);
+
+int one_third [[noreturn]] [[gnu::unused]] (void);
+
+int [[gnu::unused]] one_half(); // { dg-warning "ignored" }
+
+static
+[[noreturn]] // { dg-warning "ignored" }
+void two [[gnu::unused]] (void) {}
+
+
+
+[[gnu::unused]]
+int
+five(void)
+[[noreturn]] // { dg-warning "ignored" }
+{}
+
+[[noreturn]]
+void
+six (void)
+;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-40.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-40.C
new file mode 100644
index 0000000000..f3ccb727df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-40.C
@@ -0,0 +1,5 @@
+// PR c++/46803
+// { dg-do compile { target c++11 } }
+
+int strftime(char *, int, const char *, const struct tm *)
+ [[gnu::__bounded__(__string__,1,2)]]; // { dg-warning "ignored" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-41.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-41.C
new file mode 100644
index 0000000000..6e47a1e3d7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-41.C
@@ -0,0 +1,20 @@
+// PR c++/45267
+// { dg-do compile { target c++11 } }
+// { dg-options "-O" }
+
+template<typename T> struct Vector {
+ Vector(long long x);
+ inline Vector<T> operator<< [[gnu::always_inline]] (int x) const;
+};
+long long bar (long long);
+template<> inline Vector<int> Vector<int>::operator<<(int x) const {
+ return bar(x);
+}
+bool b;
+int main() {
+ Vector<int> a(1);
+ if ((a << 2), b) {
+ a << 2;
+ throw 1;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C
new file mode 100644
index 0000000000..ec98ece588
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-42.C
@@ -0,0 +1,14 @@
+// { dg-options "-pedantic" }
+// { dg-do compile { target { i?86-*-* && ilp32 } } }
+// { dg-require-effective-target c++11 }
+
+struct A {
+ [[gnu::fastcall]]
+ void f();
+};
+
+int main()
+{
+ typedef void (A::*FP)();
+ FP fp[] = {&A::f}; // { dg-error "cannot convert" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-43.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-43.C
new file mode 100644
index 0000000000..c850622723
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-43.C
@@ -0,0 +1,4 @@
+// { dg-do compile { target c++11 } }
+template <class T> struct A { };
+
+template [[gnu::packed]] struct A<int>; // { dg-warning "ignored in explicit instantiation" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-44.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-44.C
new file mode 100644
index 0000000000..81d70e52b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-44.C
@@ -0,0 +1,3 @@
+// PR c++/52671
+// { dg-do compile { target c++11 } }
+[[gnu::deprecated]] enum E { E0 }; // { dg-warning "ignored in declaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-45.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-45.C
new file mode 100644
index 0000000000..573a1ab6cb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-45.C
@@ -0,0 +1,4 @@
+// PR c++/52906
+// { dg-do compile { target c++11 } }
+
+[[gnu::deprecated]]; // { dg-error "does not declare anything" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-46.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-46.C
new file mode 100644
index 0000000000..53fcb77ff7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-46.C
@@ -0,0 +1,5 @@
+// PR c++/40821
+// { dg-do compile { target c++11 } }
+
+struct [[gnu::aligned(8)] S1 { int i; }; // { dg-error "" }
+struct [aligned(8) S2 { int i; }; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47-1.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47-1.C
new file mode 100644
index 0000000000..4a5d73a192
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47-1.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+int
+foo ()
+{
+ int i [[and, bitor, xor_eq, compl, bitand]]; // { dg-warning "ignored" }
+ i = 0;
+ return i;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47.C
new file mode 100644
index 0000000000..af74abd186
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-47.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+// Example taken from dcl.attr.grammar:
+
+int p[10];
+void f()
+{
+ int x = 42, y[5];
+ /* Here, the '[[' should have introduced an attribute, on a
+ lambda invocation an array subscripting expression. */
+ int(p[[x] { return x; }()]); // { dg-error "expected|consecutive" }
+ /* Likewise, the '[[gnu::' is invalid here. */
+ y[[] { return 2; }()] = 2; // { dg-error "expected|consecutive" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48-2.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48-2.C
new file mode 100644
index 0000000000..3cc58976b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48-2.C
@@ -0,0 +1,4 @@
+// Origin: PR c++/54955
+// { dg-do compile { target c++11 } }
+
+alignas(double) int f;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48.C
new file mode 100644
index 0000000000..360c093bf5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-48.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+
+typedef char layout_type;
+
+struct A {
+ layout_type member alignas (double);
+};
+
+static_assert (alignof (A) == alignof (double),
+ "alignment of struct A must be alignof (double)");
+
+struct alignas (alignof (long double)) B {
+ layout_type member;
+};
+
+static_assert (alignof (B) == alignof (long double),
+ "alignment of struct A must be alignof (double double)");
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-49.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-49.C
new file mode 100644
index 0000000000..8b68f92736
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-49.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+
+typedef char layout_type;
+
+template<class> struct A {
+ layout_type member alignas (double);
+};
+
+static_assert (alignof (A<int>) == alignof (double),
+ "alignment of struct A must be alignof (double)");
+
+template<class> struct alignas (alignof (long double)) B {
+ layout_type member;
+};
+
+static_assert (alignof (B<int>) == alignof (long double),
+ "alignment of struct A must be alignof (double double)");
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-5.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-5.C
new file mode 100644
index 0000000000..83de121dfb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-5.C
@@ -0,0 +1,23 @@
+// { dg-do compile { target c++11 } }
+//
+// There were two related problems here, depending on the vintage. At
+// one time:
+//
+// typedef struct A { ... } A [[gnu::aligned (16)]];
+//
+// would cause original_types to go into an infinite loop. At other
+// times, the attributes applied to an explicit typedef would be lost
+// (check_b3 would have a negative size).
+
+// First check that the declaration is accepted and has an effect.
+typedef struct A { int i; } A [[gnu::aligned (16)]];
+int check_A[alignof (A) >= 16 ? 1 : -1];
+
+// Check that the alignment is only applied to the typedef.
+struct B { int i; };
+struct B b1;
+typedef struct B B [[gnu::aligned (16)]];
+struct B b2;
+B b3;
+int check_b1[__alignof__ (b1) == __alignof__ (b2) ? 1 : -1];
+int check_b3[__alignof__ (b3) >= 16 ? 1 : -1];
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-50.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-50.C
new file mode 100644
index 0000000000..2479dfdf19
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-50.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++11 } }
+
+typedef char layout_type;
+
+template<class> struct A {
+ layout_type member alignas (double) alignas (int);
+};
+
+// Here, the spec says that A<int> should have the stricter alignment,
+// so that would be the alignment of 'double', not 'int'.
+static_assert (alignof (A<int>) == alignof (double),
+ "alignment of struct A must be alignof (double)");
+
+template<class> struct alignas (1) alignas (alignof (long double)) B {
+ layout_type member;
+};
+
+// Similarly, the B<int> should have the stricter alignment, so that would
+// so that would be the alignment of 'long double', not '1'.
+static_assert (alignof (B<int>) == alignof (long double),
+ "alignment of struct A must be alignof (double double)");
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-51.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-51.C
new file mode 100644
index 0000000000..f2b66029e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-51.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++11 } }
+
+typedef char layout_type;
+struct A
+{
+ layout_type member [[gnu::aligned (16)]];
+};
+
+static_assert (sizeof (A) == 16, "Alignment should be 16");
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C
new file mode 100644
index 0000000000..0f87fd490e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-52.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target c++11 } }
+
+struct A {int i;} a [[gnu::aligned(16)]];
+struct B {int i;} __attribute__((aligned(16))) b;
+
+int
+main ()
+{
+ A aa;
+ B bb;
+
+ static_assert (sizeof (a) == 4, "sizeof (a) should be 4");
+ static_assert (sizeof (b) == 16, "sizeof (b) should be 16");
+ static_assert (sizeof (aa) == 4, "sizeof (aa) should be 4");
+ static_assert (sizeof (bb) == 16, "sizeof (bb) should be 16");
+
+ static_assert (__alignof__ (a) == 16, "alignof (a) should be 16");
+ static_assert (__alignof__ (b) == 16, "alignof (b) should be 16");
+ static_assert (__alignof__ (aa) == 4, "alignof (aa) should be 4");
+ static_assert (__alignof__ (bb) == 16, "alignof (bb) should be 16");
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-53.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-53.C
new file mode 100644
index 0000000000..723c8ef8ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-53.C
@@ -0,0 +1,39 @@
+// { dg-do compile { target c++11 } }
+
+int
+toto ()
+{
+ [[gnu::unused]] good:
+ return 0;
+}
+
+int
+foo ()
+{
+ [[gnu::unused]] good:
+ int i = 0;
+
+ // A C++11 attribute at the beginning of the return statement is
+ // syntactically correct, appertains to the return statement (not to
+ // the label) but is currently ignored by this implementation.
+ good_ignored : [[gnu::unused]] // { dg-warning "attributes at the beginning of statement are ignored" }
+ return i;
+}
+
+int
+bar ()
+{
+ // A GNU attribute after the label appertains to the label.
+ good: __attribute__((unused));
+ return 0;
+}
+
+int
+baz ()
+{
+ // The c++ attribute after the label appertains to the (empty)
+ // statement.
+ bad: [[gnu::unused]]; // { dg-warning "attributes at the beginning of statement are ignored" }
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-54.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-54.C
new file mode 100644
index 0000000000..45aa8e4758
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-54.C
@@ -0,0 +1,14 @@
+// PR c++/56859
+// { dg-require-effective-target c++11 }
+
+template<unsigned size, unsigned alignment>
+struct aligned_storage
+{
+ using type = struct { alignas(alignment) unsigned char data[size]; };
+};
+
+#define SA(X) static_assert((X),#X)
+SA(alignof(aligned_storage<8,1>::type) == 1);
+SA(alignof(aligned_storage<8,2>::type) == 2);
+SA(alignof(aligned_storage<8,4>::type) == 4);
+SA(alignof(aligned_storage<8,8>::type) == 8);
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C
new file mode 100644
index 0000000000..c4e6deabe1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-55.C
@@ -0,0 +1,12 @@
+// PR c++/58584
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i alignas(this); // { dg-error "17:invalid use of 'this'" }
+};
+
+template<int> struct B
+{
+ int j alignas(this); // { dg-error "17:invalid use of 'this'" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-56.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-56.C
new file mode 100644
index 0000000000..f331ed369a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-56.C
@@ -0,0 +1,5 @@
+// PR c++/58724
+// { dg-do compile { target c++11 } }
+
+namespace foo __attribute__((visibility("default"))) {}
+namespace bar [[gnu::visibility("default")]] {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-57.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-57.C
new file mode 100644
index 0000000000..12b4f4c84e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-57.C
@@ -0,0 +1,9 @@
+// PR c++/59096
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A
+{
+ typedef T B [[mode]]; // { dg-warning "ignored" }
+};
+
+A<int>::B b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-6.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-6.C
new file mode 100644
index 0000000000..54071d5ed1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-6.C
@@ -0,0 +1,20 @@
+// Copyright (C) 2002 Free Software Foundation.
+//
+// Test that the nothrow attribute is working correctly.
+//
+// Written by Richard Henderson, 26 May 2002.
+
+// { dg-do link { target c++11} }
+extern void foo [[gnu::nothrow]] ();
+extern void link_error();
+
+int main()
+{
+ try {
+ foo();
+ } catch (...) {
+ link_error();
+ }
+}
+
+void foo() { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-7.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-7.C
new file mode 100644
index 0000000000..3341250685
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-7.C
@@ -0,0 +1,4 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-parameter" }
+
+void f (int i [[gnu::__unused__]]) {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
new file mode 100644
index 0000000000..9c834a4a43
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-8.C
@@ -0,0 +1,7 @@
+// { dg-options "-pedantic" }
+// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// { dg-require-effective-target c++11 }
+
+extern int * ([[gnu::stdcall]] *fooPtr)( void); // { dg-error "expected" }
+int * [[gnu::stdcall]] myFn01( void) { return 0; }// { dg-warning "ignored" }
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/gen-attrs-9.C b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-9.C
new file mode 100644
index 0000000000..3dc51eef9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gen-attrs-9.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+
+class C;
+struct S;
+union U;
+enum e {};
+enum [[gnu::unused]] e; // { dg-warning "already defined" }
+
+struct [[gnu::unused]] B *p; // { dg-warning "attributes" }
+
+template <class T> struct A { };
+struct [[gnu::unused]] A<int>; // { dg-warning "attributes" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C b/gcc/testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C
new file mode 100644
index 0000000000..6a8398b896
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gnu_fext-numeric-literals.C
@@ -0,0 +1,115 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+// Integer imaginary...
+
+constexpr unsigned long long
+operator"" i(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 0; }
+
+constexpr unsigned long long
+operator"" I(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 1; }
+
+constexpr unsigned long long
+operator"" j(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 2; }
+
+constexpr unsigned long long
+operator"" J(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 3; }
+
+// Floating-point imaginary...
+
+constexpr long double
+operator"" i(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 0.0L; }
+
+constexpr long double
+operator"" I(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 1.0L; }
+
+constexpr long double
+operator"" j(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 2.0L; }
+
+constexpr long double
+operator"" J(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 3.0L; }
+
+// Fixed-point...
+
+constexpr long double
+operator"" k(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 0; }
+
+constexpr long double
+operator"" K(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 1; }
+
+constexpr long double
+operator"" r(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 2; }
+
+constexpr long double
+operator"" R(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 3; }
+
+// Machine-defined...
+
+constexpr long double
+operator"" w(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 0; }
+
+constexpr long double
+operator"" W(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 1; }
+
+constexpr long double
+operator"" q(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 2; }
+
+constexpr long double
+operator"" Q(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 3; }
+
+int
+main()
+{
+ auto ii = 1i;
+ auto Ii = 1I;
+ auto ji = 1j;
+ auto Ji = 1J;
+
+ auto ifp = 1.0i;
+ auto Ifp = 1.0I;
+ auto jfp = 1.0j;
+ auto Jfp = 1.0J;
+
+ auto kfp = 1.0k; // { dg-error "fixed-point types not supported" }
+ auto Kfp = 1.0K; // { dg-error "fixed-point types not supported" }
+ auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
+ auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
+
+ auto wfp = 1.0w; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto Wfp = 1.0W; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto qfp = 1.0q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+ auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+}
+
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C b/gcc/testsuite/g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C
new file mode 100644
index 0000000000..c738a484da
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/gnu_fno-ext-numeric-literals.C
@@ -0,0 +1,115 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-ext-numeric-literals" }
+
+// Integer imaginary...
+
+constexpr unsigned long long
+operator"" i(unsigned long long n)
+{ return 4 * n + 0; }
+
+constexpr unsigned long long
+operator"" I(unsigned long long n)
+{ return 4 * n + 1; }
+
+constexpr unsigned long long
+operator"" j(unsigned long long n)
+{ return 4 * n + 2; }
+
+constexpr unsigned long long
+operator"" J(unsigned long long n)
+{ return 4 * n + 3; }
+
+// Floating-point imaginary...
+
+constexpr long double
+operator"" i(long double n)
+{ return 4.0L * n + 0.0L; }
+
+constexpr long double
+operator"" I(long double n)
+{ return 4.0L * n + 1.0L; }
+
+constexpr long double
+operator"" j(long double n)
+{ return 4.0L * n + 2.0L; }
+
+constexpr long double
+operator"" J(long double n)
+{ return 4.0L * n + 3.0L; }
+
+// Fixed-point...
+
+constexpr long double
+operator"" k(long double n)
+{ return 4 * (n + 1) + 0; }
+
+constexpr long double
+operator"" K(long double n)
+{ return 4 * (n + 1) + 1; }
+
+constexpr long double
+operator"" r(long double n)
+{ return 4 * (n + 1) + 2; }
+
+constexpr long double
+operator"" R(long double n)
+{ return 4 * (n + 1) + 3; }
+
+// Machine-defined...
+
+constexpr long double
+operator"" w(long double n)
+{ return 4 * (n + 2) + 0; }
+
+constexpr long double
+operator"" W(long double n)
+{ return 4 * (n + 2) + 1; }
+
+constexpr long double
+operator"" q(long double n)
+{ return 4 * (n + 2) + 2; }
+
+constexpr long double
+operator"" Q(long double n)
+{ return 4 * (n + 2) + 3; }
+
+int
+main()
+{
+ auto ii = 1i;
+ auto Ii = 1I;
+ auto ji = 1j;
+ auto Ji = 1J;
+
+ auto ifp = 1.0i;
+ auto Ifp = 1.0I;
+ auto jfp = 1.0j;
+ auto Jfp = 1.0J;
+
+ auto kfp = 1.0k;
+ auto Kfp = 1.0K;
+ auto rfp = 1.0r;
+ auto Rfp = 1.0R;
+
+ auto wfp = 1.0w;
+ auto Wfp = 1.0W;
+ auto qfp = 1.0q;
+ auto Qfp = 1.0Q;
+}
+
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C b/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C
index c3f6b85e24..d4cd2e88d7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit-copy.C
@@ -1,4 +1,4 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S
{
S();
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C b/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C
index 64084c1485..23921c7038 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit-trivial1.C
@@ -1,8 +1,8 @@
// PR c++/46807
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// In C++98/03, B::B(const B&) is trivial because A::A(const A&) is trivial,
// even though doing overload resolution would mean calling the template
-// constructor. In C++0x, we do overload resolution to determine triviality.
+// constructor. In C++11, we do overload resolution to determine triviality.
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit1.C b/gcc/testsuite/g++.dg/cpp0x/implicit1.C
index 2efbde6a93..7eb3371798 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit1.C
@@ -1,5 +1,5 @@
// Test for implicitly deleted destructors.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "default definition would be ill-formed" }
// { dg-prune-output "within this context" }
@@ -15,7 +15,7 @@ D d; // { dg-error "deleted" }
struct E
{
- ~E() = delete; // { dg-error "declared here" }
+ ~E() = delete; // { dg-message "declared here" }
};
struct F
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit10.C b/gcc/testsuite/g++.dg/cpp0x/implicit10.C
index 721a93dd57..6a0c711a1b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit10.C
@@ -1,5 +1,5 @@
// PR c++/46103
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct MoveOnly {
MoveOnly(const MoveOnly&) = delete;
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit11.C b/gcc/testsuite/g++.dg/cpp0x/implicit11.C
index 7ec8e95dcb..3471ad98fa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit11.C
@@ -1,10 +1,10 @@
// Test that we consider base dtors in determining whether
// a derived ctor is deleted even if the ctor is trivial.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
- ~A() = delete; // { dg-error "declared here" }
+ ~A() = delete; // { dg-message "declared here" }
};
struct B: A { }; // { dg-error "deleted" }
@@ -12,6 +12,6 @@ struct B: A { }; // { dg-error "deleted" }
extern B eb;
int main()
{
- B* b1 = new B; // { dg-error "use of deleted function" "" { xfail *-*-* } }
+ B* b1 = new B; // { dg-error "use of deleted function" }
B* b2 = new B(eb); // { dg-error "use of deleted function" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit12.C b/gcc/testsuite/g++.dg/cpp0x/implicit12.C
index da806e006a..d52f1532d4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit12.C
@@ -1,5 +1,5 @@
// PR c++/50500
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// If a class declares move operations, the implicitly declared copy
// operations are deleted.
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit2.C b/gcc/testsuite/g++.dg/cpp0x/implicit2.C
index f24a78838f..2995894424 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit2.C
@@ -1,7 +1,6 @@
// Test that the synthesized C copy constructor calls the A template
// constructor and has the appropriate exception specification.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
int r = 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit3.C b/gcc/testsuite/g++.dg/cpp0x/implicit3.C
index a43eca708c..8176a6e187 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit3.C
@@ -1,6 +1,5 @@
// Basic runtime test for implicit move constructor
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
int m;
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit4.C b/gcc/testsuite/g++.dg/cpp0x/implicit4.C
index 47fd56a525..eeb4aa9d9d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit4.C
@@ -1,6 +1,6 @@
// Test that a base with only a move constructor causes the implicit copy
// constructor to be deleted.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A // { dg-message "declares a move" }
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit5.C b/gcc/testsuite/g++.dg/cpp0x/implicit5.C
index d25294831e..f9ae5351fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit5.C
@@ -1,6 +1,6 @@
// Test that the default B copy constructor calls the deleted A
// copy constructor.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A // { dg-message "declares a move" }
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit6.C b/gcc/testsuite/g++.dg/cpp0x/implicit6.C
index c7902969dc..d3e85d0e73 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit6.C
@@ -1,5 +1,5 @@
// Circular implicit declarations were causing errors
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Ray;
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit7.C b/gcc/testsuite/g++.dg/cpp0x/implicit7.C
index f29e5009fb..eaa7d82ae5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit7.C
@@ -1,5 +1,5 @@
// PR c++/44909
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// Declaring A<D<E>>'s copy ctor means choosing a ctor to initialize D<E>,
// which means choosing a ctor for C<B<E>>, which meant considering
// C(const B<E>&) which means choosing a ctor for B<E>, which means choosing
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit8.C b/gcc/testsuite/g++.dg/cpp0x/implicit8.C
index c949af2105..68575ca136 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit8.C
@@ -1,6 +1,6 @@
// The hack for PR c++/44909 breaks this testcase. We need feedback
// from the C++ committee to know how to proceed.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/implicit9.C b/gcc/testsuite/g++.dg/cpp0x/implicit9.C
index 3a6dbc558d..0952a42088 100644
--- a/gcc/testsuite/g++.dg/cpp0x/implicit9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/implicit9.C
@@ -1,5 +1,5 @@
// Test that private base dtor makes derived ctor deleted
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor1.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor1.C
new file mode 100644
index 0000000000..c656fb9a23
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor1.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i;
+ constexpr A(int i): i(i) {}
+};
+
+struct B: A
+{
+ using A::A;
+};
+
+constexpr B b(42);
+
+#define SA(X) static_assert((X),#X)
+SA(b.i == 42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor10.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor10.C
new file mode 100644
index 0000000000..48e95a0b1b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor10.C
@@ -0,0 +1,15 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+
+struct A
+{
+ template <class... Ts> A(Ts...);
+};
+
+struct B: A
+{
+ using A::A;
+};
+
+B b1(42);
+B b2(1.0, 42, (void*)0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C
new file mode 100644
index 0000000000..228e8ec660
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor11.C
@@ -0,0 +1,14 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ A(int, ...); // { dg-message "declared here" }
+};
+
+struct B: A
+{
+ using A::A; // { dg-warning "ellipsis" }
+};
+
+B b1(42);
+B b2(42, 1.0); // { dg-error "no match" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C
new file mode 100644
index 0000000000..cc23d4b19e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor12.C
@@ -0,0 +1,25 @@
+// { dg-do run { target c++11 } }
+
+struct A
+{
+ int i;
+ template <class T>
+ A(T t) noexcept : i(t) {}
+};
+
+struct C
+{
+ C() { throw 42; }
+};
+
+struct B: A, C
+{
+ using A::A;
+};
+
+int main()
+{
+ try { B b(24); }
+ catch (int) { return 0; }
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor13.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor13.C
new file mode 100644
index 0000000000..bd021e6e6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor13.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i;
+ template <class T> A(T t);
+};
+
+struct C
+{
+ C() = delete; // { dg-message "declared here" }
+};
+
+struct B: A, C
+{
+ using A::A; // { dg-error "C::C" }
+};
+
+int main()
+{
+ B b(24); // { dg-error "B::B" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor14.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor14.C
new file mode 100644
index 0000000000..04048800d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor14.C
@@ -0,0 +1,10 @@
+// PR c++/55261
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+};
+struct B : A
+{
+ using A::A;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C
new file mode 100644
index 0000000000..c2d33bff4f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor15.C
@@ -0,0 +1,15 @@
+// Discussions on the core reflector indicate that not inheriting base copy
+// constructors was a deliberate choice.
+
+// { dg-do compile { target c++11 } }
+
+struct A { A(int); };
+struct B: public A
+{
+ using A::A;
+};
+
+A a (42);
+
+B b1 (24); // inherited
+B b2 (a); // not inherited { dg-error "no match" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor16.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor16.C
new file mode 100644
index 0000000000..ba6849f034
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor16.C
@@ -0,0 +1,15 @@
+// PR c++/56285
+// { dg-do compile { target c++11 } }
+
+struct foo {
+ explicit foo(int&&) {}
+};
+
+struct bar: private foo {
+ using foo::foo;
+};
+
+int main()
+{
+ bar b { 42 };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C
new file mode 100644
index 0000000000..22eda3af50
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor17.C
@@ -0,0 +1,45 @@
+// PR c++/56323
+// { dg-do compile { target c++11 } }
+
+struct A {
+ A(int i);
+};
+
+typedef A B;
+
+struct C : B {
+ using B::B;
+};
+
+struct D : B {
+ using B::A;
+};
+
+C c(0);
+D d(0);
+
+template <class T>
+struct E {
+ typedef T type;
+};
+
+template <class T>
+struct F : E<T>::type {
+ using E<T>::type::type; // error: E<T>::type is a typedef
+};
+
+F<A> f(0);
+
+template <class T>
+struct AT
+{
+ AT(T);
+};
+
+template <template <class> class T>
+struct G : T<int>
+{
+ using T<int>::T;
+};
+
+G<AT> g(0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C
new file mode 100644
index 0000000000..05735559a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor18.C
@@ -0,0 +1,22 @@
+// PR c++/56358
+// { dg-do compile { target c++11 } }
+
+struct foo {
+ explicit foo(int) {}
+};
+
+template<typename T>
+struct bar: T {
+ using T::T;
+
+ // Bad
+ explicit bar(): T(0) {}
+
+ void baz()
+ {
+ // Also bad
+ using qux = T;
+ }
+};
+
+bar<foo> b, b2(42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
new file mode 100644
index 0000000000..7a22f8830e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor19.C
@@ -0,0 +1,14 @@
+// PR c++/60389
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ template<typename...T> A(T...) {}
+};
+
+struct B : A
+{
+ using A::A; // { dg-error "inherited" }
+};
+
+constexpr B b; // { dg-error "literal" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor2.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor2.C
new file mode 100644
index 0000000000..15e5657a4f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor2.C
@@ -0,0 +1,19 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i;
+ constexpr A(int, int i = num): i(i) {}
+private:
+ static const int num = 42;
+};
+
+struct B: A
+{
+ using A::A;
+};
+
+constexpr B b(24);
+
+#define SA(X) static_assert((X),#X)
+SA(b.i == 42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C
new file mode 100644
index 0000000000..e8dc84d32e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor3.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+
+struct B1 {
+ B1(int);
+};
+struct B2 {
+ B2(int);
+};
+struct D1 : B1, B2 {
+ using B1::B1; // { dg-error "inherited" }
+ using B2::B2; // { dg-error "inherited" }
+}; // ill-formed: attempts to declare D1(int) twice
+struct D2 : B1, B2 {
+ using B1::B1;
+ using B2::B2;
+ D2(int); // OK: user declaration supersedes both implicit declarations
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor4.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor4.C
new file mode 100644
index 0000000000..16dc19731b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor4.C
@@ -0,0 +1,18 @@
+// From N3337
+// { dg-do compile { target c++11 } }
+
+struct B1 {
+ B1(int);
+};
+struct B2 {
+ B2(int = 13, int = 42);
+};
+struct D1 : B1 {
+ using B1::B1;
+};
+struct D2 : B2 {
+ using B2::B2;
+};
+
+D1 d1(1);
+D2 d2a(2), d2b(3,4);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C
new file mode 100644
index 0000000000..8c79c833a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor5.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target c++11 } }
+
+struct B1 {
+ B1(int) { }
+};
+struct B2 {
+ B2(double) { }
+};
+struct D1 : B1 { // { dg-error "no match" }
+ using B1::B1; // implicitly declares D1(int)
+ int x;
+};
+void test() {
+ D1 d(6); // OK: d.x is not initialized
+ D1 e; // { dg-error "deleted" } D1 has no default constructor
+}
+struct D2 : B2 {
+ using B2::B2; // { dg-error "no match" } implicitly declares D2(double)
+ B1 b;
+};
+D2 f(1.0); // { dg-error "deleted" } B1 has no default constructor
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C
new file mode 100644
index 0000000000..98ac1885a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor6.C
@@ -0,0 +1,15 @@
+// { dg-do compile { target c++11 } }
+
+extern "C" int printf (const char *, ...);
+template< class T >
+struct D : T {
+ using T::T;
+ // declares all constructors from class T
+ ~D() { printf ("Destroying wrapper\n"); }
+};
+
+struct A {
+ A(int);
+};
+
+D<A> d(42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor7.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor7.C
new file mode 100644
index 0000000000..280ccfebed
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor7.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i;
+ template <class T>
+ constexpr A(T t): i(t) {}
+};
+
+struct B: A
+{
+ using A::A;
+};
+
+constexpr B b(42);
+
+#define SA(X) static_assert((X),#X)
+SA(b.i == 42);
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor8.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor8.C
new file mode 100644
index 0000000000..74c9496701
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor8.C
@@ -0,0 +1,20 @@
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i;
+ explicit A(int i): i(i) {}
+};
+
+struct B: A
+{
+ using A::A;
+};
+
+void f(B);
+
+int main()
+{
+ f(B(42)); // OK
+ f(42); // { dg-error "could not convert" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C b/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C
new file mode 100644
index 0000000000..39751013bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/inh-ctor9.C
@@ -0,0 +1,15 @@
+// { dg-do compile { target c++11 } }
+
+class A
+{
+ int i;
+protected:
+ A(int i): i(i) {}
+};
+
+struct B: A
+{
+ using A::A; // { dg-error "protected" }
+};
+
+B b(42); // { dg-error "this context" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-array2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-array2.C
index 19eec33acf..1e25eb2202 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-array2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-array2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef int IA[2];
typedef double DA[2];
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-array4.C b/gcc/testsuite/g++.dg/cpp0x/initlist-array4.C
new file mode 100644
index 0000000000..af2045d9bb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-array4.C
@@ -0,0 +1,9 @@
+// PR c++/58636
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+// { dg-error "pointer to reference" "" { target *-*-* } 0 }
+int foo(std::initializer_list<int&&>);
+
+int i = foo({ 0 }); // { dg-error "std::initializer_list" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C b/gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C
index 25113d770b..925ab16bea 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-arrray1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef int IRT[2];
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C b/gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C
index 82031cbcc8..bc6d272023 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-ctor1.C
@@ -1,5 +1,5 @@
// PR c++/52905
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C b/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C
index 373044f765..6ae32a6c55 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-deduce.C
@@ -2,8 +2,8 @@
// supported by the working draft, but is necessary for perfect forwarding
// of initializer-lists to things that can take a std::initializer_list.
-// { dg-options "-std=c++0x -fdeduce-init-list" }
-// { dg-do run }
+// { dg-options "-fdeduce-init-list" }
+// { dg-do run { target c++11 } }
#include <initializer_list>
@@ -24,3 +24,5 @@ int main()
{
g({1}); // { dg-warning "deduc" }
}
+
+// { dg-prune-output "-fno-deduce-init-list" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-explicit-sfinae.C b/gcc/testsuite/g++.dg/cpp0x/initlist-explicit-sfinae.C
new file mode 100644
index 0000000000..78ec8cbd0b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-explicit-sfinae.C
@@ -0,0 +1,46 @@
+// { dg-do compile { target c++11 } }
+template<typename _Tp>
+_Tp&& declval() noexcept;
+
+template<bool b>
+struct bt {
+ static constexpr bool value = b;
+};
+
+template <typename To_, typename... From_>
+class my_is_convertible_many {
+ private:
+ template <typename To>
+ struct indirector {
+ indirector(To);
+ };
+
+ template <typename To, typename... From>
+ struct tag {};
+
+ template <typename To, typename... From>
+ static auto test(tag<To, From...>)
+ -> decltype(indirector<To>({declval<From>()...}), bt<true>());
+ static auto test(...)
+ -> bt<false>;
+
+ public:
+ static constexpr bool value = decltype(test(tag<To_, From_...>()))::value;
+};
+
+struct A {};
+struct B {};
+struct C {};
+
+struct Test {
+ Test(A, A);
+ //Test(B, B);
+ explicit Test(C, C);
+};
+
+int main() {
+ static_assert(my_is_convertible_many<Test, A, A>::value,""); // true, correct
+ static_assert(!my_is_convertible_many<Test, B, B>::value,""); // false, correct
+ static_assert(!my_is_convertible_many<Test, C, C>::value,""); // error
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime1.C b/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime1.C
index e43ce5d62c..d3b0fc3609 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime1.C
@@ -1,7 +1,6 @@
// Test that we properly extend the lifetime of the initializer_list
// array even if the initializer_list is a subobject.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime2.C
index 16ae1ac6e0..77fc961c96 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-lifetime2.C
@@ -1,7 +1,6 @@
// Test that we properly extend the lifetime of the initializer_list
// array even if the initializer_list is a subobject.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C b/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C
index d17cda3f63..3a5e908569 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-opt.C
@@ -1,5 +1,6 @@
// PR c++/41997
-// { dg-options "-std=c++0x -O2 -fdump-tree-optimized" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2 -fdump-tree-optimized" }
// { dg-final { scan-tree-dump-not "_0" "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C b/gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C
index 38b17820db..b43ffc33b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-postfix-open-square.C
@@ -1,5 +1,5 @@
// PR c++/51738
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct Index
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-protected.C b/gcc/testsuite/g++.dg/cpp0x/initlist-protected.C
index fb5cc6aa89..5d121634a6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-protected.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-protected.C
@@ -1,5 +1,5 @@
// PR c++/54325
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
class base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-pure.C b/gcc/testsuite/g++.dg/cpp0x/initlist-pure.C
index 63c341c12c..a9dbc90835 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-pure.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-pure.C
@@ -1,5 +1,5 @@
// PR c++/54325
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
class Base {
public:
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-value.C b/gcc/testsuite/g++.dg/cpp0x/initlist-value.C
index 215bb90d4d..ac84266167 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-value.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-value.C
@@ -1,6 +1,5 @@
// Test for value-initialization via {}
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
void * operator new (__SIZE_TYPE__, void *p) { return p; }
void * operator new[] (__SIZE_TYPE__, void *p) { return p; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist-value2.C b/gcc/testsuite/g++.dg/cpp0x/initlist-value2.C
index 2b78241e95..1b4cde769d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist-value2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist-value2.C
@@ -2,8 +2,7 @@
// constructor but defaulted default constructor. The FDIS got this
// wrong; see c++std-core-19883.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist1.C b/gcc/testsuite/g++.dg/cpp0x/initlist1.C
index ff45f7176f..fb8e85b324 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist1.C
@@ -1,6 +1,5 @@
// Basic uses of initializer lists
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist10.C b/gcc/testsuite/g++.dg/cpp0x/initlist10.C
index bf955f513e..80a8837d32 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist10.C
@@ -1,5 +1,5 @@
// PR c++/38380
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
namespace std
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist11.C b/gcc/testsuite/g++.dg/cpp0x/initlist11.C
index 546a5335f1..024466ea86 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist11.C
@@ -1,5 +1,5 @@
// PR c++/38684
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist12.C b/gcc/testsuite/g++.dg/cpp0x/initlist12.C
index f344c780cc..5efdc6711d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist12.C
@@ -1,5 +1,5 @@
// PR c++/38698
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist13.C b/gcc/testsuite/g++.dg/cpp0x/initlist13.C
index bc5ee2c3ae..bba226798e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist13.C
@@ -1,6 +1,5 @@
// PR c++/39056
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
#include <complex>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist14.C b/gcc/testsuite/g++.dg/cpp0x/initlist14.C
index bb67f3e54d..41331c4f69 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist14.C
@@ -1,6 +1,6 @@
// Bug: We weren't doing the normal replacement of array with pointer
// for deduction in the context of a call because of the initializer list.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist15.C b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
index b75cc81729..acd04956b1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist15.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Just discard errors pointing at header files
// { dg-prune-output "include" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist16.C b/gcc/testsuite/g++.dg/cpp0x/initlist16.C
index 86a0039605..9132bd2162 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist16.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist17.C b/gcc/testsuite/g++.dg/cpp0x/initlist17.C
index 6ea08d1500..6ff468989e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist17.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
void f(int i);
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist18.C b/gcc/testsuite/g++.dg/cpp0x/initlist18.C
index c9a9bcd941..bcf90c83a0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist18.C
@@ -1,6 +1,5 @@
// PR c++/40308, 40311
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
template< typename T >
struct test {
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist19.C b/gcc/testsuite/g++.dg/cpp0x/initlist19.C
index 9cb197c9be..ef47d3ec0e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist19.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Allow other errors, too
// { dg-prune-output "error" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist2.C b/gcc/testsuite/g++.dg/cpp0x/initlist2.C
index 2fe4770560..550c8f6465 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist2.C
@@ -1,8 +1,7 @@
// Test that conversion to std::initializer_list takes priority over other
// user-defined conversions.
-// { dg-do link }
-// { dg-options "-std=c++0x" }
+// { dg-do link { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist20.C b/gcc/testsuite/g++.dg/cpp0x/initlist20.C
index fcdb73f190..0ee37e5864 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist20.C
@@ -1,5 +1,5 @@
// PR c++/40689
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist21.C b/gcc/testsuite/g++.dg/cpp0x/initlist21.C
index 9412a08517..6492b2664e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist21.C
@@ -1,5 +1,5 @@
// PR c++/40689
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class X
{
@@ -12,7 +12,6 @@ class X
int f(int n)
{
const float * pData = new const float[1] { 1.5, 2.5 }; // { dg-error "too many initializers" }
- pData = new const float[n] { 1.5, 2.5 }; // { dg-warning "array size" }
return 0;
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist22.C b/gcc/testsuite/g++.dg/cpp0x/initlist22.C
index 0855b59d5d..0cbfe24a4a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist22.C
@@ -1,5 +1,5 @@
-// Core issue 934
-// { dg-options "-std=c++0x" }
+// Core issue 934/1288
+// { dg-do compile { target c++11 } }
int i;
@@ -13,12 +13,12 @@ struct A { int i; } a;
A& r5 { i }; // { dg-error "" } reference to temporary
A&& r6 { i }; // OK, aggregate initialization of temporary
-A& r7 { a }; // { dg-error "" } invalid aggregate initializer for A
-A&& r8 { a }; // { dg-error "" } invalid aggregate initializer for A
+A& r7 { a }; // OK, direct-initialization
+A&& r8 { a }; // { dg-error "lvalue" } binding && to lvalue
struct B { B(int); int i; } b(0);
B& r9 { i }; // { dg-error "" } reference to temporary
B&& r10 { i }; // OK, make temporary with B(int) constructor
-B& r11 { b }; // { dg-error "" } reference to temporary
-B&& r12 { b }; // OK, make temporary with copy constructor
+B& r11 { b }; // OK, direct-initialization
+B&& r12 { b }; // { dg-error "lvalue" } binding && to lvalue
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist23.C b/gcc/testsuite/g++.dg/cpp0x/initlist23.C
index 48a997fca2..7e73df06e1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist23.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist24.C b/gcc/testsuite/g++.dg/cpp0x/initlist24.C
index 33e97c7dfb..d88574436b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist24.C
@@ -1,5 +1,5 @@
// PR c++/39923
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist25.C b/gcc/testsuite/g++.dg/cpp0x/initlist25.C
index 8e5e0065cf..dd41db1f64 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist25.C
@@ -1,6 +1,5 @@
// PR c++/41754
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <map>
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist26.C b/gcc/testsuite/g++.dg/cpp0x/initlist26.C
index bb28bdbd9b..81d304f0e9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist26.C
@@ -1,6 +1,6 @@
// PR c++/42059
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" { target { ! c++1y } } }
void
foo (int i)
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist27.C b/gcc/testsuite/g++.dg/cpp0x/initlist27.C
index f8536d3e7e..8567119c98 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist27.C
@@ -1,5 +1,4 @@
// PR c++/42061
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int& i = { j }; // { dg-error "invalid initialization|was not declared" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist28.C b/gcc/testsuite/g++.dg/cpp0x/initlist28.C
index d1df7cb004..3bf995ad23 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist28.C
@@ -1,5 +1,5 @@
// PR c++/42060
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist29.C b/gcc/testsuite/g++.dg/cpp0x/initlist29.C
index 1568678e0d..9174164aa4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist29.C
@@ -1,5 +1,5 @@
// PR c++/42331
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class Mesh
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist3.C b/gcc/testsuite/g++.dg/cpp0x/initlist3.C
index 412deb5112..e62e0cc337 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist30.C b/gcc/testsuite/g++.dg/cpp0x/initlist30.C
index a5bdb2eda9..eb78f3c1cd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist30.C
@@ -1,5 +1,5 @@
// Testcase for variadic init list deduction.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist31.C b/gcc/testsuite/g++.dg/cpp0x/initlist31.C
index ffc985567e..f34a0ca18a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist31.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist31.C
@@ -1,5 +1,5 @@
// PR c++/43028
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist32.C b/gcc/testsuite/g++.dg/cpp0x/initlist32.C
index 78bbb5ef99..c5c02fc63d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist32.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist32.C
@@ -1,5 +1,5 @@
// Test that we try normal init if no list ctor is viable.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist33.C b/gcc/testsuite/g++.dg/cpp0x/initlist33.C
index b1c0ba09b5..9ab4b55d31 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist33.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist33.C
@@ -1,5 +1,5 @@
// PR c++/44045
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist34.C b/gcc/testsuite/g++.dg/cpp0x/initlist34.C
index 92f5a3a460..335a7dab8e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist34.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist34.C
@@ -1,5 +1,5 @@
// PR c++/44157
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist35.C b/gcc/testsuite/g++.dg/cpp0x/initlist35.C
index e5b7cb4bd5..f8b824d456 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist35.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist35.C
@@ -1,5 +1,5 @@
// PR c++/41510
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct B
{
@@ -14,11 +14,11 @@ struct A
void f()
{
A a = { 1, 2 };
-};
+}
template <class T> void g()
{
A a = { 1, 2 };
-};
+}
template void g<int>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist36.C b/gcc/testsuite/g++.dg/cpp0x/initlist36.C
index a703b45907..2a2b208165 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist36.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist36.C
@@ -1,5 +1,5 @@
// PR c++/44358
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist37.C b/gcc/testsuite/g++.dg/cpp0x/initlist37.C
index 20c6ab6311..dfe6d4a4e4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist37.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist37.C
@@ -1,5 +1,5 @@
// DR 990
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist38.C b/gcc/testsuite/g++.dg/cpp0x/initlist38.C
index 32e20d591c..816f94cf22 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist38.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist38.C
@@ -1,5 +1,5 @@
// DR 990
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist39.C b/gcc/testsuite/g++.dg/cpp0x/initlist39.C
index a6dd1ec43d..169c063a39 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist39.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist39.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { int i; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist4.C b/gcc/testsuite/g++.dg/cpp0x/initlist4.C
index d1ffab8546..22e6b456a7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist4.C
@@ -1,5 +1,5 @@
// Test for initializer-list 'explicit' rule
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist40.C b/gcc/testsuite/g++.dg/cpp0x/initlist40.C
index f2703602c9..6e6a11a645 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist40.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist40.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x" }
+// PR c++/54835, DR 1518
+// { dg-do compile { target c++11 } }
struct A
{
@@ -7,6 +8,6 @@ struct A
int main()
{
- A a1 = { };
+ A a1 = { }; // { dg-error "explicit" }
A a2 = { 24 }; // { dg-error "explicit" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist41.C b/gcc/testsuite/g++.dg/cpp0x/initlist41.C
index b5385480c8..7ae4928f2b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist41.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist41.C
@@ -1,5 +1,5 @@
// PR c++/44703
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist42.C b/gcc/testsuite/g++.dg/cpp0x/initlist42.C
index e63959deb2..fcd71cc766 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist42.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist42.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum Unscoped { };
enum class Scoped { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist43.C b/gcc/testsuite/g++.dg/cpp0x/initlist43.C
index 72a09bdea4..1cae23a432 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist43.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist43.C
@@ -1,5 +1,5 @@
// Test that using T{} at file scope doesn't create a static temporary.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler-not "local" } }
struct A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist44.C b/gcc/testsuite/g++.dg/cpp0x/initlist44.C
index fbe0ea3fef..609e07b721 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist44.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist44.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist45.C b/gcc/testsuite/g++.dg/cpp0x/initlist45.C
index 0e34bc1897..31bd18d993 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist45.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist45.C
@@ -1,5 +1,5 @@
// PR c++/46289
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist46.C b/gcc/testsuite/g++.dg/cpp0x/initlist46.C
index 2b9f07dbdc..39a3b5ebd9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist46.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist46.C
@@ -1,6 +1,6 @@
// PR c++/48281
-// { dg-options "-std=c++0x -O2" }
-// { dg-do run }
+// { dg-options "-O2" }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist47.C b/gcc/testsuite/g++.dg/cpp0x/initlist47.C
index b76fb58361..0b34ff91c0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist47.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist47.C
@@ -1,6 +1,6 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
-struct A { ~A() = delete; }; // { dg-error "declared" }
+struct A { ~A() = delete; }; // { dg-message "declared" }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist48.C b/gcc/testsuite/g++.dg/cpp0x/initlist48.C
index 9eb451a827..7a79c67766 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist48.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist48.C
@@ -1,5 +1,5 @@
// PR c++/48726
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <memory>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist49.C b/gcc/testsuite/g++.dg/cpp0x/initlist49.C
index 752c4331af..0fa4e3f334 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist49.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist49.C
@@ -1,6 +1,5 @@
// Test for non-trivial list-initialization with array new.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist5.C b/gcc/testsuite/g++.dg/cpp0x/initlist5.C
index 51345c73fc..5f253ca482 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist5.C
@@ -1,5 +1,5 @@
// Test for narrowing diagnostics
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist50.C b/gcc/testsuite/g++.dg/cpp0x/initlist50.C
index 5cb23e2db3..41fb03ba00 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist50.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist50.C
@@ -1,5 +1,5 @@
// PR c++/45418
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A1 { };
struct A2 {
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist51.C b/gcc/testsuite/g++.dg/cpp0x/initlist51.C
index 9163dd3a86..9fd750df24 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist51.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist51.C
@@ -1,5 +1,5 @@
// PR c++/47184
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist52.C b/gcc/testsuite/g++.dg/cpp0x/initlist52.C
index 17c0cfe3f1..3ca8781060 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist52.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist52.C
@@ -1,5 +1,5 @@
// PR c++/45378
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist53.C b/gcc/testsuite/g++.dg/cpp0x/initlist53.C
index 22633f9095..998e4c81d6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist53.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist53.C
@@ -1,6 +1,5 @@
// PR c++/49216
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <initializer_list>
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist54.C b/gcc/testsuite/g++.dg/cpp0x/initlist54.C
index cdb296133f..52a8ff94d9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist54.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist54.C
@@ -1,5 +1,5 @@
// PR c++/49355
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist55.C b/gcc/testsuite/g++.dg/cpp0x/initlist55.C
index cb42e81ed6..a40edd3e61 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist55.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist55.C
@@ -1,5 +1,6 @@
// Test for -Wno-narrowing
-// { dg-options "-std=c++0x -pedantic-errors -Wno-narrowing" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic-errors -Wno-narrowing" }
int i;
float d = { i };
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist56.C b/gcc/testsuite/g++.dg/cpp0x/initlist56.C
index 862b41bb3c..5339dbfa40 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist56.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist56.C
@@ -1,5 +1,5 @@
// PR c++/47453
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
// invalid
int a({0}); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist57.C b/gcc/testsuite/g++.dg/cpp0x/initlist57.C
index d945a46898..5c59f403d7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist57.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist57.C
@@ -1,5 +1,5 @@
// PR c++/50054
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void g( const int& (a)[1] ) {} // { dg-error "array of references" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist58.C b/gcc/testsuite/g++.dg/cpp0x/initlist58.C
index dfb9f0cd50..aab21e35d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist58.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist58.C
@@ -1,5 +1,5 @@
// PR c++/50209
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S { int i,j; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist59.C b/gcc/testsuite/g++.dg/cpp0x/initlist59.C
index 2cc015d1fe..6371c16502 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist59.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist59.C
@@ -1,5 +1,5 @@
// PR c++/49996
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist6.C b/gcc/testsuite/g++.dg/cpp0x/initlist6.C
index 523570315e..3d02960b96 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist6.C
@@ -1,6 +1,5 @@
// Test for initlist lifetime
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist62.C b/gcc/testsuite/g++.dg/cpp0x/initlist62.C
index cabbcd1db4..d739ea3929 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist62.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist62.C
@@ -1,5 +1,5 @@
// PR c++/51399
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist63.C b/gcc/testsuite/g++.dg/cpp0x/initlist63.C
index a72c0ab992..00940479af 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist63.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist63.C
@@ -1,5 +1,5 @@
// Origin PR c++/51475
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
@@ -13,4 +13,4 @@ struct B
const std::initializer_list<A>& x;
};
-B b = {{1}}; // { dg-error "invalid conversion|cannot convert" }
+B b = {{1}}; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist64.C b/gcc/testsuite/g++.dg/cpp0x/initlist64.C
index bcf1658074..78e5308598 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist64.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist64.C
@@ -1,5 +1,5 @@
// PR c++/51553
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist65.C b/gcc/testsuite/g++.dg/cpp0x/initlist65.C
new file mode 100644
index 0000000000..061734f36a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist65.C
@@ -0,0 +1,9 @@
+// Core 1270
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i[2];
+};
+
+A f() { return {1,2}; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist66.C b/gcc/testsuite/g++.dg/cpp0x/initlist66.C
new file mode 100644
index 0000000000..4fc162e10f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist66.C
@@ -0,0 +1,29 @@
+// PR c++/52510
+// { dg-do compile { target c++11 } }
+
+typedef unsigned char uint8_t;
+typedef unsigned short uint16_t;
+typedef unsigned int uint32_t;
+typedef unsigned long long uint64_t;
+typedef uint64_t upad64_t;
+
+typedef struct _pthread_cond {
+ struct {
+ uint8_t __pthread_cond_flag[4];
+ uint16_t __pthread_cond_type;
+ uint16_t __pthread_cond_magic;
+ } __pthread_cond_flags;
+ upad64_t __pthread_cond_data;
+} pthread_cond_t;
+
+class gtm_rwlock
+{
+ pthread_cond_t c_readers;
+ public:
+ gtm_rwlock();
+};
+
+gtm_rwlock::gtm_rwlock()
+ : c_readers ({{{0, 0, 0, 0}, 0, 0x4356}, 0})
+{ }
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist67.C b/gcc/testsuite/g++.dg/cpp0x/initlist67.C
new file mode 100644
index 0000000000..491d4cf063
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist67.C
@@ -0,0 +1,27 @@
+// PR c++/50478
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+namespace std
+{
+ template<typename _Key>
+ struct set
+ {
+ void insert(const _Key&);
+ void insert(initializer_list<_Key>);
+ };
+
+ struct string
+ {
+ string(const string&, __SIZE_TYPE__, __SIZE_TYPE__ = -1);
+ string(const char*);
+ string(initializer_list<char>);
+ };
+}
+
+int main()
+{
+ std::set<std::string> s;
+ s.insert( { "abc", "def", "hij"} );
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist68.C b/gcc/testsuite/g++.dg/cpp0x/initlist68.C
new file mode 100644
index 0000000000..7cfe1a34be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist68.C
@@ -0,0 +1,20 @@
+// PR c++/56772
+// { dg-require-effective-target c++11 }
+
+typedef __SIZE_TYPE__ size_t;
+void* operator new[](size_t, void *p) { return p; }
+template <typename T = size_t>
+void f ()
+{
+ size_t coord [2][2];
+ new (&coord) size_t [2][2]
+ {
+ {0,0},
+ {0,0},
+ };
+}
+
+int main ()
+{
+ f<>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist69.C b/gcc/testsuite/g++.dg/cpp0x/initlist69.C
new file mode 100644
index 0000000000..5d59dfeaa1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist69.C
@@ -0,0 +1,29 @@
+// PR c++/50261
+// { dg-require-effective-target c++11 }
+
+template <typename T>
+struct ca {
+ T elem[1];
+
+ ca(const T (&s)[1]): elem{{s}} { } // { dg-error "braces" }
+ ca(const T (&s)[1],int): elem({{s}}) { } // { dg-error "paren|invalid" }
+ ca(const T (&s)[1],char): elem(s) { } // { dg-error "array" }
+ ca(const T (&s)[1],double): elem{s} { } // { dg-error "invalid" }
+
+ ca(const T &v): elem{{v}} { } // { dg-error "braces" }
+ ca(const T &v,int): elem{{{v}}} { } // { dg-error "braces" }
+ ca(const T &v,char): elem{v} { } // OK
+ ca(const T &v,double): elem({v}) { } // { dg-error "paren" }
+};
+
+int main() {
+ int a[1] = {0};
+ ca<int> d(a);
+ ca<int> d1(a,1);
+ ca<int> d2(a,'2');
+ ca<int> d3(a,3.0);
+ ca<int> e(a[0]);
+ ca<int> e1(a[0],1);
+ ca<int> e2(a[0],'2');
+ ca<int> e3(a[0],3.0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist7.C b/gcc/testsuite/g++.dg/cpp0x/initlist7.C
index 55a0371860..7dbbf2d220 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist7.C
@@ -1,5 +1,5 @@
// PR c++/37932
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
typedef enum { AA=1, BB=2 } my_enum;
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist70.C b/gcc/testsuite/g++.dg/cpp0x/initlist70.C
new file mode 100644
index 0000000000..f215b9d793
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist70.C
@@ -0,0 +1,27 @@
+// PR c++/57196
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+template<class T>
+struct set {
+ set() = default;
+ set(std::initializer_list<T>){}
+};
+
+struct string {
+ string(const char*){}
+ ~string(){}
+};
+
+typedef decltype(sizeof(0)) size_t;
+
+template <size_t> struct EqHelper { };
+
+int IsNullLiteralHelper(...);
+
+void Fn() {
+ EqHelper<sizeof IsNullLiteralHelper(set<int>{1})> eq1; // ok
+ EqHelper<sizeof IsNullLiteralHelper(set<string>())> eq2; // ok
+ EqHelper<sizeof IsNullLiteralHelper(set<string>{"foo"})> eq3; // error
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist71.C b/gcc/testsuite/g++.dg/cpp0x/initlist71.C
new file mode 100644
index 0000000000..1d143906db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist71.C
@@ -0,0 +1,10 @@
+// PR c++/56930
+// { dg-require-effective-target c++11 }
+// { dg-options -Wconversion }
+
+int main()
+{
+ int x = sizeof(int);
+ int y { sizeof(int) };
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist72.C b/gcc/testsuite/g++.dg/cpp0x/initlist72.C
new file mode 100644
index 0000000000..98fc79f1d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist72.C
@@ -0,0 +1,22 @@
+// DR 1589
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+struct Pair
+{
+ Pair(const char *, const char *);
+};
+
+struct String
+{
+ String(const char *);
+};
+
+void f1(int); // #1
+int f1(std::initializer_list<long>); // #2
+int g1() { return f1({42}); } // chooses #2
+
+void f2(Pair); // #3
+int f2(std::initializer_list<String>); // #4
+int g2() { return f2({"foo","bar"}); } // chooses #4
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist73.C b/gcc/testsuite/g++.dg/cpp0x/initlist73.C
new file mode 100644
index 0000000000..de9748d8b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist73.C
@@ -0,0 +1,13 @@
+// PR c++/57682
+// { dg-do compile { target c++11 } }
+
+struct Class
+{
+ Class (int func)
+ try
+ : f { func } { }
+ catch ( ... ) { }
+
+private:
+ int f;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist74.C b/gcc/testsuite/g++.dg/cpp0x/initlist74.C
new file mode 100644
index 0000000000..4305b59a0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist74.C
@@ -0,0 +1,7 @@
+// Core 1591
+// { dg-require-effective-target c++11 }
+
+template<class T, int N> void g(T const (&)[N]);
+void f() {
+ g( { 1, 2, 3, 4 } );
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist75.C b/gcc/testsuite/g++.dg/cpp0x/initlist75.C
new file mode 100644
index 0000000000..f185401c20
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist75.C
@@ -0,0 +1,6 @@
+// PR c++/59080
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+auto foo[] = {}; // { dg-error "auto|unable to deduce" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist76.C b/gcc/testsuite/g++.dg/cpp0x/initlist76.C
new file mode 100644
index 0000000000..ac419dde8c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist76.C
@@ -0,0 +1,5 @@
+// PR c++/58812
+// { dg-require-effective-target c++11 }
+
+int i;
+int&& j{{ i }}; // { dg-error "too many braces" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist77.C b/gcc/testsuite/g++.dg/cpp0x/initlist77.C
new file mode 100644
index 0000000000..49b9079fb4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist77.C
@@ -0,0 +1,10 @@
+// PR c++/58651
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int i;
+ A(int j) : i{{j}} {} // { dg-error "too many braces" }
+};
+
+A a(0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist78.C b/gcc/testsuite/g++.dg/cpp0x/initlist78.C
new file mode 100644
index 0000000000..648ec5307d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist78.C
@@ -0,0 +1,12 @@
+// PR c++/58639
+// { dg-require-effective-target c++11 }
+
+struct node {
+ node &parent;
+};
+
+struct vector {
+ node n;
+};
+
+vector v({}); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist79.C b/gcc/testsuite/g++.dg/cpp0x/initlist79.C
new file mode 100644
index 0000000000..5a1914dda6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist79.C
@@ -0,0 +1,8 @@
+// PR c++/59646
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+struct A {};
+
+std::initializer_list<volatile A> x = {{}};
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist8.C b/gcc/testsuite/g++.dg/cpp0x/initlist8.C
index db63eee78b..ca0bc464ff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist8.C
@@ -1,5 +1,5 @@
// PR c++/37740
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist80.C b/gcc/testsuite/g++.dg/cpp0x/initlist80.C
new file mode 100644
index 0000000000..7947f1f819
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist80.C
@@ -0,0 +1,6 @@
+// PR c++/60051
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+auto x[2] = {}; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist81.C b/gcc/testsuite/g++.dg/cpp0x/initlist81.C
new file mode 100644
index 0000000000..5978c63889
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist81.C
@@ -0,0 +1,25 @@
+// PR c++/60713
+// { dg-options "-O" }
+// { dg-do compile { target c++11 } }
+
+template < class x0, class x1, class x2, class x3, class x4 >
+int *x5 (x0 *, x2 (x1::*)(x3, x4));
+
+class x6
+{
+ void x7 ();
+ struct x8
+ {
+ int *x9;
+ };
+ void x10 (x8);
+ void x11 (int *, int *);
+};
+
+void
+x6::x7 ()
+{
+ x10 ({
+ x5 (this, &x6::x11)
+ });
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist82.C b/gcc/testsuite/g++.dg/cpp0x/initlist82.C
new file mode 100644
index 0000000000..3b9ccad666
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist82.C
@@ -0,0 +1,20 @@
+// PR c++/60708
+// { dg-do compile { target c++11 } }
+
+template <class T, class U> struct mypair {
+ mypair(T, U) {}
+};
+
+template<typename T> struct S {
+ mypair<T *, int> get_pair() noexcept {
+ return mypair<T*,int>(nullptr, 0);
+ }
+};
+
+static void foo(const mypair<char *, int> (&a)[2]) noexcept { }
+
+int main()
+{
+ S<char> s;
+ foo({s.get_pair(), s.get_pair()});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist84.C b/gcc/testsuite/g++.dg/cpp0x/initlist84.C
new file mode 100644
index 0000000000..4d46746c52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist84.C
@@ -0,0 +1,17 @@
+// PR c++/61242
+// { dg-do compile { target c++11 } }
+
+struct Foo
+{
+ struct A
+ {
+ const int &container;
+ const int &args;
+ };
+ static void Create (const A &);
+};
+
+int main ()
+{
+ Foo::Create ({{}, {}});
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist86.C b/gcc/testsuite/g++.dg/cpp0x/initlist86.C
new file mode 100644
index 0000000000..ace2ef9287
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist86.C
@@ -0,0 +1,18 @@
+// PR c++/61382
+// { dg-do run { target c++11 } }
+
+struct A
+{
+ int i,j;
+ A(int i,int j):i(i),j(j){}
+};
+
+extern "C" int printf (const char *, ...);
+
+int main()
+{
+ int i = 0;
+ A a{i++,i++};
+ if (a.i != 0 || a.j != 1)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/initlist9.C b/gcc/testsuite/g++.dg/cpp0x/initlist9.C
index d596b39150..bb6414c622 100644
--- a/gcc/testsuite/g++.dg/cpp0x/initlist9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/initlist9.C
@@ -1,5 +1,5 @@
// PR c++/37860
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct b
{
@@ -8,7 +8,7 @@ struct b
b() = default;
~b() = default;
b& operator=(const b&) = delete;
- b(const b&) = delete; // { dg-error "declared" }
+ b(const b&) = delete; // { dg-message "declared" }
b(bool _t): t (_t) { }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/inline-ns1.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns1.C
index e422d8970f..69813b6ed3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inline-ns1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1Q2V11fEv" } }
// { dg-final { scan-assembler "_ZN1Q2V11iE" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
index 03851725bb..6ad9d65a6f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns2.C
@@ -1,18 +1,18 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace Q {
inline namespace V1 {
- extern int i; // { dg-error "" }
- extern int j; // { dg-error "" }
- void f(); // { dg-error "" }
- void g(); // { dg-error "" }
+ extern int i; // { dg-message "" }
+ extern int j; // { dg-message "" }
+ void f(); // { dg-message "" }
+ void g(); // { dg-message "" }
}
inline namespace V2 {
- extern int j; // { dg-error "" }
- void g(); // { dg-error "" }
+ extern int j; // { dg-message "" }
+ void g(); // { dg-message "" }
}
- extern int i; // { dg-error "" }
- void f(); // { dg-error "" }
+ extern int i; // { dg-message "" }
+ void f(); // { dg-message "" }
void h();
}
namespace R {
diff --git a/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C b/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C
index 7c9d6b9b54..7e24e806e7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/inline-ns3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace C
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/iop.C b/gcc/testsuite/g++.dg/cpp0x/iop.C
index 834cd314ab..0a78be9f5b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/iop.C
+++ b/gcc/testsuite/g++.dg/cpp0x/iop.C
@@ -6,8 +6,8 @@
// See http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2006/n2118.html under the
// section "Revision 1 Summary and Rationale" for more details.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-50220.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-50220.C
index 240143cf65..4da9d46911 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-50220.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-50220.C
@@ -1,5 +1,5 @@
// PR c++/50220
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename Foo> struct Foobar {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C
index 1cc7bb6583..52bb874c5d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-__func__.C
@@ -1,6 +1,5 @@
// PR c++/44160
-// { dg-options -std=c++0x }
-// { dg-do link }
+// { dg-do link { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-anon1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-anon1.C
new file mode 100644
index 0000000000..482193e975
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-anon1.C
@@ -0,0 +1,18 @@
+// DR 1612
+// { dg-require-effective-target c++11 }
+
+int main() {
+ static int result;
+ struct A { int x; };
+ struct B { int y; };
+ union {
+ A a; B b;
+ };
+ a.x = 1;
+ [=]() mutable {
+ a.x = 2; // { dg-error "anonymous union" }
+ result = b.y; // { dg-error "anonymous union" }
+ }();
+ if (result == 1) return 0;
+ throw 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array.C
index 2129051ed7..adb40ed6b7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-array.C
@@ -1,6 +1,5 @@
// Test that array capture by copy works.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C
index b5ba066375..d13e2c0da1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto1.C
@@ -1,5 +1,5 @@
// PR c++/50437
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename T>
void f()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
new file mode 100644
index 0000000000..05fadf5d04
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto2.C
@@ -0,0 +1,16 @@
+// PR c++/56901
+// { dg-require-effective-target c++11 }
+
+template <typename>
+void foo_impl()
+{
+ int data;
+ auto L = [&](){ return data; };
+ [&](){ L(); }();
+ [&L](){ L(); }();
+}
+
+void foo()
+{
+ foo_impl<int>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C
new file mode 100644
index 0000000000..013ed5264e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-auto3.C
@@ -0,0 +1,24 @@
+// PR c++/57526
+// { dg-require-effective-target c++11 }
+
+template<class T>
+struct A
+{
+ void bar( ) { }
+
+ void foo( )
+ {
+ auto* this_ptr = this;
+ auto lc = [&]( )
+ {
+ this_ptr->bar();
+ };
+ lc();
+ }
+};
+
+int main()
+{
+ A<int> a;
+ a.foo();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
index 7d1a1bd89d..9c9632cd51 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
index 704c24085d..16fd0a713a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-const-ref.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-neg.C
index 82cc98423e..3f9da7e466 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-neg.C
@@ -1,5 +1,5 @@
// PR c++/50736
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
int i;
void f();
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-redundancy.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-redundancy.C
index 51e55a7aa4..49fbdf3204 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-redundancy.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-capture-redundancy.C
@@ -1,5 +1,6 @@
// FDIS 5.1.2/8
-// { dg-options "-pedantic-errors -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic-errors" }
struct S2 { void f(int i); };
void S2::f(int i) {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
index 7e7541ca2e..28ea53363a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
index 5f6f0b3dcb..c6150f1745 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
index d2457d6491..884163a291 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const2.C
@@ -1,6 +1,6 @@
// PR c++/52026
-// { dg-options "-std=c++11 -O" }
-// { dg-do run }
+// { dg-options "-O" }
+// { dg-do run { target c++11 } }
template<bool B>
int func() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C
new file mode 100644
index 0000000000..a1ffaddc4a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-const3.C
@@ -0,0 +1,38 @@
+// PR c++/60992
+// { dg-do compile { target c++11 } }
+
+struct ScopeGuardGenerator { };
+
+struct FF
+{
+ template < class F, class ... Ts >
+ void
+ operator () (F & ...)
+ {
+ const int n = sizeof ... (Ts) + 1;
+ void *mutexes[n];
+ auto _on_scope_exit_var_0 =
+ ScopeGuardGenerator () + [&mutexes] { };
+ }
+};
+
+template < class F >
+int operator+ (ScopeGuardGenerator, F) { return 1; }
+
+struct D
+{
+ template < class T0, class T1, class T2, class ... T >
+ void
+ operator () (T0, T1, const T2 & t2, T & ... t)
+ {
+ base (t2, t ...);
+ }
+ FF base;
+};
+
+D run_with_locks;
+
+void Fn ()
+{
+ run_with_locks ([] { }, 0, 0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
index 5409d5ca38..08d8bbfc20 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv.C
@@ -1,6 +1,6 @@
// Test for conversion from stateless lambda to function pointer.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "weak\[^\n\r\]*_?_ZZ1fvENKUlvE_cvPFvvEEv" { target { ! { *-*-darwin* *-*-mingw* *-*-cygwin *-*-hpux10* } } } } }
inline void f()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C
index fc19c9969d..cd4cf7e619 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv2.C
@@ -1,7 +1,6 @@
// Test for conversion from stateless lambda to function pointer.
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
typedef int (*pfn)(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C
index e4e7daffdd..ebc6c14d2c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv3.C
@@ -2,7 +2,7 @@
// work properly for variadics. Make sure that we can still use the lambda
// normally.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void f()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv4.C
index 6584d28b9a..66c09102d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv4.C
@@ -1,5 +1,5 @@
// PR c++/43641
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct B
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv5.C
index 53d8e995ef..f5408a9626 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv5.C
@@ -1,5 +1,5 @@
// PR c++/45080
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef void(*pfn)();
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
index bd90437236..3b3fda9f94 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv6.C
@@ -1,6 +1,5 @@
// PR c++/55015
-// { dg-do link }
-// { dg-options -std=c++11 }
+// { dg-do link { target c++11 } }
typedef void (*VoidFunc)();
inline VoidFunc GetFunc() { return [](){}; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv8.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv8.C
new file mode 100644
index 0000000000..abe272a8b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-conv8.C
@@ -0,0 +1,15 @@
+// PR c++/56447
+// { dg-do compile { target c++11 } }
+
+template <class T>
+void f()
+{
+ int i;
+ // This lambda should not have a conversion op, since it captures i
+ int (*p)() = [=]{ return i; }; // { dg-error "cannot convert" }
+}
+
+int main()
+{
+ f<int>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default-neg.C
index 1af2a95d8a..91f5d621b0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main() {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default.C
index 239a99cbf9..232c56b46e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-default.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
int main() {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-neg.C
index d77e57e631..caffb7f258 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main() {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy.C
index 7356872e1a..6d27d75feb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-copy.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
int main() {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctor-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctor-neg.C
index 76ed7445f4..4a63d000f2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctor-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctor-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void f()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctors.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctors.C
index e263145b01..8dfb2fa6b6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctors.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ctors.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-debug.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-debug.C
index 07fc1896c8..b8b15d01ae 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-debug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-debug.C
@@ -1,5 +1,6 @@
// PR c++/43502
-// { dg-options "-std=c++0x -fcompare-debug" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fcompare-debug" }
void g (int n)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C
new file mode 100644
index 0000000000..b36ca21673
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-decltype1.C
@@ -0,0 +1,22 @@
+// PR c++/59791
+// We force the gimple dump to trigger use of lang_decl_name.
+// { dg-do compile { target c++11 } }
+// { dg-options "-fdump-tree-gimple" }
+// { dg-final { cleanup-tree-dump "gimple" } }
+
+template < class T > void
+f (T t)
+{
+ int i = t;
+ [](int)->decltype (i + t)
+ {
+ return 0;
+ }
+ (0);
+}
+
+void
+foo ()
+{
+ f (0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg.C
index f93e78a27c..88970a9330 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg.C
@@ -1,6 +1,6 @@
// Testcase for DR 975.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
bool b;
struct A { int fn1(); const int& fn2(); };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg2.C
index 5c63409b68..fdbb4e1e37 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext-neg2.C
@@ -1,7 +1,8 @@
// Test that this is accepted even when pedantic now that it's part
// of the standard.
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
bool b;
template <class T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext.C
deleted file mode 100644
index 9b5ab79837..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-ext.C
+++ /dev/null
@@ -1,27 +0,0 @@
-// Testcase for an extension to allow return type deduction when the lambda
-// contains more than just a single return-statement.
-
-// { dg-options -std=c++0x }
-// { dg-do run }
-
-bool b;
-template <class T>
-T f (T t)
-{
- return [=] {
- auto i = t+1;
- if (b)
- return i+1;
- else
- return i+1;
- }();
-}
-
-int main()
-{
- // Pointless, but well-formed.
- [] { return 1; return 2; }();
-
- if (f(1) != 3)
- return 1;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
index c932c09db3..6ada75756c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main() {
int i = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
index cc5cc54021..b0e2d9fbab 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C
index eeb9814a05..5cf016cb90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-deduce2.C
@@ -1,5 +1,5 @@
// PR c++/43875
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void f();
void f(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg.C
index 069935823e..cefa24d434 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg2.C
index f47c5ba27a..35104c392a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg2.C
@@ -1,5 +1,5 @@
// PR c++/43886
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void f2() {
int i = 1;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
new file mode 100644
index 0000000000..1c59393013
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg3.C
@@ -0,0 +1,19 @@
+// PR c++/55223
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
+// { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE4testES_Ed_UliE_EET_" } }
+
+struct function
+{
+ template <class U> function(U u) { }
+};
+
+template<typename T> struct C
+{
+ static T test(function f = [](int i){return i;}) { }
+};
+
+int main()
+{
+ C<int>::test();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg4.C
new file mode 100644
index 0000000000..2217954596
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg4.C
@@ -0,0 +1,8 @@
+// PR c++/54764
+// { dg-require-effective-target c++11 }
+
+template<class T = void>
+struct c
+{
+ int (*f)(int) = [](int i){return i + i;};
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C
new file mode 100644
index 0000000000..d85918dd07
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-defarg5.C
@@ -0,0 +1,30 @@
+// PR c++/58083
+// { dg-do compile { target c++11 } }
+
+namespace details {
+struct iterator_concept_checker
+{
+ typedef char yes_type;
+ typedef char (&no_type)[2];
+
+ template <typename T>
+ static no_type test(...);
+
+ template <typename T>
+ static yes_type test(
+ int*
+ , void (*)(T) = [](T it)
+ {
+ auto copy = T{it}; // copy constructible
+ copy = it; // copy assignable
+ copy.~T(); // destroyable
+ ++it; // incrementable
+ }
+ );
+};
+}
+
+int main()
+{
+ details::iterator_concept_checker::test<int>(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-diag1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-diag1.C
new file mode 100644
index 0000000000..dc1043b3fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-diag1.C
@@ -0,0 +1,8 @@
+// { dg-require-effective-target c++11 }
+
+int main()
+{
+ int x;
+ auto f = [x]{ };
+ f.__x.foo; // { dg-error "<lambda\\(\\)>::<x capture>" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-direct-init.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-direct-init.C
index bbc2a1ca52..7cc3f8f670 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-direct-init.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-direct-init.C
@@ -1,5 +1,5 @@
// Test that capture by copy uses direct-initialization.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C
index ea5060d1a3..7516fe0fe0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh.C
@@ -1,9 +1,9 @@
// Test that we properly clean up if we get an exception in the middle of
// constructing the closure object.
-// { dg-options -std=c++0x }
// This test fails because of PR 41449; it isn't a lambda issue.
// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++11 }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
index 0c94b554f8..1ef510a484 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh2.C
@@ -1,7 +1,7 @@
// PR c++/47263
// PR c++/49260
-// { dg-options "-std=c++0x -fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm" }
-// { dg-do run }
+// { dg-options "-fno-asynchronous-unwind-tables -fno-dwarf2-cfi-asm" }
+// { dg-do run { target c++11 } }
#include <exception>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C
new file mode 100644
index 0000000000..10dc6e36d2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-eh3.C
@@ -0,0 +1,14 @@
+// PR c++/56388
+// { dg-require-effective-target c++11 }
+
+int main()
+{
+ bool /*const*/ condition = false;
+
+ [&]{
+ try{}
+ catch(...){
+ if(condition){}
+ }
+ }();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C
index ebf0cbd078..932ff1bee9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err1.C
@@ -4,5 +4,5 @@
void foo()
{
int x[1];
- [x]{} = 0; // { dg-error "lambda closure" }
+ [x]{} = 0; // { dg-error "lambda" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C
new file mode 100644
index 0000000000..aaa80f4700
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err2.C
@@ -0,0 +1,12 @@
+// PR c++/53158
+// { dg-do compile { target c++11 } }
+
+int main()
+{
+ auto a = []() { return true; };
+ auto b = []() { return a(); }; // { dg-error "'a' is not captured" }
+ int c, d;
+ while (b() && c < d) // { dg-error "could not convert" }
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err3.C
new file mode 100644
index 0000000000..fec01acb6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-err3.C
@@ -0,0 +1,10 @@
+// PR c++/51412
+// { dg-do compile { target c++11 } }
+
+void foo(int);
+
+template<int> void bar()
+{
+ foo([]{}...); // { dg-error "<lambda>" }
+ foo([]{}=0 ...); // { dg-error "<lambda>" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
index f4766691ee..3dc7f8774c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc.C
@@ -1,11 +1,11 @@
// Test that error messages about creating the closure object refer to
// the lambda-introducer.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
A();
- A(const A& a) = delete; // { dg-error "declared" }
+ A(const A& a) = delete; // { dg-message "declared" }
};
int main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
index f94d64ec0e..4ddd38cc4e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-errloc2.C
@@ -1,9 +1,9 @@
// PR c++/42399
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {
A();
- A(const A&) = delete; // { dg-error "declared" }
+ A(const A&) = delete; // { dg-message "declared" }
};
template <class T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-field-names.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-field-names.C
index b292d88980..1c5cfdbd8e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-field-names.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-field-names.C
@@ -2,7 +2,7 @@
// declared in the closure type" -- test that there isn't a member of the
// closure with the same name as the captured variable.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct A: public T
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-for.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-for.C
index f161da8577..0123034e09 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-for.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-for.C
@@ -1,5 +1,6 @@
// PR c++/50114
-// { dg-options "-std=c++0x -w" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-w" }
int open()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice1.C
index 1ea8f4d7b5..e4a11eaf66 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice1.C
@@ -1,5 +1,5 @@
// PR c++/43790
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
new file mode 100644
index 0000000000..1ea59c21c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice10.C
@@ -0,0 +1,8 @@
+// PR c++/58568
+// { dg-do compile { target c++11 } }
+
+template<int> struct A
+{
+ static const int i;
+ template<int N> const int A<N>::i = []{ return 0; }(); // { dg-error "invalid use" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice11.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice11.C
new file mode 100644
index 0000000000..58f0fa35a3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice11.C
@@ -0,0 +1,12 @@
+// PR c++/60252
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int i; // { dg-message "" }
+
+ void foo()
+ {
+ [&](){ [&](int[i]){}; }; // { dg-error "" }
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice12.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice12.C
new file mode 100644
index 0000000000..d18aadfbd3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice12.C
@@ -0,0 +1,15 @@
+// PR c++/54250
+// { dg-do compile { target c++11 } }
+
+struct T
+{
+ int a;
+ int foo()
+ {
+ return [&]()->int {
+ return [&](decltype(/*this->*/a) _)->int {
+ return 1;
+ }(a);
+ }();
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
index 6468f18a0a..6a31e0a36f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice2.C
@@ -1,5 +1,5 @@
// PR c++/42083
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename F>
decltype(F()) run(F f) // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
index 8ff36478d5..03a7a4bb60 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice3.C
@@ -1,5 +1,5 @@
// PR c++/47795
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class Klass
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice4.C
index 77c773bbdb..8c08e909a7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice4.C
@@ -1,5 +1,5 @@
// PR c++/47242
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template < typename > void
bar ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice5.C
index 305db812d8..914e0f71e0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice5.C
@@ -1,5 +1,5 @@
// PR c++/51227
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> int foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C
index ddf352766e..408af4203b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice6.C
@@ -1,4 +1,4 @@
// PR c++/51464
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int = sizeof([])> struct A {}; // { dg-error "lambda" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
index 946377e550..d0ee866110 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice7.C
@@ -1,5 +1,5 @@
// PR c++/52487
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A; // { dg-error "forward declaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice8.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice8.C
new file mode 100644
index 0000000000..00078d53b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice8.C
@@ -0,0 +1,10 @@
+// PR c++/51422
+// { dg-do compile { target c++11 } }
+
+template<typename> struct A {};
+
+void foo()
+{
+ [i] { A<decltype(i)>(); }; // { dg-error "not declared|invalid" }
+ [i] { A<decltype(i)>(); }; // { dg-error "invalid" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C
new file mode 100644
index 0000000000..0a88bc8752
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ice9.C
@@ -0,0 +1,18 @@
+// PR c++/53741
+// { dg-do compile { target c++11 } }
+
+struct X
+{
+ template <class T> static void bar() {}
+
+ template <class T> void foo(T p)
+ {
+ [&] { bar<T>(); };
+ }
+};
+
+int main()
+{
+ X x;
+ x.foo(3);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
index a93857e46a..92a165d95b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
index 33f4301e44..92981109fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-in-class.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-init.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-init.C
deleted file mode 100644
index 03c94e9598..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-init.C
+++ /dev/null
@@ -1,8 +0,0 @@
-// Test for the explicit initializer extension
-// { dg-options "-std=c++0x" }
-
-int main()
-{
- int j = [i = 2]{sizeof(i); return i;}();
- return (j != 2);
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist1.C
index 078ebaee18..029576eabd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist1.C
@@ -1,5 +1,5 @@
// PR c++/50863
-// { dg-options -std=gnu++0x }
+// { dg-do compile { target c++11 } }
struct T {
template<typename F>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
index daaa33938a..3c25f0eb97 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist2.C
@@ -1,5 +1,5 @@
// PR c++/54947
-// { dg-options -std=gnu++11 }
+// { dg-do compile { target c++11 } }
struct X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist3.C
new file mode 100644
index 0000000000..f7b82efe97
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-initlist3.C
@@ -0,0 +1,11 @@
+// PR c++/56567
+// { dg-require-effective-target c++11 }
+
+#include <initializer_list>
+
+int main()
+{
+ []{ return { 1, 2 }; }(); // { dg-error "initializer.list" }
+}
+
+// { dg-prune-output "return-statement with a value" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-intname.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-intname.C
new file mode 100644
index 0000000000..4c268c6782
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-intname.C
@@ -0,0 +1,6 @@
+// PR c++/54420
+
+class __lambda
+{
+ virtual bool is_sub ();
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-lookup-neg.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-lookup-neg.C
index e07e892a1a..a952526a17 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-lookup-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-lookup-neg.C
@@ -1,5 +1,5 @@
// Test that we don't crash on a failed lookup.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
index 5c9b483d3a..220817a733 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle.C
@@ -1,6 +1,7 @@
// Test lambda mangling
// { dg-require-weak "" }
-// { dg-options "-std=c++0x -fno-inline" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-inline" }
template<typename F> int algo(F fn) { return fn(); }
inline void g(int n) {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C
index 4b7d15ad95..54309a9dd9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle2.C
@@ -1,6 +1,5 @@
// PR c++/49276
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <int N>
struct F
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
index 06913a1c1a..5f17a21cac 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle3.C
@@ -1,5 +1,5 @@
// PR c++/51818
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_ZN1AC1IN3foo3barMUlvE_EEET_" } }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C
new file mode 100644
index 0000000000..0d37637fe9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mangle4.C
@@ -0,0 +1,13 @@
+// PR c++/54538
+// { dg-do compile { target c++11 } }
+
+template <class T>
+struct A
+{
+ // { dg-final { scan-assembler "_ZNK1AIcE1pMUlvE_cvPFvvEEv" } }
+ // { dg-final { scan-assembler "_ZNK1AIiE1pMUlvE_cvPFvvEEv" } }
+ void (*p)() = []{};
+};
+
+A<int> a1;
+A<char> a2;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
index ed0565fa9c..d3f434195e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mixed.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
index 73a4d1bac7..2c6b0f2064 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable2.C
new file mode 100644
index 0000000000..c54ff5c841
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-mutable2.C
@@ -0,0 +1,23 @@
+// PR c++/55532
+// { dg-do compile { target c++11 } }
+
+struct Foo {
+ void doit() {
+ }
+};
+
+template<typename T>
+void oops(Foo &foo, const T &) {
+ auto fun = [&] () mutable {
+ foo.doit();
+ };
+ auto fun2 = [=]() {
+ fun(); // { dg-error "" }
+ };
+ fun2();
+}
+
+int main() {
+ Foo foo;
+ oops(foo, 1);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
new file mode 100644
index 0000000000..a09af89ce4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
@@ -0,0 +1,10 @@
+// PR c++/56710
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
+
+int main()
+{
+ int t = 0;
+ return [&]() -> int {int __t; __t = t; return __t; }();
+ return [&t]() -> int {int __t; __t = t; return __t; }();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
index feb0cde597..c8ea46a980 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested2.C
index b788748559..9e509513ad 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested2.C
@@ -1,5 +1,5 @@
// Testcase from N2998
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void f1(int i) {
int const N = 20;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested3.C
index 2cc6f96408..f7894fb408 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested3.C
@@ -1,5 +1,5 @@
// PR c++/41896
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void nested_lambda()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C
index a5bd1a2f4e..140ed30e4f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nested4.C
@@ -1,5 +1,5 @@
// PR c++/47687
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
index b6489de4b4..b5a335eaf1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-non-const.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
index 74149b2312..4a04cfbfb5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nop.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
int main() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C
index cde0c2e537..4729bb3b30 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ns-scope.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
auto f = [](int i) { return i+1; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C
new file mode 100644
index 0000000000..94dc254fd7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi1.C
@@ -0,0 +1,10 @@
+// PR c++/56464
+// { dg-do run { target c++11 } }
+
+struct bug { bug*a = [&]{ return [=]{return this;}(); }(); };
+int main()
+{
+ bug b;
+ if (b.a != &b)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi2.C
new file mode 100644
index 0000000000..73106d78b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi2.C
@@ -0,0 +1,4 @@
+// PR c++/56565
+// { dg-do compile { target c++11 } }
+
+struct bug { int a; int *b = [&]{ return &a; }(); };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi3.C
new file mode 100644
index 0000000000..da7e0bfed2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi3.C
@@ -0,0 +1,9 @@
+// PR c++/55972
+// { dg-do compile { target c++11 } }
+
+class C
+{
+ void f();
+ int j = 10;
+ int i = [this]() { return this->j; }();
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi4.C
new file mode 100644
index 0000000000..b592f15506
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi4.C
@@ -0,0 +1,14 @@
+// PR c++/51927
+// { dg-do compile { target c++11 } }
+
+struct function
+{
+ template<typename Functor>
+ function(Functor);
+};
+
+struct testee
+{
+ function l1 = []() { };
+ function l2 = [=]() { l1; };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C
new file mode 100644
index 0000000000..1d2778fb5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nsdmi5.C
@@ -0,0 +1,7 @@
+// PR c++/58596
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int i = [] { return decltype(i)(); }();
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
new file mode 100644
index 0000000000..1aadbb490d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-nullptr.C
@@ -0,0 +1,47 @@
+// PR c++/54170
+// { dg-do run { target c++11 } }
+
+#include <cassert>
+
+struct A;
+typedef A* ptr;
+typedef int (A::*pmf) (int);
+typedef int (A::*pdm);
+
+int total;
+
+void add(int n)
+{
+ total += n;
+}
+
+template <typename RType, typename Callable>
+RType Call(Callable native_func, int arg)
+{
+ return native_func(arg);
+}
+
+template <typename RType>
+RType do_test(int delta)
+{
+ return Call<RType>([=](int delta) { add(delta); return nullptr; }, delta);
+}
+
+template <typename RType>
+void test()
+{
+ total = 0;
+ assert (!do_test<RType>(5));
+ assert (total == 5);
+ assert (!do_test<RType>(20));
+ assert (total == 25);
+ assert (!do_test<RType>(-256));
+ assert (total == -231);
+}
+
+int main()
+{
+ test<ptr>();
+ test<pdm>();
+ test<pmf>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
index 9dd64484a4..d904ebee16 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-pass.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
#include <algorithm>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-qualified.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-qualified.C
index ef041c2bb9..40b539a6d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-qualified.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-qualified.C
@@ -1,5 +1,5 @@
// PR c++/50089
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct TestBase
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
index 1a12eab312..cbaeb16201 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-recursive.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
//#include <iostream>
#include <functional>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
index 40376f43db..6b86369dbf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref-default.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
index a5ee7b4c3c..def13fdd67 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C
index 15f1d9034a..49705f502b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-ref2.C
@@ -1,6 +1,5 @@
// PR c++/49598
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
int
main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C
new file mode 100644
index 0000000000..4b353b64c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-return1.C
@@ -0,0 +1,26 @@
+// PR c++/57437
+// { dg-require-effective-target c++11 }
+
+struct A {
+ int i;
+
+ A(): i(42) {}
+ A(const A&) = default;
+ A(A&& a): i(a.i) { a.i = 0; }
+};
+
+int main()
+{
+ A x;
+
+ auto y = [x] () mutable {
+ x.i++;
+ return x;
+ };
+
+ if (y().i != 43)
+ __builtin_abort ();
+
+ if (y().i != 44)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-sfinae1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-sfinae1.C
new file mode 100644
index 0000000000..973f8a7804
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-sfinae1.C
@@ -0,0 +1,55 @@
+// PR c++/56039
+// { dg-do compile { target c++11 } }
+
+template <bool> struct BoolSink { typedef void type; };
+
+template <typename T, typename U>
+struct AddRvalueReferenceImpl { typedef T type; };
+
+template <typename T>
+struct AddRvalueReferenceImpl<T, typename BoolSink<false &&
+ [] {
+ extern T &&tref;
+ }>::type> { // { dg-error "lambda" }
+ typedef T &&type;
+};
+
+template <typename T>
+struct AddRvalueReference : AddRvalueReferenceImpl<T, void> { };
+
+namespace ImplHelpers {
+ template <typename T>
+ typename AddRvalueReference<T>::type create(void) { }
+}
+
+template <typename T, typename U, typename ...Args>
+struct IsConstructibleImpl { enum { value = 0 }; };
+
+template <typename T, typename ...Args>
+struct IsConstructibleImpl<T, typename BoolSink<false &&
+ [] {
+ T t( ::ImplHelpers::create<Args>() ...);
+ }>::type, Args ...> { // { dg-error "lambda" }
+ enum { value = 1 };
+};
+
+template <typename T, typename ...Args>
+struct IsConstructible : IsConstructibleImpl<T, void, Args ...> { };
+
+struct DestroyMe {
+ ~DestroyMe() = delete;
+};
+
+static_assert(+IsConstructible<int>::value, "error");
+static_assert(!IsConstructible<void>::value, "error");
+static_assert(+IsConstructible<int [1]>::value, "error");
+static_assert(!IsConstructible<DestroyMe>::value, "error");
+static_assert(!IsConstructible<int *, char *>::value, "error");
+
+static_assert(+IsConstructible<int &&, int>::value, "error");
+static_assert(!IsConstructible<int &&, int &>::value, "error");
+static_assert(+IsConstructible<int &&, int &&>::value, "error");
+
+// { dg-prune-output "expected" }
+// { dg-prune-output "does not name a class" }
+// { dg-prune-output "static assertion" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C
new file mode 100644
index 0000000000..fcfc39e3eb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow1.C
@@ -0,0 +1,10 @@
+// PR c++/55357
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wshadow" }
+
+int main() {
+ int x = 1; // { dg-message "shadowed" }
+ auto const lambda = [](int x) { // { dg-warning "shadows" }
+ return x;
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C
new file mode 100644
index 0000000000..6c042ca677
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-shadow2.C
@@ -0,0 +1,11 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wshadow" }
+
+struct A
+{
+ int i;
+ void f()
+ {
+ [=]{ int i; }; // { dg-warning "shadows" }
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
index 26c09fdb11..a410384a45 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-std-function.C
@@ -1,6 +1,5 @@
// Test using std::function wrapper.
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
#include <functional>
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
index c3067713ca..1cac211dd4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-switch.C
@@ -1,5 +1,5 @@
// PR c++/49867
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int
main ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-syntax1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-syntax1.C
index b3b749c2a5..cb3ca94eb7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-syntax1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-syntax1.C
@@ -1,5 +1,5 @@
// PR c++/46124
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void foo() { [] () -> void (); } // { dg-error "returning a function" "returning" }
// { dg-error "expected .\{" "expected" { target *-*-* } 4 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C
index b4db3b881d..66cc7a4e1d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template10.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template10.C
new file mode 100644
index 0000000000..4fcc965275
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template10.C
@@ -0,0 +1,23 @@
+// PR c++/50276
+// { dg-options "-Wuninitialized" }
+// { dg-do run { target c++11 } }
+
+template<typename T>
+unsigned testfun(const T& func)
+{
+ return func();
+}
+
+template<int i>
+unsigned test()
+{
+ if (unsigned value = testfun( [] () { return 0; }))
+ return value;
+ return i;
+}
+
+int main()
+{
+ if (test<42>() != 42)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template11.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template11.C
new file mode 100644
index 0000000000..520b80488a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template11.C
@@ -0,0 +1,25 @@
+// PR c++/56915
+// { dg-require-effective-target c++11 }
+
+template <typename T>
+class A
+{
+ typename T::type b(); // { dg-error "int" }
+};
+
+template <typename T, typename U>
+void waldo(T, U) {}
+
+template <typename T>
+void bar()
+{
+ waldo([](A<T> a){ return a; },
+ []{});
+}
+
+int main()
+{
+ bar<int>();
+}
+
+// { dg-prune-output "used but never defined" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C
new file mode 100644
index 0000000000..635af97d76
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template12.C
@@ -0,0 +1,19 @@
+// PR c++/57568
+// { dg-require-effective-target c++11 }
+
+template < class T >
+struct remove_reference
+{ typedef int type; };
+template < class T >
+class X
+{
+ enum Q { };
+ bool f ()
+ {
+ Q a;
+ [&a]{
+ typename remove_reference < decltype (a) >::type t;
+ };
+ }
+};
+template class X< int >;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C
new file mode 100644
index 0000000000..79ab4107dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template13.C
@@ -0,0 +1,25 @@
+// PR c++/61566
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
+
+struct function
+{
+ template < typename _Functor>
+ function (_Functor);
+};
+
+template <class U>
+struct C
+{
+ template <typename T>
+ void foo (T, function = [] {});
+};
+
+void bar ()
+{
+ C<int> c;
+ c.foo (1);
+}
+
+// { dg-final { scan-assembler "_ZN8functionC1IZN1CIiE3fooIiEEvT_S_Ed_UlvE_EET_" } }
+// { dg-final { scan-assembler-not "_ZZN1CIiE3fooIiEEvT_8functionEd_NKUlvE_clEv" } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C
new file mode 100644
index 0000000000..b73ef753e0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template14.C
@@ -0,0 +1,11 @@
+// PR c++/62219
+// { dg-do compile { target c++11 } }
+
+template< class = void >
+struct S
+{
+ friend void foo( S )
+ {
+ [](){};
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
index 12ffde724e..29f63afe0d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template2.C
@@ -1,5 +1,5 @@
// PR c++/47049
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum { E = 0, F = 1 };
template <int N, int M = ((N == 1) ? F : E)> class S {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template3.C
index fd6f1d3192..dea9e0e4c0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template3.C
@@ -1,5 +1,5 @@
// PR c++/49554
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T>
struct base
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template7.C
new file mode 100644
index 0000000000..5b098d0df3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template7.C
@@ -0,0 +1,5 @@
+// PR c++/53783
+// { dg-do compile { target c++11 } }
+
+template <class T> void foo() { [] { [] {}; }; }
+int main() { foo<void>(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template8.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template8.C
new file mode 100644
index 0000000000..720941dbc2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-template8.C
@@ -0,0 +1,7 @@
+// PR c++/55680
+// { dg-do compile { target c++11 } }
+
+template <class T> struct X {
+ static void (* code ) ();
+};
+template <> void (* X<int>::code ) () = [](){};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this.C
index ed2747654f..b32f8d7cc2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this.C
@@ -1,5 +1,5 @@
// Test that implicit 'this' capture works, but that it's still an rvalue.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this10.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this10.C
new file mode 100644
index 0000000000..b4b8e7201a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this10.C
@@ -0,0 +1,4 @@
+// PR c++/54383
+// { dg-do compile { target c++11 } }
+
+auto foo = [&](int a) { return a > this->b; }; // { dg-error "this" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this11.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this11.C
new file mode 100644
index 0000000000..2618295662
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this11.C
@@ -0,0 +1,22 @@
+// PR c++/51494, c++/56222
+// Uses of static members and creating pointers to members aren't odr-uses
+// of 'this'.
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ static void f() {}
+ static int i;
+ int j;
+ void f(int);
+
+ void foo()
+ {
+ [] () {
+ ++i;
+ f();
+ &A::j;
+ (void(*)())&A::f;
+ };
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this12.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this12.C
new file mode 100644
index 0000000000..ef573b19e0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this12.C
@@ -0,0 +1,13 @@
+// Uses of 'this' in unevaluated context are not odr-uses.
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int f() {}
+ int i;
+
+ void foo()
+ {
+ [] () { sizeof(i); sizeof(f()); };
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this13.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this13.C
new file mode 100644
index 0000000000..090d0a13e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this13.C
@@ -0,0 +1,20 @@
+// PR c++/52374
+// { dg-do compile { target c++11 } }
+
+struct B
+{
+ int get() const { return 42; }
+};
+
+template<typename X>
+struct D
+ : public X
+{
+ int get() const { return [this]() -> int { return X::get(); }(); }
+};
+
+int main()
+{
+ D<B> d;
+ d.get();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this14.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this14.C
new file mode 100644
index 0000000000..9834bfdb30
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this14.C
@@ -0,0 +1,49 @@
+// PR c++/52014
+// { dg-require-effective-target c++11 }
+
+template <class Iterator, class Func>
+void for_each(const Iterator first, const Iterator last, Func func)
+{
+ for (Iterator it = first; it != last; ++it) {
+ func(*it);
+ }
+}
+
+template <class T>
+struct helper
+{
+ typedef typename T::size_type type;
+};
+
+template <class T>
+struct helper<T&>
+{
+ typedef typename T::size_type type;
+};
+
+template <class T>
+struct helper<T*>
+{
+ typedef typename T::size_type type;
+};
+
+struct bar
+{
+ struct foo
+ {
+ typedef int size_type;
+ } foo_;
+
+ void test()
+ {
+ int arr[] = { 1, 2, 3 };
+ for_each(arr, arr + 3, [&](helper<foo>::type i) {
+ for_each(arr, arr + 3, [&](helper<decltype(foo_)>::type j) { });
+ });
+ }
+};
+
+int main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this15.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this15.C
new file mode 100644
index 0000000000..d44bec9494
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this15.C
@@ -0,0 +1,12 @@
+// PR c++/56692
+// { dg-require-effective-target c++11 }
+
+struct Class {
+ void f () { }
+ static void f (int) { }
+};
+
+int main ()
+{
+ []{ Class::f(0); };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this16.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this16.C
new file mode 100644
index 0000000000..736d5f50e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this16.C
@@ -0,0 +1,28 @@
+// PR c++/56699
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int a;
+};
+
+struct T
+{
+ int x;
+
+ T() : x([]{
+ sizeof(::A::a);
+ return 0;
+ }())
+ {}
+};
+
+struct B
+{
+ int a;
+};
+
+void f()
+{
+ []{sizeof(B::a);};
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C
new file mode 100644
index 0000000000..2386e6b1eb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this17.C
@@ -0,0 +1,21 @@
+// PR c++/58481
+// { dg-require-effective-target c++11 }
+
+struct Test {
+ template<typename... Args> inline void triggerTest (Args&&... fargs) { }
+};
+
+struct TestPickled : Test {
+ template<typename... Args> void triggerTest (Args&&... fargs) {
+ [=](Args... as) {
+ Test::triggerTest (as...);
+ } ();
+ }
+};
+
+int main()
+{
+ TestPickled test;
+ test.triggerTest ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this18.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this18.C
new file mode 100644
index 0000000000..fec2da615b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this18.C
@@ -0,0 +1,30 @@
+// PR c++/61151
+// { dg-do compile { target c++11 } }
+
+struct B
+{
+ void foo () {}
+};
+
+template <class>
+struct A
+{
+ template <class> void bar ();
+ B a;
+};
+
+template <class T>
+template <class U>
+void
+A<T>::bar ()
+{
+ auto f = [this] () { auto g = [=] () { a.foo (); }; g (); };
+ f ();
+}
+
+int
+main ()
+{
+ A<int> a;
+ a.bar <int> ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C
index 04fe474c73..5029a4a763 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this2.C
@@ -1,6 +1,6 @@
// PR c++/43856
// Test for implicit 'this' capture via rewriting.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct S1 {
int operator()(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this3.C
index de0d357f3f..2defa99892 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this3.C
@@ -1,5 +1,5 @@
// PR c++/45520
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct M {
int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C
index 29cd2a97b3..f14a2723db 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this4.C
@@ -1,5 +1,5 @@
// PR c++/48523
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename>
struct X
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this5.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this5.C
new file mode 100644
index 0000000000..8974641643
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this5.C
@@ -0,0 +1,22 @@
+// PR c++/53619
+// { dg-do run { target c++11 } }
+
+struct C {
+ int x;
+};
+struct B {
+ int q;
+};
+struct A : public B , C {
+ void foo();
+};
+
+void A::foo() {
+ auto k = [this]() {return (void *)(&x);};
+ if (k() != (void*)&x)
+ __builtin_abort();
+}
+
+int main(int l, char **) {
+ A a; a.foo();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
index acf4eaa7fc..8c35126e97 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this6.C
@@ -1,5 +1,5 @@
// PR c++/53137
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template <typename STORE>
void getParent(STORE& tStore)
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C
index 6e25c331b4..ee202032a1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-this7.C
@@ -1,5 +1,5 @@
// PR c++/54122
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
enum E { F };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-type.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-type.C
index 3b2a2a76a4..a0c17ad162 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-type.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-type.C
@@ -11,7 +11,7 @@
// So, other appearances of 'x' within decltype do not refer to the closure
// member, because they are not "use"s in the sense of 3.2.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T, class U>
struct same_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-typedef.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-typedef.C
new file mode 100644
index 0000000000..e1d1b5041f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-typedef.C
@@ -0,0 +1,26 @@
+// PR c++/54975
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct identity
+{
+ typedef T type;
+};
+
+template<typename T>
+void f()
+{
+ typedef typename T::type A;
+ int i = 42;
+ int const &cri = i;
+ int volatile &vri = i;
+ [&]() {
+ A const &x = cri; // Problem here
+ A volatile &y = vri; // Likewise
+ };
+}
+
+int main()
+{
+ f<identity<int> >();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C
index 33ba7b0a43..dcea1690dd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval.C
@@ -1,7 +1,9 @@
// 5.1.2/2: A lambda-expression shall not appear in an unevaluated operand.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T>
struct A { };
A<decltype([]{ return 1; }())> a; // { dg-error "lambda.*unevaluated context" }
+// { dg-prune-output "template argument" }
+// { dg-prune-output "invalid type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval2.C
new file mode 100644
index 0000000000..14cb298742
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-uneval2.C
@@ -0,0 +1,7 @@
+// PR c++/60375
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ decltype( [](){ return this; }() ) x; // { dg-error "unevaluated" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use.C
index b1d6c300cf..73677c0e76 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use.C
@@ -1,10 +1,10 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int main(int argc, char** argv)
{
int i;
int &ir = i;
- const int ci = 0;
+ const int ci = 1;
const int &cir = ci;
[] { sizeof (argc); sizeof (i); sizeof (ir); sizeof (ci); sizeof (cir); };
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use2.C
index 695a0b4329..96af09c5cb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-use2.C
@@ -1,5 +1,6 @@
// PR c++/50224
-// { dg-options "-std=c++0x -Wunused-parameter" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-parameter" }
struct T;
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic1.C
index f17b33618a..e85f2bcff8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic1.C
@@ -1,5 +1,5 @@
// PR c++/49672
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename ... Args>
static void foo()
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C
new file mode 100644
index 0000000000..fab1f6ca6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-variadic2.C
@@ -0,0 +1,57 @@
+// { dg-do run { target c++11 } }
+
+int g() { return 0; }
+template <class T, class... U>
+int g(T t, U... u)
+{
+ return t + g(u...);
+}
+
+template <class... T>
+int f1(T... t)
+{
+ return [t...] {
+ return g(t...);
+ }();
+}
+
+template <class... T>
+int f2(T... t)
+{
+ return [&t...] {
+ return g(t...);
+ }();
+}
+
+template <class... T>
+int f3(T... t)
+{
+ return [=] {
+ return g(t...);
+ }();
+}
+
+template <class... T>
+int f4(T... t)
+{
+ return [&] {
+ return g(t...);
+ }();
+}
+
+#define assert(E) do { if (!(E)) __builtin_abort(); } while(0)
+int main()
+{
+ assert (f1() == 0);
+ assert (f2() == 0);
+ assert (f3() == 0);
+ assert (f4() == 0);
+ assert (f1(42) == 42);
+ assert (f2(42) == 42);
+ assert (f3(42) == 42);
+ assert (f4(42) == 42);
+ assert (f1(1,2,3) == 6);
+ assert (f2(1,2,3) == 6);
+ assert (f3(1,2,3) == 6);
+ assert (f4(1,2,3) == 6);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C
index b384d5cff6..f86c4b6d19 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn1.C
@@ -1,5 +1,6 @@
// PR c++/41920
-// { dg-options "-std=c++0x -Wall -Wextra" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall -Wextra" }
int foo(int i)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C
index ce5e7c4503..6542392ef1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn2.C
@@ -1,5 +1,6 @@
// PR c++/42370
-// { dg-options "-std=c++0x -Wall" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
void foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn3.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn3.C
index 77f35bc463..5c5b24c133 100644
--- a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn3.C
@@ -1,5 +1,6 @@
// PR c++/49482
-// { dg-options "-std=c++0x -Wunused-but-set-parameter" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-but-set-parameter" }
template<class T>
void f() {
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn4.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn4.C
new file mode 100644
index 0000000000..059c198ff0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-warn4.C
@@ -0,0 +1,8 @@
+// PR c++/52845
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
+
+void f()
+{
+ [](){};
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/linkage2.C b/gcc/testsuite/g++.dg/cpp0x/linkage2.C
index f41c21a774..52858687ed 100644
--- a/gcc/testsuite/g++.dg/cpp0x/linkage2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/linkage2.C
@@ -4,7 +4,7 @@
// o the variable or function is not used (3.2 [basic.def.odr]) or is
// defined in the same translation unit.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename T> struct B {
void g(T){}
@@ -16,9 +16,9 @@ template <typename T> struct B {
template <typename T> T B<T>::t2 = { };
-enum {} e1; // OK, defined
-extern enum {} e2; // { dg-error "never defined" }
-extern "C" enum {} e3; // OK, extern "C"
+enum { E1 } e1; // OK, defined
+extern enum { E2 } e2; // { dg-error "never defined" }
+extern "C" enum { E3 } e3; // OK, extern "C"
void f() {
struct A { int x; }; // no linkage
diff --git a/gcc/testsuite/g++.dg/cpp0x/local-targ1.C b/gcc/testsuite/g++.dg/cpp0x/local-targ1.C
new file mode 100644
index 0000000000..588149a2c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/local-targ1.C
@@ -0,0 +1,31 @@
+// PR c++/51884
+// { dg-do compile { target c++11 } }
+// { dg-final { scan-assembler "_ZN1BIZN3fooIivE3barILb1EEEvvE1CEC1ERKS4_" } }
+
+template<typename TT>
+ struct test { static const int value = 0; };
+template<int I>
+ struct enable_if { typedef void type; };
+
+struct A { virtual void f() {} };
+template<typename U> struct B : A { B(); B(const B&); };
+template<typename U> B<U>::B() { }
+template<typename U> B<U>::B(const B&) { }
+
+template<class T> void g(T) { }
+
+template<typename T, typename = void> struct foo;
+template<typename T>
+struct foo<T,typename enable_if<test<T>::value>::type>
+{
+ template <bool P> void bar() {
+ struct C { } c;
+ B<C> b;
+ g(b);
+ }
+};
+
+int main() {
+ foo<int> f;
+ f.bar<true>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/long_long.C b/gcc/testsuite/g++.dg/cpp0x/long_long.C
index 3ef710df48..6a602c641a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/long_long.C
+++ b/gcc/testsuite/g++.dg/cpp0x/long_long.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x -pedantic" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
void foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/move1.C b/gcc/testsuite/g++.dg/cpp0x/move1.C
index 12e363a8ca..5b9b17ebe6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/move1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/move1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-do compile { target c++11 } }
#include <utility>
diff --git a/gcc/testsuite/g++.dg/cpp0x/named.C b/gcc/testsuite/g++.dg/cpp0x/named.C
index 2dff24ca47..7bd2093394 100644
--- a/gcc/testsuite/g++.dg/cpp0x/named.C
+++ b/gcc/testsuite/g++.dg/cpp0x/named.C
@@ -1,5 +1,4 @@
-// { dg-options "--std=c++0x" }
-// { dg-do link }
+// { dg-do link { target c++11 } }
template<typename _Tp>
inline _Tp&&
diff --git a/gcc/testsuite/g++.dg/cpp0x/named_refs.C b/gcc/testsuite/g++.dg/cpp0x/named_refs.C
index 697867e11d..850179c42f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/named_refs.C
+++ b/gcc/testsuite/g++.dg/cpp0x/named_refs.C
@@ -2,8 +2,8 @@
// Test: Named rvalue references are treated as lvalues.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/new1.C b/gcc/testsuite/g++.dg/cpp0x/new1.C
new file mode 100644
index 0000000000..2f002db37c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/new1.C
@@ -0,0 +1,8 @@
+// PR c++/52216
+// { dg-require-effective-target c++11 }
+
+#include <new>
+
+int n;
+
+static_assert(!noexcept(::new (std::nothrow) int[n]), "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept01.C b/gcc/testsuite/g++.dg/cpp0x/noexcept01.C
index f314684eae..9f425354bf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept01.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept01.C
@@ -1,5 +1,6 @@
// Test for noexcept-expression
-// { dg-options "-std=c++0x -O2" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2" }
#include <typeinfo>
@@ -50,7 +51,7 @@ struct E
~E();
};
-SA (!noexcept (E()));
+SA (noexcept (E()));
struct F
{
@@ -74,7 +75,7 @@ void tf()
}
template void tf<int,true>();
-template void tf<E, false>();
+template void tf<E, true>();
// Make sure that noexcept uses the declared exception-specification, not
// any knowledge we might have about whether or not the function really
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept02.C b/gcc/testsuite/g++.dg/cpp0x/noexcept02.C
index ffbb091924..5d5867af61 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept02.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept02.C
@@ -1,5 +1,5 @@
// Test for noexcept-specification
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert(X, #X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept03.C b/gcc/testsuite/g++.dg/cpp0x/noexcept03.C
index 54e04f3d02..2d378677b7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept03.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept03.C
@@ -1,6 +1,7 @@
// Runtime test for noexcept-specification.
-// { dg-options "-std=c++0x -Wnoexcept" }
-// { dg-do run }
+// { dg-options "-Wnoexcept" }
+// { dg-do run { target nonpic } }
+// { dg-require-effective-target c++11 }
#include <exception>
#include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept04.C b/gcc/testsuite/g++.dg/cpp0x/noexcept04.C
index 8df818610f..56ea1f48b8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept04.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept04.C
@@ -3,8 +3,7 @@
// the compiler doesn't get clever about optimizing the calls based on
// knowledge about the called functions.
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <exception>
#include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept05.C b/gcc/testsuite/g++.dg/cpp0x/noexcept05.C
index 6acea43273..a6c425dc0b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept05.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept05.C
@@ -8,7 +8,7 @@
// { dg-final { scan-assembler-not "EHB" } }
// { dg-final { scan-assembler "LSDA" } }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A { ~A(); };
void g();
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
index 3babdffdad..7e1db661ec 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept06.C
@@ -1,7 +1,6 @@
// Test that checking of a nothrow specification uses the one on the
// definition.
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <exception>
#include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept07.C b/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
index 0a5773fc86..90c50a9c3b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept07.C
@@ -1,7 +1,6 @@
// Test that checking of a nothrow specification uses the one on the
// definition.
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
#include <exception>
#include <cstdlib>
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept08.C b/gcc/testsuite/g++.dg/cpp0x/noexcept08.C
index 1df85efff9..96af0feb8e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept08.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept08.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "overriding" }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept09.C b/gcc/testsuite/g++.dg/cpp0x/noexcept09.C
index 2a4525cbd6..d26a3aeab1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept09.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept09.C
@@ -1,5 +1,6 @@
// Test that -Wnoexcept works with templates
-// { dg-options "-std=c++0x -Wnoexcept" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wnoexcept" }
template <class T>
T f (T t) { return t; } // { dg-warning "does not throw" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept10.C b/gcc/testsuite/g++.dg/cpp0x/noexcept10.C
index 058a387d77..b80228278b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept10.C
@@ -1,5 +1,5 @@
// PR c++/49082
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std { template <class T> T&& declval() noexcept; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept11.C b/gcc/testsuite/g++.dg/cpp0x/noexcept11.C
index b7c64a6ef0..6597f40874 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept11.C
@@ -1,5 +1,5 @@
// PR c++/49107
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename _Tp>
_Tp declval() noexcept;
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept12.C b/gcc/testsuite/g++.dg/cpp0x/noexcept12.C
index 1fd1b032f4..185364b0f8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept12.C
@@ -1,5 +1,5 @@
// Test that we handle merging with deferred noexcept.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class U>
struct O
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept13.C b/gcc/testsuite/g++.dg/cpp0x/noexcept13.C
index 7d51c82b54..e52e9a0046 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept13.C
@@ -1,5 +1,5 @@
// PR c++/49107
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept14.C b/gcc/testsuite/g++.dg/cpp0x/noexcept14.C
index eba2c40808..913f2ef551 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept14.C
@@ -1,4 +1,4 @@
// PR c++/50309
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void foo () noexcept () { } // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept15.C b/gcc/testsuite/g++.dg/cpp0x/noexcept15.C
index 5e8c40c277..909ee9748b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept15.C
@@ -1,5 +1,5 @@
// PR c++/50391
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <type_traits>
@@ -9,11 +9,11 @@ template<class Tp>
Tp elem; // { dg-error "incomplete type" }
constexpr single(const Tp& e)
- : elem(e) { } // { dg-error "invalid field" }
+ : elem(e) { }
- single(single&& s) // { dg-error "not a member" }
+ single(single&& s)
noexcept(std::is_nothrow_move_constructible<Tp>::value)
- : elem(s.elem) { } // { dg-error "invalid field|no member" }
+ : elem(s.elem) { }
};
template<class Tp>
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept17.C b/gcc/testsuite/g++.dg/cpp0x/noexcept17.C
new file mode 100644
index 0000000000..b27acefcd3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept17.C
@@ -0,0 +1,54 @@
+// PR c++/50043
+// { dg-do compile { target c++11 } }
+
+struct True1 {};
+struct True2 { ~True2(); };
+struct True3 { ~True3(){ throw 0; } };
+struct False { ~False() noexcept(false); };
+
+template <typename Base>
+struct A : Base
+{
+};
+
+template <typename Member>
+struct B
+{
+ Member mem;
+};
+
+template <typename Base, typename Member>
+struct C : Base
+{
+ Member mem;
+};
+
+#define SA(X) static_assert(X, #X)
+
+SA( noexcept(True1()));
+SA( noexcept(True2()));
+SA( noexcept(True3()));
+SA(!noexcept(False()));
+
+SA( noexcept(A<True1>()));
+SA( noexcept(A<True2>()));
+SA( noexcept(A<True3>()));
+SA(!noexcept(A<False>()));
+
+SA( noexcept(B<True1>()));
+SA( noexcept(B<True2>()));
+SA( noexcept(B<True3>()));
+SA(!noexcept(B<False>()));
+
+SA( noexcept(C<True1, True2>()));
+SA( noexcept(C<True1, True3>()));
+SA( noexcept(C<True2, True3>()));
+SA( noexcept(C<True2, True1>()));
+SA( noexcept(C<True3, True1>()));
+SA( noexcept(C<True3, True2>()));
+SA(!noexcept(C<False, True1>()));
+SA(!noexcept(C<False, True2>()));
+SA(!noexcept(C<False, True3>()));
+SA(!noexcept(C<True1, False>()));
+SA(!noexcept(C<True2, False>()));
+SA(!noexcept(C<True3, False>()));
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept18.C b/gcc/testsuite/g++.dg/cpp0x/noexcept18.C
index 953fb0ec8b..e851b86005 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept18.C
@@ -1,6 +1,5 @@
// PR c++/54207
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
typedef bool B;
constexpr B foo () { return true; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept19.C b/gcc/testsuite/g++.dg/cpp0x/noexcept19.C
index 12ff86e0d2..d303a8c60f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept19.C
@@ -1,6 +1,5 @@
// PR c++/55652
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
template <typename T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept20.C b/gcc/testsuite/g++.dg/cpp0x/noexcept20.C
index b86760292b..ec4f3a1533 100644
--- a/gcc/testsuite/g++.dg/cpp0x/noexcept20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept20.C
@@ -1,5 +1,5 @@
// PR c++/56071
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
class B
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept21.C b/gcc/testsuite/g++.dg/cpp0x/noexcept21.C
new file mode 100644
index 0000000000..ec88e1d3d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept21.C
@@ -0,0 +1,87 @@
+// PR c++/57645
+// { dg-do compile { target c++11 } }
+
+struct Thrower
+{
+ ~Thrower() noexcept(false) { throw 1; }
+};
+
+struct ExplicitA
+{
+ ~ExplicitA() {}
+
+ Thrower t;
+};
+
+struct ExplicitB
+{
+ ~ExplicitB();
+
+ Thrower t;
+};
+
+ExplicitB::~ExplicitB() {}
+
+struct ExplicitC
+{
+ ~ExplicitC() = default;
+
+ Thrower t;
+};
+
+struct ExplicitD
+{
+ ~ExplicitD();
+
+ Thrower t;
+};
+
+ExplicitD::~ExplicitD() = default;
+
+struct NoThrower
+{
+ ~NoThrower() noexcept(true) {}
+};
+
+struct ExplicitE
+{
+ ~ExplicitE() {}
+
+ NoThrower t;
+};
+
+struct ExplicitF
+{
+ ~ExplicitF();
+
+ NoThrower t;
+};
+
+ExplicitF::~ExplicitF() {}
+
+struct ExplicitG
+{
+ ~ExplicitG() = default;
+
+ NoThrower t;
+};
+
+struct ExplicitH
+{
+ ~ExplicitH();
+
+ NoThrower t;
+};
+
+ExplicitH::~ExplicitH() = default;
+
+#define SA(X) static_assert(X, #X)
+
+SA( !noexcept(ExplicitA()) );
+SA( !noexcept(ExplicitB()) );
+SA( !noexcept(ExplicitC()) );
+SA( !noexcept(ExplicitD()) );
+SA( noexcept(ExplicitE()) );
+SA( noexcept(ExplicitF()) );
+SA( noexcept(ExplicitG()) );
+SA( noexcept(ExplicitH()) );
diff --git a/gcc/testsuite/g++.dg/cpp0x/noexcept22.C b/gcc/testsuite/g++.dg/cpp0x/noexcept22.C
new file mode 100644
index 0000000000..7aab0f43c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/noexcept22.C
@@ -0,0 +1,21 @@
+// PR c++/60046
+// { dg-require-effective-target c++11 }
+
+constexpr bool foo () { return noexcept (true); }
+template <typename T>
+struct V
+{
+ void bar (V &) noexcept (foo ()) {}
+};
+template <typename T>
+struct W : public V <int>
+{
+ void bar (W &x) { V <int>::bar (x); }
+};
+
+int
+main ()
+{
+ W <int> a, b;
+ a.bar (b);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nolinkage1.C b/gcc/testsuite/g++.dg/cpp0x/nolinkage1.C
index b69b6ddc4c..d38028c4b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nolinkage1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nolinkage1.C
@@ -2,8 +2,7 @@
// Test that this doesn't lead to link-time collisions.
// { dg-additional-sources "nolinkage1a.cc" }
-// { dg-do link }
-// { dg-options -std=c++0x }
+// { dg-do link { target c++11 } }
#include "nolinkage1.h"
diff --git a/gcc/testsuite/g++.dg/cpp0x/not_special.C b/gcc/testsuite/g++.dg/cpp0x/not_special.C
index 2b510bb9a1..22054ea058 100644
--- a/gcc/testsuite/g++.dg/cpp0x/not_special.C
+++ b/gcc/testsuite/g++.dg/cpp0x/not_special.C
@@ -4,7 +4,7 @@
// That is, their presence should cause compiler declared
// copy ctor or assignment to be deleted.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <assert.h>
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C
index ddf9f04c58..b5b8dabbce 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-const1.C
@@ -1,5 +1,5 @@
// PR c++/50707
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
int g;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer1.C
index b3d9b93575..e1b9d69290 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#define SA(X) static_assert(X,#X)
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C
index 1951262f9d..96ed2c8acf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer3.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer3.C
index 2777fb5d8e..90f910285c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer3.C
@@ -1,5 +1,5 @@
// Do NSDMI get deferred instantiation?
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer4.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer4.C
index 65b2e73807..60ca88d454 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer4.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C
index 85abfbf861..a83d40b292 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer5.C
@@ -1,5 +1,5 @@
// PR c++/51666 (DR 325)
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct tuple
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
new file mode 100644
index 0000000000..033c14264d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-defer6.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+
+struct A // { dg-error "non-static data member" }
+{
+ int i = (A(), 42); // { dg-message "required here" }
+};
+
+A a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C
index 09c92d2f15..edcf5887db 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-eh1.C
@@ -1,6 +1,6 @@
// Core issue 1351
// { dg-do run { xfail *-*-* } }
-// { dg-options -std=c++0x }
+// { dg-require-effective-target c++11 }
bool fail;
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-list1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list1.C
index 526f29ae28..e54be050bd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-list1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list1.C
@@ -1,5 +1,5 @@
// PR c++/50563
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S1 {
int a{10}, b{20}; // OK
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C
index a6321ffb60..d3669865c4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list2.C
@@ -1,5 +1,5 @@
// PR c++/50930
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct nmc {
nmc() = default;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-list3.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list3.C
new file mode 100644
index 0000000000..a554f935bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-list3.C
@@ -0,0 +1,21 @@
+// PR c++/54998
+// { dg-do compile { target c++11 } }
+
+class Foo {
+public:
+private:
+ static const int kRows = 4;
+ static const int kCols = 4;
+
+ union {
+ float m_n[kRows][kCols];
+ float m_m[kRows * kCols] = {
+ 1.0f, 0.0f, 0.0f, 0.0f,
+ 0.0f, 1.0f, 0.0f, 0.0f,
+ 0.0f, 0.0f, 1.0f, 0.0f,
+ 0.0f, 0.0f, 0.0f, 1.0f
+ };
+ };
+};
+
+Foo myFoo;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C
new file mode 100644
index 0000000000..2330365f7c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-local.C
@@ -0,0 +1,8 @@
+// PR c++/55240
+// { dg-do compile { target c++11 } }
+
+int main()
+{
+ int q = 1; // { dg-message "declared here" }
+ struct test { int x = q; } instance; // { dg-error "local variable" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-sizeof.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-sizeof.C
new file mode 100644
index 0000000000..fac979b668
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-sizeof.C
@@ -0,0 +1,7 @@
+// PR c++/57673
+// { dg-do compile { target c++11 } }
+
+template< int ... p >
+struct d {
+ int n = sizeof ... ( p );
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template1.C
index 04f1e0391d..7316dc6529 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template1.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
struct base
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template10.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template10.C
new file mode 100644
index 0000000000..4a8c87e6d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template10.C
@@ -0,0 +1,14 @@
+// PR c++/60999
+// { dg-do compile { target c++11 } }
+
+struct B
+{
+ template<int N, int M>
+ struct A;
+
+ template<int M>
+ struct A<1, M>
+ {
+ int X = M;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template11.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template11.C
new file mode 100644
index 0000000000..60e53c4190
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template11.C
@@ -0,0 +1,15 @@
+// PR c++/58930
+// { dg-do compile { target c++11 } }
+
+struct SampleModule
+{
+ explicit SampleModule (int);
+};
+
+template < typename >
+struct BaseHandler
+{
+ SampleModule module_ { 0 };
+};
+
+BaseHandler<int> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template12.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template12.C
new file mode 100644
index 0000000000..52ae257200
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template12.C
@@ -0,0 +1,17 @@
+// PR c++/58753
+// { dg-do compile { target c++11 } }
+
+#include <initializer_list>
+
+template <class T>
+struct X {X(std::initializer_list<int>) {}};
+
+template <class zomg>
+class T {
+ X<T> x{1};
+};
+
+int main()
+{
+ T<int> t;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template13.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template13.C
new file mode 100644
index 0000000000..65ccd0aaa7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template13.C
@@ -0,0 +1,11 @@
+// PR c++/58704
+// { dg-do compile { target c++11 } }
+
+struct A {};
+
+template<typename> struct B
+{
+ A a[1] = { };
+};
+
+B<int> b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C
index 27b0aa5f9d..fcb405c157 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template2.C
@@ -1,5 +1,6 @@
// PR c++/50614
-// { dg-options "-std=c++0x -fcompare-debug" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fcompare-debug" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template3.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template3.C
new file mode 100644
index 0000000000..8a6f913d21
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template3.C
@@ -0,0 +1,16 @@
+// PR c++/58760
+// { dg-do compile { target c++11 } }
+
+enum en
+{
+ a,b,c
+};
+
+struct B
+{
+ template<en N>
+ struct A
+ {
+ const int X = N;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template4.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template4.C
new file mode 100644
index 0000000000..ff8dc7e932
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template4.C
@@ -0,0 +1,24 @@
+// PR c++/57887
+// { dg-do compile { target c++11 } }
+
+struct B
+{
+ template<int N>
+ struct A
+ {
+ int X = N;
+ };
+};
+
+template<int M>
+struct C
+{
+ int Y = M;
+
+ template<int N>
+ struct A
+ {
+ int X = N;
+ int Y = M;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C
new file mode 100644
index 0000000000..fdaf4611ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template5.C
@@ -0,0 +1,38 @@
+// PR c++/58599
+// { dg-do compile { target c++11 } }
+
+template<int> struct A1;
+
+template<> struct A1<0>
+{
+ template<typename, typename...> struct B1
+ {
+ template<typename> int foo1() {}
+
+ int i1 = foo1<int>();
+ };
+};
+
+template<int> struct A2;
+
+template<> struct A2<0>
+{
+ template<typename, typename> struct B2
+ {
+ template<typename> int foo2() {}
+
+ int i2 = foo2<int>();
+ };
+};
+
+template<int> struct A3;
+
+template<> struct A3<0>
+{
+ template<typename> struct B3
+ {
+ template<typename> int foo3() {}
+
+ int i3 = foo3<int>();
+ };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C
new file mode 100644
index 0000000000..33ed82d081
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template6.C
@@ -0,0 +1,13 @@
+// PR c++/58829
+// { dg-do compile { target c++11 } }
+
+struct A {
+ int f() {return 0;}
+} a;
+
+struct B {
+ template<int=0> struct C {
+ int i = a.f();
+ };
+};
+B::C<> c;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C
new file mode 100644
index 0000000000..cec7b7bea2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template7.C
@@ -0,0 +1,15 @@
+// PR c++/58725
+// { dg-do compile { target c++11 } }
+
+struct A {
+ template<int=0>
+ struct B {
+ struct C {
+ int x = 0;
+ double y = x;
+ } c;
+ };
+};
+int main() {
+ A::B<>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C
new file mode 100644
index 0000000000..ef0dddd731
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template8.C
@@ -0,0 +1,27 @@
+// PR c++/58188
+// { dg-do compile { target c++11 } }
+
+struct B {};
+struct A
+{
+ A( B );
+};
+
+struct Bar
+{
+ template< unsigned v >
+ struct Foo
+ {
+ A z = B();
+ unsigned value;
+ Foo(): value( v ) {}
+ };
+
+ struct Baz
+ {
+ Foo< 8 > foo1;
+ Foo< 1 > foo3;
+ };
+};
+
+Bar::Baz baz;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C
new file mode 100644
index 0000000000..0cfbb90442
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-template9.C
@@ -0,0 +1,16 @@
+// PR c++/60999
+// { dg-do compile { target c++11 } }
+
+template <typename A>
+struct foo
+{
+};
+
+template<>
+struct foo<int>
+{
+ static constexpr int code = 42;
+ unsigned int bar = static_cast<unsigned int>(code);
+};
+
+foo<int> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-union1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union1.C
new file mode 100644
index 0000000000..11bdd88eea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union1.C
@@ -0,0 +1,25 @@
+// PR c++/52377
+// { dg-do run { target c++11 } }
+
+union Test
+{
+ int a{4};
+};
+
+union B
+{
+ int i = 42;
+ double d;
+ B() = default;
+ B(double d): d(d) { }
+};
+
+int main()
+{
+ Test t;
+ B b;
+ B b2(4.2);
+
+ if (t.a != 4 || b.i != 42 || b2.d != 4.2)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C
new file mode 100644
index 0000000000..069232755f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union2.C
@@ -0,0 +1,18 @@
+// PR c++/52377
+// { dg-require-effective-target c++11 }
+
+union A // { dg-error "multiple" }
+{
+ int i = 4;
+ int j = 2;
+};
+
+A a;
+
+union B
+{
+ int i,j;
+ B(): i(1), j(2) {} // { dg-error "multiple" }
+};
+
+B b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
new file mode 100644
index 0000000000..35f6509df7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union3.C
@@ -0,0 +1,10 @@
+// PR c++/58965
+// { dg-require-effective-target c++11 }
+
+void foo()
+{
+ static union
+ {
+ int i = i;
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-union4.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union4.C
new file mode 100644
index 0000000000..c21fdcaed5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union4.C
@@ -0,0 +1,12 @@
+// PR c++/59269
+// { dg-require-effective-target c++11 }
+
+union U
+{
+ int& i = 0; // { dg-error "reference" }
+};
+
+void foo()
+{
+ U();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C
new file mode 100644
index 0000000000..57dfd59863
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-union5.C
@@ -0,0 +1,11 @@
+// PR c++/58701
+// { dg-require-effective-target c++11 }
+// { dg-final { scan-assembler "7" } }
+
+static union
+{
+ union
+ {
+ int i = 7;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1.C
index 4aa8d482da..aeafe1cc51 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual1.C
@@ -1,6 +1,5 @@
// PR c++/51611
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual2.C
new file mode 100644
index 0000000000..157854c5aa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi-virtual2.C
@@ -0,0 +1,8 @@
+// PR c++/51474
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ virtual int foo() = 0;
+ int i = foo(); // { dg-warning "pure virtual" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi1.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi1.C
index 159c16de85..976b8f4805 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi1.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi2.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi2.C
index 9636bed882..31a638f2d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi3.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi3.C
index 73b2bc2e1a..a8e8cdf2fe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi4.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi4.C
index db365cb55e..6f97b06715 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi4.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options -std=c++0x }
+// { dg-do run { target c++11 } }
int c;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi5.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi5.C
index 62803b0819..bade28f3dc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi6.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi6.C
index bb455e778e..e78f50019a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi6.C
@@ -1,5 +1,5 @@
// Origin PR c++/51477
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C
index ea1957775a..4b08474aaf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi7.C
@@ -1,6 +1,6 @@
// PR c++/53594
-// { dg-do compile }
-// { dg-options "-std=c++11 -Wuninitialized" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wuninitialized" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi8.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi8.C
new file mode 100644
index 0000000000..f89bec6d16
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi8.C
@@ -0,0 +1,8 @@
+// PR c++/55670
+// { dg-do compile { target c++11 } }
+
+template <class T> using F = T;
+struct X {
+ F<void ()>* fp = nullptr;
+};
+int main () { return 0; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/nsdmi9.C b/gcc/testsuite/g++.dg/cpp0x/nsdmi9.C
new file mode 100644
index 0000000000..febe0ecac4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nsdmi9.C
@@ -0,0 +1,13 @@
+// PR c++/58162
+// { dg-require-effective-target c++11 }
+
+struct A {
+ A();
+ A(A&&);
+};
+
+struct B {
+ A const a = A();
+};
+
+B b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr01.C b/gcc/testsuite/g++.dg/cpp0x/nullptr01.C
index de3860c9ea..90917d74f7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr01.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr01.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test assignment to pointer
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr02.C b/gcc/testsuite/g++.dg/cpp0x/nullptr02.C
index 80977cb2f0..50b3d0741b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr02.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr02.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test assignment to nullptr_t
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr03.C b/gcc/testsuite/g++.dg/cpp0x/nullptr03.C
index b6df896374..cc3c031a90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr03.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr03.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test assignment to int
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr04.C b/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
index be581bcb6e..372ac51cd7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr04.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test cast to int
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr05.C b/gcc/testsuite/g++.dg/cpp0x/nullptr05.C
index 22a8b51c1c..65121b659d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr05.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr05.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test assignment to method pointer
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr06.C b/gcc/testsuite/g++.dg/cpp0x/nullptr06.C
index c50bb9bc11..e933c35287 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr06.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr06.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test compare to pointer
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr07.C b/gcc/testsuite/g++.dg/cpp0x/nullptr07.C
index 64d442be33..b2ef515197 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr07.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr07.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test compare to int
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr08.C b/gcc/testsuite/g++.dg/cpp0x/nullptr08.C
index 1e5db278dd..dbf1632334 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr08.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr08.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test conversion to bool
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr09.C b/gcc/testsuite/g++.dg/cpp0x/nullptr09.C
index b35a3c3207..1422a35cff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr09.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr09.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test compare to literal 0
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr10.C b/gcc/testsuite/g++.dg/cpp0x/nullptr10.C
index fa32267ec0..e27d65861a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr10.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test arithmetic operations
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr11.C b/gcc/testsuite/g++.dg/cpp0x/nullptr11.C
index 5907816a84..f81f0c3c1c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr11.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test relational operators
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr12.C b/gcc/testsuite/g++.dg/cpp0x/nullptr12.C
index 1713259f10..4397082056 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr12.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test sizeof
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr13.C b/gcc/testsuite/g++.dg/cpp0x/nullptr13.C
index a9377584c5..e788c16b12 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr13.C
@@ -1,16 +1,12 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test typeid
#include <typeinfo>
-#define assert_true(b) do { char c[2 * bool(b) - 1]; } while(0)
-
-void fun()
+int main()
{
- typeid(nullptr);
const decltype(nullptr) mynull = 0;
- typeid(mynull);
- assert_true(typeid(nullptr) == typeid(mynull));
+ if (typeid(nullptr) != typeid(mynull))
+ __builtin_abort();
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr14.C b/gcc/testsuite/g++.dg/cpp0x/nullptr14.C
index 4c4627b541..6a79c49677 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr14.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test overload preference char*/int
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
index af661ecc3a..939d449595 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr15.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+
// Test template deduction
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr16.C b/gcc/testsuite/g++.dg/cpp0x/nullptr16.C
index 0ec0b6a12b..62029b3a90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr16.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test template deduction
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr17.C b/gcc/testsuite/g++.dg/cpp0x/nullptr17.C
index 2e580557bc..96fea44b22 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr17.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test that bool is a better overload match than int
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr18.C b/gcc/testsuite/g++.dg/cpp0x/nullptr18.C
index b8fa38c718..17dd62c84c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr18.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test overload of pointer versus bool when applied on a nullptr_t
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C
index ecc36139a4..8b6a0b4289 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr19.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+
// Test overload of pointer versus nullptr_t when applied on a literal 0/__null
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
index 3e58406770..bbd0c7e24e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr20.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test passing to ellipisis
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr21.C b/gcc/testsuite/g++.dg/cpp0x/nullptr21.C
index 8362bd2965..89884b90f7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr21.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test throw and catch
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr22.C b/gcc/testsuite/g++.dg/cpp0x/nullptr22.C
index d800f9869d..5fbd124b32 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr22.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x -Wall -Wformat=2 -Wstrict-null-sentinel" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall -Wformat=2 -Wstrict-null-sentinel" }
// Test various warnings
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr23.C b/gcc/testsuite/g++.dg/cpp0x/nullptr23.C
index a078269de2..2fab690b60 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr23.C
@@ -1,5 +1,5 @@
// PR c++/50361
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
@@ -7,7 +7,7 @@ struct Foo
{
Foo(std::initializer_list<Foo>) { };
- template<class T> Foo(T t) { T u(t); };
+ template<class T> Foo(T t) { T u(t); }
private:
union Data
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr24.C b/gcc/testsuite/g++.dg/cpp0x/nullptr24.C
index f391779662..de0c84279c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr24.C
@@ -1,5 +1,5 @@
// PR c++/50371
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<decltype(nullptr)>
struct nt;
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr25.C b/gcc/testsuite/g++.dg/cpp0x/nullptr25.C
index b8a7f45c67..a87a923a53 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr25.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<decltype(nullptr)>
struct nt{};
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr26.C b/gcc/testsuite/g++.dg/cpp0x/nullptr26.C
index b7421b8d04..f60fae02ac 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr26.C
@@ -1,5 +1,5 @@
// PR c++/51530
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T, class U>
void f(T, U);
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr27.C b/gcc/testsuite/g++.dg/cpp0x/nullptr27.C
new file mode 100644
index 0000000000..2510dc8063
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr27.C
@@ -0,0 +1,9 @@
+// PR c++/52706
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
+// { dg-final { scan-assembler "_Z1fIDnLDn0EEiT_" } }
+
+template<class T, decltype(nullptr) = nullptr>
+int f(T);
+
+int i2 = f(nullptr); // 17
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr29.C b/gcc/testsuite/g++.dg/cpp0x/nullptr29.C
index a8e35a9b67..d2325bb83c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/nullptr29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr29.C
@@ -1,4 +1,5 @@
// PR c++/53882
-// { dg-options "-std=gnu++11 -O" }
+// { dg-options "-O" }
+// { dg-do compile { target c++11 } }
void f(decltype(nullptr) &__restrict np) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/nullptr30.C b/gcc/testsuite/g++.dg/cpp0x/nullptr30.C
new file mode 100644
index 0000000000..3673999d88
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/nullptr30.C
@@ -0,0 +1,40 @@
+// PR c++/58176
+// { dg-do compile { target c++11 } }
+
+// Nil
+struct nil_ { constexpr nil_ () {} };
+constexpr nil_ nil;
+
+// Cons
+template <class H, class T = nil_>
+struct cons_ {
+ using head_ = H;
+ using tail_ = T;
+
+ H head;
+ T tail;
+
+ constexpr cons_() {}
+ constexpr cons_(H const &h, T const &t) : head(h), tail(t) {}
+};
+template <class H, class T = nil_>
+constexpr cons_<H, T> cons (H const &h, T const &t = nil) { return
+cons_<H,T>(h,t); }
+
+// List
+template <class... T> struct list_s;
+template <class H, class... T>
+struct list_s<H, T...> {
+ using type = cons_<H, typename list_s<T...>::type>;
+};
+template <>
+struct list_s<> {
+ using type = nil_;
+};
+template <class... T>
+using list_ = typename list_s<T...>::type;
+constexpr nil_ list () { return nil; }
+template <class H, class... T>
+constexpr list_<H, T...> list (H h, T... t) { return cons(h, list(t...)); }
+
+constexpr auto l1 = list("monkey", 123.4, cons(1, 2), nullptr);
diff --git a/gcc/testsuite/g++.dg/cpp0x/overflow1.C b/gcc/testsuite/g++.dg/cpp0x/overflow1.C
new file mode 100644
index 0000000000..b8591b4af4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/overflow1.C
@@ -0,0 +1,25 @@
+// { dg-prune-output "-Woverflow" }
+
+template <long long i>
+struct Fib
+{
+ static const long long value // { dg-error "overflow" }
+ = Fib<i-1>::value + Fib<i-2>::value;
+};
+
+template <>
+struct Fib<0>
+{
+ static const long long value = 0;
+};
+
+template <>
+struct Fib<1>
+{
+ static const long long value = 1;
+};
+
+int main()
+{
+ return Fib<95>::value;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C b/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C
index 778111283f..5817ad5606 100644
--- a/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/overload-conv-1.C
@@ -1,5 +1,4 @@
-// { dg-options "--std=c++0x" }
-// { dg-do link }
+// { dg-do link { target c++11 } }
struct S {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C b/gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C
index 0e622bcacb..b95994d7fc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/overload-conv-2.C
@@ -1,5 +1,4 @@
-// { dg-options "--std=c++0x" }
-// { dg-do link }
+// { dg-do link { target c++11 } }
struct T {};
struct S
diff --git a/gcc/testsuite/g++.dg/cpp0x/overload.C b/gcc/testsuite/g++.dg/cpp0x/overload.C
index 3782d4a208..a52e7c018f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/overload.C
+++ b/gcc/testsuite/g++.dg/cpp0x/overload.C
@@ -1,5 +1,4 @@
-// { dg-options "--std=c++0x" }
-// { dg-do link }
+// { dg-do link { target c++11 } }
// Generated by overload.py
template<typename _Tp>
diff --git a/gcc/testsuite/g++.dg/cpp0x/overload2.C b/gcc/testsuite/g++.dg/cpp0x/overload2.C
index ff8ad22bea..2779f6d9e5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/overload2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/overload2.C
@@ -1,5 +1,5 @@
// Core 1321
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// Two dependent names are equivalent even if the overload sets found by
// phase 1 lookup are different. Merging them keeps the earlier set.
@@ -10,15 +10,15 @@ template <class T> decltype(g1(T())) f1()
{ return g1(T()); }
int i1 = f1<int>(); // OK, g1(int) was declared before the first f1
-template <class T> decltype(g2(T())) f2();
+template <class T> decltype(g2(T())) f2(); // { dg-error "g2. was not declared" }
int g2(int);
-template <class T> decltype(g2(T())) f2() // { dg-error "g2. was not declared" }
+template <class T> decltype(g2(T())) f2()
{ return g2(T()); }
int i2 = f2<int>(); // { dg-error "no match" }
int g3();
-template <class T> decltype(g3(T())) f3();
+template <class T> decltype(g3(T())) f3(); // { dg-error "too many arguments" }
int g3(int);
-template <class T> decltype(g3(T())) f3() // { dg-error "too many arguments" }
+template <class T> decltype(g3(T())) f3()
{ return g3(T()); }
int i3 = f3<int>(); // { dg-error "no match" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/overload3.C b/gcc/testsuite/g++.dg/cpp0x/overload3.C
new file mode 100644
index 0000000000..2d957830c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/overload3.C
@@ -0,0 +1,17 @@
+// PR c++/59823
+// { dg-do compile { target c++11 } }
+
+struct X { };
+
+void f(X&&);
+
+struct wrap
+{
+ operator const X&() const;
+};
+
+int main()
+{
+ wrap w;
+ f(w); // { dg-error "lvalue" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/overloadn.C b/gcc/testsuite/g++.dg/cpp0x/overloadn.C
index a42707fe4f..16c39a9ed3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/overloadn.C
+++ b/gcc/testsuite/g++.dg/cpp0x/overloadn.C
@@ -1,5 +1,5 @@
-// { dg-options "--std=c++0x" }
-// { dg-do link }
+// { dg-do link { target c++11 } }
+// { dg-options "" }
// Generated by overload.py
template<typename _Tp>
diff --git a/gcc/testsuite/g++.dg/cpp0x/override1.C b/gcc/testsuite/g++.dg/cpp0x/override1.C
index ba580b5c09..e05693fc59 100644
--- a/gcc/testsuite/g++.dg/cpp0x/override1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/override1.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
struct B
{
virtual void f() final {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/override2.C b/gcc/testsuite/g++.dg/cpp0x/override2.C
index 0d8871d6ae..c0b89de2a1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/override2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/override2.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
struct B1 {};
struct B2 final {};
@@ -18,7 +17,7 @@ template <class T> struct B4 final {};
template <class T> struct B5 final {};
-struct undeclared<int> final { }; // { dg-error "not a template" }
+struct undeclared<int> final { }; // { dg-error "not a class template" }
struct D5 : B3<D5> {};
@@ -44,7 +43,7 @@ int main()
B2 final2 = final;
struct B2 {}; // { dg-error "redefinition" }
struct B2 final; // { dg-error "redeclaration" }
- struct B2 override; // { dg-error "previously declared here" }
+ struct B2 override; // { dg-message "previously declared here" }
struct B2 final {}; // { dg-error "redefinition" }
struct B2 override {}; // { dg-error "cannot specify 'override' for a class" }
B2 override{}; // { dg-error "redeclaration" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/override4.C b/gcc/testsuite/g++.dg/cpp0x/override4.C
new file mode 100644
index 0000000000..7120984b37
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/override4.C
@@ -0,0 +1,45 @@
+// { dg-do compile { target c++11 } }
+// { dg-prune-output "expected ';'" }
+// { dg-prune-output "expected unqualified-id" }
+// { dg-prune-output "declaration does not declare anything" }
+
+struct B
+{
+ virtual auto f() -> void final;
+ virtual auto g() -> void;
+};
+
+struct B2
+{
+ virtual auto f() -> void final {}
+};
+
+struct B3
+{
+ virtual auto f() -> final void; // { dg-error "type" }
+};
+
+struct B4
+{
+ virtual auto f() -> final void {} // { dg-error "type" }
+};
+
+struct D : B
+{
+ virtual auto g() -> void override;
+};
+
+struct D2 : B
+{
+ virtual auto g() -> void override {}
+};
+
+struct D3 : B
+{
+ virtual auto g() -> override void; // { dg-error "type" }
+};
+
+struct D4 : B
+{
+ virtual auto g() -> override void {} // { dg-error "type" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/parse1.C b/gcc/testsuite/g++.dg/cpp0x/parse1.C
index 41811853cd..5a11b7337a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/parse1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/parse1.C
@@ -1,5 +1,5 @@
// PR c++/43509
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
-typedef int B; // { dg-error "" }
+typedef int B; // { dg-message "" }
B::B() {} // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/parse2.C b/gcc/testsuite/g++.dg/cpp0x/parse2.C
new file mode 100644
index 0000000000..77ea14a92a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/parse2.C
@@ -0,0 +1,15 @@
+// PR c++/54526
+// { dg-do compile { target c++11 } }
+
+template <class T>
+struct X { };
+
+struct A { };
+
+int main()
+{
+ X<::A> x;
+}
+
+int a;
+bool b = 0<::a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
index 076493938a..6d8f565e3f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31431-2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename, typename..., typename> void foo(); // { dg-message "note" }
void bar()
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31431.C b/gcc/testsuite/g++.dg/cpp0x/pr31431.C
index afd3237157..428673d180 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31431.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31431.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename..., typename> void foo(); // { dg-message "note" }
void bar()
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31432.C b/gcc/testsuite/g++.dg/cpp0x/pr31432.C
index 8016ee69d7..1f2ea50972 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31432.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31432.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename..., typename> struct A // { dg-error "parameter pack" }
{
static int i;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31434.C b/gcc/testsuite/g++.dg/cpp0x/pr31434.C
index 54786167c3..e70bdd17e9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31434.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31434.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> int foo(const T&) // { dg-error "not expanded with|T" }
{
union { T t; }; // { dg-error "not expanded with|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31437.C b/gcc/testsuite/g++.dg/cpp0x/pr31437.C
index 0b64f7273f..5f7010fe6a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31437.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31437.C
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x" }
-template <typename... T> struct A // { dg-error "candidates|A" }
+// { dg-do compile { target c++11 } }
+template <typename... T> struct A // { dg-message "candidates|A" }
{
A(T* p) { // { dg-error "parameter packs|T" }
(A<T...>*)(p);
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31438.C b/gcc/testsuite/g++.dg/cpp0x/pr31438.C
index 74738830ad..272f4022d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31438.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31438.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename> struct A;
template<typename T, typename... U> struct A<T(U)> // { dg-error "parameter packs|U" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31439.C b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
index 9d22b56c2f..df50e41cdb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31439.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31439.C
@@ -1,7 +1,7 @@
-// { dg-options "-std=c++0x" }
-template<typename...> struct A; // { dg-error "declaration" }
+// { dg-do compile { target c++11 } }
+template<typename...> struct A;
-template<char> struct A<> {}; // { dg-error "not used in partial specialization|anonymous" }
+template<char> struct A<> {}; // { dg-error "not deducible|anonymous|declaration" }
template<typename T, typename... U> struct A<T, U...> : A<U...> {}; // { dg-error "incomplete type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31442.C b/gcc/testsuite/g++.dg/cpp0x/pr31442.C
index f4e411c450..7fd20e7ca5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31442.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31442.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T, T = 0> struct A {}; // { dg-error "parameter packs|T|the end|parameter packs|anonymous" }
struct B
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31443.C b/gcc/testsuite/g++.dg/cpp0x/pr31443.C
index 1eb9d318de..3169312fc3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31443.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31443.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int, typename... T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31444.C b/gcc/testsuite/g++.dg/cpp0x/pr31444.C
index b1f86fe7a7..955562d207 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31444.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31444.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
template<int> void foo(A<T>); // { dg-error "not expanded|T" }
@@ -7,4 +7,4 @@ template<typename... T> struct A
void bar()
{
A<int>().foo<0>(A<int>()); // { dg-error "no member named" }
-};
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31445.C b/gcc/testsuite/g++.dg/cpp0x/pr31445.C
index b3f2b5b09d..89aae9a857 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31445.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31445.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template <typename... T> struct A
{
void foo(T...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr31993.C b/gcc/testsuite/g++.dg/cpp0x/pr31993.C
index 94fb9ccdab..9c3411cf3d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr31993.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr31993.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32114.C b/gcc/testsuite/g++.dg/cpp0x/pr32114.C
index e78dfdf1df..0ae684ce93 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32114.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32114.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename ...T> struct A
{
typedef typename T::X Y; // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32115.C b/gcc/testsuite/g++.dg/cpp0x/pr32115.C
index a721eed4eb..5722aa3365 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32115.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32115.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename ...T, int = 0> struct A {}; // { dg-error "end of" }
A<int> a; // { dg-error "mismatch|expected|invalid" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32125.C b/gcc/testsuite/g++.dg/cpp0x/pr32125.C
index 210a29c082..01844bd497 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32125.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32125.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32126.C b/gcc/testsuite/g++.dg/cpp0x/pr32126.C
index c525cca684..dac1da563a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32126.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32126.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
template<typename...T> struct A<T> // { dg-error "not expanded|T|" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32127.C b/gcc/testsuite/g++.dg/cpp0x/pr32127.C
index 8e4bc0050b..586469d887 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32127.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32127.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...T> struct A
{
static T i; // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32128.C b/gcc/testsuite/g++.dg/cpp0x/pr32128.C
index 5876dbec48..147001e2cf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32128.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32128.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
template<typename...T, typename...U>
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32252.C b/gcc/testsuite/g++.dg/cpp0x/pr32252.C
index 543dc88739..715ad27db8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32252.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32252.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int x[5];
template<int M, int N, int (&... p)[N]> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32253.C b/gcc/testsuite/g++.dg/cpp0x/pr32253.C
index d8f7b03b92..2094b2d981 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32253.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32253.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<void (*... fp)()> struct A
{
A() { fp(); } // { dg-error "not expanded|fp" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr32566.C b/gcc/testsuite/g++.dg/cpp0x/pr32566.C
index f6e7a5b548..fd07432bff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr32566.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr32566.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int...> struct A;
template<template<int> class... T> struct A<T...> {}; // { dg-error "mismatch|expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr33839.C b/gcc/testsuite/g++.dg/cpp0x/pr33839.C
index 0a6610ac99..50bcfe81cf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr33839.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr33839.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<int> struct A;
void foo()
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr33930.C b/gcc/testsuite/g++.dg/cpp0x/pr33930.C
index d1e6fa56b1..8d9312c019 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr33930.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr33930.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
typedef const int* type;
float& foo( const type& ggg );
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr33955.C b/gcc/testsuite/g++.dg/cpp0x/pr33955.C
index cde92dedf9..7d3f6b6649 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr33955.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr33955.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
struct uncvref
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr33996.C b/gcc/testsuite/g++.dg/cpp0x/pr33996.C
index 07590f06f9..3fca7f24f7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr33996.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr33996.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#define BUG
struct type
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34054.C b/gcc/testsuite/g++.dg/cpp0x/pr34054.C
index cfc6c4bdc7..8043f9660e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34054.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34054.C
@@ -1,5 +1,4 @@
// PR c++/34054
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> T foo() {} // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34056.C b/gcc/testsuite/g++.dg/cpp0x/pr34056.C
index 0e5246b6ab..9c5261da8a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34056.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34056.C
@@ -1,6 +1,5 @@
// PR c++/34056
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34057.C b/gcc/testsuite/g++.dg/cpp0x/pr34057.C
index 38da5ff501..d74018e6c5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34057.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34057.C
@@ -1,6 +1,5 @@
// PR c++/34057
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename... T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34058.C b/gcc/testsuite/g++.dg/cpp0x/pr34058.C
index 0cf1faec73..dc9e8364fe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34058.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34058.C
@@ -1,6 +1,5 @@
// PR c++/34058
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename...T> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34060.C b/gcc/testsuite/g++.dg/cpp0x/pr34060.C
index 8e0d321b2a..f485346e71 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34060.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34060.C
@@ -1,6 +1,5 @@
// PR c++/34060
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <int> struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr34061.C b/gcc/testsuite/g++.dg/cpp0x/pr34061.C
index 7d6e71d0e7..64f0ded10d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr34061.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr34061.C
@@ -1,5 +1,4 @@
// PR c++/34061
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<int> class ...T> struct A : T<0> {}; // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr38646.C b/gcc/testsuite/g++.dg/cpp0x/pr38646.C
index f15fc8c29b..7dd53ae263 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr38646.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr38646.C
@@ -1,6 +1,5 @@
/* PR c++/38646 */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
template<int...> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr38795.C b/gcc/testsuite/g++.dg/cpp0x/pr38795.C
index 54fb361d3d..89ce0d368f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr38795.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr38795.C
@@ -1,6 +1,5 @@
// PR c++/38795
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> int foo(int i)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr39639.C b/gcc/testsuite/g++.dg/cpp0x/pr39639.C
index 4fd8b56fd3..5618e80eba 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr39639.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr39639.C
@@ -1,7 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/39639
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-prune-output "template argument 1 is invalid" }
template <class... Types>
struct S
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C b/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C
index 4425aacf62..ff23966051 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr42844-2.C
@@ -1,6 +1,5 @@
// PR c++/42844
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A // { dg-message "user-provided default constructor" }
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr45908.C b/gcc/testsuite/g++.dg/cpp0x/pr45908.C
index 45399b5395..dad8dfde9c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr45908.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr45908.C
@@ -1,8 +1,7 @@
// PR c++/45908
// Testcase by Jonathan Wakely <redi@gcc.gnu.org>
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct vector {
struct iterator { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr47416.C b/gcc/testsuite/g++.dg/cpp0x/pr47416.C
index 55426c1f81..e4eb317e77 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr47416.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr47416.C
@@ -1,6 +1,5 @@
// PR c++/47416
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
namespace std
{
@@ -214,7 +213,7 @@ namespace boost
{
}
};
-};
+}
void
foo (const int &a)
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr47476.C b/gcc/testsuite/g++.dg/cpp0x/pr47476.C
index 1f6f09cccc..bf9a065278 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr47476.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr47476.C
@@ -1,6 +1,5 @@
// PR c++/47476
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int
foo (int a, int b)
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr48522.C b/gcc/testsuite/g++.dg/cpp0x/pr48522.C
index 1543d8a281..560e70b6df 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr48522.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr48522.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename T>
struct Handle
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr50025.C b/gcc/testsuite/g++.dg/cpp0x/pr50025.C
new file mode 100644
index 0000000000..1f7d8d566b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr50025.C
@@ -0,0 +1,40 @@
+// { dg-do compile { target c++11 } }
+
+#include <utility>
+
+class A
+{
+public:
+
+ A(int a, int& b, int&& c)
+ : m_a{a},
+ m_b{b},
+ m_c{std::move(c)}
+ {}
+
+private:
+
+ int m_a;
+ int& m_b;
+ int&& m_c;
+};
+
+
+struct X {};
+
+class B
+{
+public:
+
+ B(X& q, X&& r, const X& s)
+ : m_q{q},
+ m_r{std::move(r)},
+ m_s{s}
+ {}
+
+private:
+
+ X& m_q;
+ X&& m_r;
+ const X& m_s;
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr50491.C b/gcc/testsuite/g++.dg/cpp0x/pr50491.C
index 48e7a1f743..d203a33efe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr50491.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr50491.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct GrandParent {
void *get();
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr50901.C b/gcc/testsuite/g++.dg/cpp0x/pr50901.C
index 439c15cc1c..de82435a43 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr50901.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr50901.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T> int foo(int a)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51150.C b/gcc/testsuite/g++.dg/cpp0x/pr51150.C
index 37eb166b43..af1d1cf2ea 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51150.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51150.C
@@ -1,5 +1,5 @@
// PR c++/51150
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct Clock {
double Now();
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51216.C b/gcc/testsuite/g++.dg/cpp0x/pr51216.C
index 4bdd071475..356b628e45 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51216.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51216.C
@@ -1,5 +1,6 @@
// PR c++/51216
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
void foo()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51225.C b/gcc/testsuite/g++.dg/cpp0x/pr51225.C
index 6fcf8611f9..f80bd0e778 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51225.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51225.C
@@ -1,5 +1,5 @@
// PR c++/51225
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int> struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51226.C b/gcc/testsuite/g++.dg/cpp0x/pr51226.C
new file mode 100644
index 0000000000..1e048ef2c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51226.C
@@ -0,0 +1,9 @@
+// PR c++/51226
+// { dg-do compile { target c++11 } }
+
+template<int> struct A // { dg-error "provided" }
+{
+ enum E : int;
+};
+
+template<> enum A<>::E : int {} // { dg-error "wrong number|expected" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51313.C b/gcc/testsuite/g++.dg/cpp0x/pr51313.C
index ff078e02d6..eb304ba448 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51313.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51313.C
@@ -1,5 +1,5 @@
// PR c++/51313
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class ostream;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51420.C b/gcc/testsuite/g++.dg/cpp0x/pr51420.C
index aec8cb1fcb..7aa80e5363 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51420.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51420.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
void
foo()
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51463.C b/gcc/testsuite/g++.dg/cpp0x/pr51463.C
index 1e8be3b521..6a57e47825 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51463.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51463.C
@@ -1,6 +1,5 @@
// PR c++/51463
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51547.C b/gcc/testsuite/g++.dg/cpp0x/pr51547.C
index 80215f6a34..578a799e7f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51547.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51547.C
@@ -1,5 +1,5 @@
// PR c++/51547
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T>
struct vector
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51619.C b/gcc/testsuite/g++.dg/cpp0x/pr51619.C
index dd51679158..9a73188044 100644
--- a/gcc/testsuite/g++.dg/cpp0x/pr51619.C
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51619.C
@@ -1,6 +1,5 @@
// PR c++/51619
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A { virtual ~A(); };
struct B { A a[1][1]; } b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr51786.C b/gcc/testsuite/g++.dg/cpp0x/pr51786.C
new file mode 100644
index 0000000000..69b7441588
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr51786.C
@@ -0,0 +1,8 @@
+// PR c++/51786
+// { dg-do compile { target c++11 } }
+
+enum E {};
+struct A {};
+
+void foo() { decltype(E{}); } // { dg-error "does not declare anything" }
+void bar() { decltype(A{}); } // { dg-error "does not declare anything" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr52440.C b/gcc/testsuite/g++.dg/cpp0x/pr52440.C
new file mode 100644
index 0000000000..0210f53b9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr52440.C
@@ -0,0 +1,27 @@
+// PR c++/52440
+// { dg-do compile { target c++11 } }
+
+template<bool>
+struct V
+{
+ typedef void type;
+};
+
+template<typename T>
+struct X
+{
+ template<typename>
+ static constexpr bool always_true()
+ {
+ return true;
+ }
+
+ template<typename U,
+ typename = typename V<always_true<U>()>::type>
+ X(U &&) {}
+};
+
+int main()
+{
+ X<int> x(42);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr52744.C b/gcc/testsuite/g++.dg/cpp0x/pr52744.C
new file mode 100644
index 0000000000..1a01fb2957
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr52744.C
@@ -0,0 +1,83 @@
+// PR c++/52744
+// { dg-do compile { target c++11 } }
+
+struct T
+{
+ int a;
+ void b(){}
+ int c(int)
+ {
+ return 1;
+ }
+};
+
+template<typename CT, CT> struct member_helper;
+
+template<typename FT, FT(T::*mem)>
+struct member_helper<FT(T::*), mem>
+{
+ static const char* worker()
+ {
+ return "for members";
+ }
+};
+
+template<typename Return, typename... Args, Return(T::*fun)(Args...)>
+struct member_helper<Return(T::*)(Args...), fun>
+{
+ static const char* worker()
+ {
+ return "for member functions returning non void";
+ }
+};
+
+template<typename... Args, void(T::*fun)(Args...)>
+struct member_helper<void(T::*)(Args...), fun>
+{
+ static const char* worker()
+ {
+ return "for member functions returning void";
+ }
+};
+
+void member_test()
+{
+ member_helper<decltype(&T::a), &T::a>::worker();
+ member_helper<decltype(&T::b), &T::b>::worker();
+ member_helper<decltype(&T::c), &T::c>::worker();
+}
+
+typedef void lua_State;
+
+template<typename T, T> class function_helper
+{
+ static_assert(sizeof(T) != sizeof(T),
+ "Error: function_helper works with functions (duh)");
+};
+
+template<typename Return, typename... Args, Return(*func)(Args...)>
+struct function_helper<Return(*)(Args...), func>
+{
+ static int wrapper(lua_State* l)
+ {
+ return 1;
+ }
+};
+
+template<typename... Args, void(*func)(Args...)>
+struct function_helper<void(*)(Args...), func>
+{
+ static int wrapper(lua_State* l)
+ {
+ return 0;
+ }
+};
+
+int ciao(int){ return 0; }
+void ciao2(int){}
+
+void function_test()
+{
+ function_helper<decltype(&ciao), &ciao>::wrapper(0);
+ function_helper<decltype(&ciao2), &ciao2>::wrapper(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr54318.C b/gcc/testsuite/g++.dg/cpp0x/pr54318.C
new file mode 100644
index 0000000000..4dac31b883
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr54318.C
@@ -0,0 +1,24 @@
+// PR c++/54318
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct wrapped
+{
+ typedef T type;
+};
+
+template <typename T>
+typename T::type unwrap1(T);
+
+int unwrap(int);
+
+template <typename T>
+auto unwrap(T t) -> decltype(unwrap(unwrap1(t)))
+{
+ return unwrap(unwrap1(t));
+}
+
+int main()
+{
+ unwrap(wrapped<wrapped<int>>());
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr54323.C b/gcc/testsuite/g++.dg/cpp0x/pr54323.C
new file mode 100644
index 0000000000..71b6c7192d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr54323.C
@@ -0,0 +1,37 @@
+// PR c++/54323
+// { dg-do compile { target c++11 } }
+
+template<bool, typename T = void>
+struct enable_if { };
+
+template<typename T>
+struct enable_if<true, T>
+{ typedef T type; };
+
+template<template<typename> class CRTP, typename T>
+class Base
+{
+public:
+ template<template<typename> class CRTP0, typename T0, class>
+ friend int func(const Base<CRTP0, T0>& rhs);
+
+protected:
+ int n;
+};
+
+template<template<typename> class CRTP0, typename T0,
+ class = typename enable_if<true>::type>
+int func(const Base<CRTP0, T0>& rhs)
+{
+ return rhs.n;
+}
+
+template<typename T>
+class Derived : public Base<Derived, T> {};
+
+int main()
+{
+ Derived<int> x;
+ func(x);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57101.C b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
new file mode 100644
index 0000000000..94b576f4b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57101.C
@@ -0,0 +1,221 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fcompare-debug" }
+
+typedef long unsigned size_t;
+namespace
+{
+ template < typename _Tp, _Tp __v > struct integral_constant
+ {
+ static const _Tp value = __v;
+ };
+ typedef integral_constant < bool, false > false_type;
+ template < typename > struct remove_cv;
+ template < typename > struct __is_void_helper:false_type
+ {
+ };
+ template
+ <
+ typename
+ _Tp
+ >
+ struct
+ is_void:integral_constant
+ < bool, (__is_void_helper < typename remove_cv < _Tp >::type >::value) >
+ {
+ };
+ template < typename > struct is_function:false_type
+ {
+ };
+ template < typename _Tp > struct remove_const
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct remove_volatile
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct remove_cv
+ {
+ typedef
+ typename
+ remove_const < typename remove_volatile < _Tp >::type >::type type;
+ };
+ template < typename > struct is_lvalue_reference:false_type
+ {
+ };
+ template < typename _Tp, bool = is_void < _Tp >::value > struct __add_rvalue_reference_helper
+ {
+ typedef _Tp type;
+ };
+ template
+ <
+ typename
+ _Tp > struct add_rvalue_reference:__add_rvalue_reference_helper < _Tp >
+ {
+ };
+ template
+ < typename _Tp > typename add_rvalue_reference < _Tp >::type declval ();
+ template
+ <
+ typename,
+ typename
+ _To, bool = (is_function < _To >::value) > struct __is_convertible_helper;
+ template
+ <
+ typename
+ _From, typename _To > struct __is_convertible_helper <_From, _To, false >
+ {
+ static const bool __value = sizeof ((declval < _From > ()));
+ };
+ template
+ <
+ typename
+ _From,
+ typename
+ _To
+ >
+ struct
+ is_convertible:integral_constant
+ < bool, __is_convertible_helper < _From, _To >::__value >
+ {
+ };
+ template < bool, typename _Tp = void >struct enable_if
+ {
+ typedef _Tp type;
+ };
+ template < typename _Tp > struct identity
+ {
+ typedef _Tp type;
+ };
+ template
+ <
+ typename
+ _Tp
+ >
+ typename
+ enable_if
+ <
+ is_lvalue_reference
+ < _Tp >::value, _Tp >::type forward (typename identity < _Tp >::type)
+ {
+ return 0;
+
+ }
+ template < class _T1, class > struct pair
+ {
+ _T1 first;
+ template < class _U1, class = typename enable_if < is_convertible < _U1, _T1 >::value >::type > pair (_U1 __x):
+ first
+ (forward < _U1 > (__x))
+ {
+ }
+ };
+}
+
+namespace __gnu_cxx
+{
+ template < typename > class new_allocator
+ {
+ };
+}
+
+namespace std
+{
+ template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp >
+ {
+ public:
+ template < typename > struct rebind
+ {
+ typedef allocator other;
+ };
+ };
+ template < typename, typename > struct unary_function;
+ template < typename, typename, typename > struct binary_function
+ {
+ };
+ template < typename _Tp > struct less:binary_function < _Tp, _Tp, bool >
+ {
+ };
+ template
+ <
+ typename
+ _Pair
+ > struct _Select1st:unary_function < _Pair, typename _Pair::first_type >
+ {
+ };
+ template < typename > struct _Rb_tree_node;
+ template
+ <
+ typename,
+ typename
+ _Val,
+ typename,
+ typename _Compare, typename _Alloc = allocator < _Val > >class _Rb_tree
+ {
+ typedef
+ typename
+ _Alloc::template
+ rebind < _Rb_tree_node < _Val > >::other _Node_allocator;
+ public:
+ typedef _Alloc allocator_type;
+ template < typename _Key_compare > struct _Rb_tree_impl
+ {
+ _Rb_tree_impl (_Key_compare, _Node_allocator);
+ };
+ _Rb_tree_impl < _Compare > _M_impl;
+ _Rb_tree (_Compare __comp, allocator_type __a):
+ _M_impl (__comp, __a)
+ {
+ }
+ };
+ template < class _E > class initializer_list
+ {
+ typedef size_t size_type;
+ typedef _E *iterator;
+ iterator _M_array;
+ size_type _M_len;
+ };
+ template
+ <
+ typename
+ _Key,
+ typename
+ _Tp,
+ typename
+ _Compare
+ =
+ less
+ <
+ _Key >, typename _Alloc = allocator < pair < _Key, _Tp > > >class multimap
+ {
+ typedef _Key key_type;
+ typedef pair < _Key, _Tp > value_type;
+ typedef _Compare key_compare;
+ typedef _Alloc allocator_type;
+ typedef
+ _Rb_tree
+ <
+ key_type,
+ value_type, _Select1st < value_type >, key_compare > _Rep_type;
+ _Rep_type _M_t;
+ public:
+ multimap (initializer_list < value_type >, _Compare __comp = _Compare (), allocator_type __a = allocator_type ()):
+ _M_t
+ (__comp, __a)
+ {
+ }
+ };
+}
+
+using namespace std;
+void
+test01 ()
+{
+ typedef multimap < int, double >Container;
+ Container (
+ {
+ {
+ 1}
+ }
+ );
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57172.C b/gcc/testsuite/g++.dg/cpp0x/pr57172.C
new file mode 100644
index 0000000000..2108838136
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57172.C
@@ -0,0 +1,7 @@
+// PR c++/57172
+// { dg-do compile { target c++11 } }
+
+template <typename T> int f (T&) { return 0; }
+template <typename T> int f (T&&) = delete;
+int i;
+int j = f (i);
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57416.C b/gcc/testsuite/g++.dg/cpp0x/pr57416.C
new file mode 100644
index 0000000000..104f1a7acb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57416.C
@@ -0,0 +1,45 @@
+// PR c++/57416
+// { dg-do compile { target c++11 } }
+
+struct Nothing
+{
+};
+
+template <class PARENTDATA>
+void func3 (PARENTDATA & p_parent_data)
+{
+ struct Data
+ {
+ PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
+ } data;
+}
+
+template <class PARENTDATA>
+void func2 (PARENTDATA & p_parent_data)
+{
+ struct Data
+ {
+ PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
+ } data;
+
+ data.parent_data.x = 5;
+ func3(data);
+}
+
+template <class PARENTDATA>
+void func1 (PARENTDATA & p_parent_data)
+{
+ struct Data
+ {
+ PARENTDATA & parent_data = p_parent_data; // { dg-error "parameter" }
+ int x = 1;
+ } data;
+
+ func2(data);
+}
+
+int main()
+{
+ Nothing nothing;
+ func1(nothing);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr57981.C b/gcc/testsuite/g++.dg/cpp0x/pr57981.C
new file mode 100644
index 0000000000..33f46371eb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr57981.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall -Wextra" }
+
+template<class T>
+void f(T t, void* = 0) // { dg-warning "unused parameter" }
+{
+}
+
+template<class T>
+auto g(T t) -> decltype(f(t))
+{
+ f(t);
+}
+
+int main()
+{
+ g(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58072.C b/gcc/testsuite/g++.dg/cpp0x/pr58072.C
new file mode 100644
index 0000000000..6d48a555b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58072.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++11 } }
+
+// PR c++/58072
+
+extern 'c'void*blah(void*); // { dg-error "expected unqualified-id before user-defined character literal" }
+extern L'c'void*Lblah(void*); // { dg-error "expected unqualified-id before user-defined character literal" }
+extern u'c'void*ublah(void*); // { dg-error "expected unqualified-id before user-defined character literal" }
+extern U'c'void*Ublah(void*); // { dg-error "expected unqualified-id before user-defined character literal" }
+
+extern "c"void*strblah(void*); // { dg-error "expected unqualified-id before user-defined string literal" }
+extern L"c"void*Lstrblah(void*); // { dg-error "expected unqualified-id before user-defined string literal" }
+extern u"c"void*ustrblah(void*); // { dg-error "expected unqualified-id before user-defined string literal" }
+extern U"c"void*Ustrblah(void*); // { dg-error "expected unqualified-id before user-defined string literal" }
+extern u8"c"void*u8strblah(void*); // { dg-error "expected unqualified-id before user-defined string literal" }
+
+extern 123void*ULLblah(void*); // { dg-error "expected unqualified-id before numeric constant" }
+extern 123.456void*Ldblblah(void*); // { dg-error "expected unqualified-id before numeric constant" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58080.C b/gcc/testsuite/g++.dg/cpp0x/pr58080.C
new file mode 100644
index 0000000000..82f200df04
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58080.C
@@ -0,0 +1,14 @@
+// PR c++/58080
+// { dg-do compile { target c++11 } }
+
+template<class A, class B>
+struct Eval
+{
+ void foo(A a, B b) { bar(a,b, 0); }
+ auto bar(A a, B b, decltype(a+b)* _) -> decltype(a+b) { return a+b; } // { dg-error "pointer" }
+};
+
+int main()
+{
+ Eval<int,void*> eiv; eiv.foo(0,0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58155.C b/gcc/testsuite/g++.dg/cpp0x/pr58155.C
new file mode 100644
index 0000000000..60b02ab657
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58155.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+
+#define BAZ "baz"
+
+#if 0
+
+"bar"BAZ
+
+R"(
+ bar
+)"BAZ
+
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58510.C b/gcc/testsuite/g++.dg/cpp0x/pr58510.C
new file mode 100644
index 0000000000..71f2520982
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58510.C
@@ -0,0 +1,11 @@
+// PR c++/58510
+// { dg-do compile { target c++11 } }
+
+void foo()
+{
+ union
+ { // { dg-error "multiple" }
+ int i = 0;
+ char c = 0;
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58563.C b/gcc/testsuite/g++.dg/cpp0x/pr58563.C
new file mode 100644
index 0000000000..c9e3e308af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58563.C
@@ -0,0 +1,8 @@
+// PR c++/58563
+// { dg-do compile { target c++11 } }
+
+template<int> void foo()
+{
+ enum E {};
+ E().E::~T(); // { dg-error "not a class" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58674.C b/gcc/testsuite/g++.dg/cpp0x/pr58674.C
new file mode 100644
index 0000000000..fe97c6de97
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58674.C
@@ -0,0 +1,18 @@
+// PR c++/58674
+// { dg-do compile { target c++11 } }
+
+template<int> struct A {};
+
+template<int N> using B = A<N>;
+
+template<typename T> struct C
+{
+ B<T::i> b; // { dg-error "not usable" }
+};
+
+struct X
+{
+ static const int i;
+};
+
+C<X> c;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58707.C b/gcc/testsuite/g++.dg/cpp0x/pr58707.C
new file mode 100644
index 0000000000..12f2e30978
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58707.C
@@ -0,0 +1,6 @@
+// PR c++/58707
+// { dg-do compile { target c++11 } }
+
+template<int i> class TC { };
+constexpr int foo[] = { 42 };
+TC<foo[0 > 1]> bar;
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58781.C b/gcc/testsuite/g++.dg/cpp0x/pr58781.C
new file mode 100644
index 0000000000..58c972f90f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58781.C
@@ -0,0 +1,18 @@
+// PR c++/58781
+// { dg-do compile { target c++11 } }
+
+#include <cstddef>
+
+int
+operator""_s(const char32_t *a, size_t b)
+{
+ return 0;
+}
+
+int
+f()
+{
+ using a = decltype(U"\x1181"_s);
+ using b = decltype(U"\x8111"_s);
+ using c = decltype(U" \x1181"_s);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr58871.C b/gcc/testsuite/g++.dg/cpp0x/pr58871.C
new file mode 100644
index 0000000000..5920f5c3a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr58871.C
@@ -0,0 +1,12 @@
+// PR c++/59111
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct A : virtual T // { dg-error "base type" }
+{
+ A();
+ A(const A&);
+};
+
+template<typename T> A<T>::A(const A<T>&) = default;
+
+A<int> a = A<int>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr59111.C b/gcc/testsuite/g++.dg/cpp0x/pr59111.C
new file mode 100644
index 0000000000..4e48854418
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr59111.C
@@ -0,0 +1,5 @@
+// PR c++/59111
+// { dg-do compile { target c++11 } }
+
+auto& foo(); // { dg-error "type specifier without trailing return type" "" { target { ! c++1y } } }
+int i = foo(); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr59641.C b/gcc/testsuite/g++.dg/cpp0x/pr59641.C
new file mode 100644
index 0000000000..36af96a892
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr59641.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+typedef int T __attribute__((vector_size(2*sizeof(int))));
+
+void foo(T& r, const T& a, const T& b)
+{
+ constexpr T c = a < b; // { dg-error "constant" }
+ r = c ? a : b;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr60047.C b/gcc/testsuite/g++.dg/cpp0x/pr60047.C
new file mode 100644
index 0000000000..ab73e752e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr60047.C
@@ -0,0 +1,14 @@
+// PR c++/60047
+// { dg-do compile { target c++11 } }
+
+struct B { };
+
+template<typename T> struct A : virtual B
+{
+ A();
+ A(const A&);
+};
+
+template<typename T> A<T>::A(const A<T>&) = default;
+
+A<int> a = A<int>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr60215.C b/gcc/testsuite/g++.dg/cpp0x/pr60215.C
new file mode 100644
index 0000000000..2970017419
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr60215.C
@@ -0,0 +1,8 @@
+// PR c++/60215
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ void foo();
+ int i : foo; // { dg-error "width" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/pr60249.C b/gcc/testsuite/g++.dg/cpp0x/pr60249.C
new file mode 100644
index 0000000000..e650dcb452
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/pr60249.C
@@ -0,0 +1,6 @@
+// PR c++/60249
+// { dg-do compile { target c++11 } }
+
+decltype(""_) x; // { dg-error "unable to find string literal operator" }
+
+// { dg-error "invalid type in declaration before" "invalid" { target *-*-* } 4 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C b/gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C
index b6c81d5f46..ed12655af3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/ptrmem-cst-arg1.C
@@ -1,5 +1,5 @@
// Origin PR c++/51476
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
template<int> struct A {};
struct B
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for1.C b/gcc/testsuite/g++.dg/cpp0x/range-for1.C
index 49e2ecd0bd..4fecdc7154 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for1.C
@@ -1,8 +1,7 @@
// Test for range-based for loop
// Test the loop with an array
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
extern "C" void abort();
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for10.C b/gcc/testsuite/g++.dg/cpp0x/range-for10.C
index 662074890d..1397830908 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for10.C
@@ -1,6 +1,6 @@
// PR c++/47388
-// { dg-do compile }
-// { dg-options "-fno-for-scope -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-for-scope" }
template <int>
void
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for11.C b/gcc/testsuite/g++.dg/cpp0x/range-for11.C
index d02519a251..d7dde91bc1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for11.C
@@ -2,8 +2,7 @@
// Test the loop with a custom iterator
// with begin/end as member functions
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct iterator
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for12.C b/gcc/testsuite/g++.dg/cpp0x/range-for12.C
index 9b405dc620..5a2a7d1907 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for12.C
@@ -1,8 +1,7 @@
// Test for range-based for loop with templates
// and begin/end as member functions
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
/* Preliminary declarations */
namespace pre
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for13.C b/gcc/testsuite/g++.dg/cpp0x/range-for13.C
index 7ebf0c563e..ab7bdde478 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for13.C
@@ -1,8 +1,7 @@
// Test for errors in range-based for loops
// with member begin/end
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
//These should not be used
template<typename T> int *begin(T &t)
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for14.C b/gcc/testsuite/g++.dg/cpp0x/range-for14.C
index 26ae477d70..f43e1abcde 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for14.C
@@ -1,8 +1,7 @@
// Test for other range-based for loops with
// begin/end member functions
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
//These should not be used
template<typename T> int *begin(T &t)
@@ -59,7 +58,7 @@ void test1()
struct base_begin
{
- int *begin(); // { dg-error "" }
+ int *begin(); // { dg-message "" }
};
struct base_end
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for15.C b/gcc/testsuite/g++.dg/cpp0x/range-for15.C
index 38f330771e..5dd442dd1d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for15.C
@@ -1,8 +1,7 @@
// Test for range-based for loop with templates
// and begin/end as member (non-)virtual functions
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
unsigned int g;
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for16.C b/gcc/testsuite/g++.dg/cpp0x/range-for16.C
index 86cc2a828b..bcc09cb1a0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for16.C
@@ -1,8 +1,7 @@
// Test for range-based for loop with arrays of
// incomplete type or unknown size
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
extern int a[10];
extern int b[];
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for17.C b/gcc/testsuite/g++.dg/cpp0x/range-for17.C
index eb888d9ab6..6cc3f9be11 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for17.C
@@ -1,11 +1,11 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern "C" int printf (const char *, ...);
enum E { e1, e2, e3, X };
E operator*(E e) { return e; }
E begin(E e) { return e; }
-E end(E e) { return X; };
+E end(E e) { return X; }
E operator++(E& e) { return e = E(e+1); }
int main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for18.C b/gcc/testsuite/g++.dg/cpp0x/range-for18.C
index 386d73d181..be436380e6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for18.C
@@ -1,7 +1,6 @@
// PR c++/48994
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename T>
struct myvec
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for19.C b/gcc/testsuite/g++.dg/cpp0x/range-for19.C
index 4306fbda6c..e3f446f370 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for19.C
@@ -1,7 +1,6 @@
// PR c++/49838
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int main()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for2.C b/gcc/testsuite/g++.dg/cpp0x/range-for2.C
index 17eb41dba7..ea845ee428 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for2.C
@@ -2,8 +2,7 @@
// Test the loop with a custom iterator
// with begin/end in an associated namespace
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct iterator
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for20.C b/gcc/testsuite/g++.dg/cpp0x/range-for20.C
index 890eb0aeaf..eb3cfe7369 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for20.C
@@ -1,6 +1,6 @@
// PR c++/49834
// PR c++/50020
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for21.C b/gcc/testsuite/g++.dg/cpp0x/range-for21.C
index 07bb95fbf2..4990b480be 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for21.C
@@ -1,5 +1,5 @@
// PR c++/49983
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
void f(T t)
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for22.C b/gcc/testsuite/g++.dg/cpp0x/range-for22.C
index 5fef5e6acc..d4bb3601ff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for22.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<int I> void f() {
for (auto i: {I} );
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for23.C b/gcc/testsuite/g++.dg/cpp0x/range-for23.C
new file mode 100644
index 0000000000..849682c023
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for23.C
@@ -0,0 +1,8 @@
+// PR c++/56722
+// { dg-do compile { target c++11 } }
+
+int main()
+{
+ for (const auto& i, 21) // { dg-error "has no initializer|expected" }
+ i;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for25.C b/gcc/testsuite/g++.dg/cpp0x/range-for25.C
new file mode 100644
index 0000000000..8ba9f652d5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for25.C
@@ -0,0 +1,30 @@
+// PR c++/57243
+// { dg-require-effective-target c++11 }
+
+struct snarf
+{
+ template <class T>
+ void get() {}
+};
+
+template <class T>
+struct container
+{
+ snarf * begin() { return nullptr; }
+ snarf * end() { return nullptr; }
+};
+
+template <class T>
+void foo()
+{
+ container<int> arr;
+
+ for( auto i : arr )
+ i.get<int>();
+}
+
+int main()
+{
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for26.C b/gcc/testsuite/g++.dg/cpp0x/range-for26.C
new file mode 100644
index 0000000000..71359cde6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for26.C
@@ -0,0 +1,7 @@
+// PR c++/58503
+// { dg-require-effective-target c++11 }
+
+template<int> void foo()
+{
+ for (auto i : 0) {} // { dg-error "there are no arguments" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for27.C b/gcc/testsuite/g++.dg/cpp0x/range-for27.C
new file mode 100644
index 0000000000..a9cfb8ebc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for27.C
@@ -0,0 +1,15 @@
+// PR c++/58503
+// { dg-require-effective-target c++11 }
+// { dg-options "-fpermissive -w" }
+
+struct c { };
+
+template<int> void foo()
+{
+ for (auto i : c()) { }
+}
+
+c* begin(const c&);
+c* end(const c&);
+
+template void foo<1>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for28.C b/gcc/testsuite/g++.dg/cpp0x/range-for28.C
new file mode 100644
index 0000000000..5007349949
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for28.C
@@ -0,0 +1,11 @@
+// PR c++/59165
+// { dg-require-effective-target c++11 }
+
+namespace std {
+int* begin(int i) { return (int*)0; }
+int* end(int i) { return (int*)0; }
+}
+
+int main() {
+ for (int a : 10) { } // { dg-error "was not declared" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for3.C b/gcc/testsuite/g++.dg/cpp0x/range-for3.C
index 85115a38f5..cc6deaf3b9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for3.C
@@ -2,8 +2,7 @@
// Test the loop with a custom iterator
// with begin/end in std
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct iterator
{
@@ -36,7 +35,7 @@ namespace std
int main()
{
container c(1,4);
- for (int it : c)
+ for (int it : c) // { dg-error "was not declared" }
{
}
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for4.C b/gcc/testsuite/g++.dg/cpp0x/range-for4.C
index afbcf14b26..8a3117b62d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for4.C
@@ -1,7 +1,6 @@
// Test for range-based for loop with templates
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
/* Preliminary declarations */
namespace pre
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for5.C b/gcc/testsuite/g++.dg/cpp0x/range-for5.C
index fd6f7618f9..bf044068ba 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for5.C
@@ -1,7 +1,6 @@
// Test for errors in range-based for loops
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct container
{
@@ -47,7 +46,7 @@ void test1()
//Check the correct scopes
int i;
- for (int i : a) // { dg-error "previously declared" }
+ for (int i : a) // { dg-message "previously declared" }
{
int i; // { dg-error "redeclaration" }
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for6.C b/gcc/testsuite/g++.dg/cpp0x/range-for6.C
index 775507f8de..366499a34d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for6.C
@@ -1,8 +1,7 @@
// Test for range-based for loop
// Test the loop with an initializer_list
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for7.C b/gcc/testsuite/g++.dg/cpp0x/range-for7.C
index ad89dc201b..3e88362e4e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for7.C
@@ -1,8 +1,7 @@
// PR c++/46056
// Check that range-based for loop calls destructors
// when required
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
extern "C" void abort();
int value_counter = 0, it_counter = 0, seq_counter = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/range-for8.C b/gcc/testsuite/g++.dg/cpp0x/range-for8.C
index 641dfe052c..a389f66f60 100644
--- a/gcc/testsuite/g++.dg/cpp0x/range-for8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/range-for8.C
@@ -1,8 +1,7 @@
// Test for range-based for loop when the declarator declares
// a new type
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual-mangle1.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual-mangle1.C
new file mode 100644
index 0000000000..c6ef0792b5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual-mangle1.C
@@ -0,0 +1,37 @@
+// PR c++/56821
+// { dg-require-effective-target c++11 }
+
+struct A {
+ // { dg-final { scan-assembler "_ZNR1A1fEv" } }
+ void f() & {}
+ // { dg-final { scan-assembler "_ZNO1A1gEv" } }
+ void g() && {}
+ // { dg-final { scan-assembler "_ZNKR1A1hEv" } }
+ void h() const & {}
+};
+
+// { dg-final { scan-assembler "_Z1jM1AFvvRE" } }
+void j(void (A::*)() &) { }
+// { dg-final { scan-assembler "_Z1kM1AFvvOE" } }
+void k(void (A::*)() &&) { }
+// { dg-final { scan-assembler "_Z1lM1AKFvvRE" } }
+void l(void (A::*)() const &) { }
+
+// { dg-final { scan-assembler "_Z1mIFvvOEEvM1AT_" } }
+// { dg-final { scan-assembler "_Z1mIFvvREEvM1AT_" } }
+// { dg-final { scan-assembler "_Z1mIKFvvREEvM1AT_" } }
+template <typename T>
+void m(T A::*) {}
+
+// { dg-final { scan-assembler "_Z1nIM1AFvvOEEvT_" } }
+// { dg-final { scan-assembler "_Z1nIM1AFvvREEvT_" } }
+// { dg-final { scan-assembler "_Z1nIM1AKFvvREEvT_" } }
+template <typename T>
+void n(T) {}
+
+int main()
+{
+ j(&A::f); k(&A::g); l(&A::h);
+ m(&A::f); m(&A::g); m(&A::h);
+ n(&A::f); n(&A::g); n(&A::h);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual-multi-neg.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual-multi-neg.C
new file mode 100644
index 0000000000..5be89423f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual-multi-neg.C
@@ -0,0 +1,7 @@
+// { dg-require-effective-target c++11 }
+
+class Foo
+{
+public:
+ void bar() const && & { } // { dg-error "multiple ref-qualifiers" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual1.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual1.C
new file mode 100644
index 0000000000..7fa826c3db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual1.C
@@ -0,0 +1,30 @@
+// { dg-require-effective-target c++11 }
+
+template <class,class> struct ST;
+template <class T> struct ST<T,T> {};
+
+struct A
+{
+ int f() &;
+ char f() &&;
+};
+
+template <class T> struct B
+{
+ int f() &;
+ char f() &&;
+};
+
+int main()
+{
+ A a;
+ a.f();
+ A().f();
+ ST<decltype(a.f()), int>();
+ ST<decltype(A().f()), char>();
+ B<int> b;
+ b.f();
+ B<int>().f();
+ ST<decltype(b.f()), int>();
+ ST<decltype(B<int>().f()), char>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual10.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual10.C
new file mode 100644
index 0000000000..1b6c54fd48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual10.C
@@ -0,0 +1,13 @@
+// PR c++/57252
+// { dg-require-effective-target c++11 }
+
+struct foo {
+ void bar() & {}
+ void bar() && {}
+};
+
+int main()
+{
+ auto p = &foo::bar; // { dg-error "" }
+ (foo{}.*p)();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C
new file mode 100644
index 0000000000..15dd049f22
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual11.C
@@ -0,0 +1,10 @@
+// PR c++/57253
+// { dg-require-effective-target c++11 }
+
+template<typename T> struct foo;
+
+template<> struct foo<void()&> {};
+template<> struct foo<void()> {};
+
+int main()
+{}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual12.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual12.C
new file mode 100644
index 0000000000..b0a16fe943
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual12.C
@@ -0,0 +1,22 @@
+// PR c++/57254
+// { dg-require-effective-target c++11 }
+
+struct foo {
+ template<typename T>
+ void bar(T) &;
+
+ template<typename T>
+ void bar(T) &&;
+};
+
+template<typename T>
+void foo::bar(T) & {}
+
+template<typename T>
+void foo::bar(T) && {}
+
+int main()
+{
+ foo f;
+ f.bar(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual13.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual13.C
new file mode 100644
index 0000000000..84d3b0f2dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual13.C
@@ -0,0 +1,29 @@
+// PR c++/57388
+// { dg-require-effective-target c++11 }
+
+template<class> struct A
+{
+ static constexpr bool value = false;
+};
+
+template<class Res, class... Args>
+struct A<Res(Args...)>
+{
+ static constexpr bool value = true;
+};
+
+template<class Res, class... Args>
+struct A<Res(Args...) const &>
+{
+ static constexpr bool value = true;
+};
+
+template<class Res, class... Args>
+struct A<Res(Args...) const &&>
+{
+ static constexpr bool value = true;
+};
+
+static_assert(A<void()>::value, "Ouch");
+static_assert(A<void() const &>::value, ""); // #1
+static_assert(A<void() const &&>::value, ""); // #2
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C
new file mode 100644
index 0000000000..8e55551aeb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual14.C
@@ -0,0 +1,18 @@
+// PR c++/57825
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+struct target_class
+{};
+
+template<typename Class, typename Ret, typename... Args>
+struct target_class<Ret (Class::*)(Args...)>
+{};
+
+template<typename Class, typename Ret, typename... Args>
+struct target_class<Ret (Class::*)(Args...) &>
+{};
+
+template<typename Class, typename Ret, typename... Args>
+struct target_class<Ret (Class::*)(Args...) &&>
+{};
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual15.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual15.C
new file mode 100644
index 0000000000..ca333c2e28
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual15.C
@@ -0,0 +1,13 @@
+// PR c++/59296
+// { dg-do compile { target c++11 } }
+
+struct Type
+{
+ void get() const& { }
+ void get() const&& { }
+};
+
+int main()
+{
+ Type{}.get();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual2.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual2.C
new file mode 100644
index 0000000000..fa09ab48a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual2.C
@@ -0,0 +1,75 @@
+// In a .* expression whose object expression is an rvalue, the program is
+// ill-formed if the second operand is a pointer to member function with
+// ref-qualifier &. In a .* expression whose object expression is an
+// lvalue, the program is ill-formed if the second operand is a pointer to
+// member function with ref-qualifier &&.
+
+// { dg-require-effective-target c++11 }
+
+struct A {
+ void f() &;
+ void g() &&;
+ void h();
+};
+
+void one()
+{
+ A a;
+
+ void (A::*p)() & = &A::f;
+ (a.*p)();
+ (A().*p)(); // { dg-error "" }
+
+ p = &A::g; // { dg-error "" }
+ p = &A::h; // { dg-error "" }
+
+ void (A::*p2)() && = &A::g;
+ (A().*p2)();
+ (a.*p2)(); // { dg-error "" }
+ p2 = &A::f; // { dg-error "" }
+ p2 = &A::h; // { dg-error "" }
+
+ void (A::*p3)() = &A::h;
+ (a.*p3)();
+ (A().*p3)();
+ p3 = &A::f; // { dg-error "" }
+ p3 = &A::g; // { dg-error "" }
+}
+
+template <class T>
+struct B {
+ void f() &;
+ void g() &&;
+ void h();
+};
+
+template <class T>
+void two()
+{
+ B<T> a;
+
+ void (B<T>::*p)() & = &B<T>::f;
+ (a.*p)();
+ (B<T>().*p)(); // { dg-error "" }
+
+ p = &B<T>::g; // { dg-error "" }
+ p = &B<T>::h; // { dg-error "" }
+
+ void (B<T>::*p2)() && = &B<T>::g;
+ (B<T>().*p2)();
+ (a.*p2)(); // { dg-error "" }
+ p2 = &B<T>::f; // { dg-error "" }
+ p2 = &B<T>::h; // { dg-error "" }
+
+ void (B<T>::*p3)() = &B<T>::h;
+ (a.*p3)();
+ (B<T>().*p3)();
+ p3 = &B<T>::f; // { dg-error "" }
+ p3 = &B<T>::g; // { dg-error "" }
+}
+
+int main()
+{
+ one();
+ two<int>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual3.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual3.C
new file mode 100644
index 0000000000..1b21196321
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual3.C
@@ -0,0 +1,29 @@
+// An explicitly defaulted function can have a ref-qualifier.
+
+// { dg-require-effective-target c++11 }
+
+struct A {
+ A& operator=(const A&) & = default;
+};
+
+template<class T>
+struct B {
+ B& operator=(const B&) & = default;
+};
+
+template<class T>
+void f()
+{
+ B<T> b;
+ b = B<T>();
+ B<T>() = b; // { dg-error "" }
+}
+
+int main()
+{
+ A a;
+ a = A();
+ A() = a; // { dg-error "" }
+
+ f<int>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual4.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual4.C
new file mode 100644
index 0000000000..5a0ee162fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual4.C
@@ -0,0 +1,14 @@
+// 12.1: A constructor shall not be declared with a ref-qualifier.
+// 12.4: A destructor shall not be declared with a ref-qualifier.
+
+// { dg-require-effective-target c++11 }
+
+struct A {
+ A() & = default; // { dg-error "constructor" }
+ ~A() & = default; // { dg-error "destructor" }
+};
+
+int main()
+{
+ A a;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
new file mode 100644
index 0000000000..e3d26e5a78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual5.C
@@ -0,0 +1,13 @@
+// 13.1: ...cannot be overloaded if any of them, but not all, have a
+// ref-qualifier.
+
+// { dg-require-effective-target c++11 }
+
+class Y {
+ void h() &;
+ void h() const &; // OK
+ void h() &&; // OK, all declarations have a ref-qualifier
+ void i() &; // { dg-message "" }
+ void i() const; // { dg-error "" } prior declaration of i
+ // has a ref-qualifier
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual6.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual6.C
new file mode 100644
index 0000000000..02e3f6e683
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual6.C
@@ -0,0 +1,15 @@
+// Binding an rvalue to && beats binding it to const& (13.3.3.2).
+
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ int operator+(int) &&;
+};
+
+void operator+ (const A&, int);
+
+int main()
+{
+ return A() + 42;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual7.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual7.C
new file mode 100644
index 0000000000..2430665db3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual7.C
@@ -0,0 +1,19 @@
+// typedef test
+// { dg-require-effective-target c++11 }
+
+typedef void F() &;
+
+F f; // { dg-error "" }
+F* p; // { dg-error "" }
+extern F& r; // { dg-error "" }
+
+struct A {
+ F f;
+};
+
+int main()
+{
+ A a;
+ a.f();
+ A().f(); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual8.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual8.C
new file mode 100644
index 0000000000..b4c972b3c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual8.C
@@ -0,0 +1,13 @@
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ virtual void f() & = 0;
+};
+
+struct B: A
+{
+ void f(); // doesn't override
+};
+
+B b; // { dg-error "abstract" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/ref-qual9.C b/gcc/testsuite/g++.dg/cpp0x/ref-qual9.C
new file mode 100644
index 0000000000..cdb8d68568
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/ref-qual9.C
@@ -0,0 +1,14 @@
+// PR c++/57064
+// { dg-require-effective-target c++11 }
+
+template <class T> T&& move(T& t);
+
+struct A {
+ void p() &;
+ int p() &&;
+};
+
+void g(A &&a)
+{
+ int i = move(a).p();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C b/gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C
index 5b682e3045..3de8f9616f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C
+++ b/gcc/testsuite/g++.dg/cpp0x/reference_collapsing.C
@@ -3,8 +3,7 @@
// Test the reference collapsing rules. Note that there are recent differences
// for how cv-qualifications are applied to reference types. 7.1.3, 14.3.1
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/README b/gcc/testsuite/g++.dg/cpp0x/regress/README
deleted file mode 100644
index 5c3402e748..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/README
+++ /dev/null
@@ -1,3 +0,0 @@
-This directory contains tests that were passing in C++98 mode but failing
-in C++0x mode; it should be replaced by an improvement to the test harness
-to run all tests in both modes.
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C b/gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C
deleted file mode 100644
index adc71278d9..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/abi-empty7.C
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copy of abi/empty7.C.
-// { dg-do run { target i?86-*-* x86_64-*-* } }
-// { dg-require-effective-target ilp32 }
-// { dg-options "-fabi-version=0 -std=c++0x" }
-
-struct S1 {};
-struct S2 { virtual void f () {} S1 s1[4]; };
-struct S3 : virtual public S2 {};
-struct S4 : virtual public S2 { int i; };
-struct S5 : public S3, virtual public S4 {};
-struct S6 { S5 s5; };
-struct S7 { S1 s1[5]; };
-struct S8 : public S1, public S6, virtual public S7 { };
-
-S8 s8;
-
-int main () {
- if ((char *)(S7 *)&s8 - (char *)&s8 != 24)
- return 1;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/array1.C b/gcc/testsuite/g++.dg/cpp0x/regress/array1.C
deleted file mode 100644
index 629ab4103f..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/array1.C
+++ /dev/null
@@ -1,16 +0,0 @@
-// PR c++/47808
-// { dg-options -std=c++0x }
-
-template <typename T>
-inline T abs (T const & x) { return x; }
-
-template <typename T>
-void f (T)
-{
- typedef int ai[(abs(0.1) > 0) ? 1 : -1];
-}
-
-int main()
-{
- f(1);
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/bitfield-err1.C b/gcc/testsuite/g++.dg/cpp0x/regress/bitfield-err1.C
deleted file mode 100644
index a2e9d47b57..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/bitfield-err1.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR c++/46282
-// { dg-options -std=c++0x }
-
-template<int>
-class A
-{
- A : i() {} // { dg-message "" }
- int i;
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/call1.C b/gcc/testsuite/g++.dg/cpp0x/regress/call1.C
deleted file mode 100644
index 833318b056..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/call1.C
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR c++/48500
-// { dg-options -std=c++0x }
-
-struct linked_ptr {
-};
-template <typename T> linked_ptr make_linked_ptr(T* ptr);
-struct Concrete;
-struct NewedClass {
- NewedClass(const Concrete& req){}
-};
-template<typename ArgT> void AddObjToChange(const ArgT& req) {
- linked_ptr p = make_linked_ptr(new NewedClass(req));
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/condition1.C b/gcc/testsuite/g++.dg/cpp0x/regress/condition1.C
deleted file mode 100644
index 0346764f79..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/condition1.C
+++ /dev/null
@@ -1,80 +0,0 @@
-// PR c++/47950
-// { dg-options -std=c++0x }
-
-template <typename T> struct empty
-{
- // allow success case to build (not relevant to bug)
- operator bool() { return true; }
-};
-
-template <typename T> struct from_int
-{
- from_int(int) {}
-
- // allow success case to build (not relevant to bug)
- operator bool() { return true; }
-};
-
-template <typename T>
-from_int<T> via_function(T v)
-{
- return from_int<T>(v);
-}
-
-template <typename T>
-void f()
-{
- // ********* this section compiles ***********
-
- // these plain initializers work fine
- from_int<int> a = 7;
- from_int<int> b = from_int<int>(7);
- empty<int> c = empty<int>();
- from_int<T> ta = 7;
- from_int<T> tb = from_int<T>(7);
- empty<T> tc = empty<T>();
-
- // these dependent condition decls work fine
- if (empty<T> x = empty<T>())
- ;
- if (from_int<T> x = 7)
- ;
- if (from_int<T> x = from_int<T>(7))
- ;
- if (from_int<T> x = via_function(T()))
- ;
-
- // this non-dependent condition decl using conversion works fine
- if (from_int<int> x = 7)
- ;
-
- // these non-dependent condition decls using conversion or braced-
- // initialization work fine (in c++0x mode only course)
- #if __GXX_EXPERIMENTAL_CXX0X__
- if (empty<int> x {})
- ;
- if (from_int<int> x {7})
- ;
- #endif
-
- // ********** this section fails in C++0x ***********
-
- // the following non-dependent condition decls cause an assertion
- // failure in
- //
- // tsubst_copy_and_build, at cp/pt.c:13370
- //
- // in C++0x mode
- //
- if (empty<int> x = empty<int>())
- ;
- if (from_int<int> x = from_int<int>(7))
- ;
- if (from_int<int> x = via_function(7))
- ;
-}
-
-int main()
-{
- f<int>();
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/ctor1.C b/gcc/testsuite/g++.dg/cpp0x/regress/ctor1.C
deleted file mode 100644
index c35d6011f3..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/ctor1.C
+++ /dev/null
@@ -1,21 +0,0 @@
-// PR c++/49569
-// { dg-options -std=c++0x }
-
-struct A
-{
- virtual void f() = 0;
-};
-
-struct B: A
-{
- int i;
- virtual void f() { }
-};
-
-struct C
-{
- B b;
- C(): b() { }
- C(const B& b): b(b) { }
-};
-
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C b/gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C
deleted file mode 100644
index ea8f1eb2e6..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/debug-debug7.C
+++ /dev/null
@@ -1,19 +0,0 @@
-// { dg-do compile }
-// { dg-options -std=c++0x }
-
-void f (int);
-
-int
-main() {
-
- int a = 4;
- int b = 5; // { dg-message "not const" }
- int (*x)[b] = new int[a][b]; // { dg-error "not usable" }
-
- x[2][1] = 7;
-
- for (int i = 0; i < a; ++i)
- for (int j = 0; j < b; ++j)
- f (x[i][j]);
- delete [] x;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/enum1.C b/gcc/testsuite/g++.dg/cpp0x/regress/enum1.C
deleted file mode 100644
index 6e29f9ea92..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/enum1.C
+++ /dev/null
@@ -1,8 +0,0 @@
-// PR c++/47482
-// { dg-options -std=c++0x }
-
-template<class>
-struct K
-{
- enum { A = sizeof"A", B = +A };
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C b/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C
deleted file mode 100644
index cdf9940847..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/error-recovery1.C
+++ /dev/null
@@ -1,11 +0,0 @@
-// PR c++/48212
-// { dg-options -std=c++0x }
-
-template < bool > void
-foo ()
-{
- const bool b =; // { dg-error "" }
- foo < b > (); // { dg-error "constant expression" "const expr" }
-};
-
-// { dg-error "no match" "no match" { target *-*-* } 8 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C b/gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C
deleted file mode 100644
index dc9814ebd3..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/ext-cond1.C
+++ /dev/null
@@ -1,4 +0,0 @@
-// PR c++/12515
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-template<int> void foo() { 0 ?: 0; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/ext-label10.C b/gcc/testsuite/g++.dg/cpp0x/regress/ext-label10.C
deleted file mode 100644
index 652d94af03..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/ext-label10.C
+++ /dev/null
@@ -1,17 +0,0 @@
-// PR c++/33836
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
-
-template<int N> struct A
-{
- enum { M = && N }; // { dg-error "referenced outside|cannot appear in|not an integer constant" }
-};
-
-A<0> a;
-
-void foo ()
-{
- __label__ P;
- enum { O = && P }; // { dg-error "cannot appear in|not an integer constant" }
- P:;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C b/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C
deleted file mode 100644
index 40d07e5dee..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/isnan.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR c++/48369
-// { dg-options -std=gnu++0x }
-
-extern "C" int isnan (double);
-
-void f(double d)
-{
- bool b = isnan(d);
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/no-elide1.C b/gcc/testsuite/g++.dg/cpp0x/regress/no-elide1.C
deleted file mode 100644
index 50df950163..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/no-elide1.C
+++ /dev/null
@@ -1,14 +0,0 @@
-// PR c++/47503
-// { dg-options "-std=c++0x -fno-elide-constructors" }
-
-struct A
-{
- int i;
- A ();
-};
-
-struct B
-{
- A a;
- B (A &aa) : a (aa) { }
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C b/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
deleted file mode 100644
index 7fc66a7ae8..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/non-const1.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR c++/48015
-// { dg-options -std=c++0x }
-
-template <typename T> T f(T);
-template <typename T> void g()
-{
- int const c = f (1);
- int i = c - 0;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/parse-ambig5.C b/gcc/testsuite/g++.dg/cpp0x/regress/parse-ambig5.C
deleted file mode 100644
index 9be2f9258f..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/parse-ambig5.C
+++ /dev/null
@@ -1,8 +0,0 @@
-// PR c++/41786
-// { dg-options -std=c++0x }
-
-struct A { A(int, char const*); };
-int main() {
- int i = 0, *b = &i;
- A a(int(b[i]), "hello");
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/ptrmem1.C b/gcc/testsuite/g++.dg/cpp0x/regress/ptrmem1.C
deleted file mode 100644
index 873000b9c3..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/ptrmem1.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR c++/49298
-// { dg-options -std=c++0x }
-
-template <class T, int T::*> struct B { };
-template <class T> struct A
-{
- int i;
- B<A,&A::i> b;
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress1.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress1.C
deleted file mode 100644
index a6fe3999c9..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress1.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// PR c++/46903
-// This isn't C++0x code, but it was breaking in C++0x mode.
-// { dg-options -std=c++0x }
-
-struct A {};
-struct B {
- void *(*a)();
-};
-template <typename T> void *CreateA() {}
-B b = {CreateA<A>};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress2.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress2.C
deleted file mode 100644
index 470ee1c4c8..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress2.C
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR c++/46552
-// { dg-options -std=c++0x }
-
-struct S
-{
- int x;
-};
-
-template < typename >
-void f( void )
-{
- &S::x;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress3.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress3.C
deleted file mode 100644
index ffbb97f6b8..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress3.C
+++ /dev/null
@@ -1,13 +0,0 @@
-// PR c++/47511
-// { dg-options -std=c++0x }
-
-namespace N {
- template <typename T> bool g( T ) {
- return true;
- }
- struct A { };
-}
-template <class T> void f(const T&) {
- N::A x;
- g(x) ;
-}
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress4.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress4.C
deleted file mode 100644
index b56263ae5a..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress4.C
+++ /dev/null
@@ -1,62 +0,0 @@
-// PR c++/49663
-// { dg-options -std=c++0x }
-
-struct Nosm
-{
- int m_R;
-};
-
-namespace dx {
-
- struct onc
- {
- typedef void(*Cb)();
-
- onc(Cb cb);
- };
-
- struct grac
- {
- template<class Derived> static void once();
- };
-
- template<class Derived>
- struct tonc : onc
- {
- tonc() : onc(&grac::once<Derived>) {}
-
- static Derived& get();
- };
-
- template<class Derived> void grac::once()
- {
- tonc<Derived>::get().h();
- }
-}
-
-namespace
-{
- template<typename T, int = sizeof(&T::m_R)>
- struct has_R { };
-
- template<typename T>
- inline void
- setR(T* m, has_R<T>* = 0)
- { }
-
- inline void setR(...) { }
-}
-
-template<typename M>
- struct Qmi
- : dx::tonc<Qmi<M> >
- {
- void h()
- {
- setR(&msg);
- }
-
- M msg;
- };
-
-Qmi<Nosm> x;
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress5.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress5.C
deleted file mode 100644
index b1935912d6..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress5.C
+++ /dev/null
@@ -1,16 +0,0 @@
-// { dg-options -std=c++0x }
-
-struct A
-{
- int i;
- A(int);
-};
-
-struct B
-{
- virtual void f();
- A ar[3];
-};
-
-extern B b;
-B b2(b);
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/regress6.C b/gcc/testsuite/g++.dg/cpp0x/regress/regress6.C
deleted file mode 100644
index 6de64c0b34..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/regress6.C
+++ /dev/null
@@ -1,11 +0,0 @@
-// PR c++/49691
-// { dg-options -std=c++0x }
-
-struct A { int x; };
-A* f();
-struct B {
- void g()
- {
- int(f()->x);
- }
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/template-const1.C b/gcc/testsuite/g++.dg/cpp0x/regress/template-const1.C
deleted file mode 100644
index 32db1f831b..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/template-const1.C
+++ /dev/null
@@ -1,9 +0,0 @@
-// PR c++/47897
-// { dg-options -std=c++0x }
-
-template < typename T, T N >
-struct S
-{
- static const T value = N;
- typedef S< T, value + 1 > next;
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C b/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C
deleted file mode 100644
index 25354b3a54..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/template-const2.C
+++ /dev/null
@@ -1,14 +0,0 @@
-// PR c++/48707
-// { dg-options -std=c++0x }
-
-struct A {
- static int a();
-};
-
-template<typename X>
-struct B: A {
- static int const b;
-};
-
-template<typename X>
-int const B<X>::b=B<X>::a();
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C b/gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C
deleted file mode 100644
index 66cbd4ba12..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/template-function1.C
+++ /dev/null
@@ -1,29 +0,0 @@
-// PR c++/38647
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
-// { dg-prune-output "note" }
-
-template<const char *, int> struct A {};
-const char func[] = "abc";
-template<int N> struct A<func, N> {}; // { dg-error "cannot appear|is invalid|not a valid|constant expression" }
-
-char a1[1];
-A<a1, 0> a;
-
-template<const char *, int> struct B {};
-template<int N> struct B<__FUNCTION__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|constant expression" }
-
-char b1[1];
-B<b1, 0> b;
-
-template<const char *, int> struct C {};
-template<int N> struct C<__PRETTY_FUNCTION__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|constant expression" }
-
-char c1[1];
-C<c1, 0> c;
-
-template<const char *, int> struct D {};
-template<int N> struct D<__func__, N> {}; // { dg-error "cannot appear|is invalid|is not a valid|function scope|constant expression" }
-
-char d1[1];
-D<d1, 0> d;
diff --git a/gcc/testsuite/g++.dg/cpp0x/regress/value-dep1.C b/gcc/testsuite/g++.dg/cpp0x/regress/value-dep1.C
deleted file mode 100644
index 112389d4a8..0000000000
--- a/gcc/testsuite/g++.dg/cpp0x/regress/value-dep1.C
+++ /dev/null
@@ -1,7 +0,0 @@
-// PR c++/48265
-// { dg-options -std=c++0x }
-
-template < int > struct S
-{
- S () { const int i = i; i; };
-};
diff --git a/gcc/testsuite/g++.dg/cpp0x/reinterpret_cast1.C b/gcc/testsuite/g++.dg/cpp0x/reinterpret_cast1.C
new file mode 100644
index 0000000000..7c0463eac5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/reinterpret_cast1.C
@@ -0,0 +1,6 @@
+// PR c++/57869
+// { dg-do compile { target c++11 } }
+
+void* po = 0;
+void (*pf)() = reinterpret_cast<decltype(pf)>(po);
+static_assert(sizeof(po) >= sizeof(pf), "Conversion not supported");
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C
index ed866f9e1f..ce93a1614a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C
index e054151b05..9ca17f23b1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-bitfield2.C
@@ -1,5 +1,5 @@
// PR c++/51868
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
A() {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast.C
index 48b7c13ba5..4b46c54906 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-cast.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void f(int i)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cast2.C b/gcc/testsuite/g++.dg/cpp0x/rv-cast2.C
index 94ee4ca849..6dc5abcdcf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-cast2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-cast2.C
@@ -1,5 +1,5 @@
// Test for const_cast to reference (5.2.11/4).
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> T&& xval();
template <class T> T& lval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C b/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
new file mode 100644
index 0000000000..a8f598f17d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-cond1.C
@@ -0,0 +1,13 @@
+// PR c++/58714
+// { dg-do compile { target c++11 } }
+
+struct X {
+ X& operator=(const X&) = delete;
+ X& operator=(X&& ) = default;
+};
+
+void f(bool t) {
+ X a, b;
+ *(t ? &a : &b) = X();
+ (t ? a : b) = X();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C b/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C
index 38529913f8..348276612b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-conv1.C
@@ -1,5 +1,5 @@
// PR c++/49267
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct X {
operator int&();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C b/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C
new file mode 100644
index 0000000000..70d3d71922
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-copy1.C
@@ -0,0 +1,10 @@
+// PR c++/55017
+// { dg-do compile { target c++11 } }
+
+struct S { // { dg-error "rvalue ref" }
+ int&& rr;
+ S(int&& rr) : rr(static_cast<int&&>(rr)) {}
+};
+
+S s1(13);
+S s2 = s1; // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-deduce.C b/gcc/testsuite/g++.dg/cpp0x/rv-deduce.C
index 043543631a..ce06d13196 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-deduce.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-deduce.C
@@ -1,5 +1,5 @@
// PR c++/36816, core issue 873
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> void h (T&&) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C b/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
index 160296f640..ecaaf388ca 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-deduce2.C
@@ -1,5 +1,5 @@
// PR c++/48313
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename F>
void f(F&&) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-dotstar.C b/gcc/testsuite/g++.dg/cpp0x/rv-dotstar.C
index 65aac8da2a..7834be5579 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-dotstar.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-dotstar.C
@@ -1,5 +1,5 @@
// PR c++/49389
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T> T&& val();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-func.C b/gcc/testsuite/g++.dg/cpp0x/rv-func.C
index db14296112..e97fe3dd55 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-func.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-func.C
@@ -1,5 +1,5 @@
// PR c++/48457, Core 1238
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-func2.C b/gcc/testsuite/g++.dg/cpp0x/rv-func2.C
index b792342dad..cfa0b2149b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-func2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-func2.C
@@ -1,5 +1,5 @@
// PR c++/49458
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef void ftype();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-func3.C b/gcc/testsuite/g++.dg/cpp0x/rv-func3.C
index 8504682d79..673830350a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-func3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-func3.C
@@ -1,5 +1,5 @@
// DR 1328
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct A {
operator T&(); // #1
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C b/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
index a8f424df00..1ca3c41547 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-lvalue-req.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> T&& declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C b/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
index 5b6e4c3d12..b55b67a9f4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-reinterpret.C
@@ -1,5 +1,4 @@
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
void f(int &);
void f(int &&ir) { ir = 42; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-restrict.C b/gcc/testsuite/g++.dg/cpp0x/rv-restrict.C
index 569ee5bb6c..11bf4dec09 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-restrict.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-restrict.C
@@ -1,5 +1,5 @@
// PR c++/45401
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
typedef int &__restrict restrictLvref;
typedef restrictLvref &&rvrefToRestrictLvref;
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-return.C b/gcc/testsuite/g++.dg/cpp0x/rv-return.C
index 3ab659833e..12a15aa30c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-return.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-return.C
@@ -1,5 +1,5 @@
// PR c++/41815
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T, typename U> struct same_type;
template<typename T> struct same_type<T, T> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-template1.C b/gcc/testsuite/g++.dg/cpp0x/rv-template1.C
index 11f53bd1c0..dcc4e5efb7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-template1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-template1.C
@@ -1,5 +1,5 @@
// PR c++/44870
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
void foo(int&& data);
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-this.C b/gcc/testsuite/g++.dg/cpp0x/rv-this.C
new file mode 100644
index 0000000000..8064a51d44
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-this.C
@@ -0,0 +1,7 @@
+// PR c++/56701
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ void f(){ A*&& a = this; }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C b/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
index cbce7c4ddd..b729dc83df 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv-trivial-bug.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/33235
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv10.C b/gcc/testsuite/g++.dg/cpp0x/rv10.C
index 5e78b1dbb6..bba72d201d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv10.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv1n.C b/gcc/testsuite/g++.dg/cpp0x/rv1n.C
index 68305ebc9b..9aa534a653 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv1n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv1n.C
@@ -2,8 +2,7 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
@@ -30,7 +29,7 @@ const volatile A cv_source();
// 1 at a time
-one sink_1_1( A&); // { dg-error "" }
+one sink_1_1( A&); // { dg-message "" }
int test1_1()
{
@@ -48,7 +47,7 @@ int test1_1()
return 0;
}
-two sink_1_2(const A&); // { dg-error "" }
+two sink_1_2(const A&); // { dg-message "" }
int test1_2()
{
@@ -63,7 +62,7 @@ int test1_2()
return 0;
}
-three sink_1_3(volatile A&); // { dg-error "" }
+three sink_1_3(volatile A&); // { dg-message "" }
int test1_3()
{
@@ -80,7 +79,7 @@ int test1_3()
return 0;
}
-four sink_1_4(const volatile A&); // { dg-error "" }
+four sink_1_4(const volatile A&); // { dg-message "" }
int test1_4()
{
@@ -95,7 +94,7 @@ int test1_4()
return 0;
}
-five sink_1_5( A&&); // { dg-error "" }
+five sink_1_5( A&&); // { dg-message "" }
int test1_5()
{
@@ -113,7 +112,7 @@ int test1_5()
return 0;
}
-six sink_1_6(const A&&); // { dg-error "" }
+six sink_1_6(const A&&); // { dg-message "" }
int test1_6()
{
@@ -130,7 +129,7 @@ int test1_6()
return 0;
}
-seven sink_1_7(volatile A&&); // { dg-error "" }
+seven sink_1_7(volatile A&&); // { dg-message "" }
int test1_7()
{
@@ -147,7 +146,7 @@ int test1_7()
return 0;
}
-eight sink_1_8(const volatile A&&); // { dg-error "" }
+eight sink_1_8(const volatile A&&); // { dg-message "" }
int test1_8()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv1p.C b/gcc/testsuite/g++.dg/cpp0x/rv1p.C
index abe5de0b35..e4c0ab16dd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv1p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv1p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv2n.C b/gcc/testsuite/g++.dg/cpp0x/rv2n.C
index a9d37415e0..289cffb181 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv2n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv2n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
@@ -161,7 +161,7 @@ int test2_17()
}
one sink_2_18( A&);
-eight sink_2_18(const volatile A&&); // { dg-error "argument" }
+eight sink_2_18(const volatile A&&); // { dg-message "argument" }
int test2_18()
{
@@ -288,7 +288,7 @@ int test2_27()
}
two sink_2_28(const A&);
-eight sink_2_28(const volatile A&&); // { dg-error "argument" }
+eight sink_2_28(const volatile A&&); // { dg-message "argument" }
int test2_28()
{
@@ -362,7 +362,7 @@ int test2_37()
}
three sink_2_38(volatile A&);
-eight sink_2_38(const volatile A&&); // { dg-error "argument" }
+eight sink_2_38(const volatile A&&); // { dg-message "argument" }
int test2_38()
{
@@ -468,8 +468,8 @@ int test2_57()
return 0;
}
-five sink_2_58( A&&); // { dg-error "argument" }
-eight sink_2_58(const volatile A&&); // { dg-error "argument" }
+five sink_2_58( A&&); // { dg-message "argument" }
+eight sink_2_58(const volatile A&&); // { dg-message "argument" }
int test2_58()
{
@@ -505,8 +505,8 @@ int test2_67()
return 0;
}
-six sink_2_68(const A&&); // { dg-error "argument" }
-eight sink_2_68(const volatile A&&); // { dg-error "argument" }
+six sink_2_68(const A&&); // { dg-message "argument" }
+eight sink_2_68(const volatile A&&); // { dg-message "argument" }
int test2_68()
{
@@ -520,8 +520,8 @@ int test2_68()
sink_2_68(cva); // { dg-error "lvalue" }
}
-seven sink_2_78(volatile A&&); // { dg-error "argument" }
-eight sink_2_78(const volatile A&&); // { dg-error "argument" }
+seven sink_2_78(volatile A&&); // { dg-message "argument" }
+eight sink_2_78(const volatile A&&); // { dg-message "argument" }
int test2_78()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv2p.C b/gcc/testsuite/g++.dg/cpp0x/rv2p.C
index 722d1b8d8b..fb3019f2c3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv2p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv2p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv3n.C b/gcc/testsuite/g++.dg/cpp0x/rv3n.C
index 14b810ae68..765dfbc7f2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv3n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv3n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv3p.C b/gcc/testsuite/g++.dg/cpp0x/rv3p.C
index fad89e1d93..6d4625ad46 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv3p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv3p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv4n.C b/gcc/testsuite/g++.dg/cpp0x/rv4n.C
index 076e9a0488..dc56afeba4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv4n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv4n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv4p.C b/gcc/testsuite/g++.dg/cpp0x/rv4p.C
index 134ca13e0f..8d720c7a96 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv4p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv4p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv5n.C b/gcc/testsuite/g++.dg/cpp0x/rv5n.C
index d9b8cd2398..ca179cd822 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv5n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv5n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv5p.C b/gcc/testsuite/g++.dg/cpp0x/rv5p.C
index b8ab545889..7030277541 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv5p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv5p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv6n.C b/gcc/testsuite/g++.dg/cpp0x/rv6n.C
index fbc932de1e..d00c1e242b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv6n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv6n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv6p.C b/gcc/testsuite/g++.dg/cpp0x/rv6p.C
index 4b78ef70bd..4be83431d5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv6p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv6p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv7n.C b/gcc/testsuite/g++.dg/cpp0x/rv7n.C
index 206cc79bb1..7e7a6648e2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv7n.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv7n.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv7p.C b/gcc/testsuite/g++.dg/cpp0x/rv7p.C
index 94aa07b93a..55fc5d760c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv7p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv7p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv8p.C b/gcc/testsuite/g++.dg/cpp0x/rv8p.C
index fb9ec4ce79..4424793862 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv8p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv8p.C
@@ -2,8 +2,8 @@
// Test overload resolution among reference types
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-skip-if "packed attribute missing for struct one/three/five/seven" { "epiphany-*-*" } { "*" } { "" } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/rv9p.C b/gcc/testsuite/g++.dg/cpp0x/rv9p.C
index ec08a82486..a221f32d34 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rv9p.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rv9p.C
@@ -1,6 +1,5 @@
// PR c++/36744
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/rvo.C b/gcc/testsuite/g++.dg/cpp0x/rvo.C
index d4459af64d..fc83b1b56f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/rvo.C
+++ b/gcc/testsuite/g++.dg/cpp0x/rvo.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Contributed by Sylvain Pion
static int rvalue_constructions = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum.C
index c52a3fe769..0ca3a1fbaf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/scoped_enum.C
+++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum class Color1 {
Red,
Green,
@@ -6,14 +6,14 @@ enum class Color1 {
};
enum struct Color2 {
- Red, // { dg-error "previously declared here" }
+ Red, // { dg-message "previously declared here" }
Orange,
Yellow,
Green,
Blue,
Indigo = Green + 2,
Violet,
- Red // { dg-error "redefinition" }
+ Red // { dg-error "redeclaration" }
};
enum Color {
diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C
index e87b36a273..bb8ad750bd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum2.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
enum class E { e = 10 };
enum E2 { e2 = 10 };
diff --git a/gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C b/gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C
index 67c3fcbebb..8dc2fa6479 100644
--- a/gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C
+++ b/gcc/testsuite/g++.dg/cpp0x/scoped_enum_examples.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum class Col { red, yellow, green };
int x = Col::red; // { dg-error "cannot convert" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae1.C b/gcc/testsuite/g++.dg/cpp0x/sfinae1.C
index 292d8ae04b..0e015d9026 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template< typename T_VECTOR >
void f(const T_VECTOR &a, decltype(a[0]) t = 0);
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae10.C b/gcc/testsuite/g++.dg/cpp0x/sfinae10.C
index ede8b70424..25ef77d001 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae10.C
@@ -1,5 +1,5 @@
// PR c++/48452
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std {
template <class T> T&& declval();
}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae11.C b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
index 2e8408d8f4..89bd76da8d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae11.C
@@ -1,5 +1,5 @@
// PR c++/48468
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
template<class T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae12.C b/gcc/testsuite/g++.dg/cpp0x/sfinae12.C
index 114f1b42da..22a984727c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae12.C
@@ -1,5 +1,5 @@
// PR c++/48535
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T{})
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae13.C b/gcc/testsuite/g++.dg/cpp0x/sfinae13.C
index 465df2d8b8..3cff1b4b9b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae13.C
@@ -1,5 +1,5 @@
// PR c++/48581
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae14.C b/gcc/testsuite/g++.dg/cpp0x/sfinae14.C
index 305f96eddc..14e5e058a3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae14.C
@@ -1,5 +1,5 @@
// PR c++/48557
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
struct add_rval_ref
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae15.C b/gcc/testsuite/g++.dg/cpp0x/sfinae15.C
index 595ca40b55..d8b3228903 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae15.C
@@ -1,5 +1,5 @@
// PR c++/48531
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T())
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae16.C b/gcc/testsuite/g++.dg/cpp0x/sfinae16.C
index 6470567b7a..56cbdadc58 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae16.C
@@ -1,5 +1,5 @@
// PR c++/48531
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T())
@@ -13,5 +13,5 @@ struct B2 {
B2(...);
};
-#define SA(X) static_assert ((X), #X);
+#define SA(X) static_assert ((X), #X)
SA(sizeof(f<B2[2]>(0)) != 1);
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae17.C b/gcc/testsuite/g++.dg/cpp0x/sfinae17.C
index dbbd9efe41..c56a5d4198 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae17.C
@@ -1,5 +1,5 @@
// PR c++/48530
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T{})
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae18.C b/gcc/testsuite/g++.dg/cpp0x/sfinae18.C
index bb54335e6c..ea46df0ae6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae18.C
@@ -1,5 +1,5 @@
// PR c++/48530
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T())
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae19.C b/gcc/testsuite/g++.dg/cpp0x/sfinae19.C
index be96983bf3..52cc6add1f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae19.C
@@ -1,5 +1,5 @@
// PR c++/48737
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae2.C b/gcc/testsuite/g++.dg/cpp0x/sfinae2.C
index b9ef70d99c..6f617b289b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae2.C
@@ -1,5 +1,5 @@
// PR c++/44967
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename T> T&& declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae20.C b/gcc/testsuite/g++.dg/cpp0x/sfinae20.C
index 486064c3af..882efe768e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae20.C
@@ -1,5 +1,5 @@
// PR c++/48744
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
struct add_rval_ref {
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae21.C b/gcc/testsuite/g++.dg/cpp0x/sfinae21.C
index 4fba6eb82a..743d7cfc2c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae21.C
@@ -1,5 +1,5 @@
// PR c++/48735
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T,
class = decltype(T{})
@@ -9,6 +9,10 @@ char f(int);
template<class>
char (&f(...))[2];
-struct ND { ND() = delete; };
+struct ND {
+ // Make ND() non-aggregate.
+ virtual void f();
+ ND() = delete;
+};
static_assert(sizeof(f<ND[1]>(0)) != 1, "Error");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae22.C b/gcc/testsuite/g++.dg/cpp0x/sfinae22.C
index 1c3efd2e07..2c55b8a182 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae22.C
@@ -1,5 +1,5 @@
// PR c++/48745
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
struct add_rval_ref {
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae23.C b/gcc/testsuite/g++.dg/cpp0x/sfinae23.C
index 4e2ea88b17..53d5c9b0b2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae23.C
@@ -1,5 +1,5 @@
// PR c++/48647
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template< class T >
T&& declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae24.C b/gcc/testsuite/g++.dg/cpp0x/sfinae24.C
index 3e1d2e725b..6d275d317b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae24.C
@@ -1,7 +1,7 @@
// PR c++/49058
// This error is not subject to SFINAE because it doesn't happen in the
// deduction context.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
template<typename T> T val();
@@ -19,8 +19,8 @@ struct Bind
R f();
template<typename R
- = decltype( val<const F>()( ) )>
- R f() const; // { dg-error "no match" }
+ = decltype( val<const F>()( ) )> // { dg-error "no match" }
+ R f() const;
};
int main()
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae25.C b/gcc/testsuite/g++.dg/cpp0x/sfinae25.C
index 7bdc8f88e5..0ff872c9e2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae25.C
@@ -1,5 +1,5 @@
// PR c++/49105
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T, class = decltype(T{})>
char f(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae26.C b/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
index 374f9976b2..f55e1d8c72 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae26.C
@@ -1,5 +1,5 @@
// PR c++/49229
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern void* enabler;
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae27.C b/gcc/testsuite/g++.dg/cpp0x/sfinae27.C
index 93327ba9cc..ddd484a474 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae27.C
@@ -1,5 +1,5 @@
// PR c++/50157
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
T val();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae28.C b/gcc/testsuite/g++.dg/cpp0x/sfinae28.C
index da64f413c7..1eeba64bc1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae28.C
@@ -1,5 +1,5 @@
// PR c++/50324
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct complete { };
struct incomplete;
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae29.C b/gcc/testsuite/g++.dg/cpp0x/sfinae29.C
index a2e10b41d3..8792778acf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae29.C
@@ -1,5 +1,5 @@
// PR c++/51047
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T> T &&declval();
template<class T> decltype(declval<T>().x) f(T *);
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae3.C b/gcc/testsuite/g++.dg/cpp0x/sfinae3.C
index 8582ba777c..5009c84066 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae3.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std { template <class T> T&& declval(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae31.C b/gcc/testsuite/g++.dg/cpp0x/sfinae31.C
index ea151fe649..8695ebca30 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae31.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae31.C
@@ -1,8 +1,8 @@
// PR c++/51973
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T>
-void f(T t) { };
+void f(T t) { }
template <class T> decltype(f<T>(0)) g();
template <class T> decltype(f<T*>(0)) g();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae32.C b/gcc/testsuite/g++.dg/cpp0x/sfinae32.C
new file mode 100644
index 0000000000..97945c6bc8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae32.C
@@ -0,0 +1,18 @@
+// PR c++/51989
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct is_container
+{
+ template <typename U, typename V = decltype(((U*)0)->begin())>
+ static char test(U* u);
+
+ template <typename U> static long test(...);
+
+ enum { value = sizeof test<T>(0) == 1 };
+};
+
+int main()
+{
+ return is_container<void>::value;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae33.C b/gcc/testsuite/g++.dg/cpp0x/sfinae33.C
new file mode 100644
index 0000000000..f543c1f243
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae33.C
@@ -0,0 +1,27 @@
+// PR c++/52422
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct add_rval_ref
+{
+ typedef T&& type;
+};
+
+template<>
+struct add_rval_ref<void>
+{
+ typedef void type;
+};
+
+template<class T>
+typename add_rval_ref<T>::type create();
+
+template<class T,
+ class = decltype(create<T>()())
+>
+auto f(int) -> char(&)[1];
+
+template<class>
+auto f(...) -> char(&)[2];
+
+static_assert(sizeof(f<void>(0)) != 1, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae34.C b/gcc/testsuite/g++.dg/cpp0x/sfinae34.C
new file mode 100644
index 0000000000..615a2bc9b5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae34.C
@@ -0,0 +1,27 @@
+// PR c++/52422
+// { dg-do compile { target c++11 } }
+
+template<class T>
+struct add_rval_ref
+{
+ typedef T&& type;
+};
+
+template<>
+struct add_rval_ref<void>
+{
+ typedef void type;
+};
+
+template<class T>
+typename add_rval_ref<T>::type create();
+
+template<class T, class U,
+ class = decltype( (create<T>().*create<U>())() )
+>
+auto f(int) -> char(&)[1];
+
+template<class, class>
+auto f(...) -> char(&)[2];
+
+static_assert(sizeof(f<void, void>(0)) != 1, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae35.C b/gcc/testsuite/g++.dg/cpp0x/sfinae35.C
new file mode 100644
index 0000000000..86b6103248
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae35.C
@@ -0,0 +1,13 @@
+// PR c++/52363
+// { dg-do compile { target c++11 } }
+
+#include <type_traits>
+
+struct proxy
+{
+ void operator=(int const&);
+ void operator=(int&&) const;
+};
+
+static_assert( !std::is_assignable<proxy, int>::value, "" );
+static_assert( std::is_assignable<const proxy, int>::value, "" );
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae36.C b/gcc/testsuite/g++.dg/cpp0x/sfinae36.C
new file mode 100644
index 0000000000..6597bc3373
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae36.C
@@ -0,0 +1,14 @@
+// PR c++/52363
+// { dg-do compile { target c++11 } }
+// { dg-options "-pedantic" }
+
+#include <type_traits>
+
+struct proxy
+{
+ void operator=(int const&);
+ void operator=(int&&) const;
+};
+
+static_assert( !std::is_assignable<proxy, int>::value, "" );
+static_assert( std::is_assignable<const proxy, int>::value, "" );
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae37.C b/gcc/testsuite/g++.dg/cpp0x/sfinae37.C
new file mode 100644
index 0000000000..e89106aac3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae37.C
@@ -0,0 +1,36 @@
+// PR c++/51213
+// { dg-do compile { target c++11 } }
+
+class C {
+ typedef int type;
+};
+
+template<int>
+struct I;
+
+template<>
+struct I<2> { };
+
+template<class T, class = typename T::type>
+auto f(int) -> char;
+
+template<class>
+auto f(...) -> char (&)[2];
+
+static_assert(sizeof(f<C>(0)) == 2, "Ouch");
+
+typedef int testf[sizeof(f<C>(0)) == 2 ? 1 : -1];
+
+I<sizeof(f<C>(0))> vf;
+
+template<class T>
+auto g(int) -> decltype(typename T::type(), char());
+
+template<class>
+auto g(...) -> char (&)[2];
+
+static_assert(sizeof(g<C>(0)) == 2, "Ouch");
+
+typedef int testg[sizeof(g<C>(0)) == 2 ? 1 : -1];
+
+I<sizeof(g<C>(0))> vg;
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae38.C b/gcc/testsuite/g++.dg/cpp0x/sfinae38.C
new file mode 100644
index 0000000000..2e860ee699
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae38.C
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++11 } }
+
+template<class T, unsigned = sizeof(T)>
+auto f(int) -> char;
+
+template<class>
+auto f(...) -> char(&)[2];
+
+static_assert(sizeof(f<void>(0)) != 1, "");
+static_assert(sizeof(f<void()>(0)) != 1, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae39.C b/gcc/testsuite/g++.dg/cpp0x/sfinae39.C
new file mode 100644
index 0000000000..8183bda39a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae39.C
@@ -0,0 +1,146 @@
+// PR c++/54191
+// { dg-do compile { target c++11 } }
+
+struct B
+{};
+
+struct D
+ : private B
+{};
+
+template<typename T>
+T &&declval();
+
+
+template<typename From, typename = decltype(B{declval<From>()})>
+constexpr bool test_braced_cast_to_base(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_braced_cast_to_base(bool)
+{ return false; }
+
+static_assert(!test_braced_cast_to_base<D>(0), "");
+
+
+template<typename From, typename = decltype(D{declval<From>()})>
+constexpr bool test_braced_cast_to_derived(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_braced_cast_to_derived(bool)
+{ return false; }
+
+static_assert(!test_braced_cast_to_derived<B>(0), "");
+
+
+typedef B *PB;
+
+template<typename From, typename = decltype(PB{declval<From>()})>
+constexpr bool test_braced_cast_to_ptr_to_base(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_braced_cast_to_ptr_to_base(bool)
+{ return false; }
+
+static_assert(!test_braced_cast_to_ptr_to_base<D *>(0), "");
+
+
+typedef D *PD;
+
+template<typename From, typename = decltype(PD{declval<From>()})>
+constexpr bool test_braced_cast_to_ptr_to_derived(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_braced_cast_to_ptr_to_derived(bool)
+{ return false; }
+
+static_assert(!test_braced_cast_to_ptr_to_derived<B *>(0), "");
+
+
+template<typename From, typename To,
+ typename = decltype(static_cast<To>(declval<From>()))>
+constexpr bool test_static_cast(int)
+{ return true; }
+
+template<typename, typename>
+constexpr bool test_static_cast(bool)
+{ return false; }
+
+static_assert(!test_static_cast<B &, D &>(0), "");
+static_assert(!test_static_cast<B *, D *>(0), "");
+
+
+template<typename From, typename To,
+ typename = decltype(dynamic_cast<To>(declval<From>()))>
+constexpr bool test_dynamic_cast(int)
+{ return true; }
+
+template<typename, typename>
+constexpr bool test_dynamic_cast(bool)
+{ return false; }
+
+static_assert(!test_dynamic_cast<D &, B &>(0), "");
+static_assert(!test_dynamic_cast<D *, B *>(0), "");
+
+
+int B::*pm = 0;
+
+template<typename T, typename = decltype(declval<T>().*pm)>
+constexpr bool test_member_ptr_dot(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_member_ptr_dot(bool)
+{ return false; }
+
+static_assert(!test_member_ptr_dot<D>(0), "");
+
+
+template<typename T, typename = decltype(declval<T>()->*pm)>
+constexpr bool test_member_ptr_arrow(int)
+{ return true; }
+
+template<typename>
+constexpr bool test_member_ptr_arrow(bool)
+{ return false; }
+
+static_assert(!test_member_ptr_arrow<D *>(0), "");
+
+
+template<typename T, typename U,
+ typename = decltype(declval<T>() < declval<U>())>
+constexpr bool test_rel_op(int)
+{ return true; }
+
+template<typename, typename>
+constexpr bool test_rel_op(bool)
+{ return false; }
+
+static_assert(!test_rel_op<D *, B *>(0), "");
+
+
+template<typename T, typename U,
+ typename = decltype(declval<T>() == declval<U>())>
+constexpr bool test_eq(int)
+{ return true; }
+
+template<typename, typename>
+constexpr bool test_eq(bool)
+{ return false; }
+
+static_assert(!test_eq<D *, B *>(0), "");
+
+
+template<typename T, typename U,
+ typename = decltype(false ? declval<T>() : declval<U>())>
+constexpr bool test_cond_op(int)
+{ return true; }
+
+template<typename, typename>
+constexpr bool test_cond_op(bool)
+{ return false; }
+
+static_assert(!test_cond_op<B *, D *>(0), "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae4.C b/gcc/testsuite/g++.dg/cpp0x/sfinae4.C
index b664831249..1b24966e05 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae4.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std { template <class T> T&& declval(); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae40.C b/gcc/testsuite/g++.dg/cpp0x/sfinae40.C
new file mode 100644
index 0000000000..18e5fecb26
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae40.C
@@ -0,0 +1,21 @@
+// PR c++/54541
+// { dg-do compile { target c++11 } }
+
+template <typename T> T&& declval();
+
+struct X;
+
+X f(int);
+
+template <class T>
+void g(decltype((void)f(declval<T>())) *)
+{}
+
+template <class T>
+void g(...)
+{}
+
+int main()
+{
+ g<int>(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae41.C b/gcc/testsuite/g++.dg/cpp0x/sfinae41.C
new file mode 100644
index 0000000000..bd6f624f0a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae41.C
@@ -0,0 +1,17 @@
+// PR c++/54542
+// { dg-do compile { target c++11 } }
+
+template <class T>
+void f(decltype(new T(1, 2)) *)
+{
+ T(1, 2);
+}
+
+template <class T>
+void f(...)
+{}
+
+int main()
+{
+ f<int>(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae42.C b/gcc/testsuite/g++.dg/cpp0x/sfinae42.C
new file mode 100644
index 0000000000..a7a23a3172
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae42.C
@@ -0,0 +1,46 @@
+// PR c++/54738
+// { dg-do compile { target c++11 } }
+
+template<class T>
+T&& declval();
+
+template<class F, class T1, class... Ts>
+decltype(((*declval<T1>()).*declval<F>())(declval<Ts>()...))
+test1(int);
+
+template<class...>
+void test1(...);
+
+template<class F, class T1, class... Ts>
+decltype((declval<T1>().*declval<F>())(declval<Ts>()...))
+test2(int);
+
+template<class...>
+void test2(...);
+
+struct S {};
+
+typedef void (S::*Func)(int) const;
+typedef void (S::*Func2)(int);
+
+typedef decltype(test1<Func, S*>(0)) type1a;
+typedef decltype(test1<Func, S*&>(0)) type1b;
+typedef decltype(test1<Func, S*, int, int>(0)) type1c;
+typedef decltype(test1<Func, S*&, int, int>(0)) type1d;
+
+typedef decltype(test2<Func, S>(0)) type2a;
+typedef decltype(test2<Func, S&>(0)) type2b;
+typedef decltype(test2<Func, S, int, int>(0)) type2c;
+typedef decltype(test2<Func, S&, int, int>(0)) type2d;
+
+typedef decltype(test1<Func, S*, S>(0)) type3a;
+typedef decltype(test1<Func, S*&, S>(0)) type3b;
+
+typedef decltype(test2<Func, S, S>(0)) type4a;
+typedef decltype(test2<Func, S&, S>(0)) type4b;
+
+typedef decltype(test1<Func2, const S*, int>(0)) type5a;
+typedef decltype(test1<Func2, const S*&, int>(0)) type5b;
+
+typedef decltype(test2<Func2, const S, int>(0)) type6a;
+typedef decltype(test2<Func2, const S&, int>(0)) type6b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae43.C b/gcc/testsuite/g++.dg/cpp0x/sfinae43.C
new file mode 100644
index 0000000000..14c31f6817
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae43.C
@@ -0,0 +1,31 @@
+// PR c++/56208
+// { dg-do compile { target c++11 } }
+
+struct ostream {
+ ostream& operator<<(int);
+};
+
+struct sfinae_base {
+
+ typedef char one;
+ typedef char (&two)[2];
+
+ template<class T>
+ static T make();
+
+ template<unsigned> struct ok { typedef int type; };
+
+ template<class U, class T>
+ static one test(decltype((make<U>() << make<T>()), 0));
+
+ template<class, class>
+ static two test(...);
+};
+
+template<class T>
+struct is_printable : private sfinae_base
+{
+ enum { value = sizeof(test<ostream&, T>(0)) == sizeof(one) };
+};
+
+typedef int ok[is_printable<int>::value ? 1 : -1];
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae44.C b/gcc/testsuite/g++.dg/cpp0x/sfinae44.C
new file mode 100644
index 0000000000..bbcae62263
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae44.C
@@ -0,0 +1,26 @@
+// PR c++/56913
+// { dg-do compile { target c++11 } }
+
+template<typename T>
+T &&declval();
+
+template<typename T, typename U,
+ typename = decltype((declval<T>().*declval<U>())())>
+constexpr bool test(int)
+{
+ return true;
+}
+
+template<typename T, typename U>
+constexpr bool test(...)
+{
+ return false;
+}
+
+struct S
+{};
+
+static_assert(!test<S, void (S::*)() &>(0), "");
+static_assert(test<S, void (S::*)() &&>(0), "");
+static_assert(test<S &, void (S::*)() &>(0), "");
+static_assert(!test<S &, void (S::*)() &&>(0), "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae45.C b/gcc/testsuite/g++.dg/cpp0x/sfinae45.C
new file mode 100644
index 0000000000..bd375145fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae45.C
@@ -0,0 +1,35 @@
+// PR c++/56970
+// { dg-do compile { target c++11 } }
+
+template <typename T>
+struct has
+{
+ template <typename>
+ constexpr static int test(...) {
+ return 0;
+ }
+
+ template <typename C>
+ constexpr static int test(decltype(sizeof(C::x))) { // Doesn't compile.
+ return 1; // Is a member variable.
+ }
+
+ template <typename C, int c = sizeof(decltype(((C*)nullptr)->x()))>
+ constexpr static int test(int) {
+ return 2; // Is a member function.
+ }
+
+ static const int value = test<T>(0);
+};
+
+struct foo {
+ int x;
+};
+
+struct bar {
+ int x();
+};
+
+static_assert(has<int>::value == 0, "");
+static_assert(has<foo>::value == 1, "");
+static_assert(has<bar>::value == 2, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae46.C b/gcc/testsuite/g++.dg/cpp0x/sfinae46.C
new file mode 100644
index 0000000000..20e859c23e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae46.C
@@ -0,0 +1,13 @@
+// PR c++/57419
+// { dg-do compile { target c++11 } }
+
+template< typename q >
+decltype( &q::f ) t( q ) {}
+
+char t( ... ) { return {}; }
+
+class c { void f() = delete; };
+class d { static void f() = delete; };
+
+static_assert( sizeof( t( c() ) ), "c" );
+static_assert( sizeof( t( d() ) ), "d" );
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae47.C b/gcc/testsuite/g++.dg/cpp0x/sfinae47.C
new file mode 100644
index 0000000000..1058a2864c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae47.C
@@ -0,0 +1,25 @@
+// Source: Comment 16 of PR51213
+// { dg-do compile { target c++11 } }
+
+template <class T>
+T && declval();
+
+template <class T>
+constexpr auto hasSize(int) -> decltype(declval<T&>().size(), bool())
+{ return true; }
+
+template <class T>
+constexpr bool hasSize(...)
+{ return false; }
+
+struct A
+{
+ int size();
+};
+
+struct B : private A
+{
+};
+
+static_assert(hasSize<A>(0), "A");
+static_assert(!hasSize<B>(0), "B");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae48.C b/gcc/testsuite/g++.dg/cpp0x/sfinae48.C
new file mode 100644
index 0000000000..ba728d9de8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae48.C
@@ -0,0 +1,21 @@
+// PR c++/57874
+// { dg-do compile { target c++11 } }
+
+namespace NX
+{
+ struct X {};
+ void foo(X) {}
+}
+
+namespace NY
+{
+ struct Y {};
+}
+
+template<class T>
+auto ADLfoo(T&&) -> decltype((foo(T{}), short()));
+
+char ADLfoo(...);
+
+static_assert(sizeof(ADLfoo(NY::Y{})) == 1, "");
+static_assert(sizeof(ADLfoo(NX::X{})) == 2, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae49.C b/gcc/testsuite/g++.dg/cpp0x/sfinae49.C
new file mode 100644
index 0000000000..59381f341b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae49.C
@@ -0,0 +1,29 @@
+// PR c++/58932
+// { dg-do compile { target c++11 } }
+
+using nullptr_t = decltype(nullptr);
+
+template<typename T, typename Sfinae = nullptr_t>
+struct B {
+ static float& int_if_addable();
+};
+
+template<typename T>
+struct B<T, decltype( (T() + T()), nullptr )> {
+ static int& int_if_addable();
+};
+
+struct X { };
+
+struct Y { };
+Y operator+(Y, Y);
+
+struct Z { };
+Z operator+(Z, Z) = delete;
+
+int main()
+{
+ float& a = B<X>::int_if_addable();
+ int& b = B<Y>::int_if_addable();
+ float& c = B<Z>::int_if_addable();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae5.C b/gcc/testsuite/g++.dg/cpp0x/sfinae5.C
index 8474fb3143..421a06e5ec 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae5.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae50.C b/gcc/testsuite/g++.dg/cpp0x/sfinae50.C
new file mode 100644
index 0000000000..e8d90ca768
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae50.C
@@ -0,0 +1,41 @@
+// PR c++/61083
+// { dg-do compile { target c++11 } }
+
+template<typename T> T declval();
+
+template<typename T, typename U>
+struct is_same {
+ static const bool value = false;
+};
+
+template<typename T>
+struct is_same<T, T> {
+ static const bool value = true;
+};
+
+struct true_type {};
+struct false_type {};
+
+template <typename T>
+struct is_foo {
+private:
+ template<typename U, U> struct helper {};
+
+ template <typename Z> static auto
+ test(Z z) -> decltype(helper<void (Z::*)() const, &Z::foo>(), true_type());
+
+ template <typename> static auto test(...) -> false_type;
+
+public:
+ enum { value = is_same<decltype(test<T>(declval<T>())), true_type>::value };
+};
+
+struct A {
+ int foo();
+ void foo() const;
+};
+
+struct A1 : public A {};
+
+static_assert (is_foo<A>::value == 1, "");
+static_assert (is_foo<A1>::value == 0, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae6.C b/gcc/testsuite/g++.dg/cpp0x/sfinae6.C
index 401d5362d8..4ee014680c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae6.C
@@ -1,5 +1,5 @@
// PR c++/48113
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T> T declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae7.C b/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
index 0a95a9644c..18b3d8fa61 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae7.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae8.C b/gcc/testsuite/g++.dg/cpp0x/sfinae8.C
index 7f3012f94d..43381d05d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae8.C
@@ -1,5 +1,5 @@
// PR c++/48449
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T, class = decltype(T())>
char f(int);
diff --git a/gcc/testsuite/g++.dg/cpp0x/sfinae9.C b/gcc/testsuite/g++.dg/cpp0x/sfinae9.C
index 6f1de21d51..68656c6d71 100644
--- a/gcc/testsuite/g++.dg/cpp0x/sfinae9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/sfinae9.C
@@ -1,9 +1,9 @@
// PR c++/48450
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std {
template <class T> T&& declval();
-};
+}
template<class To, class From,
class = decltype(static_cast<To>(std::declval<From>()))
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert1.C b/gcc/testsuite/g++.dg/cpp0x/static_assert1.C
index a54617598f..49b5a9703f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void foo()
{
static_assert(1, "okay");
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert10.C b/gcc/testsuite/g++.dg/cpp0x/static_assert10.C
new file mode 100644
index 0000000000..216f2595b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert10.C
@@ -0,0 +1,8 @@
+// PR c++/60254
+// { dg-do compile { target c++11 } }
+
+template<typename T> bool foo(T)
+{
+ int i;
+ static_assert(foo(i), "Error"); // { dg-error "non-constant condition|not usable" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert11.C b/gcc/testsuite/g++.dg/cpp0x/static_assert11.C
new file mode 100644
index 0000000000..8a7362d5f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert11.C
@@ -0,0 +1,10 @@
+// PR c++/60254
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ template<typename T> bool foo(T)
+ {
+ static_assert(foo(0), "Error"); // { dg-error "non-constant condition|constant expression" }
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert2.C b/gcc/testsuite/g++.dg/cpp0x/static_assert2.C
index 3e74bb1b48..1ef2bc6021 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int I>
struct accept_evens {
static_assert( I % 2 == 0, "I must be an even number"); // { dg-error "even number" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert3.C b/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
index 0a4cbc98af..addde13c11 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
static_assert(7 / 0, "X"); // { dg-error "non-constant condition" "non-constant" }
// { dg-warning "division by zero" "zero" { target *-*-* } 2 }
-// { dg-error "7 / 0.. is not a constant expression" "not a constant" { target *-*-* } 2 }
+// { dg-error "division by zero is not a constant-expression" "not a constant" { target *-*-* } 2 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert4.C b/gcc/testsuite/g++.dg/cpp0x/static_assert4.C
index b0818873f1..9a74735097 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert4.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=c++0x --param ggc-min-heapsize=0 --param ggc-min-expand=0 " }
+// { dg-do compile { target c++11 } }
+// { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0 " }
// PR C++/30033
// Make sure that the static assert does not crash the GC.
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert5.C b/gcc/testsuite/g++.dg/cpp0x/static_assert5.C
index b918796220..36cf2eb3b9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert5.C
@@ -1,5 +1,5 @@
// PR c++/50837
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
struct z
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert6.C b/gcc/testsuite/g++.dg/cpp0x/static_assert6.C
index d1ab0dded9..5323e71676 100644
--- a/gcc/testsuite/g++.dg/cpp0x/static_assert6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert6.C
@@ -1,4 +1,4 @@
// PR c++/51397
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
static_assert('X' != '\130', "'X' has the wrong value"); // { dg-error "'X' has the wrong value" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert7.C b/gcc/testsuite/g++.dg/cpp0x/static_assert7.C
new file mode 100644
index 0000000000..f571de28af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert7.C
@@ -0,0 +1,21 @@
+// PR c++/53166
+// { dg-do compile { target c++11 } }
+// { dg-options "-Waddress" }
+
+template <typename X, X a>
+struct A
+{
+ static_assert (a != nullptr, "oops");
+ static_assert (nullptr != a, "oops");
+
+ int f()
+ {
+ static_assert (a != nullptr, "oops");
+ static_assert (nullptr != a, "oops");
+ return 1;
+ }
+};
+
+int i1;
+A<int*, &i1> a1;
+int i2 = a1.f();
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert8.C b/gcc/testsuite/g++.dg/cpp0x/static_assert8.C
new file mode 100644
index 0000000000..ea23afb857
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert8.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++11 } }
+
+static_assert (1 == 0); // { dg-error "expected (string-literal|',') before" }
+
+static_assert (1 == 0,); // { dg-error "expected string-literal before '\\)'" }
+
+static_assert (1 == 0, "oops"); // { dg-error "static assertion failed" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/static_assert9.C b/gcc/testsuite/g++.dg/cpp0x/static_assert9.C
new file mode 100644
index 0000000000..fccaa449c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/static_assert9.C
@@ -0,0 +1,7 @@
+// PR c++/58837
+// { dg-require-effective-target c++11 }
+
+void f();
+static_assert(f, "");
+struct A {};
+static_assert(A::~A, ""); // { dg-error "non-static member function" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/std-layout1.C b/gcc/testsuite/g++.dg/cpp0x/std-layout1.C
index bdad821114..09273c5f1c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/std-layout1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/std-layout1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// [basic.types]/10:
// Scalar types, standard-layout class types (Clause 9), arrays of such
@@ -22,13 +22,13 @@
#define TRY(expr) static_assert (expr, #expr)
#define YES(type) TRY(std::is_standard_layout<type>::value); \
TRY(std::is_standard_layout<type[]>::value); \
- TRY(std::is_standard_layout<const volatile type>::value);
+ TRY(std::is_standard_layout<const volatile type>::value)
#define NO(type) TRY(!std::is_standard_layout<type>::value); \
TRY(!std::is_standard_layout<type[]>::value); \
- TRY(!std::is_standard_layout<const volatile type>::value);
+ TRY(!std::is_standard_layout<const volatile type>::value)
#define NONPOD(type) TRY(!std::is_pod<type>::value); \
TRY(!std::is_pod<type[]>::value); \
- TRY(!std::is_pod<const volatile type>::value);
+ TRY(!std::is_pod<const volatile type>::value)
struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C b/gcc/testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C
new file mode 100644
index 0000000000..7caaa7cee8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/std_fext-numeric-literals.C
@@ -0,0 +1,115 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fext-numeric-literals" }
+
+// Integer imaginary...
+
+constexpr unsigned long long
+operator"" i(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 0; }
+
+constexpr unsigned long long
+operator"" I(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 1; }
+
+constexpr unsigned long long
+operator"" j(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 2; }
+
+constexpr unsigned long long
+operator"" J(unsigned long long n) // { dg-warning "shadowed by implementation" }
+{ return 4 * n + 3; }
+
+// Floating-point imaginary...
+
+constexpr long double
+operator"" i(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 0.0L; }
+
+constexpr long double
+operator"" I(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 1.0L; }
+
+constexpr long double
+operator"" j(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 2.0L; }
+
+constexpr long double
+operator"" J(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4.0L * n + 3.0L; }
+
+// Fixed-point...
+
+constexpr long double
+operator"" k(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 0; }
+
+constexpr long double
+operator"" K(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 1; }
+
+constexpr long double
+operator"" r(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 2; }
+
+constexpr long double
+operator"" R(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 1) + 3; }
+
+// Machine-defined...
+
+constexpr long double
+operator"" w(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 0; }
+
+constexpr long double
+operator"" W(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 1; }
+
+constexpr long double
+operator"" q(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 2; }
+
+constexpr long double
+operator"" Q(long double n) // { dg-warning "shadowed by implementation" }
+{ return 4 * (n + 2) + 3; }
+
+int
+main()
+{
+ auto ii = 1i;
+ auto Ii = 1I;
+ auto ji = 1j;
+ auto Ji = 1J;
+
+ auto ifp = 1.0i;
+ auto Ifp = 1.0I;
+ auto jfp = 1.0j;
+ auto Jfp = 1.0J;
+
+ auto kfp = 1.0k; // { dg-error "fixed-point types not supported" }
+ auto Kfp = 1.0K; // { dg-error "fixed-point types not supported" }
+ auto rfp = 1.0r; // { dg-error "fixed-point types not supported" }
+ auto Rfp = 1.0R; // { dg-error "fixed-point types not supported" }
+
+ auto wfp = 1.0w; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto Wfp = 1.0W; // { dg-error "unsupported" "" { target { ! has_w_floating_suffix } } }
+ auto qfp = 1.0q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+ auto Qfp = 1.0Q; // { dg-error "unsupported" "" { target { ! has_q_floating_suffix } } }
+}
+
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C b/gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C
new file mode 100644
index 0000000000..0b245f4a18
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/std_fno-ext-numeric-literals.C
@@ -0,0 +1,115 @@
+// { dg-do compile { target c++11 } }
+
+
+// Integer imaginary...
+
+constexpr unsigned long long
+operator"" i(unsigned long long n)
+{ return 4 * n + 0; }
+
+constexpr unsigned long long
+operator"" I(unsigned long long n)
+{ return 4 * n + 1; }
+
+constexpr unsigned long long
+operator"" j(unsigned long long n)
+{ return 4 * n + 2; }
+
+constexpr unsigned long long
+operator"" J(unsigned long long n)
+{ return 4 * n + 3; }
+
+// Floating-point imaginary...
+
+constexpr long double
+operator"" i(long double n)
+{ return 4.0L * n + 0.0L; }
+
+constexpr long double
+operator"" I(long double n)
+{ return 4.0L * n + 1.0L; }
+
+constexpr long double
+operator"" j(long double n)
+{ return 4.0L * n + 2.0L; }
+
+constexpr long double
+operator"" J(long double n)
+{ return 4.0L * n + 3.0L; }
+
+// Fixed-point...
+
+constexpr long double
+operator"" k(long double n)
+{ return 4 * (n + 1) + 0; }
+
+constexpr long double
+operator"" K(long double n)
+{ return 4 * (n + 1) + 1; }
+
+constexpr long double
+operator"" r(long double n)
+{ return 4 * (n + 1) + 2; }
+
+constexpr long double
+operator"" R(long double n)
+{ return 4 * (n + 1) + 3; }
+
+// Machine-defined...
+
+constexpr long double
+operator"" w(long double n)
+{ return 4 * (n + 2) + 0; }
+
+constexpr long double
+operator"" W(long double n)
+{ return 4 * (n + 2) + 1; }
+
+constexpr long double
+operator"" q(long double n)
+{ return 4 * (n + 2) + 2; }
+
+constexpr long double
+operator"" Q(long double n)
+{ return 4 * (n + 2) + 3; }
+
+int
+main()
+{
+ auto ii = 1i;
+ auto Ii = 1I;
+ auto ji = 1j;
+ auto Ji = 1J;
+
+ auto ifp = 1.0i;
+ auto Ifp = 1.0I;
+ auto jfp = 1.0j;
+ auto Jfp = 1.0J;
+
+ auto kfp = 1.0k;
+ auto Kfp = 1.0K;
+ auto rfp = 1.0r;
+ auto Rfp = 1.0R;
+
+ auto wfp = 1.0w;
+ auto Wfp = 1.0W;
+ auto qfp = 1.0q;
+ auto Qfp = 1.0Q;
+}
+
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 7 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 11 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 15 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 19 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 25 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 29 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 33 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 37 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 43 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 47 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 51 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 55 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 61 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 65 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 69 }
+// { dg-warning "literal operator suffixes not preceded by" "" { target *-*-* } 73 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/stddef.C b/gcc/testsuite/g++.dg/cpp0x/stddef.C
new file mode 100644
index 0000000000..dad9200cc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/stddef.C
@@ -0,0 +1,6 @@
+// PR c++/54249
+// { dg-do compile { target c++11 } }
+
+#include <stddef.h>
+
+::nullptr_t n;
diff --git a/gcc/testsuite/g++.dg/cpp0x/stdint.C b/gcc/testsuite/g++.dg/cpp0x/stdint.C
new file mode 100644
index 0000000000..434d458241
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/stdint.C
@@ -0,0 +1,135 @@
+// PR c++/52764
+// { dg-require-effective-target stdint_types }
+// { dg-do compile { target c++11 } }
+
+#include <stdint.h>
+
+#ifdef __INT8_TYPE__
+# if (!defined INT8_MAX \
+ || !defined INT8_MIN)
+# error
+# endif
+#endif
+#ifdef __UINT8_TYPE__
+# if !defined UINT8_MAX
+# error
+# endif
+#endif
+#ifdef __INT16_TYPE__
+# if (!defined INT16_MAX \
+ || !defined INT16_MIN)
+# error
+# endif
+#endif
+#ifdef __UINT16_TYPE__
+# if !defined UINT16_MAX
+# error
+# endif
+#endif
+#ifdef __INT32_TYPE__
+# if (!defined INT32_MAX \
+ || !defined INT32_MIN)
+# error
+# endif
+#endif
+#ifdef __UINT32_TYPE__
+# if !defined UINT32_MAX
+# error
+# endif
+#endif
+#ifdef __INT64_TYPE__
+# if (!defined INT64_MAX \
+ || !defined INT64_MIN)
+# error
+# endif
+#endif
+#ifdef __UINT64_TYPE__
+# if !defined UINT64_MAX
+# error
+# endif
+#endif
+
+#if (!defined INT_LEAST8_MAX \
+ || !defined INT_LEAST8_MIN \
+ || !defined UINT_LEAST8_MAX \
+ || !defined INT_LEAST16_MAX \
+ || !defined INT_LEAST16_MIN \
+ || !defined UINT_LEAST16_MAX \
+ || !defined INT_LEAST32_MAX \
+ || !defined INT_LEAST32_MIN \
+ || !defined UINT_LEAST32_MAX \
+ || !defined INT_LEAST64_MAX \
+ || !defined INT_LEAST64_MIN \
+ || !defined UINT_LEAST64_MAX)
+#error
+#endif
+
+#if (!defined INT_FAST8_MAX \
+ || !defined INT_FAST8_MIN \
+ || !defined UINT_FAST8_MAX \
+ || !defined INT_FAST16_MAX \
+ || !defined INT_FAST16_MIN \
+ || !defined UINT_FAST16_MAX \
+ || !defined INT_FAST32_MAX \
+ || !defined INT_FAST32_MIN \
+ || !defined UINT_FAST32_MAX \
+ || !defined INT_FAST64_MAX \
+ || !defined INT_FAST64_MIN \
+ || !defined UINT_FAST64_MAX)
+#error
+#endif
+
+#ifdef __INTPTR_TYPE__
+# if (!defined INTPTR_MAX \
+ || !defined INTPTR_MIN)
+# error
+# endif
+#endif
+#ifdef __UINTPTR_TYPE__
+# if !defined UINTPTR_MAX
+# error
+# endif
+#endif
+
+#if (!defined INTMAX_MAX \
+ || !defined INTMAX_MIN \
+ || !defined UINTMAX_MAX)
+#error
+#endif
+
+#if (!defined PTRDIFF_MAX \
+ || !defined PTRDIFF_MIN)
+#error
+#endif
+
+#if (!defined SIG_ATOMIC_MAX \
+ || !defined SIG_ATOMIC_MIN)
+#error
+#endif
+
+#if !defined SIZE_MAX
+#error
+#endif
+
+#if (!defined WCHAR_MAX \
+ || !defined WCHAR_MIN)
+#error
+#endif
+
+#if (!defined WINT_MAX \
+ || !defined WINT_MIN)
+#error
+#endif
+
+#if (!defined INT8_C \
+ || !defined INT16_C \
+ || !defined INT32_C \
+ || !defined INT64_C \
+ || !defined UINT8_C \
+ || !defined UINT16_C \
+ || !defined UINT32_C \
+ || !defined UINT64_C \
+ || !defined INTMAX_C \
+ || !defined UINTMAX_C)
+#error
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp0x/syntax-err1.C b/gcc/testsuite/g++.dg/cpp0x/syntax-err1.C
index ce1c9eea53..5f5a236a5c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/syntax-err1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/syntax-err1.C
@@ -1,5 +1,5 @@
// PR c++/47198
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct S
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C b/gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C
index a067207020..9d8a3bd8be 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp-constructor-bug.C
@@ -1,4 +1,5 @@
-// { dg-options "--std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
struct S { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C b/gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C
index 085915f907..616f2f4b0f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp-va-arg-bug.C
@@ -1,5 +1,5 @@
-// { dg-options "--std=c++0x" }
-// { dg-options "-Wno-abi --std=c++0x" { target arm_eabi } }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wno-abi" { target arm_eabi } }
#include <stdarg.h>
struct S { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default1.C b/gcc/testsuite/g++.dg/cpp0x/temp_default1.C
index dfa2cfb7bc..33f6c9eb39 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp_default1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U>
struct is_same
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
index dab1650e44..2a41e22e1e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T, class U = double>
void f(T t = 0, U u = 0); // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default3.C b/gcc/testsuite/g++.dg/cpp0x/temp_default3.C
index f71fe0f435..2d59f4766e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp_default3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U = typename T::value_type>
void f(T);
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default4.C b/gcc/testsuite/g++.dg/cpp0x/temp_default4.C
index f1e254c40a..783ff5b19d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/temp_default4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default4.C
@@ -1,8 +1,8 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
class X {
template<typename T = int> friend void f(X) { }
- template<typename T> friend void g(X); // { dg-error "previously declared here" }
+ template<typename T> friend void g(X); // { dg-message "previously declared here" }
template<typename T = int> friend void h(X); // { dg-error "function template friend" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/temp_default5.C b/gcc/testsuite/g++.dg/cpp0x/temp_default5.C
new file mode 100644
index 0000000000..dd84d260ea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/temp_default5.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+
+template <class Z = void, class T>
+void Foo(T)
+{
+ struct X {};
+}
+
+template <class T = int, typename U>
+void f(const U&)
+{
+ auto g = [] () {};
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/template_deduction.C b/gcc/testsuite/g++.dg/cpp0x/template_deduction.C
index c1eace6fa0..1186e80566 100644
--- a/gcc/testsuite/g++.dg/cpp0x/template_deduction.C
+++ b/gcc/testsuite/g++.dg/cpp0x/template_deduction.C
@@ -2,8 +2,7 @@
// Test the "Augmented" template argument deduction when binding an lvalue to an rvalue reference.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
@@ -35,7 +34,7 @@ test1(T&&)
template <bool is_lvalue_ref, bool is_rvalue_ref, class T>
void
-test2(const T&&) // { dg-error "argument" }
+test2(const T&&) // { dg-message "argument" }
{
sa<is_lvalue_reference<const T&&>::value == is_lvalue_ref> t1;
sa<is_rvalue_reference<const T&&>::value == is_rvalue_ref> t2;
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing1.C b/gcc/testsuite/g++.dg/cpp0x/trailing1.C
index f637857b42..7d9a906d4f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing1.C
@@ -1,5 +1,6 @@
// Tests for late-specified return type.
-// { dg-options "-std=c++0x -fabi-version=5" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=5" }
auto f() -> int
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing2.C b/gcc/testsuite/g++.dg/cpp0x/trailing2.C
index 5f5af22947..888d6f958f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing2.C
@@ -1,16 +1,16 @@
// PR c++/37967
// Negative test for auto
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
auto f1 () -> int;
-auto f2 (); // { dg-error "without trailing return type" }
+auto f2 (); // { dg-error "without trailing return type" "" { target { ! c++1y } } }
int f3 () -> int; // { dg-error "trailing return type" }
auto *f4 () -> int; // { dg-error "trailing return type" }
struct A
{
auto f5 () const -> int;
- auto f6 (); // { dg-error "without trailing return type" }
+ auto f6 (); // { dg-error "without trailing return type" "" { target { ! c++1y } } }
int f7 () -> int; // { dg-error "trailing return type" }
auto *f8 () -> int; // { dg-error "trailing return type" }
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing3.C b/gcc/testsuite/g++.dg/cpp0x/trailing3.C
index 1c64f45731..ced5d5eaa4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing3.C
@@ -1,5 +1,6 @@
// More auto/decltype mangling tests.
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
template <class T>
struct B
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing4.C b/gcc/testsuite/g++.dg/cpp0x/trailing4.C
index 8d4baa97e5..0ca96e48d8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing4.C
@@ -1,5 +1,5 @@
// PR c++/38597
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T, class U>
auto f(T,U) -> decltype(T() + U())
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing5.C b/gcc/testsuite/g++.dg/cpp0x/trailing5.C
index b97d362be2..48f31452e5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing5.C
@@ -1,5 +1,5 @@
// PR c++/38798, DR 770
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {};
auto foo() -> struct A {}
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing6.C b/gcc/testsuite/g++.dg/cpp0x/trailing6.C
index 3476e90e58..0238740496 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing6.C
@@ -1,5 +1,5 @@
// PR c++/49003
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A {
auto a() const -> decltype(this) { return this; }
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing7.C b/gcc/testsuite/g++.dg/cpp0x/trailing7.C
index c4db10ec80..b3397ea3b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trailing7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing7.C
@@ -1,5 +1,5 @@
// PR c++/50365
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { int i; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/trailing8.C b/gcc/testsuite/g++.dg/cpp0x/trailing8.C
new file mode 100644
index 0000000000..304845e66d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/trailing8.C
@@ -0,0 +1,25 @@
+// PR c++/54359
+// { dg-require-effective-target c++11 }
+
+int& ref(int& x) { return x; }
+const int& ref(const int& x) { return x; }
+
+class A {
+ int x;
+ int f() const;
+ auto test1() const -> decltype(this);
+ auto test2() const -> decltype(ref(x));
+ auto test3() const -> decltype(f());
+};
+
+auto A::test1() const -> decltype(this) {
+ return this;
+}
+
+auto A::test2() const -> decltype(ref(x)) {
+ return ref(x);
+}
+
+auto A::test3() const -> decltype(f()) {
+ return f();
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/traits1.C b/gcc/testsuite/g++.dg/cpp0x/traits1.C
new file mode 100644
index 0000000000..9085b71a3d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/traits1.C
@@ -0,0 +1,133 @@
+// PR c++/57016
+// { dg-require-effective-target c++11 }
+
+template < typename _Tp, _Tp __v > struct integral_constant
+{
+ static constexpr _Tp value = __v;
+};
+template < bool, typename, typename > struct conditional;
+template < typename ... >struct __and_;
+template
+ <
+ typename
+ _B1,
+ typename
+ _B2 > struct __and_ <_B1, _B2 >:conditional < _B1::value, _B2, _B1 >::type
+{};
+template < typename _Pp > struct __not_:integral_constant < bool, _Pp::value >
+{};
+template < typename > struct add_rvalue_reference;
+template
+ < typename _Tp > typename add_rvalue_reference < _Tp >::type declval ();
+template < bool, typename _Iftrue, typename > struct conditional
+{
+ typedef _Iftrue type;
+};
+template < class, class > struct pair;
+template < typename > class allocator;
+template < typename, typename, typename > struct binary_function;
+template < typename _Tp > struct equal_to:binary_function < _Tp, _Tp, bool >
+{};
+template < typename > struct hash;
+template < >struct hash <int >
+{};
+template
+ <
+ typename,
+ typename,
+ typename,
+ typename, typename, typename, typename, typename > struct _Hashtable_base;
+template
+ <
+ typename,
+ typename
+ > struct __is_noexcept_hash:integral_constant < bool, noexcept ((declval)) >
+{}
+;
+struct _Identity;
+template < bool, bool _Constant_iterators, bool > struct _Hashtable_traits
+ ;
+struct _Mod_range_hashing;
+struct _Default_ranged_hash;
+struct _Prime_rehash_policy;
+template
+ <
+ typename
+ _Tp,
+ typename
+ _Hash
+ >
+ using
+ __cache_default
+ =
+ __not_
+ <
+ __and_
+ <
+ integral_constant
+ < bool, __is_final (_Hash) >, __is_noexcept_hash < _Tp, _Hash > >>;
+template < typename _Key, typename _Value, typename, typename _ExtractKey, typename _Equal, typename _H1, typename _H2, typename, typename _RehashPolicy, typename _Traits > class _Hashtable:
+_Hashtable_base
+ < _Key, _Value, _ExtractKey, _Equal, _H1, _H2, _RehashPolicy, _Traits >
+{}
+;
+template
+ <
+ bool
+ _Cache > using __uset_traits = _Hashtable_traits < _Cache, true, true >;
+template
+ <
+ typename
+ _Value,
+ typename
+ _Hash
+ =
+ hash
+ <
+ _Value
+ >,
+ typename
+ _Pred
+ =
+ equal_to
+ <
+ _Value
+ >,
+ typename
+ _Alloc
+ =
+ allocator
+ <
+ _Value
+ >,
+ typename
+ _Tr
+ =
+ __uset_traits
+ <
+ __cache_default
+ <
+ _Value,
+ _Hash
+ >::value
+ >
+ >
+ using
+ __uset_hashtable
+ =
+ _Hashtable
+ <
+ _Value,
+ _Value,
+ _Alloc,
+ _Identity,
+ _Pred,
+ _Hash,
+ _Mod_range_hashing, _Default_ranged_hash, _Prime_rehash_policy, _Tr >;
+template < class _Value, class = hash < _Value > >class unordered_set
+{
+ typedef __uset_hashtable < _Value > iterator;
+ template < typename > pair < iterator, bool > emplace ();
+}
+;
+template class unordered_set < int >;
diff --git a/gcc/testsuite/g++.dg/cpp0x/trivial1.C b/gcc/testsuite/g++.dg/cpp0x/trivial1.C
index 109c8ccdbd..3fed57042e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/trivial1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/trivial1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// [basic.types]/10:
// Scalar types, trivial class types (Clause 9), arrays of such types and
@@ -18,10 +18,10 @@
#define TRY(expr) static_assert (expr, #expr)
#define YES(type) TRY(std::is_trivial<type>::value); \
TRY(std::is_trivial<type[]>::value); \
- TRY(std::is_trivial<const volatile type>::value);
+ TRY(std::is_trivial<const volatile type>::value)
#define NO(type) TRY(!std::is_trivial<type>::value); \
TRY(!std::is_trivial<type[]>::value); \
- TRY(!std::is_trivial<const volatile type>::value);
+ TRY(!std::is_trivial<const volatile type>::value)
struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-addr.C b/gcc/testsuite/g++.dg/cpp0x/udlit-addr.C
index 7d3286e007..11389bfbc2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-addr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-addr.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <cstddef>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C
index df7b7281c3..d8d672e574 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-args-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <cstddef>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-args.C b/gcc/testsuite/g++.dg/cpp0x/udlit-args.C
index ca2039c59d..4680288d20 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-args.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-args.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <cstddef>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-args2.C b/gcc/testsuite/g++.dg/cpp0x/udlit-args2.C
index 1e7190fc8f..b9cb8e093a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-args2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-args2.C
@@ -1,6 +1,5 @@
// PR c++/52521
-// { dg-do compile }
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
#include <cstddef>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C
index a80e7244af..87e00826ed 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-clink-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern "C" {
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
index 61dc2ab02c..3093a7c055 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-concat-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C b/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
index 612bc1d111..d4f10c2973 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-concat.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-constexpr.C b/gcc/testsuite/g++.dg/cpp0x/udlit-constexpr.C
index 40b0dfac53..4c2f7eda37 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-constexpr.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-constexpr.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
constexpr unsigned long long
operator"" _grow(unsigned long long n)
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-declare-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-declare-neg.C
index 9060abba49..a68e2e020b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-declare-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-declare-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Check that undeclared literal operator calls and literals give appropriate errors.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C b/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
index 48a2a1b171..fef1a5342c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-embed-quote.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Make sure embedded quotes are not a problem for string and char literals.
@@ -7,10 +6,10 @@
#include <cassert>
int operator"" _embedchar(char)
-{ return 41; };
+{ return 41; }
int operator"" _embedstr(const char*, std::size_t len)
-{ return 42 + len; };
+{ return 42 + len; }
void
test()
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-friend.C b/gcc/testsuite/g++.dg/cpp0x/udlit-friend.C
index b3f3ef8a60..54d7b7a1f1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-friend.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-friend.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
long double
operator"" _Hertz(long double);
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-general.C b/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
index 9e448ac805..d69db561b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-general.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test user-defined literals.
// Test simple operator declaration and definition.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C
index 998ad155bf..ea6095d14e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-implicit-conv-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <cstdint>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-inline.C b/gcc/testsuite/g++.dg/cpp0x/udlit-inline.C
index 75032c5767..fd8b9a05b3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-inline.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-inline.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Literal operators can be inline.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-linkage-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-linkage-neg.C
index c2ecede8d4..3e99807fb8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-linkage-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-linkage-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
extern "C"_badlinkage { // { dg-error "expected unqualified-id before" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C b/gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C
index 6de31b65ea..8840dcdce2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-mangle.C
@@ -1,5 +1,5 @@
// PR c++/52521
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler "_Zli2_wPKc" } }
int operator "" _w(const char*);
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C
index a6220c4c0f..2a31452545 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-member-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class Foo
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C b/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
index e5d54e5190..73298900b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-namespace.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test user-defined literals.
// Test simple operator declaration and definition in namespaces.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C
index 6ad79b85b1..89c7581ff1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-nofunc-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test user-defined literals.
// Test error on non-function declaration.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-nonempty-str-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-nonempty-str-neg.C
index 981865f152..ddaa1aa6c3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-nonempty-str-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-nonempty-str-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test user-defined literals.
// Test error on non-empty string after 'operator' keyword.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-nospace-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-nospace-neg.C
index 2b57637a91..d1f3238845 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-nospace-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-nospace-neg.C
@@ -1,3 +1,5 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
-float operator ""_abc(const char*); // { dg-error "missing space between|and suffix identifier" }
+float operator ""_abc(const char*);
+
+int operator""_def(long double);
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C
index b90635cd0f..790726fb71 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-nosuffix-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
char32_t
operator"" (char32_t C) // { dg-error "expected suffix identifier" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C
index 2067bbe561..9120ae45df 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-nounder-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Test user-defined literals.
// Test warning on declaration without leading underscore.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C
index 27fdedec76..d71f4a240e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-operator-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Can't have *both* literal operator template and raw literal operator.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C
new file mode 100644
index 0000000000..d7e5e4b1f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-overflow-neg.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-Woverflow" }
+// PR c++/52654
+int
+operator"" _w(unsigned long long)
+{ return 0; }
+
+int
+operator"" _w(long double)
+{ return 0.0L; }
+
+int i = 12345678901234567890123456789012345678901234567890_w;
+int j = 12345678901234567890123456789.012345678901234567890e+1234567890_w;
+int k = 12345678901234567890123456789.012345678901234567890e-1234567890_w;
+
+// { dg-warning "integer literal exceeds range of " "" { target *-*-* } 12 }
+// { dg-warning "floating literal exceeds range of " "" { target *-*-* } 13 }
+// { dg-warning "floating literal truncated to zero" "" { target *-*-* } 14 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C b/gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C
new file mode 100644
index 0000000000..057978c327
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-overflow.C
@@ -0,0 +1,19 @@
+// { dg-do compile { target c++11 } }
+// PR c++/52654
+
+int
+operator"" _w(const char*)
+{ return 0; }
+
+template<char...>
+ int
+ operator"" _tw()
+ { return 0; }
+
+int i = 12345678901234567890123456789012345678901234567890_w;
+int j = 12345678901234567890123456789.012345678901234567890e+1234567890_w;
+int k = 12345678901234567890123456789.012345678901234567890e-1234567890_w;
+
+int ti = 12345678901234567890123456789012345678901234567890_tw;
+int tj = 12345678901234567890123456789.012345678901234567890e+1234567890_tw;
+int tk = 12345678901234567890123456789.012345678901234567890e-1234567890_tw;
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C
index 23633390cf..64b6f8266b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-preproc-neg.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
int
operator"" _badpreproc(const char *str)
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C
index 2d910624a7..8969c96d8c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-length.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/50958
typedef decltype(sizeof(0)) size_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C
index 58ad0e609d..be68333f50 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op-string-neg.C
@@ -1,8 +1,8 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Make sure handing a string to a raw literal generates a sensible error message.
int operator"" _embedraw(const char*)
-{ return 41; };
+{ return 41; }
int k = "Boo!"_embedraw; // { dg-error "unable to find string literal operator" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
index a31ef9328d..c3259ed9b4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-op.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
#include <cstring>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
index e94410fd06..7ca37b2a7f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-raw-str.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
index a25516220c..4241d0a803 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-resolve.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cstdint>
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C
index 994d58c1a0..c63559060e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-shadow-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// Test that the standard suffixes shadow any user-defined suffixes of the same name.
long double
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-string-length.C b/gcc/testsuite/g++.dg/cpp0x/udlit-string-length.C
index 86903e8355..acfda45d5f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-string-length.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-string-length.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/50941
typedef decltype(sizeof(0)) size_type;
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C
new file mode 100644
index 0000000000..734a0f38ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target stdint_types }
+// PR c++/55582
+
+#include "udlit-string-literal.h"
+
+using namespace my_string_literals;
+
+decltype("Hello, World!"s) s;
+decltype(u8"Hello, World!"s) s8;
+decltype(L"Hello, World!"s) ws;
+decltype(u"Hello, World!"s) s16;
+decltype(U"Hello, World!"s) s32;
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.h b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.h
new file mode 100644
index 0000000000..e61034ec4e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-string-literal.h
@@ -0,0 +1,22 @@
+#pragma GCC system_header
+
+#include <string>
+
+inline namespace my_string_literals
+{
+ std::string
+ operator"" s(const char* str, std::size_t len)
+ { return std::string{str, len}; }
+
+ std::wstring
+ operator"" s(const wchar_t* str, std::size_t len)
+ { return std::wstring{str, len}; }
+
+ std::u16string
+ operator"" s(const char16_t* str, std::size_t len)
+ { return std::u16string{str, len}; }
+
+ std::u32string
+ operator"" s(const char32_t* str, std::size_t len)
+ { return std::u32string{str, len}; }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
index 56eab01d73..7283fed9a3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-suffix-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <string>
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-systemheader.C b/gcc/testsuite/g++.dg/cpp0x/udlit-systemheader.C
index 599c8652a1..189e44597d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-systemheader.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-systemheader.C
@@ -1,3 +1,3 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include "udlit_system_header"
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-template.C b/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
index 6a28f74a22..de21b66028 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-template.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Test user-defined literals.
// Test template operator declaration and definition.
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg-neg.C
index e8ccb6f545..678a53e3f4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<char...>
int operator"" _xyz(unsigned long long); // { dg-error "has invalid argument list" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg.C
index 6324823fab..cec79a5ffb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-arg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<char...>
int operator"" _abc();
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms-neg.C b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms-neg.C
index 4dab4d2f6f..f681ecfbcc 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms-neg.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms-neg.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class Foo { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms.C b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms.C
index 77456737c7..bc7eaf66fb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms.C
+++ b/gcc/testsuite/g++.dg/cpp0x/udlit-tmpl-parms.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
class Foo { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/union1.C b/gcc/testsuite/g++.dg/cpp0x/union1.C
index cb0f01719c..ff415fc573 100644
--- a/gcc/testsuite/g++.dg/cpp0x/union1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/union1.C
@@ -1,5 +1,5 @@
-// Negative test for C++0x unrestricted unions
-// { dg-options -std=c++0x }
+// Negative test for C++11 unrestricted unions
+// { dg-do compile { target c++11 } }
// { dg-prune-output "implicitly deleted because" }
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/union2.C b/gcc/testsuite/g++.dg/cpp0x/union2.C
index 4f193e281c..514409414d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/union2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/union2.C
@@ -1,5 +1,5 @@
-// Positive test for C++0x unrestricted unions
-// { dg-options -std=c++0x }
+// Positive test for C++11 unrestricted unions
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/union3.C b/gcc/testsuite/g++.dg/cpp0x/union3.C
index f1e8ddb610..d95d30c6fe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/union3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/union3.C
@@ -1,6 +1,5 @@
-// Runtime test for C++0x unrestricted unions
-// { dg-options -std=c++0x }
-// { dg-do run }
+// Runtime test for C++11 unrestricted unions
+// { dg-do run { target c++11 } }
int c, d;
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/union4.C b/gcc/testsuite/g++.dg/cpp0x/union4.C
index 07050475d3..cf9916dc36 100644
--- a/gcc/testsuite/g++.dg/cpp0x/union4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/union4.C
@@ -1,9 +1,9 @@
// PR c++/48537
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct SFoo
{
- SFoo() =delete; // { dg-error "declared" }
+ SFoo() =delete; // { dg-message "declared" }
};
union UFoo // { dg-error "deleted" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/union5.C b/gcc/testsuite/g++.dg/cpp0x/union5.C
index 423b348232..8d2bc98da8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/union5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/union5.C
@@ -1,5 +1,6 @@
// PR c++/49803
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
struct X
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C b/gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C
index c596676458..c1b94bb5ca 100644
--- a/gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C
+++ b/gcc/testsuite/g++.dg/cpp0x/unnamed_refs.C
@@ -2,8 +2,7 @@
// Test: Unamed rvalue references are treated as lvalues.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <bool> struct sa;
template <> struct sa<true> {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-104.C b/gcc/testsuite/g++.dg/cpp0x/variadic-104.C
index c693b33f9a..50956d21a4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-104.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-104.C
@@ -1,5 +1,5 @@
// PR c++/45236
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T, class S> class foo;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C b/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
index abe445d434..74e01ec364 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-bind.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
// A basic implementation of TR1's bind using variadic teplates
// Contributed by Douglas Gregor <doug.gregor@gmail.com>
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C
index f26aee2a91..211ede6110 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-crash1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
#define ONE
#define TWO
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
index f46b8e534e..8b5ee0dd24 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-crash2.C
@@ -1,7 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/39637
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class... Types>
void
@@ -16,5 +15,3 @@ main()
{
f(0);
}
-
-// { dg-message "note" "Types" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-default.C b/gcc/testsuite/g++.dg/cpp0x/variadic-default.C
index 2625e259f7..33b27a5404 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-default.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-default.C
@@ -1,5 +1,5 @@
// PR c++/49205
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <initializer_list>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-diag1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-diag1.C
new file mode 100644
index 0000000000..53182d3e06
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-diag1.C
@@ -0,0 +1,22 @@
+// PR c++/55232
+// { dg-do compile { target c++11 } }
+
+struct vector
+{
+ typedef int value_type;
+};
+
+template< class U, class... T >
+struct X
+{
+ void push_back( typename T::value_type ... vals )
+ {
+ U::asoeuth; // { dg-error "" }
+ }
+};
+
+int main()
+{
+ X< int, vector > x;
+ x.push_back( 0 );
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
index 485fffa476..b301604093 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename ... Elements> class Tuple;
Tuple<>* t; // OK: Elements is empty
Tuple* u; // { dg-error "template-name" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
index e8b6b72214..3df356aaf3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex10.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Types> struct Tuple { };
Tuple<> t0; // Types contains no arguments
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C
index 57ef2a3d30..9991fa2fd5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex11.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Types>
void f(Types... args);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C
index b97df31020..bc55b2d55f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex12.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Types>
void f(Types... rest);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C
index b742cb1d36..fe29e71761 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex13.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename U> struct is_same {
static const bool value = false;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C
index 105096a78b..600b798684 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex14.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class T> class A { /* ... */ };
template<class T, class U = T> class B { /* ... */ };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C
index ca5fa27163..015d9d8403 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class... Types> struct B { // { dg-error "declaration of" }
void f3();
void f4();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
index 018eaa3ed8..8a723ab753 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class X, class Y, class... Z> X f(Y); // { dg-message "note" }
void g()
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
index 0a777c4853..26651f74d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex4.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class X, class Y, class Z> X f(Y,Z); // { dg-message "note" }
template<class... Args> void f2();
void g()
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C
index 2439a51c5a..841562f811 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex5.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Types> void f(Types... values);
void g()
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C
index 87b1bf2057..185a96346a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex6.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class...> struct Tuple { };
template<class... Types> void f(Types&...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C
index 7ca31f9c67..c1bf837a78 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex7.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct Tuple { };
template<typename... Types> char& g(Tuple<Types...>); // #1
template<typename T1, typename... Types> short& g(Tuple<T1, Types...>); // #2
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C
index 03d28b8253..581e4dbeef 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex8.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class> struct X { static const bool primary = true; };
template<class R, class... ArgTypes> struct X<R(int, ArgTypes...)> {
static const bool primary = false;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
index 74215c9972..0617b1ae3f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ex9.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args> char& f(Args... args); // #1
template<typename T1, typename... Args> short& f(T1 a1, Args... args); // #2
template<typename T1, typename T2> int& f(T1 a2, T2 a3); // #3
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C
index a097f43d21..605c55beaa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-explicit1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T, class U> struct A { };
template<class... T, class ... U> void f( A<T,U>... p);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-function.C b/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
index eeb137705f..bb98531c38 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-function.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
// A basic implementation of TR1's function using variadic teplates
// Contributed by Douglas Gregor <doug.gregor@gmail.com>
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-init.C b/gcc/testsuite/g++.dg/cpp0x/variadic-init.C
index 34ade85e0f..ac072c6b54 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-init.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-init.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
// PR c++/33510
#define SIZE_FROM_CTOR
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C b/gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C
index 705d441493..f235c36c55 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-lambda.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct int_placeholder;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
index 51c5c79ef9..aca58e3946 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-mem_fn.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
// A basic implementation of TR1's mem_fn using variadic teplates
// Contributed by Douglas Gregor <doug.gregor@gmail.com>
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-new.C b/gcc/testsuite/g++.dg/cpp0x/variadic-new.C
index 5bbb9c81b0..af7c86fca1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-new.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-new.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// Contributed by Peter Dimov
// PR c++/32597
#include <assert.h>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-new2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-new2.C
index 81d333398b..413e0701d7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-new2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-new2.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
// PR c++/32597
#include <assert.h>
#include <new>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C
index a64d7971c6..4aa5dbab2b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce1.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class... T>
void f(T..., int, T...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C
new file mode 100644
index 0000000000..a82a098c3d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-nondeduce2.C
@@ -0,0 +1,25 @@
+// PR c++/55220
+// { dg-do compile { target c++11 } }
+
+template <typename ...> struct something_like_tuple
+{
+
+};
+
+template <typename, typename> struct is_last
+{
+ static const bool value = false;
+};
+
+// Head is non-deducible, so this can't work as the user intended
+template <typename T, template <typename ...> class Tuple, typename ... Head>
+struct is_last<T, Tuple<Head ..., T>>
+{
+ static const bool value = true;
+};
+
+#define SA(X) static_assert (X, #X)
+
+typedef something_like_tuple<char, int, float> something_like_tuple_t;
+SA ((is_last<float, something_like_tuple_t>::value == false));
+SA ((is_last<int, something_like_tuple_t>::value == false));
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-rref.C b/gcc/testsuite/g++.dg/cpp0x/variadic-rref.C
index 08221b460f..ee90c9b873 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-rref.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-rref.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/33939
template<typename T>
struct refs_only;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C
new file mode 100644
index 0000000000..2837c856b1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof1.C
@@ -0,0 +1,11 @@
+// PR c++/56679
+// { dg-require-effective-target c++11 }
+
+template <template <typename> class... Args>
+struct Foo {
+ static const int value = sizeof...(Args);
+};
+
+template <typename> struct Bar { };
+
+const int test = Foo<Bar>::value;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C
new file mode 100644
index 0000000000..dfc245d162
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof2.C
@@ -0,0 +1,14 @@
+// PR c++/57471
+// { dg-require-effective-target c++11 }
+
+struct A
+{
+ static constexpr bool value = true;
+};
+
+template<typename... Types>
+struct B
+{
+ static_assert(A::value, "");
+ static_assert(sizeof...(Types) == 0, "");
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C
new file mode 100644
index 0000000000..7296500a3a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-sizeof3.C
@@ -0,0 +1,15 @@
+// PR c++/59435
+// { dg-require-effective-target c++11 }
+
+template <typename... E>
+struct T
+{
+ T(unsigned int i = sizeof...(E)){} // does not compile
+
+ static constexpr unsigned int U = sizeof...(E);
+ T(unsigned int j, unsigned int i = U){} // compile
+};
+
+template <typename... T>
+void test(int i = sizeof...(T)) // compile
+{}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C b/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C
index 8363c2a73f..fc81e9d5d4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-throw.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
// PR c++/33509
template<int M, int N> struct pair
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C b/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C
index 41f1c1db43..5d08d1347a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-ttp.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// PR c++/34101
template<typename> struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C b/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
index 11ce14af28..b1c6b3d781 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-tuple.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
// An implementation of TR1's <tuple> using variadic teplates
// Contributed by Douglas Gregor <doug.gregor@gmail.com>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C b/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
index 80c9f5d2c3..0a7acba61d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-unify-2.C
@@ -1,7 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/40155
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template <typename T> struct identity
{ typedef T type; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C b/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C
index 54234391e6..29b528ccc4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-unify.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct tuple { };
template<typename... Args1, typename... Args2>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C b/gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C
index a8463de198..263640dd03 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic-unresolved.C
@@ -1,5 +1,5 @@
// PR c++/50086
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T> void tfun();
template<typename T> void fun1(T);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic1.C b/gcc/testsuite/g++.dg/cpp0x/variadic1.C
index f87d53ca38..ed80849b4c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...>
class tuple;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic10.C b/gcc/testsuite/g++.dg/cpp0x/variadic10.C
index 5f73eba8d6..03fa39cd6b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic10.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic10.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct pair {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic100.C b/gcc/testsuite/g++.dg/cpp0x/variadic100.C
index a364bbc911..502601f874 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic100.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic100.C
@@ -1,5 +1,5 @@
// PR c++/43143
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
T&& declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic101.C b/gcc/testsuite/g++.dg/cpp0x/variadic101.C
index 445a770afa..8bcedfff6a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic101.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic101.C
@@ -1,5 +1,5 @@
// PR c++/43382
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
struct Container
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic102.C b/gcc/testsuite/g++.dg/cpp0x/variadic102.C
index dc9c4aea8c..9214b01c46 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic102.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic102.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct nAny {
template<class... T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic103.C b/gcc/testsuite/g++.dg/cpp0x/variadic103.C
index 9d6b5ea20b..69510e61be 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic103.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic103.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic105.C b/gcc/testsuite/g++.dg/cpp0x/variadic105.C
index 66d24a7efe..4ba384c720 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic105.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic105.C
@@ -1,5 +1,5 @@
// PR c++/47289
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
template <template <typename... __ARGS> class _F, typename... _ARGS>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic106.C b/gcc/testsuite/g++.dg/cpp0x/variadic106.C
index 80ec0844fb..efa4c34cd8 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic106.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic106.C
@@ -1,6 +1,5 @@
// Origin: PR c++/47326
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template <int _N>
struct A
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic107.C b/gcc/testsuite/g++.dg/cpp0x/variadic107.C
index 5c3f468515..d22f87c1d3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic107.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic107.C
@@ -1,5 +1,5 @@
// PR c++/48451
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
namespace std {
template <class T> T&& declval();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic108.C b/gcc/testsuite/g++.dg/cpp0x/variadic108.C
index 3ad5af4571..2e396c6f5a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic108.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic108.C
@@ -1,5 +1,5 @@
// PR c++/48736
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class T>
T&& create();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic109.C b/gcc/testsuite/g++.dg/cpp0x/variadic109.C
index 0ec69af812..3ecfb73988 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic109.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic109.C
@@ -1,5 +1,5 @@
// PR c++/48292
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename... Args> int g(Args...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic11.C b/gcc/testsuite/g++.dg/cpp0x/variadic11.C
index 3c27de0fb1..2bdeb32260 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic11.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic11.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct count;
template<>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic110.C b/gcc/testsuite/g++.dg/cpp0x/variadic110.C
index 86f1bb1543..47a9ed9a6f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic110.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic110.C
@@ -1,5 +1,5 @@
// PR c++/45698
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class... Ts> struct tuple { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic111.C b/gcc/testsuite/g++.dg/cpp0x/variadic111.C
index cb94ce6975..09bac287a5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic111.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic111.C
@@ -1,5 +1,6 @@
// PR c++/48424
-// { dg-options "-std=c++0x -fabi-version=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
template<typename... Args1>
struct S
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic112.C b/gcc/testsuite/g++.dg/cpp0x/variadic112.C
index 1640657d95..50d7e943a2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic112.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic112.C
@@ -1,5 +1,5 @@
// PR c++/49420
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic113.C b/gcc/testsuite/g++.dg/cpp0x/variadic113.C
index 3f1bb2ad04..8f02fed04e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic113.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic113.C
@@ -1,5 +1,6 @@
// PR c++/49251
-// { dg-options "-std=c++0x -Wunused-parameter" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-parameter" }
struct A {};
template <int> int f(A);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic114.C b/gcc/testsuite/g++.dg/cpp0x/variadic114.C
index 3ffede5c50..82ffe83c7c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic114.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic114.C
@@ -1,5 +1,5 @@
// PR c++/49785
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename, typename ...> struct B { };
template <typename> class A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic115.C b/gcc/testsuite/g++.dg/cpp0x/variadic115.C
index fa032e3b02..bb781859ce 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic115.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic115.C
@@ -1,5 +1,5 @@
// PR c++/49593
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename... T> void f(T...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic116.C b/gcc/testsuite/g++.dg/cpp0x/variadic116.C
index 079d751cb4..05a9a79f4f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic116.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic116.C
@@ -1,5 +1,5 @@
// Origin: PR c++/48320
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<class... T>
struct tuple
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic117.C b/gcc/testsuite/g++.dg/cpp0x/variadic117.C
index 22f2fc5ae2..04663d2b64 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic117.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic117.C
@@ -1,4 +1,4 @@
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class T> struct A { typedef T type; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic118.C b/gcc/testsuite/g++.dg/cpp0x/variadic118.C
index 43bf9bab21..ee742ebb94 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic118.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic118.C
@@ -1,5 +1,5 @@
// This should fail deduction, before it produces a candidate.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <class... T>
void f(T... ts); // { dg-message "deduction" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic12.C b/gcc/testsuite/g++.dg/cpp0x/variadic12.C
index 30108c9993..661ed3d499 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic12.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic12.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
// A tuple type
template<typename... Args> struct tuple { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic121.C b/gcc/testsuite/g++.dg/cpp0x/variadic121.C
index 805c0065fe..21121962d5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic121.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic121.C
@@ -1,5 +1,5 @@
// PR c++/51507
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename ...>
struct foo { typedef void type; };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic122.C b/gcc/testsuite/g++.dg/cpp0x/variadic122.C
index 7f03c107c3..aa21ddddd1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic122.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic122.C
@@ -1,5 +1,6 @@
// PR c++/52043
-// { dg-options "-std=c++11 -Wreturn-type" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wreturn-type" }
template < class T > struct Container
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic124.C b/gcc/testsuite/g++.dg/cpp0x/variadic124.C
index 8ddc810b31..d69c6f912c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic124.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic124.C
@@ -1,5 +1,5 @@
// PR c++/52292
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template <template <typename...> class T>
struct foo {
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic126.C b/gcc/testsuite/g++.dg/cpp0x/variadic126.C
new file mode 100644
index 0000000000..513c7e54a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic126.C
@@ -0,0 +1,8 @@
+// PR c++/47220
+// { dg-do compile { target c++11 } }
+
+template < typename ... > struct A;
+
+struct B : A < // { dg-error "invalid" }
+{
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic127.C b/gcc/testsuite/g++.dg/cpp0x/variadic127.C
new file mode 100644
index 0000000000..2e0d593ac9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic127.C
@@ -0,0 +1,15 @@
+// PR c++/51148
+// { dg-do compile { target c++11 } }
+
+template<typename... Types>
+struct S
+{};
+
+template<typename... Types>
+struct T
+{
+ friend class S<Types>; // { dg-error "parameter packs not expanded" }
+};
+
+int main()
+{}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic13.C b/gcc/testsuite/g++.dg/cpp0x/variadic13.C
index 7794e8a3dc..8a59c981af 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic13.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic13.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args> struct tuple1 { };
template<typename... Args> struct tuple2 { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic130.C b/gcc/testsuite/g++.dg/cpp0x/variadic130.C
new file mode 100644
index 0000000000..f73c8b5126
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic130.C
@@ -0,0 +1,8 @@
+// PR c++/52008
+// { dg-do compile { target c++11 } }
+
+template <int I, typename T, typename... Ts>
+struct A;
+
+template<typename... Ts>
+struct A<0, Ts...>; // { dg-error "not more specialized" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic135.C b/gcc/testsuite/g++.dg/cpp0x/variadic135.C
new file mode 100644
index 0000000000..fcdd2a7185
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic135.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++11 } }
+
+template <typename ...> struct S;
+
+int i = S<int,>::undefined; // { dg-error "template argument 2 is invalid" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic139.C b/gcc/testsuite/g++.dg/cpp0x/variadic139.C
new file mode 100644
index 0000000000..a1c64f30f6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic139.C
@@ -0,0 +1,14 @@
+// Origin: PR c++/53609
+// { dg-do compile { target c++11 } }
+
+template<class...I> struct List {};
+template<int T> struct Z {static const int value = T;};
+template<int...T> using LZ = List<Z<T>...>;
+
+template<class...U>
+struct F
+{
+ using N = LZ<U::value...>;
+};
+
+F<Z<1>, Z<2> >::N A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic14.C b/gcc/testsuite/g++.dg/cpp0x/variadic14.C
index 3c1bb0d6d2..addbd7479f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic14.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic14.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic140.C b/gcc/testsuite/g++.dg/cpp0x/variadic140.C
new file mode 100644
index 0000000000..17ca9e5fdf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic140.C
@@ -0,0 +1,22 @@
+// Origin: PR c++/53609
+// { dg-do compile { target c++11 } }
+
+template<class...I> struct List{ static const bool is_ok = false;};
+template<int T> struct Z
+{
+ static const int value = T;
+ static const int value_square = T * T;
+};
+
+template<template<int> class U>
+struct List<U<2>, U<3>, U<4>, U<9>> { static const bool is_ok = true;};
+
+template<int...T> using LZ = List<Z<T>...>;
+
+template<class...T>
+struct F
+{
+ using N = LZ<T::value..., T::value_square...>;
+};
+
+static_assert (F<Z<2>, Z<3>>::N::is_ok, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic141.C b/gcc/testsuite/g++.dg/cpp0x/variadic141.C
new file mode 100644
index 0000000000..6b893a77c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic141.C
@@ -0,0 +1,22 @@
+// Origin: PR c++/53609
+// { dg-do compile { target c++11 } }
+
+template<class...I> struct List{ static const bool is_ok = false;};
+template<int T> struct Z
+{
+ static const int value = T;
+ static const int value_square = T * T;
+};
+
+template<template<int> class U>
+struct List<U<2>, U<3>, U<4>, U<9>> { static const bool is_ok = true;};
+
+template<int...T> using LZ = List<Z<T>...>;
+
+template<class...T>
+struct F
+{
+ using N = LZ<T::value..., Z<4>::value, Z<9>::value>;
+};
+
+static_assert (F<Z<2>, Z<3>>::N::is_ok, "");
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic142.C b/gcc/testsuite/g++.dg/cpp0x/variadic142.C
new file mode 100644
index 0000000000..83b2429a5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic142.C
@@ -0,0 +1,9 @@
+// Core 1609
+// { dg-require-effective-target c++11 }
+
+template<typename... T>
+void f2(int a = 0, T... b, int c = 1);
+
+int main(){
+ f2<>(); // parameter a has the value 0 and parameter c has the value 1
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic143.C b/gcc/testsuite/g++.dg/cpp0x/variadic143.C
new file mode 100644
index 0000000000..db0b268e4b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic143.C
@@ -0,0 +1,63 @@
+// PR c++/56782
+// { dg-do compile { target c++11 } }
+
+template<class T>
+T&& declval();
+
+struct is_convertible_impl {
+ template<class T>
+ static void sink(T);
+
+ template<class T, class U, class = decltype(sink<U>(declval<T>()))>
+ static auto test(int) -> char;
+
+ template<class, class>
+ static auto test(...) -> char(&)[2];
+};
+
+template<class T, class U>
+struct is_convertible : is_convertible_impl
+{
+ static const bool value = sizeof(test<T, U>(0)) == 1;
+};
+
+template<bool, class>
+struct enable_if {};
+
+template<class T>
+struct enable_if<true, T> { typedef T type; };
+
+template<bool, class If, class Else>
+struct conditional { typedef If type; };
+
+template<class If, class Else>
+struct conditional<false, If, Else> { typedef Else type; };
+
+template<class...>
+struct and_;
+
+template<>
+struct and_<>
+{
+ static const bool value = true;
+};
+
+template<class P>
+struct and_<P> : P
+{
+};
+
+template<class P1, class P2>
+struct and_<P1, P2> : conditional<P1::value, P2, P1>::type
+{
+};
+
+template<class... T>
+struct Tuple {
+ template<class... U,
+ class = typename enable_if<and_<is_convertible<U, T>... >::value, int>::type
+ >
+ Tuple(U&&...){}
+};
+
+static_assert(is_convertible<Tuple<>, Tuple<>>::value, "Ouch"); //#1
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic144.C b/gcc/testsuite/g++.dg/cpp0x/variadic144.C
new file mode 100644
index 0000000000..5d05d3d52b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic144.C
@@ -0,0 +1,15 @@
+// PR c++/56060
+// { dg-do compile { target c++11 } }
+
+template<typename T> struct baz { };
+template<typename T> T bar();
+
+template<typename T, typename ... U>
+baz<decltype(bar<T>()(bar<U> ...))> // { dg-error "cannot be used" }
+foo();
+
+int main()
+{
+ foo<int>(); // { dg-error "no matching" }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic145.C b/gcc/testsuite/g++.dg/cpp0x/variadic145.C
new file mode 100644
index 0000000000..65edda59fd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic145.C
@@ -0,0 +1,13 @@
+// PR c++/59730
+// { dg-do compile { target c++11 } }
+
+template <typename> void declval();
+template <typename> void forward();
+template <typename> class D;
+template <typename _Functor, typename... _Bound_args>
+class D <_Functor(_Bound_args...)> {
+ template <typename... _Args, decltype(declval<_Functor>)>
+ void operator()(...) {
+ 0(forward<_Args>...);
+ }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic146.C b/gcc/testsuite/g++.dg/cpp0x/variadic146.C
new file mode 100644
index 0000000000..0c91db581d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic146.C
@@ -0,0 +1,9 @@
+// PR c++/58606
+// { dg-require-effective-target c++11 }
+
+template<int&...I> struct A
+{
+ template<typename> struct B;
+
+ template<typename T> struct B<T*> {};
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic147.C b/gcc/testsuite/g++.dg/cpp0x/variadic147.C
new file mode 100644
index 0000000000..7f606d84a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic147.C
@@ -0,0 +1,10 @@
+// PR c++/58466
+// { dg-require-effective-target c++11 }
+
+template<char, char...> struct A;
+
+template<typename> struct B;
+
+template<char... C> struct B<A<C...>> {};
+
+B<A<'X'>> b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic148.C b/gcc/testsuite/g++.dg/cpp0x/variadic148.C
new file mode 100644
index 0000000000..a4ee63533d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic148.C
@@ -0,0 +1,6 @@
+// PR c++/59989
+// { dg-require-effective-target c++11 }
+
+template<typename T> struct X {};
+template<template<typename...> class D, typename ...U> int test(D<U...>*);
+int n = test<X, int>(0); // { dg-error "no match" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic149.C b/gcc/testsuite/g++.dg/cpp0x/variadic149.C
new file mode 100644
index 0000000000..8207d9832a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic149.C
@@ -0,0 +1,12 @@
+// PR c++/60248
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -fabi-version=2" }
+
+template<int...> struct A {};
+
+template<> struct A<0>
+{
+ typedef enum { e } B;
+};
+
+A<0> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic15.C b/gcc/testsuite/g++.dg/cpp0x/variadic15.C
index 68786cb822..895a548e35 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic15.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic15.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic150.C b/gcc/testsuite/g++.dg/cpp0x/variadic150.C
new file mode 100644
index 0000000000..6a30efed92
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic150.C
@@ -0,0 +1,9 @@
+// PR c++/60219
+// { dg-require-effective-target c++11 }
+
+template<typename..., int> void foo();
+
+void bar()
+{
+ foo<0>; // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic151.C b/gcc/testsuite/g++.dg/cpp0x/variadic151.C
new file mode 100644
index 0000000000..a65351db41
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic151.C
@@ -0,0 +1,9 @@
+// PR c++/54440
+// { dg-do compile { target c++11 } }
+
+template <class...T> struct A
+{
+ template <T... t, class U> struct B { };
+};
+
+A<int,char>::B<42,'a',float> b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic152.C b/gcc/testsuite/g++.dg/cpp0x/variadic152.C
new file mode 100644
index 0000000000..d7dccc53f6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic152.C
@@ -0,0 +1,12 @@
+// PR c++/54440
+// { dg-do compile { target c++11 } }
+
+template <class...T> struct A
+{
+ template <template <T> class... TP, class U> struct B { };
+};
+
+template <int I> struct C { };
+template <char C> struct D { };
+
+A<int,char>::B<C,D,float> b;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic153.C b/gcc/testsuite/g++.dg/cpp0x/variadic153.C
new file mode 100644
index 0000000000..42a92f6b2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic153.C
@@ -0,0 +1,6 @@
+// PR c++/58648
+// { dg-require-effective-target c++11 }
+
+template<int, typename...T, T...> int foo();
+
+int i = foo<0>();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic154.C b/gcc/testsuite/g++.dg/cpp0x/variadic154.C
new file mode 100644
index 0000000000..198f9c5ba3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic154.C
@@ -0,0 +1,8 @@
+// PR c++/60374
+// { dg-do compile { target c++11 } }
+
+template<typename> struct A {};
+
+template<typename...T> struct A<T::T...> {}; // { dg-error "typename|partial|T" }
+
+A<int> a;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic155.C b/gcc/testsuite/g++.dg/cpp0x/variadic155.C
new file mode 100644
index 0000000000..d912317bdc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic155.C
@@ -0,0 +1,4 @@
+// { dg-do compile { target c++11 } }
+
+template <typename T> struct A {};
+template <int... I> struct B: A<I...> {}; // { dg-error "type" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic156.C b/gcc/testsuite/g++.dg/cpp0x/variadic156.C
new file mode 100644
index 0000000000..7d3c97d689
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic156.C
@@ -0,0 +1,6 @@
+// PR c++/52844
+// { dg-do compile { target c++11 } }
+
+template < class > struct V { };
+template < int...Is > void f ( V < Is...>) { } // { dg-error "mismatch|type" }
+auto g ( ) -> decltype ( f ( V < long > ( ) ) ) ; // { dg-error "matching" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic158.C b/gcc/testsuite/g++.dg/cpp0x/variadic158.C
new file mode 100644
index 0000000000..cc5c24ddc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic158.C
@@ -0,0 +1,24 @@
+// PR c++/61134
+// { dg-do compile { target c++11 } }
+
+struct Base { };
+
+template <typename>
+struct Fixed {
+ typedef const char* name;
+};
+
+template <typename VT, typename... Fields>
+void New(const char* name,
+ typename Fixed<Fields>::name... field_names);
+
+template <typename VT, typename... Fields>
+void CreateMetric(const char* name,
+ typename Fixed<Fields>::name... field_names,
+ const Base&) { }
+
+
+void Fn()
+{
+ CreateMetric<int, const char*>("abcd", "def", Base());
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic159.C b/gcc/testsuite/g++.dg/cpp0x/variadic159.C
new file mode 100644
index 0000000000..2b14d3005f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic159.C
@@ -0,0 +1,14 @@
+// PR c++/61507
+// { dg-do compile { target c++11 } }
+
+struct A {
+ void foo(const int &);
+ void foo(float);
+};
+
+template <typename... Args>
+void bar(void (A::*memfun)(Args...), Args... args);
+
+void go(const int& i) {
+ bar<const int &>(&A::foo, i);
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic16.C b/gcc/testsuite/g++.dg/cpp0x/variadic16.C
index 001919d469..d377d3616f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic16.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic16.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic160.C b/gcc/testsuite/g++.dg/cpp0x/variadic160.C
new file mode 100644
index 0000000000..20fcd5b4fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic160.C
@@ -0,0 +1,49 @@
+// PR c++/61539
+// { dg-do compile { target c++11 } }
+
+template <typename _CharT> class A;
+template <typename> class B;
+template <class charT> class C;
+template <> class C<char>
+{
+ virtual void xparse (int &, const B<A<char> > &) const;
+};
+template <class T, class charT = char> class G : C<charT>
+{
+public:
+ G (void *) {}
+ void default_value (const T &);
+ void xparse (int &, const B<A<charT> > &) const;
+};
+template <class T, class charT>
+void validate (int &, const B<A<charT> > &, T *, int);
+template <class T, class charT>
+void G<T, charT>::xparse (int &p1, const B<A<charT> > &p2) const
+{
+ validate (p1, p2, (T *)0, 0);
+}
+template <class T> G<T> *value (T *) { return new G<T>(0); }
+namespace Eigen
+{
+template <typename T> struct D;
+template <typename, int, int, int = 0, int = 0, int = 0 > class F;
+template <typename _Scalar, int _Rows, int _Cols, int _Options, int _MaxRows,
+ int _MaxCols>
+struct D<F<_Scalar, _Rows, _Cols, _Options, _MaxRows, _MaxCols> >
+{
+ typedef _Scalar Scalar;
+};
+template <typename, int, int, int, int, int _MaxCols> class F
+{
+public:
+ typedef typename Eigen::D<F>::Scalar Scalar;
+ F (const Scalar &, const Scalar &, const Scalar &);
+};
+template <class... T>
+void validate (int &, const B<A<char> > &, Eigen::F<T...> *);
+}
+int main (int, char *[])
+{
+ Eigen::F<double, 3, 1> a (0, 0, 0);
+ value (&a)->default_value (Eigen::F<double, 3, 1>(0, 0, 0));
+}
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic161.C b/gcc/testsuite/g++.dg/cpp0x/variadic161.C
new file mode 100644
index 0000000000..ac6eaf6a36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic161.C
@@ -0,0 +1,51 @@
+// PR c++/63139
+// { dg-do compile { target c++11 } }
+
+template<typename ...T>
+struct type_list {};
+
+template<typename ...T>
+struct make_type_list
+{
+ using type = type_list<T...>;
+};
+
+// The bug disappears if you use make_type_list directly.
+template<typename ...T>
+using make_type_list_t = typename make_type_list<T...>::type;
+
+
+struct ContainerEndA {};
+
+template<typename ...Ts>
+struct ContainerA
+{
+ using type = make_type_list_t<Ts..., ContainerEndA>;
+};
+
+
+struct ContainerEndB {};
+
+template<typename ...Ts>
+struct ContainerB
+{
+ using type = make_type_list_t<Ts..., ContainerEndB>;
+};
+
+template<typename T, typename U>
+struct is_same
+{
+ static const bool value = false;
+};
+
+template<typename T>
+struct is_same<T, T>
+{
+ static const bool value = true;
+};
+
+#define SA(X) static_assert((X), #X)
+
+SA((is_same<ContainerB<>::type, type_list<ContainerEndB>>::value));
+SA((!is_same<ContainerA<>::type, type_list<ContainerEndB>>::value));
+SA((!is_same<ContainerA<>::type, ContainerB<>::type>::value));
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic162.C b/gcc/testsuite/g++.dg/cpp0x/variadic162.C
new file mode 100644
index 0000000000..9e5386deb4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic162.C
@@ -0,0 +1,14 @@
+// PR c++/63405
+// { dg-do compile { target c++11 } }
+
+template <typename _Tp> _Tp forward(_Tp);
+template <typename Args> struct Format { Format(int, Args); };
+template <typename... Args> auto format(Args &&... args) -> Format<Args...> {
+ return {0, args...};
+}
+
+template <typename... Args> void msg(Args... args) {
+ format(forward(args)...);
+}
+
+void some_function() { msg('x'); }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic17.C b/gcc/testsuite/g++.dg/cpp0x/variadic17.C
index 986721bbec..d54022a7c7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic17.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic17.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic18.C b/gcc/testsuite/g++.dg/cpp0x/variadic18.C
index 147ed8e4bf..fc0e2ddcf5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic18.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic18.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> class tuple { };
template<typename T, template<typename T> class... Metafunctions>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic19.C b/gcc/testsuite/g++.dg/cpp0x/variadic19.C
index 92e7a953ab..0ae2672bff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic19.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic19.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple {
static const int value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic2.C b/gcc/testsuite/g++.dg/cpp0x/variadic2.C
index 207a80648f..3d127ea513 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args = int> // { dg-error "default argument" }
class tuple2;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic20.C b/gcc/testsuite/g++.dg/cpp0x/variadic20.C
index bfb42bea09..5b5a234642 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic20.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic20.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T> struct add_pointer;
template<typename T> struct add_reference;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic21.C b/gcc/testsuite/g++.dg/cpp0x/variadic21.C
index b65e995b9a..a379bd1fd3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic21.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic21.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, int... Dims>
struct array { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic22.C b/gcc/testsuite/g++.dg/cpp0x/variadic22.C
index 1d26e40d98..932d25b803 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic22.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic22.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename R, typename... ArgTypes>
struct make_function_type
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic23.C b/gcc/testsuite/g++.dg/cpp0x/variadic23.C
index 43309a1e1f..15825f3bdf 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic23.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic23.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, int... Dims>
struct array {
static const int value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic24.C b/gcc/testsuite/g++.dg/cpp0x/variadic24.C
index 6ef8e8a77d..4f172cd4de 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic24.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic24.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, T... Values>
struct vector_c { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic25.C b/gcc/testsuite/g++.dg/cpp0x/variadic25.C
index 6589e7f60a..5963760d7f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic25.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic25.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int... Values>
struct sum;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic26.C b/gcc/testsuite/g++.dg/cpp0x/variadic26.C
index 7f9f6bc805..2dbf092536 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic26.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic26.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<template<int, int> class Meta, int Initial, int... Values>
struct accumulate {
static const int value = Initial;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic27.C b/gcc/testsuite/g++.dg/cpp0x/variadic27.C
index 45a897ce2c..d690bb9667 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic27.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic27.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename Signature>
struct function_traits;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic28.C b/gcc/testsuite/g++.dg/cpp0x/variadic28.C
index 167088b494..b0278613cb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic28.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic28.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename Signature>
struct function_traits;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic29.C b/gcc/testsuite/g++.dg/cpp0x/variadic29.C
index aaed595831..8931e0fa6b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic29.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic29.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename Signature>
struct function_traits;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic3.C b/gcc/testsuite/g++.dg/cpp0x/variadic3.C
index 42ba8ab47e..c4a5b55cc5 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic3.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
class tuple {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic30.C b/gcc/testsuite/g++.dg/cpp0x/variadic30.C
index 66cbe9f627..0d8c0c95ad 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic30.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic30.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T>
void eat(T...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic31.C b/gcc/testsuite/g++.dg/cpp0x/variadic31.C
index db8daa8985..cffd703ece 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic31.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic31.C
@@ -1,4 +1,5 @@
-// { dg-options "-std=gnu++0x -g" }
+// { dg-options "-g" }
+// { dg-do compile { target c++11 } }
template<typename... T>
void eat(T...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic32.C b/gcc/testsuite/g++.dg/cpp0x/variadic32.C
index c5bee55ccb..0c5f6ee984 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic32.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic32.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T>
void eat(const T&...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic33.C b/gcc/testsuite/g++.dg/cpp0x/variadic33.C
index 5784be887a..bd25b84938 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic33.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic33.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
void print_all() {}
template<typename T, typename... Rest>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic34.C b/gcc/testsuite/g++.dg/cpp0x/variadic34.C
index 5eee3f13c6..ae92bac8fe 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic34.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic34.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int I, typename... Args>
void get_ith(const Args&... args);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic35.C b/gcc/testsuite/g++.dg/cpp0x/variadic35.C
index 666a1f5d03..8365c9ba50 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic35.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic35.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int I, typename... Args>
void get_ith(const Args&... args); // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic36.C b/gcc/testsuite/g++.dg/cpp0x/variadic36.C
index 9063602040..c60e6d0576 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic36.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic36.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename... Args>
void f(const T&, const Args&... args)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic37.C b/gcc/testsuite/g++.dg/cpp0x/variadic37.C
index a6e5f613fc..db488ef55a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic37.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic37.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Values>
struct tuple
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic38.C b/gcc/testsuite/g++.dg/cpp0x/variadic38.C
index e4ae4a6305..62031a3d00 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic38.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic38.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int... Values>
struct int_vec {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic39.C b/gcc/testsuite/g++.dg/cpp0x/variadic39.C
index bd656ba850..b603478ee0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic39.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic39.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic4.C b/gcc/testsuite/g++.dg/cpp0x/variadic4.C
index 1bdad3256f..8e8f81493f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic4.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic4.C
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x -fabi-version=0" }
-// { dg-do compile }
+// { dg-options "-fabi-version=0" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
class tuple {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic40.C b/gcc/testsuite/g++.dg/cpp0x/variadic40.C
index 6cc9273a89..e4df9b8bde 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic40.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic40.C
@@ -1,3 +1,3 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Values, typename T>
struct backward_tuple {}; // { dg-error "end" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic41.C b/gcc/testsuite/g++.dg/cpp0x/variadic41.C
index 9cfd847f31..df113679ff 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic41.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic41.C
@@ -1,5 +1,5 @@
// A function parameter pack is only deduced if it's at the end
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
void f(const Args&... args, int oops);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic42.C b/gcc/testsuite/g++.dg/cpp0x/variadic42.C
index 3ec68e8b1f..b1aa141dd6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic42.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic42.C
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x -fabi-version=5" }
-// { dg-do compile }
+// { dg-options "-fabi-version=5" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
void f(Args...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic43.C b/gcc/testsuite/g++.dg/cpp0x/variadic43.C
index fce81ae0dd..b2f1f8dc05 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic43.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic43.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
int f(const Args&...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic44.C b/gcc/testsuite/g++.dg/cpp0x/variadic44.C
index 8452a96cc2..01df2e0c79 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic44.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic44.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=gnu++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template<typename... Args>
int f(const Args&...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic45.C b/gcc/testsuite/g++.dg/cpp0x/variadic45.C
index c5a66ab206..2a79bc8e67 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic45.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic45.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
int& f(Args...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic46.C b/gcc/testsuite/g++.dg/cpp0x/variadic46.C
index 8b81a363bf..0ea4ba6a7e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic46.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic46.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
int& f(Args&...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic47.C b/gcc/testsuite/g++.dg/cpp0x/variadic47.C
index d80371c0ee..53916a934b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic47.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic47.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T> struct wrap { };
template<typename... Args>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic48.C b/gcc/testsuite/g++.dg/cpp0x/variadic48.C
index ab3f777f79..e672e76db2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic48.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic48.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, typename... Args>
int& f(const T&, Args...);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic49.C b/gcc/testsuite/g++.dg/cpp0x/variadic49.C
index 7e2215f2c2..49c26753ef 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic49.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic49.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
int& f(...);
template<typename... Args>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic5.C b/gcc/testsuite/g++.dg/cpp0x/variadic5.C
index d1f333566d..6595b7f8b7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic5.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic5.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple {
static const int value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic50.C b/gcc/testsuite/g++.dg/cpp0x/variadic50.C
index a2c3b7c908..99e1699345 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic50.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic50.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
int& f(int, double, ...);
template<typename... Args>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic51.C b/gcc/testsuite/g++.dg/cpp0x/variadic51.C
index e2e2d630a7..e072caae4c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic51.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic51.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
float& f(T1, T2);
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic52.C b/gcc/testsuite/g++.dg/cpp0x/variadic52.C
index 12b121fe4e..28ef857120 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic52.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic52.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, T... Values>
struct vector_c { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic53.C b/gcc/testsuite/g++.dg/cpp0x/variadic53.C
index 09a3879b42..ef3d15047e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic53.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic53.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename F, typename... BoundArgs>
class bound_functor
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic54.C b/gcc/testsuite/g++.dg/cpp0x/variadic54.C
index db750d7651..3fbeefdaf7 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic54.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic54.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename F, typename... BoundArgs>
class bound_functor
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic55.C b/gcc/testsuite/g++.dg/cpp0x/variadic55.C
index b9c8cffb02..bdf25cf3e2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic55.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic55.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename F, typename... BoundArgs>
class bound_functor
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic56.C b/gcc/testsuite/g++.dg/cpp0x/variadic56.C
index 77846e5132..50b2445aee 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic56.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic56.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Elements>
struct tuple { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic57.C b/gcc/testsuite/g++.dg/cpp0x/variadic57.C
index 9833b1bb35..a3d2bf1c5d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic57.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic57.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, int... Dims>
struct array {
int foo();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic58.C b/gcc/testsuite/g++.dg/cpp0x/variadic58.C
index 5da0730b5a..14233225af 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic58.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic58.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
#include <typeinfo>
template<typename... Args>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic59.C b/gcc/testsuite/g++.dg/cpp0x/variadic59.C
index 6d6e52f931..817883ce28 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic59.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic59.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<class T, typename... VarArgs>
void print(T t, VarArgs args); // { dg-error "packs not expanded" }
// { dg-message "VarArgs" "note" { target *-*-* } 3 }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic6.C b/gcc/testsuite/g++.dg/cpp0x/variadic6.C
index 105550bb90..3dc74cc4c2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic6.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic6.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename ... Args>
struct tuple_base {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic60.C b/gcc/testsuite/g++.dg/cpp0x/variadic60.C
index 8e1681eecc..57bbcfe2fd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic60.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic60.C
@@ -1 +1 @@
-template<typename... Args> class tuple; // { dg-error "variadic templates" "" { target c++98 } }
+template<typename... Args> class tuple; // { dg-error "variadic templates" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic63.C b/gcc/testsuite/g++.dg/cpp0x/variadic63.C
index 359def1cd1..945b95c760 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic63.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic63.C
@@ -1,2 +1,3 @@
-// { dg-options "-std=gnu++0x -pedantic" }
+// { dg-options "-pedantic" }
+// { dg-do compile { target c++11 } }
template<typename... Args> class tuple;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic64.C b/gcc/testsuite/g++.dg/cpp0x/variadic64.C
index c9212e2e95..d7c313d58b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic64.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic64.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int... Indexes>
struct _Index_tuple { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic65.C b/gcc/testsuite/g++.dg/cpp0x/variadic65.C
index 77be10676a..e2ef931ad6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic65.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic65.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
struct unused;
template<typename T1 = unused, typename T2 = unused, typename T3 = unused,
typename T4 = unused, typename T5 = unused, typename T6 = unused>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic66.C b/gcc/testsuite/g++.dg/cpp0x/variadic66.C
index 5c31ae06fd..ac92221519 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic66.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic66.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename Result, typename Functor, typename... ArgTypes>
Result bind(Functor, ArgTypes...) { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic67.C b/gcc/testsuite/g++.dg/cpp0x/variadic67.C
index e496bfc176..6e328cfe0b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic67.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic67.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Elements> struct tuple {};
template<typename... Args>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic68.C b/gcc/testsuite/g++.dg/cpp0x/variadic68.C
index 07cf8e3896..edcdfa8560 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic68.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic68.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
extern "C" void abort();
template<typename T, T... Values>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic69.C b/gcc/testsuite/g++.dg/cpp0x/variadic69.C
index 5fe9a1950f..660e09a00f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic69.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic69.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
struct stored_value
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic7.C b/gcc/testsuite/g++.dg/cpp0x/variadic7.C
index 3ba37bfb66..8b049968bb 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic7.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic7.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple_base {
static const int value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic70.C b/gcc/testsuite/g++.dg/cpp0x/variadic70.C
index 15bed461dc..df26c6a2da 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic70.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic70.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
template <typename T, T... Args> struct bomb;
template <typename T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic71.C b/gcc/testsuite/g++.dg/cpp0x/variadic71.C
index bea3cc3463..101d220c54 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic71.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic71.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct list {};
template<typename Sequence, typename Head>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic72.C b/gcc/testsuite/g++.dg/cpp0x/variadic72.C
index b1a620d538..41f83c3ce1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic72.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic72.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
struct A {};
struct B {};
struct C {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic73.C b/gcc/testsuite/g++.dg/cpp0x/variadic73.C
index 05925e7aa5..533ed46f88 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic73.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic73.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=gnu++0x" }
+// { dg-do run { target c++11 } }
struct A {};
struct B {};
struct C {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic74.C b/gcc/testsuite/g++.dg/cpp0x/variadic74.C
index 312fe9d704..1af6531796 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic74.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic74.C
@@ -24,3 +24,5 @@ A<int*, float*>::X<&i> apple2; // { dg-error "wrong number of template arguments
A<int*, float*>::X<&i, &f, &f> apple3; // { dg-error "wrong number of template arguments" "wrong number" }
// { dg-error "invalid type" "invalid" { target *-*-* } 24 }
A<int, float> apple4;
+
+// { dg-prune-output "provided for" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic75.C b/gcc/testsuite/g++.dg/cpp0x/variadic75.C
index f57f8b3ef4..a3aa07063b 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic75.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic75.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct tuple { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic76.C b/gcc/testsuite/g++.dg/cpp0x/variadic76.C
index a9f8eabb34..d8d1ef9d4f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic76.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic76.C
@@ -1,10 +1,10 @@
// PR c++/33496
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int... N> int foo ()
{
- return sizeof... N (); // { dg-error "cannot be used as a function" }
+ return sizeof... (N ()); // { dg-error "" }
+ return sizeof... (N) (); // { dg-error "" }
}
int bar ()
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic77.C b/gcc/testsuite/g++.dg/cpp0x/variadic77.C
index 43f2d1e43d..79badaa02c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic77.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic77.C
@@ -1,6 +1,5 @@
// PR c++/33496
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int M, int N> struct pair
{
@@ -12,7 +11,7 @@ template<int... M> struct S
{
template<int... N> static int foo ()
{
- return sizeof... (pair<M, N>); // { dg-error "mismatched argument pack lengths" }
+ return sizeof... (pair<M, N>); // { dg-error "" }
}
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic78.C b/gcc/testsuite/g++.dg/cpp0x/variadic78.C
index 9e2b84ad0a..0a42435c6a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic78.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic78.C
@@ -1,6 +1,5 @@
// PR c++/33496
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<int M, int N> struct pair
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic79.C b/gcc/testsuite/g++.dg/cpp0x/variadic79.C
index c6479e04fe..389199cc41 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic79.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic79.C
@@ -1,6 +1,5 @@
// PR c++/33213
-// { dg-do compile }
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<template<typename> class...> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic8.C b/gcc/testsuite/g++.dg/cpp0x/variadic8.C
index c3a1340cf2..e2d7fa7a7a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic8.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic8.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename... Args>
struct tuple_base {
static const int value = 0;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic80.C b/gcc/testsuite/g++.dg/cpp0x/variadic80.C
index a56cdb404c..0612e735c4 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic80.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic80.C
@@ -1,6 +1,5 @@
// PR c++/31434
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
extern "C" void abort ();
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic81.C b/gcc/testsuite/g++.dg/cpp0x/variadic81.C
index cce61b3164..0877255c27 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic81.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic81.C
@@ -1,5 +1,5 @@
// PR c++/33461
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic82.C b/gcc/testsuite/g++.dg/cpp0x/variadic82.C
index 03aec80211..f9bbc35326 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic82.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic82.C
@@ -1,5 +1,5 @@
// PR c++/33461
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic83.C b/gcc/testsuite/g++.dg/cpp0x/variadic83.C
index c446e69742..507fc7e4c6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic83.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic83.C
@@ -1,5 +1,5 @@
// PR c++/31441
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic84.C b/gcc/testsuite/g++.dg/cpp0x/variadic84.C
index ce31267954..debe75c619 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic84.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic84.C
@@ -1,6 +1,5 @@
// PR c++/32565
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A1;
template<template<int...> class T> struct A1<T<0> > {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic85.C b/gcc/testsuite/g++.dg/cpp0x/variadic85.C
index facb263910..708104af90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic85.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic85.C
@@ -1,6 +1,5 @@
// PR c++/32565
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A1;
template<template<int, int...> class T> struct A1<T<0, 1> > {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic86.C b/gcc/testsuite/g++.dg/cpp0x/variadic86.C
index d8fcd620e9..2213ef7d98 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic86.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic86.C
@@ -1,6 +1,5 @@
// PR c++/33943
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... A> struct foo {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic87.C b/gcc/testsuite/g++.dg/cpp0x/variadic87.C
index 1defa23da2..f3c009257e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic87.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic87.C
@@ -1,5 +1,5 @@
// PR c++/33965
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename T>
struct foo
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic88.C b/gcc/testsuite/g++.dg/cpp0x/variadic88.C
index b14cabe321..b96c7198d6 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic88.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic88.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<typename...> class TT>
TT<int, float, double> foo(TT<int, float>)
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic89.C b/gcc/testsuite/g++.dg/cpp0x/variadic89.C
index b943771a6d..1e59c1af75 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic89.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic89.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// Contributed by Eric Niebler
template<typename T, typename U>
struct pair
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic9.C b/gcc/testsuite/g++.dg/cpp0x/variadic9.C
index c5db6af6a8..795da571d1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic9.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic9.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=gnu++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct pair {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic90.C b/gcc/testsuite/g++.dg/cpp0x/variadic90.C
index 632e166c34..587a0e89e2 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic90.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic90.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<typename...> class TT>
struct X { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic91.C b/gcc/testsuite/g++.dg/cpp0x/variadic91.C
index d78b791fbf..71f341cbc9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic91.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic91.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int N> struct Int2Type { };
template<typename... T>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic92.C b/gcc/testsuite/g++.dg/cpp0x/variadic92.C
index d382912c91..99159a2c15 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic92.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic92.C
@@ -1,5 +1,5 @@
// Various tests for variadic templates and partial specialization.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/36846
template<typename A, typename B>
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic93.C b/gcc/testsuite/g++.dg/cpp0x/variadic93.C
index 7d8c3298e6..63a1103a86 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic93.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic93.C
@@ -1,5 +1,5 @@
// PR c++/35297
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <class T=int, class... ARGS>
struct test2 {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic94.C b/gcc/testsuite/g++.dg/cpp0x/variadic94.C
index 8420f73a6a..f5f3228f81 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic94.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic94.C
@@ -1,5 +1,5 @@
// PR c++/40595
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int N>
struct S
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic95.C b/gcc/testsuite/g++.dg/cpp0x/variadic95.C
index ebb04ebc10..e383938e99 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic95.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic95.C
@@ -1,5 +1,5 @@
// PR c++/39863
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template <typename... T>
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic96.C b/gcc/testsuite/g++.dg/cpp0x/variadic96.C
index d4709d074b..189c4ebf7d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic96.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic96.C
@@ -1,6 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/41785
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct a {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic97.C b/gcc/testsuite/g++.dg/cpp0x/variadic97.C
index a2070319eb..b251cc3da3 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic97.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic97.C
@@ -1,5 +1,5 @@
// PR c++/42266
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
template<typename... _Elements>
class tuple;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic98.C b/gcc/testsuite/g++.dg/cpp0x/variadic98.C
index 6af599fcaa..c463cac17e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic98.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic98.C
@@ -1,6 +1,5 @@
// PR c++/42358
-// { dg-do assemble }
-// { dg-options -std=c++0x }
+// { dg-do assemble { target c++11 } }
typedef __PTRDIFF_TYPE__ ptrdiff_t;
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/cpp0x/variadic99.C b/gcc/testsuite/g++.dg/cpp0x/variadic99.C
index 457212712b..8398b2a667 100644
--- a/gcc/testsuite/g++.dg/cpp0x/variadic99.C
+++ b/gcc/testsuite/g++.dg/cpp0x/variadic99.C
@@ -1,5 +1,5 @@
// PR c++/43054
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename R> struct future { };
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
index 0b84b6cec8..8cbc0d6478 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-33964.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename ... Args>
struct foo
{
@@ -6,7 +6,7 @@ struct foo
};
template<typename ... Args>
-struct foo< typename Args::is_applied... > // { dg-error "not used|Args" }
+struct foo< typename Args::is_applied... > // { dg-error "not deducible|Args" }
{
static bool const value = false;
};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34050.C b/gcc/testsuite/g++.dg/cpp0x/vt-34050.C
index cb19b3914c..6dec6dfc83 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34050.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34050.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {};
template<typename... T> struct B : T...
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C
index 2c7bb50f08..ace905aad9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34051-2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
int i __attribute__((aligned(__alignof(T)))); // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34051.C b/gcc/testsuite/g++.dg/cpp0x/vt-34051.C
index 88ae567032..d0a8b951a0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34051.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34051.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
operator int();
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34052.C b/gcc/testsuite/g++.dg/cpp0x/vt-34052.C
index 15310cfe74..1036537eb9 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34052.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34052.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T, typename = T> struct A {}; // { dg-error "must be at the end" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34055.C b/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
index c50778430e..3ee7bad45c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34055.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/34055
template<typename...> struct A;
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34102.C b/gcc/testsuite/g++.dg/cpp0x/vt-34102.C
index 00f0b4f4aa..c2a6ae5d7f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34102.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34102.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/34102
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34103.C b/gcc/testsuite/g++.dg/cpp0x/vt-34103.C
index 3bbbb46a01..bb2f829224 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34103.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34103.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/34103
template<typename> struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
index 193bc0c6cf..5bb2a21e43 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34219-2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<typename... T> class Comp, typename... T> void f( T... Value)
{
static_assert( Comp<T>::value > 0, "" ); // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34219.C b/gcc/testsuite/g++.dg/cpp0x/vt-34219.C
index fb3584ea88..91ee609325 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34219.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34219.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T, T a, T... Params>
struct max
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34314.C b/gcc/testsuite/g++.dg/cpp0x/vt-34314.C
index 4a935b367d..ee0ed01b8d 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34314.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34314.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename Fun, typename... Args> // { dg-error "template parameter" }
struct call;
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34399.C b/gcc/testsuite/g++.dg/cpp0x/vt-34399.C
index 542fae586c..74f35f7334 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34399.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34399.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int...> struct A
{
void foo();
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34606.C b/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
index 4679433544..a032bfc0a1 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34606.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
template<typename T, typename... U> struct A<T, U> // { dg-error "parameter packs|U" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34751.C b/gcc/testsuite/g++.dg/cpp0x/vt-34751.C
index e3ca39e798..1b1e669269 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34751.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34751.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// PR c++/34751
struct A {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34753.C b/gcc/testsuite/g++.dg/cpp0x/vt-34753.C
index 15eaebebc8..496acaefa0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34753.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34753.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
template<T> struct B {}; // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34754.C b/gcc/testsuite/g++.dg/cpp0x/vt-34754.C
index 97c0065328..c42fe49d90 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34754.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34754.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<template<int> class... T> struct A
{
void foo(T<0>); // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34755.C b/gcc/testsuite/g++.dg/cpp0x/vt-34755.C
index 9d5a3d1ca4..3ef089db96 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34755.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34755.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename> struct A {};
template<template<typename> class... T> void foo(T<int>) {} // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34919.C b/gcc/testsuite/g++.dg/cpp0x/vt-34919.C
index 829579918e..5b106e187c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34919.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34919.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<int... N> struct A
{
static void foo()
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-34961.C b/gcc/testsuite/g++.dg/cpp0x/vt-34961.C
index 3a872146e2..11315ca14e 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-34961.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-34961.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
static const int i __attribute__((aligned(__alignof(T)))) = 0; // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35023.C b/gcc/testsuite/g++.dg/cpp0x/vt-35023.C
index 9db20503e7..bc5902394f 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35023.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35023.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> int foo()
{
T t; // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35024.C b/gcc/testsuite/g++.dg/cpp0x/vt-35024.C
index 77f0b66bdc..c20501f923 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35024.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35024.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> int foo()
{
typename T::X x; // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35026.C b/gcc/testsuite/g++.dg/cpp0x/vt-35026.C
index 643a416c57..2590f35ccd 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35026.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35026.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename... T> struct A
{
T* x[1]; // { dg-error "parameter packs|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C
index fecb36ec8c..0827beee6a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35147.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35147.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename _Tp>
_Tp&& forward(_Tp&& __t) { return __t; } // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35242.C b/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
index 9cc859b875..9af855e3b0 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35242.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
template<typename... T> struct B;
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35243.C b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C
index 4b55574426..e38d339783 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35243.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35243.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A {};
template<typename... T> struct B : T...
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-35331.C b/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
index 0add9819bd..0128b61009 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-35331.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename...> struct A;
template<typename...T> struct A<T*> // { dg-error "not expanded|T" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C
index de11b1651b..c047a1963c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// { dg-prune-output "note" }
void f() { }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
index 5514259ec3..21891f1c03 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-37737-2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class U, class... T>
void f() // { dg-message "note" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-40092.C b/gcc/testsuite/g++.dg/cpp0x/vt-40092.C
index ecb6980613..cad264377c 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-40092.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-40092.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <typename... Types> struct package {};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-51314.C b/gcc/testsuite/g++.dg/cpp0x/vt-51314.C
new file mode 100644
index 0000000000..8a5a66a104
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-51314.C
@@ -0,0 +1,14 @@
+// { dg-do compile { target c++11 } }
+// { dg-prune-output "invalid" }
+
+template<int>struct A{};
+template<class...U>void f(U...){
+ A<sizeof...U> x; // { dg-error "surrounded by parentheses" }
+}
+
+
+template<int...> struct Indices;
+template<class> struct Next_increasing_indices;
+template<int...I> struct Next_increasing_indices<Indices<I...> > {
+ typedef Indices<I...,sizeof...I> type; // { dg-error "surrounded by parentheses" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-55323.C b/gcc/testsuite/g++.dg/cpp0x/vt-55323.C
new file mode 100644
index 0000000000..e360a99be2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-55323.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+
+struct foo {
+ foo(int a, float b);
+};
+
+struct bar : foo {
+ template<typename... Args>
+ bar(Args&&... args) : foo(2, args){} // { dg-error "parameter packs" }
+};
+
+bar b(2,1.);
diff --git a/gcc/testsuite/g++.dg/cpp0x/vt-55542.C b/gcc/testsuite/g++.dg/cpp0x/vt-55542.C
index 3d5efee87d..72d58b9580 100644
--- a/gcc/testsuite/g++.dg/cpp0x/vt-55542.C
+++ b/gcc/testsuite/g++.dg/cpp0x/vt-55542.C
@@ -1,5 +1,5 @@
// PR c++/55542
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
template <typename ... P>
struct B
diff --git a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
index 5c5eeffb35..e07d33b7fa 100644
--- a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
+++ b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x.C
@@ -1,3 +1,4 @@
+// { dg-do compile { target c++11 } }
// { dg-options "-std=gnu++98 -Wc++11-compat" }
int static_assert; // { dg-warning "is a keyword" }
int nullptr; // { dg-warning "is a keyword" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C
index 116b233176..324b009e6a 100644
--- a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C
+++ b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x2.C
@@ -1,4 +1,5 @@
// PR c++/50810
+// { dg-do compile { target c++11 } }
// { dg-options "-std=gnu++98 -Wc++11-compat" }
signed char data[] = { 0xff }; // { dg-warning "narrowing" }
diff --git a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C
index c3df9d99ed..204b4ae991 100644
--- a/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C
+++ b/gcc/testsuite/g++.dg/cpp0x/warn_cxx0x3.C
@@ -1,4 +1,5 @@
// PR c++/50810
+// { dg-do compile { target c++11 } }
// { dg-options "-std=gnu++98 -Wc++11-compat -Wno-narrowing" }
signed char data[] = { 0xff };
diff --git a/gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C b/gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C
new file mode 100644
index 0000000000..134b3b89c0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/attr-deprecated-neg.C
@@ -0,0 +1,58 @@
+// { dg-do compile { target c++11_only } }
+
+class [[deprecated]] A // { dg-warning "attribute directive ignored" }
+{
+};
+
+[[deprecated]]
+int
+foo(int n) // { dg-warning "attribute directive ignored" }
+{
+ return 42 + n;
+}
+
+class [[deprecated("B has been superceded by C")]] B // { dg-warning "attribute directive ignored" }
+{
+};
+
+[[deprecated("bar is unsafe; use foobar instead")]]
+int
+bar(int n) // { dg-warning "attribute directive ignored" }
+{
+ return 42 + n - 1;
+}
+
+#if __cplusplus > 201103L
+
+// Deprecate C for C++14 onwards.
+class [[deprecated]] C;
+
+// Deprecate foobar for C++14 onwards.
+[[deprecated]]
+int
+foobar(int n);
+
+#endif
+
+class C
+{
+};
+
+int
+foobar(int n)
+{
+ return 43 + n - 1;
+}
+
+int
+main()
+{
+ A aaa;
+ int n = foo(12);
+
+ B bbb;
+ int m = bar(666);
+
+ C ccc;
+ int l = foobar(8);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/attr-deprecated.C b/gcc/testsuite/g++.dg/cpp1y/attr-deprecated.C
new file mode 100644
index 0000000000..698268a776
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/attr-deprecated.C
@@ -0,0 +1,58 @@
+// { dg-do compile { target c++1y } }
+
+class [[deprecated]] A
+{
+};
+
+[[deprecated]]
+int
+foo(int n)
+{
+ return 42 + n;
+}
+
+class [[deprecated("B has been superceded by C")]] B
+{
+};
+
+[[deprecated("bar is unsafe; use foobar instead")]]
+int
+bar(int n)
+{
+ return 42 + n - 1;
+}
+
+#if __cplusplus > 201103L
+
+// Deprecate C for C++14 onwards.
+class [[deprecated]] C;
+
+// Deprecate foobar for C++14 onwards.
+[[deprecated]]
+int
+foobar(int n);
+
+#endif
+
+class C
+{
+};
+
+int
+foobar(int n)
+{
+ return 43 + n - 1;
+}
+
+int
+main()
+{
+ A aaa; // { dg-warning "is deprecated" }
+ int n = foo(12); // { dg-warning "is deprecated" }
+
+ B bbb; // { dg-warning "is deprecated" "B has been superceded by C" }
+ int m = bar(666); // { dg-warning "is deprecated" "bar is unsafe; use foobar instead" }
+
+ C ccc; // { dg-warning "is deprecated" }
+ int l = foobar(8); // { dg-warning "is deprecated" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-dtor1.C b/gcc/testsuite/g++.dg/cpp1y/auto-dtor1.C
new file mode 100644
index 0000000000..0a109fe8a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-dtor1.C
@@ -0,0 +1,21 @@
+// DR 1586
+// { dg-do run { target c++1y } }
+
+template <class T>
+void f (T* p)
+{
+ p->~auto();
+}
+
+int d;
+struct A { ~A() { ++d; } };
+
+int main()
+{
+ f(new int(42));
+ f(new A);
+ if (d != 1)
+ throw;
+
+ (new int)->~auto();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn1.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn1.C
new file mode 100644
index 0000000000..7a5b4908ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn1.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++1y } }
+
+constexpr auto f() { return (char)42; }
+#define SA(X) static_assert ((X),#X)
+SA (f() == 42);
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn10.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn10.C
new file mode 100644
index 0000000000..890cfda120
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn10.C
@@ -0,0 +1,16 @@
+// A template declared with auto should be declared with auto in an
+// explicit instantiation or explicit specialization, too.
+// { dg-do compile { target c++1y } }
+
+template <class T>
+auto f(T t) { return t; }
+
+template<> auto f<int>(int);
+template auto f<float>(float);
+template<> auto f(int*);
+template auto f(float*);
+
+template<> short f<short>(short); // { dg-error "does not match" }
+template char f<char>(char); // { dg-error "does not match" }
+template<> short f(short*); // { dg-error "does not match" }
+template char f(char*); // { dg-error "does not match" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn11.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn11.C
new file mode 100644
index 0000000000..132f959db2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn11.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++1y } }
+
+auto f() { return; } // OK, return type is void
+auto* g() { return; } // { dg-error "no value" }
+auto* h() { } // { dg-error "no return statements" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
new file mode 100644
index 0000000000..04ea81929d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn12.C
@@ -0,0 +1,14 @@
+// { dg-do compile { target c++1y } }
+// { dg-final { scan-assembler "_ZN1AIiEcvDaEv" } }
+
+template <class T>
+struct A {
+ T t;
+ operator auto() { return t+1; }
+};
+
+int main()
+{
+ int i = A<int>{42};
+ return (i != 43);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn13.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn13.C
new file mode 100644
index 0000000000..8f4e105019
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn13.C
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++1y } }
+
+struct A {
+ template <class T>
+ operator auto() { return T(); } // { dg-warning "auto.*template" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn14.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn14.C
new file mode 100644
index 0000000000..f17c0e289c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn14.C
@@ -0,0 +1,5 @@
+// PR c++/56177
+// { dg-do compile { target c++1y } }
+
+auto f ();
+auto f () { return 33; }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn15.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn15.C
new file mode 100644
index 0000000000..987aa96b7b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn15.C
@@ -0,0 +1,51 @@
+// { dg-do compile { target c++1y } }
+// { dg-options "-Wno-return-local-addr" }
+
+template<class,class> struct same_type;
+template<class T> struct same_type<T,T> {};
+
+int& f();
+int i;
+
+decltype(auto) g() { return f(); }
+decltype(auto) h1() { return i; }
+decltype(auto) h2() { return (i); }
+decltype(auto) h2a() { return 0,i; }
+
+struct A { int i; };
+A a;
+
+decltype(auto) h3() { return a.i; }
+decltype(auto) h4() { return (a.i); }
+
+template <class T>
+decltype(auto) h5(T t) { return t.i; }
+template <class T>
+decltype(auto) h6(T t) { return (t.i); }
+
+int main()
+{
+ decltype(auto) i = f();
+ same_type<decltype(i),int&>();
+ decltype(auto) i2 = i;
+ same_type<decltype(i2),int&>();
+ decltype(auto) i3 = ::i;
+ same_type<decltype(i3),int>();
+ decltype(auto) i4 = (::i);
+ same_type<decltype(i4),int&>();
+ decltype(auto) i5 = a.i;
+ same_type<decltype(i5),int>();
+ decltype(auto) i6 = (a.i);
+ same_type<decltype(i6),int&>();
+ decltype(auto) i7 = true ? ::i : ::i;
+ same_type<decltype(i7),int&>();
+
+ same_type<decltype(g()),int&>();
+ same_type<decltype(h1()),int>();
+ same_type<decltype(h2()),int&>();
+ same_type<decltype(h2a()),int&>();
+ same_type<decltype(h3()),int>();
+ same_type<decltype(h4()),int&>();
+ same_type<decltype(h5(a)),int>();
+ same_type<decltype(h6(a)),int&>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn16.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn16.C
new file mode 100644
index 0000000000..233f26f811
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn16.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++1y } }
+
+template<class,class> struct ST;
+template<class T> struct ST<T,T> {};
+
+int j;
+auto x3 = []()->auto&& { return j; }; // OK: return type is int&
+
+int main()
+{
+ ST<decltype(x3()),int&>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn17.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn17.C
new file mode 100644
index 0000000000..ee668b626a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn17.C
@@ -0,0 +1,21 @@
+// { dg-do run { target c++1y } }
+
+int c;
+int d;
+
+struct A
+{
+ A() { ++c; }
+ A(const A&) { ++c; }
+ ~A() { ++d; }
+};
+
+A g() { return A(); }
+decltype(auto) f() { return g(); }
+
+int main()
+{
+ f();
+ if (c < 1 || c != d)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn18.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn18.C
new file mode 100644
index 0000000000..ca1b0b0337
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn18.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++1y } }
+
+struct A
+{
+ virtual int f() { return 1; } // { dg-message "overriding" }
+ virtual auto g() { return 1; } // { dg-error "virtual" }
+};
+
+struct B: A
+{
+ auto f() { return 1; } // { dg-error "return type" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn19.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn19.C
new file mode 100644
index 0000000000..ecd8b91e88
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn19.C
@@ -0,0 +1,6 @@
+// { dg-do compile { target c++1y } }
+
+template <class T>
+auto f() { return T::i; }
+
+extern template auto f<int>(); // does not force instantiation
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn2.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn2.C
new file mode 100644
index 0000000000..f89c86ce31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn2.C
@@ -0,0 +1,3 @@
+// { dg-do compile { target c++1y } }
+
+auto f() { return f(); } // { dg-error "auto" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn20.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn20.C
new file mode 100644
index 0000000000..818b6f5da6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn20.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++1y } }
+
+template <class T>
+auto f(T) { return 42; }
+template <class T>
+auto g(T) { return 0.0; }
+
+int main()
+{
+ int (*p)(int) = &f; // OK
+ p = &g; // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn21.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn21.C
new file mode 100644
index 0000000000..df23a81486
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn21.C
@@ -0,0 +1,6 @@
+// N3638: decltype(auto) must stand alone
+// { dg-do compile { target c++1y } }
+
+void f();
+decltype(auto) g1() { return &f; }
+decltype(auto)* g2() { return f; } // { dg-error "decltype.auto" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn22.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn22.C
new file mode 100644
index 0000000000..0077b89e4c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn22.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++1y } }
+
+struct A
+{
+ operator auto();
+};
+
+// { dg-final { scan-assembler "_ZN1AcvDaEv" } }
+A::operator auto() { return 42; }
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn23.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn23.C
new file mode 100644
index 0000000000..f153e2a7fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn23.C
@@ -0,0 +1,10 @@
+// PR c++/58561
+// { dg-do compile { target c++1y } }
+// { dg-options "-g" }
+
+auto foo();
+
+namespace N
+{
+ using ::foo;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn24.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn24.C
new file mode 100644
index 0000000000..dfff2029c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn24.C
@@ -0,0 +1,13 @@
+// PR c++/60314
+// { dg-do compile { target c++1y } }
+// { dg-options "-g" }
+
+// fine
+decltype(auto) qux() { return 42; }
+
+struct foo
+{
+ // also ICEs if not static
+ static decltype(auto) bar()
+ { return 42; }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
new file mode 100644
index 0000000000..24680f16d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn25.C
@@ -0,0 +1,16 @@
+// PR c++/60574
+// { dg-do compile { target c++1y } }
+// { dg-require-effective-target lto }
+// { dg-options "-flto" }
+
+struct A
+{
+ virtual auto foo() {} // { dg-error "virtual.*deduced" }
+};
+
+struct B : A
+{
+ auto foo();
+};
+
+B b;
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn3.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn3.C
new file mode 100644
index 0000000000..73ec5a7c8d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn3.C
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++1y } }
+
+bool b;
+auto f()
+{
+ if (b)
+ return 42;
+ else
+ return f();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn4.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn4.C
new file mode 100644
index 0000000000..4c3227a0e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn4.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++1y } }
+
+template <class T>
+constexpr auto f(T t) { return t+1; }
+
+#define SA(X) static_assert((X),#X)
+SA(f(1)==2);
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn5.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn5.C
new file mode 100644
index 0000000000..b857140026
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn5.C
@@ -0,0 +1,10 @@
+// { dg-do run { target c++1y } }
+
+int i;
+auto& f() { return i; }
+
+int main()
+{
+ f() = 42;
+ return i != 42;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn6.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn6.C
new file mode 100644
index 0000000000..123132ddf0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn6.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target c++1y } }
+
+template <class T, class U> struct ST;
+template <class T> struct ST<T,T> {};
+
+int g(int);
+char& g(char);
+double&& g(double);
+
+template <class T> auto&& f(T t)
+{ return g(t); } // { dg-warning "reference to temporary" }
+
+int main()
+{
+ ST<decltype(f(1)),int&&>();
+ ST<decltype(f('\0')),char&>();
+ ST<decltype(f(1.0)),double&&>();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn7.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn7.C
new file mode 100644
index 0000000000..deb664c3bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn7.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++1y } }
+
+auto f();
+
+template <class T> auto f(T);
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C
new file mode 100644
index 0000000000..1badd6a5e8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn8.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++1y } }
+
+auto f() { return 42; } // { dg-message "old declaration .auto" }
+auto f(); // OK
+int f(); // { dg-error "new declaration" }
+
+template <class T> auto f(T t) { return t; }
+template <class T> T f(T t);
+
+int main()
+{
+ f(42); // { dg-error "ambiguous" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-fn9.C b/gcc/testsuite/g++.dg/cpp1y/auto-fn9.C
new file mode 100644
index 0000000000..018d42cce6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-fn9.C
@@ -0,0 +1,11 @@
+// { dg-do compile { target c++1y } }
+// { dg-final { scan-assembler "_Z1fIiERDaRKT_S1_" } }
+
+template <class T>
+auto& f(const T& t, T u) { return t; }
+
+int main()
+{
+ int i;
+ f(i,i);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-mangle1.C b/gcc/testsuite/g++.dg/cpp1y/auto-mangle1.C
new file mode 100644
index 0000000000..0ea437ca46
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-mangle1.C
@@ -0,0 +1,12 @@
+// Mangling for decltype(auto)
+// { dg-do compile { target c++1y } }
+
+void f();
+
+// { dg-final { scan-assembler "_Z2g1IiEDcv" } }
+template <class T> decltype(auto) g1() { return &f; }
+template decltype(auto) g1<int>();
+
+// { dg-final { scan-assembler "_Z2g2IiEDav" } }
+template <class T> auto g2() { return &f; }
+template auto g2<int>();
diff --git a/gcc/testsuite/g++.dg/cpp1y/auto-neg1.C b/gcc/testsuite/g++.dg/cpp1y/auto-neg1.C
new file mode 100644
index 0000000000..a6f31f63de
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/auto-neg1.C
@@ -0,0 +1,16 @@
+// PR c++/60312
+// { dg-do compile { target c++1y } }
+
+template<typename> struct A;
+
+template<> struct A<auto> // { dg-error "auto|template argument" }
+{
+ template<int> void foo();
+};
+
+void bar()
+{
+ A<auto>().foo<0>(); // { dg-error "auto|template argument" }
+}
+
+// { dg-prune-output "expected" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/complex_literals.h b/gcc/testsuite/g++.dg/cpp1y/complex_literals.h
new file mode 100644
index 0000000000..ea328e39ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/complex_literals.h
@@ -0,0 +1,12 @@
+
+#include <complex>
+
+#pragma GCC system_header
+
+std::complex<float>
+operator""if(long double ximag)
+{ return std::complex<float>(0.0F, static_cast<float>(ximag)); }
+
+std::complex<float>
+operator""if(unsigned long long nimag)
+{ return std::complex<float>(0.0F, static_cast<float>(nimag)); }
diff --git a/gcc/testsuite/g++.dg/cpp1y/context-conv1.C b/gcc/testsuite/g++.dg/cpp1y/context-conv1.C
new file mode 100644
index 0000000000..fe20cab3c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/context-conv1.C
@@ -0,0 +1,32 @@
+// N3323
+
+#define assert(E) if(!(E))__builtin_abort();
+
+template<class T>
+class zero_init
+{
+public:
+ zero_init( )
+ : val( static_cast<T>(0) ) { }
+ zero_init( T val ) : val( val )
+ { }
+ operator T & ( ) { return val; }
+ operator T ( ) const { return val; }
+private:
+ T val;
+};
+
+void f()
+{
+ zero_init<int*> p; assert( p == 0 );
+ p = new int(7);
+ assert( *p == 7 );
+ delete p; // error!
+
+ zero_init<int> i; assert( i == 0 );
+ i = 7;
+ assert( i == 7 );
+ switch( i ) { } // error!
+
+ int *vp = new int[i];
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/cplusplus.C b/gcc/testsuite/g++.dg/cpp1y/cplusplus.C
new file mode 100644
index 0000000000..2cfd84fada
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/cplusplus.C
@@ -0,0 +1,5 @@
+// { dg-do compile { target c++1y } }
+
+#if __cplusplus <= 201103L
+#error
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C b/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C
new file mode 100644
index 0000000000..453fe106a2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/digit-sep-cxx11-neg.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target { ! c++1y } } }
+
+#define assert(E) if(!(E))__builtin_abort();
+
+#define m(x) 0
+
+int
+main()
+{
+ int i = m(1'2)+(3'4);
+ assert(i == 0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/digit-sep-neg.C b/gcc/testsuite/g++.dg/cpp1y/digit-sep-neg.C
new file mode 100644
index 0000000000..6c342a7a41
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/digit-sep-neg.C
@@ -0,0 +1,26 @@
+// { dg-do compile { target c++1y } }
+
+int
+main()
+{
+ int i = 0;
+ i = 1048''576; // { dg-error "adjacent digit separators" }
+ i = 0X'100000; // { dg-error "digit separator after base indicator" }
+ i = 0x'100000; // { dg-error "digit separator after base indicator" }
+ i = 0004''000'000); // { dg-error "adjacent digit separators" }
+ i = 0B1'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0'0; // OK
+ i = 0b'0001'0000'0000'0000'0000'0000; // { dg-error "digit separator after base indicator" }
+ i = 0b0001'0000'0000'0000'0000'0000'; // { dg-error "digit separator outside digit sequence" }
+ unsigned u = 0b0001'0000'0000'0000'0000'0000'U; // { dg-error "digit separator outside digit sequence" }
+
+ double d = 0.0;
+ d = 1'.602'176'565e-19; // { dg-error "digit separator adjacent to decimal point" }
+ d = 1.'602'176'565e-19; // { dg-error "digit separator adjacent to decimal point" }
+ d = 1.602''176'565e-19; // { dg-error "adjacent digit separators" }
+ d = 1.602'176'565'e-19; // { dg-error "digit separator adjacent to exponent" }
+ d = 1.602'176'565e'-19; // { dg-error "digit separator adjacent to exponent" }
+ d = 1.602'176'565e-'19; // { dg-error "digit separator adjacent to exponent" }
+ d = 1.602'176'565e-1'9; // OK
+ d = 1.602'176'565e-19'; // { dg-error "digit separator outside digit sequence" }
+ float f = 1.602'176'565e-19'F; // { dg-error "digit separator outside digit sequence" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/digit-sep.C b/gcc/testsuite/g++.dg/cpp1y/digit-sep.C
new file mode 100644
index 0000000000..cc670fe06d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/digit-sep.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++1y } }
+
+#define assert(E) if(!(E))__builtin_abort();
+
+#define m(x) 0
+
+int
+main()
+{
+ assert(1048576 == 1'048'576);
+ assert(1048576 == 0X100000);
+ assert(1048576 == 0x10'0000);
+ assert(1048576 == 0'004'000'000);
+ assert(1048576 == 0B100000000000000000000);
+ assert(1048576 == 0b0001'0000'0000'0000'0000'0000);
+
+ assert(1.602'176'565e-19 == 1.602176565e-19);
+ assert(1.602'176'565e-1'9 == 1.602176565e-19);
+
+ int i = m(1'2)+(3'4);
+ assert(i == 34);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
new file mode 100644
index 0000000000..8719577c5c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11-neg.C
@@ -0,0 +1,40 @@
+// { dg-do compile { target c++11_only } }
+// { dg-options "-pedantic-errors" }
+
+// These *are* defined in C++14 onwards.
+
+#ifndef __cpp_binary_literals
+# error "__cpp_binary_literals" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_init_captures
+# error "__cpp_init_captures" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_generic_lambdas
+# error "__cpp_generic_lambdas" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_decltype_auto
+# error "__cpp_decltype_auto" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_return_type_deduction
+# error "__cpp_return_type_deduction" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_variable_templates
+# error "__cpp_variable_templates" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_digit_separators
+# error "__cpp_digit_separators" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_attribute_deprecated
+# error "__cpp_attribute_deprecated" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_runtime_arrays
+# error "__cpp_runtime_arrays" // { dg-error "error" }
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
new file mode 100644
index 0000000000..606a5cec61
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx11.C
@@ -0,0 +1,81 @@
+// { dg-do compile }
+// { dg-options "-std=gnu++11" }
+
+#ifndef __cpp_unicode_characters
+# error "__cpp_unicode_characters"
+#elif __cpp_unicode_characters != 200704
+# error "__cpp_unicode_characters != 200704"
+#endif
+
+#ifndef __cpp_raw_strings
+# error "__cpp_raw_strings"
+#elif __cpp_raw_strings != 200710
+# error "__cpp_raw_strings != 200710"
+#endif
+
+#ifndef __cpp_unicode_literals
+# error "__cpp_unicode_literals"
+#elif __cpp_unicode_literals != 200710
+# error "__cpp_unicode_literals != 200710"
+#endif
+
+#ifndef __cpp_user_defined_literals
+# error "__cpp_user_defined_literals"
+#elif __cpp_user_defined_literals != 200809
+# error "__cpp_user_defined_literals != 200809"
+#endif
+
+#ifndef __cpp_lambdas
+# error "__cpp_lambdas"
+#elif __cpp_lambdas != 200907
+# error "__cpp_lambdas != 200907"
+#endif
+
+#ifndef __cpp_constexpr
+# error "__cpp_constexpr"
+#elif __cpp_constexpr != 200704
+# error "__cpp_constexpr != 200704"
+#endif
+
+#ifndef __cpp_static_assert
+# error "__cpp_static_assert"
+#elif __cpp_static_assert != 200410
+# error "__cpp_static_assert != 200410"
+#endif
+
+#ifndef __cpp_decltype
+# error "__cpp_decltype"
+#elif __cpp_decltype != 200707
+# error "__cpp_decltype != 200707"
+#endif
+
+#ifndef __cpp_attributes
+# error "__cpp_attributes"
+#elif __cpp_attributes != 200809
+# error "__cpp_attributes != 200809"
+#endif
+
+#ifndef __cpp_rvalue_reference
+# error "__cpp_rvalue_reference"
+#elif __cpp_rvalue_reference != 200610
+# error "__cpp_rvalue_reference != 200610"
+#endif
+
+#ifndef __cpp_variadic_templates
+# error "__cpp_variadic_templates"
+#elif __cpp_variadic_templates != 200704
+# error "__cpp_variadic_templates != 200704"
+#endif
+
+#ifndef __cpp_alias_templates
+# error "__cpp_alias_templates"
+#elif __cpp_alias_templates != 200704
+# error "__cpp_alias_templates != 200704"
+#endif
+
+// These C++14 features are allowed in C++11 in non-ANSI modes.
+#ifndef __cpp_binary_literals
+# error "__cpp_binary_literals"
+#elif __cpp_binary_literals != 201304
+# error "__cpp_binary_literals != 201304"
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
new file mode 100644
index 0000000000..8a05f66606
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx14.C
@@ -0,0 +1,231 @@
+// { dg-do compile { target c++1y } }
+// { dg-options "-I${srcdir}/g++.dg/cpp1y -I${srcdir}/g++.dg/cpp1y/testinc" }
+
+// Begin C++11 tests.
+
+#ifndef __cpp_unicode_characters
+# error "__cpp_unicode_characters"
+#elif __cpp_unicode_characters != 200704
+# error "__cpp_unicode_characters != 200704"
+#endif
+
+#ifndef __cpp_raw_strings
+# error "__cpp_raw_strings"
+#elif __cpp_raw_strings != 200710
+# error "__cpp_raw_strings != 200710"
+#endif
+
+#ifndef __cpp_unicode_literals
+# error "__cpp_unicode_literals"
+#elif __cpp_unicode_literals != 200710
+# error "__cpp_unicode_literals != 200710"
+#endif
+
+#ifndef __cpp_user_defined_literals
+# error "__cpp_user_defined_literals"
+#elif __cpp_user_defined_literals != 200809
+# error "__cpp_user_defined_literals != 200809"
+#endif
+
+#ifndef __cpp_lambdas
+# error "__cpp_lambdas"
+#elif __cpp_lambdas != 200907
+# error "__cpp_lambdas != 200907"
+#endif
+
+#ifndef __cpp_constexpr
+# error "__cpp_constexpr"
+#elif __cpp_constexpr != 200704
+# error "__cpp_constexpr != 200704"
+#endif
+
+#ifndef __cpp_static_assert
+# error "__cpp_static_assert"
+#elif __cpp_static_assert != 200410
+# error "__cpp_static_assert != 200410"
+#endif
+
+#ifndef __cpp_decltype
+# error "__cpp_decltype"
+#elif __cpp_decltype != 200707
+# error "__cpp_decltype != 200707"
+#endif
+
+#ifndef __cpp_attributes
+# error "__cpp_attributes"
+#elif __cpp_attributes != 200809
+# error "__cpp_attributes != 200809"
+#endif
+
+#ifndef __cpp_rvalue_reference
+# error "__cpp_rvalue_reference"
+#elif __cpp_rvalue_reference != 200610
+# error "__cpp_rvalue_reference != 200610"
+#endif
+
+#ifndef __cpp_variadic_templates
+# error "__cpp_variadic_templates"
+#elif __cpp_variadic_templates != 200704
+# error "__cpp_variadic_templates != 200704"
+#endif
+
+#ifndef __cpp_alias_templates
+# error "__cpp_alias_templates"
+#elif __cpp_alias_templates != 200704
+# error "__cpp_alias_templates != 200704"
+#endif
+
+// Begin C++14 tests.
+
+#ifndef __cpp_binary_literals
+# error "__cpp_binary_literals"
+#elif __cpp_binary_literals != 201304
+# error "__cpp_binary_literals != 201304"
+#endif
+
+#ifndef __cpp_init_captures
+# error "__cpp_init_captures"
+#elif __cpp_init_captures != 201304
+# error "__cpp_init_captures != 201304"
+#endif
+
+#ifndef __cpp_generic_lambdas
+# error "__cpp_generic_lambdas"
+#elif __cpp_generic_lambdas != 201304
+# error "__cpp_generic_lambdas != 201304"
+#endif
+
+// TODO: Change 200704 to 201304 when C++14 constexpr goes in.
+#ifndef __cpp_constexpr
+# error "__cpp_constexpr"
+#elif __cpp_constexpr != 200704
+# error "__cpp_constexpr != 200704"
+#endif
+
+#ifndef __cpp_decltype_auto
+# error "__cpp_decltype_auto"
+#elif __cpp_decltype_auto != 201304
+# error "__cpp_decltype_auto != 201304"
+#endif
+
+#ifndef __cpp_return_type_deduction
+# error "__cpp_return_type_deduction"
+#elif __cpp_return_type_deduction != 201304
+# error "__cpp_return_type_deduction != 201304"
+#endif
+
+#ifndef __cpp_runtime_arrays
+# error "__cpp_runtime_arrays"
+#elif __cpp_runtime_arrays != 201304
+# error "__cpp_runtime_arrays != 201304"
+#endif
+
+// Aggregate initializers not in yet.
+#ifdef __cpp_aggregate_nsdmi
+# error "__cpp_aggregate_nsdmi"
+#endif
+
+// Variable templates not in yet.
+#ifdef __cpp_variable_templates
+# error "__cpp_variable_templates"
+#endif
+
+#ifndef __cpp_digit_separators
+# error "__cpp_digit_separators"
+#elif __cpp_digit_separators != 201309
+# error "__cpp_digit_separators != 201309"
+#endif
+
+#ifndef __cpp_attribute_deprecated
+# error "__cpp_attribute_deprecated"
+#elif __cpp_attribute_deprecated != 201309
+# error "__cpp_attribute_deprecated != 201309"
+#endif
+
+// Sized deallocation not in yet.
+#ifdef __cpp_sized_deallocation
+# error "__cpp_sized_deallocation"
+#endif
+
+// Begin include checks.
+
+// Check for __has_include macro.
+#ifndef __has_include
+# error "__has_include"
+#endif
+
+// Quoted complex.h should find at least the bracket version (use operator).
+#if __has_include__ "complex.h"
+#else
+# error "complex.h"
+#endif
+
+// Try known bracket header (use operator).
+#if __has_include__(<complex>)
+#else
+# error "<complex>"
+#endif
+
+// Define and use a macro to invoke the operator.
+#define sluggo(TXT) __has_include__(TXT)
+
+#if sluggo(<complex>)
+#else
+# error "<complex>"
+#endif
+
+#if ! sluggo(<complex>)
+# error "<complex>"
+#else
+#endif
+
+// Quoted complex.h should find at least the bracket version.
+#if __has_include("complex.h")
+#else
+# error "complex.h"
+#endif
+
+// Try known local quote header.
+#if __has_include("complex_literals.h")
+#else
+# error "\"complex_literals.h\""
+#endif
+
+// Try nonexistent bracket header.
+#if __has_include(<stuff>)
+# error "<stuff>"
+#else
+#endif
+
+// Try nonexistent quote header.
+#if __has_include("phlegm")
+# error "\"phlegm\""
+#else
+#endif
+
+// Test __has_include_next.
+#if __has_include("phoobhar.h")
+# include "phoobhar.h"
+#else
+# error "__has_include(\"phoobhar.h\")"
+#endif
+
+// Try a macro.
+#define COMPLEX_INC "complex.h"
+#if __has_include(COMPLEX_INC)
+#else
+# error COMPLEX_INC
+#endif
+
+// Realistic use of __has_include.
+#if __has_include(<array>)
+# define STD_ARRAY 1
+# include <array>
+ template<typename _Tp, size_t _Num>
+ using array = std::array<_Tp, _Num>;
+#elif __has_include(<tr1/array>)
+# define TR1_ARRAY 1
+# include <tr1/array>
+ template<typename _Tp, size_t _Num>
+ typedef std::tr1::array<_Tp, _Num> array;
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
new file mode 100644
index 0000000000..b99b57efe0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98-neg.C
@@ -0,0 +1,99 @@
+// { dg-do compile { target c++98_only } }
+// { dg-options "-ansi" }
+
+#ifndef __cpp_runtime_arrays
+# error "__cpp_runtime_arrays" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_unicode_characters
+# error "__cpp_unicode_characters" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_raw_strings
+# error "__cpp_raw_strings" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_unicode_literals
+# error "__cpp_unicode_literals" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_user_defined_literals
+# error "__cpp_user_defined_literals" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_lambdas
+# error "__cpp_lambdas" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_constexpr
+# error "__cpp_constexpr" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_static_assert
+# error "__cpp_static_assert" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_decltype
+# error "__cpp_decltype" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_attributes
+# error "__cpp_attributes" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_rvalue_reference
+# error "__cpp_rvalue_reference" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_variadic_templates
+# error "__cpp_variadic_templates" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_alias_templates
+# error "__cpp_alias_templates" // { dg-error "error" }
+#endif
+
+// C++14
+
+// C++98 gets binary literals.
+//#ifndef __cpp_binary_literals
+//# error "__cpp_binary_literals"
+//#endif
+
+#ifndef __cpp_init_captures
+# error "__cpp_init_captures" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_generic_lambdas
+# error "__cpp_generic_lambdas" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_decltype_auto
+# error "__cpp_decltype_auto" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_return_type_deduction
+# error "__cpp_return_type_deduction" // { dg-error "error" }
+#endif
+
+// Aggregate initializers not in yet.
+//#ifdef __cpp_aggregate_nsdmi
+//# error "__cpp_aggregate_nsdmi"
+//#endif
+
+#ifndef __cpp_variable_templates
+# error "__cpp_variable_templates" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_digit_separators
+# error "__cpp_digit_separators" // { dg-error "error" }
+#endif
+
+#ifndef __cpp_attribute_deprecated
+# error "__cpp_attribute_deprecated" // { dg-error "error" }
+#endif
+
+// Sized deallocation not in yet.
+//#ifdef __cpp_sized_deallocation
+//# error "__cpp_sized_deallocation"
+//#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
new file mode 100644
index 0000000000..a0a2b75e30
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/feat-cxx98.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target c++98_only } }
+// { dg-options "" }
+
+// These C++14 features are allowed in C++98 in non-ANSI modes.
+#ifndef __cpp_binary_literals
+# error "__cpp_binary_literals"
+#elif __cpp_binary_literals != 201304
+# error "__cpp_binary_literals != 201304"
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C b/gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C
new file mode 100644
index 0000000000..1d7c812d06
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/fn-generic-member-ool.C
@@ -0,0 +1,36 @@
+// Out-of-line generic member function definitions.
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A {
+ void f(auto x);
+};
+
+void A::f(auto x) {} // injects a new list
+
+template <typename T>
+struct B {
+ void f(auto x);
+};
+
+template <typename T>
+void B<T>::f(auto x) {} // injects a new list
+
+struct C {
+ template <int N>
+ void f(auto x);
+};
+
+template <int N>
+void C::f(auto x) {} // extends existing inner list
+
+template <typename T>
+struct D
+{
+ template <int N>
+ void f(auto x);
+};
+
+template <typename T>
+template <int N>
+void D<T>::f(auto x) {} // extends existing inner list
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-deduce-mult.C b/gcc/testsuite/g++.dg/cpp1y/lambda-deduce-mult.C
new file mode 100644
index 0000000000..478d6a50ba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-deduce-mult.C
@@ -0,0 +1,26 @@
+// Testcase for an extension to allow return type deduction when the lambda
+// contains more than just a single return-statement.
+
+// { dg-do run { target c++1y } }
+
+bool b;
+template <class T>
+T f (T t)
+{
+ return [=] {
+ auto i = t+1;
+ if (b)
+ return i+1;
+ else
+ return i+1;
+ }();
+}
+
+int main()
+{
+ // Pointless, but well-formed.
+ [] { return 1; return 2; }();
+
+ if (f(1) != 3)
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-cfun.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-cfun.C
new file mode 100644
index 0000000000..0069a6eaed
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-cfun.C
@@ -0,0 +1,26 @@
+// Generic lambda conversion to function ptr test from N3690 5.1.2.6
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void f1(int (*)(int)) { }
+void f2(char (*)(int)) { }
+void g(int (*)(int)) { } // #1
+void g(char (*)(char)) { } // #2
+void h(int (*)(int)) { } // #3
+void h(char (*)(int)) { } // #4
+
+int main()
+{
+ auto glambda = [](auto a) { return a; };
+ int (*fp)(int) = glambda;
+ f1(glambda); // OK
+ f2(glambda); // { dg-error "invalid user-defined conversion" }
+ g(glambda); // { dg-error "ambiguous" }
+ h(glambda); // OK: calls #3 since it is convertible from ID
+ int& (*fpi)(int*) = [](auto* a) -> auto& { return *a; }; // OK
+
+ auto GL = [](auto a) { return a; };
+ int (*GL_int)(int) = GL; // OK: through conversion function template
+ GL_int(3);
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C
new file mode 100644
index 0000000000..c22bb97eca
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-dep.C
@@ -0,0 +1,42 @@
+// Generic lambda type dependence test part from N3690 5.1.2.12
+// { dg-do compile { target c++1y } }
+
+void f(int, const int (&)[2] = {}) { } // #1
+void f(const int&, const int (&)[1]) { } // #2
+
+void test()
+{
+ const int x = 17;
+ auto g = [](auto a) {
+ f(x); // OK: calls #1, does not capture x
+ };
+ auto g2 = [=](auto a) {
+ int selector[sizeof(a) == 1 ? 1 : 2]{};
+ f(x, selector); // OK: is a dependent expression, so captures x
+ };
+}
+
+struct S {
+ struct N {
+ auto test () { return 7.f; }
+ };
+};
+
+#include <utility>
+
+int main()
+{
+ auto f = [] <typename T> (T const& s) mutable {
+ typename T::N x;
+ return x.test ();
+ };
+ auto g = [] (auto const& s) {
+ typename std::decay<decltype (s)>::type::N x;
+ return x.test ();
+ };
+
+ S i;
+ f(i);
+ g(i);
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C
new file mode 100644
index 0000000000..3e67ebd16f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-mixed.C
@@ -0,0 +1,10 @@
+// Mixed explicit and implicit generic lambda test.
+// { dg-do compile { target c++1y } }
+
+int main()
+{
+ auto f = [] <typename T> (T a, auto b) { return a + b; };
+ auto g = [] <typename T> (auto a, T b) { return a + b; };
+
+ return f (1.0, 3) + g (1.0, 3);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-udt.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-udt.C
new file mode 100644
index 0000000000..f0e9a5bbe6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-udt.C
@@ -0,0 +1,51 @@
+// Ensure that generic lambdas properly construct and destroy user types.
+// { dg-options "-DUSE_AUTO_SYNTAX" }
+// { dg-do run { target c++1y } }
+
+int i = 3;
+
+struct S
+{
+ S () { ++i; }
+ S (S const&) { ++i; }
+ S (S&& old) { old.shadow = true; i += 2; }
+ ~S () { if (shadow) i -= 2; else --i; }
+
+ bool shadow = false;
+};
+
+extern "C" void printf(...);
+#define assert(e) if (e); else \
+ printf ("%s:%d: !(%s)\n", __FILE__, __LINE__, #e), __builtin_abort ();
+
+int main ()
+{
+ assert (i == 3);
+ {
+ S s; assert (i == 4);
+
+ #if USE_AUTO_SYNTAX
+ auto byref = [] (auto& r) { (void) r; };
+ auto bycref = [] (auto const& r) { (void) r; };
+ auto byval = [] (auto v, auto const x) { assert (i == x); (void) v; };
+ auto byrval = [] (auto&& r, auto const x) { S steal (static_cast<S&&>(r));
+ assert (i == x); };
+
+ #elif USE_EXPLICIT_TEMPLATE_SYNTAX
+ auto byref = [] <typename T> (T& r) { (void) r; };
+ auto bycref = [] <typename T> (T const& r) { (void) r; };
+ auto byval = [] <typename T, typename I>
+ (T v, I const x) { assert (i == x); (void) v; };
+ auto byrval = [] <typename T, typename I>
+ (T&& r, I const x) { S steal (static_cast<S&&>(r));
+ assert (i == x); };
+ #endif
+
+ byref (s); assert (i == 4);
+ bycref (s); assert (i == 4);
+ byval (s, 5); assert (i == 4);
+ byrval (static_cast<S&&>(s), 6); assert (i == 5);
+ }
+ assert (i == 3);
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C
new file mode 100644
index 0000000000..7065ac606f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-variadic.C
@@ -0,0 +1,14 @@
+// Basic generic lambda test
+// { dg-do run { target c++1y } }
+
+template <typename T, typename U> struct pair {};
+template <typename... T> struct tuple {};
+
+int main()
+{
+ auto a = [] (auto, pair<auto,auto> v) { return sizeof (v); };
+ auto b = [] (auto, pair<pair<auto,auto>,auto>... v) { return sizeof... (v); };
+
+ a(1, pair<int, float>());
+ b(2, pair<pair<short,char>, double>(), pair<pair<float,long>, int>());
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
new file mode 100644
index 0000000000..f646b85b5b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-vla1.C
@@ -0,0 +1,24 @@
+// PR c++/59271
+// { dg-do compile { target c++1y } }
+
+extern "C" int printf (const char *, ...);
+
+void f(int n)
+{
+ int a[n];
+
+ for (auto& i : a)
+ {
+ i = &i - a;
+ }
+
+ [&a] (auto m)
+ {
+ for (auto i : a)
+ {
+ printf ("%d", i);
+ }
+
+ return m;
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
new file mode 100644
index 0000000000..b722aa7b23
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-x.C
@@ -0,0 +1,25 @@
+// Explicit generic lambda test from N3690 5.1.2.5
+// { dg-do compile { target c++1y } }
+
+#include <iostream>
+
+int main()
+{
+ auto glambda = [] <typename A, typename B> (A a, B&& b) { return a < b; };
+ bool b = glambda(3, 3.14); // OK
+ auto vglambda = [] <typename P> (P printer) {
+ return [=] <typename... T> (T&& ... ts) { // OK: ts is a function parameter pack
+ printer(std::forward<decltype(ts)>(ts)...);
+ return [=]() {
+ printer(ts ...);
+ };
+ };
+ };
+ auto p = vglambda( [] <typename A,
+ typename B,
+ typename C> (A v1, B v2, C v3)
+ { std::cout << v1 << v2 << v3; } );
+ auto q = p(1, 'a', 3.14); // OK: outputs 1a3.14
+ q(); // OK: outputs 1a3.14
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xcfun.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xcfun.C
new file mode 100644
index 0000000000..fbd74220d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xcfun.C
@@ -0,0 +1,26 @@
+// Explicit generic lambda conversion to function ptr test from N3690 5.1.2.6
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void f1(int (*)(int)) { }
+void f2(char (*)(int)) { }
+void g(int (*)(int)) { } // #1
+void g(char (*)(char)) { } // #2
+void h(int (*)(int)) { } // #3
+void h(char (*)(int)) { } // #4
+
+int main()
+{
+ auto glambda = [] <typename T> (T a) { return a; };
+ int (*fp)(int) = glambda;
+ f1(glambda); // OK
+ f2(glambda); // { dg-error "invalid user-defined conversion" }
+ g(glambda); // { dg-error "ambiguous" }
+ h(glambda); // OK: calls #3 since it is convertible from ID
+ int& (*fpi)(int*) = [] <typename T> (T* a) -> auto& { return *a; }; // OK
+
+ auto GL = [] <typename T> (T a) { return a; };
+ int (*GL_int)(int) = GL; // OK: through conversion function template
+ GL_int(3);
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xudt.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xudt.C
new file mode 100644
index 0000000000..f6e9e5bffc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic-xudt.C
@@ -0,0 +1,5 @@
+// Ensure that generic lambdas properly construct and destroy user types.
+// { dg-do compile { target c++1y } }
+// { dg-options "-DUSE_EXPLICIT_TEMPLATE_SYNTAX" }
+
+#include "lambda-generic-udt.C"
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-generic.C b/gcc/testsuite/g++.dg/cpp1y/lambda-generic.C
new file mode 100644
index 0000000000..9721e87d96
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-generic.C
@@ -0,0 +1,23 @@
+// Generic lambda test from N3690 5.1.2.5
+// { dg-do compile { target c++1y } }
+
+#include <iostream>
+
+int main()
+{
+ auto glambda = [](auto a, auto&& b) { return a < b; };
+ bool b = glambda(3, 3.14); // OK
+ auto vglambda = [](auto printer) {
+ return [=](auto&& ... ts) { // OK: ts is a function parameter pack
+ printer(std::forward<decltype(ts)>(ts)...);
+ return [=]() {
+ printer(ts ...);
+ };
+ };
+ };
+ auto p = vglambda( [](auto v1, auto v2, auto v3)
+ { std::cout << v1 << v2 << v3; } );
+ auto q = p(1, 'a', 3.14); // OK: outputs 1a3.14
+ q(); // OK: outputs 1a3.14
+}
+
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init.C
new file mode 100644
index 0000000000..f9a80059bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init.C
@@ -0,0 +1,8 @@
+// Test for the explicit initializer extension of C++1y
+// { dg-do compile { target c++1y } }
+
+int main()
+{
+ int j = [i = 2]{sizeof(i); return i;}();
+ return (j != 2);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init1.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init1.C
new file mode 100644
index 0000000000..2525464141
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init1.C
@@ -0,0 +1,13 @@
+// N3648: capture init
+// { dg-options "-w" }
+// { dg-do run { target c++1y } }
+
+int main()
+{
+ int x = 41;
+ auto r = [x = x+1]{ return x; }();
+ if (r != 42) __builtin_abort();
+
+ static auto *p = &r;
+ [&x=r]{ if (&x != p) __builtin_abort(); }();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init2.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init2.C
new file mode 100644
index 0000000000..83ec57e675
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init2.C
@@ -0,0 +1,13 @@
+// N3648: redundancy and capture init
+// { dg-do compile { target c++1y } }
+
+int main()
+{
+ int x = 42;
+ [=,x]{}; // { dg-error "redundant" }
+ [=,&x]{};
+ [&,&x]{}; // { dg-error "redundant" }
+ [&,x]{};
+ [=,x=24]{};
+ [&,&r=x]{};
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init3.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init3.C
new file mode 100644
index 0000000000..4337228467
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init3.C
@@ -0,0 +1,11 @@
+// N3648: capture init at non-block scope
+// { dg-options "-w" }
+// { dg-do run { target c++1y } }
+
+int i = 42;
+int j = [x=i]{ return x; }();
+
+int main()
+{
+ if (j != 42) __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init4.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init4.C
new file mode 100644
index 0000000000..0affb31bd5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init4.C
@@ -0,0 +1,13 @@
+// N3648: capture init example from paper
+// { dg-do run { target c++1y } }
+
+int x = 4;
+auto y = [&r = x, x = x+1]()->int {
+ r += 2;
+ return x+2;
+}(); // Updates ::x to 6, and initializes y to 7.
+
+int main()
+{
+ if (x != 6 || y != 7) __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init5.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init5.C
new file mode 100644
index 0000000000..b136f45ea7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init5.C
@@ -0,0 +1,10 @@
+// Test for paren and brace initializers
+// { dg-do run { target c++1y } }
+
+#include <initializer_list>
+
+int main()
+{
+ if ([x(42)]{ return x; }() != 42) __builtin_abort();
+ if ([x{1,2}]{ return x.begin()[0]; }() != 1) __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
new file mode 100644
index 0000000000..2b82bca457
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init6.C
@@ -0,0 +1,12 @@
+// Test that simple captures are not named in the closure type, but
+// initialized captures are named.
+// { dg-do compile { target c++1y } }
+
+int main()
+{
+ int i;
+ auto lam = [i,j=42]{};
+ lam.j;
+ lam.j.foo; // { dg-error "::j" }
+ lam.i; // { dg-error "no member" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/lambda-init7.C b/gcc/testsuite/g++.dg/cpp1y/lambda-init7.C
new file mode 100644
index 0000000000..224cd1a61b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/lambda-init7.C
@@ -0,0 +1,6 @@
+// PR c++/59349
+// { dg-do compile { target c++1y } }
+
+int foo () {
+ [bar()]{}; // { dg-error "empty initializer" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/mangle1.C b/gcc/testsuite/g++.dg/cpp1y/mangle1.C
new file mode 100644
index 0000000000..0642f14798
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/mangle1.C
@@ -0,0 +1,14 @@
+// Test that the parens don't show up in the mangling
+// { dg-do compile { target c++1y } }
+// { dg-options "-Wno-return-local-addr" }
+// { dg-final { scan-assembler "_Z1gI1AEDTdtfp_1iET_" } }
+
+struct A { int i; };
+
+template <class T>
+auto g(T t)->decltype((t.i)) { return t.i; }
+
+int main()
+{
+ g(A());
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/paren1.C b/gcc/testsuite/g++.dg/cpp1y/paren1.C
new file mode 100644
index 0000000000..809f251009
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/paren1.C
@@ -0,0 +1,31 @@
+// PR c++/63437
+// { dg-do compile { target c++11 } }
+
+struct X // movable but not copyable
+{
+ X() = default;
+ X(X &&) = default;
+
+ X(const X &) = delete;
+};
+
+X non_parenthesized()
+{
+ X x;
+ return x; // works
+}
+
+X parenthesized()
+{
+ X x;
+ return (x); // error: use of deleted function 'X::X(const X&)'
+}
+
+template <class T>
+T parenthesized_t()
+{
+ T t;
+ return (t);
+}
+
+template X parenthesized_t<X>();
diff --git a/gcc/testsuite/g++.dg/cpp1y/phoobhar.h b/gcc/testsuite/g++.dg/cpp1y/phoobhar.h
new file mode 100644
index 0000000000..7feec36499
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/phoobhar.h
@@ -0,0 +1,16 @@
+
+int
+phoo();
+
+int
+bhar();
+
+#ifndef __has_include_next
+# error "__has_include_next"
+#else
+# if __has_include_next("phoobhar.h")
+# include_next "phoobhar.h"
+# else
+# error "__has_include_next(\"phoobhar.h\")"
+# endif
+#endif
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr57640.C b/gcc/testsuite/g++.dg/cpp1y/pr57640.C
new file mode 100644
index 0000000000..b9debe1455
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr57640.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++1y } }
+
+#include <chrono>
+
+using namespace std::literals::chrono_literals;
+
+auto blooper = operator"" min(45.0L);
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr57644.C b/gcc/testsuite/g++.dg/cpp1y/pr57644.C
new file mode 100644
index 0000000000..080572168d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr57644.C
@@ -0,0 +1,13 @@
+// { dg-do compile { target c++1y } }
+
+struct Foo
+{
+ unsigned i: 32;
+};
+
+int
+main()
+{
+ Foo f{};
+ return f.i;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58500.C b/gcc/testsuite/g++.dg/cpp1y/pr58500.C
new file mode 100644
index 0000000000..ec7d564b4b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58500.C
@@ -0,0 +1,7 @@
+// PR c++/58500
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A {};
+
+void foo(auto (A::*)());
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58533.C b/gcc/testsuite/g++.dg/cpp1y/pr58533.C
new file mode 100644
index 0000000000..34d43aabdc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58533.C
@@ -0,0 +1,7 @@
+// PR c++/58533
+// { dg-do compile { target c++1y } }
+
+void foo()
+{
+ void (*fp)(auto); // { dg-error "auto|not permitted" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58534.C b/gcc/testsuite/g++.dg/cpp1y/pr58534.C
new file mode 100644
index 0000000000..dd5073182c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58534.C
@@ -0,0 +1,7 @@
+// PR c++/58534
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+template<typename> void foo(const auto&) {}
+
+template<typename, typename...T> void foo(const auto&, T...) {}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58535.C b/gcc/testsuite/g++.dg/cpp1y/pr58535.C
new file mode 100644
index 0000000000..e0718480b3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58535.C
@@ -0,0 +1,8 @@
+// PR c++/58535
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ virtual void foo(auto); // { dg-error "templates" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58536.C b/gcc/testsuite/g++.dg/cpp1y/pr58536.C
new file mode 100644
index 0000000000..05c00b362d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58536.C
@@ -0,0 +1,10 @@
+// PR c++/58536
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ A(auto);
+};
+
+A::A(auto) {}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58548.C b/gcc/testsuite/g++.dg/cpp1y/pr58548.C
new file mode 100644
index 0000000000..122b96f500
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58548.C
@@ -0,0 +1,8 @@
+// PR c++/58548
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void foo(auto)
+{
+ struct A { int i; };
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58549.C b/gcc/testsuite/g++.dg/cpp1y/pr58549.C
new file mode 100644
index 0000000000..1b54af4a67
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58549.C
@@ -0,0 +1,8 @@
+// PR c++/58549
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void foo(auto)
+{
+ void bar();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58637.C b/gcc/testsuite/g++.dg/cpp1y/pr58637.C
new file mode 100644
index 0000000000..ecc9258114
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58637.C
@@ -0,0 +1,4 @@
+// PR c++/58637
+// { dg-do compile { target c++1y } }
+
+template<> void foo(auto); // { dg-error "auto|not a template" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr58708.C b/gcc/testsuite/g++.dg/cpp1y/pr58708.C
new file mode 100644
index 0000000000..226b318f65
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr58708.C
@@ -0,0 +1,59 @@
+// { dg-do run { target c++1y } }
+
+template<typename, typename>
+ struct is_same
+ {
+ static constexpr bool value = false;
+ };
+
+template<typename _Tp>
+ struct is_same<_Tp, _Tp>
+ {
+ static constexpr bool value = true;
+ };
+
+template<typename CharT, CharT... Str>
+ struct Foo
+ {
+ using char_type = CharT;
+ char_type chars[sizeof...(Str)]{Str...};
+ };
+
+template<typename CharT, CharT... Str>
+ Foo<CharT, Str...>
+ operator""_foo()
+ {
+ return Foo<CharT, Str...>();
+ }
+
+int
+main()
+{
+ auto fooU = U"\x10000\x10001\x10002"_foo;
+ if (is_same<decltype(fooU)::char_type, char32_t>::value != true) __builtin_abort();
+ if (sizeof(fooU.chars)/sizeof(char32_t) != 3) __builtin_abort();
+ if (fooU.chars[0] != 65536) __builtin_abort();
+ if (fooU.chars[1] != 65537) __builtin_abort();
+ if (fooU.chars[2] != 65538) __builtin_abort();
+
+ auto foo = "\x61\x62\x63"_foo;
+ if (is_same<decltype(foo)::char_type, char>::value != true) __builtin_abort();
+ if (sizeof(foo.chars)/sizeof(char) != 3) __builtin_abort();
+ if (foo.chars[0] != 97) __builtin_abort();
+ if (foo.chars[1] != 98) __builtin_abort();
+ if (foo.chars[2] != 99) __builtin_abort();
+
+ auto wfoo = L"\x01020304\x05060708"_foo;
+ if (is_same<decltype(wfoo)::char_type, wchar_t>::value != true) __builtin_abort();
+ if (sizeof(wfoo.chars)/sizeof(wchar_t) != 2) __builtin_abort();
+ if (wfoo.chars[0] != 16909060) __builtin_abort();
+ if (wfoo.chars[1] != 84281096) __builtin_abort();
+
+ auto foou = u"\x0102\x0304\x0506\x0708"_foo;
+ if (is_same<decltype(foou)::char_type, char16_t>::value != true) __builtin_abort();
+ if (sizeof(foou.chars)/sizeof(char16_t) != 4) __builtin_abort();
+ if (foou.chars[0] != 258) __builtin_abort();
+ if (foou.chars[1] != 772) __builtin_abort();
+ if (foou.chars[2] != 1286) __builtin_abort();
+ if (foou.chars[3] != 1800) __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59110.C b/gcc/testsuite/g++.dg/cpp1y/pr59110.C
new file mode 100644
index 0000000000..c78d645cc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59110.C
@@ -0,0 +1,4 @@
+// PR c++/59110
+// { dg-do compile { target c++1y } }
+
+int i = *(auto*)0; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59112.C b/gcc/testsuite/g++.dg/cpp1y/pr59112.C
new file mode 100644
index 0000000000..bc9d99eb3f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59112.C
@@ -0,0 +1,10 @@
+// PR c++/59112
+// { dg-do compile { target c++1y } }
+
+void foo()
+{
+ struct A
+ {
+ A(auto) {} // { dg-error "auto|not permitted" }
+ };
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59113.C b/gcc/testsuite/g++.dg/cpp1y/pr59113.C
new file mode 100644
index 0000000000..8d2bf7fbf7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59113.C
@@ -0,0 +1,9 @@
+// PR c++/59113
+// { dg-do compile { target c++1y } }
+
+void foo()
+{
+ void bar(auto) {} // { dg-error "function-definition|auto|not permitted" }
+}
+
+auto i = 0;
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59629.C b/gcc/testsuite/g++.dg/cpp1y/pr59629.C
new file mode 100644
index 0000000000..b6e561f2e0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59629.C
@@ -0,0 +1,4 @@
+// PR c++/59629
+// { dg-do compile { target c++1y } }
+
+void foo(int i = []{ auto 0; }()); // { dg-error "expected|could not convert" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59635.C b/gcc/testsuite/g++.dg/cpp1y/pr59635.C
new file mode 100644
index 0000000000..80d9f4de43
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59635.C
@@ -0,0 +1,6 @@
+// PR c++/59635
+// { dg-do compile { target c++1y } }
+
+auto f = [] (auto, ...) { return 0; };
+
+int (*p) (int, ...) = f; // { dg-message "unimplemented" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59636.C b/gcc/testsuite/g++.dg/cpp1y/pr59636.C
new file mode 100644
index 0000000000..6128753e08
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59636.C
@@ -0,0 +1,4 @@
+// PR c++/59636
+// { dg-do compile { target c++1y } }
+
+auto f = []() { return []<>() {}; }; // { dg-error "expected identifier" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59638.C b/gcc/testsuite/g++.dg/cpp1y/pr59638.C
new file mode 100644
index 0000000000..0125bdcbb7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59638.C
@@ -0,0 +1,14 @@
+// PR c++/59638
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void (*a)(auto); // { dg-error "template declaration" }
+
+void (*b)(auto) = 0; // { dg-error "template declaration" }
+
+typedef void (*f)(auto); // { dg-error "template declaration" }
+
+struct A
+{
+ int i;
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr59867.C b/gcc/testsuite/g++.dg/cpp1y/pr59867.C
new file mode 100644
index 0000000000..91d025964c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr59867.C
@@ -0,0 +1,52 @@
+// PR c++/59867
+// { dg-do compile { target c++1y } }
+
+#include <iostream>
+using namespace std;
+
+// constant
+template<typename T, T x>
+ struct meta_value
+ {
+ typedef meta_value type;
+ typedef T value_type;
+ static const T value = x;
+ };
+
+// array
+template<typename T, T... data>
+ struct meta_array
+ {
+ typedef meta_array type;
+ typedef T item_type;
+ };
+
+// static array -> runtime array conversion utility
+template<typename T>
+ struct array_gen;
+
+template<typename T, T... xs>
+ struct array_gen<meta_array<T, xs...>>
+ {
+ static const T value[sizeof...(xs)];
+ };
+
+template<typename T, T... xs>
+ const T
+ array_gen<meta_array<T, xs...>>::value[sizeof...(xs)] = {xs...};
+
+// static string
+template<typename T, T... xs>
+ constexpr meta_array<T, xs...>
+ operator""_s()
+ {
+ static_assert(sizeof...(xs) == 3, "What's wrong with you?");
+ return meta_array<T, xs...>();
+ }
+
+int
+main()
+{
+ auto a = "123"_s;
+ const char (& xs)[3] = array_gen<decltype("123"_s)>::value;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60033.C b/gcc/testsuite/g++.dg/cpp1y/pr60033.C
new file mode 100644
index 0000000000..f918d33fdd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60033.C
@@ -0,0 +1,20 @@
+// PR c++/60033
+// { dg-do compile { target c++1y } }
+
+template <typename... T>
+auto f(T&&... ts)
+{
+ return sizeof...(ts);
+}
+
+template <typename... T>
+auto g(T&&... ts) {
+ return [&] (auto v) {
+ return f(ts...);
+ };
+}
+
+int main()
+{
+ return g(1,2,3,4)(5) == 4 ? 0 : 1;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60052.C b/gcc/testsuite/g++.dg/cpp1y/pr60052.C
new file mode 100644
index 0000000000..6ac7720204
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60052.C
@@ -0,0 +1,15 @@
+// PR c++/60052
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ void foo(auto);
+};
+
+void A::foo(auto) {}
+
+struct B
+{
+ void bar(auto);
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60053.C b/gcc/testsuite/g++.dg/cpp1y/pr60053.C
new file mode 100644
index 0000000000..846039052f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60053.C
@@ -0,0 +1,15 @@
+// PR c++/60053
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ void foo(auto);
+};
+
+void A::foo(auto) {}
+
+template<typename> struct B
+{
+ template<typename T> void bar(auto);
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60064.C b/gcc/testsuite/g++.dg/cpp1y/pr60064.C
new file mode 100644
index 0000000000..e61704e8ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60064.C
@@ -0,0 +1,21 @@
+// PR c++/60064
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+class A
+{
+ int m;
+ friend void foo (auto) {}
+ friend void foo2 (auto);
+};
+
+void foo2 (auto i)
+{
+ A a;
+ a.m = i;
+}
+
+int main ()
+{
+ foo2 (7);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60065.C b/gcc/testsuite/g++.dg/cpp1y/pr60065.C
new file mode 100644
index 0000000000..2cf8da12bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60065.C
@@ -0,0 +1,8 @@
+// PR c++/60065
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+template <int> void foo(auto... x);
+template <typename> void foo2(auto... x);
+template <int> void foo3(auto... x, auto y, auto... z);
+template <typename> void foo4(auto... x, auto y, auto... z);
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60190.C b/gcc/testsuite/g++.dg/cpp1y/pr60190.C
new file mode 100644
index 0000000000..9a5b484a66
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60190.C
@@ -0,0 +1,4 @@
+// PR c++/60190
+// { dg-do compile { target c++1y } }
+
+auto f = []<int>() -> int() {}; // { dg-error "returning a function|expected" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60311.C b/gcc/testsuite/g++.dg/cpp1y/pr60311.C
new file mode 100644
index 0000000000..001e99327e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60311.C
@@ -0,0 +1,15 @@
+// PR c++/60311
+// { dg-do compile { target c++1y } }
+
+template<void(*)(auto)> struct A {}; // { dg-error "auto" }
+
+struct B {
+ template<void(*)(auto)> struct A {}; // { dg-error "auto" }
+};
+
+template <typename T>
+struct C {
+ template<void(*)(auto)> struct A {}; // { dg-error "auto" }
+};
+
+using D = C<int>;
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60332.C b/gcc/testsuite/g++.dg/cpp1y/pr60332.C
new file mode 100644
index 0000000000..c0a67a9f6c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60332.C
@@ -0,0 +1,6 @@
+// PR c++/60332
+// { dg-do compile { target c++1y } }
+
+void foo();
+
+auto f = (auto(*)())(&foo); // { dg-error "invalid" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60376.C b/gcc/testsuite/g++.dg/cpp1y/pr60376.C
new file mode 100644
index 0000000000..51d088a2a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60376.C
@@ -0,0 +1,12 @@
+// PR c++/60376
+// { dg-do compile { target c++1y } }
+
+struct A
+{
+ int foo();
+};
+
+template<typename> void bar()
+{
+ using (A().foo); // { dg-error "expected" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60377.C b/gcc/testsuite/g++.dg/cpp1y/pr60377.C
new file mode 100644
index 0000000000..6d1d416ec8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60377.C
@@ -0,0 +1,10 @@
+// PR c++/60377
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void foo(auto, void (f*)()); // { dg-error "expected" }
+
+struct A
+{
+ int i;
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60384.C b/gcc/testsuite/g++.dg/cpp1y/pr60384.C
new file mode 100644
index 0000000000..f206647e64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60384.C
@@ -0,0 +1,9 @@
+// PR c++/60384
+// { dg-do compile { target c++1y } }
+
+template<typename> int foo();
+
+struct A
+{
+ typedef auto foo<>(); // { dg-error "typedef declared 'auto'" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60390.C b/gcc/testsuite/g++.dg/cpp1y/pr60390.C
new file mode 100644
index 0000000000..5cd5539f82
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60390.C
@@ -0,0 +1,26 @@
+// PR c++/60390
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ void foo (auto);
+};
+
+class B
+{
+ int m;
+ friend void A::foo (auto);
+};
+
+void A::foo (auto i)
+{
+ B b;
+ b.m = i;
+}
+
+int main ()
+{
+ A a;
+ a.foo (7);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60391.C b/gcc/testsuite/g++.dg/cpp1y/pr60391.C
new file mode 100644
index 0000000000..68746aedf3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60391.C
@@ -0,0 +1,10 @@
+// PR c++/60391
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+namespace N
+{
+ int operator"" _X(auto) {} // { dg-error "invalid" }
+}
+
+namespace N {}
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60393.C b/gcc/testsuite/g++.dg/cpp1y/pr60393.C
new file mode 100644
index 0000000000..8e89be4993
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60393.C
@@ -0,0 +1,10 @@
+// PR c++/60393
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+void (*f)(auto) + 0; // { dg-error "expected" }
+
+struct A
+{
+ int i;
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60573.C b/gcc/testsuite/g++.dg/cpp1y/pr60573.C
new file mode 100644
index 0000000000..2f607071c4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60573.C
@@ -0,0 +1,28 @@
+// PR c++/60573
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A
+{
+ struct B
+ {
+ void foo(auto);
+ };
+
+ void B::foo(auto) {} // { dg-error "cannot define" }
+
+ struct X
+ {
+ struct Y
+ {
+ struct Z
+ {
+ void foo(auto);
+ };
+ };
+
+ void Y::Z::foo(auto) {} // { dg-error "cannot define" }
+ };
+
+ void X::Y::Z::foo(auto) {} // { dg-error "cannot define" }
+};
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60626.C b/gcc/testsuite/g++.dg/cpp1y/pr60626.C
new file mode 100644
index 0000000000..39ea438159
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60626.C
@@ -0,0 +1,7 @@
+// PR c++/60626
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+struct A {};
+
+void (*A::p)(auto) = 0; // { dg-error "static member|non-template" }
diff --git a/gcc/testsuite/g++.dg/cpp1y/pr60627.C b/gcc/testsuite/g++.dg/cpp1y/pr60627.C
new file mode 100644
index 0000000000..9e2116e9cb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/pr60627.C
@@ -0,0 +1,12 @@
+// PR c++/60627
+// { dg-do compile { target c++1y } }
+// { dg-options "" }
+
+template<typename T> void foo(T) {}
+
+template void foo(auto); // { dg-error "auto|does not match" }
+
+void bar()
+{
+ foo(0);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/regress1.C b/gcc/testsuite/g++.dg/cpp1y/regress1.C
new file mode 100644
index 0000000000..5bb804258e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/regress1.C
@@ -0,0 +1,12 @@
+// PR c++/60409
+// { dg-do compile { target c++1y } }
+
+struct A
+{
+ void foo();
+};
+
+template<typename T> void bar(T)
+{
+ (A().foo)();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/system-binary-constants-1.C b/gcc/testsuite/g++.dg/cpp1y/system-binary-constants-1.C
new file mode 100644
index 0000000000..951fa3c5f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/system-binary-constants-1.C
@@ -0,0 +1,13 @@
+// Origin: Dodji Seketeli <dodji@redhat.com>
+// { dg-do compile { target c++1y } }
+
+#include "../system-binary-constants-1.h"
+
+int
+foo (void)
+{
+#if BINARY_INT_CONSTANT_IN_SYSTEM_HEADER
+ return 23;
+#endif
+ return 0b1101; // { dg-bogus "binary constants are a C..1y feature or GCC extension" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h b/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/testinc/phoobhar.h
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
new file mode 100644
index 0000000000..c99b2f7278
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template-neg.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target { c++11 && { ! c++1y } } } }
+
+template<typename CharT, CharT... String>
+ int
+ operator"" _script()
+ { return 42; } // { dg-error "literal operator template|has invalid parameter list" }
+
+int i = "hi!"_script;
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C
new file mode 100644
index 0000000000..d6b44d9c0f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-char-template.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++1y } }
+
+template<typename CharT, CharT... String>
+ int
+ operator"" _script()
+ { return 42; }
+
+int i = "hi!"_script;
+int i8 = u8"hi!"_script;
+int iw = L"hi!"_script;
+int i16 = u"hi!"_script;
+int i32 = U"hi!"_script;
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-empty-string-neg.C b/gcc/testsuite/g++.dg/cpp1y/udlit-empty-string-neg.C
new file mode 100644
index 0000000000..7c23641e62
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-empty-string-neg.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target c++1y } }
+
+int
+operator "*"_s(unsigned long long) // { dg-error "expected empty string after 'operator'" }
+{ return 0; }
+
+int
+operator L"*"_Ls(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u"*"_s16(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator U"*"_s32(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u8"*"_u8s(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C b/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
new file mode 100644
index 0000000000..51def3aca3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-enc-prefix-neg.C
@@ -0,0 +1,17 @@
+// { dg-do compile { target c++1y } }
+
+int
+operator L""_Ls(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u""_s16(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator U""_s32(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
+
+int
+operator u8""_u8s(unsigned long long) // { dg-error "invalid encoding prefix in literal operator" }
+{ return 0; }
diff --git a/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C b/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
new file mode 100644
index 0000000000..f6c3baec92
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/udlit-userdef-string.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++1y } }
+
+#include "complex_literals.h"
+
+auto cx = 1.1if;
+
+auto cn = 123if;
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla-initlist1.C b/gcc/testsuite/g++.dg/cpp1y/vla-initlist1.C
new file mode 100644
index 0000000000..b642ed4158
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla-initlist1.C
@@ -0,0 +1,22 @@
+// { dg-do run { target c++1y } }
+
+#include <initializer_list>
+
+struct A
+{
+ int i;
+ A(std::initializer_list<int>) { }
+ A(int i): i{i} { }
+ ~A() {}
+};
+
+int x = 4;
+int main(int argc, char **argv)
+{
+ { int i[x] = { 42, 42, 42, 42 }; }
+ {
+ A a[x] = { argc };
+ if (a[1].i != 42)
+ __builtin_abort ();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla1.C b/gcc/testsuite/g++.dg/cpp1y/vla1.C
new file mode 100644
index 0000000000..5708cf84e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla1.C
@@ -0,0 +1,40 @@
+// { dg-do compile { target c++1y } }
+
+#include <typeinfo>
+
+void f(int n)
+{
+ int a[n];
+ int aa[n][n]; // { dg-error "" }
+ &a; // { dg-error "" }
+ sizeof a; // { dg-error "" }
+ typeid(a); // { dg-error "" }
+ decltype(a) a2; // { dg-error "" }
+ typedef int at[n]; // { dg-error "" }
+ int (*p)[n]; // { dg-error "" }
+ int (&r)[n] = a; // { dg-error "" }
+ struct A
+ {
+ int a[n]; // { dg-error "" }
+ };
+}
+
+template <class T>
+void g(int n)
+{
+ int a[n];
+ int aa[n][n]; // { dg-error "" }
+ &a; // { dg-error "" }
+ sizeof a; // { dg-error "" }
+ typeid(a); // { dg-error "" }
+ decltype(a) a2; // { dg-error "" }
+ typedef int at[n]; // { dg-error "" }
+ int (*p)[n]; // { dg-error "" }
+ int (&r)[n] = a; // { dg-error "" }
+ struct A
+ {
+ int a[n]; // { dg-error "" }
+ };
+}
+
+template void g<int>(int);
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla10.C b/gcc/testsuite/g++.dg/cpp1y/vla10.C
new file mode 100644
index 0000000000..c3f71b5c20
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla10.C
@@ -0,0 +1,24 @@
+// PR c++/57402
+// { dg-do compile { target c++1y } }
+
+int i = 2;
+
+int main()
+{
+ {
+ int a[i];
+ a[1] = 0xbeef;
+ }
+ {
+ int a[i] = { 1 };
+ if (a[1] != 0)
+ __builtin_abort ();
+ a[1] = 0xbeef;
+ }
+ {
+ int a[i] = { };
+ if (a[1] != 0)
+ __builtin_abort ();
+ a[1] = 0xbeef;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla11.C b/gcc/testsuite/g++.dg/cpp1y/vla11.C
new file mode 100644
index 0000000000..c84b0bbb9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla11.C
@@ -0,0 +1,8 @@
+// PR c++/60251
+// { dg-do compile { target c++1y } }
+
+void foo(int n)
+{
+ int x[n];
+ [&x]() { decltype(x) y; }; // { dg-error "decltype of array of runtime bound" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla12.C b/gcc/testsuite/g++.dg/cpp1y/vla12.C
new file mode 100644
index 0000000000..d605e72a48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla12.C
@@ -0,0 +1,7 @@
+// PR c++/60250
+// { dg-do compile { target c++1y } }
+
+template<typename> void foo()
+{
+ typedef int T[ ([](){ return 1; }()) ]; // { dg-error "runtime bound" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla13.C b/gcc/testsuite/g++.dg/cpp1y/vla13.C
new file mode 100644
index 0000000000..9b69452d1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla13.C
@@ -0,0 +1,8 @@
+// PR c++/60227
+// { dg-do compile { target c++1y } }
+
+void foo(int n)
+{
+ int a[n];
+ int (&r)[n] = {}; // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla2.C b/gcc/testsuite/g++.dg/cpp1y/vla2.C
new file mode 100644
index 0000000000..6aa5fcfe95
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla2.C
@@ -0,0 +1,14 @@
+// N3639 allows initialization and capture of VLAs
+// { dg-do run { target c++1y } }
+
+void f(int n)
+{
+ int ar[n] = { 42 };
+ auto l = [&] { return ar[0]; };
+ if (l() != 42) __builtin_abort ();
+}
+
+int main()
+{
+ f(1);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla3.C b/gcc/testsuite/g++.dg/cpp1y/vla3.C
new file mode 100644
index 0000000000..75470365a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla3.C
@@ -0,0 +1,29 @@
+// Test for throwing bad_array_length on invalid array length
+// { dg-do run { target c++1y } }
+
+#include <new>
+
+int f(int i)
+{
+ int ar[i]{1,2,3,4};
+ return ar[i-1];
+}
+
+void g(int i)
+{
+ int ar[i];
+ ar[0] = 42;
+}
+
+int main()
+{
+ int ok = 0;
+ f(4); // OK
+ try { f(3); } // too small
+ catch (std::bad_array_length) { ++ok; }
+ try { g(-24); } // negative
+ catch (std::bad_array_length) { ++ok; }
+
+ if (ok != 2)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla4.C b/gcc/testsuite/g++.dg/cpp1y/vla4.C
new file mode 100644
index 0000000000..9de1d28fef
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla4.C
@@ -0,0 +1,23 @@
+// Test for range-based for with VLAs.
+// { dg-do run { target c++1y } }
+
+#include <new>
+
+void f(int i)
+{
+ int ar[i];
+ int j = 0;
+ for (int& x : ar)
+ x = ++j;
+ [&ar]{
+ int k = 0;
+ for (int x : ar)
+ if (x != ++k)
+ __builtin_abort();
+ }();
+}
+
+int main()
+{
+ f(42); // OK
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla5.C b/gcc/testsuite/g++.dg/cpp1y/vla5.C
new file mode 100644
index 0000000000..5f0dfdf302
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla5.C
@@ -0,0 +1,8 @@
+// PR c++/55149
+// { dg-do compile { target c++1y } }
+
+void test(int n) {
+ int r[n];
+ [&r]() { return r + 0; };
+ [r]() { return r + 0; }; // { dg-error "captured by copy" }
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla6.C b/gcc/testsuite/g++.dg/cpp1y/vla6.C
new file mode 100644
index 0000000000..ca527a84c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla6.C
@@ -0,0 +1,15 @@
+// PR c++/57404
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
+
+void f (int i)
+{
+ int a[i];
+ [&a] {};
+}
+
+void g (int i)
+{
+ int a[i];
+ [&a] {} ();
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla7.C b/gcc/testsuite/g++.dg/cpp1y/vla7.C
new file mode 100644
index 0000000000..df34c8219d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla7.C
@@ -0,0 +1,12 @@
+// PR c++/55520
+// { dg-options "-Wno-vla" }
+// { dg-require-effective-target c++11 }
+
+int main(int argc, char** argv)
+{
+ int x[1][argc];
+
+ [&x](int i) { // { dg-error "variable.size" }
+ x[0][i] = 0; // { dg-prune-output "assignment" }
+ }(5);
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla8.C b/gcc/testsuite/g++.dg/cpp1y/vla8.C
new file mode 100644
index 0000000000..5077ae343f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla8.C
@@ -0,0 +1,31 @@
+// PR c++/55149
+// { dg-do compile { target c++1y } }
+
+template<unsigned int TA>
+ struct SA
+ {
+ SA (const int & PA);
+ int nt;
+ };
+
+template<typename TB>
+ inline void
+ test(TB aa)
+ {
+ ;
+ }
+
+template<unsigned int TA>
+ inline
+ SA<TA>::SA(const int & PA)
+ {
+ float e[nt];
+ test([&e](int i, int j){ return e[i] < e[j]; });
+ }
+
+int main()
+{
+ int d;
+ SA<2> iso(d);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/cpp1y/vla9.C b/gcc/testsuite/g++.dg/cpp1y/vla9.C
new file mode 100644
index 0000000000..5f49d11e91
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp1y/vla9.C
@@ -0,0 +1,31 @@
+// PR c++/57408
+// { dg-do compile { target c++1y } }
+
+template<typename Callable>
+ struct Impl
+ {
+ Callable func;
+ Impl(Callable f) : func(f) { }
+ virtual void run() { func(); }
+ };
+
+template<typename Callable>
+void call(Callable f)
+ {
+ Impl<Callable>(f).run();
+ }
+
+extern "C" int printf(const char*, ...);
+
+int main(){
+ int y = 2;
+ float fa[2][y]; // { dg-error "array of array of runtime bound" }
+ fa[0][0]=0.8;
+ fa[0][1]=1.8;
+ auto fx=[&](){
+ for(int c=0; c<2; c++){
+ printf("use me", fa[0][c]); // { dg-error "capture of variable-size type" }
+ }
+ };
+ call(fx);
+}
diff --git a/gcc/testsuite/g++.dg/debug/debug.exp b/gcc/testsuite/g++.dg/debug/debug.exp
index e98d0fe554..3840f02e6c 100644
--- a/gcc/testsuite/g++.dg/debug/debug.exp
+++ b/gcc/testsuite/g++.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C b/gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C
index b1cae21409..11352fd1b2 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/anonname1.C
@@ -1,6 +1,6 @@
// PR debug/41828
-// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-gdwarf-2 -dA" }
// { dg-final { scan-assembler-not "<anonymous" } }
// { dg-final { scan-assembler-not "\\._\[0-9\]" } }
// { dg-final { scan-assembler-not "\$_\[0-9\]" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
new file mode 100644
index 0000000000..aef29ee5d9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/auto1.C
@@ -0,0 +1,31 @@
+// PR c++/53756
+// { dg-do compile { target c++1y } }
+// { dg-options "-g -dA -fno-debug-types-section" }
+// We're looking for something like
+
+// .uleb128 0x3 # (DIE (0x33) DW_TAG_subprogram)
+// .ascii "a1\0" # DW_AT_name
+// .long 0x4c # DW_AT_type
+//...
+// .uleb128 0x5 # (DIE (0x4c) DW_TAG_unspecified_type)
+// .long .LASF6 # DW_AT_name: "auto"
+//...
+// .uleb128 0x7 # (DIE (0x57) DW_TAG_subprogram)
+// .long 0x33 # DW_AT_specification
+// .long 0x87 # DW_AT_type
+//...
+// .uleb128 0x9 # (DIE (0x87) DW_TAG_base_type)
+// .ascii "int\0" # DW_AT_name
+
+// { dg-final { scan-assembler "a1.*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\1. DW_TAG_unspecified_type.*DW_AT_specification\[\n\r]{1,2}\[^\n\r]*(0x\[0-9a-f]+)\[^\n\r]*DW_AT_type.*\\2. DW_TAG_base_type" } }
+
+struct A
+{
+ auto a1 () { return 42; }
+};
+
+int main()
+{
+ A a;
+ a.a1();
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/block.C b/gcc/testsuite/g++.dg/debug/dwarf2/block.C
new file mode 100644
index 0000000000..176823f237
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/block.C
@@ -0,0 +1,29 @@
+// Compiler should not generate too many lexical blocks for this function.
+// { dg-do compile { target { i?86-*-* x86_64-*-* } } }
+// { dg-options "-O0 -fno-exceptions -g -dA" }
+
+union UElement {
+ void* pointer;
+ int integer;
+};
+struct UColToken {
+ unsigned source;
+ unsigned char **rulesToParseHdl;
+};
+
+int uhash_hashTokens(const union UElement k)
+{
+ int hash = 0;
+ struct UColToken *key = (struct UColToken *)k.pointer;
+ if (key != 0) {
+ int len = (key->source & 0xFF000000)>>24;
+ int inc = ((len - 32) / 32) + 1;
+ const unsigned char *p = (key->source & 0x00FFFFFF)
+ + *(key->rulesToParseHdl);
+ const unsigned char *limit = p + len;
+ hash = *p + *limit;
+ }
+ return hash;
+}
+
+// { dg-final { scan-assembler-not "LBB10" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C b/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C
new file mode 100644
index 0000000000..405739311a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/deallocator.C
@@ -0,0 +1,46 @@
+// Test that debug info generated for auto-inserted deallocator is
+// correctly attributed.
+// This patch scans for the lineno directly from assembly, which may
+// differ between different architectures. Because it mainly tests
+// FE generated debug info, without losing generality, only x86
+// assembly is scanned in this test.
+// { dg-do compile { target { i?86-*-* x86_64-*-* } } }
+// { dg-options "-O2 -fno-exceptions -g -dA" }
+
+struct t {
+ t ();
+ ~t ();
+ void foo();
+ void bar();
+};
+
+int bar();
+
+void foo(int i)
+{
+ t test_outside;
+ for (int j = 0; j < 10; j++)
+ {
+ t test;
+ test.foo();
+ if (i + j)
+ {
+ test.bar();
+ return;
+ }
+ }
+ if (i)
+ {
+ t test;
+ if (i == 10)
+ {
+ test.bar();
+ }
+ }
+ test_outside.foo();
+ return;
+}
+// { dg-final { scan-assembler "deallocator.C:29" } }
+// { dg-final { scan-assembler "deallocator.C:31" } }
+// { dg-final { scan-assembler "deallocator.C:38" } }
+// { dg-final { scan-assembler "deallocator.C:41" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
index 7b112ac600..d947a0eaf5 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/dwarf2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C b/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C
index b5518ef18a..ffc936108e 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/enum1.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-g -dA -gno-strict-dwarf -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA -gno-strict-dwarf" }
// { dg-final { scan-assembler-times "DIE\[^\n\r\]*DW_TAG_enumeration_type" 3 } }
// { dg-final { scan-assembler-times " DW_AT_enum_class" 2 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
index 32d205d207..782d71aea1 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/explicit-constructor.C
@@ -1,7 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++
// { dg-do compile }
-// { dg-options "-O -g -dA -gno-strict-dwarf" }
+// { dg-options "-O -g -dA -gno-strict-dwarf -fno-debug-types-section" }
// { dg-final { scan-assembler-times "DW_AT_explicit" 2 } }
struct Foo
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C
index 69b56478a0..702a33f53e 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/global-used-types-1.C
@@ -1,5 +1,5 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
-// { dg-options "-g -dA -fno-merge-debug-strings" }
+// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" }
// { dg-do compile }
// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
// { dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C
new file mode 100644
index 0000000000..ce01f72382
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/imported-decl-2.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+// { dg-options "-gdwarf-2 -dA -O0 -fno-merge-debug-strings" }
+
+class AAAA
+{
+ public:
+ int method (void);
+ int a;
+};
+
+int
+AAAA::method (void)
+{
+ return a;
+}
+
+class BBBB : public AAAA
+{
+ public:
+ using AAAA::method;
+
+ int method (int b);
+};
+
+int
+BBBB::method (int b)
+{
+ return a + b;
+}
+
+// { dg-final { scan-assembler-not "ascii \"BBBB\\\\0\".*ascii \"AAAA\\\\0\".*DW_TAG_imported_declaration" } }
+// { dg-final { scan-assembler-times "ascii \"AAAA\\\\0\".*ascii \"BBBB\\\\0\".*DIE .0x\[0-9a-f\]*. DW_TAG_imported_declaration" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C b/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C
index 3379b71583..f22fe28a36 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/integer-typedef.C
@@ -1,5 +1,5 @@
// Origin: PR debug/49130
-// { dg-options "-g -dA -fno-merge-debug-strings" }
+// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" }
typedef long unsigned int size_t;
static const size_t foo = 2048;
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
index ee24eca22a..b315275e38 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/lambda1.C
@@ -1,5 +1,6 @@
// PR c++/43912
-// { dg-options "-g -std=c++0x -dA -fno-merge-debug-strings -gno-strict-dwarf" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA -fno-merge-debug-strings -gno-strict-dwarf" }
// Check for the local alias variables that point to the members of the closure.
// { dg-final { scan-assembler-times "DW_TAG_variable\[^.\]*\.ascii \"j.0\"" 4 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C b/gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C
index c7c55e12d4..6eb87bb9f0 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/localclass1.C
@@ -59,11 +59,11 @@ main ()
// { dg-final { scan-assembler "foo\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "staticfn1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "staticfn2\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "staticfn3\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "staticfn4\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "staticfn3\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "staticfn4\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler-not "staticfn5\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler-not "staticfn6\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "method1\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "method1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg2\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg3\[^\n\r\]*DW_AT_name" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C b/gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C
index 6e9a0664f1..475f02b560 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/localclass2.C
@@ -59,11 +59,11 @@ main ()
// { dg-final { scan-assembler "foo\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "staticfn1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "staticfn2\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "staticfn3\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "staticfn4\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "staticfn3\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "staticfn4\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler-not "staticfn5\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler-not "staticfn6\[^\n\r\]*DW_AT_name" } }
-// { dg-final { scan-assembler-not "method1\[^\n\r\]*DW_AT_name" } }
+// { dg-final { scan-assembler "method1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg1\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg2\[^\n\r\]*DW_AT_name" } }
// { dg-final { scan-assembler "arg3\[^\n\r\]*DW_AT_name" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C
index 0289e9022d..8715ca684a 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/namespace-2.C
@@ -1,6 +1,6 @@
// Test that we define A inside the namespace rather than declaring it
// there and then defining it at CU scope.
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-debug-types-section" }
// { dg-final { scan-assembler-not "DW_AT_declaration" } }
namespace N {
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C
index 3e6f6b5912..b0c858c54a 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-2.C
@@ -1,6 +1,6 @@
/*
Origin: PR debug/45024
- { dg-options "-g -dA -fno-merge-debug-strings" }
+ { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" }
{ dg-do compile }
*/
@@ -32,6 +32,6 @@ We want to express that the DIE of S::T<int> must be a child of the DIE of S, li
Hence the slightly odd regexp:
- { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(\[@|#;!\]|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(\[@|#;!\]|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } }
+ { dg-final { scan-assembler "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"S\\\\0\"\[ \t\]+\(\[@|#;!\]+|//?\)\[ \t\]+DW_AT_name\[\n\r\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_structure_type\\)\[\n\r\]+\[^\n\r\]*\"T<int>\\\\0\"\[ \t\]+\(.*\)?\\(DIE\[^\n\r\]*DW_TAG_template_type_param\\)\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\[\n\r\]+\[^\n\r\]*\(\[@|#;!\]+|//?\)\[ \t\]+end of children of DIE\[^\n\r\]*\[\n\r\]+\[^\n\r\]*end of children of DIE\[^\n\r\]*" } }
*/
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
index 1c1be999c4..de59637d69 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-3.C
@@ -37,6 +37,14 @@ main ()
// .uleb128 0x9 # (DIE (0x34) DW_TAG_class_type)
// .long .LASF0 # DW_AT_name: "Executor"
// # DW_AT_declaration
+// .byte 0xa0 # DW_AT_signature
+// .byte 0xfe
+// .byte 0xe6
+// .byte 0x7b
+// .byte 0x66
+// .byte 0xe9
+// .byte 0x38
+// .byte 0xf0
// .uleb128 0x5 # (DIE (0x39) DW_TAG_subprogram)
// # DW_AT_external
// .long .LASF1 # DW_AT_name: "CurrentExecutor"
@@ -51,4 +59,4 @@ main ()
//
// Hence the scary regexp:
//
-// { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } }
+// { dg-final { scan-assembler "\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_namespace\\)\[\n\r\]+\[^\n\r\]*\"thread\[\^\n\r]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\\(DIE \\(0x(\[0-9a-f\]+)\\) DW_TAG_class_type\\)(\[\n\r\]+\[^\n\r\]*)+\"Executor\[^\n\r\]+\[\n\r\]+\[^\n\r\]*DW_AT_declaration\[\n\r\]+\[^\n\r\]*DW_AT_signature\[^#;/!|@\]*\[#;/!|@\]+ \[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_subprogram\\)\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*\"CurrentExecutor\[^\n\r\]+\[\n\r\]+(\[^\n\r\]*\[\n\r\]+)+(\[^\n\r\]*\[\n\r\]+)+\[^\n\r\]*end of children of DIE 0x\\3\[\n\r]+\[^\n\r\]*end of children of DIE 0x\\1\[\n\r]+" } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C
new file mode 100644
index 0000000000..784c7534f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/nested-4.C
@@ -0,0 +1,14 @@
+// PR debug/53235
+// { dg-options "-gdwarf-4 -fdebug-types-section" }
+// { dg-final { scan-assembler-times "debug_types" 2 { xfail *-*-darwin* } } }
+
+namespace E {
+ class O {};
+ void f (O o) {}
+}
+namespace F {
+ class O {};
+ void f (O fo) {}
+}
+E::O eo;
+int main () {}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C b/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C
new file mode 100644
index 0000000000..8ad347a7cc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/non-virtual-thunk.C
@@ -0,0 +1,39 @@
+// { dg-do compile }
+// { dg-options "-g2 -dA" }
+
+// Verify that line number info is output for the non-virtual
+// thunks for C::~C().
+// { dg-final { scan-assembler "thunk.C:30" } }
+
+class A
+{
+ public:
+ A();
+ virtual ~A();
+ private:
+ int i;
+};
+
+class B
+{
+ public:
+ B();
+ virtual ~B();
+ private:
+ int i;
+};
+
+class C : public A, public B
+{
+ public:
+ C();
+ virtual ~C(); // line 30
+};
+
+C::C()
+{
+}
+
+C::~C()
+{
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C b/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C
new file mode 100644
index 0000000000..b3b65e9188
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/omp-fesdr.C
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fopenmp } */
+/* { dg-options "-g -fopenmp -gdwarf-2 -femit-struct-debug-reduced" } */
+
+struct aa
+{
+ int a;
+};
+
+int
+f7 (void)
+{
+ int v7i = 6, v7j = 7, v7k = 9, v7l = 0, v7n = 0, v7o = 1;
+
+ #pragma omp parallel
+ {
+ #pragma omp master
+ v7o++;
+ #pragma omp for private (v7i) firstprivate (v7k) reduction (+:v7l)
+ for (v7n = 0; v7n < 3; v7n++)
+ {
+ int v7m = v7j + v7k;
+ v7i = 8;
+ v7l++;
+ }
+ }
+
+ return v7i + v7j + v7k + v7l + v7n;
+}
+
+int
+main (void)
+{
+ f7 ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C
index 9ab2589ce1..07e80a83a7 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr52260.C
@@ -1,6 +1,6 @@
// PR debug/52260
-// { dg-do compile }
-// { dg-options "-gdwarf-4 -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-gdwarf-4" }
namespace { typedef decltype (nullptr) T1; }
struct B {};
@@ -22,7 +22,7 @@ namespace A
{
template <typename T>
struct I : H <T> {};
- template <typename ...> struct J;
+ template <typename ...> struct J {};
template <typename> struct K;
struct L
{
@@ -36,7 +36,7 @@ namespace A
template <typename T, typename B2, typename ... B4>
struct N <T (B4 ...), B2> : L::M <B2> {};
template <typename T, typename ... B4>
- struct K <T (B4 ...)> :J <,>, L
+ struct K <T (B4 ...)> :J <>, L
{
typedef T O (B4 ...);
struct P {};
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
new file mode 100644
index 0000000000..f1c77c5913
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr54508.C
@@ -0,0 +1,67 @@
+// PR debug/54508
+// { dg-do compile }
+// { dg-options "-g2 -dA -fno-merge-debug-strings" }
+
+// { dg-final { scan-assembler "\"cbase\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"OPCODE\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"bi\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"si\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"f1\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler "\"f2\\\\0\"\[ \t\]+\[#;/!|@\]+ +DW_AT_name" } }
+// { dg-final { scan-assembler-not "\"nc\\\\0\"\[ \t\]+\# +DW_AT_name" } }
+
+class cbase
+
+{
+public:
+ static int si;
+ int bi;
+};
+
+class c : public cbase
+
+{
+public:
+ enum
+ {
+ OPCODE = 251
+ };
+ int i ;
+ static const char *testc (void) { return "foo"; }
+};
+
+struct s
+{
+ int f1;
+ static const char *tests (void) { return "test"; }
+};
+
+union u
+{
+ int f2;
+ double d;
+ static const char *testu (void) { return "test union"; }
+};
+
+namespace n
+{
+ const char *ntest (void) { return "test n"; }
+
+ class nc
+ {
+ public:
+ int i;
+ static int sj;
+ };
+}
+
+extern void send (int, int, const void *, int);
+
+void test (int src)
+{
+ int cookie = 1;
+ send(src, c::OPCODE, c::testc (), cookie);
+ send(src, c::OPCODE, s::tests (), cookie);
+ send(src, c::OPCODE, u::testu (), cookie);
+ send(src, c::OPCODE, n::ntest (), cookie);
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C
new file mode 100644
index 0000000000..a63b8a9ef2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pr61433.C
@@ -0,0 +1,23 @@
+// PR c++/61433
+// { dg-do compile { target c++11 } }
+// { dg-options "-O -fcompare-debug -fno-inline -fno-ipa-pure-const -fipa-sra" }
+
+template <class T>
+struct A
+{
+ template <class V>
+ struct B
+ {
+ int MEM;
+ };
+};
+struct D {};
+struct C: public A<int>::B<D>
+{};
+template <class T, class U, class V>
+auto k(T t, U u, V v) -> decltype (t.U::template B<V>::MEM)
+{}
+int main()
+{
+ k( C(), A<int>(), D() );
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
new file mode 100644
index 0000000000..f2c0f24c1e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-2.C
@@ -0,0 +1,193 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-gpubnames -gdwarf-4 -fno-debug-types-section -dA" }
+// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_A\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_B\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_C\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_A\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_B\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_C\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"inline_func_1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::~c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check_enum\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"main\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<one::c1>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<double> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int const\\\*> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"__static_initialization_and_destruction_0\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::ci\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v3\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1v\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)::one_anonymous_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c1_count\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c2_count\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three::anonymous_three_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubtypes" 1 } }
+// { dg-final { scan-assembler "\"one::G\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"int\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"double\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_container\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"bool\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+
+namespace
+{
+int c1_count;
+int c2_count;
+
+namespace three
+{
+int anonymous_three_var;
+}
+};
+
+namespace one
+{
+
+enum G
+{
+ G_A,
+ G_B,
+ G_C
+};
+
+namespace {
+int one_anonymous_var;
+}
+
+class c1
+{
+ public:
+ static int count;
+
+ c1()
+ { ++c1_count; }
+
+ ~c1()
+ {
+ --c1_count;
+ }
+
+ enum E
+ {
+ E_A,
+ E_B,
+ E_C,
+ };
+
+ int
+ val()
+ { return E_A; }
+};
+
+c1 c1v;
+};
+
+namespace two
+{
+const int ci = 3;
+
+template <typename T>
+class c2
+{
+ public:
+ c2(T t)
+ : t_(t)
+ {
+ ++c2_count;
+ }
+
+ ~c2()
+ { --c2_count; }
+
+ T
+ val()
+ { return this->t_; }
+
+ T t_;
+};
+
+c2<int> c2v1(1);
+c2<double> c2v2(2.0);
+c2<int const*> c2v3(&ci);
+};
+
+enum F
+{
+ F_A,
+ F_B,
+ F_C
+};
+
+template <class C>
+bool
+check(C* c)
+{ return c->val() == 0; }
+
+bool
+check_enum(int i)
+{ return i > 0; }
+
+struct anonymous_union_container {
+ union {
+ struct astruct {
+ int a;
+ };
+ int b;
+ } u;
+};
+
+anonymous_union_container anonymous_union_var;
+
+#ifdef __GNUC__
+#define ALWAYS_INLINE __attribute__((always_inline))
+#else
+#define ALWAYS_INLINE
+#endif
+
+static inline ALWAYS_INLINE int
+inline_func_1(int i)
+{ return i * 17; }
+
+int
+main()
+{
+ F f = F_A;
+ one::G g = one::G_A;
+ check_enum(f);
+ check_enum(g);
+ check(&one::c1v);
+ check(&two::c2v1);
+ check(&two::c2v2);
+ check(&two::c2v3);
+ anonymous_union_var.u.b = inline_func_1(3) - 51;
+ return anonymous_union_var.u.b;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C
new file mode 100644
index 0000000000..62d6b0628c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/pubnames-3.C
@@ -0,0 +1,193 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-gpubnames -gdwarf-4 -fdebug-types-section -dA" }
+// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubnames" 1 } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_A\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_B\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::G_C\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_A\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_B\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F_C\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"inline_func_1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::~c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check_enum\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"main\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<one::c1>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<double> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"check<two::c2<int const\\\*> \\>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::val\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"__static_initialization_and_destruction_0\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>::~c2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::ci\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v2\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2v3\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1v\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::\\(anonymous namespace\\)::one_anonymous_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c1_count\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::c2_count\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"\\(anonymous namespace\\)::three::anonymous_three_var\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler-times "\.section\[\t \]\[^\n\]*debug_pubtypes" 1 } }
+// { dg-final { scan-assembler "\"one::G\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"int\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"one::c1\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"double\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<double>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"two::c2<int const\\\*>\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"F\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"anonymous_union_container\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+// { dg-final { scan-assembler "\"bool\\\\0\"+\[ \t\]+\[#;/|@!]+\[ \t\]+external name" } }
+
+namespace
+{
+int c1_count;
+int c2_count;
+
+namespace three
+{
+int anonymous_three_var;
+}
+};
+
+namespace one
+{
+
+enum G
+{
+ G_A,
+ G_B,
+ G_C
+};
+
+namespace {
+int one_anonymous_var;
+}
+
+class c1
+{
+ public:
+ static int count;
+
+ c1()
+ { ++c1_count; }
+
+ ~c1()
+ {
+ --c1_count;
+ }
+
+ enum E
+ {
+ E_A,
+ E_B,
+ E_C,
+ };
+
+ int
+ val()
+ { return E_A; }
+};
+
+c1 c1v;
+};
+
+namespace two
+{
+const int ci = 3;
+
+template <typename T>
+class c2
+{
+ public:
+ c2(T t)
+ : t_(t)
+ {
+ ++c2_count;
+ }
+
+ ~c2()
+ { --c2_count; }
+
+ T
+ val()
+ { return this->t_; }
+
+ T t_;
+};
+
+c2<int> c2v1(1);
+c2<double> c2v2(2.0);
+c2<int const*> c2v3(&ci);
+};
+
+enum F
+{
+ F_A,
+ F_B,
+ F_C
+};
+
+template <class C>
+bool
+check(C* c)
+{ return c->val() == 0; }
+
+bool
+check_enum(int i)
+{ return i > 0; }
+
+struct anonymous_union_container {
+ union {
+ struct astruct {
+ int a;
+ };
+ int b;
+ } u;
+};
+
+anonymous_union_container anonymous_union_var;
+
+#ifdef __GNUC__
+#define ALWAYS_INLINE __attribute__((always_inline))
+#else
+#define ALWAYS_INLINE
+#endif
+
+static inline ALWAYS_INLINE int
+inline_func_1(int i)
+{ return i * 17; }
+
+int
+main()
+{
+ F f = F_A;
+ one::G g = one::G_A;
+ check_enum(f);
+ check_enum(g);
+ check(&one::c1v);
+ check(&two::c2v1);
+ check(&two::c2v2);
+ check(&two::c2v3);
+ anonymous_union_var.u.b = inline_func_1(3) - 51;
+ return anonymous_union_var.u.b;
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/rv1.C b/gcc/testsuite/g++.dg/debug/dwarf2/rv1.C
index c954daa91a..56a6fbaebb 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/rv1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/rv1.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-g -dA -gdwarf-4 -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA -gdwarf-4" }
// { dg-final { scan-assembler-times "DIE\[^\n\r\]*DW_TAG_reference_type" 1 } }
// { dg-final { scan-assembler-times "DIE\[^\n\r\]*DW_TAG_rvalue_reference_type" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C
index 81bcb2775a..89467adc21 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-1.C
@@ -1,11 +1,11 @@
// Origin: PR debug/45088
// { dg-do compile }
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-debug-types-section" }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_pointer_type\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_byte_size\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type" 4 } }
struct A
{
- virtual ~A();
+ virtual ~A(){}
};
struct B : public A
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C
index b1c5401da0..c319c68a2b 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/self-ref-2.C
@@ -1,12 +1,12 @@
// Origin: PR debug/45088
// { dg-do compile }
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-debug-types-section" }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_pointer_type\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_byte_size\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type" 4 } }
template<class T>
struct A
{
- virtual ~A();
+ virtual ~A(){}
};
struct B : public A<int>
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C b/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C
index dce279ed43..b807e477c6 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/static-data-member1.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-g -dA -fno-merge-debug-strings" }
+// { dg-options "-g -dA -fno-merge-debug-strings -fno-debug-types-section" }
struct A
{
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
index 85401b2284..c584e900d0 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-4.C
@@ -1,6 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-std=c++0x -g -dA" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA" }
//
// In theory the compiler instantiates count<int, char, long>,
// count<char, long> and count<long>. In practice, only
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
index fc82dce79d..7bdcc4d46c 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-func-params-7.C
@@ -1,7 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-g -dA -std=c++0x -fno-merge-debug-strings" }
-// { dg-do compile }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
+// { dg-do compile { target c++11 } }
// There must be 5 subprograms generated:
// printf(const char*), printf<int, char, int>,
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C
new file mode 100644
index 0000000000..8000295537
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-11.C
@@ -0,0 +1,9 @@
+// PR c++/54410
+// { dg-options "-g -dA" }
+// { dg-final { scan-assembler-times "DIE \\(\[^\n\]*\\) DW_TAG_template_type_param" 1 } }
+
+namespace N {
+ template <class T> struct A { };
+}
+
+N::A<int> a;
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
index a0ca6137ce..0e63293ae4 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-4.C
@@ -1,6 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-std=c++0x -g -dA" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA" }
//
// In theory the compiler instantiates count<int, char, long>,
// count<char, long> and count<long>. In practice, only
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C
index 2b393594f5..c1eedd6a18 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/template-params-7.C
@@ -1,6 +1,7 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR debug/30161
-// { dg-options "-std=c++0x -g -dA -fno-merge-debug-strings" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -dA -fno-merge-debug-strings" }
// The type M<> should have one DW_TAG_GNU_template_parameter_pack DIE,
// with no DW_AT_name attribute. We don't test the fact that it has no
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C b/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C
new file mode 100644
index 0000000000..304cf4594a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/thunk1.C
@@ -0,0 +1,13 @@
+// Test that we don't add the x86 PC thunk to .debug_ranges
+// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+// { dg-require-effective-target fpic }
+// { dg-skip-if "darwin doesn't use the thunk for PIC" { *-*-darwin* } }
+// { dg-options "-g -fpic -fno-dwarf2-cfi-asm" }
+// { dg-final { scan-assembler-times "LFB3" 5 } }
+
+template <class T> void f(T t) { }
+
+int main()
+{
+ f(42);
+}
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
index a9ce44d523..795dc7f40a 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef1.C
@@ -1,6 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/40705
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-debug-types-section" }
// { dg-do compile }
// { dg-final { scan-assembler-times "DW_TAG_structure_type" 2 } }
// { dg-final { scan-assembler-times "DW_AT_name: \"foo<1u>\"|\"foo<1u>..\"\[^\n\]*DW_AT_name" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C
index 5bf04998a1..0bc27f264e 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef2.C
@@ -1,5 +1,5 @@
// Origin: PR debug/43628
-// { dg-options "-g -dA" }
+// { dg-options "-g -dA -fno-debug-types-section" }
// { dg-do compile }
// { dg-final { scan-assembler-times "\[^\n\r\]*\\(DIE\[^\n\r\]*DW_TAG_formal_parameter\\)\[\n\r\]{1,2}\[^\n\r\]*DW_AT_type\[\n\r\]{1,2}" 1 } }
diff --git a/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C b/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C
index 2879f60998..6749e1bd3f 100644
--- a/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C
+++ b/gcc/testsuite/g++.dg/debug/dwarf2/typedef4.C
@@ -1,5 +1,5 @@
// Origin: PR debug/45171
-// { dg-options "-g -dA -fno-eliminate-unused-debug-types" }
+// { dg-options "-g -dA -fno-eliminate-unused-debug-types -fno-debug-types-section" }
// { dg-do compile }
// There should be 2 real instances of byte_size -- one for the
diff --git a/gcc/testsuite/g++.dg/debug/localclass1.C b/gcc/testsuite/g++.dg/debug/localclass1.C
index db36d592cf..85adb3b197 100644
--- a/gcc/testsuite/g++.dg/debug/localclass1.C
+++ b/gcc/testsuite/g++.dg/debug/localclass1.C
@@ -1,5 +1,6 @@
// PR c++/52637
-// { dg-options "-g -std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g" }
template <typename T>
struct C { };
diff --git a/gcc/testsuite/g++.dg/debug/nullptr01.C b/gcc/testsuite/g++.dg/debug/nullptr01.C
index ab08588f2b..64e06e5488 100644
--- a/gcc/testsuite/g++.dg/debug/nullptr01.C
+++ b/gcc/testsuite/g++.dg/debug/nullptr01.C
@@ -1,5 +1,6 @@
// Test that debugging backends don't crash on NULLPTR_TYPE.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fabi-version=0" }
typedef decltype(nullptr) nullptr_t;
@@ -12,4 +13,4 @@ template <> nullptr_t g(A<nullptr_t>)
nullptr_t local;
}
// { dg-final { scan-assembler "_Z1fDn" } }
-// { dg-final { scan-assembler "_Z1gI1AIDnEES1_T_" } }
+// { dg-final { scan-assembler "_Z1gI1AIDnEEDnT_" } }
diff --git a/gcc/testsuite/g++.dg/debug/pr46583.C b/gcc/testsuite/g++.dg/debug/pr46583.C
index a4e94238ec..06160b1110 100644
--- a/gcc/testsuite/g++.dg/debug/pr46583.C
+++ b/gcc/testsuite/g++.dg/debug/pr46583.C
@@ -1,6 +1,7 @@
// PR debug/46583
// { dg-do compile }
// { dg-options "-O -fno-inline -fipa-cp -fipa-cp-clone -fcompare-debug" }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
template < typename = unsigned long >struct A
{
diff --git a/gcc/testsuite/g++.dg/debug/pr47106.C b/gcc/testsuite/g++.dg/debug/pr47106.C
index 3a8100f8c2..9ef276ad0a 100644
--- a/gcc/testsuite/g++.dg/debug/pr47106.C
+++ b/gcc/testsuite/g++.dg/debug/pr47106.C
@@ -1,6 +1,7 @@
// { dg-do compile }
// { dg-options "-O -fpartial-inlining -flto -fconserve-stack -fcompare-debug" }
// { dg-require-effective-target lto }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
void end (int, int) __attribute__ ((__noreturn__));
diff --git a/gcc/testsuite/g++.dg/debug/pr53466.C b/gcc/testsuite/g++.dg/debug/pr53466.C
new file mode 100644
index 0000000000..ecd88bcd18
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr53466.C
@@ -0,0 +1,39 @@
+// { dg-do compile }
+// { dg-options "-foptimize-sibling-calls -fcompare-debug" }
+
+typedef union gimple_statement_d *gimple;
+typedef gimple gimple_seq_node;
+typedef struct {
+ gimple_seq_node ptr;
+ void *seq;
+ void *bb;
+} gimple_stmt_iterator;
+struct gimple_statement_base {
+ gimple next;
+};
+union gimple_statement_d {
+ struct gimple_statement_base gsbase;
+};
+static inline gimple_stmt_iterator gsi_start_1 (gimple stmt)
+{
+ gimple_stmt_iterator i;
+ i.ptr = stmt;
+ return i;
+}
+bool gimple_may_fallthru (gimple);
+static bool gimple_try_catch_may_fallthru (gimple stmt)
+{
+ gimple_stmt_iterator i = gsi_start_1 (stmt);
+ for (; i.ptr; i.ptr = i.ptr->gsbase.next)
+ {
+ if (gimple_may_fallthru (i.ptr))
+ return true;
+ }
+}
+bool gimple_stmt_may_fallthru (gimple stmt, bool x)
+{
+ if (x)
+ return gimple_may_fallthru (stmt);
+ else
+ return gimple_try_catch_may_fallthru (stmt);
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr53860.C b/gcc/testsuite/g++.dg/debug/pr53860.C
new file mode 100644
index 0000000000..31a854af4b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr53860.C
@@ -0,0 +1,14 @@
+// PR debug/53860
+// { dg-do compile }
+// { dg-options "-fkeep-inline-functions -fdebug-types-section" }
+
+void
+foo ()
+{
+ struct S
+ {
+ S ()
+ {
+ }
+ };
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr54499.C b/gcc/testsuite/g++.dg/debug/pr54499.C
new file mode 100644
index 0000000000..0f7ce3f2e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr54499.C
@@ -0,0 +1,22 @@
+// PR debug/54499
+// { dg-do assemble }
+
+struct S1
+{
+ virtual void f () = 0;
+};
+
+struct S2
+{
+ virtual ~S2 () { }
+};
+
+struct S3 : public S1, public S2
+{
+ void f ();
+};
+
+void
+S3::f ()
+{
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr54831.C b/gcc/testsuite/g++.dg/debug/pr54831.C
new file mode 100644
index 0000000000..8e7312061a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr54831.C
@@ -0,0 +1,20 @@
+// PR debug/54831
+// { dg-do compile }
+// { dg-options "-O -fno-split-wide-types -g" }
+
+struct S
+{
+ int m1();
+ int m2();
+};
+
+typedef void (S::*mptr) ();
+
+mptr gmp;
+void bar (mptr f);
+
+void foo (mptr f)
+{
+ f = gmp;
+ bar (f);
+}
diff --git a/gcc/testsuite/g++.dg/debug/pr56294.C b/gcc/testsuite/g++.dg/debug/pr56294.C
new file mode 100644
index 0000000000..a9ee807631
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/pr56294.C
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-fno-ipa-sra -fcompare-debug" }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
+
+struct comp_cost { int cost; unsigned complexity; };
+struct cost_pair { struct iv_cand *cand; };
+struct iv_use { unsigned n_map_members; cost_pair *cost_map; };
+struct iv_cand { unsigned id; };
+
+unsigned gu;
+
+void
+bar (comp_cost, comp_cost)
+{
+}
+
+void
+foo (iv_use *use, iv_cand *cand)
+{
+ unsigned i, s = cand->id & (use->n_map_members - 1);
+ for (i = 0; i < s; i++)
+ if (use->cost_map[i].cand)
+ goto found;
+found:
+ use->cost_map[i].cand = cand;
+ comp_cost elim_cost, express_cost, bound_cost;
+ bar (elim_cost, express_cost);
+ gu = express_cost.complexity;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/debug/pr56819.C b/gcc/testsuite/g++.dg/debug/pr56819.C
index 62926be2fb..bc61cb760b 100644
--- a/gcc/testsuite/g++.dg/debug/pr56819.C
+++ b/gcc/testsuite/g++.dg/debug/pr56819.C
@@ -1,6 +1,7 @@
// PR debug/56819
// { dg-do compile }
// { dg-options "-fcompare-debug" }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
template <typename>
struct A
diff --git a/gcc/testsuite/g++.dg/debug/ra1.C b/gcc/testsuite/g++.dg/debug/ra1.C
new file mode 100644
index 0000000000..5a6811388f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/ra1.C
@@ -0,0 +1,77 @@
+/* { dg-options "-fcompare-debug" } */
+
+enum signop { SIGNED, UNSIGNED };
+enum tree_code { FOO, BAR };
+enum tree_code_class { tcc_type, tcc_other };
+extern enum tree_code_class tree_code_type[];
+
+struct tree_base {
+ enum tree_code code : 8;
+ unsigned unsigned_flag : 1;
+};
+
+struct tree_def {
+ tree_base base;
+ struct {
+ int precision;
+ } type_common;
+};
+
+typedef tree_def *tree;
+
+struct storage_ref
+{
+ storage_ref (const long *, unsigned int, unsigned int);
+
+ const long *val;
+ unsigned int len;
+ unsigned int precision;
+};
+
+inline storage_ref::storage_ref (const long *val_in,
+ unsigned int len_in,
+ unsigned int precision_in)
+ : val (val_in), len (len_in), precision (precision_in)
+{
+}
+
+struct hwi_with_prec
+{
+ long val;
+ unsigned int precision;
+ signop sgn;
+};
+
+inline storage_ref
+decompose (long *scratch, unsigned int precision,
+ const hwi_with_prec &x)
+{
+ scratch[0] = x.val;
+ if (x.sgn == SIGNED || x.val >= 0 || precision <= sizeof (long) * 8)
+ return storage_ref (scratch, 1, precision);
+ scratch[1] = 0;
+ return storage_ref (scratch, 2, precision);
+}
+
+extern void tree_class_check_failed (int) __attribute__ ((__noreturn__));
+
+inline tree
+tree_class_check (tree t, const enum tree_code_class cls, int x)
+{
+ if (tree_code_type[t->base.code] != cls)
+ tree_class_check_failed (x);
+ return t;
+}
+
+tree wide_int_to_tree (tree, const storage_ref &);
+
+tree
+build_int_cstu (tree type, unsigned long val)
+{
+ hwi_with_prec x;
+ x.val = val;
+ x.precision = tree_class_check (type, tcc_type, 1)->type_common.precision;
+ x.sgn = (signop) tree_class_check (type, tcc_type, 2)->base.unsigned_flag;
+ long scratch[2];
+ return wide_int_to_tree (type, decompose (scratch, x.precision, x));
+}
diff --git a/gcc/testsuite/g++.dg/debug/template2.C b/gcc/testsuite/g++.dg/debug/template2.C
new file mode 100644
index 0000000000..9f5bcd9b10
--- /dev/null
+++ b/gcc/testsuite/g++.dg/debug/template2.C
@@ -0,0 +1,14 @@
+// PR c++/57545
+
+template<typename T, long unsigned int N>
+struct array {
+ T data[N];
+};
+
+template<typename T>
+struct derived {
+ typedef long unsigned int size_type;
+ static const size_type n = 42;
+
+ array<int, n> a;
+};
diff --git a/gcc/testsuite/g++.dg/dfp/dfp.exp b/gcc/testsuite/g++.dg/dfp/dfp.exp
index 4d235e5c08..fceb12605a 100644
--- a/gcc/testsuite/g++.dg/dfp/dfp.exp
+++ b/gcc/testsuite/g++.dg/dfp/dfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/dg.exp b/gcc/testsuite/g++.dg/dg.exp
index 0730c76e82..aeae8f373b 100644
--- a/gcc/testsuite/g++.dg/dg.exp
+++ b/gcc/testsuite/g++.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000, 2007, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -33,6 +33,7 @@ dg-init
set tests [lsort [find $srcdir/$subdir *.C]]
set tests [prune $tests $srcdir/$subdir/bprob/*]
set tests [prune $tests $srcdir/$subdir/charset/*]
+set tests [prune $tests $srcdir/$subdir/cilk-plus/AN/*]
set tests [prune $tests $srcdir/$subdir/compat/*]
set tests [prune $tests $srcdir/$subdir/debug/*]
set tests [prune $tests $srcdir/$subdir/dfp/*]
@@ -48,8 +49,12 @@ set tests [prune $tests $srcdir/$subdir/tree-prof/*]
set tests [prune $tests $srcdir/$subdir/torture/*]
set tests [prune $tests $srcdir/$subdir/graphite/*]
set tests [prune $tests $srcdir/$subdir/tm/*]
+set tests [prune $tests $srcdir/$subdir/cilk-plus/*]
set tests [prune $tests $srcdir/$subdir/guality/*]
set tests [prune $tests $srcdir/$subdir/simulate-thread/*]
+set tests [prune $tests $srcdir/$subdir/asan/*]
+set tests [prune $tests $srcdir/$subdir/ubsan/*]
+set tests [prune $tests $srcdir/$subdir/tsan/*]
# Main loop.
g++-dg-runtest $tests $DEFAULT_CXXFLAGS
diff --git a/gcc/testsuite/g++.dg/diagnostic/method1.C b/gcc/testsuite/g++.dg/diagnostic/method1.C
index 4a781047ef..0e7c580924 100644
--- a/gcc/testsuite/g++.dg/diagnostic/method1.C
+++ b/gcc/testsuite/g++.dg/diagnostic/method1.C
@@ -10,7 +10,7 @@ template <class T>
void
bar ()
{
- A::foo ().anything; // { dg-error "request for member" }
+ A::foo ().anything; // { dg-error "without object" }
}
void
@@ -18,5 +18,3 @@ baz ()
{
bar <int> ();
}
-
-// { dg-prune-output "without object" }
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr58979.C b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
new file mode 100644
index 0000000000..6be3f14369
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/pr58979.C
@@ -0,0 +1,4 @@
+// PR c++/58979
+// { dg-do compile }
+
+int i = 0->*0; // { dg-error "invalid type argument of" }
diff --git a/gcc/testsuite/g++.dg/diagnostic/pr59838.C b/gcc/testsuite/g++.dg/diagnostic/pr59838.C
new file mode 100644
index 0000000000..d1cf2c7fa5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/pr59838.C
@@ -0,0 +1,4 @@
+// PR c++/59838
+// { dg-do compile }
+
+enum E { a, b = (E) a }; // { dg-error "conversion to incomplete type" }
diff --git a/gcc/testsuite/g++.dg/diagnostic/variadic1.C b/gcc/testsuite/g++.dg/diagnostic/variadic1.C
new file mode 100644
index 0000000000..69f1f988f3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/diagnostic/variadic1.C
@@ -0,0 +1,9 @@
+// PR c++/55241
+// { dg-do compile { target c++11 } }
+
+template<int N> struct B { };
+template<typename... T> struct A
+{
+ B<sizeof...(T)> f(); // { dg-error "sizeof\\.\\.\\." }
+ B<42> f(); // { dg-error "cannot be overloaded" }
+};
diff --git a/gcc/testsuite/g++.dg/eh/anon1.C b/gcc/testsuite/g++.dg/eh/anon1.C
new file mode 100644
index 0000000000..2a5ef4bc5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/anon1.C
@@ -0,0 +1,26 @@
+// Test that the anonymous namespace isn't mangled with random characters,
+// but also doesn't get mixed up with an anonymous namespace in another
+// translation unit.
+
+// { dg-do run }
+// { dg-additional-sources "anon1a.cc" }
+
+namespace {
+ struct A
+ {
+ virtual void f();
+ };
+
+ void A::f() { }
+}
+
+extern void g();
+
+int main()
+{
+ try {
+ try {
+ g();
+ } catch (A) { __builtin_abort(); }
+ } catch (...) { }
+}
diff --git a/gcc/testsuite/g++.dg/eh/anon1a.cc b/gcc/testsuite/g++.dg/eh/anon1a.cc
new file mode 100644
index 0000000000..ba161ac2b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/anon1a.cc
@@ -0,0 +1,10 @@
+namespace {
+ struct A
+ {
+ virtual void f();
+ };
+
+ void A::f() { }
+}
+
+void g() { throw A(); }
diff --git a/gcc/testsuite/g++.dg/eh/anon2.C b/gcc/testsuite/g++.dg/eh/anon2.C
new file mode 100644
index 0000000000..9ff9ee3ab7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/anon2.C
@@ -0,0 +1,24 @@
+// Test that the anonymous namespace isn't mangled with random characters,
+// but also doesn't get mixed up with an anonymous namespace in another
+// translation unit.
+// { dg-final { scan-assembler "\\*N12_GLOBAL__N_11AE" } }
+
+namespace {
+ struct A
+ {
+ virtual void f();
+ };
+
+ void A::f() { }
+}
+
+extern void g();
+
+int main()
+{
+ try {
+ try {
+ g();
+ } catch (A) { __builtin_abort(); }
+ } catch (...) { }
+}
diff --git a/gcc/testsuite/g++.dg/eh/ctor1.C b/gcc/testsuite/g++.dg/eh/ctor1.C
index 43b735f0b0..b959d1c562 100644
--- a/gcc/testsuite/g++.dg/eh/ctor1.C
+++ b/gcc/testsuite/g++.dg/eh/ctor1.C
@@ -5,6 +5,12 @@
// PR 411
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#define NOEXCEPT_FALSE noexcept (false)
+#else
+#define NOEXCEPT_FALSE
+#endif
+
bool was_f_in_Bar_destroyed=false;
struct Foo
@@ -17,7 +23,7 @@ struct Foo
struct Bar
{
- ~Bar()
+ ~Bar() NOEXCEPT_FALSE
{
throw 1;
}
diff --git a/gcc/testsuite/g++.dg/eh/dtor3.C b/gcc/testsuite/g++.dg/eh/dtor3.C
new file mode 100644
index 0000000000..3ce42d9f16
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/dtor3.C
@@ -0,0 +1,36 @@
+// Red Hat bug 750545
+// { dg-do run { target { ! c++11 } } }
+
+class excep {};
+class A
+{
+public:
+ ~A() { throw excep(); }
+};
+
+class B
+{
+ A a;
+};
+
+class C
+{
+ B b;
+};
+
+void f()
+{
+ C* c = new C();
+
+ try
+ {
+ delete c;
+ }
+ catch(...)
+ {}
+}
+
+int main()
+{
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/eh/goto2.C b/gcc/testsuite/g++.dg/eh/goto2.C
new file mode 100644
index 0000000000..de06d50b6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/goto2.C
@@ -0,0 +1,12 @@
+// PR c++/32080
+
+void f()
+try
+ {
+ goto l2; // { dg-error "from here" }
+ l1: ; // { dg-error "jump to label 'l1'" }
+ } catch (...)
+ {
+ l2: ; // { dg-error "jump to label 'l2'|enters catch block" }
+ goto l1; // { dg-error "from here|enters try block" }
+ }
diff --git a/gcc/testsuite/g++.dg/eh/init-temp1.C b/gcc/testsuite/g++.dg/eh/init-temp1.C
index 529014f497..4996cea230 100644
--- a/gcc/testsuite/g++.dg/eh/init-temp1.C
+++ b/gcc/testsuite/g++.dg/eh/init-temp1.C
@@ -1,6 +1,12 @@
// PR c++/15764
// { dg-do run }
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#define NOEXCEPT_FALSE noexcept (false)
+#else
+#define NOEXCEPT_FALSE
+#endif
+
extern "C" void abort ();
int thrown;
@@ -8,7 +14,7 @@ int thrown;
int as;
struct a {
a () { ++as; }
- ~a () { --as; if (thrown++ == 0) throw 42; }
+ ~a () NOEXCEPT_FALSE { --as; if (thrown++ == 0) throw 42; }
};
int f (a const&) { return 1; }
diff --git a/gcc/testsuite/g++.dg/eh/ppc64-sighandle-cr.C b/gcc/testsuite/g++.dg/eh/ppc64-sighandle-cr.C
new file mode 100644
index 0000000000..3256173607
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/ppc64-sighandle-cr.C
@@ -0,0 +1,54 @@
+// { dg-do run { target { powerpc64*-*-linux* } } }
+// { dg-options "-fexceptions -fnon-call-exceptions" }
+
+#include <signal.h>
+#include <stdlib.h>
+#include <fenv.h>
+
+#define SET_CR(R,V) __asm__ __volatile__ ("mtcrf %0,%1" : : "n" (1<<(7-R)), "r" (V<<(4*(7-R))) : "cr" #R)
+#define GET_CR(R) ({ int tmp; __asm__ __volatile__ ("mfcr %0" : "=r" (tmp)); (tmp >> 4*(7-R)) & 15; })
+
+void sighandler (int signo, siginfo_t * si, void * uc)
+{
+ SET_CR(2, 3);
+ SET_CR(3, 2);
+ SET_CR(4, 1);
+
+ throw 0;
+}
+
+float test (float a, float b) __attribute__ ((__noinline__));
+float test (float a, float b)
+{
+ float x;
+ asm ("mtcrf %1,%2" : "=f" (x) : "n" (1 << (7-3)), "r" (0), "0" (b) : "cr3");
+ return a / x;
+}
+
+int main ()
+{
+ struct sigaction sa;
+ int status;
+
+ sa.sa_sigaction = sighandler;
+ sa.sa_flags = SA_SIGINFO;
+
+ status = sigaction (SIGFPE, & sa, NULL);
+
+ feenableexcept (FE_DIVBYZERO);
+
+ SET_CR(2, 6);
+ SET_CR(3, 9);
+ SET_CR(4, 12);
+
+ try {
+ test (1, 0);
+ }
+ catch (...) {
+ return GET_CR(2) != 6 || GET_CR(3) != 9 || GET_CR(4) != 12;
+ }
+
+ return 1;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/eh/sighandle.C b/gcc/testsuite/g++.dg/eh/sighandle.C
new file mode 100644
index 0000000000..5c4995e767
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/sighandle.C
@@ -0,0 +1,38 @@
+// { dg-do run { target { *-*-aix5* i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } }
+// { dg-options "-fexceptions -fnon-call-exceptions" }
+
+#include <signal.h>
+#include <stdlib.h>
+
+void sighandler (int signo, siginfo_t * si, void * uc)
+{
+ throw (5);
+}
+
+char * dosegv ()
+{
+ * ((volatile int *)0) = 12;
+}
+
+int main ()
+{
+ struct sigaction sa;
+ int status;
+
+ sa.sa_sigaction = sighandler;
+ sa.sa_flags = SA_SIGINFO;
+
+ status = sigaction (SIGSEGV, & sa, NULL);
+ status = sigaction (SIGBUS, & sa, NULL);
+
+ try {
+ dosegv ();
+ }
+ catch (int x) {
+ return (x != 5);
+ }
+
+ return 1;
+}
+
+
diff --git a/gcc/testsuite/g++.dg/eh/spbp.C b/gcc/testsuite/g++.dg/eh/spbp.C
index a781622ef4..181e65d213 100644
--- a/gcc/testsuite/g++.dg/eh/spbp.C
+++ b/gcc/testsuite/g++.dg/eh/spbp.C
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-gdwarf-2" } */
-/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
+/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
/* This was a bug on x86-darwin, where the register numbering for SP
and BP was swapped (it's easy to do because on that port it's
diff --git a/gcc/testsuite/g++.dg/eh/uncaught1.C b/gcc/testsuite/g++.dg/eh/uncaught1.C
index afbf5af4d2..e96af334a8 100644
--- a/gcc/testsuite/g++.dg/eh/uncaught1.C
+++ b/gcc/testsuite/g++.dg/eh/uncaught1.C
@@ -13,7 +13,7 @@ struct Check {
static Check const data[] = {
{ 0, 0, false }, // construct [0]
- { 1, 0, true }, // [1] = [0]
+ { 1, 0, false }, // [1] = [0]
{ 0, 0, true }, // destruct [0]
{ 2, 1, true }, // [2] = [1]
{ 2, 2, true }, // destruct [2]
diff --git a/gcc/testsuite/g++.dg/eh/uncaught4.C b/gcc/testsuite/g++.dg/eh/uncaught4.C
new file mode 100644
index 0000000000..227d11b330
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/uncaught4.C
@@ -0,0 +1,29 @@
+// PR c++/41174
+// { dg-do run }
+
+#include <exception>
+
+#define assert(E) if (!(E)) __builtin_abort();
+
+struct e {
+ e()
+ {
+ assert( !std::uncaught_exception() );
+ try {
+ throw 1;
+ } catch (int i) {
+ assert( !std::uncaught_exception() );
+ throw;
+ }
+ }
+};
+
+int main()
+{
+ try {
+ throw e();
+ } catch (int i) {
+ assert( !std::uncaught_exception() );
+ }
+ assert( !std::uncaught_exception() );
+}
diff --git a/gcc/testsuite/g++.dg/eh/unwind-direct.C b/gcc/testsuite/g++.dg/eh/unwind-direct.C
new file mode 100644
index 0000000000..8d2cd77291
--- /dev/null
+++ b/gcc/testsuite/g++.dg/eh/unwind-direct.C
@@ -0,0 +1,15 @@
+// PR target/59788
+// { dg-do run { target { *-*-solaris2* && { ! gld } } } }
+// { dg-options "-Wl,-Bdirect" }
+
+#include <stdexcept>
+
+int
+main(void)
+{
+ try
+ { throw std::runtime_error( "Catch me if you can!"); }
+ catch(...)
+ { return 0; }
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/expr/bitfield12.C b/gcc/testsuite/g++.dg/expr/bitfield12.C
new file mode 100644
index 0000000000..3ae88ca191
--- /dev/null
+++ b/gcc/testsuite/g++.dg/expr/bitfield12.C
@@ -0,0 +1,19 @@
+// PR c++/19618
+
+struct bset1 {
+ bool bit : sizeof(bool) * __CHAR_BIT__ + 1; // { dg-warning "exceeds" }
+};
+
+enum E {};
+
+struct bset2 {
+ E bit : sizeof(E) * __CHAR_BIT__ + 1; // { dg-warning "exceeds" }
+};
+
+struct bset3 {
+ bool bit : sizeof(bool) * __CHAR_BIT__;
+};
+
+struct bset4 {
+ E bit : sizeof(E) * __CHAR_BIT__;
+};
diff --git a/gcc/testsuite/g++.dg/expr/cast2.C b/gcc/testsuite/g++.dg/expr/cast2.C
index 1ccda2b480..f3c18d5fee 100644
--- a/gcc/testsuite/g++.dg/expr/cast2.C
+++ b/gcc/testsuite/g++.dg/expr/cast2.C
@@ -1,5 +1,5 @@
void (*p)();
void f() {
- (void *)p; // { dg-warning "forbids cast" }
+ (void *)p;
}
diff --git a/gcc/testsuite/g++.dg/expr/cond12.C b/gcc/testsuite/g++.dg/expr/cond12.C
new file mode 100644
index 0000000000..9134f81668
--- /dev/null
+++ b/gcc/testsuite/g++.dg/expr/cond12.C
@@ -0,0 +1,12 @@
+// PR c++/58714
+// { dg-do run }
+
+struct X {
+ X& operator=(const X&){}
+ X& operator=(X&){__builtin_abort();}
+};
+
+int main(int argv,char**) {
+ X a, b;
+ ((argv > 2) ? a : b) = X();
+}
diff --git a/gcc/testsuite/g++.dg/expr/cond8.C b/gcc/testsuite/g++.dg/expr/cond8.C
index 11708ec0f6..3e089537ff 100644
--- a/gcc/testsuite/g++.dg/expr/cond8.C
+++ b/gcc/testsuite/g++.dg/expr/cond8.C
@@ -3,7 +3,7 @@
struct A
{
- A(void*); // { dg-error "initializing" }
+ A(void*); // { dg-message "initializing" }
~A();
};
diff --git a/gcc/testsuite/g++.dg/expr/const1.C b/gcc/testsuite/g++.dg/expr/const1.C
new file mode 100644
index 0000000000..9371b27b28
--- /dev/null
+++ b/gcc/testsuite/g++.dg/expr/const1.C
@@ -0,0 +1,9 @@
+// PR c++/57551
+
+extern unsigned long ADDR;
+
+unsigned long f(){
+ const unsigned long* const var=&ADDR;
+ const unsigned long retval=var[1];
+ return retval;
+}
diff --git a/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C b/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C
index e83fe44127..06e93416f2 100644
--- a/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C
+++ b/gcc/testsuite/g++.dg/ext/alias-decl-attr1.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template <unsigned Len, unsigned Align>
struct aligned_storage
diff --git a/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C b/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C
index 83e557c43f..6437212fb1 100644
--- a/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C
+++ b/gcc/testsuite/g++.dg/ext/alias-decl-attr2.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T>
struct X {
diff --git a/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C b/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C
index 369aa10e65..e11178ab83 100644
--- a/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C
+++ b/gcc/testsuite/g++.dg/ext/alias-decl-attr3.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
template <class T>
int
diff --git a/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C b/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C
index 3e1c1c405d..9bafc42342 100644
--- a/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C
+++ b/gcc/testsuite/g++.dg/ext/alias-decl-attr4.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=c++0x" }
-// { dg-do run }
+// { dg-do run { target c++11 } }
using global_vector_type __attribute__((vector_size(16))) = float;
diff --git a/gcc/testsuite/g++.dg/ext/altivec-2.C b/gcc/testsuite/g++.dg/ext/altivec-2.C
index eb8a92942b..e14e6f800f 100644
--- a/gcc/testsuite/g++.dg/ext/altivec-2.C
+++ b/gcc/testsuite/g++.dg/ext/altivec-2.C
@@ -1,6 +1,6 @@
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable" } */
+/* { dg-options "-maltivec -Wall -Wno-unused-but-set-variable -Wno-deprecated" } */
/* This test checks if AltiVec builtins accept const-qualified
arguments. */
diff --git a/gcc/testsuite/g++.dg/ext/altivec-7.C b/gcc/testsuite/g++.dg/ext/altivec-7.C
index 7c458fb003..038335433f 100644
--- a/gcc/testsuite/g++.dg/ext/altivec-7.C
+++ b/gcc/testsuite/g++.dg/ext/altivec-7.C
@@ -20,17 +20,17 @@ void foo(int) { }
void foo(unsigned int) { }
void foo(float) { }
-/* { dg-final { scan-assembler "_Z3fooU8__vectorh" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectora" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__boolc" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectort" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectors" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__bools" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorj" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectori" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorU6__booli" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectorf" } } */
-/* { dg-final { scan-assembler "_Z3fooU8__vectoru7__pixel" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_h" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_a" } } */
+/* { dg-final { scan-assembler "_Z3fooDv16_U6__boolc" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_t" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_s" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_U6__bools" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_j" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_i" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_U6__booli" } } */
+/* { dg-final { scan-assembler "_Z3fooDv4_f" } } */
+/* { dg-final { scan-assembler "_Z3fooDv8_u7__pixel" } } */
/* { dg-final { scan-assembler "_Z3fooi" } } */
/* { dg-final { scan-assembler "_Z3fooj" } } */
/* { dg-final { scan-assembler "_Z3foof" } } */
diff --git a/gcc/testsuite/g++.dg/ext/anon-struct4.C b/gcc/testsuite/g++.dg/ext/anon-struct4.C
index 5d0bf71ae6..0097ba1244 100644
--- a/gcc/testsuite/g++.dg/ext/anon-struct4.C
+++ b/gcc/testsuite/g++.dg/ext/anon-struct4.C
@@ -1,5 +1,5 @@
// PR c++/14401
-struct { struct { int& i ; } bar ; } foo ; // { dg-error "uninitialized" "uninit" }
-// { dg-warning "anonymous" "anon" { target c++98 } 3 }
-// { dg-message "should be initialized" "ref-uninit" { target *-*-* } 3 }
+struct { struct { int& i ; } bar ; } foo ; // { dg-error "deleted|uninitialized" "uninit" }
+// { dg-warning "anonymous" "anon" { target { ! c++11 } } 3 }
+// { dg-message "should be initialized" "ref-uninit" { target { ! c++11 } } 3 }
diff --git a/gcc/testsuite/g++.dg/ext/anon-struct5.C b/gcc/testsuite/g++.dg/ext/anon-struct5.C
index 8b697ccbca..ec022251cb 100644
--- a/gcc/testsuite/g++.dg/ext/anon-struct5.C
+++ b/gcc/testsuite/g++.dg/ext/anon-struct5.C
@@ -2,12 +2,12 @@
struct A
{
- struct { static int i; }; // { dg-error "prohibits anonymous structs|an anonymous struct" }
+ struct { static int i; }; // { dg-error "prohibits anonymous structs|an anonymous struct|unnamed class" }
void foo() { i; }
};
struct B
{
- union { static int i; }; // { dg-error "an anonymous union|member of a union" }
+ union { static int i; }; // { dg-error "an anonymous union|member of a union|unnamed class" }
void foo() { i; }
};
diff --git a/gcc/testsuite/g++.dg/ext/anon-struct6.C b/gcc/testsuite/g++.dg/ext/anon-struct6.C
index 11a7bbd607..66d4b32719 100644
--- a/gcc/testsuite/g++.dg/ext/anon-struct6.C
+++ b/gcc/testsuite/g++.dg/ext/anon-struct6.C
@@ -4,7 +4,7 @@ struct A
{
struct
{ // { dg-error "anonymous struct cannot have function members" }
- struct { static int i; }; // { dg-error "prohibits anonymous structs|non-static data members" }
+ struct { static int i; }; // { dg-error "prohibits anonymous structs|non-static data members|unnamed class" }
void foo() { i; }
}; // { dg-error "prohibits anonymous structs" }
};
diff --git a/gcc/testsuite/g++.dg/ext/asm12.C b/gcc/testsuite/g++.dg/ext/asm12.C
new file mode 100644
index 0000000000..9823a8fd7e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/asm12.C
@@ -0,0 +1,14 @@
+// PR c++/55619
+// { dg-do compile }
+
+typedef int V __attribute__ ((vector_size (4 * sizeof (int))));
+
+static const V C = { 0x201, 0, 0, 0 };
+static const int D = 0x201;
+
+void
+f ()
+{
+ __asm volatile ("" : : "m" (C));
+ __asm volatile ("" : : "m" (D));
+}
diff --git a/gcc/testsuite/g++.dg/ext/attr-alias-3.C b/gcc/testsuite/g++.dg/ext/attr-alias-3.C
new file mode 100644
index 0000000000..7f6aa2cbc3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attr-alias-3.C
@@ -0,0 +1,8 @@
+// PR c++/56134
+// { dg-require-alias "" }
+
+char a;
+class Q
+{
+ static char q __attribute__ ((alias ("a")));
+};
diff --git a/gcc/testsuite/g++.dg/ext/attrib32.C b/gcc/testsuite/g++.dg/ext/attrib32.C
index e4dfe4e9f6..31a92b8f45 100644
--- a/gcc/testsuite/g++.dg/ext/attrib32.C
+++ b/gcc/testsuite/g++.dg/ext/attrib32.C
@@ -12,7 +12,7 @@ void bar()
typedef union U1 { int i; } U2 __attribute__((transparent_union)); // { dg-warning "ignored" }
-static void foo2(U1) {} // { dg-error "previously defined" }
+static void foo2(U1) {} // { dg-message "previously defined" }
static void foo2(U2) {} // { dg-error "redefinition" }
void bar2(U1 u1, U2 u2)
diff --git a/gcc/testsuite/g++.dg/ext/attrib46.C b/gcc/testsuite/g++.dg/ext/attrib46.C
new file mode 100644
index 0000000000..1c71990fc5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib46.C
@@ -0,0 +1,4 @@
+// PR c++/40821
+
+struct __attribute__((aligned(8)) S1 { int i; }; // { dg-error "expected" }
+struct __attribute__( aligned(8) S2 { int i; }; // { dg-error "expected" }
diff --git a/gcc/testsuite/g++.dg/ext/attrib47.C b/gcc/testsuite/g++.dg/ext/attrib47.C
new file mode 100644
index 0000000000..22f49084bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib47.C
@@ -0,0 +1,21 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+class A
+{
+ public:
+ template <class T>
+ T foo(T a) __attribute__ ((noinline));
+};
+
+template <class T>
+ T A::foo(T a)
+ {
+ return a+1;
+ }
+
+int bar(A a) {
+ return a.foo(1);
+}
+
+// { dg-final { scan-assembler "_ZN1A3fooIiEET_S1_" } }
diff --git a/gcc/testsuite/g++.dg/ext/attrib48.C b/gcc/testsuite/g++.dg/ext/attrib48.C
new file mode 100644
index 0000000000..19a9959109
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/attrib48.C
@@ -0,0 +1,6 @@
+// PR c++/54652
+
+typedef unsigned L __attribute__ ((aligned));
+typedef unsigned L __attribute__ ((aligned));
+
+L l;
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-1.C b/gcc/testsuite/g++.dg/ext/attribute-test-1.C
index 7df68930fc..93e08d7ef8 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-1.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-1.C
@@ -36,3 +36,4 @@ int main()
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*GCC vector returned by reference.*" } */
+/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-2.C b/gcc/testsuite/g++.dg/ext/attribute-test-2.C
index 187067318f..d7c417dcca 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-2.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-2.C
@@ -50,3 +50,4 @@ int main()
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*GCC vector returned by reference.*" } */
+/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-3.C b/gcc/testsuite/g++.dg/ext/attribute-test-3.C
index 050cbb4ed3..4b0939ea3a 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-3.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-3.C
@@ -52,3 +52,4 @@ int main() {
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*GCC vector returned by reference.*" } */
+/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/attribute-test-4.C b/gcc/testsuite/g++.dg/ext/attribute-test-4.C
index 4783ee8a40..c3e949a9bd 100644
--- a/gcc/testsuite/g++.dg/ext/attribute-test-4.C
+++ b/gcc/testsuite/g++.dg/ext/attribute-test-4.C
@@ -49,3 +49,4 @@ int main() {
/* Ignore a warning that is irrelevant to the purpose of this test. */
/* { dg-prune-output ".*GCC vector returned by reference.*" } */
+/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/g++.dg/ext/bases.C b/gcc/testsuite/g++.dg/ext/bases.C
index 0582f72eb8..43f71925dc 100644
--- a/gcc/testsuite/g++.dg/ext/bases.C
+++ b/gcc/testsuite/g++.dg/ext/bases.C
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x -w" }
-// { dg-do run }
+// { dg-options "-w" }
+// { dg-do run { target c++11 } }
#include<typeinfo>
#include<cassert>
diff --git a/gcc/testsuite/g++.dg/ext/builtin-bswap1.C b/gcc/testsuite/g++.dg/ext/builtin-bswap1.C
new file mode 100644
index 0000000000..787ecba43a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin-bswap1.C
@@ -0,0 +1,22 @@
+// PR c/37743
+// { dg-do compile }
+
+#if defined(__UINT32_TYPE__) && defined(__INT32_TYPE__)
+
+void foo (__UINT32_TYPE__);
+void foo (__INT32_TYPE__);
+
+void
+bar (__UINT32_TYPE__ x)
+{
+ foo (__builtin_bswap32 (x));
+}
+
+#else
+
+void
+bar ()
+{
+}
+
+#endif
diff --git a/gcc/testsuite/g++.dg/ext/builtin-line1.C b/gcc/testsuite/g++.dg/ext/builtin-line1.C
new file mode 100644
index 0000000000..21a4f59a46
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin-line1.C
@@ -0,0 +1,17 @@
+// __builtin_LINE gets the location where the default argument is expanded.
+// { dg-do run }
+
+#include <cassert>
+struct Foo
+{
+ int line;
+ Foo( int line = __builtin_LINE() )
+ : line( line )
+ {}
+};
+
+int main()
+{
+ assert (Foo().line == __LINE__);
+ assert ((new Foo)->line == __LINE__);
+}
diff --git a/gcc/testsuite/g++.dg/ext/builtin-offsetof1.C b/gcc/testsuite/g++.dg/ext/builtin-offsetof1.C
new file mode 100644
index 0000000000..5c5e9cf246
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin-offsetof1.C
@@ -0,0 +1,9 @@
+// PR c++/51413
+// { dg-options "-w" }
+
+struct A
+{
+ static void foo();
+};
+
+int i = __builtin_offsetof(A, foo[1]); // { dg-error "neither a single identifier nor a sequence of member accesses and array references" }
diff --git a/gcc/testsuite/g++.dg/ext/builtin30.C b/gcc/testsuite/g++.dg/ext/builtin30.C
new file mode 100644
index 0000000000..d0a75fb173
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/builtin30.C
@@ -0,0 +1,27 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" {
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+}
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+// { dg-final { scan-assembler "mysnprintf" } }
+// { dg-final { scan-assembler-not "__chk_fail" } }
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-1.C b/gcc/testsuite/g++.dg/ext/cleanup-1.C
index 8e83537549..7cf14c9981 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-1.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-1.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wall" } */
+/* { dg-options "-Wall -ftrack-macro-expansion=0" } */
/* Validate expected warnings and errors. */
#define U __attribute__((unused))
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-10.C b/gcc/testsuite/g++.dg/ext/cleanup-10.C
index eeb607b298..66c7b76bb6 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-10.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-10.C
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal frames
on alternate stack. */
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-11.C b/gcc/testsuite/g++.dg/ext/cleanup-11.C
index 0b6d11ce26..6e96521412 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-11.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-11.C
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime signal
frames on alternate stack. */
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-8.C b/gcc/testsuite/g++.dg/ext/cleanup-8.C
index be66768489..ccf9bef681 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-8.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-8.C
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal
frames. */
diff --git a/gcc/testsuite/g++.dg/ext/cleanup-9.C b/gcc/testsuite/g++.dg/ext/cleanup-9.C
index 87f8283998..dcdfcae0da 100644
--- a/gcc/testsuite/g++.dg/ext/cleanup-9.C
+++ b/gcc/testsuite/g++.dg/ext/cleanup-9.C
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime
signal frames. */
diff --git a/gcc/testsuite/g++.dg/ext/complex8.C b/gcc/testsuite/g++.dg/ext/complex8.C
index 9b8ac1b186..4d79cc645d 100644
--- a/gcc/testsuite/g++.dg/ext/complex8.C
+++ b/gcc/testsuite/g++.dg/ext/complex8.C
@@ -1,6 +1,5 @@
// PR libstdc++/48760
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
constexpr _Complex int i{1,2};
constexpr _Complex int j{3};
diff --git a/gcc/testsuite/g++.dg/ext/complit13.C b/gcc/testsuite/g++.dg/ext/complit13.C
new file mode 100644
index 0000000000..c12678ba86
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/complit13.C
@@ -0,0 +1,11 @@
+// PR c++/10207
+// { dg-options "" }
+
+typedef struct { } EmptyStruct;
+typedef struct { EmptyStruct Empty; } DemoStruct;
+
+void Func()
+{
+ DemoStruct Demo;
+ Demo.Empty = (EmptyStruct) {};
+}
diff --git a/gcc/testsuite/g++.dg/ext/complit14.C b/gcc/testsuite/g++.dg/ext/complit14.C
new file mode 100644
index 0000000000..aed765dc55
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/complit14.C
@@ -0,0 +1,11 @@
+// PR c++/61614
+// { dg-options "" }
+
+int Fn (...);
+
+void
+Test ()
+{
+ int j = Fn ((const int[]) { 0 }); // OK
+ unsigned long sz = sizeof Fn ((const int[]) { 0 }); // Error
+}
diff --git a/gcc/testsuite/g++.dg/ext/desig5.C b/gcc/testsuite/g++.dg/ext/desig5.C
new file mode 100644
index 0000000000..48cce3183b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/desig5.C
@@ -0,0 +1,7 @@
+// PR c++/55951
+
+enum { A };
+
+static const char *a[] = {
+ [A] = "a"
+};
diff --git a/gcc/testsuite/g++.dg/ext/desig6.C b/gcc/testsuite/g++.dg/ext/desig6.C
new file mode 100644
index 0000000000..f71d6eeecd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/desig6.C
@@ -0,0 +1,18 @@
+// PR c++/57041
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+template<typename T>
+union u {
+ T a;
+ char b;
+};
+
+template<typename T>
+u<T> make_u(T t) {
+ return { .a = t };
+}
+
+int main() {
+ return make_u<int>(1).a;
+}
diff --git a/gcc/testsuite/g++.dg/ext/flexary3.C b/gcc/testsuite/g++.dg/ext/flexary3.C
new file mode 100644
index 0000000000..906877b11b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/flexary3.C
@@ -0,0 +1,10 @@
+// PR c++/54441
+// { dg-options "" }
+
+struct s { char c[]; };
+
+int main()
+{
+ struct s s = { .c = 0 }; // { dg-error "initializer" }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C b/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C
index d9e2660955..7e84fa773e 100644
--- a/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C
+++ b/gcc/testsuite/g++.dg/ext/gnu-inline-global-reject.C
@@ -4,53 +4,53 @@
*/
/* { dg-do compile } */
-/* { dg-options " -ansi -Wno-long-long" } */
+/* { dg-options " -ansi -Wno-long-long -ftrack-macro-expansion=0" } */
#include "gnu-inline-common.h"
#undef fn
#define fn pfx(func_decl_inline_before)
-decl(inline, fn) // { dg-error "previous" "" }
+decl(inline, fn) // { dg-message "previous" "" }
gnuindef(fn, 0) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_decl_inline_after)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
decl(inline, fn) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_def_gnuin_redef)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_inline_redef)
-def(inline, fn, 0) // { dg-error "previous" "" }
+def(inline, fn, 0) // { dg-message "previous" "" }
def(inline, fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_inline_after)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
def(inline, fn, 1) // { dg-error "redeclare" "" }
#undef fn
#define fn pfx(func_def_inline_before)
-def(inline, fn, 0) // { dg-error "previous" "" }
+def(inline, fn, 0) // { dg-message "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_def_before)
-def(, fn, 0) // { dg-error "previous" "" }
+def(, fn, 0) // { dg-message "previous" "" }
gnuindef(fn, 1) // { dg-error "redefinition" "" }
#undef fn
#define fn pfx(func_decl_static_inline_before)
-decl(static inline, fn) // { dg-error "previous" "" }
+decl(static inline, fn) // { dg-message "previous" "" }
gnuindef(fn, 0) // { dg-error "redeclared" "" }
#undef fn
#define fn pfx(func_def_static_inline_after)
decl(static, fn)
-gnuindef(fn, 0) // { dg-error "previous" "" }
+gnuindef(fn, 0) // { dg-message "previous" "" }
decl(static, fn)
def(static inline, fn, 1) // { dg-error "redeclare" "" }
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C
index 9191c3e97f..8123fe93d1 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_constructor-2.C
@@ -1,5 +1,5 @@
// PR c++/55842
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template <class=void> struct number {
number() noexcept(noexcept(0)) { }
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
index e0ecef44a2..10891b6b59 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-7.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
struct S {
diff --git a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
index e1be1a0a77..b6862298d3 100644
--- a/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
+++ b/gcc/testsuite/g++.dg/ext/has_nothrow_copy-8.C
@@ -1,5 +1,5 @@
// PR c++/56268
-// { dg-options -std=c++11 }
+// { dg-do compile { target c++11 } }
template <class T>
struct A {
diff --git a/gcc/testsuite/g++.dg/ext/int128-3.C b/gcc/testsuite/g++.dg/ext/int128-3.C
new file mode 100644
index 0000000000..f62b62d106
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/int128-3.C
@@ -0,0 +1,12 @@
+// Test for int128 enums.
+// { dg-do compile { target int128 } }
+// { dg-options "" }
+
+enum E {
+ e1 = 0xffffffffffffffff,
+ e2, e3
+} e = e3;
+
+#define SA(I,X) int a##I[(X)? 1 : -1]
+
+SA(1, sizeof(E) == sizeof(__int128));
diff --git a/gcc/testsuite/g++.dg/ext/int128-4.C b/gcc/testsuite/g++.dg/ext/int128-4.C
new file mode 100644
index 0000000000..7e5a5020ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/int128-4.C
@@ -0,0 +1,20 @@
+// Test for int128 arithmetic conversions.
+// { dg-do compile { target int128 } }
+// { dg-require-effective-target c++11 }
+// { dg-options "" }
+
+template <class T, class U> struct same;
+template <class T> struct same<T,T> { };
+#define assert_same(T,U) (same<T,U>())
+
+int main()
+{
+ long long ll;
+ unsigned long long ull;
+ __int128 i8;
+ unsigned __int128 u8;
+ assert_same (decltype (ll+i8), __int128);
+ assert_same (decltype (ull+i8), __int128);
+ assert_same (decltype (ll+u8), unsigned __int128);
+ assert_same (decltype (ull+u8), unsigned __int128);
+}
diff --git a/gcc/testsuite/g++.dg/ext/is_base_of_incomplete-2.C b/gcc/testsuite/g++.dg/ext/is_base_of_incomplete-2.C
new file mode 100644
index 0000000000..54862585d0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/is_base_of_incomplete-2.C
@@ -0,0 +1,5 @@
+struct T;
+
+int check1[__is_base_of(T, T) ? 1 : -1];
+int check2[__is_base_of(T, const T) ? 1 : -1];
+int check3[__is_base_of(volatile T, T) ? 1 : -1];
diff --git a/gcc/testsuite/g++.dg/ext/is_empty2.C b/gcc/testsuite/g++.dg/ext/is_empty2.C
new file mode 100644
index 0000000000..d1bf64c0a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/is_empty2.C
@@ -0,0 +1,11 @@
+// PR c++/36797
+
+template <int> struct A { };
+
+template <class T>
+int foo (A<__is_empty (T)>* = 0); // { dg-error "built-in trait" }
+
+int main ()
+{
+ foo<int>();
+}
diff --git a/gcc/testsuite/g++.dg/ext/is_final.C b/gcc/testsuite/g++.dg/ext/is_final.C
index 7833f3a101..b3875ad04a 100644
--- a/gcc/testsuite/g++.dg/ext/is_final.C
+++ b/gcc/testsuite/g++.dg/ext/is_final.C
@@ -1,6 +1,5 @@
// PR c++/51365
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A { };
static_assert( ! __is_final (A), "A not final" );
diff --git a/gcc/testsuite/g++.dg/ext/is_literal_type1.C b/gcc/testsuite/g++.dg/ext/is_literal_type1.C
index 21570d2d6e..b146bdee9f 100644
--- a/gcc/testsuite/g++.dg/ext/is_literal_type1.C
+++ b/gcc/testsuite/g++.dg/ext/is_literal_type1.C
@@ -1,6 +1,5 @@
// PR c++/48771
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct NonLiteral {
NonLiteral();
diff --git a/gcc/testsuite/g++.dg/ext/is_pod.C b/gcc/testsuite/g++.dg/ext/is_pod.C
index 939665d8d3..d073889c83 100644
--- a/gcc/testsuite/g++.dg/ext/is_pod.C
+++ b/gcc/testsuite/g++.dg/ext/is_pod.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
struct A
diff --git a/gcc/testsuite/g++.dg/ext/ivdep-1.C b/gcc/testsuite/g++.dg/ext/ivdep-1.C
new file mode 100644
index 0000000000..751154deba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/ivdep-1.C
@@ -0,0 +1,18 @@
+// PR c++/60267
+// { dg-do compile }
+// { dg-options "-O3" }
+
+template <int N>
+void
+foo (int *a, int *b, int *c)
+{
+#pragma GCC ivdep
+ for (int i = 0; i < N; i++)
+ a[i] = b[i] * c[i];
+}
+
+void
+bar (int *a, int *b, int *c)
+{
+ foo <64> (a, b, c);
+}
diff --git a/gcc/testsuite/g++.dg/ext/label13.C b/gcc/testsuite/g++.dg/ext/label13.C
index db349b5cbf..0887d46a2f 100644
--- a/gcc/testsuite/g++.dg/ext/label13.C
+++ b/gcc/testsuite/g++.dg/ext/label13.C
@@ -8,7 +8,7 @@ struct C
C();
};
-C::C() // { dg-bogus "can never be copied" "" { xfail { { *-apple-darwin* alpha*-dec-osf* } || { hppa*-*-hpux* && { ! lp64 } } } } }
+C::C() // { dg-bogus "can never be copied" "" }
{
static void *labelref = &&label;
goto *labelref;
diff --git a/gcc/testsuite/g++.dg/ext/label13a.C b/gcc/testsuite/g++.dg/ext/label13a.C
new file mode 100644
index 0000000000..3be8e31148
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/label13a.C
@@ -0,0 +1,25 @@
+// PR c++/41090
+// { dg-do run }
+// { dg-options "-save-temps" }
+// { dg-final { scan-assembler "_ZN1CC4Ev" } }
+// { dg-final cleanup-saved-temps }
+
+int i;
+struct A { A() {} };
+struct C: virtual A
+{
+ C();
+};
+
+C::C()
+{
+ static void *labelref = &&label;
+ goto *labelref;
+ label: i = 1;
+}
+
+int main()
+{
+ C c;
+ return (i != 1);
+}
diff --git a/gcc/testsuite/g++.dg/ext/label14.C b/gcc/testsuite/g++.dg/ext/label14.C
new file mode 100644
index 0000000000..d1a8b0d529
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/label14.C
@@ -0,0 +1,17 @@
+// PR c++/53812
+// { dg-do compile }
+// { dg-options "" }
+
+struct T { T () : t(0) {}; int t; ~T (); };
+struct S { void *operator [] (T); };
+void bar (S &, void *, void *);
+
+void
+foo (S &x, T &y)
+{
+ bar (x, &&l1, &&l2);
+l1:
+ goto *x[y];
+l2:
+ bar (x, &&l1, &&l2);
+}
diff --git a/gcc/testsuite/g++.dg/ext/label5.C b/gcc/testsuite/g++.dg/ext/label5.C
index fc611cd415..34ca90d87b 100644
--- a/gcc/testsuite/g++.dg/ext/label5.C
+++ b/gcc/testsuite/g++.dg/ext/label5.C
@@ -2,5 +2,5 @@
// PR c++/24052
struct A { };
-int main() { b: A() && && b; } // { dg-error "A\\(\\) && && *b" }
+int main() { b: A() && && b; } // { dg-error "operand types are 'A' and 'void\\*'" }
// { dg-message "candidate|operator&&|no known conversion" "additional" { target *-*-* } 5 }
diff --git a/gcc/testsuite/g++.dg/ext/mv1.C b/gcc/testsuite/g++.dg/ext/mv1.C
new file mode 100644
index 0000000000..4eedbff7b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv1.C
@@ -0,0 +1,132 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2 -fPIC" } */
+
+#include <assert.h>
+
+/* Default version. */
+int foo (); // Extra declaration that is merged with the second one.
+int foo () __attribute__ ((target("default")));
+/* The other versions of foo. Mix up the ordering and
+ check if the dispatching does it in the order of priority. */
+/* Check combination of target attributes. */
+int foo () __attribute__ ((target("arch=corei7,popcnt")));
+/* The target operands in this declaration and the definition are re-ordered.
+ This should still work. */
+int foo () __attribute__ ((target("ssse3,avx2")));
+
+/* Check for all target attributes for which dispatchers are available. */
+/* Check arch= */
+int foo () __attribute__((target("arch=core2")));
+int foo () __attribute__((target("arch=corei7")));
+int foo () __attribute__((target("arch=atom")));
+/* Check ISAs */
+int foo () __attribute__((target("avx")));
+int foo () __attribute__ ((target("arch=core2,sse4.2")));
+/* Check more arch=. */
+int foo () __attribute__((target("arch=amdfam10")));
+int foo () __attribute__((target("arch=bdver1")));
+int foo () __attribute__((target("arch=bdver2")));
+
+int (*p)() = &foo;
+int main ()
+{
+ int val = foo ();
+ assert (val == (*p)());
+
+ /* Check in the exact same order in which the dispatching
+ is expected to happen. */
+ if (__builtin_cpu_is ("bdver1"))
+ assert (val == 1);
+ else if (__builtin_cpu_is ("bdver2"))
+ assert (val == 2);
+ else if (__builtin_cpu_supports ("avx2")
+ && __builtin_cpu_supports ("ssse3"))
+ assert (val == 3);
+ else if (__builtin_cpu_supports ("avx"))
+ assert (val == 4);
+ else if (__builtin_cpu_is ("corei7")
+ && __builtin_cpu_supports ("popcnt"))
+ assert (val == 5);
+ else if (__builtin_cpu_is ("corei7"))
+ assert (val == 6);
+ else if (__builtin_cpu_is ("amdfam10h"))
+ assert (val == 7);
+ else if (__builtin_cpu_is ("core2")
+ && __builtin_cpu_supports ("sse4.2"))
+ assert (val == 8);
+ else if (__builtin_cpu_is ("core2"))
+ assert (val == 9);
+ else if (__builtin_cpu_is ("atom"))
+ assert (val == 10);
+ else
+ assert (val == 0);
+
+ return 0;
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("arch=corei7,popcnt")))
+foo ()
+{
+ return 5;
+}
+int __attribute__ ((target("avx2,ssse3")))
+foo ()
+{
+ return 3;
+}
+
+int __attribute__ ((target("arch=core2")))
+foo ()
+{
+ return 9;
+}
+
+int __attribute__ ((target("arch=corei7")))
+foo ()
+{
+ return 6;
+}
+
+int __attribute__ ((target("arch=atom")))
+foo ()
+{
+ return 10;
+}
+
+int __attribute__ ((target("avx")))
+foo ()
+{
+ return 4;
+}
+
+int __attribute__ ((target("arch=core2,sse4.2")))
+foo ()
+{
+ return 8;
+}
+
+int __attribute__ ((target("arch=amdfam10")))
+foo ()
+{
+ return 7;
+}
+
+int __attribute__ ((target("arch=bdver1")))
+foo ()
+{
+ return 1;
+}
+
+int __attribute__ ((target("arch=bdver2")))
+foo ()
+{
+ return 2;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv10.C b/gcc/testsuite/g++.dg/ext/mv10.C
new file mode 100644
index 0000000000..5dfe36372c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv10.C
@@ -0,0 +1,12 @@
+// { dg-do assemble { target i?86-*-* x86_64-*-* } }
+// { dg-options "" }
+
+__attribute__((target ("popcnt"), used))
+void foo (void)
+{
+}
+
+__attribute__((target ("popcnt","avx"), used))
+void foo (void)
+{
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv11.C b/gcc/testsuite/g++.dg/ext/mv11.C
new file mode 100644
index 0000000000..1f5c576f0a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv11.C
@@ -0,0 +1,23 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "-msse2" }
+
+int foo () __attribute__ ((target("default")));
+int foo () __attribute__ ((target("sse2")));
+
+int
+main ()
+{
+ return foo ();
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("sse2")))
+foo ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv12-aux.cc b/gcc/testsuite/g++.dg/ext/mv12-aux.cc
new file mode 100644
index 0000000000..611c679bbc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv12-aux.cc
@@ -0,0 +1,10 @@
+// Test case to check if multiversioning works as expected when the versions
+// are defined in different files. Auxiliary file for mv12.C.
+
+#include "mv12.h"
+
+__attribute__ ((target ("sse4.2")))
+int foo ()
+{
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv12.C b/gcc/testsuite/g++.dg/ext/mv12.C
new file mode 100644
index 0000000000..8b2e423404
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv12.C
@@ -0,0 +1,22 @@
+// Test case to check if multiversioning works as expected when the versions
+// are defined in different files.
+
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-ifunc "" }
+// { dg-options "-O2" }
+// { dg-additional-sources "mv12-aux.cc" }
+
+#include "mv12.h"
+
+int main ()
+{
+ if (__builtin_cpu_supports ("sse4.2"))
+ return foo () - 1;
+ return foo ();
+}
+
+__attribute__ ((target ("default")))
+int foo ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv12.h b/gcc/testsuite/g++.dg/ext/mv12.h
new file mode 100644
index 0000000000..650358d835
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv12.h
@@ -0,0 +1,4 @@
+// Header file used by mv12.C and mv12-aux.cc.
+
+int foo () __attribute__ ((target ("default")));
+int foo () __attribute__ ((target ("sse4.2")));
diff --git a/gcc/testsuite/g++.dg/ext/mv13.C b/gcc/testsuite/g++.dg/ext/mv13.C
new file mode 100644
index 0000000000..5674d19c97
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv13.C
@@ -0,0 +1,18 @@
+// Test case to check if multiversioning functions that are extern "C"
+// generates errors.
+
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+
+extern "C"
+__attribute__ ((target ("default")))
+int foo () // { dg-message "previously defined here" }
+{
+ return 0;
+}
+
+extern "C"
+__attribute__ ((target ("sse4.2")))
+int foo () // { dg-error "redefinition" }
+{
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv14.C b/gcc/testsuite/g++.dg/ext/mv14.C
new file mode 100644
index 0000000000..e36e08d50c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv14.C
@@ -0,0 +1,40 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2 -fPIC" } */
+
+#include <assert.h>
+
+/* Default version. */
+int foo (); // Extra declaration that is merged with the second one.
+int foo () __attribute__ ((target("default")));
+
+int foo () __attribute__ ((target("arch=corei7")));
+
+int (*p)() = &foo;
+int main ()
+{
+ int val = foo ();
+ assert (val == (*p)());
+
+ /* Check in the exact same order in which the dispatching
+ is expected to happen. */
+ if (__builtin_cpu_is ("corei7"))
+ assert (val == 5);
+ else
+ assert (val == 0);
+
+ return 0;
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("arch=corei7")))
+foo ()
+{
+ return 5;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv15.C b/gcc/testsuite/g++.dg/ext/mv15.C
new file mode 100644
index 0000000000..42e39d24c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv15.C
@@ -0,0 +1,40 @@
+/* Test case to check if Multiversioning works. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2 -fPIC" } */
+
+#include <assert.h>
+
+/* Default version. */
+int foo (); // Extra declaration that is merged with the second one.
+int foo () __attribute__ ((target("default")));
+
+int foo () __attribute__ ((target("arch=nehalem")));
+
+int (*p)() = &foo;
+int main ()
+{
+ int val = foo ();
+ assert (val == (*p)());
+
+ /* Check in the exact same order in which the dispatching
+ is expected to happen. */
+ if (__builtin_cpu_is ("corei7"))
+ assert (val == 5);
+ else
+ assert (val == 0);
+
+ return 0;
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("arch=nehalem")))
+foo ()
+{
+ return 5;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv16.C b/gcc/testsuite/g++.dg/ext/mv16.C
new file mode 100644
index 0000000000..8992bfc6fc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv16.C
@@ -0,0 +1,65 @@
+// Test that dispatching can choose the right multiversion
+// for Intel CPUs with the same internal GCC processor id
+// but slighly different sets of x86 extensions.
+
+// { dg-do run { target i?86-*-* x86_64-*-* } }
+// { dg-require-ifunc "" }
+// { dg-options "-O2" }
+
+#include <assert.h>
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("arch=nehalem")))
+foo ()
+{
+ return 4;
+}
+
+int __attribute__ ((target("arch=westmere")))
+foo ()
+{
+ return 5;
+}
+
+int __attribute__ ((target("arch=sandybridge")))
+foo ()
+{
+ return 8;
+}
+
+int __attribute__ ((target("arch=ivybridge")))
+foo ()
+{
+ return 9;
+}
+
+int __attribute__ ((target("arch=haswell")))
+foo ()
+{
+ return 12;
+}
+
+int main ()
+{
+ int val = foo ();
+
+ if (__builtin_cpu_is ("nehalem"))
+ assert (val == 4);
+ else if (__builtin_cpu_is ("westmere"))
+ assert (val == 5);
+ else if (__builtin_cpu_is ("sandybridge"))
+ assert (val == 8);
+ else if (__builtin_cpu_is ("ivybridge"))
+ assert (val == 9);
+ else if (__builtin_cpu_is ("haswell"))
+ assert (val == 12);
+ else
+ assert (val == 0);
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv2.C b/gcc/testsuite/g++.dg/ext/mv2.C
new file mode 100644
index 0000000000..869e99b4fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv2.C
@@ -0,0 +1,118 @@
+/* Test case to check if Multiversioning chooses the correct
+ dispatching order when versions are for various ISAs. */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2" } */
+
+#include <assert.h>
+
+/* Default version. */
+int foo () __attribute__ ((target ("default")));
+/* The dispatch checks should be in the exact reverse order of the
+ declarations below. */
+int foo () __attribute__ ((target ("mmx")));
+int foo () __attribute__ ((target ("sse")));
+int foo () __attribute__ ((target ("sse2")));
+int foo () __attribute__ ((target ("sse3")));
+int foo () __attribute__ ((target ("ssse3")));
+int foo () __attribute__ ((target ("sse4.1")));
+int foo () __attribute__ ((target ("sse4.2")));
+int foo () __attribute__ ((target ("popcnt")));
+int foo () __attribute__ ((target ("avx")));
+int foo () __attribute__ ((target ("avx2")));
+
+int main ()
+{
+ int val = foo ();
+
+ if (__builtin_cpu_supports ("avx2"))
+ assert (val == 1);
+ else if (__builtin_cpu_supports ("avx"))
+ assert (val == 2);
+ else if (__builtin_cpu_supports ("popcnt"))
+ assert (val == 3);
+ else if (__builtin_cpu_supports ("sse4.2"))
+ assert (val == 4);
+ else if (__builtin_cpu_supports ("sse4.1"))
+ assert (val == 5);
+ else if (__builtin_cpu_supports ("ssse3"))
+ assert (val == 6);
+ else if (__builtin_cpu_supports ("sse3"))
+ assert (val == 7);
+ else if (__builtin_cpu_supports ("sse2"))
+ assert (val == 8);
+ else if (__builtin_cpu_supports ("sse"))
+ assert (val == 9);
+ else if (__builtin_cpu_supports ("mmx"))
+ assert (val == 10);
+ else
+ assert (val == 0);
+
+ return 0;
+}
+
+int __attribute__ ((target("default")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target("mmx")))
+foo ()
+{
+ return 10;
+}
+
+int __attribute__ ((target("sse")))
+foo ()
+{
+ return 9;
+}
+
+int __attribute__ ((target("sse2")))
+foo ()
+{
+ return 8;
+}
+
+int __attribute__ ((target("sse3")))
+foo ()
+{
+ return 7;
+}
+
+int __attribute__ ((target("ssse3")))
+foo ()
+{
+ return 6;
+}
+
+int __attribute__ ((target("sse4.1")))
+foo ()
+{
+ return 5;
+}
+
+int __attribute__ ((target("sse4.2")))
+foo ()
+{
+ return 4;
+}
+
+int __attribute__ ((target("popcnt")))
+foo ()
+{
+ return 3;
+}
+
+int __attribute__ ((target("avx")))
+foo ()
+{
+ return 2;
+}
+
+int __attribute__ ((target("avx2")))
+foo ()
+{
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv3.C b/gcc/testsuite/g++.dg/ext/mv3.C
new file mode 100644
index 0000000000..ec2aa1ffec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv3.C
@@ -0,0 +1,36 @@
+/* Test case to check if a call to a multiversioned function
+ is replaced with a direct call to the particular version when
+ the most specialized version's target attributes match the
+ caller.
+
+ In this program, foo is multiversioned but there is no default
+ function. This is an error if the call has to go through a
+ dispatcher. However, the call to foo in bar can be replaced
+ with a direct call to the popcnt version of foo. Hence, this
+ test should pass. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2" } */
+
+
+int __attribute__ ((target ("sse")))
+foo ()
+{
+ return 1;
+}
+int __attribute__ ((target ("popcnt")))
+foo ()
+{
+ return 0;
+}
+
+int __attribute__ ((target ("popcnt")))
+bar ()
+{
+ return foo ();
+}
+
+int main ()
+{
+ return bar ();
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv4.C b/gcc/testsuite/g++.dg/ext/mv4.C
new file mode 100644
index 0000000000..ff1cc2f63f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv4.C
@@ -0,0 +1,24 @@
+/* Test case to check if the compiler generates an error message
+ when the default version of a multiversioned function is absent
+ and its pointer is taken. */
+
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2" } */
+
+int __attribute__ ((target ("sse")))
+foo ()
+{
+ return 1;
+}
+int __attribute__ ((target ("popcnt")))
+foo ()
+{
+ return 0;
+}
+
+int main ()
+{
+ int (*p)() = &foo; /* { dg-error "use of multiversioned function without a default" {} } */
+ return (*p)();
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv5.C b/gcc/testsuite/g++.dg/ext/mv5.C
new file mode 100644
index 0000000000..fd62eee015
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv5.C
@@ -0,0 +1,25 @@
+/* Test case to check if multiversioned functions are still generated if they are
+ marked comdat with inline keyword. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-O2" } */
+
+
+/* Default version. */
+inline int __attribute__ ((target ("default")))
+foo ()
+{
+ return 0;
+}
+
+inline int __attribute__ ((target ("popcnt")))
+foo ()
+{
+ return 0;
+}
+
+int main ()
+{
+ return foo ();
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv6.C b/gcc/testsuite/g++.dg/ext/mv6.C
new file mode 100644
index 0000000000..2273065996
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv6.C
@@ -0,0 +1,28 @@
+/* Test to check if member version multiversioning works correctly. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+/* { dg-options "-march=x86-64" } */
+
+class Foo
+{
+ public:
+ /* Default version of foo. */
+ __attribute__ ((target("default")))
+ int foo ()
+ {
+ return 0;
+ }
+ /* corei7 version of foo. */
+ __attribute__ ((target("arch=corei7")))
+ int foo ()
+ {
+ return 0;
+ }
+};
+
+int main ()
+{
+ Foo f;
+ return f.foo ();
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv7.C b/gcc/testsuite/g++.dg/ext/mv7.C
new file mode 100644
index 0000000000..64c04fac60
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv7.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "" }
+
+__attribute__((target ("default")))
+void foo (void) // { dg-message "previously defined here" }
+{
+}
+
+__attribute__((target (128)))
+void foo (void) // { dg-error "(not a string|redefinition)" }
+{
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv8.C b/gcc/testsuite/g++.dg/ext/mv8.C
new file mode 100644
index 0000000000..2e98dd7ad8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv8.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "" }
+
+__attribute__((target (11,12)))
+void foo (void) // { dg-error "not a string" }
+{
+}
diff --git a/gcc/testsuite/g++.dg/ext/mv9.C b/gcc/testsuite/g++.dg/ext/mv9.C
new file mode 100644
index 0000000000..c59651e102
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/mv9.C
@@ -0,0 +1,9 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "" }
+
+void foo ();
+void foo () __attribute__((target ("sse4")));
+void foo () __attribute__((target ("default"))); // { dg-message "previous declaration" }
+void foo () // { dg-error "attribute for multi-versioned" }
+{
+}
diff --git a/gcc/testsuite/g++.dg/ext/pr56790-1.C b/gcc/testsuite/g++.dg/ext/pr56790-1.C
new file mode 100644
index 0000000000..ae465fa3e1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr56790-1.C
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ccp1" } */
+/* { dg-prune-output "changes the ABI" } */
+
+typedef long vec __attribute__ ((vector_size (2 * sizeof (long))));
+
+vec f (void)
+{
+ vec a = { 5, 7 };
+ vec b = { 11, 13 };
+ vec m = { -1, 0 };
+ return m ? a : b;
+}
+
+/* { dg-final { scan-tree-dump "{ 5, 13 }" "ccp1" } } */
+/* { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/g++.dg/ext/pr57362.C b/gcc/testsuite/g++.dg/ext/pr57362.C
new file mode 100644
index 0000000000..71c53d3761
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr57362.C
@@ -0,0 +1,198 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+
+__attribute__((target("default")))
+int foo(void) { return 1; }
+__attribute__((target("128bit-long-double")))
+int foo(void) { return 1; }
+__attribute__((target("80387")))
+int foo(void) { return 1; }
+__attribute__((target("96bit-long-double")))
+int foo(void) { return 1; }
+__attribute__((target("long-double-80")))
+int foo(void) { return 1; }
+__attribute__((target("long-double-64")))
+int foo(void) { return 1; }
+__attribute__((target("accumulate-outgoing-args")))
+int foo(void) { return 1; }
+__attribute__((target("align-double")))
+int foo(void) { return 1; }
+__attribute__((target("align-stringops")))
+int foo(void) { return 1; }
+__attribute__((target("fancy-math-387")))
+int foo(void) { return 1; }
+__attribute__((target("force-drap")))
+int foo(void) { return 1; }
+__attribute__((target("fp-ret-in-387")))
+int foo(void) { return 1; }
+__attribute__((target("hard-float")))
+int foo(void) { return 1; }
+__attribute__((target("ieee-fp")))
+int foo(void) { return 1; }
+__attribute__((target("inline-all-stringops")))
+int foo(void) { return 1; }
+__attribute__((target("inline-stringops-dynamically")))
+int foo(void) { return 1; }
+__attribute__((target("intel-syntax")))
+int foo(void) { return 1; }
+__attribute__((target("ms-bitfields")))
+int foo(void) { return 1; }
+__attribute__((target("no-align-stringops")))
+int foo(void) { return 1; }
+__attribute__((target("no-fancy-math-387")))
+int foo(void) { return 1; }
+__attribute__((target("no-push-args")))
+int foo(void) { return 1; }
+__attribute__((target("no-red-zone")))
+int foo(void) { return 1; }
+__attribute__((target("omit-leaf-frame-pointer")))
+int foo(void) { return 1; }
+__attribute__((target("pc32")))
+int foo(void) { return 1; }
+__attribute__((target("pc64")))
+int foo(void) { return 1; }
+__attribute__((target("pc80")))
+int foo(void) { return 1; }
+__attribute__((target("push-args")))
+int foo(void) { return 1; }
+__attribute__((target("red-zone")))
+int foo(void) { return 1; }
+__attribute__((target("rtd")))
+int foo(void) { return 1; }
+__attribute__((target("soft-float")))
+int foo(void) { return 1; }
+__attribute__((target("sseregparm")))
+int foo(void) { return 1; }
+__attribute__((target("stackrealign")))
+int foo(void) { return 1; }
+__attribute__((target("stack-arg-probe")))
+int foo(void) { return 1; }
+__attribute__((target("tls-direct-seg-refs")))
+int foo(void) { return 1; }
+__attribute__((target("vect8-ret-in-mem")))
+int foo(void) { return 1; }
+__attribute__((target("recip")))
+int foo(void) { return 1; }
+__attribute__((target("cld")))
+int foo(void) { return 1; }
+__attribute__((target("vzeroupper")))
+int foo(void) { return 1; }
+__attribute__((target("dispatch-scheduler")))
+int foo(void) { return 1; }
+__attribute__((target("prefer-avx128")))
+int foo(void) { return 1; }
+__attribute__((target("32")))
+int foo(void) { return 1; }
+__attribute__((target("64")))
+int foo(void) { return 1; }
+__attribute__((target("x32")))
+int foo(void) { return 1; }
+__attribute__((target("mmx")))
+int foo(void) { return 1; }
+__attribute__((target("3dnow")))
+int foo(void) { return 1; }
+__attribute__((target("3dnowa")))
+int foo(void) { return 1; }
+__attribute__((target("sse")))
+int foo(void) { return 1; }
+__attribute__((target("sse2")))
+int foo(void) { return 1; }
+__attribute__((target("sse3")))
+int foo(void) { return 1; }
+__attribute__((target("ssse3")))
+int foo(void) { return 1; }
+__attribute__((target("sse4.1")))
+int foo(void) { return 1; }
+__attribute__((target("sse4.2")))
+int foo(void) { return 1; }
+__attribute__((target("sse4")))
+int foo(void) { return 1; }
+__attribute__((target("no-sse4")))
+int foo(void) { return 1; }
+__attribute__((target("sse5")))
+int foo(void) { return 1; }
+__attribute__((target("avx")))
+int foo(void) { return 1; }
+__attribute__((target("avx2")))
+int foo(void) { return 1; }
+__attribute__((target("fma")))
+int foo(void) { return 1; }
+__attribute__((target("sse4a")))
+int foo(void) { return 1; }
+__attribute__((target("fma4")))
+int foo(void) { return 1; }
+__attribute__((target("xop")))
+int foo(void) { return 1; }
+__attribute__((target("lwp")))
+int foo(void) { return 1; }
+__attribute__((target("abm")))
+int foo(void) { return 1; }
+__attribute__((target("popcnt")))
+int foo(void) { return 1; }
+__attribute__((target("bmi")))
+int foo(void) { return 1; }
+__attribute__((target("bmi2")))
+int foo(void) { return 1; }
+__attribute__((target("lzcnt")))
+int foo(void) { return 1; }
+__attribute__((target("hle")))
+int foo(void) { return 1; }
+__attribute__((target("rdseed")))
+int foo(void) { return 1; }
+__attribute__((target("prfchw")))
+int foo(void) { return 1; }
+__attribute__((target("adx")))
+int foo(void) { return 1; }
+__attribute__((target("fxsr")))
+int foo(void) { return 1; }
+__attribute__((target("xsave")))
+int foo(void) { return 1; }
+__attribute__((target("xsaveopt")))
+int foo(void) { return 1; }
+__attribute__((target("tbm")))
+int foo(void) { return 1; }
+__attribute__((target("cx16")))
+int foo(void) { return 1; }
+__attribute__((target("sahf")))
+int foo(void) { return 1; }
+__attribute__((target("movbe")))
+int foo(void) { return 1; }
+__attribute__((target("crc32")))
+int foo(void) { return 1; }
+__attribute__((target("aes")))
+int foo(void) { return 1; }
+__attribute__((target("pclmul")))
+int foo(void) { return 1; }
+__attribute__((target("sse2avx")))
+int foo(void) { return 1; }
+__attribute__((target("fsgsbase")))
+int foo(void) { return 1; }
+__attribute__((target("rdrnd")))
+int foo(void) { return 1; }
+__attribute__((target("f16c")))
+int foo(void) { return 1; }
+__attribute__((target("fentry")))
+int foo(void) { return 1; }
+__attribute__((target("8bit-idiv")))
+int foo(void) { return 1; }
+__attribute__((target("avx256-split-unaligned-load")))
+int foo(void) { return 1; }
+__attribute__((target("avx256-split-unaligned-store")))
+int foo(void) { return 1; }
+__attribute__((target("rtm")))
+int foo(void) { return 1; }
+//---------------
+
+#include <stdio.h>
+ int main (void)
+ {
+ int result;
+ result = foo();
+ printf("Result is %d\n", result);
+ return result;
+ }
+
+/* { dg-prune-output "attribute.* is unknown" } */
+/* { dg-prune-output "missing 'target' attribute*" } */
+/* { dg-prune-output "redefinition of 'int foo" } */
+/* { dg-prune-output "No dispatcher found for" } */
diff --git a/gcc/testsuite/g++.dg/ext/pr57509.C b/gcc/testsuite/g++.dg/ext/pr57509.C
new file mode 100644
index 0000000000..b89d9094d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr57509.C
@@ -0,0 +1,15 @@
+/* { dg-do compile { target c++11 } } */
+
+template <bool> struct enable_if {};
+template <> struct enable_if<true> {typedef void type;};
+template <class T> void f (T& v) { v = __builtin_shuffle (v, v); }
+template <class T> void g (T const&) {}
+template <class T> auto g (T const& x) -> typename enable_if<sizeof(__builtin_shuffle(x,x))!=2>::type {}
+typedef int v4i __attribute__((vector_size(4*sizeof(int))));
+typedef float v4f __attribute__((vector_size(4*sizeof(float))));
+int main(){
+ v4i a = {1,2,3,0};
+ f(a);
+ v4f b = {1,2,3,0};
+ g(b);
+}
diff --git a/gcc/testsuite/g++.dg/ext/pr57548.C b/gcc/testsuite/g++.dg/ext/pr57548.C
new file mode 100644
index 0000000000..1cc728d294
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr57548.C
@@ -0,0 +1,25 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-require-ifunc "" } */
+
+int fum (); // Extra declaration that is merged with the second one.
+int fum () __attribute__ ((target("default")));
+
+
+int fum () __attribute__((target( "mmx")));
+int fum () __attribute__((target( "popcnt")));
+int fum () __attribute__((target( "sse")));
+int fum () __attribute__((target( "sse2")));
+int fum () __attribute__((target( "sse3")));
+int fum () __attribute__((target( "ssse3")));
+int fum () __attribute__((target( "sse4.1")));
+int fum () __attribute__((target( "sse4.2")));
+int fum () __attribute__((target( "avx")));
+int fum () __attribute__((target( "avx2")));
+
+int fum () __attribute__((target("arch=core2")));
+int fum () __attribute__((target("arch=corei7")));
+int fum () __attribute__((target("arch=atom")));
+
+int (*p)() = &fum;
+
+int j = fum();
diff --git a/gcc/testsuite/g++.dg/ext/pr57735.C b/gcc/testsuite/g++.dg/ext/pr57735.C
new file mode 100644
index 0000000000..0eb95006dd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr57735.C
@@ -0,0 +1,145 @@
+/* { dg-do compile { target arm*-*-* } } */
+/* { dg-options "-march=armv5te -marm -mtune=xscale -mfloat-abi=soft -O1" } */
+
+typedef unsigned int size_t;
+__extension__
+typedef long long int int64_t;
+namespace WTF {
+ template<typename T> class RefPtr {
+ public:
+ inline T* operator->() const { return m_ptr; }
+ T* m_ptr;
+ };
+}
+using WTF::RefPtr;
+namespace JSC {
+ class ExecState;
+ class JSString;
+ typedef int64_t EncodedJSValue;
+ class JSValue {
+ public:
+ static EncodedJSValue encode(JSValue);
+ JSString* toString(ExecState*) const;
+ };
+}
+typedef unsigned char LChar;
+ typedef short unsigned int UChar;
+namespace WTF {
+ template<typename T, size_t inlineCapacity = 0>
+ class Vector {
+ public:
+ template<typename U> bool tryAppend(const U*, size_t);
+ };
+}
+using WTF::Vector;
+namespace WTF {
+template<typename CharType> inline bool isASCIIDigit(CharType c)
+{
+}
+template<typename CharType> inline bool isASCIIHexDigit(CharType c)
+{
+ return isASCIIDigit(c) || ((c | 0x20) >= 'a' && (c | 0x20) <= 'f');
+}
+ class StringImpl;
+}
+using WTF::StringImpl;
+namespace WTF {
+class StringImpl {
+public:
+ unsigned length() const { return m_length; }
+ unsigned m_length;
+};
+}
+namespace JSC {
+ class Register {
+ };
+class UString {
+public:
+ unsigned length() const
+ {
+ return m_impl->length();
+ }
+ const LChar* characters8() const
+ {
+ }
+ RefPtr<StringImpl> m_impl;
+};
+ class ExecState : private Register {
+ public:
+ JSValue argument(size_t argument)
+ {
+ }
+ };
+ class JSCell {
+ };
+ class JSString : public JSCell {
+ public:
+ const UString& value(ExecState*) const;
+ };
+class JSStringBuilder {
+public:
+ void append(const UChar u)
+ {
+ m_okay &= buffer16.tryAppend(&u, 1);
+ }
+ Vector<UChar, 64> buffer16;
+ bool m_okay;
+};
+template <typename T>
+class Lexer {
+public:
+ static unsigned char convertHex(int c1, int c2);
+};
+}
+namespace WTF {
+namespace Unicode {
+ int UTF8SequenceLength(char);
+ int decodeUTF8Sequence(const char*);
+}
+}
+using namespace WTF;
+using namespace Unicode;
+namespace JSC {
+template <typename CharType>
+static JSValue decode(ExecState* exec, const CharType* characters, int length, const char* doNotUnescape, bool strict)
+{
+ JSStringBuilder builder;
+ int k = 0;
+ UChar u = 0;
+ while (k < length) {
+ const CharType* p = characters + k;
+ CharType c = *p;
+ if (c == '%') {
+ int charLen = 0;
+ if (k <= length - 3 && isASCIIHexDigit(p[1]) && isASCIIHexDigit(p[2])) {
+ const char b0 = Lexer<CharType>::convertHex(p[1], p[2]);
+ const int sequenceLen = UTF8SequenceLength(b0);
+ if (sequenceLen && k <= length - sequenceLen * 3) {
+ charLen = sequenceLen * 3;
+ char sequence[5];
+ if (charLen != 0) {
+ const int character = decodeUTF8Sequence(sequence);
+ if (character < 0 || character >= 0x110000)
+ charLen = 0;
+ else if (character >= 0x10000) {
+ builder.append(static_cast<UChar>(0xD800 | ((character - 0x10000) >> 10)));
+ } else
+ u = static_cast<UChar>(character);
+ }
+ }
+ }
+ }
+ }
+}
+static JSValue decode(ExecState* exec, const char* doNotUnescape, bool strict)
+{
+ UString str = exec->argument(0).toString(exec)->value(exec);
+ return decode(exec, str.characters8(), str.length(), doNotUnescape, strict);
+}
+EncodedJSValue globalFuncDecodeURI(ExecState* exec)
+{
+ static const char do_not_unescape_when_decoding_URI[] =
+ "#$&+,/:;=?@";
+ return JSValue::encode(decode(exec, do_not_unescape_when_decoding_URI, true));
+}
+}
diff --git a/gcc/testsuite/g++.dg/ext/pr58834.C b/gcc/testsuite/g++.dg/ext/pr58834.C
new file mode 100644
index 0000000000..0293033317
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr58834.C
@@ -0,0 +1,5 @@
+template<typename> void foo()
+{
+ int i __attribute__((vector_size(2*sizeof(int))));
+ (void) __builtin_shuffle(i, i);
+}
diff --git a/gcc/testsuite/g++.dg/ext/pr59378.C b/gcc/testsuite/g++.dg/ext/pr59378.C
new file mode 100644
index 0000000000..19d06b5930
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr59378.C
@@ -0,0 +1,8 @@
+// { dg-do compile }
+typedef int v4si __attribute__ ((vector_size (4*sizeof(int))));
+template<int C>
+void traverse(v4si& bounds){
+ v4si m = {0,1,2,3};
+ bounds = __builtin_shuffle(bounds, m);
+}
+template void traverse<0>(v4si&);
diff --git a/gcc/testsuite/g++.dg/ext/pr59706.C b/gcc/testsuite/g++.dg/ext/pr59706.C
new file mode 100644
index 0000000000..b82b45e2d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/pr59706.C
@@ -0,0 +1,21 @@
+// PR middle-end/59706
+// { dg-do compile }
+
+extern struct S s;
+struct T { T (); ~T (); int t; } t;
+
+void
+foo ()
+{
+ #pragma GCC ivdep
+ while (s) // { dg-error "could not convert" }
+ ;
+}
+
+void
+bar ()
+{
+ #pragma GCC ivdep
+ while (t) // { dg-error "could not convert" }
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/ext/restrict2.C b/gcc/testsuite/g++.dg/ext/restrict2.C
new file mode 100644
index 0000000000..f053210028
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/restrict2.C
@@ -0,0 +1,8 @@
+// PR c++/60872
+// { dg-options "" }
+
+typedef double *__restrict T;
+void f(T* p)
+{
+ void *p2 = p;
+}
diff --git a/gcc/testsuite/g++.dg/ext/sizeof-complit.C b/gcc/testsuite/g++.dg/ext/sizeof-complit.C
new file mode 100644
index 0000000000..6cf6d4e1fa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/sizeof-complit.C
@@ -0,0 +1,5 @@
+// PR c++/18126
+// { dg-options "" }
+
+struct s { int a; int b; };
+char x[((sizeof (struct s){ 1, 2 }) == sizeof (struct s)) ? 1 : -1];
diff --git a/gcc/testsuite/g++.dg/ext/stmtexpr15.C b/gcc/testsuite/g++.dg/ext/stmtexpr15.C
new file mode 100644
index 0000000000..83a831cdd4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/stmtexpr15.C
@@ -0,0 +1,7 @@
+// PR c++/59097
+// { dg-options "" }
+
+void foo()
+{
+ int x[({ return; })]; // { dg-error "non-integral" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/stmtexpr16.C b/gcc/testsuite/g++.dg/ext/stmtexpr16.C
new file mode 100644
index 0000000000..ddce40c050
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/stmtexpr16.C
@@ -0,0 +1,10 @@
+// PR c++/63455
+// { dg-options "-std=gnu++11" }
+
+int main()
+{
+ int x = 0;
+
+ // without '+0', gcc 4.6 gives a different error (no ICE though)
+ decltype(({ int y = x; y; })+0) v1 = 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/strncpy-chk1.C b/gcc/testsuite/g++.dg/ext/strncpy-chk1.C
index 7770ba9312..ebafc99887 100644
--- a/gcc/testsuite/g++.dg/ext/strncpy-chk1.C
+++ b/gcc/testsuite/g++.dg/ext/strncpy-chk1.C
@@ -1,6 +1,7 @@
// PR c++/40502
// { dg-do compile }
// { dg-options "-O2" }
+// { dg-skip-if "packed attribute missing for struct A" { "epiphany-*-*" } { "*" } { "" } }
struct A { char x[12], y[35]; };
struct B { char z[50]; };
diff --git a/gcc/testsuite/g++.dg/ext/sync-4.C b/gcc/testsuite/g++.dg/ext/sync-4.C
new file mode 100644
index 0000000000..24bc663999
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/sync-4.C
@@ -0,0 +1,121 @@
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-require-effective-target sync_long_long_runtime } */
+/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
+
+/* Verify that the builtin functions are correctly marked as trapping
+ when using -fnon-call-exceptions. */
+
+#include <stdlib.h>
+#include <signal.h>
+
+typedef int ditype __attribute__ ((mode (DI)));
+
+#define FN(IDX, RET, CALL) \
+static RET f ## IDX (void *p) __attribute__ ((noinline)); \
+static RET \
+f ## IDX (void *p) \
+{ \
+ return CALL; \
+} \
+static void \
+t ## IDX () \
+{ \
+ try \
+ { \
+ f ## IDX(0); \
+ } \
+ catch (...) \
+ { \
+ return; \
+ } \
+ abort(); \
+}
+
+FN(1, ditype, (__sync_fetch_and_add((ditype*)p, 1)))
+FN(2, ditype, (__sync_fetch_and_sub((ditype*)p, 1)))
+FN(3, ditype, (__sync_fetch_and_or((ditype*)p, 1)))
+FN(4, ditype, (__sync_fetch_and_and((ditype*)p, 1)))
+FN(5, ditype, (__sync_fetch_and_xor((ditype*)p, 1)))
+FN(6, ditype, (__sync_fetch_and_nand((ditype*)p, 1)))
+
+FN( 7, ditype, (__sync_add_and_fetch((ditype*)p, 1)))
+FN( 8, ditype, (__sync_sub_and_fetch((ditype*)p, 1)))
+FN( 9, ditype, (__sync_or_and_fetch((ditype*)p, 1)))
+FN(10, ditype, (__sync_and_and_fetch((ditype*)p, 1)))
+FN(11, ditype, (__sync_xor_and_fetch((ditype*)p, 1)))
+FN(12, ditype, (__sync_nand_and_fetch((ditype*)p, 1)))
+
+FN(13, bool, (__sync_bool_compare_and_swap((ditype*)p, 1, 2)))
+FN(14, ditype, (__sync_val_compare_and_swap((ditype*)p, 1, 2)))
+
+FN(15, ditype, (__sync_lock_test_and_set((ditype*)p, 1)))
+FN(16, void, (__sync_lock_release((ditype*)p)))
+
+FN(17, bool, (__atomic_test_and_set((ditype*)p, __ATOMIC_SEQ_CST)))
+FN(18, void, (__atomic_clear((ditype*)p, __ATOMIC_SEQ_CST)))
+
+FN(19, void, (__atomic_exchange((ditype*)p, (ditype*)0, (ditype*)0, __ATOMIC_SEQ_CST)))
+FN(20, ditype, (__atomic_exchange_n((ditype*)p, 1, 2)))
+
+FN(21, void, (__atomic_load((ditype*)p, (ditype*)0, __ATOMIC_SEQ_CST)))
+FN(22, ditype, (__atomic_load_n((ditype*)p, __ATOMIC_SEQ_CST)))
+
+FN(23, bool, (__atomic_compare_exchange((ditype*)p, (ditype*)0, (ditype*)0, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)))
+FN(24, bool, (__atomic_compare_exchange_n((ditype*)p, (ditype*)0, 1, false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)))
+
+FN(25, void, (__atomic_store((ditype*)p, (ditype*)0, __ATOMIC_SEQ_CST)))
+FN(26, void, (__atomic_store_n((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+
+FN(27, ditype, (__atomic_add_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(28, ditype, (__atomic_sub_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(29, ditype, (__atomic_and_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(30, ditype, (__atomic_nand_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(31, ditype, (__atomic_xor_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(32, ditype, (__atomic_or_fetch((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+
+FN(33, ditype, (__atomic_fetch_add((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(34, ditype, (__atomic_fetch_sub((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(35, ditype, (__atomic_fetch_and((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(36, ditype, (__atomic_fetch_nand((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(37, ditype, (__atomic_fetch_xor((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+FN(38, ditype, (__atomic_fetch_or((ditype*)p, 1, __ATOMIC_SEQ_CST)))
+
+static void
+handler(int)
+{
+ sigset_t clear;
+
+ sigfillset (&clear);
+ sigprocmask (SIG_UNBLOCK, &clear, NULL);
+ throw 0;
+}
+
+int
+main ()
+{
+ signal (SIGSEGV, handler);
+ signal (SIGBUS, handler);
+
+ t1();
+ t2();
+ t3();
+ t4();
+ t5();
+ t6();
+ t7();
+ t8();
+ t9();
+ t10();
+ t11();
+ t12();
+ t13();
+ t14();
+ t15();
+ t16();
+ t17();
+ t18();
+ t19();
+ t20();
+
+ exit(0);
+}
diff --git a/gcc/testsuite/g++.dg/ext/timevar2.C b/gcc/testsuite/g++.dg/ext/timevar2.C
new file mode 100644
index 0000000000..74c4fc8cfa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/timevar2.C
@@ -0,0 +1,14 @@
+// PR c++/57524
+// { dg-options "-ftime-report" }
+// { dg-prune-output "wall" }
+// { dg-prune-output "times" }
+// { dg-prune-output "TOTAL" }
+// { dg-prune-output "checks" }
+
+namespace detail {
+namespace indirect_traits {}
+using namespace indirect_traits;
+void fn1() {
+using namespace detail;
+}
+}
diff --git a/gcc/testsuite/g++.dg/ext/traits1.C b/gcc/testsuite/g++.dg/ext/traits1.C
new file mode 100644
index 0000000000..24099e53cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/traits1.C
@@ -0,0 +1,4 @@
+// PR c++/58504
+
+template<bool = __has_nothrow_assign(void)> struct A {};
+A<> a;
diff --git a/gcc/testsuite/g++.dg/ext/transparent-union.C b/gcc/testsuite/g++.dg/ext/transparent-union.C
new file mode 100644
index 0000000000..1231563610
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/transparent-union.C
@@ -0,0 +1,5 @@
+// PR c++/53761
+
+typedef union { // { dg-error "type transparent" }
+ double x;
+} __attribute__(( __transparent_union__ )) example_t;
diff --git a/gcc/testsuite/g++.dg/ext/typeof10.C b/gcc/testsuite/g++.dg/ext/typeof10.C
index 1b357ad9d7..614538527a 100644
--- a/gcc/testsuite/g++.dg/ext/typeof10.C
+++ b/gcc/testsuite/g++.dg/ext/typeof10.C
@@ -5,7 +5,7 @@ template<int> struct A
{
void foo()
{
- typedef int T; // { dg-error "previous" }
+ typedef int T; // { dg-message "previous" }
typedef __typeof__(*this) T; // { dg-error "conflicting" }
}
};
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type1.C b/gcc/testsuite/g++.dg/ext/underlying_type1.C
index a8f68d3d60..999cd9f35b 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type1.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type1.C
@@ -8,7 +8,7 @@ template<typename T>
{ typedef __underlying_type(T) type; }; // { dg-error "not an enumeration" }
__underlying_type(int) i1; // { dg-error "not an enumeration|invalid" }
-__underlying_type(A) i2; // { dg-error "expected" }
+__underlying_type(A) i2; // { dg-error "expected|type" }
__underlying_type(B) i3; // { dg-error "not an enumeration|invalid" }
__underlying_type(U) i4; // { dg-error "not an enumeration|invalid" }
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type10.C b/gcc/testsuite/g++.dg/ext/underlying_type10.C
index cb57407fe8..66ba02e997 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type10.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type10.C
@@ -1,5 +1,4 @@
-// { dg-do run }
-// { dg-options "-std=c++0x" }
+// { dg-do run { target c++11 } }
#include <cassert>
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type3.C b/gcc/testsuite/g++.dg/ext/underlying_type3.C
index b78cc7dd3f..1209171f2d 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type3.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type3.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct is_same
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type5.C b/gcc/testsuite/g++.dg/ext/underlying_type5.C
index a9c19924b9..aad53006ee 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type5.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type5.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct is_same
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type6.C b/gcc/testsuite/g++.dg/ext/underlying_type6.C
index 50f528856d..91be4d5d99 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type6.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type6.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct is_same
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type7.C b/gcc/testsuite/g++.dg/ext/underlying_type7.C
index 872fe52b00..2d6ec51792 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type7.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type7.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum E1 : unsigned { E1_en = 1 };
enum E2 : char { E2_en = 1 };
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type8.C b/gcc/testsuite/g++.dg/ext/underlying_type8.C
index 0bbed2b489..95e76fa247 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type8.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type8.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
enum E1 : unsigned { E1_en = 1 };
enum E2 : char { E2_en = 1 };
diff --git a/gcc/testsuite/g++.dg/ext/underlying_type9.C b/gcc/testsuite/g++.dg/ext/underlying_type9.C
index 9ffd24439a..2c564560e3 100644
--- a/gcc/testsuite/g++.dg/ext/underlying_type9.C
+++ b/gcc/testsuite/g++.dg/ext/underlying_type9.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename T1, typename T2>
struct is_same
diff --git a/gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C b/gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C
index a549f69738..2ce774abc4 100644
--- a/gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C
+++ b/gcc/testsuite/g++.dg/ext/utf-array-short-wchar.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Expected errors for char16_t/char32_t string literals. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x -fshort-wchar" } */
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-fshort-wchar" } */
const char s_0[] = "ab";
const char s_1[] = u"ab"; /* { dg-error "from wide string" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf-array.C b/gcc/testsuite/g++.dg/ext/utf-array.C
index 6a14f79e5f..21e438693a 100644
--- a/gcc/testsuite/g++.dg/ext/utf-array.C
+++ b/gcc/testsuite/g++.dg/ext/utf-array.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Expected errors for char16_t/char32_t string literals. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
+// { dg-options "" }
const char s_0[] = "ab";
const char s_1[] = u"ab"; /* { dg-error "from wide string" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf-badconcat.C b/gcc/testsuite/g++.dg/ext/utf-badconcat.C
index bab020e4fe..4079b83879 100644
--- a/gcc/testsuite/g++.dg/ext/utf-badconcat.C
+++ b/gcc/testsuite/g++.dg/ext/utf-badconcat.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test unsupported concatenation of char16_t/char32_t* string literals. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
const void *s0 = u"a" "b";
const void *s1 = "a" u"b";
diff --git a/gcc/testsuite/g++.dg/ext/utf-badconcat2.C b/gcc/testsuite/g++.dg/ext/utf-badconcat2.C
index 499b323fc1..0d3fe33039 100644
--- a/gcc/testsuite/g++.dg/ext/utf-badconcat2.C
+++ b/gcc/testsuite/g++.dg/ext/utf-badconcat2.C
@@ -1,6 +1,5 @@
// Test unsupported concatenation of UTF-8 string literals.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
const void *s0 = u8"a" "b";
const void *s1 = "a" u8"b";
diff --git a/gcc/testsuite/g++.dg/ext/utf-cvt.C b/gcc/testsuite/g++.dg/ext/utf-cvt.C
index 286a0d0071..366c3d4179 100644
--- a/gcc/testsuite/g++.dg/ext/utf-cvt.C
+++ b/gcc/testsuite/g++.dg/ext/utf-cvt.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the char16_t and char32_t promotion rules. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x -Wall -Wconversion -Wsign-conversion -Wsign-promo" } */
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-Wall -Wconversion -Wsign-conversion -Wsign-promo" } */
extern void f_c (char);
extern void fsc (signed char);
diff --git a/gcc/testsuite/g++.dg/ext/utf-cxx0x.C b/gcc/testsuite/g++.dg/ext/utf-cxx0x.C
index 1daa0dee48..221ccf0934 100644
--- a/gcc/testsuite/g++.dg/ext/utf-cxx0x.C
+++ b/gcc/testsuite/g++.dg/ext/utf-cxx0x.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test parsing of u and U prefixes when also used as macros. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
#define u L
#define U L
diff --git a/gcc/testsuite/g++.dg/ext/utf-cxx98.C b/gcc/testsuite/g++.dg/ext/utf-cxx98.C
index a8dd13a4e3..365118e396 100644
--- a/gcc/testsuite/g++.dg/ext/utf-cxx98.C
+++ b/gcc/testsuite/g++.dg/ext/utf-cxx98.C
@@ -8,9 +8,7 @@ const static char16_t c0 = 'a'; /* { dg-error "not name a type" } */
const static char32_t c1 = 'a'; /* { dg-error "not name a type" } */
const unsigned short c2 = u'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } */
const unsigned long c3 = U'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } */
#define u 1 +
#define U 2 +
diff --git a/gcc/testsuite/g++.dg/ext/utf-dflt.C b/gcc/testsuite/g++.dg/ext/utf-dflt.C
index 04849bfbf0..c2b127d5dd 100644
--- a/gcc/testsuite/g++.dg/ext/utf-dflt.C
+++ b/gcc/testsuite/g++.dg/ext/utf-dflt.C
@@ -8,9 +8,7 @@ const static char16_t c0 = 'a'; /* { dg-error "not name a type" } */
const static char32_t c1 = 'a'; /* { dg-error "not name a type" } */
const unsigned short c2 = u'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } */
const unsigned long c3 = U'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } */
#define u 1 +
#define U 2 +
diff --git a/gcc/testsuite/g++.dg/ext/utf-dflt2.C b/gcc/testsuite/g++.dg/ext/utf-dflt2.C
index fd2222f672..ab18ef52fd 100644
--- a/gcc/testsuite/g++.dg/ext/utf-dflt2.C
+++ b/gcc/testsuite/g++.dg/ext/utf-dflt2.C
@@ -3,7 +3,6 @@
// { dg-options "-std=c++98" }
const void *s0 = u8"a"; // { dg-error "was not declared" }
- // { dg-error "expected ',' or ';'" "" { target *-*-* } 5 }
#define u8 "a"
diff --git a/gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C b/gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C
index 0a6967fe40..221ccf0934 100644
--- a/gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C
+++ b/gcc/testsuite/g++.dg/ext/utf-gnuxx0x.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test parsing of u and U prefixes when also used as macros. */
-/* { dg-do compile } */
-/* { dg-options "-std=gnu++0x" } */
+/* { dg-do compile { target c++11 } } */
#define u L
#define U L
diff --git a/gcc/testsuite/g++.dg/ext/utf-gnuxx98.C b/gcc/testsuite/g++.dg/ext/utf-gnuxx98.C
index fc8068b7e9..b3be121e2d 100644
--- a/gcc/testsuite/g++.dg/ext/utf-gnuxx98.C
+++ b/gcc/testsuite/g++.dg/ext/utf-gnuxx98.C
@@ -8,9 +8,7 @@ const static char16_t c0 = 'a'; /* { dg-error "not name a type" } */
const static char32_t c1 = 'a'; /* { dg-error "not name a type" } */
const unsigned short c2 = u'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 10 } */
const unsigned long c3 = U'a'; /* { dg-error "not declared" } */
- /* { dg-error "expected ',' or ';'" "" { target *-*-* } 12 } */
#define u 1 +
#define U 2 +
diff --git a/gcc/testsuite/g++.dg/ext/utf-mangle.C b/gcc/testsuite/g++.dg/ext/utf-mangle.C
index a131887882..546566f083 100644
--- a/gcc/testsuite/g++.dg/ext/utf-mangle.C
+++ b/gcc/testsuite/g++.dg/ext/utf-mangle.C
@@ -1,7 +1,6 @@
// Contributed by Kris Van Hees <kris.van.hees@oracle.com>
// Test the support for char16_t character constants.
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
void f0 (char16_t c) {}
void f1 (char32_t c) {}
diff --git a/gcc/testsuite/g++.dg/ext/utf-rtti.C b/gcc/testsuite/g++.dg/ext/utf-rtti.C
index b5d201b4d7..202625789e 100644
--- a/gcc/testsuite/g++.dg/ext/utf-rtti.C
+++ b/gcc/testsuite/g++.dg/ext/utf-rtti.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Ensure that typeinfo data is generated for char16_t/char32_t. */
-/* { dg-do link } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do link { target c++11 } } */
#include <typeinfo>
diff --git a/gcc/testsuite/g++.dg/ext/utf-type.C b/gcc/testsuite/g++.dg/ext/utf-type.C
index 41a83ff2ef..7e15647972 100644
--- a/gcc/testsuite/g++.dg/ext/utf-type.C
+++ b/gcc/testsuite/g++.dg/ext/utf-type.C
@@ -1,8 +1,8 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Ensure that __CHAR16_TYPE__ and __CHAR32_TYPE__ exist, match the types they
are the underlying data type for. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf-typedef-cxx0x.C b/gcc/testsuite/g++.dg/ext/utf-typedef-cxx0x.C
index 641e836e41..3503f11a26 100644
--- a/gcc/testsuite/g++.dg/ext/utf-typedef-cxx0x.C
+++ b/gcc/testsuite/g++.dg/ext/utf-typedef-cxx0x.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Ensure that a typedef to char16_t/char32_t issues an error in c++0x. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
typedef short unsigned int char16_t; /* { dg-error "redeclaration" } */
typedef unsigned int char32_t; /* { dg-error "redeclaration" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf-typespec.C b/gcc/testsuite/g++.dg/ext/utf-typespec.C
index 6a4af25598..aa10b72530 100644
--- a/gcc/testsuite/g++.dg/ext/utf-typespec.C
+++ b/gcc/testsuite/g++.dg/ext/utf-typespec.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Ensure that type specifiers are not allowed for char16_t/char32_t. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
signed char16_t c0; /* { dg-error "signed" } */
signed char32_t c1; /* { dg-error "signed" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf16-1.C b/gcc/testsuite/g++.dg/ext/utf16-1.C
index fa07de912d..8754e4d824 100644
--- a/gcc/testsuite/g++.dg/ext/utf16-1.C
+++ b/gcc/testsuite/g++.dg/ext/utf16-1.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the support for char16_t character constants. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf16-2.C b/gcc/testsuite/g++.dg/ext/utf16-2.C
index d7a6056f81..4951e03443 100644
--- a/gcc/testsuite/g++.dg/ext/utf16-2.C
+++ b/gcc/testsuite/g++.dg/ext/utf16-2.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the support for char16_t* string literals. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf16-3.C b/gcc/testsuite/g++.dg/ext/utf16-3.C
index 183347b6ee..370dcf1dc7 100644
--- a/gcc/testsuite/g++.dg/ext/utf16-3.C
+++ b/gcc/testsuite/g++.dg/ext/utf16-3.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test concatenation of char16_t* string literals. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf16-4.C b/gcc/testsuite/g++.dg/ext/utf16-4.C
index 21cdb53bde..807b77524a 100644
--- a/gcc/testsuite/g++.dg/ext/utf16-4.C
+++ b/gcc/testsuite/g++.dg/ext/utf16-4.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Expected errors for char16_t character constants. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
+
const static char16_t c0 = u''; /* { dg-error "empty character" } */
const static char16_t c1 = u'ab'; /* { dg-warning "constant too long" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf32-1.C b/gcc/testsuite/g++.dg/ext/utf32-1.C
index 98465a0a1b..848d3a93b4 100644
--- a/gcc/testsuite/g++.dg/ext/utf32-1.C
+++ b/gcc/testsuite/g++.dg/ext/utf32-1.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the support for char32_t character constants. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf32-2.C b/gcc/testsuite/g++.dg/ext/utf32-2.C
index e2256ba746..843e9b43e8 100644
--- a/gcc/testsuite/g++.dg/ext/utf32-2.C
+++ b/gcc/testsuite/g++.dg/ext/utf32-2.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the support for char32_t* string constants. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf32-3.C b/gcc/testsuite/g++.dg/ext/utf32-3.C
index bba893cef5..f5d1db0d03 100644
--- a/gcc/testsuite/g++.dg/ext/utf32-3.C
+++ b/gcc/testsuite/g++.dg/ext/utf32-3.C
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test concatenation of char32_t* string literals. */
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -Wall -Werror" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-Wall -Werror" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ext/utf32-4.C b/gcc/testsuite/g++.dg/ext/utf32-4.C
index 744fea7c59..0b270304a0 100644
--- a/gcc/testsuite/g++.dg/ext/utf32-4.C
+++ b/gcc/testsuite/g++.dg/ext/utf32-4.C
@@ -1,7 +1,6 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Expected errors for char32_t character constants. */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
const static char32_t c0 = U''; /* { dg-error "empty character" } */
const static char32_t c1 = U'ab'; /* { dg-warning "constant too long" } */
diff --git a/gcc/testsuite/g++.dg/ext/utf8-1.C b/gcc/testsuite/g++.dg/ext/utf8-1.C
index 203b326af7..a1a3518a49 100644
--- a/gcc/testsuite/g++.dg/ext/utf8-1.C
+++ b/gcc/testsuite/g++.dg/ext/utf8-1.C
@@ -1,6 +1,6 @@
-// { dg-do run }
+// { dg-do run { target c++11 } }
// { dg-require-iconv "ISO-8859-2" }
-// { dg-options "-std=c++0x -fexec-charset=ISO-8859-2" }
+// { dg-options "-fexec-charset=ISO-8859-2" }
const char *str1 = "h\u00e1\U0000010Dky ";
const char *str2 = "\u010d\u00E1rky\n";
diff --git a/gcc/testsuite/g++.dg/ext/utf8-2.C b/gcc/testsuite/g++.dg/ext/utf8-2.C
index 417a8bfdc1..bafe6e8351 100644
--- a/gcc/testsuite/g++.dg/ext/utf8-2.C
+++ b/gcc/testsuite/g++.dg/ext/utf8-2.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
const char s0[] = u8"ab";
const char16_t s1[] = u8"ab"; // { dg-error "from non-wide" }
diff --git a/gcc/testsuite/g++.dg/ext/va-arg1.C b/gcc/testsuite/g++.dg/ext/va-arg1.C
index 079db2e5c6..5606128e5f 100644
--- a/gcc/testsuite/g++.dg/ext/va-arg1.C
+++ b/gcc/testsuite/g++.dg/ext/va-arg1.C
@@ -4,5 +4,5 @@ struct A {};
void foo()
{
- ++__builtin_va_arg(0, A); // { dg-error "'\\+\\+va_arg\\(0, A\\)'" }
+ ++__builtin_va_arg(0, A); // { dg-error "operand type is 'A'" }
}
diff --git a/gcc/testsuite/g++.dg/ext/vector17.C b/gcc/testsuite/g++.dg/ext/vector17.C
new file mode 100644
index 0000000000..eb389be01a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector17.C
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+typedef double __attribute__((vector_size(1024) )) vec;
+
+template <class T>
+void f (T *p)
+{
+ p->~T();
+}
+void g (vec *p)
+{
+ f(p);
+}
diff --git a/gcc/testsuite/g++.dg/ext/vector18.C b/gcc/testsuite/g++.dg/ext/vector18.C
new file mode 100644
index 0000000000..402558ef93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector18.C
@@ -0,0 +1,13 @@
+/* { dg-do compile { target c++11 } } */
+
+typedef signed char __attribute__((vector_size(128) )) vec;
+
+template <class A, class B>
+auto f (A *a, B b) -> decltype (*a + b);
+
+void f (...) {}
+
+void g (vec *v, long long l)
+{
+ f (v, l);
+}
diff --git a/gcc/testsuite/g++.dg/ext/vector19.C b/gcc/testsuite/g++.dg/ext/vector19.C
new file mode 100644
index 0000000000..a41e8d5170
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector19.C
@@ -0,0 +1,51 @@
+/* { dg-do compile { target c++11 } } */
+
+typedef double vec __attribute__((vector_size(2*sizeof(double))));
+typedef signed char vec2 __attribute__((vector_size(16)));
+typedef unsigned char vec2u __attribute__((vector_size(16)));
+
+void f (vec *x, vec *y, vec *z)
+{
+ *x = (*y < *z) ? *x : *y;
+}
+
+void g (vec *x, vec *y, vec *z)
+{
+ *x = (*y < *z) ? *x : 42;
+}
+
+void h (vec *x, vec *y, vec *z)
+{
+ *x = (*y < *z) ? 3. : *y;
+}
+
+void i1 (vec *x, vec *y, vec *z)
+{
+ auto c = *y < *z;
+ *x = c ? *x : *y;
+}
+
+void i2 (vec2 *x, vec2 *y, vec2u *z)
+{
+ *x = *y ? *x : *y;
+ *y = *z ? *x : *y;
+}
+
+void j (vec2 *x, vec2 *y, vec2 *z, vec *t)
+{
+ *x = (*y < *z) ? *x : 4.2; /* { dg-error "" } */
+ *y = (*x < *z) ? 2.5 : *y; /* { dg-error "" } */
+ *t = *t ? *t : *t; /* { dg-error "" } */
+ *z = (*x < *z) ? '1' : '0';
+}
+
+template <class A, class B>
+auto k (A *a, B b) -> decltype (*a ? *a : b);
+
+void k (...) {}
+
+void l (vec2 *v, double x)
+{
+ k (v, x);
+}
+
diff --git a/gcc/testsuite/g++.dg/ext/vector20.C b/gcc/testsuite/g++.dg/ext/vector20.C
new file mode 100644
index 0000000000..2199a22e48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector20.C
@@ -0,0 +1,6 @@
+/* { dg-do compile { target c++11 } } */
+
+typedef long vec __attribute__((vector_size (2 * sizeof (long))));
+constexpr vec v = { 3, 4 };
+constexpr vec s = v + v;
+constexpr vec w = __builtin_shuffle (v, v);
diff --git a/gcc/testsuite/g++.dg/ext/vector21.C b/gcc/testsuite/g++.dg/ext/vector21.C
new file mode 100644
index 0000000000..71634c3278
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector21.C
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-gimple" } */
+
+typedef int vec __attribute__ ((vector_size (4 * sizeof (int))));
+
+void f1 (vec *x)
+{
+ *x = (*x >= 0) ? *x : -*x;
+}
+void f2 (vec *x)
+{
+ *x = (0 < *x) ? *x : -*x;
+}
+void g1 (vec *x)
+{
+ *x = (*x < 0) ? -*x : *x;
+}
+void g2 (vec *x)
+{
+ *x = (0 > *x) ? -*x : *x;
+}
+void h (vec *x, vec *y)
+{
+ *x = (*x < *y) ? *y : *x;
+}
+void i (vec *x, vec *y)
+{
+ *x = (*x < *y) ? *x : *y;
+}
+void j (vec *x, vec *y)
+{
+ *x = (*x < *y) ? *x : *x;
+}
+
+/* { dg-final { scan-tree-dump-times "ABS_EXPR" 4 "gimple" } } */
+/* { dg-final { scan-tree-dump "MIN_EXPR" "gimple" } } */
+/* { dg-final { scan-tree-dump "MAX_EXPR" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/ext/vector22.C b/gcc/testsuite/g++.dg/ext/vector22.C
new file mode 100644
index 0000000000..7c0279c68a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector22.C
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-gimple" } */
+
+typedef unsigned vec __attribute__((vector_size(4*sizeof(int))));
+
+/* Disabled after PR57286
+void f(vec*a,vec*b){
+ *a=(*a)?-1:(*b<10);
+ *b=(*b)?(*a<10):0;
+}
+*/
+void g(vec*a,vec*b){
+ *a=(*a)?(*a<*a):-1;
+ *b=(*b)?-1:(*b<*b);
+}
+void h(vec*a){
+ *a=(~*a==5);
+}
+
+/* { dg-final { scan-tree-dump-not "~" "gimple" } } */
+/* { dg-final { scan-tree-dump-not "VEC_COND_EXPR" "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/ext/vector23.C b/gcc/testsuite/g++.dg/ext/vector23.C
new file mode 100644
index 0000000000..461d8a9e96
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector23.C
@@ -0,0 +1,28 @@
+/* { dg-do compile { target c++1y } } */
+/* { dg-options "-Wsign-conversion" } */
+// Ignore warning on some powerpc-linux configurations.
+// { dg-prune-output "non-standard ABI extension" }
+// Ignore warning on Linux/x86
+// { dg-prune-output "changes the ABI" }
+
+typedef double vecd __attribute__((vector_size(4*sizeof(double))));
+typedef float vecf __attribute__((vector_size(8*sizeof(float))));
+typedef long vecl __attribute__((vector_size(4*sizeof(long))));
+typedef short vecs __attribute__((vector_size(8*sizeof(short))));
+typedef char vecc __attribute__((vector_size(16*sizeof(char))));
+
+auto f(vecf*a,float d,long long i){
+ return (*a<0)?d:i; // { dg-error "truncation" }
+}
+auto g(vecc*a){
+ return (*a<0)?3LL:42UL; // { dg-error "inferred scalar type" }
+}
+auto h(vecd*a){
+ return (*a<0)?'a':'c'; // { dg-error "inferred scalar type \[^\\n\]*double" }
+}
+auto i(vecc*a){
+ return (*a<0)?1:0.; // { dg-error "inferred scalar type" }
+}
+auto j(vecl*a,long i,unsigned long k){
+ return (*a<0)?i:k; // { dg-warning "may change the sign" }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vector24.C b/gcc/testsuite/g++.dg/ext/vector24.C
new file mode 100644
index 0000000000..3eca7fb0bf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector24.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+
+typedef long vec __attribute__((vector_size(2*sizeof(long))));
+constexpr vec v = { 33, 42 };
+constexpr auto l0 = v[0];
+constexpr auto l1 = v[1];
+static_assert(l0==33,"Fail");
+static_assert(l1==42,"Fail");
diff --git a/gcc/testsuite/g++.dg/ext/vector25.C b/gcc/testsuite/g++.dg/ext/vector25.C
new file mode 100644
index 0000000000..6c1f5d0987
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector25.C
@@ -0,0 +1,6 @@
+volatile int i __attribute__((vector_size(8)));
+
+void foo()
+{
+ i += i;
+}
diff --git a/gcc/testsuite/g++.dg/ext/vector26.C b/gcc/testsuite/g++.dg/ext/vector26.C
new file mode 100644
index 0000000000..1d7a1e4716
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector26.C
@@ -0,0 +1,9 @@
+// PR c++/59633
+// In C++98, the definition of bar is an error. In C++11, bar implicitly
+// gets internal linkage.
+// { dg-options "-mmmx" { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+
+typedef enum { e } T __attribute__((vector_size(8)));
+static void foo(T t) {}
+void bar (T t) {} // { dg-error "no linkage" "" { target { ! c++11 } } }
+// { dg-final { scan-assembler-not "globl\[ \t]*_Z3bar" { target c++11 } } }
diff --git a/gcc/testsuite/g++.dg/ext/vector27.C b/gcc/testsuite/g++.dg/ext/vector27.C
new file mode 100644
index 0000000000..288e13c558
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vector27.C
@@ -0,0 +1,7 @@
+// PR c++/58845
+
+void foo()
+{
+ int v __attribute__((vector_size(8)));
+ v = v || v; // { dg-bogus "" "" { xfail *-*-* } }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vector5.C b/gcc/testsuite/g++.dg/ext/vector5.C
index e5304bcb12..68f711fe23 100644
--- a/gcc/testsuite/g++.dg/ext/vector5.C
+++ b/gcc/testsuite/g++.dg/ext/vector5.C
@@ -4,5 +4,5 @@
void foo()
{
int __attribute__((vector_size(8))) v;
- v = 1/v; // { dg-error "invalid operands of types" }
+ v = 1/v;
}
diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon6.C b/gcc/testsuite/g++.dg/ext/visibility/anon6.C
index 951de4964e..c55432add8 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/anon6.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/anon6.C
@@ -1,9 +1,11 @@
// PR c++/33094
// { dg-final { scan-assembler "1BIiE1cE" } }
// { dg-final { scan-assembler-not "globl.*1BIiE1cE" } }
-// { dg-final { scan-assembler-not "1CIiE1cE" } }
+// { dg-final { scan-assembler-not "comdat" } }
+// { dg-final { scan-assembler-not "weak" } }
+// { dg-final { scan-assembler-not "1AIiE1cE" } }
-// Test that B<int>::c is emitted as an internal symbol, and C<int>::c is
+// Test that B<int>::c is emitted as an internal symbol, and A<int>::c is
// not emitted.
namespace
@@ -18,7 +20,7 @@ namespace
template <typename T>
class B
{
- static const T c = 0;
+ __attribute__ ((__used__)) static const T c = 0;
};
template <typename T> const T B<T>::c;
diff --git a/gcc/testsuite/g++.dg/ext/visibility/anon8.C b/gcc/testsuite/g++.dg/ext/visibility/anon8.C
index 5e58b55199..b8507497d3 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/anon8.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/anon8.C
@@ -29,5 +29,5 @@ int main ()
call<&B2::fn2> (); // { dg-error "linkage|no matching" }
call<&fn3> ();
call<&B1::fn4> ();
- call<&fn5> (); // { dg-error "linkage|no matching" "" { target c++98 } }
+ call<&fn5> (); // { dg-error "linkage|no matching" "" { target { ! c++11 } } }
}
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
index 4300d1ab16..c13161d3ce 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override1.C
@@ -1,7 +1,7 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
/* { dg-require-visibility "internal" } */
-/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
+/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! { *-*-solaris2* *-*-darwin* } } } } } */
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
#pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
index f566cd2f41..25e9ceac07 100644
--- a/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
+++ b/gcc/testsuite/g++.dg/ext/visibility/pragma-override2.C
@@ -1,7 +1,7 @@
/* Test that #pragma GCC visibility does not override class member specific settings. */
/* { dg-do compile } */
/* { dg-require-visibility "internal" } */
-/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! *-*-solaris2* } } } } */
+/* { dg-final { scan-assembler "\\.internal.*Foo.methodEv" { target { ! { *-*-solaris2* *-*-darwin* } } } } } */
/* { dg-final { scan-assembler "\\.(internal|hidden).*Foo.methodEv" { target *-*-solaris2* } } } */
#pragma GCC visibility push(hidden)
diff --git a/gcc/testsuite/g++.dg/ext/visibility/template11.C b/gcc/testsuite/g++.dg/ext/visibility/template11.C
new file mode 100644
index 0000000000..fb47fe2aff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/visibility/template11.C
@@ -0,0 +1,20 @@
+// PR c++/51930
+// { dg-require-visibility "" }
+// { dg-options "-fvisibility=hidden" }
+// { dg-final { scan-not-hidden "_ZN13template_testI4testE8functionEv" } }
+
+struct test { };
+
+template<typename T>
+struct template_test
+{
+ __attribute__((visibility("default")))
+ void function();
+};
+
+template<typename T>
+void template_test<T>::function() { }
+
+template
+struct __attribute__((visibility("default")))
+template_test<test>;
diff --git a/gcc/testsuite/g++.dg/ext/vla1.C b/gcc/testsuite/g++.dg/ext/vla1.C
index f3725354fc..55ae5c8af0 100644
--- a/gcc/testsuite/g++.dg/ext/vla1.C
+++ b/gcc/testsuite/g++.dg/ext/vla1.C
@@ -9,7 +9,7 @@ class A { A (int); };
A::A (int i)
{
- int ar[1][i]; // { dg-error "variable length array" }
+ int ar[1][i]; // { dg-error "array" }
ar[0][0] = 0;
}
diff --git a/gcc/testsuite/g++.dg/ext/vla11.C b/gcc/testsuite/g++.dg/ext/vla11.C
index 8f3be9e56c..e448be325f 100644
--- a/gcc/testsuite/g++.dg/ext/vla11.C
+++ b/gcc/testsuite/g++.dg/ext/vla11.C
@@ -1,5 +1,6 @@
// Test that auto works with VLAs.
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
+// { dg-options "" { target { ! c++1y } } }
void bar(int n)
{
diff --git a/gcc/testsuite/g++.dg/ext/vla12.C b/gcc/testsuite/g++.dg/ext/vla12.C
new file mode 100644
index 0000000000..bca836507a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla12.C
@@ -0,0 +1,28 @@
+// VLA sizeof test
+// { dg-do compile }
+// { dg-options "" }
+
+int
+f1 (int i)
+{
+ char a[sizeof (i) + 6 + i];
+ char b[sizeof (a) + 1];
+ return sizeof (b);
+}
+
+int
+f2 (int i)
+{
+ char a[sizeof (i) + 6 + i];
+ char b[sizeof (a)];
+ return sizeof (b);
+}
+
+int
+f3 (int i)
+{
+ char a[sizeof (i) + 6 + i];
+ char b[sizeof (i) + i];
+ char c[sizeof (a) + sizeof (b) + 7];
+ return sizeof (c);
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla13.C b/gcc/testsuite/g++.dg/ext/vla13.C
new file mode 100644
index 0000000000..719c35b16b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla13.C
@@ -0,0 +1,8 @@
+// PR c++/54583
+// { dg-options "-Wunused-value" }
+
+void fred()
+{
+ int n=10;
+ double (*x)[n];
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla14.C b/gcc/testsuite/g++.dg/ext/vla14.C
new file mode 100644
index 0000000000..278cb63b93
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla14.C
@@ -0,0 +1,23 @@
+// PR c++/21113
+// { dg-options "" }
+
+void
+f (int n)
+{
+ goto label; // { dg-error "from here" }
+ int a[n]; // { dg-error "crosses initialization" }
+label: // { dg-error "jump to label" }
+ ;
+}
+
+void
+g (int n)
+{
+ switch (1)
+ {
+ case 1:
+ int (*a)[n]; // { dg-error "crosses initialization" }
+ default: // { dg-error "jump to case label" }
+ ;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla15.C b/gcc/testsuite/g++.dg/ext/vla15.C
new file mode 100644
index 0000000000..feeb49ff28
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/vla15.C
@@ -0,0 +1,20 @@
+// PR c++/44613
+// { dg-do run }
+// { dg-options "" }
+
+void *volatile p;
+
+int
+main (void)
+{
+ int n = 0;
+ lab:;
+ int x[n % 1000 + 1];
+ x[0] = 1;
+ x[n % 1000] = 2;
+ p = x;
+ n++;
+ if (n < 1000000)
+ goto lab;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ext/vla4.C b/gcc/testsuite/g++.dg/ext/vla4.C
index ecec908074..90e4160679 100644
--- a/gcc/testsuite/g++.dg/ext/vla4.C
+++ b/gcc/testsuite/g++.dg/ext/vla4.C
@@ -6,7 +6,7 @@
void f(int i) {
try {
int a[i];
- throw &a; // { dg-error "variable size" }
+ throw &a; // { dg-error "int \\(\\*\\)\\\[i\\\]" }
} catch (int (*)[i]) { // { dg-error "variable size" }
}
}
diff --git a/gcc/testsuite/g++.dg/ext/vla5.C b/gcc/testsuite/g++.dg/ext/vla5.C
index 021d484694..ca58309176 100644
--- a/gcc/testsuite/g++.dg/ext/vla5.C
+++ b/gcc/testsuite/g++.dg/ext/vla5.C
@@ -6,5 +6,5 @@
void
test (int a)
{
- new (char[a]);
+ new (char[a]); // { dg-warning "parentheses" }
}
diff --git a/gcc/testsuite/g++.dg/ext/vla8.C b/gcc/testsuite/g++.dg/ext/vla8.C
index 7b7428d07a..9e2d6bdad4 100644
--- a/gcc/testsuite/g++.dg/ext/vla8.C
+++ b/gcc/testsuite/g++.dg/ext/vla8.C
@@ -8,8 +8,8 @@ struct AvlTreeIter
AvlTreeIter()
{
- new (void* [Num()]);
+ new (void* [Num()]); // { dg-warning "parentheses" }
}
};
-AvlTreeIter<int> a;
+AvlTreeIter<int> a; // { dg-message "from here" }
diff --git a/gcc/testsuite/g++.dg/ext/weak5.C b/gcc/testsuite/g++.dg/ext/weak5.C
new file mode 100644
index 0000000000..f2924a0b6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ext/weak5.C
@@ -0,0 +1,12 @@
+// PR c++/36107
+// { dg-do assemble }
+// { dg-require-weak "" }
+
+class Test {
+ public:
+ Test() __attribute__((weak));
+};
+
+void test() {
+ Test test;
+}
diff --git a/gcc/testsuite/g++.dg/fstack-protector-strong.C b/gcc/testsuite/g++.dg/fstack-protector-strong.C
new file mode 100644
index 0000000000..a4f0f81631
--- /dev/null
+++ b/gcc/testsuite/g++.dg/fstack-protector-strong.C
@@ -0,0 +1,35 @@
+/* Test that stack protection is done on chosen functions. */
+
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fstack-protector-strong" } */
+
+class A
+{
+public:
+ A() {}
+ ~A() {}
+ void method();
+ int state;
+};
+
+/* Frame address exposed to A::method via "this". */
+int
+foo1 ()
+{
+ A a;
+ a.method ();
+ return a.state;
+}
+
+/* Possible destroying foo2's stack via &a. */
+int
+global_func (A& a);
+
+/* Frame address exposed to global_func. */
+int foo2 ()
+{
+ A a;
+ return global_func (a);
+}
+
+/* { dg-final { scan-assembler-times "stack_chk_fail" 2 } } */
diff --git a/gcc/testsuite/g++.dg/gcov/gcov-8.C b/gcc/testsuite/g++.dg/gcov/gcov-8.C
new file mode 100644
index 0000000000..7acab4672f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gcov/gcov-8.C
@@ -0,0 +1,35 @@
+/* Verify that intermediate coverage format can be generated for simple code. */
+
+/* { dg-options "-fprofile-arcs -ftest-coverage" } */
+/* { dg-do run { target native } } */
+
+class C {
+public:
+ C()
+ {
+ i = 0;
+ }
+ ~C() {}
+ void seti (int j)
+ {
+ if (j > 0)
+ i = j;
+ else
+ i = 0;
+ }
+private:
+ int i;
+};
+
+void foo()
+{
+ C c;
+ c.seti (1);
+}
+
+int main()
+{
+ foo();
+}
+
+/* { dg-final { run-gcov intermediate { -i -b gcov-8.C } } } */
diff --git a/gcc/testsuite/g++.dg/gcov/gcov.exp b/gcc/testsuite/g++.dg/gcov/gcov.exp
index 73703dcaf9..892baa8274 100644
--- a/gcc/testsuite/g++.dg/gcov/gcov.exp
+++ b/gcc/testsuite/g++.dg/gcov/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2001, 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/gomp/block-0.C b/gcc/testsuite/g++.dg/gomp/block-0.C
index fa7865d8b9..86af0404ab 100644
--- a/gcc/testsuite/g++.dg/gomp/block-0.C
+++ b/gcc/testsuite/g++.dg/gomp/block-0.C
@@ -22,8 +22,10 @@ void foo()
bar ();
#pragma omp parallel sections
{
- bar ();
- bar ();
+ {
+ bar ();
+ bar ();
+ }
#pragma omp section
bar ();
}
diff --git a/gcc/testsuite/g++.dg/gomp/block-3.C b/gcc/testsuite/g++.dg/gomp/block-3.C
index aeb0c7795a..ff28175284 100644
--- a/gcc/testsuite/g++.dg/gomp/block-3.C
+++ b/gcc/testsuite/g++.dg/gomp/block-3.C
@@ -35,8 +35,10 @@ void foo()
#pragma omp sections
{
- goto ok1;
- ok1:;
+ {
+ goto ok1;
+ ok1:;
+ }
#pragma omp section
for (i = 0; i < 10; ++i)
diff --git a/gcc/testsuite/g++.dg/gomp/clause-3.C b/gcc/testsuite/g++.dg/gomp/clause-3.C
index a048c60b8a..1a20440d7c 100644
--- a/gcc/testsuite/g++.dg/gomp/clause-3.C
+++ b/gcc/testsuite/g++.dg/gomp/clause-3.C
@@ -11,7 +11,7 @@ int t;
void
foo (int x)
{
- char *p;
+ char *pp;
struct S { int i; int j; } s;
char a[32];
double d;
@@ -42,18 +42,18 @@ foo (int x)
;
#pragma omp p firstprivate (bar) // { dg-error "is not a variable" }
;
-#pragma omp p reduction (+:p) // { dg-error "has invalid type for" }
+#pragma omp p reduction (+:pp) // { dg-error "user defined reduction not found for" }
;
-#pragma omp p reduction (*:s) // { dg-error "has invalid type for" }
+#pragma omp p reduction (*:s) // { dg-error "user defined reduction not found for" }
;
#pragma omp p reduction (-:a) // { dg-error "has invalid type for" }
;
d = 0;
#pragma omp p reduction (*:d)
;
-#pragma omp p reduction (|:d) // { dg-error "has invalid type for" }
+#pragma omp p reduction (|:d) // { dg-error "user defined reduction not found for" }
;
-#pragma omp p reduction (&&:d) // { dg-error "has invalid type for" }
+#pragma omp p reduction (&&:d) // { dg-error "user defined reduction not found for" }
;
#pragma omp p copyin (d) // { dg-error "must be 'threadprivate'" }
;
diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-1.C b/gcc/testsuite/g++.dg/gomp/declare-simd-1.C
new file mode 100644
index 0000000000..4b2812fb6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/declare-simd-1.C
@@ -0,0 +1,243 @@
+// Test parsing of #pragma omp declare simd
+// { dg-do compile }
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) \
+ linear (c : 4) simdlen (8) notinbranch
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a \
+ : 4) simdlen (4) inbranch
+int f1 (int a, int *b, int c);
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int f2 (int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+template <typename T>
+T f3 (int a, int *b, T c);
+
+template <>
+int f3 (int, int *, int);
+
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) notinbranch simdlen (4)
+template <typename T>
+int f4 (int a, int *b, T c)
+{
+ return a + *b + c;
+}
+
+template <>
+int f4 (int, int *, int);
+
+template <typename T>
+int f5 (int a, int *b, T c);
+
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+template <>
+int f5 (int a, int *b, int c);
+
+template <int N>
+int f6 (int a, int *b, int c);
+
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) inbranch simdlen (4)
+template <>
+int f6<3> (int a, int *b, int c);
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (long long)) linear (c : 4) simdlen (8)
+__extension__
+long long f7 (long long a, long long *b, long long c);
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) notinbranch simdlen (8)
+extern "C"
+int f8 (int a, int *b, int c);
+
+extern "C"
+{
+ #pragma omp declare simd
+ int f9 (int a, int *b, int c);
+}
+
+namespace N1
+{
+ namespace N2
+ {
+ #pragma omp declare simd simdlen (2) aligned (b : sizeof (long long) * 2)
+ __extension__ long long
+ f10 (long long *b)
+ {
+ return *b;
+ }
+ }
+}
+
+struct A
+{
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ int f11 (int a, int *b, int c);
+
+ #pragma omp declare simd
+ template <int N>
+ int f12 (int a, int *b, int c);
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) notinbranch simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4) inbranch
+ static int f13 (int a, int *b, int c);
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ int f14 (int a, int *b, int c) { return a + *b + c; }
+
+ #pragma omp declare simd
+ template <int N>
+ int f15 (int a, int *b, int c) { return a + *b + c; }
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ static int f16 (int a, int *b, int c) { return a + *b + c; }
+};
+
+template <>
+int A::f12<2> (int, int *, int);
+
+template <>
+int A::f15<2> (int, int *, int);
+
+template <typename T>
+struct B
+{
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8) notinbranch
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4) inbranch
+ int f17 (int a, int *b, int c);
+
+ #pragma omp declare simd
+ template <int N>
+ int f18 (int a, int *b, int c);
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ static int f19 (int a, int *b, int c);
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ int f20 (int a, int *b, int c) { return a + *b + c; }
+
+ #pragma omp declare simd
+ template <int N>
+ int f21 (int a, int *b, int c) { return a + *b + c; }
+
+ #pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+ #pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a : 4) simdlen (4)
+ static int f22 (int a, int *b, int c) { return a + *b + c; }
+
+ template <int N>
+ int f23 (int, int *, int);
+
+ template <int N>
+ static int f24 (int, int *, int);
+
+ template <int N>
+ int f25 (int, int *, int);
+
+ template <int N>
+ static int f26 (int, int *, int);
+};
+
+B <int> b;
+
+template <>
+template <>
+int B<int>::f18<0> (int, int *, int);
+
+template <>
+template <>
+int B<int>::f21<9> (int, int *, int);
+
+#pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int)) uniform (a, c)
+template <>
+template <>
+int B<int>::f23<7> (int a, int *b, int c);
+
+#pragma omp declare simd simdlen (4) aligned (b : 8 * sizeof (int)) linear (a, c : 2)
+template <>
+template <>
+int B<int>::f24<-1> (int a, int *b, int c);
+
+#pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int)) uniform (a, c)
+template <>
+template <>
+int B<int>::f25<7> (int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd simdlen (4) aligned (b : 8 * sizeof (int)) linear (a, c : 2)
+template <>
+template <>
+int B<int>::f26<-1> (int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+int
+f27 (int x)
+{
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f28 (int a, int *b, int c);
+ {
+ x++;
+ #pragma omp declare simd simdlen (4) linear (c)
+ extern int f29 (int a, int *b, int c);
+ }
+ return x;
+}
+
+#pragma omp declare simd simdlen (16)
+int
+f30 (int x)
+{
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f31 (int a, int *b, int c);
+ return x;
+}
+
+template <int N>
+struct C
+{
+ #pragma omp declare simd simdlen (N) aligned (b : N * sizeof (int)) linear (c : N) notinbranch
+ int f32 (int a, int *b, int c);
+};
+
+C <2> c;
+
+int
+f33 (int x)
+{
+ if (x)
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f34 (int a, int *b, int c);
+ while (x < 10)
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f35 (int a, int *b, int c);
+ return x;
+}
+
+#pragma omp declare simd simdlen (N)
+template <int N>
+int f36 (int);
+
+struct D
+{
+ int d;
+ #pragma omp declare simd simdlen (N) linear (a : sizeof (a) + sizeof (d) + sizeof (this) + sizeof (this->d))
+ template <int N>
+ int f37 (int a);
+ int e;
+};
+
+void
+f38 (D &d)
+{
+ d.f37 <16> (6);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/declare-simd-2.C b/gcc/testsuite/g++.dg/gomp/declare-simd-2.C
new file mode 100644
index 0000000000..a6151015ba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/declare-simd-2.C
@@ -0,0 +1,98 @@
+// Test parsing of #pragma omp declare simd
+// { dg-do compile }
+
+#pragma omp declare simd
+int a; // { dg-error "not immediately followed by function declaration or definition" }
+
+#pragma omp declare simd
+int fn1 (int a), fn2 (int a); // { dg-error "not immediately followed by a single function declaration or definition" }
+
+#pragma omp declare simd
+int b, fn3 (int a); // { dg-error "not immediately followed by function declaration or definition" }
+
+#pragma omp declare simd linear (a)
+int fn4 (int a), c; // { dg-error "not immediately followed by function declaration or definition" }
+
+#pragma omp declare simd
+extern "C" // { dg-error "not immediately followed by function declaration or definition" }
+{
+ int fn5 (int a);
+}
+
+#pragma omp declare simd // { dg-error "not immediately followed by function declaration or definition" }
+namespace N1
+{
+ int fn6 (int a);
+}
+
+#pragma omp declare simd simdlen (4)
+struct A
+{ // { dg-error "not immediately followed by function declaration or definition" }
+ int fn7 (int a);
+};
+
+#pragma omp declare simd
+template <typename T>
+struct B
+{ // { dg-error "not immediately followed by function declaration or definition" }
+ int fn8 (int a);
+};
+
+struct C
+{
+#pragma omp declare simd // { dg-error "not immediately followed by function declaration or definition" }
+ public: // { dg-error "expected unqualified-id before" }
+ int fn9 (int a);
+};
+
+int t;
+
+#pragma omp declare simd
+#pragma omp declare simd
+#pragma omp threadprivate(t) // { dg-error "not immediately followed by function declaration or definition" }
+int fn10 (int a);
+
+#pragma omp declare simd inbranch notinbranch // { dg-error "clause is incompatible with" }
+int fn11 (int);
+
+struct D
+{
+ int d;
+ #pragma omp declare simd simdlen (N) linear (a : sizeof (e) + sizeof (this->e)) // { dg-error "was not declared" }
+ template <int N>
+ int fn12 (int a);
+ int e;
+};
+
+#pragma omp declare simd aligned (a, b, c, d)
+int fn13 (int *a, int b[64], int *&c, int (&d)[64]);
+
+#pragma omp declare simd aligned (a) // { dg-error "neither a pointer nor an array" }
+int fn14 (int a);
+
+#pragma omp declare simd aligned (b) // { dg-error "neither a pointer nor an array" }
+int fn14 (int &b);
+
+#pragma omp declare simd aligned (c) // { dg-error "neither a pointer nor an array" }
+int fn14 (float c);
+
+#pragma omp declare simd aligned (d) // { dg-error "neither a pointer nor an array" }
+int fn14 (double &d);
+
+#pragma omp declare simd aligned (e) // { dg-error "neither a pointer nor an array" }
+int fn14 (D e);
+
+#pragma omp declare simd linear(a:7) uniform(a) // { dg-error "appears more than once" }
+int f15 (int a);
+#pragma omp declare simd linear(a) linear(a) // { dg-error "appears more than once" }
+int f16 (int a);
+#pragma omp declare simd linear(a) linear(a:7) // { dg-error "appears more than once" }
+int f17 (int a);
+#pragma omp declare simd linear(a:6) linear(a:6)// { dg-error "appears more than once" }
+int f18 (int a);
+#pragma omp declare simd uniform(a) uniform(a) // { dg-error "appears more than once" }
+int f19 (int a);
+#pragma omp declare simd uniform(a) aligned (a: 32)
+int f20 (int *a);
+
+// { dg-error "has no member" "" { target *-*-* } 61 }
diff --git a/gcc/testsuite/g++.dg/gomp/depend-1.C b/gcc/testsuite/g++.dg/gomp/depend-1.C
new file mode 100644
index 0000000000..33027de552
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/depend-1.C
@@ -0,0 +1,70 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+extern int a[][10], a2[][10];
+int b[10], c[10][2], d[10], e[10], f[10];
+int b2[10], c2[10][2], d2[10], e2[10], f2[10];
+int k[10], l[10], m[10], n[10], o;
+int *p;
+void bar (void);
+int t[10];
+#pragma omp threadprivate (t)
+
+template <int N>
+void
+foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
+ int g2[3][10], int h2[4][8], int i2[2][10], int j2[][9])
+{
+ #pragma omp task depend(out: t[2:5])
+ ;
+ #pragma omp task depend(inout: k[0.5:]) // { dg-error "low bound \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(in: l[:7.5f]) // { dg-error "length \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(out: m[p:]) // { dg-error "low bound \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(inout: n[:p]) // { dg-error "length \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(in: o[2:5]) // { dg-error "does not have pointer or array type" }
+ ;
+ #pragma omp task depend(out: a[:][2:4]) // { dg-error "array type length expression must be specified" }
+ ;
+ #pragma omp task depend(in: d[11:]) // { dg-error "low bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: e[:11]) // { dg-error "length \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: f[1:10]) // { dg-error "high bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(in: g[:][2:4]) // { dg-error "for pointer type length expression must be specified" }
+ ;
+ #pragma omp task depend(out: i[:1][11:]) // { dg-error "low bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(in: j[3:4][:10]) // { dg-error "length \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: j[30:10][5:5]) // { dg-error "high bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: a2[:3][2:4])
+ ;
+ #pragma omp task depend(inout: b2[0:])
+ ;
+ #pragma omp task depend(inout: c2[:3][1:1])
+ ;
+ #pragma omp task depend(in: d2[9:])
+ ;
+ #pragma omp task depend(out: e2[:10])
+ ;
+ #pragma omp task depend(out: f2[1:9])
+ ;
+ #pragma omp task depend(in: g2[:2][2:4])
+ ;
+ #pragma omp task depend(in: h2[2:2][0:])
+ ;
+ #pragma omp task depend(inout: h2[:1][:3])
+ ;
+ #pragma omp task depend(out: i2[:1][9:])
+ ;
+ #pragma omp task depend(in: j2[3:4][:9])
+ ;
+ #pragma omp task depend(out: j2[30:10][5:4])
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/depend-2.C b/gcc/testsuite/g++.dg/gomp/depend-2.C
new file mode 100644
index 0000000000..c3f19658c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/depend-2.C
@@ -0,0 +1,87 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+extern int a[][10], a2[][10];
+int b[10], c[10][2], d[10], e[10], f[10];
+int b2[10], c2[10][2], d2[10], e2[10], f2[10];
+int k[10], l[10], m[10], n[10], o;
+int *p;
+void bar (void);
+int t[10];
+#pragma omp threadprivate (t)
+
+template <int N>
+void
+foo (int g[3][10], int h[4][8], int i[2][10], int j[][9],
+ int g2[3][10], int h2[4][8], int i2[2][10], int j2[][9])
+{
+ #pragma omp task depend(in: bar[2:5]) // { dg-error "is not a variable" }
+ ;
+ #pragma omp task depend(out: t[2:5])
+ ;
+ #pragma omp task depend(inout: k[0.5:]) // { dg-error "low bound \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(in: l[:7.5f]) // { dg-error "length \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(out: m[p:]) // { dg-error "low bound \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(inout: n[:p]) // { dg-error "length \[^\n\r]* of array section does not have integral type" }
+ ;
+ #pragma omp task depend(in: o[2:5]) // { dg-error "does not have pointer or array type" }
+ ;
+ #pragma omp task depend(out: a[:][2:4]) // { dg-error "array type length expression must be specified" }
+ ;
+ #pragma omp task depend(inout: b[-1:]) // { dg-error "negative low bound in array section" }
+ ;
+ #pragma omp task depend(inout: c[:-3][1:1]) // { dg-error "negative length in array section" }
+ ;
+ #pragma omp task depend(in: d[11:]) // { dg-error "low bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: e[:11]) // { dg-error "length \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: f[1:10]) // { dg-error "high bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(in: g[:][2:4]) // { dg-error "for pointer type length expression must be specified" }
+ ;
+ #pragma omp task depend(in: h[2:2][-1:]) // { dg-error "negative low bound in array section" }
+ ;
+ #pragma omp task depend(inout: h[:1][:-3]) // { dg-error "negative length in array section" }
+ ;
+ #pragma omp task depend(out: i[:1][11:]) // { dg-error "low bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(in: j[3:4][:10]) // { dg-error "length \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: j[30:10][5:5]) // { dg-error "high bound \[^\n\r]* above array section size" }
+ ;
+ #pragma omp task depend(out: a2[:3][2:4])
+ ;
+ #pragma omp task depend(inout: b2[0:])
+ ;
+ #pragma omp task depend(inout: c2[:3][1:1])
+ ;
+ #pragma omp task depend(in: d2[9:])
+ ;
+ #pragma omp task depend(out: e2[:10])
+ ;
+ #pragma omp task depend(out: f2[1:9])
+ ;
+ #pragma omp task depend(in: g2[:2][2:4])
+ ;
+ #pragma omp task depend(in: h2[2:2][0:])
+ ;
+ #pragma omp task depend(inout: h2[:1][:3])
+ ;
+ #pragma omp task depend(out: i2[:1][9:])
+ ;
+ #pragma omp task depend(in: j2[3:4][:9])
+ ;
+ #pragma omp task depend(out: j2[30:10][5:4])
+ ;
+}
+
+void
+baz (int g[3][10], int h[4][8], int i[2][10], int j[][9],
+ int g2[3][10], int h2[4][8], int i2[2][10], int j2[][9])
+{
+ foo<0> (g, h, i, j, g2, h2, i2, j2);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/for-19.C b/gcc/testsuite/g++.dg/gomp/for-19.C
index 7c56719cc1..7da74a780a 100644
--- a/gcc/testsuite/g++.dg/gomp/for-19.C
+++ b/gcc/testsuite/g++.dg/gomp/for-19.C
@@ -8,8 +8,8 @@ template <typename T>
void
f1 (void)
{
-#pragma omp for // { dg-error "forbids incrementing a pointer of type" }
- for (void *q = (void *)p; q < (void *) (p + 4); q++) // { dg-error "forbids incrementing a pointer of type" }
+#pragma omp for
+ for (void *q = (void *)p; q < (void *) (p + 4); q++) // { dg-warning "forbids incrementing a pointer of type" }
;
}
@@ -26,8 +26,8 @@ template <typename T>
void
f3 (void)
{
-#pragma omp for // { dg-error "forbids incrementing a pointer of type" }
- for (T q = T (p); q < T (p + 4); q++)
+#pragma omp for
+ for (T q = T (p); q < T (p + 4); q++) // { dg-warning "forbids incrementing a pointer of type" }
;
}
diff --git a/gcc/testsuite/g++.dg/gomp/for-20.C b/gcc/testsuite/g++.dg/gomp/for-20.C
new file mode 100644
index 0000000000..7b57b16b85
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/for-20.C
@@ -0,0 +1,16 @@
+// PR c++/60146
+// { dg-do compile }
+// { dg-options -fopenmp }
+
+int foo() { return 0; }
+
+template<typename T> void bar()
+{
+#pragma omp parallel for
+ for (T i = foo(); i < 8; ++i) {}
+}
+
+void baz()
+{
+ bar<int>();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/gomp.exp b/gcc/testsuite/g++.dg/gomp/gomp.exp
index 445cea8998..bcb9ae3859 100644
--- a/gcc/testsuite/g++.dg/gomp/gomp.exp
+++ b/gcc/testsuite/g++.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -27,7 +27,9 @@ if ![check_effective_target_fopenmp] {
dg-init
# Main loop.
-g++-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/gomp/*.c]] "-fopenmp"
+g++-dg-runtest [lsort [concat \
+ [find $srcdir/$subdir *.C] \
+ [find $srcdir/c-c++-common/gomp *.c]]] "-fopenmp"
# All done.
dg-finish
diff --git a/gcc/testsuite/g++.dg/gomp/openmp-simd-1.C b/gcc/testsuite/g++.dg/gomp/openmp-simd-1.C
new file mode 100644
index 0000000000..e8e057a616
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/openmp-simd-1.C
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp-simd -fdump-tree-original" } */
+
+#pragma omp declare simd
+float bar(float b) {
+ return b*b;
+}
+
+void foo(int n, float *a, float *b)
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp teams distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp target teams distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp teams distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp target teams distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "pragma omp simd" 9 "original" } } */
+/* { dg-final { scan-tree-dump-not "omp for" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp distribute" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp teams" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp target" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp parallel" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/openmp-simd-2.C b/gcc/testsuite/g++.dg/gomp/openmp-simd-2.C
new file mode 100644
index 0000000000..ad9b441f21
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/openmp-simd-2.C
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp-simd -fdump-tree-original" } */
+
+extern void abort ();
+int a[1024] __attribute__((aligned (32))) = { 1 };
+struct S { int s; };
+#pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s)
+#pragma omp declare reduction (foo:struct S:omp_out.s += omp_in.s)
+#pragma omp declare reduction (foo:int:omp_out += omp_in)
+
+__attribute__((noinline, noclone)) int
+foo (void)
+{
+ int i, u = 0;
+ struct S s, t;
+ s.s = 0; t.s = 0;
+ #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u)
+ for (i = 0; i < 1024; i++)
+ {
+ int x = a[i];
+ s.s += x;
+ t.s += x;
+ u += x;
+ }
+ if (t.s != s.s || u != s.s)
+ abort ();
+ return s.s;
+}
+
+
+void bar(int n, float *a, float *b)
+{
+ int i;
+#pragma omp parallel for simd num_threads(4) safelen(64)
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "Function void omp declare reduction operator\\+" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "Function void omp declare reduction foo" 2 "original" } } */
+/* { dg-final { scan-tree-dump-times "pragma omp simd reduction\\(u\\) reduction\\(t\\) reduction\\(\\+:s\\) aligned\\(a:32\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "pragma omp simd safelen\\(64\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-not "omp parallel" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp for" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/g++.dg/gomp/pr34964.C b/gcc/testsuite/g++.dg/gomp/pr34964.C
index f5995a6da9..a02faa2a8d 100644
--- a/gcc/testsuite/g++.dg/gomp/pr34964.C
+++ b/gcc/testsuite/g++.dg/gomp/pr34964.C
@@ -2,5 +2,5 @@
// { dg-do compile }
// { dg-options "-fopenmp" }
-char x[] = 0; // { dg-error "initializer fails to determine size" }
+char x[] = 0; // { dg-error "initializer" }
#pragma omp threadprivate (x)
diff --git a/gcc/testsuite/g++.dg/gomp/pr38639.C b/gcc/testsuite/g++.dg/gomp/pr38639.C
index e7145ffbeb..834a03a4ca 100644
--- a/gcc/testsuite/g++.dg/gomp/pr38639.C
+++ b/gcc/testsuite/g++.dg/gomp/pr38639.C
@@ -1,12 +1,12 @@
// PR c++/38639
-// { dg-do compile }
-// { dg-options "-fopenmp -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fopenmp" }
template<int> void
foo ()
{
#pragma omp parallel for
- for (auto i = i = 0; i<4; ++i) // { dg-error "incomplete|unable|invalid" }
+ for (auto i = i = 0; i<4; ++i) // { dg-error "incomplete|unable|invalid|auto" }
;
}
diff --git a/gcc/testsuite/g++.dg/gomp/pr58567.C b/gcc/testsuite/g++.dg/gomp/pr58567.C
new file mode 100644
index 0000000000..35a5bb027f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr58567.C
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+/* PR c++/58567 - was ICEing before */
+
+template<typename T> void foo()
+{
+ #pragma omp parallel for
+ for (typename T::X i = 0; i < 100; ++i) /* { dg-error "'int' is not a class, struct, or union type|expected iteration declaration or initialization" } */
+ ;
+}
+
+void bar()
+{
+ foo<int>();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr58702.C b/gcc/testsuite/g++.dg/gomp/pr58702.C
new file mode 100644
index 0000000000..5bab86118b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr58702.C
@@ -0,0 +1,10 @@
+// PR c++/58702
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+void foo()
+{
+ x; // { dg-error "was not declared" }
+#pragma omp parallel for reduction(+:x)
+ for (int i = 0; i < 10; ++i) ;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr58874.C b/gcc/testsuite/g++.dg/gomp/pr58874.C
new file mode 100644
index 0000000000..be3f53e446
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr58874.C
@@ -0,0 +1,14 @@
+// PR c++/58874
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct A
+{
+ template<int> struct B
+ {
+ #pragma omp declare reduction (x : int : omp_out |= omp_in)
+ };
+};
+
+#pragma omp declare reduction (y : long : omp_out |= omp_in) \
+ initializer (omp_priv = 0)
diff --git a/gcc/testsuite/g++.dg/gomp/pr59150.C b/gcc/testsuite/g++.dg/gomp/pr59150.C
new file mode 100644
index 0000000000..103edb6491
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr59150.C
@@ -0,0 +1,25 @@
+// PR middle-end/59150
+// { dg-do compile }
+// { dg-options "-O -fopenmp-simd -fno-tree-ccp -fno-tree-copy-prop -fno-tree-dce" }
+
+#pragma omp declare reduction (foo: int: omp_out += omp_in) initializer (omp_priv = 0)
+
+int
+foo ()
+{
+ int i, v, &u = v;
+ #pragma omp simd reduction (foo:u)
+ for (i = 0; i < 1024; i++)
+ u = i;
+ return u;
+}
+
+int
+bar ()
+{
+ int i, v, &u = v;
+ #pragma omp simd reduction (foo:u) safelen(1)
+ for (i = 0; i < 1024; i++)
+ u = i;
+ return u;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr59297.C b/gcc/testsuite/g++.dg/gomp/pr59297.C
new file mode 100644
index 0000000000..330ed2e00b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr59297.C
@@ -0,0 +1,25 @@
+// PR c++/59297
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+template <typename T>
+struct A
+{
+ ~A ();
+ const T &operator[] (int) const;
+};
+
+struct B
+{
+ int &operator () (A <int>);
+};
+
+void
+foo (B &x, int &z)
+{
+ A<A<int> > y;
+ #pragma omp atomic
+ x (y[0]) += 1;
+ #pragma omp atomic
+ z += x(y[1]);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr60682.C b/gcc/testsuite/g++.dg/gomp/pr60682.C
new file mode 100644
index 0000000000..fdd7a204c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr60682.C
@@ -0,0 +1,44 @@
+// PR middle-end/60682
+// { dg-do compile }
+// { dg-options "-O2 -fopenmp-simd" }
+
+struct A
+{
+ float a;
+ A () {}
+ A (const A &x) { a = x.a; }
+};
+
+struct B
+{
+ A a[16];
+};
+
+struct C
+{
+ float a[1];
+ C () {}
+ C (const C &x) { a[0] = x.a[0]; }
+};
+
+struct D
+{
+ C a[16];
+};
+
+void
+foo (int x, B &y, D &z)
+{
+#pragma omp simd
+ for (int i = 0; i < x; ++i)
+ {
+ A a;
+ y.a[i] = a;
+ }
+#pragma omp simd
+ for (int i = 0; i < x; ++i)
+ {
+ C a;
+ z.a[i] = a;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/gomp/pr63249.C b/gcc/testsuite/g++.dg/gomp/pr63249.C
new file mode 100644
index 0000000000..80f763a4c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/pr63249.C
@@ -0,0 +1,35 @@
+// PR c++/63249
+// { dg-do compile }
+// { dg-options "-Wall -W -fopenmp" }
+
+template <int N>
+int
+foo (int *v, int A, int B) // { dg-bogus "set but not used" }
+{
+ int r = 0;
+ int a = 2; // { dg-bogus "set but not used" }
+ int b = 4; // { dg-bogus "set but not used" }
+#pragma omp target map(to: v[a:b])
+ r |= v[3];
+#pragma omp target map(to: v[A:B])
+ r |= v[3];
+ return r;
+}
+
+template <typename T>
+int
+bar (T *v, T A, T B) // { dg-bogus "set but not used" }
+{
+ T r = 0, a = 2, b = 4; // { dg-bogus "set but not used" }
+#pragma omp target map(to: v[a:b])
+ r |= v[3];
+#pragma omp target map(to: v[A:B])
+ r |= v[3];
+ return r;
+}
+
+int
+baz (int *v, int A, int B)
+{
+ return foo<0> (v, A, B) + bar (v, A, B);
+}
diff --git a/gcc/testsuite/g++.dg/gomp/simd-1.C b/gcc/testsuite/g++.dg/gomp/simd-1.C
new file mode 100644
index 0000000000..c9c2e73bb4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/simd-1.C
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+extern int a[1024];
+int (&b)[1024] = a;
+
+struct S { int s; } s, &t = s;
+
+void
+f1 (int &x, float &f, int *&p)
+{
+ int i;
+ #pragma omp simd aligned(x : 32) // { dg-error "neither a pointer nor an array" }
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(f) // { dg-error "neither a pointer nor an array" }
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(t : 16) // { dg-error "neither a pointer nor an array" }
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(a : 8)
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+ #pragma omp simd aligned(b : 8)
+ for (i = 0; i < 1024; i++)
+ b[i]++;
+ #pragma omp simd aligned(p : 8)
+ for (i = 0; i < 1024; i++)
+ a[i]++;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/target-1.C b/gcc/testsuite/g++.dg/gomp/target-1.C
new file mode 100644
index 0000000000..b6ed4f89cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-1.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+void
+foo (int x)
+{
+ bad1: // { dg-error "jump to label" }
+ #pragma omp target
+ goto bad1; // { dg-error "from here|exits OpenMP" }
+
+ goto bad2; // { dg-error "from here" }
+ #pragma omp target
+ {
+ bad2: ; // { dg-error "jump to label|enters OpenMP" }
+ }
+
+ #pragma omp target
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x)
+ {
+ #pragma omp target
+ { case 0:; } // { dg-error "jump|enters" }
+ }
+}
+
+// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 8 }
+// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/gomp/target-2.C b/gcc/testsuite/g++.dg/gomp/target-2.C
new file mode 100644
index 0000000000..6a14f53cff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/target-2.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+void
+foo (int x, int y)
+{
+ bad1: // { dg-error "jump to label" }
+ #pragma omp target data map(tofrom: y)
+ goto bad1; // { dg-error "from here|exits OpenMP" }
+
+ goto bad2; // { dg-error "from here" }
+ #pragma omp target data map(tofrom: y)
+ {
+ bad2: ; // { dg-error "jump to label|enters OpenMP" }
+ }
+
+ #pragma omp target data map(tofrom: y)
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x)
+ {
+ #pragma omp target data map(tofrom: y)
+ { case 0:; } // { dg-error "jump|enters" }
+ }
+}
+
+// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 8 }
+// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/gomp/taskgroup-1.C b/gcc/testsuite/g++.dg/gomp/taskgroup-1.C
new file mode 100644
index 0000000000..dcab0bb646
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/taskgroup-1.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+void
+foo (int x)
+{
+ bad1: // { dg-error "jump to label" }
+ #pragma omp taskgroup
+ goto bad1; // { dg-error "from here|exits OpenMP" }
+
+ goto bad2; // { dg-error "from here" }
+ #pragma omp taskgroup
+ {
+ bad2: ; // { dg-error "jump to label|enters OpenMP" }
+ }
+
+ #pragma omp taskgroup
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x)
+ {
+ #pragma omp taskgroup
+ { case 0:; } // { dg-error "jump|enters" }
+ }
+}
+
+// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 8 }
+// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/gomp/teams-1.C b/gcc/testsuite/g++.dg/gomp/teams-1.C
new file mode 100644
index 0000000000..ce40b55ca1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/teams-1.C
@@ -0,0 +1,66 @@
+// { dg-do compile }
+
+void
+foo (int x)
+{
+ bad1: // { dg-error "jump to label" }
+ #pragma omp target teams
+ goto bad1; // { dg-error "from here|exits OpenMP" }
+
+ goto bad2; // { dg-error "from here" }
+ #pragma omp target teams
+ {
+ bad2: ; // { dg-error "jump to label|enters OpenMP" }
+ }
+
+ #pragma omp target teams
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x)
+ {
+ #pragma omp target teams
+ { case 0:; } // { dg-error "jump|enters" }
+ }
+}
+
+void
+bar (int x)
+{
+ bad1: // { dg-error "jump to label" }
+ #pragma omp target
+ #pragma omp teams
+ goto bad1; // { dg-error "from here|exits OpenMP" }
+
+ goto bad2; // { dg-error "from here" }
+ #pragma omp target
+ #pragma omp teams
+ {
+ bad2: ; // { dg-error "jump to label|enters OpenMP" }
+ }
+
+ #pragma omp target
+ #pragma omp teams
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x)
+ {
+ #pragma omp target
+ #pragma omp teams
+ { case 0:; } // { dg-error "jump|enters" }
+ }
+}
+
+// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 8 }
+// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 10 }
+// { dg-error "invalid branch to/from an OpenMP structured block" "" { target *-*-* } 37 }
+// { dg-error "invalid entry to OpenMP structured block" "" { target *-*-* } 39 }
diff --git a/gcc/testsuite/g++.dg/gomp/tls-5.C b/gcc/testsuite/g++.dg/gomp/tls-5.C
new file mode 100644
index 0000000000..3679593af0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-5.C
@@ -0,0 +1,12 @@
+// The reference temp should be TLS, not normal data.
+// { dg-require-effective-target c++11 }
+// { dg-final { scan-assembler-not "\\.data" { target tls_native } } }
+
+extern int&& ir;
+#pragma omp threadprivate (ir)
+int&& ir = 42;
+
+void f()
+{
+ ir = 24;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/tls-template1.C b/gcc/testsuite/g++.dg/gomp/tls-template1.C
new file mode 100644
index 0000000000..5865ce3d98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-template1.C
@@ -0,0 +1,13 @@
+// { dg-require-effective-target tls }
+
+template <class T> struct B
+{
+ T t;
+};
+
+class A {
+ static B<int> b;
+#pragma omp threadprivate(b)
+};
+
+B<int> A::b;
diff --git a/gcc/testsuite/g++.dg/gomp/tls-wrap1.C b/gcc/testsuite/g++.dg/gomp/tls-wrap1.C
new file mode 100644
index 0000000000..91c9f86312
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-wrap1.C
@@ -0,0 +1,13 @@
+// If we can see the definition at the use site, we don't need to bother
+// with a wrapper.
+
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler-not "_ZTW1i" } }
+
+int i = 42;
+#pragma omp threadprivate (i)
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/tls-wrap2.C b/gcc/testsuite/g++.dg/gomp/tls-wrap2.C
new file mode 100644
index 0000000000..7aa13711c0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-wrap2.C
@@ -0,0 +1,16 @@
+// If we can't see the definition at the use site, but it's in this translation
+// unit, we build a wrapper but don't bother with an init function.
+
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_ZTW1i" } }
+// { dg-final { scan-assembler-not "_ZTH1i" } }
+
+extern int i;
+#pragma omp threadprivate (i)
+
+int main()
+{
+ return i - 42;
+}
+
+int i = 42;
diff --git a/gcc/testsuite/g++.dg/gomp/tls-wrap3.C b/gcc/testsuite/g++.dg/gomp/tls-wrap3.C
new file mode 100644
index 0000000000..dd4b900e82
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-wrap3.C
@@ -0,0 +1,15 @@
+// If we can't see the definition at all, we need to assume there might be
+// an init function.
+
+// { dg-require-alias "" }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_ZTW1i" } }
+// { dg-final { scan-assembler "_ZTH1i" } }
+
+extern int i;
+#pragma omp threadprivate (i)
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/tls-wrap4.C b/gcc/testsuite/g++.dg/gomp/tls-wrap4.C
new file mode 100644
index 0000000000..59a5683905
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-wrap4.C
@@ -0,0 +1,14 @@
+// We don't need to call the wrapper through the PLT; we can use a separate
+// copy per shared object.
+
+// { dg-require-effective-target tls }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fPIC" }
+// { dg-final { scan-assembler-not "_ZTW1i@PLT" { target i?86-*-* x86_64-*-* } } }
+
+extern thread_local int i;
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/tls-wrapper-cse.C b/gcc/testsuite/g++.dg/gomp/tls-wrapper-cse.C
new file mode 100644
index 0000000000..af2de2f1fc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/tls-wrapper-cse.C
@@ -0,0 +1,18 @@
+// Test for CSE of the wrapper function: we should only call it once
+// for the two references to ir.
+// { dg-options "-fopenmp -O -fno-inline" }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler-times "call *_ZTW2ir" 1 { xfail *-*-* } } }
+
+// XFAILed until the back end supports a way to mark a function as cseable
+// though not pure.
+
+int f() { return 42; }
+
+int ir = f();
+#pragma omp threadprivate (ir)
+
+int main()
+{
+ return ir + ir - 84;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-1.C b/gcc/testsuite/g++.dg/gomp/udr-1.C
new file mode 100644
index 0000000000..10c1c8dab9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-1.C
@@ -0,0 +1,119 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+namespace N1
+{
+ #pragma omp declare reduction (| : long int : omp_out |= omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (+ : char : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ typedef short T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (* : _Complex double : omp_out *= omp_in)// { dg-error "predeclared arithmetic type" }
+}
+namespace N2
+{
+ template <typename T1, typename T2, typename T3, typename T4>
+ struct S
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (* : T4 : omp_out *= omp_in) // { dg-error "predeclared arithmetic type" }
+ };
+ S<long int, char, short, _Complex double> s;
+ template <typename T1, typename T2, typename T3, typename T4>
+ int foo ()
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "predeclared arithmetic type" }
+ #pragma omp declare reduction (* : T4 : omp_out *= omp_in) // { dg-error "predeclared arithmetic type" }
+ return 0;
+ }
+ int x = foo <long int, char, short, _Complex double> ();
+}
+namespace N3
+{
+ void bar ();
+ #pragma omp declare reduction (| : __typeof (bar) : omp_out |= omp_in)// { dg-error "function or array type" }
+ #pragma omp declare reduction (+ : char () : omp_out += omp_in) // { dg-error "function or array type" }
+ typedef short T;
+ #pragma omp declare reduction (min : T[2] : omp_out += omp_in) // { dg-error "function or array type" }
+ #pragma omp declare reduction (baz : char & : omp_out *= omp_in) // { dg-error "reference type" }
+}
+namespace N4
+{
+ void bar ();
+ template <typename T1, typename T2, typename T3, typename T4>
+ struct S
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "function or array type" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "function or array type" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "function or array type" }
+ #pragma omp declare reduction (baz : T4 : omp_out *= omp_in) // { dg-error "function or array type" }
+ };
+ S<__typeof (bar), char (), short [3], char []> s;
+ template <typename T1, typename T2, typename T3, typename T4>
+ int foo ()
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "function or array type" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "function or array type" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "function or array type" }
+ #pragma omp declare reduction (baz : T4 : omp_out *= omp_in) // { dg-error "function or array type" }
+ return 0;
+ }
+ int x = foo <__typeof (bar), char (), short[], char [2]> ();
+}
+namespace N5
+{
+ template <typename T>
+ struct S
+ {
+ #pragma omp declare reduction (baz : T : omp_out *= omp_in) // { dg-error "reference type" }
+ };
+ S<char &> s;
+ template <typename T>
+ int foo ()
+ {
+ #pragma omp declare reduction (baz : T : omp_out *= omp_in) // { dg-error "reference type" }
+ return 0;
+ }
+ int x = foo <char &> ();
+}
+namespace N6
+{
+ struct A { int a; A () : a (0) {} };
+ #pragma omp declare reduction (| : const A : omp_out.a |= omp_in.a) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (+ : __const A : omp_out.a += omp_in.a) // { dg-error "const, volatile or __restrict" }
+ typedef volatile A T;
+ #pragma omp declare reduction (min : T : omp_out.a += omp_in.a) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (* : A *__restrict : omp_out->a *= omp_in->a)// { dg-error "const, volatile or __restrict" }
+}
+namespace N7
+{
+ struct A { int a; A () : a (0) {} };
+ template <typename T1, typename T2, typename T3, typename T4>
+ struct S
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "const, volatile or __restrict" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (* : T4 : omp_out *= omp_in) // { dg-error "const, volatile or __restrict" }
+ };
+ S<const A, __const A, volatile A, A *__restrict> s;
+ template <typename T1, typename T2, typename T3, typename T4>
+ int foo ()
+ {
+ #pragma omp declare reduction (| : T1 : omp_out |= omp_in) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (+ : T2 : omp_out += omp_in) // { dg-error "const, volatile or __restrict" }
+ typedef T3 T;
+ #pragma omp declare reduction (min : T : omp_out += omp_in) // { dg-error "const, volatile or __restrict" }
+ #pragma omp declare reduction (* : T4 : omp_out *= omp_in) // { dg-error "const, volatile or __restrict" }
+ return 0;
+ }
+ int x = foo <const A, __const A, volatile A, A *__restrict> ();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-2.C b/gcc/testsuite/g++.dg/gomp/udr-2.C
new file mode 100644
index 0000000000..48451c4fc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-2.C
@@ -0,0 +1,119 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct W { int w; W () : w (0) {} W (int x) : w (x) {} };
+namespace N1
+{
+ int v;
+ #pragma omp declare reduction (foo : long int : omp_out |= v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : char : omp_out = v) // { dg-error "combiner refers to variable" }
+ typedef short T;
+ #pragma omp declare reduction (foo : T : omp_out += N1::v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : int : v *= omp_in) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : W : omp_out.w *= omp_in.w + v) // { dg-error "combiner refers to variable" }
+}
+namespace N2
+{
+ int v;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ struct S
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out = v) // { dg-error "combiner refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += N1::v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T4 : v *= omp_in) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w + v) // { dg-error "combiner refers to variable" }
+ };
+ S<long int, char, short, _Complex double, W> s;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ int foo ()
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out = v) // { dg-error "combiner refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += N1::v) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T4 : v *= omp_in) // { dg-error "combiner refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w + v) // { dg-error "combiner refers to variable" }
+ return 0;
+ }
+ int x = foo <long int, char, short, _Complex double, W> ();
+}
+namespace N3
+{
+ int v;
+ #pragma omp declare reduction (foo : long int : omp_out |= omp_in) initializer (omp_priv = v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : char : omp_out += omp_in) initializer (omp_priv ((char) N3::v)) // { dg-error "initializer refers to variable" }
+ typedef short T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (omp_priv = (short) v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : _Complex double : omp_out *= omp_in) initializer (omp_priv (v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : W : omp_out.w *= omp_in.w) initializer (omp_priv (N3::v)) // { dg-error "initializer refers to variable" }
+}
+namespace N4
+{
+ int v;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ struct S
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= omp_in) initializer (omp_priv = v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out += omp_in) initializer (omp_priv ((char) N3::v)) // { dg-error "initializer refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (omp_priv = (short) v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T4 : omp_out *= omp_in) initializer (omp_priv (v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w) initializer (omp_priv (N3::v)) // { dg-error "initializer refers to variable" }
+ };
+ S<long int, char, short, _Complex double, W> s;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ int foo ()
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= omp_in) initializer (omp_priv = v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out += omp_in) initializer (omp_priv ((char) N3::v)) // { dg-error "initializer refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (omp_priv = (short) v) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T4 : omp_out *= omp_in) initializer (omp_priv (v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w) initializer (omp_priv (N3::v)) // { dg-error "initializer refers to variable" }
+ return 0;
+ }
+ int x = foo <long int, char, short, _Complex double, W> ();
+}
+template <typename T>
+void init (T &, int &);
+template <typename T>
+void initializer (T, int &);
+namespace N5
+{
+ int v;
+ #pragma omp declare reduction (foo : long int : omp_out |= omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : char : omp_out += omp_in) initializer (initializer (&omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+ typedef short T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : _Complex double : omp_out *= omp_in) initializer (initializer (&omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : W : omp_out.w *= omp_in.w) initializer (init (omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+}
+namespace N6
+{
+ int v;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ struct S
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= omp_in) initializer (initializer (&omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out += omp_in) initializer (init (omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T4 : omp_out *= omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w) initializer (initializer (&omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+ };
+ S<long int, char, short, _Complex double, W> s;
+ template <typename T1, typename T2, typename T3, typename T4, typename T5>
+ int foo ()
+ {
+ #pragma omp declare reduction (foo : T1 : omp_out |= omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T2 : omp_out += omp_in) initializer (init (omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+ typedef T3 T;
+ #pragma omp declare reduction (foo : T : omp_out += omp_in) initializer (initializer (&omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T4 : omp_out *= omp_in) initializer (init (omp_priv, v)) // { dg-error "initializer refers to variable" }
+ #pragma omp declare reduction (foo : T5 : omp_out.w *= omp_in.w) initializer (initializer (omp_priv, N3::v)) // { dg-error "initializer refers to variable" }
+ return 0;
+ }
+ int x = foo <long int, char, short, _Complex double, W> ();
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-3.C b/gcc/testsuite/g++.dg/gomp/udr-3.C
new file mode 100644
index 0000000000..9fc6f40820
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-3.C
@@ -0,0 +1,191 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+
+struct S { int s; S () : s (0) {} S (int x) : s (x) {} ~S () {} };
+struct T { int t; T () : t (0) {} T (int x) : t (x) {} ~T () {} };
+
+#pragma omp declare reduction (+: ::S: omp_out.s += omp_in.s)
+#pragma omp declare reduction (*: S: omp_out.s *= omp_in.s) \
+ initializer (omp_priv (1))
+#pragma omp declare reduction (foo: S: omp_out.s += omp_in.s)
+
+void
+f1 ()
+{
+ S s, s2;
+ T t;
+ #pragma omp declare reduction (+: T: omp_out.t += omp_in.t)
+ #pragma omp parallel reduction (+: t) reduction (foo: s) reduction (*: s2)
+ s.s = 1, t.t = 1, s2.s = 2;
+ #pragma omp parallel reduction (::operator +: s)
+ s.s = 1;
+ #pragma omp parallel reduction (+: s)
+ s.s = 1;
+}
+
+template <int N>
+int
+f2 ()
+{
+ S s, s2;
+ T t;
+ #pragma omp declare reduction (+: T: omp_out.t += omp_in.t)
+ #pragma omp parallel reduction (+: t) reduction (foo: s) reduction (*: s2)
+ s.s = 1, t.t = 1, s2.s = 2;
+ #pragma omp parallel reduction (::operator +: s)
+ s.s = 1;
+ #pragma omp parallel reduction (+: s)
+ s.s = 1;
+ return 0;
+}
+
+int x = f2<0> ();
+
+void bar (S &);
+
+void
+f3 ()
+{
+ #pragma omp declare reduction (foo: S: omp_out.s += omp_in.s) initializer (bar (omp_priv))
+ #pragma omp declare reduction (bar: S: omp_out.s += omp_in.s) initializer (bar (omp_orig)) // { dg-error "one of the initializer call arguments should be" }
+}
+
+template <typename T>
+int
+f4 ()
+{
+ #pragma omp declare reduction (foo: T: omp_out.s += omp_in.s) initializer (bar (omp_priv))
+ #pragma omp declare reduction (bar: T: omp_out.s += omp_in.s) initializer (bar (omp_orig)) // { dg-error "one of the initializer call arguments should be" }
+ return 0;
+}
+
+int y = f4 <S> ();
+
+namespace N1
+{
+ #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (+: S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ void
+ f5 ()
+ {
+ #pragma omp declare reduction (f5: S: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (f5: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ }
+}
+
+namespace N2
+{
+ struct U
+ {
+ #pragma omp declare reduction (bar: S: omp_out.s *= omp_in.s) // { dg-error "with" }
+ #pragma omp declare reduction (bar: S: omp_out.s += omp_in.s) // { dg-error "cannot be overloaded" }
+ };
+}
+
+namespace N3
+{
+ #pragma omp declare reduction (+: ::S: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (+: T: omp_out.t += omp_in.t)
+ #pragma omp declare reduction (+: S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (n3: long: omp_out += omp_in) // { dg-message "previous" }
+ #pragma omp declare reduction (n3: long int: omp_out += omp_in) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (n3: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (n3: short int: omp_out += omp_in)
+ void
+ f6 ()
+ {
+ #pragma omp declare reduction (f6: T: omp_out.t += omp_in.t)
+ #pragma omp declare reduction (f6: S: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (f6: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (f6: long: omp_out += omp_in) // { dg-message "previous" }
+ #pragma omp declare reduction (f6: long int: omp_out += omp_in) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (f6: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (f6: short int: omp_out += omp_in)
+ }
+}
+
+namespace N4
+{
+ struct U
+ {
+ #pragma omp declare reduction (bar: T: omp_out.t += omp_in.t)
+ #pragma omp declare reduction (bar: S: omp_out.s *= omp_in.s) // { dg-error "with" }
+ #pragma omp declare reduction (bar: S: omp_out.s += omp_in.s) // { dg-error "cannot be overloaded" }
+ #pragma omp declare reduction (bar: long: omp_out += omp_in) // { dg-error "with" }
+ #pragma omp declare reduction (bar: long int: omp_out += omp_in) // { dg-error "cannot be overloaded" }
+ #pragma omp declare reduction (bar: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (bar: short int: omp_out += omp_in)
+ };
+}
+
+namespace N5
+{
+ template <typename T>
+ int
+ f7 ()
+ {
+ #pragma omp declare reduction (f7: T: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (f7: T: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ return 0;
+ }
+ int x = f7 <S> ();
+ template <typename T>
+ struct U
+ {
+ #pragma omp declare reduction (bar: T: omp_out.s *= omp_in.s) // { dg-error "with" }
+ #pragma omp declare reduction (bar: T: omp_out.s += omp_in.s) // { dg-error "cannot be overloaded" }
+ };
+ U<S> u;
+}
+
+namespace N6
+{
+ template <typename U>
+ int
+ f8 ()
+ {
+ #pragma omp declare reduction (f8: T: omp_out.t += omp_in.t)
+ #pragma omp declare reduction (f8: U: omp_out.s *= omp_in.s) // { dg-message "previous" }
+ #pragma omp declare reduction (f8: ::S: omp_out.s += omp_in.s) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (f8: long: omp_out += omp_in) // { dg-message "previous" }
+ #pragma omp declare reduction (f8: long int: omp_out += omp_in) // { dg-error "redeclaration of" }
+ #pragma omp declare reduction (f8: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (f8: short int: omp_out += omp_in)
+ return 0;
+ }
+ int x = f8 <S> ();
+ template <typename V>
+ struct U
+ {
+ typedef V V2;
+ #pragma omp declare reduction (bar: T: omp_out.t += omp_in.t)
+ #pragma omp declare reduction (bar: V: omp_out.s *= omp_in.s) // { dg-error "with" }
+ #pragma omp declare reduction (bar: V2: omp_out.s += omp_in.s) // { dg-error "cannot be overloaded" }
+ #pragma omp declare reduction (bar: long: omp_out += omp_in) // { dg-error "with" }
+ #pragma omp declare reduction (bar: long int: omp_out += omp_in) // { dg-error "cannot be overloaded" }
+ #pragma omp declare reduction (bar: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (bar: short int: omp_out += omp_in)
+ };
+ U<S> u;
+}
+
+namespace N7
+{
+ #pragma omp declare reduction (+: S: omp_out.s += omp_in.s) initializer (omp_priv) // { dg-error "invalid initializer clause" }
+ #pragma omp declare reduction (+: T: omp_out.t += omp_in.t) initializer (omp_priv ()) // { dg-error "invalid initializer clause" }
+}
+
+namespace N8
+{
+ struct A { int a; A (); ~A (); };
+ struct B { int b; B (); ~B (); B (int); };
+ struct C : public A, B { int c; C (); ~C (); };
+ #pragma omp declare reduction (+:B:omp_out.b += omp_in.b) initializer (omp_priv (4))
+ void bar (C &);
+ void baz ()
+ {
+ C a;
+ #pragma omp parallel reduction (+:a) // { dg-error "user defined reduction with constructor initializer for base class" }
+ bar (a);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-4.C b/gcc/testsuite/g++.dg/gomp/udr-4.C
new file mode 100644
index 0000000000..f1b388bbd9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-4.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+struct S; // { dg-error "forward declaration" }
+#pragma omp declare reduction (+:S:omp_out.s += omp_in.s) // { dg-error "invalid use of incomplete type" }
+struct S { int s; S () : s (1) {} };
+#pragma omp declare reduction (*:S:omp_out.s *= omp_in.s)
+
+void
+foo ()
+{
+ S s;
+ #pragma omp parallel reduction (S::~S:s) // { dg-error "invalid reduction-identifier" }
+ s.s = 1;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-5.C b/gcc/testsuite/g++.dg/gomp/udr-5.C
new file mode 100644
index 0000000000..425f8e95cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-5.C
@@ -0,0 +1,41 @@
+// { dg-do compile }
+
+struct S
+{
+ int s;
+ S () : s (0) {}
+private:
+ #pragma omp declare reduction (+:S:omp_out.s += omp_in.s) // { dg-error "is private" }
+protected:
+ #pragma omp declare reduction (-:S:omp_out.s += omp_in.s) // { dg-error "is protected" }
+};
+
+struct T : public S
+{
+ void foo ()
+ {
+ S s;
+ #pragma omp parallel reduction (S::operator +:s) // { dg-error "within this context" }
+ s.s = 1;
+ S t;
+ #pragma omp parallel reduction (S::operator -:t)
+ t.s = 1;
+ S u;
+ #pragma omp parallel reduction (+:u) // { dg-error "within this context" }
+ u.s = 1;
+ S v;
+ #pragma omp parallel reduction (-:v)
+ v.s = 1;
+ }
+};
+
+void
+foo ()
+{
+ S s;
+ #pragma omp parallel reduction (S::operator +:s) // { dg-error "within this context" }
+ s.s = 1;
+ S t;
+ #pragma omp parallel reduction (S::operator -:t) // { dg-error "within this context" }
+ t.s = 1;
+}
diff --git a/gcc/testsuite/g++.dg/gomp/udr-6.C b/gcc/testsuite/g++.dg/gomp/udr-6.C
new file mode 100644
index 0000000000..9060c87a54
--- /dev/null
+++ b/gcc/testsuite/g++.dg/gomp/udr-6.C
@@ -0,0 +1,59 @@
+// { dg-do compile }
+
+struct A { int a; A () : a (0) {} };
+struct B { int b; B () : b (0) {} };
+struct C : public A, B { int c; C () : c (0) {} };
+struct D { int d; D () : d (0) {} };
+struct E { int e; E () : e (0) {} };
+struct F : public D, E { int f; F () : f (0) {} };
+struct G : public C, F { int g; G () : g (0) {} };
+
+#pragma omp declare reduction (+: A : omp_out.a += omp_in.a) // { dg-message "operator" }
+#pragma omp declare reduction (+: B : omp_out.b += omp_in.b) // { dg-message "operator" }
+#pragma omp declare reduction (+: D : omp_out.d += omp_in.d)
+#pragma omp declare reduction (+: E : omp_out.e += omp_in.e)
+#pragma omp declare reduction (+: F : omp_out.f += omp_in.f) // { dg-message "operator" }
+
+void
+f1 ()
+{
+ G g;
+ #pragma omp parallel reduction (+: g) // { dg-error "user defined reduction lookup is ambiguous" }
+ {
+ g.g++;
+ }
+}
+
+#pragma omp declare reduction (*: A : omp_out.a += omp_in.a)
+#pragma omp declare reduction (*: B : omp_out.b += omp_in.b)
+#pragma omp declare reduction (*: D : omp_out.d += omp_in.d)
+#pragma omp declare reduction (*: E : omp_out.e += omp_in.e)
+#pragma omp declare reduction (*: F : omp_out.f += omp_in.f)
+#pragma omp declare reduction (*: G : omp_out.g += omp_in.g)
+
+void
+f2 ()
+{
+ G g;
+ #pragma omp parallel reduction (*: g)
+ {
+ g.g++;
+ }
+}
+
+#pragma omp declare reduction (|: A : omp_out.a += omp_in.a)
+#pragma omp declare reduction (|: B : omp_out.b += omp_in.b)
+#pragma omp declare reduction (|: C : omp_out.c += omp_in.c) // { dg-message "operator" }
+#pragma omp declare reduction (|: D : omp_out.d += omp_in.d)
+#pragma omp declare reduction (|: E : omp_out.e += omp_in.e)
+#pragma omp declare reduction (|: F : omp_out.f += omp_in.f) // { dg-message "operator" }
+
+void
+f3 ()
+{
+ G g;
+ #pragma omp parallel reduction (|: g) // { dg-error "user defined reduction lookup is ambiguous" }
+ {
+ g.g++;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/graphite/graphite.exp b/gcc/testsuite/g++.dg/graphite/graphite.exp
index 7c96f58c70..7079634e70 100644
--- a/gcc/testsuite/g++.dg/graphite/graphite.exp
+++ b/gcc/testsuite/g++.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/guality/guality.exp b/gcc/testsuite/g++.dg/guality/guality.exp
index 749691dab7..3ff7f2f77e 100644
--- a/gcc/testsuite/g++.dg/guality/guality.exp
+++ b/gcc/testsuite/g++.dg/guality/guality.exp
@@ -4,11 +4,15 @@ load_lib g++-dg.exp
load_lib gcc-gdb-test.exp
# Disable on darwin until radr://7264615 is resolved.
-# Disable on Tru64 UNIX (PR testsuite/48251).
-if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } {
+if { [istarget *-*-darwin*] } {
return
}
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
proc check_guality {args} {
set result [eval check_compile guality_check executable $args "-g -O0"]
set lines [lindex $result 0]
diff --git a/gcc/testsuite/g++.dg/guality/pr55665.C b/gcc/testsuite/g++.dg/guality/pr55665.C
new file mode 100644
index 0000000000..16c6d28166
--- /dev/null
+++ b/gcc/testsuite/g++.dg/guality/pr55665.C
@@ -0,0 +1,33 @@
+// PR debug/55655
+// { dg-do run }
+// { dg-options "-g" }
+
+extern "C" void abort ();
+struct A { A (int); int a; };
+
+__attribute__((noinline, noclone)) int
+bar (void)
+{
+ return 40;
+}
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ __asm volatile ("" : : "r" (x) : "memory");
+}
+
+A::A (int x)
+{
+ static int p = bar ();
+ foo (p); // { dg-final { gdb-test 23 "p" "40" } }
+ a = ++p;
+}
+
+int
+main ()
+{
+ A a (42);
+ if (a.a != 41)
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/inherit/covariant21.C b/gcc/testsuite/g++.dg/inherit/covariant21.C
new file mode 100644
index 0000000000..42cdf87008
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/covariant21.C
@@ -0,0 +1,17 @@
+// PR c++/59645
+
+struct A { virtual ~A(); };
+struct B { virtual ~B(); };
+struct C : A, B {};
+
+struct X
+{
+ virtual B* foo(volatile int);
+};
+
+struct Y : X
+{
+ virtual C* foo(volatile int);
+};
+
+C* Y::foo(volatile int) { return 0; }
diff --git a/gcc/testsuite/g++.dg/inherit/crash4.C b/gcc/testsuite/g++.dg/inherit/crash4.C
new file mode 100644
index 0000000000..b5b02f1019
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/crash4.C
@@ -0,0 +1,10 @@
+// PR c++/59082
+
+struct A {};
+
+struct B : virtual A, A {}; // { dg-error "duplicate base type" }
+
+A foo(const B &b)
+{
+ return b;
+}
diff --git a/gcc/testsuite/g++.dg/inherit/pr57942.C b/gcc/testsuite/g++.dg/inherit/pr57942.C
new file mode 100644
index 0000000000..580e9ecd24
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/pr57942.C
@@ -0,0 +1,9 @@
+// PR c++/57942
+
+template<typename T> struct S { typename T::error type; };
+struct X {};
+void f(S<int>*);
+void f(...);
+void g() { f((X*)0); }
+struct Y;
+void h() { f((Y*)0); }
diff --git a/gcc/testsuite/g++.dg/inherit/using5.C b/gcc/testsuite/g++.dg/inherit/using5.C
index 89c7ca03ba..b8e51078ff 100644
--- a/gcc/testsuite/g++.dg/inherit/using5.C
+++ b/gcc/testsuite/g++.dg/inherit/using5.C
@@ -6,7 +6,7 @@
template<int> struct A
{
- A::A; // { dg-error "constructor" }
+ A::A; // { dg-error "constructor|not a base" }
};
struct B
diff --git a/gcc/testsuite/g++.dg/inherit/virtual10.C b/gcc/testsuite/g++.dg/inherit/virtual10.C
new file mode 100644
index 0000000000..4cb858b929
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/virtual10.C
@@ -0,0 +1,11 @@
+// PR c++/14263
+
+struct A { };
+
+struct B : virtual A { };
+
+int main()
+{
+ A* p = new B;
+ B* q = static_cast<B*>(p); // { dg-error "cannot convert from pointer to base class 'A' to pointer to derived class 'B' because the base is virtual" }
+}
diff --git a/gcc/testsuite/g++.dg/inherit/virtual11.C b/gcc/testsuite/g++.dg/inherit/virtual11.C
new file mode 100644
index 0000000000..04c2412934
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/virtual11.C
@@ -0,0 +1,17 @@
+// PR c++/59031
+// { dg-do compile }
+// { dg-options "-fdump-tree-gimple " }
+class B {
+ public:
+ virtual int add (int a, int b) {return a+ b;}
+};
+
+class D : public B {
+};
+
+int foo (int a, int b) {
+ D d;
+ return d.add(a, b);
+}
+// { dg-final { scan-tree-dump-not "OBJ_TYPE_REF" "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
diff --git a/gcc/testsuite/g++.dg/inherit/virtual9.C b/gcc/testsuite/g++.dg/inherit/virtual9.C
new file mode 100644
index 0000000000..03342646ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/inherit/virtual9.C
@@ -0,0 +1,44 @@
+// { dg-do run }
+// PR c++/11750
+
+struct A
+{
+ virtual void f() const { __builtin_abort(); }
+ virtual void g() {}
+};
+
+struct B : virtual A
+{
+ virtual void f() const {}
+ virtual void g() { __builtin_abort(); }
+};
+
+struct C : B, virtual A
+{
+ using A::f;
+ using A::g;
+};
+
+int main()
+{
+ C c;
+ c.f(); // call B::f
+
+ C c2;
+ c2.C::g(); // call A::g
+
+ C* c3 = &c;
+ c3->f(); // call B::f
+
+ C& c4 = c;
+ c4.f(); // call B::f
+
+ C const* c5 = &c;
+ c5->f(); // call B::f
+
+ C** c6 = &c3;
+ (*c6)->f(); // call B::f
+
+ C const& c7 = c;
+ c7.f(); // call B::f
+}
diff --git a/gcc/testsuite/g++.dg/init/aggr10.C b/gcc/testsuite/g++.dg/init/aggr10.C
new file mode 100644
index 0000000000..e494e20a3b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/aggr10.C
@@ -0,0 +1,6 @@
+// PR c++/59886
+
+struct A { A (); ~A (); };
+struct B { A b[4]; };
+struct C { B c[5]; };
+const C e = {};
diff --git a/gcc/testsuite/g++.dg/init/array21.C b/gcc/testsuite/g++.dg/init/array21.C
index f41ce86b1d..fc6abab551 100644
--- a/gcc/testsuite/g++.dg/init/array21.C
+++ b/gcc/testsuite/g++.dg/init/array21.C
@@ -2,6 +2,6 @@
void foo()
{
- const int x[] = 0; // { dg-error "size" }
- ++x;
+ const int x[] = 0; // { dg-error "initializer" }
+ ++x; // { dg-error "read-only|operand" }
}
diff --git a/gcc/testsuite/g++.dg/init/array24.C b/gcc/testsuite/g++.dg/init/array24.C
index ed4c1d881f..2d72df4038 100644
--- a/gcc/testsuite/g++.dg/init/array24.C
+++ b/gcc/testsuite/g++.dg/init/array24.C
@@ -1,7 +1,7 @@
// PR c++/29175
-// { dg-options "" }
+// { dg-options "-Wno-vla" }
void foo(int i)
{
- int x[][i] = { 0 }; // { dg-error "variable-sized|storage size" }
+ int x[][i] = { 0 };
}
diff --git a/gcc/testsuite/g++.dg/init/array26.C b/gcc/testsuite/g++.dg/init/array26.C
index 83c4e0c4a4..f8f3c3743f 100644
--- a/gcc/testsuite/g++.dg/init/array26.C
+++ b/gcc/testsuite/g++.dg/init/array26.C
@@ -8,4 +8,4 @@ struct B
A a; // { dg-error "incomplete type" }
};
-B b[1] = (B[]) { 0 }; // { dg-error "initializer" }
+B b[1] = (B[]) { 0 };
diff --git a/gcc/testsuite/g++.dg/init/array30.C b/gcc/testsuite/g++.dg/init/array30.C
new file mode 100644
index 0000000000..696d9bf992
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array30.C
@@ -0,0 +1,7 @@
+// PR c++/54501
+// { dg-options "" }
+
+int main()
+{
+ int a[][0] = {0}; // { dg-error "too many" }
+}
diff --git a/gcc/testsuite/g++.dg/init/array31.C b/gcc/testsuite/g++.dg/init/array31.C
new file mode 100644
index 0000000000..9bb66a5950
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array31.C
@@ -0,0 +1,10 @@
+// PR c++/54501
+// { dg-options "" }
+
+struct A
+{
+ int i[0];
+ int j;
+};
+
+struct A a = { 1 };
diff --git a/gcc/testsuite/g++.dg/init/array32.C b/gcc/testsuite/g++.dg/init/array32.C
new file mode 100644
index 0000000000..06b27a94a8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array32.C
@@ -0,0 +1,7 @@
+// PR c++/42315
+
+extern int x[];
+
+int i = x[0];
+
+int x[] = 0; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/init/array35.C b/gcc/testsuite/g++.dg/init/array35.C
new file mode 100644
index 0000000000..6ce6d5cc95
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array35.C
@@ -0,0 +1,3 @@
+// PR c++/58868
+
+static struct { const int i; } a[] = { 1 };
diff --git a/gcc/testsuite/g++.dg/init/array36.C b/gcc/testsuite/g++.dg/init/array36.C
new file mode 100644
index 0000000000..77e4f90914
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array36.C
@@ -0,0 +1,8 @@
+// PR c++/60224
+
+struct A {};
+
+void foo()
+{
+ bool b[] = (int (A::*)())0; // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/init/array37.C b/gcc/testsuite/g++.dg/init/array37.C
new file mode 100644
index 0000000000..a909a18dd5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/array37.C
@@ -0,0 +1,14 @@
+struct A
+{
+ int i;
+ A(int);
+};
+
+struct B
+{
+ virtual void f();
+ A ar[3];
+};
+
+extern B b;
+B b2(b);
diff --git a/gcc/testsuite/g++.dg/init/bitfield3.C b/gcc/testsuite/g++.dg/init/bitfield3.C
new file mode 100644
index 0000000000..23db2d4a34
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/bitfield3.C
@@ -0,0 +1,11 @@
+// PR c++/43663
+
+struct S
+{
+ S(): i(0) {}
+ int i : 3;
+};
+
+S s;
+
+const int& cr(s.i);
diff --git a/gcc/testsuite/g++.dg/init/bitfield4.C b/gcc/testsuite/g++.dg/init/bitfield4.C
new file mode 100644
index 0000000000..30041c4359
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/bitfield4.C
@@ -0,0 +1,24 @@
+// PR c++/56235
+
+struct A
+{
+ A (const A &);
+};
+
+struct B
+{
+ A a;
+ enum Mode { };
+ Mode m:8;
+};
+
+struct C
+{
+ C();
+ B b;
+};
+
+C fn()
+{
+ return C();
+}
diff --git a/gcc/testsuite/g++.dg/init/bitfield5.C b/gcc/testsuite/g++.dg/init/bitfield5.C
new file mode 100644
index 0000000000..58f686d9ce
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/bitfield5.C
@@ -0,0 +1,12 @@
+// PR c++/51219
+
+struct A
+{
+ int i;
+ int : 8;
+};
+
+void foo()
+{
+ A a = { 0 };
+}
diff --git a/gcc/testsuite/g++.dg/init/brace2.C b/gcc/testsuite/g++.dg/init/brace2.C
index fec9c6ce4d..50dc481395 100644
--- a/gcc/testsuite/g++.dg/init/brace2.C
+++ b/gcc/testsuite/g++.dg/init/brace2.C
@@ -5,4 +5,4 @@ const char * y = { "hello" };
int a = 2;
int b = { 2,3 }; // { dg-error "requires one element in initializer" }
int c = { { 2 } } ; // { dg-error "braces around scalar initializer" }
-int d = {}; // { dg-error "initializer" "" { target c++98 } }
+int d = {}; // { dg-error "initializer" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/init/brace6.C b/gcc/testsuite/g++.dg/init/brace6.C
index ca39b0180d..0fa818c80c 100644
--- a/gcc/testsuite/g++.dg/init/brace6.C
+++ b/gcc/testsuite/g++.dg/init/brace6.C
@@ -18,7 +18,7 @@ int main()
{
int i = { 1 };
int j = { 1, 2 }; /* { dg-error "requires one element" } */
- A a = { 6 }; /* { dg-error "initialize" "" { target c++98 } } */
+ A a = { 6 }; /* { dg-error "initialize" "" { target { ! c++11 } } } */
B b = { 6 }; /* { dg-error "" } */
C c = { 6 }; /* { dg-error "too many initializers" } */
D d = { 6 };
diff --git a/gcc/testsuite/g++.dg/init/const10.C b/gcc/testsuite/g++.dg/init/const10.C
new file mode 100644
index 0000000000..ecd0db4501
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/const10.C
@@ -0,0 +1,33 @@
+// PR C++/52369
+// { dg-do compile { target c++11 } }
+
+class B // { dg-message "implicitly deleted" }
+ // { dg-error "uninitialized" "" { target c++11 } 4 }
+{
+ int const v_; // { dg-message "should be initialized" }
+};
+
+struct D : B {}; // { dg-error "deleted" }
+
+class A // { dg-message "implicitly deleted" }
+ // { dg-error "uninitialized" "" { target c++11 } 12 }
+{
+ int& ref; // { dg-message "should be initialized" }
+};
+
+struct C : A {}; // { dg-error "deleted" }
+
+void f()
+{
+ D d; // { dg-error "use of deleted" }
+ new D; // { dg-error "use of deleted" }
+ D(); // { dg-error "use of deleted" }
+ new D(); // { dg-error "use of deleted" }
+
+ C c; // { dg-error "use of deleted" }
+ new C; // { dg-error "use of deleted" }
+ C(); // { dg-error "use of deleted" }
+ new C(); // { dg-error "use of deleted" }
+}
+
+
diff --git a/gcc/testsuite/g++.dg/init/const11.C b/gcc/testsuite/g++.dg/init/const11.C
new file mode 100644
index 0000000000..08d5185c09
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/const11.C
@@ -0,0 +1,29 @@
+// PR C++/52369
+// { dg-do compile { target { ! c++11 } } }
+
+class B
+{
+ int const v_; // { dg-message "should be initialized" }
+};
+
+struct D : B {};
+
+class A
+{
+ int& ref; // { dg-message "should be initialized" }
+};
+
+struct C : A {};
+
+void f()
+{
+ D d; // { dg-error "uninitialized" }
+ new D; // { dg-error "uninitialized" }
+ D();
+ new D();
+
+ C c; // { dg-error "uninitialized" }
+ new C; // { dg-error "uninitialized" }
+ C(); // { dg-error "value-initialization" }
+ new C(); // { dg-error "value-initialization" }
+}
diff --git a/gcc/testsuite/g++.dg/init/const9.C b/gcc/testsuite/g++.dg/init/const9.C
index ba1dfd4bc4..d733e95333 100644
--- a/gcc/testsuite/g++.dg/init/const9.C
+++ b/gcc/testsuite/g++.dg/init/const9.C
@@ -1,5 +1,5 @@
// PR c++/55893
-// { dg-final { scan-assembler-not "rodata" } }
+// { dg-final { scan-assembler-not "rodata" { target { ! hppa*-*-* } } } }
struct foo
{
diff --git a/gcc/testsuite/g++.dg/init/copy7.C b/gcc/testsuite/g++.dg/init/copy7.C
new file mode 100644
index 0000000000..655fae21e6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/copy7.C
@@ -0,0 +1,9 @@
+// CWG 5
+
+struct C { };
+C c;
+struct A {
+ A(const A&);
+ A(const C&);
+};
+const volatile A a = c; // Okay
diff --git a/gcc/testsuite/g++.dg/init/ctor11.C b/gcc/testsuite/g++.dg/init/ctor11.C
new file mode 100644
index 0000000000..486f58aa95
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ctor11.C
@@ -0,0 +1,19 @@
+// PR c++/49569
+
+struct A
+{
+ virtual void f() = 0;
+};
+
+struct B: A
+{
+ int i;
+ virtual void f() { }
+};
+
+struct C
+{
+ B b;
+ C(): b() { }
+ C(const B& b): b(b) { }
+};
diff --git a/gcc/testsuite/g++.dg/init/ctor4-1.C b/gcc/testsuite/g++.dg/init/ctor4-1.C
new file mode 100644
index 0000000000..1333b35f9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/ctor4-1.C
@@ -0,0 +1,21 @@
+// { dg-do compile }
+
+class foo {
+public:
+ foo();
+};
+
+class bar: public foo { // { dg-error "uninitialized" }
+ // { dg-message "implicitly deleted" "" { target c++11 } 8 }
+private:
+ int const a; // { dg-message "should be initialized" }
+};
+
+foo::foo() {
+}
+
+int main(int argc, char **argv)
+{
+ bar x; // { dg-error "deleted" "" { target c++11 } }
+ // { dg-message "synthesized" "" { target { ! c++11 } } 19 }
+}
diff --git a/gcc/testsuite/g++.dg/init/ctor4.C b/gcc/testsuite/g++.dg/init/ctor4.C
index 1c92bb973d..21034b6796 100644
--- a/gcc/testsuite/g++.dg/init/ctor4.C
+++ b/gcc/testsuite/g++.dg/init/ctor4.C
@@ -6,9 +6,10 @@ public:
foo();
};
-class bar: public foo { // { dg-error "reference|bar::bar" }
+class bar: public foo { // { dg-error "uninitialized" }
+ // { dg-message "implicitly deleted" "" { target c++11 } 9 }
private:
- int &a;
+ int &a; // { dg-message "should be initialized" }
};
foo::foo() {
@@ -16,5 +17,6 @@ foo::foo() {
int main(int argc, char **argv)
{
- bar x; // { dg-message "synthesized|deleted" }
+ bar x; // { dg-error "deleted" "" { target c++11 } }
+ // { dg-message "synthesized" "" { target { ! c++11 } } 20 }
}
diff --git a/gcc/testsuite/g++.dg/init/ctor8.C b/gcc/testsuite/g++.dg/init/ctor8.C
index 3491f6a1d2..3c37790c0c 100644
--- a/gcc/testsuite/g++.dg/init/ctor8.C
+++ b/gcc/testsuite/g++.dg/init/ctor8.C
@@ -1,9 +1,10 @@
// PR c++/29039
-typedef struct S {
+typedef struct S { // { dg-error "reference" "" { target c++11 } }
int &r;
}; // { dg-warning "'typedef' was ignored" }
+
S f () {
- return S (); // { dg-error "reference" }
+ return S (); // { dg-error "reference|deleted" }
}
diff --git a/gcc/testsuite/g++.dg/init/delete1.C b/gcc/testsuite/g++.dg/init/delete1.C
index 698b127714..304dca1caf 100644
--- a/gcc/testsuite/g++.dg/init/delete1.C
+++ b/gcc/testsuite/g++.dg/init/delete1.C
@@ -1,7 +1,7 @@
// PR c++/19811
-class C; // { dg-error "forward" }
+class C; // { dg-warning "forward" }
void foo(void *p) {
- delete [] ((C*)p) ; // { dg-error "" }
+ delete [] ((C*)p) ; // { dg-warning "problem|incomplete" }
}
diff --git a/gcc/testsuite/g++.dg/init/dso_handle2.C b/gcc/testsuite/g++.dg/init/dso_handle2.C
new file mode 100644
index 0000000000..b219dc0261
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/dso_handle2.C
@@ -0,0 +1,11 @@
+// PR c++/58846
+// { dg-options "-fuse-cxa-atexit" }
+
+extern "C" { char* __dso_handle; }
+
+struct A
+{
+ ~A();
+};
+
+A a; // { dg-error "conflicting declaration" }
diff --git a/gcc/testsuite/g++.dg/init/explicit1.C b/gcc/testsuite/g++.dg/init/explicit1.C
new file mode 100644
index 0000000000..f376df2364
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/explicit1.C
@@ -0,0 +1,9 @@
+// PR c++/60417
+
+struct A { explicit A(int = 0); };
+struct B { A a; };
+
+int main()
+{
+ B b = {};
+}
diff --git a/gcc/testsuite/g++.dg/init/explicit2.C b/gcc/testsuite/g++.dg/init/explicit2.C
new file mode 100644
index 0000000000..d1dbb39fc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/explicit2.C
@@ -0,0 +1,8 @@
+// PR c++/60417
+
+struct A { explicit A(int = 0); };
+
+int main()
+{
+ A a[1] = { };
+}
diff --git a/gcc/testsuite/g++.dg/init/new34.C b/gcc/testsuite/g++.dg/init/new34.C
new file mode 100644
index 0000000000..9e67eb3417
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new34.C
@@ -0,0 +1,11 @@
+// PR c++/53356
+
+struct A { A(); ~A(); };
+
+struct B {
+ operator const A () const;
+};
+
+A* cause_ICE() {
+ return new A((A(),A()));
+}
diff --git a/gcc/testsuite/g++.dg/init/new35.C b/gcc/testsuite/g++.dg/init/new35.C
new file mode 100644
index 0000000000..7d07cf57f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new35.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "" }
+
+int
+main (int argc, char **argv)
+{
+ typedef char A[argc];
+ new A; // { dg-warning "array" }
+ new A[0]; // { dg-error "must be constant|not a constant" }
+ new A[5]; // { dg-error "must be constant|not a constant" }
+ new (A[0]); // { dg-error "must be constant|not a constant" }
+ new (A[5]); // { dg-error "must be constant|not a constant" }
+}
diff --git a/gcc/testsuite/g++.dg/init/new36.C b/gcc/testsuite/g++.dg/init/new36.C
new file mode 100644
index 0000000000..c9b7af2d87
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new36.C
@@ -0,0 +1,153 @@
+// Testcase for invocation of constructors/destructors in operator new[].
+// { dg-do run }
+
+#include <stdlib.h>
+
+struct E {
+ virtual ~E() { }
+};
+
+struct S {
+ S();
+ ~S();
+};
+
+static int count;
+static int max;
+static int throwAfter = -1;
+static S *pS;
+
+S::S()
+{
+ if (throwAfter >= 0 && count >= throwAfter)
+ throw E();
+ if (pS)
+ {
+ ++pS;
+ if (this != pS)
+ abort();
+ }
+ else
+ pS = this;
+ ++count;
+ max = count;
+}
+
+S::~S()
+{
+ if (count > 1)
+ {
+ if (this != pS)
+ abort();
+ --pS;
+ }
+ else
+ pS = 0;
+ --count;
+}
+
+void __attribute__((noinline)) doit(int n)
+{
+ {
+ S *s = new S[n];
+ if (count != n)
+ abort();
+ if (pS != s + n - 1)
+ abort();
+ delete [] s;
+ if (count != 0)
+ abort();
+ }
+ throwAfter = 2;
+ max = 0;
+ try
+ {
+ new S[n];
+ abort();
+ }
+ catch (E)
+ {
+ if (max != 2)
+ abort();
+ }
+ throwAfter = -1;
+}
+
+int main()
+{
+ {
+ S s;
+ if (count != 1)
+ abort();
+ if (pS != &s)
+ abort();
+ }
+ if (count != 0)
+ abort();
+ {
+ S *s = new S;
+ if (count != 1)
+ abort();
+ if (pS != s)
+ abort();
+ delete s;
+ if (count != 0)
+ abort();
+ }
+ {
+ S *s = new S[1];
+ if (count != 1)
+ abort();
+ if (pS != s)
+ abort();
+ delete [] s;
+ if (count != 0)
+ abort();
+ }
+ {
+ S *s = new S[5];
+ if (count != 5)
+ abort();
+ if (pS != s + 4)
+ abort();
+ delete [] s;
+ if (count != 0)
+ abort();
+ }
+ typedef S A[5];
+ {
+ S *s = new A;
+ if (count != 5)
+ abort();
+ if (pS != s + 4)
+ abort();
+ delete [] s;
+ if (count != 0)
+ abort();
+ }
+ throwAfter = 2;
+ max = 0;
+ try
+ {
+ new S[5];
+ abort();
+ }
+ catch (E)
+ {
+ if (max != 2)
+ abort();
+ }
+ max = 0;
+ try
+ {
+ new A;
+ abort();
+ }
+ catch (E)
+ {
+ if (max != 2)
+ abort();
+ }
+ throwAfter = -1;
+ doit(5);
+}
diff --git a/gcc/testsuite/g++.dg/init/new37.C b/gcc/testsuite/g++.dg/init/new37.C
new file mode 100644
index 0000000000..eab7854217
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new37.C
@@ -0,0 +1,63 @@
+// { dg-do compile }
+
+void
+nonconst(int n)
+{
+ new (long[n][n]); // { dg-error "variable length|array size|not a constant|runtime bound" }
+ new long[n][n]; // { dg-error "variable length|array size|not a constant" }
+}
+
+template <typename T>
+void *
+callnew(int n)
+{
+ return new long[n][T::n];
+}
+
+template <typename T>
+void *
+callnew_fail_1(int n)
+{
+ return new long[n][T::n]; // { dg-error "variable length|array size|usable in a constant" }
+}
+
+template <typename T>
+void *
+callnew_fail_2()
+{
+ return new long[T::n]; // { dg-error "size in array new" }
+}
+
+template <typename T>
+void *
+callnew_fail_3()
+{
+ return new T[2][T::n]; // { dg-error "size of array has non-integral type" }
+}
+
+struct T1 {
+ static int n;
+};
+
+struct T2 {
+ static const double n = 2; // { dg-error "non-integral type" }
+};
+
+struct T3 {
+ static const int n = 2;
+};
+
+struct T4 {
+ enum { n = 3 };
+};
+
+void
+test_callnew(int n)
+{
+ new long[0.2]; // { dg-error "integral or enumeration type" }
+ callnew_fail_1<T1>(n);
+ callnew_fail_2<T2>();
+ callnew_fail_3<T2>();
+ callnew<T3>(n);
+ callnew<T4>(n);
+}
diff --git a/gcc/testsuite/g++.dg/init/new38.C b/gcc/testsuite/g++.dg/init/new38.C
new file mode 100644
index 0000000000..1672f229d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new38.C
@@ -0,0 +1,54 @@
+// { dg-do compile }
+
+void
+large_array_char(int n)
+{
+ new char[n]
+ [1ULL << (sizeof(void *) * 4)]
+ [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of array" }
+}
+
+template <typename T>
+void
+large_array_char_template(int n)
+{
+ new char[n]
+ [1ULL << (sizeof(void *) * 4)]
+ [1ULL << (sizeof(void *) * 4)]; // { dg-error "size of array" }
+}
+
+
+template <typename T>
+void
+large_array_template1(int n)
+{
+ new T[n] // { dg-error "size of array is too large" }
+ [(1ULL << (sizeof(void *) * 4)) / sizeof(T)]
+ [1ULL << (sizeof(void *) * 4)];
+}
+
+template <typename T>
+void
+large_array_template2(int n)
+{
+ new T[n] // { dg-error "size of array is too large" }
+ [(1ULL << (sizeof(void *) * 4)) / sizeof(T)]
+ [1ULL << (sizeof(void *) * 4)];
+}
+
+template <typename T>
+void
+large_array_template3(int n)
+{
+ new T[n] // { dg-error "size of array is too large" }
+ [(1ULL << (sizeof(void *) * 4)) / sizeof(T)]
+ [1ULL << (sizeof(void *) * 4)];
+}
+
+void
+call_large_array_template(int n)
+{
+ large_array_template1<char>(n);
+ large_array_template2<int>(n);
+ large_array_template3<double>(n);
+}
diff --git a/gcc/testsuite/g++.dg/init/new39.C b/gcc/testsuite/g++.dg/init/new39.C
new file mode 100644
index 0000000000..f274ebb7b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new39.C
@@ -0,0 +1,68 @@
+// Testcase for overflow handling in operator new[].
+// { dg-do run }
+
+#include <stdlib.h>
+#include <stdexcept>
+
+struct without_new {
+ char bar[256];
+};
+
+struct with_new {
+ char bar[256];
+ void *operator new[] (size_t sz)
+ {
+ if (sz != -1)
+ abort ();
+ throw std::bad_alloc();
+ }
+};
+
+template <typename T>
+inline void
+test (size_t s)
+{
+ try {
+ new T[s];
+ abort ();
+ } catch (std::bad_alloc &) {
+ }
+}
+
+template <typename T>
+void
+test_noopt (size_t s) __attribute__((noinline));
+
+template <typename T>
+void
+test_noopt (size_t s)
+{
+ __asm__ ("");
+ test<T> (s);
+}
+
+template <typename T>
+void
+all_tests ()
+{
+ test<T>(-1);
+ test<T>(size_t(-1) / sizeof (T) + 1);
+ test<T>(size_t(-1) / sizeof (T) + 2);
+ test_noopt<T>(-1);
+ test_noopt<T>(size_t(-1) / sizeof (T) + 1);
+ test_noopt<T>(size_t(-1) / sizeof (T) + 2);
+}
+
+int
+main ()
+{
+ try {
+ ::operator new(size_t(-1));
+ abort ();
+ } catch (std::bad_alloc &) {
+ }
+ all_tests<without_new> ();
+ all_tests<with_new> ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/init/new40.C b/gcc/testsuite/g++.dg/init/new40.C
new file mode 100644
index 0000000000..026712dc1a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/new40.C
@@ -0,0 +1,114 @@
+// Testcase for overflow handling in operator new[].
+// Optimization of unnecessary overflow checks.
+// In C++11 we throw bad_array_new_length instead.
+// { dg-options -std=c++03 }
+// { dg-do run }
+
+#include <assert.h>
+#include <stdlib.h>
+#include <stdexcept>
+
+static size_t magic_allocation_size
+ = 1 + (size_t (1) << (sizeof (size_t) * 8 - 1));
+
+struct exc : std::bad_alloc {
+};
+
+static size_t expected_size;
+
+struct pod_with_new {
+ char ch;
+ void *operator new[] (size_t sz)
+ {
+ if (sz != expected_size)
+ abort ();
+ throw exc ();
+ }
+};
+
+struct with_new {
+ char ch;
+ with_new () { }
+ ~with_new () { }
+ void *operator new[] (size_t sz)
+ {
+ if (sz != size_t (-1))
+ abort ();
+ throw exc ();
+ }
+};
+
+struct non_pod {
+ char ch;
+ non_pod () { }
+ ~non_pod () { }
+};
+
+void *
+operator new (size_t sz) _GLIBCXX_THROW (std::bad_alloc)
+{
+ if (sz != expected_size)
+ abort ();
+ throw exc ();
+}
+
+int
+main ()
+{
+ if (sizeof (pod_with_new) == 1)
+ expected_size = magic_allocation_size;
+ else
+ expected_size = -1;
+
+ try {
+ new pod_with_new[magic_allocation_size];
+ abort ();
+ } catch (exc &) {
+ }
+
+ if (sizeof (with_new) == 1)
+ expected_size = magic_allocation_size;
+ else
+ expected_size = -1;
+
+ try {
+ new with_new[magic_allocation_size];
+ abort ();
+ } catch (exc &) {
+ }
+
+ expected_size = magic_allocation_size;
+ try {
+ new char[magic_allocation_size];
+ abort ();
+ } catch (exc &) {
+ }
+
+ expected_size = -1;
+
+ try {
+ new pod_with_new[magic_allocation_size][2];
+ abort ();
+ } catch (exc &) {
+ }
+
+ try {
+ new with_new[magic_allocation_size][2];
+ abort ();
+ } catch (exc &) {
+ }
+
+ try {
+ new char[magic_allocation_size][2];
+ abort ();
+ } catch (exc &) {
+ }
+
+ try {
+ new non_pod[magic_allocation_size];
+ abort ();
+ } catch (exc &) {
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/init/no-elide1.C b/gcc/testsuite/g++.dg/init/no-elide1.C
new file mode 100644
index 0000000000..75b648ed12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/no-elide1.C
@@ -0,0 +1,14 @@
+// PR c++/47503
+// { dg-options "-fno-elide-constructors" }
+
+struct A
+{
+ int i;
+ A ();
+};
+
+struct B
+{
+ A a;
+ B (A &aa) : a (aa) { }
+};
diff --git a/gcc/testsuite/g++.dg/init/null1.C b/gcc/testsuite/g++.dg/init/null1.C
index a76ae2a257..2c05dc3dc5 100644
--- a/gcc/testsuite/g++.dg/init/null1.C
+++ b/gcc/testsuite/g++.dg/init/null1.C
@@ -1,5 +1,5 @@
// PR c++/16489
-// { dg-do compile { target c++98 } }
+// { dg-do compile { target { ! c++11 } } }
const int NULL = 0;
int main() {
diff --git a/gcc/testsuite/g++.dg/init/pr25811.C b/gcc/testsuite/g++.dg/init/pr25811.C
index c906a9bbd3..c29f40607b 100644
--- a/gcc/testsuite/g++.dg/init/pr25811.C
+++ b/gcc/testsuite/g++.dg/init/pr25811.C
@@ -1,48 +1,57 @@
// PR c++/25811
// { dg-do compile }
-struct A1
+struct A1 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 4 }
{
int const j; // { dg-message "should be initialized" }
};
-struct A2
+struct A2 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 10 }
{
int const volatile i; // { dg-message "should be initialized" }
};
-struct A3
+struct A3 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 16 }
{
int& ref; // { dg-message "should be initialized" }
};
-struct A4
+struct A4 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 22 }
{
int const& ref; // { dg-message "should be initialized" }
};
-struct A5
+struct A5 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 28 }
{
int& ref; // { dg-message "should be initialized" }
int const i; // { dg-message "should be initialized" }
};
-template <class T> struct S1
+template <class T> struct S1 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 35 }
{
T const i; // { dg-message "should be initialized" }
};
-template <class T> struct S2
+template <class T> struct S2 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 41 }
{
T const volatile i; // { dg-message "should be initialized" }
};
-template <class T> struct S3
+template <class T> struct S3 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 47 }
{
T& ref; // { dg-message "should be initialized" }
};
-template <class T> struct S4
+template <class T> struct S4 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 53 }
{
T const i; // { dg-message "should be initialized" }
T& ref; // { dg-message "should be initialized" }
@@ -55,42 +64,48 @@ struct X
int const& r;
};
-struct Y11
+struct Y11 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 67 }
{
int const i; // { dg-message "should be initialized" }
};
-struct Y1
+struct Y1 // { dg-error "deleted" "" { target c++11 } }
{
Y11 a[1];
};
-struct Y22
+struct Y22 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 78 }
{
int& ref; // { dg-message "should be initialized" }
};
-struct Y2
+struct Y2 // { dg-error "deleted" "" { target c++11 } }
{
Y22 a[1];
};
-struct Z1
+struct Z1 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 89 }
{
int const i; // { dg-message "should be initialized" }
};
-struct Z2
+struct Z2 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 95 }
{
int& ref; // { dg-message "should be initialized" }
};
-struct Z3
+struct Z3 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 101 }
{
int const i; // { dg-message "should be initialized" }
};
-struct Z4
+struct Z4 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 107 }
{
int& ref; // { dg-message "should be initialized" }
};
@@ -100,7 +115,7 @@ struct Z5
int i;
};
-struct Z
+struct Z // { dg-error "deleted" "" { target c++11 } }
{
Z1 z1;
Z2 z2;
@@ -109,54 +124,55 @@ struct Z
Z5 z5;
};
-union U
+union U // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 127 }
{
int const i; // { dg-message "should be initialized" }
};
void f1 ()
{
- new A1; // { dg-error "uninitialized const member" }
+ new A1; // { dg-error "deleted|uninitialized const member" }
}
void f2 ()
{
- new A2; // { dg-error "uninitialized const member" }
+ new A2; // { dg-error "deleted|uninitialized const member" }
}
void f3 ()
{
- new A3; // { dg-error "uninitialized reference member" }
+ new A3; // { dg-error "deleted|uninitialized reference member" }
}
void f4 ()
{
- new A4; // { dg-error "uninitialized reference member" }
+ new A4; // { dg-error "deleted|uninitialized reference member" }
}
void f5 ()
{
- new A5; // { dg-error "uninitialized reference member|uninitialized const member" }
+ new A5; // { dg-error "deleted|uninitialized reference member|uninitialized const member" }
}
void f6 ()
{
- new S1<int>; // { dg-error "uninitialized const member" }
+ new S1<int>; // { dg-error "deleted|uninitialized const member" }
}
void f7 ()
{
- new S2<int>; // { dg-error "uninitialized const member" }
+ new S2<int>; // { dg-error "deleted|uninitialized const member" }
}
void f8 ()
{
- new S3<int>; // { dg-error "uninitialized reference member" }
+ new S3<int>; // { dg-error "deleted|uninitialized reference member" }
}
void f9 ()
{
- new S4<int>; // { dg-error "uninitialized reference member|uninitialized const member" }
+ new S4<int>; // { dg-error "deleted|uninitialized reference member|uninitialized const member" }
}
void f10 ()
@@ -166,30 +182,30 @@ void f10 ()
void f11 ()
{
- new A1[1]; // { dg-error "uninitialized const member" }
+ new A1[1]; // { dg-error "deleted|uninitialized const member" }
}
void f12 ()
{
- new A3[1]; // { dg-error "uninitialized reference member" }
+ new A3[1]; // { dg-error "deleted|uninitialized reference member" }
}
void f13 ()
{
- new Y1; // { dg-error "uninitialized const member" }
+ new Y1; // { dg-error "deleted|uninitialized const member" }
}
void f14 ()
{
- new Y2; // { dg-error "uninitialized reference member" }
+ new Y2; // { dg-error "deleted|uninitialized reference member" }
}
void f15 ()
{
- new Z; // { dg-error "uninitialized reference member|uninitialized const member" }
+ new Z; // { dg-error "deleted|uninitialized reference member|uninitialized const member" }
}
void f16 ()
{
- new U; // { dg-error "uninitialized const member" }
+ new U; // { dg-error "deleted|uninitialized const member" }
}
diff --git a/gcc/testsuite/g++.dg/init/pr29043.C b/gcc/testsuite/g++.dg/init/pr29043.C
index 6ed31b5d6b..c81c39cb0f 100644
--- a/gcc/testsuite/g++.dg/init/pr29043.C
+++ b/gcc/testsuite/g++.dg/init/pr29043.C
@@ -1,7 +1,8 @@
// PR c++/29043
// { dg-do compile }
-struct S
+struct S // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 4 }
{
int const i; // { dg-message "should be initialized" }
};
@@ -9,19 +10,20 @@ struct S
class C
{
public:
- C() {} // { dg-error "uninitialized const member" }
+ C() {} // { dg-error "uninitialized const member|deleted" }
S s;
};
-struct S2
+struct S2 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 17 }
{
- int& ref; // { dg-message "should be initialized" }
+ int& ref; // { dg-message "should be initialized" }
};
class C2
{
public:
- C2() {} // { dg-error "uninitialized reference member" }
+ C2() {} // { dg-error "uninitialized reference member|deleted" }
S2 s;
};
@@ -33,20 +35,21 @@ class C3
};
};
-struct S4
+struct S4 // { dg-message "implicitly deleted" "" { target c++11 } }
+ // { dg-error "uninitialized" "" { target c++11 } 38 }
{
int const i; // { dg-message "should be initialized" }
};
struct C4
{
- C4() {} // { dg-error "uninitialized const member" }
+ C4() {} // { dg-error "uninitialized const member|deleted" }
S4 s4[ 1 ];
};
struct C5
{
- C5() {} // { dg-message "uninitialized" }
+ C5() {} // { dg-error "uninitialized" }
int const iit[ 1 ];
};
diff --git a/gcc/testsuite/g++.dg/init/pr43719.C b/gcc/testsuite/g++.dg/init/pr43719.C
index d3487c94a0..c8cebc2de1 100644
--- a/gcc/testsuite/g++.dg/init/pr43719.C
+++ b/gcc/testsuite/g++.dg/init/pr43719.C
@@ -1,48 +1,48 @@
// PR c++/43719
// { dg-do compile }
-struct A1
+struct A1 // { dg-error "uninitialized" "" { target c++11 } }
{
int const j; // { dg-message "should be initialized" }
};
-struct A2
+struct A2 // { dg-error "uninitialized" "" { target c++11 } }
{
int const volatile i; // { dg-message "should be initialized" }
};
-struct A3
+struct A3 // { dg-error "uninitialized" "" { target c++11 } }
{
int& ref; // { dg-message "should be initialized" }
};
-struct A4
+struct A4 // { dg-error "uninitialized" "" { target c++11 } }
{
int const& ref; // { dg-message "should be initialized" }
};
-struct A5
+struct A5 // { dg-error "uninitialized" "" { target c++11 } }
{
int& ref; // { dg-message "should be initialized" }
int const i; // { dg-message "should be initialized" }
};
-template <class T> struct S1
+template <class T> struct S1 // { dg-error "uninitialized" "" { target c++11 } }
{
T const i; // { dg-message "should be initialized" }
};
-template <class T> struct S2
+template <class T> struct S2 // { dg-error "uninitialized" "" { target c++11 } }
{
T const volatile i; // { dg-message "should be initialized" }
};
-template <class T> struct S3
+template <class T> struct S3 // { dg-error "uninitialized" "" { target c++11 } }
{
T& ref; // { dg-message "should be initialized" }
};
-template <class T> struct S4
+template <class T> struct S4 // { dg-error "uninitialized" "" { target c++11 } }
{
T const i; // { dg-message "should be initialized" }
T& ref; // { dg-message "should be initialized" }
@@ -55,42 +55,42 @@ struct X
int const& r;
};
-struct Y11
+struct Y11 // { dg-error "uninitialized" "" { target c++11 } }
{
int const i; // { dg-message "should be initialized" }
};
-struct Y1
+struct Y1 // { dg-error "deleted" "" { target c++11 } }
{
Y11 a[1];
};
-struct Y22
+struct Y22 // { dg-error "uninitialized" "" { target c++11 } }
{
int& ref; // { dg-message "should be initialized" }
};
-struct Y2
+struct Y2 // { dg-error "deleted" "" { target c++11 } }
{
Y22 a[1];
};
-struct Z1
+struct Z1 // { dg-error "uninitialized" "" { target c++11 } }
{
int const i; // { dg-message "should be initialized" }
};
-struct Z2
+struct Z2 // { dg-error "uninitialized" "" { target c++11 } }
{
int& ref; // { dg-message "should be initialized" }
};
-struct Z3
+struct Z3 // { dg-error "uninitialized" "" { target c++11 } }
{
int const i; // { dg-message "should be initialized" }
};
-struct Z4
+struct Z4 // { dg-error "uninitialized" "" { target c++11 } }
{
int& ref; // { dg-message "should be initialized" }
};
@@ -100,7 +100,7 @@ struct Z5
int i;
};
-struct Z
+struct Z // { dg-error "deleted" "" { target c++11 } }
{
Z1 z1;
Z2 z2;
@@ -109,7 +109,7 @@ struct Z
Z5 z5;
};
-union U
+union U // { dg-error "uninitialized" "" { target c++11 } }
{
int const i; // { dg-message "should be initialized" }
};
@@ -117,47 +117,47 @@ union U
void f1 ()
{
- A1 a1; // { dg-error "uninitialized const member" }
+ A1 a1; // { dg-error "uninitialized const member|deleted" }
}
void f2 ()
{
- A2 a2; // { dg-error "uninitialized const member" }
+ A2 a2; // { dg-error "uninitialized const member|deleted" }
}
void f3 ()
{
- A3 a3; // { dg-error "uninitialized reference member" }
+ A3 a3; // { dg-error "uninitialized reference member|deleted" }
}
void f4 ()
{
- A4 a4; // { dg-error "uninitialized reference member" }
+ A4 a4; // { dg-error "uninitialized reference member|deleted" }
}
void f5 ()
{
- A5 a5; // { dg-error "uninitialized reference member|uninitialized const member" }
+ A5 a5; // { dg-error "uninitialized reference member|uninitialized const member|deleted" }
}
void f6 ()
{
- S1<int> s; // { dg-error "uninitialized const member" }
+ S1<int> s; // { dg-error "uninitialized const member|deleted" }
}
void f7 ()
{
- S2<int> s; // { dg-error "uninitialized const member" }
+ S2<int> s; // { dg-error "uninitialized const member|deleted" }
}
void f8 ()
{
- S3<int> s; // { dg-error "uninitialized reference member" }
+ S3<int> s; // { dg-error "uninitialized reference member|deleted" }
}
void f9 ()
{
- S4<int> s; // { dg-error "uninitialized reference member|uninitialized const member" }
+ S4<int> s; // { dg-error "uninitialized reference member|uninitialized const member|deleted" }
}
void f10 ()
@@ -167,31 +167,31 @@ void f10 ()
void f11 ()
{
- A1 a[ 1 ]; // { dg-error "uninitialized const member" }
+ A1 a[ 1 ]; // { dg-error "uninitialized const member|deleted" }
}
void f12 ()
{
- A3 a[ 1 ]; // { dg-error "uninitialized reference member" }
+ A3 a[ 1 ]; // { dg-error "uninitialized reference member|deleted" }
}
void f13 ()
{
- Y1 y1; // { dg-error "uninitialized const member" }
+ Y1 y1; // { dg-error "uninitialized const member|deleted" }
}
void f14 ()
{
- Y2 y2; // { dg-error "uninitialized reference member" }
+ Y2 y2; // { dg-error "uninitialized reference member|deleted" }
}
void f15 ()
{
- Z z; // { dg-error "uninitialized reference member|uninitialized const member" }
+ Z z; // { dg-error "uninitialized reference member|uninitialized const member|deleted" }
}
void f16 ()
{
- U u; // { dg-error "uninitialized const member" }
+ U u; // { dg-error "uninitialized const member|deleted" }
}
diff --git a/gcc/testsuite/g++.dg/init/pr44086.C b/gcc/testsuite/g++.dg/init/pr44086.C
index e3304f4a27..c3e9d4e56a 100644
--- a/gcc/testsuite/g++.dg/init/pr44086.C
+++ b/gcc/testsuite/g++.dg/init/pr44086.C
@@ -1,15 +1,15 @@
// PR c++/44086
// { dg-do compile }
-struct A
+struct A // { dg-error "uninitialized" "" { target c++11 } }
{
int const i : 2; // { dg-message "should be initialized" }
};
void f()
{
- A a; // { dg-error "uninitialized const" }
- new A; // { dg-error "uninitialized const" }
- A();
- new A();
+ A a; // { dg-error "deleted|uninitialized const" }
+ new A; // { dg-error "deleted|uninitialized const" }
+ A(); // { dg-error "deleted" "" { target c++11 } }
+ new A(); // { dg-error "deleted" "" { target c++11 } }
}
diff --git a/gcc/testsuite/g++.dg/init/pr55497.C b/gcc/testsuite/g++.dg/init/pr55497.C
new file mode 100644
index 0000000000..b50f3fbdfb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/pr55497.C
@@ -0,0 +1,15 @@
+// PR c++/55497
+// { dg-options "-g" }
+
+int get();
+
+struct B
+{
+ B()
+ {
+ static const int v = get();
+ char BUFFER[v];
+ }
+};
+
+B b;
diff --git a/gcc/testsuite/g++.dg/init/pr58811.C b/gcc/testsuite/g++.dg/init/pr58811.C
new file mode 100644
index 0000000000..42e7fac42f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/pr58811.C
@@ -0,0 +1,11 @@
+// PR c++/58811
+
+struct B
+{
+ struct A a; // { dg-error "incomplete type" }
+};
+
+void foo()
+{
+ B();
+}
diff --git a/gcc/testsuite/g++.dg/init/pr60572.C b/gcc/testsuite/g++.dg/init/pr60572.C
new file mode 100644
index 0000000000..a39dfa09a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/pr60572.C
@@ -0,0 +1,13 @@
+// PR c++/60572
+// { dg-do compile }
+
+struct A
+{
+ A x; // { dg-error "incomplete type" }
+ virtual ~A () {}
+};
+
+struct B : A
+{
+ B () : A () {}
+};
diff --git a/gcc/testsuite/g++.dg/init/ref14.C b/gcc/testsuite/g++.dg/init/ref14.C
index 212e6e95d7..6ac42415b4 100644
--- a/gcc/testsuite/g++.dg/init/ref14.C
+++ b/gcc/testsuite/g++.dg/init/ref14.C
@@ -1,4 +1,6 @@
// PR c++/33459
+// { dg-prune-output "uninitialized" }
+// { dg-prune-output "deleted" }
union A
{
diff --git a/gcc/testsuite/g++.dg/init/static-init3.C b/gcc/testsuite/g++.dg/init/static-init3.C
new file mode 100644
index 0000000000..9f89c3119b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/static-init3.C
@@ -0,0 +1,9 @@
+// PR c++/55137
+// s should have constant initialization.
+// { dg-final { scan-assembler-not "GLOBAL" } }
+
+struct S {
+ int b;
+};
+
+struct S s = { -1 + (int)(sizeof(int) - 1) };
diff --git a/gcc/testsuite/g++.dg/init/uninitialized1.C b/gcc/testsuite/g++.dg/init/uninitialized1.C
new file mode 100644
index 0000000000..e8509ff4b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/init/uninitialized1.C
@@ -0,0 +1,12 @@
+// PR c++/58126
+
+struct A { // { dg-error "uninitialized" "" { target c++11 } }
+ const int value1; // { dg-message "should be initialized" }
+ int& value2; // { dg-message "should be initialized" }
+};
+
+struct B : A { }; // { dg-error "deleted" "" { target c++11 } }
+
+A a; // { dg-error "deleted|uninitialized const member in 'struct A'|uninitialized reference member in 'struct A'" }
+
+B b; // { dg-error "deleted|uninitialized const member in base 'struct A' of 'struct B'|uninitialized reference member in base 'struct A' of 'struct B'" }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-10.C b/gcc/testsuite/g++.dg/ipa/devirt-10.C
new file mode 100644
index 0000000000..658442e345
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-10.C
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-inline -fdump-ipa-cp -fno-early-inlining" } */
+class wxPaintEvent { };
+struct wxDCBase
+{
+ wxDCBase ();
+ virtual int GetLayoutDirection() const{}
+ virtual void SetLayoutDirection(int){}
+};
+struct wxWindowDC : public wxDCBase {};
+struct wxBufferedDC : public wxDCBase
+{
+ void Init(wxDCBase*dc) {
+ InitCommon(dc);
+ }
+ void InitCommon(wxDCBase*dc) {
+ if (dc)
+ SetLayoutDirection(dc->GetLayoutDirection());
+ }
+};
+struct wxBufferedPaintDC : public wxBufferedDC {
+ wxBufferedPaintDC() {
+ Init(&m_paintdc);
+ }
+ wxWindowDC m_paintdc;
+};
+void OnPaint(wxPaintEvent & event) {
+ wxBufferedPaintDC dc;
+}
+/* IPA-CP should really discover both cases, but for time being the second is handled by inliner. */
+/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "inline" } } */
+/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-11.C b/gcc/testsuite/g++.dg/ipa/devirt-11.C
new file mode 100644
index 0000000000..2b6bdcba0d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-11.C
@@ -0,0 +1,49 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-inline -fno-devirtualize-speculatively" } */
+int baz ();
+struct A
+{
+ virtual int fn2 () = 0;
+ virtual int *fn3 ();
+ double *fn4 ();
+ int fn5 (int);
+ template <class T>
+ void fn1 (A &, T) { fn3 (); fn4 (); fn2 (); }
+};
+struct B : A
+{
+ int fn2 () { return 6; }
+ void fn3 (int, double);
+ B (bool = true);
+ B (int, int);
+};
+template <typename T>
+void
+foo (B &x, A &y, A &z)
+{
+ y.fn2 ();
+ z.fn2 ();
+ int i = baz ();
+ int j = (y.fn3 ())[i];
+ x.fn3 (j, (y.fn4 ())[i] + (z.fn4 ())[z.fn5 (j)]);
+}
+inline B
+operator+ (A &y, A &z)
+{
+ B x;
+ foo<int> (x, y, z);
+ return x;
+}
+void
+bar ()
+{
+ B a, b, c (4, 0), d;
+ a.fn1 (b, .6);
+ baz ();
+ c + d;
+}
+/* While inlining function called once we should devirtualize a new call to fn2
+ and two to fn3. While doing so the new symbol for fn2 needs to be
+ introduced. */
+/* { dg-final { scan-ipa-dump "Discovered a virtual call to a known target" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-12.C b/gcc/testsuite/g++.dg/ipa/devirt-12.C
new file mode 100644
index 0000000000..16bae4d8d7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-12.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-O -fdump-ipa-inline" }
+
+class Foo
+{
+public:
+ void Bar() const
+ {
+ __builtin_puts ("Howdy!");
+ }
+};
+
+int main()
+{
+ Foo x;
+ auto y = &Foo::Bar;
+ (x.*y)();
+ return 0;
+}
+
+// { dg-final { scan-ipa-dump "Inlined 1 calls, eliminated 1 functions" "inline" } }
+// { dg-final { cleanup-ipa-dump "inline" } }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-13.C b/gcc/testsuite/g++.dg/ipa/devirt-13.C
new file mode 100644
index 0000000000..b338a4c34c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-13.C
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* Call to foo should be devirtualized because there are no derived types of A. */
+/* { dg-options "-O2 -fdump-tree-ssa" } */
+namespace {
+class A {
+public:
+ virtual int foo(void)
+{
+ return 0;
+}
+};
+}
+class A a, *b=&a;
+main()
+{
+ return b->foo();
+}
+
+/* { dg-final { scan-tree-dump-times "OBJ_TYPE_REF" 0 "ssa"} } */
+/* { dg-final { cleanup-tree-dump "ssa" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-14.C b/gcc/testsuite/g++.dg/ipa/devirt-14.C
new file mode 100644
index 0000000000..456d44f84b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-14.C
@@ -0,0 +1,34 @@
+/* No devirtualization happens here, but A::foo should not end up as reachable
+ because the constructor of A is unreachable and therefore the virtual
+ method table referring to A::foo is optimized out. */
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-ssa" } */
+class B {
+public:
+ virtual int foo(void)
+{
+ return 0;
+}
+};
+namespace {
+class A : public B {
+public:
+ virtual int foo(void)
+{
+ return 1;
+}
+};
+}
+class B a, *b=&a;
+main()
+{
+ if (0)
+ {
+ class A a;
+ a.foo();
+ }
+ return b->foo();
+}
+
+/* { dg-final { scan-tree-dump-not "A::foo" "ssa"} } */
+/* { dg-final { cleanup-tree-dump "ssa" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-15.C b/gcc/testsuite/g++.dg/ipa/devirt-15.C
new file mode 100644
index 0000000000..2ea85f487f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-15.C
@@ -0,0 +1,40 @@
+/* Check that we speculatively devirutalize call to FOO to B::foo becuase
+ A is noreturn. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-devirt -fdump-tree-optimized" } */
+class A {
+public:
+ virtual int foo(void)
+ {
+ throw (1);
+ return 0;
+ }
+};
+
+
+class B : public A {
+public:
+ virtual int foo(void);
+};
+
+int
+B::foo(void)
+{
+ return 1;
+}
+class A a, *b=&a;
+void
+m(void)
+{
+ b->foo();
+}
+main()
+{
+ m();
+}
+
+/* { dg-final { scan-ipa-dump "Speculatively devirtualizing call" "devirt"} } */
+/* { dg-final { cleanup-ipa-dump "devirt" } } */
+/* Match if (PROF_6 == foo) to verify that the speculation survived. */
+/* { dg-final { scan-tree-dump "== foo" "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-16.C b/gcc/testsuite/g++.dg/ipa/devirt-16.C
new file mode 100644
index 0000000000..85567867ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-16.C
@@ -0,0 +1,39 @@
+/* We shall devirtualize to unreachable. No anonymous type method should surivve
+ reachability. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-whole-program" } */
+namespace {
+class B {
+public:
+ virtual int foo(void)
+{
+ return 0;
+}
+};
+class A : public B {
+public:
+ virtual int foo(void)
+{
+ return 1;
+}
+};
+}
+class B *b;
+main()
+{
+ int c;
+ if (c)
+ {
+ class A a;
+ a.foo();
+ class B b;
+ b.foo();
+ }
+ return b->foo();
+}
+
+/* { dg-final { scan-ipa-dump "Devirtualizing" "whole-program"} } */
+/* { dg-final { scan-ipa-dump "builtin_unreachable" "whole-program"} } */
+/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */
+/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */
+/* { dg-final { cleanup-ipa-dump "whole-program" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-17.C b/gcc/testsuite/g++.dg/ipa/devirt-17.C
new file mode 100644
index 0000000000..9edfd73af5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-17.C
@@ -0,0 +1,44 @@
+/* We shall devirtualize to B::foo since it is the only live candidate of an
+ anonymous type. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-whole-program" } */
+namespace {
+class B {
+public:
+ virtual int foo(void)
+{
+ return 0;
+}
+};
+class A : public B {
+public:
+ virtual int foo(void)
+{
+ return 1;
+}
+};
+}
+class B *b;
+void get_me_lost (void *);
+main()
+{
+ int c;
+ if (c)
+ {
+ class A a;
+ a.foo();
+ }
+ else
+ {
+ b = new (class B);
+ b->foo();
+ get_me_lost ((void *)&b);
+ }
+ return b->foo();
+}
+
+/* { dg-final { scan-ipa-dump "Devirtualizing" "whole-program"} } */
+/* { dg-final { scan-ipa-dump-not "builtin_unreachable" "whole-program"} } */
+/* { dg-final { scan-ipa-dump "B::foo" "whole-program"} } */
+/* { dg-final { scan-ipa-dump-not "A::foo" "whole-program"} } */
+/* { dg-final { cleanup-ipa-dump "whole-program" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-18.C b/gcc/testsuite/g++.dg/ipa/devirt-18.C
new file mode 100644
index 0000000000..dbbe597c92
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-18.C
@@ -0,0 +1,37 @@
+/* We shall devirtualize to unreachable. No anonymous type method should surivve
+ reachability. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ssa" } */
+namespace {
+class B {
+public:
+ virtual int foo(void)
+{
+ return 0;
+}
+};
+class A : public B {
+public:
+ virtual int foo(void)
+{
+ return 1;
+}
+};
+}
+class B *b;
+main()
+{
+ if (0)
+ {
+ class A a;
+ a.foo();
+ class B b;
+ b.foo();
+ }
+ return b->foo();
+}
+
+/* { dg-final { scan-tree-dump-not "A::foo" "ssa"} } */
+/* { dg-final { scan-tree-dump-not "B::foo" "ssa"} } */
+/* { dg-final { scan-tree-dump "builtin_unreachable" "ssa"} } */
+/* { dg-final { cleanup-tree-dump "ssa" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-19.C b/gcc/testsuite/g++.dg/ipa/devirt-19.C
new file mode 100644
index 0000000000..13686e3e02
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-19.C
@@ -0,0 +1,32 @@
+/* We should specialize for &b and devirtualize the call.
+ Previously we were failing by considering CLOBBER statement to be
+ a type change. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-cp" } */
+struct A {
+ void operator==(const A &);
+};
+class B {
+public:
+ A m_fn1();
+ A m_fn2();
+};
+template <typename T, typename M> class C {
+public:
+ T Key;
+ const M &m_fn2(const T &);
+ virtual void m_fn1() {}
+ B _map;
+};
+
+C<int, int> b;
+template <typename T, typename M> const M &C<T, M>::m_fn2(const T &) {
+ A a = _map.m_fn2();
+ a == _map.m_fn1();
+ m_fn1();
+}
+
+void fn1() { b.m_fn2(0); }
+/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-20.C b/gcc/testsuite/g++.dg/ipa/devirt-20.C
new file mode 100644
index 0000000000..0ea245bafd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-20.C
@@ -0,0 +1,31 @@
+#include <stdlib.h>
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-release_ssa" } */
+namespace {
+struct A
+{ int a; virtual int foo() {return a;} void bar() {a=7;} };
+struct B
+{ int b; virtual int foo2() {return b;} void bar2() {b=9;} };
+struct C : public virtual A, public virtual B { };
+struct D : public virtual B, public virtual A { };
+struct E : public C, public D { void bar2() {b=9;} }; }
+int
+main(void)
+{
+ struct E e;
+ struct C *c = &e;
+ struct D *d = &e;
+ struct A *a = &e;
+ struct B *b = &e;
+ e.bar();
+ e.bar2();
+ if (e.foo() + e.foo2() != 16)
+ abort ();
+ if (c->foo() + d->foo2() != 16)
+ abort ();
+ if (a->foo() + b->foo2() != 16)
+ abort ();
+ return 0;
+}
+/* { dg-final { scan-tree-dump-not "abort" "release_ssa" } } */
+/* { dg-final { cleanup-tree-dump "release_ssa" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-21.C b/gcc/testsuite/g++.dg/ipa/devirt-21.C
new file mode 100644
index 0000000000..675bd08d78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-21.C
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp" } */
+/* Main purpose is to verify that we do not produce wrong devirtualization to
+ C::m_fn1. We currently devirtualize to B::m_fn1, so check that. */
+#include <stdlib.h>
+class A {
+public:
+ unsigned length;
+};
+class B {};
+class MultiTermDocs : public virtual B {
+protected:
+ A readerTermDocs;
+ A subReaders;
+ virtual B *m_fn1(int *) {}
+ virtual inline ~MultiTermDocs();
+ void wrap(void)
+ {
+ m_fn1(NULL);
+ }
+};
+class C : MultiTermDocs {
+ B *m_fn1(int *);
+};
+MultiTermDocs::~MultiTermDocs() {
+ wrap ();
+ if (&readerTermDocs) {
+ B *a;
+ for (unsigned i = 0; i < subReaders.length; i++)
+ (a != 0);
+ }
+}
+
+B *C::m_fn1(int *) { abort (); }
+
+main()
+{
+ class C c;
+}
+/* { dg-final { scan-ipa-dump "Discovered a virtual call to" "cp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-22.C b/gcc/testsuite/g++.dg/ipa/devirt-22.C
new file mode 100644
index 0000000000..37e766945a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-22.C
@@ -0,0 +1,41 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fdump-ipa-cp" } */
+class A {};
+class B {
+public:
+ A &operator[](int);
+};
+class C : B {
+public:
+ virtual int m_fn1() { return 0; }
+ A &operator[](int p1) {
+ int a;
+ a = m_fn1();
+ static_cast<void>(__builtin_expect(a, 0) ?: 0);
+ return B::operator[](p1);
+ }
+};
+
+C b;
+int *e;
+static void sort(C &p1, C &p2) {
+ for (int i=0;; i++) {
+ A c, d = p2[0];
+ p1[0] = c;
+ p2[0] = d;
+ }
+}
+
+void lookupSourceDone() { b[0]; }
+
+void update_sources() {
+ if (e) {
+ C f;
+ sort(f, b);
+ }
+}
+/* Note that we miss one devirtualization because we are not able to track the
+ vtbl store in destructor.
+ Previously we devirtualized to C::m_fn1 instead of B::m_fn1. */
+/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-23.C b/gcc/testsuite/g++.dg/ipa/devirt-23.C
new file mode 100644
index 0000000000..98d86aee8e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-23.C
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-partial-inlining -fdump-ipa-cp -fno-devirtualize-speculatively" } */
+/* Main purpose is to verify that we do not produce wrong devirtualization to
+ C::m_fn1. We currently devirtualize to B::m_fn1, so check that. */
+#include <stdlib.h>
+class A {
+public:
+ unsigned length;
+};
+class B {};
+class MultiTermDocs : public virtual B {
+protected:
+ A readerTermDocs;
+ A subReaders;
+ virtual B *m_fn1(int *) {}
+ virtual inline ~MultiTermDocs();
+ inline void wrap(void)
+ {
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ m_fn1(NULL);
+ }
+};
+class C : MultiTermDocs {
+ B *m_fn1(int *);
+};
+MultiTermDocs::~MultiTermDocs() {
+ wrap ();
+ if (&readerTermDocs) {
+ B *a;
+ for (unsigned i = 0; i < subReaders.length; i++)
+ (a != 0);
+ }
+}
+
+B *C::m_fn1(int *) { abort (); }
+
+main()
+{
+ class C c;
+}
+/* { dg-final { scan-ipa-dump "Discovered a virtual call to" "cp" { xfail *-*-* } } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-24.C b/gcc/testsuite/g++.dg/ipa/devirt-24.C
new file mode 100644
index 0000000000..01bfdc2ec5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-24.C
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-inline -fdump-ipa-cp" } */
+void pad(void);
+class A {};
+class B {
+public:
+ A &operator[](int);
+};
+class C : B {
+public:
+ virtual int m_fn1() { return 0; }
+ inline A &operator[](int p1) {
+ int a;
+ a = m_fn1();
+ static_cast<void>(__builtin_expect(a, 0) ?: 0);
+ return B::operator[](p1);
+ }
+};
+
+int *e;
+static void sort(C &p1, C &p2) {
+ for (int i=0;; i++) {
+ A c, d = p2[0];
+ pad();
+ pad();
+ pad();
+ }
+}
+
+int test ();
+
+void update_sources() {
+while (test()) {
+ C f;
+C *b = new (C);
+ sort(f, *b);
+ }
+}
+/* { dg-final { scan-ipa-dump-times "Discovered a virtual call to a known target" 1 "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate passed by reference" 1 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-25.C b/gcc/testsuite/g++.dg/ipa/devirt-25.C
new file mode 100644
index 0000000000..1da44f5d11
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-25.C
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-cp" } */
+
+class ert_RefCounter {
+ protected:
+ int refCounterE;
+ virtual ~ert_RefCounter() {}
+};
+
+class ebs_Object : virtual public ert_RefCounter {
+};
+
+class dpr_App : public ebs_Object {
+ public:
+ virtual void run();
+};
+
+class dpr_Job : public ebs_Object {};
+
+void dpr_run(ebs_Object& objectA) {
+ ((dpr_App&)objectA).run();
+ dpr_Job jobL;
+ dpr_run(jobL);
+}
+/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-26.C b/gcc/testsuite/g++.dg/ipa/devirt-26.C
new file mode 100644
index 0000000000..2df429c345
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-26.C
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-devirt" } */
+struct A
+ {
+ int a;
+ virtual int bar(void) {return a;}
+ };
+struct B
+ {
+ virtual int foo(void) {return b;}
+ int b;
+ };
+struct C: A,B
+ {
+ virtual int foo(void) {return a;}
+ };
+
+struct C c;
+int test(void)
+{
+ struct C *d=&c;
+ struct B *b=d;
+ return d->foo()+b->foo();
+}
+/* The call to b->foo() is perfectly devirtualizable because C can not be in construction
+ when &c was used, but we can not analyze that so far. Test that we at least speculate
+ that type is in the construction. */
+/* { dg-final { scan-ipa-dump "Speculatively devirtualizing" "devirt" } } */
+/* { dg-final { cleanup-ipa-dump "devirt" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-27.C b/gcc/testsuite/g++.dg/ipa/devirt-27.C
new file mode 100644
index 0000000000..749f40af15
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-27.C
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+struct A
+ {
+ int a;
+ };
+struct B
+ {
+ __attribute__ ((visibility("default")))
+ virtual int foo(void) {return 42;}
+ int b;
+ };
+struct C: A,B
+ {
+ __attribute__ ((visibility("hidden")))
+ virtual int foo(void);
+ };
+
+struct C c;
+int test(void)
+{
+ struct C *d=&c;
+ struct B *b=d;
+ return d->foo()+b->foo();
+}
+/* { dg-final { scan-tree-dump "OBJ_TYPE_REF" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-28.C b/gcc/testsuite/g++.dg/ipa/devirt-28.C
new file mode 100644
index 0000000000..e18b818971
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-28.C
@@ -0,0 +1,17 @@
+// PR c++/58678
+// { dg-options "-O3 -fdump-ipa-devirt" }
+
+struct A {
+ virtual ~A();
+};
+struct B : A {
+ virtual int m_fn1();
+};
+void fn1(B* b) {
+ delete b;
+}
+
+// { dg-final { scan-assembler-not "_ZN1AD2Ev" } }
+// { dg-final { scan-assembler-not "_ZN1BD0Ev" } }
+// { dg-final { scan-ipa-dump "Target is artificial" "devirt" } }
+// { dg-final { cleanup-ipa-dump "devirt" } }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-28a.C b/gcc/testsuite/g++.dg/ipa/devirt-28a.C
new file mode 100644
index 0000000000..65d5fcdf3e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-28a.C
@@ -0,0 +1,15 @@
+// PR c++/58678
+// { dg-options "-O3 -flto -shared -fPIC -Wl,--no-undefined" }
+// { dg-do link { target { { gld && fpic } && shared } } }
+
+struct A {
+ virtual ~A();
+};
+struct B : A {
+ virtual int m_fn1();
+};
+void fn1(B* b) {
+ delete b;
+}
+
+int main() {}
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-29.C b/gcc/testsuite/g++.dg/ipa/devirt-29.C
new file mode 100644
index 0000000000..b4f24a1044
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-29.C
@@ -0,0 +1,75 @@
+/* { dg-do run { target c++11 } } */
+/* There is a devirtualizable call. In PR60306 we deduced wrong target to cxa_pure_virtual.
+ For gcc 4.10 we temporarily disable the devirtualization. */
+/* { dg-options "-O3" } */
+
+#include <vector>
+
+using std::vector;
+
+class Object
+{
+public:
+
+ virtual Object* clone() const =0;
+
+ virtual int type() const {return 0;}
+
+ Object& operator=(const Object&) {return *this;}
+
+ Object() {}
+ Object(const Object&) {}
+ virtual ~Object() {}
+};
+
+Object* f(const Object&o)
+{
+ return o.clone();
+}
+
+template<typename T>
+class Box: public Object, public T
+{
+public:
+ Box<T>* clone() const {return new Box<T>(*this);}
+
+ Box<T>& operator=(const Box<T>& t)
+ {
+ T::operator=(t);
+ return *this;
+ }
+
+ Box<T>& operator=(const T& t)
+ {
+ T::operator=(t);
+ return *this;
+ }
+
+ Box() = default;
+ Box(const Box<T>&) = default;
+ explicit Box(const T& t):T(t) {}
+};
+
+template <typename T>
+using Vector = Box<vector<T>>;
+
+typedef Vector<int> OVector;
+
+OVector edges_connecting_to_node(int n)
+{
+ OVector branch_list_;
+ for(int i=0;i<n;i++)
+ branch_list_.push_back(i);
+
+ return branch_list_;
+}
+
+int main(int argc,char* argv[])
+{
+ for(int n=0; n < argc; n++)
+ {
+ auto x = edges_connecting_to_node(1);
+ x.clone();
+ f(x);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-30.C b/gcc/testsuite/g++.dg/ipa/devirt-30.C
new file mode 100644
index 0000000000..c4ac6940a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-30.C
@@ -0,0 +1,25 @@
+// PR c++/58678
+// { dg-options "-O3 -fdump-ipa-devirt" }
+
+// We shouldn't speculatively devirtualize to ~B because B is an abstract
+// class; any actual object passed to f will be of some derived class which
+// has its own destructor.
+
+struct A
+{
+ virtual void f() = 0;
+ virtual ~A();
+};
+
+struct B : A
+{
+ virtual ~B() {}
+};
+
+void f(B* b)
+{
+ delete b;
+}
+
+// { dg-final { scan-ipa-dump-not "Speculatively devirtualizing" "devirt" } }
+// { dg-final { cleanup-ipa-dump "devirt" } }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-31.C b/gcc/testsuite/g++.dg/ipa/devirt-31.C
new file mode 100644
index 0000000000..64c44ba1e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-31.C
@@ -0,0 +1,23 @@
+/* { dg-options "-O2 -std=c++11 -fdump-ipa-inline" } */
+#include <new>
+
+class EmbeddedObject {
+public:
+ virtual int val() { return 2; }
+};
+
+class Container {
+ alignas(EmbeddedObject) char buffer[sizeof(EmbeddedObject)];
+public:
+ EmbeddedObject *obj() { return (EmbeddedObject*)buffer; }
+ Container() { new (buffer) EmbeddedObject(); }
+};
+
+Container o;
+
+int main()
+{
+ __builtin_printf("%d\n", o.obj()->val());
+}
+/* { dg-final { scan-ipa-dump-not "__builtin_unreachable" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-39.C b/gcc/testsuite/g++.dg/ipa/devirt-39.C
new file mode 100644
index 0000000000..8cd734d77c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-39.C
@@ -0,0 +1,27 @@
+// PR c++/61214
+/* { dg-options "-O2" } */
+
+struct Base
+{
+ virtual ~Base();
+ virtual Base* clone() {
+ return 0;
+ }
+};
+
+struct Foo : Base
+{
+ virtual ~Foo();
+ virtual Base* clone() {
+ return new Foo();
+ }
+};
+
+int main()
+{
+ Base* f = new Foo();
+ f->clone();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "_ZN3Foo5cloneEv" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-40.C b/gcc/testsuite/g++.dg/ipa/devirt-40.C
new file mode 100644
index 0000000000..9c3bdf5e9d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-40.C
@@ -0,0 +1,21 @@
+// PR c++/62224
+// { dg-options "-O2" }
+// For 4.9, we don't want to devirtualize f and thus create a reference to g.
+
+struct A
+{
+ virtual void f () = 0;
+};
+
+class B : A
+{
+ virtual void f () { g(); }
+ void g();
+};
+
+void h (A *a)
+{
+ a->f ();
+}
+
+// { dg-final { scan-assembler-not "_ZN1B1gEv" } }
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-9.C b/gcc/testsuite/g++.dg/ipa/devirt-9.C
new file mode 100644
index 0000000000..7fd0bf5f5c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/devirt-9.C
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-whole-program" } */
+double foo ();
+struct B
+{
+ bool b1 () { return b3 (); }
+ void b2 ();
+ virtual bool b3 ();
+};
+struct C
+{
+ C () {}
+ bool
+ c1 (float x, float y)
+ {
+ if (x != c3 || y != c4)
+ c2.b2 ();
+ return c2.b1 ();
+ }
+ B c2;
+ float c3, c4;
+};
+
+void
+bar ()
+{
+ static C c;
+ c.c1 (60, (int) foo ());
+}
+/* We optimize out this call just after early passes. Unfortunately
+ this unreachable removal is not logged in dump file. */
+/* { dg-final { scan-ipa-dump-not "OBJ_TYPE_REF" "whole-program" } } */
+/* { dg-final { cleanup-ipa-dump "whole-program" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/devirt-c-7.C b/gcc/testsuite/g++.dg/ipa/devirt-c-7.C
index 89d04328c1..2e76cbe406 100644
--- a/gcc/testsuite/g++.dg/ipa/devirt-c-7.C
+++ b/gcc/testsuite/g++.dg/ipa/devirt-c-7.C
@@ -1,6 +1,7 @@
/* Verify that ipa-cp will not get confused by placement new constructing an
object within another one when looking for dynamic type change . */
/* { dg-do run } */
+/* { dg-require-effective-target nonpic } */
/* { dg-options "-O3 -Wno-attributes" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
new file mode 100644
index 0000000000..32f7258a45
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/imm-devirt-1.C
@@ -0,0 +1,62 @@
+/* Verify that virtual calls are folded even early inlining puts them into one
+ function with the definition. */
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
+
+extern "C" void abort (void);
+
+class A
+{
+public:
+ int data;
+ virtual int foo (int i);
+};
+
+
+class B : public A
+{
+public:
+ __attribute__ ((noinline)) B();
+ virtual int foo (int i);
+};
+
+int __attribute__ ((noinline)) A::foo (int i)
+{
+ return i + 1;
+}
+
+int __attribute__ ((noinline)) B::foo (int i)
+{
+ return i + 2;
+}
+
+int __attribute__ ((noinline,noclone)) get_input(void)
+{
+ return 1;
+}
+
+__attribute__ ((noinline)) B::B()
+{
+}
+
+static inline int middleman_1 (class A *obj, int i)
+{
+ return obj->foo (i);
+}
+
+static inline int middleman_2 (class B *obj, int i)
+{
+ return middleman_1 (obj, i);
+}
+
+int main (int argc, char *argv[])
+{
+ class B b;
+
+ if (middleman_2 (&b, get_input ()) != 3)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Replacing call target with foo" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/imm-devirt-2.C b/gcc/testsuite/g++.dg/ipa/imm-devirt-2.C
new file mode 100644
index 0000000000..5bddc2fcb2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/imm-devirt-2.C
@@ -0,0 +1,95 @@
+/* Verify that virtual calls are folded even early inlining puts them into one
+ function with the definition. */
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
+
+extern "C" void abort (void);
+
+class Distraction
+{
+public:
+ float f;
+ double d;
+ Distraction ()
+ {
+ f = 8.3;
+ d = 10.2;
+ }
+ virtual float bar (float z);
+};
+
+class A
+{
+public:
+ int data;
+ virtual int foo (int i);
+};
+
+class B : public A
+{
+public:
+ int data_2;
+ virtual int foo (int i);
+ virtual int baz (int i);
+};
+
+
+class C : public Distraction, public B
+{
+public:
+ __attribute__ ((noinline)) C();
+ virtual int foo (int i);
+};
+
+float __attribute__ ((noinline)) Distraction::bar (float z)
+{
+ f += z;
+ return f/2;
+}
+
+int __attribute__ ((noinline)) A::foo (int i)
+{
+ return i + 1;
+}
+
+int __attribute__ ((noinline)) B::foo (int i)
+{
+ return i + 2;
+}
+
+int __attribute__ ((noinline)) B::baz (int i)
+{
+ return i * 15;
+}
+
+int __attribute__ ((noinline)) C::foo (int i)
+{
+ return i + 3;
+}
+
+int __attribute__ ((noinline,noclone)) get_input(void)
+{
+ return 1;
+}
+
+static inline int middleman (class A *obj, int i)
+{
+ return obj->foo (i);
+}
+
+__attribute__ ((noinline)) C::C()
+{
+}
+
+int main (int argc, char *argv[])
+{
+ class C c;
+
+ if (middleman (&c, get_input ()) != 4)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Replacing call target" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/inline-1.C b/gcc/testsuite/g++.dg/ipa/inline-1.C
new file mode 100644
index 0000000000..dbbfb4e33b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/inline-1.C
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
+/* { dg-add-options bind_pic_locally } */
+
+namespace std {
+ extern "C" void puts(const char *s);
+}
+
+template <class T, class E> void
+foreach (T b, T e, void (*ptr)(E))
+{
+ for (; b != e; b++)
+ ptr(*b);
+}
+
+void
+inline_me (char *x)
+{
+ std::puts(x);
+}
+
+static void
+inline_me_too (char *x)
+{
+ std::puts(x);
+}
+
+int main(int argc, char **argv)
+{
+ foreach (argv, argv + argc, inline_me);
+ foreach (argv, argv + argc, inline_me_too);
+}
+
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/inline-2.C b/gcc/testsuite/g++.dg/ipa/inline-2.C
new file mode 100644
index 0000000000..fd284a1e23
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/inline-2.C
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
+/* { dg-add-options bind_pic_locally } */
+
+namespace std {
+ extern "C" void puts(const char *s);
+}
+
+template <class T, class E> void
+foreach (T b, T e, E ptr)
+{
+ for (; b != e; b++)
+ ptr(*b);
+}
+
+void
+inline_me (char *x)
+{
+ std::puts(x);
+}
+
+static void
+inline_me_too (char *x)
+{
+ std::puts(x);
+}
+
+int main(int argc, char **argv)
+{
+ foreach (argv, argv + argc, inline_me);
+ foreach (argv, argv + argc, inline_me_too);
+}
+
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/inline-3.C b/gcc/testsuite/g++.dg/ipa/inline-3.C
new file mode 100644
index 0000000000..8d5f905cf4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/inline-3.C
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-inline --param max-early-inliner-iterations=1" } */
+/* { dg-add-options bind_pic_locally } */
+
+#include <algorithm>
+
+void foo(const char *s);
+
+void
+inline_me (char *x)
+{
+ foo(x);
+}
+
+static void
+inline_me_too (char *x)
+{
+ foo(x);
+}
+
+int main(int argc, char **argv)
+{
+ std::for_each (argv, argv + argc, inline_me);
+ std::for_each (argv, argv + argc, inline_me_too);
+}
+
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me\\(" 1 "inline"} } */
+/* { dg-final { scan-ipa-dump-times "Considering void inline_me_too\\(" 1 "inline"} } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-1.C b/gcc/testsuite/g++.dg/ipa/ivinline-1.C
index fc63e60858..bc4dfea5cf 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-1.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-1.C
@@ -1,6 +1,6 @@
/* Verify that simple virtual calls are inlined even without early
inlining. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-2.C b/gcc/testsuite/g++.dg/ipa/ivinline-2.C
index f99330361f..001cff2042 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-2.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-2.C
@@ -1,6 +1,6 @@
/* Verify that simple virtual calls using this pointer are inlined
even without early inlining.. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-3.C b/gcc/testsuite/g++.dg/ipa/ivinline-3.C
index d9a47f860c..637a6aecce 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-3.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-3.C
@@ -1,6 +1,6 @@
/* Verify that simple virtual calls on an object refrence are inlined
even without early inlining. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-4.C b/gcc/testsuite/g++.dg/ipa/ivinline-4.C
index 93cbe0c7dc..f5b8f8e5dd 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-4.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-4.C
@@ -1,7 +1,7 @@
/* Verify that simple virtual calls are inlined even without early
inlining, even when a typecast to an ancestor is involved along the
way. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-5.C b/gcc/testsuite/g++.dg/ipa/ivinline-5.C
index 91e8f4e3e1..d78173d69e 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-5.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-5.C
@@ -1,6 +1,6 @@
/* Verify that virtual call inlining does not pick a wrong method when
there is a user defined ancestor in an object. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-7.C b/gcc/testsuite/g++.dg/ipa/ivinline-7.C
index 2630dffa9d..9d725a5086 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-7.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-7.C
@@ -1,7 +1,7 @@
/* Verify that simple virtual calls are inlined even without early
inlining, even when a typecast to an ancestor is involved along the
way and that ancestor is not the first one with virtual functions. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-8.C b/gcc/testsuite/g++.dg/ipa/ivinline-8.C
index 3bdf4c15b2..eebfc6af19 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-8.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-8.C
@@ -1,6 +1,6 @@
/* Verify that virtual calls are inlined (ithout early inlining) even
when their caller is itself indirectly inlined. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/ivinline-9.C b/gcc/testsuite/g++.dg/ipa/ivinline-9.C
index 4ff07a9bbd..586c3af30e 100644
--- a/gcc/testsuite/g++.dg/ipa/ivinline-9.C
+++ b/gcc/testsuite/g++.dg/ipa/ivinline-9.C
@@ -2,7 +2,7 @@
inlining, even when a typecast to an ancestor is involved along the
way and that ancestor itself has an ancestor wich is not the
primary base class. */
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining -fno-ipa-cp" } */
extern "C" void abort (void);
diff --git a/gcc/testsuite/g++.dg/ipa/pr56310.C b/gcc/testsuite/g++.dg/ipa/pr56310.C
new file mode 100644
index 0000000000..04f6aa6b6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr56310.C
@@ -0,0 +1,36 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-O -fipa-cp -fno-early-inlining -fipa-cp-clone --param=ipa-cp-eval-threshold=1" } */
+
+void bar (void *, void *);
+
+struct C
+{
+ constexpr C ():p (0)
+ {
+ }
+ void *get ()
+ {
+ return p;
+ }
+ void *p;
+};
+
+struct B:C
+{
+};
+
+struct A
+{
+ void f (B * x, B * y)
+ {
+ bar (x->get (), y->get ());
+ }
+};
+
+void
+foo ()
+{
+ A a;
+ B b;
+ a.f (&b, &b);
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr57670.C b/gcc/testsuite/g++.dg/ipa/pr57670.C
new file mode 100644
index 0000000000..400612e756
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr57670.C
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-early-inlining" } */
+
+class H
+{
+public:
+ virtual unsigned bar() const { return 16; }
+};
+
+class A : public H
+{
+ unsigned foo(unsigned (H::*func)(void) const) const;
+public:
+ H *h;
+ virtual unsigned bar() const;
+};
+
+unsigned A::foo(unsigned (H::*func)(void) const) const
+{
+ return (h->*func)();
+}
+
+unsigned A::bar() const
+{
+ return foo(&H::bar);
+}
+
+int main (int argc, char **argv)
+{
+ H h;
+ A a;
+ a.h = &h;
+
+ if (a.bar() != 16)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr58371.C b/gcc/testsuite/g++.dg/ipa/pr58371.C
new file mode 100644
index 0000000000..00cfbb831f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr58371.C
@@ -0,0 +1,204 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+
+typedef int size_t;
+namespace {
+template < typename > struct char_traits;
+}
+namespace __gnu_cxx {
+template < typename > class new_allocator {
+};
+}
+namespace std {
+template < typename _Tp > class allocator:__gnu_cxx::new_allocator < _Tp > {
+public:
+ size_t size_type;
+ typedef _Tp & const_reference;
+ template < typename > struct rebind {
+ typedef allocator other;
+ };
+};
+}
+namespace __gnu_cxx {
+template < typename _Alloc > struct __alloc_traits {
+ typedef typename _Alloc::const_reference const_reference;
+ template < typename _Tp > struct rebind {
+ typedef typename _Alloc::template rebind < _Tp >::other other;
+ };
+};
+}
+namespace std {
+struct __numeric_limits_base {
+};
+template < typename _Tp > struct numeric_limits:__numeric_limits_base {
+ static _Tp max () {
+ }
+};
+template < typename _Tp, typename _Alloc > struct _Vector_base {
+ typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind <
+ _Tp >::other _Tp_alloc_type;
+};
+template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector:_Vector_base < _Tp,
+ _Alloc
+ > {
+ typedef _Vector_base < _Tp, _Alloc > _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+ typedef __gnu_cxx::__alloc_traits < _Tp_alloc_type > _Alloc_traits;
+public:
+ _Tp value_type;
+ typedef typename _Alloc_traits::const_reference const_reference;
+ typedef size_t size_type;
+ size_type size () {
+ } const_reference operator[] (size_type) {
+ }
+};
+template < typename _CharT, typename =
+char_traits < _CharT > >class basic_ostream;
+typedef basic_ostream < int >ostream;
+class ios_base {
+};
+template < typename, typename > class basic_ios:ios_base {
+};
+template < typename _CharT, typename _Traits > class basic_ostream:basic_ios < _CharT,
+ _Traits
+ > {
+public:
+ _CharT char_type;
+ typedef basic_ostream __ostream_type;
+ __ostream_type & operator<< (const void *) {
+ }
+};
+}
+namespace logging {
+int GetMinLogLevel ();
+typedef int LogSeverity;
+LogSeverity LOG_ERROR_REPORT;
+LogSeverity LOG_DCHECK;
+class LogMessage {
+public:
+ LogMessage (const char *, int, LogSeverity);
+ std::ostream & stream () {
+ }
+};
+class LogMessageVoidify {
+public:
+ LogMessageVoidify () {
+ } void operator& (std::ostream &) {
+ }
+};
+}
+namespace base {
+namespace internal {
+class WeakPtrBase {
+};
+class SupportsWeakPtrBase {
+};
+} template < typename T > class WeakPtr:internal::WeakPtrBase {
+public:
+ WeakPtr () :ptr_ () {
+ } T *operator-> () {
+ logging:0 &&
+ logging::LOG_DCHECK >=
+ logging::GetMinLogLevel () ? (void) 0 : logging::
+ LogMessageVoidify () & logging::
+ LogMessage ("../../base/memory/weak_ptr.h", 0,
+ logging::LOG_ERROR_REPORT).stream () << ". ";
+ } T *ptr_;
+};
+template < class > class SupportsWeakPtr:internal::SupportsWeakPtrBase {
+};
+}
+template < class ObserverType > class ObserverListBase:base::SupportsWeakPtr < ObserverListBase < ObserverType >
+ > {
+public:
+ class Iterator {
+ public:
+ Iterator (ObserverListBase & list) :max_index_ (0 ? std::numeric_limits <
+ size_t >::max () : list.observers_.
+ size () ) {
+ } ObserverType *
+ GetNext () {
+ ListType & observers = list_->observers_;
+ if (observers[0])
+ ++index_;
+ }
+ base::WeakPtr < ObserverListBase > list_;
+ size_t
+ index_;
+ size_t
+ max_index_;
+ };
+ typedef
+ std::vector <
+ ObserverType * >
+ ListType;
+ ListType
+ observers_;
+};
+template < class ObserverType, bool > class ObserverList:public ObserverListBase <
+ ObserverType > {
+};
+namespace
+ ProxyPrefs {
+enum ConfigState
+{ };
+}
+namespace
+ net {
+class
+ ProxyConfig {
+};
+class
+ ProxyConfigService {
+public:
+ enum ConfigAvailability
+ { };
+ class
+ Observer {
+ public:
+ Observer () {
+ } virtual void
+ OnProxyConfigChanged (const ProxyConfig &, ConfigAvailability) = 0;
+ };
+ virtual void
+ OnLazyPoll () {
+ }
+};
+}
+class
+ ChromeProxyConfigService:
+ net::ProxyConfigService,
+ net::ProxyConfigService::Observer {
+ ConfigAvailability
+ GetLatestProxyConfig (net::ProxyConfig *);
+ void
+ UpdateProxyConfig (ProxyPrefs::ConfigState, const net::ProxyConfig &);
+ void
+ OnProxyConfigChanged (const net::ProxyConfig &, ConfigAvailability);
+ ObserverList <
+ net::ProxyConfigService::Observer,
+ 0 >
+ observers_;
+};
+void
+ChromeProxyConfigService::UpdateProxyConfig (ProxyPrefs::ConfigState,
+ const net::ProxyConfig &) {
+ net::ProxyConfig new_config;
+ ConfigAvailability availability = GetLatestProxyConfig (0);
+net:
+ ProxyConfigService::Observer * obs;
+ obs->OnProxyConfigChanged (new_config, availability);
+}
+void
+ChromeProxyConfigService::OnProxyConfigChanged (const net::ProxyConfig &,
+ ConfigAvailability
+ availability) {
+ net::ProxyConfig actual_config;
+ ObserverListBase <
+ net::ProxyConfigService::Observer >::Iterator it (observers_);
+net:
+ ProxyConfigService::Observer * obs;
+ if (it.GetNext () )
+ obs->OnProxyConfigChanged (actual_config, availability);
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr59176.C b/gcc/testsuite/g++.dg/ipa/pr59176.C
new file mode 100644
index 0000000000..d576bc3ba5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr59176.C
@@ -0,0 +1,41 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+template <class> class A {
+protected:
+ void m_fn2();
+ ~A() { m_fn2(); }
+ virtual void m_fn1();
+};
+
+class D : A<int> {};
+template <class Key> void A<Key>::m_fn2() {
+ m_fn1();
+ m_fn1();
+ m_fn1();
+}
+
+#pragma interface
+class B {
+ D m_cellsAlreadyProcessed;
+ D m_cellsNotToProcess;
+
+public:
+ virtual ~B() {}
+ void m_fn1();
+};
+
+class C {
+ unsigned long m_fn1();
+ B m_fn2();
+ unsigned long m_fn3();
+};
+unsigned long C::m_fn1() {
+CellHierarchy:
+ m_fn2().m_fn1();
+}
+
+unsigned long C::m_fn3() {
+CellHierarchy:
+ m_fn2().m_fn1();
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr59355.C b/gcc/testsuite/g++.dg/ipa/pr59355.C
new file mode 100644
index 0000000000..907c6d7450
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr59355.C
@@ -0,0 +1,14 @@
+// PR tree-optimization/59355
+// { dg-do compile }
+// { dg-options "-O2 -fno-devirtualize" }
+
+struct S
+{
+ virtual void bar ();
+};
+
+void
+foo (S *s)
+{
+ s->bar ();
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr59737.C b/gcc/testsuite/g++.dg/ipa/pr59737.C
new file mode 100644
index 0000000000..cb8a8aa2cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr59737.C
@@ -0,0 +1,48 @@
+// PR middle-end/59737
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct A
+{
+ virtual void foo (int &x);
+ friend void
+ operator>> (int &x, A &y)
+ {
+ y.foo (x);
+ }
+};
+
+struct B : public A
+{
+ void foo (int &x);
+};
+
+struct F : public B
+{
+ void foo (int &x);
+};
+
+struct G : public F
+{
+ void foo (int &);
+};
+
+struct C : A
+{
+ void foo (int &);
+ struct H : public G
+ {
+ void foo (int &);
+ };
+ struct D : A
+ {
+ H d;
+ };
+};
+
+void
+C::foo (int &x)
+{
+ D a;
+ x >> a.d;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60419.C b/gcc/testsuite/g++.dg/ipa/pr60419.C
new file mode 100644
index 0000000000..84461f3acb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60419.C
@@ -0,0 +1,80 @@
+// PR middle-end/60419
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct C
+{
+};
+
+struct I : C
+{
+ I ();
+};
+
+struct J
+{
+ void foo ();
+ J ();
+ virtual void foo (int &, int);
+};
+
+template <class>
+struct D
+{
+ virtual void foo (I &) const;
+ void bar ()
+ {
+ I p;
+ foo (p);
+ }
+};
+
+struct K : J, public D<int>
+{
+};
+
+struct F
+{
+ K *operator->();
+};
+
+struct N : public K
+{
+ void foo (int &, int);
+ I n;
+ void foo (I &) const {}
+};
+
+struct L : J
+{
+ F l;
+};
+
+struct M : F
+{
+ L *operator->();
+};
+
+struct G
+{
+ G ();
+};
+
+M h;
+
+G::G ()
+try
+{
+ N f;
+ f.bar ();
+ throw;
+}
+catch (int)
+{
+}
+
+void
+baz ()
+{
+ h->l->bar ();
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60457.C b/gcc/testsuite/g++.dg/ipa/pr60457.C
new file mode 100644
index 0000000000..9e4cea7c95
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60457.C
@@ -0,0 +1,17 @@
+// PR ipa/60457
+// { dg-do compile }
+
+template <class T>
+struct A
+{
+};
+
+struct B : A <B>
+{
+ B ();
+};
+
+B::B ()
+{
+ const int c[] = { 1, 1 };
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60600.C b/gcc/testsuite/g++.dg/ipa/pr60600.C
new file mode 100644
index 0000000000..0753931930
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60600.C
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-cp" } */
+
+struct data {
+ data(int);
+};
+
+struct top {
+ virtual int topf();
+};
+
+struct intermediate: top {
+ int topf() /* override */ { return 0; }
+};
+
+struct child1: top {
+ void childf()
+ {
+ data d(topf());
+ }
+};
+
+struct child2: intermediate {};
+
+void test(top& t)
+{
+ child1& c = static_cast<child1&>(t);
+ c.childf();
+ child2 d;
+ test(d);
+}
+
+/* { dg-final { scan-ipa-dump "Type inconsistent devirtualization" "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-1.C b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
new file mode 100644
index 0000000000..7a0b91893f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-1.C
@@ -0,0 +1,50 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+class ASN1Object
+{
+public:
+ virtual ~ASN1Object ();
+};
+class A
+{
+ virtual unsigned m_fn1 () const;
+};
+class B
+{
+public:
+ ASN1Object Element;
+ virtual unsigned m_fn1 (bool) const;
+};
+template <class BASE> class C : public BASE
+{
+};
+
+class D : ASN1Object, public B
+{
+};
+class G : public D
+{
+ unsigned m_fn1 (bool) const {}
+};
+class F : A
+{
+public:
+ F (A);
+ unsigned m_fn1 () const
+ {
+ int a;
+ a = m_fn2 ().m_fn1 (0);
+ return a;
+ }
+ const B &m_fn2 () const { return m_groupParameters; }
+ C<G> m_groupParameters;
+};
+template <class D> void BenchMarkKeyAgreement (int *, int *, int)
+{
+ A f;
+ D d (f);
+}
+
+void BenchmarkAll2 () { BenchMarkKeyAgreement<F>(0, 0, 0); }
+
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-2.C b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
new file mode 100644
index 0000000000..c6e614cc00
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-2.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-O3" }
+
+struct B { virtual unsigned f () const; };
+struct C { virtual void f (); };
+struct F { virtual unsigned f (bool) const; ~F (); };
+struct J : C, F {};
+struct G : J { unsigned f (bool) const { return 0; } };
+struct H : B
+{
+ H (int);
+ unsigned f () const { return ((const F &) h).f (0); }
+ G h;
+};
+H h (0);
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-3.C b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
new file mode 100644
index 0000000000..21b1f58a04
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-3.C
@@ -0,0 +1,81 @@
+// { dg-do run }
+// { dg-options "-O3" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual A * foo (int p) = 0;
+};
+
+struct B;
+static B * __attribute__ ((noinline, noclone)) get_a_B ();
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual B * foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+
+ return get_a_B ();
+ }
+};
+
+
+struct B gb1 (1111), gb2 (2);
+static B * __attribute__ ((noinline, noclone))
+get_a_B ()
+{
+ return &gb1;
+}
+
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb2;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ struct A *r = p->foo (4);
+ if (r->fi != 1111)
+ abort ();
+ if (go != 22)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr60640-4.C b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
new file mode 100644
index 0000000000..eb9eb627f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr60640-4.C
@@ -0,0 +1,85 @@
+// { dg-do run }
+// { dg-options "-O3 -fdump-ipa-cp" }
+
+struct Distraction
+{
+ char fc[8];
+ virtual Distraction * return_self ()
+ { return this; }
+};
+
+namespace {
+
+struct A;
+static A * __attribute__ ((noinline, noclone)) get_an_A ();
+
+static int go;
+
+struct A
+{
+ int fi;
+
+ A () : fi(777) {}
+ A (int pi) : fi (pi) {}
+ virtual void foo (int p) = 0;
+};
+
+struct B : public Distraction, A
+{
+ B () : Distraction(), A() { }
+ B (int pi) : Distraction (), A (pi) {}
+ virtual void foo (int p)
+ {
+ int o = fi;
+ for (int i = 0; i < p; i++)
+ o += i + i * i;
+ go = o;
+ }
+};
+
+
+struct B gb (2);
+static A * __attribute__ ((noinline, noclone))
+get_an_A ()
+{
+ return &gb;
+}
+
+}
+
+static int __attribute__ ((noinline, noclone))
+get_a_number ()
+{
+ return 5;
+}
+
+extern "C" void abort (void);
+
+static void __attribute__ ((noinline, noclone))
+bar ()
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+}
+
+int main (int argc, char *argv[])
+{
+ for (int i = 0; i < get_a_number (); i++)
+ {
+ struct A *p = get_an_A ();
+ p->foo (4);
+ if (go != 22)
+ abort ();
+ }
+
+ bar ();
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "Thunk fixed offset" 2 "cp"} } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/g++.dg/ipa/pr61085.C b/gcc/testsuite/g++.dg/ipa/pr61085.C
new file mode 100644
index 0000000000..531f59d530
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61085.C
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-early-inlining" } */
+
+struct A {};
+struct B : virtual A {
+ unsigned m_i;
+ B() : m_i () {}
+ virtual A *m_virt ()
+ {
+ return 0;
+ }
+ ~B ()
+ {
+ m_foo ();
+ while (m_i)
+ ;
+ }
+ void m_foo ()
+ {
+ m_virt ();
+ }
+};
+
+class C : B {
+ A *m_virt () {
+ __builtin_abort ();
+ }
+};
+
+int main ()
+{
+ C c;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr61160-1.C b/gcc/testsuite/g++.dg/ipa/pr61160-1.C
new file mode 100644
index 0000000000..69bd6a61d4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61160-1.C
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+struct CBase {
+ virtual void BaseFunc () {}
+};
+
+struct MMixin {
+ virtual void * MixinFunc (int, void *) = 0;
+};
+
+struct CExample: CBase, public MMixin
+{
+ void *MixinFunc (int arg, void *arg2)
+ {
+ if (arg != 1 || arg2)
+ return 0;
+ return this;
+ }
+};
+
+void *test (MMixin & anExample)
+{
+ return anExample.MixinFunc (1, 0);
+}
+
+int main ()
+{
+ CExample c;
+ test (c);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr61160-2.C b/gcc/testsuite/g++.dg/ipa/pr61160-2.C
new file mode 100644
index 0000000000..dd925d25c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61160-2.C
@@ -0,0 +1,44 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --param ipa-cp-eval-threshold=1" } */
+
+extern "C" void abort (void);
+
+struct CBase {
+ virtual void BaseFunc () {}
+};
+
+struct MMixin {
+ virtual void * MixinFunc (int, void *) = 0;
+};
+
+struct CExample: CBase, public MMixin
+{
+ int stuff, magic, more_stuff;
+
+ CExample ()
+ {
+ stuff = 0;
+ magic = 0xbeef;
+ more_stuff = 0;
+ }
+ void *MixinFunc (int arg, void *arg2)
+ {
+ if (arg != 1 || arg2)
+ return 0;
+ if (magic != 0xbeef)
+ abort();
+ return this;
+ }
+};
+
+void *test (MMixin & anExample)
+{
+ return anExample.MixinFunc (1, 0);
+}
+
+int main ()
+{
+ CExample c;
+ test (c);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr61160-3.C b/gcc/testsuite/g++.dg/ipa/pr61160-3.C
new file mode 100644
index 0000000000..8184ec2cd3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61160-3.C
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+struct A {
+ void *p;
+ A (void *q) : p (q) {}
+ A (const A &) : p () {}
+};
+
+struct CBase {
+ virtual void BaseFunc () {}
+};
+
+struct MMixin {
+ virtual A MixinFunc (int, A) = 0;
+};
+
+struct CExample: CBase, public MMixin
+{
+ A MixinFunc (int arg, A arg2)
+ {
+ if (arg != 1 || arg2.p)
+ return 0;
+ return this;
+ }
+};
+
+void *test (MMixin & anExample)
+{
+ return anExample.MixinFunc (1, (0)).p;
+}
+
+int main ()
+{
+ CExample c;
+ return (test (c) != &c);
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr61540.C b/gcc/testsuite/g++.dg/ipa/pr61540.C
new file mode 100644
index 0000000000..e7dee7262c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61540.C
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining" } */
+
+struct data {
+ data(int) {}
+};
+
+struct top {
+ virtual int topf() {}
+};
+
+struct intermediate: top {
+ int topf() /* override */ { return 0; }
+};
+
+struct child1: top {
+ void childf()
+ {
+ data d(topf());
+ }
+};
+
+struct child2: intermediate {};
+
+void test(top& t)
+{
+ child1& c = static_cast<child1&>(t);
+ c.childf();
+ child2 d;
+ test(d);
+}
+
+int main (int argc, char **argv)
+{
+ child1 c;
+ test (c);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr61654.C b/gcc/testsuite/g++.dg/ipa/pr61654.C
new file mode 100644
index 0000000000..d07e4586bd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr61654.C
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+/* The bug only presented itself on a 32 bit i386 but in theory it might also
+ pop up elsewhere and we do not want to put -m32 options to testcase
+ options. */
+
+struct A
+{
+ virtual int a (int, int = 0) = 0;
+ void b ();
+ void c ();
+ int d;
+};
+
+struct B : virtual A
+{
+ int a (int, int);
+ int e;
+};
+
+int f;
+
+void
+A::b ()
+{
+ a (0);
+}
+
+void
+A::c ()
+{
+ a (f);
+}
+
+int
+B::a (int, int)
+{
+ return e;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr62015.C b/gcc/testsuite/g++.dg/ipa/pr62015.C
new file mode 100644
index 0000000000..950b46e759
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr62015.C
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -std=c++11" } */
+
+
+extern "C" int printf(const char *fmt, ...);
+extern "C" void abort(void);
+
+struct Side {
+ enum _Value { Left, Right, Invalid };
+
+ constexpr Side() : _value(Invalid) {}
+ constexpr Side(_Value value) : _value(value) {}
+ operator _Value() const { return (_Value)_value; }
+
+ private:
+ char _value;
+};
+
+struct A {
+ void init();
+ void adjust(Side side, bool final);
+ void move(Side side);
+};
+
+void A::init()
+{
+ adjust(Side::Invalid, false);
+}
+
+static void __attribute__((noinline))
+check (int v, int final)
+{
+ if (v != 0)
+ abort();
+}
+
+
+__attribute__((noinline))
+void A::adjust(Side side, bool final)
+{
+ check ((int)side, final);
+}
+
+void A::move(Side side)
+{
+ adjust(side, false);
+ adjust(side, true);
+}
+
+int main()
+{
+ A t;
+ t.move(Side::Left);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/ipa/pr63306.C b/gcc/testsuite/g++.dg/ipa/pr63306.C
new file mode 100644
index 0000000000..e22a4c2a0d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/pr63306.C
@@ -0,0 +1,14 @@
+// PR c++/63306
+// { dg-do compile { target c++11 } }
+
+template <typename...>
+class A;
+
+class B
+{
+ B (const int &, const A<int, int> &);
+};
+
+B::B (const int &, const A<int, int> &)
+{
+}
diff --git a/gcc/testsuite/g++.dg/ipa/remref-1.C b/gcc/testsuite/g++.dg/ipa/remref-1.C
new file mode 100644
index 0000000000..c25c425e9b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/remref-1.C
@@ -0,0 +1,36 @@
+/* Verify that indirect-inlining induced removal of referenes will not remove
+ too many references in presence of speculative devirtualization. */
+/* { dg-do link } */
+/* { dg-options "-O3 -fno-early-inlining" } */
+
+class A
+{
+ public:
+ virtual void foo(void (*)(void));
+};
+
+static
+void b(void)
+{
+}
+
+void
+A::foo(void (*back)(void))
+{
+ back();
+}
+
+class A *a;
+
+void __attribute__ ((noinline, noclone))
+allocate_a ()
+{
+ a = new A();
+}
+
+main()
+{
+ allocate_a();
+ for (int i=0; i<10000;i++)
+ a->foo(b);
+}
diff --git a/gcc/testsuite/g++.dg/ipa/remref-2.C b/gcc/testsuite/g++.dg/ipa/remref-2.C
new file mode 100644
index 0000000000..06bc71a5b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/remref-2.C
@@ -0,0 +1,37 @@
+/* Verify that we survive creation and deletion of references to facilitate
+ reference removal while also doing (unsuccessful) speculative
+ devirtualization. */
+/* { dg-do link } */
+/* { dg-options "-O3 -fno-early-inlining" } */
+
+class A
+{
+ public:
+ virtual void __attribute__ ((noinline)) foo(void (*)(void));
+};
+
+static
+void b(void)
+{
+}
+
+void __attribute__ ((noinline))
+A::foo(void (*back)(void))
+{
+ back();
+}
+
+class A *a;
+
+void __attribute__ ((noinline, noclone))
+allocate_a ()
+{
+ a = new A();
+}
+
+main()
+{
+ allocate_a();
+ for (int i=0; i<10000;i++)
+ a->foo(b);
+}
diff --git a/gcc/testsuite/g++.dg/ipa/type-inheritance-1.C b/gcc/testsuite/g++.dg/ipa/type-inheritance-1.C
new file mode 100644
index 0000000000..818002ec1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ipa/type-inheritance-1.C
@@ -0,0 +1,28 @@
+/* Verify that callgraph construction keeps FOO for possible devirtualization
+ and removes BAR. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-visibility" } */
+
+extern "C" void abort (void);
+
+class A
+{
+public:
+ virtual int foo (void)
+ {
+ return 4;
+ }
+ virtual int bar (void)
+ {
+ return 5;
+ }
+};
+
+
+int t(class A *a)
+{
+ return a->foo();
+}
+/* { dg-final { scan-ipa-dump "A::foo" "visibility" } } */
+/* { dg-final { scan-ipa-dump-not "A::bar" "visibility" } } */
+/* { dg-final { cleanup-ipa-dump "visibility" } } */
diff --git a/gcc/testsuite/g++.dg/lookup/ambig1.C b/gcc/testsuite/g++.dg/lookup/ambig1.C
index 1cf9ab4f0a..c027428899 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig1.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig1.C
@@ -7,7 +7,7 @@
// Bug 16889:Undetected ambiguity.
struct B {
- int f(); // { dg-error "int B::f" "" }
+ int f(); // { dg-message "int B::f" "" }
};
struct B1 : virtual B {};
diff --git a/gcc/testsuite/g++.dg/lookup/ambig2.C b/gcc/testsuite/g++.dg/lookup/ambig2.C
index 4d423d1706..505eda60d5 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig2.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig2.C
@@ -7,7 +7,7 @@
// Bug 16889:Undetected ambiguity.
struct B {
- int i; // { dg-error "int B::i" "" }
+ int i; // { dg-message "int B::i" "" }
};
struct B1 : virtual B {};
diff --git a/gcc/testsuite/g++.dg/lookup/ambig3.C b/gcc/testsuite/g++.dg/lookup/ambig3.C
index 7a0a8377a9..5a3f5b9492 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig3.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig3.C
@@ -7,7 +7,7 @@
// Follow on from Bug 16889:Undetected ambiguity.
struct B {
- int f(); // { dg-error "int B::f" "" }
+ int f(); // { dg-message "int B::f" "" }
};
struct B1 : virtual B {};
diff --git a/gcc/testsuite/g++.dg/lookup/ambig4.C b/gcc/testsuite/g++.dg/lookup/ambig4.C
index 3a74f7d1c7..1f3daa1e5e 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig4.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig4.C
@@ -4,10 +4,10 @@
namespace N
{
- int i; // { dg-error "i" }
+ int i; // { dg-message "i" }
}
-int i; // { dg-error "i" }
+int i; // { dg-message "i" }
using namespace N;
diff --git a/gcc/testsuite/g++.dg/lookup/ambig5.C b/gcc/testsuite/g++.dg/lookup/ambig5.C
index cebec27791..fb48ff3c8a 100644
--- a/gcc/testsuite/g++.dg/lookup/ambig5.C
+++ b/gcc/testsuite/g++.dg/lookup/ambig5.C
@@ -4,10 +4,10 @@
namespace N
{
- namespace M {} // { dg-error "M" }
+ namespace M {} // { dg-message "M" }
}
-namespace M {} // { dg-error "M" }
+namespace M {} // { dg-message "M" }
using namespace N;
using namespace M; // { dg-error "namespace-name|ambiguous" }
diff --git a/gcc/testsuite/g++.dg/lookup/anon6.C b/gcc/testsuite/g++.dg/lookup/anon6.C
index 09fa7f8f3b..7c5a96848c 100644
--- a/gcc/testsuite/g++.dg/lookup/anon6.C
+++ b/gcc/testsuite/g++.dg/lookup/anon6.C
@@ -1,11 +1,11 @@
-extern int v1; // { dg-error "declared" }
+extern int v1; // { dg-message "declared" }
static union { int v1; }; // { dg-error "redeclaration" }
-static union { int v2; }; // { dg-error "declared" }
+static union { int v2; }; // { dg-message "declared" }
extern int v2; // { dg-error "redeclaration" }
-int v3; // { dg-error "declared" }
+int v3; // { dg-message "declared" }
static union { int v3; }; // { dg-error "redeclaration" }
-static union { int v4; }; // { dg-error "declared" }
+static union { int v4; }; // { dg-message "declared" }
static union { int v4; }; // { dg-error "redeclaration" }
diff --git a/gcc/testsuite/g++.dg/lookup/crash3.C b/gcc/testsuite/g++.dg/lookup/crash3.C
index 24a3360ba3..5b58e8ed55 100644
--- a/gcc/testsuite/g++.dg/lookup/crash3.C
+++ b/gcc/testsuite/g++.dg/lookup/crash3.C
@@ -4,8 +4,8 @@
typedef __SIZE_TYPE__ size_t;
-struct A { void *operator new(size_t s){} }; // { dg-error "operator new" }
-struct B { void *operator new(size_t s){} }; // { dg-error "operator new" }
+struct A { void *operator new(size_t s){} }; // { dg-message "operator new" }
+struct B { void *operator new(size_t s){} }; // { dg-message "operator new" }
struct C : A,B {};
diff --git a/gcc/testsuite/g++.dg/lookup/crash6.C b/gcc/testsuite/g++.dg/lookup/crash6.C
index 0e49324bf2..b8481be4d3 100644
--- a/gcc/testsuite/g++.dg/lookup/crash6.C
+++ b/gcc/testsuite/g++.dg/lookup/crash6.C
@@ -4,5 +4,5 @@
// PR c++/18652: ICE redeclaring variable as template.
-int A; // { dg-error "previous declaration" }
+int A; // { dg-message "previous declaration" }
template<int> struct A; // { dg-error "different kind of symbol" }
diff --git a/gcc/testsuite/g++.dg/lookup/crash8.C b/gcc/testsuite/g++.dg/lookup/crash8.C
new file mode 100644
index 0000000000..7dce9cb723
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/crash8.C
@@ -0,0 +1,13 @@
+// PR c++/58843
+
+struct A {};
+
+template<typename T> void foo(T t)
+{
+ t.T::~X(); // { dg-error "no type" }
+}
+
+void bar()
+{
+ foo(A());
+}
diff --git a/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C b/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
index 51a342d433..4d934c1045 100644
--- a/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
+++ b/gcc/testsuite/g++.dg/lookup/extern-c-redecl5.C
@@ -6,11 +6,11 @@
class frok
{
int this_errno;
- friend int fork (void); // { dg-error "previous declaration .*?C\\+\\+. linkage" }
+ friend int fork (void); // { dg-message "previous declaration .*?C\\+\\+. linkage" }
};
extern "C" int
-fork (void) // { dg-error "conflicts with new declaration .*?C. linkage" }}
+fork (void) // { dg-error "conflicting declaration .*?C. linkage" }}
{
frok grouped;
return grouped.this_errno;
diff --git a/gcc/testsuite/g++.dg/lookup/friend15.C b/gcc/testsuite/g++.dg/lookup/friend15.C
index 1e271fc3f0..e05cc55570 100644
--- a/gcc/testsuite/g++.dg/lookup/friend15.C
+++ b/gcc/testsuite/g++.dg/lookup/friend15.C
@@ -8,5 +8,4 @@ void foo()
friend class B;
};
B::B() {} // { dg-error "has not been declared" }
-// { dg-error "expected" "expected" { target *-*-* } 10 }
}
diff --git a/gcc/testsuite/g++.dg/lookup/hidden-class17.C b/gcc/testsuite/g++.dg/lookup/hidden-class17.C
new file mode 100644
index 0000000000..3d5ccec39c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/hidden-class17.C
@@ -0,0 +1,22 @@
+// Origin PR c++/51641
+// { dg-do compile }
+
+struct A {
+ struct B { typedef int X; };
+};
+
+template<class B> struct C : A {
+ B::X q; // Ok: A::B.
+ struct U { typedef int X; };
+ template<class U>
+ struct D;
+};
+
+template<class B>
+template<class U>
+struct C<B>::D {
+ typename U::X r; // { dg-error "" }
+};
+
+C<int>::D<double> y;
+
diff --git a/gcc/testsuite/g++.dg/lookup/linkage1.C b/gcc/testsuite/g++.dg/lookup/linkage1.C
index 6f6bdfdea8..aa6983c54c 100644
--- a/gcc/testsuite/g++.dg/lookup/linkage1.C
+++ b/gcc/testsuite/g++.dg/lookup/linkage1.C
@@ -1,4 +1,4 @@
// DR 563
-extern int i; // { dg-error "linkage" }
+extern int i; // { dg-message "linkage" }
extern "C" int i; // { dg-error "linkage" }
diff --git a/gcc/testsuite/g++.dg/lookup/name-clash10.C b/gcc/testsuite/g++.dg/lookup/name-clash10.C
new file mode 100644
index 0000000000..0a089be257
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/name-clash10.C
@@ -0,0 +1,8 @@
+// PR c++/38313
+
+struct foo { };
+struct bar { };
+
+struct baz {
+ static foo (bar)();
+};
diff --git a/gcc/testsuite/g++.dg/lookup/name-clash5.C b/gcc/testsuite/g++.dg/lookup/name-clash5.C
index 7f220d8877..74595c2687 100644
--- a/gcc/testsuite/g++.dg/lookup/name-clash5.C
+++ b/gcc/testsuite/g++.dg/lookup/name-clash5.C
@@ -7,7 +7,7 @@
// declarative region (7.3.2, clause 14). ]"
namespace N
-{ // { dg-error "previous declaration" }
+{ // { dg-message "previous declaration" }
}
class N; // { dg-error "redeclared" }
diff --git a/gcc/testsuite/g++.dg/lookup/name-clash6.C b/gcc/testsuite/g++.dg/lookup/name-clash6.C
index 63a0b15bf5..6918142f22 100644
--- a/gcc/testsuite/g++.dg/lookup/name-clash6.C
+++ b/gcc/testsuite/g++.dg/lookup/name-clash6.C
@@ -6,7 +6,7 @@
// "[Note: a namespace name or a class template name must be unique in its
// declarative region (7.3.2, clause 14). ]"
-class N; // { dg-error "previous declaration" }
+class N; // { dg-message "previous declaration" }
namespace N
{ // { dg-error "redeclared" }
diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-2.C b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
index 38bb54c2f5..d9f99a8d12 100644
--- a/gcc/testsuite/g++.dg/lookup/strong-using-2.C
+++ b/gcc/testsuite/g++.dg/lookup/strong-using-2.C
@@ -5,12 +5,12 @@
namespace foo {
inline namespace foo_impl {
- class T; // { dg-error "T" "" }
+ class T; // { dg-message "T" "" }
}
}
namespace bar {
inline namespace bar_impl {
- class T; // { dg-error "T" "" }
+ class T; // { dg-message "T" "" }
}
using namespace foo;
}
diff --git a/gcc/testsuite/g++.dg/lookup/using16.C b/gcc/testsuite/g++.dg/lookup/using16.C
index a396afb973..8a36504caf 100644
--- a/gcc/testsuite/g++.dg/lookup/using16.C
+++ b/gcc/testsuite/g++.dg/lookup/using16.C
@@ -3,12 +3,12 @@
// { dg-do compile }
namespace M {
- struct S {}; // { dg-error "struct M::S" "candidate 1" }
+ struct S {}; // { dg-message "struct M::S" "candidate 1" }
}
namespace N {
int S;
- struct S {}; // { dg-error "struct N::S" "candidate 2" }
+ struct S {}; // { dg-message "struct N::S" "candidate 2" }
}
using namespace M;
diff --git a/gcc/testsuite/g++.dg/lookup/using17.C b/gcc/testsuite/g++.dg/lookup/using17.C
index b98b21a0cd..9019dabf5d 100644
--- a/gcc/testsuite/g++.dg/lookup/using17.C
+++ b/gcc/testsuite/g++.dg/lookup/using17.C
@@ -3,11 +3,11 @@
// { dg-do compile }
namespace M {
- struct S {}; // { dg-error "struct M::S" "candidate 2" }
+ struct S {}; // { dg-message "struct M::S" "candidate 2" }
}
int S;
-struct S {}; // { dg-error "candidates are: struct S" "candidate 1" }
+struct S {}; // { dg-message "candidates are: struct S" "candidate 1" }
using namespace M;
diff --git a/gcc/testsuite/g++.dg/lookup/using18.C b/gcc/testsuite/g++.dg/lookup/using18.C
index 37557148ea..d64fbc6e91 100644
--- a/gcc/testsuite/g++.dg/lookup/using18.C
+++ b/gcc/testsuite/g++.dg/lookup/using18.C
@@ -4,12 +4,12 @@
namespace N1 {
void f ();
- struct f; // { dg-error "" "candidate" }
+ struct f; // { dg-message "" "candidate" }
}
namespace N2 {
void f (int);
- struct f; // { dg-error "" "candidate" }
+ struct f; // { dg-message "" "candidate" }
}
namespace M {
diff --git a/gcc/testsuite/g++.dg/lookup/using20.C b/gcc/testsuite/g++.dg/lookup/using20.C
index dc1d293a2e..f1be41fea9 100644
--- a/gcc/testsuite/g++.dg/lookup/using20.C
+++ b/gcc/testsuite/g++.dg/lookup/using20.C
@@ -2,14 +2,14 @@
namespace A
{
- int i; // { dg-error "i" }
+ int i; // { dg-message "i" }
}
using namespace A;
namespace B
{
namespace B2
{
- int i; // { dg-error "i" }
+ int i; // { dg-message "i" }
}
using namespace B2;
}
diff --git a/gcc/testsuite/g++.dg/lookup/using53.C b/gcc/testsuite/g++.dg/lookup/using53.C
new file mode 100644
index 0000000000..a108b50ef8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/using53.C
@@ -0,0 +1,53 @@
+// PR c++/20420
+
+class B
+{
+protected:
+ enum E { E1, E2, E3 };
+ struct S { int i; E e; };
+};
+
+class D : private B
+{
+public:
+ using B::E; // { dg-message "previous" }
+ using B::S; // { dg-message "previous" }
+
+private:
+ enum E {}; // { dg-error "conflicts" }
+ struct S {}; // { dg-error "conflicts" }
+};
+
+template<typename T>
+class BT
+{
+protected:
+ enum E { E1, E2, E3 };
+ struct S { int i; E e; };
+};
+
+template<typename T>
+class DT : private BT<T>
+{
+public:
+ using BT<T>::E; // { dg-message "previous" }
+ using BT<T>::S; // { dg-message "previous" }
+
+private:
+ enum E {}; // { dg-error "conflicts" }
+ struct S {}; // { dg-error "conflicts" }
+};
+
+template class DT<int>;
+
+namespace N
+{
+ int i;
+}
+
+void
+f ()
+{
+ using N::i;
+ using N::i; // { dg-error "declared" }
+}
diff --git a/gcc/testsuite/g++.dg/lookup/using9.C b/gcc/testsuite/g++.dg/lookup/using9.C
index 32abb5371f..fd3e788638 100644
--- a/gcc/testsuite/g++.dg/lookup/using9.C
+++ b/gcc/testsuite/g++.dg/lookup/using9.C
@@ -21,11 +21,11 @@ void h()
f('h');
f(1); // { dg-error "ambiguous" }
// { dg-message "candidate" "candidate note" { target *-*-* } 22 }
- void f(int); // { dg-error "previous using declaration" }
+ void f(int); // { dg-error "previous declaration" }
}
void m()
{
void f(int);
- using B::f; // { dg-error "already declared" }
+ using B::f; // { dg-error "previous declaration" }
}
diff --git a/gcc/testsuite/g++.dg/lto/20090303_0.C b/gcc/testsuite/g++.dg/lto/20090303_0.C
index 36c8588bb5..88bd6ad9be 100644
--- a/gcc/testsuite/g++.dg/lto/20090303_0.C
+++ b/gcc/testsuite/g++.dg/lto/20090303_0.C
@@ -1,4 +1,5 @@
/* { dg-lto-do run } */
+/* { dg-require-effective-target fpic } */
/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
/* { dg-lto-options {{-flto -flto-partition=1to1}} { target sparc*-*-* } } */
/* { dg-suppress-ld-options {-fPIC} } */
diff --git a/gcc/testsuite/g++.dg/lto/lto.exp b/gcc/testsuite/g++.dg/lto/lto.exp
index 62d8250314..4d7d727b98 100644
--- a/gcc/testsuite/g++.dg/lto/lto.exp
+++ b/gcc/testsuite/g++.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,6 +35,11 @@ load_lib target-libpath.exp
# Load the language-independent compabibility support procedures.
load_lib lto.exp
+# If LTO has not been enabled, bail.
+if { ![check_effective_target_lto] } {
+ return
+}
+
g++_init
lto_init no-mathlib
@@ -42,13 +47,8 @@ lto_init no-mathlib
# with other lto tests running at the same time.
set sid "cp_lto"
-# If LTO has not been enabled, bail.
-if { ![check_effective_target_lto] } {
- return
-}
-
# Main loop.
-foreach src [lsort [find $srcdir/$subdir *_0.C]] {
+foreach src [lsort [find $srcdir/$subdir *_0.\[cC\]]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $src] then {
continue
diff --git a/gcc/testsuite/g++.dg/lto/pr42987_0.C b/gcc/testsuite/g++.dg/lto/pr42987_0.C
new file mode 100644
index 0000000000..e422daa69e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr42987_0.C
@@ -0,0 +1,22 @@
+// { dg-lto-do run }
+// { dg-lto-options { { -flto -g } { -flto -flto-partition=none -g } } }
+
+#include <typeinfo>
+
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+extern B* g();
+
+int main () {
+ if (typeid (*f()) == typeid (*g()))
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr42987_1.C b/gcc/testsuite/g++.dg/lto/pr42987_1.C
new file mode 100644
index 0000000000..638479e745
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr42987_1.C
@@ -0,0 +1,14 @@
+struct B {
+ virtual void b() {}
+};
+
+static B* f() {
+ struct D : public B {
+ };
+
+ return new D;
+}
+
+B* g() {
+ return f();
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr51992_0.C b/gcc/testsuite/g++.dg/lto/pr51992_0.C
index deb232cc2a..f75abd281a 100644
--- a/gcc/testsuite/g++.dg/lto/pr51992_0.C
+++ b/gcc/testsuite/g++.dg/lto/pr51992_0.C
@@ -5,6 +5,7 @@ template<typename Enum>
class QFlags
{
int i;
+public:
inline QFlags(Enum f) : i(f) {}
};
class QString {};
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-1_0.c b/gcc/testsuite/g++.dg/lto/pr54625-1_0.c
new file mode 100644
index 0000000000..5ab90dddde
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr54625-1_0.c
@@ -0,0 +1,10 @@
+/* { dg-lto-do link } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+float a;
+double sin ();
+speex_resampler_init_frac ()
+{
+ a = sin (0);
+}
+
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-1_1.C b/gcc/testsuite/g++.dg/lto/pr54625-1_1.C
new file mode 100644
index 0000000000..2d0d5bfbad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr54625-1_1.C
@@ -0,0 +1,19 @@
+extern "C" double sin (double);
+typedef double UnaryFunType (double);
+class A
+{
+public:
+ int hash ();
+ double lookup (UnaryFunType p1)
+ {
+ int a = hash ();
+ if (p1)
+ return 0;
+ }
+};
+A b;
+void
+math_sin_impl ()
+{
+ b.lookup (sin);
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-2_0.c b/gcc/testsuite/g++.dg/lto/pr54625-2_0.c
new file mode 100644
index 0000000000..6511ba5cc6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr54625-2_0.c
@@ -0,0 +1,9 @@
+/* { dg-lto-do link } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+float a;
+double sin ();
+update_filter ()
+{
+ a = sin (0);
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr54625-2_1.C b/gcc/testsuite/g++.dg/lto/pr54625-2_1.C
new file mode 100644
index 0000000000..09c365d235
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr54625-2_1.C
@@ -0,0 +1,24 @@
+extern "C" double sin (double);
+typedef double (*UnaryFunType) (double);
+class A
+{
+public:
+ int hash ();
+ void lookup (UnaryFunType p1)
+ {
+ int a = hash ();
+ p1 (0);
+ }
+};
+A b, c;
+void
+math_sin_impl ()
+{
+ b.lookup (sin);
+}
+
+void
+js_math_sqrt ()
+{
+ c.lookup (0);
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr60150.H b/gcc/testsuite/g++.dg/lto/pr60150.H
new file mode 100644
index 0000000000..6afe37acc9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr60150.H
@@ -0,0 +1,20 @@
+struct Base {
+ virtual void f() = 0;
+};
+
+struct X : public Base { };
+struct Y : public Base { };
+struct Z : public Base { };
+struct T : public Base { };
+
+struct S : public X, public Y, public Z
+#ifdef XXX
+, public T
+#endif
+{
+ void f()
+#ifdef XXX
+ { }
+#endif
+ ;
+};
diff --git a/gcc/testsuite/g++.dg/lto/pr60150_0.C b/gcc/testsuite/g++.dg/lto/pr60150_0.C
new file mode 100644
index 0000000000..cc21820a87
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr60150_0.C
@@ -0,0 +1,8 @@
+// { dg-lto-do run }
+#include "pr60150.H"
+
+int main()
+{
+ S s;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/lto/pr60150_1.C b/gcc/testsuite/g++.dg/lto/pr60150_1.C
new file mode 100644
index 0000000000..294e5f00fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr60150_1.C
@@ -0,0 +1,4 @@
+// { dg-options "-fno-lto" }
+#include "pr60150.H"
+
+void S::f() { }
diff --git a/gcc/testsuite/g++.dg/lto/pr60567_0.C b/gcc/testsuite/g++.dg/lto/pr60567_0.C
new file mode 100644
index 0000000000..966a3c3bc7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr60567_0.C
@@ -0,0 +1,23 @@
+// PR lto/60567
+// { dg-lto-do link }
+// { dg-lto-options { { -flto -fno-use-linker-plugin } } }
+// { dg-extra-ld-options "-r -nostdlib" }
+
+#pragma implementation
+struct S {};
+
+#pragma interface
+struct T
+{
+ virtual void foo (const S &) = 0;
+};
+
+struct U
+{
+ virtual void bar (const S &) = 0;
+};
+
+struct V : public T, public U
+{
+ virtual void bar (const S &) {}
+};
diff --git a/gcc/testsuite/g++.dg/lto/pr62026.C b/gcc/testsuite/g++.dg/lto/pr62026.C
new file mode 100644
index 0000000000..63766a85b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/pr62026.C
@@ -0,0 +1,22 @@
+// { dg-lto-do link }
+// { dg-lto-options {{-flto -O3 -r -nostdlib}} }
+class C;
+class F {
+ virtual C m_fn1();
+};
+class C {
+ public:
+ virtual int *m_fn3(int);
+};
+class G : F, C {
+ int offsets;
+ int *m_fn3(int);
+};
+C *a;
+int *G::m_fn3(int) {
+ if (offsets) return 0;
+}
+
+void fn1() {
+ for (;;) a->m_fn3(0);
+}
diff --git a/gcc/testsuite/g++.dg/lto/v1-plugin-api-not-supported_0.C b/gcc/testsuite/g++.dg/lto/v1-plugin-api-not-supported_0.C
new file mode 100644
index 0000000000..f79dfae5c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lto/v1-plugin-api-not-supported_0.C
@@ -0,0 +1,54 @@
+// { dg-lto-do run }
+// { dg-require-linker-plugin "" }
+// { dg-lto-options {{-O2 -fuse-linker-plugin -fno-early-inlining}}
+
+extern "C" void abort (void);
+extern "C" void linker_error ();
+
+class A
+{
+public:
+ int data;
+ virtual int foo (int i)
+ {
+ return i + 1;
+ }
+};
+
+class B : public A
+{
+public:
+ virtual int foo (int i)
+ {
+ return i + 2;
+ }
+};
+
+class C : public A
+{
+public:
+ virtual int foo (int i)
+ {
+ linker_error ();
+ return i + 3;
+ }
+};
+
+
+static int middleman (class A *obj, int i)
+{
+ return obj->foo (i);
+}
+
+int __attribute__ ((noinline,noclone)) get_input(void)
+{
+ return 1;
+}
+
+int main (int argc, char *argv[])
+{
+ class B b;
+ if (middleman (&b, get_input ()) != 3)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/builtins2.C b/gcc/testsuite/g++.dg/opt/builtins2.C
index 00a28dbc1b..658c128d62 100644
--- a/gcc/testsuite/g++.dg/opt/builtins2.C
+++ b/gcc/testsuite/g++.dg/opt/builtins2.C
@@ -1,6 +1,6 @@
// PR c++/49813
// We should handle asinh as a built-in in C++0x mode, even when strict.
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
// { dg-final { scan-assembler-not "asinh" } }
#include <math.h>
diff --git a/gcc/testsuite/g++.dg/opt/const5.C b/gcc/testsuite/g++.dg/opt/const5.C
index 3785271a08..68fe61628b 100644
--- a/gcc/testsuite/g++.dg/opt/const5.C
+++ b/gcc/testsuite/g++.dg/opt/const5.C
@@ -1,7 +1,7 @@
// We don't have a good way of determining how ".rodata" is spelled on
// all targets, so we limit this test to a few common targets where we
// do know the spelling.
-// { dg-do compile { target i?86-*-linux* x86_64-*-linux* } }
+// { dg-do compile { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
// { dg-final { scan-assembler "\\.rodata" } }
template <typename T>
diff --git a/gcc/testsuite/g++.dg/opt/declone1.C b/gcc/testsuite/g++.dg/opt/declone1.C
new file mode 100644
index 0000000000..1f935b7e39
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/declone1.C
@@ -0,0 +1,21 @@
+// { dg-options "-fdeclone-ctor-dtor -O3" }
+
+struct V {};
+
+template <class T>
+struct A: virtual V {
+ static A* p;
+ A();
+};
+
+template <class T>
+A<T>::A()
+{
+ if (!p)
+ p = new A();
+}
+
+int main()
+{
+ A<int> a;
+}
diff --git a/gcc/testsuite/g++.dg/opt/devirt3.C b/gcc/testsuite/g++.dg/opt/devirt3.C
new file mode 100644
index 0000000000..673867361c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/devirt3.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+class ert_RefCounter {
+ protected:
+ int refCounterE;
+ virtual ~ert_RefCounter() {}
+};
+
+class ebs_Object : virtual public ert_RefCounter {
+};
+
+class dpr_App : public ebs_Object {
+ public:
+ virtual void run();
+};
+
+class dpr_Job : public ebs_Object {};
+
+void dpr_run(ebs_Object& objectA) {
+ ((dpr_App&)objectA).run();
+ dpr_Job jobL;
+ dpr_run(jobL);
+}
diff --git a/gcc/testsuite/g++.dg/opt/devirt4.C b/gcc/testsuite/g++.dg/opt/devirt4.C
new file mode 100644
index 0000000000..72f56afcad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/devirt4.C
@@ -0,0 +1,15 @@
+// PR lto/53808
+// Devirtualization should not produce an external ref to ~bar.
+// { dg-options "-O2" }
+// { dg-final { scan-assembler-not "_ZN3barD0Ev" } }
+
+struct foo {
+ virtual ~foo();
+};
+struct bar : public foo {
+ virtual void zed();
+};
+void f() {
+ foo *x(new bar);
+ delete x;
+}
diff --git a/gcc/testsuite/g++.dg/opt/devirt5.C b/gcc/testsuite/g++.dg/opt/devirt5.C
new file mode 100644
index 0000000000..f839cbeae2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/devirt5.C
@@ -0,0 +1,19 @@
+// PR c++/61659
+// { dg-options "-O3" }
+// { dg-final { scan-assembler-not "_ZN6parserIiE9getOptionEv" } }
+
+struct generic_parser_base {
+ virtual void getOption();
+ void getExtraOptionNames() { getOption(); }
+};
+template <class DataType> struct parser : public generic_parser_base {
+ virtual void getOption() {}
+};
+struct PassNameParser : public parser<int> {
+ PassNameParser();
+};
+struct list {
+ PassNameParser Parser;
+ virtual void getExtraOptionNames() { return Parser.getExtraOptionNames(); }
+};
+list PassList;
diff --git a/gcc/testsuite/g++.dg/opt/dump1.C b/gcc/testsuite/g++.dg/opt/dump1.C
new file mode 100644
index 0000000000..d90061feee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/dump1.C
@@ -0,0 +1,768 @@
+// PR c++/57102
+// { dg-options "-O2 -fno-inline -fdump-final-insns" }
+// { dg-do compile { target c++11 } }
+// { dg-final cleanup-saved-temps }
+
+namespace std
+{
+ typedef __SIZE_TYPE__ size_t;
+ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+}
+extern "C++" {
+ void* operator new(std::size_t, void* __p) noexcept;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp, _Tp __v>
+ struct integral_constant
+ {
+ static constexpr _Tp value = __v;
+ typedef integral_constant<_Tp, __v> type;
+ };
+ typedef integral_constant<bool, true> true_type;
+ typedef integral_constant<bool, false> false_type;
+ template<bool, typename, typename>
+ struct conditional;
+ template<typename...>
+ struct __or_;
+ template<typename _B1, typename _B2>
+ struct __or_<_B1, _B2>
+ : public conditional<_B1::value, _B1, _B2>::type
+ {};
+ template<typename _B1, typename _B2, typename _B3, typename... _Bn>
+ struct __or_<_B1, _B2, _B3, _Bn...>
+ : public conditional<_B1::value, _B1, __or_<_B2, _B3, _Bn...>>::type
+ {};
+ template<typename...>
+ struct __and_;
+ template<typename _B1, typename _B2>
+ struct __and_<_B1, _B2>
+ : public conditional<_B1::value, _B2, _B1>::type
+ {};
+ template<typename _Pp>
+ struct __not_
+ : public integral_constant<bool, !_Pp::value>
+ {};
+ template<typename _Tp>
+ struct __success_type
+ { typedef _Tp type; };
+ template<typename>
+ struct remove_cv;
+ template<typename>
+ struct __is_void_helper
+ : public false_type {};
+ template<typename _Tp>
+ struct is_void
+ : public __is_void_helper<typename remove_cv<_Tp>::type>::type
+ {};
+ template<typename>
+ struct __is_integral_helper
+ : public true_type {};
+ template<typename _Tp>
+ struct is_integral
+ : public __is_integral_helper<typename remove_cv<_Tp>::type>::type
+ {};
+ template<typename>
+ struct is_array
+ : public false_type {};
+ template<typename>
+ struct is_lvalue_reference
+ : public false_type {};
+ template<typename>
+ struct is_rvalue_reference
+ : public false_type {};
+ template<typename>
+ struct __is_member_object_pointer_helper
+ : public false_type {};
+ template<typename _Tp>
+ struct is_member_object_pointer
+ : public __is_member_object_pointer_helper<
+ typename remove_cv<_Tp>::type>::type
+ {};
+ template<typename>
+ struct __is_member_function_pointer_helper
+ : public false_type {};
+ template<typename _Tp>
+ struct is_member_function_pointer
+ : public __is_member_function_pointer_helper<
+ typename remove_cv<_Tp>::type>::type
+ {};
+ template<typename _Tp>
+ struct is_enum
+ : public integral_constant<bool, __is_enum(_Tp)>
+ {};
+ template<typename>
+ struct is_function
+ : public false_type {};
+ template<typename _Tp>
+ struct is_reference
+ : public __or_<is_lvalue_reference<_Tp>,
+ is_rvalue_reference<_Tp>>::type
+ {};
+ template<typename _Tp>
+ struct __is_member_pointer_helper
+ : public false_type {};
+ template<typename _Tp>
+ struct is_member_pointer
+ : public __is_member_pointer_helper<typename remove_cv<_Tp>::type>::type
+ {};
+ template<typename>
+ struct is_const
+ : public false_type {};
+ template<typename>
+ struct is_volatile
+ : public false_type {};
+ template<typename>
+ struct add_rvalue_reference;
+ template<typename _Tp>
+ typename add_rvalue_reference<_Tp>::type declval() noexcept;
+ struct __do_is_nary_constructible_impl
+ {
+ template<typename _Tp, typename... _Args, typename
+ = decltype(_Tp(declval<_Args>()...))>
+ static true_type __test(int);
+ };
+ template<typename _Tp, typename... _Args>
+ struct __is_nary_constructible_impl
+ : public __do_is_nary_constructible_impl
+ {
+ typedef decltype(__test<_Tp, _Args...>(0)) type;
+ };
+ template<typename _Tp, typename... _Args>
+ struct __is_nary_constructible
+ : public __is_nary_constructible_impl<_Tp, _Args...>::type
+ {};
+ template<typename _Tp, typename... _Args>
+ struct __is_constructible_impl
+ : public __is_nary_constructible<_Tp, _Args...>
+ {};
+ template<typename _Tp, typename... _Args>
+ struct is_constructible
+ : public __is_constructible_impl<_Tp, _Args...>::type
+ {};
+ template<typename, typename>
+ struct is_same
+ : public true_type {};
+ template<typename _From, typename _To,
+ bool = __or_<is_void<_From>, is_function<_To>,
+ is_array<_To>>::value>
+ struct __is_convertible_helper
+ {
+ template<typename _To1>
+ static void __test_aux(_To1);
+ template<typename _From1, typename _To1,
+ typename = decltype(__test_aux<_To1>(std::declval<_From1>()))>
+ static true_type
+ __test(int);
+ typedef decltype(__test<_From, _To>(0)) type;
+ };
+ template<typename _From, typename _To>
+ struct is_convertible
+ : public __is_convertible_helper<_From, _To>::type
+ {};
+ template<typename _Tp>
+ struct remove_const
+ { typedef _Tp type; };
+ template<typename _Tp>
+ struct remove_volatile
+ { typedef _Tp type; };
+ template<typename _Tp>
+ struct remove_cv
+ {
+ typedef typename
+ remove_const<typename remove_volatile<_Tp>::type>::type type;
+ };
+ template<typename _Tp>
+ struct remove_reference
+ { typedef _Tp type; };
+ template<typename _Tp>
+ struct remove_reference<_Tp&>
+ { typedef _Tp type; };
+ template<typename _Tp,
+ bool = __and_<__not_<is_reference<_Tp>>,
+ __not_<is_void<_Tp>>>::value>
+ struct __add_rvalue_reference_helper
+ { typedef _Tp type; };
+ template<typename _Tp>
+ struct add_rvalue_reference
+ : public __add_rvalue_reference_helper<_Tp>
+ {};
+ template<typename _Unqualified, bool _IsConst, bool _IsVol>
+ struct __cv_selector;
+ template<typename _Unqualified>
+ struct __cv_selector<_Unqualified, false, false>
+ { typedef _Unqualified __type; };
+ template<typename _Qualified, typename _Unqualified,
+ bool _IsConst = is_const<_Qualified>::value,
+ bool _IsVol = is_volatile<_Qualified>::value>
+ class __match_cv_qualifiers
+ {
+ typedef __cv_selector<_Unqualified, _IsConst, _IsVol> __match;
+ public:
+ typedef typename __match::__type __type;
+ };
+ template<typename _Tp>
+ struct __make_unsigned
+ { typedef _Tp __type; };
+ template<typename _Tp,
+ bool _IsInt = is_integral<_Tp>::value,
+ bool _IsEnum = is_enum<_Tp>::value>
+ class __make_unsigned_selector;
+ template<typename _Tp>
+ class __make_unsigned_selector<_Tp, true, false>
+ {
+ typedef __make_unsigned<typename remove_cv<_Tp>::type> __unsignedt;
+ typedef typename __unsignedt::__type __unsigned_type;
+ typedef __match_cv_qualifiers<_Tp, __unsigned_type> __cv_unsigned;
+ public:
+ typedef typename __cv_unsigned::__type __type;
+ };
+ template<typename _Tp>
+ struct make_unsigned
+ { typedef typename __make_unsigned_selector<_Tp>::__type type; };
+ template<typename _Tp, typename>
+ struct __remove_pointer_helper
+ { typedef _Tp type; };
+ template<typename _Tp>
+ struct remove_pointer
+ : public __remove_pointer_helper<_Tp, typename remove_cv<_Tp>::type>
+ {};
+ template<typename _Up,
+ bool _IsArray = is_array<_Up>::value,
+ bool _IsFunction = is_function<_Up>::value>
+ struct __decay_selector;
+ template<typename _Up>
+ struct __decay_selector<_Up, false, false>
+ { typedef typename remove_cv<_Up>::type __type; };
+ template<typename _Tp>
+ class decay
+ {
+ typedef typename remove_reference<_Tp>::type __remove_type;
+ public:
+ typedef typename __decay_selector<__remove_type>::__type type;
+ };
+ template<bool, typename _Tp = void>
+ struct enable_if
+ { typedef _Tp type; };
+ template<typename... _Cond>
+ using _Require = typename enable_if<__and_<_Cond...>::value>::type;
+ template<bool _Cond, typename _Iftrue, typename _Iffalse>
+ struct conditional
+ { typedef _Iftrue type; };
+ template<typename _Signature>
+ class result_of;
+ template<bool, bool, typename _Functor, typename... _ArgTypes>
+ struct __result_of_impl
+ ;
+ struct __result_of_other_impl
+ {
+ template<typename _Fn, typename... _Args>
+ static __success_type<decltype(
+ std::declval<_Fn>()(std::declval<_Args>()...)
+ )> _S_test(int);
+ };
+ template<typename _Functor, typename... _ArgTypes>
+ struct __result_of_impl<false, false, _Functor, _ArgTypes...>
+ : private __result_of_other_impl
+ {
+ typedef decltype(_S_test<_Functor, _ArgTypes...>(0)) type;
+ };
+ template<typename _Functor, typename... _ArgTypes>
+ struct result_of<_Functor(_ArgTypes...)>
+ : public __result_of_impl<
+ is_member_object_pointer<
+ typename remove_reference<_Functor>::type
+ >::value,
+ is_member_function_pointer<
+ typename remove_reference<_Functor>::type
+ >::value,
+ _Functor, _ArgTypes...
+ >::type
+ {};
+ template<typename _Tp>
+ constexpr _Tp&&
+ forward(typename std::remove_reference<_Tp>::type& __t) noexcept
+ { return static_cast<_Tp&&>(__t); }
+ template<typename _Tp>
+ constexpr typename std::remove_reference<_Tp>::type&&
+ move(_Tp&& __t) noexcept
+ { return static_cast<typename std::remove_reference<_Tp>::type&&>(__t); }
+ template<std::size_t _Int, class _Tp>
+ class tuple_element;
+ struct allocator_arg_t {};
+ constexpr allocator_arg_t allocator_arg = allocator_arg_t();
+ template<typename _Tp>
+ struct __add_ref
+ { typedef _Tp& type; };
+ template<std::size_t _Idx, typename... _Elements>
+ struct _Tuple_impl;
+ template<std::size_t _Idx, typename _Head, typename... _Tail>
+ struct _Tuple_impl<_Idx, _Head, _Tail...>
+ {};
+ template<typename... _Elements>
+ class tuple : public _Tuple_impl<0, _Elements...>
+ {};
+ template<typename _Head, typename... _Tail>
+ struct tuple_element<0, tuple<_Head, _Tail...> >
+ {
+ typedef _Head type;
+ };
+ template<std::size_t __i, typename... _Elements>
+ typename __add_ref<
+ typename tuple_element<__i, tuple<_Elements...>>::type
+ >::type
+ get(tuple<_Elements...>& __t) noexcept;
+ template<std::size_t... _Indexes>
+ struct _Index_tuple
+ {};
+ template<std::size_t _Num>
+ struct _Build_index_tuple
+ {
+ typedef _Index_tuple<> __type;
+ };
+ template<typename _Functor, typename... _Args>
+ typename enable_if<
+ (!is_member_pointer<_Functor>::value
+ && !is_function<typename remove_pointer<_Functor>::type>::value),
+ typename result_of<_Functor(_Args&&...)>::type
+ >::type
+ __invoke(_Functor& __f, _Args&&... __args)
+ {
+ return __f(std::forward<_Args>(__args)...);
+ }
+
+ template<typename _Tp>
+ class reference_wrapper
+ {
+ public:
+ _Tp&
+ get() const noexcept
+ {}
+ template<typename... _Args>
+ typename result_of<_Tp&(_Args&&...)>::type
+ operator()(_Args&&... __args) const
+ {
+ return __invoke(get(), std::forward<_Args>(__args)...);
+ }
+ };
+ template<typename _Tp>
+ inline reference_wrapper<_Tp>
+ ref(_Tp& __t) noexcept
+ {}
+ template<typename _Tp>
+ struct _Maybe_wrap_member_pointer
+ {
+ typedef _Tp type;
+ };
+ template<typename _Signature>
+ struct _Bind_simple;
+ template<typename _Callable, typename... _Args>
+ struct _Bind_simple<_Callable(_Args...)>
+ {
+ typedef typename result_of<_Callable(_Args...)>::type result_type;
+ result_type
+ operator()()
+ {
+ typedef typename _Build_index_tuple<sizeof...(_Args)>::__type _Indices;
+ return _M_invoke(_Indices());
+ }
+ template<std::size_t... _Indices>
+ typename result_of<_Callable(_Args...)>::type
+ _M_invoke(_Index_tuple<_Indices...>)
+ {
+ return std::forward<_Callable>(std::get<0>(_M_bound))(
+ std::forward<_Args>(std::get<_Indices+1>(_M_bound))...);
+ }
+ std::tuple<_Callable, _Args...> _M_bound;
+ };
+ template<typename _Func, typename... _BoundArgs>
+ struct _Bind_simple_helper
+ {
+ typedef _Maybe_wrap_member_pointer<typename decay<_Func>::type>
+ __maybe_type;
+ typedef typename __maybe_type::type __func_type;
+ typedef _Bind_simple<__func_type(typename decay<_BoundArgs>::type...)>
+ __type;
+ };
+ template<typename _Callable, typename... _Args>
+ typename _Bind_simple_helper<_Callable, _Args...>::__type
+ __bind_simple(_Callable&& __callable, _Args&&... __args)
+ ;
+ union _Any_data
+ ;
+ template<typename _Functor>
+ inline _Functor&
+ __callable_functor(_Functor& __f)
+ ;
+ template<typename _Signature>
+ class function;
+ class _Function_base
+ {
+ template<typename _Functor>
+ class _Base_manager
+ {
+ protected:
+ static _Functor*
+ _M_get_pointer(const _Any_data& __source)
+ ;
+ };
+ };
+ template<typename _Signature, typename _Functor>
+ class _Function_handler;
+ template<typename _Res, typename _Functor, typename... _ArgTypes>
+ class _Function_handler<_Res(_ArgTypes...), _Functor>
+ : public _Function_base::_Base_manager<_Functor>
+ {
+ typedef _Function_base::_Base_manager<_Functor> _Base;
+ public:
+ static _Res
+ _M_invoke(const _Any_data& __functor, _ArgTypes... __args)
+ {
+ return (*_Base::_M_get_pointer(__functor))(
+ std::forward<_ArgTypes>(__args)...);
+ }
+ };
+ template<typename _Res, typename... _ArgTypes>
+ class function<_Res(_ArgTypes...)>
+ {
+ typedef _Res _Signature_type(_ArgTypes...);
+ template<typename _Functor>
+ using _Invoke = decltype(__callable_functor(std::declval<_Functor&>())
+ (std::declval<_ArgTypes>()...) );
+ template<typename _CallRes, typename _Res1>
+ struct _CheckResult
+ : is_convertible<_CallRes, _Res1> {};
+ template<typename _Functor>
+ using _Callable = _CheckResult<_Invoke<_Functor>, _Res>;
+ template<typename _Cond, typename _Tp>
+ using _Requires = typename enable_if<_Cond::value, _Tp>::type;
+ public:
+ template<typename _Functor,
+ typename = _Requires<_Callable<_Functor>, void>>
+ function(_Functor);
+ typedef _Res (*_Invoker_type)(const _Any_data&, _ArgTypes...);
+ _Invoker_type _M_invoker;
+ };
+ template<typename _Res, typename... _ArgTypes>
+ template<typename _Functor, typename>
+ function<_Res(_ArgTypes...)>::
+ function(_Functor __f)
+ {
+ typedef _Function_handler<_Signature_type, _Functor> _My_handler;
+{
+ _M_invoker = &_My_handler::_M_invoke;
+ }
+ }
+ template<typename _Ptr>
+ class __ptrtr_pointer_to
+ ;
+ template<typename _Ptr>
+ struct pointer_traits : __ptrtr_pointer_to<_Ptr>
+ {};
+ template<typename _Tp>
+ struct pointer_traits<_Tp*>
+ {
+ typedef ptrdiff_t difference_type;
+ };
+ template<typename _Alloc, typename _Tp>
+ class __alloctr_rebind_helper
+ {
+ template<typename, typename>
+ static constexpr bool
+ _S_chk(...)
+ { return false; }
+ public:
+ static const bool __value = _S_chk<_Alloc, _Tp>(nullptr);
+ };
+ template<typename _Alloc, typename _Tp,
+ bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
+ struct __alloctr_rebind;
+ template<template<typename, typename...> class _Alloc, typename _Tp,
+ typename _Up, typename... _Args>
+ struct __alloctr_rebind<_Alloc<_Up, _Args...>, _Tp, false>
+ {
+ typedef _Alloc<_Tp, _Args...> __type;
+ };
+ template<typename _Alloc>
+ struct allocator_traits
+ {
+ typedef _Alloc allocator_type;
+ typedef typename _Alloc::value_type value_type; static value_type* _S_pointer_helper(...); typedef decltype(_S_pointer_helper((_Alloc*)0)) __pointer; public:
+ typedef __pointer pointer; static typename pointer_traits<pointer>::difference_type _S_difference_type_helper(...); typedef decltype(_S_difference_type_helper((_Alloc*)0)) __difference_type; public:
+ typedef __difference_type difference_type; static typename make_unsigned<difference_type>::type _S_size_type_helper(...); typedef decltype(_S_size_type_helper((_Alloc*)0)) __size_type; public:
+ typedef __size_type size_type; public:
+ template<typename _Tp>
+ using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
+ template<typename _Tp>
+ using rebind_traits = allocator_traits<rebind_alloc<_Tp>>;
+ template<typename _Tp, typename... _Args>
+ struct __construct_helper
+ {
+ template<typename>
+ static false_type __test(...);
+ typedef decltype(__test<_Alloc>(0)) type;
+ static const bool value = type::value;
+ };
+ template<typename _Tp, typename... _Args>
+ static typename
+ enable_if<__and_<__not_<__construct_helper<_Tp, _Args...>>,
+ is_constructible<_Tp, _Args...>>::value, void>::type
+ _S_construct(_Alloc&, _Tp* __p, _Args&&... __args)
+ { ::new((void*)__p) _Tp(std::forward<_Args>(__args)...); }
+ static pointer
+ allocate(_Alloc& __a, size_type __n)
+ ;
+ template<typename _Tp, typename... _Args>
+ static auto construct(_Alloc& __a, _Tp* __p, _Args&&... __args)
+ -> decltype(_S_construct(__a, __p, std::forward<_Args>(__args)...))
+ { _S_construct(__a, __p, std::forward<_Args>(__args)...); }
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default")))
+{
+ enum _Lock_policy { _S_single, _S_mutex, _S_atomic };
+ static const _Lock_policy __default_lock_policy =
+ _S_atomic;
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Tp>
+ struct default_delete
+ ;
+ template <typename _Tp, typename _Dp = default_delete<_Tp> >
+ class unique_ptr
+ {
+ class _Pointer
+ {
+ template<typename _Up>
+ static _Tp* __test(...);
+ typedef typename remove_reference<_Dp>::type _Del;
+ public:
+ typedef decltype(__test<_Del>(0)) type;
+ };
+ public:
+ typedef typename _Pointer::type pointer;
+ typedef _Tp element_type;
+ template<typename _Up, typename _Ep, typename = _Require<
+ is_convertible<typename unique_ptr<_Up, _Ep>::pointer, pointer>,
+ typename conditional<is_reference<_Dp>::value,
+ is_same<_Ep, _Dp>,
+ is_convertible<_Ep, _Dp>>::type>>
+ unique_ptr(unique_ptr<_Up, _Ep>&& __u) noexcept
+ ;
+ };
+}
+namespace __gnu_cxx
+{
+ template<typename _Tp>
+ struct __aligned_buffer
+ {};
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ using __gnu_cxx::_Lock_policy;
+ using __gnu_cxx::__default_lock_policy;
+ template<_Lock_policy _Lp = __default_lock_policy>
+ class _Sp_counted_base
+ {};
+ template<typename _Tp, _Lock_policy _Lp = __default_lock_policy>
+ class __shared_ptr;
+ struct _Sp_make_shared_tag {};
+ template<typename _Tp, typename _Alloc, _Lock_policy _Lp>
+ class _Sp_counted_ptr_inplace final : public _Sp_counted_base<_Lp>
+ {
+ struct _Impl
+ : public _Alloc
+ {
+ _Impl(_Alloc __a) : _Alloc(__a), _M_ptr() {}
+ _Tp* _M_ptr;
+ };
+ public:
+ template<typename... _Args>
+ _Sp_counted_ptr_inplace(_Alloc __a, _Args&&... __args)
+ : _M_impl(__a), _M_storage()
+ {
+ allocator_traits<_Alloc>::construct(__a, _M_impl._M_ptr,
+ std::forward<_Args>(__args)...);
+ }
+ _Impl _M_impl;
+ __gnu_cxx::__aligned_buffer<_Tp> _M_storage;
+ };
+ template<_Lock_policy _Lp>
+ class __shared_count
+ {
+ public:
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ __shared_count(_Sp_make_shared_tag, _Tp*, const _Alloc& __a,
+ _Args&&... __args)
+ {
+ typedef _Sp_counted_ptr_inplace<_Tp, _Alloc, _Lp> _Sp_cp_type;
+ typedef typename allocator_traits<_Alloc>::template
+ rebind_traits<_Sp_cp_type> _Alloc_traits;
+ typename _Alloc_traits::allocator_type __a2(__a);
+ _Sp_cp_type* __mem = _Alloc_traits::allocate(__a2, 1);
+ try
+ {
+ _Alloc_traits::construct(__a2, __mem, std::move(__a),
+ std::forward<_Args>(__args)...);
+ }
+ catch(...)
+ {}
+ }
+ };
+ template<typename _Tp, _Lock_policy _Lp>
+ class __shared_ptr
+ {
+ public:
+ template<typename _Tp1, typename = typename
+ std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
+ __shared_ptr(const __shared_ptr<_Tp1, _Lp>& __r) noexcept
+ : _M_ptr(__r._M_ptr), _M_refcount(__r._M_refcount)
+ {}
+ template<typename _Alloc, typename... _Args>
+ __shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
+ _Args&&... __args)
+ : _M_ptr(), _M_refcount(__tag, (_Tp*)0, __a,
+ std::forward<_Args>(__args)...)
+ {}
+ _Tp* _M_ptr;
+ __shared_count<_Lp> _M_refcount;
+ };
+ template<typename _Tp>
+ class shared_ptr : public __shared_ptr<_Tp>
+ {
+ public:
+ template<typename _Tp1, typename = typename
+ std::enable_if<std::is_convertible<_Tp1*, _Tp*>::value>::type>
+ shared_ptr(const shared_ptr<_Tp1>& __r) noexcept
+ : __shared_ptr<_Tp>(__r) {}
+ template<typename _Alloc, typename... _Args>
+ shared_ptr(_Sp_make_shared_tag __tag, const _Alloc& __a,
+ _Args&&... __args)
+ : __shared_ptr<_Tp>(__tag, __a, std::forward<_Args>(__args)...)
+ {}
+ };
+ template<typename _Tp, typename _Alloc, typename... _Args>
+ inline shared_ptr<_Tp>
+ allocate_shared(const _Alloc& __a, _Args&&... __args)
+ {
+ return shared_ptr<_Tp>(_Sp_make_shared_tag(), __a,
+ std::forward<_Args>(__args)...);
+ }
+}
+namespace std __attribute__ ((__visibility__ ("default")))
+{
+ template<typename _Signature>
+ class packaged_task;
+ struct __future_base
+ {
+ struct _Result_base
+ {
+ struct _Deleter
+ ;
+ };
+ template<typename _Res>
+ struct _Result : _Result_base
+ {
+ typedef _Res result_type;
+ };
+ template<typename _Res>
+ using _Ptr = unique_ptr<_Res, _Result_base::_Deleter>;
+ template<typename _Res, typename _Alloc>
+ struct _Result_alloc final : _Result<_Res>, _Alloc
+ {};
+ template<typename _Res, typename _Allocator>
+ static _Ptr<_Result_alloc<_Res, _Allocator>>
+ _S_allocate_result(const _Allocator& __a)
+ ;
+ template<typename _Signature>
+ class _Task_state_base;
+ template<typename _Fn, typename _Alloc, typename _Signature>
+ class _Task_state;
+ template<typename _Res_ptr,
+ typename _Res = typename _Res_ptr::element_type::result_type>
+ struct _Task_setter;
+ template<typename _Res_ptr, typename _BoundFn>
+ static _Task_setter<_Res_ptr>
+ _S_task_setter(_Res_ptr& __ptr, _BoundFn&& __call)
+ {
+ return _Task_setter<_Res_ptr>{ __ptr, std::ref(__call) };
+ }
+ };
+ template<typename _Ptr_type, typename _Res>
+ struct __future_base::_Task_setter
+ {
+ _Ptr_type& _M_result;
+ std::function<_Res()> _M_fn;
+ };
+ template<typename _Res, typename... _Args>
+ struct __future_base::_Task_state_base<_Res(_Args...)>
+ {
+ template<typename _Alloc>
+ _Task_state_base(const _Alloc& __a)
+ : _M_result(_S_allocate_result<_Res>(__a))
+ {}
+ typedef __future_base::_Ptr<_Result<_Res>> _Ptr_type;
+ _Ptr_type _M_result;
+ };
+ template<typename _Fn, typename _Alloc, typename _Res, typename... _Args>
+ struct __future_base::_Task_state<_Fn, _Alloc, _Res(_Args...)> final
+ : __future_base::_Task_state_base<_Res(_Args...)>
+ {
+ _Task_state(_Fn&& __fn, const _Alloc& __a)
+ : _Task_state_base<_Res(_Args...)>(__a), _M_impl(std::move(__fn), __a)
+ {}
+ virtual void
+ _M_run(_Args... __args)
+ {
+ auto __boundfn = std::__bind_simple(std::ref(_M_impl._M_fn),
+ _S_maybe_wrap_ref(std::forward<_Args>(__args))...);
+ auto __setter = _S_task_setter(this->_M_result, std::move(__boundfn));
+ }
+ struct _Impl : _Alloc
+ {
+ _Impl(_Fn&& __fn, const _Alloc& __a)
+ : _Alloc(__a), _M_fn(std::move(__fn)) {}
+ _Fn _M_fn;
+ } _M_impl;
+ };
+ template<typename _Signature, typename _Fn, typename _Alloc>
+ static shared_ptr<__future_base::_Task_state_base<_Signature>>
+ __create_task_state(_Fn&& __fn, const _Alloc& __a)
+ {
+ typedef __future_base::_Task_state<_Fn, _Alloc, _Signature> _State;
+ return std::allocate_shared<_State>(__a, std::move(__fn), __a);
+ }
+ template<typename _Task, typename _Fn, bool
+ = is_same<_Task, typename decay<_Fn>::type>::value>
+ struct __constrain_pkgdtask
+ { typedef void __type; };
+ template<typename _Res, typename... _ArgTypes>
+ class packaged_task<_Res(_ArgTypes...)>
+ {
+ typedef __future_base::_Task_state_base<_Res(_ArgTypes...)> _State_type;
+ shared_ptr<_State_type> _M_state;
+ public:
+ template<typename _Fn, typename _Alloc, typename = typename
+ __constrain_pkgdtask<packaged_task, _Fn>::__type>
+ packaged_task(allocator_arg_t, const _Alloc& __a, _Fn&& __fn)
+ : _M_state(__create_task_state<_Res(_ArgTypes...)>(
+ std::forward<_Fn>(__fn), __a))
+ {}
+ };
+}
+namespace __gnu_test
+{
+ template <class Tp>
+ struct SimpleAllocator
+ {
+ typedef Tp value_type;
+ SimpleAllocator() ;
+ template <class T>
+ SimpleAllocator(const SimpleAllocator<T>& other) ;
+ };
+}
+using std::packaged_task;
+using std::allocator_arg;
+__gnu_test::SimpleAllocator<int> a;
+packaged_task<int()> p(allocator_arg, a, []() { return 1; });
diff --git a/gcc/testsuite/g++.dg/opt/enum2.C b/gcc/testsuite/g++.dg/opt/enum2.C
index 6300896cff..40a496e535 100644
--- a/gcc/testsuite/g++.dg/opt/enum2.C
+++ b/gcc/testsuite/g++.dg/opt/enum2.C
@@ -1,8 +1,8 @@
// PR c++/43680
// Test that we don't make excessively aggressive assumptions about what
// values an enum variable can have.
+// { dg-do run { target fpic } }
// { dg-options "-O2 -fPIC" }
-// { dg-do run }
extern "C" void abort ();
diff --git a/gcc/testsuite/g++.dg/opt/life1.C b/gcc/testsuite/g++.dg/opt/life1.C
index dd840f9abe..9b8a61aa90 100644
--- a/gcc/testsuite/g++.dg/opt/life1.C
+++ b/gcc/testsuite/g++.dg/opt/life1.C
@@ -1,6 +1,6 @@
// This testcase did not set up the pic register on IA-32 due
// to bug in calculate_global_regs_live EH edge handling.
-// { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ia32 } } }
+// { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } }
// { dg-require-effective-target fpic }
// { dg-options "-O2 -fPIC" }
diff --git a/gcc/testsuite/g++.dg/opt/longbranch1.C b/gcc/testsuite/g++.dg/opt/longbranch1.C
index df545012cc..a64a57aea2 100644
--- a/gcc/testsuite/g++.dg/opt/longbranch1.C
+++ b/gcc/testsuite/g++.dg/opt/longbranch1.C
@@ -26,10 +26,6 @@
muchcode; muchcode; muchcode; muchcode; muchcode; muchcode; \
muchcode; muchcode; muchcode; muchcode; muchcode; muchcode
-#ifdef __mips
-/* See PR 51931. */
-__attribute__((nomips16))
-#endif
int
main (int argc, char **argv)
{
diff --git a/gcc/testsuite/g++.dg/opt/longbranch2.C b/gcc/testsuite/g++.dg/opt/longbranch2.C
index de63f697fc..4a8d5eef73 100644
--- a/gcc/testsuite/g++.dg/opt/longbranch2.C
+++ b/gcc/testsuite/g++.dg/opt/longbranch2.C
@@ -15,8 +15,8 @@ public:
class EBCOTLut : public JKeeper {
unsigned char a1[1<<8];
- unsigned char a2[1<<8];
- unsigned char a3[1<<8];
+ unsigned char a2[1<<9];
+ unsigned char a3[1<<9];
long a4[1<<9];
public:
EBCOTLut(void);
diff --git a/gcc/testsuite/g++.dg/opt/pr42295.C b/gcc/testsuite/g++.dg/opt/pr42295.C
new file mode 100644
index 0000000000..602420626e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr42295.C
@@ -0,0 +1,18 @@
+// { dg-do compile { target i?86-*-* x86_64-*-* } }
+// { dg-options "-O1 -fschedule-insns -fselective-scheduling" }
+
+extern int f (...);
+
+int
+testsum (void *a, int k, int n)
+{
+ int i, j;
+
+ f (n / 2);
+ for (i = 0; i < n; i += 8)
+ for (j = 0; j < n; j += 8)
+ while (k < n)
+ k += 8;
+
+ return k;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr48549.C b/gcc/testsuite/g++.dg/opt/pr48549.C
index 93a38e409b..01f600e79e 100644
--- a/gcc/testsuite/g++.dg/opt/pr48549.C
+++ b/gcc/testsuite/g++.dg/opt/pr48549.C
@@ -1,6 +1,7 @@
// PR rtl-optimization/48549
// { dg-do compile }
// { dg-options "-fcompare-debug -O2" }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
__extension__ typedef __PTRDIFF_TYPE__ pdiff_t;
diff --git a/gcc/testsuite/g++.dg/opt/pr52643.C b/gcc/testsuite/g++.dg/opt/pr52643.C
new file mode 100644
index 0000000000..271dd76c12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr52643.C
@@ -0,0 +1,64 @@
+// PR c++/52643
+// { dg-options "-O" }
+
+template<class T> class already_AddRefd {};
+
+template<class T>
+class ObjRef
+{
+public:
+ ObjRef() {}
+
+ ObjRef(const already_AddRefd<T> aar) {}
+
+ ~ObjRef()
+ {
+ T* mPtr;
+ mPtr->release_ref();
+ }
+
+ operator T* () const
+ {
+ return __null;
+ }
+
+ template<class U>
+ void operator= (const already_AddRefd<U>& newAssign) {}
+};
+
+class MyRetClass {
+public:
+ void release_ref();
+};
+
+class MyClass
+{
+ void appendChild();
+ void getTripleOutOfByPredicate();
+ already_AddRefd<MyRetClass> getNextTriple();
+};
+
+void
+MyClass::getTripleOutOfByPredicate()
+{
+ ObjRef<MyRetClass> t (getNextTriple());
+
+ if (t == __null)
+ throw MyRetClass();
+}
+
+void
+MyClass::appendChild()
+{
+ while (1)
+ {
+ try
+ {
+ ObjRef<MyRetClass> t (getNextTriple());
+ continue;
+ }
+ catch (MyRetClass)
+ {
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr52727.C b/gcc/testsuite/g++.dg/opt/pr52727.C
index 4dd38530a0..ed8b973ff6 100644
--- a/gcc/testsuite/g++.dg/opt/pr52727.C
+++ b/gcc/testsuite/g++.dg/opt/pr52727.C
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-g -Os" }
+// { dg-additional-options "-march=i686" { target ia32 } }
int grow (int);
void fn (int);
diff --git a/gcc/testsuite/g++.dg/opt/pr55081.C b/gcc/testsuite/g++.dg/opt/pr55081.C
new file mode 100644
index 0000000000..b4f533e5a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55081.C
@@ -0,0 +1,17 @@
+// PR c++/55081
+// { dg-do compile }
+
+struct R { int field; } r;
+
+__UINTPTR_TYPE__ *
+foo ()
+{
+ static __UINTPTR_TYPE__ array[] = {
+ sizeof (char),
+ (reinterpret_cast <__UINTPTR_TYPE__>(&r.field)
+ - reinterpret_cast <__UINTPTR_TYPE__>(&r)) + 1
+ };
+ return array;
+}
+
+// { dg-final { scan-assembler-not "_ZGVZ3foovE5array" } }
diff --git a/gcc/testsuite/g++.dg/opt/pr55137.C b/gcc/testsuite/g++.dg/opt/pr55137.C
new file mode 100644
index 0000000000..73f8092af2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55137.C
@@ -0,0 +1,4 @@
+// PR c++/55137
+// { dg-do compile }
+
+enum E { F = -1 + (int) (sizeof (int) - 1) };
diff --git a/gcc/testsuite/g++.dg/opt/pr55281.C b/gcc/testsuite/g++.dg/opt/pr55281.C
new file mode 100644
index 0000000000..7076a19c83
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55281.C
@@ -0,0 +1,17 @@
+// PR tree-optimization/55281
+// { dg-do compile }
+// { dg-options "-Ofast" }
+
+typedef float VF __attribute__((vector_size (16)));
+
+VF x;
+
+void
+foo (void)
+{
+ VF a, b, c;
+ a = (VF) { 1.0, 2.0, 3.0, 4.0 };
+ b = (VF) { 5.0, 6.0, 7.0, 8.0 };
+ c = (VF) { 0.0, 0.0, 0.0, 0.0 };
+ x = c == ((VF) { 0.0, 0.0, 0.0, 0.0 }) ? a : b;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr55329.C b/gcc/testsuite/g++.dg/opt/pr55329.C
new file mode 100644
index 0000000000..3646785d12
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55329.C
@@ -0,0 +1,73 @@
+// PR tree-optimization/55329
+// { dg-do compile }
+// { dg-options "-O -fno-guess-branch-probability -fnon-call-exceptions --param=early-inlining-insns=111" }
+
+void *f1 ();
+void f2 (void *);
+void f3 ();
+static inline void *
+f4 ()
+{
+ void *p = f1 ();
+ if (!p)
+ f3 ();
+ return p;
+}
+
+struct A
+{
+ int *a;
+ A ();
+ ~A () { a3 (); }
+ int a1 (int * p) { if (!p) f3 (); f2 (p); }
+ int *a2 ();
+ void a3 () { if (*a) a1 (a); }
+ int a4 (int x) { if (*a) f4 (); *a2 () += x; }
+};
+
+struct B : A
+{
+ ~B () { a3 (); }
+};
+
+template <class T>
+struct C
+{
+ T *c;
+ C ();
+ int c1 () { return *(int *) f4 (); }
+ ~C () { if (c1 ()) for (T *t = c + c2 (); t != c; t--) T (); }
+ int c2 ();
+};
+
+class D
+{
+ C <C <int> > c;
+};
+
+struct E
+{
+ int *e;
+ ~E () { delete e; }
+};
+
+struct F
+{
+ int *f1 ();
+ D f2;
+ E f3;
+ F () { f4 (); }
+};
+
+struct G : F
+{
+ B g;
+ G () { g.a4 (*g1 ()->f1 ()); g1 ()->f1 (); }
+ F *g1 ();
+};
+
+void
+foo ()
+{
+ G g;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr55717.C b/gcc/testsuite/g++.dg/opt/pr55717.C
new file mode 100644
index 0000000000..7b3af589ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr55717.C
@@ -0,0 +1,107 @@
+// PR debug/55717
+// { dg-do compile }
+// { dg-options "-O -g" }
+
+struct DebugOnly {};
+template <class T>
+struct StripConst { typedef T result; };
+class TempAllocPolicy {};
+template <class T>
+class HashTableEntry
+{
+ unsigned keyHash;
+ template <class, class, class>
+ friend class HashTable;
+ T t;
+ void setLive (unsigned hn) { keyHash = hn; }
+};
+template <class T, class HashPolicy, class>
+struct HashTable
+{
+ typedef typename HashPolicy::KeyType Key;
+ typedef typename HashPolicy::Lookup Lookup;
+ typedef HashTableEntry <T> Entry;
+ struct Range
+ {
+ Range () {}
+ Entry *cur, end;
+ bool empty () { return false; }
+ T front () { return T (); }
+ };
+ struct Enum : public Range
+ {
+ HashTable table;
+ bool removed;
+ template <class Map>
+ Enum (Map map) : Range (map.all ()), table (map.impl), removed () {}
+ void rekeyFront (Lookup l, Key)
+ {
+ T t = this->cur->t;
+ table.putNewInfallible (l, t);
+ }
+ void rekeyFront (Key k)
+ {
+ rekeyFront (k, k);
+ }
+ };
+ unsigned entryCount;
+ unsigned sCollisionBit;
+ unsigned prepareHash (Lookup l)
+ {
+ unsigned keyHash (HashPolicy::hash (l));
+ return keyHash & sCollisionBit;
+ }
+ static Entry *entryp;
+ Entry *findFreeEntry (unsigned) { return entryp; }
+ void putNewInfallible (Lookup l, T)
+ {
+ unsigned keyHash = prepareHash (l);
+ Entry *entry = findFreeEntry (keyHash);
+ entry->setLive (keyHash);
+ entryCount++;
+ }
+};
+template <class Key>
+struct HashMapEntry { Key key; };
+template <class Key, class Value, class HashPolicy = DebugOnly, class AllocPolicy = TempAllocPolicy>
+struct HashMap
+{
+ typedef HashMapEntry <Key> Entry;
+ struct MapHashPolicy : HashPolicy
+ {
+ typedef Key KeyType;
+ };
+ typedef HashTable <Entry, MapHashPolicy, AllocPolicy> Impl;
+ Impl impl;
+ typedef typename Impl::Range Range;
+ Range all () { return Range (); }
+ typedef typename Impl::Enum Enum;
+};
+class FreeOp;
+struct AllocationSiteKey;
+typedef HashMap <AllocationSiteKey, DebugOnly, AllocationSiteKey, TempAllocPolicy> AllocationSiteTable;
+struct TypeCompartment
+{
+ AllocationSiteTable *allocationSiteTable;
+ void sweep (FreeOp *);
+};
+struct JSScript { unsigned *code; };
+bool IsScriptMarked (JSScript **);
+struct AllocationSiteKey
+{
+ JSScript *script;
+ unsigned offset : 24;
+ int kind;
+ typedef AllocationSiteKey Lookup;
+ static unsigned hash (AllocationSiteKey key) { return (long (key.script->code + key.offset)) ^ key.kind; }
+};
+void
+TypeCompartment::sweep (FreeOp *)
+{
+ for (AllocationSiteTable::Enum e (*allocationSiteTable); !e.empty ();)
+ {
+ AllocationSiteKey key = e.front ().key;
+ IsScriptMarked (&key.script);
+ e.rekeyFront (key);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr56381.C b/gcc/testsuite/g++.dg/opt/pr56381.C
new file mode 100644
index 0000000000..00e5495a3e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr56381.C
@@ -0,0 +1,156 @@
+// PR tree-optimization/56381
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2 -w" }
+
+template <class>
+class intrusive_ptr {};
+class BasicReferenceCounted
+{
+};
+template <class T>
+class ReferenceCountingPointer : intrusive_ptr <T>
+{
+};
+typedef BasicReferenceCounted ReferenceCountedInConditions;
+class PointTag;
+template <typename T, typename>
+struct PreciseFloatType
+{
+ typedef T Type;
+};
+template <typename T, int N>
+struct ExtVecTraits
+{
+ typedef T __attribute__ ((vector_size (N * sizeof (T)))) type;
+};
+template <typename T, int N>
+using ExtVec = typename ExtVecTraits <T, N>::type;
+template <typename T> using Vec4 = ExtVec <T, 4>;
+template <typename Vec>
+Vec cross3 (Vec x, Vec y)
+{
+ Vec x1200 = (Vec) { x[2], x[0] };
+ Vec y2010 { y[2], y[0], y[1], y[0] };
+ Vec x2010 = (Vec) { x[2], x[0], x[1], x[0] };
+ Vec y1200 = (Vec) { y[1], y[0] };
+ return x1200 * y2010 - x2010 * y1200;
+}
+template <typename T>
+struct Rot3
+{
+ typedef Vec4 <T> Vec;
+ Vec axis[3];
+};
+class Basic2DVector
+{
+};
+template <typename T>
+struct Basic3DVector
+{
+ typedef Vec4 <T> MathVector;
+ Basic3DVector (MathVector iv) : v { (iv[0]), (iv[1]), (iv[2]), (iv[3]) } {}
+ T mag2 () {}
+ Basic3DVector unit ()
+ {
+ T my_mag = mag2 ();
+ return (my_mag) ? (*this) * (T () / (my_mag)) : *this;
+ }
+ Basic3DVector
+ cross (Basic3DVector lh) { return cross3 (v, lh.v); }
+ Vec4 <T> v;
+};
+template <class T>
+Basic3DVector <T> operator * (Basic3DVector <T>, T);
+template <class T, class, class>
+struct PV3DBase
+{
+ typedef Basic3DVector <T> BasicVectorType;
+ template <class U>
+ PV3DBase (Basic3DVector <U> v) : theVector (v) {}
+ BasicVectorType basicVector () { return theVector; }
+ T x ();
+ T y ();
+ BasicVectorType theVector;
+};
+class VectorTag;
+template <class T, class FrameTag>
+struct Vector3DBase:public PV3DBase <T, VectorTag, FrameTag>
+{
+ typedef PV3DBase <T, VectorTag, FrameTag> BaseClass;
+ template <class U>
+ Vector3DBase (Basic3DVector <U> v) : BaseClass (v) {}
+ Vector3DBase unit () { return (this->basicVector ().unit ()); }
+ template <class U>
+ Vector3DBase <typename PreciseFloatType <T, U>::Type, FrameTag> cross (Vector3DBase <U, FrameTag> v)
+ {
+ return (this->theVector.cross (v.basicVector ()));
+ }
+};
+template <class T, class FrameTag>
+class Point3DBase : public PV3DBase <T, PointTag, FrameTag>
+{
+};
+template <typename T, typename U, class Frame>
+Vector3DBase <typename PreciseFloatType <T, U>::Type, Frame> operator - (Point3DBase <T, Frame>, Point3DBase <U, Frame>);
+class GlobalTag;
+template <class T>
+struct TkRotation
+{
+ typedef Vector3DBase <T, GlobalTag> GlobalVector;
+ TkRotation (GlobalVector aX, GlobalVector aY)
+ {
+ GlobalVector uX = aX.unit ();
+ GlobalVector uY = aY.unit ();
+ GlobalVector uZ (uX.cross (uY));
+ rot.axis[2] = uZ.basicVector ().v;
+ }
+ Basic3DVector <T> z ();
+ Rot3 <T> rot;
+};
+template <class T>
+struct GloballyPositioned
+{
+ typedef Point3DBase <T, GlobalTag> PositionType;
+ typedef TkRotation <T> RotationType;
+ typedef Point3DBase <T, GlobalTag> GlobalPoint;
+ typedef Vector3DBase <T, GlobalTag> GlobalVector;
+ T iniPhi () { return 999.9978; }
+ GloballyPositioned (PositionType pos, RotationType rot) : thePos (pos), theRot (rot) { resetCache (); }
+ PositionType position () const;
+ RotationType rotation () const;
+ PositionType thePos;
+ RotationType theRot;
+ void resetCache ()
+ {
+ if ((thePos.x () == 0.) && (thePos.y () == 0.))
+ thePhi = 0.;
+ else
+ thePhi = iniPhi ();
+ }
+ T thePhi;
+};
+class Plane;
+using TangentPlane = Plane;
+struct Surface : public GloballyPositioned <float>, ReferenceCountedInConditions
+{
+ typedef GloballyPositioned <float> Base;
+ Surface (PositionType pos, RotationType rot):
+ Base (pos, rot) {}
+};
+struct Plane : Surface
+{
+ template <typename ... Args>
+ Plane (Args ... args):
+ Surface ((args) ...) {}
+};
+class Cylinder : Surface
+{
+ void tangentPlane (const GlobalPoint &) const;
+};
+void
+Cylinder::tangentPlane (const GlobalPoint & aPoint) const
+{
+ GlobalVector yPlane (rotation ().z ());
+ GlobalVector xPlane (yPlane.cross (aPoint - position ()));
+ new TangentPlane (aPoint, RotationType (xPlane, yPlane));
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr56999.C b/gcc/testsuite/g++.dg/opt/pr56999.C
new file mode 100644
index 0000000000..8d89ffa169
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr56999.C
@@ -0,0 +1,189 @@
+// PR rtl-optimization/56999
+// { dg-do run }
+// { dg-options "-O2" }
+// { dg-additional-options "-fpic" { target fpic } }
+// { dg-additional-options "-march=i686 -mtune=atom" { target ia32 } }
+// { dg-require-visibility "" }
+
+extern "C" void abort (void);
+extern "C" void exit (int);
+volatile bool do_exit = true;
+struct JSScript;
+struct JITScript { int i; };
+#pragma GCC visibility push(hidden)
+typedef struct JSCompartment JSCompartment;
+typedef struct JSContext JSContext;
+namespace js
+{
+ struct ContextFriendFields
+ {
+ JSCompartment *compartment;
+ };
+ struct TempAllocPolicy
+ {
+ };
+ template <class T>
+ struct Vector
+ {
+ T *mBegin;
+ T *begin () { return mBegin; }
+ T & operator[] (unsigned i) { return begin ()[i]; }
+ template <class U>
+ __attribute__((noinline, noclone))
+ bool append (U) { asm volatile ("" : : : "memory"); if (do_exit) abort (); return false; }
+ };
+ namespace types
+ {
+ struct TypeCompartment;
+ }
+ namespace mjit
+ {
+ }
+ namespace ion
+ {
+ struct IonScript;
+ }
+ namespace types
+ {
+ struct CompilerOutput
+ {
+ enum Kind { MethodJIT, ParallelIon };
+ JSScript *script;
+ unsigned kindInt : 2;
+ bool constructing : 1;
+ bool barriers : 1;
+ bool pendingRecompilation : 1;
+ Kind kind () const { return static_cast <Kind> (kindInt); }
+ bool isValid () const;
+ };
+ struct RecompileInfo
+ {
+ unsigned outputIndex;
+ CompilerOutput *compilerOutput (TypeCompartment & types) const;
+ CompilerOutput *compilerOutput (JSContext *cx) const;
+ };
+ struct TypeCompartment
+ {
+ Vector <CompilerOutput> *constrainedOutputs;
+ Vector <RecompileInfo> *pendingRecompiles;
+ void addPendingRecompile (JSContext *cx, const RecompileInfo & info);
+ };
+ }
+}
+struct JSScript
+{
+ struct JITScriptHandle
+ {
+ static volatile JITScript *UNJITTABLE __attribute__((visibility ("default")));
+ JITScript *value;
+ bool isValid () { return value != UNJITTABLE; }
+ JITScript *getValid () { return value; }
+ };
+ struct JITScriptSet
+ {
+ JITScriptHandle jitHandleNormal, jitHandleNormalBarriered;
+ JITScriptHandle jitHandleCtor, jitHandleCtorBarriered;
+ JITScriptHandle jitNull1, jitNull2;
+ };
+ JITScriptSet *mJITInfo;
+ void *ion;
+ JITScriptHandle *jitHandle (bool constructing, bool barriers)
+ {
+ return constructing ? (barriers ? &mJITInfo->jitHandleCtorBarriered
+ : &mJITInfo->jitHandleCtor)
+ : (barriers ? &mJITInfo->jitHandleNormalBarriered
+ : &mJITInfo->jitHandleNormal);
+ }
+ JITScript *getJIT (bool constructing, bool barriers)
+ {
+ JITScriptHandle *jith = jitHandle (constructing, barriers);
+ return jith->isValid () ? jith->getValid () : __null;
+ }
+};
+struct JSContext : js::ContextFriendFields
+{
+};
+namespace js
+{
+ __attribute__((noinline, noclone))
+ void CancelOffThreadIonCompile (JSCompartment *, JSScript *)
+ {
+ if (do_exit)
+ exit (0);
+ }
+}
+struct JSCompartment
+{
+ js::types::TypeCompartment types;
+};
+namespace js
+{
+ namespace types
+ {
+ inline bool CompilerOutput::isValid () const
+ {
+ if (!script)
+ return false;
+ switch (kind ())
+ {
+ case MethodJIT:
+ {
+ JITScript *jit = script->getJIT (constructing, barriers);
+ if (!jit)
+ return false;
+ }
+ case ParallelIon:
+ return true;
+ }
+ return false;
+ }
+ inline CompilerOutput *RecompileInfo::compilerOutput (TypeCompartment & types) const
+ {
+ return &(*types.constrainedOutputs)[outputIndex];
+ }
+ inline CompilerOutput *RecompileInfo::compilerOutput (JSContext *cx) const
+ {
+ return compilerOutput (cx->compartment->types);
+ }
+ }
+}
+using namespace js::types;
+__attribute__((noinline, noclone)) void
+TypeCompartment::addPendingRecompile (JSContext *cx, const RecompileInfo & info)
+{
+ CompilerOutput *co = info.compilerOutput (cx);
+ if (co->pendingRecompilation)
+ if (co->isValid ())
+ CancelOffThreadIonCompile (cx->compartment, co->script);
+ if (co->isValid ())
+ pendingRecompiles->append (info);
+}
+volatile JITScript *JSScript::JITScriptHandle::UNJITTABLE;
+#pragma GCC visibility pop
+int
+main ()
+{
+ JSContext cx;
+ JSCompartment com;
+ RecompileInfo info;
+ cx.compartment = &com;
+ info.outputIndex = 0;
+ js::Vector<CompilerOutput> v;
+ JITScript js;
+ JSScript::JITScriptSet set;
+ __builtin_memset (&set, 0, sizeof set);
+ set.jitHandleCtor.value = &js;
+ JSScript s;
+ s.mJITInfo = &set;
+ CompilerOutput co;
+ co.kindInt = 0;
+ co.constructing = true;
+ co.barriers = false;
+ co.pendingRecompilation = true;
+ co.script = &s;
+ v.mBegin = &co;
+ com.types.constrainedOutputs = &v;
+ com.types.pendingRecompiles = __null;
+ com.types.addPendingRecompile (&cx, info);
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr57411.C b/gcc/testsuite/g++.dg/opt/pr57411.C
new file mode 100644
index 0000000000..9c99ee0619
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr57411.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+// { dg-options "-O -fno-tree-dce -ftree-vectorize" }
+
+static inline void
+iota (int *__first, int *__last, int __value)
+{
+ for (; __first != __last; ++__first)
+ {
+ *__first = __value;
+ }
+}
+
+void assert_fail ();
+
+int A[] = { 0, 0, 0 };
+
+void
+test01 (int equal)
+{
+ iota (A, A + 3, 1);
+ if (equal)
+ assert_fail ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr57661.C b/gcc/testsuite/g++.dg/opt/pr57661.C
new file mode 100644
index 0000000000..9573663afc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr57661.C
@@ -0,0 +1,76 @@
+// PR tree-optimization/57661
+// { dg-do compile { target c++11 } }
+// { dg-options "-O2 -fno-tree-forwprop" }
+
+template <typename>
+struct A
+{
+ ~A () {}
+};
+template <typename _Tp>
+using B = A <_Tp>;
+template <typename _Tp>
+class C : B <_Tp> {};
+namespace N { enum D { d }; }
+template <class>
+struct E
+{
+ ~E ();
+};
+template <class, class V>
+struct F : V {};
+template <class U, class V>
+struct G : F <U, V>
+{
+ N::D g1;
+ void g2 ();
+ void g3 ();
+ void g4 () { g3 (); }
+ static void g5 (G *__t) { __t->g4 (); }
+};
+template <class U, class V>
+struct H : G <U, V>
+{
+ E <U> *h1;
+ bool h2;
+ ~H () throw ()
+ {
+ this->g2 ();
+ if (h2)
+ delete h1;
+ }
+};
+template <class U, class V>
+struct I : H <U, V>, E <U>
+{
+ G <U, V> *i;
+ ~I () throw ()
+ {
+ i->g4 ();
+ }
+};
+struct J
+{
+ typedef C <char> j1;
+ typedef G <char, C <char>> j2;
+ J ();
+ j2 *j3;
+};
+struct K : J
+{
+ typedef G <char, C <char>> j2;
+ K () { j2::g5 (this->j3); }
+};
+template <class U, class V>
+void G <U, V>::g3 ()
+{
+ switch (g1)
+ {
+ case N::d:
+ {
+ I <U, V> *q = (I <U, V> *) this;
+ q->I <U, V>::~I ();
+ }
+ }
+}
+K r;
diff --git a/gcc/testsuite/g++.dg/opt/pr58006.C b/gcc/testsuite/g++.dg/opt/pr58006.C
new file mode 100644
index 0000000000..fd3b7bebd8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr58006.C
@@ -0,0 +1,22 @@
+// PR tree-optimization/58006
+// { dg-do compile }
+// { dg-require-effective-target pthread }
+// { dg-options "-Ofast -ftree-parallelize-loops=2" }
+
+extern "C" float sqrtf (float);
+
+struct S
+{
+ float i, j;
+ float foo () const { return sqrtf (i * i + j * j); }
+ S () : i (1), j (1) {}
+};
+
+void
+bar (int a, int b)
+{
+ int i;
+ float f;
+ for (i = a; i < b; i++)
+ f = S ().foo ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr58165.C b/gcc/testsuite/g++.dg/opt/pr58165.C
new file mode 100644
index 0000000000..d758e37005
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr58165.C
@@ -0,0 +1,14 @@
+// PR tree-optimization/58165
+// { dg-do compile }
+// { dg-options "-O2" }
+
+extern "C" float sqrtf (float);
+
+struct A { A (); ~A (); };
+
+void
+foo (double d)
+{
+ A a;
+ sqrtf (d);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr58864.C b/gcc/testsuite/g++.dg/opt/pr58864.C
new file mode 100644
index 0000000000..b8587f298a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr58864.C
@@ -0,0 +1,21 @@
+// PR target/58864
+// { dg-do compile }
+// { dg-options "-Os" }
+// { dg-additional-options "-march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+
+struct A { A (); ~A (); };
+struct B { B (); };
+
+float d, e;
+
+void
+foo ()
+{
+ A a;
+ float c = d;
+ while (1)
+ {
+ B b;
+ e = c ? -c : 0;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59470.C b/gcc/testsuite/g++.dg/opt/pr59470.C
new file mode 100644
index 0000000000..4698ab717d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59470.C
@@ -0,0 +1,188 @@
+// PR middle-end/59470
+// { dg-do run }
+// { dg-options "-O2 -fstack-protector" }
+// { dg-additional-options "-fPIC" { target fpic } }
+// { dg-require-effective-target fstack_protector }
+
+struct A
+{
+ int a1;
+ A () throw () : a1 (0) {}
+};
+
+struct B
+{
+ unsigned int b1 () throw ();
+};
+
+__attribute__((noinline, noclone)) unsigned int
+B::b1 () throw ()
+{
+ asm volatile ("" : : : "memory");
+ return 0;
+}
+
+struct C
+{
+ const A **c1;
+ void c2 (const A *, unsigned int);
+};
+
+__attribute__((noinline, noclone)) void
+C::c2 (const A *, unsigned int)
+{
+ asm volatile ("" : : : "memory");
+}
+
+struct D
+{
+ C *d1;
+};
+
+struct E
+{
+ int e1;
+ int e2;
+ D e3;
+};
+
+struct F
+{
+ virtual int f1 (const char * s, int n);
+};
+
+struct G
+{
+ F *g1;
+ bool g2;
+ G & g3 (const char * ws, int len)
+ {
+ if (__builtin_expect (!g2, true)
+ && __builtin_expect (this->g1->f1 (ws, len) != len, false))
+ g2 = true;
+ return *this;
+ }
+};
+
+struct H : public A
+{
+ const char *h1;
+ unsigned int h2;
+ bool h3;
+ const char *h4;
+ char h5;
+ char h6;
+ char h7[31];
+ bool h8;
+ H () : h1 (0), h2 (0), h4 (0), h5 (0), h6 (0), h8 (false) {}
+ void h9 (const D &) __attribute__((noinline, noclone));
+};
+
+void
+H::h9 (const D &)
+{
+ h3 = true;
+ __builtin_memset (h7, 0, sizeof (h7));
+ asm volatile ("" : : : "memory");
+};
+
+B b;
+
+inline const H *
+foo (const D &x)
+{
+ const unsigned int i = b.b1 ();
+ const A **j = x.d1->c1;
+ if (!j[i])
+ {
+ H *k = 0;
+ try
+ {
+ k = new H;
+ k->h9 (x);
+ }
+ catch (...)
+ {
+ }
+ x.d1->c2 (k, i);
+ }
+ return static_cast <const H *>(j[i]);
+}
+
+__attribute__((noinline, noclone)) int
+bar (char *x, unsigned long v, const char *y, int z, bool w)
+{
+ asm volatile ("" : : "r" (x), "r" (v), "r" (y) : "memory");
+ asm volatile ("" : : "r" (z), "r" (w) : "memory");
+ return 8;
+}
+
+__attribute__((noinline, noclone)) void
+baz (void *z, const char *g, unsigned int h, char s, E &e, char *n, char *c, int &l)
+{
+ asm volatile ("" : : "r" (z), "r" (g), "r" (h) : "memory");
+ asm volatile ("" : : "r" (s), "r" (&e), "r" (n) : "memory");
+ asm volatile ("" : : "r" (c), "r" (&l) : "memory");
+ if (n == c)
+ __builtin_abort ();
+ int i = 0;
+ asm ("" : "+r" (i));
+ if (i == 0)
+ __builtin_exit (0);
+}
+
+__attribute__((noinline, noclone)) G
+test (void *z, G s, E &x, char, long v)
+{
+ const D &d = x.e3;
+ const H *h = foo (d);
+ const char *q = h->h7;
+ const int f = x.e2;
+ const int i = 5 * sizeof (long);
+ char *c = static_cast <char *>(__builtin_alloca (i));
+ const int b = f & 74;
+ const bool e = (b != 64 && b != 8);
+ const unsigned long u = ((v > 0 || !e) ? (unsigned long) v : -(unsigned long) v);
+ int l = bar (c + i, u, q, f, e);
+ c += i - l;
+ if (h->h3)
+ {
+ char *c2 = static_cast <char *>(__builtin_alloca ((l + 1) * 2));
+ baz (z, h->h1, h->h2, h->h6, x, c2 + 2, c, l);
+ c = c2 + 2;
+ }
+ if (__builtin_expect (e, true))
+ {
+ }
+ else if ((f & 4096) && v)
+ {
+ {
+ const bool m = f & 176;
+ *--c = q[m];
+ *--c = q[1];
+ }
+ }
+ const int w = x.e1;
+ if (w > l)
+ {
+ char * c3 = static_cast <char *>(__builtin_alloca (w));
+ c = c3;
+ }
+ return s.g3 (c, l);
+}
+
+int
+main ()
+{
+ H h;
+ const A *j[1];
+ C c;
+ G g;
+ E e;
+ h.h9 (e.e3);
+ j[0] = &h;
+ c.c1 = j;
+ e.e3.d1 = &c;
+ test (0, g, e, 0, 0);
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59622-2.C b/gcc/testsuite/g++.dg/opt/pr59622-2.C
new file mode 100644
index 0000000000..8096eebca4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59622-2.C
@@ -0,0 +1,21 @@
+// PR tree-optimization/59622
+// { dg-do compile }
+// { dg-options "-O2" }
+
+namespace
+{
+ struct A
+ {
+ A () {}
+ virtual A *bar (int) = 0;
+ A *baz (int x) { return bar (x); }
+ };
+}
+
+A *a;
+
+void
+foo ()
+{
+ a->baz (0);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59622-3.C b/gcc/testsuite/g++.dg/opt/pr59622-3.C
new file mode 100644
index 0000000000..0af86050c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59622-3.C
@@ -0,0 +1,21 @@
+// PR tree-optimization/59622
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct C { int a; int b; };
+
+namespace
+{
+ struct A
+ {
+ virtual C foo ();
+ C bar () { return foo (); }
+ };
+}
+
+C
+baz ()
+{
+ A a;
+ return a.bar ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59622-4.C b/gcc/testsuite/g++.dg/opt/pr59622-4.C
new file mode 100644
index 0000000000..f72af1641c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59622-4.C
@@ -0,0 +1,23 @@
+// PR tree-optimization/59622
+// { dg-do compile }
+// { dg-options "-O2" }
+
+struct C { int a; int b; };
+
+namespace
+{
+ struct A
+ {
+ A () {}
+ virtual C bar (int) = 0;
+ C baz (int x) { return bar (x); }
+ };
+}
+
+A *a;
+
+C
+foo ()
+{
+ return a->baz (0);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59622-5.C b/gcc/testsuite/g++.dg/opt/pr59622-5.C
new file mode 100644
index 0000000000..bcb2591a64
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59622-5.C
@@ -0,0 +1,26 @@
+// PR tree-optimization/59622
+// { dg-do compile }
+// { dg-options "-O2" }
+
+namespace
+{
+ struct A
+ {
+ A () {}
+ virtual A *bar (int);
+ A *baz (int x) { return bar (x); }
+ };
+
+ __attribute__((noreturn)) A *A::bar (int)
+ {
+ __builtin_exit (0);
+ }
+}
+
+A *a;
+
+void
+foo ()
+{
+ a->baz (0);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59622.C b/gcc/testsuite/g++.dg/opt/pr59622.C
new file mode 100644
index 0000000000..1d8e9986c5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59622.C
@@ -0,0 +1,19 @@
+// PR tree-optimization/59622
+// { dg-do compile }
+// { dg-options "-O2" }
+
+namespace
+{
+ struct A
+ {
+ virtual int foo ();
+ int bar () { return foo (); }
+ };
+}
+
+int
+baz ()
+{
+ A a;
+ return a.bar ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59647.C b/gcc/testsuite/g++.dg/opt/pr59647.C
new file mode 100644
index 0000000000..1fc5067d83
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59647.C
@@ -0,0 +1,32 @@
+// PR rtl-optimization/59647
+// { dg-do compile }
+// { dg-options "-O2 -fno-tree-vrp" }
+// { dg-additional-options "-msse2 -mfpmath=sse" { target { { i?86-*-* x86_64-*-* } && ia32 } } }
+
+void f1 (int);
+void f2 ();
+double f3 (int);
+
+struct A
+{
+ int f4 () const
+ {
+ if (a == 0)
+ return 1;
+ return 0;
+ }
+ unsigned f5 ()
+ {
+ if (!f4 ())
+ f2 ();
+ return a;
+ }
+ int a;
+};
+
+void
+f6 (A *x)
+{
+ unsigned b = x->f5 ();
+ f1 (b - 1 - f3 (x->f5 () - 1U));
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr59947.C b/gcc/testsuite/g++.dg/opt/pr59947.C
new file mode 100644
index 0000000000..71c51b226c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr59947.C
@@ -0,0 +1,34 @@
+// PR ipa/59947
+// { dg-do compile { target c++11 } }
+// { dg-options "-O0" }
+
+#pragma GCC optimize ("O2")
+template <typename T>
+inline void
+foo (T & a) noexcept { T tmp = static_cast <T &&> (a); };
+struct A
+{
+ A () noexcept : a (1), b (1) {}
+ virtual void c () noexcept = 0;
+ void d () noexcept { c (); }
+ int a;
+ int b;
+};
+struct B
+{
+ ~B () noexcept { e->d (); }
+ A *e;
+};
+template <typename T>
+struct C
+{
+ B f;
+};
+struct D {};
+template <typename T>
+struct E
+{
+ void bar () { foo (g); }
+ C <D> g;
+};
+template class E <char>;
diff --git a/gcc/testsuite/g++.dg/opt/pr60002.C b/gcc/testsuite/g++.dg/opt/pr60002.C
new file mode 100644
index 0000000000..753f579dd9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr60002.C
@@ -0,0 +1,12 @@
+// PR tree-optimization/60002
+// { dg-do compile }
+// { dg-options "-O2 -fcompare-debug -fdeclone-ctor-dtor -fipa-cp-clone" }
+
+struct A {};
+
+struct B : virtual A { B (); ~B (); };
+
+B::~B ()
+{
+ B ();
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr60597.C b/gcc/testsuite/g++.dg/opt/pr60597.C
new file mode 100644
index 0000000000..c61f767976
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr60597.C
@@ -0,0 +1,46 @@
+// PR middle-end/60597
+// { dg-do compile }
+// { dg-options "-O2 -g" }
+
+struct A
+{
+ int foo () const;
+ int bar () const;
+ int a;
+};
+
+struct B
+{
+ int foo ();
+ int bar ();
+};
+
+int *c, d;
+
+int
+A::foo () const
+{
+ int b = a >> 16;
+ return b;
+}
+
+int
+A::bar () const
+{
+ int b = a;
+ return b;
+}
+
+void
+baz (A &x, B h, int i, int j)
+{
+ for (; i < h.bar (); ++i)
+ for (; h.foo (); ++j)
+ {
+ int g = x.foo ();
+ int f = x.bar ();
+ int e = c[0] & 1;
+ d = (e << 1) | (g << 16) | (f & 1);
+ c[j] = 0;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr60849.C b/gcc/testsuite/g++.dg/opt/pr60849.C
new file mode 100644
index 0000000000..52d8826b0c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr60849.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-O2" }
+
+int g;
+
+extern "C" int isnan ();
+
+void foo(float a) {
+ int (*xx)(...);
+ xx = isnan;
+ if (xx(a))
+ g++;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr60912.C b/gcc/testsuite/g++.dg/opt/pr60912.C
new file mode 100644
index 0000000000..ad51ba7257
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr60912.C
@@ -0,0 +1,18 @@
+// { dg-do run }
+// { dg-options "-O -fno-inline -fipa-pta" }
+
+struct IFoo
+{
+ virtual void Foo () = 0;
+};
+
+struct Bar:IFoo
+{
+ void Foo () {}
+};
+
+int main ()
+{
+ (new Bar ())->Foo ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr61456.C b/gcc/testsuite/g++.dg/opt/pr61456.C
new file mode 100644
index 0000000000..14a118b572
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr61456.C
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-O2 -std=c++11 -Werror=uninitialized" }
+
+int rand ();
+
+class Funcs
+{
+public:
+ int *f1 ();
+ int *f2 ();
+};
+typedef decltype (&Funcs::f1) pfunc;
+
+static int Set (Funcs * f, const pfunc & fp)
+{
+ (f->*fp) ();
+}
+
+void
+Foo ()
+{
+ pfunc fp = &Funcs::f1;
+ if (rand ())
+ fp = &Funcs::f2;
+ Set (0, fp);
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr61654.C b/gcc/testsuite/g++.dg/opt/pr61654.C
new file mode 100644
index 0000000000..78dc0c14cf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr61654.C
@@ -0,0 +1,27 @@
+// PR middle-end/61654
+// { dg-do compile }
+
+class A
+{
+ virtual int a (int, int = 0) = 0;
+ int b (const int &);
+ int c;
+};
+
+class B : virtual A
+{
+ int d;
+ int a (int, int);
+};
+
+int
+A::b (const int &)
+{
+ return a ('\0');
+}
+
+int
+B::a (int, int)
+{
+ return 0 ? 0 : d;
+}
diff --git a/gcc/testsuite/g++.dg/opt/pr62146.C b/gcc/testsuite/g++.dg/opt/pr62146.C
new file mode 100644
index 0000000000..dbe4174342
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/pr62146.C
@@ -0,0 +1,51 @@
+/* PR rtl-optimization/62146 */
+/* { dg-do compile } */
+/* { dg-options "-O2 " } */
+class F
+{
+public:
+ virtual ~ F ();
+};
+template < class CL > class G:public F
+{
+ int *member_;
+public:
+ G ( int *b): member_ (0)
+ {
+ }
+};
+
+class D
+{
+public:
+ template < class CL > void RegisterNonTagCallback (int,
+ void (CL::
+ *p3) ())
+ {
+ InternalRegisterNonTag (p3 ? new G < CL > ( 0) : 0);
+ } void InternalRegisterNonTag (F *);
+};
+
+void fn1 ();
+class C1
+{
+ void foo();
+ class TokenType
+ {
+ public:
+ void AddToken ()
+ {
+ }
+ };
+ C1::TokenType bar_t;
+};
+D a;
+void C1::foo()
+{
+ if (&bar_t)
+ fn1 ();
+ for (int i = 0; i < sizeof 0; ++i)
+ a.RegisterNonTagCallback (0, &TokenType::AddToken);
+}
+
+/* { dg-final { scan-assembler-not "mov.*_ZN2C19TokenType8AddTokenEv, .\\\(" } } */
diff --git a/gcc/testsuite/g++.dg/opt/typeinfo1.C b/gcc/testsuite/g++.dg/opt/typeinfo1.C
new file mode 100644
index 0000000000..efac4cbd1e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/typeinfo1.C
@@ -0,0 +1,27 @@
+// PR c++/61020
+// { dg-options "-O2" }
+// { dg-do run }
+
+#include <typeinfo>
+
+struct Base {
+ virtual ~Base() { }
+};
+
+struct Derived : public Base {
+};
+
+int compare(const Base& base)
+{
+ return typeid(base) == typeid(typeid(Derived));
+}
+
+int main()
+{
+ Base base;
+ Derived derived;
+
+ if (compare(base)) return 1;
+ if (compare(derived)) return 2;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/opt/value-init1.C b/gcc/testsuite/g++.dg/opt/value-init1.C
new file mode 100644
index 0000000000..1569a822f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/value-init1.C
@@ -0,0 +1,14 @@
+// PR c++/59659
+// { dg-do compile { target c++11 } }
+// { dg-options "-fdump-tree-gimple" }
+// { dg-final { scan-tree-dump-times "i = 0" 0 "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
+
+struct S { S () = default; S (int i); int i; };
+struct A { S s[100]; };
+
+void
+foo ()
+{
+ A a = {{}};
+}
diff --git a/gcc/testsuite/g++.dg/opt/vt2.C b/gcc/testsuite/g++.dg/opt/vt2.C
new file mode 100644
index 0000000000..a77db38755
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/vt2.C
@@ -0,0 +1,24 @@
+// PR c++/34949
+// { dg-options "-O3" }
+// { dg-final { scan-assembler-not "mov\[^\n\]*_ZTV" { target i?86-*-* x86_64-*-* } } }
+
+class Foo
+{
+public:
+ virtual ~Foo();
+};
+
+Foo::~Foo()
+{
+}
+
+
+class Bar : public Foo
+{
+public:
+ virtual ~Bar();
+};
+
+Bar::~Bar()
+{
+}
diff --git a/gcc/testsuite/g++.dg/opt/vt3.C b/gcc/testsuite/g++.dg/opt/vt3.C
new file mode 100644
index 0000000000..0cef67206e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/vt3.C
@@ -0,0 +1,43 @@
+// PR c++/34949
+// { dg-do compile }
+// { dg-options "-O3" }
+
+struct E {};
+struct A
+{
+ virtual void a (void *) = 0;
+};
+struct B
+{
+ virtual ~B () {};
+ unsigned int b1;
+ E **b2;
+ A *b3;
+};
+struct C : public B
+{
+ ~C ();
+};
+C::~C ()
+{
+ for (unsigned int i = 0; i < b1; i++)
+ b3->a (b2);
+}
+struct D
+{
+ ~D () {}
+ C d;
+};
+struct F { virtual ~F () {}; };
+struct G { void g (); };
+struct H : public F
+{
+ virtual ~H ();
+ D *h1;
+ G *h2;
+};
+H::~H ()
+{
+ h2->g ();
+ delete h1;
+}
diff --git a/gcc/testsuite/g++.dg/opt/vt4.C b/gcc/testsuite/g++.dg/opt/vt4.C
new file mode 100644
index 0000000000..c8d04cffc1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/opt/vt4.C
@@ -0,0 +1,31 @@
+// PR c++/50243
+// { dg-do compile }
+// { dg-options "-O" }
+// { dg-final { scan-assembler-not "_ZTV.A" } }
+
+void foo ();
+
+struct A
+{
+ ~A () { }
+ virtual void a () = 0;
+ virtual void b () = 0;
+ virtual void c () = 0;
+};
+
+struct B : public A
+{
+ ~B () { foo (); }
+ void a () { foo (); }
+ void b () { foo (); }
+ void c () { delete this; }
+};
+
+void
+test ()
+{
+ A *y = new B ();
+ y->a ();
+ y->b ();
+ y->c ();
+}
diff --git a/gcc/testsuite/g++.dg/other/PR23205.C b/gcc/testsuite/g++.dg/other/PR23205.C
index a31fc1d773..b05087b542 100644
--- a/gcc/testsuite/g++.dg/other/PR23205.C
+++ b/gcc/testsuite/g++.dg/other/PR23205.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* nios2-*-* tile*-*-* *-*-vxworks } { "*" } { "" } } */
/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types" } */
const int foobar = 4;
diff --git a/gcc/testsuite/g++.dg/other/abstract4.C b/gcc/testsuite/g++.dg/other/abstract4.C
new file mode 100644
index 0000000000..68b2eb27b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/abstract4.C
@@ -0,0 +1,18 @@
+// PR c++/51184
+
+template<typename T>
+struct S { };
+
+template<typename T>
+void foo();
+
+struct Abs
+{
+ virtual void bar() = 0;
+};
+
+int main()
+{
+ S<Abs(int)> s; // { dg-error "abstract" }
+ foo<Abs(int)>(); // { dg-error "abstract" }
+}
diff --git a/gcc/testsuite/g++.dg/other/abstract5.C b/gcc/testsuite/g++.dg/other/abstract5.C
new file mode 100644
index 0000000000..d13dd9e516
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/abstract5.C
@@ -0,0 +1,6 @@
+struct A
+{
+ virtual void f() = 0;
+};
+
+typedef A (*fp)(); // { dg-error "abstract" }
diff --git a/gcc/testsuite/g++.dg/other/abstract6.C b/gcc/testsuite/g++.dg/other/abstract6.C
new file mode 100644
index 0000000000..ceba1a60b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/abstract6.C
@@ -0,0 +1,10 @@
+// PR c++/60532
+
+class A
+{
+ ~A ();
+};
+class B : A
+{
+ virtual void m () = 0;
+};
diff --git a/gcc/testsuite/g++.dg/other/anon-union2.C b/gcc/testsuite/g++.dg/other/anon-union2.C
new file mode 100644
index 0000000000..31bb74fa99
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/anon-union2.C
@@ -0,0 +1,10 @@
+// PR c++/52915
+
+struct S {
+ int val;
+ S(int v) : val(v) {}
+};
+
+void f() {
+ union { S a; }; // { dg-error "constructor|no match" }
+}
diff --git a/gcc/testsuite/g++.dg/other/anon-union3.C b/gcc/testsuite/g++.dg/other/anon-union3.C
new file mode 100644
index 0000000000..94d0aecaf0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/anon-union3.C
@@ -0,0 +1,25 @@
+// PR c++/32054
+
+class C
+{
+ auto union // { dg-error "storage class" "" { target { ! c++11 } } }
+ {
+ int a;
+ }; // { dg-error "multiple|specified" "" { target c++11 } }
+ register union // { dg-error "storage class" }
+ {
+ int b;
+ };
+ static union // { dg-error "storage class" }
+ {
+ int c;
+ };
+ extern union // { dg-error "storage class" }
+ {
+ int d;
+ };
+ mutable union // { dg-error "storage class" }
+ {
+ int e;
+ };
+};
diff --git a/gcc/testsuite/g++.dg/other/anon3.C b/gcc/testsuite/g++.dg/other/anon3.C
index 707c2d58f9..586a40e5ee 100644
--- a/gcc/testsuite/g++.dg/other/anon3.C
+++ b/gcc/testsuite/g++.dg/other/anon3.C
@@ -4,4 +4,4 @@
// { dg-do compile }
-enum { a = 3 } x; // { dg-warning "anonymous type" "" { target c++98 } }
+enum { a = 3 } x; // { dg-warning "anonymous type" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/other/anon4.C b/gcc/testsuite/g++.dg/other/anon4.C
index 571f4ae65f..37df228da9 100644
--- a/gcc/testsuite/g++.dg/other/anon4.C
+++ b/gcc/testsuite/g++.dg/other/anon4.C
@@ -3,6 +3,6 @@
void foo()
{
- int i; // { dg-error "previously" }
+ int i; // { dg-message "previously" }
union { int i; }; // { dg-error "redeclaration" }
}
diff --git a/gcc/testsuite/g++.dg/other/anon5.C b/gcc/testsuite/g++.dg/other/anon5.C
index e8ebe0cc2b..81e9def537 100644
--- a/gcc/testsuite/g++.dg/other/anon5.C
+++ b/gcc/testsuite/g++.dg/other/anon5.C
@@ -1,6 +1,8 @@
// PR c++/34094
-// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* alpha*-dec-osf* mips-sgi-irix* } } } }
+// { dg-do link { target { ! { *-*-darwin* *-*-hpux* *-*-solaris2.* } } } }
// { dg-options "-g" }
+// Ignore additional message on powerpc-ibm-aix
+// { dg-prune-output "obtain more information" } */
namespace {
struct c
@@ -11,7 +13,7 @@ namespace {
const bool &f()
{
- return c::t; // { dg-message "undefined" "undefined" { target *-*-* } 0 }
+ return c::t; // { dg-message "\[Uu\]ndefined" "undefined" { target *-*-* } 0 }
// Some targets report the error for the previous line, others
// don't give line number inforamtion for it, so use line 0.
}
diff --git a/gcc/testsuite/g++.dg/other/anon6.C b/gcc/testsuite/g++.dg/other/anon6.C
new file mode 100644
index 0000000000..2fd094254a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/anon6.C
@@ -0,0 +1,8 @@
+// PR c++/60353
+
+struct A {
+ A(int);
+};
+typedef struct {
+ A format;
+} B;
diff --git a/gcc/testsuite/g++.dg/other/armv7m-1.C b/gcc/testsuite/g++.dg/other/armv7m-1.C
new file mode 100644
index 0000000000..6aa686b10c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/armv7m-1.C
@@ -0,0 +1,69 @@
+/* { dg-do run { target arm*-*-* } } */
+/* Test Armv7m interrupt routines. */
+#include <stdlib.h>
+
+#ifdef __ARM_ARCH_7M__
+void __attribute__((interrupt))
+foo(void)
+{
+ long long n;
+ long p;
+ asm volatile ("" : "=r" (p) : "0" (&n));
+ if (p & 4)
+ abort ();
+ return;
+}
+
+void __attribute__((interrupt))
+bar(void)
+{
+ throw 42;
+}
+
+int main()
+{
+ int a;
+ int before;
+ int after;
+ volatile register int sp asm("sp");
+
+ asm volatile ("mov %0, sp\n"
+ "blx %2\n"
+ "mov %1, sp\n"
+ : "=&r" (before), "=r" (after) : "r" (foo)
+ : "memory", "cc", "r0", "r1", "r2", "r3", "ip", "lr");
+ if (before != after)
+ abort();
+ asm volatile ("mov %0, sp\n"
+ "sub sp, sp, #4\n"
+ "blx %2\n"
+ "add sp, sp, #4\n"
+ "mov %1, sp\n"
+ : "=&r" (before), "=r" (after) : "r" (foo)
+ : "memory", "cc", "r0", "r1", "r2", "r3", "ip", "lr");
+ if (before != after)
+ abort();
+ before = sp;
+ try
+ {
+ bar();
+ }
+ catch (int i)
+ {
+ if (i != 42)
+ abort();
+ }
+ catch (...)
+ {
+ abort();
+ }
+ if (before != sp)
+ abort();
+ exit(0);
+}
+#else
+int main()
+{
+ exit (0);
+}
+#endif
diff --git a/gcc/testsuite/g++.dg/other/crash-6.C b/gcc/testsuite/g++.dg/other/crash-6.C
index 2220675dc7..06aea4f589 100644
--- a/gcc/testsuite/g++.dg/other/crash-6.C
+++ b/gcc/testsuite/g++.dg/other/crash-6.C
@@ -1,6 +1,6 @@
// Origin: PR c++/42634
-// { dg-options "-g -std=c++0x" }
-// { dg-do compile }
+// { dg-options "-g" }
+// { dg-do compile { target c++11 } }
template<typename T> T declval();
diff --git a/gcc/testsuite/g++.dg/other/crash-7.C b/gcc/testsuite/g++.dg/other/crash-7.C
index d5bc892c07..d96aeead07 100644
--- a/gcc/testsuite/g++.dg/other/crash-7.C
+++ b/gcc/testsuite/g++.dg/other/crash-7.C
@@ -1,6 +1,6 @@
// Origin: PR c++/42336
-// { dg-options "-std=c++0x -O2 -g" }
-// { dg-do compile }
+// { dg-options "-O2 -g" }
+// { dg-do compile { target c++11 } }
struct X {
void func() {}
diff --git a/gcc/testsuite/g++.dg/other/crash-8.C b/gcc/testsuite/g++.dg/other/crash-8.C
index c260431d5e..dcae7da76c 100644
--- a/gcc/testsuite/g++.dg/other/crash-8.C
+++ b/gcc/testsuite/g++.dg/other/crash-8.C
@@ -1,5 +1,6 @@
// Origin: PR c++/42797
-// { dg-options "-g -O2 -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-g -O2" }
template<typename _Tp, _Tp __v> struct integral_constant {
static const _Tp value = __v;
diff --git a/gcc/testsuite/g++.dg/other/cv_func.C b/gcc/testsuite/g++.dg/other/cv_func.C
index 941cb8d53d..2eb9f039a5 100644
--- a/gcc/testsuite/g++.dg/other/cv_func.C
+++ b/gcc/testsuite/g++.dg/other/cv_func.C
@@ -3,7 +3,7 @@
typedef int FIC(int) const;
typedef int FI(int);
-FIC f; // { dg-error "qualified" }
+FIC f; // { dg-error "cv-qualifier" }
struct S {
FIC f; // OK
diff --git a/gcc/testsuite/g++.dg/other/cv_func3.C b/gcc/testsuite/g++.dg/other/cv_func3.C
new file mode 100644
index 0000000000..0fd47882f2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/cv_func3.C
@@ -0,0 +1,10 @@
+// PR c++/58810
+
+typedef int F() const;
+
+F f; // { dg-error "cv-qualifier" }
+
+struct A
+{
+ friend F f; // { dg-error "cv-qualifier" }
+};
diff --git a/gcc/testsuite/g++.dg/other/darwin-cfstring1.C b/gcc/testsuite/g++.dg/other/darwin-cfstring1.C
index b30ba9bef9..b2def1e858 100644
--- a/gcc/testsuite/g++.dg/other/darwin-cfstring1.C
+++ b/gcc/testsuite/g++.dg/other/darwin-cfstring1.C
@@ -4,7 +4,7 @@
/* Developed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do compile { target *-*-darwin* } } */
-/* { dg-options "-mconstant-cfstrings" } */
+/* { dg-options "-ftrack-macro-expansion=0 -mconstant-cfstrings" } */
#include <CoreFoundation/CFString.h>
diff --git a/gcc/testsuite/g++.dg/other/default5.C b/gcc/testsuite/g++.dg/other/default5.C
index d5bae344c4..87acb765e6 100644
--- a/gcc/testsuite/g++.dg/other/default5.C
+++ b/gcc/testsuite/g++.dg/other/default5.C
@@ -43,5 +43,5 @@ template<int> struct B
void F2(int, int, int = 0);
};
-template<int N> void B<N>::F1(int, int = 0, int) {}
-template<int N> void B<N>::F2(int = 0, int, int) {} // { dg-error "default" }
+template<int N> void B<N>::F1(int, int = 0, int) {} // { dg-error "default arguments" }
+template<int N> void B<N>::F2(int = 0, int, int) {} // { dg-error "default arguments|parameter 2" }
diff --git a/gcc/testsuite/g++.dg/other/default8.C b/gcc/testsuite/g++.dg/other/default8.C
new file mode 100644
index 0000000000..255a661356
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/default8.C
@@ -0,0 +1,43 @@
+// PR c++54485
+
+template<typename T>
+class K1
+{
+ int fn(int, int);
+ int gn(int, int);
+};
+
+template<typename T>
+int K1<T>::fn (int a, int b = 3) // { dg-error "default arguments" }
+{
+ return a - b;
+}
+
+template<typename T>
+int K1<T>::gn (int a = 1, int b = 3) // { dg-error "default arguments" }
+{
+ return a - b;
+}
+
+template<typename T>
+class K2
+{
+ template<typename U>
+ int fn(int, int);
+ template<typename U>
+ int gn(int, int);
+};
+
+template<typename T>
+template<typename U>
+int K2<T>::fn (int a, int b = 3) // { dg-error "default arguments" }
+{
+ return a - b;
+}
+
+template<typename T>
+template<typename U>
+int K2<T>::gn (int a = 1, int b = 3) // { dg-error "default arguments" }
+{
+ return a - b;
+}
diff --git a/gcc/testsuite/g++.dg/other/dump-ada-spec-1.C b/gcc/testsuite/g++.dg/other/dump-ada-spec-1.C
new file mode 100644
index 0000000000..eb249e7985
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/dump-ada-spec-1.C
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-ada-spec" } */
+
+struct S
+{
+ int i;
+};
+
+/* { dg-final { scan-ada-spec "type S is record" } } */
+/* { dg-final { cleanup-ada-spec } } */
diff --git a/gcc/testsuite/g++.dg/other/dump-ada-spec-2.C b/gcc/testsuite/g++.dg/other/dump-ada-spec-2.C
new file mode 100644
index 0000000000..87c183aab6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/dump-ada-spec-2.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-ada-spec" } */
+
+struct S
+{
+ int it;
+ __extension__ unsigned char data[];
+};
+
+/* { dg-final { scan-ada-spec "array \\(0 .. -1\\)" } } */
+/* { dg-final { cleanup-ada-spec } } */
diff --git a/gcc/testsuite/g++.dg/other/enum3.C b/gcc/testsuite/g++.dg/other/enum3.C
new file mode 100644
index 0000000000..23d6c83576
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/enum3.C
@@ -0,0 +1,10 @@
+// PR c++/53848
+
+extern "C"
+{
+ struct s {
+ enum {
+ e = 0
+ } f;
+ };
+}
diff --git a/gcc/testsuite/g++.dg/other/error10.C b/gcc/testsuite/g++.dg/other/error10.C
index 5c17277abb..546a4d65c4 100644
--- a/gcc/testsuite/g++.dg/other/error10.C
+++ b/gcc/testsuite/g++.dg/other/error10.C
@@ -6,10 +6,9 @@ template<int> struct A {};
template<int N>
void foo(const A<N> &a)
-{ -A<N>(a); } // { dg-error "\\(\\* & a\\)" "" }
+{ -A<N>(a); } // { dg-error "operand type is 'A<0>'" }
void bar()
{
foo(A<0>()); // { dg-message "required from here" "" }
}
-
diff --git a/gcc/testsuite/g++.dg/other/error15.C b/gcc/testsuite/g++.dg/other/error15.C
index 3601852322..d218c13bbb 100644
--- a/gcc/testsuite/g++.dg/other/error15.C
+++ b/gcc/testsuite/g++.dg/other/error15.C
@@ -3,39 +3,39 @@
extern void g0 (int a, int b);
extern void g1 (int a, float b);
-extern void f0 (int a, // { dg-error "previous" }
+extern void f0 (int a, // { dg-message "previous" }
int a); // { dg-error "redefinition" }
-extern void f1 (int a, // { dg-error "previous" }
+extern void f1 (int a, // { dg-message "previous" }
float a); // { dg-error "conflicting" }
-extern void f3 (int a, int b, int c, // { dg-error "previous" }
+extern void f3 (int a, int b, int c, // { dg-message "previous" }
int a); // { dg-error "redefinition" }
-extern void f4 (int a, int b, int c, // { dg-error "previous" }
+extern void f4 (int a, int b, int c, // { dg-message "previous" }
int a, // { dg-error "redefinition" }
int a); // { dg-error "redefinition" }
-extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-error "previous" }
+extern void f5 (int a, int b, int c, int d, int e, int f, int g, int h, // { dg-message "previous" }
int a, // { dg-error "redefinition" }
int i, int j, int k, int l, int m, int n, int o, int p,
int q, int r, int s, int t, int u, int v, int w, int x, int y,
int z);
-extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-error "previous" }
+extern void f6 (int a, int, int, int, int, int, int, int, int, int, int, // { dg-message "previous" }
int a, // { dg-error "redefinition" }
int, int, int, int, int, int, int, int, int, int, int,
float, float, float, float, float, float, float, float,
int);
-extern void f7 (void (*a)(int), // { dg-error "previous" }
+extern void f7 (void (*a)(int), // { dg-message "previous" }
void (*a)(int)); // { dg-error "redefinition" }
-extern void f8 (float (*a)(int), // { dg-error "previous" }
+extern void f8 (float (*a)(int), // { dg-message "previous" }
int (*a)(float)); // { dg-error "conflicting" }
-extern void f9 (int a, // { dg-error "previous" }
+extern void f9 (int a, // { dg-message "previous" }
int a, // { dg-error "redefinition" }
int a); // { dg-error "redefinition" }
-extern void f10 (int a, // { dg-error "previous" }
- int b, // { dg-error "previous" }
- int c, // { dg-error "previous" }
+extern void f10 (int a, // { dg-message "previous" }
+ int b, // { dg-message "previous" }
+ int c, // { dg-message "previous" }
int c, // { dg-error "redefinition" }
int b, // { dg-error "redefinition" }
int a); // { dg-error "redefinition" }
@@ -43,7 +43,7 @@ extern void f10 (int a, // { dg-error "previous" }
class C1 {
public:
void C1_g0 (int a, int b);
- void C1_f0 (int a, // { dg-error "previous" }
+ void C1_f0 (int a, // { dg-message "previous" }
int a); // { dg-error "redefinition" }
};
@@ -51,6 +51,6 @@ template <class T>
class C2 {
public:
void C2_g0 (T a, T b);
- void C2_f0 (T a, // { dg-error "previous" }
+ void C2_f0 (T a, // { dg-message "previous" }
T a); // { dg-error "redefinition" }
};
diff --git a/gcc/testsuite/g++.dg/other/error16.C b/gcc/testsuite/g++.dg/other/error16.C
index 1e34647145..38c0fd63fd 100644
--- a/gcc/testsuite/g++.dg/other/error16.C
+++ b/gcc/testsuite/g++.dg/other/error16.C
@@ -10,5 +10,5 @@ typedef Outer<X> XOuter;
int main() {
Outer<int> ab;
- ab.foo() == 1; // { dg-error "ab.Outer" }
+ ab.foo() == 1; // { dg-error "operand types are 'Outer<int>::Inner' and 'int'" }
}
diff --git a/gcc/testsuite/g++.dg/other/error20.C b/gcc/testsuite/g++.dg/other/error20.C
index f3b17aa196..bb7d7b3b07 100644
--- a/gcc/testsuite/g++.dg/other/error20.C
+++ b/gcc/testsuite/g++.dg/other/error20.C
@@ -8,6 +8,6 @@ struct A // { dg-message "operator=|no known conversion" }
void bar (A& a)
{
- a.foo () = 0; // { dg-error "A::foo\\(\\) = 0" }
+ a.foo () = 0; // { dg-error "operand types are 'A' and 'int'" }
// { dg-message "candidate" "candidate note" { target *-*-* } 11 }
}
diff --git a/gcc/testsuite/g++.dg/other/error4.C b/gcc/testsuite/g++.dg/other/error4.C
index bd740d92a3..a5d5e3c7e5 100644
--- a/gcc/testsuite/g++.dg/other/error4.C
+++ b/gcc/testsuite/g++.dg/other/error4.C
@@ -7,7 +7,7 @@
struct Wrapper {};
-void Foo(int const &); // { dg-error "in passing" "" }
+void Foo(int const &); // { dg-message "in passing" "" }
void Baz ()
{
diff --git a/gcc/testsuite/g++.dg/other/error8.C b/gcc/testsuite/g++.dg/other/error8.C
index 9246c2afa5..116a6846c7 100644
--- a/gcc/testsuite/g++.dg/other/error8.C
+++ b/gcc/testsuite/g++.dg/other/error8.C
@@ -5,7 +5,7 @@
void foo(void)
{
- union { int alpha; int beta; }; // { dg-error "previous declaration" }
+ union { int alpha; int beta; }; // { dg-message "previous declaration" }
double alpha; // { dg-error "conflicting declaration" }
}
diff --git a/gcc/testsuite/g++.dg/other/final1.C b/gcc/testsuite/g++.dg/other/final1.C
index 3e02c25216..db513629b6 100644
--- a/gcc/testsuite/g++.dg/other/final1.C
+++ b/gcc/testsuite/g++.dg/other/final1.C
@@ -1,6 +1,6 @@
/* Verify that final methods are devirtualized */
-/* { dg-do compile } */
-/* { dg-options "-fdump-tree-original -std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-fdump-tree-original" } */
struct A final
{
diff --git a/gcc/testsuite/g++.dg/other/final2.C b/gcc/testsuite/g++.dg/other/final2.C
index a07562299d..92e7537964 100644
--- a/gcc/testsuite/g++.dg/other/final2.C
+++ b/gcc/testsuite/g++.dg/other/final2.C
@@ -1,5 +1,6 @@
// PR c++/53186
-// { dg-options "-fdump-tree-original -std=c++11" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fdump-tree-original" }
struct F1
{
diff --git a/gcc/testsuite/g++.dg/other/gc5.C b/gcc/testsuite/g++.dg/other/gc5.C
index a369084e00..00184fc0e0 100644
--- a/gcc/testsuite/g++.dg/other/gc5.C
+++ b/gcc/testsuite/g++.dg/other/gc5.C
@@ -1,6 +1,6 @@
// PR c++/51852
-// { dg-do compile }
-// { dg-options "-std=gnu++11 --param ggc-min-heapsize=0 --param ggc-min-expand=0" }
+// { dg-do compile { target c++11 } }
+// { dg-options "--param ggc-min-heapsize=0 --param ggc-min-expand=0" }
template <typename, typename>
class transformed {};
diff --git a/gcc/testsuite/g++.dg/other/i386-2.C b/gcc/testsuite/g++.dg/other/i386-2.C
index e8237a45b7..2f8650a66b 100644
--- a/gcc/testsuite/g++.dg/other/i386-2.C
+++ b/gcc/testsuite/g++.dg/other/i386-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */
+/* { dg-options "-O -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1" } */
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h,
diff --git a/gcc/testsuite/g++.dg/other/i386-3.C b/gcc/testsuite/g++.dg/other/i386-3.C
index 9dd587a5e7..df0bd27979 100644
--- a/gcc/testsuite/g++.dg/other/i386-3.C
+++ b/gcc/testsuite/g++.dg/other/i386-3.C
@@ -1,5 +1,5 @@
/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
-/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */
+/* { dg-options "-O -fkeep-inline-functions -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1" } */
/* Test that {,x,e,p,t,s,w,a,b,i}mmintrin.h, mm3dnow.h, fma4intrin.h,
xopintrin.h, abmintrin.h, bmiintrin.h, tbmintrin.h, lwpintrin.h,
diff --git a/gcc/testsuite/g++.dg/other/isnan.C b/gcc/testsuite/g++.dg/other/isnan.C
new file mode 100644
index 0000000000..f80523dc80
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/isnan.C
@@ -0,0 +1,8 @@
+// PR c++/48369
+
+extern "C" int isnan (double);
+
+void f(double d)
+{
+ bool b = isnan(d);
+}
diff --git a/gcc/testsuite/g++.dg/other/java3.C b/gcc/testsuite/g++.dg/other/java3.C
new file mode 100644
index 0000000000..1bc0a8874f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/java3.C
@@ -0,0 +1,7 @@
+// PR c++/11006
+
+typedef int* jclass;
+
+void foo () {
+ new __java_boolean; // { dg-error "valid" }
+}
diff --git a/gcc/testsuite/g++.dg/other/packed1.C b/gcc/testsuite/g++.dg/other/packed1.C
index ac586c6c00..74e4962a47 100644
--- a/gcc/testsuite/g++.dg/other/packed1.C
+++ b/gcc/testsuite/g++.dg/other/packed1.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail sh-*-* lm32-*-* } }
+// { dg-do run { xfail lm32-*-* } }
// NMS:2003-04-21 this fails on strict aligned architectures again,
// the patch was reverted because it broke something more important.
diff --git a/gcc/testsuite/g++.dg/other/pr23205-2.C b/gcc/testsuite/g++.dg/other/pr23205-2.C
index fbd16dfab5..c7eefaa58c 100644
--- a/gcc/testsuite/g++.dg/other/pr23205-2.C
+++ b/gcc/testsuite/g++.dg/other/pr23205-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* } { "*" } { "" } } */
/* { dg-options "-gstabs+ -fno-eliminate-unused-debug-types -ftoplevel-reorder" } */
const int foobar = 4;
diff --git a/gcc/testsuite/g++.dg/other/pr39496.C b/gcc/testsuite/g++.dg/other/pr39496.C
index e535ee0d69..c9e55df436 100644
--- a/gcc/testsuite/g++.dg/other/pr39496.C
+++ b/gcc/testsuite/g++.dg/other/pr39496.C
@@ -1,5 +1,5 @@
// PR target/39496
-// { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ia32 } } }
+// { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } }
// { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" }
// Verify that {foo,bar}{,2}param are all passed on the stack, using
diff --git a/gcc/testsuite/g++.dg/other/pr42685.C b/gcc/testsuite/g++.dg/other/pr42685.C
index b8b1ad63b1..3c55955acc 100644
--- a/gcc/testsuite/g++.dg/other/pr42685.C
+++ b/gcc/testsuite/g++.dg/other/pr42685.C
@@ -1,5 +1,6 @@
// { dg-do compile }
// { dg-options "-O -funroll-loops -fcompare-debug" }
+// { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } }
void Remap(int n, int *src, int *dst, int *map)
{
diff --git a/gcc/testsuite/g++.dg/other/pr43631.C b/gcc/testsuite/g++.dg/other/pr43631.C
new file mode 100644
index 0000000000..eb4f578618
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr43631.C
@@ -0,0 +1,15 @@
+// PR middle-end/43631
+// { dg-do compile }
+// { dg-options "-g -O2" }
+// { dg-additional-options "-mtune=atom" { target i?86-*-* x86_64-*-* } }
+
+typedef void (*T) ();
+struct S { T t; };
+void bar (T) __attribute__ ((__noreturn__));
+S *p;
+
+void
+foo ()
+{
+ try { bar (p->t); } catch (...) { throw 1; }
+}
diff --git a/gcc/testsuite/g++.dg/other/pr55650.C b/gcc/testsuite/g++.dg/other/pr55650.C
new file mode 100644
index 0000000000..c565b06ef4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr55650.C
@@ -0,0 +1,22 @@
+// PR gcov-profile/55650
+// { dg-do link }
+// { dg-require-profiling "-fprofile-generate" }
+// { dg-options "-O2 -fprofile-generate" }
+// { dg-additional-sources "pr55650.cc" }
+
+struct A
+{
+ virtual void foo ();
+};
+
+struct B : public A
+{
+ B ();
+ void foo () {}
+};
+
+inline A *
+bar ()
+{
+ return new B;
+}
diff --git a/gcc/testsuite/g++.dg/other/pr55650.cc b/gcc/testsuite/g++.dg/other/pr55650.cc
new file mode 100644
index 0000000000..70b41462b5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr55650.cc
@@ -0,0 +1,4 @@
+int
+main ()
+{
+}
diff --git a/gcc/testsuite/g++.dg/other/pr59492.C b/gcc/testsuite/g++.dg/other/pr59492.C
new file mode 100644
index 0000000000..84bd25554f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/pr59492.C
@@ -0,0 +1,18 @@
+// { dg-do assemble { target { { i?86-*-* x86_64-*-* } && fpic } } }
+// { dg-options "-mx32 -fPIC" }
+// { dg-require-ifunc "" }
+// { dg-require-effective-target maybe_x32 }
+
+void
+__throw_runtime_error(const char*) __attribute__((__noreturn__));
+unsigned int
+__attribute__ ((target("rdrnd")))
+__x86_rdrand(void)
+{
+ unsigned int retries = 100;
+ unsigned int val;
+ while (__builtin_ia32_rdrand32_step(&val) == 0)
+ if (--retries == 0)
+ __throw_runtime_error(("random_device::__x86_rdrand(void)"));
+ return val;
+}
diff --git a/gcc/testsuite/g++.dg/other/pragma-ep-1.C b/gcc/testsuite/g++.dg/other/pragma-ep-1.C
deleted file mode 100644
index 9362943a52..0000000000
--- a/gcc/testsuite/g++.dg/other/pragma-ep-1.C
+++ /dev/null
@@ -1,27 +0,0 @@
-/* { dg-do compile { target *-*-osf5* } } */
-/* { dg-final { scan-assembler "xyzzy_one" } } */
-/* { dg-final { scan-assembler "xyzzy_two" } } */
-/* { dg-final { scan-assembler "xyzzz_three" } } */
-/* { dg-final { scan-assembler "four" } } */
-/* { dg-final { scan-assembler-not "_four" } } */
-
-#ifndef __PRAGMA_EXTERN_PREFIX
-#error
-#endif
-
-#pragma extern_prefix "xyzzy_"
-
-extern "C" int one(void);
-extern "C" int two(void);
-
-#pragma extern_prefix "xyzzz_"
-
-extern "C" int three(void);
-
-#pragma extern_prefix ""
-
-extern "C" int four(void);
-
-int (*p[])(void) = {
- one, two, three, four
-};
diff --git a/gcc/testsuite/g++.dg/other/ptrmem10.C b/gcc/testsuite/g++.dg/other/ptrmem10.C
index a17df7fb36..ff8c843411 100644
--- a/gcc/testsuite/g++.dg/other/ptrmem10.C
+++ b/gcc/testsuite/g++.dg/other/ptrmem10.C
@@ -3,7 +3,7 @@
template <class C, void (C::*M) ()>
static
-void foo(void *obj) // { dg-message "note" }
+void foo(void *obj)
{
C *p = static_cast<C*>(obj);
(p->*M)();
@@ -13,8 +13,7 @@ template <class C>
static void
bar(C *c, void (C::*m) ())
{
- foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|could not convert)" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
+ foo<C,m>((void *)c);// { dg-error "(not a valid template arg|pointer-to-member|no matching fun|could not convert|constant)" }
}
struct S
diff --git a/gcc/testsuite/g++.dg/other/ptrmem11.C b/gcc/testsuite/g++.dg/other/ptrmem11.C
index e73164eef2..e18abddd67 100644
--- a/gcc/testsuite/g++.dg/other/ptrmem11.C
+++ b/gcc/testsuite/g++.dg/other/ptrmem11.C
@@ -5,7 +5,7 @@ struct A {};
template <int A::* p>
int
-foo(A* q) // { dg-message "note" }
+foo(A* q)
{
return q->*p;
}
@@ -14,8 +14,7 @@ template <typename T>
int
bar(int T::* p)
{
- return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert)" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 17 }
+ return foo<p>(0);// { dg-error "(not a valid template arg|no matching func|pointer-to-member|could not convert|constant)" }
}
int i = bar<A>(0);
diff --git a/gcc/testsuite/g++.dg/other/redecl2.C b/gcc/testsuite/g++.dg/other/redecl2.C
index 591c258b89..6c8913c1f0 100644
--- a/gcc/testsuite/g++.dg/other/redecl2.C
+++ b/gcc/testsuite/g++.dg/other/redecl2.C
@@ -7,5 +7,5 @@ struct S {
virtual int foo() = 0;
};
-int S::foo() { return 0; } // { dg-error "defined here" }
+int S::foo() { return 0; } // { dg-message "defined here" }
int S::foo() { return 0; } // { dg-error "redefinition" }
diff --git a/gcc/testsuite/g++.dg/other/unused1.C b/gcc/testsuite/g++.dg/other/unused1.C
index 2a3ca1be74..b28d69874f 100644
--- a/gcc/testsuite/g++.dg/other/unused1.C
+++ b/gcc/testsuite/g++.dg/other/unused1.C
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-g" } */
-/* { dg-skip-if "" { { hppa*-*-hpux* *-*-solaris2.[56]* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
+/* { dg-skip-if "" { { hppa*-*-hpux* *-*-solaris2.[56]* powerpc-ibm-aix* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
/* Make sure we didn't eliminate casted types because we thought they were
unused. */
diff --git a/gcc/testsuite/g++.dg/other/var_copy-1.C b/gcc/testsuite/g++.dg/other/var_copy-1.C
index 2fc6b780e1..192af75821 100644
--- a/gcc/testsuite/g++.dg/other/var_copy-1.C
+++ b/gcc/testsuite/g++.dg/other/var_copy-1.C
@@ -1,5 +1,4 @@
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
// Test to allow for va_copy with C++0x standard.
diff --git a/gcc/testsuite/g++.dg/other/vararg-4.C b/gcc/testsuite/g++.dg/other/vararg-4.C
new file mode 100644
index 0000000000..e242cfceff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/vararg-4.C
@@ -0,0 +1,12 @@
+// PR c++/37404
+
+typedef __builtin_va_list __gnuc_va_list;
+typedef __gnuc_va_list va_list;
+
+template <class> struct S { static void foo () { } };
+template <class T, int N>
+struct S<T [N]> { static void foo () { T(); } };
+
+int main () {
+ S<va_list>::foo();
+}
diff --git a/gcc/testsuite/g++.dg/other/vector-compare.C b/gcc/testsuite/g++.dg/other/vector-compare.C
new file mode 100644
index 0000000000..03ff5fd725
--- /dev/null
+++ b/gcc/testsuite/g++.dg/other/vector-compare.C
@@ -0,0 +1,36 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-Wall" } */
+
+// Check that we can compare vector types that really are the same through
+// typedefs.
+
+typedef float v4f __attribute__((vector_size(4*sizeof(float))));
+
+template <class T> void eat (T&&) {}
+
+template <class T, int n>
+struct Vec
+{
+ typedef T type __attribute__((vector_size(4*sizeof(T))));
+
+ template <class U>
+ static void fun (type const& t, U& u) { eat (t > u); }
+};
+
+long long
+f (v4f *x, v4f const *y)
+{
+ return ((*x < *y) | (*x <= *y))[2];
+}
+
+int main ()
+{
+ v4f x = {0,1,2,3};
+ Vec<const volatile float,4>::type f = {-1,5,2,3.1};
+ auto c = (x == f) == (x >= x);
+ eat (c[3]);
+ Vec<const volatile float,4>::fun (f, x);
+ Vec<const volatile float,4>::fun (x, f);
+ Vec<const volatile float,4>::fun (f, f);
+ Vec<const volatile float,4>::fun (x, x);
+}
diff --git a/gcc/testsuite/g++.dg/other/warning1.C b/gcc/testsuite/g++.dg/other/warning1.C
index c65ae0ff6e..a23d0ca6cb 100644
--- a/gcc/testsuite/g++.dg/other/warning1.C
+++ b/gcc/testsuite/g++.dg/other/warning1.C
@@ -7,8 +7,8 @@ extern "C" int printf(const char *, ...);
struct S
{
- static const float inf = 1.0f / 0.0f; // { dg-warning "1.0|float|initializ" }
- static const float nan = 0.0f / 0.0f; // { dg-warning "0.0|float|initializ" }
+ static const float inf = 1.0f / 0.0f; // { dg-error "1.0|float|initializ" }
+ static const float nan = 0.0f / 0.0f; // { dg-error "0.0|float|initializ" }
};
int main()
diff --git a/gcc/testsuite/g++.dg/overload/addr2.C b/gcc/testsuite/g++.dg/overload/addr2.C
new file mode 100644
index 0000000000..1d0c66bffd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/addr2.C
@@ -0,0 +1,13 @@
+// PR c++/29143
+
+void f(int);
+
+void g(int,int);
+void g(int,int,int);
+
+void
+h ()
+{
+ (&f)(1);
+ (&g)(1,2,3);
+}
diff --git a/gcc/testsuite/g++.dg/overload/defarg1.C b/gcc/testsuite/g++.dg/overload/defarg1.C
index 5d34a457dc..fcbb43b7bf 100644
--- a/gcc/testsuite/g++.dg/overload/defarg1.C
+++ b/gcc/testsuite/g++.dg/overload/defarg1.C
@@ -1,11 +1,11 @@
// PR c++/5247
template<typename T>
-int foo (T t, int = foo(T()));
+int foo (T t, int = foo(T())); // { dg-error "recursive" }
struct A { };
int main()
{
- foo(A()); // { dg-error "default argument" }
+ foo(A()); // { dg-message "default argument" }
}
diff --git a/gcc/testsuite/g++.dg/overload/defarg5.C b/gcc/testsuite/g++.dg/overload/defarg5.C
index 06ea6bf450..d022b0ca59 100644
--- a/gcc/testsuite/g++.dg/overload/defarg5.C
+++ b/gcc/testsuite/g++.dg/overload/defarg5.C
@@ -2,6 +2,6 @@
struct A
{
- int i;
- A() { void foo(int=i); } // { dg-error "this" }
+ int i; // { dg-message "" }
+ A() { void foo(int=i); } // { dg-error "" }
};
diff --git a/gcc/testsuite/g++.dg/overload/defarg6.C b/gcc/testsuite/g++.dg/overload/defarg6.C
new file mode 100644
index 0000000000..b750184c37
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/defarg6.C
@@ -0,0 +1,7 @@
+class A
+{
+ int i;
+ A(int i): i(i) {} // { dg-error "private" }
+};
+
+void f (A = 1) { } // { dg-error "context" }
diff --git a/gcc/testsuite/g++.dg/overload/defarg7.C b/gcc/testsuite/g++.dg/overload/defarg7.C
new file mode 100644
index 0000000000..8cc08f5386
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/defarg7.C
@@ -0,0 +1,12 @@
+struct A
+{
+ A(const char *);
+ explicit A(const int *);
+};
+
+void f (A a = 0);
+
+int main()
+{
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/overload/defarg8.C b/gcc/testsuite/g++.dg/overload/defarg8.C
new file mode 100644
index 0000000000..b3ddfbb76c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/defarg8.C
@@ -0,0 +1,22 @@
+// PR c++/60367
+// { dg-do run { target c++11 } }
+
+extern "C" int printf (const char *, ...);
+extern "C" void abort();
+
+void *p;
+struct foo {
+ foo() { p = this; }
+ foo (const foo &) { abort(); }
+ ~foo() { if (p != this) abort(); }
+};
+
+void do_something( foo f = {} )
+{
+ if (&f != p) abort();
+}
+
+int main()
+{
+ do_something();
+}
diff --git a/gcc/testsuite/g++.dg/overload/ellipsis2.C b/gcc/testsuite/g++.dg/overload/ellipsis2.C
new file mode 100644
index 0000000000..d9118ba643
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/ellipsis2.C
@@ -0,0 +1,13 @@
+// PR c++/60253
+
+struct A
+{
+ ~A();
+};
+
+struct B
+{
+ B(...);
+};
+
+B b(0, A()); // { dg-error "cannot pass" }
diff --git a/gcc/testsuite/g++.dg/overload/new1.C b/gcc/testsuite/g++.dg/overload/new1.C
index 9adb4c0724..bf2190b8e0 100644
--- a/gcc/testsuite/g++.dg/overload/new1.C
+++ b/gcc/testsuite/g++.dg/overload/new1.C
@@ -7,7 +7,7 @@ struct X{
};
-void f(X *x = new X); // { dg-error "" }
+void f(X *x = new X); // { dg-message "" }
void f(X *x = new X(4)); // { dg-error "" }
@@ -17,6 +17,5 @@ void f(X *x = new (3) X(6)); // { dg-error "" }
void f(X *x = new (2) X[10]); // { dg-error "" }
// { dg-message "candidate" "candidate note" { target *-*-* } 18 }
-// { dg-message "operator new|candidate expects" "match candidate text" { target *-*-* } 00 }
void f(X *x = new X[10][5]); // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/overload/operator6.C b/gcc/testsuite/g++.dg/overload/operator6.C
new file mode 100644
index 0000000000..5002602b69
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/operator6.C
@@ -0,0 +1,27 @@
+// PR c++/17805
+
+// Per 13.3.1.2/3 bullet 2, an operator function is not a candidate
+// for overload resolution if neither argument is of class type and
+// neither enumerator-typed argument gets an exact match, with or
+// without reference binding, for the corresponding parameter.
+
+struct A
+{
+ A(int);
+ A(const char*);
+};
+
+bool operator==(const A&, const A&);
+const A& operator*(const A&);
+
+enum E { e };
+
+bool b1 = (e == ""); // { dg-error "no match" }
+
+bool b2 = (A(1) == "");
+
+bool b3 = (e == A(1));
+
+const A& a1 = *e; // { dg-error "no match" }
+
+const A& a2 = *A(1);
diff --git a/gcc/testsuite/g++.dg/overload/using2.C b/gcc/testsuite/g++.dg/overload/using2.C
index 514d83f34d..d1824548ad 100644
--- a/gcc/testsuite/g++.dg/overload/using2.C
+++ b/gcc/testsuite/g++.dg/overload/using2.C
@@ -45,7 +45,7 @@ using std::C1;
extern "C" void exit (int) throw ();
extern "C" void *malloc (__SIZE_TYPE__) throw () __attribute__((malloc));
- void abort (void) throw ();
+ void abort (void) throw (); // { dg-message "previous" }
void _exit (int) throw (); // { dg-error "conflicts" "conflicts" }
// { dg-message "void _exit" "_exit" { target *-*-* } 49 }
@@ -54,14 +54,14 @@ using std::C1;
// { dg-message "void C1" "C1" { target *-*-* } 53 }
extern "C" void c2 (void) throw ();
- void C2 (void) throw ();
+ void C2 (void) throw (); // { dg-message "previous" }
int C3 (int) throw ();
using std::malloc;
-using std::abort; // { dg-error "already declared" }
+using std::abort; // { dg-error "conflicts" }
using std::c2;
-using std::C2; // { dg-error "already declared" }
+using std::C2; // { dg-error "conflicts" }
using std::c3; using other::c3;
using std::C3; using other::C3;
diff --git a/gcc/testsuite/g++.dg/overload/using3.C b/gcc/testsuite/g++.dg/overload/using3.C
new file mode 100644
index 0000000000..38344e48a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/overload/using3.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+namespace a
+{
+ void f(int);
+}
+
+namespace b
+{
+ void f(int); // { dg-message "previous" }
+ void g()
+ {
+ f (3);
+ }
+ using a::f; // { dg-error "conflicts" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/access11.C b/gcc/testsuite/g++.dg/parse/access11.C
new file mode 100644
index 0000000000..7004fa7640
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/access11.C
@@ -0,0 +1,35 @@
+// PR c++/24926
+
+class A {
+ union {
+ int i; // { dg-error "private" }
+ };
+ union {
+ int j; // { dg-error "private" }
+ };
+ union {
+ union {
+ int k; // { dg-error "private" }
+ };
+ union {
+ union {
+ int l; // { dg-error "private" }
+ };
+ union {
+ int m; // { dg-error "private" }
+ union {
+ int n; // { dg-error "private" }
+ int o; // { dg-error "private" }
+ };
+ };
+ };
+ };
+};
+
+int a1 = A().i; // { dg-error "context" }
+int a2 = A().j; // { dg-error "context" }
+int a3 = A().k; // { dg-error "context" }
+int a4 = A().l; // { dg-error "context" }
+int a5 = A().m; // { dg-error "context" }
+int a6 = A().n; // { dg-error "context" }
+int a7 = A().o; // { dg-error "context" }
diff --git a/gcc/testsuite/g++.dg/parse/access8.C b/gcc/testsuite/g++.dg/parse/access8.C
index 45f4be7028..205b7f2712 100644
--- a/gcc/testsuite/g++.dg/parse/access8.C
+++ b/gcc/testsuite/g++.dg/parse/access8.C
@@ -5,8 +5,8 @@ class foo
typedef int memfun; // { dg-error "private" }
};
-template<foo::memfun>
-struct fm_obj { }; // { dg-error "context" }
+template<foo::memfun> // { dg-error "context" }
+struct fm_obj { };
template <typename T = foo::memfun> // { dg-error "context" }
struct S {};
diff --git a/gcc/testsuite/g++.dg/parse/ambig4.C b/gcc/testsuite/g++.dg/parse/ambig4.C
index 868f07cf78..02e39b80f0 100644
--- a/gcc/testsuite/g++.dg/parse/ambig4.C
+++ b/gcc/testsuite/g++.dg/parse/ambig4.C
@@ -1,12 +1,12 @@
// PR c++/20293
-namespace hide { // { dg-error "hide" }
+namespace hide { // { dg-message "hide" }
int k;
}
namespace {
int i;
- namespace hide { // { dg-error "hide" }
+ namespace hide { // { dg-message "hide" }
int j;
}
}
diff --git a/gcc/testsuite/g++.dg/parse/ambig6.C b/gcc/testsuite/g++.dg/parse/ambig6.C
index 8f37feaea6..0bd2302fe0 100644
--- a/gcc/testsuite/g++.dg/parse/ambig6.C
+++ b/gcc/testsuite/g++.dg/parse/ambig6.C
@@ -1,7 +1,7 @@
// PR c++/48046
-namespace N1 { typedef int T; } // { dg-error "" }
-namespace N2 { typedef float T; } // { dg-error "" }
+namespace N1 { typedef int T; } // { dg-message "" }
+namespace N2 { typedef float T; } // { dg-message "" }
int main()
{
diff --git a/gcc/testsuite/g++.dg/parse/ambig7.C b/gcc/testsuite/g++.dg/parse/ambig7.C
new file mode 100644
index 0000000000..9a5b8791d2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ambig7.C
@@ -0,0 +1,16 @@
+// PR c++/60361
+
+struct Helper
+{
+ Helper(int a, void (*pfunc)());
+};
+
+template <int I> void function();
+
+const int A = 1;
+const int B = 2;
+
+Helper testOk(A, function<A>);
+Helper testOk2(int(A), function<B>);
+Helper testOk3((int(A)), function<A>);
+Helper testFail(int(A), function<A>);
diff --git a/gcc/testsuite/g++.dg/parse/ambig8.C b/gcc/testsuite/g++.dg/parse/ambig8.C
new file mode 100644
index 0000000000..016df8ae71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ambig8.C
@@ -0,0 +1,15 @@
+// PR c++/60415
+
+namespace b {
+ enum type_t { warning };
+}
+
+struct d {
+ d(b::type_t) { }
+ int operator()() { return 0; }
+};
+
+int main()
+{
+ d(b::warning)() + 1;
+}
diff --git a/gcc/testsuite/g++.dg/parse/ambig9.C b/gcc/testsuite/g++.dg/parse/ambig9.C
new file mode 100644
index 0000000000..68744d1ba6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ambig9.C
@@ -0,0 +1,10 @@
+// PR c++/49691
+
+struct A { int x; };
+A* f();
+struct B {
+ void g()
+ {
+ int(f()->x);
+ }
+};
diff --git a/gcc/testsuite/g++.dg/parse/bitfield4.C b/gcc/testsuite/g++.dg/parse/bitfield4.C
new file mode 100644
index 0000000000..e10fa5f334
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/bitfield4.C
@@ -0,0 +1,6 @@
+// PR c++/58700
+
+struct A
+{
+ static int : 4; // { dg-error "bit-field" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/bitfield5.C b/gcc/testsuite/g++.dg/parse/bitfield5.C
new file mode 100644
index 0000000000..15661320de
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/bitfield5.C
@@ -0,0 +1,8 @@
+// PR c++/46282
+
+template<int>
+class A
+{
+ A : i() {} // { dg-message "" }
+ int i;
+};
diff --git a/gcc/testsuite/g++.dg/parse/crash16.C b/gcc/testsuite/g++.dg/parse/crash16.C
index dc8f7a608d..c7da3eb702 100644
--- a/gcc/testsuite/g++.dg/parse/crash16.C
+++ b/gcc/testsuite/g++.dg/parse/crash16.C
@@ -1,7 +1,7 @@
// PR c++/16971
namespace N {
- int i; // { dg-error "" }
+ int i; // { dg-message "" }
// By checking for an explicit keyword on the next line we avoid
// matching an ICE message.
int i; // { dg-error "redefinition" }
diff --git a/gcc/testsuite/g++.dg/parse/crash21.C b/gcc/testsuite/g++.dg/parse/crash21.C
index 283f6b4d58..623bbec81c 100644
--- a/gcc/testsuite/g++.dg/parse/crash21.C
+++ b/gcc/testsuite/g++.dg/parse/crash21.C
@@ -1,6 +1,6 @@
namespace N
{
- struct A; // { dg-error "previous declaration" "" }
+ struct A; // { dg-message "previous declaration" "" }
}
template<int I>
diff --git a/gcc/testsuite/g++.dg/parse/crash22.C b/gcc/testsuite/g++.dg/parse/crash22.C
index eaf4d1a5c0..ba8870376f 100644
--- a/gcc/testsuite/g++.dg/parse/crash22.C
+++ b/gcc/testsuite/g++.dg/parse/crash22.C
@@ -4,17 +4,17 @@
// PR 19030: ICE
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
-struct A; // { dg-error "A" }
+struct A; // { dg-message "A" }
namespace N
{
- struct A; // { dg-error "A" }
+ struct A; // { dg-message "A" }
}
using namespace N;
-int A::i; // { dg-error "ambiguous|declared here" "" }
-int A::i; // { dg-error "ambiguous|redefinition of" "" }
+int A::i; // { dg-message "ambiguous|declared here" "" }
+int A::i; // { dg-message "ambiguous|redefinition of" "" }
namespace N
{
diff --git a/gcc/testsuite/g++.dg/parse/crash28.C b/gcc/testsuite/g++.dg/parse/crash28.C
index 67d78d6bb7..68a975915c 100644
--- a/gcc/testsuite/g++.dg/parse/crash28.C
+++ b/gcc/testsuite/g++.dg/parse/crash28.C
@@ -5,10 +5,10 @@
// Origin:Andrew Pinski <pinskia@gcc.gnu.org>
// Volker Reichelt <reichelt@gcc.gnu.org>
-template <class _Tp> class insert_iterator<slist<_Tp> > {}; // { dg-error "not a template|not declared in this scope|expected unqualified-id|extra" }
+template <class _Tp> class insert_iterator<slist<_Tp> > {}; // { dg-error "not a class template|not declared in this scope|expected unqualified-id|extra" }
template <class _Value> class insert_iterator<int > { // { dg-error "template" }
hash_set<_Value>;
};
-template<int> struct A<X<> > {}; // { dg-error "not a template|not declared in this scope|expected unqualified-id|extra" }
+template<int> struct A<X<> > {}; // { dg-error "not a class template|not declared in this scope|expected unqualified-id|extra" }
struct A {};
diff --git a/gcc/testsuite/g++.dg/parse/crash38.C b/gcc/testsuite/g++.dg/parse/crash38.C
index 724f9b80a1..7a0c265568 100644
--- a/gcc/testsuite/g++.dg/parse/crash38.C
+++ b/gcc/testsuite/g++.dg/parse/crash38.C
@@ -1,11 +1,11 @@
/* PR c++/33207 */
/* This would not ICE. */
-namespace M { } /* { dg-error "previous declaration" } */
+namespace M { } /* { dg-message "previous declaration" } */
struct M; /* { dg-error "redeclared as different kind of symbol" } */
M *p; /* { dg-error "does not name a type" } */
/* This would ICE when processing 'p'. */
-namespace N { } /* { dg-error "previous declaration" } */
+namespace N { } /* { dg-message "previous declaration" } */
struct N; /* { dg-error "redeclared as different kind of symbol" } */
struct N* p; /* { dg-error "redeclared as different kind of symbol|invalid type" } */
diff --git a/gcc/testsuite/g++.dg/parse/crash40.C b/gcc/testsuite/g++.dg/parse/crash40.C
index 410c2111ea..6b67d8dfe1 100644
--- a/gcc/testsuite/g++.dg/parse/crash40.C
+++ b/gcc/testsuite/g++.dg/parse/crash40.C
@@ -26,7 +26,7 @@ template<bool> struct S {
S(unsigned int = BBB::foo()->AAA::get()); /* { dg-error "is not a base of" } */
};
template<bool> struct SS {
- SS(unsigned int = BBB::foo()->get());
+ SS(unsigned int = BBB::foo()->get()); /* { dg-error "within this context" } */
};
void bar()
@@ -38,5 +38,5 @@ void bar()
i.C::foo<0>(); /* { dg-error "which is of non-class type" } */
S<false> s; /* { dg-error "default argument" } */
- SS<false> ss; /* { dg-error "within this context" } */
+ SS<false> ss;
}
diff --git a/gcc/testsuite/g++.dg/parse/crash48.C b/gcc/testsuite/g++.dg/parse/crash48.C
index 45415484b4..020ddf079a 100644
--- a/gcc/testsuite/g++.dg/parse/crash48.C
+++ b/gcc/testsuite/g++.dg/parse/crash48.C
@@ -5,5 +5,5 @@ void
foo (bool b)
{
if (b)
- try { throw 0; } catch (X) { } // { dg-error "expected type-specifier before" }
+ try { throw 0; } catch (X) { } // { dg-error "type" }
}
diff --git a/gcc/testsuite/g++.dg/parse/crash53.C b/gcc/testsuite/g++.dg/parse/crash53.C
index de6d412f1d..c19feafc18 100644
--- a/gcc/testsuite/g++.dg/parse/crash53.C
+++ b/gcc/testsuite/g++.dg/parse/crash53.C
@@ -1,9 +1,9 @@
// PR c++/35112
-namespace X { struct A; } // { dg-error "struct X::A" }
-namespace Y { struct A; } // { dg-error "struct Y::A" }
-namespace Z { struct A; } // { dg-error "struct Z::A" }
-namespace W { struct A; } // { dg-error "struct W::A" }
+namespace X { struct A; } // { dg-message "struct X::A" }
+namespace Y { struct A; } // { dg-message "struct Y::A" }
+namespace Z { struct A; } // { dg-message "struct Z::A" }
+namespace W { struct A; } // { dg-message "struct W::A" }
using namespace X;
using namespace Y;
diff --git a/gcc/testsuite/g++.dg/parse/crash56.C b/gcc/testsuite/g++.dg/parse/crash56.C
index 2b823aed40..6da84f8a78 100644
--- a/gcc/testsuite/g++.dg/parse/crash56.C
+++ b/gcc/testsuite/g++.dg/parse/crash56.C
@@ -1,6 +1,5 @@
/* PR c++/43081 */
-/* { dg-do compile } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do compile { target c++11 } } */
struct A
{
diff --git a/gcc/testsuite/g++.dg/parse/crash62.C b/gcc/testsuite/g++.dg/parse/crash62.C
new file mode 100644
index 0000000000..230d162f0b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash62.C
@@ -0,0 +1,6 @@
+// PR c++/57352
+
+struct x
+{
+ operator class {} (); // { dg-error "types|expected" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/crash63.C b/gcc/testsuite/g++.dg/parse/crash63.C
new file mode 100644
index 0000000000..c7189c2c17
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash63.C
@@ -0,0 +1,10 @@
+// PR c++/57947
+// { dg-options "-std=c++98" }
+
+namespace std
+{
+ template <class E> class initializer_list {};
+ template <int N> struct D { D(initializer_list<int>) {} };
+ D<0> d {1, 2, 3}; // { dg-error "constructor|no matching" }
+ // { dg-warning "initializer list" "" { target *-*-* } 8 }
+}
diff --git a/gcc/testsuite/g++.dg/parse/crash64.C b/gcc/testsuite/g++.dg/parse/crash64.C
new file mode 100644
index 0000000000..9e1dfea6c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash64.C
@@ -0,0 +1,7 @@
+// PR c++/58565
+// { dg-options "" }
+
+void foo()
+{
+ int i = ({ L: ; }); // { dg-error "void value not ignored" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/crash65.C b/gcc/testsuite/g++.dg/parse/crash65.C
new file mode 100644
index 0000000000..04154f40cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash65.C
@@ -0,0 +1,6 @@
+// PR c++/58535
+
+struct A
+{
+ template<int> virtual void foo(); // { dg-error "templates" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/crash66.C b/gcc/testsuite/g++.dg/parse/crash66.C
new file mode 100644
index 0000000000..ceedd2be24
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/crash66.C
@@ -0,0 +1,11 @@
+// PR c++/58647
+
+struct A
+{
+ static void foo();
+};
+
+template<typename> void bar()
+{
+ A().foo;
+}
diff --git a/gcc/testsuite/g++.dg/parse/defarg16.C b/gcc/testsuite/g++.dg/parse/defarg16.C
new file mode 100644
index 0000000000..8eb0014ddb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/defarg16.C
@@ -0,0 +1,4 @@
+// PR c++/28262
+
+typedef void (funcptrhack) (int = 10); // { dg-error "default arguments" }
+typedef funcptrhack * funcptr;
diff --git a/gcc/testsuite/g++.dg/parse/dtor16.C b/gcc/testsuite/g++.dg/parse/dtor16.C
new file mode 100644
index 0000000000..ff445c3886
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/dtor16.C
@@ -0,0 +1,8 @@
+// PR c++/25666
+
+struct A { ~A(); };
+
+struct B
+{
+ template<int> friend A::~A(); // { dg-error "member template" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/dtor6.C b/gcc/testsuite/g++.dg/parse/dtor6.C
index 3333161c39..86370d5d40 100644
--- a/gcc/testsuite/g++.dg/parse/dtor6.C
+++ b/gcc/testsuite/g++.dg/parse/dtor6.C
@@ -1,8 +1,8 @@
// PR c++/25638
-struct A { ~A(); }; // { dg-error "candidate" }
+struct A { ~A(); };
struct B : A
{
- template<int> friend A::~A(); // { dg-error "match" }
+ template<int> friend A::~A(); // { dg-error "member template" }
};
diff --git a/gcc/testsuite/g++.dg/parse/enum10.C b/gcc/testsuite/g++.dg/parse/enum10.C
new file mode 100644
index 0000000000..8760597a7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/enum10.C
@@ -0,0 +1,2 @@
+namespace A { }
+enum A::B { }; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/parse/enum11.C b/gcc/testsuite/g++.dg/parse/enum11.C
new file mode 100644
index 0000000000..68ddedbeee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/enum11.C
@@ -0,0 +1,6 @@
+// PR c++/58980
+
+template<typename> struct A
+{
+ enum A::B::C {}; // { dg-error "has not been declared" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/enum5.C b/gcc/testsuite/g++.dg/parse/enum5.C
index 3ebb02f757..18480520a6 100644
--- a/gcc/testsuite/g++.dg/parse/enum5.C
+++ b/gcc/testsuite/g++.dg/parse/enum5.C
@@ -10,7 +10,7 @@ struct D {
enum EE : sizeof(EE) * CHAR_BIT; // not OK
enum EE xxxx : sizeof(EE) * CHAR_BIT; // OK
T x : sizeof(unsigned int) * CHAR_BIT; // OK
- enum FF {ff} : sizeof(int) * CHAR_BIT; // OK
+ enum FF {ff} : sizeof(FF) * CHAR_BIT; // OK
} element;
enum EE xx;
diff --git a/gcc/testsuite/g++.dg/parse/error11.C b/gcc/testsuite/g++.dg/parse/error11.C
index 39039a880b..319e6acf2b 100644
--- a/gcc/testsuite/g++.dg/parse/error11.C
+++ b/gcc/testsuite/g++.dg/parse/error11.C
@@ -16,22 +16,22 @@ struct Foo
};
void method(void) {
- typename Foo<::B>::template Nested<::B> n; // { dg-error "17:'<::' cannot begin" "17-begin" }
-// { dg-message "17:'<:' is an alternate spelling" "17-alt" { target *-*-* } 19 }
-// { dg-error "39:'<::' cannot begin" "39-begin" { target *-*-* } 19 }
-// { dg-message "39:'<:' is an alternate spelling" "39-alt" { target *-*-* } 19 }
+ typename Foo<::B>::template Nested<::B> n; // { dg-error "17:'<::' cannot begin" "17-begin" { target { ! c++11 } } }
+// { dg-message "17:'<:' is an alternate spelling" "17-alt" { target { ! c++11 } } 19 }
+// { dg-error "39:'<::' cannot begin" "39-begin" { target { ! c++11 } } 19 }
+// { dg-message "39:'<:' is an alternate spelling" "39-alt" { target { ! c++11 } } 19 }
n.template Nested<B>::method();
- n.template Nested<::B>::method(); // { dg-error "22:'<::' cannot begin" "error" }
-// { dg-message "22:'<:' is an alternate" "note" { target *-*-* } 24 }
+ n.template Nested<::B>::method(); // { dg-error "22:'<::' cannot begin" "error" { target { ! c++11 } } }
+// { dg-message "22:'<:' is an alternate" "note" { target { ! c++11 } } 24 }
Nested<B>::method();
- Nested<::B>::method(); // { dg-error "11:'<::' cannot begin" "error" }
-// { dg-message "11:'<:' is an alternate" "note" { target *-*-* } 27 }
+ Nested<::B>::method(); // { dg-error "11:'<::' cannot begin" "error" { target { ! c++11 } } }
+// { dg-message "11:'<:' is an alternate" "note" { target { ! c++11 } } 27 }
}
};
template <int N> struct Foo2 {};
-template struct Foo2<::B>; // { dg-error "21:'<::' cannot begin" "begin" }
-// { dg-message "21:'<:' is an alternate" "alt" { target *-*-* } 33 }
+template struct Foo2<::B>; // { dg-error "21:'<::' cannot begin" "begin" { target { ! c++11 } } }
+// { dg-message "21:'<:' is an alternate" "alt" { target { ! c++11 } } 33 }
// { dg-message "25:type/value mismatch" "mismatch" { target *-*-* } 33 }
// { dg-error "25:expected a constant" "const" { target *-*-* } 33 }
@@ -39,11 +39,11 @@ int value = 0;
void func(void)
{
- Foo<::B> f; // { dg-error "cannot begin" "begin" }
-// { dg-message "alternate spelling" "alt" { target *-*-* } 42 }
+ Foo<::B> f; // { dg-error "cannot begin" "begin" { target { ! c++11 } } }
+// { dg-message "alternate spelling" "alt" { target { ! c++11 } } 42 }
f.Foo<B>::method();
- f.Foo<::B>::method(); // { dg-error "8:cannot begin" "begin" }
-// { dg-message "8:alternate spelling" "alt" { target *-*-* } 45 }
+ f.Foo<::B>::method(); // { dg-error "8:cannot begin" "begin" { target { ! c++11 } } }
+// { dg-message "8:alternate spelling" "alt" { target { ! c++11 } } 45 }
// Check cases where we the token sequence is the correct one, but there
// was no digraph or whitespaces in the middle, so we should not emit
@@ -53,19 +53,17 @@ void func(void)
// { dg-error "6:missing template arguments before" "template" { target *-*-* } { 51 } }
// { dg-error "9:expected primary-expression before ':' token" "primary" { target *-*-* } 51 }
// { dg-error "9:expected '\]' before ':' token" "backslash" { target *-*-* } 51 }
-// { dg-error "9:expected ';' before ':' token" "semicolon" { target *-*-* } 51 }
// { dg-error "6:missing template arguments before" "template" { target *-*-* } 52 }
// { dg-error "7:expected primary-expression before ':' token" "primary" { target *-*-* } 52 }
// { dg-error "7:expected '\]' before ':' token" "backslash" { target *-*-* } 52 }
-// { dg-error "7:expected ';' before ':' token" "semicolon" { target *-*-* } 52 }
//
int Foo[2];
Foo[::value] = 0;
}
-template struct Foo<::B>; // { dg-error "20:'<::' cannot begin" "begin" }
-// { dg-message "20:is an alternate" "alt" { target *-*-* } 66 }
+template struct Foo<::B>; // { dg-error "20:'<::' cannot begin" "begin" { target { ! c++11 } } }
+// { dg-message "20:is an alternate" "alt" { target { ! c++11 } } 64 }
// On the first error message, an additional note about the use of
// -fpermissive should be present
-// { dg-message "17:\\(if you use '-fpermissive' G\\+\\+ will accept your code\\)" "-fpermissive" { target *-*-* } 19 }
+// { dg-message "17:\\(if you use '-fpermissive' or '-std=c\\+\\+11', or '-std=gnu\\+\\+11' G\\+\\+ will accept your code\\)" "-fpermissive" { target { ! c++11 } } 19 }
diff --git a/gcc/testsuite/g++.dg/parse/error12.C b/gcc/testsuite/g++.dg/parse/error12.C
index 3ebcf38941..3e6d374e35 100644
--- a/gcc/testsuite/g++.dg/parse/error12.C
+++ b/gcc/testsuite/g++.dg/parse/error12.C
@@ -8,6 +8,6 @@ struct B;
template <class A>
struct Foo {};
-Foo<::B> foo; // { dg-bogus "error" "error in place of warning" }
-// { dg-warning "4: '<::' cannot begin a template-argument list" "warning <::" { target *-*-* } 11 }
-// { dg-message "4:'<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target *-*-* } 11 }
+Foo<::B> foo; // { dg-bogus "error" "error in place of warning" { target { ! c++11 } } }
+// { dg-warning "4: '<::' cannot begin a template-argument list" "warning <::" { target { ! c++11 } } 11 }
+// { dg-message "4:'<:' is an alternate spelling for '.'. Insert whitespace between '<' and '::'" "note <:" { target { ! c++11 } } 11 }
diff --git a/gcc/testsuite/g++.dg/parse/error14.C b/gcc/testsuite/g++.dg/parse/error14.C
index 04f2f56b6d..37a3d2001f 100644
--- a/gcc/testsuite/g++.dg/parse/error14.C
+++ b/gcc/testsuite/g++.dg/parse/error14.C
@@ -22,5 +22,3 @@ struct X
}; // { dg-error "2:expected '.' at end of input" "at end of input" }
// { dg-error "1:expected primary-expression before '.' token" "primary" { target *-*-* } 22 }
// { dg-error "1:expected unqualified-id" "unqualified-id" { target *-*-* } 22 }
- // { dg-error "1:expected ';' before '.' token" "function" { target *-*-* } 22 }
-
diff --git a/gcc/testsuite/g++.dg/parse/error15.C b/gcc/testsuite/g++.dg/parse/error15.C
index 607a1dbb86..deba54aca1 100644
--- a/gcc/testsuite/g++.dg/parse/error15.C
+++ b/gcc/testsuite/g++.dg/parse/error15.C
@@ -11,9 +11,9 @@ namespace N
}
N::A f2; // { dg-error "1:invalid use of template-name 'N::A' without an argument list" }
-N::INVALID f3; // { dg-error "1:'INVALID' in namespace 'N' does not name a type" }
-N::C::INVALID f4; // { dg-error "1:'INVALID' in 'struct N::C' does not name a type" }
-N::K f6; // { dg-error "1:'K' in namespace 'N' does not name a type" }
+N::INVALID f3; // { dg-error "4:'INVALID' in namespace 'N' does not name a type" }
+N::C::INVALID f4; // { dg-error "7:'INVALID' in 'struct N::C' does not name a type" }
+N::K f6; // { dg-error "4:'K' in namespace 'N' does not name a type" }
typename N::A f7;
// { dg-error "13:invalid use of template-name 'N::A' without an argument list" "13" { target *-*-* } 17 }
// { dg-error "17:invalid type in declaration before ';' token" "17" { target *-*-* } 17 }
@@ -21,9 +21,9 @@ typename N::A f7;
struct B
{
N::A f2; // { dg-error "3:invalid use of template-name 'N::A' without an argument list" }
- N::INVALID f3; // { dg-error "3:'INVALID' in namespace 'N' does not name a type" }
- N::C::INVALID f4; // { dg-error "3:'INVALID' in 'struct N::C' does not name a type" }
- N::K f6; // { dg-error "3:'K' in namespace 'N' does not name a type" }
+ N::INVALID f3; // { dg-error "6:'INVALID' in namespace 'N' does not name a type" }
+ N::C::INVALID f4; // { dg-error "9:'INVALID' in 'struct N::C' does not name a type" }
+ N::K f6; // { dg-error "6:'K' in namespace 'N' does not name a type" }
typename N::A f7;
// { dg-error "15:invalid use of template-name 'N::A' without an argument list" "15" { target *-*-* } 27 }
};
@@ -32,9 +32,9 @@ template <int>
struct C
{
N::A f2; // { dg-error "3:invalid use of template-name 'N::A' without an argument list" }
- N::INVALID f3; // { dg-error "3:'INVALID' in namespace 'N' does not name a type" }
- N::C::INVALID f4; // { dg-error "3:'INVALID' in 'struct N::C' does not name a type" }
- N::K f6; // { dg-error "3:'K' in namespace 'N' does not name a type" }
+ N::INVALID f3; // { dg-error "6:'INVALID' in namespace 'N' does not name a type" }
+ N::C::INVALID f4; // { dg-error "9:'INVALID' in 'struct N::C' does not name a type" }
+ N::K f6; // { dg-error "6:'K' in namespace 'N' does not name a type" }
typename N::A f7; // { dg-error "15:invalid use of template-name 'N::A' without an argument list" }
};
diff --git a/gcc/testsuite/g++.dg/parse/error19.C b/gcc/testsuite/g++.dg/parse/error19.C
index 010a4032e7..6d84f71424 100644
--- a/gcc/testsuite/g++.dg/parse/error19.C
+++ b/gcc/testsuite/g++.dg/parse/error19.C
@@ -10,6 +10,6 @@ const A& foo();
void bar()
{
- foo()=A(0); // { dg-error "12:no match for 'operator='" }
+ foo()=A(0); // { dg-error "8:no match for 'operator='" }
// { dg-message "candidate" "candidate note" { target *-*-* } 13 }
}
diff --git a/gcc/testsuite/g++.dg/parse/error26.C b/gcc/testsuite/g++.dg/parse/error26.C
index befaf3bb3b..1084e76d34 100644
--- a/gcc/testsuite/g++.dg/parse/error26.C
+++ b/gcc/testsuite/g++.dg/parse/error26.C
@@ -4,7 +4,7 @@
void foo()
{
if (({int c[2];})) ; // { dg-error "7:ISO C.. forbids" "7" }
- // { dg-error "20:could not convert" "20" { target *-*-* } 6 }
+ // { dg-error "17:could not convert" "17" { target *-*-* } 6 }
}
void bar()
diff --git a/gcc/testsuite/g++.dg/parse/error3.C b/gcc/testsuite/g++.dg/parse/error3.C
index 5873993415..938ab45b24 100644
--- a/gcc/testsuite/g++.dg/parse/error3.C
+++ b/gcc/testsuite/g++.dg/parse/error3.C
@@ -5,5 +5,4 @@ static void InstantiateConstraint(const float&, unsigned,
void(*AddFunction)(const TYPE&,bool&,
char*, char*,
unsigned*));
-// { dg-error "64: ISO C\\+\\+ forbids declaration of 'parameter' with no type" "forbids" { target *-*-* } { 5 } }
// { dg-error "60: 'TYPE' does not name a type" "does not" { target *-*-* } { 5 } }
diff --git a/gcc/testsuite/g++.dg/parse/error30.C b/gcc/testsuite/g++.dg/parse/error30.C
index 26c55c49c6..aabdcc701c 100644
--- a/gcc/testsuite/g++.dg/parse/error30.C
+++ b/gcc/testsuite/g++.dg/parse/error30.C
@@ -8,5 +8,5 @@ struct A
A(int);
};
-A a = -A(); // { dg-error "10:no match for.*operator-.*in.*-A\\(\\)" }
-A b = -A(5); // { dg-error "11:no match for.*operator-.*in.*-A\\(5\\)" }
+A a = -A(); // { dg-error "operand type is 'A'" }
+A b = -A(5); // { dg-error "operand type is 'A'" }
diff --git a/gcc/testsuite/g++.dg/parse/error36.C b/gcc/testsuite/g++.dg/parse/error36.C
index a99ad299d3..92e27a928d 100644
--- a/gcc/testsuite/g++.dg/parse/error36.C
+++ b/gcc/testsuite/g++.dg/parse/error36.C
@@ -26,7 +26,6 @@ template <class T> struct B
// PR c++/40738
template <class T>
void g(const A<T>::type &t); // { dg-error "typename" "typename" }
-// { dg-error "no type" "no type" { target *-*-* } 28 }
// PR c++/18451
template <class T> A<T>::B A<T>::b; // { dg-error "typename" }
diff --git a/gcc/testsuite/g++.dg/parse/error47.C b/gcc/testsuite/g++.dg/parse/error47.C
new file mode 100644
index 0000000000..44f14c4e4e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error47.C
@@ -0,0 +1,9 @@
+struct T { };
+
+T foo();
+
+void bar(int a, int b)
+{
+ if (foo() && a < b) // { dg-error "13:no match for 'operator&&'" }
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/parse/error48.C b/gcc/testsuite/g++.dg/parse/error48.C
new file mode 100644
index 0000000000..8f26bed9c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error48.C
@@ -0,0 +1,10 @@
+// PR c++/44516
+
+struct WebService { };
+struct Server { };
+
+void addHTTPService(Server const &server,
+ WebService const *http)
+{
+ server += http; // { dg-error "10:no match for 'operator\\+='" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/error49.C b/gcc/testsuite/g++.dg/parse/error49.C
new file mode 100644
index 0000000000..9d392afa84
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error49.C
@@ -0,0 +1,6 @@
+// PR c++/39681
+
+int main()
+{
+ int* p = new foo; // { dg-error "16:type" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/error50.C b/gcc/testsuite/g++.dg/parse/error50.C
new file mode 100644
index 0000000000..dbd8958c36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error50.C
@@ -0,0 +1,18 @@
+// PR c++/18747
+
+template<> int i; // { dg-error "template" }
+
+struct A
+{
+ static int i;
+};
+
+template<> int A::i; // { dg-error "template" }
+
+template <class T>
+struct B
+{
+ static T i;
+};
+
+template<> template <> int B<int>::i; // { dg-error "should be 1" }
diff --git a/gcc/testsuite/g++.dg/parse/error51.C b/gcc/testsuite/g++.dg/parse/error51.C
new file mode 100644
index 0000000000..e599304b6d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error51.C
@@ -0,0 +1,13 @@
+// PR c++/14283
+
+struct A
+{};
+
+namespace N
+{}
+
+template <typename> struct C
+{
+ typedef A::template INVALID<void> X0; // { dg-error "23:'INVALID' in 'struct A' does not name a template type" }
+ typedef N::template INVALID<void> X1; // { dg-error "23:'INVALID' in namespace 'N' does not name a template type" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/error52.C b/gcc/testsuite/g++.dg/parse/error52.C
new file mode 100644
index 0000000000..d1c6e4a857
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error52.C
@@ -0,0 +1,11 @@
+// PR c++/12288
+
+class X {};
+
+struct S {
+ explicit S (const X::T&) {} // { dg-error "does not name a type" }
+};
+
+class Y {};
+
+typedef Y::T xt; // { dg-error "does not name a type" }
diff --git a/gcc/testsuite/g++.dg/parse/error53.C b/gcc/testsuite/g++.dg/parse/error53.C
new file mode 100644
index 0000000000..3d6fe64c1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/error53.C
@@ -0,0 +1,3 @@
+// PR c++/43652
+
+static const char const * stdin_name = "<stdin>"; // { dg-error "19:duplicate" }
diff --git a/gcc/testsuite/g++.dg/parse/fn-typedef2.C b/gcc/testsuite/g++.dg/parse/fn-typedef2.C
index c9c7f060d0..6bb83024b9 100644
--- a/gcc/testsuite/g++.dg/parse/fn-typedef2.C
+++ b/gcc/testsuite/g++.dg/parse/fn-typedef2.C
@@ -4,4 +4,4 @@ typedef void ft() const;
typedef void V;
typedef V ft() const;
-ft f; // { dg-error "qualified" }
+ft f; // { dg-error "cv-qualifier" }
diff --git a/gcc/testsuite/g++.dg/parse/friend-main.C b/gcc/testsuite/g++.dg/parse/friend-main.C
new file mode 100644
index 0000000000..e6d32e71ba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/friend-main.C
@@ -0,0 +1,30 @@
+// PR c++/24449
+
+class Fooa
+{
+ friend int main();
+};
+
+template <class T> class Foob
+{
+ friend int main();
+ int i;
+};
+
+int main()
+{
+ Foob<void> a;
+ a.i = 7;
+}
+
+class Fooc
+{
+ template<class T> friend int main(); // { dg-error "cannot declare .::main. to be a template" }
+};
+
+template<class T> class Food
+{
+ template<class U> friend int main(); // { dg-error "cannot declare .::main. to be a template" }
+};
+
+template<class U> int main() {} // { dg-error "cannot declare .::main. to be a template" }
diff --git a/gcc/testsuite/g++.dg/parse/friend5.C b/gcc/testsuite/g++.dg/parse/friend5.C
index bf1e6bfa6d..43f06129b2 100644
--- a/gcc/testsuite/g++.dg/parse/friend5.C
+++ b/gcc/testsuite/g++.dg/parse/friend5.C
@@ -2,6 +2,6 @@
extern "C" struct A
{
- friend void foo(int) {} // { dg-error "declaration" }
+ friend void foo(int) {} // { dg-message "declaration" }
friend void foo() {} // { dg-error "foo" "err" }
};
diff --git a/gcc/testsuite/g++.dg/parse/ivdep.C b/gcc/testsuite/g++.dg/parse/ivdep.C
new file mode 100644
index 0000000000..23d51de9fe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ivdep.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+
+/* PR other/33426 */
+
+void foo(int n, int *a, int *b, int *c, int *d, int *e) {
+ int i, j;
+#pragma GCC ivdep
+ for (i = 0; ; ++i) { /* { dg-error "missing loop condition in loop with 'GCC ivdep' pragma before ';' token" } */
+ a[i] = b[i] + c[i];
+ }
+}
diff --git a/gcc/testsuite/g++.dg/parse/namespace-alias-1.C b/gcc/testsuite/g++.dg/parse/namespace-alias-1.C
new file mode 100644
index 0000000000..4b443359a6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/namespace-alias-1.C
@@ -0,0 +1,7 @@
+// PR c++/26155
+
+namespace N
+{
+ namespace M = N; // { dg-message "previous declaration" }
+ namespace M {} // { dg-error "declaration of namespace" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/namespace10.C b/gcc/testsuite/g++.dg/parse/namespace10.C
index 9f93d1b689..5e9541adb1 100644
--- a/gcc/testsuite/g++.dg/parse/namespace10.C
+++ b/gcc/testsuite/g++.dg/parse/namespace10.C
@@ -1,6 +1,6 @@
// PR c++/16529
-namespace m {} // { dg-error "" }
+namespace m {} // { dg-message "" }
namespace n {
namespace m {}
diff --git a/gcc/testsuite/g++.dg/parse/non-dependent2.C b/gcc/testsuite/g++.dg/parse/non-dependent2.C
index fee66d495a..a2ae81d7f8 100644
--- a/gcc/testsuite/g++.dg/parse/non-dependent2.C
+++ b/gcc/testsuite/g++.dg/parse/non-dependent2.C
@@ -8,14 +8,14 @@
template <class T>
struct Foo {
int j; // we never see this one.
- int k; // { dg-error "Foo" "" }
+ int k; // { dg-message "Foo" "" }
};
struct Baz
{
int j;
- int k; // { dg-error "candidates" "" }
+ int k; // { dg-message "candidates" "" }
};
diff --git a/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C b/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
index 6116630433..3c983cc748 100644
--- a/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
+++ b/gcc/testsuite/g++.dg/parse/parameter-declaration-2.C
@@ -1,2 +1,2 @@
-void f (int i, int p[i]); // { dg-error "use of parameter .i. outside function body" }
+void f (int i, int p[i]); // { dg-error "use of parameter.*outside function body" }
// { dg-prune-output "array bound" }
diff --git a/gcc/testsuite/g++.dg/parse/parser-pr28152-2.C b/gcc/testsuite/g++.dg/parse/parser-pr28152-2.C
index a5bbb9288c..c6bc5d39bf 100644
--- a/gcc/testsuite/g++.dg/parse/parser-pr28152-2.C
+++ b/gcc/testsuite/g++.dg/parse/parser-pr28152-2.C
@@ -7,7 +7,5 @@ main (void)
__complex__ float z;
z = __complex__ (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '__complex__'" "primary-expression" }
- // { dg-error "expected .;. before .__complex__." "semicolon" { target *-*-* } 9 }
z = __complex__ (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '__complex__'" "primaty-expression" }
- // { dg-error "expected .;. before '__complex__'" "semicolon" { target *-*-* } 11 }
- // { dg-error "at end of input" "end" { target *-*-* } 11 }
+ // { dg-error "at end of input" "end" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/parse/parser-pr28152.C b/gcc/testsuite/g++.dg/parse/parser-pr28152.C
index 4a7c77e45a..4d08fd0633 100644
--- a/gcc/testsuite/g++.dg/parse/parser-pr28152.C
+++ b/gcc/testsuite/g++.dg/parse/parser-pr28152.C
@@ -7,7 +7,5 @@ main (void)
_Complex float z;
z = _Complex (1.90000007326203904e+19, 0.0); // { dg-error "expected primary-expression before '_Complex'" "primary-expression" }
- // { dg-error "expected .;. before ._Complex." "semicolon" { target *-*-* } 9 }
z = _Complex (1.0e+0, 0.0) / z; // { dg-error "expected primary-expression before '_Complex'" "primary-expression" }
- // { dg-error "expected .;. before '_Complex'" "semicolon" { target *-*-* } 11 }
- // { dg-error "at end of input" "end" { target *-*-* } 11 }
+ // { dg-error "at end of input" "end" { target *-*-* } 10 }
diff --git a/gcc/testsuite/g++.dg/parse/pr18770.C b/gcc/testsuite/g++.dg/parse/pr18770.C
index df57be4b29..71d95e3311 100644
--- a/gcc/testsuite/g++.dg/parse/pr18770.C
+++ b/gcc/testsuite/g++.dg/parse/pr18770.C
@@ -11,7 +11,7 @@ extern int j;
void
e0 (void)
{
- for (int i = 0; // { dg-error "previously declared here" "prev" }
+ for (int i = 0; // { dg-message "previously declared here" "prev" }
i < 10; ++i)
{
int i = 2; // { dg-error "redeclaration" "redecl" }
@@ -24,7 +24,7 @@ e1 (void)
{
int i;
for (i = 0;
- int k = j; i++) // { dg-error "previously declared here" "prev" }
+ int k = j; i++) // { dg-message "previously declared here" "prev" }
{
int k = 2; // { dg-error "redeclaration" "redecl" }
foo (k);
@@ -34,7 +34,7 @@ e1 (void)
void
e2 (void)
{
- if (int i = 1) // { dg-error "previously declared here" "prev" }
+ if (int i = 1) // { dg-message "previously declared here" "prev" }
{
int i = 2; // { dg-error "redeclaration" "redecl" }
foo (i);
@@ -44,7 +44,7 @@ e2 (void)
void
e3 (void)
{
- if (int i = 1) // { dg-error "previously declared here" "prev" }
+ if (int i = 1) // { dg-message "previously declared here" "prev" }
{
foo (i);
}
@@ -58,7 +58,7 @@ e3 (void)
void
e4 (void)
{
- while (int i = 1) // { dg-error "previously declared here" "prev" }
+ while (int i = 1) // { dg-message "previously declared here" "prev" }
{
int i = 2; // { dg-error "redeclaration" "redecl" }
foo (i);
@@ -68,7 +68,7 @@ e4 (void)
void
e5 (void)
{
- switch (int i = j) // { dg-error "previously declared here" "prev" }
+ switch (int i = j) // { dg-message "previously declared here" "prev" }
{
int i; // { dg-error "redeclaration" "redecl" }
default:
diff --git a/gcc/testsuite/g++.dg/parse/pr29234.C b/gcc/testsuite/g++.dg/parse/pr29234.C
new file mode 100644
index 0000000000..d2dc735f22
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr29234.C
@@ -0,0 +1,16 @@
+// PR c++/29234
+
+struct S { void operator()(); };
+
+void foo ()
+{
+ ( S()() );
+}
+
+struct C { void operator[](C); };
+
+void bar ()
+{
+ C x;
+ ( C()[x] );
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr31952-1.C b/gcc/testsuite/g++.dg/parse/pr31952-1.C
new file mode 100644
index 0000000000..aad3a11a77
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr31952-1.C
@@ -0,0 +1,41 @@
+// PR c++/31952
+
+int
+f0 (int bar) // { dg-message "previously" }
+try
+{
+ return 0;
+}
+catch (...)
+{
+ int bar = 0; // { dg-error "redeclaration" }
+ return 1;
+}
+
+int
+f1 (int bar)
+try
+{
+ return 0;
+}
+catch (...)
+{
+ {
+ int bar = 0; // Ok, not outermost block.
+ }
+ return 1;
+}
+
+int
+f2 (int bar)
+{
+ try
+ {
+ return 0;
+ }
+ catch (...)
+ {
+ int bar = 0; // Ok, not a function-try-block.
+ return 1;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr31952-2.C b/gcc/testsuite/g++.dg/parse/pr31952-2.C
new file mode 100644
index 0000000000..f09bcab1b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr31952-2.C
@@ -0,0 +1,49 @@
+// PR c++/31952
+
+void
+f0()
+{
+ try
+ {
+ }
+ catch (void *e) // { dg-message "previously" }
+ {
+ void *e; // { dg-error "redeclaration" }
+ }
+}
+
+void
+f1()
+{
+ try
+ {
+ }
+ catch (void *e)
+ {
+ {
+ void *e; // Ok, not outermost block.
+ }
+ }
+}
+
+void
+f2()
+try
+{
+}
+catch (void *e) // { dg-message "previously" }
+{
+ void *e; // { dg-error "redeclaration" }
+}
+
+void
+f3()
+try
+{
+}
+catch (void *e)
+{
+ {
+ void *e; // Ok, not outermost block.
+ }
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr31952-3.C b/gcc/testsuite/g++.dg/parse/pr31952-3.C
new file mode 100644
index 0000000000..9fe5f02837
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr31952-3.C
@@ -0,0 +1,25 @@
+// PR c++/31952
+
+int
+f0 (int bar) // { dg-message "previously" }
+try
+{
+ return 0;
+}
+catch (int bar) // { dg-error "redeclaration" }
+{
+ return 1;
+}
+
+int
+f1 (int bar)
+{
+ try
+ {
+ return 0;
+ }
+ catch (int bar) // Ok, not a function-try-block.
+ {
+ return 1;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr43765.C b/gcc/testsuite/g++.dg/parse/pr43765.C
new file mode 100644
index 0000000000..0b341ddb8a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr43765.C
@@ -0,0 +1,14 @@
+// PR c++/43765
+// { dg-options "" }
+
+struct SomeType
+{
+ const char *values[];
+};
+const char *temp[] = {"607", "612", 0};
+
+SomeType vals[] =
+ {
+ { values : temp, },
+ 0
+ }; // { dg-error "invalid" }
diff --git a/gcc/testsuite/g++.dg/parse/pr52071.C b/gcc/testsuite/g++.dg/parse/pr52071.C
new file mode 100644
index 0000000000..99456c0041
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr52071.C
@@ -0,0 +1,23 @@
+// PR c++/52071
+
+struct C1 {
+ C1(int);
+};
+
+struct C2 {
+ C2();
+ C2(C1);
+};
+
+void f()
+{
+ int x;
+ int y = 1;
+ C2 vc;
+
+ vc = C2(C1(x = y));
+
+ vc = (C2(C1(x = y)));
+
+ vc = (C2(C1((0, x = y))));
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr56037.C b/gcc/testsuite/g++.dg/parse/pr56037.C
new file mode 100644
index 0000000000..10f145ae5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr56037.C
@@ -0,0 +1,12 @@
+// PR c++/56037
+
+struct T
+{
+ T(int, int);
+};
+
+int main()
+{
+ static const int zero = 0;
+ (T(int(zero), int(zero)));
+}
diff --git a/gcc/testsuite/g++.dg/parse/pr58705.C b/gcc/testsuite/g++.dg/parse/pr58705.C
new file mode 100644
index 0000000000..de2b396a5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/pr58705.C
@@ -0,0 +1,5 @@
+// PR c++/58705
+// { dg-do compile }
+// { dg-options "-Wnarrowing" }
+
+_Complex float f = {{}};
diff --git a/gcc/testsuite/g++.dg/parse/redef2.C b/gcc/testsuite/g++.dg/parse/redef2.C
index 2435672d14..85c5064455 100644
--- a/gcc/testsuite/g++.dg/parse/redef2.C
+++ b/gcc/testsuite/g++.dg/parse/redef2.C
@@ -1,6 +1,6 @@
// { dg-do compile }
-char * d [10]; // { dg-error "8: 'd' has a previous declaration as" }
+char * d [10]; // { dg-message "8: previous declaration as" }
char e [15][10];
int (*f)();
diff --git a/gcc/testsuite/g++.dg/parse/ref-qual1.C b/gcc/testsuite/g++.dg/parse/ref-qual1.C
new file mode 100644
index 0000000000..e3f60c09c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ref-qual1.C
@@ -0,0 +1,29 @@
+// PR c++/57068
+
+enum Enums {
+ Enum1 = 0x00000000,
+ Enum2 = 0x00000001
+};
+
+class Flags {
+public:
+ Flags() : i(0) {}
+ Flags(int i): i(i) {}
+ Flags operator&(Enums f) { return Flags(Enums(i & f)); }
+
+ operator bool() { return i; }
+private:
+ int i;
+};
+
+Flags windowState()
+{
+ return Flags();
+}
+
+int main()
+{
+ if (bool(windowState() & Enum1) == true)
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/parse/ref-qual2.C b/gcc/testsuite/g++.dg/parse/ref-qual2.C
new file mode 100644
index 0000000000..a78597b0cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/ref-qual2.C
@@ -0,0 +1,6 @@
+// PR c++/57532
+
+int main()
+{
+ return (int() & int());
+}
diff --git a/gcc/testsuite/g++.dg/parse/struct-5.C b/gcc/testsuite/g++.dg/parse/struct-5.C
new file mode 100644
index 0000000000..4cd1b5d33c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/struct-5.C
@@ -0,0 +1,3 @@
+// PR c++/55368
+
+struct A { struct B *C,; }; // { dg-error "stray" }
diff --git a/gcc/testsuite/g++.dg/parse/struct-as-enum1.C b/gcc/testsuite/g++.dg/parse/struct-as-enum1.C
index f58c738819..a6cb6b592d 100644
--- a/gcc/testsuite/g++.dg/parse/struct-as-enum1.C
+++ b/gcc/testsuite/g++.dg/parse/struct-as-enum1.C
@@ -4,7 +4,7 @@
namespace N
{
- struct A {}; // { dg-error "previous declaration" }
+ struct A {}; // { dg-message "previous declaration" }
}
typedef enum N::A B; // { dg-error "enum|invalid type" }
diff --git a/gcc/testsuite/g++.dg/parse/template21.C b/gcc/testsuite/g++.dg/parse/template21.C
index 963d269028..af2194cb9e 100644
--- a/gcc/testsuite/g++.dg/parse/template21.C
+++ b/gcc/testsuite/g++.dg/parse/template21.C
@@ -2,4 +2,4 @@
template <const int*> class Helper { };
const int foo = 0;
-typedef Helper<&foo> HelperType; // { dg-error "linkage|type" "" { target c++98 } }
+typedef Helper<&foo> HelperType; // { dg-error "linkage|type" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/parse/template23.C b/gcc/testsuite/g++.dg/parse/template23.C
index 893d78d15d..9f76d0ddf7 100644
--- a/gcc/testsuite/g++.dg/parse/template23.C
+++ b/gcc/testsuite/g++.dg/parse/template23.C
@@ -5,6 +5,6 @@ template<int> struct A {};
template<typename T> struct B
{
- A<T(0i)> a1; /* { dg-error "imaginary constants are a GCC extension" } */
- A<T(0i)> a2; /* { dg-error "imaginary constants are a GCC extension" } */
+ A<T(0i)> a1; /* { dg-error "imaginary constants are a GCC extension|literal operator" } */
+ A<T(0i)> a2; /* { dg-error "imaginary constants are a GCC extension|literal operator" } */
};
diff --git a/gcc/testsuite/g++.dg/parse/template25.C b/gcc/testsuite/g++.dg/parse/template25.C
index 0da3887c3a..03017ab3a6 100644
--- a/gcc/testsuite/g++.dg/parse/template25.C
+++ b/gcc/testsuite/g++.dg/parse/template25.C
@@ -10,5 +10,4 @@ void f(void)
void g(void)
{
template f<int>(); /* { dg-error "expected primary-expression" "primary-expression" } */
- /* { dg-error "expected ';'" "semicolon" { target *-*-* } 12 } */
}
diff --git a/gcc/testsuite/g++.dg/parse/template27.C b/gcc/testsuite/g++.dg/parse/template27.C
new file mode 100644
index 0000000000..8eee471ffb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/template27.C
@@ -0,0 +1,12 @@
+// PR c++/53563
+
+template<class T>
+struct s
+{
+ template<class U>
+ s(){}
+};
+
+int main() {
+ struct s<void>::s<int> a; // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/parse/tmpl-outside1.C b/gcc/testsuite/g++.dg/parse/tmpl-outside1.C
index e63e3cd441..b628f99729 100644
--- a/gcc/testsuite/g++.dg/parse/tmpl-outside1.C
+++ b/gcc/testsuite/g++.dg/parse/tmpl-outside1.C
@@ -7,4 +7,4 @@ struct X
template <int i> struct Y {};
};
-typedef X::template Y<0> y; // { dg-error "template|invalid" }
+typedef X::template Y<0> y; // { dg-error "template|invalid" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.dg/parse/tmpl-outside2.C b/gcc/testsuite/g++.dg/parse/tmpl-outside2.C
new file mode 100644
index 0000000000..21f1ac04fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/tmpl-outside2.C
@@ -0,0 +1,19 @@
+// PR c++/50080
+
+template <typename T>
+struct A
+{
+ template <typename U>
+ struct B {};
+};
+
+template <typename T>
+void test()
+{
+ typename A<T>::template B<int> b;
+}
+
+int main()
+{
+ typename A<double>::template B<int> b; // { dg-error "template|expected" "" { target { ! c++11 } } }
+}
diff --git a/gcc/testsuite/g++.dg/parse/typename7.C b/gcc/testsuite/g++.dg/parse/typename7.C
index 2d823f8078..e49a1ec393 100644
--- a/gcc/testsuite/g++.dg/parse/typename7.C
+++ b/gcc/testsuite/g++.dg/parse/typename7.C
@@ -7,10 +7,9 @@
struct A
{
- template<typename> void foo(int); // { dg-message "note" }
- template<typename T> void bar(T t) { // { dg-message "note" }
+ template<typename> void foo(int);
+ template<typename T> void bar(T t) {
this->foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 12 }
template<typename T> void bad(T t) {
foo<typename T>(t); } // { dg-error "expected|parse error|no matching" }
};
@@ -20,9 +19,8 @@ struct B
{
void bar(T t) {
A().bar<typename T>(t); } // { dg-error "expected|parse error|no matching" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 22 }
void bad(T t) {
- B<typename T>::bar(t); } // { dg-error "invalid|not a template" }
+ B<typename T>::bar(t); } // { dg-error "invalid|qualified-id|not a template" }
};
void baz()
diff --git a/gcc/testsuite/g++.dg/parse/unnamed1.C b/gcc/testsuite/g++.dg/parse/unnamed1.C
new file mode 100644
index 0000000000..f5972f11b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/unnamed1.C
@@ -0,0 +1,6 @@
+// 9.4.2/4: Unnamed classes and classes contained directly or indirectly
+// within unnamed classes shall not contain static data members.
+
+typedef struct { // { dg-message "unnamed" }
+ static int i; // { dg-error "static data member" }
+} A;
diff --git a/gcc/testsuite/g++.dg/parse/unnamed2.C b/gcc/testsuite/g++.dg/parse/unnamed2.C
new file mode 100644
index 0000000000..d2b96f896f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/unnamed2.C
@@ -0,0 +1,6 @@
+// PR c++/30301
+
+template<int T> struct A
+{
+ union { static int i; }; // { dg-error "static data.*unnamed" }
+};
diff --git a/gcc/testsuite/g++.dg/parse/using4.C b/gcc/testsuite/g++.dg/parse/using4.C
new file mode 100644
index 0000000000..2abe399f8d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/parse/using4.C
@@ -0,0 +1,20 @@
+// PR c++/58457
+
+struct allocator
+{
+ void operator delete (void*);
+ void* operator new (__SIZE_TYPE__, void*);
+};
+
+struct type : public allocator
+{
+ type() {}
+ using allocator::operator new;
+ using allocator::operator delete;
+};
+
+int main()
+{
+ new (0) type;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/pch/pch.exp b/gcc/testsuite/g++.dg/pch/pch.exp
index 209a6a52c1..dd7466354b 100644
--- a/gcc/testsuite/g++.dg/pch/pch.exp
+++ b/gcc/testsuite/g++.dg/pch/pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@ load_lib dg-pch.exp
# Initialize `dg'.
dg-init
+pch-init
set old_dg_do_what_default "${dg-do-what-default}"
@@ -36,4 +37,5 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.C]] {
set dg-do-what-default "$old_dg_do_what_default"
# All done.
+pch-finish
dg-finish
diff --git a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
index 5bbd5d790f..e197d66725 100644
--- a/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
+++ b/gcc/testsuite/g++.dg/plugin/dumb_plugin.c
@@ -11,6 +11,7 @@
#include "intl.h"
#include "toplev.h"
#include "diagnostic.h"
+#include "context.h"
int plugin_is_GPL_compatible;
@@ -57,25 +58,44 @@ gate_dumb_plugin_example (void)
return true;
}
-static struct gimple_opt_pass pass_dumb_plugin_example =
+namespace {
+
+const pass_data pass_data_dumb_plugin_example =
{
- {
- GIMPLE_PASS,
- "dumb_plugin_example", /* name */
- gate_dumb_plugin_example, /* gate */
- execute_dumb_plugin_example, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_NONE, /* tv_id */
- PROP_cfg, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "dumb_plugin_example", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ PROP_cfg, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
};
+class pass_dumb_plugin_example : public gimple_opt_pass
+{
+public:
+ pass_dumb_plugin_example(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_dumb_plugin_example, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_dumb_plugin_example (); }
+ unsigned int execute () { return execute_dumb_plugin_example (); }
+
+}; // class pass_dumb_plugin_example
+
+} // anon namespace
+
+static gimple_opt_pass *
+make_pass_dumb_plugin_example (gcc::context *ctxt)
+{
+ return new pass_dumb_plugin_example (ctxt);
+}
+
/* Initialization function that GCC calls. This plugin takes an argument
that specifies the name of the reference pass and an instance number,
both of which determine where the plugin pass should be inserted. */
@@ -123,7 +143,7 @@ plugin_init (struct plugin_name_args *plugin_info,
return 1;
}
- pass_info.pass = &pass_dumb_plugin_example.pass;
+ pass_info.pass = make_pass_dumb_plugin_example (g);
pass_info.reference_pass_name = ref_pass_name;
pass_info.ref_pass_instance_number = ref_instance_number;
pass_info.pos_op = PASS_POS_INSERT_AFTER;
diff --git a/gcc/testsuite/g++.dg/plugin/header_plugin.c b/gcc/testsuite/g++.dg/plugin/header_plugin.c
index a464827dee..a024194e19 100644
--- a/gcc/testsuite/g++.dg/plugin/header_plugin.c
+++ b/gcc/testsuite/g++.dg/plugin/header_plugin.c
@@ -17,7 +17,6 @@
#include "c-family/c-pretty-print.h"
#include "tree-iterator.h"
#include "plugin.h"
-#include "tree-flow.h"
#include "langhooks.h"
#include "cp/cxx-pretty-print.h"
#include "cp/name-lookup.h"
diff --git a/gcc/testsuite/g++.dg/plugin/plugin.exp b/gcc/testsuite/g++.dg/plugin/plugin.exp
index fb962dfdea..e97fb76a27 100644
--- a/gcc/testsuite/g++.dg/plugin/plugin.exp
+++ b/gcc/testsuite/g++.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -31,7 +31,7 @@ if { ![info exists TESTING_IN_BUILD_TREE] || ![info exists ENABLE_PLUGIN] } {
# If a testcase doesn't have special options, use these.
global DEFAULT_CXXFLAGS
if ![info exists DEFAULT_CXXFLAGS] then {
- set DEFAULT_CXXFLAGS " -ansi -pedantic-errors -Wno-long-long"
+ set DEFAULT_CXXFLAGS " -pedantic-errors -Wno-long-long"
}
# The procedures in plugin-support.exp need these parameters.
diff --git a/gcc/testsuite/g++.dg/plugin/selfassign.c b/gcc/testsuite/g++.dg/plugin/selfassign.c
index 84d2801d20..041f25dce3 100644
--- a/gcc/testsuite/g++.dg/plugin/selfassign.c
+++ b/gcc/testsuite/g++.dg/plugin/selfassign.c
@@ -7,14 +7,29 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "tree.h"
+#include "stringpool.h"
#include "toplev.h"
#include "basic-block.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
+#include "gimple-iterator.h"
#include "tree.h"
#include "tree-pass.h"
#include "intl.h"
#include "plugin-version.h"
#include "diagnostic.h"
+#include "context.h"
int plugin_is_GPL_compatible;
@@ -46,7 +61,7 @@ get_real_ref_rhs (tree expr)
e.g. D.1797_14, we need to grab the rhs of its SSA def
statement (i.e. foo.x). */
tree vdecl = SSA_NAME_VAR (expr);
- if (DECL_ARTIFICIAL (vdecl)
+ if ((!vdecl || DECL_ARTIFICIAL (vdecl))
&& !gimple_nop_p (SSA_NAME_DEF_STMT (expr)))
{
gimple def_stmt = SSA_NAME_DEF_STMT (expr);
@@ -86,6 +101,8 @@ get_real_ref_rhs (tree expr)
static tree
get_non_ssa_expr (tree expr)
{
+ if (!expr)
+ return NULL_TREE;
switch (TREE_CODE (expr))
{
case VAR_DECL:
@@ -149,7 +166,7 @@ get_non_ssa_expr (tree expr)
case SSA_NAME:
{
tree vdecl = SSA_NAME_VAR (expr);
- if (DECL_ARTIFICIAL (vdecl)
+ if ((!vdecl || DECL_ARTIFICIAL (vdecl))
&& !gimple_nop_p (SSA_NAME_DEF_STMT (expr)))
{
gimple def_stmt = SSA_NAME_DEF_STMT (expr);
@@ -209,7 +226,7 @@ warn_self_assign (gimple stmt)
if (TREE_CODE (lhs) == SSA_NAME)
{
lhs = SSA_NAME_VAR (lhs);
- if (DECL_ARTIFICIAL (lhs))
+ if (!lhs || DECL_ARTIFICIAL (lhs))
return;
}
@@ -244,7 +261,7 @@ execute_warn_self_assign (void)
gimple_stmt_iterator gsi;
basic_block bb;
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
warn_self_assign (gsi_stmt (gsi));
@@ -261,25 +278,44 @@ gate_warn_self_assign (void)
return true;
}
-static struct gimple_opt_pass pass_warn_self_assign =
+namespace {
+
+const pass_data pass_data_warn_self_assign =
{
- {
- GIMPLE_PASS,
- "warn_self_assign", /* name */
- gate_warn_self_assign, /* gate */
- execute_warn_self_assign, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_NONE, /* tv_id */
- PROP_ssa, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "warn_self_assign", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
};
+class pass_warn_self_assign : public gimple_opt_pass
+{
+public:
+ pass_warn_self_assign(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_warn_self_assign, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_warn_self_assign (); }
+ unsigned int execute () { return execute_warn_self_assign (); }
+
+}; // class pass_warn_self_assign
+
+} // anon namespace
+
+static gimple_opt_pass *
+make_pass_warn_self_assign (gcc::context *ctxt)
+{
+ return new pass_warn_self_assign (ctxt);
+}
+
/* The initialization routine exposed to and called by GCC. The spec of this
function is defined in gcc/gcc-plugin.h.
@@ -306,7 +342,7 @@ plugin_init (struct plugin_name_args *plugin_info,
return 1;
/* Self-assign detection should happen after SSA is constructed. */
- pass_info.pass = &pass_warn_self_assign.pass;
+ pass_info.pass = make_pass_warn_self_assign (g);
pass_info.reference_pass_name = "ssa";
pass_info.ref_pass_instance_number = 1;
pass_info.pos_op = PASS_POS_INSERT_AFTER;
diff --git a/gcc/testsuite/g++.dg/pr49718.C b/gcc/testsuite/g++.dg/pr49718.C
new file mode 100644
index 0000000000..b1cc5deb7a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr49718.C
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -finstrument-functions" } */
+/* { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } } */
+/* { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter" 1 { target { ! { hppa*-*-hpux* } } } } } */
+/* { dg-final { scan-assembler-times "__cyg_profile_func_enter,%r" 1 { target hppa*-*-hpux* } } } */
+
+#define NOINSTR __attribute__((no_instrument_function))
+
+struct t
+{
+ public:
+ /* Function code should be instrumented */
+ __attribute__((noinline)) t() {}
+
+ /* Function t::a() should not be instrumented */
+ NOINSTR void a(){
+ }
+ /* Function t::b() should not be instrumented */
+ void NOINSTR b(){
+ }
+ /* Function t::c() should not be instrumented */
+ void c() NOINSTR {
+ }
+ /* Function t::d() should not be instrumented */
+ void d() NOINSTR;
+};
+
+void t::d()
+{
+}
+
+/* Function call_all_functions() should not be instrumented */
+struct t call_all_functions() __attribute__((no_instrument_function));
+struct t call_all_functions()
+{
+ struct t a; /* Constructor not inlined */
+ a.a(); /* Inlined t::a() should not be instrumented */
+ a.b(); /* Inlined t::b() should not be instrumented */
+ a.c(); /* Inlined t::c() should not be instrumented */
+ a.d(); /* Inlined t::d() should not be instrumented */
+ return a;
+}
+
diff --git a/gcc/testsuite/g++.dg/pr49847.C b/gcc/testsuite/g++.dg/pr49847.C
new file mode 100644
index 0000000000..b047713c30
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr49847.C
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fnon-call-exceptions" } */
+int f (float g)
+{
+ try { return g >= 0; }
+ catch (...) {}
+}
diff --git a/gcc/testsuite/g++.dg/pr51264-4.C b/gcc/testsuite/g++.dg/pr51264-4.C
new file mode 100644
index 0000000000..58a1b14c40
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr51264-4.C
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -Werror -Wreturn-type" } */
+
+/* Test-case from http://gcc.gnu.org/bugzilla/show_bug.cgi?id=25973#c4. */
+
+struct Block
+{
+ public:
+ Block ();
+ ~Block ();
+};
+
+bool func (bool bar)
+{
+ Block block;
+ bool foo = false;
+
+ if (!foo || bar)
+ do
+ {
+ return true;
+ }
+ while (0);
+ else
+ do
+ {
+ return false;
+ }
+ while (0);
+}
diff --git a/gcc/testsuite/g++.dg/pr53055.C b/gcc/testsuite/g++.dg/pr53055.C
new file mode 100644
index 0000000000..787af9d156
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr53055.C
@@ -0,0 +1,5 @@
+// PR c++/53055
+// { dg-do compile }
+
+struct A A :: * p ;
+int i = p ->* p ; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/pr54655.C b/gcc/testsuite/g++.dg/pr54655.C
new file mode 100644
index 0000000000..5fd5aee9b4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr54655.C
@@ -0,0 +1,35 @@
+// { dg-do compile }
+/* { dg-options "-O1" } */
+
+extern "C" class A
+{
+};
+
+template <typename T> class B:A
+{
+public:
+ B (int *, T);
+ ~B ()
+ {
+ }
+};
+
+bool a;
+
+inline void
+fn1 ()
+{
+ switch (0)
+ case 0:
+ {
+ B <int*> b (0, 0);
+ if (a)
+ break;
+ }
+}
+
+void
+fn2 ()
+{
+ fn1 ();
+}
diff --git a/gcc/testsuite/g++.dg/pr55106.C b/gcc/testsuite/g++.dg/pr55106.C
new file mode 100644
index 0000000000..4727822f0d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr55106.C
@@ -0,0 +1,67 @@
+/* { dg-do compile } */
+/* { dg-options "-c -O3" } */
+template<typename _Tp> struct A {
+ typedef _Tp *pointer;
+ typedef _Tp& reference;
+ typedef _Tp& const_reference;
+ template<typename>struct rebind
+ {
+ typedef A other;
+ };
+};
+
+template<typename _Alloc>struct __alloc_traits
+{
+ typedef typename _Alloc::pointer pointer;
+ typedef typename _Alloc::reference reference;
+ typedef typename _Alloc::const_reference const_reference;
+ template<typename _Tp>struct rebind
+ {
+ typedef typename _Alloc::template rebind<_Tp>::other other;
+ };
+};
+template<typename _Tp, typename _Alloc>struct B
+{
+ typedef typename __alloc_traits<_Alloc>::template rebind<
+ _Tp>::other _Tp_alloc_type;
+ typedef typename __alloc_traits<_Tp_alloc_type>::pointer pointer;
+ struct F
+ {
+ pointer _M_start;
+ };
+ F _M_impl;
+};
+template<typename _Tp, typename _Alloc = A<_Tp> >class vec : B<_Tp, _Alloc>{
+ typedef B<_Tp, _Alloc> _Base;
+ typedef typename _Base::_Tp_alloc_type _Tp_alloc_type;
+ typedef __alloc_traits<_Tp_alloc_type> _Alloc_traits;
+
+public:
+ typedef _Tp value_type;
+ typedef typename _Alloc_traits::reference reference;
+ typedef typename _Alloc_traits::const_reference const_reference;
+ reference operator[](int p1)
+ {
+ return *(this->_M_impl._M_start + p1);
+ }
+
+ const_reference operator[](long) const;
+};
+
+int a[17];
+class C {
+ vec<int> m_value;
+ void opModDivGuts(const C&);
+ int mostSetBitP1() const;
+};
+void C::opModDivGuts(const C& p1)
+{
+ int b = p1.mostSetBitP1(), c = b + 1;
+ int d[16];
+
+ for (int i = c; i; i--)
+ a[i] = p1.m_value[i] << b;
+
+ for (int i = 0; i < c; i++)
+ m_value[i] = d[i] >> b << -b;
+}
diff --git a/gcc/testsuite/g++.dg/pr55263.C b/gcc/testsuite/g++.dg/pr55263.C
new file mode 100644
index 0000000000..5ea863f1ae
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr55263.C
@@ -0,0 +1,68 @@
+/* { dg-do compile } */
+/* { dg-options "-c -O -fgcse-after-reload -fnon-call-exceptions" } */
+template < typename _Tp > class new_allocator
+{
+public:
+ typedef _Tp pointer;
+ template < typename _Tp1 > struct rebind
+ {
+ typedef new_allocator < _Tp1 > other;
+ };
+
+};
+
+template < typename > class allocator;
+
+template < typename _Alloc > struct __alloc_traits
+{
+ typedef typename _Alloc::pointer pointer;
+ template < typename _Tp > struct rebind
+ {
+ typedef typename _Alloc::template rebind < _Tp >::other other;
+ };
+
+};
+
+template < typename _Tp, typename _Alloc > struct _Vector_base
+{
+ typedef
+ typename
+ __alloc_traits < _Alloc >::template rebind < _Tp >::other _Tp_alloc_type;
+ typedef typename __alloc_traits < _Tp_alloc_type >::pointer pointer;
+ struct _Vector_impl
+ {
+ pointer _M_start;
+ pointer _M_end_of_storage;
+ };
+
+ ~_Vector_base ();
+ _Vector_impl _M_impl;
+};
+
+template < typename _Tp, typename _Alloc = allocator < _Tp > >class vector:
+_Vector_base < _Tp, _Alloc >
+{
+ typedef _Vector_base < _Tp, _Alloc > _Base;
+public:
+ typedef typename _Base::pointer pointer;
+vector ():
+ _Base ()
+ {
+ _M_erase_at_end (this->_M_impl._M_start);
+ }
+ void _M_erase_at_end (pointer)
+ {
+ }
+};
+
+template < typename T > class clear_alloc:
+public new_allocator < T >
+{
+};
+
+void
+foo ()
+{
+ new vector < int, clear_alloc < int > >;
+}
+
diff --git a/gcc/testsuite/g++.dg/pr55513.C b/gcc/testsuite/g++.dg/pr55513.C
new file mode 100644
index 0000000000..06eedee8a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr55513.C
@@ -0,0 +1,12 @@
+// { dg-do compile }
+// { dg-options "-O0 -fdump-tree-gimple" }
+
+main ()
+{
+ char s[10];
+ const int t = (__builtin_memcpy (s, "Hello", 6), 777);
+ __builtin_printf ("%d %s\n", t, s);
+}
+
+// { dg-final { scan-tree-dump-times "memcpy" 1 "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
diff --git a/gcc/testsuite/g++.dg/pr55604.C b/gcc/testsuite/g++.dg/pr55604.C
new file mode 100644
index 0000000000..135ae4d5e5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr55604.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-rtl-reload" } */
+
+main ()
+{
+ char s[10];
+ const int t = (__builtin_memcpy (s, "Hello", 6), 5);
+ __builtin_printf ("%d %s\n", t, s);
+}
+
+/* { dg-final { cleanup-rtl-dump "reload" } } */
diff --git a/gcc/testsuite/g++.dg/pr57175.C b/gcc/testsuite/g++.dg/pr57175.C
new file mode 100644
index 0000000000..d6801a7352
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr57175.C
@@ -0,0 +1,18 @@
+/* { dg-do compile { target c++11 } } */
+
+extern "C" void do_not_remove ();
+
+struct A
+{
+ A () { }
+ A (A const&) { do_not_remove (); }
+};
+
+A
+f ()
+{
+ alignas (2 * alignof (A)) A x;
+ return x;
+}
+
+/* { dg-final { scan-assembler "do_not_remove" } } */
diff --git a/gcc/testsuite/g++.dg/pr57662.C b/gcc/testsuite/g++.dg/pr57662.C
new file mode 100644
index 0000000000..1354790e97
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr57662.C
@@ -0,0 +1,339 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fselective-scheduling2 -fsel-sched-pipelining" } */
+
+extern "C" {
+ typedef struct _IO_FILE FILE;
+ extern int putc(int __c, FILE * __stream);
+ extern int strcmp(__const char *__s1, __const char *__s2) throw()
+ __attribute__ ((__pure__)) __attribute__ ((__nonnull__(1, 2)));
+} typedef union tree_node *tree;
+struct gcc_options {
+ int x_flag_openmp;
+};
+extern struct gcc_options global_options;
+struct ht_identifier {
+ const unsigned char *str;
+};
+enum cpp_ttype {
+ CPP_SEMICOLON, CPP_NAME
+};
+struct vl_embed {
+};
+struct va_heap {
+};
+struct va_gc {
+ typedef vl_embed default_layout;
+};
+template < typename T, typename A = va_heap, typename L =
+ typename A::default_layout > struct vec {
+};
+enum tree_code {
+ ERROR_MARK,
+ IDENTIFIER_NODE,
+ OMP_SIMD,
+ CILK_SIMD,
+ MAX_TREE_CODES
+};
+struct tree_identifier {
+ struct ht_identifier
+ id;
+};
+union tree_node {
+ struct tree_identifier
+ identifier;
+};
+inline tree
+tree_check(tree __t, const char *__f, int __l, const char *__g, tree_code __c)
+{
+}
+
+extern tree chainon(tree, tree);
+extern vec < tree, va_gc > *make_tree_vector(void);
+typedef unsigned long omp_clause_mask;
+enum c_omp_clause_split {
+ C_OMP_CLAUSE_SPLIT_TARGET = 0, C_OMP_CLAUSE_SPLIT_COUNT
+};
+typedef struct cxx_saved_binding {
+ tree attributes;
+} cp_decl_specifier_seq;
+typedef enum pragma_kind {
+ PRAGMA_NONE = 0, PRAGMA_OMP_DECLARE_REDUCTION, PRAGMA_OMP_TARGET
+} pragma_kind;
+typedef enum pragma_omp_clause {
+ PRAGMA_OMP_CLAUSE_NONE =
+ 0, PRAGMA_OMP_CLAUSE_DEVICE, PRAGMA_OMP_CLAUSE_IF,
+ PRAGMA_OMP_CLAUSE_MAP
+} pragma_omp_clause;
+typedef struct cp_token {
+ enum cpp_ttype type:8;
+ union cp_token_value {
+ tree value;
+ } u;
+} cp_token;
+typedef struct cp_token *cp_token_position;
+typedef struct cp_lexer {
+ cp_token_position next_token;
+ bool debugging_p;
+ cp_lexer *lexer;
+} cp_parser;
+static FILE *cp_lexer_debug_stream;
+static inline bool cp_lexer_debugging_p(cp_lexer * lexer)
+{
+ return lexer->debugging_p;
+}
+
+static inline cp_token *cp_lexer_peek_token(cp_lexer * lexer)
+{
+ if (cp_lexer_debugging_p(lexer)) {
+ putc('\n', cp_lexer_debug_stream);
+ }
+ return lexer->next_token;
+}
+
+static inline bool cp_lexer_next_token_is(cp_lexer * lexer, enum cpp_ttype type)
+{
+}
+
+enum {
+ CP_PARSER_FLAGS_NONE = 0x0, CP_PARSER_FLAGS_OPTIONAL =
+ 0x1, CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES =
+ 0x2, CP_PARSER_FLAGS_NO_TYPE_DEFINITIONS =
+ 0x4, CP_PARSER_FLAGS_ONLY_TYPE_OR_CONSTEXPR = 0x8
+};
+typedef int cp_parser_flags;
+extern tree
+cp_parser_type_specifier(cp_parser *, cp_parser_flags,
+ cp_decl_specifier_seq *, bool, int *, bool *);
+static void
+cp_parser_type_specifier_seq(cp_parser *, bool, bool, cp_decl_specifier_seq *);
+extern bool cp_next_tokens_can_be_attribute_p(cp_parser *);
+extern tree cp_parser_attributes_opt(cp_parser *);
+enum pragma_context {
+ pragma_external,
+ pragma_member,
+ pragma_objc_icode,
+ pragma_stmt,
+ pragma_compound
+};
+static bool cp_parser_pragma(cp_parser *, enum pragma_context);
+static bool cp_parser_translation_unit(cp_parser * parser)
+{
+ while (true) {
+ cp_token *token;
+ if (token->type == CPP_SEMICOLON) {
+ cp_parser_pragma(parser, pragma_external);
+ }
+ }
+}
+
+static tree
+cp_parser_type_id_1(cp_parser * parser, bool is_template_arg,
+ bool is_trailing_return)
+{
+ cp_decl_specifier_seq type_specifier_seq;
+ cp_parser_type_specifier_seq(parser, false, is_trailing_return,
+ &type_specifier_seq);
+}
+
+static tree cp_parser_type_id(cp_parser * parser)
+{
+ return cp_parser_type_id_1(parser, false, false);
+}
+
+static void
+cp_parser_type_specifier_seq(cp_parser * parser, bool is_declaration,
+ bool is_trailing_return,
+ cp_decl_specifier_seq * type_specifier_seq)
+{
+ cp_parser_flags flags = CP_PARSER_FLAGS_OPTIONAL;
+ cp_token *start_token = __null;
+ while (true) {
+ tree type_specifier;
+ bool is_cv_qualifier;
+ if (cp_next_tokens_can_be_attribute_p(parser)) {
+ type_specifier_seq->attributes =
+ chainon(type_specifier_seq->attributes,
+ cp_parser_attributes_opt(parser));
+ continue;
+ }
+ if (!start_token)
+ start_token = cp_lexer_peek_token(parser->lexer);
+ type_specifier =
+ cp_parser_type_specifier(parser, flags, type_specifier_seq,
+ false, __null, &is_cv_qualifier);
+ if (!type_specifier) {
+ break;
+ }
+ if (is_declaration && !is_cv_qualifier)
+ flags |= CP_PARSER_FLAGS_NO_USER_DEFINED_TYPES;
+ }
+}
+
+static bool
+cp_parser_omp_for_loop_init(cp_parser * parser, bool parsing_openmp,
+ tree & this_pre_body, vec < tree,
+ va_gc > *for_block, tree & init, tree & decl,
+ tree & real_decl)
+{
+ cp_decl_specifier_seq type_specifiers;
+ cp_parser_type_specifier_seq(parser, true, false, &type_specifiers);
+}
+
+static tree
+cp_parser_omp_for_loop(cp_parser * parser, enum tree_code code, tree clauses,
+ tree * cclauses)
+{
+ tree init, cond, incr, body, decl, pre_body = (tree) __null, ret;
+ tree real_decl, initv, condv, incrv, declv;
+ tree this_pre_body, cl;
+ int i, collapse = 1, nbraces = 0;
+ vec < tree, va_gc > *for_block = make_tree_vector();
+ for (i = 0; i < collapse; i++) {
+ bool add_private_clause = false;
+ add_private_clause |=
+ cp_parser_omp_for_loop_init(parser, code != CILK_SIMD,
+ this_pre_body, for_block, init,
+ decl, real_decl);
+ }
+}
+
+static tree
+cp_parser_omp_simd(cp_parser * parser, cp_token * pragma_tok, char *p_name,
+ omp_clause_mask mask, tree * cclauses)
+{
+ tree clauses, sb, ret;
+ ret = cp_parser_omp_for_loop(parser, OMP_SIMD, clauses, cclauses);
+}
+
+static tree
+cp_parser_omp_distribute(cp_parser * parser, cp_token * pragma_tok,
+ char *p_name, omp_clause_mask mask, tree * cclauses)
+{
+ if (cp_lexer_next_token_is(parser->lexer, CPP_NAME)) {
+ tree id = cp_lexer_peek_token(parser->lexer)->u.value;
+ const char *p =
+ ((const char
+ *)(tree_check((id),
+ "/home/bonzo/develop/trunk/gcc/cp/parser.c",
+ 29966, __FUNCTION__,
+ (IDENTIFIER_NODE)))->identifier.id.str);
+ bool simd = false;
+ bool parallel = false;
+ if (strcmp(p, "simd") == 0)
+ simd = true;
+ if (parallel || simd) {
+ if (!global_options.x_flag_openmp) {
+ if (simd)
+ return cp_parser_omp_simd(parser,
+ pragma_tok,
+ p_name, mask,
+ cclauses);
+ }
+ }
+ }
+}
+
+static tree
+cp_parser_omp_teams(cp_parser * parser, cp_token * pragma_tok, char *p_name,
+ omp_clause_mask mask, tree * cclauses)
+{
+ if (cp_lexer_next_token_is(parser->lexer, CPP_NAME)) {
+ tree id = cp_lexer_peek_token(parser->lexer)->u.value;
+ const char *p =
+ ((const char
+ *)(tree_check((id),
+ "/home/bonzo/develop/trunk/gcc/cp/parser.c",
+ 30062, __FUNCTION__,
+ (IDENTIFIER_NODE)))->identifier.id.str);
+ if (strcmp(p, "distribute") == 0) {
+ if (!global_options.x_flag_openmp)
+ return cp_parser_omp_distribute(parser,
+ pragma_tok,
+ p_name, mask,
+ cclauses);
+ }
+ }
+}
+
+static bool
+cp_parser_omp_target(cp_parser * parser, cp_token * pragma_tok,
+ enum pragma_context context)
+{
+ if (context != pragma_stmt && context != pragma_compound) {
+ tree id = cp_lexer_peek_token(parser->lexer)->u.value;
+ const char *p =
+ ((const char
+ *)(tree_check((id),
+ "/home/bonzo/develop/trunk/gcc/cp/parser.c",
+ 30201, __FUNCTION__,
+ (IDENTIFIER_NODE)))->identifier.id.str);
+ if (strcmp(p, "teams") == 0) {
+ tree cclauses[C_OMP_CLAUSE_SPLIT_COUNT];
+ char p_name[sizeof
+ ("#pragma omp target teams distribute "
+ "parallel for simd")];
+ if (!global_options.x_flag_openmp)
+ return cp_parser_omp_teams(parser, pragma_tok,
+ p_name,
+ ((((omp_clause_mask)
+ 1) <<
+ PRAGMA_OMP_CLAUSE_DEVICE)
+ |
+ (((omp_clause_mask)
+ 1) <<
+ PRAGMA_OMP_CLAUSE_MAP)
+ |
+ (((omp_clause_mask)
+ 1) <<
+ PRAGMA_OMP_CLAUSE_IF)),
+ cclauses);
+ }
+ }
+}
+
+static void
+cp_parser_omp_declare_reduction(cp_parser * parser, cp_token * pragma_tok,
+ enum pragma_context)
+{
+ tree reduc_id = (tree) __null, orig_reduc_id = (tree) __null, type;
+ while (true) {
+ type = cp_parser_type_id(parser);
+ }
+}
+
+static void
+cp_parser_omp_declare(cp_parser * parser, cp_token * pragma_tok,
+ enum pragma_context context)
+{
+ if (cp_lexer_next_token_is(parser->lexer, CPP_NAME)) {
+ tree id = cp_lexer_peek_token(parser->lexer)->u.value;
+ const char *p =
+ ((const char
+ *)(tree_check((id),
+ "/home/bonzo/develop/trunk/gcc/cp/parser.c",
+ 30883, __FUNCTION__,
+ (IDENTIFIER_NODE)))->identifier.id.str);
+ if (strcmp(p, "simd") == 0) {
+ cp_parser_omp_declare_reduction(parser, pragma_tok,
+ context);
+ }
+ }
+}
+
+static cp_parser *the_parser;
+static bool cp_parser_pragma(cp_parser * parser, enum pragma_context context)
+{
+ cp_token *pragma_tok;
+ unsigned int id;
+ switch (id) {
+ case PRAGMA_OMP_DECLARE_REDUCTION:
+ cp_parser_omp_declare(parser, pragma_tok, context);
+ case PRAGMA_OMP_TARGET:
+ return cp_parser_omp_target(parser, pragma_tok, context);
+ }
+}
+
+void c_parse_file(void)
+{
+ cp_parser_translation_unit(the_parser);
+}
diff --git a/gcc/testsuite/g++.dg/pr57878.C b/gcc/testsuite/g++.dg/pr57878.C
new file mode 100644
index 0000000000..231f9e346b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr57878.C
@@ -0,0 +1,227 @@
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ilp32 } } } */
+// { dg-require-effective-target c++11 }
+/* { dg-options "-O2 -fno-omit-frame-pointer -fPIC" } */
+
+typedef int int32;
+typedef long long int64;
+typedef unsigned int uint32;
+typedef unsigned long long uint64;
+namespace std {
+ typedef __SIZE_TYPE__ size_t;
+ template<class _CharT>
+ struct char_traits;
+ template<typename _Tp>
+ inline _Tp* __addressof(_Tp& __r) noexcept {
+ return reinterpret_cast<_Tp*> (&const_cast<char&>(reinterpret_cast<const volatile char&>(__r)));
+ }
+ template<typename _Tp>
+ struct remove_reference {
+ typedef _Tp type;
+ };
+ template<typename _Tp>
+ constexpr _Tp&& forward(typename std::remove_reference<_Tp>::type& __t) noexcept {
+ return static_cast<_Tp&&>(__t);
+ }
+}
+typedef __SIZE_TYPE__ size_t;
+extern "C++" {
+ inline void* operator new(std::size_t, void* __p) noexcept {
+ return __p;
+ }
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp>
+ class new_allocator {
+ public:
+ typedef size_t size_type;
+ typedef _Tp* pointer;
+ };
+}
+namespace std {
+ template<typename _Tp>
+ using __allocator_base = __gnu_cxx::new_allocator<_Tp>;
+ template<typename _Tp>
+ class allocator
+ : public __allocator_base<_Tp> {
+ public:
+ typedef size_t size_type;
+ template<typename _Tp1>
+ struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __sso_string_base;
+ template<typename _CharT, typename _Traits = std::char_traits<_CharT>, typename _Alloc = std::allocator<_CharT>, template <typename, typename, typename> class _Base = __sso_string_base>
+ class __versa_string;
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ struct __vstring_utility {
+ typedef typename _Alloc::template rebind<_CharT>::other _CharT_alloc_type;
+ template<typename _Alloc1>
+ struct _Alloc_hider
+ : public _Alloc1 {
+ _Alloc_hider(const _Alloc1& __a, _CharT* __ptr)
+ : _Alloc1(__a), _M_p(__ptr) {
+ }
+ _CharT* _M_p;
+ };
+ };
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ class __sso_string_base
+ : protected __vstring_utility<_CharT, _Traits, _Alloc> {
+ typedef __vstring_utility<_CharT, _Traits, _Alloc> _Util_Base;
+ typedef typename _Util_Base::_CharT_alloc_type _CharT_alloc_type;
+ typedef typename _CharT_alloc_type::size_type size_type;
+ private:
+ typename _Util_Base::template _Alloc_hider<_CharT_alloc_type>
+ _M_dataplus;
+ size_type _M_string_length;
+ enum {
+ _S_local_capacity = 15 };
+ union {
+ _CharT _M_local_data[_S_local_capacity + 1];
+ };
+ template<typename _InIterator>
+ void _M_construct(_InIterator __beg, _InIterator __end);
+ public:
+ size_type _M_max_size() const;
+ _CharT* _M_data() const {
+ return _M_dataplus._M_p;
+ }
+ size_type _M_length() const {
+ return _M_string_length;
+ }
+ __sso_string_base(const __sso_string_base& __rcs);
+ const _CharT_alloc_type& _M_get_allocator() const {
+ }
+ };
+ template<typename _CharT, typename _Traits, typename _Alloc>
+ __sso_string_base<_CharT, _Traits, _Alloc>:: __sso_string_base(const __sso_string_base& __rcs)
+ : _M_dataplus(__rcs._M_get_allocator(), _M_local_data) {
+ _M_construct(__rcs._M_data(), __rcs._M_data() + __rcs._M_length());
+ }
+ template<typename _CharT, typename _Traits, typename _Alloc, template <typename, typename, typename> class _Base>
+ class __versa_string
+ : private _Base<_CharT, _Traits, _Alloc> {
+ };
+}
+template<typename _CharT, typename _Traits = std::char_traits<_CharT>, typename _Alloc = std::allocator<_CharT> >
+class basic_string
+ : public __gnu_cxx::__versa_string<_CharT, _Traits, _Alloc> {
+};
+typedef basic_string<char> string;
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Alloc, typename _Tp>
+ class __alloctr_rebind_helper {
+ public:
+ static const bool __value = true;
+ };
+ template<typename _Alloc, typename _Tp, bool = __alloctr_rebind_helper<_Alloc, _Tp>::__value>
+ struct __alloctr_rebind;
+ template<typename _Alloc, typename _Tp> struct __alloctr_rebind<_Alloc, _Tp, true>
+ {
+ typedef typename _Alloc::template rebind<_Tp>::other __type;
+ };
+ template<typename _Alloc>
+ struct allocator_traits {
+ private:
+ template<typename _Tp>
+ static typename _Tp::pointer _S_pointer_helper(_Tp*);
+ typedef decltype(_S_pointer_helper((_Alloc*)0)) __pointer;
+ public:
+ typedef __pointer pointer;
+ template<typename _Tp>
+ using rebind_alloc = typename __alloctr_rebind<_Alloc, _Tp>::__type;
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Alloc> struct __alloc_traits
+ : std::allocator_traits<_Alloc>
+ {
+ typedef std::allocator_traits<_Alloc> _Base_type;
+ template<typename _Tp>
+ struct rebind {
+ typedef typename _Base_type::template rebind_alloc<_Tp>
+ other;
+ };
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _T1, typename... _Args>
+ inline void _Construct(_T1* __p, _Args&&... __args) {
+ ::new(static_cast<void*>(__p)) _T1(std::forward<_Args>(__args)...);
+ }
+ template<typename _Tp, typename _Alloc>
+ struct _Vector_base {
+ typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type;
+ typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer;
+ struct _Vector_impl
+ : public _Tp_alloc_type {
+ pointer _M_start;
+ pointer _M_finish;
+ };
+ public:
+ _Vector_impl _M_impl;
+ };
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> >
+ class vector
+ : protected _Vector_base<_Tp, _Alloc> {
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ public:
+ typedef _Tp value_type;
+ typedef typename _Base::pointer pointer;
+ typedef size_t size_type;
+ size_type size() const;
+ void push_back(const value_type& __x) {
+ _M_emplace_back_aux(__x);
+ }
+ template<typename... _Args>
+ void _M_emplace_back_aux(_Args&&... __args);
+ size_type _M_check_len();
+ };
+ template<typename _Tp, typename _Alloc> template<typename... _Args>
+ void vector<_Tp, _Alloc>:: _M_emplace_back_aux(_Args&&... __args) {
+ const size_type __len = _M_check_len();
+ pointer __new_start(static_cast<pointer>(::operator new(__len * sizeof(_Tp))));
+ pointer __new_temp(__new_start + size());
+ ::new((void *)__new_temp) _Tp(std::forward<_Args>(__args)...);
+ pointer __cur = __new_start;
+ pointer __first = this->_M_impl._M_start;
+ pointer __last = this->_M_impl._M_finish;
+ for (;
+ __first != __last;
+ ++__first, ++__cur) std::_Construct(std::__addressof(*__cur), *__first);
+ }
+}
+using std::vector;
+class DL {
+public:
+ struct ChunkId {
+ int64 disk_id;
+ uint64 handle;
+ uint64 version;
+ string capability;
+ ChunkId();
+ };
+ struct ChunkInfo {
+ ChunkId id;
+ uint64 mtime;
+ uint32 length;
+ int32 space_used;
+ };
+};
+class FDB {
+ void CollectChunk(const DL::ChunkInfo& chunk, const int& location);
+private:
+ struct ChunkData {
+ int location;
+ DL::ChunkInfo chunk_info;
+ };
+ vector<ChunkData> chunk_data_;
+};
+void FDB::CollectChunk(const DL::ChunkInfo& chunk, const int& location) {
+ ChunkData chunk_data;
+ chunk_data_.push_back( chunk_data);
+}
diff --git a/gcc/testsuite/g++.dg/pr58389.C b/gcc/testsuite/g++.dg/pr58389.C
new file mode 100644
index 0000000000..648c145459
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr58389.C
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+template <typename _RandomAccessIterator, typename _Compare>
+void __insertion_sort(_RandomAccessIterator, _Compare);
+template <typename _RandomAccessIterator, typename _Compare>
+void __final_insertion_sort(_RandomAccessIterator p1, _Compare p2) {
+ _RandomAccessIterator a;
+ if (p1 - a)
+ ;
+ else
+ std:
+ __insertion_sort(0, p2);
+}
+template <typename _RandomAccessIterator, typename _Size, typename _Compare>
+void __introsort_loop(_RandomAccessIterator, _Size, _Compare);
+template <typename _RandomAccessIterator, typename _Compare>
+void sort(_RandomAccessIterator, _RandomAccessIterator p2, _Compare p3) {
+std:
+ __introsort_loop(0, 0, p3);
+ __final_insertion_sort(p2, p3);
+}
+class A {
+public:
+ int m_fn1();
+ void __lg();
+ class B {
+ public:
+ int i;
+ int operator-(B);
+ };
+};
+class C;
+class D {
+public:
+ C *operator->();
+};
+class F {
+ A m_fn1() const;
+ D d_ptr;
+};
+class C {
+ friend F;
+ void m_fn1();
+ A children;
+};
+void qt_notclosestLeaf();
+inline void C::m_fn1() {
+ A::B b, c;
+ if (children.m_fn1()) {
+ sort(c, b, qt_notclosestLeaf);
+ }
+}
+A F::m_fn1() const { const_cast<F *>(this)->d_ptr->m_fn1(); }
diff --git a/gcc/testsuite/g++.dg/pr58438.C b/gcc/testsuite/g++.dg/pr58438.C
new file mode 100644
index 0000000000..4c62cb26ce
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr58438.C
@@ -0,0 +1,45 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-march=amdfam10 -O3 -fprofile-generate" } */
+enum gimple_code {};
+struct A {
+ gimple_code code;
+};
+struct B {
+ A gsbase;
+};
+int **a;
+int b, d, e, f, g, h, i, j, k, l, m, n, o;
+gimple_code c, p;
+class C {
+ virtual unsigned m_fn1();
+};
+B q;
+static int fn1() {
+ int r;
+ if (k)
+ i = 0;
+ for (; i; j++) {
+ b = c <= 0;
+ if (b)
+ n = *a[0];
+ b = p && c;
+ if (b)
+ r = *a[0];
+ b = q.gsbase.code && c;
+ if (b)
+ o = *a[0];
+ m = o;
+ if (e || 1 & r || d || l)
+ return 0;
+ }
+}
+
+class D : C {
+ unsigned m_fn1() {
+ fn1();
+ for (; h; g++)
+ for (;; f++)
+ ;
+ }
+};
+void fn2() { new D; }
diff --git a/gcc/testsuite/g++.dg/pr58950.C b/gcc/testsuite/g++.dg/pr58950.C
new file mode 100644
index 0000000000..10a2032440
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr58950.C
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+void f(){
+ int i __attribute__((vector_size(2*sizeof(int)))) = { 2, 3 };
+ __builtin_shuffle (i, i); /* { dg-warning "value computed is not used" } */
+ ++i?1:0; /* { dg-warning "value computed is not used" } */
+}
diff --git a/gcc/testsuite/g++.dg/pr59445.C b/gcc/testsuite/g++.dg/pr59445.C
new file mode 100644
index 0000000000..99d6df2519
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr59445.C
@@ -0,0 +1,81 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+template <typename _Iterator> struct A;
+template <typename _Tp> struct A<_Tp *> {
+ typedef _Tp value_type;
+ typedef int difference_type;
+};
+template <typename _Compare> struct B {};
+template <typename _Compare> struct C {
+ _Compare _M_comp;
+ template <typename _Value, typename _Iterator>
+ int operator()(_Value &p1, _Iterator p2) {
+ return _M_comp(p1, *p2);
+ }
+};
+template <typename _Compare> C<_Compare> __val_comp_iter(B<_Compare>);
+template <typename _RandomAccessIterator, typename _Compare>
+void __unguarded_linear_insert(_RandomAccessIterator p1, _Compare p2) {
+ typename A<_RandomAccessIterator>::value_type a;
+ _RandomAccessIterator b = p1;
+ --b;
+ while (p2(a, b)) {
+ *p1 = 0;
+ p1 = b;
+ --b;
+ }
+}
+template <typename _RandomAccessIterator, typename _Compare>
+void __insertion_sort(_RandomAccessIterator, _Compare p2) {
+ for (_RandomAccessIterator c;; ++c)
+ __unguarded_linear_insert(c, __val_comp_iter(p2));
+}
+template <typename _RandomAccessIterator, typename _Distance, typename _Compare>
+void __chunk_insertion_sort(_RandomAccessIterator, _Distance, _Compare p3) {
+ _RandomAccessIterator d;
+ __insertion_sort(d, p3);
+}
+template <typename _RandomAccessIterator, typename _Pointer, typename _Compare>
+void __merge_sort_with_buffer(_RandomAccessIterator p1, _Pointer, _Compare p3) {
+ __chunk_insertion_sort(p1, 0, p3);
+}
+template <typename _RandomAccessIterator, typename _Pointer, typename _Distance,
+ typename _Compare>
+void __stable_sort_adaptive(_RandomAccessIterator, _Pointer, _Distance,
+ _Compare p4) {
+ _RandomAccessIterator e;
+ __merge_sort_with_buffer(e, 0, p4);
+}
+template <typename _RandomAccessIterator, typename _Compare>
+void __stable_sort(_RandomAccessIterator p1, _Compare p2) {
+ __stable_sort_adaptive(
+ p1, 0, typename A<_RandomAccessIterator>::difference_type(), p2);
+}
+template <typename _RandomAccessIterator, typename _Compare>
+void stable_sort(_RandomAccessIterator, _RandomAccessIterator p2, _Compare) {
+ B<_Compare> f;
+ __stable_sort(p2, f);
+}
+class D {
+public:
+ void m_fn1();
+};
+class F {
+ struct G {
+ D MFI;
+ int operator()(int p1, int p2) {
+ if (p1)
+ return 0;
+ if (p2)
+ return 1;
+ MFI.m_fn1();
+ }
+ };
+ void m_fn1(int &p1) const;
+};
+void F::m_fn1(int &p1) const {
+ int *g, *h;
+ stable_sort(h, g, G());
+}
+
diff --git a/gcc/testsuite/g++.dg/pr59477.C b/gcc/testsuite/g++.dg/pr59477.C
new file mode 100644
index 0000000000..788c751e51
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr59477.C
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct A
+{
+ unsigned *a, b;
+ A (unsigned x) : a (), b (x) {}
+};
+
+struct B
+{
+ B (int);
+ B (const B &) {}
+};
+
+B bar (B, B, A);
+int v;
+
+void
+foo ()
+{
+ B c = 0;
+ bar (c, c, A (1ULL << v));
+}
diff --git a/gcc/testsuite/g++.dg/pr59482.C b/gcc/testsuite/g++.dg/pr59482.C
new file mode 100644
index 0000000000..bde832909f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr59482.C
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+class aa {
+ friend class cc;
+ class bb {};
+};
+
+class cc : aa::bb {};
diff --git a/gcc/testsuite/g++.dg/pr59510.C b/gcc/testsuite/g++.dg/pr59510.C
new file mode 100644
index 0000000000..dcdf860dcf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr59510.C
@@ -0,0 +1,82 @@
+// PR debug/59510
+// { dg-do compile }
+// { dg-options "-O2 -g --param=large-stack-frame-growth=1" }
+
+template <typename _Iterator>
+struct _Iter_base
+{
+ typedef _Iterator iterator_type;
+};
+template <typename _CharT>
+struct basic_ostream;
+template <typename _CharT>
+struct basic_ostringstream;
+template <typename _CharT>
+struct ostreambuf_iterator;
+typedef basic_ostringstream <char>ostringstream;
+template <typename _Iterator> struct _Miter_base : _Iter_base <_Iterator>
+{
+};
+template <typename _Iterator>
+typename _Miter_base <_Iterator>::iterator_type __miter_base (_Iterator);
+template <typename _CharT>
+ostreambuf_iterator <_CharT>
+__copy_move_a2 (ostreambuf_iterator <_CharT>);
+template <typename _II, typename _OI>
+_OI copy (_II __first, _II __last, _OI __result)
+{
+ __copy_move_a2 <false> (__first, __miter_base (__last), __result);
+}
+struct ios_base {
+ struct _Words {
+ int *_M_pword;
+ long _M_iword;
+ };
+ _Words _M_local_word[8];
+};
+template <typename _CharT>
+struct basic_streambuf
+{
+ typedef _CharT char_type;
+ int sputn (char_type *, int);
+};
+template <typename _CharT>
+struct ostreambuf_iterator
+{
+ typedef basic_streambuf <_CharT> streambuf_type;
+ typedef basic_ostream <_CharT> ostream_type;
+ streambuf_type *_M_sbuf;
+ bool _M_failed;
+ ostreambuf_iterator (ostream_type __s) : _M_sbuf (__s.rdbuf ()), _M_failed () {}
+ void _M_put (_CharT * __ws, int __len)
+ {
+ if (_M_failed && _M_sbuf->sputn (__ws, __len) != __len) _M_failed = true;
+ }
+};
+template <bool, typename _CharT>
+void __copy_move_a2 (_CharT * __first,_CharT * __last,ostreambuf_iterator <_CharT> __result)
+{
+ int __num = __last - __first;
+ __result._M_put (__first, __num);
+}
+template <typename _CharT>
+struct basic_ios : ios_base
+{
+ basic_streambuf <_CharT> *rdbuf ();
+};
+template <typename _CharT>
+struct basic_ostream : public basic_ios <_CharT>
+{
+};
+template <typename _CharT>
+struct basic_ostringstream : public basic_ostream <_CharT>
+{
+};
+void
+test01 () {
+ char data1[] = "foo";
+ char *beg1 = data1;
+ ostringstream oss1;
+ ostreambuf_iterator <char> out1 (oss1);
+ out1 = copy (beg1, beg1, out1);
+}
diff --git a/gcc/testsuite/g++.dg/pr59695.C b/gcc/testsuite/g++.dg/pr59695.C
new file mode 100644
index 0000000000..ac636d06f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr59695.C
@@ -0,0 +1,125 @@
+
+/* PR target/59695 */
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+#define DEFINE_VIRTUALS_FNS(i) virtual void xxx##i () {} \
+ virtual void foo1_##i () {}\
+ virtual void foo2_##i () {}\
+ virtual void foo3_##i () {}\
+ virtual void foo4_##i () {}\
+ virtual void foo5_##i () {}\
+ virtual void foo6_##i () {}\
+ virtual void foo7_##i () {}\
+ virtual void foo8_##i () {}\
+ virtual void foo9_##i () {}\
+ virtual void foo10_##i () {}\
+ virtual void foo11_##i () {}\
+ virtual void foo12_##i () {}\
+ virtual void foo13_##i () {}\
+ virtual void foo14_##i () {}\
+ virtual void foo15_##i () {}\
+ virtual void foo16_##i () {}\
+ virtual void foo17_##i () {}\
+ virtual void foo18_##i () {}\
+ virtual void foo19_##i () {}\
+ virtual void foo20_##i () {}\
+ virtual void foo21_##i () {}\
+ virtual void foo22_##i () {}\
+
+class base_class_2
+{
+
+public:
+ /* Define lots of virtual functions */
+ DEFINE_VIRTUALS_FNS (1)
+ DEFINE_VIRTUALS_FNS (2)
+ DEFINE_VIRTUALS_FNS (3)
+ DEFINE_VIRTUALS_FNS (4)
+ DEFINE_VIRTUALS_FNS (5)
+ DEFINE_VIRTUALS_FNS (6)
+ DEFINE_VIRTUALS_FNS (7)
+ DEFINE_VIRTUALS_FNS (8)
+ DEFINE_VIRTUALS_FNS (9)
+ DEFINE_VIRTUALS_FNS (10)
+ DEFINE_VIRTUALS_FNS (11)
+ DEFINE_VIRTUALS_FNS (12)
+ DEFINE_VIRTUALS_FNS (13)
+ DEFINE_VIRTUALS_FNS (14)
+ DEFINE_VIRTUALS_FNS (15)
+ DEFINE_VIRTUALS_FNS (16)
+ DEFINE_VIRTUALS_FNS (17)
+ DEFINE_VIRTUALS_FNS (18)
+ DEFINE_VIRTUALS_FNS (19)
+ DEFINE_VIRTUALS_FNS (20)
+
+ base_class_2();
+ virtual ~base_class_2 ();
+};
+
+base_class_2::base_class_2()
+{
+}
+
+base_class_2::~base_class_2 ()
+{
+}
+
+class base_class_1
+{
+public:
+ virtual ~base_class_1();
+ base_class_1();
+};
+
+base_class_1::base_class_1()
+{
+}
+
+base_class_1::~base_class_1()
+{
+}
+
+class base_Impl_class :
+ virtual public base_class_2, public base_class_1
+{
+public:
+ base_Impl_class ();
+ virtual ~base_Impl_class ();
+};
+
+base_Impl_class::base_Impl_class ()
+{
+}
+
+base_Impl_class::~base_Impl_class ()
+{
+}
+
+
+class test_cls : public base_Impl_class
+{
+public:
+ test_cls();
+ virtual ~test_cls();
+};
+
+test_cls::test_cls()
+{
+}
+
+test_cls::~test_cls()
+{
+}
+
+int main()
+{
+ test_cls *test = new test_cls;
+ base_class_2 *p1 = test;
+
+ /* PR59695 destructor thunk offsets are not setup
+ correctly resulting in crash. */
+ delete p1;
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/pr60518.C b/gcc/testsuite/g++.dg/pr60518.C
new file mode 100644
index 0000000000..e3da48a2ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr60518.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-Os -fprofile-use" }
+
+int a;
+int fn1 () { return a == ',' || a == ';'; }
+
+void fn2 ()
+{
+ do
+ while (fn1 ())
+ ;
+ while (1);
+}
diff --git a/gcc/testsuite/g++.dg/pr60969.C b/gcc/testsuite/g++.dg/pr60969.C
new file mode 100644
index 0000000000..4012e2ce72
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr60969.C
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+/* { dg-options "-O2 -ftree-vectorize -march=pentium4 -mfpmath=387" } */
+
+struct A
+{
+ float f, g, h, k;
+ A () {}
+ A (float v0, float x, float y) : f(v0), g(x), h(y), k(0.0f) {}
+ A bar (A &a, float t) { return A (f + a.f * t, g + a.g * t, h + a.h * t); }
+};
+
+A
+baz (A &x, A &y, float t)
+{
+ return x.bar (y, t);
+}
+
+A *
+foo (A &s, A &t, A &u, A &v, int y, int z)
+{
+ A *x = new A[y * z];
+ for (int i = 0; i < 7; i++)
+ {
+ A s = baz (s, u, i / (float) z);
+ A t = baz (t, v, i / (float) z);
+ for (int j = 0; j < 7; j++)
+ x[i * y + j] = baz (s, t, j / (float) y);
+ }
+ return x;
+}
+
+/* { dg-final { scan-assembler-not "%mm" } } */
diff --git a/gcc/testsuite/g++.dg/pr61094.C b/gcc/testsuite/g++.dg/pr61094.C
new file mode 100644
index 0000000000..35adc256c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr61094.C
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+template <typename> struct A {
+ unsigned _width, _height, _depth, _spectrum;
+ template <typename t> A(t p1) {
+ int a = p1.size();
+ if (a) {
+ _width = p1._width;
+ _depth = _height = _spectrum = p1._spectrum;
+ }
+ }
+ long size() { return (long)_width * _height * _depth * _spectrum; }
+};
+
+int d;
+void fn1(void *);
+A<int> *fn2();
+void fn3() {
+ int b;
+ for (;;) {
+ A<char> c(*fn2());
+ fn1(&c);
+ if (d || !b)
+ throw;
+ }
+}
+
+
+
+
diff --git a/gcc/testsuite/g++.dg/pr61289-2.c b/gcc/testsuite/g++.dg/pr61289-2.c
new file mode 100644
index 0000000000..4cc3ebe468
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr61289-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-exceptions" } */
+struct S
+{
+ inline int fn1 () const { return s; }
+ __attribute__ ((noinline, noclone)) S *fn2 (int);
+ __attribute__ ((noinline, noclone)) void fn3 ();
+ __attribute__ ((noinline, noclone)) static S *fn4 (int);
+ S (int i) : s (i) {}
+ int s;
+};
+
+int a = 0;
+S *b = 0;
+
+S *
+S::fn2 (int i)
+{
+ a++;
+ if (a == 1)
+ return b;
+ if (a > 3)
+ __builtin_abort ();
+ b = this;
+ return new S (i + s);
+}
+
+S *
+S::fn4 (int i)
+{
+ b = new S (i);
+ return b;
+}
+
+void
+S::fn3 ()
+{
+ delete this;
+}
+
+void
+foo ()
+{
+ S *c = S::fn4 (20);
+ for (int i = 0; i < 2;)
+ {
+ S *d = c->fn2 (c->fn1 () + 10);
+ if (c != d)
+{
+ c->fn3 ();
+ c = d;
+ ++i;
+}
+ }
+ c->fn3 ();
+}
+
+int
+main ()
+{
+ foo ();
+}
diff --git a/gcc/testsuite/g++.dg/pr61289.C b/gcc/testsuite/g++.dg/pr61289.C
new file mode 100644
index 0000000000..ea7ccea304
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr61289.C
@@ -0,0 +1,63 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-exceptions" } */
+
+struct S
+{
+ inline int fn1 () const { return s; }
+ __attribute__ ((noinline, noclone)) S *fn2 (int);
+ __attribute__ ((noinline, noclone)) void fn3 ();
+ __attribute__ ((noinline, noclone)) static S *fn4 (int);
+ S (int i) : s (i) {}
+ int s;
+};
+
+int a = 0;
+S *b = 0;
+
+S *
+S::fn2 (int i)
+{
+ a++;
+ if (a == 1)
+ return b;
+ if (a > 3)
+ __builtin_abort ();
+ b = this;
+ return new S (i + s);
+}
+
+S *
+S::fn4 (int i)
+{
+ b = new S (i);
+ return b;
+}
+
+void
+S::fn3 ()
+{
+ delete this;
+}
+
+void
+foo ()
+{
+ S *c = S::fn4 (20);
+ for (int i = 0; i < 2;)
+ {
+ S *d = c->fn2 (c->fn1 () + 10);
+ if (d != c)
+{
+ c->fn3 ();
+ c = d;
+ ++i;
+}
+ }
+ c->fn3 ();
+}
+
+int
+main ()
+{
+ foo ();
+}
diff --git a/gcc/testsuite/g++.dg/pr62079.C b/gcc/testsuite/g++.dg/pr62079.C
new file mode 100644
index 0000000000..919c3e5de3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/pr62079.C
@@ -0,0 +1,78 @@
+// { dg-do compile }
+// { dg-options "-std=c++11 -O2 -fnon-call-exceptions" }
+
+template < typename > class allocator;
+
+template < class _CharT > struct char_traits;
+template < typename _CharT, typename _Traits = char_traits < _CharT >,
+ typename _Alloc = allocator < _CharT > >class basic_string;
+typedef basic_string < char >string;
+
+template < typename _Tp > class new_allocator
+{
+ template < typename _Tp1 > struct rebind
+ {
+ typedef new_allocator < _Tp1 > other;
+ };
+};
+
+template < typename _Tp > using __allocator_base = new_allocator < _Tp >;
+template < typename _Tp > class allocator:public __allocator_base < _Tp >
+{
+};
+
+template < typename _CharT, typename _Traits, typename _Alloc >
+ class basic_string
+{
+public:
+ basic_string (const _CharT * __s, const _Alloc & __a = _Alloc ());
+ ~basic_string ()noexcept;
+};
+
+template < typename T > struct add_reference
+{
+ typedef T & type;
+};
+
+template < typename ... Values > class tuple;
+template <> class tuple <>
+{
+};
+
+template < typename Head, typename ... Tail > class tuple < Head, Tail ... >:private tuple <
+ Tail ...
+ >
+{
+ typedef tuple < Tail ... >inherited;
+public:
+ template < typename ... VValues >
+ tuple (const tuple < VValues ... >&other):inherited (other.tail ()),
+ m_head (other.head ())
+ {
+ }
+ typename add_reference < const Head >::type head () const
+ {
+ return m_head;
+ }
+ const inherited & tail () const
+ {
+ return *this;
+ }
+ Head m_head;
+};
+
+template < typename T > struct make_tuple_result
+{
+ typedef T type;
+};
+
+template < typename ... Values >
+ tuple < typename make_tuple_result <
+ Values >::type ... >make_tuple (const Values & ... values);
+
+int
+main ()
+{
+ tuple < int, float, string > t3c =
+ make_tuple (17, 2.718281828, string ("Fun"));
+}
diff --git a/gcc/testsuite/g++.dg/predict-loop-exit-1.C b/gcc/testsuite/g++.dg/predict-loop-exit-1.C
new file mode 100644
index 0000000000..2289552b38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/predict-loop-exit-1.C
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+int g;
+int foo();
+void test() {
+ while (foo() && g < 10)
+ g++;
+ return;
+}
+
+/* { dg-final { scan-tree-dump-times "loop exit heuristics:" 3 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/g++.dg/predict-loop-exit-2.C b/gcc/testsuite/g++.dg/predict-loop-exit-2.C
new file mode 100644
index 0000000000..1a5880bdeb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/predict-loop-exit-2.C
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+int g;
+int foo();
+void test() {
+ while (foo() || g < 10)
+ g++;
+ return;
+}
+
+/* { dg-final { scan-tree-dump-times "loop exit heuristics:" 2 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/g++.dg/predict-loop-exit-3.C b/gcc/testsuite/g++.dg/predict-loop-exit-3.C
new file mode 100644
index 0000000000..9afc78ef91
--- /dev/null
+++ b/gcc/testsuite/g++.dg/predict-loop-exit-3.C
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+int g;
+int foo();
+void test() {
+ while (foo() && (g < 10 || g > 20))
+ g++;
+ return;
+}
+
+/* { dg-final { scan-tree-dump-times "loop exit heuristics:" 3 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/g++.dg/pubtypes.C b/gcc/testsuite/g++.dg/pubtypes.C
index 74bff595a8..8f89c4b6ba 100644
--- a/gcc/testsuite/g++.dg/pubtypes.C
+++ b/gcc/testsuite/g++.dg/pubtypes.C
@@ -2,7 +2,7 @@
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-options "-O0 -gdwarf-2 -dA -fno-eliminate-unused-debug-types" } */
/* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+\(0x\)?\[0-9a-f]+\[ \t\n\]+\[#;@]+\[ \t\]+Length of Public Type Names Info" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+\(0x\)?\[0-9a-f]+\[ \t\n\]+\[#;@]+\[ \t\]+Pub Info Length" } } */
/* { dg-final { scan-assembler "\"empty\\\\0\"+\[ \t\]+\[#;@]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler "\"A\\\\0\"+\[ \t\]+\[#;@]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler "\"B\\\\0\"+\[ \t\]+\[#;@]+\[ \t\]+external name" } } */
diff --git a/gcc/testsuite/g++.dg/rtti/dyncast6.C b/gcc/testsuite/g++.dg/rtti/dyncast6.C
new file mode 100644
index 0000000000..a6329e9441
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/dyncast6.C
@@ -0,0 +1,59 @@
+// PR c++/57599
+
+class A { };
+
+class B : public A { };
+
+void p()
+{
+ B* b;
+
+ A* a1;
+ a1 = dynamic_cast<A*>(b);
+ a1 = dynamic_cast<const A*>(b); // { dg-error "invalid" }
+ a1 = dynamic_cast<volatile A*>(b); // { dg-error "invalid" }
+ a1 = dynamic_cast<const volatile A*>(b); // { dg-error "invalid" }
+
+ const A* a2;
+ a2 = dynamic_cast<A*>(b);
+ a2 = dynamic_cast<const A*>(b);
+ a2 = dynamic_cast<volatile A*>(b); // { dg-error "invalid" }
+ a2 = dynamic_cast<const volatile A*>(b); // { dg-error "invalid" }
+
+ volatile A* a3;
+ a3 = dynamic_cast<A*>(b);
+ a3 = dynamic_cast<const A*>(b); // { dg-error "invalid" }
+ a3 = dynamic_cast<volatile A*>(b);
+ a3 = dynamic_cast<const volatile A*>(b); // { dg-error "invalid" }
+
+ const volatile A* a4;
+ a4 = dynamic_cast<A*>(b);
+ a4 = dynamic_cast<const A*>(b);
+ a4 = dynamic_cast<volatile A*>(b);
+ a4 = dynamic_cast<const volatile A*>(b);
+}
+
+void r()
+{
+ B b;
+
+ A& a1 = dynamic_cast<A&>(b);
+ A& a2 = dynamic_cast<const A&>(b); // { dg-error "invalid" }
+ A& a3 = dynamic_cast<volatile A&>(b); // { dg-error "invalid" }
+ A& a4 = dynamic_cast<const volatile A&>(b); // { dg-error "invalid" }
+
+ const A& ca1 = dynamic_cast<A&>(b);
+ const A& ca2 = dynamic_cast<const A&>(b);
+ const A& ca3 = dynamic_cast<volatile A&>(b); // { dg-error "invalid" }
+ const A& ca4 = dynamic_cast<const volatile A&>(b); // { dg-error "invalid" }
+
+ volatile A& va1 = dynamic_cast<A&>(b);
+ volatile A& va2 = dynamic_cast<const A&>(b); // { dg-error "invalid" }
+ volatile A& va3 = dynamic_cast<volatile A&>(b);
+ volatile A& va4 = dynamic_cast<const volatile A&>(b);// { dg-error "invalid" }
+
+ const volatile A& cva1 = dynamic_cast<A&>(b);
+ const volatile A& cva2 = dynamic_cast<const A&>(b);
+ const volatile A& cva3 = dynamic_cast<volatile A&>(b);
+ const volatile A& cva4 = dynamic_cast<const volatile A&>(b);
+}
diff --git a/gcc/testsuite/g++.dg/rtti/fn-quals.C b/gcc/testsuite/g++.dg/rtti/fn-quals.C
new file mode 100644
index 0000000000..75d24f8a9f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/fn-quals.C
@@ -0,0 +1,12 @@
+// PR c++/48665
+
+#include <typeinfo>
+extern "C" void abort();
+
+template<class A,class B> void f() {
+ if (typeid(A)==typeid(B)) abort(); // { dg-error "qualified function" }
+ if (typeid(A*)==typeid(B*)) abort(); // { dg-error "qualified function" }
+}
+int main() {
+ f<void()const,void()>();
+}
diff --git a/gcc/testsuite/g++.dg/rtti/typeid10.C b/gcc/testsuite/g++.dg/rtti/typeid10.C
new file mode 100644
index 0000000000..47b45b1056
--- /dev/null
+++ b/gcc/testsuite/g++.dg/rtti/typeid10.C
@@ -0,0 +1,36 @@
+// PR c++/25466
+// { dg-do run }
+
+#include <typeinfo>
+
+const std::type_info *a;
+
+template <class T>
+bool is_polymorphic() {
+ bool result(false);
+ const std::type_info &a1 = typeid( (result=true), *(T*)0);
+ a = &a1;
+ return result;
+}
+
+struct non_polymorphic {};
+struct polymorphic { virtual ~polymorphic() {} };
+
+
+int main() {
+ if (is_polymorphic<int>()) __builtin_abort();
+ if (is_polymorphic<non_polymorphic>()) __builtin_abort();
+ try
+ {
+ is_polymorphic<polymorphic>();
+ __builtin_abort(); // should have thrown bad_typeid
+ }
+ catch (std::bad_typeid&)
+ {
+ // OK
+ }
+ catch (...)
+ {
+ __builtin_abort();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C b/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C
index 7e0041ee38..950caddb7e 100644
--- a/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C
+++ b/gcc/testsuite/g++.dg/simulate-thread/atomics-1.C
@@ -1,6 +1,7 @@
-/* { dg-do link } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do link { target c++11 } } */
/* { dg-final { simulate-thread } } */
+/* { dg-require-effective-target sync_char_short } */
+/* { dg-require-effective-target sync_int_long } */
/* Test that atomic int and atomic char work properly. */
diff --git a/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C b/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C
index be3232d708..ee11da55e3 100644
--- a/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C
+++ b/gcc/testsuite/g++.dg/simulate-thread/atomics-2.C
@@ -1,6 +1,6 @@
-/* { dg-do link } */
-/* { dg-options "-std=c++0x" } */
+/* { dg-do link { target c++11 } } */
/* { dg-final { simulate-thread } } */
+/* { dg-require-effective-target sync_int_long } */
using namespace std;
diff --git a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
index 01e4aaf63c..b07fbb08c6 100644
--- a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
+++ b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/special/ecos.exp b/gcc/testsuite/g++.dg/special/ecos.exp
index eb0c1eacdd..6b0f5d5aee 100644
--- a/gcc/testsuite/g++.dg/special/ecos.exp
+++ b/gcc/testsuite/g++.dg/special/ecos.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2001, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/system-binary-constants-1.C b/gcc/testsuite/g++.dg/system-binary-constants-1.C
new file mode 100644
index 0000000000..fbf8bb2c96
--- /dev/null
+++ b/gcc/testsuite/g++.dg/system-binary-constants-1.C
@@ -0,0 +1,18 @@
+/*
+ Origin: Dodji Seketeli <dodji@redhat.com>
+ { dg-options "-std=c++98 -pedantic" }
+ { dg-do compile }
+ */
+
+#include "system-binary-constants-1.h"
+
+int
+foo (void)
+{
+#if BINARY_INT_CONSTANT_IN_SYSTEM_HEADER /* A binary constant defined
+ in system header. No
+ warning. */
+ return 23;
+#endif
+ return 0b1101; /* { dg-warning "binary constants are a C..1y feature or GCC extension" } */
+}
diff --git a/gcc/testsuite/g++.dg/system-binary-constants-1.h b/gcc/testsuite/g++.dg/system-binary-constants-1.h
new file mode 100644
index 0000000000..85f291742f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/system-binary-constants-1.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+
+#define BINARY_INT_CONSTANT_IN_SYSTEM_HEADER 0b1101
diff --git a/gcc/testsuite/g++.dg/tc1/dr217.C b/gcc/testsuite/g++.dg/tc1/dr217.C
index cfa2803974..099359b216 100644
--- a/gcc/testsuite/g++.dg/tc1/dr217.C
+++ b/gcc/testsuite/g++.dg/tc1/dr217.C
@@ -10,5 +10,5 @@ struct S
};
template <class T>
-void S<T>::foo (int = 0) // { dg-error "" "default arguments for parameters of member functions of class templates can be specified in the initial declaration only" { xfail *-*-* } }
+void S<T>::foo (int = 0) // { dg-error "" "default arguments for parameters of member functions of class templates can be specified in the initial declaration only" }
{ }
diff --git a/gcc/testsuite/g++.dg/template/abstract-dr337.C b/gcc/testsuite/g++.dg/template/abstract-dr337.C
new file mode 100644
index 0000000000..4f66c1c118
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/abstract-dr337.C
@@ -0,0 +1,13 @@
+// PR c++/17232 (DR 337)
+
+template<typename T>
+class A {
+ virtual void f() = 0;
+};
+
+template<typename T>
+void g(T (*a)[1]) {} // { dg-error "abstract" "" { xfail *-*-* } }
+
+int main() {
+ g<A<int> >(0); // { dg-error "no matching function" "" { xfail *-*-* } }
+}
diff --git a/gcc/testsuite/g++.dg/template/abstract1.C b/gcc/testsuite/g++.dg/template/abstract1.C
new file mode 100644
index 0000000000..20bbf5a911
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/abstract1.C
@@ -0,0 +1,12 @@
+// PR c++/58022
+
+template <class T> struct A { };
+template <class T> A<T> & operator<< (A<T>&, T);
+template <class T> class foo;
+template <class T> A<char> & operator<<(A<char>& o, const foo<T>& l);
+template <class T> class foo {
+ friend A<char>& operator<< <T> (A<char>& o, const foo<T>& l);
+};
+class bar;
+foo<bar> fb;
+class bar { virtual void baz()=0; };
diff --git a/gcc/testsuite/g++.dg/template/access23.C b/gcc/testsuite/g++.dg/template/access23.C
new file mode 100644
index 0000000000..054cf9201c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access23.C
@@ -0,0 +1,16 @@
+template <class T>
+class A
+{
+ typedef T I;
+};
+
+template <class T>
+void f(typename T::I);
+
+template <class T>
+void f(int);
+
+int main()
+{
+ f<A<float> > (1);
+}
diff --git a/gcc/testsuite/g++.dg/template/access24.C b/gcc/testsuite/g++.dg/template/access24.C
new file mode 100644
index 0000000000..9f192266ec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access24.C
@@ -0,0 +1,8 @@
+// PR c++/54437
+
+template <void (*P)()> void f();
+class A {
+ template <class T> static void g();
+ template <class T> static void h () { f<g<T> >(); }
+ static void i() { h<int>(); }
+};
diff --git a/gcc/testsuite/g++.dg/template/access25.C b/gcc/testsuite/g++.dg/template/access25.C
new file mode 100644
index 0000000000..e882a7099d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access25.C
@@ -0,0 +1,20 @@
+// PR c++/56359
+
+typedef int (*InvocationCallback) (const int &);
+
+template < typename target_t >
+void SetPrototypeMethod (target_t, const char *, InvocationCallback);
+
+class A
+{
+ void Initialize ();
+protected:
+ static int Stop (const int &);
+ void Stop (); // comment out to make the bug disappear.
+};
+
+void
+A::Initialize ()
+{
+ SetPrototypeMethod (0, "stop", A::Stop);
+}
diff --git a/gcc/testsuite/g++.dg/template/access26.C b/gcc/testsuite/g++.dg/template/access26.C
new file mode 100644
index 0000000000..1c5de9a8fd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access26.C
@@ -0,0 +1,6 @@
+// PR c++/45917
+
+template < typename T >
+struct A { static int i; };
+class B { typedef int X; }; // { dg-error "private" }
+void f() { A<B::X>::i = 0; } // { dg-error "this context" }
diff --git a/gcc/testsuite/g++.dg/template/access27.C b/gcc/testsuite/g++.dg/template/access27.C
new file mode 100644
index 0000000000..967e10f6a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access27.C
@@ -0,0 +1,17 @@
+// PR c++/57550
+
+template <bool (double)> bool Wrapper(double);
+template <class T> void MakeHandler(bool (T));
+
+class Handler
+{
+public:
+ template <typename T> static void SetPrimitiveHandlers()
+ {
+ MakeHandler(Wrapper<Append<T> >);
+ }
+private :
+ template <typename T> static bool Append(T);
+};
+
+template void Handler::SetPrimitiveHandlers<double>();
diff --git a/gcc/testsuite/g++.dg/template/access28.C b/gcc/testsuite/g++.dg/template/access28.C
new file mode 100644
index 0000000000..4dd53508db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/access28.C
@@ -0,0 +1,61 @@
+// PR c++/49663
+
+struct Nosm
+{
+ int m_R;
+};
+
+namespace dx {
+
+ struct onc
+ {
+ typedef void(*Cb)();
+
+ onc(Cb cb);
+ };
+
+ struct grac
+ {
+ template<class Derived> static void once();
+ };
+
+ template<class Derived>
+ struct tonc : onc
+ {
+ tonc() : onc(&grac::once<Derived>) {}
+
+ static Derived& get();
+ };
+
+ template<class Derived> void grac::once()
+ {
+ tonc<Derived>::get().h();
+ }
+}
+
+namespace
+{
+ template<typename T, int = sizeof(&T::m_R)>
+ struct has_R { };
+
+ template<typename T>
+ inline void
+ setR(T* m, has_R<T>* = 0)
+ { }
+
+ inline void setR(...) { }
+}
+
+template<typename M>
+ struct Qmi
+ : dx::tonc<Qmi<M> >
+ {
+ void h()
+ {
+ setR(&msg);
+ }
+
+ M msg;
+ };
+
+Qmi<Nosm> x;
diff --git a/gcc/testsuite/g++.dg/template/access7.C b/gcc/testsuite/g++.dg/template/access7.C
index bd38e4e0f4..7d1812732c 100644
--- a/gcc/testsuite/g++.dg/template/access7.C
+++ b/gcc/testsuite/g++.dg/template/access7.C
@@ -14,5 +14,5 @@ typename A::T* f (A) { // { dg-error "this context" }
}
void g () {
- f (S<int> ()); // { dg-message "required" }
+ f (S<int> ()); // { dg-message "required|no match" }
}
diff --git a/gcc/testsuite/g++.dg/template/aggr-init1.C b/gcc/testsuite/g++.dg/template/aggr-init1.C
new file mode 100644
index 0000000000..a09c7a7926
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/aggr-init1.C
@@ -0,0 +1,8 @@
+// PR c++/46903
+
+struct A {};
+struct B {
+ void *(*a)();
+};
+template <typename T> void *CreateA() {}
+B b = {CreateA<A>};
diff --git a/gcc/testsuite/g++.dg/template/alignof2.C b/gcc/testsuite/g++.dg/template/alignof2.C
new file mode 100644
index 0000000000..f9898980d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/alignof2.C
@@ -0,0 +1,9 @@
+// PR c++/55337
+// { dg-do compile }
+
+template <int> struct A;
+template <typename T> struct B
+{
+ static A <__alignof__ (T)> b;
+};
+template <typename T> A<__alignof__ (T)> B<T>::b;
diff --git a/gcc/testsuite/g++.dg/template/arg2.C b/gcc/testsuite/g++.dg/template/arg2.C
index dabefc8778..ef84cfdd79 100644
--- a/gcc/testsuite/g++.dg/template/arg2.C
+++ b/gcc/testsuite/g++.dg/template/arg2.C
@@ -10,5 +10,5 @@ template <typename T> class X {};
void fn ()
{
class L {};
- X<L> f; // { dg-error "uses local type|trying to instantiate|no type|invalid type" "" { target c++98 } }
+ X<L> f; // { dg-error "uses local type|trying to instantiate|no type|invalid type" "" { target { ! c++11 } } }
}
diff --git a/gcc/testsuite/g++.dg/template/arg9.C b/gcc/testsuite/g++.dg/template/arg9.C
new file mode 100644
index 0000000000..41af11486e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/arg9.C
@@ -0,0 +1,8 @@
+// PR c++/57771
+// { dg-do compile }
+
+template <int N>
+struct S {};
+
+S <static_cast <int> (4>>2)> s1;
+S <reinterpret_cast <int> (4>>2)> s2;
diff --git a/gcc/testsuite/g++.dg/template/array26.C b/gcc/testsuite/g++.dg/template/array26.C
new file mode 100644
index 0000000000..6692071694
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/array26.C
@@ -0,0 +1,40 @@
+// PR c++/57325
+
+class valarray { int _M_data; };
+template < typename > struct SimpleJet { valarray partials; };
+
+template < class C > struct scoped_ptr_impl
+{
+ scoped_ptr_impl (C *):data_ () { }
+ struct Data
+ {
+ C ptr;
+ };
+ Data data_;
+};
+
+template < class, class = int >struct scoped_ptr;
+template < class C, class D > struct scoped_ptr <C[], D >
+{
+ scoped_ptr ():impl_ (0) { }
+ scoped_ptr_impl < C > impl_;
+};
+
+template < typename JetsT > void
+TestJets (JetsT *)
+{
+ typedef typename JetsT::JetType JetT;
+ scoped_ptr < JetT[] > a;
+}
+
+template < typename T > struct SimpleJets
+{
+ typedef SimpleJet < T > JetType;
+ scoped_ptr < SimpleJet < T >[] > vars_;
+};
+
+void fn ()
+{
+ SimpleJets < double >b;
+ TestJets (&b);
+}
diff --git a/gcc/testsuite/g++.dg/template/array27.C b/gcc/testsuite/g++.dg/template/array27.C
new file mode 100644
index 0000000000..95680dd15f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/array27.C
@@ -0,0 +1,16 @@
+// PR c++/47808
+// { dg-options "" }
+
+template <typename T>
+inline T abs (T const & x) { return x; }
+
+template <typename T>
+void f (T)
+{
+ typedef int ai[(abs(0.1) > 0) ? 1 : -1];
+}
+
+int main()
+{
+ f(1);
+}
diff --git a/gcc/testsuite/g++.dg/template/arrow2.C b/gcc/testsuite/g++.dg/template/arrow2.C
new file mode 100644
index 0000000000..8ec9e01d0d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/arrow2.C
@@ -0,0 +1,12 @@
+// PR c++/56639
+
+struct A {
+ int i;
+ static A* f();
+};
+
+struct B {
+ void g() {
+ int (A::f()->i);
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/arrow3.C b/gcc/testsuite/g++.dg/template/arrow3.C
new file mode 100644
index 0000000000..b2029ba489
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/arrow3.C
@@ -0,0 +1,38 @@
+// PR c++/56895
+// { dg-do compile }
+
+extern struct A { bool foo (); A bar (); } *a;
+
+template <int>
+int
+baz1 ()
+{
+ return 2 << (a->bar().foo() ? 1 : 0);
+}
+
+template <int>
+int
+baz2 ()
+{
+ return 2 >> (a->bar().foo() ? 1 : 0);
+}
+
+template <int>
+int
+baz3 ()
+{
+ return 10 / (a->bar().foo() ? 1 : 2);
+}
+
+template <int>
+int
+baz4 ()
+{
+ return 10 % (a->bar().foo() ? 1 : 0);
+}
+
+int
+test ()
+{
+ return baz1<0> () + baz2<0> () + baz3<0> () + baz4<0> ();
+}
diff --git a/gcc/testsuite/g++.dg/template/arrow4.C b/gcc/testsuite/g++.dg/template/arrow4.C
new file mode 100644
index 0000000000..89e7822195
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/arrow4.C
@@ -0,0 +1,19 @@
+// PR c++/56895
+// { dg-do compile }
+
+void fn (int *);
+void fn (int);
+extern struct A { bool foo (); A bar (); } *a;
+
+template <int>
+void
+baz ()
+{
+ fn (a->bar().foo() ? 1 : 0);
+}
+
+void
+test ()
+{
+ baz<0> ();
+}
diff --git a/gcc/testsuite/g++.dg/template/bitfield2.C b/gcc/testsuite/g++.dg/template/bitfield2.C
new file mode 100644
index 0000000000..e9a5320d9e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/bitfield2.C
@@ -0,0 +1,16 @@
+// PR c++/25503
+
+template<int N>
+struct Test
+{
+ Test()
+ {
+ typedef struct StaticAssert {unsigned condition : (N); } XXX; // { dg-error "zero width" }
+ }
+};
+
+int
+main()
+{
+ Test<0> T;
+}
diff --git a/gcc/testsuite/g++.dg/template/canon-type-12.C b/gcc/testsuite/g++.dg/template/canon-type-12.C
index 08c86f0a98..f2467fa174 100644
--- a/gcc/testsuite/g++.dg/template/canon-type-12.C
+++ b/gcc/testsuite/g++.dg/template/canon-type-12.C
@@ -1,4 +1,4 @@
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<class T, T t = (T)0>
struct S
diff --git a/gcc/testsuite/g++.dg/template/canon-type-9.C b/gcc/testsuite/g++.dg/template/canon-type-9.C
index 4fcd524353..c15f93ad75 100644
--- a/gcc/testsuite/g++.dg/template/canon-type-9.C
+++ b/gcc/testsuite/g++.dg/template/canon-type-9.C
@@ -1,6 +1,5 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
struct F { F(int) {}};
diff --git a/gcc/testsuite/g++.dg/template/cast2.C b/gcc/testsuite/g++.dg/template/cast2.C
new file mode 100644
index 0000000000..0ce55f0355
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/cast2.C
@@ -0,0 +1,13 @@
+// PR c++/56238
+
+class A
+{
+ template < typename T > T& get ();
+ template < typename T > class B
+ {
+ void RemovePoint (A& value)
+ {
+ static_cast < double >(value.get < T > ());
+ }
+ };
+};
diff --git a/gcc/testsuite/g++.dg/template/cast3.C b/gcc/testsuite/g++.dg/template/cast3.C
new file mode 100644
index 0000000000..b343ee427b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/cast3.C
@@ -0,0 +1,22 @@
+// PR c++/56438
+
+struct A { };
+A& operator<<(A&, const char*);
+
+struct B {
+ int size();
+};
+
+struct C { };
+
+template <class S, class T>
+S bar(const S& s, const T& t) {
+ return s;
+}
+
+template<class S, class T>
+void foo() {
+ A a;
+ B b;
+ a << bar(b.size(), C()); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/template/cond2.C b/gcc/testsuite/g++.dg/template/cond2.C
index fad86bebe5..e6bd19d40f 100644
--- a/gcc/testsuite/g++.dg/template/cond2.C
+++ b/gcc/testsuite/g++.dg/template/cond2.C
@@ -6,5 +6,5 @@ template<int X> class c;
template<int X, int Y> int test(c<X ? : Y>&); // { dg-error "omitted" }
void test(c<2>*c2) {
- test<0, 2>(*c2); // { dg-message "required" }
+ test<0, 2>(*c2);
}
diff --git a/gcc/testsuite/g++.dg/template/condition1.C b/gcc/testsuite/g++.dg/template/condition1.C
new file mode 100644
index 0000000000..4151e9e566
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/condition1.C
@@ -0,0 +1,79 @@
+// PR c++/47950
+
+template <typename T> struct empty
+{
+ // allow success case to build (not relevant to bug)
+ operator bool() { return true; }
+};
+
+template <typename T> struct from_int
+{
+ from_int(int) {}
+
+ // allow success case to build (not relevant to bug)
+ operator bool() { return true; }
+};
+
+template <typename T>
+from_int<T> via_function(T v)
+{
+ return from_int<T>(v);
+}
+
+template <typename T>
+void f()
+{
+ // ********* this section compiles ***********
+
+ // these plain initializers work fine
+ from_int<int> a = 7;
+ from_int<int> b = from_int<int>(7);
+ empty<int> c = empty<int>();
+ from_int<T> ta = 7;
+ from_int<T> tb = from_int<T>(7);
+ empty<T> tc = empty<T>();
+
+ // these dependent condition decls work fine
+ if (empty<T> x = empty<T>())
+ ;
+ if (from_int<T> x = 7)
+ ;
+ if (from_int<T> x = from_int<T>(7))
+ ;
+ if (from_int<T> x = via_function(T()))
+ ;
+
+ // this non-dependent condition decl using conversion works fine
+ if (from_int<int> x = 7)
+ ;
+
+ // these non-dependent condition decls using conversion or braced-
+ // initialization work fine (in c++0x mode only course)
+ #if __GXX_EXPERIMENTAL_CXX0X__
+ if (empty<int> x {})
+ ;
+ if (from_int<int> x {7})
+ ;
+ #endif
+
+ // ********** this section fails in C++0x ***********
+
+ // the following non-dependent condition decls cause an assertion
+ // failure in
+ //
+ // tsubst_copy_and_build, at cp/pt.c:13370
+ //
+ // in C++0x mode
+ //
+ if (empty<int> x = empty<int>())
+ ;
+ if (from_int<int> x = from_int<int>(7))
+ ;
+ if (from_int<int> x = via_function(7))
+ ;
+}
+
+int main()
+{
+ f<int>();
+}
diff --git a/gcc/testsuite/g++.dg/template/const5.C b/gcc/testsuite/g++.dg/template/const5.C
index 5d3ec5b1c9..6de0258162 100644
--- a/gcc/testsuite/g++.dg/template/const5.C
+++ b/gcc/testsuite/g++.dg/template/const5.C
@@ -1,5 +1,5 @@
// PR c++/49176
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
struct A { static int a(); };
diff --git a/gcc/testsuite/g++.dg/template/const6.C b/gcc/testsuite/g++.dg/template/const6.C
new file mode 100644
index 0000000000..3c40d2635b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/const6.C
@@ -0,0 +1,7 @@
+// PR c++/56684
+
+template < int T > struct S
+{
+ static const int Ti = T;
+ S() { 1 << Ti; }
+};
diff --git a/gcc/testsuite/g++.dg/template/const7.C b/gcc/testsuite/g++.dg/template/const7.C
new file mode 100644
index 0000000000..424ac6d6f0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/const7.C
@@ -0,0 +1,8 @@
+// PR c++/47897
+
+template < typename T, T N >
+struct S
+{
+ static const T value = N;
+ typedef S< T, value + 1 > next;
+};
diff --git a/gcc/testsuite/g++.dg/template/const8.C b/gcc/testsuite/g++.dg/template/const8.C
new file mode 100644
index 0000000000..5b12629539
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/const8.C
@@ -0,0 +1,13 @@
+// PR c++/48707
+
+struct A {
+ static int a();
+};
+
+template<typename X>
+struct B: A {
+ static int const b;
+};
+
+template<typename X>
+int const B<X>::b=B<X>::a();
diff --git a/gcc/testsuite/g++.dg/template/conv14.C b/gcc/testsuite/g++.dg/template/conv14.C
new file mode 100644
index 0000000000..509ae6a654
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/conv14.C
@@ -0,0 +1,30 @@
+// PR c++/61647
+
+class XX;
+
+template<typename Container, typename Key>
+struct Accessor;
+
+template<typename Container, typename Key, typename KeyStore = Key>
+class Variant {
+protected:
+ KeyStore index;
+ Container state;
+public:
+ Variant(Container st, const Key& i) : index(i), state(st) {}
+
+ template<typename T>
+ operator T() const {
+ return Accessor<Container, KeyStore>::template get<T>(state, index);
+ }
+};
+
+class AutoCleanVariant : public Variant<XX*, int> {
+public:
+ AutoCleanVariant(XX* st, int i) : Variant<XX*,int>(st,i) {}
+
+ template<typename T>
+ operator T() const {
+ return Variant<XX*, int>::operator T();
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/crash105.C b/gcc/testsuite/g++.dg/template/crash105.C
index 649bf8b77e..8cfff6a367 100644
--- a/gcc/testsuite/g++.dg/template/crash105.C
+++ b/gcc/testsuite/g++.dg/template/crash105.C
@@ -10,5 +10,8 @@ template < typename > struct S < int >
void
f ()
{
- S < int >::f (); // { dg-error "cannot call" }
+ S < int >::f ();
}
+
+// Don't be picky about error-recovery.
+// { dg-prune-output "." }
diff --git a/gcc/testsuite/g++.dg/template/crash106.C b/gcc/testsuite/g++.dg/template/crash106.C
index c2d117e03a..ebd47bcffd 100644
--- a/gcc/testsuite/g++.dg/template/crash106.C
+++ b/gcc/testsuite/g++.dg/template/crash106.C
@@ -10,3 +10,5 @@ struct A
template<T N = 0, void (A::*)() = &A::foo<N> > struct B {}; // { dg-error "type|declared" }
B<> b; // { dg-error "type|declaration" }
+
+// { dg-prune-output "could not convert" }
diff --git a/gcc/testsuite/g++.dg/template/crash108.C b/gcc/testsuite/g++.dg/template/crash108.C
index 408d36a945..221d80ee5f 100644
--- a/gcc/testsuite/g++.dg/template/crash108.C
+++ b/gcc/testsuite/g++.dg/template/crash108.C
@@ -1,5 +1,5 @@
// PR c++/50861
-template<class T> struct A {A(int b=k(0));}; // { dg-error "arguments" }
-void f(int k){A<int> a;} // // { dg-error "parameter|declared" }
+template<class T> struct A {A(int b=k(0));}; // { dg-error "parameter|arguments" }
+void f(int k){A<int> a;} // // { dg-message "declared" }
// { dg-message "note" "note" { target *-*-* } 3 }
diff --git a/gcc/testsuite/g++.dg/template/crash112.C b/gcc/testsuite/g++.dg/template/crash112.C
index 919c887fd9..ff35764c7c 100644
--- a/gcc/testsuite/g++.dg/template/crash112.C
+++ b/gcc/testsuite/g++.dg/template/crash112.C
@@ -5,7 +5,7 @@ struct A
template<typename> void foo() {}
};
-template<void (A::*)()> struct B {}; // { dg-error "declaration" }
+template<void (A::*)()> struct B {};
template<int> struct C
{
@@ -13,3 +13,5 @@ template<int> struct C
};
C<0> c;
+
+// { dg-prune-output "could not convert" }
diff --git a/gcc/testsuite/g++.dg/template/crash113.C b/gcc/testsuite/g++.dg/template/crash113.C
new file mode 100644
index 0000000000..3d3a562bdc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash113.C
@@ -0,0 +1,50 @@
+// PR c++/53581
+
+template<class A, int M, int N>
+class Child;
+
+template<class A, int M, int N>
+class Base
+{
+public:
+ Child<A, M, N> operator-(const Base<A, M, N> &m) const
+ {
+ Child<A, M, N> diff;
+ return diff;
+ }
+
+ A test() const
+ {
+ return 0;
+ }
+
+private:
+ A values[M * N];
+};
+
+template<class A, int N>
+class Ops
+{
+public:
+ virtual ~Ops() {}
+
+ bool bar() const
+ {
+ Child<A, N, N> mat;
+ return (*static_cast<const Child<A, N, N>*>(this) - mat).test();
+ }
+};
+
+
+template<class A, int N>
+class Child<A, N, N> : public Base<A, N, N>, public Ops<A, N> {};
+
+class ImageWarp
+{
+ bool bar() const
+ {
+ return foo.bar();
+ }
+
+ Child<float, 3, 3> foo;
+};
diff --git a/gcc/testsuite/g++.dg/template/crash114.C b/gcc/testsuite/g++.dg/template/crash114.C
new file mode 100644
index 0000000000..cf894ba696
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash114.C
@@ -0,0 +1,5 @@
+// PR c++/34892
+
+template<int=..., int=0> struct A {}; // { dg-error "expected primary" }
+
+A<0> a;
diff --git a/gcc/testsuite/g++.dg/template/crash116.C b/gcc/testsuite/g++.dg/template/crash116.C
new file mode 100644
index 0000000000..d26c591ef4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash116.C
@@ -0,0 +1,13 @@
+// PR c++/38634
+
+template<int> struct A
+{
+ A();
+};
+
+template<int N, char> A<N>::A() // { dg-error "template|required" }
+{
+ struct B {};
+}
+
+A<0> a;
diff --git a/gcc/testsuite/g++.dg/template/crash117.C b/gcc/testsuite/g++.dg/template/crash117.C
new file mode 100644
index 0000000000..5aaaf7344f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash117.C
@@ -0,0 +1,9 @@
+// PR c++/58649
+
+template<typename> void foo()
+{
+ E(); // { dg-error "declaration|declared" }
+ enum E {};
+}
+
+template void foo<int>();
diff --git a/gcc/testsuite/g++.dg/template/crash118.C b/gcc/testsuite/g++.dg/template/crash118.C
new file mode 100644
index 0000000000..e0de605f70
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash118.C
@@ -0,0 +1,11 @@
+// PR c++/60383
+
+template<int> struct A
+{
+ template<typename> struct B
+ {
+ template<typename T> struct B<T*> {}; // { dg-error "specialization" }
+ };
+};
+
+A<0>::B<char*> b;
diff --git a/gcc/testsuite/g++.dg/template/crash119.C b/gcc/testsuite/g++.dg/template/crash119.C
new file mode 100644
index 0000000000..95d80a8ffc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/crash119.C
@@ -0,0 +1,8 @@
+// PR c++/59115
+
+template<typename T, float, int, typename U> void foo(T, U) {} // { dg-error "valid type" }
+
+void bar()
+{
+ foo(0, 0); // { dg-error "matching" }
+}
diff --git a/gcc/testsuite/g++.dg/template/crash39.C b/gcc/testsuite/g++.dg/template/crash39.C
index ddecc173c4..840255cbea 100644
--- a/gcc/testsuite/g++.dg/template/crash39.C
+++ b/gcc/testsuite/g++.dg/template/crash39.C
@@ -1,6 +1,6 @@
// PR c++/22405
-template <typename T> void foo(T &arg) { // { dg-error "declared" }
+template <typename T> void foo(T &arg) { // { dg-message "declared" }
arg+=1;
}
diff --git a/gcc/testsuite/g++.dg/template/crash41.C b/gcc/testsuite/g++.dg/template/crash41.C
index 9a440b0761..16e7028a66 100644
--- a/gcc/testsuite/g++.dg/template/crash41.C
+++ b/gcc/testsuite/g++.dg/template/crash41.C
@@ -1,7 +1,7 @@
// PR c++/22464
template<typename T>
-void do_something(const T* A) // { dg-error "declared" }
+void do_something(const T* A) // { dg-message "declared" }
{
struct helper_t{
helper_t() {
diff --git a/gcc/testsuite/g++.dg/template/crash74.C b/gcc/testsuite/g++.dg/template/crash74.C
index 9f2e415cfe..d236947ec5 100644
--- a/gcc/testsuite/g++.dg/template/crash74.C
+++ b/gcc/testsuite/g++.dg/template/crash74.C
@@ -2,5 +2,5 @@
// { dg-do compile }
// { dg-options "" }
-template<typename F> void foo () { }
-template<typename F> struct foo<F> { }; // { dg-error "redeclared as" }
+template<typename F> void foo () { } // { dg-prune-output "previous" }
+template<typename F> struct foo<F> { }; // { dg-error "template" }
diff --git a/gcc/testsuite/g++.dg/template/crash84.C b/gcc/testsuite/g++.dg/template/crash84.C
index c42f85ce55..103e90a707 100644
--- a/gcc/testsuite/g++.dg/template/crash84.C
+++ b/gcc/testsuite/g++.dg/template/crash84.C
@@ -5,7 +5,7 @@
template<typename T> struct a
{
template <template <typename> class C, typename X, C<X>* =0>
- struct b // { dg-error "class C' is not a template|is not a valid type" }
+ struct b
{
};
};
@@ -13,7 +13,8 @@ template<typename T> struct a
void
foo ()
{
- a<int> v; // { dg-message "required from here" }
+ a<int> a1; // OK
+ a<int>::b<a,int> b1; // { dg-error "template argument" }
}
-
+// { dg-prune-output "invalid type in declaration" }
diff --git a/gcc/testsuite/g++.dg/template/crash89.C b/gcc/testsuite/g++.dg/template/crash89.C
index e62b57a392..f4cdaf9d9b 100644
--- a/gcc/testsuite/g++.dg/template/crash89.C
+++ b/gcc/testsuite/g++.dg/template/crash89.C
@@ -1,8 +1,10 @@
// PR c++/34397
-template<typename T, int = T()[0]> struct A
+template<typename T, int = T()[0]> struct A // { dg-error "subscripted" }
{
typedef A<T> B;
};
-A<int> a; // { dg-error "subscripted|template|declaration" }
+A<int> a; // { dg-error "declaration" }
+
+// { dg-prune-output "template argument 2 is invalid" }
diff --git a/gcc/testsuite/g++.dg/template/crash90.C b/gcc/testsuite/g++.dg/template/crash90.C
index 6fe247cc30..4cfc40822a 100644
--- a/gcc/testsuite/g++.dg/template/crash90.C
+++ b/gcc/testsuite/g++.dg/template/crash90.C
@@ -4,5 +4,4 @@ template < unsigned >
struct A ;
template < typename >
struct B ;
-template < typename T , A < B < T > // { dg-error "initializer|parse error|valid type|expected" }
-{ }
+template < typename T , A < B < T > {}// { dg-error "initializer|parse error|type|expected" }
diff --git a/gcc/testsuite/g++.dg/template/crash92.C b/gcc/testsuite/g++.dg/template/crash92.C
index c0219c4a3e..1153ef6193 100644
--- a/gcc/testsuite/g++.dg/template/crash92.C
+++ b/gcc/testsuite/g++.dg/template/crash92.C
@@ -1,7 +1,7 @@
// PR c++/42055
-template<typename T> void foo(T, T); // { dg-error "candidates|template" }
+template<typename T> void foo(T, T); // { dg-message "candidates|template" }
-template<typename T> void foo(T, int); // { dg-error "template" }
+template<typename T> void foo(T, int); // { dg-message "template" }
template void foo(int, int); // { dg-error "ambiguous template specialization" }
diff --git a/gcc/testsuite/g++.dg/template/crash95.C b/gcc/testsuite/g++.dg/template/crash95.C
index 2ad9e98166..f60e635ae6 100644
--- a/gcc/testsuite/g++.dg/template/crash95.C
+++ b/gcc/testsuite/g++.dg/template/crash95.C
@@ -8,4 +8,4 @@ template < typename > struct S
};
};
-S < int > s(0); // { dg-error "incomplete type" }
+S < int > s(0); // { dg-error "no matching" }
diff --git a/gcc/testsuite/g++.dg/template/crash97.C b/gcc/testsuite/g++.dg/template/crash97.C
index 3d177f4e53..7d2161f54f 100644
--- a/gcc/testsuite/g++.dg/template/crash97.C
+++ b/gcc/testsuite/g++.dg/template/crash97.C
@@ -2,7 +2,7 @@
template<typename> struct A {};
-template<typename> struct A<int> // { dg-error "not used|template\\-parameter" }
+template<typename> struct A<int> // { dg-error "not deducible|template\\-parameter" }
{
template<int> void foo();
};
diff --git a/gcc/testsuite/g++.dg/template/crash98.C b/gcc/testsuite/g++.dg/template/crash98.C
index e3c224df1d..9d7d2ece14 100644
--- a/gcc/testsuite/g++.dg/template/crash98.C
+++ b/gcc/testsuite/g++.dg/template/crash98.C
@@ -1,8 +1,8 @@
// PR c++/43630
-template < typename > struct A; // { dg-error "declaration" }
+template < typename > struct A;
-template < typename > struct A < int > // { dg-error "not used|template\\-parameter" }
+template < typename > struct A < int > // { dg-error "not deducible|template\\-parameter|declaration" }
{
int i;
int f ();
diff --git a/gcc/testsuite/g++.dg/template/defarg12.C b/gcc/testsuite/g++.dg/template/defarg12.C
index d11848af22..7131501e1c 100644
--- a/gcc/testsuite/g++.dg/template/defarg12.C
+++ b/gcc/testsuite/g++.dg/template/defarg12.C
@@ -1,5 +1,5 @@
// PR c++/35828
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template < typename > struct A ;
template < template < typename > class = A >
diff --git a/gcc/testsuite/g++.dg/template/defarg15.C b/gcc/testsuite/g++.dg/template/defarg15.C
new file mode 100644
index 0000000000..fea3deee71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/defarg15.C
@@ -0,0 +1,19 @@
+// PR c++/54198
+
+template <typename T> void
+refIfNotNull (T* p1)
+{
+ p1->ref;
+}
+template <typename T> struct A
+{
+ A (T* p1)
+ {
+ refIfNotNull (p1);
+ }
+};
+class B;
+class C
+{
+ void getParent (A <B> = 0);
+};
diff --git a/gcc/testsuite/g++.dg/template/defarg16.C b/gcc/testsuite/g++.dg/template/defarg16.C
new file mode 100644
index 0000000000..ba78bfbd5a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/defarg16.C
@@ -0,0 +1,28 @@
+// PR c++/55127
+
+struct some_class
+{
+ static const bool is_valid_type = true;
+};
+
+template< typename Type
+ , bool Valid = Type::is_valid_type
+>
+struct wrapper;
+
+template< typename Type >
+struct wrapper< Type, true >
+{
+ typedef Type type;
+};
+
+template< typename T >
+void fun()
+{
+ wrapper<some_class>::type x;
+}
+
+int main()
+{
+ fun<int>();
+}
diff --git a/gcc/testsuite/g++.dg/template/defarg17.C b/gcc/testsuite/g++.dg/template/defarg17.C
new file mode 100644
index 0000000000..38d68d4568
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/defarg17.C
@@ -0,0 +1,9 @@
+// PR c++/60185
+
+template<int> struct A
+{
+ int i; // { dg-message "" }
+ A() { void foo(int=i); } // { dg-error "" }
+};
+
+A<0> a;
diff --git a/gcc/testsuite/g++.dg/template/defarg6.C b/gcc/testsuite/g++.dg/template/defarg6.C
index f4d84685ab..15848a1369 100644
--- a/gcc/testsuite/g++.dg/template/defarg6.C
+++ b/gcc/testsuite/g++.dg/template/defarg6.C
@@ -8,7 +8,7 @@ enum X{ a, b, c };
struct C
{
- static void func (X &ref = a); // { dg-error "default argument" "" }
+ static void func (X &ref = a); // { dg-error "" }
};
template <typename T>
@@ -21,5 +21,7 @@ void Foo (X & obj)
{
D<int>::func (obj);
- D<int>::func (); // { dg-error "default argument" "" }
+ D<int>::func (); // { dg-error "" }
}
+
+// { dg-prune-output "passing argument" }
diff --git a/gcc/testsuite/g++.dg/template/delete2.C b/gcc/testsuite/g++.dg/template/delete2.C
new file mode 100644
index 0000000000..b6ab380c9f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/delete2.C
@@ -0,0 +1,26 @@
+// PR c++/58119
+
+template <class T>
+struct A
+{
+ operator T*();
+ template <class U>
+ operator A<U>();
+};
+
+template <class T>
+struct B
+{
+ operator T*();
+ template <class U>
+ operator A<U>*();
+};
+
+int main()
+{
+ A<int> a;
+ delete a;
+
+ B<int> b;
+ delete b; // { dg-error "template|delete" }
+}
diff --git a/gcc/testsuite/g++.dg/template/dependent-args1.C b/gcc/testsuite/g++.dg/template/dependent-args1.C
index 0b197cf555..a540e55f4e 100644
--- a/gcc/testsuite/g++.dg/template/dependent-args1.C
+++ b/gcc/testsuite/g++.dg/template/dependent-args1.C
@@ -9,3 +9,5 @@ struct A
template<int N, void (A::*)() = &A::foo<N> > struct B {};
B<int> b; // { dg-error "type/value mismatch|expected a constant|invalid type" }
+
+// { dg-prune-output "could not convert" }
diff --git a/gcc/testsuite/g++.dg/template/dependent-expr8.C b/gcc/testsuite/g++.dg/template/dependent-expr8.C
index 20014d6e70..33fb51debd 100644
--- a/gcc/testsuite/g++.dg/template/dependent-expr8.C
+++ b/gcc/testsuite/g++.dg/template/dependent-expr8.C
@@ -1,6 +1,5 @@
// Origin PR c++/48574
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/template/dtor9.C b/gcc/testsuite/g++.dg/template/dtor9.C
new file mode 100644
index 0000000000..fd71389b86
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/dtor9.C
@@ -0,0 +1,12 @@
+// PR c++/60347
+
+struct A;
+
+template <class T>
+struct B
+{
+ T* p;
+ virtual ~B() { p->~T(); }
+};
+
+struct C: B<A> { };
diff --git a/gcc/testsuite/g++.dg/template/enum7.C b/gcc/testsuite/g++.dg/template/enum7.C
new file mode 100644
index 0000000000..8c464a795d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/enum7.C
@@ -0,0 +1,8 @@
+// PR c++/53524
+
+template <class T> struct A { enum EA { ea }; };
+template <class T, class U> struct B {
+ enum EB { eb1 = A<T>::ea, eb2 = A<U>::ea, eb3 = 0 ? eb1 : eb2 };
+};
+
+B<int,char> b;
diff --git a/gcc/testsuite/g++.dg/template/enum8.C b/gcc/testsuite/g++.dg/template/enum8.C
new file mode 100644
index 0000000000..314100f61b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/enum8.C
@@ -0,0 +1,7 @@
+// PR c++/47482
+
+template<class>
+struct K
+{
+ enum { A = sizeof"A", B = +A };
+};
diff --git a/gcc/testsuite/g++.dg/template/error-recovery3.C b/gcc/testsuite/g++.dg/template/error-recovery3.C
new file mode 100644
index 0000000000..f8fd94b9db
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error-recovery3.C
@@ -0,0 +1,8 @@
+// PR c++/48212
+
+template < bool > void
+foo ()
+{
+ const bool b =; // { dg-error "" }
+ foo < b > (); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/template/error2.C b/gcc/testsuite/g++.dg/template/error2.C
index 96f0bcae66..be5ab1d450 100644
--- a/gcc/testsuite/g++.dg/template/error2.C
+++ b/gcc/testsuite/g++.dg/template/error2.C
@@ -7,9 +7,8 @@
template<class T> struct X
{
- T m; // { dg-error "as type 'void'" "void" }
- // { dg-error "incomplete type" "incomplate" { target *-*-* } 10 }
- // { dg-error "invalid" "invalid" { target *-*-* } 10 }
+ T m; // { dg-error "void" "void" }
+ // { dg-error "incomplete type" "incomplete" { target *-*-* } 10 }
};
template<class T >
diff --git a/gcc/testsuite/g++.dg/template/error48.C b/gcc/testsuite/g++.dg/template/error48.C
new file mode 100644
index 0000000000..483f7b54c3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error48.C
@@ -0,0 +1,15 @@
+// PR c++/54416
+
+template < typename T > struct foo;
+template <> struct foo < int >;
+template < typename T > struct bar
+{
+ template <> struct foo < int > // { dg-error "non-namespace scope" }
+ {
+ void baz ();
+ };
+};
+void foo < int >::baz () { }
+
+// Don't be picky about error-recovery.
+// { dg-prune-output "." }
diff --git a/gcc/testsuite/g++.dg/template/error5.C b/gcc/testsuite/g++.dg/template/error5.C
index 0c793509da..72d3c29b8f 100644
--- a/gcc/testsuite/g++.dg/template/error5.C
+++ b/gcc/testsuite/g++.dg/template/error5.C
@@ -1,6 +1,6 @@
template <typename T>
-struct X<T*> { // { dg-error "not a template" }
+struct X<T*> { // { dg-error "not a class template" }
typedef int Y;
};
-extern struct Z<int> s; // { dg-error "not a template" }
+extern struct Z<int> s; // { dg-error "not a class template" }
diff --git a/gcc/testsuite/g++.dg/template/error50.C b/gcc/testsuite/g++.dg/template/error50.C
new file mode 100644
index 0000000000..d8702f8881
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error50.C
@@ -0,0 +1,19 @@
+// PR c++/57327
+
+template<class T>
+struct A {};
+
+template<class T>
+void f(A<T>&) {}
+
+struct B : A<long> {};
+
+struct C : A<char> {};
+
+struct D : B, C {};
+
+int main()
+{
+ D d;
+ f(d); // { dg-error "no matching" }
+} // { dg-message "'A<T>' is an ambiguous base" "" { target *-*-* } 18 }
diff --git a/gcc/testsuite/g++.dg/template/error51.C b/gcc/testsuite/g++.dg/template/error51.C
new file mode 100644
index 0000000000..b3a6cfb3d2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error51.C
@@ -0,0 +1,9 @@
+// PR c++/26572
+
+template<int> void foo()
+{
+ struct A; // { dg-error "declaration" }
+ struct B : A {}; // { dg-error "invalid use of incomplete" }
+}
+
+template void foo<0>();
diff --git a/gcc/testsuite/g++.dg/template/error52.C b/gcc/testsuite/g++.dg/template/error52.C
new file mode 100644
index 0000000000..3350c8e6a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error52.C
@@ -0,0 +1,19 @@
+// PR c++/16128
+
+template<typename T>
+struct A {
+ };
+
+namespace H {
+ template<typename T>
+ struct B {};
+ }
+
+A a; // { dg-error "template" }
+H::B b; // { dg-error "template" }
+
+int main() {
+ A a; // { dg-error "template" }
+ H::B b; // { dg-error "template" }
+ return 0;
+ }
diff --git a/gcc/testsuite/g++.dg/template/error53.C b/gcc/testsuite/g++.dg/template/error53.C
new file mode 100644
index 0000000000..5976c868d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error53.C
@@ -0,0 +1,13 @@
+// PR c++/57638
+
+template<int x>
+struct S {};
+
+template<long long i>
+void g(S<i>);
+
+void f()
+{
+ S<1000> t;
+ g(t); // { dg-error "no matching" }
+} // { dg-message "mismatched types 'long long int' and 'int'" "" { target *-*-* } 12 }
diff --git a/gcc/testsuite/g++.dg/template/error54.C b/gcc/testsuite/g++.dg/template/error54.C
new file mode 100644
index 0000000000..2933bb5aea
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/error54.C
@@ -0,0 +1,10 @@
+// PR c++/56380
+
+template <typename T>
+struct X {
+ X();
+ mutable T x; // { dg-error "cannot be declared" }
+};
+
+X<const int> a; // { dg-message "required from here" }
+X<int&> b; // { dg-message "required from here" }
diff --git a/gcc/testsuite/g++.dg/template/explicit-args2.C b/gcc/testsuite/g++.dg/template/explicit-args2.C
index d37b734202..3b5537bade 100644
--- a/gcc/testsuite/g++.dg/template/explicit-args2.C
+++ b/gcc/testsuite/g++.dg/template/explicit-args2.C
@@ -1,5 +1,5 @@
// PR c++/37177
-// { dg-options -std=c++0x }
+// { dg-do compile { target c++11 } }
#include <typeinfo>
diff --git a/gcc/testsuite/g++.dg/template/fn-ptr2.C b/gcc/testsuite/g++.dg/template/fn-ptr2.C
new file mode 100644
index 0000000000..742135a1e3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/fn-ptr2.C
@@ -0,0 +1,14 @@
+// PR c++/56095
+
+int *a(void) { return 0; }
+typedef void voidfn(void);
+template <voidfn* b> void z1(void) {}
+template <voidfn& b> void z2(void) {}
+
+int main()
+{
+ z1<(voidfn*)a>(); // { dg-error "" }
+ z1<reinterpret_cast<voidfn*>(a)>(); // { dg-error "" }
+ z2<(voidfn&)a>(); // { dg-error "" }
+ z2<reinterpret_cast<voidfn&>(a)>(); // { dg-error "" }
+}
diff --git a/gcc/testsuite/g++.dg/template/friend44.C b/gcc/testsuite/g++.dg/template/friend44.C
index 814fec1d5f..6ff4db3a3b 100644
--- a/gcc/testsuite/g++.dg/template/friend44.C
+++ b/gcc/testsuite/g++.dg/template/friend44.C
@@ -3,7 +3,7 @@
template<int> struct A
{
- friend int foo(); // { dg-error "14:new declaration" }
+ friend int foo(); // { dg-error "14:ambiguating new declaration" }
};
-void foo() { A<0> a; } // { dg-error "6:ambiguates old declaration" }
+void foo() { A<0> a; } // { dg-message "6:old declaration" }
diff --git a/gcc/testsuite/g++.dg/template/friend53.C b/gcc/testsuite/g++.dg/template/friend53.C
new file mode 100644
index 0000000000..6cbbb2b099
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend53.C
@@ -0,0 +1,23 @@
+// PR c++/53403
+
+template <typename T>
+class Foo
+{
+ typedef void type;
+ template <typename U> friend void f();
+public:
+ Foo() {}
+};
+
+template class Foo<void>;
+
+template <typename T>
+void f()
+{
+ typedef Foo<void>::type type;
+}
+
+int main()
+{
+ f<void>();
+}
diff --git a/gcc/testsuite/g++.dg/template/friend54.C b/gcc/testsuite/g++.dg/template/friend54.C
new file mode 100644
index 0000000000..ead7a72fcc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend54.C
@@ -0,0 +1,18 @@
+// PR c++/56642
+
+template <class T> struct A;
+
+template <class T>
+A<T> f(T*) { return A<T>(); }
+
+template <class T>
+struct A
+{
+ friend A f<T>(T*);
+};
+
+int main()
+{
+ int *p = 0;
+ f(p);
+}
diff --git a/gcc/testsuite/g++.dg/template/friend55.C b/gcc/testsuite/g++.dg/template/friend55.C
new file mode 100644
index 0000000000..4abe6ce6a2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend55.C
@@ -0,0 +1,18 @@
+// PR c++/59956
+
+template <int I> struct A;
+template <int I> class B {
+ int i;
+ template <int A_S> friend void A<A_S>::impl();
+};
+
+B<0> b1;
+template<int I>struct A { void impl(); };
+B<1> b2;
+
+template<int I> void A<I>::impl() { ++b1.i; ++b2.i; }
+
+int main()
+{
+ A<0>().impl();
+}
diff --git a/gcc/testsuite/g++.dg/template/friend56.C b/gcc/testsuite/g++.dg/template/friend56.C
new file mode 100644
index 0000000000..7dd5d486f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/friend56.C
@@ -0,0 +1,13 @@
+// Make sure we don't mistakenly mark f as DECL_COMDAT.
+// { dg-final { scan-assembler "_Z1fv" } }
+
+void f();
+
+template <class T> struct A
+{
+ friend void f();
+};
+
+A<int> a;
+
+void f() { }
diff --git a/gcc/testsuite/g++.dg/template/inherit6.C b/gcc/testsuite/g++.dg/template/inherit6.C
index 241a68e5e4..4f070984ed 100644
--- a/gcc/testsuite/g++.dg/template/inherit6.C
+++ b/gcc/testsuite/g++.dg/template/inherit6.C
@@ -1,6 +1,5 @@
// Origin PR c++/47172
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/template/inherit7.C b/gcc/testsuite/g++.dg/template/inherit7.C
index 67afbca6bf..b3abc26b98 100644
--- a/gcc/testsuite/g++.dg/template/inherit7.C
+++ b/gcc/testsuite/g++.dg/template/inherit7.C
@@ -1,6 +1,5 @@
// Origin: PR c++/48656
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
struct A {
int f();
diff --git a/gcc/testsuite/g++.dg/template/inherit8.C b/gcc/testsuite/g++.dg/template/inherit8.C
index a9b2bdb560..3176dc06d0 100644
--- a/gcc/testsuite/g++.dg/template/inherit8.C
+++ b/gcc/testsuite/g++.dg/template/inherit8.C
@@ -4,9 +4,9 @@ template <typename T>
struct A
{
template <typename U>
- struct B : public A <B<U> >
+ struct B : public A <B<U> > // { dg-error "declaration" }
{
- struct C : public B<U>
+ struct C : public B<U> // { dg-error "incomplete" }
{
};
};
diff --git a/gcc/testsuite/g++.dg/template/inherit9.C b/gcc/testsuite/g++.dg/template/inherit9.C
new file mode 100644
index 0000000000..926343b4e2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/inherit9.C
@@ -0,0 +1,15 @@
+// PR c++/58273
+
+class A {};
+class B
+{
+ int goo(A);
+};
+template<typename E>
+class D : public B
+{
+ void foo(A t)
+ {
+ int const i(B::goo(t));
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/injected1.C b/gcc/testsuite/g++.dg/template/injected1.C
index 58b8656938..58ec3cba6a 100644
--- a/gcc/testsuite/g++.dg/template/injected1.C
+++ b/gcc/testsuite/g++.dg/template/injected1.C
@@ -1,6 +1,6 @@
// PR c++/13950, DR 176
-template <class T> struct Base { }; // { dg-error "" } candidate
+template <class T> struct Base { }; // { dg-message "" } candidate
struct D1: Base<void>
{
diff --git a/gcc/testsuite/g++.dg/template/instantiate3.C b/gcc/testsuite/g++.dg/template/instantiate3.C
index 0e9fd70601..c0754da922 100644
--- a/gcc/testsuite/g++.dg/template/instantiate3.C
+++ b/gcc/testsuite/g++.dg/template/instantiate3.C
@@ -10,7 +10,7 @@ template <class TYPE>
struct ACE_Cleanup_Adapter
{
TYPE &object ()
- { return object_; } // { dg-error "invalid" }
+ { return object_; }
TYPE object_; // { dg-error "incomplete type" }
};
diff --git a/gcc/testsuite/g++.dg/template/koenig10.C b/gcc/testsuite/g++.dg/template/koenig10.C
new file mode 100644
index 0000000000..6a1b9b55be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/koenig10.C
@@ -0,0 +1,12 @@
+// PR c++/47511
+
+namespace N {
+ template <typename T> bool g( T ) {
+ return true;
+ }
+ struct A { };
+}
+template <class T> void f(const T&) {
+ N::A x;
+ g(x) ;
+}
diff --git a/gcc/testsuite/g++.dg/template/local-fn1.C b/gcc/testsuite/g++.dg/template/local-fn1.C
new file mode 100644
index 0000000000..88acd17d74
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/local-fn1.C
@@ -0,0 +1,8 @@
+// PR c++/60605
+
+template <typename T = int>
+struct Foo {
+ void bar() {
+ void bug();
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/loop1.C b/gcc/testsuite/g++.dg/template/loop1.C
new file mode 100644
index 0000000000..aa6d177d58
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/loop1.C
@@ -0,0 +1,9 @@
+// PR c++/60379
+
+template <int> struct A {
+ void m_fn1(int p1) {
+ int *a;
+ while (p1 && *static_cast<int *>(static_cast<void *>(a)))
+ ;
+ }
+};
diff --git a/gcc/testsuite/g++.dg/template/memclass5.C b/gcc/testsuite/g++.dg/template/memclass5.C
new file mode 100644
index 0000000000..eb32f13c91
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/memclass5.C
@@ -0,0 +1,26 @@
+// PR c++/60241
+
+template <typename T>
+struct x
+{
+ template <typename U>
+ struct y
+ {
+ typedef T result2;
+ };
+
+ typedef y<int> zy;
+};
+
+template<>
+template<class T>
+struct x<int>::y
+{
+ typedef double result2;
+};
+
+int main()
+{
+ x<int>::zy::result2 xxx;
+ x<int>::y<int>::result2 xxx2;
+}
diff --git a/gcc/testsuite/g++.dg/template/meminit1.C b/gcc/testsuite/g++.dg/template/meminit1.C
index 19a1e546d5..1dc96c472a 100644
--- a/gcc/testsuite/g++.dg/template/meminit1.C
+++ b/gcc/testsuite/g++.dg/template/meminit1.C
@@ -3,6 +3,6 @@ template <class T >
struct S
{
S() : S() {} // { dg-message "delegating constructors" }
-};
+}; // { dg-error "delegates to itself" "" { target *-*-* } 5 }
S<int> s;
diff --git a/gcc/testsuite/g++.dg/template/memtmpl4.C b/gcc/testsuite/g++.dg/template/memtmpl4.C
new file mode 100644
index 0000000000..54558b9806
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/memtmpl4.C
@@ -0,0 +1,10 @@
+// PR c++/53492
+
+template<typename T> struct A
+{
+ template<typename U> struct B;
+};
+
+template <> template<class T> struct A<T>::B { }; // { dg-error "expected 2 levels" }
+
+A<int>::B<int> b; // { dg-error "" }
diff --git a/gcc/testsuite/g++.dg/template/new12.C b/gcc/testsuite/g++.dg/template/new12.C
new file mode 100644
index 0000000000..84eedf8adf
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/new12.C
@@ -0,0 +1,12 @@
+// PR c++/48500
+
+struct linked_ptr {
+};
+template <typename T> linked_ptr make_linked_ptr(T* ptr);
+struct Concrete;
+struct NewedClass {
+ NewedClass(const Concrete& req){}
+};
+template<typename ArgT> void AddObjToChange(const ArgT& req) {
+ linked_ptr p = make_linked_ptr(new NewedClass(req));
+}
diff --git a/gcc/testsuite/g++.dg/template/non-const1.C b/gcc/testsuite/g++.dg/template/non-const1.C
new file mode 100644
index 0000000000..16a3851888
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-const1.C
@@ -0,0 +1,8 @@
+// PR c++/48015
+
+template <typename T> T f(T);
+template <typename T> void g()
+{
+ int const c = f (1);
+ int i = c - 0;
+}
diff --git a/gcc/testsuite/g++.dg/template/non-deducible1.C b/gcc/testsuite/g++.dg/template/non-deducible1.C
new file mode 100644
index 0000000000..4213524890
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/non-deducible1.C
@@ -0,0 +1,8 @@
+// PR c++/23055
+
+template <class> struct S { typedef int type; };
+
+template <class T>
+int foo(T, typename S<T>::type * ret);
+
+int j = foo(1, 0);
diff --git a/gcc/testsuite/g++.dg/template/nontype25.C b/gcc/testsuite/g++.dg/template/nontype25.C
index bcdcce5ea9..85393c1c35 100644
--- a/gcc/testsuite/g++.dg/template/nontype25.C
+++ b/gcc/testsuite/g++.dg/template/nontype25.C
@@ -7,8 +7,8 @@ template<const A* a> class C {};
template<const B* b> class D {};
template<B* b> class E {};
-template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" "" { target c++98 } }
-template<const B* b> void g(D<b> &, E<const_cast<B*>(b)> &) {} // { dg-error "" "" { target c++98 } }
+template<const B* b> void f(D<b> &, C<static_cast<const A*>(b)> &) {} // { dg-error "" "" }
+template<const B* b> void g(D<b> &, E<const_cast<B*>(b)> &) {} // { dg-error "" "" { target { ! c++11 } } }
B b;
@@ -16,7 +16,7 @@ int main()
{
C<static_cast<const A*>(&b)> c; // { dg-error "" }
D<&b> d;
- E<const_cast<B*>(&b)> e; // { dg-error "" "" { target c++98 } }
+ E<const_cast<B*>(&b)> e; // { dg-error "" "" { target { ! c++11 } } }
f(d, c); // { dg-error "" "" { target c++11 } }
g(d, e);
}
diff --git a/gcc/testsuite/g++.dg/template/nontype26.C b/gcc/testsuite/g++.dg/template/nontype26.C
new file mode 100644
index 0000000000..763d987dd3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/nontype26.C
@@ -0,0 +1,20 @@
+// PR c++/31671
+
+template<int& i> void doit() {
+ i = 0;
+}
+
+template<const int& i> class X {
+public:
+ void foo() {
+ doit<i>(); // { dg-error "cv-qualification|no matching" }
+ }
+};
+
+int i = 0;
+
+X<i> x;
+
+int main() {
+ x.foo();
+}
diff --git a/gcc/testsuite/g++.dg/template/operator12.C b/gcc/testsuite/g++.dg/template/operator12.C
new file mode 100644
index 0000000000..bc8e91de4c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/operator12.C
@@ -0,0 +1,9 @@
+// PR c++/59707
+
+struct T {
+ template<class D> operator D*() const;
+};
+
+void f(T x) {
+ x < x; // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/template/overload10.C b/gcc/testsuite/g++.dg/template/overload10.C
index 088b9d291c..84078bd872 100644
--- a/gcc/testsuite/g++.dg/template/overload10.C
+++ b/gcc/testsuite/g++.dg/template/overload10.C
@@ -1,6 +1,6 @@
// PR c++40342
-template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-error "" }
-template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-error "" }
+template <typename T1, typename T2> int f(T1 *, const T2 *); // { dg-message "" }
+template <typename T1, typename T2> int f(const T1 *, T2 *); // { dg-message "" }
int (*p)(const int *, const int *) = f; // { dg-error "ambiguous" }
diff --git a/gcc/testsuite/g++.dg/template/overload13.C b/gcc/testsuite/g++.dg/template/overload13.C
new file mode 100644
index 0000000000..d41ccd01a9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/overload13.C
@@ -0,0 +1,16 @@
+// PR c++/56998
+
+class Secret;
+char IsNullLiteralHelper(Secret* p);
+char (&IsNullLiteralHelper(...))[2];
+
+struct C
+{
+ int val() { return 42; }
+};
+
+template <typename T>
+unsigned f()
+{
+ return sizeof(IsNullLiteralHelper(C().val()));
+}
diff --git a/gcc/testsuite/g++.dg/template/overload6.C b/gcc/testsuite/g++.dg/template/overload6.C
index 5e26c448b1..8d574e7308 100644
--- a/gcc/testsuite/g++.dg/template/overload6.C
+++ b/gcc/testsuite/g++.dg/template/overload6.C
@@ -4,7 +4,7 @@
// PR 21592:ICE
// Origin: Volker Reichelt <reichelt@gcc.gnu.org>
-template<typename T> void unique(T,T); // { dg-message "note" }
+template<typename T> void unique(T,T);
struct A
{
@@ -13,6 +13,5 @@ struct A
template<int> void foo()
{
- unique(A().begin); // { dg-error "no matching function" "" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 16 }
+ unique(A().begin); // { dg-error "invalid use of non-static member function" }
}
diff --git a/gcc/testsuite/g++.dg/template/partial-specialization2.C b/gcc/testsuite/g++.dg/template/partial-specialization2.C
new file mode 100644
index 0000000000..c22d73989a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/partial-specialization2.C
@@ -0,0 +1,8 @@
+// PR c++/54653
+
+template <class T> struct A;
+template <class T> struct A<T*> {
+ template <class U> struct B;
+};
+
+template <class T> struct A<T*>::B<T*> { }; // { dg-error "too few template-parameter-lists" }
diff --git a/gcc/testsuite/g++.dg/template/partial14.C b/gcc/testsuite/g++.dg/template/partial14.C
new file mode 100644
index 0000000000..3870164f0e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/partial14.C
@@ -0,0 +1,16 @@
+// PR c++/59044
+
+template <class T>
+class C {
+private:
+ template <T a, T b>
+ struct Implementation {};
+public:
+ typedef typename Implementation<0, 0>::Typedef Type;
+};
+
+template <class T>
+template <T b>
+struct C<T>::Implementation<0, b> { typedef void Typedef; };
+
+template class C<unsigned>;
diff --git a/gcc/testsuite/g++.dg/template/partial15.C b/gcc/testsuite/g++.dg/template/partial15.C
new file mode 100644
index 0000000000..357bb05fa3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/partial15.C
@@ -0,0 +1,19 @@
+// PR c++/57043
+// { dg-do link }
+
+template<typename D> struct complex { };
+
+template<typename Tp>
+complex<Tp>
+pow(const complex<Tp>& x, const complex<Tp>& y) { return complex<Tp>(); }
+
+template<typename T, typename U>
+struct promote_2 { typedef T type; };
+
+template<typename Tp, typename Up>
+complex<typename promote_2<Tp, Up>::type>
+pow(const complex<Tp>& x, const complex<Up>& y);
+
+complex<double> (*powcc)(const complex<double>&, const complex<double>&) = pow;
+
+int main() {}
diff --git a/gcc/testsuite/g++.dg/template/partial5.C b/gcc/testsuite/g++.dg/template/partial5.C
index aa32e3b8a4..979e4c62bf 100644
--- a/gcc/testsuite/g++.dg/template/partial5.C
+++ b/gcc/testsuite/g++.dg/template/partial5.C
@@ -4,7 +4,7 @@ template<typename T>
struct X { };
template<typename T>
-struct X<typename T::foo> { }; // { dg-error "not used|T" }
+struct X<typename T::foo> { }; // { dg-error "not deducible|T" }
template<int N>
struct X<int[N]> {}; // okay
@@ -14,7 +14,7 @@ template<typename T, typename T::foo V>
struct Y { };
template<typename T, typename U, U v>
-struct Y<T, v> { }; // { dg-error "not used|U" }
+struct Y<T, v> { }; // { dg-error "not deducible|U" }
template<typename T, T V>
diff --git a/gcc/testsuite/g++.dg/template/pr17410.C b/gcc/testsuite/g++.dg/template/pr17410.C
new file mode 100644
index 0000000000..8be958863e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr17410.C
@@ -0,0 +1,17 @@
+// PR c++/17410
+
+template <class>
+struct Outer {
+ template <class> struct Inner {};
+};
+
+template <class T>
+struct A;
+
+template <template <class> class Q, class P>
+struct A <Q<P> > {};
+
+template <class T> struct UNRELATED;
+template <class T> struct UNRELATED<Outer<void>::Inner<T*> >;
+
+template struct A<Outer<void>::Inner<int*> >;
diff --git a/gcc/testsuite/g++.dg/template/pr29633.C b/gcc/testsuite/g++.dg/template/pr29633.C
new file mode 100644
index 0000000000..3e0254a46e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr29633.C
@@ -0,0 +1,29 @@
+// PR c++/29633
+
+template <typename T>
+struct Class1
+{
+ void testfn1(void);
+};
+
+template <typename T>
+class Class2
+{
+public:
+ void testfn2(void)
+ {
+ Class1<T> * tc_a;
+ do
+ {
+ int x = 0;
+ }
+ while (tc_a && tc_a->testfn1); // { dg-error "invalid use of member" }
+ }
+};
+
+int main(void)
+{
+ Class2<int> tc2;
+ tc2.testfn2();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/template/pr58878.C b/gcc/testsuite/g++.dg/template/pr58878.C
new file mode 100644
index 0000000000..adad9fe5b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr58878.C
@@ -0,0 +1,61 @@
+// PR c++/58878
+
+// Template-members of non-template class
+struct A
+{
+ template <typename t> // { dg-error "shadows" }
+ void f()
+ {
+ int t = 1; // { dg-error "declaration" }
+ }
+
+ template <typename t>
+ void g();
+};
+
+template <typename t> // { dg-error "shadows" }
+void A::g()
+{
+ int t = 2; // { dg-error "declaration" }
+}
+
+// (Non-template) Members of template class
+template <typename t> // { dg-error "shadows" }
+struct B
+{
+ void f()
+ {
+ int t = 3; // { dg-error "declaration" }
+ }
+
+ void g();
+};
+
+template <typename t> // { dg-error "shadows" }
+void B<t>::g()
+{
+ int t = 4; // { dg-error "declaration" }
+}
+
+// Template members of template class
+template <typename t> // { dg-error "shadows" }
+struct C
+{
+ template <typename s> // { dg-error "shadows" }
+ void f()
+ {
+ int t = 5; // { dg-error "declaration" }
+ int s = 6; // { dg-error "declaration" }
+ }
+
+ template <typename s>
+ void g();
+};
+
+template <typename t> // { dg-error "shadows" }
+template <typename s> // { dg-error "shadows" }
+void C<t>::g()
+{
+ int t = 7; // { dg-error "declaration" }
+ int s = 8; // { dg-error "declaration" }
+}
diff --git a/gcc/testsuite/g++.dg/template/pr61537.C b/gcc/testsuite/g++.dg/template/pr61537.C
new file mode 100644
index 0000000000..12aaf58ef6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/pr61537.C
@@ -0,0 +1,23 @@
+// PR c++/61537
+// { dg-do compile }
+
+struct A {};
+
+template <typename T>
+struct B
+{
+ template <typename U>
+ void f(U, struct A);
+};
+
+template <typename T>
+template <typename U>
+void B<T>::f(U, struct A)
+{
+}
+
+int main()
+{
+ B<char> b;
+ b.f(42, A());
+}
diff --git a/gcc/testsuite/g++.dg/template/pseudodtor2.C b/gcc/testsuite/g++.dg/template/pseudodtor2.C
index 796aff0785..d4a9ac1cbc 100644
--- a/gcc/testsuite/g++.dg/template/pseudodtor2.C
+++ b/gcc/testsuite/g++.dg/template/pseudodtor2.C
@@ -6,7 +6,7 @@ template<typename S> struct D
typedef int T;
S foo ();
- D () { foo ().~T(); } // { dg-error "is not of type" }
+ D () { foo ().~T(); } // { dg-error "10:is not of type" }
};
struct Z
diff --git a/gcc/testsuite/g++.dg/template/pseudodtor3.C b/gcc/testsuite/g++.dg/template/pseudodtor3.C
index 5f392f4e49..202182f533 100644
--- a/gcc/testsuite/g++.dg/template/pseudodtor3.C
+++ b/gcc/testsuite/g++.dg/template/pseudodtor3.C
@@ -5,13 +5,13 @@ struct A
{
typedef int T;
T &foo ();
- A () { foo.~T (); } // { dg-error "does not have class type|expected" }
+ A () { foo.~T (); } // { dg-error "10:does not have class type|expected" }
};
template <typename T> struct B
{
T &foo ();
- B () { foo.~T (); } // { dg-error "invalid use of member" }
+ B () { foo.~T (); } // { dg-error "10:invalid use of member" }
};
B<int> b;
@@ -19,7 +19,7 @@ B<int> b;
template <typename T, typename S> struct C
{
T t;
- C () { t.~S (); } // { dg-error "is not of type" }
+ C () { t.~S (); } // { dg-error "10:is not of type" }
};
C<int, long int> c;
@@ -28,7 +28,7 @@ template <typename T> struct D
{
T t;
typedef long int U;
- D () { t.~U (); } // { dg-error "is not of type" }
+ D () { t.~U (); } // { dg-error "10:is not of type" }
};
D<int> d;
@@ -37,7 +37,7 @@ template <typename T> struct E
{
T &foo ();
typedef long int U;
- E () { foo.~U (); } // { dg-error "is not of type" }
+ E () { foo.~U (); } // { dg-error "10:is not of type" }
};
E<int> e;
diff --git a/gcc/testsuite/g++.dg/template/ptrmem24.C b/gcc/testsuite/g++.dg/template/ptrmem24.C
new file mode 100644
index 0000000000..a4194109ef
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem24.C
@@ -0,0 +1,20 @@
+// PR c++/59818
+
+template <class T>
+struct Identity {
+ typedef T type;
+};
+
+struct Foo {
+ template <typename T>
+ Foo(T*, void (Identity<T>::type::*m)(void));
+};
+
+struct Bar {
+ void Method(void) const;
+};
+
+void Bar::Method(void) const
+{
+ Foo foo(this, &Bar::Method); // { dg-error "no match" }
+}
diff --git a/gcc/testsuite/g++.dg/template/ptrmem25.C b/gcc/testsuite/g++.dg/template/ptrmem25.C
new file mode 100644
index 0000000000..381d055bfa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem25.C
@@ -0,0 +1,8 @@
+// PR c++/49298
+
+template <class T, int T::*> struct B { };
+template <class T> struct A
+{
+ int i;
+ B<A,&A::i> b;
+};
diff --git a/gcc/testsuite/g++.dg/template/ptrmem26.C b/gcc/testsuite/g++.dg/template/ptrmem26.C
new file mode 100644
index 0000000000..ba3eab10f2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem26.C
@@ -0,0 +1,12 @@
+// PR c++/46552
+
+struct S
+{
+ int x;
+};
+
+template < typename >
+void f( void )
+{
+ &S::x;
+}
diff --git a/gcc/testsuite/g++.dg/template/ptrmem27.C b/gcc/testsuite/g++.dg/template/ptrmem27.C
new file mode 100644
index 0000000000..8c63f9c297
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem27.C
@@ -0,0 +1,22 @@
+// PR c++/61500
+
+struct X {
+ int i;
+ int j;
+
+ int foo(int X::* ptr);
+
+ template <int X::* ptr>
+ int bar();
+};
+
+int X::foo(int X::* ptr) {
+ int* p = &(this->*ptr); // OK.
+ return *p;
+}
+
+template <int X::* ptr>
+int X::bar() {
+ int* p = &(this->*ptr); // gcc 4.9.0: OK in C++98 mode, fails in C++11 mode.
+ return *p;
+}
diff --git a/gcc/testsuite/g++.dg/template/ptrmem28.C b/gcc/testsuite/g++.dg/template/ptrmem28.C
new file mode 100644
index 0000000000..037996087b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem28.C
@@ -0,0 +1,10 @@
+// PR c++/61488
+
+struct A {
+ typedef int (A::*cont_func)();
+ template <A::cont_func> void wait(int);
+ int notify();
+
+ void fix() { wait<&A::notify>(0); } // OK
+ template <int> void repair() { wait<&A::notify>(0); }
+};
diff --git a/gcc/testsuite/g++.dg/template/ptrmem29.C b/gcc/testsuite/g++.dg/template/ptrmem29.C
new file mode 100644
index 0000000000..7700c0b972
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ptrmem29.C
@@ -0,0 +1,10 @@
+// PR c++/62659
+
+struct D {
+ typedef int (D::*cont_func)();
+ template <cont_func> struct B;
+ template <cont_func cont_f> void wait(B<cont_f> ***);
+
+ int done();
+ template <bool> void fix() { wait<&D::done>(0); }
+};
diff --git a/gcc/testsuite/g++.dg/template/ptrmem4.C b/gcc/testsuite/g++.dg/template/ptrmem4.C
index 14f36d4e38..076503202c 100644
--- a/gcc/testsuite/g++.dg/template/ptrmem4.C
+++ b/gcc/testsuite/g++.dg/template/ptrmem4.C
@@ -6,7 +6,7 @@
// Pointer to member function template argument deduction ICE.
-template <class CONT> void queryAliases(CONT& fill_me); // { dg-message "queryAliases|no known conversion" }
+template <class CONT> void queryAliases(CONT& fill_me);
struct SpyExample
{
@@ -16,5 +16,5 @@ struct SpyExample
void SpyExample::ready()
{
- queryAliases(inputs); // { dg-error "matching|unresolved" }
+ queryAliases(inputs); // { dg-error "invalid" }
}
diff --git a/gcc/testsuite/g++.dg/template/qualified-id6.C b/gcc/testsuite/g++.dg/template/qualified-id6.C
new file mode 100644
index 0000000000..83be874dd1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/qualified-id6.C
@@ -0,0 +1,14 @@
+// PR c++/54913
+
+struct E
+{
+ static const int& e;
+};
+
+template<typename>
+struct R
+{
+ R() { E::e; }
+};
+
+R<int> r;
diff --git a/gcc/testsuite/g++.dg/template/qualttp18.C b/gcc/testsuite/g++.dg/template/qualttp18.C
index 31dfa6a83d..0a980f463d 100644
--- a/gcc/testsuite/g++.dg/template/qualttp18.C
+++ b/gcc/testsuite/g++.dg/template/qualttp18.C
@@ -14,7 +14,7 @@ template <template <class> class TT> struct X
struct C
{
- X<A::template B> x; // { dg-error "" }
+ X<A::template B> x; // { dg-error "template" "" { target { ! c++11 } } }
};
int main()
diff --git a/gcc/testsuite/g++.dg/template/redecl3.C b/gcc/testsuite/g++.dg/template/redecl3.C
index 029f9e69a5..faa29bf453 100644
--- a/gcc/testsuite/g++.dg/template/redecl3.C
+++ b/gcc/testsuite/g++.dg/template/redecl3.C
@@ -3,5 +3,5 @@
// { dg-do compile }
-int foo; // { dg-error "previous declaration" }
+int foo; // { dg-message "previous declaration" }
template<int> void foo() {} // { dg-error "redeclared" }
diff --git a/gcc/testsuite/g++.dg/template/ref7.C b/gcc/testsuite/g++.dg/template/ref7.C
new file mode 100644
index 0000000000..f6395e2c35
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ref7.C
@@ -0,0 +1,10 @@
+// PR c++/60167
+
+template <int& F>
+struct Foo {
+ typedef int Bar;
+
+ static Bar cache;
+};
+
+template <int& F> typename Foo<F>::Bar Foo<F>::cache;
diff --git a/gcc/testsuite/g++.dg/template/ref8.C b/gcc/testsuite/g++.dg/template/ref8.C
new file mode 100644
index 0000000000..a2fc847199
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ref8.C
@@ -0,0 +1,8 @@
+// PR c++/60222
+
+template<int&> struct A
+{
+ template<typename> struct B;
+
+ template<typename T> struct B<T*> {};
+};
diff --git a/gcc/testsuite/g++.dg/template/sfinae-dr657.C b/gcc/testsuite/g++.dg/template/sfinae-dr657.C
new file mode 100644
index 0000000000..b78b5a919c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sfinae-dr657.C
@@ -0,0 +1,22 @@
+// DR 657
+// Test that a return or parameter type with abstract class type causes a
+// deduction failure.
+
+struct A
+{
+ A();
+ A(int);
+ virtual void f() = 0;
+};
+
+template<class T> T declval();
+template<class T> int declval(...);
+
+template<class T> void arg(T);
+template<class T> int arg(...);
+
+int main()
+{
+ int i = declval<A>();
+ i = arg<A>(1);
+}
diff --git a/gcc/testsuite/g++.dg/template/sfinae10.C b/gcc/testsuite/g++.dg/template/sfinae10.C
index c6cb12f301..574feddb3a 100644
--- a/gcc/testsuite/g++.dg/template/sfinae10.C
+++ b/gcc/testsuite/g++.dg/template/sfinae10.C
@@ -1,7 +1,7 @@
// DR 339
//
// Test of the use of various unary operators with SFINAE
-
+// { dg-options "-fmessage-length=0 -pedantic-errors -Wno-long-long -ftrack-macro-expansion=0 " }
// Boilerplate helpers
typedef char yes_type;
struct no_type { char data[2]; };
@@ -81,19 +81,19 @@ struct Y { };
struct Z {
private:
- Z operator+(); // { dg-error "is private" }
- Z operator-(); // { dg-error "is private" }
- int operator*(); // { dg-error "is private" }
- Z operator~(); // { dg-error "is private" }
- bool operator!(); // { dg-error "is private" }
- Z& operator++(); // { dg-error "is private" }
- Z& operator--(); // { dg-error "is private" }
- Z& operator++(int); // { dg-error "is private" }
- Z& operator--(int); // { dg-error "is private" }
+ Z operator+();
+ Z operator-();
+ int operator*();
+ Z operator~();
+ bool operator!();
+ Z& operator++();
+ Z& operator--();
+ Z& operator++(int);
+ Z& operator--(int);
};
// has_unary_plus
-DEFINE_PREFIX_UNARY_TRAIT(has_unary_plus, +); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(has_unary_plus, +);
STATIC_ASSERT((has_unary_plus<int>::value));
STATIC_ASSERT((!has_unary_plus<int X::*>::value));
STATIC_ASSERT((has_unary_plus<W>::value));
@@ -101,7 +101,7 @@ STATIC_ASSERT((has_unary_plus<X>::value));
STATIC_ASSERT((!has_unary_plus<Y>::value));
// is_negatable
-DEFINE_PREFIX_UNARY_TRAIT(is_negatable, -); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(is_negatable, -);
STATIC_ASSERT((is_negatable<int>::value));
STATIC_ASSERT((!is_negatable<int X::*>::value));
STATIC_ASSERT((is_negatable<W>::value));
@@ -109,7 +109,7 @@ STATIC_ASSERT((is_negatable<X>::value));
STATIC_ASSERT((!is_negatable<Y>::value));
// is_dereferenceable
-DEFINE_PREFIX_UNARY_TRAIT(is_dereferenceable, *); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(is_dereferenceable, *);
STATIC_ASSERT((!is_dereferenceable<int>::value));
STATIC_ASSERT((is_dereferenceable<int*>::value));
STATIC_ASSERT((is_dereferenceable<W>::value));
@@ -117,7 +117,7 @@ STATIC_ASSERT((is_dereferenceable<X>::value));
STATIC_ASSERT((!is_dereferenceable<Y>::value));
// has_bitwise_not
-DEFINE_PREFIX_UNARY_TRAIT(has_bitwise_not, ~); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(has_bitwise_not, ~);
STATIC_ASSERT((has_bitwise_not<int>::value));
STATIC_ASSERT((!has_bitwise_not<int*>::value));
STATIC_ASSERT((has_bitwise_not<W>::value));
@@ -125,7 +125,7 @@ STATIC_ASSERT((has_bitwise_not<X>::value));
STATIC_ASSERT((!has_bitwise_not<Y>::value));
// has_truth_not
-DEFINE_PREFIX_UNARY_TRAIT(has_truth_not, !); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(has_truth_not, !);
STATIC_ASSERT((has_truth_not<int>::value));
STATIC_ASSERT((has_truth_not<int*>::value));
STATIC_ASSERT((has_truth_not<W>::value));
@@ -133,7 +133,7 @@ STATIC_ASSERT((has_truth_not<X>::value));
STATIC_ASSERT((!has_truth_not<Y>::value));
// has_preincrement
-DEFINE_PREFIX_UNARY_TRAIT(has_preincrement, ++); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(has_preincrement, ++);
STATIC_ASSERT((has_preincrement<int>::value));
STATIC_ASSERT((has_preincrement<int*>::value));
STATIC_ASSERT((!has_preincrement<int X::*>::value));
@@ -142,7 +142,7 @@ STATIC_ASSERT((has_preincrement<X>::value));
STATIC_ASSERT((!has_preincrement<Y>::value));
// has_predecrement
-DEFINE_PREFIX_UNARY_TRAIT(has_predecrement, --); // { dg-error "within this context" }
+DEFINE_PREFIX_UNARY_TRAIT(has_predecrement, --);
STATIC_ASSERT((has_predecrement<int>::value));
STATIC_ASSERT((has_predecrement<int*>::value));
STATIC_ASSERT((!has_predecrement<int X::*>::value));
@@ -151,7 +151,7 @@ STATIC_ASSERT((has_predecrement<X>::value));
STATIC_ASSERT((!has_predecrement<Y>::value));
// has_postincrement
-DEFINE_POSTFIX_UNARY_TRAIT(has_postincrement, ++); // { dg-error "within this context" }
+DEFINE_POSTFIX_UNARY_TRAIT(has_postincrement, ++);
STATIC_ASSERT((has_postincrement<int>::value));
STATIC_ASSERT((has_postincrement<int*>::value));
STATIC_ASSERT((!has_postincrement<int X::*>::value));
@@ -160,7 +160,7 @@ STATIC_ASSERT((has_postincrement<X>::value));
STATIC_ASSERT((!has_postincrement<Y>::value));
// has_postdecrement
-DEFINE_POSTFIX_UNARY_TRAIT(has_postdecrement, --); // { dg-error "within this context" }
+DEFINE_POSTFIX_UNARY_TRAIT(has_postdecrement, --);
STATIC_ASSERT((has_postdecrement<int>::value));
STATIC_ASSERT((has_postdecrement<int*>::value));
STATIC_ASSERT((!has_postdecrement<int X::*>::value));
@@ -169,13 +169,12 @@ STATIC_ASSERT((has_postdecrement<X>::value));
STATIC_ASSERT((!has_postdecrement<Y>::value));
// Check for private members
-STATIC_ASSERT((has_unary_plus<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((is_negatable<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((is_dereferenceable<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_bitwise_not<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_truth_not<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_preincrement<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_predecrement<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_postincrement<Z>::value)); // { dg-message "required from here" }
-STATIC_ASSERT((has_postdecrement<Z>::value)); // { dg-message "required from here" }
-
+STATIC_ASSERT((!has_unary_plus<Z>::value));
+STATIC_ASSERT((!is_negatable<Z>::value));
+STATIC_ASSERT((!is_dereferenceable<Z>::value));
+STATIC_ASSERT((!has_bitwise_not<Z>::value));
+STATIC_ASSERT((!has_truth_not<Z>::value));
+STATIC_ASSERT((!has_preincrement<Z>::value));
+STATIC_ASSERT((!has_predecrement<Z>::value));
+STATIC_ASSERT((!has_postincrement<Z>::value));
+STATIC_ASSERT((!has_postdecrement<Z>::value));
diff --git a/gcc/testsuite/g++.dg/template/sfinae15.C b/gcc/testsuite/g++.dg/template/sfinae15.C
index 27bce255db..326823bcb4 100644
--- a/gcc/testsuite/g++.dg/template/sfinae15.C
+++ b/gcc/testsuite/g++.dg/template/sfinae15.C
@@ -1,6 +1,5 @@
// PR c++/40944
-// { dg-options -std=c++0x }
-// { dg-do run }
+// { dg-do run { target c++11 } }
template<typename T>
struct make { static T&& it(); };
diff --git a/gcc/testsuite/g++.dg/template/sfinae16.C b/gcc/testsuite/g++.dg/template/sfinae16.C
index 28a06d280d..3df581a329 100644
--- a/gcc/testsuite/g++.dg/template/sfinae16.C
+++ b/gcc/testsuite/g++.dg/template/sfinae16.C
@@ -1,5 +1,6 @@
// PR c++/41927
-// { dg-options "-std=c++0x -Wall" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wall" }
// We were getting a spurious ||/&& warning about the enable_if with the
// source position of d1.
diff --git a/gcc/testsuite/g++.dg/template/sfinae20.C b/gcc/testsuite/g++.dg/template/sfinae20.C
index 9767bc0298..61bd8da93d 100644
--- a/gcc/testsuite/g++.dg/template/sfinae20.C
+++ b/gcc/testsuite/g++.dg/template/sfinae20.C
@@ -1,5 +1,5 @@
// PR c++/44907
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <utility>
diff --git a/gcc/testsuite/g++.dg/template/sfinae22.C b/gcc/testsuite/g++.dg/template/sfinae22.C
index cdac99d91b..57846feba5 100644
--- a/gcc/testsuite/g++.dg/template/sfinae22.C
+++ b/gcc/testsuite/g++.dg/template/sfinae22.C
@@ -1,5 +1,5 @@
// PR c++/44908
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
#include <utility>
diff --git a/gcc/testsuite/g++.dg/template/sfinae23.C b/gcc/testsuite/g++.dg/template/sfinae23.C
index 9e0197a705..53ed51dd52 100644
--- a/gcc/testsuite/g++.dg/template/sfinae23.C
+++ b/gcc/testsuite/g++.dg/template/sfinae23.C
@@ -1,5 +1,5 @@
// PR c++/44969
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
template<typename Tp, typename... Args>
class mini_is_constructible
diff --git a/gcc/testsuite/g++.dg/template/sfinae6_neg.C b/gcc/testsuite/g++.dg/template/sfinae6_neg.C
index d4be5dd03f..6ed3d22678 100644
--- a/gcc/testsuite/g++.dg/template/sfinae6_neg.C
+++ b/gcc/testsuite/g++.dg/template/sfinae6_neg.C
@@ -14,16 +14,16 @@ template<typename T> struct enable_if<false, T> { };
template<typename F, typename T1, typename T2>
typename enable_if<sizeof(create_a<F>()(create_a<T1>(), create_a<T2>()), 1),
yes_type>::type
- check_is_callable2(type<F>, type<T1>, type<T2>); // { dg-error "within this context" "" { target c++11 } }
+ check_is_callable2(type<F>, type<T1>, type<T2>);
no_type check_is_callable2(...);
template<typename F, typename T1, typename T2 = T1>
struct is_callable2
{
- static const bool value =
+ static const bool value =
(sizeof(check_is_callable2(type<F>(), type<T1>(), type<T2>()))
- == sizeof(yes_type)); // { dg-error "within this context" }
+ == sizeof(yes_type));
};
#define JOIN( X, Y ) DO_JOIN( X, Y )
@@ -52,7 +52,7 @@ struct F {
void operator()(A, A);
private:
- void operator()(B, B); // { dg-error "is private" }
+ void operator()(B, B);
};
-STATIC_ASSERT((is_callable2<F, B, B>::value));
+STATIC_ASSERT((!is_callable2<F, B, B>::value));
diff --git a/gcc/testsuite/g++.dg/template/shadow1.C b/gcc/testsuite/g++.dg/template/shadow1.C
new file mode 100644
index 0000000000..6eb30d0945
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/shadow1.C
@@ -0,0 +1,4 @@
+// PR c++/58632
+
+template<template<int I> class A> // { dg-message "shadows" }
+class A {}; // { dg-error "declaration" }
diff --git a/gcc/testsuite/g++.dg/template/sizeof14.C b/gcc/testsuite/g++.dg/template/sizeof14.C
new file mode 100644
index 0000000000..8f40204659
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sizeof14.C
@@ -0,0 +1,4 @@
+// PR c++/54844
+// { dg-do compile }
+template <int N> int fn () { return sizeof (double); }
+int var = fn <0> ();
diff --git a/gcc/testsuite/g++.dg/template/sizeof15.C b/gcc/testsuite/g++.dg/template/sizeof15.C
new file mode 100644
index 0000000000..3298dad3f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/sizeof15.C
@@ -0,0 +1,13 @@
+// PR c++/55685
+
+typedef __SIZE_TYPE__ size_t;
+template <size_t T, size_t U>
+struct A;
+
+template <typename T> struct B
+{
+ static A <sizeof (T), 0> x;
+};
+
+template <typename T>
+A <sizeof (T), 0> B <T>::x;
diff --git a/gcc/testsuite/g++.dg/template/spec25.C b/gcc/testsuite/g++.dg/template/spec25.C
index 3f641fe5a2..385d19ada0 100644
--- a/gcc/testsuite/g++.dg/template/spec25.C
+++ b/gcc/testsuite/g++.dg/template/spec25.C
@@ -1,10 +1,10 @@
namespace N {
template <typename T>
struct S {
- void f() {}
+ void f() {} // { dg-error "definition" }
};
}
namespace K {
- template <> void N::S<char>::f() {} // { dg-error "namespace|definition" }
+ template <> void N::S<char>::f() {} // { dg-error "different namespace" }
}
diff --git a/gcc/testsuite/g++.dg/template/spec38.C b/gcc/testsuite/g++.dg/template/spec38.C
new file mode 100644
index 0000000000..6f06f14958
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/spec38.C
@@ -0,0 +1,6 @@
+// PR ipa/61659
+
+// { dg-final { scan-assembler "_Z1fIiEvPT_" } }
+
+template <typename T> inline void f (T *);
+template <> void f (int *) { }
diff --git a/gcc/testsuite/g++.dg/template/static30.C b/gcc/testsuite/g++.dg/template/static30.C
index 01fa5dc1e0..07dafe23ff 100644
--- a/gcc/testsuite/g++.dg/template/static30.C
+++ b/gcc/testsuite/g++.dg/template/static30.C
@@ -7,4 +7,4 @@ template <int> struct A
};
template <int N> const int A<N>::i1(A<N>::i);
-template <int N> const int A<N>::i2(3, A<N>::i);
+template <int N> const int A<N>::i2(3, A<N>::i); // { dg-error "expression list" }
diff --git a/gcc/testsuite/g++.dg/template/static33.C b/gcc/testsuite/g++.dg/template/static33.C
new file mode 100644
index 0000000000..2d7b97da13
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static33.C
@@ -0,0 +1,18 @@
+// PR c++/52688
+// { dg-do link }
+
+template<typename T>
+T f()
+{
+ static const double staticLocalVariable = 100.0;
+ struct local
+ {
+ static double f() { return staticLocalVariable; }
+ };
+ return T(local::f());
+}
+
+int main()
+{
+ f<double>();
+}
diff --git a/gcc/testsuite/g++.dg/template/static34.C b/gcc/testsuite/g++.dg/template/static34.C
new file mode 100644
index 0000000000..122fffafbc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static34.C
@@ -0,0 +1,21 @@
+// PR c++/52688
+// { dg-do link }
+
+template<class T>
+struct A {
+ static bool test() {
+ static bool value = false;
+ if (value)
+ return false;
+ struct S {
+ S() { value = true; }
+ };
+ static S s;
+ return true;
+ }
+};
+
+int main()
+{
+ A<int>::test();
+}
diff --git a/gcc/testsuite/g++.dg/template/static35.C b/gcc/testsuite/g++.dg/template/static35.C
new file mode 100644
index 0000000000..d645f24904
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/static35.C
@@ -0,0 +1,21 @@
+// PR c++/10291
+// { dg-do link }
+
+template <class T>
+int foo ()
+{
+ static int i;
+
+ struct S {
+ int bar () {
+ return i;
+ }
+ } s;
+
+ return s.bar ();
+}
+
+int main ()
+{
+ foo<int>();
+}
diff --git a/gcc/testsuite/g++.dg/template/ttp28.C b/gcc/testsuite/g++.dg/template/ttp28.C
new file mode 100644
index 0000000000..a15dea1e7f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/ttp28.C
@@ -0,0 +1,21 @@
+// PR c++/56971
+
+template <typename T>
+class rp {
+};
+
+template <template <typename> class P>
+struct b {
+ template <class, template <typename> class FriendP>
+ friend void f(b<FriendP> from);
+};
+
+template <class, template <typename> class P>
+void f(b<P> from) {
+}
+
+int main() {
+ b<rp> v;
+ f<int>(v);
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/template/typedef11.C b/gcc/testsuite/g++.dg/template/typedef11.C
index c7c7c989f7..a08d7b3a93 100644
--- a/gcc/testsuite/g++.dg/template/typedef11.C
+++ b/gcc/testsuite/g++.dg/template/typedef11.C
@@ -18,8 +18,8 @@ template <int>
int
bar ()
{
- Beta<0>::Y i = 0;
- return Alpha::X ();
+ Beta<0>::Y i = 0; // { dg-error "within this context" }
+ return Alpha::X (); // { dg-error "within this context" }
}
-int i = bar<0> (); // { dg-error "within this context" }
+int i = bar<0> ();
diff --git a/gcc/testsuite/g++.dg/template/typedef25.C b/gcc/testsuite/g++.dg/template/typedef25.C
index 4f5868f127..f5a13ea859 100644
--- a/gcc/testsuite/g++.dg/template/typedef25.C
+++ b/gcc/testsuite/g++.dg/template/typedef25.C
@@ -1,7 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin PR c++/42225
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template<class T>
struct A
diff --git a/gcc/testsuite/g++.dg/template/typedef38.C b/gcc/testsuite/g++.dg/template/typedef38.C
index 445db17bd0..42abbbb158 100644
--- a/gcc/testsuite/g++.dg/template/typedef38.C
+++ b/gcc/testsuite/g++.dg/template/typedef38.C
@@ -1,6 +1,5 @@
// Origin: PR c++/46394
-// { dg-options "-std=c++0x" }
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
template<class T>
struct S0
diff --git a/gcc/testsuite/g++.dg/template/typedef39.C b/gcc/testsuite/g++.dg/template/typedef39.C
index 85e8ddc408..71d8bdb1be 100644
--- a/gcc/testsuite/g++.dg/template/typedef39.C
+++ b/gcc/testsuite/g++.dg/template/typedef39.C
@@ -5,11 +5,11 @@ template<class T> struct B {typedef int K;typedef int L;};
template<class U,class V> struct C
{
typedef typename U::L X;
- typedef A<X::a-1> W;
+ typedef A<X::a-1> W; // { dg-error "not a member" }
};
template<class U,int d> struct D
{
typedef typename U::L X;
- typedef A<X::a-1> W; // { dg-error "not a member" }
+ typedef A<X::a-1> W; // the error should really be on this line
};
template class D<B<A<1> >,3>;
diff --git a/gcc/testsuite/g++.dg/template/typedef41.C b/gcc/testsuite/g++.dg/template/typedef41.C
new file mode 100644
index 0000000000..dc25518bf0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typedef41.C
@@ -0,0 +1,8 @@
+// PR c++/59347
+
+template<int> struct A
+{
+ typedef int ::X; // { dg-error "" }
+};
+
+A<0> a;
diff --git a/gcc/testsuite/g++.dg/template/typeid1.C b/gcc/testsuite/g++.dg/template/typeid1.C
new file mode 100644
index 0000000000..6df5f71ff7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/typeid1.C
@@ -0,0 +1,17 @@
+// PR c++/55878
+
+#include <typeinfo>
+
+struct S;
+
+template <typename T>
+static bool fn (S *s)
+{
+ return typeid (*s) == typeid (T);
+}
+
+struct S
+{
+};
+
+bool x = fn<S> (__null);
diff --git a/gcc/testsuite/g++.dg/template/unify11.C b/gcc/testsuite/g++.dg/template/unify11.C
index 85bdbbc940..80ae98d482 100644
--- a/gcc/testsuite/g++.dg/template/unify11.C
+++ b/gcc/testsuite/g++.dg/template/unify11.C
@@ -1,6 +1,6 @@
// Contributed by Dodji Seketeli <dodji@redhat.com>
// Origin: PR c++/40684
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/template/using21.C b/gcc/testsuite/g++.dg/template/using21.C
index 7f61f85474..65313aaf69 100644
--- a/gcc/testsuite/g++.dg/template/using21.C
+++ b/gcc/testsuite/g++.dg/template/using21.C
@@ -4,25 +4,34 @@
template<typename T>
struct A
{
- int foo;
+ int foo;
- struct B : A<T>
- {
- using A::foo;
- };
+ struct B;
+ struct C;
+ struct D;
+ struct E;
+};
- struct C : A
- {
- using A::foo;
- };
+template <class T>
+struct A<T>::B : A<T>
+{
+ using A::foo;
+};
- struct D : A<T>
- {
- using A<T>::foo;
- };
+template <class T>
+struct A<T>::C : A
+{
+ using A::foo;
+};
- struct E : A
- {
- using A<T>::foo;
- };
+template <class T>
+struct A<T>::D : A<T>
+{
+ using A<T>::foo;
+};
+
+template <class T>
+struct A<T>::E : A
+{
+ using A<T>::foo;
};
diff --git a/gcc/testsuite/g++.dg/template/using22.C b/gcc/testsuite/g++.dg/template/using22.C
index b456e62e89..9ea3d8a1e4 100644
--- a/gcc/testsuite/g++.dg/template/using22.C
+++ b/gcc/testsuite/g++.dg/template/using22.C
@@ -6,28 +6,39 @@ template <class T> struct Z {};
template<typename T>
struct A
{
- struct B : A<T>
- {
- using A::nonexist; // { dg-error "no members matching" }
- };
+ struct B;
+ struct C;
+ struct D;
+ struct E;
+ struct F;
+};
- struct C : A
- {
- using A::nonexist; // { dg-error "no members matching" }
- };
+template <class T>
+struct A<T>::B : A<T>
+{
+ using A::nonexist; // { dg-error "no members matching" }
+};
- struct D : A<T>
- {
- using A<T>::nonexist; // { dg-error "no members matching" }
- };
+template <class T>
+struct A<T>::C : A
+{
+ using A::nonexist; // { dg-error "no members matching" }
+};
- struct E : A
- {
- using A<T>::nonexist; // { dg-error "no members matching" }
- };
+template <class T>
+struct A<T>::D : A<T>
+{
+ using A<T>::nonexist; // { dg-error "no members matching" }
+};
- struct F : Z<T>
- {
- using Z<T>::nonexist;
- };
+template <class T>
+struct A<T>::E : A
+{
+ using A<T>::nonexist; // { dg-error "no members matching" }
+};
+
+template <class T>
+struct A<T>::F : Z<T>
+{
+ using Z<T>::nonexist;
};
diff --git a/gcc/testsuite/g++.dg/template/using23.C b/gcc/testsuite/g++.dg/template/using23.C
new file mode 100644
index 0000000000..abb90de4cd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using23.C
@@ -0,0 +1,15 @@
+// PR c++/57831
+
+struct A {
+ void f();
+};
+template <class T> struct B : T {
+ typedef T base;
+ using base::f; // If I write "using B<T>::f" it's ok
+ void g( ) {
+ B<T>::f(); // This is OK as expected
+ (this->*&T::f)(); // This is also OK
+ (this->*&B<T>::f)(); // This causes error
+ }
+};
+template struct B< A >;
diff --git a/gcc/testsuite/g++.dg/template/using24.C b/gcc/testsuite/g++.dg/template/using24.C
new file mode 100644
index 0000000000..c3cdf93ec9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using24.C
@@ -0,0 +1,30 @@
+// PR c++/21682
+
+template <class T>
+struct t
+{
+ typedef typename T::type type;
+};
+template<> class t<int>{};
+
+template <class T> struct t1{ };
+template<> struct t1<int>
+{
+ typedef int type;
+};
+
+namespace name1
+{
+ template <class S> typename t<S>::type begin(S const& s);
+ namespace name2
+ {
+ template <class S> typename t1<S>::type begin(S const& s);
+ }
+ using name2::begin;
+}
+
+/* Test calling the function. */
+int f(int a) { return name1::begin(a); }
+
+struct aa { typedef double type; };
+double g(aa t) { return name1::begin(t); }
diff --git a/gcc/testsuite/g++.dg/template/using25.C b/gcc/testsuite/g++.dg/template/using25.C
new file mode 100644
index 0000000000..6f4a7def7a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using25.C
@@ -0,0 +1,17 @@
+// PR c++/21682
+
+namespace one {
+ template<typename T> void fun(T);
+}
+
+using one::fun;
+
+template<typename T> void fun(T); // { dg-error "conflicts" }
+
+template<typename T> void funr(T);
+
+namespace oner {
+ template<typename T> void funr(T);
+}
+
+using oner::funr; // { dg-error "conflicts" }
diff --git a/gcc/testsuite/g++.dg/template/using26.C b/gcc/testsuite/g++.dg/template/using26.C
new file mode 100644
index 0000000000..ca21857aad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using26.C
@@ -0,0 +1,49 @@
+// PR c++/21682
+
+namespace one {
+ template<typename T> int bar1(T);
+}
+
+using one::bar1;
+
+template<typename T> void bar1(T);
+
+template<typename T> void bar1r(T);
+
+namespace oner {
+ template<typename T> int bar1r(T);
+}
+
+using oner::bar1r;
+
+namespace two {
+ template<typename T, typename U> void bar2(T);
+}
+
+using two::bar2;
+
+template<typename T> void bar2(T);
+
+template<typename T> void bar2r(T);
+
+namespace twor {
+ template<typename T, typename U> void bar2r(T);
+}
+
+using twor::bar2r;
+
+namespace three {
+ template<int i> void bar3();
+}
+
+using three::bar3;
+
+template<typename T> void bar3();
+
+template<typename T> void bar3r();
+
+namespace threer {
+ template<int i> void bar3r();
+}
+
+using threer::bar3r;
diff --git a/gcc/testsuite/g++.dg/template/using27.C b/gcc/testsuite/g++.dg/template/using27.C
new file mode 100644
index 0000000000..f1835e1716
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using27.C
@@ -0,0 +1,33 @@
+// PR c++/37140
+
+struct X
+{
+ typedef int nested_type;
+};
+
+template <class T>
+struct A
+{
+ typedef X type;
+};
+
+template <class T>
+struct B : A<T>
+{
+ using typename A<T>::type;
+ typename type::nested_type x;
+};
+
+template <class T>
+struct C : B<T>
+{
+ using typename B<T>::type;
+ typename type::nested_type y;
+};
+
+struct D : C<int>
+{
+ using C<int>::type;
+ type::nested_type z;
+};
+
diff --git a/gcc/testsuite/g++.dg/template/using28.C b/gcc/testsuite/g++.dg/template/using28.C
new file mode 100644
index 0000000000..52f68cfe46
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using28.C
@@ -0,0 +1,17 @@
+// PR c++/37140
+
+struct C
+{
+ static const int block_size = 1;
+};
+
+template <typename T> struct A {
+ typedef C type;
+};
+
+template <typename T> struct B : public A<T> {
+ using typename A<T>::type;
+ static const int block_size = type::block_size;
+};
+
+template class B<int>;
diff --git a/gcc/testsuite/g++.dg/template/using29.C b/gcc/testsuite/g++.dg/template/using29.C
new file mode 100644
index 0000000000..8726547efd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/using29.C
@@ -0,0 +1,21 @@
+// PR c++/58047
+
+template <int N>
+struct print_arg { };
+
+struct const_holder {
+ static const int CONSTANT = 42;
+};
+
+template <typename T>
+struct identity {
+ typedef T type;
+};
+
+template <class T>
+struct test_case : public identity<T> {
+ using typename identity<T>::type;
+ print_arg<type::CONSTANT> printer;
+};
+
+template struct test_case<const_holder>;
diff --git a/gcc/testsuite/g++.dg/template/value-dep1.C b/gcc/testsuite/g++.dg/template/value-dep1.C
new file mode 100644
index 0000000000..7c9b927bf5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/value-dep1.C
@@ -0,0 +1,6 @@
+// PR c++/48265
+
+template < int > struct S
+{
+ S () { const int i = i; i; };
+};
diff --git a/gcc/testsuite/g++.dg/template/virtual4.C b/gcc/testsuite/g++.dg/template/virtual4.C
new file mode 100644
index 0000000000..a2c7420b40
--- /dev/null
+++ b/gcc/testsuite/g++.dg/template/virtual4.C
@@ -0,0 +1,30 @@
+// PR c++/56243
+
+struct A
+{
+ virtual int String ();
+};
+
+struct F: A { };
+
+struct G
+{
+ F value;
+};
+
+struct D
+{
+ template <int>
+ void Verify()
+ {
+ G x;
+ F& name = x.value;
+ name.String();
+ }
+};
+
+int main()
+{
+ D d;
+ d.Verify<42>();
+}
diff --git a/gcc/testsuite/g++.dg/tls/diag-3.C b/gcc/testsuite/g++.dg/tls/diag-3.C
index ea5158b898..06046170b0 100644
--- a/gcc/testsuite/g++.dg/tls/diag-3.C
+++ b/gcc/testsuite/g++.dg/tls/diag-3.C
@@ -1,10 +1,10 @@
// Report invalid extern and __thread combinations.
// { dg-require-effective-target tls }
-extern int j; // { dg-error "previously declared here" }
+extern int j; // { dg-message "previously declared here" }
__thread int j; // { dg-error "follows non-thread-local" }
-extern __thread int i; // { dg-error "previously declared here" }
+extern __thread int i; // { dg-message "previously declared here" }
int i; // { dg-error "follows thread-local" }
extern __thread int k; // This is fine.
diff --git a/gcc/testsuite/g++.dg/tls/init-2.C b/gcc/testsuite/g++.dg/tls/init-2.C
index c9f646d3a1..327c309e98 100644
--- a/gcc/testsuite/g++.dg/tls/init-2.C
+++ b/gcc/testsuite/g++.dg/tls/init-2.C
@@ -2,13 +2,13 @@
/* { dg-require-effective-target tls } */
extern __thread int i;
-__thread int *p = &i; /* { dg-error "dynamically initialized" } */
+__thread int *p = &i; /* { dg-error "dynamic initialization" } */
extern int f();
-__thread int j = f(); /* { dg-error "dynamically initialized" } */
+__thread int j = f(); /* { dg-error "dynamic initialization" } */
struct S
{
S();
};
-__thread S s; /* { dg-error "" } two errors here */
+__thread S s; /* { dg-error "dynamic initialization" } */
diff --git a/gcc/testsuite/g++.dg/tls/static2.C b/gcc/testsuite/g++.dg/tls/static2.C
new file mode 100644
index 0000000000..ab688dd8dc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/static2.C
@@ -0,0 +1,18 @@
+// { dg-final { scan-assembler-not "_ZTHN1A1iE" } }
+// { dg-final { scan-assembler-not "_ZTWN1A1iE" } }
+// { dg-require-effective-target tls }
+
+struct A
+{
+ static __thread int i;
+};
+
+int
+test ()
+{
+ if (A::i != 8)
+ return 1;
+
+ A::i = 17;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-cse.C b/gcc/testsuite/g++.dg/tls/thread_local-cse.C
new file mode 100644
index 0000000000..5a47e988fc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-cse.C
@@ -0,0 +1,20 @@
+// Test for CSE of the wrapper function: we should only call it once
+// for the two references to ir.
+// { dg-do run { target c++11 } }
+// { dg-options "-O -fno-inline -save-temps" }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+// { dg-final { scan-assembler-times "call *_ZTW2ir" 1 { xfail *-*-* } } }
+// { dg-final cleanup-saved-temps }
+
+// XFAILed until the back end supports a way to mark a function as cseable
+// though not pure.
+
+int f() { return 42; }
+
+thread_local int ir = f();
+
+int main()
+{
+ return ir + ir - 84;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-ice.C b/gcc/testsuite/g++.dg/tls/thread_local-ice.C
new file mode 100644
index 0000000000..274e800c81
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-ice.C
@@ -0,0 +1,6 @@
+// PR c++/55801
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+class C;
+thread_local C O, O2 = O; // { dg-error "incomplete" }
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-ice2.C b/gcc/testsuite/g++.dg/tls/thread_local-ice2.C
new file mode 100644
index 0000000000..5d3ba697a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-ice2.C
@@ -0,0 +1,11 @@
+// PR c++/58672
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+struct A
+{
+ A(int);
+ i; // { dg-error "" }
+};
+
+thread_local A a(0);
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order1.C b/gcc/testsuite/g++.dg/tls/thread_local-order1.C
new file mode 100644
index 0000000000..a43cf884be
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-order1.C
@@ -0,0 +1,25 @@
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-cxa-atexit "" }
+
+extern "C" void abort();
+extern "C" int printf (const char *, ...);
+#define printf(...)
+
+int c;
+struct A {
+ int i;
+ A(int i): i(i) { printf ("A(%d)\n", i); if (i != c++) abort (); }
+ ~A() { printf("~A(%d)\n", i); if (i != --c) abort(); }
+};
+
+A a0(0);
+thread_local A a1(1);
+thread_local A a2(2);
+A* ap = &a1;
+
+int main()
+{
+ if (c != 3) abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-order2.C b/gcc/testsuite/g++.dg/tls/thread_local-order2.C
new file mode 100644
index 0000000000..f8df91737d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-order2.C
@@ -0,0 +1,28 @@
+// The standard says that a1 should be destroyed before a0 even though
+// that isn't reverse order of construction. We need to move
+// __cxa_thread_atexit into glibc to get this right.
+
+// { dg-do run { xfail *-*-* } }
+// { dg-require-effective-target c++11 }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+extern "C" void abort();
+extern "C" int printf (const char *, ...);
+#define printf(...)
+
+int c;
+struct A {
+ int i;
+ A(int i): i(i) { printf ("A(%d)\n", i); ++c; }
+ ~A() { printf("~A(%d)\n", i); if (i != --c) abort(); }
+};
+
+thread_local A a1(1);
+A* ap = &a1;
+A a0(0);
+
+int main()
+{
+ if (c != 2) abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-wrap1.C b/gcc/testsuite/g++.dg/tls/thread_local-wrap1.C
new file mode 100644
index 0000000000..813a6727b0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-wrap1.C
@@ -0,0 +1,13 @@
+// If we can see the definition at the use site, we don't need to bother
+// with a wrapper.
+
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler-not "_ZTW1i" } }
+
+thread_local int i = 42;
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-wrap2.C b/gcc/testsuite/g++.dg/tls/thread_local-wrap2.C
new file mode 100644
index 0000000000..f07d7ae070
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-wrap2.C
@@ -0,0 +1,16 @@
+// If we can't see the definition at the use site, but it's in this translation
+// unit, we build a wrapper but don't bother with an init function.
+
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_ZTW1i" } }
+// { dg-final { scan-assembler-not "_ZTH1i" } }
+
+extern thread_local int i;
+
+int main()
+{
+ return i - 42;
+}
+
+thread_local int i = 42;
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C b/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C
new file mode 100644
index 0000000000..ee8f147912
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-wrap3.C
@@ -0,0 +1,15 @@
+// If we can't see the definition at all, we need to assume there might be
+// an init function.
+
+// { dg-do compile { target c++11 } }
+// { dg-require-alias "" }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_ZTW1i" } }
+// { dg-final { scan-assembler "_ZTH1i" } }
+
+extern thread_local int i;
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local-wrap4.C b/gcc/testsuite/g++.dg/tls/thread_local-wrap4.C
new file mode 100644
index 0000000000..292c86806f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local-wrap4.C
@@ -0,0 +1,15 @@
+// We don't need to call the wrapper through the PLT; we can use a separate
+// copy per shared object.
+
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+// { dg-require-effective-target fpic }
+// { dg-options "-fPIC" }
+// { dg-final { scan-assembler-not "_ZTW1i@PLT" { target i?86-*-* x86_64-*-* } } }
+
+extern thread_local int i;
+
+int main()
+{
+ return i - 42;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local1.C b/gcc/testsuite/g++.dg/tls/thread_local1.C
new file mode 100644
index 0000000000..67bde5549d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local1.C
@@ -0,0 +1,21 @@
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+// The variable should have a guard.
+// { dg-final { scan-assembler "_ZGVZ1fvE1a" } }
+// But since it's thread local we don't need to guard against
+// simultaneous execution.
+// { dg-final { scan-assembler-not "cxa_guard" } }
+// The guard should be TLS, not local common.
+// { dg-final { scan-assembler-not "\.comm" } }
+
+struct A
+{
+ A();
+};
+
+A &f()
+{
+ thread_local A a;
+ return a;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local10.C b/gcc/testsuite/g++.dg/tls/thread_local10.C
new file mode 100644
index 0000000000..48c1b861c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local10.C
@@ -0,0 +1,23 @@
+// PR c++/58624
+
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+int i;
+
+template <typename> struct A
+{
+ static thread_local int s;
+
+ A () { i = s; }
+};
+
+int f() { return 42; }
+template <typename T> thread_local int A<T>::s = f();
+
+int main () {
+ A<void> a;
+ if (i != 42)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local2.C b/gcc/testsuite/g++.dg/tls/thread_local2.C
new file mode 100644
index 0000000000..6b67466fc4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local2.C
@@ -0,0 +1,27 @@
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+extern "C" void abort();
+
+struct A
+{
+ A();
+ int i;
+};
+
+A &f()
+{
+ thread_local A a;
+ return a;
+}
+
+int j;
+A::A(): i(j) { }
+
+int main()
+{
+ j = 42;
+ if (f().i != 42)
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local2g.C b/gcc/testsuite/g++.dg/tls/thread_local2g.C
new file mode 100644
index 0000000000..8304a4d2f9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local2g.C
@@ -0,0 +1,28 @@
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+extern "C" void abort();
+
+struct A
+{
+ A();
+ int i;
+};
+
+thread_local A a;
+
+A &f()
+{
+ return a;
+}
+
+int j;
+A::A(): i(j) { }
+
+int main()
+{
+ j = 42;
+ if (f().i != 42)
+ abort ();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local3.C b/gcc/testsuite/g++.dg/tls/thread_local3.C
new file mode 100644
index 0000000000..e05a0b9530
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local3.C
@@ -0,0 +1,38 @@
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() { ++d; }
+};
+
+void f()
+{
+ thread_local A a;
+}
+
+void *thread_main(void *)
+{
+ f(); f(); f();
+}
+
+#include <pthread.h>
+
+int main()
+{
+ pthread_t thread;
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+
+ if (c != 2 || d != 2)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local3g.C b/gcc/testsuite/g++.dg/tls/thread_local3g.C
new file mode 100644
index 0000000000..a3c9ebcc2c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local3g.C
@@ -0,0 +1,36 @@
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-require-cxa-atexit "" }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() { ++d; }
+};
+
+thread_local A a;
+
+void *thread_main(void *)
+{
+ A* ap = &a;
+}
+
+#include <pthread.h>
+
+int main()
+{
+ pthread_t thread;
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+
+ if (c != 2 || d != 2)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local4.C b/gcc/testsuite/g++.dg/tls/thread_local4.C
new file mode 100644
index 0000000000..24f2de6ff1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local4.C
@@ -0,0 +1,49 @@
+// Test for cleanups with pthread_cancel.
+
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-require-effective-target non_bionic }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+#include <pthread.h>
+#include <unistd.h>
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() { ++d; }
+};
+
+void f()
+{
+ thread_local A a;
+}
+
+void *thread_main(void *)
+{
+ f(); f(); f();
+ while (true)
+ {
+ pthread_testcancel();
+ sleep (1);
+ }
+}
+
+int main()
+{
+ pthread_t thread;
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_cancel(thread);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_cancel(thread);
+ pthread_join(thread, 0);
+
+ if (c != 2 || d != 2)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local4g.C b/gcc/testsuite/g++.dg/tls/thread_local4g.C
new file mode 100644
index 0000000000..f6a5d4c5b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local4g.C
@@ -0,0 +1,47 @@
+// Test for cleanups with pthread_cancel.
+
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-require-effective-target non_bionic }
+// { dg-require-cxa-atexit "" }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+#include <pthread.h>
+#include <unistd.h>
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() { ++d; }
+};
+
+thread_local A a;
+
+void *thread_main(void *)
+{
+ A *ap = &a;
+ while (true)
+ {
+ pthread_testcancel();
+ sleep (1);
+ }
+}
+
+int main()
+{
+ pthread_t thread;
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_cancel(thread);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_cancel(thread);
+ pthread_join(thread, 0);
+
+ if (c != 2 || d != 2)
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local5.C b/gcc/testsuite/g++.dg/tls/thread_local5.C
new file mode 100644
index 0000000000..8d17584edd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local5.C
@@ -0,0 +1,48 @@
+// Test for cleanups in the main thread, too.
+
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+#include <pthread.h>
+#include <unistd.h>
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() {
+ if (++d == 3)
+ _exit (0);
+ }
+};
+
+void f()
+{
+ thread_local A a;
+}
+
+void *thread_main(void *)
+{
+ f(); f(); f();
+}
+
+int main()
+{
+ pthread_t thread;
+ thread_main(0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+
+ // The dtor for a in the main thread is run after main exits, so we
+ // return 1 now and override the return value with _exit above.
+ if (c != 3 || d != 2)
+ __builtin_abort();
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local5g.C b/gcc/testsuite/g++.dg/tls/thread_local5g.C
new file mode 100644
index 0000000000..f87b0382d9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local5g.C
@@ -0,0 +1,46 @@
+// Test for cleanups in the main thread, too.
+
+// { dg-do run }
+// { dg-require-effective-target c++11 }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-effective-target pthread }
+// { dg-require-cxa-atexit "" }
+// { dg-options -pthread }
+// { dg-add-options tls }
+
+#include <pthread.h>
+#include <unistd.h>
+
+int c;
+int d;
+struct A
+{
+ A() { ++c; }
+ ~A() {
+ if (++d == 3)
+ _exit (0);
+ }
+};
+
+thread_local A a;
+
+void *thread_main(void *)
+{
+ A* ap = &a;
+}
+
+int main()
+{
+ pthread_t thread;
+ thread_main(0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+ pthread_create (&thread, 0, thread_main, 0);
+ pthread_join(thread, 0);
+
+ // The dtor for a in the main thread is run after main exits, so we
+ // return 1 now and override the return value with _exit above.
+ if (c != 3 || d != 2)
+ __builtin_abort();
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local6.C b/gcc/testsuite/g++.dg/tls/thread_local6.C
new file mode 100644
index 0000000000..378cf3d58c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local6.C
@@ -0,0 +1,33 @@
+// Test for cleanups in the main thread without -pthread.
+
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+extern "C" void _exit (int);
+
+int c;
+struct A
+{
+ A() { ++c; }
+ ~A() { if (c == 1) _exit(0); }
+};
+
+void f()
+{
+ thread_local A a;
+}
+
+void *thread_main(void *)
+{
+ f(); f(); f();
+}
+
+int main()
+{
+ thread_main(0);
+
+ // The dtor for a in the main thread is run after main exits, so we
+ // return 1 now and override the return value with _exit above.
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local6g.C b/gcc/testsuite/g++.dg/tls/thread_local6g.C
new file mode 100644
index 0000000000..f261d5419c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local6g.C
@@ -0,0 +1,31 @@
+// Test for cleanups in the main thread without -pthread.
+
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+// { dg-require-cxa-atexit "" }
+
+extern "C" void _exit (int);
+
+int c;
+struct A
+{
+ A() { ++c; }
+ ~A() { if (c == 1) _exit(0); }
+};
+
+thread_local A a;
+
+void *thread_main(void *)
+{
+ A* ap = &a;
+}
+
+int main()
+{
+ thread_main(0);
+
+ // The dtor for a in the main thread is run after main exits, so we
+ // return 1 now and override the return value with _exit above.
+ return 1;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local7.C b/gcc/testsuite/g++.dg/tls/thread_local7.C
new file mode 100644
index 0000000000..3cb02dd51f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local7.C
@@ -0,0 +1,10 @@
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+// The reference temp should be TLS, not normal data.
+// { dg-final { scan-assembler-not "\\.data" { target tls_native } } }
+
+void f()
+{
+ thread_local int&& ir = 42;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local7g.C b/gcc/testsuite/g++.dg/tls/thread_local7g.C
new file mode 100644
index 0000000000..fb847ce4a0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local7g.C
@@ -0,0 +1,12 @@
+// { dg-do compile { target c++11 } }
+// { dg-require-effective-target tls }
+
+// The reference temp should be TLS, not normal data.
+// { dg-final { scan-assembler-not "\\.data" { target tls_native } } }
+
+thread_local int&& ir = 42;
+
+void f()
+{
+ ir = 24;
+}
diff --git a/gcc/testsuite/g++.dg/tls/thread_local8.C b/gcc/testsuite/g++.dg/tls/thread_local8.C
new file mode 100644
index 0000000000..23f2a1b5eb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local8.C
@@ -0,0 +1,12 @@
+// PR c++/55800
+// { dg-do compile { target c++11 } }
+// { dg-require-alias "" }
+// { dg-require-effective-target tls }
+// { dg-final { scan-assembler "_ZTH12foo_instance" { target tls_native } } }
+
+struct foo
+{
+ foo();
+};
+
+thread_local foo foo_instance;
diff --git a/gcc/testsuite/g++.dg/tls/thread_local9.C b/gcc/testsuite/g++.dg/tls/thread_local9.C
new file mode 100644
index 0000000000..c75528a029
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tls/thread_local9.C
@@ -0,0 +1,23 @@
+// PR c++/61343
+
+// { dg-do run { target c++11 } }
+// { dg-add-options tls }
+// { dg-require-effective-target tls_runtime }
+
+struct Foo {
+ int value;
+
+ Foo() noexcept {
+ value = 12;
+ }
+};
+
+static thread_local Foo a{};
+
+static __attribute__((noinline)) void UseA() {
+ if (a.value != 12) __builtin_abort();
+}
+
+int main() {
+ UseA();
+}
diff --git a/gcc/testsuite/g++.dg/tls/tls.exp b/gcc/testsuite/g++.dg/tls/tls.exp
index 7745cd52da..279fdfdcb7 100644
--- a/gcc/testsuite/g++.dg/tls/tls.exp
+++ b/gcc/testsuite/g++.dg/tls/tls.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-1.C b/gcc/testsuite/g++.dg/tm/noexcept-1.C
index 9b1a8c65ff..887945af6b 100644
--- a/gcc/testsuite/g++.dg/tm/noexcept-1.C
+++ b/gcc/testsuite/g++.dg/tm/noexcept-1.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark -fdump-tree-tmlower" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
struct TrueFalse
{
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-2.C b/gcc/testsuite/g++.dg/tm/noexcept-2.C
index f9cbbb6123..d2282489e3 100644
--- a/gcc/testsuite/g++.dg/tm/noexcept-2.C
+++ b/gcc/testsuite/g++.dg/tm/noexcept-2.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -std=c++0x" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm" }
// All of these must fail, because they are not constant expressions.
template<typename T> int foo(int x, T t)
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-3.C b/gcc/testsuite/g++.dg/tm/noexcept-3.C
index 958290ef6a..973b442ceb 100644
--- a/gcc/testsuite/g++.dg/tm/noexcept-3.C
+++ b/gcc/testsuite/g++.dg/tm/noexcept-3.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark -fdump-tree-tmlower" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
// Same as noexcept-1.C but all noexcepts are false.
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-4.C b/gcc/testsuite/g++.dg/tm/noexcept-4.C
index 1166a15988..a7eb7ef933 100644
--- a/gcc/testsuite/g++.dg/tm/noexcept-4.C
+++ b/gcc/testsuite/g++.dg/tm/noexcept-4.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark -fdump-tree-tmlower" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
// Similar to noexcept-1.C but without an explicit (true) for noexcept.
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-5.C b/gcc/testsuite/g++.dg/tm/noexcept-5.C
index 44ef6177e6..4267432917 100644
--- a/gcc/testsuite/g++.dg/tm/noexcept-5.C
+++ b/gcc/testsuite/g++.dg/tm/noexcept-5.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark -fdump-tree-tmlower" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark -fdump-tree-tmlower" }
int global;
diff --git a/gcc/testsuite/g++.dg/tm/noexcept-6.C b/gcc/testsuite/g++.dg/tm/noexcept-6.C
new file mode 100644
index 0000000000..dd9845c093
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/noexcept-6.C
@@ -0,0 +1,23 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fno-exceptions -fgnu-tm -O -fdump-tree-tmlower" }
+
+struct TrueFalse
+{
+ static constexpr bool v() { return true; }
+};
+
+int global;
+
+template<typename T> int foo()
+{
+ return __transaction_atomic noexcept(T::v()) (global + 1);
+}
+
+int f1()
+{
+ return foo<TrueFalse>();
+}
+
+/* { dg-final { scan-tree-dump-times "eh_must_not_throw" 0 "tmlower" } } */
+/* { dg-final { scan-tree-dump-times "__transaction_atomic" 1 "tmlower" } } */
+/* { dg-final { cleanup-tree-dump "tmlower" } } */
diff --git a/gcc/testsuite/g++.dg/tm/pr47530-2.C b/gcc/testsuite/g++.dg/tm/pr47530-2.C
index c98e07e541..bcfdbe9483 100644
--- a/gcc/testsuite/g++.dg/tm/pr47530-2.C
+++ b/gcc/testsuite/g++.dg/tm/pr47530-2.C
@@ -31,5 +31,9 @@ void bench_test()
}
}
-// { dg-final { scan-tree-dump-times "ITM_commitTransaction.*tail call" 0 "tmedge" } }
+// There should be two calls to commitTransaction.
+// The one in the uninstrumented code path is a tail call.
+// The one in the instrumented code path is not.
+// { dg-final { scan-tree-dump-times "ITM_commitTransaction.*tail call" 1 "tmedge" } }
+
// { dg-final { cleanup-tree-dump "tmedge" } }
diff --git a/gcc/testsuite/g++.dg/tm/pr47530.C b/gcc/testsuite/g++.dg/tm/pr47530.C
index 8e7e27297c..6a9fb1b002 100644
--- a/gcc/testsuite/g++.dg/tm/pr47530.C
+++ b/gcc/testsuite/g++.dg/tm/pr47530.C
@@ -73,7 +73,8 @@ void LinkedList::insert(int val)
}
}
-// Make sure we don't do tail optimization on the commit.
-// { dg-final { scan-tree-dump-times "commitTransaction...; .tail call" 0 "optimized" } }
+// Make sure we don't do tail optimization on the commit, except on
+// the uninstrumented code path.
+// { dg-final { scan-tree-dump-times "commitTransaction...; .tail call" 1 "optimized" } }
// { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/g++.dg/tm/pr51516.C b/gcc/testsuite/g++.dg/tm/pr51516.C
index c13ae47fcb..4e9100651f 100644
--- a/gcc/testsuite/g++.dg/tm/pr51516.C
+++ b/gcc/testsuite/g++.dg/tm/pr51516.C
@@ -18,5 +18,4 @@ int main()
}
/* { dg-final { scan-assembler-not "_ITM_getTMCloneOrIrrevocable" } } */
-/* { dg-final { scan-tree-dump-times ";; Function C::C" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tm/pr56419.C b/gcc/testsuite/g++.dg/tm/pr56419.C
new file mode 100644
index 0000000000..c9a33a8131
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr56419.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm" }
+
+int x = 0;
+int inc_func(int i) {
+ for (int j = 0; j < i; ++j)
+ {
+ __transaction_atomic { x+=1; }
+ }
+ return 0;
+}
+
+// { dg-final { scan-assembler "ITM_commitTransaction" } }
diff --git a/gcc/testsuite/g++.dg/tm/pr58516.C b/gcc/testsuite/g++.dg/tm/pr58516.C
new file mode 100644
index 0000000000..131fa38269
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr58516.C
@@ -0,0 +1,7 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm" }
+
+void foo()
+{
+ __transaction_atomic noexcept(false) {}
+}
diff --git a/gcc/testsuite/g++.dg/tm/pr58635-1.C b/gcc/testsuite/g++.dg/tm/pr58635-1.C
new file mode 100644
index 0000000000..b566b0c84e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr58635-1.C
@@ -0,0 +1,14 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm" }
+
+int
+foo (void)
+{
+ return __transaction_atomic noexcept(false) (false);
+}
+
+int
+bar (int i)
+{
+ return __transaction_atomic noexcept(false) (i);
+}
diff --git a/gcc/testsuite/g++.dg/tm/pr58635-2.C b/gcc/testsuite/g++.dg/tm/pr58635-2.C
new file mode 100644
index 0000000000..9380fe71f8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr58635-2.C
@@ -0,0 +1,8 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm" }
+
+int
+foo (void)
+{
+ return __transaction_atomic noexcept(false) (x); // { dg-error "was not declared in this scope" }
+}
diff --git a/gcc/testsuite/g++.dg/tm/pr60004.C b/gcc/testsuite/g++.dg/tm/pr60004.C
new file mode 100644
index 0000000000..b8c2c0e032
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tm/pr60004.C
@@ -0,0 +1,10 @@
+// { dg-do compile }
+// { dg-options "-fgnu-tm" }
+
+int a;
+int f() {
+ __transaction_atomic {
+ if (a == 5)
+ return 1;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/tm/template-2.C b/gcc/testsuite/g++.dg/tm/template-2.C
index 53870246a5..09deb809bf 100644
--- a/gcc/testsuite/g++.dg/tm/template-2.C
+++ b/gcc/testsuite/g++.dg/tm/template-2.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-fgnu-tm -O -std=c++0x -fdump-tree-tmmark" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fgnu-tm -O -fdump-tree-tmmark" }
struct TrueFalse
{
diff --git a/gcc/testsuite/g++.dg/tm/tm.exp b/gcc/testsuite/g++.dg/tm/tm.exp
index f191abc9c1..1d1dc3c799 100644
--- a/gcc/testsuite/g++.dg/tm/tm.exp
+++ b/gcc/testsuite/g++.dg/tm/tm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/tm/wrap-2.C b/gcc/testsuite/g++.dg/tm/wrap-2.C
index 564fbf87e1..e2948c8c57 100644
--- a/gcc/testsuite/g++.dg/tm/wrap-2.C
+++ b/gcc/testsuite/g++.dg/tm/wrap-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-fgnu-tm" } */
+/* { dg-options "-fgnu-tm -ftrack-macro-expansion=0" } */
#define W(X) __attribute__((transaction_wrap(X)))
void f1(void);
diff --git a/gcc/testsuite/g++.dg/torture/20070621-1.C b/gcc/testsuite/g++.dg/torture/20070621-1.C
index 185314a47c..15d1ac74c9 100644
--- a/gcc/testsuite/g++.dg/torture/20070621-1.C
+++ b/gcc/testsuite/g++.dg/torture/20070621-1.C
@@ -1,3 +1,4 @@
+// { dg-do compile }
/* Reduced from libstdc++-v3/testsuite/25_algorithms/equal/1.cc
1.2.ii: In function 'void test1()':
diff --git a/gcc/testsuite/g++.dg/torture/20120420-1.C b/gcc/testsuite/g++.dg/torture/20120420-1.C
new file mode 100644
index 0000000000..ada0ab67e9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/20120420-1.C
@@ -0,0 +1,29 @@
+// { dg-do compile }
+
+int g, *gp[100];
+struct V {
+ int* x;
+ int y;
+};
+
+void foo (V **p, V* end, int i)
+{
+ *p = 0;
+ V* pp = *p;
+ int s = 100;
+ for (; pp < end; )
+ {
+ pp++;
+ (pp-1)->x = &g;
+ if (g)
+ {
+ if (g>10)
+ g++;
+ int *t = (int*) operator new (100);
+ (pp-1)->x = t;
+ }
+ else
+ s--;
+ gp[end-pp] = (pp-1)->x + s;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/20121105-1.C b/gcc/testsuite/g++.dg/torture/20121105-1.C
index 03323421a5..10eeeb9094 100644
--- a/gcc/testsuite/g++.dg/torture/20121105-1.C
+++ b/gcc/testsuite/g++.dg/torture/20121105-1.C
@@ -2,6 +2,8 @@
// Reported by Remi Vanicat <vanicat@debian.org>
// Reduced testcase by Markus Trippelsdorf <markus@trippelsdorf.de>
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
+
struct A;
struct B
{
@@ -25,7 +27,7 @@ struct D
};
D c(0);
-const long d = (long)&c;
+const intptr_t d = (intptr_t)&c;
B *const e = (B *)&d;
static bool
diff --git a/gcc/testsuite/g++.dg/torture/PR58294.C b/gcc/testsuite/g++.dg/torture/PR58294.C
new file mode 100644
index 0000000000..e1fb95ae23
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/PR58294.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+struct A {
+ virtual ~A();
+ virtual void m_fn1() { delete this; }
+ void m_fn2() { m_fn1(); }
+};
+
+struct B {
+ A *pi_;
+ B() { pi_->m_fn2(); }
+};
+struct C {
+ B pn;
+};
+void _setjmp();
+int png_decode() {
+ _setjmp();
+ C a;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
new file mode 100644
index 0000000000..6cb39809d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess1.C
@@ -0,0 +1,716 @@
+// Test -Wsizeof-pointer-memaccess warnings.
+// { dg-do compile }
+// { dg-options "-Wall" }
+// Test just twice, once with -O0 non-fortified, once with -O2 fortified.
+// { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } }
+// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+
+extern "C" {
+
+typedef __SIZE_TYPE__ size_t;
+extern void *memset (void *, int, size_t);
+extern void *memcpy (void *__restrict, const void *__restrict, size_t);
+extern void *memmove (void *__restrict, const void *__restrict, size_t);
+extern int memcmp (const void *, const void *, size_t);
+extern char *strncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strncat (char *__restrict, const char *__restrict, size_t);
+extern char *stpncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strndup (const char *, size_t);
+extern int strncmp (const char *, const char *, size_t);
+extern int strncasecmp (const char *, const char *, size_t);
+
+#ifdef __OPTIMIZE__
+# define bos(ptr) __builtin_object_size (ptr, 1)
+# define bos0(ptr) __builtin_object_size (ptr, 0)
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memset (void *dest, int c, size_t len)
+{
+ return __builtin___memset_chk (dest, c, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memcpy (void *__restrict dest, const void *__restrict src, size_t len)
+{
+ return __builtin___memcpy_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memmove (void *dest, const void *src, size_t len)
+{
+ return __builtin___memmove_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___strncpy_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncat (char *dest, const char *src, size_t len)
+{
+ return __builtin___strncat_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+stpncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___stpncpy_chk (dest, src, len, bos (dest));
+}
+#endif
+
+}
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+int
+f1 (void *x, int z)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ memset (&a, 0, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (pa1, 0, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa2, 0, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa3, 0, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa4, 0, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa1, 0, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa2, 0, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa3, 0, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa4, 0, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa1, x, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa4, x, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa1, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa4, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa1, x, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa4, x, sizeof (__typeof (pa4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa1, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa4, sizeof (__typeof (pa4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa1, x, sizeof (struct A *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa1, sizeof (struct A *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+
+ // These are correct, no warning.
+ memset (&a, 0, sizeof a);
+ memset (&a, 0, sizeof (a));
+ memset (&a, 0, sizeof (struct A));
+ memset (&a, 0, sizeof (const struct A));
+ memset (&a, 0, sizeof (volatile struct A));
+ memset (&a, 0, sizeof (volatile const struct A));
+ memset (&a, 0, sizeof (TA));
+ memset (&a, 0, sizeof (__typeof (*&a)));
+ memset (pa1, 0, sizeof (*pa1));
+ memset (pa2, 0, sizeof (*pa3));
+ memset (pa3, 0, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) &a, 0, sizeof (&a));
+ memset ((char *) &a, 0, sizeof (&a));
+ memset (&a, 0, sizeof (&a) + 0);
+ memset (&a, 0, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memcpy (&a, x, sizeof a);
+ memcpy (&a, x, sizeof (a));
+ memcpy (&a, x, sizeof (struct A));
+ memcpy (&a, x, sizeof (const struct A));
+ memcpy (&a, x, sizeof (volatile struct A));
+ memcpy (&a, x, sizeof (volatile const struct A));
+ memcpy (&a, x, sizeof (TA));
+ memcpy (&a, x, sizeof (__typeof (*&a)));
+ memcpy (pa1, x, sizeof (*pa1));
+ memcpy (pa2, x, sizeof (*pa3));
+ memcpy (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) &a, x, sizeof (&a));
+ memcpy ((char *) &a, x, sizeof (&a));
+ memcpy (&a, x, sizeof (&a) + 0);
+ memcpy (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memcpy (x, &a, sizeof a);
+ memcpy (x, &a, sizeof (a));
+ memcpy (x, &a, sizeof (struct A));
+ memcpy (x, &a, sizeof (const struct A));
+ memcpy (x, &a, sizeof (volatile struct A));
+ memcpy (x, &a, sizeof (volatile const struct A));
+ memcpy (x, &a, sizeof (TA));
+ memcpy (x, &a, sizeof (__typeof (*&a)));
+ memcpy (x, pa1, sizeof (*pa1));
+ memcpy (x, pa2, sizeof (*pa3));
+ memcpy (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) &a, sizeof (&a));
+ memcpy (x, (char *) &a, sizeof (&a));
+ memcpy (x, &a, sizeof (&a) + 0);
+ memcpy (x, &a, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memmove (&a, x, sizeof a);
+ memmove (&a, x, sizeof (a));
+ memmove (&a, x, sizeof (struct A));
+ memmove (&a, x, sizeof (const struct A));
+ memmove (&a, x, sizeof (volatile struct A));
+ memmove (&a, x, sizeof (volatile const struct A));
+ memmove (&a, x, sizeof (TA));
+ memmove (&a, x, sizeof (__typeof (*&a)));
+ memmove (pa1, x, sizeof (*pa1));
+ memmove (pa2, x, sizeof (*pa3));
+ memmove (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) &a, x, sizeof (&a));
+ memmove ((char *) &a, x, sizeof (&a));
+ memmove (&a, x, sizeof (&a) + 0);
+ memmove (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memmove (x, &a, sizeof a);
+ memmove (x, &a, sizeof (a));
+ memmove (x, &a, sizeof (struct A));
+ memmove (x, &a, sizeof (const struct A));
+ memmove (x, &a, sizeof (volatile struct A));
+ memmove (x, &a, sizeof (volatile const struct A));
+ memmove (x, &a, sizeof (TA));
+ memmove (x, &a, sizeof (__typeof (*&a)));
+ memmove (x, pa1, sizeof (*pa1));
+ memmove (x, pa2, sizeof (*pa3));
+ memmove (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) &a, sizeof (&a));
+ memmove (x, (char *) &a, sizeof (&a));
+ memmove (x, &a, sizeof (&a) + 0);
+ memmove (x, &a, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ z += memcmp (&a, x, sizeof a);
+ z += memcmp (&a, x, sizeof (a));
+ z += memcmp (&a, x, sizeof (struct A));
+ z += memcmp (&a, x, sizeof (const struct A));
+ z += memcmp (&a, x, sizeof (volatile struct A));
+ z += memcmp (&a, x, sizeof (volatile const struct A));
+ z += memcmp (&a, x, sizeof (TA));
+ z += memcmp (&a, x, sizeof (__typeof (*&a)));
+ z += memcmp (pa1, x, sizeof (*pa1));
+ z += memcmp (pa2, x, sizeof (*pa3));
+ z += memcmp (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) &a, x, sizeof (&a));
+ z += memcmp ((char *) &a, x, sizeof (&a));
+ z += memcmp (&a, x, sizeof (&a) + 0);
+ z += memcmp (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ z += memcmp (x, &a, sizeof a);
+ z += memcmp (x, &a, sizeof (a));
+ z += memcmp (x, &a, sizeof (struct A));
+ z += memcmp (x, &a, sizeof (const struct A));
+ z += memcmp (x, &a, sizeof (volatile struct A));
+ z += memcmp (x, &a, sizeof (volatile const struct A));
+ z += memcmp (x, &a, sizeof (TA));
+ z += memcmp (x, &a, sizeof (__typeof (*&a)));
+ z += memcmp (x, pa1, sizeof (*pa1));
+ z += memcmp (x, pa2, sizeof (*pa3));
+ z += memcmp (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) &a, sizeof (&a));
+ z += memcmp (x, (char *) &a, sizeof (&a));
+ z += memcmp (x, &a, sizeof (&a) + 0);
+ z += memcmp (x, &a, 0 + sizeof (&a));
+
+ return z;
+}
+
+int
+f2 (void *x, int z)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ memset (&b, 0, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (pb1, 0, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb2, 0, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb3, 0, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb4, 0, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb1, 0, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb2, 0, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb3, 0, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb4, 0, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb1, x, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb4, x, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb1, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb4, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb1, x, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb4, x, sizeof (__typeof (pb4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb1, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb4, sizeof (__typeof (pb4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb1, x, sizeof (struct B *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb1, sizeof (struct B *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+
+ // These are correct, no warning.
+ memset (&b, 0, sizeof b);
+ memset (&b, 0, sizeof (b));
+ memset (&b, 0, sizeof (struct B));
+ memset (&b, 0, sizeof (const struct B));
+ memset (&b, 0, sizeof (volatile struct B));
+ memset (&b, 0, sizeof (volatile const struct B));
+ memset (&b, 0, sizeof (TB));
+ memset (&b, 0, sizeof (__typeof (*&b)));
+ memset (pb1, 0, sizeof (*pb1));
+ memset (pb2, 0, sizeof (*pb3));
+ memset (pb3, 0, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) &b, 0, sizeof (&b));
+ memset ((char *) &b, 0, sizeof (&b));
+ memset (&b, 0, sizeof (&b) + 0);
+ memset (&b, 0, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memcpy (&b, x, sizeof b);
+ memcpy (&b, x, sizeof (b));
+ memcpy (&b, x, sizeof (struct B));
+ memcpy (&b, x, sizeof (const struct B));
+ memcpy (&b, x, sizeof (volatile struct B));
+ memcpy (&b, x, sizeof (volatile const struct B));
+ memcpy (&b, x, sizeof (TB));
+ memcpy (&b, x, sizeof (__typeof (*&b)));
+ memcpy (pb1, x, sizeof (*pb1));
+ memcpy (pb2, x, sizeof (*pb3));
+ memcpy (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) &b, x, sizeof (&b));
+ memcpy ((char *) &b, x, sizeof (&b));
+ memcpy (&b, x, sizeof (&b) + 0);
+ memcpy (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memcpy (x, &b, sizeof b);
+ memcpy (x, &b, sizeof (b));
+ memcpy (x, &b, sizeof (struct B));
+ memcpy (x, &b, sizeof (const struct B));
+ memcpy (x, &b, sizeof (volatile struct B));
+ memcpy (x, &b, sizeof (volatile const struct B));
+ memcpy (x, &b, sizeof (TB));
+ memcpy (x, &b, sizeof (__typeof (*&b)));
+ memcpy (x, pb1, sizeof (*pb1));
+ memcpy (x, pb2, sizeof (*pb3));
+ memcpy (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) &b, sizeof (&b));
+ memcpy (x, (char *) &b, sizeof (&b));
+ memcpy (x, &b, sizeof (&b) + 0);
+ memcpy (x, &b, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memmove (&b, x, sizeof b);
+ memmove (&b, x, sizeof (b));
+ memmove (&b, x, sizeof (struct B));
+ memmove (&b, x, sizeof (const struct B));
+ memmove (&b, x, sizeof (volatile struct B));
+ memmove (&b, x, sizeof (volatile const struct B));
+ memmove (&b, x, sizeof (TB));
+ memmove (&b, x, sizeof (__typeof (*&b)));
+ memmove (pb1, x, sizeof (*pb1));
+ memmove (pb2, x, sizeof (*pb3));
+ memmove (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) &b, x, sizeof (&b));
+ memmove ((char *) &b, x, sizeof (&b));
+ memmove (&b, x, sizeof (&b) + 0);
+ memmove (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memmove (x, &b, sizeof b);
+ memmove (x, &b, sizeof (b));
+ memmove (x, &b, sizeof (struct B));
+ memmove (x, &b, sizeof (const struct B));
+ memmove (x, &b, sizeof (volatile struct B));
+ memmove (x, &b, sizeof (volatile const struct B));
+ memmove (x, &b, sizeof (TB));
+ memmove (x, &b, sizeof (__typeof (*&b)));
+ memmove (x, pb1, sizeof (*pb1));
+ memmove (x, pb2, sizeof (*pb3));
+ memmove (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) &b, sizeof (&b));
+ memmove (x, (char *) &b, sizeof (&b));
+ memmove (x, &b, sizeof (&b) + 0);
+ memmove (x, &b, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ z += memcmp (&b, x, sizeof b);
+ z += memcmp (&b, x, sizeof (b));
+ z += memcmp (&b, x, sizeof (struct B));
+ z += memcmp (&b, x, sizeof (const struct B));
+ z += memcmp (&b, x, sizeof (volatile struct B));
+ z += memcmp (&b, x, sizeof (volatile const struct B));
+ z += memcmp (&b, x, sizeof (TB));
+ z += memcmp (&b, x, sizeof (__typeof (*&b)));
+ z += memcmp (pb1, x, sizeof (*pb1));
+ z += memcmp (pb2, x, sizeof (*pb3));
+ z += memcmp (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) &b, x, sizeof (&b));
+ z += memcmp ((char *) &b, x, sizeof (&b));
+ z += memcmp (&b, x, sizeof (&b) + 0);
+ z += memcmp (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ z += memcmp (x, &b, sizeof b);
+ z += memcmp (x, &b, sizeof (b));
+ z += memcmp (x, &b, sizeof (struct B));
+ z += memcmp (x, &b, sizeof (const struct B));
+ z += memcmp (x, &b, sizeof (volatile struct B));
+ z += memcmp (x, &b, sizeof (volatile const struct B));
+ z += memcmp (x, &b, sizeof (TB));
+ z += memcmp (x, &b, sizeof (__typeof (*&b)));
+ z += memcmp (x, pb1, sizeof (*pb1));
+ z += memcmp (x, pb2, sizeof (*pb3));
+ z += memcmp (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) &b, sizeof (&b));
+ z += memcmp (x, (char *) &b, sizeof (&b));
+ z += memcmp (x, &b, sizeof (&b) + 0);
+ z += memcmp (x, &b, 0 + sizeof (&b));
+
+ return z;
+}
+
+int
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ char *y3;
+ memset (y, 0, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (y1, 0, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (y2, 0, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (&c, 0, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (w, 0, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memcpy (y, x, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (w, x, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memcpy (x, y, sizeof (y)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, w, sizeof w); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+
+ memmove (y, x, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (w, x, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memmove (x, y, sizeof (y)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, w, sizeof w); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+
+ z += memcmp (y, x, sizeof (y)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (w, x, sizeof w); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+
+ z += memcmp (x, y, sizeof (y)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, w, sizeof w); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+
+ // These are correct, no warning.
+ memset (y, 0, sizeof (*y));
+ memset (y1, 0, sizeof (*y2));
+ memset (buf1, 0, sizeof buf1);
+ memset (buf3, 0, sizeof (buf3));
+ memset (&buf3[0], 0, sizeof (buf3));
+ memset (&buf4[0], 0, sizeof (buf4));
+ memset (w, 0, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) y, 0, sizeof (y));
+ memset ((char *) y1, 0, sizeof (y2));
+ memset (y, 0, sizeof (y) + 0);
+ memset (y1, 0, 0 + sizeof (y2));
+ memset ((void *) &c, 0, sizeof (&c));
+ memset ((signed char *) &c, 0, sizeof (&c));
+ memset (&c, 0, sizeof (&c) + 0);
+ memset (&c, 0, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memcpy (y, x, sizeof (*y));
+ memcpy (y1, x, sizeof (*y2));
+ memcpy (buf1, x, sizeof buf1);
+ memcpy (buf3, x, sizeof (buf3));
+ memcpy (&buf3[0], x, sizeof (buf3));
+ memcpy (&buf4[0], x, sizeof (buf4));
+ memcpy (&y3, y, sizeof (y3));
+ memcpy ((char *) &y3, y, sizeof (y3));
+ memcpy (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) y, x, sizeof (y));
+ memcpy ((char *) y1, x, sizeof (y2));
+ memcpy (y, x, sizeof (y) + 0);
+ memcpy (y1, x, 0 + sizeof (y2));
+ memcpy ((void *) &c, x, sizeof (&c));
+ memcpy ((signed char *) &c, x, sizeof (&c));
+ memcpy (&c, x, sizeof (&c) + 0);
+ memcpy (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memcpy (x, y, sizeof (*y));
+ memcpy (x, y1, sizeof (*y2));
+ memcpy (x, buf1, sizeof buf1);
+ memcpy (x, buf3, sizeof (buf3));
+ memcpy (x, &buf3[0], sizeof (buf3));
+ memcpy (x, &buf4[0], sizeof (buf4));
+ memcpy (y, &y3, sizeof (y3));
+ memcpy (y, (char *) &y3, sizeof (y3));
+ memcpy (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) y, sizeof (y));
+ memcpy (x, (char *) y1, sizeof (y2));
+ memcpy (x, y, sizeof (y) + 0);
+ memcpy (x, y1, 0 + sizeof (y2));
+ memcpy (x, (void *) &c, sizeof (&c));
+ memcpy (x, (signed char *) &c, sizeof (&c));
+ memcpy (x, &c, sizeof (&c) + 0);
+ memcpy (x, &c, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memmove (y, x, sizeof (*y));
+ memmove (y1, x, sizeof (*y2));
+ memmove (buf1, x, sizeof buf1);
+ memmove (buf3, x, sizeof (buf3));
+ memmove (&buf3[0], x, sizeof (buf3));
+ memmove (&buf4[0], x, sizeof (buf4));
+ memmove (&y3, y, sizeof (y3));
+ memmove ((char *) &y3, y, sizeof (y3));
+ memmove (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) y, x, sizeof (y));
+ memmove ((char *) y1, x, sizeof (y2));
+ memmove (y, x, sizeof (y) + 0);
+ memmove (y1, x, 0 + sizeof (y2));
+ memmove ((void *) &c, x, sizeof (&c));
+ memmove ((signed char *) &c, x, sizeof (&c));
+ memmove (&c, x, sizeof (&c) + 0);
+ memmove (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memmove (x, y, sizeof (*y));
+ memmove (x, y1, sizeof (*y2));
+ memmove (x, buf1, sizeof buf1);
+ memmove (x, buf3, sizeof (buf3));
+ memmove (x, &buf3[0], sizeof (buf3));
+ memmove (x, &buf4[0], sizeof (buf4));
+ memmove (y, &y3, sizeof (y3));
+ memmove (y, (char *) &y3, sizeof (y3));
+ memmove (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) y, sizeof (y));
+ memmove (x, (char *) y1, sizeof (y2));
+ memmove (x, y, sizeof (y) + 0);
+ memmove (x, y1, 0 + sizeof (y2));
+ memmove (x, (void *) &c, sizeof (&c));
+ memmove (x, (signed char *) &c, sizeof (&c));
+ memmove (x, &c, sizeof (&c) + 0);
+ memmove (x, &c, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ z += memcmp (y, x, sizeof (*y));
+ z += memcmp (y1, x, sizeof (*y2));
+ z += memcmp (buf1, x, sizeof buf1);
+ z += memcmp (buf3, x, sizeof (buf3));
+ z += memcmp (&buf3[0], x, sizeof (buf3));
+ z += memcmp (&buf4[0], x, sizeof (buf4));
+ z += memcmp (&y3, y, sizeof (y3));
+ z += memcmp ((char *) &y3, y, sizeof (y3));
+ z += memcmp (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) y, x, sizeof (y));
+ z += memcmp ((char *) y1, x, sizeof (y2));
+ z += memcmp (y, x, sizeof (y) + 0);
+ z += memcmp (y1, x, 0 + sizeof (y2));
+ z += memcmp ((void *) &c, x, sizeof (&c));
+ z += memcmp ((signed char *) &c, x, sizeof (&c));
+ z += memcmp (&c, x, sizeof (&c) + 0);
+ z += memcmp (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ z += memcmp (x, y, sizeof (*y));
+ z += memcmp (x, y1, sizeof (*y2));
+ z += memcmp (x, buf1, sizeof buf1);
+ z += memcmp (x, buf3, sizeof (buf3));
+ z += memcmp (x, &buf3[0], sizeof (buf3));
+ z += memcmp (x, &buf4[0], sizeof (buf4));
+ z += memcmp (y, &y3, sizeof (y3));
+ z += memcmp (y, (char *) &y3, sizeof (y3));
+ z += memcmp (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) y, sizeof (y));
+ z += memcmp (x, (char *) y1, sizeof (y2));
+ z += memcmp (x, y, sizeof (y) + 0);
+ z += memcmp (x, y1, 0 + sizeof (y2));
+ z += memcmp (x, (void *) &c, sizeof (&c));
+ z += memcmp (x, (signed char *) &c, sizeof (&c));
+ z += memcmp (x, &c, sizeof (&c) + 0);
+ z += memcmp (x, &c, 0 + sizeof (&c));
+
+ return z;
+}
+
+int
+f4 (char *x, char **y, int z, char w[64])
+{
+ const char *s1 = "foobarbaz";
+ const char *s2 = "abcde12345678";
+ strncpy (x, s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ strncat (x, s2, sizeof (s2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ stpncpy (x, s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ y[0] = strndup (s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ z += strncmp (s1, s2, sizeof (s1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += strncmp (s1, s2, sizeof (s2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += strncasecmp (s1, s2, sizeof (s1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += strncasecmp (s1, s2, sizeof (s2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+
+ strncpy (w, s1, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ strncat (w, s2, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ stpncpy (w, s1, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+
+ // These are correct, no warning.
+ const char s3[] = "foobarbaz";
+ const char s4[] = "abcde12345678";
+ strncpy (x, s3, sizeof (s3));
+ strncat (x, s4, sizeof (s4));
+ stpncpy (x, s3, sizeof (s3));
+ y[1] = strndup (s3, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s4));
+ z += strncasecmp (s3, s4, sizeof (s3));
+ z += strncasecmp (s3, s4, sizeof (s4));
+
+ return z;
+}
+
+// { dg-prune-output "\[\n\r\]*will always overflow\[\n\r\]*" }
diff --git a/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
new file mode 100644
index 0000000000..9e2805d2b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/Wsizeof-pointer-memaccess2.C
@@ -0,0 +1,730 @@
+// Test -Wsizeof-pointer-memaccess warnings.
+// { dg-do compile }
+// { dg-options "-Wall" }
+// Test just twice, once with -O0 non-fortified, once with -O2 fortified.
+// { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } }
+// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+
+extern "C" {
+
+typedef __SIZE_TYPE__ size_t;
+extern void *memset (void *, int, size_t);
+extern void *memcpy (void *__restrict, const void *__restrict, size_t);
+extern void *memmove (void *__restrict, const void *__restrict, size_t);
+extern int memcmp (const void *, const void *, size_t);
+extern char *strncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strncat (char *__restrict, const char *__restrict, size_t);
+extern char *stpncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strndup (const char *, size_t);
+extern int strncmp (const char *, const char *, size_t);
+extern int strncasecmp (const char *, const char *, size_t);
+
+#ifdef __OPTIMIZE__
+# define bos(ptr) __builtin_object_size (ptr, 1)
+# define bos0(ptr) __builtin_object_size (ptr, 0)
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memset (void *dest, int c, size_t len)
+{
+ return __builtin___memset_chk (dest, c, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memcpy (void *__restrict dest, const void *__restrict src, size_t len)
+{
+ return __builtin___memcpy_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memmove (void *dest, const void *src, size_t len)
+{
+ return __builtin___memmove_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___strncpy_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncat (char *dest, const char *src, size_t len)
+{
+ return __builtin___strncat_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+stpncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___stpncpy_chk (dest, src, len, bos (dest));
+}
+#endif
+
+}
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+template <int N>
+int
+f1 (void *x, int z)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ memset (&a, 0, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (pa1, 0, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa2, 0, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa3, 0, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa4, 0, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pa1, 0, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa2, 0, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa3, 0, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pa4, 0, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pa1, x, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pa4, x, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pa1, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pa4, sizeof (__typeof (pa4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pa1, x, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pa4, x, sizeof (__typeof (pa4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pa1, sizeof (struct A *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pa4, sizeof (__typeof (pa4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (&a, x, sizeof (&a)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (pa1, x, sizeof (pa1)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa2, x, sizeof pa2); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa3, x, sizeof (pa3)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa4, x, sizeof pa4); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pa1, x, sizeof (struct A *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pa2, x, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pa3, x, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (x, &a, sizeof (&a)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, pa1, sizeof (pa1)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa2, sizeof pa2); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa3, sizeof (pa3)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa4, sizeof pa4); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pa1, sizeof (struct A *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pa2, sizeof (PTA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pa3, sizeof (PA)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+
+ // These are correct, no warning.
+ memset (&a, 0, sizeof a);
+ memset (&a, 0, sizeof (a));
+ memset (&a, 0, sizeof (struct A));
+ memset (&a, 0, sizeof (const struct A));
+ memset (&a, 0, sizeof (volatile struct A));
+ memset (&a, 0, sizeof (volatile const struct A));
+ memset (&a, 0, sizeof (TA));
+ memset (&a, 0, sizeof (__typeof (*&a)));
+ memset (pa1, 0, sizeof (*pa1));
+ memset (pa2, 0, sizeof (*pa3));
+ memset (pa3, 0, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) &a, 0, sizeof (&a));
+ memset ((char *) &a, 0, sizeof (&a));
+ memset (&a, 0, sizeof (&a) + 0);
+ memset (&a, 0, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memcpy (&a, x, sizeof a);
+ memcpy (&a, x, sizeof (a));
+ memcpy (&a, x, sizeof (struct A));
+ memcpy (&a, x, sizeof (const struct A));
+ memcpy (&a, x, sizeof (volatile struct A));
+ memcpy (&a, x, sizeof (volatile const struct A));
+ memcpy (&a, x, sizeof (TA));
+ memcpy (&a, x, sizeof (__typeof (*&a)));
+ memcpy (pa1, x, sizeof (*pa1));
+ memcpy (pa2, x, sizeof (*pa3));
+ memcpy (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) &a, x, sizeof (&a));
+ memcpy ((char *) &a, x, sizeof (&a));
+ memcpy (&a, x, sizeof (&a) + 0);
+ memcpy (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memcpy (x, &a, sizeof a);
+ memcpy (x, &a, sizeof (a));
+ memcpy (x, &a, sizeof (struct A));
+ memcpy (x, &a, sizeof (const struct A));
+ memcpy (x, &a, sizeof (volatile struct A));
+ memcpy (x, &a, sizeof (volatile const struct A));
+ memcpy (x, &a, sizeof (TA));
+ memcpy (x, &a, sizeof (__typeof (*&a)));
+ memcpy (x, pa1, sizeof (*pa1));
+ memcpy (x, pa2, sizeof (*pa3));
+ memcpy (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) &a, sizeof (&a));
+ memcpy (x, (char *) &a, sizeof (&a));
+ memcpy (x, &a, sizeof (&a) + 0);
+ memcpy (x, &a, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memmove (&a, x, sizeof a);
+ memmove (&a, x, sizeof (a));
+ memmove (&a, x, sizeof (struct A));
+ memmove (&a, x, sizeof (const struct A));
+ memmove (&a, x, sizeof (volatile struct A));
+ memmove (&a, x, sizeof (volatile const struct A));
+ memmove (&a, x, sizeof (TA));
+ memmove (&a, x, sizeof (__typeof (*&a)));
+ memmove (pa1, x, sizeof (*pa1));
+ memmove (pa2, x, sizeof (*pa3));
+ memmove (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) &a, x, sizeof (&a));
+ memmove ((char *) &a, x, sizeof (&a));
+ memmove (&a, x, sizeof (&a) + 0);
+ memmove (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ memmove (x, &a, sizeof a);
+ memmove (x, &a, sizeof (a));
+ memmove (x, &a, sizeof (struct A));
+ memmove (x, &a, sizeof (const struct A));
+ memmove (x, &a, sizeof (volatile struct A));
+ memmove (x, &a, sizeof (volatile const struct A));
+ memmove (x, &a, sizeof (TA));
+ memmove (x, &a, sizeof (__typeof (*&a)));
+ memmove (x, pa1, sizeof (*pa1));
+ memmove (x, pa2, sizeof (*pa3));
+ memmove (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) &a, sizeof (&a));
+ memmove (x, (char *) &a, sizeof (&a));
+ memmove (x, &a, sizeof (&a) + 0);
+ memmove (x, &a, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ z += memcmp (&a, x, sizeof a);
+ z += memcmp (&a, x, sizeof (a));
+ z += memcmp (&a, x, sizeof (struct A));
+ z += memcmp (&a, x, sizeof (const struct A));
+ z += memcmp (&a, x, sizeof (volatile struct A));
+ z += memcmp (&a, x, sizeof (volatile const struct A));
+ z += memcmp (&a, x, sizeof (TA));
+ z += memcmp (&a, x, sizeof (__typeof (*&a)));
+ z += memcmp (pa1, x, sizeof (*pa1));
+ z += memcmp (pa2, x, sizeof (*pa3));
+ z += memcmp (pa3, x, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) &a, x, sizeof (&a));
+ z += memcmp ((char *) &a, x, sizeof (&a));
+ z += memcmp (&a, x, sizeof (&a) + 0);
+ z += memcmp (&a, x, 0 + sizeof (&a));
+
+ // These are correct, no warning.
+ z += memcmp (x, &a, sizeof a);
+ z += memcmp (x, &a, sizeof (a));
+ z += memcmp (x, &a, sizeof (struct A));
+ z += memcmp (x, &a, sizeof (const struct A));
+ z += memcmp (x, &a, sizeof (volatile struct A));
+ z += memcmp (x, &a, sizeof (volatile const struct A));
+ z += memcmp (x, &a, sizeof (TA));
+ z += memcmp (x, &a, sizeof (__typeof (*&a)));
+ z += memcmp (x, pa1, sizeof (*pa1));
+ z += memcmp (x, pa2, sizeof (*pa3));
+ z += memcmp (x, pa3, sizeof (__typeof (*pa3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) &a, sizeof (&a));
+ z += memcmp (x, (char *) &a, sizeof (&a));
+ z += memcmp (x, &a, sizeof (&a) + 0);
+ z += memcmp (x, &a, 0 + sizeof (&a));
+
+ return z;
+}
+
+template <int N>
+int
+f2 (void *x, int z)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ memset (&b, 0, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (pb1, 0, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb2, 0, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb3, 0, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb4, 0, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memset (pb1, 0, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb2, 0, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb3, 0, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memset (pb4, 0, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memcpy (pb1, x, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memcpy (pb4, x, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memcpy (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memcpy (x, pb1, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memcpy (x, pb4, sizeof (__typeof (pb4))); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+ memmove (pb1, x, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+ memmove (pb4, x, sizeof (__typeof (pb4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" }
+
+ memmove (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+ memmove (x, pb1, sizeof (struct B *)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+ memmove (x, pb4, sizeof (__typeof (pb4)));// { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (&b, x, sizeof (&b)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (pb1, x, sizeof (pb1)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb2, x, sizeof pb2); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb3, x, sizeof (pb3)); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb4, x, sizeof pb4); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+ z += memcmp (pb1, x, sizeof (struct B *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pb2, x, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (pb3, x, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" }
+
+ z += memcmp (x, &b, sizeof (&b)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, pb1, sizeof (pb1)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb2, sizeof pb2); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb3, sizeof (pb3)); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb4, sizeof pb4); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+ z += memcmp (x, pb1, sizeof (struct B *));// { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pb2, sizeof (PTB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+ z += memcmp (x, pb3, sizeof (PB)); // { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" }
+
+ // These are correct, no warning.
+ memset (&b, 0, sizeof b);
+ memset (&b, 0, sizeof (b));
+ memset (&b, 0, sizeof (struct B));
+ memset (&b, 0, sizeof (const struct B));
+ memset (&b, 0, sizeof (volatile struct B));
+ memset (&b, 0, sizeof (volatile const struct B));
+ memset (&b, 0, sizeof (TB));
+ memset (&b, 0, sizeof (__typeof (*&b)));
+ memset (pb1, 0, sizeof (*pb1));
+ memset (pb2, 0, sizeof (*pb3));
+ memset (pb3, 0, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) &b, 0, sizeof (&b));
+ memset ((char *) &b, 0, sizeof (&b));
+ memset (&b, 0, sizeof (&b) + 0);
+ memset (&b, 0, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memcpy (&b, x, sizeof b);
+ memcpy (&b, x, sizeof (b));
+ memcpy (&b, x, sizeof (struct B));
+ memcpy (&b, x, sizeof (const struct B));
+ memcpy (&b, x, sizeof (volatile struct B));
+ memcpy (&b, x, sizeof (volatile const struct B));
+ memcpy (&b, x, sizeof (TB));
+ memcpy (&b, x, sizeof (__typeof (*&b)));
+ memcpy (pb1, x, sizeof (*pb1));
+ memcpy (pb2, x, sizeof (*pb3));
+ memcpy (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) &b, x, sizeof (&b));
+ memcpy ((char *) &b, x, sizeof (&b));
+ memcpy (&b, x, sizeof (&b) + 0);
+ memcpy (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memcpy (x, &b, sizeof b);
+ memcpy (x, &b, sizeof (b));
+ memcpy (x, &b, sizeof (struct B));
+ memcpy (x, &b, sizeof (const struct B));
+ memcpy (x, &b, sizeof (volatile struct B));
+ memcpy (x, &b, sizeof (volatile const struct B));
+ memcpy (x, &b, sizeof (TB));
+ memcpy (x, &b, sizeof (__typeof (*&b)));
+ memcpy (x, pb1, sizeof (*pb1));
+ memcpy (x, pb2, sizeof (*pb3));
+ memcpy (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) &b, sizeof (&b));
+ memcpy (x, (char *) &b, sizeof (&b));
+ memcpy (x, &b, sizeof (&b) + 0);
+ memcpy (x, &b, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memmove (&b, x, sizeof b);
+ memmove (&b, x, sizeof (b));
+ memmove (&b, x, sizeof (struct B));
+ memmove (&b, x, sizeof (const struct B));
+ memmove (&b, x, sizeof (volatile struct B));
+ memmove (&b, x, sizeof (volatile const struct B));
+ memmove (&b, x, sizeof (TB));
+ memmove (&b, x, sizeof (__typeof (*&b)));
+ memmove (pb1, x, sizeof (*pb1));
+ memmove (pb2, x, sizeof (*pb3));
+ memmove (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) &b, x, sizeof (&b));
+ memmove ((char *) &b, x, sizeof (&b));
+ memmove (&b, x, sizeof (&b) + 0);
+ memmove (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ memmove (x, &b, sizeof b);
+ memmove (x, &b, sizeof (b));
+ memmove (x, &b, sizeof (struct B));
+ memmove (x, &b, sizeof (const struct B));
+ memmove (x, &b, sizeof (volatile struct B));
+ memmove (x, &b, sizeof (volatile const struct B));
+ memmove (x, &b, sizeof (TB));
+ memmove (x, &b, sizeof (__typeof (*&b)));
+ memmove (x, pb1, sizeof (*pb1));
+ memmove (x, pb2, sizeof (*pb3));
+ memmove (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) &b, sizeof (&b));
+ memmove (x, (char *) &b, sizeof (&b));
+ memmove (x, &b, sizeof (&b) + 0);
+ memmove (x, &b, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ z += memcmp (&b, x, sizeof b);
+ z += memcmp (&b, x, sizeof (b));
+ z += memcmp (&b, x, sizeof (struct B));
+ z += memcmp (&b, x, sizeof (const struct B));
+ z += memcmp (&b, x, sizeof (volatile struct B));
+ z += memcmp (&b, x, sizeof (volatile const struct B));
+ z += memcmp (&b, x, sizeof (TB));
+ z += memcmp (&b, x, sizeof (__typeof (*&b)));
+ z += memcmp (pb1, x, sizeof (*pb1));
+ z += memcmp (pb2, x, sizeof (*pb3));
+ z += memcmp (pb3, x, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) &b, x, sizeof (&b));
+ z += memcmp ((char *) &b, x, sizeof (&b));
+ z += memcmp (&b, x, sizeof (&b) + 0);
+ z += memcmp (&b, x, 0 + sizeof (&b));
+
+ // These are correct, no warning.
+ z += memcmp (x, &b, sizeof b);
+ z += memcmp (x, &b, sizeof (b));
+ z += memcmp (x, &b, sizeof (struct B));
+ z += memcmp (x, &b, sizeof (const struct B));
+ z += memcmp (x, &b, sizeof (volatile struct B));
+ z += memcmp (x, &b, sizeof (volatile const struct B));
+ z += memcmp (x, &b, sizeof (TB));
+ z += memcmp (x, &b, sizeof (__typeof (*&b)));
+ z += memcmp (x, pb1, sizeof (*pb1));
+ z += memcmp (x, pb2, sizeof (*pb3));
+ z += memcmp (x, pb3, sizeof (__typeof (*pb3)));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) &b, sizeof (&b));
+ z += memcmp (x, (char *) &b, sizeof (&b));
+ z += memcmp (x, &b, sizeof (&b) + 0);
+ z += memcmp (x, &b, 0 + sizeof (&b));
+
+ return z;
+}
+
+template <int N>
+int
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ char *y3;
+ memset (y, 0, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (y1, 0, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (y2, 0, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memset (&c, 0, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memset (w, 0, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memcpy (y, x, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memcpy (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memcpy (w, x, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memcpy (x, y, sizeof (y)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memcpy (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memcpy (x, w, sizeof w); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+
+ memmove (y, x, sizeof (y)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ memmove (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" }
+ memmove (w, x, sizeof w); // { dg-warning "call is the same expression as the destination; did you mean to dereference it" }
+
+ memmove (x, y, sizeof (y)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ memmove (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the source; did you mean to remove the addressof" }
+ memmove (x, w, sizeof w); // { dg-warning "call is the same expression as the source; did you mean to dereference it" }
+
+ z += memcmp (y, x, sizeof (y)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (y1, x, sizeof (y1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (y2, x, sizeof (y2)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += memcmp (&c, x, sizeof (&c)); // { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" }
+ z += memcmp (w, x, sizeof w); // { dg-warning "call is the same expression as the first source; did you mean to dereference it" }
+
+ z += memcmp (x, y, sizeof (y)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, y1, sizeof (y1)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, y2, sizeof (y2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += memcmp (x, &c, sizeof (&c)); // { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" }
+ z += memcmp (x, w, sizeof w); // { dg-warning "call is the same expression as the second source; did you mean to dereference it" }
+
+ // These are correct, no warning.
+ memset (y, 0, sizeof (*y));
+ memset (y1, 0, sizeof (*y2));
+ memset (buf1, 0, sizeof buf1);
+ memset (buf3, 0, sizeof (buf3));
+ memset (&buf3[0], 0, sizeof (buf3));
+ memset (&buf4[0], 0, sizeof (buf4));
+ memset (w, 0, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memset ((void *) y, 0, sizeof (y));
+ memset ((char *) y1, 0, sizeof (y2));
+ memset (y, 0, sizeof (y) + 0);
+ memset (y1, 0, 0 + sizeof (y2));
+ memset ((void *) &c, 0, sizeof (&c));
+ memset ((signed char *) &c, 0, sizeof (&c));
+ memset (&c, 0, sizeof (&c) + 0);
+ memset (&c, 0, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memcpy (y, x, sizeof (*y));
+ memcpy (y1, x, sizeof (*y2));
+ memcpy (buf1, x, sizeof buf1);
+ memcpy (buf3, x, sizeof (buf3));
+ memcpy (&buf3[0], x, sizeof (buf3));
+ memcpy (&buf4[0], x, sizeof (buf4));
+ memcpy (&y3, y, sizeof (y3));
+ memcpy ((char *) &y3, y, sizeof (y3));
+ memcpy (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy ((void *) y, x, sizeof (y));
+ memcpy ((char *) y1, x, sizeof (y2));
+ memcpy (y, x, sizeof (y) + 0);
+ memcpy (y1, x, 0 + sizeof (y2));
+ memcpy ((void *) &c, x, sizeof (&c));
+ memcpy ((signed char *) &c, x, sizeof (&c));
+ memcpy (&c, x, sizeof (&c) + 0);
+ memcpy (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memcpy (x, y, sizeof (*y));
+ memcpy (x, y1, sizeof (*y2));
+ memcpy (x, buf1, sizeof buf1);
+ memcpy (x, buf3, sizeof (buf3));
+ memcpy (x, &buf3[0], sizeof (buf3));
+ memcpy (x, &buf4[0], sizeof (buf4));
+ memcpy (y, &y3, sizeof (y3));
+ memcpy (y, (char *) &y3, sizeof (y3));
+ memcpy (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memcpy (x, (void *) y, sizeof (y));
+ memcpy (x, (char *) y1, sizeof (y2));
+ memcpy (x, y, sizeof (y) + 0);
+ memcpy (x, y1, 0 + sizeof (y2));
+ memcpy (x, (void *) &c, sizeof (&c));
+ memcpy (x, (signed char *) &c, sizeof (&c));
+ memcpy (x, &c, sizeof (&c) + 0);
+ memcpy (x, &c, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memmove (y, x, sizeof (*y));
+ memmove (y1, x, sizeof (*y2));
+ memmove (buf1, x, sizeof buf1);
+ memmove (buf3, x, sizeof (buf3));
+ memmove (&buf3[0], x, sizeof (buf3));
+ memmove (&buf4[0], x, sizeof (buf4));
+ memmove (&y3, y, sizeof (y3));
+ memmove ((char *) &y3, y, sizeof (y3));
+ memmove (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memmove ((void *) y, x, sizeof (y));
+ memmove ((char *) y1, x, sizeof (y2));
+ memmove (y, x, sizeof (y) + 0);
+ memmove (y1, x, 0 + sizeof (y2));
+ memmove ((void *) &c, x, sizeof (&c));
+ memmove ((signed char *) &c, x, sizeof (&c));
+ memmove (&c, x, sizeof (&c) + 0);
+ memmove (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ memmove (x, y, sizeof (*y));
+ memmove (x, y1, sizeof (*y2));
+ memmove (x, buf1, sizeof buf1);
+ memmove (x, buf3, sizeof (buf3));
+ memmove (x, &buf3[0], sizeof (buf3));
+ memmove (x, &buf4[0], sizeof (buf4));
+ memmove (y, &y3, sizeof (y3));
+ memmove (y, (char *) &y3, sizeof (y3));
+ memmove (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ memmove (x, (void *) y, sizeof (y));
+ memmove (x, (char *) y1, sizeof (y2));
+ memmove (x, y, sizeof (y) + 0);
+ memmove (x, y1, 0 + sizeof (y2));
+ memmove (x, (void *) &c, sizeof (&c));
+ memmove (x, (signed char *) &c, sizeof (&c));
+ memmove (x, &c, sizeof (&c) + 0);
+ memmove (x, &c, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ z += memcmp (y, x, sizeof (*y));
+ z += memcmp (y1, x, sizeof (*y2));
+ z += memcmp (buf1, x, sizeof buf1);
+ z += memcmp (buf3, x, sizeof (buf3));
+ z += memcmp (&buf3[0], x, sizeof (buf3));
+ z += memcmp (&buf4[0], x, sizeof (buf4));
+ z += memcmp (&y3, y, sizeof (y3));
+ z += memcmp ((char *) &y3, y, sizeof (y3));
+ z += memcmp (w, x, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp ((void *) y, x, sizeof (y));
+ z += memcmp ((char *) y1, x, sizeof (y2));
+ z += memcmp (y, x, sizeof (y) + 0);
+ z += memcmp (y1, x, 0 + sizeof (y2));
+ z += memcmp ((void *) &c, x, sizeof (&c));
+ z += memcmp ((signed char *) &c, x, sizeof (&c));
+ z += memcmp (&c, x, sizeof (&c) + 0);
+ z += memcmp (&c, x, 0 + sizeof (&c));
+
+ // These are correct, no warning.
+ z += memcmp (x, y, sizeof (*y));
+ z += memcmp (x, y1, sizeof (*y2));
+ z += memcmp (x, buf1, sizeof buf1);
+ z += memcmp (x, buf3, sizeof (buf3));
+ z += memcmp (x, &buf3[0], sizeof (buf3));
+ z += memcmp (x, &buf4[0], sizeof (buf4));
+ z += memcmp (y, &y3, sizeof (y3));
+ z += memcmp (y, (char *) &y3, sizeof (y3));
+ z += memcmp (x, w, sizeof (X));
+ // These are probably broken, but obfuscated, no warning.
+ z += memcmp (x, (void *) y, sizeof (y));
+ z += memcmp (x, (char *) y1, sizeof (y2));
+ z += memcmp (x, y, sizeof (y) + 0);
+ z += memcmp (x, y1, 0 + sizeof (y2));
+ z += memcmp (x, (void *) &c, sizeof (&c));
+ z += memcmp (x, (signed char *) &c, sizeof (&c));
+ z += memcmp (x, &c, sizeof (&c) + 0);
+ z += memcmp (x, &c, 0 + sizeof (&c));
+
+ return z;
+}
+
+template <int N>
+int
+f4 (char *x, char **y, int z, char w[64])
+{
+ const char *s1 = "foobarbaz";
+ const char *s2 = "abcde12345678";
+ strncpy (x, s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ strncat (x, s2, sizeof (s2)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ stpncpy (x, s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ y[0] = strndup (s1, sizeof (s1)); // { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" }
+ z += strncmp (s1, s2, sizeof (s1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += strncmp (s1, s2, sizeof (s2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+ z += strncasecmp (s1, s2, sizeof (s1)); // { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" }
+ z += strncasecmp (s1, s2, sizeof (s2)); // { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" }
+
+ strncpy (w, s1, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ strncat (w, s2, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+ stpncpy (w, s1, sizeof (w)); // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" }
+
+ // These are correct, no warning.
+ const char s3[] = "foobarbaz";
+ const char s4[] = "abcde12345678";
+ strncpy (x, s3, sizeof (s3));
+ strncat (x, s4, sizeof (s4));
+ stpncpy (x, s3, sizeof (s3));
+ y[1] = strndup (s3, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s4));
+ z += strncasecmp (s3, s4, sizeof (s3));
+ z += strncasecmp (s3, s4, sizeof (s4));
+
+ return z;
+}
+
+int
+f (void *x, char *y, int z, X w, char **u, char v[64])
+{
+ z += f1<0> (x, z);
+ z += f2<0> (x, z);
+ z += f3<0> (x, y, z, w);
+ z += f4<0> (y, u, z, v);
+ return z;
+}
+
+// { dg-prune-output "\[\n\r\]*will always overflow\[\n\r\]*" }
diff --git a/gcc/testsuite/g++.dg/torture/builtin-location.C b/gcc/testsuite/g++.dg/torture/builtin-location.C
new file mode 100644
index 0000000000..cad53de4b4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/builtin-location.C
@@ -0,0 +1,31 @@
+// { dg-do run }
+
+#include <cstring>
+
+const char *gfile;
+const char *gfn;
+int gline;
+
+void bar (const char *file = __builtin_FILE (),
+ const char *function = __builtin_FUNCTION (),
+ int line = __builtin_LINE ())
+{
+ gfile = file;
+ gfn = function;
+ gline = line;
+}
+
+extern "C" void abort (void);
+
+int main()
+{
+ int here;
+ bar (); here = __LINE__;
+ if (std::strcmp (gfn, __FUNCTION__) != 0)
+ abort ();
+ if (std::strcmp (gfile, __FILE__) != 0)
+ abort ();
+ if (gline != here)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr35634.C b/gcc/testsuite/g++.dg/torture/pr35634.C
new file mode 100644
index 0000000000..3c888ad43e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr35634.C
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+
+extern "C" void abort (void);
+extern "C" void exit (int);
+
+void foo (int i)
+{
+ static int n;
+ if (i < -128 || i > 127)
+ abort ();
+ if (++n > 1000)
+ exit (0);
+}
+
+int main ()
+{
+ signed char c;
+ for (c = 0; ; c++) foo (c);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr38565.C b/gcc/testsuite/g++.dg/torture/pr38565.C
index 8cd1e1d4b9..7216b1c67e 100644
--- a/gcc/testsuite/g++.dg/torture/pr38565.C
+++ b/gcc/testsuite/g++.dg/torture/pr38565.C
@@ -1,6 +1,7 @@
// { dg-do compile }
// Ignore warning on some powerpc-linux configurations.
// { dg-prune-output "non-standard ABI extension" }
+// { dg-prune-output "changes the ABI" }
#define vector __attribute__((vector_size(16) ))
vector unsigned int f(int a)
{
diff --git a/gcc/testsuite/g++.dg/torture/pr40991.C b/gcc/testsuite/g++.dg/torture/pr40991.C
index c08124024a..c04ef9e7ad 100644
--- a/gcc/testsuite/g++.dg/torture/pr40991.C
+++ b/gcc/testsuite/g++.dg/torture/pr40991.C
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu++0x" } */
+// { dg-do compile { target c++11 } }
typedef __SIZE_TYPE__ size_t;
namespace std __attribute__ ((__visibility__ ("default"))) {
diff --git a/gcc/testsuite/g++.dg/torture/pr47559.C b/gcc/testsuite/g++.dg/torture/pr47559.C
index 42dedee291..00731c3ce6 100644
--- a/gcc/testsuite/g++.dg/torture/pr47559.C
+++ b/gcc/testsuite/g++.dg/torture/pr47559.C
@@ -1,5 +1,5 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x -fnon-call-exceptions" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-fnon-call-exceptions" }
void foo (int *k) noexcept
{
diff --git a/gcc/testsuite/g++.dg/torture/pr49309.C b/gcc/testsuite/g++.dg/torture/pr49309.C
deleted file mode 100644
index f96967ddd3..0000000000
--- a/gcc/testsuite/g++.dg/torture/pr49309.C
+++ /dev/null
@@ -1,16 +0,0 @@
-// PR tree-optimization/49309
-// { dg-do compile }
-// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
-// { dg-options "-fpreprocessed -fmudflap" }
-
-struct A
-{
- int i;
-
- A();
- A(const A&);
-};
-
-inline void foo(A a) { a = A(); }
-
-void bar() { foo(A()); }
diff --git a/gcc/testsuite/g++.dg/torture/pr49770.C b/gcc/testsuite/g++.dg/torture/pr49770.C
index 7eac9e0d9b..8180648cbe 100644
--- a/gcc/testsuite/g++.dg/torture/pr49770.C
+++ b/gcc/testsuite/g++.dg/torture/pr49770.C
@@ -1,5 +1,5 @@
-/* { dg-do run } */
-/* { dg-options "-std=c++0x -fno-tree-forwprop" } */
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-fno-tree-forwprop" } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/g++.dg/torture/pr50672.C b/gcc/testsuite/g++.dg/torture/pr50672.C
new file mode 100644
index 0000000000..614a35b6c8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr50672.C
@@ -0,0 +1,22 @@
+// { dg-do compile }
+
+struct A
+{
+ bool isHint();
+};
+class B
+{
+ void makeLine( int *) const;
+ void drawLine() const; A* to() const;
+ void _print() const;
+};
+A a;
+void B::makeLine(int *p1) const
+{
+ if (a.isHint() && to()->isHint()) ;
+ else {
+ if (p1) B::drawLine(); else B::_print();
+ return;
+ }
+ if (p1) B::drawLine(); else B::_print();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr51198.C b/gcc/testsuite/g++.dg/torture/pr51198.C
index 65009ff545..79819e04ea 100644
--- a/gcc/testsuite/g++.dg/torture/pr51198.C
+++ b/gcc/testsuite/g++.dg/torture/pr51198.C
@@ -1,4 +1,4 @@
-/* { dg-options "-std=gnu++0x" } */
+// { dg-do compile { target c++11 } }
struct A
{
diff --git a/gcc/testsuite/g++.dg/torture/pr51737.C b/gcc/testsuite/g++.dg/torture/pr51737.C
new file mode 100644
index 0000000000..ff77edbf3d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr51737.C
@@ -0,0 +1,30 @@
+// { dg-do compile }
+template<class T> class intrusive_ptr {
+public:
+ ~intrusive_ptr() { intrusive_ptr_release( px ); }
+ T * px;
+};
+template <typename T> struct intrusive_base {
+ friend void intrusive_ptr_release(T* ptr) { delete ptr; }
+};
+struct section_info;
+struct file_info : intrusive_base<file_info> {
+ intrusive_ptr<file_info> parent;
+ intrusive_ptr<section_info> switched_section;
+};
+struct section_info : intrusive_base<section_info> {
+ intrusive_ptr<section_info> parent;
+};
+struct id_state {
+ void * start_file(void);
+};
+void * id_state::start_file(void) {
+ intrusive_ptr<file_info> parent;
+}
+struct id_generation_data : intrusive_base<id_generation_data> {
+ void child_length() const {}
+};
+void generate_id(id_generation_data& generation_data)
+{
+ generation_data.child_length();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr52638.C b/gcc/testsuite/g++.dg/torture/pr52638.C
new file mode 100644
index 0000000000..3ac76ccc43
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr52638.C
@@ -0,0 +1,15 @@
+// { dg-do compile }
+// { dg-options "-ftree-vectorize" }
+
+void
+bar (bool * b, bool * e, bool t)
+{
+ while (b < e)
+ *b++ = t;
+}
+
+void
+foo (bool * b, bool * e, bool t)
+{
+ bar (b, e, true);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr52772.C b/gcc/testsuite/g++.dg/torture/pr52772.C
new file mode 100644
index 0000000000..810e6579fb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr52772.C
@@ -0,0 +1,85 @@
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+
+class c1;
+
+class c2 {
+ public: c2() { };
+ void *operator new(size_t size, const c1 & crc1);
+};
+
+class c3 {
+ public: c3() { _Obj = 0; }
+ ~c3() { if (_Obj) delete _Obj; }
+ void set(c2 *pObj);
+ protected: c2 *_Obj;
+};
+
+void c3::set(c2 *pObj) { _Obj = pObj; };
+
+template<class TYPE> class tc1 : public c2 {
+ public: tc1(int n=0){};
+ int get() const;
+ TYPE& operator[] (int id);
+ TYPE * _data;
+ int _size;
+};
+
+template<class TYPE> TYPE & tc1<TYPE>::operator[] (int id) {
+ return _data[id];
+}
+
+template<class TYPE> int tc1<TYPE>::get() const {
+ return _size;
+}
+
+class c4 {
+ public: c4();
+};
+
+class c5 : public c2 {
+ protected: c2 * _own;
+ public: c5(c2 *o) : _own(o) { }
+ c5(const c4 & box);
+ int add(const c4 & ext);
+};
+
+class c6 {
+ public: int get() const {};
+};
+
+class c7 {
+ friend class c8;
+ int find(c6 * loop) const;
+};
+
+class c8 {
+ const c1 & _rc1;
+ int tria(c7 * face, c5 * vtree0 = 0);
+};
+
+int c8::tria(c7 * face, c5 * vtree0) {
+ c6 *sLData[64];
+ tc1<c6*> loops(64);
+ while (loops.get() > 1) {
+ c6 *iloop = 0;
+ for (int j=1; j<loops.get(); j++) {
+ if (loops[j]->get() < 32) {
+ iloop = loops[j];
+ }
+ }
+ face->find(iloop);
+ }
+ c4 box;
+ c3 ctree;
+ c5 *vtree = vtree0;
+ if (!vtree) {
+ vtree = new (_rc1) c5(box);
+ ctree.set(vtree);
+ for (int j=0; j<1; j++) {
+ c4 sVBBox;
+ vtree->add(sVBBox);
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr52918-1.C b/gcc/testsuite/g++.dg/torture/pr52918-1.C
new file mode 100644
index 0000000000..9e7b21ba6a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr52918-1.C
@@ -0,0 +1,39 @@
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+class bad_alloc { };
+typedef struct {
+} __gthread_mutex_t;
+int __gthread_mutex_unlock (__gthread_mutex_t *__mutex);
+class __concurrence_unlock_error {
+};
+inline void __throw_concurrence_unlock_error() {
+ throw __concurrence_unlock_error();
+}
+class __mutex {
+ __gthread_mutex_t _M_mutex;
+public:
+ void unlock() {
+ if (__gthread_mutex_unlock(&_M_mutex) != 0)
+ __throw_concurrence_unlock_error();
+ }
+};
+class free_list {
+ typedef __mutex __mutex_type;
+ __mutex_type& _M_get_mutex();
+ void _M_get(size_t __sz) throw(bad_alloc);
+};
+void free_list::_M_get(size_t __sz) throw(bad_alloc)
+{
+ __mutex_type& __bfl_mutex = _M_get_mutex();
+ __bfl_mutex.unlock();
+ int __ctr = 2;
+ while (__ctr) {
+ size_t* __ret = 0;
+ --__ctr;
+ try {
+ __ret = (size_t*) (::operator new(__sz + sizeof(size_t)));
+ }
+ catch(const bad_alloc&) { }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr52918-2.C b/gcc/testsuite/g++.dg/torture/pr52918-2.C
new file mode 100644
index 0000000000..ba31295e41
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr52918-2.C
@@ -0,0 +1,40 @@
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+void* __cxa_allocate_exception(size_t) throw();
+typedef struct { } __gthread_mutex_t;
+extern int __gthr_win32_mutex_unlock (__gthread_mutex_t *);
+int __gthread_mutex_lock (__gthread_mutex_t *__mutex);
+int __gthread_mutex_unlock (__gthread_mutex_t *__mutex);
+void __throw_concurrence_lock_error();
+void __throw_concurrence_unlock_error();
+class __mutex {
+ __gthread_mutex_t _M_mutex;
+public:
+ void lock() {
+ if (__gthread_mutex_lock(&_M_mutex) != 0)
+ __throw_concurrence_lock_error();
+ }
+ void unlock() {
+ if (__gthread_mutex_unlock(&_M_mutex) != 0)
+ __throw_concurrence_unlock_error();
+ }
+};
+class __scoped_lock {
+ typedef __mutex __mutex_type;
+ __mutex_type& _M_device;
+public:
+ explicit __scoped_lock(__mutex_type& __name) : _M_device(__name) {
+ _M_device.lock();
+ }
+ ~__scoped_lock() throw() {
+ _M_device.unlock();
+ }
+};
+__mutex emergency_mutex;
+void * __cxa_allocate_exception(size_t thrown_size) throw()
+{
+ void *ret;
+ if (! ret)
+ __scoped_lock sentry(emergency_mutex);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr53011.C b/gcc/testsuite/g++.dg/torture/pr53011.C
new file mode 100644
index 0000000000..2cd8a60332
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53011.C
@@ -0,0 +1,66 @@
+// { dg-do compile }
+
+extern "C" class WvFastString;
+typedef WvFastString& WvStringParm;
+struct WvFastString {
+ ~WvFastString();
+ operator char* () {}
+};
+class WvString : WvFastString {};
+class WvAddr {};
+class WvIPAddr : WvAddr {};
+struct WvIPNet : WvIPAddr {
+ bool is_default() {}
+};
+template<class T, bool> struct WvTraits_Helper {
+ static void release(T *obj) {
+ delete obj;
+ }
+};
+template<class From> struct WvTraits {
+ static void release(From *obj) {
+ WvTraits_Helper<From, 0>::release(obj);
+ }
+};
+struct WvLink {
+ void *data;
+ WvLink *next;
+ bool autofree;
+ WvLink(bool, int) : autofree() {}
+ bool get_autofree() {}
+
+ void unlink() {
+ delete this;
+ }
+};
+struct WvListBase {
+ WvLink head, *tail;
+ WvListBase() : head(0, 0) {}
+};
+template<class T> struct WvList : WvListBase {
+ ~WvList() {
+ zap();
+ }
+
+ void zap(bool destroy = 1) {
+ while (head.next) unlink_after(&head, destroy);
+ }
+
+ void unlink_after(WvLink *after, bool destroy) {
+ WvLink *next = 0;
+ T *obj = (destroy && next->get_autofree()) ?
+ static_cast<T*>(next->data) : 0;
+
+ if (tail) tail = after;
+ next->unlink();
+ WvTraits<T>::release(obj);
+ }
+};
+typedef WvList<WvString>WvStringListBase;
+class WvStringList : WvStringListBase {};
+class WvSubProc {
+ WvStringList last_args, env;
+};
+void addroute(WvIPNet& dest, WvStringParm table) {
+ if (dest.is_default() || (table != "default")) WvSubProc checkProc;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr53161.C b/gcc/testsuite/g++.dg/torture/pr53161.C
new file mode 100644
index 0000000000..483556d9d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53161.C
@@ -0,0 +1,22 @@
+/* { dg-do compile { target c++11 } } */
+void gg();
+static __typeof(gg) __gthrw_gg __attribute__((__weakref__("gg")));
+
+template<typename R,typename... A>
+struct data {
+ template<typename Y,typename X>
+ data(Y& y,R(X::*f)(A...));
+};
+
+template<typename Y,typename X,typename R,typename... A>
+data<R,A...> make_data(Y& y,R(X::*f)(A...)) {
+ return data<R,A...>(y,f);
+}
+
+void global(data<void>);
+
+struct test {
+ void bar() {}
+ void doit() { global(make_data(*this,&test::bar)); }
+};
+
diff --git a/gcc/testsuite/g++.dg/torture/pr53321.C b/gcc/testsuite/g++.dg/torture/pr53321.C
new file mode 100644
index 0000000000..40a2de731d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53321.C
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// { dg-require-profiling "-fprofile-generate" }
+// { dg-options "-fprofile-generate" }
+
+typedef long unsigned int size_t;
+
+extern "C"
+{
+ extern void *memcpy (void *__dest, __const void *__src, size_t __n);
+}
+
+extern char *src, *sources;
+extern int n_sources;
+
+static void
+find_source (const char *file_name)
+{
+ memcpy (src, sources, n_sources * sizeof (*sources));
+}
+
+extern const char *gcov_read_string (void);
+
+static void read_graph_file (void)
+{
+ find_source (gcov_read_string ());
+}
+
+static void process_file (void)
+{
+ read_graph_file ();
+}
+
+int main ()
+{
+ process_file ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr53336.C b/gcc/testsuite/g++.dg/torture/pr53336.C
new file mode 100644
index 0000000000..ab121945d8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53336.C
@@ -0,0 +1,45 @@
+// { dg-do compile }
+
+bool foo();
+
+struct C
+{
+ C()
+ {
+ if (foo())
+ foo();
+ }
+};
+
+struct S
+{
+ struct dummy
+ {
+ int i_;
+ };
+ typedef int dummy::*bool_type;
+
+ operator bool_type() const
+ {
+ return foo() ? &dummy::i_ : 0;
+ }
+};
+
+int x;
+
+struct adaptor
+{
+ C c;
+
+ virtual void bar()
+ {
+ if (S())
+ x = 0;
+ }
+};
+
+int main()
+{
+ adaptor a;
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/pr53602.C b/gcc/testsuite/g++.dg/torture/pr53602.C
index 1bb9cf4faa..ab0f16fe2e 100644
--- a/gcc/testsuite/g++.dg/torture/pr53602.C
+++ b/gcc/testsuite/g++.dg/torture/pr53602.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++11" }
+// { dg-do compile { target c++11 } }
namespace std
{
diff --git a/gcc/testsuite/g++.dg/torture/pr53970.C b/gcc/testsuite/g++.dg/torture/pr53970.C
new file mode 100644
index 0000000000..53cbc1f855
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr53970.C
@@ -0,0 +1,17 @@
+// { dg-do run }
+
+#pragma pack(1)
+struct mystruct {
+ char c;
+ unsigned long l[1024];
+};
+#pragma pack()
+
+int main(int argc, char **argv)
+{
+ mystruct *a = new mystruct;
+ unsigned long i;
+ for (i = 0; i < 1024; ++i)
+ a->l[i] = 0xdeadbeaf;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr54647.C b/gcc/testsuite/g++.dg/torture/pr54647.C
new file mode 100644
index 0000000000..2177ecd679
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr54647.C
@@ -0,0 +1,25 @@
+// { dg-do compile }
+
+class A
+{
+};
+template <class type> struct D:A
+{
+ type & operator[](int);
+};
+struct B
+{
+ typedef D <int *>Row;
+ struct C
+ {
+ Row *row;
+ };
+};
+B::C a;
+B::Row & b = *a.row;
+void
+fn1 ()
+{
+ while (1)
+ b[0] = b[0] ? (int *) -1 : 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr54684.C b/gcc/testsuite/g++.dg/torture/pr54684.C
new file mode 100644
index 0000000000..4934011e45
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr54684.C
@@ -0,0 +1,63 @@
+// { dg-do compile }
+// { dg-options "-fno-short-enums" }
+
+typedef union tree_node *tree;
+typedef union gimple_statement_d *gimple;
+struct vec_prefix { unsigned num_; };
+template<typename T> struct vec_t {
+ unsigned length (void) const;
+ T &operator[] (unsigned);
+ vec_prefix prefix_;
+ T vec_[1];
+};
+template<typename T> inline unsigned vec_t<T>::length (void) const {
+ return prefix_.num_;
+}
+template<typename T> T & vec_t<T>::operator[] (unsigned ix) {
+ ((void)(__builtin_expect(!(ix < prefix_.num_), 0) ? __builtin_unreachable(), 0 : 0));
+ return vec_[ix];
+}
+enum tree_code { PARM_DECL };
+struct tree_base {
+ enum tree_code code : 16;
+ unsigned default_def_flag : 1;
+};
+union tree_node {
+ struct tree_base base;
+};
+struct ipa_param_descriptor {
+ tree decl;
+ unsigned used : 1;
+};
+typedef struct ipa_param_descriptor ipa_param_descriptor_t;
+struct ipa_node_params {
+ vec_t<ipa_param_descriptor_t> *descriptors;
+};
+static inline int ipa_get_param_count (struct ipa_node_params *info) {
+ return ((info->descriptors) ? (info->descriptors)->length () : 0);
+}
+static inline tree ipa_get_param (struct ipa_node_params *info, int i) {
+ return ((*(info->descriptors))[i]).decl;
+}
+static inline void ipa_set_param_used (struct ipa_node_params *info, int i, bool val) {
+ ((*(info->descriptors))[i]).used = val;
+}
+int ipa_get_param_decl_index (struct ipa_node_params *info, tree ptree)
+{
+ int i, count;
+ count = ipa_get_param_count (info);
+ for (i = 0; i < count; i++)
+ if (ipa_get_param (info, i) == ptree) return i;
+ return -1;
+}
+bool visit_ref_for_mod_analysis (gimple stmt __attribute__ ((__unused__)),
+ tree op, void *data)
+{
+ struct ipa_node_params *info = (struct ipa_node_params *) data;
+ if (op && ((enum tree_code) (op)->base.code) == PARM_DECL)
+ {
+ int index = ipa_get_param_decl_index (info, op);
+ ((void)(__builtin_expect(!(index >= 0), 0) ? __builtin_unreachable(), 0 : 0));
+ ipa_set_param_used (info, index, true);
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr54838.C b/gcc/testsuite/g++.dg/torture/pr54838.C
new file mode 100644
index 0000000000..6d34d57a48
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr54838.C
@@ -0,0 +1,102 @@
+// { dg-do compile }
+// { dg-options "-ftracer -fno-tree-dce -fno-tree-sra" }
+
+struct bidirectional_iterator_tag
+{};
+struct random_access_iterator_tag:bidirectional_iterator_tag
+{};
+template < typename _Category, typename, typename _Distance, typename > struct iterator
+{
+ typedef _Distance difference_type;
+};
+template < typename _Iterator > struct iterator_traits
+{
+ typedef typename _Iterator::difference_type difference_type;
+};
+template < typename _Tp > struct iterator_traits <_Tp * >
+{
+ typedef random_access_iterator_tag iterator_category;
+ typedef _Tp value_type;
+ typedef int difference_type;
+ typedef _Tp reference;
+};
+template < typename _Iterator > class reverse_iterator:
+ public
+ iterator < typename iterator_traits < _Iterator >::iterator_category,
+ typename iterator_traits < _Iterator >::value_type,
+ typename iterator_traits < _Iterator >::difference_type, typename iterator_traits < _Iterator >::reference >
+{
+ _Iterator current;
+public:
+ typedef _Iterator iterator_type;
+ reverse_iterator (const reverse_iterator & __x):current (__x.current)
+ {}
+ iterator_type base ()
+ {
+ return current;
+ }
+ reverse_iterator operator++ ()
+ {
+ --current;
+ }
+};
+template
+<
+typename
+_Iterator
+>
+bool
+operator
+==
+(reverse_iterator < _Iterator > __x, reverse_iterator < _Iterator > __y)
+{
+ return __x.base () == __y.base ();
+}
+
+template
+<
+typename
+_Iterator
+>
+typename
+reverse_iterator
+<
+_Iterator
+>::difference_type
+operator
+- (reverse_iterator < _Iterator >, reverse_iterator < _Iterator >)
+{}
+template
+<
+typename
+_RandomAccessIterator
+>
+_RandomAccessIterator
+__find
+(_RandomAccessIterator
+ __first, _RandomAccessIterator __last)
+{
+ typename
+ iterator_traits
+ <
+ _RandomAccessIterator
+ >::difference_type __trip_count (__last - __first);
+ for (; __trip_count; --__trip_count)
+ ++__first;
+ return __last;
+}
+typedef reverse_iterator < int* > _ForwardIterator1;
+_ForwardIterator1
+search
+(_ForwardIterator1
+ __first1,
+ _ForwardIterator1
+ __last1)
+{
+ for (;;)
+ {
+ __first1 = __find (__first1, __last1);
+ if (__first1 == __last1)
+ return __last1;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr55260-1.C b/gcc/testsuite/g++.dg/torture/pr55260-1.C
new file mode 100644
index 0000000000..dee5b60353
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr55260-1.C
@@ -0,0 +1,24 @@
+/* { dg-do compile { target c++11 } } */
+/* { dg-options "-fno-inline" } */
+/* { dg-add-options bind_pic_locally } */
+
+ struct B
+ {
+ constexpr B ():
+ bp ()
+ {}
+ ~B ()
+ {
+ if (bp)
+ bp->f ();
+ }
+ void f ();
+ B *bp;
+ };
+struct A { B b;
+};
+
+void foo ()
+{
+ A a;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr55260-2.C b/gcc/testsuite/g++.dg/torture/pr55260-2.C
new file mode 100644
index 0000000000..43ed1e775a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr55260-2.C
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-add-options bind_pic_locally } */
+
+struct B
+{
+ virtual void test_suite_finish ();
+};
+void
+fn1 (B & p2)
+{
+ fn1 (p2);
+ B & a = p2;
+ a.test_suite_finish ();
+ B b;
+ fn1 (b);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr55740.C b/gcc/testsuite/g++.dg/torture/pr55740.C
new file mode 100644
index 0000000000..cdd8425439
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr55740.C
@@ -0,0 +1,19 @@
+// { dg-do compile }
+
+static bool st_IsPathDelimiter( char c ) { return c == '/'; }
+bool IsValidPath( char const * filename )
+{
+ if ( !filename || filename[0] == 0 )
+ return false;
+ char const * run = filename;
+ while ( run && *run )
+ {
+ if ( run[0] == '.' )
+ if ( run[1] != '.' || ( !st_IsPathDelimiter( run[2] ) && run[2] != 0 ) )
+ return false;
+ while ( *run && !st_IsPathDelimiter( *run ) )
+ ++run;
+ if ( *run )
+ ++run;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr55789.C b/gcc/testsuite/g++.dg/torture/pr55789.C
new file mode 100644
index 0000000000..a5a31a4f51
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr55789.C
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-fno-guess-branch-probability -fno-tree-forwprop --param max-early-inliner-iterations=10 --param=early-inlining-insns=176" } */
+
+template < typename T > struct intrusive_ptr
+{
+ ~intrusive_ptr ()
+ {
+ delete px;
+ }
+ T *px;
+};
+
+struct section_info
+{
+ intrusive_ptr < section_info > parent;
+};
+
+struct file_info
+{
+ intrusive_ptr < file_info > parent;
+ intrusive_ptr < section_info > switched_section;
+};
+
+
+void
+start_file (void)
+{
+ intrusive_ptr < file_info > parent;
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/pr55875.C b/gcc/testsuite/g++.dg/torture/pr55875.C
new file mode 100644
index 0000000000..faadf88f49
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr55875.C
@@ -0,0 +1,55 @@
+// { dg-do run }
+
+struct A
+{
+ short int a1;
+ unsigned char a2;
+ unsigned int a3;
+};
+
+struct B
+{
+ unsigned short b1;
+ const A *b2;
+};
+
+B b;
+
+__attribute__((noinline, noclone))
+int foo (unsigned x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+ return x;
+}
+
+inline void
+bar (const int &)
+{
+}
+
+__attribute__((noinline)) void
+baz ()
+{
+ const A *a = b.b2;
+ unsigned int i;
+ unsigned short n = b.b1;
+ for (i = 0; i < n; ++i)
+ if (a[i].a1 == 11)
+ {
+ if (i > 0 && (a[i - 1].a2 & 1))
+ continue;
+ bar (foo (2));
+ return;
+ }
+}
+
+int
+main ()
+{
+ A a[4] = { { 10, 0, 0 }, { 11, 1, 0 }, { 11, 1, 0 }, { 11, 1, 0 } };
+ b.b1 = 4;
+ b.b2 = a;
+ baz ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/pr56029.C b/gcc/testsuite/g++.dg/torture/pr56029.C
new file mode 100644
index 0000000000..ca4a82a006
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56029.C
@@ -0,0 +1,126 @@
+// PR tree-optimization/56029
+// { dg-do compile }
+
+template <class T>
+struct DefaultDeleter
+{
+ void operator () (T * ptr) { delete ptr; }
+};
+template <class T, class D>
+struct scoped_ptr_impl
+{
+ scoped_ptr_impl (T * p):data_ (p) {}
+ template <typename U, typename V>
+ scoped_ptr_impl (scoped_ptr_impl <U, V> *other):data_ (other->release (), get_deleter ()) {}
+ ~scoped_ptr_impl () { static_cast <D> (data_) (data_.ptr); }
+ void reset (T * p) { data_.ptr = p; }
+ D get_deleter () {}
+ T *release () { data_.ptr = __null; }
+ struct Data
+ : D
+ {
+ Data (T *) : ptr () {}
+ Data (T *, D) : D (), ptr () {}
+ T *ptr;
+ };
+ Data data_;
+};
+template <class T, class D = DefaultDeleter <T> >
+struct scoped_ptr
+{
+ struct RValue
+ {
+ RValue (scoped_ptr * object):object (object) {}
+ scoped_ptr *object;
+ };
+ scoped_ptr Pass () { return scoped_ptr ((this)); }
+ typedef T element_type;
+ typedef D deleter_type;
+ scoped_ptr () : impl_ (__null) {}
+ scoped_ptr (RValue rvalue) : impl_ (&rvalue.object->impl_) {}
+ void reset (element_type * p) { impl_.reset (p); }
+ scoped_ptr_impl <element_type, deleter_type> impl_;
+};
+template <typename>
+struct Callback;
+struct ClientSocketFactory;
+struct DatagramClientSocket;
+struct DnsSocketPool
+{
+ scoped_ptr <DatagramClientSocket> CreateConnectedSocket ();
+ ClientSocketFactory *socket_factory_;
+};
+int RandInt (int, int);
+struct BindStateBase {};
+struct CallbackBase
+{
+ CallbackBase (BindStateBase *);
+ ~CallbackBase ();
+};
+template <typename, typename, typename>
+struct BindState;
+template <typename R, typename A1, typename A2>
+struct Callback <R (A1, A2)> : CallbackBase
+{
+ template <typename Runnable, typename BindRunType, typename BoundArgsType>
+ Callback (BindState <Runnable, BindRunType, BoundArgsType> *bind_state) : CallbackBase (bind_state) {}
+};
+typedef Callback <int (int, int)>
+RandIntCallback;
+struct ClientSocketFactory
+{
+ virtual DatagramClientSocket *CreateDatagramClientSocket (RandIntCallback) = 0;
+};
+template <typename>
+struct RunnableAdapter;
+template <typename R, typename A1, typename A2>
+struct RunnableAdapter <R (*) (A1, A2)>
+{
+ typedef R (RunType) (A1, A2);
+};
+template <typename T>
+struct FunctorTraits
+{
+ typedef RunnableAdapter <T> RunnableType;
+ typedef typename RunnableType::RunType RunType;
+};
+template <typename T>
+typename FunctorTraits <T>::RunnableType MakeRunnable (T)
+{
+}
+template <int, typename, typename>
+struct Invoker;
+template <typename StorageType, typename R, typename X1, typename X2>
+struct Invoker <0, StorageType, R (X1, X2)>
+{
+ typedef R (UnboundRunType) (X1, X2);
+};
+template <typename Runnable, typename RunType>
+struct BindState <Runnable, RunType, void ()> : BindStateBase
+{
+ typedef Runnable RunnableType;
+ typedef Invoker <0, BindState, RunType> InvokerType;
+ typedef typename InvokerType::UnboundRunType UnboundRunType;
+ BindState (Runnable):runnable_ () {}
+ RunnableType runnable_;
+};
+template <typename Functor>
+Callback <typename BindState <typename FunctorTraits <Functor>::RunnableType, typename FunctorTraits <Functor>::RunType, void ()>::UnboundRunType>
+Bind (Functor functor)
+{
+ typedef typename FunctorTraits <Functor>::RunnableType RunnableType;
+ typedef typename FunctorTraits <Functor>::RunType RunType;
+ typedef BindState <RunnableType, RunType, void ()> BindState;
+ Callback <typename BindState::UnboundRunType> (new BindState (MakeRunnable (functor)));
+}
+struct DatagramClientSocket
+{
+ virtual ~ DatagramClientSocket ();
+};
+scoped_ptr <DatagramClientSocket>
+DnsSocketPool::CreateConnectedSocket ()
+{
+ scoped_ptr <DatagramClientSocket> socket;
+ socket.reset (socket_factory_->CreateDatagramClientSocket (Bind (RandInt)));
+ socket.Pass ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56302.C b/gcc/testsuite/g++.dg/torture/pr56302.C
new file mode 100644
index 0000000000..08d47982ac
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56302.C
@@ -0,0 +1,41 @@
+// PR c++/56302
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+# define STAP_SDT_ARG_CONSTRAINT nor
+# define _SDT_STRINGIFY(x) #x
+# define _SDT_ARG_CONSTRAINT_STRING(x) _SDT_STRINGIFY(x)
+# define _SDT_ARG(n, x) \
+ [_SDT_S##n] "n" ((_SDT_ARGSIGNED (x) ? 1 : -1) * (int) _SDT_ARGSIZE (x)), \
+ [_SDT_A##n] _SDT_ARG_CONSTRAINT_STRING (STAP_SDT_ARG_CONSTRAINT) (_SDT_ARGVAL (x))
+#define _SDT_ARGARRAY(x) (__builtin_classify_type (x) == 14 \
+ || __builtin_classify_type (x) == 5)
+# define _SDT_ARGSIGNED(x) (!_SDT_ARGARRAY (x) \
+ && __sdt_type<__typeof (x)>::__sdt_signed)
+# define _SDT_ARGSIZE(x) (_SDT_ARGARRAY (x) \
+ ? sizeof (void *) : sizeof (x))
+# define _SDT_ARGVAL(x) (x)
+template<typename __sdt_T>
+struct __sdt_type
+{
+ static const bool __sdt_signed = false;
+};
+#define __SDT_ALWAYS_SIGNED(T) \
+template<> struct __sdt_type<T> { static const bool __sdt_signed = true; };
+__SDT_ALWAYS_SIGNED(signed char)
+__SDT_ALWAYS_SIGNED(short)
+__SDT_ALWAYS_SIGNED(int)
+__SDT_ALWAYS_SIGNED(long)
+__SDT_ALWAYS_SIGNED(long long)
+template<typename __sdt_E>
+struct __sdt_type<__sdt_E[]> : public __sdt_type<__sdt_E *> {};
+template<typename __sdt_E, size_t __sdt_N>
+struct __sdt_type<__sdt_E[__sdt_N]> : public __sdt_type<__sdt_E *> {};
+
+struct S { char p[8]; };
+
+void
+foo (const S &str)
+{
+ __asm__ __volatile__ ("" : : _SDT_ARG (0, &str));
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56398.C b/gcc/testsuite/g++.dg/torture/pr56398.C
new file mode 100644
index 0000000000..5b7bcf279b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56398.C
@@ -0,0 +1,22 @@
+// { dg-do compile }
+// { dg-options "-g" }
+
+namespace
+{
+#0 "/usr/include/c/4.8/bits/postypes.h" 3
+}
+
+vtkpow (int b)
+{
+ int a1;
+ int b1;
+ int c;
+ while (b1)
+ {
+ while (b)
+ b1 = 0;
+ b1 = b1 - 1;
+ c = c * a1;
+ }
+ return c;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56635.C b/gcc/testsuite/g++.dg/torture/pr56635.C
new file mode 100644
index 0000000000..53d6bb96ad
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56635.C
@@ -0,0 +1,17 @@
+// PR tree-optimization/56635
+// { dg-do compile }
+
+struct A { _Complex double a; };
+
+void
+foo (A **x, A **y)
+{
+ A r;
+ if (__real__ x[0]->a)
+ {
+ r.a = y[0]->a / x[0]->a;
+ **x = r;
+ }
+ else
+ **x = **y;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56694.C b/gcc/testsuite/g++.dg/torture/pr56694.C
new file mode 100644
index 0000000000..d3de051016
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56694.C
@@ -0,0 +1,31 @@
+// { dg-do compile }
+// { dg-options "-fopenmp" }
+// { dg-require-effective-target fopenmp }
+
+class GException {
+public:
+ class vector_mismatch {
+ public:
+ vector_mismatch(int size1, int size2);
+ };
+};
+class GVector{
+public:
+ GVector& operator+=(const GVector& v);
+ int m_num;
+ double* m_data;
+};
+inline GVector& GVector::operator+= (const GVector& v)
+{
+ if (m_num != v.m_num)
+ throw GException::vector_mismatch(m_num, v.m_num);
+ for (int i = 0; i < m_num; ++i) m_data[i] += v.m_data[i];
+};
+void eval(GVector* m_gradient, GVector* vect_cpy_grad, int n)
+{
+#pragma omp sections
+ {
+ for (int i = 0; i < n; ++i)
+ *m_gradient += vect_cpy_grad[i];
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56768.C b/gcc/testsuite/g++.dg/torture/pr56768.C
index db504c500e..93d292a9fd 100644
--- a/gcc/testsuite/g++.dg/torture/pr56768.C
+++ b/gcc/testsuite/g++.dg/torture/pr56768.C
@@ -1,5 +1,4 @@
-// { dg-do compile }
-// { dg-options "-std=c++0x" }
+// { dg-do compile { target c++11 } }
struct Iter
{
diff --git a/gcc/testsuite/g++.dg/torture/pr56817.C b/gcc/testsuite/g++.dg/torture/pr56817.C
new file mode 100644
index 0000000000..35fc6f74ff
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56817.C
@@ -0,0 +1,38 @@
+// { dg-do compile }
+// { dg-options "--param max-unroll-times=32" }
+
+struct A {};
+A **q;
+struct B
+{
+ A **j;
+ B () { j = q; }
+ A *& operator[] (unsigned long x) { return j[x]; }
+};
+struct C
+{
+ C (int r) : v (), s (r) {}
+ A *& operator () (int i, int j) { return v[i * s + j]; }
+ B v;
+ int s;
+};
+struct D
+{
+ D ()
+ {
+ unsigned h = 2;
+ for (int i = 0; i < 1; ++i, h *= 2)
+ {
+ C w (h);
+ for (unsigned j = 0; j < h; ++j)
+ for (unsigned k = 0; k < h; ++k)
+ w (j, k) = new A;
+ }
+ }
+};
+void
+foo ()
+{
+ for (int i = 0; i < 3; i++)
+ A (), A (), D ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56837.C b/gcc/testsuite/g++.dg/torture/pr56837.C
new file mode 100644
index 0000000000..d007122804
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56837.C
@@ -0,0 +1,20 @@
+// { dg-do run }
+// { dg-options "-ftree-loop-distribute-patterns" }
+
+extern "C" void abort (void);
+extern "C" int memcmp (const void *, const void *, __SIZE_TYPE__);
+
+bool b1[8];
+bool b2[8] = { true, true, true, true, true, true, true, true };
+
+int main()
+{
+ unsigned int i;
+ for(i=0 ; i < 8; i++)
+ b1[i] = true;
+
+ if (memcmp (b1, b2, 8) != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr56854.C b/gcc/testsuite/g++.dg/torture/pr56854.C
new file mode 100644
index 0000000000..fc7e30299f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr56854.C
@@ -0,0 +1,24 @@
+// PR tree-optimization/56854
+// { dg-do compile }
+
+inline void *
+operator new (__SIZE_TYPE__, void *p) throw ()
+{
+ return p;
+}
+
+struct A
+{
+ int a;
+ A () : a (0) {}
+ ~A () {}
+ A &operator= (const A &v) { this->~A (); new (this) A (v); return *this; }
+};
+A b[4], c[4];
+
+void
+foo ()
+{
+ for (int i = 0; i < 4; ++i)
+ c[i] = b[i];
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57107.C b/gcc/testsuite/g++.dg/torture/pr57107.C
new file mode 100644
index 0000000000..516dec16fc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57107.C
@@ -0,0 +1,193 @@
+// { dg-do compile }
+
+typedef long unsigned int size_t;
+namespace std {
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<class _Sp, class _Tp> struct __traitor {
+ enum {
+ __value = bool(_Sp::__value) || bool(_Tp::__value) };
+ };
+ template<typename _Tp> struct __is_integer {
+ enum {
+ __value = 0 };
+ };
+ template<typename _Tp> struct __is_floating {
+ enum {
+ __value = 0 };
+ };
+ template<typename _Tp> struct __is_pointer {
+ enum {
+ __value = 0 };
+ };
+ template<typename _Tp> struct __is_normal_iterator {
+ enum {
+ __value = 0 };
+ };
+ template<typename _Tp> struct __is_arithmetic : public __traitor<__is_integer<_Tp>, __is_floating<_Tp> > {
+ };
+ template<typename _Tp> struct __is_scalar : public __traitor<__is_arithmetic<_Tp>, __is_pointer<_Tp> > {
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<bool, typename> struct __enable_if {
+ };
+ template<typename _Tp> struct __enable_if<true, _Tp> {
+ typedef _Tp __type;
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Iterator> struct iterator_traits {
+ };
+ template<typename _Tp> struct iterator_traits<_Tp*> {
+ typedef _Tp value_type;
+ };
+ template<typename _Iterator, bool _HasBase> struct _Iter_base {
+ typedef _Iterator iterator_type;
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Iterator> struct _Niter_base : _Iter_base<_Iterator, __is_normal_iterator<_Iterator>::__value> {
+ };
+ template<typename _Iterator> inline typename _Niter_base<_Iterator>::iterator_type __niter_base(_Iterator __it) {
+ }
+ template<typename _OutputIterator, typename _Size, typename _Tp> inline typename __gnu_cxx::__enable_if<!__is_scalar<_Tp>::__value, _OutputIterator>::__type __fill_n_a(_OutputIterator __first, _Size __n, const _Tp& __value) {
+ for (__decltype(__n + 0) __niter = __n;
+ __niter > 0;
+ --__niter, ++__first) *__first = __value;
+ }
+ template<typename _OI, typename _Size, typename _Tp> inline _OI fill_n(_OI __first, _Size __n, const _Tp& __value) {
+ return _OI(std::__fill_n_a(std::__niter_base(__first), __n, __value));
+ }
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class new_allocator {
+ public:
+ typedef size_t size_type;
+ typedef _Tp* pointer;
+ ~new_allocator() throw() {
+ }
+ pointer allocate(size_type __n, const void* = 0) {
+ return static_cast<_Tp*>(::operator new(__n * sizeof(_Tp)));
+ }
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
+ public:
+ template<typename _Tp1> struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+ };
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Alloc> struct __alloc_traits {
+ typedef typename _Alloc::pointer pointer;
+ template<typename _Tp> struct rebind {
+ typedef typename _Alloc::template rebind<_Tp>::other other;
+ };
+ };
+}
+class QString {
+public:
+ bool isEmpty() const;
+};
+class QObject {
+};
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<bool _TrivialValueType> struct __uninitialized_fill_n {
+ template<typename _ForwardIterator, typename _Size, typename _Tp> static void __uninit_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) {
+ std::fill_n(__first, __n, __x);
+ }
+ };
+ template<typename _ForwardIterator, typename _Size, typename _Tp> inline void uninitialized_fill_n(_ForwardIterator __first, _Size __n, const _Tp& __x) {
+ typedef typename iterator_traits<_ForwardIterator>::value_type _ValueType;
+ std::__uninitialized_fill_n<__is_trivial(_ValueType)>:: __uninit_fill_n(__first, __n, __x);
+ }
+ template<typename _ForwardIterator, typename _Size, typename _Tp, typename _Tp2> inline void __uninitialized_fill_n_a(_ForwardIterator __first, _Size __n, const _Tp& __x, allocator<_Tp2>&) {
+ std::uninitialized_fill_n(__first, __n, __x);
+ }
+ template<typename _Tp, typename _Alloc> struct _Vector_base {
+ typedef typename __gnu_cxx::__alloc_traits<_Alloc>::template rebind<_Tp>::other _Tp_alloc_type;
+ typedef typename __gnu_cxx::__alloc_traits<_Tp_alloc_type>::pointer pointer;
+ struct _Vector_impl : public _Tp_alloc_type {
+ pointer _M_start;
+ pointer _M_finish;
+ pointer _M_end_of_storage;
+ _Vector_impl(_Tp_alloc_type const& __a) : _Tp_alloc_type(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0) {
+ }
+ };
+ typedef _Alloc allocator_type;
+ _Tp_alloc_type& _M_get_Tp_allocator() {
+ }
+ _Vector_base(size_t __n, const allocator_type& __a) : _M_impl(__a) {
+ _M_create_storage(__n);
+ }
+ _Vector_impl _M_impl;
+ pointer _M_allocate(size_t __n) {
+ return __n != 0 ? _M_impl.allocate(__n) : 0;
+ }
+ void _M_create_storage(size_t __n) {
+ this->_M_impl._M_start = this->_M_allocate(__n);
+ this->_M_impl._M_finish = this->_M_impl._M_start;
+ }
+ };
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class vector : protected _Vector_base<_Tp, _Alloc> {
+ typedef _Vector_base<_Tp, _Alloc> _Base;
+ typedef _Tp value_type;
+ typedef size_t size_type;
+ typedef _Alloc allocator_type;
+ using _Base::_M_get_Tp_allocator;
+ public:
+ explicit vector(size_type __n, const value_type& __value = value_type(), const allocator_type& __a = allocator_type()) : _Base(__n, __a) {
+ _M_fill_initialize(__n, __value);
+ }
+ void _M_fill_initialize(size_type __n, const value_type& __value) {
+ std::__uninitialized_fill_n_a(this->_M_impl._M_start, __n, __value, _M_get_Tp_allocator());
+ }
+ };
+};
+class QPaintDevice {
+public:
+ int width() const {
+ }
+ int height() const {
+ }
+};
+class QImage : public QPaintDevice {
+};
+extern "C" {
+ struct __jmp_buf_tag {
+ };
+ typedef struct __jmp_buf_tag jmp_buf[1];
+ extern int _setjmp (struct __jmp_buf_tag __env[1]) throw ();
+ extern void longjmp (struct __jmp_buf_tag __env[1], int __val) throw () __attribute__ ((__noreturn__));
+}
+typedef unsigned int png_uint_32;
+typedef void * png_voidp;
+typedef const char * png_const_charp;
+extern "C" {
+ typedef struct png_struct_def png_struct;
+ typedef png_struct * png_structp;
+ typedef void ( *png_error_ptr) (png_structp, png_const_charp);
+ typedef void ( *png_longjmp_ptr) (jmp_buf, int);
+ extern __attribute__((__malloc__)) png_structp ( png_create_write_struct) (png_const_charp user_png_ver, png_voidp error_ptr, png_error_ptr error_fn, png_error_ptr warn_fn) ;
+ extern jmp_buf* ( png_set_longjmp_fn) (png_structp png_ptr, png_longjmp_ptr longjmp_fn, size_t jmp_buf_size) ;
+}
+class PngWriter : public QObject {
+ const QImage *m_out_qimage;
+ QString m_fname;
+ bool writeQImageToPng();
+};
+bool PngWriter::writeQImageToPng() {
+ png_uint_32 width = m_out_qimage->width();
+ png_uint_32 height = m_out_qimage->height();
+ if ( !m_fname.isEmpty() ) {
+ std::vector<char> t(width * height * 4 + (width * height * 4) * 0.1);
+ }
+ png_structp png_ptr = png_create_write_struct ("1.5.13", __null, __null, __null);
+ if (_setjmp ((*png_set_longjmp_fn((png_ptr), longjmp, sizeof (jmp_buf))))) {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57140.C b/gcc/testsuite/g++.dg/torture/pr57140.C
new file mode 100644
index 0000000000..2ea2f9c4d1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57140.C
@@ -0,0 +1,186 @@
+// { dg-do compile }
+
+namespace std {
+ typedef long unsigned int size_t;
+ template<typename> class allocator;
+ template<class _CharT> struct char_traits;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
+ typedef basic_string<char> string;
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class new_allocator {
+ };
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
+ public:
+ template<typename _Tp1> struct rebind {
+ typedef allocator<_Tp1> other;
+ };
+ };
+}
+namespace std {
+}
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _CharT, typename _Traits, typename _Alloc> class basic_string {
+ struct _Alloc_hider : _Alloc {
+ _Alloc_hider(_CharT* __dat, const _Alloc& __a) : _Alloc(__a), _M_p(__dat) {
+ }
+ _CharT* _M_p;
+ };
+ mutable _Alloc_hider _M_dataplus;
+ public:
+ basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+ };
+ template<typename _CharT, typename _Traits, typename _Alloc> inline bool operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs, const _CharT* __rhs) {
+ }
+}
+extern "C" {
+}
+namespace std __attribute__ ((__visibility__ ("default"))) {
+ namespace __detail {
+ struct _List_node_base {
+ _List_node_base* _M_next;
+ };
+ }
+ template<typename _Tp> struct _List_node : public __detail::_List_node_base {
+ };
+ template<typename _Tp> struct _List_iterator {
+ typedef _List_iterator<_Tp> _Self;
+ typedef _Tp& reference;
+ reference operator*() const {
+ }
+ bool operator!=(const _Self& __x) const {
+ }
+ };
+ template<typename _Tp, typename _Alloc> class _List_base {
+ protected:
+ typedef typename _Alloc::template rebind<_List_node<_Tp> >::other _Node_alloc_type;
+ struct _List_impl : public _Node_alloc_type {
+ __detail::_List_node_base _M_node;
+ _List_impl() : _Node_alloc_type(), _M_node() {
+ }
+ _List_impl(const _Node_alloc_type& __a) : _Node_alloc_type(__a), _M_node() {
+ }
+ };
+ _List_impl _M_impl;
+ ~_List_base() {
+ }
+ void _M_clear();
+ };
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > class list : protected _List_base<_Tp, _Alloc> {
+ typedef _List_iterator<_Tp> iterator;
+ typedef size_t size_type;
+ public:
+ iterator begin() {
+ }
+ iterator end() {
+ }
+ bool empty() const {
+ }
+ size_type size() const {
+ }
+ void swap(list& __x) {
+ }
+ template<typename _StrictWeakOrdering> void merge(list& __x, _StrictWeakOrdering __comp);
+ template<typename _StrictWeakOrdering> void sort(_StrictWeakOrdering);
+ };
+ template<typename _Tp, typename _Alloc> template <typename _StrictWeakOrdering> void list<_Tp, _Alloc>:: merge(list& __x, _StrictWeakOrdering __comp) {
+ if (this != &__x) {
+ iterator __first1 = begin();
+ iterator __last1 = end();
+ iterator __first2 = __x.begin();
+ iterator __last2 = __x.end();
+ while (__first1 != __last1 && __first2 != __last2) if (__comp(*__first2, *__first1)) {
+ iterator __next = __first2;
+ __first2 = __next;
+ }
+ }
+ }
+ template<typename _Tp, typename _Alloc> template <typename _StrictWeakOrdering> void list<_Tp, _Alloc>:: sort(_StrictWeakOrdering __comp) {
+ if (this->_M_impl._M_node._M_next != &this->_M_impl._M_node && this->_M_impl._M_node._M_next->_M_next != &this->_M_impl._M_node) {
+ list __carry;
+ list __tmp[64];
+ list * __fill = &__tmp[0];
+ list * __counter;
+ do {
+ for(__counter = &__tmp[0];
+ __counter != __fill && !__counter->empty();
+ ++__counter) { __counter->merge(__carry, __comp); __carry.swap(*__counter); }
+ }
+ while ( !empty() );
+ for (__counter = &__tmp[1];
+ __counter != __fill;
+ ++__counter) __counter->merge(*(__counter - 1), __comp);
+ }
+ }
+}
+namespace gloox {
+ class Tag {
+ };
+ class StanzaExtension {
+ };
+}
+namespace gloox {
+}
+using namespace gloox;
+class AbstractPurpleRequest {
+};
+class AdhocCommandHandler : public AbstractPurpleRequest {
+};
+class AdhocTag : public Tag {
+};
+class AbstractConfigInterfaceHandler {
+};
+namespace gloox {
+ class DataFormField {
+ public:
+ const std::string& value() const {
+ }
+ };
+ class DataFormFieldContainer {
+ public:
+ bool hasField( const std::string& field ) const {
+ }
+ DataFormField* field( const std::string& field ) const;
+ };
+ class DataForm : public StanzaExtension, public DataFormFieldContainer {
+ };
+}
+enum {
+ SORT_BY_JID, SORT_BY_UIN, SORT_BY_BUDDIES, };
+struct SortData {
+};
+struct ListData {
+ std::list<SortData> output;
+ int sort_by;
+};
+class AdhocAdmin : public AdhocCommandHandler, public AbstractConfigInterfaceHandler {
+ AdhocTag *handleAdhocTag(Tag *stanzaTag);
+ AdhocTag *handleUnregisterUserForm(Tag *tag, const DataForm &form);
+ AdhocTag *handleListUsersForm(Tag *tag, const DataForm &form);
+ ListData m_listUsersData;
+};
+namespace gloox {
+}
+static bool compareIDataASC(SortData &a, SortData &b) {
+}
+AdhocTag *AdhocAdmin::handleListUsersForm(Tag *tag, const DataForm &form) {
+ ListData &data = m_listUsersData;
+ if (data.output.size() == 0) {
+ if (!form.hasField("users_vip") || !form.hasField("show_jid") || !form.hasField("show_uin") || !form.hasField("show_buddies") || !form.hasField("show_sort_by") || !form.hasField("show_sort_order") || !form.hasField("show_max_per_page") ) {
+ }
+ bool sort_asc = form.field("show_sort_order")->value() == "asc";
+ if (data.sort_by == SORT_BY_BUDDIES) {
+ if (sort_asc) data.output.sort(compareIDataASC);
+ }
+ else {
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57190.C b/gcc/testsuite/g++.dg/torture/pr57190.C
new file mode 100644
index 0000000000..9fa11cd26b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57190.C
@@ -0,0 +1,42 @@
+// { dg-do compile }
+
+namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> class new_allocator {
+ };
+}
+namespace std {
+ template<typename> class allocator;
+ template<class _CharT> struct char_traits;
+ template<typename _CharT, typename _Traits = char_traits<_CharT>, typename _Alloc = allocator<_CharT> > class basic_string;
+ typedef basic_string<char> string;
+ template<typename _Tp> class allocator: public __gnu_cxx::new_allocator<_Tp> {
+ };
+ template<typename _CharT, typename _Traits, typename _Alloc> class basic_string {
+ public:
+ basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+ };
+}
+class UIException {
+};
+class PasswordDialog {
+ void run() throw (UIException);
+};
+class MessageBox {
+public:
+ MessageBox (std::string t) throw (UIException);
+ virtual int run() throw (UIException) ;
+};
+extern "C" {
+ struct __jmp_buf_tag {
+ };
+ extern int __sigsetjmp (struct __jmp_buf_tag __env[1], int __savemask) throw ();
+ typedef struct __jmp_buf_tag sigjmp_buf[1];
+}
+sigjmp_buf password_dialog_sig_jmp_buf;
+void PasswordDialog::run() throw (UIException)
+{
+ __sigsetjmp (password_dialog_sig_jmp_buf, 1);
+ MessageBox* errmsg = __null;
+ errmsg = new MessageBox ("E R R O R");
+ errmsg->run();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57235.C b/gcc/testsuite/g++.dg/torture/pr57235.C
new file mode 100644
index 0000000000..fd5663348e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57235.C
@@ -0,0 +1,156 @@
+// { dg-do compile }
+
+namespace std
+{
+ template < class _Elem > struct char_traits
+ {
+ };
+ struct _Container_base
+ {
+ };
+ template < class _Ty > struct _Allocator_base
+ {
+ };
+ template < class _Ty > class allocator:public _Allocator_base < _Ty >
+ {
+ };
+ class _String_base:public _Container_base
+ {
+ };
+template < class _Ty, class _Alloc > class _String_val:public _String_base
+ {
+ };
+template < class _Elem, class _Traits, class _Ax > class basic_string:public _String_val < _Elem,
+ _Ax
+ >
+ {
+ public:typedef basic_string < _Elem, _Traits, _Ax > _Myt;
+ typedef _String_val < _Elem, _Ax > _Mybase;
+ basic_string (const _Elem * _Ptr):_Mybase ()
+ {
+ }
+ };
+ typedef basic_string < char, char_traits < char >,
+ allocator < char > >string;
+}
+
+
+namespace google
+{
+ namespace protobuf
+ {
+ namespace internal
+ {
+ template < class C > class scoped_ptr
+ {
+ public:typedef C element_type;
+ explicit scoped_ptr (C * p = __null):ptr_ (p)
+ {
+ }
+ ~scoped_ptr ()
+ {
+ delete ptr_;
+ }
+ C *get () const
+ {
+ return ptr_;
+ }
+ private: C * ptr_;
+ };
+ }
+ using internal::scoped_ptr;
+ enum LogLevel
+ {
+ LOGLEVEL_INFO, LOGLEVEL_WARNING, LOGLEVEL_ERROR, LOGLEVEL_FATAL,
+ LOGLEVEL_DFATAL = LOGLEVEL_ERROR
+ };
+ namespace internal
+ {
+ class LogMessage
+ {
+ public:LogMessage (LogLevel level, const char *filename,
+ int line);
+ ~LogMessage ();
+ LogMessage & operator<< (const std::string & value);
+ };
+ class LogFinisher
+ {
+ public:void operator= (LogMessage & other);
+ };
+ }
+ using namespace std;
+ class Descriptor
+ {
+ };
+ class FieldDescriptor
+ {
+ public:
+ const Descriptor *message_type () const;
+ string DebugString () const;
+ };
+ class MessageLite
+ {
+ };
+ class Message:public MessageLite
+ {
+ public:inline Message ()
+ {
+ }
+ virtual ~ Message ();
+ virtual Message *New () const = 0;
+ };
+ class MessageFactory
+ {
+ };
+ class UnknownFieldSet
+ {
+ };
+ class DynamicMessageFactory:public MessageFactory
+ {
+ public:DynamicMessageFactory ();
+ const Message *GetPrototype (const Descriptor * type);
+ };
+ namespace io
+ {
+ class ErrorCollector
+ {
+ public:inline ErrorCollector ()
+ {
+ }
+ virtual ~ ErrorCollector ();
+ };
+ }
+ class DescriptorBuilder
+ {
+ class OptionInterpreter
+ {
+ bool SetAggregateOption (const FieldDescriptor * option_field,
+ UnknownFieldSet * unknown_fields);
+ DynamicMessageFactory dynamic_factory_;
+ };
+ };
+ namespace
+ {
+ class AggregateErrorCollector:public io::ErrorCollector
+ {
+ };
+ }
+ bool DescriptorBuilder::OptionInterpreter::
+ SetAggregateOption (const FieldDescriptor * option_field,
+ UnknownFieldSet * unknown_fields)
+ {
+ const Descriptor *type = option_field->message_type ();
+ scoped_ptr < Message >
+ dynamic (dynamic_factory_.GetPrototype (type)->New ());
+ !(!(dynamic.get () !=
+ __null)) ? (void) 0 : ::google::protobuf::internal::
+ LogFinisher () =::google::protobuf::internal::LogMessage (::google::
+ protobuf::
+ LOGLEVEL_FATAL,
+ "descriptor.cc",
+ 4396) <<
+ option_field->DebugString ();
+ AggregateErrorCollector collector;
+ }
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr57499.C b/gcc/testsuite/g++.dg/torture/pr57499.C
new file mode 100644
index 0000000000..fd985a199b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr57499.C
@@ -0,0 +1,14 @@
+// PR middle-end/57499
+// { dg-do compile }
+
+struct S
+{
+ ~S () __attribute__ ((noreturn)) {} // { dg-warning "function does return" }
+};
+
+void
+foo ()
+{
+ S s;
+ throw 1;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr58201.h b/gcc/testsuite/g++.dg/torture/pr58201.h
new file mode 100644
index 0000000000..6071ccdf87
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58201.h
@@ -0,0 +1,24 @@
+class A
+{
+ protected:
+ A();
+ virtual ~A();
+};
+
+class B : virtual public A
+{
+ public:
+ B();
+ virtual ~B();
+};
+
+class C
+{
+ private:
+ class C2 : public B
+ {
+ public:
+ C2();
+ virtual ~C2();
+ };
+};
diff --git a/gcc/testsuite/g++.dg/torture/pr58201_0.C b/gcc/testsuite/g++.dg/torture/pr58201_0.C
new file mode 100644
index 0000000000..f8fa7173c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58201_0.C
@@ -0,0 +1,9 @@
+#include "pr58201.h"
+
+C::C2::C2(){ }
+C::C2::~C2() { }
+
+int main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr58201_1.C b/gcc/testsuite/g++.dg/torture/pr58201_1.C
new file mode 100644
index 0000000000..132cd5a43b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58201_1.C
@@ -0,0 +1,10 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+/* { dg-additional-sources "pr58201_0.C" } */
+#include "pr58201.h"
+
+A::A() { }
+A::~A() { }
+B::B() { }
+B::~B() { }
+
diff --git a/gcc/testsuite/g++.dg/torture/pr58252.C b/gcc/testsuite/g++.dg/torture/pr58252.C
new file mode 100644
index 0000000000..d38a7a7ea4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58252.C
@@ -0,0 +1,142 @@
+// { dg-do compile }
+// { dg-options "-fpermissive" }
+typedef long unsigned int size_t;
+ typedef bool _CORBA_Boolean;
+ typedef unsigned int _CORBA_ULong;
+ template <class T> class _CORBA_Sequence {
+ public: typedef _CORBA_Sequence<T> T_seq;
+ inline T_seq &operator= (const T_seq &s) {
+ for (unsigned long i=0;
+ i < pd_len;
+ i++) {
+ }
+ }
+ _CORBA_ULong pd_len;
+ };
+ template <class T> class _CORBA_Unbounded_Sequence : public _CORBA_Sequence<T> {
+ inline _CORBA_Unbounded_Sequence_WChar() { // { dg-warning "forbids declaration" }
+ }
+ };
+ class _CORBA_ObjRef_Var_base {
+ };
+ template <class T, class T_Helper> class _CORBA_ObjRef_Var : public _CORBA_ObjRef_Var_base {
+ public: typedef T* ptr_t;
+ typedef T* T_ptr;
+ inline _CORBA_ObjRef_Var() : pd_objref(T_Helper::_nil()) {
+ }
+ inline _CORBA_ObjRef_Var(T_ptr p) : pd_objref(p) {
+ }
+ private: T_ptr pd_objref;
+ };
+ class omniLocalIdentity;
+ class omniObjRef {
+ };
+ class omniServant {
+ public: virtual ~omniServant();
+ virtual void* _ptrToInterface(const char* repoId);
+ };
+ namespace CORBA {
+ class NVList {
+ };
+ class Object {
+ };
+ struct StructMember {
+ };
+ class StructMemberSeq : public _CORBA_Unbounded_Sequence< StructMember > {
+ };
+ class _objref_IRObject : public virtual ::CORBA::Object, public virtual omniObjRef {
+ };
+ class _impl_IRObject : public virtual omniServant {
+ };
+ class _objref_Container;
+ typedef _objref_Container* Container_ptr;
+ class _impl_Contained : public virtual _impl_IRObject {
+ };
+ class _objref_ExceptionDef;
+ typedef _objref_ExceptionDef* ExceptionDef_ptr;
+ class ExceptionDef_Helper {
+ public: typedef ExceptionDef_ptr _ptr_type;
+ static _ptr_type _nil();
+ };
+ typedef _CORBA_ObjRef_Var<_objref_ExceptionDef, ExceptionDef_Helper> ExceptionDef_var;
+ class Container {
+ public: typedef Container_ptr _ptr_type;
+ static const char* _PD_repoId;
+ };
+ class _objref_Container : public virtual _objref_IRObject {
+ ExceptionDef_ptr create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members);
+ };
+ class _impl_Container : public virtual _impl_IRObject {
+ public: virtual ~_impl_Container();
+ virtual ExceptionDef_ptr create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members) = 0;
+ };
+ class _impl_IDLType : public virtual _impl_IRObject {
+ };
+ class _impl_TypedefDef : public virtual _impl_Contained, public virtual _impl_IDLType {
+ };
+ class _impl_StructDef : public virtual _impl_TypedefDef, public virtual _impl_Container {
+ };
+ }
+ namespace PortableServer {
+ class ServantBase : public virtual omniServant {
+ };
+ }
+ namespace POA_CORBA {
+ class IRObject : public virtual CORBA::_impl_IRObject, public virtual ::PortableServer::ServantBase {
+ };
+ class Contained : public virtual CORBA::_impl_Contained, public virtual IRObject {
+ };
+ class Container : public virtual CORBA::_impl_Container, public virtual IRObject {
+ };
+ class IDLType : public virtual CORBA::_impl_IDLType, public virtual IRObject {
+ };
+ class TypedefDef : public virtual CORBA::_impl_TypedefDef, public virtual Contained, public virtual IDLType {
+ };
+ class StructDef : public virtual CORBA::_impl_StructDef, public virtual TypedefDef, public virtual Container {
+ public: virtual ~StructDef();
+ };
+ }
+ namespace omni {
+ class omniOrbPOA;
+ class giopAddress;
+ }
+ class omniCallDescriptor {
+ public: typedef void (*LocalCallFn)(omniCallDescriptor*, omniServant*);
+ inline omniCallDescriptor(LocalCallFn lcfn, const char* op_, int op_len_, _CORBA_Boolean oneway, const char*const* user_excns_, int n_user_excns_, _CORBA_Boolean is_upcall_) : pd_localCall(lcfn), pd_op(op_), pd_oplen(op_len_), pd_user_excns(user_excns_), pd_n_user_excns(n_user_excns_), pd_is_oneway(oneway), pd_is_upcall(is_upcall_), pd_contains_values(0), pd_first_address_used(0), pd_current_address(0), pd_objref(0), pd_poa(0), pd_localId(0), pd_deadline_secs(0), pd_deadline_nanosecs(0) {
+ }
+ private: LocalCallFn pd_localCall;
+ const char* pd_op;
+ size_t pd_oplen;
+ const char*const* pd_user_excns;
+ int pd_n_user_excns;
+ _CORBA_Boolean pd_is_oneway;
+ _CORBA_Boolean pd_is_upcall;
+ _CORBA_Boolean pd_contains_values;
+ const omni::giopAddress* pd_first_address_used;
+ const omni::giopAddress* pd_current_address;
+ omniObjRef* pd_objref;
+ omni::omniOrbPOA* pd_poa;
+ omniLocalIdentity* pd_localId;
+ unsigned long pd_deadline_secs;
+ unsigned long pd_deadline_nanosecs;
+ };
+ class _0RL_cd_7963219a43724a61_f2000000 : public omniCallDescriptor {
+ public: inline _0RL_cd_7963219a43724a61_f2000000(LocalCallFn lcfn,const char* op_,size_t oplen,_CORBA_Boolean upcall=0): omniCallDescriptor(lcfn, op_, oplen, 0, _user_exns, 0, upcall) {
+ }
+ static const char* const _user_exns[];
+ const char* arg_0;
+ const char* arg_1;
+ const char* arg_2;
+ const CORBA::StructMemberSeq* arg_3;
+ CORBA::ExceptionDef_var result;
+ };
+ static void _0RL_lcfn_7963219a43724a61_03000000(omniCallDescriptor* cd, omniServant* svnt) {
+ _0RL_cd_7963219a43724a61_f2000000* tcd = (_0RL_cd_7963219a43724a61_f2000000*)cd;
+ CORBA::_impl_Container* impl = (CORBA::_impl_Container*) svnt->_ptrToInterface(CORBA::Container::_PD_repoId);
+ tcd->result = impl->create_exception(tcd->arg_0, tcd->arg_1, tcd->arg_2, *tcd->arg_3);
+ }
+ CORBA::ExceptionDef_ptr CORBA::_objref_Container::create_exception(const char* id, const char* name, const char* version, const ::CORBA::StructMemberSeq& members) {
+ _0RL_cd_7963219a43724a61_f2000000 _call_desc(_0RL_lcfn_7963219a43724a61_03000000, "create_exception", 17);
+ }
+ POA_CORBA::StructDef::~StructDef() {
+ }
diff --git a/gcc/testsuite/g++.dg/torture/pr58369.C b/gcc/testsuite/g++.dg/torture/pr58369.C
new file mode 100644
index 0000000000..9284e2ca76
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58369.C
@@ -0,0 +1,109 @@
+// { dg-do compile }
+// Reduced from boost-1.54
+
+int pow(int, int);
+int sqrt(int);
+
+class PolicyA { };
+
+template <class>
+int max_value() { return 0x7fffffff; }
+
+template <class>
+int min_value() { return 1; }
+
+void raise_denorm_error();
+
+template <class T>
+void raise_domain_error(int, int, const T &, const PolicyA &);
+
+template <class>
+int check_overflow(long double p1) {
+ long double __trans_tmp_2 = __builtin_fabsl(p1);
+ if (__trans_tmp_2 > max_value<int>())
+ return 1;
+ return 0;
+}
+
+template <class>
+int check_underflow(long double p1) {
+ if (p1 && (double)p1)
+ return 1;
+ return 0;
+}
+
+template <class>
+int check_denorm(long double p1) {
+ long double __trans_tmp_3 = __builtin_fabsl(p1);
+ if (__trans_tmp_3 < min_value<int>() && (double)p1) {
+ raise_denorm_error();
+ return 1;
+ }
+ return 0;
+}
+
+template <class, class>
+double checked_narrowing_cast(long double p1) {
+ if (check_overflow<int>(p1))
+ return 0;
+ if (check_underflow<int>(p1))
+ return 0;
+ if (check_denorm<int>(p1))
+ return 0;
+ return (double)p1;
+}
+
+long double ellint_rf_imp(long double, long double, long double);
+
+template <typename T, typename Policy>
+T ellint_rj_imp(T p1, T p2, T p3, T p4, Policy &p5) {
+ T value, tolerance, P, S3;
+ if (p4)
+ return 0;
+ if (p3 || p1)
+ raise_domain_error(0, 0, 0, p5);
+ tolerance = pow(0, 0);
+ if (p4) {
+ T q = -p4;
+ {
+ long double q6 = ellint_rj_imp((long double)p1, (long double)(double)p2, (long double)(double)p3, (long double)(int)0, p5);
+ value = checked_narrowing_cast<T, int>(q6);
+ }
+ {
+ long double q7 = ellint_rf_imp((long double)p1, (long double)(double)p2, (long double)(double)p3);
+ value -= checked_narrowing_cast<T, const int>(q7);
+ }
+ value += p1 * p3 + p4 * q;
+ return value;
+ }
+ do {
+ P = p4 / p1;
+ if (0 < tolerance)
+ break;
+ sqrt(p3);
+ } while (1);
+ S3 = P * p2 * 0;
+ value = S3 / p1;
+ return value;
+}
+
+template <typename Policy>
+void ellint_pi_imp4(double, double p3, Policy &p4) {
+ double x, y, z;
+ ellint_rj_imp(x, y, z, p3, p4);
+}
+
+template <typename Policy>
+double ellint_pi_imp5(double, double p3, double p4, Policy &p5) {
+ double x, y, z, p;
+ if (p3 > 0)
+ return 0;
+ ellint_rj_imp(x, y, z, p, p5);
+ ellint_pi_imp4((double)0, p4, p5);
+}
+
+void boost_ellint_3f() {
+ PolicyA p4;
+ ellint_pi_imp5((double)0, (double)0, (double)0, p4);
+}
+
diff --git a/gcc/testsuite/g++.dg/torture/pr58380.C b/gcc/testsuite/g++.dg/torture/pr58380.C
new file mode 100644
index 0000000000..3a6ca94206
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58380.C
@@ -0,0 +1,173 @@
+// { dg-do compile }
+// { dg-options "-w" }
+
+class iplugin_factory;
+class idocument_plugin_factory {
+ virtual idocument_plugin_factory *create_plugin(iplugin_factory &, int &);
+};
+template <typename _Iterator, typename> class __normal_iterator {
+ _Iterator _M_current;
+
+public:
+ _Iterator iterator_type;
+ __normal_iterator(const _Iterator &p1) : _M_current(p1) {}
+ void operator++();
+ _Iterator &base() { return _M_current; }
+};
+
+template <typename _IteratorL, typename _IteratorR, typename _Container>
+int operator!=(__normal_iterator<_IteratorL, _Container> &p1,
+ __normal_iterator<_IteratorR, _Container> &p2) {
+ return p1.base() != p2.base();
+}
+
+class new_allocator {
+public:
+ typedef int *const_pointer;
+ int *allocate();
+};
+template <typename> class allocator : public new_allocator {};
+
+class basic_string {
+public:
+ basic_string(char *);
+};
+struct __uninitialized_copy {
+ template <typename _InputIterator, typename _ForwardIterator>
+ static _ForwardIterator __uninit_copy(_InputIterator p1, _InputIterator p2,
+ _ForwardIterator p3) try {
+ for (; p1 != p2; ++p1, ++p3)
+ ;
+ return p3;
+ }
+ catch (...) {
+ }
+};
+
+template <typename _InputIterator, typename _ForwardIterator>
+_ForwardIterator uninitialized_copy(_InputIterator p1, _InputIterator p2,
+ _ForwardIterator p3) {
+ return __uninitialized_copy::__uninit_copy(p1, p2, p3);
+}
+
+template <typename _InputIterator, typename _ForwardIterator, typename _Tp>
+_ForwardIterator __uninitialized_copy_a(_InputIterator p1, _InputIterator p2,
+ _ForwardIterator p3, allocator<_Tp> &) {
+ return uninitialized_copy(p1, p2, p3);
+}
+
+struct _Vector_base {
+ struct _Vector_impl : allocator<int> {
+ int *_M_start;
+ int *_M_finish;
+ };
+ allocator<int> &_M_get_Tp_allocator() {}
+ _Vector_base() {}
+ _Vector_base(int p1) { _M_create_storage(p1); }
+ _Vector_impl _M_impl;
+ int *_M_allocate(int p1) { p1 ? _M_impl.allocate() : 0; }
+ void _M_create_storage(int p1) {
+ this->_M_impl._M_start = this->_M_allocate(p1);
+ }
+};
+
+class vector : _Vector_base {
+ _Vector_base _Base;
+
+public:
+ vector() {}
+ vector(const vector &p1) : _Base(p1.size()) {
+ this->_M_impl._M_finish = __uninitialized_copy_a(
+ p1.begin(), p1.end(), this->_M_impl._M_start, _M_get_Tp_allocator());
+ }
+ ~vector();
+ __normal_iterator<typename allocator<int>::const_pointer, int> begin() const {
+ return this->_M_impl._M_start;
+ }
+ __normal_iterator<typename allocator<int>::const_pointer, int> end() const {
+ return this->_M_impl._M_finish;
+ }
+ int size() const { return this->_M_impl._M_finish - this->_M_impl._M_start; }
+};
+class iplugin_factory {
+public:
+ typedef enum {
+ STABLE,
+ EXPERIMENTAL
+ } quality_t;
+};
+class plugin_factory : public iplugin_factory {
+public:
+ plugin_factory(const int &, const basic_string &, const basic_string &,
+ const basic_string &, quality_t);
+};
+template <typename plugin_t>
+class document_plugin_factory : plugin_factory, idocument_plugin_factory {
+public:
+ document_plugin_factory(const int &p1, const basic_string &,
+ const basic_string &, const basic_string &, quality_t)
+ : plugin_factory(0, 0, 0, 0, STABLE) {}
+ idocument_plugin_factory *create_plugin(iplugin_factory &p1, int &p2) {
+ plugin_t(p1, p2);
+ }
+};
+
+class container {
+public:
+ template <typename init_t> container(init_t &);
+};
+template <class init_t> class initializer_t : init_t {
+public:
+ initializer_t(const init_t &p1) : init_t(p1) {}
+};
+
+class composition_t {};
+template <typename lhs_t, typename rhs_t>
+const initializer_t<composition_t> operator+(const initializer_t<lhs_t> &,
+ const initializer_t<rhs_t> &);
+template <typename value_t> class value_initializer_t {
+public:
+ value_initializer_t(const value_t &p1) : m_value(p1) {}
+ value_t m_value;
+};
+
+template <typename value_t>
+initializer_t<value_initializer_t<value_t> > init_value(const value_t &p1) {
+ initializer_t<value_initializer_t<value_t> >(
+ value_initializer_t<value_t>(p1));
+}
+
+class name_t {};
+class label_t {};
+class description_t {};
+class owner_initializer_t {};
+template <typename owner_t>
+initializer_t<owner_initializer_t> init_owner(owner_t &);
+class set : vector {};
+class node {
+public:
+ node(iplugin_factory &, int &);
+};
+initializer_t<name_t> init_name();
+initializer_t<label_t> init_label();
+initializer_t<description_t> init_description();
+template <typename base_t> class mesh_selection_sink : base_t {
+public:
+ mesh_selection_sink(iplugin_factory &p1, int &p2)
+ : base_t(p1, p2),
+ m_mesh_selection(init_owner(*this) + init_name() + init_label() +
+ init_description() + init_value(set())) {}
+ container m_mesh_selection;
+};
+
+class selection_to_stdout : mesh_selection_sink<node> {
+public:
+ selection_to_stdout(iplugin_factory &p1, int &p2)
+ : mesh_selection_sink(p1, p2) {}
+ static iplugin_factory &get_factory() {
+ document_plugin_factory<selection_to_stdout>(0, "", 0, "",
+ iplugin_factory::EXPERIMENTAL);
+ }
+};
+
+void selection_to_stdout_factory() { selection_to_stdout::get_factory(); }
diff --git a/gcc/testsuite/g++.dg/torture/pr58464.C b/gcc/testsuite/g++.dg/torture/pr58464.C
new file mode 100644
index 0000000000..3d9a2279d9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58464.C
@@ -0,0 +1,268 @@
+// { dg-do compile }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" void *memcpy(void *, const void *, size_t);
+void *xmalloc(size_t);
+enum {
+ _sch_isdigit, _sch_isidst, _sch_isidnum
+};
+extern const unsigned _sch_istable[256];
+typedef struct ht cpp_hash_table;
+typedef struct ht_identifier *hashnode;
+enum ht_lookup_option {
+ HT_NO_INSERT
+};
+struct ht {
+ struct cpp_reader *pfile;
+};
+hashnode ht_lookup_with_hash(cpp_hash_table *, unsigned char *, size_t, unsigned, ht_lookup_option);
+typedef unsigned source_location;
+enum cpp_ttype {
+ CPP_OTHER, CPP_STRING, CPP_STRING16, CPP_UTF8STRING
+};
+struct cpp_token {
+ source_location src_loc;
+};
+typedef int cppchar_t;
+struct cpp_options {
+ char user_literals;
+ unsigned warn_literal_suffix;
+};
+enum node_type { };
+struct cpp_hashnode {
+ node_type type:6;
+};
+enum {
+ CPP_DL_ERROR
+};
+enum {
+ CPP_W_LITERAL_SUFFIX
+};
+bool cpp_error_with_line(cpp_reader *, int, source_location, unsigned, ...);
+bool cpp_warning_with_line(cpp_reader *, int, source_location, unsigned, const char *);
+cpp_ttype cpp_userdef_string_add_type(cpp_ttype);
+cpp_ttype cpp_userdef_char_add_type(cpp_ttype);
+typedef unsigned char uchar;
+struct _cpp_buff {
+ _cpp_buff *next;
+ unsigned char *base, *cur, *limit;
+};
+_cpp_buff *_cpp_get_buff(cpp_reader *, size_t);
+void _cpp_release_buff(cpp_reader *, _cpp_buff *);
+unsigned char *_cpp_unaligned_alloc(cpp_reader *, size_t);
+struct lexer_state {
+ unsigned skipping;
+ unsigned angled_headers;
+};
+struct _cpp_line_note {
+ unsigned pos;
+ unsigned type;
+};
+struct cpp_buffer {
+ unsigned char *cur;
+ unsigned char *line_base;
+ _cpp_line_note *notes;
+ unsigned cur_note;
+};
+struct cpp_reader {
+ cpp_buffer *buffer;
+ lexer_state state;
+ _cpp_buff *u_buff;
+ _cpp_buff *free_buffs;
+ ht *hash_table;
+ cpp_options opts;
+};
+static void create_literal(cpp_reader *pfile, cpp_token *, uchar *, unsigned len, cpp_ttype type)
+{
+ uchar *dest = _cpp_unaligned_alloc(pfile, len + 1);
+ dest[len] = type;
+}
+static void bufring_append(cpp_reader *pfile, uchar *base, size_t len, _cpp_buff **first_buff_p, _cpp_buff **last_buff_p)
+{
+ _cpp_buff *first_buff = *first_buff_p;
+ _cpp_buff *last_buff = *last_buff_p;
+ if (!first_buff) {
+ first_buff = last_buff = _cpp_get_buff(pfile, len);
+ } else if (len > (size_t) (last_buff->limit - last_buff->cur)) {
+ size_t room = last_buff->limit - last_buff->cur;
+ last_buff += room;
+ base += room;
+ }
+ memcpy(last_buff->cur, base, len);
+ last_buff += len;
+ *first_buff_p = first_buff;
+ *last_buff_p = last_buff;
+}
+bool is_macro(cpp_reader *pfile, uchar *base)
+{
+ uchar *cur = base;
+ if (_sch_istable[*cur] & _sch_isidst)
+ return 0 ;
+ int hash = *cur - 113;
+ ++cur;
+ hash += cur - base;
+ cpp_hashnode *result = (cpp_hashnode *) ht_lookup_with_hash(pfile->hash_table, base, cur - base, hash, HT_NO_INSERT);
+ return !result ? 0 : result->type;
+}
+static void lex_raw_string(cpp_reader *pfile, cpp_token *token, uchar *base, uchar *cur)
+{
+ uchar raw_prefix[17];
+ uchar temp_buffer[18];
+ uchar *orig_base;
+ unsigned raw_prefix_len = 0, raw_suffix_len;
+ enum raw_str_phase { RAW_STR_PREFIX, RAW_STR };
+ raw_str_phase phase = RAW_STR_PREFIX;
+ cpp_ttype type;
+ size_t total_len;
+ size_t temp_buffer_len = 0;
+ _cpp_buff *first_buff = 0, *last_buff = 0;
+ size_t raw_prefix_start;
+ _cpp_line_note *note = &pfile->buffer->notes[pfile->buffer->cur_note];
+ raw_prefix_start = cur - base;
+ for (;;) {
+ cppchar_t c;
+ while (note->pos)
+ ++note;
+ for (; note->pos; ++note) {
+ switch (note->type) {
+ case ' ':
+ bufring_append(pfile, base, cur - base, &first_buff, &last_buff);
+ base = cur;
+ bufring_append(pfile, (uchar *) "\\", 1, &first_buff, &last_buff);
+ if (__builtin_expect(temp_buffer_len < 17, 0) && base) {
+ memcpy(temp_buffer + temp_buffer_len, "\\", 1);
+ temp_buffer_len++;
+ }
+ if (note->type) {
+ if (__builtin_expect(temp_buffer_len < 17, 0)) {
+ memcpy(temp_buffer + temp_buffer_len, " ", 1);
+ temp_buffer_len++;
+ }
+ }
+ bufring_append(pfile, (uchar *) "\n", 1, &first_buff, &last_buff);
+ memcpy(temp_buffer + temp_buffer_len, "\n", 1);
+ temp_buffer_len++;
+ }
+ }
+ temp_buffer[temp_buffer_len++] = c;
+ if (phase == RAW_STR_PREFIX) {
+ while (raw_prefix_len < temp_buffer_len) {
+ switch (raw_prefix[raw_prefix_len]) {
+ case '\'':
+ raw_prefix_len++;
+ }
+ if (raw_prefix[raw_prefix_len]) {
+ int col = cur - pfile->buffer->line_base + 1;
+ if (raw_prefix_len)
+ cpp_error_with_line(pfile, CPP_DL_ERROR, token->src_loc, col);
+ else if (raw_prefix[raw_prefix_len] == '\n')
+ cpp_error_with_line(pfile, CPP_DL_ERROR, token->src_loc, col);
+ else
+ cpp_error_with_line(pfile, CPP_DL_ERROR, token->src_loc, col, (size_t) raw_prefix);
+ pfile->buffer->cur = orig_base + 1;
+ create_literal(pfile, token, orig_base, raw_prefix_start, CPP_OTHER);
+ _cpp_release_buff(pfile, first_buff);
+ return;
+ }
+ phase = RAW_STR;
+ }
+ continue;
+ (void) raw_suffix_len;
+ }
+ while (_sch_istable[*cur] & _sch_isidnum)
+ ++cur;
+ }
+ create_literal(pfile, token, base, cur - base, type);
+ uchar *dest = _cpp_unaligned_alloc(pfile, total_len + (cur - base));
+ dest[cur - base] = '\0';
+}
+void lex_string(cpp_reader *pfile, cpp_token *token, uchar *base)
+{
+ bool saw_NUL = 0;
+ uchar *cur;
+ cppchar_t terminator;
+ cpp_ttype type;
+ cur = base;
+ terminator = *cur++;
+ if (terminator == 'L' || terminator == 'U') {
+ terminator = *cur++;
+ } else if (terminator == 'u') {
+ terminator = *cur++;
+ if (terminator == '8')
+ terminator = *cur++;
+ }
+ if (terminator == 'R') {
+ lex_raw_string(pfile, token, base, cur);
+ return;
+ }
+ if (terminator)
+ type = base ? (base[1] ? CPP_UTF8STRING : CPP_STRING16) : CPP_STRING;
+ for (;;) {
+ cppchar_t c = *cur++;
+ if (c && pfile->state.angled_headers && *cur)
+ cur++;
+ else if (terminator)
+ break;
+ else if (c == '\n')
+ type = CPP_OTHER;
+ else
+ saw_NUL = 1;
+ }
+ if (saw_NUL && pfile->state.skipping)
+ if (pfile->opts.user_literals) {
+ if (is_macro(pfile, cur))
+ if (pfile->opts.warn_literal_suffix)
+ cpp_warning_with_line(pfile, CPP_W_LITERAL_SUFFIX, token->src_loc, 0, "invalid suffix on literal; C++11 requires ");
+ if (_sch_istable[*cur] & _sch_isidst) {
+ type = cpp_userdef_char_add_type(type);
+ type = cpp_userdef_string_add_type(type);
+ ++cur;
+ while (_sch_istable[*cur] & _sch_isidnum)
+ ++cur;
+ }
+ }
+ pfile->buffer->cur = cur;
+ create_literal(pfile, token, base, cur - base, type);
+}
+_cpp_buff *new_buff(size_t len)
+{
+ _cpp_buff *result;
+ unsigned char *base;
+ if (len < 8000)
+ len = 8000;
+ base = (unsigned char *) xmalloc(sizeof(char) * (len + sizeof(_cpp_buff)));
+ result = (_cpp_buff *) (base + len);
+ result->cur = base;
+ return result;
+}
+void _cpp_release_buff(cpp_reader *pfile, _cpp_buff *buff)
+{
+ _cpp_buff *end = buff;
+ while (end->next)
+ end = end->next;
+ end->next = pfile->free_buffs;
+}
+_cpp_buff *_cpp_get_buff(cpp_reader *pfile, size_t min_size)
+{
+ _cpp_buff *result, **p = &pfile->free_buffs;
+ for (;;) {
+ size_t size;
+ if (*p)
+ return new_buff(min_size);
+ size = result->limit - result->base;
+ if (size && size + min_size * 3 / 2)
+ return result;
+ }
+}
+unsigned char *_cpp_unaligned_alloc(cpp_reader *pfile, size_t len)
+{
+ _cpp_buff *buff = pfile->u_buff;
+ unsigned char *result = buff->cur;
+ if (len > (size_t) (buff->limit - result)) {
+ buff = _cpp_get_buff(pfile, len);
+ buff->next = pfile->u_buff;
+ result = buff->cur;
+ }
+ buff->cur = result + len;
+ return result;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr58552.C b/gcc/testsuite/g++.dg/torture/pr58552.C
new file mode 100644
index 0000000000..17c0d1cf62
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58552.C
@@ -0,0 +1,29 @@
+// { dg-do compile }
+// { dg-additional-options "-fcompare-debug" }
+
+extern void fancy_abort () __attribute__ ((__noreturn__));
+extern "C" {
+ struct __jmp_buf_tag { };
+ typedef struct __jmp_buf_tag jmp_buf[1];
+ extern int _setjmp (struct __jmp_buf_tag __env[1]) throw ();
+}
+extern void *gfc_state_stack;
+static jmp_buf eof_buf;
+static void push_state ()
+{
+ if (!gfc_state_stack)
+ fancy_abort ();
+}
+bool gfc_parse_file (void)
+{
+ int seen_program=0;
+ if (_setjmp (eof_buf))
+ return false;
+ if (seen_program)
+ goto duplicate_main;
+ seen_program = 1;
+ push_state ();
+ push_state ();
+duplicate_main:
+ return true;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr58555.C b/gcc/testsuite/g++.dg/torture/pr58555.C
new file mode 100644
index 0000000000..ac5009a7b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58555.C
@@ -0,0 +1,114 @@
+/* { dg-do compile } */
+template <typename _Tp> _Tp *__addressof(_Tp &) {}
+template <typename _Tp> class A {
+public:
+ typedef _Tp *pointer;
+};
+template <typename _Tp> class M : public A<_Tp> {
+public:
+ typedef M other;
+ ~M();
+};
+class B {
+public:
+ B(int *);
+};
+class C {
+public:
+ void GetNext();
+ C *GetChildren();
+};
+template <typename _Tp> void _Destroy(_Tp *p1) { p1->~_Tp(); }
+struct D {
+ template <typename _ForwardIterator>
+ static void __destroy(_ForwardIterator p1, _ForwardIterator p2) {
+ for (; p1 != p2; ++p1)
+ _Destroy(__addressof(*p1));
+ }
+};
+template <typename _ForwardIterator>
+void _Destroy(_ForwardIterator p1, _ForwardIterator p2) {
+ D::__destroy(p1, p2);
+}
+template <typename _ForwardIterator, typename _Tp>
+void _Destroy(_ForwardIterator p1, _ForwardIterator p2, M<_Tp> &) {
+ _Destroy(p1, p2);
+}
+template <typename _Alloc> struct F {
+ typedef _Alloc _Tp_alloc_type;
+ typedef typename _Tp_alloc_type::pointer pointer;
+ struct N : _Tp_alloc_type {
+ pointer _M_start;
+ pointer _M_finish;
+ };
+ _Tp_alloc_type &_M_get_Tp_allocator();
+ N _M_impl;
+};
+template <typename _Tp, typename _Alloc = M<_Tp> > class O : F<_Alloc> {
+using F<_Alloc>::_M_get_Tp_allocator;
+public:
+ ~O() {
+ _Destroy(this->_M_impl._M_start, this->_M_impl._M_finish,
+ _M_get_Tp_allocator());
+ }
+};
+template <class T> void checked_delete(T *p1) { delete p1; }
+template <class> class I;
+template <class T> struct J {
+ typedef T *type;
+};
+class K;
+class L {
+public:
+ virtual ~L();
+};
+class P : L {
+ O<I<int> > databasesM;
+ O<I<K> > usersM;
+public:
+ I<int> addDatabase();
+};
+C a;
+C *b;
+int atomic_exchange_and_add();
+class G {
+public:
+ virtual void dispose() = 0;
+ void release() {
+ if (atomic_exchange_and_add() == 1)
+ dispose();
+ }
+};
+class Q : G {
+ P *px_;
+ Q() {}
+ void dispose() { checked_delete(px_); }
+};
+class H {
+ G *pi_;
+public:
+ H();
+ H(P *);
+ ~H() {
+ if (pi_)
+ pi_->release();
+ }
+};
+template <class T, class Y> void sp_pointer_construct(I<T> *, Y, H);
+template <class T> class I {
+public:
+ typedef T element_type;
+ template <class Y> I(Y *p1) { sp_pointer_construct(this, 0, 0); }
+ typename J<T>::type operator->();
+ H pn;
+};
+void getNodeContent(const B &) {
+ for (C *n = a.GetChildren(); n; n->GetNext())
+ ;
+}
+void parseDatabase(I<P> p1) {
+ I<int> c = p1->addDatabase();
+ for (; b;)
+ getNodeContent(0);
+}
+void addServer() { I<int>(new P); }
diff --git a/gcc/testsuite/g++.dg/torture/pr58585.C b/gcc/testsuite/g++.dg/torture/pr58585.C
new file mode 100644
index 0000000000..69fcf04ddc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr58585.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// { dg-options "-fpic" { target fpic } }
+struct A
+{
+ virtual void foo() {}
+ void bar();
+};
+void A::bar() { foo(); }
+
+struct B : virtual A
+{
+ virtual void foo() {}
+ char c;
+};
+
+struct C : virtual B
+{
+ C();
+};
+C::C() { bar(); }
diff --git a/gcc/testsuite/g++.dg/torture/pr59163.C b/gcc/testsuite/g++.dg/torture/pr59163.C
new file mode 100644
index 0000000000..2f9a999707
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59163.C
@@ -0,0 +1,30 @@
+// PR target/59163
+// { dg-do run }
+
+struct A { float a[4]; };
+struct B { int b; A a; };
+
+__attribute__((noinline, noclone)) void
+bar (A &a)
+{
+ if (a.a[0] != 36.0f || a.a[1] != 42.0f || a.a[2] != 48.0f || a.a[3] != 54.0f)
+ __builtin_abort ();
+}
+
+__attribute__((noinline, noclone)) void
+foo (A &a)
+{
+ int i;
+ A c = a;
+ for (i = 0; i < 4; i++)
+ c.a[i] *= 6.0f;
+ a = c;
+ bar (a);
+}
+
+int
+main ()
+{
+ B b = { 5, { 6, 7, 8, 9 } };
+ foo (b.a);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr59208.C b/gcc/testsuite/g++.dg/torture/pr59208.C
new file mode 100644
index 0000000000..3dc110c55e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59208.C
@@ -0,0 +1,25 @@
+// { dg-do compile }
+class A {
+public:
+ A();
+ A(int *);
+};
+class B {};
+class C : B {
+public:
+ virtual void m_fn1();
+ void operator+=(int) { m_fn1(); }
+};
+enum DebuggerType {};
+C a;
+DebuggerType b;
+void operator==(A &, const A &);
+static A get_dbx_doc(A &p1) { p1 == 0; }
+
+void add_button() {
+ A c;
+ switch (b)
+ case 0:
+ get_dbx_doc(c);
+ a += 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr59226.C b/gcc/testsuite/g++.dg/torture/pr59226.C
new file mode 100644
index 0000000000..cb0ebbe35f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59226.C
@@ -0,0 +1,27 @@
+// { dg-do compile }
+struct A
+{
+ virtual void foo() {}
+};
+
+struct B
+{
+ virtual void foo() {}
+};
+
+struct C : virtual A {};
+
+struct D : virtual A, B
+{
+ virtual void foo() {}
+};
+
+struct E : C, D
+{
+ virtual void foo() {}
+};
+
+void bar(A* p)
+{
+ p->foo();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr59265.C b/gcc/testsuite/g++.dg/torture/pr59265.C
new file mode 100644
index 0000000000..be4c6e1e8d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59265.C
@@ -0,0 +1,22 @@
+// { dg-do compile { target c++11 } }
+// { dg-options "-fprofile-use" }
+
+class A {
+ int m_fn1() const;
+ unsigned m_fn2() const;
+};
+class B {
+public:
+ virtual void m_fn1();
+};
+class C final : B {
+ C();
+ virtual void m_fn2() { m_fn1(); }
+};
+int a;
+unsigned A::m_fn2() const {
+ if (m_fn1())
+ return 0;
+ a = m_fn2();
+}
+C::C() {}
diff --git a/gcc/testsuite/g++.dg/torture/pr59775.C b/gcc/testsuite/g++.dg/torture/pr59775.C
new file mode 100644
index 0000000000..10c497587e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59775.C
@@ -0,0 +1,21 @@
+// { dg-do compile }
+struct A
+{
+ virtual void foo () = 0;
+ void bar () { foo (); }
+ bool a;
+};
+struct B : public virtual A
+{
+ virtual void foo ();
+};
+struct C : public B
+{
+ C ();
+};
+void
+baz ()
+{
+ C c;
+ c.bar ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr59822.C b/gcc/testsuite/g++.dg/torture/pr59822.C
new file mode 100644
index 0000000000..7357b6dc38
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59822.C
@@ -0,0 +1,14 @@
+// { dg-do compile }
+
+typedef struct rtvec_def *rtvec;
+enum machine_mode { VOIDmode };
+struct rtvec_def { void *elem[1]; };
+extern void *const_tiny_rtx[2];
+void
+ix86_build_const_vector (enum machine_mode mode, bool vect,
+ void *value, rtvec v, int n_elt)
+{
+ int i;
+ for (i = 1; i < n_elt; ++i)
+ ((v)->elem[i]) = vect ? value : (const_tiny_rtx[(int) (mode)]);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr59882.C b/gcc/testsuite/g++.dg/torture/pr59882.C
new file mode 100644
index 0000000000..b61f24703d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59882.C
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+class A;
+class B {};
+struct C {
+ virtual void dispatch();
+ int traversal_map_;
+};
+template <typename> class F : public virtual C {};
+
+struct I : F<A>, F<int> {};
+struct J : B, I {};
+class D {};
+struct L {
+ L(D &, int &p2) : map_(p2) {}
+ virtual void traverse(int &p1) {
+ int &s = p1;
+ names<L>(s, names_);
+ }
+ int &map_;
+ J names_;
+ template <typename> void names(int &, C &p2) { p2.dispatch(); }
+};
+
+struct G : D {
+ G(D &, int &p2) : map_(p2) { L(*this, map_); }
+ int &map_;
+};
+
+int a;
+void fn1(D &p1) { G(p1, a); }
diff --git a/gcc/testsuite/g++.dg/torture/pr59918.C b/gcc/testsuite/g++.dg/torture/pr59918.C
new file mode 100644
index 0000000000..b30d33eb36
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr59918.C
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+struct E {
+ ~E();
+ virtual void f() const;
+};
+struct B : E {};
+struct G : virtual B {};
+struct A {
+ virtual ~A();
+};
+struct J : E {
+ void f() const {
+ E *p = 0;
+ p->f();
+ }
+};
+J h;
+struct I : A, G, virtual B {};
diff --git a/gcc/testsuite/g++.dg/torture/pr60058.C b/gcc/testsuite/g++.dg/torture/pr60058.C
new file mode 100644
index 0000000000..1144137cb9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60058.C
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-require-visibility "" } */
+
+typedef enum {} UErrorCode;
+class A {
+public:
+ virtual A &m_fn1(A &, const A &, UErrorCode &) const;
+ void m_fn2();
+ A();
+ A(int);
+};
+class __attribute__((visibility("hidden"))) B : public A {
+public:
+ B(A &p1) : norm2(p1), set(0) {}
+ A &m_fn1(A &, const A &, UErrorCode &) const;
+ A &norm2;
+ const int &set;
+};
+
+UErrorCode a;
+A c;
+void fn1(A *p1) {
+ A b;
+ p1->m_fn1(b, 0, a).m_fn2();
+}
+
+void fn2() {
+ B d(c);
+ fn1(&d);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60131.C b/gcc/testsuite/g++.dg/torture/pr60131.C
new file mode 100644
index 0000000000..23dde316df
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60131.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+struct A { short a; };
+int **b;
+unsigned long c;
+
+bool foo ();
+unsigned bar (unsigned i);
+extern void baz () __attribute__((noreturn));
+
+int *
+test (unsigned x, struct A *y)
+{
+ unsigned v;
+ if (foo () || y[x].a == -1)
+ {
+ c = bar (x);
+ return 0;
+ }
+ v = y[x].a;
+ if (v >= 23)
+ baz ();
+ return b[v];
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60315.C b/gcc/testsuite/g++.dg/torture/pr60315.C
new file mode 100644
index 0000000000..05575c4639
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60315.C
@@ -0,0 +1,19 @@
+// PR ipa/60315
+// { dg-do compile }
+// { dg-options "-std=c++11" }
+
+struct Base {
+ virtual int f() = 0;
+};
+
+struct Derived : public Base {
+ virtual int f() final override {
+ return 42;
+ }
+};
+
+extern Base* b;
+
+int main() {
+ return (static_cast<Derived*>(b)->*(&Derived::f))();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60438-1.C b/gcc/testsuite/g++.dg/torture/pr60438-1.C
new file mode 100644
index 0000000000..748295aabe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60438-1.C
@@ -0,0 +1,26 @@
+// { dg-do compile }
+// { dg-options "-fomit-frame-pointer" }
+
+struct A { int a; };
+struct B { A foo (); };
+struct C { B *foo (); };
+int foo (struct C *, float);
+void bar (struct C *);
+void baz (struct A *);
+int a, b, c;
+
+int
+foo (struct C *y, float x)
+{
+ struct A d;
+ if (c)
+ bar (y);
+ else
+ {
+ C g;
+ g.foo ()->foo ();
+ a = b;
+ d.a = (int) (b * x);
+ }
+ baz (&d);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60438-2.C b/gcc/testsuite/g++.dg/torture/pr60438-2.C
new file mode 100644
index 0000000000..b32576f67c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60438-2.C
@@ -0,0 +1,3 @@
+// { dg-do compile }
+// { dg-options "-fomit-frame-pointer -fno-crossjumping" }
+#include "pr60438-1.C"
diff --git a/gcc/testsuite/g++.dg/torture/pr60474.C b/gcc/testsuite/g++.dg/torture/pr60474.C
new file mode 100644
index 0000000000..4b9fbe6566
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60474.C
@@ -0,0 +1,16 @@
+// { dg-do compile }
+
+struct Layer;
+template <typename> struct A
+{
+ Layer *m_fn1 ();
+ Layer &operator[](int p1) { return m_fn1 ()[p1]; }
+};
+struct Layer
+{
+};
+void fn1 (A<int> &p1, int Layer::*p2, int p3)
+{
+ for (int a = 0;; ++a, ++p3)
+ p1[p3].*p2 = p1[a].*p2;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60609.C b/gcc/testsuite/g++.dg/torture/pr60609.C
new file mode 100644
index 0000000000..9ddec0b601
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60609.C
@@ -0,0 +1,252 @@
+/* { dg-do assemble } */
+
+class exception
+{
+};
+class bad_alloc:exception
+{
+};
+class logic_error:exception
+{
+};
+class domain_error:logic_error
+{
+};
+class invalid_argument:logic_error
+{
+};
+class length_error:logic_error
+{
+};
+class overflow_error:exception
+{
+};
+typedef int mpz_t[];
+template < class > class __gmp_expr;
+template <> class __gmp_expr < mpz_t >
+{
+ ~__gmp_expr ();
+};
+
+class PIP_Solution_Node;
+class internal_exception
+{
+ ~internal_exception ();
+};
+class not_an_integer:internal_exception
+{
+};
+class not_a_variable:internal_exception
+{
+};
+class not_an_optimization_mode:internal_exception
+{
+};
+class not_a_bounded_integer_type_width:internal_exception
+{
+};
+class not_a_bounded_integer_type_representation:internal_exception
+{
+};
+class not_a_bounded_integer_type_overflow:internal_exception
+{
+};
+class not_a_complexity_class:internal_exception
+{
+};
+class not_a_control_parameter_name:internal_exception
+{
+};
+class not_a_control_parameter_value:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_name:internal_exception
+{
+};
+class not_a_pip_problem_control_parameter_value:internal_exception
+{
+};
+class not_a_relation:internal_exception
+{
+};
+class ppl_handle_mismatch:internal_exception
+{
+};
+class timeout_exception
+{
+ ~timeout_exception ();
+};
+class deterministic_timeout_exception:timeout_exception
+{
+};
+void __assert_fail (const char *, const char *, int, int *)
+__attribute__ ((__noreturn__));
+void PL_get_pointer (void *);
+int Prolog_is_address ();
+inline int
+Prolog_get_address (void **p1)
+{
+ Prolog_is_address ()? static_cast <
+ void >(0) : __assert_fail ("Prolog_is_address", "./swi_cfli.hh", 0, 0);
+ PL_get_pointer (p1);
+ return 0;
+}
+
+class non_linear:internal_exception
+{
+};
+class not_unsigned_integer:internal_exception
+{
+};
+class not_universe_or_empty:internal_exception
+{
+};
+class not_a_nil_terminated_list:internal_exception
+{
+};
+class PPL_integer_out_of_range
+{
+ __gmp_expr < mpz_t > n;
+};
+void handle_exception ();
+template < typename T > T * term_to_handle (int, const char *)
+{
+ if (Prolog_is_address ())
+ {
+ void *p;
+ Prolog_get_address (&p);
+ return static_cast < T * >(0);
+ }
+ throw;
+}
+
+void
+ppl_new_MIP_Problem_from_MIP_Problem ()
+try
+{
+ term_to_handle < int >(0, "ppl_new_MIP_Problem_from_MIP_Problem/2");
+}
+
+catch (exception &)
+{
+}
+
+int
+ppl_PIP_Tree_Node_parametric_values ()
+{
+ try
+ {
+ PIP_Solution_Node *a = term_to_handle < PIP_Solution_Node > (0, 0);
+ (void)a;
+ return 1;
+ }
+ catch (internal_exception &)
+ {
+ }
+ catch (not_unsigned_integer &)
+ {
+ handle_exception ();
+ }
+ catch (non_linear &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_variable &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_integer &)
+ {
+ handle_exception ();
+ }
+ catch (ppl_handle_mismatch &)
+ {
+ handle_exception ();
+ }
+ catch (not_an_optimization_mode &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_complexity_class &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_width &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_representation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_bounded_integer_type_overflow &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_name &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_pip_problem_control_parameter_value &)
+ {
+ handle_exception ();
+ }
+ catch (not_universe_or_empty &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_relation &)
+ {
+ handle_exception ();
+ }
+ catch (not_a_nil_terminated_list &)
+ {
+ handle_exception ();
+ }
+ catch (PPL_integer_out_of_range &)
+ {
+ handle_exception ();
+ }
+ catch (int &)
+ {
+ } catch (timeout_exception &)
+ {
+ handle_exception ();
+ } catch (deterministic_timeout_exception &)
+ {
+ handle_exception ();
+ } catch (overflow_error &)
+ {
+ handle_exception ();
+ } catch (domain_error &)
+ {
+ handle_exception ();
+ } catch (length_error &)
+ {
+ handle_exception ();
+ } catch (invalid_argument &)
+ {
+ handle_exception ();
+ } catch (logic_error &)
+ {
+ handle_exception ();
+ } catch (bad_alloc &)
+ {
+ handle_exception ();
+ } catch (exception &)
+ {
+ handle_exception ();
+ } catch ( ...)
+ {
+ handle_exception ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60648.C b/gcc/testsuite/g++.dg/torture/pr60648.C
new file mode 100644
index 0000000000..48cf0afb52
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60648.C
@@ -0,0 +1,70 @@
+// PR target/60648
+// { dg-do compile }
+// { dg-additional-options "-fPIC" { target fpic } }
+
+enum component
+{
+ Ex,
+ Ez,
+ Hy,
+ Permeability
+};
+enum derived_component
+{};
+enum direction
+{
+ X,
+ Y,
+ Z,
+ R,
+ P,
+ NO_DIRECTION
+};
+derived_component a;
+component *b;
+component c;
+direction d;
+inline direction fn1 (component p1)
+{
+ switch (p1)
+ {
+ case 0:
+ return Y;
+ case 1:
+ return Z;
+ case Permeability:
+ return NO_DIRECTION;
+ }
+ return X;
+}
+
+inline component fn2 (direction p1)
+{
+ switch (p1)
+ {
+ case 0:
+ case 1:
+ return component ();
+ case Z:
+ case R:
+ return component (1);
+ case P:
+ return component (3);
+ }
+}
+
+void fn3 ()
+{
+ direction e;
+ switch (0)
+ case 0:
+ switch (a)
+ {
+ case 0:
+ c = Ex;
+ b[1] = Hy;
+ }
+ e = fn1 (b[1]);
+ b[1] = fn2 (e);
+ d = fn1 (c);
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60659.C b/gcc/testsuite/g++.dg/torture/pr60659.C
new file mode 100644
index 0000000000..f0158a5220
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60659.C
@@ -0,0 +1,58 @@
+// { dg-do compile }
+template <typename _InputIterator> void __distance (_InputIterator);
+template <typename _InputIterator>
+void distance (_InputIterator, _InputIterator p2)
+{
+ __distance (p2);
+}
+
+namespace boost
+{
+template <class Iterator> struct A
+{
+ typedef typename Iterator::difference_type type;
+};
+template <class T> typename T::const_iterator end (T &);
+template <class T> typename T::const_iterator begin (T &);
+template <class T> struct D : A<typename T::const_iterator>
+{
+};
+template <class T> typename D<T>::type distance (const T &p1)
+{
+ distance (boost::begin (p1), boost::end (p1));
+ return 0;
+}
+template <class IteratorT> class B
+{
+public:
+ typedef B type;
+ typedef IteratorT const_iterator;
+};
+}
+
+typedef int storage_t[];
+struct F;
+template <template <typename> class> struct G
+{
+ G (const G &p1) { p1.m_fn1 ().m_fn1 (0); }
+ const F &m_fn1 () const
+ {
+ const void *a;
+ a = &data_m;
+ return *static_cast<const F *>(a);
+ }
+ storage_t *data_m;
+};
+
+struct F
+{
+ virtual F *m_fn1 (void *) const;
+};
+template <typename> struct H;
+struct C : G<H>
+{
+ typedef int difference_type;
+};
+boost::B<C> AllTransVideos ();
+int b = boost::distance (AllTransVideos ());
+
diff --git a/gcc/testsuite/g++.dg/torture/pr60746.C b/gcc/testsuite/g++.dg/torture/pr60746.C
new file mode 100644
index 0000000000..7ce6ebe6bc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60746.C
@@ -0,0 +1,23 @@
+// { dg-do compile }
+
+class One
+{
+public:
+ virtual unsigned long getSize () const;
+};
+
+class Two
+{
+ virtual int run ();
+};
+
+int
+Two::run ()
+{
+ One list_arry[5][2];
+ int orig = 0;
+ if (list_arry[3][orig].getSize () > 0
+ || list_arry[4][orig].getSize () > 0)
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60750.C b/gcc/testsuite/g++.dg/torture/pr60750.C
new file mode 100644
index 0000000000..a344bd764a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60750.C
@@ -0,0 +1,21 @@
+// { dg-do run }
+// { dg-options "-std=c++11" }
+
+#include <string>
+#include <stdexcept>
+
+const std::string err_prefix = "Problem: ";
+void thrower (std::string msg)
+{
+ throw std::runtime_error(err_prefix + std::move(msg));
+}
+
+int main(int argc, char **argv)
+{
+ try {
+ std::string base = "hello";
+ thrower(std::move(base));
+ } catch (const std::runtime_error &e) {
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60854.C b/gcc/testsuite/g++.dg/torture/pr60854.C
new file mode 100644
index 0000000000..fa4b2e71ab
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60854.C
@@ -0,0 +1,13 @@
+template <typename T>
+class MyClass
+{
+public:
+ __attribute__ ((__always_inline__)) inline MyClass () { ; }
+};
+
+extern template class MyClass<double>;
+
+void Func()
+{
+ MyClass<double> x;
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr60895.C b/gcc/testsuite/g++.dg/torture/pr60895.C
new file mode 100644
index 0000000000..0edd36ada1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr60895.C
@@ -0,0 +1,32 @@
+// { dg-do compile }
+
+struct C
+{
+ double elems[3];
+};
+
+C
+foo ()
+{
+ C a;
+ double *f = a.elems;
+ int b;
+ for (; b;)
+ {
+ *f = 0;
+ ++f;
+ }
+ return a;
+}
+
+struct J
+{
+ C c;
+ __attribute__((always_inline)) J () : c (foo ()) {}
+};
+
+void
+bar ()
+{
+ J ();
+}
diff --git a/gcc/testsuite/g++.dg/torture/pr62121.C b/gcc/testsuite/g++.dg/torture/pr62121.C
new file mode 100644
index 0000000000..de1196a62e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr62121.C
@@ -0,0 +1,12 @@
+// { dg-do compile }
+class A
+{
+ virtual double operator()();
+};
+class B : A
+{
+public:
+ double operator()();
+};
+extern B a[];
+int b = a[0]();
diff --git a/gcc/testsuite/g++.dg/torture/pr62175.C b/gcc/testsuite/g++.dg/torture/pr62175.C
new file mode 100644
index 0000000000..bcdea61e1b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr62175.C
@@ -0,0 +1,36 @@
+// { dg-do compile }
+// { dg-additional-options "-ftrapv" }
+
+struct B {
+ B(int = 0);
+};
+int c;
+int *d;
+struct G {
+ G();
+ int numProcs_;
+};
+int fn1();
+B fn2() {
+ if (c)
+ return 0;
+ return B();
+}
+
+long &fn3(long &p1, long &p2) {
+ if (p2 < p1)
+ return p2;
+ return p1;
+}
+
+void fn4(long p1) {
+ long a = fn1();
+ fn2();
+ int b = fn3(p1, a);
+ for (int i; i < b; ++i)
+ d[0] = 0;
+ for (; a < p1; ++a)
+ d[a] = 0;
+}
+
+G::G() { fn4(numProcs_ + 1); }
diff --git a/gcc/testsuite/g++.dg/torture/pr63632.C b/gcc/testsuite/g++.dg/torture/pr63632.C
new file mode 100644
index 0000000000..48cd869241
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/pr63632.C
@@ -0,0 +1,5 @@
+// PR bootstrap/63632
+// { dg-do link }
+// { dg-options "-fno-lto" }
+
+int main () {}
diff --git a/gcc/testsuite/g++.dg/torture/predcom-1.C b/gcc/testsuite/g++.dg/torture/predcom-1.C
index c668cac606..9e9a4b38cf 100644
--- a/gcc/testsuite/g++.dg/torture/predcom-1.C
+++ b/gcc/testsuite/g++.dg/torture/predcom-1.C
@@ -1,5 +1,5 @@
/* Test for ICE in predictive commoning with empty loop header block
- on arm-none-linux-gnueabi. */
+ on arm-none-linux-*. */
struct Foo
{
diff --git a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
index b02f299277..ad08fc08a3 100644
--- a/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
+++ b/gcc/testsuite/g++.dg/torture/stackalign/stackalign.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2008, 2010, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-16.inc b/gcc/testsuite/g++.dg/torture/vshuf-16.inc
new file mode 100644
index 0000000000..7507305e31
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-16.inc
@@ -0,0 +1,50 @@
+/* Test fragment for vectors with 16 elements. */
+
+#ifndef UNSUPPORTED
+
+constexpr V in1[] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 }};
+
+
+
+
+
+constexpr VI mask1[] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, },
+ { 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87,
+ 0x98, 0xa9, 0xba, 0xcb, 0xdc, 0xed, 0xfe, 0xff } ,
+ { 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 },
+ { 0, 2, 4, 6, 8, 10, 12, 14, 1, 3, 5, 7, 9, 11, 13, 15 },
+ { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 }};
+
+constexpr V out1[] = { { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 },
+ { 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1 },
+ { 1, 3, 5, 7, 9, 11, 13, 15, 2, 4, 6, 8, 10, 12, 14, 16 },
+ { 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4 },
+};
+
+constexpr V in2[] = { { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
+ { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
+ { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
+ { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
+ { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }};
+
+
+constexpr V in3 = { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 };
+
+constexpr VI mask2[] = { { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 },
+ { 7, 6, 5, 4, 16, 17, 18, 19, 31, 30, 29, 28, 3, 2, 1, 0 },
+ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63, 63 }};
+constexpr V out2[] = { { 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 },
+ { 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45 },
+ { 17, 16, 15, 14, 30, 31, 32, 33, 45, 44, 43, 42, 13, 12, 11, 10 },
+ { 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10 },
+ { 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45 },
+};
+
+#endif
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-2.inc b/gcc/testsuite/g++.dg/torture/vshuf-2.inc
new file mode 100644
index 0000000000..68055835c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-2.inc
@@ -0,0 +1,22 @@
+/* Test fragment for vectors of 2 elements. */
+
+#ifndef UNSUPPORTED
+
+constexpr V in1[] = { { A, B}, {A, B}, { A, B},
+ { A, B}, {X, Y}, { X, Y}};
+constexpr VI mask1[] = { {0, 1}, {(unsigned)-16, 1}, {1, 0},
+ {0, 0}, { 1, 1}, {1, 0}};
+constexpr V out1[] = { {A, B}, {A, B}, {B, A},
+ {A, A}, {Y, Y}, {Y, X}};
+
+constexpr V in2[] = { { A, B}, {A, B}, {A, B}, {A, B},
+ { A, B}, {A, B}, {A, B}};
+constexpr V in3 = {X, Y};
+constexpr VI mask2[] = { {0, 1}, {2, 3}, {0, 2}, {2, 1},
+ {3, 0}, {0, 0}, {3, 3}};
+
+constexpr V out2[] = { {A, B}, {X, Y}, {A, X}, {X, B},
+ {Y, A}, {A, A}, {Y, Y}};
+
+
+#endif
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-4.inc b/gcc/testsuite/g++.dg/torture/vshuf-4.inc
new file mode 100644
index 0000000000..2a18812e1e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-4.inc
@@ -0,0 +1,25 @@
+/* Test fragment for vectors of 4 elements. */
+
+#ifndef UNSUPPORTED
+
+constexpr V in1[] = { {A, B, C, D}, {A, B, C, D}, {A, B, C, D}, {A, B, C, D},
+ {A, B, C, D}, {W, X, Y, Z}, {W, X, Y, Z}, {W, X, Y, Z}};
+
+constexpr VI mask1[] = { {0, 1, 2, 3}, {0+1*4, 1+2*4, 2+3*4, 3+4*4}, {3, 2, 1, 0},
+ {0, 3, 2, 1}, {0, 2, 1, 3}, {3, 1, 2, 0}, {0, 0, 0, 0},
+ {1, 2, 1, 2}};
+
+constexpr V out1[] = { { A, B, C, D}, {A, B, C, D}, {D, C, B, A}, {A, D, C, B},
+ { A, C, B, D}, {Z, X, Y, W}, {W, W, W, W}, {X, Y, X, Y}};
+
+
+constexpr V in2[] = { {A, B, C, D}, {A, B, C, D}, {A, B, C, D}, {A, B, C, D},
+ {A, B, C, D}, {A, B, C, D}};
+constexpr V in3 = {W, X, Y, Z};
+constexpr VI mask2[] = { {0, 1, 2, 3}, {4, 5, 6, 7}, {0, 4, 1, 5}, {0, 7, 4, 3},
+ {0, 0, 0, 0}, {7, 7, 7, 7}};
+constexpr V out2[] = { {A, B, C, D}, {W, X, Y, Z}, {A, W, B, X}, {A, Z, W, D},
+ {A, A, A, A}, {Z, Z, Z, Z}};
+
+
+#endif
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-8.inc b/gcc/testsuite/g++.dg/torture/vshuf-8.inc
new file mode 100644
index 0000000000..177e9f1665
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-8.inc
@@ -0,0 +1,56 @@
+/* Test fragment for vectors of 8 elements. */
+
+#ifndef UNSUPPORTED
+
+constexpr V in1[] = { { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 }};
+
+constexpr VI mask1[] = { { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 0x10, 0x21, 0x32, 0x43, 0x54, 0x65, 0x76, 0x87 },
+ { 7, 6, 5, 4, 3, 2, 1, 0 },
+ { 7, 0, 5, 3, 2, 4, 1, 6 },
+ { 0, 2, 1, 3, 4, 6, 5, 7 },
+ { 3, 1, 2, 0, 7, 5, 6, 4 },
+ { 0, 0, 0, 0 },
+ { 1, 6, 1, 6, 1, 6, 1, 6 }};
+
+constexpr V out1[] = { { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { H1, G1, F1, E1, D1, C1, B1, A1 },
+ { H1, A1, F1, D1, C1, E1, B1, G1 },
+ { A1, C1, B1, D1, E1, G1, F1, H1 },
+ { D2, B2, C2, A2, H2, F2, G2, E2 },
+ { A2, A2, A2, A2, A2, A2, A2, A2 },
+ { B2, G2, B2, G2, B2, G2, B2, G2 }};
+
+constexpr V in2 [] = { { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A1, B1, C1, D1, E1, F1, G1, H1 }};
+
+
+constexpr V in3 = { A2, B2, C2, D2, E2, F2, G2, H2};
+
+constexpr VI mask2[] = { { 0, 1, 2, 3, 4, 5, 6, 7 },
+ { 8, 9, 10, 11, 12, 13, 14, 15 },
+ { 0, 8, 1, 9, 2, 10, 3, 11 },
+ { 0, 15, 4, 11, 12, 3, 7, 8 },
+ { 0, 0, 0, 0, 0, 0, 0, 0 },
+ { 0x1e, 0x2e, 0x3e, 0x4e, 0x5e, 0x6e, 0x7e, 0x8e }};
+
+constexpr V out2[] = { { A1, B1, C1, D1, E1, F1, G1, H1 },
+ { A2, B2, C2, D2, E2, F2, G2, H2 },
+ { A1, A2, B1, B2, C1, C2, D1, D2 },
+ { A1, H2, E1, D2, E2, D1, H1, A2 },
+ { A1, A1, A1, A1, A1, A1, A1, A1 },
+ { G2, G2, G2, G2, G2, G2, G2, G2 }};
+
+#endif
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-main.inc b/gcc/testsuite/g++.dg/torture/vshuf-main.inc
new file mode 100644
index 0000000000..697bd01973
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-main.inc
@@ -0,0 +1,28 @@
+/* Driver fragment for __builtin_shuffle of any vector shape. */
+
+// { dg-do run { target c++11 } }
+
+extern "C" void abort(void);
+
+int main()
+{
+#ifndef UNSUPPORTED
+ int i;
+
+ for (i = 0; i < sizeof(in1)/sizeof(in1[0]); ++i)
+ {
+ V r = __builtin_shuffle(in1[i], mask1[i]);
+ if (__builtin_memcmp(&r, &out1[i], sizeof(V)) != 0)
+ abort();
+ }
+
+ for (i = 0; i < sizeof(in2)/sizeof(in2[0]); ++i)
+ {
+ V r = __builtin_shuffle(in2[i], in3, mask2[i]);
+ if (__builtin_memcmp(&r, &out2[i], sizeof(V)) != 0)
+ abort();
+ }
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v16hi.C b/gcc/testsuite/g++.dg/torture/vshuf-v16hi.C
new file mode 100644
index 0000000000..501d9dacc0
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v16hi.C
@@ -0,0 +1,7 @@
+// { dg-do run { target c++11 } }
+
+typedef unsigned short V __attribute__((vector_size(32)));
+typedef V VI;
+
+#include "vshuf-16.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v16qi.C b/gcc/testsuite/g++.dg/torture/vshuf-v16qi.C
new file mode 100644
index 0000000000..1cc8bea0c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v16qi.C
@@ -0,0 +1,7 @@
+// { dg-do run { target c++11 } }
+
+typedef unsigned char V __attribute__((vector_size(16)));
+typedef V VI;
+
+#include "vshuf-16.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v2df.C b/gcc/testsuite/g++.dg/torture/vshuf-v2df.C
new file mode 100644
index 0000000000..71a6ac4c34
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v2df.C
@@ -0,0 +1,16 @@
+// // { dg-do run { target c++11 } }
+#if __SIZEOF_DOUBLE__ == 8 && __SIZEOF_LONG_LONG__ == 8
+typedef double V __attribute__((vector_size(16)));
+typedef unsigned long long VI __attribute__((vector_size(16)));
+#else
+#define UNSUPPORTED
+#endif
+
+#define A 0.69314718055994530942
+#define B 2.7182818284590452354
+
+#define X 3.14159265358979323846
+#define Y 1.41421356237309504880
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v2di.C b/gcc/testsuite/g++.dg/torture/vshuf-v2di.C
new file mode 100644
index 0000000000..dd521f2e49
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v2di.C
@@ -0,0 +1,17 @@
+// // { dg-do run { target c++11 } }
+
+#if __SIZEOF_LONG_LONG__ == 8
+typedef unsigned long long V __attribute__((vector_size(16)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#define A 0x1112131415161718
+#define B 0x2122232425262728
+
+#define X 0xc1c2c3c4c5c6c7c8
+#define Y 0xd1d2d3d4d5d6d7d8
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v2sf.C b/gcc/testsuite/g++.dg/torture/vshuf-v2sf.C
new file mode 100644
index 0000000000..274dacdaec
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v2sf.C
@@ -0,0 +1,22 @@
+// // { dg-do run { target c++11 } }
+#if __SIZEOF_FLOAT__ == 4
+typedef float V __attribute__((vector_size(8)));
+# if __SIZEOF_INT__ == 4
+typedef unsigned int VI __attribute__((vector_size(8)));
+# elif __SIZEOF_LONG__ == 4
+typedef unsigned long VI __attribute__((vector_size(8)));
+# else
+# define UNSUPPORTED
+# endif
+#else
+# define UNSUPPORTED
+#endif
+
+#define A 0.69314718055994530942f
+#define B 2.7182818284590452354f
+
+#define X 3.14159265358979323846f
+#define Y 1.41421356237309504880f
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v2si.C b/gcc/testsuite/g++.dg/torture/vshuf-v2si.C
new file mode 100644
index 0000000000..36aeb82b76
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v2si.C
@@ -0,0 +1,19 @@
+// { dg-do run { target c++11 } }
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(8)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(8)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#define A 0x11121314
+#define B 0x21222324
+
+#define X 0xd1d2d3d4
+#define Y 0xe1e2e3e4
+
+#include "vshuf-2.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v4df.C b/gcc/testsuite/g++.dg/torture/vshuf-v4df.C
new file mode 100644
index 0000000000..a1694b21ee
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v4df.C
@@ -0,0 +1,21 @@
+// { dg-do run { target c++11 } }
+
+#if __SIZEOF_DOUBLE__ == 8 && __SIZEOF_LONG_LONG__ == 8
+typedef double V __attribute__((vector_size(32)));
+typedef unsigned long long VI __attribute__((vector_size(32)));
+#else
+#define UNSUPPORTED
+#endif
+
+#define A 0.69314718055994530942
+#define B 2.7182818284590452354
+#define C 2.30258509299404568402
+#define D 1.4426950408889634074
+
+#define W 0.31830988618379067154
+#define X 3.14159265358979323846
+#define Y 1.41421356237309504880
+#define Z 0.70710678118654752440
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v4di.C b/gcc/testsuite/g++.dg/torture/vshuf-v4di.C
new file mode 100644
index 0000000000..8a5e5c507e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v4di.C
@@ -0,0 +1,21 @@
+// { dg-do run { target c++11 } }
+
+#if __SIZEOF_LONG_LONG__ == 8
+typedef unsigned long long V __attribute__((vector_size(32)));
+typedef V VI;
+#else
+#define UNSUPPORTED
+#endif
+
+#define A 0x1112131415161718
+#define B 0x2122232425262728
+#define C 0x3132333435363738
+#define D 0x4142434445464748
+
+#define W 0xc1c2c3c4c5c6c7c8
+#define X 0xd1d2d3d4d5d6d7d8
+#define Y 0xe1e2e3e4e5e6e7e8
+#define Z 0xf1f2f3f4f5f6f7f8
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v4sf.C b/gcc/testsuite/g++.dg/torture/vshuf-v4sf.C
new file mode 100644
index 0000000000..aa67dbbe61
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v4sf.C
@@ -0,0 +1,28 @@
+// { dg-do run { target c++11 } }
+
+
+#if __SIZEOF_FLOAT__ == 4
+typedef float V __attribute__((vector_size(16)));
+# if __SIZEOF_INT__ == 4
+typedef unsigned int VI __attribute__((vector_size(16)));
+# elif __SIZEOF_LONG__ == 4
+typedef unsigned long VI __attribute__((vector_size(16)));
+# else
+# define UNSUPPORTED
+# endif
+#else
+# define UNSUPPORTED
+#endif
+
+#define A 0.69314718055994530942f
+#define B 2.7182818284590452354f
+#define C 2.30258509299404568402f
+#define D 1.4426950408889634074f
+
+#define W 0.31830988618379067154f
+#define X 3.14159265358979323846f
+#define Y 1.41421356237309504880f
+#define Z 0.70710678118654752440f
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v4si.C b/gcc/testsuite/g++.dg/torture/vshuf-v4si.C
new file mode 100644
index 0000000000..4d377c1142
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v4si.C
@@ -0,0 +1,24 @@
+// { dg-do run { target c++11 } }
+
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(16)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(16)));
+typedef V VI;
+#else
+# define UNSUPPORTED
+#endif
+
+#define A 0x11121314
+#define B 0x21222324
+#define C 0x31323334
+#define D 0x41424344
+
+#define W 0xc1c2c3c4
+#define X 0xd1d2d3d4
+#define Y 0xe1e2e3e4
+#define Z 0xf1f2f3f4
+
+#include "vshuf-4.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v8hi.C b/gcc/testsuite/g++.dg/torture/vshuf-v8hi.C
new file mode 100644
index 0000000000..c2be87f5b2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v8hi.C
@@ -0,0 +1,25 @@
+// { dg-do run { target c++11 } }
+
+typedef unsigned short V __attribute__((vector_size(16)));
+typedef V VI;
+
+#define A1 0x1112
+#define B1 0x2122
+#define C1 0x3132
+#define D1 0x4142
+#define E1 0x5152
+#define F1 0x6162
+#define G1 0x7172
+#define H1 0x8182
+
+#define A2 0x9192
+#define B2 0xa1a2
+#define C2 0xb1b2
+#define D2 0xc1c2
+#define E2 0xd1d2
+#define F2 0xe1e2
+#define G2 0xf1f2
+#define H2 0x0102
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v8qi.C b/gcc/testsuite/g++.dg/torture/vshuf-v8qi.C
new file mode 100644
index 0000000000..5ec040e14e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v8qi.C
@@ -0,0 +1,25 @@
+// { dg-do run { target c++11 } }
+
+typedef unsigned char V __attribute__((vector_size(8)));
+typedef V VI;
+
+#define A1 0x11
+#define B1 0x12
+#define C1 0x13
+#define D1 0x14
+#define E1 0x15
+#define F1 0x16
+#define G1 0x17
+#define H1 0x18
+
+#define A2 0xf1
+#define B2 0xf2
+#define C2 0xf3
+#define D2 0xf4
+#define E2 0xf5
+#define F2 0xf6
+#define G2 0xf7
+#define H2 0xf8
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/torture/vshuf-v8si.C b/gcc/testsuite/g++.dg/torture/vshuf-v8si.C
new file mode 100644
index 0000000000..27631d7754
--- /dev/null
+++ b/gcc/testsuite/g++.dg/torture/vshuf-v8si.C
@@ -0,0 +1,32 @@
+// { dg-do run { target c++11 } }
+
+#if __SIZEOF_INT__ == 4
+typedef unsigned int V __attribute__((vector_size(32)));
+typedef V VI;
+#elif __SIZEOF_LONG__ == 4
+typedef unsigned long V __attribute__((vector_size(32)));
+typedef V VI;
+#else
+# define UNSUPPORTED
+#endif
+
+#define A1 0x11121314
+#define B1 0x21222324
+#define C1 0x31323334
+#define D1 0x41424344
+#define E1 0x51525354
+#define F1 0x61626364
+#define G1 0x71727374
+#define H1 0x81828384
+
+#define A2 0x91929394
+#define B2 0xa1a2a3a4
+#define C2 0xb1b2b3b4
+#define D2 0xc1c2c3c4
+#define E2 0xd1d2d3d4
+#define F2 0xe1e2e3e4
+#define G2 0xf1f2f3f4
+#define H2 0x01020304
+
+#include "vshuf-8.inc"
+#include "vshuf-main.inc"
diff --git a/gcc/testsuite/g++.dg/tree-prof/partition1.C b/gcc/testsuite/g++.dg/tree-prof/partition1.C
index 108803997d..d0dcbc4524 100644
--- a/gcc/testsuite/g++.dg/tree-prof/partition1.C
+++ b/gcc/testsuite/g++.dg/tree-prof/partition1.C
@@ -1,6 +1,5 @@
/* { dg-require-effective-target freorder } */
/* { dg-options "-O2 -freorder-blocks-and-partition" } */
-/* { dg-skip-if "PR target/47683" { mips-sgi-irix* } } */
struct A { A () __attribute__((noinline)); ~A () __attribute__((noinline)); };
A::A () { asm volatile ("" : : : "memory"); }
diff --git a/gcc/testsuite/g++.dg/tree-prof/partition2.C b/gcc/testsuite/g++.dg/tree-prof/partition2.C
index 6715da57ec..0bc50fae98 100644
--- a/gcc/testsuite/g++.dg/tree-prof/partition2.C
+++ b/gcc/testsuite/g++.dg/tree-prof/partition2.C
@@ -1,7 +1,6 @@
// PR middle-end/45458
// { dg-require-effective-target freorder }
-// { dg-options "-fnon-call-exceptions -freorder-blocks-and-partition" }
-// { dg-skip-if "PR target/47683" { mips-sgi-irix* } }
+// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
int
main ()
diff --git a/gcc/testsuite/g++.dg/tree-prof/partition3.C b/gcc/testsuite/g++.dg/tree-prof/partition3.C
index 7846983692..c62174aa4d 100644
--- a/gcc/testsuite/g++.dg/tree-prof/partition3.C
+++ b/gcc/testsuite/g++.dg/tree-prof/partition3.C
@@ -1,6 +1,6 @@
// PR middle-end/45566
// { dg-require-effective-target freorder }
-// { dg-options "-O -fnon-call-exceptions -freorder-blocks-and-partition" }
+// { dg-options "-O2 -fnon-call-exceptions -freorder-blocks-and-partition" }
int k;
diff --git a/gcc/testsuite/g++.dg/tree-prof/pr57451.C b/gcc/testsuite/g++.dg/tree-prof/pr57451.C
new file mode 100644
index 0000000000..db0fcc1e8e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/pr57451.C
@@ -0,0 +1,26 @@
+// { dg-require-effective-target freorder }
+// { dg-options "-O2 -freorder-blocks-and-partition -g" }
+
+extern "C" void abort (void);
+struct MyException {};
+struct Data {
+ int nr;
+ Data() : nr(66) {}
+};
+Data __attribute__((noinline,noclone)) getData(int i)
+{
+ if (i) throw MyException();
+ Data data;
+ data.nr = i;
+ return data;
+}
+int main(int, char **)
+{
+ Data data;
+ try {
+ data = getData(1);
+ } catch (MyException& e) {
+ if (data.nr != 66)
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/g++.dg/tree-prof/pr59255.C b/gcc/testsuite/g++.dg/tree-prof/pr59255.C
new file mode 100644
index 0000000000..77f208a3a5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-prof/pr59255.C
@@ -0,0 +1,29 @@
+// PR c++/59255
+// { dg-options "-std=c++11 -O2" }
+
+struct S
+{
+ __attribute__((noinline, noclone)) ~S () noexcept (true)
+ {
+ if (fn)
+ fn (1);
+ }
+ void (*fn) (int);
+};
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ if (x != 1)
+ throw 1;
+}
+
+int
+main ()
+{
+ for (int i = 0; i < 100; i++)
+ {
+ S s;
+ s.fn = foo;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
index b4aa22dc46..2c96ee38c1 100644
--- a/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
+++ b/gcc/testsuite/g++.dg/tree-prof/tree-prof.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C b/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
index 5513d3650c..91f43ae8c0 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/dom-invalid.C
@@ -1,7 +1,7 @@
// PR tree-optimization/39557
// invalid post-dom info leads to infinite loop
// { dg-do run }
-// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fno-rtti" }
+// { dg-options "-Wall -fno-exceptions -O2 -fprofile-use -fopt-info -fno-rtti" }
struct C
{
diff --git a/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C b/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C
index cc492a8097..b0faa93e3c 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/ehcleanup-1.C
@@ -1,9 +1,16 @@
// { dg-options "-O2 -fdump-tree-ehcleanup1-details" }
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#define NOEXCEPT_FALSE noexcept (false)
+#else
+#define NOEXCEPT_FALSE
+#endif
+
extern void can_throw ();
class a
{
public:
- ~a ()
+ ~a () NOEXCEPT_FALSE
{
if (0)
can_throw ();
@@ -19,6 +26,6 @@ t (void)
// { dg-final { scan-tree-dump-times "Empty EH handler" 2 "ehcleanup1" } }
//
// And as a result also contained control flow.
-// { dg-final { scan-tree-dump-times "Removing unreachable" 4 "ehcleanup1" } }
+// { dg-final { scan-tree-dump-times "Removing unreachable" 6 "ehcleanup1" } }
//
// { dg-final { cleanup-tree-dump "ehcleanup1" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-1.C b/gcc/testsuite/g++.dg/tree-ssa/inline-1.C
index 95b7d0609e..d8682bec11 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/inline-1.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/inline-1.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
/* { dg-add-options bind_pic_locally } */
namespace std {
diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
index 656cba0312..4c8a6265d6 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/inline-2.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=3" } */
/* { dg-add-options bind_pic_locally } */
namespace std {
diff --git a/gcc/testsuite/g++.dg/tree-ssa/inline-3.C b/gcc/testsuite/g++.dg/tree-ssa/inline-3.C
index f01f26cafa..2804a63539 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/inline-3.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/inline-3.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=5" } */
/* { dg-add-options bind_pic_locally } */
#include <algorithm>
diff --git a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
index 908299d98e..83b5728ef1 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/ivopts-2.C
@@ -7,5 +7,5 @@ void test (int *b, int *e, int stride)
*p = 1;
}
-/* { dg-final { scan-tree-dump-times "PHI <p" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "PHI <\[pb\]" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr18178.C b/gcc/testsuite/g++.dg/tree-ssa/pr18178.C
index 9223e8323c..a04807780b 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr18178.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr18178.C
@@ -35,7 +35,7 @@ void doit (array *a)
{
for (ORIG i = 0; i < a->len; ++i)
{
- if (FIRST CAST (i) >= CAST (a->len))
+ if (FIRST CAST i >= CAST (a->len))
throw 5;
call (a->data[i]);
}
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C b/gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C
new file mode 100644
index 0000000000..cbdad90d16
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19476-1.C
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+// See pr19476-5.C for a version without including <new>.
+#include <new>
+
+int f(){
+ return 33 + (0 == new(std::nothrow) int);
+}
+int g(){
+ return 42 + (0 == new int[50]);
+}
+
+/* { dg-final { scan-tree-dump "return 42" "ccp1" } } */
+/* { dg-final { scan-tree-dump-not "return 33" "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19476-2.C b/gcc/testsuite/g++.dg/tree-ssa/pr19476-2.C
new file mode 100644
index 0000000000..70002dbb5e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19476-2.C
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#include <new>
+
+int f(){
+ int *p = new(std::nothrow) int;
+ return 33 + (0 == p);
+}
+int g(){
+ int *p = new int[50];
+ return 42 + (0 == p);
+}
+
+/* { dg-final { scan-tree-dump "return 42" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "return 33" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19476-3.C b/gcc/testsuite/g++.dg/tree-ssa/pr19476-3.C
new file mode 100644
index 0000000000..051866e13c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19476-3.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcheck-new -fdump-tree-optimized" } */
+
+#include <new>
+
+int g(){
+ return 42 + (0 == new int);
+}
+
+/* { dg-final { scan-tree-dump-not "return 42" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19476-4.C b/gcc/testsuite/g++.dg/tree-ssa/pr19476-4.C
new file mode 100644
index 0000000000..8ae16140d6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19476-4.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-delete-null-pointer-checks -fdump-tree-optimized" } */
+
+#include <new>
+
+int g(){
+ return 42 + (0 == new int);
+}
+
+/* { dg-final { scan-tree-dump-not "return 42" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C b/gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C
new file mode 100644
index 0000000000..bec0bb58b6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19476-5.C
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+// See pr19476-1.C for a version that includes <new>.
+
+int g(){
+ return 42 + (0 == new int[50]);
+}
+
+/* { dg-final { scan-tree-dump "return 42" "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr19807.C b/gcc/testsuite/g++.dg/tree-ssa/pr19807.C
index bba79a9d15..0eeeb18abd 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr19807.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr19807.C
@@ -25,6 +25,6 @@ void bar(int i)
Simply test for the existence of +1 and -1 once, which also ensures
the above. If the addition/subtraction would be applied to the
pointer we would instead see +-4 (or 8, depending on sizeof(int)). */
-/* { dg-final { scan-tree-dump-times "\\\+ -1;" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump "\\\+ (0x0f*|18446744073709551615|4294967295|-1);" "optimized" } } */
/* { dg-final { scan-tree-dump-times "\\\+ 1;" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr45453.C b/gcc/testsuite/g++.dg/tree-ssa/pr45453.C
index 78c6460f72..c8ef8955f0 100644
--- a/gcc/testsuite/g++.dg/tree-ssa/pr45453.C
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr45453.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-optimized" } */
+/* { dg-options "-O2 -fdump-tree-optimized -fno-devirtualize-speculatively" } */
struct S
{
S();
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr53844.C b/gcc/testsuite/g++.dg/tree-ssa/pr53844.C
new file mode 100644
index 0000000000..0be29d86cb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr53844.C
@@ -0,0 +1,78 @@
+// { dg-do compile }
+// { dg-options "-O2 -fdump-tree-optimized-vops" }
+
+struct VBase;
+
+//Very minimal numeric vector class where Base provides the policy
+template<typename Base=VBase>
+struct Vector : public Base{
+
+ inline Vector(const Base& b)
+ :Base(b)
+ {
+ }
+
+ //Assignment from any other sort of Vector
+ template<typename Base2>
+ void operator= (const Vector<Base2>& from)
+ {
+ for(int i=0; i<100; i++){
+ (*this)[i]=from[i];
+ }
+ }
+};
+
+
+//Base class to represent pointer as a Vector
+struct VBase{
+ double * const my_data;
+
+ double& operator[](int i) {
+ return my_data[i];
+ }
+
+ const double& operator[](int i) const {
+ return my_data[i];
+ }
+};
+
+//Base class providing very minimalistic expression template
+template<class B2> struct ScalarMulExpr
+{
+ const int& mul;
+ const Vector<B2>& vec;
+
+ int size() const
+ {
+ return vec.size();
+ }
+
+ double operator[](int i) const
+ {
+ return vec[i]*mul;
+ }
+
+ ScalarMulExpr(const Vector<B2>& vec_, const int& m)
+ :mul(m),vec(vec_)
+ {
+ }
+};
+
+//Allow vector to be multiplied by a scalar
+template<class B2>
+Vector<ScalarMulExpr<B2> > operator*(const Vector<B2>& lhs, const int& rhs)
+{
+ return ScalarMulExpr<B2>(lhs, rhs);
+}
+
+//Test function producing suboptimal asm code
+void test(const Vector<>& in, Vector<>& out, int i)
+{
+ out=in*1*1*1*1*1*1*1*1*1*1*1;
+}
+
+// There should be a single store remaining, inside the loops. All
+// dead stores to unused temporaries should have been removed.
+
+// { dg-final { scan-tree-dump-times "VDEF" 1 "optimized" } }
+// { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr57380.C b/gcc/testsuite/g++.dg/tree-ssa/pr57380.C
new file mode 100644
index 0000000000..0a2b2ad5f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr57380.C
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-phiopt1" } */
+
+struct my_array {
+ int data[4];
+};
+
+const int& my_max(const int& a, const int& b) {
+ return a < b ? b : a;
+}
+
+int f(my_array a, my_array b) {
+ int res = 0;
+ for (int i = 0; i < 4; ++i) {
+ res += my_max(a.data[i], b.data[i]);
+ }
+ return res;
+}
+
+/* { dg-final { scan-tree-dump "MAX_EXPR" "phiopt1" } } */
+/* { dg-final { cleanup-tree-dump "phiopt1" } } */
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr58404.C b/gcc/testsuite/g++.dg/tree-ssa/pr58404.C
new file mode 100644
index 0000000000..aa8fb796c6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr58404.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// { dg-options "-O -fdump-tree-cddce1" }
+
+struct S { int s; };
+S a[1024];
+
+void
+foo ()
+{
+ for (int i = 0; i < 1024; i++)
+ {
+ S &r = a[i];
+ r.s++;
+ }
+}
+
+// We should propagate the reference into both memory accesses
+// during the first forwprop pass
+// { dg-final { scan-tree-dump-times "= &a" 0 "cddce1" } }
+// { dg-final { cleanup-tree-dump "cddce1" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/pr61009.C b/gcc/testsuite/g++.dg/tree-ssa/pr61009.C
new file mode 100644
index 0000000000..4e7bb1a1c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/pr61009.C
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-vrp -std=c++11 -fno-strict-aliasing -fdump-tree-dom1" } */
+
+#include <stdio.h>
+struct Field {
+ virtual int Compare(void*, void*);
+};
+extern int NKF, NR;
+extern int idxs[];
+extern Field* the_field;
+extern int *incs;
+extern char** fptrs;
+inline int doCmp(int this_row_offset, int field_idx) {
+ void *p = fptrs[field_idx] + this_row_offset * incs[field_idx];
+ return the_field->Compare(p,0);
+}
+bool Test(void) {
+
+ int row_offset = 0;
+
+ for (; row_offset < NR; ++row_offset) {
+
+ bool is_different = false;
+ for (int j = 0; j < NKF ; ++j) {
+ int field_idx = idxs[j];
+ int cmp = doCmp(row_offset, field_idx);
+ fprintf (stderr, "cmp=%d\n",cmp);
+
+ if (cmp == 0) {
+ continue;
+ }
+ if (cmp > 0) {
+ is_different = true;
+ break;
+ } else {
+ fprintf (stderr, "Incorrect\n");
+ return false;
+ }
+ }
+ if (!is_different) {
+
+ return false;
+ }
+ }
+
+ return true;
+}
+
+// The block ending with cmp == 0 should not be threaded. ie,
+// there should be a single == 0 comparison in the dump file.
+
+// { dg-final { scan-tree-dump-times "== 0" 1 "dom1" } }
+// { dg-final { cleanup-tree-dump "dom1" } }
diff --git a/gcc/testsuite/g++.dg/tree-ssa/ssa-dom.C b/gcc/testsuite/g++.dg/tree-ssa/ssa-dom.C
new file mode 100644
index 0000000000..5f63865c16
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/ssa-dom.C
@@ -0,0 +1,104 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom1" } */
+
+typedef long unsigned int size_t;
+extern void abort (void) __attribute__ ((__noreturn__));
+union tree_node;
+typedef union tree_node *tree;
+union gimple_statement_d;
+typedef union gimple_statement_d *gimple;
+typedef const union gimple_statement_d *const_gimple;
+
+enum gimple_code
+{
+ GIMPLE_RETURN = 10,
+};
+
+
+
+
+
+struct gimple_statement_base
+{
+
+
+ enum gimple_code code:8;
+};
+
+
+enum gimple_statement_structure_enum
+{
+ xyz
+};
+
+
+
+
+
+
+union gimple_statement_d
+{
+ struct gimple_statement_base gsbase;
+};
+
+
+
+
+
+extern size_t const gimple_ops_offset_[];
+
+
+extern enum gimple_statement_structure_enum const gss_for_code_[];
+
+
+static inline enum gimple_code
+gimple_code (const_gimple g)
+{
+ return g->gsbase.code;
+}
+
+
+
+
+static inline enum gimple_statement_structure_enum
+gss_for_code (enum gimple_code code)
+{
+ return gss_for_code_[code];
+}
+
+
+
+
+static inline enum gimple_statement_structure_enum
+gimple_statement_structure (gimple gs)
+{
+ return gss_for_code (gimple_code (gs));
+}
+
+
+static inline tree *
+gimple_ops (gimple gs)
+{
+ size_t off;
+ off = gimple_ops_offset_[gimple_statement_structure (gs)];
+ return (tree *) ((char *) gs + off);
+}
+
+
+static inline void
+gimple_set_op (gimple gs, unsigned i, tree op)
+{
+ gimple_ops (gs)[i] = op;
+}
+
+void
+gimple_return_set_retval (gimple gs, tree retval)
+{
+ const_gimple __gs = (gs);
+ if (gimple_code (__gs) != (GIMPLE_RETURN))
+ abort ();
+ gimple_set_op (gs, 0, retval);
+}
+/* { dg-final { scan-tree-dump-times "gss_for_code_.10." 1 "dom1"} } */
+/* { dg-final { cleanup-tree-dump "dom1" } } */
+
diff --git a/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C b/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
new file mode 100644
index 0000000000..2fe723c3aa
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tree-ssa/stabilize1.C
@@ -0,0 +1,14 @@
+// PR c++/53356
+// { dg-options "-fdump-tree-gimple" }
+// { dg-final { scan-tree-dump-not "= 0" "gimple" } }
+// { dg-final { cleanup-tree-dump "gimple" } }
+
+class A {};
+
+struct B {
+ operator const A &() const;
+};
+
+A* cause_ICE() {
+ return new A(B());
+}
diff --git a/gcc/testsuite/g++.dg/tsan/aligned_vs_unaligned_race.C b/gcc/testsuite/g++.dg/tsan/aligned_vs_unaligned_race.C
new file mode 100644
index 0000000000..390be86d71
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/aligned_vs_unaligned_race.C
@@ -0,0 +1,29 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <stdint.h>
+
+uint64_t Global[2];
+
+void *Thread1(void *x) {
+ Global[1]++;
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ char *p1 = reinterpret_cast<char *>(&Global[0]);
+ uint64_t *p4 = reinterpret_cast<uint64_t *>(p1 + 1);
+ (*p4)++;
+ return NULL;
+}
+
+int main() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ printf("Pass\n");
+ /* { dg-prune-output "ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+ /* { dg-output "Pass.*" } */
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/tsan/atomic_free.C b/gcc/testsuite/g++.dg/tsan/atomic_free.C
new file mode 100644
index 0000000000..26d01ae3fd
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/atomic_free.C
@@ -0,0 +1,20 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+void *Thread(void *a) {
+ __atomic_fetch_add((int*)a, 1, __ATOMIC_SEQ_CST);
+ return 0;
+}
+
+int main() {
+ int *a = new int(0);
+ pthread_t t;
+ pthread_create(&t, 0, Thread, a);
+ sleep(1);
+ delete a;
+ pthread_join(t, 0);
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/g++.dg/tsan/atomic_free2.C b/gcc/testsuite/g++.dg/tsan/atomic_free2.C
new file mode 100644
index 0000000000..1fe512cde9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/atomic_free2.C
@@ -0,0 +1,20 @@
+/* { dg-shouldfail "tsan" } */
+
+#include <pthread.h>
+#include <unistd.h>
+
+void *Thread(void *a) {
+ sleep(1);
+ __atomic_fetch_add((int*)a, 1, __ATOMIC_SEQ_CST);
+ return 0;
+}
+
+int main() {
+ int *a = new int(0);
+ pthread_t t;
+ pthread_create(&t, 0, Thread, a);
+ delete a;
+ pthread_join(t, 0);
+}
+
+/* { dg-output "WARNING: ThreadSanitizer: heap-use-after-free.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/g++.dg/tsan/benign_race.C b/gcc/testsuite/g++.dg/tsan/benign_race.C
new file mode 100644
index 0000000000..b5f17208a1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/benign_race.C
@@ -0,0 +1,38 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int Global;
+int WTFGlobal;
+
+extern "C" {
+void AnnotateBenignRaceSized(const char *f, int l,
+ void *mem, unsigned int size, const char *desc);
+void WTFAnnotateBenignRaceSized(const char *f, int l,
+ void *mem, unsigned int size,
+ const char *desc);
+}
+
+
+void *Thread(void *x) {
+ Global = 42;
+ WTFGlobal = 142;
+ return 0;
+}
+
+int main() {
+ AnnotateBenignRaceSized(__FILE__, __LINE__,
+ &Global, sizeof(Global), "Race on Global");
+ WTFAnnotateBenignRaceSized(__FILE__, __LINE__,
+ &WTFGlobal, sizeof(WTFGlobal),
+ "Race on WTFGlobal");
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ sleep(1);
+ Global = 43;
+ WTFGlobal = 143;
+ pthread_join(t, 0);
+ printf("OK\n");
+}
+
+/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/g++.dg/tsan/cond_race.C b/gcc/testsuite/g++.dg/tsan/cond_race.C
new file mode 100644
index 0000000000..a937614776
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/cond_race.C
@@ -0,0 +1,36 @@
+/* { dg-shouldfail "tsan" } */
+/* { dg-output "ThreadSanitizer: data race.*" } */
+/* { dg-output "pthread_cond_signal.*" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <pthread.h>
+
+struct Ctx {
+ pthread_mutex_t m;
+ pthread_cond_t c;
+ bool done;
+};
+
+void *thr(void *p) {
+ Ctx *c = (Ctx*)p;
+ pthread_mutex_lock(&c->m);
+ c->done = true;
+ pthread_mutex_unlock(&c->m);
+ pthread_cond_signal(&c->c);
+ return 0;
+}
+
+int main() {
+ Ctx *c = new Ctx();
+ pthread_mutex_init(&c->m, 0);
+ pthread_cond_init(&c->c, 0);
+ pthread_t th;
+ pthread_create(&th, 0, thr, c);
+ pthread_mutex_lock(&c->m);
+ while (!c->done)
+ pthread_cond_wait(&c->c, &c->m);
+ pthread_mutex_unlock(&c->m);
+ delete c;
+ pthread_join(th, 0);
+}
diff --git a/gcc/testsuite/g++.dg/tsan/default_options.C b/gcc/testsuite/g++.dg/tsan/default_options.C
new file mode 100644
index 0000000000..13e1984aba
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/default_options.C
@@ -0,0 +1,31 @@
+#include <pthread.h>
+#include <stdio.h>
+
+extern "C" const char *__tsan_default_options() {
+ return "report_bugs=0";
+}
+
+int Global;
+
+void *Thread1(void *x) {
+ Global = 42;
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ Global = 43;
+ return NULL;
+}
+
+int main() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ fprintf(stderr, "DONE\n");
+ return 0;
+}
+
+/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output "DONE" } */
diff --git a/gcc/testsuite/g++.dg/tsan/fd_close_norace.C b/gcc/testsuite/g++.dg/tsan/fd_close_norace.C
new file mode 100644
index 0000000000..9babb6a8f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/fd_close_norace.C
@@ -0,0 +1,30 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+void *Thread1(void *x) {
+ int f = open("/dev/random", O_RDONLY);
+ close(f);
+ return NULL;
+}
+
+void *Thread2(void *x) {
+ sleep(1);
+ int f = open("/dev/random", O_RDONLY);
+ close(f);
+ return NULL;
+}
+
+int main() {
+ pthread_t t[2];
+ pthread_create(&t[0], NULL, Thread1, NULL);
+ pthread_create(&t[1], NULL, Thread2, NULL);
+ pthread_join(t[0], NULL);
+ pthread_join(t[1], NULL);
+ printf("OK\n");
+}
+
+/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
diff --git a/gcc/testsuite/g++.dg/tsan/fd_close_norace2.C b/gcc/testsuite/g++.dg/tsan/fd_close_norace2.C
new file mode 100644
index 0000000000..56f00f8ace
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/fd_close_norace2.C
@@ -0,0 +1,29 @@
+#include <pthread.h>
+#include <stdio.h>
+#include <unistd.h>
+
+int pipes[2];
+
+void *Thread(void *x) {
+ // wait for shutown signal
+ while (read(pipes[0], &x, 1) != 1) {
+ }
+ close(pipes[0]);
+ close(pipes[1]);
+ return 0;
+}
+
+int main() {
+ if (pipe(pipes))
+ return 1;
+ pthread_t t;
+ pthread_create(&t, 0, Thread, 0);
+ // send shutdown signal
+ while (write(pipes[1], &t, 1) != 1) {
+ }
+ pthread_join(t, 0);
+ printf("OK\n");
+}
+
+/* { dg-prune-output "WARNING: ThreadSanitizer: data race.*(\n|\r\n|\r)" } */
+/* { dg-output "OK" } */
diff --git a/gcc/testsuite/g++.dg/tsan/tsan.exp b/gcc/testsuite/g++.dg/tsan/tsan.exp
new file mode 100644
index 0000000000..14ff02e557
--- /dev/null
+++ b/gcc/testsuite/g++.dg/tsan/tsan.exp
@@ -0,0 +1,47 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib g++-dg.exp
+load_lib tsan-dg.exp
+load_lib torture-options.exp
+
+if ![check_effective_target_fthread_sanitizer] {
+ return
+}
+
+# Initialize `dg'.
+dg-init
+torture-init
+set-torture-options [list \
+ { -O0 } \
+ { -O2 } ]
+
+if [tsan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/tsan/*.c]] ""
+
+}
+
+# All done.
+tsan_finish
+torture-finish
+dg-finish
diff --git a/gcc/testsuite/g++.dg/ubsan/cxx11-shift-1.C b/gcc/testsuite/g++.dg/ubsan/cxx11-shift-1.C
new file mode 100644
index 0000000000..f2b2cbd1c2
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/cxx11-shift-1.C
@@ -0,0 +1,18 @@
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+#include <stdio.h>
+
+int
+main (void)
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ int a = 1;
+ a <<= 31;
+
+ fputs ("UBSAN TEST END\n", stderr);
+ return 0;
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/g++.dg/ubsan/cxx11-shift-2.C b/gcc/testsuite/g++.dg/ubsan/cxx11-shift-2.C
new file mode 100644
index 0000000000..867908aef7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/cxx11-shift-2.C
@@ -0,0 +1,10 @@
+/* { dg-do run { target c++11 } } */
+/* { dg-options "-fsanitize=shift -w" } */
+
+int
+main (void)
+{
+ int a = -42;
+ a <<= 1;
+}
+/* { dg-output "left shift of negative value -42" } */
diff --git a/gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C b/gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C
new file mode 100644
index 0000000000..ca1e922d69
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/cxx1y-vla.C
@@ -0,0 +1,13 @@
+/* { dg-do run { target c++1y } } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
+/* { dg-shouldfail "ubsan" } */
+
+int
+main (void)
+{
+ int y = -18;
+ int a[y];
+ return 0;
+}
+
+/* { dg-output "terminate called after throwing an instance" } */
diff --git a/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C b/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C
new file mode 100644
index 0000000000..88acfa1517
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/div-by-zero-1.C
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=integer-divide-by-zero -w" } */
+
+void
+foo (int i)
+{
+ switch (i)
+ case 0 * (1 / 0): /* { dg-error "is not a constant expression" } */
+ ;
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59250.C b/gcc/testsuite/g++.dg/ubsan/pr59250.C
new file mode 100644
index 0000000000..e438d24fda
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr59250.C
@@ -0,0 +1,18 @@
+// PR sanitizer/59250
+// { dg-do compile }
+// { dg-options "-fsanitize=undefined" }
+
+struct E {
+ int i;
+};
+
+struct S {
+ const char *s;
+ S (const char *);
+ static E *e;
+};
+
+S::S (const char *) : s (0)
+{
+ e = new E ();
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59306.C b/gcc/testsuite/g++.dg/ubsan/pr59306.C
new file mode 100644
index 0000000000..621093c6b7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr59306.C
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-options "-fsanitize=undefined" }
+
+class A {
+ void bar (void (A::*) (int));
+ void foo (int);
+ void B ();
+};
+
+void A::B()
+{
+ bar (&A::foo);
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59331.C b/gcc/testsuite/g++.dg/ubsan/pr59331.C
new file mode 100644
index 0000000000..1bb3666efb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr59331.C
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=vla-bound -Wall -Wno-unused-variable" } */
+
+void foo(int i)
+{
+ /* Don't warn here with "value computed is not used". */
+ char a[i];
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59415.C b/gcc/testsuite/g++.dg/ubsan/pr59415.C
new file mode 100644
index 0000000000..4c373f7c92
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr59415.C
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-fsanitize=null -Wall -fvtable-verify=std" } */
+
+void
+foo (void)
+{
+ throw 0;
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr59437.C b/gcc/testsuite/g++.dg/ubsan/pr59437.C
new file mode 100644
index 0000000000..0e77ccde46
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr59437.C
@@ -0,0 +1,24 @@
+// { dg-do compile }
+// { dg-options "-fsanitize=null -fvtable-verify=std" }
+// { dg-skip-if "" { *-*-* } { "-flto" } { "" } }
+
+template < typename T > struct A
+{
+ T foo ();
+};
+template < typename T > struct C: virtual public A < T >
+{
+ C & operator<< (C & (C &));
+};
+template < typename T >
+C < T > &endl (C < int > &c)
+{
+ c.foo ();
+ return c;
+}
+C < int > cout;
+void
+fn ()
+{
+ cout << endl;
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr60569.C b/gcc/testsuite/g++.dg/ubsan/pr60569.C
new file mode 100644
index 0000000000..df57c06bed
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr60569.C
@@ -0,0 +1,21 @@
+// PR sanitizer/60569
+// { dg-do link }
+// { dg-require-effective-target lto }
+// { dg-options "-fsanitize=undefined -flto" }
+
+struct A
+{
+ void foo ();
+ struct
+ {
+ int i;
+ void bar () { i = 0; }
+ } s;
+};
+
+void A::foo () { s.bar (); }
+
+int
+main ()
+{
+}
diff --git a/gcc/testsuite/g++.dg/ubsan/pr61272.C b/gcc/testsuite/g++.dg/ubsan/pr61272.C
new file mode 100644
index 0000000000..064678d37b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/pr61272.C
@@ -0,0 +1,24 @@
+// PR sanitizer/61272
+// { dg-do compile }
+// { dg-options "-fsanitize=undefined -std=c++11" }
+
+namespace std
+{
+ template < typename _Tp > class allocator;
+ template < typename _Alloc > struct allocator_traits {
+ private:
+ template < typename _Tp > auto construct ( _Alloc & __a, _Tp * __p)-> // { dg-error "is private" }
+ decltype (_S_construct (__a, __p)) { }
+ };
+ namespace __gnu_cxx
+ {
+ template < typename _Alloc > struct __alloc_traits:std::allocator_traits < _Alloc > // { dg-error "within this context" }
+ {
+ typedef std::allocator_traits < _Alloc > _Base_type;
+ using _Base_type::construct;
+ };
+ template < typename _Tp, typename _Alloc > struct _Vector_base { typedef typename __gnu_cxx::__alloc_traits < _Alloc >::template rebind < _Tp >::other _Tp_alloc_type; }; // { dg-error "no class template" }
+ template < typename _Tp, typename _Alloc = std::allocator < _Tp > >class vector : protected _Vector_base < _Tp, _Alloc > { };
+ template < typename NumberT > struct Point2d { };
+ typedef Point2d < int >GdsPoint;
+ class GdsPointList : public vector < GdsPoint > {};}}
diff --git a/gcc/testsuite/g++.dg/ubsan/return-1.C b/gcc/testsuite/g++.dg/ubsan/return-1.C
new file mode 100644
index 0000000000..43791b9e33
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/return-1.C
@@ -0,0 +1,27 @@
+// { dg-do run }
+// { dg-options "-fsanitize=return" }
+// { dg-shouldfail "ubsan" }
+
+struct S { S (); ~S (); };
+
+S::S () {}
+S::~S () {}
+
+int
+foo (int x)
+{
+ S a;
+ {
+ S b;
+ if (x)
+ return 1;
+ }
+}
+
+int
+main ()
+{
+ foo (0);
+}
+
+// { dg-output "execution reached the end of a value-returning function without returning a value" }
diff --git a/gcc/testsuite/g++.dg/ubsan/return-2.C b/gcc/testsuite/g++.dg/ubsan/return-2.C
new file mode 100644
index 0000000000..546f178105
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/return-2.C
@@ -0,0 +1,33 @@
+// { dg-do run }
+// { dg-options "-fsanitize=return" }
+
+#include <stdio.h>
+
+struct S { S (); ~S (); };
+
+S::S () {}
+S::~S () {}
+
+int
+foo (int x)
+{
+ S a;
+ {
+ S b;
+ if (x)
+ return 1;
+ }
+}
+
+int
+main ()
+{
+ fputs ("UBSAN TEST START\n", stderr);
+
+ foo (1);
+ foo (14);
+
+ fputs ("UBSAN TEST END\n", stderr);
+}
+
+/* { dg-output "UBSAN TEST START(\n|\r\n|\r)UBSAN TEST END" } */
diff --git a/gcc/testsuite/g++.dg/ubsan/ubsan.exp b/gcc/testsuite/g++.dg/ubsan/ubsan.exp
new file mode 100644
index 0000000000..7d5e9ba72e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/ubsan/ubsan.exp
@@ -0,0 +1,34 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Load support procs.
+load_lib g++-dg.exp
+load_lib ubsan-dg.exp
+
+# Initialize `dg'.
+dg-init
+if [ubsan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C $srcdir/c-c++-common/ubsan/*.c]] ""
+
+}
+
+# All done.
+ubsan_finish
+dg-finish
diff --git a/gcc/testsuite/g++.dg/uninit-pred-4.C b/gcc/testsuite/g++.dg/uninit-pred-4.C
new file mode 100644
index 0000000000..94ab13c50d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/uninit-pred-4.C
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-Wuninitialized -Og" } */
+
+int pop ();
+int pop_first_bucket;
+
+int my_pop ()
+{
+ int out; // { dg-bogus "uninitialized" "uninitialized variable warning" }
+
+ while (pop_first_bucket)
+ if (pop_first_bucket && (out = pop()))
+ return out;
+
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc
new file mode 100644
index 0000000000..15848c4395
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-2.cc
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+void foo(int n, int *a, int *b, int *c) {
+ int i;
+ i = 0;
+#pragma GCC ivdep
+ while(i < n)
+ {
+ a[i] = b[i] + c[i];
+ ++i;
+ }
+}
+
+void bar(int n, int *a, int *b, int *c) {
+ int i;
+ i = 0;
+#pragma GCC ivdep
+ do
+ {
+ a[i] = b[i] + c[i];
+ ++i;
+ }
+ while(i < n);
+}
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+/* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 2 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
+/* { dg-final { scan-tree-dump-times "ANNOTATE " 2 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc
new file mode 100644
index 0000000000..78f225a9c1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-3.cc
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int_mult } */
+/* { dg-additional-options "-std=c++11 -O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+int ar[100];
+
+void foo(int *a) {
+#pragma GCC ivdep
+ for (auto &i : ar) {
+ i *= *a;
+ }
+}
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+/* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
+/* { dg-final { scan-tree-dump-times "ANNOTATE " 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc
new file mode 100644
index 0000000000..9471761345
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr33426-ivdep-4.cc
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int_mult } */
+/* { dg-additional-options "-std=c++11 -O3 -fopt-info-vec-optimized -fdump-tree-original -fdump-tree-gimple" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+#include <vector>
+
+template<class T, class T2>
+void Loop(T *b, T2 c) {
+#pragma GCC ivdep
+ for (auto &i : *b) {
+ i *= *c;
+ }
+}
+
+void foo(std::vector<int> *ar, int *b) {
+ Loop<std::vector<int>, int*>(ar, b);
+}
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* FIXME: dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+/* { dg-final { scan-tree-dump-times "ANNOTATE_EXPR " 1 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
+/* { dg-final { scan-tree-dump-times "ANNOTATE " 1 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc b/gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc
new file mode 100644
index 0000000000..e5d88e0b27
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr33426-ivdep.cc
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+void foo(int n, int *a, int *b, int *c, int *d, int *e) {
+ int i;
+#pragma GCC ivdep
+ for (i = 0; i < n; ++i) {
+ a[i] = b[i] + c[i];
+ }
+}
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr58513.cc b/gcc/testsuite/g++.dg/vect/pr58513.cc
new file mode 100644
index 0000000000..08a175c8e7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr58513.cc
@@ -0,0 +1,13 @@
+// { dg-do compile }
+// { dg-require-effective-target vect_int }
+
+static int op (const int& x, const int& y) { return x + y; }
+
+void foo(int* a)
+{
+ for (int i = 0; i < 1000; ++i)
+ a[i] = op(a[i], 1);
+}
+
+// { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } }
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/vect/pr60000.cc b/gcc/testsuite/g++.dg/vect/pr60000.cc
new file mode 100644
index 0000000000..fe39d6ae9a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60000.cc
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fno-tree-vrp" } */
+
+void foo (bool* a, int* b)
+{
+ for (int i = 0; i < 1000; ++i)
+ {
+ a[i] = i % 2;
+ b[i] = i % 3;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/g++.dg/vect/pr60023.cc b/gcc/testsuite/g++.dg/vect/pr60023.cc
new file mode 100644
index 0000000000..78f325e6f7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60023.cc
@@ -0,0 +1,80 @@
+// PR tree-optimization/60023
+// { dg-do compile }
+// { dg-additional-options "-O3 -std=c++11 -fnon-call-exceptions" }
+// { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } }
+
+struct A { A (); ~A (); };
+
+void
+f1 (int *p, int *q, int *r) noexcept (true)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ if (r[i])
+ p[i] = q[i] + 1;
+}
+
+void
+f2 (int *p, int *q, int *r)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ if (r[i])
+ p[i] = q[i] + 1;
+}
+
+void
+f3 (int *p, int *q) noexcept (true)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ p[i] = q[i] + 1;
+}
+
+void
+f4 (int *p, int *q)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ p[i] = q[i] + 1;
+}
+
+void
+f5 (int *p, int *q, int *r) noexcept (true)
+{
+ int i;
+ A a;
+ for (i = 0; i < 1024; i++)
+ if (r[i])
+ p[i] = q[i] + 1;
+}
+
+void
+f6 (int *p, int *q, int *r)
+{
+ int i;
+ A a;
+ for (i = 0; i < 1024; i++)
+ if (r[i])
+ p[i] = q[i] + 1;
+}
+
+void
+f7 (int *p, int *q) noexcept (true)
+{
+ int i;
+ A a;
+ for (i = 0; i < 1024; i++)
+ p[i] = q[i] + 1;
+}
+
+void
+f8 (int *p, int *q)
+{
+ int i;
+ A a;
+ for (i = 0; i < 1024; i++)
+ p[i] = q[i] + 1;
+}
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/vect/pr60559.cc b/gcc/testsuite/g++.dg/vect/pr60559.cc
new file mode 100644
index 0000000000..f179a1aebc
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60559.cc
@@ -0,0 +1,8 @@
+// PR tree-optimization/60559
+// { dg-do compile }
+// { dg-additional-options "-O3 -std=c++11 -fnon-call-exceptions -fno-tree-dce" }
+// { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } }
+
+#include "pr60023.cc"
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/vect/pr60729.cc b/gcc/testsuite/g++.dg/vect/pr60729.cc
new file mode 100644
index 0000000000..fd472c50af
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60729.cc
@@ -0,0 +1,10 @@
+// { dg-do compile }
+// { dg-additional-options "-ftrapv" }
+
+void doSomething(int dim, double *Y, double *A)
+{
+ for (int k=0; k<dim; k++)
+ Y[k] += __builtin_fabs (A[k]);
+}
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/vect/pr60836.cc b/gcc/testsuite/g++.dg/vect/pr60836.cc
new file mode 100644
index 0000000000..83bb183753
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/pr60836.cc
@@ -0,0 +1,39 @@
+// { dg-do compile }
+
+int a, b;
+typedef double (*NormFunc) (const int &);
+int &
+max (int &p1, int &p2)
+{
+ if (p1 < p2)
+ return p2;
+ return p1;
+}
+
+struct A
+{
+ int operator () (int p1, int p2)
+ {
+ return max (p1, p2);
+ }
+};
+template < class, class > double
+norm_ (const int &)
+{
+ char c, d;
+ A e;
+ for (; a; a++)
+ {
+ b = e (b, d);
+ b = e (b, c);
+ }
+}
+
+void
+norm ()
+{
+ static NormFunc f = norm_ < int, A >;
+ f = 0;
+}
+
+// { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr50413.cc b/gcc/testsuite/g++.dg/vect/slp-pr50413.cc
index e7bdf1f1c3..6e69f11b38 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr50413.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr50413.cc
@@ -160,6 +160,6 @@ void shift(unsigned char t)
V.bitmap.b96 = t;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 0 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr50819.cc b/gcc/testsuite/g++.dg/vect/slp-pr50819.cc
index 402218bc5b..515d774a22 100644
--- a/gcc/testsuite/g++.dg/vect/slp-pr50819.cc
+++ b/gcc/testsuite/g++.dg/vect/slp-pr50819.cc
@@ -49,5 +49,5 @@ const & v2) {
res = res + s*(v1+v2);
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 2 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/g++.dg/vect/slp-pr56812.cc b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
new file mode 100644
index 0000000000..9c0b2b8b78
--- /dev/null
+++ b/gcc/testsuite/g++.dg/vect/slp-pr56812.cc
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_hw_misalign } */
+/* { dg-additional-options "-O3 -funroll-loops -fvect-cost-model=dynamic" } */
+
+class mydata {
+public:
+ mydata() {Set(-1.0);}
+ void Set (float);
+ static int upper() {return 8;}
+ float data[8];
+};
+
+void mydata::Set (float x)
+{
+ for (int i=0; i<upper(); i++)
+ data[i] = x;
+}
+
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/g++.dg/vect/vect.exp b/gcc/testsuite/g++.dg/vect/vect.exp
index 7cb02d026f..2bac8105d8 100644
--- a/gcc/testsuite/g++.dg/vect/vect.exp
+++ b/gcc/testsuite/g++.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/g++.dg/warn/Wbraces3.C b/gcc/testsuite/g++.dg/warn/Wbraces3.C
new file mode 100644
index 0000000000..f1aea98c44
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wbraces3.C
@@ -0,0 +1,34 @@
+// PR c++/25137
+// { dg-options "-Wall" }
+
+struct S { int s[3]; };
+S s1 = { 1, 1, 1 };
+
+struct S1 { int s[3]; };
+struct S2 { struct S1 a; };
+S2 s21 = { 1, 1, 1 };
+
+struct S3 { int s[3]; };
+struct S4 { struct S3 a; int b; };
+S4 s41 = { 1, 1, 1, 1 };
+
+struct S5 { int s[3]; };
+struct S6 { struct S5 a; int b; };
+S6 s61 = { { 1, 1, 1 }, 1 };
+
+struct S7 { int s[3]; };
+struct S8 { int a; struct S7 b; };
+S8 s81 = { 1, { 1, 1, 1 } };
+
+struct S9 { int s[2]; };
+struct S10 { struct S9 a; struct S9 b; };
+S10 s101 = { { 1, 1 }, 1, 1 };
+
+struct S11 { int s[2]; };
+struct S12 { struct S11 a; struct S11 b; };
+S12 s121 = { { 1, 1 }, { 1, 1 } };
+
+struct S13 { int i; };
+struct S14 { struct S13 a; };
+struct S15 { struct S14 b; };
+S15 s151 = { 1 };
diff --git a/gcc/testsuite/g++.dg/warn/Wbraces4.C b/gcc/testsuite/g++.dg/warn/Wbraces4.C
new file mode 100644
index 0000000000..7d77959f76
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wbraces4.C
@@ -0,0 +1,34 @@
+// PR c++/25137
+// { dg-options "-Wmissing-braces" }
+
+struct S { int s[3]; };
+S s1 = { 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S1 { int s[3]; };
+struct S2 { struct S1 a; };
+S2 s21 = { 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S3 { int s[3]; };
+struct S4 { struct S3 a; int b; };
+S4 s41 = { 1, 1, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S5 { int s[3]; };
+struct S6 { struct S5 a; int b; };
+S6 s61 = { { 1, 1, 1 }, 1 }; // { dg-warning "missing braces" }
+
+struct S7 { int s[3]; };
+struct S8 { int a; struct S7 b; };
+S8 s81 = { 1, { 1, 1, 1 } }; // { dg-warning "missing braces" }
+
+struct S9 { int s[2]; };
+struct S10 { struct S9 a; struct S9 b; };
+S10 s101 = { { 1, 1 }, 1, 1 }; // { dg-warning "missing braces" }
+
+struct S11 { int s[2]; };
+struct S12 { struct S11 a; struct S11 b; };
+S12 s121 = { { 1, 1 }, { 1, 1 } }; // { dg-warning "missing braces" }
+
+struct S13 { int i; };
+struct S14 { struct S13 a; };
+struct S15 { struct S14 b; };
+S15 s151 = { 1 }; // { dg-warning "missing braces" }
diff --git a/gcc/testsuite/g++.dg/warn/Wconditionally-supported-1.C b/gcc/testsuite/g++.dg/warn/Wconditionally-supported-1.C
new file mode 100644
index 0000000000..8cc5966eda
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wconditionally-supported-1.C
@@ -0,0 +1,25 @@
+// { dg-options "-Wconditionally-supported" }
+
+// DR 195 was about allowing conversions between function and object
+// pointers under some circumstances. The issue got resolved for C++11,
+// which, in 5.2.10 p8 says that: "Converting a function pointer to an
+// object pointer type or vice versa is conditionally-supported."
+
+// This checks we warn with -Wconditionally-supported.
+
+typedef void (*PF)(void);
+typedef void *PV;
+typedef int *PO;
+
+void foo ()
+{
+ PF pf;
+ PV pv;
+ PO po;
+
+ pf = reinterpret_cast <PF>(pv); // { dg-warning "conditionally-supported" }
+ pv = reinterpret_cast <PV>(pf); // { dg-warning "conditionally-supported" }
+
+ pf = reinterpret_cast <PF>(po); // { dg-warning "conditionally-supported" }
+ po = reinterpret_cast <PO>(pf); // { dg-warning "conditionally-supported" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-null-2.C b/gcc/testsuite/g++.dg/warn/Wconversion-null-2.C
index dd498c199d..a71551fdf9 100644
--- a/gcc/testsuite/g++.dg/warn/Wconversion-null-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-null-2.C
@@ -25,7 +25,7 @@ void l(long) {}
template <>
void l(long long) {}
-int main()
+void warn_for_NULL()
{
int i = NULL; // { dg-warning "" } converting NULL to non-pointer type
float z = NULL; // { dg-warning "" } converting NULL to non-pointer type
@@ -47,3 +47,32 @@ int main()
l(NULL); // No warning: NULL is used to implicitly instantiate the template
NULL && NULL; // No warning: converting NULL to bool is OK
}
+
+int warn_for___null()
+{
+ int i = __null; // { dg-warning "" } converting __null to non-pointer type
+ float z = __null; // { dg-warning "" } converting __null to non-pointer type
+ int a[2];
+
+ i != __null; // { dg-warning "" } __null used in arithmetic
+ __null != z; // { dg-warning "" } __null used in arithmetic
+ k != __null; // No warning: decay conversion
+ __null != a; // Likewise.
+ -__null; // { dg-warning "" } converting __null to non-pointer type
+ +__null; // { dg-warning "" } converting __null to non-pointer type
+ ~__null; // { dg-warning "" } converting __null to non-pointer type
+ a[__null] = 3; // { dg-warning "" } converting __null to non-pointer-type
+ i = __null; // { dg-warning "" } converting __null to non-pointer type
+ z = __null; // { dg-warning "" } converting __null to non-pointer type
+ k(__null); // { dg-warning "" } converting __null to int
+ g(__null); // { dg-warning "" } converting __null to int
+ h<__null>(); // No warning: __null bound to integer template parameter
+ l(__null); // No warning: __null is used to implicitly instantiate the template
+ __null && __null; // No warning: converting NULL to bool is OK
+}
+
+int main()
+{
+ warn_for_NULL();
+ warn_for___null();
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-null-3.C b/gcc/testsuite/g++.dg/warn/Wconversion-null-3.C
index 644ae1c40d..a1f0cf71d4 100644
--- a/gcc/testsuite/g++.dg/warn/Wconversion-null-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-null-3.C
@@ -1,5 +1,5 @@
// PR c++/48420
-// { dg-do compile { target c++98 } }
+// { dg-do compile { target { ! c++11 } } }
void foo(int* p);
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer-3.C b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer-3.C
new file mode 100644
index 0000000000..a4df0100a7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer-3.C
@@ -0,0 +1,20 @@
+// { dg-do compile }
+// { dg-options "-Wconversion -ftrack-macro-expansion=2" }
+// { dg-require-effective-target int32plus }
+
+#include "conversion-real-integer-3.h"
+
+float vfloat;
+
+void h (void)
+{
+ // We want to trigger an error on the token INT_MAX below, that is
+ // a macro that expands to the built-in __INT_MAX__. Furthermore,
+ // INT_MAX is defined inside a system header.
+ //
+ // The behaviour we want is that the diagnostic should point to
+ // the locus that inside the source code here, at the relevant
+ // line below, even with -ftrack-macro-expansion. We don't want
+ // it to point to the any locus that is inside the system header.
+ vfloat = INT_MAX; // { dg-warning "conversion to .float. alters .int. constant value" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C
index 282ac13da5..3b6d1f3c43 100644
--- a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer.C
@@ -3,7 +3,7 @@
gcc/testsuite/gcc.dg/Wconversion-real-integer.c */
/* { dg-do compile }
-/* { dg-options "-Wconversion" } */
+/* { dg-options "-Wconversion -ftrack-macro-expansion=0" } */
/* { dg-require-effective-target int32plus } */
#include <limits.h>
diff --git a/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C
new file mode 100644
index 0000000000..0494588c15
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C
@@ -0,0 +1,33 @@
+/* { dg-do compile }
+/* { dg-options "-Wconversion -ftrack-macro-expansion=2" } */
+/* { dg-require-effective-target int32plus } */
+
+// Before the fix that came with this test, we'd output an error for
+// the __INT_MAX__ token. That token has a BUILTINS_LOCATION
+// location, so the the location prefix in the warning message would
+// be:
+// <built-in>:0:0: warning: conversion to 'float' alters 'int' constant value
+//
+// Note the useless and confusing <built-in>:0:0 prefix. This is
+// because '__INT_MAX__' being an internal macro token, it has a
+// BUILTINS_LOCATION location.
+//
+// In this case, we want the error message to refer to the first
+// location (in the macro expansion context) that is not a location
+// for a built-in token. That location would be the one for where (in
+// real source code) the __INT_MAX__ macro has been expanded.
+//
+// That would be something like:
+//
+// gcc/testsuite/g++.dg/warn/Wconversion-real-integer2.C:21:17: warning: conversion to 'float' alters 'int' constant value
+//
+// That is more useful.
+
+#define INT_MAX __INT_MAX__
+
+float vfloat;
+
+void h (void)
+{
+ vfloat = INT_MAX; // { dg-warning "conversion to .float. alters .int. constant value" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C
new file mode 100644
index 0000000000..69689ba348
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-1.C
@@ -0,0 +1,7 @@
+// PR c++/43452
+
+class Foo; // { dg-warning "forward" }
+int main() {
+ Foo* p; // { dg-warning "incomplete" }
+ delete [] p; // { dg-warning "problem" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C
new file mode 100644
index 0000000000..6c3aaa74f1
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdelete-incomplete-2.C
@@ -0,0 +1,8 @@
+// PR c++/43452
+// { dg-options -Wno-delete-incomplete }
+
+class Foo;
+int main() {
+ Foo* p;
+ delete [] p;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-2.C b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-2.C
new file mode 100644
index 0000000000..675e9594b8
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-2.C
@@ -0,0 +1,35 @@
+// PR c++/56607
+// { dg-do compile { target { { lp64 || ilp32 } || llp64 } } }
+// { dg-require-effective-target c++11 }
+// { dg-options "-O2 -Wdiv-by-zero" }
+
+constexpr int sc () { return sizeof (char); }
+constexpr int si () { return sizeof (int); }
+constexpr int zc () { return sc () - 1; }
+constexpr int zi (int d) { return si () / d - 1; }
+
+int
+f1 (void)
+{
+ return 1 / zc (); // { dg-warning "division by zero" }
+}
+
+int
+f2 (void)
+{
+ constexpr int x = zc ();
+ return 1 / x; // { dg-warning "division by zero" }
+}
+
+int
+f3 (void)
+{
+ return 1 / zi (3); // { dg-warning "division by zero" }
+}
+
+int
+f4 (void)
+{
+ constexpr int x = zi (3);
+ return 1 / x; // { dg-warning "division by zero" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus-2.C b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus-2.C
new file mode 100644
index 0000000000..b7556eaac3
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus-2.C
@@ -0,0 +1,18 @@
+// PR c++/57132
+
+template<unsigned m, unsigned a>
+struct mod
+{
+ static unsigned calc(unsigned x) {
+ unsigned res = a * x;
+ if (m)
+ res %= m;
+ return res;
+ }
+};
+
+int main()
+{
+ mod<3,2>::calc(7);
+ mod<0,2>::calc(7);
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C
new file mode 100644
index 0000000000..2157df30cb
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wdiv-by-zero-bogus.C
@@ -0,0 +1,30 @@
+// PR c++/52299
+
+template<unsigned x>
+struct test0 {
+ static const unsigned a_
+ = x ? 10 / x : 10;
+};
+
+template<unsigned x>
+struct test1 {
+ static const unsigned a_
+ = !x ? 10 : 10 / x;
+};
+
+template<bool x>
+struct test2 {
+ static const unsigned a_
+ = x ? 10 / x : 10;
+};
+
+template<bool x>
+struct test3 {
+ static const unsigned a_
+ = !x ? 10 : 10 / x;
+};
+
+unsigned i0 = test0<0>::a_;
+unsigned i1 = test1<0>::a_;
+unsigned i2 = test2<false>::a_;
+unsigned i3 = test3<false>::a_;
diff --git a/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C b/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
index 9b4044f77f..f4aafc531a 100644
--- a/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
+++ b/gcc/testsuite/g++.dg/warn/Wdouble-promotion.C
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Wdouble-promotion" } */
+/* { dg-options "-Wdouble-promotion -ftrack-macro-expansion=2" } */
#include <stddef.h>
@@ -29,19 +29,19 @@ usual_arithmetic_conversions(void)
/* Values of type "float" are implicitly converted to "double" or
"long double" due to use in arithmetic with "double" or "long
double" operands. */
- local_f = f + 1.0; /* { dg-warning "implicit" } */
- local_f = f - d; /* { dg-warning "implicit" } */
- local_f = 1.0f * 1.0; /* { dg-warning "implicit" } */
- local_f = 1.0f / d; /* { dg-warning "implicit" } */
-
- local_cf = cf + 1.0; /* { dg-warning "implicit" } */
- local_cf = cf - d; /* { dg-warning "implicit" } */
- local_cf = cf + 1.0 * ID; /* { dg-warning "implicit" } */
- local_cf = cf - cd; /* { dg-warning "implicit" } */
+ local_f = f + 1.0; /* { dg-warning "15:implicit" } */
+ local_f = f - d; /* { dg-warning "15:implicit" } */
+ local_f = 1.0f * 1.0; /* { dg-warning "18:implicit" } */
+ local_f = 1.0f / d; /* { dg-warning "18:implicit" } */
+
+ local_cf = cf + 1.0; /* { dg-warning "17:implicit" } */
+ local_cf = cf - d; /* { dg-warning "17:implicit" } */
+ local_cf = cf + 1.0 * ID; /* { dg-warning "17:implicit" } */
+ local_cf = cf - cd; /* { dg-warning "17:implicit" } */
- local_f = i ? f : d; /* { dg-warning "implicit" } */
- i = f == d; /* { dg-warning "implicit" } */
- i = d != f; /* { dg-warning "implicit" } */
+ local_f = i ? f : d; /* { dg-warning "15:implicit" } */
+ i = f == d; /* { dg-warning "9:implicit" } */
+ i = d != f; /* { dg-warning "9:implicit" } */
}
void
diff --git a/gcc/testsuite/g++.dg/warn/Weff1.C b/gcc/testsuite/g++.dg/warn/Weff1.C
deleted file mode 100644
index a00dc29bf5..0000000000
--- a/gcc/testsuite/g++.dg/warn/Weff1.C
+++ /dev/null
@@ -1,5 +0,0 @@
-// { dg-options "-Weffc++" }
-
-struct S {};
-/* Base classes should have virtual destructors. */
-struct T : public S {}; // { dg-warning "" }
diff --git a/gcc/testsuite/g++.dg/warn/Winit-self.C b/gcc/testsuite/g++.dg/warn/Winit-self.C
new file mode 100644
index 0000000000..60a7274166
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Winit-self.C
@@ -0,0 +1,8 @@
+// PR c++/53210
+// { dg-options "-Wall" }
+
+struct S
+{
+ S(int i) : j(j) { } // { dg-warning "is initialized with itself" }
+ int j;
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wno-return-local-addr.C b/gcc/testsuite/g++.dg/warn/Wno-return-local-addr.C
new file mode 100644
index 0000000000..e15bfa24f5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wno-return-local-addr.C
@@ -0,0 +1,26 @@
+// { dg-do assemble }
+// { dg-options "-Wno-return-local-addr" }
+
+int& bad1()
+{
+ int x = 0;
+ return x;
+}
+
+int* bad2()
+{
+ int x = 0;
+ return &x;
+}
+
+int f();
+
+const int& bad3()
+{
+ return f();
+}
+
+const int& bad4()
+{
+ return int();
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C b/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C
index 511f091f2c..84a1d380bb 100644
--- a/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wnull-conversion-1.C
@@ -9,7 +9,7 @@ void func2() {
int* t = false; // { dg-warning "converting 'false' to pointer" }
int* p;
p = false; // { dg-warning "converting 'false' to pointer" }
- int* r = sizeof(char) / 2;
+ int* r = sizeof(char) / 2; // { dg-error "invalid conversion from" "" { target c++11 } }
func1(false); // { dg-warning "converting 'false' to pointer" }
int i = NULL; // { dg-warning "converting to non-pointer" }
}
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
index d40de3d7c1..9f2e4bea43 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-2.C
@@ -6,18 +6,18 @@
// destructor, in which case it would be possible but unsafe to delete
// an instance of a derived class through a pointer to the base class.
-struct A // { dg-bogus "non-virtual destructor" }
+struct A
{
protected:
- ~A();
+ ~A(); // inaccessible - no warning
public:
virtual void f() = 0;
};
-struct B // { dg-bogus "non-virtual destructor" }
+struct B
{
private:
- ~B();
+ ~B(); // inaccessible - no warning
public:
virtual void f() = 0;
};
@@ -52,3 +52,25 @@ private:
public:
virtual void f() = 0;
};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
new file mode 100644
index 0000000000..e83134b062
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-3.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B(); // inaccessible - no warning
+public:
+ virtual void f() = 0;
+};
+
+struct C // { dg-warning "non-virtual destructor" }
+{
+ virtual void f() = 0;
+};
+
+struct D // { dg-warning "non-virtual destructor" }
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F // { dg-warning "non-virtual destructor" }
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G // { dg-warning "non-virtual destructor" }
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H // { dg-warning "accessible non-virtual destructor" }
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K // { dg-warning "accessible non-virtual destructor" }
+{
+ virtual void k ();
+};
+
+struct L1 : K // { dg-warning "accessible non-virtual destructor" }
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
new file mode 100644
index 0000000000..dd6d9d7689
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor-4.C
@@ -0,0 +1,75 @@
+// { dg-do compile }
+// { dg-options "-Weffc++ -Wno-non-virtual-dtor" }
+
+// Warn when a class has virtual functions and accessible non-virtual
+// destructor, in which case it would be possible but unsafe to delete
+// an instance of a derived class through a pointer to the base class.
+
+struct A
+{
+protected:
+ ~A();
+public:
+ virtual void f() = 0;
+};
+
+struct B
+{
+private:
+ ~B();
+public:
+ virtual void f() = 0;
+};
+
+struct C
+{
+ virtual void f() = 0;
+};
+
+struct D
+{
+ ~D();
+ virtual void f() = 0;
+};
+
+struct E;
+
+struct F
+{
+protected:
+ friend class E;
+ ~F();
+public:
+ virtual void f() = 0;
+};
+
+struct G
+{
+private:
+ friend class E;
+ ~G();
+public:
+ virtual void f() = 0;
+};
+
+struct H {};
+
+struct I1 : H
+{};
+struct I2 : private H
+{};
+
+struct J1 : H
+{ virtual ~J1 ();};
+struct J2 : private H
+{ virtual ~J2 ();};
+
+struct K
+{
+ virtual void k ();
+};
+
+struct L1 : K
+{virtual ~L1 ();};
+struct L2 : private K
+{virtual ~L2 ();};
diff --git a/gcc/testsuite/g++.dg/warn/Wnvdtor.C b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
index b04fdcbe6b..f03cff5b31 100644
--- a/gcc/testsuite/g++.dg/warn/Wnvdtor.C
+++ b/gcc/testsuite/g++.dg/warn/Wnvdtor.C
@@ -8,3 +8,4 @@ extern "Java"
virtual void bar( void);
};
}
+
diff --git a/gcc/testsuite/g++.dg/warn/Wparentheses-26.C b/gcc/testsuite/g++.dg/warn/Wparentheses-26.C
index 6fd441770d..4525bfdcdf 100644
--- a/gcc/testsuite/g++.dg/warn/Wparentheses-26.C
+++ b/gcc/testsuite/g++.dg/warn/Wparentheses-26.C
@@ -4,23 +4,23 @@
template<int i, int j = ((i + 7) >> 3)> class foo1 { };
typedef foo1<10> bar1;
-template<int i, int j = (i + 7 >> 3)> class foo2 { };
-typedef foo2<10> bar2; // { dg-warning "suggest parentheses around '\\+'" }
+template<int i, int j = (i + 7 >> 3)> class foo2 { }; // { dg-warning "suggest parentheses around '\\+'" }
+typedef foo2<10> bar2;
template<int i, int j = (100 >> (i + 2))> class foo3 { };
typedef foo3<3> bar3;
-template<int i, int j = (100 >> i + 2)> class foo4 { };
-typedef foo4<3> bar4; // { dg-warning "suggest parentheses around '\\+'" }
+template<int i, int j = (100 >> i + 2)> class foo4 { }; // { dg-warning "suggest parentheses around '\\+'" }
+typedef foo4<3> bar4;
template<int i, int j = (i + 7) | 3> class foo5 { };
typedef foo5<10> bar5;
-template<int i, int j = i + 7 | 3> class foo6 { };
-typedef foo6<10> bar6; // { dg-warning "suggest parentheses around arithmetic" }
+template<int i, int j = i + 7 | 3> class foo6 { }; // { dg-warning "suggest parentheses around arithmetic" }
+typedef foo6<10> bar6;
template<int i, int j = 3 | (i + 7)> class foo7 { };
typedef foo7<10> bar7;
-template<int i, int j = 3 | i + 7> class foo8 { };
-typedef foo8<10> bar8; // { dg-warning "suggest parentheses around arithmetic" }
+template<int i, int j = 3 | i + 7> class foo8 { }; // { dg-warning "suggest parentheses around arithmetic" }
+typedef foo8<10> bar8;
diff --git a/gcc/testsuite/g++.dg/warn/Wparentheses-27.C b/gcc/testsuite/g++.dg/warn/Wparentheses-27.C
new file mode 100644
index 0000000000..7c05f7e806
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wparentheses-27.C
@@ -0,0 +1,8 @@
+// PR c++/54194
+// { dg-options "-Wparentheses" }
+
+int main()
+{
+ char in[4] = { 0 };
+ in[1] = in[1] & 0x0F | ((in[3] & 0x3C) << 2); // { dg-warning "17:suggest parentheses" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wpointer-arith-1.C b/gcc/testsuite/g++.dg/warn/Wpointer-arith-1.C
new file mode 100644
index 0000000000..a4aa696089
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wpointer-arith-1.C
@@ -0,0 +1,13 @@
+// PR c++/56815
+// { dg-options "-Wpointer-arith" }
+
+int main()
+{
+ void *pv = 0;
+ pv++; // { dg-warning "forbids incrementing a pointer" }
+
+ typedef void (*pft) ();
+
+ pft pf = 0;
+ pf++; // { dg-warning "forbids incrementing a pointer" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wredundant-decls-spec.C b/gcc/testsuite/g++.dg/warn/Wredundant-decls-spec.C
index b5c790f474..3a9b019b67 100644
--- a/gcc/testsuite/g++.dg/warn/Wredundant-decls-spec.C
+++ b/gcc/testsuite/g++.dg/warn/Wredundant-decls-spec.C
@@ -8,5 +8,5 @@ template <typename T> struct S
template<> void S<int>::foo();
-template<> void S<double>::foo(); // { dg-warning "previous declaration" }
+template<> void S<double>::foo(); // { dg-message "previous declaration" }
template<> void S<double>::foo(); // { dg-warning "redundant redeclaration" }
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C b/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C
new file mode 100644
index 0000000000..c483601e6b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-local-addr-2.C
@@ -0,0 +1,11 @@
+// PR c++/44859
+
+struct Base2 { int m_foo; };
+struct Derived2 : public Base2 {};
+
+const Base2& f8() { return Derived2(); } // { dg-warning "reference to temporary" }
+
+struct foo { };
+struct bar { foo base; };
+
+const foo& f9() { return bar().base; } // { dg-warning "reference to temporary" }
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-local-addr.C b/gcc/testsuite/g++.dg/warn/Wreturn-local-addr.C
new file mode 100644
index 0000000000..faa3a34544
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-local-addr.C
@@ -0,0 +1,20 @@
+// { dg-do assemble }
+// { dg-options "-Werror=return-local-addr" }
+// { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 }
+
+int& bad1()
+{
+ int x = 0; // { dg-error "reference to local variable" }
+ return x;
+}
+
+int* bad2()
+{
+ int x = 0; // { dg-error "address of local variable" }
+ return &x;
+}
+
+const int& bad4()
+{
+ return int(); // { dg-error "returning reference to temporary" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-10.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-10.C
new file mode 100644
index 0000000000..2043b6cf21
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-type-10.C
@@ -0,0 +1,13 @@
+// PR c++/59916
+// { dg-options "-Os -Wreturn-type" }
+
+class A {};
+
+struct B : virtual public A
+{
+ B();
+ virtual ~B();
+};
+
+B::B() {}
+B::~B() {}
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C
index df87ba490d..346cab4764 100644
--- a/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-type-8.C
@@ -1,6 +1,6 @@
// PR c++/54046
// { dg-do compile }
-// { dg-options "-O0 -Wall -Wno-unused" }
+// { dg-options "-O0 -Wall" }
void foo (void) __attribute__((noreturn));
diff --git a/gcc/testsuite/g++.dg/warn/Wreturn-type-9.C b/gcc/testsuite/g++.dg/warn/Wreturn-type-9.C
new file mode 100644
index 0000000000..1c4d5b8d1d
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wreturn-type-9.C
@@ -0,0 +1,60 @@
+// related to PR c++/55189
+// { dg-options "-Wreturn-type" }
+
+int f1()
+{
+ while (true) { }
+}
+int f2()
+{
+ while (true) { break; }
+} // { dg-warning "no return statement" }
+
+int f3()
+{
+ for (;;) {}
+}
+int f4()
+{
+ for (;;) {break;}
+} // { dg-warning "no return statement" }
+
+int f5()
+{
+ do {} while(true);
+}
+int f6()
+{
+ do {break;} while(true);
+} // { dg-warning "no return statement" }
+
+int f7()
+{
+ for(;;)
+ while (true) {break;}
+}
+
+int f8()
+{
+ for(;;)
+ {
+ while (true) {}
+ break;
+ }
+}
+
+template <class T>
+T f9()
+{
+ for(;;) { }
+}
+
+template int f9();
+
+template <class T>
+T f10()
+{
+ for(;;) { break; }
+} // { dg-warning "no return statement" }
+
+template int f10();
diff --git a/gcc/testsuite/g++.dg/warn/Wsequence-point-2.C b/gcc/testsuite/g++.dg/warn/Wsequence-point-2.C
index ab9c97a809..6e00e0233b 100644
--- a/gcc/testsuite/g++.dg/warn/Wsequence-point-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wsequence-point-2.C
@@ -1,6 +1,6 @@
// PR c++/45894
-// { dg-do compile }
-// { dg-options "-std=c++0x -Wsequence-point" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wsequence-point" }
struct F
{
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-1.C b/gcc/testsuite/g++.dg/warn/Wshadow-1.C
index 1647a010d1..aec6bca541 100644
--- a/gcc/testsuite/g++.dg/warn/Wshadow-1.C
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-1.C
@@ -18,8 +18,8 @@ struct status // { dg-bogus "shadowed declaration" }
}
};
-int decl1; // { dg-warning "shadowed declaration" }
-int decl2; // { dg-warning "shadowed declaration" }
+int decl1; // { dg-message "shadowed declaration" }
+int decl2; // { dg-message "shadowed declaration" }
void foo (struct status &status,// { dg-bogus "shadows a global decl" }
double decl1) // { dg-warning "shadows a global decl" }
{
@@ -34,7 +34,7 @@ void status::foo2 ()
{
int member; // { dg-warning "shadows a member" }
int decl2; // { dg-warning "shadows a global decl" }
- int local; // { dg-warning "shadowed declaration" }
+ int local; // { dg-message "shadowed declaration" }
{
int local; // { dg-warning "shadows a previous local" }
}
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-6.C b/gcc/testsuite/g++.dg/warn/Wshadow-6.C
index fdc37df31b..9c2e8b8946 100644
--- a/gcc/testsuite/g++.dg/warn/Wshadow-6.C
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-6.C
@@ -1,13 +1,13 @@
// Test the declaration of nested lambda function shadows
// a parameter or previous local.
-// { dg-do compile }
-// { dg-options "-std=c++0x -Wshadow" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wshadow" }
struct S {};
-int f1(int x) // { dg-warning "shadowed declaration" }
+int f1(int x) // { dg-message "shadowed declaration" }
{
int t = 0;
- int m = 0; // { dg-warning "shadowed declaration" }
+ int m = 0; // { dg-message "shadowed declaration" }
[&t] (int x) { // { dg-warning "shadows a parameter" }
int m = 1; // { dg-warning "shadows a previous local" }
t = t + x + m;
@@ -18,9 +18,9 @@ int f1(int x) // { dg-warning "shadowed declaration" }
void f2(struct S i, int j) {
struct A {
struct S x;
- void g(struct S i) { // { dg-warning "shadowed declaration" }
+ void g(struct S i) { // { dg-message "shadowed declaration" }
struct S x; // { dg-warning "shadows a member of" }
- struct S y; // { dg-warning "shadowed declaration" }
+ struct S y; // { dg-message "shadowed declaration" }
int t;
[&t](struct S i){ // { dg-warning "shadows a parameter" }
int j = 1; // { dg-bogus "shadows" }
@@ -33,7 +33,7 @@ void f2(struct S i, int j) {
void f3(int i) {
[=]{
- int j = i; // { dg-warning "shadowed declaration" }
+ int j = i; // { dg-message "shadowed declaration" }
int i; // { dg-warning "shadows a lambda capture" }
i = 1;
};
@@ -42,7 +42,7 @@ void f3(int i) {
template <class T>
void f4(int i) {
[=]{
- int j = i; // { dg-warning "shadowed declaration" }
+ int j = i; // { dg-message "shadowed declaration" }
int i; // { dg-warning "shadows a lambda capture" }
i = 1;
};
diff --git a/gcc/testsuite/g++.dg/warn/Wshadow-7.C b/gcc/testsuite/g++.dg/warn/Wshadow-7.C
index 5de952ee79..d354d0499f 100644
--- a/gcc/testsuite/g++.dg/warn/Wshadow-7.C
+++ b/gcc/testsuite/g++.dg/warn/Wshadow-7.C
@@ -1,18 +1,18 @@
// PR c++/44128
// { dg-options "-Wshadow" }
-typedef long My_ssize_t; // { dg-warning "shadowed declaration" }
-typedef int Foo; // { dg-warning "shadowed declaration" }
+typedef long My_ssize_t; // { dg-message "shadowed declaration" }
+typedef int Foo; // { dg-message "shadowed declaration" }
struct Bar1 { // { dg-bogus "shadowed declaration" }
int a;
};
-struct Bar2 { // { dg-warning "shadowed declaration" }
+struct Bar2 { // { dg-message "shadowed declaration" }
int a;
};
void func() {
typedef int My_ssize_t; // { dg-warning "shadows a global" }
- typedef char My_Num; // { dg-warning "shadowed declaration" }
+ typedef char My_Num; // { dg-message "shadowed declaration" }
{
typedef short My_Num; // { dg-warning "shadows a previous local" }
}
@@ -21,7 +21,7 @@ void func() {
struct Bar2 { // { dg-warning "shadows a global" }
int a;
};
- struct Bar3 { // { dg-warning "shadowed declaration" }
+ struct Bar3 { // { dg-message "shadowed declaration" }
int a;
};
struct Bar4 { // { dg-bogus "shadowed declaration" }
diff --git a/gcc/testsuite/g++.dg/warn/Wsign-compare-5.C b/gcc/testsuite/g++.dg/warn/Wsign-compare-5.C
new file mode 100644
index 0000000000..641c49972e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wsign-compare-5.C
@@ -0,0 +1,20 @@
+// Test that -Wsign-compare doesn't warn about
+// equality/non-equality comparisons with sizeof.
+// { dg-do compile }
+// { dg-options "-Wsign-compare" }
+
+int
+foo (int x)
+{
+ if (x != sizeof (sizeof (x))) // { dg-bogus "comparison between signed and unsigned integer expressions" }
+ return 1;
+ return 0;
+}
+
+int
+bar (int x)
+{
+ if (x == sizeof (sizeof (x)) + 1) // { dg-bogus "comparison between signed and unsigned integer expressions" }
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wsign-compare-6.C b/gcc/testsuite/g++.dg/warn/Wsign-compare-6.C
new file mode 100644
index 0000000000..1f8af664c7
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wsign-compare-6.C
@@ -0,0 +1,14 @@
+// PR c++/23608
+// { dg-options "-Wsign-compare" }
+
+#define FIVE 5
+
+int main()
+{
+ int i = 5;
+ int const ic = 5;
+
+ i < 5u; // { dg-warning "5:comparison between signed and unsigned" }
+ ic < 5u;
+ FIVE < 5u;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wsign-compare-7.C b/gcc/testsuite/g++.dg/warn/Wsign-compare-7.C
new file mode 100644
index 0000000000..51f13f6f95
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wsign-compare-7.C
@@ -0,0 +1,18 @@
+// PR c++/59231
+// { dg-options "-Wsign-compare" }
+
+template<class X, class Y>
+bool equals(X x, Y y)
+{
+ return (x == y); // { dg-warning "signed" }
+}
+
+int main()
+{
+ unsigned long x = 2;
+ signed int y = 2;
+
+ if(!equals (x, y))
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wsign-conversion-2.C b/gcc/testsuite/g++.dg/warn/Wsign-conversion-2.C
new file mode 100644
index 0000000000..1664575c6e
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wsign-conversion-2.C
@@ -0,0 +1,11 @@
+// PR c++/56530
+// { dg-options "-Wsign-conversion" }
+
+struct string
+{
+ string () {};
+ ~string () {};
+};
+
+string foo[1]; // okay
+string bar[1][1]; // gives bogus warning
diff --git a/gcc/testsuite/g++.dg/warn/Wsign-conversion.C b/gcc/testsuite/g++.dg/warn/Wsign-conversion.C
index 83fe2ed660..f6a0cccdff 100644
--- a/gcc/testsuite/g++.dg/warn/Wsign-conversion.C
+++ b/gcc/testsuite/g++.dg/warn/Wsign-conversion.C
@@ -3,7 +3,7 @@
C++ equivalent of gcc/testsuite/gcc.dg/Wsign-conversion.c */
// { dg-do compile }
-// { dg-options "-fsigned-char -Wsign-conversion" }
+// { dg-options "-fsigned-char -Wsign-conversion -ftrack-macro-expansion=0" }
#include <limits.h>
void fsc (signed char sc);
diff --git a/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C b/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
new file mode 100644
index 0000000000..e2ba8769b9
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wsizeof-pointer-memaccess-1.C
@@ -0,0 +1,13 @@
+// Test -Wsizeof-pointer-memaccess warnings.
+// { dg-do compile }
+// { dg-options "-Wall" }
+
+typedef __SIZE_TYPE__ size_t;
+extern "C" void *memset (void *, int, size_t);
+
+int
+foo (int x, char b[10])
+{
+ long a[memset (b, 0, sizeof (b)) ? x + 10 : x]; // { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length?" }
+ return a[0];
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
index 103248da48..9027061c5b 100644
--- a/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
+++ b/gcc/testsuite/g++.dg/warn/Wstrict-aliasing-float-ref-int-obj.C
@@ -4,9 +4,9 @@
int foo() {
int x;
- float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "" { target *-*-* } } */
- q = 1.0; /* { dg-warning "does break strict-aliasing" "" { xfail *-*-* } } */
+ float& q = reinterpret_cast<float&> (x); /* { dg-message "dereferencing type-punned" "deref" { target *-*-* } } */
+ q = 1.0; /* { dg-warning "does break strict-aliasing" "strict-aliasing" { xfail *-*-* } } */
return x;
}
-/* { dg-message "initialized" "" { xfail *-*-* } 7 } */
+/* { dg-message "initialized" "note" { xfail *-*-* } 7 } */
diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
index 9cbdbe5478..f840f306b7 100644
--- a/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
+++ b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C
@@ -66,7 +66,7 @@ int test (int x)
template <typename Int, Int D>
void f(Int x) {
- assert(0 <= x and x <= D); // { dg-warning "comparison is always true due to limited range of data type" }
+ assert(0 <= x and x <= D);
}
int ff(void) {
diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits.C b/gcc/testsuite/g++.dg/warn/Wtype-limits.C
index 814c2a8826..a352e7ba9b 100644
--- a/gcc/testsuite/g++.dg/warn/Wtype-limits.C
+++ b/gcc/testsuite/g++.dg/warn/Wtype-limits.C
@@ -66,7 +66,7 @@ int test (int x)
template <typename Int, Int D>
void f(Int x) {
- assert(0 <= x and x <= D); // { dg-warning "comparison is always true due to limited range of data type" }
+ assert(0 <= x and x <= D);
}
int ff(void) {
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-3.C b/gcc/testsuite/g++.dg/warn/Wunused-3.C
index 3100909435..2d00dda3fa 100644
--- a/gcc/testsuite/g++.dg/warn/Wunused-3.C
+++ b/gcc/testsuite/g++.dg/warn/Wunused-3.C
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-Wunused -O" }
+// { dg-options "-Wunused -O -fno-use-cxa-atexit" }
void do_cleanups();
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-2.C b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-2.C
new file mode 100644
index 0000000000..073e253c98
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-2.C
@@ -0,0 +1,20 @@
+// Origin PR c++/33255
+// { dg-options "-Wunused" } <-- should trigger -Wunused-local-typedefs
+// { dg-do compile { target c++11 } }
+
+template <typename C>
+struct structure
+{
+ typename C::type val;
+};
+
+int
+main()
+{
+ struct context
+ {
+ using type = int;
+ };
+
+ return structure<context>{42}.val;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-3.C b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-3.C
new file mode 100644
index 0000000000..77bacd788b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs-3.C
@@ -0,0 +1,35 @@
+/* Origin PR c++/54372
+ { dg-options "-Wunused-local-typedefs" }
+ { dg-do compile }
+*/
+
+template <typename T>
+void f2()
+{
+ typedef T t __attribute__((unused));
+}
+
+class S
+{
+ template <typename T>
+ void f4()
+ {
+ typedef T t __attribute__((unused));
+ }
+};
+
+template <typename T>
+class tS
+{
+ void f()
+ {
+ typedef T t2 __attribute__((unused));
+ }
+
+ template <typename U>
+ void f2()
+ {
+ typedef T t1 __attribute__((unused));
+ typedef U t2 __attribute__((unused));
+ }
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C
index 87feb52844..4fc8640ed7 100644
--- a/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C
+++ b/gcc/testsuite/g++.dg/warn/Wunused-local-typedefs.C
@@ -1,5 +1,5 @@
// Origin PR c++/33255
-// { dg-options "-Wunused-local-typedefs" }
+// { dg-options "-Wunused" } <-- should trigger -Wunused-local-typedefs
// { dg-do compile }
void
@@ -59,7 +59,7 @@ test3_tmpl(void)
{
typedef struct ST<int> foo;
ST<int> v;
- const foo &var = v;
+ const foo __attribute__((unused))&var = v;
}
void
@@ -72,7 +72,7 @@ void
test4(void)
{
typedef int foo;
- int vec[1] = {sizeof (foo)};
+ int __attribute__((unused))vec[1] = {sizeof (foo)};
}
void
@@ -87,11 +87,11 @@ test5(void)
typedef C0 T4;
int v0 = (T0) 2;
- char v1 = static_cast<T1> (0);
- reinterpret_cast<T2> (&v0);
+ char __attribute__((unused)) v1 = static_cast<T1> (0);
+ if (reinterpret_cast<T2> (&v0));
unsigned* const c = 0;
- unsigned* v2 = const_cast<T3* const> (c);
- C0 *p0 = 0;
+ unsigned* __attribute__((unused))v2 = const_cast<T3* const> (c);
+ C0 *__attribute__((unused))p0 = 0;
C1 *p1 = 0;
p0 = dynamic_cast<T4*> (p1);
}
@@ -101,7 +101,7 @@ test6(void)
{
struct C0 {};
typedef C0 foo;
- C0 *v = new foo;
+ C0 *__attribute__((unused))v = new foo;
}
template<class T, class U>
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C b/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C
new file mode 100644
index 0000000000..e952d0221b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-parm-5.C
@@ -0,0 +1,14 @@
+// PR c++/58362
+// { dg-options "-Wunused-parameter" }
+
+void f1 (long s) { } // { dg-warning "15:unused parameter 's'" }
+
+void f2 (long s, int u) { } // { dg-warning "15:unused parameter 's'" }
+// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 6 }
+
+void f3 (long s);
+void f3 (long s) { } // { dg-warning "15:unused parameter 's'" }
+
+void f4 (long s, int u);
+void f4 (long s, int u) { } // { dg-warning "15:unused parameter 's'" }
+// { dg-warning "22:unused parameter 'u'" "" { target *-*-* } 13 }
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-parm-6.C b/gcc/testsuite/g++.dg/warn/Wunused-parm-6.C
new file mode 100644
index 0000000000..95fb7e2dbe
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-parm-6.C
@@ -0,0 +1,8 @@
+// PR c++/61465
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused-but-set-parameter" }
+
+struct Foo {
+ Foo(void* x) : y{static_cast<char*>(x)} {}
+ char* y;
+};
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-17.C b/gcc/testsuite/g++.dg/warn/Wunused-var-17.C
new file mode 100644
index 0000000000..01650e13a4
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-17.C
@@ -0,0 +1,4 @@
+// PR c++/10416
+// { dg-options "-Wunused" }
+
+void f () { struct atend { ~atend () { __builtin_printf("leaving f\n"); } } a; }
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-18.C b/gcc/testsuite/g++.dg/warn/Wunused-var-18.C
new file mode 100644
index 0000000000..0339663721
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-18.C
@@ -0,0 +1,14 @@
+// Origin: PR c++/29028
+// { dg-options "-Wunused" }
+// { dg-do compile }
+
+namespace N
+{
+ int i; // { dg-warning "unused variable" }
+}
+
+void
+f ()
+{
+ using N::i;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-19.C b/gcc/testsuite/g++.dg/warn/Wunused-var-19.C
index 4d26b36814..75fd1e3276 100644
--- a/gcc/testsuite/g++.dg/warn/Wunused-var-19.C
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-19.C
@@ -1,6 +1,6 @@
// PR c++/55643
-// { dg-do compile }
-// { dg-options "-std=c++11 -Wunused" }
+// { dg-do compile { target c++11 } }
+// { dg-options "-Wunused" }
enum class E { e = 123 };
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-20.C b/gcc/testsuite/g++.dg/warn/Wunused-var-20.C
new file mode 100644
index 0000000000..792c25369c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-20.C
@@ -0,0 +1,19 @@
+// PR c++/38958
+// { dg-options "-Wunused" }
+
+volatile int g;
+
+struct Lock
+{
+ ~Lock() { g = 0; }
+};
+
+Lock AcquireLock() { return Lock(); }
+
+int main()
+{
+ const Lock& lock = AcquireLock();
+ g = 1;
+ g = 2;
+ g = 3;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wunused-var-21.C b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C
new file mode 100644
index 0000000000..d279e59803
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wunused-var-21.C
@@ -0,0 +1,31 @@
+// PR c++/58325
+// { dg-do compile }
+// { dg-options "-Wunused" }
+
+void
+f1 ()
+{
+ int *volatile a = new int[1];
+ delete[] a;
+}
+
+void
+f2 ()
+{
+ int *b = new int[1];
+ delete[] b;
+}
+
+void
+f3 ()
+{
+ int *volatile c = new int;
+ delete c;
+}
+
+void
+f4 ()
+{
+ int *d = new int;
+ delete d;
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wuseless-cast.C b/gcc/testsuite/g++.dg/warn/Wuseless-cast.C
new file mode 100644
index 0000000000..6f0e2cfb0b
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/Wuseless-cast.C
@@ -0,0 +1,129 @@
+// { dg-options "-Wuseless-cast" }
+
+template<typename T>
+ void tmpl_f1(T& t)
+ {
+ (int)(t);
+ static_cast<int>(t);
+ reinterpret_cast<int>(t);
+
+ (int*)(&t);
+ const_cast<int*>(&t);
+ static_cast<int*>(&t);
+ reinterpret_cast<int*>(&t);
+
+ (int&)(t);
+ const_cast<int&>(t);
+ static_cast<int&>(t);
+ reinterpret_cast<int&>(t);
+ }
+
+template<typename T>
+ void tmpl_f2(T t)
+ {
+ (int&)(t);
+ const_cast<int&>(t);
+ static_cast<int&>(t);
+ reinterpret_cast<int&>(t);
+ }
+
+struct A { };
+
+template<typename T>
+ void tmpl_f3(T& t)
+ {
+ (A)(t);
+ static_cast<A>(t);
+
+ (A*)(&t);
+ const_cast<A*>(&t);
+ static_cast<A*>(&t);
+ reinterpret_cast<A*>(&t);
+ dynamic_cast<A*>(&t);
+
+ (A&)(t);
+ const_cast<A&>(t);
+ static_cast<A&>(t);
+ reinterpret_cast<A&>(t);
+ dynamic_cast<A&>(t);
+ }
+
+template<typename T>
+ void tmpl_f4(T t)
+ {
+ (A&)(t);
+ const_cast<A&>(t);
+ static_cast<A&>(t);
+ reinterpret_cast<A&>(t);
+ dynamic_cast<A&>(t);
+ }
+
+A prvalue();
+
+void f()
+{
+ int n;
+
+ (int)(n); // { dg-warning "useless cast" }
+ static_cast<int>(n); // { dg-warning "useless cast" }
+ reinterpret_cast<int>(n); // { dg-warning "useless cast" }
+
+ (int*)(&n); // { dg-warning "useless cast" }
+ const_cast<int*>(&n); // { dg-warning "useless cast" }
+ static_cast<int*>(&n); // { dg-warning "useless cast" }
+ reinterpret_cast<int*>(&n); // { dg-warning "useless cast" }
+
+ int& m = n;
+
+ (int&)(m); // { dg-warning "useless cast" }
+ const_cast<int&>(m); // { dg-warning "useless cast" }
+ static_cast<int&>(m); // { dg-warning "useless cast" }
+ reinterpret_cast<int&>(m); // { dg-warning "useless cast" }
+
+ tmpl_f1(m);
+
+ (int&)(n); // { dg-warning "useless cast" }
+ const_cast<int&>(n); // { dg-warning "useless cast" }
+ static_cast<int&>(n); // { dg-warning "useless cast" }
+ reinterpret_cast<int&>(n); // { dg-warning "useless cast" }
+
+ tmpl_f2(n);
+
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+ (int&&)(42);
+ static_cast<int&&>(42);
+
+ (A&&)(prvalue());
+ const_cast<A&&>(prvalue());
+ static_cast<A&&>(prvalue());
+#endif
+
+ A a;
+
+ (A)(a); // { dg-warning "useless cast" }
+ static_cast<A>(a); // { dg-warning "useless cast" }
+
+ (A*)(&a); // { dg-warning "useless cast" }
+ const_cast<A*>(&a); // { dg-warning "useless cast" }
+ static_cast<A*>(&a); // { dg-warning "useless cast" }
+ reinterpret_cast<A*>(&a); // { dg-warning "useless cast" }
+ dynamic_cast<A*>(&a); // { dg-warning "useless cast" }
+
+ A& b = a;
+
+ (A&)(b); // { dg-warning "useless cast" }
+ const_cast<A&>(b); // { dg-warning "useless cast" }
+ static_cast<A&>(b); // { dg-warning "useless cast" }
+ static_cast<A&>(b); // { dg-warning "useless cast" }
+ dynamic_cast<A&>(b); // { dg-warning "useless cast" }
+
+ tmpl_f3(b);
+
+ (A&)(a); // { dg-warning "useless cast" }
+ const_cast<A&>(a); // { dg-warning "useless cast" }
+ static_cast<A&>(a); // { dg-warning "useless cast" }
+ reinterpret_cast<A&>(a); // { dg-warning "useless cast" }
+ dynamic_cast<A&>(a); // { dg-warning "useless cast" }
+
+ tmpl_f4(a);
+}
diff --git a/gcc/testsuite/g++.dg/warn/Wvla-2.C b/gcc/testsuite/g++.dg/warn/Wvla-2.C
index ba83ac1a9f..df479d0b0b 100644
--- a/gcc/testsuite/g++.dg/warn/Wvla-2.C
+++ b/gcc/testsuite/g++.dg/warn/Wvla-2.C
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! c++1y } } } */
/* { dg-options "-pedantic-errors -Wvla" } */
void func (int i)
diff --git a/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.C b/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.C
new file mode 100644
index 0000000000..7d1e89edf5
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.C
@@ -0,0 +1,12 @@
+// PR c++/57137
+
+#include "anonymous-namespace-4.h"
+
+namespace
+{
+ class NonCloneable;
+ void fn1 ()
+ {
+ is_function_impl < NonCloneable > i;
+ }
+}
diff --git a/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.h b/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.h
new file mode 100644
index 0000000000..e0b7d68c13
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/anonymous-namespace-4.h
@@ -0,0 +1,14 @@
+template < typename T > struct integral_c {
+ static const T value = 0;
+};
+struct is_reference:integral_c < bool > { };
+template < class > struct is_function_ptr_helper { };
+template < bool > struct is_function_chooser;
+
+template <> struct is_function_chooser <0 >
+{
+ template < typename T > struct result_:is_function_ptr_helper < T * > { };
+};
+
+template < typename T > struct is_function_impl:is_function_chooser <
+ is_reference::value >::result_ < T > { };
diff --git a/gcc/testsuite/g++.dg/warn/anonymous-namespace-5.C b/gcc/testsuite/g++.dg/warn/anonymous-namespace-5.C
new file mode 100644
index 0000000000..6f5a081d89
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/anonymous-namespace-5.C
@@ -0,0 +1,8 @@
+namespace {
+ void f(); // { dg-message "never defined" }
+}
+
+int main()
+{
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/warn/anonymous-namespace-6.C b/gcc/testsuite/g++.dg/warn/anonymous-namespace-6.C
new file mode 100644
index 0000000000..d238df392c
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/anonymous-namespace-6.C
@@ -0,0 +1,8 @@
+// PR c++/53711
+// { dg-options -Wall }
+
+namespace {
+ void f () // { dg-warning "not used" }
+ {
+ }
+}
diff --git a/gcc/testsuite/g++.dg/warn/conversion-real-integer-3.h b/gcc/testsuite/g++.dg/warn/conversion-real-integer-3.h
new file mode 100644
index 0000000000..6ed5b2c42a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/conversion-real-integer-3.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+
+#define INT_MAX __INT_MAX__
diff --git a/gcc/testsuite/g++.dg/warn/delete-array-1.C b/gcc/testsuite/g++.dg/warn/delete-array-1.C
new file mode 100644
index 0000000000..c3af71323a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/delete-array-1.C
@@ -0,0 +1,11 @@
+// PR c++/29185
+
+int a [1];
+struct S { int a [1]; } s;
+
+void foo (S *p)
+{
+ delete a; // { dg-warning "deleting array" }
+ delete s.a; // { dg-warning "deleting array" }
+ delete p->a; // { dg-warning "deleting array" }
+}
diff --git a/gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C b/gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C
index c4acbde26a..f5727ea90a 100644
--- a/gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C
+++ b/gcc/testsuite/g++.dg/warn/delete-non-virtual-dtor.C
@@ -1,5 +1,5 @@
-// { dg-options "-std=gnu++0x -Wdelete-non-virtual-dtor" }
-// { dg-do compile }
+// { dg-options "-Wdelete-non-virtual-dtor" }
+// { dg-do compile { target c++11 } }
struct polyBase { virtual void f(); };
diff --git a/gcc/testsuite/g++.dg/warn/deprecated-7.C b/gcc/testsuite/g++.dg/warn/deprecated-7.C
new file mode 100644
index 0000000000..f564a1bb0a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/deprecated-7.C
@@ -0,0 +1,17 @@
+// PR c++/56130
+
+int g_nn;
+int& g_n __attribute__((deprecated)) = g_nn;
+
+void f()
+{
+ int f_nn;
+ int& f_n __attribute__((deprecated)) = f_nn;
+ f_n = 1; // { dg-warning "'f_n' is deprecated" }
+}
+
+int main()
+{
+ g_n = 1; // { dg-warning "'g_n' is deprecated" }
+ f();
+}
diff --git a/gcc/testsuite/g++.dg/warn/deprecated-8.C b/gcc/testsuite/g++.dg/warn/deprecated-8.C
new file mode 100644
index 0000000000..801811029a
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/deprecated-8.C
@@ -0,0 +1,15 @@
+// PR c++/58305
+
+class ToBeDeprecated {
+} __attribute__ ((deprecated ("deprecated!")));
+
+typedef ToBeDeprecated NotToBeDeprecated; // { dg-warning "'ToBeDeprecated' is deprecated" }
+
+int main() {
+
+ ToBeDeprecated(); // { dg-warning "'ToBeDeprecated' is deprecated" }
+ ToBeDeprecated x; // { dg-warning "'ToBeDeprecated' is deprecated" }
+
+ NotToBeDeprecated();
+ NotToBeDeprecated y;
+}
diff --git a/gcc/testsuite/g++.dg/warn/format8.C b/gcc/testsuite/g++.dg/warn/format8.C
new file mode 100644
index 0000000000..16b223ef86
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/format8.C
@@ -0,0 +1,7 @@
+// PR c++/52818
+// { dg-options "-pedantic-errors -Wformat" }
+
+extern "C" int printf (const char *, ...);
+void f() {
+ printf("%lf", 0.0); // { dg-warning "%lf" "" { target { ! c++11 } } }
+}
diff --git a/gcc/testsuite/g++.dg/warn/miss-format-1.C b/gcc/testsuite/g++.dg/warn/miss-format-1.C
index a35cd9ca9a..0b3f6e952c 100644
--- a/gcc/testsuite/g++.dg/warn/miss-format-1.C
+++ b/gcc/testsuite/g++.dg/warn/miss-format-1.C
@@ -4,7 +4,7 @@
/* { dg-options "-Wmissing-format-attribute" } */
/* { dg-options "-Wmissing-format-attribute -Wno-abi" { target arm_eabi } } */
/* VxWorks does not provide vscanf, either in kernel or RTP mode. */
-/* { dg-error "not declared" "" { target { *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } 26 } */
+/* { dg-error "not declared" "" { target *-*-vxworks* } 26 } */
#include <stdio.h>
#include <stdarg.h>
@@ -23,7 +23,7 @@ bar (const char *fmt, ...)
{
va_list ap;
va_start (ap, fmt);
- vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-solaris2.8 *-*-vxworks* alpha*-dec-osf* } } */
+ vscanf (fmt, ap); /* { dg-warning "candidate" "scanf attribute warning" { xfail *-*-vxworks* } } */
va_end (ap);
}
diff --git a/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C b/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C
index 489930211e..c941c13332 100644
--- a/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C
+++ b/gcc/testsuite/g++.dg/warn/multiple-overflow-warn-1.C
@@ -1,6 +1,6 @@
/* PR c/19978 : Test for duplicated warnings (unary operators). */
/* { dg-do compile } */
-/* { dg-options "-Woverflow" } */
+/* { dg-options "-Woverflow -ftrack-macro-expansion=0" } */
#include <limits.h>
diff --git a/gcc/testsuite/g++.dg/warn/pmf2.C b/gcc/testsuite/g++.dg/warn/pmf2.C
index be138190b0..cce52b0aa8 100644
--- a/gcc/testsuite/g++.dg/warn/pmf2.C
+++ b/gcc/testsuite/g++.dg/warn/pmf2.C
@@ -3,8 +3,6 @@
struct Foo
{
- Foo();
- Foo(const Foo&);
void call()
{}
};
diff --git a/gcc/testsuite/g++.dg/warn/pr13358-3.C b/gcc/testsuite/g++.dg/warn/pr13358-3.C
index f23e7d97e3..7ae0e23616 100644
--- a/gcc/testsuite/g++.dg/warn/pr13358-3.C
+++ b/gcc/testsuite/g++.dg/warn/pr13358-3.C
@@ -1,8 +1,8 @@
// PR c++/13358: g++ should accept a long long constant sans LL suffix
// if -Wno-long-long is in use
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
// { dg-require-effective-target int32plus }
-// { dg-options "-std=c++0x -pedantic-errors" }
+// { dg-options "-pedantic-errors" }
void use_longlong ()
diff --git a/gcc/testsuite/g++.dg/warn/pr13358-4.C b/gcc/testsuite/g++.dg/warn/pr13358-4.C
index b9a59ca62c..3aaeb8573e 100644
--- a/gcc/testsuite/g++.dg/warn/pr13358-4.C
+++ b/gcc/testsuite/g++.dg/warn/pr13358-4.C
@@ -1,8 +1,8 @@
// PR c++/13358: g++ should accept a long long constant sans LL suffix
// if -Wno-long-long is in use.
-// { dg-do compile }
+// { dg-do compile { target c++11 } }
// { dg-require-effective-target int32plus }
-// { dg-options "-std=c++0x -pedantic-errors -Wlong-long" }
+// { dg-options "-pedantic-errors -Wlong-long" }
void use_longlong ()
diff --git a/gcc/testsuite/g++.dg/warn/pr15774-1.C b/gcc/testsuite/g++.dg/warn/pr15774-1.C
index 116ec835d9..6148ffecb5 100644
--- a/gcc/testsuite/g++.dg/warn/pr15774-1.C
+++ b/gcc/testsuite/g++.dg/warn/pr15774-1.C
@@ -1,6 +1,6 @@
// { dg-do compile { target { { i?86-*-* x86_64-*-* } && ia32 } } }
// Test that an new declartion with different attributes then old one fail.
-extern void foo (int); // { dg-error "ambiguates old declaration" }
+extern void foo (int); // { dg-message "old declaration" }
void
bar (void)
diff --git a/gcc/testsuite/g++.dg/warn/pr23075.C b/gcc/testsuite/g++.dg/warn/pr23075.C
index e5b1b483d7..59e93be48f 100644
--- a/gcc/testsuite/g++.dg/warn/pr23075.C
+++ b/gcc/testsuite/g++.dg/warn/pr23075.C
@@ -6,4 +6,4 @@ int
foo (void)
{
return; // { dg-error "with no value" }
-} // { dg-warning "no return statement" }
+} // { dg-bogus "no return statement" }
diff --git a/gcc/testsuite/g++.dg/warn/pr31246.C b/gcc/testsuite/g++.dg/warn/pr31246.C
index a96dc96c19..f3603af478 100644
--- a/gcc/testsuite/g++.dg/warn/pr31246.C
+++ b/gcc/testsuite/g++.dg/warn/pr31246.C
@@ -1,7 +1,6 @@
// PR 31246
// { dg-do compile }
// { dg-options "-Wunreachable-code -D_GLIBCXX_DEBUG" }
-// { dg-xfail-if "lack of weak symbols" { alpha*-dec-osf* } }
#include <vector>
int main()
diff --git a/gcc/testsuite/g++.dg/warn/pr33738.C b/gcc/testsuite/g++.dg/warn/pr33738.C
index e84fece13f..60ee0b4841 100644
--- a/gcc/testsuite/g++.dg/warn/pr33738.C
+++ b/gcc/testsuite/g++.dg/warn/pr33738.C
@@ -18,6 +18,7 @@ int main() {
if (a2 == -1) { // { dg-warning "always false due" }
link_error ();
}
+ a2 = static_cast<Alpha>(GetM1());
if (-1 == a2) { // { dg-warning "always false due" }
link_error ();
}
diff --git a/gcc/testsuite/g++.dg/warn/pr35635.C b/gcc/testsuite/g++.dg/warn/pr35635.C
index 66ade8b28e..de68ceb484 100644
--- a/gcc/testsuite/g++.dg/warn/pr35635.C
+++ b/gcc/testsuite/g++.dg/warn/pr35635.C
@@ -62,9 +62,9 @@ void func3()
/* At least one branch of ? does not fit in the destination, thus
warn. */
uchar_x = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion" } */
- uchar_x = bar != 0
+ uchar_x = bar != 0 /* { dg-warning "negative integer implicitly converted to unsigned type" } */
? (unsigned char) 1024
- : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
+ : -1;
}
void func4()
diff --git a/gcc/testsuite/g++.dg/warn/warn_unused.C b/gcc/testsuite/g++.dg/warn/warn_unused.C
new file mode 100644
index 0000000000..af687fc167
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/warn_unused.C
@@ -0,0 +1,22 @@
+// { dg-do compile }
+// { dg-options -Wunused }
+
+struct __attribute__((warn_unused)) Test
+{
+ Test();
+ ~Test();
+ void use();
+};
+
+struct TestNormal
+{
+ TestNormal();
+};
+
+int main()
+{
+ Test unused; // { dg-warning "unused variable" }
+ Test used; // { dg-bogus "unused variable" }
+ TestNormal normal; // { dg-bogus "unused variable" }
+ used.use();
+}
diff --git a/gcc/testsuite/g++.dg/warn/wdate-time.C b/gcc/testsuite/g++.dg/warn/wdate-time.C
new file mode 100644
index 0000000000..0ff27b4cd6
--- /dev/null
+++ b/gcc/testsuite/g++.dg/warn/wdate-time.C
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Wdate-time" } */
+
+const char time[] = __TIME__; /* { dg-warning "might prevent reproducible builds" } */
+const char date[] = __DATE__; /* { dg-warning "might prevent reproducible builds" } */
+const char timestamp[] = __TIMESTAMP__; /* { dg-warning "might prevent reproducible builds" } */
diff --git a/gcc/testsuite/g++.dg/warn/weak1.C b/gcc/testsuite/g++.dg/warn/weak1.C
index 8a50030bc9..456e6f34c5 100644
--- a/gcc/testsuite/g++.dg/warn/weak1.C
+++ b/gcc/testsuite/g++.dg/warn/weak1.C
@@ -1,8 +1,8 @@
// { dg-do run }
// { dg-require-weak "" }
-// The PA HP-UX and Tru64 UNIX dynamic loaders don't support unsatisfied
-// weak symbols.
-// { dg-skip-if "No unsat" { alpha*-dec-osf* hppa*-*-hpux* } { "*" } { "" } }
+// The PA HP-UX dynamic loader doesn't support unsatisfied weak symbols.
+// { dg-skip-if "No unsat" { hppa*-*-hpux* } { "*" } { "" } }
+// { dg-skip-if "No weak unsat" { *-*-aix* } { "*" } { "" } }
// The darwin loader does, but they do need to exist at link time.
// { dg-skip-if "No link unsat" { *-*-darwin* } { "*" } { "" } }
// For kernel modules and static RTPs, the loader treats undefined weak
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C b/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C
index 24f430bd64..4eb1ce94a7 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/aggregates.C
@@ -1,4 +1,4 @@
-// { dg-do run { target i?86-*-linux* x86_64-*-linux* i?86-*-freebsd* } }
+// { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
// Origin: Alex Samuel <samuel@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/align.C b/gcc/testsuite/g++.old-deja/g++.abi/align.C
index 037add32c8..b8966859c3 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/align.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/align.C
@@ -1,4 +1,4 @@
-// { dg-do run { target i?86-*-linux* x86_64-*-linux* i?86-*-freebsd* i?86-*-darwin* } }
+// { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* i?86-*-darwin* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
// Origin: Alex Samuel <samuel@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C b/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C
index d5c3192095..504a0e9b27 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/bitfields.C
@@ -1,4 +1,4 @@
-// { dg-do run { target i?86-*-linux* x86_64-*-linux* i?86-*-freebsd* } }
+// { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* i?86-*-freebsd* } }
// { dg-require-effective-target ilp32 }
// { dg-options "-malign-double" }
// Origin: Alex Samuel <samuel@codesourcery.com>
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
index f3d602ffd3..d52637281f 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/cxa_vec.C
@@ -5,7 +5,7 @@
// are resolved when the kernel is linked.
// { dg-do run { xfail { powerpc-ibm-aix* || vxworks_kernel } } }
// { dg-options "-flat_namespace" { target *-*-darwin[67]* } }
-// Avoid use of none-overridable new/delete operators in shared
+// Avoid use of non-overridable new/delete operators in shared
// { dg-options "-static" { target *-*-mingw* } }
// Test __cxa_vec routines
// Copyright (C) 2000, 2005 Free Software Foundation, Inc.
diff --git a/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C b/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
index 077fa50840..341735879c 100644
--- a/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
+++ b/gcc/testsuite/g++.old-deja/g++.abi/ptrmem.C
@@ -7,7 +7,7 @@
function. However, some platforms use all bits to encode a
function pointer. Such platforms use the lowest bit of the delta,
that is shifted left by one bit. */
-#if defined __MN10300__ || defined __SH5__ || defined __arm__ || defined __thumb__ || defined __mips__
+#if defined __MN10300__ || defined __SH5__ || defined __arm__ || defined __thumb__ || defined __mips__ || defined __aarch64__
#define ADJUST_PTRFN(func, virt) ((void (*)())(func))
#define ADJUST_DELTA(delta, virt) (((delta) << 1) + !!(virt))
#else
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
deleted file mode 100644
index aa5530fff7..0000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-1.C
+++ /dev/null
@@ -1,21 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bahamian {
-public:
- bahamian ();
- ~bahamian ();
-};
-
-class miami : public bahamian // { dg-warning "" } // WARNING -
-{
-public:
- miami ();
- ~miami ();
-};
-
-
-
-
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C b/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
deleted file mode 100644
index 2831797312..0000000000
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/15309-2.C
+++ /dev/null
@@ -1,10 +0,0 @@
-// { dg-do assemble }
-// { dg-options "-Wnon-virtual-dtor -Weffc++" }
-// 981203 bkoz
-// g++/15309
-
-class bermuda { // { dg-warning "" } // WARNING -
-public:
- virtual int func1(int);
- ~bermuda();
-};
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C b/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
index d41c26b498..e900c9f7e0 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/p12475.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
// prms-id: 12475
#include <limits.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C b/gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C
index d5ed39af36..af65162cf1 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/typedef01.C
@@ -16,7 +16,7 @@ typedef int I;
typedef I I;
//p3--cannot redefine to a different type in a given scope
-class complex2 { /* ... */ };// { dg-error "" } .*
+class complex2 { /* ... */ };// { dg-message "" } .*
typedef int complex2;// { dg-error "" } .*
typedef int complex3;// { dg-message "" } .*
class complex3 { /* ... */ };// { dg-error "" } .*
diff --git a/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C b/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C
index 248e1ed9ff..a3d23747b4 100644
--- a/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C
+++ b/gcc/testsuite/g++.old-deja/g++.benjamin/warn02.C
@@ -44,11 +44,5 @@ public:
int b;
};
+extern int foo3(const char *); // { dg-message "" }
extern int foo3(const char *); // { dg-warning "" }
-extern int foo3(const char *); // { dg-warning "" }
-
-
-
-
-
-
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/README b/gcc/testsuite/g++.old-deja/g++.brendan/README
index c547c1bdda..ba3bded1c2 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/README
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/README
@@ -40,7 +40,7 @@ visibility - access control and visibility checking
warnings - warning messages
-Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+Copyright (C) 1997-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/array1.C b/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
index a58d3363bc..d2084f634c 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/array1.C
@@ -1,5 +1,4 @@
// { dg-do assemble }
-// { dg-options "-fconserve-space -fcommon" }
// GROUPS passed array-bindings
extern "C" int printf (const char *, ...);
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
index 674fc4fa67..5e6acc8c61 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash16.C
@@ -5,7 +5,7 @@
class Graph { // { dg-error "1:new types|1: note: \\(perhaps" }
public:
unsigned char N;
- Graph(void) {} // { dg-error "7:'Graph" }
+ Graph(void) {} // { dg-message "7:'Graph" }
}
Graph::Graph(void) // { dg-error "18:return type|1: error: redefinition" }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash18.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash18.C
index 119ba46053..3119f02ede 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash18.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash18.C
@@ -7,7 +7,7 @@ public:
Pix(const Pix&);
// Friend functions so that v == x works as does x == v works
- friend int operator==(void *v, const Pix& x) // { dg-error "previously" }
+ friend int operator==(void *v, const Pix& x) // { dg-message "previously" }
{ return v == index; } // { dg-error "from this location" }
// ??? should be operator!=
friend int operator==(void *v, const Pix& x) // { dg-error "redefinition" }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C
index 8777ef82cf..4b34a520f6 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash42.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
// GROUPS passed old-abort
-int fn();// { dg-error "" } ambiguates.*
+int fn();// { dg-message "" } ambiguates.*
int x;
int& fn() {// { dg-error "" } new decl.*
return x;}
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
index 6db818aa10..1318ea6e9f 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash52.C
@@ -5,9 +5,9 @@
class A {
public:
- friend A f(A &a);// { dg-error "ambiguates" }
+ friend A f(A &a);// { dg-message "old declaration" }
};
-A &f(A &a) {// { dg-error "new decl" }
+A &f(A &a) {// { dg-error "new declaration" }
std::cout << "Blah\n";
} // { dg-warning "no return statement" }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C
index 8295962411..3faa538253 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash55.C
@@ -1,6 +1,6 @@
// { dg-do compile }
// GROUPS passed old-abort
- extern int f(int); // { dg-error "ambiguates" }
+ extern int f(int); // { dg-message "old declaration" }
int& f(int x) // { dg-error "new declaration" }
{
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/crash64.C b/gcc/testsuite/g++.old-deja/g++.brendan/crash64.C
index 5fd31a6a2e..c9ee80fc92 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/crash64.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/crash64.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
// GROUPS passed old-abort
typedef __SIZE_TYPE__ size_t;
typedef void (*RF_Ptr)(void *);
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C b/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
index 544d59bf49..f67602d29d 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/cvt1.C
@@ -5,7 +5,7 @@
class Thing
{
public:
- typedef enum { GOOD_THING, BAD_THING, } ThingType ; // { dg-error "" "comma" { target c++98 } }
+ typedef enum { GOOD_THING, BAD_THING, } ThingType ; // { dg-error "" "comma" { target { ! c++11 } } }
Thing (ThingType type) : thingType (type) { }
~Thing () { }
private:
@@ -15,7 +15,7 @@ private:
class Group
{
public:
- typedef enum { THIS_GROUP, THAT_GROUP, } GroupType ; // { dg-error "" "comma" { target c++98 } }
+ typedef enum { THIS_GROUP, THAT_GROUP, } GroupType ; // { dg-error "" "comma" { target { ! c++11 } } }
Group (GroupType type) : groupType (type), groupCount (0) { }
~Group () { }
void append (Thing* const &entry) { groupCount ++ ; }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C b/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C
index 9c105609ec..fda718b4f7 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/enum11.C
@@ -6,7 +6,7 @@ class X
{
oneMask = 0x0000FFFF,
twoMask = 0x000F0000,
- thiMask = 0xFFF00000, // { dg-error "comma at end" "" { target c++98 } }
+ thiMask = 0xFFF00000, // { dg-error "comma at end" "" { target { ! c++11 } } }
};
unsigned int foo;
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/enum8.C b/gcc/testsuite/g++.old-deja/g++.brendan/enum8.C
index bbdda4bfe2..c48398ef87 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/enum8.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/enum8.C
@@ -6,7 +6,7 @@ class foo1
enum foo1_enum
{
ENUM1,
- ENUM2, // { dg-error "comma at end" "" { target c++98 } }
+ ENUM2, // { dg-error "comma at end" "" { target { ! c++11 } } }
};
};
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/enum9.C b/gcc/testsuite/g++.old-deja/g++.brendan/enum9.C
index d8a7d1bd47..6eb94dab2b 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/enum9.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/enum9.C
@@ -2,7 +2,7 @@
// GROUPS passed enums
enum fig {
figgy,
- pudding, // { dg-error "comma at end" "" { target c++98 } }
+ pudding, // { dg-error "comma at end" "" { target { ! c++11 } } }
};
class X {
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C b/gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C
index 2f4bc4210a..d1d84448f3 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/err-msg4.C
@@ -2,8 +2,8 @@
// GROUPS passed error-messages
class X {
public:
- static int x;// { dg-error "" } previous.*
- static int y;// { dg-error "" } previous.*
+ static int x;// { dg-message "" } previous.*
+ static int y;// { dg-message "" } previous.*
};
unsigned X::x;// { dg-error "" } conflict.*
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/friend3.C b/gcc/testsuite/g++.old-deja/g++.brendan/friend3.C
index 209ea8c0e0..d49629e2b1 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/friend3.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/friend3.C
@@ -5,7 +5,7 @@ class B {
friend class A;
enum {
- bEnum = 1, // { dg-error "comma at end" "" { target c++98 } }
+ bEnum = 1, // { dg-error "comma at end" "" { target { ! c++11 } } }
};
int bArray[ bEnum ];
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/init2.C b/gcc/testsuite/g++.old-deja/g++.brendan/init2.C
index 1b376dc780..1f21f34666 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/init2.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/init2.C
@@ -2,4 +2,4 @@
// GROUPS passed initialization
// this should give an error in require_required_type about not
// being allowed to have an initializer list in an argument list.
-int f(int a = {1});// { dg-error "" "" { target c++98 } }
+int f(int a = {1});// { dg-error "" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/init4.C b/gcc/testsuite/g++.old-deja/g++.brendan/init4.C
index d3d1ffd224..7d82d94141 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/init4.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/init4.C
@@ -2,4 +2,4 @@
// GROUPS passed initialization
struct CharList { int i; };
-const CharList& terminals = { 1 }; // { dg-error "initializer lists" "" { target c++98 } }
+const CharList& terminals = { 1 }; // { dg-error "initializer lists" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/misc14.C b/gcc/testsuite/g++.old-deja/g++.brendan/misc14.C
index ea6ce4c74c..c4229a130e 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/misc14.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/misc14.C
@@ -4,7 +4,7 @@ class X {
public:
enum e {
New // { dg-message "previous" }
- , // { dg-error "comma at end" "" { target c++98 } }
+ , // { dg-error "comma at end" "" { target { ! c++11 } } }
};
static int New(int); // { dg-error "conflicts with a previous" }
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C b/gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C
index 0e01f2b478..1edd548b66 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/redecl1.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
// GROUPS passed redeclaration
-inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// { dg-error "" } .*
+inline int min(int x, int y) {return x < y ? x : y;} /* 235 */// { dg-message "" } .*
int min(int a, int b);
inline int min(int a, int b) {return (a < b)?a:b;}// { dg-error "" } .*
diff --git a/gcc/testsuite/g++.old-deja/g++.brendan/static3.C b/gcc/testsuite/g++.old-deja/g++.brendan/static3.C
index c0ee011787..7c43231027 100644
--- a/gcc/testsuite/g++.old-deja/g++.brendan/static3.C
+++ b/gcc/testsuite/g++.old-deja/g++.brendan/static3.C
@@ -3,7 +3,7 @@
class foo{
public:
static void bar( int i ){ value = i; }
- static int value;// { dg-error "" } .*
+ static int value;// { dg-message "" } .*
};
const int foo::value = 0; // should be an error.// { dg-error "" } .*
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C
index 12ae64a36a..c74baa9406 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900127_02.C
@@ -16,10 +16,10 @@
// keywords: name spaces, overloading
-int global0; // { dg-error "" }
+int global0; // { dg-message "" }
int global0 (); // { dg-error "" }
-int global1 (); // { dg-error "" } xref for below
+int global1 (); // { dg-message "" } xref for below
int global1; // { dg-error "" } caught
struct struct_0 {
@@ -34,13 +34,13 @@ struct struct_1 {
void function_0 ()
{
- int function_0_local; // { dg-error "" }
+ int function_0_local; // { dg-message "" }
extern int function_0_local (); // { dg-error "" }
}
void function_1 ()
{
- int function_1_local (); // { dg-error "" }
+ int function_1_local (); // { dg-message "" }
extern int function_1_local; // { dg-error "" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C
index 30c2603a73..e2460d99bd 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900514_03.C
@@ -16,7 +16,7 @@
struct t_0_st_0;
-struct t_0_st_1 { // { dg-error "initializing" }
+struct t_0_st_1 { // { dg-message "initializing" }
int member;
t_0_st_1 (t_0_st_0&);// { dg-message "note" }
@@ -85,7 +85,7 @@ void t_1_local_init ()
struct t_2_st_0;
-struct t_2_st_1 { // { dg-error "initializing" }
+struct t_2_st_1 { // { dg-message "initializing" }
int member;
t_2_st_1 (t_2_st_0); // { dg-message "note" }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C
index 831c4a7929..309d1ed72c 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_02.C
@@ -10,7 +10,7 @@
extern const int cint_obj = 9;
volatile int vint_obj = 9;
-void take_int_ref (int& arg) { } // { dg-error "" } referenced by errors below
+void take_int_ref (int& arg) { } // { dg-message "" } referenced by errors below
int& global_int_ref0 = cint_obj; // { dg-error "" }
int& global_int_ref1 = vint_obj; // { dg-error "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C
index b840ee7908..8f845f4841 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_03.C
@@ -14,8 +14,8 @@
extern const int cint_obj;
extern volatile int vint_obj;
-void take_cint_ref (const int& arg) { } // { dg-error "" }
-void take_vint_ref (volatile int& arg) { } // { dg-error "" }
+void take_cint_ref (const int& arg) { } // { dg-message "" }
+void take_vint_ref (volatile int& arg) { } // { dg-message "" }
const int& global_cint_ref2 = vint_obj; // { dg-error "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
index 9d4edc60a2..6b8260d418 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900519_13.C
@@ -12,15 +12,15 @@
// keywords: inheritance, ambiguity resolution, members
struct base_0 {
- enum { base_member }; // { dg-error "" } candidate (26, 30)
+ enum { base_member }; // { dg-message "" } candidate (26, 30)
};
struct base_1 {
- int base_member; // { dg-error "" } candidate (26, 34)
+ int base_member; // { dg-message "" } candidate (26, 34)
};
struct base_2 {
- int base_member (); // { dg-error "" } candidate (30, 34)
+ int base_member (); // { dg-message "" } candidate (30, 34)
};
struct derived_0 : public base_0, public base_1 {
diff --git a/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C b/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C
index 0c8d8a2ba2..69e0440c12 100644
--- a/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C
+++ b/gcc/testsuite/g++.old-deja/g++.bugs/900520_02.C
@@ -9,7 +9,7 @@ typedef int u_array[];
typedef b_array &b_array_ref;
typedef u_array &u_array_ref;
-void take_b_array_ref (b_array_ref arg) { } // { dg-error "" } passed to here
+void take_b_array_ref (b_array_ref arg) { } // { dg-message "" } passed to here
extern u_array u_array_gbl_obj;
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
index cd902fbc3c..c034101984 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/badalloc1.C
@@ -3,7 +3,7 @@
// itself call malloc(), and will fail if there is no more
// memory available.
// { dg-do run { xfail { { xstormy16-*-* *-*-darwin[3-7]* } || vxworks_rtp } } }
-// Copyright (C) 2000, 2002, 2003, 2010 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2003, 2010, 2012 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 June 2000 <nathan@codesourcery.com>
// Check we can throw a bad_alloc exception when malloc dies.
@@ -18,9 +18,9 @@ extern "C" void *memcpy(void *, const void *, size_t);
#ifdef STACK_SIZE
const int arena_size = 256;
#else
-#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__) || defined(__osf__)
-// FreeBSD, Solaris, HP-UX and Tru64 UNIX with threads require even more
-// space at initialization time. FreeBSD 5 now requires over 131072 bytes.
+#if defined(__FreeBSD__) || defined(__sun__) || defined(__hpux__)
+// FreeBSD, Solaris and HP-UX require even more space at initialization time.
+// FreeBSD 5 now requires over 131072 bytes.
const int arena_size = 262144;
#else
const int arena_size = 32768;
diff --git a/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C b/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C
index 16646438ed..12f1ec7a08 100644
--- a/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C
+++ b/gcc/testsuite/g++.old-deja/g++.eh/cleanup1.C
@@ -2,6 +2,12 @@
// Bug: obj gets destroyed twice because the fixups for the return are
// inside its cleanup region.
+#ifdef __GXX_EXPERIMENTAL_CXX0X__
+#define NOEXCEPT_FALSE noexcept (false)
+#else
+#define NOEXCEPT_FALSE
+#endif
+
extern "C" int printf (const char *, ...);
int d;
@@ -9,7 +15,7 @@ int d;
struct myExc { };
struct myExcRaiser {
- ~myExcRaiser() { throw myExc(); }
+ ~myExcRaiser() NOEXCEPT_FALSE { throw myExc(); }
};
struct stackObj {
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
index fcc3c61677..65c0d6dadc 100644
--- a/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
+++ b/gcc/testsuite/g++.old-deja/g++.ext/attrib5.C
@@ -1,4 +1,4 @@
-// { dg-do run { xfail alpha*-dec-osf* i?86-pc-cygwin } }
+// { dg-do run { xfail i?86-pc-cygwin } }
// Test that attributes weak and alias coexist.
// { dg-require-weak "" }
// { dg-require-alias "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/binding.C b/gcc/testsuite/g++.old-deja/g++.jason/binding.C
index 1f297b76d6..3321cece23 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/binding.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/binding.C
@@ -6,7 +6,7 @@ struct T { ~T(); };
int main()
{
foo:
- T t; // { dg-error "" } redeclared
+ T t; // { dg-message "" } redeclared
bar:
T t; // { dg-error "" } redeclaration
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/cond.C b/gcc/testsuite/g++.old-deja/g++.jason/cond.C
index b1e692e8a6..e0ae2b8ea1 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/cond.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/cond.C
@@ -6,7 +6,7 @@ int main()
{
float i;
- if (int i = 1) // { dg-error "previously" }
+ if (int i = 1) // { dg-message "previously" }
{
char i; // { dg-error "redeclaration" }
char j;
@@ -17,17 +17,17 @@ int main()
char j;
}
- while (int i = 0) // { dg-error "previously" }
+ while (int i = 0) // { dg-message "previously" }
{
int i; // { dg-error "redeclaration" }
}
- for (; int i = 0; ) // { dg-error "previously" }
+ for (; int i = 0; ) // { dg-message "previously" }
{
int i; // { dg-error "redeclaration" }
}
- switch (int i = 0) // { dg-error "previously" }
+ switch (int i = 0) // { dg-message "previously" }
{
default:
int i; // { dg-error "redeclaration" }
@@ -37,10 +37,9 @@ int main()
;
A bar; // { dg-error "not declared" "decl" }
- // { dg-error "expected" "exp" { target *-*-* } 39 }
if (enum A { one, two, three } foo = one) // { dg-error "defined" "def" }
- // { dg-error "not declared" "expected" { target *-*-* } 42 }
+ // { dg-error "not declared" "expected" { target *-*-* } 41 }
;
struct B { operator int () { return 2; } };
@@ -49,10 +48,10 @@ int main()
;
if (int f () = 1) // { dg-warning "extern" "extern" }
- // { dg-error "is initialized like a variable" "var" { target *-*-* } 51 }
+ // { dg-error "is initialized like a variable" "var" { target *-*-* } 50 }
;
- if (int a[2] = {1, 2}) // { dg-error "extended init" "" { target c++98 } }
+ if (int a[2] = {1, 2}) // { dg-error "extended init" "" { target { ! c++11 } } }
;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C b/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C
index ebc2bd1eb4..f10df7151a 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/conversion2.C
@@ -1,7 +1,7 @@
// { dg-do assemble }
// PRMS Id: 3069
-void f(int&); // { dg-error "" } referenced by error below
+void f(int&); // { dg-message "" } referenced by error below
void g(const int& i) {
f(i); // { dg-error "" } discarding const
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C b/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
index 00ba0cc064..30c563b9d8 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/crash4.C
@@ -16,7 +16,7 @@ public:
};
template <class T>
-const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-error "previously declared" }
+const ccObjectInfo& cc_Array<T>::repInvariant(int) const // { dg-message "previously declared" }
{ return *this /* *this is required here */; }
template <class T>
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/crash7.C b/gcc/testsuite/g++.old-deja/g++.jason/crash7.C
index 95c7c2fb5a..f17c402976 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/crash7.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/crash7.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
// Bug: g++ can't deal.
-typedef unsigned size_t; // { dg-error "" } previous declaration
+typedef unsigned size_t; // { dg-message "" } previous declaration
typedef unsigned long size_t; // { dg-error "" } redefining size_t
void f (size_t); // causes compiler segfault -
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C b/gcc/testsuite/g++.old-deja/g++.jason/enum6.C
index bf1126c499..97bc2bafeb 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/enum6.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/enum6.C
@@ -7,10 +7,10 @@
// enum-size attributes should only be emitted if there are values of
// enum type that can escape the compilation unit, gcc cannot currently
// detect this; if this facility is added then this linker option should
-// not be needed. arm-*-linux*eabi* should be a good approximation to
+// not be needed. arm-*-linux* should be a good approximation to
// those platforms where the EABI supplement defines enum values to be
// 32 bits wide.
-// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi* } }
+// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux* } }
#include <limits.h>
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/lineno.C b/gcc/testsuite/g++.old-deja/g++.jason/lineno.C
index bd5a393e50..4ef9208ea3 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/lineno.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/lineno.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
// Bug; g++ binds a function definition to the line number of a later decl.
-void foo () { } // { dg-error "" } redeclared
+void foo () { } // { dg-message "" } redeclared
void foo (); // { dg-bogus "" } invalid binding
void foo () { } // { dg-error "" } redeclared
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/local.C b/gcc/testsuite/g++.old-deja/g++.jason/local.C
index 21fa9f5877..18d810a33b 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/local.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/local.C
@@ -5,7 +5,7 @@ int x;
void f ()
{
static int s;
- int x; // { dg-error "" } referenced below
+ int x; // { dg-message "" } referenced below
extern int q();
struct local {
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C b/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
index f5db6a20fc..ef8504b2af 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload20.C
@@ -4,8 +4,8 @@
void f (char *);
void f (int);
struct A {
- void f (); // { dg-error "" } candidate
- void f (int); // { dg-error "" } candidate
+ void f (); // { dg-message "" } candidate
+ void f (int); // { dg-message "" } candidate
void g () {
void (*p)(char *) = f; // { dg-error "" } no matching function in scope
}
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
index 229be93da7..125aee0dbf 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload21.C
@@ -1,7 +1,7 @@
// { dg-do assemble }
struct X {
- void f (int = 4, char = 'r'); // { dg-error "previous specification" }
- void g (int = 4, char = 'r'); // { dg-error "previous specification" }
+ void f (int = 4, char = 'r'); // { dg-message "previous specification" }
+ void g (int = 4, char = 'r'); // { dg-message "previous specification" }
};
void
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C b/gcc/testsuite/g++.old-deja/g++.jason/overload5.C
index 9280c9d5e0..c1d53f3cee 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/overload5.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/overload5.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
// Testcase for simple overloading resolution.
-int foo (); // { dg-error "" }
+int foo (); // { dg-message "" }
void foo (); // { dg-error "" } disallowed overload
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
index 6fda9d27ac..172a441049 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/redecl1.C
@@ -3,7 +3,7 @@ class A
{
public:
A (const A& ccref);
- friend A const re (const A& v1); // { dg-error "ambiguates" }
+ friend A const re (const A& v1); // { dg-message "old declaration" }
};
A // const
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C b/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C
index 41859aa398..245c8fa073 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/scoping7.C
@@ -2,5 +2,5 @@
// Bug: g++ doesn't flag name collisions between types and non-types as
// errors. It shouldn't for class names, but it should for typedefs.
-int bar; // { dg-error "" }
+int bar; // { dg-message "" }
typedef int bar; // { dg-error "" }
diff --git a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
index f0c1187b01..7e0b93afe7 100644
--- a/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
+++ b/gcc/testsuite/g++.old-deja/g++.jason/thunk3.C
@@ -1,5 +1,5 @@
// { dg-do run }
-// { dg-skip-if "fails with generic thunk support" { rs6000-*-* powerpc-*-eabi v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* lm32-*-* } { "*" } { "" } }
+// { dg-skip-if "fails with generic thunk support" { rs6000-*-* powerpc-*-eabi v850-*-* sh-*-* sh64-*-* h8*-*-* xtensa*-*-* m32r*-*-* lm32-*-* nios2-*-* } { "*" } { "" } }
// Test that variadic function calls using thunks work right.
// Note that this will break on any target that uses the generic thunk
// support, because it doesn't support variadic functions.
diff --git a/gcc/testsuite/g++.old-deja/g++.law/arm8.C b/gcc/testsuite/g++.old-deja/g++.law/arm8.C
index 8b82af9514..dfc3b30d3a 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/arm8.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/arm8.C
@@ -7,7 +7,7 @@
// Date: Tue, 16 Mar 93 12:05:24 +0100
struct K {
- void f( int *p = 0); // { dg-error "" } previous specification
+ void f( int *p = 0); // { dg-message "" } previous specification
};
extern int * q;
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt20.C b/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
index 5d699d7f85..9389a107ff 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt20.C
@@ -9,7 +9,7 @@
// Compiles fine with Sun CC 2.1
-void f(char *& x) // { dg-error "passing argument" }
+void f(char *& x) // { dg-message "passing argument" }
{
x++;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/cvt8.C b/gcc/testsuite/g++.old-deja/g++.law/cvt8.C
index 5743cba1c9..cecec9c48f 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/cvt8.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/cvt8.C
@@ -24,7 +24,7 @@ B::operator const A&() const {
return a;
}
-void f(A &a) { // { dg-error "" } in passing argument
+void f(A &a) { // { dg-message "" } in passing argument
printf("A at %x is %d\n", &a, a.i);
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/enum9.C b/gcc/testsuite/g++.old-deja/g++.law/enum9.C
index 0ecb87d35f..e4045b50b5 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/enum9.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/enum9.C
@@ -7,10 +7,10 @@
// enum-size attributes should only be emitted if there are values of
// enum type that can escape the compilation unit, gcc cannot currently
// detect this; if this facility is added then this linker option should
-// not be needed. arm-*-linux*eabi* should be a good approximation to
+// not be needed. arm-*-linux* should be a good approximation to
// those platforms where the EABI supplement defines enum values to be
// 32 bits wide.
-// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi* } }
+// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux* } }
// GROUPS passed enums
extern "C" int printf (const char *, ...);
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init1.C b/gcc/testsuite/g++.old-deja/g++.law/init1.C
index 3cce388f29..bdcc49434a 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init1.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init1.C
@@ -9,12 +9,12 @@ public:
class bar {
public:
- foo f[3] = { 1, 2, 3 }; // works: f[0] = 1, f[1] = 2, f[2] = 3 // { dg-error "" "" { target c++98 } } ANSI C++ forbids initialization of member f;
+ foo f[3] = { 1, 2, 3 }; // works: f[0] = 1, f[1] = 2, f[2] = 3 // { dg-error "" "" { target { ! c++11 } } } ANSI C++ forbids initialization of member f;
};
class bar2 {
public:
- foo f[3] = { foo(1), foo(2), foo(3) }; // { dg-error "" "" { target c++98 } } ANSI C++ forbids initialization of member f;
+ foo f[3] = { foo(1), foo(2), foo(3) }; // { dg-error "" "" { target { ! c++11 } } } ANSI C++ forbids initialization of member f;
// does not compile -- error: field initializer is not constant
};
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init5.C b/gcc/testsuite/g++.old-deja/g++.law/init5.C
index c1d647b1b0..7ed89e2192 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init5.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init5.C
@@ -11,8 +11,8 @@ extern int fred( int);
class X {
public :
- void f( int = fred( 0) ) ; // { dg-error "" } previous spec
+ void f( int = fred( 0) ) ; // { dg-message "previous spec" }
} ;
-void X::f( int x = fred( 0) ) {// { dg-error "" } .*
+void X::f( int x = fred( 0) ) { // { dg-error "default argument" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/init8.C b/gcc/testsuite/g++.old-deja/g++.law/init8.C
index ba8dde2e8b..5ed619b670 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/init8.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/init8.C
@@ -8,7 +8,7 @@
const int ic = 1;
-void f(int& arg) // { dg-error "passing argument 1" }
+void f(int& arg) // { dg-message "passing argument 1" }
{
if (arg) ;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/operators32.C b/gcc/testsuite/g++.old-deja/g++.law/operators32.C
index 9e1a35664f..991e38ddbc 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/operators32.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/operators32.C
@@ -49,7 +49,7 @@ foo() {std::cout << "foo created" << std::endl; }
};
foo **f2;
-allocate2d(d1, d2, f2);// { dg-error "" "" { target c++98 } }
-ffree(d1, f2);// { dg-error "" "" { target c++98 } }
+allocate2d(d1, d2, f2);// { dg-error "" "" { target { ! c++11 } } }
+ffree(d1, f2);// { dg-error "" "" { target { ! c++11 } } }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.law/visibility3.C b/gcc/testsuite/g++.old-deja/g++.law/visibility3.C
index 64d64df647..ddbbc84bad 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/visibility3.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/visibility3.C
@@ -11,7 +11,7 @@ int x;
int main(void)
{
static int s;
- int x; // { dg-error "" } declared
+ int x; // { dg-message "" } declared
extern int g();
struct local {
diff --git a/gcc/testsuite/g++.old-deja/g++.law/weak.C b/gcc/testsuite/g++.old-deja/g++.law/weak.C
index 99a0f1772e..49132adbeb 100644
--- a/gcc/testsuite/g++.old-deja/g++.law/weak.C
+++ b/gcc/testsuite/g++.old-deja/g++.law/weak.C
@@ -1,4 +1,4 @@
-// { dg-do link { target i?86-*-linux* x86_64-*-linux* } }
+// { dg-do link { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
// { dg-require-effective-target static }
// { dg-options "-static" }
// Bug: g++ fails to instantiate operator<<.
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
index 1ccc217a47..f2a7f1e2f4 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/ambig1.C
@@ -2,12 +2,12 @@
//Based on a report by Bill Currie <bcurrie@tssc.co.nz>
struct foo {
protected:
- int x; // { dg-error "" } candidate
+ int x; // { dg-message "" } candidate
};
struct bar {
public:
- int x(); // { dg-error "" } candidate
+ int x(); // { dg-message "" } candidate
};
struct foobar: public foo, public bar {
diff --git a/gcc/testsuite/g++.old-deja/g++.martin/typedef2.C b/gcc/testsuite/g++.old-deja/g++.martin/typedef2.C
index be1bbcbf7f..fa31867654 100644
--- a/gcc/testsuite/g++.old-deja/g++.martin/typedef2.C
+++ b/gcc/testsuite/g++.old-deja/g++.martin/typedef2.C
@@ -3,5 +3,5 @@
// Check implicit conversion from string constants into typedefs
typedef char CHAR;
-void f2(CHAR *s="");
+void f2(CHAR *s=""); // { dg-warning "deprecated" }
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/for2.C b/gcc/testsuite/g++.old-deja/g++.mike/for2.C
index 42e6baa55c..9c201178e2 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/for2.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/for2.C
@@ -4,19 +4,17 @@ void foo() {
for (class C {};;)
;
C c; // { dg-error "declared" "decl" }
- // { dg-error "expected" "exp" { target *-*-* } 6 }
}
void bar() {
for (enum E {num};;)
;
E e; // { dg-error "declared" "decl" }
- // { dg-error "expected" "exp" { target *-*-* } 13 }
}
void bee () {
int i = 0;
for (int fun() = 0; i != 2; ++i) { // { dg-warning "extern" "extern" }
- // { dg-error "initialized" "init" { target *-*-* } 19 }
+ // { dg-error "initialized" "init" { target *-*-* } 17 }
}
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/misc3.C b/gcc/testsuite/g++.old-deja/g++.mike/misc3.C
index 560f0c13ef..f633873f85 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/misc3.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/misc3.C
@@ -1,4 +1,4 @@
// { dg-do assemble }
// GROUPS uncaught
-int a;// { dg-error "" } .*
+int a;// { dg-message "" } .*
int a;// { dg-error "" } .*
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/misc9.C b/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
index 3d8858cf64..7b9a86cbf4 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/misc9.C
@@ -8,6 +8,6 @@ class bee {
class foo {
public:
- int bee::bar; // { dg-error "not derived" } you cannot do this
+ int bee::bar; // { dg-error "invalid use" } you cannot do this
int me();
};
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net12.C b/gcc/testsuite/g++.old-deja/g++.mike/net12.C
index 59e062a788..f27dd46c81 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net12.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net12.C
@@ -7,7 +7,7 @@ struct Foo {
void m() const;
};
-void other(char &x); // { dg-error "" } reference below
+void other(char &x); // { dg-message "" } reference below
void
Foo::m() const
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net44.C b/gcc/testsuite/g++.old-deja/g++.mike/net44.C
index bc45b48788..226df2d9e7 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net44.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net44.C
@@ -1,7 +1,7 @@
// { dg-do assemble }
// Make sure we don't dump core
-enum request { q, w, e}; // { dg-error "" }
+enum request { q, w, e}; // { dg-message "" }
class request { // { dg-error "" }
public:
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/net8.C b/gcc/testsuite/g++.old-deja/g++.mike/net8.C
index 09f9c30a85..d1f6864513 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/net8.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/net8.C
@@ -11,14 +11,14 @@ public:
int bar;
};
-void func(Base&); // { dg-error "passing argument 1" }
+void func(Base&); // { dg-message "passing argument 1" }
void func2(const Derived& d) {
func(d); // { dg-error "invalid initialization" }
}
void
-foo (int& a) // { dg-error "in passing argument 1" }
+foo (int& a) // { dg-message "in passing argument 1" }
{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/ns3.C b/gcc/testsuite/g++.old-deja/g++.mike/ns3.C
index eb40fe4aea..b39a1d7845 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/ns3.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/ns3.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
-int i; // { dg-error "" }
+int i; // { dg-message "" }
namespace i { // { dg-error "" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p10769b.C b/gcc/testsuite/g++.old-deja/g++.mike/p10769b.C
index 9210a452ad..9c2dd29711 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p10769b.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p10769b.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
-// { dg-options "" }
+// { dg-options "-ftrack-macro-expansion=0" }
// prms-id: 10769
#define PMF2PF(PMF) ((void (*)())(PMF))
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
index 7e3a1ffa33..714f628f5e 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p11110.C
@@ -6,7 +6,7 @@ class data;
class conatiner {
public:
virtual void* first ();
- virtual data* contents (void* i); // { dg-message "conatiner::contents|no known conversion" }
+ virtual data* contents (void* i);
};
class user {
@@ -17,6 +17,5 @@ private:
};
data* user::data1() const {
- return (_c.contents (_c.first)); // { dg-error "match" }
- // { dg-message "candidate" "candidate note" { target *-*-* } 20 }
+ return (_c.contents (_c.first)); // { dg-error "invalid use of non-static member function" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
index 487f609a14..fdede63e40 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p1989.C
@@ -108,7 +108,7 @@ List_DL<T>::prepend(const T& item)
template<class T>
void
-List_DL<T>::insert(const T& item, Pix x, bool before = TRUE)
+List_DL<T>::insert(const T& item, Pix x, bool before = TRUE) // { dg-error "default arguments" }
{
link<T> *l = (link<T> *) x;
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p2793.C b/gcc/testsuite/g++.old-deja/g++.mike/p2793.C
index 68fee7dfdf..a331d6598b 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p2793.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p2793.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
// prms-id: 2793
-void f(char&) { // { dg-error "" } referenced by error below
+void f(char&) { // { dg-message "" } referenced by error below
f('c'); // { dg-error "" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p3836.C b/gcc/testsuite/g++.old-deja/g++.mike/p3836.C
index 77f859b2c0..08d15624bf 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p3836.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p3836.C
@@ -1,7 +1,7 @@
// { dg-do assemble }
// prms-id: 3836
-void f(int &i) { // { dg-error "" } ref line
+void f(int &i) { // { dg-message "" } ref line
i = 10;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p418.C b/gcc/testsuite/g++.old-deja/g++.mike/p418.C
index 412884071f..544d5ca395 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p418.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p418.C
@@ -11,7 +11,7 @@ public:
int bar;
};
-void func(Base&); // { dg-error "" } referenced by error below
+void func(Base&); // { dg-message "" } referenced by error below
void func2(const Derived& d) {
func(d); // { dg-error "" } should be error because of const
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p701.C b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
index 6a52591040..8e9a345e35 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p701.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p701.C
@@ -7,7 +7,7 @@ extern "C"
}
-void Munge(int& x) // { dg-error "passing argument 1" }
+void Munge(int& x) // { dg-message "passing argument 1" }
{
x = 2;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/p807.C b/gcc/testsuite/g++.old-deja/g++.mike/p807.C
index 7b343a50f4..e2f2b71ed7 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/p807.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/p807.C
@@ -24,7 +24,7 @@ class B
};
-int foo(B& b); // { dg-error "" } referenced below
+int foo(B& b); // { dg-message "" } referenced below
int main()
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/pmf1.C b/gcc/testsuite/g++.old-deja/g++.mike/pmf1.C
index 15460ebaaa..aa1ea3efae 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/pmf1.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/pmf1.C
@@ -1,5 +1,5 @@
// { dg-do run }
-// extern "C" printf(const char *, ...);
+// extern "C" int printf(const char *, ...);
class X
{
diff --git a/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C b/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
index 8dee9278f6..5ee1e343a2 100644
--- a/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
+++ b/gcc/testsuite/g++.old-deja/g++.mike/pmf3.C
@@ -6,9 +6,9 @@ struct Fooey {
void h(double dx);
};
-void Fooey::f(char*) { } // { dg-error "" } candidate
-void Fooey::f(int) { } // { dg-error "" } candidate
-void Fooey::f(float) { } // { dg-error "" } candidate
+void Fooey::f(char*) { } // { dg-message "" } candidate
+void Fooey::f(int) { } // { dg-message "" } candidate
+void Fooey::f(float) { } // { dg-message "" } candidate
void Fooey::h(double zahl) { }
int main() {
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/alias4.C b/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
index 5bff439fce..2d9dd4a4c5 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/alias4.C
@@ -7,7 +7,7 @@ namespace D { // { dg-error "" } reopening namespace with alias
void f();
}
-void C::f(){} // { dg-error "" } previous definition
+void C::f(){} // { dg-message "" } previous definition
void D::f(){} // { dg-error "" } redefinition
diff --git a/gcc/testsuite/g++.old-deja/g++.ns/ns11.C b/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
index 2dc0344f39..3067bdfb7c 100644
--- a/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
+++ b/gcc/testsuite/g++.old-deja/g++.ns/ns11.C
@@ -5,7 +5,7 @@
namespace A{
void f(int);
void f(int,int);
- int i; // { dg-error "" } .*
+ int i; // { dg-message "" } .*
}
void A::f(){} // { dg-error "" } should have been declared before
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005 b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005
index 995ac91835..ea3da34a04 100644
--- a/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/ChangeLog-2005
@@ -120,7 +120,7 @@
* template1.C: New test.
-Copyright (C) 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+Copyright (C) 1999-2005 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C b/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
index 23295ea363..6c4874b213 100644
--- a/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/linkage1.C
@@ -11,8 +11,6 @@
// checking that another translation unit can call it. We don't do
// the right things on functions, but we do on data members.
-// { dg-bogus "" "" { xfail *-*-* } 0 }
-
typedef struct {
void f();
} S;
diff --git a/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C b/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
index 75c8723c70..69a4fa5dcb 100644
--- a/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
+++ b/gcc/testsuite/g++.old-deja/g++.oliva/overload1.C
@@ -6,8 +6,8 @@
// Based on bug report by JDonner <jdonner@schedsys.com>
struct foo {
- static int bar(); // { dg-error "foo::bar" }
- void bar(int); // { dg-error "foo::bar" }
+ static int bar(); // { dg-message "foo::bar" }
+ void bar(int); // { dg-message "foo::bar" }
};
/* gcc emits a hard error without -pedantic, and a warning with
diff --git a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C b/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
index f3fe0a8dd8..b18c5290d6 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/ambig1.C
@@ -1,15 +1,15 @@
// { dg-do assemble }
struct A {
- int operator ++(); // { dg-error "" } candidates
- void operator ()(); // { dg-error "" } candidates
- void operator delete(void*); // { dg-error "" } candidates
+ int operator ++(); // { dg-message "" } candidates
+ void operator ()(); // { dg-message "" } candidates
+ void operator delete(void*); // { dg-message "" } candidates
};
struct B {
- int operator ++(int); // { dg-error "" } candidates
- void operator ()(); // { dg-error "" } candidates
- void operator delete(void*); // { dg-error "" } candidates
+ int operator ++(int); // { dg-message "" } candidates
+ void operator ()(); // { dg-message "" } candidates
+ void operator delete(void*); // { dg-message "" } candidates
void f();
};
diff --git a/gcc/testsuite/g++.old-deja/g++.other/anon9.C b/gcc/testsuite/g++.old-deja/g++.other/anon9.C
index d458b6b430..e4abad2546 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/anon9.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/anon9.C
@@ -1,6 +1,6 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
// Test that we properly diagnose an attempt to use an anonymous class
// in declaring an external function.
-typedef const struct { int i; } T; // { dg-error "" } referenced below
+typedef const struct { int i; } T; // { dg-message "" } referenced below
void f (T* t); // { dg-error "" } uses unnamed type
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash23.C b/gcc/testsuite/g++.old-deja/g++.other/crash23.C
index 13249020fe..72f94cb1a0 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/crash23.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash23.C
@@ -2,6 +2,6 @@
// Origin: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
class T;
-inline void operator<(T&, T&) { } // { dg-error "" } previous definition
+inline void operator<(T&, T&) { } // { dg-message "" } previous definition
inline void operator<(T&, T&) { } // { dg-error "" } duplicate definition
diff --git a/gcc/testsuite/g++.old-deja/g++.other/crash28.C b/gcc/testsuite/g++.old-deja/g++.other/crash28.C
index 59f1e844ee..c0f4bfa66e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/crash28.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/crash28.C
@@ -31,5 +31,5 @@ public:
};
void foo::x() throw(bar)
{
- if (!b) throw bar (static_cast<::N::X*>(this)); // { dg-error "lambda expressions|expected" } parse error
+ if (!b) throw bar (static_cast<::N::X*>(this)); // { dg-error "lambda expressions|expected|invalid" } parse error
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/decl8.C b/gcc/testsuite/g++.old-deja/g++.other/decl8.C
index 705fc6c5df..ebcc064404 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/decl8.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/decl8.C
@@ -3,7 +3,7 @@
void foo(void)
{
- extern int i; // { dg-error "" } previous declaration
+ extern int i; // { dg-message "" } previous declaration
extern double i; // { dg-error "" } conflicting type
extern int j;
extern int j;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/enum4.C b/gcc/testsuite/g++.old-deja/g++.other/enum4.C
index 509da6d7b6..3c8bb0c08e 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/enum4.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/enum4.C
@@ -9,10 +9,10 @@
// enum-size attributes should only be emitted if there are values of
// enum type that can escape the compilation unit, gcc cannot currently
// detect this; if this facility is added then this linker option should
-// not be needed. arm-*-linux*eabi* should be a good approximation to
+// not be needed. arm-*-linux* should be a good approximation to
// those platforms where the EABI supplement defines enum values to be
// 32 bits wide.
-// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi* } }
+// { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux* } }
enum E {
a = -312
diff --git a/gcc/testsuite/g++.old-deja/g++.other/init19.C b/gcc/testsuite/g++.old-deja/g++.other/init19.C
index bcbe82287d..15c160dad9 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/init19.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/init19.C
@@ -1,4 +1,5 @@
-// { dg-do run { xfail { { ! cxa_atexit } && { ! { mips-sgi-irix* *-*-solaris2* } } } } }
+// { dg-do run { xfail { { ! cxa_atexit } && { ! *-*-solaris2* } } } }
+// { dg-require-effective-target cxa_atexit }
#include <stdlib.h>
#define assert(x) do { if (! (x)) abort(); } while (0)
diff --git a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C b/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
index 3735d6481e..d6aca8b9cf 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/lineno2.C
@@ -2,9 +2,9 @@
// Submitted by Nathan Sidwell <nathan@acm.org>
// Bug: g++ wasn't listing candidates for a failed conversion.
-void f(int, double); // { dg-error "" } candidate
-void f(double, int); // { dg-error "" } candidate
-void f(int); // { dg-error "" } candidate
+void f(int, double); // { dg-message "" } candidate
+void f(double, int); // { dg-message "" } candidate
+void f(int); // { dg-message "" } candidate
int
main ()
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
index 2fa2dec04b..8d9044544b 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage1.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
typedef struct {
int i;
} *p;
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage2.C b/gcc/testsuite/g++.old-deja/g++.other/linkage2.C
index 974cd63966..84756a1a60 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage2.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
// From: Klaus-Georg Adams <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
extern "C"
{
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage3.C b/gcc/testsuite/g++.old-deja/g++.other/linkage3.C
index 8ddff82f50..5e01c1d1f9 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage3.C
@@ -1,5 +1,5 @@
// { dg-do assemble }
// Origin: Mark Mitchell <mark@codesourcery.com>
-extern "C" void f (); // { dg-error "" } previous declaration
+extern "C" void f (); // { dg-message "" } previous declaration
static void f () {} // { dg-error "" } extern redeclared static
diff --git a/gcc/testsuite/g++.old-deja/g++.other/linkage4.C b/gcc/testsuite/g++.old-deja/g++.other/linkage4.C
index 450733fab3..c872057cd2 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/linkage4.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/linkage4.C
@@ -8,4 +8,4 @@ void f () {}
// Check that the strlen declaration here is given internal linkage by
// using it as a non-type template argument, and expecting an error.
-template void f<strlen>(); // { dg-error "" "" { target c++98 } } no matching template
+template void f<strlen>(); // { dg-error "" "" { target { ! c++11 } } } no matching template
diff --git a/gcc/testsuite/g++.old-deja/g++.other/main1.C b/gcc/testsuite/g++.old-deja/g++.other/main1.C
index c5cfe8b9eb..de689f60fc 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/main1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/main1.C
@@ -1,12 +1,12 @@
// { dg-do compile }
-int main() // { dg-error "previous declaration" }
+int main() // { dg-message "previous declaration" }
{
return 0;
}
-int main(int, const char**) // { dg-error "conflicts" }
+int main(int, const char**) // { dg-error "conflicting" }
{
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.other/overload11.C b/gcc/testsuite/g++.old-deja/g++.other/overload11.C
index b994b80701..0b910e48a0 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/overload11.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/overload11.C
@@ -32,7 +32,7 @@ int main (int argc, char **argv)
void (*vptr) ();
(ovl) (1); // ok
- (&ovl) (1); // { dg-error "" } not suitable for overload resolution
+ (&ovl) (1); // ok
(ovl) (); // { dg-error "" } no matching candidates
// { dg-message "candidate" "candidate note" { target *-*-* } 36 }
(&ovl) (); // { dg-error "" } not suitable for overload resolution
diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
index 72d30eba26..af5e415b7f 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr1.C
@@ -1,7 +1,7 @@
// { dg-do run { target i?86-*-* x86_64-*-* } }
// { dg-require-effective-target ilp32 }
// { dg-require-effective-target fpic }
-// { dg-options "-mtune=i686 -O2 -fpic" }
+// { dg-options "-mtune=generic -O2 -fpic" }
class G {};
struct N {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
index 99e0943b3b..1dffbcc1aa 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/store-expr2.C
@@ -1,6 +1,6 @@
// { dg-do run { target i?86-*-* x86_64-*-*} }
// { dg-require-effective-target ilp32 }
-// { dg-options "-mtune=i686 -O2" }
+// { dg-options "-mtune=generic -O2" }
class G {};
struct N {
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typeck1.C b/gcc/testsuite/g++.old-deja/g++.other/typeck1.C
index 574fd7e283..1dce27397a 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/typeck1.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/typeck1.C
@@ -4,7 +4,7 @@ extern int a[][]; // { dg-error "" } invalid multidimensional array
extern int b[7][]; // { dg-error "" } invalid multidimensional array
extern int c[][7]; // OK
-extern int (*i)[]; // { dg-error "" } previous declaration
+extern int (*i)[]; // { dg-message "" } previous declaration
extern int (*i)[7]; // { dg-error "" } conflicting types for `i'
extern int m[];
diff --git a/gcc/testsuite/g++.old-deja/g++.other/typedef5.C b/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
index f9e71479c7..0984550902 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/typedef5.C
@@ -10,7 +10,7 @@ typedef int t;
typedef t* u;
typedef u v;
typedef v* (*w)(t const); // this is ok
-typedef v* (*w)(t); // { dg-error "" } covers message `previously declared here'
+typedef v* (*w)(t); // { dg-message "" } covers message `previously declared here'
typedef v* (*const w)(t); // { dg-error "" } invalid redeclaration
typedef v const* (*w)(t); // { dg-error "" } invalid redeclaration
typedef v* const (*w)(t); // { dg-error "" } invalid redeclaration
diff --git a/gcc/testsuite/g++.old-deja/g++.other/using3.C b/gcc/testsuite/g++.old-deja/g++.other/using3.C
index f30ecbc3d0..3a034937d0 100644
--- a/gcc/testsuite/g++.old-deja/g++.other/using3.C
+++ b/gcc/testsuite/g++.old-deja/g++.other/using3.C
@@ -8,5 +8,5 @@ typedef struct {
} S;
struct B: S{
- using S::S; // { dg-error "" } no such field
+ using S::S; // { dg-error "" "" { target { ! c++11 } } } no such field
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/asm1.C b/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
index 8e54a8ed54..068a90f9ac 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/asm1.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target i?86-*-linux* x86_64-*-linux* } }
+// { dg-do assemble { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } }
// We'd use ebx with 32-bit pic code, so skip.
// { dg-skip-if "" { ilp32 && { ! nonpic } } { "*" } { "" } }
// Origin: "Weidmann, Nicholas" <nicholas.weidmann@swx.ch>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/assign1.C b/gcc/testsuite/g++.old-deja/g++.pt/assign1.C
index 854d8ee27a..95cbee0dad 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/assign1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/assign1.C
@@ -2,7 +2,7 @@
// Origin: Mark Mitchell <mark@codesourcery.com>
template <class T>
-struct S { // { dg-error "const|operator=" }
+struct S { // { dg-error "const member\[^\n\r\]*can't use default assignment operator" }
S();
T t;
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash10.C b/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
index 2f785b4b9e..5e87876147 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash10.C
@@ -3,7 +3,7 @@
template<int M, int N>
class GCD {
public:
- enum { val = (N == 0) ? M : GCD<N, M % N>::val }; // { dg-warning "division" "division" }
+ enum { val = (N == 0) ? M : GCD<N, M % N>::val };
// { dg-error "constant expression" "valid" { target *-*-* } 6 }
// { dg-message "template argument" "valid" { target *-*-* } 6 }
};
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/crash58.C b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
index 0ce3d81723..f0b609a918 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/crash58.C
@@ -6,9 +6,9 @@
// bug 147. We ICE'd on an unprocessed LOOKUP_EXPR during tsubsting
namespace EManip {
- template <class T> void do_assign(T* d); // { dg-error "" } candidate
+ template <class T> void do_assign(T* d); // { dg-message "" } candidate
}
-template <class T> void do_assign(T* d); // { dg-error "" } candidate
+template <class T> void do_assign(T* d); // { dg-message "" } candidate
template <class T>
struct MatrixC
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/enum6.C b/gcc/testsuite/g++.old-deja/g++.pt/enum6.C
index 48bdbb0ca5..20be9bb707 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/enum6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/enum6.C
@@ -8,7 +8,7 @@ void fn(T)
{
enum tern { H, L, X, U };
- vector<tern> ternvec; // { dg-error "" "" { target c++98 } } composed from a local type
+ vector<tern> ternvec; // { dg-error "" "" { target { ! c++11 } } } composed from a local type
}
template void fn(int);
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
index ea32cf6ea9..54029eb854 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit34.C
@@ -5,7 +5,7 @@ template <class T>
void foo(T t);
template <>
-void foo(int) {}; // { dg-error "6:previously declared here" }
+void foo(int) {}; // { dg-message "6:previously declared here" }
template <>
void foo<int>(int) {} // { dg-error "6:redefinition" }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/explicit70.C b/gcc/testsuite/g++.old-deja/g++.pt/explicit70.C
index 1f53a757cb..6c535fc42f 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/explicit70.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/explicit70.C
@@ -18,7 +18,7 @@ template int S<int>::t; // { dg-error "duplicate explicit instantiation" }
template class S<double>;
template class S<double>; // { dg-error "duplicate explicit instantiation" }
-extern template void f(double); // { dg-error "extern" "" { target c++98 } }
+extern template void f(double); // { dg-error "extern" "" { target { ! c++11 } } }
inline template class S<float>; // { dg-error "inline" } inline not allowed
template <class T>
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/friend36.C b/gcc/testsuite/g++.old-deja/g++.pt/friend36.C
index f5cb8d40a0..f6f261ba07 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/friend36.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/friend36.C
@@ -1,7 +1,7 @@
// { dg-do assemble }
template <class T>
-void f(T) {} // { dg-error "previously" }
+void f(T) {} // { dg-message "previously" }
template <class U>
struct S {
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C b/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
index 03b58587c5..c58bd6eab1 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/koenig1.C
@@ -12,7 +12,7 @@ struct A {
template <int s>
static void g();
template <int s>
-void f(); // { dg-error "" } candiate
+void f(); // { dg-message "" } candiate
static void f_plus ()
{
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C b/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C
index d7be4fbf0f..1fe009dbff 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/mangle1.C
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-options "" }
// Origin: Mark Mitchell <mark@codesourcery.com>
typedef enum {} i;
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C b/gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C
index 99b4cd384f..273bcabb85 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/memtemp87.C
@@ -12,5 +12,4 @@ public:
template<template<class> class>
class Y {
};
-Q::template X<int> x; // { dg-error "" } template syntax
-
+Q::template X<int> x; // { dg-error "template" "" { target { ! c++11 } } }
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload13.C b/gcc/testsuite/g++.old-deja/g++.pt/overload13.C
index f66f1038c7..1ceb99f14e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/overload13.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/overload13.C
@@ -7,5 +7,5 @@ struct A {
int main ()
{
A a;
- return a.template f (0); // { dg-error "" }
+ return a.template f (0); // { dg-error "template" "" { target { ! c++11 } } }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/overload5.C b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
index 1bb2d448f9..50febb2e7a 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/overload5.C
@@ -1,6 +1,6 @@
// { dg-do assemble }
-template <class T> void foo(); // { dg-error "" } candidate
+template <class T> void foo(); // { dg-message "" } candidate
void (*bar)() = foo<void>;
void (*baz)() = foo; // { dg-error "" } can't deduce T
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
index a4be012d79..9f4bbe43f8 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/ptrmem6.C
@@ -25,10 +25,10 @@ int main() {
h<&B::j>(); // { dg-error "" }
g<(void (A::*)()) &A::f>(); // { dg-error "" "" { xfail c++11 } }
h<(int A::*) &A::i>(); // { dg-error "" "" { xfail c++11 } }
- g<(void (A::*)()) &B::f>(); // { dg-error "" "" { xfail { c++11 && { arm*-*-* mips*-*-* } } } }
+ g<(void (A::*)()) &B::f>(); // { dg-error "" "" { xfail { c++11 && { aarch64*-*-* arm*-*-* mips*-*-* } } } }
h<(int A::*) &B::j>(); // { dg-error "" }
- g<(void (A::*)()) 0>(); // { dg-error "" "" { target c++98 } }
- h<(int A::*) 0>(); // { dg-error "" "" { target c++98 } }
+ g<(void (A::*)()) 0>(); // { dg-error "" "" { target { ! c++11 } } }
+ h<(int A::*) 0>(); // { dg-error "" "" { target { ! c++11 } } }
return 0;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec22.C b/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
index 41aab394d3..94bffdbeca 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec22.C
@@ -10,6 +10,6 @@ struct S
template <class T>
template <> // { dg-error "enclosing class templates|invalid explicit specialization" }
-void S<T>::f<int> () // { dg-error "does not match|invalid function declaration" }
+void S<T>::f<int> ()
{
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/spec40.C b/gcc/testsuite/g++.old-deja/g++.pt/spec40.C
index 70abb6fc50..fc37f412b7 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/spec40.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/spec40.C
@@ -1,14 +1,33 @@
-// { dg-do run }
+// { dg-do compile }
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 12 Feb 2001 <nathan@codesourcery.com>
-// More from bug 1617. We didn't resolve partial ordering properly. The
-// std is rather vague about it anyway, DR 214 talks about this.
+// More from bug 1617. The resolution of DR 214 implies that the below
+// call to Foo is ambiguous.
+//
+// The type transformation (on the function parameter of Foo) allowed
+// in the context of partial ordering of the Foo template overloads is
+// the following ([temp.deduct.partial]/5):
+//
+// Before the partial ordering is done, certain transformations
+// are performed on the types used for partial ordering:
+//
+// - If P is a reference type, P is replaced by the type
+// referred to.
+//
+// - If A is a reference type, A is replaced by the type
+// referred to.
+//
+// It follows that we are not allowed to apply array-to-pointer
+// decay conversion to the type of the function parameter
+// 'char const (&)[I]'. So the two Foo specializations should
+// be considered unrelated. Thus the partial ordering of the two
+// Foo specializations should fail.
template <typename T> int Foo (T const *) {return 1;}
template <unsigned I> int Foo (char const (&)[I]) {return 2;}
int main ()
{
- return Foo ("a") != 2;
+ return Foo ("a") != 2; // { dg-error "call of overloaded \[^\n\r\]* is ambiguous" }
}
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t29.C b/gcc/testsuite/g++.old-deja/g++.pt/t29.C
index f664f5402b..41a034802e 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/t29.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/t29.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; }
extern int i[30];
diff --git a/gcc/testsuite/g++.old-deja/g++.pt/t30.C b/gcc/testsuite/g++.old-deja/g++.pt/t30.C
index b0c4f2fbde..fb45594358 100644
--- a/gcc/testsuite/g++.old-deja/g++.pt/t30.C
+++ b/gcc/testsuite/g++.old-deja/g++.pt/t30.C
@@ -1,4 +1,4 @@
-// { dg-do assemble { target c++98 } }
+// { dg-do assemble { target { ! c++11 } } }
template <class X, int n> X f (auto X (*x)[n]) { return (*x)[n/2]; }
extern int i[30], i2[33];
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/README b/gcc/testsuite/g++.old-deja/g++.robertl/README
index 220d57d3d7..b6f04a5455 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/README
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/README
@@ -18,7 +18,7 @@ We'll do better now.
Robert Lipe
-Copyright (C) 1998 Free Software Foundation, Inc.
+Copyright (C) 1998-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
index f349076262..b44c33d273 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb109.C
@@ -44,16 +44,16 @@ ostream& operator<<(ostream& os, Graph<VertexType,EdgeType>& G)
// display of vertices with successors
for(int i = 0; i < G.size(); ++i) // { dg-error "no member" } no size function
{
- os << G[i].first << " <"; // { dg-error "no match" } no index operator
+ os << G[i].first << " <"; // { dg-error "14:no match" } no index operator
// The compiler does not like this line!!!!!!
typename Graph<VertexType, EdgeType>::Successor::iterator
- startN = G[i].second.begin(), // { dg-error "no match" } no index operator
- endN = G[i].second.end(); // { dg-error "no match" } no index operator
+ startN = G[i].second.begin(), // { dg-error "14:no match" } no index operator
+ endN = G[i].second.end(); // { dg-error "14:no match" } no index operator
while(startN != endN)
{
- os << G[(*startN).first].first << ' ' // { dg-error "no match" } no index operator
+ os << G[(*startN).first].first << ' ' // { dg-error "20:no match" } no index operator
<< (*startN).second << ' ';
++startN;
}
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
index e01d747883..036c8d5152 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb121.C
@@ -3,7 +3,7 @@ class A {
private:
int i1_;
public:
- void f(int const i1 = 1); // { dg-error "previous specification" }
+ void f(int const i1 = 1); // { dg-message "previous specification" }
};
void
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
index f2352c2221..d66dbd8944 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb125.C
@@ -16,7 +16,7 @@ class test_square
template <class BOX> void test(BOX *the_box)
{x // { dg-error "not declared in this scope" }
- the_box->print(); // { dg-error "before" }
+ the_box->print();
}
template void test<> (test_box *);
diff --git a/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C b/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C
index c74e7bd813..3125dc15f3 100644
--- a/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C
+++ b/gcc/testsuite/g++.old-deja/g++.robertl/eb76.C
@@ -1,4 +1,5 @@
// { dg-do assemble }
+// { dg-options "-fno-short-enums" }
// the template operator!= interferes. It should be in a namespace.
#include <utility>
diff --git a/gcc/testsuite/g++.old-deja/g++.warn/impint.C b/gcc/testsuite/g++.old-deja/g++.warn/impint.C
index 1c7f0eb66b..7ccc73d1fd 100644
--- a/gcc/testsuite/g++.old-deja/g++.warn/impint.C
+++ b/gcc/testsuite/g++.old-deja/g++.warn/impint.C
@@ -16,9 +16,9 @@ struct X
void foo (int);
void wibble (int);
void wibble (int, int);
-void punk (int = 3.5);
+void punk (int = 3.5); // { dg-warning "" } double to int
void rock ();
-void rock (int, int = 3.5);
+void rock (int, int = 3.5); // { dg-warning "" } double to int
void fn ()
{
diff --git a/gcc/testsuite/g++.old-deja/old-deja.exp b/gcc/testsuite/g++.old-deja/old-deja.exp
index c941f40f73..ac3ed7c2ab 100644
--- a/gcc/testsuite/g++.old-deja/old-deja.exp
+++ b/gcc/testsuite/g++.old-deja/old-deja.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1988, 90, 91, 92, 1994, 1997, 2000, 2003, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 1988-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.c-torture/ChangeLog.0 b/gcc/testsuite/gcc.c-torture/ChangeLog.0
index 113abe2c4a..bae6c36a08 100644
--- a/gcc/testsuite/gcc.c-torture/ChangeLog.0
+++ b/gcc/testsuite/gcc.c-torture/ChangeLog.0
@@ -628,7 +628,7 @@ Wed Jun 1 01:57:45 1995 Torbjorn Granlund <tege@bozo.matematik.su.se>
* execute/divconst-[12].c: New tests.
-Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
+Copyright (C) 1995-1997 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gcc.c-torture/compile/20000326-1.c b/gcc/testsuite/gcc.c-torture/compile/20000326-1.c
index 71ed149c8e..3b38106a50 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20000326-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20000326-1.c
@@ -2,22 +2,21 @@ long sys_reboot(int magic1, int magic2, int cmd, void * arg)
{
switch (cmd) {
case 0x89ABCDEF:
- break;
+ return 1;
case 0x00000000:
- break;
+ return 2;
case 0xCDEF0123:
- break;
+ return 3;
case 0x4321FEDC:
- break;
+ return 4;
case 0xA1B2C3D4:
- break;
+ return 5;
default:
- break;
+ return 0;
};
- return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
index e833fb044c..127c4daec4 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20001226-1.c
@@ -21,10 +21,6 @@
#define C1024(x,y) C256(x,y) C256(x+16,y) C256(x+32,y) C256(x+48,y)
#define C4096(x,y) C1024(x,y) C1024(x,y+16) C1024(x,y+32) C1024(x,y+48)
-#ifdef __mips
-/* See PR 51931. */
-__attribute__((nomips16))
-#endif
unsigned foo(int x[64], int y[64])
{
C4096(x,y);
diff --git a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
index ce68f78df1..84cdbe92b6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20010327-1.c
@@ -1,7 +1,4 @@
-/* { dg-skip-if "non-SI pointers" { m32c-*-* } { "*" } { "" } } */
-/* { dg-skip-if "HI mode pointer for avr" { "avr-*-*" } { "*" } { "" } } */
-/* { dg-skip-if "HI mode pointer for pdp11" { "pdp11-*-*" } { "*" } { "" } } */
-/* { dg-skip-if "non-SI pointers for w64" { "x86_64-*-mingw*" } { "*" } { "" } } */
+/* { dg-do compile { target { ptr32plus && { ! llp64 } } } } */
/* This testcase tests whether GCC can produce static initialized data
that references addresses of size 'unsigned long', even if that's not
diff --git a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
index 9486583e97..d2e186a718 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20020604-1.c
@@ -1,7 +1,6 @@
/* { dg-do assemble } */
-/* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } { "*" } { "" } } */
+/* { dg-require-effective-target ptr32plus } */
/* { dg-xfail-if "The array too big" { "h8300-*-*" } { "-mno-h" "-mn" } { "" } } */
-/* { dg-skip-if "" { m32c-*-* } { } { } } */
/* PR c/6957
This testcase ICEd at -O2 on IA-32, because
diff --git a/gcc/testsuite/gcc.c-torture/compile/20030305-1.c b/gcc/testsuite/gcc.c-torture/compile/20030305-1.c
index 2f608196fd..c8e4072055 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20030305-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20030305-1.c
@@ -12,7 +12,7 @@ typedef struct {
} s2_t;
static s2_t s2_array[]= {
- { 1, 4 },
- { 2, 5 },
- { 3, 6 }
+ { 1, 4 }, /* { dg-error "(initialization of flexible array member|near)" } */
+ { 2, 5 }, /* { dg-error "(initialization of flexible array member|near)" } */
+ { 3, 6 } /* { dg-error "(initialization of flexible array member|near)" } */
};
diff --git a/gcc/testsuite/gcc.c-torture/compile/20031125-2.c b/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
index 42b72480e6..fc16051a2d 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20031125-2.c
@@ -1,7 +1,7 @@
struct BlobSpan {
int right;
};
-/* This test makes sure we don't accidently cause a bad insertion to occur
+/* This test makes sure we don't accidentally cause a bad insertion to occur
by choosing the wrong variable name so that we end up with a use not
dominated by a def. */
void render_blob_line(struct BlobSpan blobdata) {
diff --git a/gcc/testsuite/gcc.c-torture/compile/20040621-1.c b/gcc/testsuite/gcc.c-torture/compile/20040621-1.c
index 8a2ebb07ec..cefa9cedf6 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20040621-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20040621-1.c
@@ -1,4 +1,4 @@
-/* This test woudl cause partial redundancies too complex for PRE
+/* This test would cause partial redundancies too complex for PRE
to insert using a single temporary due to them not being GIMPLE
expressions. */
int ssbgst (int c, int k)
diff --git a/gcc/testsuite/gcc.c-torture/compile/20080625-1.c b/gcc/testsuite/gcc.c-torture/compile/20080625-1.c
index 16def2c8a3..4b3b7c2c14 100644
--- a/gcc/testsuite/gcc.c-torture/compile/20080625-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/20080625-1.c
@@ -1,4 +1,5 @@
-/* { dg-skip-if "too much data" { "avr-*-*" "m32c-*-*" "pdp11-*-*" } { "*" } { "" } } */
+/* { dg-require-effective-target int32plus } */
+
struct peakbufStruct {
unsigned int lnum [5000];
int lscan [5000][4000];
diff --git a/gcc/testsuite/gcc.c-torture/compile/20101216-1.c b/gcc/testsuite/gcc.c-torture/compile/20101216-1.c
new file mode 100644
index 0000000000..0c58898c13
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20101216-1.c
@@ -0,0 +1,32 @@
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+typedef union
+{
+ double value;
+ struct
+ {
+ __uint32_t msw;
+ __uint32_t lsw;
+ } parts;
+} ieee_double_shape_type;
+two52= 4.50359962737049600000e+15,
+w6 = -1.63092934096575273989e-03;
+double sin_pi(double x)
+{
+ double y,z;
+ __int32_t n,ix;
+ieee_double_shape_type gh_u;
+ gh_u.value = (x);
+(ix) = gh_u.parts.msw;
+ if(ix<0x43300000)
+ z = y+two52;
+ ieee_double_shape_type gl_u;
+ gl_u.value = (z);
+ (n) = gl_u.parts.lsw;
+ n &= 1;
+ switch (n)
+ {
+ case 0:
+__kernel_sin();
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20120524-1.c b/gcc/testsuite/gcc.c-torture/compile/20120524-1.c
new file mode 100644
index 0000000000..021756b052
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20120524-1.c
@@ -0,0 +1,4 @@
+ char CJPAT_Packet[1508] = {};
+void build_packet(int port, char *packet) {
+ memcpy(packet, CJPAT_Packet, sizeof(CJPAT_Packet));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20120727-1.c b/gcc/testsuite/gcc.c-torture/compile/20120727-1.c
new file mode 100644
index 0000000000..91c9aa10fc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20120727-1.c
@@ -0,0 +1,13 @@
+/* { dg-options "-mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
+
+union {
+ char *p;
+ float f;
+} u;
+
+void
+f (void)
+{
+ u.p = "";
+ u.f += 1.1f;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20120727-2.c b/gcc/testsuite/gcc.c-torture/compile/20120727-2.c
new file mode 100644
index 0000000000..c2c45d03c2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20120727-2.c
@@ -0,0 +1,13 @@
+/* { dg-options "-mfpmath=387" { target { i?86-*-* x86_64-*-* } } } */
+
+union {
+ char *p;
+ double d;
+} u;
+
+void
+f (void)
+{
+ u.p = "";
+ u.d += 1.1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/20140213.c b/gcc/testsuite/gcc.c-torture/compile/20140213.c
new file mode 100644
index 0000000000..3811caa223
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/20140213.c
@@ -0,0 +1,21 @@
+static unsigned short
+foo (unsigned char *x, int y)
+{
+ unsigned short r = 0;
+ int i;
+ for (i = 0; i < y; i++)
+ r += x[i];
+ return r;
+}
+
+int baz (int, unsigned short);
+
+void
+bar (unsigned char *x, unsigned char *y)
+{
+ int i;
+ unsigned short key = foo (x, 0x10000);
+ baz (0, 0);
+ for (i = 0; i < 0x80000; i++)
+ y[i] = x[baz (i, key)];
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/990617-1.c b/gcc/testsuite/gcc.c-torture/compile/990617-1.c
index e9d3cf336f..350b96a61c 100644
--- a/gcc/testsuite/gcc.c-torture/compile/990617-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/990617-1.c
@@ -1,7 +1,5 @@
-/* 0x70000000 is too large a constant to become a pointer on
- xstormy16. */
/* { dg-do assemble } */
-/* { dg-xfail-if "" { xstormy16-*-* } { "*" } { "" } } */
+/* { dg-require-effective-target ptr32plus } */
int main()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/calls.c b/gcc/testsuite/gcc.c-torture/compile/calls.c
index 1582c0e92f..1241058a07 100644
--- a/gcc/testsuite/gcc.c-torture/compile/calls.c
+++ b/gcc/testsuite/gcc.c-torture/compile/calls.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target ptr32plus } */
typedef void *(*T)(void);
f1 ()
{
diff --git a/gcc/testsuite/gcc.c-torture/compile/compile.exp b/gcc/testsuite/gcc.c-torture/compile/compile.exp
index 01c5644ff2..5fd47015e1 100644
--- a/gcc/testsuite/gcc.c-torture/compile/compile.exp
+++ b/gcc/testsuite/gcc.c-torture/compile/compile.exp
@@ -1,5 +1,5 @@
# Expect driver script for GCC Regression Tests
-# Copyright (C) 1993, 1995, 1997, 2003, 2007 Free Software Foundation
+# Copyright (C) 1993-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.c-torture/compile/labels-3.c b/gcc/testsuite/gcc.c-torture/compile/labels-3.c
index 14eb9522f6..51ac88380b 100644
--- a/gcc/testsuite/gcc.c-torture/compile/labels-3.c
+++ b/gcc/testsuite/gcc.c-torture/compile/labels-3.c
@@ -1,9 +1,3 @@
-/* This test does not compile on mips-irix6 using the native assembler,
- though it does work with gas. See PR6200. Since we cannot (???)
- distinguish which assembler is being used, always pass -S for
- irix. */
-/* { dg-options "-w -S" { target mips*-*-irix* } } */
-
/* Verify that we can narrow the storage associated with label diffs. */
int foo (int a)
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c b/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c
index ee85580066..41bf9c5cdc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-declparen.c
@@ -1,4 +1,3 @@
-/* { dg-xfail-if "" { alpha*-dec-osf5* } { "-g" } { "" } } */
#define PTR1 (* (* (* (* (* (* (* (* (* (*
#define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1
#define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c b/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
index c484becb85..17afe73088 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-externdecl.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target int32plus } */
/* Inspired by the test case for PR middle-end/52640. */
typedef struct
@@ -53,4 +54,3 @@ REFERENCE references[] = {
LIM5 (X)
0
};
-
diff --git a/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c b/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c
index 4351555661..1e50ea7cf3 100644
--- a/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c
+++ b/gcc/testsuite/gcc.c-torture/compile/limits-pointer.c
@@ -1,4 +1,3 @@
-/* { dg-xfail-if "" { alpha*-dec-osf5* } { "-g" } { "" } } */
#define PTR1 * * * * * * * * * *
#define PTR2 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1 PTR1
#define PTR3 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2 PTR2
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr28865.c b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
new file mode 100644
index 0000000000..4ad0f5c430
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr28865.c
@@ -0,0 +1,18 @@
+/* { dg-xfail-if "PR target/60602" { sparc*-*-solaris2.9* && { ! gas } } { "-O0" } } */
+
+struct var_len
+{
+ int field1;
+ const char field2[];
+};
+
+/* Note - strictly speaking this array declaration is illegal
+ since each element has a variable length. GCC allows it
+ (for the moment) because it is used in existing code, such
+ as glibc. */
+static const struct var_len var_array[] =
+{
+ { 1, "Long exposure noise reduction" },
+ { 2, "Shutter/AE lock buttons" },
+ { 3, "Mirror lockup" }
+};
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr38621.c b/gcc/testsuite/gcc.c-torture/compile/pr38621.c
new file mode 100644
index 0000000000..746d32836b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr38621.c
@@ -0,0 +1,16 @@
+/* PR target/38621 */
+struct s
+{
+ char a[512];
+ int b;
+ int c;
+};
+
+long long
+foo (struct s *p, int m, int r)
+{
+ if (r == m)
+ p->b = 3;
+ p->c = 1;
+ return m;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c b/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c
new file mode 100644
index 0000000000..34ebb66381
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39423-1.c
@@ -0,0 +1,22 @@
+/* PR target/39423 */
+
+int
+foo (const char *name, int nmlen, char *flags)
+{
+ const char *nonspc;
+ int len, n, lfn;
+ int needlfn[2], dotspc[2];
+ unsigned char locale[2];
+ for (nonspc = &name[nmlen - 1]; nonspc >= name && *nonspc == ' '; ++n)
+ {
+ if (!nmlen)
+ {
+ needlfn[name >= nonspc] = !0, dotspc[n != 0] =
+ locale[0], --n, name += len, nmlen -= len;
+ }
+ }
+ if (!lfn && ((dotspc[0] == ' ' && !(len & 0x0010)) || dotspc[0] == '.'))
+ return 22;
+ if (!(needlfn[0] || needlfn[1]))
+ *flags |= 0x02;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39423-2.c b/gcc/testsuite/gcc.c-torture/compile/pr39423-2.c
new file mode 100644
index 0000000000..5307846d7e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39423-2.c
@@ -0,0 +1,57 @@
+/* PR target/39423 */
+
+typedef unsigned short uint16_t;
+
+typedef struct
+{
+ short x, y;
+} P;
+
+typedef struct
+{
+ uint16_t w, h;
+} D;
+
+typedef struct
+{
+ P p;
+ D s;
+} A;
+
+typedef struct
+{
+ uint16_t f;
+} W;
+
+typedef struct
+{
+ void* w;
+ D s;
+} T;
+
+extern void* foo00 (void*, void*);
+
+void foo01 (W* w)
+{
+ void* it;
+ uint16_t c, i;
+ T* cl;
+ T* rs;
+ T* t;
+ uint16_t rh = 0;
+ uint16_t v = !(w->f & 0x8000);
+ A a = { };
+
+ for (c = 0, it = foo00 (w, 0); it; it = foo00 (w, it), c++);
+
+ for (it = foo00 (w, 0), i = 0; i <= c; it = foo00 (w, it), i++, cl++)
+ {
+ if (i)
+ for (t = rs; t < cl; t++)
+ *((uint16_t*)&t->s + ((!v) ? 1 : 0)) = rh;
+
+ rh = (rh > ((*((uint16_t*)&a.s + ((!v) ? 1 : 0)))))
+ ? rh
+ : ((*((uint16_t*)&a.s + ((!v) ? 1 : 0))));
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr39834.c b/gcc/testsuite/gcc.c-torture/compile/pr39834.c
index ecc3977a1f..c0ad8fd3b9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr39834.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr39834.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O1 -Winline" } */
+/* { dg-options "-Winline" } */
void quit_mined ();
void bottom_line ();
typedef enum { False, True } FLAG;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr40797.c b/gcc/testsuite/gcc.c-torture/compile/pr40797.c
new file mode 100644
index 0000000000..001d1b507b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr40797.c
@@ -0,0 +1,16 @@
+typedef struct str { short x, y;} S;
+
+static short
+bar (short ch, short sl, short sr, short tl, short tr)
+{
+ return 0;
+}
+
+void
+foo (short ch, S *pi, short nc, S *po)
+{
+ short clo, chi, lo, hi;
+
+ po->x = bar (ch, clo, chi, pi[lo].x, pi[hi].x);
+ po->y = bar (ch, clo, chi, pi[lo].y, pi[hi].y);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr41181.c b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
index 5fafb020ea..e1e48063a9 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr41181.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr41181.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target ptr32plus } */
/* { dg-skip-if "The array is too big" { "avr-*-*" "pdp11-*-*" } { "*" } { "" } } */
char paths[1024];
static void x264_slicetype_path(char (*best_paths)[250], int n, int length)
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr43791.c b/gcc/testsuite/gcc.c-torture/compile/pr43791.c
index 38cb3c8e00..2b1d06ff78 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr43791.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr43791.c
@@ -18,4 +18,3 @@ void fasttrylock(void (*slowfn)()) {
void trylock(void) {
fasttrylock(slowtrylock);
}
-
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44687.c b/gcc/testsuite/gcc.c-torture/compile/pr44687.c
index f59c2efd0f..6da3f694ad 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44687.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44687.c
@@ -1,32 +1,33 @@
-typedef int int32_t;
-typedef unsigned char uint8_t;
-struct S0
-{
- uint8_t f0;
-};
-struct S0 *g_18[7][5][1][1] = {
-};
-
-struct S0 **g_17 = &g_18[0][3][0][0];
-int32_t g_86;
-struct S0 func_72 (uint8_t p_73, struct S0 p_74);
-
-void int326 (struct S0 **p_67, int32_t p_68, int32_t * *const p_69,
- struct S0 *p_70)
-{
- struct S0 l_95 = {
- -1L
- };
- func_72 (1L, func_72 (0, l_95));
-}
-
-struct S0
-func_72 (uint8_t p_73, struct S0 p_74)
-{
- int32_t *l_85 = &g_86;
- if (*l_85)
- lbl_94:*l_85 ^= 0;
- if (g_86)
- goto lbl_94;
- return **g_17;
-}
+typedef int int32_t;
+typedef unsigned char uint8_t;
+struct S0
+{
+ uint8_t f0;
+};
+struct S0 *g_18[7][5][1][1] = {
+};
+
+struct S0 **g_17 = &g_18[0][3][0][0];
+int32_t g_86;
+struct S0 func_72 (uint8_t p_73, struct S0 p_74);
+
+void
+int326 (struct S0 **p_67, int32_t p_68, int32_t * *const p_69,
+ struct S0 *p_70)
+{
+ struct S0 l_95 = {
+ -1L
+ };
+ func_72 (1L, func_72 (0, l_95));
+}
+
+struct S0
+func_72 (uint8_t p_73, struct S0 p_74)
+{
+ int32_t *l_85 = &g_86;
+ if (*l_85)
+ lbl_94:*l_85 ^= 0;
+ if (g_86)
+ goto lbl_94;
+ return **g_17;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr44707.c b/gcc/testsuite/gcc.c-torture/compile/pr44707.c
index d5d39fc83c..bad8177557 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr44707.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr44707.c
@@ -1,3 +1,5 @@
+/* { dg-do compile { target powerpc-ibm-aix* } } */
+
extern struct { int a, b, c, d; } v;
extern int w;
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr45085.c b/gcc/testsuite/gcc.c-torture/compile/pr45085.c
deleted file mode 100644
index 5c1ec6a5c9..0000000000
--- a/gcc/testsuite/gcc.c-torture/compile/pr45085.c
+++ /dev/null
@@ -1,45 +0,0 @@
-/* { dg-options "-O2 -Wuninitialized" } */
-struct S { char *s1; long s2; };
-struct T { int t1; long t2; long t3; };
-extern int fn2 (void);
-extern int fn3 (struct T);
-extern struct T fn4 ();
-extern int fn5 (char **, long *, int);
-extern void fn6 (void);
-extern void fn7 (void *);
-struct S *fn10 ();
-static int p;
-static void *q;
-extern struct T r;
-
-static struct T
-fn8 (struct T x, int y)
-{
- struct S *u = fn10 ();
- int v = fn5 (&u->s1, &u->s2, 0);
- while (1)
- {
- if (p)
-fn6 ();
- if (fn3 (x))
-return fn4 ();
- if (y & 1)
-return r;
- v = fn5 (&u->s1, &u->s2, 1);
- }
-}
-
-struct T
-fn9 (struct T x, int y)
-{
- struct T t = fn8 (x, y);
- if (fn2 ())
- fn7 (q);
- return t;
-}
-
-void *
-fn1 (void)
-{
- return fn9;
-}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr48596.c b/gcc/testsuite/gcc.c-torture/compile/pr48596.c
new file mode 100644
index 0000000000..382a152413
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr48596.c
@@ -0,0 +1,28 @@
+/* PR target/48596 */
+enum { nrrdCenterUnknown, nrrdCenterNode, nrrdCenterCell, nrrdCenterLast };
+typedef struct { int size; int center; } NrrdAxis;
+typedef struct { int dim; NrrdAxis axis[10]; } Nrrd;
+typedef struct { } NrrdKernel;
+typedef struct { const NrrdKernel *kernel[10]; int samples[10]; } Info;
+
+void
+foo (Nrrd *nout, Nrrd *nin, const NrrdKernel *kernel, const double *parm,
+ const int *samples, const double *scalings)
+{
+ Info *info;
+ int d, p, np, center;
+ for (d=0; d<nin->dim; d++)
+ {
+ info->kernel[d] = kernel;
+ if (samples)
+ info->samples[d] = samples[d];
+ else
+ {
+ center = _nrrdCenter(nin->axis[d].center);
+ if (nrrdCenterCell == center)
+ info->samples[d] = nin->axis[d].size*scalings[d];
+ else
+ info->samples[d] = (nin->axis[d].size - 1)*scalings[d] + 1;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr48929.c b/gcc/testsuite/gcc.c-torture/compile/pr48929.c
index f085dc645a..b28ad9d000 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr48929.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr48929.c
@@ -1,4 +1,4 @@
-/*{ dg-options "-O -findirect-inlining" }*/
+/*{ dg-options "-findirect-inlining" }*/
void bar ();
static void
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49206.c b/gcc/testsuite/gcc.c-torture/compile/pr49206.c
new file mode 100644
index 0000000000..1df23c9833
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49206.c
@@ -0,0 +1,26 @@
+struct S1
+{
+ short f0;
+};
+extern volatile struct S1 g_5;
+extern int g_120, i;
+extern short g_339;
+
+int
+func_72 (int x, int y, struct S1 z)
+{
+ for (z.f0 = -3; z.f0 > 16; z.f0 += 1)
+ foo ();
+ return g_120;
+}
+
+int
+main ()
+{
+ while (g_339 % 0x200003)
+ continue;
+ if (i)
+ func_72 (0, 0, g_5);
+ foo (&g_339);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr49220.c b/gcc/testsuite/gcc.c-torture/compile/pr49220.c
new file mode 100644
index 0000000000..b8285ce4ac
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr49220.c
@@ -0,0 +1,25 @@
+int array[2];
+
+static int
+func1 (int b)
+{
+ return b;
+}
+
+static int
+func2 (int a, int b)
+{
+ return b == 0 ? a : b;
+}
+
+int
+func3 (int a)
+{
+}
+
+int *
+func4 (int *arg)
+{
+ *arg = func1 ((func2 (func3 (array[0]), *arg)) | array[0]);
+ return &array[1];
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr50380.c b/gcc/testsuite/gcc.c-torture/compile/pr50380.c
index ffd044263e..3f03cbbc31 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr50380.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr50380.c
@@ -1,12 +1,22 @@
-/* This test used to get stuck in an infinite loop in find_comparison_args
- when compiling for MIPS at -O2. */
-
__attribute__ ((__noreturn__)) extern void fail (void);
char x;
+/* This used to get stuck in an infinite loop in find_comparison_args
+ when compiling this function for MIPS at -O2. */
+
void foo (const unsigned char y)
{
((void) (__builtin_expect((!! y == y), 1) ? 0 : (fail (), 0)));
x = ! y;
}
+
+/* This used to similarly get stuck when compiling for PowerPC at -O2. */
+
+int foo2 (int arg)
+{
+ if (arg != !arg)
+ fail ();
+ if (arg)
+ fail ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52306.c b/gcc/testsuite/gcc.c-torture/compile/pr52306.c
new file mode 100644
index 0000000000..e82cb2a305
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr52306.c
@@ -0,0 +1,84 @@
+/* PR middle-end/52306 */
+
+struct xmlNs {
+ const unsigned char *prefix;
+};
+
+struct xmlNode {
+ const unsigned char *name;
+ struct xmlNs *ns;
+ struct xmlNs *nsDef;
+};
+
+struct xsltTemplate {
+ const unsigned char *name;
+ int inheritedNsNr;
+ void *inheritedNs;
+};
+
+struct xsltTemplate *xsltNewTemplate(void);
+void xsltGetQNameURI(unsigned char**);
+long xmlMalloc(unsigned long);
+void xsltGenericDebug(void);
+int xmlStrEqual(const unsigned char*, const unsigned char*);
+
+static void xsltGetInheritedNsList(
+ struct xsltTemplate *template,
+ struct xmlNode *node)
+{
+ struct xmlNs *cur;
+ struct xmlNs **ret;
+ int nbns = 0;
+ int maxns = 10;
+ int i;
+
+ if (template == 0
+ || template->inheritedNsNr != 0
+ || template->inheritedNs != 0)
+ return;
+
+ while (node != 0) {
+ cur = node->nsDef;
+ ret = (struct xmlNs**) xmlMalloc((maxns + 1) * sizeof(struct xmlNs*));
+ for (i = 0; i < nbns; i++)
+ if (cur->prefix == ret[i]->prefix
+ || xmlStrEqual(cur->prefix, 0))
+ break;
+
+ if (i >= nbns) {
+ if (nbns >= maxns)
+ return;
+ ret[nbns++] = cur;
+ }
+ }
+}
+
+static void
+xsltParseStylesheetTemplate(struct xmlNode *template)
+{
+ struct xsltTemplate *ret;
+ unsigned char *prop;
+
+ ret = xsltNewTemplate();
+ if (ret == 0)
+ return;
+ xsltGetInheritedNsList(ret, template);
+ xsltGenericDebug();
+ xsltGetQNameURI(&prop);
+ xmlStrEqual(0, ret->name);
+}
+
+void xsltParseStylesheetTop(struct xmlNode *cur)
+{
+ xmlStrEqual(0, 0);
+
+ while (cur != 0) {
+ if (xmlStrEqual(cur->name, 0))
+ ;
+ else if (xmlStrEqual(cur->name, 0))
+ ;
+ else if (xmlStrEqual(cur->name, 0))
+ xsltParseStylesheetTemplate(cur);
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52533.c b/gcc/testsuite/gcc.c-torture/compile/pr52533.c
new file mode 100644
index 0000000000..82753cd73d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr52533.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/52533 */
+
+int
+foo (unsigned char x)
+{
+ if (x <= 9)
+ return '0' + x;
+ else if (x <= 15)
+ return 'a' + (x - 10);
+ else
+ return 0;
+}
+
+void
+bar (unsigned char x, unsigned char *y)
+{
+ y[0] = foo ((unsigned char) (x >> 4));
+ y[1] = foo ((unsigned char) (x & 0x0f));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52555.c b/gcc/testsuite/gcc.c-torture/compile/pr52555.c
new file mode 100644
index 0000000000..701683488d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr52555.c
@@ -0,0 +1,10 @@
+/* { dg-options "-ffast-math" } */
+
+float farg;
+unsigned val;
+
+void __attribute__((optimize("O")))
+test()
+{
+ val = __builtin_ceilf(farg);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr52714.c b/gcc/testsuite/gcc.c-torture/compile/pr52714.c
new file mode 100644
index 0000000000..03d4990891
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr52714.c
@@ -0,0 +1,25 @@
+
+int __re_compile_fastmap(unsigned char *p)
+{
+ unsigned char **stack;
+ unsigned size;
+ unsigned avail;
+
+ stack = __builtin_alloca(5 * sizeof(unsigned char*));
+ if (stack == 0)
+ return -2;
+ size = 5;
+ avail = 0;
+
+ for (;;) {
+ switch (*p++) {
+ case 0:
+ if (avail == size)
+ return -2;
+ stack[avail++] = p;
+ }
+ }
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53058.c b/gcc/testsuite/gcc.c-torture/compile/pr53058.c
new file mode 100644
index 0000000000..90063c5084
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53058.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/53058 */
+
+int a, b, c;
+
+void
+foo ()
+{
+ c = b >> 16;
+ if (c > 32767)
+ c = 0;
+ a = b;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53226.c b/gcc/testsuite/gcc.c-torture/compile/pr53226.c
new file mode 100644
index 0000000000..2d0284fb00
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53226.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/53226 */
+
+void
+foo (unsigned long *x, char y, char z)
+{
+ int i;
+ for (i = y; i < z; ++i)
+ {
+ unsigned long a = ((unsigned char) i) & 63UL;
+ unsigned long b = 1ULL << a;
+ *x |= b;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53411.c b/gcc/testsuite/gcc.c-torture/compile/pr53411.c
new file mode 100644
index 0000000000..e88ecbc4ca
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53411.c
@@ -0,0 +1,33 @@
+/* PR middle-end/53411 */
+
+int a, b, c, d, e, f, g, h;
+void fn1 (void);
+int fn2 (void);
+
+int
+fn3 (x)
+ int x;
+{
+ return a ? 0 : x;
+}
+
+void
+fn4 (char x)
+{
+ int i, j, k;
+ for (; e; e++)
+ if (fn2 ())
+ {
+ f = 1;
+ k = 0;
+ for (; k <= 1; k++)
+ {
+ j = ~x;
+ i = f * j;
+ h = (fn3 (i | 0 <= c ^ 9L) != b | d) & 8;
+ g = x | 1;
+ fn1 ();
+ }
+ }
+ c = x;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53495.c b/gcc/testsuite/gcc.c-torture/compile/pr53495.c
new file mode 100644
index 0000000000..957013165a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53495.c
@@ -0,0 +1,41 @@
+/* PR rtl-optimization/53495 */
+
+int a, b, c, d, e, g;
+static char
+fn1 (char p1, int p2)
+{
+ return p1 || p2 < 0 || p2 >= 1 || 1 >> p2 ? p1 : 0;
+}
+
+static long long fn2 (int *, int);
+static int fn3 ();
+void
+fn4 ()
+{
+ fn3 ();
+ fn2 (&a, d);
+}
+
+long long
+fn2 (int *p1, int p2)
+{
+ int f = -1L;
+ for (; c <= 1; c++)
+ {
+ *p1 = 0;
+ *p1 = fn1 (c, p2 ^ f);
+ }
+ a = 0;
+ e = p2;
+ return 0;
+}
+
+int
+fn3 ()
+{
+ b = 3;
+ for (; b; b--)
+ c++;
+ g = 0 >= c;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53748.c b/gcc/testsuite/gcc.c-torture/compile/pr53748.c
new file mode 100644
index 0000000000..9aad70dd73
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53748.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/53748 */
+
+typedef unsigned int V __attribute__ ((__vector_size__ (sizeof (int) * 4)));
+
+void
+foo (int x, V *y)
+{
+ *y = x ? ((V) { ~0U, ~0U, ~0U, ~0U }) : ((V) { 0, 0, 0, 0 });
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr53886.c b/gcc/testsuite/gcc.c-torture/compile/pr53886.c
new file mode 100644
index 0000000000..89b6966352
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr53886.c
@@ -0,0 +1,68 @@
+/* PR target/53886 */
+typedef struct asn1_string_st ASN1_BIT_STRING;
+typedef struct bignum_st BIGNUM;
+typedef struct ec_group_st EC_GROUP;
+typedef struct ec_key_st EC_KEY;
+
+struct ec_key_st
+{
+ EC_GROUP *group;
+ BIGNUM *priv_key;
+ unsigned int enc_flag;
+}
+X9_62_PENTANOMIAL;
+typedef struct ec_privatekey_st
+{
+ ASN1_BIT_STRING *publicKey;
+}
+EC_PRIVATEKEY;
+
+extern EC_PRIVATEKEY* EC_PRIVATEKEY_new (void);
+extern void EC_PRIVATEKEY_free (EC_PRIVATEKEY*);
+extern unsigned char* CRYPTO_realloc (char*,int,const char*,int);
+
+int
+i2d_ECPrivateKey (EC_KEY * a, unsigned char **out)
+{
+ int ret = 0, ok = 0;
+ unsigned char *buffer = 0;
+ unsigned buf_len = 0, tmp_len;
+ EC_PRIVATEKEY *priv_key = 0;
+ if (a == 0 || a->group == 0 || a->priv_key == 0)
+ {
+ ERR_put_error (16, (192), ((3 | 64)),
+ "",
+ 1234);
+ goto err;
+ }
+ if ((priv_key = EC_PRIVATEKEY_new ()) == 0)
+ {
+ ERR_put_error (16, (192), ((1 | 64)),
+ "",
+ 1241);
+ goto err;
+ }
+ if (!(a->enc_flag & 0x002))
+ {
+ if (priv_key->publicKey == 0)
+ {
+ goto err;
+ }
+ if (tmp_len > buf_len)
+ {
+ unsigned char *tmp_buffer =
+ CRYPTO_realloc ((char *) buffer, (int) tmp_len, "", 1293);
+ buffer = tmp_buffer;
+ }
+ }
+ if ((ret = i2d_EC_PRIVATEKEY (priv_key, out)) == 0)
+ {
+ }
+ ok = 1;
+err:
+ if (buffer)
+ CRYPTO_free (buffer);
+ if (priv_key)
+ EC_PRIVATEKEY_free (priv_key);
+ return (ok ? ret : 0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54321.c b/gcc/testsuite/gcc.c-torture/compile/pr54321.c
new file mode 100644
index 0000000000..13adc78d34
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54321.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/54321 */
+struct S { char s[0]; } *a;
+
+void
+foo (void)
+{
+ char *b = a->s;
+ int c = 0;
+ b[0] = 0;
+ while (++c < 9)
+ b[c] = 255;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
new file mode 100644
index 0000000000..f042ea2fc6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-1.c
@@ -0,0 +1,70 @@
+/* PR tree-optimization/54713 */
+
+#ifndef N
+#define N 8
+#define ONE 1, 1, 1, 1, 1, 1, 1, 1
+#define ONEU 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U
+#endif
+
+typedef int V __attribute__((vector_size (N * sizeof (int))));
+typedef unsigned int W __attribute__((vector_size (N * sizeof (int))));
+
+void
+f1 (V *p)
+{
+ *p = (*p & ((V) { ONE })) ^ ((V) { ONE});
+}
+
+void
+f2 (V *p)
+{
+ *p = (*p ^ ((V) { ONE })) & ((V) { ONE});
+}
+
+void
+f3 (V *p)
+{
+ *p = (~*p) & ((V) { ONE });
+}
+
+void
+f4 (V *p, V *q)
+{
+ *p = (*p ^ *q) == *q;
+}
+
+void
+f5 (V *p, V *q)
+{
+ *p = (*p ^ *q) == *p;
+}
+
+void
+f6 (V *p, V *q, V *r)
+{
+ *p = (*p & *r) == (*q & *r);
+}
+
+void
+f7 (V *p, V *q, V *r)
+{
+ *p = (*p & *r) == (*r & *q);
+}
+
+void
+f8 (V *p, V *q, V *r)
+{
+ *p = (*r & *p) == (*q & *r);
+}
+
+void
+f9 (V *p, V *q, V *r)
+{
+ *p = (*r & *p) == (*r & *q);
+}
+
+void
+f10 (W *p, W *q)
+{
+ *p = *p < (((const W) { ONEU }) << *q);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
new file mode 100644
index 0000000000..c391037311
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-2.c
@@ -0,0 +1,7 @@
+/* PR tree-optimization/54713 */
+
+#define N 16
+#define ONE 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+#define ONEU 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U
+
+#include "pr54713-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c b/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
new file mode 100644
index 0000000000..6164a5eec0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54713-3.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/54713 */
+
+#define N 32
+#define ONE 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, \
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
+#define ONEU 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, \
+ 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U, 1U
+
+#include "pr54713-1.c"
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr54925.c b/gcc/testsuite/gcc.c-torture/compile/pr54925.c
new file mode 100644
index 0000000000..72349c9d7d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr54925.c
@@ -0,0 +1,27 @@
+/* PR target/54925 */
+extern int bar;
+extern void foo (int *);
+static unsigned char *
+nr_memcpy (unsigned char *, unsigned char *, unsigned short);
+
+void
+baz (char *buf, unsigned short len)
+{
+ unsigned char data[10];
+ if (len == 0)
+ return;
+ nr_memcpy (data, (unsigned char *) buf, len);
+ foo (&bar);
+}
+
+static unsigned char *
+nr_memcpy (unsigned char * to, unsigned char * from, unsigned short len)
+{
+ unsigned char *p = to;
+ while (len > 0)
+ {
+ len--;
+ *to++ = *from++;
+ }
+ return p;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55273.c b/gcc/testsuite/gcc.c-torture/compile/pr55273.c
new file mode 100644
index 0000000000..8ae5199b78
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55273.c
@@ -0,0 +1,18 @@
+extern int debug_threads;
+extern void sigsuspend (void);
+void my_waitpid (int flags, int wnohang)
+{
+ while (1)
+ {
+ if (flags & 0x80000000)
+ {
+ if (wnohang)
+ break;
+ if (debug_threads)
+ __builtin_puts ("blocking\n");
+ sigsuspend ();
+ }
+ flags ^= 0x80000000;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55350.c b/gcc/testsuite/gcc.c-torture/compile/pr55350.c
new file mode 100644
index 0000000000..f10daeae50
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55350.c
@@ -0,0 +1,8 @@
+void
+foo (__INTPTR_TYPE__ x, __INTPTR_TYPE__ y)
+{
+ int i;
+ void **a = (void *) (8UL * (x / 8UL));
+ for (i = 0; i < x; i++)
+ a[i] = (void *) y;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55569.c b/gcc/testsuite/gcc.c-torture/compile/pr55569.c
new file mode 100644
index 0000000000..cffbcfc752
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55569.c
@@ -0,0 +1,11 @@
+/* { dg-options "-ftree-vectorize" } */
+int *bar (void);
+
+void
+foo (void)
+{
+ long x;
+ int *y = bar ();
+ for (x = -1 / sizeof (int); x; --x, ++y)
+ *y = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55832.c b/gcc/testsuite/gcc.c-torture/compile/pr55832.c
new file mode 100644
index 0000000000..221c3c988e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55832.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/55832 */
+
+int g, b;
+
+void
+foo (void)
+{
+ union U { int i; unsigned short s; } a = { 0 };
+ unsigned char c;
+ unsigned short d = 0, *p = &a.s;
+
+ if (g)
+ a.i--;
+
+ if (b && a.i < (d = 1))
+ return;
+
+ for (; a.i < 15; a.i++)
+ b |= d <= c;
+
+ if (!*p)
+ g = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55851.c b/gcc/testsuite/gcc.c-torture/compile/pr55851.c
new file mode 100644
index 0000000000..6198a7339c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55851.c
@@ -0,0 +1,12 @@
+/* PR middle-end/55851 */
+
+enum { A = 1UL, B = -1UL } var = A;
+void foo (char *);
+
+void
+test (void)
+{
+ char vla[1][var];
+ vla[0][0] = 1;
+ foo (&vla[0][0]);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55920.c b/gcc/testsuite/gcc.c-torture/compile/pr55920.c
new file mode 100644
index 0000000000..91387430b7
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55920.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/55920 */
+
+struct A { unsigned a; } __attribute__((packed));
+struct B { int b; unsigned char c[16]; };
+void bar (struct A);
+
+void
+foo (struct B *x)
+{
+ struct A a;
+ if (x->b)
+ __builtin_memcpy (&a, x->c, sizeof a);
+ else
+ a.a = 0;
+ bar (a);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55921.c b/gcc/testsuite/gcc.c-torture/compile/pr55921.c
index 39af43cec0..94b7bceb87 100644
--- a/gcc/testsuite/gcc.c-torture/compile/pr55921.c
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55921.c
@@ -1,5 +1,4 @@
/* PR tree-optimization/55921 */
-/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
typedef union
{
@@ -15,8 +14,8 @@ foo (ucf *in, ucf *out, _Complex float r)
_Complex float cf;
ucf1.ll = in[i].ll;
- __asm ("" : "=r" (cf) : "0" (ucf1.ll));
+ __asm ("" : "=r" (cf) : "r" (ucf1.ll));
cf *= r;
- __asm ("" : "=r" (ucf1.ll) : "0" (cf));
+ __asm ("" : "=r" (ucf1.ll) : "r" (cf));
out[i].ll = ucf1.ll;
}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr55955.c b/gcc/testsuite/gcc.c-torture/compile/pr55955.c
new file mode 100644
index 0000000000..cd96d56e8b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr55955.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target int32plus } */
+/* PR tree-optimization/55955 */
+
+int b;
+
+void
+foo (int x)
+{
+ int a;
+ for (a = x; a < 2; a++)
+ for (b = 0; b < 2; b++)
+ *(unsigned short *) 0x100000UL %= 46;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56405.c b/gcc/testsuite/gcc.c-torture/compile/pr56405.c
new file mode 100644
index 0000000000..6e6a56e156
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56405.c
@@ -0,0 +1,7 @@
+/* PR inline-asm/56405 */
+
+void
+foo (void)
+{
+ asm volatile ("" : "+m" (*(volatile unsigned short *) 0x1001UL));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56448.c b/gcc/testsuite/gcc.c-torture/compile/pr56448.c
new file mode 100644
index 0000000000..f10da6ce75
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56448.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/56448 */
+
+volatile int a[1];
+int b;
+
+void
+foo ()
+{
+ for (;;)
+ {
+ int *c[3][6] = { 0, 0, 0, &b, 0, 0, 0, 0, &b, 0, 0, 0, 0, 0, 0, 0, &b, (int *) &a[0] };
+ b = *c[2][5];
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56484.c b/gcc/testsuite/gcc.c-torture/compile/pr56484.c
new file mode 100644
index 0000000000..894862cd46
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56484.c
@@ -0,0 +1,17 @@
+/* PR rtl-optimization/56484 */
+
+unsigned char b[4096];
+int bar (void);
+
+int
+foo (void)
+{
+ int a = 0;
+ while (bar ())
+ {
+ int c = bar ();
+ a = a < 0 ? a : c;
+ __builtin_memset (b, 0, sizeof b);
+ }
+ return a;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56571.c b/gcc/testsuite/gcc.c-torture/compile/pr56571.c
new file mode 100644
index 0000000000..248148c9ff
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56571.c
@@ -0,0 +1,8 @@
+/* { dg-options "-funroll-loops -ftracer" } */
+int a, b;
+
+int f(void)
+{
+ (a % b) && f();
+ a = (0 || a | (a ? : 1));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56745.c b/gcc/testsuite/gcc.c-torture/compile/pr56745.c
new file mode 100644
index 0000000000..ee9ba051fe
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56745.c
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/56745 */
+
+unsigned char a[6];
+
+void
+foo ()
+{
+ int i;
+ for (i = 5; i >= 0; i++)
+ {
+ if (++a[i] != 0)
+ break;
+ ++a[i];
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr56984.c b/gcc/testsuite/gcc.c-torture/compile/pr56984.c
new file mode 100644
index 0000000000..bd00bee88e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr56984.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/56984 */
+
+int
+foo (int x)
+{
+ if ((x >> 31) < -1)
+ x++;
+ return x;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57108.c b/gcc/testsuite/gcc.c-torture/compile/pr57108.c
new file mode 100644
index 0000000000..531af8d245
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr57108.c
@@ -0,0 +1,17 @@
+/* PR target/57108 */
+
+void __assert_func (void) __attribute__ ((__noreturn__));
+
+void
+ATATransfer (int num, int buffer)
+{
+ int wordCount;
+
+ while (num > 0)
+ {
+ wordCount = num * 512 / sizeof (int);
+
+ ((0 == (buffer & 63)) ? (void)0 : __assert_func () );
+ ((0 == (wordCount & 31)) ? (void)0 : __assert_func ());
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57331.c b/gcc/testsuite/gcc.c-torture/compile/pr57331.c
new file mode 100644
index 0000000000..b30e1ad12a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr57331.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/57331 */
+
+int
+foo (int x)
+{
+ void *p = x ? (void *) 1 : (void *) 0;
+ __INTPTR_TYPE__ b = (__INTPTR_TYPE__) p;
+ if (b)
+ return 0;
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57441.c b/gcc/testsuite/gcc.c-torture/compile/pr57441.c
new file mode 100644
index 0000000000..e357c10051
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr57441.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/57441 */
+
+int a, c, d, *e;
+unsigned char b;
+
+char
+baz (char p1)
+{
+ return p1 * a;
+}
+
+void func_65 ();
+func_1 ()
+{
+ func_65 ();
+ func_65 ();
+}
+
+void
+func_65 ()
+{
+ d = baz (b--);
+ if (*e)
+ b--;
+ c = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr57698.c b/gcc/testsuite/gcc.c-torture/compile/pr57698.c
new file mode 100644
index 0000000000..a9efb42902
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr57698.c
@@ -0,0 +1,19 @@
+typedef int (*IsAcceptableThis) (const int );
+inline int
+fn1 (IsAcceptableThis p1)
+{
+ p1 (0);
+ return 0;
+}
+
+__attribute__ ((always_inline))
+inline int fn2 (const int a)
+{
+ return 0;
+}
+
+void
+fn3 ()
+{
+ fn1 (fn2);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58088.c b/gcc/testsuite/gcc.c-torture/compile/pr58088.c
new file mode 100644
index 0000000000..07a9c68a7f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58088.c
@@ -0,0 +1,5 @@
+int
+bar (int i)
+{
+ return 1 | ((i * 2) & 254);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58164.c b/gcc/testsuite/gcc.c-torture/compile/pr58164.c
new file mode 100644
index 0000000000..7fe24fa439
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58164.c
@@ -0,0 +1,8 @@
+/* PR tree-optimization/58164 */
+
+int
+foo (void)
+{
+ int x = 0;
+ goto *&x;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58332.c b/gcc/testsuite/gcc.c-torture/compile/pr58332.c
new file mode 100644
index 0000000000..22c586cb86
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58332.c
@@ -0,0 +1,2 @@
+static inline int foo (int x) { return x + 1; }
+__attribute__ ((__optimize__ (0))) int bar (void) { return foo (100); }
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58340.c b/gcc/testsuite/gcc.c-torture/compile/pr58340.c
new file mode 100644
index 0000000000..ca3ccda0a4
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58340.c
@@ -0,0 +1,16 @@
+int a, b, c, d;
+
+int foo (int x, int y)
+{
+ return y == 0 ? x : 1 % y;
+}
+
+int main ()
+{
+ c = 0 || a;
+
+ for (;;)
+ b = foo (d, c) && 1;
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58343.c b/gcc/testsuite/gcc.c-torture/compile/pr58343.c
new file mode 100644
index 0000000000..cdd2ce9f4a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58343.c
@@ -0,0 +1,15 @@
+int a;
+
+int main ()
+{
+ int b = a;
+
+ for (a = 1; a > 0; a--)
+ ;
+
+ lbl:
+ if (b && a)
+ goto lbl;
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58344.c b/gcc/testsuite/gcc.c-torture/compile/pr58344.c
new file mode 100644
index 0000000000..42b646fed3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58344.c
@@ -0,0 +1,12 @@
+/* PR middle-end/58344 */
+/* { dg-do compile } */
+
+struct U {};
+static struct U a[1];
+extern void bar (struct U);
+
+void
+foo (void)
+{
+ bar (a[0]);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58775.c b/gcc/testsuite/gcc.c-torture/compile/pr58775.c
new file mode 100644
index 0000000000..8de06ddc05
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58775.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/58775 */
+
+void bar (void);
+
+void
+foo (char *x)
+{
+ char a;
+ _Bool b, c, d, e, f, g, h, i, j, k, l, m;
+
+ a = *x;
+ b = a == 100;
+ c = a == 105;
+ d = b | c;
+ e = a != 111;
+ f = !d;
+ g = e & f;
+ h = a != 117;
+ i = g & h;
+ j = a != 120;
+ k = i & j;
+ l = a != 88;
+ m = k & l;
+ if (m == 0)
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58946.c b/gcc/testsuite/gcc.c-torture/compile/pr58946.c
new file mode 100644
index 0000000000..0ec5eba16f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58946.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/58946 */
+
+int
+foo (unsigned int c)
+{
+ unsigned int d, e, f;
+ if ((int) c < 0)
+ d = 0;
+ else
+ d = c;
+ if (d == 0)
+ e = __INT_MAX__ + 1U;
+ else
+ e = d;
+ if ((int) e < 0)
+ f = 0;
+ else
+ f = e;
+ return f;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58970-1.c b/gcc/testsuite/gcc.c-torture/compile/pr58970-1.c
new file mode 100644
index 0000000000..45aad2b2e6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58970-1.c
@@ -0,0 +1,11 @@
+/* PR middle-end/58970 */
+
+struct T { int b : 1; };
+struct S { struct T t[1]; };
+
+void
+foo (int x, struct S *s)
+{
+ if (x == -1)
+ s->t[x].b = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58970-2.c b/gcc/testsuite/gcc.c-torture/compile/pr58970-2.c
new file mode 100644
index 0000000000..3103b31e17
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58970-2.c
@@ -0,0 +1,11 @@
+/* PR middle-end/58970 */
+
+struct T { char a : 8; char b : 1; };
+struct S { char x; struct T t[1]; };
+
+void
+foo (int x, struct S *s)
+{
+ if (x == -1)
+ s->t[x].b = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58978.c b/gcc/testsuite/gcc.c-torture/compile/pr58978.c
new file mode 100644
index 0000000000..721801da16
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58978.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/58978 */
+
+int
+foo (int x)
+{
+ switch (x)
+ {
+ case 0:
+ case 1:
+ case 9:
+ break;
+ default:
+ __builtin_unreachable ();
+ }
+ return x;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr58997.c b/gcc/testsuite/gcc.c-torture/compile/pr58997.c
new file mode 100644
index 0000000000..2c7a0f82c8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr58997.c
@@ -0,0 +1,19 @@
+/* PR rtl-optimization/58997 */
+
+int a, b, c, e;
+short d;
+char h;
+
+void
+foo ()
+{
+ while (b)
+ {
+ d = a ? c : 1 % a;
+ c = d;
+ h = d;
+ if (!h)
+ while (e)
+ ;
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59102.c b/gcc/testsuite/gcc.c-torture/compile/pr59102.c
new file mode 100644
index 0000000000..495473322a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59102.c
@@ -0,0 +1,28 @@
+
+int a, b, c, f;
+
+struct S
+{
+ int f0;
+} d, *e;
+
+struct S
+foo ()
+{
+ b = c = b || a == 0 || f % 11;
+ return d;
+}
+
+int
+main ()
+{
+ foo ();
+ if (b);
+ else
+ {
+ struct S **g = &e;
+ *g = 0;
+ *e = foo ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59119.c b/gcc/testsuite/gcc.c-torture/compile/pr59119.c
new file mode 100644
index 0000000000..b026ba5d4a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59119.c
@@ -0,0 +1,23 @@
+extern void *memmove (void *, const void *, __SIZE_TYPE__);
+extern void *memset (void *, int, __SIZE_TYPE__);
+
+typedef struct {
+ long n_prefix;
+ long n_spadding;
+} NumberFieldWidths;
+
+void
+fill_number(char *buf, const NumberFieldWidths *spec)
+{
+ if (spec->n_prefix) {
+ memmove(buf,
+ (char *) 0,
+ spec->n_prefix * sizeof(char));
+ buf += spec->n_prefix;
+ }
+ if (spec->n_spadding) {
+ memset(buf, 0, spec->n_spadding);
+ buf += spec->n_spadding;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59134.c b/gcc/testsuite/gcc.c-torture/compile/pr59134.c
new file mode 100644
index 0000000000..5268805ec8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59134.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+extern void* malloc(__SIZE_TYPE__) __attribute__((malloc));
+
+typedef struct {
+ char pad;
+ int arr[0];
+} __attribute__((packed)) str;
+
+str *
+foo (void)
+{
+ str *s = malloc (sizeof (str) + sizeof (int));
+ s->arr[0] = 0x12345678;
+ return s;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59322.c b/gcc/testsuite/gcc.c-torture/compile/pr59322.c
new file mode 100644
index 0000000000..918d6bdb18
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59322.c
@@ -0,0 +1,16 @@
+
+int a, b, d;
+short c;
+
+int
+foo ()
+{
+ for (b = 0; b; b = a)
+ for (c = 18; c < 10; c++)
+ {
+ d = c;
+ if (d)
+ return 0;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59362.c b/gcc/testsuite/gcc.c-torture/compile/pr59362.c
new file mode 100644
index 0000000000..3e78f76bc5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59362.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/59362 */
+
+char *
+foo (char *r, int s)
+{
+ r = __builtin___stpcpy_chk (r, "abc", __builtin_object_size (r, 1));
+ if (s)
+ r = __builtin___stpcpy_chk (r, "d", __builtin_object_size (r, 1));
+ return r;
+}
+
+char *a;
+long int b;
+
+void
+bar (void)
+{
+ b = __builtin_object_size (0, 0);
+ a = __builtin___stpcpy_chk (0, "", b);
+ b = __builtin_object_size (a, 0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59386.c b/gcc/testsuite/gcc.c-torture/compile/pr59386.c
new file mode 100644
index 0000000000..b014f707ce
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59386.c
@@ -0,0 +1,24 @@
+/* PR tree-optimization/59386 */
+
+struct S { int s; };
+struct T { int t; struct S u; } c;
+int b;
+
+struct S
+foo ()
+{
+ struct T d;
+ if (b)
+ while (c.t)
+ ;
+ else
+ return d.u;
+}
+
+struct S
+bar ()
+{
+ struct T a;
+ a.u = foo ();
+ return a.u;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59417.c b/gcc/testsuite/gcc.c-torture/compile/pr59417.c
new file mode 100644
index 0000000000..227c5d8410
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59417.c
@@ -0,0 +1,39 @@
+/* PR tree-optimization/59417 */
+
+int a, b, d;
+short c;
+
+void
+f (void)
+{
+ if (b)
+ {
+ int *e;
+
+ if (d)
+ {
+ for (; b; a++)
+ lbl1:
+ d = 0;
+
+ for (; d <= 1; d++)
+ {
+ int **q = &e;
+ for (**q = 0; **q <= 0; **q++)
+ d = 0;
+ }
+ }
+ }
+
+ else
+ {
+ int t;
+ for (c = 0; c < 77; c++)
+ for (c = 0; c < 46; c++);
+ for (; t <= 0; t++)
+ lbl2:
+ ;
+ goto lbl1;
+ }
+ goto lbl2;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59569-1.c b/gcc/testsuite/gcc.c-torture/compile/pr59569-1.c
new file mode 100644
index 0000000000..116c72474c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59569-1.c
@@ -0,0 +1,9 @@
+/* PR middle-end/59569 */
+extern char c;
+
+void
+foo (int i, char **j)
+{
+ while (i)
+ j[--i] = &c;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59569-2.c b/gcc/testsuite/gcc.c-torture/compile/pr59569-2.c
new file mode 100644
index 0000000000..e813b88d85
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59569-2.c
@@ -0,0 +1,6 @@
+/* PR middle-end/59569 */
+void foo (int *a, int b)
+{
+ for (; b; b--)
+ a[b] = 1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59743.c b/gcc/testsuite/gcc.c-torture/compile/pr59743.c
new file mode 100644
index 0000000000..8dadba594e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59743.c
@@ -0,0 +1,23 @@
+/* PR middle-end/59743 */
+
+typedef union {
+ long all;
+ struct {
+ int low;
+ int high;
+ } s;
+} udwords;
+int a, b, c, d;
+void __udivmoddi4() {
+ udwords r;
+ d = __builtin_clz(0);
+ r.s.low = 0;
+ for (; d; --d) {
+ r.s.high = r.s.high << 1 | r.s.low >> a;
+ r.s.low = r.s.low << b >> 1;
+ int s = -r.all;
+ c = s;
+ r.all--;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59803.c b/gcc/testsuite/gcc.c-torture/compile/pr59803.c
new file mode 100644
index 0000000000..d2b5d2098f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59803.c
@@ -0,0 +1,27 @@
+/* PR target/59803 */
+
+extern void baz (void) __attribute__ ((__noreturn__));
+struct A { int g, h; };
+extern struct A a;
+struct B { unsigned char i, j, k, l, m; };
+int c, d, e;
+static int f;
+
+void
+foo (void)
+{
+ f = 1;
+}
+
+void
+bar (struct B *x)
+{
+ x->i = e;
+ x->k = c;
+ x->l = d;
+ x->j = a.h;
+ x->m = f;
+ if (x->i != e) baz ();
+ if (x->k != c) baz ();
+ if (x->j != a.h) baz ();
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr59919.c b/gcc/testsuite/gcc.c-torture/compile/pr59919.c
new file mode 100644
index 0000000000..6809caaf9f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr59919.c
@@ -0,0 +1,18 @@
+typedef int jmp_buf[10];
+struct S
+{
+ int i;
+ jmp_buf buf;
+};
+
+void setjmp (jmp_buf);
+void foo (int *);
+__attribute__ ((__noreturn__, __nonnull__)) void bar (struct S *);
+
+void
+baz (struct S *p)
+{
+ bar (p);
+ setjmp (p->buf);
+ foo (&p->i);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60071.c b/gcc/testsuite/gcc.c-torture/compile/pr60071.c
new file mode 100644
index 0000000000..8bc2c1f4f5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60071.c
@@ -0,0 +1,8 @@
+int
+foo (int cls, int sign)
+{
+ if (__builtin_expect (cls == 4, 0))
+ return (sign
+ ? (-((int) ((~(unsigned)0) >> 1)))-1
+ : ((int) ((~(unsigned)0) >> 1)));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60268.c b/gcc/testsuite/gcc.c-torture/compile/pr60268.c
new file mode 100644
index 0000000000..c3a6f94191
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60268.c
@@ -0,0 +1,6 @@
+/* { dg-options "-flive-range-shrinkage" } */
+void f()
+{
+ int i = 0;
+ void *p = 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60502.c b/gcc/testsuite/gcc.c-torture/compile/pr60502.c
new file mode 100644
index 0000000000..8dd2de44da
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60502.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/60502 */
+
+typedef signed char v16i8 __attribute__ ((vector_size (16)));
+typedef unsigned char v16u8 __attribute__ ((vector_size (16)));
+
+void
+foo (v16i8 *x)
+{
+ v16i8 m1 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
+ *x |= *x ^ m1;
+}
+
+void
+bar (v16u8 *x)
+{
+ v16u8 m1 = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 };
+ *x |= *x ^ m1;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60556.c b/gcc/testsuite/gcc.c-torture/compile/pr60556.c
new file mode 100644
index 0000000000..c775432f8b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60556.c
@@ -0,0 +1,8 @@
+/* PR middle-end/60556 */
+
+int g (int);
+
+unsigned long long f (void)
+{
+ return (unsigned long long)(long)&g;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
new file mode 100644
index 0000000000..1e1e460739
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-1.c
@@ -0,0 +1,31 @@
+/* { dg-options "-fdata-sections" { target { ! { { hppa*-*-hpux* } && { ! lp64 } } } } } */
+
+typedef unsigned char unit;
+typedef unit *unitptr;
+extern short global_precision;
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+short mp_compare(const unit* r1, const unit* r2)
+{
+ register short precision;
+ precision = global_precision;
+ (r1) = ((r1)+(precision)-1);
+ (r2) = ((r2)+(precision)-1);
+ do
+ { if (*r1 < *r2)
+ return(-1);
+ if (*((r1)--) > *((r2)--))
+ return(1);
+ } while (--precision);
+}
+
+static unit modulus[((1280+(2*8))/8)];
+static unit d_data[((1280+(2*8))/8)*2];
+
+int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
+{
+ unitptr d = d_data;
+ while (mp_compare(d,modulus) > 0)
+ memcpy((void*)(prod), (const void*)(d), (global_precision));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c b/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c
new file mode 100644
index 0000000000..f33db643f7
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr60655-2.c
@@ -0,0 +1,30 @@
+
+typedef unsigned char unit;
+typedef unit *unitptr;
+extern short global_precision;
+typedef __SIZE_TYPE__ size_t;
+extern void *memcpy (void *dest, const void *src, size_t n);
+
+short mp_compare(const unit* r1, const unit* r2)
+{
+ register short precision;
+ precision = global_precision;
+ (r1) = ((r1)+(precision)-1);
+ (r2) = ((r2)+(precision)-1);
+ do
+ { if (*r1 < *r2)
+ return(-1);
+ if (*((r1)--) > *((r2)--))
+ return(1);
+ } while (--precision);
+}
+
+static unit modulus[((1280+(2*8))/8)];
+static unit d_data[((1280+(2*8))/8)*2];
+
+int upton_modmult (unitptr prod, unitptr multiplicand, unitptr multiplier)
+{
+ unitptr d = d_data;
+ while (mp_compare(d,modulus) > 0)
+ memcpy((void*)(prod), (const void*)(d), (global_precision));
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr61684.c b/gcc/testsuite/gcc.c-torture/compile/pr61684.c
new file mode 100644
index 0000000000..f5b53b73a0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr61684.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/61684 */
+
+int a, c;
+static int *b = 0;
+short d;
+static short **e = 0;
+
+void
+foo ()
+{
+ for (; c < 1; c++)
+ ;
+ *e = &d;
+ a = d && (c && 1) & *b;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr62312.c b/gcc/testsuite/gcc.c-torture/compile/pr62312.c
new file mode 100644
index 0000000000..2e87bb9bd9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr62312.c
@@ -0,0 +1,23 @@
+/* PR target/62312 */
+
+typedef struct { unsigned int arg[100]; } *FunctionCallInfo;
+typedef struct { int day; int month; } Interval;
+void* palloc (unsigned int);
+int bar (void);
+void baz (void);
+
+void
+interval_pl (FunctionCallInfo fcinfo)
+{
+ Interval *span1 = ((Interval *) ((char *) ((fcinfo->arg[0]))));
+ Interval *span2 = ((Interval *) ((char *) ((fcinfo->arg[1]))));
+ Interval *result = (Interval *) palloc (sizeof (Interval));
+
+ if ((((span1->month) < 0) == ((span2->month) < 0))
+ && !(((result->month) < 0) == ((span1->month) < 0)))
+ do {
+ if (bar ())
+ baz ();
+ } while(0);
+ result->day = span1->day + span2->day;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/pr63282.c b/gcc/testsuite/gcc.c-torture/compile/pr63282.c
new file mode 100644
index 0000000000..cb23278d50
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/pr63282.c
@@ -0,0 +1,13 @@
+/* PR inline-asm/63282 */
+
+void bar (void);
+
+void
+foo (void)
+{
+ asm volatile goto ("" : : : : a, b);
+a:
+ bar ();
+b:
+ return;
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/sra-1.c b/gcc/testsuite/gcc.c-torture/compile/sra-1.c
index 06dcf1002b..59213039fc 100644
--- a/gcc/testsuite/gcc.c-torture/compile/sra-1.c
+++ b/gcc/testsuite/gcc.c-torture/compile/sra-1.c
@@ -1,5 +1,3 @@
-/* { dg-do compile } */
-/* { dg-options "-O1" } */
/* Let gimple verifier check what SRA does to unions and single-field
strucutres . */
diff --git a/gcc/testsuite/gcc.c-torture/compile/unalign-1.c b/gcc/testsuite/gcc.c-torture/compile/unalign-1.c
new file mode 100644
index 0000000000..350111fdff
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/unalign-1.c
@@ -0,0 +1,15 @@
+typedef struct __attribute__ ((__packed__))
+{
+ char valueField[2];
+} ptp_tlv_t;
+typedef struct __attribute__ ((__packed__))
+{
+ char stepsRemoved;
+ ptp_tlv_t tlv[1];
+} ptp_message_announce_t;
+int ptplib_send_announce(int sequenceId, int i)
+{
+ ptp_message_announce_t tx_packet;
+ ((long long *)tx_packet.tlv[0].valueField)[sequenceId] = i;
+ f(&tx_packet);
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/vector-5.c b/gcc/testsuite/gcc.c-torture/compile/vector-5.c
new file mode 100644
index 0000000000..30a4f85940
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/vector-5.c
@@ -0,0 +1,7 @@
+typedef int v2si __attribute__((__vector_size__(8)));
+
+v2si
+f (int x)
+{
+ return (v2si) { x, (__INTPTR_TYPE__) "" };
+}
diff --git a/gcc/testsuite/gcc.c-torture/compile/vector-6.c b/gcc/testsuite/gcc.c-torture/compile/vector-6.c
new file mode 100644
index 0000000000..7694d36632
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/compile/vector-6.c
@@ -0,0 +1,7 @@
+typedef int v2si __attribute__((__vector_size__(8)));
+
+v2si
+f (int x)
+{
+ return (v2si) { (__INTPTR_TYPE__) "", x };
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20001229-1.c b/gcc/testsuite/gcc.c-torture/execute/20001229-1.c
index 39b58af62e..69ce6dab86 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20001229-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20001229-1.c
@@ -7,8 +7,7 @@
So: If we know how, ask the kernel to deliver SIGBUS instead so
that the test case visibly fails. */
-#if defined(__alpha__) && (defined(__linux__) || defined(__osf__))
-#ifdef __linux__
+#if defined(__alpha__) && defined(__linux__)
#include <asm/sysinfo.h>
#include <asm/unistd.h>
@@ -19,11 +18,6 @@ setsysinfo(unsigned long op, void *buffer, unsigned long size,
syscall(__NR_osf_setsysinfo, op, buffer, size, start, arg, flag);
}
-#else
-#include <sys/sysinfo.h>
-#include <sys/proc.h>
-#endif
-
static void __attribute__((constructor))
trap_unaligned(void)
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010724-1.c b/gcc/testsuite/gcc.c-torture/execute/20010724-1.c
deleted file mode 100644
index 8ff7d0f44a..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20010724-1.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Verify that the workarounds in config/mips/irix6-libc-compat.c are still
- needed. */
-
-/* IRIX 6, unlike other Unix systems, defines union semun in <sys/sem.h>.
- Inhibit this definition to be able to run this test on other platforms. */
-#define _XOPEN_SOURCE
-
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-#include <sys/ipc.h>
-#include <sys/sem.h>
-
-union semun {
- int val;
- struct semid_ds *buf;
- ushort_t *array;
-};
-
-int
-main (void)
-{
- struct in_addr ia;
- int semid;
- union semun su;
-
- ia.s_addr = INADDR_BROADCAST;
-
- if (strcmp (inet_ntoa (ia), "255.255.255.255") != 0)
- abort ();
-
- ia.s_addr = INADDR_LOOPBACK;
-
- if (inet_lnaof (ia) != 1)
- abort ();
-
- if (inet_netof (ia) != IN_LOOPBACKNET)
- abort ();
-
- ia = inet_makeaddr (IN_LOOPBACKNET, 1);
- if (ia.s_addr != INADDR_LOOPBACK)
- abort ();
-
- if ((semid = semget (IPC_PRIVATE, 1, IPC_CREAT | IPC_EXCL | SEM_R | SEM_A)) < 0)
- abort ();
-
- su.val = 10;
-
- if (semctl (semid, 0, SETVAL, su) != 0)
- abort ();
-
- if (semctl (semid, 0, GETVAL) != 10)
- abort ();
-
- if (semctl (semid, 0, IPC_RMID) != 0)
- abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20010724-1.x b/gcc/testsuite/gcc.c-torture/execute/20010724-1.x
deleted file mode 100644
index 2f2f05634c..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20010724-1.x
+++ /dev/null
@@ -1,3 +0,0 @@
-# This test is only needed on IRIX 6
-if { ! [istarget "mips*-sgi-irix6*"] } { return 1 }
-return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20011008-3.c b/gcc/testsuite/gcc.c-torture/execute/20011008-3.c
index 6d2a18f64a..3244b0a97a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20011008-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20011008-3.c
@@ -81,10 +81,10 @@ __db_txnlist_lsnadd(int val, DB_TXNLIST *elp, DB_LSN *lsnp, u_int32_t flags)
return val;
}
-#ifndef STACK_SIZE
-#define VLEN 1235
-#else
+#if defined (STACK_SIZE) && STACK_SIZE < 12350
#define VLEN (STACK_SIZE/10)
+#else
+#define VLEN 1235
#endif
int main (void)
diff --git a/gcc/testsuite/gcc.c-torture/execute/20020418-1.c b/gcc/testsuite/gcc.c-torture/execute/20020418-1.c
index 953f96e86a..4826ca8866 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20020418-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20020418-1.c
@@ -1,4 +1,4 @@
-/* ifcvt accidently deletes a referenced label while generating
+/* ifcvt accidentally deletes a referenced label while generating
conditional traps on machines having such patterns */
struct foo { int a; };
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
index 8eb9a4211a..28cfbd10b4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.c
@@ -44,11 +44,11 @@ __attribute__ ((noinline))
double
sin(double a)
{
- abort ();
+ return a;
}
__attribute__ ((noinline))
float
sinf(float a)
{
- return a;
+ abort ();
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x
index 3a5b135561..895cff7fef 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20030125-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20030125-1.x
@@ -1,4 +1,7 @@
# Only glibc includes all c99 functions at the moment.
-if { ! [istarget "*-linux*"] } { return 1 }
+if { ! ([istarget "*-linux*"]
+ || [istarget "*-gnu*"])} then {
+ return 1
+}
if { [check_effective_target_uclibc] } { return 1 }
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040208-2.c b/gcc/testsuite/gcc.c-torture/execute/20040208-2.c
deleted file mode 100644
index d8a5afc946..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040208-2.c
+++ /dev/null
@@ -1,11 +0,0 @@
-int main ()
-{
- long double x, y;
-
- x = 0x1.fffffffffffff8p1022L;
- x *= 2;
- y = 0x1.fffffffffffff8p1023L;
- if (memcmp (&x, &y, sizeof (x)) != 0)
- abort ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20040208-2.x b/gcc/testsuite/gcc.c-torture/execute/20040208-2.x
deleted file mode 100644
index 6c7d3d5500..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/20040208-2.x
+++ /dev/null
@@ -1 +0,0 @@
-return [expr ![istarget mips*-*-irix6*]]
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050316-1.x b/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
index 121fcfecc2..cb2d28fd9f 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20050316-1.x
@@ -4,4 +4,5 @@ if { [check_effective_target_int16] } {
return 1
}
+set additional_flags "-Wno-psabi"
return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.x b/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
index cb7b119b8c..cb7b119b8c 100644
--- a/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20050316-3.x
diff --git a/gcc/testsuite/gcc.c-torture/execute/20050604-1.x b/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
index f5b4aaae3d..756242d234 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/20050604-1.x
@@ -6,4 +6,5 @@ if { [istarget "i?86-*-*"] || [istarget "x86_64-*-*"] } {
set additional_flags "-mno-mmx"
}
+set additional_flags "-Wno-psabi"
return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20061220-1.x b/gcc/testsuite/gcc.c-torture/execute/20061220-1.x
new file mode 100644
index 0000000000..bfc4e964d6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20061220-1.x
@@ -0,0 +1,6 @@
+# asm statements for the RL78 do not work as expected
+if { [istarget "rl78-*-*"] } {
+ return 1;
+}
+
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/20071018-1.c b/gcc/testsuite/gcc.c-torture/execute/20071018-1.c
index ae13c731a2..625e98184d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20071018-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20071018-1.c
@@ -13,11 +13,11 @@ void __attribute__((noinline)) bar(struct foo **f)
{
*f = __builtin_malloc(sizeof(struct foo));
}
-struct foo * foo(int rank)
+struct foo * __attribute__((noinline, noclone)) foo(int rank)
{
void *x = __builtin_malloc(sizeof(struct mem));
struct mem *as = x;
- struct foo **upper = &as->x[rank * 8 - 1];
+ struct foo **upper = &as->x[rank * 8 - 5];
*upper = 0;
bar(upper);
return *upper;
@@ -25,7 +25,7 @@ struct foo * foo(int rank)
int main()
{
- if (foo(0) == 0)
+ if (foo(1) == 0)
abort ();
return 0;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
index fcf8c07124..1952dbd702 100644
--- a/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/20101011-1.c
@@ -12,12 +12,12 @@
#elif defined (__sh__)
/* On SH division by zero does not trap. */
# define DO_TEST 0
+#elif defined (__aarch64__)
+ /* On AArch64 integer division by zero does not trap. */
+# define DO_TEST 0
#elif defined (__TMS320C6X__)
/* On TI C6X division by zero does not trap. */
# define DO_TEST 0
-#elif defined (__arm__)
- /* We cannot rely on division by zero generating a trap. */
-# define DO_TEST 0
#elif defined (__mips__) && !defined(__linux__)
/* MIPS divisions do trap by default, but libgloss targets do not
intercept the trap and raise a SIGFPE. The same is probably
@@ -28,10 +28,45 @@
/* Not all Linux kernels deal correctly the breakpoints generated by
MIPS16 divisions by zero. They show up as a SIGTRAP instead. */
# define DO_TEST 0
+#elif defined (__MICROBLAZE__)
+/* We cannot rely on division by zero generating a trap. */
+# define DO_TEST 0
#elif defined (__epiphany__)
/* Epiphany does not have hardware division, and the software implementation
has truly undefined behaviour for division by 0. */
# define DO_TEST 0
+#elif defined (__m68k__) && !defined(__linux__)
+ /* Attempting to trap division-by-zero in this way isn't likely to work on
+ bare-metal m68k systems. */
+# define DO_TEST 0
+#elif defined (__CRIS__)
+ /* No SIGFPE for CRIS integer division. */
+# define DO_TEST 0
+#elif defined (__arc__)
+ /* No SIGFPE for ARC integer division. */
+# define DO_TEST 0
+#elif defined (__arm__) && defined (__ARM_EABI__)
+# ifdef __ARM_ARCH_EXT_IDIV__
+ /* Hardware division instructions may not trap, and handle trapping
+ differently anyway. Skip the test if we have those instructions. */
+# define DO_TEST 0
+# else
+# include <signal.h>
+ /* ARM division-by-zero behaviour is to call a helper function, which
+ can do several different things, depending on requirements. Emulate
+ the behaviour of other targets here by raising SIGFPE. */
+int __attribute__((used))
+__aeabi_idiv0 (int return_value)
+{
+ raise (SIGFPE);
+ return return_value;
+}
+# define DO_TEST 1
+# endif
+#elif defined (__nios2__)
+ /* Nios II requires both hardware support and user configuration to
+ raise an exception on divide by zero. */
+# define DO_TEST 0
#else
# define DO_TEST 1
#endif
diff --git a/gcc/testsuite/gcc.c-torture/execute/20111227-2.c b/gcc/testsuite/gcc.c-torture/execute/20111227-2.c
new file mode 100644
index 0000000000..692c947e9a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20111227-2.c
@@ -0,0 +1,44 @@
+/* Testcase derived from 20111227-1.c to ensure that REE is combining
+ redundant zero extends with zero extend to wider mode. */
+/* { dg-options "-fdump-rtl-ree -O" } */
+extern void abort (void);
+
+unsigned short s;
+unsigned int i;
+unsigned long l;
+unsigned char v = -1;
+
+void __attribute__((noinline,noclone))
+bar (int t)
+{
+ if (t == 2 && s != 0xff)
+ abort ();
+ if (t == 1 && i != 0xff)
+ abort ();
+ if (t == 0 && l != 0xff)
+ abort ();
+}
+
+void __attribute__((noinline,noclone))
+foo (unsigned char *a, int t)
+{
+ unsigned char r = v;
+
+ if (t == 2)
+ s = (unsigned short) r;
+ else if (t == 1)
+ i = (unsigned int) r;
+ else if (t == 0)
+ l = (unsigned long) r;
+ bar (t);
+}
+
+int main(void)
+{
+ foo (&v, 0);
+ foo (&v, 1);
+ foo (&v, 2);
+ return 0;
+}
+/* { dg-final { scan-rtl-dump "Elimination opportunities = 3 realized = 3" "ree" } } */
+/* { dg-final { cleanup-rtl-dump "ree" } } */
diff --git a/gcc/testsuite/gcc.c-torture/execute/20111227-3.c b/gcc/testsuite/gcc.c-torture/execute/20111227-3.c
new file mode 100644
index 0000000000..d6726c4735
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20111227-3.c
@@ -0,0 +1,45 @@
+/* Testcase derived from 20111227-1.c to ensure that REE is combining
+ redundant sign extends with sign extend to wider mode. */
+/* { dg-options "-fdump-rtl-ree -O" } */
+
+extern void abort (void);
+
+signed short s;
+signed int i;
+signed long l;
+signed char v = -1;
+
+void __attribute__((noinline,noclone))
+bar (int t)
+{
+ if (t == 2 && s != -1)
+ abort ();
+ if (t == 1 && i != -1)
+ abort ();
+ if (t == 0 && l != -1)
+ abort ();
+}
+
+void __attribute__((noinline,noclone))
+foo (signed char *a, int t)
+{
+ signed char r = v;
+
+ if (t == 2)
+ s = (signed short) r;
+ else if (t == 1)
+ i = (signed int) r;
+ else if (t == 0)
+ l = (signed long) r;
+ bar (t);
+}
+
+int main(void)
+{
+ foo (&v, 0);
+ foo (&v, 1);
+ foo (&v, 2);
+ return 0;
+}
+/* { dg-final { scan-rtl-dump "Elimination opportunities = 3 realized = 3" "ree" } } */
+/* { dg-final { cleanup-rtl-dump "ree" } } */
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120427-2.c b/gcc/testsuite/gcc.c-torture/execute/20120427-2.c
new file mode 100644
index 0000000000..e473a4772a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120427-2.c
@@ -0,0 +1,38 @@
+typedef struct sreal
+{
+ unsigned sig; /* Significant. */
+ int exp; /* Exponent. */
+} sreal;
+
+sreal_compare (sreal *a, sreal *b)
+{
+ if (a->exp > b->exp)
+ return 1;
+ if (a->exp < b->exp)
+ return -1;
+ if (a->sig > b->sig)
+ return 1;
+ if (a->sig < b->sig)
+ return -1;
+ return 0;
+}
+
+sreal a[] = {
+ { 0, 0 },
+ { 1, 0 },
+ { 0, 1 },
+ { 1, 1 }
+};
+
+int main()
+{
+ int i, j;
+ for (i = 0; i <= 3; i++) {
+ for (j = 0; j < 3; j++) {
+ if (i < j && sreal_compare(&a[i], &a[j]) != -1) abort();
+ if (i == j && sreal_compare(&a[i], &a[j]) != 0) abort();
+ if (i > j && sreal_compare(&a[i], &a[j]) != 1) abort();
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120615-1.c b/gcc/testsuite/gcc.c-torture/execute/20120615-1.c
new file mode 100644
index 0000000000..6c80d43fe0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120615-1.c
@@ -0,0 +1,16 @@
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+ test1(int i)
+{
+ if (i == 12)
+ return;
+ if (i != 17)
+ {
+ if (i == 15)
+ return;
+ abort ();
+ }
+}
+
+int main() { test1 (15); return 0; }
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120808-1.c b/gcc/testsuite/gcc.c-torture/execute/20120808-1.c
new file mode 100644
index 0000000000..3cbab2ba84
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120808-1.c
@@ -0,0 +1,37 @@
+extern void exit (int);
+extern void abort (void);
+
+volatile int i;
+unsigned char *volatile cp;
+unsigned char d[32] = { 0 };
+
+int
+main (void)
+{
+ unsigned char c[32] = { 0 };
+ unsigned char *p = d + i;
+ int j;
+ for (j = 0; j < 30; j++)
+ {
+ int x = 0xff;
+ int y = *++p;
+ switch (j)
+ {
+ case 1: x ^= 2; break;
+ case 2: x ^= 4; break;
+ case 25: x ^= 1; break;
+ default: break;
+ }
+ c[j] = y | x;
+ cp = p;
+ }
+ if (c[0] != 0xff
+ || c[1] != 0xfd
+ || c[2] != 0xfb
+ || c[3] != 0xff
+ || c[4] != 0xff
+ || c[25] != 0xfe
+ || cp != d + 30)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120817-1.c b/gcc/testsuite/gcc.c-torture/execute/20120817-1.c
new file mode 100644
index 0000000000..8fb2820e89
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120817-1.c
@@ -0,0 +1,14 @@
+typedef unsigned long long u64;
+unsigned long foo = 0;
+u64 f() __attribute__((noinline));
+
+u64 f() {
+ return ((u64)40) + ((u64) 24) * (int)(foo - 1);
+}
+
+int main ()
+{
+ if (f () != 16)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120919-1.c b/gcc/testsuite/gcc.c-torture/execute/20120919-1.c
new file mode 100644
index 0000000000..e7f329538c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120919-1.c
@@ -0,0 +1,37 @@
+/* PR rtl-optimization/54290 */
+/* Testcase by Eric Volk <eriksnga@gmail.com> */
+
+double vd[2] = {1., 0.};
+int vi[2] = {1234567890, 0};
+double *pd = vd;
+int *pi = vi;
+
+extern void abort(void);
+
+void init (int *n, int *dummy) __attribute__ ((noinline,noclone));
+
+void init (int *n, int *dummy)
+{
+ if(0 == n) dummy[0] = 0;
+}
+
+int main (void)
+{
+ int dummy[1532];
+ int i = -1, n = 1, s = 0;
+ init (&n, dummy);
+ while (i < n) {
+ if (i == 0) {
+ if (pd[i] > 0) {
+ if (pi[i] > 0) {
+ s += pi[i];
+ }
+ }
+ pd[i] = pi[i];
+ }
+ ++i;
+ }
+ if (s != 1234567890)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20120919-1.x b/gcc/testsuite/gcc.c-torture/execute/20120919-1.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20120919-1.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/20121108-1.c b/gcc/testsuite/gcc.c-torture/execute/20121108-1.c
new file mode 100644
index 0000000000..5ec889e602
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20121108-1.c
@@ -0,0 +1,51 @@
+char temp[] = "192.168.190.160";
+unsigned result = (((((192u<<8)|168u)<<8)|190u)<<8)|160u;
+
+int strtoul1(const char *a, char **b, int c) __attribute__((noinline, noclone));
+int strtoul1(const char *a, char **b, int c)
+{
+ *b = a+3;
+ if (a == temp)
+ return 192;
+ else if (a == temp+4)
+ return 168;
+ else if (a == temp+8)
+ return 190;
+ else if (a == temp+12)
+ return 160;
+ __builtin_abort();
+}
+
+int string_to_ip(const char *s) __attribute__((noinline,noclone));
+int string_to_ip(const char *s)
+{
+ int addr;
+ char *e;
+ int i;
+
+ if (s == 0)
+ return(0);
+
+ for (addr=0, i=0; i<4; ++i) {
+ int val = s ? strtoul1(s, &e, 10) : 0;
+ addr <<= 8;
+ addr |= (val & 0xFF);
+ if (s) {
+ s = (*e) ? e+1 : e;
+ }
+ }
+
+ return addr;
+}
+
+int main(void)
+{
+ int t = string_to_ip (temp);
+ printf ("%x\n", t);
+ printf ("%x\n", result);
+ if (t != result)
+ __builtin_abort ();
+ printf ("WORKS.\n");
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/20131127-1.c b/gcc/testsuite/gcc.c-torture/execute/20131127-1.c
new file mode 100644
index 0000000000..8ec4965774
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20131127-1.c
@@ -0,0 +1,34 @@
+/* PR middle-end/59138 */
+/* Testcase by John Regehr <regehr@cs.utah.edu> */
+
+extern void abort (void);
+
+#pragma pack(1)
+
+struct S0 {
+ int f0;
+ int f1;
+ int f2;
+ short f3;
+};
+
+short a = 1;
+
+struct S0 b = { 1 }, c, d, e;
+
+struct S0 fn1() { return c; }
+
+void fn2 (void)
+{
+ b = fn1 ();
+ a = 0;
+ d = e;
+}
+
+int main (void)
+{
+ fn2 ();
+ if (a != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20140212-1.c b/gcc/testsuite/gcc.c-torture/execute/20140212-1.c
new file mode 100644
index 0000000000..8f1f84f3e3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20140212-1.c
@@ -0,0 +1,37 @@
+/* PR rtl-optimization/60116 */
+/* Reported by Zhendong Su <su@cs.ucdavis.edu> */
+
+extern void abort (void);
+
+int a, b, c, d = 1, e, f = 1, h, i, k;
+char g, j;
+
+void
+fn1 (void)
+{
+ int l;
+ e = 0;
+ c = 0;
+ for (;;)
+ {
+ k = a && b;
+ j = k * 54;
+ g = j * 147;
+ l = ~g + (long long) e && 1;
+ if (d)
+ c = l;
+ else
+ h = i = l * 9UL;
+ if (f)
+ return;
+ }
+}
+
+int
+main (void)
+{
+ fn1 ();
+ if (c != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20140326-1.c b/gcc/testsuite/gcc.c-torture/execute/20140326-1.c
new file mode 100644
index 0000000000..552e21891c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20140326-1.c
@@ -0,0 +1,10 @@
+int a;
+
+int
+main (void)
+{
+ char e[2] = { 0, 0 }, f = 0;
+ if (a == 131072)
+ f = e[a];
+ return f;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/20140425-1.c b/gcc/testsuite/gcc.c-torture/execute/20140425-1.c
new file mode 100644
index 0000000000..c447ef95b6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/20140425-1.c
@@ -0,0 +1,23 @@
+/* PR target/60941 */
+/* Reported by Martin Husemann <martin@netbsd.org> */
+
+extern void abort (void);
+
+static void __attribute__((noinline))
+set (unsigned long *l)
+{
+ *l = 31;
+}
+
+int main (void)
+{
+ unsigned long l;
+ int i;
+
+ set (&l);
+ i = (int) l;
+ l = (unsigned long)(2U << i);
+ if (l != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/921202-1.c b/gcc/testsuite/gcc.c-torture/execute/921202-1.c
index f090f81809..d14425a507 100644
--- a/gcc/testsuite/gcc.c-torture/execute/921202-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/921202-1.c
@@ -5,8 +5,8 @@
#endif
main ()
{
- long dx[VLEN];
- long dy[VLEN];
+ long dx[VLEN+1];
+ long dy[VLEN+1];
long s1[VLEN];
int cyx, cyy;
int i;
diff --git a/gcc/testsuite/gcc.c-torture/execute/990127-2.x b/gcc/testsuite/gcc.c-torture/execute/990127-2.x
index 3e1d8352d2..501e931471 100644
--- a/gcc/testsuite/gcc.c-torture/execute/990127-2.x
+++ b/gcc/testsuite/gcc.c-torture/execute/990127-2.x
@@ -5,6 +5,7 @@
if { [istarget i?86-*-darwin*]
|| [istarget i?86-*-linux*]
+ || [istarget i?86-*-gnu*]
|| [istarget i?86-*-kfreebsd*-gnu]
|| [istarget i?86-*-knetbsd*-gnu]
|| [istarget i?86-*-solaris2*]
diff --git a/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c b/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
new file mode 100644
index 0000000000..50927dc1d5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/bitfld-6.c
@@ -0,0 +1,23 @@
+union U
+{
+ const int a;
+ unsigned b : 20;
+};
+
+static union U u = { 0x12345678 };
+
+/* Constant folding used to fail to account for endianness when folding a
+ union. */
+
+int
+main (void)
+{
+#ifdef __BYTE_ORDER__
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ return u.b - 0x45678;
+#else
+ return u.b - 0x12345;
+#endif
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/bswap-1.c b/gcc/testsuite/gcc.c-torture/execute/bswap-1.c
new file mode 100644
index 0000000000..ff80c0559d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/bswap-1.c
@@ -0,0 +1,51 @@
+/* Test __builtin_bswap64 . */
+
+unsigned long long g(unsigned long long a) __attribute__((noinline));
+unsigned long long g(unsigned long long a)
+{
+ return __builtin_bswap64(a);
+}
+
+
+unsigned long long f(unsigned long long c)
+{
+ union {
+ unsigned long long a;
+ unsigned char b[8];
+ } a, b;
+ a.a = c;
+ b.b[0] = a.b[7];
+ b.b[1] = a.b[6];
+ b.b[2] = a.b[5];
+ b.b[3] = a.b[4];
+ b.b[4] = a.b[3];
+ b.b[5] = a.b[2];
+ b.b[6] = a.b[1];
+ b.b[7] = a.b[0];
+ return b.a;
+}
+
+int main(void)
+{
+ unsigned long long i;
+ /* The rest of the testcase assumes 8 byte long long. */
+ if (sizeof(i) != sizeof(char)*8)
+ return 0;
+ if (f(0x12) != g(0x12))
+ __builtin_abort();
+ if (f(0x1234) != g(0x1234))
+ __builtin_abort();
+ if (f(0x123456) != g(0x123456))
+ __builtin_abort();
+ if (f(0x12345678ull) != g(0x12345678ull))
+ __builtin_abort();
+ if (f(0x1234567890ull) != g(0x1234567890ull))
+ __builtin_abort();
+ if (f(0x123456789012ull) != g(0x123456789012ull))
+ __builtin_abort();
+ if (f(0x12345678901234ull) != g(0x12345678901234ull))
+ __builtin_abort();
+ if (f(0x1234567890123456ull) != g(0x1234567890123456ull))
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
index f86d535382..147a1d1c43 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/builtins.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -37,12 +37,14 @@ load_lib c-torture.exp
torture-init
set-torture-options $C_TORTURE_OPTIONS {{}} $LTO_TORTURE_OPTIONS
-set additional_flags ""
+set additional_flags "-fno-tree-loop-distribute-patterns"
if [istarget "powerpc-*-darwin*"] {
lappend additional_flags "-Wl,-multiply_defined,suppress"
}
if { [istarget *-*-eabi*]
- || [istarget *-*-elf] } {
+ || [istarget *-*-elf]
+ || [istarget *-*-mingw*]
+ || [istarget *-*-rtems*] } {
lappend additional_flags "-Wl,--allow-multiple-definition"
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
index 9db60c8e3f..b19d7bf813 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/lib/chk.c
@@ -124,16 +124,17 @@ __memmove_chk (void *dst, const void *src, __SIZE_TYPE__ n, __SIZE_TYPE__ size)
void *
memset (void *dst, int c, __SIZE_TYPE__ n)
{
+ while (n-- != 0)
+ n[(char *) dst] = c;
+
/* Single-byte memsets should be done inline when optimisation
- is enabled. */
+ is enabled. Do this after the copy in case we're being called to
+ initialize bss. */
#ifdef __OPTIMIZE__
if (memset_disallowed && inside_main && n < 2)
abort ();
#endif
- while (n-- != 0)
- n[(char *) dst] = c;
-
return dst;
}
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/memcpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x
new file mode 100644
index 0000000000..acf2132367
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/memmove-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test5 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/mempcpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x
new file mode 100644
index 0000000000..9b8363459c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/memset-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x
new file mode 100644
index 0000000000..9b8363459c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/snprintf-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x
new file mode 100644
index 0000000000..9b8363459c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/sprintf-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/stpcpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/stpncpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/stpncpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/stpncpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x
new file mode 100644
index 0000000000..9b8363459c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strcat-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strcpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x
new file mode 100644
index 0000000000..9b8363459c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strncat-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c b/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c
index fe3462724e..508b2d3309 100644
--- a/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strncmp-2.c
@@ -12,7 +12,7 @@ extern int strncmp (const char *, const char *, size_t);
void
main_test (void)
{
-#if !defined(__OPTIMIZE__) || ((defined(__i386__) || defined (__x86_64__)) && !defined(__OPTIMIZE_SIZE__))
+#if !defined(__OPTIMIZE__) || ((defined(__sh__) || defined(__i386__) || defined (__x86_64__)) && !defined(__OPTIMIZE_SIZE__))
/* These tests work on platforms which support cmpstrsi. We test it
at -O0 on all platforms to ensure the strncmp logic is correct. */
const char *const s1 = "hello world";
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x
new file mode 100644
index 0000000000..e976a755ba
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/strncpy-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test4 struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x
new file mode 100644
index 0000000000..0d6e85c971
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/vsnprintf-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3_sub struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x b/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x
new file mode 100644
index 0000000000..0d6e85c971
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/builtins/vsprintf-chk.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of struct padding.
+ # to make this true for test3_sub struct A on epiphany would require
+ # __attribute__((packed)) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/execute.exp b/gcc/testsuite/gcc.c-torture/execute/execute.exp
index a26e590763..9f29ef2dc4 100644
--- a/gcc/testsuite/gcc.c-torture/execute/execute.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/execute.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
index 873a17df4d..d750e1f37d 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/20000320-1.c
@@ -1,6 +1,3 @@
-#if defined(__mips__) && defined(__sgi__)
-#include <sys/fpu.h>
-#endif /* defined(__mips__) && defined(__sgi__) */
#if __INT_MAX__ != 2147483647 || (__LONG_LONG_MAX__ != 9223372036854775807ll && __LONG_MAX__ != 9223372036854775807ll)
int main(void) { exit (0); }
#else
@@ -34,15 +31,6 @@ void c(ull d, ul f)
int main()
{
-#if defined(__mips__) && defined(__sgi__)
- /* Many MIPS chips round denormalized floating point numbers to zero
- rather than follow the IEEE standard. Change the rounding mode
- to correspond to the IEEE rounding mode that rounds numbers to
- the nearest representable mode, the most common IEEE rounding
- mode. */
- set_fpc_csr(0);
-#endif /* defined(__mips__) && defined(__sgi__) */
-
if (sizeof (float) != sizeof (ul)
|| sizeof (double) != sizeof (ull))
exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c b/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c
index fa4097a748..034645a119 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/copysign1.c
@@ -24,7 +24,7 @@
builds constants; the later is what we'll get from the negation operator
at runtime. */
/* ??? This hack only works for big-endian, which is fortunately true for
- all of AIX, Darwin, and Irix. */
+ AIX and, Darwin. */
#if LDBL_MANT_DIG == 106
# undef fpsizeofl
# define fpsizeofl sizeof(double)
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c b/gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c
index fac7ab3a53..8e176661e1 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/copysign2.c
@@ -24,7 +24,7 @@
builds constants; the later is what we'll get from the negation operator
at runtime. */
/* ??? This hack only works for big-endian, which is fortunately true for
- all of AIX, Darwin, and Irix. */
+ AIX and Darwin. */
#if LDBL_MANT_DIG == 106
# undef fpsizeofl
# define fpsizeofl sizeof(double)
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
index d15e90a525..33b1264fb3 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/ieee.exp
@@ -1,6 +1,6 @@
#
# Expect driver script for GCC Regression Tests
-# Copyright (C) 1993, 1996, 2001, 2005, 2007, 2008, 2010 Free Software Foundation
+# Copyright (C) 1993-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x b/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x
index d090cbf610..16df951613 100644
--- a/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x
+++ b/gcc/testsuite/gcc.c-torture/execute/ieee/mul-subnormal-single-1.x
@@ -3,11 +3,6 @@ if [istarget "epiphany-*-*"] {
# support subnormals.
return 1
}
-if [istarget "mips-sgi-irix6*"] {
- # IRIX 6 sets the MIPS IV flush to zero bit by default, so this test
- # isn't expected to work for n32 and n64 on MIPS IV targets.
- return 1
-}
if {[istarget "m68k-*-*"] && [check_effective_target_coldfire_fpu]} {
# ColdFire FPUs require software handling of subnormals. We are
# not aware of any system that has this.
diff --git a/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x b/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x
new file mode 100644
index 0000000000..392d9aaa89
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/nest-align-1.x
@@ -0,0 +1,5 @@
+# Force bigger stack alignment for PowerPC EABI targets.
+if { [istarget "powerpc-*-eabi*"] } {
+ set additional_flags "-mno-eabi"
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr15296.c b/gcc/testsuite/gcc.c-torture/execute/pr15296.c
index d2468e425a..a3b53cb976 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr15296.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr15296.c
@@ -3,7 +3,7 @@
fall-through code, while that register held a pointer used in code at
the branch target. */
-typedef int __attribute__ ((mode (__pointer__))) intptr_t;
+typedef __INTPTR_TYPE__ intptr_t;
typedef intptr_t W;
union u0
{
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr19449.c b/gcc/testsuite/gcc.c-torture/execute/pr19449.c
new file mode 100644
index 0000000000..63cc2e74e1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr19449.c
@@ -0,0 +1,20 @@
+/* PR c/19449 */
+
+extern void abort (void);
+
+int y;
+int z = __builtin_choose_expr (!__builtin_constant_p (y), 3, 4);
+
+int
+foo (int x)
+{
+ return __builtin_choose_expr (!__builtin_constant_p (x), 3, y++);
+}
+
+int
+main ()
+{
+ if (y || z != 3 || foo (4) != 3)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c b/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c
index 142530f62c..7e876fa8cd 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22098-1.c
@@ -1,13 +1,13 @@
extern void abort (void);
extern void exit (int);
-typedef __SIZE_TYPE__ size_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
int
main (void)
{
int a = 0;
int *p;
- size_t b;
- b = (size_t)(p = &(int []){0, 1, 2}[++a]);
+ uintptr_t b;
+ b = (uintptr_t)(p = &(int []){0, 1, 2}[++a]);
if (a != 1 || *p != 1 || *(int *)b != 1)
abort ();
exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c b/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c
index 249647dc57..035a755a52 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22098-2.c
@@ -1,13 +1,13 @@
extern void abort (void);
extern void exit (int);
-typedef __SIZE_TYPE__ size_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
int
main (void)
{
int a = 0;
int *p;
- size_t b;
- b = (size_t)(p = &(int []){0, 1, 2}[1]);
+ uintptr_t b;
+ b = (uintptr_t)(p = &(int []){0, 1, 2}[1]);
if (*p != 1 || *(int *)b != 1)
abort ();
exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c b/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c
index 4c8a1c62ce..4f37be86c8 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr22098-3.c
@@ -1,6 +1,6 @@
extern void abort (void);
extern void exit (int);
-typedef __SIZE_TYPE__ size_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
int n = 0;
int f (void) { return ++n; }
int
@@ -8,8 +8,8 @@ main (void)
{
int a = 0;
int *p;
- size_t b;
- b = (size_t)(p = &(int []){0, f(), 2}[1]);
+ uintptr_t b;
+ b = (uintptr_t)(p = &(int []){0, f(), 2}[1]);
if (*p != 1 || *(int *)b != 1 || n != 1)
abort ();
exit (0);
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr23135.x b/gcc/testsuite/gcc.c-torture/execute/pr23135.x
new file mode 100644
index 0000000000..cb7b119b8c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr23135.x
@@ -0,0 +1,2 @@
+set additional_flags "-Wno-psabi"
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr28865.c b/gcc/testsuite/gcc.c-torture/execute/pr28865.c
new file mode 100644
index 0000000000..627e6b86e1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr28865.c
@@ -0,0 +1,21 @@
+struct A { int a; char b[]; };
+union B { struct A a; char b[sizeof (struct A) + 31]; };
+union B b = { { 1, "123456789012345678901234567890" } };
+union B c = { { 2, "123456789012345678901234567890" } };
+
+__attribute__((noinline, noclone)) void
+foo (int *x[2])
+{
+ x[0] = &b.a.a;
+ x[1] = &c.a.a;
+}
+
+int
+main ()
+{
+ int *x[2];
+ foo (x);
+ if (*x[0] != 1 || *x[1] != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr33992.c b/gcc/testsuite/gcc.c-torture/execute/pr33992.c
index 743361061d..92b80e51bb 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr33992.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr33992.c
@@ -7,7 +7,7 @@ bar (unsigned long long i)
abort ();
}
-void __attribute__((always_inline))
+static void __attribute__((always_inline))
foo (unsigned long long *r)
{
int i;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr43220.x b/gcc/testsuite/gcc.c-torture/execute/pr43220.x
new file mode 100644
index 0000000000..121fcfecc2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr43220.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr46309.c b/gcc/testsuite/gcc.c-torture/execute/pr46309.c
new file mode 100644
index 0000000000..46e10ab4bf
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr46309.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/46309 */
+
+extern void abort (void);
+
+unsigned int *q;
+
+__attribute__((noinline, noclone)) void
+bar (unsigned int *p)
+{
+ if (*p != 2 && *p != 3)
+ (!(!(*q & 263) || *p != 1)) ? abort () : 0;
+}
+
+int
+main ()
+{
+ unsigned int x, y;
+ asm volatile ("" : : : "memory");
+ x = 2;
+ bar (&x);
+ x = 3;
+ bar (&x);
+ y = 1;
+ x = 0;
+ q = &y;
+ bar (&x);
+ y = 0;
+ x = 1;
+ bar (&x);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr47237.x b/gcc/testsuite/gcc.c-torture/execute/pr47237.x
new file mode 100644
index 0000000000..d5d6988f93
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr47237.x
@@ -0,0 +1,6 @@
+if { [istarget "nios2-*-*"] } {
+ # This test can cause the stack to underflow on Nios II.
+ set torture_execute_xfail [istarget]
+}
+
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr48814-1.c b/gcc/testsuite/gcc.c-torture/execute/pr48814-1.c
new file mode 100644
index 0000000000..452aaab30f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr48814-1.c
@@ -0,0 +1,18 @@
+extern void abort (void);
+
+int arr[] = {1,2,3,4};
+int count = 0;
+
+int __attribute__((noinline))
+incr (void)
+{
+ return ++count;
+}
+
+int main()
+{
+ arr[count++] = incr ();
+ if (count != 2 || arr[count] != 3)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr48814-2.c b/gcc/testsuite/gcc.c-torture/execute/pr48814-2.c
new file mode 100644
index 0000000000..9eea3289ab
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr48814-2.c
@@ -0,0 +1,18 @@
+extern void abort (void);
+
+int arr[] = {1,2,3,4};
+int count = 0;
+
+int
+incr (void)
+{
+ return ++count;
+}
+
+int main()
+{
+ arr[count++] = incr ();
+ if (count != 2 || arr[count] != 3)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51447.c b/gcc/testsuite/gcc.c-torture/execute/pr51447.c
new file mode 100644
index 0000000000..7b71a2642a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51447.c
@@ -0,0 +1,27 @@
+/* PR rtl-optimization/51447 */
+
+extern void abort (void);
+
+#ifdef __x86_64__
+register void *ptr asm ("rbx");
+#else
+void *ptr;
+#endif
+
+int
+main (void)
+{
+ __label__ nonlocal_lab;
+ __attribute__((noinline, noclone)) void
+ bar (void *func)
+ {
+ ptr = func;
+ goto nonlocal_lab;
+ }
+ bar (&&nonlocal_lab);
+ return 1;
+nonlocal_lab:
+ if (ptr != &&nonlocal_lab)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
new file mode 100644
index 0000000000..396b7aab22
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.c
@@ -0,0 +1,157 @@
+/* PR tree-optimization/51581 */
+
+extern void abort (void);
+
+#define N 4096
+int a[N], c[N];
+unsigned int b[N], d[N];
+
+__attribute__((noinline, noclone)) void
+f1 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] / 3;
+}
+
+__attribute__((noinline, noclone)) void
+f2 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] / 3;
+}
+
+__attribute__((noinline, noclone)) void
+f3 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] / 18;
+}
+
+__attribute__((noinline, noclone)) void
+f4 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] / 18;
+}
+
+__attribute__((noinline, noclone)) void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] / 19;
+}
+
+__attribute__((noinline, noclone)) void
+f6 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] / 19;
+}
+
+#if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
+__attribute__((noinline, noclone)) void
+f7 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = (int) ((unsigned long long) (a[i] * 0x55555556LL) >> 32) - (a[i] >> 31);
+}
+
+__attribute__((noinline, noclone)) void
+f8 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = ((unsigned int) ((b[i] * 0xaaaaaaabULL) >> 32) >> 1);
+}
+
+__attribute__((noinline, noclone)) void
+f9 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = (((int) ((unsigned long long) (a[i] * 0x38e38e39LL) >> 32)) >> 2) - (a[i] >> 31);
+}
+
+__attribute__((noinline, noclone)) void
+f10 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = (unsigned int) ((b[i] * 0x38e38e39ULL) >> 32) >> 2;
+}
+
+__attribute__((noinline, noclone)) void
+f11 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = (((int) ((unsigned long long) (a[i] * 0x6bca1af3LL) >> 32)) >> 3) - (a[i] >> 31);
+}
+
+__attribute__((noinline, noclone)) void
+f12 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int tmp = (b[i] * 0xaf286bcbULL) >> 32;
+ d[i] = (((b[i] - tmp) >> 1) + tmp) >> 4;
+ }
+}
+#endif
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ asm ("");
+ a[i] = i - N / 2;
+ b[i] = i;
+ }
+ a[0] = -__INT_MAX__ - 1;
+ a[1] = -__INT_MAX__;
+ a[N - 1] = __INT_MAX__;
+ b[N - 1] = ~0;
+ f1 ();
+ f2 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 3 || d[i] != b[i] / 3)
+ abort ();
+ f3 ();
+ f4 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 18 || d[i] != b[i] / 18)
+ abort ();
+ f5 ();
+ f6 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 19 || d[i] != b[i] / 19)
+ abort ();
+#if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
+ f7 ();
+ f8 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 3 || d[i] != b[i] / 3)
+ abort ();
+ f9 ();
+ f10 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 18 || d[i] != b[i] / 18)
+ abort ();
+ f11 ();
+ f12 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] / 19 || d[i] != b[i] / 19)
+ abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-1.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c
new file mode 100644
index 0000000000..dc111c4215
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.c
@@ -0,0 +1,173 @@
+/* PR tree-optimization/51581 */
+
+extern void abort (void);
+
+#define N 4096
+int a[N], c[N];
+unsigned int b[N], d[N];
+
+__attribute__((noinline, noclone)) void
+f1 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] % 3;
+}
+
+__attribute__((noinline, noclone)) void
+f2 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] % 3;
+}
+
+__attribute__((noinline, noclone)) void
+f3 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] % 18;
+}
+
+__attribute__((noinline, noclone)) void
+f4 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] % 18;
+}
+
+__attribute__((noinline, noclone)) void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = a[i] % 19;
+}
+
+__attribute__((noinline, noclone)) void
+f6 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = b[i] % 19;
+}
+
+#if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
+__attribute__((noinline, noclone)) void
+f7 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ int x = (int) ((unsigned long long) (a[i] * 0x55555556LL) >> 32) - (a[i] >> 31);
+ c[i] = a[i] - x * 3;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+f8 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int x = ((unsigned int) ((b[i] * 0xaaaaaaabULL) >> 32) >> 1);
+ d[i] = b[i] - x * 3;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+f9 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ int x = (((int) ((unsigned long long) (a[i] * 0x38e38e39LL) >> 32)) >> 2) - (a[i] >> 31);
+ c[i] = a[i] - x * 18;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+f10 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int x = (unsigned int) ((b[i] * 0x38e38e39ULL) >> 32) >> 2;
+ d[i] = b[i] - x * 18;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+f11 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ int x = (((int) ((unsigned long long) (a[i] * 0x6bca1af3LL) >> 32)) >> 3) - (a[i] >> 31);
+ c[i] = a[i] - x * 19;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+f12 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int tmp = (b[i] * 0xaf286bcbULL) >> 32;
+ unsigned int x = (((b[i] - tmp) >> 1) + tmp) >> 4;
+ d[i] = b[i] - x * 19;
+ }
+}
+#endif
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ asm ("");
+ a[i] = i - N / 2;
+ b[i] = i;
+ }
+ a[0] = -__INT_MAX__ - 1;
+ a[1] = -__INT_MAX__;
+ a[N - 1] = __INT_MAX__;
+ b[N - 1] = ~0;
+ f1 ();
+ f2 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 3 || d[i] != b[i] % 3)
+ abort ();
+ f3 ();
+ f4 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 18 || d[i] != b[i] % 18)
+ abort ();
+ f5 ();
+ f6 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 19 || d[i] != b[i] % 19)
+ abort ();
+#if __SIZEOF_INT__ == 4 && __SIZEOF_LONG_LONG__ == 8
+ f7 ();
+ f8 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 3 || d[i] != b[i] % 3)
+ abort ();
+ f9 ();
+ f10 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 18 || d[i] != b[i] % 18)
+ abort ();
+ f11 ();
+ f12 ();
+ for (i = 0; i < N; i++)
+ if (c[i] != a[i] % 19 || d[i] != b[i] % 19)
+ abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr51581-2.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52760.c b/gcc/testsuite/gcc.c-torture/execute/pr52760.c
new file mode 100644
index 0000000000..1413c5f275
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr52760.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/52760 */
+
+struct T { unsigned short a, b, c, d; };
+
+__attribute__((noinline, noclone)) void
+foo (int x, struct T *y)
+{
+ int i;
+
+ for (i = 0; i < x; i++)
+ {
+ y[i].a = ((0x00ff & y[i].a >> 8) | (0xff00 & y[i].a << 8));
+ y[i].b = ((0x00ff & y[i].b >> 8) | (0xff00 & y[i].b << 8));
+ y[i].c = ((0x00ff & y[i].c >> 8) | (0xff00 & y[i].c << 8));
+ y[i].d = ((0x00ff & y[i].d >> 8) | (0xff00 & y[i].d << 8));
+ }
+}
+
+int
+main ()
+{
+ struct T t = { 0x0001, 0x0203, 0x0405, 0x0607 };
+ foo (1, &t);
+ if (t.a != 0x0100 || t.b != 0x0302 || t.c != 0x0504 || t.d != 0x0706)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-1.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr52979-2.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x b/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x
new file mode 100644
index 0000000000..eeb3846653
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr53366-1.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53645-2.c b/gcc/testsuite/gcc.c-torture/execute/pr53645-2.c
new file mode 100644
index 0000000000..a03dd2ef8d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr53645-2.c
@@ -0,0 +1,120 @@
+/* PR tree-optimization/53645 */
+
+typedef unsigned short int UV __attribute__((vector_size (16)));
+typedef short int SV __attribute__((vector_size (16)));
+extern void abort (void);
+
+#define TEST(a, b, c, d, e, f, g, h) \
+__attribute__((noinline)) void \
+uq##a##b##c##d##e##f##g##h (UV *x, UV *y) \
+{ \
+ *x = *y / ((UV) { a, b, c, d, e, f, g, h }); \
+} \
+ \
+__attribute__((noinline)) void \
+ur##a##b##c##d##e##f##g##h (UV *x, UV *y) \
+{ \
+ *x = *y % ((UV) { a, b, c, d, e, f, g, h }); \
+} \
+ \
+__attribute__((noinline)) void \
+sq##a##b##c##d##e##f##g##h (SV *x, SV *y) \
+{ \
+ *x = *y / ((SV) { a, b, c, d, e, f, g, h }); \
+} \
+ \
+__attribute__((noinline)) void \
+sr##a##b##c##d##e##f##g##h (SV *x, SV *y) \
+{ \
+ *x = *y % ((SV) { a, b, c, d, e, f, g, h }); \
+}
+
+#define TESTS \
+TEST (4, 4, 4, 4, 4, 4, 4, 4) \
+TEST (1, 4, 2, 8, 16, 64, 32, 128) \
+TEST (3, 3, 3, 3, 3, 3, 3, 3) \
+TEST (6, 5, 6, 5, 6, 5, 6, 5) \
+TEST (14, 14, 14, 6, 14, 6, 14, 14) \
+TEST (7, 7, 7, 7, 7, 7, 7, 7) \
+
+TESTS
+
+UV u[] =
+ { ((UV) { 73U, 65531U, 0U, 174U, 921U, 65535U, 17U, 178U }),
+ ((UV) { 1U, 8173U, 65535U, 65472U, 12U, 29612U, 128U, 8912U }) };
+SV s[] =
+ { ((SV) { 73, -9123, 32761, 8191, 16371, 1201, 12701, 9999 }),
+ ((SV) { 9903, -1, -7323, 0, -7, -323, 9124, -9199 }) };
+
+int
+main ()
+{
+ UV ur, ur2;
+ SV sr, sr2;
+ int i;
+#undef TEST
+#define TEST(a, b, c, d, e, f, g, h) \
+ uq##a##b##c##d##e##f##g##h (&ur, u + i); \
+ if (ur[0] != u[i][0] / a || ur[3] != u[i][3] / d) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[2] != u[i][2] / c || ur[1] != u[i][1] / b) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[4] != u[i][4] / e || ur[7] != u[i][7] / h) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[6] != u[i][6] / g || ur[5] != u[i][5] / f) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ ur##a##b##c##d##e##f##g##h (&ur, u + i); \
+ if (ur[0] != u[i][0] % a || ur[3] != u[i][3] % d) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[2] != u[i][2] % c || ur[1] != u[i][1] % b) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[4] != u[i][4] % e || ur[7] != u[i][7] % h) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[6] != u[i][6] % g || ur[5] != u[i][5] % f) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory");
+ for (i = 0; i < sizeof (u) / sizeof (u[0]); i++)
+ {
+ TESTS
+ }
+#undef TEST
+#define TEST(a, b, c, d, e, f, g, h) \
+ sq##a##b##c##d##e##f##g##h (&sr, s + i); \
+ if (sr[0] != s[i][0] / a || sr[3] != s[i][3] / d) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[2] != s[i][2] / c || sr[1] != s[i][1] / b) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[4] != s[i][4] / e || sr[7] != s[i][7] / h) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[6] != s[i][6] / g || sr[5] != s[i][5] / f) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ sr##a##b##c##d##e##f##g##h (&sr, s + i); \
+ if (sr[0] != s[i][0] % a || sr[3] != s[i][3] % d) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[2] != s[i][2] % c || sr[1] != s[i][1] % b) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[4] != s[i][4] % e || sr[7] != s[i][7] % h) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[6] != s[i][6] % g || sr[5] != s[i][5] % f) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory");
+ for (i = 0; i < sizeof (s) / sizeof (s[0]); i++)
+ {
+ TESTS
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53645.c b/gcc/testsuite/gcc.c-torture/execute/pr53645.c
new file mode 100644
index 0000000000..1e70d9e763
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr53645.c
@@ -0,0 +1,96 @@
+/* PR tree-optimization/53645 */
+
+typedef unsigned int UV __attribute__((vector_size (16)));
+typedef int SV __attribute__((vector_size (16)));
+extern void abort (void);
+
+#define TEST(a, b, c, d) \
+__attribute__((noinline)) void \
+uq##a##b##c##d (UV *x, UV *y) \
+{ \
+ *x = *y / ((UV) { a, b, c, d }); \
+} \
+ \
+__attribute__((noinline)) void \
+ur##a##b##c##d (UV *x, UV *y) \
+{ \
+ *x = *y % ((UV) { a, b, c, d }); \
+} \
+ \
+__attribute__((noinline)) void \
+sq##a##b##c##d (SV *x, SV *y) \
+{ \
+ *x = *y / ((SV) { a, b, c, d }); \
+} \
+ \
+__attribute__((noinline)) void \
+sr##a##b##c##d (SV *x, SV *y) \
+{ \
+ *x = *y % ((SV) { a, b, c, d }); \
+}
+
+#define TESTS \
+TEST (4, 4, 4, 4) \
+TEST (1, 4, 2, 8) \
+TEST (3, 3, 3, 3) \
+TEST (6, 5, 6, 5) \
+TEST (14, 14, 14, 6) \
+TEST (7, 7, 7, 7) \
+
+TESTS
+
+UV u[] =
+ { ((UV) { 73U, 65531U, 0U, 174U }),
+ ((UV) { 1U, 8173U, ~0U, ~0U - 63 }) };
+SV s[] =
+ { ((SV) { 73, -9123, 32761, 8191 }),
+ ((SV) { 9903, -1, -7323, 0 }) };
+
+int
+main ()
+{
+ UV ur, ur2;
+ SV sr, sr2;
+ int i;
+#undef TEST
+#define TEST(a, b, c, d) \
+ uq##a##b##c##d (&ur, u + i); \
+ if (ur[0] != u[i][0] / a || ur[3] != u[i][3] / d) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[2] != u[i][2] / c || ur[1] != u[i][1] / b) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ ur##a##b##c##d (&ur, u + i); \
+ if (ur[0] != u[i][0] % a || ur[3] != u[i][3] % d) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory"); \
+ if (ur[2] != u[i][2] % c || ur[1] != u[i][1] % b) \
+ abort (); \
+ asm volatile ("" : : "r" (&ur) : "memory");
+ for (i = 0; i < sizeof (u) / sizeof (u[0]); i++)
+ {
+ TESTS
+ }
+#undef TEST
+#define TEST(a, b, c, d) \
+ sq##a##b##c##d (&sr, s + i); \
+ if (sr[0] != s[i][0] / a || sr[3] != s[i][3] / d) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[2] != s[i][2] / c || sr[1] != s[i][1] / b) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ sr##a##b##c##d (&sr, s + i); \
+ if (sr[0] != s[i][0] % a || sr[3] != s[i][3] % d) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory"); \
+ if (sr[2] != s[i][2] % c || sr[1] != s[i][1] % b) \
+ abort (); \
+ asm volatile ("" : : "r" (&sr) : "memory");
+ for (i = 0; i < sizeof (s) / sizeof (s[0]); i++)
+ {
+ TESTS
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr53688.c b/gcc/testsuite/gcc.c-torture/execute/pr53688.c
new file mode 100644
index 0000000000..c7ed4d78b0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr53688.c
@@ -0,0 +1,32 @@
+char headline[256];
+struct hdr {
+ char part1[9];
+ char part2[8];
+} p;
+
+void __attribute__((noinline,noclone))
+init()
+{
+ __builtin_memcpy (p.part1, "FOOBARFOO", sizeof (p.part1));
+ __builtin_memcpy (p.part2, "SPEC CPU", sizeof (p.part2));
+}
+
+int main()
+{
+ char *x;
+ int c;
+ init();
+ __builtin_memcpy (&headline[0], p.part1, 9);
+ c = 9;
+ x = &headline[0];
+ x = x + c;
+ __builtin_memset (x, ' ', 245);
+ __builtin_memcpy (&headline[10], p.part2, 8);
+ c = 18;
+ x = &headline[0];
+ x = x + c;
+ __builtin_memset (x, ' ', 238);
+ if (headline[10] != 'S')
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr54471.c b/gcc/testsuite/gcc.c-torture/execute/pr54471.c
new file mode 100644
index 0000000000..a169873b06
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr54471.c
@@ -0,0 +1,36 @@
+/* PR tree-optimization/54471 */
+
+#ifdef __SIZEOF_INT128__
+#define T __int128
+#else
+#define T long long
+#endif
+
+extern void abort (void);
+
+__attribute__ ((noinline))
+unsigned T
+foo (T ixi, unsigned ctr)
+{
+ unsigned T irslt = 1;
+ T ix = ixi;
+
+ for (; ctr; ctr--)
+ {
+ irslt *= ix;
+ ix *= ix;
+ }
+
+ if (irslt != 14348907)
+ abort ();
+ return irslt;
+}
+
+int
+main ()
+{
+ unsigned T res;
+
+ res = foo (3, 4);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr54937.c b/gcc/testsuite/gcc.c-torture/execute/pr54937.c
new file mode 100644
index 0000000000..13dae6063f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr54937.c
@@ -0,0 +1,22 @@
+
+void exit (int);
+void abort (void);
+int a[1];
+void (*terminate_me)(int);
+
+__attribute__((noinline,noclone))
+t(int c)
+{ int i;
+ for (i=0;i<c;i++)
+ {
+ if (i)
+ terminate_me(0);
+ a[i]=0;
+ }
+}
+main()
+{
+ terminate_me = exit;
+ t(100);
+ abort();
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr55137.c b/gcc/testsuite/gcc.c-torture/execute/pr55137.c
new file mode 100644
index 0000000000..80bc973f7f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr55137.c
@@ -0,0 +1,30 @@
+/* PR c++/55137 */
+
+extern void abort (void);
+
+int
+foo (unsigned int x)
+{
+ return ((int) (x + 1U) + 1) < (int) x;
+}
+
+int
+bar (unsigned int x)
+{
+ return (int) (x + 1U) + 1;
+}
+
+int
+baz (unsigned int x)
+{
+ return x + 1U;
+}
+
+int
+main ()
+{
+ if (foo (__INT_MAX__) != (bar (__INT_MAX__) < __INT_MAX__)
+ || foo (__INT_MAX__) != ((int) baz (__INT_MAX__) + 1 < __INT_MAX__))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr55750.c b/gcc/testsuite/gcc.c-torture/execute/pr55750.c
new file mode 100644
index 0000000000..d2b3c63cd0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr55750.c
@@ -0,0 +1,29 @@
+/* PR middle-end/55750 */
+
+extern void abort (void);
+
+struct S
+{
+ int m : 1;
+ int n : 7;
+} arr[2];
+
+__attribute__((noinline, noclone)) void
+foo (unsigned i)
+{
+ arr[i].n++;
+}
+
+int
+main ()
+{
+ arr[0].m = -1;
+ arr[0].n = (1 << 6) - 1;
+ arr[1].m = 0;
+ arr[1].n = -1;
+ foo (0);
+ foo (1);
+ if (arr[0].m != -1 || arr[0].n != -(1 << 6) || arr[1].m != 0 || arr[1].n != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr55875.c b/gcc/testsuite/gcc.c-torture/execute/pr55875.c
new file mode 100644
index 0000000000..4e56f7c26c
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr55875.c
@@ -0,0 +1,17 @@
+int a[251];
+__attribute__ ((noinline))
+t(int i)
+{
+ if (i==0)
+ exit(0);
+ if (i>255)
+ abort ();
+}
+main()
+{
+ unsigned int i;
+ for (i=0;;i++)
+ {
+ a[i]=t((unsigned char)(i+5));
+ }
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56205.c b/gcc/testsuite/gcc.c-torture/execute/pr56205.c
new file mode 100644
index 0000000000..bf39685946
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56205.c
@@ -0,0 +1,61 @@
+/* PR tree-optimization/56205 */
+
+#include <stdarg.h>
+
+int a, b;
+char c[128];
+
+__attribute__((noinline, noclone)) static void
+f1 (const char *fmt, ...)
+{
+ va_list ap;
+ asm volatile ("" : : : "memory");
+ if (__builtin_strcmp (fmt, "%s %d %s") != 0)
+ __builtin_abort ();
+ va_start (ap, fmt);
+ if (__builtin_strcmp (va_arg (ap, const char *), "foo") != 0
+ || va_arg (ap, int) != 1
+ || __builtin_strcmp (va_arg (ap, const char *), "bar") != 0)
+ __builtin_abort ();
+ va_end (ap);
+}
+
+__attribute__((noinline, noclone)) static void
+f2 (const char *fmt, va_list ap)
+{
+ asm volatile ("" : : : "memory");
+ if (__builtin_strcmp (fmt, "baz") != 0
+ || __builtin_strcmp (va_arg (ap, const char *), "foo") != 0
+ || va_arg (ap, double) != 12.0
+ || va_arg (ap, int) != 26)
+ __builtin_abort ();
+}
+
+static void
+f3 (int x, char const *y, va_list z)
+{
+ f1 ("%s %d %s", x ? "" : "foo", ++a, (y && *y) ? "bar" : "");
+ if (y && *y)
+ f2 (y, z);
+}
+
+__attribute__((noinline, noclone)) void
+f4 (int x, char const *y, ...)
+{
+ va_list z;
+ va_start (z, y);
+ if (!x && *c == '\0')
+ ++b;
+ f3 (x, y, z);
+ va_end (z);
+}
+
+int
+main ()
+{
+ asm volatile ("" : : : "memory");
+ f4 (0, "baz", "foo", 12.0, 26);
+ if (a != 1 || b != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56799.c b/gcc/testsuite/gcc.c-torture/execute/pr56799.c
new file mode 100644
index 0000000000..d9ee26bc27
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56799.c
@@ -0,0 +1,43 @@
+
+#include <stdio.h>
+typedef struct { int x; int y;} S;
+extern int foo(S*);
+int hi = 0, lo = 0;
+
+int main()
+{
+ S a;
+ int r;
+ a.x = (int) 0x00010000;
+ a.y = 1;
+ r = foo (&a);
+ if (r == 2 && lo==0 && hi==1)
+ {
+ exit (0);
+ }
+ abort ();
+}
+
+typedef unsigned short u16;
+
+__attribute__ ((noinline)) int foo (S* ptr)
+{
+ int a = ptr->x;
+ int c = 0;
+ u16 b = (u16) a;
+ if (b != 0)
+ {
+ lo = 1;
+ c += ptr->y;
+ }
+ b = a >> 16;
+ if (b != 0)
+ {
+ hi = 1;
+ c+= ptr->y;
+ }
+ c += ptr->y;
+ return c;
+}
+
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56799.x b/gcc/testsuite/gcc.c-torture/execute/pr56799.x
new file mode 100644
index 0000000000..4efed4c325
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56799.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int32plus] } {
+ return 0
+}
+
+return 1;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56837.c b/gcc/testsuite/gcc.c-torture/execute/pr56837.c
new file mode 100644
index 0000000000..a6ce2af71a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56837.c
@@ -0,0 +1,21 @@
+extern void abort (void);
+_Complex int a[1024];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = -1;
+}
+
+int
+main ()
+{
+ int i;
+ foo ();
+ for (i = 0; i < 1024; i++)
+ if (a[i] != -1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56866.c b/gcc/testsuite/gcc.c-torture/execute/pr56866.c
new file mode 100644
index 0000000000..260b8ff187
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56866.c
@@ -0,0 +1,45 @@
+/* PR target/56866 */
+
+int
+main ()
+{
+#if __CHAR_BIT__ == 8 && __SIZEOF_LONG_LONG__ == 8 && __SIZEOF_INT__ == 4 && __SIZEOF_SHORT__ == 2
+ unsigned long long wq[256], rq[256];
+ unsigned int wi[256], ri[256];
+ unsigned short ws[256], rs[256];
+ unsigned char wc[256], rc[256];
+ int t;
+
+ __builtin_memset (wq, 0, sizeof wq);
+ __builtin_memset (wi, 0, sizeof wi);
+ __builtin_memset (ws, 0, sizeof ws);
+ __builtin_memset (wc, 0, sizeof wc);
+ wq[0] = 0x0123456789abcdefULL;
+ wi[0] = 0x01234567;
+ ws[0] = 0x4567;
+ wc[0] = 0x73;
+
+ asm volatile ("" : : "g" (wq), "g" (wi), "g" (ws), "g" (wc) : "memory");
+
+ for (t = 0; t < 256; ++t)
+ rq[t] = (wq[t] >> 8) | (wq[t] << (sizeof (wq[0]) * __CHAR_BIT__ - 8));
+ for (t = 0; t < 256; ++t)
+ ri[t] = (wi[t] >> 8) | (wi[t] << (sizeof (wi[0]) * __CHAR_BIT__ - 8));
+ for (t = 0; t < 256; ++t)
+ rs[t] = (ws[t] >> 9) | (ws[t] << (sizeof (ws[0]) * __CHAR_BIT__ - 9));
+ for (t = 0; t < 256; ++t)
+ rc[t] = (wc[t] >> 5) | (wc[t] << (sizeof (wc[0]) * __CHAR_BIT__ - 5));
+
+ asm volatile ("" : : "g" (rq), "g" (ri), "g" (rs), "g" (rc) : "memory");
+
+ if (rq[0] != 0xef0123456789abcdULL || rq[1])
+ __builtin_abort ();
+ if (ri[0] != 0x67012345 || ri[1])
+ __builtin_abort ();
+ if (rs[0] != 0xb3a2 || rs[1])
+ __builtin_abort ();
+ if (rc[0] != 0x9b || rc[1])
+ __builtin_abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56899.c b/gcc/testsuite/gcc.c-torture/execute/pr56899.c
new file mode 100644
index 0000000000..9adf9af00f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56899.c
@@ -0,0 +1,47 @@
+/* PR tree-optimization/56899 */
+
+#if __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8
+__attribute__((noinline, noclone)) void
+f1 (int v)
+{
+ int x = -214748365 * (v - 1);
+ if (x != -1932735285)
+ __builtin_abort ();
+}
+
+__attribute__((noinline, noclone)) void
+f2 (int v)
+{
+ int x = 214748365 * (v + 1);
+ if (x != -1932735285)
+ __builtin_abort ();
+}
+
+__attribute__((noinline, noclone)) void
+f3 (unsigned int v)
+{
+ unsigned int x = -214748365U * (v - 1);
+ if (x != -1932735285U)
+ __builtin_abort ();
+}
+
+__attribute__((noinline, noclone)) void
+f4 (unsigned int v)
+{
+ unsigned int x = 214748365U * (v + 1);
+ if (x != -1932735285U)
+ __builtin_abort ();
+}
+#endif
+
+int
+main ()
+{
+#if __SIZEOF_INT__ == 4 && __CHAR_BIT__ == 8
+ f1 (10);
+ f2 (-10);
+ f3 (10);
+ f4 (-10U);
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56962.c b/gcc/testsuite/gcc.c-torture/execute/pr56962.c
new file mode 100644
index 0000000000..7c6da48b30
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56962.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/56962 */
+
+extern void abort (void);
+long long v[144];
+
+__attribute__((noinline, noclone)) void
+bar (long long *x)
+{
+ if (x != &v[29])
+ abort ();
+}
+
+__attribute__((noinline, noclone)) void
+foo (long long *x, long y, long z)
+{
+ long long a, b, c;
+ a = x[z * 4 + y * 3];
+ b = x[z * 5 + y * 3];
+ c = x[z * 5 + y * 4];
+ x[y * 4] = a;
+ bar (&x[z * 5 + y]);
+ x[z * 5 + y * 5] = b + c;
+}
+
+int
+main ()
+{
+ foo (v, 24, 1);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr56982.c b/gcc/testsuite/gcc.c-torture/execute/pr56982.c
new file mode 100644
index 0000000000..c7da2affc1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr56982.c
@@ -0,0 +1,45 @@
+#include <setjmp.h>
+
+extern void abort (void);
+extern void exit (int);
+
+static jmp_buf env;
+
+void baz (void)
+{
+ __asm__ volatile ("" : : : "memory");
+}
+
+static inline int g(int x)
+{
+ if (x)
+ {
+ baz();
+ return 0;
+ }
+ else
+ {
+ baz();
+ return 1;
+ }
+}
+
+int f(int *e)
+{
+ if (*e)
+ return 1;
+
+ int x = setjmp(env);
+ int n = g(x);
+ if (n == 0)
+ exit(0);
+ if (x)
+ abort();
+ longjmp(env, 42);
+}
+
+int main(int argc, char** argv)
+{
+ int v = 0;
+ return f(&v);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57124.c b/gcc/testsuite/gcc.c-torture/execute/pr57124.c
new file mode 100644
index 0000000000..835d249df6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57124.c
@@ -0,0 +1,27 @@
+__attribute__ ((noinline))
+foo(short unsigned int *p1, short unsigned int *p2)
+{
+ short unsigned int x1, x4;
+ int x2, x3, x5, x6;
+ unsigned int x7;
+
+ x1 = *p1;
+ x2 = (int) x1;
+ x3 = x2 * 65536;
+ x4 = *p2;
+ x5 = (int) x4;
+ x6 = x3 + x4;
+ x7 = (unsigned int) x6;
+ if (x7 <= 268435455U)
+ abort ();
+ exit (0);
+}
+
+main()
+{
+ short unsigned int x, y;
+ x = -5;
+ y = -10;
+ foo (&x, &y);
+}
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57124.x b/gcc/testsuite/gcc.c-torture/execute/pr57124.x
new file mode 100644
index 0000000000..da6cfd0833
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57124.x
@@ -0,0 +1,9 @@
+load_lib target-supports.exp
+
+set additional_flags "-fno-strict-overflow"
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57130.c b/gcc/testsuite/gcc.c-torture/execute/pr57130.c
new file mode 100644
index 0000000000..6113203254
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57130.c
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/57130 */
+
+struct S { int a, b, c, d; } s[2] = { { 6, 8, -8, -5 }, { 0, 2, -1, 2 } };
+
+__attribute__((noinline, noclone)) void
+foo (struct S r)
+{
+ static int cnt;
+ if (__builtin_memcmp (&r, &s[cnt++], sizeof r) != 0)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ struct S r = { 6, 8, -8, -5 };
+ foo (r);
+ r = (struct S) { 0, 2, -1, 2 };
+ foo (r);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57131.c b/gcc/testsuite/gcc.c-torture/execute/pr57131.c
new file mode 100644
index 0000000000..f2c41a16b5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57131.c
@@ -0,0 +1,19 @@
+/* PR rtl-optimization/57131 */
+
+extern void abort (void);
+
+int
+main ()
+{
+ volatile int x1 = 0;
+ volatile long long x2 = 0;
+ volatile int x3 = 0;
+ volatile int x4 = 1;
+ volatile int x5 = 1;
+ volatile long long x6 = 1;
+ long long t = ((x1 * (x2 << x3)) / (x4 * x5)) + x6;
+
+ if (t != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57144.c b/gcc/testsuite/gcc.c-torture/execute/pr57144.c
new file mode 100644
index 0000000000..ffa2df4bf3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57144.c
@@ -0,0 +1,19 @@
+extern void abort (void);
+extern void exit (int);
+
+void __attribute__ ((noinline))
+foo(int a)
+{
+ int z = a > 0 ? a : -a;
+ long long x = z;
+ if (x > 0x100000000LL)
+ abort ();
+ else
+ exit (0);
+}
+
+int
+main()
+{
+ foo (1);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57281.c b/gcc/testsuite/gcc.c-torture/execute/pr57281.c
new file mode 100644
index 0000000000..db3db10d9e
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57281.c
@@ -0,0 +1,25 @@
+/* PR rtl-optimization/57281 */
+
+int a = 1, b, d, *e = &d;
+long long c, *g = &c;
+volatile long long f;
+
+int
+foo (int h)
+{
+ int j = *g = b;
+ return h == 0 ? j : 0;
+}
+
+int
+main ()
+{
+ int h = a;
+ for (; b != -20; b--)
+ {
+ (int) f;
+ *e = 0;
+ *e = foo (h);
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57321.c b/gcc/testsuite/gcc.c-torture/execute/pr57321.c
new file mode 100644
index 0000000000..79b3d4d177
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57321.c
@@ -0,0 +1,24 @@
+/* PR tree-optimization/57321 */
+
+int a = 1, *b, **c;
+
+static int
+foo (int *p)
+{
+ if (*p == a)
+ {
+ int *i[7][5] = { { 0 } };
+ int **j[1][1];
+ j[0][0] = &i[0][0];
+ *b = &p != c;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ int i = 0;
+ foo (&i);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-1.c b/gcc/testsuite/gcc.c-torture/execute/pr57344-1.c
new file mode 100644
index 0000000000..66893269ef
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-1.c
@@ -0,0 +1,32 @@
+/* PR middle-end/57344 */
+
+struct __attribute__((packed)) S
+{
+ int a : 11;
+#if __SIZEOF_INT__ * __CHAR_BIT__ >= 32
+ int b : 22;
+#else
+ int b : 13;
+#endif
+ char c;
+ int : 0;
+} s[2];
+int i;
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ if (x != -3161)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ struct S t = { 0, -3161L };
+ s[1] = t;
+ for (; i < 1; i++)
+ foo (s[1].b);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c
new file mode 100644
index 0000000000..9bf60cab8f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.c
@@ -0,0 +1,32 @@
+/* PR middle-end/57344 */
+
+struct __attribute__((packed)) S
+{
+ int a : 27;
+#if __SIZEOF_INT__ * __CHAR_BIT__ >= 32
+ int b : 22;
+#else
+ int b : 13;
+#endif
+ char c;
+ int : 0;
+} s[2];
+int i;
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ if (x != -3161)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ struct S t = { 0, -3161L };
+ s[1] = t;
+ for (; i < 1; i++)
+ foo (s[1].b);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x
new file mode 100644
index 0000000000..121fcfecc2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-2.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-3.c b/gcc/testsuite/gcc.c-torture/execute/pr57344-3.c
new file mode 100644
index 0000000000..f9daea6d3a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-3.c
@@ -0,0 +1,28 @@
+/* PR middle-end/57344 */
+
+struct __attribute__((packed)) S
+{
+ long long int a : 43;
+ long long int b : 22;
+ char c;
+ long long int : 0;
+} s[2];
+int i;
+
+__attribute__((noinline, noclone)) void
+foo (long long int x)
+{
+ if (x != -3161LL)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ struct S t = { 0, -3161LL };
+ s[1] = t;
+ for (; i < 1; i++)
+ foo (s[1].b);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57344-4.c b/gcc/testsuite/gcc.c-torture/execute/pr57344-4.c
new file mode 100644
index 0000000000..0b2bf15249
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57344-4.c
@@ -0,0 +1,28 @@
+/* PR middle-end/57344 */
+
+struct __attribute__((packed)) S
+{
+ long long int a : 59;
+ long long int b : 54;
+ char c;
+ long long int : 0;
+} s[2];
+int i;
+
+__attribute__((noinline, noclone)) void
+foo (long long int x)
+{
+ if (x != -1220975898975746LL)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ struct S t = { 0, -1220975898975746LL };
+ s[1] = t;
+ for (; i < 1; i++)
+ foo (s[1].b);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57568.c b/gcc/testsuite/gcc.c-torture/execute/pr57568.c
new file mode 100644
index 0000000000..9a7ddb0c56
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57568.c
@@ -0,0 +1,12 @@
+/* PR target/57568 */
+
+extern void abort (void);
+int a[6][9] = { }, b = 1, *c = &a[3][5];
+
+int
+main ()
+{
+ if (b && (*c = *c + *c))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57829.c b/gcc/testsuite/gcc.c-torture/execute/pr57829.c
new file mode 100644
index 0000000000..b5c3d185d0
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57829.c
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/57829 */
+
+__attribute__((noinline, noclone))
+int
+f1 (int k)
+{
+ return 2 | ((k - 1) >> ((int) sizeof (int) * __CHAR_BIT__ - 1));
+}
+
+__attribute__((noinline, noclone))
+long int
+f2 (long int k)
+{
+ return 2L | ((k - 1L) >> ((int) sizeof (long int) * __CHAR_BIT__ - 1));
+}
+
+__attribute__((noinline, noclone))
+int
+f3 (int k)
+{
+ k &= 63;
+ return 4 | ((k + 2) >> 5);
+}
+
+int
+main ()
+{
+ if (f1 (1) != 2 || f2 (1L) != 2L || f3 (63) != 6 || f3 (1) != 4)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57860.c b/gcc/testsuite/gcc.c-torture/execute/pr57860.c
new file mode 100644
index 0000000000..6cef63e707
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57860.c
@@ -0,0 +1,25 @@
+/* PR rtl-optimization/57860 */
+
+extern void abort (void);
+int a, *b = &a, c, d, e, *f = &e, g, *h = &d, k[1] = { 1 };
+
+int
+foo (int p)
+{
+ for (;; g++)
+ {
+ for (; c; c--);
+ *f = *h = p > ((0x1FFFFFFFFLL ^ a) & *b);
+ if (k[g])
+ return 0;
+ }
+}
+
+int
+main ()
+{
+ foo (1);
+ if (d != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57861.c b/gcc/testsuite/gcc.c-torture/execute/pr57861.c
new file mode 100644
index 0000000000..138eb617e5
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57861.c
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/57861 */
+
+extern void abort (void);
+short a = 1, f;
+int b, c, d, *g = &b, h, i, j;
+unsigned int e;
+
+static int
+foo (char p)
+{
+ int k;
+ for (c = 0; c < 2; c++)
+ {
+ i = (j = 0) || p;
+ k = i * p;
+ if (e < k)
+ {
+ short *l = &f;
+ a = d && h;
+ *l = 0;
+ }
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ *g = foo (a);
+ if (a != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57875.c b/gcc/testsuite/gcc.c-torture/execute/pr57875.c
new file mode 100644
index 0000000000..c3ae51b441
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57875.c
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/57875 */
+
+extern void abort (void);
+int a[1], b, c, d, f, i;
+char e[1];
+
+int
+main ()
+{
+ for (; i < 1; i++)
+ if (!d)
+ {
+ if (!c)
+ f = 2;
+ e[0] &= f ^= 0;
+ }
+ b = a[e[0] >> 1 & 1];
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57876.c b/gcc/testsuite/gcc.c-torture/execute/pr57876.c
new file mode 100644
index 0000000000..bcf6912728
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57876.c
@@ -0,0 +1,27 @@
+/* PR rtl-optimization/57876 */
+
+extern void abort (void);
+int a, b = 1, c, *d = &c, f, *g, h, j;
+static int e;
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 2; i++)
+ {
+ long long k = b;
+ int l;
+ for (f = 0; f < 8; f++)
+ {
+ int *m = &e;
+ j = *d;
+ h = a * j - 1;
+ *m = (h == 0) < k;
+ g = &l;
+ }
+ }
+ if (e != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr57877.c b/gcc/testsuite/gcc.c-torture/execute/pr57877.c
new file mode 100644
index 0000000000..2d6ce447a3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr57877.c
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/57877 */
+
+extern void abort (void);
+int a, b, *c = &b, e, f = 6, g, h;
+short d;
+
+static unsigned char
+foo (unsigned long long p1, int *p2)
+{
+ for (; g <= 0; g++)
+ {
+ short *i = &d;
+ int *j = &e;
+ h = *c;
+ *i = h;
+ *j = (*i == *p2) < p1;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ foo (f, &a);
+ if (e != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58209.c b/gcc/testsuite/gcc.c-torture/execute/pr58209.c
new file mode 100644
index 0000000000..78743bfb95
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58209.c
@@ -0,0 +1,32 @@
+/* PR tree-optimization/58209 */
+
+extern void abort (void);
+typedef __INTPTR_TYPE__ T;
+T buf[1024];
+
+T *
+foo (T n)
+{
+ if (n == 0)
+ return (T *) buf;
+ T s = (T) foo (n - 1);
+ return (T *) (s + sizeof (T));
+}
+
+T *
+bar (T n)
+{
+ if (n == 0)
+ return buf;
+ return foo (n - 1) + 1;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 27; i++)
+ if (foo (i) != buf + i || bar (i) != buf + i)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58277-1.c b/gcc/testsuite/gcc.c-torture/execute/pr58277-1.c
new file mode 100644
index 0000000000..811988f437
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58277-1.c
@@ -0,0 +1,102 @@
+/* PR tree-optimization/58277 */
+
+extern void abort (void);
+static int a[2];
+int b, c, d, *e, f, g, h, **i = &e, k, l = 1, n, o, p;
+static int **volatile j = &e;
+const int m;
+char u;
+
+int
+bar ()
+{
+ u = 0;
+ return m;
+}
+
+__attribute__((noinline, noclone)) void
+baz ()
+{
+ asm ("");
+}
+
+static int
+foo ()
+{
+ int t1;
+ g = bar ();
+ if (l)
+ ;
+ else
+ for (;; h++)
+ {
+ *i = 0;
+ o = *e = 0;
+ if (p)
+ {
+ f = 0;
+ return 0;
+ }
+ for (;; k++)
+ {
+ int *t2 = 0;
+ int *const *t3[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, &t2, 0, 0, &t2, &t2, &t2,
+ &t2, &t2, 0, 0, 0, 0, 0, 0, 0, &t2, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, &t2, 0, 0, 0, 0, 0, 0, 0, &t2, &t2,
+ &t2, &t2, &t2, 0, 0, 0, 0, 0, 0, 0, &t2, 0, 0, 0,
+ &t2, 0, 0, 0, &t2, 0, &t2, 0, 0, &t2, 0, 0, 0, 0,
+ 0, &t2, 0, 0, 0, 0, &t2, &t2, 0, 0, 0, 0, &t2, 0,
+ 0, 0, 0, 0, 0, 0, &t2, 0, 0, 0, 0, 0, &t2, 0, 0, 0,
+ &t2, &t2
+ };
+ int *const **t4[] = {&t3[0]};
+ **i = 0;
+ if (**j)
+ break;
+ u = 0;
+ }
+ *i = *j;
+ t1 = 0;
+ for (; t1 < 5; t1++)
+ *i = *j;
+ }
+ *j = 0;
+ return 1;
+}
+
+int
+main ()
+{
+ int t5;
+ a[0] = 1;
+ {
+ int *t6[6] = {&d, &d};
+ for (n = 1; n; n--)
+ if (foo())
+ {
+ int *t7[] = {0};
+ d = 0;
+ for (; u < 1; u++)
+ *i = *j;
+ *i = 0;
+ *i = 0;
+ int t8[5] = {0};
+ *i = &t8[0];
+ int *const *t9 = &t6[0];
+ int *const **t10 = &t9;
+ *t10 = &t7[0];
+ }
+ }
+ u = 0;
+ for (; b; b++)
+ for (t5 = 0; t5 < 10; t5++)
+ c = a[a[a[a[a[a[a[a[c]]]]]]]];
+
+ baz ();
+
+ if (!a[a[a[a[a[a[a[a[a[a[a[a[a[a[a[u]]]]]]]]]]]]]]])
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58277-2.c b/gcc/testsuite/gcc.c-torture/execute/pr58277-2.c
new file mode 100644
index 0000000000..d919c2f3f8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58277-2.c
@@ -0,0 +1,98 @@
+/* PR tree-optimization/58277 */
+
+extern void abort (void);
+static int a[1], b, c, e, i, j, k, m, q[] = { 1, 1 }, t;
+int volatile d;
+int **r;
+static int ***volatile s = &r;
+int f, g, o, x;
+static int *volatile h = &f, *p;
+char n;
+
+static void
+fn1 ()
+{
+ b = a[a[a[a[a[a[a[a[b]]]]]]]];
+ b = a[a[a[a[a[a[a[a[b]]]]]]]];
+ b = a[a[b]];
+ b = a[a[a[a[a[a[a[a[b]]]]]]]];
+ b = a[a[a[a[a[a[a[a[b]]]]]]]];
+}
+
+static int
+fn2 ()
+{
+ n = 0;
+ for (; g; t++)
+ {
+ for (;; m++)
+ {
+ d;
+ int *u;
+ int **v[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, &u, 0, 0, 0, 0, &u, &u, &u, &u, &u, &u, &u, 0,
+ &u, 0, &u, &u, &u, 0, &u, &u, 0, &u, &u, &u, &u, 0, &u, &u, &u,
+ &u, &u, 0, &u, &u, 0, &u, 0, &u, &u, 0, &u, &u, &u, &u, &u, 0,
+ &u, 0, 0, 0, &u, &u, &u, 0, 0, &u, &u, &u, 0, &u, 0, &u, &u
+ };
+ int ***w[] = { &v[0] };
+ if (*p)
+ break;
+ return 0;
+ }
+ *h = 0;
+ }
+ return 1;
+}
+
+static void
+fn3 ()
+{
+ int *y[] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ for (; i; i++)
+ x = 0;
+ if (fn2 ())
+ {
+ int *z[6] = { };
+ for (; n < 1; n++)
+ *h = 0;
+ int t1[7];
+ for (; c; c++)
+ o = t1[0];
+ for (; e; e--)
+ {
+ int **t2 = &y[0];
+ int ***t3 = &t2;
+ *t3 = &z[0];
+ }
+ }
+ *s = 0;
+ for (n = 0;; n = 0)
+ {
+ int t4 = 0;
+ if (q[n])
+ break;
+ *r = &t4;
+ }
+}
+
+int
+main ()
+{
+ for (; j; j--)
+ a[0] = 0;
+ fn3 ();
+ for (; k; k++)
+ fn1 ();
+ fn1 ();
+
+ if (n)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58364.c b/gcc/testsuite/gcc.c-torture/execute/pr58364.c
new file mode 100644
index 0000000000..59ad7b47a1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58364.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/58364 */
+
+int a = 1, b, c;
+
+int
+foo (int x)
+{
+ return x < 0 ? 1 : x;
+}
+
+int
+main ()
+{
+ if (foo (a > c == (b = 0)))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58365.c b/gcc/testsuite/gcc.c-torture/execute/pr58365.c
new file mode 100644
index 0000000000..1e6079d842
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58365.c
@@ -0,0 +1,35 @@
+/* PR rtl-optimization/58365 */
+
+extern void abort (void);
+
+struct S
+{
+ volatile int a;
+ int b, c, d, e;
+} f;
+static struct S g, h;
+int i = 1;
+
+char
+foo (void)
+{
+ return i;
+}
+
+static struct S
+bar (void)
+{
+ if (foo ())
+ return f;
+ return g;
+}
+
+int
+main ()
+{
+ h = bar ();
+ f.b = 1;
+ if (h.b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58385.c b/gcc/testsuite/gcc.c-torture/execute/pr58385.c
new file mode 100644
index 0000000000..8d7da6fc97
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58385.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/58385 */
+
+extern void abort (void);
+
+int a, b = 1;
+
+int
+foo ()
+{
+ b = 0;
+ return 0;
+}
+
+int
+main ()
+{
+ ((0 || a) & foo () >= 0) <= 1 && 1;
+ if (b)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58387.c b/gcc/testsuite/gcc.c-torture/execute/pr58387.c
new file mode 100644
index 0000000000..74c32dfaf1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58387.c
@@ -0,0 +1,11 @@
+extern void abort(void);
+
+int a = -1;
+
+int main ()
+{
+ int b = a == 0 ? 0 : -a;
+ if (b < 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58419.c b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
new file mode 100644
index 0000000000..69cc0401dc
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58419.c
@@ -0,0 +1,36 @@
+int printf(const char *, ...);
+
+int a, g, i, k, *p;
+signed char b;
+char e;
+short c, h;
+static short *d = &c;
+
+char
+foo (int p1, int p2)
+{
+ return p1 - p2;
+}
+
+int
+bar ()
+{
+ short *q = &c;
+ *q = 1;
+ *p = 0;
+ return 0;
+}
+
+int
+main ()
+{
+ for (b = -22; b >= -29; b--)
+ {
+ short *l = &h;
+ char *m = &e;
+ *l = a;
+ g = foo (*m = k && *d, 1 > i) || bar ();
+ }
+ getpid();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58431.c b/gcc/testsuite/gcc.c-torture/execute/pr58431.c
new file mode 100644
index 0000000000..1a992c5fc8
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58431.c
@@ -0,0 +1,33 @@
+char a, h;
+int b, d, e, g, j, k;
+volatile int c;
+short i;
+
+int
+main ()
+{
+ int m;
+
+ m = i ^= 1;
+ for (b = 0; b < 1; b++)
+ {
+ char o = m;
+ g = k;
+ j = j || c;
+ if (a != o)
+ for (; d < 1; d++)
+ ;
+ else
+ {
+ char *p = &h;
+ *p = 1;
+ for (; e; e++)
+ ;
+ }
+ }
+
+ if (h != 0)
+ __builtin_abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58564.c b/gcc/testsuite/gcc.c-torture/execute/pr58564.c
new file mode 100644
index 0000000000..967ee95d4a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58564.c
@@ -0,0 +1,14 @@
+/* PR middle-end/58564 */
+
+extern void abort (void);
+int a, b;
+short *c, **d = &c;
+
+int
+main ()
+{
+ b = (0, 0 > ((&c == d) & (1 && (a ^ 1)))) | 0U;
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58570.c b/gcc/testsuite/gcc.c-torture/execute/pr58570.c
new file mode 100644
index 0000000000..6d5116d9ea
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58570.c
@@ -0,0 +1,22 @@
+#pragma pack(1)
+struct S
+{
+ int f0:15;
+ int f1:29;
+};
+
+int e = 1, i;
+static struct S d[6];
+
+int
+main (void)
+{
+ if (e)
+ {
+ d[i].f0 = 1;
+ d[i].f1 = 1;
+ }
+ if (d[0].f1 != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58570.x b/gcc/testsuite/gcc.c-torture/execute/pr58570.x
new file mode 100644
index 0000000000..121fcfecc2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58570.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58574.c b/gcc/testsuite/gcc.c-torture/execute/pr58574.c
new file mode 100644
index 0000000000..44827eb781
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58574.c
@@ -0,0 +1,219 @@
+/* PR target/58574 */
+
+__attribute__((noinline, noclone)) double
+foo (double x)
+{
+ double t;
+ switch ((int) x)
+ {
+ case 0:
+ t = 2 * x - 1;
+ return 0.70878e-3 + (0.71234e-3 + (0.35779e-5 + (0.17403e-7 + (0.81710e-10 + (0.36885e-12 + 0.15917e-14 * t) * t) * t) * t) * t) * t;
+ case 1:
+ t = 2 * x - 3;
+ return 0.21479e-2 + (0.72686e-3 + (0.36843e-5 + (0.18071e-7 + (0.85496e-10 + (0.38852e-12 + 0.16868e-14 * t) * t) * t) * t) * t) * t;
+ case 2:
+ t = 2 * x - 5;
+ return 0.36165e-2 + (0.74182e-3 + (0.37948e-5 + (0.18771e-7 + (0.89484e-10 + (0.40935e-12 + 0.17872e-14 * t) * t) * t) * t) * t) * t;
+ case 3:
+ t = 2 * x - 7;
+ return 0.51154e-2 + (0.75722e-3 + (0.39096e-5 + (0.19504e-7 + (0.93687e-10 + (0.43143e-12 + 0.18939e-14 * t) * t) * t) * t) * t) * t;
+ case 4:
+ t = 2 * x - 9;
+ return 0.66457e-2 + (0.77310e-3 + (0.40289e-5 + (0.20271e-7 + (0.98117e-10 + (0.45484e-12 + 0.20076e-14 * t) * t) * t) * t) * t) * t;
+ case 5:
+ t = 2 * x - 11;
+ return 0.82082e-2 + (0.78946e-3 + (0.41529e-5 + (0.21074e-7 + (0.10278e-9 + (0.47965e-12 + 0.21285e-14 * t) * t) * t) * t) * t) * t;
+ case 6:
+ t = 2 * x - 13;
+ return 0.98039e-2 + (0.80633e-3 + (0.42819e-5 + (0.21916e-7 + (0.10771e-9 + (0.50595e-12 + 0.22573e-14 * t) * t) * t) * t) * t) * t;
+ case 7:
+ t = 2 * x - 15;
+ return 0.11433e-1 + (0.82372e-3 + (0.44160e-5 + (0.22798e-7 + (0.11291e-9 + (0.53386e-12 + 0.23944e-14 * t) * t) * t) * t) * t) * t;
+ case 8:
+ t = 2 * x - 17;
+ return 0.13099e-1 + (0.84167e-3 + (0.45555e-5 + (0.23723e-7 + (0.11839e-9 + (0.56346e-12 + 0.25403e-14 * t) * t) * t) * t) * t) * t;
+ case 9:
+ t = 2 * x - 19;
+ return 0.14800e-1 + (0.86018e-3 + (0.47008e-5 + (0.24694e-7 + (0.12418e-9 + (0.59486e-12 + 0.26957e-14 * t) * t) * t) * t) * t) * t;
+ case 10:
+ t = 2 * x - 21;
+ return 0.16540e-1 + (0.87928e-3 + (0.48520e-5 + (0.25711e-7 + (0.13030e-9 + (0.62820e-12 + 0.28612e-14 * t) * t) * t) * t) * t) * t;
+ case 11:
+ t = 2 * x - 23;
+ return 0.18318e-1 + (0.89900e-3 + (0.50094e-5 + (0.26779e-7 + (0.13675e-9 + (0.66358e-12 + 0.30375e-14 * t) * t) * t) * t) * t) * t;
+ case 12:
+ t = 2 * x - 25;
+ return 0.20136e-1 + (0.91936e-3 + (0.51734e-5 + (0.27900e-7 + (0.14357e-9 + (0.70114e-12 + 0.32252e-14 * t) * t) * t) * t) * t) * t;
+ case 13:
+ t = 2 * x - 27;
+ return 0.21996e-1 + (0.94040e-3 + (0.53443e-5 + (0.29078e-7 + (0.15078e-9 + (0.74103e-12 + 0.34251e-14 * t) * t) * t) * t) * t) * t;
+ case 14:
+ t = 2 * x - 29;
+ return 0.23898e-1 + (0.96213e-3 + (0.55225e-5 + (0.30314e-7 + (0.15840e-9 + (0.78340e-12 + 0.36381e-14 * t) * t) * t) * t) * t) * t;
+ case 15:
+ t = 2 * x - 31;
+ return 0.25845e-1 + (0.98459e-3 + (0.57082e-5 + (0.31613e-7 + (0.16646e-9 + (0.82840e-12 + 0.38649e-14 * t) * t) * t) * t) * t) * t;
+ case 16:
+ t = 2 * x - 33;
+ return 0.27837e-1 + (0.10078e-2 + (0.59020e-5 + (0.32979e-7 + (0.17498e-9 + (0.87622e-12 + 0.41066e-14 * t) * t) * t) * t) * t) * t;
+ case 17:
+ t = 2 * x - 35;
+ return 0.29877e-1 + (0.10318e-2 + (0.61041e-5 + (0.34414e-7 + (0.18399e-9 + (0.92703e-12 + 0.43639e-14 * t) * t) * t) * t) * t) * t;
+ case 18:
+ t = 2 * x - 37;
+ return 0.31965e-1 + (0.10566e-2 + (0.63151e-5 + (0.35924e-7 + (0.19353e-9 + (0.98102e-12 + 0.46381e-14 * t) * t) * t) * t) * t) * t;
+ case 19:
+ t = 2 * x - 39;
+ return 0.34104e-1 + (0.10823e-2 + (0.65354e-5 + (0.37512e-7 + (0.20362e-9 + (0.10384e-11 + 0.49300e-14 * t) * t) * t) * t) * t) * t;
+ case 20:
+ t = 2 * x - 41;
+ return 0.36295e-1 + (0.11089e-2 + (0.67654e-5 + (0.39184e-7 + (0.21431e-9 + (0.10994e-11 + 0.52409e-14 * t) * t) * t) * t) * t) * t;
+ case 21:
+ t = 2 * x - 43;
+ return 0.38540e-1 + (0.11364e-2 + (0.70058e-5 + (0.40943e-7 + (0.22563e-9 + (0.11642e-11 + 0.55721e-14 * t) * t) * t) * t) * t) * t;
+ case 22:
+ t = 2 * x - 45;
+ return 0.40842e-1 + (0.11650e-2 + (0.72569e-5 + (0.42796e-7 + (0.23761e-9 + (0.12332e-11 + 0.59246e-14 * t) * t) * t) * t) * t) * t;
+ case 23:
+ t = 2 * x - 47;
+ return 0.43201e-1 + (0.11945e-2 + (0.75195e-5 + (0.44747e-7 + (0.25030e-9 + (0.13065e-11 + 0.63000e-14 * t) * t) * t) * t) * t) * t;
+ case 24:
+ t = 2 * x - 49;
+ return 0.45621e-1 + (0.12251e-2 + (0.77941e-5 + (0.46803e-7 + (0.26375e-9 + (0.13845e-11 + 0.66996e-14 * t) * t) * t) * t) * t) * t;
+ case 25:
+ t = 2 * x - 51;
+ return 0.48103e-1 + (0.12569e-2 + (0.80814e-5 + (0.48969e-7 + (0.27801e-9 + (0.14674e-11 + 0.71249e-14 * t) * t) * t) * t) * t) * t;
+ case 26:
+ t = 2 * x - 59;
+ return 0.58702e-1 + (0.13962e-2 + (0.93714e-5 + (0.58882e-7 + (0.34414e-9 + (0.18552e-11 + 0.91160e-14 * t) * t) * t) * t) * t) * t;
+ case 30:
+ t = 2 * x - 79;
+ return 0.90908e-1 + (0.18544e-2 + (0.13903e-4 + (0.95549e-7 + (0.59752e-9 + (0.33656e-11 + 0.16815e-13 * t) * t) * t) * t) * t) * t;
+ case 40:
+ t = 2 * x - 99;
+ return 0.13443e0 + (0.25474e-2 + (0.21385e-4 + (0.15996e-6 + (0.10585e-8 + (0.61258e-11 + 0.30412e-13 * t) * t) * t) * t) * t) * t;
+ case 50:
+ t = 2 * x - 119;
+ return 0.19540e0 + (0.36342e-2 + (0.34096e-4 + (0.27479e-6 + (0.18934e-8 + (0.11021e-10 + 0.52931e-13 * t) * t) * t) * t) * t) * t;
+ case 60:
+ t = 2 * x - 121;
+ return 0.20281e0 + (0.37739e-2 + (0.35791e-4 + (0.29038e-6 + (0.20068e-8 + (0.11673e-10 + 0.55790e-13 * t) * t) * t) * t) * t) * t;
+ case 61:
+ t = 2 * x - 123;
+ return 0.21050e0 + (0.39206e-2 + (0.37582e-4 + (0.30691e-6 + (0.21270e-8 + (0.12361e-10 + 0.58770e-13 * t) * t) * t) * t) * t) * t;
+ case 62:
+ t = 2 * x - 125;
+ return 0.21849e0 + (0.40747e-2 + (0.39476e-4 + (0.32443e-6 + (0.22542e-8 + (0.13084e-10 + 0.61873e-13 * t) * t) * t) * t) * t) * t;
+ case 63:
+ t = 2 * x - 127;
+ return 0.22680e0 + (0.42366e-2 + (0.41477e-4 + (0.34300e-6 + (0.23888e-8 + (0.13846e-10 + 0.65100e-13 * t) * t) * t) * t) * t) * t;
+ case 64:
+ t = 2 * x - 129;
+ return 0.23545e0 + (0.44067e-2 + (0.43594e-4 + (0.36268e-6 + (0.25312e-8 + (0.14647e-10 + 0.68453e-13 * t) * t) * t) * t) * t) * t;
+ case 65:
+ t = 2 * x - 131;
+ return 0.24444e0 + (0.45855e-2 + (0.45832e-4 + (0.38352e-6 + (0.26819e-8 + (0.15489e-10 + 0.71933e-13 * t) * t) * t) * t) * t) * t;
+ case 66:
+ t = 2 * x - 133;
+ return 0.25379e0 + (0.47735e-2 + (0.48199e-4 + (0.40561e-6 + (0.28411e-8 + (0.16374e-10 + 0.75541e-13 * t) * t) * t) * t) * t) * t;
+ case 67:
+ t = 2 * x - 135;
+ return 0.26354e0 + (0.49713e-2 + (0.50702e-4 + (0.42901e-6 + (0.30095e-8 + (0.17303e-10 + 0.79278e-13 * t) * t) * t) * t) * t) * t;
+ case 68:
+ t = 2 * x - 137;
+ return 0.27369e0 + (0.51793e-2 + (0.53350e-4 + (0.45379e-6 + (0.31874e-8 + (0.18277e-10 + 0.83144e-13 * t) * t) * t) * t) * t) * t;
+ case 69:
+ t = 2 * x - 139;
+ return 0.28426e0 + (0.53983e-2 + (0.56150e-4 + (0.48003e-6 + (0.33752e-8 + (0.19299e-10 + 0.87139e-13 * t) * t) * t) * t) * t) * t;
+ case 70:
+ t = 2 * x - 141;
+ return 0.29529e0 + (0.56288e-2 + (0.59113e-4 + (0.50782e-6 + (0.35735e-8 + (0.20369e-10 + 0.91262e-13 * t) * t) * t) * t) * t) * t;
+ case 71:
+ t = 2 * x - 143;
+ return 0.30679e0 + (0.58714e-2 + (0.62248e-4 + (0.53724e-6 + (0.37827e-8 + (0.21490e-10 + 0.95513e-13 * t) * t) * t) * t) * t) * t;
+ case 72:
+ t = 2 * x - 145;
+ return 0.31878e0 + (0.61270e-2 + (0.65564e-4 + (0.56837e-6 + (0.40035e-8 + (0.22662e-10 + 0.99891e-13 * t) * t) * t) * t) * t) * t;
+ case 73:
+ t = 2 * x - 147;
+ return 0.33130e0 + (0.63962e-2 + (0.69072e-4 + (0.60133e-6 + (0.42362e-8 + (0.23888e-10 + 0.10439e-12 * t) * t) * t) * t) * t) * t;
+ case 74:
+ t = 2 * x - 149;
+ return 0.34438e0 + (0.66798e-2 + (0.72783e-4 + (0.63619e-6 + (0.44814e-8 + (0.25168e-10 + 0.10901e-12 * t) * t) * t) * t) * t) * t;
+ case 75:
+ t = 2 * x - 151;
+ return 0.35803e0 + (0.69787e-2 + (0.76710e-4 + (0.67306e-6 + (0.47397e-8 + (0.26505e-10 + 0.11376e-12 * t) * t) * t) * t) * t) * t;
+ case 76:
+ t = 2 * x - 153;
+ return 0.37230e0 + (0.72938e-2 + (0.80864e-4 + (0.71206e-6 + (0.50117e-8 + (0.27899e-10 + 0.11862e-12 * t) * t) * t) * t) * t) * t;
+ case 77:
+ t = 2 * x - 155;
+ return 0.38722e0 + (0.76260e-2 + (0.85259e-4 + (0.75329e-6 + (0.52979e-8 + (0.29352e-10 + 0.12360e-12 * t) * t) * t) * t) * t) * t;
+ case 78:
+ t = 2 * x - 157;
+ return 0.40282e0 + (0.79762e-2 + (0.89909e-4 + (0.79687e-6 + (0.55989e-8 + (0.30866e-10 + 0.12868e-12 * t) * t) * t) * t) * t) * t;
+ case 79:
+ t = 2 * x - 159;
+ return 0.41914e0 + (0.83456e-2 + (0.94827e-4 + (0.84291e-6 + (0.59154e-8 + (0.32441e-10 + 0.13387e-12 * t) * t) * t) * t) * t) * t;
+ case 80:
+ t = 2 * x - 161;
+ return 0.43621e0 + (0.87352e-2 + (0.10002e-3 + (0.89156e-6 + (0.62480e-8 + (0.34079e-10 + 0.13917e-12 * t) * t) * t) * t) * t) * t;
+ case 81:
+ t = 2 * x - 163;
+ return 0.45409e0 + (0.91463e-2 + (0.10553e-3 + (0.94293e-6 + (0.65972e-8 + (0.35782e-10 + 0.14455e-12 * t) * t) * t) * t) * t) * t;
+ case 82:
+ t = 2 * x - 165;
+ return 0.47282e0 + (0.95799e-2 + (0.11135e-3 + (0.99716e-6 + (0.69638e-8 + (0.37549e-10 + 0.15003e-12 * t) * t) * t) * t) * t) * t;
+ case 83:
+ t = 2 * x - 167;
+ return 0.49243e0 + (0.10037e-1 + (0.11750e-3 + (0.10544e-5 + (0.73484e-8 + (0.39383e-10 + 0.15559e-12 * t) * t) * t) * t) * t) * t;
+ case 84:
+ t = 2 * x - 169;
+ return 0.51298e0 + (0.10520e-1 + (0.12400e-3 + (0.11147e-5 + (0.77517e-8 + (0.41283e-10 + 0.16122e-12 * t) * t) * t) * t) * t) * t;
+ case 85:
+ t = 2 * x - 171;
+ return 0.53453e0 + (0.11030e-1 + (0.13088e-3 + (0.11784e-5 + (0.81743e-8 + (0.43252e-10 + 0.16692e-12 * t) * t) * t) * t) * t) * t;
+ case 86:
+ t = 2 * x - 173;
+ return 0.55712e0 + (0.11568e-1 + (0.13815e-3 + (0.12456e-5 + (0.86169e-8 + (0.45290e-10 + 0.17268e-12 * t) * t) * t) * t) * t) * t;
+ case 87:
+ t = 2 * x - 175;
+ return 0.58082e0 + (0.12135e-1 + (0.14584e-3 + (0.13164e-5 + (0.90803e-8 + (0.47397e-10 + 0.17850e-12 * t) * t) * t) * t) * t) * t;
+ case 88:
+ t = 2 * x - 177;
+ return 0.60569e0 + (0.12735e-1 + (0.15396e-3 + (0.13909e-5 + (0.95651e-8 + (0.49574e-10 + 0.18435e-12 * t) * t) * t) * t) * t) * t;
+ case 89:
+ t = 2 * x - 179;
+ return 0.63178e0 + (0.13368e-1 + (0.16254e-3 + (0.14695e-5 + (0.10072e-7 + (0.51822e-10 + 0.19025e-12 * t) * t) * t) * t) * t) * t;
+ case 90:
+ t = 2 * x - 181;
+ return 0.65918e0 + (0.14036e-1 + (0.17160e-3 + (0.15521e-5 + (0.10601e-7 + (0.54140e-10 + 0.19616e-12 * t) * t) * t) * t) * t) * t;
+ case 91:
+ t = 2 * x - 183;
+ return 0.68795e0 + (0.14741e-1 + (0.18117e-3 + (0.16392e-5 + (0.11155e-7 + (0.56530e-10 + 0.20209e-12 * t) * t) * t) * t) * t) * t;
+ case 92:
+ t = 2 * x - 185;
+ return 0.71818e0 + (0.15486e-1 + (0.19128e-3 + (0.17307e-5 + (0.11732e-7 + (0.58991e-10 + 0.20803e-12 * t) * t) * t) * t) * t) * t;
+ case 93:
+ t = 2 * x - 187;
+ return 0.74993e0 + (0.16272e-1 + (0.20195e-3 + (0.18269e-5 + (0.12335e-7 + (0.61523e-10 + 0.21395e-12 * t) * t) * t) * t) * t) * t;
+ }
+ return 1.0;
+}
+
+int
+main ()
+{
+#ifdef __s390x__
+ {
+ register unsigned long r5 __asm ("r5");
+ r5 = 0xdeadbeefUL;
+ asm volatile ("":"+r" (r5));
+ }
+#endif
+ double d = foo (78.4);
+ if (d < 0.38 || d > 0.42)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58640-2.c b/gcc/testsuite/gcc.c-torture/execute/pr58640-2.c
new file mode 100644
index 0000000000..3fc3a55ce2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58640-2.c
@@ -0,0 +1,35 @@
+extern void abort (void);
+
+int a[20], b, c;
+
+int
+fn1 ()
+{
+ int d, e, f, g = 0;
+
+ a[12] = 1;
+ for (e = 0; e < 3; e++)
+ for (d = 0; d < 2; d++)
+ {
+ for (f = 0; f < 2; f++)
+ {
+ g ^= a[12] > 1;
+ if (g)
+ return 0;
+ if (b)
+ break;
+ }
+ for (c = 0; c < 1; c++)
+ a[d] = a[e * 3 + 9];
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ fn1 ();
+ if (a[0] != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58640.c b/gcc/testsuite/gcc.c-torture/execute/pr58640.c
new file mode 100644
index 0000000000..7786b8d0c9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58640.c
@@ -0,0 +1,32 @@
+int a, b, c, d = 1, e;
+
+static signed char
+foo ()
+{
+ int f, g = a;
+
+ for (f = 1; f < 3; f++)
+ for (; b < 1; b++)
+ {
+ if (d)
+ for (c = 0; c < 4; c++)
+ for (f = 0; f < 3; f++)
+ {
+ for (e = 0; e < 1; e++)
+ a = g;
+ if (f)
+ break;
+ }
+ else if (f)
+ continue;
+ return 0;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ foo ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58662.c b/gcc/testsuite/gcc.c-torture/execute/pr58662.c
new file mode 100644
index 0000000000..dc0d5f02ac
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58662.c
@@ -0,0 +1,22 @@
+extern void abort (void);
+
+int a, c, d;
+volatile int b;
+
+static int
+foo (int p1, short p2)
+{
+ return p1 / p2;
+}
+
+int
+main ()
+{
+ char e;
+ d = foo (a == 0, (0, 35536));
+ e = d % 14;
+ b = e && c;
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58726.c b/gcc/testsuite/gcc.c-torture/execute/pr58726.c
new file mode 100644
index 0000000000..9fa8b6953f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58726.c
@@ -0,0 +1,26 @@
+/* PR rtl-optimization/58726 */
+
+int a, c;
+union { int f1; int f2 : 1; } b;
+
+short
+foo (short p)
+{
+ return p < 0 ? p : a;
+}
+
+int
+main ()
+{
+ if (sizeof (short) * __CHAR_BIT__ != 16
+ || sizeof (int) * __CHAR_BIT__ != 32)
+ return 0;
+ b.f1 = 56374;
+ unsigned short d;
+ int e = b.f2;
+ d = e == 0 ? b.f1 : 0;
+ c = foo (d);
+ if (c != (short) 56374)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58831.c b/gcc/testsuite/gcc.c-torture/execute/pr58831.c
new file mode 100644
index 0000000000..a40cd54d22
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58831.c
@@ -0,0 +1,40 @@
+#include <assert.h>
+
+int a, *b, c, d, f, **i, p, q, *r;
+short o, j;
+
+static int __attribute__((noinline, noclone))
+fn1 (int *p1, int **p2)
+{
+ int **e = &b;
+ for (; p; p++)
+ *p1 = 1;
+ *e = *p2 = &d;
+
+ assert (r);
+
+ return c;
+}
+
+static int ** __attribute__((noinline, noclone))
+fn2 (void)
+{
+ for (f = 0; f != 42; f++)
+ {
+ int *g[3] = {0, 0, 0};
+ for (o = 0; o; o--)
+ for (; a > 1;)
+ {
+ int **h[1] = { &g[2] };
+ }
+ }
+ return &r;
+}
+
+int
+main (void)
+{
+ i = fn2 ();
+ fn1 (b, i);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58943.c b/gcc/testsuite/gcc.c-torture/execute/pr58943.c
new file mode 100644
index 0000000000..75e87ae095
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58943.c
@@ -0,0 +1,19 @@
+/* PR c/58943 */
+
+unsigned int x[1] = { 2 };
+
+unsigned int
+foo (void)
+{
+ x[0] |= 128;
+ return 1;
+}
+
+int
+main ()
+{
+ x[0] |= foo ();
+ if (x[0] != 131)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr58984.c b/gcc/testsuite/gcc.c-torture/execute/pr58984.c
new file mode 100644
index 0000000000..e0f7669c78
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr58984.c
@@ -0,0 +1,57 @@
+/* PR tree-optimization/58984 */
+
+struct S { int f0 : 8; int : 6; int f1 : 5; };
+struct T { char f0; int : 6; int f1 : 5; };
+
+int a, *c = &a, e, n, b, m;
+
+static int
+foo (struct S p)
+{
+ const unsigned short *f[36];
+ for (; e < 2; e++)
+ {
+ const unsigned short **i = &f[0];
+ *c ^= 1;
+ if (p.f1)
+ {
+ *i = 0;
+ return b;
+ }
+ }
+ return 0;
+}
+
+static int
+bar (struct T p)
+{
+ const unsigned short *f[36];
+ for (; e < 2; e++)
+ {
+ const unsigned short **i = &f[0];
+ *c ^= 1;
+ if (p.f1)
+ {
+ *i = 0;
+ return b;
+ }
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ struct S o = { 1, 1 };
+ foo (o);
+ m = n || o.f0;
+ if (a != 1)
+ __builtin_abort ();
+ e = 0;
+ struct T p = { 1, 1 };
+ bar (p);
+ m |= n || p.f0;
+ if (a != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c b/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
new file mode 100644
index 0000000000..18da0059ea
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59014-2.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/59014 */
+
+__attribute__((noinline, noclone)) long long int
+foo (long long int x, long long int y)
+{
+ if (((int) x | (int) y) != 0)
+ return 6;
+ return x + y;
+}
+
+int
+main ()
+{
+ if (sizeof (long long) == sizeof (int))
+ return 0;
+ int shift_half = sizeof (int) * __CHAR_BIT__ / 2;
+ long long int x = (3LL << shift_half) << shift_half;
+ long long int y = (5LL << shift_half) << shift_half;
+ long long int z = foo (x, y);
+ if (z != ((8LL << shift_half) << shift_half))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59014.c b/gcc/testsuite/gcc.c-torture/execute/pr59014.c
new file mode 100644
index 0000000000..10bf81a462
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59014.c
@@ -0,0 +1,25 @@
+/* PR tree-optimization/59014 */
+
+int a = 2, b, c, d;
+
+int
+foo ()
+{
+ for (;; c++)
+ if ((b > 0) | (a & 1))
+ ;
+ else
+ {
+ d = a;
+ return 0;
+ }
+}
+
+int
+main ()
+{
+ foo ();
+ if (d != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59101.c b/gcc/testsuite/gcc.c-torture/execute/pr59101.c
new file mode 100644
index 0000000000..ed6a7e8fa3
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59101.c
@@ -0,0 +1,15 @@
+/* PR target/59101 */
+
+__attribute__((noinline, noclone)) int
+foo (int a)
+{
+ return (~a & 4102790424LL) > 0 | 6;
+}
+
+int
+main ()
+{
+ if (foo (0) != 7)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59221.c b/gcc/testsuite/gcc.c-torture/execute/pr59221.c
new file mode 100644
index 0000000000..0cd425948f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59221.c
@@ -0,0 +1,19 @@
+
+
+int a = 1, b, d;
+short e;
+
+int
+main ()
+{
+ for (; b; b++)
+ ;
+ short f = a;
+ int g = 15;
+ e = f ? f : 1 << g;
+ int h = e;
+ d = h == 83647 ? 0 : h;
+ if (d != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59229.c b/gcc/testsuite/gcc.c-torture/execute/pr59229.c
new file mode 100644
index 0000000000..d2a776778d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59229.c
@@ -0,0 +1,29 @@
+int i;
+
+__attribute__((noinline, noclone)) void
+bar (char *p)
+{
+ if (i < 1 || i > 6)
+ __builtin_abort ();
+ if (__builtin_memcmp (p, "abcdefg", i + 1) != 0)
+ __builtin_abort ();
+ __builtin_memset (p, ' ', 7);
+}
+
+__attribute__((noinline, noclone)) void
+foo (char *p, unsigned long l)
+{
+ if (l < 1 || l > 6)
+ return;
+ char buf[7];
+ __builtin_memcpy (buf, p, l + 1);
+ bar (buf);
+}
+
+int
+main ()
+{
+ for (i = 0; i < 16; i++)
+ foo ("abcdefghijklmnop", i);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59358.c b/gcc/testsuite/gcc.c-torture/execute/pr59358.c
new file mode 100644
index 0000000000..674026d625
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59358.c
@@ -0,0 +1,44 @@
+/* PR tree-optimization/59358 */
+
+__attribute__((noinline, noclone)) int
+foo (int *x, int y)
+{
+ int z = *x;
+ if (y > z && y <= 16)
+ while (y > z)
+ z *= 2;
+ return z;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 1; i < 17; i++)
+ {
+ int j = foo (&i, 16);
+ int k;
+ if (i >= 8 && i <= 15)
+ k = 16 + (i - 8) * 2;
+ else if (i >= 4 && i <= 7)
+ k = 16 + (i - 4) * 4;
+ else if (i == 3)
+ k = 24;
+ else
+ k = 16;
+ if (j != k)
+ __builtin_abort ();
+ j = foo (&i, 7);
+ if (i >= 7)
+ k = i;
+ else if (i >= 4)
+ k = 8 + (i - 4) * 2;
+ else if (i == 3)
+ k = 12;
+ else
+ k = 8;
+ if (j != k)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59387.c b/gcc/testsuite/gcc.c-torture/execute/pr59387.c
new file mode 100644
index 0000000000..e226cf1125
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59387.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/59387 */
+
+int a, *d, **e = &d, f;
+char c;
+struct S { int f1; } b;
+
+int
+main ()
+{
+ for (a = -19; a; a++)
+ {
+ for (b.f1 = 0; b.f1 < 24; b.f1++)
+ c--;
+ *e = &f;
+ if (!d)
+ return 0;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59388.c b/gcc/testsuite/gcc.c-torture/execute/pr59388.c
new file mode 100644
index 0000000000..de3648a003
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59388.c
@@ -0,0 +1,11 @@
+/* PR tree-optimization/59388 */
+
+int a;
+struct S { unsigned int f:1; } b;
+
+int
+main ()
+{
+ a = (0 < b.f) | b.f;
+ return a;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59413.c b/gcc/testsuite/gcc.c-torture/execute/pr59413.c
new file mode 100644
index 0000000000..d7a2084ed6
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59413.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/59413 */
+
+typedef unsigned int uint32_t;
+
+uint32_t a;
+int b;
+
+int
+main ()
+{
+ uint32_t c;
+ for (a = 7; a <= 1; a++)
+ {
+ char d = a;
+ c = d;
+ b = a == c;
+ }
+ if (a != 7)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59643.c b/gcc/testsuite/gcc.c-torture/execute/pr59643.c
new file mode 100644
index 0000000000..e3e8a6a38f
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59643.c
@@ -0,0 +1,39 @@
+/* PR tree-optimization/59643 */
+
+#define N 32
+
+__attribute__((noinline, noclone)) void
+foo (double *a, double *b, double *c, double d, double e, int n)
+{
+ int i;
+ for (i = 1; i < n - 1; i++)
+ a[i] = d * (b[i] + c[i] + a[i - 1] + a[i + 1]) + e * a[i];
+}
+
+double expected[] = {
+ 0.0, 10.0, 44.0, 110.0, 232.0, 490.0, 1020.0, 2078.0, 4152.0, 8314.0,
+ 16652.0, 33326.0, 66664.0, 133354.0, 266748.0, 533534.0, 1067064.0,
+ 2134138.0, 4268300.0, 8536622.0, 17073256.0, 34146538.0, 68293116.0,
+ 136586270.0, 273172536.0, 546345082.0, 1092690188.0, 2185380398.0,
+ 4370760808.0, 8741521642.0, 17483043324.0, 6.0
+};
+
+int
+main ()
+{
+ int i;
+ double a[N], b[N], c[N];
+ if (__DBL_MANT_DIG__ <= 35)
+ return 0;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = (i & 3) * 2.0;
+ b[i] = (i & 7) - 4;
+ c[i] = i & 7;
+ }
+ foo (a, b, c, 2.0, 3.0, N);
+ for (i = 0; i < N; i++)
+ if (a[i] != expected[i])
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr59747.c b/gcc/testsuite/gcc.c-torture/execute/pr59747.c
new file mode 100644
index 0000000000..5578f79bc9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr59747.c
@@ -0,0 +1,27 @@
+extern void abort (void);
+extern void exit (int);
+
+int a[6], c = 1, d;
+short e;
+
+int __attribute__ ((noinline))
+fn1 (int p)
+{
+ return a[p];
+}
+
+int
+main ()
+{
+ if (sizeof (long long) != 8)
+ exit (0);
+
+ a[0] = 1;
+ if (c)
+ e--;
+ d = e;
+ long long f = e;
+ if (fn1 ((f >> 56) & 1) != 0)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60003.c b/gcc/testsuite/gcc.c-torture/execute/pr60003.c
new file mode 100644
index 0000000000..94d9cf8869
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60003.c
@@ -0,0 +1,48 @@
+/* PR tree-optimization/60003 */
+
+extern void abort (void);
+
+unsigned long long jmp_buf[5];
+
+__attribute__((noinline, noclone)) void
+baz (void)
+{
+ __builtin_longjmp (&jmp_buf, 1);
+}
+
+void
+bar (void)
+{
+ baz ();
+}
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ int a = 0;
+
+ if (__builtin_setjmp (&jmp_buf) == 0)
+ {
+ while (1)
+ {
+ a = 1;
+ bar (); /* OK if baz () instead */
+ }
+ }
+ else
+ {
+ if (a == 0)
+ return 0;
+ else
+ return x;
+ }
+}
+
+int
+main ()
+{
+ if (foo (1) == 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60017.c b/gcc/testsuite/gcc.c-torture/execute/pr60017.c
new file mode 100644
index 0000000000..d72c12c8a1
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60017.c
@@ -0,0 +1,33 @@
+/* PR target/60017 */
+
+extern void abort (void);
+
+struct S0
+{
+ short m0;
+ short m1;
+};
+
+struct S1
+{
+ unsigned m0:1;
+ char m1[2][2];
+ struct S0 m2[2];
+};
+
+struct S1 x = { 1, {{2, 3}, {4, 5}}, {{6, 7}, {8, 9}} };
+
+struct S1 func (void)
+{
+ return x;
+}
+
+int main (void)
+{
+ struct S1 ret = func ();
+
+ if (ret.m2[1].m1 != 9)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60062.c b/gcc/testsuite/gcc.c-torture/execute/pr60062.c
new file mode 100644
index 0000000000..62973d458a
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60062.c
@@ -0,0 +1,25 @@
+/* PR target/60062 */
+
+int a;
+
+static void
+foo (const char *p1, int p2)
+{
+ if (__builtin_strcmp (p1, "hello") != 0)
+ __builtin_abort ();
+}
+
+static void
+bar (const char *p1)
+{
+ if (__builtin_strcmp (p1, "hello") != 0)
+ __builtin_abort ();
+}
+
+__attribute__((optimize (0))) int
+main ()
+{
+ foo ("hello", a);
+ bar ("hello");
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60072.c b/gcc/testsuite/gcc.c-torture/execute/pr60072.c
new file mode 100644
index 0000000000..566874d635
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60072.c
@@ -0,0 +1,16 @@
+/* PR target/60072 */
+
+int c = 1;
+
+__attribute__ ((optimize (1)))
+static int *foo (int *p)
+{
+ return p;
+}
+
+int
+main ()
+{
+ *foo (&c) = 2;
+ return c - 2;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60454.c b/gcc/testsuite/gcc.c-torture/execute/pr60454.c
new file mode 100644
index 0000000000..ceec45e699
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60454.c
@@ -0,0 +1,31 @@
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ uint32_t;
+#else
+typedef unsigned uint32_t;
+#endif
+
+#define __fake_const_swab32(x) ((uint32_t)( \
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 8) | \
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) ) | \
+ (((uint32_t)(x) & (uint32_t)0xff000000UL) >> 24)))
+
+/* Previous version of bswap optimization would detect byte swap when none
+ happen. This test aims at catching such wrong detection to avoid
+ regressions. */
+
+__attribute__ ((noinline, noclone)) uint32_t
+fake_swap32 (uint32_t in)
+{
+ return __fake_const_swab32 (in);
+}
+
+int main(void)
+{
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (fake_swap32 (0x12345678UL) != 0x78567E12UL)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr60960.c b/gcc/testsuite/gcc.c-torture/execute/pr60960.c
new file mode 100644
index 0000000000..b4f08d4c54
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr60960.c
@@ -0,0 +1,38 @@
+/* PR tree-optimization/60960 */
+
+typedef unsigned char v4qi __attribute__ ((vector_size (4)));
+
+__attribute__((noinline, noclone)) v4qi
+f1 (v4qi v)
+{
+ return v / 2;
+}
+
+__attribute__((noinline, noclone)) v4qi
+f2 (v4qi v)
+{
+ return v / (v4qi) { 2, 2, 2, 2 };
+}
+
+__attribute__((noinline, noclone)) v4qi
+f3 (v4qi x, v4qi y)
+{
+ return x / y;
+}
+
+int
+main ()
+{
+ v4qi x = { 5, 5, 5, 5 };
+ v4qi y = { 2, 2, 2, 2 };
+ v4qi z = f1 (x);
+ if (__builtin_memcmp (&y, &z, sizeof (y)) != 0)
+ __builtin_abort ();
+ z = f2 (x);
+ if (__builtin_memcmp (&y, &z, sizeof (y)) != 0)
+ __builtin_abort ();
+ z = f3 (x, y);
+ if (__builtin_memcmp (&y, &z, sizeof (y)) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c b/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
new file mode 100644
index 0000000000..ebc90a32f9
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61306-1.c
@@ -0,0 +1,39 @@
+#ifdef __INT32_TYPE__
+typedef __INT32_TYPE__ int32_t;
+#else
+typedef int int32_t;
+#endif
+
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ uint32_t;
+#else
+typedef unsigned uint32_t;
+#endif
+
+#define __fake_const_swab32(x) ((uint32_t)( \
+ (((uint32_t)(x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(x) & (uint32_t)0x0000ff00UL) << 8) | \
+ (((uint32_t)(x) & (uint32_t)0x00ff0000UL) >> 8) | \
+ (( (int32_t)(x) & (int32_t)0xff000000UL) >> 24)))
+
+/* Previous version of bswap optimization failed to consider sign extension
+ and as a result would replace an expression *not* doing a bswap by a
+ bswap. */
+
+__attribute__ ((noinline, noclone)) uint32_t
+fake_bswap32 (uint32_t in)
+{
+ return __fake_const_swab32 (in);
+}
+
+int
+main(void)
+{
+ if (sizeof (int32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (fake_bswap32 (0x87654321) != 0xffffff87)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c b/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
new file mode 100644
index 0000000000..886ecfd29d
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61306-2.c
@@ -0,0 +1,40 @@
+#ifdef __INT16_TYPE__
+typedef __INT16_TYPE__ int16_t;
+#else
+typedef short int16_t;
+#endif
+
+#ifdef __UINT32_TYPE__
+typedef __UINT32_TYPE__ uint32_t;
+#else
+typedef unsigned uint32_t;
+#endif
+
+#define __fake_const_swab32(x) ((uint32_t)( \
+ (((uint32_t) (x) & (uint32_t)0x000000ffUL) << 24) | \
+ (((uint32_t)(int16_t)(x) & (uint32_t)0x00ffff00UL) << 8) | \
+ (((uint32_t) (x) & (uint32_t)0x00ff0000UL) >> 8) | \
+ (((uint32_t) (x) & (uint32_t)0xff000000UL) >> 24)))
+
+
+/* Previous version of bswap optimization failed to consider sign extension
+ and as a result would replace an expression *not* doing a bswap by a
+ bswap. */
+
+__attribute__ ((noinline, noclone)) uint32_t
+fake_bswap32 (uint32_t in)
+{
+ return __fake_const_swab32 (in);
+}
+
+int
+main(void)
+{
+ if (sizeof (uint32_t) * __CHAR_BIT__ != 32)
+ return 0;
+ if (sizeof (int16_t) * __CHAR_BIT__ != 16)
+ return 0;
+ if (fake_bswap32 (0x81828384) != 0xff838281)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c b/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
new file mode 100644
index 0000000000..6086e27862
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61306-3.c
@@ -0,0 +1,13 @@
+short a = -1;
+int b;
+char c;
+
+int
+main ()
+{
+ c = a;
+ b = a | c;
+ if (b != -1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61375.c b/gcc/testsuite/gcc.c-torture/execute/pr61375.c
new file mode 100644
index 0000000000..6fb46939ed
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61375.c
@@ -0,0 +1,35 @@
+#ifdef __UINT64_TYPE__
+typedef __UINT64_TYPE__ uint64_t;
+#else
+typedef unsigned long long uint64_t;
+#endif
+
+#ifndef __SIZEOF_INT128__
+#define __int128 long long
+#endif
+
+/* Some version of bswap optimization would ICE when analyzing a mask constant
+ too big for an HOST_WIDE_INT (PR61375). */
+
+__attribute__ ((noinline, noclone)) uint64_t
+uint128_central_bitsi_ior (unsigned __int128 in1, uint64_t in2)
+{
+ __int128 mask = (__int128)0xffff << 56;
+ return ((in1 & mask) >> 56) | in2;
+}
+
+int
+main (int argc)
+{
+ __int128 in = 1;
+#ifdef __SIZEOF_INT128__
+ in <<= 64;
+#endif
+ if (sizeof (uint64_t) * __CHAR_BIT__ != 64)
+ return 0;
+ if (sizeof (unsigned __int128) * __CHAR_BIT__ != 128)
+ return 0;
+ if (uint128_central_bitsi_ior (in, 2) != 0x102)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61673.c b/gcc/testsuite/gcc.c-torture/execute/pr61673.c
new file mode 100644
index 0000000000..b3e243da52
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61673.c
@@ -0,0 +1,50 @@
+/* PR rtl-optimization/61673 */
+
+char e;
+
+__attribute__((noinline, noclone)) void
+bar (char x)
+{
+ if (x != 0x54 && x != (char) 0x87)
+ __builtin_abort ();
+}
+
+__attribute__((noinline, noclone)) void
+foo (const char *x)
+{
+ char d = x[0];
+ int c = d;
+ if ((c >= 0 && c <= 0x7f) == 0)
+ e = d;
+ bar (d);
+}
+
+__attribute__((noinline, noclone)) void
+baz (const char *x)
+{
+ char d = x[0];
+ int c = d;
+ if ((c >= 0 && c <= 0x7f) == 0)
+ e = d;
+}
+
+int
+main ()
+{
+ const char c[] = { 0x54, 0x87 };
+ e = 0x21;
+ foo (c);
+ if (e != 0x21)
+ __builtin_abort ();
+ foo (c + 1);
+ if (e != (char) 0x87)
+ __builtin_abort ();
+ e = 0x21;
+ baz (c);
+ if (e != 0x21)
+ __builtin_abort ();
+ baz (c + 1);
+ if (e != (char) 0x87)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr61725.c b/gcc/testsuite/gcc.c-torture/execute/pr61725.c
new file mode 100644
index 0000000000..0aa6dafa21
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr61725.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/61725 */
+
+int
+main ()
+{
+ int x;
+ for (x = -128; x <= 128; x++)
+ {
+ int a = __builtin_ffs (x);
+ if (x == 0 && a != 0)
+ __builtin_abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr63209.c b/gcc/testsuite/gcc.c-torture/execute/pr63209.c
new file mode 100644
index 0000000000..9bcb587456
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr63209.c
@@ -0,0 +1,27 @@
+static int Sub(int a, int b) {
+ return b -a;
+}
+
+static unsigned Select(unsigned a, unsigned b, unsigned c) {
+ const int pa_minus_pb =
+ Sub((a >> 8) & 0xff, (b >> 8) & 0xff) +
+ Sub((a >> 0) & 0xff, (b >> 0) & 0xff);
+ return (pa_minus_pb <= 0) ? a : b;
+}
+
+__attribute__((noinline)) unsigned Predictor(unsigned left, const unsigned* const top) {
+ const unsigned pred = Select(top[1], left, top[0]);
+ return pred;
+}
+
+int main(void) {
+ const unsigned top[2] = {0xff7a7a7a, 0xff7a7a7a};
+ const unsigned left = 0xff7b7b7b;
+ const unsigned pred = Predictor(left, top /*+ 1*/);
+ if (pred == left)
+ return 0;
+ return 1;
+}
+
+
+
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr63302.c b/gcc/testsuite/gcc.c-torture/execute/pr63302.c
new file mode 100644
index 0000000000..99670241bb
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/pr63302.c
@@ -0,0 +1,60 @@
+/* PR tree-optimization/63302 */
+
+#ifdef __SIZEOF_INT128__
+#if __SIZEOF_INT128__ * __CHAR_BIT__ == 128
+#define USE_INT128
+#endif
+#endif
+#if __SIZEOF_LONG_LONG__ * __CHAR_BIT__ == 64
+#define USE_LLONG
+#endif
+
+#ifdef USE_INT128
+__attribute__((noinline, noclone)) int
+foo (__int128 x)
+{
+ __int128 v = x & (((__int128) -1 << 63) | 0x7ff);
+
+ return v == 0 || v == ((__int128) -1 << 63);
+}
+#endif
+
+#ifdef USE_LLONG
+__attribute__((noinline, noclone)) int
+bar (long long x)
+{
+ long long v = x & (((long long) -1 << 31) | 0x7ff);
+
+ return v == 0 || v == ((long long) -1 << 31);
+}
+#endif
+
+int
+main ()
+{
+#ifdef USE_INT128
+ if (foo (0) != 1
+ || foo (1) != 0
+ || foo (0x800) != 1
+ || foo (0x801) != 0
+ || foo ((__int128) 1 << 63) != 0
+ || foo ((__int128) -1 << 63) != 1
+ || foo (((__int128) -1 << 63) | 1) != 0
+ || foo (((__int128) -1 << 63) | 0x800) != 1
+ || foo (((__int128) -1 << 63) | 0x801) != 0)
+ __builtin_abort ();
+#endif
+#ifdef USE_LLONG
+ if (bar (0) != 1
+ || bar (1) != 0
+ || bar (0x800) != 1
+ || bar (0x801) != 0
+ || bar (1LL << 31) != 0
+ || bar (-1LL << 31) != 1
+ || bar ((-1LL << 31) | 1) != 0
+ || bar ((-1LL << 31) | 0x800) != 1
+ || bar ((-1LL << 31) | 0x801) != 0)
+ __builtin_abort ();
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c b/gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c
deleted file mode 100644
index 8967d43940..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-compare-1.c
+++ /dev/null
@@ -1,123 +0,0 @@
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-#define check_compare(count, res, i0, i1, op, fmt) \
-do { \
- int __i; \
- for (__i = 0; __i < count; __i ++) { \
- if ((res)[__i] != ((i0)[__i] op (i1)[__i] ? -1 : 0)) \
- { \
- __builtin_printf ("%i != ((" fmt " " #op " " fmt " ? -1 : 0) ", \
- (res)[__i], (i0)[__i], (i1)[__i]); \
- __builtin_abort (); \
- } \
- } \
-} while (0)
-
-#define test(count, v0, v1, res, fmt); \
-do { \
- res = (v0 > v1); \
- check_compare (count, res, v0, v1, >, fmt); \
- res = (v0 < v1); \
- check_compare (count, res, v0, v1, <, fmt); \
- res = (v0 >= v1); \
- check_compare (count, res, v0, v1, >=, fmt); \
- res = (v0 <= v1); \
- check_compare (count, res, v0, v1, <=, fmt); \
- res = (v0 == v1); \
- check_compare (count, res, v0, v1, ==, fmt); \
- res = (v0 != v1); \
- check_compare (count, res, v0, v1, !=, fmt); \
-} while (0)
-
-
-int main (int argc, char *argv[]) {
-#define INT int
- vector (4, INT) i0;
- vector (4, INT) i1;
- vector (4, int) ires;
- int i;
-
- i0 = (vector (4, INT)){argc, 1, 2, 10};
- i1 = (vector (4, INT)){0, 3, 2, (INT)-23};
- test (4, i0, i1, ires, "%i");
-#undef INT
-
-#define INT unsigned int
- vector (4, int) ures;
- vector (4, INT) u0;
- vector (4, INT) u1;
-
- u0 = (vector (4, INT)){argc, 1, 2, 10};
- u1 = (vector (4, INT)){0, 3, 2, (INT)-23};
- test (4, u0, u1, ures, "%u");
-#undef INT
-
-
-#define SHORT short
- vector (8, SHORT) s0;
- vector (8, SHORT) s1;
- vector (8, short) sres;
-
- s0 = (vector (8, SHORT)){argc, 1, 2, 10, 6, 87, (SHORT)-5, 2};
- s1 = (vector (8, SHORT)){0, 3, 2, (SHORT)-23, 12, 10, (SHORT)-2, 0};
- test (8, s0, s1, sres, "%i");
-#undef SHORT
-
-#define SHORT unsigned short
- vector (8, SHORT) us0;
- vector (8, SHORT) us1;
- vector (8, short) usres;
-
- us0 = (vector (8, SHORT)){argc, 1, 2, 10, 6, 87, (SHORT)-5, 2};
- us1 = (vector (8, SHORT)){0, 3, 2, (SHORT)-23, 12, 10, (SHORT)-2, 0};
- test (8, us0, us1, usres, "%u");
-#undef SHORT
-
-#define CHAR signed char
- vector (16, CHAR) c0;
- vector (16, CHAR) c1;
- vector (16, signed char) cres;
-
- c0 = (vector (16, CHAR)){argc, 1, 2, 10, 6, 87, (CHAR)-5, 2, \
- argc, 1, 2, 10, 6, 87, (CHAR)-5, 2 };
-
- c1 = (vector (16, CHAR)){0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0, \
- 0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0};
- test (16, c0, c1, cres, "%i");
-#undef CHAR
-
-#define CHAR unsigned char
- vector (16, CHAR) uc0;
- vector (16, CHAR) uc1;
- vector (16, signed char) ucres;
-
- uc0 = (vector (16, CHAR)){argc, 1, 2, 10, 6, 87, (CHAR)-5, 2, \
- argc, 1, 2, 10, 6, 87, (CHAR)-5, 2 };
-
- uc1 = (vector (16, CHAR)){0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0, \
- 0, 3, 2, (CHAR)-23, 12, 10, (CHAR)-2, 0};
- test (16, uc0, uc1, ucres, "%u");
-#undef CHAR
-/* Float comparison. */
- vector (4, float) f0;
- vector (4, float) f1;
- __typeof (f0 == f1) ifres;
-
- f0 = (vector (4, float)){(float)argc, 1., 2., 10.};
- f1 = (vector (4, float)){0., 3., 2., (float)-23};
- test (4, f0, f1, ifres, "%f");
-
-/* Double comparison. */
- vector (2, double) d0;
- vector (2, double) d1;
- __typeof (d0 == d1) idres;
-
- d0 = (vector (2, double)){(double)argc, 10.};
- d1 = (vector (2, double)){0., (double)-23};
- test (2, d0, d1, idres, "%f");
-
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c b/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c
deleted file mode 100644
index 398c8254a4..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-compare-2.c
+++ /dev/null
@@ -1,27 +0,0 @@
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-/* Check that constant folding in
- these simple cases works. */
-vector (4, int)
-foo (vector (4, int) x)
-{
- return (x == x) + (x != x) + (x > x)
- + (x < x) + (x >= x) + (x <= x);
-}
-
-int
-main (int argc, char *argv[])
-{
- vector (4, int) t = {argc, 2, argc, 42};
- vector (4, int) r;
- int i;
-
- r = foo (t);
-
- for (i = 0; i < 4; i++)
- if (r[i] != -3)
- __builtin_abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-shift.c b/gcc/testsuite/gcc.c-torture/execute/vector-shift.c
deleted file mode 100644
index f52eb58a1b..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-shift.c
+++ /dev/null
@@ -1,48 +0,0 @@
-
-#define vector __attribute__((vector_size(sizeof(int)*4) ))
-
-static vector int allones = {1, 1, 1, 1};
-static vector int allzeros = {0, 0, 0, 0};
-static vector int numbers = {0, 1, 2, 3};
-static vector int numbersleftshiftallones = {0, 2, 4, 6};
-static vector int numbersrightshiftallones = {0, 0, 1, 1};
-
-
-static vector unsigned int uallones = {1, 1, 1, 1};
-static vector unsigned int uallzeros = {0, 0, 0, 0};
-static vector unsigned int unumbers = {0, 1, 2, 3};
-static vector unsigned int unumbersleftshiftallones = {0, 2, 4, 6};
-static vector unsigned int unumbersrightshiftallones = {0, 0, 1, 1};
-
-#define TEST(result, expected) \
-do { \
- typeof(result) result1 = result; \
- if(sizeof (result1) != sizeof (expected)) \
- __builtin_abort (); \
- if (__builtin_memcmp (&result1, &expected, sizeof(result1)) != 0) \
- __builtin_abort (); \
-}while (0);
-
-int main(void)
-{
- vector int result;
- TEST ((numbers << allzeros), numbers);
- TEST ((numbers >> allzeros), numbers);
- TEST((numbers << allones), numbersleftshiftallones);
- TEST((numbers >> allones), numbersrightshiftallones);
- /* Test left shift followed by a right shift, numbers should be back as
- numbers are all small numbers and no lose of precision happens. */
- TEST((numbers << allones) >> allones, numbers);
-
-
-
- TEST ((unumbers << uallzeros), unumbers);
- TEST ((unumbers >> uallzeros), unumbers);
- TEST((unumbers << uallones), unumbersleftshiftallones);
- TEST((unumbers >> uallones), unumbersrightshiftallones);
- /* Test left shift followed by a right shift, numbers should be back as
- numbers are all small numbers and no lose of precision happens. */
- TEST((unumbers << uallones) >> uallones, unumbers);
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-shift1.c b/gcc/testsuite/gcc.c-torture/execute/vector-shift1.c
deleted file mode 100644
index 6041fc3b07..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-shift1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-#define vector __attribute__((vector_size(8*sizeof(short))))
-
-int main (int argc, char *argv[]) {
- vector short v0 = {argc,2,3,4,5,6,7};
- vector short v1 = {2,2,2,2,2,2,2};
- vector short r1,r2,r3,r4;
- int i = 8;
-
- r1 = v0 << 1;
- r2 = v0 >> 1;
-
- r3 = v0 << v1;
- r4 = v0 >> v1;
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-shift2.c b/gcc/testsuite/gcc.c-torture/execute/vector-shift2.c
deleted file mode 100644
index 55f1035552..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-shift2.c
+++ /dev/null
@@ -1,59 +0,0 @@
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
-#define uint unsigned int
-
-int main (int argc, char *argv[]) {
- vector(4, uint) vuint = { 1, 2, 3, 4};
- vector(4, int) vint0 = { 1, 1, 1, 1};
- vector(4, int) vint1 = {-1, -1, -1, -1};
-
- vector(4, int) i1, i2, i3;
- vector(4, uint) u1, u2, u3;
-
- i1 = vint1<< vint0;
-
- if (vidx(int, i1, 0) != ((int)-1 << (int)1))
- __builtin_abort ();
- if (vidx(int, i1, 1) != ((int)-1 << (int)1))
- __builtin_abort ();
- if (vidx(int, i1, 2) != ((int)-1 << (int)1))
- __builtin_abort ();
- if (vidx(int, i1, 3) != ((int)-1 << (int)1))
- __builtin_abort ();
-
- u1 = vuint << vint0;
-
- if (vidx(int, u1, 0) != ((uint)1 << (int)1))
- __builtin_abort ();
- if (vidx(int, u1, 1) != ((uint)2 << (int)1))
- __builtin_abort ();
- if (vidx(int, u1, 2) != ((uint)3 << (int)1))
- __builtin_abort ();
- if (vidx(int, u1, 3) != ((uint)4 << (int)1))
- __builtin_abort ();
-
-
- i2 = vint1 >> vuint;
-
- if (vidx(int, i2, 0) != ((int)-1 >> (uint)1))
- __builtin_abort ();
- if (vidx(int, i2, 1) != ((int)-1 >> (uint)2))
- __builtin_abort ();
- if (vidx(int, i2, 2) != ((int)-1 >> (uint)3))
- __builtin_abort ();
- if (vidx(int, i2, 3) != ((int)-1 >> (uint)4))
- __builtin_abort ();
-
-
- vint1 >>= vuint;
-
- vuint <<= vint0;
- vuint <<= vint1;
-
-
- return 0;
-}
-
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c b/gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c
deleted file mode 100644
index 8ad8d45485..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-1.c
+++ /dev/null
@@ -1,60 +0,0 @@
-/* dg-do run */
-#define vector __attribute__((vector_size(sizeof(int)*4) ))
-
-/* Check to make sure that we extract and insert the vector at the same
- location for vector subscripting and that vectors layout are the same
- as arrays. */
-
-struct TV4
-{
- vector int v;
-};
-
-typedef struct TV4 MYV4;
-static inline int *f(MYV4 *a, int i)
-{
- return &(a->v[i]);
-}
-
-static inline MYV4 myfunc2( int x, int y, int z, int w )
-{
- MYV4 temp;
- *f(&temp, 0 ) = x;
- *f(&temp, 1 ) = y;
- *f(&temp, 2 ) = z;
- *f(&temp, 3 ) = w;
- return temp;
-}
-
-MYV4 val3;
-
-__attribute__((noinline)) void modify (void)
-{
- val3 = myfunc2( 1, 2, 3, 4 );
-}
-
-int main( int argc, char* argv[] )
-{
- int a[4];
- int i;
-
- modify();
-
- if (*f(&val3, 0 ) != 1)
- __builtin_abort ();
- if (*f(&val3, 1 ) != 2)
- __builtin_abort ();
- if (*f(&val3, 2 ) != 3)
- __builtin_abort ();
- if (*f(&val3, 3 ) != 4)
- __builtin_abort ();
-
- __builtin_memcpy (a, &val3, sizeof(a));
- for(i = 0; i < 4; i++)
- if (a[i] != i+1)
- __builtin_abort ();
-
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c b/gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c
deleted file mode 100644
index d0e5b889c6..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-2.c
+++ /dev/null
@@ -1,67 +0,0 @@
-#define vector __attribute__((vector_size(sizeof(int)*4) ))
-
-/* Check to make sure that we extract and insert the vector at the same
- location for vector subscripting (with constant indexes) and
- that vectors layout are the same as arrays. */
-
-struct TV4
-{
- vector int v;
-};
-
-typedef struct TV4 MYV4;
-
-static inline MYV4 myfunc2( int x, int y, int z, int w )
-{
- MYV4 temp;
- temp.v[0] = x;
- temp.v[1] = y;
- temp.v[2] = z;
- temp.v[3] = w;
- return temp;
-}
-MYV4 val3;
-__attribute__((noinline)) void modify (void)
-{
- val3 = myfunc2( 1, 2, 3, 4 );
-}
-int main( int argc, char* argv[] )
-{
- int a[4];
- int i;
-
- /* Set up the vector. */
- modify();
-
- /* Check the vector via the global variable. */
- if (val3.v[0] != 1)
- __builtin_abort ();
- if (val3.v[1] != 2)
- __builtin_abort ();
- if (val3.v[2] != 3)
- __builtin_abort ();
- if (val3.v[3] != 4)
- __builtin_abort ();
-
- vector int a1 = val3.v;
-
- /* Check the vector via a local variable. */
- if (a1[0] != 1)
- __builtin_abort ();
- if (a1[1] != 2)
- __builtin_abort ();
- if (a1[2] != 3)
- __builtin_abort ();
- if (a1[3] != 4)
- __builtin_abort ();
-
- __builtin_memcpy(a, &val3, sizeof(a));
- /* Check the vector via copying it to an array. */
- for(i = 0; i < 4; i++)
- if (a[i] != i+1)
- __builtin_abort ();
-
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c b/gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c
deleted file mode 100644
index 97d531c173..0000000000
--- a/gcc/testsuite/gcc.c-torture/execute/vector-subscript-3.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/* dg-do run */
-#define vector __attribute__((vector_size(16) ))
-
-/* Check whether register declaration of vector type still
- allow us to subscript this type. */
-
-typedef vector short myvec_t;
-
-struct vec_s {
- vector short member;
-};
-
-
-int main () {
- register short vector v0 = {1,2,3,4,5,6,7};
- register myvec_t v1 = {1,2,3,4,5,6,7};
- register struct vec_s v2;
-
- v2.member = v1;
-
- short r = v0[0] + v1[1] + v2.member[2];
- if (r != 6)
- __builtin_abort ();
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x
new file mode 100644
index 0000000000..cee203d27b
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/execute/zerolen-2.x
@@ -0,0 +1,7 @@
+if [istarget "epiphany-*-*"] {
+ # This test assumes the absence of larger-than-word padding.
+ # to make this true for struct foo on epiphany would require
+ # __attribute__((packed,aligned(__alignof__(word)))) .
+ return 1
+}
+return 0
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/DFcmp.x b/gcc/testsuite/gcc.c-torture/unsorted/DFcmp.x
new file mode 100644
index 0000000000..121fcfecc2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/unsorted/DFcmp.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/SFset.x b/gcc/testsuite/gcc.c-torture/unsorted/SFset.x
new file mode 100644
index 0000000000..121fcfecc2
--- /dev/null
+++ b/gcc/testsuite/gcc.c-torture/unsorted/SFset.x
@@ -0,0 +1,7 @@
+load_lib target-supports.exp
+
+if { [check_effective_target_int16] } {
+ return 1
+}
+
+return 0;
diff --git a/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp b/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp
index def4bc5afb..f9b7e8d8d1 100644
--- a/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp
+++ b/gcc/testsuite/gcc.c-torture/unsorted/unsorted.exp
@@ -1,6 +1,6 @@
#
# Expect driver script for GCC Regression Tests
-# Copyright (C) 1993, 1997, 2007, 2008 Free Software Foundation
+# Copyright (C) 1993-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/20011021-1.c b/gcc/testsuite/gcc.dg/20011021-1.c
index dc998c8af6..8893b774aa 100644
--- a/gcc/testsuite/gcc.dg/20011021-1.c
+++ b/gcc/testsuite/gcc.dg/20011021-1.c
@@ -8,7 +8,7 @@
struct t
{
int a;
- int b;
+ int b; /* { dg-message "note: 'b' declared here" } */
int c;
};
@@ -28,7 +28,7 @@ struct multilevel
};
struct t T0 = { 1 }; /* { dg-warning "missing init" } */
-/* { dg-warning "near init" "near init" { target *-*-* } 30 } */
+
struct t T1 = { .a = 1 }; /* { dg-bogus "(missing|near) init" } */
union u U0 = { 1 }; /* { dg-warning "initialization of union" } */
@@ -42,4 +42,4 @@ struct multilevel M =
{ .n = 9 }, /* { dg-bogus "initialization of union" } */
/* "string here" */
}; /* { dg-warning "missing init" } */
-/* { dg-warning "near init" "near init" { target *-*-* } 44 } */
+/* { dg-message "declared here" "near init" { target *-*-* } 27 } */
diff --git a/gcc/testsuite/gcc.dg/20020108-1.c b/gcc/testsuite/gcc.dg/20020108-1.c
index 579a228529..89ffcaa12b 100644
--- a/gcc/testsuite/gcc.dg/20020108-1.c
+++ b/gcc/testsuite/gcc.dg/20020108-1.c
@@ -1,7 +1,7 @@
/* This testcase failed on i686 because (const_int -1) was changed into
(const_int 0xffff) when storing it into SImode pseudo, but was not
converted back to (const_int -1) when returning from store_expr,
- eventhough target was (subreg:HI (reg/v:SI indx)). But (const_int 0xffff)
+ even though target was (subreg:HI (reg/v:SI indx)). But (const_int 0xffff)
is not valid general_operand in HImode. */
/* { dg-do compile } */
/* { dg-options "-O2" } */
diff --git a/gcc/testsuite/gcc.dg/20020219-1.c b/gcc/testsuite/gcc.dg/20020219-1.c
index ffdf19a43c..d2ba755f50 100644
--- a/gcc/testsuite/gcc.dg/20020219-1.c
+++ b/gcc/testsuite/gcc.dg/20020219-1.c
@@ -13,6 +13,7 @@
/* { dg-do run } */
/* { dg-options "-O2" } */
/* { dg-options "-O2 -mdisable-indexing" { target hppa*-*-hpux* } } */
+/* { dg-skip-if "" { aarch64*-*-* && ilp32 } { "*" } { "" } } */
/* { dg-skip-if "" { "ia64-*-hpux*" } "*" "-mlp64" } */
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && x32 } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.dg/20020220-2.c b/gcc/testsuite/gcc.dg/20020220-2.c
index c6c57a9213..95606703cc 100644
--- a/gcc/testsuite/gcc.dg/20020220-2.c
+++ b/gcc/testsuite/gcc.dg/20020220-2.c
@@ -1,5 +1,5 @@
/* PR c/4697
- Test whether value computed not used warning is given for compound
+ Test whether operand has no effect warning is given for compound
expression. */
/* { dg-do compile } */
/* { dg-options "-O2 -Wunused" } */
@@ -7,6 +7,6 @@
int b;
int foo (int a)
{
- a = a + 1, 5 * b; /* { dg-warning "value computed is not used" } */
+ a = a + 1, 5 * b; /* { dg-warning "right-hand operand of comma expression has no effect" } */
return a;
}
diff --git a/gcc/testsuite/gcc.dg/20020312-2.c b/gcc/testsuite/gcc.dg/20020312-2.c
index 768e17e64c..63fbfcc5c4 100644
--- a/gcc/testsuite/gcc.dg/20020312-2.c
+++ b/gcc/testsuite/gcc.dg/20020312-2.c
@@ -42,6 +42,8 @@ extern void abort (void);
/* No pic register. */
#elif defined(__mcore__)
/* No pic register. */
+#elif defined(__MICROBLAZE__)
+# define PIC_REG "r20"
#elif defined(__mips__)
/* PIC register is $28, but is used even without -fpic. */
#elif defined(__MMIX__)
@@ -50,6 +52,10 @@ extern void abort (void);
/* No pic register. */
#elif defined(__moxie__)
/* No pic register. */
+#elif defined(__nds32__)
+/* No pic register. */
+#elif defined(__nios2__)
+/* No pic register. */
#elif defined(__hppa__)
/* PIC register is %r27 or %r19, but is used even without -fpic. */
#elif defined(__pdp11__)
@@ -92,6 +98,12 @@ extern void abort (void);
# else
# define PIC_REG "gr17"
#endif
+#elif defined (__aarch64__)
+/* No pic register -- yet. */
+#elif defined(__RL78__)
+/* No pic register. */
+#elif defined(__MSP430__)
+/* No pic register. */
#else
# error "Modify the test for your target."
#endif
diff --git a/gcc/testsuite/gcc.dg/20040813-1.c b/gcc/testsuite/gcc.dg/20040813-1.c
index e16344164d..8be831d96b 100644
--- a/gcc/testsuite/gcc.dg/20040813-1.c
+++ b/gcc/testsuite/gcc.dg/20040813-1.c
@@ -2,7 +2,7 @@
/* Contributed by Devang Patel <dpatel@apple.com> */
/* { dg-do compile } */
-/* { dg-skip-if "No stabs" { mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* *-*-vxworks* } { "*" } { "" } } */
+/* { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* *-*-aix* alpha*-*-* hppa*64*-*-* ia64-*-* tile*-*-* nios2-*-* *-*-vxworks* } { "*" } { "" } } */
/* { dg-options "-gstabs" } */
int
diff --git a/gcc/testsuite/gcc.dg/20041106-1.c b/gcc/testsuite/gcc.dg/20041106-1.c
index f83e835ed1..cba4a06f11 100644
--- a/gcc/testsuite/gcc.dg/20041106-1.c
+++ b/gcc/testsuite/gcc.dg/20041106-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target *-*-linux* *-*-solaris* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-solaris* } } */
/* { dg-options -O2 } */
#include <sys/types.h>
@@ -21,7 +21,7 @@ int main ()
struct S *s;
ptr = malloc (3*ps);
- page = (char *)(((size_t)ptr + (ps - 1)) & -ps);
+ page = (char *)(((__UINTPTR_TYPE__)ptr + (ps - 1)) & -ps);
munmap (page + ps, ps);
s = (struct S *)(page + ps - sizeof(struct S));
diff --git a/gcc/testsuite/gcc.dg/20050503-1.c b/gcc/testsuite/gcc.dg/20050503-1.c
index 200494fa75..f85129a95c 100644
--- a/gcc/testsuite/gcc.dg/20050503-1.c
+++ b/gcc/testsuite/gcc.dg/20050503-1.c
@@ -47,4 +47,4 @@ F3 (14b, int, strncmp, const char *, const char *, size_t, (a1, "abcdefghijklm",
F2 (15, char *, strchr, const char *, int, (a1, a2))
/* All the calls above should be tail call optimized on i?86/x86-64. */
-/* { dg-final { scan-assembler-not "call" { target i?86-*-linux* x86_64-*-linux* } } } */
+/* { dg-final { scan-assembler-not "call" { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } } */
diff --git a/gcc/testsuite/gcc.dg/20050811-1.c b/gcc/testsuite/gcc.dg/20050811-1.c
index a9f860bb8b..010aa5a09e 100644
--- a/gcc/testsuite/gcc.dg/20050811-1.c
+++ b/gcc/testsuite/gcc.dg/20050811-1.c
@@ -1,6 +1,6 @@
-/* Test whether -dv -fdump-rtl-all doesn't crash. */
+/* Test whether -fdump-rtl-all-graph doesn't crash. */
/* { dg-do compile } */
-/* { dg-options "-O2 -dv -fdump-rtl-all" } */
+/* { dg-options "-O2 -fdump-rtl-all-graph" } */
int foo (void)
{
diff --git a/gcc/testsuite/gcc.dg/20050811-2.c b/gcc/testsuite/gcc.dg/20050811-2.c
index ffd1f39049..afee9b0afd 100644
--- a/gcc/testsuite/gcc.dg/20050811-2.c
+++ b/gcc/testsuite/gcc.dg/20050811-2.c
@@ -1,6 +1,6 @@
-/* Test whether -dov doesn't crash. */
+/* Test whether graph dumping doesn't crash. */
/* { dg-do compile } */
-/* { dg-options "-O2 -dv -fdump-rtl-postreload" } */
+/* { dg-options "-O2 -fdump-rtl-postreload-graph" } */
int foo (void)
{
@@ -17,4 +17,4 @@ int bar (int x)
return foo ();
}
-// { dg-final { cleanup-rtl-dump "postreload*" } }
+/* { dg-final { cleanup-rtl-dump "postreload*" } } */
diff --git a/gcc/testsuite/gcc.dg/20050922-1.c b/gcc/testsuite/gcc.dg/20050922-1.c
index ed5a3c63e9..982f82011b 100644
--- a/gcc/testsuite/gcc.dg/20050922-1.c
+++ b/gcc/testsuite/gcc.dg/20050922-1.c
@@ -4,7 +4,7 @@
/* { dg-do run } */
/* { dg-options "-O1 -std=c99" } */
-#include <stdlib.h>
+extern void abort (void);
#if __INT_MAX__ == 2147483647
typedef unsigned int uint32_t;
diff --git a/gcc/testsuite/gcc.dg/20050922-2.c b/gcc/testsuite/gcc.dg/20050922-2.c
index c2974d03d9..2e8db829e2 100644
--- a/gcc/testsuite/gcc.dg/20050922-2.c
+++ b/gcc/testsuite/gcc.dg/20050922-2.c
@@ -4,7 +4,8 @@
/* { dg-do run } */
/* { dg-options "-O1 -std=c99" } */
-#include <stdlib.h>
+extern void abort (void);
+extern void exit (int);
#if __INT_MAX__ == 2147483647
typedef unsigned int uint32_t;
diff --git a/gcc/testsuite/gcc.dg/20081223-1.c b/gcc/testsuite/gcc.dg/20081223-1.c
index 6bfbd17556..e5184e044e 100644
--- a/gcc/testsuite/gcc.dg/20081223-1.c
+++ b/gcc/testsuite/gcc.dg/20081223-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-flto" { target lto } } */
+/* { dg-options "-flto -ffat-lto-objects" { target lto } } */
typedef struct foo_ foo_t;
foo_t bar; /* { dg-error "storage size of 'bar' isn't known" } */
diff --git a/gcc/testsuite/gcc.dg/54455.c b/gcc/testsuite/gcc.dg/54455.c
index de68a53e23..281c8620a5 100644
--- a/gcc/testsuite/gcc.dg/54455.c
+++ b/gcc/testsuite/gcc.dg/54455.c
@@ -1,6 +1,7 @@
/* PR rtl-optimization/54455 */
/* { dg-do compile } */
/* { dg-options "-O1 -fschedule-insns -fselective-scheduling --param max-sched-extend-regions-iters=2" } */
+/* { dg-require-effective-target scheduling } */
extern void fn1 (void), fn2 (void);
diff --git a/gcc/testsuite/gcc.dg/README b/gcc/testsuite/gcc.dg/README
index 3a3d8ef611..98c78f7094 100644
--- a/gcc/testsuite/gcc.dg/README
+++ b/gcc/testsuite/gcc.dg/README
@@ -16,7 +16,7 @@ Notes for testsuite/gcc.dg.
4) Send bugs, comments, etc. to dje@cygnus.com.
-Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+Copyright (C) 1997-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-10.c b/gcc/testsuite/gcc.dg/Warray-bounds-10.c
new file mode 100644
index 0000000000..5fd6e6f1a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-10.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Warray-bounds" } */
+
+int f(unsigned len, int buflen)
+{
+ unsigned taillen;
+ unsigned slen;
+ unsigned i;
+ int b[17]; /* needed <= 17 to trigger Warning */
+ int j = 0; /* needed to trigger Warning */
+
+ b[0] = 0;
+ taillen= buflen & 7; /* taillen [0..7] */
+
+ if(taillen) { /* taillen [1..7] */
+ slen= 8 - taillen; /* slen [7..1] */
+ if (len<slen) /* needed to trigger Warning */
+ slen=len; /* slen' < slen */
+ for(i=0; i<slen; i++) {
+ j = b[taillen]; /* taillen + slen = [1..7] + [7..1] = 8 */
+ taillen++;
+ }
+ }
+ return j;
+}
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-3.c b/gcc/testsuite/gcc.dg/Warray-bounds-3.c
index 19cdb8e5fe..773f4633dc 100644
--- a/gcc/testsuite/gcc.dg/Warray-bounds-3.c
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-3.c
@@ -34,31 +34,31 @@ bar (struct S *time)
iov[1].iov_base = (void *) "def";
iov[1].iov_len = 3;
- for (cnt = 0; cnt <= 7; ++cnt)
+ for (cnt = 0; cnt < 7; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->abday[cnt] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 14; ++cnt)
+ for (; cnt < 14; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->day[cnt - 7] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 26; ++cnt)
+ for (; cnt < 26; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->abmon[cnt - 14] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 38; ++cnt)
+ for (; cnt < 38; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->mon[cnt - 26] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
}
- for (; cnt <= 40; ++cnt)
+ for (; cnt < 40; ++cnt)
{
iov[2 + cnt].iov_base = (void *) (time->am_pm[cnt - 38] ?: "");
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
diff --git a/gcc/testsuite/gcc.dg/Warray-bounds-9.c b/gcc/testsuite/gcc.dg/Warray-bounds-9.c
new file mode 100644
index 0000000000..92bcd4e5ce
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Warray-bounds-9.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Warray-bounds" } */
+
+int a[8];
+
+void
+test(unsigned int n)
+{
+ unsigned int i;
+ unsigned int j;
+ if (n<8)
+ for (j=0;j<n;j++)
+ {
+ i = j;
+ do
+ a[i+1]=a[i];
+ while (i--);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/Wconversion-real-integer.c b/gcc/testsuite/gcc.dg/Wconversion-real-integer.c
index c61ea70c78..896702546a 100644
--- a/gcc/testsuite/gcc.dg/Wconversion-real-integer.c
+++ b/gcc/testsuite/gcc.dg/Wconversion-real-integer.c
@@ -1,7 +1,7 @@
/* Test for diagnostics for Wconversion between floating-point and
integers. */
-/* { dg-do compile }
+/* { dg-do compile } */
/* { dg-skip-if "doubles are floats,ints are 16bits" { "avr-*-*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -Wconversion" } */
/* { dg-require-effective-target int32plus } */
diff --git a/gcc/testsuite/gcc.dg/Wcxx-compat-8.c b/gcc/testsuite/gcc.dg/Wcxx-compat-8.c
index 7dad7a48dd..f7e8c55791 100644
--- a/gcc/testsuite/gcc.dg/Wcxx-compat-8.c
+++ b/gcc/testsuite/gcc.dg/Wcxx-compat-8.c
@@ -63,3 +63,5 @@ f5 ()
{
return &((struct t8) { }); /* { dg-warning "invalid in C\[+\]\[+\]" } */
}
+
+/* { dg-error "invalid use of undefined type" "" { target *-*-* } 64 } */
diff --git a/gcc/testsuite/gcc.dg/Wreturn-local-addr.c b/gcc/testsuite/gcc.dg/Wreturn-local-addr.c
new file mode 100644
index 0000000000..d496d205e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wreturn-local-addr.c
@@ -0,0 +1,9 @@
+/* { dg-do assemble } */
+/* { dg-options "-Werror=return-local-addr" } */
+/* { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 } */
+
+int* bad()
+{
+ int x = 0;
+ return &x; /* { dg-error "address of local variable" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wshadow-4.c b/gcc/testsuite/gcc.dg/Wshadow-4.c
new file mode 100644
index 0000000000..f3b986fa60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wshadow-4.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-Wshadow -Wsystem-headers" } */
+
+#include "Wshadow-4.h"
+extern void index2 (void); /* { dg-message "declaration is here" } */
+
+void foo (double index1,
+ double index2)
+{
+}
+
+void foo1 (void)
+{
+ double index1;
+ double index2;
+}
+
+void foo2 (void)
+{
+ {
+ double index1;
+ double index2;
+ }
+}
+
+void foo3 (void)
+{
+ void (*index1)(void); /* { dg-warning "shadows" } */
+ void (*index2)(void); /* { dg-warning "shadows" } */
+}
+
+void foo4 (void)
+{
+ void index1(void) {}; /* { dg-warning "shadows" } */
+ void index2(void) {}; /* { dg-warning "shadows" } */
+}
+
+/* { dg-message "declaration is here" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.dg/Wshadow-4.h b/gcc/testsuite/gcc.dg/Wshadow-4.h
new file mode 100644
index 0000000000..5a44ca452c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wshadow-4.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+extern void index1 (void);
+
diff --git a/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c b/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c
new file mode 100644
index 0000000000..b683be7cef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wsizeof-pointer-memaccess1.c
@@ -0,0 +1,456 @@
+/* Test -Wsizeof-pointer-memaccess warnings. */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void bzero (void *, size_t);
+extern void bcopy (void *, const void *, size_t);
+extern int bcmp (const void *, const void *, size_t);
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+int
+f1 (void *x, int z)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ bzero (&a, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bzero (pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pa2, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pa4, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ bcopy (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bcopy (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ bcopy (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ bcopy (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pa4, x, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += bcmp (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += bcmp (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += bcmp (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += bcmp (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ bzero (&a, sizeof a);
+ bzero (&a, sizeof (a));
+ bzero (&a, sizeof (struct A));
+ bzero (&a, sizeof (const struct A));
+ bzero (&a, sizeof (volatile struct A));
+ bzero (&a, sizeof (volatile const struct A));
+ bzero (&a, sizeof (TA));
+ bzero (&a, sizeof (__typeof (*&a)));
+ bzero (pa1, sizeof (*pa1));
+ bzero (pa2, sizeof (*pa3));
+ bzero (pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bzero ((void *) &a, sizeof (&a));
+ bzero ((char *) &a, sizeof (&a));
+ bzero (&a, sizeof (&a) + 0);
+ bzero (&a, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ bcopy (x, &a, sizeof a);
+ bcopy (x, &a, sizeof (a));
+ bcopy (x, &a, sizeof (struct A));
+ bcopy (x, &a, sizeof (const struct A));
+ bcopy (x, &a, sizeof (volatile struct A));
+ bcopy (x, &a, sizeof (volatile const struct A));
+ bcopy (x, &a, sizeof (TA));
+ bcopy (x, &a, sizeof (__typeof (*&a)));
+ bcopy (x, pa1, sizeof (*pa1));
+ bcopy (x, pa2, sizeof (*pa3));
+ bcopy (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy (x, (void *) &a, sizeof (&a));
+ bcopy (x, (char *) &a, sizeof (&a));
+ bcopy (x, &a, sizeof (&a) + 0);
+ bcopy (x, &a, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ bcopy (&a, x, sizeof a);
+ bcopy (&a, x, sizeof (a));
+ bcopy (&a, x, sizeof (struct A));
+ bcopy (&a, x, sizeof (const struct A));
+ bcopy (&a, x, sizeof (volatile struct A));
+ bcopy (&a, x, sizeof (volatile const struct A));
+ bcopy (&a, x, sizeof (TA));
+ bcopy (&a, x, sizeof (__typeof (*&a)));
+ bcopy (pa1, x, sizeof (*pa1));
+ bcopy (pa2, x, sizeof (*pa3));
+ bcopy (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy ((void *) &a, x, sizeof (&a));
+ bcopy ((char *) &a, x, sizeof (&a));
+ bcopy (&a, x, sizeof (&a) + 0);
+ bcopy (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ z += bcmp (&a, x, sizeof a);
+ z += bcmp (&a, x, sizeof (a));
+ z += bcmp (&a, x, sizeof (struct A));
+ z += bcmp (&a, x, sizeof (const struct A));
+ z += bcmp (&a, x, sizeof (volatile struct A));
+ z += bcmp (&a, x, sizeof (volatile const struct A));
+ z += bcmp (&a, x, sizeof (TA));
+ z += bcmp (&a, x, sizeof (__typeof (*&a)));
+ z += bcmp (pa1, x, sizeof (*pa1));
+ z += bcmp (pa2, x, sizeof (*pa3));
+ z += bcmp (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp ((void *) &a, x, sizeof (&a));
+ z += bcmp ((char *) &a, x, sizeof (&a));
+ z += bcmp (&a, x, sizeof (&a) + 0);
+ z += bcmp (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ z += bcmp (x, &a, sizeof a);
+ z += bcmp (x, &a, sizeof (a));
+ z += bcmp (x, &a, sizeof (struct A));
+ z += bcmp (x, &a, sizeof (const struct A));
+ z += bcmp (x, &a, sizeof (volatile struct A));
+ z += bcmp (x, &a, sizeof (volatile const struct A));
+ z += bcmp (x, &a, sizeof (TA));
+ z += bcmp (x, &a, sizeof (__typeof (*&a)));
+ z += bcmp (x, pa1, sizeof (*pa1));
+ z += bcmp (x, pa2, sizeof (*pa3));
+ z += bcmp (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp (x, (void *) &a, sizeof (&a));
+ z += bcmp (x, (char *) &a, sizeof (&a));
+ z += bcmp (x, &a, sizeof (&a) + 0);
+ z += bcmp (x, &a, 0 + sizeof (&a));
+
+ return z;
+}
+
+int
+f2 (void *x, int z)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ bzero (&b, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bzero (pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pb2, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pb4, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bzero (pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bzero (pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ bcopy (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bcopy (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ bcopy (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (x, pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ bcopy (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ bcopy (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ bcopy (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ bcopy (pb4, x, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += bcmp (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += bcmp (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += bcmp (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += bcmp (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += bcmp (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += bcmp (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += bcmp (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ bzero (&b, sizeof b);
+ bzero (&b, sizeof (b));
+ bzero (&b, sizeof (struct B));
+ bzero (&b, sizeof (const struct B));
+ bzero (&b, sizeof (volatile struct B));
+ bzero (&b, sizeof (volatile const struct B));
+ bzero (&b, sizeof (TB));
+ bzero (&b, sizeof (__typeof (*&b)));
+ bzero (pb1, sizeof (*pb1));
+ bzero (pb2, sizeof (*pb3));
+ bzero (pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bzero ((void *) &b, sizeof (&b));
+ bzero ((char *) &b, sizeof (&b));
+ bzero (&b, sizeof (&b) + 0);
+ bzero (&b, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ bcopy (x, &b, sizeof b);
+ bcopy (x, &b, sizeof (b));
+ bcopy (x, &b, sizeof (struct B));
+ bcopy (x, &b, sizeof (const struct B));
+ bcopy (x, &b, sizeof (volatile struct B));
+ bcopy (x, &b, sizeof (volatile const struct B));
+ bcopy (x, &b, sizeof (TB));
+ bcopy (x, &b, sizeof (__typeof (*&b)));
+ bcopy (x, pb1, sizeof (*pb1));
+ bcopy (x, pb2, sizeof (*pb3));
+ bcopy (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy (x, (void *) &b, sizeof (&b));
+ bcopy (x, (char *) &b, sizeof (&b));
+ bcopy (x, &b, sizeof (&b) + 0);
+ bcopy (x, &b, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ bcopy (&b, x, sizeof b);
+ bcopy (&b, x, sizeof (b));
+ bcopy (&b, x, sizeof (struct B));
+ bcopy (&b, x, sizeof (const struct B));
+ bcopy (&b, x, sizeof (volatile struct B));
+ bcopy (&b, x, sizeof (volatile const struct B));
+ bcopy (&b, x, sizeof (TB));
+ bcopy (&b, x, sizeof (__typeof (*&b)));
+ bcopy (pb1, x, sizeof (*pb1));
+ bcopy (pb2, x, sizeof (*pb3));
+ bcopy (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy ((void *) &b, x, sizeof (&b));
+ bcopy ((char *) &b, x, sizeof (&b));
+ bcopy (&b, x, sizeof (&b) + 0);
+ bcopy (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ z += bcmp (&b, x, sizeof b);
+ z += bcmp (&b, x, sizeof (b));
+ z += bcmp (&b, x, sizeof (struct B));
+ z += bcmp (&b, x, sizeof (const struct B));
+ z += bcmp (&b, x, sizeof (volatile struct B));
+ z += bcmp (&b, x, sizeof (volatile const struct B));
+ z += bcmp (&b, x, sizeof (TB));
+ z += bcmp (&b, x, sizeof (__typeof (*&b)));
+ z += bcmp (pb1, x, sizeof (*pb1));
+ z += bcmp (pb2, x, sizeof (*pb3));
+ z += bcmp (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp ((void *) &b, x, sizeof (&b));
+ z += bcmp ((char *) &b, x, sizeof (&b));
+ z += bcmp (&b, x, sizeof (&b) + 0);
+ z += bcmp (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ z += bcmp (x, &b, sizeof b);
+ z += bcmp (x, &b, sizeof (b));
+ z += bcmp (x, &b, sizeof (struct B));
+ z += bcmp (x, &b, sizeof (const struct B));
+ z += bcmp (x, &b, sizeof (volatile struct B));
+ z += bcmp (x, &b, sizeof (volatile const struct B));
+ z += bcmp (x, &b, sizeof (TB));
+ z += bcmp (x, &b, sizeof (__typeof (*&b)));
+ z += bcmp (x, pb1, sizeof (*pb1));
+ z += bcmp (x, pb2, sizeof (*pb3));
+ z += bcmp (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp (x, (void *) &b, sizeof (&b));
+ z += bcmp (x, (char *) &b, sizeof (&b));
+ z += bcmp (x, &b, sizeof (&b) + 0);
+ z += bcmp (x, &b, 0 + sizeof (&b));
+
+ return z;
+}
+
+int
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ char *y3;
+ bzero (y, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bzero (y1, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bzero (y2, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bzero (&c, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bzero (w, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ bcopy (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bcopy (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bcopy (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ bcopy (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ bcopy (x, w, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ bcopy (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ bcopy (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ bcopy (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ bcopy (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ bcopy (w, x, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ z += bcmp (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += bcmp (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += bcmp (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += bcmp (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += bcmp (w, x, sizeof w); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+
+ z += bcmp (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += bcmp (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += bcmp (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += bcmp (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += bcmp (x, w, sizeof w); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+
+ /* These are correct, no warning. */
+ bzero (y, sizeof (*y));
+ bzero (y1, sizeof (*y2));
+ bzero (buf1, sizeof buf1);
+ bzero (buf3, sizeof (buf3));
+ bzero (&buf3[0], sizeof (buf3));
+ bzero (&buf4[0], sizeof (buf4));
+ bzero (w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ bzero ((void *) y, sizeof (y));
+ bzero ((char *) y1, sizeof (y2));
+ bzero (y, sizeof (y) + 0);
+ bzero (y1, 0 + sizeof (y2));
+ bzero ((void *) &c, sizeof (&c));
+ bzero ((signed char *) &c, sizeof (&c));
+ bzero (&c, sizeof (&c) + 0);
+ bzero (&c, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ bcopy (x, y, sizeof (*y));
+ bcopy (x, y1, sizeof (*y2));
+ bcopy (x, buf1, sizeof buf1);
+ bcopy (x, buf3, sizeof (buf3));
+ bcopy (x, &buf3[0], sizeof (buf3));
+ bcopy (x, &buf4[0], sizeof (buf4));
+ bcopy (y, &y3, sizeof (y3));
+ bcopy (y, (char *) &y3, sizeof (y3));
+ bcopy (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy (x, (void *) y, sizeof (y));
+ bcopy (x, (char *) y1, sizeof (y2));
+ bcopy (x, y, sizeof (y) + 0);
+ bcopy (x, y1, 0 + sizeof (y2));
+ bcopy (x, (void *) &c, sizeof (&c));
+ bcopy (x, (signed char *) &c, sizeof (&c));
+ bcopy (x, &c, sizeof (&c) + 0);
+ bcopy (x, &c, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ bcopy (y, x, sizeof (*y));
+ bcopy (y1, x, sizeof (*y2));
+ bcopy (buf1, x, sizeof buf1);
+ bcopy (buf3, x, sizeof (buf3));
+ bcopy (&buf3[0], x, sizeof (buf3));
+ bcopy (&buf4[0], x, sizeof (buf4));
+ bcopy (&y3, y, sizeof (y3));
+ bcopy ((char *) &y3, y, sizeof (y3));
+ bcopy (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ bcopy ((void *) y, x, sizeof (y));
+ bcopy ((char *) y1, x, sizeof (y2));
+ bcopy (y, x, sizeof (y) + 0);
+ bcopy (y1, x, 0 + sizeof (y2));
+ bcopy ((void *) &c, x, sizeof (&c));
+ bcopy ((signed char *) &c, x, sizeof (&c));
+ bcopy (&c, x, sizeof (&c) + 0);
+ bcopy (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ z += bcmp (y, x, sizeof (*y));
+ z += bcmp (y1, x, sizeof (*y2));
+ z += bcmp (buf1, x, sizeof buf1);
+ z += bcmp (buf3, x, sizeof (buf3));
+ z += bcmp (&buf3[0], x, sizeof (buf3));
+ z += bcmp (&buf4[0], x, sizeof (buf4));
+ z += bcmp (&y3, y, sizeof (y3));
+ z += bcmp ((char *) &y3, y, sizeof (y3));
+ z += bcmp (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp ((void *) y, x, sizeof (y));
+ z += bcmp ((char *) y1, x, sizeof (y2));
+ z += bcmp (y, x, sizeof (y) + 0);
+ z += bcmp (y1, x, 0 + sizeof (y2));
+ z += bcmp ((void *) &c, x, sizeof (&c));
+ z += bcmp ((signed char *) &c, x, sizeof (&c));
+ z += bcmp (&c, x, sizeof (&c) + 0);
+ z += bcmp (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ z += bcmp (x, y, sizeof (*y));
+ z += bcmp (x, y1, sizeof (*y2));
+ z += bcmp (x, buf1, sizeof buf1);
+ z += bcmp (x, buf3, sizeof (buf3));
+ z += bcmp (x, &buf3[0], sizeof (buf3));
+ z += bcmp (x, &buf4[0], sizeof (buf4));
+ z += bcmp (y, &y3, sizeof (y3));
+ z += bcmp (y, (char *) &y3, sizeof (y3));
+ z += bcmp (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += bcmp (x, (void *) y, sizeof (y));
+ z += bcmp (x, (char *) y1, sizeof (y2));
+ z += bcmp (x, y, sizeof (y) + 0);
+ z += bcmp (x, y1, 0 + sizeof (y2));
+ z += bcmp (x, (void *) &c, sizeof (&c));
+ z += bcmp (x, (signed char *) &c, sizeof (&c));
+ z += bcmp (x, &c, sizeof (&c) + 0);
+ z += bcmp (x, &c, 0 + sizeof (&c));
+
+ return z;
+}
diff --git a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
index 42b393580a..b1bee33c38 100644
--- a/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
+++ b/gcc/testsuite/gcc.dg/Wstrict-aliasing-bogus-ref-all-2.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -Wall" } */
/* { dg-options "-O2 -Wall -mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
+/* { dg-options "-O2 -Wall -msse2" { target { i?86-*-* x86_64-*-* } } } */
typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
diff --git a/gcc/testsuite/gcc.dg/Wstrict-aliasing-converted-assigned.c b/gcc/testsuite/gcc.dg/Wstrict-aliasing-converted-assigned.c
index f633878929..06a8a376b8 100644
--- a/gcc/testsuite/gcc.dg/Wstrict-aliasing-converted-assigned.c
+++ b/gcc/testsuite/gcc.dg/Wstrict-aliasing-converted-assigned.c
@@ -11,6 +11,5 @@ int foo()
/* These messages are only expected for lp64, but fail there. When they
pass for lp64, replace "xfail *-*-*" with "target lp64". */
-
/* { dg-message "does break strict-aliasing" "break" { xfail *-*-* } 8 } */
/* { dg-message "initialized" "init" { xfail *-*-* } 8 } */
diff --git a/gcc/testsuite/gcc.dg/Wstrict-overflow-24.c b/gcc/testsuite/gcc.dg/Wstrict-overflow-24.c
new file mode 100644
index 0000000000..05e8dd1448
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wstrict-overflow-24.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fstrict-overflow -O2" } */
+/* { dg-message "warnings being treated as errors" "" {target "*-*-*"} 0 } */
+#pragma GCC diagnostic error "-Wstrict-overflow"
+
+int
+foo (int i)
+{
+ return __builtin_abs (i) >= 0; /* { dg-error "assuming signed overflow does not occur" "correct warning" } */
+}
diff --git a/gcc/testsuite/gcc.dg/Wunused-local-typedefs.c b/gcc/testsuite/gcc.dg/Wunused-local-typedefs.c
new file mode 100644
index 0000000000..4c8c15ed20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/Wunused-local-typedefs.c
@@ -0,0 +1,36 @@
+/* Origin PR c/53702
+ { dg-options "-Wunused-local-typedefs" }
+ { dg-do compile }
+*/
+
+/* Only test nested functions for C. More tests that work for C and C++
+ can be found in c-c++-common.
+*/
+
+void
+test0 ()
+{
+ typedef int foo; /* { dg-warning "locally defined but not used" } */
+ void f ()
+ {
+ }
+}
+
+void
+test1 ()
+{
+ void f ()
+ {
+ typedef int foo; /* { dg-warning "locally defined but not used" } */
+ }
+}
+
+
+void
+test2 ()
+{
+ void f ()
+ {
+ }
+ typedef int foo; /* { dg-warning "locally defined but not used" } */
+}
diff --git a/gcc/testsuite/gcc.dg/array-10.c b/gcc/testsuite/gcc.dg/array-10.c
index 3b4d512ba5..44457d12c0 100644
--- a/gcc/testsuite/gcc.dg/array-10.c
+++ b/gcc/testsuite/gcc.dg/array-10.c
@@ -13,12 +13,12 @@ struct b3 { int x[a]; }; /* { dg-error "17:at file scope" } */
struct b4 { int (*x)[a]; }; /* { dg-error "19:at file scope" } */
typeof (int [a]) b5; /* { dg-error "at file scope|outside of any function" } */
-int c0[(__SIZE_TYPE__)&a]; /* { dg-error "5:at file scope" } */
-int (*c1)[(__SIZE_TYPE__)&a]; /* { dg-error "7:at file scope" } */
-int (*c2())[(__SIZE_TYPE__)&a]; /* { dg-error "7:at file scope" } */
-struct c3 { int x[(__SIZE_TYPE__)&a]; }; /* { dg-error "17:at file scope" } */
-struct c4 { int (*x)[(__SIZE_TYPE__)&a]; }; /* { dg-error "19:at file scope" } */
-typeof (int [(__SIZE_TYPE__)&a]) c5; /* { dg-error "34:at file scope" } */
+int c0[(__UINTPTR_TYPE__)&a]; /* { dg-error "5:at file scope" } */
+int (*c1)[(__UINTPTR_TYPE__)&a]; /* { dg-error "7:at file scope" } */
+int (*c2())[(__UINTPTR_TYPE__)&a]; /* { dg-error "7:at file scope" } */
+struct c3 { int x[(__UINTPTR_TYPE__)&a]; }; /* { dg-error "17:at file scope" } */
+struct c4 { int (*x)[(__UINTPTR_TYPE__)&a]; }; /* { dg-error "19:at file scope" } */
+typeof (int [(__UINTPTR_TYPE__)&a]) c5; /* { dg-error "37:at file scope" } */
int d0[1/0]; /* { dg-error "5:at file scope" } */
/* { dg-warning "9:division by zero" "" { target *-*-* } 23 } */
diff --git a/gcc/testsuite/gcc.dg/asan/asan.exp b/gcc/testsuite/gcc.dg/asan/asan.exp
new file mode 100644
index 0000000000..9be07fca14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/asan.exp
@@ -0,0 +1,40 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib asan-dg.exp
+
+if ![check_effective_target_faddress_sanitizer] {
+ return
+}
+
+# Initialize `dg'.
+dg-init
+if [asan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/asan/*.c]] ""
+
+}
+
+# All done.
+asan_finish
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/asan/nosanitize-and-inline.c b/gcc/testsuite/gcc.dg/asan/nosanitize-and-inline.c
new file mode 100644
index 0000000000..5853801621
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/nosanitize-and-inline.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+
+/* This is a simplified version of what Emacs does internally,
+ when marking its stack. */
+
+static unsigned long sum;
+static void *stack_base;
+
+/* A simple substitute for what Emacs actually does. */
+static void
+mark_maybe_pointer (void *p)
+{
+ sum ^= (unsigned long) p;
+}
+
+static inline void __attribute__ ((no_sanitize_address))
+mark_memory (void **start, void **end)
+{
+ void **pp;
+
+ if (end < start)
+ {
+ void **tem = start;
+ start = end;
+ end = tem;
+ }
+
+ for (pp = start; pp < end; pp++)
+ {
+ /* This is the dereference that we don't want sanitized. */
+ void *p = *pp;
+
+ mark_maybe_pointer (p);
+ }
+}
+
+static void
+mark_stack (void)
+{
+ void *end;
+ mark_memory (stack_base, &end);
+}
+
+void
+garbage_collect (void)
+{
+ mark_stack ();
+}
+
+int
+main (void)
+{
+ void *dummy;
+ stack_base = &dummy;
+ garbage_collect ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/asan/pr56417.c b/gcc/testsuite/gcc.dg/asan/pr56417.c
new file mode 100644
index 0000000000..b7eabf125a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/asan/pr56417.c
@@ -0,0 +1,9 @@
+/* PR sanitizer/56417 */
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+int
+foo (void)
+{
+ return __builtin_strlen (&foo);
+}
diff --git a/gcc/testsuite/gcc.dg/assign-warn-1.c b/gcc/testsuite/gcc.dg/assign-warn-1.c
index ae70242edd..f26a5447ea 100644
--- a/gcc/testsuite/gcc.dg/assign-warn-1.c
+++ b/gcc/testsuite/gcc.dg/assign-warn-1.c
@@ -1,7 +1,7 @@
/* Test diagnostics for bad implicit type conversions. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "-pedantic" } */
+/* { dg-options "-pedantic -ftrack-macro-expansion=0" } */
#define TESTARG(ID, TL, TR) void ID##F(TL); void ID##F2(TR x) { ID##F(x); } extern int dummy
#define TESTARP(ID, TL, TR) struct { void (*x)(TL); } ID##Fp; void ID##F2(TR x) { ID##Fp.x(x); } extern int dummy
diff --git a/gcc/testsuite/gcc.dg/assign-warn-2.c b/gcc/testsuite/gcc.dg/assign-warn-2.c
index 7813b72869..1e5eb1ca6e 100644
--- a/gcc/testsuite/gcc.dg/assign-warn-2.c
+++ b/gcc/testsuite/gcc.dg/assign-warn-2.c
@@ -2,7 +2,7 @@
-pedantic-errors test. */
/* Origin: Joseph Myers <jsm@polyomino.org.uk> */
/* { dg-do compile } */
-/* { dg-options "-pedantic-errors" } */
+/* { dg-options "-pedantic-errors -ftrack-macro-expansion=0" } */
#define TESTARG(ID, TL, TR) void ID##F(TL); void ID##F2(TR x) { ID##F(x); } extern int dummy
#define TESTARP(ID, TL, TR) struct { void (*x)(TL); } ID##Fp; void ID##F2(TR x) { ID##Fp.x(x); } extern int dummy
diff --git a/gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c b/gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c
index 2ac54e8088..4b999c682f 100644
--- a/gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c
+++ b/gcc/testsuite/gcc.dg/atomic-compare-exchange-1.c
@@ -16,6 +16,7 @@ char zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c b/gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c
index 73b2597774..736e358a6d 100644
--- a/gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-compare-exchange-2.c
@@ -16,6 +16,7 @@ short zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c b/gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c
index 26097288c9..91a67cd742 100644
--- a/gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c
+++ b/gcc/testsuite/gcc.dg/atomic-compare-exchange-3.c
@@ -16,6 +16,7 @@ int zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c b/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
index b6c783ddab..ac9531b782 100644
--- a/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
+++ b/gcc/testsuite/gcc.dg/atomic-compare-exchange-4.c
@@ -18,6 +18,7 @@ long long zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c b/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
index 4cc0209b33..f5d071affe 100644
--- a/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
+++ b/gcc/testsuite/gcc.dg/atomic-compare-exchange-5.c
@@ -17,6 +17,7 @@ __int128_t zero = 0;
#define STRONG 0
#define WEAK 1
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-exchange-1.c b/gcc/testsuite/gcc.dg/atomic-exchange-1.c
index fb78cdbca5..ec8a09c8cc 100644
--- a/gcc/testsuite/gcc.dg/atomic-exchange-1.c
+++ b/gcc/testsuite/gcc.dg/atomic-exchange-1.c
@@ -9,25 +9,31 @@ extern void abort(void);
char v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/gcc/testsuite/gcc.dg/atomic-exchange-2.c b/gcc/testsuite/gcc.dg/atomic-exchange-2.c
index 153771a2cd..0de2e68208 100644
--- a/gcc/testsuite/gcc.dg/atomic-exchange-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-exchange-2.c
@@ -9,25 +9,31 @@ extern void abort(void);
short v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/gcc/testsuite/gcc.dg/atomic-exchange-3.c b/gcc/testsuite/gcc.dg/atomic-exchange-3.c
index fbf8f6b966..63a68cf473 100644
--- a/gcc/testsuite/gcc.dg/atomic-exchange-3.c
+++ b/gcc/testsuite/gcc.dg/atomic-exchange-3.c
@@ -9,25 +9,31 @@ extern void abort(void);
int v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/gcc/testsuite/gcc.dg/atomic-exchange-4.c b/gcc/testsuite/gcc.dg/atomic-exchange-4.c
index 13022dd38d..fc1e5081a0 100644
--- a/gcc/testsuite/gcc.dg/atomic-exchange-4.c
+++ b/gcc/testsuite/gcc.dg/atomic-exchange-4.c
@@ -11,25 +11,31 @@ extern void abort(void);
long long v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/gcc/testsuite/gcc.dg/atomic-exchange-5.c b/gcc/testsuite/gcc.dg/atomic-exchange-5.c
index b0c84b17fd..190377f0cd 100644
--- a/gcc/testsuite/gcc.dg/atomic-exchange-5.c
+++ b/gcc/testsuite/gcc.dg/atomic-exchange-5.c
@@ -10,25 +10,31 @@ extern void abort(void);
__int128_t v, count, ret;
+int
main ()
{
v = 0;
count = 0;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELAXED) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQUIRE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_RELEASE) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_ACQ_REL) != count)
abort ();
+ count++;
- if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count++)
+ if (__atomic_exchange_n (&v, count + 1, __ATOMIC_SEQ_CST) != count)
abort ();
+ count++;
/* Now test the generic version. */
diff --git a/gcc/testsuite/gcc.dg/atomic-fence.c b/gcc/testsuite/gcc.dg/atomic-fence.c
index 1f6d1871a0..ab5c7d62c9 100644
--- a/gcc/testsuite/gcc.dg/atomic-fence.c
+++ b/gcc/testsuite/gcc.dg/atomic-fence.c
@@ -6,6 +6,7 @@
/* Test that __atomic_{thread,signal}_fence builtins execute. */
+int
main ()
{
__atomic_thread_fence (__ATOMIC_RELAXED);
diff --git a/gcc/testsuite/gcc.dg/atomic-flag.c b/gcc/testsuite/gcc.dg/atomic-flag.c
index 1b76832618..6e79b90272 100644
--- a/gcc/testsuite/gcc.dg/atomic-flag.c
+++ b/gcc/testsuite/gcc.dg/atomic-flag.c
@@ -1,11 +1,13 @@
/* Test __atomic routines for existence and execution. */
/* { dg-do run } */
+/* { dg-require-effective-target sync_char_short } */
/* Test that __atomic_test_and_set and __atomic_clear builtins execute. */
extern void abort(void);
unsigned char a;
+int
main ()
{
int b;
diff --git a/gcc/testsuite/gcc.dg/atomic-generic-aux.c b/gcc/testsuite/gcc.dg/atomic-generic-aux.c
index 2f4cb2a88f..73e1ed8539 100644
--- a/gcc/testsuite/gcc.dg/atomic-generic-aux.c
+++ b/gcc/testsuite/gcc.dg/atomic-generic-aux.c
@@ -20,7 +20,7 @@ __atomic_exchange (size_t size, void *obj, void *val, void *ret, int model)
/* Note that the external version of this routine has the boolean weak/strong
- parameter removed. This is required by teh external library. */
+ parameter removed. This is required by the external library. */
bool
__atomic_compare_exchange (size_t size, void *obj, void *expected,
void *desired, int model1, int model2)
diff --git a/gcc/testsuite/gcc.dg/atomic-generic.c b/gcc/testsuite/gcc.dg/atomic-generic.c
index d77e97dbf8..9b09f87b84 100644
--- a/gcc/testsuite/gcc.dg/atomic-generic.c
+++ b/gcc/testsuite/gcc.dg/atomic-generic.c
@@ -23,6 +23,7 @@ test_struct a,b;
int size = sizeof (test_struct);
/* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */
+int
main ()
{
test_struct c;
diff --git a/gcc/testsuite/gcc.dg/atomic-invalid.c b/gcc/testsuite/gcc.dg/atomic-invalid.c
index 48de91f6c7..4d040e1d57 100644
--- a/gcc/testsuite/gcc.dg/atomic-invalid.c
+++ b/gcc/testsuite/gcc.dg/atomic-invalid.c
@@ -10,6 +10,7 @@ int i, e, b;
size_t s;
bool x;
+int
main ()
{
__atomic_compare_exchange_n (&i, &e, 1, 0, __ATOMIC_RELAXED, __ATOMIC_SEQ_CST); /* { dg-error "failure memory model cannot be stronger" } */
diff --git a/gcc/testsuite/gcc.dg/atomic-load-1.c b/gcc/testsuite/gcc.dg/atomic-load-1.c
index 928f9b0f10..72ca317f20 100644
--- a/gcc/testsuite/gcc.dg/atomic-load-1.c
+++ b/gcc/testsuite/gcc.dg/atomic-load-1.c
@@ -10,6 +10,7 @@ extern void abort(void);
char v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-load-2.c b/gcc/testsuite/gcc.dg/atomic-load-2.c
index 3d1df1cfff..e937a2dab8 100644
--- a/gcc/testsuite/gcc.dg/atomic-load-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-load-2.c
@@ -11,6 +11,7 @@ extern void abort(void);
short v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-load-3.c b/gcc/testsuite/gcc.dg/atomic-load-3.c
index ec238be9e5..3e70ef429f 100644
--- a/gcc/testsuite/gcc.dg/atomic-load-3.c
+++ b/gcc/testsuite/gcc.dg/atomic-load-3.c
@@ -8,6 +8,7 @@ extern void abort(void);
int v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-load-4.c b/gcc/testsuite/gcc.dg/atomic-load-4.c
index 032ad246fd..750623dcb6 100644
--- a/gcc/testsuite/gcc.dg/atomic-load-4.c
+++ b/gcc/testsuite/gcc.dg/atomic-load-4.c
@@ -9,6 +9,7 @@ extern void abort(void);
long long v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-load-5.c b/gcc/testsuite/gcc.dg/atomic-load-5.c
index 31d806633e..d37d642489 100644
--- a/gcc/testsuite/gcc.dg/atomic-load-5.c
+++ b/gcc/testsuite/gcc.dg/atomic-load-5.c
@@ -8,6 +8,7 @@ extern void abort(void);
__int128_t v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-lockfree.c b/gcc/testsuite/gcc.dg/atomic-lockfree.c
index 225428223e..093aee9199 100644
--- a/gcc/testsuite/gcc.dg/atomic-lockfree.c
+++ b/gcc/testsuite/gcc.dg/atomic-lockfree.c
@@ -17,6 +17,7 @@ extern void abort();
int r1, r2;
/* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-noinline.c b/gcc/testsuite/gcc.dg/atomic-noinline.c
index 626254d8a9..b3490ea326 100644
--- a/gcc/testsuite/gcc.dg/atomic-noinline.c
+++ b/gcc/testsuite/gcc.dg/atomic-noinline.c
@@ -16,6 +16,7 @@ extern void abort();
short as,bs,cs;
char ac,bc,cc;
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-op-1.c b/gcc/testsuite/gcc.dg/atomic-op-1.c
index bc1716f779..a8a97c401b 100644
--- a/gcc/testsuite/gcc.dg/atomic-op-1.c
+++ b/gcc/testsuite/gcc.dg/atomic-op-1.c
@@ -527,6 +527,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/gcc/testsuite/gcc.dg/atomic-op-2.c b/gcc/testsuite/gcc.dg/atomic-op-2.c
index 8755340cca..949850345b 100644
--- a/gcc/testsuite/gcc.dg/atomic-op-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-op-2.c
@@ -528,6 +528,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/gcc/testsuite/gcc.dg/atomic-op-3.c b/gcc/testsuite/gcc.dg/atomic-op-3.c
index 69db4894b6..9a54a2a417 100644
--- a/gcc/testsuite/gcc.dg/atomic-op-3.c
+++ b/gcc/testsuite/gcc.dg/atomic-op-3.c
@@ -527,6 +527,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/gcc/testsuite/gcc.dg/atomic-op-4.c b/gcc/testsuite/gcc.dg/atomic-op-4.c
index 7c4a819bfa..6990b0e2d7 100644
--- a/gcc/testsuite/gcc.dg/atomic-op-4.c
+++ b/gcc/testsuite/gcc.dg/atomic-op-4.c
@@ -529,6 +529,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/gcc/testsuite/gcc.dg/atomic-op-5.c b/gcc/testsuite/gcc.dg/atomic-op-5.c
index e78d815099..1407f3fe3b 100644
--- a/gcc/testsuite/gcc.dg/atomic-op-5.c
+++ b/gcc/testsuite/gcc.dg/atomic-op-5.c
@@ -528,6 +528,7 @@ test_or ()
abort ();
}
+int
main ()
{
test_fetch_add ();
diff --git a/gcc/testsuite/gcc.dg/atomic-param.c b/gcc/testsuite/gcc.dg/atomic-param.c
index a1bfc6be87..1f2b12690f 100644
--- a/gcc/testsuite/gcc.dg/atomic-param.c
+++ b/gcc/testsuite/gcc.dg/atomic-param.c
@@ -5,6 +5,7 @@
int i;
+int
main ()
{
diff --git a/gcc/testsuite/gcc.dg/atomic-store-1.c b/gcc/testsuite/gcc.dg/atomic-store-1.c
index f99eb9c844..1ca5febcf8 100644
--- a/gcc/testsuite/gcc.dg/atomic-store-1.c
+++ b/gcc/testsuite/gcc.dg/atomic-store-1.c
@@ -9,6 +9,7 @@ extern void abort(void);
char v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-store-2.c b/gcc/testsuite/gcc.dg/atomic-store-2.c
index da346fd7de..c7b1e211a1 100644
--- a/gcc/testsuite/gcc.dg/atomic-store-2.c
+++ b/gcc/testsuite/gcc.dg/atomic-store-2.c
@@ -9,6 +9,7 @@ extern void abort(void);
short v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-store-3.c b/gcc/testsuite/gcc.dg/atomic-store-3.c
index b691da4592..52b30faacd 100644
--- a/gcc/testsuite/gcc.dg/atomic-store-3.c
+++ b/gcc/testsuite/gcc.dg/atomic-store-3.c
@@ -9,6 +9,7 @@ extern void abort(void);
int v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-store-4.c b/gcc/testsuite/gcc.dg/atomic-store-4.c
index 0863be99d0..ca37fdc462 100644
--- a/gcc/testsuite/gcc.dg/atomic-store-4.c
+++ b/gcc/testsuite/gcc.dg/atomic-store-4.c
@@ -11,6 +11,7 @@ extern void abort(void);
long long v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-store-5.c b/gcc/testsuite/gcc.dg/atomic-store-5.c
index 763d29e240..a855182bf4 100644
--- a/gcc/testsuite/gcc.dg/atomic-store-5.c
+++ b/gcc/testsuite/gcc.dg/atomic-store-5.c
@@ -10,6 +10,7 @@ extern void abort(void);
__int128_t v, count;
+int
main ()
{
v = 0;
diff --git a/gcc/testsuite/gcc.dg/atomic-store-6.c b/gcc/testsuite/gcc.dg/atomic-store-6.c
new file mode 100644
index 0000000000..81499cd716
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic-store-6.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-require-effective-target sync_int_128_runtime } */
+/* { dg-options "-mcx16" { target { i?86-*-* x86_64-*-* } } } */
+
+__int128_t i;
+
+int main()
+{
+ __atomic_store_16(&i, -1, 0);
+ if (i != -1)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/atomic.exp b/gcc/testsuite/gcc.dg/atomic/atomic.exp
new file mode 100644
index 0000000000..9200e3198b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/atomic.exp
@@ -0,0 +1,34 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib atomic-dg.exp
+
+# Initialize `dg'.
+dg-init
+if [atomic_init] {
+ # Main loop.
+ gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] ""
+}
+
+# All done.
+atomic_finish
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-1.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-1.c
new file mode 100644
index 0000000000..c0db93f07d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-1.c
@@ -0,0 +1,88 @@
+/* Test for _Atomic in C11. Basic execution tests for atomic loads
+ and stores. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+extern void abort (void);
+extern void exit (int);
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
+
+#define CMPLX(X, Y) __builtin_complex ((X), (Y))
+
+#define TEST_SIMPLE_ASSIGN(TYPE, VALUE) \
+ do \
+ { \
+ static volatile _Atomic (TYPE) a, b = (TYPE) (VALUE); \
+ if (a != 0) \
+ abort (); \
+ if (b != ((TYPE) (VALUE))) \
+ abort (); \
+ if ((a = b) != ((TYPE) (VALUE))) \
+ abort (); \
+ if (a != ((TYPE) (VALUE))) \
+ abort (); \
+ } \
+ while (0)
+
+#define TEST_SIMPLE_ASSIGN_ARITH(VALUE) \
+ do \
+ { \
+ TEST_SIMPLE_ASSIGN (_Bool, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (char, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (signed char, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (unsigned char, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (signed short, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (unsigned short, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (signed int, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (unsigned int, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (signed long, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (unsigned long, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (signed long long, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (unsigned long long, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (float, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (double, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (long double, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (_Complex float, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (_Complex double, (VALUE)); \
+ TEST_SIMPLE_ASSIGN (_Complex long double, (VALUE)); \
+ } \
+ while (0)
+
+static void
+test_simple_assign (void)
+{
+ TEST_SIMPLE_ASSIGN_ARITH (0);
+ TEST_SIMPLE_ASSIGN_ARITH (1);
+ TEST_SIMPLE_ASSIGN_ARITH (2);
+ TEST_SIMPLE_ASSIGN_ARITH (-1);
+ TEST_SIMPLE_ASSIGN_ARITH (1ULL << 63);
+ TEST_SIMPLE_ASSIGN_ARITH (1.5);
+ TEST_SIMPLE_ASSIGN_ARITH (CMPLX (2.5, 3.5));
+ static int i;
+ TEST_SIMPLE_ASSIGN (int *, 0);
+ TEST_SIMPLE_ASSIGN (int *, &i);
+ struct s { short a[1024]; };
+ struct s init, copy;
+ _Atomic struct s s1, s2;
+ for (int j = 0; j < 1024; j++)
+ init.a[j] = j;
+ copy = (s1 = init);
+ if (memcmp (&init, &copy, sizeof init) != 0)
+ abort ();
+ copy = (s2 = s1);
+ if (memcmp (&init, &copy, sizeof init) != 0)
+ abort ();
+ copy = s1;
+ if (memcmp (&init, &copy, sizeof init) != 0)
+ abort ();
+ copy = s2;
+ if (memcmp (&init, &copy, sizeof init) != 0)
+ abort ();
+}
+
+int
+main (void)
+{
+ test_simple_assign ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c
new file mode 100644
index 0000000000..9ee56b6019
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-2.c
@@ -0,0 +1,171 @@
+/* Test for _Atomic in C11. Basic execution tests for atomic compound
+ assignment. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+extern void abort (void);
+extern void exit (int);
+
+#define CMPLX(X, Y) __builtin_complex ((X), (Y))
+
+#define TEST_COMPOUND(TYPE, LHSVAL, RHSVAL, OP) \
+ do \
+ { \
+ static volatile _Atomic (TYPE) a = (TYPE) (LHSVAL); \
+ if ((a OP##= (RHSVAL)) != (TYPE) ((TYPE) (LHSVAL) OP (RHSVAL))) \
+ abort (); \
+ if (a != (TYPE) ((TYPE) (LHSVAL) OP (RHSVAL))) \
+ abort (); \
+ } \
+ while (0)
+
+#define TEST_COMPOUND_ARITH(LHSVAL, RHSVAL, OP) \
+ do \
+ { \
+ TEST_COMPOUND (_Bool, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed short, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned short, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed int, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned int, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed long long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned long long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (float, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (double, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (long double, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (_Complex float, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (_Complex double, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (_Complex long double, (LHSVAL), (RHSVAL), OP); \
+ } \
+ while (0)
+
+#define TEST_COMPOUND_INT(LHSVAL, RHSVAL, OP) \
+ do \
+ { \
+ TEST_COMPOUND (_Bool, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned char, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed short, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned short, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed int, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned int, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (signed long long, (LHSVAL), (RHSVAL), OP); \
+ TEST_COMPOUND (unsigned long long, (LHSVAL), (RHSVAL), OP); \
+ } \
+ while (0)
+
+static void
+test_mult (void)
+{
+ TEST_COMPOUND_ARITH (1, 2, *);
+ TEST_COMPOUND_ARITH (-3, 5, *);
+ TEST_COMPOUND_ARITH (-7, -20, *);
+ TEST_COMPOUND_ARITH (1.25, 3.5, *);
+ TEST_COMPOUND_ARITH (CMPLX (1.5, 2.5), CMPLX (3.5, 4.5), *);
+ TEST_COMPOUND_ARITH (CMPLX (1.5, 2.5), 2, *);
+}
+
+static void
+test_div (void)
+{
+ TEST_COMPOUND_ARITH (1, 2, /);
+ TEST_COMPOUND_ARITH (-6, 3, /);
+ TEST_COMPOUND_ARITH (-70, -10, /);
+ TEST_COMPOUND_ARITH (1.25, 2.5, /);
+ TEST_COMPOUND_ARITH (CMPLX (1.0, 1.0), CMPLX (0.5, 0.5), /);
+ TEST_COMPOUND_ARITH (CMPLX (1.5, 2.5), 2, /);
+}
+
+static void
+test_mod (void)
+{
+ TEST_COMPOUND_INT (1, 2, %);
+ TEST_COMPOUND_INT (-3, 5, %);
+ TEST_COMPOUND_INT (-7, -2, %);
+}
+
+static void
+test_plus (void)
+{
+ TEST_COMPOUND_ARITH (1, 2, +);
+ TEST_COMPOUND_ARITH (-3, 5, +);
+ TEST_COMPOUND_ARITH (-7, -20, +);
+ TEST_COMPOUND_ARITH (1.25, 3.5, +);
+ TEST_COMPOUND_ARITH (CMPLX (1.5, 2.5), CMPLX (3.5, 4.5), +);
+ TEST_COMPOUND_ARITH (CMPLX (1.5, 2.5), 2, +);
+ static int ia[2];
+ TEST_COMPOUND (int *, &ia[1], 1, +);
+ TEST_COMPOUND (int *, &ia[1], -1, +);
+}
+
+static void
+test_minus (void)
+{
+ TEST_COMPOUND_ARITH (1, 2, -);
+ TEST_COMPOUND_ARITH (-3, 5, -);
+ TEST_COMPOUND_ARITH (-7, -20, -);
+ TEST_COMPOUND_ARITH (3.5, 1.25, -);
+ TEST_COMPOUND_ARITH (CMPLX (3.5, 4.5), CMPLX (1.5, 2.5), -);
+ TEST_COMPOUND_ARITH (CMPLX (3.5, 2.5), 2, -);
+ static int ia[2];
+ TEST_COMPOUND (int *, &ia[1], 1, -);
+ TEST_COMPOUND (int *, &ia[1], -1, -);
+}
+
+static void
+test_lshift (void)
+{
+ TEST_COMPOUND_INT (1, 7, <<);
+ TEST_COMPOUND_INT (15, 3, <<);
+}
+
+static void
+test_rshift (void)
+{
+ TEST_COMPOUND_INT (1, 1, >>);
+ TEST_COMPOUND_INT (127, 4, >>);
+}
+
+static void
+test_and (void)
+{
+ TEST_COMPOUND_INT (0x1234, 0x7856, &);
+ TEST_COMPOUND_INT (-1, 0x12345678, &);
+}
+
+static void
+test_xor (void)
+{
+ TEST_COMPOUND_INT (0x1234, 0x7856, ^);
+ TEST_COMPOUND_INT (-1, 0x12345678, ^);
+}
+
+static void
+test_or (void)
+{
+ TEST_COMPOUND_INT (0x1234, 0x7856, |);
+ TEST_COMPOUND_INT (-12345, 0x12345678, |);
+}
+
+int
+main (void)
+{
+ test_mult ();
+ test_div ();
+ test_mod ();
+ test_plus ();
+ test_minus ();
+ test_lshift ();
+ test_rshift ();
+ test_and ();
+ test_xor ();
+ test_or ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c
new file mode 100644
index 0000000000..7bfa8c05f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-3.c
@@ -0,0 +1,85 @@
+/* Test for _Atomic in C11. Basic execution tests for atomic
+ increment and decrement. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+extern void abort (void);
+extern void exit (int);
+
+#define TEST_INCDEC(TYPE, VALUE, PREOP, POSTOP, PRE_P, CHANGE) \
+ do \
+ { \
+ static volatile _Atomic (TYPE) a = (TYPE) (VALUE); \
+ if (PREOP a POSTOP != (PRE_P \
+ ? (TYPE) ((TYPE) (VALUE) + (CHANGE)) \
+ : (TYPE) (VALUE))) \
+ abort (); \
+ if (a != (TYPE) ((TYPE) (VALUE) + (CHANGE))) \
+ abort (); \
+ } \
+ while (0)
+
+#define TEST_INCDEC_ARITH(VALUE, PREOP, POSTOP, PRE_P, CHANGE) \
+ do \
+ { \
+ TEST_INCDEC (_Bool, (VALUE), PREOP, POSTOP, (PRE_P), (CHANGE)); \
+ TEST_INCDEC (char, (VALUE), PREOP, POSTOP, (PRE_P), (CHANGE)); \
+ TEST_INCDEC (signed char, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (unsigned char, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (signed short, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (unsigned short, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (signed int, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (unsigned int, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (signed long, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (unsigned long, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (signed long long, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (unsigned long long, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ TEST_INCDEC (float, (VALUE), PREOP, POSTOP, (PRE_P), (CHANGE)); \
+ TEST_INCDEC (double, (VALUE), PREOP, POSTOP, (PRE_P), (CHANGE)); \
+ TEST_INCDEC (long double, (VALUE), PREOP, POSTOP, (PRE_P), \
+ (CHANGE)); \
+ } \
+ while (0)
+
+#define TEST_ALL_INCDEC_ARITH(VALUE) \
+ do \
+ { \
+ TEST_INCDEC_ARITH ((VALUE), ++, , 1, 1); \
+ TEST_INCDEC_ARITH ((VALUE), --, , 1, -1); \
+ TEST_INCDEC_ARITH ((VALUE), , ++, 0, 1); \
+ TEST_INCDEC_ARITH ((VALUE), , --, 0, -1); \
+ } \
+ while (0)
+
+static void
+test_incdec (void)
+{
+ TEST_ALL_INCDEC_ARITH (0);
+ TEST_ALL_INCDEC_ARITH (1);
+ TEST_ALL_INCDEC_ARITH (2);
+ TEST_ALL_INCDEC_ARITH (-1);
+ TEST_ALL_INCDEC_ARITH (1ULL << 60);
+ TEST_ALL_INCDEC_ARITH (1.5);
+ static int ia[2];
+ TEST_INCDEC (int *, &ia[1], ++, , 1, 1);
+ TEST_INCDEC (int *, &ia[1], --, , 1, -1);
+ TEST_INCDEC (int *, &ia[1], , ++, 0, 1);
+ TEST_INCDEC (int *, &ia[1], , --, 0, -1);
+}
+
+int
+main (void)
+{
+ test_incdec ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
new file mode 100644
index 0000000000..b03d2c88db
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-4.c
@@ -0,0 +1,209 @@
+/* Test for _Atomic in C11. Test that compare-and-exchange is
+ operating properly when operations on the same variable are carried
+ out in two threads. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L" } */
+/* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]* } }
+/* { dg-require-effective-target pthread } */
+
+#include <stdint.h>
+#include <pthread.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define ITER_COUNT 10000
+
+static volatile _Atomic bool thread_ready;
+
+/* Generate test code (with NAME used to name functions and variables)
+ for atomic compound assignments to a variable of type LHSTYPE. The
+ variable is initialized to INIT, then PRE var POST is executed
+ ITER_COUNT times in each of two threads, and the final result
+ should be FINAL. A function test_main_##NAME is generated that
+ returns nonzero on failure, zero on success. */
+
+#define TEST_FUNCS(NAME, LHSTYPE, PRE, POST, INIT, FINAL) \
+ \
+static volatile _Atomic LHSTYPE var_##NAME = (INIT); \
+ \
+static void * \
+test_thread_##NAME (void *arg) \
+{ \
+ thread_ready = true; \
+ for (int i = 0; i < ITER_COUNT; i++) \
+ PRE var_##NAME POST; \
+ return NULL; \
+} \
+ \
+static int \
+test_main_##NAME (void) \
+{ \
+ thread_ready = false; \
+ pthread_t thread_id; \
+ int pret = pthread_create (&thread_id, NULL, test_thread_##NAME, \
+ NULL); \
+ if (pret != 0) \
+ { \
+ printf ("pthread_create failed: %d\n", pret); \
+ return 1; \
+ } \
+ while (!thread_ready) \
+ ; \
+ for (int i = 0; i < ITER_COUNT; i++) \
+ PRE var_##NAME POST; \
+ pthread_join (thread_id, NULL); \
+ if (var_##NAME != (FINAL)) \
+ { \
+ printf (#NAME " failed\n"); \
+ return 1; \
+ } \
+ else \
+ { \
+ printf (#NAME " passed\n"); \
+ return 0; \
+ } \
+}
+
+TEST_FUNCS (uint8_add, uint8_t, , += 1, 0, (uint8_t) 20000)
+TEST_FUNCS (uint8_add_3, uint8_t, , += 3, 0, (uint8_t) 60000)
+TEST_FUNCS (uint16_add, uint16_t, , += 1, 0, (uint16_t) 20000)
+TEST_FUNCS (uint16_add_3, uint16_t, , += 3, 0, (uint16_t) 60000)
+TEST_FUNCS (uint32_add, uint32_t, , += 1, 0, (uint32_t) 20000)
+TEST_FUNCS (uint32_add_3, uint32_t, , += 3, 0, (uint32_t) 60000)
+TEST_FUNCS (uint64_add, uint64_t, , += 1, 0, (uint64_t) 20000)
+TEST_FUNCS (uint64_add_3, uint64_t, , += 3, 0, (uint64_t) 60000)
+TEST_FUNCS (uint64_add_neg, uint64_t, , += 1, -10000, (uint64_t) 10000)
+TEST_FUNCS (float_add, float, , += 1, 0, 20000)
+TEST_FUNCS (double_add, double, , += 1, 0, 20000)
+TEST_FUNCS (long_double_add, long double, , += 1, 0, 20000)
+TEST_FUNCS (complex_float_add, _Complex float, , += 1, 0, 20000)
+TEST_FUNCS (complex_double_add, _Complex double, , += 1, 0, 20000)
+TEST_FUNCS (complex_long_double_add, _Complex long double, , += 1, 0, 20000)
+TEST_FUNCS (uint8_postinc, uint8_t, , ++, 0, (uint8_t) 20000)
+TEST_FUNCS (uint16_postinc, uint16_t, , ++, 0, (uint16_t) 20000)
+TEST_FUNCS (uint32_postinc, uint32_t, , ++, 0, (uint32_t) 20000)
+TEST_FUNCS (uint64_postinc, uint64_t, , ++, 0, (uint64_t) 20000)
+TEST_FUNCS (uint64_postinc_neg, uint64_t, , ++, -10000, (uint64_t) 10000)
+TEST_FUNCS (float_postinc, float, , ++, 0, 20000)
+TEST_FUNCS (double_postinc, double, , ++, 0, 20000)
+TEST_FUNCS (long_double_postinc, long double, , ++, 0, 20000)
+TEST_FUNCS (uint8_preinc, uint8_t, ++, , 0, (uint8_t) 20000)
+TEST_FUNCS (uint16_preinc, uint16_t, ++, , 0, (uint16_t) 20000)
+TEST_FUNCS (uint32_preinc, uint32_t, ++, , 0, (uint32_t) 20000)
+TEST_FUNCS (uint64_preinc, uint64_t, ++, , 0, (uint64_t) 20000)
+TEST_FUNCS (uint64_preinc_neg, uint64_t, ++, , -10000, (uint64_t) 10000)
+TEST_FUNCS (float_preinc, float, ++, , 0, 20000)
+TEST_FUNCS (double_preinc, double, ++, , 0, 20000)
+TEST_FUNCS (long_double_preinc, long double, ++, , 0, 20000)
+TEST_FUNCS (uint8_sub, uint8_t, , -= 1, 0, (uint8_t) -20000)
+TEST_FUNCS (uint8_sub_3, uint8_t, , -= 3, 0, (uint8_t) -60000)
+TEST_FUNCS (uint16_sub, uint16_t, , -= 1, 0, (uint16_t) -20000)
+TEST_FUNCS (uint16_sub_3, uint16_t, , -= 3, 0, (uint16_t) -60000)
+TEST_FUNCS (uint32_sub, uint32_t, , -= 1, 0, (uint32_t) -20000)
+TEST_FUNCS (uint32_sub_3, uint32_t, , -= 3, 0, (uint32_t) -60000)
+TEST_FUNCS (uint64_sub, uint64_t, , -= 1, 0, (uint64_t) -20000)
+TEST_FUNCS (uint64_sub_3, uint64_t, , -= 3, 0, (uint64_t) -60000)
+TEST_FUNCS (uint64_sub_neg, uint64_t, , -= 1, 10000, (uint64_t) -10000)
+TEST_FUNCS (float_sub, float, , -= 1, 0, -20000)
+TEST_FUNCS (double_sub, double, , -= 1, 0, -20000)
+TEST_FUNCS (long_double_sub, long double, , -= 1, 0, -20000)
+TEST_FUNCS (complex_float_sub, _Complex float, , -= 1, 0, -20000)
+TEST_FUNCS (complex_double_sub, _Complex double, , -= 1, 0, -20000)
+TEST_FUNCS (complex_long_double_sub, _Complex long double, , -= 1, 0, -20000)
+TEST_FUNCS (uint8_postdec, uint8_t, , --, 0, (uint8_t) -20000)
+TEST_FUNCS (uint16_postdec, uint16_t, , --, 0, (uint16_t) -20000)
+TEST_FUNCS (uint32_postdec, uint32_t, , --, 0, (uint32_t) -20000)
+TEST_FUNCS (uint64_postdec, uint64_t, , --, 0, (uint64_t) -20000)
+TEST_FUNCS (uint64_postdec_neg, uint64_t, , --, 10000, (uint64_t) -10000)
+TEST_FUNCS (float_postdec, float, , --, 0, -20000)
+TEST_FUNCS (double_postdec, double, , --, 0, -20000)
+TEST_FUNCS (long_double_postdec, long double, , --, 0, -20000)
+TEST_FUNCS (uint8_predec, uint8_t, --, , 0, (uint8_t) -20000)
+TEST_FUNCS (uint16_predec, uint16_t, --, , 0, (uint16_t) -20000)
+TEST_FUNCS (uint32_predec, uint32_t, --, , 0, (uint32_t) -20000)
+TEST_FUNCS (uint64_predec, uint64_t, --, , 0, (uint64_t) -20000)
+TEST_FUNCS (uint64_predec_neg, uint64_t, --, , 10000, (uint64_t) -10000)
+TEST_FUNCS (float_predec, float, --, , 0, -20000)
+TEST_FUNCS (double_predec, double, --, , 0, -20000)
+TEST_FUNCS (long_double_predec, long double, --, , 0, -20000)
+TEST_FUNCS (uint8_mul, uint8_t, , *= 3, 1, (uint8_t) 0x81)
+TEST_FUNCS (uint16_mul, uint16_t, , *= 3, 1, (uint16_t) 0x9681)
+TEST_FUNCS (uint32_mul, uint32_t, , *= 3, 1, (uint32_t) 0x62b49681U)
+TEST_FUNCS (uint64_mul, uint64_t, , *= 3, 1, (uint64_t) 0xcd926beb62b49681ULL)
+
+int
+main (void)
+{
+ int ret = 0;
+ ret |= test_main_uint8_add ();
+ ret |= test_main_uint8_add_3 ();
+ ret |= test_main_uint16_add ();
+ ret |= test_main_uint16_add_3 ();
+ ret |= test_main_uint32_add ();
+ ret |= test_main_uint32_add_3 ();
+ ret |= test_main_uint64_add ();
+ ret |= test_main_uint64_add_3 ();
+ ret |= test_main_uint64_add_neg ();
+ ret |= test_main_float_add ();
+ ret |= test_main_double_add ();
+ ret |= test_main_long_double_add ();
+ ret |= test_main_complex_float_add ();
+ ret |= test_main_complex_double_add ();
+ ret |= test_main_complex_long_double_add ();
+ ret |= test_main_uint8_postinc ();
+ ret |= test_main_uint16_postinc ();
+ ret |= test_main_uint32_postinc ();
+ ret |= test_main_uint64_postinc ();
+ ret |= test_main_uint64_postinc_neg ();
+ ret |= test_main_float_postinc ();
+ ret |= test_main_double_postinc ();
+ ret |= test_main_long_double_postinc ();
+ ret |= test_main_uint8_preinc ();
+ ret |= test_main_uint16_preinc ();
+ ret |= test_main_uint32_preinc ();
+ ret |= test_main_uint64_preinc ();
+ ret |= test_main_uint64_preinc_neg ();
+ ret |= test_main_float_preinc ();
+ ret |= test_main_double_preinc ();
+ ret |= test_main_long_double_preinc ();
+ ret |= test_main_uint8_sub ();
+ ret |= test_main_uint8_sub_3 ();
+ ret |= test_main_uint16_sub ();
+ ret |= test_main_uint16_sub_3 ();
+ ret |= test_main_uint32_sub ();
+ ret |= test_main_uint32_sub_3 ();
+ ret |= test_main_uint64_sub ();
+ ret |= test_main_uint64_sub_3 ();
+ ret |= test_main_uint64_sub_neg ();
+ ret |= test_main_float_sub ();
+ ret |= test_main_double_sub ();
+ ret |= test_main_long_double_sub ();
+ ret |= test_main_complex_float_sub ();
+ ret |= test_main_complex_double_sub ();
+ ret |= test_main_complex_long_double_sub ();
+ ret |= test_main_uint8_postdec ();
+ ret |= test_main_uint16_postdec ();
+ ret |= test_main_uint32_postdec ();
+ ret |= test_main_uint64_postdec ();
+ ret |= test_main_uint64_postdec_neg ();
+ ret |= test_main_float_postdec ();
+ ret |= test_main_double_postdec ();
+ ret |= test_main_long_double_postdec ();
+ ret |= test_main_uint8_predec ();
+ ret |= test_main_uint16_predec ();
+ ret |= test_main_uint32_predec ();
+ ret |= test_main_uint64_predec ();
+ ret |= test_main_uint64_predec_neg ();
+ ret |= test_main_float_predec ();
+ ret |= test_main_double_predec ();
+ ret |= test_main_long_double_predec ();
+ ret |= test_main_uint8_mul ();
+ ret |= test_main_uint16_mul ();
+ ret |= test_main_uint32_mul ();
+ ret |= test_main_uint64_mul ();
+ if (ret)
+ abort ();
+ else
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
new file mode 100644
index 0000000000..e3e0aae4d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/c11-atomic-exec-5.c
@@ -0,0 +1,542 @@
+/* Test for _Atomic in C11. Test floating-point exceptions for
+ compound assignment are consistent with result (so that if multiple
+ iterations of the compare-and-exchange loop are needed, exceptions
+ get properly cleared). */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors -pthread -U_POSIX_C_SOURCE -D_POSIX_C_SOURCE=200809L" } */
+/* { dg-additional-options "-D_XOPEN_SOURCE=600" { target *-*-solaris2.1[0-9]* } }
+/* { dg-require-effective-target fenv_exceptions } */
+/* { dg-require-effective-target pthread } */
+
+#include <fenv.h>
+#include <float.h>
+#include <pthread.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#define TEST_ALL_EXCEPT (FE_DIVBYZERO \
+ | FE_INEXACT \
+ | FE_INVALID \
+ | FE_OVERFLOW \
+ | FE_UNDERFLOW)
+
+#define ITER_COUNT 10000
+
+static volatile _Atomic bool thread_ready, thread_stop;
+
+/* Generate test code (with NAME used to name functions and variables)
+ for atomic compound assignments to a variable of type LHSTYPE. One
+ thread repeatedly stores the values INIT1 and INIT2 in a variable,
+ while the other repeatedly executes PRE var POST having set
+ floating-point exceptions to BEXC. If the value of the assignment
+ operation satisfies VALTEST1 (var), the floating-point exceptions
+ should be BEXC | EXC1; otherwise, they should be BEXC | EXC2. A
+ function test_main_##NAME is generated that returns nonzero on
+ failure, zero on success. */
+
+#define TEST_FUNCS(NAME, LHSTYPE, PRE, POST, BEXC, \
+ INIT1, VALTEST1, EXC1, INIT2, EXC2) \
+ \
+static volatile _Atomic LHSTYPE var_##NAME; \
+ \
+static void * \
+test_thread_##NAME (void *arg) \
+{ \
+ thread_ready = true; \
+ while (!thread_stop) \
+ { \
+ var_##NAME = (INIT1); \
+ var_##NAME = (INIT2); \
+ } \
+ return NULL; \
+} \
+ \
+static int \
+test_main_##NAME (void) \
+{ \
+ thread_stop = false; \
+ thread_ready = false; \
+ var_##NAME = (INIT1); \
+ pthread_t thread_id; \
+ int pret = pthread_create (&thread_id, NULL, test_thread_##NAME, \
+ NULL); \
+ if (pret != 0) \
+ { \
+ printf ("pthread_create failed: %d\n", pret); \
+ return 1; \
+ } \
+ int num_1_pass = 0, num_1_fail = 0, num_2_pass = 0, num_2_fail = 0; \
+ while (!thread_ready) \
+ ; \
+ for (int i = 0; i < ITER_COUNT; i++) \
+ { \
+ feclearexcept (FE_ALL_EXCEPT); \
+ feraiseexcept (BEXC); \
+ LHSTYPE r = (PRE var_##NAME POST); \
+ int rexc = fetestexcept (TEST_ALL_EXCEPT); \
+ if (VALTEST1 (r)) \
+ { \
+ if (rexc == ((BEXC) | (EXC1))) \
+ num_1_pass++; \
+ else \
+ num_1_fail++; \
+ var_##NAME = (INIT2); \
+ } \
+ else \
+ { \
+ if (rexc == ((BEXC) | (EXC2))) \
+ num_2_pass++; \
+ else \
+ num_2_fail++; \
+ var_##NAME = (INIT1); \
+ } \
+ } \
+ thread_stop = true; \
+ pthread_join (thread_id, NULL); \
+ printf (#NAME " (a) %d pass, %d fail; (b) %d pass, %d fail\n", \
+ num_1_pass, num_1_fail, num_2_pass, num_2_fail); \
+ return num_1_fail || num_2_fail; \
+}
+
+TEST_FUNCS (float_add_invalid, float, , += __builtin_inff (), 0,
+ 0, __builtin_isinf, 0,
+ -__builtin_inff (), FE_INVALID)
+TEST_FUNCS (float_add_invalid_prev, float, , += __builtin_inff (),
+ FE_DIVBYZERO | FE_INEXACT | FE_OVERFLOW | FE_UNDERFLOW,
+ 0, __builtin_isinf, 0,
+ -__builtin_inff (), FE_INVALID)
+TEST_FUNCS (float_add_overflow, float, , += FLT_MAX, 0,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_add_overflow_prev, float, , += FLT_MAX, FE_INVALID,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_add_overflow_double, float, , += (double) FLT_MAX, 0,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_add_overflow_long_double, float, , += (long double) FLT_MAX, 0,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_FLT_EPSILON_2(X) ((X) != FLT_EPSILON / 2)
+TEST_FUNCS (float_add_inexact, float, , += FLT_EPSILON / 2, 0,
+ 1.0f, NOT_FLT_EPSILON_2, FE_INEXACT,
+ 0, 0)
+#define NOT_0(X) ((X) != 0)
+TEST_FUNCS (float_add_inexact_int, float, , += 1, 0,
+ FLT_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+TEST_FUNCS (float_preinc_inexact, float, ++, , 0,
+ FLT_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+#define NOT_MINUS_1(X) ((X) != -1)
+TEST_FUNCS (float_postinc_inexact, float, , ++, 0,
+ FLT_EPSILON / 2, NOT_MINUS_1, FE_INEXACT,
+ -1, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS (long_add_float_inexact, long, , += 2 / FLT_EPSILON, 0,
+ 1, NOT_0, FE_INEXACT,
+ -2 / FLT_EPSILON, 0)
+#endif
+#define REAL_ISINF(X) (__builtin_isinf (__real__ (X)))
+TEST_FUNCS (complex_float_add_overflow, _Complex float, , += FLT_MAX, 0,
+ FLT_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_sub_invalid, float, , -= __builtin_inff (), 0,
+ 0, __builtin_isinf, 0,
+ __builtin_inff (), FE_INVALID)
+TEST_FUNCS (float_sub_overflow, float, , -= FLT_MAX, 0,
+ -FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_MINUS_FLT_EPSILON_2(X) ((X) != -FLT_EPSILON / 2)
+TEST_FUNCS (float_sub_inexact, float, , -= FLT_EPSILON / 2, 0,
+ -1.0f, NOT_MINUS_FLT_EPSILON_2, FE_INEXACT,
+ 0, 0)
+#define NOT_0(X) ((X) != 0)
+TEST_FUNCS (float_sub_inexact_int, float, , -= 1, 0,
+ -FLT_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (float_predec_inexact, float, --, , 0,
+ -FLT_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+#define NOT_1(X) ((X) != 1)
+TEST_FUNCS (float_postdec_inexact, float, , --, 0,
+ -FLT_EPSILON / 2, NOT_1, FE_INEXACT,
+ 1, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS (long_sub_float_inexact, long, , -= 2 / FLT_EPSILON, 0,
+ -1, NOT_0, FE_INEXACT,
+ 2 / FLT_EPSILON, 0)
+#endif
+TEST_FUNCS (complex_float_sub_overflow, _Complex float, , -= FLT_MAX, 0,
+ -FLT_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_mul_invalid, float, , *= __builtin_inff (), 0,
+ __builtin_inff (), __builtin_isinf, 0,
+ 0, FE_INVALID)
+TEST_FUNCS (float_mul_overflow, float, , *= FLT_MAX, 0,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define IS_0(X) ((X) == 0)
+TEST_FUNCS (float_mul_underflow, float, , *= FLT_MIN, 0,
+ FLT_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (float_mul_inexact, float, , *= 1 + FLT_EPSILON, 0,
+ 1 + FLT_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_mul_inexact_int, float, , *= 3, 0,
+ 1 + FLT_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS(long_mul_float_inexact, long, , *= 3.0f, 0,
+ 1 + 1 / FLT_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+#endif
+TEST_FUNCS (complex_float_mul_overflow, _Complex float, , *= FLT_MAX, 0,
+ FLT_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_div_invalid_divbyzero, float, , /= 0.0f, 0,
+ 1, __builtin_isinf, FE_DIVBYZERO,
+ 0, FE_INVALID)
+TEST_FUNCS (float_div_overflow, float, , /= FLT_MIN, 0,
+ FLT_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_div_underflow, float, , /= FLT_MAX, 0,
+ FLT_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ FLT_MAX, 0)
+TEST_FUNCS (float_div_inexact, float, , /= 3.0f, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (float_div_inexact_int, float, , /= 3, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (int_div_float_inexact, int, , /= 3.0f, 0,
+ 4, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (complex_float_div_overflow, _Complex float, , /= FLT_MIN, 0,
+ FLT_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+
+TEST_FUNCS (double_add_invalid, double, , += __builtin_inf (), 0,
+ 0, __builtin_isinf, 0,
+ -__builtin_inf (), FE_INVALID)
+TEST_FUNCS (double_add_overflow, double, , += DBL_MAX, 0,
+ DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_add_overflow_long_double, double, , += (long double) DBL_MAX, 0,
+ DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_DBL_EPSILON_2(X) ((X) != DBL_EPSILON / 2)
+TEST_FUNCS (double_add_inexact, double, , += DBL_EPSILON / 2, 0,
+ 1.0, NOT_DBL_EPSILON_2, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_add_inexact_int, double, , += 1, 0,
+ DBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+TEST_FUNCS (double_preinc_inexact, double, ++, , 0,
+ DBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+TEST_FUNCS (double_postinc_inexact, double, , ++, 0,
+ DBL_EPSILON / 2, NOT_MINUS_1, FE_INEXACT,
+ -1, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS (long_long_add_double_inexact, long long, , += 2 / DBL_EPSILON, 0,
+ 1, NOT_0, FE_INEXACT,
+ -2 / DBL_EPSILON, 0)
+#endif
+TEST_FUNCS (complex_double_add_overflow, _Complex double, , += DBL_MAX, 0,
+ DBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_sub_invalid, double, , -= __builtin_inf (), 0,
+ 0, __builtin_isinf, 0,
+ __builtin_inf (), FE_INVALID)
+TEST_FUNCS (double_sub_overflow, double, , -= DBL_MAX, 0,
+ -DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_MINUS_DBL_EPSILON_2(X) ((X) != -DBL_EPSILON / 2)
+TEST_FUNCS (double_sub_inexact, double, , -= DBL_EPSILON / 2, 0,
+ -1.0, NOT_MINUS_DBL_EPSILON_2, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_sub_inexact_int, double, , -= 1, 0,
+ -DBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (double_predec_inexact, double, --, , 0,
+ -DBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (double_postdec_inexact, double, , --, 0,
+ -DBL_EPSILON / 2, NOT_1, FE_INEXACT,
+ 1, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS (long_long_sub_double_inexact, long long, , -= 2 / DBL_EPSILON, 0,
+ -1, NOT_0, FE_INEXACT,
+ 2 / DBL_EPSILON, 0)
+#endif
+TEST_FUNCS (complex_double_sub_overflow, _Complex double, , -= DBL_MAX, 0,
+ -DBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_mul_invalid, double, , *= __builtin_inf (), 0,
+ __builtin_inf (), __builtin_isinf, 0,
+ 0, FE_INVALID)
+TEST_FUNCS (double_mul_overflow, double, , *= DBL_MAX, 0,
+ DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_mul_overflow_float, double, , *= FLT_MAX, 0,
+ DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_mul_underflow, double, , *= DBL_MIN, 0,
+ DBL_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (double_mul_inexact, double, , *= 1 + DBL_EPSILON, 0,
+ 1 + DBL_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_mul_inexact_int, double, , *= 3, 0,
+ 1 + DBL_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+#if FLT_EVAL_METHOD == 0
+TEST_FUNCS(long_long_mul_double_inexact, long long, , *= 3.0, 0,
+ 1 + 1 / DBL_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+#endif
+TEST_FUNCS (complex_double_mul_overflow, _Complex double, , *= DBL_MAX, 0,
+ DBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_div_invalid_divbyzero, double, , /= 0.0, 0,
+ 1, __builtin_isinf, FE_DIVBYZERO,
+ 0, FE_INVALID)
+TEST_FUNCS (double_div_overflow, double, , /= DBL_MIN, 0,
+ DBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_div_underflow, double, , /= DBL_MAX, 0,
+ DBL_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ DBL_MAX, 0)
+TEST_FUNCS (double_div_inexact, double, , /= 3.0, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (double_div_inexact_int, double, , /= 3, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (int_div_double_inexact, int, , /= 3.0, 0,
+ 4, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (complex_double_div_overflow, _Complex double, , /= DBL_MIN, 0,
+ DBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+
+TEST_FUNCS (long_double_add_invalid, long double, , += __builtin_infl (), 0,
+ 0, __builtin_isinf, 0,
+ -__builtin_infl (), FE_INVALID)
+TEST_FUNCS (long_double_add_overflow, long double, , += LDBL_MAX, 0,
+ LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_LDBL_EPSILON_2(X) ((X) != LDBL_EPSILON / 2)
+#if LDBL_MANT_DIG != 106
+TEST_FUNCS (long_double_add_inexact, long double, , += LDBL_EPSILON / 2, 0,
+ 1.0L, NOT_LDBL_EPSILON_2, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_add_inexact_int, long double, , += 1, 0,
+ LDBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+TEST_FUNCS (long_double_preinc_inexact, long double, ++, , 0,
+ LDBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ -1, 0)
+TEST_FUNCS (long_double_postinc_inexact, long double, , ++, 0,
+ LDBL_EPSILON / 2, NOT_MINUS_1, FE_INEXACT,
+ -1, 0)
+#endif
+TEST_FUNCS (complex_long_double_add_overflow, _Complex long double, , += LDBL_MAX, 0,
+ LDBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_sub_invalid, long double, , -= __builtin_infl (), 0,
+ 0, __builtin_isinf, 0,
+ __builtin_infl (), FE_INVALID)
+TEST_FUNCS (long_double_sub_overflow, long double, , -= LDBL_MAX, 0,
+ -LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+#define NOT_MINUS_LDBL_EPSILON_2(X) ((X) != -LDBL_EPSILON / 2)
+#if LDBL_MANT_DIG != 106
+TEST_FUNCS (long_double_sub_inexact, long double, , -= LDBL_EPSILON / 2, 0,
+ -1.0L, NOT_MINUS_LDBL_EPSILON_2, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_sub_inexact_int, long double, , -= 1, 0,
+ -LDBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (long_double_predec_inexact, long double, --, , 0,
+ -LDBL_EPSILON / 2, NOT_0, FE_INEXACT,
+ 1, 0)
+TEST_FUNCS (long_double_postdec_inexact, long double, , --, 0,
+ -LDBL_EPSILON / 2, NOT_1, FE_INEXACT,
+ 1, 0)
+#endif
+TEST_FUNCS (complex_long_double_sub_overflow, _Complex long double, , -= LDBL_MAX, 0,
+ -LDBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_mul_invalid, long double, , *= __builtin_infl (), 0,
+ __builtin_infl (), __builtin_isinf, 0,
+ 0, FE_INVALID)
+TEST_FUNCS (long_double_mul_overflow, long double, , *= LDBL_MAX, 0,
+ LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_mul_overflow_float, long double, , *= FLT_MAX, 0,
+ LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_mul_overflow_double, long double, , *= DBL_MAX, 0,
+ LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_mul_underflow, long double, , *= LDBL_MIN, 0,
+ LDBL_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ 1, 0)
+#if LDBL_MANT_DIG != 106
+TEST_FUNCS (long_double_mul_inexact, long double, , *= 1 + LDBL_EPSILON, 0,
+ 1 + LDBL_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_mul_inexact_int, long double, , *= 3, 0,
+ 1 + LDBL_EPSILON, NOT_0, FE_INEXACT,
+ 0, 0)
+#endif
+TEST_FUNCS (complex_long_double_mul_overflow, _Complex long double, , *= LDBL_MAX, 0,
+ LDBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_div_invalid_divbyzero, long double, , /= 0.0L, 0,
+ 1, __builtin_isinf, FE_DIVBYZERO,
+ 0, FE_INVALID)
+TEST_FUNCS (long_double_div_overflow, long double, , /= LDBL_MIN, 0,
+ LDBL_MAX, __builtin_isinf, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_div_underflow, long double, , /= LDBL_MAX, 0,
+ LDBL_MIN, IS_0, FE_UNDERFLOW | FE_INEXACT,
+ LDBL_MAX, 0)
+TEST_FUNCS (long_double_div_inexact, long double, , /= 3.0L, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (long_double_div_inexact_int, long double, , /= 3, 0,
+ 1, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (int_div_long_double_inexact, int, , /= 3.0L, 0,
+ 4, NOT_0, FE_INEXACT,
+ 0, 0)
+TEST_FUNCS (complex_long_double_div_overflow, _Complex long double, , /= LDBL_MIN, 0,
+ LDBL_MAX, REAL_ISINF, FE_OVERFLOW | FE_INEXACT,
+ 0, 0)
+
+int
+main (void)
+{
+ int ret = 0;
+ ret |= test_main_float_add_invalid ();
+ ret |= test_main_float_add_invalid_prev ();
+ ret |= test_main_float_add_overflow ();
+ ret |= test_main_float_add_overflow_prev ();
+ ret |= test_main_float_add_overflow_double ();
+ ret |= test_main_float_add_overflow_long_double ();
+ ret |= test_main_float_add_inexact ();
+ ret |= test_main_float_add_inexact_int ();
+ ret |= test_main_float_preinc_inexact ();
+ ret |= test_main_float_postinc_inexact ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_add_float_inexact ();
+#endif
+ ret |= test_main_complex_float_add_overflow ();
+ ret |= test_main_float_sub_invalid ();
+ ret |= test_main_float_sub_overflow ();
+ ret |= test_main_float_sub_inexact ();
+ ret |= test_main_float_sub_inexact_int ();
+ ret |= test_main_float_predec_inexact ();
+ ret |= test_main_float_postdec_inexact ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_sub_float_inexact ();
+#endif
+ ret |= test_main_complex_float_sub_overflow ();
+ ret |= test_main_float_mul_invalid ();
+ ret |= test_main_float_mul_overflow ();
+ ret |= test_main_float_mul_underflow ();
+ ret |= test_main_float_mul_inexact ();
+ ret |= test_main_float_mul_inexact_int ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_mul_float_inexact ();
+#endif
+ ret |= test_main_complex_float_mul_overflow ();
+ ret |= test_main_float_div_invalid_divbyzero ();
+ ret |= test_main_float_div_overflow ();
+ ret |= test_main_float_div_underflow ();
+ ret |= test_main_float_div_inexact ();
+ ret |= test_main_float_div_inexact_int ();
+ ret |= test_main_int_div_float_inexact ();
+ ret |= test_main_complex_float_div_overflow ();
+ ret |= test_main_double_add_invalid ();
+ ret |= test_main_double_add_overflow ();
+ ret |= test_main_double_add_overflow_long_double ();
+ ret |= test_main_double_add_inexact ();
+ ret |= test_main_double_add_inexact_int ();
+ ret |= test_main_double_preinc_inexact ();
+ ret |= test_main_double_postinc_inexact ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_long_add_double_inexact ();
+#endif
+ ret |= test_main_complex_double_add_overflow ();
+ ret |= test_main_double_sub_invalid ();
+ ret |= test_main_double_sub_overflow ();
+ ret |= test_main_double_sub_inexact ();
+ ret |= test_main_double_sub_inexact_int ();
+ ret |= test_main_double_predec_inexact ();
+ ret |= test_main_double_postdec_inexact ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_long_sub_double_inexact ();
+#endif
+ ret |= test_main_complex_double_sub_overflow ();
+ ret |= test_main_double_mul_invalid ();
+ ret |= test_main_double_mul_overflow ();
+ ret |= test_main_double_mul_overflow_float ();
+ ret |= test_main_double_mul_underflow ();
+ ret |= test_main_double_mul_inexact ();
+ ret |= test_main_double_mul_inexact_int ();
+#if FLT_EVAL_METHOD == 0
+ ret |= test_main_long_long_mul_double_inexact ();
+#endif
+ ret |= test_main_complex_double_mul_overflow ();
+ ret |= test_main_double_div_invalid_divbyzero ();
+ ret |= test_main_double_div_overflow ();
+ ret |= test_main_double_div_underflow ();
+ ret |= test_main_double_div_inexact ();
+ ret |= test_main_double_div_inexact_int ();
+ ret |= test_main_int_div_double_inexact ();
+ ret |= test_main_complex_double_div_overflow ();
+ ret |= test_main_long_double_add_invalid ();
+ ret |= test_main_long_double_add_overflow ();
+#if LDBL_MANT_DIG != 106
+ ret |= test_main_long_double_add_inexact ();
+ ret |= test_main_long_double_add_inexact_int ();
+ ret |= test_main_long_double_preinc_inexact ();
+ ret |= test_main_long_double_postinc_inexact ();
+#endif
+ ret |= test_main_complex_long_double_add_overflow ();
+ ret |= test_main_long_double_sub_invalid ();
+ ret |= test_main_long_double_sub_overflow ();
+#if LDBL_MANT_DIG != 106
+ ret |= test_main_long_double_sub_inexact ();
+ ret |= test_main_long_double_sub_inexact_int ();
+ ret |= test_main_long_double_predec_inexact ();
+ ret |= test_main_long_double_postdec_inexact ();
+#endif
+ ret |= test_main_complex_long_double_sub_overflow ();
+ ret |= test_main_long_double_mul_invalid ();
+ ret |= test_main_long_double_mul_overflow ();
+ ret |= test_main_long_double_mul_overflow_float ();
+ ret |= test_main_long_double_mul_overflow_double ();
+ ret |= test_main_long_double_mul_underflow ();
+#if LDBL_MANT_DIG != 106
+ ret |= test_main_long_double_mul_inexact ();
+ ret |= test_main_long_double_mul_inexact_int ();
+#endif
+ ret |= test_main_complex_long_double_mul_overflow ();
+ ret |= test_main_long_double_div_invalid_divbyzero ();
+ ret |= test_main_long_double_div_overflow ();
+ ret |= test_main_long_double_div_underflow ();
+ ret |= test_main_long_double_div_inexact ();
+ ret |= test_main_long_double_div_inexact_int ();
+ ret |= test_main_int_div_long_double_inexact ();
+ ret |= test_main_complex_long_double_div_overflow ();
+ if (ret != 0)
+ abort ();
+ else
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-1.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-1.c
new file mode 100644
index 0000000000..d44c17dd60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-1.c
@@ -0,0 +1,81 @@
+/* Test atomic_compare_exchange routines for existence and proper
+ execution on 1-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic char v = ATOMIC_VAR_INIT (0);
+char expected = 0;
+char max = ~0;
+char desired = ~0;
+char zero = 0;
+
+int
+main ()
+{
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, max, memory_order_relaxed, memory_order_relaxed))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_acquire, memory_order_relaxed))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_release, memory_order_acquire))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak_explicit (&v, &expected, desired, memory_order_acq_rel, memory_order_acquire))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, desired, memory_order_seq_cst, memory_order_seq_cst))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ v = 0;
+
+ if (!atomic_compare_exchange_strong (&v, &expected, max))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-2.c
new file mode 100644
index 0000000000..5647ee6633
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-2.c
@@ -0,0 +1,81 @@
+/* Test atomic_compare_exchange routines for existence and proper
+ execution on 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic short v = ATOMIC_VAR_INIT (0);
+short expected = 0;
+short max = ~0;
+short desired = ~0;
+short zero = 0;
+
+int
+main ()
+{
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, max, memory_order_relaxed, memory_order_relaxed))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_acquire, memory_order_relaxed))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_release, memory_order_acquire))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak_explicit (&v, &expected, desired, memory_order_acq_rel, memory_order_acquire))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, desired, memory_order_seq_cst, memory_order_seq_cst))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ v = 0;
+
+ if (!atomic_compare_exchange_strong (&v, &expected, max))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-3.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-3.c
new file mode 100644
index 0000000000..e29784e5b2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-3.c
@@ -0,0 +1,81 @@
+/* Test atomic_compare_exchange routines for existence and proper
+ execution on 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int v = ATOMIC_VAR_INIT (0);
+int expected = 0;
+int max = ~0;
+int desired = ~0;
+int zero = 0;
+
+int
+main ()
+{
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, max, memory_order_relaxed, memory_order_relaxed))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_acquire, memory_order_relaxed))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_release, memory_order_acquire))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak_explicit (&v, &expected, desired, memory_order_acq_rel, memory_order_acquire))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, desired, memory_order_seq_cst, memory_order_seq_cst))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ v = 0;
+
+ if (!atomic_compare_exchange_strong (&v, &expected, max))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-4.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-4.c
new file mode 100644
index 0000000000..e052dca0c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-compare-exchange-4.c
@@ -0,0 +1,81 @@
+/* Test atomic_compare_exchange routines for existence and proper
+ execution on 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic long long v = ATOMIC_VAR_INIT (0);
+long long expected = 0;
+long long max = ~0LL;
+long long desired = ~0LL;
+long long zero = 0;
+
+int
+main ()
+{
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, max, memory_order_relaxed, memory_order_relaxed))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_acquire, memory_order_relaxed))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, 0, memory_order_release, memory_order_acquire))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak_explicit (&v, &expected, desired, memory_order_acq_rel, memory_order_acquire))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&v, &expected, desired, memory_order_seq_cst, memory_order_seq_cst))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ v = 0;
+
+ if (!atomic_compare_exchange_strong (&v, &expected, max))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, zero))
+ abort ();
+ if (expected != max)
+ abort ();
+ if (v != 0)
+ abort ();
+
+ if (atomic_compare_exchange_weak (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+
+ if (!atomic_compare_exchange_strong (&v, &expected, desired))
+ abort ();
+ if (expected != 0)
+ abort ();
+ if (v != max)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-1.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-1.c
new file mode 100644
index 0000000000..d7c751a34f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-1.c
@@ -0,0 +1,46 @@
+/* Test atomic_exchange routines for existence and proper execution on
+ 1-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic char v;
+char count, ret;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_relaxed) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acquire) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_release) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acq_rel) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_seq_cst) != count)
+ abort ();
+ count++;
+
+ count++;
+
+ ret = atomic_exchange (&v, count);
+ if (ret != count - 1 || v != count)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-2.c
new file mode 100644
index 0000000000..2f1f7e2359
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-2.c
@@ -0,0 +1,46 @@
+/* Test atomic_exchange routines for existence and proper execution on
+ 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic short v;
+short count, ret;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_relaxed) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acquire) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_release) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acq_rel) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_seq_cst) != count)
+ abort ();
+ count++;
+
+ count++;
+
+ ret = atomic_exchange (&v, count);
+ if (ret != count - 1 || v != count)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-3.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-3.c
new file mode 100644
index 0000000000..a62c571878
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-3.c
@@ -0,0 +1,46 @@
+/* Test atomic_exchange routines for existence and proper execution on
+ 4-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int v;
+int count, ret;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_relaxed) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acquire) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_release) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acq_rel) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_seq_cst) != count)
+ abort ();
+ count++;
+
+ count++;
+
+ ret = atomic_exchange (&v, count);
+ if (ret != count - 1 || v != count)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-4.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-4.c
new file mode 100644
index 0000000000..1be9b29994
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-exchange-4.c
@@ -0,0 +1,46 @@
+/* Test atomic_exchange routines for existence and proper execution on
+ 8-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic long long v;
+long long count, ret;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_relaxed) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acquire) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_release) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_acq_rel) != count)
+ abort ();
+ count++;
+
+ if (atomic_exchange_explicit (&v, count + 1, memory_order_seq_cst) != count)
+ abort ();
+ count++;
+
+ count++;
+
+ ret = atomic_exchange (&v, count);
+ if (ret != count - 1 || v != count)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-fence.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-fence.c
new file mode 100644
index 0000000000..5f6c4e0f9d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-fence.c
@@ -0,0 +1,26 @@
+/* Test atomic_*_fence routines for existence and execution with each
+ valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+int
+main ()
+{
+ atomic_thread_fence (memory_order_relaxed);
+ atomic_thread_fence (memory_order_consume);
+ atomic_thread_fence (memory_order_acquire);
+ atomic_thread_fence (memory_order_release);
+ atomic_thread_fence (memory_order_acq_rel);
+ atomic_thread_fence (memory_order_seq_cst);
+
+ atomic_signal_fence (memory_order_relaxed);
+ atomic_signal_fence (memory_order_consume);
+ atomic_signal_fence (memory_order_acquire);
+ atomic_signal_fence (memory_order_release);
+ atomic_signal_fence (memory_order_acq_rel);
+ atomic_signal_fence (memory_order_seq_cst);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
new file mode 100644
index 0000000000..515d5d8dd5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-flag.c
@@ -0,0 +1,39 @@
+/* Test atomic_flag routines for existence and execution. */
+/* The test needs a lockless atomic implementation. */
+/* { dg-do run { xfail hppa*-*-hpux* } } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+atomic_flag a = ATOMIC_FLAG_INIT;
+
+int
+main ()
+{
+ int b;
+
+ if (!atomic_is_lock_free (&a))
+ abort ();
+
+ if (atomic_flag_test_and_set (&a))
+ abort ();
+ atomic_flag_clear_explicit (&a, memory_order_relaxed);
+ if (atomic_flag_test_and_set (&a))
+ abort ();
+ atomic_flag_clear (&a);
+
+ b = atomic_flag_test_and_set_explicit (&a, memory_order_seq_cst);
+ if (!atomic_flag_test_and_set (&a) || b != 0)
+ abort ();
+
+ b = atomic_flag_test_and_set_explicit (&a, memory_order_acq_rel);
+ if (!atomic_flag_test_and_set (&a) || b != 1)
+ abort ();
+
+ atomic_flag_clear_explicit (&a, memory_order_seq_cst);
+ if (atomic_flag_test_and_set (&a))
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-generic.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-generic.c
new file mode 100644
index 0000000000..8033c53739
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-generic.c
@@ -0,0 +1,52 @@
+/* Test generic atomic routines for proper function calling. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort ();
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
+
+typedef struct test {
+ int array[10];
+} test_struct;
+
+test_struct zero = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
+test_struct ones = { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 };
+_Atomic test_struct a;
+test_struct b;
+
+int size = sizeof (test_struct);
+/* Test for consistency on sizes 1, 2, 4, 8, 16 and 32. */
+int
+main ()
+{
+ test_struct c;
+
+ atomic_store_explicit (&a, zero, memory_order_relaxed);
+ if (memcmp (&a, &zero, size))
+ abort ();
+
+ c = atomic_exchange_explicit (&a, ones, memory_order_seq_cst);
+ if (memcmp (&c, &zero, size))
+ abort ();
+ if (memcmp (&a, &ones, size))
+ abort ();
+
+ b = atomic_load_explicit (&a, memory_order_relaxed);
+ if (memcmp (&b, &ones, size))
+ abort ();
+
+ if (!atomic_compare_exchange_strong_explicit (&a, &b, zero, memory_order_seq_cst, memory_order_acquire))
+ abort ();
+ if (memcmp (&a, &zero, size))
+ abort ();
+
+ if (atomic_compare_exchange_weak_explicit (&a, &b, ones, memory_order_seq_cst, memory_order_acquire))
+ abort ();
+ if (memcmp (&b, &zero, size))
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-kill-dep.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-kill-dep.c
new file mode 100644
index 0000000000..fda7fe7d1f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-kill-dep.c
@@ -0,0 +1,19 @@
+/* Test atomic_kill_dependency. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int a = ATOMIC_VAR_INIT (1), b;
+
+int
+main ()
+{
+ b = kill_dependency (a);
+ if (b != 1)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-load-1.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-1.c
new file mode 100644
index 0000000000..16bea684cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-1.c
@@ -0,0 +1,44 @@
+/* Test atomic_load routines for existence and proper execution on
+ 1-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic char v;
+char count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_load_explicit (&v, memory_order_relaxed) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_acquire) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_consume) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_seq_cst) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load (&v) != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-load-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-2.c
new file mode 100644
index 0000000000..6b492d8c2c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-2.c
@@ -0,0 +1,44 @@
+/* Test atomic_load routines for existence and proper execution on
+ 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic short v;
+short count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_load_explicit (&v, memory_order_relaxed) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_acquire) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_consume) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_seq_cst) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load (&v) != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-load-3.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-3.c
new file mode 100644
index 0000000000..c6f2e4b09e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-3.c
@@ -0,0 +1,44 @@
+/* Test atomic_load routines for existence and proper execution on
+ 4-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int v;
+int count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_load_explicit (&v, memory_order_relaxed) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_acquire) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_consume) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_seq_cst) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load (&v) != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-load-4.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-4.c
new file mode 100644
index 0000000000..bc26a5238d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-load-4.c
@@ -0,0 +1,44 @@
+/* Test atomic_load routines for existence and proper execution on
+ 8-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic long long v;
+long long count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ if (atomic_load_explicit (&v, memory_order_relaxed) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_acquire) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_consume) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load_explicit (&v, memory_order_seq_cst) != count++)
+ abort ();
+ else
+ v++;
+
+ if (atomic_load (&v) != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-lockfree.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-lockfree.c
new file mode 100644
index 0000000000..29310e9ce2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-lockfree.c
@@ -0,0 +1,68 @@
+/* Test atomic_is_lock_free. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+#include <stdint.h>
+
+extern void abort ();
+
+_Atomic _Bool aba;
+atomic_bool abt;
+_Atomic char aca;
+atomic_char act;
+_Atomic __CHAR16_TYPE__ ac16a;
+atomic_char16_t ac16t;
+_Atomic __CHAR32_TYPE__ ac32a;
+atomic_char32_t ac32t;
+_Atomic __WCHAR_TYPE__ awca;
+atomic_wchar_t awct;
+_Atomic short asa;
+atomic_short ast;
+_Atomic int aia;
+atomic_int ait;
+_Atomic long ala;
+atomic_long alt;
+_Atomic long long alla;
+atomic_llong allt;
+void *_Atomic apa;
+
+#define CHECK_TYPE(MACRO, V1, V2) \
+ do \
+ { \
+ int r1 = MACRO; \
+ int r2 = atomic_is_lock_free (&V1); \
+ int r3 = atomic_is_lock_free (&V2); \
+ if (r1 != 0 && r1 != 1 && r1 != 2) \
+ abort (); \
+ if (r2 != 0 && r2 != 1) \
+ abort (); \
+ if (r3 != 0 && r3 != 1) \
+ abort (); \
+ if (r1 == 2 && r2 != 1) \
+ abort (); \
+ if (r1 == 2 && r3 != 1) \
+ abort (); \
+ if (r1 == 0 && r2 != 0) \
+ abort (); \
+ if (r1 == 0 && r3 != 0) \
+ abort (); \
+ } \
+ while (0)
+
+int
+main ()
+{
+ CHECK_TYPE (ATOMIC_BOOL_LOCK_FREE, aba, abt);
+ CHECK_TYPE (ATOMIC_CHAR_LOCK_FREE, aca, act);
+ CHECK_TYPE (ATOMIC_CHAR16_T_LOCK_FREE, ac16a, ac16t);
+ CHECK_TYPE (ATOMIC_CHAR32_T_LOCK_FREE, ac32a, ac32t);
+ CHECK_TYPE (ATOMIC_WCHAR_T_LOCK_FREE, awca, awct);
+ CHECK_TYPE (ATOMIC_SHORT_LOCK_FREE, asa, ast);
+ CHECK_TYPE (ATOMIC_INT_LOCK_FREE, aia, ait);
+ CHECK_TYPE (ATOMIC_LONG_LOCK_FREE, ala, alt);
+ CHECK_TYPE (ATOMIC_LLONG_LOCK_FREE, alla, allt);
+ CHECK_TYPE (ATOMIC_POINTER_LOCK_FREE, apa, apa);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-op-1.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-1.c
new file mode 100644
index 0000000000..6513a53402
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-1.c
@@ -0,0 +1,341 @@
+/* Test atomic_fetch routines for existence and proper execution on
+ 1-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic char v;
+char count, res;
+const char init = ~0;
+
+void
+test_fetch_add ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_consume) != 1)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) != 2)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_release) != 3)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) != 4)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_seq_cst) != 5)
+ abort ();
+
+ if (atomic_fetch_add (&v, 1) != 6)
+ abort ();
+}
+
+void
+test_fetch_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_relaxed) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_consume) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acquire) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_release) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acq_rel) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_seq_cst) != res--)
+ abort ();
+
+ if (atomic_fetch_sub (&v, 1) != res--)
+ abort ();
+}
+
+void
+test_fetch_and ()
+{
+ v = init;
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ v = ~v;
+ if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0)
+ abort ();
+
+ if (atomic_fetch_and (&v, 0) != 0)
+ abort ();
+}
+
+void
+test_fetch_xor ()
+{
+ v = init;
+ count = 0;
+
+ if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init)
+ abort ();
+
+ if (atomic_fetch_xor (&v, ~count) != 0)
+ abort ();
+}
+
+void
+test_fetch_or ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 2, memory_order_consume) != 1)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) != 3)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 8, memory_order_release) != 7)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) != 15)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) != 31)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or (&v, count) != 63)
+ abort ();
+}
+
+
+/* Test the OP routines with a result which isn't used. */
+
+void
+test_add ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_add (&v, count);
+ if (v != 1)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_consume);
+ if (v != 2)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 3)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, 1, memory_order_release);
+ if (v != 4)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 5)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_seq_cst);
+ if (v != 6)
+ abort ();
+}
+
+void
+test_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_consume);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, 1, memory_order_release);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != --res)
+ abort ();
+}
+
+void
+test_and ()
+{
+ v = init;
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = init;
+ atomic_fetch_and_explicit (&v, init, memory_order_consume);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, init, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_xor ()
+{
+ v = init;
+ count = 0;
+
+ atomic_fetch_xor (&v, count);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_consume);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor (&v, 0);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor (&v, ~count);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_or ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_or (&v, count);
+ if (v != 1)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_consume);
+ if (v != 3)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, 4);
+ if (v != 7)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, 8, memory_order_release);
+ if (v != 15)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, count);
+ if (v != 31)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_seq_cst);
+ if (v != 63)
+ abort ();
+}
+
+int
+main ()
+{
+ test_fetch_add ();
+ test_fetch_sub ();
+ test_fetch_and ();
+ test_fetch_xor ();
+ test_fetch_or ();
+
+ test_add ();
+ test_sub ();
+ test_and ();
+ test_xor ();
+ test_or ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-op-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-2.c
new file mode 100644
index 0000000000..05edafff0b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-2.c
@@ -0,0 +1,341 @@
+/* Test atomic_fetch routines for existence and proper execution on
+ 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic short v;
+short count, res;
+const short init = ~0;
+
+void
+test_fetch_add ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_consume) != 1)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) != 2)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_release) != 3)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) != 4)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_seq_cst) != 5)
+ abort ();
+
+ if (atomic_fetch_add (&v, 1) != 6)
+ abort ();
+}
+
+void
+test_fetch_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_relaxed) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_consume) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acquire) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_release) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acq_rel) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_seq_cst) != res--)
+ abort ();
+
+ if (atomic_fetch_sub (&v, 1) != res--)
+ abort ();
+}
+
+void
+test_fetch_and ()
+{
+ v = init;
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ v = ~v;
+ if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0)
+ abort ();
+
+ if (atomic_fetch_and (&v, 0) != 0)
+ abort ();
+}
+
+void
+test_fetch_xor ()
+{
+ v = init;
+ count = 0;
+
+ if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init)
+ abort ();
+
+ if (atomic_fetch_xor (&v, ~count) != 0)
+ abort ();
+}
+
+void
+test_fetch_or ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 2, memory_order_consume) != 1)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) != 3)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 8, memory_order_release) != 7)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) != 15)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) != 31)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or (&v, count) != 63)
+ abort ();
+}
+
+
+/* Test the OP routines with a result which isn't used. */
+
+void
+test_add ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_add (&v, count);
+ if (v != 1)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_consume);
+ if (v != 2)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 3)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, 1, memory_order_release);
+ if (v != 4)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 5)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_seq_cst);
+ if (v != 6)
+ abort ();
+}
+
+void
+test_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_consume);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, 1, memory_order_release);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != --res)
+ abort ();
+}
+
+void
+test_and ()
+{
+ v = init;
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = init;
+ atomic_fetch_and_explicit (&v, init, memory_order_consume);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, init, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_xor ()
+{
+ v = init;
+ count = 0;
+
+ atomic_fetch_xor (&v, count);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_consume);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor (&v, 0);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor (&v, ~count);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_or ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_or (&v, count);
+ if (v != 1)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_consume);
+ if (v != 3)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, 4);
+ if (v != 7)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, 8, memory_order_release);
+ if (v != 15)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, count);
+ if (v != 31)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_seq_cst);
+ if (v != 63)
+ abort ();
+}
+
+int
+main ()
+{
+ test_fetch_add ();
+ test_fetch_sub ();
+ test_fetch_and ();
+ test_fetch_xor ();
+ test_fetch_or ();
+
+ test_add ();
+ test_sub ();
+ test_and ();
+ test_xor ();
+ test_or ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-op-3.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-3.c
new file mode 100644
index 0000000000..dc745d4059
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-3.c
@@ -0,0 +1,341 @@
+/* Test atomic_fetch routines for existence and proper execution on
+ 4-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int v;
+int count, res;
+const int init = ~0;
+
+void
+test_fetch_add ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_consume) != 1)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) != 2)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_release) != 3)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) != 4)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_seq_cst) != 5)
+ abort ();
+
+ if (atomic_fetch_add (&v, 1) != 6)
+ abort ();
+}
+
+void
+test_fetch_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_relaxed) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_consume) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acquire) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_release) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acq_rel) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_seq_cst) != res--)
+ abort ();
+
+ if (atomic_fetch_sub (&v, 1) != res--)
+ abort ();
+}
+
+void
+test_fetch_and ()
+{
+ v = init;
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ v = ~v;
+ if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0)
+ abort ();
+
+ if (atomic_fetch_and (&v, 0) != 0)
+ abort ();
+}
+
+void
+test_fetch_xor ()
+{
+ v = init;
+ count = 0;
+
+ if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init)
+ abort ();
+
+ if (atomic_fetch_xor (&v, ~count) != 0)
+ abort ();
+}
+
+void
+test_fetch_or ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 2, memory_order_consume) != 1)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) != 3)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 8, memory_order_release) != 7)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) != 15)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) != 31)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or (&v, count) != 63)
+ abort ();
+}
+
+
+/* Test the OP routines with a result which isn't used. */
+
+void
+test_add ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_add (&v, count);
+ if (v != 1)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_consume);
+ if (v != 2)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 3)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, 1, memory_order_release);
+ if (v != 4)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 5)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_seq_cst);
+ if (v != 6)
+ abort ();
+}
+
+void
+test_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_consume);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, 1, memory_order_release);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != --res)
+ abort ();
+}
+
+void
+test_and ()
+{
+ v = init;
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = init;
+ atomic_fetch_and_explicit (&v, init, memory_order_consume);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, init, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_xor ()
+{
+ v = init;
+ count = 0;
+
+ atomic_fetch_xor (&v, count);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_consume);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor (&v, 0);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor (&v, ~count);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_or ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_or (&v, count);
+ if (v != 1)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_consume);
+ if (v != 3)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, 4);
+ if (v != 7)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, 8, memory_order_release);
+ if (v != 15)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, count);
+ if (v != 31)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_seq_cst);
+ if (v != 63)
+ abort ();
+}
+
+int
+main ()
+{
+ test_fetch_add ();
+ test_fetch_sub ();
+ test_fetch_and ();
+ test_fetch_xor ();
+ test_fetch_or ();
+
+ test_add ();
+ test_sub ();
+ test_and ();
+ test_xor ();
+ test_or ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-op-4.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-4.c
new file mode 100644
index 0000000000..84b83e44f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-op-4.c
@@ -0,0 +1,341 @@
+/* Test atomic_fetch routines for existence and proper execution on
+ 8-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic long long v;
+long long count, res;
+const long long init = ~0;
+
+void
+test_fetch_add ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_consume) != 1)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acquire) != 2)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_release) != 3)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, count, memory_order_acq_rel) != 4)
+ abort ();
+
+ if (atomic_fetch_add_explicit (&v, 1, memory_order_seq_cst) != 5)
+ abort ();
+
+ if (atomic_fetch_add (&v, 1) != 6)
+ abort ();
+}
+
+void
+test_fetch_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_relaxed) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_consume) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acquire) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_release) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, count + 1, memory_order_acq_rel) != res--)
+ abort ();
+
+ if (atomic_fetch_sub_explicit (&v, 1, memory_order_seq_cst) != res--)
+ abort ();
+
+ if (atomic_fetch_sub (&v, 1) != res--)
+ abort ();
+}
+
+void
+test_fetch_and ()
+{
+ v = init;
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, init, memory_order_consume) != 0)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ v = ~v;
+ if (atomic_fetch_and_explicit (&v, init, memory_order_release) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst) != 0)
+ abort ();
+
+ if (atomic_fetch_and (&v, 0) != 0)
+ abort ();
+}
+
+void
+test_fetch_xor ()
+{
+ v = init;
+ count = 0;
+
+ if (atomic_fetch_xor_explicit (&v, count, memory_order_relaxed) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_consume) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acquire) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_release) != 0)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel) != init)
+ abort ();
+
+ if (atomic_fetch_xor_explicit (&v, ~count, memory_order_seq_cst) != init)
+ abort ();
+
+ if (atomic_fetch_xor (&v, ~count) != 0)
+ abort ();
+}
+
+void
+test_fetch_or ()
+{
+ v = 0;
+ count = 1;
+
+ if (atomic_fetch_or_explicit (&v, count, memory_order_relaxed) != 0)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 2, memory_order_consume) != 1)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acquire) != 3)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, 8, memory_order_release) != 7)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_acq_rel) != 15)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or_explicit (&v, count, memory_order_seq_cst) != 31)
+ abort ();
+
+ count *= 2;
+ if (atomic_fetch_or (&v, count) != 63)
+ abort ();
+}
+
+
+/* Test the OP routines with a result which isn't used. */
+
+void
+test_add ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_add (&v, count);
+ if (v != 1)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_consume);
+ if (v != 2)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 3)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, 1, memory_order_release);
+ if (v != 4)
+ abort ();
+
+ atomic_fetch_add (&v, 1);
+ if (v != 5)
+ abort ();
+
+ atomic_fetch_add_explicit (&v, count, memory_order_seq_cst);
+ if (v != 6)
+ abort ();
+}
+
+void
+test_sub ()
+{
+ v = res = 20;
+ count = 0;
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_consume);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, 1, memory_order_release);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub (&v, count + 1);
+ if (v != --res)
+ abort ();
+
+ atomic_fetch_sub_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != --res)
+ abort ();
+}
+
+void
+test_and ()
+{
+ v = init;
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = init;
+ atomic_fetch_and_explicit (&v, init, memory_order_consume);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, init, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_and (&v, 0);
+ if (v != 0)
+ abort ();
+
+ v = ~v;
+ atomic_fetch_and_explicit (&v, 0, memory_order_seq_cst);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_xor ()
+{
+ v = init;
+ count = 0;
+
+ atomic_fetch_xor (&v, count);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_consume);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor (&v, 0);
+ if (v != 0)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, ~count, memory_order_release);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor_explicit (&v, 0, memory_order_acq_rel);
+ if (v != init)
+ abort ();
+
+ atomic_fetch_xor (&v, ~count);
+ if (v != 0)
+ abort ();
+}
+
+void
+test_or ()
+{
+ v = 0;
+ count = 1;
+
+ atomic_fetch_or (&v, count);
+ if (v != 1)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_consume);
+ if (v != 3)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, 4);
+ if (v != 7)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, 8, memory_order_release);
+ if (v != 15)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or (&v, count);
+ if (v != 31)
+ abort ();
+
+ count *= 2;
+ atomic_fetch_or_explicit (&v, count, memory_order_seq_cst);
+ if (v != 63)
+ abort ();
+}
+
+int
+main ()
+{
+ test_fetch_add ();
+ test_fetch_sub ();
+ test_fetch_and ();
+ test_fetch_xor ();
+ test_fetch_or ();
+
+ test_add ();
+ test_sub ();
+ test_and ();
+ test_xor ();
+ test_or ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-store-1.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-1.c
new file mode 100644
index 0000000000..f7936dabc1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-1.c
@@ -0,0 +1,43 @@
+/* Test atomic_store routines for existence and proper execution on
+ 1-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic char v;
+char count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ atomic_init (&v, count + 1);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_relaxed);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_release);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != ++count)
+ abort ();
+
+ count++;
+
+ atomic_store (&v, count);
+ if (v != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-store-2.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-2.c
new file mode 100644
index 0000000000..0bbba1cef8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-2.c
@@ -0,0 +1,43 @@
+/* Test atomic_store routines for existence and proper execution on
+ 2-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic short v;
+short count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ atomic_init (&v, count + 1);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_relaxed);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_release);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != ++count)
+ abort ();
+
+ count++;
+
+ atomic_store (&v, count);
+ if (v != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-store-3.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-3.c
new file mode 100644
index 0000000000..86c1b2aa88
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-3.c
@@ -0,0 +1,43 @@
+/* Test atomic_store routines for existence and proper execution on
+ 4-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic int v;
+int count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ atomic_init (&v, count + 1);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_relaxed);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_release);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != ++count)
+ abort ();
+
+ count++;
+
+ atomic_store (&v, count);
+ if (v != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-store-4.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-4.c
new file mode 100644
index 0000000000..fe96469a9b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-store-4.c
@@ -0,0 +1,43 @@
+/* Test atomic_store routines for existence and proper execution on
+ 8-byte values with each valid memory model. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+_Atomic long long v;
+long long count;
+
+int
+main ()
+{
+ v = 0;
+ count = 0;
+
+ atomic_init (&v, count + 1);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_relaxed);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_release);
+ if (v != ++count)
+ abort ();
+
+ atomic_store_explicit (&v, count + 1, memory_order_seq_cst);
+ if (v != ++count)
+ abort ();
+
+ count++;
+
+ atomic_store (&v, count);
+ if (v != count)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/atomic/stdatomic-vm.c b/gcc/testsuite/gcc.dg/atomic/stdatomic-vm.c
new file mode 100644
index 0000000000..f43fa49ef1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/atomic/stdatomic-vm.c
@@ -0,0 +1,68 @@
+/* Test atomic operations on expressions of variably modified type
+ with side effects. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+extern void abort (void);
+
+int s = 5;
+
+int count = 0;
+
+int
+func (void)
+{
+ count++;
+ return 0;
+}
+
+int
+main (void)
+{
+ int vla[s][s];
+ int (*_Atomic p)[s] = &vla[0];
+ int (*b)[s] = kill_dependency (++p);
+ if (b != &vla[1] || p != &vla[1])
+ abort ();
+ int (*_Atomic *q)[s] = &p;
+ atomic_store_explicit (q + func (), &vla[0], memory_order_seq_cst);
+ if (count != 1)
+ abort ();
+ atomic_store (q + func (), &vla[0]);
+ if (count != 2)
+ abort ();
+ (void) atomic_load_explicit (q + func (), memory_order_seq_cst);
+ if (count != 3)
+ abort ();
+ (void) atomic_load (q + func ());
+ if (count != 4)
+ abort ();
+ (void) atomic_exchange_explicit (q + func (), &vla[0], memory_order_seq_cst);
+ if (count != 5)
+ abort ();
+ (void) atomic_exchange (q + func (), &vla[0]);
+ if (count != 6)
+ abort ();
+ int vla2[s][s];
+ int (*p2)[s] = &vla2[0];
+ int (**qna)[s] = &p2;
+ (void) atomic_compare_exchange_strong_explicit (q + func (), qna, &vla[0],
+ memory_order_seq_cst,
+ memory_order_seq_cst);
+ if (count != 7)
+ abort ();
+ (void) atomic_compare_exchange_strong (q + func (), qna, &vla[0]);
+ if (count != 8)
+ abort ();
+ (void) atomic_compare_exchange_weak_explicit (q + func (), qna, &vla[0],
+ memory_order_seq_cst,
+ memory_order_seq_cst);
+ if (count != 9)
+ abort ();
+ (void) atomic_compare_exchange_weak (q + func (), qna, &vla[0]);
+ if (count != 10)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/attr-alias-3.c b/gcc/testsuite/gcc.dg/attr-alias-3.c
index 02637b2313..6ff1b475ad 100644
--- a/gcc/testsuite/gcc.dg/attr-alias-3.c
+++ b/gcc/testsuite/gcc.dg/attr-alias-3.c
@@ -1,5 +1,5 @@
// { dg-do link }
-// { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } }
+// { dg-skip-if "" { "powerpc-ibm-aix*" } { "*" } { "" } }
// { dg-require-alias "" }
// { dg-options "-O2 -fno-common" }
diff --git a/gcc/testsuite/gcc.dg/attr-alias-5.c b/gcc/testsuite/gcc.dg/attr-alias-5.c
index d22c286fc6..56d9b302c6 100644
--- a/gcc/testsuite/gcc.dg/attr-alias-5.c
+++ b/gcc/testsuite/gcc.dg/attr-alias-5.c
@@ -4,6 +4,7 @@
/* { dg-options "-std=gnu99" } */
/* { dg-require-alias "" } */
/* { dg-require-ascii-locale "" } */
+/* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
void f0 (void) __attribute__((alias("\xa1"))); /* { dg-error "undefined symbol '\\\\241'" } */
void f1 (void) __attribute__((alias("\u00e9"))); /* { dg-error "undefined symbol '\\\\U000000e9'" } */
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_align-1.c b/gcc/testsuite/gcc.dg/attr-alloc_align-1.c
new file mode 100644
index 0000000000..45f5ec065e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-alloc_align-1.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+double *my_alloc1 (int len, int align) __attribute__((__alloc_align__ (2)));
+double *my_alloc2 (int align, int len) __attribute__((alloc_align (1)));
+
+void
+test1 (int len, int align)
+{
+ int i;
+ double *__restrict o1 = my_alloc1 (len, 32);
+ double *__restrict o2 = my_alloc1 (len, 32);
+ double *__restrict o3 = my_alloc1 (len, 32);
+ double *__restrict i1 = my_alloc1 (len, 32);
+ double *__restrict i2 = my_alloc1 (len, align);
+ for (i = 0; i < len; ++i)
+ {
+ o1[i] = i1[i] * i2[i];
+ o2[i] = i1[i] + i2[i];
+ o3[i] = i1[i] - i2[i];
+ }
+}
+
+void
+test2 (int len, int align)
+{
+ int i;
+ double *__restrict o1 = my_alloc2 (32, len);
+ double *__restrict o2 = my_alloc2 (32, len);
+ double *__restrict o3 = my_alloc2 (32, len);
+ double *__restrict i1 = my_alloc2 (32, len);
+ double *__restrict i2 = my_alloc2 (align, len);
+ for (i = 0; i < len; ++i)
+ {
+ o1[i] = i1[i] * i2[i];
+ o2[i] = i1[i] + i2[i];
+ o3[i] = i1[i] - i2[i];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_align-2.c b/gcc/testsuite/gcc.dg/attr-alloc_align-2.c
new file mode 100644
index 0000000000..3dc7a21983
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-alloc_align-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+int i;
+void *f1 (int) __attribute__((alloc_align (1)));
+void *f2 (int, int, int) __attribute__((alloc_align (3)));
+void *f3 (void) __attribute__((alloc_align)); /* { dg-error "wrong number of arguments specified" } */
+void *f4 (int, int) __attribute__((alloc_align (1, 2))); /* { dg-error "wrong number of arguments specified" } */
+void *f5 (void) __attribute__((alloc_align (i))); /* { dg-warning "outside range" } */
+void *f6 (int) __attribute__((alloc_align (0))); /* { dg-warning "outside range" } */
+void *f7 (int) __attribute__((alloc_align (2))); /* { dg-warning "outside range" } */
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_align-3.c b/gcc/testsuite/gcc.dg/attr-alloc_align-3.c
new file mode 100644
index 0000000000..2efe0c0684
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-alloc_align-3.c
@@ -0,0 +1,56 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+char *my_alloc1 (int len, int align) __attribute__((__alloc_align__ (2)));
+char *my_alloc2 (int align, int len) __attribute__((alloc_align (1)));
+
+int
+test1 (int len)
+{
+ int i;
+ char *p = my_alloc1 (len, 32);
+ return ((__INTPTR_TYPE__) p) & 31;
+}
+
+int
+test2 (int len)
+{
+ int i;
+ char *p = my_alloc2 (32, len);
+ return ((__INTPTR_TYPE__) p) & 31;
+}
+
+int
+test3 (int len)
+{
+ int i;
+ char *p = my_alloc1 (len, 16);
+ return ((__INTPTR_TYPE__) p) & 15;
+}
+
+int
+test4 (int len)
+{
+ int i;
+ char *p = my_alloc2 (16, len);
+ return ((__INTPTR_TYPE__) p) & 15;
+}
+
+int
+test5 (int len, int align)
+{
+ int i;
+ char *p = my_alloc1 (len, align);
+ return ((__INTPTR_TYPE__) p) & 15;
+}
+
+int
+test6 (int len, int align)
+{
+ int i;
+ char *p = my_alloc2 (align, len);
+ return ((__INTPTR_TYPE__) p) & 15;
+}
+
+/* { dg-final { scan-tree-dump-times "return 0" 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/attr-alloc_size.c b/gcc/testsuite/gcc.dg/attr-alloc_size.c
index 47d7c00508..e8129ceae9 100644
--- a/gcc/testsuite/gcc.dg/attr-alloc_size.c
+++ b/gcc/testsuite/gcc.dg/attr-alloc_size.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wall" } */
+/* { dg-options "-O2 -Wall -ftrack-macro-expansion=0" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/attr-assume_aligned-1.c b/gcc/testsuite/gcc.dg/attr-assume_aligned-1.c
new file mode 100644
index 0000000000..9a7d5a1ffe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-assume_aligned-1.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+double *my_alloc1 (int len) __attribute__((__assume_aligned__ (16)));
+double *my_alloc2 (int len) __attribute__((__assume_aligned__ (32, 16)));
+
+void
+test1 (int len)
+{
+ int i;
+ double *__restrict o1 = my_alloc1 (len);
+ double *__restrict o2 = my_alloc1 (len);
+ double *__restrict o3 = my_alloc1 (len);
+ double *__restrict i1 = my_alloc1 (len);
+ double *__restrict i2 = my_alloc1 (len);
+ for (i = 0; i < len; ++i)
+ {
+ o1[i] = i1[i] * i2[i];
+ o2[i] = i1[i] + i2[i];
+ o3[i] = i1[i] - i2[i];
+ }
+}
+
+void
+test2 (int len)
+{
+ int i;
+ double *__restrict o1 = my_alloc2 (len);
+ double *__restrict o2 = my_alloc2 (len);
+ double *__restrict o3 = my_alloc2 (len);
+ double *__restrict i1 = my_alloc2 (len);
+ double *__restrict i2 = my_alloc2 (len);
+ for (i = 0; i < len; ++i)
+ {
+ o1[i] = i1[i] * i2[i];
+ o2[i] = i1[i] + i2[i];
+ o3[i] = i1[i] - i2[i];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/attr-assume_aligned-2.c b/gcc/testsuite/gcc.dg/attr-assume_aligned-2.c
new file mode 100644
index 0000000000..9ab558945b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-assume_aligned-2.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+int i;
+void *f1 (void) __attribute__((assume_aligned (32)));
+void *f2 (void) __attribute__((assume_aligned (16, 4)));
+void *f3 (void) __attribute__((assume_aligned)); /* { dg-error "wrong number of arguments specified" } */
+void *f4 (void) __attribute__((assume_aligned (32, 16, 8))); /* { dg-error "wrong number of arguments specified" } */
+void *f5 (void) __attribute__((assume_aligned (i))); /* { dg-warning "integer constant" } */
diff --git a/gcc/testsuite/gcc.dg/attr-assume_aligned-3.c b/gcc/testsuite/gcc.dg/attr-assume_aligned-3.c
new file mode 100644
index 0000000000..3731aac50e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-assume_aligned-3.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+char *my_alloc1 (int len) __attribute__((__assume_aligned__ (32)));
+char *my_alloc2 (int len) __attribute__((assume_aligned (32, 4)));
+
+int
+test1 (int len)
+{
+ int i;
+ char *p = my_alloc1 (len);
+ return ((__INTPTR_TYPE__) p) & 31;
+}
+
+int
+test2 (int len)
+{
+ int i;
+ char *p = my_alloc2 (len);
+ return (((__INTPTR_TYPE__) p) & 31) != 4;
+}
+
+/* { dg-final { scan-tree-dump-times "return 0" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/attr-hotcold-1.c b/gcc/testsuite/gcc.dg/attr-hotcold-1.c
new file mode 100644
index 0000000000..f63a95c71c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/attr-hotcold-1.c
@@ -0,0 +1,8 @@
+void f(void)
+{
+ goto A;
+ A: __attribute__((cold))
+ goto B;
+ B: __attribute__((hot))
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c b/gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c
deleted file mode 100644
index 3bda1014ca..0000000000
--- a/gcc/testsuite/gcc.dg/attr-isr-nosave_low_regs.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
-/* { dg-options "-O" } */
-
-extern void bar ();
-
-void foo ()
-{
-}
-
-#pragma interrupt
-void ( __attribute__ ((nosave_low_regs)) isr) ()
-{
- bar ();
-}
-
-void delay(int a)
-{
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
-/* A call will clobber all call-saved registers, but because of
- #pragma nosave_low_regs, r0..r7 need not be saved/restored.
- One of these registers will also do fine to hold the function address.
- Call-saved registers r8..r13 also don't need to be restored. */
-/* { dg-final { scan-assembler-not "\[^f\]r\[0-9\]\[ \t\]*," } } */
-/* { dg-final { scan-assembler-not "\[^f\]r\[89\]" } } */
-/* { dg-final { scan-assembler-not "\[^f\]r1\[,0-3\]" } } */
-/* { dg-final { scan-assembler-times "macl" 2} } */
diff --git a/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c b/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c
deleted file mode 100644
index 7ea24c494f..0000000000
--- a/gcc/testsuite/gcc.dg/attr-isr-trap_exit.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-* } } */
-/* { dg-options "-O" } */
-/* Check that trapa / interrput_handler attributes can paired in
- either order. */
-void h0() __attribute__ ((trap_exit (4))) __attribute__ ((interrupt_handler));
-void h1() __attribute__ ((interrupt_handler)) __attribute__ ((trap_exit (5)));
-
-void foo ()
-{
-}
-
-void h0 () {}
-/* { dg-final { scan-assembler "trapa\[ \t\]\[ \t\]*#4"} } */
-/* { dg-final { scan-assembler-times "trapa" 1} } */
-
-void delay(int a)
-{
-}
-int main()
-{
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/attr-isr-trapa.c b/gcc/testsuite/gcc.dg/attr-isr-trapa.c
deleted file mode 100644
index 47caf2112d..0000000000
--- a/gcc/testsuite/gcc.dg/attr-isr-trapa.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
-/* { dg-options "-O" } */
-extern void foo ();
-
-void
-(__attribute__ ((trapa_handler)) isr) ()
-{
- foo ();
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
-/* No interrupt-specific saves should be needed. /
-/* { dg-final { scan-assembler-not "\[^f\]r\[0-7\]\[ \t,\]\[^\n\]*r15" } } */
-/* { dg-final { scan-assembler-not "@r15\[^\n\]*\[^f\]r\[0-7\]\n" } } */
-/* { dg-final { scan-assembler-not "\[^f\]r\[8-9\]" } } */
-/* { dg-final { scan-assembler-not "\[^f\]r1\[,0-3\]" } } */
-/* { dg-final { scan-assembler-not "macl" } } */
diff --git a/gcc/testsuite/gcc.dg/attr-weakref-1.c b/gcc/testsuite/gcc.dg/attr-weakref-1.c
index 31d5379e47..9ed1c51b3a 100644
--- a/gcc/testsuite/gcc.dg/attr-weakref-1.c
+++ b/gcc/testsuite/gcc.dg/attr-weakref-1.c
@@ -2,15 +2,16 @@
// { dg-require-weak "" }
// On darwin, we use attr-weakref-1-darwin.c.
// This test requires support for undefined weak symbols. This support
-// is not available on alpha*-dec-osf* and hppa*-*-hpux*. The test is
-// skipped rather than xfailed to suppress the warning that would otherwise
-// arise.
-// { dg-skip-if "" { "alpha*-dec-osf*" "*-*-darwin*" "hppa*-*-hpux*" } "*" { "" } }
+// is not available on hppa*-*-hpux*. The test is skipped rather than
+// xfailed to suppress the warning that would otherwise arise.
+// { dg-skip-if "" { "hppa*-*-hpux*" "*-*-aix*" } "*" { "" } }
// For kernel modules and static RTPs, the loader treats undefined weak
// symbols in the same way as undefined strong symbols. The test
// therefore fails to load, so skip it.
// { dg-skip-if "" { "*-*-vxworks*" && nonpic } "*" { "-non-static" } }
// { dg-options "-O2" }
+// { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } }
+// { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } }
// { dg-additional-sources "attr-weakref-1a.c" }
// Copyright 2005 Free Software Foundation, Inc.
diff --git a/gcc/testsuite/gcc.dg/auto-type-1.c b/gcc/testsuite/gcc.dg/auto-type-1.c
new file mode 100644
index 0000000000..f47693abbf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/auto-type-1.c
@@ -0,0 +1,37 @@
+/* Test __auto_type. Test correct uses. */
+/* { dg-do run } */
+/* { dg-options "" } */
+
+extern void abort (void);
+extern void exit (int);
+
+__auto_type i = 1;
+extern int i;
+__auto_type c = (char) 1;
+extern char c;
+static __auto_type u = 10U;
+extern unsigned int u;
+const __auto_type ll = 1LL;
+extern const long long ll;
+
+int
+main (void)
+{
+ if (i != 1 || c != 1 || u != 10U)
+ abort ();
+ __auto_type ai = i;
+ int *aip = &ai;
+ if (ai != 1)
+ abort ();
+ __auto_type p = (int (*) [++i]) 0;
+ if (i != 2)
+ abort ();
+ if (sizeof (*p) != 2 * sizeof (int))
+ abort ();
+ int vla[u][u];
+ int (*vp)[u] = &vla[0];
+ __auto_type vpp = ++vp;
+ if (vp != &vla[1])
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/auto-type-2.c b/gcc/testsuite/gcc.dg/auto-type-2.c
new file mode 100644
index 0000000000..761671b3c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/auto-type-2.c
@@ -0,0 +1,23 @@
+/* Test __auto_type. Test invalid uses. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+__auto_type; /* { dg-error "empty declaration" } */
+__auto_type *p = (int *) 0; /* { dg-error "plain identifier" } */
+struct s0 { int i : 1; } x;
+void f (void) { __auto_type v = x.i; } /* { dg-error "bit-field initializer" } */
+__auto_type i; /* { dg-error "initialized data declaration" } */
+__auto_type g { } /* { dg-error "initialized data declaration" } */
+__auto_type a = 1, b = 2; /* { dg-error "single declarator" } */
+__auto_type long e0 = 0; /* { dg-error "__auto_type" } */
+__auto_type short e1 = 0; /* { dg-error "__auto_type" } */
+__auto_type signed e2 = 0; /* { dg-error "__auto_type" } */
+__auto_type unsigned e3 = 0; /* { dg-error "__auto_type" } */
+__auto_type _Complex e4 = 0; /* { dg-error "__auto_type" } */
+long __auto_type e5 = 0; /* { dg-error "__auto_type" } */
+short __auto_type e6 = 0; /* { dg-error "__auto_type" } */
+signed __auto_type e7 = 0; /* { dg-error "__auto_type" } */
+unsigned __auto_type e8 = 0; /* { dg-error "__auto_type" } */
+_Complex __auto_type e9 = 0; /* { dg-error "__auto_type" } */
+int __auto_type e10 = 0; /* { dg-error "two or more data types" } */
+__auto_type _Bool e11 = 0; /* { dg-error "two or more data types" } */
diff --git a/gcc/testsuite/gcc.dg/autopar/autopar.exp b/gcc/testsuite/gcc.dg/autopar/autopar.exp
index d19e51f7fe..c20cc3d47f 100644
--- a/gcc/testsuite/gcc.dg/autopar/autopar.exp
+++ b/gcc/testsuite/gcc.dg/autopar/autopar.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-1.c b/gcc/testsuite/gcc.dg/autopar/outer-1.c
index 913d390f68..a9d2185f0c 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-1.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-1.c
@@ -28,6 +28,6 @@ int main(void)
/* Check that outer loop is parallelized. */
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-2.c b/gcc/testsuite/gcc.dg/autopar/outer-2.c
index b2e5159820..e0a142f0d1 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-2.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-2.c
@@ -28,6 +28,6 @@ int main(void)
}
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-3.c b/gcc/testsuite/gcc.dg/autopar/outer-3.c
index 2f1033f983..c6e0adbffd 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-3.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-3.c
@@ -28,6 +28,6 @@ int main(void)
/* Check that outer loop is parallelized. */
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-4.c b/gcc/testsuite/gcc.dg/autopar/outer-4.c
index 56f6123385..d60023f5d8 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-4.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-4.c
@@ -32,6 +32,6 @@ int main(void)
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-5.c b/gcc/testsuite/gcc.dg/autopar/outer-5.c
index 3a542988c2..fa80293263 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-5.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-5.c
@@ -45,6 +45,6 @@ int main(void)
}
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/outer-6.c b/gcc/testsuite/gcc.dg/autopar/outer-6.c
index 6e027d2f69..b16366932f 100644
--- a/gcc/testsuite/gcc.dg/autopar/outer-6.c
+++ b/gcc/testsuite/gcc.dg/autopar/outer-6.c
@@ -46,6 +46,6 @@ int main(void)
/* Check that outer loop is parallelized. */
/* { dg-final { scan-tree-dump-times "parallelizing outer loop" 1 "parloops" } } */
/* { dg-final { scan-tree-dump-times "parallelizing inner loop" 0 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/parallelization-1.c b/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
index f53be8598d..de2a0f3cc7 100644
--- a/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
+++ b/gcc/testsuite/gcc.dg/autopar/parallelization-1.c
@@ -28,6 +28,6 @@ int main(void)
/* Check that the first loop in parloop got parallelized. */
/* { dg-final { scan-tree-dump-times "SUCCESS: may be parallelized" 1 "parloops" } } */
-/* { dg-final { scan-tree-dump-times "loopfn" 5 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "loopfn" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "parloops" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/autopar/pr49960.c b/gcc/testsuite/gcc.dg/autopar/pr49960.c
index 1f3482f170..5dacb8de84 100644
--- a/gcc/testsuite/gcc.dg/autopar/pr49960.c
+++ b/gcc/testsuite/gcc.dg/autopar/pr49960.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized" } */
+/* { dg-options "-O2 -ftree-parallelize-loops=4 -fdump-tree-parloops-details -fdump-tree-optimized -fno-partial-inlining" } */
#include <stdio.h>
#define MB 100
@@ -11,6 +11,13 @@ void MRTRBR(int MA_1, int NA_1, int MB_1)
{
int i,j, t,k;
+ /* At the moment we are not able to hoist the loop headers out of the loop
+ nest.
+ Partial inlining needs to be disabled so we do not optimize this out
+ of the function body. */
+ if (MA_1 < 4 || NA_1 < 4 || MB_1 < 4)
+ return;
+
/* The outer most loop is not parallel because for different k's there
is write-write dependency for T[i][j]. */
diff --git a/gcc/testsuite/gcc.dg/autopar/pr57103.c b/gcc/testsuite/gcc.dg/autopar/pr57103.c
new file mode 100644
index 0000000000..fa70676074
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/autopar/pr57103.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-parallelize-loops=4" } */
+
+int d[1024];
+
+static inline int foo (void)
+{
+ int s = 0;
+ int i = 0;
+ for (; i < 1024; i++)
+ s += d[i];
+ return s;
+}
+
+void bar (void)
+{
+ if (foo ())
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/autopar/pr57185.c b/gcc/testsuite/gcc.dg/autopar/pr57185.c
new file mode 100644
index 0000000000..b4657576dc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/autopar/pr57185.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-parallelize-loops=2 -fipa-pta" } */
+
+int a, b;
+int *d;
+void f(void)
+{
+ int c;
+ b %= 1;
+
+ if(1 - (b < 1))
+ {
+ int *q = 0;
+
+ if(a)
+ {
+ c = 0;
+lbl:
+ for(*d; *d; ++*d)
+ if(c ? : a ? : (c = 1) ? : 0)
+ *q &= 1;
+ return;
+ }
+
+ q = (int *)1;
+ }
+ goto lbl;
+}
+
diff --git a/gcc/testsuite/gcc.dg/bf-ms-layout.c b/gcc/testsuite/gcc.dg/bf-ms-layout.c
index 3acd1e4a69..109a01b0a0 100644
--- a/gcc/testsuite/gcc.dg/bf-ms-layout.c
+++ b/gcc/testsuite/gcc.dg/bf-ms-layout.c
@@ -153,27 +153,27 @@ int main(){
struct ten test_ten;
#if defined (_TEST_MS_LAYOUT) || defined (_MSC_VER)
- size_t exp_sizeof_one = 12;
- size_t exp_sizeof_two = 16;
+ size_t exp_sizeof_one = 8;
+ size_t exp_sizeof_two = 12;
size_t exp_sizeof_three =6;
size_t exp_sizeof_four = 8;
size_t exp_sizeof_five = 3;
size_t exp_sizeof_six = 8;
size_t exp_sizeof_seven = 3;
- size_t exp_sizeof_eight = 4;
+ size_t exp_sizeof_eight = 2;
size_t exp_sizeof_nine = 8;
- size_t exp_sizeof_ten = 16;
+ size_t exp_sizeof_ten = 8;
- unsigned char exp_one_c = 8;
- unsigned char exp_two_c = 12;
+ unsigned char exp_one_c = 7;
+ unsigned char exp_two_c = 9;
unsigned char exp_three_c = 4;
unsigned char exp_four_c = 4;
char exp_five_c = 2;
char exp_six_c = 5;
char exp_seven_c = 2;
- char exp_eight_c = 2;
+ char exp_eight_c = 1;
char exp_nine_c = 0;
- char exp_ten_c = 8;
+ char exp_ten_c = 1;
#else /* testing -mno-ms-bitfields */
diff --git a/gcc/testsuite/gcc.dg/binary-constants-2.c b/gcc/testsuite/gcc.dg/binary-constants-2.c
index 40d7636465..6c3928aa2a 100644
--- a/gcc/testsuite/gcc.dg/binary-constants-2.c
+++ b/gcc/testsuite/gcc.dg/binary-constants-2.c
@@ -2,7 +2,7 @@
/* Origin: Joerg Wunsch <j.gnu@uriah.heep.sax.de>. */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic" } */
+/* { dg-options "-std=iso9899:1999 -pedantic -ftrack-macro-expansion=0" } */
#define FOO 0b1101
diff --git a/gcc/testsuite/gcc.dg/binary-constants-3.c b/gcc/testsuite/gcc.dg/binary-constants-3.c
index 984477dca1..410fc4cd72 100644
--- a/gcc/testsuite/gcc.dg/binary-constants-3.c
+++ b/gcc/testsuite/gcc.dg/binary-constants-3.c
@@ -2,7 +2,7 @@
/* Origin: Joerg Wunsch <j.gnu@uriah.heep.sax.de>. */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors -ftrack-macro-expansion=0" } */
#define FOO 0b1101
diff --git a/gcc/testsuite/gcc.dg/binop-xor1.c b/gcc/testsuite/gcc.dg/binop-xor1.c
index 48f6b42595..c6a19cf01d 100644
--- a/gcc/testsuite/gcc.dg/binop-xor1.c
+++ b/gcc/testsuite/gcc.dg/binop-xor1.c
@@ -7,5 +7,5 @@ foo (int a, int b, int c)
return ((a && !b && c) || (!a && b && c));
}
-/* { dg-final { scan-tree-dump-times "\\\^" 1 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "\\\^" 1 "optimized" { xfail logical_op_short_circuit } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/binop-xor3.c b/gcc/testsuite/gcc.dg/binop-xor3.c
index 9d3b50bd4e..4c2694a77d 100644
--- a/gcc/testsuite/gcc.dg/binop-xor3.c
+++ b/gcc/testsuite/gcc.dg/binop-xor3.c
@@ -7,5 +7,5 @@ foo (int a, int b)
return ((a && !b) || (!a && b));
}
-/* { dg-final { scan-tree-dump-times "\\\^" 1 "optimized" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "\\\^" 1 "optimized" { target i?86-*-* x86_64-*-* } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-apply2.c b/gcc/testsuite/gcc.dg/builtin-apply2.c
index c5b841a849..3ae2adc6e0 100644
--- a/gcc/testsuite/gcc.dg/builtin-apply2.c
+++ b/gcc/testsuite/gcc.dg/builtin-apply2.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
-/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "avr-*-*" } { "*" } { "" } } */
-/* { dg-skip-if "Variadic funcs use Base AAPCS. Normal funcs use VFP variant." { "arm*-*-*" } { "-mfloat-abi=hard" } { "" } } */
+/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { "aarch64*-*-* avr-*-* nds32*-*-*" } { "*" } { "" } } */
+/* { dg-skip-if "Variadic funcs use Base AAPCS. Normal funcs use VFP variant." { arm*-*-* && arm_hf_eabi } { "*" } { "" } } */
/* PR target/12503 */
/* Origin: <pierre.nguyen-tuong@asim.lip6.fr> */
@@ -17,6 +17,9 @@
E, F and G are passed on stack. So the size of the stack argument
data is 20. */
#define STACK_ARGUMENTS_SIZE 20
+#elif defined __MMIX__ || defined __arc__
+/* No parameters on stack for bar. */
+#define STACK_ARGUMENTS_SIZE 0
#else
#define STACK_ARGUMENTS_SIZE 64
#endif
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-1.c b/gcc/testsuite/gcc.dg/builtin-bswap-1.c
index 6b4a805536..724ba1e984 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-1.c
@@ -5,11 +5,29 @@
#include <stdint.h>
-uint32_t foo (uint32_t a)
+uint16_t foo16 (uint16_t a)
{
- int b;
+ uint16_t b;
+
+ b = __builtin_bswap16 (a);
+
+ return b;
+}
+
+uint32_t foo32 (uint32_t a)
+{
+ uint32_t b;
b = __builtin_bswap32 (a);
return b;
}
+
+uint64_t foo64 (uint64_t a)
+{
+ uint64_t b;
+
+ b = __builtin_bswap64 (a);
+
+ return b;
+}
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-4.c b/gcc/testsuite/gcc.dg/builtin-bswap-4.c
index 03e190ad78..da8ee68cd5 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-4.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-4.c
@@ -16,11 +16,19 @@
return result; \
} \
+MAKE_FUN(16, uint16_t);
MAKE_FUN(32, uint32_t);
MAKE_FUN(64, uint64_t);
extern void abort (void);
+#define NUMS16 \
+ { \
+ 0x0000, \
+ 0x1122, \
+ 0xffff, \
+ }
+
#define NUMS32 \
{ \
0x00000000UL, \
@@ -35,6 +43,9 @@ extern void abort (void);
0xffffffffffffffffULL, \
}
+uint16_t uint16_ts[] =
+ NUMS16;
+
uint32_t uint32_ts[] =
NUMS32;
@@ -48,6 +59,10 @@ main (void)
{
int i;
+ for (i = 0; i < N(uint16_ts); i++)
+ if (__builtin_bswap16 (uint16_ts[i]) != my_bswap16 (uint16_ts[i]))
+ abort ();
+
for (i = 0; i < N(uint32_ts); i++)
if (__builtin_bswap32 (uint32_ts[i]) != my_bswap32 (uint32_ts[i]))
abort ();
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-5.c b/gcc/testsuite/gcc.dg/builtin-bswap-5.c
index ccac966333..b29931e4e1 100644
--- a/gcc/testsuite/gcc.dg/builtin-bswap-5.c
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-5.c
@@ -6,6 +6,9 @@ main (void)
/* Test constant folding. */
extern void link_error (void);
+ if (__builtin_bswap16(0xaabb) != 0xbbaa)
+ link_error ();
+
if (__builtin_bswap32(0xaabbccdd) != 0xddccbbaa)
link_error ();
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-6.c b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
new file mode 100644
index 0000000000..efda8706e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-6.c
@@ -0,0 +1,42 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-options "-O -fdump-rtl-combine" } */
+
+/* The branch cost setting prevents the return value from being
+ calculated with arithmetic instead of doing a compare. */
+/* { dg-additional-options "-march=z900 -mbranch-cost=0" { target s390*-*-* } } */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap32(X)
+
+int foo1 (uint32_t a)
+{
+ if (BS (a) == 0xA0000)
+ return 1;
+ return 0;
+}
+
+int foo2 (uint32_t a)
+{
+ if (BS (a) != 0xA0000)
+ return 1;
+ return 0;
+}
+
+int foo3 (uint32_t a, uint32_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 0;
+}
+
+int foo4 (uint32_t a, uint32_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-6a.c b/gcc/testsuite/gcc.dg/builtin-bswap-6a.c
new file mode 100644
index 0000000000..f93bcde102
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-6a.c
@@ -0,0 +1,44 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+/* { dg-additional-options "-march=z900" { target s390-*-* } } */
+
+/* The test is similiar to builtin-bswap-6.c but returns 1/2 instead
+ of 0/1 to prevent GCC from calculating the return value with
+ arithmetic instead of a comparison. This requires the optimization
+ level to be bumped up to -O2 at least for x86_64. */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap32(X)
+
+int foo1 (uint32_t a)
+{
+ if (BS (a) == 0xA0000)
+ return 1;
+ return 2;
+}
+
+int foo2 (uint32_t a)
+{
+ if (BS (a) != 0xA0000)
+ return 1;
+ return 2;
+}
+
+int foo3 (uint32_t a, uint32_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 2;
+}
+
+int foo4 (uint32_t a, uint32_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-7.c b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
new file mode 100644
index 0000000000..035c7368ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-7.c
@@ -0,0 +1,43 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* ia64*-*-* x86_64-*-* s390x-*-* powerpc*-*-* rs6000-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O -fdump-rtl-combine" } */
+
+/* The branch cost setting prevents the return value from being
+ calculated with arithmetic instead of doing a compare. */
+/* { dg-additional-options "-mbranch-cost=0" { target s390x-*-* } } */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap64(X)
+
+int foo1 (uint64_t a)
+{
+ if (BS (a) == 0xA00000000)
+ return 1;
+ return 0;
+}
+
+int foo2 (uint64_t a)
+{
+ if (BS (a) != 0xA00000000)
+ return 1;
+ return 0;
+}
+
+int foo3 (uint64_t a, uint64_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 0;
+}
+
+int foo4 (uint64_t a, uint64_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapdi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-7a.c b/gcc/testsuite/gcc.dg/builtin-bswap-7a.c
new file mode 100644
index 0000000000..d77bd47836
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-7a.c
@@ -0,0 +1,44 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* ia64*-*-* x86_64-*-* s390x-*-* powerpc*-*-* rs6000-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+
+/* The test is similiar to builtin-bswap-7.c but returns 1/2 instead
+ of 0/1 to prevent GCC from calculating the return value with
+ arithmetic instead of a comparison. This requires the optimization
+ level to be bumped up to -O2 at least for x86_64. */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap64(X)
+
+int foo1 (uint64_t a)
+{
+ if (BS (a) == 0xA00000000)
+ return 1;
+ return 2;
+}
+
+int foo2 (uint64_t a)
+{
+ if (BS (a) != 0xA00000000)
+ return 1;
+ return 2;
+}
+
+int foo3 (uint64_t a, uint64_t b)
+{
+ if (BS (a) == BS (b))
+ return 1;
+ return 2;
+}
+
+int foo4 (uint64_t a, uint64_t b)
+{
+ if (BS (a) != BS (b))
+ return 1;
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapdi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-8.c b/gcc/testsuite/gcc.dg/builtin-bswap-8.c
new file mode 100644
index 0000000000..38c00a3142
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-8.c
@@ -0,0 +1,46 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* i?86-*-* powerpc*-*-* rs6000-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+/* { dg-options "-O2 -fdump-rtl-combine -march=z900" { target s390-*-* } } */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap32(X)
+
+uint32_t foo1 (uint32_t a)
+{
+ return BS (~ BS (a));
+}
+
+uint32_t foo2 (uint32_t a)
+{
+ return BS (BS (a) & 0xA0000);
+}
+
+uint32_t foo3 (uint32_t a)
+{
+ return BS (BS (a) | 0xA0000);
+}
+
+uint32_t foo4 (uint32_t a)
+{
+ return BS (BS (a) ^ 0xA0000);
+}
+
+uint32_t foo5 (uint32_t a, uint32_t b)
+{
+ return BS (BS (a) & BS (b));
+}
+
+uint32_t foo6 (uint32_t a, uint32_t b)
+{
+ return BS (BS (a) | BS (b));
+}
+
+uint32_t foo7 (uint32_t a, uint32_t b)
+{
+ return BS (BS (a) ^ BS (b));
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapsi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-bswap-9.c b/gcc/testsuite/gcc.dg/builtin-bswap-9.c
new file mode 100644
index 0000000000..4aa1a40c43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-bswap-9.c
@@ -0,0 +1,46 @@
+/* { dg-do compile { target arm*-*-* alpha*-*-* ia64*-*-* x86_64-*-* s390x-*-* powerpc*-*-* rs6000-*-* } } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O2 -fdump-rtl-combine" } */
+
+#include <stdint.h>
+
+#define BS(X) __builtin_bswap64(X)
+
+uint64_t foo1 (uint64_t a)
+{
+ return BS (~ BS (a));
+}
+
+uint64_t foo2 (uint64_t a)
+{
+ return BS (BS (a) & 0xA00000000);
+}
+
+uint64_t foo3 (uint64_t a)
+{
+ return BS (BS (a) | 0xA00000000);
+}
+
+uint64_t foo4 (uint64_t a)
+{
+ return BS (BS (a) ^ 0xA00000000);
+}
+
+uint64_t foo5 (uint64_t a, uint64_t b)
+{
+ return BS (BS (a) & BS (b));
+}
+
+uint64_t foo6 (uint64_t a, uint64_t b)
+{
+ return BS (BS (a) | BS (b));
+}
+
+uint64_t foo7 (uint64_t a, uint64_t b)
+{
+ return BS (BS (a) ^ BS (b));
+}
+
+/* { dg-final { scan-rtl-dump-not "bswapdi" "combine" } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-complex-err-1.c b/gcc/testsuite/gcc.dg/builtin-complex-err-1.c
index 3ef50da927..ddc72b583c 100644
--- a/gcc/testsuite/gcc.dg/builtin-complex-err-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-complex-err-1.c
@@ -1,6 +1,6 @@
/* Test __builtin_complex errors. */
/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
typedef double D;
diff --git a/gcc/testsuite/gcc.dg/builtin-complex-err-2.c b/gcc/testsuite/gcc.dg/builtin-complex-err-2.c
index c285b2a0aa..be5ff65fda 100644
--- a/gcc/testsuite/gcc.dg/builtin-complex-err-2.c
+++ b/gcc/testsuite/gcc.dg/builtin-complex-err-2.c
@@ -1,4 +1,4 @@
-/* Test __builtin_complex errors. Verify it does nto allow quiet
+/* Test __builtin_complex errors. Verify it does not allow quiet
creation of complex types in C90. */
/* { dg-do compile } */
/* { dg-options "-std=c90 -pedantic-errors" } */
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-10.c b/gcc/testsuite/gcc.dg/builtin-object-size-10.c
index 6c7ed45b6e..956d4a860e 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-10.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-10.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-objsz-details" } */
+/* { dg-options "-O2 -fdump-tree-objsz1-details" } */
+// { dg-skip-if "packed attribute missing for drone_source_packet" { "epiphany-*-*" } { "*" } { "" } }
typedef struct {
char sentinel[4];
@@ -21,6 +22,6 @@ foo(char *x)
return dpkt;
}
-/* { dg-final { scan-tree-dump "maximum object size 21" "objsz" } } */
-/* { dg-final { scan-tree-dump "maximum subobject size 16" "objsz" } } */
-/* { dg-final { cleanup-tree-dump "objsz" } } */
+/* { dg-final { scan-tree-dump "maximum object size 21" "objsz1" } } */
+/* { dg-final { scan-tree-dump "maximum subobject size 16" "objsz1" } } */
+/* { dg-final { cleanup-tree-dump "objsz1" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-11.c b/gcc/testsuite/gcc.dg/builtin-object-size-11.c
index a98bc356c4..309a68416a 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-11.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-11.c
@@ -1,6 +1,7 @@
/* PR48985 */
/* { dg-do run } */
/* { dg-options "-std=gnu89" } */
+/* { dg-skip-if "packed attribute missing for struct s" { "epiphany-*-*" } { "*" } { "" } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-13.c b/gcc/testsuite/gcc.dg/builtin-object-size-13.c
new file mode 100644
index 0000000000..80a6280e3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-13.c
@@ -0,0 +1,351 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void *malloc (size_t);
+extern void free (void *);
+extern void abort (void);
+
+union A
+{
+ int a1;
+ char a2[3];
+};
+
+union B
+{
+ long long b1;
+ union A b2;
+};
+
+struct C
+{
+ int c1;
+ union A c2;
+};
+
+struct D
+{
+ int d1;
+ union B d2;
+};
+
+union E
+{
+ struct C e1;
+ char e2[3];
+};
+
+union F
+{
+ int f1;
+ struct D f2;
+};
+
+struct G
+{
+ union A g1;
+ char g2;
+};
+
+struct H
+{
+ int h1;
+ union E h2;
+};
+
+#define T(X, S0, S1) \
+ if (__builtin_object_size (X, 0) != (S0)) \
+ abort (); \
+ if (__builtin_object_size (X, 1) != (S1)) \
+ abort (); \
+ if (__builtin_object_size (X, 2) != (S0)) \
+ abort (); \
+ if (__builtin_object_size (X, 3) != (S1)) \
+ abort ()
+#define TS(X, S0) T(&X, S0, sizeof (X))
+#define TA(X, S0, S1) \
+ T(X, S0, S1); T(&X[0], S0, S1); T(&X[1], (S0) - 1, (S1) - 1)
+#define TF(X, S0) TA(X, S0, S0)
+
+int
+main (void)
+{
+ size_t s, o, o2;
+
+ s = sizeof (union A);
+ o = 0;
+ union A *a1 = malloc (s);
+ union A *a2 = malloc (o + 212);
+ TS (a1->a1, s);
+ s = o + 212;
+ TS (a2->a1, s);
+ free (a2);
+ free (a1);
+ s = sizeof (union A);
+ o = 0;
+ a1 = malloc (s);
+ a2 = malloc (o + 212);
+ TF (a1->a2, s);
+ s = o + 212;
+ TF (a2->a2, s);
+ free (a2);
+ free (a1);
+
+ s = sizeof (union B);
+ o = 0;
+ union B *b1 = malloc (s);
+ union B *b2 = malloc (o + 212);
+ TS (b1->b1, s);
+ s = o + 212;
+ TS (b2->b1, s);
+ free (b2);
+ free (b1);
+ s = sizeof (union B);
+ o = 0;
+ b1 = malloc (s);
+ b2 = malloc (o + 212);
+ TS (b1->b2.a1, s);
+ s = o + 212;
+ TS (b2->b2.a1, s);
+ free (b2);
+ free (b1);
+ s = sizeof (union B);
+ o = 0;
+ b1 = malloc (s);
+ b2 = malloc (o + 212);
+ TF (b1->b2.a2, s);
+ s = o + 212;
+ TF (b2->b2.a2, s);
+ free (b2);
+ free (b1);
+
+ s = sizeof (struct C);
+ o = __builtin_offsetof (struct C, c2);
+ struct C *c1 = malloc (s);
+ struct C *c2 = malloc (o + 212);
+ TS (c1->c1, s);
+ s = o + 212;
+ TS (c2->c1, s);
+ free (c2);
+ free (c1);
+ s = sizeof (struct C);
+ o = __builtin_offsetof (struct C, c2);
+ c1 = malloc (s);
+ c2 = malloc (o + 212);
+ TS (c1->c2.a1, s - o);
+ s = o + 212;
+ TS (c2->c2.a1, s - o);
+ free (c2);
+ free (c1);
+ s = sizeof (struct C);
+ o = __builtin_offsetof (struct C, c2);
+ c1 = malloc (s);
+ c2 = malloc (o + 212);
+ TF (c1->c2.a2, s - o);
+ s = o + 212;
+ TF (c2->c2.a2, s - o);
+ free (c2);
+ free (c1);
+
+ s = sizeof (struct D);
+ o = __builtin_offsetof (struct D, d2);
+ struct D *d1 = malloc (s);
+ struct D *d2 = malloc (o + 212);
+ TS (d1->d1, s);
+ s = o + 212;
+ TS (d2->d1, s);
+ free (d2);
+ free (d1);
+ s = sizeof (struct D);
+ o = __builtin_offsetof (struct D, d2);
+ d1 = malloc (s);
+ d2 = malloc (o + 212);
+ TS (d1->d2.b1, s - o);
+ s = o + 212;
+ TS (d2->d2.b1, s - o);
+ free (d2);
+ free (d1);
+ s = sizeof (struct D);
+ o = __builtin_offsetof (struct D, d2);
+ d1 = malloc (s);
+ d2 = malloc (o + 212);
+ TS (d1->d2.b2.a1, s - o);
+ s = o + 212;
+ TS (d2->d2.b2.a1, s - o);
+ free (d2);
+ free (d1);
+ s = sizeof (struct D);
+ o = __builtin_offsetof (struct D, d2);
+ d1 = malloc (s);
+ d2 = malloc (o + 212);
+ TF (d1->d2.b2.a2, s - o);
+ s = o + 212;
+ TF (d2->d2.b2.a2, s - o);
+ free (d2);
+ free (d1);
+
+ s = sizeof (union E);
+ o = __builtin_offsetof (union E, e1.c2);
+ union E *e1 = malloc (s);
+ union E *e2 = malloc (o + 212);
+ TS (e1->e1.c1, s);
+ s = o + 212;
+ TS (e2->e1.c1, s);
+ free (e2);
+ free (e1);
+ s = sizeof (union E);
+ o = __builtin_offsetof (union E, e1.c2);
+ e1 = malloc (s);
+ e2 = malloc (o + 212);
+ TS (e1->e1.c2.a1, s - o);
+ s = o + 212;
+ TS (e2->e1.c2.a1, s - o);
+ free (e2);
+ free (e1);
+ s = sizeof (union E);
+ o = __builtin_offsetof (union E, e1.c2);
+ e1 = malloc (s);
+ e2 = malloc (o + 212);
+ TF (e1->e1.c2.a2, s - o);
+ s = o + 212;
+ TF (e2->e1.c2.a2, s - o);
+ free (e2);
+ free (e1);
+ s = sizeof (union E);
+ o = __builtin_offsetof (union E, e1.c2);
+ e1 = malloc (s);
+ e2 = malloc (o + 212);
+ TF (e1->e2, s);
+ s = o + 212;
+ TF (e2->e2, s);
+ free (e2);
+ free (e1);
+
+ s = sizeof (union F);
+ o = __builtin_offsetof (union F, f2.d2);
+ union F *f1 = malloc (s);
+ union F *f2 = malloc (o + 212);
+ TS (f1->f1, s);
+ s = o + 212;
+ TS (f2->f1, s);
+ free (f2);
+ free (f1);
+ s = sizeof (union F);
+ o = __builtin_offsetof (union F, f2.d2);
+ f1 = malloc (s);
+ f2 = malloc (o + 212);
+ TS (f1->f2.d1, s);
+ s = o + 212;
+ TS (f2->f2.d1, s);
+ free (f2);
+ free (f1);
+ s = sizeof (union F);
+ o = __builtin_offsetof (union F, f2.d2);
+ f1 = malloc (s);
+ f2 = malloc (o + 212);
+ TS (f1->f2.d2.b1, s - o);
+ s = o + 212;
+ TS (f2->f2.d2.b1, s - o);
+ free (f2);
+ free (f1);
+ s = sizeof (union F);
+ o = __builtin_offsetof (union F, f2.d2);
+ f1 = malloc (s);
+ f2 = malloc (o + 212);
+ TS (f1->f2.d2.b2.a1, s - o);
+ s = o + 212;
+ TS (f2->f2.d2.b2.a1, s - o);
+ free (f2);
+ free (f1);
+ s = sizeof (union F);
+ o = __builtin_offsetof (union F, f2.d2);
+ f1 = malloc (s);
+ f2 = malloc (o + 212);
+ TF (f1->f2.d2.b2.a2, s - o);
+ s = o + 212;
+ TF (f2->f2.d2.b2.a2, s - o);
+ free (f2);
+ free (f1);
+
+ s = sizeof (struct G);
+ o = __builtin_offsetof (struct G, g2);
+ struct G *g1 = malloc (s);
+ struct G *g2 = malloc (o + 212);
+ TS (g1->g1.a1, s);
+ s = o + 212;
+ TS (g2->g1.a1, s);
+ free (g2);
+ free (g1);
+ s = sizeof (struct G);
+ o = __builtin_offsetof (struct G, g2);
+ g1 = malloc (s);
+ g2 = malloc (o + 212);
+ TA (g1->g1.a2, s, sizeof (g1->g1.a2));
+ s = o + 212;
+ TA (g2->g1.a2, s, sizeof (g1->g1.a2));
+ free (g2);
+ free (g1);
+ s = sizeof (struct G);
+ o = __builtin_offsetof (struct G, g2);
+ g1 = malloc (s);
+ g2 = malloc (o + 212);
+ TS (g1->g2, s - o);
+ s = o + 212;
+ TS (g2->g2, s - o);
+ free (g2);
+ free (g1);
+
+ s = sizeof (struct H);
+ o = __builtin_offsetof (struct H, h2);
+ o2 = __builtin_offsetof (struct H, h2.e1.c2);
+ struct H *h1 = malloc (s);
+ struct H *h2 = malloc (o2 + 212);
+ TS (h1->h1, s);
+ s = o2 + 212;
+ TS (h2->h1, s);
+ free (h2);
+ free (h1);
+ s = sizeof (struct H);
+ o = __builtin_offsetof (struct H, h2);
+ o2 = __builtin_offsetof (struct H, h2.e1.c2);
+ h1 = malloc (s);
+ h2 = malloc (o2 + 212);
+ TS (h1->h2.e1.c1, s - o);
+ s = o2 + 212;
+ TS (h2->h2.e1.c1, s - o);
+ free (h2);
+ free (h1);
+ s = sizeof (struct H);
+ o = __builtin_offsetof (struct H, h2);
+ o2 = __builtin_offsetof (struct H, h2.e1.c2);
+ h1 = malloc (s);
+ h2 = malloc (o2 + 212);
+ TS (h1->h2.e1.c2.a1, s - o2);
+ s = o2 + 212;
+ TS (h2->h2.e1.c2.a1, s - o2);
+ free (h2);
+ free (h1);
+ s = sizeof (struct H);
+ o = __builtin_offsetof (struct H, h2);
+ o2 = __builtin_offsetof (struct H, h2.e1.c2);
+ h1 = malloc (s);
+ h2 = malloc (o2 + 212);
+ TA (h1->h2.e1.c2.a2, s - o2, sizeof (h1->h2.e1.c2.a2));
+ s = o2 + 212;
+ TA (h2->h2.e1.c2.a2, s - o2, sizeof (h2->h2.e1.c2.a2));
+ free (h2);
+ free (h1);
+ s = sizeof (struct H);
+ o = __builtin_offsetof (struct H, h2);
+ o2 = __builtin_offsetof (struct H, h2.e1.c2);
+ h1 = malloc (s);
+ h2 = malloc (o2 + 212);
+ TF (h1->h2.e2, s - o);
+ s = o2 + 212;
+ TF (h2->h2.e2, s - o);
+ free (h2);
+ free (h1);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-14.c b/gcc/testsuite/gcc.dg/builtin-object-size-14.c
new file mode 100644
index 0000000000..085011eda5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-14.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+extern char *strncpy(char *, const char *, __SIZE_TYPE__);
+
+union u {
+ struct {
+ char vi[8];
+ char pi[16];
+ };
+ char all[8+16+4];
+};
+
+void __attribute__((noinline,noclone))
+f(union u *u)
+{
+ char vi[8+1];
+ __builtin_strncpy(vi, u->vi, sizeof(u->vi));
+ if (__builtin_object_size (u->all, 1) != -1)
+ abort ();
+}
+int main()
+{
+ union u u;
+ f (&u);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/builtin-object-size-5.c b/gcc/testsuite/gcc.dg/builtin-object-size-5.c
index 4cb580ebc9..7c274cdfd4 100644
--- a/gcc/testsuite/gcc.dg/builtin-object-size-5.c
+++ b/gcc/testsuite/gcc.dg/builtin-object-size-5.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do compile { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* { dg-options "-O2" } */
typedef __SIZE_TYPE__ size_t;
diff --git a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
index e9fb7db521..bb727da28e 100644
--- a/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-stringop-chk-1.c
@@ -1,8 +1,9 @@
/* Test whether buffer overflow warnings for __*_chk builtins
are emitted properly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99" } */
-/* { dg-options "-mstructure-size-boundary=8 -O2 -std=gnu99" { target arm*-*-* } } */
+/* { dg-options "-O2 -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/builtin-stringop-chk-2.c b/gcc/testsuite/gcc.dg/builtin-stringop-chk-2.c
index adccd0f444..7c2bb60981 100644
--- a/gcc/testsuite/gcc.dg/builtin-stringop-chk-2.c
+++ b/gcc/testsuite/gcc.dg/builtin-stringop-chk-2.c
@@ -3,7 +3,7 @@
incorrectly determined to be 0 while it should be (size_t) -1
(== unknown). */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -ftrack-macro-expansion=0" } */
#include "../gcc.c-torture/execute/builtins/chk.h"
diff --git a/gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c b/gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c
index 80d7b9d6eb..44677f1677 100644
--- a/gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c
+++ b/gcc/testsuite/gcc.dg/builtin-strncat-chk-1.c
@@ -1,7 +1,7 @@
/* Test whether buffer overflow warnings for __strncat_chk builtin
are emitted properly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -std=gnu99" } */
+/* { dg-options "-O2 -std=gnu99 -ftrack-macro-expansion=0" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-5.c b/gcc/testsuite/gcc.dg/builtin-unreachable-5.c
new file mode 100644
index 0000000000..904a474a57
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-5.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
+
+int
+foo (int a)
+{
+ if (a <= 0)
+ {
+ L1:
+ __builtin_unreachable ();
+ }
+
+ if (a > 2)
+ goto L1;
+
+ return a > 0;
+}
+
+/* { dg-final { scan-tree-dump-times "if \\(" 0 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "goto" 0 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "L1:" 0 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 0 "fab1" } } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/builtin-unreachable-6.c b/gcc/testsuite/gcc.dg/builtin-unreachable-6.c
new file mode 100644
index 0000000000..2fe06ac7a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtin-unreachable-6.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
+
+void
+foo (int b, int c)
+{
+ void *x = &&lab;
+ if (b)
+ {
+lab:
+ __builtin_unreachable ();
+ }
+lab2:
+ if (c)
+ x = &&lab2;
+ goto *x;
+}
+
+/* { dg-final { scan-tree-dump-times "lab:" 1 "fab1" } } */
+/* { dg-final { scan-tree-dump-times "__builtin_unreachable" 1 "fab1" } } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/builtins-85.c b/gcc/testsuite/gcc.dg/builtins-85.c
new file mode 100644
index 0000000000..0993fbc19f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/builtins-85.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void __chk_fail (void);
+extern int snprintf (char *, size_t, const char *, ...);
+extern inline __attribute__((gnu_inline, always_inline)) int snprintf (char *a, size_t b, const char *fmt, ...)
+{
+ if (__builtin_object_size (a, 0) != -1UL && __builtin_object_size (a, 0) < b)
+ __chk_fail ();
+ return __builtin_snprintf (a, b, fmt, __builtin_va_arg_pack ());
+}
+extern int snprintf (char *, size_t, const char *, ...) __asm ("mysnprintf");
+
+char buf[10];
+
+int
+main (void)
+{
+ snprintf (buf, 10, "%d%d\n", 10, 10);
+ return 0;
+}
+
+/* { dg-final { scan-assembler "mysnprintf" } } */
+/* { dg-final { scan-assembler-not "__chk_fail" } } */
diff --git a/gcc/testsuite/gcc.dg/c11-align-1.c b/gcc/testsuite/gcc.dg/c11-align-1.c
new file mode 100644
index 0000000000..e0058c3800
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-1.c
@@ -0,0 +1,41 @@
+/* Test C11 alignment support. Test valid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stddef.h>
+
+_Alignas (_Alignof (max_align_t)) char c;
+extern _Alignas (max_align_t) char c;
+extern char c;
+
+extern _Alignas (max_align_t) short s;
+_Alignas (max_align_t) short s;
+
+_Alignas (int) int i;
+extern int i;
+
+_Alignas (max_align_t) long l;
+
+_Alignas (max_align_t) long long ll;
+
+_Alignas (max_align_t) float f;
+
+_Alignas (max_align_t) double d;
+
+_Alignas (max_align_t) _Complex long double cld;
+
+_Alignas (0) _Alignas (int) _Alignas (char) char ca[10];
+
+_Alignas ((int) _Alignof (max_align_t) + 0) int x;
+
+enum e { E = _Alignof (max_align_t) };
+_Alignas (E) int y;
+
+void
+func (void)
+{
+ _Alignas (max_align_t) long long auto_ll;
+}
+
+/* Valid, but useless. */
+_Alignas (0) struct s; /* { dg-warning "useless" } */
diff --git a/gcc/testsuite/gcc.dg/c11-align-2.c b/gcc/testsuite/gcc.dg/c11-align-2.c
new file mode 100644
index 0000000000..a1750ac547
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-2.c
@@ -0,0 +1,92 @@
+/* Test C11 alignment support. Test valid code using stdalign.h. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdalign.h>
+#include <stddef.h>
+
+extern int strcmp (const char *, const char *);
+
+extern void exit (int);
+extern void abort (void);
+
+alignas (alignof (max_align_t)) char c;
+extern alignas (max_align_t) char c;
+extern char c;
+
+extern alignas (max_align_t) short s;
+alignas (max_align_t) short s;
+
+alignas (int) int i;
+extern int i;
+
+alignas (max_align_t) long l;
+
+alignas (max_align_t) long long ll;
+
+alignas (max_align_t) float f;
+
+alignas (max_align_t) double d;
+
+alignas (max_align_t) _Complex long double cld;
+
+alignas (0) alignas (int) alignas (char) char ca[10];
+
+alignas ((int) alignof (max_align_t) + 0) int x;
+
+enum e { E = alignof (max_align_t) };
+alignas (E) int y;
+
+void
+func (void)
+{
+ alignas (max_align_t) long long auto_ll;
+}
+
+/* Valid, but useless. */
+alignas (0) struct s; /* { dg-warning "useless" } */
+
+#ifndef alignas
+#error "alignas not defined"
+#endif
+
+#ifndef alignof
+#error "alignof not defined"
+#endif
+
+#ifndef __alignas_is_defined
+#error "__alignas_is_defined not defined"
+#endif
+
+#if __alignas_is_defined != 1
+#error "__alignas_is_defined not 1"
+#endif
+
+#ifndef __alignof_is_defined
+#error "__alignof_is_defined not defined"
+#endif
+
+#if __alignof_is_defined != 1
+#error "__alignof_is_defined not 1"
+#endif
+
+#define str(x) #x
+#define xstr(x) str(x)
+
+const char *s1 = xstr(alignas);
+const char *s2 = xstr(alignof);
+const char *s3 = xstr(__alignas_is_defined);
+const char *s4 = xstr(__alignof_is_defined);
+
+int
+main (void)
+{
+ if (strcmp (s1, "_Alignas") != 0)
+ abort ();
+ if (strcmp (s2, "_Alignof") != 0)
+ abort ();
+ if (strcmp (s3, "1") != 0)
+ abort ();
+ if (strcmp (s4, "1") != 0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/c11-align-3.c b/gcc/testsuite/gcc.dg/c11-align-3.c
new file mode 100644
index 0000000000..39b81ef6f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-3.c
@@ -0,0 +1,43 @@
+/* Test C11 alignment support. Test invalid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+int a = _Alignof (void (void)); /* { dg-error "function" } */
+struct s;
+int b = _Alignof (struct s); /* { dg-error "incomplete" } */
+int c = _Alignof (void); /* { dg-error "void" } */
+int d = _Alignof (a); /* { dg-error "expression" } */
+
+_Alignas (void (void)) char e; /* { dg-error "function" } */
+_Alignas (struct s) char f; /* { dg-error "incomplete" } */
+_Alignas (void) char g; /* { dg-error "void" } */
+
+_Alignas (-__INT_MAX__-1) char h; /* { dg-error "too large|power of 2" } */
+_Alignas (-__INT_MAX__) char h2; /* { dg-error "too large|power of 2" } */
+_Alignas ((-__INT_MAX__-1)/2) char h3; /* { dg-error "too large|power of 2" } */
+_Alignas ((-__INT_MAX__-1)/4) char h4; /* { dg-error "too large|power of 2" } */
+_Alignas ((-__INT_MAX__-1)/8) char h5; /* { dg-error "too large|power of 2" } */
+_Alignas (-__LONG_LONG_MAX__-1) char i; /* { dg-error "too large|power of 2" } */
+_Alignas (-(__LONG_LONG_MAX__-1)/2) char i2; /* { dg-error "too large|power of 2" } */
+_Alignas (-(__LONG_LONG_MAX__-1)/4) char i3; /* { dg-error "too large|power of 2" } */
+_Alignas (-(__LONG_LONG_MAX__-1)/8) char i4; /* { dg-error "too large|power of 2" } */
+_Alignas (-(__LONG_LONG_MAX__-1)/16) char i5; /* { dg-error "too large|power of 2" } */
+_Alignas (-1) char j; /* { dg-error "power of 2" } */
+_Alignas (-2) char j; /* { dg-error "positive power of 2" } */
+_Alignas (3) char k; /* { dg-error "power of 2" } */
+
+_Alignas ((void *) 1) char k; /* { dg-error "integer constant" } */
+int x;
+_Alignas (x) char l; /* { dg-error "integer constant" } */
+
+_Alignas (0) struct s; /* { dg-error "does not redeclare tag" } */
+
+_Alignas (0) typedef int T; /* { dg-error "alignment specified for typedef" } */
+void func (_Alignas (0) int); /* { dg-error "alignment specified for unnamed parameter" } */
+void f2 (_Alignas (0) int parm2) {} /* { dg-error "alignment specified for parameter" } */
+void
+f3 (void)
+{
+ register _Alignas (0) int reg; /* { dg-error "register" } */
+}
+_Alignas (0) void f4 (void); /* { dg-error "alignment specified for function" } */
diff --git a/gcc/testsuite/gcc.dg/c11-align-4.c b/gcc/testsuite/gcc.dg/c11-align-4.c
new file mode 100644
index 0000000000..6377db6edf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-4.c
@@ -0,0 +1,9 @@
+/* Test C11 alignment support. Test reducing alignment (assumes there
+ are at least some alignment constraints). */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-skip-if "no alignment constraints" { "avr-*-*" } { "*" } { "" } } */
+
+#include <stddef.h>
+
+_Alignas (_Alignof (char)) max_align_t x; /* { dg-error "reduce alignment" } */
diff --git a/gcc/testsuite/gcc.dg/c11-align-5.c b/gcc/testsuite/gcc.dg/c11-align-5.c
new file mode 100644
index 0000000000..f3a14779ff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-5.c
@@ -0,0 +1,28 @@
+/* Test C11 alignment support. Test invalid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+void foo (int []);
+void bar1 (int [_Alignas (double) 10]); /* { dg-error "expected expression before" } */
+void bar2 (int [static _Alignas (double) 10]); /* { dg-error "expected expression before" } */
+void bar3 (int [static const _Alignas (double) 10]); /* { dg-error "expected expression before" } */
+void bar4 (int [const _Alignas (double) 10]); /* { dg-error "expected expression before" } */
+void bar5 (int [_Alignas (0) *]); /* { dg-error "expected expression before" } */
+
+void foo (int a[_Alignas (0) 10]) { } /* { dg-error "expected expression before" } */
+
+void
+test (void)
+{
+ int *_Alignas (long) p; /* { dg-error "expected" } */
+ int *const _Alignas (long) *q; /* { dg-error "expected" } */
+ struct s { int n; };
+ __builtin_offsetof (struct s _Alignas (int), n); /* { dg-error "expected" } */
+ __typeof (long double _Alignas (0)) e; /* { dg-error "expected" } */
+ sizeof (int _Alignas (int)); /* { dg-error "expected" } */
+ _Alignas (int _Alignas (float)) int t; /* { dg-error "expected" } */
+ __builtin_types_compatible_p (signed _Alignas (0), unsigned); /* { dg-error "expected" } */
+ int a[_Alignas (int) 10]; /* { dg-error "expected expression before" } */
+ int b[10];
+ foo (b);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-align-6.c b/gcc/testsuite/gcc.dg/c11-align-6.c
new file mode 100644
index 0000000000..7ea994da40
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-align-6.c
@@ -0,0 +1,40 @@
+/* Test C11 _Alignof returning minimum alignment for a type. PR
+ 52023. */
+/* { dg-do run } */
+/* { dg-options "-std=c11" } */
+
+extern void abort (void);
+extern void exit (int);
+
+#define CHECK_ALIGN(TYPE) \
+ do \
+ { \
+ struct { char c; TYPE v; } x; \
+ if (_Alignof (TYPE) > __alignof__ (x.v)) \
+ abort (); \
+ } \
+ while (0)
+
+int
+main (void)
+{
+ CHECK_ALIGN (_Bool);
+ CHECK_ALIGN (char);
+ CHECK_ALIGN (signed char);
+ CHECK_ALIGN (unsigned char);
+ CHECK_ALIGN (signed short);
+ CHECK_ALIGN (unsigned short);
+ CHECK_ALIGN (signed int);
+ CHECK_ALIGN (unsigned int);
+ CHECK_ALIGN (signed long);
+ CHECK_ALIGN (unsigned long);
+ CHECK_ALIGN (signed long long);
+ CHECK_ALIGN (unsigned long long);
+ CHECK_ALIGN (float);
+ CHECK_ALIGN (double);
+ CHECK_ALIGN (long double);
+ CHECK_ALIGN (_Complex float);
+ CHECK_ALIGN (_Complex double);
+ CHECK_ALIGN (_Complex long double);
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-anon-struct-1.c b/gcc/testsuite/gcc.dg/c11-anon-struct-1.c
new file mode 100644
index 0000000000..779ae66b7e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-anon-struct-1.c
@@ -0,0 +1,72 @@
+/* Test for anonymous structures and unions in C11. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stddef.h>
+
+struct s1
+{
+ int a;
+ union
+ {
+ int i;
+ };
+ struct
+ {
+ int b;
+ };
+};
+
+union u1
+{
+ int b;
+ struct
+ {
+ int i;
+ };
+ union
+ {
+ int c;
+ };
+};
+
+struct s2
+{
+ struct
+ {
+ int a;
+ };
+};
+
+struct s3
+{
+ union
+ {
+ int i;
+ };
+};
+
+struct s4
+{
+ struct
+ {
+ int i;
+ };
+ int a[];
+};
+
+struct s1 x =
+ {
+ .b = 1,
+ .i = 2,
+ .a = 3
+ };
+
+int o = offsetof (struct s1, i);
+
+void
+f (void)
+{
+ x.i = 3;
+ (&x)->i = 4;
+}
diff --git a/gcc/testsuite/gcc.dg/c11-anon-struct-2.c b/gcc/testsuite/gcc.dg/c11-anon-struct-2.c
new file mode 100644
index 0000000000..d954b4b127
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-anon-struct-2.c
@@ -0,0 +1,57 @@
+/* Test for anonymous structures and unions in C11. Test for invalid
+ cases. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+typedef struct s0
+{
+ int i;
+} s0;
+
+struct s1
+{
+ int a;
+ struct s0; /* { dg-error "declaration does not declare anything" } */
+};
+
+struct s2
+{
+ int a;
+ s0; /* { dg-error "declaration does not declare anything" } */
+};
+
+struct s3
+{
+ struct
+ {
+ int i;
+ };
+ struct
+ {
+ int i; /* { dg-error "duplicate member" } */
+ };
+};
+
+struct s4
+{
+ int a;
+ struct s
+ {
+ int i;
+ }; /* { dg-error "declaration does not declare anything" } */
+};
+
+struct s5
+{
+ struct
+ {
+ int i;
+ } a;
+ int b;
+} x;
+
+void
+f (void)
+{
+ x.i = 0; /* { dg-error "has no member" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-anon-struct-3.c b/gcc/testsuite/gcc.dg/c11-anon-struct-3.c
new file mode 100644
index 0000000000..05cc3660cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-anon-struct-3.c
@@ -0,0 +1,34 @@
+/* Test for anonymous structures and unions in C11. Test for invalid
+ cases: typedefs disallowed by N1549. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+typedef struct
+{
+ int i;
+} s0;
+
+typedef union
+{
+ int i;
+} u0;
+
+struct s1
+{
+ int a;
+ u0; /* { dg-error "declaration does not declare anything" } */
+ struct
+ {
+ int b;
+ };
+};
+
+union u1
+{
+ int b;
+ s0; /* { dg-error "declaration does not declare anything" } */
+ union
+ {
+ int c;
+ };
+};
diff --git a/gcc/testsuite/gcc.dg/c11-atomic-1.c b/gcc/testsuite/gcc.dg/c11-atomic-1.c
new file mode 100644
index 0000000000..c7f9a1ef46
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-atomic-1.c
@@ -0,0 +1,267 @@
+/* Test for _Atomic in C11. Test of valid code. See c11-atomic-2.c
+ for more exhaustive tests of assignment cases. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* The use of _Atomic as a qualifier, and of _Atomic (type-name), give
+ the same type. */
+extern _Atomic int a;
+extern _Atomic (int) a;
+extern int *_Atomic b;
+extern _Atomic (int *) b;
+extern void f (int [_Atomic]);
+extern void f (int *_Atomic);
+
+/* _Atomic may be applied to arbitrary types, with or without other
+ qualifiers, and assignments may be made as with non-atomic
+ types. Structure and union elements may be atomic. */
+_Atomic int ai1, ai2;
+int i1;
+volatile _Atomic long double ald1;
+const _Atomic long double ald2;
+long double ld1;
+_Atomic _Complex double acd1, acd2;
+_Complex double d1;
+_Atomic volatile _Bool ab1;
+int *p;
+int *_Atomic restrict ap;
+struct s { char c[1000]; };
+_Atomic struct s as1;
+struct s s1;
+struct t { _Atomic int i; };
+_Atomic struct t at1;
+_Atomic struct t *atp1;
+struct t t1;
+union u { char c[1000]; };
+_Atomic union u au1;
+union u u1;
+union v { _Atomic int i; };
+_Atomic union v av1;
+union v v1;
+
+void
+func (_Atomic volatile long al1)
+{
+ ai1 = ai2;
+ ai1 = i1;
+ i1 = ai2;
+ ai1 = ald2;
+ ald1 = d1;
+ ld1 = acd2;
+ acd1 += ab1;
+ acd2 /= ai1;
+ p = ap;
+ ap = p;
+ ab1 = p;
+ as1 = s1;
+ s1 = as1;
+ at1 = t1;
+ t1 = at1;
+ /* It's unclear whether the undefined behavior (6.5.2.3#5) for
+ accessing elements of atomic structures and unions is at
+ translation or execution time; presume here that it's at
+ execution time. */
+ t1.i = at1.i;
+ at1.i = t1.i;
+ atp1->i = t1.i;
+ au1 = u1;
+ u1 = au1;
+ av1 = v1;
+ v1 = av1;
+ v1.i = av1.i;
+ av1.i = v1.i;
+ /* _Atomic is valid on register variables, even if not particularly
+ useful. */
+ register _Atomic volatile int ra1 = 1, ra2 = 2;
+ ra1 = ra2;
+ ra2 = ra1;
+ /* And on parameters. */
+ al1 = ra1;
+ ra2 = al1;
+}
+
+/* A function may return an atomic type. */
+_Atomic int
+func2 (int i)
+{
+ return i;
+}
+
+/* Casts may specify atomic type. */
+int
+func3 (int i)
+{
+ return func2 ((_Atomic long) i);
+}
+
+/* The _Atomic void type is valid. */
+_Atomic void *avp;
+
+/* An array of atomic elements is valid (the elements being atomic,
+ not the array). */
+_Atomic int aa[10];
+int
+func4 (void)
+{
+ return aa[2];
+}
+
+/* Increment and decrement are valid for atomic types when they are
+ valid for non-atomic types. */
+void
+func5 (void)
+{
+ ald1++;
+ ald1--;
+ ++ald1;
+ --ald1;
+ ai1++;
+ ai1--;
+ ++ai1;
+ --ai1;
+ ab1++;
+ ab1--;
+ ++ab1;
+ --ab1;
+ ap++;
+ ap--;
+ ++ap;
+ --ap;
+}
+
+/* Compound literals may have atomic type. */
+_Atomic int *aiclp = &(_Atomic int) { 1 };
+
+/* Test unary & and *. */
+void
+func6 (void)
+{
+ int i = *aiclp;
+ _Atomic int *p = &ai2;
+}
+
+/* Casts to atomic type are valid (although the _Atomic has little
+ effect because the result is an rvalue). */
+int i2 = (_Atomic int) 1.0;
+
+/* For pointer subtraction and comparisons, _Atomic does not count as
+ a qualifier. Likewise for conditional expressions. */
+_Atomic int *xaip1;
+volatile _Atomic int *xaip2;
+void *xvp1;
+
+void
+func7 (void)
+{
+ int r;
+ r = xaip1 - xaip2;
+ r = xaip1 < xaip2;
+ r = xaip1 > xaip2;
+ r = xaip1 <= xaip2;
+ r = xaip1 >= xaip2;
+ r = xaip1 == xaip2;
+ r = xaip1 != xaip2;
+ r = xaip1 == xvp1;
+ r = xaip1 != xvp1;
+ r = xvp1 == xaip1;
+ r = xvp1 != xaip1;
+ r = xaip1 == 0;
+ r = ((void *) 0) == xaip2;
+ (void) (r ? xaip1 : xaip2);
+ (void) (r ? xvp1 : xaip2);
+ (void) (r ? xaip2 : xvp1);
+ (void) (r ? xaip1 : 0);
+ (void) (r ? 0 : xaip1);
+ /* The result of a conditional expression between a pointer to
+ qualified or unqualified (but not atomic) void, and a pointer to
+ an atomic type, is a pointer to appropriately qualified, not
+ atomic, void. As such, it is valid to use further in conditional
+ expressions with other pointer types. */
+ (void) (r ? xaip1 : (r ? xaip1 : xvp1));
+}
+
+/* Pointer += and -= integer is valid. */
+void
+func8 (void)
+{
+ b += 1;
+ b -= 2ULL;
+ ap += 3;
+}
+
+/* Various other cases of simple assignment are valid (some already
+ tested above). */
+void
+func9 (void)
+{
+ ap = 0;
+ ap = (void *) 0;
+ xvp1 = atp1;
+ atp1 = xvp1;
+}
+
+/* Test compatibility of function types in cases where _Atomic matches
+ (see c11-atomic-3.c for corresponding cases where it doesn't
+ match). */
+void fc0a (int const);
+void fc0a (int);
+void fc0b (int _Atomic);
+void fc0b (int _Atomic);
+void fc1a (int);
+void
+fc1a (x)
+ volatile int x;
+{
+}
+void fc1b (_Atomic int);
+void
+fc1b (x)
+ volatile _Atomic int x;
+{
+}
+void
+fc2a (x)
+ const int x;
+{
+}
+void fc2a (int); /* { dg-warning "follows non-prototype" } */
+void
+fc2b (x)
+ _Atomic int x;
+{
+}
+void fc2b (_Atomic int); /* { dg-warning "follows non-prototype" } */
+void fc3a (int);
+void
+fc3a (x)
+ volatile short x;
+{
+}
+void fc3b (_Atomic int);
+void
+fc3b (x)
+ _Atomic short x;
+{
+}
+void
+fc4a (x)
+ const short x;
+{
+}
+void fc4a (int); /* { dg-warning "follows non-prototype" } */
+void
+fc4b (x)
+ _Atomic short x;
+{
+}
+void fc4b (_Atomic int); /* { dg-warning "follows non-prototype" } */
+
+/* Test cases involving C_MAYBE_CONST_EXPR work. */
+void
+func10 (_Atomic int *p)
+{
+ p[0 / 0] = 1; /* { dg-warning "division by zero" } */
+ p[0 / 0] += 1; /* { dg-warning "division by zero" } */
+ *p = 0 / 0; /* { dg-warning "division by zero" } */
+ *p += 0 / 0; /* { dg-warning "division by zero" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-atomic-2.c b/gcc/testsuite/gcc.dg/c11-atomic-2.c
new file mode 100644
index 0000000000..34ee081d42
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-atomic-2.c
@@ -0,0 +1,165 @@
+/* Test for _Atomic in C11. Test of valid assignment cases for
+ arithmetic types. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#define TEST_ASSIGN(TYPE1, OP, TYPE2) \
+ do \
+ { \
+ _Atomic TYPE1 a = 0; \
+ TYPE2 b = 0; \
+ _Atomic TYPE2 c = 0; \
+ a OP b; \
+ a OP c; \
+ } \
+ while (0)
+
+#define TEST_ASSIGN_ARITHR(TYPE1, OP) \
+ do \
+ { \
+ TEST_ASSIGN (TYPE1, OP, _Bool); \
+ TEST_ASSIGN (TYPE1, OP, char); \
+ TEST_ASSIGN (TYPE1, OP, signed char); \
+ TEST_ASSIGN (TYPE1, OP, unsigned char); \
+ TEST_ASSIGN (TYPE1, OP, signed short); \
+ TEST_ASSIGN (TYPE1, OP, unsigned short); \
+ TEST_ASSIGN (TYPE1, OP, signed int); \
+ TEST_ASSIGN (TYPE1, OP, unsigned int); \
+ TEST_ASSIGN (TYPE1, OP, signed long); \
+ TEST_ASSIGN (TYPE1, OP, unsigned long); \
+ TEST_ASSIGN (TYPE1, OP, signed long long); \
+ TEST_ASSIGN (TYPE1, OP, unsigned long long); \
+ TEST_ASSIGN (TYPE1, OP, float); \
+ TEST_ASSIGN (TYPE1, OP, double); \
+ TEST_ASSIGN (TYPE1, OP, long double); \
+ TEST_ASSIGN (TYPE1, OP, _Complex float); \
+ TEST_ASSIGN (TYPE1, OP, _Complex double); \
+ TEST_ASSIGN (TYPE1, OP, _Complex long double); \
+ } \
+ while (0)
+
+#define TEST_ASSIGN_ARITHBOTH(OP) \
+ do \
+ { \
+ TEST_ASSIGN_ARITHR (_Bool, OP); \
+ TEST_ASSIGN_ARITHR (char, OP); \
+ TEST_ASSIGN_ARITHR (signed char, OP); \
+ TEST_ASSIGN_ARITHR (unsigned char, OP); \
+ TEST_ASSIGN_ARITHR (signed short, OP); \
+ TEST_ASSIGN_ARITHR (unsigned short, OP); \
+ TEST_ASSIGN_ARITHR (signed int, OP); \
+ TEST_ASSIGN_ARITHR (unsigned int, OP); \
+ TEST_ASSIGN_ARITHR (signed long, OP); \
+ TEST_ASSIGN_ARITHR (unsigned long, OP); \
+ TEST_ASSIGN_ARITHR (signed long long, OP); \
+ TEST_ASSIGN_ARITHR (unsigned long long, OP); \
+ TEST_ASSIGN_ARITHR (float, OP); \
+ TEST_ASSIGN_ARITHR (double, OP); \
+ TEST_ASSIGN_ARITHR (long double, OP); \
+ TEST_ASSIGN_ARITHR (_Complex float, OP); \
+ TEST_ASSIGN_ARITHR (_Complex double, OP); \
+ TEST_ASSIGN_ARITHR (_Complex long double, OP); \
+ } \
+ while (0)
+
+#define TEST_ASSIGN_INTR(TYPE1, OP) \
+ do \
+ { \
+ TEST_ASSIGN (TYPE1, OP, _Bool); \
+ TEST_ASSIGN (TYPE1, OP, char); \
+ TEST_ASSIGN (TYPE1, OP, signed char); \
+ TEST_ASSIGN (TYPE1, OP, unsigned char); \
+ TEST_ASSIGN (TYPE1, OP, signed short); \
+ TEST_ASSIGN (TYPE1, OP, unsigned short); \
+ TEST_ASSIGN (TYPE1, OP, signed int); \
+ TEST_ASSIGN (TYPE1, OP, unsigned int); \
+ TEST_ASSIGN (TYPE1, OP, signed long); \
+ TEST_ASSIGN (TYPE1, OP, unsigned long); \
+ TEST_ASSIGN (TYPE1, OP, signed long long); \
+ TEST_ASSIGN (TYPE1, OP, unsigned long long); \
+ } \
+ while (0)
+
+#define TEST_ASSIGN_INTBOTH(OP) \
+ do \
+ { \
+ TEST_ASSIGN_INTR (_Bool, OP); \
+ TEST_ASSIGN_INTR (char, OP); \
+ TEST_ASSIGN_INTR (signed char, OP); \
+ TEST_ASSIGN_INTR (unsigned char, OP); \
+ TEST_ASSIGN_INTR (signed short, OP); \
+ TEST_ASSIGN_INTR (unsigned short, OP); \
+ TEST_ASSIGN_INTR (signed int, OP); \
+ TEST_ASSIGN_INTR (unsigned int, OP); \
+ TEST_ASSIGN_INTR (signed long, OP); \
+ TEST_ASSIGN_INTR (unsigned long, OP); \
+ TEST_ASSIGN_INTR (signed long long, OP); \
+ TEST_ASSIGN_INTR (unsigned long long, OP); \
+ } \
+ while (0)
+
+void
+test_simple (void)
+{
+ TEST_ASSIGN_ARITHBOTH (=);
+}
+
+void
+test_mult (void)
+{
+ TEST_ASSIGN_ARITHBOTH (*=);
+}
+
+void
+test_div (void)
+{
+ TEST_ASSIGN_ARITHBOTH (/=);
+}
+
+void
+test_mod (void)
+{
+ TEST_ASSIGN_INTBOTH (%=);
+}
+
+void
+test_plus (void)
+{
+ TEST_ASSIGN_ARITHBOTH (+=);
+}
+
+void
+test_minus (void)
+{
+ TEST_ASSIGN_ARITHBOTH (-=);
+}
+
+void
+test_lshift (void)
+{
+ TEST_ASSIGN_INTBOTH (<<=);
+}
+
+void
+test_rshift (void)
+{
+ TEST_ASSIGN_INTBOTH (>>=);
+}
+
+void
+test_and (void)
+{
+ TEST_ASSIGN_INTBOTH (&=);
+}
+
+void
+test_xor (void)
+{
+ TEST_ASSIGN_INTBOTH (^=);
+}
+
+void
+test_or (void)
+{
+ TEST_ASSIGN_INTBOTH (|=);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-atomic-3.c b/gcc/testsuite/gcc.dg/c11-atomic-3.c
new file mode 100644
index 0000000000..4b314e88ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-atomic-3.c
@@ -0,0 +1,174 @@
+/* Test for _Atomic in C11. Test of invalid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* Increment and decrement are invalid for atomic complex types and
+ atomic pointers to incomplete types, just as for the corresponding
+ non-atomic types. Likewise for types on which arithmetic is
+ invalid. */
+_Atomic _Complex float acf;
+void *_Atomic apv;
+struct s *_Atomic aps;
+_Atomic struct t { char c; } as;
+
+void
+func (void)
+{
+ acf++; /* { dg-error "complex types" } */
+ acf--; /* { dg-error "complex types" } */
+ ++acf; /* { dg-error "complex types" } */
+ --acf; /* { dg-error "complex types" } */
+ apv++; /* { dg-error "wrong type|pointer of type" } */
+ apv--; /* { dg-error "wrong type|pointer of type" } */
+ ++apv; /* { dg-error "wrong type|pointer of type" } */
+ --apv; /* { dg-error "wrong type|pointer of type" } */
+ aps++; /* { dg-error "pointer to|invalid use of undefined type" } */
+ aps--; /* { dg-error "pointer to|invalid use of undefined type" } */
+ ++aps; /* { dg-error "pointer to|invalid use of undefined type" } */
+ --aps; /* { dg-error "pointer to|invalid use of undefined type" } */
+ as++; /* { dg-error "wrong type" } */
+ as--; /* { dg-error "wrong type" } */
+ ++as; /* { dg-error "wrong type" } */
+ --as; /* { dg-error "wrong type" } */
+}
+
+/* Pointer subtraction and comparisons differing in _Atomic are
+ invalid where such subtraction and comparisons differing in
+ qualifiers are valid. There is no special allowance for equality
+ comparisons of pointers to atomic void to pointers to object
+ types. Likewise for conditional expressions. */
+int *pi;
+_Atomic int *pai;
+_Atomic void *pav;
+int r;
+
+void
+func2 (void)
+{
+ r = pai - pi; /* { dg-error "invalid operands" } */
+ r = pi - pai; /* { dg-error "invalid operands" } */
+ r = pi < pai; /* { dg-error "distinct pointer types" } */
+ r = pi > pai; /* { dg-error "distinct pointer types" } */
+ r = pi <= pai; /* { dg-error "distinct pointer types" } */
+ r = pi >= pai; /* { dg-error "distinct pointer types" } */
+ r = pai < pi; /* { dg-error "distinct pointer types" } */
+ r = pai > pi; /* { dg-error "distinct pointer types" } */
+ r = pai <= pi; /* { dg-error "distinct pointer types" } */
+ r = pai >= pi; /* { dg-error "distinct pointer types" } */
+ r = pav == pi; /* { dg-error "distinct pointer types" } */
+ r = pav != pi; /* { dg-error "distinct pointer types" } */
+ r = pi == pav; /* { dg-error "distinct pointer types" } */
+ r = pi != pav; /* { dg-error "distinct pointer types" } */
+ (void) (r ? pai : pi); /* { dg-error "pointer type mismatch" } */
+ (void) (r ? pi : pai); /* { dg-error "pointer type mismatch" } */
+ (void) (r ? pai : pav); /* { dg-error "pointer type mismatch" } */
+ (void) (r ? pav : pai); /* { dg-error "pointer type mismatch" } */
+}
+
+/* Likewise for pointer assignment. */
+void
+func3 (void)
+{
+ pai = pi; /* { dg-error "incompatible pointer type" } */
+ pi = pai; /* { dg-error "incompatible pointer type" } */
+ pav = pai; /* { dg-error "incompatible pointer type" } */
+ pai = pav; /* { dg-error "incompatible pointer type" } */
+}
+
+/* Cases that are invalid for normal assignments are just as invalid
+ (and should not ICE) when the LHS is atomic. */
+void
+func4 (void)
+{
+ as = acf; /* { dg-error "incompatible types" } */
+ apv = as; /* { dg-error "incompatible types" } */
+ as += 1; /* { dg-error "invalid operands" } */
+ apv -= 1; /* { dg-error "pointer of type" } */
+ apv *= 1; /* { dg-error "invalid operands" } */
+ apv /= 1; /* { dg-error "invalid operands" } */
+ apv %= 1; /* { dg-error "invalid operands" } */
+ apv <<= 1; /* { dg-error "invalid operands" } */
+ apv >>= 1; /* { dg-error "invalid operands" } */
+ apv &= 1; /* { dg-error "invalid operands" } */
+ apv ^= 1; /* { dg-error "invalid operands" } */
+ apv |= 1; /* { dg-error "invalid operands" } */
+}
+
+/* We don't allow atomic bit-fields in GCC (implementation-defined
+ whether they are permitted). */
+struct abf
+{
+ _Atomic int i : 1; /* { dg-error "atomic type" } */
+ _Atomic int : 0; /* { dg-error "atomic type" } */
+};
+
+/* _Atomic (type-name) may not use a name for an array, function,
+ qualified or atomic type. */
+_Atomic (int [2]) v0; /* { dg-error "array type" } */
+_Atomic (void (void)) v1; /* { dg-error "function type" } */
+_Atomic (_Atomic int) v2; /* { dg-error "applied to a qualified type" } */
+_Atomic (const int) v3; /* { dg-error "applied to a qualified type" } */
+_Atomic (volatile int) v4; /* { dg-error "applied to a qualified type" } */
+_Atomic (int *restrict) v5; /* { dg-error "applied to a qualified type" } */
+
+/* _Atomic, used as a qualifier, may not be applied to a function or
+ array type. */
+typedef int arraytype[2];
+typedef void functiontype (void);
+_Atomic arraytype v6; /* { dg-error "array type" } */
+_Atomic arraytype *v7; /* { dg-error "array type" } */
+typedef _Atomic arraytype v8; /* { dg-error "array type" } */
+int v9 = sizeof (_Atomic arraytype); /* { dg-error "array type" } */
+void v10 (_Atomic arraytype parm); /* { dg-error "array type" } */
+struct v11 { _Atomic arraytype f; }; /* { dg-error "array type" } */
+_Atomic functiontype v12; /* { dg-error "function type" } */
+_Atomic functiontype *v13; /* { dg-error "function type" } */
+typedef _Atomic functiontype *v14; /* { dg-error "function type" } */
+void v15 (_Atomic functiontype parm); /* { dg-error "function type" } */
+
+/* Function parameters, when function types are required to be
+ compatible, may not differ in the presence of _Atomic. See
+ c11-atomic-1.c for corresponding tests where _Atomic matches. */
+void fc0 (int _Atomic); /* { dg-message "previous declaration" } */
+void fc0 (int); /* { dg-error "conflicting types" } */
+void fc1 (int); /* { dg-message "prototype declaration" } */
+void
+fc1 (x)
+ _Atomic int x; /* { dg-error "match prototype" } */
+{
+}
+void
+fc2 (x) /* { dg-message "previous definition" } */
+ _Atomic int x;
+{
+}
+void fc2 (int); /* { dg-error "incompatible type" } */
+void fc3 (int); /* { dg-message "prototype declaration" } */
+void
+fc3 (x)
+ _Atomic short x; /* { dg-error "match prototype" } */
+{
+}
+void
+fc4 (x) /* { dg-message "previous definition" } */
+ _Atomic short x;
+{
+}
+void fc4 (int); /* { dg-error "incompatible type" } */
+
+/* Arrays of atomic elements cannot be initialized with string
+ literals. */
+_Atomic char si0[] = ""; /* { dg-error "inappropriate type" } */
+_Atomic char si1[] = u8""; /* { dg-error "inappropriate type" } */
+_Atomic signed char si2[] = ""; /* { dg-error "inappropriate type" } */
+_Atomic signed char si3[] = u8""; /* { dg-error "inappropriate type" } */
+_Atomic unsigned char si4[] = ""; /* { dg-error "inappropriate type" } */
+_Atomic unsigned char si5[] = u8""; /* { dg-error "inappropriate type" } */
+_Atomic __WCHAR_TYPE__ si6[] = L""; /* { dg-error "inappropriate type" } */
+_Atomic __CHAR16_TYPE__ si7[] = u""; /* { dg-error "inappropriate type" } */
+_Atomic __CHAR32_TYPE__ si8[] = U""; /* { dg-error "inappropriate type" } */
+
+/* Anything that is syntactically a qualifier applied to the (void)
+ parameter list results in undefined behavior, which we
+ diagnose. */
+void fv (_Atomic void); /* { dg-error "may not be qualified" } */
diff --git a/gcc/testsuite/gcc.dg/c11-complex-1.c b/gcc/testsuite/gcc.dg/c11-complex-1.c
new file mode 100644
index 0000000000..4acb2bcc22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-complex-1.c
@@ -0,0 +1,43 @@
+/* Test complex divide does not have the bug identified in N1496. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+/* { dg-add-options ieee } */
+
+extern void abort (void);
+extern void exit (int);
+
+#define CMPLX(x, y) __builtin_complex ((double) (x), (double) (y))
+#define CMPLXF(x, y) __builtin_complex ((float) (x), (float) (y))
+#define CMPLXL(x, y) __builtin_complex ((long double) (x), (long double) (y))
+#define NAN __builtin_nanf ("")
+#define isnan(x) __builtin_isnan (x)
+
+volatile _Complex float num_f = CMPLXF (1, 1);
+volatile _Complex float den_f = CMPLXF (0, NAN);
+volatile _Complex float res_f, cres_f = CMPLXF (1, 1) / CMPLXF (0, NAN);
+
+volatile _Complex double num_d = CMPLX (1, 1);
+volatile _Complex double den_d = CMPLX (0, NAN);
+volatile _Complex double res_d, cres_d = CMPLX (1, 1) / CMPLX (0, NAN);
+
+volatile _Complex long double num_ld = CMPLXL (1, 1);
+volatile _Complex long double den_ld = CMPLXL (0, NAN);
+volatile _Complex long double res_ld, cres_ld = CMPLXL (1, 1) / CMPLXL (0, NAN);
+
+int
+main (void)
+{
+ res_f = num_f / den_f;
+ if (!isnan (__real__ res_f) || !isnan (__imag__ res_f)
+ || !isnan (__real__ cres_f) || !isnan (__imag__ cres_f))
+ abort ();
+ res_d = num_d / den_d;
+ if (!isnan (__real__ res_d) || !isnan (__imag__ res_d)
+ || !isnan (__real__ cres_d) || !isnan (__imag__ cres_d))
+ abort ();
+ res_ld = num_ld / den_ld;
+ if (!isnan (__real__ res_ld) || !isnan (__imag__ res_ld)
+ || !isnan (__real__ cres_ld) || !isnan (__imag__ cres_ld))
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-float-1.c b/gcc/testsuite/gcc.dg/c11-float-1.c
new file mode 100644
index 0000000000..376c44d3e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-float-1.c
@@ -0,0 +1,169 @@
+/* Test for <float.h> C11 macros. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do preprocess } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* This test checks that the C11 macros are defined;
+ it does not check the correctness of their values. */
+
+#include <float.h>
+
+#ifndef FLT_ROUNDS
+#error "FLT_ROUNDS undefined"
+#endif
+
+#ifndef FLT_RADIX
+#error "FLT_RADIX undefined"
+#endif
+
+#ifndef FLT_MANT_DIG
+#error "FLT_MANT_DIG undefined"
+#endif
+
+#ifndef FLT_DIG
+#error "FLT_DIG undefined"
+#endif
+
+#ifndef FLT_MIN_EXP
+#error "FLT_MIN_EXP undefined"
+#endif
+
+#ifndef FLT_MIN_10_EXP
+#error "FLT_MIN_10_EXP undefined"
+#endif
+
+#ifndef FLT_MAX_EXP
+#error "FLT_MAX_EXP undefined"
+#endif
+
+#ifndef FLT_MAX_10_EXP
+#error "FLT_MAX_10_EXP undefined"
+#endif
+
+#ifndef FLT_MAX
+#error "FLT_MAX undefined"
+#endif
+
+#ifndef FLT_EPSILON
+#error "FLT_EPSILON undefined"
+#endif
+
+#ifndef FLT_MIN
+#error "FLT_MIN undefined"
+#endif
+
+#ifndef DBL_MANT_DIG
+#error "DBL_MANT_DIG undefined"
+#endif
+
+#ifndef DBL_DIG
+#error "DBL_DIG undefined"
+#endif
+
+#ifndef DBL_MIN_EXP
+#error "DBL_MIN_EXP undefined"
+#endif
+
+#ifndef DBL_MIN_10_EXP
+#error "DBL_MIN_10_EXP undefined"
+#endif
+
+#ifndef DBL_MAX_EXP
+#error "DBL_MAX_EXP undefined"
+#endif
+
+#ifndef DBL_MAX_10_EXP
+#error "DBL_MAX_10_EXP undefined"
+#endif
+
+#ifndef DBL_MAX
+#error "DBL_MAX undefined"
+#endif
+
+#ifndef DBL_EPSILON
+#error "DBL_EPSILON undefined"
+#endif
+
+#ifndef DBL_MIN
+#error "DBL_MIN undefined"
+#endif
+
+#ifndef LDBL_MANT_DIG
+#error "LDBL_MANT_DIG undefined"
+#endif
+
+#ifndef LDBL_DIG
+#error "LDBL_DIG undefined"
+#endif
+
+#ifndef LDBL_MIN_EXP
+#error "LDBL_MIN_EXP undefined"
+#endif
+
+#ifndef LDBL_MIN_10_EXP
+#error "LDBL_MIN_10_EXP undefined"
+#endif
+
+#ifndef LDBL_MAX_EXP
+#error "LDBL_MAX_EXP undefined"
+#endif
+
+#ifndef LDBL_MAX_10_EXP
+#error "LDBL_MAX_10_EXP undefined"
+#endif
+
+#ifndef LDBL_MAX
+#error "LDBL_MAX undefined"
+#endif
+
+#ifndef LDBL_EPSILON
+#error "LDBL_EPSILON undefined"
+#endif
+
+#ifndef LDBL_MIN
+#error "LDBL_MIN undefined"
+#endif
+
+#ifndef FLT_EVAL_METHOD
+#error "FLT_EVAL_METHOD undefined"
+#endif
+
+#ifndef DECIMAL_DIG
+#error "DECIMAL_DIG undefined"
+#endif
+
+#ifndef FLT_DECIMAL_DIG
+#error "FLT_DECIMAL_DIG undefined"
+#endif
+
+#ifndef DBL_DECIMAL_DIG
+#error "DBL_DECIMAL_DIG undefined"
+#endif
+
+#ifndef LDBL_DECIMAL_DIG
+#error "LDBL_DECIMAL_DIG undefined"
+#endif
+
+#ifndef FLT_HAS_SUBNORM
+#error "FLT_HAS_SUBNORM undefined"
+#endif
+
+#ifndef DBL_HAS_SUBNORM
+#error "DBL_HAS_SUBNORM undefined"
+#endif
+
+#ifndef LDBL_HAS_SUBNORM
+#error "LDBL_HAS_SUBNORM undefined"
+#endif
+
+#ifndef FLT_TRUE_MIN
+#error "FLT_TRUE_MIN undefined"
+#endif
+
+#ifndef DBL_TRUE_MIN
+#error "DBL_TRUE_MIN undefined"
+#endif
+
+#ifndef LDBL_TRUE_MIN
+#error "LDBL_TRUE_MIN undefined"
+#endif
diff --git a/gcc/testsuite/gcc.dg/c11-generic-1.c b/gcc/testsuite/gcc.dg/c11-generic-1.c
new file mode 100644
index 0000000000..60ef1f0eb6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-generic-1.c
@@ -0,0 +1,57 @@
+/* Test C11 _Generic. Valid uses. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Noreturn extern void exit (int);
+_Noreturn extern void abort (void);
+
+void
+check (int n)
+{
+ if (n)
+ abort ();
+}
+
+int
+main (void)
+{
+ int n = 0;
+
+ check (_Generic (n++, int: 0));
+ /* _Generic should not evaluate its argument. */
+ check (n);
+
+ check (_Generic (n, double: n++, default: 0));
+ check (n);
+
+ /* Qualifiers are removed for the purpose of type matching. */
+ const int cn = 0;
+ check (_Generic (cn, int: 0, default: n++));
+ check (n);
+ check (_Generic ((const int) n, int: 0, default: n++));
+ check (n);
+
+ /* Arrays decay to pointers. */
+ int a[1];
+ const int ca[1];
+ check (_Generic (a, int *: 0, const int *: n++));
+ check (n);
+ check (_Generic (ca, const int *: 0, int *: n++));
+ check (n);
+
+ /* Functions decay to pointers. */
+ extern void f (void);
+ check (_Generic (f, void (*) (void): 0, default: n++));
+ check (n);
+
+ /* _Noreturn is not part of the function type. */
+ check (_Generic (&abort, void (*) (void): 0, default: n++));
+ check (n);
+
+ /* Integer promotions do not occur. */
+ short s;
+ check (_Generic (s, short: 0, int: n++));
+ check (n);
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-generic-2.c b/gcc/testsuite/gcc.dg/c11-generic-2.c
new file mode 100644
index 0000000000..90be650af2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-generic-2.c
@@ -0,0 +1,27 @@
+/* Test C11 _Generic. Error cases. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+struct incomplete;
+
+void
+f (int n)
+{
+ /* Multiple 'default's. */
+ _Generic (n, default: 1, default: 2); /* { dg-error "duplicate .*default.* case" } */
+
+ /* Variably-modified type not ok. */
+ _Generic (n, int[n]: 0, default: 1); /* { dg-error "variable length type" } */
+ /* Type must be complete. */
+ _Generic (n, struct incomplete: 0, default: 1); /* { dg-error "incomplete type" } */
+ _Generic (n, void: 0, default: 1); /* { dg-error "incomplete type" } */
+
+ /* Type must be object type. */
+ _Generic (n, void (void): 0, default: 1); /* { dg-error "function type" } */
+
+ /* Two compatible types in association list. */
+ _Generic (&n, int: 5, signed int: 7, default: 23); /* { dg-error "two compatible types" } */
+
+ /* No matching association. */
+ _Generic (n, void *: 5); /* { dg-error "not compatible with any association" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-noreturn-1.c b/gcc/testsuite/gcc.dg/c11-noreturn-1.c
new file mode 100644
index 0000000000..e92c5ae045
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-noreturn-1.c
@@ -0,0 +1,59 @@
+/* Test C11 _Noreturn. Test valid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Noreturn void exit (int);
+
+_Noreturn int f1 (void);
+
+_Noreturn void f2 (void);
+
+static void _Noreturn f3 (void) { exit (0); }
+
+/* Returning from a noreturn function is undefined at runtime, not a
+ constraint violation, but recommended practice is to diagnose if
+ such a return appears possible. */
+
+_Noreturn int
+f4 (void)
+{
+ return 1; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } 20 } */
+}
+
+_Noreturn void
+f5 (void)
+{
+ return; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } 27 } */
+}
+
+_Noreturn void
+f6 (void)
+{
+} /* { dg-warning "does return" } */
+
+_Noreturn void
+f7 (int a)
+{
+ if (a)
+ exit (0);
+} /* { dg-warning "does return" } */
+
+/* Declarations need not all have _Noreturn. */
+
+void f2 (void);
+
+void f8 (void);
+_Noreturn void f8 (void);
+
+/* Duplicate _Noreturn is OK. */
+_Noreturn _Noreturn void _Noreturn f9 (void);
+
+/* _Noreturn does not affect type compatibility. */
+
+void (*fp) (void) = f5;
+
+/* noreturn is an ordinary identifier. */
+
+int noreturn;
diff --git a/gcc/testsuite/gcc.dg/c11-noreturn-2.c b/gcc/testsuite/gcc.dg/c11-noreturn-2.c
new file mode 100644
index 0000000000..951d028f7a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-noreturn-2.c
@@ -0,0 +1,77 @@
+/* Test C11 _Noreturn. Test valid code using stdnoreturn.h. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdnoreturn.h>
+
+extern int strcmp (const char *, const char *);
+
+noreturn void exit (int);
+noreturn void abort (void);
+
+noreturn int f1 (void);
+
+noreturn void f2 (void);
+
+static void noreturn f3 (void) { exit (0); }
+
+/* Returning from a noreturn function is undefined at runtime, not a
+ constraint violation, but recommended practice is to diagnose if
+ such a return appears possible. */
+
+noreturn int
+f4 (void)
+{
+ return 1; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } 25 } */
+}
+
+noreturn void
+f5 (void)
+{
+ return; /* { dg-warning "has a 'return' statement" } */
+ /* { dg-warning "does return" "second warning" { target *-*-* } 32 } */
+}
+
+noreturn void
+f6 (void)
+{
+} /* { dg-warning "does return" } */
+
+noreturn void
+f7 (int a)
+{
+ if (a)
+ exit (0);
+} /* { dg-warning "does return" } */
+
+/* Declarations need not all have noreturn. */
+
+void f2 (void);
+
+void f8 (void);
+noreturn void f8 (void);
+
+/* Duplicate noreturn is OK. */
+noreturn noreturn void noreturn f9 (void);
+
+/* noreturn does not affect type compatibility. */
+
+void (*fp) (void) = f5;
+
+#ifndef noreturn
+#error "noreturn not defined"
+#endif
+
+#define str(x) #x
+#define xstr(x) str(x)
+
+const char *s = xstr(noreturn);
+
+int
+main (void)
+{
+ if (strcmp (s, "_Noreturn") != 0)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-noreturn-3.c b/gcc/testsuite/gcc.dg/c11-noreturn-3.c
new file mode 100644
index 0000000000..168d012a3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-noreturn-3.c
@@ -0,0 +1,11 @@
+/* Test C11 _Noreturn. Test _Noreturn on main, hosted. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors -fhosted" } */
+
+_Noreturn void exit (int);
+
+_Noreturn int
+main (void) /* { dg-error "'main' declared '_Noreturn'" } */
+{
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-noreturn-4.c b/gcc/testsuite/gcc.dg/c11-noreturn-4.c
new file mode 100644
index 0000000000..a92a1140f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-noreturn-4.c
@@ -0,0 +1,11 @@
+/* Test C11 _Noreturn. Test _Noreturn on main, freestanding. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors -ffreestanding" } */
+
+_Noreturn void exit (int);
+
+_Noreturn int
+main (void)
+{
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-noreturn-5.c b/gcc/testsuite/gcc.dg/c11-noreturn-5.c
new file mode 100644
index 0000000000..d1c0949f32
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-noreturn-5.c
@@ -0,0 +1,17 @@
+/* Test C11 _Noreturn. Test invalid uses. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Noreturn struct s; /* { dg-error "empty declaration" } */
+
+typedef _Noreturn void f (void); /* { dg-error "typedef" } */
+
+void g (_Noreturn void fp (void)); /* { dg-error "parameter" } */
+
+_Noreturn void (*p) (void); /* { dg-error "variable" } */
+
+struct t { int a; _Noreturn void (*f) (void); }; /* { dg-error "expected" } */
+
+int *_Noreturn *q; /* { dg-error "expected" } */
+
+int i = sizeof (_Noreturn int (*) (void)); /* { dg-error "expected" } */
diff --git a/gcc/testsuite/gcc.dg/c11-pointer-float-1.c b/gcc/testsuite/gcc.dg/c11-pointer-float-1.c
new file mode 100644
index 0000000000..8c24165877
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-pointer-float-1.c
@@ -0,0 +1,28 @@
+/* Test C11 constraint against pointer / floating-point casts. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+void *p;
+float f;
+double d;
+long double ld;
+_Complex float cf;
+_Complex double cd;
+_Complex long double cld;
+
+void
+func (void)
+{
+ f = (float) p; /* { dg-error "pointer" } */
+ d = (double) p; /* { dg-error "pointer" } */
+ ld = (long double) p; /* { dg-error "pointer" } */
+ cf = (_Complex float) p; /* { dg-error "pointer" } */
+ cd = (_Complex double) p; /* { dg-error "pointer" } */
+ cld = (_Complex long double) p; /* { dg-error "pointer" } */
+ p = (void *) f; /* { dg-error "pointer" } */
+ p = (void *) d; /* { dg-error "pointer" } */
+ p = (void *) ld; /* { dg-error "pointer" } */
+ p = (void *) cf; /* { dg-error "pointer" } */
+ p = (void *) cd; /* { dg-error "pointer" } */
+ p = (void *) cld; /* { dg-error "pointer" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-1.c b/gcc/testsuite/gcc.dg/c11-static-assert-1.c
new file mode 100644
index 0000000000..9209a7a407
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-1.c
@@ -0,0 +1,41 @@
+/* Test C11 static assertions. Valid assertions. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Static_assert (1, "foo");
+
+enum e { E0, E1 };
+
+_Static_assert (E1, L"bar");
+
+_Static_assert (-1, "foo" L"bar");
+
+struct s
+{
+ int a;
+ _Static_assert (3, "s");
+ int b;
+};
+
+union u
+{
+ int i;
+ _Static_assert ((int)1.0, L"");
+};
+
+void
+f (void)
+{
+ int i;
+ i = 1;
+ _Static_assert (0 + 1, "f");
+ i = 2;
+}
+
+void
+g (void)
+{
+ int i = 0;
+ for (_Static_assert (1, ""); i < 10; i++)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-2.c b/gcc/testsuite/gcc.dg/c11-static-assert-2.c
new file mode 100644
index 0000000000..de2f573cb8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-2.c
@@ -0,0 +1,41 @@
+/* Test C11 static assertions. Failed assertions. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Static_assert (0, "assert1"); /* { dg-error "static assertion failed: \"assert1\"" } */
+
+enum e { E0, E1 };
+
+_Static_assert (E0, L"assert2"); /* { dg-error "static assertion failed: \"assert2\"" } */
+
+_Static_assert (-0, "ass" L"ert3"); /* { dg-error "static assertion failed: \"assert3\"" } */
+
+struct s
+{
+ int a;
+ _Static_assert (0, "assert4"); /* { dg-error "static assertion failed: \"assert4\"" } */
+ int b;
+};
+
+union u
+{
+ int i;
+ _Static_assert ((int)0.0, L"assert5"); /* { dg-error "static assertion failed: \"assert5\"" } */
+};
+
+void
+f (void)
+{
+ int i;
+ i = 1;
+ _Static_assert (0 + 0, "assert6"); /* { dg-error "static assertion failed: \"assert6\"" } */
+ i = 2;
+}
+
+void
+g (void)
+{
+ int i = 0;
+ for (_Static_assert (0, "assert7"); i < 10; i++) /* { dg-error "static assertion failed: \"assert7\"" } */
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-3.c b/gcc/testsuite/gcc.dg/c11-static-assert-3.c
new file mode 100644
index 0000000000..79448a533e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-3.c
@@ -0,0 +1,28 @@
+/* Test C11 static assertions. Invalid assertions. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Static_assert (__INT_MAX__ * 2, "overflow"); /* { dg-warning "integer overflow in expression" } */
+/* { dg-error "overflow in constant expression" "error" { target *-*-* } 5 } */
+
+_Static_assert ((void *)(__SIZE_TYPE__)16, "non-integer"); /* { dg-error "not an integer" } */
+
+_Static_assert (1.0, "non-integer"); /* { dg-error "not an integer" } */
+
+_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-error "not an integer constant expression" } */
+
+int i;
+
+_Static_assert (i, "non-constant"); /* { dg-error "not constant" } */
+
+void
+f (void)
+{
+ int j = 0;
+ for (_Static_assert (sizeof (struct s { int k; }), ""); j < 10; j++) /* { dg-error "loop initial declaration" } */
+ ;
+}
+
+_Static_assert (1, 1); /* { dg-error "expected" } */
+
+_Static_assert (1, ("")); /* { dg-error "expected" } */
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-4.c b/gcc/testsuite/gcc.dg/c11-static-assert-4.c
new file mode 100644
index 0000000000..ddab440ff4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-4.c
@@ -0,0 +1,13 @@
+/* Test C11 static assertions. More invalid assertions. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* Static assertions not valid in old-style parameter declarations
+ because declarations there must have declarators. */
+
+void
+f (i)
+ int i;
+ _Static_assert (1, ""); /* { dg-error "expected" } */
+{
+}
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-5.c b/gcc/testsuite/gcc.dg/c11-static-assert-5.c
new file mode 100644
index 0000000000..e88b8167a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-5.c
@@ -0,0 +1,5 @@
+/* Test C11 static assertions. Non-constant-expression without -pedantic. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11" } */
+
+_Static_assert ((int)(1.0 + 1.0), "non-constant-expression");
diff --git a/gcc/testsuite/gcc.dg/c11-static-assert-6.c b/gcc/testsuite/gcc.dg/c11-static-assert-6.c
new file mode 100644
index 0000000000..ac7e14114d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-static-assert-6.c
@@ -0,0 +1,5 @@
+/* Test C11 static assertions. Non-constant-expression with -pedantic. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic" } */
+
+_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-warning "not an integer constant expression" } */
diff --git a/gcc/testsuite/gcc.dg/c11-stdatomic-1.c b/gcc/testsuite/gcc.dg/c11-stdatomic-1.c
new file mode 100644
index 0000000000..79909c055a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-stdatomic-1.c
@@ -0,0 +1,119 @@
+/* Test stdatomic.h header contents. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+#include <stdatomic.h>
+
+#ifndef ATOMIC_BOOL_LOCK_FREE
+# error ATOMIC_BOOL_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_CHAR_LOCK_FREE
+# error ATOMIC_CHAR_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_CHAR16_T_LOCK_FREE
+# error ATOMIC_CHAR16_T_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_CHAR32_T_LOCK_FREE
+# error ATOMIC_CHAR32_T_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_WCHAR_T_LOCK_FREE
+# error ATOMIC_WCHAR_T_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_SHORT_LOCK_FREE
+# error ATOMIC_SHORT_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_INT_LOCK_FREE
+# error ATOMIC_INT_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_LONG_LOCK_FREE
+# error ATOMIC_LONG_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_LLONG_LOCK_FREE
+# error ATOMIC_LLONG_LOCK_FREE not defined
+#endif
+
+#ifndef ATOMIC_POINTER_LOCK_FREE
+# error ATOMIC_POINTER_LOCK_FREE not defined
+#endif
+
+memory_order m0 = memory_order_relaxed;
+memory_order m1 = memory_order_consume;
+memory_order m2 = memory_order_acquire;
+memory_order m3 = memory_order_release;
+memory_order m4 = memory_order_acq_rel;
+memory_order m5 = memory_order_seq_cst;
+
+atomic_flag af = ATOMIC_FLAG_INIT;
+
+struct s { int i[100]; } sv;
+void
+f (void)
+{
+ _Atomic struct s sva = ATOMIC_VAR_INIT (sv);
+}
+
+#ifndef kill_dependency
+# error kill_dependency not defined
+#endif
+
+#define CHECK_ATOMIC_TYPEDEF(A, B) \
+ do \
+ { \
+ A v; \
+ char array1[sizeof (A) == sizeof (B) ? 1 : -1]; \
+ char array2[_Alignof (A) == _Alignof (B) ? 1 : -1]; \
+ } \
+ while (0)
+
+#include <stddef.h>
+#include <stdint.h>
+
+void
+check_typedefs (void)
+{
+ CHECK_ATOMIC_TYPEDEF (atomic_bool, _Atomic _Bool);
+ CHECK_ATOMIC_TYPEDEF (atomic_char, _Atomic char);
+ CHECK_ATOMIC_TYPEDEF (atomic_schar, _Atomic signed char);
+ CHECK_ATOMIC_TYPEDEF (atomic_uchar, _Atomic unsigned char);
+ CHECK_ATOMIC_TYPEDEF (atomic_short, _Atomic short);
+ CHECK_ATOMIC_TYPEDEF (atomic_ushort, _Atomic unsigned short);
+ CHECK_ATOMIC_TYPEDEF (atomic_int, _Atomic int);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint, _Atomic unsigned int);
+ CHECK_ATOMIC_TYPEDEF (atomic_long, _Atomic long);
+ CHECK_ATOMIC_TYPEDEF (atomic_ulong, _Atomic unsigned long);
+ CHECK_ATOMIC_TYPEDEF (atomic_llong, _Atomic long long);
+ CHECK_ATOMIC_TYPEDEF (atomic_ullong, _Atomic unsigned long long);
+ CHECK_ATOMIC_TYPEDEF (atomic_char16_t, _Atomic __CHAR16_TYPE__);
+ CHECK_ATOMIC_TYPEDEF (atomic_char32_t, _Atomic __CHAR32_TYPE__);
+ CHECK_ATOMIC_TYPEDEF (atomic_wchar_t, _Atomic wchar_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_least8_t, _Atomic int_least8_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_least8_t, _Atomic uint_least8_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_least16_t, _Atomic int_least16_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_least16_t, _Atomic uint_least16_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_least32_t, _Atomic int_least32_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_least32_t, _Atomic uint_least32_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_least64_t, _Atomic int_least64_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_least64_t, _Atomic uint_least64_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_fast8_t, _Atomic int_fast8_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_fast8_t, _Atomic uint_fast8_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_fast16_t, _Atomic int_fast16_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_fast16_t, _Atomic uint_fast16_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_fast32_t, _Atomic int_fast32_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_fast32_t, _Atomic uint_fast32_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_int_fast64_t, _Atomic int_fast64_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uint_fast64_t, _Atomic uint_fast64_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_intptr_t, _Atomic intptr_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uintptr_t, _Atomic uintptr_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_size_t, _Atomic size_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_ptrdiff_t, _Atomic ptrdiff_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_intmax_t, _Atomic intmax_t);
+ CHECK_ATOMIC_TYPEDEF (atomic_uintmax_t, _Atomic uintmax_t);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-thread-local-1.c b/gcc/testsuite/gcc.dg/c11-thread-local-1.c
new file mode 100644
index 0000000000..b21209aecd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-thread-local-1.c
@@ -0,0 +1,28 @@
+/* Test for _Thread_local in C11. Test of valid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Thread_local int a;
+static _Thread_local long b;
+extern _Thread_local int c, a;
+_Thread_local static int d;
+long _Thread_local extern b;
+_Thread_local int extern a;
+_Thread_local struct s; /* { dg-warning "useless" } */
+_Thread_local int a = 1;
+extern _Thread_local int c = 2; /* { dg-warning "initialized and" } */
+void
+f (void)
+{
+ static _Thread_local int x;
+ extern _Thread_local long b;
+ _Thread_local extern int a;
+}
+
+inline void
+fi (void)
+{
+ static _Thread_local const int v;
+ (void) a;
+ static _Thread_local int (*const p)[a];
+}
diff --git a/gcc/testsuite/gcc.dg/c11-thread-local-2.c b/gcc/testsuite/gcc.dg/c11-thread-local-2.c
new file mode 100644
index 0000000000..3387226168
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-thread-local-2.c
@@ -0,0 +1,46 @@
+/* Test for _Thread_local in C11. Test of invalid code. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Thread_local void f (void); /* { dg-error "storage class" } */
+_Thread_local void g (void) {} /* { dg-error "_Thread_local" } */
+typedef _Thread_local int t1; /* { dg-error "_Thread_local" } */
+_Thread_local typedef int t2; /* { dg-error "_Thread_local" } */
+
+void
+h (void)
+{
+ _Thread_local auto int a; /* { dg-error "_Thread_local" } */
+ _Thread_local register int b; /* { dg-error "_Thread_local" } */
+ auto _Thread_local int c; /* { dg-error "_Thread_local" } */
+ register _Thread_local int d; /* { dg-error "_Thread_local" } */
+ _Thread_local int e; /* { dg-error "_Thread_local" } */
+}
+
+_Thread_local int v; /* { dg-message "previous" } */
+extern int v; /* { dg-error "thread" } */
+int w; /* { dg-message "previous" } */
+extern _Thread_local int w; /* { dg-error "thread" } */
+
+_Thread_local int x; /* { dg-message "previous" } */
+int y; /* { dg-message "previous" } */
+
+int vv;
+
+void
+i (void)
+{
+ extern int x; /* { dg-error "thread" } */
+ extern _Thread_local int y; /* { dg-error "thread" } */
+ static _Thread_local int a[vv]; /* { dg-error "storage size" } */
+ static _Thread_local int vi = vv; /* { dg-error "not constant" } */
+}
+
+static _Thread_local int sv;
+
+inline void
+j (void)
+{
+ static _Thread_local int vj; /* { dg-error "static but declared" } */
+ (void) sv; /* { dg-error "static but used in inline" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-typedef-1.c b/gcc/testsuite/gcc.dg/c11-typedef-1.c
new file mode 100644
index 0000000000..3224ba5a41
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-typedef-1.c
@@ -0,0 +1,70 @@
+/* Test typedef redeclaration in C11. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* C11 permits typedefs to be redeclared to the same type, but not to
+ different-but-compatible types, and not when the type is variably
+ modified. */
+
+#include <limits.h>
+
+typedef int TI;
+typedef int TI2;
+typedef TI2 TI;
+typedef TI TI2;
+
+enum e { E1 = 0, E2 = INT_MAX, E3 = -1 };
+typedef enum e TE;
+typedef enum e TE; /* { dg-message "previous declaration" } */
+typedef int TE; /* { dg-error "with different type" } */
+
+struct s;
+typedef struct s TS;
+struct s { int i; };
+typedef struct s TS;
+
+typedef int IA[];
+typedef TI2 IA[]; /* { dg-message "previous declaration" } */
+typedef int A2[2];
+typedef TI A2[2]; /* { dg-message "previous declaration" } */
+typedef IA A2; /* { dg-error "with different type" } */
+typedef int A3[3];
+typedef A3 IA; /* { dg-error "with different type" } */
+
+typedef void F(int);
+typedef void F(TI); /* { dg-message "previous declaration" } */
+typedef void F(enum e); /* { dg-error "with different type" } */
+
+typedef int G(void);
+typedef TI G(void); /* { dg-message "previous declaration" } */
+typedef enum e G(void); /* { dg-error "with different type" } */
+
+typedef int *P;
+typedef TI *P; /* { dg-message "previous declaration" } */
+typedef enum e *P; /* { dg-error "with different type" } */
+
+typedef void F2();
+typedef void F2(); /* { dg-message "previous declaration" } */
+typedef void F2(int); /* { dg-error "with different type" } */
+
+void
+f (void)
+{
+ int a = 1;
+ int b = 2;
+ typedef void FN(int (*p)[a]);
+ typedef void FN(int (*p)[b]);
+ typedef void FN(int (*p)[*]); /* { dg-message "previous declaration" } */
+ typedef void FN(int (*p)[1]); /* { dg-error "with different type" } */
+ typedef void FN2(int (*p)[a]);
+ typedef void FN2(int (*p)[b]);
+ typedef void FN2(int (*p)[*]); /* { dg-message "previous declaration" } */
+ typedef void FN2(int (*p)[]); /* { dg-error "with different type" } */
+ typedef int AV[a]; /* { dg-message "previous declaration" } */
+ typedef int AV[b-1]; /* { dg-error "redefinition" } */
+ typedef int AAa[a]; /* { dg-message "previous declaration" } */
+ typedef int AAb[b-1];
+ typedef AAa *VF(void); /* { dg-message "previous declaration" } */
+ typedef AAb *VF(void); /* { dg-error "redefinition" } */
+ typedef AAa AAa; /* { dg-error "redefinition" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c11-uni-string-1.c b/gcc/testsuite/gcc.dg/c11-uni-string-1.c
new file mode 100644
index 0000000000..9f86bea826
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-uni-string-1.c
@@ -0,0 +1,112 @@
+/* Test Unicode strings in C11. Test valid code. */
+/* { dg-do run } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+/* More thorough tests are in c-c++-common/raw-string-*.c; this test
+ verifies the particular subset (Unicode but not raw strings) that
+ is in C11. */
+
+typedef __CHAR16_TYPE__ char16_t;
+typedef __CHAR32_TYPE__ char32_t;
+typedef __SIZE_TYPE__ size_t;
+
+extern void abort (void);
+extern void exit (int);
+extern int memcmp (const void *, const void *, size_t);
+
+#define R "(R)"
+#define u8R "(u8R)"
+#define uR "(uR)"
+#define UR "(UR)"
+#define LR "(LR)"
+#define u8 randomu8
+#define u randomu
+#define U randomU
+
+const char su8[] = u8"a\u010d";
+const char su8a[] = "a\xc4\x8d";
+
+const char16_t su16[] = u"\u0567";
+const char16_t su16a[] = { 0x0567, 0 };
+
+const char32_t su32[] = U"\u0123";
+const char32_t su32a[] = { 0x0123, 0 };
+
+const char tu[] = R"a";
+const char tua[] = "(R)a";
+
+const char tu8[] = u8R"b";
+const char tu8a[] = "(u8R)b";
+
+const char tu16[] = uR"c";
+const char tu16a[] = "(uR)c";
+
+const char tu32[] = UR"d";
+const char tu32a[] = "(UR)d";
+
+const char tl[] = LR"e";
+const char tla[] = "(LR)e";
+
+#define str(x) #x
+const char ts[] = str(u"a" U"b" u8"c");
+const char tsa[] = "u\"a\" U\"b\" u8\"c\"";
+
+/* GCC always uses UTF-16 and UTF-32 for char16_t and char32_t. */
+#ifndef __STDC_UTF_16__
+#error "__STDC_UTF_16__ not defined"
+#endif
+#ifndef __STDC_UTF_32__
+#error "__STDC_UTF_32__ not defined"
+#endif
+#define xstr(x) str(x)
+const char tm16[] = xstr(__STDC_UTF_16__);
+const char tm16a[] = "1";
+const char tm32[] = xstr(__STDC_UTF_32__);
+const char tm32a[] = "1";
+
+int
+main (void)
+{
+ if (sizeof (su8) != sizeof (su8a)
+ || memcmp (su8, su8a, sizeof (su8)) != 0)
+ abort ();
+ if (sizeof (su16) != sizeof (su16a)
+ || memcmp (su16, su16a, sizeof (su16)) != 0)
+ abort ();
+ if (sizeof (su32) != sizeof (su32a)
+ || memcmp (su32, su32a, sizeof (su32)) != 0)
+ abort ();
+ if (sizeof (tu) != sizeof (tua)
+ || memcmp (tu, tua, sizeof (tu)) != 0)
+ abort ();
+ if (sizeof (tu8) != sizeof (tu8a)
+ || memcmp (tu8, tu8a, sizeof (tu8)) != 0)
+ abort ();
+ if (sizeof (tu16) != sizeof (tu16a)
+ || memcmp (tu16, tu16a, sizeof (tu16)) != 0)
+ abort ();
+ if (sizeof (tu32) != sizeof (tu32a)
+ || memcmp (tu32, tu32a, sizeof (tu32)) != 0)
+ abort ();
+ if (sizeof (tl) != sizeof (tla)
+ || memcmp (tl, tla, sizeof (tl)) != 0)
+ abort ();
+ if (sizeof (ts) != sizeof (tsa)
+ || memcmp (ts, tsa, sizeof (ts)) != 0)
+ abort ();
+ if (sizeof (tm16) != sizeof (tm16a)
+ || memcmp (tm16, tm16a, sizeof (tm16)) != 0)
+ abort ();
+ if (sizeof (tm32) != sizeof (tm32a)
+ || memcmp (tm32, tm32a, sizeof (tm32)) != 0)
+ abort ();
+ if (u'\u0123' != 0x0123)
+ abort ();
+ if (U'\u0456' != 0x0456)
+ abort ();
+#undef u8
+#define u8
+ if (u8'a' != 'a')
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/c11-uni-string-2.c b/gcc/testsuite/gcc.dg/c11-uni-string-2.c
new file mode 100644
index 0000000000..583c38a87e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c11-uni-string-2.c
@@ -0,0 +1,8 @@
+/* Test Unicode strings in C11. Test constraint. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+const void *p1 = L"a" u8"b"; /* { dg-error "concatenation" } */
+const void *p2 = L"a" "b" u8"c"; /* { dg-error "concatenation" } */
+const void *p3 = u8"a" L"b"; /* { dg-error "concatenation" } */
+const void *p4 = u8"a" "b" L"c"; /* { dg-error "concatenation" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-align-1.c b/gcc/testsuite/gcc.dg/c1x-align-1.c
deleted file mode 100644
index 9fe5757bed..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-align-1.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Test C1X alignment support. Test valid code. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-#include <stddef.h>
-
-_Alignas (_Alignof (max_align_t)) char c;
-extern _Alignas (max_align_t) char c;
-extern char c;
-
-extern _Alignas (max_align_t) short s;
-_Alignas (max_align_t) short s;
-
-_Alignas (int) int i;
-extern int i;
-
-_Alignas (max_align_t) long l;
-
-_Alignas (max_align_t) long long ll;
-
-_Alignas (max_align_t) float f;
-
-_Alignas (max_align_t) double d;
-
-_Alignas (max_align_t) _Complex long double cld;
-
-_Alignas (0) _Alignas (int) _Alignas (char) char ca[10];
-
-_Alignas ((int) _Alignof (max_align_t) + 0) int x;
-
-enum e { E = _Alignof (max_align_t) };
-_Alignas (E) int y;
-
-void
-func (void)
-{
- _Alignas (max_align_t) long long auto_ll;
-}
-
-/* Valid, but useless. */
-_Alignas (0) struct s; /* { dg-warning "useless" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-align-2.c b/gcc/testsuite/gcc.dg/c1x-align-2.c
deleted file mode 100644
index 19f7dd6721..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-align-2.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* Test C1X alignment support. Test valid code using stdalign.h. */
-/* { dg-do run } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-#include <stdalign.h>
-#include <stddef.h>
-
-extern int strcmp (const char *, const char *);
-
-extern void exit (int);
-extern void abort (void);
-
-alignas (alignof (max_align_t)) char c;
-extern alignas (max_align_t) char c;
-extern char c;
-
-extern alignas (max_align_t) short s;
-alignas (max_align_t) short s;
-
-alignas (int) int i;
-extern int i;
-
-alignas (max_align_t) long l;
-
-alignas (max_align_t) long long ll;
-
-alignas (max_align_t) float f;
-
-alignas (max_align_t) double d;
-
-alignas (max_align_t) _Complex long double cld;
-
-alignas (0) alignas (int) alignas (char) char ca[10];
-
-alignas ((int) alignof (max_align_t) + 0) int x;
-
-enum e { E = alignof (max_align_t) };
-alignas (E) int y;
-
-void
-func (void)
-{
- alignas (max_align_t) long long auto_ll;
-}
-
-/* Valid, but useless. */
-alignas (0) struct s; /* { dg-warning "useless" } */
-
-#ifndef alignas
-#error "alignas not defined"
-#endif
-
-#ifndef alignof
-#error "alignof not defined"
-#endif
-
-#ifndef __alignas_is_defined
-#error "__alignas_is_defined not defined"
-#endif
-
-#if __alignas_is_defined != 1
-#error "__alignas_is_defined not 1"
-#endif
-
-#ifndef __alignof_is_defined
-#error "__alignof_is_defined not defined"
-#endif
-
-#if __alignof_is_defined != 1
-#error "__alignof_is_defined not 1"
-#endif
-
-#define str(x) #x
-#define xstr(x) str(x)
-
-const char *s1 = xstr(alignas);
-const char *s2 = xstr(alignof);
-const char *s3 = xstr(__alignas_is_defined);
-const char *s4 = xstr(__alignof_is_defined);
-
-int
-main (void)
-{
- if (strcmp (s1, "_Alignas") != 0)
- abort ();
- if (strcmp (s2, "_Alignof") != 0)
- abort ();
- if (strcmp (s3, "1") != 0)
- abort ();
- if (strcmp (s4, "1") != 0)
- abort ();
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-align-3.c b/gcc/testsuite/gcc.dg/c1x-align-3.c
deleted file mode 100644
index 0b2a77fa6f..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-align-3.c
+++ /dev/null
@@ -1,42 +0,0 @@
-/* Test C1X alignment support. Test invalid code. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-int a = _Alignof (void (void)); /* { dg-error "function" } */
-struct s;
-int b = _Alignof (struct s); /* { dg-error "incomplete" } */
-int c = _Alignof (void); /* { dg-error "void" } */
-int d = _Alignof (a); /* { dg-error "expression" } */
-
-_Alignas (void (void)) char e; /* { dg-error "function" } */
-_Alignas (struct s) char f; /* { dg-error "incomplete" } */
-_Alignas (void) char g; /* { dg-error "void" } */
-
-_Alignas (-__INT_MAX__-1) char h; /* { dg-error "too large|power of 2" } */
-_Alignas (-__INT_MAX__) char h2; /* { dg-error "too large|power of 2" } */
-_Alignas ((-__INT_MAX__-1)/2) char h3; /* { dg-error "too large|power of 2" } */
-_Alignas ((-__INT_MAX__-1)/4) char h4; /* { dg-error "too large|power of 2" } */
-_Alignas ((-__INT_MAX__-1)/8) char h5; /* { dg-error "too large|power of 2" } */
-_Alignas (-__LONG_LONG_MAX__-1) char i; /* { dg-error "too large|power of 2" } */
-_Alignas (-(__LONG_LONG_MAX__-1)/2) char i2; /* { dg-error "too large|power of 2" } */
-_Alignas (-(__LONG_LONG_MAX__-1)/4) char i3; /* { dg-error "too large|power of 2" } */
-_Alignas (-(__LONG_LONG_MAX__-1)/8) char i4; /* { dg-error "too large|power of 2" } */
-_Alignas (-(__LONG_LONG_MAX__-1)/16) char i5; /* { dg-error "too large|power of 2" } */
-_Alignas (-1) char j; /* { dg-error "power of 2" } */
-_Alignas (3) char k; /* { dg-error "power of 2" } */
-
-_Alignas ((void *) 1) char k; /* { dg-error "integer constant" } */
-int x;
-_Alignas (x) char l; /* { dg-error "integer constant" } */
-
-_Alignas (0) struct s; /* { dg-error "does not redeclare tag" } */
-
-_Alignas (0) typedef int T; /* { dg-error "alignment specified for typedef" } */
-void func (_Alignas (0) int); /* { dg-error "alignment specified for unnamed parameter" } */
-void f2 (_Alignas (0) int parm2) {} /* { dg-error "alignment specified for parameter" } */
-void
-f3 (void)
-{
- register _Alignas (0) int reg; /* { dg-error "register" } */
-}
-_Alignas (0) void f4 (void); /* { dg-error "alignment specified for function" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-align-4.c b/gcc/testsuite/gcc.dg/c1x-align-4.c
deleted file mode 100644
index 432650cf5d..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-align-4.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Test C1X alignment support. Test reducing alignment (assumes there
- are at least some alignment constraints). */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-#include <stddef.h>
-
-_Alignas (_Alignof (char)) max_align_t x; /* { dg-error "reduce alignment" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-anon-struct-1.c b/gcc/testsuite/gcc.dg/c1x-anon-struct-1.c
deleted file mode 100644
index 6d4b433d73..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-anon-struct-1.c
+++ /dev/null
@@ -1,72 +0,0 @@
-/* Test for anonymous structures and unions in C1X. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-#include <stddef.h>
-
-struct s1
-{
- int a;
- union
- {
- int i;
- };
- struct
- {
- int b;
- };
-};
-
-union u1
-{
- int b;
- struct
- {
- int i;
- };
- union
- {
- int c;
- };
-};
-
-struct s2
-{
- struct
- {
- int a;
- };
-};
-
-struct s3
-{
- union
- {
- int i;
- };
-};
-
-struct s4
-{
- struct
- {
- int i;
- };
- int a[];
-};
-
-struct s1 x =
- {
- .b = 1,
- .i = 2,
- .a = 3
- };
-
-int o = offsetof (struct s1, i);
-
-void
-f (void)
-{
- x.i = 3;
- (&x)->i = 4;
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-anon-struct-2.c b/gcc/testsuite/gcc.dg/c1x-anon-struct-2.c
deleted file mode 100644
index cb8043117d..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-anon-struct-2.c
+++ /dev/null
@@ -1,57 +0,0 @@
-/* Test for anonymous structures and unions in C1X. Test for invalid
- cases. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-typedef struct s0
-{
- int i;
-} s0;
-
-struct s1
-{
- int a;
- struct s0; /* { dg-error "declaration does not declare anything" } */
-};
-
-struct s2
-{
- int a;
- s0; /* { dg-error "declaration does not declare anything" } */
-};
-
-struct s3
-{
- struct
- {
- int i;
- };
- struct
- {
- int i; /* { dg-error "duplicate member" } */
- };
-};
-
-struct s4
-{
- int a;
- struct s
- {
- int i;
- }; /* { dg-error "declaration does not declare anything" } */
-};
-
-struct s5
-{
- struct
- {
- int i;
- } a;
- int b;
-} x;
-
-void
-f (void)
-{
- x.i = 0; /* { dg-error "has no member" } */
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-anon-struct-3.c b/gcc/testsuite/gcc.dg/c1x-anon-struct-3.c
deleted file mode 100644
index 1841eddd0a..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-anon-struct-3.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Test for anonymous structures and unions in C1X. Test for invalid
- cases: typedefs disallowed by N1549. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-typedef struct
-{
- int i;
-} s0;
-
-typedef union
-{
- int i;
-} u0;
-
-struct s1
-{
- int a;
- u0; /* { dg-error "declaration does not declare anything" } */
- struct
- {
- int b;
- };
-};
-
-union u1
-{
- int b;
- s0; /* { dg-error "declaration does not declare anything" } */
- union
- {
- int c;
- };
-};
diff --git a/gcc/testsuite/gcc.dg/c1x-float-1.c b/gcc/testsuite/gcc.dg/c1x-float-1.c
deleted file mode 100644
index 75233ac822..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-float-1.c
+++ /dev/null
@@ -1,169 +0,0 @@
-/* Test for <float.h> C1X macros. */
-/* Origin: Joseph Myers <joseph@codesourcery.com> */
-/* { dg-do preprocess } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-/* This test checks that the C1X macros are defined;
- it does not check the correctness of their values. */
-
-#include <float.h>
-
-#ifndef FLT_ROUNDS
-#error "FLT_ROUNDS undefined"
-#endif
-
-#ifndef FLT_RADIX
-#error "FLT_RADIX undefined"
-#endif
-
-#ifndef FLT_MANT_DIG
-#error "FLT_MANT_DIG undefined"
-#endif
-
-#ifndef FLT_DIG
-#error "FLT_DIG undefined"
-#endif
-
-#ifndef FLT_MIN_EXP
-#error "FLT_MIN_EXP undefined"
-#endif
-
-#ifndef FLT_MIN_10_EXP
-#error "FLT_MIN_10_EXP undefined"
-#endif
-
-#ifndef FLT_MAX_EXP
-#error "FLT_MAX_EXP undefined"
-#endif
-
-#ifndef FLT_MAX_10_EXP
-#error "FLT_MAX_10_EXP undefined"
-#endif
-
-#ifndef FLT_MAX
-#error "FLT_MAX undefined"
-#endif
-
-#ifndef FLT_EPSILON
-#error "FLT_EPSILON undefined"
-#endif
-
-#ifndef FLT_MIN
-#error "FLT_MIN undefined"
-#endif
-
-#ifndef DBL_MANT_DIG
-#error "DBL_MANT_DIG undefined"
-#endif
-
-#ifndef DBL_DIG
-#error "DBL_DIG undefined"
-#endif
-
-#ifndef DBL_MIN_EXP
-#error "DBL_MIN_EXP undefined"
-#endif
-
-#ifndef DBL_MIN_10_EXP
-#error "DBL_MIN_10_EXP undefined"
-#endif
-
-#ifndef DBL_MAX_EXP
-#error "DBL_MAX_EXP undefined"
-#endif
-
-#ifndef DBL_MAX_10_EXP
-#error "DBL_MAX_10_EXP undefined"
-#endif
-
-#ifndef DBL_MAX
-#error "DBL_MAX undefined"
-#endif
-
-#ifndef DBL_EPSILON
-#error "DBL_EPSILON undefined"
-#endif
-
-#ifndef DBL_MIN
-#error "DBL_MIN undefined"
-#endif
-
-#ifndef LDBL_MANT_DIG
-#error "LDBL_MANT_DIG undefined"
-#endif
-
-#ifndef LDBL_DIG
-#error "LDBL_DIG undefined"
-#endif
-
-#ifndef LDBL_MIN_EXP
-#error "LDBL_MIN_EXP undefined"
-#endif
-
-#ifndef LDBL_MIN_10_EXP
-#error "LDBL_MIN_10_EXP undefined"
-#endif
-
-#ifndef LDBL_MAX_EXP
-#error "LDBL_MAX_EXP undefined"
-#endif
-
-#ifndef LDBL_MAX_10_EXP
-#error "LDBL_MAX_10_EXP undefined"
-#endif
-
-#ifndef LDBL_MAX
-#error "LDBL_MAX undefined"
-#endif
-
-#ifndef LDBL_EPSILON
-#error "LDBL_EPSILON undefined"
-#endif
-
-#ifndef LDBL_MIN
-#error "LDBL_MIN undefined"
-#endif
-
-#ifndef FLT_EVAL_METHOD
-#error "FLT_EVAL_METHOD undefined"
-#endif
-
-#ifndef DECIMAL_DIG
-#error "DECIMAL_DIG undefined"
-#endif
-
-#ifndef FLT_DECIMAL_DIG
-#error "FLT_DECIMAL_DIG undefined"
-#endif
-
-#ifndef DBL_DECIMAL_DIG
-#error "DBL_DECIMAL_DIG undefined"
-#endif
-
-#ifndef LDBL_DECIMAL_DIG
-#error "LDBL_DECIMAL_DIG undefined"
-#endif
-
-#ifndef FLT_HAS_SUBNORM
-#error "FLT_HAS_SUBNORM undefined"
-#endif
-
-#ifndef DBL_HAS_SUBNORM
-#error "DBL_HAS_SUBNORM undefined"
-#endif
-
-#ifndef LDBL_HAS_SUBNORM
-#error "LDBL_HAS_SUBNORM undefined"
-#endif
-
-#ifndef FLT_TRUE_MIN
-#error "FLT_TRUE_MIN undefined"
-#endif
-
-#ifndef DBL_TRUE_MIN
-#error "DBL_TRUE_MIN undefined"
-#endif
-
-#ifndef LDBL_TRUE_MIN
-#error "LDBL_TRUE_MIN undefined"
-#endif
diff --git a/gcc/testsuite/gcc.dg/c1x-noreturn-1.c b/gcc/testsuite/gcc.dg/c1x-noreturn-1.c
deleted file mode 100644
index d9c141d532..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-noreturn-1.c
+++ /dev/null
@@ -1,59 +0,0 @@
-/* Test C1X _Noreturn. Test valid code. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-_Noreturn void exit (int);
-
-_Noreturn int f1 (void);
-
-_Noreturn void f2 (void);
-
-static void _Noreturn f3 (void) { exit (0); }
-
-/* Returning from a noreturn function is undefined at runtime, not a
- constraint violation, but recommended practice is to diagnose if
- such a return appears possible. */
-
-_Noreturn int
-f4 (void)
-{
- return 1; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 20 } */
-}
-
-_Noreturn void
-f5 (void)
-{
- return; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 27 } */
-}
-
-_Noreturn void
-f6 (void)
-{
-} /* { dg-warning "does return" } */
-
-_Noreturn void
-f7 (int a)
-{
- if (a)
- exit (0);
-} /* { dg-warning "does return" } */
-
-/* Declarations need not all have _Noreturn. */
-
-void f2 (void);
-
-void f8 (void);
-_Noreturn void f8 (void);
-
-/* Duplicate _Noreturn is OK. */
-_Noreturn _Noreturn void _Noreturn f9 (void);
-
-/* _Noreturn does not affect type compatibility. */
-
-void (*fp) (void) = f5;
-
-/* noreturn is an ordinary identifier. */
-
-int noreturn;
diff --git a/gcc/testsuite/gcc.dg/c1x-noreturn-2.c b/gcc/testsuite/gcc.dg/c1x-noreturn-2.c
deleted file mode 100644
index 81972f1e8b..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-noreturn-2.c
+++ /dev/null
@@ -1,77 +0,0 @@
-/* Test C1X _Noreturn. Test valid code using stdnoreturn.h. */
-/* { dg-do run } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-#include <stdnoreturn.h>
-
-extern int strcmp (const char *, const char *);
-
-noreturn void exit (int);
-noreturn void abort (void);
-
-noreturn int f1 (void);
-
-noreturn void f2 (void);
-
-static void noreturn f3 (void) { exit (0); }
-
-/* Returning from a noreturn function is undefined at runtime, not a
- constraint violation, but recommended practice is to diagnose if
- such a return appears possible. */
-
-noreturn int
-f4 (void)
-{
- return 1; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 25 } */
-}
-
-noreturn void
-f5 (void)
-{
- return; /* { dg-warning "has a 'return' statement" } */
- /* { dg-warning "does return" "second warning" { target *-*-* } 32 } */
-}
-
-noreturn void
-f6 (void)
-{
-} /* { dg-warning "does return" } */
-
-noreturn void
-f7 (int a)
-{
- if (a)
- exit (0);
-} /* { dg-warning "does return" } */
-
-/* Declarations need not all have noreturn. */
-
-void f2 (void);
-
-void f8 (void);
-noreturn void f8 (void);
-
-/* Duplicate noreturn is OK. */
-noreturn noreturn void noreturn f9 (void);
-
-/* noreturn does not affect type compatibility. */
-
-void (*fp) (void) = f5;
-
-#ifndef noreturn
-#error "noreturn not defined"
-#endif
-
-#define str(x) #x
-#define xstr(x) str(x)
-
-const char *s = xstr(noreturn);
-
-int
-main (void)
-{
- if (strcmp (s, "_Noreturn") != 0)
- abort ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-noreturn-3.c b/gcc/testsuite/gcc.dg/c1x-noreturn-3.c
deleted file mode 100644
index b12c23efaf..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-noreturn-3.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test C1X _Noreturn. Test _Noreturn on main, hosted. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors -fhosted" } */
-
-_Noreturn void exit (int);
-
-_Noreturn int
-main (void) /* { dg-error "'main' declared '_Noreturn'" } */
-{
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-noreturn-4.c b/gcc/testsuite/gcc.dg/c1x-noreturn-4.c
deleted file mode 100644
index 72dceafba1..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-noreturn-4.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Test C1X _Noreturn. Test _Noreturn on main, freestanding. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors -ffreestanding" } */
-
-_Noreturn void exit (int);
-
-_Noreturn int
-main (void)
-{
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-noreturn-5.c b/gcc/testsuite/gcc.dg/c1x-noreturn-5.c
deleted file mode 100644
index 73f22165cb..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-noreturn-5.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Test C1X _Noreturn. Test invalid uses. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-_Noreturn struct s; /* { dg-error "empty declaration" } */
-
-typedef _Noreturn void f (void); /* { dg-error "typedef" } */
-
-void g (_Noreturn void fp (void)); /* { dg-error "parameter" } */
-
-_Noreturn void (*p) (void); /* { dg-error "variable" } */
-
-struct t { int a; _Noreturn void (*f) (void); }; /* { dg-error "expected" } */
-
-int *_Noreturn *q; /* { dg-error "expected" } */
-
-int i = sizeof (_Noreturn int (*) (void)); /* { dg-error "expected" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-pointer-float-1.c b/gcc/testsuite/gcc.dg/c1x-pointer-float-1.c
deleted file mode 100644
index 57c5be8873..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-pointer-float-1.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Test C1X constraint against pointer / floating-point casts. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-void *p;
-float f;
-double d;
-long double ld;
-_Complex float cf;
-_Complex double cd;
-_Complex long double cld;
-
-void
-func (void)
-{
- f = (float) p; /* { dg-error "pointer" } */
- d = (double) p; /* { dg-error "pointer" } */
- ld = (long double) p; /* { dg-error "pointer" } */
- cf = (_Complex float) p; /* { dg-error "pointer" } */
- cd = (_Complex double) p; /* { dg-error "pointer" } */
- cld = (_Complex long double) p; /* { dg-error "pointer" } */
- p = (void *) f; /* { dg-error "pointer" } */
- p = (void *) d; /* { dg-error "pointer" } */
- p = (void *) ld; /* { dg-error "pointer" } */
- p = (void *) cf; /* { dg-error "pointer" } */
- p = (void *) cd; /* { dg-error "pointer" } */
- p = (void *) cld; /* { dg-error "pointer" } */
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-1.c b/gcc/testsuite/gcc.dg/c1x-static-assert-1.c
deleted file mode 100644
index bf7aa59451..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-1.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Test C1X static assertions. Valid assertions. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-_Static_assert (1, "foo");
-
-enum e { E0, E1 };
-
-_Static_assert (E1, L"bar");
-
-_Static_assert (-1, "foo" L"bar");
-
-struct s
-{
- int a;
- _Static_assert (3, "s");
- int b;
-};
-
-union u
-{
- int i;
- _Static_assert ((int)1.0, L"");
-};
-
-void
-f (void)
-{
- int i;
- i = 1;
- _Static_assert (0 + 1, "f");
- i = 2;
-}
-
-void
-g (void)
-{
- int i = 0;
- for (_Static_assert (1, ""); i < 10; i++)
- ;
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-2.c b/gcc/testsuite/gcc.dg/c1x-static-assert-2.c
deleted file mode 100644
index 9a48ca7e86..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-2.c
+++ /dev/null
@@ -1,41 +0,0 @@
-/* Test C1X static assertions. Failed assertions. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-_Static_assert (0, "assert1"); /* { dg-error "static assertion failed: \"assert1\"" } */
-
-enum e { E0, E1 };
-
-_Static_assert (E0, L"assert2"); /* { dg-error "static assertion failed: \"assert2\"" } */
-
-_Static_assert (-0, "ass" L"ert3"); /* { dg-error "static assertion failed: \"assert3\"" } */
-
-struct s
-{
- int a;
- _Static_assert (0, "assert4"); /* { dg-error "static assertion failed: \"assert4\"" } */
- int b;
-};
-
-union u
-{
- int i;
- _Static_assert ((int)0.0, L"assert5"); /* { dg-error "static assertion failed: \"assert5\"" } */
-};
-
-void
-f (void)
-{
- int i;
- i = 1;
- _Static_assert (0 + 0, "assert6"); /* { dg-error "static assertion failed: \"assert6\"" } */
- i = 2;
-}
-
-void
-g (void)
-{
- int i = 0;
- for (_Static_assert (0, "assert7"); i < 10; i++) /* { dg-error "static assertion failed: \"assert7\"" } */
- ;
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-3.c b/gcc/testsuite/gcc.dg/c1x-static-assert-3.c
deleted file mode 100644
index 81b504e2ab..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-3.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* Test C1X static assertions. Invalid assertions. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-_Static_assert (__INT_MAX__ * 2, "overflow"); /* { dg-warning "integer overflow in expression" } */
-/* { dg-error "overflow in constant expression" "error" { target *-*-* } 5 } */
-
-_Static_assert ((void *)(__SIZE_TYPE__)16, "non-integer"); /* { dg-error "not an integer" } */
-
-_Static_assert (1.0, "non-integer"); /* { dg-error "not an integer" } */
-
-_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-error "not an integer constant expression" } */
-
-int i;
-
-_Static_assert (i, "non-constant"); /* { dg-error "not constant" } */
-
-void
-f (void)
-{
- int j = 0;
- for (_Static_assert (sizeof (struct s { int k; }), ""); j < 10; j++) /* { dg-error "loop initial declaration" } */
- ;
-}
-
-_Static_assert (1, 1); /* { dg-error "expected" } */
-
-_Static_assert (1, ("")); /* { dg-error "expected" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-4.c b/gcc/testsuite/gcc.dg/c1x-static-assert-4.c
deleted file mode 100644
index ebc95f5f90..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-4.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* Test C1X static assertions. More invalid assertions. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-/* Static assertions not valid in old-style parameter declarations
- because declarations there must have declarators. */
-
-void
-f (i)
- int i;
- _Static_assert (1, ""); /* { dg-error "expected" } */
-{
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-5.c b/gcc/testsuite/gcc.dg/c1x-static-assert-5.c
deleted file mode 100644
index d4d0821f0e..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-5.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test C1X static assertions. Non-constant-expression without -pedantic. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x" } */
-
-_Static_assert ((int)(1.0 + 1.0), "non-constant-expression");
diff --git a/gcc/testsuite/gcc.dg/c1x-static-assert-6.c b/gcc/testsuite/gcc.dg/c1x-static-assert-6.c
deleted file mode 100644
index c544cadc26..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-static-assert-6.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* Test C1X static assertions. Non-constant-expression with -pedantic. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic" } */
-
-_Static_assert ((int)(1.0 + 1.0), "non-constant-expression"); /* { dg-warning "not an integer constant expression" } */
diff --git a/gcc/testsuite/gcc.dg/c1x-typedef-1.c b/gcc/testsuite/gcc.dg/c1x-typedef-1.c
deleted file mode 100644
index a68b23ff5e..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-typedef-1.c
+++ /dev/null
@@ -1,70 +0,0 @@
-/* Test typedef redeclaration in C1X. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-/* C1X permits typedefs to be redeclared to the same type, but not to
- different-but-compatible types, and not when the type is variably
- modified. */
-
-#include <limits.h>
-
-typedef int TI;
-typedef int TI2;
-typedef TI2 TI;
-typedef TI TI2;
-
-enum e { E1 = 0, E2 = INT_MAX, E3 = -1 };
-typedef enum e TE;
-typedef enum e TE; /* { dg-message "previous declaration" } */
-typedef int TE; /* { dg-error "with different type" } */
-
-struct s;
-typedef struct s TS;
-struct s { int i; };
-typedef struct s TS;
-
-typedef int IA[];
-typedef TI2 IA[]; /* { dg-message "previous declaration" } */
-typedef int A2[2];
-typedef TI A2[2]; /* { dg-message "previous declaration" } */
-typedef IA A2; /* { dg-error "with different type" } */
-typedef int A3[3];
-typedef A3 IA; /* { dg-error "with different type" } */
-
-typedef void F(int);
-typedef void F(TI); /* { dg-message "previous declaration" } */
-typedef void F(enum e); /* { dg-error "with different type" } */
-
-typedef int G(void);
-typedef TI G(void); /* { dg-message "previous declaration" } */
-typedef enum e G(void); /* { dg-error "with different type" } */
-
-typedef int *P;
-typedef TI *P; /* { dg-message "previous declaration" } */
-typedef enum e *P; /* { dg-error "with different type" } */
-
-typedef void F2();
-typedef void F2(); /* { dg-message "previous declaration" } */
-typedef void F2(int); /* { dg-error "with different type" } */
-
-void
-f (void)
-{
- int a = 1;
- int b = 2;
- typedef void FN(int (*p)[a]);
- typedef void FN(int (*p)[b]);
- typedef void FN(int (*p)[*]); /* { dg-message "previous declaration" } */
- typedef void FN(int (*p)[1]); /* { dg-error "with different type" } */
- typedef void FN2(int (*p)[a]);
- typedef void FN2(int (*p)[b]);
- typedef void FN2(int (*p)[*]); /* { dg-message "previous declaration" } */
- typedef void FN2(int (*p)[]); /* { dg-error "with different type" } */
- typedef int AV[a]; /* { dg-message "previous declaration" } */
- typedef int AV[b-1]; /* { dg-error "redefinition" } */
- typedef int AAa[a]; /* { dg-message "previous declaration" } */
- typedef int AAb[b-1];
- typedef AAa *VF(void); /* { dg-message "previous declaration" } */
- typedef AAb *VF(void); /* { dg-error "redefinition" } */
- typedef AAa AAa; /* { dg-error "redefinition" } */
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-uni-string-1.c b/gcc/testsuite/gcc.dg/c1x-uni-string-1.c
deleted file mode 100644
index 30a98c1d66..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-uni-string-1.c
+++ /dev/null
@@ -1,112 +0,0 @@
-/* Test Unicode strings in C1X. Test valid code. */
-/* { dg-do run } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-/* More thorough tests are in c-c++-common/raw-string-*.c; this test
- verifies the particular subset (Unicode but not raw strings) that
- is in C1X. */
-
-typedef __CHAR16_TYPE__ char16_t;
-typedef __CHAR32_TYPE__ char32_t;
-typedef __SIZE_TYPE__ size_t;
-
-extern void abort (void);
-extern void exit (int);
-extern int memcmp (const void *, const void *, size_t);
-
-#define R "(R)"
-#define u8R "(u8R)"
-#define uR "(uR)"
-#define UR "(UR)"
-#define LR "(LR)"
-#define u8 randomu8
-#define u randomu
-#define U randomU
-
-const char su8[] = u8"a\u010d";
-const char su8a[] = "a\xc4\x8d";
-
-const char16_t su16[] = u"\u0567";
-const char16_t su16a[] = { 0x0567, 0 };
-
-const char32_t su32[] = U"\u0123";
-const char32_t su32a[] = { 0x0123, 0 };
-
-const char tu[] = R"a";
-const char tua[] = "(R)a";
-
-const char tu8[] = u8R"b";
-const char tu8a[] = "(u8R)b";
-
-const char tu16[] = uR"c";
-const char tu16a[] = "(uR)c";
-
-const char tu32[] = UR"d";
-const char tu32a[] = "(UR)d";
-
-const char tl[] = LR"e";
-const char tla[] = "(LR)e";
-
-#define str(x) #x
-const char ts[] = str(u"a" U"b" u8"c");
-const char tsa[] = "u\"a\" U\"b\" u8\"c\"";
-
-/* GCC always uses UTF-16 and UTF-32 for char16_t and char32_t. */
-#ifndef __STDC_UTF_16__
-#error "__STDC_UTF_16__ not defined"
-#endif
-#ifndef __STDC_UTF_32__
-#error "__STDC_UTF_32__ not defined"
-#endif
-#define xstr(x) str(x)
-const char tm16[] = xstr(__STDC_UTF_16__);
-const char tm16a[] = "1";
-const char tm32[] = xstr(__STDC_UTF_32__);
-const char tm32a[] = "1";
-
-int
-main (void)
-{
- if (sizeof (su8) != sizeof (su8a)
- || memcmp (su8, su8a, sizeof (su8)) != 0)
- abort ();
- if (sizeof (su16) != sizeof (su16a)
- || memcmp (su16, su16a, sizeof (su16)) != 0)
- abort ();
- if (sizeof (su32) != sizeof (su32a)
- || memcmp (su32, su32a, sizeof (su32)) != 0)
- abort ();
- if (sizeof (tu) != sizeof (tua)
- || memcmp (tu, tua, sizeof (tu)) != 0)
- abort ();
- if (sizeof (tu8) != sizeof (tu8a)
- || memcmp (tu8, tu8a, sizeof (tu8)) != 0)
- abort ();
- if (sizeof (tu16) != sizeof (tu16a)
- || memcmp (tu16, tu16a, sizeof (tu16)) != 0)
- abort ();
- if (sizeof (tu32) != sizeof (tu32a)
- || memcmp (tu32, tu32a, sizeof (tu32)) != 0)
- abort ();
- if (sizeof (tl) != sizeof (tla)
- || memcmp (tl, tla, sizeof (tl)) != 0)
- abort ();
- if (sizeof (ts) != sizeof (tsa)
- || memcmp (ts, tsa, sizeof (ts)) != 0)
- abort ();
- if (sizeof (tm16) != sizeof (tm16a)
- || memcmp (tm16, tm16a, sizeof (tm16)) != 0)
- abort ();
- if (sizeof (tm32) != sizeof (tm32a)
- || memcmp (tm32, tm32a, sizeof (tm32)) != 0)
- abort ();
- if (u'\u0123' != 0x0123)
- abort ();
- if (U'\u0456' != 0x0456)
- abort ();
-#undef u8
-#define u8
- if (u8'a' != 'a')
- abort ();
- exit (0);
-}
diff --git a/gcc/testsuite/gcc.dg/c1x-uni-string-2.c b/gcc/testsuite/gcc.dg/c1x-uni-string-2.c
deleted file mode 100644
index 698b0c1df3..0000000000
--- a/gcc/testsuite/gcc.dg/c1x-uni-string-2.c
+++ /dev/null
@@ -1,8 +0,0 @@
-/* Test Unicode strings in C1X. Test constraint. */
-/* { dg-do compile } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
-
-const void *p1 = L"a" u8"b"; /* { dg-error "concatenation" } */
-const void *p2 = L"a" "b" u8"c"; /* { dg-error "concatenation" } */
-const void *p3 = u8"a" L"b"; /* { dg-error "concatenation" } */
-const void *p4 = u8"a" "b" L"c"; /* { dg-error "concatenation" } */
diff --git a/gcc/testsuite/gcc.dg/c90-array-lval-8.c b/gcc/testsuite/gcc.dg/c90-array-lval-8.c
new file mode 100644
index 0000000000..bc5b7b21b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c90-array-lval-8.c
@@ -0,0 +1,20 @@
+/* Test for non-lvalue arrays: test that they cannot be assigned to
+ array variables. PR 58235. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
+
+struct s { char c[1]; } x;
+struct s f (void) { return x; }
+
+void
+g (void)
+{
+ char c[1];
+ c = f ().c; /* { dg-error "array" } */
+}
+
+void
+h (void)
+{
+ char c[1] = f ().c; /* { dg-error "array" } */
+}
diff --git a/gcc/testsuite/gcc.dg/c90-atomic-1.c b/gcc/testsuite/gcc.dg/c90-atomic-1.c
new file mode 100644
index 0000000000..3506563940
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c90-atomic-1.c
@@ -0,0 +1,7 @@
+/* Test for _Atomic: not in C90. */
+/* { dg-do compile } */
+/* { dg-options "-std=c90 -pedantic-errors" } */
+
+_Atomic int i; /* { dg-error "_Atomic" } */
+_Atomic (int) j; /* { dg-error "_Atomic" } */
+int *_Atomic p; /* { dg-error "_Atomic" } */
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-6.c b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
index c432cca634..50239ce2eb 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-6.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-6.c
@@ -4,13 +4,13 @@
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
-__extension__ typedef __PTRDIFF_TYPE__ ptrdiff_t;
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
/* PR 29116. */
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl|can't be evaluated" } */
/* PR 31871. */
-extern int c[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+extern int c[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
/* Implicit conversions from floating-point constants are not OK,
although explicit ones are. */
@@ -34,7 +34,7 @@ struct s {
};
enum e {
- E = (1 + ((ptrdiff_t) (void *) 0)), /* { dg-error "constant" } */
+ E = (1 + ((intptr_t) (void *) 0)), /* { dg-error "constant" } */
E2 = 0
};
@@ -46,7 +46,7 @@ enum f {
void
f (int a)
{
- int v[1 + ((ptrdiff_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
+ int v[1 + ((intptr_t) (void *) 0)]; /* { dg-error "variab|can't be evaluated" } */
switch (a)
{
case (n * 0 + 1): /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-8.c b/gcc/testsuite/gcc.dg/c90-const-expr-8.c
index 4923bc6804..b6aba7b1d8 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-8.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-8.c
@@ -23,5 +23,6 @@ enum e {
/* { dg-error "3:overflow in constant expression" "constant" { target *-*-* } 22 } */
E6 = 0 * !-INT_MIN, /* { dg-warning "13:integer overflow in expression" } */
/* { dg-error "8:not an integer constant" "constant" { target *-*-* } 24 } */
- E7 = INT_MIN % -1 /* Not an overflow. */
+ E7 = INT_MIN % -1 /* { dg-warning "16:integer overflow in expression" } */
+ /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } 28 } */
};
diff --git a/gcc/testsuite/gcc.dg/c90-const-expr-9.c b/gcc/testsuite/gcc.dg/c90-const-expr-9.c
index a06cdd951b..4793a14b6c 100644
--- a/gcc/testsuite/gcc.dg/c90-const-expr-9.c
+++ b/gcc/testsuite/gcc.dg/c90-const-expr-9.c
@@ -3,7 +3,7 @@
expansion. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1990 -pedantic-errors -ftrack-macro-expansion=0" } */
struct s {
int a;
@@ -15,8 +15,9 @@ struct t {
};
__extension__ typedef __SIZE_TYPE__ size_t;
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
-#define old_offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#define old_offsetof(TYPE, MEMBER) ((size_t) (uintptr_t) &((TYPE *)0)->MEMBER)
enum e {
E1 = old_offsetof (struct s, a), /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c90-float-1.c b/gcc/testsuite/gcc.dg/c90-float-1.c
index 5a2cab657a..649cddfa07 100644
--- a/gcc/testsuite/gcc.dg/c90-float-1.c
+++ b/gcc/testsuite/gcc.dg/c90-float-1.c
@@ -3,7 +3,7 @@
/* { dg-do preprocess } */
/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */
-/* This test checks that the C90 macros (but not the C99 or C1X ones)
+/* This test checks that the C90 macros (but not the C99 or C11 ones)
are defined; it does not check the correctness of their values. */
#include <float.h>
diff --git a/gcc/testsuite/gcc.dg/c90-fordecl-1.c b/gcc/testsuite/gcc.dg/c90-fordecl-1.c
index 4aa3c58302..51e82ff7e9 100644
--- a/gcc/testsuite/gcc.dg/c90-fordecl-1.c
+++ b/gcc/testsuite/gcc.dg/c90-fordecl-1.c
@@ -9,6 +9,6 @@ foo (void)
int j = 0;
for (int i = 1; i <= 10; i++) /* { dg-bogus "warning" "warning in place of error" } */
j += i;
- /* { dg-error "'for' loop initial declarations are only allowed in C99 mode" "declaration in for loop" { target *-*-* } 10 } */
- /* { dg-message "note: use option -std=c99 or -std=gnu99 to compile your code" "note" { target *-*-* } 10 }} */
+ /* { dg-error "'for' loop initial declarations are only allowed in C99 or C11 mode" "declaration in for loop" { target *-*-* } 10 } */
+ /* { dg-message "note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code" "note" { target *-*-* } 10 }} */
}
diff --git a/gcc/testsuite/gcc.dg/c90-thread-local-1.c b/gcc/testsuite/gcc.dg/c90-thread-local-1.c
new file mode 100644
index 0000000000..92bf57a90b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c90-thread-local-1.c
@@ -0,0 +1,5 @@
+/* Test for _Thread_local: not in C90. */
+/* { dg-do compile } */
+/* { dg-options "-std=c90 -pedantic-errors" } */
+
+static _Thread_local int x; /* { dg-error "_Thread_local" } */
diff --git a/gcc/testsuite/gcc.dg/c99-atomic-1.c b/gcc/testsuite/gcc.dg/c99-atomic-1.c
new file mode 100644
index 0000000000..3a13f77712
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-atomic-1.c
@@ -0,0 +1,8 @@
+/* Test for _Atomic: not in C99. */
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+_Atomic int i; /* { dg-error "_Atomic" } */
+_Atomic (int) j; /* { dg-error "_Atomic" } */
+int *_Atomic p; /* { dg-error "_Atomic" } */
+void f (int a[_Atomic]); /* { dg-error "_Atomic" } */
diff --git a/gcc/testsuite/gcc.dg/c99-complit-2.c b/gcc/testsuite/gcc.dg/c99-complit-2.c
index faf44b2376..1285e7e0d2 100644
--- a/gcc/testsuite/gcc.dg/c99-complit-2.c
+++ b/gcc/testsuite/gcc.dg/c99-complit-2.c
@@ -18,45 +18,47 @@ foo (int a)
/* { dg-error "init" "void type" { target *-*-* } 17 } */
&(struct si) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "init" "incomplete struct type" { target *-*-* } 19 } */
+ /* { dg-error "invalid use of undefined type" "" { target *-*-* } 19 } */
&(union ui) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "incomplete union type" { target *-*-* } 21 } */
+ /* { dg-error "init" "incomplete union type" { target *-*-* } 22 } */
+ /* { dg-error "invalid use of undefined type" "" { target *-*-* } 22 } */
(void (void)) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "function type" { target *-*-* } 23 } */
+ /* { dg-error "init" "function type" { target *-*-* } 25 } */
(int [a]) { 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init|variable" "VLA type" { target *-*-* } 25 } */
+ /* { dg-error "init|variable" "VLA type" { target *-*-* } 27 } */
/* Initializers must not attempt to initialize outside the object
declared. */
(int [1]) { [1] = 2 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "value outside array" { target *-*-* } 29 } */
- (int [1]) { [-1] = 2 }; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "init" "value outside array" { target *-*-* } 31 } */
- (int [1]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
+ (int [1]) { [-1] = 2 }; /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "init" "value outside array" { target *-*-* } 33 } */
+ (int [1]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
+ /* { dg-error "init" "value outside array" { target *-*-* } 35 } */
}
int z;
/* Outside a function, initializers must be constant. */
struct s *s0 = &(struct s) { 0, z }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "non-const" { target *-*-* } 40 } */
-int sz = sizeof((struct s) { 0, z }); /* { dg-bogus "warning" "warning in place of error" } */
/* { dg-error "init" "non-const" { target *-*-* } 42 } */
+int sz = sizeof((struct s) { 0, z }); /* { dg-bogus "warning" "warning in place of error" } */
+/* { dg-error "init" "non-const" { target *-*-* } 44 } */
/* Compound literals aren't themselves constant expressions. */
int x = (int) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "non-const" { target *-*-* } 46 } */
+/* { dg-error "init" "non-const" { target *-*-* } 48 } */
/* Nor are they suitable structure or union initializers
outside a function. */
struct s s1 = (struct s) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "struct bad init" { target *-*-* } 51 } */
+/* { dg-error "init" "struct bad init" { target *-*-* } 53 } */
union u u1 = (union u) { 0 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "union bad init" { target *-*-* } 53 } */
+/* { dg-error "init" "union bad init" { target *-*-* } 55 } */
/* They aren't suitable for array initializers, either inside or outside
a function. */
int y[2] = (int [2]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
-/* { dg-error "init" "array bad init" { target *-*-* } 58 } */
+/* { dg-error "init" "array bad init" { target *-*-* } 60 } */
void
bar (void)
@@ -64,5 +66,5 @@ bar (void)
struct s s2 = (struct s) { 0, 1 };
union u u2 = (union u) { 0 };
int z[2] = (int [2]) { 0, 1 }; /* { dg-bogus "warning" "warning in place of error" } */
- /* { dg-error "init" "array bad init" { target *-*-* } 66 } */
+ /* { dg-error "init" "array bad init" { target *-*-* } 68 } */
}
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-6.c b/gcc/testsuite/gcc.dg/c99-const-expr-6.c
index 1a31ddc40c..ca602438d3 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-6.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-6.c
@@ -8,7 +8,7 @@
int n = 0, p[n * 0 + 1]; /* { dg-error "variabl" } */
/* PR 31871. */
-extern int c[1 + ((__PTRDIFF_TYPE__) (void *) 0)]; /* { dg-error "variab" } */
+extern int c[1 + ((__INTPTR_TYPE__) (void *) 0)]; /* { dg-error "variab" } */
/* Implicit conversions from floating-point constants are not OK,
although explicit ones are. */
@@ -32,7 +32,7 @@ struct s {
};
enum e {
- E = (1 + ((__PTRDIFF_TYPE__) (void *) 0)), /* { dg-error "constant" } */
+ E = (1 + ((__INTPTR_TYPE__) (void *) 0)), /* { dg-error "constant" } */
E2 = 0
};
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-8.c b/gcc/testsuite/gcc.dg/c99-const-expr-8.c
index e84fa7b4db..1ddd9ed91c 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-8.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-8.c
@@ -23,5 +23,6 @@ enum e {
/* { dg-error "overflow in constant expression" "constant" { target *-*-* } 22 } */
E6 = 0 * !-INT_MIN, /* { dg-warning "integer overflow in expression" } */
/* { dg-error "not an integer constant" "constant" { target *-*-* } 24 } */
- E7 = INT_MIN % -1 /* Not an overflow. */
+ E7 = INT_MIN % -1 /* { dg-warning "16:integer overflow in expression" } */
+ /* { dg-error "1:overflow in constant expression" "constant" { target *-*-* } 28 } */
};
diff --git a/gcc/testsuite/gcc.dg/c99-const-expr-9.c b/gcc/testsuite/gcc.dg/c99-const-expr-9.c
index 48f43edece..11e0b2c08b 100644
--- a/gcc/testsuite/gcc.dg/c99-const-expr-9.c
+++ b/gcc/testsuite/gcc.dg/c99-const-expr-9.c
@@ -3,7 +3,7 @@
expansion. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
-/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors -ftrack-macro-expansion=0" } */
struct s {
int a;
@@ -14,7 +14,7 @@ struct t {
int b[2];
};
-#define old_offsetof(TYPE, MEMBER) ((__SIZE_TYPE__) &((TYPE *)0)->MEMBER)
+#define old_offsetof(TYPE, MEMBER) ((__SIZE_TYPE__)(__UINTPTR_TYPE__) &((TYPE *)0)->MEMBER)
enum e {
E1 = old_offsetof (struct s, a), /* { dg-error "constant" } */
diff --git a/gcc/testsuite/gcc.dg/c99-float-1.c b/gcc/testsuite/gcc.dg/c99-float-1.c
index f0dc39136e..7ee87a564a 100644
--- a/gcc/testsuite/gcc.dg/c99-float-1.c
+++ b/gcc/testsuite/gcc.dg/c99-float-1.c
@@ -3,7 +3,7 @@
/* { dg-do preprocess } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
-/* This test checks that the C99 macros (but not the C1X ones) are defined;
+/* This test checks that the C99 macros (but not the C11 ones) are defined;
it does not check the correctness of their values. */
#include <float.h>
diff --git a/gcc/testsuite/gcc.dg/c99-init-5.c b/gcc/testsuite/gcc.dg/c99-init-5.c
new file mode 100644
index 0000000000..17bacd90c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-init-5.c
@@ -0,0 +1,9 @@
+/* Test for designated initializers: string constants used with
+ designator in character array should not initialize the array as a
+ whole. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+char g[] = { [7] = "abcd" }; /* { dg-error "initial" } */
+char h[10][10] = { [1][1] = "abcd" }; /* { dg-error "initial" } */
+char i[10][10] = { [1] = "abcd" };
diff --git a/gcc/testsuite/gcc.dg/c99-init-6.c b/gcc/testsuite/gcc.dg/c99-init-6.c
new file mode 100644
index 0000000000..6328f82676
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-init-6.c
@@ -0,0 +1,6 @@
+/* Test for designated initializers: invalid uses of string constants
+ should not ICE. PR 42262. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+int a[] = { [0 ... 1] = "", [0] = "" }; /* { dg-error "initial" } */
diff --git a/gcc/testsuite/gcc.dg/c99-predef-1.c b/gcc/testsuite/gcc.dg/c99-predef-1.c
new file mode 100644
index 0000000000..b907764579
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-predef-1.c
@@ -0,0 +1,63 @@
+/* Verify that predefined macros for properties of the compiler and
+ library together are the same before and after system headers are
+ included. This is broken with older glibc versions. */
+/* { dg-do compile } */
+/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
+
+#ifdef __STDC_IEC_559__
+#define IEC_559_DEFINED_BEFORE 1
+#else
+#define IEC_559_DEFINED_BEFORE 0
+#endif
+
+#ifdef __STDC_IEC_559_COMPLEX__
+#define IEC_559_COMPLEX_DEFINED_BEFORE 1
+#else
+#define IEC_559_COMPLEX_DEFINED_BEFORE 0
+#endif
+
+#ifdef __STDC_ISO_10646__
+#define ISO_10646_DEFINED_BEFORE 1
+#else
+#define ISO_10646_DEFINED_BEFORE 0
+#endif
+
+#include <stdio.h>
+
+#ifdef __STDC_IEC_559__
+#define IEC_559_DEFINED_AFTER 1
+#else
+#define IEC_559_DEFINED_AFTER 0
+#endif
+
+#ifdef __STDC_IEC_559_COMPLEX__
+#define IEC_559_COMPLEX_DEFINED_AFTER 1
+#else
+#define IEC_559_COMPLEX_DEFINED_AFTER 0
+#endif
+
+#ifdef __STDC_ISO_10646__
+#define ISO_10646_DEFINED_AFTER 1
+#else
+#define ISO_10646_DEFINED_AFTER 0
+#endif
+
+#if defined(__GLIBC__) && (__GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ < 16))
+#define BROKEN
+#endif
+
+#ifndef BROKEN
+
+#if IEC_559_DEFINED_BEFORE != IEC_559_DEFINED_AFTER
+#error "__STDC_IEC_559__ definition inconsistency"
+#endif
+
+#if IEC_559_COMPLEX_DEFINED_BEFORE != IEC_559_COMPLEX_DEFINED_AFTER
+#error "__STDC_IEC_559_COMPLEX__ definition inconsistency"
+#endif
+
+#if ISO_10646_DEFINED_BEFORE != ISO_10646_DEFINED_AFTER
+#error "__STDC_ISO_10646__ definition inconsistency"
+#endif
+
+#endif
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-1.c b/gcc/testsuite/gcc.dg/c99-stdint-1.c
index 37e1203f0a..530d13025e 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-1.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-1.c
@@ -9,6 +9,7 @@
version). */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors -fhosted" } */
+/* { dg-require-effective-target ptr32plus } */
#include <limits.h>
#include <stdint.h>
@@ -214,7 +215,6 @@ test_max (void)
void
test_misc_limits (void)
{
-/* { dg-bogus "size" "ptrdiff is 16bits" { xfail avr-*-* } 218 } */
CHECK_SIGNED_LIMITS_2(__PTRDIFF_TYPE__, PTRDIFF_MIN, PTRDIFF_MAX, -65535L, 65535L);
#ifndef SIGNAL_SUPPRESS
CHECK_LIMITS_2(sig_atomic_t, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX, -127, 127, 255);
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-2.c b/gcc/testsuite/gcc.dg/c99-stdint-2.c
index d1be0fb633..1784b0c413 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-2.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-2.c
@@ -2,7 +2,7 @@
Freestanding version. */
/* { dg-do compile } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors -ffreestanding" } */
-/* { dg-xfail-if "ptrdiff size is 16bits" { avr-*-* } } */
+/* { dg-require-effective-target ptr32plus } */
/* The test is that there are no diagnostics, so just include the
hosted version. */
#include "c99-stdint-1.c"
diff --git a/gcc/testsuite/gcc.dg/c99-stdint-6.c b/gcc/testsuite/gcc.dg/c99-stdint-6.c
index 2563eeb581..b5727eebbf 100644
--- a/gcc/testsuite/gcc.dg/c99-stdint-6.c
+++ b/gcc/testsuite/gcc.dg/c99-stdint-6.c
@@ -2,8 +2,7 @@
with any system <inttypes.h> header. */
/* { dg-do compile { target inttypes_types } } */
/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */
-/* { dg-options "-std=gnu99 -pedantic-errors -DNO_FAST_TYPES" { target *-*-solaris2.[89]* } } */
-/* { dg-options "-std=gnu99 -pedantic-errors -DNO_LEAST_TYPES -DNO_FAST_TYPES -DNO_MAX_TYPES" { target alpha*-dec-osf5* } } */
+/* { dg-options "-std=gnu99 -pedantic-errors -DNO_FAST_TYPES" { target *-*-solaris2.9* } } */
#include <inttypes.h>
#ifndef SIGNAL_SUPPRESS
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-1.c b/gcc/testsuite/gcc.dg/c99-tgmath-1.c
index f33b4c5a9e..c7d848c7a6 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-1.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-1.c
@@ -3,7 +3,6 @@
/* { dg-do preprocess { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */
-/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */
/* Test that tgmath defines the macros it's supposed to. */
#include <tgmath.h>
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-2.c b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
index fa8d80166b..d4f1f87cfa 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-2.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-2.c
@@ -3,7 +3,6 @@
/* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */
-/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */
/* Test that invoking type-generic sin on a float invokes sinf. */
#include <tgmath.h>
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-3.c b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
index 83e34a2305..3e98304275 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-3.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-3.c
@@ -3,7 +3,6 @@
/* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */
-/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */
/* Test that invoking type-generic exp on a complex invokes cexp. */
#include <tgmath.h>
diff --git a/gcc/testsuite/gcc.dg/c99-tgmath-4.c b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
index 90653260d1..d8dc043c26 100644
--- a/gcc/testsuite/gcc.dg/c99-tgmath-4.c
+++ b/gcc/testsuite/gcc.dg/c99-tgmath-4.c
@@ -3,7 +3,6 @@
/* { dg-do compile { target c99_runtime } } */
/* { dg-options "-std=iso9899:1999" } */
/* { dg-add-options c99_runtime } */
-/* { dg-skip-if "<complex.h> missing" { alpha*-dec-osf5* } } */
/* Test that invoking type-generic pow on complex float invokes cpowf. */
#include <tgmath.h>
diff --git a/gcc/testsuite/gcc.dg/c99-thread-local-1.c b/gcc/testsuite/gcc.dg/c99-thread-local-1.c
new file mode 100644
index 0000000000..ff531252c8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/c99-thread-local-1.c
@@ -0,0 +1,5 @@
+/* Test for _Thread_local: not in C99. */
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+static _Thread_local int x; /* { dg-error "_Thread_local" } */
diff --git a/gcc/testsuite/gcc.dg/call-diag-2.c b/gcc/testsuite/gcc.dg/call-diag-2.c
index 0d87e52e97..c34252cd72 100644
--- a/gcc/testsuite/gcc.dg/call-diag-2.c
+++ b/gcc/testsuite/gcc.dg/call-diag-2.c
@@ -11,7 +11,5 @@ void g1 (void) { f_cv (); } /* { dg-error "qualified void" } */
void g2 (void) { f_s (); } /* { dg-error "invalid use of undefined type" } */
void g3 (void) { ((const void (*) (void)) f_v) (); } /* { dg-error "qualified void" } */
/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 12 } */
-/* { dg-message "will abort" "abort" { target *-*-* } 12 } */
void g4 (void) { ((struct s (*) (void)) f_v) (), (void) 0; } /* { dg-error "invalid use of undefined type" } */
-/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 15 } */
-/* { dg-message "will abort" "abort" { target *-*-* } 15 } */
+/* { dg-warning "function called through a non-compatible type" "cast" { target *-*-* } 14 } */
diff --git a/gcc/testsuite/gcc.dg/cast-function-1.c b/gcc/testsuite/gcc.dg/cast-function-1.c
index 781d0e2219..ab42db1196 100644
--- a/gcc/testsuite/gcc.dg/cast-function-1.c
+++ b/gcc/testsuite/gcc.dg/cast-function-1.c
@@ -16,20 +16,16 @@ typedef struct {
int a;
} str_t;
-void bar(void)
+void bar(double d, int i, str_t s)
{
- double d;
- int i;
- str_t s;
-
- d = ((double (*) (int)) foo1) (i); /* { dg-warning "33:non-compatible|abort" } */
- i = ((int (*) (double)) foo1) (d); /* { dg-warning "33:non-compatible|abort" } */
- s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "32:non-compatible|abort" } */
+ d = ((double (*) (int)) foo1) (i); /* { dg-warning "7:non-compatible|abort" } */
+ i = ((int (*) (double)) foo1) (d); /* { dg-warning "7:non-compatible|abort" } */
+ s = ((str_t (*) (int)) foo1) (i); /* { dg-warning "7:non-compatible|abort" } */
((void (*) (int)) foo1) (d); /* { dg-warning "non-compatible|abort" } */
i = ((int (*) (int)) foo1) (i); /* { dg-bogus "non-compatible|abort" } */
(void) foo1 (i); /* { dg-bogus "non-compatible|abort" } */
- d = ((double (*) (int)) foo2) (i); /* { dg-warning "33:non-compatible|abort" } */
+ d = ((double (*) (int)) foo2) (i); /* { dg-warning "7:non-compatible|abort" } */
i = ((int (*) (double)) foo2) (d); /* { dg-bogus "non-compatible|abort" } */
s = ((str_t (*) (int)) foo2) (i); /* { dg-warning "non-compatible|abort" } */
((void (*) (int)) foo2) (d); /* { dg-warning "non-compatible|abort" } */
@@ -39,11 +35,15 @@ void bar(void)
int foo1(int arg)
{
+ /* Prevent the function from becoming const and thus DCEd. */
+ __asm volatile ("" : "+r" (arg));
return arg;
}
int foo2(arg)
int arg;
{
+ /* Prevent the function from becoming const and thus DCEd. */
+ __asm volatile ("" : "+r" (arg));
return arg;
}
diff --git a/gcc/testsuite/gcc.dg/cast-qual-3.c b/gcc/testsuite/gcc.dg/cast-qual-3.c
new file mode 100644
index 0000000000..50dabab474
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cast-qual-3.c
@@ -0,0 +1,11 @@
+/* PR 55383 */
+/* { dg-do compile } */
+/* { dg-options "-Wcast-qual" } */
+
+void set(void*);
+
+int foo(int argc)
+{
+ volatile double val;
+ set((void*)&val); /* { dg-warning "cast discards .volatile. qualifier" } */
+}
diff --git a/gcc/testsuite/gcc.dg/cdce1.c b/gcc/testsuite/gcc.dg/cdce1.c
index 3bd35ecb78..2123f7fd8e 100644
--- a/gcc/testsuite/gcc.dg/cdce1.c
+++ b/gcc/testsuite/gcc.dg/cdce1.c
@@ -1,6 +1,7 @@
/* { dg-do run } */
/* { dg-options "-O2 -fmath-errno -fdump-tree-cdce-details -lm" } */
-/* { dg-final { scan-tree-dump "cdce1.c:16: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
+/* { dg-require-effective-target int32plus } */
+/* { dg-final { scan-tree-dump "cdce1.c:17: note: function call is shrink-wrapped into error conditions\." "cdce" } } */
/* { dg-final { cleanup-tree-dump "cdce" } } */
/* { dg-require-effective-target large_double } */
diff --git a/gcc/testsuite/gcc.dg/charset/charset.exp b/gcc/testsuite/gcc.dg/charset/charset.exp
index 7e3a1348ef..b75dfabadc 100644
--- a/gcc/testsuite/gcc.dg/charset/charset.exp
+++ b/gcc/testsuite/gcc.dg/charset/charset.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
new file mode 100644
index 0000000000..63cfb0e814
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/cilk-plus.exp
@@ -0,0 +1,63 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Written by Balaji V. Iyer <balaji.v.iyer@intel.com>
+
+
+load_lib gcc-dg.exp
+load_lib lto.exp
+load_lib cilk-plus-dg.exp
+
+if { ![check_effective_target_cilkplus] } {
+ return;
+}
+
+dg-init
+if [cilkplus_init] {
+ # Run the tests that are shared with C++.
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/PS/*.c]] " -ftree-vectorize -fcilkplus -std=c99" " "
+ # Run the C-only tests.
+ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] \
+ "-ftree-vectorize -fcilkplus -std=c99" " "
+
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O1 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O2 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -O3 -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -g -O2 -ftree-vectorize -fcilkplus" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -std=c99" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O2 -std=c99" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -O3 -std=c99" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/AN/*.c]] " -fcilkplus -g -O0 -std=c99" " "
+
+ if { [check_libcilkrts_available] } {
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -g " " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O1 " " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -std=c99 " " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O2 -ftree-vectorize " " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -g " " "
+ if { [check_effective_target_lto] } {
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/CK/*.c]] " -O3 -flto -g " " "
+ }
+ }
+
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] " -g" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] " -O3 -std=c99" " "
+ dg-runtest [lsort [glob -nocomplain $srcdir/c-c++-common/cilk-plus/SE/*.c]] " -O3 -g" " "
+}
+cilkplus_finish
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/for1.c b/gcc/testsuite/gcc.dg/cilk-plus/for1.c
new file mode 100644
index 0000000000..4fb534286d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/for1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+int *a, *b, *c;
+
+void foo()
+{
+ int i, j;
+ // The initialization shall declare or initialize a *SINGLE* variable.
+#pragma simd
+ for (i=0, j=5; i < 1000; i++) // { dg-error "expected ';' before ','" }
+ a[i] = b[j];
+}
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/for2.c b/gcc/testsuite/gcc.dg/cilk-plus/for2.c
new file mode 100644
index 0000000000..285f35a507
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/for2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fcilkplus" } */
+
+int *a, *b;
+
+void foo()
+{
+#pragma simd
+ for (const int ci=0; ci<1000; ++ci) /* { dg-error "increment of read-only var\|invalid controlling\|invalid increment\|assignment of read" } */
+ a[ci] = b[ci];
+}
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/jump-openmp.c b/gcc/testsuite/gcc.dg/cilk-plus/jump-openmp.c
new file mode 100644
index 0000000000..95e6b2d440
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/jump-openmp.c
@@ -0,0 +1,49 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus -fopenmp" } */
+/* { dg-require-effective-target fopenmp } */
+
+int *a, *b, c;
+
+void foo()
+{
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ a[i] = b[i];
+ if (c == 5)
+ return; /* { dg-error "invalid branch to/from a Cilk Plus structured block" } */
+ }
+}
+
+void bar()
+{
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ lab:
+ a[i] = b[i];
+ }
+ if (c == 6)
+ goto lab; /* { dg-error "invalid entry to Cilk Plus structured block" } */
+}
+
+void baz()
+{
+ bad1:
+ #pragma omp parallel
+ goto bad1; /* { dg-error "invalid branch to/from an OpenMP structured block" } */
+
+ goto bad2; /* { dg-error "invalid entry to OpenMP structured block" } */
+ #pragma omp parallel
+ {
+ bad2: ;
+ }
+
+ #pragma omp parallel
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/cilk-plus/jump.c b/gcc/testsuite/gcc.dg/cilk-plus/jump.c
new file mode 100644
index 0000000000..9ec3293cc9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cilk-plus/jump.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-fcilkplus" } */
+
+int *a, *b, c;
+
+void foo()
+{
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ a[i] = b[i];
+ if (c == 5)
+ return; /* { dg-error "invalid branch to.from a Cilk" } */
+ }
+}
+
+void bar()
+{
+#pragma simd
+ for (int i=0; i < 1000; ++i)
+ {
+ lab:
+ a[i] = b[i];
+ }
+ if (c == 6)
+ goto lab; /* { dg-error "invalid entry to Cilk Plus" } */
+}
diff --git a/gcc/testsuite/gcc.dg/cleanup-10.c b/gcc/testsuite/gcc.dg/cleanup-10.c
index 11b7403f5e..16035b1ca4 100644
--- a/gcc/testsuite/gcc.dg/cleanup-10.c
+++ b/gcc/testsuite/gcc.dg/cleanup-10.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal frames
on alternate stack. */
diff --git a/gcc/testsuite/gcc.dg/cleanup-11.c b/gcc/testsuite/gcc.dg/cleanup-11.c
index d0c78d577b..ccc61ed41b 100644
--- a/gcc/testsuite/gcc.dg/cleanup-11.c
+++ b/gcc/testsuite/gcc.dg/cleanup-11.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime signal
frames on alternate stack. */
diff --git a/gcc/testsuite/gcc.dg/cleanup-8.c b/gcc/testsuite/gcc.dg/cleanup-8.c
index d2335606a2..553c0385d5 100644
--- a/gcc/testsuite/gcc.dg/cleanup-8.c
+++ b/gcc/testsuite/gcc.dg/cleanup-8.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through signal
frames. */
diff --git a/gcc/testsuite/gcc.dg/cleanup-9.c b/gcc/testsuite/gcc.dg/cleanup-9.c
index b73125ace9..fe2807234c 100644
--- a/gcc/testsuite/gcc.dg/cleanup-9.c
+++ b/gcc/testsuite/gcc.dg/cleanup-9.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target hppa*-*-hpux* *-*-linux* powerpc*-*-darwin* *-*-darwin[912]* } } */
+/* { dg-do run { target hppa*-*-hpux* *-*-linux* *-*-gnu* powerpc*-*-darwin* *-*-darwin[912]* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -O2" } */
/* Verify that cleanups work with exception handling through realtime
signal frames. */
diff --git a/gcc/testsuite/gcc.dg/compat/compat.exp b/gcc/testsuite/gcc.dg/compat/compat.exp
index 1302d52597..ffb742ed31 100644
--- a/gcc/testsuite/gcc.dg/compat/compat.exp
+++ b/gcc/testsuite/gcc.dg/compat/compat.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
index e541f6ed3a..e49cc714cd 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
index 76878ff954..b6ae34e000 100644
--- a/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
+++ b/gcc/testsuite/gcc.dg/compat/struct-layout-1_generate.c
@@ -1,5 +1,5 @@
/* Structure layout test generator.
- Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011
+ Copyright (C) 2004, 2005, 2007, 2008, 2009, 2011, 2012
Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>.
@@ -47,7 +47,7 @@ const char *dg_options[] = {
"/* { dg-options \"%s-I%s\" } */\n",
"/* { dg-options \"%s-I%s -Wno-abi\" } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -Wno-abi\" { target i?86-*-* x86_64-*-* } } */\n",
-"/* { dg-options \"%s-I%s -fno-common\" { target alpha*-dec-osf* hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
+"/* { dg-options \"%s-I%s -fno-common\" { target hppa*-*-hpux* powerpc*-*-darwin* } } */\n",
"/* { dg-options \"%s-I%s -mno-mmx -fno-common -Wno-abi\" { target i?86-*-darwin* x86_64-*-darwin* } } */\n",
"/* { dg-options \"%s-I%s -mno-base-addresses\" { target mmix-*-* } } */\n",
"/* { dg-options \"%s-I%s -mlongcalls -mtext-section-literals\" { target xtensa*-*-* } } */\n"
diff --git a/gcc/testsuite/gcc.dg/complex-5.c b/gcc/testsuite/gcc.dg/complex-5.c
index 41c4ba0b90..ffedefea36 100644
--- a/gcc/testsuite/gcc.dg/complex-5.c
+++ b/gcc/testsuite/gcc.dg/complex-5.c
@@ -1,7 +1,7 @@
/* PR middle-end/33088 */
/* Origin: Joseph S. Myers <jsm28@gcc.gnu.org> */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* { dg-options "-std=c99 -O -ffloat-store -lm" } */
#include <fenv.h>
diff --git a/gcc/testsuite/gcc.dg/const-1.c b/gcc/testsuite/gcc.dg/const-1.c
index 2657c9b573..a5b2b16772 100644
--- a/gcc/testsuite/gcc.dg/const-1.c
+++ b/gcc/testsuite/gcc.dg/const-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
/* { dg-options "-O2 -Wsuggest-attribute=const" } */
extern int extern_const(int a) __attribute__ ((const));
@@ -35,10 +35,10 @@ foo2b(int n)
/* Unbounded loops are not safe. */
static int __attribute__ ((noinline))
-foo3(int n) /* { dg-warning "const\[^\n\]* normally" "detect const candidate" } */
+foo3(unsigned int n) /* { dg-warning "const\[^\n\]* normally" "detect const candidate" } */
{
int ret = 0;
- int i;
+ unsigned int i;
for (i=0; extern_const (i+n); n++)
ret+=extern_const (i);
return ret;
diff --git a/gcc/testsuite/gcc.dg/const-uniq-1.c b/gcc/testsuite/gcc.dg/const-uniq-1.c
index 8172c678b2..497efed8a4 100644
--- a/gcc/testsuite/gcc.dg/const-uniq-1.c
+++ b/gcc/testsuite/gcc.dg/const-uniq-1.c
@@ -5,15 +5,20 @@
int lookup1 (int i)
{
- int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ /* We use vectors long enough that piece-wise initialization is not
+ reasonably preferable even for size (when including the constant
+ vectors for initialization) for any target. */
+ int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
return a[i];
}
int lookup2 (int i)
{
- int a[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int a[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
+ 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31 };
return a[i+1];
}
-/* { dg-final { scan-tree-dump-times "L\\\$?C0" 2 "gimple" } } */
+/* { dg-final { scan-tree-dump-times "L\\\$?C\\\.*0" 2 "gimple" } } */
/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/convert-vec-1.c b/gcc/testsuite/gcc.dg/convert-vec-1.c
deleted file mode 100644
index 4987298407..0000000000
--- a/gcc/testsuite/gcc.dg/convert-vec-1.c
+++ /dev/null
@@ -1,3 +0,0 @@
-/* { dg-do compile } */
-typedef float v2sf __attribute__ ((vector_size (8)));
-v2sf sub (void) { return (v2sf) 0.0; } /* { dg-error "can't convert" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/_Pragma7.c b/gcc/testsuite/gcc.dg/cpp/_Pragma7.c
new file mode 100644
index 0000000000..a7a5b1bcb0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/_Pragma7.c
@@ -0,0 +1,14 @@
+/*
+ Origin: PR preprocessor/53469
+ { dg-do compile }
+ */
+
+#define STRINGIFY(x) #x
+#define TEST(x) \
+ _Pragma(STRINGIFY(GCC diagnostic ignored "-Wunused-local-typedefs")) \
+ typedef int myint;
+
+void bar ()
+{
+ TEST(myint)
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/assembl2.S b/gcc/testsuite/gcc.dg/cpp/assembl2.S
index 0cfad1fa24..848024cff1 100644
--- a/gcc/testsuite/gcc.dg/cpp/assembl2.S
+++ b/gcc/testsuite/gcc.dg/cpp/assembl2.S
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000 Free Software Foundation, Inc. */
+/* Copyright (C) 2000-2014 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
diff --git a/gcc/testsuite/gcc.dg/cpp/assert4.c b/gcc/testsuite/gcc.dg/cpp/assert4.c
index 514195313b..92e3dba5ce 100644
--- a/gcc/testsuite/gcc.dg/cpp/assert4.c
+++ b/gcc/testsuite/gcc.dg/cpp/assert4.c
@@ -1,4 +1,6 @@
-/* Copyright (C) 2003, 2006, 2008, 2009, 2011 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2006, 2008, 2009, 2011, 2012
+ Free Software Foundation, Inc.
+
Test builtin preprocessor assertions.
By Kaveh Ghazi <ghazi@caip.rutgers.edu>. */
@@ -273,11 +275,10 @@
#endif
#if defined __mips__
-# if !#cpu(mips) || (defined __sgi__ && !#machine(sgi)) \
- || (!defined __sgi__ && !#machine(mips))
+# if !#cpu(mips)
# error
# endif
-#elif #cpu(mips) || #machine(sgi) || #machine(mips)
+#elif #cpu(mips) || #machine(mips)
# error
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-1.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-1.c
index ce3f5b7212..129e48bf8e 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-1.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-1.i "^\n*#undef A\n*$" } } */
#ifdef A
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-10.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-10.c
index dd1474ad0e..31398a7625 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-10.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-10.c
@@ -1,7 +1,7 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-10.i "^\n*C\n+#define B C\n+#define A B\n*$" } } */
/* This file deliberately has no final newline. */
#define A B
#define B C
-A \ No newline at end of file
+A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-11.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-11.c
index c9cc593463..1c0128bb43 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-11.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-11.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-11.i "^\n*\n*$" } } */
#define A B
#if 0
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-12.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-12.c
index bf765fbf0e..54620a57ee 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-12.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-12.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-12.i "^\n*#define A 1\n*$" } } */
#define A 1
#if A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-13.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-13.c
index 3ab08d5d59..45ce532b20 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-13.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-13.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-13.i "^\n*#undef A\n*$" } } */
#ifdef A
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-14.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-14.c
index 5d36f1acb0..4fe96a4d77 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-14.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-14.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-14.i "^\n*B\n+#define A B\n+B\n*$" } } */
#define A B
A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-15.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-15.c
index a6a9618267..2df0b62f9b 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-15.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-15.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-15.i "^\n*\n*$" } } */
#if A
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-16.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-16.c
index 463c0b9e70..41a9a9110b 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-16.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-16.c
@@ -1,6 +1,6 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
-/* { dg-options "-P -dU -std=c89" { target *-*-solaris2.* } } */
+/* { dg-options "-nostdinc -P -dU" } */
+/* { dg-options "-nostdinc -P -dU -std=c89" { target *-*-solaris2.* } } */
/* { dg-final { scan-file cmdlne-dU-16.i "^\n*#define __STDC__ 1\n*$" } } */
#ifdef __STDC__
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-17.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-17.c
index 2ae9d273a9..fd608e1d4d 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-17.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-17.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
-/* { dg-options "-P -dU -std=c89" { target *-*-solaris2.* } } */
+/* { dg-options "-nostdinc -P -dU" } */
+/* { dg-options "-nostdinc -P -dU -std=c89" { target *-*-solaris2.* } } */
/* { dg-final { scan-file cmdlne-dU-17.i "^\n*1\n+#define __STDC__ 1\n*$" } } */
__STDC__
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-18.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-18.c
index 0b2c54307e..97104845d0 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-18.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-18.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-18.i "^\n*x 1 y\n+#define A 1\n*$" } } */
#define A 1
x A y
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-19.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-19.c
index 50edfc2b95..c6c3af3562 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-19.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-19.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-19.i "^\n*B\n+#define A B\n+#undef A\n*$" } } */
#define A B
A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-2.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-2.c
index e475463040..dffdd2ba90 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-2.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-2.i "^\n*#define A *\n*$" } } */
#define A
#ifdef A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-20.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-20.c
index 4845b51e77..065b807ef6 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-20.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-20.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-20.i "^\n*A B\n*$" } } */
#define A(x) x
A B
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-21.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-21.c
index c17a0435ed..1fefe542cb 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-21.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-21.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-21.i "^\n*hello There\n+#define ASTRING There\n+#define MACROARGS\\(A\\) A\n+#undef BSTRING\n*$" } } */
#define ASTRING There
#define MACROARGS(A) A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-22.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-22.c
index 383a29f85e..fe100ceb02 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-22.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-22.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-22.i "^\n*#undef AAA\n+AAA is undefined\n+#undef BBB\n+BBB is undefined\n+#undef CCC\n+CCC is undefined\n*$" } } */
#ifndef AAA
AAA is undefined
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-3.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-3.c
index 26c6ec1de2..a26fc9881d 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-3.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-3.i "^\n*#define A B\n*$" } } */
#define A B
#ifndef A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-4.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-4.c
index 9c57ffe7c7..aa3d853a09 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-4.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-4.i "^\n*#undef A\n*$" } } */
#if defined(A)
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-5.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-5.c
index 01880b77b5..bfae850de3 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-5.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-5.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-5.i "^\n*#undef A\n*$" } } */
#ifdef A
#ifdef B
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-6.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-6.c
index edf6b44451..e2c801df30 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-6.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-6.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-6.i "^\n*#undef A\n+#define A *\n*$" } } */
#ifdef A
#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-7.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-7.c
index 43a66341d0..0309178448 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-7.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-7.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-7.i "^\n*B\n+#define A B\n+C\n+#define A C\n*$" } } */
#define A B
A
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-8.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-8.c
index d5984a3149..da97fabed5 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-8.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-8.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-8.i "^\n*B D\n+#define A\\(x\\) B x\n+#define C D\n*$" } } */
#define A(x) B x
#define C D
diff --git a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-9.c b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-9.c
index ac8b92114a..bd0f0edfec 100644
--- a/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-9.c
+++ b/gcc/testsuite/gcc.dg/cpp/cmdlne-dU-9.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "-P -dU" } */
+/* { dg-options "-nostdinc -P -dU" } */
/* { dg-final { scan-file cmdlne-dU-9.i "^\n*C\n+#define B C\n+#define A B\n*$" } } */
#define A B
#define B C
diff --git a/gcc/testsuite/gcc.dg/cpp/cpp.exp b/gcc/testsuite/gcc.dg/cpp/cpp.exp
index 49b857145a..7dd65e569d 100644
--- a/gcc/testsuite/gcc.dg/cpp/cpp.exp
+++ b/gcc/testsuite/gcc.dg/cpp/cpp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2000, 2003, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2.c b/gcc/testsuite/gcc.dg/cpp/direct2.c
index 858dec7f31..1ce40bfb58 100644
--- a/gcc/testsuite/gcc.dg/cpp/direct2.c
+++ b/gcc/testsuite/gcc.dg/cpp/direct2.c
@@ -4,18 +4,20 @@
/* Test of prohibition on directives which result from macro expansion.
See also direct2s.c */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
#define HASH #
#define HASHDEFINE #define
#define HASHINCLUDE #include
HASH include "somerandomfile" /*{ dg-error "stray" "non-include" }*/
-/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 13 }*/
-int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 13 }*/
+/*{ dg-bogus "No such" "don't execute non-include" { target *-*-* } 15 }*/
+int resync_parser_1; /*{ dg-error "parse|syntax|expected" "" { target *-*-* } 15 }*/
HASHINCLUDE <somerandomfile> /*{ dg-error "stray|expected" "non-include 2" }*/
-/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 17 }*/
+/*{ dg-bogus "No such" "don't execute non-include 2" { target *-*-* } 19 }*/
int resync_parser_2;
void g1 ()
@@ -43,4 +45,4 @@ void f ()
#define starslash *##/
slashstar starslash /* { dg-error "parse error|syntax error|expected" "not a comment" } */
-/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 45 } */
+/* { dg-error "does not give" "paste warning(s)" { target *-*-* } 47 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/direct2s.c b/gcc/testsuite/gcc.dg/cpp/direct2s.c
index 9d0cc017df..5923214194 100644
--- a/gcc/testsuite/gcc.dg/cpp/direct2s.c
+++ b/gcc/testsuite/gcc.dg/cpp/direct2s.c
@@ -6,7 +6,7 @@
should be identical. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -ansi -pedantic-errors" } */
+/* { dg-options "-save-temps -ansi -pedantic-errors -ftrack-macro-expansion=0" } */
#define HASH #
#define HASHDEFINE #define
diff --git a/gcc/testsuite/gcc.dg/cpp/expr-overflow-1.c b/gcc/testsuite/gcc.dg/cpp/expr-overflow-1.c
new file mode 100644
index 0000000000..8a67aaa6d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/expr-overflow-1.c
@@ -0,0 +1,44 @@
+/* Test overflow in preprocessor arithmetic. PR 55715. */
+/* { dg-do preprocess } */
+/* { dg-options "-std=c99" } */
+
+#include <stdint.h>
+
+#if -1 - INTMAX_MIN
+#endif
+
+#if 0 - INTMAX_MIN /* { dg-warning "overflow" } */
+#endif
+
+#if 1 * INTMAX_MIN
+#endif
+
+#if -1 * INTMAX_MIN /* { dg-warning "overflow" } */
+#endif
+
+#if 0 * INTMAX_MIN
+#endif
+
+#if -INTMAX_MIN /* { dg-warning "overflow" } */
+#endif
+
+#if +INTMAX_MIN
+#endif
+
+#if INTMAX_MIN / 1
+#endif
+
+#if INTMAX_MIN / -1 /* { dg-warning "overflow" } */
+#endif
+
+#if UINTMAX_MAX * UINTMAX_MAX
+#endif
+
+#if UINTMAX_MAX / -1
+#endif
+
+#if UINTMAX_MAX + INTMAX_MAX
+#endif
+
+#if UINTMAX_MAX - INTMAX_MIN
+#endif
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
index d975c8cee9..28ef7955c9 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-1.c
@@ -6,16 +6,14 @@
#define OPERATE(OPRD1, OPRT, OPRD2) \
do \
{ \
- OPRD1 OPRT OPRD2; /* { dg-message "expansion" }*/ \
+ OPRD1 OPRT OPRD2; /* { dg-message "definition" }*/ \
} while (0)
#define SHIFTL(A,B) \
- OPERATE (A,<<,B) /* { dg-message "expanded|expansion" } */
+ OPERATE (A,<<,B) /* { dg-error "invalid operands" } */
void
foo ()
{
- SHIFTL (0.1,0.2); /* { dg-message "expanded" } */
+ SHIFTL (0.1,0.2); /* { dg-message "in expansion of macro \[^\n\r\]SHIFTL" } */
}
-
-/* { dg-error "invalid operands" "" { target *-*-* } 13 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
index 684af4c750..2367765cce 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-2.c
@@ -4,18 +4,17 @@
*/
#define OPERATE(OPRD1, OPRT, OPRD2) \
- OPRD1 OPRT OPRD2; /* { dg-message "expansion" } */
+ OPRD1 OPRT OPRD2; /* { dg-message "in definition of macro 'OPERATE'" } */
#define SHIFTL(A,B) \
- OPERATE (A,<<,B) /* { dg-message "expanded|expansion" } */
+ OPERATE (A,<<,B) /* { dg-message "invalid operands to binary <<" } */
#define MULT(A) \
- SHIFTL (A,1) /* { dg-message "expanded|expansion" } */
+ SHIFTL (A,1) /* { dg-message "in expansion of macro 'SHIFTL'" } */
void
foo ()
{
- MULT (1.0); /* { dg-message "expanded" } */
+ MULT (1.0); /* { dg-message "in expansion of macro 'MULT'" } */
}
-/* { dg-error "invalid operands to binary <<" "" { target *-*-* } { 10 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
index 119053ef9f..b47726d6b4 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-3.c
@@ -3,12 +3,10 @@
{ dg-do compile }
*/
-#define SQUARE(A) A * A /* { dg-message "expansion" } */
+#define SQUARE(A) A * A /* { dg-message "in definition of macro 'SQUARE'" } */
void
foo()
{
- SQUARE (1 << 0.1); /* { dg-message "expanded" } */
+ SQUARE (1 << 0.1); /* { dg-error "16:invalid operands to binary <<" } */
}
-
-/* { dg-error "16:invalid operands to binary <<" "" {target *-*-* } { 11 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
index 1f9fe6ad26..401b846cc3 100644
--- a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-4.c
@@ -3,12 +3,11 @@
{ dg-do compile }
*/
-#define SQUARE(A) A * A /* { dg-message "expansion" } */
+#define SQUARE(A) A * A /* { dg-message "in definition of macro 'SQUARE'" } */
void
foo()
{
- SQUARE (1 << 0.1); /* { dg-message "expanded" } */
+ SQUARE (1 << 0.1); /* { dg-message "13:invalid operands to binary <<" } */
}
-/* { dg-error "13:invalid operands to binary <<" "" { target *-*-* } { 11 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c
new file mode 100644
index 0000000000..abe456ceb6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/macro-exp-tracking-5.c
@@ -0,0 +1,18 @@
+/*
+ { dg-options "-fshow-column -ftrack-macro-expansion" }
+ { dg-do compile }
+ */
+
+#define PASTED var ## iable /* { dg-error "'variable' undeclared" } */
+#define call_foo(p1, p2) \
+ foo (p1, \
+ p2); /* { dg-message "in definition of macro 'call_foo'" } */
+
+void foo(int, char);
+
+void
+bar()
+{
+ call_foo(1,PASTED); /* { dg-message "in expansion of macro 'PASTED'" } */
+}
+
diff --git a/gcc/testsuite/gcc.dg/cpp/mi5.c b/gcc/testsuite/gcc.dg/cpp/mi5.c
index 327c476219..09f4f5c0d4 100644
--- a/gcc/testsuite/gcc.dg/cpp/mi5.c
+++ b/gcc/testsuite/gcc.dg/cpp/mi5.c
@@ -6,7 +6,7 @@
otherwise it will not be interpreted all in one unit. */
/* { dg-do preprocess }
- { dg-options "-H -C" }
+ { dg-options "-nostdinc -H -C" }
{ dg-message "mi1c\.h" "redundant include check with -C" { target *-*-* } 0 } */
#include "mi1c.h"
diff --git a/gcc/testsuite/gcc.dg/cpp/multiline.c b/gcc/testsuite/gcc.dg/cpp/multiline.c
index 38798bdfaa..970cf2faa0 100644
--- a/gcc/testsuite/gcc.dg/cpp/multiline.c
+++ b/gcc/testsuite/gcc.dg/cpp/multiline.c
@@ -1,6 +1,6 @@
/* Copyright (C) 2000, 2003 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-C" } */
+/* { dg-options "-nostdinc -C" } */
/* Test that multi-line tokens are recognized by cpp0 as being
multiline . Source: Neil Booth, 17 Dec 2000. */
/* Line 1
diff --git a/gcc/testsuite/gcc.dg/cpp/paste12-2.c b/gcc/testsuite/gcc.dg/cpp/paste12-2.c
new file mode 100644
index 0000000000..6e2e4f1057
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste12-2.c
@@ -0,0 +1,11 @@
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do preprocess }
+ */
+
+/* Test correct diagnostics when pasting in #include.
+ Source: PR preprocessor/6780. */
+
+#define inc2(a,b) <##a.b> /* { dg-error "pasting \"<\" and \"stdio\" does not" } */
+#define INC(X) inc2(X,h)
+#include INC(stdio)
diff --git a/gcc/testsuite/gcc.dg/cpp/paste12.c b/gcc/testsuite/gcc.dg/cpp/paste12.c
index e61ec51433..3e0f7b9592 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste12.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste12.c
@@ -1,4 +1,7 @@
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
/* Test correct diagnostics when pasting in #include.
Source: PR preprocessor/6780. */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste13.c b/gcc/testsuite/gcc.dg/cpp/paste13.c
index 62c72d4499..f0f4fd894e 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste13.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste13.c
@@ -1,6 +1,9 @@
/* Copyright (C) 2000 Free Software Foundation, Inc. */
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
/* This used to be recognized as a comment when lexing after pasting
spellings. Neil Booth, 9 Oct 2002. */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste14-2.c b/gcc/testsuite/gcc.dg/cpp/paste14-2.c
new file mode 100644
index 0000000000..3b23ada3d2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste14-2.c
@@ -0,0 +1,11 @@
+/* PR preprocessor/28709 */
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do preprocess }
+*/
+
+#define foo - ## >> /* { dg-error "pasting \"-\" and \">>\"" } */
+foo
+#define bar = ## == /* { dg-error "pasting \"=\" and \"==\"" } */
+bar
+
diff --git a/gcc/testsuite/gcc.dg/cpp/paste14.c b/gcc/testsuite/gcc.dg/cpp/paste14.c
index ec243c2326..043d5e5804 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste14.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste14.c
@@ -1,5 +1,8 @@
/* PR preprocessor/28709 */
-/* { dg-do preprocess } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do preprocess }
+*/
#define foo - ## >>
foo /* { dg-error "pasting \"-\" and \">>\"" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/paste17.c b/gcc/testsuite/gcc.dg/cpp/paste17.c
new file mode 100644
index 0000000000..9c6506ff89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste17.c
@@ -0,0 +1,8 @@
+ /* { dg-options "-ftrack-macro-expansion=2" } */
+/* { dg-do preprocess } */
+
+#define do_paste 1.0e ## -1
+
+do_paste
+
+/* { dg-final {scan-file paste17.i "1.0e- 1" } }*/
diff --git a/gcc/testsuite/gcc.dg/cpp/paste18.c b/gcc/testsuite/gcc.dg/cpp/paste18.c
new file mode 100644
index 0000000000..2888144cb3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste18.c
@@ -0,0 +1,16 @@
+/*
+ { dg-options "-ftrack-macro-expansion=2" }
+ { dg-do compile }
+ */
+
+struct x {
+ int i;
+};
+struct x x;
+
+#define TEST(X) x.##X /* { dg-error "pasting\[^\n\r\]*does not give\[^\n\r\]*token" } */
+
+void foo (void)
+{
+ TEST(i) = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/cpp/paste6.c b/gcc/testsuite/gcc.dg/cpp/paste6.c
index ac9ae3901b..a4e70e4502 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste6.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste6.c
@@ -2,7 +2,10 @@
actual arguments. Original bug exposed by Linux kernel. Problem
reported by Jakub Jelinek <jakub@redhat.com>. */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile }
+*/
extern int foo(int x);
diff --git a/gcc/testsuite/gcc.dg/cpp/paste8-2.c b/gcc/testsuite/gcc.dg/cpp/paste8-2.c
new file mode 100644
index 0000000000..c037e99e6f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/paste8-2.c
@@ -0,0 +1,15 @@
+/* { dg-do preprocess } */
+/* { dg-options "-ftrack-macro-expansion=2" } */
+
+int foo(int, ...);
+
+#define a(x, y...) foo(x, ##y)
+a(1)
+a(1, 2, 3)
+#define b(x, y, z...) foo(x, ##y) /* { dg-error "valid preprocessing token" } */
+b(1, 2, 3)
+#define c(x, y, z...) foo(x, ##z)
+c(1, 2)
+c(1, 2, 3)
+#define d(x) fo(##x) /* { dg-error "valid preprocessing token" } */
+d(1)
diff --git a/gcc/testsuite/gcc.dg/cpp/paste8.c b/gcc/testsuite/gcc.dg/cpp/paste8.c
index ab01779786..db1416c120 100644
--- a/gcc/testsuite/gcc.dg/cpp/paste8.c
+++ b/gcc/testsuite/gcc.dg/cpp/paste8.c
@@ -1,5 +1,5 @@
/* { dg-do preprocess } */
-/* { dg-options "" } */
+/* { dg-options "-ftrack-macro-expansion=0" } */
int foo(int, ...);
diff --git a/gcc/testsuite/gcc.dg/cpp/pr28709.c b/gcc/testsuite/gcc.dg/cpp/pr28709.c
index 0d97cbde9d..25d7cc297c 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr28709.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr28709.c
@@ -1,8 +1,10 @@
/* Copyright (C) 2006 Free Software Foundation, Inc. */
/* PR preprocessor/28709 */
-/* { dg-do compile } */
+/* { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile } */
+
#define foo - ## >>
foo;
-/* { dg-error "expected identifier.*'-'" "expected" { target *-*-* } 6 } */
-/* { dg-error pasting "pasting" { target *-*-* } 6 } */
+/* { dg-error "expected identifier.*'-'" "expected" { target *-*-* } 8 } */
+/* { dg-error pasting "pasting" { target *-*-* } 8 } */
diff --git a/gcc/testsuite/gcc.dg/cpp/pr7263-3.c b/gcc/testsuite/gcc.dg/cpp/pr7263-3.c
index efa619ad3c..225b659754 100644
--- a/gcc/testsuite/gcc.dg/cpp/pr7263-3.c
+++ b/gcc/testsuite/gcc.dg/cpp/pr7263-3.c
@@ -1,6 +1,6 @@
/* PR 7263: __extension__ keyword doesn't suppress warning on LL or ULL constants. */
/* { dg-do compile } */
-/* { dg-options "-std=c99 -pedantic-errors" } */
+/* { dg-options "-std=c99 -pedantic-errors -ftrack-macro-expansion=0" } */
#include "pr7263-3.h"
__complex__ bar () /* { dg-error "ISO C does not support plain .complex. meaning .double complex." } */
{
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
index 3a2f9da1fc..add7360c5f 100644
--- a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
+++ b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-1.c
@@ -1,5 +1,5 @@
/*
- { dg-options "-Wuninitialized" }
+ { dg-options "-Wuninitialized -ftrack-macro-expansion=0" }
{ dg-do compile }
*/
diff --git a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
index 7ab95b0c63..38fc77c47b 100644
--- a/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
+++ b/gcc/testsuite/gcc.dg/cpp/pragma-diagnostic-2.c
@@ -6,8 +6,8 @@
void f (unsigned);
#define CODE_WITH_WARNING \
- int a; /* { dg-message "expansion|declared here" } */ \
- f (a) /* { dg-message "expansion" } */
+ int a; /* { dg-message "was declared here" } */ \
+ f (a) /* { dg-warning "used uninitialized" } */
#pragma GCC diagnostic ignored "-Wuninitialized"
@@ -24,11 +24,5 @@ g (void)
void
h (void)
{
- CODE_WITH_WARNING; /* { dg-message "expanded" } */
+ CODE_WITH_WARNING; /* { dg-message "in expansion of macro 'CODE_WITH_WARNING'" } */
}
-
-/*
- { dg-message "some warnings being treated as errors" "" {target *-*-*} 0 }
-*/
-
-/* { dg-error "uninitialized" "" { target *-*-* } { 10 } } */
diff --git a/gcc/testsuite/gcc.dg/cpp/syshdr3.c b/gcc/testsuite/gcc.dg/cpp/syshdr3.c
new file mode 100644
index 0000000000..15749ff996
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/syshdr3.c
@@ -0,0 +1,16 @@
+/* Contributed by Dodji Seketeli <dodji@redhat.com> */
+/* Origin: PR preprocessor/7263 */
+/* { dg-options "-pedantic -std=c89 -ftrack-macro-expansion=1" } */
+/* { dg-do compile } */
+
+/* This tests the proprer suppression of warning coming from macro
+ defined in system headers and expanded in a non-system header
+ location. */
+#include "syshdr3.h"
+
+static _Complex float c = _Complex_I + _Complex_I; /* These macros are defined in
+ system header so we should
+ have no warning here. */
+U_LL u = ONE_ULL; /* Likewise here. */
+
+unsigned long long v = 1ULL; /* { dg-warning "long long" } */
diff --git a/gcc/testsuite/gcc.dg/cpp/syshdr3.h b/gcc/testsuite/gcc.dg/cpp/syshdr3.h
new file mode 100644
index 0000000000..e5d502a24f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/syshdr3.h
@@ -0,0 +1,7 @@
+#pragma GCC system_header
+
+#define _Complex __complex__
+#define _Complex_I 1.0iF
+
+#define U_LL unsigned long long
+#define ONE_ULL 1ULL
diff --git a/gcc/testsuite/gcc.dg/cpp/sysmac1.c b/gcc/testsuite/gcc.dg/cpp/sysmac1.c
index fa741a4262..cc8469e18c 100644
--- a/gcc/testsuite/gcc.dg/cpp/sysmac1.c
+++ b/gcc/testsuite/gcc.dg/cpp/sysmac1.c
@@ -1,7 +1,7 @@
/* Copyright (C) 2001 Free Software Foundation, Inc. */
/* { dg-do preprocess } */
-/* { dg-options "-std=gnu99 -pedantic -Wtraditional" } */
+/* { dg-options "-std=gnu99 -pedantic -Wtraditional -ftrack-macro-expansion=0" } */
/* Tests diagnostics are suppressed for some macros defined in system
headers. */
diff --git a/gcc/testsuite/gcc.dg/cpp/sysmac2.c b/gcc/testsuite/gcc.dg/cpp/sysmac2.c
index 6d493a9ed1..cdba668a03 100644
--- a/gcc/testsuite/gcc.dg/cpp/sysmac2.c
+++ b/gcc/testsuite/gcc.dg/cpp/sysmac2.c
@@ -1,7 +1,7 @@
/* Copyright (C) 2001 Free Software Foundation, Inc. */
/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -pedantic -Wtraditional" } */
+/* { dg-options "-std=gnu99 -pedantic -Wtraditional -ftrack-macro-expansion=0" } */
/* Tests diagnostics are suppressed for some macros defined in system
headers. */
diff --git a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
index 190cfcfdee..c00a17c9bd 100644
--- a/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
+++ b/gcc/testsuite/gcc.dg/cpp/trad/trad.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/cpp/ucnid-9.c b/gcc/testsuite/gcc.dg/cpp/ucnid-9.c
new file mode 100644
index 0000000000..8dc43458ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/cpp/ucnid-9.c
@@ -0,0 +1,8 @@
+/* { dg-do preprocess } */
+/* { dg-options "-std=c99 -pedantic -fextended-identifiers" } */
+
+\u2160
+\u2182
+\u3007
+\u3021
+\u3029
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-1.c b/gcc/testsuite/gcc.dg/darwin-minversion-1.c
index d8a3243bb5..6221d617b2 100644
--- a/gcc/testsuite/gcc.dg/darwin-minversion-1.c
+++ b/gcc/testsuite/gcc.dg/darwin-minversion-1.c
@@ -2,7 +2,8 @@
/* { dg-options "-mmacosx-version-min=10.1" } */
/* { dg-do run { target *-*-darwin* } } */
-int main(void)
+int
+main ()
{
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1010
fail me;
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-2.c b/gcc/testsuite/gcc.dg/darwin-minversion-2.c
index fd4975a529..8e18d5273a 100644
--- a/gcc/testsuite/gcc.dg/darwin-minversion-2.c
+++ b/gcc/testsuite/gcc.dg/darwin-minversion-2.c
@@ -2,7 +2,8 @@
/* { dg-options "-mmacosx-version-min=10.1 -mmacosx-version-min=10.3" } */
/* { dg-do run { target *-*-darwin* } } */
-int main(void)
+int
+main ()
{
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1030
fail me;
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-3.c b/gcc/testsuite/gcc.dg/darwin-minversion-3.c
index d0c5934b44..4fcb9693cd 100644
--- a/gcc/testsuite/gcc.dg/darwin-minversion-3.c
+++ b/gcc/testsuite/gcc.dg/darwin-minversion-3.c
@@ -2,7 +2,8 @@
/* { dg-options "-mmacosx-version-min=10.4.10" } */
/* { dg-do compile { target *-*-darwin* } } */
-int main(void)
+int
+main ()
{
#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 1040
fail me;
diff --git a/gcc/testsuite/gcc.dg/darwin-minversion-4.c b/gcc/testsuite/gcc.dg/darwin-minversion-4.c
new file mode 100644
index 0000000000..1cb42ebe3e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/darwin-minversion-4.c
@@ -0,0 +1,12 @@
+/* Test that major versions greater than 9 work and have the additional 0. */
+/* { dg-options "-mmacosx-version-min=10.10.0" } */
+/* { dg-do compile { target *-*-darwin* } } */
+
+int
+main ()
+{
+#if __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ != 101000
+ fail me;
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/debug.exp b/gcc/testsuite/gcc.dg/debug/debug.exp
index 94c1564a2c..e25d2d2b07 100644
--- a/gcc/testsuite/gcc.dg/debug/debug.exp
+++ b/gcc/testsuite/gcc.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
index 8a97e4dc2a..4e40aea4ea 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/aranges-fnsec-1.c
@@ -3,7 +3,7 @@
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
/* { dg-require-effective-target function_sections } */
-/* { dg-options "-gdwarf-2 -ffunction-sections -w -dA" } */
+/* { dg-options "-gdwarf -ffunction-sections -w -dA" } */
/* { dg-final { scan-assembler-not "\\.Letext0-\\.Ltext0" } } */
/* { dg-final { scan-assembler-not "\\.Ltext0\[^\n\r\]*Offset 0x0" } } */
/* { dg-final { scan-assembler "DW_AT_ranges" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
index 1d2e1481e5..3773e1c83c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/asm-line1.c
@@ -1,6 +1,6 @@
/* PR debug/50983 */
-/* { dg-do compile { target *-*-linux-gnu } } */
-/* { dg-options "-O0 -gdwarf-2" } */
+/* { dg-do compile { target *-*-gnu* } } */
+/* { dg-options "-O0 -gdwarf" } */
/* { dg-final { scan-assembler "is_stmt 1" } } */
int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
index b7bd66a602..c1ca1ebb6a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/c99-typedef1.c
@@ -1,4 +1,4 @@
-// { dg-options "-std=iso9899:1999 -gdwarf-2" }
+// { dg-options "-std=iso9899:1999 -gdwarf" }
void f() {
int n = 3;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
index 16e1d8bd14..b139122fde 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target powerpc_altivec_ok } } */
-/* { dg-options "-O -gdwarf-2 -dA -maltivec" } */
+/* { dg-options "-O -gdwarf -dA -maltivec" } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
typedef float FloatVect __attribute__((__vector_size__(16)));
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
index 6cbdc85b3d..e7d199d1c4 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/const-2b.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target i386*-*-* } } */
-/* { dg-options "-O -gdwarf-2 -dA -msse" } */
+/* { dg-options "-O -gdwarf -dA -msse" } */
/* { dg-require-effective-target sse } */
/* { dg-final { scan-assembler "DW_AT_const_value" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c
new file mode 100644
index 0000000000..b77f7b1bff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/discriminator.c
@@ -0,0 +1,18 @@
+/* HAVE_AS_DWARF2_DEBUG_LINE macro needs to be defined to pass the unittest.
+ However, dg cannot access it, so we restrict to GNU targets. */
+/* { dg-do compile { target *-*-gnu* } } */
+/* { dg-options "-O0 -gdwarf" } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])?\n" } } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 2\n" } } */
+/* { dg-final { scan-assembler "loc \[0-9] 11 \[0-9]( is_stmt \[0-9])? discriminator 1\n" } } */
+
+int foo(int n) {
+ int i, ret = 0;
+ for (i = 0; i < n; i++) {
+ if (i % 10 == 1)
+ ret++;
+ else
+ ret--;
+ }
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c
new file mode 100644
index 0000000000..d9c01d07da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.c
@@ -0,0 +1,8 @@
+/* Test that these two options can work together. */
+/* { dg-options "-gdwarf-4 -dA -feliminate-dwarf2-dups -fdebug-types-section" } */
+/* { dg-final { scan-assembler "DW.dups_types\.h\[^)\]*. DW_TAG_typedef" } } */
+/* { dg-final { scan-assembler "DW_TAG_type_unit" } } */
+
+#include "dups-types.h"
+
+A2 a;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h
new file mode 100644
index 0000000000..99b7d907c0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dups-types.h
@@ -0,0 +1,10 @@
+struct A
+{
+ int i;
+ int j;
+};
+
+typedef struct A A2;
+extern A2 a;
+
+A2 f(A2);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
index ed32349b4d..23f9596732 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char1.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
index dc145852fc..4a4bd438ce 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char2.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
index edc1d83ed4..4ff201f134 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-char3.c
@@ -1,6 +1,6 @@
/* PR debug/7241 */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x\[68\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
/* { dg-final { scan-assembler-not "0x\[57\]\[ \t\]+\[#@;!/|\]+\[ \t\]+DW_AT_encoding" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
index ddb602250c..951380f125 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-dfp.c
@@ -2,7 +2,7 @@
/* { dg-do compile */
/* { dg-require-effective-target dfp } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler "0x10.*DW_AT_encoding" } } */
/* { dg-final { scan-assembler "0x4.*DW_AT_byte_size" } } */
/* { dg-final { scan-assembler "0x8.*DW_AT_byte_size" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
index fdfbf83215..9ca84e757b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die1.c
@@ -1,6 +1,6 @@
/* Verify that inline function never actually inlined has no abstract DIE. */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
inline int t()
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c
index ac897ab78c..746ab031b8 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die2.c
@@ -1,6 +1,6 @@
/* Verify that inline function never actually emit has no DIE. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler-not "CIE Version" } } */
static inline int t()
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
index 04b2f36c3b..2b071fc9ed 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die3.c
@@ -1,6 +1,6 @@
/* Verify that extern inline function never actually inlined has no abstract DIE. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
extern inline int t()
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c
index 3fefd41ef9..68985b71fa 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die5.c
@@ -1,6 +1,6 @@
/* Inlined inline function must have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler "3.*DW_AT_inline" } } */
#1 "test.h"
inline int t()
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
index d8f477f54e..ff0d6798df 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die6.c
@@ -1,6 +1,6 @@
/* not inline inline function must not have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-inline -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -fno-inline -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler-not "DW_AT_inline" } } */
#1 "test.h"
inline int t()
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
index b747076bac..88d78e2335 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-die7.c
@@ -1,6 +1,6 @@
/* Inlined non-inline function must have abstract DIE */
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA -fpreprocessed" } */
+/* { dg-options "-O2 -gdwarf -dA -fpreprocessed" } */
/* { dg-final { scan-assembler "1.*DW_AT_inline" } } */
#1 "test.h"
void f(void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
index c68dfe436e..b75395557b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-file1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "File Entry:|.file" } } */
/* Verify that a file entry is output for this file. Only systems that
do not define HAVE_AS_DWARF2_DEBUG_LINE will put out "File Entry:",
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
index 84d605fcd0..a028d1484a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-float.c
@@ -1,7 +1,7 @@
/* Verify the DWARF encoding of C99 floating point types. */
/* { dg-do compile */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
/* { dg-final { scan-assembler "0x4.*DW_AT_encoding" } } */
/* { dg-final { scan-assembler "0x4.*DW_AT_byte_size" } } */
/* { dg-final { scan-assembler "0x8.*DW_AT_byte_size" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
index 767d38b173..15e09b116c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-merge.c
@@ -1,7 +1,7 @@
/* Verify that mergeable strings are used in the CU DIE. */
/* { dg-do compile } */
/* { dg-require-effective-target string_merging } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "DW_AT_producer: \"GNU C" } } */
/* { dg-final { scan-assembler-not "GNU C\[^\\n\\r\]*DW_AT_producer" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
index 7bcebe355e..d871bab0c2 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf-uninit.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "DW_TAG_variable" } } */
/* PR debug/21828 */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c
index 4efb25e8c2..fd61296b2f 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro.c
@@ -1,6 +1,6 @@
/* Test to make sure the mcaro info includes a start file command for the main source */
/* { dg-do compile } */
-/* { dg-options "-g3 -gdwarf-2 -dA -fverbose-asm" } */
+/* { dg-options "-g3 -gdwarf -dA -fverbose-asm" } */
/* { dg-final { scan-assembler "Start new file" } } */
#define ADD(x) (M + x)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
new file mode 100644
index 0000000000..3dfa2908ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2-macro2.c
@@ -0,0 +1,7 @@
+/* Test to make sure the macro info includes the predefined macros with line number 0. */
+/* { dg-do compile } */
+/* { dg-options "-g3 -gdwarf -dA -fverbose-asm" } */
+/* { dg-final { scan-assembler "At line number 0" } } */
+
+#define FOO 1
+int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
index dfc387dbe8..a8ba0f48ef 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/dwarf2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@ load_lib gcc-dg.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
- set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf-2"
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors -gdwarf"
}
# Initialize `dg'.
@@ -31,7 +31,7 @@ dg-init
# Main loop.
set comp_output [gcc_target_compile \
"$srcdir/$subdir/../trivial.c" "trivial.S" assembly \
- "additional_flags=-gdwarf-2"]
+ "additional_flags=-gdwarf"]
if { ! [string match "*: target system does not support the * debug format*" \
$comp_output] } {
remove-build-file "trivial.S"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
index fc510903c2..810788ae6e 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-any.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=any" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=any" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
index a32abb5a2e..aefcb87150 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-baseonly.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-baseonly" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-baseonly" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
index bd218f8261..193c05d615 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-none.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=none" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=none" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler-not "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
index ac599f43fb..ebbfc36672 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-reduced.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-reduced" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-reduced" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
index 3a5c0bf146..ad0a44a95b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/fesd-sys.c
@@ -1,5 +1,5 @@
// { dg-do compile }
-// { dg-options "-gdwarf-2 -dA -femit-struct-debug-detailed=sys" }
+// { dg-options "-gdwarf -dA -femit-struct-debug-detailed=sys" }
// { dg-final { scan-assembler "timespec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_sec.*DW_AT_name" } }
// { dg-final { scan-assembler "tv_nsec.*DW_AT_name" } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
index 54fa58ae3f..431b429dea 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/global-used-types.c
@@ -1,6 +1,6 @@
/*
Contributed by Dodji Seketeli <dodji@redhat.com>
- { dg-options "-g -dA -fno-merge-debug-strings" }
+ { dg-options "-gdwarf -dA -fno-merge-debug-strings" }
{ dg-do compile }
{ dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumeration_type" 1 } }
{ dg-final { scan-assembler-times "DIE \\(0x\[^\n\]*\\) DW_TAG_enumerator" 2 } }
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
index 11c8fad784..bd7f7b986b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
void e(int);
__attribute__ ((always_inline)) inline int
t(int function_parameter)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
index 20edb588ea..b1947699e7 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline2.c
@@ -14,7 +14,7 @@
properly nested DW_TAG_inlined_subroutine DIEs for third, second and first.
*/
-/* { dg-options "-O -g3 -dA" } */
+/* { dg-options "-O -g3 -gdwarf -dA" } */
/* { dg-do compile } */
/* There are 6 inlined subroutines:
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
index feafb33e82..baa2f66e8a 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/inline3.c
@@ -1,7 +1,7 @@
/* Verify that only one DW_AT_const_value is emitted for baz,
not for baz abstract DIE and again inside of
DW_TAG_inlined_subroutine. */
-/* { dg-options "-O2 -g -dA" } */
+/* { dg-options "-O2 -gdwarf -dA -fmerge-all-constants" } */
/* { dg-do compile } */
/* { dg-final { scan-assembler-times " DW_AT_const_value" 1 } } */
@@ -11,6 +11,9 @@ static inline long
foo (void)
{
const struct A baz = { .i = 2, .j = 21 };
+ /* We must make sure that baz isn't optimized away before inlining,
+ otherwise its initializer is also lost. */
+ const struct A *p = &baz;
asm volatile ("" : : : "memory");
return baz.i * baz.j;
}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
index 7442dab19f..395c544185 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/ipa-cp1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
void q(int p);
static void
t(int constant_propagated_par)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c b/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c
new file mode 100644
index 0000000000..d7b03192be
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/omp-fesdr.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target fopenmp } */
+/* { dg-options "-g -fopenmp -gdwarf-2 -femit-struct-debug-reduced" } */
+
+struct aa
+{
+ int a;
+};
+
+int
+f7 (void)
+{
+ int v7i = 6, v7j = 7, v7k = 9, v7l = 0, v7n = 0, v7o = 1;
+
+ #pragma omp parallel
+ {
+ #pragma omp master
+ v7o++;
+ #pragma omp for private (v7i) firstprivate (v7k) reduction (+:v7l)
+ for (v7n = 0; v7n < 3; v7n++)
+ {
+ int v7m = v7j + v7k;
+ v7i = 8;
+ v7l++;
+ }
+ }
+
+ return v7i + v7j + v7k + v7l + v7n;
+}
+
+int
+main (void)
+{
+ f7 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
index 5476aac0af..e818263a51 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-1.c
@@ -1,7 +1,7 @@
/* PR debug/29609 */
/* Verify that breakpoint on the break is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
void abort (void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
index 43bc54524a..463d3cc588 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr29609-2.c
@@ -1,7 +1,7 @@
/* PR debug/29609 */
/* Verify that breakpoint on both goto failure; stmts is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
extern void abort (void);
int x;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
index ce26ec639c..36d55bf30f 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr31230.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-gdwarf-2 -dA --param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
+/* { dg-options "-gdwarf -dA --param ggc-min-expand=0 --param ggc-min-heapsize=0" } */
/* { dg-final { scan-assembler-times "DIE.*DW_TAG_array_type" 1 } } */
/* { dg-final { scan-assembler-times "DIE.*DW_TAG_subrange_type" 1 } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
index de90acb81b..d84ce26cae 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-1.c
@@ -1,7 +1,7 @@
/* PR debug/36690 */
/* Verify that break func is hit. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int i;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
index 2330f53858..0927e7465b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-2.c
@@ -3,7 +3,7 @@
varz at that spot is defined and contains 5. Nowhere else
in the function should be varz in the scope. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int cnt;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
index 234ad1263b..bc492f2c14 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr36690-3.c
@@ -1,6 +1,6 @@
/* PR debug/36690 */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
int cnt;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
index badff447a8..016dbc9480 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37616.c
@@ -2,7 +2,7 @@
/* Test that one can put breakpoints onto continue, exitlab and break
and actually see program reaching those breakpoints. */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
index 60fb839616..622fbcf640 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr37726.c
@@ -1,6 +1,6 @@
/* PR debug/37726 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
int foo (int parm)
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
index 452c0f6808..4e856ec094 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-1.c
@@ -2,7 +2,7 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(a,b)
int varh;A(1,
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
index d2ee408ac9..e416b0f90b 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-2.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-1.c"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
index 2a74dc5e3d..46f57e6708 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-3.c
@@ -2,7 +2,7 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(a,b)
int varh;/*
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
index 8aa92de5dd..409f79f850 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-4.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-3.c"
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
index 03af604a7c..de5a1cc13d 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-5.c
@@ -2,13 +2,16 @@
/* Test that token after multi-line function-like macro use
gets correct locus even when preprocessing separately. */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#define A(x) vari x
#define vari(x)
#define B , varj
int A(B) ;
-/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0x)?7\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
+/* We want to check that both vari and varj have the same line
+ number. */
+
+/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"varj\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
index 8aa37d1c1a..340cb38353 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41445-6.c
@@ -1,8 +1,11 @@
/* PR preprocessor/41445 */
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include "pr41445-5.c"
-/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0x)?7\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
+/* We want to check that both vari and varj have the same line
+ number. */
+
+/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"vari\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)?\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
/* { dg-final { scan-assembler "DW_TAG_variable\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\"varj\[^\\r\\n\]*DW_AT_name(\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*DW_AT_)*\[^\\r\\n\]*\[\\r\\n\]+\[^\\r\\n\]*\[^0-9a-fA-FxX](0xa|10)\[^0-9a-fA-FxX]\[^\\r\\n\]*DW_AT_decl_line" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
index 02683960bd..872ed7da61 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41543.c
@@ -1,6 +1,6 @@
/* PR preprocessor/41543 */
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-save-temps -gdwarf -O0 -dA -fno-merge-debug-strings" } */
#include <stdarg.h>
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
index d61b5a293f..90ae5cd888 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr41695.c
@@ -1,6 +1,6 @@
/* PR debug/41695 */
/* { dg-do compile } */
-/* { dg-options "-g -O2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O2 -dA -fno-merge-debug-strings" } */
int bar (int);
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
index 21262c3b21..8db2543927 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr43237.c
@@ -1,6 +1,6 @@
/* PR debug/43237 */
/* { dg-do compile } */
-/* { dg-options "-g -O2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O2 -dA -fno-merge-debug-strings" } */
struct S
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
index 2e4c3cda86..a859ac91a5 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef struct _Harry { int dummy; } Harry_t;
Harry_t harry;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
index 13856d7aa0..dfbfa2fed1 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef const struct _Harry { int dummy; } Harry_t;
Harry_t harry;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
index f1e463e45d..c8039ef6d4 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef struct _Harry { int dummy; } Harry_t;
const Harry_t harry[5];
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
index cf0a2af6ce..bd2351bd90 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr47939-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-save-temps -g -dA" } */
+/* { dg-options "-save-temps -gdwarf -dA" } */
typedef const struct _Harry { int dummy; } Harry_t;
Harry_t harry[10];
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
index 957c152b4a..62b389ee93 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr51410.c
@@ -1,6 +1,6 @@
/* PR debug/51410 */
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-O0 -gdwarf -dA -fno-merge-debug-strings" } */
int x;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
new file mode 100644
index 0000000000..0ec3e84d70
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/pr53948.c
@@ -0,0 +1,10 @@
+/* Test that we have line information for the line
+ with local variable initializations. */
+/* { dg-options "-O0 -gdwarf -dA" } */
+/* { dg-final { scan-assembler ".loc 1 8 0|\[#/!\]\[ \t\]+line 8" } } */
+
+
+int f (register int a, register int b) {
+ register int x = b, y = a;
+ return x + y; }
+
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
index 7e745ff19d..4fa199c0c1 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/short-circuit.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -gdwarf-2 -dA" } */
+/* { dg-options "-O0 -gdwarf -dA" } */
#define True 1
#define False 0
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
index b9b5d0b374..bdc118ddce 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/static1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -gdwarf-2" } */
+/* { dg-options "-O2 -gdwarf" } */
void
main(void)
{
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
index 216a498e1a..bf893ee865 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/struct-loc1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-g -O0 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -O0 -dA -fno-merge-debug-strings" } */
struct foo;
struct foo *obj;
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
index 04dd129769..297d244e2c 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/var1.c
@@ -1,6 +1,6 @@
/* PR 23190 */
/* { dg-do compile }
-/* { dg-options "-gdwarf-2 -dA -fno-merge-debug-strings" } */
+/* { dg-options "-gdwarf -dA -fno-merge-debug-strings" } */
/* { dg-final { scan-assembler "xyzzy\[^\\n\\r\]+DW_AT_name" } } */
void f(void)
diff --git a/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c b/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
index 8ef2a74388..72aef41809 100644
--- a/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
+++ b/gcc/testsuite/gcc.dg/debug/dwarf2/var2.c
@@ -1,6 +1,6 @@
/* PR 23190 */
/* { dg-do compile }
-/* { dg-options "-O2 -gdwarf-2 -dA" } */
+/* { dg-options "-O2 -gdwarf -dA" } */
/* { dg-final { scan-assembler "DW_OP_addr\[\\n\\r\]+\[^\\n\\r\]+foo" } } */
/* { dg-final { scan-assembler "DW_OP_addr\[\\n\\r\]+\[^\\n\\r\]+bar" } } */
diff --git a/gcc/testsuite/gcc.dg/debug/pr49032.c b/gcc/testsuite/gcc.dg/debug/pr49032.c
index 9074c75645..3985040d71 100644
--- a/gcc/testsuite/gcc.dg/debug/pr49032.c
+++ b/gcc/testsuite/gcc.dg/debug/pr49032.c
@@ -1,7 +1,5 @@
/* PR debug/49032 */
/* { dg-do link } */
-/* Prune mips-tfile warning on alpha*-dec-osf* with -gcoff* -O*. */
-/* { dg-prune-output "warning, s not found in .*symbol tables" } */
static int s = 42;
diff --git a/gcc/testsuite/gcc.dg/debug/pr55730.c b/gcc/testsuite/gcc.dg/debug/pr55730.c
new file mode 100644
index 0000000000..073d83d759
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr55730.c
@@ -0,0 +1,24 @@
+/* PR debug/55730 */
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+union U
+{
+ float f;
+ int i;
+};
+
+void
+foo (unsigned short *x, unsigned char y)
+{
+ unsigned char g;
+ union U u;
+ if (u.i < 0)
+ g = 0;
+ else
+ {
+ u.f = u.f * (255.0F / 256.0F) + 32768.0F;
+ g = (unsigned char) u.i;
+ }
+ *x = (g << 8) | y;
+}
diff --git a/gcc/testsuite/gcc.dg/debug/pr57351.c b/gcc/testsuite/gcc.dg/debug/pr57351.c
new file mode 100644
index 0000000000..972f3e9ebe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/debug/pr57351.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-options "-std=c99 -Os -g -march=armv7-a" } */
+/* { dg-add-options arm_neon } */
+
+typedef unsigned int size_t;
+typedef int ptrdiff_t;
+typedef signed char int8_t ;
+typedef signed long long int64_t;
+typedef int8_t GFC_INTEGER_1;
+typedef GFC_INTEGER_1 GFC_LOGICAL_1;
+typedef int64_t GFC_INTEGER_8;
+typedef GFC_INTEGER_8 GFC_LOGICAL_8;
+typedef ptrdiff_t index_type;
+typedef struct descriptor_dimension
+{
+ index_type lower_bound;
+ index_type _ubound;
+}
+descriptor_dimension;
+typedef struct { GFC_LOGICAL_1 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l1;
+typedef struct { GFC_LOGICAL_8 *base_addr; size_t offset; index_type dtype; descriptor_dimension dim[7];} gfc_array_l8;
+void
+all_l8 (gfc_array_l8 * const restrict retarray,
+ gfc_array_l1 * const restrict array,
+ const index_type * const restrict pdim)
+{
+ GFC_LOGICAL_8 * restrict dest;
+ index_type n;
+ index_type len;
+ index_type delta;
+ index_type dim;
+ dim = (*pdim) - 1;
+ len = ((array)->dim[dim]._ubound + 1 - (array)->dim[dim].lower_bound);
+ for (n = 0; n < dim; n++)
+ {
+ const GFC_LOGICAL_1 * restrict src;
+ GFC_LOGICAL_8 result;
+ {
+ result = 1;
+ {
+ for (n = 0; n < len; n++, src += delta)
+ {
+ if (! *src)
+ {
+ result = 0;
+ break;
+ }
+ }
+ *dest = result;
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/decl-1.c b/gcc/testsuite/gcc.dg/decl-1.c
index bfbc9fb532..348bb92eb8 100644
--- a/gcc/testsuite/gcc.dg/decl-1.c
+++ b/gcc/testsuite/gcc.dg/decl-1.c
@@ -3,7 +3,7 @@
Source: Neil Booth, 12 Feb 2002.
In the declaration of proc, x must be parsed as a typedef name (C99
- 6.7.5.3 p11. Also see C89 DR #009, which was erroneously ommitted
+ 6.7.5.3 p11. Also see C89 DR #009, which was erroneously omitted
from C99, and resubmitted as DR #249: if in a parameter
declaration, an identifier can be read as a typedef name or a
paramter name, it is read as a typedef name). */
diff --git a/gcc/testsuite/gcc.dg/decl-10.c b/gcc/testsuite/gcc.dg/decl-10.c
new file mode 100644
index 0000000000..ec4259bfd5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/decl-10.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+void
+f4(const foo x) /* { dg-error "10:unknown type name" } */
+{}
+
+void
+f5(foo x, int i) /* { dg-error "4:unknown type name" } */
+{}
+
+void
+f6(char c, foo x, ...) /* { dg-error "12:unknown type name" } */
+{}
diff --git a/gcc/testsuite/gcc.dg/delay-slot-1.c b/gcc/testsuite/gcc.dg/delay-slot-1.c
index f3bcd8ec75..bfc0273e4f 100644
--- a/gcc/testsuite/gcc.dg/delay-slot-1.c
+++ b/gcc/testsuite/gcc.dg/delay-slot-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-options "-O2 -mabi=64" { target mips-*-linux-* } } */
+/* { dg-options "-O2 -mabi=64" { target { mips*-*-linux* && mips64 } } } */
struct offset_v1 {
int k_uniqueness;
diff --git a/gcc/testsuite/gcc.dg/dfp/composite-type.c b/gcc/testsuite/gcc.dg/dfp/composite-type.c
index 69ecb1421c..6bf35f5c94 100644
--- a/gcc/testsuite/gcc.dg/dfp/composite-type.c
+++ b/gcc/testsuite/gcc.dg/dfp/composite-type.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -Wall" } */
+/* { dg-options "-O -Wall -ftrack-macro-expansion=0" } */
/* C99 6.2.7: Compatible type and composite type. */
diff --git a/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c b/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c
index d288ac70c8..6727e800c3 100644
--- a/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c
+++ b/gcc/testsuite/gcc.dg/dfp/convert-dfp-round-thread.c
@@ -1,5 +1,5 @@
/* { dg-options "-std=gnu99 -D_GNU_SOURCE -pthread" } */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* N1150 5.2: Conversions among decimal floating types and between
decimal floating types and generic floating types.
diff --git a/gcc/testsuite/gcc.dg/dfp/dfp.exp b/gcc/testsuite/gcc.dg/dfp/dfp.exp
index 73edb7fc13..f96f1debd4 100644
--- a/gcc/testsuite/gcc.dg/dfp/dfp.exp
+++ b/gcc/testsuite/gcc.dg/dfp/dfp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/dfp/pr35739.c b/gcc/testsuite/gcc.dg/dfp/pr35739.c
deleted file mode 100644
index d4e1839026..0000000000
--- a/gcc/testsuite/gcc.dg/dfp/pr35739.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* PR c/35739 */
-/* { dg-do compile { target *-*-linux* } } */
-/* { dg-options "-O -fpreprocessed -fmudflap" } */
-
-_Decimal128
-foo (int n, ...)
-{
- int i;
- _Decimal128 j = 0;
- __builtin_va_list ap;
- __builtin_va_start (ap, n);
- for (i = 0; i < n; i++)
- j += __builtin_va_arg (ap, _Decimal128);
- __builtin_va_end (ap);
- return j;
-}
diff --git a/gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c b/gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c
index 2b50fe6a56..4eff007259 100644
--- a/gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c
+++ b/gcc/testsuite/gcc.dg/dfp/wtr-conversion-1.c
@@ -24,7 +24,7 @@ testfunc1 ()
{
foo_i (i);
foo_i (d32); /* { dg-warning "as integer rather than floating" "prototype conversion warning" } */
- foo_i (d64); /* { dg-warning "as integer rather than floating" "prototype convDersion warning" } */
+ foo_i (d64); /* { dg-warning "as integer rather than floating" "prototype conversion warning" } */
foo_i (d128); /* { dg-warning "as integer rather than floating" "prototype conversion warning" } */
foo_d32 (i); /* { dg-warning "as floating rather than integer" "prototype conversion warning" } */
foo_d32 (f); /* { dg-warning "as '_Decimal32' rather than 'float'" "prototype conversion warning" } */
diff --git a/gcc/testsuite/gcc.dg/dg.exp b/gcc/testsuite/gcc.dg/dg.exp
index 3f71178f98..7a56bdd29a 100644
--- a/gcc/testsuite/gcc.dg/dg.exp
+++ b/gcc/testsuite/gcc.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/di-sync-multithread.c b/gcc/testsuite/gcc.dg/di-sync-multithread.c
index c786ff1df5..493f1e2720 100644
--- a/gcc/testsuite/gcc.dg/di-sync-multithread.c
+++ b/gcc/testsuite/gcc.dg/di-sync-multithread.c
@@ -66,8 +66,8 @@ worker (void* data)
/* OK, lets try and do some stuff to the workspace - by the end
of the main loop our area should be the same as it is now - i.e. 0. */
- /* Push the arithmetic section upto 128 - one of the threads will
- case this to carry accross the 32bit boundary. */
+ /* Push the arithmetic section up to 128 - one of the threads will
+ case this to carry across the 32bit boundary. */
for (tmp2 = 0; tmp2 < 64; tmp2++)
{
/* Add 2 using the two different adds. */
diff --git a/gcc/testsuite/gcc.dg/dump-ada-spec-1.c b/gcc/testsuite/gcc.dg/dump-ada-spec-1.c
new file mode 100644
index 0000000000..eb249e7985
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/dump-ada-spec-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-ada-spec" } */
+
+struct S
+{
+ int i;
+};
+
+/* { dg-final { scan-ada-spec "type S is record" } } */
+/* { dg-final { cleanup-ada-spec } } */
diff --git a/gcc/testsuite/gcc.dg/fdata-sections-1.c b/gcc/testsuite/gcc.dg/fdata-sections-1.c
index d2b2b58073..51686b9217 100644
--- a/gcc/testsuite/gcc.dg/fdata-sections-1.c
+++ b/gcc/testsuite/gcc.dg/fdata-sections-1.c
@@ -1,7 +1,7 @@
/* PR middle-end/15486 */
/* Origin: Jonathan Larmour <jifl-bugzilla@jifvik.org> */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-fdata-sections" } */
int x;
diff --git a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
index 5ae11981e2..026bdaf564 100644
--- a/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
+++ b/gcc/testsuite/gcc.dg/fixed-point/composite-type.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-std=gnu99 -O -Wall -Wno-unused" } */
+/* { dg-options "-std=gnu99 -O -Wall -Wno-unused -ftrack-macro-expansion=0" } */
/* C99 6.2.7: Compatible type and composite type. */
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-1.c b/gcc/testsuite/gcc.dg/fixed-point/convert-1.c
new file mode 100644
index 0000000000..04adea88bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV (short _Fract, hr);
+ ALL_CONV (_Fract, r);
+ ALL_CONV (long _Fract, lr);
+ ALL_CONV (long long _Fract, llr);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-2.c b/gcc/testsuite/gcc.dg/fixed-point/convert-2.c
new file mode 100644
index 0000000000..fc5bc1fcbb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV (unsigned short _Fract, uhr);
+ ALL_CONV (unsigned _Fract, ur);
+ ALL_CONV (unsigned long _Fract, ulr);
+ ALL_CONV (unsigned long long _Fract, ullr);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-3.c b/gcc/testsuite/gcc.dg/fixed-point/convert-3.c
new file mode 100644
index 0000000000..753c472a84
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-3.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV (short _Accum, hk);
+ ALL_CONV (_Accum, k);
+ ALL_CONV (long _Accum, lk);
+ ALL_CONV (long long _Accum, llk);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-4.c b/gcc/testsuite/gcc.dg/fixed-point/convert-4.c
new file mode 100644
index 0000000000..17c4e66ebb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-4.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV (unsigned short _Accum, uhk);
+ ALL_CONV (unsigned _Accum, uk);
+ ALL_CONV (unsigned long _Accum, ulk);
+ ALL_CONV (unsigned long long _Accum, ullk);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c b/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c
new file mode 100644
index 0000000000..af95610429
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-accum-neg.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_ACCUM_CONV (short _Accum, hk);
+ ALL_ACCUM_CONV (_Accum, k);
+ ALL_ACCUM_CONV (long _Accum, lk);
+ ALL_ACCUM_CONV (long long _Accum, llk);
+ ALL_ACCUM_CONV (unsigned short _Accum, uhk);
+ ALL_ACCUM_CONV (unsigned _Accum, uk);
+ ALL_ACCUM_CONV (unsigned long _Accum, ulk);
+ ALL_ACCUM_CONV (unsigned long long _Accum, ullk);
+
+ NEG_CONV (short _Fract, hr);
+ NEG_CONV (_Fract, r);
+ NEG_CONV (long _Fract, lr);
+ NEG_CONV (long long _Fract, llr);
+ NEG_CONV (short _Accum, hk);
+ NEG_CONV (_Accum, k);
+ NEG_CONV (long _Accum, lk);
+ NEG_CONV (long long _Accum, llk);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-float-1.c b/gcc/testsuite/gcc.dg/fixed-point/convert-float-1.c
new file mode 100644
index 0000000000..b36adab570
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-float-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV_FLOAT (short _Fract, hr);
+ ALL_CONV_FLOAT (_Fract, r);
+ ALL_CONV_FLOAT (long _Fract, lr);
+ ALL_CONV_FLOAT (long long _Fract, llr);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-float-2.c b/gcc/testsuite/gcc.dg/fixed-point/convert-float-2.c
new file mode 100644
index 0000000000..2a3f3e95a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-float-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV_FLOAT (unsigned short _Fract, uhr);
+ ALL_CONV_FLOAT (unsigned _Fract, ur);
+ ALL_CONV_FLOAT (unsigned long _Fract, ulr);
+ ALL_CONV_FLOAT (unsigned long long _Fract, ullr);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-float-3.c b/gcc/testsuite/gcc.dg/fixed-point/convert-float-3.c
new file mode 100644
index 0000000000..9cad010912
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-float-3.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV_FLOAT (short _Accum, hk);
+ ALL_CONV_FLOAT (_Accum, k);
+ ALL_CONV_FLOAT (long _Accum, lk);
+ ALL_CONV_FLOAT (long long _Accum, llk);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-float-4.c b/gcc/testsuite/gcc.dg/fixed-point/convert-float-4.c
new file mode 100644
index 0000000000..c25a55c071
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-float-4.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ ALL_CONV_FLOAT (unsigned short _Accum, uhk);
+ ALL_CONV_FLOAT (unsigned _Accum, uk);
+ ALL_CONV_FLOAT (unsigned long _Accum, ulk);
+ ALL_CONV_FLOAT (unsigned long long _Accum, ullk);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert-sat.c b/gcc/testsuite/gcc.dg/fixed-point/convert-sat.c
new file mode 100644
index 0000000000..278aa173b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert-sat.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O0" } */
+
+/* C99 6.3 Conversions.
+
+ Check conversions involving fixed-point. */
+
+extern void abort (void);
+
+#include "convert.h"
+
+int main ()
+{
+ SAT_CONV1 (short _Accum, hk);
+ SAT_CONV1 (_Accum, k);
+ SAT_CONV1 (long _Accum, lk);
+ SAT_CONV1 (long long _Accum, llk);
+
+ SAT_CONV2 (unsigned short _Accum, uhk);
+ SAT_CONV2 (unsigned _Accum, uk);
+ SAT_CONV2 (unsigned long _Accum, ulk);
+ SAT_CONV2 (unsigned long long _Accum, ullk);
+
+ SAT_CONV3 (short _Fract, hr);
+ SAT_CONV3 (_Fract, r);
+ SAT_CONV3 (long _Fract, lr);
+ SAT_CONV3 (long long _Fract, llr);
+
+ SAT_CONV4 (signed char);
+ SAT_CONV4 (short);
+ SAT_CONV4 (int);
+ SAT_CONV4 (long);
+ SAT_CONV4 (long long);
+
+ SAT_CONV5 (unsigned char);
+ SAT_CONV5 (unsigned short);
+ SAT_CONV5 (unsigned int);
+ SAT_CONV5 (unsigned long);
+ SAT_CONV5 (unsigned long long);
+
+ SAT_CONV6 (float);
+ SAT_CONV6 (double);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert.c b/gcc/testsuite/gcc.dg/fixed-point/convert.c
deleted file mode 100644
index f4e373f2d6..0000000000
--- a/gcc/testsuite/gcc.dg/fixed-point/convert.c
+++ /dev/null
@@ -1,432 +0,0 @@
-/* { dg-do run } */
-/* { dg-options "-std=gnu99 -O0" } */
-
-/* C99 6.3 Conversions.
-
- Check conversions involving fixed-point. */
-
-extern void abort (void);
-
-/* Fixed-point to fixed-point. */
-#define CONV(TYPE1,POSTFIX1,TYPE2,POSTFIX2) \
- { \
- TYPE1 a = 0.5 ## POSTFIX1; \
- TYPE2 b = a; \
- if (b != 0.5 ## POSTFIX2) \
- abort(); \
- }
-
-/* TYPE1 with VALUE1 to TYPE2 with VALUE2. */
-#define CONV2(TYPE1,VALUE1,TYPE2,VALUE2) \
- { \
- TYPE1 a = VALUE1; \
- TYPE2 b = a; \
- if (b != VALUE2) \
- abort(); \
- }
-
-/* Fixed-point to integer, and integer to fixed-point. */
-#define CONV_INT(TYPE1,POSTFIX1,TYPE2) \
- { \
- TYPE1 a = 0.5 ## POSTFIX1; \
- TYPE2 b = a; \
- TYPE2 c = 0; \
- TYPE1 d = c; \
- if (b != 0) \
- abort(); \
- if (d != 0.0 ## POSTFIX1) \
- abort(); \
- }
-
-/* Signed fixed-point to integer. */
-#define CONV_INT2(TYPE1,POSTFIX1,TYPE2) \
- { \
- TYPE1 a = -0.5 ## POSTFIX1; \
- TYPE2 b = a; \
- if (b != 0) \
- abort(); \
- a = -0.0 ## POSTFIX1; \
- b = a; \
- if (b != 0) \
- abort(); \
- a = +0.0 ## POSTFIX1; \
- b = a; \
- if (b != 0) \
- abort(); \
- a = +0.1 ## POSTFIX1; \
- b = a; \
- if (b != 0) \
- abort(); \
- a = -0.1 ## POSTFIX1; \
- b = a; \
- if (b != 0) \
- abort(); \
- }
-
-/* Signed fixed-point to signed integer. */
-#define CONV_INT3(TYPE1,POSTFIX1,TYPE2) \
- { \
- TYPE1 a = -0.5 ## POSTFIX1 - 0.5 ## POSTFIX1; \
- TYPE2 b = a; \
- if (b != -1) \
- abort(); \
- }
-
-/* Fixed-point to floating-point, and floating-point to fixed-point. */
-#define CONV_FLOAT(TYPE1,POSTFIX1,TYPE2) \
- { \
- TYPE1 a = 0.5 ## POSTFIX1; \
- TYPE2 b = a; \
- TYPE2 c = 0.25; \
- TYPE1 d = c; \
- if (b != 0.5) \
- abort(); \
- if (d != 0.25 ## POSTFIX1) \
- abort(); \
- }
-
-/* Accum to integer, and integer to accum. */
-#define CONV_ACCUM_INT(TYPE1,POSTFIX1,TYPE2) \
- { \
- TYPE1 a = 99.12345 ## POSTFIX1; \
- TYPE2 b = a; \
- TYPE2 c = 123; \
- TYPE1 d = c; \
- if (b != 99) \
- abort(); \
- if (d != 123.0 ## POSTFIX1) \
- abort(); \
- }
-
-#define ALL_CONV(TYPE,POSTFIX) \
- CONV(TYPE, POSTFIX, short _Fract, hr) \
- CONV(TYPE, POSTFIX, _Fract, r) \
- CONV(TYPE, POSTFIX, long _Fract, lr) \
- CONV(TYPE, POSTFIX, long long _Fract, llr) \
- CONV(TYPE, POSTFIX, unsigned short _Fract, uhr) \
- CONV(TYPE, POSTFIX, unsigned _Fract, ur) \
- CONV(TYPE, POSTFIX, unsigned long _Fract, ulr) \
- CONV(TYPE, POSTFIX, unsigned long long _Fract, ullr) \
- CONV(TYPE, POSTFIX, short _Accum, hk) \
- CONV(TYPE, POSTFIX, _Accum, k) \
- CONV(TYPE, POSTFIX, long _Accum, lk) \
- CONV(TYPE, POSTFIX, long long _Accum, llk) \
- CONV(TYPE, POSTFIX, unsigned short _Accum, uhk) \
- CONV(TYPE, POSTFIX, unsigned _Accum, uk) \
- CONV(TYPE, POSTFIX, unsigned long _Accum, ulk) \
- CONV(TYPE, POSTFIX, unsigned long long _Accum, ullk) \
- CONV(_Sat TYPE, POSTFIX, short _Fract, hr) \
- CONV(_Sat TYPE, POSTFIX, _Fract, r) \
- CONV(_Sat TYPE, POSTFIX, long _Fract, lr) \
- CONV(_Sat TYPE, POSTFIX, long long _Fract, llr) \
- CONV(_Sat TYPE, POSTFIX, unsigned short _Fract, uhr) \
- CONV(_Sat TYPE, POSTFIX, unsigned _Fract, ur) \
- CONV(_Sat TYPE, POSTFIX, unsigned long _Fract, ulr) \
- CONV(_Sat TYPE, POSTFIX, unsigned long long _Fract, ullr) \
- CONV(_Sat TYPE, POSTFIX, short _Accum, hk) \
- CONV(_Sat TYPE, POSTFIX, _Accum, k) \
- CONV(_Sat TYPE, POSTFIX, long _Accum, lk) \
- CONV(_Sat TYPE, POSTFIX, long long _Accum, llk) \
- CONV(_Sat TYPE, POSTFIX, unsigned short _Accum, uhk) \
- CONV(_Sat TYPE, POSTFIX, unsigned _Accum, uk) \
- CONV(_Sat TYPE, POSTFIX, unsigned long _Accum, ulk) \
- CONV(_Sat TYPE, POSTFIX, unsigned long long _Accum, ullk) \
- CONV(TYPE, POSTFIX, _Sat short _Fract, hr) \
- CONV(TYPE, POSTFIX, _Sat _Fract, r) \
- CONV(TYPE, POSTFIX, _Sat long _Fract, lr) \
- CONV(TYPE, POSTFIX, _Sat long long _Fract, llr) \
- CONV(TYPE, POSTFIX, _Sat unsigned short _Fract, uhr) \
- CONV(TYPE, POSTFIX, _Sat unsigned _Fract, ur) \
- CONV(TYPE, POSTFIX, _Sat unsigned long _Fract, ulr) \
- CONV(TYPE, POSTFIX, _Sat unsigned long long _Fract, ullr) \
- CONV(TYPE, POSTFIX, _Sat short _Accum, hk) \
- CONV(TYPE, POSTFIX, _Sat _Accum, k) \
- CONV(TYPE, POSTFIX, _Sat long _Accum, lk) \
- CONV(TYPE, POSTFIX, _Sat long long _Accum, llk) \
- CONV(TYPE, POSTFIX, _Sat unsigned short _Accum, uhk) \
- CONV(TYPE, POSTFIX, _Sat unsigned _Accum, uk) \
- CONV(TYPE, POSTFIX, _Sat unsigned long _Accum, ulk) \
- CONV(TYPE, POSTFIX, _Sat unsigned long long _Accum, ullk) \
- CONV_INT(TYPE, POSTFIX, signed char) \
- CONV_INT(TYPE, POSTFIX, short) \
- CONV_INT(TYPE, POSTFIX, int) \
- CONV_INT(TYPE, POSTFIX, long) \
- CONV_INT(TYPE, POSTFIX, long long) \
- CONV_INT(TYPE, POSTFIX, unsigned char) \
- CONV_INT(TYPE, POSTFIX, unsigned short) \
- CONV_INT(TYPE, POSTFIX, unsigned int) \
- CONV_INT(TYPE, POSTFIX, unsigned long) \
- CONV_INT(TYPE, POSTFIX, unsigned long long) \
- CONV_INT(_Sat TYPE, POSTFIX, signed char) \
- CONV_INT(_Sat TYPE, POSTFIX, short) \
- CONV_INT(_Sat TYPE, POSTFIX, int) \
- CONV_INT(_Sat TYPE, POSTFIX, long) \
- CONV_INT(_Sat TYPE, POSTFIX, long long) \
- CONV_INT(_Sat TYPE, POSTFIX, unsigned char) \
- CONV_INT(_Sat TYPE, POSTFIX, unsigned short) \
- CONV_INT(_Sat TYPE, POSTFIX, unsigned int) \
- CONV_INT(_Sat TYPE, POSTFIX, unsigned long) \
- CONV_INT(_Sat TYPE, POSTFIX, unsigned long long) \
- CONV_FLOAT(TYPE, POSTFIX, float) \
- CONV_FLOAT(TYPE, POSTFIX, double) \
- CONV_FLOAT(_Sat TYPE, POSTFIX, float) \
- CONV_FLOAT(_Sat TYPE, POSTFIX, double)
-
-#define ALL_ACCUM_CONV(TYPE,POSTFIX) \
- CONV_ACCUM_INT(TYPE, POSTFIX, signed char) \
- CONV_ACCUM_INT(TYPE, POSTFIX, short) \
- CONV_ACCUM_INT(TYPE, POSTFIX, int) \
- CONV_ACCUM_INT(TYPE, POSTFIX, long) \
- CONV_ACCUM_INT(TYPE, POSTFIX, long long) \
- CONV_ACCUM_INT(TYPE, POSTFIX, unsigned char) \
- CONV_ACCUM_INT(TYPE, POSTFIX, unsigned short) \
- CONV_ACCUM_INT(TYPE, POSTFIX, unsigned int) \
- CONV_ACCUM_INT(TYPE, POSTFIX, unsigned long) \
- CONV_ACCUM_INT(TYPE, POSTFIX, unsigned long long) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, signed char) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, short) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, int) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, long) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, long long) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned char) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned short) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned int) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned long) \
- CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned long long)
-
-#define NEG_CONV(TYPE,POSTFIX) \
- CONV_INT2(TYPE, POSTFIX, signed char) \
- CONV_INT2(TYPE, POSTFIX, short) \
- CONV_INT2(TYPE, POSTFIX, int) \
- CONV_INT2(TYPE, POSTFIX, long) \
- CONV_INT2(TYPE, POSTFIX, long long) \
- CONV_INT2(TYPE, POSTFIX, unsigned char) \
- CONV_INT2(TYPE, POSTFIX, unsigned short) \
- CONV_INT2(TYPE, POSTFIX, unsigned int) \
- CONV_INT2(TYPE, POSTFIX, unsigned long) \
- CONV_INT2(TYPE, POSTFIX, unsigned long long) \
- CONV_INT3(TYPE, POSTFIX, signed char) \
- CONV_INT3(TYPE, POSTFIX, short) \
- CONV_INT3(TYPE, POSTFIX, int) \
- CONV_INT3(TYPE, POSTFIX, long) \
- CONV_INT3(TYPE, POSTFIX, long long)
-
-/* Signed accum to _Sat unsigned/signed fract. */
-#define SAT_CONV1(TYPE, POSTFIX) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr)
-
-/* Unsigned accum to _Sat unsigned/signed fract. */
-#define SAT_CONV2(TYPE, POSTFIX) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat _Fract, 1.0r) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat _Fract, 1.0r) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr)
-
-/* Signed fract to _Sat unsigned fract. */
-#define SAT_CONV3(TYPE, POSTFIX) \
- CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr)
-
-/* Signed integer to _Sat signed/unsigned fract. */
-#define SAT_CONV4(TYPE) \
- CONV2(TYPE, 100, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -100, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 100, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -100, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 100, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -100, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 100, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -100, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 100, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -100, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 100, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -100, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 100, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -100, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 100, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -100, _Sat unsigned long long _Fract, 0.0ullr) \
- CONV2(TYPE, 1, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -1, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 1, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -1, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 1, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -1, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 1, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -1, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 1, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -1, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 1, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -1, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 1, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -1, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 1, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -1, _Sat unsigned long long _Fract, 0.0ullr)
-
-/* Unsigned integer to _Sat signed/unsigned fract. */
-#define SAT_CONV5(TYPE) \
- CONV2(TYPE, 100, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, 100, _Sat _Fract, 1.0r) \
- CONV2(TYPE, 100, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, 100, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, 100, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, 100, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, 100, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, 100, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, 1, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, 1, _Sat _Fract, 1.0r) \
- CONV2(TYPE, 1, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, 1, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, 1, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, 1, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, 1, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, 1, _Sat unsigned long long _Fract, 1.0ullr)
-
-/* Floating-point to _Sat signed/unsigned fract. */
-#define SAT_CONV6(TYPE) \
- CONV2(TYPE, 100.0, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -100.0, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 100.0, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -100.0, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 100.0, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -100.0, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 100.0, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -100.0, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 100.0, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -100.0, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 100.0, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -100.0, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 100.0, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -100.0, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 100.0, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -100.0, _Sat unsigned long long _Fract, 0.0ullr) \
- CONV2(TYPE, 1.0, _Sat short _Fract, 1.0hr) \
- CONV2(TYPE, -1.0, _Sat short _Fract, -0.5hr - 0.5hr) \
- CONV2(TYPE, 1.0, _Sat _Fract, 1.0r) \
- CONV2(TYPE, -1.0, _Sat _Fract, -0.5r - 0.5r) \
- CONV2(TYPE, 1.0, _Sat long _Fract, 1.0lr) \
- CONV2(TYPE, -1.0, _Sat long _Fract, -0.5lr - 0.5lr) \
- CONV2(TYPE, 1.0, _Sat long long _Fract, 1.0llr) \
- CONV2(TYPE, -1.0, _Sat long long _Fract, -0.5llr - 0.5llr) \
- CONV2(TYPE, 1.0, _Sat unsigned short _Fract, 1.0uhr) \
- CONV2(TYPE, -1.0, _Sat unsigned short _Fract, 0.0uhr) \
- CONV2(TYPE, 1.0, _Sat unsigned _Fract, 1.0ur) \
- CONV2(TYPE, -1.0, _Sat unsigned _Fract, 0.0ur) \
- CONV2(TYPE, 1.0, _Sat unsigned long _Fract, 1.0ulr) \
- CONV2(TYPE, -1.0, _Sat unsigned long _Fract, 0.0ulr) \
- CONV2(TYPE, 1.0, _Sat unsigned long long _Fract, 1.0ullr) \
- CONV2(TYPE, -1.0, _Sat unsigned long long _Fract, 0.0ullr)
-
-int main ()
-{
- ALL_CONV (short _Fract, hr);
- ALL_CONV (_Fract, r);
- ALL_CONV (long _Fract, lr);
- ALL_CONV (long long _Fract, llr);
- ALL_CONV (unsigned short _Fract, uhr);
- ALL_CONV (unsigned _Fract, ur);
- ALL_CONV (unsigned long _Fract, ulr);
- ALL_CONV (unsigned long long _Fract, ullr);
- ALL_CONV (short _Accum, hk);
- ALL_CONV (_Accum, k);
- ALL_CONV (long _Accum, lk);
- ALL_CONV (long long _Accum, llk);
- ALL_CONV (unsigned short _Accum, uhk);
- ALL_CONV (unsigned _Accum, uk);
- ALL_CONV (unsigned long _Accum, ulk);
- ALL_CONV (unsigned long long _Accum, ullk);
-
- ALL_ACCUM_CONV (short _Accum, hk);
- ALL_ACCUM_CONV (_Accum, k);
- ALL_ACCUM_CONV (long _Accum, lk);
- ALL_ACCUM_CONV (long long _Accum, llk);
- ALL_ACCUM_CONV (unsigned short _Accum, uhk);
- ALL_ACCUM_CONV (unsigned _Accum, uk);
- ALL_ACCUM_CONV (unsigned long _Accum, ulk);
- ALL_ACCUM_CONV (unsigned long long _Accum, ullk);
-
- NEG_CONV (short _Fract, hr);
- NEG_CONV (_Fract, r);
- NEG_CONV (long _Fract, lr);
- NEG_CONV (long long _Fract, llr);
- NEG_CONV (short _Accum, hk);
- NEG_CONV (_Accum, k);
- NEG_CONV (long _Accum, lk);
- NEG_CONV (long long _Accum, llk);
-
- SAT_CONV1 (short _Accum, hk);
- SAT_CONV1 (_Accum, k);
- SAT_CONV1 (long _Accum, lk);
- SAT_CONV1 (long long _Accum, llk);
-
- SAT_CONV2 (unsigned short _Accum, uhk);
- SAT_CONV2 (unsigned _Accum, uk);
- SAT_CONV2 (unsigned long _Accum, ulk);
- SAT_CONV2 (unsigned long long _Accum, ullk);
-
- SAT_CONV3 (short _Fract, hr);
- SAT_CONV3 (_Fract, r);
- SAT_CONV3 (long _Fract, lr);
- SAT_CONV3 (long long _Fract, llr);
-
- SAT_CONV4 (signed char);
- SAT_CONV4 (short);
- SAT_CONV4 (int);
- SAT_CONV4 (long);
- SAT_CONV4 (long long);
-
- SAT_CONV5 (unsigned char);
- SAT_CONV5 (unsigned short);
- SAT_CONV5 (unsigned int);
- SAT_CONV5 (unsigned long);
- SAT_CONV5 (unsigned long long);
-
- SAT_CONV6 (float);
- SAT_CONV6 (double);
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/convert.h b/gcc/testsuite/gcc.dg/fixed-point/convert.h
new file mode 100644
index 0000000000..e4e68157a7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/convert.h
@@ -0,0 +1,359 @@
+/* Check conversions involving fixed-point.
+ * Break up use-site into into manageable parts so that even embedded
+ * targets with restrictive resources can run them. */
+
+/* Fixed-point to fixed-point. */
+#define CONV(TYPE1,POSTFIX1,TYPE2,POSTFIX2) \
+ { \
+ TYPE1 a = 0.5 ## POSTFIX1; \
+ TYPE2 b = a; \
+ if (b != 0.5 ## POSTFIX2) \
+ abort(); \
+ }
+
+/* TYPE1 with VALUE1 to TYPE2 with VALUE2. */
+#define CONV2(TYPE1,VALUE1,TYPE2,VALUE2) \
+ { \
+ TYPE1 a = VALUE1; \
+ TYPE2 b = a; \
+ if (b != VALUE2) \
+ abort(); \
+ }
+
+/* Fixed-point to integer, and integer to fixed-point. */
+#define CONV_INT(TYPE1,POSTFIX1,TYPE2) \
+ { \
+ TYPE1 a = 0.5 ## POSTFIX1; \
+ TYPE2 b = a; \
+ TYPE2 c = 0; \
+ TYPE1 d = c; \
+ if (b != 0) \
+ abort(); \
+ if (d != 0.0 ## POSTFIX1) \
+ abort(); \
+ }
+
+/* Signed fixed-point to integer. */
+#define CONV_INT2(TYPE1,POSTFIX1,TYPE2) \
+ { \
+ TYPE1 a = -0.5 ## POSTFIX1; \
+ TYPE2 b = a; \
+ if (b != 0) \
+ abort(); \
+ a = -0.0 ## POSTFIX1; \
+ b = a; \
+ if (b != 0) \
+ abort(); \
+ a = +0.0 ## POSTFIX1; \
+ b = a; \
+ if (b != 0) \
+ abort(); \
+ a = +0.1 ## POSTFIX1; \
+ b = a; \
+ if (b != 0) \
+ abort(); \
+ a = -0.1 ## POSTFIX1; \
+ b = a; \
+ if (b != 0) \
+ abort(); \
+ }
+
+/* Signed fixed-point to signed integer. */
+#define CONV_INT3(TYPE1,POSTFIX1,TYPE2) \
+ { \
+ TYPE1 a = -0.5 ## POSTFIX1 - 0.5 ## POSTFIX1; \
+ TYPE2 b = a; \
+ if (b != -1) \
+ abort(); \
+ }
+
+/* Fixed-point to floating-point, and floating-point to fixed-point. */
+#define CONV_FLOAT(TYPE1,POSTFIX1,TYPE2) \
+ { \
+ TYPE1 a = 0.5 ## POSTFIX1; \
+ TYPE2 b = a; \
+ TYPE2 c = 0.25; \
+ TYPE1 d = c; \
+ if (b != 0.5) \
+ abort(); \
+ if (d != 0.25 ## POSTFIX1) \
+ abort(); \
+ }
+
+/* Accum to integer, and integer to accum. */
+#define CONV_ACCUM_INT(TYPE1,POSTFIX1,TYPE2) \
+ { \
+ TYPE1 a = 99.12345 ## POSTFIX1; \
+ TYPE2 b = a; \
+ TYPE2 c = 123; \
+ TYPE1 d = c; \
+ if (b != 99) \
+ abort(); \
+ if (d != 123.0 ## POSTFIX1) \
+ abort(); \
+ }
+
+#define ALL_CONV(TYPE,POSTFIX) \
+ CONV(TYPE, POSTFIX, short _Fract, hr) \
+ CONV(TYPE, POSTFIX, _Fract, r) \
+ CONV(TYPE, POSTFIX, long _Fract, lr) \
+ CONV(TYPE, POSTFIX, long long _Fract, llr) \
+ CONV(TYPE, POSTFIX, unsigned short _Fract, uhr) \
+ CONV(TYPE, POSTFIX, unsigned _Fract, ur) \
+ CONV(TYPE, POSTFIX, unsigned long _Fract, ulr) \
+ CONV(TYPE, POSTFIX, unsigned long long _Fract, ullr) \
+ CONV(TYPE, POSTFIX, short _Accum, hk) \
+ CONV(TYPE, POSTFIX, _Accum, k) \
+ CONV(TYPE, POSTFIX, long _Accum, lk) \
+ CONV(TYPE, POSTFIX, long long _Accum, llk) \
+ CONV(TYPE, POSTFIX, unsigned short _Accum, uhk) \
+ CONV(TYPE, POSTFIX, unsigned _Accum, uk) \
+ CONV(TYPE, POSTFIX, unsigned long _Accum, ulk) \
+ CONV(TYPE, POSTFIX, unsigned long long _Accum, ullk) \
+ CONV(_Sat TYPE, POSTFIX, short _Fract, hr) \
+ CONV(_Sat TYPE, POSTFIX, _Fract, r) \
+ CONV(_Sat TYPE, POSTFIX, long _Fract, lr) \
+ CONV(_Sat TYPE, POSTFIX, long long _Fract, llr) \
+ CONV(_Sat TYPE, POSTFIX, unsigned short _Fract, uhr) \
+ CONV(_Sat TYPE, POSTFIX, unsigned _Fract, ur) \
+ CONV(_Sat TYPE, POSTFIX, unsigned long _Fract, ulr) \
+ CONV(_Sat TYPE, POSTFIX, unsigned long long _Fract, ullr) \
+ CONV(_Sat TYPE, POSTFIX, short _Accum, hk) \
+ CONV(_Sat TYPE, POSTFIX, _Accum, k) \
+ CONV(_Sat TYPE, POSTFIX, long _Accum, lk) \
+ CONV(_Sat TYPE, POSTFIX, long long _Accum, llk) \
+ CONV(_Sat TYPE, POSTFIX, unsigned short _Accum, uhk) \
+ CONV(_Sat TYPE, POSTFIX, unsigned _Accum, uk) \
+ CONV(_Sat TYPE, POSTFIX, unsigned long _Accum, ulk) \
+ CONV(_Sat TYPE, POSTFIX, unsigned long long _Accum, ullk) \
+ CONV(TYPE, POSTFIX, _Sat short _Fract, hr) \
+ CONV(TYPE, POSTFIX, _Sat _Fract, r) \
+ CONV(TYPE, POSTFIX, _Sat long _Fract, lr) \
+ CONV(TYPE, POSTFIX, _Sat long long _Fract, llr) \
+ CONV(TYPE, POSTFIX, _Sat unsigned short _Fract, uhr) \
+ CONV(TYPE, POSTFIX, _Sat unsigned _Fract, ur) \
+ CONV(TYPE, POSTFIX, _Sat unsigned long _Fract, ulr) \
+ CONV(TYPE, POSTFIX, _Sat unsigned long long _Fract, ullr) \
+ CONV(TYPE, POSTFIX, _Sat short _Accum, hk) \
+ CONV(TYPE, POSTFIX, _Sat _Accum, k) \
+ CONV(TYPE, POSTFIX, _Sat long _Accum, lk) \
+ CONV(TYPE, POSTFIX, _Sat long long _Accum, llk) \
+ CONV(TYPE, POSTFIX, _Sat unsigned short _Accum, uhk) \
+ CONV(TYPE, POSTFIX, _Sat unsigned _Accum, uk) \
+ CONV(TYPE, POSTFIX, _Sat unsigned long _Accum, ulk) \
+ CONV(TYPE, POSTFIX, _Sat unsigned long long _Accum, ullk) \
+ CONV_INT(TYPE, POSTFIX, signed char) \
+ CONV_INT(TYPE, POSTFIX, short) \
+ CONV_INT(TYPE, POSTFIX, int) \
+ CONV_INT(TYPE, POSTFIX, long) \
+ CONV_INT(TYPE, POSTFIX, long long) \
+ CONV_INT(TYPE, POSTFIX, unsigned char) \
+ CONV_INT(TYPE, POSTFIX, unsigned short) \
+ CONV_INT(TYPE, POSTFIX, unsigned int) \
+ CONV_INT(TYPE, POSTFIX, unsigned long) \
+ CONV_INT(TYPE, POSTFIX, unsigned long long) \
+ CONV_INT(_Sat TYPE, POSTFIX, signed char) \
+ CONV_INT(_Sat TYPE, POSTFIX, short) \
+ CONV_INT(_Sat TYPE, POSTFIX, int) \
+ CONV_INT(_Sat TYPE, POSTFIX, long) \
+ CONV_INT(_Sat TYPE, POSTFIX, long long) \
+ CONV_INT(_Sat TYPE, POSTFIX, unsigned char) \
+ CONV_INT(_Sat TYPE, POSTFIX, unsigned short) \
+ CONV_INT(_Sat TYPE, POSTFIX, unsigned int) \
+ CONV_INT(_Sat TYPE, POSTFIX, unsigned long) \
+ CONV_INT(_Sat TYPE, POSTFIX, unsigned long long)
+
+#define ALL_CONV_FLOAT(TYPE,POSTFIX) \
+ CONV_FLOAT(TYPE, POSTFIX, float) \
+ CONV_FLOAT(TYPE, POSTFIX, double) \
+ CONV_FLOAT(_Sat TYPE, POSTFIX, float) \
+ CONV_FLOAT(_Sat TYPE, POSTFIX, double)
+
+#define ALL_ACCUM_CONV(TYPE,POSTFIX) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, signed char) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, short) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, int) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, long) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, long long) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, unsigned char) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, unsigned short) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, unsigned int) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, unsigned long) \
+ CONV_ACCUM_INT(TYPE, POSTFIX, unsigned long long) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, signed char) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, short) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, int) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, long) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, long long) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned char) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned short) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned int) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned long) \
+ CONV_ACCUM_INT(_Sat TYPE, POSTFIX, unsigned long long)
+
+#define NEG_CONV(TYPE,POSTFIX) \
+ CONV_INT2(TYPE, POSTFIX, signed char) \
+ CONV_INT2(TYPE, POSTFIX, short) \
+ CONV_INT2(TYPE, POSTFIX, int) \
+ CONV_INT2(TYPE, POSTFIX, long) \
+ CONV_INT2(TYPE, POSTFIX, long long) \
+ CONV_INT2(TYPE, POSTFIX, unsigned char) \
+ CONV_INT2(TYPE, POSTFIX, unsigned short) \
+ CONV_INT2(TYPE, POSTFIX, unsigned int) \
+ CONV_INT2(TYPE, POSTFIX, unsigned long) \
+ CONV_INT2(TYPE, POSTFIX, unsigned long long) \
+ CONV_INT3(TYPE, POSTFIX, signed char) \
+ CONV_INT3(TYPE, POSTFIX, short) \
+ CONV_INT3(TYPE, POSTFIX, int) \
+ CONV_INT3(TYPE, POSTFIX, long) \
+ CONV_INT3(TYPE, POSTFIX, long long)
+
+/* Signed accum to _Sat unsigned/signed fract. */
+#define SAT_CONV1(TYPE, POSTFIX) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -3.2 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -1.0 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr)
+
+/* Unsigned accum to _Sat unsigned/signed fract. */
+#define SAT_CONV2(TYPE, POSTFIX) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, 3.2 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, 1.0 ## POSTFIX, _Sat unsigned long long _Fract, 1.0ullr)
+
+/* Signed fract to _Sat unsigned fract. */
+#define SAT_CONV3(TYPE, POSTFIX) \
+ CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, -0.5 ## POSTFIX, _Sat unsigned long long _Fract, 0.0ullr)
+
+/* Signed integer to _Sat signed/unsigned fract. */
+#define SAT_CONV4(TYPE) \
+ CONV2(TYPE, 100, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -100, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 100, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -100, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 100, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -100, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 100, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -100, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 100, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -100, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 100, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -100, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 100, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -100, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 100, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -100, _Sat unsigned long long _Fract, 0.0ullr) \
+ CONV2(TYPE, 1, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -1, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 1, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -1, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 1, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -1, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 1, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -1, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 1, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -1, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 1, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -1, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 1, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -1, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 1, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -1, _Sat unsigned long long _Fract, 0.0ullr)
+
+/* Unsigned integer to _Sat signed/unsigned fract. */
+#define SAT_CONV5(TYPE) \
+ CONV2(TYPE, 100, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, 100, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, 100, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, 100, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, 100, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, 100, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, 100, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, 100, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, 1, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, 1, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, 1, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, 1, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, 1, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, 1, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, 1, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, 1, _Sat unsigned long long _Fract, 1.0ullr)
+
+/* Floating-point to _Sat signed/unsigned fract. */
+#define SAT_CONV6(TYPE) \
+ CONV2(TYPE, 100.0, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -100.0, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 100.0, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -100.0, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 100.0, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -100.0, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 100.0, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -100.0, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 100.0, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -100.0, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 100.0, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -100.0, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 100.0, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -100.0, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 100.0, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -100.0, _Sat unsigned long long _Fract, 0.0ullr) \
+ CONV2(TYPE, 1.0, _Sat short _Fract, 1.0hr) \
+ CONV2(TYPE, -1.0, _Sat short _Fract, -0.5hr - 0.5hr) \
+ CONV2(TYPE, 1.0, _Sat _Fract, 1.0r) \
+ CONV2(TYPE, -1.0, _Sat _Fract, -0.5r - 0.5r) \
+ CONV2(TYPE, 1.0, _Sat long _Fract, 1.0lr) \
+ CONV2(TYPE, -1.0, _Sat long _Fract, -0.5lr - 0.5lr) \
+ CONV2(TYPE, 1.0, _Sat long long _Fract, 1.0llr) \
+ CONV2(TYPE, -1.0, _Sat long long _Fract, -0.5llr - 0.5llr) \
+ CONV2(TYPE, 1.0, _Sat unsigned short _Fract, 1.0uhr) \
+ CONV2(TYPE, -1.0, _Sat unsigned short _Fract, 0.0uhr) \
+ CONV2(TYPE, 1.0, _Sat unsigned _Fract, 1.0ur) \
+ CONV2(TYPE, -1.0, _Sat unsigned _Fract, 0.0ur) \
+ CONV2(TYPE, 1.0, _Sat unsigned long _Fract, 1.0ulr) \
+ CONV2(TYPE, -1.0, _Sat unsigned long _Fract, 0.0ulr) \
+ CONV2(TYPE, 1.0, _Sat unsigned long long _Fract, 1.0ullr) \
+ CONV2(TYPE, -1.0, _Sat unsigned long long _Fract, 0.0ullr)
diff --git a/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp b/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp
index bdb241f48a..77e7b7201d 100644
--- a/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp
+++ b/gcc/testsuite/gcc.dg/fixed-point/fixed-point.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/fixed-point/operator-bitwise.c b/gcc/testsuite/gcc.dg/fixed-point/operator-bitwise.c
index 31aecf5585..6ba817dca6 100644
--- a/gcc/testsuite/gcc.dg/fixed-point/operator-bitwise.c
+++ b/gcc/testsuite/gcc.dg/fixed-point/operator-bitwise.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-std=gnu99" } */
+/* { dg-options "-std=gnu99 -ftrack-macro-expansion=0" } */
/* C99 6.5.10: Bitwise AND operator.
C99 6.5.11: Bitwise exclusive OR operator.
diff --git a/gcc/testsuite/gcc.dg/fixed-point/view-convert-2.c b/gcc/testsuite/gcc.dg/fixed-point/view-convert-2.c
new file mode 100644
index 0000000000..fbce5185e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/view-convert-2.c
@@ -0,0 +1,139 @@
+/* PR tree-optimization/56064 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O2" } */
+
+extern void abort (void);
+extern void exit (int);
+
+void test_k (void)
+{
+ _Accum a;
+ __INT32_TYPE__ i = -__INT32_MAX__;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&a, &i, sizeof (a));
+
+ if (a >= 0k)
+ abort();
+}
+
+void test_0k (void)
+{
+ _Accum a;
+ __INT32_TYPE__ i = 0;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&a, &i, sizeof (a));
+
+ if (a != 0k)
+ abort();
+}
+
+
+void test_hr (void)
+{
+ short _Fract a;
+ __INT8_TYPE__ i = -__INT8_MAX__;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&a, &i, sizeof (a));
+
+ if (a >= 0hr)
+ abort();
+}
+
+void test_0hr (void)
+{
+ short _Fract a;
+ __INT8_TYPE__ i = 0;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&a, &i, sizeof (a));
+
+ if (a != 0hr)
+ abort();
+}
+
+
+void test_si (void)
+{
+ _Accum a = __ACCUM_MIN__;
+ __INT32_TYPE__ i;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&i, &a, sizeof (i));
+
+ if (i >= 0)
+ abort();
+}
+
+void test_0si (void)
+{
+ _Accum a = 0;
+ __INT32_TYPE__ i;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&i, &a, sizeof (i));
+
+ if (i != 0)
+ abort();
+}
+
+
+void test_qi (void)
+{
+ short _Fract a = __SFRACT_MIN__;
+ __INT8_TYPE__ i;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&i, &a, sizeof (i));
+
+ if (i >= 0)
+ abort();
+}
+
+void test_0qi (void)
+{
+ short _Fract a = 0hr;
+ __INT8_TYPE__ i;
+
+ if (sizeof (a) != sizeof (i))
+ return;
+
+ __builtin_memcpy (&i, &a, sizeof (i));
+
+ if (i != 0)
+ abort();
+}
+
+
+int main (void)
+{
+ test_hr();
+ test_k();
+ test_qi();
+ test_si();
+
+ test_0hr();
+ test_0k();
+ test_0qi();
+ test_0si();
+
+ exit (0);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/fixed-point/view-convert.c b/gcc/testsuite/gcc.dg/fixed-point/view-convert.c
new file mode 100644
index 0000000000..d5d27b35e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fixed-point/view-convert.c
@@ -0,0 +1,122 @@
+/* PR tree-optimization/56064 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O2 -fno-builtin-memcpy" } */
+
+extern void abort (void);
+extern void *memcpy (void*, const void*, __SIZE_TYPE__);
+
+#define f_pun_i(F, I, VAL) \
+ { \
+ I i1 = VAL; \
+ I i2 = VAL; \
+ F q1, q2; \
+ memcpy (&q1, &i1, sizeof (I)); \
+ __builtin_memcpy (&q2, &i2, sizeof (I)); \
+ if (q1 != q2) \
+ abort(); \
+ }
+
+#define i_pun_f(I, F, VAL) \
+ { \
+ F q1 = VAL; \
+ F q2 = VAL; \
+ I i1, i2; \
+ memcpy (&i1, &q1, sizeof (I)); \
+ __builtin_memcpy (&i2, &q2, sizeof (I)); \
+ if (i1 != i2) \
+ abort(); \
+ }
+
+
+void __attribute__((noinline))
+test8 (void)
+{
+#ifdef __INT8_TYPE__
+ if (sizeof (__INT8_TYPE__) == sizeof (short _Fract))
+ {
+#define TEST(X) f_pun_i (short _Fract, __INT8_TYPE__, __INT8_C (X))
+ TEST (123);
+ TEST (-123);
+#undef TEST
+
+#define TEST(X) i_pun_f (__INT8_TYPE__, short _Fract, X ## hr)
+ TEST (0.1234);
+ TEST (-0.987);
+#undef TEST
+ }
+#endif /* __INT8_TYPE__ */
+}
+
+
+void __attribute__((noinline))
+test16 (void)
+{
+#ifdef __INT16_TYPE__
+
+ if (sizeof (__INT16_TYPE__) == sizeof (_Fract))
+ {
+#define TEST(X) f_pun_i (_Fract, __INT16_TYPE__, __INT16_C (X))
+ TEST (0x4321);
+ TEST (-0x4321);
+ TEST (0x8000);
+#undef TEST
+
+#define TEST(X) i_pun_f (__INT16_TYPE__, _Fract, X ## r)
+ TEST (0.12345);
+ TEST (-0.98765);
+#undef TEST
+ }
+#endif /* __INT16_TYPE__ */
+}
+
+
+void __attribute__((noinline))
+test32 (void)
+{
+#ifdef __INT32_TYPE__
+ if (sizeof (__INT32_TYPE__) == sizeof (_Accum))
+ {
+#define TEST(X) f_pun_i (_Accum, __INT32_TYPE__, __INT32_C (X))
+ TEST (0x76543219);
+ TEST (-0x76543219);
+ TEST (0x80000000);
+#undef TEST
+
+#define TEST(X) i_pun_f (__INT32_TYPE__, _Accum, X ## k)
+ TEST (123.456789);
+ TEST (-123.456789);
+#undef TEST
+ }
+#endif /* __INT32_TYPE__ */
+}
+
+
+void __attribute__((noinline))
+test64 (void)
+{
+#ifdef __INT64_TYPE__
+ if (sizeof (__INT64_TYPE__) == sizeof (long _Accum))
+ {
+#define TEST(X) f_pun_i (long _Accum, __INT64_TYPE__, __INT64_C (X))
+ TEST (0x12345678abcdef01);
+ TEST (-0x12345678abcdef01);
+ TEST (0x8000000000000000);
+#undef TEST
+
+#define TEST(X) i_pun_f (__INT64_TYPE__, long _Accum, X ## lk)
+ TEST (123.456789);
+ TEST (-123.456789);
+#undef TEST
+ }
+#endif /* __INT64_TYPE__ */
+}
+
+int main()
+{
+ test8();
+ test16();
+ test32();
+ test64();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/float-exact-1.c b/gcc/testsuite/gcc.dg/float-exact-1.c
new file mode 100644
index 0000000000..d22e70b354
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/float-exact-1.c
@@ -0,0 +1,3178 @@
+/* Test exact conversion to binary floating-point types of
+ floating-point contents expressed in decimal. PR 21718. */
+/* { dg-do run } */
+/* { dg-options "-w" } */
+/* { dg-add-options ieee } */
+
+/* For float (if IEEE binary32), double (if IEEE binary64) and long
+ double (if IEEE binary64, x86 extended or IEEE binary128) we test
+ half-way values and numbers close to those half-way values. */
+
+#include <float.h>
+
+#if FLT_EVAL_METHOD == 0 \
+ && FLT_MANT_DIG == 24 \
+ && FLT_MIN_EXP == -125 \
+ && FLT_MAX_EXP == 128
+# define FLT_OK
+/* 0x0.8p-149 */
+static const float f1ae = 0, f1be = 0, f1ce = 0x1p-149f;
+static const float f1a =
+7.0064923216240853546186479164495806564013097093825788587853\
+4141944895541342930300743319094181060791015624999e-46f;
+static const float f1b =
+7.0064923216240853546186479164495806564013097093825788587853\
+4141944895541342930300743319094181060791015625e-46f;
+static const float f1c =
+7.0064923216240853546186479164495806564013097093825788587853\
+4141944895541342930300743319094181060791015625001e-46f;
+/* 0x1.8p-149 */
+static const float f2ae = 0x1p-149f, f2be = 0x2p-149f, f2ce = 0x2p-149f;
+static const float f2a =
+2.1019476964872256063855943749348741969203929128147736576356\
+02425834686624028790902229957282543182373046874999e-45f;
+static const float f2b =
+2.1019476964872256063855943749348741969203929128147736576356\
+02425834686624028790902229957282543182373046875e-45f;
+static const float f2c =
+2.1019476964872256063855943749348741969203929128147736576356\
+02425834686624028790902229957282543182373046875001e-45f;
+/* 0x1.000001p127 */
+static const float f3ae = 0x1p127f, f3be = 0x1p127f, f3ce = 0x1.000002p127f;
+static const float f3a =
+1.70141193601674033557522515689509748735999e+38f;
+static const float f3b =
+1.70141193601674033557522515689509748736e+38f;
+static const float f3c =
+1.70141193601674033557522515689509748736001e+38f;
+#endif
+
+#if (FLT_EVAL_METHOD == 0 || FLT_EVAL_METHOD == 1) \
+ && DBL_MANT_DIG == 53 \
+ && DBL_MIN_EXP == -1021 \
+ && DBL_MAX_EXP == 1024
+# define DBL_OK
+/* 0x0.8p-1074 */
+static const double d1ae = 0, d1be = 0, d1ce = 0x1p-1074;
+static const double d1a =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328124999e-324;
+static const double d1b =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328125e-324;
+static const double d1c =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328125001e-324;
+/* 0x1.8p-1074 */
+static const double d2ae = 0x1p-1074, d2be = 0x2p-1074, d2ce = 0x2p-1074;
+static const double d2a =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984374999e-324;
+static const double d2b =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984375e-324;
+static const double d2c =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984375001e-324;
+/* 0x1.00000000000008p1023 */
+static const double d3ae = 0x1p1023, d3be = 0x1p1023, d3ce = 0x1.0000000000001p1023;
+static const double d3a =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708031999e+307;
+static const double d3b =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708032e+307;
+static const double d3c =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708032001e+307;
+#endif
+
+#if LDBL_MANT_DIG == 53 \
+ && LDBL_MIN_EXP == -1021 \
+ && LDBL_MAX_EXP == 1024
+# define LDBL_OK
+/* 0x0.8p-1074 */
+static const long double ld1ae = 0, ld1be = 0, ld1ce = 0x1p-1074L;
+static const long double ld1a =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328124999e-324L;
+static const long double ld1b =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328125e-324L;
+static const long double ld1c =
+2.4703282292062327208828439643411068618252990130716238221279\
+284125033775363510437593264991818081799618989828234772285886\
+546332835517796989819938739800539093906315035659515570226392\
+290858392449105184435931802849936536152500319370457678249219\
+365623669863658480757001585769269903706311928279558551332927\
+834338409351978015531246597263579574622766465272827220056374\
+006485499977096599470454020828166226237857393450736339007967\
+761930577506740176324673600968951340535537458516661134223766\
+678604162159680461914467291840300530057530849048765391711386\
+591646239524912623653881879636239373280423891018672348497668\
+235089863388587925628302755995657524455507255189313690836254\
+779186948667994968324049705821028513185451396213837722826145\
+437693412532098591327667236328125001e-324L;
+/* 0x1.8p-1074 */
+static const long double ld2ae = 0x1p-1074L, ld2be = 0x2p-1074L, ld2ce = 0x2p-1074L;
+static const long double ld2a =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984374999e-324L;
+static const long double ld2b =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984375e-324L;
+static const long double ld2c =
+7.4109846876186981626485318930233205854758970392148714663837\
+852375101326090531312779794975454245398856969484704316857659\
+638998506553390969459816219401617281718945106978546710679176\
+872575177347315553307795408549809608457500958111373034747658\
+096871009590975442271004757307809711118935784838675653998783\
+503015228055934046593739791790738723868299395818481660169122\
+019456499931289798411362062484498678713572180352209017023903\
+285791732520220528974020802906854021606612375549983402671300\
+035812486479041385743401875520901590172592547146296175134159\
+774938718574737870961645638908718119841271673056017045493004\
+705269590165763776884908267986972573366521765567941072508764\
+337560846003984904972149117463085539556354188641513168478436\
+313080237596295773983001708984375001e-324L;
+/* 0x1.00000000000008p1023 */
+static const long double ld3ae = 0x1p1023L, ld3be = 0x1p1023L, ld3ce = 0x1.0000000000001p1023L;
+static const long double ld3a =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708031999e+307L;
+static const long double ld3b =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708032e+307L;
+static const long double ld3c =
+8.9884656743115805365666807213050294962762414131308158973971\
+342756154045415486693752413698006024096935349884403114202125\
+541629105369684531108613657287705365884742938136589844238179\
+474556051429647415148697857438797685859063890851407391008830\
+874765563025951597582513936655578157348020066364210154316532\
+161708032001e+307L;
+#endif
+
+#if LDBL_MANT_DIG == 64 \
+ && LDBL_MIN_EXP == -16381 \
+ && LDBL_MAX_EXP == 16384
+# define LDBL_OK
+/* 0x0.8p-16445 */
+static const long double ld1ae = 0, ld1be = 0, ld1ce = 0x1p-16445L;
+static const long double ld1a =
+1.8225997659412373012642029668097099081995254078467816718604\
+902435141858443166988684047803543129136025986236736736017655\
+509834928163110160849867540377949045027419112905889658392846\
+126319028167798783107812829917053644701598967767636342956203\
+999770864055077592691915230273843577112246476529298591341071\
+313110337661777304220340396298768698441131694859514066773321\
+059786469060001083813361460161387168195154228027648977594276\
+496061276605855817438145692314650177569263750801566422892936\
+732834290416745265618525969943519916542939199731612507343012\
+297331882934352282118173551211985973294301787840335672389913\
+821098681464088756477802684228806339233239542587316254618680\
+197563613907079766830481997222017010585267442240109888818022\
+189543438116245170584546472752661417773021275082355242554950\
+776248474101880875363872607989624146320823364146896124171892\
+610744237622308266702265704492674694505399997330424978964704\
+335411125839490463131661420668167686151828553033363555080508\
+484934542727634080467233927879117726432283352324546435315312\
+937809651095964197873430398662003709663353962932921239516263\
+008572512558260093668527782388349282015308359304941505110445\
+043762021191469060607078792635897736408141163554429972292873\
+575169264387977130124003958599909776720759582995017519144111\
+001778329839793855454688442046155253818724410472281602421363\
+580613990749181808302947976045417884436271162664776148749463\
+202753814797191206392480969096910387729527305862739806702349\
+088455828380471306603628636563037414688265702108098430515297\
+645997107159687247830496686980315376091511219227376708389862\
+310190633134517040835432587726931910775044780329777051964574\
+763119639404235797665922677433332402402817037657141926646502\
+612388421085254756323737273178774331073924707711575555193153\
+421957126062196520952920611871114861423032687425262323243276\
+848595495133802591437804984986053892365334900647137137197585\
+161954823956838391108748154877098567190695813394392779995887\
+642254413740232692940887236351533691174492514884514265006822\
+752026136435469700291628942927286843274959781329315250417360\
+438115330104516894597449604875954147108010051910197388860417\
+003307595774863477182911525109554542883460240867674794470854\
+883815424039187014069246137704710366577005576311674384079810\
+437206511282792194562503036151028910065418370565117488062226\
+073975854919243439941741016447206284543777826080409075756028\
+194465562812076645422284670475730922346454505830553174377950\
+824178034708147037448871898963699023373821217419560423459358\
+846127232531421552826545954362386431279626917642725181802754\
+271134597856231805666129524101509582941585421888561296839474\
+232056474112935379177434928227554149402642893913492062781246\
+372611175305462271711931011635602039137701669573065960945871\
+579420683440097179831368317352157202215160682058878025153007\
+184185319863451652087375936651004559837502483808090613073982\
+264685620351993519454344577635257452328683726988824705474397\
+398247190812883071734743260426540123481791283782928972842466\
+595210269414219040901793935553872090377394005932597887081359\
+481915849178541128182923272843218513093012167744690818603663\
+862691727272565325057703378827553284852502067686026850339624\
+401046086817036618366842240024522042069888708534827471235203\
+998932259309110942367856287784097166420437430118381247339347\
+418156902369282431197735078016591613063918260343498992697002\
+033186558413655576703389208301203552157755701852051877927864\
+696515420369217703510602759815252574799728706795849558382877\
+392016396900560101736741462690753991602263974212137632508984\
+264559315540891383192361601189350414311358816980975697568561\
+515680971830107704152657284552920241862730125888825702301035\
+564615759615882010733764341109834449576907982406265803484111\
+303615971297609065271517286111839839646343815364461776394273\
+571391219315553915335300622295196577640884201524657614065743\
+729121754460652975075990012786021662416077757235487562550381\
+116824006014440438178253273174734436163638119532295383351135\
+543170811596051785036366846773285937845231974424475418970517\
+659179798069972876889488877627309887323737590814875050457317\
+809625163713227973229002908003491739085115971899606986738405\
+752463436186745107821032315480693516006251388789902053863235\
+071957895722121876262598833823352290042576488238120724072267\
+480348425637199003147760378463243043407534395221882144887315\
+875876025907739792297575795373506429192468470170038312050500\
+917665707583420927303790875332407805094505665159755210495266\
+485594187244922216154283213688032393939401426499517609275128\
+062067355172333120857796045387692492375534056470145301671359\
+016602832469675123108598588424022216759334733452626330303791\
+660952659036162827509451468771297954737165701921676834866994\
+084496268491510599580714458155026746676860790028899722645883\
+679435969902046442373108472951515492761911884847211825930115\
+654927539118088350255959445076757398298893380662248358210075\
+297702191186519614515280395341723177201383862827129721649638\
+274531314762377778754560119397123180107310216608157141828379\
+259328274508467371717057031104537750450228447941619684073375\
+630517322006118640290925241602376256334414376495602911265450\
+165889418372161719063670619610214632774542741157366426747861\
+054811449449004970132668146607323502760146957586465275981090\
+328336256381187450646030492071694516054712444513961269623339\
+705411366337817643269316717217432478812002049894979925260411\
+553651385384826214231392012841425936827944383266227115236029\
+717393064659821056467446870597828757433936024422511537561864\
+619865595955628070343780472634463916608440151554502790128417\
+277259492437005696576453717387309605129939526661181496994297\
+244693710437436581443653555343763817246961834486181294985455\
+884981266421533438177271809310897035958260776218253097858601\
+160643120653927024652834025146166356877731266566437231429061\
+099807825113272551869352908241073955695854354852545370793609\
+838167127357752579007490955536081388103461735071174567636929\
+060824172375010035497010614957197713919909924635906503348016\
+450952475530978921242656498701313530533991692867619886826204\
+706468476070943378163577235406861262755114909606255628375659\
+196050370661430148107216310635729360112021571291096278032076\
+401092225373270173950575377792566872113768085940991929655824\
+050914085013970861399015141010432835406337266746706727481946\
+196898882472095111505210339933002505227334750020285673634670\
+738458390159933494226851499935336922036551687169140582574153\
+726872453800858360764892975201757027862632615130256075468549\
+502839367841926212872731925042838691319757663382746471782087\
+828988857978192483595747889021081459460627705275735868618724\
+958783348362295106875556443770626864591972089881215465141073\
+516646930158996569747675806719463602045230325049794904894739\
+988312727573320971310488326486213061839843830003145873279435\
+454121817918269218294901387830156432148142381592864575229119\
+479029130050663564889172093067341444164942736885872753984012\
+865743421266470861425283889134636885790293235727017788606167\
+560012477186697069994213912998550931078617189790771376702549\
+055361745205232419031423044366971378594392952093464046441667\
+117613906203494872209149396518971207279263883566606774353236\
+255473603377861613942239543893894460581170658088042083661404\
+937465706659424639301296621963906278930754459296017486063079\
+582024995485338893699574289806529424673393810217577605952909\
+491283123179789154639057105774960699934999681018155749261864\
+012821574480758746632022143860041252142846691648490809250856\
+327057133540568617791625295314357533564192304930155735301757\
+457531580062662693966772497728335047637869054460240023262262\
+260698443946964564691259441706490611176164305693669515767804\
+836460521205954731752583848846525153811934541997962775215961\
+180346397456122329133421016560406277159258781706172834569862\
+946953007793254152187010227976038449980797987728559041018441\
+590564594738308310579014597893182017151615208050090318483536\
+106249131918576316944251537092347119867433735046169725181104\
+507590928834713669184230634083190791725243913641206256399101\
+550966117564795555149420011152858441084271411289366093158722\
+254752761637144762690747726313899449121995142565661043193165\
+353010677613760383307839362361625628371456344409245507081913\
+518237257141164239966660785903970075181826808229440731778746\
+830751045427285945936163931997929399708401851740705527023711\
+492262489476846435969872480702228386506357017948329114555484\
+164760105906717855684788039081591713778852802032849601308169\
+832017420608399347713424218434541771868442189843417628618330\
+607429739733739437863581804003482214082370567967330530446020\
+897773385726872912189813323094415093143437550397556262780011\
+208941731420098754319961419532567861629590267320403217607660\
+774125374101195389953895035347940170148097810952083736798564\
+420421622607993390894450932047257403433908665884124601384175\
+012387617430467934818665777122459487877479257747635172691688\
+471574765285820096075133353869554987216398800026453207557923\
+535966131756358352198875705382763163680830588056974671628368\
+719411827591592806044707764658145625683998557872894583705117\
+936257144994734815912058252772021032081682437093280526665192\
+728869800954748014250481042845426151143544474372887617562791\
+409866964806319608280819816846942058817381943129762034507591\
+367065185343216917751414811188645979508942996964383255432999\
+246119971295726296202396921903289017490293595312645036697141\
+581149988784499288560584613793415358537364677872496224892098\
+940856692342358755626519304557946447004033186014602147449599\
+351317079758304444877174136521487256811625263467410007624215\
+856145392339552689565690577293133060124853654497575571509576\
+408069646196646757505249296126372820539234090564691695806544\
+715766025588258581902342311480969412221466852421842650484494\
+063894865891424563992751226230317059592413191308470146226366\
+458233536657973376067140793776369412191789801225320255079444\
+592709005698858098716107025188986428347407279053266600044521\
+079987989879536957560131070100060050673537683871138182387904\
+590837539252425985326631955455857258818756188063697492342550\
+045277400125480079927908846850898283905756532829762950509886\
+991675925213188409911532242068610889478326451513981115020992\
+630395715520350039372702741107911736947893709538471200363740\
+669304116845653259038102180504837110789645359520309929381266\
+271463740502507456882882255788069710715770802338317704510793\
+279398576163709512326095306022330346997717688118726634628650\
+675984237916551201500684504118483305560295744746257951860545\
+390826531622290588364837980034428055971370065573420370270905\
+592141420051502465016793525150950140243606137664910359769114\
+512792293426708006440346732679574519594848136194781488696994\
+267355775509666977187349644291823026624985531726865131782364\
+428380093055155988532106121916567178604128111080322761213573\
+781334480667563871257352254033032675246444238637990062075058\
+819854494711379915549313390179300091783493496822950479766923\
+983305064901026858870340863556799948310622536592472509634484\
+910640735459644047154918467543140024764605449756679450446473\
+048922824617117723876384637412932380635306714345354710568410\
+140587435077620501285599837051978855056335305570615129711860\
+309387503970812843734718712815925040263182888714533431137355\
+255722368962836390856001176889513153529416105504464217522618\
+741534232432067776306691118141998014985541610448993152948945\
+865983354717289054861249734477980864059509622993770525110616\
+313865830823478927462500895844216364365499438449134659145333\
+799994034010282254566331595018205841080487728993632798168070\
+476921205941768965021887178681810499301253039335978279707627\
+295287697256489961179958946847840431902105306618594831078534\
+622089641993900896756734276531931450266972752637997248151974\
+2277811246822238899767398834228515624999e-4951L;
+static const long double ld1b =
+1.8225997659412373012642029668097099081995254078467816718604\
+902435141858443166988684047803543129136025986236736736017655\
+509834928163110160849867540377949045027419112905889658392846\
+126319028167798783107812829917053644701598967767636342956203\
+999770864055077592691915230273843577112246476529298591341071\
+313110337661777304220340396298768698441131694859514066773321\
+059786469060001083813361460161387168195154228027648977594276\
+496061276605855817438145692314650177569263750801566422892936\
+732834290416745265618525969943519916542939199731612507343012\
+297331882934352282118173551211985973294301787840335672389913\
+821098681464088756477802684228806339233239542587316254618680\
+197563613907079766830481997222017010585267442240109888818022\
+189543438116245170584546472752661417773021275082355242554950\
+776248474101880875363872607989624146320823364146896124171892\
+610744237622308266702265704492674694505399997330424978964704\
+335411125839490463131661420668167686151828553033363555080508\
+484934542727634080467233927879117726432283352324546435315312\
+937809651095964197873430398662003709663353962932921239516263\
+008572512558260093668527782388349282015308359304941505110445\
+043762021191469060607078792635897736408141163554429972292873\
+575169264387977130124003958599909776720759582995017519144111\
+001778329839793855454688442046155253818724410472281602421363\
+580613990749181808302947976045417884436271162664776148749463\
+202753814797191206392480969096910387729527305862739806702349\
+088455828380471306603628636563037414688265702108098430515297\
+645997107159687247830496686980315376091511219227376708389862\
+310190633134517040835432587726931910775044780329777051964574\
+763119639404235797665922677433332402402817037657141926646502\
+612388421085254756323737273178774331073924707711575555193153\
+421957126062196520952920611871114861423032687425262323243276\
+848595495133802591437804984986053892365334900647137137197585\
+161954823956838391108748154877098567190695813394392779995887\
+642254413740232692940887236351533691174492514884514265006822\
+752026136435469700291628942927286843274959781329315250417360\
+438115330104516894597449604875954147108010051910197388860417\
+003307595774863477182911525109554542883460240867674794470854\
+883815424039187014069246137704710366577005576311674384079810\
+437206511282792194562503036151028910065418370565117488062226\
+073975854919243439941741016447206284543777826080409075756028\
+194465562812076645422284670475730922346454505830553174377950\
+824178034708147037448871898963699023373821217419560423459358\
+846127232531421552826545954362386431279626917642725181802754\
+271134597856231805666129524101509582941585421888561296839474\
+232056474112935379177434928227554149402642893913492062781246\
+372611175305462271711931011635602039137701669573065960945871\
+579420683440097179831368317352157202215160682058878025153007\
+184185319863451652087375936651004559837502483808090613073982\
+264685620351993519454344577635257452328683726988824705474397\
+398247190812883071734743260426540123481791283782928972842466\
+595210269414219040901793935553872090377394005932597887081359\
+481915849178541128182923272843218513093012167744690818603663\
+862691727272565325057703378827553284852502067686026850339624\
+401046086817036618366842240024522042069888708534827471235203\
+998932259309110942367856287784097166420437430118381247339347\
+418156902369282431197735078016591613063918260343498992697002\
+033186558413655576703389208301203552157755701852051877927864\
+696515420369217703510602759815252574799728706795849558382877\
+392016396900560101736741462690753991602263974212137632508984\
+264559315540891383192361601189350414311358816980975697568561\
+515680971830107704152657284552920241862730125888825702301035\
+564615759615882010733764341109834449576907982406265803484111\
+303615971297609065271517286111839839646343815364461776394273\
+571391219315553915335300622295196577640884201524657614065743\
+729121754460652975075990012786021662416077757235487562550381\
+116824006014440438178253273174734436163638119532295383351135\
+543170811596051785036366846773285937845231974424475418970517\
+659179798069972876889488877627309887323737590814875050457317\
+809625163713227973229002908003491739085115971899606986738405\
+752463436186745107821032315480693516006251388789902053863235\
+071957895722121876262598833823352290042576488238120724072267\
+480348425637199003147760378463243043407534395221882144887315\
+875876025907739792297575795373506429192468470170038312050500\
+917665707583420927303790875332407805094505665159755210495266\
+485594187244922216154283213688032393939401426499517609275128\
+062067355172333120857796045387692492375534056470145301671359\
+016602832469675123108598588424022216759334733452626330303791\
+660952659036162827509451468771297954737165701921676834866994\
+084496268491510599580714458155026746676860790028899722645883\
+679435969902046442373108472951515492761911884847211825930115\
+654927539118088350255959445076757398298893380662248358210075\
+297702191186519614515280395341723177201383862827129721649638\
+274531314762377778754560119397123180107310216608157141828379\
+259328274508467371717057031104537750450228447941619684073375\
+630517322006118640290925241602376256334414376495602911265450\
+165889418372161719063670619610214632774542741157366426747861\
+054811449449004970132668146607323502760146957586465275981090\
+328336256381187450646030492071694516054712444513961269623339\
+705411366337817643269316717217432478812002049894979925260411\
+553651385384826214231392012841425936827944383266227115236029\
+717393064659821056467446870597828757433936024422511537561864\
+619865595955628070343780472634463916608440151554502790128417\
+277259492437005696576453717387309605129939526661181496994297\
+244693710437436581443653555343763817246961834486181294985455\
+884981266421533438177271809310897035958260776218253097858601\
+160643120653927024652834025146166356877731266566437231429061\
+099807825113272551869352908241073955695854354852545370793609\
+838167127357752579007490955536081388103461735071174567636929\
+060824172375010035497010614957197713919909924635906503348016\
+450952475530978921242656498701313530533991692867619886826204\
+706468476070943378163577235406861262755114909606255628375659\
+196050370661430148107216310635729360112021571291096278032076\
+401092225373270173950575377792566872113768085940991929655824\
+050914085013970861399015141010432835406337266746706727481946\
+196898882472095111505210339933002505227334750020285673634670\
+738458390159933494226851499935336922036551687169140582574153\
+726872453800858360764892975201757027862632615130256075468549\
+502839367841926212872731925042838691319757663382746471782087\
+828988857978192483595747889021081459460627705275735868618724\
+958783348362295106875556443770626864591972089881215465141073\
+516646930158996569747675806719463602045230325049794904894739\
+988312727573320971310488326486213061839843830003145873279435\
+454121817918269218294901387830156432148142381592864575229119\
+479029130050663564889172093067341444164942736885872753984012\
+865743421266470861425283889134636885790293235727017788606167\
+560012477186697069994213912998550931078617189790771376702549\
+055361745205232419031423044366971378594392952093464046441667\
+117613906203494872209149396518971207279263883566606774353236\
+255473603377861613942239543893894460581170658088042083661404\
+937465706659424639301296621963906278930754459296017486063079\
+582024995485338893699574289806529424673393810217577605952909\
+491283123179789154639057105774960699934999681018155749261864\
+012821574480758746632022143860041252142846691648490809250856\
+327057133540568617791625295314357533564192304930155735301757\
+457531580062662693966772497728335047637869054460240023262262\
+260698443946964564691259441706490611176164305693669515767804\
+836460521205954731752583848846525153811934541997962775215961\
+180346397456122329133421016560406277159258781706172834569862\
+946953007793254152187010227976038449980797987728559041018441\
+590564594738308310579014597893182017151615208050090318483536\
+106249131918576316944251537092347119867433735046169725181104\
+507590928834713669184230634083190791725243913641206256399101\
+550966117564795555149420011152858441084271411289366093158722\
+254752761637144762690747726313899449121995142565661043193165\
+353010677613760383307839362361625628371456344409245507081913\
+518237257141164239966660785903970075181826808229440731778746\
+830751045427285945936163931997929399708401851740705527023711\
+492262489476846435969872480702228386506357017948329114555484\
+164760105906717855684788039081591713778852802032849601308169\
+832017420608399347713424218434541771868442189843417628618330\
+607429739733739437863581804003482214082370567967330530446020\
+897773385726872912189813323094415093143437550397556262780011\
+208941731420098754319961419532567861629590267320403217607660\
+774125374101195389953895035347940170148097810952083736798564\
+420421622607993390894450932047257403433908665884124601384175\
+012387617430467934818665777122459487877479257747635172691688\
+471574765285820096075133353869554987216398800026453207557923\
+535966131756358352198875705382763163680830588056974671628368\
+719411827591592806044707764658145625683998557872894583705117\
+936257144994734815912058252772021032081682437093280526665192\
+728869800954748014250481042845426151143544474372887617562791\
+409866964806319608280819816846942058817381943129762034507591\
+367065185343216917751414811188645979508942996964383255432999\
+246119971295726296202396921903289017490293595312645036697141\
+581149988784499288560584613793415358537364677872496224892098\
+940856692342358755626519304557946447004033186014602147449599\
+351317079758304444877174136521487256811625263467410007624215\
+856145392339552689565690577293133060124853654497575571509576\
+408069646196646757505249296126372820539234090564691695806544\
+715766025588258581902342311480969412221466852421842650484494\
+063894865891424563992751226230317059592413191308470146226366\
+458233536657973376067140793776369412191789801225320255079444\
+592709005698858098716107025188986428347407279053266600044521\
+079987989879536957560131070100060050673537683871138182387904\
+590837539252425985326631955455857258818756188063697492342550\
+045277400125480079927908846850898283905756532829762950509886\
+991675925213188409911532242068610889478326451513981115020992\
+630395715520350039372702741107911736947893709538471200363740\
+669304116845653259038102180504837110789645359520309929381266\
+271463740502507456882882255788069710715770802338317704510793\
+279398576163709512326095306022330346997717688118726634628650\
+675984237916551201500684504118483305560295744746257951860545\
+390826531622290588364837980034428055971370065573420370270905\
+592141420051502465016793525150950140243606137664910359769114\
+512792293426708006440346732679574519594848136194781488696994\
+267355775509666977187349644291823026624985531726865131782364\
+428380093055155988532106121916567178604128111080322761213573\
+781334480667563871257352254033032675246444238637990062075058\
+819854494711379915549313390179300091783493496822950479766923\
+983305064901026858870340863556799948310622536592472509634484\
+910640735459644047154918467543140024764605449756679450446473\
+048922824617117723876384637412932380635306714345354710568410\
+140587435077620501285599837051978855056335305570615129711860\
+309387503970812843734718712815925040263182888714533431137355\
+255722368962836390856001176889513153529416105504464217522618\
+741534232432067776306691118141998014985541610448993152948945\
+865983354717289054861249734477980864059509622993770525110616\
+313865830823478927462500895844216364365499438449134659145333\
+799994034010282254566331595018205841080487728993632798168070\
+476921205941768965021887178681810499301253039335978279707627\
+295287697256489961179958946847840431902105306618594831078534\
+622089641993900896756734276531931450266972752637997248151974\
+2277811246822238899767398834228515625e-4951L;
+static const long double ld1c =
+1.8225997659412373012642029668097099081995254078467816718604\
+902435141858443166988684047803543129136025986236736736017655\
+509834928163110160849867540377949045027419112905889658392846\
+126319028167798783107812829917053644701598967767636342956203\
+999770864055077592691915230273843577112246476529298591341071\
+313110337661777304220340396298768698441131694859514066773321\
+059786469060001083813361460161387168195154228027648977594276\
+496061276605855817438145692314650177569263750801566422892936\
+732834290416745265618525969943519916542939199731612507343012\
+297331882934352282118173551211985973294301787840335672389913\
+821098681464088756477802684228806339233239542587316254618680\
+197563613907079766830481997222017010585267442240109888818022\
+189543438116245170584546472752661417773021275082355242554950\
+776248474101880875363872607989624146320823364146896124171892\
+610744237622308266702265704492674694505399997330424978964704\
+335411125839490463131661420668167686151828553033363555080508\
+484934542727634080467233927879117726432283352324546435315312\
+937809651095964197873430398662003709663353962932921239516263\
+008572512558260093668527782388349282015308359304941505110445\
+043762021191469060607078792635897736408141163554429972292873\
+575169264387977130124003958599909776720759582995017519144111\
+001778329839793855454688442046155253818724410472281602421363\
+580613990749181808302947976045417884436271162664776148749463\
+202753814797191206392480969096910387729527305862739806702349\
+088455828380471306603628636563037414688265702108098430515297\
+645997107159687247830496686980315376091511219227376708389862\
+310190633134517040835432587726931910775044780329777051964574\
+763119639404235797665922677433332402402817037657141926646502\
+612388421085254756323737273178774331073924707711575555193153\
+421957126062196520952920611871114861423032687425262323243276\
+848595495133802591437804984986053892365334900647137137197585\
+161954823956838391108748154877098567190695813394392779995887\
+642254413740232692940887236351533691174492514884514265006822\
+752026136435469700291628942927286843274959781329315250417360\
+438115330104516894597449604875954147108010051910197388860417\
+003307595774863477182911525109554542883460240867674794470854\
+883815424039187014069246137704710366577005576311674384079810\
+437206511282792194562503036151028910065418370565117488062226\
+073975854919243439941741016447206284543777826080409075756028\
+194465562812076645422284670475730922346454505830553174377950\
+824178034708147037448871898963699023373821217419560423459358\
+846127232531421552826545954362386431279626917642725181802754\
+271134597856231805666129524101509582941585421888561296839474\
+232056474112935379177434928227554149402642893913492062781246\
+372611175305462271711931011635602039137701669573065960945871\
+579420683440097179831368317352157202215160682058878025153007\
+184185319863451652087375936651004559837502483808090613073982\
+264685620351993519454344577635257452328683726988824705474397\
+398247190812883071734743260426540123481791283782928972842466\
+595210269414219040901793935553872090377394005932597887081359\
+481915849178541128182923272843218513093012167744690818603663\
+862691727272565325057703378827553284852502067686026850339624\
+401046086817036618366842240024522042069888708534827471235203\
+998932259309110942367856287784097166420437430118381247339347\
+418156902369282431197735078016591613063918260343498992697002\
+033186558413655576703389208301203552157755701852051877927864\
+696515420369217703510602759815252574799728706795849558382877\
+392016396900560101736741462690753991602263974212137632508984\
+264559315540891383192361601189350414311358816980975697568561\
+515680971830107704152657284552920241862730125888825702301035\
+564615759615882010733764341109834449576907982406265803484111\
+303615971297609065271517286111839839646343815364461776394273\
+571391219315553915335300622295196577640884201524657614065743\
+729121754460652975075990012786021662416077757235487562550381\
+116824006014440438178253273174734436163638119532295383351135\
+543170811596051785036366846773285937845231974424475418970517\
+659179798069972876889488877627309887323737590814875050457317\
+809625163713227973229002908003491739085115971899606986738405\
+752463436186745107821032315480693516006251388789902053863235\
+071957895722121876262598833823352290042576488238120724072267\
+480348425637199003147760378463243043407534395221882144887315\
+875876025907739792297575795373506429192468470170038312050500\
+917665707583420927303790875332407805094505665159755210495266\
+485594187244922216154283213688032393939401426499517609275128\
+062067355172333120857796045387692492375534056470145301671359\
+016602832469675123108598588424022216759334733452626330303791\
+660952659036162827509451468771297954737165701921676834866994\
+084496268491510599580714458155026746676860790028899722645883\
+679435969902046442373108472951515492761911884847211825930115\
+654927539118088350255959445076757398298893380662248358210075\
+297702191186519614515280395341723177201383862827129721649638\
+274531314762377778754560119397123180107310216608157141828379\
+259328274508467371717057031104537750450228447941619684073375\
+630517322006118640290925241602376256334414376495602911265450\
+165889418372161719063670619610214632774542741157366426747861\
+054811449449004970132668146607323502760146957586465275981090\
+328336256381187450646030492071694516054712444513961269623339\
+705411366337817643269316717217432478812002049894979925260411\
+553651385384826214231392012841425936827944383266227115236029\
+717393064659821056467446870597828757433936024422511537561864\
+619865595955628070343780472634463916608440151554502790128417\
+277259492437005696576453717387309605129939526661181496994297\
+244693710437436581443653555343763817246961834486181294985455\
+884981266421533438177271809310897035958260776218253097858601\
+160643120653927024652834025146166356877731266566437231429061\
+099807825113272551869352908241073955695854354852545370793609\
+838167127357752579007490955536081388103461735071174567636929\
+060824172375010035497010614957197713919909924635906503348016\
+450952475530978921242656498701313530533991692867619886826204\
+706468476070943378163577235406861262755114909606255628375659\
+196050370661430148107216310635729360112021571291096278032076\
+401092225373270173950575377792566872113768085940991929655824\
+050914085013970861399015141010432835406337266746706727481946\
+196898882472095111505210339933002505227334750020285673634670\
+738458390159933494226851499935336922036551687169140582574153\
+726872453800858360764892975201757027862632615130256075468549\
+502839367841926212872731925042838691319757663382746471782087\
+828988857978192483595747889021081459460627705275735868618724\
+958783348362295106875556443770626864591972089881215465141073\
+516646930158996569747675806719463602045230325049794904894739\
+988312727573320971310488326486213061839843830003145873279435\
+454121817918269218294901387830156432148142381592864575229119\
+479029130050663564889172093067341444164942736885872753984012\
+865743421266470861425283889134636885790293235727017788606167\
+560012477186697069994213912998550931078617189790771376702549\
+055361745205232419031423044366971378594392952093464046441667\
+117613906203494872209149396518971207279263883566606774353236\
+255473603377861613942239543893894460581170658088042083661404\
+937465706659424639301296621963906278930754459296017486063079\
+582024995485338893699574289806529424673393810217577605952909\
+491283123179789154639057105774960699934999681018155749261864\
+012821574480758746632022143860041252142846691648490809250856\
+327057133540568617791625295314357533564192304930155735301757\
+457531580062662693966772497728335047637869054460240023262262\
+260698443946964564691259441706490611176164305693669515767804\
+836460521205954731752583848846525153811934541997962775215961\
+180346397456122329133421016560406277159258781706172834569862\
+946953007793254152187010227976038449980797987728559041018441\
+590564594738308310579014597893182017151615208050090318483536\
+106249131918576316944251537092347119867433735046169725181104\
+507590928834713669184230634083190791725243913641206256399101\
+550966117564795555149420011152858441084271411289366093158722\
+254752761637144762690747726313899449121995142565661043193165\
+353010677613760383307839362361625628371456344409245507081913\
+518237257141164239966660785903970075181826808229440731778746\
+830751045427285945936163931997929399708401851740705527023711\
+492262489476846435969872480702228386506357017948329114555484\
+164760105906717855684788039081591713778852802032849601308169\
+832017420608399347713424218434541771868442189843417628618330\
+607429739733739437863581804003482214082370567967330530446020\
+897773385726872912189813323094415093143437550397556262780011\
+208941731420098754319961419532567861629590267320403217607660\
+774125374101195389953895035347940170148097810952083736798564\
+420421622607993390894450932047257403433908665884124601384175\
+012387617430467934818665777122459487877479257747635172691688\
+471574765285820096075133353869554987216398800026453207557923\
+535966131756358352198875705382763163680830588056974671628368\
+719411827591592806044707764658145625683998557872894583705117\
+936257144994734815912058252772021032081682437093280526665192\
+728869800954748014250481042845426151143544474372887617562791\
+409866964806319608280819816846942058817381943129762034507591\
+367065185343216917751414811188645979508942996964383255432999\
+246119971295726296202396921903289017490293595312645036697141\
+581149988784499288560584613793415358537364677872496224892098\
+940856692342358755626519304557946447004033186014602147449599\
+351317079758304444877174136521487256811625263467410007624215\
+856145392339552689565690577293133060124853654497575571509576\
+408069646196646757505249296126372820539234090564691695806544\
+715766025588258581902342311480969412221466852421842650484494\
+063894865891424563992751226230317059592413191308470146226366\
+458233536657973376067140793776369412191789801225320255079444\
+592709005698858098716107025188986428347407279053266600044521\
+079987989879536957560131070100060050673537683871138182387904\
+590837539252425985326631955455857258818756188063697492342550\
+045277400125480079927908846850898283905756532829762950509886\
+991675925213188409911532242068610889478326451513981115020992\
+630395715520350039372702741107911736947893709538471200363740\
+669304116845653259038102180504837110789645359520309929381266\
+271463740502507456882882255788069710715770802338317704510793\
+279398576163709512326095306022330346997717688118726634628650\
+675984237916551201500684504118483305560295744746257951860545\
+390826531622290588364837980034428055971370065573420370270905\
+592141420051502465016793525150950140243606137664910359769114\
+512792293426708006440346732679574519594848136194781488696994\
+267355775509666977187349644291823026624985531726865131782364\
+428380093055155988532106121916567178604128111080322761213573\
+781334480667563871257352254033032675246444238637990062075058\
+819854494711379915549313390179300091783493496822950479766923\
+983305064901026858870340863556799948310622536592472509634484\
+910640735459644047154918467543140024764605449756679450446473\
+048922824617117723876384637412932380635306714345354710568410\
+140587435077620501285599837051978855056335305570615129711860\
+309387503970812843734718712815925040263182888714533431137355\
+255722368962836390856001176889513153529416105504464217522618\
+741534232432067776306691118141998014985541610448993152948945\
+865983354717289054861249734477980864059509622993770525110616\
+313865830823478927462500895844216364365499438449134659145333\
+799994034010282254566331595018205841080487728993632798168070\
+476921205941768965021887178681810499301253039335978279707627\
+295287697256489961179958946847840431902105306618594831078534\
+622089641993900896756734276531931450266972752637997248151974\
+2277811246822238899767398834228515625001e-4951L;
+/* 0x1.8p-16445 */
+static const long double ld2ae = 0x1p-16445L, ld2be = 0x2p-16445L, ld2ce = 0x2p-16445L;
+static const long double ld2a =
+5.4677992978237119037926089004291297245985762235403450155814\
+707305425575329500966052143410629387408077958710210208052966\
+529504784489330482549602621133847135082257338717668975178538\
+378957084503396349323438489751160934104796903302909028868611\
+999312592165232778075745690821530731336739429587895774023213\
+939331012985331912661021188896306095323395084578542200319963\
+179359407180003251440084380484161504585462684082946932782829\
+488183829817567452314437076943950532707791252404699268678810\
+198502871250235796855577909830559749628817599194837522029036\
+891995648803056846354520653635957919882905363521007017169741\
+463296044392266269433408052686419017699718627761948763856040\
+592690841721239300491445991666051031755802326720329666454066\
+568630314348735511753639418257984253319063825247065727664852\
+328745422305642626091617823968872438962470092440688372515677\
+832232712866924800106797113478024083516199991991274936894113\
+006233377518471389394984262004503058455485659100090665241525\
+454803628182902241401701783637353179296850056973639305945938\
+813428953287892593620291195986011128990061888798763718548789\
+025717537674780281005583347165047846045925077914824515331335\
+131286063574407181821236377907693209224423490663289916878620\
+725507793163931390372011875799729330162278748985052557432333\
+005334989519381566364065326138465761456173231416844807264090\
+741841972247545424908843928136253653308813487994328446248389\
+608261444391573619177442907290731163188581917588219420107047\
+265367485141413919810885909689112244064797106324295291545892\
+937991321479061743491490060940946128274533657682130125169586\
+930571899403551122506297763180795732325134340989331155893724\
+289358918212707392997768032299997207208451112971425779939507\
+837165263255764268971211819536322993221774123134726665579460\
+265871378186589562858761835613344584269098062275786969729830\
+545786485401407774313414954958161677096004701941411411592755\
+485864471870515173326244464631295701572087440183178339987662\
+926763241220698078822661709054601073523477544653542795020468\
+256078409306409100874886828781860529824879343987945751252081\
+314345990313550683792348814627862441324030155730592166581251\
+009922787324590431548734575328663628650380722603024383412564\
+651446272117561042207738413114131099731016728935023152239431\
+311619533848376583687509108453086730196255111695352464186678\
+221927564757730319825223049341618853631333478241227227268084\
+583396688436229936266854011427192767039363517491659523133852\
+472534104124441112346615696891097070121463652258681270378076\
+538381697594264658479637863087159293838880752928175545408262\
+813403793568695416998388572304528748824756265665683890518422\
+696169422338806137532304784682662448207928681740476188343739\
+117833525916386815135793034906806117413105008719197882837614\
+738262050320291539494104952056471606645482046176634075459021\
+552555959590354956262127809953013679512507451424271839221946\
+794056861055980558363033732905772356986051180966474116423192\
+194741572438649215204229781279620370445373851348786918527399\
+785630808242657122705381806661616271132182017797793661244078\
+445747547535623384548769818529655539279036503234072455810991\
+588075181817695975173110136482659854557506203058080551018873\
+203138260451109855100526720073566126209666125604482413705611\
+996796777927332827103568863352291499261312290355143742018042\
+254470707107847293593205234049774839191754781030496978091006\
+099559675240966730110167624903610656473267105556155633783594\
+089546261107653110531808279445757724399186120387548675148632\
+176049190701680305210224388072261974806791922636412897526952\
+793677946622674149577084803568051242934076450942927092705684\
+547042915490323112457971853658760725588190377666477106903106\
+693847278847646032201293023329503348730723947218797410452333\
+910847913892827195814551858335519518939031446093385329182820\
+714173657946661746005901866885589732922652604573972842197231\
+187365263381958925227970038358064987248233271706462687651143\
+350472018043321314534759819524203308490914358596886150053406\
+629512434788155355109100540319857813535695923273426256911552\
+977539394209918630668466632881929661971212772444625151371953\
+428875491139683919687008724010475217255347915698820960215217\
+257390308560235323463096946442080548018754166369706161589705\
+215873687166365628787796501470056870127729464714362172216802\
+441045276911597009443281135389729130222603185665646434661947\
+627628077723219376892727386120519287577405410510114936151502\
+752997122750262781911372625997223415283516995479265631485799\
+456782561734766648462849641064097181818204279498552827825384\
+186202065516999362573388136163077477126602169410435905014077\
+049808497409025369325795765272066650278004200357878990911374\
+982857977108488482528354406313893864211497105765030504600982\
+253488805474531798742143374465080240030582370086699167937651\
+038307909706139327119325418854546478285735654541635477790346\
+964782617354265050767878335230272194896680141986745074630225\
+893106573559558843545841186025169531604151588481389164948914\
+823593944287133336263680358191369540321930649824471425485137\
+777984823525402115151171093313613251350685343824859052220126\
+891551966018355920872775724807128769003243129486808733796350\
+497668255116485157191011858830643898323628223472099280243583\
+164434348347014910398004439821970508280440872759395827943270\
+985008769143562351938091476215083548164137333541883808870019\
+116234099013452929807950151652297436436006149684939775781234\
+660954156154478642694176038524277810483833149798681345708089\
+152179193979463169402340611793486272301808073267534612685593\
+859596787866884211031341417903391749825320454663508370385251\
+831778477311017089729361152161928815389818579983544490982891\
+734081131312309744330960666031291451740885503458543884956367\
+654943799264600314531815427932691107874782328654759293575803\
+481929361961781073958502075438499070633193799699311694287183\
+299423475339817655608058724723221867087563064557636112380829\
+514501382073257737022472866608244164310385205213523702910787\
+182472517125030106491031844871593141759729773907719510044049\
+352857426592936763727969496103940591601975078602859660478614\
+119405428212830134490731706220583788265344728818766885126977\
+588151111984290444321648931907188080336064713873288834096229\
+203276676119810521851726133377700616341304257822975788967472\
+152742255041912584197045423031298506219011800240120182445838\
+590696647416285334515631019799007515682004250060857020904012\
+215375170479800482680554499806010766109655061507421747722461\
+180617361402575082294678925605271083587897845390768226405648\
+508518103525778638618195775128516073959272990148239415346263\
+486966573934577450787243667063244378381883115827207605856174\
+876350045086885320626669331311880593775916269643646395423220\
+549940790476989709243027420158390806135690975149384714684219\
+964938182719962913931464979458639185519531490009437619838306\
+362365453754807654884704163490469296444427144778593725687358\
+437087390151990694667516279202024332494828210657618261952038\
+597230263799412584275851667403910657370879707181053365818502\
+680037431560091209982641738995652793235851569372314130107647\
+166085235615697257094269133100914135783178856280392139325001\
+352841718610484616627448189556913621837791650699820323059708\
+766420810133584841826718631681683381743511974264126250984214\
+812397119978273917903889865891718836792263377888052458189238\
+746074986456016681098722869419588274020181430652732817858728\
+473849369539367463917171317324882099804999043054467247785592\
+038464723442276239896066431580123756428540074945472427752568\
+981171400621705853374875885943072600692576914790467205905272\
+372594740187988081900317493185005142913607163380720069786786\
+782095331840893694073778325119471833528492917081008547303414\
+509381563617864195257751546539575461435803625993888325647883\
+541039192368366987400263049681218831477776345118518503709588\
+840859023379762456561030683928115349942393963185677123055324\
+771693784214924931737043793679546051454845624150270955450608\
+318747395755728950832754611277041359602301205138509175543313\
+522772786504141007552691902249572375175731740923618769197304\
+652898352694386665448260033458575323252814233868098279476166\
+764258284911434288072243178941698347365985427696983129579496\
+059032032841281149923518087084876885114369033227736521245740\
+554711771423492719899982357711910225545480424688322195336240\
+492253136281857837808491795993788199125205555222116581071134\
+476787468430539307909617442106685159519071053844987343666452\
+494280317720153567054364117244775141336558406098548803924509\
+496052261825198043140272655303625315605326569530252885854991\
+822289219201218313590745412010446642247111703901991591338062\
+693320157180618736569439969283245279430312651192668788340033\
+626825194260296262959884258597703584888770801961209652822982\
+322376122303586169861685106043820510444293432856251210395693\
+261264867823980172683352796141772210301725997652373804152525\
+037162852291403804455997331367378463632437773242905518075065\
+414724295857460288225400061608664961649196400079359622673770\
+607898395269075056596627116148289491042491764170924014885106\
+158235482774778418134123293974436877051995673618683751115353\
+808771434984204447736174758316063096245047311279841579995578\
+186609402864244042751443128536278453430633423118662852688374\
+229600894418958824842459450540826176452145829389286103522774\
+101195556029650753254244433565937938526828990893149766298997\
+738359913887178888607190765709867052470880785937935110091424\
+743449966353497865681753841380246075612094033617488674676296\
+822570077027076266879557913673839341012099558043806442348798\
+053951239274913334631522409564461770434875790402230022872647\
+568436177018658068697071731879399180374560963492726714528729\
+224208938589940272515747888379118461617702271694075087419634\
+147298076764775745707026934442908236664400557265527951453482\
+191684597674273691978253678690951178777239573925410438679099\
+374700609973920128201422381329108236575369403675960765238333\
+778127017096574296148321075566959285042221837159799800133563\
+239963969638610872680393210300180152020613051613414547163713\
+772512617757277955979895866367571776456268564191092477027650\
+135832200376440239783726540552694851717269598489288851529660\
+975027775639565229734596726205832668434979354541943345062977\
+891187146561050118118108223323735210843681128615413601091222\
+007912350536959777114306541514511332368936078560929788143798\
+814391221507522370648646767364209132147312407014953113532379\
+838195728491128536978285918066991040993153064356179903885952\
+027952713749653604502053512355449916680887234238773855581636\
+172479594866871765094513940103284167914110196720261110812716\
+776424260154507395050380575452850420730818412994731079307343\
+538376880280124019321040198038723558784544408584344466090982\
+802067326529000931562048932875469079874956595180595395347093\
+285140279165467965596318365749701535812384333240968283640721\
+344003442002691613772056762099098025739332715913970186225176\
+459563484134139746647940170537900275350480490468851439300771\
+949915194703080576611022590670399844931867609777417528903454\
+731922206378932141464755402629420074293816349270038351339419\
+146768473851353171629153912238797141905920143036064131705230\
+421762305232861503856799511155936565169005916711845389135580\
+928162511912438531204156138447775120789548666143600293412065\
+767167106888509172568003530668539460588248316513392652567856\
+224602697296203328920073354425994044956624831346979458846837\
+597950064151867164583749203433942592178528868981311575331848\
+941597492470436782387502687532649093096498315347403977436001\
+399982102030846763698994785054617523241463186980898394504211\
+430763617825306895065661536045431497903759118007934839122881\
+885863091769469883539876840543521295706315919855784493235603\
+866268925981702690270202829595794350800918257913991744455922\
+6833433740466716699302196502685546874999e-4951L;
+static const long double ld2b =
+5.4677992978237119037926089004291297245985762235403450155814\
+707305425575329500966052143410629387408077958710210208052966\
+529504784489330482549602621133847135082257338717668975178538\
+378957084503396349323438489751160934104796903302909028868611\
+999312592165232778075745690821530731336739429587895774023213\
+939331012985331912661021188896306095323395084578542200319963\
+179359407180003251440084380484161504585462684082946932782829\
+488183829817567452314437076943950532707791252404699268678810\
+198502871250235796855577909830559749628817599194837522029036\
+891995648803056846354520653635957919882905363521007017169741\
+463296044392266269433408052686419017699718627761948763856040\
+592690841721239300491445991666051031755802326720329666454066\
+568630314348735511753639418257984253319063825247065727664852\
+328745422305642626091617823968872438962470092440688372515677\
+832232712866924800106797113478024083516199991991274936894113\
+006233377518471389394984262004503058455485659100090665241525\
+454803628182902241401701783637353179296850056973639305945938\
+813428953287892593620291195986011128990061888798763718548789\
+025717537674780281005583347165047846045925077914824515331335\
+131286063574407181821236377907693209224423490663289916878620\
+725507793163931390372011875799729330162278748985052557432333\
+005334989519381566364065326138465761456173231416844807264090\
+741841972247545424908843928136253653308813487994328446248389\
+608261444391573619177442907290731163188581917588219420107047\
+265367485141413919810885909689112244064797106324295291545892\
+937991321479061743491490060940946128274533657682130125169586\
+930571899403551122506297763180795732325134340989331155893724\
+289358918212707392997768032299997207208451112971425779939507\
+837165263255764268971211819536322993221774123134726665579460\
+265871378186589562858761835613344584269098062275786969729830\
+545786485401407774313414954958161677096004701941411411592755\
+485864471870515173326244464631295701572087440183178339987662\
+926763241220698078822661709054601073523477544653542795020468\
+256078409306409100874886828781860529824879343987945751252081\
+314345990313550683792348814627862441324030155730592166581251\
+009922787324590431548734575328663628650380722603024383412564\
+651446272117561042207738413114131099731016728935023152239431\
+311619533848376583687509108453086730196255111695352464186678\
+221927564757730319825223049341618853631333478241227227268084\
+583396688436229936266854011427192767039363517491659523133852\
+472534104124441112346615696891097070121463652258681270378076\
+538381697594264658479637863087159293838880752928175545408262\
+813403793568695416998388572304528748824756265665683890518422\
+696169422338806137532304784682662448207928681740476188343739\
+117833525916386815135793034906806117413105008719197882837614\
+738262050320291539494104952056471606645482046176634075459021\
+552555959590354956262127809953013679512507451424271839221946\
+794056861055980558363033732905772356986051180966474116423192\
+194741572438649215204229781279620370445373851348786918527399\
+785630808242657122705381806661616271132182017797793661244078\
+445747547535623384548769818529655539279036503234072455810991\
+588075181817695975173110136482659854557506203058080551018873\
+203138260451109855100526720073566126209666125604482413705611\
+996796777927332827103568863352291499261312290355143742018042\
+254470707107847293593205234049774839191754781030496978091006\
+099559675240966730110167624903610656473267105556155633783594\
+089546261107653110531808279445757724399186120387548675148632\
+176049190701680305210224388072261974806791922636412897526952\
+793677946622674149577084803568051242934076450942927092705684\
+547042915490323112457971853658760725588190377666477106903106\
+693847278847646032201293023329503348730723947218797410452333\
+910847913892827195814551858335519518939031446093385329182820\
+714173657946661746005901866885589732922652604573972842197231\
+187365263381958925227970038358064987248233271706462687651143\
+350472018043321314534759819524203308490914358596886150053406\
+629512434788155355109100540319857813535695923273426256911552\
+977539394209918630668466632881929661971212772444625151371953\
+428875491139683919687008724010475217255347915698820960215217\
+257390308560235323463096946442080548018754166369706161589705\
+215873687166365628787796501470056870127729464714362172216802\
+441045276911597009443281135389729130222603185665646434661947\
+627628077723219376892727386120519287577405410510114936151502\
+752997122750262781911372625997223415283516995479265631485799\
+456782561734766648462849641064097181818204279498552827825384\
+186202065516999362573388136163077477126602169410435905014077\
+049808497409025369325795765272066650278004200357878990911374\
+982857977108488482528354406313893864211497105765030504600982\
+253488805474531798742143374465080240030582370086699167937651\
+038307909706139327119325418854546478285735654541635477790346\
+964782617354265050767878335230272194896680141986745074630225\
+893106573559558843545841186025169531604151588481389164948914\
+823593944287133336263680358191369540321930649824471425485137\
+777984823525402115151171093313613251350685343824859052220126\
+891551966018355920872775724807128769003243129486808733796350\
+497668255116485157191011858830643898323628223472099280243583\
+164434348347014910398004439821970508280440872759395827943270\
+985008769143562351938091476215083548164137333541883808870019\
+116234099013452929807950151652297436436006149684939775781234\
+660954156154478642694176038524277810483833149798681345708089\
+152179193979463169402340611793486272301808073267534612685593\
+859596787866884211031341417903391749825320454663508370385251\
+831778477311017089729361152161928815389818579983544490982891\
+734081131312309744330960666031291451740885503458543884956367\
+654943799264600314531815427932691107874782328654759293575803\
+481929361961781073958502075438499070633193799699311694287183\
+299423475339817655608058724723221867087563064557636112380829\
+514501382073257737022472866608244164310385205213523702910787\
+182472517125030106491031844871593141759729773907719510044049\
+352857426592936763727969496103940591601975078602859660478614\
+119405428212830134490731706220583788265344728818766885126977\
+588151111984290444321648931907188080336064713873288834096229\
+203276676119810521851726133377700616341304257822975788967472\
+152742255041912584197045423031298506219011800240120182445838\
+590696647416285334515631019799007515682004250060857020904012\
+215375170479800482680554499806010766109655061507421747722461\
+180617361402575082294678925605271083587897845390768226405648\
+508518103525778638618195775128516073959272990148239415346263\
+486966573934577450787243667063244378381883115827207605856174\
+876350045086885320626669331311880593775916269643646395423220\
+549940790476989709243027420158390806135690975149384714684219\
+964938182719962913931464979458639185519531490009437619838306\
+362365453754807654884704163490469296444427144778593725687358\
+437087390151990694667516279202024332494828210657618261952038\
+597230263799412584275851667403910657370879707181053365818502\
+680037431560091209982641738995652793235851569372314130107647\
+166085235615697257094269133100914135783178856280392139325001\
+352841718610484616627448189556913621837791650699820323059708\
+766420810133584841826718631681683381743511974264126250984214\
+812397119978273917903889865891718836792263377888052458189238\
+746074986456016681098722869419588274020181430652732817858728\
+473849369539367463917171317324882099804999043054467247785592\
+038464723442276239896066431580123756428540074945472427752568\
+981171400621705853374875885943072600692576914790467205905272\
+372594740187988081900317493185005142913607163380720069786786\
+782095331840893694073778325119471833528492917081008547303414\
+509381563617864195257751546539575461435803625993888325647883\
+541039192368366987400263049681218831477776345118518503709588\
+840859023379762456561030683928115349942393963185677123055324\
+771693784214924931737043793679546051454845624150270955450608\
+318747395755728950832754611277041359602301205138509175543313\
+522772786504141007552691902249572375175731740923618769197304\
+652898352694386665448260033458575323252814233868098279476166\
+764258284911434288072243178941698347365985427696983129579496\
+059032032841281149923518087084876885114369033227736521245740\
+554711771423492719899982357711910225545480424688322195336240\
+492253136281857837808491795993788199125205555222116581071134\
+476787468430539307909617442106685159519071053844987343666452\
+494280317720153567054364117244775141336558406098548803924509\
+496052261825198043140272655303625315605326569530252885854991\
+822289219201218313590745412010446642247111703901991591338062\
+693320157180618736569439969283245279430312651192668788340033\
+626825194260296262959884258597703584888770801961209652822982\
+322376122303586169861685106043820510444293432856251210395693\
+261264867823980172683352796141772210301725997652373804152525\
+037162852291403804455997331367378463632437773242905518075065\
+414724295857460288225400061608664961649196400079359622673770\
+607898395269075056596627116148289491042491764170924014885106\
+158235482774778418134123293974436877051995673618683751115353\
+808771434984204447736174758316063096245047311279841579995578\
+186609402864244042751443128536278453430633423118662852688374\
+229600894418958824842459450540826176452145829389286103522774\
+101195556029650753254244433565937938526828990893149766298997\
+738359913887178888607190765709867052470880785937935110091424\
+743449966353497865681753841380246075612094033617488674676296\
+822570077027076266879557913673839341012099558043806442348798\
+053951239274913334631522409564461770434875790402230022872647\
+568436177018658068697071731879399180374560963492726714528729\
+224208938589940272515747888379118461617702271694075087419634\
+147298076764775745707026934442908236664400557265527951453482\
+191684597674273691978253678690951178777239573925410438679099\
+374700609973920128201422381329108236575369403675960765238333\
+778127017096574296148321075566959285042221837159799800133563\
+239963969638610872680393210300180152020613051613414547163713\
+772512617757277955979895866367571776456268564191092477027650\
+135832200376440239783726540552694851717269598489288851529660\
+975027775639565229734596726205832668434979354541943345062977\
+891187146561050118118108223323735210843681128615413601091222\
+007912350536959777114306541514511332368936078560929788143798\
+814391221507522370648646767364209132147312407014953113532379\
+838195728491128536978285918066991040993153064356179903885952\
+027952713749653604502053512355449916680887234238773855581636\
+172479594866871765094513940103284167914110196720261110812716\
+776424260154507395050380575452850420730818412994731079307343\
+538376880280124019321040198038723558784544408584344466090982\
+802067326529000931562048932875469079874956595180595395347093\
+285140279165467965596318365749701535812384333240968283640721\
+344003442002691613772056762099098025739332715913970186225176\
+459563484134139746647940170537900275350480490468851439300771\
+949915194703080576611022590670399844931867609777417528903454\
+731922206378932141464755402629420074293816349270038351339419\
+146768473851353171629153912238797141905920143036064131705230\
+421762305232861503856799511155936565169005916711845389135580\
+928162511912438531204156138447775120789548666143600293412065\
+767167106888509172568003530668539460588248316513392652567856\
+224602697296203328920073354425994044956624831346979458846837\
+597950064151867164583749203433942592178528868981311575331848\
+941597492470436782387502687532649093096498315347403977436001\
+399982102030846763698994785054617523241463186980898394504211\
+430763617825306895065661536045431497903759118007934839122881\
+885863091769469883539876840543521295706315919855784493235603\
+866268925981702690270202829595794350800918257913991744455922\
+6833433740466716699302196502685546875e-4951L;
+static const long double ld2c =
+5.4677992978237119037926089004291297245985762235403450155814\
+707305425575329500966052143410629387408077958710210208052966\
+529504784489330482549602621133847135082257338717668975178538\
+378957084503396349323438489751160934104796903302909028868611\
+999312592165232778075745690821530731336739429587895774023213\
+939331012985331912661021188896306095323395084578542200319963\
+179359407180003251440084380484161504585462684082946932782829\
+488183829817567452314437076943950532707791252404699268678810\
+198502871250235796855577909830559749628817599194837522029036\
+891995648803056846354520653635957919882905363521007017169741\
+463296044392266269433408052686419017699718627761948763856040\
+592690841721239300491445991666051031755802326720329666454066\
+568630314348735511753639418257984253319063825247065727664852\
+328745422305642626091617823968872438962470092440688372515677\
+832232712866924800106797113478024083516199991991274936894113\
+006233377518471389394984262004503058455485659100090665241525\
+454803628182902241401701783637353179296850056973639305945938\
+813428953287892593620291195986011128990061888798763718548789\
+025717537674780281005583347165047846045925077914824515331335\
+131286063574407181821236377907693209224423490663289916878620\
+725507793163931390372011875799729330162278748985052557432333\
+005334989519381566364065326138465761456173231416844807264090\
+741841972247545424908843928136253653308813487994328446248389\
+608261444391573619177442907290731163188581917588219420107047\
+265367485141413919810885909689112244064797106324295291545892\
+937991321479061743491490060940946128274533657682130125169586\
+930571899403551122506297763180795732325134340989331155893724\
+289358918212707392997768032299997207208451112971425779939507\
+837165263255764268971211819536322993221774123134726665579460\
+265871378186589562858761835613344584269098062275786969729830\
+545786485401407774313414954958161677096004701941411411592755\
+485864471870515173326244464631295701572087440183178339987662\
+926763241220698078822661709054601073523477544653542795020468\
+256078409306409100874886828781860529824879343987945751252081\
+314345990313550683792348814627862441324030155730592166581251\
+009922787324590431548734575328663628650380722603024383412564\
+651446272117561042207738413114131099731016728935023152239431\
+311619533848376583687509108453086730196255111695352464186678\
+221927564757730319825223049341618853631333478241227227268084\
+583396688436229936266854011427192767039363517491659523133852\
+472534104124441112346615696891097070121463652258681270378076\
+538381697594264658479637863087159293838880752928175545408262\
+813403793568695416998388572304528748824756265665683890518422\
+696169422338806137532304784682662448207928681740476188343739\
+117833525916386815135793034906806117413105008719197882837614\
+738262050320291539494104952056471606645482046176634075459021\
+552555959590354956262127809953013679512507451424271839221946\
+794056861055980558363033732905772356986051180966474116423192\
+194741572438649215204229781279620370445373851348786918527399\
+785630808242657122705381806661616271132182017797793661244078\
+445747547535623384548769818529655539279036503234072455810991\
+588075181817695975173110136482659854557506203058080551018873\
+203138260451109855100526720073566126209666125604482413705611\
+996796777927332827103568863352291499261312290355143742018042\
+254470707107847293593205234049774839191754781030496978091006\
+099559675240966730110167624903610656473267105556155633783594\
+089546261107653110531808279445757724399186120387548675148632\
+176049190701680305210224388072261974806791922636412897526952\
+793677946622674149577084803568051242934076450942927092705684\
+547042915490323112457971853658760725588190377666477106903106\
+693847278847646032201293023329503348730723947218797410452333\
+910847913892827195814551858335519518939031446093385329182820\
+714173657946661746005901866885589732922652604573972842197231\
+187365263381958925227970038358064987248233271706462687651143\
+350472018043321314534759819524203308490914358596886150053406\
+629512434788155355109100540319857813535695923273426256911552\
+977539394209918630668466632881929661971212772444625151371953\
+428875491139683919687008724010475217255347915698820960215217\
+257390308560235323463096946442080548018754166369706161589705\
+215873687166365628787796501470056870127729464714362172216802\
+441045276911597009443281135389729130222603185665646434661947\
+627628077723219376892727386120519287577405410510114936151502\
+752997122750262781911372625997223415283516995479265631485799\
+456782561734766648462849641064097181818204279498552827825384\
+186202065516999362573388136163077477126602169410435905014077\
+049808497409025369325795765272066650278004200357878990911374\
+982857977108488482528354406313893864211497105765030504600982\
+253488805474531798742143374465080240030582370086699167937651\
+038307909706139327119325418854546478285735654541635477790346\
+964782617354265050767878335230272194896680141986745074630225\
+893106573559558843545841186025169531604151588481389164948914\
+823593944287133336263680358191369540321930649824471425485137\
+777984823525402115151171093313613251350685343824859052220126\
+891551966018355920872775724807128769003243129486808733796350\
+497668255116485157191011858830643898323628223472099280243583\
+164434348347014910398004439821970508280440872759395827943270\
+985008769143562351938091476215083548164137333541883808870019\
+116234099013452929807950151652297436436006149684939775781234\
+660954156154478642694176038524277810483833149798681345708089\
+152179193979463169402340611793486272301808073267534612685593\
+859596787866884211031341417903391749825320454663508370385251\
+831778477311017089729361152161928815389818579983544490982891\
+734081131312309744330960666031291451740885503458543884956367\
+654943799264600314531815427932691107874782328654759293575803\
+481929361961781073958502075438499070633193799699311694287183\
+299423475339817655608058724723221867087563064557636112380829\
+514501382073257737022472866608244164310385205213523702910787\
+182472517125030106491031844871593141759729773907719510044049\
+352857426592936763727969496103940591601975078602859660478614\
+119405428212830134490731706220583788265344728818766885126977\
+588151111984290444321648931907188080336064713873288834096229\
+203276676119810521851726133377700616341304257822975788967472\
+152742255041912584197045423031298506219011800240120182445838\
+590696647416285334515631019799007515682004250060857020904012\
+215375170479800482680554499806010766109655061507421747722461\
+180617361402575082294678925605271083587897845390768226405648\
+508518103525778638618195775128516073959272990148239415346263\
+486966573934577450787243667063244378381883115827207605856174\
+876350045086885320626669331311880593775916269643646395423220\
+549940790476989709243027420158390806135690975149384714684219\
+964938182719962913931464979458639185519531490009437619838306\
+362365453754807654884704163490469296444427144778593725687358\
+437087390151990694667516279202024332494828210657618261952038\
+597230263799412584275851667403910657370879707181053365818502\
+680037431560091209982641738995652793235851569372314130107647\
+166085235615697257094269133100914135783178856280392139325001\
+352841718610484616627448189556913621837791650699820323059708\
+766420810133584841826718631681683381743511974264126250984214\
+812397119978273917903889865891718836792263377888052458189238\
+746074986456016681098722869419588274020181430652732817858728\
+473849369539367463917171317324882099804999043054467247785592\
+038464723442276239896066431580123756428540074945472427752568\
+981171400621705853374875885943072600692576914790467205905272\
+372594740187988081900317493185005142913607163380720069786786\
+782095331840893694073778325119471833528492917081008547303414\
+509381563617864195257751546539575461435803625993888325647883\
+541039192368366987400263049681218831477776345118518503709588\
+840859023379762456561030683928115349942393963185677123055324\
+771693784214924931737043793679546051454845624150270955450608\
+318747395755728950832754611277041359602301205138509175543313\
+522772786504141007552691902249572375175731740923618769197304\
+652898352694386665448260033458575323252814233868098279476166\
+764258284911434288072243178941698347365985427696983129579496\
+059032032841281149923518087084876885114369033227736521245740\
+554711771423492719899982357711910225545480424688322195336240\
+492253136281857837808491795993788199125205555222116581071134\
+476787468430539307909617442106685159519071053844987343666452\
+494280317720153567054364117244775141336558406098548803924509\
+496052261825198043140272655303625315605326569530252885854991\
+822289219201218313590745412010446642247111703901991591338062\
+693320157180618736569439969283245279430312651192668788340033\
+626825194260296262959884258597703584888770801961209652822982\
+322376122303586169861685106043820510444293432856251210395693\
+261264867823980172683352796141772210301725997652373804152525\
+037162852291403804455997331367378463632437773242905518075065\
+414724295857460288225400061608664961649196400079359622673770\
+607898395269075056596627116148289491042491764170924014885106\
+158235482774778418134123293974436877051995673618683751115353\
+808771434984204447736174758316063096245047311279841579995578\
+186609402864244042751443128536278453430633423118662852688374\
+229600894418958824842459450540826176452145829389286103522774\
+101195556029650753254244433565937938526828990893149766298997\
+738359913887178888607190765709867052470880785937935110091424\
+743449966353497865681753841380246075612094033617488674676296\
+822570077027076266879557913673839341012099558043806442348798\
+053951239274913334631522409564461770434875790402230022872647\
+568436177018658068697071731879399180374560963492726714528729\
+224208938589940272515747888379118461617702271694075087419634\
+147298076764775745707026934442908236664400557265527951453482\
+191684597674273691978253678690951178777239573925410438679099\
+374700609973920128201422381329108236575369403675960765238333\
+778127017096574296148321075566959285042221837159799800133563\
+239963969638610872680393210300180152020613051613414547163713\
+772512617757277955979895866367571776456268564191092477027650\
+135832200376440239783726540552694851717269598489288851529660\
+975027775639565229734596726205832668434979354541943345062977\
+891187146561050118118108223323735210843681128615413601091222\
+007912350536959777114306541514511332368936078560929788143798\
+814391221507522370648646767364209132147312407014953113532379\
+838195728491128536978285918066991040993153064356179903885952\
+027952713749653604502053512355449916680887234238773855581636\
+172479594866871765094513940103284167914110196720261110812716\
+776424260154507395050380575452850420730818412994731079307343\
+538376880280124019321040198038723558784544408584344466090982\
+802067326529000931562048932875469079874956595180595395347093\
+285140279165467965596318365749701535812384333240968283640721\
+344003442002691613772056762099098025739332715913970186225176\
+459563484134139746647940170537900275350480490468851439300771\
+949915194703080576611022590670399844931867609777417528903454\
+731922206378932141464755402629420074293816349270038351339419\
+146768473851353171629153912238797141905920143036064131705230\
+421762305232861503856799511155936565169005916711845389135580\
+928162511912438531204156138447775120789548666143600293412065\
+767167106888509172568003530668539460588248316513392652567856\
+224602697296203328920073354425994044956624831346979458846837\
+597950064151867164583749203433942592178528868981311575331848\
+941597492470436782387502687532649093096498315347403977436001\
+399982102030846763698994785054617523241463186980898394504211\
+430763617825306895065661536045431497903759118007934839122881\
+885863091769469883539876840543521295706315919855784493235603\
+866268925981702690270202829595794350800918257913991744455922\
+6833433740466716699302196502685546875001e-4951L;
+/* 0x1.0000000000000001p16383 */
+static const long double ld3ae = 0x1p16383L, ld3be = 0x1p16383L, ld3ce = 0x1.0000000000000002p16383L;
+static const long double ld3a =
+5.9486574767861588257512740011252202817891302594919813725251\
+295428739285541899832559628345030434759848834258858109152060\
+168394580447354320917546191141469316674407503401251826592118\
+529247805068466318759038608659253988075214874609536526621357\
+456531393890166762179915866732524251539065872543957371571521\
+983821811625262362379785274802094595537134203491628334800642\
+100552410980148340419844099304716014319891796892117978584065\
+642215994189779833796388294931075153217985342401232585488548\
+183499573356819649604353341808627018653300000165159821533158\
+398534762310007133107769480816106094590754928301890268526601\
+948012303315011492834812113743989351274355589970363438128551\
+573643438403526566620300559126131289478114044934210031633528\
+263569989916613277150372804081100885766846923338387335735275\
+815690693627425316500993091757924061275520326543377826484801\
+260850814410014200240706874882235908793464063722267631785502\
+588978890438298369667014685160756795261293064179236782450102\
+879817506411379585551974343148401888001113058696688771238532\
+123329163319380775763389985796856252232367435778523577763581\
+076318820356483011816956309162306010784749642144593052844981\
+144455778303480881727480293033710826466852650686573284449164\
+971550815761322623554550767170481569400661823142075309755585\
+825399262942161733431916879499819498306470556518202895225167\
+570891857833504708712937447726161123901897152190727519098753\
+173091256107155059564163182449945325514965354563242034921715\
+085079669416064946957897843700525314730377964740286745952320\
+848539618361767466769711132391357232984948881905511016501295\
+373458116601070538750219227472880922074079367616789330713051\
+392796054620611196686398104309732110578180612371988986941283\
+463409571752839755060102940634838880149410521082372514146698\
+949690555298417297141754693386954049385392552489950059242099\
+158790234260937921119976211248531759522503364724271154732450\
+580204158756703065275680503502538215181617861403909609765438\
+459404741896379126766756324776550060890489522385655907004761\
+103760380176704738464932582597767398552360992261748200224552\
+499221197984163362555822765637968034280918669504609870586242\
+062170049756721980421608552698712778507151233315121277695507\
+694932304894125095195395002291537339548463471343544834535084\
+385597125111888342671654244935921073610595930775193595237994\
+484405470453247603596164707279142831292696020597352513459682\
+982542490819269161229107183625537754125393689567083050306972\
+299472451409351528024124972676859164822379702549840869992122\
+109088558738008051503238314435613116752657081607929379237268\
+685258548361696557803717952234859306922044575896046034219495\
+078937310258307531674502149231702180717812559299741279722940\
+331553164095430990867607708187092707603492795672693661579813\
+722297206006600340954221573260854019342039503980256096723323\
+974619210941227998945120494044519820953637210732374225869479\
+681431453077746347270062554307578221973966755682727685671115\
+104598487346465589917255152859638133529840253249441154093766\
+468296435228729803156904942774237478111621919125582394448948\
+295406406844691902789160843785892192212760482854142616066966\
+061436483840059374641455624686877579416182709686546132337333\
+180030729666859995573465620394353524944034503194887839608451\
+069029644904642077575045157730600577875158390703330602738631\
+860629283284285902868412268522486164537842820453011183015531\
+669082023505889165928251243784395957824980999247118276540195\
+068956031183236585108415603897481193085040746824934727777986\
+761703484626902903260925660927239810711484175954901422619731\
+922057229492660554293614771979793133433085936212830723862399\
+334585740422370252249982159238980361966177481883090934546250\
+903836442278836769393445168381535656636696931116641217099763\
+249205106142470169654056239769609880390474141835446455366216\
+163044493526155530766380018725181852858797332884069215206429\
+253933800732703242020102754246055713369281324885855415528125\
+659581759080256206862639693790603663547070031814664699862085\
+124026740519096394950750536940374610036575208929959836461615\
+919280191863569472772191938255564055565023733812663112274784\
+824733213440763947293874467915896768018331324730250697015099\
+463062533087218087488410166157459583569488345783974179340987\
+151815108212218686575226398710276498737521494877861721916239\
+286780194943271811625644415312213945242110591353818534254974\
+082884162962499579444882831630967263044313008877192427542802\
+154833385005287431176015973444837288763406349559772586733139\
+508290944276618724455216038372331277739377332938820061159422\
+131545699737995079186343848189545551446309662717473667598998\
+332988069951307480469935653061211574846012803370905284012473\
+025318540210297839541696998136885534223864988557670674501375\
+244470147903967779423817060038384764935662497442963759653206\
+786432859777470896394181997456033131032688720696203667198626\
+404895099030068466008555612541561023366202324622483939422567\
+021914882845352467305687811236417567525816955182834161603932\
+993065869465459807593704095390354125514253872107415823725124\
+7263969181695999e+4931L;
+static const long double ld3b =
+5.9486574767861588257512740011252202817891302594919813725251\
+295428739285541899832559628345030434759848834258858109152060\
+168394580447354320917546191141469316674407503401251826592118\
+529247805068466318759038608659253988075214874609536526621357\
+456531393890166762179915866732524251539065872543957371571521\
+983821811625262362379785274802094595537134203491628334800642\
+100552410980148340419844099304716014319891796892117978584065\
+642215994189779833796388294931075153217985342401232585488548\
+183499573356819649604353341808627018653300000165159821533158\
+398534762310007133107769480816106094590754928301890268526601\
+948012303315011492834812113743989351274355589970363438128551\
+573643438403526566620300559126131289478114044934210031633528\
+263569989916613277150372804081100885766846923338387335735275\
+815690693627425316500993091757924061275520326543377826484801\
+260850814410014200240706874882235908793464063722267631785502\
+588978890438298369667014685160756795261293064179236782450102\
+879817506411379585551974343148401888001113058696688771238532\
+123329163319380775763389985796856252232367435778523577763581\
+076318820356483011816956309162306010784749642144593052844981\
+144455778303480881727480293033710826466852650686573284449164\
+971550815761322623554550767170481569400661823142075309755585\
+825399262942161733431916879499819498306470556518202895225167\
+570891857833504708712937447726161123901897152190727519098753\
+173091256107155059564163182449945325514965354563242034921715\
+085079669416064946957897843700525314730377964740286745952320\
+848539618361767466769711132391357232984948881905511016501295\
+373458116601070538750219227472880922074079367616789330713051\
+392796054620611196686398104309732110578180612371988986941283\
+463409571752839755060102940634838880149410521082372514146698\
+949690555298417297141754693386954049385392552489950059242099\
+158790234260937921119976211248531759522503364724271154732450\
+580204158756703065275680503502538215181617861403909609765438\
+459404741896379126766756324776550060890489522385655907004761\
+103760380176704738464932582597767398552360992261748200224552\
+499221197984163362555822765637968034280918669504609870586242\
+062170049756721980421608552698712778507151233315121277695507\
+694932304894125095195395002291537339548463471343544834535084\
+385597125111888342671654244935921073610595930775193595237994\
+484405470453247603596164707279142831292696020597352513459682\
+982542490819269161229107183625537754125393689567083050306972\
+299472451409351528024124972676859164822379702549840869992122\
+109088558738008051503238314435613116752657081607929379237268\
+685258548361696557803717952234859306922044575896046034219495\
+078937310258307531674502149231702180717812559299741279722940\
+331553164095430990867607708187092707603492795672693661579813\
+722297206006600340954221573260854019342039503980256096723323\
+974619210941227998945120494044519820953637210732374225869479\
+681431453077746347270062554307578221973966755682727685671115\
+104598487346465589917255152859638133529840253249441154093766\
+468296435228729803156904942774237478111621919125582394448948\
+295406406844691902789160843785892192212760482854142616066966\
+061436483840059374641455624686877579416182709686546132337333\
+180030729666859995573465620394353524944034503194887839608451\
+069029644904642077575045157730600577875158390703330602738631\
+860629283284285902868412268522486164537842820453011183015531\
+669082023505889165928251243784395957824980999247118276540195\
+068956031183236585108415603897481193085040746824934727777986\
+761703484626902903260925660927239810711484175954901422619731\
+922057229492660554293614771979793133433085936212830723862399\
+334585740422370252249982159238980361966177481883090934546250\
+903836442278836769393445168381535656636696931116641217099763\
+249205106142470169654056239769609880390474141835446455366216\
+163044493526155530766380018725181852858797332884069215206429\
+253933800732703242020102754246055713369281324885855415528125\
+659581759080256206862639693790603663547070031814664699862085\
+124026740519096394950750536940374610036575208929959836461615\
+919280191863569472772191938255564055565023733812663112274784\
+824733213440763947293874467915896768018331324730250697015099\
+463062533087218087488410166157459583569488345783974179340987\
+151815108212218686575226398710276498737521494877861721916239\
+286780194943271811625644415312213945242110591353818534254974\
+082884162962499579444882831630967263044313008877192427542802\
+154833385005287431176015973444837288763406349559772586733139\
+508290944276618724455216038372331277739377332938820061159422\
+131545699737995079186343848189545551446309662717473667598998\
+332988069951307480469935653061211574846012803370905284012473\
+025318540210297839541696998136885534223864988557670674501375\
+244470147903967779423817060038384764935662497442963759653206\
+786432859777470896394181997456033131032688720696203667198626\
+404895099030068466008555612541561023366202324622483939422567\
+021914882845352467305687811236417567525816955182834161603932\
+993065869465459807593704095390354125514253872107415823725124\
+7263969181696e+4931L;
+static const long double ld3c =
+5.9486574767861588257512740011252202817891302594919813725251\
+295428739285541899832559628345030434759848834258858109152060\
+168394580447354320917546191141469316674407503401251826592118\
+529247805068466318759038608659253988075214874609536526621357\
+456531393890166762179915866732524251539065872543957371571521\
+983821811625262362379785274802094595537134203491628334800642\
+100552410980148340419844099304716014319891796892117978584065\
+642215994189779833796388294931075153217985342401232585488548\
+183499573356819649604353341808627018653300000165159821533158\
+398534762310007133107769480816106094590754928301890268526601\
+948012303315011492834812113743989351274355589970363438128551\
+573643438403526566620300559126131289478114044934210031633528\
+263569989916613277150372804081100885766846923338387335735275\
+815690693627425316500993091757924061275520326543377826484801\
+260850814410014200240706874882235908793464063722267631785502\
+588978890438298369667014685160756795261293064179236782450102\
+879817506411379585551974343148401888001113058696688771238532\
+123329163319380775763389985796856252232367435778523577763581\
+076318820356483011816956309162306010784749642144593052844981\
+144455778303480881727480293033710826466852650686573284449164\
+971550815761322623554550767170481569400661823142075309755585\
+825399262942161733431916879499819498306470556518202895225167\
+570891857833504708712937447726161123901897152190727519098753\
+173091256107155059564163182449945325514965354563242034921715\
+085079669416064946957897843700525314730377964740286745952320\
+848539618361767466769711132391357232984948881905511016501295\
+373458116601070538750219227472880922074079367616789330713051\
+392796054620611196686398104309732110578180612371988986941283\
+463409571752839755060102940634838880149410521082372514146698\
+949690555298417297141754693386954049385392552489950059242099\
+158790234260937921119976211248531759522503364724271154732450\
+580204158756703065275680503502538215181617861403909609765438\
+459404741896379126766756324776550060890489522385655907004761\
+103760380176704738464932582597767398552360992261748200224552\
+499221197984163362555822765637968034280918669504609870586242\
+062170049756721980421608552698712778507151233315121277695507\
+694932304894125095195395002291537339548463471343544834535084\
+385597125111888342671654244935921073610595930775193595237994\
+484405470453247603596164707279142831292696020597352513459682\
+982542490819269161229107183625537754125393689567083050306972\
+299472451409351528024124972676859164822379702549840869992122\
+109088558738008051503238314435613116752657081607929379237268\
+685258548361696557803717952234859306922044575896046034219495\
+078937310258307531674502149231702180717812559299741279722940\
+331553164095430990867607708187092707603492795672693661579813\
+722297206006600340954221573260854019342039503980256096723323\
+974619210941227998945120494044519820953637210732374225869479\
+681431453077746347270062554307578221973966755682727685671115\
+104598487346465589917255152859638133529840253249441154093766\
+468296435228729803156904942774237478111621919125582394448948\
+295406406844691902789160843785892192212760482854142616066966\
+061436483840059374641455624686877579416182709686546132337333\
+180030729666859995573465620394353524944034503194887839608451\
+069029644904642077575045157730600577875158390703330602738631\
+860629283284285902868412268522486164537842820453011183015531\
+669082023505889165928251243784395957824980999247118276540195\
+068956031183236585108415603897481193085040746824934727777986\
+761703484626902903260925660927239810711484175954901422619731\
+922057229492660554293614771979793133433085936212830723862399\
+334585740422370252249982159238980361966177481883090934546250\
+903836442278836769393445168381535656636696931116641217099763\
+249205106142470169654056239769609880390474141835446455366216\
+163044493526155530766380018725181852858797332884069215206429\
+253933800732703242020102754246055713369281324885855415528125\
+659581759080256206862639693790603663547070031814664699862085\
+124026740519096394950750536940374610036575208929959836461615\
+919280191863569472772191938255564055565023733812663112274784\
+824733213440763947293874467915896768018331324730250697015099\
+463062533087218087488410166157459583569488345783974179340987\
+151815108212218686575226398710276498737521494877861721916239\
+286780194943271811625644415312213945242110591353818534254974\
+082884162962499579444882831630967263044313008877192427542802\
+154833385005287431176015973444837288763406349559772586733139\
+508290944276618724455216038372331277739377332938820061159422\
+131545699737995079186343848189545551446309662717473667598998\
+332988069951307480469935653061211574846012803370905284012473\
+025318540210297839541696998136885534223864988557670674501375\
+244470147903967779423817060038384764935662497442963759653206\
+786432859777470896394181997456033131032688720696203667198626\
+404895099030068466008555612541561023366202324622483939422567\
+021914882845352467305687811236417567525816955182834161603932\
+993065869465459807593704095390354125514253872107415823725124\
+7263969181696001e+4931L;
+#endif
+
+#if LDBL_MANT_DIG == 113 \
+ && LDBL_MIN_EXP == -16381 \
+ && LDBL_MAX_EXP == 16384
+# define LDBL_OK
+/* 0x0.8p-16494 */
+static const long double ld1ae = 0, ld1be = 0, ld1ce = 0x1p-16494L;
+static const long double ld1a =
+3.2375875597190125554622194791138232762497846690173405048449\
+421945985197700620596855088357456383249701279390707384240598\
+382936099431912710233425550359863089915213963553756674672083\
+673128192358701197242632527769951957277781260855740340354110\
+173441284912381364143945515141786687806740155311932822963199\
+131134959539539338316310328556057915323285980341541664226172\
+265348802632447238304822896568757017013159021750199744350376\
+278243566840330589397015778833566517337174685312047058426075\
+688036665697114219175258344917835835984013214761767520398571\
+735519302688914468501077605843338555214753050109407568139932\
+147308502166696009676987494125921676927574464221699654264839\
+192243410627511520570610765229732327315423820550872393685221\
+676561948307418196052769717057382723931306989375320957256133\
+838073129463951849807075348034900035402513943244599879584009\
+391110011261908615236154859382854977144106096407982738165117\
+693915685918231984764157652755343417097983676870433731452629\
+339981084526616826599425863049784138127555181662391766144738\
+159400253422795753041594932607700680306368857466952063923782\
+760519487592638820793893796669403574411398166619131986561877\
+034635197232626532239192571857518274939275861531537920777299\
+133535479548088762634002006634954143608168633852204577195463\
+389533233992867620995583241321034602255800668175356808869060\
+608582640890741203603916133682748118680676374951545690715916\
+241859799379894025137504643469040366684778763795442214328000\
+375999444991619403217748350277527106812175542863660436614910\
+135938862296156144947361864759321605496309393905421651264941\
+669606814994816518612155298709843817262034769175075602668866\
+926449523554218142013501373514352370369126244144449924971423\
+038024236058971106053649565799145071085840022305247663313482\
+714565918140785997808209749619683146844964283106915422726638\
+184861327711776708749278315100024436584176080783836115268999\
+055336294569042349971163039294272620322160728879610722678506\
+182344928526064885227397447578450046944618127903428943538029\
+386719288345854473283987116842451647036255801966780244103035\
+425445345127067921349083698736056197567752071915587544133815\
+717564310032485290205726480489464589999677885266171263493459\
+668963623768410922688414177814149693150024191921819721215688\
+114324591287371281400636455584825253000890602388603923710921\
+026880979879158388608823700222683123228822356907857261909150\
+626993825760416437415551396973489279578569909699853422995997\
+974315036153120383930698087773157253674975950409660938084071\
+173163693891122166282318691732176374528554627905530306369204\
+877964658806333996327938827344733821685425961846791581492287\
+250044047142934607523718654369478552373072400018635730811749\
+291666457582760812726851561001954207941547404866373158231367\
+986951247388733285659455982411993350593989550494594498447410\
+984783303191128659803467713819821511544998464785455306500918\
+241648925913966507036336000231915215026183799886938007038845\
+551916478649593272604688927931953165785101738164060543643192\
+949066412847647883846835866623820426428526541564774787007791\
+235843699657232847114093617412355486871810526396392792853731\
+390841657984518997639795008374280777823099107035223998600103\
+103211166230289241182380237703814248941627178152962100972452\
+217697144954497443279450919433943252592977710901289696002698\
+225209041938801190947812141758873162203113090284565687499100\
+109623665868340184032428667217835198069330185880779776269137\
+742366802202585247113480377505916462865316253065105837519292\
+805411191872195967066157363040364443666632564266439033866945\
+366496486863801221986778957510023272290593640187551645170603\
+215150911733580059874983597994671388176488814794186236946834\
+548816837468411497151813344980969677026131105901402313456769\
+561412278508799050185582199844418197980544632067644131002512\
+557755358307705356209461595354064971347590431926479961905129\
+785864961996560707071051177738535042777950247546470241655891\
+294428226271478689174637951663865529219133988782700199051475\
+108495188941141025360733690471601309904116260484264378352956\
+830972782977747351810451586166745640802378131466232692150196\
+132319386267589275314909450293562079332893638471814389025392\
+970579695249613486078445695214422379148991006996109216699215\
+721671648754881325271879493185438097033881789311707997697928\
+860866812849648616086569281093053695399558469641977866770538\
+476039621947215238679930485285585513808236992918733520331110\
+962448142457896209307561142289713638388281085340301520317159\
+297224995464365477734040179470355969363384621039467975256670\
+339354334892926205316491997244008324897517881293654265688813\
+283579663372924392043825371743576754041055802440187836850412\
+247984570221893156921757872572872036331343007592090605703195\
+088864753777199111760713027328198781654685927174063882187275\
+850263521274368447629947228263907797373221137688424821608129\
+731003236738630502344377228987961455961818623205503012858619\
+800521948637807438081069469400793496307826769301971342062597\
+391253779410607511754278887744936774785938056823221738917303\
+119592848951788560393540150358649310736020595310015728915288\
+289821678102453433273888879288862086153270028346900686360943\
+250522514297816412678213672667152836436597491522644579383191\
+851483036048273636234050603745735057899230038434384361744893\
+838050985090837220507663282503497932038372021626246900935334\
+781144388106031405650705176699646299475436084049881780196520\
+881623075256119318210664937469946410480660118598143375898298\
+965497205621170906772915413181530577151676241283182977713765\
+317889730886996471681592298058774155948285325398399674640645\
+566475947058303746531133735308766583802401453804232106737787\
+768035926272312574958173945816077962772826443125107145322971\
+087220172175473177449006473180221085709470643042801004189714\
+505520073568915195232936144169440163547568663500508335014169\
+425050712038101167190534305435310279534374364467455668392421\
+298604104431988622194699721632249712583483143417550152131186\
+288827131347662976240916448058011869761525369135147129192405\
+037216807405860168320999468074663117771890506566769628495813\
+837909047220874786467663205170561835819702362482274133227483\
+041342457179876653773960112367066273208176545656826800069574\
+547599816180234764485446735080683694920665668954370505715843\
+455110709594838989387382250502925336743830916124954071268053\
+817964873658921319164268375226716232666274830656557657055342\
+393552148933959057023293404027940528842591460490646295820755\
+765633076707491896621769767253619370462005760078938144396953\
+018925287611875441613896820035092167912718365454954166761481\
+511451950826683236776211829914518353242818636196417736206010\
+145109509967467266157037719712666871515644277723594273405669\
+093518586548079997818085130346801040781966074621669280188633\
+856299289656492439545033914935979634179552686396067914528336\
+924678729357419403624798426886422277256625046946795576781709\
+298737741510378578072199383561520569978396254537274419476511\
+983161908266152660163477408756159700314280122283281906103567\
+067156627222418787671312246698375736071215395722993294041012\
+744631560602983489316782773611740570974847045870362276861106\
+774130949410119612624380274679529647271294627526939490197641\
+645383447755544661714281218489998189691140343327976729279891\
+077101372792811842951182338559423852563331641533781432796742\
+873181364582071661749961126386895359760476172215209100274274\
+851619657020388051618654944574445941780637669570374280535432\
+399157923698778110534174856844986671232161320063786308144771\
+068130888985636449091787794632959555876880672773686838364706\
+122084832995722603440165161942472322987408003421165899848443\
+566885769845535074102932500939450142098799833145629484519298\
+622410092757836842296697186410137365818568152771850732591405\
+340248509247875448717161746544246407280913725135059228268131\
+453903691495906528862410006254958805237716723952273129715780\
+425223305517882562616830806755498203755676925741529569939445\
+043490046171854709456730491532189688306135861932534903184518\
+717706426178028900836080044604143054210332610482947502104703\
+032028463320549525316174330585387581543470878545616097381416\
+151451037487775797335749896735101048367502483255117772375025\
+269956476872153642623856062175536913321594213515989059505375\
+135183515207096576145781316398544325320022366962008554087665\
+201050763789833457082359181807492731245904330245198691471329\
+319324627030678762142685799400660305214140453863665517807185\
+105354694177602424937823924511789133225030926924236498557565\
+212794565582753399214908928688568628950225640472058381324292\
+866007645368390366981937596341868992912741319342960598330486\
+905946276235953206760977215407164729909506118583728562718724\
+235732515062300426080741679038098122641980345051854359908213\
+563779664847422505775922437272989231878912994048540484468227\
+199282393172540734295329890896755037903724644870572648941076\
+132423009124870700536763793881894969000042397318202298868940\
+530196108237639578098191879486398269734335286831689173606327\
+500405178476864790935386838169242131756729797688220656276969\
+434749140204830563840068728357383111109865861495106613619153\
+421725274090787422508800568671498311491210197298472420373359\
+044400631309819996507004167876832936101195902219429743174557\
+163362274547892397934880322990633165889175059124060202200452\
+648684577182821651588921716304707095995039972827781680978274\
+973838841958209215836456212939412000456040621743349981715350\
+305133662772937143899882197561295808685181679238411733642697\
+748892466944352640514849114619882270112386610376024527101889\
+119004382703622803911212700216792471528793241950356942780714\
+774957204475130171711488773121937363663487116301055073658645\
+980695862570269762957141239436916216723776945522480189876803\
+386123827956059851911061129713987960026363403936931196519733\
+447116468545744829997003979525368783485129837821983305137448\
+031689360764270759437872004895754351479890333865299565515706\
+690471030702230767978923298480584997256328135245813726407464\
+159230169328539541524724878662873185450510653764301207480799\
+488602832618557388369552461881286225098286358672257087829660\
+174231705350465091313887538950130611513878400895128618426154\
+417299623157313010877679890009181366178705821415173309356192\
+686429159835537275875876767919535369607142366878476025895389\
+279625854409611312402187942369446302119309705461187450803468\
+606366203101933821675974655441744883993796837164178911391575\
+751463591650231265941242686108002052587760190005508737394014\
+453031299745602214380618917954427803281262300931789525045703\
+809571995929933387196864877982754748535701000330924817431298\
+365273697561943437891318220691072831562717726798635382168915\
+187137325209768346284183473712613689334546294053718697897526\
+843398053681374508250012035211936425982389543291022583173280\
+985811169783438836113209408147936547458073361625570571955232\
+746103236016857123149307991441916732438322836596693687161268\
+151183603534413030099360835441935243365729307681545065674775\
+655582111435085683962037818795920337874290127531069511296530\
+746308404963763022896682861683252995925040540038039172626001\
+958340013361801588367655990575379797454237110701588716509764\
+759243657077584013289594787913434812509790293636440469725564\
+222946985585616708175959944099853232059130350099233608207347\
+955460820122006976717445739825352919058005528371183277021250\
+186916447745609162301667393077050176560656798672598371789181\
+232542195795945358691713761483976100058707499929103557275695\
+937295677892604799308353051124627278706035295473126217205599\
+530746756205492173148619619059839609108464715691924592576481\
+382126740168148453274964955074129767533813576349605298268179\
+068244338581354855186516322703199278802275718580352103754433\
+240982354636196477238624205575823556321375833700666021556412\
+182358152808745703724362178773168996492870519432472065091133\
+11767578124999e-4966L;
+static const long double ld1b =
+3.2375875597190125554622194791138232762497846690173405048449\
+421945985197700620596855088357456383249701279390707384240598\
+382936099431912710233425550359863089915213963553756674672083\
+673128192358701197242632527769951957277781260855740340354110\
+173441284912381364143945515141786687806740155311932822963199\
+131134959539539338316310328556057915323285980341541664226172\
+265348802632447238304822896568757017013159021750199744350376\
+278243566840330589397015778833566517337174685312047058426075\
+688036665697114219175258344917835835984013214761767520398571\
+735519302688914468501077605843338555214753050109407568139932\
+147308502166696009676987494125921676927574464221699654264839\
+192243410627511520570610765229732327315423820550872393685221\
+676561948307418196052769717057382723931306989375320957256133\
+838073129463951849807075348034900035402513943244599879584009\
+391110011261908615236154859382854977144106096407982738165117\
+693915685918231984764157652755343417097983676870433731452629\
+339981084526616826599425863049784138127555181662391766144738\
+159400253422795753041594932607700680306368857466952063923782\
+760519487592638820793893796669403574411398166619131986561877\
+034635197232626532239192571857518274939275861531537920777299\
+133535479548088762634002006634954143608168633852204577195463\
+389533233992867620995583241321034602255800668175356808869060\
+608582640890741203603916133682748118680676374951545690715916\
+241859799379894025137504643469040366684778763795442214328000\
+375999444991619403217748350277527106812175542863660436614910\
+135938862296156144947361864759321605496309393905421651264941\
+669606814994816518612155298709843817262034769175075602668866\
+926449523554218142013501373514352370369126244144449924971423\
+038024236058971106053649565799145071085840022305247663313482\
+714565918140785997808209749619683146844964283106915422726638\
+184861327711776708749278315100024436584176080783836115268999\
+055336294569042349971163039294272620322160728879610722678506\
+182344928526064885227397447578450046944618127903428943538029\
+386719288345854473283987116842451647036255801966780244103035\
+425445345127067921349083698736056197567752071915587544133815\
+717564310032485290205726480489464589999677885266171263493459\
+668963623768410922688414177814149693150024191921819721215688\
+114324591287371281400636455584825253000890602388603923710921\
+026880979879158388608823700222683123228822356907857261909150\
+626993825760416437415551396973489279578569909699853422995997\
+974315036153120383930698087773157253674975950409660938084071\
+173163693891122166282318691732176374528554627905530306369204\
+877964658806333996327938827344733821685425961846791581492287\
+250044047142934607523718654369478552373072400018635730811749\
+291666457582760812726851561001954207941547404866373158231367\
+986951247388733285659455982411993350593989550494594498447410\
+984783303191128659803467713819821511544998464785455306500918\
+241648925913966507036336000231915215026183799886938007038845\
+551916478649593272604688927931953165785101738164060543643192\
+949066412847647883846835866623820426428526541564774787007791\
+235843699657232847114093617412355486871810526396392792853731\
+390841657984518997639795008374280777823099107035223998600103\
+103211166230289241182380237703814248941627178152962100972452\
+217697144954497443279450919433943252592977710901289696002698\
+225209041938801190947812141758873162203113090284565687499100\
+109623665868340184032428667217835198069330185880779776269137\
+742366802202585247113480377505916462865316253065105837519292\
+805411191872195967066157363040364443666632564266439033866945\
+366496486863801221986778957510023272290593640187551645170603\
+215150911733580059874983597994671388176488814794186236946834\
+548816837468411497151813344980969677026131105901402313456769\
+561412278508799050185582199844418197980544632067644131002512\
+557755358307705356209461595354064971347590431926479961905129\
+785864961996560707071051177738535042777950247546470241655891\
+294428226271478689174637951663865529219133988782700199051475\
+108495188941141025360733690471601309904116260484264378352956\
+830972782977747351810451586166745640802378131466232692150196\
+132319386267589275314909450293562079332893638471814389025392\
+970579695249613486078445695214422379148991006996109216699215\
+721671648754881325271879493185438097033881789311707997697928\
+860866812849648616086569281093053695399558469641977866770538\
+476039621947215238679930485285585513808236992918733520331110\
+962448142457896209307561142289713638388281085340301520317159\
+297224995464365477734040179470355969363384621039467975256670\
+339354334892926205316491997244008324897517881293654265688813\
+283579663372924392043825371743576754041055802440187836850412\
+247984570221893156921757872572872036331343007592090605703195\
+088864753777199111760713027328198781654685927174063882187275\
+850263521274368447629947228263907797373221137688424821608129\
+731003236738630502344377228987961455961818623205503012858619\
+800521948637807438081069469400793496307826769301971342062597\
+391253779410607511754278887744936774785938056823221738917303\
+119592848951788560393540150358649310736020595310015728915288\
+289821678102453433273888879288862086153270028346900686360943\
+250522514297816412678213672667152836436597491522644579383191\
+851483036048273636234050603745735057899230038434384361744893\
+838050985090837220507663282503497932038372021626246900935334\
+781144388106031405650705176699646299475436084049881780196520\
+881623075256119318210664937469946410480660118598143375898298\
+965497205621170906772915413181530577151676241283182977713765\
+317889730886996471681592298058774155948285325398399674640645\
+566475947058303746531133735308766583802401453804232106737787\
+768035926272312574958173945816077962772826443125107145322971\
+087220172175473177449006473180221085709470643042801004189714\
+505520073568915195232936144169440163547568663500508335014169\
+425050712038101167190534305435310279534374364467455668392421\
+298604104431988622194699721632249712583483143417550152131186\
+288827131347662976240916448058011869761525369135147129192405\
+037216807405860168320999468074663117771890506566769628495813\
+837909047220874786467663205170561835819702362482274133227483\
+041342457179876653773960112367066273208176545656826800069574\
+547599816180234764485446735080683694920665668954370505715843\
+455110709594838989387382250502925336743830916124954071268053\
+817964873658921319164268375226716232666274830656557657055342\
+393552148933959057023293404027940528842591460490646295820755\
+765633076707491896621769767253619370462005760078938144396953\
+018925287611875441613896820035092167912718365454954166761481\
+511451950826683236776211829914518353242818636196417736206010\
+145109509967467266157037719712666871515644277723594273405669\
+093518586548079997818085130346801040781966074621669280188633\
+856299289656492439545033914935979634179552686396067914528336\
+924678729357419403624798426886422277256625046946795576781709\
+298737741510378578072199383561520569978396254537274419476511\
+983161908266152660163477408756159700314280122283281906103567\
+067156627222418787671312246698375736071215395722993294041012\
+744631560602983489316782773611740570974847045870362276861106\
+774130949410119612624380274679529647271294627526939490197641\
+645383447755544661714281218489998189691140343327976729279891\
+077101372792811842951182338559423852563331641533781432796742\
+873181364582071661749961126386895359760476172215209100274274\
+851619657020388051618654944574445941780637669570374280535432\
+399157923698778110534174856844986671232161320063786308144771\
+068130888985636449091787794632959555876880672773686838364706\
+122084832995722603440165161942472322987408003421165899848443\
+566885769845535074102932500939450142098799833145629484519298\
+622410092757836842296697186410137365818568152771850732591405\
+340248509247875448717161746544246407280913725135059228268131\
+453903691495906528862410006254958805237716723952273129715780\
+425223305517882562616830806755498203755676925741529569939445\
+043490046171854709456730491532189688306135861932534903184518\
+717706426178028900836080044604143054210332610482947502104703\
+032028463320549525316174330585387581543470878545616097381416\
+151451037487775797335749896735101048367502483255117772375025\
+269956476872153642623856062175536913321594213515989059505375\
+135183515207096576145781316398544325320022366962008554087665\
+201050763789833457082359181807492731245904330245198691471329\
+319324627030678762142685799400660305214140453863665517807185\
+105354694177602424937823924511789133225030926924236498557565\
+212794565582753399214908928688568628950225640472058381324292\
+866007645368390366981937596341868992912741319342960598330486\
+905946276235953206760977215407164729909506118583728562718724\
+235732515062300426080741679038098122641980345051854359908213\
+563779664847422505775922437272989231878912994048540484468227\
+199282393172540734295329890896755037903724644870572648941076\
+132423009124870700536763793881894969000042397318202298868940\
+530196108237639578098191879486398269734335286831689173606327\
+500405178476864790935386838169242131756729797688220656276969\
+434749140204830563840068728357383111109865861495106613619153\
+421725274090787422508800568671498311491210197298472420373359\
+044400631309819996507004167876832936101195902219429743174557\
+163362274547892397934880322990633165889175059124060202200452\
+648684577182821651588921716304707095995039972827781680978274\
+973838841958209215836456212939412000456040621743349981715350\
+305133662772937143899882197561295808685181679238411733642697\
+748892466944352640514849114619882270112386610376024527101889\
+119004382703622803911212700216792471528793241950356942780714\
+774957204475130171711488773121937363663487116301055073658645\
+980695862570269762957141239436916216723776945522480189876803\
+386123827956059851911061129713987960026363403936931196519733\
+447116468545744829997003979525368783485129837821983305137448\
+031689360764270759437872004895754351479890333865299565515706\
+690471030702230767978923298480584997256328135245813726407464\
+159230169328539541524724878662873185450510653764301207480799\
+488602832618557388369552461881286225098286358672257087829660\
+174231705350465091313887538950130611513878400895128618426154\
+417299623157313010877679890009181366178705821415173309356192\
+686429159835537275875876767919535369607142366878476025895389\
+279625854409611312402187942369446302119309705461187450803468\
+606366203101933821675974655441744883993796837164178911391575\
+751463591650231265941242686108002052587760190005508737394014\
+453031299745602214380618917954427803281262300931789525045703\
+809571995929933387196864877982754748535701000330924817431298\
+365273697561943437891318220691072831562717726798635382168915\
+187137325209768346284183473712613689334546294053718697897526\
+843398053681374508250012035211936425982389543291022583173280\
+985811169783438836113209408147936547458073361625570571955232\
+746103236016857123149307991441916732438322836596693687161268\
+151183603534413030099360835441935243365729307681545065674775\
+655582111435085683962037818795920337874290127531069511296530\
+746308404963763022896682861683252995925040540038039172626001\
+958340013361801588367655990575379797454237110701588716509764\
+759243657077584013289594787913434812509790293636440469725564\
+222946985585616708175959944099853232059130350099233608207347\
+955460820122006976717445739825352919058005528371183277021250\
+186916447745609162301667393077050176560656798672598371789181\
+232542195795945358691713761483976100058707499929103557275695\
+937295677892604799308353051124627278706035295473126217205599\
+530746756205492173148619619059839609108464715691924592576481\
+382126740168148453274964955074129767533813576349605298268179\
+068244338581354855186516322703199278802275718580352103754433\
+240982354636196477238624205575823556321375833700666021556412\
+182358152808745703724362178773168996492870519432472065091133\
+11767578125e-4966L;
+static const long double ld1c =
+3.2375875597190125554622194791138232762497846690173405048449\
+421945985197700620596855088357456383249701279390707384240598\
+382936099431912710233425550359863089915213963553756674672083\
+673128192358701197242632527769951957277781260855740340354110\
+173441284912381364143945515141786687806740155311932822963199\
+131134959539539338316310328556057915323285980341541664226172\
+265348802632447238304822896568757017013159021750199744350376\
+278243566840330589397015778833566517337174685312047058426075\
+688036665697114219175258344917835835984013214761767520398571\
+735519302688914468501077605843338555214753050109407568139932\
+147308502166696009676987494125921676927574464221699654264839\
+192243410627511520570610765229732327315423820550872393685221\
+676561948307418196052769717057382723931306989375320957256133\
+838073129463951849807075348034900035402513943244599879584009\
+391110011261908615236154859382854977144106096407982738165117\
+693915685918231984764157652755343417097983676870433731452629\
+339981084526616826599425863049784138127555181662391766144738\
+159400253422795753041594932607700680306368857466952063923782\
+760519487592638820793893796669403574411398166619131986561877\
+034635197232626532239192571857518274939275861531537920777299\
+133535479548088762634002006634954143608168633852204577195463\
+389533233992867620995583241321034602255800668175356808869060\
+608582640890741203603916133682748118680676374951545690715916\
+241859799379894025137504643469040366684778763795442214328000\
+375999444991619403217748350277527106812175542863660436614910\
+135938862296156144947361864759321605496309393905421651264941\
+669606814994816518612155298709843817262034769175075602668866\
+926449523554218142013501373514352370369126244144449924971423\
+038024236058971106053649565799145071085840022305247663313482\
+714565918140785997808209749619683146844964283106915422726638\
+184861327711776708749278315100024436584176080783836115268999\
+055336294569042349971163039294272620322160728879610722678506\
+182344928526064885227397447578450046944618127903428943538029\
+386719288345854473283987116842451647036255801966780244103035\
+425445345127067921349083698736056197567752071915587544133815\
+717564310032485290205726480489464589999677885266171263493459\
+668963623768410922688414177814149693150024191921819721215688\
+114324591287371281400636455584825253000890602388603923710921\
+026880979879158388608823700222683123228822356907857261909150\
+626993825760416437415551396973489279578569909699853422995997\
+974315036153120383930698087773157253674975950409660938084071\
+173163693891122166282318691732176374528554627905530306369204\
+877964658806333996327938827344733821685425961846791581492287\
+250044047142934607523718654369478552373072400018635730811749\
+291666457582760812726851561001954207941547404866373158231367\
+986951247388733285659455982411993350593989550494594498447410\
+984783303191128659803467713819821511544998464785455306500918\
+241648925913966507036336000231915215026183799886938007038845\
+551916478649593272604688927931953165785101738164060543643192\
+949066412847647883846835866623820426428526541564774787007791\
+235843699657232847114093617412355486871810526396392792853731\
+390841657984518997639795008374280777823099107035223998600103\
+103211166230289241182380237703814248941627178152962100972452\
+217697144954497443279450919433943252592977710901289696002698\
+225209041938801190947812141758873162203113090284565687499100\
+109623665868340184032428667217835198069330185880779776269137\
+742366802202585247113480377505916462865316253065105837519292\
+805411191872195967066157363040364443666632564266439033866945\
+366496486863801221986778957510023272290593640187551645170603\
+215150911733580059874983597994671388176488814794186236946834\
+548816837468411497151813344980969677026131105901402313456769\
+561412278508799050185582199844418197980544632067644131002512\
+557755358307705356209461595354064971347590431926479961905129\
+785864961996560707071051177738535042777950247546470241655891\
+294428226271478689174637951663865529219133988782700199051475\
+108495188941141025360733690471601309904116260484264378352956\
+830972782977747351810451586166745640802378131466232692150196\
+132319386267589275314909450293562079332893638471814389025392\
+970579695249613486078445695214422379148991006996109216699215\
+721671648754881325271879493185438097033881789311707997697928\
+860866812849648616086569281093053695399558469641977866770538\
+476039621947215238679930485285585513808236992918733520331110\
+962448142457896209307561142289713638388281085340301520317159\
+297224995464365477734040179470355969363384621039467975256670\
+339354334892926205316491997244008324897517881293654265688813\
+283579663372924392043825371743576754041055802440187836850412\
+247984570221893156921757872572872036331343007592090605703195\
+088864753777199111760713027328198781654685927174063882187275\
+850263521274368447629947228263907797373221137688424821608129\
+731003236738630502344377228987961455961818623205503012858619\
+800521948637807438081069469400793496307826769301971342062597\
+391253779410607511754278887744936774785938056823221738917303\
+119592848951788560393540150358649310736020595310015728915288\
+289821678102453433273888879288862086153270028346900686360943\
+250522514297816412678213672667152836436597491522644579383191\
+851483036048273636234050603745735057899230038434384361744893\
+838050985090837220507663282503497932038372021626246900935334\
+781144388106031405650705176699646299475436084049881780196520\
+881623075256119318210664937469946410480660118598143375898298\
+965497205621170906772915413181530577151676241283182977713765\
+317889730886996471681592298058774155948285325398399674640645\
+566475947058303746531133735308766583802401453804232106737787\
+768035926272312574958173945816077962772826443125107145322971\
+087220172175473177449006473180221085709470643042801004189714\
+505520073568915195232936144169440163547568663500508335014169\
+425050712038101167190534305435310279534374364467455668392421\
+298604104431988622194699721632249712583483143417550152131186\
+288827131347662976240916448058011869761525369135147129192405\
+037216807405860168320999468074663117771890506566769628495813\
+837909047220874786467663205170561835819702362482274133227483\
+041342457179876653773960112367066273208176545656826800069574\
+547599816180234764485446735080683694920665668954370505715843\
+455110709594838989387382250502925336743830916124954071268053\
+817964873658921319164268375226716232666274830656557657055342\
+393552148933959057023293404027940528842591460490646295820755\
+765633076707491896621769767253619370462005760078938144396953\
+018925287611875441613896820035092167912718365454954166761481\
+511451950826683236776211829914518353242818636196417736206010\
+145109509967467266157037719712666871515644277723594273405669\
+093518586548079997818085130346801040781966074621669280188633\
+856299289656492439545033914935979634179552686396067914528336\
+924678729357419403624798426886422277256625046946795576781709\
+298737741510378578072199383561520569978396254537274419476511\
+983161908266152660163477408756159700314280122283281906103567\
+067156627222418787671312246698375736071215395722993294041012\
+744631560602983489316782773611740570974847045870362276861106\
+774130949410119612624380274679529647271294627526939490197641\
+645383447755544661714281218489998189691140343327976729279891\
+077101372792811842951182338559423852563331641533781432796742\
+873181364582071661749961126386895359760476172215209100274274\
+851619657020388051618654944574445941780637669570374280535432\
+399157923698778110534174856844986671232161320063786308144771\
+068130888985636449091787794632959555876880672773686838364706\
+122084832995722603440165161942472322987408003421165899848443\
+566885769845535074102932500939450142098799833145629484519298\
+622410092757836842296697186410137365818568152771850732591405\
+340248509247875448717161746544246407280913725135059228268131\
+453903691495906528862410006254958805237716723952273129715780\
+425223305517882562616830806755498203755676925741529569939445\
+043490046171854709456730491532189688306135861932534903184518\
+717706426178028900836080044604143054210332610482947502104703\
+032028463320549525316174330585387581543470878545616097381416\
+151451037487775797335749896735101048367502483255117772375025\
+269956476872153642623856062175536913321594213515989059505375\
+135183515207096576145781316398544325320022366962008554087665\
+201050763789833457082359181807492731245904330245198691471329\
+319324627030678762142685799400660305214140453863665517807185\
+105354694177602424937823924511789133225030926924236498557565\
+212794565582753399214908928688568628950225640472058381324292\
+866007645368390366981937596341868992912741319342960598330486\
+905946276235953206760977215407164729909506118583728562718724\
+235732515062300426080741679038098122641980345051854359908213\
+563779664847422505775922437272989231878912994048540484468227\
+199282393172540734295329890896755037903724644870572648941076\
+132423009124870700536763793881894969000042397318202298868940\
+530196108237639578098191879486398269734335286831689173606327\
+500405178476864790935386838169242131756729797688220656276969\
+434749140204830563840068728357383111109865861495106613619153\
+421725274090787422508800568671498311491210197298472420373359\
+044400631309819996507004167876832936101195902219429743174557\
+163362274547892397934880322990633165889175059124060202200452\
+648684577182821651588921716304707095995039972827781680978274\
+973838841958209215836456212939412000456040621743349981715350\
+305133662772937143899882197561295808685181679238411733642697\
+748892466944352640514849114619882270112386610376024527101889\
+119004382703622803911212700216792471528793241950356942780714\
+774957204475130171711488773121937363663487116301055073658645\
+980695862570269762957141239436916216723776945522480189876803\
+386123827956059851911061129713987960026363403936931196519733\
+447116468545744829997003979525368783485129837821983305137448\
+031689360764270759437872004895754351479890333865299565515706\
+690471030702230767978923298480584997256328135245813726407464\
+159230169328539541524724878662873185450510653764301207480799\
+488602832618557388369552461881286225098286358672257087829660\
+174231705350465091313887538950130611513878400895128618426154\
+417299623157313010877679890009181366178705821415173309356192\
+686429159835537275875876767919535369607142366878476025895389\
+279625854409611312402187942369446302119309705461187450803468\
+606366203101933821675974655441744883993796837164178911391575\
+751463591650231265941242686108002052587760190005508737394014\
+453031299745602214380618917954427803281262300931789525045703\
+809571995929933387196864877982754748535701000330924817431298\
+365273697561943437891318220691072831562717726798635382168915\
+187137325209768346284183473712613689334546294053718697897526\
+843398053681374508250012035211936425982389543291022583173280\
+985811169783438836113209408147936547458073361625570571955232\
+746103236016857123149307991441916732438322836596693687161268\
+151183603534413030099360835441935243365729307681545065674775\
+655582111435085683962037818795920337874290127531069511296530\
+746308404963763022896682861683252995925040540038039172626001\
+958340013361801588367655990575379797454237110701588716509764\
+759243657077584013289594787913434812509790293636440469725564\
+222946985585616708175959944099853232059130350099233608207347\
+955460820122006976717445739825352919058005528371183277021250\
+186916447745609162301667393077050176560656798672598371789181\
+232542195795945358691713761483976100058707499929103557275695\
+937295677892604799308353051124627278706035295473126217205599\
+530746756205492173148619619059839609108464715691924592576481\
+382126740168148453274964955074129767533813576349605298268179\
+068244338581354855186516322703199278802275718580352103754433\
+240982354636196477238624205575823556321375833700666021556412\
+182358152808745703724362178773168996492870519432472065091133\
+11767578125001e-4966L;
+/* 0x1.8p-16494 */
+static const long double ld2ae = 0x1p-16494L, ld2be = 0x2p-16494L, ld2ce = 0x2p-16494L;
+static const long double ld2a =
+9.7127626791570376663866584373414698287493540070520215145348\
+265837955593101861790565265072369149749103838172122152721795\
+148808298295738130700276651079589269745641890661270024016251\
+019384577076103591727897583309855871833343782567221021062330\
+520323854737144092431836545425360063420220465935798468889597\
+393404878618618014948930985668173745969857941024624992678516\
+796046407897341714914468689706271051039477065250599233051128\
+834730700520991768191047336500699552011524055936141175278227\
+064109997091342657525775034753507507952039644285302561195715\
+206557908066743405503232817530015665644259150328222704419796\
+441925506500088029030962482377765030782723392665098962794517\
+576730231882534561711832295689196981946271461652617181055665\
+029685844922254588158309151172148171793920968125962871768401\
+514219388391855549421226044104700106207541829733799638752028\
+173330033785725845708464578148564931432318289223948214495353\
+081747057754695954292472958266030251293951030611301194357888\
+019943253579850479798277589149352414382665544987175298434214\
+478200760268387259124784797823102040919106572400856191771348\
+281558462777916462381681390008210723234194499857395959685631\
+103905591697879596717577715572554824817827584594613762331897\
+400606438644266287902006019904862430824505901556613731586390\
+168599701978602862986749723963103806767402004526070426607181\
+825747922672223610811748401048244356042029124854637072147748\
+725579398139682075412513930407121100054336291386326642984001\
+127998334974858209653245050832581320436526628590981309844730\
+407816586888468434842085594277964816488928181716264953794825\
+008820444984449555836465896129531451786104307525226808006600\
+779348570662654426040504120543057111107378732433349774914269\
+114072708176913318160948697397435213257520066915742989940448\
+143697754422357993424629248859049440534892849320746268179914\
+554583983135330126247834945300073309752528242351508345806997\
+166008883707127049913489117882817860966482186638832168035518\
+547034785578194655682192342735350140833854383710286830614088\
+160157865037563419851961350527354941108767405900340732309106\
+276336035381203764047251096208168592703256215746762632401447\
+152692930097455870617179441468393769999033655798513790480379\
+006890871305232768065242533442449079450072575765459163647064\
+342973773862113844201909366754475759002671807165811771132763\
+080642939637475165826471100668049369686467070723571785727451\
+880981477281249312246654190920467838735709729099560268987993\
+922945108459361151792094263319471761024927851228982814252213\
+519491081673366498846956075196529123585663883716590919107614\
+633893976419001988983816482034201465056277885540374744476861\
+750132141428803822571155963108435657119217200055907192435247\
+874999372748282438180554683005862623824642214599119474694103\
+960853742166199856978367947235980051781968651483783495342232\
+954349909573385979410403141459464534634995394356365919502754\
+724946777741899521109008000695745645078551399660814021116536\
+655749435948779817814066783795859497355305214492181630929578\
+847199238542943651540507599871461279285579624694324361023373\
+707531098971698541342280852237066460615431579189178378561194\
+172524973953556992919385025122842333469297321105671995800309\
+309633498690867723547140713111442746824881534458886302917356\
+653091434863492329838352758301829757778933132703869088008094\
+675627125816403572843436425276619486609339270853697062497300\
+328870997605020552097286001653505594207990557642339328807413\
+227100406607755741340441132517749388595948759195317512557878\
+416233575616587901198472089121093330999897692799317101600836\
+099489460591403665960336872530069816871780920562654935511809\
+645452735200740179624950793984014164529466444382558710840503\
+646450512405234491455440034942909031078393317704206940370308\
+684236835526397150556746599533254593941633896202932393007537\
+673266074923116068628384786062194914042771295779439885715389\
+357594885989682121213153533215605128333850742639410724967673\
+883284678814436067523913854991596587657401966348100597154425\
+325485566823423076082201071414803929712348781452793135058870\
+492918348933242055431354758500236922407134394398698076450588\
+396958158802767825944728350880686237998680915415443167076178\
+911739085748840458235337085643267137446973020988327650097647\
+165014946264643975815638479556314291101645367935123993093786\
+582600438548945848259707843279161086198675408925933600311615\
+428118865841645716039791455856756541424710978756200560993332\
+887344427373688627922683426869140915164843256020904560951477\
+891674986393096433202120538411067908090153863118403925770011\
+018063004678778615949475991732024974692553643880962797066439\
+850738990118773176131476115230730262123167407320563510551236\
+743953710665679470765273617718616108994029022776271817109585\
+266594261331597335282139081984596344964057781522191646561827\
+550790563823105342889841684791723392119663413065274464824389\
+193009710215891507033131686963884367885455869616509038575859\
+401565845913422314243208408202380488923480307905914026187792\
+173761338231822535262836663234810324357814170469665216751909\
+358778546855365681180620451075947932208061785930047186745864\
+869465034307360299821666637866586258459810085040702059082829\
+751567542893449238034641018001458509309792474567933738149575\
+554449108144820908702151811237205173697690115303153085234681\
+514152955272511661522989847510493796115116064878740702806004\
+343433164318094216952115530098938898426308252149645340589562\
+644869225768357954631994812409839231441980355794430127694896\
+896491616863512720318746239544591731455028723849548933141295\
+953669192660989415044776894176322467844855976195199023921936\
+699427841174911239593401205926299751407204361412696320213363\
+304107778816937724874521837448233888318479329375321435968913\
+261660516526419532347019419540663257128411929128403012569143\
+516560220706745585698808432508320490642705990501525005042508\
+275152136114303501571602916305930838603123093402367005177263\
+895812313295965866584099164896749137750449430252650456393558\
+866481394042988928722749344174035609284576107405441387577215\
+111650422217580504962998404223989353315671519700308885487441\
+513727141662624359402989615511685507459107087446822399682449\
+124027371539629961321880337101198819624529636970480400208723\
+642799448540704293456340205242051084761997006863111517147530\
+365332128784516968162146751508776010231492748374862213804161\
+453894620976763957492805125680148697998824491969672971166027\
+180656446801877171069880212083821586527774381471938887462267\
+296899230122475689865309301760858111386017280236814433190859\
+056775862835626324841690460105276503738155096364862500284444\
+534355852480049710328635489743555059728455908589253208618030\
+435328529902401798471113159138000614546932833170782820217007\
+280555759644239993454255391040403122345898223865007840565901\
+568897868969477318635101744807938902538658059188203743585010\
+774036188072258210874395280659266831769875140840386730345127\
+896213224531135734216598150684561709935188763611823258429535\
+949485724798457980490432226268479100942840366849845718310701\
+201469881667256363013936740095127208213646187168979882123038\
+233894681808950467950348320835221712924541137611086830583320\
+322392848230358837873140824038588941813883882580818470592924\
+936150343266633985142843655469994569073421029983930187839673\
+231304118378435528853547015678271557689994924601344298390228\
+619544093746214985249883379160686079281428516645627300822824\
+554858971061164154855964833723337825341913008711122841606297\
+197473771096334331602524570534960013696483960191358924434313\
+204392666956909347275363383898878667630642018321060515094118\
+366254498987167810320495485827416968962224010263497699545330\
+700657309536605222308797502818350426296399499436888453557895\
+867230278273510526890091559230412097455704458315552197774216\
+020745527743626346151485239632739221842741175405177684804394\
+361711074487719586587230018764876415713150171856819389147341\
+275669916553647687850492420266494611267030777224588709818335\
+130470138515564128370191474596569064918407585797604709553556\
+153119278534086702508240133812429162630997831448842506314109\
+096085389961648575948522991756162744630412635636848292144248\
+454353112463327392007249690205303145102507449765353317125075\
+809869430616460927871568186526610739964782640547967178516125\
+405550545621289728437343949195632975960067100886025662262995\
+603152291369500371247077545422478193737712990735596074413987\
+957973881092036286428057398201980915642421361590996553421555\
+316064082532807274813471773535367399675092780772709495672695\
+638383696748260197644726786065705886850676921416175143972878\
+598022936105171100945812789025606978738223958028881794991460\
+717838828707859620282931646221494189728518355751185688156172\
+707197545186901278242225037114294367925941035155563079724640\
+691338994542267517327767311818967695636738982145621453404681\
+597847179517622202885989672690265113711173934611717946823228\
+397269027374612101610291381645684907000127191954606896606821\
+590588324712918734294575638459194809203005860495067520818982\
+501215535430594372806160514507726395270189393064661968830908\
+304247420614491691520206185072149333329597584485319840857460\
+265175822272362267526401706014494934473630591895417261120077\
+133201893929459989521012503630498808303587706658289229523671\
+490086823643677193804640968971899497667525177372180606601357\
+946053731548464954766765148914121287985119918483345042934824\
+921516525874627647509368638818236001368121865230049945146050\
+915400988318811431699646592683887426055545037715235200928093\
+246677400833057921544547343859646810337159831128073581305667\
+357013148110868411733638100650377414586379725851070828342144\
+324871613425390515134466319365812090990461348903165220975937\
+942087587710809288871423718310748650171330836567440569630410\
+158371483868179555733183389141963880079090211810793589559200\
+341349405637234489991011938576106350455389513465949915412344\
+095068082292812278313616014687263054439671001595898696547120\
+071413092106692303936769895441754991768984405737441179222392\
+477690507985618624574174635988619556351531961292903622442398\
+465808497855672165108657385643858675294859076016771263488980\
+522695116051395273941662616850391834541635202685385855278463\
+251898869471939032633039670027544098536117464245519928068578\
+059287479506611827627630303758606108821427100635428077686167\
+838877563228833937206563827108338906357929116383562352410405\
+819098609305801465027923966325234651981390511492536734174727\
+254390774950693797823728058324006157763280570016526212182043\
+359093899236806643141856753863283409843786902795368575137111\
+428715987789800161590594633948264245607103000992774452293895\
+095821092685830313673954662073218494688153180395906146506745\
+561411975629305038852550421137841068003638882161156093692580\
+530194161044123524750036105635809277947168629873067749519842\
+957433509350316508339628224443809642374220084876711715865698\
+238309708050571369447923974325750197314968509790081061483804\
+453550810603239090298082506325805730097187923044635197024326\
+966746334305257051886113456387761013622870382593208533889592\
+238925214891289068690048585049758987775121620114117517878005\
+875020040085404765102967971726139392362711332104766149529294\
+277730971232752039868784363740304437529370880909321409176692\
+668840956756850124527879832299559696177391050297700824622043\
+866382460366020930152337219476058757174016585113549831063750\
+560749343236827486905002179231150529681970396017795115367543\
+697626587387836076075141284451928300176122499787310671827087\
+811887033677814397925059153373881836118105886419378651616798\
+592240268616476519445858857179518827325394147075773777729444\
+146380220504445359824894865222389302601440729048815894804537\
+204733015744064565559548968109597836406827155741056311263299\
+722947063908589431715872616727470668964127501101998064669236\
+547074458426237111173086536319506989478611558297416195273399\
+35302734374999e-4966L;
+static const long double ld2b =
+9.7127626791570376663866584373414698287493540070520215145348\
+265837955593101861790565265072369149749103838172122152721795\
+148808298295738130700276651079589269745641890661270024016251\
+019384577076103591727897583309855871833343782567221021062330\
+520323854737144092431836545425360063420220465935798468889597\
+393404878618618014948930985668173745969857941024624992678516\
+796046407897341714914468689706271051039477065250599233051128\
+834730700520991768191047336500699552011524055936141175278227\
+064109997091342657525775034753507507952039644285302561195715\
+206557908066743405503232817530015665644259150328222704419796\
+441925506500088029030962482377765030782723392665098962794517\
+576730231882534561711832295689196981946271461652617181055665\
+029685844922254588158309151172148171793920968125962871768401\
+514219388391855549421226044104700106207541829733799638752028\
+173330033785725845708464578148564931432318289223948214495353\
+081747057754695954292472958266030251293951030611301194357888\
+019943253579850479798277589149352414382665544987175298434214\
+478200760268387259124784797823102040919106572400856191771348\
+281558462777916462381681390008210723234194499857395959685631\
+103905591697879596717577715572554824817827584594613762331897\
+400606438644266287902006019904862430824505901556613731586390\
+168599701978602862986749723963103806767402004526070426607181\
+825747922672223610811748401048244356042029124854637072147748\
+725579398139682075412513930407121100054336291386326642984001\
+127998334974858209653245050832581320436526628590981309844730\
+407816586888468434842085594277964816488928181716264953794825\
+008820444984449555836465896129531451786104307525226808006600\
+779348570662654426040504120543057111107378732433349774914269\
+114072708176913318160948697397435213257520066915742989940448\
+143697754422357993424629248859049440534892849320746268179914\
+554583983135330126247834945300073309752528242351508345806997\
+166008883707127049913489117882817860966482186638832168035518\
+547034785578194655682192342735350140833854383710286830614088\
+160157865037563419851961350527354941108767405900340732309106\
+276336035381203764047251096208168592703256215746762632401447\
+152692930097455870617179441468393769999033655798513790480379\
+006890871305232768065242533442449079450072575765459163647064\
+342973773862113844201909366754475759002671807165811771132763\
+080642939637475165826471100668049369686467070723571785727451\
+880981477281249312246654190920467838735709729099560268987993\
+922945108459361151792094263319471761024927851228982814252213\
+519491081673366498846956075196529123585663883716590919107614\
+633893976419001988983816482034201465056277885540374744476861\
+750132141428803822571155963108435657119217200055907192435247\
+874999372748282438180554683005862623824642214599119474694103\
+960853742166199856978367947235980051781968651483783495342232\
+954349909573385979410403141459464534634995394356365919502754\
+724946777741899521109008000695745645078551399660814021116536\
+655749435948779817814066783795859497355305214492181630929578\
+847199238542943651540507599871461279285579624694324361023373\
+707531098971698541342280852237066460615431579189178378561194\
+172524973953556992919385025122842333469297321105671995800309\
+309633498690867723547140713111442746824881534458886302917356\
+653091434863492329838352758301829757778933132703869088008094\
+675627125816403572843436425276619486609339270853697062497300\
+328870997605020552097286001653505594207990557642339328807413\
+227100406607755741340441132517749388595948759195317512557878\
+416233575616587901198472089121093330999897692799317101600836\
+099489460591403665960336872530069816871780920562654935511809\
+645452735200740179624950793984014164529466444382558710840503\
+646450512405234491455440034942909031078393317704206940370308\
+684236835526397150556746599533254593941633896202932393007537\
+673266074923116068628384786062194914042771295779439885715389\
+357594885989682121213153533215605128333850742639410724967673\
+883284678814436067523913854991596587657401966348100597154425\
+325485566823423076082201071414803929712348781452793135058870\
+492918348933242055431354758500236922407134394398698076450588\
+396958158802767825944728350880686237998680915415443167076178\
+911739085748840458235337085643267137446973020988327650097647\
+165014946264643975815638479556314291101645367935123993093786\
+582600438548945848259707843279161086198675408925933600311615\
+428118865841645716039791455856756541424710978756200560993332\
+887344427373688627922683426869140915164843256020904560951477\
+891674986393096433202120538411067908090153863118403925770011\
+018063004678778615949475991732024974692553643880962797066439\
+850738990118773176131476115230730262123167407320563510551236\
+743953710665679470765273617718616108994029022776271817109585\
+266594261331597335282139081984596344964057781522191646561827\
+550790563823105342889841684791723392119663413065274464824389\
+193009710215891507033131686963884367885455869616509038575859\
+401565845913422314243208408202380488923480307905914026187792\
+173761338231822535262836663234810324357814170469665216751909\
+358778546855365681180620451075947932208061785930047186745864\
+869465034307360299821666637866586258459810085040702059082829\
+751567542893449238034641018001458509309792474567933738149575\
+554449108144820908702151811237205173697690115303153085234681\
+514152955272511661522989847510493796115116064878740702806004\
+343433164318094216952115530098938898426308252149645340589562\
+644869225768357954631994812409839231441980355794430127694896\
+896491616863512720318746239544591731455028723849548933141295\
+953669192660989415044776894176322467844855976195199023921936\
+699427841174911239593401205926299751407204361412696320213363\
+304107778816937724874521837448233888318479329375321435968913\
+261660516526419532347019419540663257128411929128403012569143\
+516560220706745585698808432508320490642705990501525005042508\
+275152136114303501571602916305930838603123093402367005177263\
+895812313295965866584099164896749137750449430252650456393558\
+866481394042988928722749344174035609284576107405441387577215\
+111650422217580504962998404223989353315671519700308885487441\
+513727141662624359402989615511685507459107087446822399682449\
+124027371539629961321880337101198819624529636970480400208723\
+642799448540704293456340205242051084761997006863111517147530\
+365332128784516968162146751508776010231492748374862213804161\
+453894620976763957492805125680148697998824491969672971166027\
+180656446801877171069880212083821586527774381471938887462267\
+296899230122475689865309301760858111386017280236814433190859\
+056775862835626324841690460105276503738155096364862500284444\
+534355852480049710328635489743555059728455908589253208618030\
+435328529902401798471113159138000614546932833170782820217007\
+280555759644239993454255391040403122345898223865007840565901\
+568897868969477318635101744807938902538658059188203743585010\
+774036188072258210874395280659266831769875140840386730345127\
+896213224531135734216598150684561709935188763611823258429535\
+949485724798457980490432226268479100942840366849845718310701\
+201469881667256363013936740095127208213646187168979882123038\
+233894681808950467950348320835221712924541137611086830583320\
+322392848230358837873140824038588941813883882580818470592924\
+936150343266633985142843655469994569073421029983930187839673\
+231304118378435528853547015678271557689994924601344298390228\
+619544093746214985249883379160686079281428516645627300822824\
+554858971061164154855964833723337825341913008711122841606297\
+197473771096334331602524570534960013696483960191358924434313\
+204392666956909347275363383898878667630642018321060515094118\
+366254498987167810320495485827416968962224010263497699545330\
+700657309536605222308797502818350426296399499436888453557895\
+867230278273510526890091559230412097455704458315552197774216\
+020745527743626346151485239632739221842741175405177684804394\
+361711074487719586587230018764876415713150171856819389147341\
+275669916553647687850492420266494611267030777224588709818335\
+130470138515564128370191474596569064918407585797604709553556\
+153119278534086702508240133812429162630997831448842506314109\
+096085389961648575948522991756162744630412635636848292144248\
+454353112463327392007249690205303145102507449765353317125075\
+809869430616460927871568186526610739964782640547967178516125\
+405550545621289728437343949195632975960067100886025662262995\
+603152291369500371247077545422478193737712990735596074413987\
+957973881092036286428057398201980915642421361590996553421555\
+316064082532807274813471773535367399675092780772709495672695\
+638383696748260197644726786065705886850676921416175143972878\
+598022936105171100945812789025606978738223958028881794991460\
+717838828707859620282931646221494189728518355751185688156172\
+707197545186901278242225037114294367925941035155563079724640\
+691338994542267517327767311818967695636738982145621453404681\
+597847179517622202885989672690265113711173934611717946823228\
+397269027374612101610291381645684907000127191954606896606821\
+590588324712918734294575638459194809203005860495067520818982\
+501215535430594372806160514507726395270189393064661968830908\
+304247420614491691520206185072149333329597584485319840857460\
+265175822272362267526401706014494934473630591895417261120077\
+133201893929459989521012503630498808303587706658289229523671\
+490086823643677193804640968971899497667525177372180606601357\
+946053731548464954766765148914121287985119918483345042934824\
+921516525874627647509368638818236001368121865230049945146050\
+915400988318811431699646592683887426055545037715235200928093\
+246677400833057921544547343859646810337159831128073581305667\
+357013148110868411733638100650377414586379725851070828342144\
+324871613425390515134466319365812090990461348903165220975937\
+942087587710809288871423718310748650171330836567440569630410\
+158371483868179555733183389141963880079090211810793589559200\
+341349405637234489991011938576106350455389513465949915412344\
+095068082292812278313616014687263054439671001595898696547120\
+071413092106692303936769895441754991768984405737441179222392\
+477690507985618624574174635988619556351531961292903622442398\
+465808497855672165108657385643858675294859076016771263488980\
+522695116051395273941662616850391834541635202685385855278463\
+251898869471939032633039670027544098536117464245519928068578\
+059287479506611827627630303758606108821427100635428077686167\
+838877563228833937206563827108338906357929116383562352410405\
+819098609305801465027923966325234651981390511492536734174727\
+254390774950693797823728058324006157763280570016526212182043\
+359093899236806643141856753863283409843786902795368575137111\
+428715987789800161590594633948264245607103000992774452293895\
+095821092685830313673954662073218494688153180395906146506745\
+561411975629305038852550421137841068003638882161156093692580\
+530194161044123524750036105635809277947168629873067749519842\
+957433509350316508339628224443809642374220084876711715865698\
+238309708050571369447923974325750197314968509790081061483804\
+453550810603239090298082506325805730097187923044635197024326\
+966746334305257051886113456387761013622870382593208533889592\
+238925214891289068690048585049758987775121620114117517878005\
+875020040085404765102967971726139392362711332104766149529294\
+277730971232752039868784363740304437529370880909321409176692\
+668840956756850124527879832299559696177391050297700824622043\
+866382460366020930152337219476058757174016585113549831063750\
+560749343236827486905002179231150529681970396017795115367543\
+697626587387836076075141284451928300176122499787310671827087\
+811887033677814397925059153373881836118105886419378651616798\
+592240268616476519445858857179518827325394147075773777729444\
+146380220504445359824894865222389302601440729048815894804537\
+204733015744064565559548968109597836406827155741056311263299\
+722947063908589431715872616727470668964127501101998064669236\
+547074458426237111173086536319506989478611558297416195273399\
+35302734375e-4966L;
+static const long double ld2c =
+9.7127626791570376663866584373414698287493540070520215145348\
+265837955593101861790565265072369149749103838172122152721795\
+148808298295738130700276651079589269745641890661270024016251\
+019384577076103591727897583309855871833343782567221021062330\
+520323854737144092431836545425360063420220465935798468889597\
+393404878618618014948930985668173745969857941024624992678516\
+796046407897341714914468689706271051039477065250599233051128\
+834730700520991768191047336500699552011524055936141175278227\
+064109997091342657525775034753507507952039644285302561195715\
+206557908066743405503232817530015665644259150328222704419796\
+441925506500088029030962482377765030782723392665098962794517\
+576730231882534561711832295689196981946271461652617181055665\
+029685844922254588158309151172148171793920968125962871768401\
+514219388391855549421226044104700106207541829733799638752028\
+173330033785725845708464578148564931432318289223948214495353\
+081747057754695954292472958266030251293951030611301194357888\
+019943253579850479798277589149352414382665544987175298434214\
+478200760268387259124784797823102040919106572400856191771348\
+281558462777916462381681390008210723234194499857395959685631\
+103905591697879596717577715572554824817827584594613762331897\
+400606438644266287902006019904862430824505901556613731586390\
+168599701978602862986749723963103806767402004526070426607181\
+825747922672223610811748401048244356042029124854637072147748\
+725579398139682075412513930407121100054336291386326642984001\
+127998334974858209653245050832581320436526628590981309844730\
+407816586888468434842085594277964816488928181716264953794825\
+008820444984449555836465896129531451786104307525226808006600\
+779348570662654426040504120543057111107378732433349774914269\
+114072708176913318160948697397435213257520066915742989940448\
+143697754422357993424629248859049440534892849320746268179914\
+554583983135330126247834945300073309752528242351508345806997\
+166008883707127049913489117882817860966482186638832168035518\
+547034785578194655682192342735350140833854383710286830614088\
+160157865037563419851961350527354941108767405900340732309106\
+276336035381203764047251096208168592703256215746762632401447\
+152692930097455870617179441468393769999033655798513790480379\
+006890871305232768065242533442449079450072575765459163647064\
+342973773862113844201909366754475759002671807165811771132763\
+080642939637475165826471100668049369686467070723571785727451\
+880981477281249312246654190920467838735709729099560268987993\
+922945108459361151792094263319471761024927851228982814252213\
+519491081673366498846956075196529123585663883716590919107614\
+633893976419001988983816482034201465056277885540374744476861\
+750132141428803822571155963108435657119217200055907192435247\
+874999372748282438180554683005862623824642214599119474694103\
+960853742166199856978367947235980051781968651483783495342232\
+954349909573385979410403141459464534634995394356365919502754\
+724946777741899521109008000695745645078551399660814021116536\
+655749435948779817814066783795859497355305214492181630929578\
+847199238542943651540507599871461279285579624694324361023373\
+707531098971698541342280852237066460615431579189178378561194\
+172524973953556992919385025122842333469297321105671995800309\
+309633498690867723547140713111442746824881534458886302917356\
+653091434863492329838352758301829757778933132703869088008094\
+675627125816403572843436425276619486609339270853697062497300\
+328870997605020552097286001653505594207990557642339328807413\
+227100406607755741340441132517749388595948759195317512557878\
+416233575616587901198472089121093330999897692799317101600836\
+099489460591403665960336872530069816871780920562654935511809\
+645452735200740179624950793984014164529466444382558710840503\
+646450512405234491455440034942909031078393317704206940370308\
+684236835526397150556746599533254593941633896202932393007537\
+673266074923116068628384786062194914042771295779439885715389\
+357594885989682121213153533215605128333850742639410724967673\
+883284678814436067523913854991596587657401966348100597154425\
+325485566823423076082201071414803929712348781452793135058870\
+492918348933242055431354758500236922407134394398698076450588\
+396958158802767825944728350880686237998680915415443167076178\
+911739085748840458235337085643267137446973020988327650097647\
+165014946264643975815638479556314291101645367935123993093786\
+582600438548945848259707843279161086198675408925933600311615\
+428118865841645716039791455856756541424710978756200560993332\
+887344427373688627922683426869140915164843256020904560951477\
+891674986393096433202120538411067908090153863118403925770011\
+018063004678778615949475991732024974692553643880962797066439\
+850738990118773176131476115230730262123167407320563510551236\
+743953710665679470765273617718616108994029022776271817109585\
+266594261331597335282139081984596344964057781522191646561827\
+550790563823105342889841684791723392119663413065274464824389\
+193009710215891507033131686963884367885455869616509038575859\
+401565845913422314243208408202380488923480307905914026187792\
+173761338231822535262836663234810324357814170469665216751909\
+358778546855365681180620451075947932208061785930047186745864\
+869465034307360299821666637866586258459810085040702059082829\
+751567542893449238034641018001458509309792474567933738149575\
+554449108144820908702151811237205173697690115303153085234681\
+514152955272511661522989847510493796115116064878740702806004\
+343433164318094216952115530098938898426308252149645340589562\
+644869225768357954631994812409839231441980355794430127694896\
+896491616863512720318746239544591731455028723849548933141295\
+953669192660989415044776894176322467844855976195199023921936\
+699427841174911239593401205926299751407204361412696320213363\
+304107778816937724874521837448233888318479329375321435968913\
+261660516526419532347019419540663257128411929128403012569143\
+516560220706745585698808432508320490642705990501525005042508\
+275152136114303501571602916305930838603123093402367005177263\
+895812313295965866584099164896749137750449430252650456393558\
+866481394042988928722749344174035609284576107405441387577215\
+111650422217580504962998404223989353315671519700308885487441\
+513727141662624359402989615511685507459107087446822399682449\
+124027371539629961321880337101198819624529636970480400208723\
+642799448540704293456340205242051084761997006863111517147530\
+365332128784516968162146751508776010231492748374862213804161\
+453894620976763957492805125680148697998824491969672971166027\
+180656446801877171069880212083821586527774381471938887462267\
+296899230122475689865309301760858111386017280236814433190859\
+056775862835626324841690460105276503738155096364862500284444\
+534355852480049710328635489743555059728455908589253208618030\
+435328529902401798471113159138000614546932833170782820217007\
+280555759644239993454255391040403122345898223865007840565901\
+568897868969477318635101744807938902538658059188203743585010\
+774036188072258210874395280659266831769875140840386730345127\
+896213224531135734216598150684561709935188763611823258429535\
+949485724798457980490432226268479100942840366849845718310701\
+201469881667256363013936740095127208213646187168979882123038\
+233894681808950467950348320835221712924541137611086830583320\
+322392848230358837873140824038588941813883882580818470592924\
+936150343266633985142843655469994569073421029983930187839673\
+231304118378435528853547015678271557689994924601344298390228\
+619544093746214985249883379160686079281428516645627300822824\
+554858971061164154855964833723337825341913008711122841606297\
+197473771096334331602524570534960013696483960191358924434313\
+204392666956909347275363383898878667630642018321060515094118\
+366254498987167810320495485827416968962224010263497699545330\
+700657309536605222308797502818350426296399499436888453557895\
+867230278273510526890091559230412097455704458315552197774216\
+020745527743626346151485239632739221842741175405177684804394\
+361711074487719586587230018764876415713150171856819389147341\
+275669916553647687850492420266494611267030777224588709818335\
+130470138515564128370191474596569064918407585797604709553556\
+153119278534086702508240133812429162630997831448842506314109\
+096085389961648575948522991756162744630412635636848292144248\
+454353112463327392007249690205303145102507449765353317125075\
+809869430616460927871568186526610739964782640547967178516125\
+405550545621289728437343949195632975960067100886025662262995\
+603152291369500371247077545422478193737712990735596074413987\
+957973881092036286428057398201980915642421361590996553421555\
+316064082532807274813471773535367399675092780772709495672695\
+638383696748260197644726786065705886850676921416175143972878\
+598022936105171100945812789025606978738223958028881794991460\
+717838828707859620282931646221494189728518355751185688156172\
+707197545186901278242225037114294367925941035155563079724640\
+691338994542267517327767311818967695636738982145621453404681\
+597847179517622202885989672690265113711173934611717946823228\
+397269027374612101610291381645684907000127191954606896606821\
+590588324712918734294575638459194809203005860495067520818982\
+501215535430594372806160514507726395270189393064661968830908\
+304247420614491691520206185072149333329597584485319840857460\
+265175822272362267526401706014494934473630591895417261120077\
+133201893929459989521012503630498808303587706658289229523671\
+490086823643677193804640968971899497667525177372180606601357\
+946053731548464954766765148914121287985119918483345042934824\
+921516525874627647509368638818236001368121865230049945146050\
+915400988318811431699646592683887426055545037715235200928093\
+246677400833057921544547343859646810337159831128073581305667\
+357013148110868411733638100650377414586379725851070828342144\
+324871613425390515134466319365812090990461348903165220975937\
+942087587710809288871423718310748650171330836567440569630410\
+158371483868179555733183389141963880079090211810793589559200\
+341349405637234489991011938576106350455389513465949915412344\
+095068082292812278313616014687263054439671001595898696547120\
+071413092106692303936769895441754991768984405737441179222392\
+477690507985618624574174635988619556351531961292903622442398\
+465808497855672165108657385643858675294859076016771263488980\
+522695116051395273941662616850391834541635202685385855278463\
+251898869471939032633039670027544098536117464245519928068578\
+059287479506611827627630303758606108821427100635428077686167\
+838877563228833937206563827108338906357929116383562352410405\
+819098609305801465027923966325234651981390511492536734174727\
+254390774950693797823728058324006157763280570016526212182043\
+359093899236806643141856753863283409843786902795368575137111\
+428715987789800161590594633948264245607103000992774452293895\
+095821092685830313673954662073218494688153180395906146506745\
+561411975629305038852550421137841068003638882161156093692580\
+530194161044123524750036105635809277947168629873067749519842\
+957433509350316508339628224443809642374220084876711715865698\
+238309708050571369447923974325750197314968509790081061483804\
+453550810603239090298082506325805730097187923044635197024326\
+966746334305257051886113456387761013622870382593208533889592\
+238925214891289068690048585049758987775121620114117517878005\
+875020040085404765102967971726139392362711332104766149529294\
+277730971232752039868784363740304437529370880909321409176692\
+668840956756850124527879832299559696177391050297700824622043\
+866382460366020930152337219476058757174016585113549831063750\
+560749343236827486905002179231150529681970396017795115367543\
+697626587387836076075141284451928300176122499787310671827087\
+811887033677814397925059153373881836118105886419378651616798\
+592240268616476519445858857179518827325394147075773777729444\
+146380220504445359824894865222389302601440729048815894804537\
+204733015744064565559548968109597836406827155741056311263299\
+722947063908589431715872616727470668964127501101998064669236\
+547074458426237111173086536319506989478611558297416195273399\
+35302734375001e-4966L;
+/* 0x1.00000000000000000000000000008p16383 */
+static const long double ld3ae = 0x1p16383L, ld3be = 0x1p16383L, ld3ce = 0x1.0000000000000000000000000001p16383L;
+static const long double ld3a =
+5.9486574767861588254287966331400362266521016077566321470782\
+537912717956830282749074200158904838100315216442070246474582\
+902003466452178519493817532236893426065414065500349426609921\
+035191682920005861156266113904955955975156868485667432573303\
+878926292023832306985858165533616318247459636179261303962505\
+904914506095247123433601806274279678546351097459236573913920\
+031119173565521719790447288258729779003490433862818295682642\
+966216118764004792730459319737327354906008978235133081179386\
+661103577408353480771246949457853166617701522167422003413661\
+284349262437896929014552545611813747697933241007066137144800\
+742052491919942298834913628182656296203230288447275444631994\
+418174246363265098248611943128819168942591708210157385631417\
+956400560296628065072016801065604053356267458749418972817500\
+860163920552394032596390414022010839803056885484295371329659\
+344624001094572196271168792142488910586863048428263135994222\
+918660801863635503541746352435642903327106245556596971697306\
+154375736529491499973297647239267168544491542059174479409314\
+453930981788080813637734358380528957486229480817553751111130\
+404254432007093360403147894746265072027252334199618554793914\
+408408563073872776198001518686536858983411123156743992398602\
+085226973929708268146742705557350571330511483380748376403472\
+416543579901056379914358020396036857647833383066531875675143\
+906511120597222727322243981995901699031025427175941279288823\
+868963521340475095965307606235778429805072284801680535137734\
+383642104178041358430293569208331406005130704155581295151191\
+023575851522079817808333970280354640050199344622016227349001\
+158400930280667186488774262251890453600109065837537684194570\
+764422774923245437306731669764159584659798151950637627762794\
+773771743234047950402370403351226180108444229650943701626484\
+199813157683590670152514287926030050893275989087988431157294\
+053225152320381185461962202878894704210605536874860744635921\
+856800920799848781308318732102232154544901177747472418520161\
+539850654183977571241391795912749098112352006092865789718049\
+308722403022684428414862730635213534446271587083620368851394\
+539053886621230946713996355227159995125430034494483477708852\
+290917108703653719242299789100268057863851224567265334616704\
+172517852701300018859009181286438758473871366303386211559752\
+189988549719766361306120241141163757479824826687017385967199\
+730649217746155593260923125994938678356692052428393066501806\
+030161358556419313420716683771612548240263459903320490075985\
+482955242306590857238462197972208846146747634114611463194143\
+127229709932188005016692926586196070737427116881065809283735\
+578248117685225847553587906225824731173075427424421056682930\
+008434666477496431516691881829440430197100204332606435934395\
+919650053069892524027974091575173698894803107552411683630872\
+565514028274910395383420510115859479233531504702656455261624\
+525121293886827716275308028935388238178963278225114817400178\
+138358373030159940110845417191798464503817960506134575572552\
+914585335913528444536373142082490326061583126796147603336390\
+503084982226891516248370317420733394038771780044922478150880\
+480334844447412365553656029955296322473008695074712792828366\
+405738282245039545396582938290818627301780773130202921675326\
+417583673495241569334204568141534153408474297319168484568799\
+451491133718839097374713416523361939237171154953070144389353\
+699828605993755613252573941610133829557167740458222617685028\
+690018342727148122013513056358815140027414679795450105000784\
+206522215604435223172005007036171570530334304897008809135848\
+675229547083561399988252552429769084290516103080260036003448\
+294799988351419108088251107290628711358276092795741489822211\
+879153727229891058795497426373608319405317602924241055836665\
+412584135657242160003706626205312971822953452930840783143003\
+733239017808969394445195220787737174218027747221253900890536\
+730326425051240764874006627032589076376990325467270006751475\
+463920721323985366812116303998245085483206258613663624851716\
+293180303624443281556295689730668616708901429287181381627670\
+203893651414675005136379365959571811951919653635887567699289\
+348324076406793991923217469674198904524716009847788439650157\
+995310043698774137542541699134940585662745702625097983274489\
+141416414789061652098131796728731652650516767112149192122453\
+562328802846445391417036742140146906572447511494124473885963\
+235217227016424204095604485308686968373890645296189932416571\
+281295736247619241329068636405743573306087991776733585972793\
+132869616481671565021096885870153734254648327143225051745267\
+530463119926261147612098111086806545372953526471421579845285\
+862975776235466663857936867536855924718593170503922894779577\
+706239977813334283740751103082483280516469722321753891088699\
+714361755511843803441649441302693703577359971743834932539197\
+595873998629500074441134301810890941848881837426270390549007\
+490141375766653241037340192392236932759127069111401216220596\
+540958515892047794438580629374176225297401789362125586732528\
+367695144980519774116001979888033796577336271850743828263427\
+598863925843301048044096576340652808516459551933515596083641\
+0468395384831999e+4931L;
+static const long double ld3b =
+5.9486574767861588254287966331400362266521016077566321470782\
+537912717956830282749074200158904838100315216442070246474582\
+902003466452178519493817532236893426065414065500349426609921\
+035191682920005861156266113904955955975156868485667432573303\
+878926292023832306985858165533616318247459636179261303962505\
+904914506095247123433601806274279678546351097459236573913920\
+031119173565521719790447288258729779003490433862818295682642\
+966216118764004792730459319737327354906008978235133081179386\
+661103577408353480771246949457853166617701522167422003413661\
+284349262437896929014552545611813747697933241007066137144800\
+742052491919942298834913628182656296203230288447275444631994\
+418174246363265098248611943128819168942591708210157385631417\
+956400560296628065072016801065604053356267458749418972817500\
+860163920552394032596390414022010839803056885484295371329659\
+344624001094572196271168792142488910586863048428263135994222\
+918660801863635503541746352435642903327106245556596971697306\
+154375736529491499973297647239267168544491542059174479409314\
+453930981788080813637734358380528957486229480817553751111130\
+404254432007093360403147894746265072027252334199618554793914\
+408408563073872776198001518686536858983411123156743992398602\
+085226973929708268146742705557350571330511483380748376403472\
+416543579901056379914358020396036857647833383066531875675143\
+906511120597222727322243981995901699031025427175941279288823\
+868963521340475095965307606235778429805072284801680535137734\
+383642104178041358430293569208331406005130704155581295151191\
+023575851522079817808333970280354640050199344622016227349001\
+158400930280667186488774262251890453600109065837537684194570\
+764422774923245437306731669764159584659798151950637627762794\
+773771743234047950402370403351226180108444229650943701626484\
+199813157683590670152514287926030050893275989087988431157294\
+053225152320381185461962202878894704210605536874860744635921\
+856800920799848781308318732102232154544901177747472418520161\
+539850654183977571241391795912749098112352006092865789718049\
+308722403022684428414862730635213534446271587083620368851394\
+539053886621230946713996355227159995125430034494483477708852\
+290917108703653719242299789100268057863851224567265334616704\
+172517852701300018859009181286438758473871366303386211559752\
+189988549719766361306120241141163757479824826687017385967199\
+730649217746155593260923125994938678356692052428393066501806\
+030161358556419313420716683771612548240263459903320490075985\
+482955242306590857238462197972208846146747634114611463194143\
+127229709932188005016692926586196070737427116881065809283735\
+578248117685225847553587906225824731173075427424421056682930\
+008434666477496431516691881829440430197100204332606435934395\
+919650053069892524027974091575173698894803107552411683630872\
+565514028274910395383420510115859479233531504702656455261624\
+525121293886827716275308028935388238178963278225114817400178\
+138358373030159940110845417191798464503817960506134575572552\
+914585335913528444536373142082490326061583126796147603336390\
+503084982226891516248370317420733394038771780044922478150880\
+480334844447412365553656029955296322473008695074712792828366\
+405738282245039545396582938290818627301780773130202921675326\
+417583673495241569334204568141534153408474297319168484568799\
+451491133718839097374713416523361939237171154953070144389353\
+699828605993755613252573941610133829557167740458222617685028\
+690018342727148122013513056358815140027414679795450105000784\
+206522215604435223172005007036171570530334304897008809135848\
+675229547083561399988252552429769084290516103080260036003448\
+294799988351419108088251107290628711358276092795741489822211\
+879153727229891058795497426373608319405317602924241055836665\
+412584135657242160003706626205312971822953452930840783143003\
+733239017808969394445195220787737174218027747221253900890536\
+730326425051240764874006627032589076376990325467270006751475\
+463920721323985366812116303998245085483206258613663624851716\
+293180303624443281556295689730668616708901429287181381627670\
+203893651414675005136379365959571811951919653635887567699289\
+348324076406793991923217469674198904524716009847788439650157\
+995310043698774137542541699134940585662745702625097983274489\
+141416414789061652098131796728731652650516767112149192122453\
+562328802846445391417036742140146906572447511494124473885963\
+235217227016424204095604485308686968373890645296189932416571\
+281295736247619241329068636405743573306087991776733585972793\
+132869616481671565021096885870153734254648327143225051745267\
+530463119926261147612098111086806545372953526471421579845285\
+862975776235466663857936867536855924718593170503922894779577\
+706239977813334283740751103082483280516469722321753891088699\
+714361755511843803441649441302693703577359971743834932539197\
+595873998629500074441134301810890941848881837426270390549007\
+490141375766653241037340192392236932759127069111401216220596\
+540958515892047794438580629374176225297401789362125586732528\
+367695144980519774116001979888033796577336271850743828263427\
+598863925843301048044096576340652808516459551933515596083641\
+0468395384832e+4931L;
+static const long double ld3c =
+5.9486574767861588254287966331400362266521016077566321470782\
+537912717956830282749074200158904838100315216442070246474582\
+902003466452178519493817532236893426065414065500349426609921\
+035191682920005861156266113904955955975156868485667432573303\
+878926292023832306985858165533616318247459636179261303962505\
+904914506095247123433601806274279678546351097459236573913920\
+031119173565521719790447288258729779003490433862818295682642\
+966216118764004792730459319737327354906008978235133081179386\
+661103577408353480771246949457853166617701522167422003413661\
+284349262437896929014552545611813747697933241007066137144800\
+742052491919942298834913628182656296203230288447275444631994\
+418174246363265098248611943128819168942591708210157385631417\
+956400560296628065072016801065604053356267458749418972817500\
+860163920552394032596390414022010839803056885484295371329659\
+344624001094572196271168792142488910586863048428263135994222\
+918660801863635503541746352435642903327106245556596971697306\
+154375736529491499973297647239267168544491542059174479409314\
+453930981788080813637734358380528957486229480817553751111130\
+404254432007093360403147894746265072027252334199618554793914\
+408408563073872776198001518686536858983411123156743992398602\
+085226973929708268146742705557350571330511483380748376403472\
+416543579901056379914358020396036857647833383066531875675143\
+906511120597222727322243981995901699031025427175941279288823\
+868963521340475095965307606235778429805072284801680535137734\
+383642104178041358430293569208331406005130704155581295151191\
+023575851522079817808333970280354640050199344622016227349001\
+158400930280667186488774262251890453600109065837537684194570\
+764422774923245437306731669764159584659798151950637627762794\
+773771743234047950402370403351226180108444229650943701626484\
+199813157683590670152514287926030050893275989087988431157294\
+053225152320381185461962202878894704210605536874860744635921\
+856800920799848781308318732102232154544901177747472418520161\
+539850654183977571241391795912749098112352006092865789718049\
+308722403022684428414862730635213534446271587083620368851394\
+539053886621230946713996355227159995125430034494483477708852\
+290917108703653719242299789100268057863851224567265334616704\
+172517852701300018859009181286438758473871366303386211559752\
+189988549719766361306120241141163757479824826687017385967199\
+730649217746155593260923125994938678356692052428393066501806\
+030161358556419313420716683771612548240263459903320490075985\
+482955242306590857238462197972208846146747634114611463194143\
+127229709932188005016692926586196070737427116881065809283735\
+578248117685225847553587906225824731173075427424421056682930\
+008434666477496431516691881829440430197100204332606435934395\
+919650053069892524027974091575173698894803107552411683630872\
+565514028274910395383420510115859479233531504702656455261624\
+525121293886827716275308028935388238178963278225114817400178\
+138358373030159940110845417191798464503817960506134575572552\
+914585335913528444536373142082490326061583126796147603336390\
+503084982226891516248370317420733394038771780044922478150880\
+480334844447412365553656029955296322473008695074712792828366\
+405738282245039545396582938290818627301780773130202921675326\
+417583673495241569334204568141534153408474297319168484568799\
+451491133718839097374713416523361939237171154953070144389353\
+699828605993755613252573941610133829557167740458222617685028\
+690018342727148122013513056358815140027414679795450105000784\
+206522215604435223172005007036171570530334304897008809135848\
+675229547083561399988252552429769084290516103080260036003448\
+294799988351419108088251107290628711358276092795741489822211\
+879153727229891058795497426373608319405317602924241055836665\
+412584135657242160003706626205312971822953452930840783143003\
+733239017808969394445195220787737174218027747221253900890536\
+730326425051240764874006627032589076376990325467270006751475\
+463920721323985366812116303998245085483206258613663624851716\
+293180303624443281556295689730668616708901429287181381627670\
+203893651414675005136379365959571811951919653635887567699289\
+348324076406793991923217469674198904524716009847788439650157\
+995310043698774137542541699134940585662745702625097983274489\
+141416414789061652098131796728731652650516767112149192122453\
+562328802846445391417036742140146906572447511494124473885963\
+235217227016424204095604485308686968373890645296189932416571\
+281295736247619241329068636405743573306087991776733585972793\
+132869616481671565021096885870153734254648327143225051745267\
+530463119926261147612098111086806545372953526471421579845285\
+862975776235466663857936867536855924718593170503922894779577\
+706239977813334283740751103082483280516469722321753891088699\
+714361755511843803441649441302693703577359971743834932539197\
+595873998629500074441134301810890941848881837426270390549007\
+490141375766653241037340192392236932759127069111401216220596\
+540958515892047794438580629374176225297401789362125586732528\
+367695144980519774116001979888033796577336271850743828263427\
+598863925843301048044096576340652808516459551933515596083641\
+0468395384832001e+4931L;
+#endif
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+#ifdef FLT_OK
+ if (f1a != f1ae
+ || f1b != f1be
+ || f1c != f1ce
+ || f2a != f2ae
+ || f2b != f2be
+ || f2c != f2ce
+ || f3a != f3ae
+ || f3b != f3be
+ || f3c != f3ce)
+ abort ();
+#endif
+#ifdef DBL_OK
+ if (d1a != d1ae
+ || d1b != d1be
+ || d1c != d1ce
+ || d2a != d2ae
+ || d2b != d2be
+ || d2c != d2ce
+ || d3a != d3ae
+ || d3b != d3be
+ || d3c != d3ce)
+ abort ();
+#endif
+#ifdef LDBL_OK
+ if (ld1a != ld1ae
+ || ld1b != ld1be
+ || ld1c != ld1ce
+ || ld2a != ld2ae
+ || ld2b != ld2be
+ || ld2c != ld2ce
+ || ld3a != ld3ae
+ || ld3b != ld3be
+ || ld3c != ld3ce)
+ abort ();
+#endif
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/fold-bitand-4.c b/gcc/testsuite/gcc.dg/fold-bitand-4.c
new file mode 100644
index 0000000000..dba83615df
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-bitand-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-original" } */
+
+int foo (int i)
+{
+ return (i * 8) & 5;
+}
+
+unsigned bar (unsigned i)
+{
+ return (i * 6) & 5;
+}
+
+/* { dg-final { scan-tree-dump-times "\\\&" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "\\\& 4;" 1 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-compare-7.c b/gcc/testsuite/gcc.dg/fold-compare-7.c
new file mode 100644
index 0000000000..8296751aff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-compare-7.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef float vecf __attribute__((vector_size(8*sizeof(float))));
+
+long f(vecf *f1, vecf *f2){
+ return ((*f1 == *f2) < 0)[2];
+}
diff --git a/gcc/testsuite/gcc.dg/fold-cstvecshift.c b/gcc/testsuite/gcc.dg/fold-cstvecshift.c
new file mode 100644
index 0000000000..51f42d42bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-cstvecshift.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+typedef int vec __attribute__ ((vector_size (4 * sizeof (int))));
+
+void f (vec *r)
+{
+ vec a = { 2, 3, 4, 5 };
+ *r = (a << 2) >> 1;
+}
+
+/* { dg-final { scan-tree-dump "{ 4, 6, 8, 10 }" "ccp1"} } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-minus-1.c b/gcc/testsuite/gcc.dg/fold-minus-1.c
new file mode 100644
index 0000000000..c0fb89a01a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-minus-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-gimple" } */
+
+typedef int vec __attribute__((vector_size(2*sizeof(int))));
+
+void f(vec*x,vec*y){
+ *x -= *x / *y * *y;
+}
+void g(vec*x,vec*y,vec*z){
+ *x = -1 - *x;
+ *y = -*y - 1;
+ *z = -*z - 13;
+}
+
+/* { dg-final { scan-tree-dump-times "%" 1 "gimple"} } */
+/* { dg-final { scan-tree-dump-times "~" 2 "gimple"} } */
+/* { dg-final { scan-tree-dump-not "/" "gimple"} } */
+/* { dg-final { scan-tree-dump-not "\\\+" "gimple"} } */
+/* { dg-final { scan-tree-dump "{ -13, -13 }" "gimple"} } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-notunord.c b/gcc/testsuite/gcc.dg/fold-notunord.c
new file mode 100644
index 0000000000..edfe3cd029
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-notunord.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftrapping-math -fdump-tree-optimized" } */
+
+int f (double d)
+{
+ return !__builtin_isnan (d);
+}
+
+/* { dg-final { scan-tree-dump " ord " "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-overflow-1.c b/gcc/testsuite/gcc.dg/fold-overflow-1.c
index 8fddc9fc0e..4f45b35ee4 100644
--- a/gcc/testsuite/gcc.dg/fold-overflow-1.c
+++ b/gcc/testsuite/gcc.dg/fold-overflow-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "consts are shorts, not longs" { "m32c-*-*" "avr-*-*" } { "*" } { "" } } */
+/* { dg-require-effective-target int32plus } */
/* { dg-skip-if "No Inf support" { spu-*-* } } */
/* { dg-options "-O -ftrapping-math" } */
diff --git a/gcc/testsuite/gcc.dg/fold-perm.c b/gcc/testsuite/gcc.dg/fold-perm.c
new file mode 100644
index 0000000000..2270c7b0f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-perm.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+typedef int veci __attribute__ ((vector_size (4 * sizeof (int))));
+
+void fun (veci *f, veci *g, veci *h, veci *i)
+{
+ veci m = { 7, 7, 4, 6 };
+ veci n = { 0, 1, 2, 3 };
+ veci p = { 1, 1, 7, 6 };
+ *i = __builtin_shuffle (*i, p, m);
+ *h = __builtin_shuffle (*h, *h, p);
+ *g = __builtin_shuffle (*f, *g, m);
+ *f = __builtin_shuffle (*f, *g, n);
+}
+
+/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 3, 3, 0, 2 }" "ccp1" } } */
+/* { dg-final { scan-tree-dump "VEC_PERM_EXPR.*{ 1, 1, 3, 2 }" "ccp1" } } */
+/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 2 "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/fold-reassoc-2.c b/gcc/testsuite/gcc.dg/fold-reassoc-2.c
new file mode 100644
index 0000000000..e2dd100b71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fold-reassoc-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-original" } */
+
+int foo (int i)
+{
+ return (i + 2) - (i + 1);
+}
+int bar (int i)
+{
+ return (i + 2) + ~i;
+}
+
+/* { dg-final { scan-tree-dump "return 1;" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/foo.specs b/gcc/testsuite/gcc.dg/foo.specs
new file mode 100644
index 0000000000..8819249fa3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/foo.specs
@@ -0,0 +1,2 @@
+*cppruntime:
++ %{tfoo: -DFOO}
diff --git a/gcc/testsuite/gcc.dg/fork-instrumentation.c b/gcc/testsuite/gcc.dg/fork-instrumentation.c
new file mode 100644
index 0000000000..bd9bf41cd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fork-instrumentation.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -fprofile-generate" } */
+int fork(void);
+t()
+{
+ fork ();
+}
+/* { dg-final { scan-assembler "gcov_fork" } } */
diff --git a/gcc/testsuite/gcc.dg/format/c90-printf-1.c b/gcc/testsuite/gcc.dg/format/c90-printf-1.c
index 586e4af6a5..93b7f80a16 100644
--- a/gcc/testsuite/gcc.dg/format/c90-printf-1.c
+++ b/gcc/testsuite/gcc.dg/format/c90-printf-1.c
@@ -209,7 +209,7 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
*/
printf ("%s", p); /* { dg-warning "format" "bad argument types" } */
/* The historical behavior is to allow signed / unsigned types
- interchangably as arguments. For values representable in both types,
+ interchangeably as arguments. For values representable in both types,
such usage may be correct. For now preserve the behavior of GCC
in such cases.
*/
diff --git a/gcc/testsuite/gcc.dg/format/cast-1.c b/gcc/testsuite/gcc.dg/format/cast-1.c
index 03e624a5cc..5d1d47709b 100644
--- a/gcc/testsuite/gcc.dg/format/cast-1.c
+++ b/gcc/testsuite/gcc.dg/format/cast-1.c
@@ -11,6 +11,6 @@ void
f (int x)
{
printf("%s", x); /* { dg-warning "format" } */
- printf((char *)(size_t)"%s", x); /* { dg-warning "format" } */
+ printf((char *)(__UINTPTR_TYPE__)"%s", x); /* { dg-warning "format" } */
printf((char *)(char)"%s", x); /* { dg-warning "cast from pointer to integer of different size" } */
}
diff --git a/gcc/testsuite/gcc.dg/format/format.exp b/gcc/testsuite/gcc.dg/format/format.exp
index 352149850e..9d8a289a2d 100644
--- a/gcc/testsuite/gcc.dg/format/format.exp
+++ b/gcc/testsuite/gcc.dg/format/format.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2000, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c b/gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c
index cce2342a56..d2c839f615 100644
--- a/gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c
+++ b/gcc/testsuite/gcc.dg/format/ms_c90-printf-1.c
@@ -161,7 +161,7 @@ foo (int i, int i1, int i2, unsigned int u, double d, char *s, void *p,
*/
printf ("%s", p); /* { dg-warning "format" "bad argument types" } */
/* The historical behavior is to allow signed / unsigned types
- interchangably as arguments. For values representable in both types,
+ interchangeably as arguments. For values representable in both types,
such usage may be correct. For now preserve the behavior of GCC
in such cases.
*/
diff --git a/gcc/testsuite/gcc.dg/fshort-wchar.c b/gcc/testsuite/gcc.dg/fshort-wchar.c
index c9c751504d..bb69881677 100644
--- a/gcc/testsuite/gcc.dg/fshort-wchar.c
+++ b/gcc/testsuite/gcc.dg/fshort-wchar.c
@@ -2,7 +2,7 @@
/* { dg-do run } */
/* { dg-options "-fshort-wchar" } */
-/* { dg-options "-fshort-wchar -Wl,--no-wchar-size-warning" { target arm*-*-*eabi } } */
+/* { dg-options "-fshort-wchar -Wl,--no-wchar-size-warning" { target arm*-*-*eabi* } } */
/* Source: Neil Booth, 10 Dec 2002.
diff --git a/gcc/testsuite/gcc.dg/fstack-protector-strong.c b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
new file mode 100644
index 0000000000..7c232fff24
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/fstack-protector-strong.c
@@ -0,0 +1,134 @@
+/* Test that stack protection is done on chosen functions. */
+
+/* { dg-do compile { target i?86-*-* x86_64-*-* rs6000-*-* s390x-*-* } } */
+/* { dg-options "-O2 -fstack-protector-strong" } */
+
+#include<string.h>
+
+extern int g0;
+extern int* pg0;
+int
+goo (int *);
+int
+hoo (int);
+
+/* Function frame address escaped function call. */
+int
+foo1 ()
+{
+ int i;
+ return goo (&i);
+}
+
+struct ArrayStruct
+{
+ int a;
+ int array[10];
+};
+
+struct AA
+{
+ int b;
+ struct ArrayStruct as;
+};
+
+/* Function frame contains array. */
+int
+foo2 ()
+{
+ struct AA aa;
+ int i;
+ for (i = 0; i < 10; ++i)
+ {
+ aa.as.array[i] = i * (i-1) + i / 2;
+ }
+ return aa.as.array[5];
+}
+
+/* Address computation based on a function frame address. */
+int
+foo3 ()
+{
+ int a;
+ int *p;
+ p = &a + 5;
+ return goo (p);
+}
+
+/* Address cast based on a function frame address. */
+int
+foo4 ()
+{
+ int a;
+ return goo (g0 << 2 ? (int *)(3 * (long)(void *)(&a)) : 0);
+}
+
+/* Address cast based on a local array. */
+int
+foo5 ()
+{
+ short array[10];
+ return goo ((int *)(array + 5));
+}
+
+struct BB
+{
+ int one;
+ int two;
+ int three;
+};
+
+/* Address computaton based on a function frame address.*/
+int
+foo6 ()
+{
+ struct BB bb;
+ return goo (&bb.one + sizeof(int));
+}
+
+/* Function frame address escaped via global variable. */
+int
+foo7 ()
+{
+ int a;
+ pg0 = &a;
+ goo (pg0);
+ return *pg0;
+}
+
+/* Check that this covers -fstack-protector. */
+int
+foo8 ()
+{
+ char base[100];
+ memcpy ((void *)base, (const void *)pg0, 105);
+ return (int)(base[32]);
+}
+
+/* Check that this covers -fstack-protector. */
+int
+foo9 ()
+{
+ char* p = __builtin_alloca (100);
+ return goo ((int *)(p + 50));
+}
+
+int
+global2 (struct BB* pbb);
+
+/* Address taken on struct. */
+int
+foo10 ()
+{
+ struct BB bb;
+ int i;
+ bb.one = global2 (&bb);
+ for (i = 0; i < 10; ++i)
+ {
+ bb.two = bb.one + bb.two;
+ bb.three = bb.one + bb.two + bb.three;
+ }
+ return bb.three;
+}
+
+/* { dg-final { scan-assembler-times "stack_chk_fail" 10 } } */
diff --git a/gcc/testsuite/gcc.dg/ftrapv-1.c b/gcc/testsuite/gcc.dg/ftrapv-1.c
index 44eb176b50..86bd802cf1 100644
--- a/gcc/testsuite/gcc.dg/ftrapv-1.c
+++ b/gcc/testsuite/gcc.dg/ftrapv-1.c
@@ -7,6 +7,7 @@
/* { dg-do run } */
/* { dg-options "-ftrapv" } */
+/* { dg-require-effective-target trapping } */
__attribute__((noinline)) int
mulv(int a, int b)
diff --git a/gcc/testsuite/gcc.dg/ftrapv-2.c b/gcc/testsuite/gcc.dg/ftrapv-2.c
index d79b86dde9..7d765747c9 100644
--- a/gcc/testsuite/gcc.dg/ftrapv-2.c
+++ b/gcc/testsuite/gcc.dg/ftrapv-2.c
@@ -8,6 +8,7 @@
/* { dg-do run } */
/* { dg-options "-ftrapv" } */
+/* { dg-require-effective-target trapping } */
extern void abort(void);
extern long labs(long);
diff --git a/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c b/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c
index faed818d50..5affeba19f 100644
--- a/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c
+++ b/gcc/testsuite/gcc.dg/gcc-have-sync-compare-and-swap.c
@@ -40,10 +40,12 @@ void f8()
#endif
}
+/* aligned (16): On S/390 16 byte compare and swap operations are only
+ available if the memory operand resides on a 16 byte boundary. */
void f16()
{
#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16
- typedef int __attribute__ ((__mode__ (__TI__))) ti_int_type;
+ typedef int __attribute__ ((__mode__ (__TI__), aligned (16))) ti_int_type;
ti_int_type ti_int;
__sync_bool_compare_and_swap (&ti_int, (ti_int_type)0, (ti_int_type)1);
#endif
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c
index 4196b2d152..f2c4a672fe 100644
--- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.1.c
@@ -15,7 +15,7 @@ wrong1 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of loop regions */
-#pragma omp for /* { dg-warning "may not be closely nested" } */
+#pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < n; j++)
work (i, j);
}
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
index 31b2ddf036..64005b3074 100644
--- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.3.c
@@ -12,7 +12,7 @@ wrong3 (int n)
for (i = 0; i < n; i++)
{
/* incorrect nesting of regions */
-#pragma omp single /* { dg-warning "may not be closely nested" } */
+#pragma omp single /* { dg-error "may not be closely nested" } */
work (i, 0);
}
}
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
index d7579e6e73..5bb6b80b39 100644
--- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.4.c
@@ -11,7 +11,7 @@ wrong4 (int n)
{
work (i, 0);
/* incorrect nesting of barrier region in a loop region */
-#pragma omp barrier /* { dg-warning "may not be closely nested" } */
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (i, 1);
}
}
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
index 7b53015571..7b4aee1c06 100644
--- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.5.c
@@ -9,7 +9,7 @@ wrong5 (int n)
{
work (n, 0);
/* incorrect nesting of barrier region in a critical region */
-#pragma omp barrier
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (n, 1);
}
}
diff --git a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
index ac850e5410..d18188b175 100644
--- a/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
+++ b/gcc/testsuite/gcc.dg/gomp/appendix-a/a.35.6.c
@@ -9,7 +9,7 @@ wrong6 (int n)
{
work (n, 0);
/* incorrect nesting of barrier region in a single region */
-#pragma omp barrier /* { dg-warning "may not be closely nested" } */
+#pragma omp barrier /* { dg-error "may not be closely nested" } */
work (n, 1);
}
}
diff --git a/gcc/testsuite/gcc.dg/gomp/block-3.c b/gcc/testsuite/gcc.dg/gomp/block-3.c
index c72b04c35d..b4530e9d06 100644
--- a/gcc/testsuite/gcc.dg/gomp/block-3.c
+++ b/gcc/testsuite/gcc.dg/gomp/block-3.c
@@ -35,9 +35,10 @@ void foo()
#pragma omp sections
{
- goto ok1;
- ok1:;
-
+ {
+ goto ok1;
+ ok1:;
+ }
#pragma omp section
for (i = 0; i < 10; ++i)
if (test(i))
diff --git a/gcc/testsuite/gcc.dg/gomp/clause-1.c b/gcc/testsuite/gcc.dg/gomp/clause-1.c
index ba189896c6..fc7d72b7cd 100644
--- a/gcc/testsuite/gcc.dg/gomp/clause-1.c
+++ b/gcc/testsuite/gcc.dg/gomp/clause-1.c
@@ -11,7 +11,7 @@ int t;
void
foo (int x)
{
- char *p;
+ char *pp;
struct S { int i; int j; } s;
char a[32];
double d;
@@ -42,11 +42,11 @@ foo (int x)
;
#pragma omp p firstprivate (bar) /* { dg-error "is not a variable" } */
;
-#pragma omp p reduction (+:p) /* { dg-error "has invalid type for" } */
+#pragma omp p reduction (+:pp) /* { dg-error "user defined reduction not found for" } */
;
-#pragma omp p reduction (*:s) /* { dg-error "has invalid type for" } */
+#pragma omp p reduction (*:s) /* { dg-error "user defined reduction not found for" } */
;
-#pragma omp p reduction (-:a) /* { dg-error "has invalid type for" } */
+#pragma omp p reduction (-:a) /* { dg-error "user defined reduction not found for" } */
;
d = 0;
#pragma omp p reduction (*:d)
diff --git a/gcc/testsuite/gcc.dg/gomp/combined-1.c b/gcc/testsuite/gcc.dg/gomp/combined-1.c
index dfed647371..7e23c3256c 100644
--- a/gcc/testsuite/gcc.dg/gomp/combined-1.c
+++ b/gcc/testsuite/gcc.dg/gomp/combined-1.c
@@ -20,5 +20,5 @@ int foo (void)
}
}
-/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_runtime_start" 3 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "GOMP_parallel_loop_runtime" 3 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c b/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c
new file mode 100644
index 0000000000..259e2c0ae9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/declare-simd-1.c
@@ -0,0 +1,100 @@
+/* Test parsing of #pragma omp declare simd */
+/* { dg-do compile } */
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) \
+ linear (c : 4) simdlen (8) notinbranch
+#pragma omp declare simd uniform (c) aligned (b : 4 * sizeof (int)) linear (a \
+ : 4) simdlen (4) inbranch
+int f1 (int a, int *b, int c);
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int f2 (int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (long long)) linear (c : 4) simdlen (8)
+__extension__
+long long f3 (long long a, long long *b, long long c);
+
+int
+f4 (int x)
+{
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ __extension__ __extension__ __extension__
+ extern int f5 (int a, int *b, int c);
+ {
+ x++;
+ #pragma omp declare simd simdlen (4) linear (c)
+ extern int f6 (int a, int *b, int c);
+ }
+ return x;
+}
+
+#pragma omp declare simd simdlen (16)
+int
+f7 (int x)
+{
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f8 (int a, int *b, int c);
+ return x;
+}
+
+int
+f9 (int x)
+{
+ if (x)
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f10 (int a, int *b, int c);
+ while (x < 10)
+ #pragma omp declare simd simdlen (8) aligned (b : 8 * sizeof (int))
+ extern int f11 (int a, int *b, int c);
+ return x;
+}
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int f12 (int c; int *b; int a; int a, int *b, int c);
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int
+f13 (int c; int *b; int a; int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int
+f14 (a, b, c)
+ int a, c;
+ int *b;
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd uniform (a) aligned (b : 8 * sizeof (int)) linear (c : 4) simdlen (8)
+int
+f15 (int a, int *b, int c)
+{
+ return a + *b + c;
+}
+
+#pragma omp declare simd uniform (d) aligned (e : 8 * sizeof (int)) linear (f : 4) simdlen (8)
+int f15 (int d, int *e, int f);
+
+#pragma omp declare simd aligned (g : sizeof (*g)) linear (h : 2 * sizeof (g[0]) + sizeof (h)) simdlen (4)
+int f16 (long *g, int h);
+
+#pragma omp declare simd aligned (h : sizeof (*h)) linear (g : 2 * sizeof (h[0]) + sizeof (g)) simdlen (4)
+int f17 (int g, long *h)
+{
+ return g + h[0];
+}
+
+#pragma omp declare simd aligned (i : sizeof (*i)) linear (j : 2 * sizeof (i[0]) + sizeof (j)) simdlen (4)
+int
+f18 (j, i)
+ long *i;
+ int j;
+{
+ return j + i[0];
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c b/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c
new file mode 100644
index 0000000000..c0a42a2ef4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/declare-simd-2.c
@@ -0,0 +1,54 @@
+/* Test parsing of #pragma omp declare simd */
+/* { dg-do compile } */
+
+#pragma omp declare simd
+int a; /* { dg-error "not immediately followed by a function declaration or definition" } */
+
+#pragma omp declare simd
+int fn1 (int a), fn2 (int a); /* { dg-error "not immediately followed by a single function declaration or definition" } */
+
+#pragma omp declare simd
+int b, fn3 (int a); /* { dg-error "not immediately followed by a function declaration or definition" } */
+
+#pragma omp declare simd linear (a)
+int fn4 (int a), c; /* { dg-error "not immediately followed by a function declaration or definition" } */
+
+int t;
+
+#pragma omp declare simd
+#pragma omp declare simd
+#pragma omp threadprivate(t) /* { dg-error "must be followed by function declaration or definition or another" } */
+int fn5 (int a);
+
+#pragma omp declare simd inbranch notinbranch /* { dg-error "clause is incompatible with" } */
+int fn6 (int);
+
+#pragma omp declare simd aligned (a, b)
+int fn7 (int *a, int b[64]);
+
+#pragma omp declare simd aligned (a) /* { dg-error "neither a pointer nor an array" } */
+int fn8 (int a);
+
+#pragma omp declare simd aligned (c) /* { dg-error "neither a pointer nor an array" } */
+int fn9 (float c);
+
+#pragma omp declare simd aligned (d) /* { dg-error "neither a pointer nor an array" } */
+int fn10 (double d);
+
+struct D { int d; };
+
+#pragma omp declare simd aligned (e) /* { dg-error "neither a pointer nor an array" } */
+int fn11 (struct D e);
+
+#pragma omp declare simd linear(a:7) uniform(a) /* { dg-error "appears more than once" } */
+int f12 (int a);
+#pragma omp declare simd linear(a) linear(a) /* { dg-error "appears more than once" } */
+int f13 (int a);
+#pragma omp declare simd linear(a) linear(a:7) /* { dg-error "appears more than once" } */
+int f14 (int a);
+#pragma omp declare simd linear(a:6) linear(a:6)/* { dg-error "appears more than once" } */
+int f15 (int a);
+#pragma omp declare simd uniform(a) uniform(a) /* { dg-error "appears more than once" } */
+int f16 (int a);
+#pragma omp declare simd uniform(a) aligned (a: 32)
+int f17 (int *a);
diff --git a/gcc/testsuite/gcc.dg/gomp/gomp.exp b/gcc/testsuite/gcc.dg/gomp/gomp.exp
index 4cb4cafa40..e6e849bd2e 100644
--- a/gcc/testsuite/gcc.dg/gomp/gomp.exp
+++ b/gcc/testsuite/gcc.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
@@ -29,7 +29,9 @@ if ![check_effective_target_fopenmp] {
dg-init
# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/gomp/*.c]] "" "-fopenmp"
+dg-runtest [lsort [concat \
+ [find $srcdir/$subdir *.c] \
+ [find $srcdir/c-c++-common/gomp *.c]]] "" "-fopenmp"
# All done.
dg-finish
diff --git a/gcc/testsuite/gcc.dg/gomp/nesting-1.c b/gcc/testsuite/gcc.dg/gomp/nesting-1.c
index df57ac845f..52fcda741e 100644
--- a/gcc/testsuite/gcc.dg/gomp/nesting-1.c
+++ b/gcc/testsuite/gcc.dg/gomp/nesting-1.c
@@ -28,17 +28,58 @@ f1 (void)
#pragma omp for /* { dg-error "may not be closely nested" } */
for (j = 0; j < 3; j++)
;
+ }
+ #pragma omp sections
+ {
#pragma omp sections /* { dg-error "may not be closely nested" } */
{
;
#pragma omp section
;
}
+ }
+ #pragma omp sections
+ {
#pragma omp single /* { dg-error "may not be closely nested" } */
;
+ }
+ #pragma omp sections
+ {
#pragma omp master /* { dg-error "may not be closely nested" } */
;
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ ;
+ }
+ #pragma omp sections
+ {
#pragma omp section
+ #pragma omp for /* { dg-error "may not be closely nested" } */
+ for (j = 0; j < 3; j++)
+ ;
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ #pragma omp sections /* { dg-error "may not be closely nested" } */
+ {
+ ;
+ #pragma omp section
+ ;
+ }
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ #pragma omp single /* { dg-error "may not be closely nested" } */
+ ;
+ }
+ #pragma omp sections
+ {
+ #pragma omp section
+ #pragma omp master /* { dg-error "may not be closely nested" } */
;
}
#pragma omp single
diff --git a/gcc/testsuite/gcc.dg/gomp/openmp-simd-1.c b/gcc/testsuite/gcc.dg/gomp/openmp-simd-1.c
new file mode 100644
index 0000000000..e8e057a616
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/openmp-simd-1.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp-simd -fdump-tree-original" } */
+
+#pragma omp declare simd
+float bar(float b) {
+ return b*b;
+}
+
+void foo(int n, float *a, float *b)
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp teams distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp target teams distribute simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp teams distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+#pragma omp target teams distribute parallel for simd
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "pragma omp simd" 9 "original" } } */
+/* { dg-final { scan-tree-dump-not "omp for" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp distribute" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp teams" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp target" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp parallel" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/openmp-simd-2.c b/gcc/testsuite/gcc.dg/gomp/openmp-simd-2.c
new file mode 100644
index 0000000000..94afced248
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/openmp-simd-2.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp-simd -fdump-tree-original" } */
+
+extern void abort ();
+int a[1024] __attribute__((aligned (32))) = { 1 };
+struct S { int s; };
+#pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s)
+#pragma omp declare reduction (foo:struct S:omp_out.s += omp_in.s)
+#pragma omp declare reduction (foo:int:omp_out += omp_in)
+
+__attribute__((noinline, noclone)) int
+foo (void)
+{
+ int i, u = 0;
+ struct S s, t;
+ s.s = 0; t.s = 0;
+ #pragma omp simd aligned(a : 32) reduction(+:s) reduction(foo:t, u)
+ for (i = 0; i < 1024; i++)
+ {
+ int x = a[i];
+ s.s += x;
+ t.s += x;
+ u += x;
+ }
+ if (t.s != s.s || u != s.s)
+ abort ();
+ return s.s;
+}
+
+
+void bar(int n, float *a, float *b)
+{
+ int i;
+#pragma omp parallel for simd num_threads(4) safelen(64)
+ for (i = 0; i < n ; i++)
+ a[i] = b[i];
+}
+
+/* { dg-final { scan-tree-dump-times "pragma omp simd reduction\\(u\\) reduction\\(t\\) reduction\\(\\+:s\\) aligned\\(a:32\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "pragma omp simd safelen\\(64\\)" 1 "original" } } */
+/* { dg-final { scan-tree-dump-not "omp parallel" "original" } } */
+/* { dg-final { scan-tree-dump-not "omp for" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/pr57412.c b/gcc/testsuite/gcc.dg/gomp/pr57412.c
new file mode 100644
index 0000000000..246f532395
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr57412.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+
+int thr;
+#pragma omp threadprivate (thr)
+int foo ()
+{
+ int l;
+#pragma omp parallel copyin (thr) reduction (||:l)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr58809.c b/gcc/testsuite/gcc.dg/gomp/pr58809.c
new file mode 100644
index 0000000000..5dc02f65aa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr58809.c
@@ -0,0 +1,13 @@
+/* PR middle-end/58809 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -O" } */
+
+int i;
+#pragma omp threadprivate (i)
+
+void foo()
+{
+ _Complex int j;
+#pragma omp parallel copyin (i) reduction (&&:j)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr59669-1.c b/gcc/testsuite/gcc.dg/gomp/pr59669-1.c
new file mode 100644
index 0000000000..c72156d4bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr59669-1.c
@@ -0,0 +1,9 @@
+/* PR middle-end/59669 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare simd linear(a)
+void
+foo (int a)
+{
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr59669-2.c b/gcc/testsuite/gcc.dg/gomp/pr59669-2.c
new file mode 100644
index 0000000000..f6aad8998f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr59669-2.c
@@ -0,0 +1,9 @@
+/* PR middle-end/59669 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare simd uniform(a) aligned(a:32)
+void
+bar (int *a)
+{
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/pr60534.c b/gcc/testsuite/gcc.dg/gomp/pr60534.c
new file mode 100644
index 0000000000..f8a6bdc1d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/pr60534.c
@@ -0,0 +1,16 @@
+/* PR middle-end/60534 */
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -O -fno-tree-loop-optimize" } */
+
+extern int d[];
+
+int
+foo (int a)
+{
+ int c = 0;
+ int l;
+#pragma omp simd reduction(+: c)
+ for (l = 0; l < a; ++l)
+ c += d[l];
+ return c;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-1.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-1.c
new file mode 100644
index 0000000000..486b67a637
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-1.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp -fdump-tree-optimized -O3" } */
+
+/* Test that functions that have SIMD clone counterparts are not
+ cloned by IPA-cp. For example, special_add() below has SIMD clones
+ created for it. However, if IPA-cp later decides to clone a
+ specialization of special_add(x, 666) when analyzing fillit(), we
+ will forever keep the vectorizer from using the SIMD versions of
+ special_add in a loop.
+
+ If IPA-CP gets taught how to adjust the SIMD clones as well, this
+ test could be removed. */
+
+#pragma omp declare simd simdlen(4)
+static int __attribute__ ((noinline))
+special_add (int x, int y)
+{
+ if (y == 666)
+ return x + y + 123;
+ else
+ return x + y;
+}
+
+void fillit(int *tot)
+{
+ int i;
+
+ for (i=0; i < 10000; ++i)
+ tot[i] = special_add (i, 666);
+}
+
+/* { dg-final { scan-tree-dump-not "special_add.constprop" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c
new file mode 100644
index 0000000000..030ae6cb19
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-2.c
@@ -0,0 +1,26 @@
+/* { dg-options "-fopenmp -fdump-tree-optimized -O" } */
+
+#pragma omp declare simd inbranch uniform(c) linear(b:66)
+#pragma omp declare simd notinbranch aligned(c:32)
+int addit(int a, int b, int *c)
+{
+ return a + b;
+}
+
+#pragma omp declare simd uniform(a) aligned(a:32) linear(k:1) notinbranch
+float setArray(float *a, float x, int k)
+{
+ a[k] = a[k] + x;
+ return a[k];
+}
+
+/* { dg-final { scan-tree-dump "_ZGVbN4ua32vl_setArray" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVbN4vvva32_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVbM4vl66u_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVcN8ua32vl_setArray" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVcN4vvva32_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVcM4vl66u_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVdN8ua32vl_setArray" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVdN8vvva32_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVdM8vl66u_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-3.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-3.c
new file mode 100644
index 0000000000..98e767c3ae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-3.c
@@ -0,0 +1,18 @@
+/* { dg-options "-fopenmp -fdump-tree-optimized -O2" } */
+
+/* Test that if there is no *inbranch clauses, that both the masked and
+ the unmasked version are created. */
+
+#pragma omp declare simd
+int addit(int a, int b, int c)
+{
+ return a + b;
+}
+
+/* { dg-final { scan-tree-dump "_ZGVbN4vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVbM4vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVcN4vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVcM4vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVdN8vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-tree-dump "_ZGVdM8vvv_addit" "optimized" { target i?86-*-* x86_64-*-* } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-4.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-4.c
new file mode 100644
index 0000000000..893f44e690
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare simd simdlen(4) notinbranch
+int f2 (int a, int b)
+{
+ if (a > 5)
+ return a + b;
+ else
+ return a - b;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-5.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-5.c
new file mode 100644
index 0000000000..84785e1481
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-5.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fopenmp -w" } */
+
+/* ?? The -w above is to inhibit the following warning for now:
+ a.c:2:6: warning: AVX vector argument without AVX enabled changes
+ the ABI. */
+
+#pragma omp declare simd notinbranch simdlen(4)
+void foo (int *a)
+{
+ *a = 555;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-6.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-6.c
new file mode 100644
index 0000000000..8818594bfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-6.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fopenmp" } */
+
+/* Test that array subscripts are properly adjusted. */
+
+int array[1000];
+#pragma omp declare simd notinbranch simdlen(4)
+void foo (int i)
+{
+ array[i] = 555;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/simd-clones-7.c b/gcc/testsuite/gcc.dg/gomp/simd-clones-7.c
new file mode 100644
index 0000000000..ef6fa113c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/simd-clones-7.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-fopenmp -w" } */
+
+int array[1000];
+
+#pragma omp declare simd notinbranch simdlen(4)
+void foo (int *a, int b)
+{
+ a[b] = 555;
+}
+
+#pragma omp declare simd notinbranch simdlen(4)
+void bar (int *a)
+{
+ *a = 555;
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/target-1.c b/gcc/testsuite/gcc.dg/gomp/target-1.c
new file mode 100644
index 0000000000..09e65bd311
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/target-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+ bad1:
+ #pragma omp target
+ goto bad1; /* { dg-error "invalid branch" } */
+
+ goto bad2; /* { dg-error "invalid entry" } */
+ #pragma omp target
+ {
+ bad2: ;
+ }
+
+ #pragma omp target
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x) /* { dg-error "invalid entry" } */
+ {
+ #pragma omp target
+ { case 0:; }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/target-2.c b/gcc/testsuite/gcc.dg/gomp/target-2.c
new file mode 100644
index 0000000000..546a1d0c15
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/target-2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+void
+foo (int x, int y)
+{
+ bad1:
+ #pragma omp target data map(tofrom: y)
+ goto bad1; /* { dg-error "invalid branch" } */
+
+ goto bad2; /* { dg-error "invalid entry" } */
+ #pragma omp target data map(tofrom: y)
+ {
+ bad2: ;
+ }
+
+ #pragma omp target data map(tofrom: y)
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x) /* { dg-error "invalid entry" } */
+ {
+ #pragma omp target data map(tofrom: y)
+ { case 0:; }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/taskgroup-1.c b/gcc/testsuite/gcc.dg/gomp/taskgroup-1.c
new file mode 100644
index 0000000000..e301efc19c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/taskgroup-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+ bad1:
+ #pragma omp taskgroup
+ goto bad1; /* { dg-error "invalid branch" } */
+
+ goto bad2; /* { dg-error "invalid entry" } */
+ #pragma omp taskgroup
+ {
+ bad2: ;
+ }
+
+ #pragma omp taskgroup
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x) /* { dg-error "invalid entry" } */
+ {
+ #pragma omp taskgroup
+ { case 0:; }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/teams-1.c b/gcc/testsuite/gcc.dg/gomp/teams-1.c
new file mode 100644
index 0000000000..73c00ded78
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/teams-1.c
@@ -0,0 +1,61 @@
+/* { dg-do compile } */
+
+void
+foo (int x)
+{
+ bad1:
+ #pragma omp target teams
+ goto bad1; /* { dg-error "invalid branch" } */
+
+ goto bad2; /* { dg-error "invalid entry" } */
+ #pragma omp target teams
+ {
+ bad2: ;
+ }
+
+ #pragma omp target teams
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x) /* { dg-error "invalid entry" } */
+ {
+ #pragma omp target teams
+ { case 0:; }
+ }
+}
+
+void
+bar (int x)
+{
+ bad1:
+ #pragma omp target
+ #pragma omp teams
+ goto bad1; /* { dg-error "invalid branch" } */
+
+ goto bad2; /* { dg-error "invalid entry" } */
+ #pragma omp target
+ #pragma omp teams
+ {
+ bad2: ;
+ }
+
+ #pragma omp target
+ #pragma omp teams
+ {
+ int i;
+ goto ok1;
+ for (i = 0; i < 10; ++i)
+ { ok1: break; }
+ }
+
+ switch (x) /* { dg-error "invalid entry" } */
+ {
+ #pragma omp target
+ #pragma omp teams
+ { case 0:; }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/udr-1.c b/gcc/testsuite/gcc.dg/gomp/udr-1.c
new file mode 100644
index 0000000000..4948a984f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/udr-1.c
@@ -0,0 +1,46 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+#pragma omp declare reduction (| : long int : omp_out |= omp_in) /* { dg-error "predeclared arithmetic type" } */
+#pragma omp declare reduction (+ : char : omp_out += omp_in) /* { dg-error "predeclared arithmetic type" } */
+typedef short T;
+#pragma omp declare reduction (min : T : omp_out += omp_in) /* { dg-error "predeclared arithmetic type" } */
+#pragma omp declare reduction (* : _Complex double : omp_out *= omp_in) /* { dg-error "predeclared arithmetic type" } */
+
+void
+foo (void)
+{
+ #pragma omp declare reduction (| : long int : omp_out |= omp_in) /* { dg-error "predeclared arithmetic type" } */
+ #pragma omp declare reduction (+ : char : omp_out += omp_in) /* { dg-error "predeclared arithmetic type" } */
+ #pragma omp declare reduction (min : T : omp_out += omp_in) /* { dg-error "predeclared arithmetic type" } */
+ #pragma omp declare reduction (* : _Complex double : omp_out *= omp_in) /* { dg-error "predeclared arithmetic type" } */
+}
+
+#pragma omp declare reduction (| : __typeof (foo) : omp_out |= omp_in) /* { dg-error "function or array" } */
+#pragma omp declare reduction (+ : char () : omp_out += omp_in) /* { dg-error "function or array" } */
+#pragma omp declare reduction (min : T[2] : omp_out += omp_in) /* { dg-error "function or array" } */
+
+void
+bar (void)
+{
+ #pragma omp declare reduction (| : __typeof (foo) : omp_out |= omp_in)/* { dg-error "function or array" } */
+ #pragma omp declare reduction (+ : char () : omp_out += omp_in) /* { dg-error "function or array" } */
+ #pragma omp declare reduction (min : T[2] : omp_out += omp_in) /* { dg-error "function or array" } */
+}
+
+struct A { int a; };
+#pragma omp declare reduction (| : const struct A : omp_out.a |= omp_in.a) /* { dg-error "const, volatile or restrict" } */
+#pragma omp declare reduction (+ : __const struct A : omp_out.a += omp_in.a) /* { dg-error "const, volatile or restrict" } */
+typedef volatile struct A T2;
+#pragma omp declare reduction (min : T2 : omp_out.a += omp_in.a) /* { dg-error "const, volatile or restrict" } */
+#pragma omp declare reduction (* : struct A *__restrict : omp_out->a *= omp_in->a)/* { dg-error "const, volatile or restrict" } */
+
+void
+baz (void)
+{
+ #pragma omp declare reduction (| : const struct A : omp_out.a |= omp_in.a) /* { dg-error "const, volatile or restrict" } */
+ #pragma omp declare reduction (+ : __const struct A : omp_out.a += omp_in.a) /* { dg-error "const, volatile or restrict" } */
+ typedef volatile struct A T3;
+ #pragma omp declare reduction (min : T3 : omp_out.a += omp_in.a) /* { dg-error "const, volatile or restrict" } */
+ #pragma omp declare reduction (* : struct A *__restrict : omp_out->a *= omp_in->a)/* { dg-error "const, volatile or restrict" } */
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/udr-2.c b/gcc/testsuite/gcc.dg/gomp/udr-2.c
new file mode 100644
index 0000000000..87992d7c6e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/udr-2.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+struct W { int w; };
+void init (struct W *, int, int *);
+int v;
+#pragma omp declare reduction (foo : long int : omp_out |= v) /* { dg-error "combiner refers to variable" } */
+#pragma omp declare reduction (foo : char : omp_out = v) /* { dg-error "combiner refers to variable" } */
+typedef short T;
+#pragma omp declare reduction (foo : T : omp_out += v) /* { dg-error "combiner refers to variable" } */
+#pragma omp declare reduction (foo : int : v *= omp_in) /* { dg-error "combiner refers to variable" } */
+#pragma omp declare reduction (foo : struct W : omp_out.w *= omp_in.w + v) /* { dg-error "combiner refers to variable" } */
+
+void
+foo (int v)
+{
+ #pragma omp declare reduction (foo : long int : omp_out |= v) /* { dg-error "combiner refers to variable" } */
+ #pragma omp declare reduction (foo : char : omp_out = v) /* { dg-error "combiner refers to variable" } */
+ #pragma omp declare reduction (foo : T : omp_out += v) /* { dg-error "combiner refers to variable" } */
+ #pragma omp declare reduction (foo : int : v *= omp_in) /* { dg-error "combiner refers to variable" } */
+ #pragma omp declare reduction (foo : struct W : omp_out.w *= omp_in.w + v) /* { dg-error "combiner refers to variable" } */
+}
+
+#pragma omp declare reduction (bar : long int : omp_out |= omp_in) initializer (omp_priv = v) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar : char : omp_out += omp_in) initializer (omp_priv = ((char) v)) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar : T : omp_out += omp_in) initializer (omp_priv = (short) v) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar : _Complex double : omp_out *= omp_in) initializer (omp_priv = (v)) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar : struct W : omp_out.w *= omp_in.w) initializer (omp_priv = { v } ) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar2 : struct W : omp_out.w *= omp_in.w) initializer (init (&omp_priv, v, (int *) 0)) /* { dg-error "initializer refers to variable" } */
+#pragma omp declare reduction (bar3 : struct W : omp_out.w *= omp_in.w) initializer (init (&omp_priv, 0, &v)) /* { dg-error "initializer refers to variable" } */
+
+void
+bar (int v)
+{
+ #pragma omp declare reduction (bar : long int : omp_out |= omp_in) initializer (omp_priv = v) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar : char : omp_out += omp_in) initializer (omp_priv = ((char) v)) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar : T : omp_out += omp_in) initializer (omp_priv = (short) v) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar : _Complex double : omp_out *= omp_in) initializer (omp_priv = (v)) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar : struct W : omp_out.w *= omp_in.w) initializer (omp_priv = { v }) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar2 : struct W : omp_out.w *= omp_in.w) initializer (init (&omp_priv, v, (int *) 0)) /* { dg-error "initializer refers to variable" } */
+ #pragma omp declare reduction (bar3 : struct W : omp_out.w *= omp_in.w) initializer (init (&omp_priv, 0, &v)) /* { dg-error "initializer refers to variable" } */
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/udr-3.c b/gcc/testsuite/gcc.dg/gomp/udr-3.c
new file mode 100644
index 0000000000..bdfcce1d0b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/udr-3.c
@@ -0,0 +1,77 @@
+/* { dg-do compile } */
+/* { dg-options "-fopenmp" } */
+
+struct S { int s; };
+struct T { int t; };
+struct U { int u; };
+
+#pragma omp declare reduction (+: struct S: omp_out.s += omp_in.s)
+#pragma omp declare reduction (*: struct S: omp_out.s *= omp_in.s) \
+ initializer (omp_priv = {1})
+#pragma omp declare reduction (foo: struct S: omp_out.s += omp_in.s)
+
+void
+f1 ()
+{
+ struct S s, s2;
+ struct T t;
+ #pragma omp declare reduction (+: struct T: omp_out.t += omp_in.t)
+ #pragma omp parallel reduction (+: t) reduction (foo: s) reduction (*: s2)
+ s.s = 1, t.t = 1, s2.s = 2;
+ #pragma omp parallel reduction (+: s)
+ s.s = 1;
+}
+
+void bar (struct S *);
+
+void
+f2 ()
+{
+ #pragma omp declare reduction (foo: struct S: omp_out.s += omp_in.s) initializer (bar (&omp_priv))
+ #pragma omp declare reduction (bar: struct S: omp_out.s += omp_in.s) initializer (bar (&omp_orig)) /* { dg-error "one of the initializer call arguments should be" } */
+}
+
+#pragma omp declare reduction (+: struct U: omp_out.u *= omp_in.u) /* { dg-error "previous" } */
+#pragma omp declare reduction (+: struct U: omp_out.u += omp_in.u) /* { dg-error "redeclaration of" } */
+
+void
+f3 ()
+{
+ #pragma omp declare reduction (f3: struct U: omp_out.u *= omp_in.u) /* { dg-error "previous" } */
+ #pragma omp declare reduction (f3: struct U: omp_out.u += omp_in.u) /* { dg-error "redeclaration of" } */
+}
+
+struct V
+{
+ #pragma omp declare reduction (bar: struct S: omp_out.s *= omp_in.s) /* { dg-error "not at file or block scope" } */
+ #pragma omp declare reduction (bar: struct S: omp_out.s += omp_in.s) /* { dg-error "not at file or block scope" } */
+};
+
+#pragma omp declare reduction (n3: long: omp_out += omp_in) /* { dg-error "previous" } */
+#pragma omp declare reduction (n3: long int: omp_out += omp_in) /* { dg-error "redeclaration of" } */
+#pragma omp declare reduction (n3: short unsigned: omp_out += omp_in)
+#pragma omp declare reduction (n3: short int: omp_out += omp_in)
+
+void
+f4 (void)
+{
+ #pragma omp declare reduction (f4: long: omp_out += omp_in) /* { dg-error "previous" } */
+ #pragma omp declare reduction (f4: long int: omp_out += omp_in) /* { dg-error "redeclaration of" } */
+ #pragma omp declare reduction (f4: short unsigned: omp_out += omp_in)
+ #pragma omp declare reduction (f4: short int: omp_out += omp_in)
+}
+
+void
+f5 (void)
+{
+ #pragma omp declare reduction (+: struct S: omp_out.s += omp_in.s) initializer (omp_priv) /* { dg-error "expected" } */
+ #pragma omp declare reduction (+: struct T: omp_out.t += omp_in.t) initializer (omp_priv ()) /* { dg-error "expected" } */
+}
+
+void
+f6 (a, b)
+#pragma omp declare reduction (bar: struct S: omp_out.s *= omp_in.s) /* { dg-error "expected declaration specifiers before" } */
+ int a;
+ int b;
+{
+}
diff --git a/gcc/testsuite/gcc.dg/gomp/udr-4.c b/gcc/testsuite/gcc.dg/gomp/udr-4.c
new file mode 100644
index 0000000000..3758f91e85
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/gomp/udr-4.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+
+struct S;
+#pragma omp declare reduction (+:struct S:omp_out.s += omp_in.s) /* { dg-error "invalid use of undefined type" } */
+struct S { int s; };
+#pragma omp declare reduction (*:struct S:omp_out.s *= omp_in.s)
diff --git a/gcc/testsuite/gcc.dg/graphite/graphite.exp b/gcc/testsuite/gcc.dg/graphite/graphite.exp
index cdf35ebab8..615fc258a9 100644
--- a/gcc/testsuite/gcc.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gcc.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/graphite/id-6.c b/gcc/testsuite/gcc.dg/graphite/id-6.c
index c3aab432a5..dd6fecda3b 100644
--- a/gcc/testsuite/gcc.dg/graphite/id-6.c
+++ b/gcc/testsuite/gcc.dg/graphite/id-6.c
@@ -2,7 +2,7 @@
void foo (int);
int test ()
{
- int a[N];
+ int a[N + 8];
unsigned i;
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/graphite/pr33766.c b/gcc/testsuite/gcc.dg/graphite/pr33766.c
index f6bb50615a..47d3dd40d6 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr33766.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr33766.c
@@ -4,16 +4,16 @@
float
fxt1_quantize_ALPHA1()
{
- int j1;
- int i;
- float *tv;
- for (j1 = 1; j1; j1++) {
- float e;
- for (i = 1; i; i++)
- e = tv[i];
- if (e)
- i = j1;
- }
- return tv[i];
+ int j1;
+ int i;
+ float *tv;
+ for (j1 = 1; j1 < 2048; j1++) {
+ float e;
+ for (i = 1; i < 2048; i++)
+ e = tv[i];
+ if (e)
+ i = j1;
+ }
+ return tv[i];
}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
index 66cfdea5ae..b406d1096b 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr35356-2.c
@@ -39,6 +39,6 @@ foo (int bar, int n, int k)
*/
-/* { dg-final { scan-tree-dump-times "MIN_EXPR" 4 "graphite" } } */
-/* { dg-final { scan-tree-dump-times "MAX_EXPR" 4 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "MIN_EXPR\[^\\n\\r]*;" 4 "graphite" } } */
+/* { dg-final { scan-tree-dump-times "MAX_EXPR\[^\\n\\r]*;" 4 "graphite" } } */
/* { dg-final { cleanup-tree-dump "graphite" } } */
diff --git a/gcc/testsuite/gcc.dg/graphite/pr46966.c b/gcc/testsuite/gcc.dg/graphite/pr46966.c
index ce2a93ca96..bb55b71b7e 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr46966.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr46966.c
@@ -1,5 +1,7 @@
/* PR tree-optimization/46966 */
/* { dg-do compile } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-O -floop-interchange -ffast-math -fno-tree-copy-prop -fno-tree-loop-im" } */
int a[1000][1000];
diff --git a/gcc/testsuite/gcc.dg/graphite/pr50561.c b/gcc/testsuite/gcc.dg/graphite/pr50561.c
index 70c6bbcc2a..5fbad4a732 100644
--- a/gcc/testsuite/gcc.dg/graphite/pr50561.c
+++ b/gcc/testsuite/gcc.dg/graphite/pr50561.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -floop-flatten -floop-strip-mine" } */
+/* { dg-options "-O2 -floop-strip-mine" } */
void f (unsigned *s)
{
diff --git a/gcc/testsuite/gcc.dg/graphite/pr54094.c b/gcc/testsuite/gcc.dg/graphite/pr54094.c
new file mode 100644
index 0000000000..ee99110b89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr54094.c
@@ -0,0 +1,10 @@
+/* { dg-options "-O2 -floop-parallelize-all -floop-nest-optimize" } */
+void dwt_deinterleave_h(int *a, int *b, int dn, int sn, int cas)
+{
+ int i;
+ for (i=0; i<sn; i++)
+ b[i]=a[2*i+cas];
+ for (i=0; i<dn; i++)
+ b[sn+i]=a[(2*i+1-cas)];
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr55022.c b/gcc/testsuite/gcc.dg/graphite/pr55022.c
new file mode 100644
index 0000000000..c631c0e23e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr55022.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fgraphite-identity" } */
+
+extern void abort (void);
+
+void __attribute__((noinline,noclone))
+f(int *limit, int minLen, int maxLen)
+{
+ int i;
+
+ for (i = minLen; i <= maxLen; i++) {
+ limit[i] = i;
+ }
+}
+
+int main()
+{
+ int limit[256], i;
+ f (limit, 0, 255);
+ for (i = 0; i < 256; ++i)
+ {
+ if (limit[i] != i)
+ abort ();
+ __asm__ volatile ("" : : : "memory");
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr59817-1.c b/gcc/testsuite/gcc.dg/graphite/pr59817-1.c
new file mode 100644
index 0000000000..175fa16fd7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr59817-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+int kd;
+
+void
+n2(void)
+{
+ static int so;
+ static short int i5;
+ int wj;
+ int *il;
+ int *nk = &so;
+ for (wj = 0; wj < 2; ++wj)
+ *nk = ((i5 += *il) || kd );
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr59817-2.c b/gcc/testsuite/gcc.dg/graphite/pr59817-2.c
new file mode 100644
index 0000000000..1395007681
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr59817-2.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -floop-interchange" } */
+
+void
+xl(void)
+{
+ static int j3;
+ for (j3 = 0; j3 < 1; ++j3) {
+ static int f2;
+ static int w7;
+ short int b5;
+ int ok;
+ f2 = (b5 += ok) ? (w7 = 0): (w7 ? 0 : (f2 = ok));
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60740.c b/gcc/testsuite/gcc.dg/graphite/pr60740.c
new file mode 100644
index 0000000000..5b7c180223
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60740.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+int **db6 = 0;
+
+void
+k26(void)
+{
+ static int geb = 0;
+ int *a22 = &geb;
+ int **l30 = &a22;
+ int *c4b;
+ int ndf;
+ for (ndf = 0; ndf <= 1; ++ndf)
+ *c4b = (db6 == l30) && (*a22)--;
+}
+
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60785.c b/gcc/testsuite/gcc.dg/graphite/pr60785.c
new file mode 100644
index 0000000000..87c1c685b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60785.c
@@ -0,0 +1,27 @@
+/* { dg-options "-O2 -floop-interchange" } */
+
+static int
+aqc(void)
+{
+ return 1;
+}
+
+void
+gkd(void)
+{
+ int wu0;
+ static int b1y;
+ static int gw2;
+ static int *ydw = &gw2;
+ static int **m3l = &ydw;
+ **m3l = 0;
+ for (b1y = 0; b1y < 1; ++b1y)
+ {
+ int *cpj = &gw2;
+ if (*ydw |= aqc())
+ {
+ *cpj = 0;
+ *ydw = wu0;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/pr60979.c b/gcc/testsuite/gcc.dg/graphite/pr60979.c
new file mode 100644
index 0000000000..0004a51248
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/graphite/pr60979.c
@@ -0,0 +1,37 @@
+/* { dg-options "-O -fgraphite-identity" } */
+
+#include <setjmp.h>
+
+struct x;
+
+typedef struct x **(*a)(struct x *);
+
+struct x {
+ union {
+ struct {
+ union {
+ a *i;
+ } l;
+ int s;
+ } y;
+ } e;
+};
+
+jmp_buf c;
+
+void
+b(struct x *r)
+{
+ int f;
+ static int w = 0;
+ volatile jmp_buf m;
+ f = (*(((struct x *)r)->e.y.l.i[2]((struct x *)r)))->e.y.s;
+ if (w++ != 0)
+ __builtin_memcpy((char *)m, (const char *)c, sizeof(jmp_buf));
+ if (setjmp (c) == 0) {
+ int z;
+ for (z = 0; z < 0; ++z)
+ ;
+ }
+ d((const char *)m);
+}
diff --git a/gcc/testsuite/gcc.dg/graphite/scop-3.c b/gcc/testsuite/gcc.dg/graphite/scop-3.c
index e20bfdcb34..18917c0edc 100644
--- a/gcc/testsuite/gcc.dg/graphite/scop-3.c
+++ b/gcc/testsuite/gcc.dg/graphite/scop-3.c
@@ -1,7 +1,7 @@
int toto()
{
int i, j, k;
- int a[100][100];
+ int a[100][200];
int b[100];
for (i = 1; i < 100; i++)
diff --git a/gcc/testsuite/gcc.dg/guality/guality.exp b/gcc/testsuite/gcc.dg/guality/guality.exp
index 5e3284d5d1..5e714dd7dc 100644
--- a/gcc/testsuite/gcc.dg/guality/guality.exp
+++ b/gcc/testsuite/gcc.dg/guality/guality.exp
@@ -4,11 +4,15 @@ load_lib gcc-dg.exp
load_lib gcc-gdb-test.exp
# Disable on darwin until radr://7264615 is resolved.
-# Disable on Tru64 UNIX (PR testsuite/48251).
-if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } {
+if { [istarget *-*-darwin*] } {
return
}
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
proc check_guality {args} {
set result [eval check_compile guality_check executable $args "-g -O0"]
set lines [lindex $result 0]
diff --git a/gcc/testsuite/gcc.dg/guality/param-1.c b/gcc/testsuite/gcc.dg/guality/param-1.c
new file mode 100644
index 0000000000..480ad3c13b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/param-1.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+typedef __UINTPTR_TYPE__ uintptr_t;
+
+__attribute__((noinline, noclone)) int
+sub (int a, int b)
+{
+ return a - b;
+}
+
+typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t
+ __attribute__ ((aligned (2 * __alignof__ (uintptr_t))));
+
+__attribute__((noinline, noclone)) void
+foo (fatp_t str, int a, int b)
+{
+ int i = sub (a, b);
+ if (i == 0) /* BREAK */
+ i = sub (b, a);
+}
+
+int
+main (void)
+{
+ fatp_t ptr = { 31415927, 27182818 };
+ foo (ptr, 1, 2);
+ return 0;
+}
+
+/* { dg-final { gdb-test 20 "str.pa" "31415927" } } */
+/* { dg-final { gdb-test 20 "str.pb" "27182818" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/param-2.c b/gcc/testsuite/gcc.dg/guality/param-2.c
new file mode 100644
index 0000000000..64678bd569
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/param-2.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-g -fno-var-tracking-assignments" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O1" } } */
+
+typedef __UINTPTR_TYPE__ uintptr_t;
+
+__attribute__((noinline, noclone)) int
+sub (int a, int b)
+{
+ return a - b;
+}
+
+typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t
+ __attribute__ ((aligned (2 * __alignof__ (uintptr_t))));
+
+__attribute__((noinline, noclone)) void
+foo (fatp_t str, int a, int b)
+{
+ int i = sub (a, b);
+ if (i == 0) /* BREAK */
+ foo (str, a - 1, b);
+}
+
+int
+main (void)
+{
+ fatp_t ptr = { 31415927, 27182818 };
+ foo (ptr, 1, 2);
+ return 0;
+}
+
+/* { dg-final { gdb-test 20 "str.pa" "31415927" } } */
+/* { dg-final { gdb-test 20 "str.pb" "27182818" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/param-3.c b/gcc/testsuite/gcc.dg/guality/param-3.c
new file mode 100644
index 0000000000..a3b5adb5a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/param-3.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O1" } } */
+
+typedef __UINTPTR_TYPE__ uintptr_t;
+
+__attribute__((noinline, noclone)) int
+sub (int a, int b)
+{
+ return a - b;
+}
+
+typedef struct { uintptr_t pa; uintptr_t pb; } fatp_t
+ __attribute__ ((aligned (2 * __alignof__ (uintptr_t))));
+
+__attribute__((noinline, noclone)) void
+foo (fatp_t str, int a, int b)
+{
+ int i = sub (a, b);
+ if (i == 0) /* BREAK */
+ foo (str, a - 1, b);
+}
+
+int
+main (void)
+{
+ fatp_t ptr = { 31415927, 27182818 };
+ foo (ptr, 1, 2);
+ return 0;
+}
+
+/* { dg-final { gdb-test 20 "str.pa" "31415927" } } */
+/* { dg-final { gdb-test 20 "str.pb" "27182818" } } */
diff --git a/gcc/testsuite/gcc.dg/guality/param-4.c b/gcc/testsuite/gcc.dg/guality/param-4.c
new file mode 100644
index 0000000000..a76b251f3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/param-4.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" } } */
+
+void
+foo (int i)
+{
+ int j = 0;
+ i = 1;
+ j = j + 1; /* BREAK */
+}
+
+int
+main (void)
+{
+ foo (0);
+ return 0;
+}
+
+/* { dg-final { gdb-test 10 "i" "1" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.dg/guality/pr36728-1.c b/gcc/testsuite/gcc.dg/guality/pr36728-1.c
index c4ad564e1d..ba7a6c2792 100644
--- a/gcc/testsuite/gcc.dg/guality/pr36728-1.c
+++ b/gcc/testsuite/gcc.dg/guality/pr36728-1.c
@@ -2,6 +2,10 @@
/* { dg-do run } */
/* { dg-options "-g" } */
+#include "../nop.h"
+
+int a, b;
+
int __attribute__((noinline))
foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
{
@@ -9,9 +13,9 @@ foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
int __attribute__ ((aligned(32))) y;
y = 2;
- asm volatile ("" : "=m" (y) : "m" (y));
+ asm (NOP : "=m" (y), "=m" (b) : "m" (y));
x[0] = 25;
- asm volatile ("" : "=m" (x[0]) : "m" (x[0]));
+ asm (NOP : "=m" (x[0]), "=m" (a) : "m" (x[0]), "m" (b));
return y;
}
@@ -21,29 +25,29 @@ foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
and arg2. So it is expected that these values are unavailable in
some of these tests. */
-/* { dg-final { gdb-test 12 "arg1" "1" { target { ! "s390*-*-*" } } } }*/
-/* { dg-final { gdb-test 12 "arg2" "2" { target { ! "s390*-*-*" } } } }*/
-/* { dg-final { gdb-test 12 "arg3" "3" } } */
-/* { dg-final { gdb-test 12 "arg4" "4" } } */
-/* { dg-final { gdb-test 12 "arg5" "5" } } */
-/* { dg-final { gdb-test 12 "arg6" "6" } } */
-/* { dg-final { gdb-test 12 "arg7" "30" } } */
-/* { dg-final { gdb-test 12 "y" "2" } } */
-/* { dg-final { gdb-test 14 "arg1" "1" { target { ! "s390*-*-*" } } } }*/
-/* { dg-final { gdb-test 14 "arg2" "2" { target { ! "s390*-*-*" } } } }*/
-/* { dg-final { gdb-test 14 "arg3" "3" } } */
-/* { dg-final { gdb-test 14 "arg4" "4" } } */
-/* { dg-final { gdb-test 14 "arg5" "5" } } */
-/* { dg-final { gdb-test 14 "arg6" "6" } } */
-/* { dg-final { gdb-test 14 "arg7" "30" } } */
-/* { dg-final { gdb-test 14 "*x" "(char) 25" } } */
-/* { dg-final { gdb-test 14 "y" "2" } } */
+/* { dg-final { gdb-test 16 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg3" "3" } } */
+/* { dg-final { gdb-test 16 "arg4" "4" } } */
+/* { dg-final { gdb-test 16 "arg5" "5" } } */
+/* { dg-final { gdb-test 16 "arg6" "6" } } */
+/* { dg-final { gdb-test 16 "arg7" "30" } } */
+/* { dg-final { gdb-test 16 "y" "2" } } */
+/* { dg-final { gdb-test 18 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 18 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 18 "arg3" "3" } } */
+/* { dg-final { gdb-test 18 "arg4" "4" } } */
+/* { dg-final { gdb-test 18 "arg5" "5" } } */
+/* { dg-final { gdb-test 18 "arg6" "6" } } */
+/* { dg-final { gdb-test 18 "arg7" "30" } } */
+/* { dg-final { gdb-test 18 "*x" "(char) 25" } } */
+/* { dg-final { gdb-test 18 "y" "2" } } */
int
main ()
{
int l = 0;
- asm volatile ("" : "=r" (l) : "0" (l));
- foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
+ asm ("" : "=r" (l) : "0" (l));
+ a = foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/guality/pr36728-2.c b/gcc/testsuite/gcc.dg/guality/pr36728-2.c
index a7c2de7479..6daa021c01 100644
--- a/gcc/testsuite/gcc.dg/guality/pr36728-2.c
+++ b/gcc/testsuite/gcc.dg/guality/pr36728-2.c
@@ -2,6 +2,10 @@
/* { dg-do run } */
/* { dg-options "-g" } */
+#include "../nop.h"
+
+int a, b;
+
int __attribute__((noinline))
foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
{
@@ -9,9 +13,9 @@ foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
int __attribute__ ((aligned(32))) y;
y = 2;
- asm volatile ("" : "=m" (y) : "m" (y));
+ asm (NOP : "=m" (y), "=m" (b) : "m" (y));
x[0] = 25;
- asm volatile ("" : "=m" (x[0]) : "m" (x[0]));
+ asm (NOP : "=m" (x[0]), "=m" (a) : "m" (x[0]), "m" (b));
return y;
}
@@ -21,29 +25,29 @@ foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
and arg2. So it is expected that these values are unavailable in
some of these tests. */
-/* { dg-final { gdb-test 12 "arg1" "1" { target { ! "s390*-*-*" } } } } */
-/* { dg-final { gdb-test 12 "arg2" "2" { target { ! "s390*-*-*" } } } } */
-/* { dg-final { gdb-test 12 "arg3" "3" } } */
-/* { dg-final { gdb-test 12 "arg4" "4" } } */
-/* { dg-final { gdb-test 12 "arg5" "5" } } */
-/* { dg-final { gdb-test 12 "arg6" "6" } } */
-/* { dg-final { gdb-test 12 "arg7" "30" } } */
-/* { dg-final { gdb-test 12 "y" "2" } } */
-/* { dg-final { gdb-test 14 "arg1" "1" { target { ! "s390*-*-*" } } } } */
-/* { dg-final { gdb-test 14 "arg2" "2" { target { ! "s390*-*-*" } } } } */
-/* { dg-final { gdb-test 14 "arg3" "3" } } */
-/* { dg-final { gdb-test 14 "arg4" "4" } } */
-/* { dg-final { gdb-test 14 "arg5" "5" } } */
-/* { dg-final { gdb-test 14 "arg6" "6" } } */
-/* { dg-final { gdb-test 14 "arg7" "30" } } */
-/* { dg-final { gdb-test 14 "*x" "(char) 25" } } */
-/* { dg-final { gdb-test 14 "y" "2" } } */
+/* { dg-final { gdb-test 16 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg3" "3" } } */
+/* { dg-final { gdb-test 16 "arg4" "4" } } */
+/* { dg-final { gdb-test 16 "arg5" "5" } } */
+/* { dg-final { gdb-test 16 "arg6" "6" } } */
+/* { dg-final { gdb-test 16 "arg7" "30" } } */
+/* { dg-final { gdb-test 16 "y" "2" } } */
+/* { dg-final { gdb-test 18 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 18 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 18 "arg3" "3" } } */
+/* { dg-final { gdb-test 18 "arg4" "4" } } */
+/* { dg-final { gdb-test 18 "arg5" "5" } } */
+/* { dg-final { gdb-test 18 "arg6" "6" } } */
+/* { dg-final { gdb-test 18 "arg7" "30" } } */
+/* { dg-final { gdb-test 18 "*x" "(char) 25" } } */
+/* { dg-final { gdb-test 18 "y" "2" } } */
int
main ()
{
int l = 0;
- asm volatile ("" : "=r" (l) : "0" (l));
- foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
+ asm ("" : "=r" (l) : "0" (l));
+ a = foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/guality/pr36728-3.c b/gcc/testsuite/gcc.dg/guality/pr36728-3.c
new file mode 100644
index 0000000000..bb2c0675d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr36728-3.c
@@ -0,0 +1,51 @@
+/* PR debug/36728 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+int __attribute__((noinline))
+foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
+{
+ char *x = __builtin_alloca (arg7);
+ int __attribute__ ((aligned(32))) y;
+
+ y = 2;
+ asm (NOP : "=m" (y) : "m" (y));
+ x[0] = 25;
+ asm volatile (NOP : "=m" (x[0]) : "m" (x[0]));
+ return y;
+}
+
+/* On s390(x) r2 and r3 are (depending on the optimization level) used
+ when adjusting the addresses in order to meet the alignment
+ requirements above. They usually hold the function arguments arg1
+ and arg2. So it is expected that these values are unavailable in
+ some of these tests. */
+
+/* { dg-final { gdb-test 14 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 14 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 14 "arg3" "3" } } */
+/* { dg-final { gdb-test 14 "arg4" "4" } } */
+/* { dg-final { gdb-test 14 "arg5" "5" } } */
+/* { dg-final { gdb-test 14 "arg6" "6" } } */
+/* { dg-final { gdb-test 14 "arg7" "30" } } */
+/* { dg-final { gdb-test 14 "y" "2" } } */
+/* { dg-final { gdb-test 16 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg3" "3" } } */
+/* { dg-final { gdb-test 16 "arg4" "4" } } */
+/* { dg-final { gdb-test 16 "arg5" "5" } } */
+/* { dg-final { gdb-test 16 "arg6" "6" } } */
+/* { dg-final { gdb-test 16 "arg7" "30" } } */
+/* { dg-final { gdb-test 16 "*x" "(char) 25" } } */
+/* { dg-final { gdb-test 16 "y" "2" } } */
+
+int
+main ()
+{
+ int l = 0;
+ asm volatile ("" : "=r" (l) : "0" (l));
+ foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr36728-4.c b/gcc/testsuite/gcc.dg/guality/pr36728-4.c
new file mode 100644
index 0000000000..fee79c49c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr36728-4.c
@@ -0,0 +1,51 @@
+/* PR debug/36728 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+int __attribute__((noinline))
+foo (int arg1, int arg2, int arg3, int arg4, int arg5, int arg6, int arg7)
+{
+ char x[30];
+ int __attribute__ ((aligned(32))) y;
+
+ y = 2;
+ asm (NOP : "=m" (y) : "m" (y));
+ x[0] = 25;
+ asm volatile (NOP : "=m" (x[0]) : "m" (x[0]));
+ return y;
+}
+
+/* On s390(x) r2 and r3 are (depending on the optimization level) used
+ when adjusting the addresses in order to meet the alignment
+ requirements above. They usually hold the function arguments arg1
+ and arg2. So it is expected that these values are unavailable in
+ some of these tests. */
+
+/* { dg-final { gdb-test 14 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 14 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 14 "arg3" "3" } } */
+/* { dg-final { gdb-test 14 "arg4" "4" } } */
+/* { dg-final { gdb-test 14 "arg5" "5" } } */
+/* { dg-final { gdb-test 14 "arg6" "6" } } */
+/* { dg-final { gdb-test 14 "arg7" "30" } } */
+/* { dg-final { gdb-test 14 "y" "2" } } */
+/* { dg-final { gdb-test 16 "arg1" "1" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg2" "2" { target { ! "s390*-*-*" } } } } */
+/* { dg-final { gdb-test 16 "arg3" "3" } } */
+/* { dg-final { gdb-test 16 "arg4" "4" } } */
+/* { dg-final { gdb-test 16 "arg5" "5" } } */
+/* { dg-final { gdb-test 16 "arg6" "6" } } */
+/* { dg-final { gdb-test 16 "arg7" "30" } } */
+/* { dg-final { gdb-test 16 "*x" "(char) 25" } } */
+/* { dg-final { gdb-test 16 "y" "2" } } */
+
+int
+main ()
+{
+ int l = 0;
+ asm volatile ("" : "=r" (l) : "0" (l));
+ foo (l + 1, l + 2, l + 3, l + 4, l + 5, l + 6, l + 30);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr49888.c b/gcc/testsuite/gcc.dg/guality/pr49888.c
new file mode 100644
index 0000000000..a0e26cf832
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr49888.c
@@ -0,0 +1,26 @@
+/* PR debug/49888 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+static int v;
+
+static void __attribute__((noinline, noclone))
+f (int *p)
+{
+ int c = *p;
+ v = c;
+ *p = 1; /* { dg-final { gdb-test 12 "!!c" "0" } } */
+ /* c may very well be optimized out at this point, so we test !c,
+ which will evaluate to the expected value. We just want to make
+ sure it doesn't remain bound to *p as it did before, in which
+ case !c would evaluate to 0. *p may also be regarded as aliasing
+ register saves, thus the !!c above. */
+ v = 0; /* { dg-final { gdb-test 18 "!c" "1" } } */
+}
+int
+main ()
+{
+ int a = 0;
+ f (&a);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54200.c b/gcc/testsuite/gcc.dg/guality/pr54200.c
new file mode 100644
index 0000000000..9b17187640
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54200.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/54200 */
+/* { dg-do run } */
+/* { dg-options "-g -fno-var-tracking-assignments" } */
+
+int o __attribute__((used));
+
+void bar (void) { o = 2; }
+
+int __attribute__((noinline,noclone))
+foo (int z, int x, int b)
+{
+ if (x == 1)
+ {
+ bar ();
+ return z;
+ }
+ else
+ {
+ int a = (x + z) + b;
+ return a; /* { dg-final { gdb-test 20 "z" "3" } } */
+ }
+}
+
+int main ()
+{
+ foo (3, 2, 1);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-1.c b/gcc/testsuite/gcc.dg/guality/pr54519-1.c
new file mode 100644
index 0000000000..98afd45c18
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-1.c
@@ -0,0 +1,48 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+}
+
+static int
+fn2 (int x, int y, int z)
+{
+ int a = 8;
+ if (x != z)
+ {
+ fn1 (x);
+ fn1 (x); /* { dg-final { gdb-test 20 "x" "36" } } */
+ if (x == 36) /* { dg-final { gdb-test 20 "y" "25" } } */
+ fn1 (x); /* { dg-final { gdb-test 20 "z" "6" } } */
+ fn1 (x); /* { dg-final { gdb-test 23 "x" "98" } } */
+ if (x == 98) /* { dg-final { gdb-test 23 "y" "117" } } */
+ fn1 (x); /* { dg-final { gdb-test 23 "z" "8" } } */
+ fn1 (x);
+ fn1 (x + a);
+ }
+ return y;
+}
+
+__attribute__((noinline, noclone)) int
+fn3 (int x, int y)
+{
+ return fn2 (x, y, 6);
+}
+
+__attribute__((noinline, noclone)) int
+fn4 (int x, int y)
+{
+ return fn2 (x, y, 8);
+}
+
+int
+main ()
+{
+ fn3 (36, 25);
+ fn4 (98, 117);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-2.c b/gcc/testsuite/gcc.dg/guality/pr54519-2.c
new file mode 100644
index 0000000000..4ee3c9e2f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-2.c
@@ -0,0 +1,45 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+}
+
+static int
+fn2 (int x, int y)
+{
+ if (y)
+ {
+ fn1 (x); /* { dg-final { gdb-test 17 "x" "6" } } */
+ fn1 (x); /* { dg-final { gdb-test 17 "y" "25" } } */
+ fn1 (x);
+ fn1 (x);
+ y = -2 + x;
+ y = y * y * y + y;
+ fn1 (x + y); /* { dg-final { gdb-test 22 "y" "68" } } */
+ }
+ return x;
+}
+
+__attribute__((noinline, noclone)) int
+fn3 (int x, int y)
+{
+ return fn2 (x, y) + y;
+}
+
+__attribute__((noinline, noclone)) int
+fn4 (int x, int y)
+{
+ return fn2 (x, y) + y;
+}
+
+int
+main ()
+{
+ fn3 (6, 25);
+ fn4 (4, 117);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-3.c b/gcc/testsuite/gcc.dg/guality/pr54519-3.c
new file mode 100644
index 0000000000..aa8369e15b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-3.c
@@ -0,0 +1,42 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+}
+
+static int
+fn2 (int x, int y, int z)
+{
+ int a = 8;
+ if (x != z)
+ {
+ fn1 (x);
+ fn1 (x); /* { dg-final { gdb-test 20 "x" "36" } } */
+ if (x == 36) /* { dg-final { gdb-test 20 "y" "25" } } */
+ fn1 (x); /* { dg-final { gdb-test 20 "z" "6" } } */
+ fn1 (x); /* { dg-final { gdb-test 23 "x" "98" } } */
+ if (x == 98) /* { dg-final { gdb-test 23 "y" "117" } } */
+ fn1 (x); /* { dg-final { gdb-test 23 "z" "8" } } */
+ fn1 (x);
+ fn1 (x + a);
+ }
+ return y;
+}
+
+int (*p) (int, int, int) = fn2;
+
+int
+main ()
+{
+ __asm volatile ("" : : : "memory");
+ int (*q) (int, int, int) = p;
+ __asm volatile ("" : : : "memory");
+ q (36, 25, 6);
+ q (98, 117, 8);
+ q (0, 0, 0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-4.c b/gcc/testsuite/gcc.dg/guality/pr54519-4.c
new file mode 100644
index 0000000000..d2765d148c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-4.c
@@ -0,0 +1,39 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+}
+
+static int
+fn2 (int x, int y)
+{
+ if (y)
+ {
+ fn1 (x); /* { dg-final { gdb-test 17 "x" "6" } } */
+ fn1 (x); /* { dg-final { gdb-test 17 "y" "25" } } */
+ fn1 (x);
+ fn1 (x);
+ y = -2 + x;
+ y = y * y * y + y;
+ fn1 (x + y); /* { dg-final { gdb-test 22 "y" "68" } } */
+ }
+ return x;
+}
+
+int (*p) (int, int) = fn2;
+
+int
+main ()
+{
+ __asm volatile ("" : : : "memory");
+ int (*q) (int, int) = p;
+ __asm volatile ("" : : : "memory");
+ q (6, 25);
+ q (4, 117);
+ q (0, 0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-5.c b/gcc/testsuite/gcc.dg/guality/pr54519-5.c
new file mode 100644
index 0000000000..c64527a45d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-5.c
@@ -0,0 +1,45 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+fn1 (int x)
+{
+ __asm volatile ("" : "+r" (x) : : "memory");
+}
+
+static int
+fn2 (int x, int y)
+{
+ if (y)
+ {
+ fn1 (x); /* { dg-final { gdb-test 17 "x" "6" } } */
+ fn1 (x); /* { dg-final { gdb-test 17 "y" "25" } } */
+ fn1 (x);
+ fn1 (x);
+ y = -2 + x;
+ y = y * y * y + y;
+ fn1 (x + y); /* { dg-final { gdb-test 22 "y" "68" } } */
+ }
+ return x;
+}
+
+__attribute__((noinline, noclone)) int
+fn3 (int x, int y)
+{
+ return fn2 (x, y);
+}
+
+__attribute__((noinline, noclone)) int
+fn4 (int x, int y)
+{
+ return fn2 (x, y);
+}
+
+int
+main ()
+{
+ fn3 (6, 25);
+ fn4 (4, 117);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54519-6.c b/gcc/testsuite/gcc.dg/guality/pr54519-6.c
new file mode 100644
index 0000000000..836ab1f660
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54519-6.c
@@ -0,0 +1,27 @@
+/* PR debug/54519 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+static inline void
+f1 (int x, int y)
+{
+ asm volatile (NOP); /* { dg-final { gdb-test 11 "x" "2" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 11 "y" "0" } } */
+}
+
+static inline void
+f2 (int z)
+{
+ f1 (z, 0);
+ f1 (z, 1);
+}
+
+int
+main ()
+{
+ f2 (2);
+ f2 (3);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54551.c b/gcc/testsuite/gcc.dg/guality/pr54551.c
new file mode 100644
index 0000000000..4235f78ce7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54551.c
@@ -0,0 +1,28 @@
+/* PR debug/54551 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+void __attribute__((__noinline__))
+bar (void)
+{
+ asm volatile ("");
+}
+
+int __attribute__((__noinline__))
+foo (int x, int y, int z)
+{
+ if (x != z)
+ {
+ int a = z + 1;
+ bar (); /* { dg-final { gdb-test 18 "a" "4" } } */
+ bar (); /* { dg-final { gdb-test 18 "z" "3" } } */
+ }
+ return y;
+}
+
+int
+main ()
+{
+ foo (1, 2, 3);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54693-2.c b/gcc/testsuite/gcc.dg/guality/pr54693-2.c
new file mode 100644
index 0000000000..2810a75d5e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54693-2.c
@@ -0,0 +1,33 @@
+/* PR debug/54693 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+int v;
+
+__attribute__((noinline, noclone)) void
+bar (int i)
+{
+ v = i;
+ asm volatile ("" : : "r" (i) : "memory");
+}
+
+__attribute__((noinline, noclone)) void
+foo (int x, int y, int z)
+{
+ int i = 0;
+ while (x > 3 && y > 3 && z > 3)
+ { /* { dg-final { gdb-test 21 "i" "v + 1" } } */
+ /* { dg-final { gdb-test 21 "x" "10 - i" } } */
+ bar (i); /* { dg-final { gdb-test 21 "y" "20 - 2 * i" } } */
+ /* { dg-final { gdb-test 21 "z" "30 - 3 * i" } } */
+ i++, x--, y -= 2, z -= 3;
+ }
+}
+
+int
+main ()
+{
+ v = -1;
+ foo (10, 20, 30);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54693.c b/gcc/testsuite/gcc.dg/guality/pr54693.c
new file mode 100644
index 0000000000..b852c06abb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54693.c
@@ -0,0 +1,29 @@
+/* PR debug/54693 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+foo (char *str, char c)
+{
+ asm volatile ("" : : "r" (str), "r" (c) : "memory");
+ *str = c;
+}
+
+int
+main ()
+{
+ int i;
+ char c;
+ char arr[11];
+
+ for (i = 0; i < 10; i++)
+ {
+ c = 0x30 + i;
+ foo (&arr[i], c); /* { dg-final { gdb-test 22 "i" "c - 48" } } */
+ }
+ arr[10] = 0;
+
+ __builtin_printf ("arr = %s\n", arr);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/guality/pr54796.c b/gcc/testsuite/gcc.dg/guality/pr54796.c
new file mode 100644
index 0000000000..f58e5a02cc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54796.c
@@ -0,0 +1,25 @@
+/* PR debug/54796 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+__attribute__((noinline, noclone)) void
+bar (char *a, int b)
+{
+ __asm volatile ("" : "+r" (a), "+r" (b) : : "memory");
+}
+
+__attribute__((noinline, noclone)) void
+foo (int a, int b)
+{
+ int c = a;
+ char d[b]; /* { dg-final { gdb-test 17 "a" "5" } } */
+ bar (d, 2); /* { dg-final { gdb-test 17 "b" "6" } } */
+ bar (d, 4); /* { dg-final { gdb-test 17 "c" "5" } } */
+}
+
+int
+main ()
+{
+ foo (5, 6);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr54970.c b/gcc/testsuite/gcc.dg/guality/pr54970.c
new file mode 100644
index 0000000000..a9b8c064d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr54970.c
@@ -0,0 +1,47 @@
+/* PR debug/54970 */
+/* PR debug/54971 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+int
+main ()
+{
+ int a[] = { 1, 2, 3 }; /* { dg-final { gdb-test 15 "a\[0\]" "1" } } */
+ int *p = a + 2; /* { dg-final { gdb-test 15 "a\[1\]" "2" } } */
+ int *q = a + 1; /* { dg-final { gdb-test 15 "a\[2\]" "3" } } */
+ /* { dg-final { gdb-test 15 "*p" "3" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 15 "*q" "2" } } */
+ *p += 10; /* { dg-final { gdb-test 20 "a\[0\]" "1" } } */
+ /* { dg-final { gdb-test 20 "a\[1\]" "2" } } */
+ /* { dg-final { gdb-test 20 "a\[2\]" "13" } } */
+ /* { dg-final { gdb-test 20 "*p" "13" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 20 "*q" "2" } } */
+ *q += 10; /* { dg-final { gdb-test 25 "a\[0\]" "1" } } */
+ /* { dg-final { gdb-test 25 "a\[1\]" "12" } } */
+ /* { dg-final { gdb-test 25 "a\[2\]" "13" } } */
+ /* { dg-final { gdb-test 25 "*p" "13" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 25 "*q" "12" } } */
+ __builtin_memcpy (&a, (int [3]) { 4, 5, 6 }, sizeof (a));
+ /* { dg-final { gdb-test 31 "a\[0\]" "4" } } */
+ /* { dg-final { gdb-test 31 "a\[1\]" "5" } } */
+ /* { dg-final { gdb-test 31 "a\[2\]" "6" } } */
+ /* { dg-final { gdb-test 31 "*p" "6" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 31 "*q" "5" } } */
+ *p += 20; /* { dg-final { gdb-test 36 "a\[0\]" "4" } } */
+ /* { dg-final { gdb-test 36 "a\[1\]" "5" } } */
+ /* { dg-final { gdb-test 36 "a\[2\]" "26" } } */
+ /* { dg-final { gdb-test 36 "*p" "26" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 36 "*q" "5" } } */
+ *q += 20; /* { dg-final { gdb-test 45 "a\[0\]" "4" } } */
+ /* { dg-final { gdb-test 45 "a\[1\]" "25" } } */
+ /* { dg-final { gdb-test 45 "a\[2\]" "26" } } */
+ /* { dg-final { gdb-test 45 "*p" "26" } } */
+ /* { dg-final { gdb-test 45 "p\[-1\]" "25" } } */
+ /* { dg-final { gdb-test 45 "p\[-2\]" "4" } } */
+ /* { dg-final { gdb-test 45 "q\[-1\]" "4" } } */
+ /* { dg-final { gdb-test 45 "q\[1\]" "26" } } */
+ asm volatile (NOP); /* { dg-final { gdb-test 45 "*q" "25" } } */
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr56154-1.c b/gcc/testsuite/gcc.dg/guality/pr56154-1.c
new file mode 100644
index 0000000000..4f02bc96e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr56154-1.c
@@ -0,0 +1,29 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+union U { int a, b; };
+volatile int z;
+
+__attribute__((noinline, noclone)) int
+foo (int fd, union U x)
+{
+ int result = x.a != 0;
+ if (fd != 0)
+ result = x.a == 0;
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-1.c:17 "x.a" "4" } } */
+ z = x.a;
+ x.a = 6;
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-1.c:20 "x.a" "6" } } */
+ return result;
+}
+
+void
+test_main (void)
+{
+ union U u = { .a = 4 };
+ foo (0, u);
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr56154-2.c b/gcc/testsuite/gcc.dg/guality/pr56154-2.c
new file mode 100644
index 0000000000..6c1d5d977f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr56154-2.c
@@ -0,0 +1,39 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm ("");
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-2.c:30 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr56154-3.c b/gcc/testsuite/gcc.dg/guality/pr56154-3.c
new file mode 100644
index 0000000000..095dce9f65
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr56154-3.c
@@ -0,0 +1,31 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-3.c:22 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr56154-4.c b/gcc/testsuite/gcc.dg/guality/pr56154-4.c
new file mode 100644
index 0000000000..bfe7338d62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr56154-4.c
@@ -0,0 +1,34 @@
+/* PR debug/56154 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+/* { dg-additional-sources "pr56154-aux.c" } */
+
+#include "../nop.h"
+
+extern void abort (void);
+
+volatile int z;
+
+__attribute__((noinline, noclone)) int
+foo (int x)
+{
+ z = 6;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ x++;
+ asm (NOP : : : "memory");
+ asm (NOP : : : "memory"); /* { dg-final { gdb-test pr56154-4.c:25 "x" "28" } } */
+ return x;
+}
+
+void
+test_main (void)
+{
+ if (foo (20) != 28)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr56154-aux.c b/gcc/testsuite/gcc.dg/guality/pr56154-aux.c
new file mode 100644
index 0000000000..131173cb3f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr56154-aux.c
@@ -0,0 +1,11 @@
+/* PR debug/56154 */
+/* { dg-do compile } */
+
+extern void test_main (void);
+
+int
+main ()
+{
+ test_main ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr58791-1.c b/gcc/testsuite/gcc.dg/guality/pr58791-1.c
new file mode 100644
index 0000000000..62ce881bfc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr58791-1.c
@@ -0,0 +1,34 @@
+/* PR tree-optimization/58791 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+__attribute__((noinline, noclone)) int
+foo (int x, int y)
+{
+ _Bool a = x != 0;
+ _Bool b = y != 2;
+ _Bool c = a & b;
+ _Bool d = !c;
+ int ret;
+ if (c)
+ {
+ if (y < 3 || y > 4)
+ ret = 1;
+ else
+ ret = 0;
+ }
+ else
+ ret = 0;
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-1.c:25 "c & 1" "1" } } */
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-1.c:25 "d & 1" "0" } } */
+ return ret;
+}
+
+int
+main ()
+{
+ foo (1, 3);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr58791-2.c b/gcc/testsuite/gcc.dg/guality/pr58791-2.c
new file mode 100644
index 0000000000..d7da69b48c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr58791-2.c
@@ -0,0 +1,36 @@
+/* PR tree-optimization/58791 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+__attribute__((noinline, noclone)) int
+foo (unsigned char c)
+{
+ int ret;
+ _Bool a, b, d, e, f;
+
+ a = c == 34;
+ b = c == 32;
+ d = a | b;
+ f = !d;
+ if (d)
+ ret = 1;
+ else
+ {
+ e = c <= 31;
+ ret = e;
+ }
+
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-2.c:27 "d & 1" "1" } } */
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr58791-2.c:27 "f & 1" "0" } } */
+ return ret;
+}
+
+
+int
+main ()
+{
+ foo (32);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr58791-3.c b/gcc/testsuite/gcc.dg/guality/pr58791-3.c
new file mode 100644
index 0000000000..6316ace566
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr58791-3.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/58791 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+__attribute__((noinline, noclone)) unsigned
+foo (unsigned a, unsigned b, unsigned c, unsigned d, unsigned e)
+{
+ unsigned f = b + c; /* { dg-final { gdb-test pr58791-3.c:19 "f" "5" } } */
+ unsigned g = a - f; /* { dg-final { gdb-test pr58791-3.c:19 "g" "24" } } */
+ unsigned h = d + e; /* { dg-final { gdb-test pr58791-3.c:19 "h" "9" } } */
+ unsigned i = g - h; /* { dg-final { gdb-test pr58791-3.c:19 "i" "15" } } */
+ unsigned j = f + 1; /* { dg-final { gdb-test pr58791-3.c:19 "j" "6" } } */
+ unsigned k = g + 1; /* { dg-final { gdb-test pr58791-3.c:19 "k" "25" } } */
+ unsigned l = h + 1; /* { dg-final { gdb-test pr58791-3.c:19 "l" "10" } } */
+ unsigned m = i + 1; /* { dg-final { gdb-test pr58791-3.c:19 "m" "16" } } */
+ asm volatile (NOP : : : "memory");
+ asm volatile (NOP : : : "memory");
+ return i;
+}
+
+int
+main ()
+{
+ foo (29, 2, 3, 4, 5);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr58791-4.c b/gcc/testsuite/gcc.dg/guality/pr58791-4.c
new file mode 100644
index 0000000000..d988a9cfbb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr58791-4.c
@@ -0,0 +1,41 @@
+/* PR tree-optimization/58791 */
+/* { dg-do run } */
+/* { dg-options "-g -ffast-math" } */
+
+#include "../nop.h"
+
+__attribute__((noinline, noclone)) double
+foo (float a, float b, float c, float d, float l, double u)
+{
+ float e = a * d;
+ float f = d * e;
+ double g = (double) f;
+ double h = (double) b;
+ double i = g * h; /* { dg-final { gdb-test pr58791-4.c:32 "i" "486" { target { x86_64-*-* && lp64 } } } } */
+ double i2 = i + 1.0; /* { dg-final { gdb-test pr58791-4.c:32 "i2" "487" { target { x86_64-*-* && lp64 } } } } */
+ double j = i * 3.25;
+ double k = h + j;
+ float m = l * 8.75;
+ double n = (double) m;
+ double o = (double) a;
+ double p = n * o;
+ double q = h * p;
+ double r = q * 2.5;
+ double s = k - r;
+ double t = (double) c;
+ double v = o * u;
+ double w = o * v;
+ double x = h * w;
+ double y = h * x;
+ double z = y * 8.5;
+ asm volatile (NOP : : : "memory");
+ asm volatile (NOP : : : "memory");
+ return s - z;
+}
+
+int
+main ()
+{
+ foo (3.0f, 2.0f, -1.0f, 9.0f, 1.0f, 2.0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr58791-5.c b/gcc/testsuite/gcc.dg/guality/pr58791-5.c
new file mode 100644
index 0000000000..c237769194
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr58791-5.c
@@ -0,0 +1,29 @@
+/* PR tree-optimization/58791 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+__attribute__((noinline, noclone)) unsigned int
+foo (unsigned int a0, unsigned int a1, unsigned int a2,
+ unsigned int a3, unsigned int a4)
+{
+ unsigned int b0, b1, b2, b3, b4, e;
+ /* this can be optimized to four additions... */
+ b4 = a4 + a3 + a2 + a1 + a0; /* { dg-final { gdb-test pr58791-5.c:20 "b4" "4681" } } */
+ b3 = a3 + a2 + a1 + a0; /* { dg-final { gdb-test pr58791-5.c:20 "b3" "585" } } */
+ b2 = a2 + a1 + a0; /* { dg-final { gdb-test pr58791-5.c:20 "b2" "73" } } */
+ b1 = a1 + a0; /* { dg-final { gdb-test pr58791-5.c:20 "b1" "9" } } */
+ /* This is actually 0 */
+ e = b4 - b3 + b2 - b1 - a4 - a2; /* { dg-final { gdb-test pr58791-5.c:20 "e" "0" } } */
+ asm volatile (NOP : : : "memory");
+ asm volatile (NOP : : : "memory");
+ return e;
+}
+
+int
+main ()
+{
+ foo (1, 8, 64, 512, 4096);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/guality/pr59776.c b/gcc/testsuite/gcc.dg/guality/pr59776.c
new file mode 100644
index 0000000000..382abb622b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/guality/pr59776.c
@@ -0,0 +1,29 @@
+/* PR debug/59776 */
+/* { dg-do run } */
+/* { dg-options "-g" } */
+
+#include "../nop.h"
+
+struct S { float f, g; };
+
+__attribute__((noinline, noclone)) void
+foo (struct S *p)
+{
+ struct S s1, s2; /* { dg-final { gdb-test pr59776.c:17 "s1.f" "5.0" } } */
+ s1 = *p; /* { dg-final { gdb-test pr59776.c:17 "s1.g" "6.0" } } */
+ s2 = s1; /* { dg-final { gdb-test pr59776.c:17 "s2.f" "0.0" } } */
+ *(int *) &s2.f = 0; /* { dg-final { gdb-test pr59776.c:17 "s2.g" "6.0" } } */
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr59776.c:20 "s1.f" "5.0" } } */
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr59776.c:20 "s1.g" "6.0" } } */
+ s2 = s1; /* { dg-final { gdb-test pr59776.c:20 "s2.f" "5.0" } } */
+ asm volatile (NOP : : : "memory"); /* { dg-final { gdb-test pr59776.c:20 "s2.g" "6.0" } } */
+ asm volatile (NOP : : : "memory");
+}
+
+int
+main ()
+{
+ struct S x = { 5.0f, 6.0f };
+ foo (&x);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/hoist-register-pressure-1.c b/gcc/testsuite/gcc.dg/hoist-register-pressure-1.c
new file mode 100644
index 0000000000..f5b5302b3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/hoist-register-pressure-1.c
@@ -0,0 +1,32 @@
+/* { dg-options "-Os -fdump-rtl-hoist" } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" { target { nonpic } } } } */
+/* { dg-final { cleanup-rtl-dump "hoist" } } */
+
+#define BUF 100
+int a[BUF];
+
+void com (int);
+void bar (int);
+
+int foo (int x, int y, int z)
+{
+ /* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled,
+ because its rtx_cost is too small. */
+ if (z)
+ {
+ a[1] = a[0] + a[2];
+ a[2] = a[1] + a[3];
+ a[3] = a[2] + a[4];
+ a[4] = a[3] + a[5];
+ a[5] = a[4] + a[6];
+ a[6] = a[5] + a[7];
+ a[7] = a[6] + a[8];
+ com (x+y);
+ }
+ else
+ {
+ bar (x+y);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/hoist-register-pressure-2.c b/gcc/testsuite/gcc.dg/hoist-register-pressure-2.c
new file mode 100644
index 0000000000..30408f318c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/hoist-register-pressure-2.c
@@ -0,0 +1,33 @@
+/* { dg-options "-Os -fdump-rtl-hoist" } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */
+/* { dg-final { cleanup-rtl-dump "hoist" } } */
+
+#define BUF 100
+int a[BUF];
+
+void com (int);
+void bar (int);
+
+int foo (int x, int y, int z)
+{
+ /* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled,
+ because its rtx_cost is too small. */
+ if (z)
+ {
+ a[1] = a[0];
+ a[2] = a[1];
+ a[3] = a[3];
+ a[4] = a[5];
+ a[5] = a[7];
+ a[6] = a[11];
+ a[7] = a[13];
+ a[8] = a[17];
+ com (x+y);
+ }
+ else
+ {
+ bar (x+y);
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/hoist-register-pressure-3.c b/gcc/testsuite/gcc.dg/hoist-register-pressure-3.c
new file mode 100644
index 0000000000..b050f89823
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/hoist-register-pressure-3.c
@@ -0,0 +1,33 @@
+/* { dg-options "-Os -fdump-rtl-hoist" } */
+/* { dg-final { scan-rtl-dump "PRE/HOIST: end of bb .* copying expression" "hoist" } } */
+/* { dg-final { cleanup-rtl-dump "hoist" } } */
+
+#define BUF 100
+int a[BUF];
+
+void com (int);
+void bar (int);
+
+int foo (int x, int y, int z)
+{
+ /* "x+y" won't be hoisted if "-fira-hoist-pressure" is disabled,
+ because its rtx_cost is too small. */
+ if (z)
+ {
+ a[1] = a[0] + a[2] + a[3] + a[4] + a[5] + a[6];
+ a[2] = a[1] + a[3] + a[5] + a[5] + a[6] + a[7];
+ a[3] = a[2] + a[5] + a[7] + a[6] + a[7] + a[8];
+ a[4] = a[3] + a[7] + a[11] + a[7] + a[8] + a[9];
+ a[5] = a[5] + a[11] + a[13] + a[8] + a[9] + a[10];
+ a[6] = a[7] + a[13] + a[17] + a[9] + a[10] + a[11];
+ a[7] = a[11] + a[17] + a[19] + a[10] + a[11] + a[12];
+ com (x+y);
+ }
+ else
+ {
+ bar (x+y);
+ }
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-1.c b/gcc/testsuite/gcc.dg/iec-559-macros-1.c
new file mode 100644
index 0000000000..bd5d037afc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-1.c
@@ -0,0 +1,16 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-2.c b/gcc/testsuite/gcc.dg/iec-559-macros-2.c
new file mode 100644
index 0000000000..5a28574ac9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-2.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-funsafe-math-optimizations" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 != 0
+# error "__GCC_IEC_559 != 0 with -funsafe-math-optimizations"
+#endif
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -funsafe-math-optimizations"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-3.c b/gcc/testsuite/gcc.dg/iec-559-macros-3.c
new file mode 100644
index 0000000000..5eeb34503f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-3.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-freciprocal-math" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 != 0
+# error "__GCC_IEC_559 != 0 with -freciprocal-math"
+#endif
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -freciprocal-math"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-4.c b/gcc/testsuite/gcc.dg/iec-559-macros-4.c
new file mode 100644
index 0000000000..7bf6b9c30b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-4.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-ffinite-math-only" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 != 0
+# error "__GCC_IEC_559 != 0 with -ffinite-math-only"
+#endif
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -ffinite-math-only"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-5.c b/gcc/testsuite/gcc.dg/iec-559-macros-5.c
new file mode 100644
index 0000000000..ea37474fd1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-5.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-fno-signed-zeros" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 != 0
+# error "__GCC_IEC_559 != 0 with -fno-signed-zeros"
+#endif
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -fno-signed-zeros"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-6.c b/gcc/testsuite/gcc.dg/iec-559-macros-6.c
new file mode 100644
index 0000000000..e2be757f86
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-6.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-fsingle-precision-constant" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 != 0
+# error "__GCC_IEC_559 != 0 with -fsingle-precision-constant"
+#endif
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -fsingle-precision-constant"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-7.c b/gcc/testsuite/gcc.dg/iec-559-macros-7.c
new file mode 100644
index 0000000000..3b1f79172d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-7.c
@@ -0,0 +1,20 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-fcx-limited-range" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -fcx-limited-range"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-8.c b/gcc/testsuite/gcc.dg/iec-559-macros-8.c
new file mode 100644
index 0000000000..1990b944dc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-8.c
@@ -0,0 +1,20 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess } */
+/* { dg-options "-fcx-fortran-rules" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559_COMPLEX != 0
+# error "__GCC_IEC_559_COMPLEX != 0 with -fcx-fortran-rules"
+#endif
diff --git a/gcc/testsuite/gcc.dg/iec-559-macros-9.c b/gcc/testsuite/gcc.dg/iec-559-macros-9.c
new file mode 100644
index 0000000000..6179a3bfe4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/iec-559-macros-9.c
@@ -0,0 +1,23 @@
+/* Test __GCC_IEC_559 and __GCC_IEC_559_COMPLEX macros values. */
+/* { dg-do preprocess { target i?86-*-linux* x86_64-*-linux* powerpc*-*-linux* } } */
+/* { dg-options "-std=c11" } */
+
+#ifndef __GCC_IEC_559
+# error "__GCC_IEC_559 not defined"
+#endif
+#ifndef __GCC_IEC_559_COMPLEX
+# error "__GCC_IEC_559_COMPLEX not defined"
+#endif
+#if __GCC_IEC_559_COMPLEX > __GCC_IEC_559
+# error "__GCC_IEC_559_COMPLEX > __GCC_IEC_559"
+#endif
+#if __GCC_IEC_559_COMPLEX < 0
+# error "__GCC_IEC_559_COMPLEX < 0"
+#endif
+
+#if __GCC_IEC_559 < 2
+# error "__GCC_IEC_559 < 2"
+#endif
+#if __GCC_IEC_559_COMPLEX < 2
+# error "__GCC_IEC_559_COMPLEX < 2"
+#endif
diff --git a/gcc/testsuite/gcc.dg/init-vec-1.c b/gcc/testsuite/gcc.dg/init-vec-1.c
deleted file mode 100644
index 9921b16a91..0000000000
--- a/gcc/testsuite/gcc.dg/init-vec-1.c
+++ /dev/null
@@ -1,4 +0,0 @@
-/* Don't ICE or emit spurious errors when init a vector with a scalar. */
-/* { dg-do compile } */
-typedef float v2sf __attribute__ ((vector_size (8)));
-v2sf a = 0.0; /* { dg-error "incompatible types" } */
diff --git a/gcc/testsuite/gcc.dg/inline-23.c b/gcc/testsuite/gcc.dg/inline-23.c
index 55bd72a59e..2829ecbf7e 100644
--- a/gcc/testsuite/gcc.dg/inline-23.c
+++ b/gcc/testsuite/gcc.dg/inline-23.c
@@ -3,16 +3,19 @@
/* Make sure we can inline a varargs function whose variable arguments
are not used. See PR32493. */
#include <stddef.h>
+
+typedef __INTPTR_TYPE__ my_intptr_t;
+
static inline __attribute__((always_inline)) void __check_printsym_format(const
char *fmt, ...)
{
}
static inline __attribute__((always_inline)) void print_symbol(const char *fmt,
-ptrdiff_t addr)
+my_intptr_t addr)
{
__check_printsym_format(fmt, "");
}
void do_initcalls(void **call)
{
- print_symbol(": %s()", (ptrdiff_t) *call);
+ print_symbol(": %s()", (my_intptr_t) *call);
}
diff --git a/gcc/testsuite/gcc.dg/inline-35.c b/gcc/testsuite/gcc.dg/inline-35.c
new file mode 100644
index 0000000000..ebbb8df2fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/inline-35.c
@@ -0,0 +1,19 @@
+/* A function definition of an inline function following a static
+ declaration does not make an inline definition in C99/C11 terms.
+ PR 57574. */
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+static int n;
+
+static inline int f1 (void);
+inline int f1 (void) { return n; }
+
+static int f2 (void);
+inline int f2 (void) { return n; }
+
+static inline int f3 (void);
+int f3 (void) { return n; }
+
+static int f4 (void);
+int f4 (void) { return n; }
diff --git a/gcc/testsuite/gcc.dg/inline_3.c b/gcc/testsuite/gcc.dg/inline_3.c
index 17871c6e6d..773c301a41 100644
--- a/gcc/testsuite/gcc.dg/inline_3.c
+++ b/gcc/testsuite/gcc.dg/inline_3.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo,foo2 -fdisable-ipa-inline -Wno-attributes" } */
int g;
__attribute__((always_inline)) void bar (void)
@@ -20,4 +20,3 @@ int foo2 (void)
/* { dg-final { scan-tree-dump-times "bar" 5 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
-/* { dg-excess-errors "extra notes" } */
diff --git a/gcc/testsuite/gcc.dg/inline_4.c b/gcc/testsuite/gcc.dg/inline_4.c
index 1feefa1016..dd4fadb488 100644
--- a/gcc/testsuite/gcc.dg/inline_4.c
+++ b/gcc/testsuite/gcc.dg/inline_4.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-optimized -fdisable-tree-einline=foo2 -fdisable-ipa-inline -Wno-attributes" } */
int g;
__attribute__((always_inline)) void bar (void)
@@ -20,4 +20,3 @@ int foo2 (void)
/* { dg-final { scan-tree-dump-times "bar" 4 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
-/* { dg-excess-errors "extra notes" } */
diff --git a/gcc/testsuite/gcc.dg/intmax_t-1.c b/gcc/testsuite/gcc.dg/intmax_t-1.c
index 2f21c63f02..00b503c250 100644
--- a/gcc/testsuite/gcc.dg/intmax_t-1.c
+++ b/gcc/testsuite/gcc.dg/intmax_t-1.c
@@ -1,7 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-Wall" } */
/* { dg-error "" "" { target { { *arm*-*-*elf* xtensa*-*-elf* } || vxworks_kernel } } 0 } */
-/* { dg-skip-if "No *intmax_t in <inttypes.h>" { alpha*-dec-osf* } } */
/* Compile with -Wall to get a warning if built-in and system intmax_t don't
match. */
diff --git a/gcc/testsuite/gcc.dg/invalid-call-1.c b/gcc/testsuite/gcc.dg/invalid-call-1.c
index 31f66b9266..7a2f6a07bb 100644
--- a/gcc/testsuite/gcc.dg/invalid-call-1.c
+++ b/gcc/testsuite/gcc.dg/invalid-call-1.c
@@ -14,5 +14,4 @@ void foo()
{
cptr = mar(6);
((char *(*)(void *,int (*)(void *,unsigned char **),char**))((fp)bar))(0,0,(void*)(0)); /* { dg-warning "function called through a non-compatible type" "non-compatible type" } */
- /* { dg-message "note: if this code is reached, the program will abort" "" { target *-*-* } 16 } */
}
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-1.c b/gcc/testsuite/gcc.dg/ipa/iinline-1.c
index 617c484994..860b3e5720 100644
--- a/gcc/testsuite/gcc.dg/ipa/iinline-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-1.c
@@ -1,7 +1,7 @@
/* Verify that simple indirect calls are inlined even without early
inlining.. */
/* { dg-do compile } */
-/* { dg-options "-O3 -c -fdump-ipa-inline -fno-early-inlining" } */
+/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
extern void non_existent(int);
@@ -22,5 +22,6 @@ int test (void)
return 0;
}
+/* { dg-final { scan-ipa-dump "indirect_call" "inline" } } */
/* { dg-final { scan-ipa-dump "hooray\[^\\n\]*inline copy in test" "inline" } } */
/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-4.c b/gcc/testsuite/gcc.dg/ipa/iinline-4.c
new file mode 100644
index 0000000000..71faae2c97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-4.c
@@ -0,0 +1,221 @@
+/* Verify that simple indirect calls are inlined even without early
+ inlining.. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ unsigned u;
+};
+
+struct U
+{
+ struct U *next;
+ struct S s;
+ short a[8];
+};
+
+extern void non_existent(struct S *p, int);
+
+/* ----- 1 ----- */
+
+static void hooray1 (struct S *p)
+{
+ non_existent (p, 1);
+}
+
+static void hiphip1 (struct S *p)
+{
+ p->f (p);
+}
+
+int test1 (void)
+{
+ struct S s;
+ s.i = 1234;
+ s.f = hooray1;
+ s.u = 1001;
+ hiphip1 (&s);
+ return 0;
+}
+
+/* ----- 2 ----- */
+
+struct S *gp;
+
+static void hooray2 (struct S *p)
+{
+ non_existent (p, 2);
+}
+
+static void hip2 (struct S *p)
+{
+ p->f (p);
+}
+
+static void hiphip2 (struct S *p)
+{
+ hip2 (p);
+}
+
+int test2 (void)
+{
+ struct S *p = gp;
+ p->i = 2341;
+ p->f = hooray2;
+ p->u = 1002;
+ hiphip2 (p);
+ return 0;
+}
+
+/* ----- 3 ----- */
+
+static void hooray3 (struct S *p)
+{
+ non_existent (p, 2);
+}
+
+static void hip3 (struct S *p)
+{
+ p->f (p);
+}
+
+static __attribute__ ((flatten)) void hiphip3 (struct S *p)
+{
+ hip3 (p);
+}
+
+int test3 (void)
+{
+ struct S *p = gp;
+ p->i = 2341;
+ p->f = hooray3;
+ p->u = 1003;
+ hiphip3 (p);
+ return 0;
+}
+
+/* ----- 4 ----- */
+
+static void hooray4 (struct S *p)
+{
+ non_existent (p, 3);
+}
+
+static void hiphip4 (struct S s)
+{
+ s.f (&s);
+}
+
+int test4(void)
+{
+ struct S s;
+ s.i = 3412;
+ s.f = hooray4;
+ s.u = 1004;
+ hiphip4 (s);
+ return 0;
+}
+
+/* ----- 5 ----- */
+
+struct U *gu;
+
+static void hooray5 (struct S *p)
+{
+ non_existent (p, 5);
+}
+
+static void hip5 (struct S *p)
+{
+ p->f (p);
+}
+
+static void hiphip5 (struct U *u)
+{
+ hip5 (&u->s);
+}
+
+int test5 (void)
+{
+ struct U *u = gu;
+ u->next = u;
+ u->s.i = 9876;
+ u->s.f = hooray5;
+ u->s.u = 1005;
+ hiphip5 (u);
+ return 0;
+}
+
+/* ----- 6 ----- */
+
+static void hooray6 (struct S *p)
+{
+ non_existent (p, 6);
+}
+
+static void hip6 (struct S *p)
+{
+ p->f (p);
+}
+
+static __attribute__ ((flatten)) void hiphip6 (struct U *u)
+{
+ hip6 (&u->s);
+}
+
+int test6 (void)
+{
+ struct U *u = gu;
+ u->next = u;
+ u->s.i = 9876;
+ u->s.f = hooray6;
+ u->s.u = 1006;
+ hiphip6 (u);
+ return 0;
+}
+
+/* ----- 7 ----- */
+
+struct S **gdp;
+
+
+static void hooray7 (struct S *p)
+{
+ non_existent (p, 7);
+}
+
+static void hip7 (struct S *p)
+{
+ p->f (p);
+ gdp = &p;
+}
+
+static void hiphip7 (struct S *p)
+{
+ hip7 (p);
+ gdp = &p;
+}
+
+int test7 (void)
+{
+ struct S *p = gp;
+ p->i = 7341;
+ p->f = hooray7;
+ p->u = 1007;
+ hiphip7 (p);
+ return 0;
+}
+
+
+
+/* { dg-final { scan-ipa-dump "hooray1\[^\\n\]*inline copy in test1" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray2\[^\\n\]*inline copy in test2" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray3\[^\\n\]*inline copy in test3" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray4\[^\\n\]*inline copy in test4" "inline" { xfail { { hppa*-*-* } && { ! lp64 } } } } } */
+/* { dg-final { scan-ipa-dump "hooray5\[^\\n\]*inline copy in test5" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray6\[^\\n\]*inline copy in test6" "inline" } } */
+/* { dg-final { scan-ipa-dump "hooray7\[^\\n\]*inline copy in test7" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-5.c b/gcc/testsuite/gcc.dg/ipa/iinline-5.c
new file mode 100644
index 0000000000..8fb47caffc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-5.c
@@ -0,0 +1,124 @@
+/* Verify that simple indirect calls are inlined even without early
+ inlining.. */
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
+
+extern void abort (void);
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ int j,k,l;
+};
+
+struct Z
+{
+ unsigned u;
+ void (*f)(struct Z *, int);
+ struct Z *next;
+};
+
+static struct Z *gz;
+static struct S *gs;
+static int gr = 111;
+char gc[1024];
+
+static __attribute__ ((noinline, noclone)) struct S *
+get_s (void)
+{
+ return (struct S *) &gc;
+}
+
+
+static void wrong_target_1 (struct S *s)
+{
+ abort ();
+}
+
+static void wrong_target_2 (struct S *s)
+{
+ abort ();
+}
+
+static void wrong_target_3 (struct S *s)
+{
+ abort ();
+}
+
+static void good_target (struct Z *z, int i)
+{
+ gr = 0;
+}
+
+static void good_target_3 (struct S *s)
+{
+ gr = 0;
+}
+
+static void g1 (struct S *s)
+{
+ struct Z *z = (struct Z*) s;
+ z->f (z, 8);
+}
+
+static void f1 (struct S *s)
+{
+ gz->f = good_target;
+ g1 (s);
+}
+
+static void g2 (struct Z *z)
+{
+ z->f (z, 8);
+}
+
+static void f2 (struct S *s)
+{
+ gz->f = good_target;
+ g2 ((struct Z*) s);
+}
+
+static void g3 (struct S *s)
+{
+ s->f (s);
+}
+
+static void h3 (struct Z *z)
+{
+ gs->f = good_target_3;
+ g3 ((struct S *) z);
+}
+
+static void f3 (struct S *s)
+{
+ h3 ((struct Z*) s);
+}
+
+int main (int argc, char **argv)
+{
+ struct S *s = get_s();
+ s->i = 5678;
+ s->f = wrong_target_1;
+ s->j = 1234;
+ gz = (struct Z *) s;
+ f1 (s);
+
+ s = get_s();
+ gz = (struct Z *) s;
+ s->i = 9999;
+ s->f = wrong_target_1;
+ f2 (s);
+
+ s = get_s();
+ gs = s;
+ s->i = 9999;
+ s->f = wrong_target_3;
+ f3 (s);
+
+ return gr;
+}
+
+
+/* { dg-final { scan-ipa-dump-not "wrong_target\[^\\n\]*inline copy in" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-6.c b/gcc/testsuite/gcc.dg/ipa/iinline-6.c
new file mode 100644
index 0000000000..5a9b759d88
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-6.c
@@ -0,0 +1,72 @@
+/* Verify that simple indirect calls are inlined even without early
+ inlining.. */
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
+
+extern void abort (void);
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ int j,k,l;
+};
+
+struct Z
+{
+ unsigned u;
+ void (*f)(struct Z *, int);
+ struct Z *next;
+};
+
+static struct S *gs;
+static int gr = 111;
+char gc[1024];
+
+static __attribute__ ((noinline, noclone)) struct S *
+get_s (void)
+{
+ return (struct S *) &gc;
+}
+
+static void wrong_target (struct S *s)
+{
+ abort ();
+}
+
+static void good_target (struct S *s)
+{
+ gr = 0;
+}
+
+static void g1 (struct S *s)
+{
+ s->f (s);
+}
+
+static void f2 (struct Z *z)
+{
+ gs->f = good_target;
+ g1 ((struct S *) z);
+}
+
+static inline __attribute__ ((flatten)) void f1 (struct S *s)
+{
+ f2 ((struct Z *) s);
+}
+
+int main (int argc, char **argv)
+{
+ struct S *s = get_s();
+ s->i = 5678;
+ s->f = wrong_target;
+ s->j = 1234;
+ gs = s;
+ f1 (s);
+
+ return gr;
+}
+
+
+/* { dg-final { scan-ipa-dump-not "wrong_target\[^\\n\]*inline copy in" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/iinline-7.c b/gcc/testsuite/gcc.dg/ipa/iinline-7.c
new file mode 100644
index 0000000000..c95d374d24
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/iinline-7.c
@@ -0,0 +1,157 @@
+/* Verify that simple indirect calls are inlined even without early
+ inlining.. */
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-ipa-inline -fno-early-inlining" } */
+
+extern void abort (void);
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ int j,k,l;
+};
+
+struct U
+{
+ struct U *next;
+ struct S s;
+ short a[8];
+};
+
+struct Z
+{
+ unsigned u;
+ void (*f)(struct Z *, int);
+ struct Z *next;
+};
+
+static struct Z *gz;
+static struct U *gu;
+static int gr = 111;
+char gc[1024];
+
+static __attribute__ ((noinline, noclone)) struct U *
+get_u (void)
+{
+ return (struct U *) &gc;
+}
+
+static void wrong_target_1 (struct S *s)
+{
+ abort ();
+}
+
+static void wrong_target_2 (struct S *s)
+{
+ abort ();
+}
+
+static void wrong_target_3 (struct S *s)
+{
+ abort ();
+}
+
+static void wrong_target_4 (struct S *s)
+{
+ abort ();
+}
+
+static void good_target (struct Z *z, int i)
+{
+ gr = 0;
+}
+
+static void good_target_4 (struct S *s)
+{
+ gr = 0;
+}
+
+static void g1 (struct S *s)
+{
+ struct Z *z = (struct Z*) s;
+ z->f (z, 8);
+}
+
+static void f1 (struct U *u)
+{
+ gz->f = good_target;
+ g1 (&u->s);
+}
+
+static void g2 (struct Z *z)
+{
+ z->f (z, 8);
+}
+
+static void f2 (struct U *u)
+{
+ gz->f = good_target;
+ g2 ((struct Z*) &u->s);
+}
+
+static void h3 (struct Z *z)
+{
+ z->f (z, 8);
+}
+
+static void g3 (struct S *s)
+{
+ h3 ((struct Z*) s);
+}
+
+static void f3 (struct U *u)
+{
+ gz->f = good_target;
+ g3 (&u->s);
+}
+
+static void h4 (struct S *s)
+{
+ s->f (s);
+}
+
+static void g4 (struct U *u)
+{
+ h4 (&u->s);
+}
+
+static inline __attribute__ ((flatten)) void f4 (struct Z *z)
+{
+ gu->s.f = good_target_4;
+ g4 ((struct U *) z);
+}
+
+int main (int argc, char **argv)
+{
+ struct U *u = get_u ();
+ u->next = u;
+ u->s.i = 5678;
+ u->s.f = wrong_target_1;
+ u->s.j = 1234;
+ gz = (struct Z *) &u->s;
+ f1 (u);
+
+ u = get_u();
+ u->s.i = 9999;
+ u->s.f = wrong_target_2;
+ gz = (struct Z *) &u->s;
+ f2 (u);
+
+ u = get_u();
+ u->s.i = 9998;
+ u->s.f = wrong_target_3;
+ gz = (struct Z *) &u->s;
+ f3 (u);
+
+ u = get_u();
+ u->s.i = 9998;
+ u->s.f = wrong_target_4;
+ gu = u;
+ f4 ((struct Z *) u);
+ return gr;
+}
+
+
+/* { dg-final { scan-ipa-dump-not "wrong_target\[^\\n\]*inline copy in" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/inline-6.c b/gcc/testsuite/gcc.dg/ipa/inline-6.c
new file mode 100644
index 0000000000..d981bb0064
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inline-6.c
@@ -0,0 +1,42 @@
+/* Check statements that are eliminated by inlining. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-inline-details -fno-early-inlining -fno-partial-inlining -fno-ipa-cp" } */
+static t(int a)
+{
+ if (a==1)
+ {
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo(); foo();
+ }
+ else if (a==2)
+ {
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar(); bar();
+ }
+ else
+ {
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr(); bagr();
+ }
+}
+main()
+{
+ t(1);
+ t(2);
+}
+/* Even if function is huge, inlining it will save code. */
+/* { dg-final { scan-ipa-dump-times "Inlined into" 2 "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c
new file mode 100644
index 0000000000..9810e25c19
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-1.c
@@ -0,0 +1,16 @@
+/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
+test (int a)
+{
+ int i;
+ for (i=0; i<a; i++)
+{
+ test2(a);
+ test2(a);
+}
+}
+m()
+{
+ test (10);
+}
+/* { dg-final { scan-ipa-dump "loop_iterations" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c
new file mode 100644
index 0000000000..a06d725562
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-2.c
@@ -0,0 +1,13 @@
+/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
+t(int s, void **p)
+{
+ int i;
+ for (i;i<10000;i+=s)
+ p[i]=0;
+}
+m(void **p)
+{
+ t (10, p);
+}
+/* { dg-final { scan-ipa-dump "loop_stride" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c b/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c
new file mode 100644
index 0000000000..110ae443c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/inlinehint-3.c
@@ -0,0 +1,37 @@
+/* { dg-options "-O3 -c -fdump-ipa-inline-details -fno-early-inlining -fno-ipa-cp" } */
+void abort (void);
+int sum;
+int a[10];
+int
+scc_next (int c)
+{
+ int i;
+ for (i=0;i<c;i++)
+ a[i]=c;
+ scc_entry (c);
+}
+int
+scc_entry (int c)
+{
+ int i;
+ for (i=0;i<c;i++)
+ sum+=a[i];
+ if (c--)
+ scc_next (c);
+ return sum;
+}
+main()
+{
+ int sum;
+ int i;
+ for (i=0;i<10;i++)
+ scc_entry (i);
+ if (sum < 0)
+ abort ();
+ return 0;
+}
+/* { dg-final { scan-ipa-dump "in_scc" "inline" } } */
+/* { dg-final { scan-ipa-dump "same_scc" "inline" } } */
+/* Main is not in scc, the two functions are. */
+/* { dg-final { scan-ipa-dump-times "In SCC" 2 "inline" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-1.c b/gcc/testsuite/gcc.dg/ipa/ipa-1.c
index 3517b035f1..3cc32da1c9 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-1.c
@@ -25,7 +25,7 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-2.c
index 122a4a0181..7f14d42a03 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-2.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-2.c
@@ -23,5 +23,5 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-3.c
index e15f084b40..36fd506789 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-3.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-3.c
@@ -29,8 +29,8 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { scan-ipa-dump "Creating a specialized node of g" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param b with const 7" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param c with const 3" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 b with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .1 c with const 3" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-4.c b/gcc/testsuite/gcc.dg/ipa/ipa-4.c
index 88716dd8f4..566b329713 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-4.c
@@ -26,5 +26,5 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump-times "replacing param a with const 7" 1 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "replacing param .0 a with const 7" 1 "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-5.c b/gcc/testsuite/gcc.dg/ipa/ipa-5.c
index 22d1be89c0..daa64fada6 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-5.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-5.c
@@ -5,7 +5,7 @@
/* Float & short constants. */
#include <stdio.h>
-void t(void);
+int t(void);
int g (float b, short c)
{
t();
@@ -13,10 +13,11 @@ int g (float b, short c)
}
int f (float a)
{
- t();
+ int i, j = t();
/* a is modified. */
if (a++ > 0)
- g (a, 3);
+ for (i = 0; i < j; i++)
+ g (a, 3);
}
int main ()
{
@@ -26,7 +27,7 @@ int main ()
return 0;
}
-/* { dg-final { scan-ipa-dump-times "Creating a specialized node" 2 "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param c with const 3" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node" 3 "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .1 c with const 3" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-7.c
index c8b510046a..271a34a3d6 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-7.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-7.c
@@ -27,7 +27,7 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump-times "replacing param . with const 7" 1 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "replacing param .. . with const 7" 1 "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-8.c
index dcbed13a0e..d138cf2633 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-8.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-8.c
@@ -23,9 +23,9 @@ int main ()
/* { dg-final { scan-ipa-dump "Creating a specialized node of f" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { scan-ipa-dump "Creating a specialized node of g" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param b with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 b with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
index e8abc3244a..b62b08ff03 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-14.c
@@ -21,8 +21,8 @@ int main()
void *p;
a.p = (void *)&c;
p = foo(&a, &a);
- /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* c\[^ \]* }" "pta" { xfail *-*-* } } } */
- /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* a\[^ \]* c\[^ \]* }" "pta" } } */
+ /* { dg-final { scan-ipa-dump "foo.result = { NULL a\[^ \]* c\[^ \]* }" "pta" { target { ! keeps_null_pointer_checks } } } } */
+ /* { dg-final { scan-ipa-dump "foo.result = { NONLOCAL a\[^ \]* c\[^ \]* }" "pta" { target { keeps_null_pointer_checks } } } } */
((struct X *)p)->p = (void *)0;
if (a.p != (void *)0)
abort ();
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-3.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-3.c
index ce9393cb07..47900809b9 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-pta-3.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-3.c
@@ -23,6 +23,6 @@ int main()
/* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
/* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
-/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre2" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*p_2\\\(D\\\) with 1" "fre2" } } */
/* { dg-final { cleanup-tree-dump "fre2" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-pta-4.c b/gcc/testsuite/gcc.dg/ipa/ipa-pta-4.c
index 32e1e4fbc4..bf6fa281d5 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-pta-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-pta-4.c
@@ -28,6 +28,6 @@ int main()
/* { dg-final { scan-ipa-dump "foo.arg0 = &a" "pta" } } */
/* { dg-final { scan-ipa-dump "foo.arg1 = &b" "pta" } } */
-/* { dg-final { scan-tree-dump "Replaced \\\*p_1\\\(D\\\) with 1" "fre2" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*p_2\\\(D\\\) with 1" "fre2" } } */
/* { dg-final { cleanup-tree-dump "fre2" } } */
/* { dg-final { cleanup-ipa-dump "pta" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c
index c6b4d63aa7..3437a81aa2 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-2.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fipa-sra -fdump-tree-eipa_sra-details" } */
-/* { dg-require-effective-target non_strict_align } */
struct bovid
{
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-7.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-7.c
new file mode 100644
index 0000000000..921334a4fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-7.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+typedef unsigned int myint __attribute__((aligned(1)));
+
+typedef struct __attribute__((packed)) S {
+ unsigned a, b, c;
+} SS;
+
+typedef SS __attribute__((aligned(1))) SSS;
+
+
+static unsigned int __attribute__ ((noinline))
+get_a (SSS *p)
+{
+ return p->a;
+};
+
+static int __attribute__ ((noinline, noclone))
+foo (SS *p)
+{
+ int r = (int) get_a(p) + 2;
+ return r;
+}
+
+char buf[512];
+
+static SSS * __attribute__ ((noinline, noclone))
+get_sss (void)
+{
+ return (SSS *)(buf + 1);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ SSS *p = get_sss();
+ if (foo(p) != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c
new file mode 100644
index 0000000000..9e6e40ac54
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-8.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+typedef unsigned int myint __attribute__((aligned(1)));
+
+typedef struct S {
+ unsigned a, b, c;
+} SS;
+
+typedef SS __attribute__((aligned(1))) SSS;
+
+
+static unsigned int __attribute__ ((noinline))
+get_a (SS s)
+{
+ return s.a;
+};
+
+static int __attribute__ ((noinline, noclone))
+foo (SSS *p)
+{
+ int r = (int) get_a(*p) + 2;
+ return r;
+}
+
+char buf[512];
+
+static SSS * __attribute__ ((noinline, noclone))
+get_sss (void)
+{
+ return (SSS *)(buf + 1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ SSS *p = get_sss();
+ if (foo(p) != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c b/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c
new file mode 100644
index 0000000000..c5468cfbb7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipa-sra-9.c
@@ -0,0 +1,44 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+typedef unsigned int myint __attribute__((aligned(1)));
+
+typedef struct S {
+ unsigned a, b, c;
+} SS;
+
+typedef struct U {
+ SS s[2];
+} UU;
+
+typedef UU __attribute__((aligned(1))) UUU;
+
+static unsigned int __attribute__ ((noinline))
+get_a (SS s)
+{
+ return s.a;
+};
+
+static int __attribute__ ((noinline, noclone))
+foo (UUU *p)
+{
+ int r = (int) get_a(p->s[0]) + 2;
+ return r;
+}
+
+char buf[512];
+
+static UUU * __attribute__ ((noinline, noclone))
+get_uuu (void)
+{
+ return (UUU *)(buf + 1);
+}
+
+int
+main(int argc, char *argv[])
+{
+ UUU *p = get_uuu();
+ if (foo(p) != 2)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/ipa.exp b/gcc/testsuite/gcc.dg/ipa/ipa.exp
index 1bbfee7cf2..3c3c600aef 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipa.exp
+++ b/gcc/testsuite/gcc.dg/ipa/ipa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-1.c b/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
index 0f50ff9276..a2ffd42020 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-1.c
@@ -46,7 +46,7 @@ main (int argc, char *argv[])
/* { dg-final { scan-ipa-dump "Creating a specialized node of f.*for all known contexts" "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 7" "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 7" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-2.c b/gcc/testsuite/gcc.dg/ipa/ipcp-2.c
index c6dcdf0af5..62f564f216 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipcp-2.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-2.c
@@ -94,6 +94,6 @@ top2 (int q)
}
/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo" 1 "cp" } } */
-/* { dg-final { scan-ipa-dump-times "replacing param p with const 0" 3 "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param s with const 4" "cp" } } */
+/* { dg-final { scan-ipa-dump-times "replacing param .. p with const 0" 3 "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 s with const 4" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-4.c b/gcc/testsuite/gcc.dg/ipa/ipcp-4.c
index 59018ca6b1..462cade498 100644
--- a/gcc/testsuite/gcc.dg/ipa/ipcp-4.c
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-4.c
@@ -61,8 +61,8 @@ main (int argc, char *argv[])
/* { dg-final { scan-ipa-dump "Creating a specialized node of g1.*for all known contexts" "cp" } } */
/* { dg-final { scan-ipa-dump "Creating a specialized node of g2.*for all known contexts" "cp" } } */
/* { dg-final { scan-ipa-dump-not "Creating a specialized node of h.*for all known contexts" "cp" } } */
-/* { dg-final { scan-ipa-dump-times "replacing param a with const 7" 2 "cp" } } */
-/* { dg-final { scan-ipa-dump "replacing param a with const 11" "cp" } } */
+/* { dg-final { scan-ipa-dump-times "replacing param .0 a with const 7" 2 "cp" } } */
+/* { dg-final { scan-ipa-dump "replacing param .0 a with const 11" "cp" } } */
/* { dg-final { cleanup-ipa-dump "cp" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-1.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-1.c
new file mode 100644
index 0000000000..b2e04f8724
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-1.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+void
+entry (void)
+{
+ struct S s;
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+}
+
+/* { dg-final { scan-ipa-dump "Creating a specialized node of foo.*for all known contexts" "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 2 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c
new file mode 100644
index 0000000000..7edfa408a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-2.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+void
+entry (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+ }
+ s.c = 2;
+ foo (&s);
+}
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c
new file mode 100644
index 0000000000..4c0a3e7c54
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-3.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (int z, struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+void
+entry (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ foo (i, &s);
+ }
+ s.c = 2;
+ foo (0, &s);
+}
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 1" 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements: 0" 2 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c
new file mode 100644
index 0000000000..1c1da4d684
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-4.c
@@ -0,0 +1,62 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+
+void
+entry1 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+ }
+ s.c = 2;
+ foo (&s);
+}
+
+void
+entry2 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 6;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+ }
+ s.c = 2;
+ foo (&s);
+}
+
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 4 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-5.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-5.c
new file mode 100644
index 0000000000..9f6ee5beea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-5.c
@@ -0,0 +1,68 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+static void __attribute__ ((noinline))
+bar (struct S *p)
+{
+ foo (p);
+}
+
+void
+entry1 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ bar (&s);
+ }
+ s.c = 2;
+ bar (&s);
+}
+
+void
+entry2 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 6;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+ }
+ s.c = 2;
+ foo (&s);
+}
+
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of bar/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 8 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
new file mode 100644
index 0000000000..050e13bf50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-6.c
@@ -0,0 +1,75 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b;
+ void *v = (void *) p;
+
+ for (i= 0; i< c; i++)
+ v = blah(b + i, v);
+}
+
+static void __attribute__ ((noinline))
+bar (struct S *p)
+{
+ foo (p);
+}
+
+static void __attribute__ ((noinline))
+bar_2 (struct S *p)
+{
+ foo (p);
+}
+
+void
+entry1 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ bar (&s);
+ }
+ s.c = 2;
+ bar (&s);
+}
+
+void
+entry2 (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = 6;
+ s.b = 64;
+ s.c = 32;
+ bar_2 (&s);
+ }
+ s.c = 2;
+ foo (&s);
+}
+
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of foo/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Creating a specialized node of bar/\[0-9\]*\\." 2 "cp" } } */
+/* { dg-final { scan-ipa-dump "Creating a specialized node of bar_2.*for all known contexts" "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Aggregate replacements:" 10 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-7.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-7.c
new file mode 100644
index 0000000000..e85ca1a9d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-7.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-ipa-cp-details -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline)) foo (int x, int z, struct S *p);
+
+static void __attribute__ ((noinline))
+bar (int x, int z, struct S *p)
+{
+ foo (z, x, p);
+}
+
+static void __attribute__ ((noinline))
+foo (int x, int z, struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b - z;
+ void *v = (void *) p;
+
+ if (z)
+ {
+ z--;
+ bar (z, x, p);
+ }
+ for (i = 0; i< c; i++)
+ v = blah(b + x + i, v);
+}
+
+void
+entry (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = c;
+ s.b = 64;
+ s.c = 32;
+ foo (4, i, &s);
+ }
+}
+/* { dg-final { scan-ipa-dump-times "Clone of bar" 1 "cp" } } */
+/* { dg-final { scan-ipa-dump-times "Clone of foo" 1 "cp" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { scan-tree-dump-not "->c;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-8.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-8.c
new file mode 100644
index 0000000000..5014ffd3b7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-8.c
@@ -0,0 +1,52 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-ipa-sra -fdump-tree-optimized-slim" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+void *blah(int, void *);
+
+static void __attribute__ ((noinline)) foo (int x, int z, struct S *p);
+
+static void __attribute__ ((noinline))
+bar (int x, int z, struct S *p)
+{
+ p->b = 0;
+ foo (z, x, p);
+}
+
+static void __attribute__ ((noinline))
+foo (int x, int z, struct S *p)
+{
+ int i, c = p->c;
+ int b = p->b - z;
+ void *v = (void *) p;
+
+ if (z)
+ {
+ z--;
+ bar (z, x, p);
+ }
+ for (i = 0; i< c; i++)
+ v = blah(b + x + i, v);
+}
+
+void
+entry (int c)
+{
+ struct S s;
+ int i;
+
+ for (i = 0; i<c; i++)
+ {
+ s.a = c;
+ s.b = 64;
+ s.c = 32;
+ foo (4, i, &s);
+ }
+}
+/* { dg-final { scan-tree-dump "->b;" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/ipcp-agg-9.c b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-9.c
new file mode 100644
index 0000000000..e6b4b965fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/ipcp-agg-9.c
@@ -0,0 +1,45 @@
+/* Verify that IPA-CP can make edges direct based on aggregate contents. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fdump-ipa-cp -fdump-ipa-inline" } */
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ unsigned u;
+};
+
+struct U
+{
+ struct U *next;
+ struct S s;
+ short a[8];
+};
+
+extern void non_existent(struct S *p, int);
+
+static void hooray1 (struct S *p)
+{
+ non_existent (p, 1);
+}
+
+static __attribute__ ((noinline))
+void hiphip1 (struct S *p)
+{
+ p->f (p);
+}
+
+int test1 (void)
+{
+ struct S s;
+ s.i = 1234;
+ s.f = hooray1;
+ s.u = 1001;
+ hiphip1 (&s);
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "ipa-prop: Discovered an indirect call to a known target" "cp" } } */
+/* { dg-final { scan-ipa-dump "hooray1\[^\\n\]*inline copy in hiphip1" "inline" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/pr55260.c b/gcc/testsuite/gcc.dg/ipa/pr55260.c
new file mode 100644
index 0000000000..ef151b0a20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr55260.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-inline -fipa-cp-clone" } */
+
+typedef struct {
+ int *ptr;
+ int len;
+} string;
+typedef struct {
+ string nantstr;
+ int *nant;
+} malv;
+typedef struct {
+ int *nor;
+} list_heads;
+int b;
+list_heads *fn1(string, int *, unsigned);
+void fn2(malv *p1, list_heads *p2, unsigned p3) {
+ string a = p1->nantstr;
+ fn1(a, p1->nant, p3);
+}
+
+void fn3(unsigned p1) { fn2(0, 0, p1); }
+
+list_heads *fn1(string p1, int *p2, unsigned p3) {
+ while (1) {
+ if (p3)
+ fn3(1);
+ if (b)
+ return 0;
+ fn3(1);
+ }
+}
+
+void fn5() {
+ list_heads c;
+ c.nor = 0;
+ fn2(0, &c, 1);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr56988.c b/gcc/testsuite/gcc.dg/ipa/pr56988.c
new file mode 100644
index 0000000000..ab20159b8e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr56988.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-add-options bind_pic_locally } */
+
+struct S
+{
+ int a, b, c;
+};
+
+volatile int g;
+
+static void __attribute__ ((noinline, noclone))
+bar (struct S **p)
+{
+ g = 5;
+};
+
+static void __attribute__ ((noinline))
+foo (struct S *p)
+{
+ int i = p->a;
+ if (i != 1)
+ __builtin_abort ();
+ bar (&p);
+}
+
+int
+main (int argc, char *argv[])
+{
+ struct S s;
+ s.a = 1;
+ s.b = 64;
+ s.c = 32;
+ foo (&s);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/ipa/pr57294.c b/gcc/testsuite/gcc.dg/ipa/pr57294.c
new file mode 100644
index 0000000000..0871f3f418
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr57294.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+void baz (void);
+int func ();
+
+static void
+bar (int a, int foo (void))
+{
+ baz ();
+ foo ();
+}
+
+void
+baz (void)
+{
+ bar (0, func);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr57347.c b/gcc/testsuite/gcc.dg/ipa/pr57347.c
new file mode 100644
index 0000000000..731b4868ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr57347.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+struct S1 { int f0; int f1 : 10; int f2 : 13; };
+int i;
+int *j = &i;
+
+static void
+foo (struct S1 s)
+{
+ int *p;
+ int l[88];
+ int **pp = &p;
+ *pp = &l[1];
+ l[0] = 1;
+ *j = 1 && s.f2;
+}
+
+int
+main ()
+{
+ struct S1 s = { 0, 0, 1 };
+ foo (s);
+ if (i != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr57358.c b/gcc/testsuite/gcc.dg/ipa/pr57358.c
new file mode 100644
index 0000000000..c83396f4c0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr57358.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct t { void (*func)(void*); };
+void test_func(struct t* a) __attribute__((optimize("O0")));
+void test_func(struct t* a)
+{
+ a->func(0);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr57539.c b/gcc/testsuite/gcc.dg/ipa/pr57539.c
new file mode 100644
index 0000000000..e02018eb87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr57539.c
@@ -0,0 +1,218 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef long unsigned int size_t;
+typedef struct
+{
+}
+box;
+typedef struct
+{
+}
+textpara_t;
+typedef struct _dtlink_s Dtlink_t;
+typedef struct _dtdisc_s Dtdisc_t;
+typedef struct _dtmethod_s Dtmethod_t;
+typedef struct _dt_s Dt_t;
+typedef void *(*Dtmemory_f) (Dt_t *, void *, size_t, Dtdisc_t *);
+typedef void *(*Dtsearch_f) (Dt_t *, void *, int);
+typedef void *(*Dtmake_f) (Dt_t *, void *, Dtdisc_t *);
+typedef void (*Dtfree_f) (Dt_t *, void *, Dtdisc_t *);
+typedef int (*Dtcompar_f) (Dt_t *, void *, void *, Dtdisc_t *);
+typedef unsigned int (*Dthash_f) (Dt_t *, void *, Dtdisc_t *);
+typedef int (*Dtevent_f) (Dt_t *, int, void *, Dtdisc_t *);
+struct _dtlink_s
+{
+ Dtlink_t *right;
+};
+struct _dtdisc_s
+{
+ int key;
+ int size;
+ int link;
+ Dtmake_f makef;
+ Dtfree_f freef;
+ Dtcompar_f comparf;
+ Dthash_f hashf;
+ Dtmemory_f memoryf;
+ Dtevent_f eventf;
+};
+struct _dt_s
+{
+ Dtsearch_f searchf;
+};
+extern Dtmethod_t *Dtobag;
+extern Dt_t *dtopen (Dtdisc_t *, Dtmethod_t *);
+extern Dtlink_t *dtflatten (Dt_t *);
+typedef struct Agobj_s Agobj_t;
+typedef struct Agraph_s Agraph_t;
+typedef struct Agnode_s Agnode_t;
+typedef struct Agedge_s Agedge_t;
+typedef struct Agdesc_s Agdesc_t;
+typedef struct Agdisc_s Agdisc_t;
+typedef struct Agrec_s Agrec_t;
+struct Agobj_s
+{
+ Agrec_t *data;
+};
+struct Agdesc_s
+{
+};
+extern Agraph_t *agopen (char *name, Agdesc_t desc, Agdisc_t * disc);
+extern Agnode_t *agfstnode (Agraph_t * g);
+extern Agnode_t *agnxtnode (Agraph_t * g, Agnode_t * n);
+extern Agedge_t *agedge (Agraph_t * g, Agnode_t * t, Agnode_t * h, char *name,
+ int createflag);
+extern Agedge_t *agfstout (Agraph_t * g, Agnode_t * n);
+extern Agedge_t *agnxtout (Agraph_t * g, Agedge_t * e);
+extern Agdesc_t Agdirected, Agstrictdirected, Agundirected,
+ Agstrictundirected;
+typedef struct Agraph_s graph_t;
+typedef struct Agnode_s node_t;
+typedef struct Agedge_s edge_t;
+typedef union inside_t
+{
+ unsigned short minlen;
+}
+Agedgeinfo_t;
+extern void *gmalloc (size_t);
+typedef enum
+{ AM_NONE, AM_VOR, AM_SCALE, AM_NSCALE, AM_SCALEXY, AM_PUSH, AM_PUSHPULL,
+ AM_ORTHO, AM_ORTHO_YX, AM_ORTHOXY, AM_ORTHOYX, AM_PORTHO, AM_PORTHO_YX,
+ AM_PORTHOXY, AM_PORTHOYX, AM_COMPRESS, AM_VPSC, AM_IPSEP, AM_PRISM }
+adjust_mode;
+typedef struct nitem
+{
+ Dtlink_t link;
+ int val;
+ node_t *cnode;
+ box bb;
+}
+nitem;
+typedef int (*distfn) (box *, box *);
+typedef int (*intersectfn) (nitem *, nitem *);
+static int
+cmpitem (Dt_t * d, int *p1, int *p2, Dtdisc_t * disc)
+{
+}
+static Dtdisc_t constr =
+ { __builtin_offsetof (nitem, val), sizeof (int), __builtin_offsetof (nitem,
+ link),
+((Dtmake_f) 0), ((Dtfree_f) 0), (Dtcompar_f) cmpitem, ((Dthash_f) 0), ((Dtmemory_f) 0),
+((Dtevent_f) 0) };
+static int
+distX (box * b1, box * b2)
+{
+}
+
+static int
+intersectY0 (nitem * p, nitem * q)
+{
+}
+
+static int
+intersectY (nitem * p, nitem * q)
+{
+}
+
+static void
+mapGraphs (graph_t * g, graph_t * cg, distfn dist)
+{
+ node_t *n;
+ edge_t *e;
+ edge_t *ce;
+ node_t *t;
+ node_t *h;
+ nitem *tp;
+ nitem *hp;
+ int delta;
+ for (n = agfstnode (g); n; n = agnxtnode (g, n))
+ {
+ for (e = agfstout (g, n); e; e = agnxtout (g, e))
+ {
+ delta = dist (&tp->bb, &hp->bb);
+ ce = agedge (cg, t, h, ((void *) 0), 1);
+ if ((((Agedgeinfo_t *) (((Agobj_t *) (ce))->data))->minlen) < delta)
+ {
+ if ((((Agedgeinfo_t *) (((Agobj_t *) (ce))->data))->minlen) ==
+ 0.0)
+ {
+ }
+ }
+ }
+ }
+}
+
+static graph_t *
+mkNConstraintG (graph_t * g, Dt_t * list, intersectfn intersect, distfn dist)
+{
+ nitem *p;
+ nitem *nxp;
+ edge_t *e;
+ graph_t *cg = agopen ("cg", Agstrictdirected, ((Agdisc_t *) 0));
+ for (p = (nitem *) dtflatten (list); p;
+ p = (nitem *) (((Dtlink_t *) ((Dtlink_t *) p))->right))
+ {
+ for (nxp = (nitem *) (((Dtlink_t *) ((Dtlink_t *) p))->right); nxp;
+ nxp = (nitem *) (((Dtlink_t *) ((Dtlink_t *) nxp))->right))
+ {
+ if (intersect (p, nxp))
+ {
+ e = agedge (cg, p->cnode, nxp->cnode, ((void *) 0), 1);
+ }
+ }} for (p = (nitem *) dtflatten (list); p;
+ p = (nitem *) (((Dtlink_t *) ((Dtlink_t *) p))->right))
+ {
+ }
+}
+
+static graph_t *
+mkConstraintG (graph_t * g, Dt_t * list, intersectfn intersect, distfn dist)
+{
+ graph_t *vg;
+ graph_t *cg = agopen ("cg", Agstrictdirected, ((Agdisc_t *) 0));
+ mapGraphs (vg, cg, dist);
+}
+
+static void
+constrainX (graph_t * g, nitem * nlist, int nnodes, intersectfn ifn,
+ int ortho)
+{
+ Dt_t *list = dtopen (&constr, Dtobag);
+ nitem *p = nlist;
+ graph_t *cg;
+ int i;
+ for (i = 0; i < nnodes; i++)
+ {
+ (*(((Dt_t *) (list))->searchf)) ((list), (void *) (p), 0000001);
+ p++;
+ } if (ortho)
+ cg = mkConstraintG (g, list, ifn, distX);
+ else
+ cg = mkNConstraintG (g, list, ifn, distX);
+}
+
+int
+cAdjust (graph_t * g, int mode)
+{
+ int ret, i, nnodes = agnnodes (g);
+ nitem *nlist = (nitem *) gmalloc ((nnodes) * sizeof (nitem));
+ node_t *n;
+ for (n = agfstnode (g); n; n = agnxtnode (g, n))
+ {
+ }
+ if (overlaps (nlist, nnodes))
+ {
+ switch ((adjust_mode) mode)
+ {
+ case AM_ORTHOXY:
+ constrainX (g, nlist, nnodes, intersectY, 1);
+ case AM_ORTHO:
+ constrainX (g, nlist, nnodes, intersectY0, 1);
+ constrainX (g, nlist, nnodes, intersectY, 1);
+ case AM_PORTHO:
+ default:
+ constrainX (g, nlist, nnodes, intersectY0, 0);
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr58106.c b/gcc/testsuite/gcc.dg/ipa/pr58106.c
new file mode 100644
index 0000000000..b83353c4e9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr58106.c
@@ -0,0 +1,50 @@
+/* PR 58106 testcase. Verify that rdesc chain creating and lookup works with
+ recursive inlining and master clone creation. */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef struct rtx_def *rtx;
+enum rtx_code {
+ LAST_AND_UNUSED_RTX_CODE};
+extern const char * const rtx_format[((int) LAST_AND_UNUSED_RTX_CODE)];
+struct rtx_def {
+ enum rtx_code code;
+};
+typedef int (*rtx_function) (rtx *, void *);
+extern int for_each_rtx (rtx *, rtx_function, void *);
+int
+replace_label (rtx *x, void *data)
+{
+ rtx l = *x;
+ if (l == (rtx) 0)
+ {
+ {
+ rtx new_c, new_l;
+ for_each_rtx (&new_c, replace_label, data);
+ }
+ }
+}
+static int
+for_each_rtx_1 (rtx exp, int n, rtx_function f, void *data)
+{
+ int result, i, j;
+ const char *format = (rtx_format[(int) (((enum rtx_code) (exp)->code))]);
+ rtx *x;
+ for (; format[n] != '\0'; n++)
+ {
+ switch (format[n])
+ {
+ case 'e':
+ result = (*f) (x, data);
+ {
+ result = for_each_rtx_1 (*x, i, f, data);
+ }
+ }
+ }
+}
+int
+for_each_rtx (rtx *x, rtx_function f, void *data)
+{
+ int i;
+ return for_each_rtx_1 (*x, i, f, data);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr58492.c b/gcc/testsuite/gcc.dg/ipa/pr58492.c
new file mode 100644
index 0000000000..79958d5640
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr58492.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fipa-pta" } */
+
+void f(int p, short q)
+{
+ f(0, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr59008.c b/gcc/testsuite/gcc.dg/ipa/pr59008.c
new file mode 100644
index 0000000000..b729672430
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr59008.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef int (*funct)(int, int, int);
+
+extern int f(int, int, int);
+extern int g(int, int, int);
+extern int h(int, funct, funct);
+
+static int baz(int x, int y, int z)
+{
+ return x + y + z;
+}
+
+static int bar(int n, funct f1, funct f2)
+{
+ return h(n, f1, f2) + f1(0, 1, 2);
+}
+
+static int foo(int n, funct f1, funct f2)
+{
+ return bar(n, f1, f2) + f2(0, 1, 2);
+}
+
+int main(void)
+{
+ return foo(0, f, g)
+#ifndef ICE2
+ + foo(0, baz, g)
+#endif
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr59610.c b/gcc/testsuite/gcc.dg/ipa/pr59610.c
new file mode 100644
index 0000000000..fc0933441e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr59610.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct A { int a; };
+extern void *y;
+
+__attribute__((optimize (0))) void
+foo (void *p, struct A x)
+{
+ foo (y, x);
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pr61986.c b/gcc/testsuite/gcc.dg/ipa/pr61986.c
new file mode 100644
index 0000000000..8d2f658b87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/pr61986.c
@@ -0,0 +1,48 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, b, c;
+
+struct S
+{
+ int f0;
+ int f1;
+} d;
+
+static int fn2 (struct S);
+void fn3 (struct S);
+
+void
+fn1 (struct S p)
+{
+ struct S h = { 0, 0 };
+ fn3 (p);
+ fn2 (h);
+}
+
+int
+fn2 (struct S p)
+{
+ struct S j = { 0, 0 };
+ fn3 (p);
+ fn2 (j);
+ return 0;
+}
+
+void
+fn3 (struct S p)
+{
+ for (; b; a++)
+ c = p.f0;
+ fn1 (d);
+}
+
+void
+fn4 ()
+{
+ for (;;)
+ {
+ struct S f = { 0, 0 };
+ fn1 (f);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/ipa/pure-const-1.c b/gcc/testsuite/gcc.dg/ipa/pure-const-1.c
index 51837ea9ba..f76dd87d4d 100644
--- a/gcc/testsuite/gcc.dg/ipa/pure-const-1.c
+++ b/gcc/testsuite/gcc.dg/ipa/pure-const-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
/* { dg-options "-O3 -fdump-tree-local-pure-const1 -fdump-ipa-pure-const -fdump-tree-optimized -fno-early-inlining" } */
void abort (void);
int error_code;
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-0.c b/gcc/testsuite/gcc.dg/ipa/remref-0.c
new file mode 100644
index 0000000000..a9e434a86d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/remref-0.c
@@ -0,0 +1,30 @@
+/* Verify that indirect inlining machinery can remove references to functions
+ passed as parameters that are never used. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-sra -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized" } */
+
+extern int __attribute__ ((noinline, noclone, used))
+stuff (int i)
+{
+ return 0;
+}
+
+static void hooray ()
+{
+ stuff (1);
+}
+
+static int hiphip (void (*f)())
+{
+ return stuff (2);
+}
+
+int main (void)
+{
+ return hiphip (hooray);
+}
+
+/* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
+/* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-1a.c b/gcc/testsuite/gcc.dg/ipa/remref-1a.c
new file mode 100644
index 0000000000..9db2bd6192
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/remref-1a.c
@@ -0,0 +1,34 @@
+/* Verify that indirect inlining can also remove references of the functions it
+ discovers calls for. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized" } */
+
+int global;
+
+void __attribute__ ((noinline, noclone, used))
+stuff (int i)
+{
+ global = i;
+}
+
+static void hooray ()
+{
+ stuff (1);
+}
+
+static void hiphip (void (*f)())
+{
+ stuff (2);
+ f ();
+}
+
+int main (void)
+{
+ hiphip (hooray);
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
+/* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-1b.c b/gcc/testsuite/gcc.dg/ipa/remref-1b.c
new file mode 100644
index 0000000000..a17cf4828a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/remref-1b.c
@@ -0,0 +1,37 @@
+/* Verify that indirect inlining can also remove references of the functions it
+ discovers calls for, even when nodes being inlined are virtual IPA-CP
+ clones. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fdump-ipa-cp-details -fdump-ipa-inline -fdump-tree-optimized" } */
+
+int global;
+
+void __attribute__ ((noinline, noclone, used))
+stuff (int i)
+{
+ global = i;
+}
+
+static void hooray ()
+{
+ stuff (1);
+}
+
+static void hiphip (void (*f)())
+{
+ stuff (2);
+ f ();
+}
+
+int main (void)
+{
+ hiphip (hooray);
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump "removing its cloning-created reference" "cp" } } */
+/* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
+/* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-2a.c b/gcc/testsuite/gcc.dg/ipa/remref-2a.c
new file mode 100644
index 0000000000..1e0df2e84d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/remref-2a.c
@@ -0,0 +1,90 @@
+/* Verify that indirect inlining can also remove references of the functions it
+ discovers calls for. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fno-ipa-cp -fdump-ipa-inline -fdump-tree-optimized" } */
+
+int global;
+
+void __attribute__ ((noinline, noclone, used))
+stuff (int i)
+{
+ global = i;
+}
+
+int __attribute__ ((noinline,noclone)) get_input(void)
+{
+ return 1;
+}
+
+static void
+hooray_1 ()
+{
+ stuff (1);
+}
+
+static inline void
+hip2_1 (void (*g)())
+{
+ int i;
+ g ();
+ /* Some stuff to make the function bigger so that hip1_1 gets inlined
+ fiorst. */
+ for (i = 0; i < get_input (); i++)
+ {
+ stuff (2);
+ stuff (2+2);
+ }
+}
+
+static inline void
+hip1_1 (void (*g)())
+{
+ hip2_1 (g);
+}
+
+static void
+hooray_2 ()
+{
+ stuff (1);
+}
+
+static inline void
+hip2_2 (void (*g)())
+{
+ g ();
+}
+
+static inline void
+hip1_2 (void (*g)())
+{
+ int i;
+
+ hip2_2 (g);
+
+ /* Some stuff to make the function bigger so that hip2_2 gets inlined
+ fiorst. */
+ for (i = 0; i < get_input (); i++)
+ {
+ stuff (2);
+ stuff (2+2);
+ }
+}
+
+
+int
+main (int argc, int *argv[])
+{
+ int i;
+
+ for (i = 0; i < get_input (); i++)
+ {
+ hip1_1 (hooray_1);
+ hip1_2 (hooray_2);
+ }
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "ipa-prop: Removed a reference" 2 "inline" } } */
+/* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ipa/remref-2b.c b/gcc/testsuite/gcc.dg/ipa/remref-2b.c
new file mode 100644
index 0000000000..554f306d26
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ipa/remref-2b.c
@@ -0,0 +1,94 @@
+/* Verify that indirect inlining can also remove references of the functions it
+ discovers calls for, even when nodes being inlined are virtual IPA-CP
+ clones. */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-early-inlining -fdump-ipa-cp-details -fdump-ipa-inline -fdump-tree-optimized" } */
+
+
+int global;
+
+void __attribute__ ((noinline, noclone, used))
+stuff (int i)
+{
+ global = i;
+}
+
+int __attribute__ ((noinline,noclone)) get_input(void)
+{
+ return 1;
+}
+
+static void
+hooray_1 ()
+{
+ stuff (1);
+}
+
+static inline void
+hip2_1 (void (*g)())
+{
+ int i;
+ g ();
+ /* Some stuff to make the function bigger so that hip1_1 gets inlined
+ fiorst. */
+ for (i = 0; i < get_input (); i++)
+ {
+ stuff (2);
+ stuff (2+2);
+ }
+}
+
+static inline void
+hip1_1 (void (*g)())
+{
+ hip2_1 (g);
+}
+
+static void
+hooray_2 ()
+{
+ stuff (1);
+}
+
+static inline void
+hip2_2 (void (*g)())
+{
+ g ();
+}
+
+static inline void
+hip1_2 (void (*g)())
+{
+ int i;
+
+ hip2_2 (g);
+
+ /* Some stuff to make the function bigger so that hip2_2 gets inlined
+ fiorst. */
+ for (i = 0; i < get_input (); i++)
+ {
+ stuff (2);
+ stuff (2+2);
+ }
+}
+
+int
+main (int argc, int *argv[])
+{
+ int i;
+
+ for (i = 0; i < get_input (); i++)
+ {
+ hip1_1 (hooray_1);
+ hip1_2 (hooray_2);
+ }
+ return 0;
+}
+
+/* { dg-final { scan-ipa-dump-times "removing its cloning-created reference" 2 "cp" } } */
+/* { dg-final { scan-ipa-dump "ipa-prop: Removed a reference" "inline" } } */
+/* { dg-final { scan-ipa-dump-times "ipa-prop: Removing cloning-created reference" 2 "inline" } } */
+/* { dg-final { scan-tree-dump-not "hooray" "optimized" } } */
+/* { dg-final { cleanup-ipa-dump "cp" } } */
+/* { dg-final { cleanup-ipa-dump "inline" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
new file mode 100644
index 0000000000..54d3e76157
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-1.c
@@ -0,0 +1,31 @@
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { powerpc*-*-* && lp64 } } } } */
+/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue" } */
+
+long __attribute__((noinline, noclone))
+foo (long a)
+{
+ return a + 5;
+}
+
+static long g;
+
+long __attribute__((noinline, noclone))
+bar (long a)
+{
+ long r;
+
+ if (a)
+ {
+ r = foo (a);
+ g = r + a;
+ }
+ else
+ r = a+1;
+ return r;
+}
+
+/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
+/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" } } */
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
+/* { dg-final { cleanup-rtl-dump "ira" } } */
+/* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
new file mode 100644
index 0000000000..ed08494cfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ira-shrinkwrap-prep-2.c
@@ -0,0 +1,36 @@
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { powerpc*-*-* && lp64 } } } } */
+/* { dg-options "-O3 -fdump-rtl-ira -fdump-rtl-pro_and_epilogue" } */
+
+long __attribute__((noinline, noclone))
+foo (long a)
+{
+ return a + 5;
+}
+
+static long g;
+
+long __attribute__((noinline, noclone))
+bar (long a)
+{
+ long r;
+
+ if (a)
+ {
+ r = a;
+ while (r < 500)
+ if (r % 2)
+ r = foo (r);
+ else
+ r = foo (r+1);
+ g = r + a;
+ }
+ else
+ r = g+1;
+ return r;
+}
+
+/* { dg-final { scan-rtl-dump "Will split live ranges of parameters" "ira" } } */
+/* { dg-final { scan-rtl-dump "Split live-range of register" "ira" } } */
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
+/* { dg-final { cleanup-rtl-dump "ira" } } */
+/* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/ivdep.c b/gcc/testsuite/gcc.dg/ivdep.c
new file mode 100644
index 0000000000..23d51de9fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ivdep.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+
+/* PR other/33426 */
+
+void foo(int n, int *a, int *b, int *c, int *d, int *e) {
+ int i, j;
+#pragma GCC ivdep
+ for (i = 0; ; ++i) { /* { dg-error "missing loop condition in loop with 'GCC ivdep' pragma before ';' token" } */
+ a[i] = b[i] + c[i];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/large-size-array-6.c b/gcc/testsuite/gcc.dg/large-size-array-6.c
new file mode 100644
index 0000000000..f7da47e937
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/large-size-array-6.c
@@ -0,0 +1,6 @@
+/* PR c/57821 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+static char * name[] = {
+ [0x8000000000000000] = "bar"
+ }; /* { dg-error "too large" } */
diff --git a/gcc/testsuite/gcc.dg/long-long-compare-1.c b/gcc/testsuite/gcc.dg/long-long-compare-1.c
index c650cb18d2..e05fcead21 100644
--- a/gcc/testsuite/gcc.dg/long-long-compare-1.c
+++ b/gcc/testsuite/gcc.dg/long-long-compare-1.c
@@ -1,8 +1,6 @@
-/* Problem only noticed on SH for -mcbranchdi DImode comparison with constants.
- * Target dependant failure but test valid for alls. */
+/* Problem noticed on SH for DImode comparison with constants.
/* { dg-do run } */
/* { dg-options "-O0" } */
-/* { dg-options "-O0 -mcbranchdi" { target sh4-*-* } } */
extern void abort(void);
extern void exit(int);
diff --git a/gcc/testsuite/gcc.dg/long-long-cst1.c b/gcc/testsuite/gcc.dg/long-long-cst1.c
index 7c60648d28..800d6d64b9 100644
--- a/gcc/testsuite/gcc.dg/long-long-cst1.c
+++ b/gcc/testsuite/gcc.dg/long-long-cst1.c
@@ -7,7 +7,7 @@ extern void abort();
struct st{
int _mark;
};
-unsigned long long t = ((int)(__SIZE_TYPE__)&(((struct st*)16)->_mark) - 32);
+unsigned long long t = ((int)(__UINTPTR_TYPE__)&(((struct st*)16)->_mark) - 32);
int main()
{
diff --git a/gcc/testsuite/gcc.dg/lower-subreg-1.c b/gcc/testsuite/gcc.dg/lower-subreg-1.c
index 63be934054..102ba22b43 100644
--- a/gcc/testsuite/gcc.dg/lower-subreg-1.c
+++ b/gcc/testsuite/gcc.dg/lower-subreg-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { ! { mips64 || { ia64-*-* spu-*-* tilegx-*-* } } } } } */
+/* { dg-do compile { target { ! { mips64 || { aarch64*-*-* arm*-*-* ia64-*-* sparc*-*-* spu-*-* tilegx-*-* } } } } } */
/* { dg-options "-O -fdump-rtl-subreg1" } */
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && x32 } { "*" } { "" } } */
/* { dg-require-effective-target ilp32 } */
diff --git a/gcc/testsuite/gcc.dg/lto/20090206-1_0.c b/gcc/testsuite/gcc.dg/lto/20090206-1_0.c
index c9fc97334c..83d2c8607f 100644
--- a/gcc/testsuite/gcc.dg/lto/20090206-1_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20090206-1_0.c
@@ -1,5 +1,5 @@
/* { dg-lto-do link } */
-/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
+/* { dg-skip-if "" { ! { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } { "*" } { "" } } */
/* { dg-lto-options {{-fPIC -r -nostdlib -flto -flto-partition=1to1 -msse2}} } */
/* { dg-require-effective-target sse2 } */
/* { dg-suppress-ld-options {-fPIC -msse2} } */
diff --git a/gcc/testsuite/gcc.dg/lto/20090206-2_0.c b/gcc/testsuite/gcc.dg/lto/20090206-2_0.c
index 2f4020a011..40b71328fa 100644
--- a/gcc/testsuite/gcc.dg/lto/20090206-2_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20090206-2_0.c
@@ -1,5 +1,5 @@
/* { dg-lto-do link } */
-/* { dg-skip-if "" { ! { i?86-*-linux* x86_64-*-linux* } } { "*" } { "" } } */
+/* { dg-skip-if "" { ! { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } { "*" } { "" } } */
/* { dg-require-effective-target fpic } */
/* { dg-lto-options {{-flto -flto-partition=1to1 -fPIC}} } */
/* { dg-suppress-ld-options {-fPIC} } */
diff --git a/gcc/testsuite/gcc.dg/lto/20090210_0.c b/gcc/testsuite/gcc.dg/lto/20090210_0.c
index 794c18fe04..ce9dfac109 100644
--- a/gcc/testsuite/gcc.dg/lto/20090210_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20090210_0.c
@@ -2,7 +2,7 @@
/* { dg-require-effective-target fpic } */
/* { dg-suppress-ld-options {-fPIC} } */
/* { dg-require-effective-target tls_runtime } */
-/* { dg-extra-ld-options "-pthread" { target *-*-solaris2.[89] } } */
+/* { dg-extra-ld-options "-pthread" { target *-*-solaris2.9 } } */
int foo (int x)
{
return x;
diff --git a/gcc/testsuite/gcc.dg/lto/20090914-2_0.c b/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
index d0510d609b..d83ed377bb 100644
--- a/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
+++ b/gcc/testsuite/gcc.dg/lto/20090914-2_0.c
@@ -1,6 +1,7 @@
/* { dg-lto-do run } */
/* { dg-skip-if "x86 only" { ! { x86_64-*-* i?86-*-* } } { "*" } { "" } } */
/* { dg-skip-if "no .type" { *-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "no @function" { *-*-mingw* *-*-cygwin* } { "*" } { "" } } */
/* Doesn't work without this dummy function with -fwhopr. */
int foo(void) { }
diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_1.c b/gcc/testsuite/gcc.dg/lto/20091013-1_1.c
index a4e37ce7a2..ff890dce4c 100644
--- a/gcc/testsuite/gcc.dg/lto/20091013-1_1.c
+++ b/gcc/testsuite/gcc.dg/lto/20091013-1_1.c
@@ -1,4 +1,4 @@
-/* { dg-xfail-if "cast to pointer of different size" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-xfail-if "cast to pointer of different size" { "avr-*-*" x86_64-*-mingw* } { "*" } { "" } } */
typedef struct HDC__ { int unused; } *HDC;
typedef struct HFONT__ { int unused; } *HFONT;
diff --git a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c
index 599bdbc9e3..60bd1defa2 100644
--- a/gcc/testsuite/gcc.dg/lto/20091013-1_2.c
+++ b/gcc/testsuite/gcc.dg/lto/20091013-1_2.c
@@ -1,4 +1,4 @@
-/* { dg-xfail-if "cast to pointer of different size" { "avr-*-*" } { "*" } { "" } } */
+/* { dg-xfail-if "cast to pointer of different size" { "avr-*-*" x86_64-*-mingw* } { "*" } { "" } } */
typedef struct HDC__ { int unused; } *HDC;
typedef struct HFONT__ { int unused; } *HFONT;
diff --git a/gcc/testsuite/gcc.dg/lto/20120723_0.c b/gcc/testsuite/gcc.dg/lto/20120723_0.c
new file mode 100644
index 0000000000..78cfdf77c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/20120723_0.c
@@ -0,0 +1,54 @@
+/* Make sure that by reference and by value aggregate jump functions do not get
+ mixed up.
+ ??? This testcase is invalid C and can only pass on specific platforms. */
+/* { dg-lto-do run } */
+/* { dg-skip-if "" { { sparc*-*-* } && ilp32 } { "*" } { "" } } */
+/* { dg-lto-options { {-O3 -fno-early-inlining -flto}} } */
+
+extern void abort (void);
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ int j;
+};
+
+struct E
+{
+ struct S *p;
+};
+
+struct S *gs;
+int gr = 111;
+char gc[1024];
+
+static __attribute__ ((noinline, noclone)) struct S *
+get_s (void)
+{
+ return (struct S *) &gc;
+}
+
+static void wrong_target (struct S *s)
+{
+ abort ();
+}
+
+void bar (struct S *s)
+{
+ s->f (s);
+}
+
+extern void foo (struct S *s);
+
+int main (int argc, char **argv)
+{
+ struct S *s = get_s();
+ gs = s;
+ s->i = 5678;
+ s->f = wrong_target;
+ s->j = 1234;
+ foo (s);
+
+ return gr;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/20120723_1.c b/gcc/testsuite/gcc.dg/lto/20120723_1.c
new file mode 100644
index 0000000000..5c50861b41
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/20120723_1.c
@@ -0,0 +1,39 @@
+/* Make sure that by reference and by value aggregate jump functions do not get
+ mixed up. */
+
+extern void abort (void);
+
+struct S
+{
+ int i;
+ void (*f)(struct S *);
+ int j;
+};
+
+struct E
+{
+ struct S *p;
+};
+
+extern struct S *gs;
+extern int gr;
+extern char gc[1024];
+
+static __attribute__ ((noinline, noclone)) struct S *
+get_s (void)
+{
+ return (struct S *) &gc;
+}
+
+static void good_target (struct S *s)
+{
+ gr = 0;
+}
+
+extern void bar (struct E e);
+
+void foo (struct E e)
+{
+ gs->f = good_target;
+ bar (e);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
new file mode 100644
index 0000000000..1e02f68f2c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_0.c
@@ -0,0 +1,29 @@
+/* { dg-lto-do run } */
+int first = 0;
+void abort (void);
+int second = 0;
+void callmealias (void)
+{
+ if (!first || !second)
+ abort ();
+}
+void callmefirst (void)
+{
+ if (first)
+ abort();
+ first = 1;
+}
+void callmesecond (void)
+{
+ if (!first)
+ abort();
+ if (second)
+ abort();
+ second = 1;
+}
+main()
+{
+ c();
+ b();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c
new file mode 100644
index 0000000000..67e6e1c1fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_1.c
@@ -0,0 +1,7 @@
+extern void callmesecond();
+static void callmealias() __attribute__((weakref ("callmesecond")));
+
+b()
+{
+ callmealias();
+}
diff --git a/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c
new file mode 100644
index 0000000000..6f382f61e5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/attr-weakref-1_2.c
@@ -0,0 +1,7 @@
+extern void callmefirst();
+static void callmealias() __attribute__((weakref ("callmefirst")));
+
+c()
+{
+ callmealias();
+}
diff --git a/gcc/testsuite/gcc.dg/lto/lto.exp b/gcc/testsuite/gcc.dg/lto/lto.exp
index 48b597c702..25862978bd 100644
--- a/gcc/testsuite/gcc.dg/lto/lto.exp
+++ b/gcc/testsuite/gcc.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/lto/pr52097_0.c b/gcc/testsuite/gcc.dg/lto/pr52097_0.c
new file mode 100644
index 0000000000..cd4af5d1f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr52097_0.c
@@ -0,0 +1,20 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O -flto -fexceptions -fnon-call-exceptions --param allow-store-data-races=0 } } } */
+
+typedef struct { unsigned int e0 : 16; } s1;
+typedef struct { unsigned int e0 : 16; } s2;
+typedef struct { s1 i1; s2 i2; } io;
+
+static io *i;
+
+void f1 (void)
+{
+ s1 x0;
+ i->i1 = x0;
+}
+
+int main ()
+{
+ f1 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr52634_0.c b/gcc/testsuite/gcc.dg/lto/pr52634_0.c
new file mode 100644
index 0000000000..a858cc1a5c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr52634_0.c
@@ -0,0 +1,7 @@
+/* { dg-require-weak "" } */
+/* { dg-require-alias "" } */
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-flto -r -nostdlib -flto-partition=1to1}} */
+extern int cfliteValueCallBacks;
+void baz (int *);
+int main () { baz(&cfliteValueCallBacks); }
diff --git a/gcc/testsuite/gcc.dg/lto/pr52634_1.c b/gcc/testsuite/gcc.dg/lto/pr52634_1.c
new file mode 100644
index 0000000000..af4c43980d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr52634_1.c
@@ -0,0 +1,6 @@
+int cfliteKeyCallBacks = 5;
+extern int cfliteValueCallBacks __attribute__((alias("cfliteKeyCallBacks")));
+void baz(void *ptr)
+{
+ asm volatile (""::"r"(ptr));
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr53470_0.c b/gcc/testsuite/gcc.dg/lto/pr53470_0.c
index db9f2fe623..3c799f60cc 100644
--- a/gcc/testsuite/gcc.dg/lto/pr53470_0.c
+++ b/gcc/testsuite/gcc.dg/lto/pr53470_0.c
@@ -3,7 +3,7 @@
int main ()
{
- {
- union A { } v;
+ {
+ union A { } v;
}
}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54702_0.c b/gcc/testsuite/gcc.dg/lto/pr54702_0.c
new file mode 100644
index 0000000000..2242f50b6d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr54702_0.c
@@ -0,0 +1,10 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -flto -w } } } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+#include <stdlib.h>
+void* f ()
+{
+ void* p = malloc (1);
+ return p;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54702_1.c b/gcc/testsuite/gcc.dg/lto/pr54702_1.c
new file mode 100644
index 0000000000..2afb0fbc06
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr54702_1.c
@@ -0,0 +1,16 @@
+int *b;
+void *d;
+int c;
+static int *f1 ();
+void f2 ()
+{
+ int *a = f1 (0);
+}
+
+int *f1 (j)
+{
+ b = malloc (0);
+ d = *malloc;
+ c = j;
+}
+
diff --git a/gcc/testsuite/gcc.dg/lto/pr54709_0.c b/gcc/testsuite/gcc.dg/lto/pr54709_0.c
new file mode 100644
index 0000000000..f3db5dcbbc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr54709_0.c
@@ -0,0 +1,10 @@
+/* { dg-lto-do link } */
+/* { dg-require-visibility "hidden" } */
+/* { dg-require-effective-target fpic } */
+/* { dg-extra-ld-options { -shared } } */
+/* { dg-lto-options { { -fPIC -fvisibility=hidden -flto } } } */
+
+void foo (void *p, void *q, unsigned s)
+{
+ __builtin_memcpy (p, q, s);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr54709_1.c b/gcc/testsuite/gcc.dg/lto/pr54709_1.c
new file mode 100644
index 0000000000..59c137d6f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr54709_1.c
@@ -0,0 +1,5 @@
+void * memcpy (void *, void *, long);
+void bar (void *p, void *q, unsigned s)
+{
+ memcpy (p, q, s);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr55113_0.c b/gcc/testsuite/gcc.dg/lto/pr55113_0.c
new file mode 100644
index 0000000000..8c309761bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr55113_0.c
@@ -0,0 +1,14 @@
+/* PR 55113 */
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -flto -fshort-double -O0 } } }*/
+/* { dg-skip-if "PR60410" { x86_64-*-* || { i?86-*-* && lp64 } } } */
+/* { dg-skip-if "PR60410" { i?86-*-solaris2.1[0-9]* } } */
+
+int
+main(void)
+{
+ float a = 1.0;
+ float b = 2.0;
+ double f = a + b * 1e-12;
+ return (int)f - 1;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr55525_0.c b/gcc/testsuite/gcc.dg/lto/pr55525_0.c
new file mode 100644
index 0000000000..7faaf806a7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr55525_0.c
@@ -0,0 +1,8 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -flto -w } } } */
+
+char s[sizeof (char *)];
+int main(void)
+{
+ return strcmp(&s[1], "foo");
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr55525_1.c b/gcc/testsuite/gcc.dg/lto/pr55525_1.c
new file mode 100644
index 0000000000..3c3381780b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr55525_1.c
@@ -0,0 +1 @@
+char *s = (char *) 0;
diff --git a/gcc/testsuite/gcc.dg/lto/pr55703_0.c b/gcc/testsuite/gcc.dg/lto/pr55703_0.c
new file mode 100644
index 0000000000..1c4e04b3a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr55703_0.c
@@ -0,0 +1,59 @@
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -O2 -flto -fno-tree-copy-prop -fno-tree-dce } } } */
+
+int try (int num) {
+ __label__ lab1, lab2, lab3, lab4, lab5, lab6, default_lab;
+
+ void *do_switch (int num) {
+ switch(num) {
+ case 1:
+ return &&lab1;
+ case 2:
+ return &&lab2;
+ case 3:
+ return &&lab3;
+ case 4:
+ return &&lab4;
+ case 5:
+ return &&lab5;
+ case 6:
+ return &&lab6;
+ default:
+ return &&default_lab;
+ }
+ }
+
+ goto *do_switch (num);
+
+ lab1:
+ return 1;
+
+ lab2:
+ return 2;
+
+ lab3:
+ return 3;
+
+ lab4:
+ return 4;
+
+ lab5:
+ return 5;
+
+ lab6:
+ return 6;
+
+ default_lab:
+ return -1;
+}
+
+main()
+{
+ int i;
+ for (i = 1; i <= 6; i++)
+ {
+ if (try (i) != i)
+ __builtin_abort();
+ }
+ __builtin_exit(0);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr56168_0.c b/gcc/testsuite/gcc.dg/lto/pr56168_0.c
new file mode 100644
index 0000000000..13f768e7e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr56168_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -flto -O -ffast-math -fno-builtin } } } */
+
+extern double pow(double, double);
+extern void abort (void);
+volatile double x = 1.0;
+int main(int argc, char **argv)
+{
+ double d1 = x;
+ double d2 = pow(d1, 1.0 / 3.0);
+ double d3 = d1 * d1;
+ if (d3 != 1.0 || d2 != 0.0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr56168_1.c b/gcc/testsuite/gcc.dg/lto/pr56168_1.c
new file mode 100644
index 0000000000..560d0bda8e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr56168_1.c
@@ -0,0 +1,4 @@
+/* { dg-options "-fno-lto" } */
+
+double __attribute__((noinline,noclone))
+pow (double x, double y) { return 0.0; }
diff --git a/gcc/testsuite/gcc.dg/lto/pr56297_0.c b/gcc/testsuite/gcc.dg/lto/pr56297_0.c
new file mode 100644
index 0000000000..5ed19da155
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr56297_0.c
@@ -0,0 +1,13 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -flto -fno-common } } } */
+
+#if __x86_64__ || __i386__
+register int i asm("esp");
+#else
+extern int i;
+#endif
+
+int main(void)
+{
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr56297_1.c b/gcc/testsuite/gcc.dg/lto/pr56297_1.c
new file mode 100644
index 0000000000..17e9c8c452
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr56297_1.c
@@ -0,0 +1,5 @@
+#if __x86_64__ || __i386__
+register int i asm("esp");
+#else
+int i;
+#endif
diff --git a/gcc/testsuite/gcc.dg/lto/pr59323-2_0.c b/gcc/testsuite/gcc.dg/lto/pr59323-2_0.c
new file mode 100644
index 0000000000..938a89d6a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59323-2_0.c
@@ -0,0 +1,37 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -g -flto } } } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+extern void bar(void);
+
+int main(int argc, char **argv)
+{
+ int i;
+
+ if (argc == 1) {
+ extern void bar ();
+
+ bar();
+
+ {
+ extern void bar ();
+
+ asm goto ("" : : : : lab);
+lab:
+ ;
+ }
+ }
+
+ {
+ extern void bar ();
+
+ int foo(void)
+ {
+ return argv[0][0];
+ }
+
+ i = foo();
+ }
+
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59323_0.c b/gcc/testsuite/gcc.dg/lto/pr59323_0.c
new file mode 100644
index 0000000000..b591058915
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59323_0.c
@@ -0,0 +1,37 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -O2 -g -flto } } } */
+/* { dg-extra-ld-options { -r -nostdlib } } */
+
+extern void bar(void);
+
+int main(int argc, char **argv)
+{
+ int i;
+
+ if (argc == 1) {
+ enum { X };
+
+ bar();
+
+ {
+ enum { X };
+
+ asm goto ("" : : : : lab);
+lab:
+ ;
+ }
+ }
+
+ {
+ enum { X };
+
+ int foo(void)
+ {
+ return argv[0][0];
+ }
+
+ i = foo();
+ }
+
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_0.c b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
new file mode 100644
index 0000000000..752982fb50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+
+int __atoi (const char *) __asm__("atoi");
+extern inline __attribute__((always_inline,gnu_inline))
+int atoi (const char *x)
+{
+ return __atoi (x);
+}
+
+int bar (int (*)(const char *));
+
+int main()
+{
+ return bar (atoi);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr59626_1.c b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
new file mode 100644
index 0000000000..9b3fa1d2e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr59626_1.c
@@ -0,0 +1,4 @@
+int bar (int (*fn)(const char *))
+{
+ return fn ("0");
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60404_0.c b/gcc/testsuite/gcc.dg/lto/pr60404_0.c
new file mode 100644
index 0000000000..a22216db20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60404_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+/* { dg-lto-options { { -O1 -flto } } } */
+/* { dg-extra-ld-options { -O0 } } */
+
+extern void fn2 (int);
+int a[1], b;
+
+int
+main ()
+{
+ fn2 (0);
+ if (b != 0 || a[b] != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60404_1.c b/gcc/testsuite/gcc.dg/lto/pr60404_1.c
new file mode 100644
index 0000000000..8c1259803f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60404_1.c
@@ -0,0 +1,4 @@
+void
+fn1 (int p)
+{
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60404_2.c b/gcc/testsuite/gcc.dg/lto/pr60404_2.c
new file mode 100644
index 0000000000..e1db02409a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60404_2.c
@@ -0,0 +1,9 @@
+extern int b;
+extern void fn1 (int);
+
+void
+fn2 (int p)
+{
+ b = p++;
+ fn1 (p);
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60449_0.c b/gcc/testsuite/gcc.dg/lto/pr60449_0.c
new file mode 100644
index 0000000000..a430830cbe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60449_0.c
@@ -0,0 +1,30 @@
+/* { dg-lto-do link } */
+
+extern int printf (const char *__restrict __format, ...);
+typedef long int __time_t;
+typedef long int __suseconds_t;
+
+struct timeval
+ {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+ };
+
+struct timezone
+ {
+ int tz_minuteswest;
+ int tz_dsttime;
+ };
+typedef struct timezone *__restrict __timezone_ptr_t;
+
+extern int gettimeofday (struct timeval *__restrict __tv, __timezone_ptr_t __tz);
+
+int bar (void)
+{
+ struct timeval tv;
+ struct timezone tz;
+
+ gettimeofday (&tv, &tz);
+ printf ("This is from bar %i\n", tz.tz_dsttime);
+ return 5;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60449_1.c b/gcc/testsuite/gcc.dg/lto/pr60449_1.c
new file mode 100644
index 0000000000..ddc25296d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60449_1.c
@@ -0,0 +1,76 @@
+extern int printf (const char *__restrict __format, ...);
+typedef long int __time_t;
+typedef long int __suseconds_t;
+struct timeval
+ {
+ __time_t tv_sec;
+ __suseconds_t tv_usec;
+ };
+struct timezone
+ {
+ int tz_minuteswest;
+ int tz_dsttime;
+ };
+typedef struct timezone *__restrict __timezone_ptr_t;
+extern int gettimeofday (struct timeval *__restrict __tv,
+ __timezone_ptr_t __tz) __attribute__ ((__nothrow__ , __leaf__)) __attribute__ ((__nonnull__ (1)));
+
+typedef long int __jmp_buf[8];
+typedef struct
+ {
+ unsigned long int __val[(1024 / (8 * sizeof (unsigned long int)))];
+ } __sigset_t;
+struct __jmp_buf_tag
+ {
+ __jmp_buf __jmpbuf;
+ int __mask_was_saved;
+ __sigset_t __saved_mask;
+ };
+typedef struct __jmp_buf_tag jmp_buf[1];
+
+extern int setjmp (jmp_buf __env) __attribute__ ((__nothrow__));
+extern void longjmp (struct __jmp_buf_tag __env[1], int __val)
+ __attribute__ ((__nothrow__)) __attribute__ ((__noreturn__));
+
+extern int bar (void);
+
+int __attribute__ ((noinline, noclone))
+get_input (void)
+{
+ return 0;
+}
+
+static jmp_buf buf;
+
+int foo (void)
+{
+ if (get_input ())
+ longjmp(buf, 1);
+ return 0;
+}
+
+volatile int z;
+
+
+int main (void)
+{
+ struct timeval tv;
+ struct timezone tz;
+
+ bar();
+ if (setjmp (buf))
+ return 1;
+
+ if (!get_input ())
+ {
+ gettimeofday (&tv, &tz);
+ z = 0;
+ printf ("This is from main %i\n", tz.tz_dsttime);
+ }
+
+ foo ();
+ bar ();
+ bar ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60461_0.c b/gcc/testsuite/gcc.dg/lto/pr60461_0.c
new file mode 100644
index 0000000000..cad6a8de85
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60461_0.c
@@ -0,0 +1,37 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options {{-Os -flto} } } */
+
+
+struct S
+{
+ int f1;
+ int f2;
+} a[1] = { {0, 0} };
+
+int b, c;
+
+static unsigned short fn1 (struct S);
+
+void
+fn2 ()
+{
+ for (; c;)
+ ;
+ b = 0;
+ fn1 (a[0]);
+}
+
+unsigned short
+fn1 (struct S p)
+{
+ if (p.f1)
+ fn2 ();
+ return 0;
+}
+
+int
+main ()
+{
+ fn2 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr60720_0.c b/gcc/testsuite/gcc.dg/lto/pr60720_0.c
new file mode 100644
index 0000000000..79cef5dad1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60720_0.c
@@ -0,0 +1,15 @@
+/* { dg-lto-do run } */
+/* { dg-extra-ld-options { -w } } */
+
+/* ??? lto.exp does not allow to scan for
+ :1:12: warning: type of 'x' does not match original declaration
+ extern int x[];
+ ^
+ :1:5: note: previously declared here
+ int x;
+ ^ */
+
+extern int x[];
+int *foo[] = { &x[0] };
+
+int main() { return *foo[0]; }
diff --git a/gcc/testsuite/gcc.dg/lto/pr60720_1.c b/gcc/testsuite/gcc.dg/lto/pr60720_1.c
new file mode 100644
index 0000000000..6d1a0d47b7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60720_1.c
@@ -0,0 +1 @@
+int x;
diff --git a/gcc/testsuite/gcc.dg/lto/pr60911_0.c b/gcc/testsuite/gcc.dg/lto/pr60911_0.c
new file mode 100644
index 0000000000..e4820a2049
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr60911_0.c
@@ -0,0 +1,21 @@
+// { dg-lto-do run }
+// { dg-lto-options { { -O2 -flto -fipa-pta } } }
+
+int __attribute__ ((__noinline__)) f (unsigned *p, int *x)
+{
+ int y = *p++ & 0xfff;
+ *x++ = y;
+ *x = *p;
+ return y;
+}
+
+int
+main ()
+{
+ unsigned u[2] = { 0x3aad, 0x5ad1 };
+ int x[2] = { 17689, 23456 };
+
+ if (f (u, x) != 0xaad || x[0] != 0xaad || x[1] != 0x5ad1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/pr61526_0.c b/gcc/testsuite/gcc.dg/lto/pr61526_0.c
new file mode 100644
index 0000000000..6324c8c5bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr61526_0.c
@@ -0,0 +1,6 @@
+/* { dg-lto-do link } */
+/* { dg-lto-options { { -fPIC -flto -flto-partition=1to1 } } } */
+/* { dg-extra-ld-options { -shared } } */
+
+static void *master;
+void *foo () { return master; }
diff --git a/gcc/testsuite/gcc.dg/lto/pr61526_1.c b/gcc/testsuite/gcc.dg/lto/pr61526_1.c
new file mode 100644
index 0000000000..bb2893b738
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/pr61526_1.c
@@ -0,0 +1,2 @@
+extern void *master;
+void *bar () { return master; }
diff --git a/gcc/testsuite/gcc.dg/lto/resolutions_0.c b/gcc/testsuite/gcc.dg/lto/resolutions_0.c
new file mode 100644
index 0000000000..9e59cb0690
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/resolutions_0.c
@@ -0,0 +1,10 @@
+/* { dg-require-linker-plugin "" } */
+/* { dg-extra-ld-options "-fuse-linker-plugin -O1" } */
+
+link_error()
+{
+}
+main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/lto/save-temps_0.c b/gcc/testsuite/gcc.dg/lto/save-temps_0.c
new file mode 100644
index 0000000000..8af1619581
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/lto/save-temps_0.c
@@ -0,0 +1,9 @@
+/* { dg-lto-options {{ -O -flto -save-temps}} } */
+/* { dg-lto-do link } */
+
+int
+main (void)
+{
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/m-un-2.c b/gcc/testsuite/gcc.dg/m-un-2.c
index 0d280bb579..0b96628355 100644
--- a/gcc/testsuite/gcc.dg/m-un-2.c
+++ b/gcc/testsuite/gcc.dg/m-un-2.c
@@ -16,7 +16,7 @@ struct vtable mtable = {
malloc,
free
}; /* { dg-warning "missing initializer" "warning regression" { target *-*-* } {18} } */
- /* { dg-warning "initialization for 'mtable._realloc'" "warning regression 2" { target *-*-* } {18} } */
+ /* { dg-message "declared here" "warning regression 2" { target *-*-* } {12} } */
/* With designated initializers, we assume you meant to leave out the
initialization of any blank fields. */
diff --git a/gcc/testsuite/gcc.dg/macro-fusion-1.c b/gcc/testsuite/gcc.dg/macro-fusion-1.c
new file mode 100644
index 0000000000..b2d11423ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/macro-fusion-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -mtune=corei7 -fdump-rtl-sched2" } */
+
+int a[100];
+
+double bar (double sum)
+{
+ int i;
+ for (i = 0; i < 1000000; i++)
+ sum += (0.5 + (a[i%100] - 128));
+ return sum;
+}
+
+/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */
+/* { dg-final { cleanup-rtl-dump "sched2" } } */
diff --git a/gcc/testsuite/gcc.dg/macro-fusion-2.c b/gcc/testsuite/gcc.dg/macro-fusion-2.c
new file mode 100644
index 0000000000..ad7489a73a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/macro-fusion-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -mtune=corei7-avx -fdump-rtl-sched2" } */
+
+int a[100];
+
+double bar (double sum)
+{
+ int i = 100000;
+ while (i != 0)
+ {
+ sum += (0.5 + (a[i%100] - 128));
+ i--;
+ }
+ return sum;
+}
+
+/* { dg-final { scan-rtl-dump-not "compare.*insn.*jump_insn.*jump_insn" "sched2" } } */
+/* { dg-final { cleanup-rtl-dump "sched2" } } */
diff --git a/gcc/testsuite/gcc.dg/mallign.c b/gcc/testsuite/gcc.dg/mallign.c
index 6a0041e646..349cdaa343 100644
--- a/gcc/testsuite/gcc.dg/mallign.c
+++ b/gcc/testsuite/gcc.dg/mallign.c
@@ -9,7 +9,7 @@ typedef int word __attribute__((mode(word)));
int main()
{
- if ((size_t)malloc (1) & (sizeof(word)-1))
+ if ((__UINTPTR_TYPE__)malloc (1) & (sizeof(word)-1))
abort ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-1.c b/gcc/testsuite/gcc.dg/matrix/matrix-1.c
deleted file mode 100644
index 12df17283a..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-1.c
+++ /dev/null
@@ -1,92 +0,0 @@
-/* { dg-do compile } */
-/* { dg-do run } */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions). */
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k, id;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-2.c b/gcc/testsuite/gcc.dg/matrix/matrix-2.c
deleted file mode 100644
index 318faa54ef..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-2.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* { dg-do compile } */
-/* { dg-do run } */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The last dimension of VEL escapes because of
- the assignment : vel[1][1] =...
- Only the two external dimensions are flattened. */
-
-
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- printf ("%x\n",vel[i][j]);
- /*if (i!=1 || j!=1)*/
- /*if (i==1 && j==1)
- continue;
- else
- free (vel[i][j]);*/
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- printf ("%x %d %d\n",vel[i][j], ARCHnodes1, sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- printf ("%x\n",vel[i][j]);
- }
- }
-
- printf ("again:\n\n");
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- printf ("%x\n",vel[i][j]);
- /*for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }*/
- }
- }
- /*vel[1][1] = vel[0][1];*/
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened 2 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-3.c b/gcc/testsuite/gcc.dg/matrix/matrix-3.c
deleted file mode 100644
index 28a5a16b7e..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-3.c
+++ /dev/null
@@ -1,99 +0,0 @@
-/* { dg-do compile } */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-void just_a_call (int *);
-
-/* The last dimension of VEL escapes because it was sent
- as argumet to just_a_call(). (external function)
- Only the two external dimensions are flattened.
- Run with -c. */
-
-
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- just_a_call (vel[1][1]);
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened 2 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-4.c b/gcc/testsuite/gcc.dg/matrix/matrix-4.c
deleted file mode 100644
index d741b46e41..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-4.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* { dg-do compile } */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-void just_a_call (int ****);
-
-/* Address of VEL is taken.
- It is not flattened. */
-
-
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- just_a_call (&vel);
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened" 0 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-5.c b/gcc/testsuite/gcc.dg/matrix/matrix-5.c
deleted file mode 100644
index 1398c5b429..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-5.c
+++ /dev/null
@@ -1,98 +0,0 @@
-/* { dg-do compile } */
-/* { dg-do run } */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The two inner dimesions of matrix escape because of the
- assignment vel[1]= ...
- VEL is not Flattened. */
-
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes-1; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes-1; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- vel[1] = vel[0];
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened" 0 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix-6.c b/gcc/testsuite/gcc.dg/matrix/matrix-6.c
deleted file mode 100644
index 536afb5377..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix-6.c
+++ /dev/null
@@ -1,97 +0,0 @@
-/* { dg-do compile } */
-
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The last dimension of VEL escapes because of
- the assignment : *vel[1] =...
- Only the two external dimensions are flattened. */
-
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- *vel[1] = &d;
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final { scan-ipa-dump-times "Flattened 2 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/matrix.exp b/gcc/testsuite/gcc.dg/matrix/matrix.exp
deleted file mode 100644
index d2e13449ba..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/matrix.exp
+++ /dev/null
@@ -1,67 +0,0 @@
-# Copyright (C) 2001, 2002, 2004, 2005, 2007, 2010, 2011
-# Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-
-# Test the functionality of programs compiled with profile-directed block
-# ordering using -fprofile-generate followed by -fbranch-use.
-load_lib gcc-dg.exp
-load_lib target-supports.exp
-
-set DEFAULT_MATCFLAGS "-O3 -fipa-matrix-reorg -fdump-ipa-matrix-reorg -fwhole-program -fno-tree-fre"
-
-# Initialize `dg'.
-dg-init
-
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/matrix-\[1-6\].\[cS\]]] \
- "" $DEFAULT_MATCFLAGS
-
-dg-final
-
-# Some targets don't support tree profiling.
-if { ![check_profiling_available "-fprofile-generate"] } {
- return
-}
-
-# The procedures in profopt.exp need these parameters.
-set tool gcc
-set prof_ext "gcda"
-
-if $tracelevel then {
- strace $tracelevel
-}
-
-# Load support procs.
-load_lib profopt.exp
-
-# Save and override the default list defined in profopt.exp.
-set matrix_save_profopt_options $PROFOPT_OPTIONS
-set PROFOPT_OPTIONS [list {}]
-
-# These are globals used by profopt-execute. The first is options
-# needed to generate profile data, the second is options to use the
-# profile data.
-set profile_option "-fprofile-generate -O3 -fno-tree-fre"
-set feedback_option "-fprofile-use -fipa-matrix-reorg -fdump-ipa-matrix-reorg -O3 -fwhole-program -fno-tree-fre"
-
-foreach src [lsort [glob -nocomplain $srcdir/$subdir/transpose-*.c]] {
- # If we're only testing specific files and this isn't one of them, skip it.
- if ![runtest_file_p $runtests $src] then {
- continue
- }
- profopt-execute $src
-}
-
-set PROFOPT_OPTIONS $matrix_save_profopt_options
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-1.c b/gcc/testsuite/gcc.dg/matrix/transpose-1.c
deleted file mode 100644
index 8969ecb2ee..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-1.c
+++ /dev/null
@@ -1,98 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions).
- All dimensions are transposed : dim 0 -> dim 2
- dim 1 -> dim 0
- dim 2 -> dim 1
-*/
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (i = 0; i < 3; i++)
- {
- for (j = 0; j < 4; j++)
- {
- for (k = 0; k < 2; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][i][j]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 3 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
-
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-2.c b/gcc/testsuite/gcc.dg/matrix/transpose-2.c
deleted file mode 100644
index 5943781ca5..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-2.c
+++ /dev/null
@@ -1,95 +0,0 @@
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions).
- No transposing is necessary. */
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (j = 0; j < 2; j++)
- {
- for (i = 0; i < 4; i++)
- {
- for (k = 0; k < 2; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][k][k]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < ARCHnodes; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < ARCHnodes; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- vel[i][j][k] = d;
- d++;
- }
- }
- }
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 0 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-3.c b/gcc/testsuite/gcc.dg/matrix/transpose-3.c
deleted file mode 100644
index 5defdb8fd1..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-3.c
+++ /dev/null
@@ -1,101 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-/* The inner most dimension escapes.
- The two external dimensions are flattened
- after being transposed. */
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (j = 0; j < 4; j++)
- {
- for (i = 0; i < 3; i++)
- {
- for (k = 0; k < 2; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][i][j]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- vel[0][0]=vel[1][1];
-
- for (i = 0; i < 2; i++)
- for (j = 0; j < 3; j++)
- if (i==1 && j==1)
- continue;
- else
- free (vel[i][j]);
-
- for (i = 0; i < 2; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- signed int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- printf ("acc to dim2 ");
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- printf ("\n");
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 2 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 2 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-4.c b/gcc/testsuite/gcc.dg/matrix/transpose-4.c
deleted file mode 100644
index f6eb4657fd..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-4.c
+++ /dev/null
@@ -1,100 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions).
- The two inner dimensions are transposed.
- dim 1 -> dim 2
- dim 2 -> dim 1
-*/
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (j = 0; j < 4; j++)
- {
- for (i = 0; i < 2; i++)
- {
- for (k = 0; k < 3; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][k][j]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < 2; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < 2; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- signed int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- printf ("acc to dim2 ");
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- printf ("\n");
-
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 2 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-5.c b/gcc/testsuite/gcc.dg/matrix/transpose-5.c
deleted file mode 100644
index 27e8476288..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-5.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions).
- The dimensions are NOT transposed. */
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (j = 0; j < 3; j++)
- {
- for (i = 0; i < 2; i++)
- {
- for (k = 0; k < 4; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < 2; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < 2; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- signed int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- printf ("acc to dim2 ");
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- printf ("\n");
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 0 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/matrix/transpose-6.c b/gcc/testsuite/gcc.dg/matrix/transpose-6.c
deleted file mode 100644
index f7c6a8a72a..0000000000
--- a/gcc/testsuite/gcc.dg/matrix/transpose-6.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <math.h>
-#include <string.h>
-
-void mem_init (void);
-int ARCHnodes, ARCHnodes1;
-int ***vel;
-
-/* The whole matrix VEL is flattened (3 dimensions).
- The dimensions are NOT transposed. */
-/*--------------------------------------------------------------------------*/
-
-int
-main (int argc, char **argv)
-{
- int i, j, k;
-
- ARCHnodes = 2;
- ARCHnodes1 = 4;
-
-/* Dynamic memory allocations and initializations */
-
- mem_init ();
-
- for (j = 0; j < 3; j++)
- {
- for (i = 0; i < 2; i++)
- {
- for (k = 0; k < 3; k++)
- {
- printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][k][k]);
- }
- printf ("\n");
- }
- printf ("\n");
- }
- for (i = 0; i < 2; i++)
- for (j = 0; j < 3; j++)
- free (vel[i][j]);
-
- for (i = 0; i < 2; i++)
- free (vel[i]);
-
- free (vel);
- return 0;
-}
-
-/*--------------------------------------------------------------------------*/
-/* Dynamic memory allocations and initializations */
-
-void
-mem_init (void)
-{
-
- signed int i, j, k,d;
-
- d = 0;
- vel = (int ***) malloc (ARCHnodes * sizeof (int **));
-
- for (i = 0; i < ARCHnodes; i++)
- {
- vel[i] = (int **) malloc (3 * sizeof (int *));
- if (vel[i] == (int **) NULL)
- {
- fprintf (stderr, "malloc failed for vel[%d]\n", i);
- fflush (stderr);
- exit (0);
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
- }
- }
- for (i = 0; i < ARCHnodes; i++)
- {
- for (j = 0; j < 3; j++)
- {
- for (k = 0; k < ARCHnodes1; k++)
- {
- printf ("acc to dim2 ");
- vel[i][j][k] = d;
- d++;
- }
- }
- }
- printf ("\n");
-}
-
-/*--------------------------------------------------------------------------*/
-/* { dg-final-use { scan-ipa-dump-times "Flattened 3 dimensions" 1 "matrix-reorg" } } */
-/* { dg-final-use { scan-ipa-dump-times "Transposed" 0 "matrix-reorg" } } */
-/* { dg-final-use { cleanup-ipa-dump "matrix-reorg" } } */
diff --git a/gcc/testsuite/gcc.dg/max-1.c b/gcc/testsuite/gcc.dg/max-1.c
index 40f2145c03..9823dca597 100644
--- a/gcc/testsuite/gcc.dg/max-1.c
+++ b/gcc/testsuite/gcc.dg/max-1.c
@@ -7,19 +7,16 @@
/* m32c has varying sized pointers */
/* { dg-skip-if "" { "m32c-*-*" } { "*" } { "-mcpu=m32c" "-mcpu=m32cm" } } */
-/* Kludge to make it signed. */
-#define unsigned signed
-__extension__ typedef __SIZE_TYPE__ ssize_t;
-#undef unsigned
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
extern void abort (void);
-ssize_t fff[10];
+intptr_t fff[10];
-void f(ssize_t a, ssize_t b)
+void f(intptr_t a, intptr_t b)
{
- ssize_t crcc = b;
- ssize_t d = *((ssize_t*)(a+1));
+ intptr_t crcc = b;
+ intptr_t d = *((intptr_t*)(a+1));
int i;
a = d >= b? d:b;
@@ -32,11 +29,11 @@ void f(ssize_t a, ssize_t b)
/* The variable a cannot be a local variable as we get better aliasing
now and decide that the store to a is dead. The better aliasing comes
from better representation of pointer arithmetic. */
-ssize_t a = 10;
+intptr_t a = 10;
int main(void)
{
int i;
- f((ssize_t)(&a)-1,0);
+ f((intptr_t)(&a)-1,0);
for(i = 0;i<10;i++)
if (fff[i]!=10)
abort ();
diff --git a/gcc/testsuite/gcc.dg/misaligned-expand-1.c b/gcc/testsuite/gcc.dg/misaligned-expand-1.c
new file mode 100644
index 0000000000..b799b6b87c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/misaligned-expand-1.c
@@ -0,0 +1,41 @@
+/* Test that expand can generate correct loads of misaligned data even on
+ strict alignment platforms. */
+
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+extern void abort ();
+
+typedef unsigned int myint __attribute__((aligned(1)));
+
+unsigned int
+foo (myint *p)
+{
+ return *p;
+}
+
+#define cst (int) 0xdeadbeef
+#define NUM 8
+
+struct blah
+{
+ char c;
+ myint i[NUM];
+};
+
+struct blah g;
+
+int
+main (int argc, char **argv)
+{
+ int i, k;
+ for (k = 0; k < NUM; k++)
+ {
+ g.i[k] = cst;
+ i = foo (&g.i[k]);
+
+ if (i != cst)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/misaligned-expand-2.c b/gcc/testsuite/gcc.dg/misaligned-expand-2.c
new file mode 100644
index 0000000000..7f6c6d19a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/misaligned-expand-2.c
@@ -0,0 +1,40 @@
+/* Test that expand can generate correct stores to misaligned data even on
+ strict alignment platforms. */
+
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+extern void abort ();
+
+typedef unsigned int myint __attribute__((aligned(1)));
+
+void
+foo (myint *p, unsigned int i)
+{
+ *p = i;
+}
+
+#define cst (int) 0xdeadbeef
+#define NUM 8
+
+struct blah
+{
+ char c;
+ myint i[NUM];
+};
+
+struct blah g;
+
+int
+main (int argc, char **argv)
+{
+ int k;
+
+ for (k = 0; k < NUM; k++)
+ {
+ foo (&g.i[k], cst);
+ if (g.i[k] != cst)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/misaligned-expand-3.c b/gcc/testsuite/gcc.dg/misaligned-expand-3.c
new file mode 100644
index 0000000000..5b1c7e7e07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/misaligned-expand-3.c
@@ -0,0 +1,43 @@
+/* Test that expand can generate correct stores to misaligned data of complex
+ type even on strict alignment platforms. */
+
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+extern void abort ();
+
+typedef _Complex float mycmplx __attribute__((aligned(1)));
+
+void
+foo (mycmplx *p, float r, float i)
+{
+ __real__ *p = r;
+ __imag__ *p = i;
+}
+
+#define cvr 3.2f
+#define cvi 2.5f
+#define NUM 8
+
+struct blah
+{
+ char c;
+ mycmplx x[NUM];
+} __attribute__((packed));
+
+struct blah g;
+
+int
+main (int argc, char **argv)
+{
+ int k;
+
+ for (k = 0; k < NUM; k++)
+ {
+ foo (&g.x[k], cvr, cvi);
+ if (__real__ g.x[k] != cvr
+ || __imag__ g.x[k] != cvi)
+ abort ();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/mismatch-decl-1.c b/gcc/testsuite/gcc.dg/mismatch-decl-1.c
new file mode 100644
index 0000000000..da4db0a57f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/mismatch-decl-1.c
@@ -0,0 +1,22 @@
+/* This test assumes -fbuiltin and not -fansi to get "index" and "memchr" builtin DECLs. */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+/* The bug this is testing is that if a new decl conflicts with an
+ explicit decl, you don't get the "changes type of builtin" message,
+ but if there was *also* a builtin, you *also* don't get the
+ "previous declaration was here" message, leaving you with no clue
+ where the previous declaration came from. */
+
+extern char foo(int,int); /* { dg-message "previous declaration of 'foo' was here" } */
+extern char *index(const char *,int); /* { dg-message "previous declaration of 'index' was here" } */
+
+/* This changes the type of "index", which is both a builtin and an
+ explicit decl. */
+int index; /* { dg-error "redeclared as different kind of symbol" } */
+
+/* This changes the type of "memchr", which is only a builtin. */
+int memchr; /* { dg-warning "built-in function 'memchr' declared as non-function" } */
+
+/* This changes the type of "foo", which is only an explicit decl. */
+int foo; /* { dg-error "redeclared as different kind of symbol" } */
diff --git a/gcc/testsuite/gcc.dg/no-strict-overflow-4.c b/gcc/testsuite/gcc.dg/no-strict-overflow-4.c
index 32d35c4cb4..c3b57bba02 100644
--- a/gcc/testsuite/gcc.dg/no-strict-overflow-4.c
+++ b/gcc/testsuite/gcc.dg/no-strict-overflow-4.c
@@ -12,8 +12,5 @@ foo (int i)
return i + 1 > i;
}
-/* We expect to see "<bb N>"; confirm that, so that we know to count
- it in the real test. */
-/* { dg-final { scan-tree-dump-times "<bb\[^>\]*>" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times ">|<" 3 "optimized" } } */
+/* { dg-final { scan-tree-dump "\[^ \]*_.(\\\(D\\\))? (>|<) \[^ \]*_." "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/nofixed-point-2.c b/gcc/testsuite/gcc.dg/nofixed-point-2.c
index 5b2f209501..8442a1984c 100644
--- a/gcc/testsuite/gcc.dg/nofixed-point-2.c
+++ b/gcc/testsuite/gcc.dg/nofixed-point-2.c
@@ -20,10 +20,10 @@ f3 (void)
return 0k; /* { dg-error "not supported" "reject fixed-point" } */
}
-_Sat
-f4 (void) /* { dg-error "not supported" "reject fixed-point" } */
+_Sat /* { dg-error "not supported" "reject fixed-point" } */
+f4 (void)
{
return 0k; /* { dg-error "not supported" "reject fixed-point" } */
}
-/* { dg-error "is used without" "" { target *-*-* } 24 } */
+/* { dg-error "is used without" "" { target *-*-* } 23 } */
diff --git a/gcc/testsuite/gcc.dg/noncompile/950825-1.c b/gcc/testsuite/gcc.dg/noncompile/950825-1.c
index 4f4c6fbb9e..43dca2f103 100644
--- a/gcc/testsuite/gcc.dg/noncompile/950825-1.c
+++ b/gcc/testsuite/gcc.dg/noncompile/950825-1.c
@@ -1,4 +1,4 @@
main()
{
-return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible" } */
+return (struct x) {{y: 0}}; /* { dg-error "extra|near|excess|incompatible|invalid" } */
}
diff --git a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
index cc77a7d2b9..15460ef2bf 100644
--- a/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
+++ b/gcc/testsuite/gcc.dg/noncompile/noncompile.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2000, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/noreturn-8.c b/gcc/testsuite/gcc.dg/noreturn-8.c
index 50765da37e..1e75633c81 100644
--- a/gcc/testsuite/gcc.dg/noreturn-8.c
+++ b/gcc/testsuite/gcc.dg/noreturn-8.c
@@ -1,4 +1,4 @@
-/* { dg-do run } */
+/* { dg-do run { target nonpic } } */
/* { dg-options "-O2" } */
void exit (int);
void noreturn_autodetection_failed ();
diff --git a/gcc/testsuite/gcc.dg/pch/ident-1.c b/gcc/testsuite/gcc.dg/pch/ident-1.c
new file mode 100644
index 0000000000..0b7881aa09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/ident-1.c
@@ -0,0 +1,2 @@
+#include "ident-1.h"
+
diff --git a/gcc/testsuite/gcc.dg/pch/ident-1.hs b/gcc/testsuite/gcc.dg/pch/ident-1.hs
new file mode 100644
index 0000000000..421be43c13
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pch/ident-1.hs
@@ -0,0 +1 @@
+#ident "My true identity will never be revealed!"
diff --git a/gcc/testsuite/gcc.dg/pch/pch.exp b/gcc/testsuite/gcc.dg/pch/pch.exp
index 132e595cc3..818004db87 100644
--- a/gcc/testsuite/gcc.dg/pch/pch.exp
+++ b/gcc/testsuite/gcc.dg/pch/pch.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2002, 2003, 2007, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,6 +26,7 @@ load_lib torture-options.exp
dg-init
torture-init
set-torture-options $DG_TORTURE_OPTIONS
+pch-init
set old_dg_do_what_default "${dg-do-what-default}"
@@ -60,5 +60,6 @@ file delete $testh
set dg-do-what-default "$old_dg_do_what_default"
# All done.
+pch-finish
torture-finish
dg-finish
diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.c b/gcc/testsuite/gcc.dg/pch/valid-1.c
index b7f22d0dc1..d445c47d6f 100644
--- a/gcc/testsuite/gcc.dg/pch/valid-1.c
+++ b/gcc/testsuite/gcc.dg/pch/valid-1.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g" } */
#include "valid-1.h"/* { dg-warning "created with -gnone, but used with -g" } */
diff --git a/gcc/testsuite/gcc.dg/pch/valid-1.hs b/gcc/testsuite/gcc.dg/pch/valid-1.hs
index e1ed11df4c..20d9f65dd7 100644
--- a/gcc/testsuite/gcc.dg/pch/valid-1.hs
+++ b/gcc/testsuite/gcc.dg/pch/valid-1.hs
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g0" } */
extern int x;
diff --git a/gcc/testsuite/gcc.dg/pch/valid-1b.c b/gcc/testsuite/gcc.dg/pch/valid-1b.c
index a2709967c0..3113d0f744 100644
--- a/gcc/testsuite/gcc.dg/pch/valid-1b.c
+++ b/gcc/testsuite/gcc.dg/pch/valid-1b.c
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g0" } */
#include "valid-1b.h"
diff --git a/gcc/testsuite/gcc.dg/pch/valid-1b.hs b/gcc/testsuite/gcc.dg/pch/valid-1b.hs
index 6dc358735a..93b2256e35 100644
--- a/gcc/testsuite/gcc.dg/pch/valid-1b.hs
+++ b/gcc/testsuite/gcc.dg/pch/valid-1b.hs
@@ -1,3 +1,4 @@
+/* { dg-require-effective-target pch_supported_debug } */
/* { dg-options "-I. -Winvalid-pch -g" } */
extern int x;
diff --git a/gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c b/gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
index 26496a2e69..c04d96d823 100644
--- a/gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
+++ b/gcc/testsuite/gcc.dg/plugin/finish_unit_plugin.c
@@ -6,8 +6,20 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
#include "tree.h"
#include "tree-pass.h"
diff --git a/gcc/testsuite/gcc.dg/plugin/ggcplug.c b/gcc/testsuite/gcc.dg/plugin/ggcplug.c
index 3094b2ebb6..d441528e9d 100644
--- a/gcc/testsuite/gcc.dg/plugin/ggcplug.c
+++ b/gcc/testsuite/gcc.dg/plugin/ggcplug.c
@@ -5,8 +5,20 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "tree.h"
#include "toplev.h"
#include "basic-block.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
#include "tree.h"
#include "tree-pass.h"
diff --git a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
index 2c4cd49719..f80719a4ff 100644
--- a/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
+++ b/gcc/testsuite/gcc.dg/plugin/one_time_plugin.c
@@ -3,23 +3,69 @@
#include "gcc-plugin.h"
#include "system.h"
#include "coretypes.h"
+#include "tree.h"
#include "tm.h"
#include "toplev.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
#include "tree-pass.h"
#include "intl.h"
+#include "context.h"
int plugin_is_GPL_compatible;
-static bool one_pass_gate (void)
+namespace {
+
+const pass_data pass_data_one_pass =
+{
+ GIMPLE_PASS, /* type */
+ "cfg", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ PROP_gimple_any, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
+};
+
+class one_pass : public gimple_opt_pass
+{
+public:
+ one_pass(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_one_pass, ctxt),
+ counter(0)
+ {}
+
+ /* opt_pass methods: */
+ bool gate ();
+ unsigned int execute ();
+
+private:
+ int counter;
+}; // class one_pass
+
+} // anon namespace
+
+bool one_pass::gate (void)
{
return true;
}
-static unsigned int one_pass_exec (void)
+unsigned int one_pass::execute ()
{
- static int counter = 0;
-
if (counter > 0) {
printf ("Executed more than once \n");
}
@@ -27,24 +73,11 @@ static unsigned int one_pass_exec (void)
return 0;
}
-struct gimple_opt_pass one_pass =
+gimple_opt_pass *
+make_one_pass (gcc::context *ctxt)
{
- {
- GIMPLE_PASS,
- "cfg", /* name */
- one_pass_gate, /* gate */
- one_pass_exec, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_NONE, /* tv_id */
- PROP_gimple_any, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func /* todo_flags_finish */
- }
-};
+ return new one_pass (ctxt);
+}
int plugin_init (struct plugin_name_args *plugin_info,
@@ -52,7 +85,7 @@ int plugin_init (struct plugin_name_args *plugin_info,
{
struct register_pass_info p;
- p.pass = &one_pass.pass;
+ p.pass = make_one_pass (g);
p.reference_pass_name = "cfg";
p.ref_pass_instance_number = 1;
p.pos_op = PASS_POS_INSERT_AFTER;
diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp
index 444bd1bb6d..03ca4d145b 100644
--- a/gcc/testsuite/gcc.dg/plugin/plugin.exp
+++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/plugin/selfassign.c b/gcc/testsuite/gcc.dg/plugin/selfassign.c
index 84d2801d20..041f25dce3 100644
--- a/gcc/testsuite/gcc.dg/plugin/selfassign.c
+++ b/gcc/testsuite/gcc.dg/plugin/selfassign.c
@@ -7,14 +7,29 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "tree.h"
+#include "stringpool.h"
#include "toplev.h"
#include "basic-block.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
+#include "gimple-iterator.h"
#include "tree.h"
#include "tree-pass.h"
#include "intl.h"
#include "plugin-version.h"
#include "diagnostic.h"
+#include "context.h"
int plugin_is_GPL_compatible;
@@ -46,7 +61,7 @@ get_real_ref_rhs (tree expr)
e.g. D.1797_14, we need to grab the rhs of its SSA def
statement (i.e. foo.x). */
tree vdecl = SSA_NAME_VAR (expr);
- if (DECL_ARTIFICIAL (vdecl)
+ if ((!vdecl || DECL_ARTIFICIAL (vdecl))
&& !gimple_nop_p (SSA_NAME_DEF_STMT (expr)))
{
gimple def_stmt = SSA_NAME_DEF_STMT (expr);
@@ -86,6 +101,8 @@ get_real_ref_rhs (tree expr)
static tree
get_non_ssa_expr (tree expr)
{
+ if (!expr)
+ return NULL_TREE;
switch (TREE_CODE (expr))
{
case VAR_DECL:
@@ -149,7 +166,7 @@ get_non_ssa_expr (tree expr)
case SSA_NAME:
{
tree vdecl = SSA_NAME_VAR (expr);
- if (DECL_ARTIFICIAL (vdecl)
+ if ((!vdecl || DECL_ARTIFICIAL (vdecl))
&& !gimple_nop_p (SSA_NAME_DEF_STMT (expr)))
{
gimple def_stmt = SSA_NAME_DEF_STMT (expr);
@@ -209,7 +226,7 @@ warn_self_assign (gimple stmt)
if (TREE_CODE (lhs) == SSA_NAME)
{
lhs = SSA_NAME_VAR (lhs);
- if (DECL_ARTIFICIAL (lhs))
+ if (!lhs || DECL_ARTIFICIAL (lhs))
return;
}
@@ -244,7 +261,7 @@ execute_warn_self_assign (void)
gimple_stmt_iterator gsi;
basic_block bb;
- FOR_EACH_BB (bb)
+ FOR_EACH_BB_FN (bb, cfun)
{
for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
warn_self_assign (gsi_stmt (gsi));
@@ -261,25 +278,44 @@ gate_warn_self_assign (void)
return true;
}
-static struct gimple_opt_pass pass_warn_self_assign =
+namespace {
+
+const pass_data pass_data_warn_self_assign =
{
- {
- GIMPLE_PASS,
- "warn_self_assign", /* name */
- gate_warn_self_assign, /* gate */
- execute_warn_self_assign, /* execute */
- NULL, /* sub */
- NULL, /* next */
- 0, /* static_pass_number */
- TV_NONE, /* tv_id */
- PROP_ssa, /* properties_required */
- 0, /* properties_provided */
- 0, /* properties_destroyed */
- 0, /* todo_flags_start */
- TODO_dump_func /* todo_flags_finish */
- }
+ GIMPLE_PASS, /* type */
+ "warn_self_assign", /* name */
+ OPTGROUP_NONE, /* optinfo_flags */
+ true, /* has_gate */
+ true, /* has_execute */
+ TV_NONE, /* tv_id */
+ PROP_ssa, /* properties_required */
+ 0, /* properties_provided */
+ 0, /* properties_destroyed */
+ 0, /* todo_flags_start */
+ 0, /* todo_flags_finish */
};
+class pass_warn_self_assign : public gimple_opt_pass
+{
+public:
+ pass_warn_self_assign(gcc::context *ctxt)
+ : gimple_opt_pass(pass_data_warn_self_assign, ctxt)
+ {}
+
+ /* opt_pass methods: */
+ bool gate () { return gate_warn_self_assign (); }
+ unsigned int execute () { return execute_warn_self_assign (); }
+
+}; // class pass_warn_self_assign
+
+} // anon namespace
+
+static gimple_opt_pass *
+make_pass_warn_self_assign (gcc::context *ctxt)
+{
+ return new pass_warn_self_assign (ctxt);
+}
+
/* The initialization routine exposed to and called by GCC. The spec of this
function is defined in gcc/gcc-plugin.h.
@@ -306,7 +342,7 @@ plugin_init (struct plugin_name_args *plugin_info,
return 1;
/* Self-assign detection should happen after SSA is constructed. */
- pass_info.pass = &pass_warn_self_assign.pass;
+ pass_info.pass = make_pass_warn_self_assign (g);
pass_info.reference_pass_name = "ssa";
pass_info.ref_pass_instance_number = 1;
pass_info.pos_op = PASS_POS_INSERT_AFTER;
diff --git a/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c b/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c
index 5b16e84a43..e83476b63f 100644
--- a/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c
+++ b/gcc/testsuite/gcc.dg/plugin/start_unit_plugin.c
@@ -1,7 +1,7 @@
/* This plugin tests the correct operation of a PLUGIN_START_UNIT callback.
* By the time a PLUGIN_START_UNIT callback is invoked, the frontend
* initialization should have completed. At least the different *_type_nodes
- * should have been created. This plugin creates an artifical global
+ * should have been created. This plugin creates an artificial global
* interger variable.
*
*/
@@ -10,8 +10,21 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "tree.h"
+#include "stringpool.h"
#include "toplev.h"
#include "basic-block.h"
+#include "pointer-set.h"
+#include "hash-table.h"
+#include "vec.h"
+#include "ggc.h"
+#include "basic-block.h"
+#include "tree-ssa-alias.h"
+#include "internal-fn.h"
+#include "gimple-fold.h"
+#include "tree-eh.h"
+#include "gimple-expr.h"
+#include "is-a.h"
#include "gimple.h"
#include "tree.h"
#include "tree-pass.h"
diff --git a/gcc/testsuite/gcc.dg/pointer-arith-10.c b/gcc/testsuite/gcc.dg/pointer-arith-10.c
index 220891e209..52b1989ef9 100644
--- a/gcc/testsuite/gcc.dg/pointer-arith-10.c
+++ b/gcc/testsuite/gcc.dg/pointer-arith-10.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
/* { dg-options "-fdump-tree-original" } */
-char *foo(char *p, __SIZE_TYPE__ i)
+char *foo(char *p, __UINTPTR_TYPE__ i)
{
- return (char *)i + (__SIZE_TYPE__)p;
+ return (char *)i + (__UINTPTR_TYPE__)p;
}
/* { dg-final { scan-tree-dump "p +" "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr10474.c b/gcc/testsuite/gcc.dg/pr10474.c
new file mode 100644
index 0000000000..77ccc4606e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr10474.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { { x86_64-*-* && lp64 } || { powerpc*-*-* && lp64 } } } } */
+/* { dg-options "-O3 -fdump-rtl-pro_and_epilogue" } */
+
+void f(int *i)
+{
+ if (!i)
+ return;
+ else
+ {
+ __builtin_printf("Hi");
+ *i=0;
+ }
+}
+
+/* { dg-final { scan-rtl-dump "Performing shrink-wrapping" "pro_and_epilogue" } } */
+/* { dg-final { cleanup-rtl-dump "pro_and_epilogue" } } */
diff --git a/gcc/testsuite/gcc.dg/pr14092-1.c b/gcc/testsuite/gcc.dg/pr14092-1.c
index 927ecf6aa3..61fc8f7016 100644
--- a/gcc/testsuite/gcc.dg/pr14092-1.c
+++ b/gcc/testsuite/gcc.dg/pr14092-1.c
@@ -6,7 +6,7 @@
/* Define this so that we are more portable. The testcase in the
PR failed on 64-bit hosts. */
-typedef int __attribute__ ((mode (__pointer__))) intptr_t;
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
typedef struct _PLCI {
unsigned char x;
diff --git a/gcc/testsuite/gcc.dg/pr17055-1.c b/gcc/testsuite/gcc.dg/pr17055-1.c
index d550076d6b..31037ab266 100644
--- a/gcc/testsuite/gcc.dg/pr17055-1.c
+++ b/gcc/testsuite/gcc.dg/pr17055-1.c
@@ -3,7 +3,7 @@
/* { dg-options "-O2 -ffast-math" } */
/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
-/* This test used to abort, beacuse we do an "integer" fold to zero, i.e.
+/* This test used to abort, because we do an "integer" fold to zero, i.e.
x - x = (T)0 where T is the type of x. Unfortunately, fold_convert
was unable to convert integer_zero_node to the appropriate vector type. */
diff --git a/gcc/testsuite/gcc.dg/pr19105.c b/gcc/testsuite/gcc.dg/pr19105.c
new file mode 100644
index 0000000000..499aa89565
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr19105.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/19105 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
+
+enum e
+{
+ a, b, c, d, e, f, g, h
+};
+
+int range1 (enum e v, int x)
+{
+ return x && v != c && v != d && v != e;
+}
+
+int range2 (enum e v, int x)
+{
+ return x && (v != c && v != d && v != e);
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests v_\[0-9\]*.D. -.2, 2. and -.3, 4.\[\n\r\]* into|Optimizing range tests v_\[0-9\]*.D. -.2, 2. and -.3, 3. and -.4, 4.\[\n\r\]* into" 1 "reassoc1" } } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/pr19340.c b/gcc/testsuite/gcc.dg/pr19340.c
index 4a665910a9..c75d35d1d0 100644
--- a/gcc/testsuite/gcc.dg/pr19340.c
+++ b/gcc/testsuite/gcc.dg/pr19340.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fschedule-insns2 -fsched2-use-superblocks" } */
-/* { dg-skip-if "No scheduling" { mmix-*-* cris-*-* crisv32-*-* fido-*-* m68k-*-* m32c-*-* avr-*-* moxie-*-* } { "*" } { "" } } */
+/* { dg-require-effective-target scheduling } */
extern double f (double x);
diff --git a/gcc/testsuite/gcc.dg/pr21643.c b/gcc/testsuite/gcc.dg/pr21643.c
new file mode 100644
index 0000000000..be5a15e98d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr21643.c
@@ -0,0 +1,90 @@
+/* PR tree-optimization/21643 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc1-details" } */
+
+int
+f1 (unsigned char c)
+{
+ if (c == 0x22 || c == 0x20 || c < 0x20)
+ return 1;
+ return 0;
+}
+
+int
+f2 (unsigned char c)
+{
+ if (c == 0x22 || c <= 0x20)
+ return 1;
+ return 0;
+}
+
+int
+f3 (unsigned char c)
+{
+ if (c == 0x22)
+ return 1;
+ if (c == 0x20)
+ return 1;
+ if (c < 0x20)
+ return 1;
+ return 0;
+}
+
+int
+f4 (unsigned char c)
+{
+ if (c == 0x22 || c == 0x20 || c < 0x20)
+ return 2;
+ return 0;
+}
+
+int
+f5 (unsigned char c)
+{
+ if (c == 0x22 || c <= 0x20)
+ return 2;
+ return 0;
+}
+
+int
+f6 (unsigned char c)
+{
+ if (c == 0x22)
+ return 2;
+ if (c == 0x20)
+ return 2;
+ if (c < 0x20)
+ return 2;
+ return 0;
+}
+
+int
+f7 (unsigned char c)
+{
+ if (c != 0x22 && c != 0x20 && c >= 0x20)
+ return 0;
+ return 1;
+}
+
+int
+f8 (unsigned char c)
+{
+ if (c == 0x22 && c <= 0x20)
+ return 0;
+ return 1;
+}
+
+int
+f9 (unsigned char c)
+{
+ if (c == 0x22)
+ return 0;
+ if (c == 0x20)
+ return 0;
+ if (c < 0x20)
+ return 0;
+ return 1;
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests c_\[0-9\]*.D. -.0, 31. and -.32, 32.\[\n\r\]* into" 6 "reassoc1" } } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr23623.c b/gcc/testsuite/gcc.dg/pr23623.c
new file mode 100644
index 0000000000..7ba1470182
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr23623.c
@@ -0,0 +1,48 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target size32plus } */
+/* { dg-options "-fstrict-volatile-bitfields -fdump-rtl-final" } */
+
+/* With -fstrict-volatile-bitfields, the volatile accesses to bf2.b
+ and bf3.b must do unsigned int reads/writes. The non-volatile
+ accesses to bf1.b are not so constrained. */
+
+extern struct
+{
+ unsigned int b : 1;
+ unsigned int : 31;
+} bf1;
+
+extern volatile struct
+{
+ unsigned int b : 1;
+ unsigned int : 31;
+} bf2;
+
+extern struct
+{
+ volatile unsigned int b : 1;
+ volatile unsigned int : 31;
+} bf3;
+
+void writeb(void)
+{
+ bf1.b = 1;
+ bf2.b = 1; /* volatile read + volatile write */
+ bf3.b = 1; /* volatile read + volatile write */
+}
+
+extern unsigned int x1, x2, x3;
+
+void readb(void)
+{
+ x1 = bf1.b;
+ x2 = bf2.b; /* volatile write */
+ x3 = bf3.b; /* volatile write */
+}
+
+/* There should be 6 volatile MEMs total, but scan-rtl-dump-times counts
+ the number of match variables and not the number of matches. Since
+ the parenthesized subexpression in the regexp introduces an extra match
+ variable, we need to give a count of 12 instead of 6 here. */
+/* { dg-final { scan-rtl-dump-times "mem/v(/.)*:SI" 12 "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.dg/pr24683.c b/gcc/testsuite/gcc.dg/pr24683.c
index 79d3210067..23cb3ab4b0 100644
--- a/gcc/testsuite/gcc.dg/pr24683.c
+++ b/gcc/testsuite/gcc.dg/pr24683.c
@@ -1,11 +1,11 @@
/* { dg-do compile { target fpic } } */
/* { dg-options "-O2 -fPIC" } */
-int *block;
+const int *block;
void final(unsigned int j)
{
unsigned int i;
- unsigned char *data = (unsigned char *)"\0";
+ const unsigned char *data = (const unsigned char *)"\0";
for (i = 0; i < 8; i++)
for (; j + 63 < 1; j += 64)
- block = (int *) &data[j];
+ block = (const int *) &data[j];
}
diff --git a/gcc/testsuite/gcc.dg/pr25682.c b/gcc/testsuite/gcc.dg/pr25682.c
index 8c51d82403..e8cab1d05e 100644
--- a/gcc/testsuite/gcc.dg/pr25682.c
+++ b/gcc/testsuite/gcc.dg/pr25682.c
@@ -11,7 +11,7 @@ struct S
};
char c[(char *) &((struct S *) 0)->b - (char *) 0]; /* { dg-warning "variably modified" } */
-char d[(__SIZE_TYPE__) &((struct S *) 8)->b]; /* { dg-warning "variably modified" } */
+char d[(__UINTPTR_TYPE__) &((struct S *) 8)->b]; /* { dg-warning "variably modified" } */
char e[sizeof (c) == __builtin_offsetof (struct S, b) ? 1 : -1];
char f[sizeof (d) == __builtin_offsetof (struct S, b) + 8 ? 1 : -1];
@@ -21,7 +21,7 @@ void
foo (void)
{
char g[(char *) &((struct S *) 0)->b - (char *) 0];
- char h[(__SIZE_TYPE__) &((struct S *) 8)->b];
+ char h[(__UINTPTR_TYPE__) &((struct S *) 8)->b];
char i[sizeof (g) == __builtin_offsetof (struct S, b) ? 1 : -1];
char j[sizeof (h) == __builtin_offsetof (struct S, b) + 8 ? 1 : -1];
bar (g, h);
diff --git a/gcc/testsuite/gcc.dg/pr25805.c b/gcc/testsuite/gcc.dg/pr25805.c
index 71182c52f2..94133ddd95 100644
--- a/gcc/testsuite/gcc.dg/pr25805.c
+++ b/gcc/testsuite/gcc.dg/pr25805.c
@@ -2,6 +2,7 @@
storage for d1.a. */
/* { dg-do run } */
/* { dg-options "" } */
+/* { dg-skip-if "packed attribute missing for d1" { "epiphany-*-*" } { "*" } { "" } } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/pr26570.c b/gcc/testsuite/gcc.dg/pr26570.c
index 5768d32cc1..71c16f2074 100644
--- a/gcc/testsuite/gcc.dg/pr26570.c
+++ b/gcc/testsuite/gcc.dg/pr26570.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fprofile-generate -fprofile-use" } */
+/* { dg-options "-O2 -fprofile-generate -fprofile-use -fopt-info" } */
unsigned test (unsigned a, unsigned b)
{
diff --git a/gcc/testsuite/gcc.dg/pr27095.c b/gcc/testsuite/gcc.dg/pr27095.c
index b88d390731..8d2b47b77c 100644
--- a/gcc/testsuite/gcc.dg/pr27095.c
+++ b/gcc/testsuite/gcc.dg/pr27095.c
@@ -2,9 +2,12 @@
/* { dg-options "-O2" } */
/* On MIPS, disable generating hints (R_MIPS_JALR) for PIC calls. In addition
- to the load from the GOT this also contains the name of the funtion so for
+ to the load from the GOT this also contains the name of the function so for
each call the function name would appear twice. */
/* { dg-options "-O2 -mno-relax-pic-calls" { target mips*-*-* } } */
+/* For epiphany, use -mshort-calls to avoid loading the address in two
+ steps using lowpart and highpart. */
+/* { dg-options "-O2 -mshort-calls" { target epiphany-*-* } } */
extern void *memset (void *, int, __SIZE_TYPE__);
extern __SIZE_TYPE__ strlen (const char *);
diff --git a/gcc/testsuite/gcc.dg/pr28796-2.c b/gcc/testsuite/gcc.dg/pr28796-2.c
index 9b87c5ab4e..f56a5d4a44 100644
--- a/gcc/testsuite/gcc.dg/pr28796-2.c
+++ b/gcc/testsuite/gcc.dg/pr28796-2.c
@@ -2,7 +2,6 @@
/* { dg-options "-O2 -funsafe-math-optimizations -fno-finite-math-only -DUNSAFE" } */
/* { dg-add-options ieee } */
/* { dg-skip-if "No Inf/NaN support" { spu-*-* } } */
-/* { dg-skip-if "Bug in _Q_dtoq" { sparc*-sun-solaris2.8 } } */
#include "tg-tests.h"
diff --git a/gcc/testsuite/gcc.dg/pr30286.c b/gcc/testsuite/gcc.dg/pr30286.c
index 9ec49b4231..d35eacd807 100644
--- a/gcc/testsuite/gcc.dg/pr30286.c
+++ b/gcc/testsuite/gcc.dg/pr30286.c
@@ -1,6 +1,7 @@
/* PR middle-end/30286 */
/* { dg-do run } */
/* { dg-options "-O2 -ftrapv" } */
+/* { dg-require-effective-target trapping } */
extern void abort (void);
struct S { struct S *s; };
diff --git a/gcc/testsuite/gcc.dg/pr30360.c b/gcc/testsuite/gcc.dg/pr30360.c
index d4dae0d5f4..4254c0a38c 100644
--- a/gcc/testsuite/gcc.dg/pr30360.c
+++ b/gcc/testsuite/gcc.dg/pr30360.c
@@ -1,5 +1,5 @@
/* PR c/30360 */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* ia64-*-linux* s390*-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* ia64-*-linux* s390*-*-linux* } } */
/* { dg-options "-O2 -std=gnu99" } */
#define I (__extension__ 1.0iF)
diff --git a/gcc/testsuite/gcc.dg/pr30744-1.c b/gcc/testsuite/gcc.dg/pr30744-1.c
index a35c5526aa..f08f3be172 100644
--- a/gcc/testsuite/gcc.dg/pr30744-1.c
+++ b/gcc/testsuite/gcc.dg/pr30744-1.c
@@ -2,15 +2,17 @@
/* { dg-options "-O2" } */
#include <stddef.h>
+typedef __INTPTR_TYPE__ my_intptr_t;
+
typedef struct {
- ptrdiff_t unique;
+ my_intptr_t unique;
} G;
void r(G* n)
{
- ptrdiff_t p;
- if (((G *) ((void *)((~(ptrdiff_t)(p))))) != ((void *)0)) {
- ((G *) ((void *)((~(ptrdiff_t)(p)))))->unique = n->unique;
+ my_intptr_t p;
+ if (((G *) ((void *)((~(my_intptr_t)(p))))) != ((void *)0)) {
+ ((G *) ((void *)((~(my_intptr_t)(p)))))->unique = n->unique;
}
}
diff --git a/gcc/testsuite/gcc.dg/pr31490.c b/gcc/testsuite/gcc.dg/pr31490.c
index 1c682db5fb..37731b3a33 100644
--- a/gcc/testsuite/gcc.dg/pr31490.c
+++ b/gcc/testsuite/gcc.dg/pr31490.c
@@ -3,6 +3,8 @@
/* { dg-require-named-sections "" } */
/* { dg-require-effective-target ptr32plus } */
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
+
int cpu (void *attr) {}
-const unsigned long x __attribute__((section("foo"))) = (unsigned long)&cpu;
-const unsigned long g __attribute__((section("foo"))) = 0;
+const uintptr_t x __attribute__((section("foo"))) = (uintptr_t)&cpu;
+const uintptr_t g __attribute__((section("foo"))) = 0;
diff --git a/gcc/testsuite/gcc.dg/pr32773.c b/gcc/testsuite/gcc.dg/pr32773.c
index e9cdd4c377..19a90195ad 100644
--- a/gcc/testsuite/gcc.dg/pr32773.c
+++ b/gcc/testsuite/gcc.dg/pr32773.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -fprofile-use" } */
-/* { dg-options "-O -m4 -fprofile-use" { target sh-*-* } } */
+/* { dg-options "-O -fprofile-use -fopt-info" } */
+/* { dg-options "-O -m4 -fprofile-use -fopt-info" { target sh-*-* } } */
void foo (int *p)
{
diff --git a/gcc/testsuite/gcc.dg/pr32912-2.c b/gcc/testsuite/gcc.dg/pr32912-2.c
index f29e63e705..2e800784d5 100644
--- a/gcc/testsuite/gcc.dg/pr32912-2.c
+++ b/gcc/testsuite/gcc.dg/pr32912-2.c
@@ -1,14 +1,24 @@
/* { dg-do run } */
/* { dg-options "-O2 -w" } */
-/* { dg-skip-if "TImode not supported" { "avr-*-*" } { "*" } { "" } } */
extern void abort (void);
#if(__SIZEOF_INT__ >= 4)
-typedef int __m128i __attribute__ ((__vector_size__ (16)));
+# define TYPE int
+# define TYPED(a) a
+
+#elif(__SIZEOF_INT__ > 2)
+# define TYPE long
+# define TYPED(a) a##L
+
#else
-typedef long __m128i __attribute__ ((__vector_size__ (16)));
+# define TYPE long long
+# define TYPED(a) a##LL
#endif
+
+
+typedef TYPE __m128i __attribute__ ((__vector_size__ (16)));
+
__m128i
foo (void)
{
@@ -26,11 +36,7 @@ bar (void)
int
main (void)
{
-#if(__SIZEOF_INT__ >= 4)
- union { __m128i v; int i[sizeof (__m128i) / sizeof (int)]; } u, v;
-#else
- union { __m128i v; long i[sizeof (__m128i) / sizeof (long)]; } u, v;
-#endif
+ union { __m128i v; TYPE i[sizeof (__m128i) / sizeof (TYPE)]; } u, v;
int i;
u.v = foo ();
@@ -39,9 +45,10 @@ main (void)
{
if (u.i[i] != ~v.i[i])
abort ();
+
if (i < 3)
{
- if (u.i[i] != (0x11111111 << i))
+ if (u.i[i] != (TYPED (0x11111111) << i))
abort ();
}
else if (u.i[i])
diff --git a/gcc/testsuite/gcc.dg/pr34856.c b/gcc/testsuite/gcc.dg/pr34856.c
index 6bfc704774..62041e248b 100644
--- a/gcc/testsuite/gcc.dg/pr34856.c
+++ b/gcc/testsuite/gcc.dg/pr34856.c
@@ -3,7 +3,7 @@
/* { dg-options "-O2 -msse2" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-O2 -maltivec" { target { powerpc*-*-linux* && powerpc_altivec_ok } } } */
-typedef unsigned __attribute__ ((__mode__ (__pointer__))) uintptr_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
#undef __vector
#define __vector __attribute__ ((__vector_size__ (16)))
diff --git a/gcc/testsuite/gcc.dg/pr35635.c b/gcc/testsuite/gcc.dg/pr35635.c
index 45d10a67bd..86612d5283 100644
--- a/gcc/testsuite/gcc.dg/pr35635.c
+++ b/gcc/testsuite/gcc.dg/pr35635.c
@@ -62,9 +62,9 @@ void func3()
/* At least one branch of ? does not fit in the destination, thus
warn. */
uchar_x = bar != 0 ? 2.1 : 10; /* { dg-warning "conversion" } */
- uchar_x = bar != 0
+ uchar_x = bar != 0 /* { dg-warning "negative integer implicitly converted to unsigned type" } */
? (unsigned char) 1024
- : -1; /* { dg-warning "negative integer implicitly converted to unsigned type" } */
+ : -1;
}
void func4()
diff --git a/gcc/testsuite/gcc.dg/pr37303.c b/gcc/testsuite/gcc.dg/pr37303.c
new file mode 100644
index 0000000000..bd9f4a8a6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr37303.c
@@ -0,0 +1,5 @@
+/* { dg-do compile { target *-*-elf* *-*-gnu* } } */
+/* { dg-options "-std=c99" }
+/* { dg-final { scan-assembler "rdata|rodata" } } */
+
+struct S { const int *x; } s = { (const int[]){1, 2, 3} };
diff --git a/gcc/testsuite/gcc.dg/pr37561.c b/gcc/testsuite/gcc.dg/pr37561.c
index ec712a7841..3ad826329f 100644
--- a/gcc/testsuite/gcc.dg/pr37561.c
+++ b/gcc/testsuite/gcc.dg/pr37561.c
@@ -1,7 +1,7 @@
/* PR c++/37561 */
/* { dg-do compile } */
-__extension__ __PTRDIFF_TYPE__ p;
+__extension__ __INTPTR_TYPE__ p;
char q;
void
diff --git a/gcc/testsuite/gcc.dg/pr37858.c b/gcc/testsuite/gcc.dg/pr37858.c
index 4a827eebd1..f606d4a5d1 100644
--- a/gcc/testsuite/gcc.dg/pr37858.c
+++ b/gcc/testsuite/gcc.dg/pr37858.c
@@ -1,6 +1,7 @@
/* PR middle-end/37858 */
+/* ??? With -dv removed, this test is a bit silly. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-ipa-early_local_cleanups -dv" } */
+/* { dg-options "-O2 -fdump-ipa-early_local_cleanups" } */
int
main (void)
diff --git a/gcc/testsuite/gcc.dg/pr37985.c b/gcc/testsuite/gcc.dg/pr37985.c
new file mode 100644
index 0000000000..93e640b4a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr37985.c
@@ -0,0 +1,8 @@
+/* PR c37985 */
+/* { dg-do compile } */
+/* { dg-options " -Wall -Wextra " } */
+unsigned char foo(unsigned char a)
+{
+ a >> 2; /* { dg-warning "no effect" } */
+ return a;
+}
diff --git a/gcc/testsuite/gcc.dg/pr38364.c b/gcc/testsuite/gcc.dg/pr38364.c
index 23f72de74e..6b22e9d78e 100644
--- a/gcc/testsuite/gcc.dg/pr38364.c
+++ b/gcc/testsuite/gcc.dg/pr38364.c
@@ -1,6 +1,7 @@
/* PR middle-end/38364 */
/* { dg-do run } */
/* { dg-options "-O2 -ftrapv" } */
+/* { dg-require-effective-target trapping } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/pr38700.c b/gcc/testsuite/gcc.dg/pr38700.c
index bfa75b0c7c..ebece7f0ff 100644
--- a/gcc/testsuite/gcc.dg/pr38700.c
+++ b/gcc/testsuite/gcc.dg/pr38700.c
@@ -5,7 +5,7 @@
int
foo ()
{
- __SIZE_TYPE__ s = __builtin_expect ((__SIZE_TYPE__)&&L, 0);
+ __UINTPTR_TYPE__ s = __builtin_expect ((__UINTPTR_TYPE__)&&L, 0);
L:
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/pr38984.c b/gcc/testsuite/gcc.dg/pr38984.c
index 11f1e7f211..3ccb0e492f 100644
--- a/gcc/testsuite/gcc.dg/pr38984.c
+++ b/gcc/testsuite/gcc.dg/pr38984.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-delete-null-pointer-checks -fdump-tree-optimized" }
+/* { dg-options "-O2 -fno-delete-null-pointer-checks -fdump-tree-optimized -fno-isolate-erroneous-paths-dereference" }
* */
int f(int *p)
diff --git a/gcc/testsuite/gcc.dg/pr39323-1.c b/gcc/testsuite/gcc.dg/pr39323-1.c
index 2876bf39ab..5e3baec4b6 100644
--- a/gcc/testsuite/gcc.dg/pr39323-1.c
+++ b/gcc/testsuite/gcc.dg/pr39323-1.c
@@ -1,5 +1,5 @@
/* PR c/39323 */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
int foo __attribute__ ((aligned(1 << 29))) = 20; /* { dg-error "requested alignment is too large" } */
typedef int __attribute__ ((aligned(1 << 29))) int29; /* { dg-error "requested alignment is too large" } */
diff --git a/gcc/testsuite/gcc.dg/pr39323-2.c b/gcc/testsuite/gcc.dg/pr39323-2.c
index 9304c74bc4..a870729734 100644
--- a/gcc/testsuite/gcc.dg/pr39323-2.c
+++ b/gcc/testsuite/gcc.dg/pr39323-2.c
@@ -1,5 +1,5 @@
/* PR c/39323 */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
int bar __attribute__ ((aligned(1 << 28))) = 20;
diff --git a/gcc/testsuite/gcc.dg/pr39323-3.c b/gcc/testsuite/gcc.dg/pr39323-3.c
index c045f17c83..b452d3c96e 100644
--- a/gcc/testsuite/gcc.dg/pr39323-3.c
+++ b/gcc/testsuite/gcc.dg/pr39323-3.c
@@ -1,5 +1,5 @@
/* PR c/39323 */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
typedef int __attribute__ ((aligned(1 << 28))) int28;
int28 foo = 20;
diff --git a/gcc/testsuite/gcc.dg/pr39464.c b/gcc/testsuite/gcc.dg/pr39464.c
new file mode 100644
index 0000000000..cd745406da
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr39464.c
@@ -0,0 +1,19 @@
+/* PR c/39464 */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+
+typedef int T __attribute__((may_alias));
+typedef unsigned int U __attribute__((may_alias));
+
+void
+foo (void *p)
+{
+ T *a = (int *) p; /* { dg-warning "initialization from incompatible pointer type" } */
+ int *b = (T *) p; /* { dg-warning "initialization from incompatible pointer type" } */
+ U *c = (unsigned int *) p; /* { dg-warning "initialization from incompatible pointer type" } */
+ unsigned int *d = (U *) p; /* { dg-warning "initialization from incompatible pointer type" } */
+ (void) a;
+ (void) b;
+ (void) c;
+ (void) d;
+}
diff --git a/gcc/testsuite/gcc.dg/pr40209.c b/gcc/testsuite/gcc.dg/pr40209.c
index f367f7c247..afe131fc5e 100644
--- a/gcc/testsuite/gcc.dg/pr40209.c
+++ b/gcc/testsuite/gcc.dg/pr40209.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fprofile-use" } */
+/* { dg-options "-O2 -fprofile-use -fopt-info" } */
void process(const char *s);
diff --git a/gcc/testsuite/gcc.dg/pr41241.c b/gcc/testsuite/gcc.dg/pr41241.c
index 42fb2f7e5c..893353b9e8 100644
--- a/gcc/testsuite/gcc.dg/pr41241.c
+++ b/gcc/testsuite/gcc.dg/pr41241.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug -g" } */
/* { dg-options "-O2 -fcompare-debug -g -march=i586 -mtune=i586 -fomit-frame-pointer" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
typedef struct { int t1; int t2; int t3; } *T;
typedef struct { int s; } S;
diff --git a/gcc/testsuite/gcc.dg/pr41345.c b/gcc/testsuite/gcc.dg/pr41345.c
index 4b146c0c20..b2c72c72fb 100644
--- a/gcc/testsuite/gcc.dg/pr41345.c
+++ b/gcc/testsuite/gcc.dg/pr41345.c
@@ -1,6 +1,7 @@
/* PR bootstrap/41345 */
/* { dg-do compile } */
/* { dg-options "-O2 -g -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void
foo (int *x)
diff --git a/gcc/testsuite/gcc.dg/pr41488.c b/gcc/testsuite/gcc.dg/pr41488.c
new file mode 100644
index 0000000000..c4bc42832b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr41488.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-sccp-scev" } */
+
+struct struct_t
+{
+ int* data;
+};
+
+void foo (struct struct_t* sp, int start, int end)
+{
+ int i;
+
+ for (i = 0; i+start < end; i++)
+ sp->data[i+start] = 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Simplify PEELED_CHREC into POLYNOMIAL_CHREC" 1 "sccp" } } */
+/* { dg-final { cleanup-tree-dump "sccp" } } */
diff --git a/gcc/testsuite/gcc.dg/pr41551.c b/gcc/testsuite/gcc.dg/pr41551.c
index e24fbc33db..2f2ad2be97 100644
--- a/gcc/testsuite/gcc.dg/pr41551.c
+++ b/gcc/testsuite/gcc.dg/pr41551.c
@@ -3,10 +3,10 @@
/* Make sure we do not ICE. */
-__extension__ typedef __SIZE_TYPE__ size_t;
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
int main(void)
{
int var, *p = &var;
- return (double)(size_t)(p);
+ return (double)(uintptr_t)(p);
}
diff --git a/gcc/testsuite/gcc.dg/pr42611.c b/gcc/testsuite/gcc.dg/pr42611.c
index c33e248caf..19e0b2bc06 100644
--- a/gcc/testsuite/gcc.dg/pr42611.c
+++ b/gcc/testsuite/gcc.dg/pr42611.c
@@ -9,11 +9,11 @@
: sizeof (__SIZE_TYPE__) == sizeof (long) ? __LONG_MAX__ \
: sizeof (__SIZE_TYPE__) == sizeof (long long) ? __LONG_LONG_MAX__ \
: __INTMAX_MAX__)
-struct S { int a; char b[L]; };
+struct S { int a; char b[L]; }; /* { dg-error "type .struct S. is too large" } */
void
foo (void)
{
- struct S s; /* { dg-error "is too large" } */
+ struct S s;
asm volatile ("" : : "r" (&s));
}
diff --git a/gcc/testsuite/gcc.dg/pr42629.c b/gcc/testsuite/gcc.dg/pr42629.c
index 4d80068ff3..a5eeb0cc1e 100644
--- a/gcc/testsuite/gcc.dg/pr42629.c
+++ b/gcc/testsuite/gcc.dg/pr42629.c
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fsched-pressure -fschedule-insns -fcompare-debug" } */
/* { dg-require-effective-target int32plus } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int lzo_adler32(int adler, char *buf)
{
diff --git a/gcc/testsuite/gcc.dg/pr42630.c b/gcc/testsuite/gcc.dg/pr42630.c
index 34543dab5e..5685637a07 100644
--- a/gcc/testsuite/gcc.dg/pr42630.c
+++ b/gcc/testsuite/gcc.dg/pr42630.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fvariable-expansion-in-unroller -funroll-loops -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int sum(int *buf, int len)
{
diff --git a/gcc/testsuite/gcc.dg/pr42631.c b/gcc/testsuite/gcc.dg/pr42631.c
index f5ac5a53a1..18fb67d1d5 100644
--- a/gcc/testsuite/gcc.dg/pr42631.c
+++ b/gcc/testsuite/gcc.dg/pr42631.c
@@ -15,6 +15,7 @@
/* { dg-do compile } */
/* { dg-options "-g -O1 -funroll-loops -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void foo()
{
diff --git a/gcc/testsuite/gcc.dg/pr42719.c b/gcc/testsuite/gcc.dg/pr42719.c
index 94a58e41a1..06adf52a4e 100644
--- a/gcc/testsuite/gcc.dg/pr42719.c
+++ b/gcc/testsuite/gcc.dg/pr42719.c
@@ -1,6 +1,7 @@
/* PR tree-optimization/42719 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftracer -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int *v;
diff --git a/gcc/testsuite/gcc.dg/pr42728.c b/gcc/testsuite/gcc.dg/pr42728.c
index 7b2fbb690f..8bd7b06ff8 100644
--- a/gcc/testsuite/gcc.dg/pr42728.c
+++ b/gcc/testsuite/gcc.dg/pr42728.c
@@ -1,6 +1,7 @@
/* PR debug/42728 */
/* { dg-do compile } */
/* { dg-options "-O1 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void
foo (char *a)
diff --git a/gcc/testsuite/gcc.dg/pr42889.c b/gcc/testsuite/gcc.dg/pr42889.c
index d3421736de..b518b2057f 100644
--- a/gcc/testsuite/gcc.dg/pr42889.c
+++ b/gcc/testsuite/gcc.dg/pr42889.c
@@ -1,6 +1,7 @@
/* PR rtl-optimization/42889 */
/* { dg-do compile } */
/* { dg-options "-O -fgcse -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
extern int A[], B[];
diff --git a/gcc/testsuite/gcc.dg/pr42916.c b/gcc/testsuite/gcc.dg/pr42916.c
index d32ba94882..c2e69e3618 100644
--- a/gcc/testsuite/gcc.dg/pr42916.c
+++ b/gcc/testsuite/gcc.dg/pr42916.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -funroll-loops -ftree-vectorize -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int seed;
diff --git a/gcc/testsuite/gcc.dg/pr43084.c b/gcc/testsuite/gcc.dg/pr43084.c
index c3101248af..df5510071b 100644
--- a/gcc/testsuite/gcc.dg/pr43084.c
+++ b/gcc/testsuite/gcc.dg/pr43084.c
@@ -1,6 +1,7 @@
/* PR debug/43084 */
/* { dg-do compile } */
/* { dg-options "-O1 -fipa-struct-reorg -fwhole-program -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
struct S
{
diff --git a/gcc/testsuite/gcc.dg/pr43670.c b/gcc/testsuite/gcc.dg/pr43670.c
index f152b4d7a6..19504b728f 100644
--- a/gcc/testsuite/gcc.dg/pr43670.c
+++ b/gcc/testsuite/gcc.dg/pr43670.c
@@ -1,6 +1,7 @@
/* PR debug/43670 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vrp -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/pr44023.c b/gcc/testsuite/gcc.dg/pr44023.c
index df22bba83f..344ca28c52 100644
--- a/gcc/testsuite/gcc.dg/pr44023.c
+++ b/gcc/testsuite/gcc.dg/pr44023.c
@@ -3,6 +3,7 @@
/* { dg-options "-fcompare-debug -O2" } */
/* { dg-options "-fcompare-debug -O2 -mcpu=ev67" { target alpha*-*-* } } */
/* { dg-require-effective-target int32plus } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void
foo (unsigned f, long v, unsigned *w, unsigned a, unsigned b, unsigned e, unsigned c, unsigned d)
diff --git a/gcc/testsuite/gcc.dg/pr44024.c b/gcc/testsuite/gcc.dg/pr44024.c
index 38f41532f9..f5d72d55f5 100644
--- a/gcc/testsuite/gcc.dg/pr44024.c
+++ b/gcc/testsuite/gcc.dg/pr44024.c
@@ -10,5 +10,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump-not "foo" "original" } } */
+/* { dg-final { scan-tree-dump-not "foo" "original" { target { ! avr*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44194-1.c b/gcc/testsuite/gcc.dg/pr44194-1.c
index d993a42a02..7e9d0aeada 100644
--- a/gcc/testsuite/gcc.dg/pr44194-1.c
+++ b/gcc/testsuite/gcc.dg/pr44194-1.c
@@ -1,6 +1,7 @@
-/* { dg-do compile { target { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! alpha*-*-* } } } } */
-/* { dg-options "-O2 -fdump-rtl-dse1" } */
-/* Restricting to 64-bit targets since 32-bit targets return
+/* { dg-do compile { target { { { { { { i?86-*-* x86_64-*-* } && x32 } || lp64 } && { ! s390*-*-* } } && { ! hppa*64*-*-* } } && { ! alpha*-*-* } } } } */
+/* { dg-options "-O2 -fdump-rtl-dse1 -fdump-rtl-final" } */
+
+/* Restrict to 64-bit targets since 32-bit targets usually return small
structures in memory. */
struct ints { int a, b, c; } foo();
@@ -10,5 +11,13 @@ void func() {
struct ints s = foo();
bar(s.a, s.b);
}
-/* { dg-final { scan-rtl-dump "global deletions = (2|3)" "dse1" } } */
+
+/* { dg-final { scan-rtl-dump "global deletions = (2|3)" "dse1" } } */
/* { dg-final { cleanup-rtl-dump "dse1" } } */
+
+/* Here we want to ignore frame-related instructions, marked as insn/f,
+ that do things like store the link register to the stack. We also want
+ to treat insns the same regardless of whether they have a scheduling
+ :TI marker, so match both "insn " and "insn:". */
+/* { dg-final { scan-rtl-dump-not "insn\[: \]\[^\n\]*set \\(mem(?!\[^\n\]*scratch)" "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44214-1.c b/gcc/testsuite/gcc.dg/pr44214-1.c
new file mode 100644
index 0000000000..28194e48fc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44214-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -freciprocal-math -fdump-tree-ccp1" } */
+
+typedef double v2df __attribute__ ((vector_size (2 * sizeof (double))));
+
+void do_div (v2df *a, v2df *b)
+{
+ *a = *b / (v2df) { 2.0, 3.0 };
+}
+
+/* Constant folding should multiply *b by the reciprocals of the
+ vector elements. The fold does not take place for generic
+ vectors until the first CCP pass. The string " * " occurs 3
+ times: one multiply and two indirect parameters. */
+
+/* { dg-final { scan-tree-dump-times " \\\* " 3 "ccp1" } } */
+/* { dg-final { scan-tree-dump-times " / " 0 "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44214-2.c b/gcc/testsuite/gcc.dg/pr44214-2.c
new file mode 100644
index 0000000000..7e8581a2bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44214-2.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -freciprocal-math -fdump-tree-original" } */
+
+void do_div (_Complex double *a, _Complex double *b)
+{
+ *a = *b / (4.0 - 5.0fi);
+}
+
+/* Constant folding should multiply *b by the reciprocal of 4 - 5i
+ = 4/41 + (5/41)i. */
+
+/* { dg-final { scan-tree-dump-times " \\\* " 1 "original" } } */
+/* { dg-final { scan-tree-dump-times " / " 0 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44214-3.c b/gcc/testsuite/gcc.dg/pr44214-3.c
new file mode 100644
index 0000000000..a0eb35b1ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr44214-3.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ccp1" } */
+
+typedef double v2df __attribute__ ((vector_size (2 * sizeof (double))));
+
+void do_div (v2df *a, v2df *b)
+{
+ *a = *b / (v2df) { 2.0, 2.0 };
+}
+
+/* Since 2.0 has an exact reciprocal, constant folding should multiply *b
+ by the reciprocals of the vector elements. As a result there should be
+ one vector multiply and zero divides in the optimized code. The fold
+ does not take place for generic vectors until the first CCP pass. The
+ string " * " occurs 3 times: one multiply and two indirect parameters. */
+
+/* { dg-final { scan-tree-dump-times " \\\* " 3 "ccp1" } } */
+/* { dg-final { scan-tree-dump-times " / " 0 "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr44971.c b/gcc/testsuite/gcc.dg/pr44971.c
index a1faef51be..4314458098 100644
--- a/gcc/testsuite/gcc.dg/pr44971.c
+++ b/gcc/testsuite/gcc.dg/pr44971.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug -w" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
typedef struct
{
diff --git a/gcc/testsuite/gcc.dg/pr44974.c b/gcc/testsuite/gcc.dg/pr44974.c
index 14e43ece3c..a16c558331 100644
--- a/gcc/testsuite/gcc.dg/pr44974.c
+++ b/gcc/testsuite/gcc.dg/pr44974.c
@@ -2,9 +2,9 @@
/* { dg-do compile } */
/* { dg-options "-O -fno-optimize-sibling-calls" } */
-extern void foo (int status) __attribute__ ((__noreturn__));
-extern void bar (int status) __attribute__ ((__noreturn__));
-extern void _Exit (int status) __attribute__ ((__noreturn__));
+extern void foo (int status) __attribute__ ((__noreturn__,__noinline__));
+extern void bar (int status) __attribute__ ((__noreturn__,__noinline__));
+extern void _Exit (int status) __attribute__ ((__noreturn__,__noinline__));
void
foo (int status)
diff --git a/gcc/testsuite/gcc.dg/pr45416.c b/gcc/testsuite/gcc.dg/pr45416.c
index b8077dd947..5795034488 100644
--- a/gcc/testsuite/gcc.dg/pr45416.c
+++ b/gcc/testsuite/gcc.dg/pr45416.c
@@ -9,7 +9,7 @@ int foo(long long a)
return 0;
}
-/* { dg-final { scan-assembler "andl" { target i?86-*-linux* x86_64-*-linux* } } } " */
-/* { dg-final { scan-assembler-not "setne" { target i?86-*-linux* x86_64-*-linux* } } }" */
+/* { dg-final { scan-assembler "andl|bextr" { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } } " */
+/* { dg-final { scan-assembler-not "setne" { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } }" */
/* { dg-final { scan-assembler "and|ubfx" { target arm*-*-* } } } */
/* { dg-final { scan-assembler-not "moveq" { target arm*-*-* } } }" */
diff --git a/gcc/testsuite/gcc.dg/pr45449.c b/gcc/testsuite/gcc.dg/pr45449.c
index d7b69a1827..1162497405 100644
--- a/gcc/testsuite/gcc.dg/pr45449.c
+++ b/gcc/testsuite/gcc.dg/pr45449.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-pre -fno-tree-pta -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
struct S
{
diff --git a/gcc/testsuite/gcc.dg/pr46309-2.c b/gcc/testsuite/gcc.dg/pr46309-2.c
new file mode 100644
index 0000000000..f407e66070
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr46309-2.c
@@ -0,0 +1,147 @@
+/* PR tree-optimization/46309 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-reassoc-details" } */
+
+int foo (void);
+
+void
+f1 (int a)
+{
+ _Bool v1 = (a == 3);
+ _Bool v2 = (a == 1);
+ _Bool v3 = (a == 4);
+ _Bool v4 = (a == 2);
+ if (v1 || v2 || v3 || v4)
+ foo ();
+}
+
+void
+f2 (int a)
+{
+ _Bool v1 = (a == 1);
+ _Bool v2 = (a == 2);
+ _Bool v3 = (a == 3);
+ _Bool v4 = (a == 4);
+ if (v1 || v2 || v3 || v4)
+ foo ();
+}
+
+void
+f3 (unsigned int a)
+{
+ _Bool v1 = (a <= 31);
+ _Bool v2 = (a >= 64 && a <= 95);
+ _Bool v3 = (a >= 128 && a <= 159);
+ _Bool v4 = (a >= 192 && a <= 223);
+ if (v1 || v2 || v3 || v4)
+ foo ();
+}
+
+void
+f4 (int a)
+{
+ _Bool v1 = (a == 3);
+ _Bool v2 = (a == 1);
+ _Bool v3 = (a == 4);
+ _Bool v4 = (a == 2);
+ _Bool v5 = (a == 7);
+ _Bool v6 = (a == 5);
+ _Bool v7 = (a == 8);
+ _Bool v8 = (a == 6);
+ if (v1 || v2 || v3 || v4 || v5 || v6 || v7 || v8)
+ foo ();
+}
+
+void
+f5 (int a)
+{
+ _Bool v1 = (a != 3);
+ _Bool v2 = (a != 1);
+ _Bool v3 = (a != 4);
+ _Bool v4 = (a != 2);
+ _Bool v5 = (a != 7);
+ _Bool v6 = (a != 5);
+ _Bool v7 = (a != 8);
+ _Bool v8 = (a != 6);
+ if (v1 && v2 && v3 && v4 && v5 && v6 && v7 && v8)
+ foo ();
+}
+
+void
+f6 (int a)
+{
+ _Bool v1 = (a != 3);
+ _Bool v2 = (a != 1);
+ _Bool v3 = (a != 4);
+ _Bool v4 = (a != 2);
+ _Bool v5 = (a != 7);
+ _Bool v6 = (a != 5);
+ _Bool v7 = (a != 8);
+ _Bool v8 = (a != 6);
+ if ((v1 && v2 && v3 && v4) && (v5 && v6 && v7 && v8))
+ foo ();
+}
+
+int
+f7 (int a)
+{
+ _Bool v1 = (a == 3);
+ _Bool v2 = (a == 1);
+ _Bool v3 = (a == 4);
+ _Bool v4 = (a == 2);
+ _Bool v5 = (a == 7);
+ _Bool v6 = (a == 5);
+ _Bool v7 = (a == 8);
+ _Bool v8 = (a == 6);
+ return v1 || v2 || v3 || v4 || v5 || v6 || v7 || v8;
+}
+
+_Bool
+f8 (int a)
+{
+ _Bool v1 = (a == 3);
+ _Bool v2 = (a == 1);
+ _Bool v3 = (a == 4);
+ _Bool v4 = (a == 2);
+ _Bool v5 = (a == 7);
+ _Bool v6 = (a == 5);
+ _Bool v7 = (a == 8);
+ _Bool v8 = (a == 6);
+ return v1 || v2 || v3 || v4 || v5 || v6 || v7 || v8;
+}
+
+int
+f9 (int a)
+{
+ _Bool v1 = (a != 3);
+ _Bool v2 = (a != 1);
+ _Bool v3 = (a != 4);
+ _Bool v4 = (a != 2);
+ _Bool v5 = (a != 7);
+ _Bool v6 = (a != 5);
+ _Bool v7 = (a != 8);
+ _Bool v8 = (a != 6);
+ return v1 && v2 && v3 && v4 && v5 && v6 && v7 && v8;
+}
+
+_Bool
+f10 (int a)
+{
+ _Bool v1 = (a != 3);
+ _Bool v2 = (a != 1);
+ _Bool v3 = (a != 4);
+ _Bool v4 = (a != 2);
+ _Bool v5 = (a != 7);
+ _Bool v6 = (a != 5);
+ _Bool v7 = (a != 8);
+ _Bool v8 = (a != 6);
+ return v1 && v2 && v3 && v4 && v5 && v6 && v7 && v8;
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.2, 2. and -.3, 3. and -.4, 4.\[\n\r\]* into" 2 "reassoc1" } } */
+/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.0, 31. and -.64, 95.\[\n\r\]* into" 1 "reassoc1" } } */
+/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.128, 159. and -.192, 223.\[\n\r\]* into" 1 "reassoc1" } } */
+/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.2, 2. and -.3, 3. and -.4, 4. and -.5, 5. and -.6, 6. and -.7, 7. and -.8, 8.\[\n\r\]* into" 7 "reassoc1" } } */
+/* { dg-final { scan-tree-dump-times "Optimizing range tests \[^\r\n\]*_\[0-9\]* -.0, 31. and -.128, 159.\[\n\r\]* into" 1 "reassoc2" } } */
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
+/* { dg-final { cleanup-tree-dump "reassoc2" } } */
diff --git a/gcc/testsuite/gcc.dg/pr46309.c b/gcc/testsuite/gcc.dg/pr46309.c
index 68a344a1bd..bec7350aee 100644
--- a/gcc/testsuite/gcc.dg/pr46309.c
+++ b/gcc/testsuite/gcc.dg/pr46309.c
@@ -1,10 +1,10 @@
/* PR tree-optimization/46309 */
-/* { dg-do compile } */
+/* { dg-do compile { target { { ! logical_op_short_circuit } || { mips*-*-* avr*-*-* } } } } */
/* { dg-options "-O2 -fdump-tree-reassoc-details" } */
/* The transformation depends on BRANCH_COST being greater than 1
(see the notes in the PR), so try to force that. */
/* { dg-additional-options "-mtune=octeon2" { target mips*-*-* } } */
-/* { dg-additional-options "-mbranch-cost=2" { target avr*-*-* s390*-*-* } } */
+/* { dg-additional-options "-mbranch-cost=2" { target avr*-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
int
f1 (int a)
@@ -65,6 +65,6 @@ f6 (unsigned int a)
/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.1, 1. and -.2, 2.\[\n\r\]* into" 1 "reassoc1" } } */
/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.0, 31. and -.64, 95.\[\n\r\]* into" 2 "reassoc1" } } */
/* { dg-final { scan-tree-dump-times "Optimizing range tests a_\[0-9\]*.D. -.128, 159. and -.192, 223.\[\n\r\]* into" 1 "reassoc1" } } */
-/* { dg-final { scan-tree-dump-times "Optimizing range tests D.\[0-9\]*_\[0-9\]* -.0, 31. and -.128, 159.\[\n\r\]* into" 1 "reassoc2" } } */
+/* { dg-final { scan-tree-dump-times "Optimizing range tests \[^\r\n\]*_\[0-9\]* -.0, 31. and -.128, 159.\[\n\r\]* into" 1 "reassoc2" } } */
/* { dg-final { cleanup-tree-dump "reassoc1" } } */
/* { dg-final { cleanup-tree-dump "reassoc2" } } */
diff --git a/gcc/testsuite/gcc.dg/pr46647.c b/gcc/testsuite/gcc.dg/pr46647.c
index ab85e17a08..4510d695b1 100644
--- a/gcc/testsuite/gcc.dg/pr46647.c
+++ b/gcc/testsuite/gcc.dg/pr46647.c
@@ -25,5 +25,6 @@ func3 (void)
return 0;
}
-/* { dg-final { scan-tree-dump-not "memset" "optimized" } } */
+/* The xfail for avr, cris-* and crisv32-* is due to PR53535. */
+/* { dg-final { scan-tree-dump-not "memset" "optimized" { xfail avr-*-* cris-*-* crisv32-*-* } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr46728-6.c b/gcc/testsuite/gcc.dg/pr46728-6.c
index 66c6e2cabe..bcdaf90bdb 100644
--- a/gcc/testsuite/gcc.dg/pr46728-6.c
+++ b/gcc/testsuite/gcc.dg/pr46728-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -lm" } */
+/* { dg-options "-O2 -ffast-math -lm -fno-ident" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.dg/pr46771.c b/gcc/testsuite/gcc.dg/pr46771.c
index b44dfd466a..e4413027ce 100644
--- a/gcc/testsuite/gcc.dg/pr46771.c
+++ b/gcc/testsuite/gcc.dg/pr46771.c
@@ -1,6 +1,7 @@
/* PR debug/46771 */
/* { dg-do compile } */
/* { dg-options "-O -ftree-vectorize -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
unsigned char v[1600];
diff --git a/gcc/testsuite/gcc.dg/pr47684.c b/gcc/testsuite/gcc.dg/pr47684.c
index 475aa1549b..7cda812dd7 100644
--- a/gcc/testsuite/gcc.dg/pr47684.c
+++ b/gcc/testsuite/gcc.dg/pr47684.c
@@ -1,6 +1,7 @@
/* PR debug/47684 */
/* { dg-do compile } */
/* { dg-options "-O3 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int in[8][4];
int out[4];
diff --git a/gcc/testsuite/gcc.dg/pr47881.c b/gcc/testsuite/gcc.dg/pr47881.c
index ee1707342c..bad9806255 100644
--- a/gcc/testsuite/gcc.dg/pr47881.c
+++ b/gcc/testsuite/gcc.dg/pr47881.c
@@ -1,6 +1,7 @@
/* PR debug/47881 */
/* { dg-do compile } */
/* { dg-options "-O -fcompare-debug -fno-dce -funroll-loops -fno-web" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
extern int data[];
diff --git a/gcc/testsuite/gcc.dg/pr48186.c b/gcc/testsuite/gcc.dg/pr48186.c
new file mode 100644
index 0000000000..5635f930de
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48186.c
@@ -0,0 +1,5 @@
+/* PR tree-optimization/48186 */
+/* { dg-do compile } */
+/* { dg-options "-O --param hot-bb-frequency-fraction=0" } */
+
+void foo (void) { }
diff --git a/gcc/testsuite/gcc.dg/pr48189.c b/gcc/testsuite/gcc.dg/pr48189.c
new file mode 100644
index 0000000000..86b995dc98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48189.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/48189 */
+/* { dg-do compile } */
+/* { dg-options "-O --param max-predicted-iterations=0" } */
+
+struct S { int s[8]; };
+
+void
+foo (int *x, struct S *y)
+{
+ int i;
+ for (i = 0; y[i].s[i]; i++)
+ *x++ = y[i].s[i];
+}
diff --git a/gcc/testsuite/gcc.dg/pr48616.c b/gcc/testsuite/gcc.dg/pr48616.c
index 303f9a3dd3..4517d79211 100644
--- a/gcc/testsuite/gcc.dg/pr48616.c
+++ b/gcc/testsuite/gcc.dg/pr48616.c
@@ -1,7 +1,7 @@
/* PR tree-optimization/48616 */
/* { dg-do run } */
/* { dg-options "-O2 -ftree-vectorize" } */
-/* { dg-additional-options "-fno-common" { target alpha*-dec-osf* hppa*-*-hpux* } } */
+/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
extern void abort (void);
int a[4] __attribute__((aligned (32)));
diff --git a/gcc/testsuite/gcc.dg/pr48768.c b/gcc/testsuite/gcc.dg/pr48768.c
index 7d0383e83b..0ab22ee3a6 100644
--- a/gcc/testsuite/gcc.dg/pr48768.c
+++ b/gcc/testsuite/gcc.dg/pr48768.c
@@ -1,6 +1,7 @@
/* PR debug/48768 */
/* { dg-do compile } */
/* { dg-options "-O -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int a, b;
diff --git a/gcc/testsuite/gcc.dg/pr48774.c b/gcc/testsuite/gcc.dg/pr48774.c
index abd8c23193..91ce361ccb 100644
--- a/gcc/testsuite/gcc.dg/pr48774.c
+++ b/gcc/testsuite/gcc.dg/pr48774.c
@@ -1,6 +1,5 @@
/* PR target/48774 */
/* { dg-do run } */
-/* { dg-skip-if "PR 52125" { mips_rel } { "*" } { "" } } */
/* { dg-options "-O2 -funroll-loops" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/pr48784-1.c b/gcc/testsuite/gcc.dg/pr48784-1.c
new file mode 100644
index 0000000000..436d8c5518
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48784-1.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
+/* { dg-options "-fstrict-volatile-bitfields" } */
+
+extern void abort (void);
+
+#pragma pack(1)
+volatile struct S0 {
+ signed a : 7;
+ unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */
+ /* but it certainly can be fetched with an unaligned access */
+} g = {0,0xfffffff};
+
+int main() {
+ unsigned b = g.b;
+ if (b != 0xfffffff)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr48784-2.c b/gcc/testsuite/gcc.dg/pr48784-2.c
new file mode 100644
index 0000000000..966cbdb962
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr48784-2.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
+/* { dg-options "-fno-strict-volatile-bitfields" } */
+
+extern void abort (void);
+
+#pragma pack(1)
+volatile struct S0 {
+ signed a : 7;
+ unsigned b : 28; /* b can't be fetched with an aligned 32-bit access, */
+ /* but it certainly can be fetched with an unaligned access */
+} g = {0,0xfffffff};
+
+int main() {
+ unsigned b = g.b;
+ if (b != 0xfffffff)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr50017.c b/gcc/testsuite/gcc.dg/pr50017.c
index 66bef007da..feeb4d445e 100644
--- a/gcc/testsuite/gcc.dg/pr50017.c
+++ b/gcc/testsuite/gcc.dg/pr50017.c
@@ -1,6 +1,7 @@
/* PR debug/50017 */
/* { dg-do compile } */
/* { dg-options "-O3 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
struct S { int r, i; };
diff --git a/gcc/testsuite/gcc.dg/pr50763.c b/gcc/testsuite/gcc.dg/pr50763.c
index 60025e30a2..695b61c75f 100644
--- a/gcc/testsuite/gcc.dg/pr50763.c
+++ b/gcc/testsuite/gcc.dg/pr50763.c
@@ -12,5 +12,5 @@ foo (int c, int d)
while (c == d);
}
-/* { dg-final { scan-tree-dump-times "== 33" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "== 33" 2 "pre"} } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51034.c b/gcc/testsuite/gcc.dg/pr51034.c
new file mode 100644
index 0000000000..c9b9c27c9c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51034.c
@@ -0,0 +1,14 @@
+/* PR c/51034 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+struct S;
+
+int
+main ()
+{
+ struct R { typeof (((struct W) {})) x; } r; /* { dg-error "invalid use of undefined type" } */
+ struct S { typeof (((struct S) {})) x; } s; /* { dg-error "invalid use of undefined type" } */
+ struct T { int x[sizeof ((struct T) {})]; } t;/* { dg-error "invalid use of undefined type" } */
+ struct U { int x[sizeof((struct V){})];} u; /* { dg-error "invalid use of undefined type" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr51721.c b/gcc/testsuite/gcc.dg/pr51721.c
new file mode 100644
index 0000000000..b39adfb50c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51721.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/51721 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Warray-bounds" } */
+
+static int a[10], b[10], c[10], d[10];
+
+unsigned int
+f (unsigned int v)
+{
+ return v == 17 ? 11 : v;
+}
+
+unsigned int
+g (unsigned int v)
+{
+ return v == 17 ? 17 : v;
+}
+
+void
+t (unsigned int s)
+{
+ if (s >> 1 == 0)
+ {
+ a[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ a[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ b[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ c[g (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ c[g (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ d[f (s)] = 0; /* { dg-bogus "array subscript is above array bounds" } */
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr51879-12.c b/gcc/testsuite/gcc.dg/pr51879-12.c
new file mode 100644
index 0000000000..1b25e296fb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-12.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+__attribute__((pure)) int bar (int);
+__attribute__((pure)) int bar2 (int);
+void baz (int);
+
+int x, z;
+
+void
+foo (int y)
+{
+ int a = 0;
+ if (y == 6)
+ {
+ a += bar (7);
+ a += bar2 (6);
+ }
+ else
+ {
+ a += bar2 (6);
+ a += bar (7);
+ }
+ baz (a);
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "bar2 \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-16.c b/gcc/testsuite/gcc.dg/pr51879-16.c
new file mode 100644
index 0000000000..3a84e97469
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-16.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+struct S {
+ int i;
+};
+
+extern struct S foo (void);
+extern int foo2 (void);
+
+struct S s;
+
+int bar (int c) {
+ int r;
+
+ if (c)
+ {
+ s = foo ();
+ r = foo2 ();
+ }
+ else
+ {
+ s = foo ();
+ r = foo2 ();
+ }
+
+ return r;
+}
+
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "foo2 \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-17.c b/gcc/testsuite/gcc.dg/pr51879-17.c
new file mode 100644
index 0000000000..806fe7b0f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-17.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+struct S {
+ int i;
+};
+
+extern struct S foo (void);
+extern int foo2 (void);
+
+struct S s, s2;
+
+int bar (int c) {
+ int r;
+
+ if (c)
+ {
+ s = foo ();
+ r = foo2 ();
+ }
+ else
+ {
+ s2 = foo ();
+ r = foo2 ();
+ }
+
+ return r;
+}
+
+/* { dg-final { scan-tree-dump-times "foo \\(" 2 "pre"} } */
+/* { dg-final { scan-tree-dump-times "foo2 \\(" 2 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-18.c b/gcc/testsuite/gcc.dg/pr51879-18.c
new file mode 100644
index 0000000000..9b3cb80a4e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-18.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre -fno-tree-copy-prop -fno-tree-dominator-opts -fno-tree-copyrename" } */
+
+extern int foo (void);
+
+void bar (int c, int *p)
+{
+ int *q = p;
+
+ if (c)
+ *p = foo ();
+ else
+ *q = foo ();
+}
+
+/* { dg-final { scan-tree-dump-times "foo \\(" 1 "pre" { xfail *-*-* } } } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-2.c b/gcc/testsuite/gcc.dg/pr51879-2.c
new file mode 100644
index 0000000000..db385cba4a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-2.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+int bar (int);
+void baz (int);
+
+void
+foo (int y)
+{
+ int a;
+ if (y)
+ baz (bar (7) + 6);
+ else
+ baz (bar (7) + 6);
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "baz \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-3.c b/gcc/testsuite/gcc.dg/pr51879-3.c
new file mode 100644
index 0000000000..be4b374322
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-3.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+int bar (int);
+void baz (int);
+
+void
+foo (int y)
+{
+ int a;
+ if (y == 6)
+ a = bar (7) + 6;
+ else
+ a = bar (7) + 6;
+ baz (a);
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-4.c b/gcc/testsuite/gcc.dg/pr51879-4.c
new file mode 100644
index 0000000000..5cb47afdb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+int bar (int);
+void baz (int);
+
+int foo (int y)
+{
+ int a, b;
+ a = bar (7) + 6;
+ b = bar (7) + 6;
+ return a + b;
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 2 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-6.c b/gcc/testsuite/gcc.dg/pr51879-6.c
new file mode 100644
index 0000000000..8362a17001
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-6.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+
+int bar (int);
+void baz (int);
+void bla (int);
+
+void
+foo (int y)
+{
+ int a;
+ if (y == 6)
+ {
+ bla (5);
+ a = bar (7);
+ }
+ else
+ {
+ bla (5);
+ a = bar (7);
+ }
+ baz (a);
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879-7.c b/gcc/testsuite/gcc.dg/pr51879-7.c
new file mode 100644
index 0000000000..6c1d3209c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879-7.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+int bar (int);
+
+int z;
+
+void
+foo (int y)
+{
+ if (y == 6)
+ z = 5;
+ else
+ z = 5;
+}
+
+/* { dg-final { scan-tree-dump-times "z = 5" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr51879.c b/gcc/testsuite/gcc.dg/pr51879.c
new file mode 100644
index 0000000000..060624fd67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr51879.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+int bar (int);
+void baz (int);
+
+void
+foo (int y)
+{
+ int a;
+ if (y == 6)
+ a = bar (7);
+ else
+ a = bar (7);
+ baz (a);
+}
+
+/* { dg-final { scan-tree-dump-times "bar \\(" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52134.c b/gcc/testsuite/gcc.dg/pr52134.c
new file mode 100644
index 0000000000..44cb4a6f3d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52134.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+unsigned f(unsigned t)
+{
+ return (t*4)&-4;
+}
+int f1(int t)
+{
+ return (t*4)&-4;
+}
+
+/* { dg-final { scan-tree-dump-not "\\\&" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52267.c b/gcc/testsuite/gcc.dg/pr52267.c
new file mode 100644
index 0000000000..9ed88c0c43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52267.c
@@ -0,0 +1,24 @@
+/* PR tree-optimization/52267 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int
+foo (int a, int b)
+{
+ if (a > 3 || a < 0)
+ return a;
+ a &= 3;
+ return a & 3;
+}
+
+int
+bar (int a)
+{
+ if (a & ~3)
+ return a;
+ return a & 3;
+}
+
+/* { dg-final { scan-tree-dump-not "& 3" "optimized" } } */
+/* { dg-final { scan-tree-dump-not "& -4" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52283.c b/gcc/testsuite/gcc.dg/pr52283.c
new file mode 100644
index 0000000000..070e71aa59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52283.c
@@ -0,0 +1,17 @@
+/* Test for case labels not integer constant expressions but folding
+ to integer constants (used in Linux kernel). */
+/* { dg-do compile } */
+/* { dg-options "-pedantic" } */
+
+extern unsigned int u;
+
+void
+b (int c)
+{
+ switch (c)
+ {
+ case (int) (2 | ((4 < 8) ? 8 : u)): /* { dg-warning "case label is not an integer constant expression" } */
+ ;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr52448.c b/gcc/testsuite/gcc.dg/pr52448.c
new file mode 100644
index 0000000000..0aeb2130f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52448.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/52448 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-cselim -fdump-tree-cselim-details" } */
+
+extern void perhaps_free_something (void);
+
+void f1 (int *p, int a, int b, int cond, int cond2)
+{
+ *p = a;
+ if (cond)
+ perhaps_free_something ();
+ if (cond2)
+ *p = b;
+}
+
+void f2 (int *p, int a, int b, int *cond, int *cond2)
+{
+ int i;
+ *p = a;
+ for (i = 0; cond[i]; i++)
+ {
+ if (cond2[i])
+ *p = b;
+ perhaps_free_something ();
+ }
+}
+
+/* None of the above conditional stores might be made unconditional. */
+/* { dg-final { scan-tree-dump-not "cstore" "cselim" } } */
+/* { dg-final { cleanup-tree-dump "cselim" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52549.c b/gcc/testsuite/gcc.dg/pr52549.c
new file mode 100644
index 0000000000..90936529d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52549.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+#if __SIZEOF_POINTER__ == __SIZEOF_LONG__
+_mark (long obj, int i, char *a)
+{
+ (char *)&(((long *)(obj)) [i]) - a;
+}
+#elif __SIZEOF_POINTER__ == __SIZEOF_INT__
+_mark (int obj, int i, char *a)
+{
+ (char *)&(((int *)(obj)) [i]) - a;
+}
+#elif __SIZEOF_POINTER__ == __SIZEOF_LONG_LONG__
+__extension__ _mark (long long obj, int i, char *a)
+{
+ (char *)&(((int *)(obj)) [i]) - a;
+}
+#endif
diff --git a/gcc/testsuite/gcc.dg/pr52558-1.c b/gcc/testsuite/gcc.dg/pr52558-1.c
deleted file mode 100644
index c34ad0655d..0000000000
--- a/gcc/testsuite/gcc.dg/pr52558-1.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "--param allow-store-data-races=0 -O2 -fdump-tree-lim1" } */
-
-/* Test that `count' is not written to unless p->data > 0. */
-
-int count;
-
-struct obj {
- int data;
- struct obj *next;
-} *q;
-
-void func()
-{
- struct obj *p;
- for (p = q; p; p = p->next)
- if (p->data > 0)
- count++;
-}
-
-/* { dg-final { scan-tree-dump-times "MEM count_lsm.. count_lsm_flag" 1 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52558-2.c b/gcc/testsuite/gcc.dg/pr52558-2.c
deleted file mode 100644
index 6d5f51c4f0..0000000000
--- a/gcc/testsuite/gcc.dg/pr52558-2.c
+++ /dev/null
@@ -1,23 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "--param allow-store-data-races=0 -O2 -fdump-tree-lim1" } */
-
-/* Test that g_2 is not written to unless !g_1. */
-
-int g_1 = 1;
-int g_2 = 0;
-
-int func_1(void)
-{
- int l;
- for (l = 0; l < 1234; l++)
- {
- if (g_1)
- return l;
- else
- g_2 = 0;
- }
- return 999;
-}
-
-/* { dg-final { scan-tree-dump-times "MEM.*g_2_lsm_flag" 1 "lim1" } } */
-/* { dg-final { cleanup-tree-dump "lim1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52578.c b/gcc/testsuite/gcc.dg/pr52578.c
new file mode 100644
index 0000000000..0e668300f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52578.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-original" } */
+
+long bar (long i)
+{
+ return (long)((unsigned long)i + 2) - (long)i;
+}
+long foo (int i)
+{
+ return (long)((unsigned long)i + 2) - (long)i;
+}
+
+/* { dg-final { scan-tree-dump-times "return 2;" 2 "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr52803.c b/gcc/testsuite/gcc.dg/pr52803.c
new file mode 100644
index 0000000000..6774b0c6d2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52803.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fno-move-loop-invariants" } */
+
+int main () { return 0; }
diff --git a/gcc/testsuite/gcc.dg/pr52808.c b/gcc/testsuite/gcc.dg/pr52808.c
new file mode 100644
index 0000000000..b731cb4013
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr52808.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftracer" } */
+
+int **fn1 () __attribute__ ((__const__));
+int main ()
+{
+ int i;
+ i = 0;
+ for (;; i++)
+ if (*fn1 ()[i] && !'a' <= 0 && i <= 'z' || *fn1 ()[0] && 'a' <= 'z')
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53060.c b/gcc/testsuite/gcc.dg/pr53060.c
index 3b2f193d9e..503f054077 100644
--- a/gcc/testsuite/gcc.dg/pr53060.c
+++ b/gcc/testsuite/gcc.dg/pr53060.c
@@ -22,3 +22,7 @@ int main()
if (i[0] != 3) abort();
return 0;
}
+
+/* Ignore a warning that is irrelevant to the purpose of this test. */
+/* { dg-prune-output ".*GCC vector returned by reference.*" } */
+/* { dg-prune-output "changes the ABI" } */
diff --git a/gcc/testsuite/gcc.dg/pr53153.c b/gcc/testsuite/gcc.dg/pr53153.c
new file mode 100644
index 0000000000..8899e04e90
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53153.c
@@ -0,0 +1,61 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern void bar (void);
+
+/* Case 181 is not in the range for 'char'. */
+void
+foo1 (char *buf)
+{
+ int x = *buf;
+ switch (x)
+ {
+ case -76:
+ case 65:
+ case 181:
+ bar();
+ }
+}
+
+/* All cases are below the range of char. */
+void
+foo2 (char *buf)
+{
+ int x = *buf;
+ switch (x)
+ {
+ case -150:
+ case -140:
+ case -130:
+ bar();
+ }
+}
+
+/* All cases are above the range of char. */
+void
+foo3 (char *buf)
+{
+ int x = *buf;
+ switch (x)
+ {
+ case 130:
+ case 140:
+ case 150: /* This case is not in the range for 'char'. */
+ bar();
+ }
+}
+
+/* The bounding cases are partially out of range for char. */
+void
+foo4 (char *buf)
+{
+ int x = *buf;
+ switch (x)
+ {
+ case -130 ... -120:
+ case 100:
+ case 120 ... 130:
+ bar();
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr53196-1.c b/gcc/testsuite/gcc.dg/pr53196-1.c
new file mode 100644
index 0000000000..b33e0432eb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53196-1.c
@@ -0,0 +1,14 @@
+/* PR c/53196 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+extern int printf (const char *, ...);
+struct foo { int i; };
+
+int
+main ()
+{
+ struct foo f = (struct foo_typo) { }; /* { dg-error "invalid use of undefined type" } */
+ printf ("%d\n", f.i);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53196-2.c b/gcc/testsuite/gcc.dg/pr53196-2.c
new file mode 100644
index 0000000000..efb6a82c6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53196-2.c
@@ -0,0 +1,16 @@
+/* PR c/53196 */
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+extern int printf (const char *, ...);
+struct foo { int i; };
+
+int
+main ()
+{
+ struct foo f = (struct foo_typo) { }; /* { dg-error "invalid use of undefined type" } */
+ printf ("%d\n", f.i);
+ return 0;
+}
+
+/* { dg-error "ISO C forbids empty initializer braces" "" { target *-*-* } 11 } */
diff --git a/gcc/testsuite/gcc.dg/pr53265.c b/gcc/testsuite/gcc.dg/pr53265.c
new file mode 100644
index 0000000000..e1ca6f521e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53265.c
@@ -0,0 +1,157 @@
+/* PR tree-optimization/53265 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+/* { dg-require-effective-target size32plus } */
+
+void bar (void *);
+int baz (int);
+
+void
+fn1 (void)
+{
+ unsigned int a[128];
+ int i;
+
+ for (i = 0; i < 128; ++i) /* { dg-message "note: containing loop" } */
+ a[i] = i * 0x02000001; /* { dg-warning "invokes undefined behavior" } */
+ bar (a);
+}
+
+void
+fn2 (void)
+{
+ unsigned long long a[128];
+ int i;
+
+ for (i = 0; i < 128; i++) /* { dg-message "note: containing loop" } */
+ a[i] = (i + 1LL) * 0x0123456789ABCDEFLL; /* { dg-warning "invokes undefined behavior" } */
+ bar (a);
+}
+
+void
+fn3 (void)
+{
+ unsigned char a[16], b[16], c[16];
+ int i;
+
+ bar (b);
+ for (i = 0; i < (int) (sizeof (a) / sizeof (a[0])); i++) /* { dg-message "note: containing loop" } */
+ {
+ c[i + 8] = b[i]; /* { dg-warning "invokes undefined behavior" } */
+ a[i + 8] = b[i + 8];
+ }
+ bar (a);
+ bar (c);
+}
+
+void
+fn4 (void)
+{
+ unsigned int *a[32], *o, i;
+
+ bar (a);
+ for (i = 0; i <= sizeof (a) / sizeof (a[0]); i++) /* { dg-message "note: containing loop" "" } */
+ {
+ o = a[i]; /* { dg-warning "invokes undefined behavior" "" } */
+ bar (o);
+ }
+}
+
+void
+fn5 (void)
+{
+ unsigned short a[23940];
+ unsigned int b[1140];
+ int j;
+
+ bar (b);
+ for (j = 0; j < 1140; j++) /* { dg-message "note: containing loop" } */
+ a[23940 + j - 950] = b[j]; /* { dg-warning "invokes undefined behavior" } */
+ bar (a);
+}
+
+void
+fn6 (void)
+{
+ double a[4][3], b[12];
+ int i;
+ bar (b);
+ for (i = 0; i < 12; i++) /* { dg-message "note: containing loop" } */
+ a[0][i] = b[i] / 10000.0; /* { dg-warning "invokes undefined behavior" } */
+ bar (a);
+}
+
+void
+fn7 (void)
+{
+ int a[16], b, c;
+ bar (a);
+ for (b = a[c = 0]; c < 16; b = a[++c]) /* { dg-warning "invokes undefined behavior" "" } */
+ baz (b);
+}
+
+/* { dg-message "note: containing loop" "" { target *-*-* } 89 } */
+
+const void *va, *vb, *vc, *vd, *ve;
+const void *vf[4];
+void
+fn8 (void)
+{
+ unsigned long i;
+ vf[0] = va; vf[1] = vb; vf[2] = vc; vf[3] = vd;
+ for (i = 0; i < (sizeof (vf) / sizeof (vf[0])); i++)
+ if (!vf[i])
+ vf[i] = ve;
+}
+
+int wa, wb[53][5], wc[53][5];
+
+void
+fn9 (void)
+{
+ int i, j, k;
+ for (i = 0; i < 53; i++)
+ for (j = 16 / (((wa & 1) != 0) ? 8 : 4); j > 0; j--)
+ {
+ int d = 1;
+ if (wb[i][j] == 0 || wc[i][1] != 0)
+ continue;
+ for (k = 0; k < j; k++)
+ if (wc[i + k][1])
+ {
+ d = 0;
+ break;
+ }
+ if (!d)
+ continue;
+ wc[i][j] = baz (0);
+ }
+}
+
+int xa[18];
+
+void
+fn10 (void)
+{
+ int i;
+ for (i = 16; i < 32; i++) /* { dg-message "note: containing loop" } */
+ xa[i] = 26; /* { dg-warning "invokes undefined behavior" } */
+}
+
+__attribute__((noinline)) static void
+fn11 (int x)
+{
+ int i = 1;
+ if (x > 1)
+ do
+ baz (i);
+ while (++i != x); /* { dg-bogus "invokes undefined behavior" } */
+}
+
+void
+fn12 (void)
+{
+ fn11 (1);
+ fn11 (1);
+ fn11 (1);
+}
diff --git a/gcc/testsuite/gcc.dg/pr53352.c b/gcc/testsuite/gcc.dg/pr53352.c
new file mode 100644
index 0000000000..171bcd71ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53352.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+#include <stdlib.h>
+
+typedef union
+{
+ struct
+ {
+ unsigned char a;
+ unsigned char b;
+ unsigned char c;
+ unsigned char d;
+ } parts;
+ unsigned long whole;
+} T;
+
+T *g_t;
+
+void bar (unsigned long x)
+{
+ if (x != 0)
+ abort ();
+}
+
+int main ()
+{
+ T one;
+ T two;
+ T tmp1, tmp2;
+
+ one.whole = 0xFFE0E0E0UL;
+ two.whole = 0xFF000000UL;
+ tmp1.parts = two.parts;
+ tmp2.parts = one.parts;
+ tmp2.parts.c = tmp1.parts.c;
+ one.parts = tmp2.parts;
+
+ g_t = &one;
+ bar (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53532.c b/gcc/testsuite/gcc.dg/pr53532.c
new file mode 100644
index 0000000000..9caea40be9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53532.c
@@ -0,0 +1,13 @@
+/* PR c/53532 */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+struct S {};
+extern int foo (struct S);
+
+int
+main ()
+{
+ foo ((struct T) {}); /* { dg-error "invalid use of undefined type" } */
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53701.c b/gcc/testsuite/gcc.dg/pr53701.c
index 2c85223811..15bf07d61e 100644
--- a/gcc/testsuite/gcc.dg/pr53701.c
+++ b/gcc/testsuite/gcc.dg/pr53701.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
/* { dg-options "-O3 -fselective-scheduling2 -fsel-sched-pipelining" } */
typedef unsigned short int uint16_t;
-typedef unsigned long int uintptr_t;
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
typedef struct GFX_VTABLE
{
int color_depth;
diff --git a/gcc/testsuite/gcc.dg/pr53749.c b/gcc/testsuite/gcc.dg/pr53749.c
new file mode 100644
index 0000000000..136b5b09c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53749.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+#define N 1024
+unsigned char a[N], b[N], c[N];
+
+void f1(void)
+{
+ int i;
+ for (i = 0; i < N; ++i)
+ a[i] = b[i] * c[i];
+}
+
+void f2(void)
+{
+ int i;
+ for (i = 0; i < N; ++i)
+ a[i] = b[i] * 2;
+}
+
+void f3(void)
+{
+ int i;
+ for (i = 0; i < N; ++i)
+ a[i] = b[i] * 20;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53849.c b/gcc/testsuite/gcc.dg/pr53849.c
new file mode 100644
index 0000000000..eddc45fd9a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53849.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-O2 -ftree-parallelize-loops=2 -fno-tree-loop-im" } */
+
+extern int *b, *e[8], d;
+
+void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 8; ++i)
+ while (--d)
+ e[i] = 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr53881-1.c b/gcc/testsuite/gcc.dg/pr53881-1.c
new file mode 100644
index 0000000000..435d938a40
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53881-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a, b;
+void
+fn1 ()
+{
+ int c;
+ switch (a)
+ {
+ case 8:
+ c = 0;
+ goto Label;
+ case 0:
+ case 1:
+Label:
+ break;
+ default:
+ b = 0;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr53881-2.c b/gcc/testsuite/gcc.dg/pr53881-2.c
new file mode 100644
index 0000000000..f6f8f8bcb3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53881-2.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a,b,c;
+void
+fn1 ()
+{
+ switch (a)
+ {
+ case 0:
+ case 10:
+ b=c;
+out_bcon:
+ break;
+ case 3:
+ goto out_bcon;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr53887.c b/gcc/testsuite/gcc.dg/pr53887.c
new file mode 100644
index 0000000000..b46126cd2a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr53887.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+enum
+{ Failed, NoError, NoDiskette }
+a;
+int b, c;
+void
+fn1 ()
+{
+ if (c)
+ a << 1;
+ switch (b)
+ {
+ default:
+ a << 1;
+ case 0:
+ b = 0;
+ case 1:
+ case NoDiskette:
+ ;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr54087.c b/gcc/testsuite/gcc.dg/pr54087.c
new file mode 100644
index 0000000000..abb0af3d9b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54087.c
@@ -0,0 +1,18 @@
+/* PR54087. Verify __atomic_sub (val) uses __atomic_add (-val) if there is no
+ atomic_aub. */
+/* { dg-require-effective-target sync_int_long } */
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-final { scan-assembler-times "xadd" 2 } } */
+
+
+int a;
+
+int f1(int p)
+{
+ return __atomic_sub_fetch(&a, p, __ATOMIC_SEQ_CST) == 0;
+}
+
+int f2(int p)
+{
+ return __atomic_fetch_sub(&a, p, __ATOMIC_SEQ_CST) - p == 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr54113.c b/gcc/testsuite/gcc.dg/pr54113.c
new file mode 100644
index 0000000000..4c68099b36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54113.c
@@ -0,0 +1,5 @@
+/* { dg-do compile } */
+/* { dg-options "-Wmissing-prototypes" } */
+
+inline int foo (void) { return 42; } /* { dg-bogus "no previous prototype" } */
+extern int foo(void);
diff --git a/gcc/testsuite/gcc.dg/pr54355.c b/gcc/testsuite/gcc.dg/pr54355.c
new file mode 100644
index 0000000000..0a0b7fa970
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54355.c
@@ -0,0 +1,11 @@
+/* PR c/54355 */
+/* { dg-do compile } */
+
+void
+foo (int i)
+{
+ switch (i)
+ {
+ case 0: T x > /* { dg-error "(label|unknown type|expected)" } */
+ }
+} /* { dg-error "expected" } */
diff --git a/gcc/testsuite/gcc.dg/pr54472.c b/gcc/testsuite/gcc.dg/pr54472.c
new file mode 100644
index 0000000000..93952038ec
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54472.c
@@ -0,0 +1,9 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O -fschedule-insns -fselective-scheduling" } */
+
+int main ()
+{
+ int a[3][3][3];
+ __builtin_memset (a, 0, sizeof a);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr54669.c b/gcc/testsuite/gcc.dg/pr54669.c
new file mode 100644
index 0000000000..3868ae691d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54669.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/54669 */
+/* Testcase by Zdenek Sojka <zsojka@seznam.cz> */
+
+/* { dg-compile } */
+/* { dg-options "-O2 -fexceptions -fnon-call-exceptions" } */
+
+int a[10];
+
+void
+foo (void)
+{
+ int x;
+ int i;
+ for (i = 0; i < 1;)
+ {
+ int b[3];
+ for (i = 0; i < 1; i++)
+ b[i] = a[i];
+ if (&x)
+ a[0] = b[0];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr54676.c b/gcc/testsuite/gcc.dg/pr54676.c
new file mode 100644
index 0000000000..cb3a8a2d57
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54676.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/54676 */
+/* { dg-do compile } */
+/* { dg-options "-O -fno-tree-ccp -fno-tree-copy-prop -fno-tree-fre -ftree-vrp" } */
+
+struct S
+{
+ int s:1;
+};
+
+struct S bar (void);
+
+#if __SIZEOF_INT__ < 4
+#define int __INT32_TYPE__
+#endif
+
+int a;
+
+void
+foo (int x)
+{
+ struct S s = bar ();
+ while (!a)
+ {
+ int l = 94967295;
+ a = x || (s.s &= l);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr54782.c b/gcc/testsuite/gcc.dg/pr54782.c
new file mode 100644
index 0000000000..161b043c61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54782.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target pthread } */
+/* { dg-options "-O -ffast-math -ftree-parallelize-loops=2 -g" } */
+
+struct S
+{
+ int n;
+ float *a;
+};
+
+int
+foo (struct S *s)
+{
+ float sum = 0;
+ int i;
+ for (i = 0; i < s->n; i++)
+ sum += s->a[i];
+ return sum;
+}
diff --git a/gcc/testsuite/gcc.dg/pr54838.c b/gcc/testsuite/gcc.dg/pr54838.c
new file mode 100644
index 0000000000..9ed92f9e1d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54838.c
@@ -0,0 +1,24 @@
+/* PR middle-end/54838 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-forward-propagate -ftracer" } */
+
+void bar (void);
+
+void
+foo (void *b, int *c)
+{
+again:
+ switch (*c)
+ {
+ case 1:
+ if (!b)
+ {
+ bar ();
+ return;
+ }
+ goto again;
+ case 3:
+ if (!b)
+ goto again;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr54919.c b/gcc/testsuite/gcc.dg/pr54919.c
new file mode 100644
index 0000000000..9f1affce23
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54919.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/54919 */
+/* Testcase by Zdenek Sojka <zsojka@seznam.cz> */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -ffast-math -funroll-loops -fvariable-expansion-in-unroller" } */
+
+int a[10];
+extern void abort(void) __attribute__((noreturn));
+
+int __attribute__((__noinline__, __noclone__))
+foo (void)
+{
+ double d;
+ int i;
+ for (i = 0, d = 0; i < 64; i++)
+ d--;
+ return (int) d;
+}
+
+int
+main (void)
+{
+ if (foo () != -64)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr54921.c b/gcc/testsuite/gcc.dg/pr54921.c
new file mode 100644
index 0000000000..897877aa00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54921.c
@@ -0,0 +1,32 @@
+/* PR rtl-optimization/54921 */
+/* { dg-do run } */
+/* { dg-options "-Os -fno-omit-frame-pointer -fsched2-use-superblocks -ftree-slp-vectorize" } */
+/* { dg-additional-options "-fstack-protector" { target fstack_protector } } */
+
+struct A
+{
+ int a;
+ char b[32];
+} a, b;
+
+__attribute__((noinline, noclone))
+struct A
+bar (int x)
+{
+ struct A r;
+ static int n;
+ r.a = ++n;
+ __builtin_memset (r.b, 0, sizeof (r.b));
+ r.b[0] = x;
+ return r;
+}
+
+int
+main ()
+{
+ a = bar (3);
+ b = bar (4);
+ if (a.a != 1 || a.b[0] != 3 || b.a != 2 || b.b[0] != 4)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr54981.c b/gcc/testsuite/gcc.dg/pr54981.c
new file mode 100644
index 0000000000..aa77d60c44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr54981.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-loop-distribute-patterns -fcompare-debug" } */
+
+extern void bar(unsigned *, char *);
+
+void foo(char *s)
+{
+ unsigned i;
+ char t[2];
+
+ bar(&i, t);
+
+ for (i = 0; i < 2; i++)
+ s[i] = t[i];
+}
diff --git a/gcc/testsuite/gcc.dg/pr55010.c b/gcc/testsuite/gcc.dg/pr55010.c
new file mode 100644
index 0000000000..a3dc41d8d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55010.c
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/55010 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-march=i686" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+
+long long int a;
+unsigned long long int b;
+
+void
+foo (void)
+{
+ a = (a < 0) / ((a -= b) ? b >= ((b = a) || 0) : 0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr55027.c b/gcc/testsuite/gcc.dg/pr55027.c
new file mode 100644
index 0000000000..e72b8fc03d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55027.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-Ofast -fdump-tree-optimized-raw" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (2 * sizeof (double))));
+
+void f (v2df *x)
+{
+ *x = 0 + 1 * *x;
+}
+
+/* { dg-final { scan-tree-dump-not "gimple_assign" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr55122.c b/gcc/testsuite/gcc.dg/pr55122.c
new file mode 100644
index 0000000000..a290ae001a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55122.c
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/55122 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int i, a;
+unsigned long long b;
+
+void f(void)
+{
+ for(i = 0; i < 15; i++)
+ b *= b;
+
+ b *= a ? 0 : b;
+}
diff --git a/gcc/testsuite/gcc.dg/pr55150-1.c b/gcc/testsuite/gcc.dg/pr55150-1.c
new file mode 100644
index 0000000000..e42066b60c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55150-1.c
@@ -0,0 +1,73 @@
+/* PR middle-end/55150 */
+/* { dg-do compile } */
+/* { dg-options "-Os -g" } */
+/* { dg-require-effective-target int32plus } */
+
+typedef unsigned int KEY_TABLE_TYPE[(272 / 4)];
+ typedef unsigned int u32;
+ typedef unsigned char u8;
+ static const u32 Camellia_SBOX[][256] = {
+ };
+ static const u32 SIGMA[] = {
+ 0xa09e667f, 0x3bcc908b, 0xb67ae858, 0x4caa73b2, 0xc6ef372f, 0xe94f82be, 0x54ff53a5, 0xf1d36f1c, 0x10e527fa, 0xde682d1d, 0xb05688c2, 0xb3e6c1fd };
+ int Camellia_Ekeygen (int keyBitLength, const u8 * rawKey, KEY_TABLE_TYPE k) {
+ register u32 s0, s1, s2, s3;
+ k[0] = s0 = ( {
+ u32 r = *(const u32 *) (rawKey);
+ r;
+ }
+ );
+ k[2] = s2 = ( {
+ u32 r = *(const u32 *) (rawKey + 8);
+ r;
+ }
+ );
+ k[3] = s3 = ( {
+ u32 r = *(const u32 *) (rawKey + 12);
+ r;
+ }
+ );
+ if (keyBitLength != 128) {
+ k[8] = s0 = ( {
+ u32 r = *(const u32 *) (rawKey + 16);
+ r;
+ }
+ );
+ if (keyBitLength == 192) {
+ k[10] = s2 = ~s0;
+ k[11] = s3 = ~s1;
+ }
+ }
+ s0 ^= k[0], s1 ^= k[1], s2 ^= k[2], s3 ^= k[3];
+ if (keyBitLength == 128) {
+ k[4] = s0, k[5] = s1, k[6] = s2, k[7] = s3;
+ }
+ else {
+ k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3;
+ s0 ^= k[8], s1 ^= k[9], s2 ^= k[10], s3 ^= k[11];
+ do {
+ register u32 _t0, _t1, _t2, _t3;
+ _t0 = s2 ^ ((SIGMA + 10))[0];
+ _t3 ^= Camellia_SBOX[3][(_t0 >> 8) & 0xff];
+ s1 ^= _t3;
+ }
+ while (0);
+ do {
+ u32 _t0 = s0 >> (32 - 30);
+ s2 = (s2 << 30) | (s3 >> (32 - 30));
+ s3 = (s3 << 30) | _t0;
+ }
+ while (0);
+ k[40] = s0, k[41] = s1, k[42] = s2, k[43] = s3;
+ k[64] = s1, k[65] = s2, k[66] = s3, k[67] = s0;
+ s0 = k[8], s1 = k[9], s2 = k[10], s3 = k[11];
+ k[36] = s0, k[37] = s1, k[38] = s2, k[39] = s3;
+ s0 = k[12], s1 = k[13], s2 = k[14], s3 = k[15];
+ do {
+ s1 = (s1 << 15) | (s2 >> (32 - 15));
+ }
+ while (0);
+ k[12] = s0, k[13] = s1, k[14] = s2, k[15] = s3;
+ k[44] = s1, k[45] = s2, k[46] = s3, k[47] = s0;
+ }
+ }
diff --git a/gcc/testsuite/gcc.dg/pr55150-2.c b/gcc/testsuite/gcc.dg/pr55150-2.c
new file mode 100644
index 0000000000..1be769d37a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55150-2.c
@@ -0,0 +1,54 @@
+/* PR middle-end/55150 */
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-Os -g -fPIC" } */
+
+typedef unsigned char DES_cblock[8];
+ typedef struct DES_ks {
+ }
+ DES_key_schedule;
+ void DES_ede3_cbcm_encrypt (const unsigned char *in, unsigned char *out, long length, DES_key_schedule * ks1, DES_key_schedule * ks2, DES_key_schedule * ks3, DES_cblock * ivec1, DES_cblock * ivec2, int enc) {
+ register unsigned long tout0, tout1, xor0, xor1, m0, m1;
+ register long l = length;
+ unsigned long tin[2];
+ unsigned char *iv1, *iv2;
+ iv1 = &(*ivec1)[0];
+ iv2 = &(*ivec2)[0];
+ if (enc) {
+ (m0 = ((unsigned long) (*((iv1)++))), m0 |= ((unsigned long) (*((iv1)++))) << 8L, m0 |= ((unsigned long) (*((iv1)++))) << 16L, m0 |= ((unsigned long) (*((iv1)++))) << 24L);
+ (m1 = ((unsigned long) (*((iv1)++))), m1 |= ((unsigned long) (*((iv1)++))) << 8L, m1 |= ((unsigned long) (*((iv1)++))) << 16L, m1 |= ((unsigned long) (*((iv1)++))) << 24L);
+ (tout0 = ((unsigned long) (*((iv2)++))), tout0 |= ((unsigned long) (*((iv2)++))) << 8L, tout0 |= ((unsigned long) (*((iv2)++))) << 16L, tout0 |= ((unsigned long) (*((iv2)++))) << 24L);
+ for (l -= 8;
+ l >= -7;
+ l -= 8) {
+ DES_encrypt1 (tin, ks3, 1);
+ DES_encrypt1 (tin, ks1, 1);
+ }
+ (*((iv1)++) = (unsigned char) (((m0)) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 8L) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 16L) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 24L) & 0xff));
+ (*((iv1)++) = (unsigned char) (((m1)) & 0xff), *((iv1)++) = (unsigned char) (((m1) >> 8L) & 0xff), *((iv1)++) = (unsigned char) (((m1) >> 16L) & 0xff), *((iv1)++) = (unsigned char) (((m1) >> 24L) & 0xff));
+ (*((iv2)++) = (unsigned char) (((tout0)) & 0xff), *((iv2)++) = (unsigned char) (((tout0) >> 8L) & 0xff), *((iv2)++) = (unsigned char) (((tout0) >> 16L) & 0xff), *((iv2)++) = (unsigned char) (((tout0) >> 24L) & 0xff));
+ }
+ else {
+ (m0 = ((unsigned long) (*((iv1)++))), m0 |= ((unsigned long) (*((iv1)++))) << 8L, m0 |= ((unsigned long) (*((iv1)++))) << 16L, m0 |= ((unsigned long) (*((iv1)++))) << 24L);
+ (xor1 = ((unsigned long) (*((iv2)++))), xor1 |= ((unsigned long) (*((iv2)++))) << 8L, xor1 |= ((unsigned long) (*((iv2)++))) << 16L, xor1 |= ((unsigned long) (*((iv2)++))) << 24L);
+ for (l -= 8;
+ l >= -7;
+ l -= 8) {
+ DES_encrypt1 (tin, ks3, 1);
+ if (l < 0) {
+ {
+ switch (l + 8) {
+ case 7: *(--(out)) = (unsigned char) (((tout1) >> 16L) & 0xff);
+ case 6: *(--(out)) = (unsigned char) (((tout1) >> 8L) & 0xff);
+ case 5: *(--(out)) = (unsigned char) (((tout1)) & 0xff);
+ case 4: *(--(out)) = (unsigned char) (((tout0) >> 24L) & 0xff);
+ case 1: *(--(out)) = (unsigned char) (((tout0)) & 0xff);
+ }
+ };
+ }
+ }
+ (*((iv1)++) = (unsigned char) (((m0)) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 8L) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 16L) & 0xff), *((iv1)++) = (unsigned char) (((m0) >> 24L) & 0xff));
+ (*((iv2)++) = (unsigned char) (((xor0)) & 0xff), *((iv2)++) = (unsigned char) (((xor0) >> 8L) & 0xff), *((iv2)++) = (unsigned char) (((xor0) >> 16L) & 0xff), *((iv2)++) = (unsigned char) (((xor0) >> 24L) & 0xff));
+ (*((iv2)++) = (unsigned char) (((xor1)) & 0xff), *((iv2)++) = (unsigned char) (((xor1) >> 8L) & 0xff), *((iv2)++) = (unsigned char) (((xor1) >> 16L) & 0xff), *((iv2)++) = (unsigned char) (((xor1) >> 24L) & 0xff));
+ }
+ }
diff --git a/gcc/testsuite/gcc.dg/pr55153.c b/gcc/testsuite/gcc.dg/pr55153.c
new file mode 100644
index 0000000000..215090cc42
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55153.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/55153 */
+/* { dg-do compile } */
+/* { dg-options "-O -fsched2-use-superblocks -fschedule-insns2" } */
+/* { dg-require-effective-target scheduling } */
+
+extern int a[];
+
+void
+foo (void)
+{
+ __builtin_prefetch (a, 0, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr55191.c b/gcc/testsuite/gcc.dg/pr55191.c
new file mode 100644
index 0000000000..568425ce03
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55191.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/55191 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a, b;
+
+void f(void)
+{
+ b = a || b;
+
+ for(a = 0; a < 2; a++);
+ while(1);
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr55430.c b/gcc/testsuite/gcc.dg/pr55430.c
new file mode 100644
index 0000000000..ac56cacea5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55430.c
@@ -0,0 +1,46 @@
+/* PR middle-end/55430 */
+/* { dg-do run { target mmap } } */
+/* { dg-options "-O2" } */
+
+#include <stddef.h>
+#include <stdio.h>
+#include <sys/mman.h>
+#ifndef MAP_ANONYMOUS
+#define MAP_ANONYMOUS MAP_ANON
+#endif
+#ifndef MAP_ANON
+#define MAP_ANON 0
+#endif
+#ifndef MAP_FAILED
+#define MAP_FAILED ((void *)-1)
+#endif
+#include <stdlib.h>
+
+struct S
+{
+ unsigned int s1 : 8;
+ unsigned int s2 : 2;
+};
+
+__attribute__((noinline, noclone)) int
+foo (int x, int y, struct S *z, unsigned int w)
+{
+ if (z[y].s2 == x && z[y].s1 == w)
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ char *p = mmap (NULL, 131072, PROT_READ | PROT_WRITE,
+ MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);
+ if (p == MAP_FAILED)
+ return 0;
+ if (munmap (p + 65536, 65536) < 0)
+ return 0;
+ if ((65536 / sizeof (struct S)) * sizeof (struct S) != 65536)
+ return 0;
+ struct S *s = (struct S *) (p + 65536);
+ return foo (0, 0, s - 1, 0) != 1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr55702.c b/gcc/testsuite/gcc.dg/pr55702.c
new file mode 100644
index 0000000000..8770a3758d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55702.c
@@ -0,0 +1,9 @@
+/* PR sanitizer/55702 */
+/* { dg-do compile { target { x86_64-*-linux* && lp64 } } } */
+/* { dg-options "-fsanitize=thread" } */
+
+void
+foo ()
+{
+ __builtin_return (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr55831.c b/gcc/testsuite/gcc.dg/pr55831.c
new file mode 100644
index 0000000000..ce7be63e1d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55831.c
@@ -0,0 +1,39 @@
+/* PR tree-optimization/55831 */
+/* { dg-do compile } */
+/* { dg-options "-O -fstrict-overflow -ftree-vectorize -Wno-unused-label" } */
+
+int g;
+short p, q;
+
+void
+foo (void)
+{
+ short a = p, b = q, i;
+
+ if (a)
+ {
+ label:
+ for (i = 0; i < 8; i++)
+ b ^= a++;
+
+ if (!b)
+ g = 0;
+ }
+}
+
+void
+bar (void)
+{
+ short a = p, b = q, i;
+
+ if (a)
+ {
+ label:
+ for (i = 0; i < 8; i++)
+ b ^= (a = a + 1);
+
+ if (!b)
+ g = 0;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/pr55833.c b/gcc/testsuite/gcc.dg/pr55833.c
new file mode 100644
index 0000000000..7a5c549d78
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr55833.c
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/55833 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+int a, b, c;
+
+void foo()
+{
+ unsigned d, l, *p, k = 1;
+
+ if(bar())
+ {
+label:
+ if((a = a <= 0))
+ {
+ if(c)
+ d = b;
+
+ if (b || d ? l : k ? : 0)
+ a = d = 0;
+
+ goto label;
+ }
+ }
+
+ while(*p++)
+ goto label;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56023.c b/gcc/testsuite/gcc.dg/pr56023.c
index f1942ac18c..ae0117bc21 100644
--- a/gcc/testsuite/gcc.dg/pr56023.c
+++ b/gcc/testsuite/gcc.dg/pr56023.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
void
foo (char *c)
diff --git a/gcc/testsuite/gcc.dg/pr56035.c b/gcc/testsuite/gcc.dg/pr56035.c
new file mode 100644
index 0000000000..4e3a77e199
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56035.c
@@ -0,0 +1,35 @@
+/* PR tree-optimization/56035 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ftree-vectorize -fcse-follow-jumps -fstrict-overflow" } */
+
+short a, c, *p;
+
+void
+f (void)
+{
+ int b;
+
+ if (c)
+ lbl1:
+ for (a = 0; a < 1; a++)
+ {
+ for (c = 0; c < 1; c++)
+ {
+ goto lbl1;
+ while (*p++)
+ lbl2:
+ ;
+ }
+ }
+
+ for (;; b++)
+ {
+ if (c)
+ goto lbl2;
+ lbl3:
+ for (c = 0; c < 9; c++)
+ for (c = -17; c < 2; c++)
+ if (*p)
+ goto lbl3;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr56078.c b/gcc/testsuite/gcc.dg/pr56078.c
new file mode 100644
index 0000000000..ba759f2209
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56078.c
@@ -0,0 +1,25 @@
+/* PR c/56078 */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" } */
+
+typedef __SIZE_TYPE__ size_t;
+extern int memcmp (const void *, const void *, size_t);
+extern void abort (void);
+
+struct T { int a; char b[]; };
+struct T t1 = { .a = 1, .b = "abcd", .b[0] = '2' };
+struct T t2 = { .a = 1, .b = "2bcd" };
+struct T t3 = { .a = 1, .b[2] = 'a' };
+struct T t4 = { .a = 1, .b = { '\0', '\0', 'a' } };
+struct T t5 = { .a = 1, .b = { [0] = 'a', [1] = 'b', [2] = 'c' } };
+struct T t6 = { .a = 1, .b[2] = 'c', .b[1] = 'x', .b[0] = 'a', .b[1] = 'b' };
+
+int
+main ()
+{
+ if (memcmp (t1.b, t2.b, sizeof ("abcd")) != 0
+ || memcmp (t3.b, t4.b, 3) != 0
+ || memcmp (t5.b, t6.b, 3) != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56094.c b/gcc/testsuite/gcc.dg/pr56094.c
new file mode 100644
index 0000000000..d22331193f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56094.c
@@ -0,0 +1,81 @@
+/* PR tree-optimization/56094 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -fdump-tree-optimized-lineno" } */
+
+_Bool cond;
+
+int
+fn0 (unsigned char, unsigned long long, unsigned char,
+ unsigned char, signed short, unsigned int,
+ unsigned char *);
+
+extern void fn3 (unsigned char, unsigned char, unsigned char, unsigned char,
+ unsigned char, unsigned char, unsigned char, unsigned short);
+extern void fn7 (int);
+extern void fn8 (int);
+
+static __inline__ __attribute__ ((always_inline)) void
+fn1 (unsigned char arg0, unsigned char arg1, unsigned char arg2,
+ unsigned char arg3, unsigned char arg4, unsigned char arg5,
+ unsigned short arg6)
+{
+ asm volatile ("" :: "g" ((unsigned long long) arg0), "g" (arg1),
+ "g" (arg2), "g" (arg3), "g" (arg4), "g" (arg5),
+ "g" (arg6));
+ if (cond)
+ {
+ unsigned char loc0 = 0;
+ fn3 (loc0, arg0, arg1, arg2, arg3, arg4, arg5, arg6);
+ }
+}
+
+static __inline__ __attribute__ ((always_inline)) void
+fn4 (unsigned int arg0, unsigned long long arg1)
+{
+ asm volatile ("" :: "g" (arg0), "g" (arg1));
+}
+
+static __inline__ __attribute__ ((always_inline)) void
+fn5 (unsigned int arg0, unsigned char arg1, unsigned int arg2,
+ unsigned char arg3)
+{
+ asm volatile ("" :: "g" (arg0), "g" (arg1),
+ "g" ((unsigned long long) arg2), "g" (arg3));
+}
+
+static __inline__ __attribute__ ((always_inline)) void
+fn6 (unsigned long long arg0, unsigned char arg1,
+ unsigned char arg2, signed short arg3,
+ unsigned int arg4, unsigned char * arg5)
+{
+ asm volatile ("" :: "g" (arg0), "g" ((unsigned long long) arg1),
+ "g" ((unsigned long long) arg2), "g" (arg3),
+ "g" (arg4), "g" (arg5));
+ if (cond)
+ {
+ unsigned char loc0 = 0;
+ fn0 (loc0, arg0, arg1, arg2, arg3, arg4, arg5);
+ }
+}
+
+unsigned char b[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 0xa };
+unsigned int q = sizeof (b) / sizeof (b[0]);
+
+void
+foo ()
+{
+ int i;
+ for (i = 1; i <= 50; i++)
+ {
+ fn6 (i + 0x1234, i + 1, i + 0xa, i + 0x1234, q, b);
+ fn5 (i + 0xabcd, i << 1, i + 0x1234, i << 2);
+ fn7 (i + 0xdead);
+ fn8 (i + 0xdead);
+ fn1 (i, i + 1, i + 2, i + 3, i + 4, i + 5, i << 10);
+ fn4 (i + 0xfeed, i);
+ }
+}
+
+/* Verify no statements get the location of the foo () decl. */
+/* { dg-final { scan-tree-dump-not " : 65:1\\\]" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr56098-2.c b/gcc/testsuite/gcc.dg/pr56098-2.c
new file mode 100644
index 0000000000..3c967b5250
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56098-2.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/56098 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fhoist-adjacent-loads -fdump-tree-optimized" } */
+
+struct S { volatile int i; volatile int j; };
+
+int
+bar (struct S *x, int y)
+{
+ int r;
+ if (y)
+ r = x->i;
+ else
+ r = x->j;
+ return r;
+}
+
+/* { dg-final { scan-tree-dump-not "r_\[0-9]* =.v. \[^\n\r]*;\[\n\r]* r_\[0-9]* =.v. " "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr56117.c b/gcc/testsuite/gcc.dg/pr56117.c
new file mode 100644
index 0000000000..2422048156
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56117.c
@@ -0,0 +1,9 @@
+/* PR rtl-optimization/56117 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fsched2-use-superblocks" } */
+
+void
+foo (void *p)
+{
+ __builtin_prefetch (p);
+}
diff --git a/gcc/testsuite/gcc.dg/pr56144.c b/gcc/testsuite/gcc.dg/pr56144.c
new file mode 100644
index 0000000000..4b98225900
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56144.c
@@ -0,0 +1,35 @@
+/* PR rtl-optimization/56144 */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+int a;
+union U0 { volatile unsigned f2, f4; };
+volatile int b;
+static union U0 c;
+volatile unsigned d, f;
+volatile int e, g, h, i, j, k, l, m, n, o, p;
+int
+main ()
+{
+ a = b;
+ a += c.f2;
+ a += c.f4;
+ unsigned q = h;
+ a += q;
+ q = g;
+ a += q;
+ a += f;
+ q = e;
+ a += q;
+ a += d;
+ a += 2L;
+ a += j;
+ a += i;
+ a += k;
+ a += p;
+ a += o;
+ a += n;
+ a += m;
+ a += l;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56167.c b/gcc/testsuite/gcc.dg/pr56167.c
new file mode 100644
index 0000000000..fc377b4756
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56167.c
@@ -0,0 +1,15 @@
+/* PR middle-end/56167 */
+/* { dg-do compile } */
+
+extern void foo (void) __attribute__ ((error (0))); /* { dg-warning "attribute ignored" } */
+extern void bar (void) __attribute__ ((warning (0))); /* { dg-warning "attribute ignored" } */
+int var __attribute__ ((error ("foo"))); /* { dg-warning "attribute ignored" } */
+
+int
+main ()
+{
+ foo ();
+ bar ();
+ var++;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56228.c b/gcc/testsuite/gcc.dg/pr56228.c
new file mode 100644
index 0000000000..f1221b9d77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56228.c
@@ -0,0 +1,17 @@
+/* PR target/56228 */
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "accessing program memory with data memory address" { "avr-*-*" } { "*" } { "" } } */
+
+short a[14] = { 1, 2 };
+short b[15] = { 3, 4 };
+
+int
+foo ()
+{
+ void (*fna) (void) = (void (*) (void)) a;
+ void (*fnb) (void) = (void (*) (void)) b;
+ fna ();
+ fnb ();
+ return a[1] == b[1];
+}
diff --git a/gcc/testsuite/gcc.dg/pr56341-1.c b/gcc/testsuite/gcc.dg/pr56341-1.c
new file mode 100644
index 0000000000..91cf80ba28
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56341-1.c
@@ -0,0 +1,40 @@
+/* { dg-do run } */
+/* { dg-options "-fstrict-volatile-bitfields" } */
+
+extern void abort (void);
+
+struct test0
+{
+ unsigned char b1[2];
+} __attribute__((packed, aligned(2)));
+
+struct test1
+{
+ volatile unsigned long a1;
+ unsigned char b1[4];
+} __attribute__((packed, aligned(2)));
+
+struct test2
+{
+ struct test0 t0;
+ struct test1 t1;
+ struct test0 t2;
+} __attribute__((packed, aligned(2)));
+
+struct test2 xx;
+struct test2 *x1 = &xx;
+
+#define MAGIC 0x12345678
+
+void test0 (struct test2* x1)
+{
+ x1->t1.a1 = MAGIC;
+}
+
+int main()
+{
+ test0 (x1);
+ if (xx.t1.a1 != MAGIC)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56341-2.c b/gcc/testsuite/gcc.dg/pr56341-2.c
new file mode 100644
index 0000000000..e6f6569f08
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56341-2.c
@@ -0,0 +1,40 @@
+/* { dg-do run } */
+/* { dg-options "-fno-strict-volatile-bitfields" } */
+
+extern void abort (void);
+
+struct test0
+{
+ unsigned char b1[2];
+} __attribute__((packed, aligned(2)));
+
+struct test1
+{
+ volatile unsigned long a1;
+ unsigned char b1[4];
+} __attribute__((packed, aligned(2)));
+
+struct test2
+{
+ struct test0 t0;
+ struct test1 t1;
+ struct test0 t2;
+} __attribute__((packed, aligned(2)));
+
+struct test2 xx;
+struct test2 *x1 = &xx;
+
+#define MAGIC 0x12345678
+
+void test0 (struct test2* x1)
+{
+ x1->t1.a1 = MAGIC;
+}
+
+int main()
+{
+ test0 (x1);
+ if (xx.t1.a1 != MAGIC)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56355-1.c b/gcc/testsuite/gcc.dg/pr56355-1.c
new file mode 100644
index 0000000000..08b9c2e710
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56355-1.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wstrict-overflow=4" } */
+
+int
+f (int i)
+{
+ return __builtin_abs (i * i); /* { dg-warning "assuming signed overflow" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr56396.c b/gcc/testsuite/gcc.dg/pr56396.c
new file mode 100644
index 0000000000..160545b985
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56396.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/56396 */
+/* { dg-do compile } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fpic -g" } */
+
+struct S { char *s; int z; };
+struct T { int t; } *c, u;
+void bar (int, const char *);
+
+inline void *
+foo (void *x, char *y, int z)
+{
+ struct S s;
+ char b[256];
+ s.s = b;
+ s.z = __builtin___sprintf_chk (s.s, 1, __builtin_object_size (s.s, 2), "Require");
+ if (s.z < 0)
+ bar (u.t | c->t, "rls");
+ if (foo (x, s.s, s.z))
+ {
+ }
+ return (void *) 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56424.c b/gcc/testsuite/gcc.dg/pr56424.c
new file mode 100644
index 0000000000..a724c640e9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56424.c
@@ -0,0 +1,33 @@
+/* PR tree-optimization/56424 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fexceptions -fnon-call-exceptions" } */
+
+extern long double cosl (long double);
+extern long double sinl (long double);
+extern long double reml (long double, long double);
+
+long double my_cos (long double arg)
+{
+ return cosl (arg);
+}
+
+long double my_sin (long double arg)
+{
+ if (__builtin_fabs (arg) < 1.0)
+ return arg;
+
+ return sinl (arg);
+}
+
+long double my_cot (long double arg, long double cycle)
+{
+ long double t = reml (arg, cycle);
+ return my_cos (t) / my_sin (t);
+}
+
+long double my_tan (long double arg, long double cycle)
+{
+ long double t = reml (arg, cycle);
+ return my_sin (t) / my_cos (t);
+}
diff --git a/gcc/testsuite/gcc.dg/pr56436.c b/gcc/testsuite/gcc.dg/pr56436.c
new file mode 100644
index 0000000000..cae4d2a4bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56436.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/56426 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int a, *c;
+
+void
+f (void)
+{
+ int b = 0;
+
+ for (a = 0;; a++)
+ if (--b)
+ {
+ if (a)
+ lbl:
+ a++;
+
+ c = &b;
+ goto lbl;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr56466.c b/gcc/testsuite/gcc.dg/pr56466.c
new file mode 100644
index 0000000000..9d9e27356e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56466.c
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/56466 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w -funroll-loops" } */
+
+int a, b, c;
+
+void
+f (void)
+{
+ for (; b; b++)
+ {
+ if (0)
+ for (; b < 0; b++)
+ if (1 % 0)
+ {
+ while (1)
+ {
+ a = 0;
+ lbl1:
+ c++;
+ }
+ lbl2:
+ ;
+ }
+
+ goto lbl1;
+ }
+
+ a = 0;
+ goto lbl2;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56494.c b/gcc/testsuite/gcc.dg/pr56494.c
new file mode 100644
index 0000000000..e73d674a98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56494.c
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/56494 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftracer -w" } */
+
+char a;
+short b;
+void bar (int);
+
+void
+foo (void)
+{
+ bar ((!!b ? : (a *= a / 0)) >= (a = b));
+}
diff --git a/gcc/testsuite/gcc.dg/pr56510.c b/gcc/testsuite/gcc.dg/pr56510.c
index 1f8e21a57b..d018d7d4ba 100644
--- a/gcc/testsuite/gcc.dg/pr56510.c
+++ b/gcc/testsuite/gcc.dg/pr56510.c
@@ -2,11 +2,12 @@
/* { dg-do compile } */
/* { dg-options "-O2 -g" } */
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
struct S { unsigned long s1; void **s2[0]; };
void **a, **b, **c, **d, **e, **f;
static void **
-baz (long x, long y)
+baz (intptr_t x, intptr_t y)
{
void **s = f;
*f = (void **) (y << 8 | (x & 0xff));
diff --git a/gcc/testsuite/gcc.dg/pr56548.c b/gcc/testsuite/gcc.dg/pr56548.c
new file mode 100644
index 0000000000..2aa61d9cc6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56548.c
@@ -0,0 +1,16 @@
+/* PR middle-end/56548 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-march=pentium3" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
+
+short
+foo (short x)
+{
+ int i;
+
+ for (i = 0; i < 3; i++)
+ if (x > 0)
+ x--;
+
+ return x;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56724-1.c b/gcc/testsuite/gcc.dg/pr56724-1.c
new file mode 100644
index 0000000000..4276c3f154
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56724-1.c
@@ -0,0 +1,33 @@
+/* PR c/56724 */
+/* { dg-do compile } */
+/* { dg-options "-Wtraditional-conversion" } */
+
+extern void foo (int p[2][]); /* { dg-error "array type has incomplete element type" } */
+extern void foo_i (int, int);
+extern void foo_u (unsigned int);
+extern void foo_f (int, float);
+extern void foo_ll (long long);
+extern void foo_cd (int, int, __complex__ double);
+extern signed char sc;
+extern int i;
+extern unsigned int u;
+extern float f;
+extern double d;
+extern __complex__ double cd;
+
+void
+fn ()
+{
+ int p[1][1];
+ foo (p); /* { dg-error "8:type of formal parameter" } */
+ foo_i (1, f); /* { dg-warning "13:passing argument" } */
+ foo_i (1, cd); /* { dg-warning "13:passing argument" } */
+ foo_cd (1, 2, f); /* { dg-warning "17:passing argument" } */
+ foo_f (9, i); /* { dg-warning "13:passing argument" } */
+ foo_cd (2, 2, i); /* { dg-warning "17:passing argument" } */
+ foo_f (2, cd); /* { dg-warning "13:passing argument" } */
+ foo_f (2, d); /* { dg-warning "13:passing argument" } */
+ foo_ll (sc); /* { dg-warning "11:passing argument" } */
+ foo_u (i); /* { dg-warning "10:passing argument" } */
+ foo_i (1, u); /* { dg-warning "13:passing argument" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr56724-2.c b/gcc/testsuite/gcc.dg/pr56724-2.c
new file mode 100644
index 0000000000..4abb7d899e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56724-2.c
@@ -0,0 +1,31 @@
+/* PR c/56724 */
+/* { dg-do compile } */
+/* { dg-options "-Wc++-compat -Wpedantic" } */
+
+enum E1 { A };
+enum E2 { B };
+extern void foo_E (enum E1);
+extern void foo_v (void *p);
+extern void foo_sc (int, int, signed char *);
+extern unsigned char *uc;
+extern signed char sc;
+extern const signed char *csc;
+extern float *f;
+
+void
+foo (void)
+{
+ void (*fp)(void);
+ const void (*ffp)(void);
+ foo_v (fp); /* { dg-warning "10:ISO C forbids passing argument" } */
+ foo_E (B); /* { dg-warning "10:enum conversion when passing argument" } */
+ foo_sc (1, 2, uc); /* { dg-warning "17:pointer targets in passing argument" } */
+ foo_sc (1, 2, f); /* { dg-warning "17:passing argument" } */
+ foo_sc (1, 2, sc); /* { dg-warning "17:passing argument" } */
+ foo_sc (uc, 2, &sc); /* { dg-warning "11:passing argument" } */
+ foo_sc (1, 2, csc); /* { dg-warning "17:passing argument" } */
+}
+
+typedef void (*fp)(void);
+typedef void (*nrfp)(void) __attribute__((noreturn));
+void f1 (nrfp); void f2 (fp x) { f1 (x); } extern int e; /* { dg-warning "38:passing argument" } */
diff --git a/gcc/testsuite/gcc.dg/pr56809.c b/gcc/testsuite/gcc.dg/pr56809.c
new file mode 100644
index 0000000000..3f1f3115c3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56809.c
@@ -0,0 +1,32 @@
+/* PR target/56809 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+int
+foo (int mode, int i)
+{
+ int x;
+
+ switch (mode)
+ {
+ case 0:
+ x = i + 1;
+ break;
+ case 1:
+ x = i / 2;
+ break;
+ case 2:
+ x = i * 3;
+ break;
+ case 3:
+ x = i + 3;
+ break;
+ case 4:
+ x = i + 5;
+ break;
+ default:
+ x = i - 1;
+ }
+
+ return x;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56824.c b/gcc/testsuite/gcc.dg/pr56824.c
new file mode 100644
index 0000000000..d682d0a810
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56824.c
@@ -0,0 +1,18 @@
+/* PR preprocessor/56824 */
+/* { dg-do compile } */
+/* { dg-options "-Waggregate-return" } */
+
+struct S { int i; };
+struct S foo (void);
+
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waggregate-return"
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
+
+#pragma GCC diagnostic pop
diff --git a/gcc/testsuite/gcc.dg/pr56837.c b/gcc/testsuite/gcc.dg/pr56837.c
new file mode 100644
index 0000000000..d665a6db7f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56837.c
@@ -0,0 +1,67 @@
+/* Limit this test to selected targets with IEEE double, 8-byte long long,
+ supported 4x int vectors, 4-byte int. */
+/* { dg-do compile { target { i?86-*-* x86_64-*-* powerpc*-*-* } } } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+/* { dg-additional-options "-msse2" { target ia32 } } */
+/* { dg-additional-options "-mvsx -maltivec" { target powerpc*-*-* } } */
+
+typedef int V __attribute__((__vector_size__ (16)));
+#define N 1024
+double d[N];
+long long int l[N];
+_Bool b[N];
+_Complex double c[N];
+V v[N];
+
+void
+fd (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ d[i] = 747708026454360457216.0;
+}
+
+void
+fl (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ l[i] = 0x7c7c7c7c7c7c7c7cULL;
+}
+
+void
+fb (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ b[i] = 1;
+}
+
+void
+fc (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ c[i] = 747708026454360457216.0 + 747708026454360457216.0i;
+}
+
+void
+fv (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ v[i] = (V) { 0x12121212, 0x12121212, 0x12121212, 0x12121212 };
+}
+
+/* Look for
+ __builtin_memset (&d, 68, 8192);
+ __builtin_memset (&l, 124, 8192);
+ __builtin_memset (&b, 1, 1024);
+ __builtin_memset (&c, 68, 16384);
+ __builtin_memset (&v, 18, 16384); */
+/* { dg-final { scan-tree-dump-times "memset ..d, 68, 8192.;" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "memset ..l, 124, 8192.;" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "memset ..b, 1, 1024.;" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "memset ..c, 68, 16384.;" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "memset ..v, 18, 16384.;" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr56847.c b/gcc/testsuite/gcc.dg/pr56847.c
new file mode 100644
index 0000000000..b94aae1d89
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56847.c
@@ -0,0 +1,12 @@
+/* PR rtl-optimization/56847 */
+/* { dg-do compile { target pie } } */
+/* { dg-options "-O2 -fpie" } */
+
+struct S { long int a, b; } e;
+__thread struct S s;
+
+void
+foo (void)
+{
+ s = e;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56890-1.c b/gcc/testsuite/gcc.dg/pr56890-1.c
new file mode 100644
index 0000000000..93b2134e59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56890-1.c
@@ -0,0 +1,15 @@
+/* PR target/56890 */
+/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
+
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+
+unsigned int buggy(unsigned int min, unsigned int max)
+{
+ if (max < 16384) {
+ unsigned short num16 = 0;
+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
+ return num16;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56890-2.c b/gcc/testsuite/gcc.dg/pr56890-2.c
new file mode 100644
index 0000000000..474327e9d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56890-2.c
@@ -0,0 +1,19 @@
+/* PR target/56890 */
+/* Reported by Rainer Jung <rainer.jung@kippdata.de> */
+
+/* { dg-do assemble } */
+/* { dg-options "-O" } */
+
+unsigned int buggy(unsigned int min, unsigned int max)
+{
+ unsigned int number;
+ if (max < 16384) {
+ unsigned short num16;
+ num16 = min + (long) ((double) (max - min + 1.0) * (num16 / (65535 + 1.0)));
+ return num16;
+ }
+ else {
+ (number) = min + (long) ((double) (max - min + 1.0) * (number / (4294967295U + 1.0)));
+ }
+ return number;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56977.c b/gcc/testsuite/gcc.dg/pr56977.c
new file mode 100644
index 0000000000..fde88afed1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56977.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-Og" } */
+
+__attribute__((__error__("error"))) void error ();
+
+void f (int i) {
+ if (__builtin_constant_p (i)) {
+ error ();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr56990.c b/gcc/testsuite/gcc.dg/pr56990.c
new file mode 100644
index 0000000000..ecb6acef6f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56990.c
@@ -0,0 +1,10 @@
+/* PR sanitizer/56990 */
+/* { dg-do compile { target { x86_64-*-linux* && lp64 } } } */
+/* { dg-options "-fsanitize=thread" } */
+
+struct S{};
+
+void foo(struct S *p)
+{
+ *p = (struct S){};
+}
diff --git a/gcc/testsuite/gcc.dg/pr56992.c b/gcc/testsuite/gcc.dg/pr56992.c
new file mode 100644
index 0000000000..e945a18ca8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56992.c
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/56992 */
+/* { dg-do compile } */
+/* { dg-options "-Og -g" } */
+
+inline int
+foo (const char *x)
+{
+ return __builtin_strlen (x);
+}
+
+int
+bar (const char *x, unsigned int *y)
+{
+ unsigned int l = foo (x);
+ if (l > 15)
+ l = 15;
+ *y = l;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56997-1.c b/gcc/testsuite/gcc.dg/pr56997-1.c
new file mode 100644
index 0000000000..42458a106c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56997-1.c
@@ -0,0 +1,44 @@
+/* Test volatile access to unaligned field. */
+/* { dg-do run } */
+/* { dg-options "-fstrict-volatile-bitfields" } */
+
+extern void abort (void);
+
+#define test_type unsigned short
+#define MAGIC (unsigned short)0x102u
+
+typedef struct s{
+ unsigned char Prefix;
+ test_type Type;
+}__attribute((__packed__)) ss;
+
+volatile ss v;
+ss g;
+
+void __attribute__((noinline))
+foo (test_type u)
+{
+ v.Type = u;
+}
+
+test_type __attribute__((noinline))
+bar (void)
+{
+ return v.Type;
+}
+
+int main()
+{
+ test_type temp;
+ foo(MAGIC);
+ __builtin_memcpy(&g, (void *)&v, sizeof(g));
+ if (g.Type != MAGIC)
+ abort ();
+
+ g.Type = MAGIC;
+ __builtin_memcpy((void *)&v, &g, sizeof(v));
+ temp = bar();
+ if (temp != MAGIC)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56997-2.c b/gcc/testsuite/gcc.dg/pr56997-2.c
new file mode 100644
index 0000000000..759a469bd9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56997-2.c
@@ -0,0 +1,45 @@
+/* Test volatile access to unaligned field. */
+/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
+/* { dg-options "-fstrict-volatile-bitfields" } */
+
+extern void abort (void);
+
+#define test_type unsigned int
+#define MAGIC 0x1020304u
+
+typedef struct s{
+ unsigned char Prefix;
+ test_type Type;
+}__attribute((__packed__)) ss;
+
+volatile ss v;
+ss g;
+
+void __attribute__((noinline))
+foo (test_type u)
+{
+ v.Type = u;
+}
+
+test_type __attribute__((noinline))
+bar (void)
+{
+ return v.Type;
+}
+
+int main()
+{
+ test_type temp;
+ foo(MAGIC);
+ __builtin_memcpy(&g, (void *)&v, sizeof(g));
+ if (g.Type != MAGIC)
+ abort ();
+
+ g.Type = MAGIC;
+ __builtin_memcpy((void *)&v, &g, sizeof(v));
+ temp = bar();
+ if (temp != MAGIC)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56997-3.c b/gcc/testsuite/gcc.dg/pr56997-3.c
new file mode 100644
index 0000000000..3754b108ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56997-3.c
@@ -0,0 +1,44 @@
+/* Test volatile access to unaligned field. */
+/* { dg-do run } */
+/* { dg-options "-fstrict-volatile-bitfields" } */
+
+extern void abort (void);
+
+#define test_type unsigned long long
+#define MAGIC 0x102030405060708ull
+
+typedef struct s{
+ unsigned char Prefix;
+ test_type Type;
+}__attribute((__packed__)) ss;
+
+volatile ss v;
+ss g;
+
+void __attribute__((noinline))
+foo (test_type u)
+{
+ v.Type = u;
+}
+
+test_type __attribute__((noinline))
+bar (void)
+{
+ return v.Type;
+}
+
+int main()
+{
+ test_type temp;
+ foo(MAGIC);
+ __builtin_memcpy(&g, (void *)&v, sizeof(g));
+ if (g.Type != MAGIC)
+ abort ();
+
+ g.Type = MAGIC;
+ __builtin_memcpy((void *)&v, &g, sizeof(v));
+ temp = bar();
+ if (temp != MAGIC)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr56997-4.c b/gcc/testsuite/gcc.dg/pr56997-4.c
new file mode 100644
index 0000000000..38f6248d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr56997-4.c
@@ -0,0 +1,23 @@
+/* Test volatile access to unaligned field. */
+/* { dg-do compile } */
+/* { dg-options "-fno-strict-volatile-bitfields -fdump-rtl-final" } */
+
+#define test_type unsigned short
+
+typedef struct s{
+ unsigned char Prefix[1];
+ volatile test_type Type;
+}__attribute((__packed__,__aligned__(4))) ss;
+
+extern volatile ss v;
+
+void
+foo (test_type u)
+{
+ v.Type = u;
+}
+
+/* The C++ memory model forbids data store race conditions outside the
+ unaligned data member, therefore only QI or HI access is allowed, no SI. */
+/* { dg-final { scan-rtl-dump-not "mem/v(/.)*:SI" "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.dg/pr57104.c b/gcc/testsuite/gcc.dg/pr57104.c
new file mode 100644
index 0000000000..3a7013bea3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57104.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/57104 */
+/* { dg-do compile { target { x86_64-*-linux* && lp64 } } } */
+/* { dg-options "-fsanitize=thread" } */
+
+register int r asm ("r14");
+int v;
+
+int
+foo (void)
+{
+ return r + v;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57105.c b/gcc/testsuite/gcc.dg/pr57105.c
new file mode 100644
index 0000000000..a968f52375
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57105.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* i?86-*-* x86_64-*-* } } */
+/* { dg-options "-Os -fselective-scheduling2 -g" } */
+int bar (int);
+int *baz (int *);
+
+void
+foo (int a)
+{
+ while (bar (0))
+ {
+ int *c = baz (0);
+ if (a)
+ {
+ int i = *baz (c);
+ }
+ bar (*baz (c));
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr57134.c b/gcc/testsuite/gcc.dg/pr57134.c
new file mode 100644
index 0000000000..94ff0929c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57134.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target stdint_types } */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mstrict-align" { target { powerpc*-*-linux* powerpc*-*-elf* } } } */
+
+#include <stdint.h>
+
+typedef struct {
+ int64_t counter;
+} atomic64_t;
+
+struct buffer_page {
+ void *a, *b;
+ atomic64_t entries;
+};
+
+static __inline__ __attribute__((always_inline)) int64_t
+atomic64_read(const atomic64_t *v)
+{
+ int64_t t;
+ __asm__ __volatile__("# %0, %1" : "=r"(t) : "m"(v->counter));
+ return t;
+}
+
+int rb_remove_pages(void *p)
+{
+ struct buffer_page *blah = (void *)((intptr_t) p & -4);
+ return atomic64_read(&blah->entries);
+}
diff --git a/gcc/testsuite/gcc.dg/pr57149.c b/gcc/testsuite/gcc.dg/pr57149.c
new file mode 100644
index 0000000000..ab4d5e4089
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57149.c
@@ -0,0 +1,50 @@
+/* PR tree-optimization/57149 */
+/* { dg-do compile } */
+/* { dg-options "-Os -Wuninitialized" } */
+
+struct A { struct A *a, *b; };
+struct D { struct A e; };
+struct E { unsigned char f; struct { struct A e; } g; };
+struct F { struct E i[32]; };
+
+extern int fn0 (void);
+extern int fn1 (struct E *, struct D *);
+
+static inline __attribute__ ((always_inline)) int
+fn2 (const struct A *x)
+{
+ return x->a == x;
+}
+
+static int
+fn3 (struct E *x)
+{
+ struct D *l, *m;
+ int retval = retval;
+ if (fn2 (&x->g.e))
+ return 0;
+ for (l = (struct D *) x->g.e.a, m = (struct D *) l->e.a;
+ &l->e != &x->g.e;
+ l = m, m = (struct D *) m->e.a)
+ retval = fn1 (x, l);
+ return retval;
+}
+
+void
+fn4 (struct F *x, unsigned k)
+{
+ unsigned i;
+ for (i = 0; i < k; i++)
+ {
+ struct E *y = &x->i[i];
+ int err = -22;
+ err = fn3 (y);
+ if (y->f == 0)
+ {
+ if (err > 0)
+ err = fn0 ();
+ if (err < 0) /* { dg-bogus "may be used uninitialized in this function" } */
+ fn0 ();
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr57154.c b/gcc/testsuite/gcc.dg/pr57154.c
new file mode 100644
index 0000000000..6e436befe9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57154.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fschedule-insns" } */
+/* { dg-require-effective-target scheduling } */
+
+#define PF_FROZEN 0x00010000
+#define likely(x) __builtin_expect(!!(x), 1)
+
+struct cur
+{
+ unsigned long flags;
+};
+struct cur *cur;
+
+unsigned long freeze_cnt;
+
+extern int foo(void *);
+extern int slow_path(void *);
+
+static inline int freezing(void *p)
+{
+ if (likely(!foo(&freeze_cnt)))
+ return 0;
+ return slow_path(p);
+}
+
+extern int blah(void);
+
+int testcase(int check_kthr_stop)
+{
+ int was_frozen = 0;
+
+ for (;;) {
+ if (!freezing(cur) ||
+ (check_kthr_stop && blah()))
+ cur->flags &= ~PF_FROZEN;
+
+ if (!(cur->flags & PF_FROZEN))
+ break;
+
+ was_frozen = 1;
+ }
+
+ return was_frozen;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57184.c b/gcc/testsuite/gcc.dg/pr57184.c
new file mode 100644
index 0000000000..319d3fd531
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57184.c
@@ -0,0 +1,13 @@
+/* PR debug/57184 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+struct S {};
+void bar (struct S *const);
+static struct S *const c = &(struct S) {};
+
+void
+foo (void)
+{
+ bar (c);
+}
diff --git a/gcc/testsuite/gcc.dg/pr57233.c b/gcc/testsuite/gcc.dg/pr57233.c
new file mode 100644
index 0000000000..484844e491
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57233.c
@@ -0,0 +1,172 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target { ilp32 || lp64 } } } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-fno-common" { target hppa*-*-hpux* } } */
+
+typedef unsigned V4 __attribute__((vector_size(4 * sizeof (int))));
+typedef unsigned V8 __attribute__((vector_size(8 * sizeof (int))));
+typedef unsigned V16 __attribute__((vector_size(16 * sizeof (int))));
+V4 a, b, g;
+V8 c, d, h;
+V16 e, f, j;
+
+__attribute__((noinline)) void
+f1 (void)
+{
+ a = (a << 2) | (a >> 30);
+}
+
+__attribute__((noinline)) void
+f2 (void)
+{
+ a = (a << 30) | (a >> 2);
+}
+
+__attribute__((noinline)) void
+f3 (void)
+{
+ a = (a << b) | (a >> (32 - b));
+}
+
+__attribute__((noinline, noclone)) void
+f4 (int x)
+{
+ a = (a << x) | (a >> (32 - x));
+}
+
+__attribute__((noinline)) void
+f5 (void)
+{
+ c = (c << 2) | (c >> 30);
+}
+
+__attribute__((noinline)) void
+f6 (void)
+{
+ c = (c << 30) | (c >> 2);
+}
+
+__attribute__((noinline)) void
+f7 (void)
+{
+ c = (c << d) | (c >> (32 - d));
+}
+
+__attribute__((noinline, noclone)) void
+f8 (int x)
+{
+ c = (c << x) | (c >> (32 - x));
+}
+
+__attribute__((noinline)) void
+f9 (void)
+{
+ e = (e << 2) | (e >> 30);
+}
+
+__attribute__((noinline)) void
+f10 (void)
+{
+ e = (e << 30) | (e >> 2);
+}
+
+__attribute__((noinline)) void
+f11 (void)
+{
+ e = (e << f) | (e >> (32 - f));
+}
+
+__attribute__((noinline, noclone)) void
+f12 (int x)
+{
+ e = (e << x) | (e >> (32 - x));
+}
+
+unsigned
+r (void)
+{
+ static unsigned x = 0xdeadbeefU;
+ static unsigned y = 0x12347654U;
+ static unsigned z = 0x1a2b3c4dU;
+ static unsigned w = 0x87654321U;
+ unsigned t = x ^ (x << 11);
+ x = y;
+ y = z;
+ z = w;
+ w = w ^ (w >> 19) ^ t ^ (t >> 8);
+ return w;
+}
+
+void
+init (unsigned int *p, int count, int mod)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ {
+ unsigned int v = r ();
+ if (mod)
+ v = (v % 31) + 1;
+ p[i] = v;
+ }
+}
+
+void
+check (unsigned int *p, unsigned int *q, int count, unsigned int *s, int ss)
+{
+ int i;
+ for (i = 0; i < count; i++)
+ {
+ if (s)
+ ss = s[i];
+ if (p[i] != ((q[i] << ss) | (q[i] >> (32 - ss))))
+ __builtin_abort ();
+ }
+}
+
+int
+main ()
+{
+ init ((unsigned int *) &a, 4, 0);
+ init ((unsigned int *) &b, 4, 1);
+ init ((unsigned int *) &c, 8, 0);
+ init ((unsigned int *) &d, 8, 1);
+ init ((unsigned int *) &e, 16, 0);
+ init ((unsigned int *) &f, 16, 1);
+ g = a;
+ h = c;
+ j = e;
+ f1 ();
+ f5 ();
+ f9 ();
+ check ((unsigned int *) &a, (unsigned int *) &g, 4, 0, 2);
+ check ((unsigned int *) &c, (unsigned int *) &h, 8, 0, 2);
+ check ((unsigned int *) &e, (unsigned int *) &j, 16, 0, 2);
+ g = a;
+ h = c;
+ j = e;
+ f2 ();
+ f6 ();
+ f10 ();
+ check ((unsigned int *) &a, (unsigned int *) &g, 4, 0, 30);
+ check ((unsigned int *) &c, (unsigned int *) &h, 8, 0, 30);
+ check ((unsigned int *) &e, (unsigned int *) &j, 16, 0, 30);
+ g = a;
+ h = c;
+ j = e;
+ f3 ();
+ f7 ();
+ f11 ();
+ check ((unsigned int *) &a, (unsigned int *) &g, 4, (unsigned int *) &b, 0);
+ check ((unsigned int *) &c, (unsigned int *) &h, 8, (unsigned int *) &d, 0);
+ check ((unsigned int *) &e, (unsigned int *) &j, 16, (unsigned int *) &f, 0);
+ g = a;
+ h = c;
+ j = e;
+ f4 (5);
+ f8 (5);
+ f12 (5);
+ check ((unsigned int *) &a, (unsigned int *) &g, 4, 0, 5);
+ check ((unsigned int *) &c, (unsigned int *) &h, 8, 0, 5);
+ check ((unsigned int *) &e, (unsigned int *) &j, 16, 0, 5);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57286.c b/gcc/testsuite/gcc.dg/pr57286.c
new file mode 100644
index 0000000000..c6f4530548
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57286.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+typedef int vec __attribute__ ((vector_size (4*sizeof(int))));
+void f (vec *x){
+ *x = (*x < 0) | 1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57287-2.c b/gcc/testsuite/gcc.dg/pr57287-2.c
new file mode 100644
index 0000000000..1ddf76c646
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57287-2.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+#include <setjmp.h>
+
+struct node
+{
+ struct node *next;
+ char *name;
+} *list;
+
+struct node *list;
+struct node *head (void);
+
+jmp_buf *bar (void);
+
+int baz (void)
+{
+ struct node *n;
+ int varseen = 0;
+
+ list = head ();
+ for (n = list; n; n = n->next)
+ {
+ if (!varseen)
+ varseen = 1;
+
+ jmp_buf *buf = bar (); /* { dg-bogus "may be used uninitialized" "" } */
+ setjmp (*buf);
+ }
+
+ if (!varseen)
+ return 0;
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57287.c b/gcc/testsuite/gcc.dg/pr57287.c
new file mode 100644
index 0000000000..72225b1193
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57287.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+#include <setjmp.h>
+
+jmp_buf buf;
+
+void foo (int);
+void bar (int) __attribute__((leaf));
+
+void enumerate_locals (int indent)
+{
+ foo (0);
+ while (indent--)
+ {
+ int local_indent = 8 + (8 * indent);
+ if (local_indent != 8)
+ {
+ setjmp (buf);
+ bar (local_indent); /* { dg-bogus "may be used uninitialized" "" } */
+ }
+ }
+ foo (1);
+}
diff --git a/gcc/testsuite/gcc.dg/pr57300.c b/gcc/testsuite/gcc.dg/pr57300.c
new file mode 100644
index 0000000000..13a272de59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57300.c
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/57300 */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-msse2" { target sse2_runtime } } */
+
+extern void abort (void);
+int a, b, d[10];
+long long c;
+
+int
+main ()
+{
+ int e;
+ for (e = 0; e < 10; e++)
+ d[e] = 1;
+ if (d[0])
+ c = a = (b == 0 || 1 % b);
+ if (a != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57518.c b/gcc/testsuite/gcc.dg/pr57518.c
new file mode 100644
index 0000000000..94ef82db8e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57518.c
@@ -0,0 +1,17 @@
+/* PR rtl-optimization/57518 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-ira" } */
+
+char ip[10];
+int total;
+
+void foo() {
+ int t;
+
+ t = ip[2];
+ total = t & 0x3;
+}
+
+/* { dg-final { scan-rtl-dump-not "REG_EQUIV\[^\n\]*mem\[^\n\]*\"ip\".*subreg" "ira" } } */
+/* { dg-final { cleanup-rtl-dump "ira" } } */
diff --git a/gcc/testsuite/gcc.dg/pr57662.c b/gcc/testsuite/gcc.dg/pr57662.c
new file mode 100644
index 0000000000..7af845532b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57662.c
@@ -0,0 +1,47 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options " -O -fno-guess-branch-probability -fpeel-loops -freorder-blocks-and-partition -fschedule-insns2 -fsel-sched-pipelining -fselective-scheduling2 -ftree-pre" } */
+
+struct intC
+{
+ short x;
+ short y;
+};
+
+void Get(void);
+
+int size_x;
+
+struct
+{
+ int *depot_table;
+ struct intC *ti;
+ int size;
+} dummy;
+
+static inline int
+GetRotatedTileFromOffset (int *a, struct intC tidc)
+{
+ if (!*a)
+ Get ();
+ switch (*a)
+ {
+ case 0:
+ return (tidc.y << size_x) + tidc.x;
+ case 1:
+ return tidc.y + (dummy.size - tidc.x) * size_x;
+ case 2:
+ return tidc.x + (dummy.size - tidc.y) * size_x;
+ case 3:
+ return (dummy.size - tidc.x);
+ }
+ return 0;
+}
+
+int
+GetHangarNum (int *a, int i)
+{
+ while (dummy.size)
+ if (GetRotatedTileFromOffset (a, dummy.ti[i]))
+ return *dummy.depot_table;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr57773.c b/gcc/testsuite/gcc.dg/pr57773.c
new file mode 100644
index 0000000000..1c309506d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57773.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -Wpedantic" } */
+
+enum e { A };
+struct { enum e b: 2; } s1;
+struct { signed char b: 2; } s2;
+struct { unsigned char b: 2; } s3;
+struct { short b: 2; } s4;
+struct { unsigned short b: 2; } s5;
+struct { long int b: 2; } s6;
+struct { unsigned long int b: 2; } s7;
+struct { long long int b: 2; } s8;
+struct { unsigned long long int b: 2; } s9;
diff --git a/gcc/testsuite/gcc.dg/pr57980.c b/gcc/testsuite/gcc.dg/pr57980.c
new file mode 100644
index 0000000000..be83536c5f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr57980.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/57980 */
+/* { dg-do compile } */
+/* { dg-options "-O -foptimize-sibling-calls -w" } */
+
+typedef int V __attribute__ ((vector_size (2 * sizeof (int))));
+extern V f (void);
+
+V
+bar (void)
+{
+ return -f ();
+}
+
+V
+foo (void)
+{
+ V v = { };
+ return v - f ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr58010.c b/gcc/testsuite/gcc.dg/pr58010.c
new file mode 100644
index 0000000000..a0fbd31f49
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58010.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -funswitch-loops -ftree-vectorize" } */
+
+short a, b, c, d;
+
+void f(void)
+{
+ short e;
+
+ for(; e; e++)
+ for(; b; b++);
+
+ for(d = 0; d < 4; d++)
+ a ^= (e ^= 1) || c ? : e;
+}
diff --git a/gcc/testsuite/gcc.dg/pr58145-1.c b/gcc/testsuite/gcc.dg/pr58145-1.c
new file mode 100644
index 0000000000..0e236c0456
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58145-1.c
@@ -0,0 +1,37 @@
+/* PR tree-optimization/58145 */
+/* { dg-do compile { target { int32plus } } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct S { unsigned int data : 32; };
+struct T { unsigned int data; };
+volatile struct S s2;
+
+void
+f1 (int val)
+{
+ struct S s = { .data = val };
+ *(volatile struct S *) 0x880000UL = s;
+}
+
+void
+f2 (int val)
+{
+ struct T t = { .data = val };
+ *(volatile struct T *) 0x880000UL = t;
+}
+
+void
+f3 (int val)
+{
+ *(volatile unsigned int *) 0x880000UL = val;
+}
+
+void
+f4 (int val)
+{
+ struct S s = { .data = val };
+ s2 = s;
+}
+
+/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58145-2.c b/gcc/testsuite/gcc.dg/pr58145-2.c
new file mode 100644
index 0000000000..840e982897
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58145-2.c
@@ -0,0 +1,51 @@
+/* PR tree-optimization/58145 */
+/* { dg-do compile { target { int32plus } } } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+struct S { unsigned int data : 32; };
+struct T { unsigned int data; };
+volatile struct S s2;
+
+static inline void
+f1 (int val)
+{
+ struct S s = { .data = val };
+ *(volatile struct S *) 0x880000UL = s;
+}
+
+static inline void
+f2 (int val)
+{
+ struct T t = { .data = val };
+ *(volatile struct T *) 0x880000UL = t;
+}
+
+static inline void
+f3 (int val)
+{
+ *(volatile unsigned int *) 0x880000UL = val;
+}
+
+static inline void
+f4 (int val)
+{
+ struct S s = { .data = val };
+ s2 = s;
+}
+
+void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < 100; i++)
+ f1 (0);
+ for (i = 0; i < 100; i++)
+ f2 (0);
+ for (i = 0; i < 100; i++)
+ f3 (0);
+ for (i = 0; i < 100; i++)
+ f4 (0);
+}
+
+/* { dg-final { scan-tree-dump-times " ={v} " 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58346.c b/gcc/testsuite/gcc.dg/pr58346.c
new file mode 100644
index 0000000000..b7940f6cf4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58346.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/58346 */
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct U {};
+static struct U b[1] = { };
+extern void bar (struct U);
+
+void
+foo (void)
+{
+ bar (b[0]);
+}
+
+void
+baz (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr58432.c b/gcc/testsuite/gcc.dg/pr58432.c
new file mode 100644
index 0000000000..22a720f142
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58432.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-profiling "-fprofile-generate" } */
+/* { dg-options "-O3 -fprofile-generate" } */
+
+struct {
+ int prefix;
+ int dir_idx;
+} *a;
+int b;
+void fn1() {
+ int *c, *d;
+ for (; b; b++)
+ if (d[b]) {
+ c[b] = d[b];
+ a[0].dir_idx = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr58463.c b/gcc/testsuite/gcc.dg/pr58463.c
new file mode 100644
index 0000000000..e2b4411934
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58463.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-ealias-details -O2" } */
+
+typedef struct
+{
+ int data16;
+}
+list_data;
+void
+fn1 (list_data * p1)
+{
+ p1->data16 = p1->data16 & 1 & p1->data16 >> 1;
+}
+
+/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58668.c b/gcc/testsuite/gcc.dg/pr58668.c
new file mode 100644
index 0000000000..3e09508dc1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58668.c
@@ -0,0 +1,25 @@
+/* PR rtl-optimization/58668 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-mthumb" { target { { arm*-*-* } && arm_thumb2_ok } } } */
+
+void *fn1 (void *);
+void *fn2 (void *, const char *);
+void fn3 (void *);
+void fn4 (void *, int);
+
+void *
+test (void *x)
+{
+ void *a, *b;
+ if (!(a = fn1 (x)))
+ return (void *) 0;
+ if (!(b = fn2 (a, "w")))
+ {
+ fn3 (a);
+ return (void *) 0;
+ }
+ fn3 (a);
+ fn4 (b, 1);
+ return b;
+}
diff --git a/gcc/testsuite/gcc.dg/pr58742-1.c b/gcc/testsuite/gcc.dg/pr58742-1.c
new file mode 100644
index 0000000000..94f56273f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58742-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+int *
+fx (int *b, int *e)
+{
+ __SIZE_TYPE__ p = e - b;
+ /* The first forwprop pass should optimize this to return e; */
+ return b + p;
+}
+
+/* { dg-final { scan-tree-dump "return e" "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58742-2.c b/gcc/testsuite/gcc.dg/pr58742-2.c
new file mode 100644
index 0000000000..e0011e950c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58742-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+__SIZE_TYPE__
+fx (char *a, __SIZE_TYPE__ sz)
+{
+ char *b = a + sz;
+ /* The first forwprop pass should optimize this to return sz; */
+ return b - a;
+}
+
+/* { dg-final { scan-tree-dump "return sz" "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58742-3.c b/gcc/testsuite/gcc.dg/pr58742-3.c
new file mode 100644
index 0000000000..f4e95e6454
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58742-3.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+int *
+fx (int *a, int sz)
+{
+ int *b = a + sz;
+ b = b - sz;
+ /* forwprop together with FRE should optimize this to return a; */
+ return b;
+}
+
+/* { dg-final { scan-tree-dump "return a" "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58805.c b/gcc/testsuite/gcc.dg/pr58805.c
new file mode 100644
index 0000000000..dda0e4bdf4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58805.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
+
+/* Type that matches the 'p' constraint. */
+#define TYPE void *
+
+static inline
+void bar (TYPE *r)
+{
+ TYPE t;
+ __asm__ ("" : "=&p" (t), "=p" (*r));
+}
+
+void
+foo (int n, TYPE *x, TYPE *y)
+{
+ if (n == 0)
+ bar (x);
+ else
+ bar (y);
+}
+
+/* { dg-final { scan-tree-dump-times "__asm__" 2 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/pr58981.c b/gcc/testsuite/gcc.dg/pr58981.c
new file mode 100644
index 0000000000..1c8293e498
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr58981.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-minline-all-stringops" { target { i?86-*-* x86_64-*-* } } } */
+
+extern void abort (void);
+
+#define MAX_OFFSET (sizeof (long long))
+#define MAX_COPY (8 * sizeof (long long))
+#define MAX_EXTRA (sizeof (long long))
+
+#define MAX_LENGTH (MAX_OFFSET + MAX_COPY + MAX_EXTRA)
+
+static union {
+ char buf[MAX_LENGTH];
+ long long align_int;
+ long double align_fp;
+} u;
+
+char A[MAX_LENGTH];
+
+int
+main ()
+{
+ int off, len, i;
+ char *p, *q;
+
+ for (i = 0; i < MAX_LENGTH; i++)
+ A[i] = 'A';
+
+ for (off = 0; off < MAX_OFFSET; off++)
+ for (len = 1; len < MAX_COPY; len++)
+ {
+ for (i = 0; i < MAX_LENGTH; i++)
+ u.buf[i] = 'a';
+
+ p = __builtin_memcpy (u.buf + off, A, len);
+ if (p != u.buf + off)
+ abort ();
+
+ q = u.buf;
+ for (i = 0; i < off; i++, q++)
+ if (*q != 'a')
+ abort ();
+
+ for (i = 0; i < len; i++, q++)
+ if (*q != 'A')
+ abort ();
+
+ for (i = 0; i < MAX_EXTRA; i++, q++)
+ if (*q != 'a')
+ abort ();
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59011.c b/gcc/testsuite/gcc.dg/pr59011.c
new file mode 100644
index 0000000000..2fb8187ad5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59011.c
@@ -0,0 +1,22 @@
+/* PR middle-end/59011 */
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99" } */
+
+void
+foo (int m)
+{
+ int a[m];
+ void
+ bar (void)
+ {
+ {
+ int
+ baz (void)
+ {
+ return a[0];
+ }
+ }
+ a[0] = 42;
+ }
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.dg/pr59020.c b/gcc/testsuite/gcc.dg/pr59020.c
new file mode 100644
index 0000000000..696c9df9ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59020.c
@@ -0,0 +1,15 @@
+/* PR rtl-optimization/59020 */
+
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fmodulo-sched -fno-inline -march=corei7" } */
+
+int a, b, d;
+unsigned c;
+
+void f()
+{
+ unsigned q;
+ for(; a; a++)
+ if(((c %= d && 1) ? : 1) & 1)
+ for(; b; q++);
+}
diff --git a/gcc/testsuite/gcc.dg/pr59261.c b/gcc/testsuite/gcc.dg/pr59261.c
new file mode 100644
index 0000000000..6b912deb09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59261.c
@@ -0,0 +1,17 @@
+/* PR middle-end/59261 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef signed char V __attribute__((vector_size (8)));
+
+void
+foo (V *a, V *b)
+{
+ *a = *b * 3;
+}
+
+void
+bar (V *a, V *b)
+{
+ *a = *b * 4;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59350-2.c b/gcc/testsuite/gcc.dg/pr59350-2.c
new file mode 100644
index 0000000000..2fea85fcf7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59350-2.c
@@ -0,0 +1,29 @@
+/* PR debug/59350 */
+
+/* { dg-do compile } */
+/* { dg-options "-O -g " } */
+
+typedef struct
+{
+ void *v;
+ int len;
+ int sign;
+} ZVALUE;
+
+extern int pred (ZVALUE);
+
+static unsigned long
+small_factor (ZVALUE z)
+{
+ if (z.len > 0)
+ return 0;
+
+ return pred (z) ? -1 : 0;
+}
+
+unsigned long
+zfactor (ZVALUE z)
+{
+ z.sign = 0;
+ return small_factor (z);
+}
diff --git a/gcc/testsuite/gcc.dg/pr59350.c b/gcc/testsuite/gcc.dg/pr59350.c
new file mode 100644
index 0000000000..fa632454ae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59350.c
@@ -0,0 +1,82 @@
+/* PR debug/59350 */
+/* Testcase by Ryan Mansfield <rmansfield@qnx.com> */
+
+/* { dg-do compile } */
+/* { dg-options "-O -g" } */
+
+typedef union
+{
+ char b[2];
+ short NotAnInteger;
+}
+mDNSOpaque16;
+typedef mDNSOpaque16 mDNSIPPort;
+typedef struct
+{
+}
+mDNSAddr;
+typedef struct DNSQuestion_struct DNSQuestion;
+typedef struct mDNS_struct mDNS;
+typedef struct __attribute__ ((__packed__))
+{
+ mDNSOpaque16 id;
+ mDNSOpaque16 flags;
+}
+
+DNSMessageHeader;
+typedef struct __attribute__ ((__packed__))
+{
+ DNSMessageHeader h;
+}
+
+DNSMessage;
+struct DNSQuestion_struct
+{
+ DNSQuestion *next;
+ long LastQTime;
+ mDNSOpaque16 TargetQID;
+};
+struct mDNS_struct
+{
+ long timenow;
+ DNSQuestion *Questions;
+};
+extern long mDNSPlatformOneSecond;
+typedef enum
+{
+ kDNSFlag0_QR_Mask = 0x80, kDNSFlag0_QR_Query = 0x00, kDNSFlag0_QR_Response =
+ 0x80, kDNSFlag0_OP_Mask = 0x78, kDNSFlag0_OP_StdQuery =
+ 0x00, kDNSFlag0_OP_Iquery = 0x08, kDNSFlag0_OP_Status =
+ 0x10, kDNSFlag0_OP_Unused3 = 0x18, kDNSFlag0_OP_Notify =
+ 0x20, kDNSFlag0_OP_Update = 0x28, kDNSFlag0_QROP_Mask =
+ kDNSFlag0_QR_Mask | kDNSFlag0_OP_Mask, kDNSFlag0_AA = 0x04, kDNSFlag0_TC =
+ 0x02, kDNSFlag0_RD = 0x01, kDNSFlag1_RA = 0x80, kDNSFlag1_Zero =
+ 0x40, kDNSFlag1_AD = 0x20, kDNSFlag1_CD = 0x10, kDNSFlag1_RC_Mask =
+ 0x0F, kDNSFlag1_RC_NoErr = 0x00, kDNSFlag1_RC_FormErr =
+ 0x01, kDNSFlag1_RC_ServFail = 0x02, kDNSFlag1_RC_NXDomain =
+ 0x03, kDNSFlag1_RC_NotImpl = 0x04, kDNSFlag1_RC_Refused =
+ 0x05, kDNSFlag1_RC_YXDomain = 0x06, kDNSFlag1_RC_YXRRSet =
+ 0x07, kDNSFlag1_RC_NXRRSet = 0x08, kDNSFlag1_RC_NotAuth =
+ 0x09, kDNSFlag1_RC_NotZone = 0x0A
+}
+TSIG_ErrorCode;
+void
+uDNS_ReceiveMsg (mDNS * const m, DNSMessage * const msg,
+ const char * const end, const mDNSAddr * const srcaddr,
+ const mDNSIPPort srcport)
+{
+ DNSQuestion *qptr;
+ char StdR = kDNSFlag0_QR_Response | kDNSFlag0_OP_StdQuery;
+ char QR_OP = (char) (msg->h.flags.b[0] & kDNSFlag0_QROP_Mask);
+ if (QR_OP == StdR)
+ {
+ if (uDNS_ReceiveTestQuestionResponse (m, msg, end, srcaddr, srcport))
+ return;
+ for (qptr = m->Questions; qptr; qptr = qptr->next)
+ if (msg->h.flags.b[0] & kDNSFlag0_TC
+ && ((qptr->TargetQID).NotAnInteger == (msg->h.id).NotAnInteger)
+ && m->timenow - qptr->LastQTime < (60 * mDNSPlatformOneSecond))
+ {
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr59351.c b/gcc/testsuite/gcc.dg/pr59351.c
new file mode 100644
index 0000000000..384058f404
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59351.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -Wpedantic" } */
+
+unsigned int
+foo (void)
+{
+ return sizeof ((int[]) {}); /* { dg-warning "ISO C forbids empty initializer braces" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59418.c b/gcc/testsuite/gcc.dg/pr59418.c
new file mode 100644
index 0000000000..257ce79f19
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59418.c
@@ -0,0 +1,35 @@
+/* PR debug/59418 */
+/* Reported by Ryan Mansfield <rmansfield@qnx.com> */
+
+/* { dg-do compile } */
+/* { dg-options "-Os -g" } */
+/* { dg-options "-march=armv7-a -mfloat-abi=hard -Os -g" { target { arm*-*-* && { ! arm_thumb1 } } } } */
+
+extern int printf (const char *__format, ...);
+
+void
+foo (const char *pptr, int caplen)
+{
+ int type;
+ const char *tptr;
+ if (caplen < 4)
+ {
+ (void) printf ("foo");
+ return;
+ }
+ while (tptr < pptr)
+ {
+ switch (type)
+ {
+ case 0x01:
+ printf ("");
+ case 0x0b:
+ printf ("");
+ case 0x0e:
+ printf ("");
+ case 0x10:
+ printf ("%1.2fW", bar (tptr, caplen) / 1000.0);
+ }
+ }
+ printf ("foo");
+}
diff --git a/gcc/testsuite/gcc.dg/pr59471.c b/gcc/testsuite/gcc.dg/pr59471.c
new file mode 100644
index 0000000000..7f2a7870a0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59471.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+typedef unsigned char uint8x4_t
+__attribute__ ((__vector_size__ (4)));
+
+typedef unsigned short uint16x8_t
+__attribute__ ((__vector_size__ (16)));
+
+typedef unsigned int uint32x4_t
+__attribute__ ((__vector_size__ (16)));
+
+void
+foo (uint16x8_t *x, uint8x4_t *y)
+{
+ *y = (uint8x4_t) ((uint32x4_t) (*x))[0];
+}
diff --git a/gcc/testsuite/gcc.dg/pr59523.c b/gcc/testsuite/gcc.dg/pr59523.c
new file mode 100644
index 0000000000..b523eaea8a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59523.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/59523 */
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
+
+int *
+foo (int a, int *b, int *c, int *d)
+{
+ int i, *r = __builtin_alloca (a * sizeof (int));
+ __builtin_memcpy (r, d, a * sizeof (int));
+ for (i = 0; i < 64; i++)
+ c[i] += b[i];
+ for (i = 0; i < a; i++)
+ if (r[i] == 0)
+ r[i] = 1;
+ return r;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59605-2.c b/gcc/testsuite/gcc.dg/pr59605-2.c
new file mode 100644
index 0000000000..d7567accf5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59605-2.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-DMAX_COPY=1025" { target simulator } } */
+/* { dg-additional-options "-minline-stringops-dynamically" { target { i?86-*-* x86_64-*-* } } } */
+
+#include "pr59605.c"
diff --git a/gcc/testsuite/gcc.dg/pr59605.c b/gcc/testsuite/gcc.dg/pr59605.c
new file mode 100644
index 0000000000..5f87c99b01
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59605.c
@@ -0,0 +1,57 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-minline-stringops-dynamically" { target { i?86-*-* x86_64-*-* } } } */
+
+extern void abort (void);
+
+#define MAX_OFFSET (sizeof (long long))
+#ifndef MAX_COPY
+#define MAX_COPY (1024 + 8192)
+#endif
+#define MAX_EXTRA (sizeof (long long))
+
+#define MAX_LENGTH (MAX_OFFSET + MAX_COPY + MAX_EXTRA)
+
+static union {
+ char buf[MAX_LENGTH];
+ long long align_int;
+ long double align_fp;
+} u;
+
+char A[MAX_LENGTH];
+
+int
+main ()
+{
+ int off, len, i;
+ char *p, *q;
+
+ for (i = 0; i < MAX_LENGTH; i++)
+ A[i] = 'A';
+
+ for (off = 0; off < MAX_OFFSET; off++)
+ for (len = 1; len < MAX_COPY; len++)
+ {
+ for (i = 0; i < MAX_LENGTH; i++)
+ u.buf[i] = 'a';
+
+ p = __builtin_memcpy (u.buf + off, A, len);
+ if (p != u.buf + off)
+ abort ();
+
+ q = u.buf;
+ for (i = 0; i < off; i++, q++)
+ if (*q != 'a')
+ abort ();
+
+ for (i = 0; i < len; i++, q++)
+ if (*q != 'A')
+ abort ();
+
+ for (i = 0; i < MAX_EXTRA; i++, q++)
+ if (*q != 'a')
+ abort ();
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59630.c b/gcc/testsuite/gcc.dg/pr59630.c
new file mode 100644
index 0000000000..6a3c72552f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59630.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+_Bool foo()
+{
+ _Bool (*f)(int) = __builtin_abs; /* { dg-warning "" } */
+ return f(0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr59643.c b/gcc/testsuite/gcc.dg/pr59643.c
new file mode 100644
index 0000000000..f4df5e5b22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59643.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/59643 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-pcom-details" } */
+
+void
+foo (double *a, double *b, double *c, double d, double e, int n)
+{
+ int i;
+ for (i = 1; i < n - 1; i++)
+ a[i] = d * (b[i] + c[i] + a[i - 1] + a[i + 1]) + e * a[i];
+}
+
+/* { dg-final { scan-tree-dump-times "Before commoning:" 1 "pcom" } } */
+/* { dg-final { scan-tree-dump-times "Unrolling 2 times" 1 "pcom" } } */
+/* { dg-final { cleanup-tree-dump "pcom" } } */
diff --git a/gcc/testsuite/gcc.dg/pr59670.c b/gcc/testsuite/gcc.dg/pr59670.c
new file mode 100644
index 0000000000..a68253b4b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59670.c
@@ -0,0 +1,15 @@
+/* PR middle-end/59670 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fopenmp-simd" } */
+
+int d[1024];
+
+int
+foo (int j, int b)
+{
+ int l, c = 0;
+#pragma omp simd reduction(+: c)
+ for (l = 0; l < b; ++l)
+ c += d[j + l];
+ return c;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59722.c b/gcc/testsuite/gcc.dg/pr59722.c
new file mode 100644
index 0000000000..7626fd22e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59722.c
@@ -0,0 +1,36 @@
+/* PR ipa/59722 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+extern void abrt (const char *, int) __attribute__((noreturn));
+void baz (int *, int *);
+
+static inline int
+bar (void)
+{
+ return 1;
+}
+
+static inline void
+foo (int *x, int y (void))
+{
+ while (1)
+ {
+ int a = 0;
+ if (*x)
+ {
+ baz (x, &a);
+ while (a && !y ())
+ ;
+ break;
+ }
+ abrt ("", 1);
+ }
+}
+
+void
+test (int x)
+{
+ foo (&x, bar);
+ foo (&x, bar);
+}
diff --git a/gcc/testsuite/gcc.dg/pr59827.c b/gcc/testsuite/gcc.dg/pr59827.c
new file mode 100644
index 0000000000..77e1e9ca20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59827.c
@@ -0,0 +1,15 @@
+/* PR middle-end/59827 */
+/* { dg-do compile } */
+
+int
+foo (int p[2][]) /* { dg-error "array type has incomplete element type" } */
+{
+ return p[0][0];
+}
+
+void
+bar (void)
+{
+ int p[2][1];
+ foo (p); /* { dg-error "type of formal parameter 1 is incomplete" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59846.c b/gcc/testsuite/gcc.dg/pr59846.c
new file mode 100644
index 0000000000..b3dd0de9ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59846.c
@@ -0,0 +1,39 @@
+/* PR c/59846 */
+/* { dg-do compile } */
+/* { dg-options "-Wlogical-op -Wtype-limits" } */
+
+_Bool
+fn1 (unsigned int p)
+{
+ return 0ULL > p; /* { dg-warning "15:comparison is always false due to limited range of data type" } */
+}
+
+_Bool
+fn2 (unsigned int p)
+{
+ return 0ULL <= p; /* { dg-warning "15:comparison is always true due to limited range of data type" } */
+}
+
+_Bool
+fn3 (unsigned int p)
+{
+ return p >= 0U; /* { dg-warning "12:comparison of unsigned expression >= 0 is always true" } */
+}
+
+_Bool
+fn4 (unsigned int p)
+{
+ return p < 0U; /* { dg-warning "12:comparison of unsigned expression < 0 is always false" } */
+}
+
+_Bool
+fn5 (_Bool p)
+{
+ return p || !p; /* { dg-warning "12:logical" } */
+}
+
+_Bool
+fn6 (_Bool p)
+{
+ return p && !p; /* { dg-warning "12:logical" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59860.c b/gcc/testsuite/gcc.dg/pr59860.c
new file mode 100644
index 0000000000..6807d9c843
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59860.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+extern __inline __attribute__ ((__always_inline__)) __attribute__ ((__gnu_inline__)) __attribute__ ((__artificial__)) char * __attribute__ ((__nothrow__ , __leaf__))
+strcat (char *__restrict __dest, const char *__restrict __src)
+{
+ return __builtin___strcat_chk (__dest, __src, __builtin_object_size (__dest, 2 > 1));
+}
+static char raw_decode;
+void foo (char **argv, char *outfilename)
+{
+ if (**argv == 'r')
+ raw_decode = 1;
+ strcat (outfilename, raw_decode ? ".raw" : ".wav");
+}
diff --git a/gcc/testsuite/gcc.dg/pr59871.c b/gcc/testsuite/gcc.dg/pr59871.c
new file mode 100644
index 0000000000..c881aa198d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59871.c
@@ -0,0 +1,22 @@
+/* PR c/59871 */
+/* { dg-do compile } */
+/* { dg-options "-Wunused" } */
+
+extern int bar ();
+
+void
+foo (int *p, int i)
+{
+ p[0] = (bar (), 1, bar ()); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ p[1] = (1, bar ()); /* { dg-warning "left-hand operand of comma expression has no effect" } */
+ bar (), 1, bar (); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ bar (), 1; /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ 1, bar (); /* { dg-warning "left-hand operand of comma expression has no effect" } */
+ (bar (), 1); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ bar (), 5 * i; /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ (bar (), 5 * i); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ (bar (), (bar (), (bar (), (bar (), (bar (), (bar (), (bar (), 7))))))); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ bar (), (bar (), (bar (), (bar (), (bar (), (bar (), (bar (), 7)))))); /* { dg-warning "right-hand operand of comma expression has no effect" } */
+ bar (), (bar (), (bar (), (bar (), (bar (), (bar (), (7, bar ())))))); /* { dg-warning "left-hand operand of comma expression has no effect" } */
+ (bar (), (bar (), (bar (), (bar (), (bar (), (bar (), (7, bar ()))))))); /* { dg-warning "left-hand operand of comma expression has no effect" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59920-1.c b/gcc/testsuite/gcc.dg/pr59920-1.c
new file mode 100644
index 0000000000..3e60d37ae2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59920-1.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/59920 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+#include <setjmp.h>
+
+int bar (void);
+void baz (int);
+
+#define A { int x = bar (); if (setjmp (buf) == 0) baz (x); }
+#define B A A A A A A A A A A
+#define C B B B B B B B B B B
+
+extern jmp_buf buf;
+
+void
+foo (void)
+{
+ C C
+}
diff --git a/gcc/testsuite/gcc.dg/pr59920-2.c b/gcc/testsuite/gcc.dg/pr59920-2.c
new file mode 100644
index 0000000000..bee5542748
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59920-2.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/59920 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void *bar (void **);
+void *baz (int, void **);
+
+#define A(n) \
+ { __label__ l1_##n, l2_##n, l3_##n; \
+ static void *a[] = { &&l1_##n, &&l2_##n, &&l3_##n };\
+ void *b = bar (a); \
+ goto *b; \
+ l1_##n: \
+ b = baz (1, a); \
+ goto *b; \
+ l2_##n: \
+ b = baz (2, a); \
+ goto *b; \
+ l3_##n:; \
+ }
+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
+ A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
+#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
+ B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
+
+void
+foo (void)
+{
+ C(1)
+}
diff --git a/gcc/testsuite/gcc.dg/pr59920-3.c b/gcc/testsuite/gcc.dg/pr59920-3.c
new file mode 100644
index 0000000000..2159504e36
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59920-3.c
@@ -0,0 +1,47 @@
+/* PR tree-optimization/59920 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void *bar (void **);
+void *baz (int, void **);
+
+#define A(n) __label__ l##n;
+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) \
+ A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
+#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) \
+ B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
+#define D C(1)
+
+int
+foo (void)
+{
+ D
+ int bar (int i)
+ {
+ switch (i)
+ {
+#undef A
+#define A(n) \
+ case n: goto l##n;
+ D
+ }
+ return i;
+ }
+ int w = 0;
+#undef A
+#define A(n) int w##n = 0;
+ D
+#undef A
+#define A(n) \
+ { l##n:; \
+ w##n += bar (10000 + n) - 10000; \
+ w##n += bar (10001 + n) - 10000; \
+ bar (n + 1); \
+ return w##n; \
+ }
+ D
+#undef A
+#define A(n) w += w##n;
+ D
+ return w;
+}
diff --git a/gcc/testsuite/gcc.dg/pr59924.c b/gcc/testsuite/gcc.dg/pr59924.c
new file mode 100644
index 0000000000..1d8d52fb07
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59924.c
@@ -0,0 +1,27 @@
+/* PR tree-optimization/59924 */
+/* { dg-do compile } */
+/* { dg-options "-O1 -Wall" } */
+
+struct S { struct T *a; double b; struct S *c; };
+struct T { struct S *d; };
+extern void bar (double);
+
+void
+foo (struct S * x, int y, int z, int w)
+{
+ int e;
+ struct S *f;
+ for (f = x->a->d; f; f = f->c)
+ {
+ if (5 < w)
+ {
+ e = -w;
+ z = w;
+ }
+ }
+ if (y != 0 || z != 0)
+ {
+ double g = x->b + (double) e * (double) y; /* { dg-warning "may be used uninitialized in this function" } */
+ bar (g * g);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr59940.c b/gcc/testsuite/gcc.dg/pr59940.c
new file mode 100644
index 0000000000..d81eaf78e1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59940.c
@@ -0,0 +1,28 @@
+/* PR c/59940 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion -Woverflow" } */
+
+int f (unsigned int);
+typedef sitype __attribute__((mode(SI)));
+
+int
+g (void)
+{
+ sitype si = 12;
+ unsigned int ui = -1; /* { dg-warning "21:negative integer implicitly converted to unsigned type" } */
+ unsigned char uc;
+ ui = si; /* { dg-warning "8:conversion" } */
+ si = 0x80000000; /* { dg-warning "8:conversion of unsigned constant value to negative integer" } */
+ si = 3.2f; /* { dg-warning "8:conversion" } */
+ uc = 256; /* { dg-warning "8:large integer implicitly truncated to unsigned type" } */
+ si = 0x800000000; /* { dg-warning "8:overflow in implicit constant conversion" } */
+ return f (si) /* { dg-warning "13:conversion" } */
+ + f (si); /* { dg-warning "15:conversion" } */
+}
+
+int
+y (void)
+{
+ f (); /* { dg-error "3:too few arguments to function" } */
+ g (0xa); /* { dg-error "3:too many arguments to function" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59963-1.c b/gcc/testsuite/gcc.dg/pr59963-1.c
new file mode 100644
index 0000000000..4a369db486
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59963-1.c
@@ -0,0 +1,14 @@
+/* PR c/59963 */
+/* { dg-do compile } */
+/* { dg-options "-Wdouble-promotion" } */
+
+extern void baz ();
+extern void qux (int, ...);
+
+void
+foo (float f)
+{
+ bar (f); /* { dg-warning "8:implicit conversion" } */
+ baz (f); /* { dg-warning "8:implicit conversion" } */
+ qux (42, f); /* { dg-warning "12:implicit conversion" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59963-2.c b/gcc/testsuite/gcc.dg/pr59963-2.c
new file mode 100644
index 0000000000..ea0594681a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59963-2.c
@@ -0,0 +1,36 @@
+/* PR c/59963 */
+/* { dg-do compile } */
+/* { dg-options "-Woverflow -Wconversion" } */
+
+extern void bar (unsigned char);
+extern void bar8 (unsigned char, unsigned char, unsigned char, unsigned char,
+ unsigned char, unsigned char, unsigned char, unsigned char);
+extern void bazu (unsigned int, ...);
+extern void bazi (char, int);
+extern int f (short a, short b);
+
+int
+g (void)
+{
+ return f (0xffffffffL, /* { dg-warning "13:overflow in implicit constant conversion" } */
+ 0xffffffffL) /* { dg-warning "13:overflow in implicit constant conversion" } */
+ && f (0xffffffffL, /* { dg-warning "9:overflow in implicit constant conversion" } */
+ 0xffffffffL); /* { dg-warning "9:overflow in implicit constant conversion" } */
+}
+
+void
+foo (int i)
+{
+ bar (256); /* { dg-warning "8:large integer implicitly truncated to unsigned type" } */
+ bar (6.66f); /* { dg-warning "8:conversion" } */
+ bar8 (-1, /* { dg-warning "9:negative integer implicitly converted to unsigned type" } */
+ -2, /* { dg-warning "3:negative integer implicitly converted to unsigned type" } */
+ -3, /* { dg-warning "4:negative integer implicitly converted to unsigned type" } */
+ -4, /* { dg-warning "5:negative integer implicitly converted to unsigned type" } */
+ -5, /* { dg-warning "6:negative integer implicitly converted to unsigned type" } */
+ -6, /* { dg-warning "7:negative integer implicitly converted to unsigned type" } */
+ -7, /* { dg-warning "8:negative integer implicitly converted to unsigned type" } */
+ -8); /* { dg-warning "9:negative integer implicitly converted to unsigned type" } */
+ bazu (i, i); /* { dg-warning "9:conversion" } */
+ bazi (0x8, 0x80000000); /* { dg-warning "14:conversion of unsigned constant value to negative integer" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr59963-3.c b/gcc/testsuite/gcc.dg/pr59963-3.c
new file mode 100644
index 0000000000..eafa37473f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59963-3.c
@@ -0,0 +1,14 @@
+/* PR c/59963 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion" } */
+
+extern void foo (void *p);
+
+void
+bar (void)
+{
+ {
+ /* This must not ICE. */
+ int i __attribute__((cleanup (foo)));
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr59992.c b/gcc/testsuite/gcc.dg/pr59992.c
new file mode 100644
index 0000000000..5434a2fe93
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr59992.c
@@ -0,0 +1,17 @@
+/* PR debug/59992 */
+/* { dg-do compile } */
+/* { dg-require-effective-target run_expensive_tests } */
+/* { dg-options "-O2 -g" } */
+/* { dg-timeout-factor 16.0 } */
+
+#define A(n) if (p[n]) { extern void foo##n (int, int, double, int, int); foo##n (p[n], 5, 8.0, p[n] + p[n + 1], 9); return; }
+#define B(n) A(n##0) A(n##1) A(n##2) A(n##3) A(n##4) A(n##5) A(n##6) A(n##7) A(n##8) A(n##9)
+#define C(n) B(n##0) B(n##1) B(n##2) B(n##3) B(n##4) B(n##5) B(n##6) B(n##7) B(n##8) B(n##9)
+#define D(n) C(n##0) C(n##1) C(n##2) C(n##3) C(n##4) C(n##5) C(n##6) C(n##7) C(n##8) C(n##9)
+#define E(n) D(n##0) D(n##1) D(n##2) D(n##3) D(n##4) D(n##5) D(n##6) D(n##7) D(n##8) D(n##9)
+
+void
+foo (int *p)
+{
+ E(1)
+}
diff --git a/gcc/testsuite/gcc.dg/pr60013.c b/gcc/testsuite/gcc.dg/pr60013.c
new file mode 100644
index 0000000000..5c2ec517d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60013.c
@@ -0,0 +1,47 @@
+/* PR ipa/60013 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef long int jmp_buf[64];
+extern int _setjmp (jmp_buf) __attribute__ ((__nothrow__));
+struct S { int a, b, c; };
+extern struct S *baz (struct S *);
+static jmp_buf j;
+
+static inline int
+bar (int b, int d)
+{
+ return (b & d) < 0;
+}
+
+struct S *
+foo (int a, struct S *b, struct S *c, struct S *d)
+{
+ if (b->a == 0)
+ {
+ switch (a)
+ {
+ case 8:
+ return baz (b);
+ case 7:
+ bar (b->c, c->b);
+ return 0;
+ case 6:
+ case 5:
+ case 4:
+ return baz (c);
+ case 3:
+ case 2:
+ return baz (d);
+ }
+ return 0;
+ }
+ if (b->a == 1)
+ {
+ if (baz (c))
+ return c;
+ else if (_setjmp (j))
+ baz (b);
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60036.c b/gcc/testsuite/gcc.dg/pr60036.c
new file mode 100644
index 0000000000..07eb6ace98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60036.c
@@ -0,0 +1,28 @@
+/* PR c/60036 */
+/* { dg-do compile } */
+/* { dg-options "-Wconversion" } */
+
+extern int fn (void);
+
+void
+foo (int i)
+{
+ unsigned int f = 9;
+
+ /* Don't warn on these. */
+ f += fn () || i;
+ f += fn () && i;
+ f += ! fn ();
+ f -= fn () == i;
+ f |= fn () != i;
+ f &= fn () < i;
+ f ^= fn () > i;
+ f &= fn () <= i;
+ f ^= fn () >= i;
+
+ /* But warn on the following. */
+ f += fn (); /* { dg-warning "conversion" } */
+ f += fn () | i; /* { dg-warning "conversion" } */
+ f += fn () & i; /* { dg-warning "conversion" } */
+ f += fn () ^ i; /* { dg-warning "conversion" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr60087.c b/gcc/testsuite/gcc.dg/pr60087.c
new file mode 100644
index 0000000000..9cdd589735
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60087.c
@@ -0,0 +1,14 @@
+/* PR c/60087 */
+/* { dg-do compile } */
+/* { dg-options "-Wsign-compare" } */
+
+void
+foo (unsigned int ui, int i)
+{
+ const unsigned char uc = 0;
+ _Bool b;
+ b = 0 != ~uc; /* { dg-warning "9:promoted ~unsigned is always non-zero" } */
+ b = 2 != ~uc; /* { dg-warning "9:comparison of promoted ~unsigned with constant" } */
+ b = uc == ~uc; /* { dg-warning "10:comparison of promoted ~unsigned with unsigned" } */
+ b = i == ui; /* { dg-warning "9:comparison between signed and unsigned integer expressions" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr60195.c b/gcc/testsuite/gcc.dg/pr60195.c
new file mode 100644
index 0000000000..0a50a30be2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60195.c
@@ -0,0 +1,56 @@
+/* PR c/60195 */
+/* { dg-do compile } */
+/* { dg-options "-std=c11 -Wpedantic -Wall" } */
+
+typedef _Atomic int atomic_int;
+
+atomic_int
+fn1 (void)
+{
+ atomic_int y = 0;
+ return y;
+}
+
+atomic_int
+fn2 (void)
+{
+ atomic_int y = 0;
+ y;
+ return y;
+}
+
+atomic_int
+fn3 (void)
+{
+ atomic_int y = 0;
+ y++;
+ return y;
+}
+
+void
+fn4 (void)
+{
+ atomic_int y;
+ y = 0;
+ (void) y;
+}
+
+void
+fn5 (void)
+{
+ atomic_int y = 0; /* { dg-warning "unused variable" } */
+}
+
+void
+fn6 (void)
+{
+ atomic_int y; /* { dg-warning "set but not used" } */
+ y = 0;
+}
+
+void
+fn7 (void)
+{
+ atomic_int y = 0;
+ y++;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60267.c b/gcc/testsuite/gcc.dg/pr60267.c
new file mode 100644
index 0000000000..b6228fcefd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60267.c
@@ -0,0 +1,14 @@
+/* PR c++/60267 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -save-temps" } */
+
+void
+foo (int *a, int *b, int *c)
+{
+ int i;
+#pragma GCC ivdep
+ for (i = 0; i < 64; i++)
+ a[i] = b[i] * c[i];
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.dg/pr60485-1.c b/gcc/testsuite/gcc.dg/pr60485-1.c
new file mode 100644
index 0000000000..2e5c2e5bf3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60485-1.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+struct S {
+ int *i[4];
+ int *p1;
+ int *p2;
+ int *p3;
+ int *p4;
+};
+int **b;
+int main()
+{
+ int i = 1;
+ struct S s;
+ s.p3 = &i;
+ int **p;
+ if (b)
+ p = b;
+ else
+ p = &s.i[2];
+ p += 4;
+ if (!b)
+ **p = 0;
+ if (i != 0)
+ abort ();
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60485-2.c b/gcc/testsuite/gcc.dg/pr60485-2.c
new file mode 100644
index 0000000000..767e61d1c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60485-2.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+struct S {
+ int *i[4];
+ int *p1;
+ int *p2;
+ int *p3;
+ int *p4;
+ int **x;
+};
+int **b;
+int main()
+{
+ int i = 1;
+ struct S s;
+ s.p3 = &i;
+ int **p;
+ if (b)
+ p = b;
+ else
+ p = &s.i[2];
+ p += 4;
+ /* prevert fowrprop from creating an offsetted sd constraint and
+ preserve the pointer offsetting constraint. */
+ s.x = p;
+ p = s.x;
+ if (!b)
+ {
+ int *z = *p;
+ /* z should point to i (and non-local/escaped). */
+ *z = 0;
+ }
+ if (i != 0)
+ abort ();
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60598.c b/gcc/testsuite/gcc.dg/pr60598.c
new file mode 100644
index 0000000000..331e8bde26
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60598.c
@@ -0,0 +1,26 @@
+/* PR target/60598 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+/* { dg-additional-options "-march=z196 -mtune=zEC12" { target s390*-*-* } } */
+
+struct S { unsigned a, b[32]; };
+
+void
+foo (struct S *x, struct S *y)
+{
+ unsigned a = y->a, i;
+ if (x == y)
+ for (i = 0; i < a - 1 - i; i++)
+ {
+ unsigned t = x->b[i];
+ x->b[i] = x->b[a - 1 - i];
+ x->b[a - 1 - i] = t;
+ }
+ else
+ {
+ x->a = a;
+ for (i = 0; i < a; i++)
+ x->b[i] = y->b[a - 1 - i];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr60647-1.c b/gcc/testsuite/gcc.dg/pr60647-1.c
new file mode 100644
index 0000000000..73ea856880
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60647-1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct _wincore
+{
+ int y;
+ int width;
+};
+int a;
+static fn1 (dpy, winInfo) struct _XDisplay *dpy;
+struct _wincore *winInfo;
+{
+ a = winInfo->width;
+ fn2 ();
+}
+
+static fn3 (dpy, winInfo, visrgn) struct _XDisplay *dpy;
+{
+ int b = fn1 (0, winInfo);
+ fn4 (0, 0, visrgn);
+}
+
+fn5 (event) struct _XEvent *event;
+{
+ fn3 (0, 0, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr60647-2.c b/gcc/testsuite/gcc.dg/pr60647-2.c
new file mode 100644
index 0000000000..ddeb117852
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60647-2.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct _wincore
+{
+ int width, height;
+};
+
+static void
+foo (void *dpy, struct _wincore *winInfo, int offset)
+{
+ fn1 (winInfo->height);
+}
+
+static void
+bar (void *dpy, int winInfo, int *visrgn)
+{
+ ((void (*) (void *, int, int)) foo) ((void *) 0, winInfo, 0); /* { dg-warning "function called through a non-compatible type" } */
+ fn2 (0, 0, visrgn);
+}
+
+void
+baz (void *dpy, int win, int prop)
+{
+ bar ((void *) 0, 0, (int *) 0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr60704.c b/gcc/testsuite/gcc.dg/pr60704.c
new file mode 100644
index 0000000000..8a9af39fff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60704.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-flive-range-shrinkage" } */
+/* { dg-additional-options "-march=amdfam10" { target { i?86-*-* x86_64-*-* } } } */
+
+struct S
+{
+ int n;
+};
+
+int
+foo (struct S s, double a)
+{
+ return s.n * a;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60797.c b/gcc/testsuite/gcc.dg/pr60797.c
new file mode 100644
index 0000000000..45090bae50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60797.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { alias } } */
+
+extern int foo __attribute__((alias("bar"))); /* { dg-error "supported" } */
+int main()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr60844.c b/gcc/testsuite/gcc.dg/pr60844.c
new file mode 100644
index 0000000000..16ed243d74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60844.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/60844 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+/* { dg-additional-options "-mtune=atom" { target { i?86-*-* x86_64-*-* } } } */
+
+void
+foo (int *x, int y, int z)
+{
+ int b, c = x[0], d = x[1];
+ for (b = 0; b < 1; b++)
+ {
+ int e = (y ? 1 : 0) | (d ? 2 : 0) | (z ? 1 : 0);
+ e |= (c ? 2 : 0) | ((1 >> b) ? 1 : 0);
+ x[2 + b] = e;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr60866.c b/gcc/testsuite/gcc.dg/pr60866.c
new file mode 100644
index 0000000000..020878d41d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr60866.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O -fselective-scheduling -fno-if-conversion -fschedule-insns" } */
+
+int n;
+
+void
+foo (int w, int **dnroot, int **dn)
+{
+ int *child;
+ int *xchild = xchild;
+ for (; w < n; w++)
+ if (!dnroot)
+ {
+ dnroot = dn;
+ for (child = *dn; child; child = xchild)
+ ;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/pr61045.c b/gcc/testsuite/gcc.dg/pr61045.c
new file mode 100644
index 0000000000..1808cdc259
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61045.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+/* { dg-options "-fstrict-overflow" } */
+
+int main ()
+{
+ int a = 0;
+ int b = __INT_MAX__;
+ int t = (a - 2) > (b - 1);
+ if (t != 0)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr61053.c b/gcc/testsuite/gcc.dg/pr61053.c
new file mode 100644
index 0000000000..e270420309
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61053.c
@@ -0,0 +1,75 @@
+/* PR c/61053 */
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
+
+_Alignas (char) char cc;
+_Alignas (short int) char cs;
+_Alignas (int) char ci;
+_Alignas (long int) char cl;
+_Alignas (long long int) char cll;
+_Alignas (float) char cf;
+_Alignas (double) char cd;
+_Alignas (long double) char cld;
+
+_Alignas (char) short int sc; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) short int ss;
+_Alignas (int) short int si;
+_Alignas (long int) short int sl;
+_Alignas (long long int) short int sll;
+_Alignas (float) short int sf;
+_Alignas (double) short int sd;
+_Alignas (long double) short int sld;
+
+_Alignas (char) int ic; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) int is; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) int ii;
+_Alignas (long int) int il;
+_Alignas (long long int) int ill;
+_Alignas (float) int if_;
+_Alignas (double) int id;
+_Alignas (long double) int ild;
+
+_Alignas (char) long int lic; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) long int lis; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) long int lii; /* { dg-error "cannot reduce alignment" "" { target { ! { ilp32 } } } } */
+_Alignas (long int) long int lil;
+_Alignas (long long int) long int lill;
+_Alignas (float) long int lif; /* { dg-error "cannot reduce alignment" "" { target { ! { ilp32 } } } } */
+_Alignas (double) long int lid;
+_Alignas (long double) long int lild;
+
+_Alignas (char) long long int llic; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) long long int llis; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) long long int llii; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (long int) long long int llil; /* { dg-error "cannot reduce alignment" "" { target { x32 } } } */
+_Alignas (long long int) long long int llill;
+_Alignas (float) long long int llif; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (double) long long int llid;
+_Alignas (long double) long long int llild;
+
+_Alignas (char) float fc; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) float fs; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) float fi;
+_Alignas (long int) float fl;
+_Alignas (long long int) float fll;
+_Alignas (float) float ff;
+_Alignas (double) float fd;
+_Alignas (long double) float fld;
+
+_Alignas (char) double dc; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) double ds; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) double di; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (long int) double dl; /* { dg-error "cannot reduce alignment" "" { target { x32 } } } */
+_Alignas (long long int) double dll;
+_Alignas (float) double df; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (double) double dd;
+_Alignas (long double) double dld;
+
+_Alignas (char) long double ldc; /* { dg-error "cannot reduce alignment" } */
+_Alignas (short int) long double lds; /* { dg-error "cannot reduce alignment" } */
+_Alignas (int) long double ldi; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (long int) long double ldl; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (long long int) long double ldll; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (float) long double ldf; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (double) long double ldd; /* { dg-error "cannot reduce alignment" "" { target { ! { ia32 } } } } */
+_Alignas (long double) long double ldld;
diff --git a/gcc/testsuite/gcc.dg/pr61060.c b/gcc/testsuite/gcc.dg/pr61060.c
new file mode 100644
index 0000000000..d2a1365076
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61060.c
@@ -0,0 +1,19 @@
+/* PR target/61060 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -ftree-ter" } */
+
+typedef __SIZE_TYPE__ size_t;
+
+extern inline __attribute__ ((gnu_inline, always_inline, artificial))
+void *memset (void *dest, int ch, size_t len)
+{
+ return __builtin_memset (dest, ch, len);
+}
+
+char buf[10];
+
+void
+foo (void)
+{
+ memset (buf, sizeof (buf), 0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr61158.c b/gcc/testsuite/gcc.dg/pr61158.c
new file mode 100644
index 0000000000..d0ba7f3876
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61158.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/61158 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-original" } */
+
+unsigned long long
+foo (unsigned int x)
+{
+ return ((unsigned long long) x & 0x00ff000000000000ULL) >> 40;
+}
+
+/* { dg-final { scan-tree-dump "return 0;" "original" { target { ilp32 || lp64 } } } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/pr61583.c b/gcc/testsuite/gcc.dg/pr61583.c
new file mode 100644
index 0000000000..8424293c17
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61583.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+void
+f1 (int n, int b)
+{
+ extern void f2 (int);
+ int j;
+
+ if (b)
+ n = 1;
+
+ if (n < 1)
+ __builtin_unreachable ();
+
+ for (j = 0; j < n; j++)
+ f2 (j);
+}
diff --git a/gcc/testsuite/gcc.dg/pr61756.c b/gcc/testsuite/gcc.dg/pr61756.c
new file mode 100644
index 0000000000..4ca90448f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61756.c
@@ -0,0 +1,14 @@
+/* PR target/61756 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <stdatomic.h>
+
+static volatile atomic_flag guard = ATOMIC_FLAG_INIT;
+
+void
+try_atomic_flag_test_and_set (void)
+{
+ atomic_flag_test_and_set (&guard);
+}
diff --git a/gcc/testsuite/gcc.dg/pr61776.c b/gcc/testsuite/gcc.dg/pr61776.c
new file mode 100644
index 0000000000..8768c546bd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr61776.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-generate" } */
+
+#include <setjmp.h>
+
+int cond1, cond2;
+
+int goo() __attribute__((noinline));
+
+int goo() {
+ if (cond1)
+ return 1;
+ else
+ return 2;
+}
+
+jmp_buf env;
+int foo() {
+ int a;
+
+ setjmp(env);
+ if (cond2)
+ a = goo();
+ else
+ a = 3;
+ return a;
+}
diff --git a/gcc/testsuite/gcc.dg/pr62004.c b/gcc/testsuite/gcc.dg/pr62004.c
new file mode 100644
index 0000000000..c994a411b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr62004.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-tree-tail-merge" } */
+
+struct node
+{
+ struct node *next;
+ struct node *prev;
+};
+
+struct node node;
+
+struct head
+{
+ struct node *first;
+};
+
+struct head heads[5];
+
+int k = 2;
+
+struct head *head = &heads[2];
+
+int
+main ()
+{
+ struct node *p;
+
+ node.next = (void*)0;
+
+ node.prev = (void *)head;
+
+ head->first = &node;
+
+ struct node *n = head->first;
+
+ struct head *h = &heads[k];
+
+ heads[2].first = n->next;
+
+ if ((void*)n->prev == (void *)h)
+ p = h->first;
+ else
+ /* Dead tbaa-unsafe load from ((struct node *)&heads[2])->next. */
+ p = n->prev->next;
+
+ return !(p == (void*)0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr62030.c b/gcc/testsuite/gcc.dg/pr62030.c
new file mode 100644
index 0000000000..b8baf93435
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr62030.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+struct node
+{
+ struct node *next;
+ struct node *prev;
+};
+
+struct node node;
+
+struct head
+{
+ struct node *first;
+};
+
+struct head heads[5];
+
+int k = 2;
+
+struct head *head = &heads[2];
+
+static int __attribute__((noinline))
+foo (void)
+{
+ node.prev = (void *)head;
+ head->first = &node;
+
+ struct node *n = head->first;
+ struct head *h = &heads[k];
+ struct node *next = n->next;
+
+ if (n->prev == (void *)h)
+ h->first = next;
+ else
+ n->prev->next = next;
+
+ n->next = h->first;
+ return n->next == &node;
+}
+
+int
+main (void)
+{
+ if (foo ())
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/pr62294.c b/gcc/testsuite/gcc.dg/pr62294.c
new file mode 100644
index 0000000000..c6ec5a7536
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr62294.c
@@ -0,0 +1,10 @@
+/* PR c/62294 */
+/* { dg-do compile } */
+
+#include "pr62294.h"
+
+void
+fn (int *u)
+{
+ foo (u); /* { dg-error "passing argument 1 of .bar. from incompatible pointer type" } */
+}
diff --git a/gcc/testsuite/gcc.dg/pr62294.h b/gcc/testsuite/gcc.dg/pr62294.h
new file mode 100644
index 0000000000..9be45adeab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr62294.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+#define foo bar
+extern void foo (float *);
diff --git a/gcc/testsuite/gcc.dg/pr63186.c b/gcc/testsuite/gcc.dg/pr63186.c
new file mode 100644
index 0000000000..b3648757c7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr63186.c
@@ -0,0 +1,30 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+void *a;
+int b, c, d;
+
+void
+bar ()
+{
+ switch (c)
+ {
+ case 0:
+ lab:
+ __asm__ ("");
+ return;
+ default:
+ break;
+ }
+ b = 0;
+ d = 0;
+ a = &&lab;
+}
+
+void
+foo ()
+{
+ bar ();
+}
+main()
+{
+}
diff --git a/gcc/testsuite/gcc.dg/pr63284.c b/gcc/testsuite/gcc.dg/pr63284.c
new file mode 100644
index 0000000000..dc7fc28b87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr63284.c
@@ -0,0 +1,42 @@
+/* PR debug/63284 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+int a[10], *b, *d, c, f;
+int fn2 (void);
+void fn3 (void);
+void fn4 (int);
+
+static int
+fn1 (int x)
+{
+ int e = a[0];
+ if (e)
+ return 1;
+ if (b)
+ switch (x)
+ {
+ case 1:
+ if (d)
+ e = fn2 ();
+ else
+ fn3 ();
+ break;
+ case 0:
+ if (d)
+ {
+ fn3 ();
+ if (c)
+ fn4 (1);
+ }
+ else
+ fn4 (0);
+ }
+ return e;
+}
+
+void
+fn6 (void)
+{
+ f = fn1 (0);
+}
diff --git a/gcc/testsuite/gcc.dg/pr63342.c b/gcc/testsuite/gcc.dg/pr63342.c
new file mode 100644
index 0000000000..499d508c13
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/pr63342.c
@@ -0,0 +1,26 @@
+/* PR debug/63342 */
+/* { dg-do compile } */
+/* { dg-options "-g -O2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+static __thread double u[9], v[9];
+
+void
+foo (double **p, double **q)
+{
+ *p = u;
+ *q = v;
+}
+
+double
+bar (double x)
+{
+ int i;
+ double s = 0.0;
+ for (i = 0; i < 9; i++)
+ {
+ double a = x + v[i];
+ s += u[i] * a * a;
+ }
+ return s;
+}
diff --git a/gcc/testsuite/gcc.dg/pragma-ep-1.c b/gcc/testsuite/gcc.dg/pragma-ep-1.c
deleted file mode 100644
index e110ff9000..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-ep-1.c
+++ /dev/null
@@ -1,27 +0,0 @@
-/* { dg-do compile { target *-*-osf5* } } */
-/* { dg-final { scan-assembler "xyzzy_one" } } */
-/* { dg-final { scan-assembler "xyzzy_two" } } */
-/* { dg-final { scan-assembler "xyzzz_three" } } */
-/* { dg-final { scan-assembler "four" } } */
-/* { dg-final { scan-assembler-not "_four" } } */
-
-#ifndef __PRAGMA_EXTERN_PREFIX
-#error
-#endif
-
-#pragma extern_prefix "xyzzy_"
-
-extern int one(void);
-extern int two(void);
-
-#pragma extern_prefix "xyzzz_"
-
-extern int three(void);
-
-#pragma extern_prefix ""
-
-extern int four(void);
-
-int (*p[]) (void) = {
- one, two, three, four
-};
diff --git a/gcc/testsuite/gcc.dg/pragma-ep-2.c b/gcc/testsuite/gcc.dg/pragma-ep-2.c
deleted file mode 100644
index 1151d9b4bf..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-ep-2.c
+++ /dev/null
@@ -1,7 +0,0 @@
-/* { dg-do compile { target *-*-osf5* } } */
-
-#pragma extern_prefix /* { dg-warning "malformed" } */
-#pragma extern_prefix foo /* { dg-warning "malformed" } */
-#pragma extern_prefix "foo" 1 /* { dg-warning "junk" } */
-
-int bar; /* silence `ISO C forbids an empty translation unit' warning */
diff --git a/gcc/testsuite/gcc.dg/pragma-ep-3.c b/gcc/testsuite/gcc.dg/pragma-ep-3.c
deleted file mode 100644
index a3e1e6e684..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-ep-3.c
+++ /dev/null
@@ -1,10 +0,0 @@
-/* { dg-do compile { target alpha*-*-osf5* } } */
-/* { dg-final { scan-assembler ",Xfoo" } } */
-
-#pragma extern_prefix "X"
-void foo(void) __attribute__((noreturn));
-void foo(void) __attribute__((noreturn));
-void bar()
-{
- foo();
-}
diff --git a/gcc/testsuite/gcc.dg/pragma-init-fini-2.c b/gcc/testsuite/gcc.dg/pragma-init-fini-2.c
index cd0a65d5b1..91bc622a20 100644
--- a/gcc/testsuite/gcc.dg/pragma-init-fini-2.c
+++ b/gcc/testsuite/gcc.dg/pragma-init-fini-2.c
@@ -2,7 +2,6 @@
/* { dg-do link { target *-*-solaris2.* } } */
/* { dg-options "-fpic" } */
-/* { dg-xfail-if "no .pushsection/.popsection" { i?86-*-solaris2.8 && { ! gas } } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.dg/pragma-init-fini.c b/gcc/testsuite/gcc.dg/pragma-init-fini.c
index c49fec0811..4013b8dd09 100644
--- a/gcc/testsuite/gcc.dg/pragma-init-fini.c
+++ b/gcc/testsuite/gcc.dg/pragma-init-fini.c
@@ -1,7 +1,6 @@
/* Tests for #pragma init and #pragma fini. */
/* { dg-do run { target *-*-solaris2.* } } */
-/* { dg-skip-if "no .pushsection/.popsection" { i?86-*-solaris2.8 && { ! gas } } } */
extern void abort ();
diff --git a/gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c b/gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c
deleted file mode 100644
index c71c88cb75..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr-nosave_low_regs.c
+++ /dev/null
@@ -1,20 +0,0 @@
-/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
-/* { dg-options "-O" } */
-extern void foo ();
-#pragma interrupt
-#pragma nosave_low_regs
-void
-isr()
-{
- foo ();
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
-/* A call will clobber all call-saved registers, but because of
- #pragma nosave_low_regs, r0..r7 need not be saved/restored.
- One of these registers will also do fine to hold the function address.
- Call-saved registers r8..r13 also don't need to be restored. */
-/* { dg-final { scan-assembler-not "\[^f\]r\[0-9\]\[ \t\]*," } } */
-/* { dg-final { scan-assembler-not "\[^f\]r\[89\]" } } */
-/* { dg-final { scan-assembler-not "\[^f\]r1\[,0-3\]" } } */
-/* { dg-final { scan-assembler-times "macl" 2} } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c b/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c
deleted file mode 100644
index 00a0608ccb..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr-trap_exit.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile { target sh-*-* sh[1234ble]*-*-* } } */
-/* { dg-options "-O" } */
-/* This test case will check whether trapa is generated only for isr. */
-#pragma interrupt
-void isr() __attribute__ ((trap_exit (4)));
-void isr()
-{
-}
-void delay(int a)
-{
-}
-int main()
-{
- return 0;
-}
-
-/* { dg-final { scan-assembler-times "trapa\[ \t\]\[ \t\]*#4" 1} } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr-trapa.c b/gcc/testsuite/gcc.dg/pragma-isr-trapa.c
deleted file mode 100644
index 2d32885dbd..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr-trapa.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile { target { { sh-*-* sh[1234ble]*-*-* } && nonpic } } } */
-/* { dg-options "-O" } */
-extern void foo ();
-#pragma trapa
-void
-isr()
-{
- foo ();
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
-/* No interrupt-specific saves should be needed. /
-/* { dg-final { scan-assembler-not "r\[0-7\]\[ \t,\]\[^\n\]*r15" } } */
-/* { dg-final { scan-assembler-not "@r15\[^\n\]*r\[0-7\]\n" } } */
-/* { dg-final { scan-assembler-not "r\[8-9\]" } } */
-/* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
-/* { dg-final { scan-assembler-not "macl" } } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr-trapa2.c b/gcc/testsuite/gcc.dg/pragma-isr-trapa2.c
deleted file mode 100644
index a1165893be..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr-trapa2.c
+++ /dev/null
@@ -1,24 +0,0 @@
-/* { dg-do compile { target { { sh-*-* sh4*-*-* } && nonpic } } } */
-/* { dg-skip-if "FPU Required" { "sh*-*-*" } { "-m*nofpu*" } { "" } } */
-/* { dg-skip-if "FPU Required" { "sh*-*-*" } { "-m4al*" } { "" } } */
-/* { dg-options "-O -m4" } */
-
-extern void foo ();
-#pragma trapa
-void
-isr()
-{
- foo ();
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
-/* No interrupt-specific saves should be needed.
- The function call will require to load the address first into a register,
- then use that for a jsr or jmp. It will also need to load a constant
- address in order to load fpscr. */
-/* { dg-final { scan-assembler-times "r\[0-7\]\n" 3 } } */
-/* { dg-final { scan-assembler-not "r\[8-9\]" } } */
-/* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
-/* { dg-final { scan-assembler-not "macl" } } */
-/* fpscr needs to be saved, loaded and restored. */
-/* { dg-final { scan-assembler-times "\[^_\]fpscr" 3 } } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr.c b/gcc/testsuite/gcc.dg/pragma-isr.c
deleted file mode 100644
index e7565a6824..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-* } } */
-/* { dg-options "-O3" } */
-/* Test case will check whether rte is generated for two ISRs*/
-extern void foo();
-#pragma interrupt
-void isr1(void)
-{
- foo();
-}
-
-#pragma interrupt
-void isr2(void)
-{
- foo();
-}
-
-/* { dg-final { scan-assembler-times "rte" 2} } */
diff --git a/gcc/testsuite/gcc.dg/pragma-isr2.c b/gcc/testsuite/gcc.dg/pragma-isr2.c
deleted file mode 100644
index 3e2e4bb38b..0000000000
--- a/gcc/testsuite/gcc.dg/pragma-isr2.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* { dg-do compile { target h8300-*-* sh-*-* sh[1234ble]*-*-* } } */
-/* { dg-options "-O" } */
-/* This test case will check whether rte is generated only for isr. */
-#pragma interrupt
-void isr()
-{
-}
-void delay(int a)
-{
-}
-int main()
-{
- return 0;
-}
-
-/* { dg-final { scan-assembler-times "rte" 1} } */
diff --git a/gcc/testsuite/gcc.dg/predict-1.c b/gcc/testsuite/gcc.dg/predict-1.c
new file mode 100644
index 0000000000..5c9a5a930a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar(int);
+
+void foo (int bound)
+{
+ int i, ret = 0;
+ for (i = 0; i < bound; i++)
+ {
+ if (i > bound)
+ global += bar (i);
+ if (i >= bound + 2)
+ global += bar (i);
+ if (i > bound - 2)
+ global += bar (i);
+ if (i + 2 > bound)
+ global += bar (i);
+ if (i == 10)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 5 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-2.c b/gcc/testsuite/gcc.dg/predict-2.c
new file mode 100644
index 0000000000..55ca1d0bc7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-2.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar(int);
+
+void foo (int base, int bound)
+{
+ int i, ret = 0;
+ for (i = base; i < bound; i++)
+ {
+ if (i > bound * bound)
+ global += bar (i);
+ if (i > bound + 10)
+ global += bar (i);
+ if (i <= bound + 10)
+ global += bar (i);
+ if (i > base + 10)
+ global += bar (i);
+ if (i < base - 10)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "loop iv compare heuristics" "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-3.c b/gcc/testsuite/gcc.dg/predict-3.c
new file mode 100644
index 0000000000..8881bde30b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-3.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar(int);
+
+void foo (int bound)
+{
+ int i, ret = 0;
+ for (i = 0; i <= bound; i++)
+ {
+ if (i < bound - 2)
+ global += bar (i);
+ if (i <= bound)
+ global += bar (i);
+ if (i + 1 < bound)
+ global += bar (i);
+ if (i != bound)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-4.c b/gcc/testsuite/gcc.dg/predict-4.c
new file mode 100644
index 0000000000..17a50b9ead
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-4.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar(int);
+
+void foo (int bound)
+{
+ int i, ret = 0;
+ for (i = 0; i < 10; i++)
+ {
+ if (i < 5)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump "loop iv compare heuristics: 50.0%" "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-5.c b/gcc/testsuite/gcc.dg/predict-5.c
new file mode 100644
index 0000000000..f2fe339b6c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-5.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar (int);
+
+void foo (int base, int bound)
+{
+ int i, ret = 0;
+ for (i = base; i <= bound; i++)
+ {
+ if (i > base)
+ global += bar (i);
+ if (i > base + 1)
+ global += bar (i);
+ if (i >= base + 3)
+ global += bar (i);
+ if (i - 2 >= base)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 100.0%" 4 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-6.c b/gcc/testsuite/gcc.dg/predict-6.c
new file mode 100644
index 0000000000..bf769fd2cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-6.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar (int);
+
+void foo (int base, int bound)
+{
+ int i, ret = 0;
+ for (i = base; i <= bound; i++)
+ {
+ if (i < base)
+ global += bar (i);
+ if (i < base + 1)
+ global += bar (i);
+ if (i <= base + 3)
+ global += bar (i);
+ if (i - 1 < base)
+ global += bar (i);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "loop iv compare heuristics: 0.0%" 4 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-7.c b/gcc/testsuite/gcc.dg/predict-7.c
new file mode 100644
index 0000000000..2c1c36f787
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-7.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-profile_estimate" } */
+
+extern int global;
+
+int bar (int);
+
+void foo (int base)
+{
+ int i;
+ while (global < 10)
+ for (i = base; i < 10; i++)
+ bar (i);
+}
+
+/* { dg-final { scan-tree-dump-times "loop branch heuristics" 0 "profile_estimate"} } */
+/* { dg-final { cleanup-tree-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/predict-8.c b/gcc/testsuite/gcc.dg/predict-8.c
new file mode 100644
index 0000000000..8c78ca7fc8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/predict-8.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+int foo(float a, float b) {
+ if (a == b)
+ return 1;
+ else
+ return 2;
+}
+
+/* { dg-final { scan-rtl-dump-times "REG_BR_PROB 100" 1 "expand"} } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/pthread-init-2.c b/gcc/testsuite/gcc.dg/pthread-init-2.c
index 3e8a17e23d..8ec0515ba2 100644
--- a/gcc/testsuite/gcc.dg/pthread-init-2.c
+++ b/gcc/testsuite/gcc.dg/pthread-init-2.c
@@ -8,6 +8,7 @@
/* { dg-require-effective-target pthread_h } */
/* { dg-options "-Wextra -Wall -ansi" } */
/* { dg-options "-Wextra -Wall -ansi -D_POSIX_C_SOURCE=199506L" { target { *-*-hpux* } } } */
+/* { dg-options "-Wextra -Wall -ansi -D_XOPEN_SOURCE=500" { target { powerpc-ibm-aix* } } } */
#include "pthread-init-common.h"
diff --git a/gcc/testsuite/gcc.dg/pubtypes-1.c b/gcc/testsuite/gcc.dg/pubtypes-1.c
index 5c6767e8fa..3f09646c80 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-1.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-1.c
@@ -2,7 +2,7 @@
/* { dg-options "-O0 -gdwarf-2 -dA -fno-eliminate-unused-debug-types" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x\[0-9a-f]+\[ \t\]+\[#;]+\[ \t\]+Length of Public Type Names Info" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x\[0-9a-f]+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
/* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-2.c b/gcc/testsuite/gcc.dg/pubtypes-2.c
index fec46617f9..b4ba8712c5 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-2.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-2.c
@@ -2,7 +2,7 @@
/* { dg-options "-O0 -gdwarf-2 -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x6a+\[ \t\]+\[#;]+\[ \t\]+Length of Public Type Names Info" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x13b+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
/* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-3.c b/gcc/testsuite/gcc.dg/pubtypes-3.c
index 455dadf179..f4b0468ab1 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-3.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-3.c
@@ -2,7 +2,7 @@
/* { dg-options "-O0 -gdwarf-2 -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0x6a+\[ \t\]+\[#;]+\[ \t\]+Length of Public Type Names Info" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x13b+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
/* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler-not "\"list_name_type\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
diff --git a/gcc/testsuite/gcc.dg/pubtypes-4.c b/gcc/testsuite/gcc.dg/pubtypes-4.c
index db222da4a7..76d7c4a980 100644
--- a/gcc/testsuite/gcc.dg/pubtypes-4.c
+++ b/gcc/testsuite/gcc.dg/pubtypes-4.c
@@ -2,7 +2,7 @@
/* { dg-options "-O0 -gdwarf-2 -dA" } */
/* { dg-skip-if "Unmatchable assembly" { mmix-*-* } { "*" } { "" } } */
/* { dg-final { scan-assembler "__debug_pubtypes" } } */
-/* { dg-final { scan-assembler "long+\[ \t\]+0xa1+\[ \t\]+\[#;]+\[ \t\]+Length of Public Type Names Info" } } */
+/* { dg-final { scan-assembler "long+\[ \t\]+0x172+\[ \t\]+\[#;]+\[ \t\]+Pub Info Length" } } */
/* { dg-final { scan-assembler "used_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler-not "unused_struct\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
/* { dg-final { scan-assembler "\"list_name_type\\\\0\"+\[ \t\]+\[#;]+\[ \t\]+external name" } } */
diff --git a/gcc/testsuite/gcc.dg/pure-2.c b/gcc/testsuite/gcc.dg/pure-2.c
index 97ba31f026..8c2ba56cd5 100644
--- a/gcc/testsuite/gcc.dg/pure-2.c
+++ b/gcc/testsuite/gcc.dg/pure-2.c
@@ -35,10 +35,10 @@ foo2b(int n)
/* Unbounded loops are not safe. */
static int __attribute__ ((noinline))
-foo3(int n) /* { dg-warning "pure\[^\n\]* normally" "detect pure candidate" } */
+foo3(unsigned int n) /* { dg-warning "pure\[^\n\]* normally" "detect pure candidate" } */
{
int ret = 0;
- int i;
+ unsigned int i;
for (i=0; extern_const (i+n); n++)
ret+=extern_const (i);
return ret;
diff --git a/gcc/testsuite/gcc.dg/scal-to-vec1.c b/gcc/testsuite/gcc.dg/scal-to-vec1.c
deleted file mode 100644
index 0c1a509331..0000000000
--- a/gcc/testsuite/gcc.dg/scal-to-vec1.c
+++ /dev/null
@@ -1,43 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-Wno-long-long" } */
-/* { dg-options "-Wno-long-long -mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
-
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-#define vidx(type, vec, idx) (*((type *) &(vec) + idx))
-
-
-extern float sfl;
-extern int sint;
-extern long long sll;
-
-int main (int argc, char *argv[]) {
- vector(8, short) v0 = {argc, 1,2,3,4,5,6,7};
- vector(8, short) v1;
-
- vector(4, float) f0 = {1., 2., 3., 4.};
- vector(4, float) f1, f2;
-
- vector(4, int) i0 = {1,2,3,4};
- vector(4, int) i1, i2;
-
-
- int i = 12;
- double d = 3.;
-
- v1 = i + v0; /* { dg-error "conversion of scalar to vector" } */
- v1 = 99999 + v0; /* { dg-error "conversion of scalar to vector" } */
-
- f1 = d + f0; /* { dg-error "conversion of scalar to vector" } */
- f1 = 1.3 + f0; /* { dg-error "conversion of scalar to vector" } */
- f1 = sll + f0; /* { dg-error "conversion of scalar to vector" } */
- f1 = ((int)998769576) + f0; /* { dg-error "conversion of scalar to vector" } */
-
- /* convert.c should take care of this. */
- i1 = sfl + i0; /* { dg-error "can't convert value to a vector" } */
- i1 = 1.5 + i0; /* { dg-error "can't convert value to a vector" } */
- v1 = d + v0; /* { dg-error "can't convert value to a vector" } */
-
- return 0;
-}
diff --git a/gcc/testsuite/gcc.dg/scal-to-vec2.c b/gcc/testsuite/gcc.dg/scal-to-vec2.c
deleted file mode 100644
index 1897b93e05..0000000000
--- a/gcc/testsuite/gcc.dg/scal-to-vec2.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
-
-/* Test for C_MAYBE_CONST are folded correctly when
- expanding an expression to vector. */
-
-int f(void);
-unsigned int g(void);
-unsigned int h;
-
-typedef unsigned int vec __attribute__((vector_size(16)));
-
-vec i;
-
-
-vec fv1(void) { return i + (h ? f() : g()); }
-vec fv2(void) { return (h ? f() : g()) + i; }
diff --git a/gcc/testsuite/gcc.dg/sequence-pt-1.c b/gcc/testsuite/gcc.dg/sequence-pt-1.c
index 05eee82c17..2e22b662a4 100644
--- a/gcc/testsuite/gcc.dg/sequence-pt-1.c
+++ b/gcc/testsuite/gcc.dg/sequence-pt-1.c
@@ -15,7 +15,7 @@ extern int fnb (int, int);
extern int fnc (int *);
extern int sprintf (char *, const char *, ...);
-typedef __SIZE_TYPE__ size_t;
+typedef __UINTPTR_TYPE__ uintptr_t;
void
foo (int a, int b, int n, int p, int *ptr, struct s *sptr,
@@ -32,9 +32,9 @@ foo (int a, int b, int n, int p, int *ptr, struct s *sptr,
ap[++n] = bp[--n]; /* { dg-warning "undefined" "sequence point warning" } */
cp[n][n] = cp[n][n]++; /* { dg-warning "undefined" "sequence point warning" } */
cp[n][p] = cp[n][n++]; /* { dg-warning "undefined" "sequence point warning" } */
- *ptr++ = (size_t)ptr++; /* { dg-warning "undefined" "sequence point warning" } */
+ *ptr++ = (uintptr_t)ptr++; /* { dg-warning "undefined" "sequence point warning" } */
sptr->a = sptr->a++; /* { dg-warning "undefined" "sequence point warning" } */
- sptr->a = (size_t)(sptr++); /* { dg-warning "undefined" "sequence point warning" } */
+ sptr->a = (uintptr_t)(sptr++); /* { dg-warning "undefined" "sequence point warning" } */
*ptr++ = fn (*ptr); /* { dg-warning "undefined" "sequence point warning" } */
a = b = a++; /* { dg-warning "undefined" "sequence point warning" } */
b = a = --b; /* { dg-warning "undefined" "sequence point warning" } */
diff --git a/gcc/testsuite/gcc.dg/setjmp-2.c b/gcc/testsuite/gcc.dg/setjmp-2.c
index f31f6b2926..bd35a25673 100644
--- a/gcc/testsuite/gcc.dg/setjmp-2.c
+++ b/gcc/testsuite/gcc.dg/setjmp-2.c
@@ -1,6 +1,6 @@
/* PR middle-end/17813 */
/* Origin: Tom Hughes <tom@compton.nu> */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
/* { dg-options "-O -fomit-frame-pointer" } */
/* { dg-options "-O -fomit-frame-pointer -march=i386" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
diff --git a/gcc/testsuite/gcc.dg/setjmp-5.c b/gcc/testsuite/gcc.dg/setjmp-5.c
new file mode 100644
index 0000000000..c6e5f93174
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/setjmp-5.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wall" } */
+
+#include <setjmp.h>
+
+void bar (int);
+
+jmp_buf buf;
+int v;
+
+void
+foo (void)
+{
+ int i;
+ bar (0);
+ bar (1);
+ i = 5;
+ int j = setjmp (buf);
+ if (j == 0)
+ bar (2);
+ v = i; /* { dg-bogus "may be used uninitialized in this function" } */
+}
diff --git a/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
new file mode 100644
index 0000000000..fbe6f4fd20
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/shrink-wrap-alloca.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+int *p;
+
+void
+test (int a)
+{
+ if (a > 0)
+ p = __builtin_alloca (4);
+}
diff --git a/gcc/testsuite/gcc.dg/shrink-wrap-pretend.c b/gcc/testsuite/gcc.dg/shrink-wrap-pretend.c
new file mode 100644
index 0000000000..6e20ca12e9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/shrink-wrap-pretend.c
@@ -0,0 +1,36 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+
+#define DEBUG_BUFFER_SIZE 80
+int unifi_debug = 5;
+
+void
+unifi_trace (void* ospriv, int level, const char *fmt, ...)
+{
+ static char s[DEBUG_BUFFER_SIZE];
+ va_list args;
+ unsigned int len;
+
+ if (!ospriv)
+ return;
+
+ if (unifi_debug >= level)
+ {
+ va_start (args, fmt);
+ len = vsnprintf (&(s)[0], (DEBUG_BUFFER_SIZE), fmt, args);
+ va_end (args);
+
+ if (len >= DEBUG_BUFFER_SIZE)
+ {
+ (s)[DEBUG_BUFFER_SIZE - 2] = '\n';
+ (s)[DEBUG_BUFFER_SIZE - 1] = 0;
+ }
+
+ printf ("%s", s);
+ }
+}
+
diff --git a/gcc/testsuite/gcc.dg/shrink-wrap-sibcall.c b/gcc/testsuite/gcc.dg/shrink-wrap-sibcall.c
new file mode 100644
index 0000000000..193bec2ce6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/shrink-wrap-sibcall.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+unsigned char a, b, d, f, g;
+
+int test (void);
+
+int
+baz (int c)
+{
+ if (c == 0) return test ();
+ if (b & 1)
+ {
+ g = 0;
+ int e = (a & 0x0f) - (g & 0x0f);
+
+ if (!a) b |= 0x80;
+ a = e + test ();
+ f = g/5 + a*3879 + b *2985;
+ }
+ else
+ {
+ f = g + a*39879 + b *25;
+ }
+ return test ();
+}
diff --git a/gcc/testsuite/gcc.dg/sibcall-3.c b/gcc/testsuite/gcc.dg/sibcall-3.c
index c4460e2e52..e02a410e6d 100644
--- a/gcc/testsuite/gcc.dg/sibcall-3.c
+++ b/gcc/testsuite/gcc.dg/sibcall-3.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
+/* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* nds32*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/sibcall-4.c b/gcc/testsuite/gcc.dg/sibcall-4.c
index 4f468f6595..a66ed07986 100644
--- a/gcc/testsuite/gcc.dg/sibcall-4.c
+++ b/gcc/testsuite/gcc.dg/sibcall-4.c
@@ -5,7 +5,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Hans-Peter Nilsson <hp@bitrange.com> */
-/* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
+/* { dg-do run { xfail { { cris-*-* crisv32-*-* h8300-*-* hppa*64*-*-* m32r-*-* mcore-*-* mn10300-*-* nds32*-*-* xstormy16-*-* v850*-*-* vax-*-* xtensa*-*-* } || { arm*-*-* && { ! arm32 } } } } } */
/* -mlongcall disables sibcall patterns. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls" } */
diff --git a/gcc/testsuite/gcc.dg/sibcall-6.c b/gcc/testsuite/gcc.dg/sibcall-6.c
index b62a8eebc5..744bf46981 100644
--- a/gcc/testsuite/gcc.dg/sibcall-6.c
+++ b/gcc/testsuite/gcc.dg/sibcall-6.c
@@ -6,7 +6,7 @@
Copyright (C) 2002 Free Software Foundation Inc.
Contributed by Andreas Bauer <baueran@in.tum.de> */
-/* { dg-do run { target i?86-*-* x86_64-*-* s390*-*-* } } */
+/* { dg-do run { target epiphany-*-* i?86-*-* x86_64-*-* s390*-*-* } } */
/* { dg-skip-if "" { { i?86-*-* x86_64-*-* } && { ia32 && { ! nonpic } } } { "*" } { "" } } */
/* { dg-options "-O2 -foptimize-sibling-calls -fno-ipa-cp" } */
diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
index cf1123aaaa..a4c2302d48 100644
--- a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
+++ b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +20,11 @@ load_lib gcc-dg.exp
load_lib gcc-simulate-thread.exp
load_lib torture-options.exp
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
dg-init
torture-init
set-torture-options [list \
diff --git a/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-2.c b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-2.c
new file mode 100644
index 0000000000..d4d28f5ed6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-2.c
@@ -0,0 +1,74 @@
+/* { dg-do link } */
+/* { dg-options "--param allow-store-data-races=0 -O2" } */
+/* { dg-final { simulate-thread } } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "simulate-thread.h"
+
+/* Test that speculative stores do not happen for --param
+ allow-store-data-races=0. */
+
+int count, insns;
+
+struct obj {
+ int data;
+ struct obj *next;
+} *q;
+
+void simulate_thread_other_threads ()
+{
+ ++insns;
+ ++count;
+}
+
+int simulate_thread_step_verify ()
+{
+ return 0;
+}
+
+int simulate_thread_final_verify ()
+{
+ /* If count != insns, someone must have cached `count' and stored a
+ racy value into it. */
+ if (count != insns)
+ {
+ printf("FAIL: count was incorrectly cached\n");
+ return 1;
+ }
+ return 0;
+}
+
+/* Test that `count' is not written to unless p->data > 0. */
+
+__attribute__((noinline))
+void simulate_thread_main()
+{
+ struct obj *p;
+ for (p = q; p; p = p->next)
+ if (p->data > 0)
+ count++;
+}
+
+struct obj *
+insert(struct obj *head, int data)
+{
+ struct obj *t = (struct obj *) malloc (sizeof (struct obj));
+ t->next = head;
+ t->data = data;
+ return t;
+}
+
+int main()
+{
+ q = insert (0, 0);
+ q = insert (q, 0);
+ q = insert (q, 0);
+ q = insert (q, 0);
+ q = insert (q, 0);
+
+ simulate_thread_main ();
+ simulate_thread_done ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-3.c b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-3.c
new file mode 100644
index 0000000000..203c026048
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-3.c
@@ -0,0 +1,71 @@
+/* { dg-do link } */
+/* { dg-options "--param allow-store-data-races=0 -O2" } */
+/* { dg-final { simulate-thread } } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "simulate-thread.h"
+
+/* Test distilled from PR52558. */
+
+int g_1 = 1;
+int g_2 = 0, insns = 0;
+int f;
+
+/* Test that g_2 is not written to unless !g_1. */
+
+__attribute__((noinline))
+int funky()
+{
+ int l;
+ for (l = 0; l != 4; l++)
+ {
+ if (g_1)
+ {
+ /* g_1 is globally true so we should always execute here,
+ thus never writing to g_2 under any circumstance in this
+ code path. */
+ return l;
+ }
+ for (g_2 = 0; g_2 >= 26; ++g_2)
+ ;
+ }
+ return 999;
+}
+
+int simulate_thread_final_verify ()
+{
+ /* If g_2 != insns, someone must have cached `g_2' and stored a
+ racy value into it. */
+ if (g_2 != insns)
+ {
+ printf("FAIL: g_2 was incorrectly cached\n");
+ return 1;
+ }
+ return 0;
+}
+
+void simulate_thread_other_threads ()
+{
+ ++insns;
+ ++g_2;
+}
+
+int simulate_thread_step_verify ()
+{
+ return 0;
+}
+
+__attribute__((noinline))
+void simulate_thread_main()
+{
+ f = funky();
+}
+
+int main()
+{
+ simulate_thread_main ();
+ simulate_thread_done ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c
new file mode 100644
index 0000000000..59f81b756b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/simulate-thread/speculative-store-4.c
@@ -0,0 +1,54 @@
+/* { dg-do link } */
+/* { dg-options "--param allow-store-data-races=0" } */
+/* { dg-final { simulate-thread } } */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "simulate-thread.h"
+
+/* PR 54139 */
+/* Test that speculative stores do not happen for --param
+ allow-store-data-races=0. */
+
+int g_13=1, insns=1;
+
+__attribute__((noinline))
+void simulate_thread_main()
+{
+ int l_245;
+
+ /* Since g_13 is unilaterally set positive above, there should be
+ no store to g_13 below. */
+ for (l_245 = 0; l_245 <= 1; l_245 += 1)
+ for (; g_13 <= 0; g_13 = 1)
+ ;
+}
+
+int main()
+{
+ simulate_thread_main ();
+ simulate_thread_done ();
+ return 0;
+}
+
+void simulate_thread_other_threads ()
+{
+ ++g_13;
+ ++insns;
+}
+
+int simulate_thread_step_verify ()
+{
+ return 0;
+}
+
+int simulate_thread_final_verify ()
+{
+ if (g_13 != insns)
+ {
+ printf("FAIL: g_13 was incorrectly cached\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/sms-4.c b/gcc/testsuite/gcc.dg/sms-4.c
index 83b32d05a4..98132e0d0c 100644
--- a/gcc/testsuite/gcc.dg/sms-4.c
+++ b/gcc/testsuite/gcc.dg/sms-4.c
@@ -1,4 +1,4 @@
-/* Inspired from sbitmap_a_or_b_and_c_cg function in sbitmap.c. */
+/* Inspired from bitmap_or_and function in sbitmap.c. */
/* { dg-do run } */
/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms" } */
/* { dg-options "-O2 -fmodulo-sched -fmodulo-sched-allow-regmoves -fdump-rtl-sms --param sms-min-sc=1" { target powerpc*-*-* } } */
diff --git a/gcc/testsuite/gcc.dg/sms-6.c b/gcc/testsuite/gcc.dg/sms-6.c
index 3da708dada..87d1a959ab 100644
--- a/gcc/testsuite/gcc.dg/sms-6.c
+++ b/gcc/testsuite/gcc.dg/sms-6.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1" } */
/* { dg-options "-O2 -fmodulo-sched -fdump-rtl-sms --param sms-min-sc=1 -fmodulo-sched-allow-regmoves" { target powerpc*-*-* } } */
@@ -17,16 +18,13 @@ void foo (int * __restrict__ a, int * __restrict__ b, int * __restrict__ c)
}
}
-
int a[100], b[100], c[100];
+
int main()
{
-#if (__SIZEOF_INT__ <= 2)
int i;
- long res;
-#else
- int i, res;
-#endif
+ int res;
+
for(i = 0; i < 100; i++)
{
b[i] = c[i] = i;
@@ -47,4 +45,3 @@ int main()
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 1 "sms" { target spu-*-* } } } */
/* { dg-final { scan-rtl-dump-times "SMS succeeded" 3 "sms" { target powerpc*-*-* } } } */
/* { dg-final { cleanup-rtl-dump "sms" } } */
-
diff --git a/gcc/testsuite/gcc.dg/spec-options.c b/gcc/testsuite/gcc.dg/spec-options.c
new file mode 100644
index 0000000000..1f9d8c1fd8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/spec-options.c
@@ -0,0 +1,17 @@
+/* Check that -mfoo is accepted if defined in a user spec
+ and that it is not passed on the command line. */
+/* Must be processed in EXTRA_SPECS to run. */
+/* { dg-do run { target sh*-*-* } } */
+/* { dg-do compile } */
+/* { dg-options "-B${srcdir}/gcc.dg --specs=foo.specs -tfoo" } */
+
+extern void abort(void);
+
+int main(void)
+{
+#ifdef FOO
+ return 0;
+#else
+ abort();
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/special/mips-abi.exp b/gcc/testsuite/gcc.dg/special/mips-abi.exp
index 3af47be511..0eba278c51 100644
--- a/gcc/testsuite/gcc.dg/special/mips-abi.exp
+++ b/gcc/testsuite/gcc.dg/special/mips-abi.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/special/special.exp b/gcc/testsuite/gcc.dg/special/special.exp
index bb6ef85bd9..637f2a407b 100644
--- a/gcc/testsuite/gcc.dg/special/special.exp
+++ b/gcc/testsuite/gcc.dg/special/special.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/split-1.c b/gcc/testsuite/gcc.dg/split-1.c
index 044b4e2889..91fcb4aa55 100644
--- a/gcc/testsuite/gcc.dg/split-1.c
+++ b/gcc/testsuite/gcc.dg/split-1.c
@@ -1,6 +1,6 @@
/* This test needs to use setrlimit to set the stack size, so it can
only run on Unix. */
-/* { dg-do run { target *-*-linux* *-*-solaris* *-*-darwin* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-solaris* *-*-darwin* } } */
/* { dg-require-effective-target split_stack } */
/* { dg-options "-fsplit-stack" } */
diff --git a/gcc/testsuite/gcc.dg/split-3.c b/gcc/testsuite/gcc.dg/split-3.c
index 360f6720c7..64bbb8c0ec 100644
--- a/gcc/testsuite/gcc.dg/split-3.c
+++ b/gcc/testsuite/gcc.dg/split-3.c
@@ -1,6 +1,6 @@
/* This test needs to use setrlimit to set the stack size, so it can
only run on Unix. */
-/* { dg-do run { target *-*-linux* *-*-solaris* *-*-darwin* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-solaris* *-*-darwin* } } */
/* { dg-require-effective-target split_stack } */
/* { dg-options "-fsplit-stack" } */
diff --git a/gcc/testsuite/gcc.dg/split-4.c b/gcc/testsuite/gcc.dg/split-4.c
index 38196bed6c..b89164e34d 100644
--- a/gcc/testsuite/gcc.dg/split-4.c
+++ b/gcc/testsuite/gcc.dg/split-4.c
@@ -1,6 +1,6 @@
/* This test needs to use setrlimit to set the stack size, so it can
only run on Unix. */
-/* { dg-do run { target *-*-linux* *-*-solaris* *-*-darwin* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-solaris* *-*-darwin* } } */
/* { dg-require-effective-target split_stack } */
/* { dg-options "-fsplit-stack" } */
diff --git a/gcc/testsuite/gcc.dg/stack-usage-1.c b/gcc/testsuite/gcc.dg/stack-usage-1.c
index e2c38ee302..05e3df7bef 100644
--- a/gcc/testsuite/gcc.dg/stack-usage-1.c
+++ b/gcc/testsuite/gcc.dg/stack-usage-1.c
@@ -7,7 +7,11 @@
function FOO is reported as 256 or 264 in the stack usage (.su) file.
Then check that this is the actual stack usage in the assembly file. */
-#if defined(__i386__)
+#if defined(__aarch64__)
+# define SIZE 256 /* No frame pointer for leaf functions (default) */
+#elif defined(__arc__)
+# define SIZE (256-4)
+#elif defined(__i386__)
# define SIZE 248
#elif defined(__x86_64__)
# ifndef _WIN64
@@ -34,9 +38,16 @@
# else
# define SIZE 248
# endif
+#elif defined (__nds32__)
+# define SIZE 248 /* 256 - 8 bytes, only $fp and padding bytes are saved in
+ the register save area under O0 optimization level. */
#elif defined (__powerpc64__) || defined (__ppc64__) || defined (__POWERPC64__) \
|| defined (__PPC64__)
-# define SIZE 180
+# if _CALL_ELF == 2
+# define SIZE 208
+# else
+# define SIZE 180
+# endif
#elif defined (__powerpc__) || defined (__PPC__) || defined (__ppc__) \
|| defined (__POWERPC__) || defined (PPC) || defined (_IBMR2)
# if defined (__ALTIVEC__)
@@ -45,6 +56,8 @@
# else
# define SIZE 220
# endif
+# elif defined (_AIX)
+# define SIZE 208
# else
# define SIZE 240
# endif
@@ -58,8 +71,16 @@
# define SIZE 224
#elif defined (__epiphany__)
# define SIZE (256 - __EPIPHANY_STACK_OFFSET__)
+#elif defined (__RL78__)
+# define SIZE 254
#elif defined (__sh__)
# define SIZE 252
+#elif defined (__frv__)
+# define SIZE 248
+#elif defined (xstormy16)
+# define SIZE 254
+#elif defined (__nios2__)
+# define SIZE 252
#else
# define SIZE 256
#endif
diff --git a/gcc/testsuite/gcc.dg/stack-usage-2.c b/gcc/testsuite/gcc.dg/stack-usage-2.c
index d3c17a84d8..df7e55f056 100644
--- a/gcc/testsuite/gcc.dg/stack-usage-2.c
+++ b/gcc/testsuite/gcc.dg/stack-usage-2.c
@@ -1,33 +1,32 @@
/* { dg-do compile } */
/* { dg-options "-Wstack-usage=512" } */
-int foo1 (void)
+int foo1 (void) /* { dg-bogus "stack usage" } */
{
char arr[16];
arr[0] = 1;
return 0;
-} /* { dg-bogus "stack usage" } */
+}
-int foo2 (void)
+int foo2 (void) /* { dg-warning "stack usage is \[0-9\]* bytes" } */
{
char arr[1024];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage is \[0-9\]* bytes" } */
+}
-int foo3 (void)
+int foo3 (void) /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
{
char arr[1024] __attribute__((aligned (512)));
arr[0] = 1;
/* Force dynamic realignment of argument pointer. */
__builtin_apply ((void (*)()) foo2, 0, 0);
return 0;
+}
-} /* { dg-warning "stack usage might be \[0-9\]* bytes" } */
-
-int foo4 (int n)
+int foo4 (int n) /* { dg-warning "stack usage might be unbounded" } */
{
char arr[n];
arr[0] = 1;
return 0;
-} /* { dg-warning "stack usage might be unbounded" } */
+}
diff --git a/gcc/testsuite/gcc.dg/stmt-expr-4.c b/gcc/testsuite/gcc.dg/stmt-expr-4.c
new file mode 100644
index 0000000000..d6d01633d3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/stmt-expr-4.c
@@ -0,0 +1,22 @@
+
+/* { dg-options "-O2 -std=gnu99" } */
+/* Internal compiler error in iterative_hash_expr */
+
+struct tree_string
+{
+ char str[1];
+};
+
+union tree_node
+{
+ struct tree_string string;
+};
+
+char *Foo (union tree_node * num_string)
+{
+ char *str = ((union {const char * _q; char * _nq;})
+ ((const char *)(({ __typeof (num_string) const __t
+ = num_string; __t; })
+ ->string.str)))._nq;
+ return str;
+}
diff --git a/gcc/testsuite/gcc.dg/strict-overflow-4.c b/gcc/testsuite/gcc.dg/strict-overflow-4.c
index 1a8c4ed433..ad2d635e46 100644
--- a/gcc/testsuite/gcc.dg/strict-overflow-4.c
+++ b/gcc/testsuite/gcc.dg/strict-overflow-4.c
@@ -12,8 +12,5 @@ foo (int i)
return i + 1 > i;
}
-/* We expect to see "<bb N>"; confirm that, so that we know to count
- it in the real test. */
-/* { dg-final { scan-tree-dump-times "<bb\[^>\]*>" 1 "optimized" } } */
-/* { dg-final { scan-tree-dump-times ">|<" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump "return 1;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-1.c b/gcc/testsuite/gcc.dg/strlenopt-1.c
index 5bc4f0cd17..5ed5be1f92 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-1.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-1.c
@@ -16,9 +16,7 @@ foo (char *p, char *r)
is immediately overwritten. */
strcat (q, "/");
strcat (q, "abcde");
- /* Due to inefficient PTA (PR50262) the above calls invalidate
- string length of r, so it is optimized just into strcpy instead
- of memcpy. */
+ /* This can also be optimized into memcpy. */
strcat (q, r);
return q;
}
@@ -39,8 +37,8 @@ main ()
}
/* { dg-final { scan-tree-dump-times "strlen \\(" 2 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 3 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "strcpy \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 4 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-10.c b/gcc/testsuite/gcc.dg/strlenopt-10.c
index a18c06ae06..b044496352 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-10.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-10.c
@@ -70,7 +70,10 @@ main ()
}
/* { dg-final { scan-tree-dump-times "strlen \\(" 2 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 8 "strlen" } } */
+/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op
+ to expand the memcpy call at the end of fn2. */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 8 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen" { target { avr-*-* } } } } */
/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-11.c b/gcc/testsuite/gcc.dg/strlenopt-11.c
index 03f8790d0c..0fb327ced0 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-11.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-11.c
@@ -59,12 +59,18 @@ main ()
}
/* { dg-final { scan-tree-dump-times "strlen \\(" 3 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen" } } */
+/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op
+ to expand the memcpy call at the end of fn1. */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen" { target { avr-*-* } } } } */
/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.9. = " 1 "strlen" } } */
+/* Where the memcpy is expanded, the assignemts to elements of l are
+ propagated. */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.9. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 3 "strlen" { target { avr-*-* } } } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-12g.c b/gcc/testsuite/gcc.dg/strlenopt-12g.c
index 2b6508f01d..f1dec1f9c9 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-12g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-12g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-13.c b/gcc/testsuite/gcc.dg/strlenopt-13.c
index 62effcd64d..f9ab561110 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-13.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-13.c
@@ -56,13 +56,19 @@ main ()
}
/* { dg-final { scan-tree-dump-times "strlen \\(" 4 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen" } } */
+/* avr has BIGGEST_ALIGNMENT 8, allowing fold_builtin_memory_op
+ to expand the memcpy call at the end of fn1. */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 7 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 6 "strlen" { target { avr-*-* } } } } */
/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.1. = " 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.5. = " 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times " D\.\[0-9_\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen" } } */
+/* Where the memcpy is expanded, the assignemts to elements of l are
+ propagated. */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.0. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.1. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.5. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;\[\n\r\]* l.6. = " 1 "strlen" { target { ! avr-*-* } } } } */
+/* { dg-final { scan-tree-dump-times " _\[0-9\]* = strlen \\(\[^\n\r\]*;" 4 "strlen" { target { avr-*-* } } } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-14g.c b/gcc/testsuite/gcc.dg/strlenopt-14g.c
index 62a120de07..86c57f195f 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-14g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-14g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy and mempcpy functions. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-14gf.c b/gcc/testsuite/gcc.dg/strlenopt-14gf.c
index 999759e86f..8b78538d41 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-14gf.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-14gf.c
@@ -1,6 +1,6 @@
/* This test needs runtime that provides stpcpy, mempcpy and __*_chk
functions. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define FORTIFY_SOURCE 2
@@ -11,14 +11,14 @@
memcpy. */
/* { dg-final { scan-tree-dump-times "strlen \\(" 4 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__memcpy_chk \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__mempcpy_chk \\(" 2 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__mempcpy_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__strcpy_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__strcat_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__stpcpy_chk \\(" 3 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "mempcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__stpcpy_chk \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "mempcpy \\(" 2 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "stpcpy \\(" 2 "strlen" } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-16g.c b/gcc/testsuite/gcc.dg/strlenopt-16g.c
index 11e4d319ad..0e74ad7f20 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-16g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-16g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-17g.c b/gcc/testsuite/gcc.dg/strlenopt-17g.c
index b61bf74b8b..f06435f6b9 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-17g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-17g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-18g.c b/gcc/testsuite/gcc.dg/strlenopt-18g.c
index c70daea4b2..21b6c47c0b 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-18g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-18g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-1f.c b/gcc/testsuite/gcc.dg/strlenopt-1f.c
index 4b0207fd4f..50c5f91306 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-1f.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-1f.c
@@ -1,17 +1,17 @@
/* This test needs runtime that provides __*_chk functions. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define FORTIFY_SOURCE 2
#include "strlenopt-1.c"
/* { dg-final { scan-tree-dump-times "strlen \\(" 2 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__memcpy_chk \\(" 3 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__strcpy_chk \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__memcpy_chk \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__strcpy_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__strcat_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__stpcpy_chk \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 4 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-22g.c b/gcc/testsuite/gcc.dg/strlenopt-22g.c
index 45c6345fc8..4cd6a5f1c7 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-22g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-22g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-23.c b/gcc/testsuite/gcc.dg/strlenopt-23.c
new file mode 100644
index 0000000000..75dab2ae0b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/strlenopt-23.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/57230 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#include "strlenopt.h"
+
+int
+main ()
+{
+ char p[] = "hello world";
+ p[0] = (char) (strlen (p) - 1);
+ if (strlen (p) != 11)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/strlenopt-24.c b/gcc/testsuite/gcc.dg/strlenopt-24.c
new file mode 100644
index 0000000000..962e04fded
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/strlenopt-24.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/57230 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-strlen" } */
+
+#include "strlenopt.h"
+
+int
+main ()
+{
+ char p[] = "hello world";
+ if (strlen (p) != 11)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } *
+/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-25.c b/gcc/testsuite/gcc.dg/strlenopt-25.c
new file mode 100644
index 0000000000..4862156546
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/strlenopt-25.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-strlen" } */
+
+#include "strlenopt.h"
+
+int
+main ()
+{
+ char p[] = "foobar";
+ int len, len2;
+ len = strlen (p);
+ p[0] = 'O';
+ len2 = strlen (p);
+ return len - len2;
+}
+
+/* { dg-final { scan-tree-dump-times "strlen \\(" 0 "strlen" } } */
+/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-26.c b/gcc/testsuite/gcc.dg/strlenopt-26.c
new file mode 100644
index 0000000000..089355e498
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/strlenopt-26.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-strlen" } */
+
+#include "strlenopt.h"
+
+__attribute__((noinline, noclone)) size_t
+fn1 (char *p, const char *r)
+{
+ size_t len1 = strlen (r);
+ char *q = strchr (p, '\0');
+ *q = '\0';
+ return len1 - strlen (r); // This strlen should be optimized into len1.
+}
+
+int
+main (void)
+{
+ char p[] = "foobar";
+ const char *volatile q = "xyzzy";
+ fn1 (p, q);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "strlen \\(" 1 "strlen" } } */
+/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-2f.c b/gcc/testsuite/gcc.dg/strlenopt-2f.c
index 7996e67618..ba4797d51f 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-2f.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-2f.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides __*_chk functions. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define FORTIFY_SOURCE 2
diff --git a/gcc/testsuite/gcc.dg/strlenopt-4.c b/gcc/testsuite/gcc.dg/strlenopt-4.c
index 5997d31985..beea495924 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-4.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-4.c
@@ -66,16 +66,10 @@ main ()
return 0;
}
-/* For targets providing a movstr pattern strcat is already decomposed
- into strlen + strcpy by fold_builtin_strcat. */
-
-/* { dg-final { scan-tree-dump-times "strlen \\(" 3 "strlen" { target { ! s390*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times "strlen \\(" 6 "strlen" { target s390*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "strlen \\(" 3 "strlen" } } */
/* { dg-final { scan-tree-dump-times "memcpy \\(" 4 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "strcpy \\(" 3 "strlen" { target { ! s390*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times "strcpy \\(" 6 "strlen" { target s390*-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strcat \\(" 3 "strlen" { target { ! s390*-*-* } } } } */
-/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" { target s390*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "strcpy \\(" 3 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcat \\(" 3 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/strlenopt-4g.c b/gcc/testsuite/gcc.dg/strlenopt-4g.c
index 7b397366e9..c9a5f00ba9 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-4g.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-4g.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy function. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
diff --git a/gcc/testsuite/gcc.dg/strlenopt-4gf.c b/gcc/testsuite/gcc.dg/strlenopt-4gf.c
index cf99212a15..e1762366e4 100644
--- a/gcc/testsuite/gcc.dg/strlenopt-4gf.c
+++ b/gcc/testsuite/gcc.dg/strlenopt-4gf.c
@@ -1,5 +1,5 @@
/* This test needs runtime that provides stpcpy and __*_chk functions. */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fdump-tree-strlen" } */
#define USE_GNU
@@ -7,13 +7,13 @@
#include "strlenopt-4.c"
/* { dg-final { scan-tree-dump-times "strlen \\(" 1 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__memcpy_chk \\(" 4 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__strcpy_chk \\(" 1 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__memcpy_chk \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__strcpy_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "__strcat_chk \\(" 0 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strchr \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "__stpcpy_chk \\(" 5 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "memcpy \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "strcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "__stpcpy_chk \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "memcpy \\(" 4 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "strcpy \\(" 1 "strlen" } } */
/* { dg-final { scan-tree-dump-times "strcat \\(" 0 "strlen" } } */
-/* { dg-final { scan-tree-dump-times "stpcpy \\(" 0 "strlen" } } */
+/* { dg-final { scan-tree-dump-times "stpcpy \\(" 5 "strlen" } } */
/* { dg-final { cleanup-tree-dump "strlen" } } */
diff --git a/gcc/testsuite/gcc.dg/struct-ret-3.c b/gcc/testsuite/gcc.dg/struct-ret-3.c
index 0be43b6d6b..36cc87e7d0 100644
--- a/gcc/testsuite/gcc.dg/struct-ret-3.c
+++ b/gcc/testsuite/gcc.dg/struct-ret-3.c
@@ -1,7 +1,7 @@
/* PR middle-end/31309 */
/* Origin: Peeter Joot <peeterj@ca.ibm.com> */
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
#include <sys/mman.h>
#include <string.h>
diff --git a/gcc/testsuite/gcc.dg/superblock.c b/gcc/testsuite/gcc.dg/superblock.c
new file mode 100644
index 0000000000..272d161f05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/superblock.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-asynchronous-unwind-tables -fsched2-use-superblocks -fdump-rtl-sched2 -fdump-rtl-bbro" } */
+/* { dg-require-effective-target scheduling } */
+
+typedef int aligned __attribute__ ((aligned (64)));
+extern void abort (void);
+
+int bar (void *p);
+
+void
+foo (void)
+{
+ char *p = __builtin_alloca (13);
+ aligned i;
+
+ if (bar (p) || bar (&i))
+ abort ();
+}
+
+/* { dg-final { scan-rtl-dump-times "0 uses" 0 "bbro"} } */
+/* { dg-final { scan-rtl-dump-times "ADVANCING TO" 2 "sched2"} } */
+/* { dg-final { cleanup-rtl-dump "bbro" } } */
+/* { dg-final { cleanup-rtl-dump "sched2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/system-binary-constants-1.c b/gcc/testsuite/gcc.dg/system-binary-constants-1.c
new file mode 100644
index 0000000000..921ee20863
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/system-binary-constants-1.c
@@ -0,0 +1,18 @@
+/*
+ Origin: Dodji Seketeli <dodji@redhat.com>
+ { dg-options "-std=iso9899:1999 -pedantic" }
+ { dg-do compile }
+ */
+
+#include "system-binary-constants-1.h"
+
+int
+foo (void)
+{
+#if BINARY_INT_CONSTANT_IN_SYSTEM_HEADER /* A binary constant defined
+ in system header. No
+ warning. */
+ return 23;
+#endif
+ return 0b1101; /* { dg-warning "binary constants are a GCC extension" } */
+}
diff --git a/gcc/testsuite/gcc.dg/system-binary-constants-1.h b/gcc/testsuite/gcc.dg/system-binary-constants-1.h
new file mode 100644
index 0000000000..85f291742f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/system-binary-constants-1.h
@@ -0,0 +1,3 @@
+#pragma GCC system_header
+
+#define BINARY_INT_CONSTANT_IN_SYSTEM_HEADER 0b1101
diff --git a/gcc/testsuite/gcc.dg/tail-merge-store.c b/gcc/testsuite/gcc.dg/tail-merge-store.c
new file mode 100644
index 0000000000..1aefbdc149
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tail-merge-store.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-tail-merge -fdump-tree-pre" } */
+
+int z;
+int x;
+
+void
+f (int c, int d)
+{
+ if (c)
+ z = 5;
+ else
+ {
+ if (d)
+ x = 4;
+ z = 5;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "duplicate of" 1 "pre"} } */
+/* { dg-final { scan-tree-dump-times "z = 5" 1 "pre"} } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tls/diag-2.c b/gcc/testsuite/gcc.dg/tls/diag-2.c
index 8276cb3be4..854824385a 100644
--- a/gcc/testsuite/gcc.dg/tls/diag-2.c
+++ b/gcc/testsuite/gcc.dg/tls/diag-2.c
@@ -3,7 +3,7 @@
__thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */
__thread static int g2; /* { dg-error "'__thread' before 'static'" } */
-__thread __thread int g3; /* { dg-error "duplicate '__thread'" } */
+__thread __thread int g3; /* { dg-error "duplicate" } */
typedef __thread int g4; /* { dg-error "'__thread' used with 'typedef'" } */
void foo()
diff --git a/gcc/testsuite/gcc.dg/tls/pr42894.c b/gcc/testsuite/gcc.dg/tls/pr42894.c
index c3bd76c91c..2875b494c0 100644
--- a/gcc/testsuite/gcc.dg/tls/pr42894.c
+++ b/gcc/testsuite/gcc.dg/tls/pr42894.c
@@ -1,6 +1,5 @@
/* PR target/42894 */
/* { dg-do compile } */
-/* { dg-options "-march=armv5te -mthumb" { target arm*-*-* } } */
/* { dg-require-effective-target tls } */
extern __thread int t;
diff --git a/gcc/testsuite/gcc.dg/tls/pr58595.c b/gcc/testsuite/gcc.dg/tls/pr58595.c
new file mode 100644
index 0000000000..e7827d79d7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tls/pr58595.c
@@ -0,0 +1,29 @@
+/* PR target/58595 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+/* { dg-add-options tls } */
+/* { dg-require-effective-target tls_runtime } */
+/* { dg-require-effective-target sync_int_long } */
+
+struct S { unsigned long a, b; };
+__thread struct S s;
+void bar (unsigned long *);
+
+__attribute__((noinline)) void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 10; i++)
+ __sync_fetch_and_add (&s.b, 1L);
+}
+
+int
+main ()
+{
+ s.b = 12;
+ foo ();
+ if (s.b != 22)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tls/tls.exp b/gcc/testsuite/gcc.dg/tls/tls.exp
index 890e05e559..1ccdbab9ef 100644
--- a/gcc/testsuite/gcc.dg/tls/tls.exp
+++ b/gcc/testsuite/gcc.dg/tls/tls.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/tm/clone-1.c b/gcc/testsuite/gcc.dg/tm/clone-1.c
new file mode 100644
index 0000000000..4050adddc5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/clone-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -fdump-tree-tmmark" } */
+
+int foo;
+
+__attribute__((transaction_callable))
+void cloneme()
+{
+ foo = 666;
+}
+
+/* { dg-final { scan-tree-dump-times "ITM_WU.*foo" 1 "tmmark" } } */
+/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/debug-1.c b/gcc/testsuite/gcc.dg/tm/debug-1.c
index fae5d6bed4..01acfae4d0 100644
--- a/gcc/testsuite/gcc.dg/tm/debug-1.c
+++ b/gcc/testsuite/gcc.dg/tm/debug-1.c
@@ -20,7 +20,7 @@ main() {
}
/* { dg-final { scan-tree-dump-times ": 13:.*b = 9898" 1 "tmmark" } } */
-/* { dg-final { scan-tree-dump-times ": 14:.*__transaction" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times ": 14:.*_ITM_beginTransaction" 1 "tmmark" } } */
/* { dg-final { scan-tree-dump-times ": 15:.*ITM_WU. \\(&z" 1 "tmmark" } } */
/* { dg-final { scan-tree-dump-times ": 16:.*ITM_WU. \\(&a" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/instrumented-mask.c b/gcc/testsuite/gcc.dg/tm/instrumented-mask.c
new file mode 100644
index 0000000000..6cfd3e4792
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/instrumented-mask.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -fdump-tree-tmmark" } */
+
+/* If we're sure to go irrevocable, as in the case below, do not pass
+ PR_INSTRUMENTEDCODE to the run-time if there is nothing
+ instrumented within the transaction. */
+
+int
+main()
+{
+ __transaction_relaxed { __asm__(""); }
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times " instrumentedCode" 0 "tmmark" } } */
+/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-3.c b/gcc/testsuite/gcc.dg/tm/irrevocable-3.c
index c085479480..fdf3e52e2e 100644
--- a/gcc/testsuite/gcc.dg/tm/irrevocable-3.c
+++ b/gcc/testsuite/gcc.dg/tm/irrevocable-3.c
@@ -10,5 +10,5 @@ foo()
}
}
-/* { dg-final { scan-tree-dump-times "GTMA_MAY_ENTER_IRREVOCABLE" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "doesGoIrrevocable" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/irrevocable-4.c b/gcc/testsuite/gcc.dg/tm/irrevocable-4.c
index ee759b84ef..72075df36c 100644
--- a/gcc/testsuite/gcc.dg/tm/irrevocable-4.c
+++ b/gcc/testsuite/gcc.dg/tm/irrevocable-4.c
@@ -12,5 +12,5 @@ foo()
}
}
-/* { dg-final { scan-tree-dump-times "GTMA_MAY_ENTER_IRREVOCABLE" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "hasNoIrrevocable" 0 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-1.c b/gcc/testsuite/gcc.dg/tm/memopt-1.c
index b78a6d417d..c5ac5ced56 100644
--- a/gcc/testsuite/gcc.dg/tm/memopt-1.c
+++ b/gcc/testsuite/gcc.dg/tm/memopt-1.c
@@ -2,8 +2,8 @@
/* { dg-options "-fgnu-tm -O -fdump-tree-tmmemopt" } */
long g, xxx, yyy;
-extern george() __attribute__((transaction_callable));
-extern ringo(long int);
+extern george() __attribute__((transaction_safe));
+extern ringo(long int) __attribute__((transaction_safe));
int i;
f()
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-10.c b/gcc/testsuite/gcc.dg/tm/memopt-10.c
index 5caa6b53d6..0978bce912 100644
--- a/gcc/testsuite/gcc.dg/tm/memopt-10.c
+++ b/gcc/testsuite/gcc.dg/tm/memopt-10.c
@@ -24,5 +24,5 @@ int f()
/* { dg-final { scan-tree-dump-times "ITM_LU" 0 "tmmark" } } */
/* { dg-final { scan-tree-dump-times "ITM_WU" 0 "tmmark" } } */
-/* { dg-final { scan-tree-dump-times "tm_save" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "int tm_save" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-11.c b/gcc/testsuite/gcc.dg/tm/memopt-11.c
index 07972a4fd4..36aa66412b 100644
--- a/gcc/testsuite/gcc.dg/tm/memopt-11.c
+++ b/gcc/testsuite/gcc.dg/tm/memopt-11.c
@@ -25,5 +25,5 @@ int f()
/* { dg-final { scan-tree-dump-times "ITM_LU" 0 "tmmark" } } */
/* { dg-final { scan-tree-dump-times "ITM_WU" 0 "tmmark" } } */
-/* { dg-final { scan-tree-dump-times "tm_save" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "int tm_save" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-16.c b/gcc/testsuite/gcc.dg/tm/memopt-16.c
new file mode 100644
index 0000000000..c230240de5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/memopt-16.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O3 -fdump-tree-tmmark" } */
+/* Like memopt-12.c but the phi is inside a look which causes
+ it to be converted into a COND_EXPR. */
+
+extern int test(void) __attribute__((transaction_safe));
+extern void *malloc (__SIZE_TYPE__) __attribute__((malloc,transaction_safe));
+
+struct large { int foo[500]; };
+
+int f(int j)
+{
+ int *p1, *p2, *p3;
+
+ p1 = malloc (sizeof (*p1)*5000);
+ __transaction_atomic {
+ _Bool t;
+ int i = 1;
+ *p1 = 0;
+
+ p2 = malloc (sizeof (*p2)*6000);
+ *p2 = 1;
+ t = test();
+
+ for (i = 0;i < j;i++)
+ {
+
+ /* p3 = PHI (p1, p2) */
+ if (t)
+ p3 = p1;
+ else
+ p3 = p2;
+
+ /* Since both p1 and p2 are thread-private, we can inherit the
+ logging already done. No ITM_W* instrumentation necessary. */
+ *p3 = 555;
+ }
+ }
+ return p3[something()];
+}
+
+/* { dg-final { scan-tree-dump-times "ITM_WU" 0 "tmmark" } } */
+/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/memopt-3.c b/gcc/testsuite/gcc.dg/tm/memopt-3.c
index 77337161c2..1220ffc4a0 100644
--- a/gcc/testsuite/gcc.dg/tm/memopt-3.c
+++ b/gcc/testsuite/gcc.dg/tm/memopt-3.c
@@ -16,5 +16,5 @@ int f()
return lala.x[0];
}
-/* { dg-final { scan-tree-dump-times "logging: lala.x\\\[i_1\\\]" 1 "tmmark" } } */
+/* { dg-final { scan-tree-dump-times "logging: lala.x\\\[i_4\\\]" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/pr52173-1.c b/gcc/testsuite/gcc.dg/tm/pr52173-1.c
new file mode 100644
index 0000000000..9ffa4d618a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr52173-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O3" } */
+
+int vec[500];
+
+void func()
+{
+ __transaction_relaxed
+ {
+ vec[123] = 456;
+ }
+}
+
+main()
+{
+ int i;
+ for(i = 0; i < 10; ++i)
+ func();
+}
diff --git a/gcc/testsuite/gcc.dg/tm/pr52173-2.c b/gcc/testsuite/gcc.dg/tm/pr52173-2.c
new file mode 100644
index 0000000000..ca64893fc0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr52173-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O2" } */
+
+int a;
+
+int main()
+{
+ int i;
+ for (i = 0; i < 1; ++i)
+ __transaction_atomic { ++a; }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tm/pr53850.c b/gcc/testsuite/gcc.dg/tm/pr53850.c
new file mode 100644
index 0000000000..ca2c6043bb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr53850.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O3" } */
+
+unsigned char pp[100];
+
+void
+foo (void)
+{
+ int i;
+ __transaction_atomic
+ {
+ for (i = 0; i < 100; ++i)
+ pp[i] = 0x33;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tm/pr55401.c b/gcc/testsuite/gcc.dg/tm/pr55401.c
new file mode 100644
index 0000000000..1ac7d97571
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr55401.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O0 -fdump-tree-optimized" } */
+
+int george;
+int ringo;
+
+__attribute__((transaction_callable))
+void foo()
+{
+ ringo=666;
+ __transaction_atomic {
+ george=999;
+ }
+}
+
+/* There should only be 2 instrumented writes to GEORGE: one in FOO,
+ and one in the transactional clone to FOO. There should NOT be
+ more than one instrumented write to GEORGE in the clone of
+ FOO. */
+/* { dg-final { scan-tree-dump-times "ITM_WU\[0-9\] \\(&george," 2 "optimized" } } */
+
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/pr56108.c b/gcc/testsuite/gcc.dg/tm/pr56108.c
new file mode 100644
index 0000000000..81ff574cd4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tm/pr56108.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-fgnu-tm -O" } */
+
+int
+main()
+{
+ __transaction_relaxed { __asm__(""); }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tm/props-4.c b/gcc/testsuite/gcc.dg/tm/props-4.c
index c9d0c2b288..c34f5e619e 100644
--- a/gcc/testsuite/gcc.dg/tm/props-4.c
+++ b/gcc/testsuite/gcc.dg/tm/props-4.c
@@ -22,6 +22,5 @@ foo(void)
/* { dg-final { scan-tree-dump-times " instrumentedCode" 1 "tmedge" } } */
/* { dg-final { scan-tree-dump-times "hasNoAbort" 0 "tmedge" } } */
-/* { dg-final { scan-tree-dump-times "LABEL=<L0>" 1 "tmmark" } } */
/* { dg-final { cleanup-tree-dump "tmedge" } } */
/* { dg-final { cleanup-tree-dump "tmmark" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/reg-promotion.c b/gcc/testsuite/gcc.dg/tm/reg-promotion.c
index 337c29f6c6..e48bfb2795 100644
--- a/gcc/testsuite/gcc.dg/tm/reg-promotion.c
+++ b/gcc/testsuite/gcc.dg/tm/reg-promotion.c
@@ -20,5 +20,5 @@ void func()
}
}
-/* { dg-final { scan-tree-dump-times "MEM count_lsm.. count_lsm_flag" 1 "lim1" } } */
+/* { dg-final { scan-tree-dump-times "Cannot hoist conditional load of count because it is in a transaction" 1 "lim1" } } */
/* { dg-final { cleanup-tree-dump "lim1" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/tm.exp b/gcc/testsuite/gcc.dg/tm/tm.exp
index 07c1493652..ce1ec0c3f5 100644
--- a/gcc/testsuite/gcc.dg/tm/tm.exp
+++ b/gcc/testsuite/gcc.dg/tm/tm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/tm/wrap-3.c b/gcc/testsuite/gcc.dg/tm/wrap-3.c
index 0734436809..673247103d 100644
--- a/gcc/testsuite/gcc.dg/tm/wrap-3.c
+++ b/gcc/testsuite/gcc.dg/tm/wrap-3.c
@@ -10,5 +10,8 @@ void foo()
__transaction_relaxed { free (p); }
}
-/* { dg-final { scan-tree-dump-times "free" 0 "optimized" } } */
+/* We still have one call to free()-- on the uninstrumented path
+ everything is as usual. */
+/* { dg-final { scan-tree-dump-times "free" 1 "optimized" } } */
+
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tm/wrap-4.c b/gcc/testsuite/gcc.dg/tm/wrap-4.c
index 9e1e70c544..9a4ec061f8 100644
--- a/gcc/testsuite/gcc.dg/tm/wrap-4.c
+++ b/gcc/testsuite/gcc.dg/tm/wrap-4.c
@@ -11,5 +11,8 @@ void foo()
__transaction_relaxed { candy(); }
}
-/* { dg-final { scan-tree-dump-times "candy" 0 "optimized" } } */
+/* We still have one call to candy()-- on the uninstrumented path
+ everything is as usual. */
+/* { dg-final { scan-tree-dump-times "candy \\(\\);" 1 "optimized" } } */
+
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/20090618-1.c b/gcc/testsuite/gcc.dg/torture/20090618-1.c
index 60eb900785..8b601d62c7 100644
--- a/gcc/testsuite/gcc.dg/torture/20090618-1.c
+++ b/gcc/testsuite/gcc.dg/torture/20090618-1.c
@@ -1,6 +1,5 @@
/* { dg-do run } */
/* { dg-skip-if "" { *-*-* } { "-O0" } { "" } } */
-/* { dg-skip-if "PR middle-end/47405" { mips-sgi-irix* } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/torture/20131115-1.c b/gcc/testsuite/gcc.dg/torture/20131115-1.c
new file mode 100644
index 0000000000..edb05f04c4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/20131115-1.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+
+struct S { int i; };
+__attribute__((const, noinline, noclone))
+struct S foo (int x)
+{
+ struct S s;
+ s.i = x;
+ return s;
+}
+
+int a[2048], b[2048], c[2048], d[2048];
+struct S e[2048];
+
+__attribute__((noinline, noclone)) void
+bar (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ e[i] = foo (i);
+ a[i+2] = a[i] + a[i+1];
+ b[10] = b[10] + i;
+ c[i] = c[2047 - i];
+ d[i] = d[i + 1];
+ }
+}
+
+int
+main ()
+{
+ int i;
+ bar ();
+ for (i = 0; i < 1024; i++)
+ if (e[i].i != i)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/20131122-0.c b/gcc/testsuite/gcc.dg/torture/20131122-0.c
new file mode 100644
index 0000000000..42d92faed9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/20131122-0.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+
+extern int memcmp (const void *, const void *, __SIZE_TYPE__);
+extern void abort (void);
+
+void __attribute__ ((noinline))
+f (long *s, long *t, int len1, int len2)
+{
+ int i, j;
+
+ j = 2;
+ for (i = len1 - 1; i >= 0; i--)
+ {
+ s[j--] = (i < len2 ? t[i] : t[len2 - 1] < 0 ? -1 : 0);
+ if (j < 0)
+ break;
+ }
+}
+
+long s[3];
+long t[3];
+
+int
+main (void)
+{
+ t[0] = 1;
+ t[1] = 2;
+ t[2] = 3;
+ f (s, t, 3, 3);
+ if (memcmp (s, t, sizeof (s)) != 0)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c b/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c
new file mode 100644
index 0000000000..8d01bc616a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/Wsizeof-pointer-memaccess1.c
@@ -0,0 +1,712 @@
+/* Test -Wsizeof-pointer-memaccess warnings. */
+/* { dg-do compile } */
+/* { dg-options "-Wall" } */
+/* Test just twice, once with -O0 non-fortified, once with -O2 fortified. */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O0" "-O2" } } */
+/* { dg-skip-if "" { *-*-* } { "-flto" } { "" } } */
+
+typedef __SIZE_TYPE__ size_t;
+extern void *memset (void *, int, size_t);
+extern void *memcpy (void *__restrict, const void *__restrict, size_t);
+extern void *memmove (void *__restrict, const void *__restrict, size_t);
+extern int memcmp (const void *, const void *, size_t);
+extern char *strncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strncat (char *__restrict, const char *__restrict, size_t);
+extern char *stpncpy (char *__restrict, const char *__restrict, size_t);
+extern char *strndup (const char *, size_t);
+extern int strncmp (const char *, const char *, size_t);
+extern int strncasecmp (const char *, const char *, size_t);
+
+#ifdef __OPTIMIZE__
+# define bos(ptr) __builtin_object_size (ptr, 1)
+# define bos0(ptr) __builtin_object_size (ptr, 0)
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memset (void *dest, int c, size_t len)
+{
+ return __builtin___memset_chk (dest, c, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memcpy (void *__restrict dest, const void *__restrict src, size_t len)
+{
+ return __builtin___memcpy_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline void *
+memmove (void *dest, const void *src, size_t len)
+{
+ return __builtin___memmove_chk (dest, src, len, bos0 (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___strncpy_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+strncat (char *dest, const char *src, size_t len)
+{
+ return __builtin___strncat_chk (dest, src, len, bos (dest));
+}
+
+__attribute__((__always_inline__, __gnu_inline__, __artificial__))
+extern inline char *
+stpncpy (char *__restrict dest, const char *__restrict src, size_t len)
+{
+ return __builtin___stpncpy_chk (dest, src, len, bos (dest));
+}
+#endif
+
+struct A { short a, b; int c, d; long e, f; };
+typedef struct A TA;
+typedef struct A *PA;
+typedef TA *PTA;
+struct B {};
+typedef struct B TB;
+typedef struct B *PB;
+typedef TB *PTB;
+typedef int X[3][3][3];
+
+int
+f1 (void *x, int z)
+{
+ struct A a, *pa1 = &a;
+ TA *pa2 = &a;
+ PA pa3 = &a;
+ PTA pa4 = &a;
+ memset (&a, 0, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (pa1, 0, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa2, 0, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa3, 0, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa4, 0, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pa1, 0, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa2, 0, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa3, 0, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pa4, 0, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pa4, x, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pa4, sizeof (__typeof (pa4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pa1, x, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pa4, x, sizeof (__typeof (pa4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pa1, sizeof (struct A *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pa4, sizeof (__typeof (pa4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += memcmp (&a, x, sizeof (&a)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += memcmp (pa1, x, sizeof (pa1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pa2, x, sizeof pa2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pa3, x, sizeof (pa3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pa4, x, sizeof pa4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pa1, x, sizeof (struct A *));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (pa2, x, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (pa3, x, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += memcmp (x, &a, sizeof (&a)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += memcmp (x, pa1, sizeof (pa1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pa2, sizeof pa2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pa3, sizeof (pa3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pa4, sizeof pa4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pa1, sizeof (struct A *));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (x, pa2, sizeof (PTA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (x, pa3, sizeof (PA)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ memset (&a, 0, sizeof a);
+ memset (&a, 0, sizeof (a));
+ memset (&a, 0, sizeof (struct A));
+ memset (&a, 0, sizeof (const struct A));
+ memset (&a, 0, sizeof (volatile struct A));
+ memset (&a, 0, sizeof (volatile const struct A));
+ memset (&a, 0, sizeof (TA));
+ memset (&a, 0, sizeof (__typeof (*&a)));
+ memset (pa1, 0, sizeof (*pa1));
+ memset (pa2, 0, sizeof (*pa3));
+ memset (pa3, 0, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) &a, 0, sizeof (&a));
+ memset ((char *) &a, 0, sizeof (&a));
+ memset (&a, 0, sizeof (&a) + 0);
+ memset (&a, 0, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memcpy (&a, x, sizeof a);
+ memcpy (&a, x, sizeof (a));
+ memcpy (&a, x, sizeof (struct A));
+ memcpy (&a, x, sizeof (const struct A));
+ memcpy (&a, x, sizeof (volatile struct A));
+ memcpy (&a, x, sizeof (volatile const struct A));
+ memcpy (&a, x, sizeof (TA));
+ memcpy (&a, x, sizeof (__typeof (*&a)));
+ memcpy (pa1, x, sizeof (*pa1));
+ memcpy (pa2, x, sizeof (*pa3));
+ memcpy (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) &a, x, sizeof (&a));
+ memcpy ((char *) &a, x, sizeof (&a));
+ memcpy (&a, x, sizeof (&a) + 0);
+ memcpy (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memcpy (x, &a, sizeof a);
+ memcpy (x, &a, sizeof (a));
+ memcpy (x, &a, sizeof (struct A));
+ memcpy (x, &a, sizeof (const struct A));
+ memcpy (x, &a, sizeof (volatile struct A));
+ memcpy (x, &a, sizeof (volatile const struct A));
+ memcpy (x, &a, sizeof (TA));
+ memcpy (x, &a, sizeof (__typeof (*&a)));
+ memcpy (x, pa1, sizeof (*pa1));
+ memcpy (x, pa2, sizeof (*pa3));
+ memcpy (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) &a, sizeof (&a));
+ memcpy (x, (char *) &a, sizeof (&a));
+ memcpy (x, &a, sizeof (&a) + 0);
+ memcpy (x, &a, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memmove (&a, x, sizeof a);
+ memmove (&a, x, sizeof (a));
+ memmove (&a, x, sizeof (struct A));
+ memmove (&a, x, sizeof (const struct A));
+ memmove (&a, x, sizeof (volatile struct A));
+ memmove (&a, x, sizeof (volatile const struct A));
+ memmove (&a, x, sizeof (TA));
+ memmove (&a, x, sizeof (__typeof (*&a)));
+ memmove (pa1, x, sizeof (*pa1));
+ memmove (pa2, x, sizeof (*pa3));
+ memmove (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) &a, x, sizeof (&a));
+ memmove ((char *) &a, x, sizeof (&a));
+ memmove (&a, x, sizeof (&a) + 0);
+ memmove (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ memmove (x, &a, sizeof a);
+ memmove (x, &a, sizeof (a));
+ memmove (x, &a, sizeof (struct A));
+ memmove (x, &a, sizeof (const struct A));
+ memmove (x, &a, sizeof (volatile struct A));
+ memmove (x, &a, sizeof (volatile const struct A));
+ memmove (x, &a, sizeof (TA));
+ memmove (x, &a, sizeof (__typeof (*&a)));
+ memmove (x, pa1, sizeof (*pa1));
+ memmove (x, pa2, sizeof (*pa3));
+ memmove (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) &a, sizeof (&a));
+ memmove (x, (char *) &a, sizeof (&a));
+ memmove (x, &a, sizeof (&a) + 0);
+ memmove (x, &a, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ z += memcmp (&a, x, sizeof a);
+ z += memcmp (&a, x, sizeof (a));
+ z += memcmp (&a, x, sizeof (struct A));
+ z += memcmp (&a, x, sizeof (const struct A));
+ z += memcmp (&a, x, sizeof (volatile struct A));
+ z += memcmp (&a, x, sizeof (volatile const struct A));
+ z += memcmp (&a, x, sizeof (TA));
+ z += memcmp (&a, x, sizeof (__typeof (*&a)));
+ z += memcmp (pa1, x, sizeof (*pa1));
+ z += memcmp (pa2, x, sizeof (*pa3));
+ z += memcmp (pa3, x, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp ((void *) &a, x, sizeof (&a));
+ z += memcmp ((char *) &a, x, sizeof (&a));
+ z += memcmp (&a, x, sizeof (&a) + 0);
+ z += memcmp (&a, x, 0 + sizeof (&a));
+
+ /* These are correct, no warning. */
+ z += memcmp (x, &a, sizeof a);
+ z += memcmp (x, &a, sizeof (a));
+ z += memcmp (x, &a, sizeof (struct A));
+ z += memcmp (x, &a, sizeof (const struct A));
+ z += memcmp (x, &a, sizeof (volatile struct A));
+ z += memcmp (x, &a, sizeof (volatile const struct A));
+ z += memcmp (x, &a, sizeof (TA));
+ z += memcmp (x, &a, sizeof (__typeof (*&a)));
+ z += memcmp (x, pa1, sizeof (*pa1));
+ z += memcmp (x, pa2, sizeof (*pa3));
+ z += memcmp (x, pa3, sizeof (__typeof (*pa3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp (x, (void *) &a, sizeof (&a));
+ z += memcmp (x, (char *) &a, sizeof (&a));
+ z += memcmp (x, &a, sizeof (&a) + 0);
+ z += memcmp (x, &a, 0 + sizeof (&a));
+
+ return z;
+}
+
+int
+f2 (void *x, int z)
+{
+ struct B b, *pb1 = &b;
+ TB *pb2 = &b;
+ PB pb3 = &b;
+ PTB pb4 = &b;
+ memset (&b, 0, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (pb1, 0, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb2, 0, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb3, 0, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb4, 0, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memset (pb1, 0, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb2, 0, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb3, 0, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memset (pb4, 0, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memcpy (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (pb4, x, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memcpy (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memcpy (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memcpy (x, pb4, sizeof (__typeof (pb4))); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+ memmove (pb1, x, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+ memmove (pb4, x, sizeof (__typeof (pb4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the destination; expected \[^\n\r\]* or an explicit length" } */
+
+ memmove (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+ memmove (x, pb1, sizeof (struct B *)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+ memmove (x, pb4, sizeof (__typeof (pb4)));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += memcmp (&b, x, sizeof (&b)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += memcmp (pb1, x, sizeof (pb1)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pb2, x, sizeof pb2); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pb3, x, sizeof (pb3)); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pb4, x, sizeof pb4); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+ z += memcmp (pb1, x, sizeof (struct B *));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (pb2, x, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (pb3, x, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the first source; expected \[^\n\r\]* or an explicit length" } */
+
+ z += memcmp (x, &b, sizeof (&b)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += memcmp (x, pb1, sizeof (pb1)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pb2, sizeof pb2); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pb3, sizeof (pb3)); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pb4, sizeof pb4); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+ z += memcmp (x, pb1, sizeof (struct B *));/* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (x, pb2, sizeof (PTB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+ z += memcmp (x, pb3, sizeof (PB)); /* { dg-warning "call is the same pointer type \[^\n\r\]* as the second source; expected \[^\n\r\]* or an explicit length" } */
+
+ /* These are correct, no warning. */
+ memset (&b, 0, sizeof b);
+ memset (&b, 0, sizeof (b));
+ memset (&b, 0, sizeof (struct B));
+ memset (&b, 0, sizeof (const struct B));
+ memset (&b, 0, sizeof (volatile struct B));
+ memset (&b, 0, sizeof (volatile const struct B));
+ memset (&b, 0, sizeof (TB));
+ memset (&b, 0, sizeof (__typeof (*&b)));
+ memset (pb1, 0, sizeof (*pb1));
+ memset (pb2, 0, sizeof (*pb3));
+ memset (pb3, 0, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) &b, 0, sizeof (&b));
+ memset ((char *) &b, 0, sizeof (&b));
+ memset (&b, 0, sizeof (&b) + 0);
+ memset (&b, 0, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memcpy (&b, x, sizeof b);
+ memcpy (&b, x, sizeof (b));
+ memcpy (&b, x, sizeof (struct B));
+ memcpy (&b, x, sizeof (const struct B));
+ memcpy (&b, x, sizeof (volatile struct B));
+ memcpy (&b, x, sizeof (volatile const struct B));
+ memcpy (&b, x, sizeof (TB));
+ memcpy (&b, x, sizeof (__typeof (*&b)));
+ memcpy (pb1, x, sizeof (*pb1));
+ memcpy (pb2, x, sizeof (*pb3));
+ memcpy (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) &b, x, sizeof (&b));
+ memcpy ((char *) &b, x, sizeof (&b));
+ memcpy (&b, x, sizeof (&b) + 0);
+ memcpy (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memcpy (x, &b, sizeof b);
+ memcpy (x, &b, sizeof (b));
+ memcpy (x, &b, sizeof (struct B));
+ memcpy (x, &b, sizeof (const struct B));
+ memcpy (x, &b, sizeof (volatile struct B));
+ memcpy (x, &b, sizeof (volatile const struct B));
+ memcpy (x, &b, sizeof (TB));
+ memcpy (x, &b, sizeof (__typeof (*&b)));
+ memcpy (x, pb1, sizeof (*pb1));
+ memcpy (x, pb2, sizeof (*pb3));
+ memcpy (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) &b, sizeof (&b));
+ memcpy (x, (char *) &b, sizeof (&b));
+ memcpy (x, &b, sizeof (&b) + 0);
+ memcpy (x, &b, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memmove (&b, x, sizeof b);
+ memmove (&b, x, sizeof (b));
+ memmove (&b, x, sizeof (struct B));
+ memmove (&b, x, sizeof (const struct B));
+ memmove (&b, x, sizeof (volatile struct B));
+ memmove (&b, x, sizeof (volatile const struct B));
+ memmove (&b, x, sizeof (TB));
+ memmove (&b, x, sizeof (__typeof (*&b)));
+ memmove (pb1, x, sizeof (*pb1));
+ memmove (pb2, x, sizeof (*pb3));
+ memmove (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) &b, x, sizeof (&b));
+ memmove ((char *) &b, x, sizeof (&b));
+ memmove (&b, x, sizeof (&b) + 0);
+ memmove (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ memmove (x, &b, sizeof b);
+ memmove (x, &b, sizeof (b));
+ memmove (x, &b, sizeof (struct B));
+ memmove (x, &b, sizeof (const struct B));
+ memmove (x, &b, sizeof (volatile struct B));
+ memmove (x, &b, sizeof (volatile const struct B));
+ memmove (x, &b, sizeof (TB));
+ memmove (x, &b, sizeof (__typeof (*&b)));
+ memmove (x, pb1, sizeof (*pb1));
+ memmove (x, pb2, sizeof (*pb3));
+ memmove (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) &b, sizeof (&b));
+ memmove (x, (char *) &b, sizeof (&b));
+ memmove (x, &b, sizeof (&b) + 0);
+ memmove (x, &b, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ z += memcmp (&b, x, sizeof b);
+ z += memcmp (&b, x, sizeof (b));
+ z += memcmp (&b, x, sizeof (struct B));
+ z += memcmp (&b, x, sizeof (const struct B));
+ z += memcmp (&b, x, sizeof (volatile struct B));
+ z += memcmp (&b, x, sizeof (volatile const struct B));
+ z += memcmp (&b, x, sizeof (TB));
+ z += memcmp (&b, x, sizeof (__typeof (*&b)));
+ z += memcmp (pb1, x, sizeof (*pb1));
+ z += memcmp (pb2, x, sizeof (*pb3));
+ z += memcmp (pb3, x, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp ((void *) &b, x, sizeof (&b));
+ z += memcmp ((char *) &b, x, sizeof (&b));
+ z += memcmp (&b, x, sizeof (&b) + 0);
+ z += memcmp (&b, x, 0 + sizeof (&b));
+
+ /* These are correct, no warning. */
+ z += memcmp (x, &b, sizeof b);
+ z += memcmp (x, &b, sizeof (b));
+ z += memcmp (x, &b, sizeof (struct B));
+ z += memcmp (x, &b, sizeof (const struct B));
+ z += memcmp (x, &b, sizeof (volatile struct B));
+ z += memcmp (x, &b, sizeof (volatile const struct B));
+ z += memcmp (x, &b, sizeof (TB));
+ z += memcmp (x, &b, sizeof (__typeof (*&b)));
+ z += memcmp (x, pb1, sizeof (*pb1));
+ z += memcmp (x, pb2, sizeof (*pb3));
+ z += memcmp (x, pb3, sizeof (__typeof (*pb3)));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp (x, (void *) &b, sizeof (&b));
+ z += memcmp (x, (char *) &b, sizeof (&b));
+ z += memcmp (x, &b, sizeof (&b) + 0);
+ z += memcmp (x, &b, 0 + sizeof (&b));
+
+ return z;
+}
+
+int
+f3 (void *x, char *y, int z, X w)
+{
+ unsigned char *y1 = (unsigned char *) __builtin_alloca (z + 16);
+ char buf1[7];
+ signed char buf2[z + 32];
+ long buf3[17];
+ int *buf4[9];
+ signed char *y2 = buf2;
+ char c;
+ char *y3;
+ memset (y, 0, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (y1, 0, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (y2, 0, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memset (&c, 0, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memset (w, 0, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memcpy (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memcpy (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memcpy (w, x, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memcpy (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memcpy (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memcpy (x, w, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ memmove (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ memmove (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the destination; did you mean to remove the addressof" } */
+ memmove (w, x, sizeof w); /* { dg-warning "call is the same expression as the destination; did you mean to dereference it" } */
+
+ memmove (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ memmove (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the source; did you mean to remove the addressof" } */
+ memmove (x, w, sizeof w); /* { dg-warning "call is the same expression as the source; did you mean to dereference it" } */
+
+ z += memcmp (y, x, sizeof (y)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += memcmp (y1, x, sizeof (y1)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += memcmp (y2, x, sizeof (y2)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += memcmp (&c, x, sizeof (&c)); /* { dg-warning "call is the same expression as the first source; did you mean to remove the addressof" } */
+ z += memcmp (w, x, sizeof w); /* { dg-warning "call is the same expression as the first source; did you mean to dereference it" } */
+
+ z += memcmp (x, y, sizeof (y)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += memcmp (x, y1, sizeof (y1)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += memcmp (x, y2, sizeof (y2)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += memcmp (x, &c, sizeof (&c)); /* { dg-warning "call is the same expression as the second source; did you mean to remove the addressof" } */
+ z += memcmp (x, w, sizeof w); /* { dg-warning "call is the same expression as the second source; did you mean to dereference it" } */
+
+ /* These are correct, no warning. */
+ memset (y, 0, sizeof (*y));
+ memset (y1, 0, sizeof (*y2));
+ memset (buf1, 0, sizeof buf1);
+ memset (buf3, 0, sizeof (buf3));
+ memset (&buf3[0], 0, sizeof (buf3));
+ memset (&buf4[0], 0, sizeof (buf4));
+ memset (w, 0, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memset ((void *) y, 0, sizeof (y));
+ memset ((char *) y1, 0, sizeof (y2));
+ memset (y, 0, sizeof (y) + 0);
+ memset (y1, 0, 0 + sizeof (y2));
+ memset ((void *) &c, 0, sizeof (&c));
+ memset ((signed char *) &c, 0, sizeof (&c));
+ memset (&c, 0, sizeof (&c) + 0);
+ memset (&c, 0, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memcpy (y, x, sizeof (*y));
+ memcpy (y1, x, sizeof (*y2));
+ memcpy (buf1, x, sizeof buf1);
+ memcpy (buf3, x, sizeof (buf3));
+ memcpy (&buf3[0], x, sizeof (buf3));
+ memcpy (&buf4[0], x, sizeof (buf4));
+ memcpy (&y3, y, sizeof (y3));
+ memcpy ((char *) &y3, y, sizeof (y3));
+ memcpy (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy ((void *) y, x, sizeof (y));
+ memcpy ((char *) y1, x, sizeof (y2));
+ memcpy (y, x, sizeof (y) + 0);
+ memcpy (y1, x, 0 + sizeof (y2));
+ memcpy ((void *) &c, x, sizeof (&c));
+ memcpy ((signed char *) &c, x, sizeof (&c));
+ memcpy (&c, x, sizeof (&c) + 0);
+ memcpy (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memcpy (x, y, sizeof (*y));
+ memcpy (x, y1, sizeof (*y2));
+ memcpy (x, buf1, sizeof buf1);
+ memcpy (x, buf3, sizeof (buf3));
+ memcpy (x, &buf3[0], sizeof (buf3));
+ memcpy (x, &buf4[0], sizeof (buf4));
+ memcpy (y, &y3, sizeof (y3));
+ memcpy (y, (char *) &y3, sizeof (y3));
+ memcpy (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memcpy (x, (void *) y, sizeof (y));
+ memcpy (x, (char *) y1, sizeof (y2));
+ memcpy (x, y, sizeof (y) + 0);
+ memcpy (x, y1, 0 + sizeof (y2));
+ memcpy (x, (void *) &c, sizeof (&c));
+ memcpy (x, (signed char *) &c, sizeof (&c));
+ memcpy (x, &c, sizeof (&c) + 0);
+ memcpy (x, &c, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memmove (y, x, sizeof (*y));
+ memmove (y1, x, sizeof (*y2));
+ memmove (buf1, x, sizeof buf1);
+ memmove (buf3, x, sizeof (buf3));
+ memmove (&buf3[0], x, sizeof (buf3));
+ memmove (&buf4[0], x, sizeof (buf4));
+ memmove (&y3, y, sizeof (y3));
+ memmove ((char *) &y3, y, sizeof (y3));
+ memmove (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove ((void *) y, x, sizeof (y));
+ memmove ((char *) y1, x, sizeof (y2));
+ memmove (y, x, sizeof (y) + 0);
+ memmove (y1, x, 0 + sizeof (y2));
+ memmove ((void *) &c, x, sizeof (&c));
+ memmove ((signed char *) &c, x, sizeof (&c));
+ memmove (&c, x, sizeof (&c) + 0);
+ memmove (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ memmove (x, y, sizeof (*y));
+ memmove (x, y1, sizeof (*y2));
+ memmove (x, buf1, sizeof buf1);
+ memmove (x, buf3, sizeof (buf3));
+ memmove (x, &buf3[0], sizeof (buf3));
+ memmove (x, &buf4[0], sizeof (buf4));
+ memmove (y, &y3, sizeof (y3));
+ memmove (y, (char *) &y3, sizeof (y3));
+ memmove (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ memmove (x, (void *) y, sizeof (y));
+ memmove (x, (char *) y1, sizeof (y2));
+ memmove (x, y, sizeof (y) + 0);
+ memmove (x, y1, 0 + sizeof (y2));
+ memmove (x, (void *) &c, sizeof (&c));
+ memmove (x, (signed char *) &c, sizeof (&c));
+ memmove (x, &c, sizeof (&c) + 0);
+ memmove (x, &c, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ z += memcmp (y, x, sizeof (*y));
+ z += memcmp (y1, x, sizeof (*y2));
+ z += memcmp (buf1, x, sizeof buf1);
+ z += memcmp (buf3, x, sizeof (buf3));
+ z += memcmp (&buf3[0], x, sizeof (buf3));
+ z += memcmp (&buf4[0], x, sizeof (buf4));
+ z += memcmp (&y3, y, sizeof (y3));
+ z += memcmp ((char *) &y3, y, sizeof (y3));
+ z += memcmp (w, x, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp ((void *) y, x, sizeof (y));
+ z += memcmp ((char *) y1, x, sizeof (y2));
+ z += memcmp (y, x, sizeof (y) + 0);
+ z += memcmp (y1, x, 0 + sizeof (y2));
+ z += memcmp ((void *) &c, x, sizeof (&c));
+ z += memcmp ((signed char *) &c, x, sizeof (&c));
+ z += memcmp (&c, x, sizeof (&c) + 0);
+ z += memcmp (&c, x, 0 + sizeof (&c));
+
+ /* These are correct, no warning. */
+ z += memcmp (x, y, sizeof (*y));
+ z += memcmp (x, y1, sizeof (*y2));
+ z += memcmp (x, buf1, sizeof buf1);
+ z += memcmp (x, buf3, sizeof (buf3));
+ z += memcmp (x, &buf3[0], sizeof (buf3));
+ z += memcmp (x, &buf4[0], sizeof (buf4));
+ z += memcmp (y, &y3, sizeof (y3));
+ z += memcmp (y, (char *) &y3, sizeof (y3));
+ z += memcmp (x, w, sizeof (X));
+ /* These are probably broken, but obfuscated, no warning. */
+ z += memcmp (x, (void *) y, sizeof (y));
+ z += memcmp (x, (char *) y1, sizeof (y2));
+ z += memcmp (x, y, sizeof (y) + 0);
+ z += memcmp (x, y1, 0 + sizeof (y2));
+ z += memcmp (x, (void *) &c, sizeof (&c));
+ z += memcmp (x, (signed char *) &c, sizeof (&c));
+ z += memcmp (x, &c, sizeof (&c) + 0);
+ z += memcmp (x, &c, 0 + sizeof (&c));
+
+ return z;
+}
+
+int
+f4 (char *x, char **y, int z, char w[64])
+{
+ const char *s1 = "foobarbaz";
+ const char *s2 = "abcde12345678";
+ strncpy (x, s1, sizeof (s1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ strncat (x, s2, sizeof (s2)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ stpncpy (x, s1, sizeof (s1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ y[0] = strndup (s1, sizeof (s1)); /* { dg-warning "call is the same expression as the source; did you mean to provide an explicit length" } */
+ z += strncmp (s1, s2, sizeof (s1)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += strncmp (s1, s2, sizeof (s2)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+ z += strncasecmp (s1, s2, sizeof (s1)); /* { dg-warning "call is the same expression as the first source; did you mean to provide an explicit length" } */
+ z += strncasecmp (s1, s2, sizeof (s2)); /* { dg-warning "call is the same expression as the second source; did you mean to provide an explicit length" } */
+
+ strncpy (w, s1, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ strncat (w, s2, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+ stpncpy (w, s1, sizeof (w)); /* { dg-warning "call is the same expression as the destination; did you mean to provide an explicit length" } */
+
+ /* These are correct, no warning. */
+ const char s3[] = "foobarbaz";
+ const char s4[] = "abcde12345678";
+ strncpy (x, s3, sizeof (s3));
+ strncat (x, s4, sizeof (s4));
+ stpncpy (x, s3, sizeof (s3));
+ y[1] = strndup (s3, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s3));
+ z += strncmp (s3, s4, sizeof (s4));
+ z += strncasecmp (s3, s4, sizeof (s3));
+ z += strncasecmp (s3, s4, sizeof (s4));
+
+ return z;
+}
+
+/* { dg-prune-output "\[\n\r\]*will always overflow\[\n\r\]*" } */
diff --git a/gcc/testsuite/gcc.dg/torture/alias-1.c b/gcc/testsuite/gcc.dg/torture/alias-1.c
new file mode 100644
index 0000000000..92b8809907
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/alias-1.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-fschedule-insns" } */
+/* { dg-require-effective-target scheduling } */
+
+extern void abort (void) __attribute__((noreturn));
+
+struct B { int a; int b;};
+struct wrapper {
+union setconflict
+{
+ struct S { char one1; struct B b1; } s;
+ struct T { struct B b2; char two2; } t;
+} a;
+};
+
+int
+main ()
+{
+ int sum = 0;
+ int i;
+ struct wrapper w;
+ struct B *p;
+
+ p = &w.a.s.b1;
+ asm ("": "=r" (p):"0" (p));
+ p->a = 0;
+ asm ("": "=r" (p):"0" (p));
+ sum += p->a;
+
+ p = &w.a.t.b2;
+ asm ("": "=r" (p):"0" (p));
+ p->b = 1;
+ asm ("": "=r" (p):"0" (p));
+ sum += p->b;
+
+ if (sum != 1)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c b/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
index 20dc4c48a2..0d26c9cc70 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-complex-1.c
@@ -1,6 +1,6 @@
/* Test __builtin_complex semantics. */
/* { dg-do run } */
-/* { dg-options "-std=c1x -pedantic-errors" } */
+/* { dg-options "-std=c11 -pedantic-errors" } */
/* { dg-add-options ieee } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
index 740206153b..545f9239c8 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-explog-1.c
@@ -7,6 +7,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
+/* { dg-skip-if "PR44214" { *-*-* } { "-O0" } { "" } } */
/* Define "e" with as many bits as found in builtins.c:dconste. */
#define M_E 2.7182818284590452353602874713526624977572470936999595749669676277241
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c b/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c
index 3ef23648a3..a66ce51fcc 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-frexp-1.c
@@ -9,7 +9,7 @@
/* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
/* In order to fold algebraic exprs below, targets with "composite"
floating point formats need -funsafe-math-optimizations. */
-/* { dg-options "-funsafe-math-optimizations" { target mips*-*-irix6* powerpc*-*-* } } */
+/* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */
extern void link_error(int);
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c b/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
index 25d0f91064..d759d1c6c8 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-logb-1.c
@@ -9,7 +9,7 @@
/* { dg-options "-fno-finite-math-only" { target sh*-*-* } } */
/* In order to fold algebraic exprs below, targets with "composite"
floating point formats need -funsafe-math-optimizations. */
-/* { dg-options "-funsafe-math-optimizations" { target mips*-*-irix6* powerpc*-*-* } } */
+/* { dg-options "-funsafe-math-optimizations" { target powerpc*-*-* } } */
extern void link_error(int);
@@ -48,25 +48,25 @@ extern void link_error(int);
/* Test if FUNCRES(FUNC(NEG FUNCARG(ARGARG))) is false. Check the
sign as well. */
#ifndef __SPU__
-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
if (!__builtin_##FUNCRES##f(__builtin_##FUNC(NEG __builtin_##FUNCARG##f(ARGARG))) \
- || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG __builtin_##FUNCARG##f(ARGARG))) \
+ || CKSGN_F(__builtin_##FUNC##f(NEG __builtin_##FUNCARG##f(ARGARG)), NEG2 __builtin_##FUNCARG##f(ARGARG))) \
link_error(__LINE__); \
if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
link_error(__LINE__); \
if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
link_error(__LINE__); \
} while (0)
#else
-#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES) do { \
+#define TESTIT3(FUNC,NEG,FUNCARG,ARGARG,FUNCRES,NEG2) do { \
/* SPU single-precision floating point format does not support Inf or Nan. */ \
if (!__builtin_##FUNCRES(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG))) \
- || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG __builtin_##FUNCARG(ARGARG))) \
+ || CKSGN(__builtin_##FUNC(NEG __builtin_##FUNCARG(ARGARG)), NEG2 __builtin_##FUNCARG(ARGARG))) \
link_error(__LINE__); \
if (!__builtin_##FUNCRES##l(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG))) \
- || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG __builtin_##FUNCARG##l(ARGARG))) \
+ || CKSGN_L(__builtin_##FUNC##l(NEG __builtin_##FUNCARG##l(ARGARG)), NEG2 __builtin_##FUNCARG##l(ARGARG))) \
link_error(__LINE__); \
} while (0)
#endif
@@ -173,15 +173,15 @@ foo(void)
/* Test for f(+-Inf) -> +-Inf and f(+-NaN) -> +-NaN, regardless of
the radix. */
- TESTIT3 (logb, ,inf, , isinf);
- TESTIT3 (logb, - ,inf, , isinf);
- TESTIT3 (logb, ,nan, "", isnan);
- TESTIT3 (logb, - ,nan, "", isnan);
-
- TESTIT3 (significand, ,inf, , isinf);
- TESTIT3 (significand, - ,inf, , isinf);
- TESTIT3 (significand, ,nan, "", isnan);
- TESTIT3 (significand, - ,nan, "", isnan);
+ TESTIT3 (logb, ,inf, , isinf, );
+ TESTIT3 (logb, - ,inf, , isinf, );
+ TESTIT3 (logb, ,nan, "", isnan, );
+ TESTIT3 (logb, - ,nan, "", isnan, -);
+
+ TESTIT3 (significand, ,inf, , isinf, );
+ TESTIT3 (significand, - ,inf, , isinf, -);
+ TESTIT3 (significand, ,nan, "", isnan, );
+ TESTIT3 (significand, - ,nan, "", isnan, -);
}
int main()
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
index d1403c46c9..9e7c25adb3 100644
--- a/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
+++ b/gcc/testsuite/gcc.dg/torture/builtin-power-1.c
@@ -8,6 +8,7 @@
/* { dg-do link } */
/* { dg-options "-ffast-math" } */
/* { dg-add-options c99_runtime } */
+/* { dg-skip-if "PR44214" { *-*-* } { "-O0" } { "" } } */
#include "../builtins-config.h"
diff --git a/gcc/testsuite/gcc.dg/torture/builtin-self.c b/gcc/testsuite/gcc.dg/torture/builtin-self.c
new file mode 100644
index 0000000000..6d1719f751
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/builtin-self.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target i?86-*-* x86_64-*-* } } */
+/* Check that we can use this idiom to define out-of-line copies of built-in
+ functions. This is used by libgcc/sync.c, for example. */
+void __sync_synchronize (void)
+{
+ __sync_synchronize ();
+}
+/* { dg-final { scan-assembler "__sync_synchronize" } } */
+/* { dg-final { scan-assembler "\t(lock|mfence)" } } */
+/* { dg-final { scan-assembler-not "\tcall" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/builtins-1.c b/gcc/testsuite/gcc.dg/torture/builtins-1.c
new file mode 100644
index 0000000000..c0e8210a10
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/builtins-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-rtl-expand-all" */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
+int isdigit(int c)
+{
+ return c >= 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/torture/c99-contract-1.c b/gcc/testsuite/gcc.dg/torture/c99-contract-1.c
new file mode 100644
index 0000000000..6023083080
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/c99-contract-1.c
@@ -0,0 +1,21 @@
+/* Test floating-point contraction occurs only within source language
+ expressions. */
+/* { dg-do run } */
+/* { dg-options "-std=c99 -pedantic-errors" } */
+
+extern void abort (void);
+extern void exit (int);
+
+volatile float a = 1 + 0x1p-23f, b = 1 - 0x1p-23f, c = -1;
+
+int
+main (void)
+{
+ float av = a, bv = b, cv = c;
+ float p = av * bv;
+ float r = p + cv;
+ if (r == 0)
+ exit (0);
+ else
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
new file mode 100644
index 0000000000..9d37ba25b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-cmp-invalid.c
@@ -0,0 +1,19 @@
+/* Test for "invalid" exceptions from __float128 comparisons. */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = __builtin_nan (""), b = 0;
+ volatile int r = a < b;
+ if (!fetestexcept (FE_INVALID))
+ abort ();
+ if (r)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
new file mode 100644
index 0000000000..f721e562b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-div-underflow.c
@@ -0,0 +1,19 @@
+/* Test for spurious underflow from __float128 division. */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x0.fffp-16382q, b = 0x0.fffp0q, c;
+ c = a / b;
+ if (fetestexcept (FE_UNDERFLOW | FE_INEXACT))
+ abort ();
+ if (c != 0x1p-16382q)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
new file mode 100644
index 0000000000..ea11f26e22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-exact-underflow.c
@@ -0,0 +1,41 @@
+/* Test that exact underflow in __float128 signals the underflow
+ exception if trapping is enabled, but does not raise the flag
+ otherwise. */
+
+/* { dg-do run { target i?86-*-*gnu* x86_64-*-*gnu* } } */
+/* { dg-options "-D_GNU_SOURCE" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <setjmp.h>
+#include <signal.h>
+#include <stdlib.h>
+
+volatile sig_atomic_t caught_sigfpe;
+sigjmp_buf buf;
+
+static void
+handle_sigfpe (int sig)
+{
+ caught_sigfpe = 1;
+ siglongjmp (buf, 1);
+}
+
+int
+main (void)
+{
+ volatile __float128 a = 0x1p-16382q, b = 0x1p-2q;
+ volatile __float128 r;
+ r = a * b;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-16384q)
+ abort ();
+ feenableexcept (FE_UNDERFLOW);
+ signal (SIGFPE, handle_sigfpe);
+ if (sigsetjmp (buf, 1) == 0)
+ r = a * b;
+ if (!caught_sigfpe)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
new file mode 100644
index 0000000000..60f9bbe943
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-extend-nan.c
@@ -0,0 +1,23 @@
+/* Test extensions to __float128 quiet signaling NaNs. */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "-fsignaling-nans" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <float.h>
+#include <stdlib.h>
+
+volatile long double a = __builtin_nansl ("");
+
+int
+main (void)
+{
+#if LDBL_MANT_DIG < 113
+ volatile __float128 r = a;
+ feclearexcept (FE_INVALID);
+ r += 1;
+ if (fetestexcept (FE_INVALID))
+ abort ();
+#endif
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-mul-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-mul-underflow.c
new file mode 100644
index 0000000000..e3ebfffc98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-mul-underflow.c
@@ -0,0 +1,21 @@
+/* Test __float128 multiplication uses after-rounding tininess
+ detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x1.fffffffffffffffp-16382q, b = 0x1.0000000000000008p-1q, c;
+ c = a * b;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (c != 0x1p-16382q)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-truncdf-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-truncdf-underflow.c
new file mode 100644
index 0000000000..83b05387ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-truncdf-underflow.c
@@ -0,0 +1,27 @@
+/* Test truncation from __float128 to double uses after-rounding
+ tininess detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x0.fffffffffffffffp-1022q, b = 0x0.fffffffffffff8p-1022q;
+ volatile double r;
+ r = (double) a;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-1022)
+ abort ();
+ r = (double) b;
+ if (!fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-1022)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/float128-truncsf-underflow.c b/gcc/testsuite/gcc.dg/torture/float128-truncsf-underflow.c
new file mode 100644
index 0000000000..3f1a71366d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/float128-truncsf-underflow.c
@@ -0,0 +1,27 @@
+/* Test truncation from __float128 to float uses after-rounding
+ tininess detection. */
+
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-options "" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile __float128 a = 0x0.ffffffffffp-126q, b = 0x0.ffffffp-126q;
+ volatile float r;
+ r = (float) a;
+ if (fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-126f)
+ abort ();
+ r = (float) b;
+ if (!fetestexcept (FE_UNDERFLOW))
+ abort ();
+ if (r != 0x1p-126f)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-compare.c b/gcc/testsuite/gcc.dg/torture/fp-compare.c
new file mode 100644
index 0000000000..0d51dfd247
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-compare.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* Check that find_scan_insn properly handles swapped FP comparisons. */
+static double x;
+static int exit_code;
+
+void __attribute__ ((noinline))
+check_int (int a, int b)
+{
+ exit_code += (a != b);
+}
+
+int
+main (void)
+{
+ x = 0.0;
+ asm ("" : "+m" (x));
+ check_int (__builtin_isgreater (x, 1.0), 0);
+ check_int (__builtin_isgreaterequal (x, 1.0), 0);
+ check_int (__builtin_isless (x, 1.0), 1);
+ check_int (__builtin_islessequal (x, 1.0), 1);
+ check_int (__builtin_islessgreater (x, 1.0), 1);
+ return exit_code;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-2.c
new file mode 100644
index 0000000000..4c00e8fa71
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-2.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-require-effective-target int128 } */
+
+extern void abort (void);
+
+float __attribute__((noinline))
+f (__uint128_t x)
+{
+ return x + 1;
+}
+
+int
+main (void)
+{
+ if (f (0xffffffffu) == 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
new file mode 100644
index 0000000000..9990e190c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-2.c
@@ -0,0 +1,21 @@
+/* Test floating-point conversions. __float128 type with TImode: bug
+ 53317. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "" } */
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ volatile unsigned long long a = 0x1000000000000ULL;
+ volatile unsigned long long b = 0xffffffffffffffffULL;
+ unsigned __int128 c = (((unsigned __int128) a) << 64) | b;
+ __float128 d = c;
+ if (d != 0x1.000000000000ffffffffffffffffp112q)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
new file mode 100644
index 0000000000..944494d9bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert-float128-timode-3.c
@@ -0,0 +1,23 @@
+/* Test for correct rounding of conversions from __int128 to
+ __float128. */
+/* { dg-do run { target i?86-*-* x86_64-*-* ia64-*-* } } */
+/* { dg-require-effective-target int128 } */
+/* { dg-options "-frounding-math" } */
+
+#include <fenv.h>
+#include <stdlib.h>
+
+int
+main (void)
+{
+ volatile unsigned long long h = -1ULL;
+ volatile unsigned __int128 u128 = (((unsigned __int128) h) << 64) | h;
+ volatile __int128 s128 = u128 >> 1;
+ fesetround (FE_TOWARDZERO);
+ __float128 ru = u128, rs = s128;
+ if (ru != 0x1.ffffffffffffffffffffffffffffp127q)
+ abort ();
+ if (rs != 0x1.ffffffffffffffffffffffffffffp126q)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
index 61d2c0199f..8ac9c3de1a 100644
--- a/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
+++ b/gcc/testsuite/gcc.dg/torture/fp-int-convert.h
@@ -19,7 +19,7 @@ typedef unsigned long UTItype;
and unsigned integer types I and U and the floating-point type F,
where P is the binary precision of the floating point type. We
test conversions of the values 0, 1, 0x7...f, 0x8...0, 0xf...f. We
- also test conversions of values half way inbetween two
+ also test conversions of values half way between two
representable values (rounding both ways), just above half way, and
just below half way. */
#define TEST_I_F(I, U, F, P) \
diff --git a/gcc/testsuite/gcc.dg/torture/ldist-1.c b/gcc/testsuite/gcc.dg/torture/ldist-1.c
new file mode 100644
index 0000000000..b6a0f28bac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/ldist-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribute-patterns" } */
+
+void foo (volatile int *p, int n)
+{
+ int i;
+ for (i = 0; i < n; ++i)
+ p[i] = 0;
+}
+
+/* { dg-final { scan-assembler-not "memset" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-1.c b/gcc/testsuite/gcc.dg/torture/matrix-1.c
new file mode 100644
index 0000000000..1b88599bdc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-1.c
@@ -0,0 +1,90 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions). */
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k, id;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-2.c b/gcc/testsuite/gcc.dg/torture/matrix-2.c
new file mode 100644
index 0000000000..5013671af5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-2.c
@@ -0,0 +1,113 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The last dimension of VEL escapes because of
+ the assignment : vel[1][1] =...
+ Only the two external dimensions are flattened. */
+
+
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ printf ("%x\n",vel[i][j]);
+ /*if (i!=1 || j!=1)*/
+ /*if (i==1 && j==1)
+ continue;
+ else
+ free (vel[i][j]);*/
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ printf ("%x %d %d\n",vel[i][j], ARCHnodes1, sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ printf ("%x\n",vel[i][j]);
+ }
+ }
+
+ printf ("again:\n\n");
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ printf ("%x\n",vel[i][j]);
+ /*for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }*/
+ }
+ }
+ /*vel[1][1] = vel[0][1];*/
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-3.c b/gcc/testsuite/gcc.dg/torture/matrix-3.c
new file mode 100644
index 0000000000..c646899a32
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-3.c
@@ -0,0 +1,97 @@
+/* { dg-do compile } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+void just_a_call (int *);
+
+/* The last dimension of VEL escapes because it was sent
+ as argumet to just_a_call(). (external function)
+ Only the two external dimensions are flattened.
+ Run with -c. */
+
+
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ just_a_call (vel[1][1]);
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-4.c b/gcc/testsuite/gcc.dg/torture/matrix-4.c
new file mode 100644
index 0000000000..586443ce28
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-4.c
@@ -0,0 +1,95 @@
+/* { dg-do compile } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+void just_a_call (int ****);
+
+/* Address of VEL is taken.
+ It is not flattened. */
+
+
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ just_a_call (&vel);
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-5.c b/gcc/testsuite/gcc.dg/torture/matrix-5.c
new file mode 100644
index 0000000000..9b17567f44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-5.c
@@ -0,0 +1,96 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The two inner dimesions of matrix escape because of the
+ assignment vel[1]= ...
+ VEL is not Flattened. */
+
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes-1; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes-1; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ vel[1] = vel[0];
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/matrix-6.c b/gcc/testsuite/gcc.dg/torture/matrix-6.c
new file mode 100644
index 0000000000..cad63ddabf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/matrix-6.c
@@ -0,0 +1,97 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The last dimension of VEL escapes because of
+ the assignment : *vel[1] =...
+ Only the two external dimensions are flattened. */
+
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ if (!(i == 1 && j == 0))
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ *vel[1] = &d;
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/memcpy-1.c b/gcc/testsuite/gcc.dg/torture/memcpy-1.c
new file mode 100644
index 0000000000..290c78923e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/memcpy-1.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-additional-options "-mtune=pentiumpro" { target ia32 } } */
+/* { dg-additional-options "-minline-all-stringops" { target { i?86-*-* x86_64-*-* } } } */
+
+static void __attribute__((noinline, noclone))
+my_memcpy (char *dest, const char *src, int n)
+{
+ __builtin_memcpy (dest, src, n);
+}
+
+int
+main (void)
+{
+ char a1[4], a2[4];
+ __builtin_memset (a1, 'a', 4);
+ __builtin_memset (a2, 'b', 4);
+ my_memcpy (a2, a1, 4);
+ if (a2[0] != 'a')
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/torture/pr35634.c b/gcc/testsuite/gcc.dg/torture/pr35634.c
new file mode 100644
index 0000000000..73f860f2b1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr35634.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+
+void abort (void);
+void exit (int);
+
+void foo (int i)
+{
+ static int n;
+ if (i < -128 || i > 127)
+ abort ();
+ if (++n > 1000)
+ exit (0);
+}
+
+int main ()
+{
+ signed char c;
+ for (c = 0; ; c++) foo (c);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr37868.c b/gcc/testsuite/gcc.dg/torture/pr37868.c
index c1b7a2b239..5204c5a594 100644
--- a/gcc/testsuite/gcc.dg/torture/pr37868.c
+++ b/gcc/testsuite/gcc.dg/torture/pr37868.c
@@ -1,6 +1,6 @@
/* { dg-do run } */
/* { dg-options "-fno-strict-aliasing" } */
-/* { dg-skip-if "unaligned access" { sparc*-*-* sh*-*-* tic6x-*-* } "*" "" } */
+/* { dg-skip-if "unaligned access" { arc*-*-* epiphany-*-* nds32*-*-* sparc*-*-* sh*-*-* tic6x-*-* } "*" "" } */
extern void abort (void);
#if (__SIZEOF_INT__ <= 2)
diff --git a/gcc/testsuite/gcc.dg/torture/pr39074-2.c b/gcc/testsuite/gcc.dg/torture/pr39074-2.c
index 2278c23ef8..d18930a4d6 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39074-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39074-2.c
@@ -30,5 +30,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._. = { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._., points-to vars: { D..... }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr39074.c b/gcc/testsuite/gcc.dg/torture/pr39074.c
index 4775062d96..5d46f3120d 100644
--- a/gcc/testsuite/gcc.dg/torture/pr39074.c
+++ b/gcc/testsuite/gcc.dg/torture/pr39074.c
@@ -2,7 +2,7 @@
/* { dg-options "-fdump-tree-alias" } */
/* { dg-skip-if "" { *-*-* } { "-O0" "-fno-fat-lto-objects" } { "" } } */
-typedef __PTRDIFF_TYPE__ intptr_t;
+typedef __INTPTR_TYPE__ intptr_t;
int i;
void __attribute__((noinline))
@@ -29,5 +29,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "y.._., points-to vars: { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._. = { i }" "alias" } } */
+/* { dg-final { scan-tree-dump "y.._., points-to vars: { D..... }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr41993.c b/gcc/testsuite/gcc.dg/torture/pr41993.c
new file mode 100644
index 0000000000..890e365615
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr41993.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx -mvzeroupper" { target { i?86-*-* x86_64-*-* } } } */
+
+short retframe_short (void *rframe)
+{
+ __builtin_return (rframe);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr47917.c b/gcc/testsuite/gcc.dg/torture/pr47917.c
index a46485f307..f89d44987c 100644
--- a/gcc/testsuite/gcc.dg/torture/pr47917.c
+++ b/gcc/testsuite/gcc.dg/torture/pr47917.c
@@ -1,7 +1,6 @@
/* { dg-do run } */
/* { dg-options "-std=c99" } */
-/* { dg-options "-std=c99 -D_ISO_C_SOURCE=19990L" { target alpha*-dec-osf5* } } */
-/* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target mips-sgi-irix6.5 *-*-solaris2.[89] } } */
+/* { dg-options "-std=c99 -D_XOPEN_SOURCE=500" { target *-*-solaris2.9 } } */
/* { dg-options "-std=gnu99" { target *-*-hpux* } } */
/* { dg-additional-options "-D__USE_MINGW_ANSI_STDIO=1" { target *-*-mingw* } } */
/* { dg-xfail-run-if "no C99 snprintf function" { *-*-hpux10* } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr49518.c b/gcc/testsuite/gcc.dg/torture/pr49518.c
index 84a10fbbee..55761fd610 100644
--- a/gcc/testsuite/gcc.dg/torture/pr49518.c
+++ b/gcc/testsuite/gcc.dg/torture/pr49518.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-Wno-aggressive-loop-optimizations" } */
int a, b;
struct S { unsigned int s, t, u; } c, d = { 0, 1, 0 };
diff --git a/gcc/testsuite/gcc.dg/torture/pr50222.c b/gcc/testsuite/gcc.dg/torture/pr50222.c
new file mode 100644
index 0000000000..f534d8960b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr50222.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-funswitch-loops -ftree-loop-distribution" } */
+
+typedef struct AVProgram {
+ void *priv_data;
+ unsigned int nb_streams;
+} AVFormatContext;
+typedef struct {
+ unsigned short flags;
+ unsigned char stream_id;
+} FrameCode;
+typedef struct {
+ FrameCode frame_code[256];
+} NUTContext;
+void build_frame_code(AVFormatContext *s, int stream_id,
+ int is_audio, int pred_count)
+{
+ NUTContext *nut = s->priv_data;
+ int keyframe_0_esc = s->nb_streams > 2;
+ int start2 = 1 + 253*stream_id / s->nb_streams;
+ int key_frame;
+ for(key_frame=0; key_frame<2; key_frame++)
+ {
+ FrameCode *ft;
+ if (is_audio && keyframe_0_esc && key_frame==0)
+ continue;
+ ft= &nut->frame_code[start2];
+ ft->flags|= 3;
+ ft->stream_id= stream_id;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr51071-2.c b/gcc/testsuite/gcc.dg/torture/pr51071-2.c
index f66a89f395..b67879c443 100644
--- a/gcc/testsuite/gcc.dg/torture/pr51071-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr51071-2.c
@@ -1,9 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-fno-delete-null-pointer-checks" } */
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
+
extern struct module __this_module;
static inline void
-trace_module_get (struct module *mod, unsigned long ip) { }
+trace_module_get (struct module *mod, uintptr_t ip) { }
struct module;
static inline __attribute__((no_instrument_function))
int try_module_get(struct module *module)
@@ -16,7 +18,7 @@ int try_module_get(struct module *module)
__label__ __here;
asm("");
__here:
- trace_module_get(module, (unsigned long)&&__here);
+ trace_module_get(module, (uintptr_t)&&__here);
}
else
ret = 0;
diff --git a/gcc/testsuite/gcc.dg/torture/pr51106-2.c b/gcc/testsuite/gcc.dg/torture/pr51106-2.c
index e69bf1b01a..bab0987fff 100644
--- a/gcc/testsuite/gcc.dg/torture/pr51106-2.c
+++ b/gcc/testsuite/gcc.dg/torture/pr51106-2.c
@@ -1,6 +1,7 @@
/* PR target/51106 */
/* { dg-do "compile" } */
/* { dg-skip-if "RTL error" { "*-*-*" } { "-fno-fat-lto-objects" } { "" } } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int
bar (int x)
@@ -11,4 +12,4 @@ lab:
return 0;
}
-/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 8 } */
+/* { dg-warning "probably doesn.t match constraints" "" { target *-*-* } 9 } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr51238.c b/gcc/testsuite/gcc.dg/torture/pr51238.c
new file mode 100644
index 0000000000..4d5da5d186
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr51238.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribution" } */
+
+extern int ia[];
+extern int ib[];
+int i;
+
+void
+foo (int l)
+{
+ while (l--)
+ {
+ i = ia[l];
+ ia[l] = ib[l] = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr51244-21.c b/gcc/testsuite/gcc.dg/torture/pr51244-21.c
new file mode 100644
index 0000000000..fbb02db28e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr51244-21.c
@@ -0,0 +1,75 @@
+/* { dg-do run } */
+#include <assert.h>
+
+static inline int
+blk_oversized_queue (int* q)
+{
+ if (q[2])
+ return q[1] != 0;
+ return q[0] == 0;
+}
+
+int __attribute__ ((noinline))
+get_request (int* q, int rw)
+{
+ if (blk_oversized_queue (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return -33;
+
+ return 0;
+ }
+
+ return -100;
+}
+
+int main (void)
+{
+ int x[3];
+ int r;
+
+ x[0] = 0; x[1] = 1; x[2] = 1;
+ r = get_request (x, 0);
+ assert (r == -33);
+
+ r = get_request (x, 1);
+ assert (r == -33);
+
+ r = get_request (x, 2);
+ assert (r == 0);
+
+
+ x[0] = 0; x[1] = 0; x[2] = 1;
+ r = get_request (x, 0);
+ assert (r == -100);
+
+ r = get_request (x, 1);
+ assert (r == -100);
+
+ r = get_request (x, 2);
+ assert (r == -100);
+
+
+ x[0] = 0; x[1] = 0; x[2] = 0;
+ r = get_request (x, 0);
+ assert (r == -33);
+
+ r = get_request (x, 1);
+ assert (r == -33);
+
+ r = get_request (x, 2);
+ assert (r == 0);
+
+
+ x[0] = 0; x[1] = 0; x[2] = 0;
+ r = get_request (x, 0);
+ assert (r == -33);
+
+ r = get_request (x, 1);
+ assert (r == -33);
+
+ r = get_request (x, 2);
+ assert (r == 0);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr52402.c b/gcc/testsuite/gcc.dg/torture/pr52402.c
index ad54d2aae2..ba7c5ae24c 100644
--- a/gcc/testsuite/gcc.dg/torture/pr52402.c
+++ b/gcc/testsuite/gcc.dg/torture/pr52402.c
@@ -1,7 +1,6 @@
/* { dg-do run } */
/* { dg-options "-w -Wno-psabi" } */
/* { dg-require-effective-target int32plus } */
-/* { dg-xfail-run-if "pr52450" { { hppa*-*-hpux* } && { ! lp64 } } } */
typedef int v4si __attribute__((vector_size(16)));
struct T { v4si i[2]; int j; } __attribute__((packed));
diff --git a/gcc/testsuite/gcc.dg/pr52530.c b/gcc/testsuite/gcc.dg/torture/pr52530.c
index f7cdf1a63b..f7cdf1a63b 100644
--- a/gcc/testsuite/gcc.dg/pr52530.c
+++ b/gcc/testsuite/gcc.dg/torture/pr52530.c
diff --git a/gcc/testsuite/gcc.dg/torture/pr52756.c b/gcc/testsuite/gcc.dg/torture/pr52756.c
new file mode 100644
index 0000000000..175b414e17
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52756.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+void Env_FetchObj0AttrOffset (unsigned int NumFields, int *Status)
+{
+ int Found = 0;
+ if (NumFields)
+ while ((*Status == 0) && NumFields-- > 0 && Found == 0)
+ Found = 1;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr52881.c b/gcc/testsuite/gcc.dg/torture/pr52881.c
new file mode 100644
index 0000000000..c101c80338
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52881.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+
+int a, b, c, d, e, f, h, i, j, k, l, m, n, o;
+static int g;
+int
+fn1 () {
+ for (;; ++f)
+ if (e)
+ break;
+ return 0;
+}
+unsigned char fn2 ();
+void
+fn3 () {
+lbl_220:
+ if (j) {
+lbl_221:
+ l = (g || b) <= fn1 ();
+ for (;;) {
+ g = 0;
+ fn2 ();
+ if (k)
+ goto lbl_220;
+ break;
+ }
+ if (l)
+ goto lbl_221;
+ }
+}
+unsigned char
+fn2 () {
+ o = d ? 0 : c;
+ h = m | a % o != n;
+ return i;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr52912.c b/gcc/testsuite/gcc.dg/torture/pr52912.c
new file mode 100644
index 0000000000..3ae57588f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52912.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+int a, b, c;
+static int
+fn1 (p1)
+{
+lbl_549:
+ if (p1)
+ goto lbl_549;
+ return 0;
+}
+
+void
+fn2 ()
+{
+ b = (c && a) > fn1 (c) >= c;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr52913.c b/gcc/testsuite/gcc.dg/torture/pr52913.c
new file mode 100644
index 0000000000..ad99884bfe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52913.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+
+int a, b, c, d, e;
+void
+fn1 ()
+{
+lbl_101:
+ e = 0;
+lbl_274:
+ for (c = 0; c < 1; c = a)
+ if (d)
+ if (b)
+ goto lbl_101;
+ else
+ break;
+ d = 1;
+ goto lbl_274;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr52996.c b/gcc/testsuite/gcc.dg/torture/pr52996.c
new file mode 100644
index 0000000000..200bc36b2a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr52996.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-funswitch-loops" } */
+
+int a, b, c, d, e, f;
+void
+fn1 ()
+{
+ int g, h;
+lbl_173:
+ if (a)
+ c++;
+lbl_158:
+ e = 0;
+ h = 0;
+ for (; h > -8; h--)
+ {
+ g = 0;
+ for (; g <= 0; g += 1)
+ {
+ d = 1;
+ for (; d >= 0; d -= 1)
+ a = 1;
+ if (b)
+ break;
+ if (f)
+ return;
+ if (h)
+ goto lbl_158;
+ }
+ }
+ goto lbl_173;
+}
+
diff --git a/gcc/testsuite/gcc.dg/torture/pr53070.c b/gcc/testsuite/gcc.dg/torture/pr53070.c
new file mode 100644
index 0000000000..534ac34141
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53070.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-ffast-math -ftree-loop-if-convert -fno-tree-loop-im" } */
+int
+foo (int c)
+{
+ int t = 0, i = 0;
+ for (; i < 100; i++)
+ t += c ? c : 1;
+ return t;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53168.c b/gcc/testsuite/gcc.dg/torture/pr53168.c
new file mode 100644
index 0000000000..0b9a8dce60
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53168.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+
+int a, b, c;
+unsigned *d;
+int e[1];
+void fn1 ();
+int fn2 ();
+int
+fn3 ()
+{
+ int *f = &a;
+ if (fn2 ())
+ {
+ for (; c; c++)
+ {
+ e[a] && (b = 0);
+ fn1 ();
+ if (e[a])
+ return 0;
+ }
+ for (; c <= 0; c++)
+ for (;;)
+ ;
+ }
+ else
+ e[0] = 0 != (d = f);
+ return *d;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53366-1.c b/gcc/testsuite/gcc.dg/torture/pr53366-1.c
index ca9997ed2d..d70eae8215 100644
--- a/gcc/testsuite/gcc.dg/torture/pr53366-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pr53366-1.c
@@ -1,5 +1,6 @@
/* PR tree-optimization/53366 */
-/* { dg-do run } */
+/* { dg-do run { target { size32plus } } } */
+/* { dg-require-effective-target size32plus } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/torture/pr53390.c b/gcc/testsuite/gcc.dg/torture/pr53390.c
new file mode 100644
index 0000000000..72a25c52ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53390.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+extern unsigned short var1;
+extern int var2;
+
+extern struct {
+ int f1;
+ unsigned short *f2;
+} *my_table;
+
+void foo(void)
+{
+ unsigned short *local_vec
+ = __builtin_malloc(var1 * var2 * sizeof(unsigned short));
+ unsigned short i;
+
+ my_table[0].f2 = __builtin_malloc(var1 * sizeof(unsigned short));
+
+ for (i = 0; i < var1; ++i)
+ my_table[0].f2[i] = local_vec[i * var2];
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53695.c b/gcc/testsuite/gcc.dg/torture/pr53695.c
new file mode 100644
index 0000000000..eba0843c4a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53695.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-ftracer" } */
+
+void
+foo (const void **p)
+{
+ void *labs[] = { &&l1, &&l2, &&l3 };
+l1:
+ goto *p++;
+l2:
+ goto *p;
+l3:
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53703.c b/gcc/testsuite/gcc.dg/torture/pr53703.c
new file mode 100644
index 0000000000..c9e10abf59
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr53703.c
@@ -0,0 +1,149 @@
+/* Reduced test case from PR53703. Used to ICE. */
+
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+typedef long unsigned int size_t;
+typedef unsigned short int sa_family_t;
+struct sockaddr {};
+typedef unsigned char __u8;
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+struct nlmsghdr {
+ __u32 nlmsg_len;
+ __u16 nlmsg_type;
+};
+struct ifaddrmsg {
+ __u8 ifa_family;
+};
+enum {
+ IFA_ADDRESS,
+ IFA_LOCAL,
+};
+enum {
+ RTM_NEWLINK = 16,
+ RTM_NEWADDR = 20,
+};
+struct rtattr {
+ unsigned short rta_len;
+ unsigned short rta_type;
+};
+struct ifaddrs {
+ struct ifaddrs *ifa_next;
+ unsigned short ifa_flags;
+};
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+struct nlmsg_list {
+ struct nlmsg_list *nlm_next;
+ int size;
+};
+struct rtmaddr_ifamap {
+ void *address;
+ void *local;
+ int address_len;
+ int local_len;
+};
+int usagi_getifaddrs (struct ifaddrs **ifap)
+{
+ struct nlmsg_list *nlmsg_list, *nlmsg_end, *nlm;
+ size_t dlen, xlen, nlen;
+ int build;
+ for (build = 0; build <= 1; build++)
+ {
+ struct ifaddrs *ifl = ((void *)0), *ifa = ((void *)0);
+ struct nlmsghdr *nlh, *nlh0;
+ uint16_t *ifflist = ((void *)0);
+ struct rtmaddr_ifamap ifamap;
+ for (nlm = nlmsg_list; nlm; nlm = nlm->nlm_next)
+ {
+ int nlmlen = nlm->size;
+ for (nlh = nlh0;
+ ((nlmlen) >= (int)sizeof(struct nlmsghdr)
+ && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr)
+ && (nlh)->nlmsg_len <= (nlmlen));
+ nlh = ((nlmlen) -= ( (((nlh)->nlmsg_len)+4U -1) & ~(4U -1) ),
+ (struct nlmsghdr*)(((char*)(nlh))
+ + ( (((nlh)->nlmsg_len)+4U -1)
+ & ~(4U -1) ))))
+ {
+ struct ifinfomsg *ifim = ((void *)0);
+ struct ifaddrmsg *ifam = ((void *)0);
+ struct rtattr *rta;
+ sa_family_t nlm_family = 0;
+ uint32_t nlm_scope = 0, nlm_index = 0;
+ memset (&ifamap, 0, sizeof (ifamap));
+ switch (nlh->nlmsg_type)
+ {
+ case RTM_NEWLINK:
+ ifim = (struct ifinfomsg *)
+ ((void*)(((char*)nlh)
+ + ((0)+( ((((int)
+ ( ((sizeof(struct nlmsghdr))+4U -1)
+ & ~(4U -1) )))+4U -1)
+ & ~(4U -1) ))));
+ case RTM_NEWADDR:
+ ifam = (struct ifaddrmsg *)
+ ((void*)(((char*)nlh)
+ + ((0)+( ((((int)
+ ( ((sizeof(struct nlmsghdr))+4U -1)
+ & ~(4U -1) )))+4U -1)
+ & ~(4U -1) ))));
+ nlm_family = ifam->ifa_family;
+ if (build)
+ ifa->ifa_flags = ifflist[nlm_index];
+ break;
+ default:
+ continue;
+ }
+ if (!build)
+ {
+ void *rtadata = ((void*)(((char*)(rta))
+ + (( ((sizeof(struct rtattr))+4 -1)
+ & ~(4 -1) ) + (0))));
+ size_t rtapayload = ((int)((rta)->rta_len)
+ - (( ((sizeof(struct rtattr))+4 -1)
+ & ~(4 -1) ) + (0)));
+ switch (nlh->nlmsg_type)
+ {
+ case RTM_NEWLINK:
+ break;
+ case RTM_NEWADDR:
+ if (nlm_family == 17)
+ break;
+ switch (rta->rta_type)
+ {
+ case IFA_ADDRESS:
+ ifamap.address = rtadata;
+ ifamap.address_len = rtapayload;
+ case IFA_LOCAL:
+ ifamap.local = rtadata;
+ }
+ }
+ }
+ if (nlh->nlmsg_type == RTM_NEWADDR && nlm_family != 17)
+ {
+ if (!ifamap.local)
+ {
+ ifamap.local = ifamap.address;
+ ifamap.local_len = ifamap.address_len;
+ }
+ if (!ifamap.address)
+ {
+ ifamap.address = ifamap.local;
+ }
+ if (ifamap.address_len != ifamap.local_len
+ || (ifamap.address != ((void *)0)
+ && memcmp (ifamap.address, ifamap.local,
+ ifamap.address_len)))
+ {
+ if (!build)
+ dlen += (((ifa_sa_len (nlm_family,
+ ifamap.address_len))+4U -1)
+ & ~(4U -1) );
+ }
+ }
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr53922.c b/gcc/testsuite/gcc.dg/torture/pr53922.c
index 57011e46cb..3974dc660c 100644
--- a/gcc/testsuite/gcc.dg/torture/pr53922.c
+++ b/gcc/testsuite/gcc.dg/torture/pr53922.c
@@ -1,6 +1,10 @@
/* { dg-do run } */
/* { dg-require-weak "" } */
+/* { dg-skip-if "No undefined" { *-*-mingw* } { "*" } { "" } } */
+/* { dg-skip-if "No undefined weak" { *-*-aix* } { "*" } { "" } } */
/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } { "*" } { "" } } */
+/* { dg-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
+/* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */
int x(int a)
{
diff --git a/gcc/testsuite/gcc.dg/torture/pr54027.c b/gcc/testsuite/gcc.dg/torture/pr54027.c
new file mode 100644
index 0000000000..b5568f4375
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54027.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+
+int main (void)
+{
+ int x = 1;
+ while (x)
+ x <<= 1;
+ return x;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54098.c b/gcc/testsuite/gcc.dg/torture/pr54098.c
new file mode 100644
index 0000000000..74398b689c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54098.c
@@ -0,0 +1,72 @@
+/* { dg-do compile } */
+
+extern int printf(const char *, ...);
+struct list_head {
+ struct list_head *next, *prev;
+};
+struct resource {
+ unsigned long long start;
+ unsigned long long end;
+ unsigned long flags;
+ struct resource *parent, *sibling, *child;
+};
+struct pci_dev {
+ struct list_head bus_list;
+ struct resource resource[12];
+};
+struct pci_bus {
+ struct list_head devices;
+ unsigned char secondary;
+ unsigned char subordinate;
+};
+struct resource *pci_bus_resource_n(const struct pci_bus *bus, int n);
+static struct resource *find_free_bus_resource(struct pci_bus *bus, unsigned long type) {
+ int i;
+ struct resource *r;
+ unsigned long type_mask = 0x00000100 | 0x00000200 | 0x00002000;
+ for (i = 0; (r = pci_bus_resource_n(bus, i)) || i < 4; i++) {
+ if (r && (r->flags & type_mask) == type && !r->parent) return r;
+ }
+ return ((void *)0);
+}
+static unsigned long long calculate_memsize(unsigned long long size, unsigned long long min_size, unsigned long long size1, unsigned long long old_size, unsigned long long align) {
+ if (old_size == 1 ) old_size = 0;
+ if (size < old_size) size = old_size;
+ return size;
+}
+void pbus_size_mem(struct pci_bus *bus, unsigned long mask, unsigned long type, unsigned long long min_size, unsigned long long add_size, void *realloc_head) {
+ struct pci_dev *dev;
+ unsigned long long min_align, align, size, size0, size1;
+ int order;
+ struct resource *b_res = find_free_bus_resource(bus, type);
+ unsigned long long children_add_size = 0;
+ if (!b_res) return;
+ for (dev = ({
+ const typeof( ((typeof(*dev) *)0)->bus_list ) *__mptr = ((&bus->devices)->next);
+ (typeof(*dev) *)( (char *)__mptr - __builtin_offsetof(typeof(*dev),bus_list) );
+ }
+ );
+ &dev->bus_list != (&bus->devices);
+ dev = ({
+ const typeof( ((typeof(*dev) *)0)->bus_list ) *__mptr = (dev->bus_list.next);
+ (typeof(*dev) *)( (char *)__mptr - __builtin_offsetof(typeof(*dev),bus_list) );
+ }
+ )) {
+ int i;
+ for (i = 0; i < 12; i++) {
+ struct resource *r = &dev->resource[i];
+ unsigned long long r_size;
+ if (r->parent || (r->flags & mask) != type) continue;
+ r_size = r->end - r->start + 1;
+ if (order > 11) {
+ printf("%d: %pR %#llx\n", i, r, (unsigned long long) align);
+ }
+ size += r_size;
+ }
+ }
+ if (children_add_size > add_size) add_size = children_add_size;
+ size1 = (!realloc_head || (realloc_head && !add_size)) ? size0 : calculate_memsize(size, min_size+add_size, 0, b_res->end - b_res->start + 1, min_align);
+ if (!size0 && !size1) {
+ printf("%pR %02x-%02x\n", b_res, bus->secondary, bus->subordinate);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54109.c b/gcc/testsuite/gcc.dg/torture/pr54109.c
new file mode 100644
index 0000000000..d4d05263d4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54109.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+typedef struct
+{
+ unsigned long bits[4];
+} nodemask_t;
+
+struct cpuset
+{
+ long flags;
+ nodemask_t mems_allowed;
+ struct cpuset *parent;
+} b;
+
+void func1(unsigned long *p1, int p2)
+{
+ p1[p2 - 1] = 0;
+}
+
+void func2(nodemask_t *p1, int p2)
+{
+ func1(p1->bits, p2);
+}
+
+void func3(void)
+{
+ /* This accesses b.flags. */
+ func2(&b.mems_allowed, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54132.c b/gcc/testsuite/gcc.dg/torture/pr54132.c
new file mode 100644
index 0000000000..97bc01caf8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54132.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+
+extern void abort (void);
+void foo(char *p, int n)
+{
+ int i;
+ for (i = 1; i < n; i++)
+ p[i] = p[i - 1];
+}
+int main()
+{
+ char a[1024];
+ a[0] = 1;
+ foo (a, 1024);
+ if (a[1023] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54261-1.c b/gcc/testsuite/gcc.dg/torture/pr54261-1.c
new file mode 100644
index 0000000000..571727b0c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54261-1.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-additional-options "-DSYNC_FALLBACK" { target { ! cas_int } } } */
+
+#ifdef SYNC_FALLBACK
+/* The SYNC_FALLBACK code is just so we don't have to restrict this test
+ to any subset of targets. For targets with no atomics support at
+ all, the cas_int effective-target is false and the fallback provides
+ a PASS. Where the bug trigs (at the time this test-case was added),
+ cas_int is also false but the fallback isn't used. */
+__attribute__((__noinline__, __noclone__))
+int
+# if __INT_MAX__ == 0x7fff
+ __sync_fetch_and_add_2
+# else
+ __sync_fetch_and_add_4
+# endif
+ (int *at, int val)
+{
+ int tmp = *at;
+ asm ("");
+ *at = tmp + val;
+ return tmp;
+}
+#endif
+
+__attribute__((__noinline__, __noclone__))
+void g (int *at, int val)
+{
+ asm ("");
+ __sync_fetch_and_add (at, val);
+}
+
+int main(void)
+{
+ int x = 41;
+ int a = 1;
+ g (&x, a);
+
+ if (x != 42)
+ __builtin_abort ();
+ __builtin_exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54327.c b/gcc/testsuite/gcc.dg/torture/pr54327.c
new file mode 100644
index 0000000000..fe7499aab3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54327.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+#include <string.h>
+#include <stdlib.h>
+void treathead ()
+{
+ char *a = ';' == '\0' ? : 0;
+ if (*a == '=')
+ {
+ while (*a == (*a == 0) || *a == '\'')
+ a++;
+ if (strlen (a) < 2)
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54409.c b/gcc/testsuite/gcc.dg/torture/pr54409.c
new file mode 100644
index 0000000000..c7595474f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54409.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+
+int b;
+
+struct S
+{
+ char *p;
+ struct {
+ } s;
+ int a;
+};
+
+static _Bool
+fn2 (int *p1)
+{
+ if (b)
+ {
+ struct S *c = (struct S *) &p1;
+ return c->a;
+ }
+}
+
+_Bool
+fn3 (struct S *p1)
+{
+ if (fn2 ((int *) &p1->s))
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54458.c b/gcc/testsuite/gcc.dg/torture/pr54458.c
new file mode 100644
index 0000000000..3d2e12fc2f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54458.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+unsigned int a, b, c;
+
+void
+foo (unsigned int x)
+{
+ do
+ {
+ if (a == 0 ? 1 : 1 % a)
+ for (; b; b--)
+ lab:;
+ else
+ while (x)
+ ;
+ if (c)
+ goto lab;
+ }
+ while (1);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54520.c b/gcc/testsuite/gcc.dg/torture/pr54520.c
new file mode 100644
index 0000000000..5884b2f353
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54520.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+char *a;
+void
+fn1 ()
+{
+ char *p = a;
+ while (p && *p != '\0')
+ {
+ while (*p == '\t')
+ *p++ = '\0';
+ if (*p != '\0')
+ p = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54824.c b/gcc/testsuite/gcc.dg/torture/pr54824.c
new file mode 100644
index 0000000000..82b822b099
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr54824.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-w" } */
+
+void __attribute__((noreturn)) bar(void)
+{
+}
+
+void foo(int i, char *p, char *q)
+{
+ while (*p++) {
+ if (i)
+ p++;
+ if (!*q++)
+ bar();
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr54894.c b/gcc/testsuite/gcc.dg/torture/pr54894.c
index 277e371de6..f243ec7880 100644
--- a/gcc/testsuite/gcc.dg/torture/pr54894.c
+++ b/gcc/testsuite/gcc.dg/torture/pr54894.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target size32plus } */
typedef unsigned long long uint64_t;
diff --git a/gcc/testsuite/gcc.dg/torture/pr55011.c b/gcc/testsuite/gcc.dg/torture/pr55011.c
new file mode 100644
index 0000000000..67b2613f6e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55011.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+char a;
+
+void f(void)
+{
+ char b = 2;
+
+ for(;;)
+ {
+ unsigned short s = 1, *p = &s, *i;
+
+ for(*i = 0; *i < 4; ++*i)
+ if(a | (*p /= (b += !!a)) <= 63739)
+ return;
+
+ if(!s)
+ a = 0;
+
+ for(;;);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55018.c b/gcc/testsuite/gcc.dg/torture/pr55018.c
new file mode 100644
index 0000000000..d459b1ba65
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55018.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/55018 */
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+
+void
+foo (int x)
+{
+ unsigned int a = 0;
+ int b = 3;
+ if (x)
+ b = 0;
+lab:
+ if (x)
+ goto lab;
+ a++;
+ if (b != 2)
+ __builtin_printf ("%u", a);
+ goto lab;
+}
+
+/* { dg-final { scan-tree-dump "printf" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr55111.c b/gcc/testsuite/gcc.dg/torture/pr55111.c
new file mode 100644
index 0000000000..f5b0692c8e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55111.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+int a, b, c;
+long d;
+unsigned long *e;
+
+int f(void)
+{
+ for(;; a++)
+ {
+ if(c)
+ {
+ for(b = d = 0; b < 1; b++)
+ e = &d;
+
+ --*e;
+
+ if(d > 0)
+ a = 0;
+
+ return d;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55124.c b/gcc/testsuite/gcc.dg/torture/pr55124.c
new file mode 100644
index 0000000000..a8eec984b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55124.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+int a, b;
+long c;
+
+void f2(void)
+{
+ unsigned long k = 1;
+
+ foo(b ? k = 0 : 0);
+
+ b = ((c = b) ? (k ? : (c = 0)) : a) * c;
+}
+
+void f1(void)
+{
+ f2();
+
+ a = b | c;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55238.c b/gcc/testsuite/gcc.dg/torture/pr55238.c
new file mode 100644
index 0000000000..0ace05809c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55238.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+
+typedef void * gzFile;
+typedef struct
+{
+ int mode;
+ int direct;
+ int seek;
+ int err;
+ char *msg;
+}
+gz_state;
+
+void gz_error (gz_state *state, int err, char *msg);
+
+static void
+gz_reset (gz_state *state)
+{
+ if (state->mode == 7247)
+ {
+ state->direct = 1;
+ }
+ state->seek = 0;
+ gz_error (state, 0, 0);
+}
+
+int
+gzbuffer (void *file, int size)
+{
+ gz_state *state;
+ gz_reset (state);
+}
+
+void gz_error (gz_state *state, int err, char *msg)
+{
+ if (state->msg != 0)
+ {
+ if (state->err != -4)
+ foo (state->msg);
+ }
+ if (msg == 0)
+ return;
+ bar (state->msg, msg);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55253.c b/gcc/testsuite/gcc.dg/torture/pr55253.c
new file mode 100644
index 0000000000..9f6491d4ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55253.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+
+struct
+{
+ int mallocFailed;
+}
+*a;
+
+struct StrAccum
+{
+ int useMalloc;
+}
+b, c;
+
+static void
+fn1 (struct StrAccum *p1, int p2)
+{
+ if (p2 == 0)
+ return;
+ if (p1->useMalloc)
+ a->mallocFailed = 0;
+}
+
+void
+fn2 (struct StrAccum *p1)
+{
+ fn1 (p1, 1);
+}
+
+void
+fn3 (struct StrAccum *p1)
+{
+ fn1 (p1, 1);
+}
+
+void
+fn4 ()
+{
+ c.useMalloc = 1;
+ fn1 (&c, 0);
+}
+
+int
+main ()
+{
+ fn3 (&b);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55270.c b/gcc/testsuite/gcc.dg/torture/pr55270.c
new file mode 100644
index 0000000000..0b7f906d04
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55270.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+unsigned a, b, c;
+
+void f(void)
+{
+ for(; a; a++)
+ {
+ long *p1 = (long *)&b;
+
+ if(*p1)
+ return;
+
+ if(b && (*p1 = b) || c && ++*p1)
+ {
+ unsigned *p2 = &b;
+
+ for(*p2 = 0; *p2 < 1;)
+ for(; b; b++);
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55305.c b/gcc/testsuite/gcc.dg/torture/pr55305.c
new file mode 100644
index 0000000000..fb61447151
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55305.c
@@ -0,0 +1,151 @@
+/* { dg-do run } */
+
+extern void exit (int) __attribute__ ((noreturn));
+extern void abort (void) __attribute__ ((noreturn));
+
+struct t
+{
+ char dummy;
+};
+
+struct m
+{
+ const struct t *t;
+ void (*m)(void);
+};
+
+struct s
+{
+ const struct m *m;
+ void *o;
+};
+
+struct e
+{
+ const struct t *t;
+ void *o;
+};
+
+struct ret
+{
+ struct s s;
+ _Bool b;
+};
+
+const struct t t1 = { 1 };
+const struct t t2 = { 2 };
+const struct t t3 = { 3 };
+const struct t t4 = { 4 };
+const struct t t5 = { 5 };
+
+void
+pass (void)
+{
+ exit (0);
+}
+
+void
+fail (void)
+{
+ abort ();
+}
+
+const struct m m1 = { &t4, fail };
+const struct m m2 = { &t5, pass };
+
+static struct e f2 (struct s s2, void *p);
+static struct e f3 (struct s, void *) __attribute__ ((noinline));
+static void f4 (struct s, void *) __attribute__ ((noinline));
+
+struct ret c (struct s, const struct t *) __attribute__ ((noinline));
+
+struct ret
+c (struct s s1, const struct t *t)
+{
+ struct ret r;
+
+ if (s1.m->t == t)
+ {
+ r.s.m = &m2;
+ r.s.o = s1.o;
+ r.b = 1;
+ }
+ else
+ {
+ r.s.m = 0;
+ r.s.o = 0;
+ r.b = 0;
+ }
+ return r;
+}
+
+void *m (void) __attribute__ ((noinline));
+
+void *
+m (void)
+{
+ return 0;
+}
+
+struct e
+f1 (struct s s1, void *p)
+{
+ struct ret r;
+ void *a;
+ struct s a2;
+
+ r = c (s1, &t5);
+ if (r.b)
+ return f2 (r.s, p);
+ a = m ();
+ a2.m = &m1;
+ a2.o = a;
+ return f2 (a2, p);
+}
+
+static struct e
+f2 (struct s s2, void *p)
+{
+ struct e e1;
+
+ e1 = f3 (s2, p);
+ if (e1.t == &t2 && e1.o == 0)
+ {
+ e1.t = 0;
+ e1.o = 0;
+ }
+ return e1;
+}
+
+static struct e
+f3 (struct s s1, void *p)
+{
+ struct e r;
+
+ f4 (s1, p);
+ r.t = &t3;
+ r.o = 0;
+ return r;
+}
+
+struct s g1;
+void *g2;
+
+static void
+f4 (struct s s1, void *p)
+{
+ g1 = s1;
+ g2 = p;
+ s1.m->m ();
+}
+
+int
+main ()
+{
+ struct s s1;
+
+ s1.m = &m2;
+ s1.o = 0;
+ f1 (s1, 0);
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55555.c b/gcc/testsuite/gcc.dg/torture/pr55555.c
new file mode 100644
index 0000000000..9e4226659d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55555.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+
+double s[4] = { 1.0, 2.0, 3.0, 4.0 }, pol_x[2] = { 5.0, 6.0 };
+
+__attribute__((noinline)) int
+foo (void)
+{
+ double coef_x[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ int lxp = 0;
+ if (lxp <= 1)
+ do
+ {
+ double t = pol_x[lxp];
+ long S;
+ long l = lxp * 4L - 1;
+ for (S = 1; S <= 4; S++)
+ coef_x[S + l] = coef_x[S + l] + s[S - 1] * t;
+ }
+ while (lxp++ != 1);
+ asm volatile ("" : : "r" (coef_x) : "memory");
+ for (lxp = 0; lxp < 8; lxp++)
+ if (coef_x[lxp] != ((lxp & 3) + 1) * (5.0 + (lxp >= 4)))
+ __builtin_abort ();
+ return 1;
+}
+
+int
+main ()
+{
+ asm volatile ("" : : : "memory");
+ if (!foo ())
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55633.c b/gcc/testsuite/gcc.dg/torture/pr55633.c
new file mode 100644
index 0000000000..5d30d61a61
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55633.c
@@ -0,0 +1,39 @@
+/* PR fortran/55633 */
+/* { dg-do run { target int128 } } */
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) void
+bar (__int128_t *x)
+{
+ int c = sizeof (__int128_t) * __CHAR_BIT__;
+ if (c > 127)
+ c = 127;
+ if (*x != c)
+ abort ();
+}
+
+__attribute__((noinline)) void
+foo (void)
+{
+ __int128_t m, ma;
+ ma = 0;
+ m = 0;
+ m = ~m;
+ do
+ {
+ if (m == 0 || ma > 126)
+ break;
+ ma = ma + 1;
+ m = ((__uint128_t) m) >> 1;
+ }
+ while (1);
+ bar (&ma);
+}
+
+int
+main ()
+{
+ foo ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55684.c b/gcc/testsuite/gcc.dg/torture/pr55684.c
new file mode 100644
index 0000000000..7002a3737f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55684.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+
+typedef struct _IO_FILE FILE;
+unsigned long int strtoul(const char *, char **, int);
+char *fgets(char *, int, FILE *);
+struct ihexrec {
+ unsigned char reclen;
+ unsigned char data[256];
+};
+static void srec_readrec(struct ihexrec * srec, char * rec)
+{
+ int i, j;
+ char buf[8];
+ int offset = 0, len;
+ char * e;
+ for (i=0; j<srec->reclen; j++)
+ {
+ if (offset+2 > len)
+ return;
+ for (i=0; i<2; i++)
+ buf[i] = rec[offset++];
+ srec->data[j] = strtoul(buf, &e, 16);
+ }
+ for (i=0; i<2; i++)
+ buf[i] = rec[offset++];
+}
+void srec2b(FILE *inf)
+{
+ char buffer[256];
+ struct ihexrec srec;
+ while (fgets(buffer,256,inf)!=(void *)0)
+ srec_readrec(&srec, buffer);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55687.c b/gcc/testsuite/gcc.dg/torture/pr55687.c
new file mode 100644
index 0000000000..1eab1a4f65
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55687.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+
+typedef struct _IO_FILE FILE;
+typedef short gshort;
+typedef struct _GString GString;
+
+extern char *fgets(char *, int, FILE *);
+
+void verbose_text_loop (void *data)
+{
+ FILE *dev_vcs;
+ char buf[81];
+ GString *buf_str;
+ gshort i, j;
+ while (1)
+ {
+ for (i = 1; i <= 7; i++)
+ {
+ while (fgets (buf, 81, dev_vcs))
+ {
+ for (j = 0; j < __builtin_strlen (buf); j++)
+ if (buf[j] != ' ')
+ break;
+ for (; j < __builtin_strlen (buf); j++)
+ g_string_append_c_inline (buf_str, buf[j]);
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55862.c b/gcc/testsuite/gcc.dg/torture/pr55862.c
new file mode 100644
index 0000000000..eb8dceb9bf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55862.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+
+int g, a, *b;
+
+void f(void)
+{
+ int *p;
+
+ if(g)
+ {
+ int **k = &p;
+
+ for(; g; p++)
+ for(a = 0; a < 1; a++)
+ {
+ int *c = p;
+label2:
+ if(a < 1)
+ *c = 0;
+ }
+
+ goto label1;
+
+ while(g++)
+ for(*b = 0; *b; b++)
+ label1:
+ ;
+ }
+
+ goto label2;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55888.c b/gcc/testsuite/gcc.dg/torture/pr55888.c
new file mode 100644
index 0000000000..e75adcd2c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55888.c
@@ -0,0 +1,116 @@
+/* { dg-do compile } */
+
+typedef unsigned _GCC_ATTR_ALIGN_u32t;
+typedef _GCC_ATTR_ALIGN_u32t _Uint32t __attribute__ ((__aligned__ (4)));
+typedef unsigned int _GCC_ATTR_ALIGN_u8t __attribute__ ((__mode__ (__QI__)));
+typedef _GCC_ATTR_ALIGN_u8t _Uint8t __attribute__ ((__aligned__ (1)));
+typedef unsigned _Sizet;
+typedef _Sizet size_t;
+typedef _Uint8t uint8_t;
+typedef _Uint32t uint32_t;
+typedef enum
+{
+ PROTOBUF_C_LABEL_REQUIRED, PROTOBUF_C_LABEL_OPTIONAL,
+ PROTOBUF_C_LABEL_REPEATED
+}
+ProtobufCLabel;
+typedef enum
+{
+ PROTOBUF_C_TYPE_INT32, PROTOBUF_C_TYPE_SINT32, PROTOBUF_C_TYPE_SFIXED32,
+ PROTOBUF_C_TYPE_INT64, PROTOBUF_C_TYPE_SINT64, PROTOBUF_C_TYPE_SFIXED64,
+ PROTOBUF_C_TYPE_UINT32, PROTOBUF_C_TYPE_FIXED32, PROTOBUF_C_TYPE_UINT64,
+ PROTOBUF_C_TYPE_FIXED64, PROTOBUF_C_TYPE_FLOAT, PROTOBUF_C_TYPE_DOUBLE,
+ PROTOBUF_C_TYPE_BOOL, PROTOBUF_C_TYPE_ENUM, PROTOBUF_C_TYPE_STRING,
+ PROTOBUF_C_TYPE_BYTES, PROTOBUF_C_TYPE_MESSAGE,
+}
+ProtobufCType;
+typedef struct _ProtobufCBinaryData ProtobufCBinaryData;
+struct _ProtobufCBinaryData
+{
+ size_t len;
+};
+typedef struct _ProtobufCMessageDescriptor ProtobufCMessageDescriptor;
+typedef struct _ProtobufCFieldDescriptor ProtobufCFieldDescriptor;
+typedef struct _ProtobufCMessage ProtobufCMessage;
+struct _ProtobufCFieldDescriptor
+{
+ uint32_t id;
+ ProtobufCLabel label;
+ ProtobufCType type;
+ unsigned offset;
+};
+struct _ProtobufCMessageDescriptor
+{
+ unsigned n_fields;
+ const ProtobufCFieldDescriptor *fields;
+};
+struct _ProtobufCMessage
+{
+ const ProtobufCMessageDescriptor *descriptor;
+};
+typedef enum
+{
+ PROTOBUF_C_WIRE_TYPE_VARINT, PROTOBUF_C_WIRE_TYPE_64BIT,
+ PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED, PROTOBUF_C_WIRE_TYPE_START_GROUP,
+ PROTOBUF_C_WIRE_TYPE_END_GROUP, PROTOBUF_C_WIRE_TYPE_32BIT
+}
+ProtobufCWireType;
+static inline size_t
+uint32_pack (uint32_t value, uint8_t * out)
+{
+ unsigned rv = 0;
+ if (value >= 0x80)
+ {
+ if (value >= 0x80)
+ {
+ value >>= 7;
+ }
+ }
+ out[rv++] = value;
+}
+
+static inline size_t
+binary_data_pack (const ProtobufCBinaryData * bd, uint8_t * out)
+{
+ size_t len = bd->len;
+ size_t rv = uint32_pack (len, out);
+ return rv + len;
+}
+
+static size_t
+required_field_pack (const ProtobufCFieldDescriptor * field,
+ const void *member, uint8_t * out)
+{
+ size_t rv = tag_pack (field->id, out);
+ switch (field->type)
+ {
+ case PROTOBUF_C_TYPE_BYTES:
+ {
+ const ProtobufCBinaryData *bd =
+ ((const ProtobufCBinaryData *) member);
+ out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED;
+ return rv + binary_data_pack (bd, out + rv);
+ }
+ case PROTOBUF_C_TYPE_MESSAGE:
+ {
+ out[0] |= PROTOBUF_C_WIRE_TYPE_LENGTH_PREFIXED;
+ return rv +
+ prefixed_message_pack (*(ProtobufCMessage * const *) member,
+ out + rv);
+ }
+ }
+}
+
+size_t
+protobuf_c_message_pack (const ProtobufCMessage * message, uint8_t * out)
+{
+ unsigned i;
+ size_t rv = 0;
+ for (i = 0; i < message->descriptor->n_fields; i++)
+ {
+ const ProtobufCFieldDescriptor *field = message->descriptor->fields + i;
+ const void *member = ((const char *) message) + field->offset;
+ if (field->label == PROTOBUF_C_LABEL_REQUIRED)
+ rv += required_field_pack (field, member, out + rv);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55964-2.c b/gcc/testsuite/gcc.dg/torture/pr55964-2.c
new file mode 100644
index 0000000000..a3bd09d5b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55964-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribution -funswitch-loops" } */
+
+struct test_struct {
+ int a, b[10], c[10], d[10];
+};
+
+extern struct test_struct* new_struct;
+
+void testfunc(struct test_struct* old_struct)
+{
+ int i;
+ for (i = 0; i < 10; ++i)
+ {
+ new_struct->b[i] = old_struct ? old_struct->b[i] : -1;
+ new_struct->c[i] = old_struct ? old_struct->c[i] : 0;
+ new_struct->d[i] = old_struct ? old_struct->d[i] : 0;
+ }
+ if (old_struct)
+ old_struct->a++;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr55964.c b/gcc/testsuite/gcc.dg/torture/pr55964.c
new file mode 100644
index 0000000000..361151ccf0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr55964.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribution -funswitch-loops -w" } */
+
+int a, b;
+
+void f(void)
+{
+lbl1:
+ for(b = 0; b < 1; b++)
+ {
+ int u = 1;
+
+ if((b %= 0) * (b ? 0 : a) - 1 && (u /= 0))
+ {
+ int *q = &u, **k = q;
+ goto lbl1;
+lbl2:
+lbl3:
+ a = **k;
+ goto lbl2;
+ }
+ }
+ goto lbl3;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56034.c b/gcc/testsuite/gcc.dg/torture/pr56034.c
new file mode 100644
index 0000000000..f2b5d3784e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56034.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-loop-distribution" } */
+
+int a, b, *p;
+
+void f(void)
+{
+ int *q;
+
+ while(b++)
+ {
+ int i;
+ p = &i;
+ a = *q;
+ }
+
+ if(a)
+ for(;; b++);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56150.c b/gcc/testsuite/gcc.dg/torture/pr56150.c
new file mode 100644
index 0000000000..6de1115a24
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56150.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+struct {
+ int f4;
+} g1;
+
+long g2;
+
+volatile long g3;
+
+void func_1 ()
+{
+ if (g2)
+ g1 = g1;
+ else
+ g3;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56157.c b/gcc/testsuite/gcc.dg/torture/pr56157.c
new file mode 100644
index 0000000000..796e3235c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56157.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-ftree-vectorize" } */
+
+struct Pixel {
+ unsigned short r;
+ unsigned short g;
+ unsigned short b;
+ unsigned short a;
+};
+
+void fn(unsigned char * __restrict dst, const unsigned char * __restrict src)
+{
+ unsigned x;
+ for(x = 0; x < 1024; x += 1)
+ {
+ struct Pixel pixel;
+ pixel.r = (unsigned short)(((unsigned)src[0]) * 0xffff / 0xff);
+ pixel.g = (unsigned short)(((unsigned)src[1]) * 0xffff / 0xff);
+ pixel.b = (unsigned short)(((unsigned)src[2]) * 0xffff / 0xff);
+ pixel.a = (unsigned short)(((unsigned)src[3]) * 0xffff / 0xff);
+ __builtin_memcpy(dst, &pixel, sizeof pixel);
+ src += 4;
+ dst += 8;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56181.c b/gcc/testsuite/gcc.dg/torture/pr56181.c
new file mode 100644
index 0000000000..c382b29c43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56181.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-ftracer" } */
+
+int a, b;
+
+void f(void)
+{
+ if(a++)
+ {
+ for(a = 0; a < 1;)
+ {
+ for(b = 0; b < 1; b++)
+ {
+ while(a++ < 0);
+lbl:
+ ;
+ }
+
+ if(a)
+ goto lbl;
+ }
+
+ goto lbl;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56195.c b/gcc/testsuite/gcc.dg/torture/pr56195.c
new file mode 100644
index 0000000000..d1949fd0e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56195.c
@@ -0,0 +1,31 @@
+/* PR rtl-optimization/56195 */
+/* { dg-do assemble } */
+
+int i, a, t, b, c, d, e, f, j, *h;
+
+void
+fn (void)
+{
+ if (b)
+ {
+ int *p, *q;
+ char g;
+
+ if (f++)
+ for (;; e++);
+ lbl:
+ for (b = 0; b < 2; b++)
+ t /= d + 1 ? : i || a < c < (d = f) ? : 1 | (j = 2);
+
+ *p = g >= *q ^ c != a ^ *p;
+
+ if (!e)
+ {
+ q = p;
+ goto lbl;
+ }
+ }
+
+ if (h++)
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56264.c b/gcc/testsuite/gcc.dg/torture/pr56264.c
new file mode 100644
index 0000000000..ca5eb47ff6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56264.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-funswitch-loops" } */
+
+int a, b, c;
+
+void f(void)
+{
+ if(b)
+ {
+ for(a = 0; a < 1; a++)
+ lbl:
+ c = c && b ? : 0;
+
+ c = 0;
+ goto lbl;
+ }
+
+ if(a)
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56321.c b/gcc/testsuite/gcc.dg/torture/pr56321.c
new file mode 100644
index 0000000000..a8c4634659
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56321.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-ffast-math" } */
+
+void foo(int n, int nreps, float tdgefa, float tdgesl)
+{
+ float kflops,ops;
+ ops=((2.0*n*n*n)/3.0+2.0*n*n);
+ kflops=2.*nreps*ops/(1000.*(tdgefa+tdgesl));
+
+ __builtin_printf ("%f\n", kflops);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56349.c b/gcc/testsuite/gcc.dg/torture/pr56349.c
new file mode 100644
index 0000000000..dc9ed082b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56349.c
@@ -0,0 +1,41 @@
+/* { dg-do compile } */
+
+int a, b;
+short c;
+
+void f(void)
+{
+ int a = 0;
+ int *k = 0;
+
+ for(; a < 2; a++);
+
+ if(!!(b |= a < 3) - 1)
+ {
+ if(0)
+ for (;; a++)
+ {
+ for (; c; *k = 0);
+lbl1:
+ ;
+ }
+
+ for(; *k; k++)
+ {
+ c = b ? : a;
+
+ if (c)
+ lbl2:
+ b = 0;
+ }
+ goto lbl1;
+ }
+
+ for(;; b++)
+ {
+ if(b)
+ goto lbl2;
+
+ k = &b;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56366.c b/gcc/testsuite/gcc.dg/torture/pr56366.c
new file mode 100644
index 0000000000..15a4300482
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56366.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+int a, *c, d;
+unsigned short b;
+short e;
+
+void f(void)
+{
+ for(;; d++)
+ {
+ for(a = -9; a < 63; a++)
+ for(d = 0; d < 9; d++)
+ b -= --e;
+
+ a = b & *c;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56384.c b/gcc/testsuite/gcc.dg/torture/pr56384.c
new file mode 100644
index 0000000000..ef3cf0536b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56384.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+
+int a, c;
+
+void f(void)
+{
+ unsigned char b;
+
+ if(a)
+ {
+ for(; b < 1; b++);
+lbl1:
+ c = (b |= 0) ^ (b || a);
+ }
+
+ if((a = b))
+ {
+ b = c;
+ goto lbl1;
+ }
+
+ b = 5;
+ goto lbl1;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56407.c b/gcc/testsuite/gcc.dg/torture/pr56407.c
new file mode 100644
index 0000000000..f26fd23f77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56407.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+
+extern void abort(void);
+extern int rand(void);
+
+static void copy(int *r,int *a,int na)
+{
+ int i;
+ for( i = 0 ; i < na ; i++ )
+ r[i] = a[i];
+}
+
+static void foo(int *a,int na)
+{
+ int i;
+ for( i = 0 ; i < na ; i++ )
+ a[i] = rand();
+}
+
+static int cmp(int *a,int *b,int n)
+{
+ int i;
+ for( i = 0 ; i < n ; i++ )
+ if ( a[i] != b[i] )
+ return -1;
+ return 0;
+}
+
+void __attribute__((noinline,noclone))
+test(int sz,int comm)
+{
+ int j,n;
+ int v[64],w[64];
+ for( j = 1 ; j <= sz ; j++ )
+ {
+ n = (2 * j - 1) * (2 * j - 1);
+ foo(w,n);
+ copy(v,w,n);
+ if ( comm )
+ if ( cmp(v,w,n) ) abort ();
+ }
+}
+
+int main()
+{
+ test(2,1);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56420.c b/gcc/testsuite/gcc.dg/torture/pr56420.c
new file mode 100644
index 0000000000..6fa1a803dd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56420.c
@@ -0,0 +1,37 @@
+/* PR middle-end/56420 */
+/* { dg-do run { target int128 } } */
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) __uint128_t
+foo (__uint128_t x)
+{
+ return x * (((__uint128_t) -1) << 63);
+}
+
+__attribute__((noinline, noclone)) __uint128_t
+bar (__uint128_t x)
+{
+ return x * (((__uint128_t) 1) << 63);
+}
+
+__attribute__((noinline, noclone)) __uint128_t
+baz (__uint128_t x)
+{
+ return x * -(((__uint128_t) 1) << 62);
+}
+
+int
+main ()
+{
+ if (foo (1) != (((__uint128_t) -1) << 63)
+ || foo (8) != (((__uint128_t) -1) << 66))
+ abort ();
+ if (bar (1) != (((__uint128_t) 1) << 63)
+ || bar (8) != (((__uint128_t) 1) << 66))
+ abort ();
+ if (baz (1) != -(((__uint128_t) 1) << 62)
+ || baz (8) != ((-(((__uint128_t) 1) << 62)) << 3))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56478.c b/gcc/testsuite/gcc.dg/torture/pr56478.c
new file mode 100644
index 0000000000..506204e8b5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56478.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/56478 */
+/* { dg-do compile } */
+
+int a;
+
+void
+foo ()
+{
+ int b;
+ for (b = 0;; b++)
+ a = 0 < -__LONG_LONG_MAX__ - 1 - b ? : 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56488.c b/gcc/testsuite/gcc.dg/torture/pr56488.c
index 78bac7bede..94add8d9d1 100644
--- a/gcc/testsuite/gcc.dg/torture/pr56488.c
+++ b/gcc/testsuite/gcc.dg/torture/pr56488.c
@@ -1,4 +1,5 @@
-/* { dg-do run } */
+/* { dg-do run { target { size32plus } } } */
+/* { dg-require-effective-target int32plus } */
int a, c, d = 1;
struct S { int s; } b, f;
diff --git a/gcc/testsuite/gcc.dg/torture/pr56661.c b/gcc/testsuite/gcc.dg/torture/pr56661.c
new file mode 100644
index 0000000000..6fdaedb317
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56661.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+
+__attribute__((noinline, noclone)) void
+bar (int *b)
+{
+ b[0] = b[1] = b[2] = 1;
+}
+
+__attribute__((noinline, noclone)) int
+baz (int x)
+{
+ if (x != 1)
+ __builtin_abort ();
+}
+
+void
+foo (int x)
+{
+ if (x == 0)
+ {
+ int *b = __builtin_malloc (3 * sizeof (int));
+ while (b[0])
+ ;
+ }
+ else if (x == 1)
+ {
+ int i, j;
+ int *b = __builtin_malloc (3 * sizeof (int));
+ for (i = 0; i < 2; i++)
+ {
+ bar (b);
+ for (j = 0; j < 3; ++j)
+ baz (b[j]);
+ baz (b[0]);
+ }
+ }
+}
+
+int
+main ()
+{
+ int x = 1;
+ asm volatile ("" : "+r" (x));
+ foo (x);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56689.c b/gcc/testsuite/gcc.dg/torture/pr56689.c
new file mode 100644
index 0000000000..719f528c2c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56689.c
@@ -0,0 +1,46 @@
+/* { dg-do compile } */
+
+extern int baz ();
+extern void bar (void);
+extern void noret (void) __attribute__ ((__noreturn__));
+
+void
+fix_register (const char *name, int fixed, int call_used, int nregs)
+{
+ int i;
+ int reg;
+
+ if ((reg = baz ()) >= 0)
+ {
+ for (i = reg; i < nregs; i++)
+ {
+ if ((i == 15 || i == 11) && (fixed == 0 || call_used == 0))
+ {
+ switch (fixed)
+ {
+ case 0:
+ switch (call_used)
+ {
+ case 1:
+ bar ();
+ break;
+ default:
+ (noret ());
+ }
+ case 1:
+ switch (call_used)
+ {
+ case 1:
+ break;
+ case 0:
+ default:
+ (noret ());
+ }
+ break;
+ default:
+ (noret ());
+ }
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56756.c b/gcc/testsuite/gcc.dg/torture/pr56756.c
new file mode 100644
index 0000000000..470014d266
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56756.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+
+int a, *b;
+
+void f(void)
+{
+ if(a)
+ {
+ int k;
+
+ for(a = 0; a < 1; a++)
+ {
+ int **q;
+ f();
+
+ for(; **q; ++**q)
+ lbl:
+ if(a)
+ {
+ a = 0;
+ goto lbl;
+ }
+
+ b = &k;
+ }
+ }
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr56778.c b/gcc/testsuite/gcc.dg/torture/pr56778.c
new file mode 100644
index 0000000000..48068774af
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr56778.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-march=core-avx2" { target x86_64-*-* } } */
+
+typedef struct {
+ float a,b,c;
+} S;
+
+S * arr[100];
+
+void bar (float *in[], int n)
+{
+ int i;
+ for (i=0; i<n; i++)
+ (*in)[i] = -arr[i]->b;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57026.c b/gcc/testsuite/gcc.dg/torture/pr57026.c
new file mode 100644
index 0000000000..e37895486d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57026.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+typedef struct __jmp_buf_tag { char buf[1024]; } jmp_buf[1];
+extern int setjmp (jmp_buf);
+extern int bar (unsigned int *);
+extern jmp_buf *baz (void);
+struct C { int c1; unsigned int c2, c3, c4; };
+
+void
+foo (struct C *x, const int *y, unsigned int *z, unsigned int e, unsigned int g)
+{
+ unsigned int d = 0;
+ unsigned long f;
+ setjmp (*baz ());
+ f = d;
+ if ((x->c1 || x->c2) && g && (!e || d >= 8))
+ d = 16;
+ else
+ d = 8;
+ if ((!x->c3 && !x->c4 || *y == 0) && !e && bar (z))
+ *z = f;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57036-1.c b/gcc/testsuite/gcc.dg/torture/pr57036-1.c
new file mode 100644
index 0000000000..5aa63bd750
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57036-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+extern void g (void);
+extern __inline __attribute__ ((__always_inline__,__leaf__))
+f ()
+{
+ g ();
+}
+struct __jmp_buf_tag *b;
+int jpgDecode_convert (unsigned i)
+{
+ if (i != 0)
+ f ();
+ read_buf_open ();
+ return _setjmp (b);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57036-2.c b/gcc/testsuite/gcc.dg/torture/pr57036-2.c
new file mode 100644
index 0000000000..25de5cd150
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57036-2.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+
+int j_;
+int jpgDecode_convert (unsigned i)
+{
+ __label__ label;
+ int j;
+
+ inline void __attribute__((always_inline,leaf)) f(void)
+ {
+ g();
+ }
+
+ void __attribute__((noinline)) read_buf_open (void)
+ {
+ goto label;
+ }
+
+ if (i != 0)
+ f ();
+ j = j_;
+ read_buf_open ();
+label:
+ return j;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57075.c b/gcc/testsuite/gcc.dg/torture/pr57075.c
new file mode 100644
index 0000000000..dee74a844b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57075.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+extern int baz (void) __attribute__ ((returns_twice));
+int __attribute__ ((__leaf__))
+foo (void)
+{
+ return __builtin_printf ("$");
+}
+
+void
+bar ()
+{
+ foo ();
+ baz ();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57081.c b/gcc/testsuite/gcc.dg/torture/pr57081.c
new file mode 100644
index 0000000000..0fcbaaa62b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57081.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+int a;
+
+void f(void)
+{
+ int b;
+
+ if(0)
+ lbl:
+ goto lbl;
+
+ if(b)
+ {
+ int p = 0;
+ goto lbl;
+ }
+
+ a = 0;
+ while(b++);
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57083.c b/gcc/testsuite/gcc.dg/torture/pr57083.c
new file mode 100644
index 0000000000..070a53d216
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57083.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/57083 */
+/* { dg-do run { target int32plus } } */
+
+extern void abort (void);
+short x = 1;
+int y = 0;
+
+int
+main ()
+{
+ unsigned t = (0x7fff8001U - x) << (y == 0);
+ if (t != 0xffff0000U)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57122.c b/gcc/testsuite/gcc.dg/torture/pr57122.c
new file mode 100644
index 0000000000..f1b99c8620
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57122.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+
+unsigned a;
+int b, c;
+
+void f(void)
+{
+ if(a)
+ {
+ for(a = 0; a < 2; a++)
+ a /= 7;
+
+ for(;; a++)
+ {
+ if(a)
+ lbl1:
+ b++;
+
+ if(c)
+ goto lbl1;
+lbl2:
+ ;
+ }
+ }
+
+ goto lbl2;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-1.c b/gcc/testsuite/gcc.dg/torture/pr57147-1.c
new file mode 100644
index 0000000000..e5ad544998
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57147-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+
+struct __jmp_buf_tag {};
+typedef struct __jmp_buf_tag jmp_buf[1];
+extern int _setjmp (struct __jmp_buf_tag __env[1]);
+
+jmp_buf g_return_jmp_buf;
+
+void SetNaClSwitchExpectations (void)
+{
+}
+void TestSyscall(void)
+{
+ SetNaClSwitchExpectations();
+ _setjmp (g_return_jmp_buf);
+}
+
+/* { dg-final { scan-tree-dump-not "builtin_unreachable" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-2.c b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
new file mode 100644
index 0000000000..521d126e3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57147-2.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+/* { dg-skip-if "" { *-*-* } { "-fno-fat-lto-objects" } { "" } } */
+
+struct __jmp_buf_tag {};
+typedef struct __jmp_buf_tag jmp_buf[1];
+extern int _setjmp (struct __jmp_buf_tag __env[1]);
+
+jmp_buf g_return_jmp_buf;
+
+void SetNaClSwitchExpectations (void)
+{
+ __builtin_longjmp (g_return_jmp_buf, 1);
+}
+void TestSyscall(void)
+{
+ SetNaClSwitchExpectations();
+ _setjmp (g_return_jmp_buf);
+}
+
+/* { dg-final { scan-tree-dump "setjmp" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pr57147-3.c b/gcc/testsuite/gcc.dg/torture/pr57147-3.c
new file mode 100644
index 0000000000..c64e5adb03
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57147-3.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+typedef char * ptr_t;
+struct __jmp_buf_tag {
+};
+typedef struct __jmp_buf_tag sigjmp_buf[1];
+sigjmp_buf GC_jmp_buf;
+void GC_fault_handler(int sig)
+{
+}
+void GC_setup_temporary_fault_handler() {
+ GC_set_and_save_fault_handler(GC_fault_handler);
+}
+ptr_t GC_find_limit(ptr_t p)
+{
+ GC_setup_temporary_fault_handler();
+ if (__sigsetjmp (GC_jmp_buf, 1) == 0)
+ for (;;)
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57214.c b/gcc/testsuite/gcc.dg/torture/pr57214.c
new file mode 100644
index 0000000000..d51067d95d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57214.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+
+extern int baz (void);
+extern int foo (void) __attribute__ ((returns_twice));
+
+void
+bar (_Bool b)
+{
+ int buf[1];
+ while (1)
+ {
+ _Bool x = 1;
+ if (b)
+ baz ();
+ b = 1;
+ baz ();
+ x = 0;
+ int i;
+ while (buf[i] && i)
+ i++;
+ foo ();
+ if (!x)
+ b = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57251.c b/gcc/testsuite/gcc.dg/torture/pr57251.c
new file mode 100644
index 0000000000..2fe268c36e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57251.c
@@ -0,0 +1,12 @@
+/* PR middle-end/57251 */
+/* { dg-do compile } */
+/* { dg-options "-ftracer" } */
+
+short a, b;
+int
+f (void)
+{
+ long long i = 2;
+ a ? f () ? : 0 : b--;
+ b &= i *= a |= 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57303.c b/gcc/testsuite/gcc.dg/torture/pr57303.c
new file mode 100644
index 0000000000..1ddb5a8aab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57303.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+void abort (void);
+
+struct S0
+{
+ int f0;
+};
+struct S1
+{
+ struct S0 f0;
+};
+
+struct S1 x = { {0} };
+struct S1 y = { {1} };
+
+static void
+foo (struct S0 p)
+{
+ struct S0 *l = &y.f0;
+ *l = x.f0;
+ if (p.f0)
+ *l = *l;
+}
+
+int
+main ()
+{
+ foo(y.f0);
+ if (y.f0.f0 != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57330.c b/gcc/testsuite/gcc.dg/torture/pr57330.c
new file mode 100644
index 0000000000..3e6cbcbd28
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57330.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+
+void foo (int a)
+{}
+
+void *a;
+void bar ()
+{
+ void **( *b ) ( ) = (void**(*)()) foo;
+ a = b (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57341.c b/gcc/testsuite/gcc.dg/torture/pr57341.c
new file mode 100644
index 0000000000..3f5cc8dd72
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57341.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-additional-options "-msse" { target sse2_runtime } } */
+
+int a, d;
+int *b = &a, **c;
+int
+main ()
+{
+ int e;
+ {
+ int f[4];
+ for (d = 0; d < 4; d++)
+ f[d] = 1;
+ e = f[1];
+ }
+ int *g[28] = { };
+ *b = e;
+ c = &g[0];
+ if (a != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57343.c b/gcc/testsuite/gcc.dg/torture/pr57343.c
new file mode 100644
index 0000000000..b05bad5cb4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57343.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+int c = 0;
+
+int
+main ()
+{
+ int i, f = 1;
+ for (i = 0; i < 5; i++)
+ {
+ --c;
+ unsigned char h = c * 100;
+ if (h == 0)
+ {
+ f = 0;
+ break;
+ }
+ }
+ if (f != 1)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57381.c b/gcc/testsuite/gcc.dg/torture/pr57381.c
new file mode 100644
index 0000000000..ff6550a6d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57381.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
+
+struct S0 { int f0, f1, f2; };
+
+struct S1 {
+ int f0;
+ volatile struct S0 f2;
+};
+
+static struct S1 s = {0x47BED265,{0x06D4EB3E,5,0U}};
+
+int foo(struct S0 p)
+{
+ for (s.f2.f2 = 0; (s.f2.f2 <= 12); s.f2.f2++)
+ {
+ volatile int *l_61[5][2][2] = {{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,(void*)0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{&s.f2.f0,&s.f2.f0}},{{&s.f2.f0,&s.f2.f0},{(void*)0,&s.f2.f0}}};
+
+ volatile int **l_68 = &l_61[0][0][1];
+ volatile int *l_76 = &s.f2.f0;
+ (*l_68) = l_61[0][0][0];
+ if ((*l_76 = (p.f2 % 5))) ;
+ }
+ return p.f0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57393-1.c b/gcc/testsuite/gcc.dg/torture/pr57393-1.c
new file mode 100644
index 0000000000..e62d44df48
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57393-1.c
@@ -0,0 +1,15 @@
+/* PR middle-end/57393 */
+/* { dg-do compile } */
+/* { dg-additional-options "-g -ffast-math" } */
+
+extern void bar (double);
+
+struct S { int n; };
+
+void
+foo (struct S s, double a, int i, int j, int k)
+{
+ struct S t;
+ bar (s.n * a * i * j);
+ t.n = s.n * a * i * k;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57393-2.c b/gcc/testsuite/gcc.dg/torture/pr57393-2.c
new file mode 100644
index 0000000000..b9b12ffa55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57393-2.c
@@ -0,0 +1,16 @@
+/* PR middle-end/57393 */
+/* { dg-do compile } */
+
+char a;
+
+foo (int **p)
+{
+ int b;
+ for (;;)
+ {
+ int c[1] = { 0 };
+ unsigned *d = &c[0];
+ for (b = 7; b; b--)
+ **p &= --*d >= a;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57393-3.c b/gcc/testsuite/gcc.dg/torture/pr57393-3.c
new file mode 100644
index 0000000000..34cece06cb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57393-3.c
@@ -0,0 +1,20 @@
+/* PR middle-end/57393 */
+/* { dg-do compile } */
+
+int a, b, c;
+void foo (void);
+
+int
+bar (void)
+{
+ for (;;)
+ {
+ foo ();
+ int d = a = 0;
+ for (; a < 7; ++a)
+ {
+ d--;
+ b &= c <= d;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57417.c b/gcc/testsuite/gcc.dg/torture/pr57417.c
new file mode 100644
index 0000000000..6eac6f932b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57417.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+
+int a, b;
+volatile int *c;
+
+void foo ()
+{
+ volatile int d[1];
+ b = 0;
+ for (;; a--)
+ c = &d[b];
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57425-1.c b/gcc/testsuite/gcc.dg/torture/pr57425-1.c
new file mode 100644
index 0000000000..8ca85cafe6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57425-1.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+
+extern void abort (void) __attribute__((noreturn));
+
+union setconflict
+{
+ int a[20];
+ long b[10];
+};
+
+int
+main ()
+{
+ int sum = 0;
+ {
+ union setconflict a;
+ int *c;
+ c = a.a;
+ asm ("": "=r" (c):"0" (c));
+ *c = 0;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+ {
+ union setconflict a;
+ long *c;
+ c = a.b;
+ asm ("": "=r" (c):"0" (c));
+ *c = 1;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+
+ if (sum != 1)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57425-2.c b/gcc/testsuite/gcc.dg/torture/pr57425-2.c
new file mode 100644
index 0000000000..ccb546e0ee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57425-2.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+extern void abort (void) __attribute__((noreturn));
+
+int
+main ()
+{
+ int sum = 0;
+ {
+ int a[20];
+ int *c;
+ c = a;
+ asm ("": "=r" (c):"0" (c));
+ *c = 0;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+ {
+ long b[10];
+ long *c;
+ c = b;
+ asm ("": "=r" (c):"0" (c));
+ *c = 1;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+
+ if (sum != 1)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57425-3.c b/gcc/testsuite/gcc.dg/torture/pr57425-3.c
new file mode 100644
index 0000000000..8e0c7fe2de
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57425-3.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+extern void abort (void) __attribute__((noreturn));
+
+int
+main ()
+{
+ int sum = 0;
+ {
+ long a[20];
+ long *c;
+ c = a;
+ asm ("": "=r" (c):"0" (c));
+ *c = 0;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+ {
+ long long b[10];
+ long long *c;
+ c = b;
+ asm ("": "=r" (c):"0" (c));
+ *c = 1;
+ asm ("": "=r" (c):"0" (c));
+ sum += *c;
+ }
+
+ if (sum != 1)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57478.c b/gcc/testsuite/gcc.dg/torture/pr57478.c
new file mode 100644
index 0000000000..e81348dfd7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57478.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+typedef struct Node Node;
+
+struct Node
+{
+ Node *Pred, *Suc;
+ Node *SubBestPred;
+ Node *SubBestSuc;
+};
+
+void
+foo (Node *N)
+{
+ do
+ {
+ N->SubBestPred = N->Pred;
+ N->SubBestSuc = N->Suc;
+ }
+ while (N = N->Suc);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57488.c b/gcc/testsuite/gcc.dg/torture/pr57488.c
new file mode 100644
index 0000000000..7eda36476e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57488.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int i, j, *pj = &j, **ppj = &pj;
+int x, *px = &x;
+
+short s, *ps = &s, k;
+
+unsigned short u, *pu = &u, **ppu = &pu;
+
+char c, *pc = &c;
+
+unsigned char v = 48;
+
+static int
+bar (int p)
+{
+ p = k;
+ *px = **ppu = i;
+ *ppj = &p;
+ if (**ppj)
+ *pj = p;
+ return p;
+}
+
+void __attribute__((noinline))
+foo ()
+{
+ for (; i <= 3; i++)
+ for (; j; j--);
+
+ u ^= bar (*pj);
+
+ for (k = 1; k >= 0; k--)
+ {
+ int l;
+ bar (0);
+ for (l = 1; l < 5; l++)
+ {
+ int m;
+ for (m = 6; m; m--)
+ {
+ v--;
+ *ps = *pc;
+ }
+ }
+ }
+}
+
+int
+main ()
+{
+ foo ();
+ if (v != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57517.c b/gcc/testsuite/gcc.dg/torture/pr57517.c
new file mode 100644
index 0000000000..2422d8ee64
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57517.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+
+int x[1024], y[1024], z[1024], w[1024];
+void foo (void)
+{
+ int i;
+ for (i = 1; i < 1024; ++i)
+ {
+ int a = x[i];
+ int b = y[i];
+ int c = x[i-1];
+ int d = y[i-1];
+ if (w[i])
+ z[i] = (a + b) + (c + d);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57521.c b/gcc/testsuite/gcc.dg/torture/pr57521.c
new file mode 100644
index 0000000000..e7832cb00e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57521.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+/* { dg-options "-ftree-loop-if-convert" } */
+
+void abort (void);
+
+int a, b, c, d, o = 1, p;
+short e;
+
+int
+fn1 (int * p1)
+{
+ int f, g, h, j = 0, k = 0, l = 0;
+ unsigned int i;
+ int *m[1] = { &l };
+ for (; b >= 0; b--)
+ {
+ if (*p1)
+ if (j >= 0)
+ {
+ int n = 1;
+ e = 1;
+ h = a ? a : 1 % n;
+ g = h > 0 ? 0 : h + 1;
+ k = c + g;
+ }
+ else
+ continue;
+ else
+ {
+
+ f = d > 0 ? 0 : d + 1;
+ i = f;
+ j = 1 + i;
+ }
+ l++;
+ }
+ return k;
+}
+
+int
+main ()
+{
+ for (;; p++)
+ {
+ fn1 (&o);
+ break;
+ }
+ if (e != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57569.c b/gcc/testsuite/gcc.dg/torture/pr57569.c
new file mode 100644
index 0000000000..f036d559d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57569.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+
+extern void abort (void) __attribute__((noreturn));
+
+struct S { int f0; } a;
+
+int b, e, *d = &b, f;
+
+void
+fn1 ()
+{
+ int **g[9][6];
+ int ***h = &g[6][3];
+ for (; e < 9; e++) {
+ f = 0;
+ for (; f < 6; f++)
+ g[e][f] = &d;
+ }
+ ***h = 0;
+}
+
+void
+fn2 ()
+{
+ fn1 ();
+ struct S c[4][10] = {};
+ a = c[3][9];
+}
+
+int
+main ()
+{
+ fn2 ();
+ if (a.f0 != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57584.c b/gcc/testsuite/gcc.dg/torture/pr57584.c
new file mode 100644
index 0000000000..0e5a29492d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57584.c
@@ -0,0 +1,74 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
+
+typedef int int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned long int uintptr_t;
+typedef uint8_t scm_t_uint8;
+typedef int32_t scm_t_int32;
+typedef uintptr_t scm_t_uintptr;
+typedef scm_t_uintptr scm_t_bits;
+typedef struct scm_unused_struct {
+} *SCM;
+enum scm_tc8_tags {
+ scm_tc8_flag = 4 + 0x00, scm_tc8_char = 4 + 0x08, scm_tc8_unused_0 = 4 + 0x10, scm_tc8_unused_1 = 4 + 0x18 };
+struct __jmp_buf_tag {
+};
+typedef struct __jmp_buf_tag jmp_buf[1];
+typedef struct scm_t_cell {
+} scm_t_cell;
+struct scm_prompt_registers {
+ jmp_buf regs;
+};
+enum {
+ SCM_VM_APPLY_HOOK, SCM_VM_PUSH_CONTINUATION_HOOK, SCM_VM_POP_CONTINUATION_HOOK, SCM_VM_NEXT_HOOK, SCM_VM_ABORT_CONTINUATION_HOOK, SCM_VM_RESTORE_CONTINUATION_HOOK, SCM_VM_NUM_HOOKS, };
+typedef SCM (*scm_t_vm_engine) (SCM vm, SCM program, SCM *argv, int nargs);
+struct scm_vm {
+ scm_t_uint8 *ip;
+ SCM *sp;
+ SCM *fp;
+ int engine;
+ int trace_level;
+};
+static SCM vm_regular_engine (SCM vm, SCM program, SCM *argv, int nargs) {
+}
+static SCM vm_debug_engine (SCM vm, SCM program, SCM *argv, int nargs) {
+ register scm_t_uint8 *ip ;
+ register SCM *sp ;
+ register SCM *fp ;
+ struct scm_vm *vp = ((struct scm_vm *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((vm))))): (((vm)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((vm))))): (((vm)))))))) [((1))]))))));
+ static const void **jump_table_pointer = ((void *)0);
+ const void **jump_table;
+ if (__builtin_expect ((!jump_table_pointer), 0)) {
+ jump_table_pointer[0] = &&l_nop;
+ }
+l_nop:
+ {
+ SCM *old_sp;
+ scm_t_int32 n;
+ old_sp = sp;
+ sp = (fp - 1) + n;
+ if (old_sp < sp) {
+ while (old_sp < sp) *++old_sp = ((SCM) ((((((9)) << 8) + scm_tc8_flag))));
+ }
+ {
+ { if (__builtin_expect ((vp->trace_level > 0), 0)) { { vp->ip = ip; vp->sp = sp; vp->fp = fp; }; vm_dispatch_hook (vm, SCM_VM_NEXT_HOOK); } };
+ };
+ }
+ {
+ SCM k, prompt;
+ if ((_setjmp (((struct scm_prompt_registers*)((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((prompt))))): (((prompt)))))))) [((2))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((prompt))))): (((prompt)))))))) [((2))]))))))->regs))) {
+ { ip = vp->ip; sp = vp->sp; fp = vp->fp; };
+ { { if (__builtin_expect ((vp->trace_level > 0), 0)) { { vp->ip = ip; vp->sp = sp; vp->fp = fp; }; vm_dispatch_hook (vm, SCM_VM_NEXT_HOOK); } }; ; goto *jump_table[(*ip++) & ((1<<8)-1)]; };
+ }
+
+ if (__builtin_expect ((vp->trace_level > 0), 0)) { { vp->ip = ip; vp->sp = sp; vp->fp = fp; }; vm_dispatch_hook (vm, SCM_VM_NEXT_HOOK); } ;
+
+ }
+}
+static const scm_t_vm_engine vm_engines[] = {
+ vm_regular_engine, vm_debug_engine };
+SCM scm_c_vm_run (SCM vm, SCM program, SCM *argv, int nargs) {
+ struct scm_vm *vp = ((struct scm_vm *) ((((scm_t_bits) (0? (*(SCM*)0=((((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((vm))))): (((vm)))))))) [((1))]))): (((SCM *)((scm_t_cell *) (((scm_t_bits) (0? (*(SCM*)0=((((vm))))): (((vm)))))))) [((1))]))))));
+ return vm_engines[vp->engine](vm, program, argv, nargs);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57656.c b/gcc/testsuite/gcc.dg/torture/pr57656.c
new file mode 100644
index 0000000000..4f3645e469
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57656.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-fstrict-overflow" } */
+
+int main (void)
+{
+ int a = -1;
+ int b = __INT_MAX__;
+ int c = 2;
+ int t = 1 - ((a - b) / c); // t = 1 - ( __INT_MIN__ / 2 )
+ if (t != (1 - (-1 - __INT_MAX__) / 2))
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57685.c b/gcc/testsuite/gcc.dg/torture/pr57685.c
new file mode 100644
index 0000000000..75973f2a49
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57685.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+unsigned f(void)
+{
+ unsigned a;
+ int b, c, d, e;
+
+ for(c = 27; c < 40; c++)
+ b |= d |= b;
+
+ if(b)
+ a = e;
+
+ return a;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57748-1.c b/gcc/testsuite/gcc.dg/torture/pr57748-1.c
new file mode 100644
index 0000000000..dc0fcdc3b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57748-1.c
@@ -0,0 +1,49 @@
+/* PR middle-end/57748 */
+/* { dg-do run } */
+/* ICE in expand_assignment:
+ misalignp == true, !MEM_P (to_rtx), offset != 0,
+ => gcc_assert (TREE_CODE (offset) == INTEGER_CST) */
+
+#include <stdlib.h>
+
+extern void abort (void);
+
+typedef long long V
+ __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
+
+typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
+
+struct __attribute__((packed)) T { char c; P s; };
+
+void __attribute__((noinline, noclone))
+check (struct T *t)
+{
+ if (t->s.b[0][0] != 3 || t->s.b[0][1] != 4)
+ abort ();
+}
+
+int __attribute__((noinline, noclone))
+get_i (void)
+{
+ return 0;
+}
+
+void __attribute__((noinline, noclone))
+foo (P *p)
+{
+ V a = { 3, 4 };
+ int i = get_i ();
+ p->b[i] = a;
+}
+
+int
+main ()
+{
+ struct T *t = (struct T *) calloc (128, 1);
+
+ foo (&t->s);
+ check (t);
+
+ free (t);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57748-2.c b/gcc/testsuite/gcc.dg/torture/pr57748-2.c
new file mode 100644
index 0000000000..4e3b4b8846
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57748-2.c
@@ -0,0 +1,43 @@
+/* PR middle-end/57748 */
+/* { dg-do run } */
+/* wrong code in expand_assignment:
+ misalignp == true, !MEM_P (to_rtx),
+ offset == 0, bitpos >= GET_MODE_PRECISION,
+ => result = NULL. */
+
+#include <stdlib.h>
+
+extern void abort (void);
+
+typedef long long V
+ __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
+
+typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
+
+struct __attribute__((packed)) T { char c; P s; };
+
+void __attribute__((noinline, noclone))
+check (struct T *t)
+{
+ if (t->s.b[0][0] != 3 || t->s.b[0][1] != 4)
+ abort ();
+}
+
+void __attribute__((noinline, noclone))
+foo (P *p)
+{
+ V a = { 3, 4 };
+ p->b[0] = a;
+}
+
+int
+main ()
+{
+ struct T *t = (struct T *) calloc (128, 1);
+
+ foo (&t->s);
+ check (t);
+
+ free (t);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57748-3.c b/gcc/testsuite/gcc.dg/torture/pr57748-3.c
new file mode 100644
index 0000000000..5ddb6099c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57748-3.c
@@ -0,0 +1,40 @@
+/* PR middle-end/57748 */
+/* { dg-do run } */
+/* wrong code in expand_expr_real_1. */
+
+#include <stdlib.h>
+
+extern void abort (void);
+
+typedef long long V
+ __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
+
+typedef struct S { V a; V b[0]; } P __attribute__((aligned (1)));
+
+struct __attribute__((packed)) T { char c; P s; };
+
+void __attribute__((noinline, noclone))
+check (P *p)
+{
+ if (p->b[0][0] != 3 || p->b[0][1] != 4)
+ abort ();
+}
+
+void __attribute__((noinline, noclone))
+foo (struct T *t)
+{
+ V a = { 3, 4 };
+ t->s.b[0] = a;
+}
+
+int
+main ()
+{
+ struct T *t = (struct T *) calloc (128, 1);
+
+ foo (t);
+ check (&t->s);
+
+ free (t);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57748-4.c b/gcc/testsuite/gcc.dg/torture/pr57748-4.c
new file mode 100644
index 0000000000..455cb3d327
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57748-4.c
@@ -0,0 +1,40 @@
+/* PR middle-end/57748 */
+/* { dg-do run } */
+/* wrong code in expand_expr_real_1. */
+
+#include <stdlib.h>
+
+extern void abort (void);
+
+typedef long long V
+ __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
+
+typedef struct S { V b[1]; } P __attribute__((aligned (1)));
+
+struct __attribute__((packed)) T { char c; P s; };
+
+void __attribute__((noinline, noclone))
+check (P *p)
+{
+ if (p->b[1][0] != 3 || p->b[1][1] != 4)
+ abort ();
+}
+
+void __attribute__((noinline, noclone))
+foo (struct T *t)
+{
+ V a = { 3, 4 };
+ t->s.b[1] = a;
+}
+
+int
+main ()
+{
+ struct T *t = (struct T *) calloc (128, 1);
+
+ foo (t);
+ check (&t->s);
+
+ free (t);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57864.c b/gcc/testsuite/gcc.dg/torture/pr57864.c
new file mode 100644
index 0000000000..93962c20e3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57864.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+
+union U {
+ double val;
+ union U *ptr;
+};
+
+union U *d;
+double a;
+int b;
+int c;
+
+static void fn1(union U *p1, int p2, _Bool p3)
+{
+ union U *e;
+
+ if (p2 == 0)
+ a = ((union U*)((unsigned long)p1 & ~1))->val;
+
+ if (b) {
+ e = p1;
+ } else if (c) {
+ e = ((union U*)((unsigned long)p1 & ~1))->ptr;
+ d = e;
+ } else {
+ e = 0;
+ d = ((union U*)0)->ptr;
+ }
+
+ fn1 (e, 0, 0);
+ fn1 (0, 0, p3);
+}
+
+void fn2 (void)
+{
+ fn1 (0, 0, 0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp b/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp
new file mode 100644
index 0000000000..d8fd371b09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57993-2.cpp
@@ -0,0 +1,213 @@
+/* This ICEd due to an incomplete fix for PR57993. */
+/* { dg-compile } */
+
+extern "C"
+{
+ extern double sqrt (double __x) throw ();
+ typedef long unsigned int size_t;
+ typedef struct
+ {
+ }
+ __mbstate_t;
+ void *pov_malloc (size_t size, const char *file, int line, const char *msg);
+ typedef struct Object_Struct OBJECT;
+ typedef struct Ray_Struct RAY;
+ typedef struct istack_struct ISTACK;
+ typedef struct istk_entry INTERSECTION;
+ typedef double UV_VECT[2];
+ typedef double VECTOR[3];
+ typedef struct Transform_Struct TRANSFORM;
+ typedef struct Method_Struct METHODS;
+ typedef int (*ALL_INTERSECTIONS_METHOD) (OBJECT *, RAY *, ISTACK *);
+ typedef int (*INSIDE_METHOD) (VECTOR, OBJECT *);
+ typedef void (*NORMAL_METHOD) (VECTOR, OBJECT *, INTERSECTION *);
+ typedef void (*UVCOORD_METHOD) (UV_VECT, OBJECT *, INTERSECTION *);
+ typedef void *(*COPY_METHOD) (OBJECT *);
+ typedef void (*TRANSLATE_METHOD) (OBJECT *, VECTOR, TRANSFORM *);
+ typedef void (*ROTATE_METHOD) (OBJECT *, VECTOR, TRANSFORM *);
+ typedef void (*SCALE_METHOD) (OBJECT *, VECTOR, TRANSFORM *);
+ typedef void (*TRANSFORM_METHOD) (OBJECT *, TRANSFORM *);
+ typedef void (*INVERT_METHOD) (OBJECT *);
+ typedef void (*DESTROY_METHOD) (OBJECT *);
+ struct Method_Struct
+ {
+ ALL_INTERSECTIONS_METHOD All_Intersections_Method;
+ INSIDE_METHOD Inside_Method;
+ NORMAL_METHOD Normal_Method;
+ UVCOORD_METHOD UVCoord_Method;
+ COPY_METHOD Copy_Method;
+ TRANSLATE_METHOD Translate_Method;
+ ROTATE_METHOD Rotate_Method;
+ SCALE_METHOD Scale_Method;
+ TRANSFORM_METHOD Transform_Method;
+ INVERT_METHOD Invert_Method;
+ DESTROY_METHOD Destroy_Method;
+ };
+ typedef struct Bicubic_Patch_Struct BICUBIC_PATCH;
+ typedef struct Bezier_Node_Struct BEZIER_NODE;
+ struct Bezier_Node_Struct
+ {
+ int Node_Type;
+ int Count;
+ };
+ struct Bicubic_Patch_Struct
+ {
+ METHODS *Methods;
+ int Patch_Type, U_Steps, V_Steps;
+ VECTOR Control_Points[4][4];
+ BEZIER_NODE *Node_Tree;
+ };
+ typedef enum
+ {
+ CSV, SYS, PPM, TARGA, PNG, NONE
+ }
+ SHELLDATA;
+ typedef enum STATS
+ {
+ Number_Of_Pixels =
+ 0, Number_Of_Pixels_Supersampled, Number_Of_Samples, Number_Of_Rays,
+ Calls_To_DNoise, Calls_To_Noise, ADC_Saves, Istack_overflows,
+ Ray_RBezier_Tests, Ray_RBezier_Tests_Succeeded, Ray_Bicubic_Tests,
+ Ray_Bicubic_Tests_Succeeded, Ray_Blob_Tests, Ray_Blob_Tests_Succeeded,
+ Blob_Element_Tests, Blob_Element_Tests_Succeeded, Blob_Bound_Tests,
+ Blob_Bound_Tests_Succeeded, Ray_Box_Tests, Ray_Box_Tests_Succeeded,
+ Ray_Cone_Tests, Ray_Cone_Tests_Succeeded, Ray_CSG_Intersection_Tests,
+ Ray_CSG_Intersection_Tests_Succeeded, Ray_CSG_Merge_Tests,
+ Ray_CSG_Merge_Tests_Succeeded, Ray_CSG_Union_Tests,
+ Ray_CSG_Union_Tests_Succeeded, Ray_Disc_Tests, Ray_Disc_Tests_Succeeded,
+ Ray_Fractal_Tests, Ray_Fractal_Tests_Succeeded, Ray_HField_Tests,
+ Ray_HField_Tests_Succeeded, Ray_HField_Box_Tests,
+ Ray_HField_Box_Tests_Succeeded, Ray_HField_Triangle_Tests,
+ Ray_HField_Triangle_Tests_Succeeded, Ray_HField_Block_Tests,
+ Ray_HField_Block_Tests_Succeeded, Ray_HField_Cell_Tests,
+ Ray_HField_Cell_Tests_Succeeded, Ray_IsoSurface_Tests,
+ Ray_IsoSurface_Tests_Succeeded, Ray_IsoSurface_Bound_Tests,
+ Ray_IsoSurface_Bound_Tests_Succeeded, Ray_IsoSurface_Cache,
+ Ray_IsoSurface_Cache_Succeeded, Ray_Lathe_Tests,
+ Ray_Lathe_Tests_Succeeded, Lathe_Bound_Tests,
+ Lathe_Bound_Tests_Succeeded, Ray_Mesh_Tests, Ray_Mesh_Tests_Succeeded,
+ Ray_Plane_Tests, Ray_Plane_Tests_Succeeded, Ray_Polygon_Tests,
+ Ray_Polygon_Tests_Succeeded, Ray_Prism_Tests, Ray_Prism_Tests_Succeeded,
+ Prism_Bound_Tests, Prism_Bound_Tests_Succeeded, Ray_Parametric_Tests,
+ Ray_Parametric_Tests_Succeeded, Ray_Par_Bound_Tests,
+ Ray_Par_Bound_Tests_Succeeded, Ray_Quadric_Tests,
+ Ray_Quadric_Tests_Succeeded, Ray_Poly_Tests, Ray_Poly_Tests_Succeeded,
+ Ray_Sphere_Tests, Ray_Sphere_Tests_Succeeded, Ray_Sphere_Sweep_Tests,
+ Ray_Sphere_Sweep_Tests_Succeeded, Ray_Superellipsoid_Tests,
+ Ray_Superellipsoid_Tests_Succeeded, Ray_Sor_Tests,
+ Ray_Sor_Tests_Succeeded, Sor_Bound_Tests, Sor_Bound_Tests_Succeeded,
+ Ray_Torus_Tests, Ray_Torus_Tests_Succeeded, Torus_Bound_Tests,
+ Torus_Bound_Tests_Succeeded, Ray_Triangle_Tests,
+ Ray_Triangle_Tests_Succeeded, Ray_TTF_Tests, Ray_TTF_Tests_Succeeded,
+ Bounding_Region_Tests, Bounding_Region_Tests_Succeeded,
+ Clipping_Region_Tests, Clipping_Region_Tests_Succeeded,
+ Ray_IsoSurface_Find_Root, Ray_Function_VM_Calls,
+ Ray_Function_VM_Instruction_Est, VBuffer_Tests, VBuffer_Tests_Succeeded,
+ LBuffer_Tests, LBuffer_Tests_Succeeded, Media_Samples, Media_Intervals,
+ Reflected_Rays_Traced, Refracted_Rays_Traced, Transmitted_Rays_Traced,
+ Internal_Reflected_Rays_Traced, Shadow_Cache_Hits,
+ Shadow_Rays_Succeeded, Shadow_Ray_Tests, nChecked, nEnqueued,
+ totalQueues, totalQueueResets, totalQueueResizes, Polynomials_Tested,
+ Roots_Eliminated, MemStat_Smallest_Alloc, MemStat_Largest_Alloc,
+ MemStat_Largest_Mem_Usage, Number_Of_Photons_Shot,
+ Number_Of_Photons_Stored, Number_Of_Global_Photons_Stored,
+ Number_Of_Media_Photons_Stored, Priority_Queue_Add,
+ Priority_Queue_Remove, Gather_Performed_Count, Gather_Expanded_Count,
+ MaxStat
+ }
+ Stats;
+ static int All_Bicubic_Patch_Intersections (OBJECT * Object, RAY * Ray,
+ ISTACK * Depth_Stack);
+ static int Inside_Bicubic_Patch (VECTOR IPoint, OBJECT * Object);
+ static void Bicubic_Patch_Normal (VECTOR Result, OBJECT * Object,
+ INTERSECTION * Inter);
+ static void Bicubic_Patch_UVCoord (UV_VECT Result, OBJECT * Object,
+ INTERSECTION * Inter);
+ static BICUBIC_PATCH *Copy_Bicubic_Patch (OBJECT * Object);
+ static void Translate_Bicubic_Patch (OBJECT * Object, VECTOR Vector,
+ TRANSFORM * Trans);
+ static void Rotate_Bicubic_Patch (OBJECT * Object, VECTOR Vector,
+ TRANSFORM * Trans);
+ static void Scale_Bicubic_Patch (OBJECT * Object, VECTOR Vector,
+ TRANSFORM * Trans);
+ static void Transform_Bicubic_Patch (OBJECT * Object, TRANSFORM * Trans);
+ static void Invert_Bicubic_Patch (OBJECT * Object);
+ static void Destroy_Bicubic_Patch (OBJECT * Object);
+ static METHODS Bicubic_Patch_Methods = {
+ All_Bicubic_Patch_Intersections, Inside_Bicubic_Patch,
+ Bicubic_Patch_Normal, Bicubic_Patch_UVCoord,
+ (COPY_METHOD) Copy_Bicubic_Patch, Translate_Bicubic_Patch,
+ Rotate_Bicubic_Patch, Scale_Bicubic_Patch, Transform_Bicubic_Patch,
+ Invert_Bicubic_Patch, Destroy_Bicubic_Patch
+ };
+ static void bezier_value (VECTOR (*Control_Points)[4][4], double u0,
+ double v0, VECTOR P, VECTOR N)
+ {
+ int i, j;
+ double c, t, ut, vt;
+ double u[4], uu[4], v[4], vv[4];
+ double du[4], duu[4], dv[4], dvv[4];
+ for (i = 1; i < 4; i++)
+ {
+ vv[i] = vv[i - 1] * (1.0 - v0);
+ dvv[i] = -i * vv[i - 1];
+ }
+ for (i = 0; i < 4; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ t = c * ut * (dv[j] * vv[3 - j] + v[j] * dvv[3 - j]);
+ }
+ t = 1.0 / sqrt (t);
+ }
+ }
+ static int intersect_subpatch (BICUBIC_PATCH * Shape, RAY * ray,
+ VECTOR V1[3], double uu[3], double vv[3],
+ double *Depth, VECTOR P, VECTOR N, double *u,
+ double *v)
+ {
+ VECTOR Q, T1;
+ VECTOR B[3], IB[3], NN[3];
+ bezier_value ((VECTOR (*)[4][4]) & Shape->Control_Points, uu[1], vv[1],
+ T1, NN[1]);
+ }
+ static int bezier_tree_walker (RAY * Ray, BICUBIC_PATCH * Shape,
+ BEZIER_NODE * Node, ISTACK * Depth_Stack)
+ {
+ int i, cnt = 0;
+ double Depth, u, v;
+ double uu[3], vv[3];
+ VECTOR N, P;
+ VECTOR V1[3];
+ if (Node->Node_Type == 0)
+ {
+ for (i = 0; i < Node->Count; i++)
+ {
+ }
+ if (intersect_subpatch (Shape, Ray, V1, uu, vv, &Depth, P, N, &u, &v))
+ {
+ }
+ }
+ }
+ static int All_Bicubic_Patch_Intersections (OBJECT * Object, RAY * Ray,
+ ISTACK * Depth_Stack)
+ {
+ int Found, cnt = 0;
+ switch (((BICUBIC_PATCH *) Object)->Patch_Type)
+ {
+ case 1:
+ cnt =
+ bezier_tree_walker (Ray, (BICUBIC_PATCH *) Object,
+ ((BICUBIC_PATCH *) Object)->Node_Tree,
+ Depth_Stack);
+ }
+ }
+ BICUBIC_PATCH *Create_Bicubic_Patch ()
+ {
+ BICUBIC_PATCH *New;
+ New =
+ (BICUBIC_PATCH *) pov_malloc ((sizeof (BICUBIC_PATCH)), "bezier.cpp",
+ 2079, ("bicubic patch"));
+ New->Methods = &Bicubic_Patch_Methods;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr57993.c b/gcc/testsuite/gcc.dg/torture/pr57993.c
new file mode 100644
index 0000000000..e73b73f4fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr57993.c
@@ -0,0 +1,30 @@
+/* This ICEd prior to fixing PR57993. */
+/* { dg-do compile } */
+
+int a, b, c, d;
+char e;
+unsigned g;
+
+void f(void)
+{
+ int h;
+
+ for(; d; d++)
+ if(d)
+lbl:
+ g + a || (d = 0);
+
+ b && (a = e);
+
+ for(h = 0; h < 1; ++h)
+ {
+ h = c ? : (d = 0);
+ g = a = (e | 0);
+ }
+
+ if(a)
+ goto lbl;
+
+ a = e = 0;
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58018.c b/gcc/testsuite/gcc.dg/torture/pr58018.c
new file mode 100644
index 0000000000..52c8e83fa0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58018.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/58018 */
+/* { dg-do compile } */
+
+int a, b, c, d, e;
+
+void
+bar (int p)
+{
+ int f = b;
+ e &= p <= (f ^= 0);
+}
+
+void
+foo ()
+{
+ for (; d; d++)
+ {
+ bar (a && c);
+ bar (0);
+ bar (1);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58041.c b/gcc/testsuite/gcc.dg/torture/pr58041.c
new file mode 100644
index 0000000000..169a71ae7e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58041.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+typedef long long V
+ __attribute__ ((vector_size (2 * sizeof (long long)), may_alias));
+
+struct s
+{
+ char u;
+ V v[2];
+} __attribute__((packed,aligned(1)));
+
+__attribute__((noinline, noclone))
+long long foo(struct s *x, int y, V *z)
+{
+ V a = x->v[y];
+ x->v[y] = *z;
+ return a[1];
+}
+
+struct s a = {0,{{0,0},{0,0}}};
+int main()
+{
+ V v1 = {0,1};
+ V v2 = {0,2};
+
+ if (foo(&a,0,&v1) != 0)
+ __builtin_abort();
+ if (foo(&a,0,&v2) != 1)
+ __builtin_abort();
+ if (foo(&a,1,&v1) != 0)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58079.c b/gcc/testsuite/gcc.dg/torture/pr58079.c
new file mode 100644
index 0000000000..99a30181f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58079.c
@@ -0,0 +1,107 @@
+/* { dg-options "-mlong-calls" { target mips*-*-* } } */
+
+typedef unsigned char u8;
+typedef unsigned short u16;
+typedef unsigned int __kernel_size_t;
+typedef __kernel_size_t size_t;
+struct list_head {
+ struct list_head *next;
+};
+
+struct dmx_ts_feed {
+ int is_filtering;
+};
+struct dmx_section_feed {
+ u16 secbufp;
+ u16 seclen;
+ u16 tsfeedp;
+};
+
+typedef int (*dmx_ts_cb) (
+ const u8 * buffer1,
+ size_t buffer1_length,
+ const u8 * buffer2,
+ size_t buffer2_length
+);
+
+struct dvb_demux_feed {
+ union {
+ struct dmx_ts_feed ts;
+ struct dmx_section_feed sec;
+ } feed;
+ union {
+ dmx_ts_cb ts;
+ } cb;
+ int type;
+ u16 pid;
+ int ts_type;
+ struct list_head list_head;
+};
+
+struct dvb_demux {
+ int (*stop_feed)(struct dvb_demux_feed *feed);
+ struct list_head feed_list;
+};
+
+
+static
+inline
+__attribute__((always_inline))
+u8
+payload(const u8 *tsp)
+{
+ if (tsp[3] & 0x20) {
+ return 184 - 1 - tsp[4];
+ }
+ return 184;
+}
+
+static
+inline
+__attribute__((always_inline))
+int
+dvb_dmx_swfilter_payload(struct dvb_demux_feed *feed, const u8 *buf)
+{
+ int count = payload(buf);
+ int p;
+ if (count == 0)
+ return -1;
+ return feed->cb.ts(&buf[p], count, ((void *)0), 0);
+}
+
+static
+inline
+__attribute__((always_inline))
+void
+dvb_dmx_swfilter_packet_type(struct dvb_demux_feed *feed, const u8 *buf)
+{
+ switch (feed->type) {
+ case 0:
+ if (feed->ts_type & 1) {
+ dvb_dmx_swfilter_payload(feed, buf);
+ }
+ if (dvb_dmx_swfilter_section_packet(feed, buf) < 0)
+ feed->feed.sec.seclen = feed->feed.sec.secbufp = 0;
+ }
+}
+
+static
+void
+dvb_dmx_swfilter_packet(struct dvb_demux *demux, const u8 *buf)
+{
+ struct dvb_demux_feed *feed;
+ int dvr_done = 0;
+
+ for (feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = ((&demux->feed_list)->next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );}); __builtin_prefetch(feed->list_head.next), &feed->list_head != (&demux->feed_list); feed = ({ const typeof( ((typeof(*feed) *)0)->list_head ) *__mptr = (feed->list_head.next); (typeof(*feed) *)( (char *)__mptr - __builtin_offsetof(typeof(*feed),list_head) );})) {
+ if (((((feed)->type == 0) && ((feed)->feed.ts.is_filtering) && (((feed)->ts_type & (1 | 8)) == 1))) && (dvr_done++))
+ dvb_dmx_swfilter_packet_type(feed, buf);
+ else if (feed->pid == 0x2000)
+ feed->cb.ts(buf, 188, ((void *)0), 0);
+ }
+}
+void dvb_dmx_swfilter_packets(struct dvb_demux *demux, const u8 *buf, size_t count)
+{
+ while (count--) {
+ dvb_dmx_swfilter_packet(demux, buf);
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58131.c b/gcc/testsuite/gcc.dg/torture/pr58131.c
new file mode 100644
index 0000000000..3f68d4c528
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58131.c
@@ -0,0 +1,22 @@
+/* PR tree-optimization/58131 */
+/* { dg-do compile } */
+
+short a;
+int b, c, d[1][4][2];
+
+void
+foo (void)
+{
+ int *e;
+ for (b = 1; ; b--)
+ {
+ if (*e)
+ break;
+ for (c = 2; c >= 0; c--)
+ {
+ *e |= d[0][3][b] != a;
+ int *f = &d[0][3][b];
+ *f = 0;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58143-1.c b/gcc/testsuite/gcc.dg/torture/pr58143-1.c
new file mode 100644
index 0000000000..855515edb9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58143-1.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-overflow" } */
+
+extern void abort (void);
+
+int a, b, c, d, e, f, g, h = 1, i;
+
+int foo (int p)
+{
+ return p < 0 && a < - __INT_MAX__ - 1 - p ? 0 : 1;
+}
+
+int *bar ()
+{
+ int j;
+ i = h ? 0 : 1 % h;
+ for (j = 0; j < 1; j++)
+ for (d = 0; d; d++)
+ for (e = 1; e;)
+ return 0;
+ return 0;
+}
+
+int baz ()
+{
+ for (; b >= 0; b--)
+ for (c = 1; c >= 0; c--)
+ {
+ int *k = &c;
+ for (;;)
+ {
+ for (f = 0; f < 1; f++)
+ {
+ g = foo (*k);
+ bar ();
+ }
+ if (*k)
+ break;
+ return 0;
+ }
+ }
+ return 0;
+}
+
+int main ()
+{
+ baz ();
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58143-2.c b/gcc/testsuite/gcc.dg/torture/pr58143-2.c
new file mode 100644
index 0000000000..dd0dae1efe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58143-2.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-overflow" } */
+
+int a, b, d, e, f, *g, h, i;
+volatile int c;
+
+char foo (unsigned char p)
+{
+ return p + 1;
+}
+
+int bar ()
+{
+ for (h = 0; h < 3; h = foo (h))
+ {
+ c;
+ for (f = 0; f < 1; f++)
+ {
+ i = a && 0 < -__INT_MAX__ - h ? 0 : 1;
+ if (e)
+ for (; d;)
+ b = 0;
+ else
+ g = 0;
+ }
+ }
+ return 0;
+}
+
+int main ()
+{
+ bar ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58143-3.c b/gcc/testsuite/gcc.dg/torture/pr58143-3.c
new file mode 100644
index 0000000000..23ae9cd39c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58143-3.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-additional-options "-fstrict-overflow" } */
+
+int a, b, c, d, e;
+
+int
+main ()
+{
+ for (b = 4; b > -30; b--)
+ for (; c;)
+ for (;;)
+ {
+ e = a > __INT_MAX__ - b;
+ if (d)
+ break;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58223.c b/gcc/testsuite/gcc.dg/torture/pr58223.c
new file mode 100644
index 0000000000..978084ad0d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58223.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+
+extern void abort (void);
+int a[2], b;
+
+int main ()
+{
+ for (b = 0; b < 2; b++)
+ {
+ a[0] = 1;
+ a[b] = 0;
+ }
+ if (a[0] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58228.c b/gcc/testsuite/gcc.dg/torture/pr58228.c
new file mode 100644
index 0000000000..d12303a008
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58228.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+extern void abort (void);
+int a[8][8] = {{1}};
+int b, c, d, e;
+
+int main ()
+{
+ for (c = 0; c < 8; c++)
+ for (b = 0; b < 2; b++)
+ a[b + 4][c] = a[c][0];
+ if (a[4][4] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58246.c b/gcc/testsuite/gcc.dg/torture/pr58246.c
new file mode 100644
index 0000000000..5417abf913
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58246.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a, b;
+
+int main ()
+{
+ int t[2] = {1,1};
+
+ for (a = 0; a < 2; a++)
+ {
+ b ^= t[a];
+ t[a] = t[1] = 0;
+ }
+
+ if (b != 1)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58326-1.c b/gcc/testsuite/gcc.dg/torture/pr58326-1.c
new file mode 100644
index 0000000000..3b46eed9ca
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58326-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+
+int a, *d;
+long b;
+short c;
+
+void foo ()
+{
+ int e;
+lbl:
+ for (c = 0; c < 2; c++)
+ {
+ if (1 >> b)
+ break;
+ e = *d;
+ for (; a; a++)
+ {
+ *d = e;
+ if (b)
+ goto lbl;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58326-2.c b/gcc/testsuite/gcc.dg/torture/pr58326-2.c
new file mode 100644
index 0000000000..ddddbbe578
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58326-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+int a, b, c, d;
+
+void foo ()
+{
+ int e;
+
+lbl:
+ for (c = 0; c < 2; c++)
+ {
+ e = d;
+ for (; a; a++)
+ {
+ d = e;
+ if (b)
+ goto lbl;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58417.c b/gcc/testsuite/gcc.dg/torture/pr58417.c
new file mode 100644
index 0000000000..5cb0ddb027
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58417.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+
+long long arr[6] = {0, 1, 2, 3, 4, 5};
+extern void abort (void);
+void __attribute__((noinline,noclone))
+foo (long long sum)
+{
+ asm ("");
+}
+int main()
+{
+ int i, n = 5;
+ long long sum = 0, prevsum = 0;
+
+ for(i = 1; i <= n; i++)
+ {
+ foo (sum);
+ sum = (i - 1) * arr[i] - prevsum;
+ prevsum += arr[i];
+ }
+
+ if (sum != 10)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58539.c b/gcc/testsuite/gcc.dg/torture/pr58539.c
new file mode 100644
index 0000000000..a016150f18
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58539.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-g" } */
+
+int a, b;
+
+extern void baz (int);
+
+int foo (int p)
+{
+ return p ? p : 1;
+}
+
+void bar ()
+{
+ int *c = &a, *d = &a;
+ for (b = 0; b < 12; b++)
+ *d |= 1;
+ foo (*c);
+ baz (*c && 1);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58553.c b/gcc/testsuite/gcc.dg/torture/pr58553.c
new file mode 100644
index 0000000000..542bf3f101
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58553.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+
+#define MAX_LENGTH 96
+#define SEQUENCE_LENGTH 31
+
+static struct {
+ char buf[MAX_LENGTH + 1];
+} u1, u2;
+
+extern void abort (void);
+
+int main ()
+{
+ int i;
+ char c;
+
+ for (i = 0, c = 'A'; i < MAX_LENGTH; i++, c++)
+ {
+ u1.buf[i] = 'a';
+ if (c >= 'A' + SEQUENCE_LENGTH)
+ c = 'A';
+ u2.buf[i] = c;
+ }
+ if (u1.buf[MAX_LENGTH] != '\0')
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58554.c b/gcc/testsuite/gcc.dg/torture/pr58554.c
new file mode 100644
index 0000000000..269171ae94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58554.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+extern void abort (void);
+void __attribute__((noinline,noclone))
+clear_board(unsigned char *board, int board_size)
+{
+ int k;
+ for (k = 0; k < 421; k++)
+ if (k < board_size )
+ board[k] = 3;
+}
+int main()
+{
+ unsigned char board[421];
+ board[420] = 1;
+ clear_board (board, 420);
+ if (board[420] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58626.c b/gcc/testsuite/gcc.dg/torture/pr58626.c
new file mode 100644
index 0000000000..1416384b7a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58626.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a[8][6] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1 };
+int b;
+
+int main(void)
+{
+ for (b = 0; b <= 1; b++) {
+ a[1][3] = 0;
+ int c;
+ for (c = 0; c <= 1; c++) {
+ a[c + 1][b] = a[c + 2][b];
+ }
+ }
+ if (a[1][1] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58670.c b/gcc/testsuite/gcc.dg/torture/pr58670.c
new file mode 100644
index 0000000000..ba9fce71f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58670.c
@@ -0,0 +1,47 @@
+/* PR middle-end/58670 */
+/* { dg-do run { target i?86-*-* x86_64-*-* } } */
+
+#if defined (__i386__) || defined (__x86_64__)
+#define ASM_STR "btsl $1, %0; jc %l[lab]"
+#endif
+
+__attribute__((noinline, noclone)) int
+foo (int a, int b)
+{
+ if (a)
+ return -3;
+#ifdef ASM_STR
+ asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
+ return 0;
+lab:
+#endif
+ return 0;
+}
+
+int
+bar (int a, int b)
+{
+ if (a)
+ return -3;
+#ifdef ASM_STR
+ asm volatile goto (ASM_STR : : "m" (b) : "memory" : lab);
+ return 0;
+lab:
+#endif
+ return 0;
+}
+
+int
+main ()
+{
+ if (foo (1, 0) != -3
+ || foo (0, 3) != 0
+ || foo (1, 0) != -3
+ || foo (0, 0) != 0
+ || bar (1, 0) != -3
+ || bar (0, 3) != 0
+ || bar (1, 0) != -3
+ || bar (0, 0) != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58779.c b/gcc/testsuite/gcc.dg/torture/pr58779.c
new file mode 100644
index 0000000000..b0c0c86951
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58779.c
@@ -0,0 +1,12 @@
+/* { dg-do run } */
+
+int a, c;
+
+int main ()
+{
+ int e = -1;
+ short d = (c <= 0) ^ e;
+ if ((unsigned int) a - (a || d) <= (unsigned int) a)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58830.c b/gcc/testsuite/gcc.dg/torture/pr58830.c
new file mode 100644
index 0000000000..8081f8b2c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58830.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-pre -ftree-partial-pre" } */
+
+extern void abort (void);
+
+int b, c, d, f, g, h, i, j[6], *l = &b, *m, n, *o, r;
+char k;
+
+static int
+foo ()
+{
+ char *p = &k;
+
+ for (; d; d++)
+ if (i)
+ h = 0;
+ else
+ h = c || (r = 0);
+
+ for (f = 0; f < 2; f++)
+ {
+ unsigned int q;
+ *l = 0;
+ if (n)
+ *m = g;
+ if (g)
+ o = 0;
+ for (q = -8; q >= 5; q++)
+ (*p)--;
+ }
+
+ return 0;
+}
+
+int
+main ()
+{
+ foo ();
+ if (j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[j[0]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]]] ^ (k & 15)] != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58921.c b/gcc/testsuite/gcc.dg/torture/pr58921.c
new file mode 100644
index 0000000000..7d7c98514d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58921.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+int a[7];
+int b;
+
+void
+fn1 ()
+{
+ for (; b; b++)
+ a[b] = ((a[b] <= 0) == (a[0] != 0));
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58941.c b/gcc/testsuite/gcc.dg/torture/pr58941.c
new file mode 100644
index 0000000000..c0eea07316
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58941.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+typedef struct {
+ int msgLength;
+ unsigned char data[1000];
+} SMsg;
+
+typedef struct {
+ int dummy;
+ int d[0];
+} SData;
+
+int condition = 3;
+
+int main()
+{
+ SMsg msg;
+ SData *pData = (SData*)(msg.data);
+ unsigned int i = 0;
+ for (i = 0; i < 1; i++)
+ {
+ pData->d[i] = 0;
+ if(condition & 1)
+ pData->d[i] |= 0x55;
+ if(condition & 2)
+ pData->d[i] |= 0xaa;
+ }
+ if (pData->d[0] != 0xff)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58955-1.c b/gcc/testsuite/gcc.dg/torture/pr58955-1.c
new file mode 100644
index 0000000000..a79f42f0b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58955-1.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a, b, c, d[4] = { 0, 0, 0, 1 };
+
+int
+main ()
+{
+ for (; a < 4; a++)
+ {
+ int e = d[a];
+ for (c = 1; c < 1; c++);
+ b = e;
+ d[a] = 0;
+ }
+ if (b != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58955-2.c b/gcc/testsuite/gcc.dg/torture/pr58955-2.c
new file mode 100644
index 0000000000..a43860e9b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58955-2.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a, b[10];
+
+int
+main ()
+{
+ for (; a < 2; a++)
+ {
+ b[a] = 1;
+ b[a + 1] = 0;
+ }
+ if (b[1] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr58956.c b/gcc/testsuite/gcc.dg/torture/pr58956.c
new file mode 100644
index 0000000000..7576ba7fb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr58956.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+struct S
+{
+ int f0;
+} a = {1}, b, g, *c = &b, **f = &c;
+
+int *d, **e = &d, h;
+
+struct S
+foo ()
+{
+ *e = &h;
+ if (!d)
+ __builtin_unreachable ();
+ *f = &g;
+ return a;
+}
+
+int
+main ()
+{
+ struct S *i = c;
+ *i = foo ();
+ if (b.f0 != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59006.c b/gcc/testsuite/gcc.dg/torture/pr59006.c
new file mode 100644
index 0000000000..34de83dac8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59006.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+int a[8], b;
+void fn1(void)
+{
+ int c;
+ for (; b; b++)
+ {
+ int d = a[b];
+ c = a[0] ? d : 0;
+ a[b] = c;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59038.c b/gcc/testsuite/gcc.dg/torture/pr59038.c
new file mode 100644
index 0000000000..1694eca430
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59038.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+unsigned char first_ones_8bit[256];
+unsigned char connected_passed[256];
+
+int
+main ()
+{
+ int i, j;
+ for (i=0;i<256;i++){
+ connected_passed[i]=0;
+ first_ones_8bit[i]=0;
+ for (j=7;j>0;j--){
+ if ((i & (3<<(7-j))) == (3<<(7-j))){
+ connected_passed[i]=j;
+ break;
+ }
+ }
+ }
+ if (connected_passed[3] != 7)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59047.c b/gcc/testsuite/gcc.dg/torture/pr59047.c
new file mode 100644
index 0000000000..fcedfcba87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59047.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+struct
+{
+ int f0;
+ int f1:1;
+ int f2:2;
+} a = {0, 0, 1};
+
+int b, c, *d, e, f;
+
+int
+fn1 ()
+{
+ for (; b < 1; ++b)
+ {
+ for (e = 0; e < 1; e = 1)
+ {
+ int **g = &d;
+ *g = &c;
+ }
+ *d = 0;
+ f = a.f1;
+ if (f)
+ return 0;
+ }
+ return 0;
+}
+
+int
+main ()
+{
+ fn1 ();
+ if (b != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59058.c b/gcc/testsuite/gcc.dg/torture/pr59058.c
new file mode 100644
index 0000000000..b3a5a3960c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59058.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+short b = 0;
+
+int
+main ()
+{
+ int c = 0;
+l1:
+ b++;
+ c |= b;
+ if (b)
+ goto l1;
+ if (c != -1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59139.c b/gcc/testsuite/gcc.dg/torture/pr59139.c
new file mode 100644
index 0000000000..4ec9177ffe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59139.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+
+int a, b, c, d, e;
+int fn1(p1, p2) { return p2 == 0 ? p1 : 1 % p2; }
+
+void fn2()
+{
+ c = 0;
+ for (;; c = (unsigned short)c)
+ {
+ b = 2;
+ for (; b; b = a)
+ {
+ e = fn1(2, c && 1);
+ d = c == 0 ? e : c;
+ if (d)
+ return;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59164.c b/gcc/testsuite/gcc.dg/torture/pr59164.c
new file mode 100644
index 0000000000..1ec69610c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59164.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+int a, d, e;
+long b[10];
+int c[10][8];
+
+int fn1(p1)
+{
+ return 1 >> p1;
+}
+
+void fn2(void)
+{
+ int f;
+ for (a=1; a <= 4; a++)
+ {
+ f = fn1(0 < c[a][0]);
+ if (f || d)
+ e = b[a] = 1;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59166.c b/gcc/testsuite/gcc.dg/torture/pr59166.c
new file mode 100644
index 0000000000..d29ec33e0f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59166.c
@@ -0,0 +1,37 @@
+/* PR rtl-optimization/59166 */
+/* { dg-additional-options "-fcompare-debug" } */
+
+int a, b, c, f, g;
+
+void
+foo ()
+{
+ for (; b; b++)
+ for (; f; f = g)
+ for (; a;)
+ ;
+}
+
+static int
+bar (int p)
+{
+ short d;
+ if (c)
+ {
+ for (; f; f = g);
+ foo ();
+ d = p;
+ char e = d;
+ if (p)
+ return 1;
+ }
+ return p;
+}
+
+int
+main ()
+{
+ bar (0);
+ bar (g);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59216.c b/gcc/testsuite/gcc.dg/torture/pr59216.c
new file mode 100644
index 0000000000..0de51bac95
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59216.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+
+#include <limits.h>
+
+extern void abort (void);
+extern void exit (int);
+
+long long __attribute__((noinline)) f(int a)
+{
+ return -(long long) a;
+}
+
+int
+main()
+{
+ if (f(0) != 0)
+ abort ();
+
+ if (f(1) != -(long long)1)
+ abort ();
+
+ if (f(-1) != -(long long)-1)
+ abort ();
+
+ if (f(INT_MIN) != -(long long)INT_MIN)
+ abort ();
+
+ if (f(INT_MAX) != -(long long)INT_MAX)
+ abort ();
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59245.c b/gcc/testsuite/gcc.dg/torture/pr59245.c
new file mode 100644
index 0000000000..e5b9a0fb48
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59245.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+
+int a, b, c, e, g;
+char d[5], f;
+
+int
+fn1 ()
+{
+ if (b)
+ {
+ g = 0;
+ return 0;
+ }
+ for (f = 0; f != 1; f--)
+ ;
+ return 0;
+}
+
+void
+fn2 ()
+{
+ d[4] = -1;
+ for (a = 4; a; a--)
+ {
+ fn1 ();
+ e = c < -2147483647 - 1 - d[a] ? c : 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59288.c b/gcc/testsuite/gcc.dg/torture/pr59288.c
new file mode 100644
index 0000000000..8331e73289
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59288.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+void
+baz (int *d)
+{
+ long int i, j, k;
+ for (i = 0, j = 0, k = 0; i < 512; i = (int) i + 1, j = (int) j + 1, k = (int) k + 3)
+ d[i] = j ^ (i * 3) ^ (2 * k + 2);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59330.c b/gcc/testsuite/gcc.dg/torture/pr59330.c
new file mode 100644
index 0000000000..74b832ea31
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59330.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+
+void free(void *ptr)
+{
+}
+
+void *foo(void)
+{
+ return 0;
+}
+
+int main(void)
+{
+ void *p = foo();
+ free(p);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59338.c b/gcc/testsuite/gcc.dg/torture/pr59338.c
new file mode 100644
index 0000000000..481c84d4ee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59338.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+
+typedef enum
+{
+ XYZZY,
+} enumType;
+
+typedef struct
+{
+ unsigned char More : 1;
+} tResp;
+
+typedef struct
+{
+ enumType QueryType;
+ union
+ {
+ tResp l[0];
+ } u;
+} tQResp;
+
+void test(void)
+{
+ tQResp *qResp = (0);
+ if (qResp->u.l[0].More == 0)
+ return;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59374-1.c b/gcc/testsuite/gcc.dg/torture/pr59374-1.c
new file mode 100644
index 0000000000..6230ae9ca3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59374-1.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-slp-vectorize" } */
+
+extern void abort (void);
+
+static struct X { void *a; void *b; } a, b;
+
+void __attribute__((noinline))
+foo (void)
+{
+ void *tem = a.b;
+ a.b = (void *)0;
+ b.b = tem;
+ b.a = a.a;
+}
+
+int main()
+{
+ a.b = &a;
+ foo ();
+ if (b.b != &a)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59374-2.c b/gcc/testsuite/gcc.dg/torture/pr59374-2.c
new file mode 100644
index 0000000000..d791b987ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59374-2.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-additional-options "-ftree-slp-vectorize" } */
+
+extern void abort (void);
+
+static struct X { void *a; void *b; } a, b;
+static struct X *p;
+
+void __attribute__((noinline))
+foo (void)
+{
+ void *tem = a.b;
+ p->b = (void *)0;
+ b.b = tem;
+ b.a = a.a;
+}
+
+int main()
+{
+ p = &a;
+ a.b = &a;
+ foo ();
+ if (b.b != &a)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59374-3.c b/gcc/testsuite/gcc.dg/torture/pr59374-3.c
new file mode 100644
index 0000000000..ab0014d8f1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59374-3.c
@@ -0,0 +1,21 @@
+extern void abort (void);
+
+static struct X { void *a; void *b; } a, b;
+
+void __attribute__((noinline)) foo (void)
+{
+ void *tem = a.b;
+ a.b = (void *)0;
+ b.b = tem;
+ b.a = a.a;
+ a.a = tem;
+}
+
+int main()
+{
+ a.b = &a;
+ foo ();
+ if (b.b != &a)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59651.c b/gcc/testsuite/gcc.dg/torture/pr59651.c
new file mode 100644
index 0000000000..7139ba9bf5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59651.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/59561 */
+/* { dg-do run } */
+
+extern void abort (void);
+int a[] = { 0, 0, 0, 0, 0, 0, 0, 6 };
+
+int b;
+int
+main ()
+{
+ for (;;)
+ {
+ for (b = 7; b; --b)
+ a[b] = a[7] > 1;
+ break;
+ }
+ if (a[1] != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59715.c b/gcc/testsuite/gcc.dg/torture/pr59715.c
new file mode 100644
index 0000000000..19c09de55d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59715.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a = 2, b;
+
+int
+main ()
+{
+ int c;
+ if (!b)
+ {
+ b = a;
+ c = a == 0 ? 1 : 1 % a;
+ if (c)
+ b = 0;
+ }
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59891.c b/gcc/testsuite/gcc.dg/torture/pr59891.c
new file mode 100644
index 0000000000..1562acccf6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59891.c
@@ -0,0 +1,9 @@
+/* PR c/59891 */
+
+unsigned int a;
+
+int
+main ()
+{
+ return (0 ? a : 0) ? : 0 % 0; /* { dg-warning "division by zero" } */
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59903.c b/gcc/testsuite/gcc.dg/torture/pr59903.c
new file mode 100644
index 0000000000..01772df611
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59903.c
@@ -0,0 +1,56 @@
+/* { dg-do compile } */
+
+int a, b, c, d, e, f, g, h, i[3], l, m, n, o, p, q, r;
+
+struct S0
+{
+ int f0;
+ int f1;
+ int f2;
+ int f3;
+} j;
+
+static int
+fn1 (int p1)
+{
+ return p1 || ((p1 > 0) > (e << 1));
+}
+
+static struct S0
+fn2 (struct S0 p1)
+{
+ char s;
+ struct S0 t = {0,0,0,0};
+ int u = 2;
+ for (;;)
+ {
+ if (i[0])
+ break;
+ for (m = 0; m < 4; m++)
+ for (p1.f0 = 0; p1.f0 < 3; p1.f0++)
+ {
+ j = t;
+ t.f3 = i[p1.f0];
+ o = b || 1 >> b ? 0 : a < 0;
+ q = 1 % d;
+ if ((g < fn1 ((1 ^ (q & 1)) | n)) ^ u)
+ j.f3 |= p % 2;
+ s = j.f3 > 0 ? j.f3 : j.f3 << 1;
+ r = l = s && p1.f1 * c;
+ h = p1.f1;
+ }
+ }
+ return p1;
+}
+
+int
+main ()
+{
+ for (;f;)
+ {
+ struct S0 v = {0,0,0,0};
+ fn2 (v);
+ j.f3 = 0;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59990.c b/gcc/testsuite/gcc.dg/torture/pr59990.c
new file mode 100644
index 0000000000..e54f9b7efb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59990.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+unsigned char value[4] = { 66, 9, 160, 255 };
+
+int main (void)
+{
+ volatile float f;
+ unsigned char a[4];
+
+ __builtin_memcpy ((void *)&f, value, 4);
+ __builtin_memcpy (a, (void *)&f, 4);
+ if (a[2] != 160)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr59993.c b/gcc/testsuite/gcc.dg/torture/pr59993.c
new file mode 100644
index 0000000000..be55a10b9f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr59993.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+
+#include <setjmp.h>
+
+extern int optind;
+jmp_buf jump_buf;
+int
+main (int argc, char **argv)
+{
+ foo (jump_buf, setjmp(jump_buf));
+ argv += optind;
+ bar(argv[1]);
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60092.c b/gcc/testsuite/gcc.dg/torture/pr60092.c
new file mode 100644
index 0000000000..337ff52955
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60092.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-require-weak "" } */
+/* { dg-skip-if "No undefined weak" { hppa*-*-hpux* && { ! lp64 } } } */
+/* { dg-additional-options "-Wl,-undefined,dynamic_lookup" { target *-*-darwin* } } */
+/* { dg-additional-options "-Wl,-flat_namespace" { target *-*-darwin[89]* } } */
+/* { dg-xfail-run-if "posix_memalign modifies first arg on error" { *-*-solaris2.11* } { "-O0" } } */
+
+typedef __SIZE_TYPE__ size_t;
+extern int posix_memalign(void **memptr, size_t alignment, size_t size) __attribute__((weak));
+extern void abort(void);
+int
+main (void)
+{
+ void *p;
+ int ret;
+
+ if (!posix_memalign)
+ return 0;
+
+ p = (void *)&ret;
+ ret = posix_memalign (&p, sizeof (void *), -1);
+ if (p != (void *)&ret)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60115.c b/gcc/testsuite/gcc.dg/torture/pr60115.c
new file mode 100644
index 0000000000..cf7f45dfb0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60115.c
@@ -0,0 +1,14 @@
+/* { dg-do run } */
+
+int a, b[2];
+
+int
+main ()
+{
+lbl:
+ for (; a; a--)
+ if (b[10000])
+ goto lbl;
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60183.c b/gcc/testsuite/gcc.dg/torture/pr60183.c
new file mode 100644
index 0000000000..3f676637ba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60183.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-require-effective-target size32plus } */
+
+/* Large so an out-of-bound read will crash. */
+unsigned char c[0x30001] = { 1 };
+int j = 2;
+
+static void
+foo (unsigned long *x, unsigned char *y)
+{
+ int i;
+ unsigned long w = x[0];
+ for (i = 0; i < j; i++)
+ {
+ w += *y;
+ y += 0x10000;
+ w += *y;
+ y += 0x10000;
+ }
+ x[1] = w;
+}
+
+__attribute__ ((noinline, noclone)) void
+bar (unsigned long *x)
+{
+ foo (x, c);
+}
+
+int
+main ()
+{
+ unsigned long a[2] = { 0, -1UL };
+ asm volatile (""::"r" (c):"memory");
+ c[0] = 0;
+ bar (a);
+ if (a[1] != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60733.c b/gcc/testsuite/gcc.dg/torture/pr60733.c
new file mode 100644
index 0000000000..49cc59ea33
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60733.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+
+int a, d, e, f, g, h, i, j, k;
+unsigned short b;
+
+short
+fn1 (int p1, int p2)
+{
+ return p1 * p2;
+}
+
+int
+main ()
+{
+ for (; a; a--)
+ {
+ int l = 0;
+ if (f >= 0)
+ {
+ for (; h;)
+ e = 0;
+ for (; l != -6; l--)
+ {
+ j = fn1 (b--, d);
+ for (g = 0; g; g = 1)
+ ;
+ k = e ? 2 : 0;
+ }
+ i = 0;
+ for (;;)
+ ;
+ }
+ }
+ d = 0;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60766.c b/gcc/testsuite/gcc.dg/torture/pr60766.c
new file mode 100644
index 0000000000..6f16e3b740
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60766.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+int m = 9;
+
+int main()
+{
+ int n, x;
+
+ n = m;
+ for (x = 0; x <= n; x++)
+ if (n == x + (x + 1) + (x + 2))
+ return 0;
+
+ __builtin_abort();
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60891.c b/gcc/testsuite/gcc.dg/torture/pr60891.c
new file mode 100644
index 0000000000..c8fec87ea8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60891.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fno-tree-ch -fno-tree-cselim -fno-tree-dominator-opts" } */
+
+int a, b, c, d, e, f;
+
+void foo (int x)
+{
+ for (;;)
+ {
+ int g = c;
+ if (x)
+ {
+ if (e)
+ while (a)
+ --f;
+ }
+ for (b = 5; b; b--)
+ {
+ }
+ if (!g)
+ x = 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60903.c b/gcc/testsuite/gcc.dg/torture/pr60903.c
new file mode 100644
index 0000000000..5d93ae3ee9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60903.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+extern int a, b, k, q;
+
+void
+foo ()
+{
+ if (a)
+ {
+ while (q)
+ {
+ lbl:
+ if (a)
+ {
+ a = 0;
+ goto lbl;
+ }
+ }
+ b = k;
+ }
+ goto lbl;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr60930.c b/gcc/testsuite/gcc.dg/torture/pr60930.c
new file mode 100644
index 0000000000..5e35f19882
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr60930.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+int x = 1;
+
+__attribute__((noinline, noclone)) void
+foo (unsigned long long t)
+{
+ asm volatile ("" : : "r" (&t));
+ if (t == 1)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+#if __SIZEOF_LONG_LONG__ >= 8
+ unsigned long long t = 0xffffffffffffffffULL * (0xffffffffUL * x);
+ if (t != 0xffffffff00000001ULL)
+ foo (t);;
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr61010.c b/gcc/testsuite/gcc.dg/torture/pr61010.c
new file mode 100644
index 0000000000..ed5653982c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61010.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+int main (void)
+{
+ int a = 0;
+ unsigned b = (a * 64 & 192) | 63U;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr61383-1.c b/gcc/testsuite/gcc.dg/torture/pr61383-1.c
new file mode 100644
index 0000000000..d9a0a0b398
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61383-1.c
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+
+int a, b = 1, c, d, e, f, g;
+
+int
+fn1 ()
+{
+ int h;
+ for (;;)
+ {
+ g = b;
+ g = g ? 0 : 1 % g;
+ e = a + 1;
+ for (; d < 1; d = e)
+ {
+ if (f == 0)
+ h = 0;
+ else
+ h = 1 % f;
+ if (f < 1)
+ c = 0;
+ else if (h)
+ break;
+ }
+ if (b)
+ return 0;
+ }
+}
+
+int
+main ()
+{
+ fn1 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr61452.c b/gcc/testsuite/gcc.dg/torture/pr61452.c
new file mode 100644
index 0000000000..a62de30fd8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61452.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+
+int a, b;
+short c, d;
+char e, f;
+
+int
+fn1 (int p1, char p2)
+{
+ return p1 || p2 ? 0 : p2;
+}
+
+void
+fn2 ()
+{
+ for (; a;)
+ {
+ int g;
+ g = c = e;
+ for (; a;)
+ b = fn1 (g = d = e, g);
+ f = g;
+ }
+}
+
+int
+main ()
+{
+ fn2 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr61681.c b/gcc/testsuite/gcc.dg/torture/pr61681.c
new file mode 100644
index 0000000000..226de0c1aa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61681.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+int a = 1, *e = &a, **f = &e, *l, *p, j;
+static int b;
+long d;
+short g;
+
+void
+fn1 (int *p)
+{
+ int m;
+ if (!(*p & j))
+ {
+ int *n = &m;
+ for (d = 6; d; d--)
+ {
+ for (g = 0; g < 1; g++)
+ {
+ n = l = *f;
+ b = *p;
+ }
+ *n = 0;
+ }
+ }
+}
+
+int
+main ()
+{
+ p = *f;
+ fn1 (p);
+ if (b != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr61964.c b/gcc/testsuite/gcc.dg/torture/pr61964.c
new file mode 100644
index 0000000000..a03cfdc37b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr61964.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+struct node { struct node *next, *prev; } node;
+struct head { struct node *first; } heads[5];
+int k = 2;
+struct head *head = &heads[2];
+
+static int __attribute__((noinline))
+foo()
+{
+ node.prev = (void *)head;
+ head->first = &node;
+
+ struct node *n = head->first;
+ struct head *h = &heads[k];
+
+ if (n->prev == (void *)h)
+ h->first = n->next;
+ else
+ n->prev->next = n->next;
+
+ n->next = h->first;
+ return n->next == &node;
+}
+
+int main()
+{
+ if (foo ())
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr62031.c b/gcc/testsuite/gcc.dg/torture/pr62031.c
new file mode 100644
index 0000000000..f0dcef44b1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr62031.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+
+#include <stdlib.h>
+
+#define NUM_OF_STATES 4
+typedef unsigned int entry_t[2];
+typedef struct entries_item { entry_t metricEntries_[0]; } entries_item_t;
+
+void __attribute__((noinline,noclone))
+test_00(size_t numOfStates, entries_item_t* p_bm,
+ const unsigned int* polyArray,
+ size_t polyArraySize)
+{
+ size_t idx;
+ unsigned int hlp0, hlp1;
+ for (idx = 0; idx < numOfStates; ++idx)
+ {
+ size_t idy;
+
+ hlp0 = (idx << 1) | 0x00;
+ hlp1 = (idx << 1) | 0x01;
+ p_bm->metricEntries_[idx][0] = 0;
+ p_bm->metricEntries_[idx][1] = 0;
+ for (idy = 0; idy < polyArraySize; ++idy)
+ {
+ p_bm->metricEntries_[idx][0]
+ |= __builtin_parity(hlp0 & polyArray[idy]) << idy;
+ p_bm->metricEntries_[idx][1]
+ |= __builtin_parity(hlp1 & polyArray[idy]) << idy;
+ }
+ }
+}
+
+int main()
+{
+ unsigned int polyArray[] = { 0x07, 0x05 };
+ entries_item_t* pBranchMetrics;
+ pBranchMetrics = malloc(sizeof(entry_t) * NUM_OF_STATES);
+ test_00(NUM_OF_STATES, pBranchMetrics, polyArray,
+ sizeof(polyArray) / sizeof(polyArray[0]));
+ if (pBranchMetrics->metricEntries_[0][0] != 0
+ || pBranchMetrics->metricEntries_[0][1] != 3
+ || pBranchMetrics->metricEntries_[1][0] != 1
+ || pBranchMetrics->metricEntries_[1][1] != 2
+ || pBranchMetrics->metricEntries_[2][0] != 3
+ || pBranchMetrics->metricEntries_[2][1] != 0
+ || pBranchMetrics->metricEntries_[3][0] != 2
+ || pBranchMetrics->metricEntries_[3][1] != 1)
+ abort ();
+ free(pBranchMetrics);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pr63380-1.c b/gcc/testsuite/gcc.dg/torture/pr63380-1.c
new file mode 100644
index 0000000000..29deface81
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr63380-1.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+
+int a = 0, b = 1, c = 0, d = 1, e, f, g, h;
+int
+main ()
+{
+ e = 1 >> d;
+ f = ((31 / (1 > e)) || c) / 2;
+ g = b || a;
+ h = 31 / g;
+ if (!h)
+ __builtin_abort();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/torture/pr63380-2.c b/gcc/testsuite/gcc.dg/torture/pr63380-2.c
new file mode 100644
index 0000000000..f4cbc43eb7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/pr63380-2.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+
+int a = 0, b = 0, c = 0, d, e;
+int
+main (void)
+{
+ d = ((20 % (1 != b)) && c) + 2147483647;
+ e = 20 % (a >= 0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
index 93e7d2bed6..5ca71c2a02 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-callused-1.c
@@ -21,5 +21,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "p.._., points-to vars: { i j }" "alias" } } */
+/* { dg-final { scan-tree-dump "p.._. = { i j }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pta-escape-1.c b/gcc/testsuite/gcc.dg/torture/pta-escape-1.c
index dbfd4c9d38..d3cb25437c 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-escape-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-escape-1.c
@@ -9,7 +9,7 @@ bar (void)
*p = 1;
}
int __attribute__((noinline,noclone))
-foo (__SIZE_TYPE__ addr)
+foo (__INTPTR_TYPE__ addr)
{
int i;
/* q points to ANYTHING */
@@ -25,7 +25,7 @@ extern void abort (void);
int
main()
{
- if (foo ((__SIZE_TYPE__)&p) != 1)
+ if (foo ((__INTPTR_TYPE__)&p) != 1)
abort ();
return 0;
}
diff --git a/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c b/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
index 03f23937b9..938fb296b4 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-ptrarith-3.c
@@ -33,5 +33,5 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { i j k }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_. = { i j k }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c b/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
index 97e8946da5..4846dd6987 100644
--- a/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
+++ b/gcc/testsuite/gcc.dg/torture/pta-structcopy-1.c
@@ -31,5 +31,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "points-to vars: { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "y.* = { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "y.*, points-to vars: { D..... }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/restrict-2.c b/gcc/testsuite/gcc.dg/torture/restrict-2.c
new file mode 100644
index 0000000000..ec51ade616
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/restrict-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+static inline void
+foo (int * p)
+{
+ int * __restrict pr = p;
+ *pr = 1;
+}
+
+int __attribute__((noinline,noclone))
+bar (int *q)
+{
+ int * __restrict qr = q;
+ *qr = 0;
+ foo (qr);
+ return *qr;
+}
+
+int main()
+{
+ int i;
+ if (bar (&i) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/restrict-3.c b/gcc/testsuite/gcc.dg/torture/restrict-3.c
new file mode 100644
index 0000000000..d815b8076e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/restrict-3.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+static inline void
+foo (int * __restrict pr)
+{
+ *pr = 1;
+}
+
+int __attribute__((noinline,noclone))
+bar (int *q)
+{
+ int * __restrict qr = q;
+ *qr = 0;
+ foo (qr);
+ return *qr;
+}
+
+int main()
+{
+ int i;
+ if (bar (&i) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/restrict-4.c b/gcc/testsuite/gcc.dg/torture/restrict-4.c
new file mode 100644
index 0000000000..52994d48b2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/restrict-4.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+static inline void
+foo (int * p)
+{
+ int * __restrict pr = p;
+ *pr = 1;
+}
+
+int __attribute__((noinline,noclone))
+bar (int * __restrict qr)
+{
+ *qr = 0;
+ foo (qr);
+ return *qr;
+}
+
+int main()
+{
+ int i;
+ if (bar (&i) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/restrict-5.c b/gcc/testsuite/gcc.dg/torture/restrict-5.c
new file mode 100644
index 0000000000..233a9075f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/restrict-5.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+static inline void
+foo (int * __restrict pr)
+{
+ *pr = 1;
+}
+
+int __attribute__((noinline,noclone))
+bar (int * __restrict qr)
+{
+ *qr = 0;
+ foo (qr);
+ return *qr;
+}
+
+int main()
+{
+ int i;
+ if (bar (&i) != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
index 7781795b4a..a90b1c62d3 100644
--- a/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
+++ b/gcc/testsuite/gcc.dg/torture/ssa-pta-fn-1.c
@@ -56,7 +56,7 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "q_const_., points-to non-local, points-to vars: { i }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_pure_., points-to non-local, points-to escaped, points-to vars: { i }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_normal_., points-to non-local, points-to escaped, points-to vars: { }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_const_. = { NONLOCAL i }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_pure_. = { ESCAPED NONLOCAL i }" "alias" } } */
+/* { dg-final { scan-tree-dump "q_normal_. = { ESCAPED NONLOCAL }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
index 89c71a99d5..8eba13aed6 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/builtin-apply-2.c
@@ -5,6 +5,12 @@
with pre-pushed arguments (e.g. SPARC). */
/* { dg-do run } */
+
+/* arm_hf_eabi: Variadic funcs use Base AAPCS. Normal funcs use VFP variant.
+ avr: Variadic funcs don't pass arguments in registers, while normal funcs
+ do. */
+/* { dg-skip-if "Variadic funcs use different argument passing from normal funcs" { arm_hf_eabi || { avr-*-* } } "*" "" } */
+/* { dg-skip-if "Variadic funcs have all args on stack. Normal funcs have args in registers." { nds32*-*-* } "*" "" } */
#define INTEGER_ARG 5
@@ -14,6 +20,9 @@
E, F and G are passed on stack. So the size of the stack argument
data is 20. */
#define STACK_ARGUMENTS_SIZE 20
+#elif defined __aarch64__ || defined __arc__ || defined __MMIX__
+/* No parameters on stack for bar. */
+#define STACK_ARGUMENTS_SIZE 0
#else
#define STACK_ARGUMENTS_SIZE 64
#endif
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-2.c b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-2.c
index c93ffa8673..2fd3be8fda 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-2.c
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/setjmp-2.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run { target i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } } */
#include <setjmp.h>
#include <signal.h>
diff --git a/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
index dafac8de18..8ef84fe353 100644
--- a/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
+++ b/gcc/testsuite/gcc.dg/torture/stackalign/stackalign.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2008, 2010, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/torture/tls/tls-reload-1.c b/gcc/testsuite/gcc.dg/torture/tls/tls-reload-1.c
new file mode 100644
index 0000000000..bd9a0b891a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/tls/tls-reload-1.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-require-effective-target tls_runtime } */
+/* { dg-add-options tls } */
+
+#define ARRAY(X) X##_array
+#define DECLARE(X) \
+ __thread int X; \
+ __thread int ARRAY(X)[4]; \
+ int *volatile *__attribute__((noinline)) \
+ check##X (int *volatile *y) \
+ { \
+ if (!y || *y++ != &X || *y++ != &ARRAY(X)[3]) \
+ return 0; \
+ return y; \
+ }
+#define COPY(X) *y++ = &X; *y++ = &ARRAY(X)[3];
+#define CHECK(X) y = check##X (y);
+#define A(M, X) M(X##0) M(X##1) M(X##2) M(X##3) M(X##4) M(X##5) M(X##6) M(X##7)
+#define B(M, X) A(M, X##0) A(M, X##1) A(M, X##2)
+#define C(M, X) B(M, X) B(M, X) B(M, X)
+
+#define NM 2
+#define NA (NM * 8)
+#define NB (NA * 3)
+#define NC (NB * 3)
+
+extern void abort (void);
+
+B(DECLARE, tls)
+
+void __attribute__ ((noinline))
+setup (int *volatile *y)
+{
+ C(COPY, tls)
+}
+
+int
+main (void)
+{
+ int *volatile array[NC];
+ int *volatile *y = array;
+ int i;
+
+ setup (array);
+ C(CHECK, tls);
+ if (!y)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/tls/tls.exp b/gcc/testsuite/gcc.dg/torture/tls/tls.exp
index bbbd1dfd65..e8404232b4 100644
--- a/gcc/testsuite/gcc.dg/torture/tls/tls.exp
+++ b/gcc/testsuite/gcc.dg/torture/tls/tls.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-1.c b/gcc/testsuite/gcc.dg/torture/transpose-1.c
new file mode 100644
index 0000000000..188f3b51b1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-1.c
@@ -0,0 +1,97 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions).
+ All dimensions are transposed : dim 0 -> dim 2
+ dim 1 -> dim 0
+ dim 2 -> dim 1
+*/
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (i = 0; i < 3; i++)
+ {
+ for (j = 0; j < 4; j++)
+ {
+ for (k = 0; k < 2; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][i][j]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-2.c b/gcc/testsuite/gcc.dg/torture/transpose-2.c
new file mode 100644
index 0000000000..bff6a3abab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-2.c
@@ -0,0 +1,94 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions).
+ No transposing is necessary. */
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (j = 0; j < 2; j++)
+ {
+ for (i = 0; i < 4; i++)
+ {
+ for (k = 0; k < 2; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][k][k]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < ARCHnodes; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-3.c b/gcc/testsuite/gcc.dg/torture/transpose-3.c
new file mode 100644
index 0000000000..da7e887013
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-3.c
@@ -0,0 +1,101 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+/* The inner most dimension escapes.
+ The two external dimensions are flattened
+ after being transposed. */
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (j = 0; j < 4; j++)
+ {
+ for (i = 0; i < 3; i++)
+ {
+ for (k = 0; k < 2; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[k][i][j]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ vel[0][0]=vel[1][1];
+
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ if (i==1 && j==1)
+ continue;
+ else
+ free (vel[i][j]);
+
+ for (i = 0; i < 2; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ signed int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ printf ("acc to dim2 ");
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ printf ("\n");
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-4.c b/gcc/testsuite/gcc.dg/torture/transpose-4.c
new file mode 100644
index 0000000000..5a96a5163f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-4.c
@@ -0,0 +1,100 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions).
+ The two inner dimensions are transposed.
+ dim 1 -> dim 2
+ dim 2 -> dim 1
+*/
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (j = 0; j < 4; j++)
+ {
+ for (i = 0; i < 2; i++)
+ {
+ for (k = 0; k < 3; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][k][j]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < 2; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ signed int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ printf ("acc to dim2 ");
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ printf ("\n");
+
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-5.c b/gcc/testsuite/gcc.dg/torture/transpose-5.c
new file mode 100644
index 0000000000..049d7b03e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-5.c
@@ -0,0 +1,96 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions).
+ The dimensions are NOT transposed. */
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (j = 0; j < 3; j++)
+ {
+ for (i = 0; i < 2; i++)
+ {
+ for (k = 0; k < 4; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][j][k]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < 2; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ signed int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ printf ("acc to dim2 ");
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ printf ("\n");
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/transpose-6.c b/gcc/testsuite/gcc.dg/torture/transpose-6.c
new file mode 100644
index 0000000000..9b3329b536
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/transpose-6.c
@@ -0,0 +1,96 @@
+/* { dg-do run } */
+/* { dg-options "-fwhole-program" } */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+void mem_init (void);
+int ARCHnodes, ARCHnodes1;
+int ***vel;
+
+/* The whole matrix VEL is flattened (3 dimensions).
+ The dimensions are NOT transposed. */
+/*--------------------------------------------------------------------------*/
+
+int
+main (int argc, char **argv)
+{
+ int i, j, k;
+
+ ARCHnodes = 2;
+ ARCHnodes1 = 4;
+
+/* Dynamic memory allocations and initializations */
+
+ mem_init ();
+
+ for (j = 0; j < 3; j++)
+ {
+ for (i = 0; i < 2; i++)
+ {
+ for (k = 0; k < 3; k++)
+ {
+ printf ("[%d][%d][%d]=%d ", i, j, k, vel[i][k][k]);
+ }
+ printf ("\n");
+ }
+ printf ("\n");
+ }
+ for (i = 0; i < 2; i++)
+ for (j = 0; j < 3; j++)
+ free (vel[i][j]);
+
+ for (i = 0; i < 2; i++)
+ free (vel[i]);
+
+ free (vel);
+ return 0;
+}
+
+/*--------------------------------------------------------------------------*/
+/* Dynamic memory allocations and initializations */
+
+void
+mem_init (void)
+{
+
+ signed int i, j, k,d;
+
+ d = 0;
+ vel = (int ***) malloc (ARCHnodes * sizeof (int **));
+
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ vel[i] = (int **) malloc (3 * sizeof (int *));
+ if (vel[i] == (int **) NULL)
+ {
+ fprintf (stderr, "malloc failed for vel[%d]\n", i);
+ fflush (stderr);
+ exit (0);
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ vel[i][j] = (int *) malloc (ARCHnodes1 * sizeof (int));
+ }
+ }
+ for (i = 0; i < ARCHnodes; i++)
+ {
+ for (j = 0; j < 3; j++)
+ {
+ for (k = 0; k < ARCHnodes1; k++)
+ {
+ printf ("acc to dim2 ");
+ vel[i][j][k] = d;
+ d++;
+ }
+ }
+ }
+ printf ("\n");
+}
+
+/*--------------------------------------------------------------------------*/
diff --git a/gcc/testsuite/gcc.dg/torture/va-arg-25.c b/gcc/testsuite/gcc.dg/torture/va-arg-25.c
index 8c0da549d0..64aaffac8b 100644
--- a/gcc/testsuite/gcc.dg/torture/va-arg-25.c
+++ b/gcc/testsuite/gcc.dg/torture/va-arg-25.c
@@ -4,7 +4,7 @@
/* { dg-options "-msse" { target { i?86-*-* x86_64-*-* } } } */
/* { dg-require-effective-target sse_runtime { target { i?86-*-* x86_64-*-* } } } */
/* { dg-options "-mabi=altivec -maltivec" { target { powerpc-*-* powerpc64-*-* } } } */
-/* { dg-require-effective-target vmx_hw { target { powerpc-*-* powerpc64--*-* } } } */
+/* { dg-require-effective-target vmx_hw { target { powerpc-*-* powerpc64-*-* } } } */
#include <stdarg.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/vec-cvt-1.c b/gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
index 4354237c41..78a9009560 100644
--- a/gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
+++ b/gcc/testsuite/gcc.dg/torture/vec-cvt-1.c
@@ -1,4 +1,6 @@
/* { dg-do run } */
+/* This test is too big for small targets. */
+/* { dg-require-effective-target size32plus } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c b/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c
new file mode 100644
index 0000000000..14e435b8ad
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/torture/vector-shuffle1.c
@@ -0,0 +1,21 @@
+/* PR54219 */
+/* { dg-do run } */
+
+extern void abort (void);
+
+typedef int v2si __attribute__((vector_size(2*sizeof(int))));
+
+void f(v2si *x)
+{
+ /* This requires canonicalization of the mask to { 1, 0 }. */
+ *x = __builtin_shuffle(*x, *x, (v2si) { 5, 0 });
+}
+
+int main()
+{
+ v2si y = { 1, 2 };
+ f(&y);
+ if (y[0] != 2 || y[1] != 1)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/torture/vshuf-16.inc b/gcc/testsuite/gcc.dg/torture/vshuf-16.inc
index abefdcba22..f04b8ddedd 100644
--- a/gcc/testsuite/gcc.dg/torture/vshuf-16.inc
+++ b/gcc/testsuite/gcc.dg/torture/vshuf-16.inc
@@ -21,7 +21,9 @@ T (17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31) \
T (18, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3) \
T (19, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) \
T (20, 0, 16, 1, 17, 2, 18, 3, 19, 4, 20, 5, 21, 6, 22, 7, 23) \
-T (21, 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31)
+T (21, 8, 24, 9, 25, 10, 26, 11, 27, 12, 28, 13, 29, 14, 30, 15, 31) \
+T (22, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0) \
+T (23, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 15)
#define EXPTESTS \
T (116, 28, 13, 27, 11, 21, 1, 5, 22, 29, 14, 15, 6, 3, 10, 16, 30) \
T (117, 22, 26, 1, 13, 29, 3, 18, 18, 11, 21, 12, 28, 19, 5, 7, 4) \
diff --git a/gcc/testsuite/gcc.dg/torture/vshuf-32.inc b/gcc/testsuite/gcc.dg/torture/vshuf-32.inc
index 583364a816..c7fced0623 100644
--- a/gcc/testsuite/gcc.dg/torture/vshuf-32.inc
+++ b/gcc/testsuite/gcc.dg/torture/vshuf-32.inc
@@ -21,7 +21,9 @@ T (17, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39
T (18, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3) \
T (19, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0) \
T (20, 0, 32, 1, 33, 2, 34, 3, 35, 4, 36, 5, 37, 6, 38, 7, 39, 8, 40, 9, 41, 10, 42, 11, 43, 12, 44, 13, 45, 14, 46, 15, 47) \
-T (21, 16, 48, 17, 49, 18, 50, 19, 51, 20, 52, 21, 53, 22, 54, 23, 55, 24, 56, 25, 57, 26, 58, 27, 59, 28, 60, 29, 61, 30, 62, 31, 63)
+T (21, 16, 48, 17, 49, 18, 50, 19, 51, 20, 52, 21, 53, 22, 54, 23, 55, 24, 56, 25, 57, 26, 58, 27, 59, 28, 60, 29, 61, 30, 62, 31, 63) \
+T (22, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 0) \
+T (23, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 31)
#define EXPTESTS \
T (116, 13, 38, 47, 3, 17, 8, 38, 20, 59, 61, 39, 26, 7, 49, 63, 43, 57, 16, 40, 19, 4, 32, 27, 7, 52, 19, 46, 55, 36, 41, 48, 6) \
T (117, 39, 35, 59, 20, 56, 18, 58, 63, 57, 14, 2, 16, 5, 61, 35, 4, 53, 9, 52, 51, 27, 33, 61, 12, 3, 35, 36, 40, 37, 7, 45, 42) \
diff --git a/gcc/testsuite/gcc.dg/torture/vshuf-4.inc b/gcc/testsuite/gcc.dg/torture/vshuf-4.inc
index cdba12cd27..d0cb7387ca 100644
--- a/gcc/testsuite/gcc.dg/torture/vshuf-4.inc
+++ b/gcc/testsuite/gcc.dg/torture/vshuf-4.inc
@@ -21,7 +21,10 @@ T (17, 1, 3, 5, 7) \
T (18, 3, 3, 3, 3) \
T (19, 3, 2, 1, 0) \
T (20, 0, 4, 1, 5) \
-T (21, 2, 6, 3, 7)
+T (21, 2, 6, 3, 7) \
+T (22, 1, 2, 3, 0) \
+T (23, 2, 1, 0, 3) \
+T (24, 2, 5, 6, 3)
#define EXPTESTS \
T (116, 1, 2, 4, 3) \
T (117, 7, 3, 3, 0) \
@@ -29,7 +32,6 @@ T (118, 5, 3, 2, 7) \
T (119, 0, 3, 5, 6) \
T (120, 0, 0, 1, 5) \
T (121, 4, 6, 2, 1) \
-T (122, 2, 5, 6, 3) \
T (123, 4, 6, 3, 2) \
T (124, 4, 7, 5, 6) \
T (125, 0, 4, 2, 4) \
diff --git a/gcc/testsuite/gcc.dg/torture/vshuf-8.inc b/gcc/testsuite/gcc.dg/torture/vshuf-8.inc
index b865162133..a39d71da6c 100644
--- a/gcc/testsuite/gcc.dg/torture/vshuf-8.inc
+++ b/gcc/testsuite/gcc.dg/torture/vshuf-8.inc
@@ -21,7 +21,9 @@ T (17, 1, 3, 5, 7, 9, 11, 13, 15) \
T (18, 3, 3, 3, 3, 3, 3, 3, 3) \
T (19, 7, 6, 5, 4, 3, 2, 1, 0) \
T (20, 0, 8, 1, 9, 2, 10, 3, 11) \
-T (21, 4, 12, 5, 13, 6, 14, 7, 15)
+T (21, 4, 12, 5, 13, 6, 14, 7, 15) \
+T (22, 1, 2, 3, 4, 5, 6, 7, 0) \
+T (23, 6, 5, 4, 3, 2, 1, 0, 7)
#define EXPTESTS \
T (116, 9, 3, 9, 4, 7, 0, 0, 6) \
T (117, 4, 14, 12, 8, 9, 6, 0, 10) \
diff --git a/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c b/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
new file mode 100644
index 0000000000..cbd1c7c80e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/20041218-1.c
@@ -0,0 +1,119 @@
+/* PR rtl-optimization/16968 */
+/* Testcase by Jakub Jelinek <jakub@redhat.com> */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+struct T
+{
+ unsigned int b, c, *d;
+ unsigned char e;
+};
+struct S
+{
+ unsigned int a;
+ struct T f;
+};
+struct U
+{
+ struct S g, h;
+};
+struct V
+{
+ unsigned int i;
+ struct U j;
+};
+
+extern void exit (int);
+extern void abort (void);
+
+void *
+dummy1 (void *x)
+{
+ return "";
+}
+
+void *
+dummy2 (void *x, void *y)
+{
+ exit (0);
+}
+
+struct V *
+baz (unsigned int x)
+{
+ static struct V v;
+ __builtin_memset (&v, 0x55, sizeof (v));
+ return &v;
+}
+
+int
+check (void *x, struct S *y)
+{
+ if (y->a || y->f.b || y->f.c || y->f.d || y->f.e)
+ abort ();
+ return 1;
+}
+
+static struct V *
+bar (unsigned int x, void *y)
+{
+ const struct T t = { 0, 0, (void *) 0, 0 };
+ struct V *u;
+ void *v;
+ v = dummy1 (y);
+ if (!v)
+ return (void *) 0;
+
+ u = baz (sizeof (struct V));
+ u->i = x;
+ u->j.g.a = 0;
+ u->j.g.f = t;
+ u->j.h.a = 0;
+ u->j.h.f = t;
+
+ if (!check (v, &u->j.g) || !check (v, &u->j.h))
+ return (void *) 0;
+ return u;
+}
+
+int
+foo (unsigned int *x, unsigned int y, void **z)
+{
+ void *v;
+ unsigned int i, j;
+
+ *z = v = (void *) 0;
+
+ for (i = 0; i < y; i++)
+ {
+ struct V *c;
+
+ j = *x;
+
+ switch (j)
+ {
+ case 1:
+ c = bar (j, x);
+ break;
+ default:
+ c = 0;
+ break;
+ }
+ if (c)
+ v = dummy2 (v, c);
+ else
+ return 1;
+ }
+
+ *z = v;
+ return 0;
+}
+
+int
+main (void)
+{
+ unsigned int one = 1;
+ void *p;
+ foo (&one, 1, &p);
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
new file mode 100644
index 0000000000..a03aad7f6d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/cold_partition_label.c
@@ -0,0 +1,38 @@
+/* Test case to check if function foo gets split and the cold function
+ gets a label. */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -save-temps" } */
+
+#define SIZE 10000
+
+const char *sarr[SIZE];
+const char *buf_hot;
+const char *buf_cold;
+
+__attribute__((noinline))
+void
+foo (int path)
+{
+ int i;
+ if (path)
+ {
+ for (i = 0; i < SIZE; i++)
+ sarr[i] = buf_hot;
+ }
+ else
+ {
+ for (i = 0; i < SIZE; i++)
+ sarr[i] = buf_cold;
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ buf_hot = "hello";
+ buf_cold = "world";
+ foo (argc);
+ return 0;
+}
+
+/* { dg-final-use { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
new file mode 100644
index 0000000000..bbfe1f4728
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/comp-goto-1.c
@@ -0,0 +1,166 @@
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+#include <stdlib.h>
+
+#if !defined(NO_LABEL_VALUES) && (!defined(STACK_SIZE) || STACK_SIZE >= 4000) && __INT_MAX__ >= 2147483647
+typedef unsigned int uint32;
+typedef signed int sint32;
+
+typedef uint32 reg_t;
+
+typedef unsigned long int host_addr_t;
+typedef uint32 target_addr_t;
+typedef sint32 target_saddr_t;
+
+typedef union
+{
+ struct
+ {
+ unsigned int offset:18;
+ unsigned int ignore:4;
+ unsigned int s1:8;
+ int :2;
+ signed int simm:14;
+ unsigned int s3:8;
+ unsigned int s2:8;
+ int pad2:2;
+ } f1;
+ long long ll;
+ double d;
+} insn_t;
+
+typedef struct
+{
+ target_addr_t vaddr_tag;
+ unsigned long int rigged_paddr;
+} tlb_entry_t;
+
+typedef struct
+{
+ insn_t *pc;
+ reg_t registers[256];
+ insn_t *program;
+ tlb_entry_t tlb_tab[0x100];
+} environment_t;
+
+enum operations
+{
+ LOAD32_RR,
+ METAOP_DONE
+};
+
+host_addr_t
+f ()
+{
+ abort ();
+}
+
+reg_t
+simulator_kernel (int what, environment_t *env)
+{
+ register insn_t *pc = env->pc;
+ register reg_t *regs = env->registers;
+ register insn_t insn;
+ register int s1;
+ register reg_t r2;
+ register void *base_addr = &&sim_base_addr;
+ register tlb_entry_t *tlb = env->tlb_tab;
+
+ if (what != 0)
+ {
+ int i;
+ static void *op_map[] =
+ {
+ &&L_LOAD32_RR,
+ &&L_METAOP_DONE,
+ };
+ insn_t *program = env->program;
+ for (i = 0; i < what; i++)
+ program[i].f1.offset = op_map[program[i].f1.offset] - base_addr;
+ }
+
+ sim_base_addr:;
+
+ insn = *pc++;
+ r2 = (*(reg_t *) (((char *) regs) + (insn.f1.s2 << 2)));
+ s1 = (insn.f1.s1 << 2);
+ goto *(base_addr + insn.f1.offset);
+
+ L_LOAD32_RR:
+ {
+ target_addr_t vaddr_page = r2 / 4096;
+ unsigned int x = vaddr_page % 0x100;
+ insn = *pc++;
+
+ for (;;)
+ {
+ target_addr_t tag = tlb[x].vaddr_tag;
+ host_addr_t rigged_paddr = tlb[x].rigged_paddr;
+
+ if (tag == vaddr_page)
+ {
+ *(reg_t *) (((char *) regs) + s1) = *(uint32 *) (rigged_paddr + r2);
+ r2 = *(reg_t *) (((char *) regs) + (insn.f1.s2 << 2));
+ s1 = insn.f1.s1 << 2;
+ goto *(base_addr + insn.f1.offset);
+ }
+
+ if (((target_saddr_t) tag < 0))
+ {
+ *(reg_t *) (((char *) regs) + s1) = *(uint32 *) f ();
+ r2 = *(reg_t *) (((char *) regs) + (insn.f1.s2 << 2));
+ s1 = insn.f1.s1 << 2;
+ goto *(base_addr + insn.f1.offset);
+ }
+
+ x = (x - 1) % 0x100;
+ }
+
+ L_METAOP_DONE:
+ return (*(reg_t *) (((char *) regs) + s1));
+ }
+}
+
+insn_t program[2 + 1];
+
+void *malloc ();
+
+int
+main ()
+{
+ environment_t env;
+ insn_t insn;
+ int i, res;
+ host_addr_t a_page = (host_addr_t) malloc (2 * 4096);
+ target_addr_t a_vaddr = 0x123450;
+ target_addr_t vaddr_page = a_vaddr / 4096;
+ a_page = (a_page + 4096 - 1) & -4096;
+
+ env.tlb_tab[((vaddr_page) % 0x100)].vaddr_tag = vaddr_page;
+ env.tlb_tab[((vaddr_page) % 0x100)].rigged_paddr = a_page - vaddr_page * 4096;
+ insn.f1.offset = LOAD32_RR;
+ env.registers[0] = 0;
+ env.registers[2] = a_vaddr;
+ *(sint32 *) (a_page + a_vaddr % 4096) = 88;
+ insn.f1.s1 = 0;
+ insn.f1.s2 = 2;
+
+ for (i = 0; i < 2; i++)
+ program[i] = insn;
+
+ insn.f1.offset = METAOP_DONE;
+ insn.f1.s1 = 0;
+ program[2] = insn;
+
+ env.pc = program;
+ env.program = program;
+
+ res = simulator_kernel (2 + 1, &env);
+
+ if (res != 88)
+ abort ();
+ exit (0);
+}
+#else
+main(){ exit (0); }
+#endif
diff --git a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c
new file mode 100644
index 0000000000..67a76c9f1e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1.c
@@ -0,0 +1,21 @@
+/* { dg-require-effective-target lto } */
+/* { dg-additional-sources "crossmodule-indircall-1a.c" } */
+/* { dg-options "-O3 -flto -DDOJOB=1" } */
+
+int a;
+extern void (*p[2])(int n);
+void abort (void);
+main()
+{ int i;
+
+ /* This call shall be converted. */
+ for (i = 0;i<1000;i++)
+ p[0](1);
+ /* This call shall not be converted. */
+ for (i = 0;i<1000;i++)
+ p[i%2](2);
+ if (a != 1000)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c
new file mode 100644
index 0000000000..a94195cd95
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/crossmodule-indircall-1a.c
@@ -0,0 +1,40 @@
+/* It seems there is no way to avoid the other source of mulitple
+ source testcase from being compiled independently. Just avoid
+ error. */
+#ifdef DOJOB
+extern int a;
+void abort (void);
+
+#ifdef _PROFILE_USE
+__attribute__ ((externally_visible))
+int constval=1,constval2=2;
+#else
+__attribute__ ((externally_visible))
+int constval=3,constval2=2;
+#endif
+
+
+void
+add(int i)
+{
+ /* Verify that inlining happens for first case. */
+ if (i==constval && !__builtin_constant_p (i))
+ abort ();
+ /* Second case has no dominating target; it should not inline. */
+ if (i==constval2 && __builtin_constant_p (i))
+ abort ();
+ a += i;
+}
+void
+sub(int i)
+{
+ a -= i;
+}
+__attribute__ ((externally_visible))
+void (*p[2])(int)={add, sub};
+#else
+main()
+{
+ return 0;
+}
+#endif
diff --git a/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c b/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c
index b5340b56d7..e44887b529 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/inliner-1.c
@@ -36,7 +36,7 @@ main ()
/* cold function should be inlined, while hot function should not.
Look for "cold_function () [tail call];" call statement not for the
- declaration or other apperances of the string in dump. */
+ declaration or other appearances of the string in dump. */
/* { dg-final-use { scan-tree-dump "cold_function ..;" "optimized"} } */
/* { dg-final-use { scan-tree-dump-not "hot_function ..;" "optimized"} } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/peel-1.c b/gcc/testsuite/gcc.dg/tree-prof/peel-1.c
new file mode 100644
index 0000000000..65f0c562cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/peel-1.c
@@ -0,0 +1,25 @@
+/* { dg-options "-O3 -fdump-rtl-loop2_unroll -fno-unroll-loops -fpeel-loops" } */
+void abort();
+
+int a[1000];
+int
+__attribute__ ((noinline))
+t()
+{
+ int i;
+ for (i=0;i<1000;i++)
+ if (!a[i])
+ return 1;
+ abort ();
+}
+main()
+{
+ int i;
+ for (i=0;i<1000;i++)
+ t();
+ return 0;
+}
+/* { dg-final-use { scan-rtl-dump "Considering simply peeling loop" "loop2_unroll" } } */
+/* In fact one peeling is enough; we however mispredict number of iterations of the loop
+ at least until loop_ch is schedule ahead of profiling pass. */
+/* { dg-final-use { cleanup-rtl-dump "loop2_unroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr45354.c b/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
index b30ad77694..849e786bb2 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr45354.c
@@ -1,5 +1,5 @@
/* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling" { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling" { target powerpc*-*-* ia64-*-* x86_64-*-* } } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr50907.c b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
index 2ba26e392c..b850513a13 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr50907.c
@@ -1,5 +1,5 @@
/* PR middle-end/50907 */
/* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling -fpic" { target { { powerpc*-*-* ia64-*-* x86_64-*-* } && fpic } } } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fschedule-insns -fselective-scheduling -fpic" { target { { powerpc*-*-* ia64-*-* x86_64-*-* } && fpic } } } */
#include "pr45354.c"
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr52027.c b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
index c12f8b484e..c46a14b2e8 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr52027.c
@@ -1,6 +1,6 @@
/* PR debug/52027 */
/* { dg-require-effective-target freorder } */
-/* { dg-options "-O -freorder-blocks-and-partition -fno-reorder-functions" } */
+/* { dg-options "-O2 -freorder-blocks-and-partition -fno-reorder-functions" } */
void
foo (int len)
diff --git a/gcc/testsuite/gcc.dg/tree-prof/pr59003.c b/gcc/testsuite/gcc.dg/tree-prof/pr59003.c
new file mode 100644
index 0000000000..1c7d5e07fb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/pr59003.c
@@ -0,0 +1,30 @@
+/* PR target/59003 */
+/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mtune=amdfam10" { target i?86-*-* x86_64-*-* } } */
+/* { dg-options "-O2 -fno-common" { target hppa*-*-hpux* } } */
+
+__attribute__((noinline, noclone)) void *
+foo (void *p, unsigned int q)
+{
+ return __builtin_memset (p, 0, q * 4UL);
+}
+
+char buf[128] __attribute__((aligned (32)));
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 100000; i++)
+ foo (buf + 4, 1 + (i & 1));
+ for (i = 0; i < 128; i++)
+ {
+ buf[i] = 'X';
+ asm volatile ("" : : : "memory");
+ }
+ foo (buf + 32, 7);
+ for (i = 0; i < 128; i++)
+ if (buf[i] != ((i < 32 || i >= 32 + 28) ? 'X' : 0))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c b/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c
new file mode 100644
index 0000000000..50ee9e44fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/switch-case-1.c
@@ -0,0 +1,40 @@
+/* { dg-options "-O2 -fdump-rtl-expand-all" } */
+int g;
+
+__attribute__((noinline)) void foo (int n)
+{
+ switch (n)
+ {
+ case 1:
+ g++; break;
+ case 2:
+ g += 2; break;
+ case 3:
+ g += 1; break;
+ case 4:
+ g += 3; break;
+ case 5:
+ g += 4; break;
+ case 6:
+ g += 5; break;
+ case 7:
+ g += 6; break;
+ case 8:
+ g += 7; break;
+ case 9:
+ g += 8; break;
+ default:
+ g += 8; break;
+ }
+}
+
+int main ()
+{
+ int i;
+ for (i = 0; i < 10000; i++)
+ foo ((i * i) % 5);
+ return 0;
+}
+/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 4000" 2 "expand"} } */
+/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 2000" 1 "expand"} } */
+/* { dg-final-use { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c b/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c
new file mode 100644
index 0000000000..07d4363d39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/switch-case-2.c
@@ -0,0 +1,40 @@
+/* { dg-options "-O2 -fdump-rtl-expand-all" } */
+int g;
+
+__attribute__((noinline)) void foo (int n)
+{
+ switch (n)
+ {
+ case 99:
+ g += 2; break;
+ case 1:
+ g++; break;
+ case 100:
+ g += 1; break;
+ case 4:
+ g += 3; break;
+ case 5:
+ g += 4; break;
+ case 6:
+ g += 5; break;
+ case 7:
+ g += 6; break;
+ case 8:
+ g += 7; break;
+ case 9:
+ g += 8; break;
+ default:
+ g += 8; break;
+ }
+}
+
+int main ()
+{
+ int i;
+ for (i = 0; i < 10000; i++)
+ foo ((i * i) % 5);
+ return 0;
+}
+/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 4000" 2 "expand"} } */
+/* { dg-final-use { scan-rtl-dump-times ";; basic block\[^\\n\]*count 2000" 1 "expand"} } */
+/* { dg-final-use { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
new file mode 100644
index 0000000000..c61b534a25
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-1.c
@@ -0,0 +1,22 @@
+/* { dg-options "-O2 -fdump-ipa-profile" } */
+
+__attribute__ ((noinline))
+int foo()
+{
+ return 0;
+}
+
+__attribute__ ((noinline))
+int bar()
+{
+ return 1;
+}
+
+int main ()
+{
+ return foo ();
+}
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 0" 1 "profile"} } */
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */
+/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c
new file mode 100644
index 0000000000..0411341975
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/time-profiler-2.c
@@ -0,0 +1,50 @@
+/* { dg-options "-O2 -fdump-ipa-profile" } */
+
+#include <unistd.h>
+
+__attribute__ ((noinline))
+int foo()
+{
+ return 1;
+}
+
+__attribute__ ((noinline))
+int bar()
+{
+ return 1;
+}
+
+__attribute__ ((noinline))
+int baz()
+{
+ return 1;
+}
+
+__attribute__ ((noinline))
+int baz1()
+{
+ return 1;
+}
+
+int main ()
+{
+ int f = fork();
+ int r = 0;
+
+ foo ();
+
+ if (f < 0)
+ return 1; /* Fork failed. */
+
+ if(f == 0) /* Child process. */
+ r = bar() - foo();
+ else /* Parent process. */
+ r = foo() - foo();
+
+ return r;
+}
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 0" 2 "profile"} } */
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 1" 1 "profile"} } */
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 2" 1 "profile"} } */
+/* { dg-final-use { scan-ipa-dump-times "Read tp_first_run: 3" 1 "profile"} } */
+/* { dg-final-use { cleanup-ipa-dump "profile" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
index e3c5e3d048..454dfaeed2 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
+++ b/gcc/testsuite/gcc.dg/tree-prof/tree-prof.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2001, 2002, 2004, 2005, 2007, 2008, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +15,7 @@
# <http://www.gnu.org/licenses/>.
# Test the functionality of programs compiled with profile-directed block
-# ordering using -fprofile-generate followed by -fbranch-use.
+# ordering using -fprofile-generate followed by -fprofile-use.
load_lib target-supports.exp
diff --git a/gcc/testsuite/gcc.dg/tree-prof/unroll-1.c b/gcc/testsuite/gcc.dg/tree-prof/unroll-1.c
new file mode 100644
index 0000000000..0663b1286d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/unroll-1.c
@@ -0,0 +1,23 @@
+/* { dg-options "-O3 -fdump-rtl-loop2_unroll -funroll-loops -fno-peel-loops" } */
+void abort ();
+
+int a[1000];
+int
+__attribute__ ((noinline))
+t()
+{
+ int i;
+ for (i=0;i<1000;i++)
+ if (!a[i])
+ return 1;
+ abort ();
+}
+main()
+{
+ int i;
+ for (i=0;i<1000;i++)
+ t();
+ return 0;
+}
+/* { dg-final-use { scan-rtl-dump "Considering unrolling loop with constant number of iterations" "loop2_unroll" } } */
+/* { dg-final-use { cleanup-rtl-dump "loop2_unroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
index 2bce8a2e5f..5297098fc9 100644
--- a/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
+++ b/gcc/testsuite/gcc.dg/tree-prof/update-loopch.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -fdump-ipa-profile-blocks -fdump-tree-optimized-blocks" } */
+/* { dg-options "-O2 -fdump-ipa-profile-blocks-details -fdump-tree-optimized-blocks-details" } */
int max = 33333;
int a[8];
int
@@ -14,8 +14,9 @@ main ()
/* Loop header copying will peel away the initial conditional, so the loop body
is once reached directly from entry point of function, rest via loopback
edge. */
-/* { dg-final-use { scan-ipa-dump "count:33333" "profile"} } */
-/* { dg-final-use { scan-tree-dump "count:33332" "optimized"} } */
-/* { dg-final-use { scan-tree-dump-not "Invalid sum" "optimized"} } */
+/* { dg-final-use { scan-ipa-dump "loop depth 1, count 33334" "profile"} } */
+/* { dg-final-use { scan-tree-dump "loop depth 1, count 33332" "optimized"} } */
+/* { dg-final-use { scan-tree-dump-times "Removing basic block \[^\r\n\]*\[\\r\\n\]+\[^\r\n\]*\[\\r\\n\]+Invalid sum of\[^\r\n\]*\[\\r\\n\]+Invalid sum of" 1 "optimized"} } */
+/* { dg-final-use { scan-tree-dump-times "Invalid sum of" 2 "optimized"} } */
/* { dg-final-use { cleanup-ipa-dump "profile" } } */
/* { dg-final-use { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c b/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c
new file mode 100644
index 0000000000..8d17dbfef8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-prof/va-arg-pack-1.c
@@ -0,0 +1,145 @@
+/* __builtin_va_arg_pack () builtin tests. */
+/* { dg-require-effective-target freorder } */
+/* { dg-options "-O2 -freorder-blocks-and-partition" } */
+
+#include <stdarg.h>
+
+extern void abort (void);
+
+int v1 = 8;
+long int v2 = 3;
+void *v3 = (void *) &v2;
+struct A { char c[16]; } v4 = { "foo" };
+long double v5 = 40;
+char seen[20];
+int cnt;
+
+__attribute__ ((noinline)) int
+foo1 (int x, int y, ...)
+{
+ int i;
+ long int l;
+ void *v;
+ struct A a;
+ long double ld;
+ va_list ap;
+
+ va_start (ap, y);
+ if (x < 0 || x >= 20 || seen[x])
+ abort ();
+ seen[x] = ++cnt;
+ if (y != 6)
+ abort ();
+ i = va_arg (ap, int);
+ if (i != 5)
+ abort ();
+ switch (x)
+ {
+ case 0:
+ i = va_arg (ap, int);
+ if (i != 9 || v1 != 9)
+ abort ();
+ a = va_arg (ap, struct A);
+ if (__builtin_memcmp (a.c, v4.c, sizeof (a.c)) != 0)
+ abort ();
+ v = (void *) va_arg (ap, struct A *);
+ if (v != (void *) &v4)
+ abort ();
+ l = va_arg (ap, long int);
+ if (l != 3 || v2 != 4)
+ abort ();
+ break;
+ case 1:
+ ld = va_arg (ap, long double);
+ if (ld != 41 || v5 != ld)
+ abort ();
+ i = va_arg (ap, int);
+ if (i != 8)
+ abort ();
+ v = va_arg (ap, void *);
+ if (v != &v2)
+ abort ();
+ break;
+ case 2:
+ break;
+ default:
+ abort ();
+ }
+ va_end (ap);
+ return x;
+}
+
+__attribute__ ((noinline)) int
+foo2 (int x, int y, ...)
+{
+ long long int ll;
+ void *v;
+ struct A a, b;
+ long double ld;
+ va_list ap;
+
+ va_start (ap, y);
+ if (x < 0 || x >= 20 || seen[x])
+ abort ();
+ seen[x] = ++cnt | 64;
+ if (y != 10)
+ abort ();
+ switch (x)
+ {
+ case 11:
+ break;
+ case 12:
+ ld = va_arg (ap, long double);
+ if (ld != 41 || v5 != 40)
+ abort ();
+ a = va_arg (ap, struct A);
+ if (__builtin_memcmp (a.c, v4.c, sizeof (a.c)) != 0)
+ abort ();
+ b = va_arg (ap, struct A);
+ if (__builtin_memcmp (b.c, v4.c, sizeof (b.c)) != 0)
+ abort ();
+ v = va_arg (ap, void *);
+ if (v != &v2)
+ abort ();
+ ll = va_arg (ap, long long int);
+ if (ll != 16LL)
+ abort ();
+ break;
+ case 2:
+ break;
+ default:
+ abort ();
+ }
+ va_end (ap);
+ return x + 8;
+}
+
+__attribute__ ((noinline)) int
+foo3 (void)
+{
+ return 6;
+}
+
+extern inline __attribute__ ((always_inline, gnu_inline)) int
+bar (int x, ...)
+{
+ if (x < 10)
+ return foo1 (x, foo3 (), 5, __builtin_va_arg_pack ());
+ return foo2 (x, foo3 () + 4, __builtin_va_arg_pack ());
+}
+
+int
+main (void)
+{
+ if (bar (0, ++v1, v4, &v4, v2++) != 0)
+ abort ();
+ if (bar (1, ++v5, 8, v3) != 1)
+ abort ();
+ if (bar (2) != 2)
+ abort ();
+ if (bar (v1 + 2) != 19)
+ abort ();
+ if (bar (v1 + 3, v5--, v4, v4, v3, 16LL) != 20)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c
index a16f49dbb2..f90acd078e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20030731-1.c
@@ -56,7 +56,7 @@ store_expr (exp, target, want_value)
;
}
-/* All paths to the test "target != 0" occuring in the final IF statement
+/* All paths to the test "target != 0" occurring in the final IF statement
dereference target. Thus target can not have the value zero at that
point and the test should have been eliminated. */
/* ??? The dominator walker (A) doesn't merge this data at joins and
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c
index 117cddf12a..7c34ff4496 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20031021-1.c
@@ -17,5 +17,5 @@ int main()
}
/* We should only store to a.i, not load from it. */
-/* { dg-final { scan-tree-dump-times "a.i" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not "= a.i" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
index 470b585fd5..8518dfb1a8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040204-1.c
@@ -33,5 +33,5 @@ void test55 (int x, int y)
that the && should be emitted (based on BRANCH_COST). Fix this
by teaching dom to look through && and register all components
as true. */
-/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "alpha*-*-* arm*-*-* powerpc*-*-* cris-*-* crisv32-*-* hppa*-*-* i?86-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-* sparc*-*-* spu-*-* x86_64-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "link_error" 0 "optimized" { xfail { ! "alpha*-*-* arm*-*-* powerpc*-*-* cris-*-* crisv32-*-* hppa*-*-* i?86-*-* mmix-*-* mips*-*-* m68k*-*-* moxie-*-* nds32*-*-* sparc*-*-* spu-*-* x86_64-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
index 99b27ce02f..b49cf648c7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/20040517-1.c
@@ -16,6 +16,7 @@ void bar (void)
/* We used to treat malloc functions like pure and const functions, but
malloc functions may clobber global memory. Only the function result
does not alias any other pointer.
- Hence, we must have a VDEF for a before and after the call to foo(). */
-/* { dg-final { scan-tree-dump-times "VDEF" 2 "alias"} } */
+ Hence, we must have a VDEF for a before and after the call to foo().
+ And one after the call to abort(). */
+/* { dg-final { scan-tree-dump-times "VDEF" 3 "alias"} } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-11.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-11.c
index d4ce34bd8c..1f8a12d85e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-11.c
@@ -15,7 +15,7 @@ int bar(void)
}
/* We need to have both: a load from "a[0]" and a load from "*p.a",
- the latter can be an ssa temporary. */
+ the latter is an ssa temporary. */
/* { dg-final { scan-tree-dump "= a.0.;" "optimized" } } */
-/* { dg-final { scan-tree-dump "= \\*\[pD\]" "optimized" } } */
+/* { dg-final { scan-tree-dump "= \\*\[^\r\n\]*_.;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
index 7b3689049a..ce36d2c225 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-19.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -fdump-tree-alias-vops" } */
+/* { dg-options "-O2 -fdump-tree-alias" } */
const static int a;
@@ -26,5 +26,4 @@ int main()
}
/* { dg-final { scan-tree-dump "q_. = { a b }" "alias" } } */
-/* { dg-final { scan-tree-dump "q_., points-to vars: { a b }" "alias" } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-21.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-21.c
new file mode 100644
index 0000000000..4175588121
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-21.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+
+int f(int *r)
+{
+ r[0] = 0;
+ r[1] = 1;
+ return r[0];
+}
+
+
+/* { dg-final { scan-tree-dump-times "return 0;" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-22.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-22.c
new file mode 100644
index 0000000000..8c808fe430
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-22.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+
+int f(int *r)
+{
+ r[1] = 0;
+ r[2] = 1;
+ return r[1];
+}
+
+
+/* { dg-final { scan-tree-dump-times "return 0;" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-23.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-23.c
new file mode 100644
index 0000000000..9d0dd32061
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-23.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+typedef struct A { int i; double d; } A;
+
+void f1 (const char *c)
+{
+ A *s = (A*) __builtin_malloc (sizeof (A));
+ double *p = &s->d;
+ s->i = 42;
+ __builtin_memcpy (p, c, sizeof (double));
+ int j = s->i;
+ if (j != 42) __builtin_abort();
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-24.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-24.c
new file mode 100644
index 0000000000..0edd51f85c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-24.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void f (const char *c, int *i)
+{
+ *i = 42;
+ __builtin_memcpy (i + 1, c, sizeof (int));
+ if (*i != 42) __builtin_abort();
+}
+
+extern void keepit ();
+void g (const char *c, int *i)
+{
+ *i = 33;
+ __builtin_memcpy (i - 1, c, 3 * sizeof (int));
+ if (*i != 33) keepit();
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
+/* { dg-final { scan-tree-dump "keepit" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-25.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-25.c
new file mode 100644
index 0000000000..f5705d03cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-25.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+void f (long *p) {
+ *p = 42;
+ p[4] = 42;
+ __builtin_free (p);
+}
+
+/* { dg-final { scan-tree-dump-not "= 42" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-26.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-26.c
new file mode 100644
index 0000000000..a1eb8f7d0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-26.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+void f (const char *c, int *i)
+{
+ *i = 42;
+ __builtin_memcpy (i - 1, c, sizeof (int));
+ if (*i != 42) __builtin_abort();
+}
+
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-27.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-27.c
new file mode 100644
index 0000000000..91c737eae2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-27.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+void f (long *p) {
+ *p = 42;
+ p[4] = 42;
+ __builtin_memset (p, 0, 100);
+}
+
+/* { dg-final { scan-tree-dump-not "= 42" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-28.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-28.c
new file mode 100644
index 0000000000..8413230eaf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-28.c
@@ -0,0 +1,26 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+extern void abort (void);
+extern void *malloc(__SIZE_TYPE__);
+
+int * __attribute__((noinline,noclone))
+foo (int *p)
+{
+ int *q = (int *) malloc (sizeof (int));
+ *p = 1;
+ *q = 2;
+ if (*p != 1)
+ __link_error ();
+ *p = 3;
+ return q;
+}
+
+int main()
+{
+ int i;
+ int *p = foo (&i);
+ if (i != 3 || *p != 2)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c
new file mode 100644
index 0000000000..4d57ca8f8f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-29.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+union X {
+ int i;
+ void *p;
+};
+void bar (int);
+
+int * __attribute__((noinline,noclone))
+baz (int *p) { return p; }
+
+void foo (union X *x)
+{
+ struct Y { int i; } ystruct = {};
+ ystruct.i = * baz (&ystruct.i);
+ bar (x->i);
+}
+
+/* DSE and then DCE should be able to remove all uses of ystruct.
+ Formerly the union access for the parameter to bar let 'anything'
+ escape which made the call to bar possibly use ystruct and thus
+ prevent the store to ystruct.i from being eliminated. The call to
+ baz makes sure that ystruct has its address taken. */
+
+/* { dg-final { scan-tree-dump-not "ystruct" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-30.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-30.c
new file mode 100644
index 0000000000..7ef830d193
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-30.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre1-details" } */
+
+extern int posix_memalign(void **memptr,
+ __SIZE_TYPE__ alignment, __SIZE_TYPE__ size);
+
+int foo (float *p)
+{
+ int res = *p;
+ int *q;
+ void *tem;
+ if (posix_memalign (&tem, 128, 128 * sizeof (int)) != 0)
+ return 0;
+ q = (int *)tem;
+ *q = 1;
+ return res + *p;
+}
+
+/* We should be able to CSE the load from *p in the return stmt. */
+
+/* { dg-final { scan-tree-dump "Replaced \\\*p" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-31.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-31.c
new file mode 100644
index 0000000000..622df80a9c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-31.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-sra -fdump-tree-cddce1" } */
+
+extern int posix_memalign(void **memptr,
+ __SIZE_TYPE__ alignment, __SIZE_TYPE__ size);
+
+int foo (float *p)
+{
+ int res = *p;
+ struct { void *q1; void *q2; } q;
+ if (posix_memalign (&q.q1, 128, 128 * sizeof (int)) != 0)
+ return 0;
+ if (posix_memalign (&q.q2, 128, 128 * sizeof (int)) != 0)
+ return 0;
+ *((int *)q.q1) = 1;
+ *((int *)q.q2) = 2;
+ return res + *p + *((int *)q.q1) + *((int *)q.q2);
+}
+
+/* There should be only one load from *p left. All stores and all
+ other loads should be removed. */
+
+/* { dg-final { scan-tree-dump-times "\\\*\[^ \]" 1 "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c b/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c
index bcc011898f..9a41920e76 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/alias-6.c
@@ -15,7 +15,7 @@ int bar(void)
}
/* We need to have both: a load from "a[0]" and a load from "*p.a",
- the latter can be an ssa temporary. */
+ the latter is an ssa temporary. */
/* { dg-final { scan-tree-dump "= a.0.;" "optimized" } } */
-/* { dg-final { scan-tree-dump "= \\*\[pD\]" "optimized" } } */
+/* { dg-final { scan-tree-dump "= \\*\[^\r\n\]*_.;" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
new file mode 100644
index 0000000000..a1401c0790
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-3.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int f(int y, int x)
+{
+ return x & ((~x) | y);
+}
+int f1(int y, int x)
+{
+ return x & (y | (~x));
+}
+int f2(int y, int x)
+{
+ return ((~x) | y) & x;
+}
+int f3(int y, int x)
+{
+ return (y | (~x)) & x;
+}
+
+
+/* { dg-final { scan-tree-dump-times "~x" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "x_..D. \& y_..D." 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
new file mode 100644
index 0000000000..1dbdca7dff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-4.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int f(int y, int x)
+{
+ return x | ((~x) & y);
+}
+int f1(int y, int x)
+{
+ return x | (y & (~x));
+}
+int f2(int y, int x)
+{
+ return ((~x) & y) | x;
+}
+int f3(int y, int x)
+{
+ return (y & (~x)) | x;
+}
+
+
+/* { dg-final { scan-tree-dump-times "~x" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "x_..D. \\\| y_..D." 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c b/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c
new file mode 100644
index 0000000000..15097272a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/andor-5.c
@@ -0,0 +1,50 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int f(int y, int x)
+{
+ int a = x | y;
+ return a & x;
+}
+int f1(int y, int x)
+{
+ int a = y | x;
+ return a & x;
+}
+int f2(int y, int x)
+{
+ int a = x | y;
+ return x & a;
+}
+int f3(int y, int x)
+{
+ int a = x | y;
+ return x & a;
+}
+int f4(int y, int x)
+{
+ int a = x & y;
+ return a | x;
+}
+int f5(int y, int x)
+{
+ int a = y & x;
+ return a | x;
+}
+int f6(int y, int x)
+{
+ int a = x & y;
+ return x | a;
+}
+int f7(int y, int x)
+{
+ int a = x & y;
+ return x | a;
+}
+/* These all should be optimized to just return x; */
+
+
+/* { dg-final { scan-tree-dump-times "\\\|" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\&" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "return x_..D.;" 8 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
index c67b9b53f8..96d8ba624e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/asm-2.c
@@ -4,8 +4,12 @@
#ifdef __hppa__
#define REGISTER "1"
#else
+#ifdef __moxie__
+#define REGISTER "2"
+#else
#define REGISTER "0"
#endif
+#endif
void baz(void)
{
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c b/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
index 5ed282e49a..29b27f4ff5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/asm-3.c
@@ -31,6 +31,6 @@ void test(void)
/* { dg-final { scan-tree-dump-times "hardreg" 3 "optimized" } } */
/* In particular, hardreg should *not* appear in the call to bar. */
-/* { dg-final { scan-tree-dump-times "bar \[(\]t_.\[)\]" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "bar \[(\]\[^\n\r\]*_.\[)\]" 1 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/assign-1.c b/gcc/testsuite/gcc.dg/tree-ssa/assign-1.c
new file mode 100644
index 0000000000..f95f03ff42
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/assign-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+volatile int count;
+void bar(int);
+void foo()
+{
+ bar(count++);
+}
+
+/* { dg-final { scan-tree-dump-times "count =" 1 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/assign-2.c b/gcc/testsuite/gcc.dg/tree-ssa/assign-2.c
new file mode 100644
index 0000000000..47c38225b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/assign-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+volatile int count;
+int arr[4];
+void foo()
+{
+ arr[count++] = 0;
+}
+
+/* { dg-final { scan-tree-dump-times "count =" 1 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/assign-3.c b/gcc/testsuite/gcc.dg/tree-ssa/assign-3.c
new file mode 100644
index 0000000000..e5426d781e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/assign-3.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-gimple" } */
+
+extern void abort (void);
+struct S { int i; };
+struct S arr[32];
+volatile int count = 0;
+
+struct S __attribute__((noinline))
+incr ()
+{
+ ++count;
+}
+
+int main()
+{
+ arr[count++] = incr ();
+ if (count != 2)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times " = count;" 3 "gimple" } } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-alias-2.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-alias-2.c
new file mode 100644
index 0000000000..89477d92f2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-alias-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-alias "" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+static int a=4;
+static int b __attribute__ ((alias("a")));
+main()
+{
+ return b+a;
+}
+/* { dg-final { scan-tree-dump "return 8" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-alias.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-alias.c
new file mode 100644
index 0000000000..fe4084d213
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-alias.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-alias "" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+void abort (void);
+__attribute__ ((weak))
+int test()
+{
+ return 0;
+}
+static int test2() __attribute__ ((alias("test")));
+static int test1() __attribute__ ((weakref)) __attribute__ ((alias("test2")));
+static int test4() __attribute__ ((weakref)) __attribute__ ((alias("test")));
+main()
+{
+ test();
+ test2();
+ test3();
+ test4();
+}
+
+/* calls to test1 and test2 can be inlined and optmized away. Calls
+ to test and test4 are overwritable. */
+
+/* { dg-final { scan-tree-dump-times " test " 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " test4 " 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-not " test1 " "optimized" } } */
+/* { dg-final { scan-tree-dump-not " test2 " "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
new file mode 100644
index 0000000000..d0225ec164
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/attr-hotcold-2.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-ipa-profile_estimate-blocks-details" } */
+
+void g(void);
+void h(void);
+void f(int x, int y)
+{
+ if (x) goto A;
+ if (y) goto B;
+ return;
+
+ A: __attribute__((cold))
+ g();
+ return;
+
+ B: __attribute__((hot))
+ h();
+ return;
+}
+
+/* { dg-final { scan-ipa-dump-times "block 4, loop depth 0, count 0, freq 1\[^0-9\]" 1 "profile_estimate" } } */
+
+/* Note: we're attempting to match some number > 6000, i.e. > 60%.
+ The exact number ought to be tweekable without having to juggle
+ the testcase around too much. */
+/* { dg-final { scan-ipa-dump-times "block 5, loop depth 0, count 0, freq \[6-9\]\[0-9\]\[0-9\]\[0-9\]" 1 "profile_estimate" } } */
+
+/* { dg-final { cleanup-ipa-dump "profile_estimate" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
index b08e1242bb..b69cb9055a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
typedef struct { int i; } FILE;
FILE *fp;
@@ -29,13 +29,13 @@ void test (void)
vi9 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab"} } */
-/* { dg-final { scan-tree-dump "vi8.*fprintf.*fp.*\"%d%d\".*vi9" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi8.*fprintf.*fp.*\"%d%d\".*vi9" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
index 93e38cb9a5..201186bc41 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-fprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
typedef struct { int i; } FILE;
FILE *fp;
@@ -29,13 +29,13 @@ void test (void)
vi9 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab"} } */
-/* { dg-final { scan-tree-dump "vi8.*__fprintf_chk.*fp.*1.*\"%d%d\".*vi9" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*fwrite.*\"hello\".*1, 5, fp.*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*fputc.*fp.*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi7.*fputc.*fp.*vi8" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi8.*__fprintf_chk.*fp.*1.*\"%d%d\".*vi9" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
index a78d0880cf..f6bde472d4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
extern int printf (const char *, ...);
volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via;
@@ -29,14 +29,14 @@ void test (void)
via = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
-/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*printf.*\"hello\".*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*printf.*\"hello\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
index 2f85b28ed7..c7e931366c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-printf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
extern int __printf_chk (int, const char *, ...);
volatile int vi0, vi1, vi2, vi3, vi4, vi5, vi6, vi7, vi8, vi9, via;
@@ -29,14 +29,14 @@ void test (void)
via = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab"} } */
-/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab"} } */
-/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*__printf_chk.*1.*\"hello\".*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*__printf_chk.*1.*\"hello\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*puts.*\"hello\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*putchar.*vi7" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi7 ={v} 0\[^\(\)\]*vi8 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi8.*putchar.*vi9" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi9.*puts.*\"hello\\\\n\".*via" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
index 1083f13bc3..60cbe4fc7b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
#include <stdarg.h>
@@ -29,11 +29,11 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*vfprintf.*\"%s\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*vfprintf.*\"%c\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*vfprintf.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
index ce767d1a13..ead09cedaf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vfprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
#include <stdarg.h>
@@ -29,11 +29,11 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*fwrite.*\"hello\".*1, 5, fp.*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*fwrite.*\"hello\\\\n\".*1, 6, fp.*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*fputc.*fp.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*__vfprintf_chk.*fp.*1.*\"%s\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*__vfprintf_chk.*fp.*1.*\"%c\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*__vfprintf_chk.*fp.*1.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
index 416ee5b54e..f87186dd8a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
#include <stdarg.h>
@@ -27,11 +27,11 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*vprintf.*\"hello\".*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*vprintf.*\"%s\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*vprintf.*\"%c\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*vprintf.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
index 567a3dfd11..3ffb51b8d6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-vprintf-chk-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-fab" } */
+/* { dg-options "-O2 -fdump-tree-fab1" } */
#include <stdarg.h>
@@ -27,11 +27,11 @@ test (va_list ap1, va_list ap2, va_list ap3, va_list ap4, va_list ap5,
vi7 = 0;
}
-/* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "fab"} } */
-/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab"} } */
-/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab"} } */
-/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab"} } */
-/* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "fab"} } */
-/* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "fab"} } */
-/* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump "vi0.*__vprintf_chk.*1.*\"hello\".*vi1" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi1.*puts.*\"hello\".*vi2" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi2.*putchar.*vi3" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi3 ={v} 0\[^\(\)\]*vi4 ={v} 0" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi4.*__vprintf_chk.*1.*\"%s\".*vi5" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi5.*__vprintf_chk.*1.*\"%c\".*vi6" "fab1"} } */
+/* { dg-final { scan-tree-dump "vi6.*__vprintf_chk.*1.*\"%s\\\\n\".*vi7" "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/coalesce-1.c b/gcc/testsuite/gcc.dg/tree-ssa/coalesce-1.c
new file mode 100644
index 0000000000..5cae9ae2a3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/coalesce-1.c
@@ -0,0 +1,195 @@
+/* { dg-do compile } */
+
+/* { dg-options "-O2 -fdump-rtl-expand-details" } */
+
+typedef long unsigned int size_t;
+union tree_node;
+typedef union tree_node *tree;
+union gimple_statement_d;
+typedef union gimple_statement_d *gimple;
+typedef const union tree_node *const_tree;
+typedef const union gimple_statement_d *const_gimple;
+struct gimple_seq_d;
+typedef struct gimple_seq_d *gimple_seq;
+struct edge_def;
+typedef struct edge_def *edge;
+struct basic_block_def;
+typedef struct basic_block_def *basic_block;
+typedef const struct basic_block_def *const_basic_block;
+struct tree_exp
+{
+ tree operands[1];
+};
+typedef struct ssa_use_operand_d
+{
+ tree *use;
+} ssa_use_operand_t;
+struct phi_arg_d
+{
+ struct ssa_use_operand_d imm_use;
+};
+union tree_node
+{
+ struct tree_exp exp;
+};
+struct function
+{
+};
+extern struct function *cfun;
+struct edge_def
+{
+ unsigned int dest_idx;
+};
+static __inline__ void
+VEC_edge_must_be_pointer_type (void)
+{
+ (void) ((edge) 1 == (void *) 1);
+} typedef struct VEC_edge_base
+
+{
+ unsigned num;
+ unsigned alloc;
+ edge vec[1];
+} VEC_edge_base;
+typedef struct VEC_edge_none
+{
+ VEC_edge_base base;
+} VEC_edge_none;
+
+static __inline__ edge
+VEC_edge_base_index (const VEC_edge_base * vec_, unsigned ix_,
+ const char *file_, unsigned line_, const char *function_)
+{
+ return vec_->vec[ix_];
+}
+
+typedef struct VEC_edge_gc
+{
+ VEC_edge_base base;
+} VEC_edge_gc;
+struct basic_block_def
+{
+ VEC_edge_gc *succs;
+};
+static __inline__ edge
+single_succ_edge (const_basic_block bb)
+{
+ return (VEC_edge_base_index
+ ((((bb)->succs) ? &((bb)->succs)->base : 0), (0),
+ "/home/gcc/virgin-gcc/gcc/basic-block.h", 563, __FUNCTION__));
+}
+
+edge find_edge (basic_block, basic_block);
+typedef tree *def_operand_p;
+typedef ssa_use_operand_t *use_operand_p;
+struct gimple_seq_node_d;
+typedef struct gimple_seq_node_d *gimple_seq_node;
+struct gimple_seq_node_d
+{
+ gimple stmt;
+};
+typedef struct
+{
+ gimple_seq_node ptr;
+ gimple_seq seq;
+ basic_block bb;
+} gimple_stmt_iterator;
+struct gimple_statement_phi
+{
+ struct phi_arg_d args[1];
+};
+union gimple_statement_d
+{
+ struct gimple_statement_phi gimple_phi;
+};
+extern size_t const gimple_ops_offset_[];
+static __inline__ tree *
+gimple_ops (gimple gs)
+{
+ size_t off;
+ off = gimple_ops_offset_[gimple_statement_structure (gs)];
+ return (tree *) ((char *) gs + off);
+}
+
+static __inline__ tree
+gimple_op (const_gimple gs, unsigned i)
+{
+ return gimple_ops ((((union
+ {
+ const union gimple_statement_d * _q;
+ union gimple_statement_d * _nq;}) (((gs))))._nq))[i];
+}
+
+static __inline__ struct phi_arg_d *
+gimple_phi_arg (gimple gs, unsigned index)
+{
+ return &(gs->gimple_phi.args[index]);
+}
+
+static __inline__ tree
+gimple_switch_label (const_gimple gs, unsigned index)
+{
+ return gimple_op (gs, index + 1);
+}
+
+gimple_stmt_iterator gsi_start_phis (basic_block);
+extern basic_block label_to_block_fn (struct function *, tree);
+
+static __inline__ tree
+get_use_from_ptr (use_operand_p use)
+{
+ return *(use->use);
+}
+
+static __inline__ use_operand_p
+gimple_phi_arg_imm_use_ptr (gimple gs, int i)
+{
+ return &gimple_phi_arg (gs, i)->imm_use;
+}
+
+struct switch_conv_info
+{
+ basic_block final_bb;
+ basic_block switch_bb;
+ const char *reason;
+ tree *default_values;
+};
+static struct switch_conv_info info;
+
+static void
+gather_default_values (tree default_case)
+{
+ gimple_stmt_iterator gsi;
+ basic_block bb =
+ (label_to_block_fn ((cfun + 0), default_case->exp.operands[2]));
+ edge e;
+ int i = 0;
+ if (bb == info.final_bb)
+ e = find_edge (info.switch_bb, bb);
+ else
+ e = single_succ_edge (bb);
+ for (gsi = gsi_start_phis (info.final_bb);
+ gsi_gsi_start_phis (info.final_bb); gsi_next (&gsi))
+ {
+ gimple phi = gsi.ptr->stmt;
+ tree val = get_use_from_ptr (gimple_phi_arg_imm_use_ptr
+ ((((phi))), (((e)->dest_idx))));
+ info.default_values[i++] = val;
+ }
+}
+
+unsigned char
+process_switch (gimple swtch)
+{
+ unsigned int i, branch_num = gimple_switch_num_labels (swtch);
+ tree index_type;
+ info.reason = "switch has no labels\n";
+ gather_default_values (gimple_switch_label (swtch, 0));
+}
+
+/* Verify that out-of-ssa coalescing did its job by verifying there are not
+ any partition copies inserted. */
+
+/* { dg-final { scan-rtl-dump-not "partition copy" "expand"} } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/coalesce-2.c b/gcc/testsuite/gcc.dg/tree-ssa/coalesce-2.c
new file mode 100644
index 0000000000..56c5ccccc7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/coalesce-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-expand-details" } */
+
+float total = 0.2;
+void foo(int n)
+{
+ int i;
+ for (i = 0; i < n; i++)
+ total += i;
+}
+
+/* Verify that out-of-ssa coalescing did its job by verifying there are not
+ any partition copies inserted. */
+
+/* { dg-final { scan-rtl-dump-not "partition copy" "expand"} } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-1.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-1.c
new file mode 100644
index 0000000000..0bea9a9f00
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-cunrolli-details" } */
+int a[2];
+test(int c)
+{
+ int i;
+ for (i=0;i<c;i++)
+ a[i]=5;
+}
+/* Array bounds says the loop will not roll much. */
+/* { dg-final { scan-tree-dump "loop with 3 iterations completely unrolled" "cunrolli"} } */
+/* { dg-final { scan-tree-dump "Last iteration exit edge was proved true." "cunrolli"} } */
+/* { dg-final { cleanup-tree-dump "cunrolli" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-10.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-10.c
new file mode 100644
index 0000000000..f2cd904efc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-10.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -Warray-bounds -fdump-tree-cunroll-details" } */
+int a[3];
+int b[4];
+int
+foo (int n)
+{
+ int i;
+ for (i=0;i<n;i++)
+ if (b[i]==2)
+ a[i]++;
+}
+/* { dg-final { scan-tree-dump-times "Forced statement unreachable" 2 "cunroll" } } */
+/* { dg-final { cleanup-tree-dump "cunroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c
new file mode 100644
index 0000000000..e16d0086fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-cunroll-details" } */
+int a[2];
+test(int c)
+{
+ int i;
+ for (i=0;i<c;i++)
+ {
+ a[i]=5;
+ if (test2())
+ return;
+ }
+}
+/* We are not able to get rid of the final conditional because the loop has two exits. */
+/* { dg-final { scan-tree-dump "loop with 2 iterations completely unrolled" "cunroll"} } */
+/* { dg-final { cleanup-tree-dump "cunroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-3.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-3.c
new file mode 100644
index 0000000000..dd6ce50674
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-cunrolli-details" } */
+int a[1];
+test(int c)
+{
+ int i;
+ for (i=0;i<c;i++)
+ {
+ a[i]=5;
+ }
+}
+/* If we start duplicating headers prior curoll, this loop will have 0 iterations. */
+
+/* { dg-final { scan-tree-dump "loop with 2 iterations completely unrolled" "cunrolli"} } */
+/* { dg-final { cleanup-tree-dump "cunrolli" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-4.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-4.c
new file mode 100644
index 0000000000..86e12bbb41
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-4.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-ivcanon-details" } */
+int a[1];
+test(int c)
+{
+ int i=0,j;
+ for (i=0;i<c;i++)
+ {
+ for (j=0;j<c;j++)
+ {
+ a[i]=5;
+ test2();
+ }
+ }
+}
+
+/* We should do this as part of cunrolli, but our cost model do not take into account early exit
+ from the last iteration. */
+/* { dg-final { scan-tree-dump "loop turned into non-loop; it never loops." "ivcanon"} } */
+/* { dg-final { scan-tree-dump "Last iteration exit edge was proved true." "ivcanon"} } */
+/* { dg-final { cleanup-tree-dump "ivcanon" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-5.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-5.c
new file mode 100644
index 0000000000..1e9b8bfbab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-5.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-cunroll-details" } */
+int *a;
+test(int c)
+{
+ int i;
+ for (i=0;i<6;i++)
+ a[i]=5;
+}
+/* Basic testcase for complette unrolling. */
+/* { dg-final { scan-tree-dump "loop with 6 iterations completely unrolled" "cunroll"} } */
+/* { dg-final { scan-tree-dump "Exit condition of peeled iterations was eliminated." "cunroll"} } */
+/* { dg-final { scan-tree-dump "Last iteration exit edge was proved true." "cunroll"} } */
+/* { dg-final { cleanup-tree-dump "cunroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/cunroll-9.c b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-9.c
new file mode 100644
index 0000000000..f3b59f9fe3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/cunroll-9.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-cunrolli-details" } */
+void abort (void);
+int a[10];
+int b[11];
+t (int n)
+{
+ int i;
+ int sum = 0;
+ for (i = 0; i < n; i++)
+ {
+ if (i > 1000)
+ abort ();
+ if (q ())
+ sum += a[i];
+ else
+ sum += b[i];
+ }
+ return sum;
+}
+/* { dg-final { scan-tree-dump-times "Removed pointless exit:" 1 "cunrolli" } } */
+/* { dg-final { cleanup-tree-dump "cunrolli" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c
new file mode 100644
index 0000000000..0c81d92bfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/fnsplit-1.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fnsplit" } */
+#include <stdio.h>
+int a[1000];
+
+void
+t(int a)
+{
+ if (a)
+ printf ("I Am Completely Operational,"),
+ printf ("And All My Circuits Are Functioning Perfectly\n");
+}
+int
+main(void)
+{
+ int i;
+ for (i = 0; i < 1000; i++)
+ t(a[i]);
+ return 0;
+}
+/* { dg-final { scan-tree-dump-times "Splitting function at:" 1 "fnsplit"} } */
+
+/* { dg-final { cleanup-tree-dump "fnsplit" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c b/gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c
index 08b827c1d3..9444f0be20 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/foldcast-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-fdump-tree-original" } */
-typedef int ssize_t __attribute__((mode(pointer)));
+typedef __INTPTR_TYPE__ ssize_t;
ssize_t foo (ssize_t x)
{
return (ssize_t)(char *)x;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/foldconst-6.c b/gcc/testsuite/gcc.dg/tree-ssa/foldconst-6.c
new file mode 100644
index 0000000000..0c08f8f258
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/foldconst-6.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+typedef long vec __attribute__ ((vector_size (2 * sizeof(long))));
+
+void f (vec *r)
+{
+ vec a = { -2, 666 };
+ vec b = { 3, 2 };
+ *r = a < b;
+}
+
+/* { dg-final { scan-tree-dump-not "666" "ccp1"} } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c b/gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c
index 3cfe44d1bd..e738a44ab0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/foldstring-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-fre1" } */
+/* { dg-options "-O1 -fdump-tree-gimple" } */
void
arf ()
@@ -7,5 +7,5 @@ arf ()
if (""[0] == 0)
blah ();
}
-/* { dg-final { scan-tree-dump-times "= 0;" 1 "fre1"} } */
-/* { dg-final { cleanup-tree-dump "fre1" } } */
+/* { dg-final { scan-tree-dump-times "= 0;" 1 "gimple"} } */
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
index 7b07d7f488..955e767913 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-1.c
@@ -1,8 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop1" } */
-/* We should be able to optimize this to b->t[i] = 1 during
- early optimizations. */
+/* We may not optimize this to b->t[i] = 1. */
struct a
{
@@ -15,5 +14,5 @@ void f(struct a * b, __SIZE_TYPE__ i)
c[i] = 1;
}
-/* { dg-final { scan-tree-dump-times "t\\\[i.*\\\].* = 1;" 1 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "\\\[\[^\n\r\]*\\\] = 1;" 0 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
index 24c9d16d9d..08d0864af5 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-11.c
@@ -16,5 +16,5 @@ int g(int *p, int n)
return q[-1];
}
-/* { dg-final { scan-tree-dump-times "= MEM\\\[\\\(int \\\*\\\)a_.. \\\+ 4B\\\];" 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "= MEM\\\[\\\(int \\\*\\\)\[ap\]_.. \\\+ 4B\\\];" 2 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-17.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-17.c
new file mode 100644
index 0000000000..a85d0eb9c5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-17.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int foo (int xx, int xy)
+{
+ xx &=1;
+ xy &=1;
+ return xx ^ xy;
+}
+
+/* { dg-final { scan-tree-dump-times " & 1" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
new file mode 100644
index 0000000000..2c4d120e99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-18.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+signed char f1(signed char n)
+{
+ return (long double)n;
+}
+unsigned long long f2(signed char n)
+{
+ return (long double)n;
+}
+
+unsigned long long g1(unsigned long long n)
+{
+ return (float)n;
+}
+signed char g2(unsigned long long n)
+{
+ return (float)n;
+}
+
+/* { dg-final { scan-tree-dump-times "\\\(float\\\)" 2 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-not "\\\(long double\\\)" "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-19.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-19.c
new file mode 100644
index 0000000000..f309e3c7b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-19.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+typedef int vec __attribute__((vector_size (4 * sizeof (int))));
+void f (vec *x1, vec *x2)
+{
+ vec m = { 1, 2, 3, 0 };
+ vec n = { 3, 0, 1, 2 };
+ vec y = __builtin_shuffle (*x1, *x2, n);
+ vec z = __builtin_shuffle (y, m);
+ *x1 = z;
+}
+
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c
index 2aefb9ace6..bcdd78d108 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-2.c
@@ -1,8 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-forwprop1" } */
-/* We should be able to optimize this to b->t[i] = 1 during
- early optimizations. */
+/* We may not optimize this to b->t[i] = 1. */
struct a
{
@@ -17,5 +16,5 @@ void f(__SIZE_TYPE__ i)
c[i] = 1;
}
-/* { dg-final { scan-tree-dump-times "t\\\[i.*\\\].* = 1;" 1 "forwprop1" } } */
+/* { dg-final { scan-tree-dump-times "\\\[\[^\n\r\]*\\\] = 1;" 0 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop?" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-20.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-20.c
new file mode 100644
index 0000000000..b1daa91335
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-20.c
@@ -0,0 +1,70 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target double64 } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+#include <stdint.h>
+
+/* All of these optimizations happen for unsupported vector modes as a
+ consequence of the lowering pass. We need to test with a vector mode
+ that is supported by default on at least some architectures, or make
+ the test target specific so we can pass a flag like -mavx. */
+
+typedef double vecf __attribute__ ((vector_size (2 * sizeof (double))));
+typedef int64_t veci __attribute__ ((vector_size (2 * sizeof (int64_t))));
+
+void f (double d, vecf* r)
+{
+ vecf x = { -d, 5 };
+ vecf y = { 1, 4 };
+ veci m = { 2, 0 };
+ *r = __builtin_shuffle (x, y, m); // { 1, -d }
+}
+
+void g (float d, vecf* r)
+{
+ vecf x = { d, 5 };
+ vecf y = { 1, 4 };
+ veci m = { 2, 1 };
+ *r = __builtin_shuffle (x, y, m); // { 1, 5 }
+}
+
+void h (double d, vecf* r)
+{
+ vecf x = { d + 1, 5 };
+ vecf y = { 1 , 4 };
+ veci m = { 2 , 0 };
+ *r = __builtin_shuffle (y, x, m); // { d + 1, 1 }
+}
+
+void i (float d, vecf* r)
+{
+ vecf x = { d, 5 };
+ veci m = { 1, 0 };
+ *r = __builtin_shuffle (x, m); // { 5, d }
+}
+
+void j (vecf* r)
+{
+ vecf y = { 1, 2 };
+ veci m = { 0, 0 };
+ *r = __builtin_shuffle (y, m); // { 1, 1 }
+}
+
+void k (vecf* r)
+{
+ vecf x = { 3, 4 };
+ vecf y = { 1, 2 };
+ veci m = { 3, 0 };
+ *r = __builtin_shuffle (x, y, m); // { 2, 3 }
+}
+
+void l (double d, vecf* r)
+{
+ vecf x = { -d, 5 };
+ vecf y = { d, 4 };
+ veci m = { 2, 0 };
+ *r = __builtin_shuffle (x, y, m); // { d, -d }
+}
+
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-21.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-21.c
new file mode 100644
index 0000000000..d92b9b33af
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-21.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-copyprop1" } */
+typedef int v4si __attribute__ ((vector_size (4 * sizeof(int))));
+
+int
+test (v4si *x, v4si *y)
+{
+ v4si m = { 2, 3, 6, 5 };
+ v4si z = __builtin_shuffle (*x, *y, m);
+ return z[2];
+}
+
+/* Optimization in forwprop1, cleanup in copyprop1. */
+
+/* { dg-final { scan-tree-dump-not "VEC_PERM_EXPR" "copyprop1" } } */
+/* { dg-final { cleanup-tree-dump "copyprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-23.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-23.c
new file mode 100644
index 0000000000..5204993363
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-23.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+typedef long vec __attribute__ ((vector_size (2 * sizeof (long))));
+
+long f (long d, long e)
+{
+ vec x = { d, e };
+ vec m = { 1, 0 };
+ return __builtin_shuffle (x, m) [1];
+}
+
+
+/* { dg-final { scan-tree-dump-not "BIT_FIELD_REF" "forwprop1" } } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c
new file mode 100644
index 0000000000..74207cf1a8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-24.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-cddce1" } */
+
+void bar (void);
+unsigned short
+foo (unsigned char x, unsigned short y)
+{
+ unsigned char t = (unsigned char)((x & 1) ^ ((unsigned char)y & 1));
+ if (t == 1)
+ bar ();
+ return y;
+}
+
+/* We should have combined this to require only one bitwise and
+ as in (x ^ (char) y) & 1. */
+
+/* { dg-final { scan-tree-dump-times " & " 1 "cddce1" } } */
+/* { dg-final { cleanup-tree-dump "cddce1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-25.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-25.c
new file mode 100644
index 0000000000..cf0c504275
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-25.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-forwprop1" } */
+
+struct rtx_def;
+typedef struct rtx_def *rtx;
+typedef const struct rtx_def *const_rtx;
+enum machine_mode
+{
+ MAX_MACHINE_MODE,
+ NUM_MACHINE_MODES = MAX_MACHINE_MODE
+};
+extern const char *const mode_name[NUM_MACHINE_MODES];
+enum mode_class
+{ MODE_RANDOM, MODE_CC, MODE_INT, MODE_PARTIAL_INT, MODE_FRACT, MODE_UFRACT,
+ MODE_ACCUM, MODE_UACCUM, MODE_FLOAT, MODE_DECIMAL_FLOAT, MODE_COMPLEX_INT,
+ MODE_COMPLEX_FLOAT, MODE_VECTOR_INT, MODE_VECTOR_FRACT,
+ MODE_VECTOR_UFRACT, MODE_VECTOR_ACCUM, MODE_VECTOR_UACCUM,
+ MODE_VECTOR_FLOAT, MAX_MODE_CLASS };
+extern const unsigned char mode_class[NUM_MACHINE_MODES];
+extern const unsigned short mode_precision[NUM_MACHINE_MODES];
+struct rtx_def
+{
+ __extension__ enum machine_mode mode:8;
+};
+void
+convert_move (rtx to, rtx from, int unsignedp)
+{
+ enum machine_mode to_mode = ((enum machine_mode) (to)->mode);
+ enum machine_mode from_mode = ((enum machine_mode) (from)->mode);
+ ((void)
+ (!((mode_precision[from_mode] != mode_precision[to_mode])
+ || ((((enum mode_class) mode_class[from_mode]) == MODE_DECIMAL_FLOAT) !=
+ (((enum mode_class) mode_class[to_mode]) ==
+ MODE_DECIMAL_FLOAT))) ?
+ fancy_abort ("/home/gcc/virgin-gcc/gcc/expr.c", 380, __FUNCTION__),
+ 0 : 0));
+}
+
+/* { dg-final { scan-tree-dump "Replaced.*!=.*with.*!=.* " "forwprop1"} } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
+
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-26.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-26.c
new file mode 100644
index 0000000000..108b1bcaae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-26.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-forwprop1 -fno-short-enums" } */
+
+union tree_node;
+typedef union tree_node *tree;
+enum tree_code
+{
+ MAX_TREE_CODES
+};
+extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
+struct tree_base
+{
+ __extension__ enum tree_code code:16;
+ unsigned public_flag:1;
+};
+enum tree_node_structure_enum
+{
+ TS_DECL_WITH_VIS,
+};
+struct tree_decl_with_vis
+{
+ unsigned comdat_flag:1;
+};
+union tree_node
+{
+ struct tree_base base;
+ struct tree_decl_with_vis decl_with_vis;
+};
+struct varpool_node
+{
+ tree decl;
+ struct varpool_node *next_needed, *prev_needed;
+ unsigned externally_visible:1;
+};
+extern struct varpool_node *varpool_nodes_queue;
+struct pointer_set_t;
+struct pointer_set_t *pointer_set_create (void);
+__inline__ static unsigned char
+varpool_externally_visible_p (struct varpool_node *vnode,
+ unsigned char aliased)
+{
+ struct varpool_node *alias;
+ if (!(( { __typeof (vnode->decl) const __t = (vnode->decl); __t;})->decl_with_vis.comdat_flag)
+ && !((vnode->decl)->base.public_flag))
+ return 0;
+ if (aliased)
+ return 1;
+ return 0;
+}
+
+unsigned int
+function_and_variable_visibility (unsigned char whole_program)
+{
+ struct cgraph_node *node;
+ struct varpool_node *vnode;
+ struct pointer_set_t *aliased_vnodes = pointer_set_create ();
+ for (vnode = varpool_nodes_queue; vnode; vnode = vnode->next_needed)
+ if (varpool_externally_visible_p
+ (vnode, pointer_set_contains (aliased_vnodes, vnode)))
+ vnode->externally_visible = 1;
+}
+
+/* { dg-final { scan-tree-dump-not "& 255" "forwprop1"} } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-27.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-27.c
new file mode 100644
index 0000000000..9e1b0763b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-27.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-forwprop1" } */
+
+typedef int V __attribute__((vector_size(2*sizeof(int))));
+typedef __complex__ int C;
+
+void f (V *v1, V *v2){
+ V w1 = *v1;
+ V x1 = ~w1;
+ *v1 = x1 + 1;
+ V w2 = *v2;
+ V x2 = ~w2;
+ *v2 = x2 + w2;
+}
+
+void g (V *v1, V *v2){
+ V c1 = { 5, -10 };
+ V c2 = { 32, 13 };
+ *v1 = (*v1|c1)&c2;
+ *v2 = (*v2^c1)^c2;
+}
+
+void h (C *v1, C *v2){
+ C w = *v2;
+ C x = *v1 - w;
+ *v1 = x + w;
+}
+
+void i (V *v1, V *v2){
+ V c1 = { 5, -10 };
+ V c2 = { 32, 13 };
+ *v1 = (*v1-c1)+c2;
+ *v2 = (c1-*v2)+c2;
+}
+
+/* { dg-final { scan-tree-dump-not "\\\+" "forwprop1"} } */
+/* { dg-final { scan-tree-dump "{ 0, 4 }" "forwprop1"} } */
+/* { dg-final { scan-tree-dump "{ 37, -5 }" "forwprop1"} } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c
new file mode 100644
index 0000000000..3fa9d5879f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-28.c
@@ -0,0 +1,80 @@
+/* Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 leads to two conditional jumps
+ when evaluating an && condition. VRP is not able to optimize this. */
+/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* } } } } } */
+/* { dg-options "-O2 -fdump-tree-forwprop1" } */
+
+extern char *frob (void);
+extern _Bool testit (void);
+
+test (int code)
+{
+ char *temp = frob ();
+ int rotate = (code == 22);
+ if (temp == 0 && !rotate)
+ oof ();
+}
+
+test_2 (int code)
+{
+ char *temp = frob ();
+ int rotate = (code == 22);
+ if (!rotate && temp == 0)
+ oof ();
+}
+
+
+test_3 (int code)
+{
+ char *temp = frob ();
+ int rotate = (code == 22);
+ if (!rotate || temp == 0)
+ oof ();
+}
+
+
+test_4 (int code)
+{
+ char *temp = frob ();
+ int rotate = (code == 22);
+ if (temp == 0 || !rotate)
+ oof ();
+}
+
+
+test_5 (int code)
+{
+ _Bool temp = testit ();
+ _Bool rotate = (code == 22);
+ if (temp == 0 && !rotate)
+ oof ();
+}
+
+test_6 (int code)
+{
+ _Bool temp = testit ();
+ _Bool rotate = (code == 22);
+ if (!rotate && temp == 0)
+ oof ();
+}
+
+
+test_7 (int code)
+{
+ _Bool temp = testit ();
+ _Bool rotate = (code == 22);
+ if (!rotate || temp == 0)
+ oof ();
+}
+
+
+test_8 (int code)
+{
+ _Bool temp = testit ();
+ _Bool rotate = (code == 22);
+ if (temp == 0 || !rotate)
+ oof ();
+}
+
+/* { dg-final { scan-tree-dump-times "Replaced" 8 "forwprop1"} } */
+/* { dg-final { cleanup-tree-dump "forwprop1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c
index 54e51097e4..4106b33162 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-6.c
@@ -22,6 +22,7 @@ void f(void)
particular situation before doing this transformation we have to
assure that a is killed by a dominating store via type float for
it to be valid. Then we might as well handle the situation by
- value-numbering, removing the load alltogether. */
-/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" { xfail *-*-* } } } */
+ value-numbering, removing the load altogether.
+ ??? We now do this after CPP re-writes a into SSA form. */
+/* { dg-final { scan-tree-dump-times "VIEW_CONVERT_EXPR" 1 "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c
index fc74297242..1c780c834c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/forwprop-8.c
@@ -11,6 +11,5 @@ int foo(struct X *q)
/* We should have propragated &q->a into (*pointer). */
-/* { dg-final { scan-tree-dump-times "pointer" 0 "forwprop1"} } */
-/* { dg-final { scan-tree-dump "\\\[0\\\]" "forwprop1" } } */
+/* { dg-final { scan-tree-dump "q_.\\\(D\\\)\\\]\\\[0\\\];" "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c
index 91a3f56a64..e5019c0125 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fwrapv -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fwrapv -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fwrapv -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
index 69eb6303f9..8344fdf59f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11a.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
index 33788134e3..50dea9cb3f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11b.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
index 269a85fd1a..f3ada9944a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-11c.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=3 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
index d74ebaf277..0888ecf59a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-2.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
index b2796c1b77..85bbc0b76f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-25.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c
index 954e24c92f..dadeb073d3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-26.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c
index abe07cae79..f314b28d3d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-28.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic" } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fvect-cost-model=dynamic -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c
index 0a862ab891..1b7101125e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/gen-vect-32.c
@@ -1,6 +1,6 @@
/* { dg-do run { target vect_cmdline_needed } } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats" } */
-/* { dg-options "-O2 -ftree-vectorize -ftree-vectorizer-verbose=4 -fdump-tree-vect-stats -mno-sse" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-details -fno-vect-cost-model" } */
+/* { dg-additional-options "-mno-sse" { target { i?86-*-* x86_64-*-* } } } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c
new file mode 100644
index 0000000000..7d45ec135e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-11.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-require-weak "" } */
+/* { dg-options "-O2 -fdump-tree-einline" } */
+int w;
+int bar (void) __attribute__ ((weak));
+int bar (){
+ w++;
+}
+void foo()
+{
+ bar();
+}
+/* { dg-final { scan-tree-dump-times "function body can be overwritten at link time" 1 "einline" } } */
+/* { dg-final { cleanup-tree-dump "einline" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
index ff140ed541..35c3ebbdaf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/inline-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-einline" } */
+/* { dg-options "-O2 -fdump-tree-einline --param max-early-inliner-iterations=2" } */
/* { dg-add-options bind_pic_locally } */
extern void inlined ();
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c
index 26b433823a..ec628b777a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ipa-cp-1.c
@@ -15,6 +15,6 @@ blah ()
{
very_long_function (1);
}
-/* One appereance for dump, one self recursive call and one call from main. */
-/* { dg-final { scan-tree-dump-times "very_long_function.constprop.0 \\(\\)" 3 "optimized"} } */
+/* One appearance for dump, one self recursive call and one call from main. */
+/* { dg-final { scan-tree-dump-times "very_long_function.constprop \\(\\)" 3 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c
index bf0714902a..8fc1244e1a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c
@@ -1,5 +1,5 @@
-/* { dg-do compile } */
-/* { dg-options "-O3 -fdump-tree-fnsplit -fdump-tree-optimized" } */
+/* { dg-do compile { target nonpic } } */
+/* { dg-options "-O3 -fdump-tree-fnsplit -fdump-tree-optimized --param=builtin-expect-probability=100" } */
struct a {int a,b;};
struct a make_me_big (int a);
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c
index 12070fa336..fcdf79d702 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c
@@ -1,6 +1,6 @@
/* PR tree-optimization/52019 */
/* { dg-do compile } */
-/* { dg-options "-O3 -fno-tree-sra -fdump-tree-fnsplit -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fno-tree-sra -fdump-tree-fnsplit -fdump-tree-optimized --param=builtin-expect-probability=100" } */
#include "ipa-split-5.c"
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c b/gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c
new file mode 100644
index 0000000000..f1f3101d3d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/isolate-1.c
@@ -0,0 +1,60 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-isolate-paths" } */
+
+
+struct demangle_component
+{
+
+ int type;
+ int zzz;
+
+};
+
+
+struct d_info
+{
+ struct demangle_component *comps;
+ int next_comp;
+ int num_comps;
+};
+
+
+static struct demangle_component *
+d_make_empty (struct d_info *di)
+{
+ struct demangle_component *p;
+
+ if (di->next_comp >= di->num_comps)
+ return ((void *)0);
+ p = &di->comps[di->next_comp];
+ return p;
+}
+
+
+
+struct demangle_component *
+d_type (struct d_info *di)
+{
+ struct demangle_component *ret;
+ ret = d_make_empty (di);
+ ret->type = 42;
+ ret->zzz = -1;
+ return ret;
+}
+
+/* We're testing three aspects of isolation here. First that isolation
+ occurs, second that if we have two null dereferences in a block that
+ that we delete everything from the first dereferece to the end of the
+ block, regardless of which comes first in the immediate use iterator
+ and finally that we set the RHS of the store to zero. */
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "->type = 42" 1 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "->type ={v} 0" 1 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "->zzz" 1 "isolate-paths"} } */
+/* { dg-final { cleanup-tree-dump "isolate-paths" } } */
+
+
+
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c b/gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c
new file mode 100644
index 0000000000..bfcaa2b01d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/isolate-2.c
@@ -0,0 +1,43 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-phicprop1" } */
+
+
+int z;
+int y;
+
+int * foo(int a) __attribute__((returns_nonnull));
+int * bar(void) __attribute__((returns_nonnull));
+
+int *
+foo(int a)
+
+{
+ switch (a)
+ {
+ case 0:
+ return &z;
+ default:
+ return (int *)0;
+ }
+}
+
+
+int *
+bar (void)
+{
+ return 0;
+}
+
+/* We testing that the path isolation code can take advantage of the
+ returns non-null attribute to isolate a path where NULL flows into
+ a return statement. We test this twice, once where the NULL flows
+ from a PHI, the second with an explicit return 0 in the IL.
+
+ We also verify that after isolation phi-cprop simplifies the
+ return statement so that it returns &z directly.
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "return &z;" 1 "phicprop1"} } */
+/* { dg-final { cleanup-tree-dump "isolate-paths" } } */
+/* { dg-final { cleanup-tree-dump "phicprop1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c b/gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c
new file mode 100644
index 0000000000..7dddd8062c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/isolate-3.c
@@ -0,0 +1,65 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-isolate-paths" } */
+
+
+typedef long unsigned int size_t;
+extern void *memset (void *__s, int __c, size_t __n)
+ __attribute__ ((__nothrow__, __leaf__)) __attribute__ ((__nonnull__ (1)));
+struct rtx_def;
+typedef struct rtx_def *rtx;
+typedef struct VEC_rtx_base
+
+{
+ unsigned num;
+ unsigned alloc;
+ rtx vec[1];
+} VEC_rtx_base;
+static __inline__ rtx *
+VEC_rtx_base_address (VEC_rtx_base * vec_)
+{
+ return vec_ ? vec_->vec : 0;
+}
+typedef struct VEC_rtx_gc
+{
+ VEC_rtx_base base;
+} VEC_rtx_gc;
+
+static __inline__ void
+VEC_rtx_gc_safe_grow (VEC_rtx_gc ** vec_, int size_, const char *file_,
+ unsigned line_, const char *function_)
+{
+ ((*vec_) ? &(*vec_)->base : 0)->num = size_;
+}
+
+static __inline__ void
+VEC_rtx_gc_safe_grow_cleared (VEC_rtx_gc ** vec_, int size_,
+ const char *file_, unsigned line_,
+ const char *function_, int oldsize)
+{
+ VEC_rtx_gc_safe_grow (vec_, size_, file_, line_, function_);
+ memset (&(VEC_rtx_base_address ((*vec_) ? &(*vec_)->base : 0))[oldsize], 0,
+ sizeof (rtx) * (size_ - oldsize));
+}
+
+static VEC_rtx_gc *reg_base_value;
+void
+init_alias_analysis (void)
+{
+ unsigned int maxreg = max_reg_num ();
+ (VEC_rtx_gc_safe_grow_cleared
+ (&(reg_base_value), maxreg, "../../../gcc-4.6.0/gcc/alias.c", 2755,
+ __FUNCTION__, arf ()));
+}
+
+
+
+/* This is an example of how a NULL pointer dereference can show up
+ without a PHI. Note VEC_rtx_gcc_safe_grow. If an earlier pass
+ (such as VRP) isolates the NULL path for some reason or another
+ we end up with an explicit NULL dereference in the IL. Yes, it
+ started with a PHI, but by the time the path isolation code runs
+ its explicit in the IL. */
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "isolate-paths"} } */
+/* { dg-final { cleanup-tree-dump "isolate-paths" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c b/gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c
new file mode 100644
index 0000000000..c9c074df62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/isolate-4.c
@@ -0,0 +1,32 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fisolate-erroneous-paths-attribute -fdump-tree-isolate-paths -fdump-tree-phicprop1" } */
+
+
+extern void foo(void *) __attribute__ ((__nonnull__ (1)));
+
+int z;
+
+void
+com (int a)
+{
+ foo (a == 42 ? &z : (void *) 0);
+}
+
+void
+bar (void)
+{
+ foo ((void *)0);
+}
+
+/* We testing that the path isolation code can take advantage of the
+ returns non-null attribute to isolate a path where NULL flows into
+ a return statement.
+
+ We also verify that after isolation phi-cprop simplifies the
+ return statement so that it returns &z directly.
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 2 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "foo .&z.;" 1 "phicprop1"} } */
+/* { dg-final { cleanup-tree-dump "isolate-paths" } } */
+/* { dg-final { cleanup-tree-dump "phicprop1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c b/gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c
new file mode 100644
index 0000000000..4d01d5c639
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/isolate-5.c
@@ -0,0 +1,52 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-isolate-paths -fdump-tree-optimized" } */
+
+struct demangle_component
+{
+
+ int type;
+ int zzz;
+
+};
+
+struct d_info
+{
+ struct demangle_component *comps;
+ int next_comp;
+ int num_comps;
+};
+
+static struct demangle_component *
+d_make_empty (struct d_info *di)
+{
+ struct demangle_component *p;
+
+ if (di->next_comp >= di->num_comps)
+ return ((void *)0);
+ p = &di->comps[di->next_comp];
+ return p;
+}
+
+struct demangle_component *
+d_type (struct d_info *di)
+{
+ struct demangle_component *ret;
+ ret = d_make_empty (di);
+ foo (ret->type);
+ bar (ret->zzz);
+ return ret;
+}
+
+/* We're testing two aspects of isolation here. First that isolation
+ occurs, second that if we have two null dereferences in a block that
+ that we delete everything from the first dereferece to the end of the
+ block, regardless of which comes first in the immediate use iterator.
+
+ We leave the 0->type in the IL, so expect to see ->type twice. */
+/* { dg-final { scan-tree-dump-times "__builtin_trap" 1 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "->type" 2 "isolate-paths"} } */
+/* { dg-final { scan-tree-dump-times "->type" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "\\.type" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "->zzz" 1 "isolate-paths"} } */
+/* { dg-final { cleanup-tree-dump "isolate-paths" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
index 60baa4bd33..74b73da687 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_1.c
@@ -14,5 +14,5 @@ void foo (int i_width, TYPE dst, TYPE src1, TYPE src2)
}
-/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "ivtmp.\[0-9_\]* = PHI <" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
index ba87b502cd..f27b900729 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_2.c
@@ -13,5 +13,5 @@ void foo (int i_width, TYPE dst, TYPE src1, TYPE src2)
}
}
-/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "ivtmp.\[0-9_\]* = PHI <" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c
index ae4185a7a7..b548e8f0fb 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_3.c
@@ -14,7 +14,7 @@ void foo (int i_width, char* dst, char* src1, char* src2)
src1+=sizeof(TYPE);
src2+=sizeof(TYPE);
}
-}
+}
-/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "ivtmp.\[0-9_\]* = PHI <" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
index 570664c922..330b3bf53e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_4.c
@@ -15,5 +15,5 @@ void foo (int i_width, TYPE dst, TYPE src1, TYPE src2)
}
}
-/* { dg-final { scan-tree-dump-times "PHI <ivtmp" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "ivtmp.\[0-9_\]* = PHI <" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
index 4c5a54b9af..c0f6398d82 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_infer_2.c
@@ -7,7 +7,8 @@
extern char a[];
-/* Can not infer loop iteration from array -- exit test can not be replaced. */
+/* Can not infer loop iteration from array -- exit test can not be
+ replaced by the array address. */
void foo (unsigned int i_width, TYPE dst)
{
unsigned long long i = 0;
@@ -21,5 +22,5 @@ void foo (unsigned int i_width, TYPE dst)
}
}
-/* { dg-final { scan-tree-dump-times "Replacing" 0 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "\[^:\]*if \\(.*j_\[0-9\]+.*\\)" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
index dc78a43f73..25ae845f71 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ivopt_mult_3.c
@@ -18,5 +18,5 @@ long foo(long* p, long* p2, int N1, int N2)
return s;
}
-/* { dg-final { scan-tree-dump-times "Replacing" 1 "ivopts"} } */
+/* { dg-final { scan-tree-dump-times "Replacing exit test: if \\(.*p2.*\\)" 1 "ivopts"} } */
/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-11.c
index 88651e7b72..902c25b155 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-11.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-all" } */
+/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-all" } */
void foo (int * __restrict__ ia,
int * __restrict__ ib,
@@ -28,6 +28,6 @@ void foo (int * __restrict__ ia,
*/
}
-/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" } } */
+/* { dg-final { scan-tree-dump-times "distributed: split to 1 loops and 1 library calls" 1 "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
index a26999e890..53a9fa4f9e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-16.c
@@ -14,8 +14,8 @@ void foo (int n)
}
}
-/* We should apply loop distribution and generate a memset (0). */
+/* We should not apply loop distribution and not generate a memset (0). */
-/* { dg-final { scan-tree-dump "distributed: split to 2" "ldist" } } */
-/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
+/* { dg-final { scan-tree-dump "Loop 1 is the same" "ldist" } } */
+/* { dg-final { scan-tree-dump-times "generated memset zero" 0 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-17.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-17.c
index 6690b91377..bbf54db2be 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-17.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-17.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details -fdisable-tree-cunroll -fdisable-tree-cunrolli" } */
typedef int mad_fixed_t;
struct mad_pcm
@@ -45,6 +45,6 @@ mad_synth_mute (struct mad_synth *synth)
return;
}
-/* { dg-final { scan-tree-dump "distributed: split to 4" "ldist" } } */
+/* { dg-final { scan-tree-dump "distributed: split to 0 loops and 4 library calls" "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 4 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c
new file mode 100644
index 0000000000..893ab8b703
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-18.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
+
+void foo (int *p, int n)
+{
+ int i;
+ for (i = 0; i < n; ++i)
+ p[i] = 0;
+}
+
+/* { dg-final { scan-tree-dump "generated memset zero" "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-19.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-19.c
new file mode 100644
index 0000000000..8ea9ceaef5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-19.c
@@ -0,0 +1,71 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-ldist-details" } */
+
+struct Foo
+{
+ char a;
+};
+
+struct Foo x[256];
+
+static void __attribute__((noinline,noclone))
+foo()
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ x[i] = (struct Foo){};
+}
+
+static void __attribute__((noinline,noclone))
+bar()
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ x[i].a = 1;
+}
+
+static void __attribute__((noinline,noclone))
+foobar(unsigned char c)
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ x[i].a = c;
+}
+
+static void __attribute__((noinline,noclone))
+foobar2(char c)
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ x[i].a = c;
+}
+
+struct Baz
+{
+ short a;
+};
+
+struct Baz y[256];
+
+static void __attribute__((noinline,noclone))
+baz()
+{
+ int i;
+ for (i = 0; i < 256; ++i)
+ y[i].a = -1;
+}
+
+int main()
+{
+ volatile int x;
+ foo();
+ bar();
+ foobar(x);
+ foobar2(x);
+ baz();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "generated memset zero" 1 "ldist" } } */
+/* { dg-final { scan-tree-dump-times "generated memset" 5 "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-20.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-20.c
new file mode 100644
index 0000000000..95ae2c04c1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-20.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
+
+void foo(char *);
+void my_memcpy (void *q, unsigned int n)
+{
+ unsigned i;
+ char p[1024];
+ for (i = 0; i < n; ++i)
+ ((char *)p)[i] = ((char *)q)[i];
+ foo(p);
+}
+
+struct S { int i; int j; };
+
+void my_memcpy2 (void *q, unsigned int n)
+{
+ unsigned i;
+ char p[1024];
+ for (i = 0; i < n; ++i)
+ ((struct S *)p)[i] = ((struct S *)q)[i];
+ foo(p);
+}
+
+char p[1024];
+void my_memmove (unsigned int n)
+{
+ unsigned i;
+ for (i = 0; i < n; ++i)
+ p[i] = p[i+1];
+ foo(p);
+}
+
+
+/* { dg-final { scan-tree-dump-times "generated memcpy" 2 "ldist" } } */
+/* { dg-final { scan-tree-dump-times "generated memmove" 1 "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-21.c
new file mode 100644
index 0000000000..5401dcf041
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-21.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-ldist-details" } */
+
+void bar(char *p, int n)
+{
+ int i;
+ for (i = 1; i < n; i++)
+ p[i-1] = p[i];
+}
+
+/* { dg-final { scan-tree-dump "generated memmove" "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-22.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-22.c
new file mode 100644
index 0000000000..afc792f650
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-22.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-tree-ldist-details" } */
+
+extern void abort (void);
+
+int a[1024], b[1024];
+
+void __attribute__((noinline,noclone))
+foo (void)
+{
+ int i;
+ for (i = 0; i < 1024; ++i)
+ {
+ a[i] = 0;
+ if (i > 100)
+ b[i] = i;
+ }
+}
+
+int main()
+{
+ b[100] = 1;
+ foo ();
+ if (b[100] != 1 || b[101] != 101)
+ abort ();
+ if (a[0] != 0 || a[101] != 0)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "generated memset zero" "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-23.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-23.c
new file mode 100644
index 0000000000..0e7609bdb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-23.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-tree-ldist-details" } */
+
+extern void abort (void);
+
+int a[128], b[128], c[128], d[128];
+
+void __attribute__((noinline,noclone))
+foo (void)
+{
+ int i;
+ for (i = 0; i < 128; ++i)
+ {
+ a[i] = a[i] + 1;
+ b[i] = d[i];
+ c[i] = a[i] / d[i];
+ }
+}
+int main()
+{
+ int i;
+ for (i = 0; i < 128; ++i)
+ a[i] = i;
+ for (i = 0; i < 128; ++i)
+ d[i] = 1;
+ foo ();
+ if (c[0] != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "split to 1 loops and 1 library call" "ldist" } } */
+/* { dg-final { scan-tree-dump "generated memcpy" "ldist" } } */
+/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c
index a744fea020..80626bdaca 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-4.c
@@ -10,20 +10,18 @@ int loop1 (int k)
a[0] = k;
for (i = 1; i < 100; i ++)
{
- for (j = 0; j < 100; j++)
+ for (j = 1; j < 100; j++)
{
a[j] = k * i;
b[i][j] = a[j-1] + k;
}
}
- return b[100-1][0];
+ return b[100-1][1];
}
-/* We used to distribute also innermost loops, but these could produce
- too much code in the outer loop, degrading performance of scalar
- code. So this test was XFAILed because the cost model of the stand
- alone distribution pass has evolved. Now it passes. */
-/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 0 "ldist" { target ilp32 } } } */
-/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 1 "ldist" { target lp64 } } } */
+/* The current cost model fuses the two partitions because they have
+ similar memory accesses. */
+/* { dg-final { scan-tree-dump "similar memory accesses" "ldist" } } */
+/* { dg-final { scan-tree-dump-times "distributed: split to 2 loops" 0 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c
new file mode 100644
index 0000000000..aecb49f1c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-loop-distribution -fno-tree-scev-cprop" } */
+
+extern void bar(int);
+
+void
+foo (int i, int n)
+{
+ int a[30];
+ int b[30];
+ for (; i < n; i++)
+ a[i] = b[i] = 0;
+
+ while (1)
+ if (b[0])
+ bar (a[i - 1]);
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948.c b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948.c
index 593031c8bc..f25a910643 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ldist-pr45948.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ftree-loop-distribution -fdump-tree-ldist-details" } */
+/* { dg-options "-O2 -ftree-loop-distribution -ftree-loop-distribute-patterns -fdump-tree-ldist-details" } */
extern void bar(int);
@@ -18,6 +18,6 @@ foo (int i, int n)
/* We should apply loop distribution and generate 2 memset (0). */
-/* { dg-final { scan-tree-dump "distributed: split to 2" "ldist" } } */
+/* { dg-final { scan-tree-dump "distributed: split to 0 loops and 2 library calls" "ldist" } } */
/* { dg-final { scan-tree-dump-times "generated memset zero" 2 "ldist" } } */
/* { dg-final { cleanup-tree-dump "ldist" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c b/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
index 6fc2a57a9f..bcd72c5ef2 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loadpre6.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target nonpic } } */
/* { dg-options "-O2 -fdump-tree-pre-stats -fdump-tree-fre1" } */
#include <stddef.h>
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
index e4ad7a9fa7..dd52c50faf 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-1.c
@@ -2,6 +2,8 @@
/* -mlongcall will cause us to place &foo in the CTR register. */
/* { dg-skip-if "" { powerpc*-*-* } { "-mlongcall" } { "" } } */
/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized" } */
+/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized -mshort-calls" {target epiphany-*-*} } */
+
/* On 31-bit S/390 the function address will be stored (once) in the literal pool,
so scan-assembler-times "foo" will return 1 even if the loop is fully unrolled.
@@ -14,23 +16,26 @@
/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized -static" { target *-*-darwin* } } */
/* On MIPS, disable generating hints (R_MIPS_JALR) for PIC calls. In addition
- to the load from the GOT this also contains the name of the funtion so for
+ to the load from the GOT this also contains the name of the function so for
each call the function name would appear twice. */
/* { dg-options "-O1 -ftree-loop-ivcanon -funroll-loops -fdump-tree-ivcanon-details -fdump-tree-cunroll-details -fdump-tree-optimized -mno-relax-pic-calls" { target mips*-*-* } } */
-
-void xxx(void)
+__attribute__ ((pure))
+int foo (int x);
+int xxx(void)
{
int x = 45;
+ int sum;
while (x >>= 1)
- foo ();
+ sum += foo (x) * 2;
+ return sum;
}
/* We should be able to find out that the loop iterates four times and unroll it completely. */
/* { dg-final { scan-tree-dump-times "Added canonical iv to loop 1, 4 iterations" 1 "ivcanon"} } */
/* { dg-final { cleanup-tree-dump "ivcanon" } } */
-/* { dg-final { scan-tree-dump-times "Unrolled loop 1 completely" 1 "cunroll"} } */
+/* { dg-final { scan-tree-dump-times "loop with 5 iterations completely unrolled" 1 "cunroll"} } */
/* { dg-final { cleanup-tree-dump "cunroll" } } */
/* { dg-final { scan-tree-dump-times "foo" 5 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c
index 80f2e601e3..49163c2431 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-19.c
@@ -4,9 +4,9 @@
The testcase comes from PR 29256 (and originally, the stream benchmark). */
-/* { dg-do compile { target { i?86-*-* || { x86_64-*-* || powerpc_hard_double } } } } */
+/* { dg-do compile { target { i?86-*-* || { x86_64-*-* || { powerpc_hard_double && { ! powerpc_fprs } } } } } } */
/* { dg-require-effective-target nonpic } */
-/* { dg-options "-O3 -fno-prefetch-loop-arrays -fdump-tree-optimized" } */
+/* { dg-options "-O3 -fno-tree-loop-distribute-patterns -fno-prefetch-loop-arrays -fdump-tree-optimized -fno-common" } */
# define N 2000000
double a[N],c[N];
@@ -20,7 +20,7 @@ void tuned_STREAM_Copy()
/* Check that the memory references are based on &a and &c, with appropriate
offsets. Ideally, we would want each of them to appear once in the output.
However, due to a bug in jump threading, we end up peeling one iteration from
- the loop, which creates an additional occurence. */
+ the loop, which creates an additional occurrence. */
/* { dg-final { scan-tree-dump-times "MEM.(base: &|symbol: )a," 2 "optimized" } } */
/* { dg-final { scan-tree-dump-times "MEM.(base: &|symbol: )c," 2 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
index 3426827783..f43a6d8eb7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-2.c
@@ -27,7 +27,7 @@ void xxx(void)
/* { dg-final { scan-tree-dump-times " \\* \[^\\n\\r\]*=" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "\[^\\n\\r\]*= \\* " 0 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[base" 1 "optimized" } } */
/* 17 * iter should be strength reduced. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-23.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-23.c
index a16dc5f035..5bdc35fbd4 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-23.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-23.c
@@ -1,26 +1,29 @@
/* { dg-do compile } */
/* { dg-options "-O2 -funroll-loops -fdump-tree-cunroll-details" } */
-void bla(int);
+__attribute__ ((pure))
+int bla(int);
-void foo(void)
+int foo(void)
{
int i;
+ int sum;
/* This loop used to appear to be too large for unrolling. */
for (i = 0; i < 4; i++)
{
- bla (i);
- bla (2*i);
- bla (3*i);
- bla (4*i);
- bla (5*i);
- bla (6*i);
- bla (7*i);
- bla (8*i);
+ sum += bla (i);
+ sum += bla (2*i);
+ sum += bla (3*i);
+ sum += bla (4*i);
+ sum += bla (5*i);
+ sum += bla (6*i);
+ sum += bla (7*i);
+ sum += bla (8*i);
}
+ return sum;
}
-/* { dg-final { scan-tree-dump-times "Unrolled loop 1 completely" 1 "cunroll" } } */
+/* { dg-final { scan-tree-dump-times "loop with 4 iterations completely unrolled" 1 "cunroll" } } */
/* { dg-final { cleanup-tree-dump "cunroll" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c
index 4f226374bd..fa18f5e042 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-31.c
@@ -15,7 +15,7 @@ short foo (int len, int v)
/* When we do not have addressing mode including multiplication,
the memory access should be strength-reduced. */
-/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target arm*-*-* } } } */
-/* { dg-final { scan-tree-dump-times " \\+ 2" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */
-/* { dg-final { scan-tree-dump-times " \\+ 2" 2 "optimized" { target { ia64-*-* && lp64 } } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target arm*-*-* } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2;" 1 "optimized" { target { ia64-*-* && ilp32 } } } } */
+/* { dg-final { scan-tree-dump-times " \\+ 2;" 2 "optimized" { target { ia64-*-* && lp64 } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-38.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-38.c
new file mode 100644
index 0000000000..714696e87a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-38.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-cunrolli-details" } */
+int a[10];
+int b[11];
+t(int n)
+{
+ int i;
+ int sum = 0;
+ for (i=0;i<n;i++)
+ if (q())
+ sum+=a[i];
+ else
+ sum+=b[i];
+ return sum;
+}
+/* { dg-final { scan-tree-dump "Loop 1 iterates at most 11 times" "cunrolli" } } */
+/* { dg-final { cleanup-tree-dump "cunrolli" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-39.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-39.c
new file mode 100644
index 0000000000..1f6bba42fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-39.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-sccp-details" } */
+
+int
+foo (unsigned int n)
+{
+ int i, r = 1;
+ if (n > 0)
+ {
+ asm ("");
+ if (n < 10)
+ {
+ asm ("");
+ do
+ {
+ --n;
+ r *= 2;
+ }
+ while (n > 0);
+ }
+ }
+ return r + n;
+}
+
+/* { dg-final { scan-tree-dump "# of iterations \[^\n\r]*, bounded by 8" "sccp" } } */
+/* { dg-final { cleanup-tree-dump "sccp" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
index a6c8c8fd34..4313fca50e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-4.c
@@ -37,7 +37,7 @@ void xxx(void)
/* { dg-final { scan-tree-dump-times " \\* \[^\\n\\r\]*=" 0 "optimized" } } */
/* { dg-final { scan-tree-dump-times "\[^\\n\\r\]*= \\* " 0 "optimized" } } */
-/* { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " MEM" 1 "optimized" } } */
/* And the original induction variable should be eliminated. */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
index a8db74afe1..e9ff9fcfe3 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/loop-5.c
@@ -18,7 +18,7 @@ void xxx(void)
/* Only iter variable should remain. */
-/* { dg-final { scan-tree-dump-times "int iter" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "int jiter" 0 "optimized" } } */
/* And jter shouldn't be an induction variable anymore (no PHI node). */
/* { dg-final { scan-tree-dump-times "jter_\[0-9\]* = PHI" 0 "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
new file mode 100644
index 0000000000..62d007d454
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-10.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+int nem1_phi (unsigned long a) { return a ? -1 : 0; }
+int eqm1_phi (unsigned long a) { return a ? 0 : -1; }
+
+int spaceship1 (long a) { return a > 0 ? 1 : a < 0 ? -1 : 0; }
+int spaceship2 (long a) { return a > 0 ? 1 : a == 0 ? 0 : -1; }
+
+/* { dg-final { scan-tree-dump-times " = -\[^\r\n\]*_.;" 4 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-11.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-11.c
new file mode 100644
index 0000000000..7c83007e7f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-11.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+int f(int a, int b, int c)
+{
+ if (a == 0 && b > c)
+ return 0;
+ return a;
+}
+
+int g(int a, int b, int c)
+{
+ if (a == 42 && b > c)
+ return 42;
+ return a;
+}
+
+int h(int a, int b, int c, int d)
+{
+ if (a == d && b > c)
+ return d;
+ return a;
+}
+/* { dg-final { scan-tree-dump-times "if" 0 "optimized"} } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c
index 415c11777b..3d34ef3f63 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=1" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } */
_Bool f1(_Bool a, _Bool b)
{
@@ -17,6 +18,8 @@ _Bool f1(_Bool a, _Bool b)
/* There should be only one if, the outer one; the inner one
should have been changed to straight line code with the
value of b (except that we don't fold ! (b != 0) into b
- which can be fixed in a different patch). */
-/* { dg-final { scan-tree-dump-times "if" 1 "optimized"} } */
+ which can be fixed in a different patch).
+ Test this only when known to be !LOGICAL_OP_NON_SHORT_CIRCUIT,
+ otherwise ifcombine may convert this into return a & b;. */
+/* { dg-final { scan-tree-dump-times "if" 1 "optimized" { target { i?86-*-* x86_64-*-* mips*-*-* s390*-*-* avr*-*-* } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
new file mode 100644
index 0000000000..bd897554e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-7.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+
+int g(int,int);
+int f(int t, int c)
+{
+ int d = 0;
+ int e = 0;
+ if (t)
+ {
+ d = t;
+ if (c) e = 1;
+ }
+ else d = 0, e = 0;
+ return g(d,e);
+}
+
+/* There should be one ifs as one of them should be changed into
+ a conditional and the other should be there still. */
+/* { dg-final { scan-tree-dump-times "if" 1 "optimized" } }*/
+/* { dg-final { scan-tree-dump-times "\[^\r\n\]*_. = c_\[0-9\]*.D. != 0" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c
new file mode 100644
index 0000000000..775926da98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-8.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized -fdump-tree-phiopt1" } */
+
+int g(int,int);
+int f(int t, int c)
+{
+ int d = 0;
+ int e = 0;
+ if (t)
+ {
+ d = 1;
+ e = t;
+ }
+ else d = 0, e = 0;
+ return g(e,d);
+}
+
+/* This testcase should be reduced to e = t; d = t != 0; in phiopt1
+ but currently is not as PHI-OPT does not reduce the t PHI as we have
+ two phis. Note this is fixed with
+ http://gcc.gnu.org/ml/gcc-patches/2012-01/msg01195.html . */
+/* { dg-final { scan-tree-dump-not "if" "phiopt1" } } */
+/* { dg-final { scan-tree-dump "g .t_\[0-9\]*.D.," "optimized" } } */
+/* { dg-final { scan-tree-dump-not "PHI" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "phiopt1" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-9.c b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-9.c
new file mode 100644
index 0000000000..a224788f5d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/phi-opt-9.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+int g(int,int);
+int h(int);
+int f(int t, int c)
+{
+ int d = 0;
+ int e = 0;
+ if (t)
+ {
+ d = h(c);
+ e = t;
+ }
+ else d = 0, e = 0;
+ return g(e,d);
+}
+
+/* The value e should have been replaced with t and there should be only one PHI. */
+/* { dg-final { scan-tree-dump "g .t_\[0-9\]*.D.," "optimized" } } */
+/* { dg-final { scan-tree-dump-times "PHI" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18133-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18133-1.c
index f225f662da..8bae0145d7 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr18133-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18133-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-optimized-blocks" } */
+/* { dg-options "-O1 -fdump-tree-optimized-blocks-details" } */
void foo (void)
{
@@ -12,17 +12,17 @@ return;
/* The goto &L0 should have been optimized away during CFG
cleanups. */
-/* { dg-final { scan-tree-dump-times "goto &L0" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-not "goto &L0" "optimized" } } */
/* There should not be any abnormal edges as DOM removed the
computed goto. */
-/* { dg-final { scan-tree-dump-times "ab" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-not "ABNORMAL" "optimized" } } */
/* And verify that we have fixed the fallthru flag as well.
After DOM we will have two fallthru edges (e->0, 0->1),
- but in the dump files we mention the 0->1 two times. So
- scan for 3 instances of "fallthru". */
+ but in the dump files we mention the 2->3 two times. So
+ scan for 3 instances of "FALLTHRU". */
-/* { dg-final { scan-tree-dump-times "fallthru" 3 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "FALLTHRU" 3 "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-1.c
new file mode 100644
index 0000000000..48c904d0f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y)
+{
+ return x * x * x * x * y * y * y * y;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c
new file mode 100644
index 0000000000..4a6120abd6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-10.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y, double z)
+{
+ return (__builtin_pow (x, 4.0) * __builtin_pow (y, 2.0)
+ * __builtin_pow (z, 4.0));
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 5 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-2.c
new file mode 100644
index 0000000000..d8b7fca00e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y)
+{
+ return x * y * y * x * y * x * x * y;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-3.c
new file mode 100644
index 0000000000..26c1893bae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y, double z)
+{
+ return x * x * y * y * y * z * z * z * z;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 5 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-4.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-4.c
new file mode 100644
index 0000000000..55c2d43b39
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-4.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y, double z, double u)
+{
+ return x * x * y * y * y * z * z * z * z * u;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 6 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-5.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-5.c
new file mode 100644
index 0000000000..ea60f8eca1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-5.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y, double z, double u)
+{
+ return x * x * x * y * y * y * z * z * z * z * u * u * u * u;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 6 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-6.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-6.c
new file mode 100644
index 0000000000..5044020cf4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-6.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y)
+{
+ return __builtin_pow (x, 3.0) * __builtin_pow (y, 4.0);
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 4 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-7.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-7.c
new file mode 100644
index 0000000000..d4c5241583
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-7.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+float baz (float x, float y)
+{
+ return x * x * x * x * y * y * y * y;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-8.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-8.c
new file mode 100644
index 0000000000..5335fa229e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-8.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+long double baz (long double x, long double y)
+{
+ return x * x * x * x * y * y * y * y;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18589-9.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-9.c
new file mode 100644
index 0000000000..08d5798e2c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18589-9.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fdump-tree-optimized" } */
+
+double baz (double x, double y, double z)
+{
+ return (__builtin_pow (x, 3.0) * __builtin_pow (y, 2.0)
+ * __builtin_pow (z, 5.0));
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 6 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c b/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c
index cfc92fec9c..3707efe36c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr18908.c
@@ -4,6 +4,6 @@
_Bool f3(_Bool *p) { *p ^= 1; }
/* We should be able to canonicalize the above to use bitwise not. */
-/* { dg-final { scan-tree-dump "~D" "forwprop1" } } */
+/* { dg-final { scan-tree-dump "~\[^\n\r\]*_.;" "forwprop1" } } */
/* { dg-final { scan-tree-dump-not "\\\^ 1" "forwprop1" } } */
/* { dg-final { cleanup-tree-dump "forwprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr19431.c b/gcc/testsuite/gcc.dg/tree-ssa/pr19431.c
index 1c87acbddd..08972063e0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr19431.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr19431.c
@@ -24,6 +24,5 @@ int f(int k, int i1, int j1)
return *f1;
}
-/* { dg-final { scan-tree-dump "i1_. = PHI <i1_\[^,\]*, j1_\[^>\]*>" "optimized" } } */
-/* { dg-final { scan-tree-dump "return i1_.;" "optimized" } } */
+/* { dg-final { scan-tree-dump "\[^\r\n\]*_. = PHI <i1_\[^,\]*, j1_\[^>\]*>" "optimized" } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c b/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
new file mode 100644
index 0000000000..1b302aedef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr20318.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
+/* { dg-options "-O2 -fdump-tree-original -fdump-tree-vrp1" } */
+
+extern int* f(int) __attribute__((returns_nonnull));
+extern void eliminate ();
+void g () {
+ if (f (2) == 0)
+ eliminate ();
+}
+void h () {
+ int *p = f (2);
+ if (p == 0)
+ eliminate ();
+}
+
+/* { dg-final { scan-tree-dump-times "== 0" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 1 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
index 84280b39cc..888d609aea 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21001.c
@@ -2,7 +2,7 @@
VRP did not insert ASSERT_EXPRs when the variable tested in a
COND_EXPR is a single-use variable. By propagating the definition
of the single-use variable into the COND_EXPR, we can get useful
- range infomation out of the conditional. */
+ range information out of the conditional. */
/* { dg-do compile } */
/* { dg-options "-O2 -fno-tree-dominator-opts -fdump-tree-vrp1-details" } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
index 8e32e42174..40d960d49b 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21090.c
@@ -19,5 +19,5 @@ foo (int a)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate.*to 1" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c b/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
index 34f4a01db0..6378d1aa72 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr21559.c
@@ -36,7 +36,8 @@ void foo (void)
/* Second, we should thread the edge out of the loop via the break
statement. We also realize that the final bytes == 0 test is useless,
- and thread over it. */
+ and thread over it. We also know that toread != 0 is useless when
+ entering while loop and thread over it. */
/* { dg-final { scan-tree-dump-times "Threaded jump" 3 "vrp1" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c b/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c
index 42bd2a21ef..54f677ba8c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr31261.c
@@ -35,6 +35,7 @@ f5 (int e)
/* { dg-final { scan-tree-dump-times "return -a \& 7;" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "return b \& 7;" 1 "original" } } */
/* { dg-final { scan-tree-dump-times "return \\(char\\) -\\(unsigned char\\) c \& 31;" 1 "original" } } */
-/* { dg-final { scan-tree-dump-times "return \\(int\\) \\(12 - \\(unsigned int\\) d\\) \& 7;" 1 "original" } } */
+/* { dg-final { scan-tree-dump-times "return \\(int\\) \\(12 - \\(unsigned int\\) d\\) \& 7;" 1 "original" { target { ! int16 } } } } */
+/* { dg-final { scan-tree-dump-times "return \\(int\\) \\(12 - \\(unsigned short\\) d\\) \& 7;" 1 "original" { target { int16 } } } } */
/* { dg-final { scan-tree-dump-times "return 12 - \\(e \& 7\\) \& 15;" 1 "original" } } */
/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr36881.c b/gcc/testsuite/gcc.dg/tree-ssa/pr36881.c
index 742dd9ddb4..96922e3a62 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr36881.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr36881.c
@@ -13,7 +13,10 @@ const char *foo (int i)
case 7: p = "abc"; break;
case 2:
case 8: p = "def"; break;
- default: p = "ghi"; break;
+ case 9: p = "ghi"; break;
+ case 5: p = "jkl"; break;
+ case 3: p = "mno"; break;
+ default: p = "prq"; break;
}
return p;
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c b/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
index f31c5940bd..aea35cc04e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr37508.c
@@ -30,7 +30,7 @@ int test3 (struct foo1 *x)
{
if (x->i == 0)
return 1;
- else if (x->i == 1)
+ else if (x->i == 1) /* This test is already folded to false by fold. */
return 1;
return 0;
}
@@ -44,5 +44,5 @@ int test4 (struct foo2 *x)
return 0;
}
-/* { dg-final { scan-tree-dump-times "Folding" 4 "vrp1" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "Folding" 3 "vrp1" } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c b/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c
index b1bc4f7a39..a970c855b8 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr42585.c
@@ -33,8 +33,8 @@ Cyc_string_ungetc (int ignore, struct _fat_ptr *sptr)
/* The local aggregates . */
/* Whether the structs are totally scalarized or not depends on the
- MOVE_RATIO macro defintion in the back end. The scalarization will
+ MOVE_RATIO macro definition in the back end. The scalarization will
not take place when using small values for MOVE_RATIO. */
-/* { dg-final { scan-tree-dump-times "struct _fat_ptr _ans" 0 "optimized" { target { ! "alpha*-dec-osf* arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */
-/* { dg-final { scan-tree-dump-times "struct _fat_ptr _T2" 0 "optimized" { target { ! "alpha*-dec-osf* arm-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "struct _fat_ptr _ans" 0 "optimized" { target { ! "arm*-*-* avr-*-* nds32*-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "struct _fat_ptr _T2" 0 "optimized" { target { ! "arm*-*-* avr-*-* nds32*-*-* powerpc*-*-* s390*-*-* sh*-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr43491.c b/gcc/testsuite/gcc.dg/tree-ssa/pr43491.c
index 2473400445..44dc5f2d3c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr43491.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr43491.c
@@ -37,6 +37,6 @@ long foo(long data, long v)
}
/* We should not eliminate global register variable when it is the RHS of
a single assignment. */
-/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre" { target { arm-*-* i?86-*-* mips*-*-* x86_64-*-* } } } } */
-/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre" { target { ! { arm-*-* i?86-*-* mips*-*-* x86_64-*-* } } } } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 2" 1 "pre" { target { arm*-*-* i?86-*-* mips*-*-* x86_64-*-* } } } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 3" 1 "pre" { target { ! { arm*-*-* i?86-*-* mips*-*-* x86_64-*-* } } } } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr44258.c b/gcc/testsuite/gcc.dg/tree-ssa/pr44258.c
index a98d3ceccb..6dc233b323 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pr44258.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr44258.c
@@ -39,5 +39,7 @@ int foo (int b)
*e_u = u;
}
-/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra"} } */
+/* Epiphany has struct alignment/padding that avoids the overlap of
+ str.b1 and val.b2. */
+/* { dg-final { scan-tree-dump-times "Created a replacement" 0 "esra" { target { ! "epiphany-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "esra" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr45085.c b/gcc/testsuite/gcc.dg/tree-ssa/pr45085.c
new file mode 100644
index 0000000000..d95ac8620c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr45085.c
@@ -0,0 +1,46 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -Wuninitialized" } */
+struct S { char *s1; long s2; };
+struct T { int t1; long t2; long t3; };
+extern int fn2 (void);
+extern int fn3 (struct T);
+extern struct T fn4 ();
+extern int fn5 (char **, long *, int);
+extern void fn6 (void);
+extern void fn7 (void *);
+struct S *fn10 ();
+static int p;
+static void *q;
+extern struct T r;
+
+static struct T
+fn8 (struct T x, int y)
+{
+ struct S *u = fn10 ();
+ int v = fn5 (&u->s1, &u->s2, 0);
+ while (1)
+ {
+ if (p)
+fn6 ();
+ if (fn3 (x))
+return fn4 ();
+ if (y & 1)
+return r;
+ v = fn5 (&u->s1, &u->s2, 1);
+ }
+}
+
+struct T
+fn9 (struct T x, int y)
+{
+ struct T t = fn8 (x, y);
+ if (fn2 ())
+ fn7 (q);
+ return t;
+}
+
+void *
+fn1 (void)
+{
+ return fn9;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr45685.c b/gcc/testsuite/gcc.dg/tree-ssa/pr45685.c
new file mode 100644
index 0000000000..06289430fa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr45685.c
@@ -0,0 +1,41 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-phiopt1-details" } */
+
+typedef unsigned long int uint64_t;
+typedef long int int64_t;
+int summation_helper_1(int64_t* products, uint64_t count)
+{
+ int s = 0;
+ uint64_t i;
+ for(i=0; i<count; i++)
+ {
+ int64_t val = (products[i]>0) ? 1 : -1;
+ products[i] *= val;
+ if(products[i] != i)
+ val = -val;
+ products[i] = val;
+ s += val;
+ }
+ return s;
+}
+
+
+int summation_helper_2(int64_t* products, uint64_t count)
+{
+ int s = 0;
+ uint64_t i;
+ for(i=0; i<count; i++)
+ {
+ int val = (products[i]>0) ? 1 : -1;
+ products[i] *= val;
+ if(products[i] != i)
+ val = -val;
+ products[i] = val;
+ s += val;
+ }
+ return s;
+}
+
+/* { dg-final { scan-tree-dump-times "converted to straightline code" 2 "phiopt1" } } */
+/* { dg-final { cleanup-tree-dump "phiopt1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c b/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
new file mode 100644
index 0000000000..21b2f3fed9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr52631.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-fre1-details" } */
+
+unsigned f(unsigned a)
+{
+#if __SIZEOF_INT__ == 2
+ unsigned b = a >> 15;
+#else
+ unsigned b = a >> 31;
+#endif
+ return b&1;
+}
+
+/* We want to verify that we replace the b & 1 with b. */
+/* { dg-final { scan-tree-dump-times "Replaced b_\[0-9\]+ & 1 with b_\[0-9\]+ in" 1 "fre1"} } */
+
+/* { dg-final { cleanup-tree-dump "fre1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr54211.c b/gcc/testsuite/gcc.dg/tree-ssa/pr54211.c
new file mode 100644
index 0000000000..c8a1591b0a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr54211.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+int a, b;
+unsigned char e;
+void fn1 ()
+{
+ unsigned char *c=0;
+ for (;; a++)
+ {
+ unsigned char d = *(c + b);
+ for (; &e<&d; c++)
+ goto Found_Top;
+ }
+Found_Top:
+ if (0)
+ goto Empty_Bitmap;
+ for (;; a++)
+ {
+ unsigned char *e = c + b;
+ for (; c < e; c++)
+ goto Found_Bottom;
+ c -= b;
+ }
+Found_Bottom:
+Empty_Bitmap:
+ ;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr54245.c b/gcc/testsuite/gcc.dg/tree-ssa/pr54245.c
new file mode 100644
index 0000000000..daca0423a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr54245.c
@@ -0,0 +1,49 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-slsr-details" } */
+
+#include <stdio.h>
+
+#define W1 22725
+#define W2 21407
+#define W3 19266
+#define W6 8867
+
+void idct_row(short *row, int *dst)
+{
+ int a0, a1, b0, b1;
+
+ a0 = W1 * row[0];
+ a1 = a0;
+
+ a0 += W2 * row[2];
+ a1 += W6 * row[2];
+
+ b0 = W1 * row[1];
+ b1 = W3 * row[1];
+
+ dst[0] = a0 + b0;
+ dst[1] = a0 - b0;
+ dst[2] = a1 + b1;
+ dst[3] = a1 - b1;
+}
+
+static short block[8] = { 1, 2, 3, 4 };
+
+int main(void)
+{
+ int out[4];
+ int i;
+
+ idct_row(block, out);
+
+ for (i = 0; i < 4; i++)
+ printf("%d\n", out[i]);
+
+ return !(out[2] == 87858 && out[3] == 10794);
+}
+
+/* For now, disable inserting an initializer when the multiplication will
+ take place in a smaller type than originally. This test may be deleted
+ in future when this case is handled more precisely. */
+/* { dg-final { scan-tree-dump-times "Inserting initializer" 0 "slsr" { target { ! int16 } } } } */
+/* { dg-final { cleanup-tree-dump "slsr" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr54915.c b/gcc/testsuite/gcc.dg/tree-ssa/pr54915.c
new file mode 100644
index 0000000000..1e11df1981
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr54915.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (16)));
+typedef double v4df __attribute__ ((__vector_size__ (32)));
+
+void f (v2df *ret, v4df* xp)
+{
+ v4df x = *xp;
+ v2df xx = { x[2], x[3] };
+ *ret = xx;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr55008.c b/gcc/testsuite/gcc.dg/tree-ssa/pr55008.c
new file mode 100644
index 0000000000..32af32a804
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr55008.c
@@ -0,0 +1,17 @@
+/* This used to fail to compile; see PR55008. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -w" } */
+
+typedef unsigned long long T;
+
+void f(void)
+{
+ int a, *p;
+
+ T b = 6309343725;
+
+ if(*p ? (b = 1) : 0)
+ if(b - (a = b /= 0) ? : (a + b))
+ while(1);
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c b/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c
new file mode 100644
index 0000000000..16807cf66c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr55579.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -g -fdump-tree-esra -fvar-tracking-assignments" } */
+
+struct S { int a; char b; char c; short d; };
+
+int
+foo (int x)
+{
+ struct S s = { x + 1, x + 2, x + 3, x + 4 };
+ char *p = &s.c;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump "Created a debug-only replacement for s" "esra" } } */
+/* { dg-final { cleanup-tree-dump "esra" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr57361.c b/gcc/testsuite/gcc.dg/tree-ssa/pr57361.c
new file mode 100644
index 0000000000..bc265db6ff
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr57361.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-dse1-details" } */
+
+struct A { int x; double y; };
+void f (struct A *a) {
+ *a = *a;
+}
+
+/* { dg-final { scan-tree-dump "Deleted dead store" "dse1"} } */
+/* { dg-final { cleanup-tree-dump "dse1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr57385.c b/gcc/testsuite/gcc.dg/tree-ssa/pr57385.c
new file mode 100644
index 0000000000..a1f001db31
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr57385.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-require-effective-target int32plus } */
+
+int c;
+
+void foo(int f)
+{
+ int wbi=-100000000;
+ c = (f ? "012346000000000000":"01345:000000006008")[wbi];
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c b/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
new file mode 100644
index 0000000000..a42edf973c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr58480.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target { ! keeps_null_pointer_checks } } } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+extern void eliminate (void);
+extern void* f1 (void *a, void *b) __attribute__((nonnull));
+extern void* f2 (void *a, void *b) __attribute__((nonnull(2)));
+void g1 (void*p, void*q){
+ f1 (q, p);
+ if (p == 0)
+ eliminate ();
+}
+void g2 (void*p, void*q){
+ f2 (q, p);
+ if (p == 0)
+ eliminate ();
+}
+
+/* { dg-final { scan-tree-dump-times "Folding predicate\[^\\n\]*to 0" 2 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr58958.c b/gcc/testsuite/gcc.dg/tree-ssa/pr58958.c
new file mode 100644
index 0000000000..faf377fb87
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr58958.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+double a[10];
+int f(int n){
+ a[3]=9;
+ __builtin_memset(&a[n],3,sizeof(double));
+ return a[3]==9;
+}
+
+/* { dg-final { scan-tree-dump " == 9" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c b/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
new file mode 100644
index 0000000000..bc9d730499
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr59597.c
@@ -0,0 +1,58 @@
+/* { dg-do compile } */
+/* { dg-options "-Ofast -fdump-tree-vrp1-details" } */
+
+typedef unsigned short u16;
+typedef unsigned char u8;
+typedef unsigned int u32;
+#define NNN 10
+
+u32 f[NNN], t[NNN];
+
+static u16
+Calc_crc8 (u8 data, u16 crc)
+{
+ u8 i=0,x16=0,carry=0;
+ for (i = 0; i < 8; i++)
+ {
+ x16 = (u8)((data & 1) ^ ((u8)crc & 1));
+ data >>= 1;
+
+ if (x16 == 1)
+ {
+ crc ^= 0x4002;
+ carry = 1;
+ }
+ else
+ carry = 0;
+ crc >>= 1;
+ if (carry)
+ crc |= 0x8000;
+ else
+ crc &= 0x7fff;
+ }
+ return crc;
+}
+
+int
+main (int argc, char argv[])
+{
+ int i, j; u16 crc;
+ for (j = 0; j < 10000000; j++)
+ {
+ for (i = 0; i < NNN; i++)
+ {
+ f[i] = random(i);
+ t[i] = random(NNN - i - 1);
+ }
+ for (i=0; i<NNN; i++)
+ {
+ crc=Calc_crc8(f[i],(u16)argc);
+ crc=Calc_crc8(t[i],crc);
+ }
+ }
+ return crc;
+}
+
+/* { dg-final { scan-tree-dump "Cancelling" "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr61144.c b/gcc/testsuite/gcc.dg/tree-ssa/pr61144.c
new file mode 100644
index 0000000000..cd34b144e8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr61144.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-require-weak "" } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+static int dummy = 0;
+extern int foo __attribute__((__weak__, __alias__("dummy")));
+int bar() { if (foo) return 1; return 0; }
+/* { dg-final { scan-tree-dump-not "return 0" "optimized"} } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-6.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-6.c
new file mode 100644
index 0000000000..96d9bf93ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-6.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+
+int a, c, e[5][2];
+unsigned int d;
+
+int
+main ()
+{
+ for (d = 0; d < 2; d++)
+ if (a ? 0 : e[c + 3][d] & e[c + 4][d])
+ break;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/predcom-7.c b/gcc/testsuite/gcc.dg/tree-ssa/predcom-7.c
new file mode 100644
index 0000000000..e7ae87ccc7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/predcom-7.c
@@ -0,0 +1,18 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fdump-tree-pcom-details" } */
+
+int b, f, d[5][2];
+unsigned int c;
+
+int
+main ()
+{
+ for (c = 0; c < 2; c++)
+ if (d[b + 3][c] & d[b + 4][c])
+ if (f)
+ break;
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump "Executing predictive commoning" "pcom" } } */
+/* { dg-final { cleanup-tree-dump "pcom" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
index 7cc19be6c4..dcfae5dd95 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-1.c
@@ -33,5 +33,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
index 878352d269..e6139591ec 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-2.c
@@ -34,5 +34,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
index 8e779d8461..870dcf6b19 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-escape-3.c
@@ -38,5 +38,6 @@ int main()
return 0;
}
-/* { dg-final { scan-tree-dump "ESCAPED, points-to non-local, points-to NULL, points-to vars: { x }" "alias" } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { NULL ESCAPED NONLOCAL x }" "alias" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump "ESCAPED = { ESCAPED NONLOCAL x }" "alias" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "alias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
index 2a60e1daa2..d4121122bb 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-1.c
@@ -22,5 +22,5 @@ foo(int i, int j, int k, int off)
return *q;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { k }" "ealias" } } */
+/* { dg-final { scan-tree-dump "q_. = { k }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
index ddf934bf81..430f216da9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pta-ptrarith-2.c
@@ -22,5 +22,5 @@ foo(int i, int j, int k, int off)
return *q;
}
-/* { dg-final { scan-tree-dump "q_., points-to vars: { i }" "ealias" } } */
+/* { dg-final { scan-tree-dump "q_. = { i }" "ealias" } } */
/* { dg-final { cleanup-tree-dump "ealias" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
index c13e1d36fe..bbaf69b40e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-19.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Os -fdump-tree-reassoc2" } */
+/* { dg-options "-Os -fdump-tree-optimized" } */
/* Slightly changed testcase from PR middle-end/40815. */
void bar(char*, char*, int);
@@ -8,14 +8,15 @@ void foo(char* left, char* rite, int element)
while (left <= rite)
{
/* This should expand into
- D.zzzz = D.zzzz - D.xxxx;
- and NOT to
- D.D.yyyy = -D.xxxx; D.zzzz = D.zzzz + D.yyyy; */
+ _7 = (sizetype) element_6(D);
+ _8 = -_7;
+ rite_9 = rite_1 + _8; */
rite -= element;
bar(left, rite, element);
}
}
-/* There should be no " + " in the dump. */
-/* { dg-final { scan-tree-dump-times " \\\+ " 0 "reassoc2" } } */
-/* { dg-final { cleanup-tree-dump "reassoc2" } } */
+/* { dg-final { scan-tree-dump-times "= \\\(sizetype\\\) element" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "= -" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\\+ " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-26.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-26.c
new file mode 100644
index 0000000000..ae4bdaa9a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-26.c
@@ -0,0 +1,12 @@
+/* PR tree-optimization/56559 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+double a, b, c, d, e;
+
+void
+foo ()
+{
+ a = e * e;
+ b = d * e + c * e * a;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c
new file mode 100644
index 0000000000..f406beb2fd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-27.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O -ffast-math -frounding-math -fdump-tree-optimized" } */
+
+double baz (double foo, double bar)
+{
+ return foo * foo * foo * foo * bar * bar * bar * bar;
+}
+
+/* We should re-associate this as (foo * bar)**3. */
+/* { dg-final { scan-tree-dump-times " \\\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-28.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-28.c
new file mode 100644
index 0000000000..2e99986014
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-28.c
@@ -0,0 +1,32 @@
+/* { dg-do run} */
+/* { dg-options "-O2" } */
+
+#define LENGTH 4
+void abort (void);
+unsigned
+__attribute__ ((noinline)) foo (unsigned char *buf, int n)
+{
+ unsigned sum = 0, i = 0;
+ do {
+ sum +=(buf)[n-1];
+ /* Split the BB to test statements are correctly moved to
+ satisfy dependences. */
+ if (n > LENGTH)
+ i++;
+ sum += buf[n-2];
+ sum += buf[n-3];
+ sum += buf[n-4];
+ n = n-4;
+ } while (n > 0);
+
+ return sum + i;
+}
+
+unsigned char a[] = {1, 1, 1, 1};
+
+int main() {
+ int sum = foo (a, LENGTH);
+ if (sum != 4)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-29.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-29.c
new file mode 100644
index 0000000000..ac01d75b37
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-29.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/57322 */
+/* { dg-do compile } */
+/* { dg-options "-w -O1" } */
+int a;
+
+void f (void)
+{
+ char b;
+
+ for (;; a++)
+ {
+ char *p = &b, *q;
+ *q = b < 0 & !!*p;
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-30.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-30.c
new file mode 100644
index 0000000000..6628984832
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-30.c
@@ -0,0 +1,13 @@
+/* PR tree-optimization/57442 */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+short a;
+unsigned b;
+long c;
+int d;
+
+void f(void)
+{
+ b = a ? : (a = b) - c + (d - (b + b));
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c
new file mode 100644
index 0000000000..1c1527f135
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-31.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/58011 */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+int a, b;
+
+void f(unsigned p)
+{
+ unsigned *pp = &p;
+
+ if(!a)
+ p = 0;
+
+ for(b = 0; b < 1; b++)
+ if(3 * p + 5 * *pp)
+ a = 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c
new file mode 100644
index 0000000000..08530bd7d2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-32.c
@@ -0,0 +1,29 @@
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-*"} } } */
+
+/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+
+int test (int a, int b, int c)
+{
+ if ( a == 10 || a == 12 || a == 26)
+ return b;
+ else
+ return c;
+}
+
+int main ()
+{
+ if (test (10, 20, 30) != 20)
+ __builtin_abort ();
+ if (test (12, 20, 30) != 20)
+ __builtin_abort ();
+ if (test (26, 20, 30) != 20)
+ __builtin_abort ();
+ if (test (30, 20, 30) != 30)
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests .* 26" 1 "reassoc1"} }*/
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c
new file mode 100644
index 0000000000..da96d0df44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-33.c
@@ -0,0 +1,27 @@
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+
+/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int test (int a, int b, int c)
+{
+ if (a == 43 || a == 75 || a == 44 || a == 78
+ || a == 77 || a == 46 || a == 76 || a == 45)
+ return b;
+ else
+ return c;
+}
+
+int
+main ()
+{
+ volatile int n43, n47, n75, n79;
+ n43 = 43; n47 = n43 + 4; n75 = 75; n79 = n75 + 4;
+ int i;
+ for (i = -10; i <= 100; i++)
+ if (test (i, 2, 3) != 3 - ((i >= n43 && i < n47) || (i >= n75 && i < n79)))
+ __builtin_abort ();
+ return 0;
+}
+/* { dg-final { scan-tree-dump-times "Optimizing range tests" 3 "reassoc1"} }*/
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c
new file mode 100644
index 0000000000..dbb1a6c300
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-34.c
@@ -0,0 +1,24 @@
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+
+/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int test (int a, int b, int c)
+{
+ if (a == 10 || a == 12)
+ return b;
+ else
+ return c;
+}
+int main ()
+{
+ if (test (10, 20, 30) != 20)
+ __builtin_abort ();
+ if (test (12, 20, 30) != 20)
+ __builtin_abort ();
+ if (test (26, 20, 30) != 30)
+ __builtin_abort ();
+ return 0;
+}
+/* { dg-final { scan-tree-dump-times "Optimizing range tests" 1 "reassoc1"} }*/
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c
new file mode 100644
index 0000000000..05830c8312
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-35.c
@@ -0,0 +1,26 @@
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+
+/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int test (unsigned int a, int b, int c)
+{
+ if ((a - 43) <= 3 || (a - 75) <= 3)
+ return b;
+ else
+ return c;
+}
+int
+main ()
+{
+ volatile int n43, n47, n75, n79;
+ n43 = 43; n47 = n43 + 4; n75 = 75; n79 = n75 + 4;
+ int i;
+ for (i = -10; i <= 100; i++)
+ if (test (i, 2, 3) != 3 - ((i >= n43 && i < n47) || (i >= n75 && i < n79)))
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests" 1 "reassoc1"} }*/
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c
new file mode 100644
index 0000000000..91c95b583e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/reassoc-36.c
@@ -0,0 +1,25 @@
+/* { dg-do run { target { ! "m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-*"} } } */
+
+/* { dg-options "-O2 -fno-inline -fdump-tree-reassoc1-details" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int test (int a, int b, int c)
+{
+ if (a != 10 && a != 12)
+ return b;
+ else
+ return c;
+}
+int main ()
+{
+ if (test (10, 20, 30) != 30)
+ __builtin_abort ();
+ if (test (12, 20, 30) != 30)
+ __builtin_abort ();
+ if (test (26, 20, 30) != 20)
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Optimizing range tests" 1 "reassoc1"} }*/
+/* { dg-final { cleanup-tree-dump "reassoc1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sccp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/sccp-1.c
new file mode 100644
index 0000000000..633a37a35f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sccp-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int main(int argc, char* argv[])
+{
+ int i, a = 0;
+ for (i=0; i < 10; i++)
+ a += i + 0xff00ff;
+ return a;
+}
+
+/* There should be no loop left. */
+
+/* { dg-final { scan-tree-dump-times "goto" 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c
new file mode 100644
index 0000000000..5cac1cefb5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-3.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int *a_p;
+int a[1000];
+
+f(int k)
+{
+ int i;
+
+ for (i=k; i<1000; i+=k) {
+ a_p = &a[i];
+ *a_p = 100;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "&a" 1 "optimized" { xfail { lp64 || llp64 } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c
new file mode 100644
index 0000000000..5f15d622d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-4.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+typedef struct {
+ int x;
+ int y;
+} S;
+
+int *a_p;
+S a[1000];
+
+f(int k)
+{
+ int i;
+
+ for (i=k; i<1000; i+=k) {
+ a_p = &a[i].y;
+ *a_p = 100;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "&a" 1 "optimized" { xfail { lp64 || llp64 } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c
new file mode 100644
index 0000000000..b9de36a478
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-5.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int *a_p;
+int a[1000];
+
+f(int k)
+{
+ long long i;
+
+ for (i=k; i<1000; i+=k) {
+ a_p = &a[i];
+ *a_p = 100;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "&a" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-6.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-6.c
new file mode 100644
index 0000000000..3b02374a18
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-6.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+int main()
+{
+ int i;
+ signed char result = 0;
+ for (i = 0; i != 8000; ++i)
+ {
+ int tem = result;
+ tem = tem + 2;
+ result = tem;
+ }
+ if (__builtin_abs ((int)(signed char)((unsigned char ) result + 128)) != 0)
+ __builtin_abort ();
+ return 0;
+}
+
+/* SCEV constant propagation should be able to compute the overall effect
+ of the loop. */
+
+/* { dg-final { scan-tree-dump-not "abort" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c b/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c
new file mode 100644
index 0000000000..d6ceb20825
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/scev-7.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-sccp-scev" } */
+
+struct struct_t
+{
+ int* data;
+};
+
+void foo (struct struct_t* sp, int start, int end)
+{
+ int i;
+
+ for (i = 1000; i+start > end; i--)
+ sp->data[i+start] = 0;
+}
+
+/* { dg-final { scan-tree-dump-times "Simplify PEELED_CHREC into POLYNOMIAL_CHREC" 1 "sccp" } } */
+/* { dg-final { cleanup-tree-dump "sccp" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c
new file mode 100644
index 0000000000..e8c0ff0213
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+extern void foo (int);
+
+void
+f (int *p, unsigned int n)
+{
+ foo (*(p + n * 4));
+ foo (*(p + 32 + n * 4));
+ if (n > 3)
+ foo (*(p + 16 + n * 4));
+ else
+ foo (*(p + 48 + n * 4));
+}
+
+/* { dg-final { scan-tree-dump-times "\\+ 128|\\, 128>" 1 "optimized" { target { int32plus } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 64|\\, 64>" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 32|\\, 32>" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 192|\\, 192>" 1 "optimized" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 96|\\, 96>" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-10.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-10.c
new file mode 100644
index 0000000000..f131dae3b4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-10.c
@@ -0,0 +1,23 @@
+/* Verify straight-line strength reduction for simple integer addition
+ with stride reversed on 1st and 3rd instances. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = a1 + c;
+ a2 = 4 * s;
+ x2 = c + a2;
+ a3 = 6 * s;
+ x3 = a3 + c;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-11.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-11.c
new file mode 100644
index 0000000000..6f77d51857
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-11.c
@@ -0,0 +1,24 @@
+/* Verify straight-line strength reduction for simple integer addition
+ with casts thrown in. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+long
+f (int s, long c)
+{
+ int a1, a2, a3;
+ long x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = c + a1;
+ a2 = 4 * s;
+ x2 = c + a2;
+ a3 = 6 * s;
+ x3 = c + a3;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-12.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-12.c
new file mode 100644
index 0000000000..558b3594e7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-12.c
@@ -0,0 +1,30 @@
+/* Verify that no straight-line strength reduction occurs across sibling
+ blocks. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ if (c > 0)
+ {
+ a1 = 2 * s;
+ x1 = c + a1;
+ }
+ else
+ {
+ a1 = 4 * s;
+ x1 = c + a1;
+ }
+
+ a2 = 6 * s;
+ x2 = c + a2;
+ x = x1 + x2;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c
new file mode 100644
index 0000000000..5cdfb9d37a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-13.c
@@ -0,0 +1,25 @@
+/* x2 and x3 will be strength-reduced based on the same statement
+ but with different variables as the stride. Note that they will
+ be strength-reduced by introducing an initializer 4*s which is
+ cheaper than 5*s; similar for 4*c and 5*c. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a2, a3, x1, x2, x3, x;
+
+ x1 = c + s;
+ a2 = 5 * s;
+ x2 = c + a2;
+ a3 = 5 * c;
+ x3 = s + a3;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* 4" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 5" 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-14.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-14.c
new file mode 100644
index 0000000000..1941345494
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-14.c
@@ -0,0 +1,32 @@
+/* Straight-line strength reduction control flow variation. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int c, int s)
+{
+ int a1, a2, x, x1, x2, x3, x4;
+
+ a1 = 2 * s;
+
+ if (n > 64)
+ {
+ x1 = c + a1;
+ a2 = 4 * s;
+ x2 = c + a2;
+ x = x1 + x2;
+ }
+ else
+ {
+ x3 = c + a1;
+ a2 = 4 * s;
+ x4 = c + a2;
+ x = x4 / x3;
+ }
+
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-15.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-15.c
new file mode 100644
index 0000000000..98d2df8704
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-15.c
@@ -0,0 +1,27 @@
+/* Straight-line strength reduction control flow variation. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int c, int s)
+{
+ int a, x1, x2, x3;
+
+ x1 = x2 = x3 = c;
+
+ if (n > 64)
+ {
+ a = 2 * s;
+ x1 = c + a;
+ a = 4 * s;
+ x2 = c + a;
+ a = 6 * s;
+ x3 = c + a;
+ }
+
+ return x1 + x2 + x3;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-16.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-16.c
new file mode 100644
index 0000000000..5fe0175cb9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-16.c
@@ -0,0 +1,28 @@
+/* Straight-line strength reduction control flow variation. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int c, int s)
+{
+ int a2, a3, a4, x1, x2, x3, x4;
+
+ x1 = c + s;
+ a2 = 3 * s;
+ x2 = c + a2;
+ x3 = x4 = c;
+
+ if (n > 64)
+ {
+ a3 = 5 * s;
+ x3 = c + a3;
+ a4 = 7 * s;
+ x4 = c + a4;
+ }
+
+ return x1 + x2 + x3 + x4;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-17.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-17.c
new file mode 100644
index 0000000000..3da203c205
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-17.c
@@ -0,0 +1,31 @@
+/* Straight-line strength reduction control flow variation with incr = 1. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int c, int s)
+{
+ int a2, a3, a4, x1, x2, x3, x4;
+
+ x1 = c + s;
+ x2 = x3 = x4 = c;
+
+ if (n > 64)
+ {
+ a2 = 2 * s;
+ x2 = c + a2;
+ a3 = 3 * s;
+ x3 = c + a3;
+ }
+ else
+ {
+ a4 = 2 * s;
+ x4 = c + a4;
+ }
+
+ return x1 + x2 + x3 + x4;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-18.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-18.c
new file mode 100644
index 0000000000..b8d368ea4b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-18.c
@@ -0,0 +1,32 @@
+/* Straight-line strength reduction control flow variation with incr = -1. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int c, int s)
+{
+ int a1, a2, a3, a4, x1, x2, x3, x4;
+
+ a1 = 4 * s;
+ x1 = c + a1;
+ x2 = x3 = x4 = c;
+
+ if (n > 64)
+ {
+ a2 = 3 * s;
+ x2 = c + a2;
+ a3 = 2 * s;
+ x3 = c + a3;
+ }
+ else
+ {
+ a4 = 3 * s;
+ x4 = c + a4;
+ }
+
+ return x1 + x2 + x3 + x4;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-19.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-19.c
new file mode 100644
index 0000000000..c92730f40d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-19.c
@@ -0,0 +1,22 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with stride in RHS1 position. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int c, int s)
+{
+ int x1, x2, y1, y2;
+
+ y1 = c + 2;
+ x1 = s * y1;
+ y2 = y1 + 2;
+ x2 = s * y2;
+ return x1 + x2;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* y" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c
new file mode 100644
index 0000000000..56697ff7f8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+extern void foo (int);
+
+void
+f (int *p, int n)
+{
+ foo (*(p + n++ * 4));
+ foo (*(p + 32 + n++ * 4));
+ foo (*(p + 16 + n * 4));
+}
+
+/* { dg-final { scan-tree-dump-times "\\+ 144|\\, 144>" 1 "optimized" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 72|\\, 72>" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 96|\\, 96>" 1 "optimized" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 48|\\, 48>" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-20.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-20.c
new file mode 100644
index 0000000000..cf3e1b3a0e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-20.c
@@ -0,0 +1,21 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with stride in inconsistent positions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int c, int s)
+{
+ int x1, x2, y1, y2;
+
+ y1 = c + 2;
+ x1 = y1 * s;
+ y2 = y1 + 2;
+ x2 = s * y2;
+ return x1 + x2;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-21.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-21.c
new file mode 100644
index 0000000000..c32afb2aac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-21.c
@@ -0,0 +1,32 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+
+ if (n > 64)
+ {
+ x1 = x + 3;
+ a += x1 * stride;
+ x2 = x1 + 3;
+ a += x2 * stride;
+ }
+ else
+ {
+ x3 = x + 3;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* stride" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 3" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-22.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-22.c
new file mode 100644
index 0000000000..6e56d9bb45
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-22.c
@@ -0,0 +1,29 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+
+ if (n > 64)
+ {
+ x1 = x + 3;
+ a += x1 * stride;
+ x2 = x1 + 3;
+ a += x2 * stride;
+ x3 = x2 + 3;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* stride" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 3" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-23.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-23.c
new file mode 100644
index 0000000000..88bd087de3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-23.c
@@ -0,0 +1,29 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+ x1 = x + 3;
+ a += x1 * stride;
+
+ if (n > 64)
+ {
+ x2 = x1 + 3;
+ a += x2 * stride;
+ x3 = x2 + 3;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* stride" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 3" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-24.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-24.c
new file mode 100644
index 0000000000..04e093be54
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-24.c
@@ -0,0 +1,31 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow, increment = 1. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+
+ if (n > 64)
+ {
+ x1 = x + 1;
+ a += x1 * stride;
+ x2 = x1 + 1;
+ a += x2 * stride;
+ }
+ else
+ {
+ x3 = x + 1;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-25.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-25.c
new file mode 100644
index 0000000000..9e16e0476c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-25.c
@@ -0,0 +1,31 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow, increment = -1. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+
+ if (n > 64)
+ {
+ x1 = x - 1;
+ a += x1 * stride;
+ x2 = x1 - 1;
+ a += x2 * stride;
+ }
+ else
+ {
+ x3 = x - 1;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-26.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-26.c
new file mode 100644
index 0000000000..c333e00bb6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-26.c
@@ -0,0 +1,32 @@
+/* Verify straight-line strength reduction for multiply candidates
+ with variable stride and control flow, increment = -3. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int n, int x, int stride)
+{
+ int a, x1, x2, x3;
+
+ a = x * stride;
+
+ if (n > 64)
+ {
+ x1 = x - 3;
+ a += x1 * stride;
+ x2 = x1 - 3;
+ a += x2 * stride;
+ }
+ else
+ {
+ x3 = x - 3;
+ a += x3 * stride;
+ }
+
+ return a;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* stride" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 3" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-27.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-27.c
new file mode 100644
index 0000000000..c6642627d1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-27.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom2" } */
+
+struct x
+{
+ int a[16];
+ int b[16];
+ int c[16];
+};
+
+extern void foo (int, int, int);
+
+void
+f (struct x *p, unsigned int n)
+{
+ foo (p->a[n], p->c[n], p->b[n]);
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 4;" 1 "dom2" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\* 2;" 1 "dom2" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "p_\\d\+\\(D\\) \\+ \[^\r\n\]*_\\d\+;" 1 "dom2" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct x \\*\\)\[^\r\n\]*_\\d\+" 3 "dom2" } } */
+/* { dg-final { cleanup-tree-dump "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-28.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-28.c
new file mode 100644
index 0000000000..c4dbf54db8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-28.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom2" } */
+
+struct x
+{
+ int a[16];
+ int b[16];
+ int c[16];
+};
+
+extern void foo (int, int, int);
+
+void
+f (struct x *p, unsigned int n)
+{
+ foo (p->a[n], p->c[n], p->b[n]);
+ if (n > 12)
+ foo (p->a[n], p->c[n], p->b[n]);
+ else if (n > 3)
+ foo (p->b[n], p->a[n], p->c[n]);
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 4;" 1 "dom2" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\* 2;" 1 "dom2" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "p_\\d\+\\(D\\) \\+ \[^\r\n\]*_\\d\+" 1 "dom2" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct x \\*\\)\[^\r\n\]*_\\d\+" 9 "dom2" } } */
+/* { dg-final { cleanup-tree-dump "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-29.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-29.c
new file mode 100644
index 0000000000..c8e7a5e137
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-29.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-dom2" } */
+
+struct x
+{
+ int a[16];
+ int b[16];
+ int c[16];
+};
+
+extern void foo (int, int, int);
+
+void
+f (struct x *p, unsigned int n)
+{
+ foo (p->a[n], p->c[n], p->b[n]);
+ if (n > 3)
+ {
+ foo (p->a[n], p->c[n], p->b[n]);
+ if (n > 12)
+ foo (p->b[n], p->a[n], p->c[n]);
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 4;" 1 "dom2" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\* 2;" 1 "dom2" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "p_\\d\+\\(D\\) \\+ \[^\r\n\]*_\\d\+" 1 "dom2" } } */
+/* { dg-final { scan-tree-dump-times "MEM\\\[\\(struct x \\*\\)\[^\r\n\]*_\\d\+" 9 "dom2" } } */
+/* { dg-final { cleanup-tree-dump "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c
new file mode 100644
index 0000000000..89d1d2e73f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-3.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+foo (int a[], int b[], int i)
+{
+ a[i] = b[i] + 2;
+ i++;
+ a[i] = b[i] + 2;
+ i++;
+ a[i] = b[i] + 2;
+ i++;
+ a[i] = b[i] + 2;
+ i++;
+ return i;
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" { target { int32 } } } } */
+/* { dg-final { scan-tree-dump-times "\\* 2" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 2|\\, 2>" 5 "optimized" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 4|\\, 4>" 2 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 8|\\, 8>" 1 "optimized" { target { int32plus } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 6|\\, 6>" 1 "optimized" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump-times "\\+ 12|\\, 12>" 1 "optimized" { target { int32 } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c
new file mode 100644
index 0000000000..5fea3d3db8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c
@@ -0,0 +1,24 @@
+/* Verify straight-line strength reduction fails for simple integer addition
+ with casts thrown in when -fwrapv is used. */
+
+/* { dg-do compile { target { long_neq_int } } } */
+/* { dg-options "-O3 -fdump-tree-dom2 -fwrapv" } */
+
+long
+f (int s, long c)
+{
+ int a1, a2, a3;
+ long x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = c + a1;
+ a2 = 4 * s;
+ x2 = c + a2;
+ a3 = 6 * s;
+ x3 = c + a3;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 3 "dom2" } } */
+/* { dg-final { cleanup-tree-dump "dom2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-31.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-31.c
new file mode 100644
index 0000000000..edf31294a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-31.c
@@ -0,0 +1,27 @@
+/* Verify straight-line strength reduction for add candidates in
+ which the stride is unknown and increments appear that differ
+ only in sign. Verify the increments are shared. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, a4, x1, x2, x3, x4, x;
+
+ a1 = 2 * s;
+ x1 = c + a1;
+ a2 = 4 * s; /* incr = +2 */
+ x2 = c + a2;
+ a3 = 7 * s;
+ x3 = c + a3;
+ a4 = 5 * s; /* incr = -2 */
+ x4 = c + a4;
+ x = x1 + x2 + x3 + x4;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* -2" 0 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-32.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-32.c
new file mode 100644
index 0000000000..73e6797433
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-32.c
@@ -0,0 +1,32 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependence and having an unknown stride. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c, int i)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = i * s;
+ x1 = c + a1;
+
+ i = i + 2;
+ a2 = i * s;
+ x2 = c + a2;
+
+ if (x2 > 6)
+ i = i + 2;
+
+ i = i + 2;
+ a3 = i * s;
+ x3 = c + a3;
+
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-33.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-33.c
new file mode 100644
index 0000000000..5cd4276577
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-33.c
@@ -0,0 +1,31 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependence and having a known stride. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int c, int i)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = i * 16;
+ x1 = c + a1;
+
+ i = i + 2;
+ a2 = i * 16;
+ x2 = c + a2;
+
+ if (x2 > 6)
+ i = i + 2;
+
+ i = i + 2;
+ a3 = i * 16;
+ x3 = c + a3;
+
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-34.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-34.c
new file mode 100644
index 0000000000..3593f869b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-34.c
@@ -0,0 +1,43 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by two phi dependences, and having a known stride. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+extern void
+g (void);
+
+int
+f (int c, int i)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = i * 16;
+ x1 = c + a1;
+
+ i = i + 2;
+ a2 = i * 16;
+ x2 = c + a2;
+
+ if (x2 > 6)
+ {
+ if (c < 200)
+ i = i + 2;
+ else
+ i = i + 4;
+ g ();
+ }
+ else
+ i = i + 6;
+
+ i = i + 2;
+ a3 = i * 16;
+ x3 = c + a3;
+
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "PHI" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-35.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-35.c
new file mode 100644
index 0000000000..3f4d136171
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-35.c
@@ -0,0 +1,28 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependences, having a known stride, and where the
+ phi has an argument which is a parameter. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int c, int i)
+{
+ int a1, a3, x1, x3, x;
+
+ a1 = i * 16;
+ x1 = c + a1;
+
+ if (x1 > 6)
+ i = i + 2;
+
+ i = i + 2;
+ a3 = i * 16;
+ x3 = c + a3;
+
+ x = x1 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-36.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-36.c
new file mode 100644
index 0000000000..8cb09e0cf5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-36.c
@@ -0,0 +1,29 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependences, having an unknown stride, and where the
+ phi has an argument which is a parameter. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c, int i)
+{
+ int a1, a3, x1, x3, x;
+
+ a1 = i * s;
+ x1 = c + a1;
+
+ if (x1 > 6)
+ i = i + 2;
+
+ i = i + 2;
+ a3 = i * s;
+ x3 = c + a3;
+
+ x = x1 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-37.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-37.c
new file mode 100644
index 0000000000..fb13b20e14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-37.c
@@ -0,0 +1,33 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependence and having an unknown stride. Variation
+ using negative increments. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c, int i)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = i * s;
+ x1 = c + a1;
+
+ i = i - 2;
+ a2 = i * s;
+ x2 = c + a2;
+
+ if (x2 > 6)
+ i = i - 2;
+
+ i = i - 2;
+ a3 = i * s;
+ x3 = c + a3;
+
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times " \\* 2" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-38.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-38.c
new file mode 100644
index 0000000000..1a0ab79bd5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-38.c
@@ -0,0 +1,32 @@
+/* Verify straight-line strength reduction for a candidate with a basis
+ hidden by a phi dependence and having a known stride. Variation using
+ negative increments. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int c, int i)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = i * 16;
+ x1 = c + a1;
+
+ i = i - 2;
+ a2 = i * 16;
+ x2 = c + a2;
+
+ if (x2 > 6)
+ i = i - 2;
+
+ i = i - 2;
+ a3 = i * 16;
+ x3 = c + a3;
+
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
new file mode 100644
index 0000000000..c1462195c9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-39.c
@@ -0,0 +1,26 @@
+/* Verify straight-line strength reduction for back-tracing
+ CAND_ADD for T2 in:
+
+ *PBASE: T1
+ *POFFSET: MULT_EXPR (T2, C3)
+ *PINDEX: C1 + (C2 * C3) + C4 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-slsr-details" } */
+
+typedef int arr_2[50][50];
+
+void foo (arr_2 a2, int v1)
+{
+ int i, j;
+
+ i = v1 + 5;
+ j = i;
+ a2 [i] [j++] = i;
+ a2 [i] [j++] = i;
+ a2 [i] [i-1] += 1;
+ return;
+}
+
+/* { dg-final { scan-tree-dump-times "Replacing reference: " 4 "slsr" } } */
+/* { dg-final { cleanup-tree-dump "slsr" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-4.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-4.c
new file mode 100644
index 0000000000..413a1cc27a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-4.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-slsr -fdump-tree-optimized" } */
+
+void foo (int);
+
+int
+f (int i)
+{
+ int x, y;
+
+ x = i * 4;
+ y = x * 10;
+ foo (y);
+
+ i = i + 5;
+ x = i * 4;
+ y = x * 10;
+ foo (y);
+
+ i = i - 4;
+ x = i * 4;
+ y = x * 10;
+ foo (y);
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 4" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\* 10" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 20;" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 200" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\- 16;" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\- 160" 1 "slsr" } } */
+/* { dg-final { scan-tree-dump-times "\\* 4" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\* 10" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 200" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "\\+ 40" 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "slsr" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-40.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-40.c
new file mode 100644
index 0000000000..72726a3aa3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-40.c
@@ -0,0 +1,27 @@
+/* Verify straight-line strength reduction for array
+ subscripting.
+
+ elems[n-1] is reduced to elems + n * 4 + 0xffffffff * 4, only when
+ pointers are of the same size as that of int (assuming 4 bytes). */
+
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+struct data
+{
+ unsigned long elms[1];
+} gData;
+
+void __attribute__((noinline))
+foo (struct data *dst, unsigned int n)
+{
+ dst->elms[n - 1] &= 1;
+}
+
+int
+main ()
+{
+ foo (&gData, 1);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-41.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-41.c
new file mode 100644
index 0000000000..2c9d90880b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-41.c
@@ -0,0 +1,24 @@
+/* Verify straight-line strength reduction in using
+ alternative base expr to record and look for the
+ potential candidate. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-slsr-details" } */
+
+typedef int arr_2[50][50];
+
+void foo (arr_2 a2, int v1)
+{
+ int i, j;
+
+ i = v1 + 5;
+ j = i;
+ a2 [i-10] [j] = 2;
+ a2 [i] [j++] = i;
+ a2 [i+20] [j++] = i;
+ a2 [i-3] [i-1] += 1;
+ return;
+}
+
+/* { dg-final { scan-tree-dump-times "Replacing reference: " 5 "slsr" } } */
+/* { dg-final { cleanup-tree-dump "slsr" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-5.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-5.c
new file mode 100644
index 0000000000..8612febc4e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-5.c
@@ -0,0 +1,22 @@
+/* Verify straight-line strength reduction for simple add candidates. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = c + a1;
+ a2 = 4 * s;
+ x2 = c + a2;
+ a3 = 6 * s;
+ x3 = c + a3;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-6.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-6.c
new file mode 100644
index 0000000000..56b167731c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-6.c
@@ -0,0 +1,25 @@
+/* Verify straight-line strength reduction for simple add candidates,
+ pointer version. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+void
+f (int s, char *c, char *x1, char *x2, char *x3)
+{
+ int a1, a2, a3;
+
+ a1 = 2 * s;
+ x1 = c + a1;
+ *x1 = 1;
+ a2 = 4 * s;
+ x2 = c + a2;
+ *x2 = 2;
+ a3 = 6 * s;
+ x3 = c + a3;
+ *x3 = 3;
+}
+
+/* There will be four ' * ' instances for the parms, one in the code. */
+/* { dg-final { scan-tree-dump-times " \\* " 5 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c
new file mode 100644
index 0000000000..ace755f07a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-7.c
@@ -0,0 +1,22 @@
+/* Verify straight-line strength reduction for simple integer subtraction. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = c - a1;
+ a2 = 4 * s;
+ x2 = c - a2;
+ a3 = 6 * s;
+ x3 = c - a3;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c
new file mode 100644
index 0000000000..e78e9c004b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-8.c
@@ -0,0 +1,24 @@
+/* Verify straight-line strength reduction for simple pointer subtraction. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int*
+f (int s, int *c)
+{
+ int a1, a2, a3, *x1, *x2, *x3;
+
+ a1 = 2 * s;
+ x1 = c - a1;
+ a2 = 4 * s;
+ x2 = c - a2;
+ a3 = 6 * s;
+ x3 = c - a3;
+ return x1 ? x2 : x3;
+}
+
+/* There are 4 ' * ' instances in the decls (since "int * iftmp.0;" is
+ added), 1 parm, 2 in the code. The second one in the code can be
+ a widening mult. */
+/* { dg-final { scan-tree-dump-times " w?\\* " 7 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/slsr-9.c b/gcc/testsuite/gcc.dg/tree-ssa/slsr-9.c
new file mode 100644
index 0000000000..3a388731ee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/slsr-9.c
@@ -0,0 +1,23 @@
+/* Verify straight-line strength reduction for simple integer addition
+ with stride reversed. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-optimized" } */
+
+int
+f (int s, int c)
+{
+ int a1, a2, a3, x1, x2, x3, x;
+
+ a1 = 2 * s;
+ x1 = a1 + c;
+ a2 = 4 * s;
+ x2 = a2 + c;
+ a3 = 6 * s;
+ x3 = a3 + c;
+ x = x1 + x2 + x3;
+ return x;
+}
+
+/* { dg-final { scan-tree-dump-times " \\* " 1 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
index 1ad3f49242..59e5e6af6d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-12.c
@@ -21,5 +21,5 @@ int foo (struct S *p)
*p = l;
}
-/* { dg-final { scan-tree-dump-times "l;" 0 "release_ssa" { target { ! "avr*-*-*" } } } } */
+/* { dg-final { scan-tree-dump-times "l;" 0 "release_ssa" { target { ! "avr*-*-* nds32*-*-*" } } } } */
/* { dg-final { cleanup-tree-dump "release_ssa" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/sra-13.c b/gcc/testsuite/gcc.dg/tree-ssa/sra-13.c
index 12b77fe2f2..d4aa47a05c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/sra-13.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/sra-13.c
@@ -95,7 +95,7 @@ main (void)
b = 0;
gu1.b.l = 20000000;
s = bar ();
- if (s != 20000000)
+ if (s != (int)20000000)
__builtin_abort ();
if (gu2.b.l != 20000000)
__builtin_abort ();
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
index 7177d991e2..9eecf94e20 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -fdump-tree-fab" } */
+/* { dg-options "-O1 -fdump-tree-fab1" } */
/* Check that we fold strlen of equally long strings, and that we do not
fail to terminate when there is a nontrivial cycle in the corresponding
@@ -30,5 +30,5 @@ middle:
}
/* There should be no calls to strlen. */
-/* { dg-final { scan-tree-dump-times "strlen" 0 "fab"} } */
-/* { dg-final { cleanup-tree-dump "fab" } } */
+/* { dg-final { scan-tree-dump-times "strlen" 0 "fab1"} } */
+/* { dg-final { cleanup-tree-dump "fab1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c
index aece3c7cdc..338d8a8629 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-17.c
@@ -26,7 +26,7 @@ int foobar(void)
return ((const struct Foo *)p)->i;
}
-/* { dg-final { scan-tree-dump "= i;" "ccp1" } } */
+/* { dg-final { scan-tree-dump "= i_.;" "ccp1" } } */
/* { dg-final { scan-tree-dump "= f.i;" "ccp1" } } */
/* { dg-final { scan-tree-dump "= g.i;" "ccp1" } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-23.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-23.c
index fb4af2d484..8b95b0c343 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-23.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ccp-23.c
@@ -15,5 +15,6 @@ int foo (void)
return *x;
}
-/* { dg-final { scan-tree-dump "MEM\\\[\\\(int \\\*\\\)&a \\\+ 4B\\\]" "ccp1" } } */
+/* { dg-final { scan-tree-dump "MEM\\\[\\\(int \\\*\\\)&a \\\+ 2B\\\]" "ccp1" { target { int16 } } } } */
+/* { dg-final { scan-tree-dump "MEM\\\[\\\(int \\\*\\\)&a \\\+ 4B\\\]" "ccp1" { target { int32 } } } } */
/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c
new file mode 100644
index 0000000000..9757013918
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-copyprop-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-Og -fdump-tree-optimized" } */
+
+extern long long __sdt_unsp;
+void
+f(void)
+{
+ for (;;)
+ __asm__ ("%0" :: "i" (((!__extension__ (__builtin_constant_p ((((unsigned long long) (__typeof (__builtin_choose_expr (((__builtin_classify_type (0) + 3) & -4) == 4, (0), 0U))) __sdt_unsp) ) == 0) )) ? 1 : -1) ));
+}
+
+/* { dg-final { scan-tree-dump-not "PHI" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c
deleted file mode 100644
index d67f869286..0000000000
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-3.c
+++ /dev/null
@@ -1,48 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-tree-dom1-details -fno-short-enums" } */
-
-extern void abort (void) __attribute__ ((__noreturn__));
-union tree_node;
-typedef union tree_node *tree;
-enum tree_code
-{
- VAR_DECL,
- SSA_NAME,
- MAX_TREE_CODES
-};
-extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
-struct tree_base
-{
- enum tree_code code:16;
-};
-enum tree_node_structure_enum
-{
- TS_DECL_COMMON
-};
-struct tree_ssa_name
-{
- tree var;
-};
-union tree_node
-{
- struct tree_base base;
- struct tree_ssa_name ssa_name;
-};
-long
-expand_one_var (tree var, unsigned char toplevel, unsigned char really_expand)
-{
- tree origvar = var;
- var = var->ssa_name.var;
- if (((enum tree_code) (origvar)->base.code) == SSA_NAME
- && !((var->base.code != VAR_DECL)))
- abort ();
- if ((var->base.code) != VAR_DECL && ((origvar)->base.code) != SSA_NAME)
- ;
- else if (tree_contains_struct[(var->base.code)][(TS_DECL_COMMON)] != 1)
- abort ();
-}
-/* We should thread the jump, through an intermediate block. */
-/* { dg-final { scan-tree-dump-times "Threaded" 1 "dom1"} } */
-/* { dg-final { scan-tree-dump-times "one or more intermediate" 1 "dom1"} } */
-/* { dg-final { cleanup-tree-dump "dom1" } } */
-
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
index 1396831ac1..e85a24420e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dom-thread-4.c
@@ -1,6 +1,5 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fdump-tree-dom1-details" } */
-/* { dg-additional-options "-mbranch-cost=2" { target s390*-*-* } } */
struct bitmap_head_def;
typedef struct bitmap_head_def *bitmap;
typedef const struct bitmap_head_def *const_bitmap;
@@ -59,9 +58,23 @@ bitmap_ior_and_compl (bitmap dst, const_bitmap a, const_bitmap b,
code we missed the edge when the first conditional is false
(b_elt is zero, which means the second conditional is always
zero. */
-/* { dg-final { scan-tree-dump-times "Threaded" 3 "dom1" { target { ! mips*-*-* } } } } */
-/* MIPS defines LOGICAL_OP_NON_SHORT_CIRCUIT to 0, so we split var1 || var2
- into two conditions, rather than use (var1 != 0) | (var2 != 0). */
-/* { dg-final { scan-tree-dump-times "Threaded" 4 "dom1" { target mips*-*-* } } } */
+/* { dg-final { scan-tree-dump-times "Threaded" 3 "dom1" { target { ! logical_op_short_circuit } } } } */
+/* On targets that define LOGICAL_OP_NON_SHORT_CIRCUIT to 0, we split both
+ "a_elt || b_elt" and "b_elt && kill_elt" into two conditions each,
+ rather than using "(var1 != 0) op (var2 != 0)". Also, as on other targets,
+ we duplicate the header of the inner "while" loop. There are then
+ 4 threading opportunities:
+
+ 1x "!a_elt && b_elt" in the outer "while" loop
+ -> the start of the inner "while" loop,
+ skipping the known-true "b_elt" in the first condition.
+ 1x "!b_elt" in the first condition
+ -> the outer "while" loop's continuation point,
+ skipping the known-false "b_elt" in the second condition.
+ 2x "kill_elt->indx >= b_elt->indx" in the first "while" loop
+ -> "kill_elt->indx == b_elt->indx" in the second condition,
+ skipping the known-true "b_elt && kill_elt" in the second
+ condition. */
+/* { dg-final { scan-tree-dump-times "Threaded" 4 "dom1" { target logical_op_short_circuit xfail logical_op_short_circuit } } } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c
index 537a5e57b8..76e2004b0e 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-dse-5.c
@@ -12,7 +12,7 @@ f1 (int i, int j, int k)
x = j;
}
-/* The assignment "i = 3" is partialy dead. Our DSE pass doesn't handle
+/* The assignment "i = 3" is partially dead. Our DSE pass doesn't handle
detection of partially dead assignments.
There's two outputs which would indicate that the optimization was
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-1.c
index 2c859d5e85..058d337378 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-1.c
@@ -11,5 +11,5 @@ int f(int *a)
return *c + t;
}
-/* { dg-final { scan-tree-dump "Replaced \\\*c_\[^\n\].*with t_" "fre1" } } */
+/* { dg-final { scan-tree-dump "Replaced \\\*\[ac\]_\[^\n\].*with t_" "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-33.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-33.c
index 4108188460..ead6a183d0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-33.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-33.c
@@ -11,8 +11,8 @@ struct {
float x;
int main(int argc)
{
- vector float res = (vector float){0.0f,0.0f,0.0f,1.0f};
- res += (vector float){1.0f,2.0f,3.0f,4.0f};
+ vector float res;
+ res = (vector float){1.0f,2.0f,3.0f,5.0f};
s.global_res = res;
x = *((float*)&s.global_res + 1);
return 0;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-37.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-37.c
new file mode 100644
index 0000000000..bd4c5ef8a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-37.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre1" } */
+
+int a[256];
+int *b, *c;
+void foo (int i, int j)
+{
+ b = &a[i+j];
+ c = &a[i+j];
+}
+
+/* We should remove the redundant address computation. */
+
+/* { dg-final { scan-tree-dump-times " = &a" 1 "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-38.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-38.c
new file mode 100644
index 0000000000..2b342db524
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-38.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-fre1" } */
+
+struct S { int i; int j; };
+
+struct U
+{
+ struct S a[10];
+} u;
+
+int foo (int n, int i, int j)
+{
+ u.a[n].i = i;
+ u.a[n].j = j;
+ return u.a[n].i;
+}
+
+/* We should remove the redundant load. */
+
+/* { dg-final { scan-tree-dump-not "= u.a\\\[n_2\\(D\\)\\\].i" "fre1" } } */
+/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
index 57c6d4b5be..d3986f5ba1 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-9.c
@@ -23,6 +23,6 @@ void __frame_state_for1 (volatile char *state_in)
}
}
-/* { dg-final { scan-tree-dump-times "Eliminated: 1" 2 "fre1" } } */
+/* { dg-final { scan-tree-dump-times "Eliminated: 2" 2 "fre1" } } */
/* { dg-final { scan-tree-dump-times "Insertions: 1" 2 "fre1" } } */
/* { dg-final { cleanup-tree-dump "fre1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-10.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-10.c
new file mode 100644
index 0000000000..c2b1c19d0e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-10.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+/* Testcase for PR31657. */
+
+int f(int x, int a, int b)
+{
+ int t = 0;
+ int c = 1 << a;
+ if (!(x & 1))
+ t = 0;
+ else
+ if (x & (1 << 2))
+ t = 3;
+ else
+ t = 0;
+ return t;
+}
+/* { dg-final { scan-tree-dump "& 5" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-11.c
new file mode 100644
index 0000000000..d024df85ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-11.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-optimized" } */
+
+/* Testcase for PR31657. */
+int g(void);
+int f(int x, int a, int b)
+{
+ int t = 0;
+ int c = 1 << a;
+ if (!(x & 1))
+ t = 0;
+ else
+ if (x & (1 << 2))
+ t = g();
+ else
+ t = 0;
+ return t;
+}
+
+/* { dg-final { scan-tree-dump "& 5" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-12.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-12.c
new file mode 100644
index 0000000000..5893ba7be7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-12.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-vrp -fdump-tree-optimized" } */
+
+/* Testcase for PR31657. */
+
+int f(int x, int a, int b)
+{
+ int t = 0;
+ int c = 1 << a;
+ if (!(x & 1))
+ t = 0;
+ else
+ if (x & (1 << 2))
+ t = 3;
+ else
+ t = 0;
+ return t;
+}
+/* { dg-final { scan-tree-dump "& 5" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c
new file mode 100644
index 0000000000..43b92c1156
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-13.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target { i?86-*-* x86_64-*-* s390*-*-* avr*-*-* } } } */
+
+_Bool f1(_Bool a, _Bool b)
+{
+ if (a)
+ {
+ if (b)
+ return 1;
+ else
+ return 0;
+ }
+ return 0;
+}
+
+
+/* For LOGICAL_OP_NON_SHORT_CIRCUIT, this should be optimized
+ into return a & b;, with no ifs. */
+/* { dg-final { scan-tree-dump-not "if" "optimized" { target { i?86-*-* x86_64-*-* s390*-*-* avr*-*-* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c
index fd20250921..617cb585a9 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -fdump-tree-optimized" } */
+/* { dg-options "-O -fdump-tree-ifcombine" } */
int test1 (int i, int j)
{
@@ -11,5 +11,5 @@ int test1 (int i, int j)
/* The above should be optimized to a i > j test by ifcombine. */
-/* { dg-final { scan-tree-dump " > " "optimized" } } */
-/* { dg-final { cleanup-tree-dump "optimized" } } */
+/* { dg-final { scan-tree-dump " > " "ifcombine" } } */
+/* { dg-final { cleanup-tree-dump "ifcombine" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-8.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-8.c
new file mode 100644
index 0000000000..a6c4282ef6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-8.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fno-trapping-math -fdump-tree-ifcombine" } */
+
+double test1 (double i, double j)
+{
+ if (i >= j)
+ if (i <= j)
+ goto plif;
+ else
+ goto plouf;
+ else
+ goto plif;
+
+plif:
+ return 0;
+plouf:
+ return -1;
+}
+
+/* The above should be optimized to a i > j test by ifcombine.
+ The transformation would also be legal with -ftrapping-math.
+ Instead we get u<=, which is acceptable with -fno-trapping-math. */
+
+/* { dg-final { scan-tree-dump " u<= " "ifcombine" } } */
+/* { dg-final { cleanup-tree-dump "ifcombine" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-9.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-9.c
new file mode 100644
index 0000000000..cb57502271
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-9.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-trapping-math -fdump-tree-ifcombine" } */
+
+void f ();
+enum Sign { NEG=-1, ZERO, POS };
+
+static inline enum Sign sign (double x)
+{
+ if (x > 0) return POS;
+ if (x < 0) return NEG;
+ return ZERO;
+}
+void g (double x)
+{
+ if (sign (x) == NEG) f();
+}
+
+/* The above should be optimized to x < 0 by ifcombine.
+ The transformation would also be legal with -ftrapping-math. */
+
+/* { dg-final { scan-tree-dump "optimizing.* < " "ifcombine" } } */
+/* { dg-final { cleanup-tree-dump "ifcombine" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c
new file mode 100644
index 0000000000..89959d84e4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b)
+{
+ if (a > 0)
+ if (b > 0)
+ return 0;
+ return 1;
+}
+/* { dg-final { scan-tree-dump "\&" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c
new file mode 100644
index 0000000000..c6ae111dda
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b)
+{
+ if (a > 0)
+ goto L1;
+ if (b > 0)
+ goto L1;
+ return 0;
+L1:
+ return 1;
+}
+/* { dg-final { scan-tree-dump "\|" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c
new file mode 100644
index 0000000000..4b2605e2a1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-3.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b)
+{
+ if (a > 0)
+ goto L1;
+ else
+ goto L2;
+L1:
+ if (b > 0)
+ goto L2;
+ return 5;
+L2:
+ return 6;
+}
+/* { dg-final { scan-tree-dump "\|" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c
new file mode 100644
index 0000000000..e38b707c14
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-4.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b)
+{
+ if (a > 0)
+ goto L1;
+ if (b > 0)
+ goto L2;
+L1:
+ return 0;
+L2:
+ return 1;
+}
+/* { dg-final { scan-tree-dump "\&" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c
new file mode 100644
index 0000000000..7f80d38f97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-5.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b, int c)
+{
+ if (a > 0 && b > 0 && c > 0)
+ return 0;
+ return 1;
+}
+/* { dg-final { scan-tree-dump-times "\&" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c
new file mode 100644
index 0000000000..15017e8f98
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-ifcombine-ccmp-6.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { ! { { logical_op_short_circuit && { ! avr-*-* } } || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* arc*-*-* mips*-*-* } } } } } */
+
+/* { dg-options "-O2 -g -fdump-tree-optimized" } */
+/* { dg-additional-options "-mbranch-cost=2" { target mips*-*-* avr-*-* s390*-*-* i?86-*-* x86_64-*-* } } */
+
+int t (int a, int b, int c)
+{
+ if (a > 0 || b > 0 || c > 0)
+ return 0;
+ return 1;
+}
+/* { dg-final { scan-tree-dump-times "\\|" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c
new file mode 100644
index 0000000000..ea91a61237
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-lim-11.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fprofile-arcs -fdump-tree-lim1-details" } */
+
+struct thread_param
+{
+ long* buf;
+ long iterations;
+ long accesses;
+} param;
+
+void access_buf(struct thread_param* p)
+{
+ long i,j;
+ long iterations = p->iterations;
+ long accesses = p->accesses;
+ for (i=0; i<iterations; i++)
+ {
+ long* pbuf = p->buf;
+ for (j=0; j<accesses; j++)
+ pbuf[j] += 1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "Executing store motion of __gcov0.access_buf\\\[\[01\]\\\] from loop 1" 2 "lim1" } } */
+/* { dg-final { cleanup-tree-dump "lim1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c
index 3dd3b52633..3bc0f5e3e6 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-1.c
@@ -9,7 +9,7 @@ int foo(int argc, char **argv)
b = argc + 1;
c = argc + 2;
a = b + c;
- if (argc * 2)
+ if (argc > 2)
{
c = argc + 3;
}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c
index 10efb12b4a..40bb421f53 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-21.c
@@ -11,5 +11,5 @@ NumSift (long *array, unsigned long k)
/* There should be only two loads left. */
-/* { dg-final { scan-tree-dump-times "= \\\*D\[^\n;\]*;" 2 "pre" } } */
+/* { dg-final { scan-tree-dump-times "= \\\*\[^\n;\]*;" 2 "pre" { xfail { ! size32plus } } } } */ /* xfail: PR tree-optimization/58169 */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-27.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-27.c
index 1d60a30132..4149bbef6a 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-27.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-27.c
@@ -17,13 +17,12 @@ int foo2 (int i, int j, int b)
int res = 0;
if (b)
res = i/j;
- /* But we fail so here because of the possibly not returning
- call in the same basic-block. */
+ /* And here, the possibly not returning call in the same basic-block
+ comes after the trapping i/j. */
res += i/j;
bar ();
return res;
}
-/* { dg-final { scan-tree-dump-times "# prephitmp" 1 "pre" } } */
-/* { dg-final { scan-tree-dump-times "# prephitmp" 2 "pre" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "# prephitmp" 2 "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c
index 3c27a1a29f..55887a694d 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-28.c
@@ -6,7 +6,7 @@ int foo (int i, int b, int result)
{
int mask;
if (b)
- mask = -1;
+ mask = -2;
else
mask = 0;
result = i + 1;
@@ -15,7 +15,7 @@ int foo (int i, int b, int result)
}
/* We should insert i + 1 into the if (b) path as well as the simplified
- i + 1 & -1 expression. And do replacement with two PHI temps. */
+ i + 1 & -2 expression. And do replacement with two PHI temps. */
/* { dg-final { scan-tree-dump-times "with prephitmp" 2 "pre" } } */
/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-29.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-29.c
new file mode 100644
index 0000000000..f2d2c4107c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-29.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre-details" } */
+
+int flag, hoist, y, z;
+
+void
+foo (void)
+{
+ if (flag)
+ y = hoist + 4;
+ else
+ flag = 888;
+ z = hoist + 4;
+ bark ();
+}
+
+/* We should see the partial redundancy of hoist + 4, not being confused
+ about bark () possibly clobbering hoist. */
+
+/* { dg-final { scan-tree-dump "Replaced hoist" "pre" } } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-30.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-30.c
new file mode 100644
index 0000000000..91e0e89363
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-30.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target int32 } */
+/* { dg-options "-O2 -fdump-tree-pre-details" } */
+
+int f;
+int g;
+unsigned int
+foo (int b, int x)
+{
+ if (b)
+ x = *(int *)&f;
+ g = x;
+ return *(unsigned int*)&f;
+}
+float
+bar (int b, int x)
+{
+ if (b)
+ x = *(int *)&f;
+ g = x;
+ return *(float *)&f;
+}
+
+/* We should see the partial redundant loads of f even though they
+ are using different types (of the same size). */
+
+/* { dg-final { scan-tree-dump-times "Replaced MEM" 2 "pre" } } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-31.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-31.c
new file mode 100644
index 0000000000..2094de4ca8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-pre-31.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-pre" } */
+
+typedef struct {
+ unsigned int key;
+} S;
+typedef struct s1 {
+ unsigned int key;
+ unsigned int bits;
+ struct s1 *left, *right;
+}S1;
+extern S a[1024];
+static inline int bar( S* p, S1* n )
+{
+ S1 *curr;
+ S1 *next;
+
+ if ( n->left == n )
+ return (int)(p->key == n->key);
+
+ curr = n;
+ next = n->left;
+
+ while (curr->bits > next->bits ) {
+ curr = next;
+ if (p->key & (1 << curr->bits))
+ next = curr->right;
+ else
+ next = curr->left;
+ }
+
+ return (int)(p->key == next->key);
+
+}
+
+int foo (S1 *root, int N)
+{
+ volatile int r;
+ int i,j;
+ for (i=0; i<N; i++)
+ for (j=0;j<1024; j++)
+ r = bar(&a[j], root);
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "key" 4 "pre" } } */
+/* { dg-final { cleanup-tree-dump "pre" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
index acb59e1e8a..e187735a41 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-store-ccp-3.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
-/* Skipped on MIPS GNU/Linux and IRIX target because __PIC__ can be
+/* Skipped on MIPS GNU/Linux target because __PIC__ can be
defined for executables as well as shared libraries. */
-/* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* mips*-*-irix* *-*-mingw* } { "*" } { "" } } */
+/* { dg-skip-if "" { *-*-darwin* hppa*64*-*-* mips*-*-linux* *-*-mingw* } { "*" } { "" } } */
/* { dg-options "-O2 -fno-common -fdump-tree-optimized" } */
const int conststaticvariable;
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c b/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
new file mode 100644
index 0000000000..476ee5e941
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/ssa-vrp-thread-1.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+
+
+struct basic_block_def;
+typedef struct basic_block_def *basic_block;
+enum gimple_code
+{
+ LAST_AND_UNUSED_GIMPLE_CODE
+};
+struct omp_region
+{
+ struct omp_region *outer;
+ basic_block cont;
+};
+void
+build_omp_regions_1 (basic_block bb, struct omp_region *parent,
+ unsigned char single_tree, enum gimple_code code)
+{
+ if (code == 25)
+ parent = parent->outer;
+ else if (code == 42)
+ parent->cont = bb;
+ if (single_tree && !parent)
+ return;
+ oof ();
+}
+
+/* ARM Cortex-M defined LOGICAL_OP_NON_SHORT_CIRCUIT to false,
+ so skip below test. */
+/* { dg-final { scan-tree-dump-times "Threaded" 1 "vrp1" { target { ! arm_cortex_m } } } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/stdarg-6.c b/gcc/testsuite/gcc.dg/tree-ssa/stdarg-6.c
new file mode 100644
index 0000000000..70cde1b803
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/stdarg-6.c
@@ -0,0 +1,36 @@
+/* PR tree-optimization/56205 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-tree-stdarg" } */
+
+#include <stdarg.h>
+
+int a, b;
+char c[128];
+
+static inline void
+foo (int x, char const *y, va_list z)
+{
+ __builtin_printf ("%s %d %s", x ? "" : "foo", ++a, (y && *y) ? "bar" : "");
+ if (y && *y)
+ __builtin_vprintf (y, z);
+}
+
+void
+bar (int x, char const *y, ...)
+{
+ va_list z;
+ va_start (z, y);
+ if (!x && *c == '\0')
+ ++b;
+ foo (x, y, z);
+ va_end (z);
+}
+
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" { target { { i?86-*-* x86_64-*-* } && { ! { ia32 } } } } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" { target { powerpc*-*-linux* && ilp32 } } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" { target alpha*-*-linux* } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units and all FPR units" "stdarg" { target s390*-*-linux* } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units" "stdarg" { target { { i?86-*-* x86_64-*-* } && ia32 } } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units" "stdarg" { target ia64-*-* } } } */
+/* { dg-final { scan-tree-dump "bar: va_list escapes 1, needs to save all GPR units" "stdarg" { target { powerpc*-*-* && lp64 } } } } */
+/* { dg-final { cleanup-tree-dump "stdarg" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp b/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
index 14225223ad..1dd660715c 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
+++ b/gcc/testsuite/gcc.dg/tree-ssa/tree-ssa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997,2002,2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/unreachable.c b/gcc/testsuite/gcc.dg/tree-ssa/unreachable.c
index 279a277703..c4caeaf6c0 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/unreachable.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/unreachable.c
@@ -11,5 +11,5 @@ main()
return 1;
return 0;
}
-/* { dg-final { scan-tree-dump-not "bad_boy" "optimized"} } */
+/* { dg-final { scan-tree-dump-not "bad_boy" "optimized" { target { ! keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-2.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-2.c
index e34532d3fa..2d214df409 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vector-2.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-2.c
@@ -17,7 +17,7 @@ float f(vector float a, int b, vector float c)
}
/* We should be able to optimize this to just "return 0.0;" */
-/* { dg-final { scan-tree-dump-times "BIT_FIELD_REF" 0 "optimized"} } */
-/* { dg-final { scan-tree-dump-times "0.0" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-not "BIT_FIELD_REF" "optimized"} } */
+/* { dg-final { scan-tree-dump-times "return 0.0" 1 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-3.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-3.c
index 15a700c658..f5e337fb49 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vector-3.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-3.c
@@ -14,7 +14,7 @@ float f(float b)
/* We should be able to optimize this to just "return 0.0;" */
/* { dg-final { scan-tree-dump-times "BIT_FIELD_REF" 0 "optimized"} } */
-/* { dg-final { scan-tree-dump-times "0.0" 1 "optimized"} } */
+/* { dg-final { scan-tree-dump-times "0\\\.0" 1 "optimized"} } */
/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c b/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c
new file mode 100644
index 0000000000..018b8cbe3a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vector-4.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-w -O1 -fdump-tree-gimple" } */
+
+typedef int SItype __attribute__ ((mode (SI)));
+typedef SItype v4si __attribute__ ((vector_size (16)));
+
+v4si vs (v4si a, v4si b)
+{
+ return __builtin_shuffle (a, b, (v4si) {0, 4, 1, 5});
+}
+
+/* The compound literal should be placed directly in the vec_perm. */
+/* Test is xfailed on 32-bit hppa*-*-* because target-callee-copies. */
+/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR <a, b, { 0, 4, 1, 5 }>;" 1 "gimple" { xfail { hppa*-*-* && { ! lp64 } } } } } */
+
+/* { dg-final { cleanup-tree-dump "gimple" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp.h b/gcc/testsuite/gcc.dg/tree-ssa/vrp.h
new file mode 100644
index 0000000000..079013a810
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp.h
@@ -0,0 +1,27 @@
+extern void link_error(void);
+
+#define RANGE(name, min, max) \
+ if (name < min || name > max) \
+ return;
+#define ANTI_RANGE(name, min, max) \
+ if (name >= min && name <= max) \
+ return;
+#define MERGE(cond, name1, name2) \
+ if (cond) \
+ name1 = name2;
+#define CHECK_RANGE(expr, min, max) \
+ do { \
+ __typeof__ (expr) v = (expr); \
+ if (v < min) link_error(); \
+ if (v > max) link_error(); \
+ if (v < min || v > max) link_error (); \
+ } while (0)
+#define CHECK_ANTI_RANGE(expr, min, max) \
+ do { \
+ __typeof__ (expr) v = (expr); \
+ if (v >= min) \
+ if (v <= max) \
+ link_error(); \
+ if (v >= min && v <= max) \
+ link_error(); \
+ } while (0)
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
index 1ef6c922e8..cb6df0dcac 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp06.c
@@ -25,7 +25,7 @@ foo (int i, int j, int a)
return i + a + j;
}
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate j_.*to 1" 1 "vrp1" } } */
-/* { dg-final { scan-tree-dump-times "Folding predicate i_.*to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9\]+.*0 to 0" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate j_\[0-9\]+.*0 to 1" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Folding predicate i_\[0-9]+.*j_\[0-9\]+.* to 0" 1 "vrp1" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c
index 08b788abaf..9fdba58d14 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp47.c
@@ -1,10 +1,10 @@
-/* Skip on MIPS, where LOGICAL_OP_NON_SHORT_CIRCUIT inhibits the setcc
+/* Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 inhibits the setcc
optimizations that expose the VRP opportunity. */
-/* Skip on S/390 and avr. Lower values in BRANCH_COST lead to two conditional
+/* Skip on S/390. Lower values in BRANCH_COST lead to two conditional
jumps when evaluating an && condition. VRP is not able to optimize
this. */
-/* { dg-do compile { target { ! "mips*-*-* s390*-*-* avr-*-* mn10300-*-*" } } } */
-/* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-dom1 -fdump-tree-dom2" } */
+/* { dg-do compile { target { ! { logical_op_short_circuit || { s390*-*-* mn10300-*-* hppa*-*-* } } } } } */
+/* { dg-options "-O2 -fdump-tree-vrp1 -fdump-tree-dom1 -fdump-tree-vrp2" } */
/* { dg-additional-options "-march=i586" { target { { i?86-*-* x86_64-*-* } && ia32 } } } */
int h(int x, int y)
@@ -36,15 +36,14 @@ int f(int x)
0 or 1. */
/* { dg-final { scan-tree-dump-times "\[xy\]\[^ \]* !=" 0 "vrp1" } } */
-/* This one needs more copy propagation that only happens in dom1. */
-/* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "dom1" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "dom2" } } */
-/* { dg-final { scan-tree-dump-times "x\[^ \]* & y" 1 "vrp1" { xfail *-*-* } } } */
-
-/* These two are fully simplified by VRP. */
+/* These two are fully simplified by VRP1. */
/* { dg-final { scan-tree-dump-times "x\[^ \]* \[|\] y" 1 "vrp1" } } */
/* { dg-final { scan-tree-dump-times "x\[^ \]* \\^ 1" 1 "vrp1" } } */
+/* VRP2 gets rid of the remaining & 1 operations, x and y are always
+ either 0 or 1. */
+/* { dg-final { scan-tree-dump-times " & 1;" 0 "vrp2" } } */
+
/* { dg-final { cleanup-tree-dump "vrp1" } } */
/* { dg-final { cleanup-tree-dump "dom1" } } */
-/* { dg-final { cleanup-tree-dump "dom2" } } */
+/* { dg-final { cleanup-tree-dump "vrp2" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
index 7adfe62052..7a3e726b20 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp55.c
@@ -9,6 +9,7 @@ fu (char *p, int x)
arf ();
}
-/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 1 "vrp1" { target { ! keeps_null_pointer_checks } } } } */
+/* { dg-final { scan-tree-dump-times "Threaded jump" 0 "vrp1" { target { keeps_null_pointer_checks } } } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
index 7da3896b5b..aa10af2496 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp58.c
@@ -8,5 +8,6 @@ foo (long long a, signed char b, signed char c)
return a + (short)bc;
}
-/* { dg-final { scan-tree-dump "Folded into" "vrp1" } } */
+/* { dg-final { scan-tree-dump "Folded into" "vrp1" { target int32plus } } } */
+/* { dg-final { scan-tree-dump "Folding statement: _\[0-9\]\* = \\(long long int\\) bc_\[0-9\]\*;" "vrp1" { target int16 } } } */
/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp63.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp63.c
new file mode 100644
index 0000000000..9116847de5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp63.c
@@ -0,0 +1,345 @@
+/* PR tree-optimization/51721 */
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+extern void link_error (void);
+
+#define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1)
+
+void
+f1 (unsigned int s)
+{
+ if (s >> 1 == 0)
+ {
+ if (s == 2 || s == -1U)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 1)
+ link_error ();
+ }
+}
+
+void
+f2 (unsigned int s)
+{
+ if (s >> 4 != 3)
+ {
+ if (s == 48 || s == 57 || s == 63)
+ link_error ();
+ }
+ else
+ {
+ if (s == 47 || s == 64 || s == 0 || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f3 (int s)
+{
+ if (s >> 3 == -2)
+ {
+ if (s == -17 || s == -8 || s == 0
+ || s == -__INT_MAX__ - 1 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == -16 || s == -12 || s == -9)
+ link_error ();
+ }
+}
+
+void
+f4 (unsigned int s)
+{
+ if (s >> 2 < 4)
+ {
+ if (s == 16 || s == 20 || s == -1U)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 2 || s == 14 || s == 15)
+ link_error ();
+ }
+}
+
+void
+f5 (unsigned int s)
+{
+ if (s >> 3 <= 7)
+ {
+ if (s == 64 || s == 68 || s == -1U)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 1 || s == 62 || s == 63)
+ link_error ();
+ }
+}
+
+void
+f6 (unsigned int s)
+{
+ if (s >> 1 > 2)
+ {
+ if (s == 0 || s == 3 || s == 5)
+ link_error ();
+ }
+ else
+ {
+ if (s == 6 || s == 8 || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f7 (unsigned int s)
+{
+ if (s >> 5 >= 7)
+ {
+ if (s == 0 || s == 2 || s == 221 || s == 223)
+ link_error ();
+ }
+ else
+ {
+ if (s == 224 || s == 256 || s == 258 || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f8 (int s)
+{
+ if (s >> 2 < -3)
+ {
+ if (s == -12 || s == -10 || s == 0 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == -13 || s == -16 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+}
+
+void
+f9 (int s)
+{
+ if (s >> 3 <= -2)
+ {
+ if (s == -8 || s == -6 || s == 0 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == -9 || s == -11 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+}
+
+void
+f10 (int s)
+{
+ if (s >> 1 > -4)
+ {
+ if (s == -7 || s == -9 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == -6 || s == -4 || s == 0 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f11 (int s)
+{
+ if (s >> 3 >= -6)
+ {
+ if (s == -49 || s == -51 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == -48 || s == -46 || s == 0 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f12 (int s)
+{
+ if (s >> 2 < 4)
+ {
+ if (s == 16 || s == 20 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 2 || s == 14 || s == 15
+ || s == -2 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+}
+
+void
+f13 (int s)
+{
+ if (s >> 3 <= 7)
+ {
+ if (s == 64 || s == 68 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 1 || s == 62 || s == 63
+ || s == -2 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+}
+
+void
+f14 (int s)
+{
+ if (s >> 1 > 2)
+ {
+ if (s == 0 || s == 3 || s == 5
+ || s == -2 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 6 || s == 8 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f15 (int s)
+{
+ if (s >> 5 >= 7)
+ {
+ if (s == 0 || s == 2 || s == 221 || s == 223
+ || s == -2 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 224 || s == 256 || s == 258 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+unsigned int
+f16 (unsigned int s)
+{
+ unsigned int t = s >> BITSM1;
+ if (t != 0)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+ return t;
+}
+
+int
+f17 (int s)
+{
+ int t = s >> BITSM1;
+ if (t == 0)
+ {
+ if (s == -1 || s == -5 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ return t;
+}
+
+unsigned int
+f18 (unsigned int s)
+{
+ unsigned int t = s >> BITSM1;
+ if (t >= 1)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+ return t;
+}
+
+int
+f19 (int s)
+{
+ int t = s >> BITSM1;
+ if (t >= 0)
+ {
+ if (s == -1 || s == -5 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ return t;
+}
+
+unsigned int
+f20 (unsigned int s)
+{
+ unsigned int t = s >> BITSM1;
+ if (t < 1)
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ return t;
+}
+
+int
+f21 (int s)
+{
+ int t = s >> BITSM1;
+ if (t < 0)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == -1 || s == -5 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ return t;
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp64.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp64.c
new file mode 100644
index 0000000000..2ab328f1d8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp64.c
@@ -0,0 +1,152 @@
+/* PR tree-optimization/51721 */
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+extern void link_error (void);
+
+#define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1)
+
+void
+f1 (unsigned int s)
+{
+ if (s >> BITSM1 != 0)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f2 (int s)
+{
+ if (s >> BITSM1 == 0)
+ {
+ if (s == -1 || s == -5 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f3 (unsigned int s)
+{
+ if ((s & (1U << BITSM1)) != 0)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f4 (int s)
+{
+ if ((s & (1U << BITSM1)) == 0)
+ {
+ if (s == -1 || s == -5 || s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f5 (unsigned int s)
+{
+ if ((int) s < 0)
+ {
+ if (s == 0 || s == 5 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U)
+ link_error ();
+ }
+}
+
+void
+f6 (unsigned int s)
+{
+ if ((int) s < 4)
+ {
+ if (s == 4 || s == 6 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U
+ || s == 3 || s == 0)
+ link_error ();
+ }
+}
+
+void
+f7 (unsigned int s)
+{
+ if ((int) s <= -7)
+ {
+ if (s == -6U || s == -1U || s == 0 || s == 4 || s == 6 || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -9U
+ || s == -7U)
+ link_error ();
+ }
+}
+
+void
+f8 (unsigned int s)
+{
+ if ((int) s >= 4)
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -1U
+ || s == 3 || s == 0)
+ link_error ();
+ }
+ else
+ {
+ if (s == 4 || s == 6 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+void
+f9 (unsigned int s)
+{
+ if ((int) s > -7)
+ {
+ if (s == 1U + __INT_MAX__ || s == 6U + __INT_MAX__ || s == -9U
+ || s == -7U)
+ link_error ();
+ }
+ else
+ {
+ if (s == -6U || s == -1U || s == 0 || s == 4 || s == 6 || s == __INT_MAX__)
+ link_error ();
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp65.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp65.c
new file mode 100644
index 0000000000..d1090685d2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp65.c
@@ -0,0 +1,376 @@
+/* PR tree-optimization/52267 */
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+extern void link_error (void);
+
+#define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1)
+#define BITSH ((sizeof (int) - sizeof (short)) * __CHAR_BIT__)
+
+void
+f1 (unsigned int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) != 0)
+ {
+ if (s <= (1U << (BITSM1 - 2)) - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s >= (1U << (BITSM1 - 2)))
+ link_error ();
+ }
+}
+
+void
+f2 (int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) == 0)
+ {
+ if (s >= (1 << (BITSM1 - 2)) || s < 0)
+ link_error ();
+ }
+ else
+ {
+ if (s >= 0 && s <= (1 << (BITSM1 - 2)) - 1)
+ link_error ();
+ }
+}
+
+void
+f3 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s >= -15552U)
+ link_error ();
+ }
+ else
+ {
+ if (s <= 0x3f)
+ link_error ();
+ }
+}
+
+void
+f4 (int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s >= -15552 && s < 0)
+ link_error ();
+ }
+ else
+ {
+ if (/* s <= 0x3fU */ s == 0 || s == 0x20 || s == 0x3f)
+ link_error ();
+ }
+}
+
+void
+f5 (int s)
+{
+ if ((s & 0x3cc0U) == 0)
+ {
+ if (s >= -15552 && s < 0)
+ link_error ();
+ }
+ else
+ {
+ if (/* s <= 0x3fU */ s == 0 || s == 0x20 || s == 0x3f)
+ link_error ();
+ }
+}
+
+void
+f6 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s <= 0x3cbf)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -64U)
+ link_error ();
+ }
+}
+
+void
+f7 (int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s >= 0 && s <= 0x3cbf)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -64 && s < 0)
+ link_error ();
+ }
+}
+
+void
+f8 (int s)
+{
+ if ((s & 0x3cc0U) == 0x3cc0)
+ {
+ if (s >= 0 && s <= 0x3cbf)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -64 && s < 0)
+ link_error ();
+ }
+}
+
+void
+f9 (unsigned int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s <= 0x1cbf)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -8256U)
+ link_error ();
+ }
+}
+
+void
+f10 (unsigned int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s <= 0x1fff)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -8192U)
+ link_error ();
+ }
+}
+
+void
+f11 (int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s >= 0 && s <= 0x1cbf)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -8256 && s < 0)
+ link_error ();
+ }
+}
+
+void
+f12 (int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s >= 0 && s <= 0x1fff)
+ link_error ();
+ }
+ else
+ {
+ if (s >= -8192 && s < 0)
+ link_error ();
+ }
+}
+
+void
+f13 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xb030U << BITSH))
+ {
+ if (s <= ((0xc000U << BITSH) - 1))
+ link_error ();
+ }
+ else
+ {
+ if (s >= (0xc000U << BITSH))
+ link_error ();
+ }
+}
+
+void
+f14 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xa030U << BITSH))
+ {
+ if (s <= ((0xa031U << BITSH) - 1))
+ link_error ();
+ }
+ else
+ {
+ if (s >= (0xbfbfU << BITSH))
+ link_error ();
+ }
+}
+
+void
+f15 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) > ((-0x4fd0) << BITSH))
+ {
+ if (s <= ((-0x4000 << BITSH) - 1))
+ link_error ();
+ }
+ else
+ {
+ if (s > ((-0x4000 << BITSH) - 1))
+ link_error ();
+ }
+}
+
+void
+f16 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) >= ((-0x4fd0) << BITSH))
+ {
+ if (s <= ((-0x4000 << BITSH) - 1))
+ link_error ();
+ }
+ else
+ {
+ if (s > ((-0x4000 << BITSH) - 1))
+ link_error ();
+ }
+}
+
+void
+f17 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != -__INT_MAX__ - 1)
+ {
+ if (s == -__INT_MAX__ - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s >= (-0x4000 << BITSH) - 1)
+ link_error ();
+ }
+}
+
+void
+f18 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((-0x4000 << BITSH) | 1))
+ {
+ if (s == -1)
+ link_error ();
+ }
+ else
+ {
+ if (s < ((-0x4000 << BITSH) | 1) || s >= 0)
+ link_error ();
+ }
+}
+
+void
+f19 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((0x4000 << BITSH) | 1))
+ {
+ if (s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s <= (0x4000 << BITSH))
+ link_error ();
+ }
+}
+
+void
+f20 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != -__INT_MAX__ - 1)
+ {
+ if (s < (-0x7000 << BITSH))
+ link_error ();
+ }
+ else
+ {
+ if (s >= (-0x7000 << BITSH))
+ link_error ();
+ }
+}
+
+void
+f21 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (-0x1000 << BITSH))
+ {
+ if (s >= (-0x1000 << BITSH) && s < 0)
+ link_error ();
+ }
+ else
+ {
+ if (s < (-0x1000 << BITSH) || s >= 0)
+ link_error ();
+ }
+}
+
+void
+f22 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (0x7000 << BITSH))
+ {
+ if (s >= (0x7000 << BITSH))
+ link_error ();
+ }
+ else
+ {
+ if (s < (0x7000 << BITSH))
+ link_error ();
+ }
+}
+
+void
+f23 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x7000 << BITSH))
+ {
+ if (/* s >= (0x7000 << BITSH) && s < (0x8000U << BITSH) */
+ s == (0x7000 << BITSH) || s == __INT_MAX__)
+ link_error ();
+ }
+ else
+ {
+ if (s < (0x7000 << BITSH) || s >= (0x8000U << BITSH))
+ link_error ();
+ }
+}
+
+void
+f24 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x8000U << BITSH))
+ {
+ if (/* s >= (0x8000U << BITSH) && s < (0x9000U << BITSH) */
+ s == (0x8000U << BITSH) || s == (0x9000U << BITSH) - 1)
+ link_error ();
+ }
+ else
+ {
+ if (s >= (0x9000U << BITSH) || s < (0x8000U << BITSH))
+ link_error ();
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp66-int16-sw.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp66-int16-sw.c
new file mode 100644
index 0000000000..b194d2370e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp66-int16-sw.c
@@ -0,0 +1,914 @@
+/* PR tree-optimization/52267 */
+/* { dg-do run { target { int16 } } } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+#define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1)
+#define BITSH ((sizeof (int) - sizeof (short)) * __CHAR_BIT__)
+
+void
+f1 (unsigned int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) != 0)
+ {
+ if (s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == -1U || s == -15U
+ || s == 0x3cbf || s == 0x3cc0
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == 1U + __INT_MAX__ || s == -32U
+ || s == (3 << (BITSM1 - 2)) + 2 || s == -5U || s == -63U
+ || s == -64U || s == -65U || s == 6U + __INT_MAX__ || s == -8189U
+ || s == -8191U || s == -8192U || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3f || s == 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == 5)
+ return;
+ }
+ abort ();
+}
+
+void
+f2 (int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) == 0)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3f || s == 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == 5)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == -1 || s == -15 || s == -15550
+ || s == 0x3cbf || s == 0x3cc0
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f3 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f
+ || s == (0xc000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == 1U + __INT_MAX__ || s == 2 || s == 24
+ || s == 5 || s == 6U + __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (0xbfbfU << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH)
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (3 << (BITSM1 - 2)) + 2
+ || s == 0x3cbf || s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == (0xf000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == -1U || s == -15U
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32U || s == -5U
+ || s == -63U || s == -64U || s == -65U || s == -8189U || s == -8191U
+ || s == -8192U || s == -8193U || s == -8250U || s == -8255U
+ || s == -8256U || s == -8257U || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f4 (int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f
+ || s == (-0x4000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == 5 || s == -__INT_MAX__ + 4
+ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (-0x4041 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH)
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (3 << (BITSM1 - 2)) + 2
+ || s == 0x3cbf || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f5 (int s)
+{
+ if ((s & 0x3cc0U) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f
+ || s == (-0x4000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == 5 || s == -__INT_MAX__ + 4
+ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (-0x4041 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH)
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (3 << (BITSM1 - 2)) + 2
+ || s == 0x3cbf || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f6 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == -1U || s == -15U
+ || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32U || s == -5U || s == -63U || s == -64U
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (0xf000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1
+ || s == (0x7000 << BITSH) - 1
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (0xbfbfU << BITSH)
+ || s == (0xc000U << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH) || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65U
+ || s == 6U + __INT_MAX__ || s == -8189U || s == -8191U
+ || s == -8192U || s == -8193U || s == -8250U || s == -8255U
+ || s == -8256U || s == -8257U || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f7 (int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == -1 || s == -15
+ || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1
+ || s == (0x7000 << BITSH) - 1
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == -__INT_MAX__ - 1 || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f8 (int s)
+{
+ if ((s & 0x3cc0U) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == -1 || s == -15
+ || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1
+ || s == (0x7000 << BITSH) - 1
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == -__INT_MAX__ - 1 || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f9 (unsigned int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s == 0x1cc0 || s == 0x1fff || s == 0x2000 || s == 0x3cbf
+ || s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == (0xf000U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (3 << (BITSM1 - 2)) + 2
+ || s == (0xa031U << BITSH) - 1 || s == -1U || s == -15U
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x20 || s == 0x3f
+ || s == (0x9000U << BITSH) - 1 || s == (0xc000U << BITSH)
+ || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -15550U
+ || s == -15552U
+ || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == 5
+ || s == 6U + __INT_MAX__ || s == -8257U || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f10 (unsigned int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s == 0x2000 || s == 0x3cbf || s == 0x3cc0
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xa031U << BITSH) - 1
+ || s == (0xf000U << BITSH)
+ || s == -1U || s == -15U || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -32U || s == (3 << (BITSM1 - 2)) + 2 || s == -5U
+ || s == -63U || s == -64U || s == -65U || s == -8189U || s == -8191U
+ || s == -8192U || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x20
+ || s == 0x3f || s == (0x9000U << BITSH) - 1
+ || s == (0xc000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -15550U
+ || s == -15552U || s == (1 << (BITSM1 - 2)) - 1
+ || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == 5
+ || s == 6U + __INT_MAX__ || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f11 (int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s == 0x1cc0 || s == 0x1fff || s == 0x2000 || s == 0x3cbf
+ || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1
+ || s == (-0x4041 << BITSH)
+ || s == (-0x1000 << BITSH)
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (3 << (BITSM1 - 2)) + 2
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x20 || s == 0x3f
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x4000 << BITSH)
+ || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -15550
+ || s == -15552
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == 5 || s == -__INT_MAX__ + 4
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f12 (int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s == 0x2000 || s == 0x3cbf || s == 0x3cc0
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH)
+ || s == (-0x1000 << BITSH)
+ || s == -1 || s == -15 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (3 << (BITSM1 - 2)) + 2
+ || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x20
+ || s == 0x3f || s == (-0x7000 << BITSH) - 1
+ || s == (-0x4000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -15550
+ || s == -15552 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == 5 || s == -__INT_MAX__ + 4
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f13 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xb030U << BITSH))
+ {
+ if (s == (0xf000U << BITSH) - 1 || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0xc000U << BITSH) + 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == (0xbfbfU << BITSH)
+ || s == (0x9000U << BITSH) || s == 1 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f14 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xa030U << BITSH))
+ {
+ if (s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0xc000U << BITSH) + 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0x9000U << BITSH) || s == 1 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f15 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) > ((-0x4fd0) << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x7000 << BITSH) || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f16 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) >= ((-0x4fd0) << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x7000 << BITSH) || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f17 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != -__INT_MAX__ - 1)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x5fcf << BITSH) - 1 || s == (-0x7000 << BITSH)
+ || s == -__INT_MAX__ - 1 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f18 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((-0x4000 << BITSH) | 1))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == 1 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -64
+ || s == -__INT_MAX__ + 4 || s == -8192 || s == -8250 || s == -8256
+ || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH) + 1
+ || s == -1 || s == -15 || s == -5 || s == -63 || s == -65
+ || s == -8189 || s == -8191 || s == -8193 || s == -8255
+ || s == -8257)
+ return;
+ }
+ abort ();
+}
+
+void
+f19 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((0x4000 << BITSH) | 1))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) - 1 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f20 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != -__INT_MAX__ - 1)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x7000 << BITSH) - 1 || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f21 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (-0x1000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (-0x1000 << BITSH) || s == -1 || s == -15
+ || s == -32 || s == -5 || s == -63 || s == -64
+ || s == -65)
+ return;
+ }
+ abort ();
+}
+
+void
+f22 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (0x7000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f23 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x7000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -1U || s == -15U
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 1U + __INT_MAX__ || s == 2 || s == 24 || s == -32U
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5U || s == -63U
+ || s == -64U || s == -65U || s == 6U + __INT_MAX__ || s == -8189U
+ || s == -8191U || s == -8192U || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f24 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x8000U << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == (0xbfbfU << BITSH)
+ || s == (0xc000U << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH) || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32U || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (0x9000U << BITSH) - 1 || s == 1U + __INT_MAX__
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+/* Make this easier to run on microcontroller architectures by using a switch
+ statements instead of arrays.
+ We still don't want the compiler to constant-propagate the array contents,
+ so use an asm in each accessor function with to hide what's going on. */
+
+int
+svals (int i)
+{
+ asm ("" : "=g" (i) : "0" (i));
+ switch (i)
+ {
+ case 0: return 0;
+ case 1: return 0x1cbf;
+ case 2: return 0x1cc0;
+ case 3: return 0x1fff;
+ case 4: return 0x2000;
+ case 5: return 0x20;
+ case 6: return 0x3cbf;
+ case 7: return 0x3cc0;
+ case 8: return 0x3f;
+ case 9: return (-0x4000 << BITSH) - 1;
+ case 10: return (-0x1000 << BITSH) - 1;
+ case 11: return (-0x7000 << BITSH) - 1;
+ case 12: return (-0x5fcf << BITSH) - 1;
+ case 13: return (-0x4041 << BITSH);
+ case 14: return (-0x4000 << BITSH);
+ case 15: return (-0x1000 << BITSH);
+ case 16: return (-0x7000 << BITSH);
+ case 17: return (-0x4000 << BITSH) + 1;
+ case 18: return 1;
+ case 19: return -1;
+ case 20: return -15;
+ case 21: return -15550;
+ case 22: return -15552;
+ case 23: return (0x7000 << BITSH) - 1;
+ case 24: return (0x7000 << BITSH);
+ case 25: return (1 << (BITSM1 - 2));
+ case 26: return (1 << (BITSM1 - 2)) - 1;
+ case 27: return -__INT_MAX__ - 1;
+ case 28: return 2;
+ case 29: return 24;
+ case 30: return -32;
+ case 31: return (3 << (BITSM1 - 2)) + 2;
+ case 32: return 5;
+ case 33: return -5;
+ case 34: return -63;
+ case 35: return -64;
+ case 36: return -65;
+ case 37: return -__INT_MAX__ + 4;
+ case 38: return -8189;
+ case 39: return -8191;
+ case 40: return -8192;
+ case 41: return -8193;
+ case 42: return -8250;
+ case 43: return -8255;
+ case 44: return -8256;
+ case 45: return -8257;
+ case 46: return __INT_MAX__;
+ case 47: return -__INT_MAX__ + 7;
+#define SVAL_NUM 48
+ default: abort ();
+ }
+};
+
+unsigned int
+uvals (int i)
+{
+ asm ("" : "=g" (i) : "0" (i));
+ switch (i)
+ {
+ case 0: return 0;
+ case 1: return 0x1cbf;
+ case 2: return 0x1cc0;
+ case 3: return 0x1fff;
+ case 4: return 0x2000;
+ case 5: return 0x20;
+ case 6: return 0x3cbf;
+ case 7: return 0x3cc0;
+ case 8: return 0x3f;
+ case 9: return (0xc000U << BITSH) - 1;
+ case 10: return (0xf000U << BITSH) - 1;
+ case 11: return (0x9000U << BITSH) - 1;
+ case 12: return (0xa031U << BITSH) - 1;
+ case 13: return (0xbfbfU << BITSH);
+ case 14: return (0xc000U << BITSH);
+ case 15: return (0xf000U << BITSH);
+ case 16: return (0x9000U << BITSH);
+ case 17: return (0xc000U << BITSH) + 1;
+ case 18: return 1;
+ case 19: return -1U;
+ case 20: return -15U;
+ case 21: return -15550U;
+ case 22: return -15552U;
+ case 23: return (0x7000 << BITSH) - 1;
+ case 24: return (0x7000 << BITSH);
+ case 25: return (1 << (BITSM1 - 2));
+ case 26: return (1 << (BITSM1 - 2)) - 1;
+ case 27: return 1U + __INT_MAX__;
+ case 28: return 2;
+ case 29: return 24;
+ case 30: return -32U;
+ case 31: return (3 << (BITSM1 - 2)) + 2;
+ case 32: return 5;
+ case 33: return -5U;
+ case 34: return -63U;
+ case 35: return -64U;
+ case 36: return -65U;
+ case 37: return 6U + __INT_MAX__;
+ case 38: return -8189U;
+ case 39: return -8191U;
+ case 40: return -8192U;
+ case 41: return -8193U;
+ case 42: return -8250U;
+ case 43: return -8255U;
+ case 44: return -8256U;
+ case 45: return -8257U;
+ case 46: return __INT_MAX__;
+ case 47: return __INT_MAX__ + 9U;
+#define UVAL_NUM 48
+ default: abort ();
+ }
+};
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < SVAL_NUM; i++)
+ {
+ f2 (svals (i));
+ f4 (svals (i));
+ f5 (svals (i));
+ f7 (svals (i));
+ f8 (svals (i));
+ f11 (svals (i));
+ f12 (svals (i));
+ f15 (svals (i));
+ f16 (svals (i));
+ f17 (svals (i));
+ f18 (svals (i));
+ f19 (svals (i));
+ f20 (svals (i));
+ f21 (svals (i));
+ f22 (svals (i));
+ }
+ for (i = 0; i < UVAL_NUM; i++)
+ {
+ f1 (uvals (i));
+ f3 (uvals (i));
+ f6 (uvals (i));
+ f9 (uvals (i));
+ f10 (uvals (i));
+ f13 (uvals (i));
+ f14 (uvals (i));
+ f23 (uvals (i));
+ f24 (uvals (i));
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp66.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp66.c
new file mode 100644
index 0000000000..6a6ab3463f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp66.c
@@ -0,0 +1,861 @@
+/* PR tree-optimization/52267 */
+/* { dg-do run { target { ! int16 } } } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+#define BITSM1 (sizeof (int) * __CHAR_BIT__ - 1)
+#define BITSH ((sizeof (int) - sizeof (short)) * __CHAR_BIT__)
+
+void
+f1 (unsigned int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) != 0)
+ {
+ if (s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == -1U || s == -15U
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == 1U + __INT_MAX__ || s == -32U
+ || s == (3 << (BITSM1 - 2)) + 2 || s == -5U || s == -63U
+ || s == -64U || s == -65U || s == 6U + __INT_MAX__ || s == -8189U
+ || s == -8191U || s == -8192U || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f || s == 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == 5)
+ return;
+ }
+ abort ();
+}
+
+void
+f2 (int s)
+{
+ if ((s & (7U << (BITSM1 - 2))) == 0)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f || s == 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == 5)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f3 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f || s == (0xbfbfU << BITSH)
+ || s == (0xc000U << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH) || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == 1U + __INT_MAX__ || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == 6U + __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x3cbf || s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == (0xf000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == -1U || s == -15U
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32U || s == -5U
+ || s == -63U || s == -64U || s == -65U || s == -8189U || s == -8191U
+ || s == -8192U || s == -8193U || s == -8250U || s == -8255U
+ || s == -8256U || s == -8257U || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f4 (int s)
+{
+ if ((s & 0x3cc0) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x3cbf || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f5 (int s)
+{
+ if ((s & 0x3cc0U) == 0)
+ {
+ if (s == 0 || s == 0x20 || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x3cbf || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f6 (unsigned int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == (0xf000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == -1U || s == -15U
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32U || s == -5U || s == -63U || s == -64U
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (0xbfbfU << BITSH)
+ || s == (0xc000U << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH) || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65U
+ || s == 6U + __INT_MAX__ || s == -8189U || s == -8191U
+ || s == -8192U || s == -8193U || s == -8250U || s == -8255U
+ || s == -8256U || s == -8257U || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f7 (int s)
+{
+ if ((s & 0x3cc0) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == -__INT_MAX__ - 1 || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f8 (int s)
+{
+ if ((s & 0x3cc0U) == 0x3cc0)
+ {
+ if (s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3f || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == -__INT_MAX__ - 1 || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -65
+ || s == -__INT_MAX__ + 4 || s == -8189 || s == -8191 || s == -8192
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f9 (unsigned int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s == 0x1cc0 || s == 0x1fff || s == 0x2000 || s == 0x3cbf
+ || s == 0x3cc0 || s == (0xc000U << BITSH) - 1
+ || s == (0xf000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == -1U || s == -15U
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x20 || s == 0x3f
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -15550U
+ || s == -15552U || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == -8257U || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f10 (unsigned int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s == 0x2000 || s == 0x3cbf || s == 0x3cc0
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == -1U || s == -15U || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32U || s == -5U
+ || s == -63U || s == -64U || s == -65U || s == -8189U || s == -8191U
+ || s == -8192U || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x20
+ || s == 0x3f || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -15550U
+ || s == -15552U || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f11 (int s)
+{
+ if ((s & 0x3cc0) >= 0x1cc0)
+ {
+ if (s == 0x1cc0 || s == 0x1fff || s == 0x2000 || s == 0x3cbf
+ || s == 0x3cc0 || s == (-0x4000 << BITSH) - 1
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == -1 || s == -15
+ || s == (0x7000 << BITSH) - 1 || s == (1 << (BITSM1 - 2)) - 1
+ || s == -32 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x20 || s == 0x3f
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f12 (int s)
+{
+ if ((s & 0x3cc0) > 0x1cc0)
+ {
+ if (s == 0x2000 || s == 0x3cbf || s == 0x3cc0
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == -1 || s == -15 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) - 1 || s == -32 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -8189 || s == -8191 || s == -8192
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x20
+ || s == 0x3f || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -15550
+ || s == -15552 || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == -8193 || s == -8250 || s == -8255 || s == -8256
+ || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f13 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xb030U << BITSH))
+ {
+ if (s == (0xf000U << BITSH) - 1 || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0xc000U << BITSH) + 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0x9000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == (0xbfbfU << BITSH)
+ || s == (0x9000U << BITSH) || s == 1 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f14 (unsigned int s)
+{
+ if ((s & (0xe071U << BITSH)) > (0xa030U << BITSH))
+ {
+ if (s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0xc000U << BITSH) + 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == -32U || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U)
+ return;
+ }
+ else
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0x9000U << BITSH) || s == 1 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 1U + __INT_MAX__ || s == 2
+ || s == 24 || s == (3 << (BITSM1 - 2)) + 2 || s == 5
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+void
+f15 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) > ((-0x4fd0) << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x7000 << BITSH) || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f16 (int s)
+{
+ if ((s & ((-0x1f8f) << BITSH)) >= ((-0x4fd0) << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x7000 << BITSH) || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f17 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != -__INT_MAX__ - 1)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (0x7000 << BITSH) || s == (1 << (BITSM1 - 2))
+ || s == (1 << (BITSM1 - 2)) - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x4041 << BITSH) || s == (-0x7000 << BITSH)
+ || s == -__INT_MAX__ - 1 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f18 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((-0x4000 << BITSH) | 1))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x7000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == 1 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -64
+ || s == -__INT_MAX__ + 4 || s == -8192 || s == -8250 || s == -8256
+ || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (-0x1000 << BITSH) - 1 || s == (-0x4000 << BITSH) + 1
+ || s == -1 || s == -15 || s == -5 || s == -63 || s == -65
+ || s == -8189 || s == -8191 || s == -8193 || s == -8255
+ || s == -8257)
+ return;
+ }
+ abort ();
+}
+
+void
+f19 (int s)
+{
+ if ((s & ((-0x4000 << BITSH) | 1)) != ((0x4000 << BITSH) | 1))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) - 1 || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f20 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != -__INT_MAX__ - 1)
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x5fcf << BITSH) - 1 || s == (-0x4041 << BITSH)
+ || s == (-0x4000 << BITSH) || s == (-0x1000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == -1 || s == -15 || s == -15550 || s == -15552
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32 || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5 || s == -63 || s == -64 || s == -65
+ || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (-0x7000 << BITSH) - 1 || s == -__INT_MAX__ - 1
+ || s == -__INT_MAX__ + 4 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ abort ();
+}
+
+void
+f21 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (-0x1000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x7000 << BITSH) || s == (-0x4000 << BITSH) + 1 || s == 1
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -__INT_MAX__ + 4
+ || s == __INT_MAX__ || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (-0x1000 << BITSH) || s == -1 || s == -15 || s == -15550
+ || s == -15552 || s == -32 || s == -5 || s == -63 || s == -64
+ || s == -65 || s == -8189 || s == -8191 || s == -8192 || s == -8193
+ || s == -8250 || s == -8255 || s == -8256 || s == -8257)
+ return;
+ }
+ abort ();
+}
+
+void
+f22 (int s)
+{
+ if ((s & (-0x1000 << BITSH)) != (0x7000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (-0x4000 << BITSH) - 1 || s == (-0x1000 << BITSH) - 1
+ || s == (-0x7000 << BITSH) - 1 || s == (-0x5fcf << BITSH) - 1
+ || s == (-0x4041 << BITSH) || s == (-0x4000 << BITSH)
+ || s == (-0x1000 << BITSH) || s == (-0x7000 << BITSH)
+ || s == (-0x4000 << BITSH) + 1 || s == 1 || s == -1 || s == -15
+ || s == -15550 || s == -15552 || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == -__INT_MAX__ - 1 || s == 2 || s == 24 || s == -32
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5 || s == -63
+ || s == -64 || s == -65 || s == -__INT_MAX__ + 4 || s == -8189
+ || s == -8191 || s == -8192 || s == -8193 || s == -8250
+ || s == -8255 || s == -8256 || s == -8257 || s == -__INT_MAX__ + 7)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f23 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x7000 << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0x9000U << BITSH) - 1 || s == (0xa031U << BITSH) - 1
+ || s == (0xbfbfU << BITSH) || s == (0xc000U << BITSH)
+ || s == (0xf000U << BITSH) || s == (0x9000U << BITSH)
+ || s == (0xc000U << BITSH) + 1 || s == 1 || s == -1U || s == -15U
+ || s == -15550U || s == -15552U || s == (0x7000 << BITSH) - 1
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 1U + __INT_MAX__ || s == 2 || s == 24 || s == -32U
+ || s == (3 << (BITSM1 - 2)) + 2 || s == 5 || s == -5U || s == -63U
+ || s == -64U || s == -65U || s == 6U + __INT_MAX__ || s == -8189U
+ || s == -8191U || s == -8192U || s == -8193U || s == -8250U
+ || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ else
+ {
+ if (s == (0x7000 << BITSH) || s == __INT_MAX__)
+ return;
+ }
+ abort ();
+}
+
+void
+f24 (unsigned int s)
+{
+ if ((s & (0xf000U << BITSH)) != (0x8000U << BITSH))
+ {
+ if (s == 0 || s == 0x1cbf || s == 0x1cc0 || s == 0x1fff || s == 0x2000
+ || s == 0x20 || s == 0x3cbf || s == 0x3cc0 || s == 0x3f
+ || s == (0xc000U << BITSH) - 1 || s == (0xf000U << BITSH) - 1
+ || s == (0xa031U << BITSH) - 1 || s == (0xbfbfU << BITSH)
+ || s == (0xc000U << BITSH) || s == (0xf000U << BITSH)
+ || s == (0x9000U << BITSH) || s == (0xc000U << BITSH) + 1 || s == 1
+ || s == -1U || s == -15U || s == -15550U || s == -15552U
+ || s == (0x7000 << BITSH) - 1 || s == (0x7000 << BITSH)
+ || s == (1 << (BITSM1 - 2)) || s == (1 << (BITSM1 - 2)) - 1
+ || s == 2 || s == 24 || s == -32U || s == (3 << (BITSM1 - 2)) + 2
+ || s == 5 || s == -5U || s == -63U || s == -64U || s == -65U
+ || s == -8189U || s == -8191U || s == -8192U || s == -8193U
+ || s == -8250U || s == -8255U || s == -8256U || s == -8257U
+ || s == __INT_MAX__)
+ return;
+ }
+ else
+ {
+ if (s == (0x9000U << BITSH) - 1 || s == 1U + __INT_MAX__
+ || s == 6U + __INT_MAX__ || s == __INT_MAX__ + 9U)
+ return;
+ }
+ abort ();
+}
+
+int svals[] = {
+ 0,
+ 0x1cbf,
+ 0x1cc0,
+ 0x1fff,
+ 0x2000,
+ 0x20,
+ 0x3cbf,
+ 0x3cc0,
+ 0x3f,
+ (-0x4000 << BITSH) - 1,
+ (-0x1000 << BITSH) - 1,
+ (-0x7000 << BITSH) - 1,
+ (-0x5fcf << BITSH) - 1,
+ (-0x4041 << BITSH),
+ (-0x4000 << BITSH),
+ (-0x1000 << BITSH),
+ (-0x7000 << BITSH),
+ (-0x4000 << BITSH) + 1,
+ 1,
+ -1,
+ -15,
+ -15550,
+ -15552,
+ (0x7000 << BITSH) - 1,
+ (0x7000 << BITSH),
+ (1 << (BITSM1 - 2)),
+ (1 << (BITSM1 - 2)) - 1,
+ -__INT_MAX__ - 1,
+ 2,
+ 24,
+ -32,
+ (3 << (BITSM1 - 2)) + 2,
+ 5,
+ -5,
+ -63,
+ -64,
+ -65,
+ -__INT_MAX__ + 4,
+ -8189,
+ -8191,
+ -8192,
+ -8193,
+ -8250,
+ -8255,
+ -8256,
+ -8257,
+ __INT_MAX__,
+ -__INT_MAX__ + 7,
+};
+
+unsigned int uvals[] = {
+ 0,
+ 0x1cbf,
+ 0x1cc0,
+ 0x1fff,
+ 0x2000,
+ 0x20,
+ 0x3cbf,
+ 0x3cc0,
+ 0x3f,
+ (0xc000U << BITSH) - 1,
+ (0xf000U << BITSH) - 1,
+ (0x9000U << BITSH) - 1,
+ (0xa031U << BITSH) - 1,
+ (0xbfbfU << BITSH),
+ (0xc000U << BITSH),
+ (0xf000U << BITSH),
+ (0x9000U << BITSH),
+ (0xc000U << BITSH) + 1,
+ 1,
+ -1U,
+ -15U,
+ -15550U,
+ -15552U,
+ (0x7000 << BITSH) - 1,
+ (0x7000 << BITSH),
+ (1 << (BITSM1 - 2)),
+ (1 << (BITSM1 - 2)) - 1,
+ 1U + __INT_MAX__,
+ 2,
+ 24,
+ -32U,
+ (3 << (BITSM1 - 2)) + 2,
+ 5,
+ -5U,
+ -63U,
+ -64U,
+ -65U,
+ 6U + __INT_MAX__,
+ -8189U,
+ -8191U,
+ -8192U,
+ -8193U,
+ -8250U,
+ -8255U,
+ -8256U,
+ -8257U,
+ __INT_MAX__,
+ __INT_MAX__ + 9U,
+};
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < sizeof (svals) / sizeof (svals[0]); i++)
+ {
+ f2 (svals[i]);
+ f4 (svals[i]);
+ f5 (svals[i]);
+ f7 (svals[i]);
+ f8 (svals[i]);
+ f11 (svals[i]);
+ f12 (svals[i]);
+ f15 (svals[i]);
+ f16 (svals[i]);
+ f17 (svals[i]);
+ f18 (svals[i]);
+ f19 (svals[i]);
+ f20 (svals[i]);
+ f21 (svals[i]);
+ f22 (svals[i]);
+ }
+ for (i = 0; i < sizeof (uvals) / sizeof (uvals[0]); i++)
+ {
+ f1 (uvals[i]);
+ f3 (uvals[i]);
+ f6 (uvals[i]);
+ f9 (uvals[i]);
+ f10 (uvals[i]);
+ f13 (uvals[i]);
+ f14 (uvals[i]);
+ f23 (uvals[i]);
+ f24 (uvals[i]);
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
new file mode 100644
index 0000000000..f02d83780a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp67.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+unsigned foo (unsigned i)
+{
+ if (i == 2)
+ {
+ i = i << 2;
+ if (i != 8)
+ link_error ();
+ }
+ return i;
+}
+unsigned bar (unsigned i)
+{
+ if (i == 1 << (sizeof (unsigned) * 8 - 1))
+ {
+ i = i << 1;
+ if (i != 0)
+ link_error ();
+ }
+ return i;
+}
+unsigned baz (unsigned i)
+{
+ i = i & 15;
+ if (i == 0)
+ return 0;
+ i = 1000 - i;
+ i >>= 1;
+ i <<= 1;
+ if (i == 0)
+ link_error ();
+ return i;
+}
+
+/* { dg-final { scan-tree-dump-times "Folding predicate" 3 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp68.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp68.c
new file mode 100644
index 0000000000..4f977f4010
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp68.c
@@ -0,0 +1,18 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+#include "vrp.h"
+
+void test1 (int i, int j, int b)
+{
+ RANGE(i, 2, 6);
+ ANTI_RANGE(j, 1, 7);
+ MERGE(b, i, j);
+ CHECK_ANTI_RANGE(i, 1, 1);
+}
+int main() { }
+
+/* VRP will arbitrarily choose ~[1, 1] when merging [2, 6] with ~[1, 7]. */
+
+/* { dg-final { scan-tree-dump-times "link_error" 0 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp69.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp69.c
new file mode 100644
index 0000000000..d7540c9e2f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp69.c
@@ -0,0 +1,38 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+#include "vrp.h"
+
+void test1(int i, int j)
+{
+ RANGE(i, 1, 5);
+ RANGE(j, 7, 10);
+ CHECK_RANGE(i + j, 8, 15);
+}
+
+#define UINT_MAX 2*(unsigned)__INT_MAX__ + 1
+void test2(unsigned int i)
+{
+ RANGE(i, UINT_MAX - 0x4, UINT_MAX - 0x1);
+ CHECK_ANTI_RANGE(i + 0x2, 0x1, UINT_MAX - 0x3);
+}
+void test3(unsigned int i)
+{
+ RANGE(i, UINT_MAX - 0x4, UINT_MAX - 0x1);
+ CHECK_RANGE(i + 0x5, 0x0, 0x3);
+}
+void test4(unsigned int i)
+{
+ RANGE(i, 2, 4);
+ CHECK_ANTI_RANGE(i - 4, 1, UINT_MAX - 2);
+}
+void test5(unsigned int i)
+{
+ RANGE(i, 2, 4);
+ CHECK_RANGE(i - 8, UINT_MAX - 5, UINT_MAX - 3);
+}
+
+int main() {}
+
+/* { dg-final { scan-tree-dump-times "link_error" 0 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp70.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp70.c
new file mode 100644
index 0000000000..e9a7563dcd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp70.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target int32plus } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+extern void link_error (void);
+
+void
+foo (unsigned int s)
+{
+ if (s + 0x70000000 < 0xf0000000U)
+ {
+ if (s >= 0x80000000U && s < 0x90000000U)
+ link_error ();
+ }
+}
+
+void
+bar (unsigned int s)
+{
+ if (s + 0x70000000 >= 0xf0000000U)
+ {
+ if (s < 0x80000000U || s >= 0x90000000U)
+ link_error ();
+ }
+}
+
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
new file mode 100644
index 0000000000..2d1a240299
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp71.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+int foo(int *p)
+{
+ int x = -10;
+ if (p[0]) x++;
+ if (p[1]) x++;
+ if (p[2]) x++;
+ if (p[3]) x++;
+ x <<= 2;
+ return (x > 0);
+}
+
+int bar(char c)
+{
+ int i = c << 1;
+ return i > 1000;
+}
+
+/* { dg-final { scan-tree-dump-times "return 0;" 2 "vrp1" } } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c
new file mode 100644
index 0000000000..0b12aad0e2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp72.c
@@ -0,0 +1,31 @@
+/* { dg-options "-O2" } */
+
+typedef __INTPTR_TYPE__ intptr_t;
+typedef unsigned long long uint64_t;
+
+static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val)
+{
+ *(volatile uint64_t *)(intptr_t)addr = val;
+};
+static inline uint64_t cvmx_read64_uint64(uint64_t addr)
+{
+ return *(volatile uint64_t *)(intptr_t)addr;
+};
+
+static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
+{
+ cvmx_write64_uint64 (csr_addr, val);
+ if ((csr_addr >> 40) != 0x800118)
+ linker_error ();
+}
+
+int uart;
+
+int
+main ()
+{
+ cvmx_write_csr (((((uint64_t) 2LL) << 62)
+ | (0x0001180000000808ull+((uart&0xff)*1024))),
+ 0xfff);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c
new file mode 100644
index 0000000000..ea557fd9b6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp73.c
@@ -0,0 +1,32 @@
+/* { dg-options "-O2" } */
+
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
+
+typedef unsigned long long uint64_t;
+
+static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val)
+{
+ *(volatile uint64_t *)(intptr_t)addr = val;
+};
+static inline uint64_t cvmx_read64_uint64(uint64_t addr)
+{
+ return *(volatile uint64_t *)(intptr_t)addr;
+};
+
+static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
+{
+ cvmx_write64_uint64 (csr_addr, val);
+ if ((csr_addr >> 40) == 0x800118)
+ linker_error ();
+}
+
+int dest_core, src_core;
+
+int
+main ()
+{
+ cvmx_write_csr ((((((uint64_t)2LL) << 62)
+ | ((0x0001070000000600ull+((dest_core&0xff)*8))))),
+ 1ull << src_core);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c
new file mode 100644
index 0000000000..b15186fea0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp74.c
@@ -0,0 +1,23 @@
+/* { dg-options "-O2" } */
+
+void abort (void);
+void exit (int);
+
+__attribute__ ((noinline)) void
+f (unsigned long long i)
+{
+ if (i <= 0x1000000000000000ull)
+ {
+ unsigned long long j = i | 0x1000000000000000ull;
+ if (j == 0x1100000000000000ull)
+ exit (0);
+ }
+}
+
+int
+main ()
+{
+ f (0x0100000000000000ull);
+ abort ();
+}
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c
new file mode 100644
index 0000000000..42b3387077
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp75.c
@@ -0,0 +1,32 @@
+/* { dg-options "-O2" } */
+
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
+typedef unsigned long long uint64_t;
+
+static inline void cvmx_write64_uint64(uint64_t addr, uint64_t val)
+{
+ *(volatile uint64_t *)(intptr_t)addr = val;
+};
+static inline uint64_t cvmx_read64_uint64(uint64_t addr)
+{
+ return *(volatile uint64_t *)(intptr_t)addr;
+};
+static inline void cvmx_write_csr(uint64_t csr_addr, uint64_t val)
+{
+ cvmx_write64_uint64 (csr_addr, val);
+ if ((csr_addr >> 40) != 0x800118)
+ linker_error ();
+}
+
+int interface;
+int idx;
+
+int
+main ()
+{
+ cvmx_write_csr((((((uint64_t) 2LL) << 62)
+ | ((0x0001180008000208ull
+ + (((idx)&3)*2048)
+ + (((interface)&1)*0x8000000ull))))), 1);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp76.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp76.c
new file mode 100644
index 0000000000..c8b8595c6b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp76.c
@@ -0,0 +1,35 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fno-tree-switch-conversion" } */
+
+/* Based on f3 from vrp63.c, but with switch instead of if-chain. This test
+ tests the propagation of an anti-range in a switch statement. */
+
+extern void link_error (void);
+
+void
+f3 (int s)
+{
+ if (s >> 3 == -2)
+ /* s in range [ -16, -9]. */
+ ;
+ else
+ {
+ /* s in range ~[-16, -9], so none of the case labels can be taken. */
+ switch (s)
+ {
+ case -16:
+ case -12:
+ case -9:
+ link_error ();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp77.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp77.c
new file mode 100644
index 0000000000..c0a8a86538
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp77.c
@@ -0,0 +1,47 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#ifdef __SIZEOF_INT128__
+#define T __int128
+#else
+#define T long long
+#endif
+
+extern void impossible (void);
+
+void f(T x)
+{
+ unsigned T y;
+ unsigned T z;
+ if (x < -7)
+ return;
+ if (x > 2)
+ return;
+ y = x;
+ z = y * y;
+ if (z == 666)
+ impossible ();
+}
+
+void g(unsigned T x)
+{
+ unsigned T y;
+ unsigned T z;
+ unsigned T m = -1;
+ m = m / 2;
+ if (x < m-2)
+ return;
+ if (x > m-1)
+ return;
+ y = x;
+ z = y * y;
+ /* The product (ignoring it is a square) has only 3 possible values:
+ 4, 9 and 2^127+6. At least one of the values 7, 666 and -666 is
+ known to be impossible. 7 is the most logical in the current
+ implementation. */
+ if (z == 7)
+ impossible ();
+}
+
+/* { dg-final { scan-tree-dump-not "impossible" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c
new file mode 100644
index 0000000000..e08d1ffdfa
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp78.c
@@ -0,0 +1,34 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+/* Based on f3 from vrp63.c, but with switch instead of if-chain. */
+
+extern void link_error (void);
+
+void
+f3 (int s)
+{
+ if (s >> 3 == -2)
+ /* s in range [ -16, -9]. */
+ ;
+ else
+ {
+ /* s in range ~[-16, -9], so none of the case labels can be taken. */
+ switch (s)
+ {
+ case -16:
+ case -12:
+ case -9:
+ link_error ();
+ break;
+ default:
+ break;
+ }
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp79.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp79.c
new file mode 100644
index 0000000000..88c1bd8582
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp79.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-optimized" } */
+
+#ifdef __SIZEOF_INT128__
+typedef unsigned __int128 NT;
+#else
+typedef unsigned long long NT;
+#endif
+
+extern void do_not_go_away ();
+
+void f (NT x, NT y)
+{
+ NT n = 1;
+ n <<= (__CHAR_BIT__ * sizeof (NT) - 1);
+ if (x > n) return;
+ if (y > n) return;
+ NT z = x + y;
+ if (z == 42) do_not_go_away ();
+}
+
+/* { dg-final { scan-tree-dump "do_not_go_away" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp80.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp80.c
new file mode 100644
index 0000000000..2d0004010c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp80.c
@@ -0,0 +1,33 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fno-tree-switch-conversion" } */
+
+extern void link_error (void);
+
+/* Test <<. */
+
+void
+f3 (int s, int b)
+{
+ if (s >> 3 == -2)
+ /* s in range [-16, -9]. */
+ {
+ s += 17;
+ /* s in range [1, 8]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = b << s;
+ /* b in range [bmin << smin, bmax << smax],
+ == [1 << 1, 2 << 8]
+ == [2, 512]. */
+ if (b == 1 || b == 513)
+ link_error ();
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp81.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp81.c
new file mode 100644
index 0000000000..bb38f27c0d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp81.c
@@ -0,0 +1,38 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-tree-switch-conversion -fdump-tree-vrp1" } */
+
+extern void vrp_keep (void);
+
+/* Test <<. */
+
+void
+f3 (int s, int b)
+{
+ if (s >> 3 == -2)
+ /* s in range [-16, -9]. */
+ {
+ s += 17;
+ /* s in range [1, 8]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = b << s;
+ /* b in range [bmin << smin, bmax << smax],
+ == [1 << 1, 2 << 8]
+ == [2, 512]. */
+ if (b == 2)
+ vrp_keep ();
+ if (b == 512)
+ vrp_keep ();
+ }
+}
+
+int
+main ()
+{
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vrp_keep \\(" 2 "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp82.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp82.c
new file mode 100644
index 0000000000..8f9b2ff054
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp82.c
@@ -0,0 +1,57 @@
+/* { dg-do link } */
+/* { dg-options "-O2" } */
+
+extern void link_error (void);
+
+void
+f2 (int c, int b)
+{
+ int s = 0;
+ if (c == 0)
+ s += 1;
+ else if (c < 1)
+ s -= 1;
+ /* s in [-1, 1]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = s << b;
+ /* b in range [-4, 4]. */
+ if (b == -5 || b == 5)
+ link_error ();
+}
+
+void
+f3 (int s, int b)
+{
+ if (s >> 3 == -2)
+ {
+ /* s in range [-16, -9]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = s << b;
+ /* b in range [bmin << smax, bmax << smin],
+ == [-16 << 2, -9 << 1]
+ == [-64, -18]. */
+ if (b == -65 || b == -17)
+ link_error ();
+ }
+}
+
+void
+f4 (unsigned int s, unsigned int b)
+{
+ s |= ~0xffU;
+ /* s in [0xffffff00, 0xffffffff]. */
+ b = (b & 1) + 1;
+ /* b in [1, 2]. */
+ b = s << b;
+ /* s in [0xfffffc00, 0xfffffffe]. */
+ if (b == ~0x3ffU - 1 || b == ~0x1U + 1)
+ link_error ();
+}
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp83.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp83.c
new file mode 100644
index 0000000000..6237adfe94
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp83.c
@@ -0,0 +1,60 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+extern void vrp_keep (void);
+
+void
+f2 (int c, int b)
+{
+ int s = 0;
+ if (c == 0)
+ s += 1;
+ else if (c < 1)
+ s -= 1;
+ /* s in [-1, 1]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = s << b;
+ /* b in range [-4, 4]. */
+ if (b == -4)
+ vrp_keep ();
+ if (b == 4)
+ vrp_keep ();
+}
+
+void
+f3 (int s, int b)
+{
+ if (s >> 3 == -2)
+ {
+ /* s in range [-16, -9]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = s << b;
+ /* b in range [bmin << smax, bmax << smin],
+ == [-16 << 2, -9 << 1]
+ == [-64, -18]. */
+ if (b == -64)
+ vrp_keep ();
+ if (b == -18)
+ vrp_keep ();
+ }
+}
+
+void
+f4 (unsigned int s, unsigned int b)
+{
+ s |= ~(0xffU);
+ /* s in [0xffffff00, 0xffffffff]. */
+ b = (b & 1) + 1;
+ /* b in [1, 2]. */
+ b = s << b;
+ /* s in [0xfffffc00, 0xfffffffe]. */
+ if (b == ~0x3ffU)
+ vrp_keep ();
+ if (b == ~0x1U)
+ vrp_keep ();
+}
+
+/* { dg-final { scan-tree-dump-times "vrp_keep \\(" 6 "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp84.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp84.c
new file mode 100644
index 0000000000..8f8dc0d2eb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp84.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+extern void vrp_keep (void);
+
+void
+f2 (int s, int b)
+{
+ if (s > 1)
+ s = 1;
+ /* s in [minint, 1]. */
+ b = (b & 1) + 1;
+ /* b in range [1, 2]. */
+ b = s << b;
+ /* b in range [minint+4, maxint-3]. */
+ if (b == -2)
+ vrp_keep ();
+}
+
+/* { dg-final { scan-tree-dump-times "vrp_keep \\(" 1 "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp85.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp85.c
new file mode 100644
index 0000000000..ad2b38d02c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp85.c
@@ -0,0 +1,40 @@
+/* PR tree-optimization/54810 */
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+extern void link_error (void);
+
+#define T(n, ntype, wtype) \
+void \
+f##n (wtype s) \
+{ \
+ if ((ntype) s == 0) \
+ return; \
+ if (s == 0) \
+ link_error (); \
+}
+
+T(1, unsigned char, unsigned char)
+T(2, unsigned char, unsigned short)
+T(3, unsigned char, unsigned int)
+T(4, unsigned char, unsigned long int)
+T(5, unsigned char, unsigned long long int)
+T(6, unsigned short int, unsigned short int)
+T(7, unsigned short int, unsigned int)
+T(8, unsigned short int, unsigned long int)
+T(9, unsigned short int, unsigned long long int)
+T(10, unsigned int, unsigned int)
+T(11, unsigned int, unsigned long int)
+T(12, unsigned int, unsigned long long int)
+T(13, unsigned long int, unsigned long int)
+T(14, unsigned long int, unsigned long long int)
+T(15, unsigned long long int, unsigned long long int)
+
+int
+main ()
+{
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp86.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp86.c
new file mode 100644
index 0000000000..ee7ed5f085
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp86.c
@@ -0,0 +1,28 @@
+/* PR tree-optimization/54471 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+
+#ifdef __SIZEOF_INT128__
+#define T __int128
+#else
+#define T long long
+#endif
+
+void fn1call (void);
+void fn2call (void);
+
+void
+foo (unsigned T x)
+{
+ if (x > (unsigned T) -3)
+ return;
+ unsigned T y = 2 * x;
+ if (y == 42)
+ fn1call ();
+ else
+ fn2call ();
+}
+
+/* { dg-final { scan-tree-dump "fn1call" "vrp1"} } */
+/* { dg-final { scan-tree-dump "fn2call" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
new file mode 100644
index 0000000000..ab399b50ef
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp87.c
@@ -0,0 +1,84 @@
+/* Setting LOGICAL_OP_NON_SHORT_CIRCUIT to 0 leads to two conditional jumps
+ when evaluating an && condition. VRP is not able to optimize this. */
+/* { dg-do compile { target { ! { logical_op_short_circuit || { m68k*-*-* mmix*-*-* mep*-*-* bfin*-*-* v850*-*-* picochip*-*-* moxie*-*-* cris*-*-* m32c*-*-* fr30*-*-* mcore*-*-* powerpc*-*-* xtensa*-*-* hppa*-*-* } } } } } */
+
+/* { dg-options "-O2 -fdump-tree-vrp2-details -fdump-tree-cddce2-details" } */
+
+struct bitmap_head_def;
+typedef struct bitmap_head_def *bitmap;
+typedef const struct bitmap_head_def *const_bitmap;
+
+
+typedef unsigned long BITMAP_WORD;
+typedef struct bitmap_element_def
+{
+ struct bitmap_element_def *next;
+ unsigned int indx;
+ BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))];
+} bitmap_element;
+
+
+
+
+
+
+typedef struct bitmap_head_def
+{
+ bitmap_element *first;
+
+} bitmap_head;
+
+
+
+static __inline__ unsigned char
+bitmap_elt_ior (bitmap dst, bitmap_element * dst_elt,
+ bitmap_element * dst_prev, const bitmap_element * a_elt,
+ const bitmap_element * b_elt, unsigned char changed)
+{
+
+ if (a_elt)
+ {
+
+ if (!changed && dst_elt)
+ {
+ changed = 1;
+ }
+ }
+ else
+ {
+ changed = 1;
+ }
+ return changed;
+}
+
+unsigned char
+bitmap_ior_into (bitmap a, const_bitmap b)
+{
+ bitmap_element *a_elt = a->first;
+ const bitmap_element *b_elt = b->first;
+ bitmap_element *a_prev = ((void *) 0);
+ unsigned char changed = 0;
+
+ while (b_elt)
+ {
+
+ if (!a_elt || a_elt->indx == b_elt->indx)
+ changed = bitmap_elt_ior (a, a_elt, a_prev, a_elt, b_elt, changed);
+ else if (a_elt->indx > b_elt->indx)
+ changed = 1;
+ b_elt = b_elt->next;
+
+
+ }
+
+ return changed;
+}
+
+/* Verify that VRP simplified an "if" statement. */
+/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp2"} } */
+/* Verify that DCE after VRP2 eliminates a dead conversion
+ to a (Bool). */
+/* { dg-final { scan-tree-dump "Deleting.*_Bool.*;" "cddce2"} } */
+/* { dg-final { cleanup-tree-dump "vrp2" } } */
+/* { dg-final { cleanup-tree-dump "cddce2" } } */
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp88.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp88.c
new file mode 100644
index 0000000000..e43bdffbba
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp88.c
@@ -0,0 +1,39 @@
+/* { dg-do compile } */
+
+/* { dg-options "-O2 -fdump-tree-vrp1-details" } */
+
+
+typedef const struct bitmap_head_def *const_bitmap;
+typedef unsigned long BITMAP_WORD;
+typedef struct bitmap_element_def {
+ struct bitmap_element_def *next;
+ BITMAP_WORD bits[((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u))];
+} bitmap_element;
+typedef struct bitmap_head_def {
+ bitmap_element *first;
+} bitmap_head;
+unsigned char
+bitmap_single_bit_set_p (const_bitmap a)
+{
+ unsigned long count = 0;
+ const bitmap_element *elt;
+ unsigned ix;
+ if ((!(a)->first))
+ return 0;
+ elt = a->first;
+ if (elt->next != ((void *)0))
+ return 0;
+ for (ix = 0; ix != ((128 + (8 * 8 * 1u) - 1) / (8 * 8 * 1u)); ix++)
+ {
+ count += __builtin_popcountl (elt->bits[ix]);
+ if (count > 1)
+ return 0;
+ }
+ return count == 1;
+}
+
+/* Verify that VRP simplified an "if" statement. */
+/* { dg-final { scan-tree-dump "Folded into: if.*" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
+
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp89.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp89.c
new file mode 100644
index 0000000000..3e1d96e42a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp89.c
@@ -0,0 +1,57 @@
+/* PR target/29776 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
+#define A(fn, arg, min, max) \
+ if (__builtin_##fn (arg) < min || __builtin_##fn (arg) > max) \
+ link_error ();
+#define B(fn, min, max) \
+ A (fn, a, min, max) A (fn##l, b, min, max) A (fn##ll, c, min, max)
+#define C(fn, min, sub) \
+ A (fn, a, min, ((int) sizeof (a) * __CHAR_BIT__ - sub)) \
+ A (fn##l, b, min, ((int) sizeof (b) * __CHAR_BIT__ - sub)) \
+ A (fn##ll, c, min, ((int) sizeof (c) * __CHAR_BIT__ - sub))
+#define D(fn, sub1, sub2) \
+ A (fn, a, ((int) sizeof (a) * __CHAR_BIT__ - sub1), \
+ ((int) sizeof (a) * __CHAR_BIT__ - sub2)) \
+ A (fn##l, b, ((int) sizeof (b) * __CHAR_BIT__ - sub1), \
+ ((int) sizeof (b) * __CHAR_BIT__ - sub2)) \
+ A (fn##ll, c, ((int) sizeof (c) * __CHAR_BIT__ - sub1), \
+ ((int) sizeof (c) * __CHAR_BIT__ - sub2))
+
+extern void link_error (void);
+
+unsigned int d;
+unsigned long e;
+unsigned long long f;
+
+void
+foo (unsigned int a, unsigned long b, unsigned long long c)
+{
+ B (parity, 0, 1)
+ C (ffs, 0, 0)
+ C (popcount, 0, 0)
+ C (clz, 0, 0)
+ C (ctz, -1, 0)
+ a &= 63;
+ b &= 63;
+ c &= 63;
+ B (ffs, 0, 6)
+ B (popcount, 0, 6)
+ a += 3; b += 3; c += 3;
+ B (ffs, 1, 7)
+ B (popcount, 1, 7)
+ a = 32U + (d & 1023U);
+ b = 32UL + (e & 1023UL);
+ c = 32ULL + (f & 1023ULL);
+ D (clz, 11, 6)
+ B (ctz, 0, 10)
+}
+
+void
+bar (int a, long b, long long c)
+{
+ C (clrsb, 0, 1)
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp90.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp90.c
new file mode 100644
index 0000000000..836c335b69
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp90.c
@@ -0,0 +1,36 @@
+/* { dg-do link } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
+extern void link_error (void);
+
+__attribute__((noinline, noclone)) int
+foo (unsigned int n, int r)
+{
+ int i;
+ if (n > 0)
+ {
+ asm ("");
+ if (n < 10)
+ {
+ asm ("");
+ do
+ {
+ --n;
+ r *= 2;
+ if (n >= 9)
+ link_error ();
+ }
+ while (n > 0);
+ }
+ }
+ return r + n;
+}
+
+int
+main ()
+{
+ foo (7, 2);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/vrp93.c b/gcc/testsuite/gcc.dg/tree-ssa/vrp93.c
new file mode 100644
index 0000000000..d78c399c3e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/vrp93.c
@@ -0,0 +1,36 @@
+/* PR target/29776 */
+/* PR tree-optimization/61725 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-vrp1" } */
+/* { dg-final { scan-tree-dump-not "link_error" "vrp1"} } */
+/* { dg-final { cleanup-tree-dump "vrp1" } } */
+
+#define A(fn, arg, min, max) \
+ if (__builtin_##fn (arg) < min || __builtin_##fn (arg) > max) \
+ link_error ();
+#define B(fn, min, max) \
+ A (fn, a, min, max) A (fn##l, b, min, max) A (fn##ll, c, min, max)
+#define C(fn, min, sub) \
+ A (fn, a, min, ((int) sizeof (a) * __CHAR_BIT__ - sub)) \
+ A (fn##l, b, min, ((int) sizeof (b) * __CHAR_BIT__ - sub)) \
+ A (fn##ll, c, min, ((int) sizeof (c) * __CHAR_BIT__ - sub))
+
+extern void link_error (void);
+
+unsigned int d;
+unsigned long e;
+unsigned long long f;
+
+void
+foo (int a, long b, long long c)
+{
+ C (ffs, 0, 0)
+ a &= 63; b &= 63; c &= 63;
+ B (ffs, 0, 6)
+ a++; b++; c++;
+ B (ffs, 1, 7)
+ a -= 2; b -= 2; c -= 2;
+ C (ffs, 0, 0)
+ a -= 63; b -= 63; c -= 63;
+ C (ffs, 1, 0)
+}
diff --git a/gcc/testsuite/gcc.dg/tsan/tsan.exp b/gcc/testsuite/gcc.dg/tsan/tsan.exp
new file mode 100644
index 0000000000..f080195b73
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tsan/tsan.exp
@@ -0,0 +1,47 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib tsan-dg.exp
+load_lib torture-options.exp
+
+if ![check_effective_target_fthread_sanitizer] {
+ return
+}
+
+# Initialize `dg'.
+dg-init
+torture-init
+set-torture-options [list \
+ { -O0 } \
+ { -O2 } ]
+
+if [tsan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/tsan/*.c]] ""
+
+}
+
+# All done.
+tsan_finish
+torture-finish
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/typeof-2.c b/gcc/testsuite/gcc.dg/typeof-2.c
new file mode 100644
index 0000000000..e9169003a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/typeof-2.c
@@ -0,0 +1,28 @@
+/* Test qualifier discard of typeof for atomic types. */
+/* { dg-do compile } */
+/* { dg-options "-std=c11" } */
+
+extern int i;
+
+extern int * p;
+
+extern int _Atomic const ci;
+extern __typeof (ci) i;
+
+extern int _Atomic volatile vi;
+extern __typeof (vi) i;
+
+extern int * _Atomic restrict ri;
+extern __typeof (ri) p;
+
+void f(void)
+{
+ __auto_type aci = ci;
+ int *paci = &aci;
+
+ __auto_type avi = vi;
+ int *pavi = &avi;
+
+ __auto_type ari = ri;
+ int **pari = &ari;
+}
diff --git a/gcc/testsuite/gcc.dg/ubsan/c-shift-1.c b/gcc/testsuite/gcc.dg/ubsan/c-shift-1.c
new file mode 100644
index 0000000000..61b9010536
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/c-shift-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile} */
+/* { dg-options "-fsanitize=shift -w" } */
+/* { dg-shouldfail "ubsan" } */
+
+int x;
+int
+main (void)
+{
+ /* None of the following should pass. */
+ int A[1 >> -1] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+ int B[-1 >> -1] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+ int D[1 << -1] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+ int E[-1 << -1] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+ int F[-1 >> 200] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+ int G[1 << 200] = {}; /* { dg-error "variable-sized object may not be initialized" } */
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/ubsan/c99-shift-1.c b/gcc/testsuite/gcc.dg/ubsan/c99-shift-1.c
new file mode 100644
index 0000000000..ff6776bf3c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/c99-shift-1.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w -std=c99" } */
+
+int
+main (void)
+{
+ int a = -42;
+ a << 1;
+}
+/* { dg-output "left shift of negative value -42" } */
diff --git a/gcc/testsuite/gcc.dg/ubsan/c99-shift-2.c b/gcc/testsuite/gcc.dg/ubsan/c99-shift-2.c
new file mode 100644
index 0000000000..c6662dc43b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/c99-shift-2.c
@@ -0,0 +1,10 @@
+/* { dg-do run } */
+/* { dg-options "-fsanitize=shift -w -std=c99" } */
+
+int
+main (void)
+{
+ int a = 1;
+ a <<= 31;
+}
+/* { dg-output "left shift of 1 by 31 places cannot be represented in type 'int'" } */
diff --git a/gcc/testsuite/gcc.dg/ubsan/ubsan.exp b/gcc/testsuite/gcc.dg/ubsan/ubsan.exp
new file mode 100644
index 0000000000..962363b614
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/ubsan/ubsan.exp
@@ -0,0 +1,36 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Load support procs.
+load_lib gcc-dg.exp
+load_lib ubsan-dg.exp
+
+# Initialize `dg'.
+dg-init
+if [ubsan_init] {
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c $srcdir/c-c++-common/ubsan/*.c]] ""
+
+}
+
+# All done.
+ubsan_finish
+dg-finish
diff --git a/gcc/testsuite/gcc.dg/ucnid-10.c b/gcc/testsuite/gcc.dg/ucnid-10.c
index 317cbb113a..83425d3cf1 100644
--- a/gcc/testsuite/gcc.dg/ucnid-10.c
+++ b/gcc/testsuite/gcc.dg/ucnid-10.c
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers" } */
/* { dg-require-ascii-locale "" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
#pragma pack(push)
#pragma pack(pop, \u00f3) /* { dg-warning "pop, \\\\U000000f3.*push, \\\\U000000f3" } */
diff --git a/gcc/testsuite/gcc.dg/ucnid-13.c b/gcc/testsuite/gcc.dg/ucnid-13.c
index 9421789942..0b94247ba9 100644
--- a/gcc/testsuite/gcc.dg/ucnid-13.c
+++ b/gcc/testsuite/gcc.dg/ucnid-13.c
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers -Wpacked" } */
/* { dg-require-ascii-locale "" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int a __attribute__((\u00c0)); /* { dg-warning "'\\\\U000000c0' attribute directive ignored" } */
diff --git a/gcc/testsuite/gcc.dg/ucnid-5.c b/gcc/testsuite/gcc.dg/ucnid-5.c
index aea57ef068..c7ad8ffb38 100644
--- a/gcc/testsuite/gcc.dg/ucnid-5.c
+++ b/gcc/testsuite/gcc.dg/ucnid-5.c
@@ -1,5 +1,4 @@
/* { dg-do run } */
-/* { dg-xfail-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
/* { dg-skip-if "No dollar in identfiers" { "avr-*-*" } { "*" } { "" } } */
/* { dg-options "-std=c99 -fdollars-in-identifiers -fextended-identifiers" } */
void abort (void);
diff --git a/gcc/testsuite/gcc.dg/ucnid-7.c b/gcc/testsuite/gcc.dg/ucnid-7.c
index 1dbcb9ac77..3f73e35d4b 100644
--- a/gcc/testsuite/gcc.dg/ucnid-7.c
+++ b/gcc/testsuite/gcc.dg/ucnid-7.c
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-std=c99 -fextended-identifiers" } */
/* { dg-require-ascii-locale "" } */
+/* { dg-skip-if "" { "powerpc-ibm-aix*" } { "*" } { "" } } */
void *p = &\u00e9; /* { dg-error "'\\\\U000000e9' undeclared" } */
void *q = &\u1e00; /* { dg-error "'\\\\U00001e00' undeclared" } */
diff --git a/gcc/testsuite/gcc.dg/ucnid-8.c b/gcc/testsuite/gcc.dg/ucnid-8.c
index ea2e051f04..df1f35053d 100644
--- a/gcc/testsuite/gcc.dg/ucnid-8.c
+++ b/gcc/testsuite/gcc.dg/ucnid-8.c
@@ -3,6 +3,7 @@
/* { dg-do compile } */
/* { dg-options "-std=gnu99 -fextended-identifiers -Wvla" } */
/* { dg-require-ascii-locale "" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int a __attribute__((__mode__(\u00e9))); /* { dg-error "unknown machine mode '\\\\U000000e9'" } */
struct s1 { int \u00e9 : 0; }; /* { dg-error "zero width for bit-field '\\\\U000000e9'" } */
@@ -12,4 +13,4 @@ void f (int b) { int \u00e9[b]; } /* { dg-warning "variable length array '\\\\U0
void g (static int \u00e9); /* { dg-error "storage class specified for parameter '\\\\U000000e9'" } */
struct s2 { int \u00e1; } \u00e9 = { { 0 } }; /* { dg-warning "braces around scalar initializer" } */
-/* { dg-warning "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } 14 } */
+/* { dg-warning "near initialization for '\\\\U000000e9\\.\\\\U000000e1'" "UCN diag" { target *-*-* } 15 } */
diff --git a/gcc/testsuite/gcc.dg/uninit-6-O0.c b/gcc/testsuite/gcc.dg/uninit-6-O0.c
index e3fefe5e1c..fe9815efbb 100644
--- a/gcc/testsuite/gcc.dg/uninit-6-O0.c
+++ b/gcc/testsuite/gcc.dg/uninit-6-O0.c
@@ -2,7 +2,7 @@
This one inspired by java/class.c:build_utf8_ref. */
/* { dg-do compile } */
-/* { dg-options "-Wuninitialized" } */
+/* { dg-options "-Wuninitialized -ftrack-macro-expansion=2" } */
#include <stddef.h>
@@ -24,7 +24,7 @@ do { \
tmp->car = 0; tmp->cdr = 0; tmp->type = TYPE; \
tmp->data = VALUE; \
if (TREE->car) \
- LAST->cdr = tmp; \
+ LAST->cdr = tmp; /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */ \
else \
TREE->car = tmp; \
LAST = tmp; \
@@ -39,7 +39,7 @@ make_something(int a, int b, int c)
rv = malloc (sizeof (struct tree));
rv->car = 0;
- APPEND(rv, field, INTEGER_T, a); /* { dg-bogus "field" "uninitialized variable warning" { xfail *-*-* } } */
+ APPEND(rv, field, INTEGER_T, a);
APPEND(rv, field, PTR_T, b);
APPEND(rv, field, INTEGER_T, c);
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-5_a.c b/gcc/testsuite/gcc.dg/uninit-pred-5_a.c
index 7fa0b253fb..5ced8971c3 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-5_a.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-5_a.c
@@ -6,8 +6,9 @@ int bar();
int blah(int);
void t(int);
+static int
__attribute__((always_inline))
-int foo (int n, int* v, int r)
+foo (int n, int* v, int r)
{
int flag = 0;
if (r > n)
diff --git a/gcc/testsuite/gcc.dg/uninit-pred-5_b.c b/gcc/testsuite/gcc.dg/uninit-pred-5_b.c
index 9760fa8a5c..e8da256569 100644
--- a/gcc/testsuite/gcc.dg/uninit-pred-5_b.c
+++ b/gcc/testsuite/gcc.dg/uninit-pred-5_b.c
@@ -6,8 +6,9 @@ int bar();
int blah(int);
void t(int);
+static int
__attribute__((always_inline))
-int foo (int n, int* v, int r)
+foo (int n, int* v, int r)
{
int flag = 0;
if (r > n)
diff --git a/gcc/testsuite/gcc.dg/unroll_1.c b/gcc/testsuite/gcc.dg/unroll_1.c
index 23e241bfce..b1d3e7c692 100644
--- a/gcc/testsuite/gcc.dg/unroll_1.c
+++ b/gcc/testsuite/gcc.dg/unroll_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll" } */
+/* { dg-options "-O2 -fdump-rtl-loop2_unroll=stderr -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2 -fenable-rtl-loop2_unroll" } */
unsigned a[100], b[100];
inline void bar()
@@ -11,7 +11,7 @@ int foo(void)
{
int i;
bar();
- for (i = 0; i < 2; i++)
+ for (i = 0; i < 2; i++) /* { dg-message "note: loop turned into non-loop; it never loops" } */
{
a[i]= b[i] + 1;
}
@@ -21,12 +21,10 @@ int foo(void)
int foo2(void)
{
int i;
- for (i = 0; i < 2; i++)
+ for (i = 0; i < 2; i++) /* { dg-message "note: loop turned into non-loop; it never loops" } */
{
a[i]= b[i] + 1;
}
return 1;
}
-
-/* { dg-final { scan-rtl-dump-times "Decided to peel loop completely" 2 "loop2_unroll" } } */
-/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
+/* { dg-prune-output ".*" } */
diff --git a/gcc/testsuite/gcc.dg/unroll_2.c b/gcc/testsuite/gcc.dg/unroll_2.c
index 12912cf77d..2322a49401 100644
--- a/gcc/testsuite/gcc.dg/unroll_2.c
+++ b/gcc/testsuite/gcc.dg/unroll_2.c
@@ -1,5 +1,5 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fdisable-tree-cunroll=foo -fdisable-tree-cunrolli=foo -fenable-rtl-loop2_unroll" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll=foo -fdisable-tree-cunrolli=foo -fenable-rtl-loop2_unroll" } */
unsigned a[100], b[100];
inline void bar()
@@ -28,6 +28,5 @@ int foo2(void)
return 1;
}
-/* { dg-final { scan-rtl-dump-times "Decided to peel loop completely" 1 "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-times "loop turned into non-loop; it never loops" 1 "loop2_unroll" } } */
/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
-/* { dg-excess-errors "extra notes" } */
diff --git a/gcc/testsuite/gcc.dg/unroll_3.c b/gcc/testsuite/gcc.dg/unroll_3.c
index d86ed552ae..310bf064c9 100644
--- a/gcc/testsuite/gcc.dg/unroll_3.c
+++ b/gcc/testsuite/gcc.dg/unroll_3.c
@@ -1,5 +1,5 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll=foo" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll=foo" } */
unsigned a[100], b[100];
inline void bar()
@@ -28,6 +28,5 @@ int foo2(void)
return 1;
}
-/* { dg-final { scan-rtl-dump-times "Decided to peel loop completely" 1 "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-times "loop turned into non-loop; it never loops" 1 "loop2_unroll" } } */
/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
-/* { dg-excess-errors "extra notes" } */
diff --git a/gcc/testsuite/gcc.dg/unroll_4.c b/gcc/testsuite/gcc.dg/unroll_4.c
index 7c70157f58..fbffbb0d5f 100644
--- a/gcc/testsuite/gcc.dg/unroll_4.c
+++ b/gcc/testsuite/gcc.dg/unroll_4.c
@@ -1,5 +1,5 @@
-/* { dg-do compile { target i?86-*-linux* x86_64-*-linux* } } */
-/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll=foo2" } */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-rtl-loop2_unroll -fno-peel-loops -fno-tree-vrp -fdisable-tree-cunroll -fdisable-tree-cunrolli -fenable-rtl-loop2_unroll=foo2" } */
unsigned a[100], b[100];
inline void bar()
@@ -28,6 +28,5 @@ int foo2(void)
return 1;
}
-/* { dg-final { scan-rtl-dump-times "Decided to peel loop completely" 1 "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-times "loop turned into non-loop; it never loops" 1 "loop2_unroll" } } */
/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
-/* { dg-excess-errors "extra notes" } */
diff --git a/gcc/testsuite/gcc.dg/unroll_5.c b/gcc/testsuite/gcc.dg/unroll_5.c
new file mode 100644
index 0000000000..edb9c26a68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/unroll_5.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fdump-rtl-loop2_unroll -funroll-loops" } */
+/* { dg-require-effective-target int32plus } */
+
+void abort (void);
+int *a;
+/* Fails on MIPS16 because equality checks are implemented using XOR.
+ It's unlikely MIPS16 users would want unrolling anyway. */
+#ifdef __mips
+__attribute__((nomips16))
+#endif
+int t()
+{
+ int i;
+ for (i=0;i<1000000;i++)
+ if (a[i])
+ return 1;
+ return 0;
+}
+#ifdef __mips
+__attribute__((nomips16))
+#endif
+int t2()
+{
+ int i;
+ for (i=0;i<3000000;i++)
+ if (a[i])
+ abort ();
+ return 0;
+}
+/* { dg-final { scan-rtl-dump-times "upper bound: 999999" 1 "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-not "realistic bound: 999999" "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-times "upper bound: 2999999" 1 "loop2_unroll" } } */
+/* { dg-final { scan-rtl-dump-times "realistic bound: 2999999" 1 "loop2_unroll" } } */
+/* { dg-final { cleanup-rtl-dump "loop2_unroll" } } */
diff --git a/gcc/testsuite/gcc.dg/unused-8b.c b/gcc/testsuite/gcc.dg/unused-8b.c
new file mode 100644
index 0000000000..5b4b894937
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/unused-8b.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-Wall -Wno-unused -Wextra" } */
+
+void foo(int x) { }
diff --git a/gcc/testsuite/gcc.dg/utf-cvt.c b/gcc/testsuite/gcc.dg/utf-cvt.c
index 7f51179eeb..d6f18eeade 100644
--- a/gcc/testsuite/gcc.dg/utf-cvt.c
+++ b/gcc/testsuite/gcc.dg/utf-cvt.c
@@ -1,7 +1,7 @@
/* Contributed by Kris Van Hees <kris.van.hees@oracle.com> */
/* Test the char16_t and char32_t promotion rules. */
/* { dg-do compile } */
-/* { dg-excess-errors "short and int are 16bit" { target { "avr-*-*" } } } */
+/* { dg-require-effective-target int32plus } */
/* { dg-options "-std=gnu99 -Wall -Wconversion -Wsign-conversion" } */
typedef __CHAR16_TYPE__ char16_t;
diff --git a/gcc/testsuite/gcc.dg/var-expand1.c b/gcc/testsuite/gcc.dg/var-expand1.c
index 3904407c44..a784ea1a04 100644
--- a/gcc/testsuite/gcc.dg/var-expand1.c
+++ b/gcc/testsuite/gcc.dg/var-expand1.c
@@ -6,7 +6,7 @@
extern void abort (void);
-float array[10] = { 1,2,3,4,5,6,7,8,9,10 };
+float array[30] = { 1,2,3,4,5,6,7,8,9,10 };
int foo (int n)
{
diff --git a/gcc/testsuite/gcc.dg/vect/O3-pr36098.c b/gcc/testsuite/gcc.dg/vect/O3-pr36098.c
index 1c445be9e2..b0b8e3c946 100644
--- a/gcc/testsuite/gcc.dg/vect/O3-pr36098.c
+++ b/gcc/testsuite/gcc.dg/vect/O3-pr36098.c
@@ -17,6 +17,5 @@ void foo (int ncons, t_sortblock *sb, int *iatom)
iatom[m]=sb[i].iatom[m];
}
-/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 0 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
-
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-1.c
index c13ee3b181..1caa3cf5c6 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-1.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-1.c
@@ -56,6 +56,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-10.c b/gcc/testsuite/gcc.dg/vect/bb-slp-10.c
index f127c7f11e..658bf03ca5 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-10.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-10.c
@@ -50,6 +50,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "unsupported alignment in basic block." 1 "slp" { xfail vect_element_align } } } */
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_element_align } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-11.c b/gcc/testsuite/gcc.dg/vect/bb-slp-11.c
index 225d08ec33..3c350a7ab2 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-11.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-11.c
@@ -48,6 +48,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect64 } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect64 } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-13.c b/gcc/testsuite/gcc.dg/vect/bb-slp-13.c
index 4e114d5f94..88838cea9b 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-13.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-13.c
@@ -46,6 +46,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-14.c b/gcc/testsuite/gcc.dg/vect/bb-slp-14.c
index fc6b457811..d46deadd0d 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-14.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-14.c
@@ -47,6 +47,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 0 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-15.c b/gcc/testsuite/gcc.dg/vect/bb-slp-15.c
index cab46d6092..fd065e6ce3 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-15.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-15.c
@@ -51,6 +51,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-16.c b/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
index 4390753db4..0cbec65b77 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-16.c
@@ -65,6 +65,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-17.c b/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
index a64543f829..3f14ff487a 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-17.c
@@ -57,6 +57,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-18.c b/gcc/testsuite/gcc.dg/vect/bb-slp-18.c
index 7869e32fe3..7d73dbd8b2 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-18.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-18.c
@@ -46,6 +46,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-19.c b/gcc/testsuite/gcc.dg/vect/bb-slp-19.c
index a314626f0d..576bbc1692 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-19.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-19.c
@@ -53,6 +53,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { xfail *-*-* } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-2.c b/gcc/testsuite/gcc.dg/vect/bb-slp-2.c
index 20a61a08d2..accc472f79 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-2.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-2.c
@@ -53,6 +53,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-20.c b/gcc/testsuite/gcc.dg/vect/bb-slp-20.c
index 9991fe3998..a7978a70d7 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-20.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-20.c
@@ -63,7 +63,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-21.c b/gcc/testsuite/gcc.dg/vect/bb-slp-21.c
index acd332079c..8ad71454af 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-21.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-21.c
@@ -63,7 +63,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "slp" { target { ! {vect_int_mult } } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
index 2fa2c1b327..e425dc9ade 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-22.c
@@ -63,7 +63,7 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { ! {vect_int_mult } } } } } */
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 2 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { ! {vect_int_mult } } } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-23.c b/gcc/testsuite/gcc.dg/vect/bb-slp-23.c
index 1c09048ee0..35f5186fd7 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-23.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-23.c
@@ -51,6 +51,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-24.c b/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
index cbe1cb3ede..d0c1d69d1f 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-24.c
@@ -54,6 +54,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_element_align } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-25.c b/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
index 193ab9d4db..737b3b06c0 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-25.c
@@ -54,6 +54,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_element_align } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-26.c b/gcc/testsuite/gcc.dg/vect/bb-slp-26.c
index cf8f9587d0..881f3204f4 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-26.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-26.c
@@ -55,6 +55,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect64 } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect64 } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-27.c b/gcc/testsuite/gcc.dg/vect/bb-slp-27.c
index 7157ebaddd..7fcc1e6104 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-27.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-27.c
@@ -44,6 +44,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && { vect_unpack && vect_pack_trunc } } } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { vect_int_mult && { vect_unpack && vect_pack_trunc } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-28.c b/gcc/testsuite/gcc.dg/vect/bb-slp-28.c
index 996f8f3cad..650c50eb93 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-28.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-28.c
@@ -66,6 +66,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && { vect_pack_trunc && vect_unpack } } } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { vect_int_mult && { vect_pack_trunc && vect_unpack } } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-29.c b/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
index e37b96d14d..c5b31343a4 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-29.c
@@ -54,6 +54,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_int_mult && vect_element_align } } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { vect_int_mult && vect_element_align } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-3.c b/gcc/testsuite/gcc.dg/vect/bb-slp-3.c
index fee62d7f98..093389faf9 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-3.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-3.c
@@ -42,6 +42,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-30.c b/gcc/testsuite/gcc.dg/vect/bb-slp-30.c
new file mode 100644
index 0000000000..86da55a47c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-30.c
@@ -0,0 +1,47 @@
+/* { dg-require-effective-target vect_int } */
+
+int a[32];
+
+void __attribute__((noinline))
+test1(void)
+{
+ a[0] = 1;
+ a[1] = 1;
+ a[2] = 1;
+ a[3] = 1;
+ a[4] = 1;
+ a[5] = 1;
+ a[6] = 1;
+ a[7] = 1;
+ a[8] = 1;
+ a[9] = 1;
+ a[10] = 1;
+ a[11] = 1;
+ a[12] = 1;
+ a[13] = 1;
+ a[14] = 1;
+ a[15] = 1;
+ a[16] = 1;
+ a[17] = 1;
+ a[18] = 1;
+ a[19] = 1;
+ a[20] = 1;
+ a[21] = 1;
+ a[22] = 1;
+ a[23] = 1;
+ a[24] = 1;
+ a[25] = 1;
+ a[26] = 1;
+ a[27] = 1;
+ a[28] = 1;
+ a[29] = 1;
+ a[30] = 1;
+ a[31] = 1;
+ asm ("" : : : "memory");
+ a[21] = 0;
+}
+
+int main() { test1(); return a[21]; }
+
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-31.c b/gcc/testsuite/gcc.dg/vect/bb-slp-31.c
new file mode 100644
index 0000000000..7ea341216d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-31.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+
+typedef double vec __attribute__ ((vector_size (2 * sizeof (double))));
+vec a;
+
+void f(){
+ a[0]=1+2*a[0]*a[0];
+ a[1]=1+2*a[1]*a[1];
+}
+
+/* { dg-final { scan-tree-dump "basic block vectorized" "slp" } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-32.c b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
new file mode 100644
index 0000000000..6d69d15c96
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-32.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-fvect-cost-model=dynamic" } */
+
+void bar (int *);
+int foo (int *p)
+{
+ int x[4];
+ int tem0, tem1, tem2, tem3;
+ tem0 = p[0] + 1;
+ x[0] = tem0;
+ tem1 = p[1] + 2;
+ x[1] = tem1;
+ tem2 = p[2] + 3;
+ x[2] = tem2;
+ tem3 = p[3] + 4;
+ x[3] = tem3;
+ bar (x);
+ return tem0 + tem1 + tem2 + tem3;
+}
+
+/* { dg-final { scan-tree-dump "vectorization is not profitable" "slp" { xfail vect_no_align } } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-4.c b/gcc/testsuite/gcc.dg/vect/bb-slp-4.c
index a7632f9832..2c4b62dc4a 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-4.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-4.c
@@ -38,6 +38,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 0 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-5.c b/gcc/testsuite/gcc.dg/vect/bb-slp-5.c
index c4a8a881e0..ca093e795f 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-5.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-5.c
@@ -47,6 +47,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-6.c b/gcc/testsuite/gcc.dg/vect/bb-slp-6.c
index 176010ae5d..c233a9d501 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-6.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-6.c
@@ -45,6 +45,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-7.c b/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
index 4f82122111..b7b90f0b95 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-7.c
@@ -46,6 +46,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 0 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-8.c b/gcc/testsuite/gcc.dg/vect/bb-slp-8.c
index b1203f4dbb..303fe3e433 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-8.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-8.c
@@ -48,6 +48,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_hw_misalign } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_hw_misalign } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-8a.c b/gcc/testsuite/gcc.dg/vect/bb-slp-8a.c
index 2251275d4f..55a6a81d38 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-8a.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-8a.c
@@ -47,6 +47,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 0 "slp" } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 0 "slp" } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-8b.c b/gcc/testsuite/gcc.dg/vect/bb-slp-8b.c
index 62a691e1ba..8c5c5ab918 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-8b.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-8b.c
@@ -49,6 +49,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_hw_misalign } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_hw_misalign } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-9.c b/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
index 5535dee064..9f1a5877a2 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-9.c
@@ -46,6 +46,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { xfail vect_no_align } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
index ae833e53dc..86376b4464 100644
--- a/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-cond-1.c
@@ -41,6 +41,6 @@ int main ()
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_element_align } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_element_align } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c
new file mode 100644
index 0000000000..ff520c06f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-1.c
@@ -0,0 +1,54 @@
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 8
+
+unsigned short X[N];
+unsigned short Y[N];
+unsigned int result[N];
+
+/* unsigned short->unsigned int widening-mult. */
+__attribute__ ((noinline, noclone)) void
+foo (void)
+{
+ result[0] = (unsigned int) (X[0] * Y[0]);
+ result[1] = (unsigned int) (X[1] * Y[1]);
+ result[2] = (unsigned int) (X[2] * Y[2]);
+ result[3] = (unsigned int) (X[3] * Y[3]);
+ result[4] = (unsigned int) (X[4] * Y[4]);
+ result[5] = (unsigned int) (X[5] * Y[5]);
+ result[6] = (unsigned int) (X[6] * Y[6]);
+ result[7] = (unsigned int) (X[7] * Y[7]);
+}
+
+int main (void)
+{
+ int i, tmp;
+
+ check_vect ();
+
+ for (i = 0; i < N; i++)
+ {
+ X[i] = i;
+ Y[i] = 64-i;
+ }
+
+ foo ();
+
+ for (i = 0; i < N; i++)
+ {
+ __asm__ volatile ("");
+ tmp = X[i] * Y[i];
+ if (result[i] != tmp)
+ abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "slp" { target { vect_widen_mult_hi_to_si || vect_unpack } } } } */
+/* { dg-final { scan-tree-dump-times "vect_recog_widen_mult_pattern: detected" 8 "slp" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { scan-tree-dump-times "pattern recognized" 8 "slp" { target vect_widen_mult_hi_to_si_pattern } } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-2.c b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-2.c
new file mode 100644
index 0000000000..545c08d86e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/bb-slp-pattern-2.c
@@ -0,0 +1,52 @@
+/* { dg-require-effective-target vect_condition } */
+
+#include "tree-vect.h"
+
+#define N 128
+
+__attribute__((noinline, noclone)) void
+foo (short * __restrict__ a, int * __restrict__ b, int stride)
+{
+ int i;
+
+ for (i = 0; i < N/stride; i++, a += stride, b += stride)
+ {
+ a[0] = b[0] ? 1 : 7;
+ a[1] = b[1] ? 2 : 0;
+ a[2] = b[2] ? 3 : 0;
+ a[3] = b[3] ? 4 : 0;
+ a[4] = b[4] ? 5 : 0;
+ a[5] = b[5] ? 6 : 0;
+ a[6] = b[6] ? 7 : 0;
+ a[7] = b[7] ? 8 : 0;
+ }
+}
+
+short a[N];
+int b[N];
+int main ()
+{
+ int i;
+
+ check_vect ();
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i;
+ b[i] = -i;
+ }
+
+ foo (a, b, 8);
+
+ for (i = 1; i < N; i++)
+ if (a[i] != i%8 + 1)
+ abort ();
+
+ if (a[0] != 7)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { vect_element_align && vect_pack_trunc } } } } */
+/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-31.c b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-31.c
index b109be2325..137267619f 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-31.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/costmodel-vect-31.c
@@ -18,7 +18,7 @@ struct s{
struct t e; /* unaligned (offset 2N+4N+4 B) */
};
-struct s tmp;
+struct s tmp = { 1 };
int main1 ()
{
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
index c651006012..80c6d299c3 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/i386/i386-costmodel-vect.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +28,7 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=dynamic"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c
index 376c7e4ee0..f3d169b032 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/costmodel-slp-34.c
@@ -1,4 +1,5 @@
/* { dg-require-effective-target vect_int } */
+/* { dg-skip-if "cost too high" { powerpc*le-*-* } { "*" } { "" } } */
#include <stdarg.h>
#include "../../tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp
index 280b55668c..73e78d9e25 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/ppc/ppc-costmodel-vect.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,7 +33,7 @@ if ![is-effective-target powerpc_altivec_ok] {
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=dynamic" "-fno-common"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp
index cde70c54ad..550ce84ece 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/spu/spu-costmodel-vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,7 +29,7 @@ if { ![istarget spu*-*-*] } then {
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=dynamic"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c
index b109be2325..137267619f 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/costmodel-vect-31.c
@@ -18,7 +18,7 @@ struct s{
struct t e; /* unaligned (offset 2N+4N+4 B) */
};
-struct s tmp;
+struct s tmp = { 1 };
int main1 ()
{
diff --git a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
index 1a22e7dbca..2c30019a17 100644
--- a/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/costmodel/x86_64/x86_64-costmodel-vect.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +29,7 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=dynamic"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-1.c b/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-1.c
index 7b76b440e1..c138a78b32 100644
--- a/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-1.c
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-1.c
@@ -45,5 +45,5 @@ main ()
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target { vect_call_copysignf && vect_call_sqrtf } } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-2.c b/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-2.c
index bf19fcd159..c126c1c008 100644
--- a/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-2.c
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-bb-slp-call-2.c
@@ -63,5 +63,5 @@ main ()
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 2 "slp" { target vect_call_lrint } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 2 "slp" { target vect_call_lrint } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-pr55281.c b/gcc/testsuite/gcc.dg/vect/fast-math-pr55281.c
new file mode 100644
index 0000000000..4d75403e77
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-pr55281.c
@@ -0,0 +1,30 @@
+/* PR tree-optimization/55281 */
+/* { dg-do compile } */
+
+static inline float
+bar (float k, float j)
+{
+ float l = 0.0f;
+ if (k > j)
+ l = k;
+ float t = k / j;
+ float v = t * t;
+ if (k == 0)
+ v = 0.0f;
+ if (t > 0.4f)
+ v += 0.7;
+ if (l != 0)
+ v = 1.5 - v;
+ return v;
+}
+
+void
+foo (int *a, int b, float *d, float *e, int *f)
+{
+ int i, l;
+ for (l = 0; l != b; ++l)
+ for (i = 0; i != 8; ++i)
+ f[i] = e[i] + bar (a[i], d[i]);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c b/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c
new file mode 100644
index 0000000000..241f9f5c09
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/fast-math-slp-38.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+
+double self[1024];
+double a[1024][1024];
+double b[1024];
+
+void __attribute__((noinline,noclone))
+foo (void)
+{
+ int i, j;
+ for (i = 0; i < 1024; i+=6)
+ for (j = 0; j < 1024; j+=6)
+ {
+ self[i] = self[i] + a[i][j]*b[j];
+ self[i+1] = self[i+1] + a[i][j+1]*b[j+1];
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-34.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-34.c
index 2eac33e414..7600edf160 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-34.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-34.c
@@ -7,7 +7,7 @@
struct {
char ca[N];
-} s;
+} s = {};
char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
__attribute__ ((noinline))
diff --git a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
index 4b613050a4..7a7765110e 100644
--- a/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
+++ b/gcc/testsuite/gcc.dg/vect/no-section-anchors-vect-68.c
@@ -1,4 +1,6 @@
-/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_int }
+ { dg-skip-if "AArch64 tiny code model does not support programs larger than 1MiB" {aarch64_tiny} {"*"} {""} }
+ */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/no-tree-reassoc-bb-slp-12.c b/gcc/testsuite/gcc.dg/vect/no-tree-reassoc-bb-slp-12.c
index 349bf8b30f..49274f88f5 100644
--- a/gcc/testsuite/gcc.dg/vect/no-tree-reassoc-bb-slp-12.c
+++ b/gcc/testsuite/gcc.dg/vect/no-tree-reassoc-bb-slp-12.c
@@ -47,6 +47,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "basic block vectorized using SLP" 1 "slp" { target vect_int_mult } } } */
+/* { dg-final { scan-tree-dump-times "basic block vectorized" 1 "slp" { target vect_int_mult } } } */
/* { dg-final { cleanup-tree-dump "slp" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
new file mode 100644
index 0000000000..f84528a504
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-2.c
@@ -0,0 +1,55 @@
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 17
+
+int ia[N] = {48,45,42,39,36,33,30,27,24,21,18,15,12,9,6,3,0};
+int ib[N] = {48,45,42,39,36,33,30,27,24,21,18,15,12,9,6,3,0};
+int res[N] = {48,192,180,168,156,144,132,120,108,96,84,72,60,48,36,24,12};
+
+__attribute__ ((noinline))
+int main1 ()
+{
+ int i;
+
+ /* Not vectorizable due to data dependence: dependence distance 1. */
+ for (i = N - 2; i >= 0; i--)
+ {
+ ia[i] = ia[i+1] * 4;
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ia[i] != 0)
+ abort ();
+ }
+
+ /* Vectorizable. Dependence distance -1. */
+ for (i = N - 2; i >= 0; i--)
+ {
+ ib[i+1] = ib[i] * 4;
+ }
+
+ /* check results: */
+ for (i = 0; i < N; i++)
+ {
+ if (ib[i] != res[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+int main (void)
+{
+ check_vect ();
+
+ return main1 ();
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
new file mode 100644
index 0000000000..8f937a0f3d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/no-vfa-vect-depend-3.c
@@ -0,0 +1,187 @@
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 64
+
+int ia[N + 1];
+int ib[N + 1];
+
+/* Vectorizable. Dependence distance -1. */
+__attribute__((noinline)) void
+f1 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ ia[i + 1] = 1;
+ ib[i] = ia[i];
+ }
+}
+
+/* Not vectorizable due to data dependence: dependence distance 1. */
+__attribute__((noinline)) void
+f2 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = 1;
+ ib[i] = ia[i + 1];
+ }
+}
+
+/* Not vectorizable due to data dependence: dependence distance 1. */
+__attribute__((noinline)) void
+f3 (void)
+{
+ int i;
+ for (i = N - 1; i >= 0; i--)
+ {
+ ia[i + 1] = 1;
+ ib[i] = ia[i];
+ }
+}
+
+/* Vectorizable. Dependence distance -1. */
+__attribute__((noinline)) void
+f4 (void)
+{
+ int i;
+ for (i = N - 1; i >= 0; i--)
+ {
+ ia[i] = 1;
+ ib[i] = ia[i + 1];
+ }
+}
+
+/* Vectorizable. Dependence distance -1. */
+__attribute__((noinline)) void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ ia[i + 1] = 1;
+ ia[i] = 2;
+ }
+}
+
+/* Not vectorizable due to data dependence: dependence distance 1. */
+__attribute__((noinline)) void
+f6 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ ia[i] = 1;
+ ia[i + 1] = 2;
+ }
+}
+
+/* Not vectorizable due to data dependence: dependence distance 1. */
+__attribute__((noinline)) void
+f7 (void)
+{
+ int i;
+ for (i = N - 1; i >= 0; i--)
+ {
+ ia[i + 1] = 1;
+ ia[i] = 2;
+ }
+}
+
+/* Vectorizable. Dependence distance -1. */
+__attribute__((noinline)) void
+f8 (void)
+{
+ int i;
+ for (i = N - 1; i >= 0; i--)
+ {
+ ia[i] = 1;
+ ia[i + 1] = 2;
+ }
+}
+
+__attribute__ ((noinline)) int
+main1 (void)
+{
+ int i, j;
+
+ for (j = 0; j < 8; j++)
+ {
+ for (i = 0; i <= N; i++)
+ {
+ ia[i] = i + 3;
+ ib[i] = i + N + 3;
+ asm ("");
+ }
+
+ switch (j)
+ {
+ case 0: f1 (); break;
+ case 1: f2 (); break;
+ case 2: f3 (); break;
+ case 3: f4 (); break;
+ case 4: f5 (); break;
+ case 5: f6 (); break;
+ case 6: f7 (); break;
+ case 7: f8 (); break;
+ }
+
+ for (i = 0; i <= N; i++)
+ {
+ int ea = i + 3;
+ int eb = i + N + 3;
+ switch (j)
+ {
+ case 0:
+ if (i) ea = 1;
+ if (i == 0) eb = 3;
+ else if (i != N) eb = 1;
+ break;
+ case 1:
+ if (i != N) ea = 1;
+ if (i != N) eb = i + 4;
+ break;
+ case 2:
+ if (i) ea = 1;
+ if (i != N) eb = i + 3;
+ break;
+ case 3:
+ if (i != N) ea = 1;
+ if (i < N - 1) eb = 1;
+ else if (i == N - 1) eb = 67;
+ break;
+ case 4:
+ ea = 1 + (i != N);
+ break;
+ case 5:
+ ea = 2 - (i != N);
+ break;
+ case 6:
+ ea = 1 + (i == 0);
+ break;
+ case 7:
+ ea = 2 - (i == 0);
+ break;
+ }
+ if (ia[i] != ea || ib[i] != eb)
+ abort ();
+ }
+ }
+
+ return 0;
+}
+
+int main ()
+{
+ check_vect ();
+
+ return main1 ();
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 4 "vect" {xfail vect_no_align } } } */
+/* { dg-final { scan-tree-dump-times "dependence distance negative" 4 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/nodump-forwprop-22.c b/gcc/testsuite/gcc.dg/vect/nodump-forwprop-22.c
new file mode 100644
index 0000000000..526e70b1b8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/nodump-forwprop-22.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_perm } */
+/* { dg-additional-options "-fdump-tree-copyprop1" } */
+
+typedef double vec __attribute__((vector_size (2 * sizeof (double))));
+void f (vec *px, vec *y, vec *z)
+{
+ vec x = *px;
+ vec t1 = { x[1], x[0] };
+ vec t2 = { x[0], x[1] };
+ *y = t1;
+ *z = t2;
+}
+
+/* Optimization in forwprop1, cleanup in copyprop1. */
+
+/* { dg-final { scan-tree-dump-times "VEC_PERM_EXPR" 1 "copyprop1" } } */
+/* { dg-final { scan-tree-dump-not "BIT_FIELD_REF" "copyprop1" } } */
+/* { dg-final { cleanup-tree-dump "copyprop1" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr18536.c b/gcc/testsuite/gcc.dg/vect/pr18536.c
index 4bf41bec40..6eac90ff14 100644
--- a/gcc/testsuite/gcc.dg/vect/pr18536.c
+++ b/gcc/testsuite/gcc.dg/vect/pr18536.c
@@ -5,7 +5,7 @@
#define N 16
-int main1 (short a, short *b)
+__attribute__ ((noinline)) int main1 (short a, short *b)
{
while (++a < 4) *b++ = 2;
diff --git a/gcc/testsuite/gcc.dg/vect/pr22506.c b/gcc/testsuite/gcc.dg/vect/pr22506.c
index 5a2d74995c..a618e32917 100644
--- a/gcc/testsuite/gcc.dg/vect/pr22506.c
+++ b/gcc/testsuite/gcc.dg/vect/pr22506.c
@@ -7,8 +7,8 @@ void foo()
{
int i;
- for (i=0; i<5; ++i) x[i]=0;
- for (i=0; i<4; ++i) ;
+ for (i=0; i<3; ++i) x[i]=0;
+ for (i=0; i<2; ++i) ;
}
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr34005.c b/gcc/testsuite/gcc.dg/vect/pr34005.c
index 813f950b52..86c38321b6 100644
--- a/gcc/testsuite/gcc.dg/vect/pr34005.c
+++ b/gcc/testsuite/gcc.dg/vect/pr34005.c
@@ -8,7 +8,8 @@ void XdmcpUnwrap (unsigned char *output, int k)
int i;
unsigned char blocks[2][8];
k = (k == 0) ? 1 : 0;
- for (i = 0; i < 32; i++)
+
+ for (i = 0; i < 8; i++)
output[i] = blocks[k][i];
}
diff --git a/gcc/testsuite/gcc.dg/vect/pr48765.c b/gcc/testsuite/gcc.dg/vect/pr48765.c
index 469c4f423c..50839e389c 100644
--- a/gcc/testsuite/gcc.dg/vect/pr48765.c
+++ b/gcc/testsuite/gcc.dg/vect/pr48765.c
@@ -1,5 +1,6 @@
-/* { dg-do compile { target powerpc*-*-* } } */
-/* { dg-options "-m64 -O3 -mcpu=power6" } */
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "do not override -mcpu" { *-*-* } { "-mcpu=*" } { "-mcpu=power6" } } */
+/* { dg-options "-O3 -mcpu=power6" } */
enum reg_class
{
diff --git a/gcc/testsuite/gcc.dg/vect/pr49352.c b/gcc/testsuite/gcc.dg/vect/pr49352.c
index 26f364b0cd..d8e0bae046 100644
--- a/gcc/testsuite/gcc.dg/vect/pr49352.c
+++ b/gcc/testsuite/gcc.dg/vect/pr49352.c
@@ -1,6 +1,7 @@
/* PR tree-optimization/49352 */
/* { dg-do compile } */
/* { dg-options "-O2 -ftree-vectorize -fcompare-debug" } */
+/* { dg-xfail-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
int
foo (int *x, int *y, int n)
diff --git a/gcc/testsuite/gcc.dg/vect/pr51581-1.c b/gcc/testsuite/gcc.dg/vect/pr51581-1.c
new file mode 100644
index 0000000000..d8d61be902
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr51581-1.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/51581 */
+
+#include "tree-vect.h"
+
+#define main main1
+#include "../../gcc.c-torture/execute/pr51581-1.c"
+#undef main
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ asm ("");
+ return main1 ();
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr51581-2.c b/gcc/testsuite/gcc.dg/vect/pr51581-2.c
new file mode 100644
index 0000000000..13b8ba92cf
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr51581-2.c
@@ -0,0 +1,18 @@
+/* PR tree-optimization/51581 */
+
+#include "tree-vect.h"
+
+#define main main1
+#include "../../gcc.c-torture/execute/pr51581-2.c"
+#undef main
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ asm ("");
+ return main1 ();
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr51581-3.c b/gcc/testsuite/gcc.dg/vect/pr51581-3.c
new file mode 100644
index 0000000000..a478136172
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr51581-3.c
@@ -0,0 +1,118 @@
+/* PR tree-optimization/51581 */
+
+#include "tree-vect.h"
+
+int a[8], b[8];
+unsigned int c[8], d[8];
+
+void
+f1 (void)
+{
+ a[0] = b[0] / 8;
+ a[1] = b[1] / 8;
+ a[2] = b[2] / 8;
+ a[3] = b[3] / 8;
+ a[4] = b[4] / 8;
+ a[5] = b[5] / 8;
+ a[6] = b[6] / 8;
+ a[7] = b[7] / 8;
+}
+
+void
+f2 (void)
+{
+ c[0] = d[0] / 3;
+ c[1] = d[1] / 3;
+ c[2] = d[2] / 3;
+ c[3] = d[3] / 3;
+ c[4] = d[4] / 3;
+ c[5] = d[5] / 3;
+ c[6] = d[6] / 3;
+ c[7] = d[7] / 3;
+}
+
+void
+f3 (void)
+{
+ a[0] = b[0] / 8;
+ a[1] = b[1] / 4;
+ a[2] = b[2] / 8;
+ a[3] = b[3] / 4;
+ a[4] = b[4] / 8;
+ a[5] = b[5] / 4;
+ a[6] = b[6] / 8;
+ a[7] = b[7] / 4;
+}
+
+void
+f4 (void)
+{
+ c[0] = d[0] / 3;
+ c[1] = d[1] / 5;
+ c[2] = d[2] / 3;
+ c[3] = d[3] / 5;
+ c[4] = d[4] / 3;
+ c[5] = d[5] / 5;
+ c[6] = d[6] / 3;
+ c[7] = d[7] / 5;
+}
+
+void
+f5 (void)
+{
+ a[0] = b[0] / 14;
+ a[1] = b[1] / 15;
+ a[2] = b[2] / 14;
+ a[3] = b[3] / 15;
+ a[4] = b[4] / 14;
+ a[5] = b[5] / 15;
+ a[6] = b[6] / 14;
+ a[7] = b[7] / 15;
+}
+
+void
+f6 (void)
+{
+ c[0] = d[0] / 6;
+ c[1] = d[1] / 5;
+ c[2] = d[2] / 6;
+ c[3] = d[3] / 5;
+ c[4] = d[4] / 6;
+ c[5] = d[5] / 5;
+ c[6] = d[6] / 13;
+ c[7] = d[7] / 5;
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ asm ("");
+ for (i = 0; i < 8; i++)
+ {
+ asm ("");
+ b[i] = i - 4;
+ d[i] = i - 4;
+ }
+ f1 ();
+ f2 ();
+ for (i = 0; i < 8; i++)
+ if (a[i] != b[i] / 8 || c[i] != d[i] / 3)
+ abort ();
+ f3 ();
+ f4 ();
+ for (i = 0; i < 8; i+= 2)
+ if (a[i] != b[i] / 8 || a[i + 1] != b[i + 1] / 4
+ || c[i] != d[i] / 3 || c[i + 1] != d[i + 1] / 5)
+ abort ();
+ f5 ();
+ f6 ();
+ for (i = 0; i < 8; i+= 2)
+ if (a[i] != b[i] / 14 || a[i + 1] != b[i + 1] / 15
+ || c[i] != d[i] / (i == 6 ? 13 : 6) || c[i + 1] != d[i + 1] / 5)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr51581-4.c b/gcc/testsuite/gcc.dg/vect/pr51581-4.c
new file mode 100644
index 0000000000..f48ec6b593
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr51581-4.c
@@ -0,0 +1,166 @@
+/* PR tree-optimization/51581 */
+
+#include "tree-vect.h"
+
+short int a[16], b[16];
+unsigned short int c[16], d[16];
+
+void
+f1 (void)
+{
+ a[0] = b[0] / 8;
+ a[1] = b[1] / 8;
+ a[2] = b[2] / 8;
+ a[3] = b[3] / 8;
+ a[4] = b[4] / 8;
+ a[5] = b[5] / 8;
+ a[6] = b[6] / 8;
+ a[7] = b[7] / 8;
+ a[8] = b[8] / 8;
+ a[9] = b[9] / 8;
+ a[10] = b[10] / 8;
+ a[11] = b[11] / 8;
+ a[12] = b[12] / 8;
+ a[13] = b[13] / 8;
+ a[14] = b[14] / 8;
+ a[15] = b[15] / 8;
+}
+
+void
+f2 (void)
+{
+ c[0] = d[0] / 3;
+ c[1] = d[1] / 3;
+ c[2] = d[2] / 3;
+ c[3] = d[3] / 3;
+ c[4] = d[4] / 3;
+ c[5] = d[5] / 3;
+ c[6] = d[6] / 3;
+ c[7] = d[7] / 3;
+ c[8] = d[8] / 3;
+ c[9] = d[9] / 3;
+ c[10] = d[10] / 3;
+ c[11] = d[11] / 3;
+ c[12] = d[12] / 3;
+ c[13] = d[13] / 3;
+ c[14] = d[14] / 3;
+ c[15] = d[15] / 3;
+}
+
+void
+f3 (void)
+{
+ a[0] = b[0] / 8;
+ a[1] = b[1] / 4;
+ a[2] = b[2] / 8;
+ a[3] = b[3] / 4;
+ a[4] = b[4] / 8;
+ a[5] = b[5] / 4;
+ a[6] = b[6] / 8;
+ a[7] = b[7] / 4;
+ a[8] = b[8] / 8;
+ a[9] = b[9] / 4;
+ a[10] = b[10] / 8;
+ a[11] = b[11] / 4;
+ a[12] = b[12] / 8;
+ a[13] = b[13] / 4;
+ a[14] = b[14] / 8;
+ a[15] = b[15] / 4;
+}
+
+void
+f4 (void)
+{
+ c[0] = d[0] / 3;
+ c[1] = d[1] / 5;
+ c[2] = d[2] / 3;
+ c[3] = d[3] / 5;
+ c[4] = d[4] / 3;
+ c[5] = d[5] / 5;
+ c[6] = d[6] / 3;
+ c[7] = d[7] / 5;
+ c[8] = d[8] / 3;
+ c[9] = d[9] / 5;
+ c[10] = d[10] / 3;
+ c[11] = d[11] / 5;
+ c[12] = d[12] / 3;
+ c[13] = d[13] / 5;
+ c[14] = d[14] / 3;
+ c[15] = d[15] / 5;
+}
+
+void
+f5 (void)
+{
+ a[0] = b[0] / 14;
+ a[1] = b[1] / 15;
+ a[2] = b[2] / 14;
+ a[3] = b[3] / 15;
+ a[4] = b[4] / 14;
+ a[5] = b[5] / 15;
+ a[6] = b[6] / 14;
+ a[7] = b[7] / 15;
+ a[8] = b[8] / 14;
+ a[9] = b[9] / 15;
+ a[10] = b[10] / 14;
+ a[11] = b[11] / 15;
+ a[12] = b[12] / 14;
+ a[13] = b[13] / 15;
+ a[14] = b[14] / 14;
+ a[15] = b[15] / 15;
+}
+
+void
+f6 (void)
+{
+ c[0] = d[0] / 6;
+ c[1] = d[1] / 5;
+ c[2] = d[2] / 6;
+ c[3] = d[3] / 5;
+ c[4] = d[4] / 6;
+ c[5] = d[5] / 5;
+ c[6] = d[6] / 13;
+ c[7] = d[7] / 5;
+ c[8] = d[8] / 6;
+ c[9] = d[9] / 5;
+ c[10] = d[10] / 6;
+ c[11] = d[11] / 5;
+ c[12] = d[12] / 6;
+ c[13] = d[13] / 5;
+ c[14] = d[14] / 13;
+ c[15] = d[15] / 5;
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ asm ("");
+ for (i = 0; i < 16; i++)
+ {
+ asm ("");
+ b[i] = i - 8;
+ d[i] = i - 8;
+ }
+ f1 ();
+ f2 ();
+ for (i = 0; i < 16; i++)
+ if (a[i] != b[i] / 8 || c[i] != d[i] / 3)
+ abort ();
+ f3 ();
+ f4 ();
+ for (i = 0; i < 16; i+= 2)
+ if (a[i] != b[i] / 8 || a[i + 1] != b[i + 1] / 4
+ || c[i] != d[i] / 3 || c[i + 1] != d[i + 1] / 5)
+ abort ();
+ f5 ();
+ f6 ();
+ for (i = 0; i < 16; i+= 2)
+ if (a[i] != b[i] / 14 || a[i + 1] != b[i + 1] / 15
+ || c[i] != d[i] / ((i & 7) == 6 ? 13 : 6) || c[i + 1] != d[i + 1] / 5)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr53185-2.c b/gcc/testsuite/gcc.dg/vect/pr53185-2.c
new file mode 100644
index 0000000000..2f9ea16ea9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr53185-2.c
@@ -0,0 +1,27 @@
+void __attribute__((noinline,noclone))
+fn1 (int * __restrict f, int * __restrict d, unsigned short a, int c)
+{
+ unsigned short e;
+ for (e = 0; e < a; ++e)
+ f[e] = d[e * c];
+}
+
+extern void abort (void);
+
+int main ()
+{
+ int a[32], b[3 * 32];
+ int i, off;
+ for (i = 0; i < 3 * 32; ++i)
+ b[i] = i;
+ for (off = 0; off < 8; ++off)
+ {
+ fn1 (&a[off], &b[off], 32 - off, 3);
+ for (i = 0; i < 32 - off; ++i)
+ if (a[off+i] != b[off+i*3])
+ abort ();
+ }
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr53185.c b/gcc/testsuite/gcc.dg/vect/pr53185.c
new file mode 100644
index 0000000000..af1efba8d6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr53185.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ftree-vectorize" } */
+unsigned short a, e;
+int *b, *d;
+int c;
+extern int fn2();
+void fn1 () {
+ void *f;
+ for (;;) {
+ fn2 ();
+ b = f;
+ e = 0;
+ for (; e < a; ++e)
+ b[e] = d[e * c];
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr53773.c b/gcc/testsuite/gcc.dg/vect/pr53773.c
new file mode 100644
index 0000000000..1c9e468f5f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr53773.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-optimized" } */
+
+int
+foo (int integral, int decimal, int power_ten)
+{
+ while (power_ten > 0)
+ {
+ integral *= 10;
+ decimal *= 10;
+ power_ten--;
+ }
+
+ return integral+decimal;
+}
+
+/* { dg-final { scan-tree-dump-times "\\* 10" 2 "optimized" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/pr55857-1.c b/gcc/testsuite/gcc.dg/vect/pr55857-1.c
new file mode 100644
index 0000000000..ad41d30432
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr55857-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+
+void
+foo (int *data, unsigned len, const int qlp_coeff[], int lp, int residual[])
+{
+ int i;
+ int sum;
+ for(i = 0; i < (int)len; i++)
+ {
+ sum = 0;
+ sum += qlp_coeff[1] * data[i-2];
+ sum += qlp_coeff[0] * data[i-1];
+ residual[i] = data[i] - (sum >> lp);
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr55857-2.c b/gcc/testsuite/gcc.dg/vect/pr55857-2.c
new file mode 100644
index 0000000000..3bfff82479
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr55857-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+
+void foo (int *data, unsigned len, const int qlp_coeff[],
+ unsigned order, int lp, int residual[])
+{
+ int i;
+ int sum;
+ if(order == 2)
+ for(i = 0; i < (int)len; i++)
+ {
+ sum = 0;
+ sum += qlp_coeff[1] * data[i-2];
+ sum += qlp_coeff[0] * data[i-1];
+ residual[i] = data[i] - (sum >> lp);
+ }
+ else
+ for(i = 0; i < (int)len; i++)
+ residual[i] = data[i] - ((qlp_coeff[0] * data[i-1]) >> lp);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56695.c b/gcc/testsuite/gcc.dg/vect/pr56695.c
new file mode 100644
index 0000000000..8b997c2990
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56695.c
@@ -0,0 +1,14 @@
+/* PR tree-optimization/56695 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize" } */
+
+int a, b, i;
+
+void
+f (void)
+{
+ for (i = 0; i < 8; ++i)
+ a |= !(i |= b %= 1);
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56787.c b/gcc/testsuite/gcc.dg/vect/pr56787.c
new file mode 100644
index 0000000000..77fe4d80a2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56787.c
@@ -0,0 +1,35 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+
+inline void
+bar (const float s[5], float z[3][5])
+{
+ float a = s[0], b = s[1], c = s[2], d = s[3], e = s[4];
+ float f = a;
+ float u = f * b, v = f * c, w = f * d;
+ float p = 0.4f * (e - 0.5f * (b * u + c * v + d * w));
+ z[0][3] = b * w;
+ z[1][3] = c * w;
+ z[2][3] = d * w + p;
+}
+
+void
+foo (unsigned long n, const float *__restrict u0,
+ const float *__restrict u1, const float *__restrict u2,
+ const float *__restrict u3, const float *__restrict u4,
+ const float *__restrict s0, const float *__restrict s1,
+ const float *__restrict s2, float *__restrict t3,
+ float *__restrict t4)
+{
+ unsigned long i;
+ for (i = 0; i < n; i++)
+ {
+ float u[5], f[3][5];
+ u[0] = u0[i]; u[1] = u1[i]; u[2] = u2[i]; u[3] = u3[i]; u[4] = u4[i];
+ bar (u, f);
+ t3[i] = s0[i] * f[0][3] + s1[i] * f[1][3] + s2[i] * f[2][3];
+ }
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" { xfail vect_no_align } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56826.c b/gcc/testsuite/gcc.dg/vect/pr56826.c
new file mode 100644
index 0000000000..7a5c5ff400
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56826.c
@@ -0,0 +1,41 @@
+extern void abort (void);
+
+typedef struct {
+ int a[3];
+ int num;
+} t1;
+t1 B[100];
+int A[300];
+
+void __attribute__((noinline,noclone))
+bar (int *A, t1 *B, int n)
+{
+ int i;
+ int *a = A;
+ for (i=0; i<n; i++, a+=3)
+ {
+ a[0] = B[i].a[0];
+ a[1] = B[i].a[1];
+ a[2] = B[i].a[2];
+ }
+}
+
+int main()
+{
+ int i;
+ for (i=0; i<100; i++)
+ {
+ B[i].num = i;
+ B[i].a[0] = i * 3;
+ B[i].a[1] = i * 3 + 1;
+ B[i].a[2] = i * 3 + 2;
+ __asm__ volatile ("");
+ }
+ bar (&A[0], &B[0], 100);
+ for (i=0; i<300; i++)
+ if (A[i] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56918.c b/gcc/testsuite/gcc.dg/vect/pr56918.c
new file mode 100644
index 0000000000..581faa0e22
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56918.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/56918 */
+/* { dg-additional-options "-O3" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+double data[8];
+
+__attribute__((noinline, noclone)) void
+foo ()
+{
+ int i;
+ for (i = 0; i < 8; ++i)
+ data[i] = ((i + 2) % 3) + 1;
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ foo ();
+ if (data[0] != 3 || data[7] != 1)
+ abort ();
+ for (i = 1; i < 4; ++i)
+ if (data[i] != i || data[i + 3] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56920.c b/gcc/testsuite/gcc.dg/vect/pr56920.c
new file mode 100644
index 0000000000..c6c7cca0f4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56920.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/56920 */
+/* { dg-additional-options "-O3" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+int
+main ()
+{
+ unsigned int a[15], i;
+ check_vect ();
+ for (i = 0; i < 15; ++i)
+ a[i] = (i * 2) % 15;
+ for (i = 0; i < 15; ++i)
+ if (a[i] != (i * 2) % 15)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr56933.c b/gcc/testsuite/gcc.dg/vect/pr56933.c
new file mode 100644
index 0000000000..b5e56fbddc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr56933.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vect_double } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+void __attribute__((noinline,noclone))
+foo (double *b, double *d, double *f)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ d[2*i] = 2. * d[2*i];
+ d[2*i+1] = 4. * d[2*i+1];
+ b[i] = d[2*i] - 1.;
+ f[i] = d[2*i+1] + 2.;
+ }
+}
+int main()
+{
+ double b[1024], d[2*1024], f[1024];
+ int i;
+
+ check_vect ();
+
+ for (i = 0; i < 2*1024; i++)
+ d[i] = 1.;
+ foo (b, d, f);
+ for (i = 0; i < 1024; i+= 2)
+ {
+ if (d[2*i] != 2.)
+ abort ();
+ if (d[2*i+1] != 4.)
+ abort ();
+ }
+ for (i = 0; i < 1024; i++)
+ {
+ if (b[i] != 1.)
+ abort ();
+ if (f[i] != 6.)
+ abort ();
+ }
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr57705.c b/gcc/testsuite/gcc.dg/vect/pr57705.c
new file mode 100644
index 0000000000..ca8f690205
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr57705.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vect_int } */
+
+#include "tree-vect.h"
+
+int a[1024];
+unsigned char b[1024];
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) void
+foo (int k, int m)
+{
+ int i, k2 = k;
+ for (i = 0; i < 1024; i++)
+ {
+ a[i] = k2;
+ k2 += m + 1;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+bar (int k, int m)
+{
+ int i, k2 = k;
+ for (i = 0; i < 1024; i++)
+ {
+ k2 += m + 1;
+ a[i] = k2;
+ }
+}
+
+__attribute__((noinline, noclone)) void
+baz (int k, int m)
+{
+ int i, k2 = k;
+ for (i = 0; i < 1024; i++)
+ {
+ a[i] = k2;
+ b[i] = i;
+ k2 += m + 1;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ foo (5, 3);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != 5 + 4 * i)
+ abort ();
+ bar (5, 3);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != 9 + 4 * i)
+ abort ();
+ baz (5, 3);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != 5 + 4 * i || b[i] != (unsigned char) i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 3 "vect" { target vect_pack_trunc } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 2 "vect" { target { ! vect_pack_trunc } } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr57741-1.c b/gcc/testsuite/gcc.dg/vect/pr57741-1.c
new file mode 100644
index 0000000000..780f870e31
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr57741-1.c
@@ -0,0 +1,21 @@
+/* PR tree-optimization/57741 */
+/* { dg-do compile } */
+
+void
+foo (float *p, float *q, float x)
+{
+ int i;
+ float f = 1.0f, g = 2.0f;
+ for (i = 0; i < 1024; i++)
+ {
+ *p++ = f;
+ f += x;
+ }
+ for (i = 0; i < 1024; i++)
+ {
+ *q++ = g;
+ g += 0.5f;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr57741-2.c b/gcc/testsuite/gcc.dg/vect/pr57741-2.c
new file mode 100644
index 0000000000..2b1151ef2c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr57741-2.c
@@ -0,0 +1,45 @@
+/* PR tree-optimization/57741 */
+/* { dg-do run } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-additional-options "-ffast-math" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+__attribute__((noinline, noclone)) void
+foo (float *p, float *q, float x)
+{
+ int i;
+ p = (float *) __builtin_assume_aligned (p, 32);
+ q = (float *) __builtin_assume_aligned (q, 32);
+ float f = 1.0f, g = 2.0f;
+ for (i = 0; i < 1024; i++)
+ {
+ *p++ = f;
+ f += x;
+ }
+ for (i = 0; i < 1024; i++)
+ {
+ *q++ = g;
+ g += 0.5f;
+ }
+}
+
+float p[1024] __attribute__((aligned (32))) = { 17.0f };
+float q[1024] __attribute__((aligned (32))) = { 17.0f };
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ foo (p, q, 1.5f);
+ for (i = 0; i < 1024; i++)
+ if (p[i] != 1.0f + i * 1.5f || q[i] != 2.0f + i * 0.5f)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 2 loop" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr57741-3.c b/gcc/testsuite/gcc.dg/vect/pr57741-3.c
new file mode 100644
index 0000000000..b0281765b2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr57741-3.c
@@ -0,0 +1,44 @@
+/* PR tree-optimization/57741 */
+/* { dg-do run } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-ffast-math" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+float p[1024] __attribute__((aligned (32))) = { 17.0f };
+float q[1024] __attribute__((aligned (32))) = { 17.0f };
+char r[1024] __attribute__((aligned (32))) = { 1 };
+
+__attribute__((noinline, noclone)) void
+foo (float x)
+{
+ int i;
+ float f = 1.0f, g = 2.0f;
+ for (i = 0; i < 1024; i++)
+ {
+ p[i] = f;
+ f += x;
+ q[i] = g;
+ g += 0.5f;
+ r[i]++;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ r[0] = 0;
+ foo (1.5f);
+ for (i = 0; i < 1024; i++)
+ if (p[i] != 1.0f + i * 1.5f || q[i] != 2.0f + i * 0.5f || r[i] != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loop" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr58508.c b/gcc/testsuite/gcc.dg/vect/pr58508.c
new file mode 100644
index 0000000000..80ba9cc1d5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr58508.c
@@ -0,0 +1,71 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+
+/* The GCC vectorizer generates loop versioning for the following loop
+ since there may exist aliasing between A and B. The predicate checks
+ if A may alias with B across all iterations. Then for the loop in
+ the true body, we can assert that *B is a loop invariant so that
+ we can hoist the load of *B before the loop body. */
+
+void test1 (int* a, int* b)
+{
+ int i;
+ for (i = 0; i < 100000; ++i)
+ a[i] = *b + 1;
+}
+
+/* A test case with nested loops. The load of b[j+1] in the inner
+ loop should be hoisted. */
+
+void test2 (int* a, int* b)
+{
+ int i, j;
+ for (j = 0; j < 100000; ++j)
+ for (i = 0; i < 100000; ++i)
+ a[i] = b[j+1] + 1;
+}
+
+/* A test case with ifcvt transformation. */
+
+void test3 (int* a, int* b)
+{
+ int i, t;
+ for (i = 0; i < 10000; ++i)
+ {
+ if (*b > 0)
+ t = *b * 2;
+ else
+ t = *b / 2;
+ a[i] = t;
+ }
+}
+
+/* A test case in which the store in the loop can be moved outside
+ in the versioned loop with alias checks. Note this loop won't
+ be vectorized. */
+
+void test4 (int* a, int* b)
+{
+ int i;
+ for (i = 0; i < 100000; ++i)
+ *a += b[i];
+}
+
+/* A test case in which the load and store in the loop to b
+ can be moved outside in the versioned loop with alias checks.
+ Note this loop won't be vectorized. */
+
+void test5 (int* a, int* b)
+{
+ int i;
+ for (i = 0; i < 100000; ++i)
+ {
+ *b += a[i];
+ a[i] = *b;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "hoist" 8 "vect" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "hoist" 3 "vect" { xfail vect_no_align } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59519-1.c b/gcc/testsuite/gcc.dg/vect/pr59519-1.c
new file mode 100644
index 0000000000..428d4ec32e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59519-1.c
@@ -0,0 +1,19 @@
+/* PR tree-optimization/59519 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+int a, b, c, d;
+
+void
+foo (void)
+{
+ for (; d; d++)
+ for (b = 0; b < 14; b++)
+ {
+ c |= 1;
+ if (a)
+ break;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59519-2.c b/gcc/testsuite/gcc.dg/vect/pr59519-2.c
new file mode 100644
index 0000000000..2b109d2557
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59519-2.c
@@ -0,0 +1,20 @@
+/* PR tree-optimization/59519 */
+/* { dg-do compile } */
+/* { dg-additional-options "-O3" } */
+
+struct S { int f0; } d;
+int a[8] = { 0 }, b, c, e;
+
+void
+foo (void)
+{
+ for (; e < 1; e++)
+ for (b = 0; b < 7; b++)
+ {
+ c |= (a[b + 1] != 0);
+ if (d.f0)
+ break;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59591-1.c b/gcc/testsuite/gcc.dg/vect/pr59591-1.c
new file mode 100644
index 0000000000..b216deea91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59591-1.c
@@ -0,0 +1,55 @@
+/* PR tree-optimization/59591 */
+/* { dg-do run } */
+/* { dg-additional-options "-fopenmp-simd" } */
+
+#ifndef CHECK_H
+#include "tree-vect.h"
+#endif
+
+extern void abort (void);
+
+int p[256], q[256], r[256], t[256];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ #pragma omp simd safelen(64)
+ for (i = 0; i < 256; i++)
+ if (r[i] > 32)
+ t[i] = p[q[i] * 3L + 2L];
+}
+
+__attribute__((noinline, noclone)) void
+bar (void)
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ {
+ r[i] = ((i >> 2) & (1 << (i & 3))) ? 32 + i : 32 - i;
+ q[i] = r[i] > 32 ? ((i * 7) % 84) : 99 + i;
+ p[i] = i * 11;
+ t[i] = i * 13;
+ }
+ foo ();
+ for (i = 0; i < 256; i++)
+ if ((i >> 2) & (1 << (i & 3)))
+ {
+ if (t[i] != (((i * 7) % 84) * 3 + 2) * 11)
+ abort ();
+ }
+ else if (t[i] != i * 13)
+ abort ();
+}
+
+#ifndef CHECK_H
+int
+main ()
+{
+ check_vect ();
+ bar ();
+ return 0;
+}
+#endif
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59591-2.c b/gcc/testsuite/gcc.dg/vect/pr59591-2.c
new file mode 100644
index 0000000000..429b187bf2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59591-2.c
@@ -0,0 +1,56 @@
+/* PR tree-optimization/59591 */
+/* { dg-do run } */
+/* { dg-additional-options "-fopenmp-simd" } */
+
+#ifndef CHECK_H
+#include "tree-vect.h"
+#endif
+
+extern void abort (void);
+
+long long int p[256], r[256], t[256];
+int q[256];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ #pragma omp simd safelen(64)
+ for (i = 0; i < 256; i++)
+ if (r[i] > 32LL)
+ t[i] = p[q[i]];
+}
+
+__attribute__((noinline, noclone)) void
+bar (void)
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ {
+ r[i] = ((i >> 2) & (1 << (i & 3))) ? 32 + i : 32 - i;
+ q[i] = r[i] > 32 ? ((i * 7) % 256) : 258 + i;
+ p[i] = i * 11;
+ t[i] = i * 13;
+ }
+ foo ();
+ for (i = 0; i < 256; i++)
+ if ((i >> 2) & (1 << (i & 3)))
+ {
+ if (t[i] != ((i * 7) % 256) * 11)
+ abort ();
+ }
+ else if (t[i] != i * 13)
+ abort ();
+}
+
+#ifndef CHECK_H
+int
+main ()
+{
+ check_vect ();
+ bar ();
+ return 0;
+}
+#endif
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59594.c b/gcc/testsuite/gcc.dg/vect/pr59594.c
new file mode 100644
index 0000000000..14a86ed2d9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59594.c
@@ -0,0 +1,31 @@
+/* PR tree-optimization/59594 */
+
+#include "tree-vect.h"
+
+#define N 1024
+int b[N + 2];
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ for (i = 0; i < N + 1; i++)
+ {
+ b[i] = i;
+ asm ("");
+ }
+ for (i = N; i >= 0; i--)
+ {
+ b[i + 1] = b[i];
+ b[i] = 1;
+ }
+ if (b[0] != 1)
+ __builtin_abort ();
+ for (i = 0; i < N; i++)
+ if (b[i + 1] != i)
+ __builtin_abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59651.c b/gcc/testsuite/gcc.dg/vect/pr59651.c
new file mode 100644
index 0000000000..4407785aab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59651.c
@@ -0,0 +1,4 @@
+/* PR tree-optimization/59561 */
+#include "../torture/pr59651.c"
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr59984.c b/gcc/testsuite/gcc.dg/vect/pr59984.c
new file mode 100644
index 0000000000..1b95942955
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr59984.c
@@ -0,0 +1,65 @@
+/* PR c/59984 */
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+
+#include "tree-vect.h"
+
+#define N 128
+
+int a[N];
+
+#pragma omp declare simd
+__attribute__((noinline)) void
+foo (int in, int *out1, int *out2)
+{
+ *out1 = in * in - 1;
+ *out2 = in * in + 1;
+}
+
+#pragma omp declare simd linear (out1, out2)
+__attribute__((noinline)) void
+bar (int in, int *out1, int *out2)
+{
+ *out1 = in * in - 1;
+ *out2 = in * in + 1;
+}
+
+__attribute__((noinline)) void
+test (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ a[i] = i;
+#pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ int v1, v2;
+ foo (a[i], &v1, &v2);
+ a[i] = v1 * v2;
+ }
+ for (i = 0; i < N; i++)
+ if (a[i] != i * i * i * i - 1)
+ __builtin_abort ();
+ for (i = 0; i < N; i++)
+ a[i] = i;
+#pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ int v1, v2;
+ bar (a[i], &v1, &v2);
+ a[i] = v1 * v2;
+ }
+ for (i = 0; i < N; i++)
+ if (a[i] != i * i * i * i - 1)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ check_vect ();
+ test ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60012.c b/gcc/testsuite/gcc.dg/vect/pr60012.c
new file mode 100644
index 0000000000..bd0f37c2b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60012.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param vect-max-version-for-alias-checks=0" } */
+
+typedef struct
+{
+ short real;
+ short imag;
+} complex16_t;
+
+void
+libvector_AccSquareNorm_ref (unsigned int *acc,
+ const complex16_t *x, unsigned len)
+{
+ unsigned i;
+ for (i = 0; i < len; i++)
+ acc[i] += ((unsigned int)((int)x[i].real * x[i].real))
+ + ((unsigned int)((int)x[i].imag * x[i].imag));
+}
+
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" { target { vect_extract_even_odd } } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60092-2.c b/gcc/testsuite/gcc.dg/vect/pr60092-2.c
new file mode 100644
index 0000000000..7d2eb6e80e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60092-2.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int *foo (int n)
+{
+ int *p;
+ int *q;
+ void *tem;
+ if (posix_memalign (&tem, 256, n * sizeof (int)) != 0)
+ return (void *)0;
+ p = (int *)tem;
+ if (posix_memalign (&tem, 256, n * sizeof (int)) != 0)
+ return (void *)0;
+ q = (int *)tem;
+ bar (q);
+ int i;
+ for (i = 0; i < n; ++i)
+ p[i] = q[i] + q[i];
+ return p;
+}
+
+/* { dg-final { scan-tree-dump "LOOP VECTORIZED" "vect" } } */
+/* { dg-final { scan-tree-dump-not "Peeling for alignment will be applied" "vect" } } */
+/* { dg-final { scan-tree-dump-not "Vectorizing an unaligned access" "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60196-1.c b/gcc/testsuite/gcc.dg/vect/pr60196-1.c
new file mode 100644
index 0000000000..10ed4afebd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60196-1.c
@@ -0,0 +1,34 @@
+/* PR tree-optimization/63189 */
+/* { dg-additional-options "-fwrapv" } */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+__attribute__((noinline, noclone)) static int
+bar (const short *a, int len)
+{
+ int x;
+ int x1 = 0;
+
+ for (x = 0; x < len; x++)
+ x1 += x * a[x];
+ return x1;
+}
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ short stuff[9] = {1, 1, 1, 1, 1, 1, 1, 1, 1 };
+ if (bar (stuff, 9) != 36)
+ abort ();
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60196-2.c b/gcc/testsuite/gcc.dg/vect/pr60196-2.c
new file mode 100644
index 0000000000..b2059c20cd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60196-2.c
@@ -0,0 +1,33 @@
+/* PR tree-optimization/63189 */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+static const short a[8] = {1, 1, 1, 1, 1, 1, 1, 1 };
+static const unsigned char b[8] = {0, 0, 0, 0, 0, 0, 0, 0 };
+
+__attribute__((noinline, noclone)) static int
+bar (void)
+{
+ int sum = 0, i;
+ for (i = 0; i < 8; ++i)
+ sum += a[i] * b[i];
+ return sum;
+}
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ if (bar () != 0)
+ abort ();
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60276.c b/gcc/testsuite/gcc.dg/vect/pr60276.c
new file mode 100644
index 0000000000..d4ad219806
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60276.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+static void
+foo (int *out, const int *lp, unsigned samples)
+{
+ int x, target;
+ for (x = 0, target = 0; x < (int)samples; x += 2, target++)
+ {
+ out[x] = lp[target];
+ out[x - 1] = out[x - 2] + out[x];
+ }
+}
+
+static void
+foo_novec (int *out, const int *lp, unsigned samples)
+{
+ int x, target;
+ for (x = 0, target = 0; x < (int)samples; x += 2, target++)
+ {
+ out[x] = lp[target];
+ out[x - 1] = out[x - 2] + out[x];
+ __asm__ volatile ("" : : : "memory");
+ }
+}
+
+int main(void)
+{
+ const int lp[25] = {
+ 0, 2, 4, 6, 8,
+ 10, 12, 14, 16,
+ 18, 20, 22, 24,
+ 26, 28, 30, 32,
+ 34, 36, 38, 40,
+ 42, 44, 46, 48,
+ };
+ int out[49] = {0};
+ int out2[49] = {0};
+ int s;
+
+ foo (out + 2, lp + 1, 48);
+ foo_novec (out2 + 2, lp + 1, 48);
+
+ for (s = 0; s < 49; s++)
+ if (out[s] != out2[s])
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60382.c b/gcc/testsuite/gcc.dg/vect/pr60382.c
new file mode 100644
index 0000000000..a28c6313c4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60382.c
@@ -0,0 +1,32 @@
+#include "tree-vect.h"
+
+int a, b, c, e, f;
+
+void
+foo ()
+{
+ for (b = 0; b < 3; b++)
+ if (e)
+ {
+ for (c = 0; c < 4; c++)
+ {
+ if (b)
+ continue;
+ f = 1;
+ for (a = 0; a < 2; a++)
+ f |= 1;
+ }
+ for (;;)
+ ;
+ }
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60482.c b/gcc/testsuite/gcc.dg/vect/pr60482.c
new file mode 100644
index 0000000000..78821183c6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60482.c
@@ -0,0 +1,20 @@
+/* PR middle-end/60482 */
+/* { dg-do compile } */
+/* { dg-additional-options "-Ofast" } */
+/* { dg-require-effective-target vect_int } */
+
+double
+foo (double *x, int n)
+{
+ double p = 0.0;
+ int i;
+ x = __builtin_assume_aligned (x, 128);
+ if (n % 128)
+ __builtin_unreachable ();
+ for (i = 0; i < n; i++)
+ p += x[i];
+ return p;
+}
+
+/* { dg-final { scan-tree-dump-not "epilog loop required" "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60505.c b/gcc/testsuite/gcc.dg/vect/pr60505.c
new file mode 100644
index 0000000000..70e2ec06fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60505.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-Wall -Werror" } */
+
+void foo(char *in, char *out, int num)
+{
+ int i;
+ char ovec[16] = {0};
+
+ for(i = 0; i < num ; ++i)
+ out[i] = (ovec[i] = in[i]);
+ out[num] = ovec[num/2];
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60656.c b/gcc/testsuite/gcc.dg/vect/pr60656.c
new file mode 100644
index 0000000000..4950275fb8
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60656.c
@@ -0,0 +1,47 @@
+/* { dg-require-effective-target vect_int } */
+/* { dg-require-effective-target vect_long } */
+
+#include "tree-vect.h"
+
+__attribute__ ((noinline)) long
+foo ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P * P * P;
+ }
+ return s;
+}
+
+long
+bar ()
+{
+ int v[] = {5000, 5001, 5002, 5003};
+ long s = 0;
+ int i;
+
+ for(i = 0; i < 4; ++i)
+ {
+ long P = v[i];
+ s += P * P * P;
+ __asm__ volatile ("");
+ }
+ return s;
+}
+
+int main()
+{
+ check_vect ();
+
+ if (foo () != bar ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_widen_mult_si_to_di_pattern } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr60841.c b/gcc/testsuite/gcc.dg/vect/pr60841.c
new file mode 100644
index 0000000000..44b5d01916
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr60841.c
@@ -0,0 +1,183 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-ffast-math" } */
+
+/* This testcase shouldn't consume much memory or produce a 1GB vectorizer
+ dump file due to SLP tree explosion. */
+
+struct S { int f1, f2, f3, f4; } a;
+struct T { short f3, f2, f1, f4; };
+int b, c, d, e, f, g;
+unsigned long z;
+
+void
+foo (struct T *p, struct T *q, int x, int w)
+{
+ for (; x; x++)
+ {
+ struct S h;
+ int i;
+ struct T j;
+ struct T *r;
+ h = a;
+ g = 0;
+ r = p + 2 * (c + 4) + 1;
+ j = *r;
+ r = p;
+ f = r->f1 - 1;
+ b = +1.0 + f * f;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b += 1.0 - i * f * f;
+ f = r->f4 - 1;
+ if (b)
+ b += -1.0 - i * f;
+ if (b / w)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g = 1;
+ }
+ r++;
+ f = r->f1;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b += 1.0 - i * f * f;
+ i = (r->f4);
+ if (b * 65535UL / w)
+ {
+ h.f1 += 10.0 * r->f1;
+ h.f2 += 10.0 * r->f2;
+ h.f3 += 10.0 * r->f3;
+ h.f4 += 10.0 * r->f4;
+ g += 10.0;
+ }
+ r++;
+ f = r->f1;
+ z = 5UL * i;
+ f = r->f2;
+ i = (r->f3 + j.f3) / 2;
+ b = -i * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r++;
+ f = r->f1 - j.f1;
+ b = 1 * 2.0 * i * f * f;
+ f = r->f2;
+ b += 4.0 * f;
+ i = r->f3 / 2;
+ f = r->f4 - 1;
+ if (b * 1)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ b = 4.0 * 1 * f;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 20.0 * r->f1;
+ h.f2 += 20.0 * r->f2;
+ h.f3 += 20.0 * r->f3;
+ h.f4 += 20.0 * r->f4;
+ g += 20.0;
+ }
+ b = 5 * (0.0 - i);
+ if (b < 0)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r = p + 2 * (c + 4);
+ i = (r->f1 + j.f1);
+ b = 1 * 2.0 * i * 1;
+ f = r->f2 - 1;
+ i = (r->f3 + j.f3) / 2;
+ b = 5 * (0.0 - i) * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 10.0 * r->f1;
+ h.f2 += 10.0 * r->f2;
+ h.f3 += 10.0 * r->f3;
+ h.f4 += 10.0 * r->f4;
+ g += 10.0;
+ }
+ r++;
+ f = r->f1;
+ b = 5UL * i * f;
+ i = (r->f2 + j.f2) / 2;
+ f = r->f3 - 1;
+ b = 5 * (0.0 - i) * f * f;
+ f = r->f4 - 1;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 40.0 * r->f1;
+ h.f2 += 40.0 * r->f2;
+ h.f3 += 40.0 * r->f3;
+ h.f4 += 40.0 * r->f4;
+ g += 40.0;
+ }
+ r++;
+ i = (r->f1 + j.f1);
+ b = 5 * i * f;
+ f = r->f2;
+ b = 4.0 * f * f;
+ f = r->f3;
+ i = (r->f4 + j.f4) / 2;
+ b = 5 * (0.0 - i) * f * f;
+ if (b * 25.0f)
+ {
+ h.f1 += 8.0 * r->f1;
+ h.f2 += 8.0 * r->f2;
+ h.f3 += 8.0 * r->f3;
+ h.f4 += 8.0 * r->f4;
+ g += 8.0;
+ }
+ r = p + 4 * (c + 4);
+ i = r->f1 / 2;
+ b = 5 * (1.0 + i);
+ i = r->f2 + j.f2;
+ f = r->f3 - 1;
+ b = 5 * (0.0 - i) * f * f;
+ i = (r->f4 + j.f4) / 2;
+ if (b * 65535UL / 25.0f)
+ {
+ h.f1 += 5.0 * r->f1;
+ h.f2 += 5.0 * r->f2;
+ h.f3 += 5.0 * r->f3;
+ h.f4 += 5.0 * r->f4;
+ g += 5.0;
+ }
+ b = 5 * (1.0 + i);
+ if (b < 0)
+ {
+ h.f1 += 5.0 * r->f1;
+ h.f2 += 5.0 * r->f2;
+ h.f3 += 5.0 * r->f3;
+ h.f4 += 5.0 * r->f4;
+ g += 5.0;
+ }
+ q->f1 = (h.f1 + g / 2 - 1) / g;
+ q->f2 = (h.f2 + g / 2 - 1) / g;
+ q->f3 = (h.f3 + g / 2 - 1) / g;
+ q->f4 = (h.f4 + g / 2 - 1) / g;
+ p++;
+ q++;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr61680.c b/gcc/testsuite/gcc.dg/vect/pr61680.c
new file mode 100644
index 0000000000..605a651aa3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr61680.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+double v[4096][4];
+
+__attribute__((noinline, noclone)) void
+bar (double p[][4])
+{
+ int i;
+ double d = 172.0;
+ for (i = 0; i < 4096; i++)
+ {
+ if (p[i][0] != 6.0 || p[i][1] != 6.0 || p[i][2] != 10.0)
+ __builtin_abort ();
+ if (__builtin_fabs (p[i][3] - d) > 0.25)
+ __builtin_abort ();
+ }
+}
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ double w[4096][4], t;
+ for (i = 0; i < 4096; i++)
+ {
+ w[i][0] = v[i][0] + 2.0;
+ w[i][1] = v[i][1] + 1.0;
+ w[i][2] = v[i][2] + 4.0;
+ w[i][3] = (w[i][0] * w[i][0] + w[i][1] * w[i][1] + w[i][2] * w[i][2]);
+ }
+ bar (w);
+}
+
+int
+main ()
+{
+ int i;
+
+ check_vect ();
+
+ for (i = 0; i < 4096; i++)
+ {
+ v[i][0] = 4.0;
+ v[i][1] = 5.0;
+ v[i][2] = 6.0;
+ }
+ foo ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.dg/vect/pr62073.c b/gcc/testsuite/gcc.dg/vect/pr62073.c
new file mode 100644
index 0000000000..15f2ad66b0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr62073.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-O1" } */
+
+struct S0
+{
+ int f7;
+};
+struct S0 g_50;
+int g_70;
+int g_76;
+
+int foo (long long p_56, int * p_57)
+{
+ int *l_77;
+ int l_101;
+
+ for (; g_70;)
+ {
+ int **l_78 = &l_77;
+ if (g_50.f7)
+ continue;
+ *l_78 = 0;
+ }
+ for (g_76 = 1; g_76 >= 0; g_76--)
+ {
+ int *l_90;
+ for (l_101 = 4; l_101 >= 0; l_101--)
+ if (l_101)
+ *l_90 = 0;
+ else
+ {
+ int **l_113 = &l_77;
+ *l_113 = p_57;
+ }
+ }
+
+ return *l_77;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr62075.c b/gcc/testsuite/gcc.dg/vect/pr62075.c
new file mode 100644
index 0000000000..798490e875
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr62075.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+
+int a[16][2];
+struct A
+{
+ int b[16][2];
+ int c[16][1];
+};
+
+void
+foo (struct A *x)
+{
+ int i;
+ for (i = 0; i < 16; ++i)
+ {
+ x->b[i][0] = a[i][0];
+ x->c[i][0] = 0 != a[i][0];
+ x->b[i][1] = a[i][1];
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr63189.c b/gcc/testsuite/gcc.dg/vect/pr63189.c
new file mode 100644
index 0000000000..da6fba4b1b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr63189.c
@@ -0,0 +1,26 @@
+/* PR tree-optimization/63189 */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+short int d[16] = { 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0 };
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int j, s = 0;
+ for (j = 0; j < 8; j++)
+ s += d[j] * j;
+ if (s != 7)
+ abort ();
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr63341-1.c b/gcc/testsuite/gcc.dg/vect/pr63341-1.c
new file mode 100644
index 0000000000..4aece7bbd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr63341-1.c
@@ -0,0 +1,32 @@
+/* PR tree-optimization/63341 */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
+struct S { char e __attribute__((aligned (64))); U s[32]; };
+struct S t = {0, {{1}, {2}, {3}, {4}, {5}, {6}, {7}, {8},
+ {9}, {10}, {11}, {12}, {13}, {14}, {15}, {16},
+ {17}, {18}, {19}, {20}, {21}, {22}, {23}, {24},
+ {25}, {26}, {27}, {28}, {29}, {30}, {31}, {32}}};
+unsigned short d[32] = { 1 };
+
+__attribute__((noinline, noclone)) void
+foo ()
+{
+ int i;
+ for (i = 0; i < 32; i++)
+ d[i] = t.s[i].s;
+ if (__builtin_memcmp (d, t.s, sizeof d))
+ abort ();
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr63341-2.c b/gcc/testsuite/gcc.dg/vect/pr63341-2.c
new file mode 100644
index 0000000000..4e7d2bb1f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr63341-2.c
@@ -0,0 +1,35 @@
+/* PR tree-optimization/63341 */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+typedef union U { unsigned short s; unsigned char c; } __attribute__((packed)) U;
+struct S { char e __attribute__((aligned (64))); U s[32]; };
+struct S t = {0, {{0x5010}, {0x5111}, {0x5212}, {0x5313}, {0x5414}, {0x5515}, {0x5616}, {0x5717},
+ {0x5818}, {0x5919}, {0x5a1a}, {0x5b1b}, {0x5c1c}, {0x5d1d}, {0x5e1e}, {0x5f1f},
+ {0x6020}, {0x6121}, {0x6222}, {0x6323}, {0x6424}, {0x6525}, {0x6626}, {0x6727},
+ {0x6828}, {0x6929}, {0x6a2a}, {0x6b2b}, {0x6c2c}, {0x6d2d}, {0x6e2e}, {0x6f2f}}};
+unsigned short d[32] = { 1 };
+
+__attribute__((noinline, noclone)) void
+foo ()
+{
+ int i;
+ for (i = 0; i < 32; i++)
+ d[i] = t.s[i].s + 4;
+ for (i = 0; i < 32; i++)
+ if (d[i] != t.s[i].s + 4)
+ abort ();
+ else
+ asm volatile ("" : : : "memory");
+}
+
+int
+main ()
+{
+ check_vect ();
+ foo ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr63379.c b/gcc/testsuite/gcc.dg/vect/pr63379.c
new file mode 100644
index 0000000000..f6e8fc6a4c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr63379.c
@@ -0,0 +1,43 @@
+/* PR tree-optimization/63379 */
+/* { dg-do run } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+typedef struct {
+ int x;
+ int y;
+} Point;
+
+Point pt_array[25];
+
+void __attribute__((noinline,noclone))
+generate_array(void)
+{
+ unsigned int i;
+ for (i = 0; i<25; i++)
+ {
+ pt_array[i].x = i;
+ pt_array[i].y = 1000+i;
+ }
+}
+
+int main()
+{
+ check_vect ();
+ generate_array ();
+ Point min_pt = pt_array[0];
+ Point *ptr, *ptr_end;
+ for (ptr = pt_array+1, ptr_end = pt_array+25; ptr != ptr_end; ++ptr)
+ {
+ min_pt.x = (min_pt.x < ptr->x) ? min_pt.x : ptr->x;
+ min_pt.y = (min_pt.y < ptr->y) ? min_pt.y : ptr->y;
+ }
+
+ if (min_pt.x != 0 || min_pt.y != 1000)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/pr63530.c b/gcc/testsuite/gcc.dg/vect/pr63530.c
new file mode 100644
index 0000000000..b583b9b355
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/pr63530.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O2 -ftree-vectorize -funroll-loops --param \"max-completely-peeled-insns=400\"" } */
+
+/* PR tree-optimization/63530 */
+/* On armv7 hardware, following options cause run time failure */
+/* -march=armv7-a -mfloat-abi=hard -mfpu=neon -marm -O2 -ftree-vectorize */
+/* -funroll-loops --param "max-completely-peeled-insns=400" */
+
+#include <stdlib.h>
+
+typedef struct {
+ unsigned char map[256];
+ int i;
+} A, *AP;
+
+AP __attribute__ ((noinline))
+foo (int n)
+{
+ AP b = (AP)calloc (1, sizeof (A));
+ int i;
+ for (i = n; i < 256; i++)
+ b->map[i] = i;
+ return b;
+}
+
+int
+main()
+{
+ AP p = foo(3);
+ return p->map[30] - p->map[20] - p->map[10];
+}
diff --git a/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c b/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c
index 6c8f01c974..10b31aaac3 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-24-big-array.c
@@ -84,8 +84,8 @@ int main (void)
arr[i].b = i * 2 + 10;
arr[i].c = 17;
arr[i].d = i+34;
- if (arr[i].a == 178)
- abort ();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
check_vect ();
diff --git a/gcc/testsuite/gcc.dg/vect/slp-24.c b/gcc/testsuite/gcc.dg/vect/slp-24.c
index 61c53f08fa..eca66bfb03 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-24.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-24.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char ub[N*2] = {1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45,1,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
unsigned char uc[N] = {1,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+volatile int y = 0;
+
void
main1 (unsigned char x, unsigned char max_result, unsigned char min_result, s *arr)
{
@@ -67,8 +69,8 @@ int main (void)
arr[i].b = i * 2 + 10;
arr[i].c = 17;
arr[i].d = i+34;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
check_vect ();
diff --git a/gcc/testsuite/gcc.dg/vect/slp-26.c b/gcc/testsuite/gcc.dg/vect/slp-26.c
index 6821b2ced0..09a1ecd9c4 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-26.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-26.c
@@ -10,7 +10,7 @@ main1 ()
{
int i;
unsigned short in[N*8] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63};
- unsigned short out[N*8], a[N], b[N] = {3,6,9,12,15,18,21,24};
+ unsigned short out[N*8], a[N], b[N] = {3,0x8031,0x7fff,0x8032,0xffff,0,0x8030,0x8000};
/* Partial SLP is not supported. */
for (i = 0; i < N; i++)
@@ -20,7 +20,7 @@ main1 ()
out[i*4 + 2] = in[i*4 + 2];
out[i*4 + 3] = in[i*4 + 3];
- a[i] = b[i] / 3;
+ a[i] = b[i] / 0x8031;
}
/* check results: */
@@ -30,7 +30,7 @@ main1 ()
|| out[i*4 + 1] != in[i*4 + 1]
|| out[i*4 + 2] != in[i*4 + 2]
|| out[i*4 + 3] != in[i*4 + 3]
- || a[i] != b[i] / 3)
+ || a[i] != b[i] / 0x8031)
abort ();
}
diff --git a/gcc/testsuite/gcc.dg/vect/slp-39.c b/gcc/testsuite/gcc.dg/vect/slp-39.c
new file mode 100644
index 0000000000..b3c278a5fe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/slp-39.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+
+double x[1024], y[1024], z[1024];
+void foo (double w)
+{
+ int i;
+ for (i = 0; i < 1023; i+=2)
+ {
+ z[i] = x[i] + 1;
+ z[i+1] = x[i+1] + w;
+ }
+}
+void bar (double w)
+{
+ int i;
+ for (i = 0; i < 1023; i+=2)
+ {
+ z[i] = x[i] + w;
+ z[i+1] = x[i+1] + 1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 2 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-cond-3.c b/gcc/testsuite/gcc.dg/vect/slp-cond-3.c
new file mode 100644
index 0000000000..4ee2dcec3a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/slp-cond-3.c
@@ -0,0 +1,84 @@
+/* { dg-require-effective-target vect_condition } */
+
+#include "tree-vect.h"
+
+#define N 128
+
+/* Comparison in int, then/else and result in unsigned char. */
+
+static inline unsigned char
+foo (int x, int y, int a, int b)
+{
+ if (x >= y)
+ return a;
+ else
+ return b;
+}
+
+__attribute__((noinline, noclone)) void
+bar (unsigned char * __restrict__ a, unsigned char * __restrict__ b,
+ unsigned char * __restrict__ c, unsigned char * __restrict__ d,
+ unsigned char * __restrict__ e, int w)
+{
+ int i;
+ for (i = 0; i < N/16; i++, a += 16, b += 16, c += 16, d += 16, e += 16)
+ {
+ e[0] = foo (c[0], d[0], a[0] * w, b[0] * w);
+ e[1] = foo (c[1], d[1], a[1] * w, b[1] * w);
+ e[2] = foo (c[2], d[2], a[2] * w, b[2] * w);
+ e[3] = foo (c[3], d[3], a[3] * w, b[3] * w);
+ e[4] = foo (c[4], d[4], a[4] * w, b[4] * w);
+ e[5] = foo (c[5], d[5], a[5] * w, b[5] * w);
+ e[6] = foo (c[6], d[6], a[6] * w, b[6] * w);
+ e[7] = foo (c[7], d[7], a[7] * w, b[7] * w);
+ e[8] = foo (c[8], d[8], a[8] * w, b[8] * w);
+ e[9] = foo (c[9], d[9], a[9] * w, b[9] * w);
+ e[10] = foo (c[10], d[10], a[10] * w, b[10] * w);
+ e[11] = foo (c[11], d[11], a[11] * w, b[11] * w);
+ e[12] = foo (c[12], d[12], a[12] * w, b[12] * w);
+ e[13] = foo (c[13], d[13], a[13] * w, b[13] * w);
+ e[14] = foo (c[14], d[14], a[14] * w, b[14] * w);
+ e[15] = foo (c[15], d[15], a[15] * w, b[15] * w);
+ }
+}
+
+
+unsigned char a[N], b[N], c[N], d[N], e[N];
+
+int main ()
+{
+ int i;
+
+ check_vect ();
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i;
+ b[i] = 5;
+ e[i] = 0;
+
+ switch (i % 9)
+ {
+ case 0: asm (""); c[i] = i; d[i] = i + 1; break;
+ case 1: c[i] = 0; d[i] = 0; break;
+ case 2: c[i] = i + 1; d[i] = i - 1; break;
+ case 3: c[i] = i; d[i] = i + 7; break;
+ case 4: c[i] = i; d[i] = i; break;
+ case 5: c[i] = i + 16; d[i] = i + 3; break;
+ case 6: c[i] = i - 5; d[i] = i; break;
+ case 7: c[i] = i; d[i] = i; break;
+ case 8: c[i] = i; d[i] = i - 7; break;
+ }
+ }
+
+ bar (a, b, c, d, e, 2);
+ for (i = 0; i < N; i++)
+ if (e[i] != ((i % 3) == 0 ? 10 : 2 * i))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/slp-cond-4.c b/gcc/testsuite/gcc.dg/vect/slp-cond-4.c
new file mode 100644
index 0000000000..60a62384e0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/slp-cond-4.c
@@ -0,0 +1,86 @@
+/* { dg-require-effective-target vect_condition } */
+
+#include "tree-vect.h"
+
+#define N 128
+
+/* Comparison in short, then/else and result in int. */
+static inline int
+foo (short x, short y, int a, int b)
+{
+ if (x >= y)
+ return a;
+ else
+ return b;
+}
+
+__attribute__((noinline, noclone)) void
+bar (short * __restrict__ a, short * __restrict__ b,
+ short * __restrict__ c, short * __restrict__ d,
+ int * __restrict__ e, int w)
+{
+ int i;
+ int stride = 16;
+
+ for (i = 0; i < N/stride; i++, a += stride, b += stride, c += stride,
+ d += stride, e += stride)
+ {
+ e[0] = foo (c[0], d[0], a[0], b[0]);
+ e[1] = foo (c[1], d[1], a[1], b[1]);
+ e[2] = foo (c[2], d[2], a[2], b[2]);
+ e[3] = foo (c[3], d[3], a[3], b[3]);
+ e[4] = foo (c[4], d[4], a[4], b[4]);
+ e[5] = foo (c[5], d[5], a[5], b[5]);
+ e[6] = foo (c[6], d[6], a[6], b[6]);
+ e[7] = foo (c[7], d[7], a[7], b[7]);
+ e[8] = foo (c[8], d[8], a[8], b[8]);
+ e[9] = foo (c[9], d[9], a[9], b[9]);
+ e[10] = foo (c[10], d[10], a[10], b[10]);
+ e[11] = foo (c[11], d[11], a[11], b[11]);
+ e[12] = foo (c[12], d[12], a[12], b[12]);
+ e[13] = foo (c[13], d[13], a[13], b[13]);
+ e[14] = foo (c[14], d[14], a[14], b[14]);
+ e[15] = foo (c[15], d[15], a[15], b[15]);
+ }
+}
+
+
+short a[N], b[N], c[N], d[N];
+int e[N];
+
+int main ()
+{
+ int i;
+
+ check_vect ();
+
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i;
+ b[i] = 5;
+ e[i] = 0;
+
+ switch (i % 9)
+ {
+ case 0: asm (""); c[i] = - i - 1; d[i] = i + 1; break;
+ case 1: c[i] = 0; d[i] = 0; break;
+ case 2: c[i] = i + 1; d[i] = - i - 1; break;
+ case 3: c[i] = i; d[i] = i + 7; break;
+ case 4: c[i] = i; d[i] = i; break;
+ case 5: c[i] = i + 16; d[i] = i + 3; break;
+ case 6: c[i] = - i - 5; d[i] = - i; break;
+ case 7: c[i] = - i; d[i] = - i; break;
+ case 8: c[i] = - i; d[i] = - i - 7; break;
+ }
+ }
+
+ bar (a, b, c, d, e, 2);
+ for (i = 0; i < N; i++)
+ if (e[i] != ((i % 3) == 0 ? 5 : i))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
index 1bc95e2e98..27156f4829 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-2.c
@@ -12,7 +12,8 @@
#define N 16
-void foo (unsigned int *__restrict__ pInput, unsigned int *__restrict__ pOutput)
+void __attribute__((noinline))
+foo (unsigned int *__restrict__ pInput, unsigned int *__restrict__ pOutput)
{
unsigned int i, a, b;
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
index d211ef943b..52a640c13a 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-8.c
@@ -5,7 +5,8 @@
#define N 200
-void foo (unsigned char *__restrict__ pInput, unsigned char *__restrict__ pOutput)
+void __attribute__((noinline))
+foo (unsigned char *__restrict__ pInput, unsigned char *__restrict__ pOutput)
{
unsigned char i, a, b, c;
@@ -32,8 +33,7 @@ int main (int argc, const char* argv[])
{
input[i] = i;
output[i] = 0;
- if (input[i] > 256)
- abort ();
+ __asm__ volatile ("");
}
for (i = 0; i < N / 3; i++)
@@ -52,7 +52,8 @@ int main (int argc, const char* argv[])
return 0;
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_perm_byte } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target { vect_perm_byte && vect_char_mult } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_perm_byte && {! vect_char_mult } } } } } */
/* { dg-final { scan-tree-dump-times "vectorizing stmts using SLP" 1 "vect" { target vect_perm_byte } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
index 2f1cb35798..548430064d 100644
--- a/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
+++ b/gcc/testsuite/gcc.dg/vect/slp-perm-9.c
@@ -5,7 +5,8 @@
#define N 200
-void foo (unsigned short *__restrict__ pInput, unsigned short *__restrict__ pOutput)
+void __attribute__((noinline))
+foo (unsigned short *__restrict__ pInput, unsigned short *__restrict__ pOutput)
{
unsigned short i, a, b, c;
diff --git a/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c b/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c
index f53e66d4ce..86408160cc 100644
--- a/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c
+++ b/gcc/testsuite/gcc.dg/vect/vec-scal-opt.c
@@ -19,5 +19,5 @@ int main (int argc, char *argv[]) {
return vidx(short, r1, 0);
}
-/* { dg-final { scan-tree-dump-times ">> k.\[0-9_\]*" 1 "veclower2" } } */
-/* { dg-final { cleanup-tree-dump "veclower2" } } */
+/* { dg-final { scan-tree-dump-times ">> k.\[0-9_\]*" 1 "veclower21" } } */
+/* { dg-final { cleanup-tree-dump "veclower21" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vec-scal-opt1.c b/gcc/testsuite/gcc.dg/vect/vec-scal-opt1.c
index 4025f6717a..33d3bbbe7f 100644
--- a/gcc/testsuite/gcc.dg/vect/vec-scal-opt1.c
+++ b/gcc/testsuite/gcc.dg/vect/vec-scal-opt1.c
@@ -17,5 +17,5 @@ int main (int argc, char *argv[]) {
return vidx(short, r1, 0);
}
-/* { dg-final { scan-tree-dump-times ">> 2" 1 "veclower2" } } */
-/* { dg-final { cleanup-tree-dump "veclower2" } } */
+/* { dg-final { scan-tree-dump-times ">> 2" 1 "veclower21" } } */
+/* { dg-final { cleanup-tree-dump "veclower21" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vec-scal-opt2.c b/gcc/testsuite/gcc.dg/vect/vec-scal-opt2.c
index 677836da90..397613febb 100644
--- a/gcc/testsuite/gcc.dg/vect/vec-scal-opt2.c
+++ b/gcc/testsuite/gcc.dg/vect/vec-scal-opt2.c
@@ -16,5 +16,5 @@ int main (int argc, char *argv[]) {
return vidx(short, r1, 0);
}
-/* { dg-final { scan-tree-dump-times ">> 2" 1 "veclower2" } } */
-/* { dg-final { cleanup-tree-dump "veclower2" } } */
+/* { dg-final { scan-tree-dump-times ">> 2" 1 "veclower21" } } */
+/* { dg-final { cleanup-tree-dump "veclower21" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-119.c b/gcc/testsuite/gcc.dg/vect/vect-119.c
index fa40f15c93..6a91029a52 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-119.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-119.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
#define OUTER 32
#define INNER 40
diff --git a/gcc/testsuite/gcc.dg/vect/vect-123.c b/gcc/testsuite/gcc.dg/vect/vect-123.c
new file mode 100644
index 0000000000..5a2f325090
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-123.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int x[4092];
+int y[1024];
+
+void foo (int s)
+{
+ int i, j;
+ for (i = 0, j = 0; j < 1023; i += s, j++)
+ y[j] += x[i];
+}
+
+/* { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-124.c b/gcc/testsuite/gcc.dg/vect/vect-124.c
new file mode 100644
index 0000000000..f659b94bab
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-124.c
@@ -0,0 +1,30 @@
+#include "tree-vect.h"
+
+#ifndef N
+#define N 64
+#endif
+
+int a[N];
+
+__attribute__((noinline, noclone)) void
+foo (int x)
+{
+ int i;
+ for (i = 0; i < N; i++, x += 3)
+ a[i] = x;
+}
+
+int
+main ()
+{
+ int i;
+
+ check_vect ();
+ foo (6);
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 3 + 6)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-2.c b/gcc/testsuite/gcc.dg/vect/vect-2.c
index 5d4fc914a9..f01b7b46dd 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-2.c
@@ -6,7 +6,7 @@
#define N 16
char cb[N] = {0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45};
-char ca[N];
+char ca[N] = {};
__attribute__ ((noinline))
int main1 ()
diff --git a/gcc/testsuite/gcc.dg/vect/vect-82_64.c b/gcc/testsuite/gcc.dg/vect/vect-82_64.c
index 71de0ce2b4..30d9c809fa 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-82_64.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-82_64.c
@@ -1,6 +1,7 @@
/* { dg-do run { target { { powerpc*-*-* && lp64 } && powerpc_altivec_ok } } } */
/* { dg-do compile { target { { powerpc*-*-* && ilp32 } && powerpc_altivec_ok } } } */
-/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
+/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-details -maltivec" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-83_64.c b/gcc/testsuite/gcc.dg/vect/vect-83_64.c
index 8734a52712..8cc4f22c41 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-83_64.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-83_64.c
@@ -1,6 +1,7 @@
/* { dg-do run { target { { powerpc*-*-* && lp64 } && powerpc_altivec_ok } } } */
/* { dg-do compile { target { { powerpc*-*-* && ilp32 } && powerpc_altivec_ok } } } */
-/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-stats -maltivec" } */
+/* { dg-options "-O2 -ftree-vectorize -mpowerpc64 -fdump-tree-vect-details -maltivec" } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
#include <stdarg.h>
#include "tree-vect.h"
diff --git a/gcc/testsuite/gcc.dg/vect/vect-alias-check.c b/gcc/testsuite/gcc.dg/vect/vect-alias-check.c
new file mode 100644
index 0000000000..7c8b7dd98c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-alias-check.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "--param=vect-max-version-for-alias-checks=2" } */
+
+/* A test case showing four potential alias checks between a[i] and b[0], b[1],
+ b[i+1] and b[i+2]. With alias check merging enabled, those four checks
+ can be merged into two, and the loop will be vectorized with
+ vect-max-version-for-alias-checks=2. */
+
+void foo (int *a, int *b)
+{
+ int i;
+ for (i = 0; i < 1000; ++i)
+ a[i] = b[0] + b[1] + b[i+1] + b[i+2];
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-align-3.c b/gcc/testsuite/gcc.dg/vect/vect-align-3.c
new file mode 100644
index 0000000000..a8d3e485e6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-align-3.c
@@ -0,0 +1,54 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+
+int a[2048];
+
+void
+f1 (int x, int y)
+{
+ int i;
+ x &= -256;
+ y &= -256;
+ for (i = x + 256; i < y; i++)
+ a[i]++;
+}
+
+void
+f2 (int x, int y)
+{
+ int i;
+ if (x & 31)
+ __builtin_unreachable ();
+ if (y & 31)
+ __builtin_unreachable ();
+ for (i = x + 256; i < x + y; i++)
+ a[i]++;
+}
+
+void
+f3 (int x, int y)
+{
+ int i;
+ if (x % 256)
+ __builtin_unreachable ();
+ if (y % 256)
+ __builtin_unreachable ();
+ for (i = x + 256; i < x + y; i++)
+ a[i]++;
+}
+
+void
+f4 (int x, int y)
+{
+ int i;
+ if ((x % 256) != 0)
+ __builtin_unreachable ();
+ if ((y % 256) != 0)
+ __builtin_unreachable ();
+ for (i = x + 256; i < x + y; i++)
+ a[i]++;
+}
+
+/* { dg-final { scan-tree-dump-not "vect_do_peeling_for_loop_bound" "vect" } } */
+/* { dg-final { scan-tree-dump-not "loop peeled for vectorization" "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-11.c b/gcc/testsuite/gcc.dg/vect/vect-cond-11.c
new file mode 100644
index 0000000000..0301c89097
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-11.c
@@ -0,0 +1,116 @@
+#include "tree-vect.h"
+
+#define N 1024
+typedef int V __attribute__((vector_size (4)));
+unsigned int a[N * 2] __attribute__((aligned));
+unsigned int b[N * 2] __attribute__((aligned));
+V c[N];
+
+__attribute__((noinline, noclone)) unsigned int
+foo (unsigned int *a, unsigned int *b)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int x = a[i], y = b[i];
+ if (x < 32)
+ {
+ x = x + 127;
+ y = y * 2;
+ }
+ else
+ {
+ x = x - 16;
+ y = y + 1;
+ }
+ a[i] = x;
+ b[i] = y;
+ r += x;
+ }
+ return r;
+}
+
+__attribute__((noinline, noclone)) unsigned int
+bar (unsigned int *a, unsigned int *b)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < N; i++)
+ {
+ unsigned int x = a[i], y = b[i];
+ if (x < 32)
+ {
+ x = x + 127;
+ y = y * 2;
+ }
+ else
+ {
+ x = x - 16;
+ y = y + 1;
+ }
+ a[i] = x;
+ b[i] = y;
+ c[i] = c[i] + 1;
+ r += x;
+ }
+ return r;
+}
+
+void
+baz (unsigned int *a, unsigned int *b,
+ unsigned int (*fn) (unsigned int *, unsigned int *))
+{
+ int i;
+ for (i = -64; i < 0; i++)
+ {
+ a[i] = 19;
+ b[i] = 17;
+ }
+ for (; i < N; i++)
+ {
+ a[i] = i - 512;
+ b[i] = i;
+ }
+ for (; i < N + 64; i++)
+ {
+ a[i] = 27;
+ b[i] = 19;
+ }
+ if (fn (a, b) != -512U - (N - 32) * 16U + 32 * 127U)
+ __builtin_abort ();
+ for (i = -64; i < 0; i++)
+ if (a[i] != 19 || b[i] != 17)
+ __builtin_abort ();
+ for (; i < N; i++)
+ if (a[i] != (i - 512U < 32U ? i - 512U + 127 : i - 512U - 16)
+ || b[i] != (i - 512U < 32U ? i * 2U : i + 1U))
+ __builtin_abort ();
+ for (; i < N + 64; i++)
+ if (a[i] != 27 || b[i] != 19)
+ __builtin_abort ();
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ baz (a + 512, b + 512, foo);
+ baz (a + 512, b + 512, bar);
+ baz (a + 512 + 1, b + 512 + 1, foo);
+ baz (a + 512 + 1, b + 512 + 1, bar);
+ baz (a + 512 + 31, b + 512 + 31, foo);
+ baz (a + 512 + 31, b + 512 + 31, bar);
+ baz (a + 512 + 1, b + 512, foo);
+ baz (a + 512 + 1, b + 512, bar);
+ baz (a + 512 + 31, b + 512, foo);
+ baz (a + 512 + 31, b + 512, bar);
+ baz (a + 512, b + 512 + 1, foo);
+ baz (a + 512, b + 512 + 1, bar);
+ baz (a + 512, b + 512 + 31, foo);
+ baz (a + 512, b + 512 + 31, bar);
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-cond-5.c b/gcc/testsuite/gcc.dg/vect/vect-cond-5.c
index 8d28a45ce4..e8adedbe41 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-cond-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-cond-5.c
@@ -53,7 +53,7 @@ int main ()
return 0;
}
-/* Double reduction with cond_expr is not supported, since eventhough the order
+/* Double reduction with cond_expr is not supported, since even though the order
of computation is the same, but vector results should be reduced to scalar
result, which can'be done for cond_expr. */
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-11.c b/gcc/testsuite/gcc.dg/vect/vect-iv-11.c
index ef1c577440..632b97c295 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-iv-11.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-iv-11.c
@@ -3,7 +3,8 @@
#include <stdarg.h>
#include "tree-vect.h"
-int main1 (int len)
+int __attribute__((noinline,noclone))
+main1 (int len)
{
int s = 0;
int i = len;
diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-5.c b/gcc/testsuite/gcc.dg/vect/vect-iv-5.c
index 1766ae6a33..8861095005 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-iv-5.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-iv-5.c
@@ -36,5 +36,5 @@ int main (void)
return main1 ();
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail {! arm_neon_ok } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-iv-7.c b/gcc/testsuite/gcc.dg/vect/vect-iv-7.c
index 140d903a75..0d96ac2d4e 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-iv-7.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-iv-7.c
@@ -6,7 +6,7 @@
#define N 16
int result[N] = {8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38};
-__attribute__ ((noinline)) int main1 (int X)
+__attribute__ ((noinline, noclone)) int main1 (int X)
{
int arr[N];
int k = 3;
@@ -38,5 +38,5 @@ int main (void)
return main1 (2);
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail *-*-* } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c b/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c
new file mode 100644
index 0000000000..7900e59299
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-ivdep-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+void foo(int n, int *a, int *b, int *c, int *d, int *e) {
+ int i, j;
+#pragma GCC ivdep
+ for (i = 0; i < n; ++i) {
+ a[i] = b[i] + c[i];
+ }
+}
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c b/gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c
new file mode 100644
index 0000000000..4e3dcbd322
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-ivdep-2.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
+/* { dg-additional-options "-O3 -fopt-info-vec-optimized" } */
+
+/* PR other/33426 */
+/* Testing whether #pragma ivdep is working. */
+
+void foo(int n, int *a, int *b, int *c) {
+ int i;
+ i = 0;
+#pragma GCC ivdep
+ while(i < n)
+ {
+ a[i] = b[i] + c[i];
+ ++i;
+ }
+}
+
+void bar(int n, int *a, int *b, int *c) {
+ int i;
+ i = 0;
+#pragma GCC ivdep
+ do
+ {
+ a[i] = b[i] + c[i];
+ ++i;
+ }
+ while(i < n);
+}
+
+
+/* { dg-message "loop vectorized" "" { target *-*-* } 0 } */
+/* { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-mask-load-1.c b/gcc/testsuite/gcc.dg/vect/vect-mask-load-1.c
new file mode 100644
index 0000000000..2c30830bee
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-mask-load-1.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-additional-options "-Ofast -fno-common" } */
+/* { dg-additional-options "-Ofast -fno-common -mavx" { target avx_runtime } } */
+
+#include <stdlib.h>
+#include "tree-vect.h"
+
+__attribute__((noinline, noclone)) void
+foo (double *x, double *y)
+{
+ double *p = __builtin_assume_aligned (x, 16);
+ double *q = __builtin_assume_aligned (y, 16);
+ double z, h;
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ if (p[i] < 0.0)
+ z = q[i], h = q[i] * 7.0 + 3.0;
+ else
+ z = p[i] + 6.0, h = p[1024 + i];
+ p[i] = z + 2.0 * h;
+ }
+}
+
+double a[2048] __attribute__((aligned (16)));
+double b[1024] __attribute__((aligned (16)));
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ for (i = 0; i < 1024; i++)
+ {
+ a[i] = (i & 1) ? -i : 2 * i;
+ a[i + 1024] = i;
+ b[i] = 7 * i;
+ asm ("");
+ }
+ foo (a, b);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != ((i & 1)
+ ? 7 * i + 2.0 * (7 * i * 7.0 + 3.0)
+ : 2 * i + 6.0 + 2.0 * i)
+ || b[i] != 7 * i
+ || a[i + 1024] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 1 "vect" { target avx_runtime } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-mask-loadstore-1.c b/gcc/testsuite/gcc.dg/vect/vect-mask-loadstore-1.c
new file mode 100644
index 0000000000..ecc164fe1f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-mask-loadstore-1.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-additional-options "-Ofast -fno-common" } */
+/* { dg-additional-options "-Ofast -fno-common -mavx" { target avx_runtime } } */
+
+#include <stdlib.h>
+#include "tree-vect.h"
+
+__attribute__((noinline, noclone)) void
+foo (float *__restrict x, float *__restrict y, float *__restrict z)
+{
+ float *__restrict p = __builtin_assume_aligned (x, 32);
+ float *__restrict q = __builtin_assume_aligned (y, 32);
+ float *__restrict r = __builtin_assume_aligned (z, 32);
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ if (p[i] < 0.0f)
+ q[i] = p[i] + 2.0f;
+ else
+ p[i] = r[i] + 3.0f;
+ }
+}
+
+float a[1024] __attribute__((aligned (32)));
+float b[1024] __attribute__((aligned (32)));
+float c[1024] __attribute__((aligned (32)));
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ for (i = 0; i < 1024; i++)
+ {
+ a[i] = (i & 1) ? -i : i;
+ b[i] = 7 * i;
+ c[i] = a[i] - 3.0f;
+ asm ("");
+ }
+ foo (a, b, c);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != ((i & 1) ? -i : i)
+ || b[i] != ((i & 1) ? a[i] + 2.0f : 7 * i)
+ || c[i] != a[i] - 3.0f)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "note: vectorized 1 loops" 1 "vect" { target avx_runtime } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c b/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c
index 977c33255f..45b42cd264 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-multitypes-12.c
@@ -38,7 +38,9 @@ int main (void)
return 0;
}
+/* bleah */
/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
-/* { dg-final { if [ istarget sparc*-*-* ] { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { xfail ilp32 } } else { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_unpack } } } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target sparc*-*-* xfail ilp32 } } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { { ! sparc*-*-* } && { ! vect_unpack } } } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-neg-store-1.c b/gcc/testsuite/gcc.dg/vect/vect-neg-store-1.c
new file mode 100644
index 0000000000..178f0a1ec9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-neg-store-1.c
@@ -0,0 +1,39 @@
+/* { dg-require-effective-target vect_int } */
+#include <stdlib.h>
+
+__attribute__((noinline, noclone))
+void test1(short x[128])
+{
+ int i;
+ for (i=127; i>=0; i--) {
+ x[i] = 1234;
+ }
+}
+
+int main (void)
+{
+ short x[128 + 32];
+ int i;
+
+ for (i = 0; i < 16; i ++)
+ {
+ asm ("");
+ x[i] = x[i + 144] = 5678;
+ }
+
+ test1 (x + 16);
+
+ for (i = 0; i < 128; i++)
+ if (x[i + 16] != 1234)
+ abort ();
+
+ for (i = 0; i < 16; i++)
+ if (x[i] != 5678
+ || x[i + 144] != 5678)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-neg-store-2.c b/gcc/testsuite/gcc.dg/vect/vect-neg-store-2.c
new file mode 100644
index 0000000000..e97b9bf40e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-neg-store-2.c
@@ -0,0 +1,39 @@
+/* { dg-require-effective-target vect_int } */
+#include <stdlib.h>
+
+__attribute__((noinline, noclone))
+void test1(short x[128], short D)
+{
+ int i;
+ for (i=127; i>=0; i--) {
+ x[i] = D;
+ }
+}
+
+int main (void)
+{
+ short x[128 + 32];
+ int i;
+
+ for (i = 0; i < 16; i ++)
+ {
+ asm ("");
+ x[i] = x[i + 144] = 5678;
+ }
+
+ test1 (x + 16, 1234);
+
+ for (i = 0; i < 128; i++)
+ if (x[i + 16] != 1234)
+ abort ();
+
+ for (i = 0; i < 16; i++)
+ if (x[i] != 5678
+ || x[i + 144] != 5678)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-nop-move.c b/gcc/testsuite/gcc.dg/vect/vect-nop-move.c
new file mode 100644
index 0000000000..f8c980a3bc
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-nop-move.c
@@ -0,0 +1,83 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-additional-options "-fdump-rtl-combine-details" } */
+
+#include "tree-vect.h"
+
+extern void abort (void);
+
+#define NOINLINE __attribute__((noinline))
+
+typedef float float32x4_t __attribute__ ((__vector_size__ (16)));
+typedef float float32x2_t __attribute__ ((__vector_size__ (8)));
+
+NOINLINE float
+foo32x4_be (float32x4_t x)
+{
+ return x[3];
+}
+
+NOINLINE float
+foo32x4_le (float32x4_t x)
+{
+ return x[0];
+}
+
+NOINLINE float
+bar (float a)
+{
+ return a;
+}
+
+NOINLINE float
+foo32x2_be (float32x2_t x)
+{
+#ifdef __i386__
+ /* ix86 passes float32x2 vector arguments in mmx registers. We need to
+ emit emms to empty MMS state and reenable x87 stack before float value
+ can be loaded to and passed in x87 floating-point return register. */
+ __builtin_ia32_emms ();
+#endif
+ return bar (x[1]);
+}
+
+NOINLINE float
+foo32x2_le (float32x2_t x)
+{
+#ifdef __i386__
+ __builtin_ia32_emms ();
+#endif
+ return bar (x[0]);
+}
+
+NOINLINE int
+test (void)
+{
+ float32x4_t a = { 0.0f, 1.0f, 2.0f, 3.0f };
+ float32x2_t b = { 0.0f, 1.0f };
+
+ if (foo32x2_be (b) != 1.0f)
+ abort ();
+
+ if (foo32x2_le (b) != 0.0f)
+ abort ();
+
+ if (foo32x4_be (a) != 3.0f)
+ abort ();
+
+ if (foo32x4_le (a) != 0.0f)
+ abort ();
+
+ return 0;
+}
+
+int
+main ()
+{
+ check_vect ();
+ return test ();
+}
+
+/* { dg-final { scan-rtl-dump "deleting noop move" "combine" { target aarch64*-*-* } } } */
+/* { dg-final { cleanup-rtl-dump "combine" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c
index e277ab2ca3..3f23aeedfc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1-big-array.c
@@ -22,6 +22,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c
index cc22fa45aa..623d146d36 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1.c
@@ -22,6 +22,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c
index c4150eece8..416cce1871 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1a-big-array.c
@@ -20,6 +20,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c
index fdf8e1ad88..a8dce0512b 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1a.c
@@ -20,6 +20,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c
index 82579b7df4..7c03540ec5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1b-big-array.c
@@ -22,6 +22,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c
index 7efc4facbc..2c4a7392c8 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-1b.c
@@ -22,6 +22,6 @@ foo (){
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c
index 12f44ba125..fccd13dcf7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-2b.c
@@ -37,6 +37,6 @@ int main (void)
return 0;
}
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 1 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
index c6486db691..ecb2d9076d 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a-big-array.c
@@ -49,6 +49,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
index 3d6e1076e7..d0b4f80745 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3a.c
@@ -49,6 +49,5 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail vect_no_align } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 2 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 3 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "step doesn't divide the vector-size" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c b/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c
index 1c20f200e7..de16fa5cc2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-3b.c
@@ -49,6 +49,6 @@ int main (void)
}
/* { dg-final { scan-tree-dump-times "OUTER LOOP VECTORIZED" 1 "vect" { xfail *-*-* } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 2 "vect" { target { ! vect_multiple_sizes } } } } */
-/* { dg-final { scan-tree-dump-times "strided access in outer loop" 4 "vect" { target vect_multiple_sizes } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 2 "vect" { target { ! vect_multiple_sizes } } } } */
+/* { dg-final { scan-tree-dump-times "grouped access in outer loop" 4 "vect" { target vect_multiple_sizes } } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
index 2ce242cb96..ded4049877 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4c-big-array.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
#define N 320
#define M 1024
diff --git a/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c b/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c
index 6053b19e7a..cde59a1353 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-outer-4c.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-require-effective-target vect_int } */
#define N 40
#define M 128
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
new file mode 100644
index 0000000000..8ba823b044
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-dot-s16c.c
@@ -0,0 +1,73 @@
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 64
+#define DOT 43680
+
+signed short X[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
+signed int Y[N] __attribute__ ((__aligned__(__BIGGEST_ALIGNMENT__)));
+
+/* (short, int)->int->int dot product.
+ Not detected as a dot-product pattern. */
+
+__attribute__ ((noinline)) int
+foo (int len)
+{
+ int i;
+ int result = 0;
+
+ for (i = 0; i < len; i++)
+ {
+ result += (X[i] * Y[i]);
+ }
+ return result;
+}
+
+
+/* (int, short)->int->int dot product.
+ Not detected as a dot-product pattern. */
+
+__attribute__ ((noinline)) int
+bar (int len)
+{
+ int i;
+ int result = 0;
+
+ for (i = 0; i < len; i++)
+ {
+ result += (Y[i] * X[i]);
+ }
+ return result;
+}
+
+int
+main (void)
+{
+ int i;
+ int dot;
+
+ check_vect ();
+
+ for (i = 0; i < N; i++)
+ {
+ X[i] = i;
+ Y[i] = N - i;
+ __asm__ volatile ("");
+ }
+
+ dot = foo (N);
+ if (dot != DOT)
+ abort ();
+
+ dot = bar (N);
+ if (dot != DOT)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_unpack } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-3.c b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-3.c
new file mode 100644
index 0000000000..39f3b6b3b5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-reduc-pattern-3.c
@@ -0,0 +1,41 @@
+/* { dg-require-effective-target vect_int_mult } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 10
+#define RES 1024
+
+/* A reduction pattern in which there is no data ref in
+ the loop and one operand is defined outside of the loop. */
+
+__attribute__ ((noinline)) int
+foo (int v)
+{
+ int i;
+ int result = 1;
+
+ ++v;
+ for (i = 0; i < N; i++)
+ result *= v;
+
+ return result;
+}
+
+int
+main (void)
+{
+ int res;
+
+ check_vect ();
+
+ res = foo (1);
+ if (res != RES)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-btrunc.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-btrunc.c
new file mode 100644
index 0000000000..7432fe76f5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-btrunc.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_btrunc } */
+
+#define N 32
+
+void
+foo (double *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_trunc (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_btrunc } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-btruncf.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-btruncf.c
new file mode 100644
index 0000000000..0835e1b0f9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-btruncf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_call_btruncf } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_truncf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_btruncf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-ceil.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-ceil.c
new file mode 100644
index 0000000000..a430690f55
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-ceil.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_ceil } */
+
+#define N 32
+
+void
+foo (double *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_ceil (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_ceil } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-ceilf.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-ceilf.c
new file mode 100644
index 0000000000..4d00924d30
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-ceilf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_call_ceilf } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_ceilf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_ceilf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-floor.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-floor.c
new file mode 100644
index 0000000000..8f1c9ecc48
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-floor.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_floor } */
+
+#define N 32
+
+void
+foo (double *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_floor (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_floor } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-floorf.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-floorf.c
new file mode 100644
index 0000000000..a68c2ec0a9
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-floorf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_call_floorf } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_floorf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_floorf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-lceil.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-lceil.c
new file mode 100644
index 0000000000..b4ed236e41
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-lceil.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_lceil } */
+
+#define N 32
+
+void
+foo (long *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_lceil (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_lceil } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-lfloor.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-lfloor.c
new file mode 100644
index 0000000000..5a36631838
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-lfloor.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_lfloor } */
+
+#define N 32
+
+void
+foo (long *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_lfloor (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_lfloor } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyint.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyint.c
new file mode 100644
index 0000000000..572dbd3b68
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyint.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_nearbyint } */
+
+#define N 32
+
+void
+foo (double *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_nearbyint (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_nearbyint } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyintf.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyintf.c
new file mode 100644
index 0000000000..73ca7deb05
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-nearbyintf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_call_nearbyintf } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_nearbyintf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_nearbyintf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-round.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-round.c
new file mode 100644
index 0000000000..c298bbbfcd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-round.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_double } */
+/* { dg-require-effective-target vect_call_round } */
+
+#define N 32
+
+void
+foo (double *output, double *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_round (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_round } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-rounding-roundf.c b/gcc/testsuite/gcc.dg/vect/vect-rounding-roundf.c
new file mode 100644
index 0000000000..362b9d655d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-rounding-roundf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_float } */
+/* { dg-require-effective-target vect_call_roundf } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_roundf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_roundf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c
new file mode 100644
index 0000000000..9fdd056388
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-1.c
@@ -0,0 +1,59 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int array[N];
+
+#pragma omp declare simd simdlen(4) notinbranch
+#pragma omp declare simd simdlen(4) notinbranch uniform(b) linear(c:3)
+#pragma omp declare simd simdlen(8) notinbranch
+#pragma omp declare simd simdlen(8) notinbranch uniform(b) linear(c:3)
+__attribute__((noinline)) int
+foo (int a, int b, int c)
+{
+ if (a < 30)
+ return 5;
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ array[i] = foo (i, 123, i * 3);
+}
+
+__attribute__((noinline, noclone)) void
+baz ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ array[i] = foo (i, array[i], i * 3);
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ bar ();
+ for (i = 0; i < N; i++)
+ if (array[i] != (i < 30 ? 5 : i * 4 + 123))
+ abort ();
+ baz ();
+ for (i = 0; i < N; i++)
+ if (array[i] != (i < 30 ? 5 : i * 8 + 123))
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
new file mode 100644
index 0000000000..93cb9f993c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.c
@@ -0,0 +1,85 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+/* { dg-additional-sources vect-simd-clone-10a.c } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N], b[N];
+long int c[N];
+unsigned char d[N];
+
+#include "vect-simd-clone-10.h"
+
+__attribute__((noinline)) void
+fn1 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+}
+
+__attribute__((noinline)) void
+fn2 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ d[i]++;
+ }
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+ d[i] /= 2;
+ }
+}
+
+__attribute__((noinline)) void
+fn3 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i * 2;
+ b[i] = 17 + (i % 37);
+ c[i] = (i & 63);
+ d[i] = 16 + i;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ fn3 ();
+ fn1 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63))
+ abort ();
+ fn3 ();
+ fn2 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63)
+ || d[i] != ((unsigned char) (17 + i)) / 2)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.h b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.h
new file mode 100644
index 0000000000..ac3b81f861
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10.h
@@ -0,0 +1,4 @@
+#pragma omp declare simd notinbranch
+extern int foo (long int a, int b, int c);
+#pragma omp declare simd notinbranch
+extern long int bar (int a, int b, long int c);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10a.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10a.c
new file mode 100644
index 0000000000..c49473df11
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-10a.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+#include "vect-simd-clone-10.h"
+
+#pragma omp declare simd notinbranch
+int
+foo (long int a, int b, int c)
+{
+ return a + b + c;
+}
+
+#pragma omp declare simd notinbranch
+long int
+bar (int a, int b, long int c)
+{
+ return a + b + c;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-11.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-11.c
new file mode 100644
index 0000000000..a04530e251
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-11.c
@@ -0,0 +1,67 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N] __attribute__((aligned (32)));
+
+#pragma omp declare simd linear(a) linear(b:3) linear(c:6) notinbranch
+__attribute__((noinline)) int
+foo (int a, int b, int c)
+{
+ return a ^ (b * 512) ^ (c * 512 * 512);
+}
+
+__attribute__((noinline, noclone)) void
+bar (int *d)
+{
+ int i, j, k;
+ for (i = 0, j = 0, k = 0; i < N / 2; i++, j++, k += 3)
+ d[i] = foo (j, i * 3, 2 * k + 2);
+}
+
+#if 0
+__attribute__((noinline, noclone)) void
+baz (int *d)
+{
+ long int i, j, k;
+ for (i = 0, j = 0, k = 0; i < N / 2;
+ i = (int) i + 1, j = (int) j + 1, k = (int) k + 3)
+ d[i] = foo (j, i * 3, 2 * k + 2);
+}
+#endif
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ if (sizeof (int) * __CHAR_BIT__ < 32)
+ return 0;
+ bar (a + 7);
+ for (i = 0; i < N / 2; i++)
+ if (a[i + 7] != (i ^ (i * 3 * 512) ^ (((i * 6) + 2) * 512 * 512)))
+ abort ();
+ bar (a);
+ for (i = 0; i < N / 2; i++)
+ if (a[i] != (i ^ (i * 3 * 512) ^ (((i * 6) + 2) * 512 * 512)))
+ abort ();
+#if 0
+ baz (a + 7);
+ for (i = 0; i < N / 2; i++)
+ if (a[i + 7] != (i ^ (i * 3 * 512) ^ (((i * 6) + 2) * 512 * 512)))
+ abort ();
+ baz (a);
+ for (i = 0; i < N / 2; i++)
+ if (a[i] != (i ^ (i * 3 * 512) ^ (((i * 6) + 2) * 512 * 512)))
+ abort ();
+#endif
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
new file mode 100644
index 0000000000..0fd5890e92
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12.c
@@ -0,0 +1,9 @@
+/* { dg-do run } */
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+/* { dg-additional-sources vect-simd-clone-12a.c } */
+
+#include "vect-simd-clone-10.c"
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12a.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12a.c
new file mode 100644
index 0000000000..c76508f9ac
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-12a.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+
+#include "vect-simd-clone-10.h"
+
+#pragma omp declare simd notinbranch
+__attribute__((noinline)) int
+foo (long int a, int b, int c)
+{
+ return a + b + c;
+}
+
+#pragma omp declare simd notinbranch
+__attribute__((noinline)) long int
+bar (int a, int b, long int c)
+{
+ return a + b + c;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-2.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-2.c
new file mode 100644
index 0000000000..0eae49db97
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-2.c
@@ -0,0 +1,53 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int array[N] __attribute__((aligned (32)));
+
+#pragma omp declare simd simdlen(4) notinbranch aligned(a:16) uniform(a) linear(b)
+#pragma omp declare simd simdlen(4) notinbranch aligned(a:32) uniform(a) linear(b)
+#pragma omp declare simd simdlen(8) notinbranch aligned(a:16) uniform(a) linear(b)
+#pragma omp declare simd simdlen(8) notinbranch aligned(a:32) uniform(a) linear(b)
+__attribute__((noinline)) void
+foo (int *a, int b, int c)
+{
+ a[b] = c;
+}
+
+__attribute__((noinline, noclone)) void
+bar ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ foo (array, i, i * array[i]);
+}
+
+__attribute__((noinline, noclone)) void
+baz ()
+{
+ int i;
+ for (i = 0; i < N; i++)
+ array[i] = 5 * (i & 7);
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ baz ();
+ bar ();
+ for (i = 0; i < N; i++)
+ if (array[i] != 5 * (i & 7) * i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-3.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-3.c
new file mode 100644
index 0000000000..857c6f783e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-3.c
@@ -0,0 +1,46 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int d[N], e[N];
+
+#pragma omp declare simd simdlen(4) notinbranch uniform(b) linear(c:3)
+__attribute__((noinline)) int
+foo (int a, int b, int c)
+{
+ if (a < 30)
+ return 5;
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ {
+ d[i] = foo (i, 123, i * 3);
+ e[i] = e[i] + i;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ bar ();
+ for (i = 0; i < N; i++)
+ if (d[i] != (i < 30 ? 5 : i * 4 + 123) || e[i] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-4.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-4.c
new file mode 100644
index 0000000000..c64f1b0bfe
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-4.c
@@ -0,0 +1,49 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+float d[N];
+int e[N];
+unsigned short f[N];
+
+#pragma omp declare simd simdlen(8) notinbranch uniform(b)
+__attribute__((noinline)) float
+foo (float a, float b, float c)
+{
+ if (a < 30)
+ return 5.0f;
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ {
+ d[i] = foo (i, 123, i * 3);
+ e[i] = e[i] * 3;
+ f[i] = f[i] + 1;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ bar ();
+ for (i = 0; i < N; i++)
+ if (d[i] != (i < 30 ? 5.0f : i * 4 + 123.0f) || e[i] || f[i] != 1)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-5.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-5.c
new file mode 100644
index 0000000000..1d2b067a7d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-5.c
@@ -0,0 +1,44 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int d[N], e[N];
+
+#pragma omp declare simd simdlen(4) notinbranch uniform(b) linear(c:3)
+__attribute__((noinline)) long long int
+foo (int a, int b, int c)
+{
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar ()
+{
+ int i;
+#pragma omp simd
+ for (i = 0; i < N; ++i)
+ {
+ d[i] = foo (i, 123, i * 3);
+ e[i] = e[i] + i;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ bar ();
+ for (i = 0; i < N; i++)
+ if (d[i] != i * 4 + 123 || e[i] != i)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c
new file mode 100644
index 0000000000..26995da86e
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-6.c
@@ -0,0 +1,75 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N];
+long long int b[N];
+short c[N];
+
+#pragma omp declare simd
+#pragma omp declare simd uniform(b) linear(c:3)
+__attribute__((noinline)) short
+foo (int a, long long int b, short c)
+{
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar (int x)
+{
+ int i;
+ if (x == 0)
+ {
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = foo (a[i], b[i], c[i]);
+ }
+ else
+ {
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = foo (a[i], x, i * 3);
+ }
+}
+
+__attribute__((noinline, noclone)) void
+baz (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = 2 * i;
+ b[i] = -7 * i + 6;
+ c[i] = (i & 31) << 4;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ baz ();
+ bar (0);
+ for (i = 0; i < N; i++)
+ if (a[i] != 2 * i || b[i] != 6 - 7 * i
+ || c[i] != 6 - 5 * i + ((i & 31) << 4))
+ abort ();
+ else
+ a[i] = c[i];
+ bar (17);
+ for (i = 0; i < N; i++)
+ if (a[i] != 6 - 5 * i + ((i & 31) << 4)
+ || b[i] != 6 - 7 * i
+ || c[i] != 23 - 2 * i + ((i & 31) << 4))
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-7.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-7.c
new file mode 100644
index 0000000000..2745c5e41d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-7.c
@@ -0,0 +1,75 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N];
+long long int b[N];
+short c[N];
+
+#pragma omp declare simd
+#pragma omp declare simd uniform(b) linear(c:3)
+__attribute__((noinline)) short
+foo (int a, long long int b, int c)
+{
+ return a + b + c;
+}
+
+__attribute__((noinline, noclone)) void
+bar (int x)
+{
+ int i;
+ if (x == 0)
+ {
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = foo (a[i], b[i], c[i]);
+ }
+ else
+ {
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = foo (a[i], x, i * 3);
+ }
+}
+
+__attribute__((noinline, noclone)) void
+baz (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = 2 * i;
+ b[i] = -7 * i + 6;
+ c[i] = (i & 31) << 4;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ baz ();
+ bar (0);
+ for (i = 0; i < N; i++)
+ if (a[i] != 2 * i || b[i] != 6 - 7 * i
+ || c[i] != 6 - 5 * i + ((i & 31) << 4))
+ abort ();
+ else
+ a[i] = c[i];
+ bar (17);
+ for (i = 0; i < N; i++)
+ if (a[i] != 6 - 5 * i + ((i & 31) << 4)
+ || b[i] != 6 - 7 * i
+ || c[i] != 23 - 2 * i + ((i & 31) << 4))
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-8.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-8.c
new file mode 100644
index 0000000000..e0b09b645d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-8.c
@@ -0,0 +1,95 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N], b[N];
+long int c[N];
+unsigned char d[N];
+
+#pragma omp declare simd simdlen(8) notinbranch
+__attribute__((noinline)) int
+foo (long int a, int b, int c)
+{
+ return a + b + c;
+}
+
+#pragma omp declare simd simdlen(8) notinbranch
+__attribute__((noinline)) long int
+bar (int a, int b, long int c)
+{
+ return a + b + c;
+}
+
+__attribute__((noinline)) void
+fn1 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+}
+
+__attribute__((noinline)) void
+fn2 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ d[i]++;
+ }
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+ d[i] /= 2;
+ }
+}
+
+__attribute__((noinline)) void
+fn3 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i * 2;
+ b[i] = 17 + (i % 37);
+ c[i] = (i & 63);
+ d[i] = 16 + i;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ fn3 ();
+ fn1 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63))
+ abort ();
+ fn3 ();
+ fn2 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63)
+ || d[i] != ((unsigned char) (17 + i)) / 2)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-simd-clone-9.c b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-9.c
new file mode 100644
index 0000000000..0c5ff4fa43
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-simd-clone-9.c
@@ -0,0 +1,95 @@
+/* { dg-require-effective-target vect_simd_clones } */
+/* { dg-additional-options "-fopenmp-simd" } */
+/* { dg-additional-options "-mavx" { target avx_runtime } } */
+
+#include "tree-vect.h"
+
+#ifndef N
+#define N 1024
+#endif
+
+int a[N], b[N];
+long int c[N];
+unsigned char d[N];
+
+#pragma omp declare simd notinbranch
+__attribute__((noinline)) static int
+foo (long int a, int b, int c)
+{
+ return a + b + c;
+}
+
+#pragma omp declare simd notinbranch
+__attribute__((noinline)) static long int
+bar (int a, int b, long int c)
+{
+ return a + b + c;
+}
+
+__attribute__((noinline)) void
+fn1 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+}
+
+__attribute__((noinline)) void
+fn2 (void)
+{
+ int i;
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ a[i] = foo (c[i], a[i], b[i]) + 6;
+ d[i]++;
+ }
+ #pragma omp simd
+ for (i = 0; i < N; i++)
+ {
+ c[i] = bar (a[i], b[i], c[i]) * 2;
+ d[i] /= 2;
+ }
+}
+
+__attribute__((noinline)) void
+fn3 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = i * 2;
+ b[i] = 17 + (i % 37);
+ c[i] = (i & 63);
+ d[i] = 16 + i;
+ }
+}
+
+int
+main ()
+{
+ int i;
+ check_vect ();
+ fn3 ();
+ fn1 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63))
+ abort ();
+ fn3 ();
+ fn2 ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i * 2 + 23 + (i % 37) + (i & 63)
+ || b[i] != 17 + (i % 37)
+ || c[i] != i * 4 + 80 + 4 * (i % 37) + 4 * (i & 63)
+ || d[i] != ((unsigned char) (17 + i)) / 2)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c b/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c
new file mode 100644
index 0000000000..6c2ff49cda
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vect/vect-singleton_1.c
@@ -0,0 +1,38 @@
+/* PR target/59843 ICE on function taking/returning vector of one float64_t. */
+
+/* { dg-do compile } */
+/* { dg-options "-Warray-bounds -O2 -fno-inline -std=c99" } */
+
+#define TEST(BASETYPE, VECTYPE, SUFFIX) \
+ typedef BASETYPE VECTYPE \
+ __attribute__ ((__vector_size__ (sizeof (BASETYPE)))); \
+ VECTYPE \
+ test_vadd_##SUFFIX (VECTYPE a, VECTYPE b) \
+ { \
+ return a + b; \
+ } \
+ \
+ void \
+ test_##SUFFIX (BASETYPE val) \
+ { \
+ VECTYPE var = { val }; \
+ BASETYPE v0 = var[0]; \
+ BASETYPE v1 = var[1]; /* { dg-warning "index value is out of bound" } */ \
+ }
+
+TEST (double, float64x1_t, f64)
+
+/* Original bug was for above type;
+ in a nod to completeness, test other types too. */
+
+TEST (long long, int64x1_t, s64)
+
+TEST (float, float32x1_t, f32)
+
+TEST (long, longx1_t, l)
+
+TEST (int, intx1_t, i)
+
+TEST (short, int16x1_t, s16)
+
+TEST (char, int8x1_t, s8)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-mult.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-mult.c
index 779913a4f2..8bc2c48dbc 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-mult.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-mult.c
@@ -15,6 +15,8 @@ typedef struct {
unsigned int b;
} ii;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -32,8 +34,8 @@ main1 ()
arr[i].b = i * 2;
iarr[i].a = i;
iarr[i].b = i * 3;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i2.c
index 25cabb693c..dca34ef1f2 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i2.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned short b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -22,8 +24,8 @@ main1 ()
{
arr[i].a = i;
arr[i].b = i * 2;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c
index 8f04b730f5..68114a6824 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-i4.c
@@ -12,6 +12,8 @@ typedef struct {
unsigned short d;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -27,8 +29,8 @@ main1 ()
arr[i].b = i * 2;
arr[i].c = 17;
arr[i].d = i+34;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-mult.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-mult.c
index cd941a827f..0b21522498 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-mult.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u16-mult.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned short b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -26,8 +28,8 @@ main1 ()
arr[i].a = i;
arr[i].b = i * 2;
iarr[i] = i * 3;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c
index 9b0142b1d8..22030b06ba 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i2-gap.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned char b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -22,8 +24,8 @@ main1 ()
{
arr[i].a = i;
arr[i].b = i * 2;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c
index 6e3c9f1b9a..ca8bd12825 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2-big-array.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -45,8 +47,8 @@ main1 ()
check_res[i].h = arr[i].f;
check_res[i].g = arr[i].f - arr[i].a;
- if (arr[i].a == 178)
- abort ();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c
index 4fb5494a4d..b1ce8052a3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap2.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -34,8 +36,8 @@ main1 ()
arr[i].f = i * 2 + 2;
arr[i].g = i - 3;
arr[i].h = 56;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c
index 5a446317ca..188e288238 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7-big-array.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -50,8 +52,8 @@ main1 ()
check_res[i].h = arr[i].d;
check_res[i].g = u + t;
- if (arr[i].a == 178)
- abort ();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c
index cc09fa608d..87e6ce22e6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-a-u8-i8-gap7.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 ()
{
@@ -35,8 +37,8 @@ main1 ()
arr[i].f = i * 5;
arr[i].g = i - 3;
arr[i].h = 67;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
for (i = 0; i < N; i++)
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-mult-char-ls.c b/gcc/testsuite/gcc.dg/vect/vect-strided-mult-char-ls.c
index 3c8062cea1..cc877293ce 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-mult-char-ls.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-mult-char-ls.c
@@ -15,6 +15,8 @@ typedef struct {
unsigned int b;
} ii;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr, ii *iarr)
{
@@ -62,8 +64,8 @@ int main (void)
arr[i].b = i * 2;
iarr[i].a = i;
iarr[i].b = i * 3;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr, iarr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-mult.c b/gcc/testsuite/gcc.dg/vect/vect-strided-mult.c
index 49399c4e78..3d2de09cbb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-mult.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-mult.c
@@ -15,6 +15,8 @@ typedef struct {
unsigned int b;
} ii;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr, ii *iarr)
{
@@ -62,8 +64,8 @@ int main (void)
arr[i].b = i * 2;
iarr[i].a = i;
iarr[i].b = i * 3;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr, iarr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-same-dr.c b/gcc/testsuite/gcc.dg/vect/vect-strided-same-dr.c
index f16aa1a94d..9768d72636 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-same-dr.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-same-dr.c
@@ -12,6 +12,8 @@ typedef struct {
s buffer1[N], buffer2[N];
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s * __restrict__ pIn, s* __restrict__ pOut)
{
@@ -61,8 +63,8 @@ int main (void)
buffer1[i].b = i + 8;
buffer2[i].a = i * 3;
buffer2[i].b = i * 2;
- if (buffer1[i].a == 500)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
check_vect ();
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i2.c
index 6694897316..57006846ff 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i2.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned short b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -46,8 +48,8 @@ int main (void)
{
arr[i].a = i;
arr[i].b = i * 2;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i4.c
index 82a6c60567..2e6fb02b81 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u16-i4.c
@@ -12,6 +12,8 @@ typedef struct {
unsigned short d;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -59,8 +61,8 @@ int main (void)
arr[i].b = i * 2;
arr[i].c = 17;
arr[i].d = i+34;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i4.c
index d743fac1d6..4c2048820a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i4.c
@@ -12,6 +12,8 @@ typedef struct {
int d;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -54,8 +56,8 @@ int main (void)
arr[i].b = i * 2;
arr[i].c = 17;
arr[i].d = i+34;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i8.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i8.c
index 663f376324..4dbd8d9ab3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u32-i8.c
@@ -16,6 +16,8 @@ typedef struct {
int h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -68,8 +70,8 @@ int main (void)
arr[i].f = i * 5;
arr[i].g = i - 3;
arr[i].h = 56;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2-gap.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2-gap.c
index 8055c9b5f8..b83d54e2e3 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2-gap.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2-gap.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned char b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -62,8 +64,8 @@ int main (void)
{
arr[i].a = i;
arr[i].b = i * 2;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2.c
index be06437550..962ba51bd5 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i2.c
@@ -10,6 +10,8 @@ typedef struct {
unsigned char b;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -45,8 +47,8 @@ int main (void)
{
arr[i].a = i;
arr[i].b = i * 2;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c
index cc1b949891..473f560511 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2-big-array.c
@@ -18,6 +18,8 @@ typedef struct {
s check_res[N];
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -80,8 +82,9 @@ int main (void)
check_res[i].e = arr[i].f - arr[i].b;
check_res[i].h = arr[i].f;
check_res[i].g = arr[i].f - arr[i].b;
- if (arr[i].a == 178)
- abort ();
+
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c
index 349e869392..4037572d97 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap2.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -69,8 +71,8 @@ int main (void)
arr[i].f = i * 2 + 2;
arr[i].g = i - 3;
arr[i].h = 56;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c
index 916fdf4d4f..da4b484b1a 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-big-array.c
@@ -18,6 +18,8 @@ typedef struct {
s check_res[N];
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -103,8 +105,8 @@ int main (void)
check_res[i].h = arr[i].c;
check_res[i].g = arr[i].b + arr[i].c;
- if (arr[i].a == 178)
- abort ();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c
index 7cfac72d7f..07e1a803f7 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4-unknown.c
@@ -17,6 +17,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr, int n)
{
@@ -102,8 +104,8 @@ int main (void)
arr[i].f = 16;
arr[i].g = 3;
arr[i].h = 56;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr, N-2);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c
index 537bcc87df..0079667048 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap4.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -89,8 +91,8 @@ int main (void)
arr[i].f = i * 5;
arr[i].g = i - 3;
arr[i].h = 56;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c
index ecacefab9a..9697aaa8b6 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7-big-array.c
@@ -18,6 +18,8 @@ typedef struct {
s check_res[N];
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -91,8 +93,8 @@ int main (void)
check_res[i].h = arr[i].d;
check_res[i].g = u + t;
- if (arr[i].a == 178)
- abort ();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c
index 76cb66d086..854a4aaabb 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8-gap7.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -74,8 +76,8 @@ int main (void)
arr[i].f = i * 5;
arr[i].g = i - 3;
arr[i].h = 67;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8.c b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8.c
index ff80c0418e..37a0954001 100644
--- a/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8.c
+++ b/gcc/testsuite/gcc.dg/vect/vect-strided-u8-i8.c
@@ -16,6 +16,8 @@ typedef struct {
unsigned char h;
} s;
+volatile int y = 0;
+
__attribute__ ((noinline)) int
main1 (s *arr)
{
@@ -76,8 +78,8 @@ int main (void)
arr[i].f = i + 5;
arr[i].g = i + 3;
arr[i].h = 67;
- if (arr[i].a == 178)
- abort();
+ if (y) /* Avoid vectorization. */
+ abort ();
}
main1 (arr);
diff --git a/gcc/testsuite/gcc.dg/vect/vect.exp b/gcc/testsuite/gcc.dg/vect/vect.exp
index b6d4a33113..e8d866b991 100644
--- a/gcc/testsuite/gcc.dg/vect/vect.exp
+++ b/gcc/testsuite/gcc.dg/vect/vect.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2004, 2005, 2006, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +18,7 @@
# Load support procs.
load_lib gcc-dg.exp
+load_lib clearcap.exp
# Set up flags used for tests that don't specify options.
global DEFAULT_VECTCFLAGS
@@ -40,10 +40,11 @@ if ![check_vect_support_and_set_flags] {
}
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-ftree-vectorize" "-fno-vect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-ftree-vectorize" "-fno-vect-cost-model" "-fno-common"
# Initialize `dg'.
dg-init
+clearcap-init
global VEC_FLAGS
set VEC_FLAGS $DEFAULT_VECTCFLAGS
@@ -77,7 +78,7 @@ lappend VECT_SLP_CFLAGS "-fdump-tree-slp-details"
# Main loop.
set VECT_ADDITIONAL_FLAGS [list ""]
if { [check_effective_target_lto] } {
- lappend VECT_ADDITIONAL_FLAGS "-flto"
+ lappend VECT_ADDITIONAL_FLAGS "-flto -ffat-lto-objects"
}
foreach flags $VECT_ADDITIONAL_FLAGS {
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/pr*.\[cS\]]] \
@@ -157,7 +158,8 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/section-anchors-*.\[cS\]]]
# alignment-sensitive -fsection-anchors tests
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
-lappend DEFAULT_VECTCFLAGS "-fsection-anchors" "-fdump-ipa-increase_alignment"
+lappend DEFAULT_VECTCFLAGS "-fsection-anchors" \
+ "-fdump-ipa-increase_alignment-details"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/aligned-section-anchors-*.\[cS\]]] \
"" $DEFAULT_VECTCFLAGS
@@ -286,4 +288,5 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/no-tree-sra-bb-slp-*.\[cS\]]
set dg-do-what-default ${save-dg-do-what-default}
# All done.
+clearcap-finish
dg-finish
diff --git a/gcc/testsuite/gcc.dg/vector-2.c b/gcc/testsuite/gcc.dg/vector-2.c
deleted file mode 100644
index 5f9f9561d7..0000000000
--- a/gcc/testsuite/gcc.dg/vector-2.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "" } */
-
-/* Check for application of |, ^, and & on vector types. */
-#define vector __attribute__((vector_size(16) ))
-
-vector float a;
-vector int a1;
-vector float b;
-vector int b1;
-
-int f(void)
-{
- a = a | b; /* { dg-error "" } */
- a = a & b; /* { dg-error "" } */
- a = a ^ b; /* { dg-error "" } */
- a1 = a1 | b1;
- a1 = a1 & b1;
- a1 = a1 ^ b1;
-}
-
diff --git a/gcc/testsuite/gcc.dg/vector-3.c b/gcc/testsuite/gcc.dg/vector-3.c
deleted file mode 100644
index 3f86698b83..0000000000
--- a/gcc/testsuite/gcc.dg/vector-3.c
+++ /dev/null
@@ -1,5 +0,0 @@
-/* { dg-do compile } */
-
-/* Check that we error out when using vector_size on the bool type. */
-
-__attribute__((vector_size(16) )) _Bool a; /* { dg-error "" } */
diff --git a/gcc/testsuite/gcc.dg/vector-compare-1.c b/gcc/testsuite/gcc.dg/vector-compare-1.c
deleted file mode 100644
index f6c1b404b0..0000000000
--- a/gcc/testsuite/gcc.dg/vector-compare-1.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
-
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-void
-foo (vector (4, int) x, vector (4, float) y)
-{
- vector (4, int) p4;
- vector (4, int) r4;
- vector (4, unsigned int) q4;
- vector (8, int) r8;
- vector (4, float) f4;
-
- r4 = x > y; /* { dg-error "comparing vectors with different element types" } */
- r8 = (x != p4); /* { dg-error "incompatible types when assigning to type" } */
- r8 == r4; /* { dg-error "comparing vectors with different number of elements" } */
-}
diff --git a/gcc/testsuite/gcc.dg/vector-compare-2.c b/gcc/testsuite/gcc.dg/vector-compare-2.c
deleted file mode 100644
index 8cbcf0787c..0000000000
--- a/gcc/testsuite/gcc.dg/vector-compare-2.c
+++ /dev/null
@@ -1,28 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-fno-common" { target hppa*-*-hpux* } } */
-/* { dg-options "-mabi=altivec" { target { { powerpc*-*-linux* } && ilp32 } } } */
-
-/* Test if C_MAYBE_CONST are folded correctly when
- creating VEC_COND_EXPR. */
-
-typedef int vec __attribute__((vector_size(16)));
-
-vec i,j;
-extern vec a, b, c;
-
-extern int p, q, z;
-extern vec foo (int);
-
-vec
-foo (int x)
-{
- return foo (p ? q :z) > a;
-}
-
-vec
-bar (int x)
-{
- return b > foo (p ? q :z);
-}
-
-
diff --git a/gcc/testsuite/gcc.dg/vector-shift-2.c b/gcc/testsuite/gcc.dg/vector-shift-2.c
new file mode 100644
index 0000000000..380f2dfb30
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vector-shift-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fdump-tree-ccp1" } */
+
+typedef unsigned vec __attribute__ ((vector_size (4*sizeof(int))));
+void
+f (vec *a)
+{
+ vec s = { 5, 5, 5, 5 };
+ *a = *a << s;
+}
+
+/* { dg-final { scan-tree-dump "<< 5" "ccp1" } } */
+/* { dg-final { cleanup-tree-dump "ccp1" } } */
diff --git a/gcc/testsuite/gcc.dg/vector-shift.c b/gcc/testsuite/gcc.dg/vector-shift.c
index f2b12ba73f..2a4d415c5f 100644
--- a/gcc/testsuite/gcc.dg/vector-shift.c
+++ b/gcc/testsuite/gcc.dg/vector-shift.c
@@ -1,14 +1,13 @@
/* { dg-do compile } */
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
+/* { dg-options "-fdump-tree-original" } */
-int main (int argc, char *argv[]) {
- vector(4,char) vchar = {1,2,3,4};
- vector(4, int) vint = {1,1,1,1};
-
- vint <<= vchar; /* { dg-error "nvalid operands to binary <<" } */
- vchar >>= vint; /* { dg-error "nvalid operands to binary >>" } */
+typedef unsigned vec __attribute__ ((vector_size (4 * sizeof (int))));
- return 0;
+void
+f (vec *x)
+{
+ *x = (*x << 4) << 3;
}
+/* { dg-final { scan-tree-dump "<< 7" "original" } } */
+/* { dg-final { cleanup-tree-dump "original" } } */
diff --git a/gcc/testsuite/gcc.dg/vector-shift1.c b/gcc/testsuite/gcc.dg/vector-shift1.c
deleted file mode 100644
index 51bc0ad398..0000000000
--- a/gcc/testsuite/gcc.dg/vector-shift1.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* { dg-do compile } */
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-int main (int argc, char *argv[]) {
- vector(4, float) vfloat0 = {1., 2., 3., 4.};
- vector(4, float) vfloat1 = {1., 2., 3., 4.};
-
- vector(4, int) vint = {1, 1, 1, 1 };
-
- vint <<= vfloat0; /* { dg-error "nvalid operands to binary <<" } */
- vfloat0 >>= vint; /* { dg-error "nvalid operands to binary >>" } */
-
- vfloat0 <<= vfloat1; /* { dg-error "nvalid operands to binary <<" } */
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/vector-shift3.c b/gcc/testsuite/gcc.dg/vector-shift3.c
deleted file mode 100644
index 38a9843d11..0000000000
--- a/gcc/testsuite/gcc.dg/vector-shift3.c
+++ /dev/null
@@ -1,16 +0,0 @@
-/* { dg-do compile } */
-
-#define vector(elcount, type) \
-__attribute__((vector_size((elcount)*sizeof(type)))) type
-
-
-int main (int argc, char *argv[]) {
- vector(8, short) v0 = {argc,2,3,4,5,6,7};
- short sc;
-
-
- scalar1 <<= v0; /* { dg-error ".*scalar1.*undeclared" } */
-
- return 0;
-}
-
diff --git a/gcc/testsuite/gcc.dg/vector-subscript-1.c b/gcc/testsuite/gcc.dg/vector-subscript-1.c
deleted file mode 100644
index 7cc50af999..0000000000
--- a/gcc/testsuite/gcc.dg/vector-subscript-1.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-w" } */
-
-#define vector __attribute__((vector_size(16) ))
-/* Check that vector[index] works and index[vector] is rejected. */
-
-float vf(vector float a)
-{
- return 0[a]; /* { dg-error "subscripted value is neither array nor pointer nor vector" } */
-}
-
-
-float fv(vector float a)
-{
- return a[0];
-}
-
diff --git a/gcc/testsuite/gcc.dg/vector-subscript-2.c b/gcc/testsuite/gcc.dg/vector-subscript-2.c
deleted file mode 100644
index 3a8d522ad4..0000000000
--- a/gcc/testsuite/gcc.dg/vector-subscript-2.c
+++ /dev/null
@@ -1,13 +0,0 @@
-/* { dg-do compile } */
-
-/* Check that subscripting of vectors work with register storage class decls. */
-
-#define vector __attribute__((vector_size(16) ))
-
-
-float vf(int i)
-{
- register vector float a;
- return a[0];
-}
-
diff --git a/gcc/testsuite/gcc.dg/vector-subscript-3.c b/gcc/testsuite/gcc.dg/vector-subscript-3.c
deleted file mode 100644
index 55ed2b3702..0000000000
--- a/gcc/testsuite/gcc.dg/vector-subscript-3.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* Check the case when index is out of bound */
-/* { dg-do compile } */
-/* { dg-options "-Warray-bounds" } */
-
-#define vector __attribute__((vector_size(16) ))
-
-
-int test0(void)
-{
- vector int a;
- return a[10]; /* { dg-warning "index value is out of bound" } */
-}
-
-int test1(void)
-{
- vector int a;
- return a[-1]; /* { dg-warning "index value is out of bound" } */
-}
-
diff --git a/gcc/testsuite/gcc.dg/visibility-21.c b/gcc/testsuite/gcc.dg/visibility-21.c
new file mode 100644
index 0000000000..59d1b45674
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/visibility-21.c
@@ -0,0 +1,14 @@
+/* Test visibility attribute on function definition. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fsection-anchors" } */
+/* { dg-require-visibility "" } */
+/* { dg-require-weak "" } */
+/* { dg-require-effective-target section_anchors } */
+/* { dg-final { scan-assembler-not "ANCHOR" } } */
+
+int __attribute__((weak, visibility("hidden"))) weak_hidden[3];
+
+int *f_weak_hidden ()
+{
+ return weak_hidden;
+}
diff --git a/gcc/testsuite/gcc.dg/vla-11.c b/gcc/testsuite/gcc.dg/vla-11.c
index 8948e6b77a..9c23e860a5 100644
--- a/gcc/testsuite/gcc.dg/vla-11.c
+++ b/gcc/testsuite/gcc.dg/vla-11.c
@@ -7,7 +7,7 @@
/* { dg-options "-std=c99 -pedantic-errors" } */
void foo11a(int x[sizeof(int *(*)[*])]); /* { dg-warning "not in a declaration" } */
-void foo11b(__SIZE_TYPE__ x, int y[(__SIZE_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */
+void foo11b(__SIZE_TYPE__ x, int y[(__UINTPTR_TYPE__)(int (*)[*])x]); /* { dg-warning "not in a declaration" } */
void foo11c(struct s { int (*x)[*]; } *y); /* { dg-error "a member of a structure or union cannot have a variably modified type" "variably modified" } */
/* { dg-warning "'struct s' declared inside parameter list" "struct decl" { target *-*-* } 11 } */
/* { dg-warning "its scope is only this definition or declaration" "struct scope" { target *-*-* } 11 } */
diff --git a/gcc/testsuite/gcc.dg/vmx/3b-13.c b/gcc/testsuite/gcc.dg/vmx/3b-13.c
index 146f737aeb..42c3ca4fa8 100644
--- a/gcc/testsuite/gcc.dg/vmx/3b-13.c
+++ b/gcc/testsuite/gcc.dg/vmx/3b-13.c
@@ -3,7 +3,7 @@
vector signed int
f(vector float a, vector signed int b)
{
- return vec_splat(vec_cts(vec_ctf(vec_ctu(a, 31),0),9),30);
+ return vec_splat(vec_cts(vec_ctf(vec_ctu(a, 31),0),9),2);
}
static void test()
diff --git a/gcc/testsuite/gcc.dg/vmx/3c-01a.c b/gcc/testsuite/gcc.dg/vmx/3c-01a.c
index 2499ca6659..56f3c8708b 100644
--- a/gcc/testsuite/gcc.dg/vmx/3c-01a.c
+++ b/gcc/testsuite/gcc.dg/vmx/3c-01a.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
#include <altivec.h>
typedef const volatile unsigned int _1;
typedef const unsigned int _2;
diff --git a/gcc/testsuite/gcc.dg/vmx/eg-5.c b/gcc/testsuite/gcc.dg/vmx/eg-5.c
index 0b37e69d19..eb4b4e0283 100644
--- a/gcc/testsuite/gcc.dg/vmx/eg-5.c
+++ b/gcc/testsuite/gcc.dg/vmx/eg-5.c
@@ -6,12 +6,10 @@ matvecmul4 (vector float c0, vector float c1, vector float c2,
{
/* Set result to a vector of f32 0's */
vector float result = ((vector float){0.,0.,0.,0.});
-
result = vec_madd (c0, vec_splat (v, 0), result);
result = vec_madd (c1, vec_splat (v, 1), result);
result = vec_madd (c2, vec_splat (v, 2), result);
result = vec_madd (c3, vec_splat (v, 3), result);
-
return result;
}
diff --git a/gcc/testsuite/gcc.dg/vmx/extract-be-order.c b/gcc/testsuite/gcc.dg/vmx/extract-be-order.c
new file mode 100644
index 0000000000..5c09471d99
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/extract-be-order.c
@@ -0,0 +1,33 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char va = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vb = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vc = {0,1,2,3,4,5,6,7};
+ vector signed short vd = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int ve = {0,1,2,3};
+ vector signed int vf = {-2,-1,0,1};
+ vector float vg = {-2.0f,-1.0f,0.0f,1.0f};
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ check (vec_extract (va, 5) == 10, "vec_extract (va, 5)");
+ check (vec_extract (vb, 0) == 7, "vec_extract (vb, 0)");
+ check (vec_extract (vc, 7) == 0, "vec_extract (vc, 7)");
+ check (vec_extract (vd, 3) == 0, "vec_extract (vd, 3)");
+ check (vec_extract (ve, 2) == 1, "vec_extract (ve, 2)");
+ check (vec_extract (vf, 1) == 0, "vec_extract (vf, 1)");
+ check (vec_extract (vg, 0) == 1.0f, "vec_extract (vg, 0)");
+#else
+ check (vec_extract (va, 5) == 5, "vec_extract (va, 5)");
+ check (vec_extract (vb, 0) == -8, "vec_extract (vb, 0)");
+ check (vec_extract (vc, 7) == 7, "vec_extract (vc, 7)");
+ check (vec_extract (vd, 3) == -1, "vec_extract (vd, 3)");
+ check (vec_extract (ve, 2) == 2, "vec_extract (ve, 2)");
+ check (vec_extract (vf, 1) == -1, "vec_extract (vf, 1)");
+ check (vec_extract (vg, 0) == -2.0f, "vec_extract (vg, 0)");
+#endif
+}
+
diff --git a/gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c
new file mode 100644
index 0000000000..6428ea5d8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/extract-vsx-be-order.c
@@ -0,0 +1,19 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector long long vl = {0, 1};
+ vector double vd = {0.0, 1.0};
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ check (vec_extract (vl, 0) == 1, "vl, 0");
+ check (vec_extract (vd, 1) == 0.0, "vd, 1");
+#else
+ check (vec_extract (vl, 0) == 0, "vl, 0");
+ check (vec_extract (vd, 1) == 1.0, "vd, 1");
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/extract-vsx.c b/gcc/testsuite/gcc.dg/vmx/extract-vsx.c
new file mode 100644
index 0000000000..cd34a2ae3d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/extract-vsx.c
@@ -0,0 +1,16 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector long long vl = {0, 1};
+ vector double vd = {0.0, 1.0};
+
+ check (vec_extract (vl, 0) == 0, "vec_extract, vl, 0");
+ check (vec_extract (vd, 1) == 1.0, "vec_extract, vd, 1");
+ check (vl[0] == 0, "[], vl, 0");
+ check (vd[1] == 1.0, "[], vd, 0");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/extract.c b/gcc/testsuite/gcc.dg/vmx/extract.c
new file mode 100644
index 0000000000..6fc4725570
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/extract.c
@@ -0,0 +1,21 @@
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char va = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vb = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vc = {0,1,2,3,4,5,6,7};
+ vector signed short vd = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int ve = {0,1,2,3};
+ vector signed int vf = {-2,-1,0,1};
+ vector float vg = {-2.0f,-1.0f,0.0f,1.0f};
+
+ check (vec_extract (va, 5) == 5, "vec_extract (va, 5)");
+ check (vec_extract (vb, 0) == -8, "vec_extract (vb, 0)");
+ check (vec_extract (vc, 7) == 7, "vec_extract (vc, 7)");
+ check (vec_extract (vd, 3) == -1, "vec_extract (vd, 3)");
+ check (vec_extract (ve, 2) == 2, "vec_extract (ve, 2)");
+ check (vec_extract (vf, 1) == -1, "vec_extract (vf, 1)");
+ check (vec_extract (vg, 0) == -2.0f, "vec_extract (vg, 0)");
+}
+
diff --git a/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c b/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c
index 97ef144881..3e0e6a0793 100644
--- a/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c
+++ b/gcc/testsuite/gcc.dg/vmx/gcc-bug-i.c
@@ -13,12 +13,27 @@
#define DO_INLINE __attribute__ ((always_inline))
#define DONT_INLINE __attribute__ ((noinline))
+#ifdef __LITTLE_ENDIAN__
+static inline DO_INLINE int inline_me(vector signed short data)
+{
+ union {vector signed short v; signed short s[8];} u;
+ signed short x;
+ unsigned char x1, x2;
+
+ u.v = data;
+ x = u.s[7];
+ x1 = (x >> 8) & 0xff;
+ x2 = x & 0xff;
+ return ((x2 << 8) | x1);
+}
+#else
static inline DO_INLINE int inline_me(vector signed short data)
{
union {vector signed short v; signed short s[8];} u;
u.v = data;
return u.s[7];
}
+#endif
static DONT_INLINE int foo(vector signed short data)
{
diff --git a/gcc/testsuite/gcc.dg/vmx/insert-be-order.c b/gcc/testsuite/gcc.dg/vmx/insert-be-order.c
new file mode 100644
index 0000000000..592ef28c0f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/insert-be-order.c
@@ -0,0 +1,65 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char va = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vb = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vc = {0,1,2,3,4,5,6,7};
+ vector signed short vd = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int ve = {0,1,2,3};
+ vector signed int vf = {-2,-1,0,1};
+ vector float vg = {-2.0f,-1.0f,0.0f,1.0f};
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ check (vec_all_eq (vec_insert (16, va, 5),
+ ((vector unsigned char)
+ {0,1,2,3,4,5,6,7,8,9,16,11,12,13,14,15})),
+ "vec_insert (va LE)");
+ check (vec_all_eq (vec_insert (-16, vb, 0),
+ ((vector signed char)
+ {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,-16})),
+ "vec_insert (vb LE)");
+ check (vec_all_eq (vec_insert (16, vc, 7),
+ ((vector unsigned short){16,1,2,3,4,5,6,7})),
+ "vec_insert (vc LE)");
+ check (vec_all_eq (vec_insert (-16, vd, 3),
+ ((vector signed short){-4,-3,-2,-1,-16,1,2,3})),
+ "vec_insert (vd LE)");
+ check (vec_all_eq (vec_insert (16, ve, 2),
+ ((vector unsigned int){0,16,2,3})),
+ "vec_insert (ve LE)");
+ check (vec_all_eq (vec_insert (-16, vf, 1),
+ ((vector signed int){-2,-1,-16,1})),
+ "vec_insert (vf LE)");
+ check (vec_all_eq (vec_insert (-16.0f, vg, 0),
+ ((vector float){-2.0f,-1.0f,0.0f,-16.0f})),
+ "vec_insert (vg LE)");
+#else
+ check (vec_all_eq (vec_insert (16, va, 5),
+ ((vector unsigned char)
+ {0,1,2,3,4,16,6,7,8,9,10,11,12,13,14,15})),
+ "vec_insert (va BE)");
+ check (vec_all_eq (vec_insert (-16, vb, 0),
+ ((vector signed char)
+ {-16,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7})),
+ "vec_insert (vb BE)");
+ check (vec_all_eq (vec_insert (16, vc, 7),
+ ((vector unsigned short){0,1,2,3,4,5,6,16})),
+ "vec_insert (vc BE)");
+ check (vec_all_eq (vec_insert (-16, vd, 3),
+ ((vector signed short){-4,-3,-2,-16,0,1,2,3})),
+ "vec_insert (vd BE)");
+ check (vec_all_eq (vec_insert (16, ve, 2),
+ ((vector unsigned int){0,1,16,3})),
+ "vec_insert (ve BE)");
+ check (vec_all_eq (vec_insert (-16, vf, 1),
+ ((vector signed int){-2,-16,0,1})),
+ "vec_insert (vf BE)");
+ check (vec_all_eq (vec_insert (-16.0f, vg, 0),
+ ((vector float){-16.0f,-1.0f,0.0f,1.0f})),
+ "vec_insert (vg BE)");
+#endif
+}
+
diff --git a/gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c
new file mode 100644
index 0000000000..672fc449eb
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/insert-vsx-be-order.c
@@ -0,0 +1,34 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static int vec_long_long_eq (vector long long x, vector long long y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static int vec_dbl_eq (vector double x, vector double y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static void test()
+{
+ vector long long vl = {0, 1};
+ vector double vd = {0.0, 1.0};
+ vector long long vlr = vec_insert (2, vl, 0);
+ vector double vdr = vec_insert (2.0, vd, 1);
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector long long vler = {0, 2};
+ vector double vder = {2.0, 1.0};
+#else
+ vector long long vler = {2, 1};
+ vector double vder = {0.0, 2.0};
+#endif
+
+ check (vec_long_long_eq (vlr, vler), "vl");
+ check (vec_dbl_eq (vdr, vder), "vd");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/insert-vsx.c b/gcc/testsuite/gcc.dg/vmx/insert-vsx.c
new file mode 100644
index 0000000000..afb9c70166
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/insert-vsx.c
@@ -0,0 +1,28 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static int vec_long_long_eq (vector long long x, vector long long y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static int vec_dbl_eq (vector double x, vector double y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static void test()
+{
+ vector long long vl = {0, 1};
+ vector double vd = {0.0, 1.0};
+ vector long long vlr = vec_insert (2, vl, 0);
+ vector double vdr = vec_insert (2.0, vd, 1);
+ vector long long vler = {2, 1};
+ vector double vder = {0.0, 2.0};
+
+ check (vec_long_long_eq (vlr, vler), "vl");
+ check (vec_dbl_eq (vdr, vder), "vd");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/insert.c b/gcc/testsuite/gcc.dg/vmx/insert.c
new file mode 100644
index 0000000000..39cd75d879
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/insert.c
@@ -0,0 +1,37 @@
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char va = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vb = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vc = {0,1,2,3,4,5,6,7};
+ vector signed short vd = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int ve = {0,1,2,3};
+ vector signed int vf = {-2,-1,0,1};
+ vector float vg = {-2.0f,-1.0f,0.0f,1.0f};
+
+ check (vec_all_eq (vec_insert (16, va, 5),
+ ((vector unsigned char)
+ {0,1,2,3,4,16,6,7,8,9,10,11,12,13,14,15})),
+ "vec_insert (va)");
+ check (vec_all_eq (vec_insert (-16, vb, 0),
+ ((vector signed char)
+ {-16,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7})),
+ "vec_insert (vb)");
+ check (vec_all_eq (vec_insert (16, vc, 7),
+ ((vector unsigned short){0,1,2,3,4,5,6,16})),
+ "vec_insert (vc)");
+ check (vec_all_eq (vec_insert (-16, vd, 3),
+ ((vector signed short){-4,-3,-2,-16,0,1,2,3})),
+ "vec_insert (vd)");
+ check (vec_all_eq (vec_insert (16, ve, 2),
+ ((vector unsigned int){0,1,16,3})),
+ "vec_insert (ve)");
+ check (vec_all_eq (vec_insert (-16, vf, 1),
+ ((vector signed int){-2,-16,0,1})),
+ "vec_insert (vf)");
+ check (vec_all_eq (vec_insert (-16.0f, vg, 0),
+ ((vector float){-16.0f,-1.0f,0.0f,1.0f})),
+ "vec_insert (vg)");
+}
+
diff --git a/gcc/testsuite/gcc.dg/vmx/ld-be-order.c b/gcc/testsuite/gcc.dg/vmx/ld-be-order.c
new file mode 100644
index 0000000000..903b997c9a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ld-be-order.c
@@ -0,0 +1,107 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ svbc[i] = (i % 2) ? 0xff : 0;
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ svbs[i] = (i % 2) ? 0xffff : 0;
+ svp[i] = i;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svbi[i] = (i % 2) ? 0xffffffff : 0;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char evuc = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
+ vector signed char evsc = {7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8};
+ vector bool char evbc = {255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0};
+ vector unsigned short evus = {7,6,5,4,3,2,1,0};
+ vector signed short evss = {3,2,1,0,-1,-2,-3,-4};
+ vector bool short evbs = {65535,0,65535,0,65535,0,65535,0};
+ vector pixel evp = {7,6,5,4,3,2,1,0};
+ vector unsigned int evui = {3,2,1,0};
+ vector signed int evsi = {1,0,-1,-2};
+ vector bool int evbi = {0xffffffff,0,0xffffffff,0};
+ vector float evf = {3.0,2.0,1.0,0.0};
+#else
+ vector unsigned char evuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char evsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char evbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short evus = {0,1,2,3,4,5,6,7};
+ vector signed short evss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short evbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel evp = {0,1,2,3,4,5,6,7};
+ vector unsigned int evui = {0,1,2,3};
+ vector signed int evsi = {-2,-1,0,1};
+ vector bool int evbi = {0,0xffffffff,0,0xffffffff};
+ vector float evf = {0.0,1.0,2.0,3.0};
+#endif
+
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector bool char vbc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector bool short vbs;
+ vector pixel vp;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector bool int vbi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_ld (0, (vector unsigned char *)svuc);
+ vsc = vec_ld (0, (vector signed char *)svsc);
+ vbc = vec_ld (0, (vector bool char *)svbc);
+ vus = vec_ld (0, (vector unsigned short *)svus);
+ vss = vec_ld (0, (vector signed short *)svss);
+ vbs = vec_ld (0, (vector bool short *)svbs);
+ vp = vec_ld (0, (vector pixel *)svp);
+ vui = vec_ld (0, (vector unsigned int *)svui);
+ vsi = vec_ld (0, (vector signed int *)svsi);
+ vbi = vec_ld (0, (vector bool int *)svbi);
+ vf = vec_ld (0, (vector float *)svf);
+
+ check (vec_all_eq (vuc, evuc), "vuc");
+ check (vec_all_eq (vsc, evsc), "vsc");
+ check (vec_all_eq (vbc, evbc), "vbc");
+ check (vec_all_eq (vus, evus), "vus");
+ check (vec_all_eq (vss, evss), "vss");
+ check (vec_all_eq (vbs, evbs), "vbs");
+ check (vec_all_eq (vp, evp ), "vp" );
+ check (vec_all_eq (vui, evui), "vui");
+ check (vec_all_eq (vsi, evsi), "vsi");
+ check (vec_all_eq (vbi, evbi), "vbi");
+ check (vec_all_eq (vf, evf ), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c
new file mode 100644
index 0000000000..fc81beb0d0
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ld-vsx-be-order.c
@@ -0,0 +1,44 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ svul[i] = i;
+ svd[i] = i * 1.0;
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned long long evul = {1,0};
+ vector double evd = {1.0,0.0};
+#else
+ vector unsigned long long evul = {0,1};
+ vector double evd = {0.0,1.0};
+#endif
+
+ vector unsigned long long vul;
+ vector double vd;
+ unsigned i;
+
+ init ();
+
+ vul = vec_ld (0, (vector unsigned long long *)svul);
+ vd = vec_ld (0, (vector double *)svd);
+
+ for (i = 0; i < 2; ++i)
+ {
+ check (vul[i] == evul[i], "vul");
+ check (vd[i] == evd[i], "vd" );
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ld-vsx.c b/gcc/testsuite/gcc.dg/vmx/ld-vsx.c
new file mode 100644
index 0000000000..9d2a529f8b
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ld-vsx.c
@@ -0,0 +1,39 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ svul[i] = i;
+ svd[i] = i * 1.0;
+ }
+}
+
+static void test ()
+{
+ vector unsigned long long evul = {0,1};
+ vector double evd = {0.0,1.0};
+
+ vector unsigned long long vul;
+ vector double vd;
+ unsigned i;
+
+ init ();
+
+ vul = vec_ld (0, (vector unsigned long long *)svul);
+ vd = vec_ld (0, (vector double *)svd);
+
+ for (i = 0; i < 2; ++i)
+ {
+ check (vul[i] == evul[i], "vul");
+ check (vd[i] == evd[i], "vd" );
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ld.c b/gcc/testsuite/gcc.dg/vmx/ld.c
new file mode 100644
index 0000000000..851fbd58a5
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ld.c
@@ -0,0 +1,91 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ svbc[i] = (i % 2) ? 0xff : 0;
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ svbs[i] = (i % 2) ? 0xffff : 0;
+ svp[i] = i;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svbi[i] = (i % 2) ? 0xffffffff : 0;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+ vector unsigned char evuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char evsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char evbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short evus = {0,1,2,3,4,5,6,7};
+ vector signed short evss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short evbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel evp = {0,1,2,3,4,5,6,7};
+ vector unsigned int evui = {0,1,2,3};
+ vector signed int evsi = {-2,-1,0,1};
+ vector bool int evbi = {0,0xffffffff,0,0xffffffff};
+ vector float evf = {0.0,1.0,2.0,3.0};
+
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector bool char vbc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector bool short vbs;
+ vector pixel vp;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector bool int vbi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_ld (0, (vector unsigned char *)svuc);
+ vsc = vec_ld (0, (vector signed char *)svsc);
+ vbc = vec_ld (0, (vector bool char *)svbc);
+ vus = vec_ld (0, (vector unsigned short *)svus);
+ vss = vec_ld (0, (vector signed short *)svss);
+ vbs = vec_ld (0, (vector bool short *)svbs);
+ vp = vec_ld (0, (vector pixel *)svp);
+ vui = vec_ld (0, (vector unsigned int *)svui);
+ vsi = vec_ld (0, (vector signed int *)svsi);
+ vbi = vec_ld (0, (vector bool int *)svbi);
+ vf = vec_ld (0, (vector float *)svf);
+
+ check (vec_all_eq (vuc, evuc), "vuc");
+ check (vec_all_eq (vsc, evsc), "vsc");
+ check (vec_all_eq (vbc, evbc), "vbc");
+ check (vec_all_eq (vus, evus), "vus");
+ check (vec_all_eq (vss, evss), "vss");
+ check (vec_all_eq (vbs, evbs), "vbs");
+ check (vec_all_eq (vp, evp ), "vp" );
+ check (vec_all_eq (vui, evui), "vui");
+ check (vec_all_eq (vsi, evsi), "vsi");
+ check (vec_all_eq (vbi, evbi), "vbi");
+ check (vec_all_eq (vf, evf ), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/lde-be-order.c b/gcc/testsuite/gcc.dg/vmx/lde-be-order.c
new file mode 100644
index 0000000000..9a6d5bae52
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/lde-be-order.c
@@ -0,0 +1,73 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ int i;
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ for (i = 15; i >= 0; --i)
+#else
+ for (i = 0; i < 16; ++i)
+#endif
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ }
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ for (i = 7; i >= 0; --i)
+#else
+ for (i = 0; i < 8; ++i)
+#endif
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ }
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ for (i = 3; i >= 0; --i)
+#else
+ for (i = 0; i < 4; ++i)
+#endif
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_lde (9*1, (unsigned char *)svuc);
+ vsc = vec_lde (14*1, (signed char *)svsc);
+ vus = vec_lde (7*2, (unsigned short *)svus);
+ vss = vec_lde (1*2, (signed short *)svss);
+ vui = vec_lde (3*4, (unsigned int *)svui);
+ vsi = vec_lde (2*4, (signed int *)svsi);
+ vf = vec_lde (0*4, (float *)svf);
+
+ check (vec_extract (vuc, 9) == 9, "vuc");
+ check (vec_extract (vsc, 14) == 6, "vsc");
+ check (vec_extract (vus, 7) == 7, "vus");
+ check (vec_extract (vss, 1) == -3, "vss");
+ check (vec_extract (vui, 3) == 3, "vui");
+ check (vec_extract (vsi, 2) == 0, "vsi");
+ check (vec_extract (vf, 0) == 0.0, "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/lde.c b/gcc/testsuite/gcc.dg/vmx/lde.c
new file mode 100644
index 0000000000..5594963c76
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/lde.c
@@ -0,0 +1,59 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_lde (9*1, (unsigned char *)svuc);
+ vsc = vec_lde (14*1, (signed char *)svsc);
+ vus = vec_lde (7*2, (unsigned short *)svus);
+ vss = vec_lde (1*2, (signed short *)svss);
+ vui = vec_lde (3*4, (unsigned int *)svui);
+ vsi = vec_lde (2*4, (signed int *)svsi);
+ vf = vec_lde (0*4, (float *)svf);
+
+ check (vec_extract (vuc, 9) == 9, "vuc");
+ check (vec_extract (vsc, 14) == 6, "vsc");
+ check (vec_extract (vus, 7) == 7, "vus");
+ check (vec_extract (vss, 1) == -3, "vss");
+ check (vec_extract (vui, 3) == 3, "vui");
+ check (vec_extract (vsi, 2) == 0, "vsi");
+ check (vec_extract (vf, 0) == 0.0, "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ldl-be-order.c b/gcc/testsuite/gcc.dg/vmx/ldl-be-order.c
new file mode 100644
index 0000000000..397849fe1f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ldl-be-order.c
@@ -0,0 +1,107 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ svbc[i] = (i % 2) ? 0xff : 0;
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ svbs[i] = (i % 2) ? 0xffff : 0;
+ svp[i] = i;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svbi[i] = (i % 2) ? 0xffffffff : 0;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char evuc = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
+ vector signed char evsc = {7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8};
+ vector bool char evbc = {255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0};
+ vector unsigned short evus = {7,6,5,4,3,2,1,0};
+ vector signed short evss = {3,2,1,0,-1,-2,-3,-4};
+ vector bool short evbs = {65535,0,65535,0,65535,0,65535,0};
+ vector pixel evp = {7,6,5,4,3,2,1,0};
+ vector unsigned int evui = {3,2,1,0};
+ vector signed int evsi = {1,0,-1,-2};
+ vector bool int evbi = {0xffffffff,0,0xffffffff,0};
+ vector float evf = {3.0,2.0,1.0,0.0};
+#else
+ vector unsigned char evuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char evsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char evbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short evus = {0,1,2,3,4,5,6,7};
+ vector signed short evss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short evbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel evp = {0,1,2,3,4,5,6,7};
+ vector unsigned int evui = {0,1,2,3};
+ vector signed int evsi = {-2,-1,0,1};
+ vector bool int evbi = {0,0xffffffff,0,0xffffffff};
+ vector float evf = {0.0,1.0,2.0,3.0};
+#endif
+
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector bool char vbc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector bool short vbs;
+ vector pixel vp;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector bool int vbi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_ldl (0, (vector unsigned char *)svuc);
+ vsc = vec_ldl (0, (vector signed char *)svsc);
+ vbc = vec_ldl (0, (vector bool char *)svbc);
+ vus = vec_ldl (0, (vector unsigned short *)svus);
+ vss = vec_ldl (0, (vector signed short *)svss);
+ vbs = vec_ldl (0, (vector bool short *)svbs);
+ vp = vec_ldl (0, (vector pixel *)svp);
+ vui = vec_ldl (0, (vector unsigned int *)svui);
+ vsi = vec_ldl (0, (vector signed int *)svsi);
+ vbi = vec_ldl (0, (vector bool int *)svbi);
+ vf = vec_ldl (0, (vector float *)svf);
+
+ check (vec_all_eq (vuc, evuc), "vuc");
+ check (vec_all_eq (vsc, evsc), "vsc");
+ check (vec_all_eq (vbc, evbc), "vbc");
+ check (vec_all_eq (vus, evus), "vus");
+ check (vec_all_eq (vss, evss), "vss");
+ check (vec_all_eq (vbs, evbs), "vbs");
+ check (vec_all_eq (vp, evp ), "vp" );
+ check (vec_all_eq (vui, evui), "vui");
+ check (vec_all_eq (vsi, evsi), "vsi");
+ check (vec_all_eq (vbi, evbi), "vbi");
+ check (vec_all_eq (vf, evf ), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c
new file mode 100644
index 0000000000..1dd0ca33ea
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ldl-vsx-be-order.c
@@ -0,0 +1,44 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ svul[i] = i;
+ svd[i] = i * 1.0;
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned long long evul = {1,0};
+ vector double evd = {1.0,0.0};
+#else
+ vector unsigned long long evul = {0,1};
+ vector double evd = {0.0,1.0};
+#endif
+
+ vector unsigned long long vul;
+ vector double vd;
+ unsigned i;
+
+ init ();
+
+ vul = vec_ldl (0, (vector unsigned long long *)svul);
+ vd = vec_ldl (0, (vector double *)svd);
+
+ for (i = 0; i < 2; ++i)
+ {
+ check (vul[i] == evul[i], "vul");
+ check (vd[i] == evd[i], "vd" );
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ldl-vsx.c b/gcc/testsuite/gcc.dg/vmx/ldl-vsx.c
new file mode 100644
index 0000000000..4bf3224f67
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ldl-vsx.c
@@ -0,0 +1,39 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ svul[i] = i;
+ svd[i] = i * 1.0;
+ }
+}
+
+static void test ()
+{
+ vector unsigned long long evul = {0,1};
+ vector double evd = {0.0,1.0};
+
+ vector unsigned long long vul;
+ vector double vd;
+ unsigned i;
+
+ init ();
+
+ vul = vec_ldl (0, (vector unsigned long long *)svul);
+ vd = vec_ldl (0, (vector double *)svd);
+
+ for (i = 0; i < 2; ++i)
+ {
+ check (vul[i] == evul[i], "vul");
+ check (vd[i] == evd[i], "vd" );
+ }
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ldl.c b/gcc/testsuite/gcc.dg/vmx/ldl.c
new file mode 100644
index 0000000000..3f9a603e33
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ldl.c
@@ -0,0 +1,91 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void init ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ svuc[i] = i;
+ svsc[i] = i - 8;
+ svbc[i] = (i % 2) ? 0xff : 0;
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ svus[i] = i;
+ svss[i] = i - 4;
+ svbs[i] = (i % 2) ? 0xffff : 0;
+ svp[i] = i;
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ svui[i] = i;
+ svsi[i] = i - 2;
+ svbi[i] = (i % 2) ? 0xffffffff : 0;
+ svf[i] = i * 1.0f;
+ }
+}
+
+static void test ()
+{
+ vector unsigned char evuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char evsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char evbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short evus = {0,1,2,3,4,5,6,7};
+ vector signed short evss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short evbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel evp = {0,1,2,3,4,5,6,7};
+ vector unsigned int evui = {0,1,2,3};
+ vector signed int evsi = {-2,-1,0,1};
+ vector bool int evbi = {0,0xffffffff,0,0xffffffff};
+ vector float evf = {0.0,1.0,2.0,3.0};
+
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector bool char vbc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector bool short vbs;
+ vector pixel vp;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector bool int vbi;
+ vector float vf;
+
+ init ();
+
+ vuc = vec_ldl (0, (vector unsigned char *)svuc);
+ vsc = vec_ldl (0, (vector signed char *)svsc);
+ vbc = vec_ldl (0, (vector bool char *)svbc);
+ vus = vec_ldl (0, (vector unsigned short *)svus);
+ vss = vec_ldl (0, (vector signed short *)svss);
+ vbs = vec_ldl (0, (vector bool short *)svbs);
+ vp = vec_ldl (0, (vector pixel *)svp);
+ vui = vec_ldl (0, (vector unsigned int *)svui);
+ vsi = vec_ldl (0, (vector signed int *)svsi);
+ vbi = vec_ldl (0, (vector bool int *)svbi);
+ vf = vec_ldl (0, (vector float *)svf);
+
+ check (vec_all_eq (vuc, evuc), "vuc");
+ check (vec_all_eq (vsc, evsc), "vsc");
+ check (vec_all_eq (vbc, evbc), "vbc");
+ check (vec_all_eq (vus, evus), "vus");
+ check (vec_all_eq (vss, evss), "vss");
+ check (vec_all_eq (vbs, evbs), "vbs");
+ check (vec_all_eq (vp, evp ), "vp" );
+ check (vec_all_eq (vui, evui), "vui");
+ check (vec_all_eq (vsi, evsi), "vsi");
+ check (vec_all_eq (vbi, evbi), "vbi");
+ check (vec_all_eq (vf, evf ), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/merge-be-order.c b/gcc/testsuite/gcc.dg/vmx/merge-be-order.c
new file mode 100644
index 0000000000..2de888fa44
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/merge-be-order.c
@@ -0,0 +1,96 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb
+ = {16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+ vector signed char vsca
+ = {-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed char vscb = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+
+ /* Result vectors. */
+ vector unsigned char vuch, vucl;
+ vector signed char vsch, vscl;
+ vector unsigned short vush, vusl;
+ vector signed short vssh, vssl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector float vfh, vfl;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vucrh = {24,8,25,9,26,10,27,11,28,12,29,13,30,14,31,15};
+ vector unsigned char vucrl = {16,0,17,1,18,2,19,3,20,4,21,5,22,6,23,7};
+ vector signed char vscrh = {8,-8,9,-7,10,-6,11,-5,12,-4,13,-3,14,-2,15,-1};
+ vector signed char vscrl = {0,-16,1,-15,2,-14,3,-13,4,-12,5,-11,6,-10,7,-9};
+ vector unsigned short vusrh = {12,4,13,5,14,6,15,7};
+ vector unsigned short vusrl = {8,0,9,1,10,2,11,3};
+ vector signed short vssrh = {4,-4,5,-3,6,-2,7,-1};
+ vector signed short vssrl = {0,-8,1,-7,2,-6,3,-5};
+ vector unsigned int vuirh = {6,2,7,3};
+ vector unsigned int vuirl = {4,0,5,1};
+ vector signed int vsirh = {2,-2,3,-1};
+ vector signed int vsirl = {0,-4,1,-3};
+ vector float vfrh = {2.0,-2.0,3.0,-1.0};
+ vector float vfrl = {0.0,-4.0,1.0,-3.0};
+#else
+ vector unsigned char vucrh = {0,16,1,17,2,18,3,19,4,20,5,21,6,22,7,23};
+ vector unsigned char vucrl = {8,24,9,25,10,26,11,27,12,28,13,29,14,30,15,31};
+ vector signed char vscrh = {-16,0,-15,1,-14,2,-13,3,-12,4,-11,5,-10,6,-9,7};
+ vector signed char vscrl = {-8,8,-7,9,-6,10,-5,11,-4,12,-3,13,-2,14,-1,15};
+ vector unsigned short vusrh = {0,8,1,9,2,10,3,11};
+ vector unsigned short vusrl = {4,12,5,13,6,14,7,15};
+ vector signed short vssrh = {-8,0,-7,1,-6,2,-5,3};
+ vector signed short vssrl = {-4,4,-3,5,-2,6,-1,7};
+ vector unsigned int vuirh = {0,4,1,5};
+ vector unsigned int vuirl = {2,6,3,7};
+ vector signed int vsirh = {-4,0,-3,1};
+ vector signed int vsirl = {-2,2,-1,3};
+ vector float vfrh = {-4.0,0.0,-3.0,1.0};
+ vector float vfrl = {-2.0,2.0,-1.0,3.0};
+#endif
+
+ vuch = vec_mergeh (vuca, vucb);
+ vucl = vec_mergel (vuca, vucb);
+ vsch = vec_mergeh (vsca, vscb);
+ vscl = vec_mergel (vsca, vscb);
+ vush = vec_mergeh (vusa, vusb);
+ vusl = vec_mergel (vusa, vusb);
+ vssh = vec_mergeh (vssa, vssb);
+ vssl = vec_mergel (vssa, vssb);
+ vuih = vec_mergeh (vuia, vuib);
+ vuil = vec_mergel (vuia, vuib);
+ vsih = vec_mergeh (vsia, vsib);
+ vsil = vec_mergel (vsia, vsib);
+ vfh = vec_mergeh (vfa, vfb );
+ vfl = vec_mergel (vfa, vfb );
+
+ check (vec_all_eq (vuch, vucrh), "vuch");
+ check (vec_all_eq (vucl, vucrl), "vucl");
+ check (vec_all_eq (vsch, vscrh), "vsch");
+ check (vec_all_eq (vscl, vscrl), "vscl");
+ check (vec_all_eq (vush, vusrh), "vush");
+ check (vec_all_eq (vusl, vusrl), "vusl");
+ check (vec_all_eq (vssh, vssrh), "vssh");
+ check (vec_all_eq (vssl, vssrl), "vssl");
+ check (vec_all_eq (vuih, vuirh), "vuih");
+ check (vec_all_eq (vuil, vuirl), "vuil");
+ check (vec_all_eq (vsih, vsirh), "vsih");
+ check (vec_all_eq (vsil, vsirl), "vsil");
+ check (vec_all_eq (vfh, vfrh), "vfh");
+ check (vec_all_eq (vfl, vfrl), "vfl");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c
new file mode 100644
index 0000000000..56e0b0e6c2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/merge-vsx-be-order.c
@@ -0,0 +1,84 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static int vec_long_long_eq (vector long long x, vector long long y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static int vec_double_eq (vector double x, vector double y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static void test()
+{
+ /* Input vectors. */
+ vector long long vla = {-2,-1};
+ vector long long vlb = {0,1};
+ vector double vda = {-2.0,-1.0};
+ vector double vdb = {0.0,1.0};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+
+ /* Result vectors. */
+ vector long long vlh, vll;
+ vector double vdh, vdl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector float vfh, vfl;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector long long vlrh = {1,-1};
+ vector long long vlrl = {0,-2};
+ vector double vdrh = {1.0,-1.0};
+ vector double vdrl = {0.0,-2.0};
+ vector unsigned int vuirh = {6,2,7,3};
+ vector unsigned int vuirl = {4,0,5,1};
+ vector signed int vsirh = {2,-2,3,-1};
+ vector signed int vsirl = {0,-4,1,-3};
+ vector float vfrh = {2.0,-2.0,3.0,-1.0};
+ vector float vfrl = {0.0,-4.0,1.0,-3.0};
+#else
+ vector long long vlrh = {-2,0};
+ vector long long vlrl = {-1,1};
+ vector double vdrh = {-2.0,0.0};
+ vector double vdrl = {-1.0,1.0};
+ vector unsigned int vuirh = {0,4,1,5};
+ vector unsigned int vuirl = {2,6,3,7};
+ vector signed int vsirh = {-4,0,-3,1};
+ vector signed int vsirl = {-2,2,-1,3};
+ vector float vfrh = {-4.0,0.0,-3.0,1.0};
+ vector float vfrl = {-2.0,2.0,-1.0,3.0};
+#endif
+
+ vlh = vec_mergeh (vla, vlb);
+ vll = vec_mergel (vla, vlb);
+ vdh = vec_mergeh (vda, vdb);
+ vdl = vec_mergel (vda, vdb);
+ vuih = vec_mergeh (vuia, vuib);
+ vuil = vec_mergel (vuia, vuib);
+ vsih = vec_mergeh (vsia, vsib);
+ vsil = vec_mergel (vsia, vsib);
+ vfh = vec_mergeh (vfa, vfb );
+ vfl = vec_mergel (vfa, vfb );
+
+ check (vec_long_long_eq (vlh, vlrh), "vlh");
+ check (vec_long_long_eq (vll, vlrl), "vll");
+ check (vec_double_eq (vdh, vdrh), "vdh" );
+ check (vec_double_eq (vdl, vdrl), "vdl" );
+ check (vec_all_eq (vuih, vuirh), "vuih");
+ check (vec_all_eq (vuil, vuirl), "vuil");
+ check (vec_all_eq (vsih, vsirh), "vsih");
+ check (vec_all_eq (vsil, vsirl), "vsil");
+ check (vec_all_eq (vfh, vfrh), "vfh");
+ check (vec_all_eq (vfl, vfrl), "vfl");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/merge-vsx.c b/gcc/testsuite/gcc.dg/vmx/merge-vsx.c
new file mode 100644
index 0000000000..40693e95b3
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/merge-vsx.c
@@ -0,0 +1,71 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static int vec_long_long_eq (vector long long x, vector long long y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static int vec_double_eq (vector double x, vector double y)
+{
+ return (x[0] == y[0] && x[1] == y[1]);
+}
+
+static void test()
+{
+ /* Input vectors. */
+ vector long long vla = {-2,-1};
+ vector long long vlb = {0,1};
+ vector double vda = {-2.0,-1.0};
+ vector double vdb = {0.0,1.0};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+
+ /* Result vectors. */
+ vector long long vlh, vll;
+ vector double vdh, vdl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector float vfh, vfl;
+
+ /* Expected result vectors. */
+ vector long long vlrh = {-2,0};
+ vector long long vlrl = {-1,1};
+ vector double vdrh = {-2.0,0.0};
+ vector double vdrl = {-1.0,1.0};
+ vector unsigned int vuirh = {0,4,1,5};
+ vector unsigned int vuirl = {2,6,3,7};
+ vector signed int vsirh = {-4,0,-3,1};
+ vector signed int vsirl = {-2,2,-1,3};
+ vector float vfrh = {-4.0,0.0,-3.0,1.0};
+ vector float vfrl = {-2.0,2.0,-1.0,3.0};
+
+ vlh = vec_mergeh (vla, vlb);
+ vll = vec_mergel (vla, vlb);
+ vdh = vec_mergeh (vda, vdb);
+ vdl = vec_mergel (vda, vdb);
+ vuih = vec_mergeh (vuia, vuib);
+ vuil = vec_mergel (vuia, vuib);
+ vsih = vec_mergeh (vsia, vsib);
+ vsil = vec_mergel (vsia, vsib);
+ vfh = vec_mergeh (vfa, vfb );
+ vfl = vec_mergel (vfa, vfb );
+
+ check (vec_long_long_eq (vlh, vlrh), "vlh");
+ check (vec_long_long_eq (vll, vlrl), "vll");
+ check (vec_double_eq (vdh, vdrh), "vdh" );
+ check (vec_double_eq (vdl, vdrl), "vdl" );
+ check (vec_all_eq (vuih, vuirh), "vuih");
+ check (vec_all_eq (vuil, vuirl), "vuil");
+ check (vec_all_eq (vsih, vsirh), "vsih");
+ check (vec_all_eq (vsil, vsirl), "vsil");
+ check (vec_all_eq (vfh, vfrh), "vfh");
+ check (vec_all_eq (vfl, vfrl), "vfl");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/merge.c b/gcc/testsuite/gcc.dg/vmx/merge.c
new file mode 100644
index 0000000000..84b14fea74
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/merge.c
@@ -0,0 +1,77 @@
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb
+ = {16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+ vector signed char vsca
+ = {-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed char vscb = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+
+ /* Result vectors. */
+ vector unsigned char vuch, vucl;
+ vector signed char vsch, vscl;
+ vector unsigned short vush, vusl;
+ vector signed short vssh, vssl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector float vfh, vfl;
+
+ /* Expected result vectors. */
+ vector unsigned char vucrh = {0,16,1,17,2,18,3,19,4,20,5,21,6,22,7,23};
+ vector unsigned char vucrl = {8,24,9,25,10,26,11,27,12,28,13,29,14,30,15,31};
+ vector signed char vscrh = {-16,0,-15,1,-14,2,-13,3,-12,4,-11,5,-10,6,-9,7};
+ vector signed char vscrl = {-8,8,-7,9,-6,10,-5,11,-4,12,-3,13,-2,14,-1,15};
+ vector unsigned short vusrh = {0,8,1,9,2,10,3,11};
+ vector unsigned short vusrl = {4,12,5,13,6,14,7,15};
+ vector signed short vssrh = {-8,0,-7,1,-6,2,-5,3};
+ vector signed short vssrl = {-4,4,-3,5,-2,6,-1,7};
+ vector unsigned int vuirh = {0,4,1,5};
+ vector unsigned int vuirl = {2,6,3,7};
+ vector signed int vsirh = {-4,0,-3,1};
+ vector signed int vsirl = {-2,2,-1,3};
+ vector float vfrh = {-4.0,0.0,-3.0,1.0};
+ vector float vfrl = {-2.0,2.0,-1.0,3.0};
+
+ vuch = vec_mergeh (vuca, vucb);
+ vucl = vec_mergel (vuca, vucb);
+ vsch = vec_mergeh (vsca, vscb);
+ vscl = vec_mergel (vsca, vscb);
+ vush = vec_mergeh (vusa, vusb);
+ vusl = vec_mergel (vusa, vusb);
+ vssh = vec_mergeh (vssa, vssb);
+ vssl = vec_mergel (vssa, vssb);
+ vuih = vec_mergeh (vuia, vuib);
+ vuil = vec_mergel (vuia, vuib);
+ vsih = vec_mergeh (vsia, vsib);
+ vsil = vec_mergel (vsia, vsib);
+ vfh = vec_mergeh (vfa, vfb );
+ vfl = vec_mergel (vfa, vfb );
+
+ check (vec_all_eq (vuch, vucrh), "vuch");
+ check (vec_all_eq (vucl, vucrl), "vucl");
+ check (vec_all_eq (vsch, vscrh), "vsch");
+ check (vec_all_eq (vscl, vscrl), "vscl");
+ check (vec_all_eq (vush, vusrh), "vush");
+ check (vec_all_eq (vusl, vusrl), "vusl");
+ check (vec_all_eq (vssh, vssrh), "vssh");
+ check (vec_all_eq (vssl, vssrl), "vssl");
+ check (vec_all_eq (vuih, vuirh), "vuih");
+ check (vec_all_eq (vuil, vuirl), "vuil");
+ check (vec_all_eq (vsih, vsirh), "vsih");
+ check (vec_all_eq (vsil, vsirl), "vsil");
+ check (vec_all_eq (vfh, vfrh), "vfh");
+ check (vec_all_eq (vfl, vfrl), "vfl");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c b/gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c
new file mode 100644
index 0000000000..ff3047486c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/mult-even-odd-be-order.c
@@ -0,0 +1,64 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb = {2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3};
+ vector signed char vsca = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector signed char vscb = {2,-3,2,-3,2,-3,2,-3,2,-3,2,-3,2,-3,2,-3};
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {2,3,2,3,2,3,2,3};
+ vector signed short vssa = {-4,-3,-2,-1,0,1,2,3};
+ vector signed short vssb = {2,-3,2,-3,2,-3,2,-3};
+ vector unsigned short vuse, vuso;
+ vector signed short vsse, vsso;
+ vector unsigned int vuie, vuio;
+ vector signed int vsie, vsio;
+
+ vuse = vec_mule (vuca, vucb);
+ vuso = vec_mulo (vuca, vucb);
+ vsse = vec_mule (vsca, vscb);
+ vsso = vec_mulo (vsca, vscb);
+ vuie = vec_mule (vusa, vusb);
+ vuio = vec_mulo (vusa, vusb);
+ vsie = vec_mule (vssa, vssb);
+ vsio = vec_mulo (vssa, vssb);
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ check (vec_all_eq (vuse,
+ ((vector unsigned short){3,9,15,21,27,33,39,45})),
+ "vuse");
+ check (vec_all_eq (vuso,
+ ((vector unsigned short){0,4,8,12,16,20,24,28})),
+ "vuso");
+ check (vec_all_eq (vsse,
+ ((vector signed short){21,15,9,3,-3,-9,-15,-21})),
+ "vsse");
+ check (vec_all_eq (vsso,
+ ((vector signed short){-16,-12,-8,-4,0,4,8,12})),
+ "vsso");
+ check (vec_all_eq (vuie, ((vector unsigned int){3,9,15,21})), "vuie");
+ check (vec_all_eq (vuio, ((vector unsigned int){0,4,8,12})), "vuio");
+ check (vec_all_eq (vsie, ((vector signed int){9,3,-3,-9})), "vsie");
+ check (vec_all_eq (vsio, ((vector signed int){-8,-4,0,4})), "vsio");
+#else
+ check (vec_all_eq (vuse,
+ ((vector unsigned short){0,4,8,12,16,20,24,28})),
+ "vuse");
+ check (vec_all_eq (vuso,
+ ((vector unsigned short){3,9,15,21,27,33,39,45})),
+ "vuso");
+ check (vec_all_eq (vsse,
+ ((vector signed short){-16,-12,-8,-4,0,4,8,12})),
+ "vsse");
+ check (vec_all_eq (vsso,
+ ((vector signed short){21,15,9,3,-3,-9,-15,-21})),
+ "vsso");
+ check (vec_all_eq (vuie, ((vector unsigned int){0,4,8,12})), "vuie");
+ check (vec_all_eq (vuio, ((vector unsigned int){3,9,15,21})), "vuio");
+ check (vec_all_eq (vsie, ((vector signed int){-8,-4,0,4})), "vsie");
+ check (vec_all_eq (vsio, ((vector signed int){9,3,-3,-9})), "vsio");
+#endif
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/mult-even-odd.c b/gcc/testsuite/gcc.dg/vmx/mult-even-odd.c
new file mode 100644
index 0000000000..34b72e9004
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/mult-even-odd.c
@@ -0,0 +1,43 @@
+#include "harness.h"
+
+static void test()
+{
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb = {2,3,2,3,2,3,2,3,2,3,2,3,2,3,2,3};
+ vector signed char vsca = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector signed char vscb = {2,-3,2,-3,2,-3,2,-3,2,-3,2,-3,2,-3,2,-3};
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {2,3,2,3,2,3,2,3};
+ vector signed short vssa = {-4,-3,-2,-1,0,1,2,3};
+ vector signed short vssb = {2,-3,2,-3,2,-3,2,-3};
+ vector unsigned short vuse, vuso;
+ vector signed short vsse, vsso;
+ vector unsigned int vuie, vuio;
+ vector signed int vsie, vsio;
+
+ vuse = vec_mule (vuca, vucb);
+ vuso = vec_mulo (vuca, vucb);
+ vsse = vec_mule (vsca, vscb);
+ vsso = vec_mulo (vsca, vscb);
+ vuie = vec_mule (vusa, vusb);
+ vuio = vec_mulo (vusa, vusb);
+ vsie = vec_mule (vssa, vssb);
+ vsio = vec_mulo (vssa, vssb);
+
+ check (vec_all_eq (vuse,
+ ((vector unsigned short){0,4,8,12,16,20,24,28})),
+ "vuse");
+ check (vec_all_eq (vuso,
+ ((vector unsigned short){3,9,15,21,27,33,39,45})),
+ "vuso");
+ check (vec_all_eq (vsse,
+ ((vector signed short){-16,-12,-8,-4,0,4,8,12})),
+ "vsse");
+ check (vec_all_eq (vsso,
+ ((vector signed short){21,15,9,3,-3,-9,-15,-21})),
+ "vsso");
+ check (vec_all_eq (vuie, ((vector unsigned int){0,4,8,12})), "vuie");
+ check (vec_all_eq (vuio, ((vector unsigned int){3,9,15,21})), "vuio");
+ check (vec_all_eq (vsie, ((vector signed int){-8,-4,0,4})), "vsie");
+ check (vec_all_eq (vsio, ((vector signed int){9,3,-3,-9})), "vsio");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ops-long-1.c b/gcc/testsuite/gcc.dg/vmx/ops-long-1.c
index 5471706790..bceb4fc8da 100644
--- a/gcc/testsuite/gcc.dg/vmx/ops-long-1.c
+++ b/gcc/testsuite/gcc.dg/vmx/ops-long-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
/* Checks from the original ops.c that pass pointers to long or
unsigned long for operations that support that in released versions
diff --git a/gcc/testsuite/gcc.dg/vmx/ops.c b/gcc/testsuite/gcc.dg/vmx/ops.c
index b39ad1d656..21801ca237 100644
--- a/gcc/testsuite/gcc.dg/vmx/ops.c
+++ b/gcc/testsuite/gcc.dg/vmx/ops.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mno-vsx -Wno-deprecated" } */
#include <altivec.h>
#include <stdlib.h>
extern char * *var_char_ptr;
diff --git a/gcc/testsuite/gcc.dg/vmx/pack-be-order.c b/gcc/testsuite/gcc.dg/vmx/pack-be-order.c
new file mode 100644
index 0000000000..c400fc882d
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/pack-be-order.c
@@ -0,0 +1,136 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+#define BIG 4294967295
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector bool short vbsa = {0,65535,65535,0,0,0,65535,0};
+ vector bool short vbsb = {65535,0,0,65535,65535,65535,0,65535};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector bool int vbia = {0,BIG,BIG,BIG};
+ vector bool int vbib = {BIG,0,0,0};
+ vector unsigned int vipa = {(0<<24) + (2<<19) + (3<<11) + (4<<3),
+ (1<<24) + (5<<19) + (6<<11) + (7<<3),
+ (0<<24) + (8<<19) + (9<<11) + (10<<3),
+ (1<<24) + (11<<19) + (12<<11) + (13<<3)};
+ vector unsigned int vipb = {(1<<24) + (14<<19) + (15<<11) + (16<<3),
+ (0<<24) + (17<<19) + (18<<11) + (19<<3),
+ (1<<24) + (20<<19) + (21<<11) + (22<<3),
+ (0<<24) + (23<<19) + (24<<11) + (25<<3)};
+ vector unsigned short vusc = {0,256,1,257,2,258,3,259};
+ vector unsigned short vusd = {4,260,5,261,6,262,7,263};
+ vector signed short vssc = {-1,-128,0,127,-2,-129,1,128};
+ vector signed short vssd = {-3,-130,2,129,-4,-131,3,130};
+ vector unsigned int vuic = {0,65536,1,65537};
+ vector unsigned int vuid = {2,65538,3,65539};
+ vector signed int vsic = {-1,-32768,0,32767};
+ vector signed int vsid = {-2,-32769,1,32768};
+
+ /* Result vectors. */
+ vector unsigned char vucr;
+ vector signed char vscr;
+ vector bool char vbcr;
+ vector unsigned short vusr;
+ vector signed short vssr;
+ vector bool short vbsr;
+ vector pixel vpr;
+ vector unsigned char vucsr;
+ vector signed char vscsr;
+ vector unsigned short vussr;
+ vector signed short vsssr;
+ vector unsigned char vucsur1, vucsur2;
+ vector unsigned short vussur1, vussur2;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vucer = {8,9,10,11,12,13,14,15,0,1,2,3,4,5,6,7};
+ vector signed char vscer = {0,1,2,3,4,5,6,7,-8,-7,-6,-5,-4,-3,-2,-1};
+ vector bool char vbcer = {255,0,0,255,255,255,0,255,0,255,255,0,0,0,255,0};
+ vector unsigned short vuser = {4,5,6,7,0,1,2,3};
+ vector signed short vsser = {0,1,2,3,-4,-3,-2,-1};
+ vector bool short vbser = {65535,0,0,0,0,65535,65535,65535};
+ vector pixel vper = {(1<<15) + (14<<10) + (15<<5) + 16,
+ (0<<15) + (17<<10) + (18<<5) + 19,
+ (1<<15) + (20<<10) + (21<<5) + 22,
+ (0<<15) + (23<<10) + (24<<5) + 25,
+ (0<<15) + (2<<10) + (3<<5) + 4,
+ (1<<15) + (5<<10) + (6<<5) + 7,
+ (0<<15) + (8<<10) + (9<<5) + 10,
+ (1<<15) + (11<<10) + (12<<5) + 13};
+ vector unsigned char vucser = {4,255,5,255,6,255,7,255,0,255,1,255,2,255,3,255};
+ vector signed char vscser = {-3,-128,2,127,-4,-128,3,127,
+ -1,-128,0,127,-2,-128,1,127};
+ vector unsigned short vusser = {2,65535,3,65535,0,65535,1,65535};
+ vector signed short vssser = {-2,-32768,1,32767,-1,-32768,0,32767};
+ vector unsigned char vucsuer1 = {4,255,5,255,6,255,7,255,0,255,1,255,2,255,3,255};
+ vector unsigned char vucsuer2 = {0,0,2,129,0,0,3,130,0,0,0,127,0,0,1,128};
+ vector unsigned short vussuer1 = {2,65535,3,65535,0,65535,1,65535};
+ vector unsigned short vussuer2 = {0,0,1,32768,0,0,0,32767};
+#else
+ vector unsigned char vucer = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vscer = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbcer = {0,255,255,0,0,0,255,0,255,0,0,255,255,255,0,255};
+ vector unsigned short vuser = {0,1,2,3,4,5,6,7};
+ vector signed short vsser = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbser = {0,65535,65535,65535,65535,0,0,0};
+ vector pixel vper = {(0<<15) + (2<<10) + (3<<5) + 4,
+ (1<<15) + (5<<10) + (6<<5) + 7,
+ (0<<15) + (8<<10) + (9<<5) + 10,
+ (1<<15) + (11<<10) + (12<<5) + 13,
+ (1<<15) + (14<<10) + (15<<5) + 16,
+ (0<<15) + (17<<10) + (18<<5) + 19,
+ (1<<15) + (20<<10) + (21<<5) + 22,
+ (0<<15) + (23<<10) + (24<<5) + 25};
+ vector unsigned char vucser = {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
+ vector signed char vscser = {-1,-128,0,127,-2,-128,1,127,
+ -3,-128,2,127,-4,-128,3,127};
+ vector unsigned short vusser = {0,65535,1,65535,2,65535,3,65535};
+ vector signed short vssser = {-1,-32768,0,32767,-2,-32768,1,32767};
+ vector unsigned char vucsuer1 = {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
+ vector unsigned char vucsuer2 = {0,0,0,127,0,0,1,128,0,0,2,129,0,0,3,130};
+ vector unsigned short vussuer1 = {0,65535,1,65535,2,65535,3,65535};
+ vector unsigned short vussuer2 = {0,0,0,32767,0,0,1,32768};
+#endif
+
+ vucr = vec_pack (vusa, vusb);
+ vscr = vec_pack (vssa, vssb);
+ vbcr = vec_pack (vbsa, vbsb);
+ vusr = vec_pack (vuia, vuib);
+ vssr = vec_pack (vsia, vsib);
+ vbsr = vec_pack (vbia, vbib);
+ vpr = vec_packpx (vipa, vipb);
+ vucsr = vec_packs (vusc, vusd);
+ vscsr = vec_packs (vssc, vssd);
+ vussr = vec_packs (vuic, vuid);
+ vsssr = vec_packs (vsic, vsid);
+ vucsur1 = vec_packsu (vusc, vusd);
+ vucsur2 = vec_packsu (vssc, vssd);
+ vussur1 = vec_packsu (vuic, vuid);
+ vussur2 = vec_packsu (vsic, vsid);
+
+ check (vec_all_eq (vucr, vucer), "vucr");
+ check (vec_all_eq (vscr, vscer), "vscr");
+ check (vec_all_eq (vbcr, vbcer), "vbcr");
+ check (vec_all_eq (vusr, vuser), "vusr");
+ check (vec_all_eq (vssr, vsser), "vssr");
+ check (vec_all_eq (vbsr, vbser), "vbsr");
+ check (vec_all_eq (vpr, vper ), "vpr" );
+ check (vec_all_eq (vucsr, vucser), "vucsr");
+ check (vec_all_eq (vscsr, vscser), "vscsr");
+ check (vec_all_eq (vussr, vusser), "vussr");
+ check (vec_all_eq (vsssr, vssser), "vsssr");
+ check (vec_all_eq (vucsur1, vucsuer1), "vucsur1");
+ check (vec_all_eq (vucsur2, vucsuer2), "vucsur2");
+ check (vec_all_eq (vussur1, vussuer1), "vussur1");
+ check (vec_all_eq (vussur2, vussuer2), "vussur2");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/pack.c b/gcc/testsuite/gcc.dg/vmx/pack.c
new file mode 100644
index 0000000000..d1b49f0a62
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/pack.c
@@ -0,0 +1,108 @@
+#include "harness.h"
+
+#define BIG 4294967295
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector bool short vbsa = {0,65535,65535,0,0,0,65535,0};
+ vector bool short vbsb = {65535,0,0,65535,65535,65535,0,65535};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector bool int vbia = {0,BIG,BIG,BIG};
+ vector bool int vbib = {BIG,0,0,0};
+ vector unsigned int vipa = {(0<<24) + (2<<19) + (3<<11) + (4<<3),
+ (1<<24) + (5<<19) + (6<<11) + (7<<3),
+ (0<<24) + (8<<19) + (9<<11) + (10<<3),
+ (1<<24) + (11<<19) + (12<<11) + (13<<3)};
+ vector unsigned int vipb = {(1<<24) + (14<<19) + (15<<11) + (16<<3),
+ (0<<24) + (17<<19) + (18<<11) + (19<<3),
+ (1<<24) + (20<<19) + (21<<11) + (22<<3),
+ (0<<24) + (23<<19) + (24<<11) + (25<<3)};
+ vector unsigned short vusc = {0,256,1,257,2,258,3,259};
+ vector unsigned short vusd = {4,260,5,261,6,262,7,263};
+ vector signed short vssc = {-1,-128,0,127,-2,-129,1,128};
+ vector signed short vssd = {-3,-130,2,129,-4,-131,3,130};
+ vector unsigned int vuic = {0,65536,1,65537};
+ vector unsigned int vuid = {2,65538,3,65539};
+ vector signed int vsic = {-1,-32768,0,32767};
+ vector signed int vsid = {-2,-32769,1,32768};
+
+ /* Result vectors. */
+ vector unsigned char vucr;
+ vector signed char vscr;
+ vector bool char vbcr;
+ vector unsigned short vusr;
+ vector signed short vssr;
+ vector bool short vbsr;
+ vector pixel vpr;
+ vector unsigned char vucsr;
+ vector signed char vscsr;
+ vector unsigned short vussr;
+ vector signed short vsssr;
+ vector unsigned char vucsur1, vucsur2;
+ vector unsigned short vussur1, vussur2;
+
+ /* Expected result vectors. */
+ vector unsigned char vucer = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vscer = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbcer = {0,255,255,0,0,0,255,0,255,0,0,255,255,255,0,255};
+ vector unsigned short vuser = {0,1,2,3,4,5,6,7};
+ vector signed short vsser = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbser = {0,65535,65535,65535,65535,0,0,0};
+ vector pixel vper = {(0<<15) + (2<<10) + (3<<5) + 4,
+ (1<<15) + (5<<10) + (6<<5) + 7,
+ (0<<15) + (8<<10) + (9<<5) + 10,
+ (1<<15) + (11<<10) + (12<<5) + 13,
+ (1<<15) + (14<<10) + (15<<5) + 16,
+ (0<<15) + (17<<10) + (18<<5) + 19,
+ (1<<15) + (20<<10) + (21<<5) + 22,
+ (0<<15) + (23<<10) + (24<<5) + 25};
+ vector unsigned char vucser = {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
+ vector signed char vscser = {-1,-128,0,127,-2,-128,1,127,
+ -3,-128,2,127,-4,-128,3,127};
+ vector unsigned short vusser = {0,65535,1,65535,2,65535,3,65535};
+ vector signed short vssser = {-1,-32768,0,32767,-2,-32768,1,32767};
+ vector unsigned char vucsuer1 = {0,255,1,255,2,255,3,255,4,255,5,255,6,255,7,255};
+ vector unsigned char vucsuer2 = {0,0,0,127,0,0,1,128,0,0,2,129,0,0,3,130};
+ vector unsigned short vussuer1 = {0,65535,1,65535,2,65535,3,65535};
+ vector unsigned short vussuer2 = {0,0,0,32767,0,0,1,32768};
+
+ vucr = vec_pack (vusa, vusb);
+ vscr = vec_pack (vssa, vssb);
+ vbcr = vec_pack (vbsa, vbsb);
+ vusr = vec_pack (vuia, vuib);
+ vssr = vec_pack (vsia, vsib);
+ vbsr = vec_pack (vbia, vbib);
+ vpr = vec_packpx (vipa, vipb);
+ vucsr = vec_packs (vusc, vusd);
+ vscsr = vec_packs (vssc, vssd);
+ vussr = vec_packs (vuic, vuid);
+ vsssr = vec_packs (vsic, vsid);
+ vucsur1 = vec_packsu (vusc, vusd);
+ vucsur2 = vec_packsu (vssc, vssd);
+ vussur1 = vec_packsu (vuic, vuid);
+ vussur2 = vec_packsu (vsic, vsid);
+
+ check (vec_all_eq (vucr, vucer), "vucr");
+ check (vec_all_eq (vscr, vscer), "vscr");
+ check (vec_all_eq (vbcr, vbcer), "vbcr");
+ check (vec_all_eq (vusr, vuser), "vusr");
+ check (vec_all_eq (vssr, vsser), "vssr");
+ check (vec_all_eq (vbsr, vbser), "vbsr");
+ check (vec_all_eq (vpr, vper ), "vpr" );
+ check (vec_all_eq (vucsr, vucser), "vucsr");
+ check (vec_all_eq (vscsr, vscser), "vscsr");
+ check (vec_all_eq (vussr, vusser), "vussr");
+ check (vec_all_eq (vsssr, vssser), "vsssr");
+ check (vec_all_eq (vucsur1, vucsuer1), "vucsur1");
+ check (vec_all_eq (vucsur2, vucsuer2), "vucsur2");
+ check (vec_all_eq (vussur1, vussuer1), "vussur1");
+ check (vec_all_eq (vussur2, vussuer2), "vussur2");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/perm-be-order.c b/gcc/testsuite/gcc.dg/vmx/perm-be-order.c
new file mode 100644
index 0000000000..604f63dc95
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/perm-be-order.c
@@ -0,0 +1,74 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb = {16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+ vector signed char vsca = {-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed char vscb = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vucp = {15,16,14,17,13,18,12,19,11,20,10,21,9,22,8,23};
+ vector unsigned char vscp = {15,16,14,17,13,18,12,19,11,20,10,21,9,22,8,23};
+ vector unsigned char vusp = {15,14,17,16,13,12,19,18,11,10,21,20,9,8,23,22};
+ vector unsigned char vssp = {15,14,17,16,13,12,19,18,11,10,21,20,9,8,23,22};
+ vector unsigned char vuip = {15,14,13,12,19,18,17,16,11,10,9,8,23,22,21,20};
+ vector unsigned char vsip = {15,14,13,12,19,18,17,16,11,10,9,8,23,22,21,20};
+ vector unsigned char vfp = {15,14,13,12,19,18,17,16,11,10,9,8,23,22,21,20};
+#else
+ vector unsigned char vucp = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+ vector unsigned char vscp = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+ vector unsigned char vusp = {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
+ vector unsigned char vssp = {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
+ vector unsigned char vuip = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+ vector unsigned char vsip = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+ vector unsigned char vfp = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+#endif
+
+ /* Result vectors. */
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector float vf;
+
+ /* Expected result vectors. */
+ vector unsigned char vucr = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+ vector signed char vscr = {-16,15,-15,14,-14,13,-13,12,-12,11,-11,10,-10,9,-9,8};
+ vector unsigned short vusr = {0,15,1,14,2,13,3,12};
+ vector signed short vssr = {-8,7,-7,6,-6,5,-5,4};
+ vector unsigned int vuir = {0,7,1,6};
+ vector signed int vsir = {-4,3,-3,2};
+ vector float vfr = {-4.0,3.0,-3.0,2.0};
+
+ vuc = vec_perm (vuca, vucb, vucp);
+ vsc = vec_perm (vsca, vscb, vscp);
+ vus = vec_perm (vusa, vusb, vusp);
+ vss = vec_perm (vssa, vssb, vssp);
+ vui = vec_perm (vuia, vuib, vuip);
+ vsi = vec_perm (vsia, vsib, vsip);
+ vf = vec_perm (vfa, vfb, vfp );
+
+ check (vec_all_eq (vuc, vucr), "vuc");
+ check (vec_all_eq (vsc, vscr), "vsc");
+ check (vec_all_eq (vus, vusr), "vus");
+ check (vec_all_eq (vss, vssr), "vss");
+ check (vec_all_eq (vui, vuir), "vui");
+ check (vec_all_eq (vsi, vsir), "vsi");
+ check (vec_all_eq (vf, vfr), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/perm.c b/gcc/testsuite/gcc.dg/vmx/perm.c
new file mode 100644
index 0000000000..be6bf3422c
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/perm.c
@@ -0,0 +1,69 @@
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuca = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vucb
+ = {16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31};
+ vector unsigned char vucp = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+
+ vector signed char vsca
+ = {-16,-15,-14,-13,-12,-11,-10,-9,-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed char vscb = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector unsigned char vscp = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+
+ vector unsigned short vusa = {0,1,2,3,4,5,6,7};
+ vector unsigned short vusb = {8,9,10,11,12,13,14,15};
+ vector unsigned char vusp = {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
+
+ vector signed short vssa = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vssb = {0,1,2,3,4,5,6,7};
+ vector unsigned char vssp = {0,1,30,31,2,3,28,29,4,5,26,27,6,7,24,25};
+
+ vector unsigned int vuia = {0,1,2,3};
+ vector unsigned int vuib = {4,5,6,7};
+ vector unsigned char vuip = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+
+ vector signed int vsia = {-4,-3,-2,-1};
+ vector signed int vsib = {0,1,2,3};
+ vector unsigned char vsip = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+
+ vector float vfa = {-4.0,-3.0,-2.0,-1.0};
+ vector float vfb = {0.0,1.0,2.0,3.0};
+ vector unsigned char vfp = {0,1,2,3,28,29,30,31,4,5,6,7,24,25,26,27};
+
+ /* Result vectors. */
+ vector unsigned char vuc;
+ vector signed char vsc;
+ vector unsigned short vus;
+ vector signed short vss;
+ vector unsigned int vui;
+ vector signed int vsi;
+ vector float vf;
+
+ /* Expected result vectors. */
+ vector unsigned char vucr = {0,31,1,30,2,29,3,28,4,27,5,26,6,25,7,24};
+ vector signed char vscr = {-16,15,-15,14,-14,13,-13,12,-12,11,-11,10,-10,9,-9,8};
+ vector unsigned short vusr = {0,15,1,14,2,13,3,12};
+ vector signed short vssr = {-8,7,-7,6,-6,5,-5,4};
+ vector unsigned int vuir = {0,7,1,6};
+ vector signed int vsir = {-4,3,-3,2};
+ vector float vfr = {-4.0,3.0,-3.0,2.0};
+
+ vuc = vec_perm (vuca, vucb, vucp);
+ vsc = vec_perm (vsca, vscb, vscp);
+ vus = vec_perm (vusa, vusb, vusp);
+ vss = vec_perm (vssa, vssb, vssp);
+ vui = vec_perm (vuia, vuib, vuip);
+ vsi = vec_perm (vsia, vsib, vsip);
+ vf = vec_perm (vfa, vfb, vfp );
+
+ check (vec_all_eq (vuc, vucr), "vuc");
+ check (vec_all_eq (vsc, vscr), "vsc");
+ check (vec_all_eq (vus, vusr), "vus");
+ check (vec_all_eq (vss, vssr), "vss");
+ check (vec_all_eq (vui, vuir), "vui");
+ check (vec_all_eq (vsi, vsir), "vsi");
+ check (vec_all_eq (vf, vfr), "vf" );
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/sn7153.c b/gcc/testsuite/gcc.dg/vmx/sn7153.c
index a498a86200..2381a891cd 100644
--- a/gcc/testsuite/gcc.dg/vmx/sn7153.c
+++ b/gcc/testsuite/gcc.dg/vmx/sn7153.c
@@ -34,7 +34,11 @@ main()
void validate_sat()
{
+#ifdef __LITTLE_ENDIAN__
+ if (vec_any_ne(vec_splat(vec_mfvscr(), 0), ((vector unsigned short){1,1,1,1,1,1,1,1})))
+#else
if (vec_any_ne(vec_splat(vec_mfvscr(), 7), ((vector unsigned short){1,1,1,1,1,1,1,1})))
+#endif
{
union {vector unsigned short v; unsigned short s[8];} u;
u.v = vec_mfvscr();
diff --git a/gcc/testsuite/gcc.dg/vmx/splat-be-order.c b/gcc/testsuite/gcc.dg/vmx/splat-be-order.c
new file mode 100644
index 0000000000..e265ae4be2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/splat-be-order.c
@@ -0,0 +1,59 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {-2.0,-1.0,0.0,1.0};
+
+ /* Result vectors. */
+ vector unsigned char vucr;
+ vector signed char vscr;
+ vector unsigned short vusr;
+ vector signed short vssr;
+ vector unsigned int vuir;
+ vector signed int vsir;
+ vector float vfr;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vucer = {14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14};
+ vector signed char vscer = {-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1};
+ vector unsigned short vuser = {0,0,0,0,0,0,0,0};
+ vector signed short vsser = {3,3,3,3,3,3,3,3};
+ vector unsigned int vuier = {1,1,1,1};
+ vector signed int vsier = {-2,-2,-2,-2};
+ vector float vfer = {0.0,0.0,0.0,0.0};
+#else
+ vector unsigned char vucer = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
+ vector signed char vscer = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+ vector unsigned short vuser = {7,7,7,7,7,7,7,7};
+ vector signed short vsser = {-4,-4,-4,-4,-4,-4,-4,-4};
+ vector unsigned int vuier = {2,2,2,2};
+ vector signed int vsier = {1,1,1,1};
+ vector float vfer = {-1.0,-1.0,-1.0,-1.0};
+#endif
+
+ vucr = vec_splat (vuc, 1);
+ vscr = vec_splat (vsc, 8);
+ vusr = vec_splat (vus, 7);
+ vssr = vec_splat (vss, 0);
+ vuir = vec_splat (vui, 2);
+ vsir = vec_splat (vsi, 3);
+ vfr = vec_splat (vf, 1);
+
+ check (vec_all_eq (vucr, vucer), "vuc");
+ check (vec_all_eq (vscr, vscer), "vsc");
+ check (vec_all_eq (vusr, vuser), "vus");
+ check (vec_all_eq (vssr, vsser), "vss");
+ check (vec_all_eq (vuir, vuier), "vui");
+ check (vec_all_eq (vsir, vsier), "vsi");
+ check (vec_all_eq (vfr, vfer ), "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c
new file mode 100644
index 0000000000..cd389bd0f6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/splat-vsx-be-order.c
@@ -0,0 +1,37 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {-2.0,-1.0,0.0,1.0};
+
+ /* Result vectors. */
+ vector unsigned int vuir;
+ vector signed int vsir;
+ vector float vfr;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned int vuier = {1,1,1,1};
+ vector signed int vsier = {-2,-2,-2,-2};
+ vector float vfer = {0.0,0.0,0.0,0.0};
+#else
+ vector unsigned int vuier = {2,2,2,2};
+ vector signed int vsier = {1,1,1,1};
+ vector float vfer = {-1.0,-1.0,-1.0,-1.0};
+#endif
+
+ vuir = vec_splat (vui, 2);
+ vsir = vec_splat (vsi, 3);
+ vfr = vec_splat (vf, 1);
+
+ check (vec_all_eq (vuir, vuier), "vui");
+ check (vec_all_eq (vsir, vsier), "vsi");
+ check (vec_all_eq (vfr, vfer ), "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/splat-vsx.c b/gcc/testsuite/gcc.dg/vmx/splat-vsx.c
new file mode 100644
index 0000000000..5a6e7dfe46
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/splat-vsx.c
@@ -0,0 +1,31 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {-2.0,-1.0,0.0,1.0};
+
+ /* Result vectors. */
+ vector unsigned int vuir;
+ vector signed int vsir;
+ vector float vfr;
+
+ /* Expected result vectors. */
+ vector unsigned int vuier = {2,2,2,2};
+ vector signed int vsier = {1,1,1,1};
+ vector float vfer = {-1.0,-1.0,-1.0,-1.0};
+
+ vuir = vec_splat (vui, 2);
+ vsir = vec_splat (vsi, 3);
+ vfr = vec_splat (vf, 1);
+
+ check (vec_all_eq (vuir, vuier), "vui");
+ check (vec_all_eq (vsir, vsier), "vsi");
+ check (vec_all_eq (vfr, vfer ), "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/splat.c b/gcc/testsuite/gcc.dg/vmx/splat.c
new file mode 100644
index 0000000000..e45974ac91
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/splat.c
@@ -0,0 +1,47 @@
+#include "harness.h"
+
+static void test()
+{
+ /* Input vectors. */
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {-2.0,-1.0,0.0,1.0};
+
+ /* Result vectors. */
+ vector unsigned char vucr;
+ vector signed char vscr;
+ vector unsigned short vusr;
+ vector signed short vssr;
+ vector unsigned int vuir;
+ vector signed int vsir;
+ vector float vfr;
+
+ /* Expected result vectors. */
+ vector unsigned char vucer = {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
+ vector signed char vscer = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+ vector unsigned short vuser = {7,7,7,7,7,7,7,7};
+ vector signed short vsser = {-4,-4,-4,-4,-4,-4,-4,-4};
+ vector unsigned int vuier = {2,2,2,2};
+ vector signed int vsier = {1,1,1,1};
+ vector float vfer = {-1.0,-1.0,-1.0,-1.0};
+
+ vucr = vec_splat (vuc, 1);
+ vscr = vec_splat (vsc, 8);
+ vusr = vec_splat (vus, 7);
+ vssr = vec_splat (vss, 0);
+ vuir = vec_splat (vui, 2);
+ vsir = vec_splat (vsi, 3);
+ vfr = vec_splat (vf, 1);
+
+ check (vec_all_eq (vucr, vucer), "vuc");
+ check (vec_all_eq (vscr, vscer), "vsc");
+ check (vec_all_eq (vusr, vuser), "vus");
+ check (vec_all_eq (vssr, vsser), "vss");
+ check (vec_all_eq (vuir, vuier), "vui");
+ check (vec_all_eq (vsir, vsier), "vsi");
+ check (vec_all_eq (vfr, vfer ), "vf");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/st-be-order.c b/gcc/testsuite/gcc.dg/vmx/st-be-order.c
new file mode 100644
index 0000000000..1a7b01bb5a
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/st-be-order.c
@@ -0,0 +1,83 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ check (svuc[i] == i, "svuc");
+ check (svsc[i] == i - 8, "svsc");
+ check (svbc[i] == ((i % 2) ? 0xff : 0), "svbc");
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ check (svus[i] == i, "svus");
+ check (svss[i] == i - 4, "svss");
+ check (svbs[i] == ((i % 2) ? 0xffff : 0), "svbs");
+ check (svp[i] == i, "svp");
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ check (svui[i] == i, "svui");
+ check (svsi[i] == i - 2, "svsi");
+ check (svbi[i] == ((i % 2) ? 0xffffffff : 0), "svbi");
+ check (svf[i] == i * 1.0f, "svf");
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vuc = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
+ vector signed char vsc = {7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8};
+ vector bool char vbc = {255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0};
+ vector unsigned short vus = {7,6,5,4,3,2,1,0};
+ vector signed short vss = {3,2,1,0,-1,-2,-3,-4};
+ vector bool short vbs = {65535,0,65535,0,65535,0,65535,0};
+ vector pixel vp = {7,6,5,4,3,2,1,0};
+ vector unsigned int vui = {3,2,1,0};
+ vector signed int vsi = {1,0,-1,-2};
+ vector bool int vbi = {0xffffffff,0,0xffffffff,0};
+ vector float vf = {3.0,2.0,1.0,0.0};
+#else
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel vp = {0,1,2,3,4,5,6,7};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector bool int vbi = {0,0xffffffff,0,0xffffffff};
+ vector float vf = {0.0,1.0,2.0,3.0};
+#endif
+
+ vec_st (vuc, 0, (vector unsigned char *)svuc);
+ vec_st (vsc, 0, (vector signed char *)svsc);
+ vec_st (vbc, 0, (vector bool char *)svbc);
+ vec_st (vus, 0, (vector unsigned short *)svus);
+ vec_st (vss, 0, (vector signed short *)svss);
+ vec_st (vbs, 0, (vector bool short *)svbs);
+ vec_st (vp, 0, (vector pixel *)svp);
+ vec_st (vui, 0, (vector unsigned int *)svui);
+ vec_st (vsi, 0, (vector signed int *)svsi);
+ vec_st (vbi, 0, (vector bool int *)svbi);
+ vec_st (vf, 0, (vector float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c
new file mode 100644
index 0000000000..a2688fab57
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/st-vsx-be-order.c
@@ -0,0 +1,34 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ check (svul[i] == i, "svul");
+ check (svd[i] == i * 1.0, "svd");
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned long long vul = {1,0};
+ vector double vd = {1.0,0.0};
+#else
+ vector unsigned long long vul = {0,1};
+ vector double vd = {0.0,1.0};
+#endif
+
+ vec_st (vul, 0, (vector unsigned long long *)svul);
+ vec_st (vd, 0, (vector double *)svd);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/st-vsx.c b/gcc/testsuite/gcc.dg/vmx/st-vsx.c
new file mode 100644
index 0000000000..ef67de0bae
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/st-vsx.c
@@ -0,0 +1,29 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ check (svul[i] == i, "svul");
+ check (svd[i] == i * 1.0, "svd");
+ }
+}
+
+static void test ()
+{
+ vector unsigned long long vul = {0,1};
+ vector double vd = {0.0,1.0};
+
+ vec_st (vul, 0, (vector unsigned long long *)svul);
+ vec_st (vd, 0, (vector double *)svd);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/st.c b/gcc/testsuite/gcc.dg/vmx/st.c
new file mode 100644
index 0000000000..3339b72831
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/st.c
@@ -0,0 +1,67 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ check (svuc[i] == i, "svuc");
+ check (svsc[i] == i - 8, "svsc");
+ check (svbc[i] == ((i % 2) ? 0xff : 0), "svbc");
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ check (svus[i] == i, "svus");
+ check (svss[i] == i - 4, "svss");
+ check (svbs[i] == ((i % 2) ? 0xffff : 0), "svbs");
+ check (svp[i] == i, "svp");
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ check (svui[i] == i, "svui");
+ check (svsi[i] == i - 2, "svsi");
+ check (svbi[i] == ((i % 2) ? 0xffffffff : 0), "svbi");
+ check (svf[i] == i * 1.0f, "svf");
+ }
+}
+
+static void test ()
+{
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel vp = {0,1,2,3,4,5,6,7};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector bool int vbi = {0,0xffffffff,0,0xffffffff};
+ vector float vf = {0.0,1.0,2.0,3.0};
+
+ vec_st (vuc, 0, (vector unsigned char *)svuc);
+ vec_st (vsc, 0, (vector signed char *)svsc);
+ vec_st (vbc, 0, (vector bool char *)svbc);
+ vec_st (vus, 0, (vector unsigned short *)svus);
+ vec_st (vss, 0, (vector signed short *)svss);
+ vec_st (vbs, 0, (vector bool short *)svbs);
+ vec_st (vp, 0, (vector pixel *)svp);
+ vec_st (vui, 0, (vector unsigned int *)svui);
+ vec_st (vsi, 0, (vector signed int *)svsi);
+ vec_st (vbi, 0, (vector bool int *)svbi);
+ vec_st (vf, 0, (vector float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ste-be-order.c b/gcc/testsuite/gcc.dg/vmx/ste-be-order.c
new file mode 100644
index 0000000000..75f2004f37
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ste-be-order.c
@@ -0,0 +1,53 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ check (svuc[9] == 9, "svuc");
+ check (svsc[14] == 6, "svsc");
+ check (svus[7] == 7, "svus");
+ check (svss[1] == -3, "svss");
+ check (svui[3] == 3, "svui");
+ check (svsi[2] == 0, "svsi");
+ check (svf[0] == 0.0, "svf");
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vuc = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
+ vector signed char vsc = {7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8};
+ vector unsigned short vus = {7,6,5,4,3,2,1,0};
+ vector signed short vss = {3,2,1,0,-1,-2,-3,-4};
+ vector unsigned int vui = {3,2,1,0};
+ vector signed int vsi = {1,0,-1,-2};
+ vector float vf = {3.0,2.0,1.0,0.0};
+#else
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {0.0,1.0,2.0,3.0};
+#endif
+
+ vec_ste (vuc, 9*1, (unsigned char *)svuc);
+ vec_ste (vsc, 14*1, (signed char *)svsc);
+ vec_ste (vus, 7*2, (unsigned short *)svus);
+ vec_ste (vss, 1*2, (signed short *)svss);
+ vec_ste (vui, 3*4, (unsigned int *)svui);
+ vec_ste (vsi, 2*4, (signed int *)svsi);
+ vec_ste (vf, 0*4, (float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/ste.c b/gcc/testsuite/gcc.dg/vmx/ste.c
new file mode 100644
index 0000000000..9bbda3b320
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/ste.c
@@ -0,0 +1,41 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ check (svuc[9] == 9, "svuc");
+ check (svsc[14] == 6, "svsc");
+ check (svus[7] == 7, "svus");
+ check (svss[1] == -3, "svss");
+ check (svui[3] == 3, "svui");
+ check (svsi[2] == 0, "svsi");
+ check (svf[0] == 0.0, "svf");
+}
+
+static void test ()
+{
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector float vf = {0.0,1.0,2.0,3.0};
+
+ vec_ste (vuc, 9*1, (unsigned char *)svuc);
+ vec_ste (vsc, 14*1, (signed char *)svsc);
+ vec_ste (vus, 7*2, (unsigned short *)svus);
+ vec_ste (vss, 1*2, (signed short *)svss);
+ vec_ste (vui, 3*4, (unsigned int *)svui);
+ vec_ste (vsi, 2*4, (signed int *)svsi);
+ vec_ste (vf, 0*4, (float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/stl-be-order.c b/gcc/testsuite/gcc.dg/vmx/stl-be-order.c
new file mode 100644
index 0000000000..7f00a03649
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/stl-be-order.c
@@ -0,0 +1,83 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ check (svuc[i] == i, "svuc");
+ check (svsc[i] == i - 8, "svsc");
+ check (svbc[i] == ((i % 2) ? 0xff : 0), "svbc");
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ check (svus[i] == i, "svus");
+ check (svss[i] == i - 4, "svss");
+ check (svbs[i] == ((i % 2) ? 0xffff : 0), "svbs");
+ check (svp[i] == i, "svp");
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ check (svui[i] == i, "svui");
+ check (svsi[i] == i - 2, "svsi");
+ check (svbi[i] == ((i % 2) ? 0xffffffff : 0), "svbi");
+ check (svf[i] == i * 1.0f, "svf");
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned char vuc = {15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0};
+ vector signed char vsc = {7,6,5,4,3,2,1,0,-1,-2,-3,-4,-5,-6,-7,-8};
+ vector bool char vbc = {255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0};
+ vector unsigned short vus = {7,6,5,4,3,2,1,0};
+ vector signed short vss = {3,2,1,0,-1,-2,-3,-4};
+ vector bool short vbs = {65535,0,65535,0,65535,0,65535,0};
+ vector pixel vp = {7,6,5,4,3,2,1,0};
+ vector unsigned int vui = {3,2,1,0};
+ vector signed int vsi = {1,0,-1,-2};
+ vector bool int vbi = {0xffffffff,0,0xffffffff,0};
+ vector float vf = {3.0,2.0,1.0,0.0};
+#else
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel vp = {0,1,2,3,4,5,6,7};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector bool int vbi = {0,0xffffffff,0,0xffffffff};
+ vector float vf = {0.0,1.0,2.0,3.0};
+#endif
+
+ vec_stl (vuc, 0, (vector unsigned char *)svuc);
+ vec_stl (vsc, 0, (vector signed char *)svsc);
+ vec_stl (vbc, 0, (vector bool char *)svbc);
+ vec_stl (vus, 0, (vector unsigned short *)svus);
+ vec_stl (vss, 0, (vector signed short *)svss);
+ vec_stl (vbs, 0, (vector bool short *)svbs);
+ vec_stl (vp, 0, (vector pixel *)svp);
+ vec_stl (vui, 0, (vector unsigned int *)svui);
+ vec_stl (vsi, 0, (vector signed int *)svsi);
+ vec_stl (vbi, 0, (vector bool int *)svbi);
+ vec_stl (vf, 0, (vector float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c b/gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c
new file mode 100644
index 0000000000..26f2c27726
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/stl-vsx-be-order.c
@@ -0,0 +1,34 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ check (svul[i] == i, "svul");
+ check (svd[i] == i * 1.0, "svd");
+ }
+}
+
+static void test ()
+{
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector unsigned long long vul = {1,0};
+ vector double vd = {1.0,0.0};
+#else
+ vector unsigned long long vul = {0,1};
+ vector double vd = {0.0,1.0};
+#endif
+
+ vec_stl (vul, 0, (vector unsigned long long *)svul);
+ vec_stl (vd, 0, (vector double *)svd);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/stl-vsx.c b/gcc/testsuite/gcc.dg/vmx/stl-vsx.c
new file mode 100644
index 0000000000..9a1cce6f8f
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/stl-vsx.c
@@ -0,0 +1,29 @@
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-maltivec -mabi=altivec -std=gnu99 -mvsx" } */
+
+#include "harness.h"
+
+static unsigned long long svul[2] __attribute__ ((aligned (16)));
+static double svd[2] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 2; ++i)
+ {
+ check (svul[i] == i, "svul");
+ check (svd[i] == i * 1.0, "svd");
+ }
+}
+
+static void test ()
+{
+ vector unsigned long long vul = {0,1};
+ vector double vd = {0.0,1.0};
+
+ vec_stl (vul, 0, (vector unsigned long long *)svul);
+ vec_stl (vd, 0, (vector double *)svd);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/stl.c b/gcc/testsuite/gcc.dg/vmx/stl.c
new file mode 100644
index 0000000000..9ebd8782a4
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/stl.c
@@ -0,0 +1,67 @@
+#include "harness.h"
+
+static unsigned char svuc[16] __attribute__ ((aligned (16)));
+static signed char svsc[16] __attribute__ ((aligned (16)));
+static unsigned char svbc[16] __attribute__ ((aligned (16)));
+static unsigned short svus[8] __attribute__ ((aligned (16)));
+static signed short svss[8] __attribute__ ((aligned (16)));
+static unsigned short svbs[8] __attribute__ ((aligned (16)));
+static unsigned short svp[8] __attribute__ ((aligned (16)));
+static unsigned int svui[4] __attribute__ ((aligned (16)));
+static signed int svsi[4] __attribute__ ((aligned (16)));
+static unsigned int svbi[4] __attribute__ ((aligned (16)));
+static float svf[4] __attribute__ ((aligned (16)));
+
+static void check_arrays ()
+{
+ unsigned int i;
+ for (i = 0; i < 16; ++i)
+ {
+ check (svuc[i] == i, "svuc");
+ check (svsc[i] == i - 8, "svsc");
+ check (svbc[i] == ((i % 2) ? 0xff : 0), "svbc");
+ }
+ for (i = 0; i < 8; ++i)
+ {
+ check (svus[i] == i, "svus");
+ check (svss[i] == i - 4, "svss");
+ check (svbs[i] == ((i % 2) ? 0xffff : 0), "svbs");
+ check (svp[i] == i, "svp");
+ }
+ for (i = 0; i < 4; ++i)
+ {
+ check (svui[i] == i, "svui");
+ check (svsi[i] == i - 2, "svsi");
+ check (svbi[i] == ((i % 2) ? 0xffffffff : 0), "svbi");
+ check (svf[i] == i * 1.0f, "svf");
+ }
+}
+
+static void test ()
+{
+ vector unsigned char vuc = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15};
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255};
+ vector unsigned short vus = {0,1,2,3,4,5,6,7};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,0,65535,0,65535,0,65535};
+ vector pixel vp = {0,1,2,3,4,5,6,7};
+ vector unsigned int vui = {0,1,2,3};
+ vector signed int vsi = {-2,-1,0,1};
+ vector bool int vbi = {0,0xffffffff,0,0xffffffff};
+ vector float vf = {0.0,1.0,2.0,3.0};
+
+ vec_stl (vuc, 0, (vector unsigned char *)svuc);
+ vec_stl (vsc, 0, (vector signed char *)svsc);
+ vec_stl (vbc, 0, (vector bool char *)svbc);
+ vec_stl (vus, 0, (vector unsigned short *)svus);
+ vec_stl (vss, 0, (vector signed short *)svss);
+ vec_stl (vbs, 0, (vector bool short *)svbs);
+ vec_stl (vp, 0, (vector pixel *)svp);
+ vec_stl (vui, 0, (vector unsigned int *)svui);
+ vec_stl (vsi, 0, (vector signed int *)svsi);
+ vec_stl (vbi, 0, (vector bool int *)svbi);
+ vec_stl (vf, 0, (vector float *)svf);
+
+ check_arrays ();
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c b/gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c
new file mode 100644
index 0000000000..0981cc1d52
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/sum2s-be-order.c
@@ -0,0 +1,19 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector signed int vsia = {-10,1,2,3};
+ vector signed int vsib = {100,101,102,-103};
+ vector signed int vsir;
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector signed int vsier = {91,0,107,0};
+#else
+ vector signed int vsier = {0,92,0,-98};
+#endif
+
+ vsir = vec_sum2s (vsia, vsib);
+
+ check (vec_all_eq (vsir, vsier), "vsir");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/sum2s.c b/gcc/testsuite/gcc.dg/vmx/sum2s.c
new file mode 100644
index 0000000000..ded05be849
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/sum2s.c
@@ -0,0 +1,13 @@
+#include "harness.h"
+
+static void test()
+{
+ vector signed int vsia = {-10,1,2,3};
+ vector signed int vsib = {100,101,102,-103};
+ vector signed int vsir;
+ vector signed int vsier = {0,92,0,-98};
+
+ vsir = vec_sum2s (vsia, vsib);
+
+ check (vec_all_eq (vsir, vsier), "vsir");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/unpack-be-order.c b/gcc/testsuite/gcc.dg/vmx/unpack-be-order.c
new file mode 100644
index 0000000000..e174433dd2
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/unpack-be-order.c
@@ -0,0 +1,88 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+#define BIG 4294967295
+
+static void test()
+{
+ /* Input vectors. */
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,255,0,0,0,255,0,255,0,0,255,255,255,0,255};
+ vector pixel vp = {(0<<15) + (1<<10) + (2<<5) + 3,
+ (1<<15) + (4<<10) + (5<<5) + 6,
+ (0<<15) + (7<<10) + (8<<5) + 9,
+ (1<<15) + (10<<10) + (11<<5) + 12,
+ (1<<15) + (13<<10) + (14<<5) + 15,
+ (0<<15) + (16<<10) + (17<<5) + 18,
+ (1<<15) + (19<<10) + (20<<5) + 21,
+ (0<<15) + (22<<10) + (23<<5) + 24};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,65535,0,0,0,65535,0};
+
+ /* Result vectors. */
+ vector signed short vsch, vscl;
+ vector bool short vbsh, vbsl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector bool int vbih, vbil;
+
+ /* Expected result vectors. */
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector signed short vschr = {0,1,2,3,4,5,6,7};
+ vector signed short vsclr = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector bool short vbshr = {65535,0,0,65535,65535,65535,0,65535};
+ vector bool short vbslr = {0,65535,65535,0,0,0,65535,0};
+ vector unsigned int vuihr = {(65535<<24) + (13<<16) + (14<<8) + 15,
+ (0<<24) + (16<<16) + (17<<8) + 18,
+ (65535<<24) + (19<<16) + (20<<8) + 21,
+ (0<<24) + (22<<16) + (23<<8) + 24};
+ vector unsigned int vuilr = {(0<<24) + (1<<16) + (2<<8) + 3,
+ (65535<<24) + (4<<16) + (5<<8) + 6,
+ (0<<24) + (7<<16) + (8<<8) + 9,
+ (65535<<24) + (10<<16) + (11<<8) + 12};
+ vector signed int vsihr = {0,1,2,3};
+ vector signed int vsilr = {-4,-3,-2,-1};
+ vector bool int vbihr = {0,0,BIG,0};
+ vector bool int vbilr = {0,BIG,BIG,0};
+#else
+ vector signed short vschr = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vsclr = {0,1,2,3,4,5,6,7};
+ vector bool short vbshr = {0,65535,65535,0,0,0,65535,0};
+ vector bool short vbslr = {65535,0,0,65535,65535,65535,0,65535};
+ vector unsigned int vuihr = {(0<<24) + (1<<16) + (2<<8) + 3,
+ (65535<<24) + (4<<16) + (5<<8) + 6,
+ (0<<24) + (7<<16) + (8<<8) + 9,
+ (65535<<24) + (10<<16) + (11<<8) + 12};
+ vector unsigned int vuilr = {(65535<<24) + (13<<16) + (14<<8) + 15,
+ (0<<24) + (16<<16) + (17<<8) + 18,
+ (65535<<24) + (19<<16) + (20<<8) + 21,
+ (0<<24) + (22<<16) + (23<<8) + 24};
+ vector signed int vsihr = {-4,-3,-2,-1};
+ vector signed int vsilr = {0,1,2,3};
+ vector bool int vbihr = {0,BIG,BIG,0};
+ vector bool int vbilr = {0,0,BIG,0};
+#endif
+
+ vsch = vec_unpackh (vsc);
+ vscl = vec_unpackl (vsc);
+ vbsh = vec_unpackh (vbc);
+ vbsl = vec_unpackl (vbc);
+ vuih = vec_unpackh (vp);
+ vuil = vec_unpackl (vp);
+ vsih = vec_unpackh (vss);
+ vsil = vec_unpackl (vss);
+ vbih = vec_unpackh (vbs);
+ vbil = vec_unpackl (vbs);
+
+ check (vec_all_eq (vsch, vschr), "vsch");
+ check (vec_all_eq (vscl, vsclr), "vscl");
+ check (vec_all_eq (vbsh, vbshr), "vbsh");
+ check (vec_all_eq (vbsl, vbslr), "vbsl");
+ check (vec_all_eq (vuih, vuihr), "vuih");
+ check (vec_all_eq (vuil, vuilr), "vuil");
+ check (vec_all_eq (vsih, vsihr), "vsih");
+ check (vec_all_eq (vsil, vsilr), "vsil");
+ check (vec_all_eq (vbih, vbihr), "vbih");
+ check (vec_all_eq (vbil, vbilr), "vbil");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/unpack.c b/gcc/testsuite/gcc.dg/vmx/unpack.c
new file mode 100644
index 0000000000..3c13163cb7
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/unpack.c
@@ -0,0 +1,67 @@
+#include "harness.h"
+
+#define BIG 4294967295
+
+static void test()
+{
+ /* Input vectors. */
+ vector signed char vsc = {-8,-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
+ vector bool char vbc = {0,255,255,0,0,0,255,0,255,0,0,255,255,255,0,255};
+ vector pixel vp = {(0<<15) + (1<<10) + (2<<5) + 3,
+ (1<<15) + (4<<10) + (5<<5) + 6,
+ (0<<15) + (7<<10) + (8<<5) + 9,
+ (1<<15) + (10<<10) + (11<<5) + 12,
+ (1<<15) + (13<<10) + (14<<5) + 15,
+ (0<<15) + (16<<10) + (17<<5) + 18,
+ (1<<15) + (19<<10) + (20<<5) + 21,
+ (0<<15) + (22<<10) + (23<<5) + 24};
+ vector signed short vss = {-4,-3,-2,-1,0,1,2,3};
+ vector bool short vbs = {0,65535,65535,0,0,0,65535,0};
+
+ /* Result vectors. */
+ vector signed short vsch, vscl;
+ vector bool short vbsh, vbsl;
+ vector unsigned int vuih, vuil;
+ vector signed int vsih, vsil;
+ vector bool int vbih, vbil;
+
+ /* Expected result vectors. */
+ vector signed short vschr = {-8,-7,-6,-5,-4,-3,-2,-1};
+ vector signed short vsclr = {0,1,2,3,4,5,6,7};
+ vector bool short vbshr = {0,65535,65535,0,0,0,65535,0};
+ vector bool short vbslr = {65535,0,0,65535,65535,65535,0,65535};
+ vector unsigned int vuihr = {(0<<24) + (1<<16) + (2<<8) + 3,
+ (65535<<24) + (4<<16) + (5<<8) + 6,
+ (0<<24) + (7<<16) + (8<<8) + 9,
+ (65535<<24) + (10<<16) + (11<<8) + 12};
+ vector unsigned int vuilr = {(65535<<24) + (13<<16) + (14<<8) + 15,
+ (0<<24) + (16<<16) + (17<<8) + 18,
+ (65535<<24) + (19<<16) + (20<<8) + 21,
+ (0<<24) + (22<<16) + (23<<8) + 24};
+ vector signed int vsihr = {-4,-3,-2,-1};
+ vector signed int vsilr = {0,1,2,3};
+ vector bool int vbihr = {0,BIG,BIG,0};
+ vector bool int vbilr = {0,0,BIG,0};
+
+ vsch = vec_unpackh (vsc);
+ vscl = vec_unpackl (vsc);
+ vbsh = vec_unpackh (vbc);
+ vbsl = vec_unpackl (vbc);
+ vuih = vec_unpackh (vp);
+ vuil = vec_unpackl (vp);
+ vsih = vec_unpackh (vss);
+ vsil = vec_unpackl (vss);
+ vbih = vec_unpackh (vbs);
+ vbil = vec_unpackl (vbs);
+
+ check (vec_all_eq (vsch, vschr), "vsch");
+ check (vec_all_eq (vscl, vsclr), "vscl");
+ check (vec_all_eq (vbsh, vbshr), "vbsh");
+ check (vec_all_eq (vbsl, vbslr), "vbsl");
+ check (vec_all_eq (vuih, vuihr), "vuih");
+ check (vec_all_eq (vuil, vuilr), "vuil");
+ check (vec_all_eq (vsih, vsihr), "vsih");
+ check (vec_all_eq (vsil, vsilr), "vsil");
+ check (vec_all_eq (vbih, vbihr), "vbih");
+ check (vec_all_eq (vbil, vbilr), "vbil");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/vec-set.c b/gcc/testsuite/gcc.dg/vmx/vec-set.c
new file mode 100644
index 0000000000..fa11c47a12
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/vec-set.c
@@ -0,0 +1,14 @@
+#include "harness.h"
+
+vector short
+vec_set (short m)
+{
+ return (vector short){m, 0, 0, 0, 0, 0, 0, 0};
+}
+
+static void test()
+{
+ check (vec_all_eq (vec_set (7),
+ ((vector short){7, 0, 0, 0, 0, 0, 0, 0})),
+ "vec_set");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/vmx.exp b/gcc/testsuite/gcc.dg/vmx/vmx.exp
index 85c88d8a39..b3c73e8594 100644
--- a/gcc/testsuite/gcc.dg/vmx/vmx.exp
+++ b/gcc/testsuite/gcc.dg/vmx/vmx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/vmx/vsums-be-order.c b/gcc/testsuite/gcc.dg/vmx/vsums-be-order.c
new file mode 100644
index 0000000000..e4a34e9f96
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/vsums-be-order.c
@@ -0,0 +1,20 @@
+/* { dg-options "-maltivec=be -mabi=altivec -std=gnu99 -mno-vsx" } */
+
+#include "harness.h"
+
+static void test()
+{
+ vector signed int va = {-7,11,-13,17};
+
+#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
+ vector signed int vb = {128,0,0,0};
+ vector signed int evd = {136,0,0,0};
+#else
+ vector signed int vb = {0,0,0,128};
+ vector signed int evd = {0,0,0,136};
+#endif
+
+ vector signed int vd = vec_sums (va, vb);
+
+ check (vec_all_eq (vd, evd), "sums");
+}
diff --git a/gcc/testsuite/gcc.dg/vmx/vsums.c b/gcc/testsuite/gcc.dg/vmx/vsums.c
new file mode 100644
index 0000000000..d678aceec1
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/vmx/vsums.c
@@ -0,0 +1,12 @@
+#include "harness.h"
+
+static void test()
+{
+ vector signed int va = {-7,11,-13,17};
+ vector signed int vb = {0,0,0,128};
+ vector signed int evd = {0,0,0,136};
+
+ vector signed int vd = vec_sums (va, vb);
+
+ check (vec_all_eq (vd, evd), "sums");
+}
diff --git a/gcc/testsuite/gcc.dg/vxworks/vxworks.exp b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
index 8526c5866f..43189cef47 100644
--- a/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
+++ b/gcc/testsuite/gcc.dg/vxworks/vxworks.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/warn-nsstring.c b/gcc/testsuite/gcc.dg/warn-nsstring.c
index 3795fb7376..600ff34d93 100644
--- a/gcc/testsuite/gcc.dg/warn-nsstring.c
+++ b/gcc/testsuite/gcc.dg/warn-nsstring.c
@@ -1,6 +1,6 @@
/* Check that the NSString format extension is rejected in c. */
/* { dg-do compile } */
-
+/* { dg-options "-Wformat" } */
extern void NSLog (void *fmt, ...) __attribute__((format(__NSString__, 1, 2))); /* { dg-warning "is only allowed in Objective-C dialects" } */
extern void NSLog1 (void *fmt, ...) __attribute__((format(NSString, 1, 2))); /* { dg-warning "is only allowed in Objective-C dialects" } */
diff --git a/gcc/testsuite/gcc.dg/wdate-time.c b/gcc/testsuite/gcc.dg/wdate-time.c
new file mode 100644
index 0000000000..0ff27b4cd6
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/wdate-time.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-Wdate-time" } */
+
+const char time[] = __TIME__; /* { dg-warning "might prevent reproducible builds" } */
+const char date[] = __DATE__; /* { dg-warning "might prevent reproducible builds" } */
+const char timestamp[] = __TIMESTAMP__; /* { dg-warning "might prevent reproducible builds" } */
diff --git a/gcc/testsuite/gcc.dg/weak/typeof-2.c b/gcc/testsuite/gcc.dg/weak/typeof-2.c
index d13235fd97..45a12ebf91 100644
--- a/gcc/testsuite/gcc.dg/weak/typeof-2.c
+++ b/gcc/testsuite/gcc.dg/weak/typeof-2.c
@@ -33,7 +33,7 @@ int bar3 (int x)
// { dg-final { scan-assembler "baz2" } }
// { dg-final { scan-assembler-not "baz2.*baz2.*baz2.*baz2.*baz2.*baz2" } }
// { dg-final { scan-assembler-not "foo3" } }
-// SH targets put the funtion address into a constant pool and / or register,
+// SH targets put the function address into a constant pool and / or register,
// so it does not appear repeated (as much as expected) in the assembler.
// { dg-final { global target_triplet } }
// { dg-final { if [string match sh-*-* $target_triplet ] {return} } }
diff --git a/gcc/testsuite/gcc.dg/weak/weak-1.c b/gcc/testsuite/gcc.dg/weak/weak-1.c
index 078c3ef361..14e9de7acb 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-1.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
+/* { dg-skip-if "" { *-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-15.c b/gcc/testsuite/gcc.dg/weak/weak-15.c
index 2218ca4a74..34b089bda5 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-15.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-15.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?a" } } */
/* { dg-final { scan-assembler-not "weak\[^ \t\]*\[ \t\]_?b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-16.c b/gcc/testsuite/gcc.dg/weak/weak-16.c
index 3bcf3885d7..d557a6e45f 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-16.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-16.c
@@ -4,6 +4,7 @@
/* { dg-options "-fno-common -Os" } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_index" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?kallsyms_token_table" } } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
extern int kallsyms_token_index[] __attribute__((weak));
extern int kallsyms_token_table[] __attribute__((weak));
diff --git a/gcc/testsuite/gcc.dg/weak/weak-2.c b/gcc/testsuite/gcc.dg/weak/weak-2.c
index 973f4c216b..b328c3c088 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-2.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-2.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-3.c b/gcc/testsuite/gcc.dg/weak/weak-3.c
index 748bd236cc..ca6e0b6208 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-3.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-3.c
@@ -2,6 +2,7 @@
/* { dg-require-alias "" } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common -Waddress" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?ffoo1b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-4.c b/gcc/testsuite/gcc.dg/weak/weak-4.c
index cd8a1e9124..a84f580831 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-4.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-4.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-weak "" } */
/* { dg-options "-fno-common" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak-5.c b/gcc/testsuite/gcc.dg/weak/weak-5.c
index e82792af3f..714c9dca0a 100644
--- a/gcc/testsuite/gcc.dg/weak/weak-5.c
+++ b/gcc/testsuite/gcc.dg/weak/weak-5.c
@@ -2,6 +2,7 @@
/* { dg-require-weak "" } */
/* { dg-require-alias "" } */
/* { dg-options "-fno-common" } */
+/* { dg-skip-if "" { x86_64-*-mingw* } { "*" } { "" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1a" } } */
/* { dg-final { scan-assembler "weak\[^ \t\]*\[ \t\]_?vfoo1b" } } */
diff --git a/gcc/testsuite/gcc.dg/weak/weak.exp b/gcc/testsuite/gcc.dg/weak/weak.exp
index 5dde31edb2..8d0eaaab6e 100644
--- a/gcc/testsuite/gcc.dg/weak/weak.exp
+++ b/gcc/testsuite/gcc.dg/weak/weak.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.dg/webizer.c b/gcc/testsuite/gcc.dg/webizer.c
new file mode 100644
index 0000000000..4f03037c50
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/webizer.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -funroll-loops" } */
+typedef struct rowbox {
+ int startx ;
+ int endx ;
+ int endx1 ;
+ int startx2 ;
+ int ypos ;
+ int desiredL ;
+} ROWBOX ;
+ROWBOX rowArray1[3] ;
+ROWBOX *rowArray = rowArray1;
+
+int numRows = 2;
+
+int row = 1;
+int block = 0;
+double ckt_size_factor ;
+
+__attribute__ ((noinline))
+configure2()
+{
+ block = 0 ;
+ for( row = 1 ; row <= numRows ; row++ ) {
+ block++ ;
+ if( rowArray[row].endx1 > 0 ) {
+ block++ ;
+ }
+ }
+}
+
+main()
+{
+ configure2();
+ __builtin_exit (0);
+}
diff --git a/gcc/testsuite/gcc.dg/winline-3.c b/gcc/testsuite/gcc.dg/winline-3.c
index d586cba644..fc12f573ab 100644
--- a/gcc/testsuite/gcc.dg/winline-3.c
+++ b/gcc/testsuite/gcc.dg/winline-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Winline -O2 --param max-inline-insns-single=1" } */
+/* { dg-options "-Winline -O2 --param max-inline-insns-single=1 --param inline-min-speedup=100" } */
void big (void);
inline int q(void) /* { dg-warning "max-inline-insns-single" "" } */
diff --git a/gcc/testsuite/gcc.dg/wmul-1.c b/gcc/testsuite/gcc.dg/wmul-1.c
new file mode 100644
index 0000000000..3e762f4c18
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/wmul-1.c
@@ -0,0 +1,19 @@
+/* Not to fuse widening multiply with accumulate if the multiply has more than
+ one uses.
+ Note that for targets where pointer and int are of the same size or
+ widening multiply-and-accumulate is not available, this test just passes. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-widening_mul" } */
+
+typedef int ArrT [10][10];
+
+void
+foo (ArrT Arr, int Idx)
+{
+ Arr[Idx][Idx] = 1;
+ Arr[Idx + 10][Idx] = 2;
+}
+
+/* { dg-final { scan-tree-dump-not "WIDEN_MULT_PLUS_EXPR" "widening_mul" } } */
+/* { dg-final { cleanup-tree-dump "widening_mul" } } */
diff --git a/gcc/testsuite/gcc.misc-tests/acker1.exp b/gcc/testsuite/gcc.misc-tests/acker1.exp
index 58b9b1654e..ca035a8f80 100644
--- a/gcc/testsuite/gcc.misc-tests/acker1.exp
+++ b/gcc/testsuite/gcc.misc-tests/acker1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/arm-isr.exp b/gcc/testsuite/gcc.misc-tests/arm-isr.exp
index 8c2d3227f0..6685e67e3e 100644
--- a/gcc/testsuite/gcc.misc-tests/arm-isr.exp
+++ b/gcc/testsuite/gcc.misc-tests/arm-isr.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/bprob.exp b/gcc/testsuite/gcc.misc-tests/bprob.exp
index 6f520ec729..6c0c068ebe 100644
--- a/gcc/testsuite/gcc.misc-tests/bprob.exp
+++ b/gcc/testsuite/gcc.misc-tests/bprob.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/dectest.exp b/gcc/testsuite/gcc.misc-tests/dectest.exp
index b86f2adec5..56734cc7eb 100644
--- a/gcc/testsuite/gcc.misc-tests/dectest.exp
+++ b/gcc/testsuite/gcc.misc-tests/dectest.exp
@@ -1,4 +1,4 @@
-# Copyright 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/dhry.exp b/gcc/testsuite/gcc.misc-tests/dhry.exp
index c913a955d5..f698d6ba85 100644
--- a/gcc/testsuite/gcc.misc-tests/dhry.exp
+++ b/gcc/testsuite/gcc.misc-tests/dhry.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/gcov-14.c b/gcc/testsuite/gcc.misc-tests/gcov-14.c
index 564b08eaa9..de7ac0d2ab 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov-14.c
+++ b/gcc/testsuite/gcc.misc-tests/gcov-14.c
@@ -5,8 +5,8 @@
/* { dg-additional-options "-flat_namespace -undefined suppress" { target *-*-darwin* } } */
/* { dg-require-weak "" } */
/* { dg-do run { target native } } */
-/* { dg-skip-if "undefined weak not supported" { alpha*-dec-osf* } } */
/* { dg-skip-if "undefined weak not supported" { { hppa*-*-hpux* } && { ! lp64 } } } */
+/* { dg-skip-if "undefined weak not supported" { powerpc-ibm-aix* } } */
extern int __attribute__ ((weak)) Foo ();
diff --git a/gcc/testsuite/gcc.misc-tests/gcov.exp b/gcc/testsuite/gcc.misc-tests/gcov.exp
index 85a1c34abd..8132e7cdc8 100644
--- a/gcc/testsuite/gcc.misc-tests/gcov.exp
+++ b/gcc/testsuite/gcc.misc-tests/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/help.exp b/gcc/testsuite/gcc.misc-tests/help.exp
index 6c38c8fed3..e18912cfb5 100644
--- a/gcc/testsuite/gcc.misc-tests/help.exp
+++ b/gcc/testsuite/gcc.misc-tests/help.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -55,11 +55,11 @@ check_for_options c "--help=target,optimizers" "" "" ""
check_for_options c "--help=warnings,^joined,^undocumented" "" "" ""
check_for_options c "-Q -O2 --help=optimizers" {
-O
--ftree-vectorize[^\n]*disabled
+-ftree-loop-vectorize[^\n]*disabled
} " -g " ""
check_for_options c "-Q -O3 --help=optimizers" {
-O
--ftree-vectorize[^\n]*enabled
+-ftree-loop-vectorize[^\n]*enabled
} " -g " ""
# Try repeated --help=.
check_for_options c "--help=params --help=optimizers" {
diff --git a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
index a9f767cde0..83e1045a96 100644
--- a/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
+++ b/gcc/testsuite/gcc.misc-tests/i386-prefetch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/linkage.exp b/gcc/testsuite/gcc.misc-tests/linkage.exp
index 887f31b21a..eeef6c25a1 100644
--- a/gcc/testsuite/gcc.misc-tests/linkage.exp
+++ b/gcc/testsuite/gcc.misc-tests/linkage.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1988, 90-96, 1997, 2000, 2001, 2002, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1988-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,18 +27,6 @@ if { [isnative] && ![is_remote host] } then {
# Need to ensure ABI for native compiler matches gcc
set native_cflags ""
- if [istarget "mips-sgi-irix6*"] {
- set file_string [exec file "linkage-x.o"]
- if [ string match "*64*" $file_string ] {
- set native_cflags "-64"
- }
- if [ string match "*ELF 32*" $file_string ] {
- set native_cflags "-32"
- }
- if [ string match "*N32*" $file_string ] {
- set native_cflags "-n32"
- }
- }
if [istarget "sparc*-sun-solaris2*"] {
set file_string [exec file "linkage-x.o"]
if [ string match "*64*" $file_string ] {
@@ -61,7 +48,9 @@ if { [isnative] && ![is_remote host] } then {
if [ string match "*64-bit*" $file_string ] {
set native_cflags "-m64"
}
- } elseif {[istarget "i*86-*-linux*"] || [istarget "x86_64-*-linux*"]} {
+ } elseif {[istarget "i*86-*-linux*"]
+ || [istarget "i*86-*-gnu*"]
+ || [istarget "x86_64-*-linux*"]} then {
set file_string [exec file "linkage-x.o"]
if [ string match "*32-bit*" $file_string ] {
set native_cflags "-m32"
diff --git a/gcc/testsuite/gcc.misc-tests/matrix1.exp b/gcc/testsuite/gcc.misc-tests/matrix1.exp
index d825eba802..fe06b1f9dc 100644
--- a/gcc/testsuite/gcc.misc-tests/matrix1.exp
+++ b/gcc/testsuite/gcc.misc-tests/matrix1.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/mg-2.exp b/gcc/testsuite/gcc.misc-tests/mg-2.exp
index cfeeb83464..f2375c870b 100644
--- a/gcc/testsuite/gcc.misc-tests/mg-2.exp
+++ b/gcc/testsuite/gcc.misc-tests/mg-2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/mg.exp b/gcc/testsuite/gcc.misc-tests/mg.exp
index 7ba3ae1c65..ad28ee78ef 100644
--- a/gcc/testsuite/gcc.misc-tests/mg.exp
+++ b/gcc/testsuite/gcc.misc-tests/mg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/options.exp b/gcc/testsuite/gcc.misc-tests/options.exp
index a9a74e19af..bb619dc2b3 100644
--- a/gcc/testsuite/gcc.misc-tests/options.exp
+++ b/gcc/testsuite/gcc.misc-tests/options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/sieve.exp b/gcc/testsuite/gcc.misc-tests/sieve.exp
index 3f82ca91b5..7007b644c0 100644
--- a/gcc/testsuite/gcc.misc-tests/sieve.exp
+++ b/gcc/testsuite/gcc.misc-tests/sieve.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.misc-tests/sort2.exp b/gcc/testsuite/gcc.misc-tests/sort2.exp
index d89be7af77..28bdf1f84d 100644
--- a/gcc/testsuite/gcc.misc-tests/sort2.exp
+++ b/gcc/testsuite/gcc.misc-tests/sort2.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/aarch64/121127.c b/gcc/testsuite/gcc.target/aarch64/121127.c
new file mode 100644
index 0000000000..a7dca09fec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/121127.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-g -femit-struct-debug-baseonly" } */
+
+typedef __builtin_va_list __gnuc_va_list;
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
new file mode 100644
index 0000000000..195f977c2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/aapcs64.exp
@@ -0,0 +1,67 @@
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Contributed by ARM Ltd.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+load_lib c-torture.exp
+load_lib target-supports.exp
+load_lib torture-options.exp
+
+if { ![istarget aarch64*-*-*] } then {
+ return
+}
+
+torture-init
+set-torture-options $C_TORTURE_OPTIONS
+set additional_flags "-W -Wall -Wno-abi"
+
+# Test parameter passing.
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
+ if {[runtest_file_p $runtests $src]} {
+ c-torture-execute [list $src \
+ $srcdir/$subdir/abitest.S] \
+ $additional_flags
+ }
+}
+
+# Test unnamed argument retrieval via the va_arg macro.
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/va_arg-*.c]] {
+ if {[runtest_file_p $runtests $src]} {
+ c-torture-execute [list $src \
+ $srcdir/$subdir/abitest.S] \
+ $additional_flags
+ }
+}
+
+# Test function return value.
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/func-ret-*.c]] {
+ if {[runtest_file_p $runtests $src]} {
+ c-torture-execute [list $src \
+ $srcdir/$subdir/abitest.S] \
+ $additional_flags
+ }
+}
+
+# Test no internal compiler errors.
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/ice_*.c]] {
+ if {[runtest_file_p $runtests $src]} {
+ c-torture [list $src] \
+ $additional_flags
+ }
+}
+
+torture-finish
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-2.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-2.h
new file mode 100644
index 0000000000..c56e7cc678
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-2.h
@@ -0,0 +1,101 @@
+/* This header file should be included for the purpose of function return
+ value testing. */
+
+#include "abitest-common.h"
+#include "validate_memory.h"
+
+void (*testfunc_ptr)(char* stack);
+
+/* Helper macros to generate function name. Example of the function name:
+ func_return_val_1. */
+#define FUNC_BASE_NAME func_return_val_
+#define FUNC_NAME_COMBINE(base,suffix) base ## suffix
+#define FUNC_NAME_1(base,suffix) FUNC_NAME_COMBINE(base,suffix)
+#define FUNC_NAME(suffix) FUNC_NAME_1(FUNC_BASE_NAME,suffix)
+#define TEST_FUNC_BASE_NAME testfunc_
+#define TEST_FUNC_NAME(suffix) FUNC_NAME_1(TEST_FUNC_BASE_NAME,suffix)
+
+#undef DUMP_STATUS
+#ifdef DUMP_ENABLED
+#define DUMP_STATUS(type,val) printf ("### Checking "#type" "#val"\n");
+#else
+#define DUMP_STATUS(type,val)
+#endif
+
+/* Generate code to do memcmp to check if the returned value is in the
+ correct location and has the expected value.
+ Note that for value that is returned in the caller-allocated memory
+ block, we get the address from the saved x8 register. x8 is saved
+ just after the callee is returned; we assume that x8 has not been
+ clobbered at then, although there is no requirement for the callee
+ preserve the value stored in x8. Luckily, all test cases here are
+ simple enough that x8 doesn't normally get clobbered (although not
+ guaranteed). */
+#undef FUNC_VAL_CHECK
+#define FUNC_VAL_CHECK(id, type, val, offset, layout) \
+void TEST_FUNC_NAME(id)(char* stack) \
+{ \
+ type __x = val; \
+ char* addr; \
+ DUMP_STATUS(type,val) \
+ if (offset != X8) \
+ addr = stack + offset; \
+ else \
+ addr = *(char **)(stack + X8); \
+ if (validate_memory (&__x, addr, sizeof (type), layout) != 0) \
+ abort(); \
+}
+
+/* Composite larger than 16 bytes is replaced by a pointer to a copy prepared
+ by the caller, so here we extrat the pointer, deref it and compare the
+ content with that of the original one. */
+#define PTR(type, val, offset, ...) { \
+ type * ptr; \
+ DUMP_ARG(type,val) \
+ ptr = *(type **)(stack + offset); \
+ if (memcmp (ptr, &val, sizeof (type)) != 0) abort (); \
+}
+
+#include TESTFILE
+
+MYFUNCTYPE myfunc () PCSATTR;
+
+/* Define the function to return VAL of type TYPE. I and D in the
+ parameter list are two dummy parameters to help improve the detection
+ of bugs like a short vector being returned in X0 after copied from V0. */
+#undef FUNC_VAL_CHECK
+#define FUNC_VAL_CHECK(id, type, var, offset, layout) \
+__attribute__ ((noinline)) type FUNC_NAME (id) (int i, double d, type t) \
+ { \
+ asm (""::"r" (i),"r" (d)); /* asm prevents function from getting \
+ optimized away. Using i and d prevents \
+ warnings about unused parameters. \
+ */ \
+ return t; \
+ }
+#include TESTFILE
+
+
+/* Call the function to return value and call the checking function
+ to validate. See the comment above for the reason of having 0 and 0.0
+ in the function argument list. */
+#undef FUNC_VAL_CHECK
+#define FUNC_VAL_CHECK(id, type, var, offset, layout) \
+ { \
+ testfunc_ptr = TEST_FUNC_NAME(id); \
+ FUNC_NAME(id) (0, 0.0, var); \
+ myfunc (); \
+ }
+
+int main()
+{
+ which_kind_of_test = TK_RETURN;
+
+#ifdef HAS_DATA_INIT_FUNC
+ init_data ();
+#endif
+
+#include TESTFILE
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-common.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-common.h
new file mode 100644
index 0000000000..4e2ef0dace
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest-common.h
@@ -0,0 +1,139 @@
+#undef __AAPCS64_BIG_ENDIAN__
+#ifdef __GNUC__
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+#define __AAPCS64_BIG_ENDIAN__
+#endif
+#else
+#error unknown compiler
+#endif
+
+#define IN_FRAMEWORK
+
+#define D0 0
+#define D1 8
+#define D2 16
+#define D3 24
+#define D4 32
+#define D5 40
+#define D6 48
+#define D7 56
+
+#define S0 64
+#define S1 68
+#define S2 72
+#define S3 76
+#define S4 80
+#define S5 84
+#define S6 88
+#define S7 92
+
+#define W0 96
+#define W1 100
+#define W2 104
+#define W3 108
+#define W4 112
+#define W5 116
+#define W6 120
+#define W7 124
+
+#define X0 128
+#define X1 136
+#define X2 144
+#define X3 152
+#define X4 160
+#define X5 168
+#define X6 176
+#define X7 184
+
+#define Q0 192
+#define Q1 208
+#define Q2 224
+#define Q3 240
+#define Q4 256
+#define Q5 272
+#define Q6 288
+#define Q7 304
+
+#define X8 320
+#define X9 328
+
+#define STACK 336
+
+/* The type of test. 'myfunc' in abitest.S needs to know which kind of
+ test it is running to decide what to do at the runtime. Keep the
+ related code in abitest.S synchronized if anything is changed here. */
+enum aapcs64_test_kind
+{
+ TK_PARAM = 0, /* Test parameter passing. */
+ TK_VA_ARG, /* Test va_arg code generation. */
+ TK_RETURN /* Test function return value. */
+};
+
+int which_kind_of_test;
+
+extern int printf (const char*, ...);
+extern void abort (void);
+extern void dumpregs () __asm("myfunc");
+
+#ifndef MYFUNCTYPE
+#define MYFUNCTYPE void
+#endif
+
+#ifndef PCSATTR
+#define PCSATTR
+#endif
+
+
+#ifdef RUNTIME_ENDIANNESS_CHECK
+#ifndef RUNTIME_ENDIANNESS_CHECK_FUNCTION_DEFINED
+/* This helper function defined to detect whether there is any incompatibility
+ issue on endianness between compilation time and run-time environments.
+ TODO: review the implementation when the work of big-endian support in A64
+ GCC starts.
+ */
+static void rt_endian_check ()
+{
+ const char* msg_endian[2] = {"little-endian", "big-endian"};
+ const char* msg_env[2] = {"compile-time", "run-time"};
+ union
+ {
+ unsigned int ui;
+ unsigned char ch[4];
+ } u;
+ int flag = -1;
+
+ u.ui = 0xCAFEBABE;
+
+ printf ("u.ui=0x%X, u.ch[0]=0x%X\n", u.ui, u.ch[0]);
+
+ if (u.ch[0] == 0xBE)
+ {
+ /* Little-Endian at run-time */
+#ifdef __AAPCS64_BIG_ENDIAN__
+ /* Big-Endian at compile-time */
+ flag = 1;
+#endif
+ }
+ else
+ {
+ /* Big-Endian at run-time */
+#ifndef __AAPCS64_BIG_ENDIAN__
+ /* Little-Endian at compile-time */
+ flag = 0;
+#endif
+ }
+
+ if (flag != -1)
+ {
+ /* Endianness conflict exists */
+ printf ("Error: endianness conflicts between %s and %s:\n\
+\t%s: %s\n\t%s: %s\n", msg_env[0], msg_env[1], msg_env[0], msg_endian[flag],
+ msg_env[1], msg_endian[1-flag]);
+ abort ();
+ }
+
+ return;
+}
+#endif
+#define RUNTIME_ENDIANNESS_CHECK_FUNCTION_DEFINED
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S
new file mode 100644
index 0000000000..86ce7bed77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.S
@@ -0,0 +1,59 @@
+ .global dumpregs
+ .global myfunc
+ .type dumpregs,%function
+ .type myfunc,%function
+dumpregs:
+myfunc:
+ mov x16, sp
+ mov x17, sp
+ sub sp, sp, 352 // 336 for registers and 16 for old sp and lr
+
+ stp x8, x9, [x17, #-16]! //320
+
+ stp q6, q7, [x17, #-32]! //288
+ stp q4, q5, [x17, #-32]! //256
+ stp q2, q3, [x17, #-32]! //224
+ stp q0, q1, [x17, #-32]! //192
+
+ stp x6, x7, [x17, #-16]! //176
+ stp x4, x5, [x17, #-16]! //160
+ stp x2, x3, [x17, #-16]! //144
+ stp x0, x1, [x17, #-16]! //128
+
+ stp w6, w7, [x17, #-8]! //120
+ stp w4, w5, [x17, #-8]! //112
+ stp w2, w3, [x17, #-8]! //104
+ stp w0, w1, [x17, #-8]! // 96
+
+ stp s6, s7, [x17, #-8]! // 88
+ stp s4, s5, [x17, #-8]! // 80
+ stp s2, s3, [x17, #-8]! // 72
+ stp s0, s1, [x17, #-8]! // 64
+
+ stp d6, d7, [x17, #-16]! // 48
+ stp d4, d5, [x17, #-16]! // 32
+ stp d2, d3, [x17, #-16]! // 16
+ stp d0, d1, [x17, #-16]! // 0
+
+ add x0, sp, #16
+ stp x16, x30, [x17, #-16]!
+
+ adrp x9, which_kind_of_test // determine the type of test
+ add x9, x9, :lo12:which_kind_of_test
+ ldr w9, [x9, #0]
+ cmp w9, #1
+ bgt LABEL_TEST_FUNC_RETURN
+ bl testfunc // parameter passing test or va_arg code gen test
+ b LABEL_RET
+LABEL_TEST_FUNC_RETURN:
+ adrp x9, testfunc_ptr
+ add x9, x9, :lo12:testfunc_ptr
+ ldr x9, [x9, #0]
+ blr x9 // function return value test
+LABEL_RET:
+ ldp x0, x30, [sp]
+ mov sp, x0
+ ret
+
+.weak testfunc
+.weak testfunc_ptr
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.h
new file mode 100644
index 0000000000..af70937e04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/abitest.h
@@ -0,0 +1,159 @@
+/* This header file should be included for the purpose of parameter passing
+ testing and va_arg code gen testing.
+
+ To test va_arg code gen, #define AAPCS64_TEST_STDARG in the test case.
+
+ The parameter passing test is done by passing variables/constants to
+ 'myfunc', which pushes its incoming arguments to a memory block on the
+ stack and then passes the memory block address to 'testfunc'. It is inside
+ 'testfunc' that the real parameter passing check is carried out.
+
+ The function body of 'myfunc' is in abitest.S. The declaration of 'myfunc'
+ is constructed during the pre-processing stage.
+
+ The va_arg code gen test has a similar workflow, apart from an extra set-up
+ step before calling 'myfunc'. All arguments are passed to 'stdarg_func'
+ first, which assigned these arguments to its local variables via either
+ direct assignment or va_arg macro, depending on whether an argument is named
+ or not. Afterwards, 'stdarg_func' calls 'myfunc' with the aforementioned
+ local variables as the arguments to finish the remaining steps. */
+
+#include "abitest-common.h"
+#include "validate_memory.h"
+
+#ifdef AAPCS64_TEST_STDARG
+/* Generate va_start (ap, last_named_arg). Note that this requires
+ LAST_NAMED_ARG_ID to be defined/used correctly in the test file. */
+#ifndef LAST_NAMED_ARG_ID
+#define LAST_NAMED_ARG_ID 65535
+#endif
+#ifndef VA_START
+#undef VA_START_1
+#define VA_START_1(ap, id) va_start (ap, _f##id);
+#define VA_START(ap, id) VA_START_1 (ap, id);
+#endif
+#endif /* AAPCS64_TEST_STDARG */
+
+/* Some debugging facility. */
+#undef DUMP_ARG
+#ifdef DUMP_ENABLED
+#define DUMP_ARG(type,val) printf ("### Checking ARG "#type" "#val"\n")
+#else
+#define DUMP_ARG(type,val)
+#endif
+
+
+/* Function called from myfunc (defined in abitest.S) to check the arguments
+ passed to myfunc. myfunc has pushed all the arguments into the memory
+ block pointed by STACK. */
+void testfunc(char* stack)
+{
+#define AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS
+ return;
+}
+
+
+#ifndef AAPCS64_TEST_STDARG
+/* Test parameter passing. */
+
+/* Function declaration of myfunc. */
+MYFUNCTYPE myfunc(
+#define AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST
+) PCSATTR;
+
+#else /* AAPCS64_TEST_STDARG */
+/* Test stdarg macros, e.g. va_arg. */
+#include <stdarg.h>
+
+/* Dummy function to help reset parameter passing registers, i.e. X0-X7
+ and V0-V7 (by being passed 0 in W0-W7 and 0.f in S0-S7). */
+__attribute__ ((noinline)) void
+dummy_func (int w0, int w1, int w2, int w3, int w4, int w5, int w6, int w7,
+ float s0, float s1, float s2, float s3, float s4, float s5,
+ float s6, float s7)
+{
+ asm (""); /* Prevent function from getting optimized away */
+ return;
+}
+
+/* Function declaration of myfunc. */
+MYFUNCTYPE myfunc(
+#define AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST
+) PCSATTR;
+
+/* Function definition of stdarg_func.
+ stdarg_func is a variadic function; it retrieves all of its arguments,
+ both named and unnamed, and passes them to myfunc in the identical
+ order. myfunc will carry out the check on the passed values. Remember
+ that myfunc is not a variadic function. */
+MYFUNCTYPE stdarg_func(
+#define AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT
+) PCSATTR
+{
+ /* Start of the function body of stdarg_func. */
+ va_list ap;
+
+ VA_START (ap, LAST_NAMED_ARG_ID)
+ /* Zeroize the content of X0-X7 and V0-V7 to make sure that any va_arg
+ failure will not be hidden by the old data being in these registers. */
+ dummy_func (0, 0, 0, 0, 0, 0, 0, 0, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f);
+ /* A full memory barrier to ensure that compiler won't optimize away
+ va_arg code gen. */
+ __sync_synchronize ();
+ {
+ /* Assign all the function incoming arguments to local variables. */
+#define AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS
+
+ /* Call myfunc and pass in the local variables prepared above. */
+ myfunc (
+#define AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST
+);
+ }
+ va_end (ap);
+}
+
+#endif /* AAPCS64_TEST_STDARG */
+
+
+int main()
+{
+#ifdef RUNTIME_ENDIANNESS_CHECK
+ rt_endian_check();
+#endif
+#ifdef HAS_DATA_INIT_FUNC
+ init_data ();
+#endif
+
+#ifndef AAPCS64_TEST_STDARG
+ which_kind_of_test = TK_PARAM;
+ myfunc(
+#else
+ which_kind_of_test = TK_VA_ARG;
+ stdarg_func(
+#endif
+#define AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST
+#include "macro-def.h"
+#include TESTFILE
+#undef AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST
+);
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-1.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-1.c
new file mode 100644
index 0000000000..16b5c1efdf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-1.c
@@ -0,0 +1,44 @@
+/* Test AAPCS64 function result return.
+
+ This test covers most fundamental data types as specified in
+ AAPCS64 \S 4.1. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-additional-sources "abitest.S" } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "func-ret-1.c"
+#include "type-def.h"
+
+vf2_t vf2 = (vf2_t){ 17.f, 18.f };
+vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead };
+union int128_t qword;
+
+int *int_ptr = (int *)0xabcdef0123456789ULL;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init signed quad-word integer. */
+ qword.l64 = 0xfdb9753102468aceLL;
+ qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest-2.h"
+#else
+FUNC_VAL_CHECK (0, unsigned char , 0xfe , X0, i8in64)
+FUNC_VAL_CHECK (1, signed char , 0xed , X0, i8in64)
+FUNC_VAL_CHECK (2, unsigned short, 0xdcba , X0, i16in64)
+FUNC_VAL_CHECK (3, signed short, 0xcba9 , X0, i16in64)
+FUNC_VAL_CHECK (4, unsigned int , 0xdeadbeef, X0, i32in64)
+FUNC_VAL_CHECK (5, signed int , 0xcafebabe, X0, i32in64)
+FUNC_VAL_CHECK (6, unsigned long long, 0xba98765432101234ULL, X0, flat)
+FUNC_VAL_CHECK (7, signed long long, 0xa987654321012345LL, X0, flat)
+FUNC_VAL_CHECK (8, __int128, qword.i, X0, flat)
+FUNC_VAL_CHECK (9, float, 65432.12345f, S0, flat)
+FUNC_VAL_CHECK (10, double, 9876543.212345, D0, flat)
+FUNC_VAL_CHECK (11, long double, 98765432123456789.987654321L, Q0, flat)
+FUNC_VAL_CHECK (12, vf2_t, vf2, D0, f32in64)
+FUNC_VAL_CHECK (13, vi4_t, vi4, Q0, i32in128)
+FUNC_VAL_CHECK (14, int *, int_ptr, X0, flat)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-2.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-2.c
new file mode 100644
index 0000000000..6b171c46fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-2.c
@@ -0,0 +1,71 @@
+/* Test AAPCS64 function result return.
+
+ This test covers most composite types as described in AAPCS64 \S 4.3.
+ Homogeneous floating-point aggregate types are covered in func-ret-3.c. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-additional-sources "abitest.S" } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "func-ret-2.c"
+
+struct x0
+{
+ char ch;
+ int i;
+} ys0 = { 'a', 12345 };
+
+struct x1
+{
+ int a;
+ unsigned int b;
+ unsigned int c;
+ unsigned int d;
+} ys1 = { 0xdeadbeef, 0xcafebabe, 0x87654321, 0xbcedf975 };
+
+struct x2
+{
+ long long a;
+ long long b;
+ char ch;
+} y2 = { 0x12, 0x34, 0x56 };
+
+union x3
+{
+ char ch;
+ int i;
+ long long ll;
+} y3;
+
+union x4
+{
+ int i;
+ struct x2 y2;
+} y4;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init small union. */
+ y3.ll = 0xfedcba98LL;
+
+ /* Init big union. */
+ y4.y2.a = 0x78;
+ y4.y2.b = 0x89;
+ y4.y2.ch= 0x9a;
+}
+
+
+#include "abitest-2.h"
+#else
+ /* Composite smaller than or equal to 16 bytes returned in X0 and X1. */
+FUNC_VAL_CHECK ( 0, struct x0, ys0, X0, flat)
+FUNC_VAL_CHECK ( 1, struct x1, ys1, X0, flat)
+FUNC_VAL_CHECK ( 2, union x3, y3, X0, flat)
+
+ /* Composite larger than 16 bytes returned in the caller-reserved memory
+ block of which the address is passed as an additional argument to the
+ function in X8. */
+FUNC_VAL_CHECK (10, struct x2, y2, X8, flat)
+FUNC_VAL_CHECK (11, union x4, y4, X8, flat)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.c
new file mode 100644
index 0000000000..ff9b7e6d4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-3.c
@@ -0,0 +1,93 @@
+/* Test AAPCS64 function result return.
+
+ This test covers homogeneous floating-point aggregate types as described
+ in AAPCS64 \S 4.3.5. */
+
+/* { dg-do run { target aarch64-*-* } } */
+/* { dg-additional-sources "abitest.S" } */
+/* { dg-require-effective-target aarch64_big_endian } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "func-ret-3.c"
+#include "type-def.h"
+
+struct hfa_fx1_t hfa_fx1 = {12.345f};
+struct hfa_fx2_t hfa_fx2 = {123.456f, 234.456f};
+struct hfa_dx2_t hfa_dx2 = {234.567, 345.678};
+struct hfa_dx4_t hfa_dx4 = {1234.123, 2345.234, 3456.345, 4567.456};
+struct hfa_ldx3_t hfa_ldx3 = {123456.7890, 234567.8901, 345678.9012};
+struct non_hfa_fx5_t non_hfa_fx5 = {456.789f, 567.890f, 678.901f, 789.012f, 890.123f};
+struct hfa_ffs_t hfa_ffs;
+struct non_hfa_ffs_t non_hfa_ffs;
+struct non_hfa_ffs_2_t non_hfa_ffs_2;
+struct hva_vf2x1_t hva_vf2x1;
+struct hva_vi4x1_t hva_vi4x1;
+struct non_hfa_ffd_t non_hfa_ffd = {23.f, 24.f, 25.0};
+struct non_hfa_ii_t non_hfa_ii = {26, 27};
+struct non_hfa_c_t non_hfa_c = {28};
+struct non_hfa_ffvf2_t non_hfa_ffvf2;
+struct non_hfa_fffd_t non_hfa_fffd = {33.f, 34.f, 35.f, 36.0};
+union hfa_union_t hfa_union;
+union non_hfa_union_t non_hfa_union;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ hva_vf2x1.a = (vf2_t){17.f, 18.f};
+ hva_vi4x1.a = (vi4_t){19, 20, 21, 22};
+
+ non_hfa_ffvf2.a = 29.f;
+ non_hfa_ffvf2.b = 30.f;
+ non_hfa_ffvf2.c = (vf2_t){31.f, 32.f};
+
+ hfa_union.s.a = 37.f;
+ hfa_union.s.b = 38.f;
+ hfa_union.c = 39.f;
+
+ non_hfa_union.a = 40.0;
+ non_hfa_union.b = 41.f;
+
+ hfa_ffs.a = 42.f;
+ hfa_ffs.b = 43.f;
+ hfa_ffs.c.a = 44.f;
+ hfa_ffs.c.b = 45.f;
+
+ non_hfa_ffs.a = 46.f;
+ non_hfa_ffs.b = 47.f;
+ non_hfa_ffs.c.a = 48.0;
+ non_hfa_ffs.c.b = 49.0;
+
+ non_hfa_ffs_2.s.a = 50;
+ non_hfa_ffs_2.s.b = 51;
+ non_hfa_ffs_2.c = 52.f;
+ non_hfa_ffs_2.d = 53.f;
+}
+
+#include "abitest-2.h"
+#else
+ /* HFA returned in fp/simd registers. */
+
+FUNC_VAL_CHECK ( 0, struct hfa_fx1_t , hfa_fx1 , S0, flat)
+FUNC_VAL_CHECK ( 1, struct hfa_fx2_t , hfa_fx2 , S0, flat)
+FUNC_VAL_CHECK ( 2, struct hfa_dx2_t , hfa_dx2 , D0, flat)
+
+FUNC_VAL_CHECK ( 3, struct hfa_dx4_t , hfa_dx4 , D0, flat)
+FUNC_VAL_CHECK ( 4, struct hfa_ldx3_t, hfa_ldx3 , Q0, flat)
+FUNC_VAL_CHECK ( 5, struct hfa_ffs_t , hfa_ffs , S0, flat)
+FUNC_VAL_CHECK ( 6, union hfa_union_t, hfa_union, S0, flat)
+
+FUNC_VAL_CHECK ( 7, struct hva_vf2x1_t, hva_vf2x1, D0, flat)
+FUNC_VAL_CHECK ( 8, struct hva_vi4x1_t, hva_vi4x1, Q0, flat)
+
+ /* Non-HFA returned in general registers or via a pointer in X8. */
+FUNC_VAL_CHECK (10, struct non_hfa_fx5_t , non_hfa_fx5 , X8, flat)
+FUNC_VAL_CHECK (13, struct non_hfa_ffd_t , non_hfa_ffd , X0, flat)
+FUNC_VAL_CHECK (14, struct non_hfa_ii_t , non_hfa_ii , X0, flat)
+FUNC_VAL_CHECK (15, struct non_hfa_c_t , non_hfa_c , X0, flat)
+FUNC_VAL_CHECK (16, struct non_hfa_ffvf2_t, non_hfa_ffvf2, X0, flat)
+FUNC_VAL_CHECK (17, struct non_hfa_fffd_t , non_hfa_fffd , X8, flat)
+FUNC_VAL_CHECK (18, struct non_hfa_ffs_t , non_hfa_ffs , X8, flat)
+FUNC_VAL_CHECK (19, struct non_hfa_ffs_2_t, non_hfa_ffs_2, X0, flat)
+FUNC_VAL_CHECK (20, union non_hfa_union_t, non_hfa_union, X0, flat)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.c
new file mode 100644
index 0000000000..af05fbe9fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/func-ret-4.c
@@ -0,0 +1,27 @@
+/* Test AAPCS64 function result return.
+
+ This test covers complex types. Complex floating-point types are treated
+ as homogeneous floating-point aggregates, while complex integral types
+ are treated as general composite types. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-additional-sources "abitest.S" } */
+/* { dg-require-effective-target aarch64_big_endian } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "func-ret-4.c"
+
+#include "abitest-2.h"
+#else
+ /* Complex floating-point types are passed in fp/simd registers. */
+FUNC_VAL_CHECK ( 0, _Complex float , 12.3f + 23.4fi, S0, flat)
+FUNC_VAL_CHECK ( 1, _Complex double, 34.56 + 45.67i, D0, flat)
+FUNC_VAL_CHECK ( 2, _Complex long double, 56789.01234 + 67890.12345i, Q0, flat)
+
+ /* Complex integral types are passed in general registers or via a pointer in
+ X8. */
+FUNC_VAL_CHECK (10, _Complex short , 12345 + 23456i, X0, flat)
+FUNC_VAL_CHECK (11, _Complex int , 34567 + 45678i, X0, flat)
+FUNC_VAL_CHECK (12, _Complex __int128, 567890 + 678901i, X8, flat)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_1.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_1.c
new file mode 100644
index 0000000000..906ccebf61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_1.c
@@ -0,0 +1,21 @@
+/* Test AAPCS layout
+
+ Empty, i.e. zero-sized, small struct passing used to cause Internal Compiler
+ Error. */
+
+/* { dg-do compile { target aarch64*-*-* } } */
+
+struct AAAA
+{
+
+} aaaa;
+
+
+void named (int, struct AAAA);
+void unnamed (int, ...);
+
+void foo ()
+{
+ name (0, aaaa);
+ unnamed (0, aaaa);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_2.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_2.c
new file mode 100644
index 0000000000..8d34f270d4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_2.c
@@ -0,0 +1,13 @@
+/* Test AAPCS layout
+
+ Larger than machine-supported vector size. The behaviour is unspecified by
+ the AAPCS64 document; the implementation opts for pass by reference. */
+
+/* { dg-do compile { target aarch64*-*-* } } */
+
+typedef char A __attribute__ ((vector_size (64)));
+
+void
+foo (A a)
+{
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_3.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_3.c
new file mode 100644
index 0000000000..fb6816f427
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_3.c
@@ -0,0 +1,16 @@
+/* Test AAPCS layout
+
+/* { dg-do compile { target aarch64*-*-* } } */
+
+#define vector __attribute__((vector_size(16)))
+
+void
+foo(int a, ...);
+
+int
+main(void)
+{
+ foo (1, (vector unsigned int){10,11,12,13},
+ 2, (vector unsigned int){20,21,22,23});
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_4.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_4.c
new file mode 100644
index 0000000000..44af079af9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_4.c
@@ -0,0 +1,9 @@
+/* Test AAPCS layout
+
+/* { dg-do compile { target aarch64*-*-* } } */
+
+__complex__ long int
+ctest_long_int(__complex__ long int x)
+{
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_5.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_5.c
new file mode 100644
index 0000000000..da24ba8c9d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/ice_5.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target aarch64*-*-* } } */
+
+struct S
+{
+ union
+ {
+ long double b;
+ } a;
+};
+
+struct S s;
+
+extern struct S a[5];
+extern struct S check (struct S, struct S *, struct S);
+extern void checkx (struct S);
+
+void test (void)
+{
+ checkx (check (s, &a[1], a[2]));
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h
new file mode 100644
index 0000000000..72a4706763
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/macro-def.h
@@ -0,0 +1,286 @@
+/* This header file defines a set of macros to be used in the construction
+ of parameter passing and/or va_arg code gen tests during the
+ pre-processing stage. It is included inside abitest.h.
+
+ The following macros are defined here:
+
+ LAST_ARG
+ ARG
+ DOTS
+ ANON
+ LAST_ANON
+ PTR
+ PTR_ANON
+ LAST_ANONPTR
+
+ These macros are given different definitions depending on which one of
+ the following macros is defined.
+
+ AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS
+ AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST
+ AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST
+ AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST
+ AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT
+ AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS
+ AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST
+
+ Do not define more than one of the above macros. */
+
+
+/* AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS
+ Define macros to check the incoming arguments. */
+
+#ifdef AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate memcmp to check if the incoming args have the expected values. */
+#define LAST_ARG_NONFLAT(type, val, offset, layout, ...) \
+{ \
+ type __x = val; \
+ DUMP_ARG(type,val); \
+ if (validate_memory (&__x, stack + offset, sizeof (type), layout) != 0) \
+ abort(); \
+}
+#define LAST_ARG(type,val,offset,...) LAST_ARG_NONFLAT (type, val, offset, \
+ flat,__VA_ARGS__)
+#define ARG_NONFLAT(type,val,offset,layout,...) LAST_ARG_NONFLAT (type, val, \
+ offset, \
+ layout, \
+ __VA_ARGS__)
+#define ARG(type,val,offset,...) LAST_ARG_NONFLAT(type, val, offset, \
+ flat, __VA_ARGS__)
+#define ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define LAST_ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...) \
+ ANON(type_promoted, val_promoted, offset, __VA_ARGS__)
+/* Composite larger than 16 bytes is replaced by a pointer to a copy prepared
+ by the caller, so here we extrat the pointer, deref it and compare the
+ content with that of the original one. */
+#define PTR(type, val, offset, ...) { \
+ type * ptr; \
+ DUMP_ARG(type,val); \
+ ptr = *(type **)(stack + offset); \
+ if (memcmp (ptr, &val, sizeof (type)) != 0) abort (); \
+}
+#define PTR_ANON(type, val, offset, ...) PTR(type, val, offset, __VA_ARGS__)
+#define LAST_ANONPTR(type, val, offset, ...) PTR(type, val, offset, __VA_ARGS__)
+#define DOTS
+
+#endif /* AARCH64_MACRO_DEF_CHECK_INCOMING_ARGS */
+
+
+/* AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST
+ Define macros to generate parameter type list. */
+
+#ifdef AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+
+/* Generate parameter type list (without identifiers). */
+#define LAST_ARG(type,val,offset) type
+#define LAST_ARG_NONFLAT(type, val, offset, layout) type
+#define ARG(type,val,offset) LAST_ARG(type, val, offset),
+#define ARG_NONFLAT(type, val, offset, layout) LAST_ARG (type, val, offset),
+#define DOTS ...
+#define ANON(type,val, offset)
+#define LAST_ANON(type,val, offset)
+#define PTR(type, val, offset) LAST_ARG(type, val, offset),
+#define PTR_ANON(type, val, offset)
+#define LAST_ANONPTR(type, val, offset)
+
+#endif /* AARCH64_MACRO_DEF_GEN_PARAM_TYPE_LIST */
+
+
+/* AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST
+ Define macros to generate argument list. */
+
+#ifdef AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate the argument list; use VAL as the argument name. */
+#define LAST_ARG(type,val,offset,...) val
+#define LAST_ARG_NONFLAT(type,val,offset,layout,...) val
+#define ARG(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define ARG_NONFLAT(type, val, offset, layout,...) LAST_ARG (type, val, \
+ offset, \
+ __VA_ARGS__),
+#define DOTS
+#define LAST_ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR(type, val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR_ANON(type, val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define LAST_ANONPTR(type, val, offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...) \
+ LAST_ARG(type, val, offset, __VA_ARGS__),
+
+#endif /* AARCH64_MACRO_DEF_GEN_ARGUMENT_LIST */
+
+
+/* AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST
+ Define variadic macros to generate parameter type list. */
+
+#ifdef AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate parameter type list (without identifiers). */
+#define LAST_ARG(type,val,offset,...) type
+#define LAST_ARG_NONFLAT(type, val, offset, layout, ...) type
+#define ARG(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define ARG_NONFLAT(type, val, offset, layout, ...) LAST_ARG (type, val, \
+ offset, \
+ __VA_ARGS__),
+#define DOTS
+#define ANON(type,val, offset,...) ARG(type,val,offset, __VA_ARGS__)
+#define LAST_ANON(type,val, offset,...) LAST_ARG(type,val, offset, __VA_ARGS__)
+#define PTR(type, val, offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR_ANON(type, val, offset,...) PTR(type, val, offset, __VA_ARGS__)
+#define LAST_ANONPTR(type, val, offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...) \
+ LAST_ARG(type_promoted, val_promoted, offset, __VA_ARGS__),
+
+#endif /* AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST */
+
+
+/* AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT
+ Define variadic macros to generate parameter type list with
+ identifiers. */
+
+#ifdef AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate parameter type list (with identifiers).
+ The identifiers are named with prefix _f and suffix of the value of
+ __VA_ARGS__. */
+#define LAST_ARG(type,val,offset,...) type _f##__VA_ARGS__
+#define LAST_ARG_NONFLAT(type, val, offset, layout, ...) type _f##__VA_ARGS__
+#define ARG(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define ARG_NONFLAT(type, val, offset, layout, ...) LAST_ARG (type, val, \
+ offset, \
+ __VA_ARGS__),
+#define DOTS ...
+#define ANON(type,val, offset,...)
+#define LAST_ANON(type,val, offset,...)
+#define PTR(type, val, offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR_ANON(type, val, offset,...)
+#define LAST_ANONPTR(type, val, offset,...)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...)
+
+#endif /* AARCH64_VARIADIC_MACRO_DEF_GEN_PARAM_TYPE_LIST_WITH_IDENT */
+
+
+/* AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS
+ Define variadic macros to generate assignment from the function
+ incoming arguments to local variables. */
+
+#ifdef AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate assignment statements. For named args, direct assignment from
+ the formal parameter is generated; for unnamed args, va_arg is used.
+ The names of the local variables start with _x and end with the value of
+ __VA_ARGS__. */
+#define LAST_ARG(type,val,offset,...) type _x##__VA_ARGS__ = _f##__VA_ARGS__;
+#define LAST_ARG_NONFLAT(type, val, offset, layout, ...) \
+ type _x##__VA_ARGS__ = _f##__VA_ARGS__;
+#define ARG(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ARG_NONFLAT(type,val,offset,layout,...) \
+ LAST_ARG (type, val, offset, __VA_ARGS__)
+#define ANON(type,val,offset,...) type _x##__VA_ARGS__ = va_arg (ap, type);
+#define LAST_ANON(type,val,offset,...) ANON(type, val, offset, __VA_ARGS__)
+#define PTR(type, val,offset,...) ARG(type, val, offset, __VA_ARGS__)
+#define PTR_ANON(type, val, offset,...) ANON(type, val,offset, __VA_ARGS__)
+#define LAST_ANONPTR(type, val, offset,...) ANON(type, val, offset, __VA_ARGS__)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...) \
+ ANON(type_promoted, val_promoted, offset, __VA_ARGS__)
+
+#define DOTS
+
+#endif /* AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS */
+
+
+/* AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST
+ Define variadic macros to generate argument list using the variables
+ generated during AARCH64_VARIADIC_MACRO_DEF_ASSIGN_LOCAL_VARS_WITH_ARGS. */
+
+#ifdef AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST
+
+#undef LAST_ARG
+#undef ARG
+#undef DOTS
+#undef ANON
+#undef LAST_ANON
+#undef PTR
+#undef PTR_ANON
+#undef LAST_ANONPTR
+#undef ANON_PROMOTED
+
+/* Generate the argument list; the names start with _x and end with the value of
+ __VA_ARGS__. All arguments (named or unnamed) in stdarg_func are passed to
+ myfunc as named arguments. */
+#define LAST_ARG(type,val,offset,...) _x##__VA_ARGS__
+#define LAST_ARG_NONFLAT(type, val, offset, layout, ...) _x##__VA_ARGS__
+#define ARG(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define ARG_NONFLAT(type, val, offset, layout, ...) \
+ LAST_ARG_NONFLAT (type, val, offset, layout, __VA_ARGS__),
+#define DOTS
+#define LAST_ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON(type,val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR(type, val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define PTR_ANON(type, val,offset,...) LAST_ARG(type, val, offset, __VA_ARGS__),
+#define LAST_ANONPTR(type, val, offset,...) LAST_ARG(type, val, offset, __VA_ARGS__)
+#define ANON_PROMOTED(type,val,type_promoted, val_promoted, offset,...) \
+ ANON(type_promoted, val_promoted, offset, __VA_ARGS__)
+
+#endif /* AARCH64_VARIADIC_MACRO_DEF_GEN_ARGUMENT_LIST */
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_1.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_1.c
new file mode 100644
index 0000000000..545b056851
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_1.c
@@ -0,0 +1,31 @@
+/* Test AAPCS64 layout */
+
+/* C.7 If the argument is an Integral Type, the size of the argument is
+ less than or equal to 8 bytes and the NGRN is less than 8, the
+ argument is copied to the least significant bits in x[NGRN]. The
+ NGRN is incremented by one. The argument has now been allocated. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_1.c"
+/* TODO: review if we need this */
+#define RUNTIME_ENDIANNESS_CHECK
+#include "abitest.h"
+#else
+ ARG(int, 4, W0)
+ ARG(double, 4.0, D0)
+ ARG(int, 3, W1)
+ /* TODO: review the way of memcpy char, short, etc. */
+#ifndef __AAPCS64_BIG_ENDIAN__
+ ARG(char, 0xEF, X2)
+ ARG(short, 0xBEEF, X3)
+ ARG(int, 0xDEADBEEF, X4)
+#else
+ /* TODO: need the model/qemu to be big-endian as well */
+ ARG(char, 0xEF, X2+7)
+ ARG(short, 0xBEEF, X3+6)
+ ARG(int, 0xDEADBEEF, X4+4)
+#endif
+ LAST_ARG(long long, 0xDEADBEEFCAFEBABELL, X5)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_10.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_10.c
new file mode 100644
index 0000000000..c2f48154a0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_10.c
@@ -0,0 +1,26 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_10.c"
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+
+ ARG(int, 7, W0)
+ DOTS
+ ANON(struct z, a, D0)
+ ANON(struct z, b, D4)
+ ANON(double, 0.5, STACK)
+ LAST_ANON(double, 1.5, STACK+8)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_11.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_11.c
new file mode 100644
index 0000000000..34cbe0303b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_11.c
@@ -0,0 +1,34 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_11.c"
+
+__complex__ x = 1.0+2.0i;
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(double, 11.0, D0)
+ DOTS
+ ANON(struct z, a, D1)
+ ANON(struct z, b, STACK)
+ LAST_ANON(double, 0.5, STACK+32)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_12.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_12.c
new file mode 100644
index 0000000000..d07bef8b8f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_12.c
@@ -0,0 +1,44 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_12.c"
+
+
+struct y
+{
+ long p;
+ long q;
+ long r;
+ long s;
+} v = { 1, 2, 3, 4 };
+
+struct y1
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v1 = { 1, 2, 3, 4 };
+
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#define MYFUNCTYPE struct y
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ ARG(struct y1, v1, X1)
+ ARG(struct z, a, D0)
+ ARG(struct z, b, D4)
+ LAST_ARG(double, 0.5, STACK)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_13.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_13.c
new file mode 100644
index 0000000000..c73e6f2f9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_13.c
@@ -0,0 +1,34 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+
+#define TESTFILE "test_13.c"
+
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ ARG(struct y, v, X1)
+ ARG(struct z, a, D0)
+ ARG(double, 1.0, D4)
+ ARG(struct z, b, STACK)
+ LAST_ARG(double, 0.5, STACK+32)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_14.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_14.c
new file mode 100644
index 0000000000..3c22b8a045
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_14.c
@@ -0,0 +1,35 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_14.c"
+
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ ARG(int, 9, W1)
+ ARG(struct z, a, D0)
+ ARG(double, 1.0, D4)
+ ARG(struct z, b, STACK)
+ ARG(int, 4, W2)
+ LAST_ARG(double, 0.5, STACK+32)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_15.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_15.c
new file mode 100644
index 0000000000..1a869ad772
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_15.c
@@ -0,0 +1,21 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_15.c"
+
+#include "abitest.h"
+#else
+ ARG(double, 1.0, D0)
+ ARG(double, 2.0, D1)
+ ARG(double, 3.0, D2)
+ ARG(double, 4.0, D3)
+ ARG(double, 5.0, D4)
+ ARG(double, 6.0, D5)
+ ARG(double, 7.0, D6)
+ ARG(double, 8.0, D7)
+ ARG(double, 9.0, STACK)
+ LAST_ARG(double, 10.0, STACK+8)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_16.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_16.c
new file mode 100644
index 0000000000..1aa9725fd6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_16.c
@@ -0,0 +1,32 @@
+/* Test AAPCS layout */
+/* C.5 If the argument is a Half- or Single- precision Floating-point type,
+ then the size of the argument is set to 8 bytes. The effect is as if
+ the argument had been copied to the least significant bits of a 64-bit
+ register and the remaining bits filled with unspecified values. */
+/* TODO: add the check of half-precision floating-point when it is supported
+ by the A64 GCC. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_16.c"
+
+#include "abitest.h"
+#else
+ ARG(float, 1.0, S0)
+ ARG(float, 2.0, S1)
+ ARG(float, 3.0, S2)
+ ARG(float, 4.0, S3)
+ ARG(float, 5.0, S4)
+ ARG(float, 6.0, S5)
+ ARG(float, 7.0, S6)
+ ARG(float, 8.0, S7)
+#ifndef __AAPCS64_BIG_ENDIAN__
+ ARG(float, 9.0, STACK)
+ LAST_ARG(float, 10.0, STACK+8)
+#else
+ ARG(float, 9.0, STACK+4)
+ LAST_ARG(float, 10.0, STACK+12)
+#endif
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_17.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_17.c
new file mode 100644
index 0000000000..348ea28476
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_17.c
@@ -0,0 +1,37 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_17.c"
+
+__complex__ x = 1.0+2.0i;
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+float f1 = 25.0;
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(double, 11.0, D0)
+ DOTS
+ ANON(struct z, a, D1)
+ ANON(struct z, b, STACK)
+ ANON(int , 5, W0)
+ ANON(double, f1, STACK+32)
+ LAST_ANON(double, 0.5, STACK+40)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_18.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_18.c
new file mode 100644
index 0000000000..2ebecee63e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_18.c
@@ -0,0 +1,34 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+
+#define TESTFILE "test_18.c"
+
+
+struct y
+{
+ long long p;
+ long long q;
+ long long r;
+ long long s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ PTR(struct y, v, X1)
+ ARG(struct z, a, D0)
+ ARG(double, 1.0, D4)
+ ARG(struct z, b, STACK)
+ LAST_ARG(double, 0.5, STACK+32)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_19.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_19.c
new file mode 100644
index 0000000000..1a3f873b30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_19.c
@@ -0,0 +1,35 @@
+/* Test AAPCS64 layout. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_19.c"
+
+struct y
+{
+ int p1;
+ int p2;
+ float q;
+ int r1;
+ int r2;
+ char x;
+} v = { -1, 1, 2.0f, 3, 18, 19, 20};
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ DOTS
+ ANON(double, 4.0, D0)
+ ANON(struct z, a, D1)
+ ANON(struct z, b, STACK)
+ PTR_ANON(struct y, v, X1)
+ LAST_ANON(int, 10, W2)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_2.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_2.c
new file mode 100644
index 0000000000..94817ede3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_2.c
@@ -0,0 +1,16 @@
+/* Test AAPCS64 layout */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_2.c"
+#include "abitest.h"
+
+#else
+ ARG(float, 1.0f, S0)
+ ARG(double, 4.0, D1)
+ ARG(float, 2.0f, S2)
+ ARG(double, 5.0, D3)
+ LAST_ARG(int, 3, W0)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_20.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_20.c
new file mode 100644
index 0000000000..e4cc1a1b5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_20.c
@@ -0,0 +1,22 @@
+/* Test AAPCS64 layout */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_20.c"
+
+#include "abitest.h"
+
+#else
+ ARG(int, 8, W0)
+ ARG(double, 1.0, D0)
+ ARG(double, 2.0, D1)
+ ARG(double, 3.0, D2)
+ ARG(double, 4.0, D3)
+ ARG(double, 5.0, D4)
+ ARG(double, 6.0, D5)
+ ARG(double, 7.0, D6)
+ DOTS
+ ANON(_Complex double, 1234.0 + 567.0i, STACK)
+ LAST_ANON(double, -987.0, STACK+16)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_21.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_21.c
new file mode 100644
index 0000000000..b3a75e0256
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_21.c
@@ -0,0 +1,21 @@
+/* Test AAPCS64 layout */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_21.c"
+
+#include "abitest.h"
+
+#else
+ ARG(int, 8, W0)
+ ARG(double, 1.0, D0)
+ ARG(double, 2.0, D1)
+ ARG(double, 3.0, D2)
+ ARG(double, 4.0, D3)
+ ARG(double, 5.0, D4)
+ ARG(double, 6.0, D5)
+ ARG(double, 7.0, D6)
+ ARG(_Complex double, 1234.0 + 567.0i, STACK)
+ LAST_ARG(double, -987.0, STACK+16)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_22.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_22.c
new file mode 100644
index 0000000000..cb8a8abc06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_22.c
@@ -0,0 +1,19 @@
+/* Test AAPCS64 layout */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_22.c"
+
+struct y
+{
+ float p;
+ float q;
+} v = { 345.0f, 678.0f };
+
+#include "abitest.h"
+#else
+ ARG(float, 123.0f, S0)
+ ARG(struct y, v, S1)
+ LAST_ARG(float, 901.0f, S3)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_23.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_23.c
new file mode 100644
index 0000000000..6993884c0e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_23.c
@@ -0,0 +1,42 @@
+/* Test AAPCS64 layout.
+
+ Larger than machine-supported vector size. The behaviour is unspecified by
+ the AAPCS64 document; the implementation opts for pass by reference. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_23.c"
+
+typedef char A __attribute__ ((vector_size (64)));
+
+struct y
+{
+ double df[8];
+};
+
+union u
+{
+ struct y x;
+ A a;
+} u;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ u.x.df[0] = 1.0;
+ u.x.df[1] = 2.0;
+ u.x.df[2] = 3.0;
+ u.x.df[3] = 4.0;
+ u.x.df[4] = 5.0;
+ u.x.df[5] = 6.0;
+ u.x.df[6] = 7.0;
+ u.x.df[7] = 8.0;
+}
+
+#include "abitest.h"
+#else
+ARG (float, 123.0f, S0)
+PTR (A, u.a, X0)
+LAST_ARG_NONFLAT (int, 0xdeadbeef, X1, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_24.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_24.c
new file mode 100644
index 0000000000..8655f6f3ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_24.c
@@ -0,0 +1,22 @@
+/* Test AAPCS64 layout. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_24.c"
+
+typedef long double TFtype;
+
+#include "abitest.h"
+#else
+ ARG(TFtype, 1.0, Q0)
+ ARG(TFtype, 2.0, Q1)
+ ARG(TFtype, 3.0, Q2)
+ ARG(TFtype, 4.0, Q3)
+ ARG(TFtype, 5.0, Q4)
+ ARG(TFtype, 6.0, Q5)
+ ARG(TFtype, 7.0, Q6)
+ ARG(TFtype, 8.0, Q7)
+ ARG(double, 9.0, STACK)
+ LAST_ARG(TFtype, 10.0, STACK+16)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_25.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_25.c
new file mode 100644
index 0000000000..2f942ff4d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_25.c
@@ -0,0 +1,61 @@
+/* Test AAPCS64 layout
+
+ Test homogeneous floating-point aggregates and homogeneous short-vector
+ aggregates, which should be passed in SIMD/FP registers or via the
+ stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_25.c"
+
+typedef float vf2_t __attribute__((vector_size (8)));
+struct x0
+{
+ vf2_t v;
+} s0;
+struct x3
+{
+ vf2_t v[2];
+} s3;
+struct x4
+{
+ vf2_t v[3];
+} s4;
+
+typedef float vf4_t __attribute__((vector_size(16)));
+struct x1
+{
+ vf4_t v;
+} s1;
+
+struct x2
+{
+ double df[3];
+} s2;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ s0.v = (vf2_t){ 17.f, 18.f };
+ s1.v = (vf4_t){ 567.890f, 678.901f, 789.012f, 890.123f };
+ s2.df[0] = 123.456;
+ s2.df[1] = 234.567;
+ s2.df[2] = 345.678;
+ s3.v[0] = (vf2_t){ 19.f, 20.f, 21.f, 22.f };
+ s3.v[1] = (vf2_t){ 23.f, 24.f, 25.f, 26.f };
+ s4.v[0] = (vf2_t){ 27.f, 28.f, 29.f, 30.f };
+ s4.v[1] = (vf2_t){ 31.f, 32.f, 33.f, 34.f };
+ s4.v[2] = (vf2_t){ 35.f, 36.f, 37.f, 38.f };
+}
+
+#include "abitest.h"
+#else
+ARG_NONFLAT (struct x0, s0, Q0, f32in64)
+ARG (struct x2, s2, D1)
+ARG (struct x1, s1, Q4)
+ARG (struct x3, s3, D5)
+ARG (struct x4, s4, STACK)
+ARG_NONFLAT (int, 0xdeadbeef, X0, i32in64)
+LAST_ARG (double, 456.789, STACK+24)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_26.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_26.c
new file mode 100644
index 0000000000..9b9a3a4804
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_26.c
@@ -0,0 +1,54 @@
+/* Test AAPCS64 layout.
+
+ Test some small structures that should be passed in GPRs. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_26.c"
+
+struct y0
+{
+ char ch;
+} c0 = { 'A' };
+
+struct y2
+{
+ long long ll[2];
+} c2 = { 0xDEADBEEF, 0xCAFEBABE };
+
+struct y3
+{
+ int i[3];
+} c3 = { 56789, 67890, 78901 };
+
+typedef float vf2_t __attribute__((vector_size (8)));
+struct x0
+{
+ vf2_t v;
+} s0;
+
+typedef short vh4_t __attribute__((vector_size (8)));
+
+struct x1
+{
+ vh4_t v[2];
+} s1;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ s0.v = (vf2_t){ 17.f, 18.f };
+ s1.v[0] = (vh4_t){ 345, 456, 567, 678 };
+ s1.v[1] = (vh4_t){ 789, 890, 901, 123 };
+}
+
+#include "abitest.h"
+#else
+ARG (struct y0, c0, X0)
+ARG (struct y2, c2, X1)
+ARG (struct y3, c3, X3)
+ARG_NONFLAT (struct x0, s0, D0, f32in64)
+ARG (struct x1, s1, D1)
+LAST_ARG_NONFLAT (int, 89012, X5, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_3.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_3.c
new file mode 100644
index 0000000000..f05b8e659c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_3.c
@@ -0,0 +1,18 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_3.c"
+
+__complex__ x = 1.0+2.0i;
+
+#include "abitest.h"
+#else
+ARG (float, 1.0f, S0)
+ARG (__complex__ double, x, D1)
+ARG (float, 2.0f, S3)
+ARG (double, 5.0, D4)
+LAST_ARG_NONFLAT (int, 3, X0, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_4.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_4.c
new file mode 100644
index 0000000000..a37db569bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_4.c
@@ -0,0 +1,20 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target arm*-*-eabi* } } */
+/* { dg-require-effective-target arm_hard_vfp_ok } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O -mfpu=vfp -mfloat-abi=hard" } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_4.c"
+
+__complex__ float x = 1.0f + 2.0fi;
+#include "abitest.h"
+#else
+ARG (float, 1.0f, S0)
+ARG (__complex__ float, x, S1)
+ARG (float, 2.0f, S3)
+ARG (double, 5.0, D4)
+LAST_ARG_NONFLAT (int, 3, X0, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_5.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_5.c
new file mode 100644
index 0000000000..674efd8c25
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_5.c
@@ -0,0 +1,24 @@
+/* Test AAPCS64 layout */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_5.c"
+
+__complex__ float x = 1.0+2.0i;
+
+struct y
+{
+ long p;
+ long q;
+} v = { 1, 2};
+
+#include "abitest.h"
+#else
+ ARG(float, 1.0f, S0)
+ ARG(__complex__ float, x, S1)
+ ARG(float, 2.0f, S3)
+ ARG(double, 5.0, D4)
+ LAST_ARG(struct y, v, X0)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_6.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_6.c
new file mode 100644
index 0000000000..95d44e9232
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_6.c
@@ -0,0 +1,26 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_6.c"
+
+__complex__ double x = 1.0+2.0i;
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+#include "abitest.h"
+#else
+ ARG(struct y, v, X0)
+ ARG(float, 1.0f, S0)
+ ARG(__complex__ double, x, D1)
+ ARG(float, 2.0f, S3)
+ ARG(double, 5.0, D4)
+ LAST_ARG(int, 3, W2)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_7.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_7.c
new file mode 100644
index 0000000000..4fb1feeaf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_7.c
@@ -0,0 +1,30 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_7.c"
+
+__complex__ float x = 1.0f + 2.0i;
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 }, v1 = {5, 6, 7, 8}, v2 = {9, 10, 11, 12};
+
+#include "abitest.h"
+#else
+ARG (struct y, v, X0)
+ARG (struct y, v1, X2)
+ARG (struct y, v2, X4)
+ARG (int, 4, W6)
+ARG (float, 1.0f, S0)
+ARG (__complex__ float, x, S1)
+ARG (float, 2.0f, S3)
+ARG (double, 5.0, D4)
+ARG (int, 3, W7)
+LAST_ARG_NONFLAT (int, 5, STACK, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_8.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_8.c
new file mode 100644
index 0000000000..3d67ff5084
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_8.c
@@ -0,0 +1,24 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_8.c"
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(struct z, a, D0)
+ ARG(struct z, b, D4)
+ ARG(double, 0.5, STACK)
+ ARG(int, 7, W0)
+ LAST_ARG(int, 8, W1)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_9.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_9.c
new file mode 100644
index 0000000000..fbe42456ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_9.c
@@ -0,0 +1,32 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define VFP
+#define TESTFILE "test_9.c"
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+} v = { 1, 2, 3, 4 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 7, W0)
+ ARG(struct y, v, X1)
+ ARG(struct z, a, D0)
+ ARG(struct z, b, D4)
+ LAST_ARG(double, 0.5, STACK)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-1.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-1.c
new file mode 100644
index 0000000000..f22fca6deb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-1.c
@@ -0,0 +1,126 @@
+/* Test AAPCS64 layout.
+
+ Test the comformance to the alignment and padding requirements.
+
+ B.4 If the argument type is a Composite Type then the size of the
+ argument is rounded up to the nearest multiple of 8 bytes.
+ C.4 If the argument is an HFA, a Quad-precision Floating-point or Short
+ Vector Type then the NSAA is rounded up to the larger of 8 or the
+ Natural Alignment of the argument's type.
+ C.12 The NSAA is rounded up to the larger of 8 or the Natural Alignment
+ of the argument's type.
+ C.14 If the size of the argument is less than 8 bytes then the size of
+ the argument is set ot 8 bytes. The effect is as if the argument
+ was copied to the least significant bits of a 64-bit register and
+ the remaining bits filled with unspecified values. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_align-1.c"
+#include "type-def.h"
+
+struct y
+{
+ int p;
+ int q;
+ int r;
+ int s;
+};
+
+struct y v1 = { 1, 2, 3, 4 };
+struct y v2 = { 5, 6, 7, 8 };
+struct y v3 = { 9, 10, 11, 12 };
+struct y v4 = { 13, 14, 15, 16 };
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+vf4_t c = { 13.f, 14.f, 15.f, 16.f };
+
+struct x
+{
+ vf4_t v;
+} w;
+
+char ch='a';
+short sh=13;
+int i=14;
+long long ll=15;
+
+struct s1
+{
+ short sh[3];
+} s1;
+
+struct s2
+{
+ int i[2];
+ char c;
+} s2;
+
+struct ldx2_t
+{
+ long double ld[2];
+} ldx2 = { 12345.67890L, 23456.78901L };
+
+union u_t
+{
+ long double ld;
+ double d[2];
+} u;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ w.v = (vf4_t){ 17.f, 18.f, 19.f, 20.f };
+ s1.sh[0] = 16;
+ s1.sh[1] = 17;
+ s1.sh[2] = 18;
+ s2.i[0] = 19;
+ s2.i[1] = 20;
+ s2.c = 21;
+ u.ld = 34567.89012L;
+}
+
+#include "abitest.h"
+#else
+
+ ARG(struct y, v1, X0)
+ ARG(struct y, v2, X2)
+ ARG(struct y, v3, X4)
+ ARG(struct y, v4, X6)
+ ARG(struct z, a, D0)
+ ARG(struct z, b, D4)
+ ARG(double, 12.5, STACK)
+ ARG(vf4_t, c, STACK+16) /* [C.4] 16-byte aligned short vector */
+ ARG(double, 17.0, STACK+32)
+ ARG(struct x, w, STACK+48) /* [C.12] 16-byte aligned small struct */
+#ifndef __AAPCS64_BIG_ENDIAN__
+ ARG(char, ch, STACK+64) /* [C.14] char padded to the size of 8 bytes */
+ ARG(short, sh, STACK+72) /* [C.14] short padded to the size of 8 bytes */
+ ARG(int, i, STACK+80) /* [C.14] int padded to the size of 8 bytes */
+#else
+ ARG(char, ch, STACK+71)
+ ARG(short, sh, STACK+78)
+ ARG(int, i, STACK+84)
+#endif
+ ARG(long long, ll, STACK+88)
+ ARG(struct s1, s1, STACK+96) /* [B.4] small struct padded to the size of 8 bytes */
+ ARG(double, 18.0, STACK+104)
+ ARG(struct s2, s2, STACK+112) /* [B.4] small struct padded to the size of 16 bytes */
+ ARG(double, 19.0, STACK+128)
+ ARG(long double, 30.0L, STACK+144) /* [C.4] 16-byte aligned quad-precision */
+ ARG(double, 31.0, STACK+160)
+ ARG(struct ldx2_t, ldx2, STACK+176) /* [C.4] 16-byte aligned HFA */
+ ARG(double, 32.0, STACK+208)
+ ARG(__int128, 33, STACK+224) /* [C.12] 16-byte aligned 128-bit integer */
+ ARG(double, 34.0, STACK+240)
+ ARG(union u_t, u, STACK+256) /* [C.12] 16-byte aligned small composite (union in this case) */
+ LAST_ARG_NONFLAT (int, 35.0, STACK+272, i32in64)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-2.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-2.c
new file mode 100644
index 0000000000..6c61948b16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-2.c
@@ -0,0 +1,42 @@
+/* Test AAPCS64 layout.
+
+ C.8 If the argument has an alignment of 16 then the NGRN is rounded up
+ the next even number.
+
+ The case of a small struture containing only one 16-byte aligned
+ quad-word integer is covered in this test. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_align-2.c"
+#include "type-def.h"
+
+struct y
+{
+ union int128_t v;
+} w;
+
+struct x
+{
+ long long p;
+ int q;
+} s = {0xDEADBEEFCAFEBABELL, 0xFEEBDAED};
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init signed quad-word integer. */
+ w.v.l64 = 0xfdb9753102468aceLL;
+ w.v.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG(int, 0xAB, W0)
+ ARG(struct y, w, X2)
+ ARG(int, 0xCD, W4)
+ ARG(struct x, s, X5)
+ LAST_ARG(int, 0xFF00FF00, W7)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-3.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-3.c
new file mode 100644
index 0000000000..bf8bc7468f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-3.c
@@ -0,0 +1,46 @@
+/* Test AAPCS64 layout.
+
+ C.8 If the argument has an alignment of 16 then the NGRN is rounded up
+ the next even number.
+ C.9 If the argument is an Integral Type, the size of the argument is
+ equal to 16 and the NGRN is less than 7, the argument is copied
+ to x[NGRN] and x[NGRN+1]. x[NGRN] shall contain the lower addressed
+ double-word of the memory representation of the argument. The
+ NGRN is incremented by two. The argument has now been allocated.
+
+ The case of passing a 128-bit integer in two general registers is covered
+ in this test. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_align-3.c"
+#include "type-def.h"
+
+union int128_t qword;
+
+int gInt[4];
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Initialize the quadword integer via the union. */
+ qword.l64 = 0xDEADBEEFCAFEBABELL;
+ qword.h64 = 0x123456789ABCDEF0LL;
+
+ gInt[0] = 12345;
+ gInt[1] = 23456;
+ gInt[2] = 34567;
+ gInt[3] = 45678;
+}
+
+
+#include "abitest.h"
+#else
+ ARG(int, gInt[0], W0)
+ ARG(int, gInt[1], W1)
+ ARG(int, gInt[2], W2)
+ ARG(__int128, qword.i, X4)
+ LAST_ARG(int, gInt[3], W6)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-4.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-4.c
new file mode 100644
index 0000000000..7834ed87e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_align-4.c
@@ -0,0 +1,42 @@
+/* Test AAPCS64 layout.
+
+ C.3 If the argument is an HFA then the NSRN is set to 8 and the size
+ of the argument is rounded up to the nearest multiple of 8 bytes.
+
+ TODO: add the check of an HFA containing half-precision floating-point
+ when __f16 is supported in A64 GCC. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_align-4.c"
+
+struct z1
+{
+ double x[4];
+};
+
+struct z1 a = { 5.0, 6.0, 7.0, 8.0 };
+
+struct z2
+{
+ float x[3];
+};
+
+struct z2 b = { 13.f, 14.f, 15.f };
+struct z2 c = { 16.f, 17.f, 18.f };
+
+#include "abitest.h"
+#else
+
+ ARG(struct z1, a, D0)
+ ARG(double, 9.0, D4)
+ ARG(double, 10.0, D5)
+ ARG(struct z2, b, STACK) /* [C.3] on stack and size padded to 16 bytes */
+#ifndef __AAPCS64_BIG_ENDIAN__
+ ARG(float, 15.5f, STACK+16) /* [C.3] NSRN has been set to 8 */
+#else
+ ARG(float, 15.5f, STACK+20)
+#endif
+ LAST_ARG(struct z2, c, STACK+24)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_complex.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_complex.c
new file mode 100644
index 0000000000..6bf9721cc4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_complex.c
@@ -0,0 +1,18 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_complex.c"
+
+__complex__ float x = 1.0+2.0i;
+__complex__ int y = 5 + 6i;
+__complex__ double z = 2.0 + 3.0i;
+
+#include "abitest.h"
+#else
+ ARG(__complex__ float, x, S0)
+ ARG(__complex__ int, y, X0)
+ ARG(__complex__ double, z, D2)
+ LAST_ARG (int, 5, W1)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_int128.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_int128.c
new file mode 100644
index 0000000000..9df344f29f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_int128.c
@@ -0,0 +1,17 @@
+/* Test AAPCS layout (VFP variant) */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_int128.c"
+
+typedef int TItype __attribute__ ((mode (TI)));
+
+TItype x = 0xcafecafecafecfeacfeacfea;
+TItype y = 0xcfeacfeacfeacafecafecafe;
+
+#include "abitest.h"
+#else
+ ARG (TItype, x, X0)
+ LAST_ARG (TItype, y, X2)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/test_quad_double.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_quad_double.c
new file mode 100644
index 0000000000..109cea0b5c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/test_quad_double.c
@@ -0,0 +1,26 @@
+/* Test AAPCS64 layout.
+
+ Test parameter passing of floating-point quad precision types. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define TESTFILE "test_quad_double.c"
+
+typedef long double TFtype;
+typedef _Complex long double CTFtype;
+
+TFtype x = 1.0;
+TFtype y = 2.0;
+
+CTFtype cx = 3.0 + 4.0i;
+CTFtype cy = 5.0 + 6.0i;
+
+#include "abitest.h"
+#else
+ ARG ( TFtype, x, Q0)
+ ARG (CTFtype, cx, Q1)
+ DOTS
+ ANON (CTFtype, cy, Q3)
+ LAST_ANON ( TFtype, y, Q5)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
new file mode 100644
index 0000000000..07e56fff85
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/type-def.h
@@ -0,0 +1,164 @@
+/* This header file defines some types that are used in the AAPCS64 tests. */
+
+
+/* 64-bit vector of 2 floats. */
+typedef float vf2_t __attribute__((vector_size (8)));
+
+/* 128-bit vector of 4 floats. */
+typedef float vf4_t __attribute__((vector_size (16)));
+
+/* 128-bit vector of 4 ints. */
+typedef int vi4_t __attribute__((vector_size (16)));
+
+/* signed quad-word (in an union for the convenience of initialization). */
+union int128_t
+{
+ __int128 i;
+ struct
+ {
+ signed long long l64;
+ signed long long h64;
+ };
+};
+
+/* Homogeneous floating-point composite types. */
+
+struct hfa_fx1_t
+{
+ float a;
+};
+
+struct hfa_fx2_t
+{
+ float a;
+ float b;
+};
+
+struct hfa_fx3_t
+{
+ float a;
+ float b;
+ float c;
+};
+
+struct hfa_dx2_t
+{
+ double a;
+ double b;
+};
+
+struct hfa_dx4_t
+{
+ double a;
+ double b;
+ double c;
+ double d;
+};
+
+struct hfa_ldx3_t
+{
+ long double a;
+ long double b;
+ long double c;
+};
+
+struct hfa_ffs_t
+{
+ float a;
+ float b;
+ struct hfa_fx2_t c;
+};
+
+union hfa_union_t
+{
+ struct
+ {
+ float a;
+ float b;
+ } s;
+ float c;
+};
+
+/* Non homogeneous floating-point-composite types. */
+
+struct non_hfa_fx5_t
+{
+ float a;
+ float b;
+ float c;
+ float d;
+ float e;
+};
+
+struct non_hfa_ffs_t
+{
+ float a;
+ float b;
+ struct hfa_dx2_t c;
+};
+
+struct non_hfa_ffs_2_t
+{
+ struct
+ {
+ int a;
+ int b;
+ } s;
+ float c;
+ float d;
+};
+
+struct hva_vf2x1_t
+{
+ vf2_t a;
+};
+
+struct hva_vf2x2_t
+{
+ vf2_t a;
+ vf2_t b;
+};
+
+struct hva_vi4x1_t
+{
+ vi4_t a;
+};
+
+struct non_hfa_ffd_t
+{
+ float a;
+ float b;
+ double c;
+};
+
+struct non_hfa_ii_t
+{
+ int a;
+ int b;
+};
+
+struct non_hfa_c_t
+{
+ char a;
+};
+
+struct non_hfa_ffvf2_t
+{
+ float a;
+ float b;
+ vf2_t c;
+};
+
+struct non_hfa_fffd_t
+{
+ float a;
+ float b;
+ float c;
+ double d;
+};
+
+union non_hfa_union_t
+{
+ double a;
+ float b;
+};
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-1.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-1.c
new file mode 100644
index 0000000000..4eb569e8c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-1.c
@@ -0,0 +1,50 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test covers fundamental data types as specified in AAPCS64 \S 4.1.
+ It is focus on unnamed parameter passed in registers. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-1.c"
+#include "type-def.h"
+
+vf2_t vf2 = (vf2_t){ 17.f, 18.f };
+vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead };
+union int128_t qword;
+signed char sc = 0xed;
+signed int sc_promoted = 0xffffffed;
+signed short ss = 0xcba9;
+signed int ss_promoted = 0xffffcba9;
+float fp = 65432.12345f;
+double fp_promoted = (double)65432.12345f;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init signed quad-word integer. */
+ qword.l64 = 0xfdb9753102468aceLL;
+ qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG ( int , 0xff , X0, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON_PROMOTED(unsigned char , 0xfe , unsigned int, 0xfe , X1, 1)
+ ANON_PROMOTED( signed char , sc , signed int, sc_promoted, X2, 2)
+ ANON_PROMOTED(unsigned short , 0xdcba, unsigned int, 0xdcba , X3, 3)
+ ANON_PROMOTED( signed short , ss , signed int, ss_promoted, X4, 4)
+ ANON (unsigned int , 0xdeadbeef, X5, 5)
+ ANON ( signed int , 0xcafebabe, X6, 6)
+ ANON (unsigned long long, 0xba98765432101234ULL, X7, 7)
+ ANON ( signed long long, 0xa987654321012345LL , STACK, 8)
+ ANON ( __int128, qword.i , STACK+16, 9)
+ ANON_PROMOTED( float , fp , double, fp_promoted, D0, 10)
+ ANON ( double , 9876543.212345, D1, 11)
+ ANON ( long double , 98765432123456789.987654321L, Q2, 12)
+ ANON ( vf2_t, vf2 , D3, 13)
+ ANON ( vi4_t, vi4 , Q4, 14)
+ LAST_ANON ( int , 0xeeee, STACK+32,15)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-10.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-10.c
new file mode 100644
index 0000000000..50b77005b3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-10.c
@@ -0,0 +1,29 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ Miscellaneous test: Anonymous arguments passed on the stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-10.c"
+
+struct z
+{
+ double x[4];
+};
+
+double d1 = 25.0;
+double d2 = 103.0;
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(struct z, a, D0, 0)
+ ARG(struct z, b, D4, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON(double, d1, STACK, 2)
+ LAST_ANON(double, d2, STACK+8, 3)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-11.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-11.c
new file mode 100644
index 0000000000..c1f1f8f9b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-11.c
@@ -0,0 +1,32 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ Miscellaneous test: Anonymous arguments passed on the stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-11.c"
+
+struct z
+{
+ double x[2];
+};
+
+double d1 = 25.0;
+struct z a = { 5.0, 6.0 };
+
+#include "abitest.h"
+#else
+ ARG(double, 1.0, D0, 0)
+ ARG(double, 2.0, D1, 1)
+ ARG(double, 3.0, D2, 2)
+ ARG(double, 4.0, D3, 3)
+ ARG(double, 5.0, D4, 4)
+ ARG(double, 6.0, D5, 5)
+ ARG(double, 7.0, D6, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON(struct z, a, STACK, 8)
+ LAST_ANON(double, d1, STACK+16, 9)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-12.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-12.c
new file mode 100644
index 0000000000..a12ccfd8b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-12.c
@@ -0,0 +1,60 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ Pass by reference. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-12.c"
+
+struct z
+{
+ char c;
+ short s;
+ int ia[4];
+};
+
+struct z a, b, c;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ a.c = 0x11;
+ a.s = 0x2222;
+ a.ia[0] = 0x33333333;
+ a.ia[1] = 0x44444444;
+ a.ia[2] = 0x55555555;
+ a.ia[3] = 0x66666666;
+
+ b.c = 0x77;
+ b.s = 0x8888;
+ b.ia[0] = 0x99999999;
+ b.ia[1] = 0xaaaaaaaa;
+ b.ia[2] = 0xbbbbbbbb;
+ b.ia[3] = 0xcccccccc;
+
+ c.c = 0xdd;
+ c.s = 0xeeee;
+ c.ia[0] = 0xffffffff;
+ c.ia[1] = 0x12121212;
+ c.ia[2] = 0x23232323;
+ c.ia[3] = 0x34343434;
+}
+
+#include "abitest.h"
+#else
+ PTR(struct z, a, X0, 0)
+ ARG(int, 0xdeadbeef, X1, 1)
+ ARG(int, 0xcafebabe, X2, 2)
+ ARG(int, 0xdeadbabe, X3, 3)
+ ARG(int, 0xcafebeef, X4, 4)
+ ARG(int, 0xbeefdead, X5, 5)
+ ARG(int, 0xbabecafe, X6, LAST_NAMED_ARG_ID)
+ DOTS
+ PTR_ANON(struct z, b, X7, 7)
+ PTR_ANON(struct z, c, STACK, 8)
+ ANON(int, 0xbabedead, STACK+8, 9)
+ LAST_ANON(double, 123.45, D0, 10)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
new file mode 100644
index 0000000000..ae1e3ec45c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-13.c
@@ -0,0 +1,59 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named HFA/HVA argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-13.c"
+
+struct float_float_t
+{
+ float a;
+ float b;
+} float_float;
+
+union float_int_t
+{
+ float b8;
+ int b5;
+} float_int;
+
+#define HAS_DATA_INIT_FUNC
+void
+init_data ()
+{
+ float_float.a = 1.2f;
+ float_float.b = 2.2f;
+
+ float_int.b8 = 4983.80f;
+}
+
+#include "abitest.h"
+#else
+ ARG (float, 1.0f, S0, 0)
+ ARG (float, 2.0f, S1, 1)
+ ARG (float, 3.0f, S2, 2)
+ ARG (float, 4.0f, S3, 3)
+ ARG (float, 5.0f, S4, 4)
+ ARG (float, 6.0f, S5, 5)
+ ARG (float, 7.0f, S6, 6)
+ ARG (struct float_float_t, float_float, STACK, 7)
+ ARG (int, 9, W0, 8)
+ ARG (int, 10, W1, 9)
+ ARG (int, 11, W2, 10)
+ ARG (int, 12, W3, 11)
+ ARG (int, 13, W4, 12)
+ ARG (int, 14, W5, 13)
+ ARG (int, 15, W6, LAST_NAMED_ARG_ID)
+ DOTS
+ /* Note on the reason of using 'X7' instead of 'W7' here:
+ Using 'X7' makes sure the test works in the big-endian mode.
+ According to PCS rules B.4 and C.10, the size of float_int is rounded
+ to 8 bytes and prepared in the register X7 as if loaded via LDR from
+ the memory, with the content of the other 4 bytes unspecified. The
+ test framework will only compare the 4 relavent bytes. */
+ ANON (union float_int_t, float_int, X7, 15)
+ LAST_ANON (long long, 12683143434LL, STACK + 8, 16)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
new file mode 100644
index 0000000000..91080d5afa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-14.c
@@ -0,0 +1,35 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named HFA/HVA argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-14.c"
+#include "type-def.h"
+
+struct hfa_fx2_t hfa_fx2 = {1.2f, 2.2f};
+struct hfa_fx3_t hfa_fx3 = {3.2f, 4.2f, 5.2f};
+vf4_t float32x4 = {6.2f, 7.2f, 8.2f, 9.2f};
+vf4_t float32x4_2 = {10.2f, 11.2f, 12.2f, 13.2f};
+
+#include "abitest.h"
+#else
+ ARG (float, 1.0f, S0, 0)
+ ARG (float, 2.0f, S1, 1)
+ ARG (float, 3.0f, S2, 2)
+ ARG (float, 4.0f, S3, 3)
+ ARG (float, 5.0f, S4, 4)
+ ARG (float, 6.0f, S5, 5)
+ ARG (float, 7.0f, S6, 6)
+ ARG (struct hfa_fx3_t, hfa_fx3, STACK, 7)
+ /* Previous argument size has been rounded up to the nearest multiple of
+ 8 bytes. */
+ ARG (struct hfa_fx2_t, hfa_fx2, STACK + 16, 8)
+ /* NSAA is rounded up to the nearest natural alignment of float32x4. */
+ ARG (vf4_t, float32x4, STACK + 32, 9)
+ ARG (vf4_t, float32x4_2, STACK + 48, LAST_NAMED_ARG_ID)
+ DOTS
+ LAST_ANON (double, 123456789.987, STACK + 64, 11)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
new file mode 100644
index 0000000000..d8fdb322b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-15.c
@@ -0,0 +1,39 @@
+/* Test AAPCS64 layout and __builtin_va_start.
+
+ Pass named __128int argument on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-15.c"
+#include "type-def.h"
+
+union int128_t qword;
+
+#define HAS_DATA_INIT_FUNC
+void
+init_data ()
+{
+ /* Init signed quad-word integer. */
+ qword.l64 = 0xfdb9753102468aceLL;
+ qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG (int, 1, W0, 0)
+ ARG (int, 2, W1, 1)
+ ARG (int, 3, W2, 2)
+ ARG (int, 4, W3, 3)
+ ARG (int, 5, W4, 4)
+ ARG (int, 6, W5, 5)
+ ARG (int, 7, W6, 6)
+ ARG (__int128, qword.i, STACK, LAST_NAMED_ARG_ID)
+ DOTS
+#ifndef __AAPCS64_BIG_ENDIAN__
+ LAST_ANON (int, 8, STACK + 16, 8)
+#else
+ LAST_ANON (int, 8, STACK + 20, 8)
+#endif
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-2.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-2.c
new file mode 100644
index 0000000000..b6da677c5a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-2.c
@@ -0,0 +1,59 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test covers fundamental data types as specified in AAPCS64 \S 4.1.
+ It is focus on unnamed parameter passed on stack. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-2.c"
+#include "type-def.h"
+
+vf2_t vf2 = (vf2_t){ 17.f, 18.f };
+vi4_t vi4 = (vi4_t){ 0xdeadbabe, 0xbabecafe, 0xcafebeef, 0xbeefdead };
+union int128_t qword;
+signed char sc = 0xed;
+signed int sc_promoted = 0xffffffed;
+signed short ss = 0xcba9;
+signed int ss_promoted = 0xffffcba9;
+float fp = 65432.12345f;
+double fp_promoted = (double)65432.12345f;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init signed quad-word integer. */
+ qword.l64 = 0xfdb9753102468aceLL;
+ qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG ( int , 0xff , X0, 0)
+ ARG ( float , 1.0f , S0, 1)
+ ARG ( float , 1.0f , S1, 2)
+ ARG ( float , 1.0f , S2, 3)
+ ARG ( float , 1.0f , S3, 4)
+ ARG ( float , 1.0f , S4, 5)
+ ARG ( float , 1.0f , S5, 6)
+ ARG ( float , 1.0f , S6, 7)
+ ARG ( float , 1.0f , S7, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON ( __int128, qword.i , X2, 8)
+ ANON ( signed long long, 0xa987654321012345LL , X4, 9)
+ ANON ( __int128, qword.i , X6, 10)
+ ANON_PROMOTED(unsigned char , 0xfe , unsigned int, 0xfe , STACK, 11)
+ ANON_PROMOTED( signed char , sc , signed int, sc_promoted, STACK+8, 12)
+ ANON_PROMOTED(unsigned short , 0xdcba, unsigned int, 0xdcba , STACK+16, 13)
+ ANON_PROMOTED( signed short , ss , signed int, ss_promoted, STACK+24, 14)
+ ANON (unsigned int , 0xdeadbeef, STACK+32, 15)
+ ANON ( signed int , 0xcafebabe, STACK+40, 16)
+ ANON (unsigned long long, 0xba98765432101234ULL, STACK+48, 17)
+ ANON_PROMOTED( float , fp , double, fp_promoted, STACK+56, 18)
+ ANON ( double , 9876543.212345, STACK+64, 19)
+ ANON ( long double , 98765432123456789.987654321L, STACK+80, 20)
+ ANON ( vf2_t, vf2 , STACK+96, 21)
+ ANON ( vi4_t, vi4 , STACK+112,22)
+ LAST_ANON ( int , 0xeeee, STACK+128,23)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-3.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-3.c
new file mode 100644
index 0000000000..34978c7e59
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-3.c
@@ -0,0 +1,86 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test covers most composite types as described in AAPCS64 \S 4.3.
+ Homogeneous floating-point aggregate types are covered in other tests. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-3.c"
+#include "type-def.h"
+
+struct x0
+{
+ char ch;
+ int i;
+} y0 = { 'a', 12345 };
+
+struct x1
+{
+ int a;
+ int b;
+ int c;
+ int d;
+} y1 = { 0xdeadbeef, 0xcafebabe, 0x87654321, 0xabcedf975 };
+
+struct x2
+{
+ long long a;
+ long long b;
+ char ch;
+} y2 = { 0x12, 0x34, 0x56 };
+
+union x3
+{
+ char ch;
+ int i;
+ long long ll;
+} y3;
+
+union x4
+{
+ int i;
+ struct x2 y2;
+} y4;
+
+struct x5
+{
+ union int128_t qword;
+} y5;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ /* Init small union. */
+ y3.ll = 0xfedcba98LL;
+
+ /* Init big union. */
+ y4.y2.a = 0x78;
+ y4.y2.b = 0x89;
+ y4.y2.ch= 0x9a;
+
+ /* Init signed quad-word integer. */
+ y5.qword.l64 = 0xfdb9753102468aceLL;
+ y5.qword.h64 = 0xeca8642013579bdfLL;
+}
+
+#include "abitest.h"
+#else
+ ARG (float ,1.0f, S0, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON (struct x0, y0, X0, 1)
+ ANON (struct x1, y1, X1, 2)
+ PTR_ANON (struct x2, y2, X3, 3)
+ ANON (union x3, y3, X4, 4)
+ PTR_ANON (union x4, y4, X5, 5)
+ ANON (struct x5, y5, X6, 6)
+ ANON (struct x0, y0, STACK, 7)
+ ANON (struct x1, y1, STACK+8, 8)
+ PTR_ANON (struct x2, y2, STACK+24, 9)
+ ANON (union x3, y3, STACK+32, 10)
+ PTR_ANON (union x4, y4, STACK+40, 11)
+ ANON (int , 1, STACK+48, 12)
+ ANON (struct x5, y5, STACK+64, 13)
+ LAST_ANON(int , 2, STACK+80, 14)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-4.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-4.c
new file mode 100644
index 0000000000..d0e18db54d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-4.c
@@ -0,0 +1,93 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test covers homogeneous floating-point aggregate types and homogeneous
+ short-vector aggregate types as described in AAPCS64 \S 4.3.5. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-4.c"
+#include "type-def.h"
+
+struct hfa_fx1_t hfa_fx1 = {12.345f};
+struct hfa_fx2_t hfa_fx2 = {123.456f, 234.456f};
+struct hfa_dx2_t hfa_dx2 = {234.567, 345.678};
+struct hfa_dx4_t hfa_dx4 = {1234.123, 2345.234, 3456.345, 4567.456};
+struct hfa_ldx3_t hfa_ldx3 = {123456.7890, 234567.8901, 345678.9012};
+struct non_hfa_fx5_t non_hfa_fx5 = {456.789f, 567.890f, 678.901f, 789.012f, 890.123f};
+struct hfa_ffs_t hfa_ffs;
+struct non_hfa_ffs_t non_hfa_ffs;
+struct non_hfa_ffs_2_t non_hfa_ffs_2;
+struct hva_vf2x1_t hva_vf2x1;
+struct hva_vf2x2_t hva_vf2x2;
+struct hva_vi4x1_t hva_vi4x1;
+struct non_hfa_ffd_t non_hfa_ffd = {23.f, 24.f, 25.0};
+struct non_hfa_ii_t non_hfa_ii = {26, 27};
+struct non_hfa_c_t non_hfa_c = {28};
+struct non_hfa_ffvf2_t non_hfa_ffvf2;
+struct non_hfa_fffd_t non_hfa_fffd = {33.f, 34.f, 35.f, 36.0};
+union hfa_union_t hfa_union;
+union non_hfa_union_t non_hfa_union;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ hva_vf2x1.a = (vf2_t){17.f, 18.f};
+ hva_vf2x2.a = (vf2_t){19.f, 20.f};
+ hva_vf2x2.b = (vf2_t){21.f, 22.f};
+ hva_vi4x1.a = (vi4_t){19, 20, 21, 22};
+
+ non_hfa_ffvf2.a = 29.f;
+ non_hfa_ffvf2.b = 30.f;
+ non_hfa_ffvf2.c = (vf2_t){31.f, 32.f};
+
+ hfa_union.s.a = 37.f;
+ hfa_union.s.b = 38.f;
+ hfa_union.c = 39.f;
+
+ non_hfa_union.a = 40.0;
+ non_hfa_union.b = 41.f;
+
+ hfa_ffs.a = 42.f;
+ hfa_ffs.b = 43.f;
+ hfa_ffs.c.a = 44.f;
+ hfa_ffs.c.b = 45.f;
+
+ non_hfa_ffs.a = 46.f;
+ non_hfa_ffs.b = 47.f;
+ non_hfa_ffs.c.a = 48.0;
+ non_hfa_ffs.c.b = 49.0;
+
+ non_hfa_ffs_2.s.a = 50;
+ non_hfa_ffs_2.s.b = 51;
+ non_hfa_ffs_2.c = 52.f;
+ non_hfa_ffs_2.d = 53.f;
+}
+
+#include "abitest.h"
+#else
+ ARG (int , 1, X0, LAST_NAMED_ARG_ID)
+ DOTS
+ /* HFA or HVA passed in fp/simd registers or on stack. */
+ ANON (struct hfa_fx1_t , hfa_fx1 , S0 , 0)
+ ANON (struct hfa_fx2_t , hfa_fx2 , S1 , 1)
+ ANON (struct hfa_dx2_t , hfa_dx2 , D3 , 2)
+ ANON (struct hva_vf2x1_t, hva_vf2x1, D5 , 11)
+ ANON (struct hva_vi4x1_t, hva_vi4x1, Q6 , 12)
+ ANON (struct hfa_dx4_t , hfa_dx4 , STACK , 3)
+ ANON (struct hfa_ffs_t , hfa_ffs , STACK+32, 4)
+ ANON (union hfa_union_t, hfa_union, STACK+48, 5)
+ ANON (struct hfa_ldx3_t , hfa_ldx3 , STACK+64, 6)
+ /* Non-H[FV]A passed in general registers or on stack or via reference. */
+ PTR_ANON (struct non_hfa_fx5_t , non_hfa_fx5 , X1 , 10)
+ ANON (struct non_hfa_ffd_t , non_hfa_ffd , X2 , 13)
+ ANON (struct non_hfa_ii_t , non_hfa_ii , X4 , 14)
+ ANON (struct non_hfa_c_t , non_hfa_c , X5 , 15)
+ ANON (struct non_hfa_ffvf2_t, non_hfa_ffvf2, X6 , 16)
+ PTR_ANON (struct non_hfa_fffd_t , non_hfa_fffd , STACK+112, 17)
+ PTR_ANON (struct non_hfa_ffs_t , non_hfa_ffs , STACK+120, 18)
+ ANON (struct non_hfa_ffs_2_t, non_hfa_ffs_2, STACK+128, 19)
+ ANON (union non_hfa_union_t, non_hfa_union, STACK+144, 20)
+ LAST_ANON(int , 2 , STACK+152, 30)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-5.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-5.c
new file mode 100644
index 0000000000..6b99a6f1e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-5.c
@@ -0,0 +1,47 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test is focus on certain unnamed homogeneous floating-point aggregate
+ types passed in fp/simd registers. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-5.c"
+#include "type-def.h"
+
+struct hfa_fx1_t hfa_fx1 = {12.345f};
+struct hfa_fx2_t hfa_fx2 = {123.456f, 234.456f};
+struct hfa_dx2_t hfa_dx2 = {234.567, 345.678};
+struct hfa_dx4_t hfa_dx4 = {1234.123, 2345.234, 3456.345, 4567.456};
+struct hfa_ldx3_t hfa_ldx3 = {123456.7890, 234567.8901, 345678.9012};
+struct hfa_ffs_t hfa_ffs;
+union hfa_union_t hfa_union;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ hfa_union.s.a = 37.f;
+ hfa_union.s.b = 38.f;
+ hfa_union.c = 39.f;
+
+ hfa_ffs.a = 42.f;
+ hfa_ffs.b = 43.f;
+ hfa_ffs.c.a = 44.f;
+ hfa_ffs.c.b = 45.f;
+}
+
+#include "abitest.h"
+#else
+ ARG (int, 1, X0, LAST_NAMED_ARG_ID)
+ DOTS
+ /* HFA passed in fp/simd registers or on stack. */
+ ANON (struct hfa_dx4_t , hfa_dx4 , D0 , 0)
+ ANON (struct hfa_ldx3_t , hfa_ldx3 , Q4 , 1)
+ ANON (struct hfa_ffs_t , hfa_ffs , STACK , 2)
+ ANON (union hfa_union_t, hfa_union, STACK+16, 3)
+ ANON (struct hfa_fx1_t , hfa_fx1 , STACK+24, 4)
+ ANON (struct hfa_fx2_t , hfa_fx2 , STACK+32, 5)
+ ANON (struct hfa_dx2_t , hfa_dx2 , STACK+40, 6)
+ LAST_ANON(double , 1.0 , STACK+56, 7)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-6.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-6.c
new file mode 100644
index 0000000000..f94a54ab1b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-6.c
@@ -0,0 +1,40 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test is focus on certain unnamed homogeneous floating-point aggregate
+ types passed in fp/simd registers. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-6.c"
+#include "type-def.h"
+
+struct hfa_fx1_t hfa_fx1 = {12.345f};
+struct hfa_dx2_t hfa_dx2 = {234.567, 345.678};
+struct hfa_ffs_t hfa_ffs;
+union hfa_union_t hfa_union;
+
+#define HAS_DATA_INIT_FUNC
+void init_data ()
+{
+ hfa_union.s.a = 37.f;
+ hfa_union.s.b = 38.f;
+ hfa_union.c = 39.f;
+
+ hfa_ffs.a = 42.f;
+ hfa_ffs.b = 43.f;
+ hfa_ffs.c.a = 44.f;
+ hfa_ffs.c.b = 45.f;
+}
+
+#include "abitest.h"
+#else
+ ARG (int, 1, X0, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON (struct hfa_ffs_t , hfa_ffs , S0 , 0)
+ ANON (union hfa_union_t, hfa_union, S4 , 1)
+ ANON (struct hfa_dx2_t , hfa_dx2 , D6 , 2)
+ ANON (struct hfa_fx1_t , hfa_fx1 , STACK , 3)
+ LAST_ANON(double , 1.0 , STACK+8, 4)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-7.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-7.c
new file mode 100644
index 0000000000..b82e7a7421
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-7.c
@@ -0,0 +1,31 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ This test covers complex types. Complex floating-point types are treated
+ as homogeneous floating-point aggregates, while complex integral types
+ are treated as general composite types. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-7.c"
+#include "type-def.h"
+
+_Complex __int128 complex_qword = 567890 + 678901i;
+
+#include "abitest.h"
+#else
+ ARG (int, 1, X0, LAST_NAMED_ARG_ID)
+ DOTS
+ /* Complex floating-point types are passed in fp/simd registers. */
+ ANON (_Complex float , 12.3f + 23.4fi , S0, 0)
+ ANON (_Complex double , 34.56 + 45.67i , D2, 1)
+ ANON (_Complex long double, 56789.01234L + 67890.12345Li, Q4, 2)
+
+ /* Complex integral types are passed in general registers or via reference. */
+ ANON (_Complex short , (short)12345 + (short)23456i, X1, 10)
+ ANON (_Complex int , 34567 + 45678i , X2, 11)
+ PTR_ANON (_Complex __int128 , complex_qword , X3, 12)
+
+ LAST_ANON(int , 1 , X4, 20)
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-8.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-8.c
new file mode 100644
index 0000000000..d148482981
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-8.c
@@ -0,0 +1,25 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ Miscellaneous test: HFA anonymous parameter passed in SIMD/FP regs. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-8.c"
+
+struct z
+{
+ double x[4];
+};
+
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+
+#include "abitest.h"
+#else
+ ARG(int, 0xdeadbeef, W0, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON(double, 4.0, D0, 1)
+ LAST_ANON(struct z, a, D1, 2)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-9.c b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-9.c
new file mode 100644
index 0000000000..a5183bef44
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/va_arg-9.c
@@ -0,0 +1,31 @@
+/* Test AAPCS64 layout and __builtin_va_arg.
+
+ Miscellaneous test: HFA anonymous parameter passed in SIMD/FP regs. */
+
+/* { dg-do run { target aarch64*-*-* } } */
+
+#ifndef IN_FRAMEWORK
+#define AAPCS64_TEST_STDARG
+#define TESTFILE "va_arg-9.c"
+
+struct z
+{
+ double x[4];
+};
+
+double d1 = 25.0;
+struct z a = { 5.0, 6.0, 7.0, 8.0 };
+struct z b = { 9.0, 10.0, 11.0, 12.0 };
+
+#include "abitest.h"
+#else
+ ARG(double, 11.0, D0, LAST_NAMED_ARG_ID)
+ DOTS
+ ANON(int, 8, W0, 1)
+ ANON(struct z, a, D1, 2)
+ ANON(struct z, b, STACK, 3)
+ ANON(int, 5, W1, 4)
+ ANON(double, d1, STACK+32, 5)
+ LAST_ANON(double, 0.5, STACK+40, 6)
+
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/aapcs64/validate_memory.h b/gcc/testsuite/gcc.target/aarch64/aapcs64/validate_memory.h
new file mode 100644
index 0000000000..24431c6620
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aapcs64/validate_memory.h
@@ -0,0 +1,81 @@
+/* Memory validation functions for AArch64 procedure call standard.
+ Copyright (C) 2012 Free Software Foundation, Inc.
+ Contributed by ARM Ltd.
+
+ This file is part of GCC.
+
+ GCC is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, or (at your option)
+ any later version.
+
+ GCC is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with GCC; see the file COPYING3. If not see
+ <http://www.gnu.org/licenses/>. */
+
+#ifndef VALIDATE_MEMORY_H
+#define VALIDATE_MEMORY_H
+
+enum structure_type
+{
+ flat = 0,
+ i32in128,
+ f32in64,
+ i8in64,
+ i16in64,
+ i32in64,
+};
+
+/* Some explicit declarations as I can't include files outside the testsuite.
+ */
+typedef long unsigned int size_t;
+int memcmp (void *, void *, size_t);
+
+/* These two arrays contain element size and block size data for the enumeration
+ above. */
+const int element_size[] = { 1, 4, 4, 1, 2, 4 };
+const int block_reverse_size[] = { 1, 16, 8, 8, 8, 8 };
+
+int
+validate_memory (void *mem1, char *mem2, size_t size, enum structure_type type)
+{
+ /* In big-endian mode, the data in mem2 will have been byte-reversed in
+ register sized groups, while the data in mem1 will have been byte-reversed
+ according to the true structure of the data. To compare them, we need to
+ compare chunks of data in reverse order.
+
+ This is only implemented for homogeneous data layouts at the moment. For
+ hetrogeneous structures a custom compare case will need to be written. */
+
+ unsigned int i;
+ char *cmem1 = (char *) mem1;
+ switch (type)
+ {
+#if __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__
+ case i8in64:
+ case i16in64:
+ case i32in64:
+ for (i = 0; i < size; i += element_size[type])
+ {
+ if (memcmp (cmem1 + i,
+ mem2 + block_reverse_size[type] - i - element_size[type],
+ element_size[type]))
+ return 1;
+ }
+ return 0;
+ break;
+#endif
+ case f32in64:
+ case i32in128:
+ default:
+ break;
+ }
+ return memcmp (mem1, mem2, size);
+}
+
+#endif /* VALIDATE_MEMORY_H. */
diff --git a/gcc/testsuite/gcc.target/aarch64/aarch64.exp b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
new file mode 100644
index 0000000000..2cd3b805b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aarch64.exp
@@ -0,0 +1,45 @@
+# Specific regression driver for AArch64.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Contributed by ARM Ltd.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, or (at your option)
+# any later version.
+#
+# GCC is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>. */
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an AArch64 target.
+if {![istarget aarch64*-*-*] } then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/aarch64/abs_1.c b/gcc/testsuite/gcc.target/aarch64/abs_1.c
new file mode 100644
index 0000000000..938bc84ed9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/abs_1.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline --save-temps" } */
+
+extern long long llabs (long long);
+extern void abort (void);
+
+long long
+abs64 (long long a)
+{
+ /* { dg-final { scan-assembler "eor\t" } } */
+ /* { dg-final { scan-assembler "sub\t" } } */
+ return llabs (a);
+}
+
+long long
+abs64_in_dreg (long long a)
+{
+ /* { dg-final { scan-assembler "abs\td\[0-9\]+, d\[0-9\]+" } } */
+ register long long x asm ("d8") = a;
+ register long long y asm ("d9");
+ asm volatile ("" : : "w" (x));
+ y = llabs (x);
+ asm volatile ("" : : "w" (y));
+ return y;
+}
+
+int
+main (void)
+{
+ volatile long long ll0 = 0LL, ll1 = 1LL, llm1 = -1LL;
+
+ if (abs64 (ll0) != 0LL)
+ abort ();
+
+ if (abs64 (ll1) != 1LL)
+ abort ();
+
+ if (abs64 (llm1) != 1LL)
+ abort ();
+
+ if (abs64_in_dreg (ll0) != 0LL)
+ abort ();
+
+ if (abs64_in_dreg (ll1) != 1LL)
+ abort ();
+
+ if (abs64_in_dreg (llm1) != 1LL)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/adc-1.c b/gcc/testsuite/gcc.target/aarch64/adc-1.c
new file mode 100644
index 0000000000..c19920ce50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adc-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+volatile unsigned int w0, w1, w2, w3, w4;
+volatile int result;
+
+void test_si() {
+ /* { dg-final { scan-assembler "adc\tw\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ w0 = w1 + w2 + (w3 >= w4);
+}
+
+volatile unsigned long long int x0, x1, x2, x3, x4;
+
+void test_di() {
+ /* { dg-final { scan-assembler "adc\tx\[0-9\]*, x\[0-9\]*, x\[0-9\]*\n" } } */
+ x0 = x1 + x2 + (x3 >= x4);
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/adc-2.c b/gcc/testsuite/gcc.target/aarch64/adc-2.c
new file mode 100644
index 0000000000..0f13619106
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adc-2.c
@@ -0,0 +1,277 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+
+/* This series of tests looks for the optimization:
+ x = (a >= b) + c + d
+ =>
+ cmp a, b
+ adc x, c, d
+ */
+
+unsigned long
+ltu_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a < b) + c + d;
+}
+
+unsigned long
+gtu_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a > b) + c + d;
+}
+
+unsigned long
+leu_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a <= b) + c + d;
+}
+
+unsigned long
+geu_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a >= b) + c + d;
+}
+
+unsigned long
+equ_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a == b) + c + d;
+}
+
+unsigned long
+neu_add (unsigned long a, unsigned long b, unsigned long c, unsigned long d)
+{
+ return (a != b) + c + d;
+}
+
+long
+lt_add ( long a, long b, long c, long d)
+{
+ return (a < b) + c + d;
+}
+
+long
+gt_add ( long a, long b, long c, long d)
+{
+ return (a > b) + c + d;
+}
+
+long
+le_add ( long a, long b, long c, long d)
+{
+ return (a <= b) + c + d;
+}
+
+long
+ge_add ( long a, long b, long c, long d)
+{
+ return (a >= b) + c + d;
+}
+
+long
+eq_add ( long a, long b, long c, long d)
+{
+ return (a == b) + c + d;
+}
+
+long
+ne_add ( long a, long b, long c, long d)
+{
+ return (a != b) + c + d;
+}
+
+
+int
+main ()
+{
+ if (ltu_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (ltu_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (ltu_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (gtu_add(2,1,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (gtu_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (gtu_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (leu_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (leu_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (leu_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (leu_add(2,1,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (geu_add(2,1,3,4) != 8)
+ {
+ abort();
+ }
+ if (geu_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (geu_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (equ_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (equ_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (equ_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (neu_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (neu_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (neu_add(3,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (lt_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (lt_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (lt_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (gt_add(2,1,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (gt_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (gt_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (le_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (le_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (le_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (le_add(2,1,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (ge_add(2,1,3,4) != 8)
+ {
+ abort();
+ }
+ if (ge_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (ge_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (eq_add(1,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (eq_add(2,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (eq_add(3,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (ne_add(1,2,3,4) != 8)
+ {
+ abort();
+ }
+
+ if (ne_add(2,2,3,4) != 7)
+ {
+ abort();
+ }
+
+ if (ne_add(3,2,3,4) != 8)
+ {
+ abort();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/adds.c b/gcc/testsuite/gcc.target/aarch64/adds.c
new file mode 100644
index 0000000000..aa423210de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adds.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int z;
+int
+foo (int x, int y)
+{
+ int l = x + y;
+ if (l == 0)
+ return 5;
+
+ /* { dg-final { scan-assembler "adds\tw\[0-9\]" } } */
+ z = l ;
+ return 25;
+}
+
+typedef long long s64;
+
+s64 zz;
+s64
+foo2 (s64 x, s64 y)
+{
+ s64 l = x + y;
+ if (l < 0)
+ return 5;
+
+ /* { dg-final { scan-assembler "adds\tx\[0-9\]" } } */
+ zz = l ;
+ return 25;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/adds1.c b/gcc/testsuite/gcc.target/aarch64/adds1.c
new file mode 100644
index 0000000000..eb19bbfd61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adds1.c
@@ -0,0 +1,149 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+adds_si_test1 (int a, int b, int c)
+{
+ int d = a + b;
+
+ /* { dg-final { scan-assembler "adds\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+adds_si_test2 (int a, int b, int c)
+{
+ int d = a + 0xff;
+
+ /* { dg-final { scan-assembler "adds\tw\[0-9\]+, w\[0-9\]+, 255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+adds_si_test3 (int a, int b, int c)
+{
+ int d = a + (b << 3);
+
+ /* { dg-final { scan-assembler "adds\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+adds_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + b;
+
+ /* { dg-final { scan-assembler "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+adds_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + 0xff;
+
+ /* { dg-final { scan-assembler "adds\tx\[0-9\]+, x\[0-9\]+, 255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+adds_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + (b << 3);
+
+ /* { dg-final { scan-assembler "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = adds_si_test1 (29, 4, 5);
+ if (x != 42)
+ abort ();
+
+ x = adds_si_test1 (5, 2, 20);
+ if (x != 29)
+ abort ();
+
+ x = adds_si_test2 (29, 4, 5);
+ if (x != 293)
+ abort ();
+
+ x = adds_si_test2 (1024, 2, 20);
+ if (x != 1301)
+ abort ();
+
+ x = adds_si_test3 (35, 4, 5);
+ if (x != 76)
+ abort ();
+
+ x = adds_si_test3 (5, 2, 20);
+ if (x != 43)
+ abort ();
+
+ y = adds_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 0xc75050536)
+ abort ();
+
+ y = adds_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x9222922294249)
+ abort ();
+
+ y = adds_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x955050631)
+ abort ();
+
+ y = adds_di_test2 (0x130002900ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x955052f08)
+ abort ();
+
+ y = adds_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 0x9b9050576)
+ abort ();
+
+ y = adds_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 0xafd052e4d)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/adds2.c b/gcc/testsuite/gcc.target/aarch64/adds2.c
new file mode 100644
index 0000000000..bd130a99aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adds2.c
@@ -0,0 +1,155 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+adds_si_test1 (int a, int b, int c)
+{
+ int d = a + b;
+
+ /* { dg-final { scan-assembler-not "adds\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+adds_si_test2 (int a, int b, int c)
+{
+ int d = a + 0xfff;
+
+ /* { dg-final { scan-assembler-not "adds\tw\[0-9\]+, w\[0-9\]+, 4095" } } */
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+, w\[0-9\]+, 4095" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+adds_si_test3 (int a, int b, int c)
+{
+ int d = a + (b << 3);
+
+ /* { dg-final { scan-assembler-not "adds\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+adds_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + b;
+
+ /* { dg-final { scan-assembler-not "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+adds_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + 0x1000ll;
+
+ /* { dg-final { scan-assembler-not "adds\tx\[0-9\]+, x\[0-9\]+, 4096" } } */
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+, x\[0-9\]+, 4096" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+adds_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a + (b << 3);
+
+ /* { dg-final { scan-assembler-not "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = adds_si_test1 (29, 4, 5);
+ if (x != 42)
+ abort ();
+
+ x = adds_si_test1 (5, 2, 20);
+ if (x != 29)
+ abort ();
+
+ x = adds_si_test2 (29, 4, 5);
+ if (x != 4133)
+ abort ();
+
+ x = adds_si_test2 (1024, 2, 20);
+ if (x != 5141)
+ abort ();
+
+ x = adds_si_test3 (35, 4, 5);
+ if (x != 76)
+ abort ();
+
+ x = adds_si_test3 (5, 2, 20);
+ if (x != 43)
+ abort ();
+
+ y = adds_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 0xc75050536)
+ abort ();
+
+ y = adds_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x9222922294249)
+ abort ();
+
+ y = adds_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x955051532)
+ abort ();
+
+ y = adds_di_test2 (0x540004100ll,
+ 0x320000004ll,
+ 0x805050205ll);
+ if (y != 0x1065055309)
+ abort ();
+
+ y = adds_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 0x9b9050576)
+ abort ();
+
+ y = adds_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 0xafd052e4d)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/adds3.c b/gcc/testsuite/gcc.target/aarch64/adds3.c
new file mode 100644
index 0000000000..18efd1c215
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/adds3.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+typedef long long s64;
+
+int
+adds_ext (s64 a, int b, int c)
+{
+ s64 d = a + b;
+
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+adds_shift_ext (s64 a, int b, int c)
+{
+ s64 d = (a + ((s64)b << 3));
+
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = adds_ext (0x13000002ll, 41, 15);
+ if (x != 318767203)
+ abort ();
+
+ x = adds_ext (0x50505050ll, 29, 4);
+ if (x != 1347440782)
+ abort ();
+
+ x = adds_ext (0x12121212121ll, 2, 14);
+ if (x != 555819315)
+ abort ();
+
+ x = adds_shift_ext (0x123456789ll, 4, 12);
+ if (x != 591751097)
+ abort ();
+
+ x = adds_shift_ext (0x02020202ll, 9, 8);
+ if (x != 33686107)
+ abort ();
+
+ x = adds_shift_ext (0x987987987987ll, 23, 41);
+ if (x != -2020050305)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "adds\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, sxtw" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/aes_1.c b/gcc/testsuite/gcc.target/aarch64/aes_1.c
new file mode 100644
index 0000000000..5fa61379ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/aes_1.c
@@ -0,0 +1,40 @@
+
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+crypto" } */
+
+#include "arm_neon.h"
+
+uint8x16_t
+test_vaeseq_u8 (uint8x16_t data, uint8x16_t key)
+{
+ return vaeseq_u8 (data, key);
+}
+
+/* { dg-final { scan-assembler-times "aese\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+
+uint8x16_t
+test_vaesdq_u8 (uint8x16_t data, uint8x16_t key)
+{
+ return vaesdq_u8 (data, key);
+}
+
+/* { dg-final { scan-assembler-times "aesd\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+
+uint8x16_t
+test_vaesmcq_u8 (uint8x16_t data)
+{
+ return vaesmcq_u8 (data);
+}
+
+/* { dg-final { scan-assembler-times "aesmc\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+
+uint8x16_t
+test_vaesimcq_u8 (uint8x16_t data)
+{
+ return vaesimcq_u8 (data);
+}
+
+/* { dg-final { scan-assembler-times "aesimc\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/ands_1.c b/gcc/testsuite/gcc.target/aarch64/ands_1.c
new file mode 100644
index 0000000000..aace0b0644
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ands_1.c
@@ -0,0 +1,151 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+ands_si_test1 (int a, int b, int c)
+{
+ int d = a & b;
+
+ /* { dg-final { scan-assembler-times "ands\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+ands_si_test2 (int a, int b, int c)
+{
+ int d = a & 0xff;
+
+ /* { dg-final { scan-assembler "ands\tw\[0-9\]+, w\[0-9\]+, 255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+ands_si_test3 (int a, int b, int c)
+{
+ int d = a & (b << 3);
+
+ /* { dg-final { scan-assembler "ands\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+ands_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & b;
+
+ /* { dg-final { scan-assembler-times "ands\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+ands_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & 0xff;
+
+ /* { dg-final { scan-assembler "ands\tx\[0-9\]+, x\[0-9\]+, 255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+ands_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & (b << 3);
+
+ /* { dg-final { scan-assembler "ands\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = ands_si_test1 (29, 4, 5);
+ if (x != 13)
+ abort ();
+
+ x = ands_si_test1 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ x = ands_si_test2 (29, 4, 5);
+ if (x != 38)
+ abort ();
+
+ x = ands_si_test2 (1024, 2, 20);
+ if (x != 1044)
+ abort ();
+
+ x = ands_si_test3 (35, 4, 5);
+ if (x != 41)
+ abort ();
+
+ x = ands_si_test3 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ y = ands_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != ((0x130000029ll & 0x320000004ll) + 0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x5000500052025ll)
+ abort ();
+
+ y = ands_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & 0xff) + 0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test2 (0x130002900ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != (0x130002900ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & (0x064000008ll << 3))
+ + 0x064000008ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != (0x130002900ll + 0x505050505ll))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/ands_2.c b/gcc/testsuite/gcc.target/aarch64/ands_2.c
new file mode 100644
index 0000000000..1c5b8213e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ands_2.c
@@ -0,0 +1,157 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+ands_si_test1 (int a, int b, int c)
+{
+ int d = a & b;
+
+ /* { dg-final { scan-assembler-not "ands\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "and\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+ands_si_test2 (int a, int b, int c)
+{
+ int d = a & 0x99999999;
+
+ /* { dg-final { scan-assembler-not "ands\tw\[0-9\]+, w\[0-9\]+, -1717986919" } } */
+ /* { dg-final { scan-assembler "and\tw\[0-9\]+, w\[0-9\]+, -1717986919" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+ands_si_test3 (int a, int b, int c)
+{
+ int d = a & (b << 3);
+
+ /* { dg-final { scan-assembler-not "ands\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "and\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+ands_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & b;
+
+ /* { dg-final { scan-assembler-not "ands\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "and\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+ands_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & 0xaaaaaaaaaaaaaaaall;
+
+ /* { dg-final { scan-assembler-not "ands\tx\[0-9\]+, x\[0-9\]+, -6148914691236517206" } } */
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, -6148914691236517206" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+ands_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & (b << 3);
+
+ /* { dg-final { scan-assembler-not "ands\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = ands_si_test1 (29, 4, 5);
+ if (x != 13)
+ abort ();
+
+ x = ands_si_test1 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ x = ands_si_test2 (29, 4, 5);
+ if (x != 34)
+ abort ();
+
+ x = ands_si_test2 (1024, 2, 20);
+ if (x != 1044)
+ abort ();
+
+ x = ands_si_test3 (35, 4, 5);
+ if (x != 41)
+ abort ();
+
+ x = ands_si_test3 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ y = ands_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != ((0x130000029ll & 0x320000004ll) + 0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x5000500052025ll)
+ abort ();
+
+ y = ands_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & 0xaaaaaaaaaaaaaaaall) + 0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test2 (0x540004100ll,
+ 0x320000004ll,
+ 0x805050205ll);
+ if (y != (0x540004100ll + 0x805050205ll))
+ abort ();
+
+ y = ands_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & (0x064000008ll << 3))
+ + 0x064000008ll + 0x505050505ll))
+ abort ();
+
+ y = ands_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != (0x130002900ll + 0x505050505ll))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c b/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c
new file mode 100644
index 0000000000..a0f5982522
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-1.c
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -march=dummy" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c b/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c
new file mode 100644
index 0000000000..f1f3ea38c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/arch-diagnostics-2.c
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -march=+dummy" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c b/gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c
new file mode 100644
index 0000000000..55dd9f66f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/arg-type-diagnostics-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { aarch64*-*-* } } } */
+/* { dg-options "-O2" } */
+
+#include "arm_neon.h"
+
+void foo ()
+{
+ int a;
+ int32x2_t arg1;
+ int32x2_t arg2;
+ int32x2_t result;
+ arg1 = vcreate_s32 (UINT64_C (0x0000ffffffffffff));
+ arg2 = vcreate_s32 (UINT64_C (0x16497fffffffffff));
+ result = __builtin_aarch64_srsra_nv2si (arg1, arg2, a); /* { dg-error "incompatible type for argument" } */
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/asm-1.c b/gcc/testsuite/gcc.target/aarch64/asm-1.c
new file mode 100644
index 0000000000..bdfa4504f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/asm-1.c
@@ -0,0 +1,15 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+typedef struct
+{
+ int i;
+ int y;
+} __attribute__ ((aligned (16))) struct64_t;
+
+void foo ()
+{
+ struct64_t tmp;
+ asm volatile ("ldr q0, %[value]" : : [value]"m"(tmp));
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c b/gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c
new file mode 100644
index 0000000000..540c79b013
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/asm-adder-clobber-lr.c
@@ -0,0 +1,23 @@
+extern void abort (void);
+
+int
+adder (int a, int b)
+{
+ int result;
+ __asm__ ("add %w0,%w1,%w2" : "=r"(result) : "r"(a), "r"(b) : "x30");
+ return result;
+}
+
+int
+main (int argc, char** argv)
+{
+ int i;
+ int total = argc;
+ for (i = 0; i < 20; i++)
+ total = adder (total, i);
+
+ if (total != (190 + argc))
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c b/gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c
new file mode 100644
index 0000000000..2543d50e78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/asm-adder-no-clobber-lr.c
@@ -0,0 +1,23 @@
+extern void abort (void);
+
+int
+adder (int a, int b)
+{
+ int result;
+ __asm__ ("add %w0,%w1,%w2" : "=r"(result) : "r"(a), "r"(b) : );
+ return result;
+}
+
+int
+main (int argc, char** argv)
+{
+ int i;
+ int total = argc;
+ for (i = 0; i < 20; i++)
+ total = adder (total, i);
+
+ if (total != (190 + argc))
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c b/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c
new file mode 100644
index 0000000000..9785bca4f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-comp-swap-release-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 4 } } */
+/* { dg-final { scan-assembler-times "stlxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 4 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.x b/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.x
new file mode 100644
index 0000000000..4403afd645
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-comp-swap-release-acquire.x
@@ -0,0 +1,36 @@
+
+#define STRONG 0
+#define WEAK 1
+int v = 0;
+
+int
+atomic_compare_exchange_STRONG_RELEASE_ACQUIRE (int a, int b)
+{
+ return __atomic_compare_exchange (&v, &a, &b,
+ STRONG, __ATOMIC_RELEASE,
+ __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_compare_exchange_WEAK_RELEASE_ACQUIRE (int a, int b)
+{
+ return __atomic_compare_exchange (&v, &a, &b,
+ WEAK, __ATOMIC_RELEASE,
+ __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_compare_exchange_n_STRONG_RELEASE_ACQUIRE (int a, int b)
+{
+ return __atomic_compare_exchange_n (&v, &a, b,
+ STRONG, __ATOMIC_RELEASE,
+ __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_compare_exchange_n_WEAK_RELEASE_ACQUIRE (int a, int b)
+{
+ return __atomic_compare_exchange_n (&v, &a, b,
+ WEAK, __ATOMIC_RELEASE,
+ __ATOMIC_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.c
new file mode 100644
index 0000000000..8569ac0dfc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-acq_rel.x"
+
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.x
new file mode 100644
index 0000000000..9970bbb252
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-acq_rel.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_ACQ_REL (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_sub_ACQ_REL (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_and_ACQ_REL (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_nand_ACQ_REL (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_xor_ACQ_REL (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_or_ACQ_REL (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_ACQ_REL);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.c
new file mode 100644
index 0000000000..57e6d57d5e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.x
new file mode 100644
index 0000000000..7eeb7f8458
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-acquire.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_ACQUIRE (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_sub_ACQUIRE (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_and_ACQUIRE (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_nand_ACQUIRE (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_xor_ACQUIRE (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_or_ACQUIRE (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-char.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-char.c
new file mode 100644
index 0000000000..d6c2aa593b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-char.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-char.x"
+
+/* { dg-final { scan-assembler-times "ldxrb\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxrb\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-char.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-char.x
new file mode 100644
index 0000000000..a543aa9e09
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-char.x
@@ -0,0 +1,37 @@
+char v = 0;
+
+char
+atomic_fetch_add_RELAXED (char a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
+}
+
+char
+atomic_fetch_sub_RELAXED (char a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
+}
+
+char
+atomic_fetch_and_RELAXED (char a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
+}
+
+char
+atomic_fetch_nand_RELAXED (char a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
+}
+
+char
+atomic_fetch_xor_RELAXED (char a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
+}
+
+char
+atomic_fetch_or_RELAXED (char a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
new file mode 100644
index 0000000000..38d6c2cfb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-consume.x"
+
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x
new file mode 100644
index 0000000000..c6b0792ba0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-consume.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_CONSUME (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_sub_CONSUME (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_and_CONSUME (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_nand_CONSUME (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_xor_CONSUME (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_or_CONSUME (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_CONSUME);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-imm.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-imm.c
new file mode 100644
index 0000000000..6c6f7e16df
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-imm.c
@@ -0,0 +1,78 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int v = 0;
+
+int
+atomic_fetch_add_RELAXED ()
+{
+ return __atomic_fetch_add (&v, 4096, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_sub_ACQUIRE ()
+{
+ return __atomic_fetch_sub (&v, 4096, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_fetch_and_SEQ_CST ()
+{
+ return __atomic_fetch_and (&v, 4096, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_nand_ACQ_REL ()
+{
+ return __atomic_fetch_nand (&v, 4096, __ATOMIC_ACQ_REL);
+}
+
+int
+atomic_fetch_xor_CONSUME ()
+{
+ return __atomic_fetch_xor (&v, 4096, __ATOMIC_CONSUME);
+}
+
+int
+atomic_fetch_or_RELAXED ()
+{
+ return __atomic_fetch_or (&v, 4096, __ATOMIC_RELAXED);
+}
+
+int
+atomic_add_fetch_ACQUIRE ()
+{
+ return __atomic_add_fetch (&v, 4096, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_sub_fetch_RELAXED ()
+{
+ return __atomic_sub_fetch (&v, 4096, __ATOMIC_RELAXED);
+}
+
+int
+atomic_and_fetch_SEQ_CST ()
+{
+ return __atomic_and_fetch (&v, 4096, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_nand_fetch_ACQUIRE ()
+{
+ return __atomic_nand_fetch (&v, 4096, __ATOMIC_ACQUIRE);
+}
+
+int
+atomic_xor_fetch_RELEASE ()
+{
+ return __atomic_xor_fetch (&v, 4096, __ATOMIC_RELEASE);
+}
+
+int
+atomic_or_fetch_CONSUME ()
+{
+ return __atomic_or_fetch (&v, 4096, __ATOMIC_CONSUME);
+}
+
+/* { dg-final { scan-assembler-times "\tw\[0-9\]+, w\[0-9\]+, #*4096" 12 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-int.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-int.c
new file mode 100644
index 0000000000..9ad7a794fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-int.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-int.x"
+
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-int.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-int.x
new file mode 100644
index 0000000000..74ab6323c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-int.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_RELAXED (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_sub_RELAXED (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_and_RELAXED (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_nand_RELAXED (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_xor_RELAXED (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_or_RELAXED (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-long.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-long.c
new file mode 100644
index 0000000000..0672d48b66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-long.c
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long v = 0;
+
+long
+atomic_fetch_add_RELAXED (long a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
+}
+
+long
+atomic_fetch_sub_RELAXED (long a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
+}
+
+long
+atomic_fetch_and_RELAXED (long a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
+}
+
+long
+atomic_fetch_nand_RELAXED (long a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
+}
+
+long
+atomic_fetch_xor_RELAXED (long a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
+}
+
+long
+atomic_fetch_or_RELAXED (long a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
+}
+
+/* { dg-final { scan-assembler-times "ldxr\tx\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 {target lp64} } } */
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, x\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 {target lp64} } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 {target ilp32} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.c
new file mode 100644
index 0000000000..cd3fe2c3ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-relaxed.x"
+
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.x
new file mode 100644
index 0000000000..74ab6323c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-relaxed.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_RELAXED (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_sub_RELAXED (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_and_RELAXED (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_nand_RELAXED (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_xor_RELAXED (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
+}
+
+int
+atomic_fetch_or_RELAXED (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-release.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-release.c
new file mode 100644
index 0000000000..2fc04b210d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-release.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-release.x"
+
+/* { dg-final { scan-assembler-times "ldxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-release.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-release.x
new file mode 100644
index 0000000000..343f09b526
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-release.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_RELEASE (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELEASE);
+}
+
+int
+atomic_fetch_sub_RELEASE (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELEASE);
+}
+
+int
+atomic_fetch_and_RELEASE (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELEASE);
+}
+
+int
+atomic_fetch_nand_RELEASE (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELEASE);
+}
+
+int
+atomic_fetch_xor_RELEASE (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELEASE);
+}
+
+int
+atomic_fetch_or_RELEASE (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.c
new file mode 100644
index 0000000000..202d471d08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-seq_cst.x"
+
+/* { dg-final { scan-assembler-times "ldaxr\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlxr\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.x
new file mode 100644
index 0000000000..e654a74e2a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-seq_cst.x
@@ -0,0 +1,37 @@
+int v = 0;
+
+int
+atomic_fetch_add_SEQ_CST (int a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_sub_SEQ_CST (int a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_and_SEQ_CST (int a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_nand_SEQ_CST (int a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_xor_SEQ_CST (int a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_SEQ_CST);
+}
+
+int
+atomic_fetch_or_SEQ_CST (int a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_SEQ_CST);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-short.c b/gcc/testsuite/gcc.target/aarch64/atomic-op-short.c
new file mode 100644
index 0000000000..39e71c18a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-short.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "atomic-op-short.x"
+
+/* { dg-final { scan-assembler-times "ldxrh\tw\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stxrh\tw\[0-9\]+, w\[0-9\]+, \\\[x\[0-9\]+\\\]" 6 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/atomic-op-short.x b/gcc/testsuite/gcc.target/aarch64/atomic-op-short.x
new file mode 100644
index 0000000000..2fd70f59eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/atomic-op-short.x
@@ -0,0 +1,37 @@
+short v = 0;
+
+short
+atomic_fetch_add_RELAXED (short a)
+{
+ return __atomic_fetch_add (&v, a, __ATOMIC_RELAXED);
+}
+
+short
+atomic_fetch_sub_RELAXED (short a)
+{
+ return __atomic_fetch_sub (&v, a, __ATOMIC_RELAXED);
+}
+
+short
+atomic_fetch_and_RELAXED (short a)
+{
+ return __atomic_fetch_and (&v, a, __ATOMIC_RELAXED);
+}
+
+short
+atomic_fetch_nand_RELAXED (short a)
+{
+ return __atomic_fetch_nand (&v, a, __ATOMIC_RELAXED);
+}
+
+short
+atomic_fetch_xor_RELAXED (short a)
+{
+ return __atomic_fetch_xor (&v, a, __ATOMIC_RELAXED);
+}
+
+short
+atomic_fetch_or_RELAXED (short a)
+{
+ return __atomic_fetch_or (&v, a, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/bfxil_1.c b/gcc/testsuite/gcc.target/aarch64/bfxil_1.c
new file mode 100644
index 0000000000..b16834786a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/bfxil_1.c
@@ -0,0 +1,40 @@
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+/* { dg-require-effective-target aarch64_little_endian } */
+
+extern void abort (void);
+
+typedef struct bitfield
+{
+ unsigned short eight1: 8;
+ unsigned short four: 4;
+ unsigned short eight2: 8;
+ unsigned short seven: 7;
+ unsigned int sixteen: 16;
+} bitfield;
+
+bitfield
+bfxil (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfxil\tx\[0-9\]+, x\[0-9\]+, 16, 8" } } */
+ a.eight1 = a.eight2;
+ return a;
+}
+
+int
+main (void)
+{
+ static bitfield a;
+ bitfield b;
+
+ a.eight1 = 9;
+ a.eight2 = 57;
+ b = bfxil (a);
+
+ if (b.eight1 != a.eight2)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/bfxil_2.c b/gcc/testsuite/gcc.target/aarch64/bfxil_2.c
new file mode 100644
index 0000000000..4e4d610c26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/bfxil_2.c
@@ -0,0 +1,42 @@
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+/* { dg-require-effective-target aarch64_big_endian } */
+
+extern void abort (void);
+
+typedef struct bitfield
+{
+ unsigned short eight1: 8;
+ unsigned short four: 4;
+ unsigned short eight2: 8;
+ unsigned short seven: 7;
+ unsigned int sixteen: 16;
+ unsigned short eight3: 8;
+ unsigned short eight4: 8;
+} bitfield;
+
+bitfield
+bfxil (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfxil\tx\[0-9\]+, x\[0-9\]+, 40, 8" } } */
+ a.eight4 = a.eight2;
+ return a;
+}
+
+int
+main (void)
+{
+ static bitfield a;
+ bitfield b;
+
+ a.eight4 = 9;
+ a.eight2 = 57;
+ b = bfxil (a);
+
+ if (b.eight4 != a.eight2)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/bics_1.c b/gcc/testsuite/gcc.target/aarch64/bics_1.c
new file mode 100644
index 0000000000..d62ea9a653
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/bics_1.c
@@ -0,0 +1,107 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+bics_si_test1 (int a, int b, int c)
+{
+ int d = a & ~b;
+
+ /* { dg-final { scan-assembler-times "bics\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+bics_si_test2 (int a, int b, int c)
+{
+ int d = a & ~(b << 3);
+
+ /* { dg-final { scan-assembler "bics\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+bics_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & ~b;
+
+ /* { dg-final { scan-assembler-times "bics\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+bics_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & ~(b << 3);
+
+ /* { dg-final { scan-assembler "bics\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = bics_si_test1 (29, ~4, 5);
+ if (x != ((29 & 4) + ~4 + 5))
+ abort ();
+
+ x = bics_si_test1 (5, ~2, 20);
+ if (x != 25)
+ abort ();
+
+ x = bics_si_test2 (35, ~4, 5);
+ if (x != ((35 & ~(~4 << 3)) + ~4 + 5))
+ abort ();
+
+ x = bics_si_test2 (96, ~2, 20);
+ if (x != 116)
+ abort ();
+
+ y = bics_di_test1 (0x130000029ll,
+ ~0x320000004ll,
+ 0x505050505ll);
+
+ if (y != ((0x130000029ll & 0x320000004ll) + ~0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = bics_di_test1 (0x5000500050005ll,
+ ~0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x5000500052025ll)
+ abort ();
+
+ y = bics_di_test2 (0x130000029ll,
+ ~0x064000008ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & ~(~0x064000008ll << 3))
+ + ~0x064000008ll + 0x505050505ll))
+ abort ();
+
+ y = bics_di_test2 (0x130002900ll,
+ ~0x088000008ll,
+ 0x505050505ll);
+ if (y != (0x130002900ll + 0x505050505ll))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/bics_2.c b/gcc/testsuite/gcc.target/aarch64/bics_2.c
new file mode 100644
index 0000000000..e33c748ff6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/bics_2.c
@@ -0,0 +1,111 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+bics_si_test1 (int a, int b, int c)
+{
+ int d = a & ~b;
+
+ /* { dg-final { scan-assembler-not "bics\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "bic\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+bics_si_test2 (int a, int b, int c)
+{
+ int d = a & ~(b << 3);
+
+ /* { dg-final { scan-assembler-not "bics\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "bic\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+bics_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & ~b;
+
+ /* { dg-final { scan-assembler-not "bics\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "bic\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+bics_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & ~(b << 3);
+
+ /* { dg-final { scan-assembler-not "bics\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "bic\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = bics_si_test1 (29, ~4, 5);
+ if (x != ((29 & 4) + ~4 + 5))
+ abort ();
+
+ x = bics_si_test1 (5, ~2, 20);
+ if (x != 25)
+ abort ();
+
+ x = bics_si_test2 (35, ~4, 5);
+ if (x != ((35 & ~(~4 << 3)) + ~4 + 5))
+ abort ();
+
+ x = bics_si_test2 (96, ~2, 20);
+ if (x != 116)
+ abort ();
+
+ y = bics_di_test1 (0x130000029ll,
+ ~0x320000004ll,
+ 0x505050505ll);
+
+ if (y != ((0x130000029ll & 0x320000004ll) + ~0x320000004ll + 0x505050505ll))
+ abort ();
+
+ y = bics_di_test1 (0x5000500050005ll,
+ ~0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x5000500052025ll)
+ abort ();
+
+ y = bics_di_test2 (0x130000029ll,
+ ~0x064000008ll,
+ 0x505050505ll);
+ if (y != ((0x130000029ll & ~(~0x064000008ll << 3))
+ + ~0x064000008ll + 0x505050505ll))
+ abort ();
+
+ y = bics_di_test2 (0x130002900ll,
+ ~0x088000008ll,
+ 0x505050505ll);
+ if (y != (0x130002900ll + 0x505050505ll))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/builtin-bswap-1.c b/gcc/testsuite/gcc.target/aarch64/builtin-bswap-1.c
new file mode 100644
index 0000000000..a6706e693e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/builtin-bswap-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* { dg-final { scan-assembler-times "rev16\\t" 2 } } */
+
+/* rev16 */
+short
+swaps16 (short x)
+{
+ return __builtin_bswap16 (x);
+}
+
+/* rev16 */
+unsigned short
+swapu16 (unsigned short x)
+{
+ return __builtin_bswap16 (x);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/builtin-bswap-2.c b/gcc/testsuite/gcc.target/aarch64/builtin-bswap-2.c
new file mode 100644
index 0000000000..6018b48347
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/builtin-bswap-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* { dg-final { scan-assembler-times "rev16\\t" 2 } } */
+
+/* rev16 */
+unsigned short
+swapu16_1 (unsigned short x)
+{
+ return (x << 8) | (x >> 8);
+}
+
+/* rev16 */
+unsigned short
+swapu16_2 (unsigned short x)
+{
+ return (x >> 8) | (x << 8);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c b/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
new file mode 100644
index 0000000000..ced96d0454
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+void
+test (void)
+{
+ __asm__ ("@ %c0" : : "S" (test));
+}
+
+/* { dg-final { scan-assembler "@ test" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c b/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
new file mode 100644
index 0000000000..c28837cd50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-Wno-pointer-arith" } */
+
+void
+test (void)
+{
+ __asm__ ("@ %c0" : : "S" (&test + 4));
+}
+
+/* { dg-final { scan-assembler "@ test\\+4" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/c-output-template.c b/gcc/testsuite/gcc.target/aarch64/c-output-template.c
new file mode 100644
index 0000000000..1b67c9169e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/c-output-template.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+
+void
+test (void)
+{
+ __asm__ ("@ %c0" : : "i" (42));
+}
+
+/* { dg-final { scan-assembler "@ 42" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/clrsb.c b/gcc/testsuite/gcc.target/aarch64/clrsb.c
new file mode 100644
index 0000000000..ac8d2e0510
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/clrsb.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int functest (unsigned int x)
+{
+ return __builtin_clrsb (x);
+}
+
+/* { dg-final { scan-assembler "cls\tw" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/clz.c b/gcc/testsuite/gcc.target/aarch64/clz.c
new file mode 100644
index 0000000000..b650b13185
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/clz.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int functest (unsigned int x)
+{
+ return __builtin_clz (x);
+}
+
+/* { dg-final { scan-assembler "clz\tw" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/cmn-neg.c b/gcc/testsuite/gcc.target/aarch64/cmn-neg.c
new file mode 100644
index 0000000000..ab264e798e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cmn-neg.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+extern void abort (void);
+
+void __attribute__ ((noinline))
+foo_s32 (int a, int b)
+{
+ if (a == -b)
+ abort ();
+}
+/* { dg-final { scan-assembler "cmn\tw\[0-9\]" } } */
+
+void __attribute__ ((noinline))
+foo_s64 (long long a, long long b)
+{
+ if (a == -b)
+ abort ();
+}
+/* { dg-final { scan-assembler "cmn\tx\[0-9\]" } } */
+
+
+int
+main (void)
+{
+ int a = 30;
+ int b = 42;
+ foo_s32 (a, b);
+ foo_s64 (a, b);
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/cmn-neg2.c b/gcc/testsuite/gcc.target/aarch64/cmn-neg2.c
new file mode 100644
index 0000000000..ca45a53435
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cmn-neg2.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+extern void abort (void);
+
+/* It's unsafe to use CMN in these comparisons. */
+
+void __attribute__ ((noinline))
+foo_s32 (int a, int b)
+{
+ if (a < -b)
+ abort ();
+}
+
+void __attribute__ ((noinline))
+foo_s64 (unsigned long long a, unsigned long long b)
+{
+ if (a > -b)
+ abort ();
+}
+
+
+int
+main (void)
+{
+ int a = 30;
+ int b = 42;
+ foo_s32 (a, b);
+ foo_s64 (a, b);
+ return 0;
+}
+/* { dg-final { scan-assembler-not "cmn\t" } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/cmn.c b/gcc/testsuite/gcc.target/aarch64/cmn.c
new file mode 100644
index 0000000000..1f06f57ad3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cmn.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int a, int b)
+{
+ if (a + b)
+ return 5;
+ else
+ return 2;
+ /* { dg-final { scan-assembler "cmn\tw\[0-9\]" } } */
+}
+
+typedef long long s64;
+
+s64
+foo2 (s64 a, s64 b)
+{
+ if (a + b)
+ return 5;
+ else
+ return 2;
+ /* { dg-final { scan-assembler "cmn\tx\[0-9\]" } } */
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/cmp-1.c b/gcc/testsuite/gcc.target/aarch64/cmp-1.c
new file mode 100644
index 0000000000..4c082b484a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cmp-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int f(int a, int b)
+{
+ if(a<b)
+ return 1;
+ if(a>b)
+ return -1;
+ return 0;
+}
+
+/* We should optimize away the second cmp. */
+/* { dg-final { scan-assembler-times "cmp\tw" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/cmp.c b/gcc/testsuite/gcc.target/aarch64/cmp.c
new file mode 100644
index 0000000000..ee57dd283b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cmp.c
@@ -0,0 +1,61 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+cmp_si_test1 (int a, int b, int c)
+{
+ if (a > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+int
+cmp_si_test2 (int a, int b, int c)
+{
+ if ((a >> 3) > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+typedef long long s64;
+
+s64
+cmp_di_test1 (s64 a, s64 b, s64 c)
+{
+ if (a > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+s64
+cmp_di_test2 (s64 a, s64 b, s64 c)
+{
+ if ((a >> 3) > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+int
+cmp_di_test3 (int a, s64 b, s64 c)
+{
+ if (a > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+int
+cmp_di_test4 (int a, s64 b, s64 c)
+{
+ if (((s64)a << 3) > b)
+ return a + c;
+ else
+ return a + b + c;
+}
+
+/* { dg-final { scan-assembler-times "cmp\tw\[0-9\]+, w\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "cmp\tx\[0-9\]+, x\[0-9\]+" 4 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c
new file mode 100644
index 0000000000..de6b8a7da4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-1.c
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=dummy" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c
new file mode 100644
index 0000000000..2ca006598f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-2.c
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=cortex-a53+no" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c
new file mode 100644
index 0000000000..155def0515
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-3.c
@@ -0,0 +1,7 @@
+/* { dg-error "unknown" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=cortex-a53+dummy" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c
new file mode 100644
index 0000000000..4c246eb017
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/cpu-diagnostics-4.c
@@ -0,0 +1,7 @@
+/* { dg-error "missing" "" {target "aarch64*-*-*" } } */
+/* { dg-options "-O2 -mcpu=+dummy" } */
+
+void f ()
+{
+ return;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/csinc-1.c b/gcc/testsuite/gcc.target/aarch64/csinc-1.c
new file mode 100644
index 0000000000..132a0f6793
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/csinc-1.c
@@ -0,0 +1,72 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int
+test_csinc32_ifcvt(unsigned int w0,
+ unsigned int w1,
+ unsigned int w2) {
+ /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
+ if (w0 == w1)
+ ++ w2;
+
+ return w2;
+}
+
+unsigned int
+test_csinc32_condasn1(unsigned int w0,
+ unsigned int w1,
+ unsigned int w2,
+ unsigned int w3) {
+ unsigned int w4;
+
+ /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*ne" } } */
+ w4 = (w0 == w1) ? (w3 + 1) : w2;
+ return w4;
+}
+
+unsigned int
+test_csinc32_condasn2(unsigned int w0,
+ unsigned int w1,
+ unsigned int w2,
+ unsigned int w3) {
+ unsigned int w4;
+
+ /* { dg-final { scan-assembler "csinc\tw\[0-9\]*.*eq" } } */
+ w4 = (w0 == w1) ? w2 : (w3 + 1);
+ return w4;
+}
+
+unsigned long long
+test_csinc64_ifcvt(unsigned long long x0,
+ unsigned long long x1,
+ unsigned long long x2) {
+ /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
+ if (x0 == x1)
+ ++ x2;
+
+ return x2;
+}
+
+unsigned long long
+test_csinc64_condasn1(unsigned long long x0,
+ unsigned long long x1,
+ unsigned long long x2,
+ unsigned long long x3) {
+ unsigned long long x4;
+
+ /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*ne" } } */
+ x4 = (x0 == x1) ? (x3 + 1) : x2;
+ return x4;
+}
+
+unsigned long long
+test_csinc64_condasn2(unsigned long long x0,
+ unsigned long long x1,
+ unsigned long long x2,
+ unsigned long long x3) {
+ unsigned long long x4;
+
+ /* { dg-final { scan-assembler "csinc\tx\[0-9\]*.*eq" } } */
+ x4 = (x0 == x1) ? x2 : (x3 + 1);
+ return x4;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/csinc-2.c b/gcc/testsuite/gcc.target/aarch64/csinc-2.c
new file mode 100644
index 0000000000..9bd6861d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/csinc-2.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int a, int b)
+{
+ return (a < b) ? 1 : 7;
+ /* { dg-final { scan-assembler "csinc\tw\[0-9\].*wzr" } } */
+}
+
+typedef long long s64;
+
+s64
+foo2 (s64 a, s64 b)
+{
+ return (a == b) ? 7 : 1;
+ /* { dg-final { scan-assembler "csinc\tx\[0-9\].*xzr" } } */
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/csinv-1.c b/gcc/testsuite/gcc.target/aarch64/csinv-1.c
new file mode 100644
index 0000000000..8d44449f47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/csinv-1.c
@@ -0,0 +1,50 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int
+test_csinv32_condasn1(unsigned int w0,
+ unsigned int w1,
+ unsigned int w2,
+ unsigned int w3) {
+ unsigned int w4;
+
+ /* { dg-final { scan-assembler "csinv\tw\[0-9\]*.*ne" } } */
+ w4 = (w0 == w1) ? ~w3 : w2;
+ return w4;
+}
+
+unsigned int
+test_csinv32_condasn2(unsigned int w0,
+ unsigned int w1,
+ unsigned int w2,
+ unsigned int w3) {
+ unsigned int w4;
+
+ /* { dg-final { scan-assembler "csinv\tw\[0-9\]*.*eq" } } */
+ w4 = (w0 == w1) ? w3 : ~w2;
+ return w4;
+}
+
+unsigned long long
+test_csinv64_condasn1(unsigned long long x0,
+ unsigned long long x1,
+ unsigned long long x2,
+ unsigned long long x3) {
+ unsigned long long x4;
+
+ /* { dg-final { scan-assembler "csinv\tx\[0-9\]*.*ne" } } */
+ x4 = (x0 == x1) ? ~x3 : x2;
+ return x4;
+}
+
+unsigned long long
+test_csinv64_condasn2(unsigned long long x0,
+ unsigned long long x1,
+ unsigned long long x2,
+ unsigned long long x3) {
+ unsigned long long x4;
+
+ /* { dg-final { scan-assembler "csinv\tx\[0-9\]*.*eq" } } */
+ x4 = (x0 == x1) ? x3 : ~x2;
+ return x4;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/csneg-1.c b/gcc/testsuite/gcc.target/aarch64/csneg-1.c
new file mode 100644
index 0000000000..08001afd8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/csneg-1.c
@@ -0,0 +1,50 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+test_csneg32_condasn1(int w0,
+ int w1,
+ int w2,
+ int w3) {
+ int w4;
+
+ /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*ne" } } */
+ w4 = (w0 == w1) ? -w3 : w2;
+ return w4;
+}
+
+int
+test_csneg32_condasn2(int w0,
+ int w1,
+ int w2,
+ int w3) {
+ int w4;
+
+ /* { dg-final { scan-assembler "csneg\tw\[0-9\]*.*eq" } } */
+ w4 = (w0 == w1) ? w3 : -w2;
+ return w4;
+}
+
+long long
+test_csneg64_condasn1(long long x0,
+ long long x1,
+ long long x2,
+ long long x3) {
+ long long x4;
+
+ /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*ne" } } */
+ x4 = (x0 == x1) ? -x3 : x2;
+ return x4;
+}
+
+long long
+test_csneg64_condasn2(long long x0,
+ long long x1,
+ long long x2,
+ long long x3) {
+ long long x4;
+
+ /* { dg-final { scan-assembler "csneg\tx\[0-9\]*.*eq" } } */
+ x4 = (x0 == x1) ? x3 : -x2;
+ return x4;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/ctz.c b/gcc/testsuite/gcc.target/aarch64/ctz.c
new file mode 100644
index 0000000000..89d6fb442b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ctz.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int functest (unsigned int x)
+{
+ return __builtin_ctz (x);
+}
+
+/* { dg-final { scan-assembler "rbit\tw" } } */
+/* { dg-final { scan-assembler "clz\tw" } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c b/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
new file mode 100644
index 0000000000..cce88155ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/dwarf-cfa-reg.c
@@ -0,0 +1,14 @@
+/* Verify that CFA register is restored to SP after FP is restored. */
+/* { dg-do compile } */
+/* { dg-options "-O0 -gdwarf-2" } */
+/* { dg-final { scan-assembler ".cfi_restore 30" } } */
+/* { dg-final { scan-assembler ".cfi_restore 29" } } */
+/* { dg-final { scan-assembler ".cfi_def_cfa 31, 0" } } */
+/* { dg-final { scan-assembler "ret" } } */
+
+int bar (unsigned int);
+
+int foo (void)
+{
+ return bar (0xcafe);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/extend.c b/gcc/testsuite/gcc.target/aarch64/extend.c
new file mode 100644
index 0000000000..f399e55ce8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/extend.c
@@ -0,0 +1,170 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+ldr_uxtw (int *arr, unsigned int i)
+{
+ /* { dg-final { scan-assembler "ldr\tw\[0-9\]+,.*uxtw #?2]" } } */
+ return arr[i];
+}
+
+int
+ldr_uxtw0 (char *arr, unsigned int i)
+{
+ /* { dg-final { scan-assembler "ldr\tw\[0-9\]+,.*uxtw]" } } */
+ return arr[i];
+}
+
+int
+ldr_sxtw (int *arr, int i)
+{
+ /* { dg-final { scan-assembler "ldr\tw\[0-9\]+,.*sxtw #?2]" } } */
+ return arr[i];
+}
+
+int
+ldr_sxtw0 (char *arr, int i)
+{
+ /* { dg-final { scan-assembler "ldr\tw\[0-9\]+,.*sxtw]" } } */
+ return arr[i];
+}
+
+unsigned long long
+adddi_uxtw (unsigned long long a, unsigned int i)
+{
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+,.*uxtw #?3" } } */
+ return a + ((unsigned long long)i << 3);
+}
+
+unsigned long long
+adddi_uxtw0 (unsigned long long a, unsigned int i)
+{
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+,.*uxtw\n" } } */
+ return a + i;
+}
+
+long long
+adddi_sxtw (long long a, int i)
+{
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+,.*sxtw #?3" } } */
+ return a + ((long long)i << 3);
+}
+
+long long
+adddi_sxtw0 (long long a, int i)
+{
+ /* { dg-final { scan-assembler "add\tx\[0-9\]+,.*sxtw\n" } } */
+ return a + i;
+}
+
+unsigned long long
+subdi_uxtw (unsigned long long a, unsigned int i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*uxtw #?3" } } */
+ return a - ((unsigned long long)i << 3);
+}
+
+unsigned long long
+subdi_uxtw0 (unsigned long long a, unsigned int i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*uxtw\n" } } */
+ return a - i;
+}
+
+long long
+subdi_sxtw (long long a, int i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*sxtw #?3" } } */
+ return a - ((long long)i << 3);
+}
+
+long long
+subdi_sxtw0 (long long a, int i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*sxtw\n" } } */
+ return a - (long long)i;
+}
+
+unsigned long long
+subdi_uxth (unsigned long long a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*uxth #?1" } } */
+ return a - ((unsigned long long)i << 1);
+}
+
+unsigned long long
+subdi_uxth0 (unsigned long long a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*uxth\n" } } */
+ return a - i;
+}
+
+long long
+subdi_sxth (long long a, short i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*sxth #?1" } } */
+ return a - ((long long)i << 1);
+}
+
+long long
+subdi_sxth0 (long long a, short i)
+{
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+,.*sxth\n" } } */
+ return a - (long long)i;
+}
+
+unsigned int
+subsi_uxth (unsigned int a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*uxth #?1" } } */
+ return a - ((unsigned int)i << 1);
+}
+
+unsigned int
+subsi_uxth0 (unsigned int a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*uxth\n" } } */
+ return a - i;
+}
+
+int
+subsi_sxth (int a, short i)
+{
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*sxth #?1" } } */
+ return a - ((int)i << 1);
+}
+
+int
+subsi_sxth0 (int a, short i)
+{
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+,.*sxth\n" } } */
+ return a - (int)i;
+}
+
+unsigned int
+addsi_uxth (unsigned int a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+,.*uxth #?1" } } */
+ return a + ((unsigned int)i << 1);
+}
+
+unsigned int
+addsi_uxth0 (unsigned int a, unsigned short i)
+{
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+,.*uxth\n" } } */
+ return a + i;
+}
+
+int
+addsi_sxth (int a, short i)
+{
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+,.*sxth #?1" } } */
+ return a + ((int)i << 1);
+}
+
+int
+addsi_sxth0 (int a, short i)
+{
+ /* { dg-final { scan-assembler "add\tw\[0-9\]+,.*sxth\n" } } */
+ return a + (int)i;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/extr.c b/gcc/testsuite/gcc.target/aarch64/extr.c
new file mode 100644
index 0000000000..a78dd8d607
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/extr.c
@@ -0,0 +1,34 @@
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-do run } */
+
+extern void abort (void);
+
+int
+test_si (int a, int b)
+{
+ /* { dg-final { scan-assembler "extr\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, 27\n" } } */
+ return (a << 5) | ((unsigned int) b >> 27);
+}
+
+long long
+test_di (long long a, long long b)
+{
+ /* { dg-final { scan-assembler "extr\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, 45\n" } } */
+ return (a << 19) | ((unsigned long long) b >> 45);
+}
+
+int
+main ()
+{
+ int v;
+ long long w;
+ v = test_si (0x00000004, 0x30000000);
+ if (v != 0x00000086)
+ abort();
+ w = test_di (0x0001040040040004ll, 0x0070050066666666ll);
+ if (w != 0x2002002000200380ll)
+ abort();
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fabd.c b/gcc/testsuite/gcc.target/aarch64/fabd.c
new file mode 100644
index 0000000000..7206d5e95c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fabd.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O1 -fno-inline --save-temps" } */
+
+extern double fabs (double);
+extern float fabsf (float);
+extern void abort ();
+extern void exit (int);
+
+void
+fabd_d (double x, double y, double d)
+{
+ if ((fabs (x - y) - d) > 0.00001)
+ abort ();
+}
+
+/* { dg-final { scan-assembler "fabd\td\[0-9\]+" } } */
+
+void
+fabd_f (float x, float y, float d)
+{
+ if ((fabsf (x - y) - d) > 0.00001)
+ abort ();
+}
+
+/* { dg-final { scan-assembler "fabd\ts\[0-9\]+" } } */
+
+int
+main ()
+{
+ fabd_d (10.0, 5.0, 5.0);
+ fabd_d (5.0, 10.0, 5.0);
+ fabd_f (10.0, 5.0, 5.0);
+ fabd_f (5.0, 10.0, 5.0);
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt.x b/gcc/testsuite/gcc.target/aarch64/fcvt.x
new file mode 100644
index 0000000000..be50ee50f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt.x
@@ -0,0 +1,55 @@
+extern GPF SUFFIX(trunc) (GPF);
+extern GPF SUFFIX(ceil) (GPF);
+extern GPF SUFFIX(floor) (GPF);
+extern GPF SUFFIX(round) (GPF);
+
+GPI test1a (GPF x) {
+ return SUFFIX(__builtin_trunc)(x);
+}
+
+GPI test1b (GPF x)
+{
+ return SUFFIX(trunc)(x);
+}
+
+GPI test2a (GPF x)
+{
+ return SUFFIX(__builtin_lceil)(x);
+}
+
+GPI test2b (GPF x)
+{
+ return SUFFIX(ceil)(x);
+}
+
+GPI test2c (GPF x)
+{
+ return SUFFIX(__builtin_ceil)(x);
+}
+
+GPI test3a (GPF x)
+{
+ return SUFFIX(__builtin_lfloor)(x);
+}
+
+GPI test3b (GPF x)
+{
+ return SUFFIX(floor)(x);
+}
+
+GPI test3c (GPF x)
+{
+ return SUFFIX(__builtin_floor)(x);
+}
+
+GPI test4a (GPF x)
+{
+ return SUFFIX(__builtin_round)(x);
+}
+
+GPI test4b (GPF x)
+{
+ return SUFFIX(round)(x);
+}
+
+
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_double_int.c b/gcc/testsuite/gcc.target/aarch64/fcvt_double_int.c
new file mode 100644
index 0000000000..e5399099b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_double_int.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF double
+#define SUFFIX(x) x
+#define GPI int
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzs\tw\[0-9\]+, *d\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *d\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *d\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tw\[0-9\]+, *d\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_double_long.c b/gcc/testsuite/gcc.target/aarch64/fcvt_double_long.c
new file mode 100644
index 0000000000..5eb36ff6dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_double_long.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF double
+#define SUFFIX(x) x
+#define GPI long
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzs\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtzs\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *d\[0-9\]" 3 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *d\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *d\[0-9\]" 3 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *d\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_double_uint.c b/gcc/testsuite/gcc.target/aarch64/fcvt_double_uint.c
new file mode 100644
index 0000000000..59be47512c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_double_uint.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF double
+#define SUFFIX(x) x
+#define GPI unsigned int
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzu\tw\[0-9\]+, *d\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *d\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tw\[0-9\]+, *d\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *d\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tw\[0-9\]+, *d\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtau\tw\[0-9\]+, *d\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_double_ulong.c b/gcc/testsuite/gcc.target/aarch64/fcvt_double_ulong.c
new file mode 100644
index 0000000000..55723cf906
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_double_ulong.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF double
+#define SUFFIX(x) x
+#define GPI unsigned long
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzu\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtzu\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *d\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *d\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *d\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtau\tx\[0-9\]+, *d\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtau\tw\[0-9\]+, *d\[0-9\]" 2 {target ilp32} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_float_int.c b/gcc/testsuite/gcc.target/aarch64/fcvt_float_int.c
new file mode 100644
index 0000000000..2e10e2dec9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_float_int.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF float
+#define SUFFIX(x) x##f
+#define GPI int
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzs\tw\[0-9\]+, *s\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *s\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *s\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tw\[0-9\]+, *s\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_float_long.c b/gcc/testsuite/gcc.target/aarch64/fcvt_float_long.c
new file mode 100644
index 0000000000..1debf710f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_float_long.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF float
+#define SUFFIX(x) x##f
+#define GPI long
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzs\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtzs\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *s\[0-9\]" 3 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *s\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *s\[0-9\]" 3 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *s\[0-9\]" 3 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtas\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_float_uint.c b/gcc/testsuite/gcc.target/aarch64/fcvt_float_uint.c
new file mode 100644
index 0000000000..c0b0c693a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_float_uint.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF float
+#define SUFFIX(x) x##f
+#define GPI unsigned int
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzu\tw\[0-9\]+, *s\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *s\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tw\[0-9\]+, *s\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *s\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tw\[0-9\]+, *s\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "fcvtau\tw\[0-9\]+, *s\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fcvt_float_ulong.c b/gcc/testsuite/gcc.target/aarch64/fcvt_float_ulong.c
new file mode 100644
index 0000000000..07309e2c88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fcvt_float_ulong.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF float
+#define SUFFIX(x) x##f
+#define GPI unsigned long
+
+#include "fcvt.x"
+
+/* { dg-final { scan-assembler-times "fcvtzu\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtzu\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtps\tw\[0-9\]+, *s\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtpu\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tx\[0-9\]+, *s\[0-9\]" 1 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtms\tw\[0-9\]+, *s\[0-9\]" 1 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtmu\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
+/* { dg-final { scan-assembler-times "fcvtau\tx\[0-9\]+, *s\[0-9\]" 2 {target lp64} } } */
+/* { dg-final { scan-assembler-times "fcvtau\tw\[0-9\]+, *s\[0-9\]" 2 {target ilp32} } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/ffs.c b/gcc/testsuite/gcc.target/aarch64/ffs.c
new file mode 100644
index 0000000000..a3447619d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ffs.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+unsigned int functest(unsigned int x)
+{
+ return __builtin_ffs(x);
+}
+
+/* { dg-final { scan-assembler "cmp\tw" } } */
+/* { dg-final { scan-assembler "rbit\tw" } } */
+/* { dg-final { scan-assembler "clz\tw" } } */
+/* { dg-final { scan-assembler "csinc\tw" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmadd.c b/gcc/testsuite/gcc.target/aarch64/fmadd.c
new file mode 100644
index 0000000000..39975dbae0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmadd.c
@@ -0,0 +1,55 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern double fma (double, double, double);
+extern float fmaf (float, float, float);
+
+double test_fma1 (double x, double y, double z)
+{
+ return fma (x, y, z);
+}
+
+float test_fma2 (float x, float y, float z)
+{
+ return fmaf (x, y, z);
+}
+
+double test_fnma1 (double x, double y, double z)
+{
+ return fma (-x, y, z);
+}
+
+float test_fnma2 (float x, float y, float z)
+{
+ return fmaf (-x, y, z);
+}
+
+double test_fms1 (double x, double y, double z)
+{
+ return fma (x, y, -z);
+}
+
+float test_fms2 (float x, float y, float z)
+{
+ return fmaf (x, y, -z);
+}
+
+double test_fnms1 (double x, double y, double z)
+{
+ return fma (-x, y, -z);
+}
+
+float test_fnms2 (float x, float y, float z)
+{
+ return fmaf (-x, y, -z);
+}
+
+/* { dg-final { scan-assembler-times "fmadd\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fmadd\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fmsub\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fmsub\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fnmsub\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fnmsub\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fnmadd\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fnmadd\ts\[0-9\]" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c
new file mode 100644
index 0000000000..0bf1b86b79
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmla_intrinsic_1.c
@@ -0,0 +1,116 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+#define DELTA 0.0001
+
+extern double fabs (double);
+
+extern void abort (void);
+
+#define TEST_VMLA(q1, q2, size, in1_lanes, in2_lanes) \
+static void \
+test_vfma##q1##_lane##q2##_f##size (float##size##_t * res, \
+ const float##size##_t *in1, \
+ const float##size##_t *in2) \
+{ \
+ float##size##x##in1_lanes##_t a = vld1##q1##_f##size (res); \
+ float##size##x##in1_lanes##_t b = vld1##q1##_f##size (in1); \
+ float##size##x##in2_lanes##_t c; \
+ if (in2_lanes > 1) \
+ { \
+ c = vld1##q2##_f##size (in2); \
+ a = vfma##q1##_lane##q2##_f##size (a, b, c, 1); \
+ } \
+ else \
+ { \
+ c = vld1##q2##_f##size (in2 + 1); \
+ a = vfma##q1##_lane##q2##_f##size (a, b, c, 0); \
+ } \
+ vst1##q1##_f##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMLA ( , , width, n_half_lanes, n_half_lanes) \
+TEST_VMLA (q, , width, n_lanes, n_half_lanes) \
+TEST_VMLA ( , q, width, n_half_lanes, n_lanes) \
+TEST_VMLA (q, q, width, n_lanes, n_lanes) \
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (64, 2, 1)
+
+#define POOL2 {0.0, 1.0}
+#define POOL4 {0.0, 1.0, 2.0, 3.0}
+#define EMPTY2 {0.0, 0.0}
+#define EMPTY4 {0.0, 0.0, 0.0, 0.0}
+
+#define BUILD_TEST(size, lanes) \
+static void \
+test_f##size (void) \
+{ \
+ int i; \
+ float##size##_t pool[lanes] = POOL##lanes; \
+ float##size##_t res[lanes] = EMPTY##lanes; \
+ float##size##_t res2[lanes] = EMPTY##lanes; \
+ float##size##_t res3[lanes] = EMPTY##lanes; \
+ float##size##_t res4[lanes] = EMPTY##lanes; \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vfma_lane_f##size (res, pool, pool); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vfmaq_lane_f##size (res2, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res2[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vfma_laneq_f##size (res3, pool, pool); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res3[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vfmaq_laneq_f##size (res4, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res4[i] - pool[i]) > DELTA) \
+ abort (); \
+}
+
+BUILD_TEST (32, 4)
+BUILD_TEST (64, 2)
+
+int
+main (int argc, char **argv)
+{
+ test_f32 ();
+ test_f64 ();
+ return 0;
+}
+
+/* vfma_laneq_f32.
+ vfma_lane_f32. */
+/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vfmaq_lane_f32.
+ vfmaq_laneq_f32. */
+/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vfma_lane_f64. */
+/* { dg-final { scan-assembler-times "fmadd\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 1 } } */
+
+/* vfmaq_lane_f64.
+ vfma_laneq_f64.
+ vfmaq_laneq_f64. */
+/* { dg-final { scan-assembler-times "fmla\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d\\\[\[0-9\]+\\\]" 3 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c
new file mode 100644
index 0000000000..8cc2942f8f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmls_intrinsic_1.c
@@ -0,0 +1,117 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+#define DELTA 0.0001
+
+extern double fabs (double);
+
+extern void abort (void);
+
+#define TEST_VMLS(q1, q2, size, in1_lanes, in2_lanes) \
+static void \
+test_vfms##q1##_lane##q2##_f##size (float##size##_t * res, \
+ const float##size##_t *in1, \
+ const float##size##_t *in2) \
+{ \
+ float##size##x##in1_lanes##_t a = vld1##q1##_f##size (res); \
+ float##size##x##in1_lanes##_t b = vld1##q1##_f##size (in1); \
+ float##size##x##in2_lanes##_t c; \
+ if (in2_lanes > 1) \
+ { \
+ c = vld1##q2##_f##size (in2); \
+ a = vfms##q1##_lane##q2##_f##size (a, b, c, 1); \
+ } \
+ else \
+ { \
+ c = vld1##q2##_f##size (in2 + 1); \
+ a = vfms##q1##_lane##q2##_f##size (a, b, c, 0); \
+ } \
+ vst1##q1##_f##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMLS ( , , width, n_half_lanes, n_half_lanes) \
+TEST_VMLS (q, , width, n_lanes, n_half_lanes) \
+TEST_VMLS ( , q, width, n_half_lanes, n_lanes) \
+TEST_VMLS (q, q, width, n_lanes, n_lanes) \
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (64, 2, 1)
+
+#define POOL2 {0.0, 1.0}
+#define POOL4 {0.0, 1.0, 2.0, 3.0}
+#define EMPTY2 {0.0, 0.0}
+#define EMPTY4 {0.0, 0.0, 0.0, 0.0}
+
+#define BUILD_TEST(size, lanes) \
+static void \
+test_f##size (void) \
+{ \
+ int i; \
+ float##size##_t pool[lanes] = POOL##lanes; \
+ float##size##_t res[lanes] = EMPTY##lanes; \
+ float##size##_t res2[lanes] = EMPTY##lanes; \
+ float##size##_t res3[lanes] = EMPTY##lanes; \
+ float##size##_t res4[lanes] = EMPTY##lanes; \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vfms_lane_f##size (res, pool, pool); \
+ asm volatile ("" : :"Q" (res) : "memory"); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res[i] + pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ test_vfmsq_lane_f##size (res2, pool, pool); \
+ asm volatile ("" : :"Q" (res2) : "memory"); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res2[i] + pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ test_vfms_laneq_f##size (res3, pool, pool); \
+ asm volatile ("" : :"Q" (res3) : "memory"); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res3[i] + pool[i]) > DELTA) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ test_vfmsq_laneq_f##size (res4, pool, pool); \
+ asm volatile ("" : :"Q" (res4) : "memory"); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res4[i] + pool[i]) > DELTA) \
+ abort (); \
+}
+
+BUILD_TEST (32, 4)
+BUILD_TEST (64, 2)
+
+int
+main (int argc, char **argv)
+{
+ test_f32 ();
+ test_f64 ();
+ return 0;
+}
+
+/* vfms_laneq_f32.
+ vfms_lane_f32. */
+/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vfmsq_lane_f32.
+ vfmsq_laneq_f32. */
+/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vfms_lane_f64. */
+/* { dg-final { scan-assembler-times "fmsub\\td\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+\, d\[0-9\]+" 1 } } */
+
+/* vfmsq_lane_f64.
+ vfms_laneq_f64.
+ vfmsq_laneq_f64. */
+/* { dg-final { scan-assembler-times "fmls\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d\\\[\[0-9\]+\\\]" 3 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c b/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c
new file mode 100644
index 0000000000..7e4590afe6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmovd-zero.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (double *output)
+{
+ *output = 0.0;
+}
+
+/* { dg-final { scan-assembler "fmov\\td\[0-9\]+, xzr" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmovd.c b/gcc/testsuite/gcc.target/aarch64/fmovd.c
new file mode 100644
index 0000000000..c50e74e3f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmovd.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (double *output)
+{
+ *output = 4.25;
+}
+
+/* { dg-final { scan-assembler "fmov\\td\[0-9\]+, 4\\.25" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c b/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c
new file mode 100644
index 0000000000..5050ac3103
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmovf-zero.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (float *output)
+{
+ *output = 0.0;
+}
+
+/* { dg-final { scan-assembler "fmov\\ts\[0-9\]+, wzr" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmovf.c b/gcc/testsuite/gcc.target/aarch64/fmovf.c
new file mode 100644
index 0000000000..0a9e21517d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmovf.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (float *output)
+{
+ *output = 4.25;
+}
+
+/* { dg-final { scan-assembler "fmov\\ts\[0-9\]+, 4\\.25" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c
new file mode 100644
index 0000000000..f6e32f4bf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fmul_intrinsic_1.c
@@ -0,0 +1,116 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+#define DELTA 0.0001
+extern void abort (void);
+extern double fabs (double);
+
+#define TEST_VMUL(q1, q2, size, in1_lanes, in2_lanes) \
+static void \
+test_vmul##q1##_lane##q2##_f##size (float##size##_t * res, \
+ const float##size##_t *in1, \
+ const float##size##_t *in2) \
+{ \
+ float##size##x##in1_lanes##_t a = vld1##q1##_f##size (res); \
+ float##size##x##in1_lanes##_t b = vld1##q1##_f##size (in1); \
+ float##size##x##in2_lanes##_t c; \
+ if (in2_lanes > 1) \
+ { \
+ c = vld1##q2##_f##size (in2); \
+ a = vmul##q1##_lane##q2##_f##size (b, c, 1); \
+ } \
+ else \
+ { \
+ c = vld1##q2##_f##size (in2 + 1); \
+ a = vmul##q1##_lane##q2##_f##size (b, c, 0); \
+ } \
+ vst1##q1##_f##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMUL ( , , width, n_half_lanes, n_half_lanes) \
+TEST_VMUL (q, , width, n_lanes, n_half_lanes) \
+TEST_VMUL ( , q, width, n_half_lanes, n_lanes) \
+TEST_VMUL (q, q, width, n_lanes, n_lanes)
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (64, 2, 1)
+
+#define POOL2 {0.0, 1.0}
+#define POOL4 {0.0, 1.0, 2.0, 3.0}
+#define EMPTY2 {0.0, 0.0}
+#define EMPTY4 {0.0, 0.0, 0.0, 0.0}
+
+#define BUILD_TEST(size, lanes) \
+static void \
+test_f##size (void) \
+{ \
+ int i; \
+ float##size##_t pool[lanes] = POOL##lanes; \
+ float##size##_t res[lanes] = EMPTY##lanes; \
+ float##size##_t res2[lanes] = EMPTY##lanes; \
+ float##size##_t res3[lanes] = EMPTY##lanes; \
+ float##size##_t res4[lanes] = EMPTY##lanes; \
+ \
+ /* Avoid constant folding the multiplication. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmul_lane_f##size (res, pool, pool); \
+ /* Avoid fusing multiplication and subtraction. */ \
+ asm volatile ("" : :"Q" (res) : "memory"); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ test_vmulq_lane_f##size (res2, pool, pool); \
+ /* Avoid fusing multiplication and subtraction. */ \
+ asm volatile ("" : :"Q" (res2) : "memory"); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res2[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ test_vmul_laneq_f##size (res3, pool, pool); \
+ /* Avoid fusing multiplication and subtraction. */ \
+ asm volatile ("" : :"Q" (res3) : "memory"); \
+ for (i = 0; i < lanes / 2; i++) \
+ if (fabs (res3[i] - pool[i]) > DELTA) \
+ abort (); \
+ \
+ test_vmulq_laneq_f##size (res4, pool, pool); \
+ /* Avoid fusing multiplication and subtraction. */ \
+ asm volatile ("" : :"Q" (res4) : "memory"); \
+ for (i = 0; i < lanes; i++) \
+ if (fabs (res4[i] - pool[i]) > DELTA) \
+ abort (); \
+}
+
+BUILD_TEST (32, 4)
+BUILD_TEST (64, 2)
+
+int
+main (int argc, char **argv)
+{
+ test_f32 ();
+ test_f64 ();
+ return 0;
+}
+
+/* vmul_laneq_f32.
+ vmul_lane_f32. */
+/* { dg-final { scan-assembler-times "fmul\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vmulq_lane_f32.
+ vmulq_laneq_f32. */
+/* { dg-final { scan-assembler-times "fmul\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.s\\\[\[0-9\]+\\\]" 2 } } */
+
+/* vmul_lane_f64. */
+/* { dg-final { scan-assembler-times "fmul\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 } } */
+
+/* vmul_laneq_f64.
+ vmulq_lane_f64.
+ vmulq_laneq_f64. */
+/* { dg-final { scan-assembler-times "fmul\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 3 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/fnmadd-fastmath.c b/gcc/testsuite/gcc.target/aarch64/fnmadd-fastmath.c
new file mode 100644
index 0000000000..9c115df08e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/fnmadd-fastmath.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math" } */
+
+extern double fma (double, double, double);
+extern float fmaf (float, float, float);
+
+double test_fma1 (double x, double y, double z)
+{
+ return - fma (x, y, z);
+}
+
+float test_fma2 (float x, float y, float z)
+{
+ return - fmaf (x, y, z);
+}
+
+/* { dg-final { scan-assembler-times "fnmadd\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "fnmadd\ts\[0-9\]" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/frint.x b/gcc/testsuite/gcc.target/aarch64/frint.x
new file mode 100644
index 0000000000..1403740686
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/frint.x
@@ -0,0 +1,66 @@
+extern GPF SUFFIX(trunc) (GPF);
+extern GPF SUFFIX(ceil) (GPF);
+extern GPF SUFFIX(floor) (GPF);
+extern GPF SUFFIX(nearbyint) (GPF);
+extern GPF SUFFIX(rint) (GPF);
+extern GPF SUFFIX(round) (GPF);
+
+GPF test1a (GPF x)
+{
+ return SUFFIX(__builtin_trunc)(x);
+}
+
+GPF test1b (GPF x)
+{
+ return SUFFIX(trunc)(x);
+}
+
+GPF test2a (GPF x)
+{
+ return SUFFIX(__builtin_ceil)(x);
+}
+
+GPF test2b (GPF x)
+{
+ return SUFFIX(ceil)(x);
+}
+
+GPF test3a (GPF x)
+{
+ return SUFFIX(__builtin_floor)(x);
+}
+
+GPF test3b (GPF x)
+{
+ return SUFFIX(floor)(x);
+}
+
+GPF test4a (GPF x)
+{
+ return SUFFIX(__builtin_nearbyint)(x);
+}
+
+GPF test4b (GPF x)
+{
+ return SUFFIX(nearbyint)(x);
+}
+
+GPF test5a (GPF x)
+{
+ return SUFFIX(__builtin_rint)(x);
+}
+
+GPF test5b (GPF x)
+{
+ return SUFFIX(rint)(x);
+}
+
+GPF test6a (GPF x)
+{
+ return SUFFIX(__builtin_round)(x);
+}
+
+GPF test6b (GPF x)
+{
+ return SUFFIX(round)(x);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/frint_double.c b/gcc/testsuite/gcc.target/aarch64/frint_double.c
new file mode 100644
index 0000000000..96139496ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/frint_double.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF double
+#define SUFFIX(x) x
+
+#include "frint.x"
+
+/* { dg-final { scan-assembler-times "frintz\td\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintp\td\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintm\td\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frinti\td\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintx\td\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frinta\td\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/frint_float.c b/gcc/testsuite/gcc.target/aarch64/frint_float.c
new file mode 100644
index 0000000000..493ec37f94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/frint_float.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#define GPF float
+#define SUFFIX(x) x##f
+
+#include "frint.x"
+
+/* { dg-final { scan-assembler-times "frintz\ts\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintp\ts\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintm\ts\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frinti\ts\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frintx\ts\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "frinta\ts\[0-9\]" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/index.c b/gcc/testsuite/gcc.target/aarch64/index.c
new file mode 100644
index 0000000000..582771ba1c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/index.c
@@ -0,0 +1,111 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "\[us\]xtw\t" } } */
+/* { dg-final { scan-assembler-not "\[us\]bfiz\t" } } */
+/* { dg-final { scan-assembler-not "lsl\t" } } */
+
+int
+load_scaled_sxtw (int *arr, int i)
+{
+ return arr[arr[i]];
+}
+
+unsigned int
+load_scaled_uxtw (unsigned int *arr, unsigned int i)
+{
+ return arr[arr[i]];
+}
+
+void
+store_scaled_sxtw (int *arr, int i)
+{
+ arr[arr[i]] = 0;
+}
+
+void
+store_scaled_uxtw (unsigned int *arr, unsigned int i)
+{
+ arr[arr[i]] = 0;
+}
+
+int
+load_unscaled_sxtw (signed char *arr, int i)
+{
+ return arr[arr[i]];
+}
+
+unsigned int
+load_unscaled_uxtw (unsigned char *arr, unsigned int i)
+{
+ return arr[arr[i]];
+}
+
+void
+store_unscaled_sxtw (signed char *arr, int i)
+{
+ arr[arr[i]] = 0;
+}
+
+void
+store_unscaled_uxtw (unsigned char *arr, unsigned int i)
+{
+ arr[arr[i]] = 0;
+}
+
+
+
+int
+load_scaled_tmp_sxtw (int *arr, int i)
+{
+ int j = arr[i];
+ return arr[j];
+}
+
+unsigned int
+load_scaled_tmp_uxtw (unsigned int *arr, unsigned int i)
+{
+ unsigned int j = arr[i];
+ return arr[j];
+}
+
+void
+store_scaled_tmp_sxtw (int *arr, int i)
+{
+ int j = arr[i];
+ arr[j] = 0;
+}
+
+void
+store_scaled_tmp_uxtw (unsigned int *arr, unsigned int i)
+{
+ unsigned int j = arr[i];
+ arr[j] = 0;
+}
+
+int
+load_unscaled_tmp_sxtw (signed char *arr, int i)
+{
+ signed char j = arr[i];
+ return arr[j];
+}
+
+unsigned int
+load_unscaled_tmp_uxtw (unsigned char *arr, unsigned int i)
+{
+ unsigned char j = arr[i];
+ return arr[j];
+}
+
+void
+store_unscaled_tmp_sxtw (signed char *arr, int i)
+{
+ signed char j = arr[i];
+ arr[j] = 0;
+}
+
+void
+store_unscaled_tmp_uxtw (unsigned char *arr, unsigned int i)
+{
+ unsigned char j = arr[i];
+ arr[j] = 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/insv_1.c b/gcc/testsuite/gcc.target/aarch64/insv_1.c
new file mode 100644
index 0000000000..6e3c7f0e9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/insv_1.c
@@ -0,0 +1,85 @@
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+/* { dg-require-effective-target aarch64_little_endian } */
+
+extern void abort (void);
+
+typedef struct bitfield
+{
+ unsigned short eight: 8;
+ unsigned short four: 4;
+ unsigned short five: 5;
+ unsigned short seven: 7;
+ unsigned int sixteen: 16;
+} bitfield;
+
+bitfield
+bfi1 (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfi\tx\[0-9\]+, x\[0-9\]+, 0, 8" } } */
+ a.eight = 3;
+ return a;
+}
+
+bitfield
+bfi2 (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfi\tx\[0-9\]+, x\[0-9\]+, 16, 5" } } */
+ a.five = 7;
+ return a;
+}
+
+bitfield
+movk (bitfield a)
+{
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x1d6b, lsl 32" } } */
+ a.sixteen = 7531;
+ return a;
+}
+
+bitfield
+set1 (bitfield a)
+{
+ /* { dg-final { scan-assembler "orr\tx\[0-9\]+, x\[0-9\]+, 2031616" } } */
+ a.five = 0x1f;
+ return a;
+}
+
+bitfield
+set0 (bitfield a)
+{
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, -2031617" } } */
+ a.five = 0;
+ return a;
+}
+
+
+int
+main (int argc, char** argv)
+{
+ static bitfield a;
+ bitfield b = bfi1 (a);
+ bitfield c = bfi2 (b);
+ bitfield d = movk (c);
+
+ if (d.eight != 3)
+ abort ();
+
+ if (d.five != 7)
+ abort ();
+
+ if (d.sixteen != 7531)
+ abort ();
+
+ d = set1 (d);
+ if (d.five != 0x1f)
+ abort ();
+
+ d = set0 (d);
+ if (d.five != 0)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/insv_2.c b/gcc/testsuite/gcc.target/aarch64/insv_2.c
new file mode 100644
index 0000000000..a7691a32f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/insv_2.c
@@ -0,0 +1,85 @@
+/* { dg-do run { target aarch64*-*-* } } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+/* { dg-require-effective-target aarch64_big_endian } */
+
+extern void abort (void);
+
+typedef struct bitfield
+{
+ unsigned short eight: 8;
+ unsigned short four: 4;
+ unsigned short five: 5;
+ unsigned short seven: 7;
+ unsigned int sixteen: 16;
+} bitfield;
+
+bitfield
+bfi1 (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfi\tx\[0-9\]+, x\[0-9\]+, 56, 8" } } */
+ a.eight = 3;
+ return a;
+}
+
+bitfield
+bfi2 (bitfield a)
+{
+ /* { dg-final { scan-assembler "bfi\tx\[0-9\]+, x\[0-9\]+, 43, 5" } } */
+ a.five = 7;
+ return a;
+}
+
+bitfield
+movk (bitfield a)
+{
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x1d6b, lsl 16" } } */
+ a.sixteen = 7531;
+ return a;
+}
+
+bitfield
+set1 (bitfield a)
+{
+ /* { dg-final { scan-assembler "orr\tx\[0-9\]+, x\[0-9\]+, 272678883688448" } } */
+ a.five = 0x1f;
+ return a;
+}
+
+bitfield
+set0 (bitfield a)
+{
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, -272678883688449" } } */
+ a.five = 0;
+ return a;
+}
+
+
+int
+main (int argc, char** argv)
+{
+ static bitfield a;
+ bitfield b = bfi1 (a);
+ bitfield c = bfi2 (b);
+ bitfield d = movk (c);
+
+ if (d.eight != 3)
+ abort ();
+
+ if (d.five != 7)
+ abort ();
+
+ if (d.sixteen != 7531)
+ abort ();
+
+ d = set1 (d);
+ if (d.five != 0x1f)
+ abort ();
+
+ d = set0 (d);
+ if (d.five != 0)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c b/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
new file mode 100644
index 0000000000..523941d479
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/madd_after_asm_1.c
@@ -0,0 +1,14 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -mfix-cortex-a53-835769" } */
+
+int
+test (int a, double b, int c, int d, int e)
+{
+ double result;
+ __asm__ __volatile ("// %0, %1"
+ : "=w" (result)
+ : "0" (b)
+ : /* No clobbers */
+ );
+ return c * d + e;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mla_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/mla_intrinsic_1.c
new file mode 100644
index 0000000000..fce4138735
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mla_intrinsic_1.c
@@ -0,0 +1,84 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define MAPs(size, xx) int##size##xx##_t
+#define MAPu(size, xx) uint##size##xx##_t
+
+
+#define TEST_VMLA(q, su, size, in1_lanes, in2_lanes) \
+static void \
+test_vmlaq_lane##q##_##su##size (MAP##su (size, ) * res, \
+ const MAP##su(size, ) *in1, \
+ const MAP##su(size, ) *in2) \
+{ \
+ MAP##su (size, x##in1_lanes) a = vld1q_##su##size (res); \
+ MAP##su (size, x##in1_lanes) b = vld1q_##su##size (in1); \
+ MAP##su (size, x##in2_lanes) c = vld1##q##_##su##size (in2); \
+ a = vmlaq_lane##q##_##su##size (a, b, c, 1); \
+ vst1q_##su##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMLA (, s, width, n_lanes, n_half_lanes) \
+TEST_VMLA (q, s, width, n_lanes, n_lanes) \
+TEST_VMLA (, u, width, n_lanes, n_half_lanes) \
+TEST_VMLA (q, u, width, n_lanes, n_lanes) \
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (16, 8, 4)
+
+#define POOL4 {0, 1, 2, 3}
+#define POOL8 {0, 1, 2, 3, 4, 5, 6, 7}
+#define EMPTY4 {0, 0, 0, 0}
+#define EMPTY8 {0, 0, 0, 0, 0, 0, 0, 0}
+
+#define BUILD_TEST(su, size, lanes) \
+static void \
+test_##su##size (void) \
+{ \
+ int i; \
+ MAP##su (size,) pool[lanes] = POOL##lanes; \
+ MAP##su (size,) res[lanes] = EMPTY##lanes; \
+ MAP##su (size,) res2[lanes] = EMPTY##lanes; \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmlaq_lane_##su##size (res, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res[i] != pool[i]) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmlaq_laneq_##su##size (res2, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res2[i] != pool[i]) \
+ abort (); \
+}
+
+#undef BUILD_VARS
+#define BUILD_VARS(size, lanes) \
+BUILD_TEST (s, size, lanes) \
+BUILD_TEST (u, size, lanes)
+
+BUILD_VARS (32, 4)
+BUILD_VARS (16, 8)
+
+int
+main (int argc, char **argv)
+{
+ test_s32 ();
+ test_u32 ();
+ test_s16 ();
+ test_u16 ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "mla\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { scan-assembler-times "mla\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h, v\[0-9\]+\.8h\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mls_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/mls_intrinsic_1.c
new file mode 100644
index 0000000000..8bf95b641c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mls_intrinsic_1.c
@@ -0,0 +1,89 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define MAPs(size, xx) int##size##xx##_t
+#define MAPu(size, xx) uint##size##xx##_t
+
+
+#define TEST_VMLS(q, su, size, in1_lanes, in2_lanes) \
+static void \
+test_vmlsq_lane##q##_##su##size (MAP##su (size, ) * res, \
+ const MAP##su(size, ) *in1, \
+ const MAP##su(size, ) *in2) \
+{ \
+ MAP##su (size, x##in1_lanes) a = vld1q_##su##size (res); \
+ MAP##su (size, x##in1_lanes) b = vld1q_##su##size (in1); \
+ MAP##su (size, x##in2_lanes) c = vld1##q##_##su##size (in2); \
+ a = vmlsq_lane##q##_##su##size (a, b, c, 1); \
+ vst1q_##su##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMLS (, s, width, n_lanes, n_half_lanes) \
+TEST_VMLS (q, s, width, n_lanes, n_lanes) \
+TEST_VMLS (, u, width, n_lanes, n_half_lanes) \
+TEST_VMLS (q, u, width, n_lanes, n_lanes) \
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (16, 8, 4)
+
+#define MAP_OPs +
+#define MAP_OPu -
+
+#define POOL4 {0, 1, 2, 3}
+#define POOL8 {0, 1, 2, 3, 4, 5, 6, 7}
+#define EMPTY4s {0, 0, 0, 0}
+#define EMPTY8s {0, 0, 0, 0, 0, 0, 0, 0}
+#define EMPTY4u {0, 2, 4, 6}
+#define EMPTY8u {0, 2, 4, 6, 8, 10, 12, 14}
+
+#define BUILD_TEST(su, size, lanes) \
+static void \
+test_##su##size (void) \
+{ \
+ int i; \
+ MAP##su (size,) pool[lanes] = POOL##lanes; \
+ MAP##su (size,) res[lanes] = EMPTY##lanes##su; \
+ MAP##su (size,) res2[lanes] = EMPTY##lanes##su; \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmlsq_lane_##su##size (res, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res[i] MAP_OP##su pool[i] != 0) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmlsq_laneq_##su##size (res2, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res2[i] MAP_OP##su pool[i] != 0) \
+ abort (); \
+}
+
+#undef BUILD_VARS
+#define BUILD_VARS(size, lanes) \
+BUILD_TEST (s, size, lanes) \
+BUILD_TEST (u, size, lanes)
+
+BUILD_VARS (32, 4)
+BUILD_VARS (16, 8)
+
+int
+main (int argc, char **argv)
+{
+ test_s32 ();
+ test_u32 ();
+ test_s16 ();
+ test_u16 ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "mls\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { scan-assembler-times "mls\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h, v\[0-9\]+\.8h\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/mneg-1.c b/gcc/testsuite/gcc.target/aarch64/mneg-1.c
new file mode 100644
index 0000000000..618854a6a5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mneg-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int r;
+
+void test (int a, int b)
+{
+ /* { dg-final { scan-assembler "mneg\tw\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = (-a) * b;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mneg-2.c b/gcc/testsuite/gcc.target/aarch64/mneg-2.c
new file mode 100644
index 0000000000..25f817b9c5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mneg-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int r;
+
+void test (int a, int b)
+{
+ /* { dg-final { scan-assembler "mneg\tw\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = a * (-b);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mneg-3.c b/gcc/testsuite/gcc.target/aarch64/mneg-3.c
new file mode 100644
index 0000000000..d9a135465a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mneg-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int r;
+
+void test (int a, int b)
+{
+ /* { dg-final { scan-assembler "mneg\tw\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = - (a * b);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mnegl-1.c b/gcc/testsuite/gcc.target/aarch64/mnegl-1.c
new file mode 100644
index 0000000000..b45debbc26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mnegl-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long long r;
+
+void test_signed (int a, int b)
+{
+ /* { dg-final { scan-assembler "smnegl\tx\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = (-((long long) a)) * ((long long) b);
+}
+
+void test_unsigned (unsigned int a, unsigned int b)
+{
+ /* { dg-final { scan-assembler "umnegl\tx\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = (-((long long) a)) * ((long long) b);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/mnegl-2.c b/gcc/testsuite/gcc.target/aarch64/mnegl-2.c
new file mode 100644
index 0000000000..1c5dc75819
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mnegl-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+long long r;
+
+void test_signed (int a, int b)
+{
+ /* { dg-final { scan-assembler "smnegl\tx\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = ((long long) a) * (-((long long) b));
+}
+
+void test_unsigned (unsigned int a, unsigned int b)
+{
+ /* { dg-final { scan-assembler "umnegl\tx\[0-9\]*, w\[0-9\]*, w\[0-9\]*\n" } } */
+ r = ((long long) a) * (-((long long) b));
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/movdi_1.c b/gcc/testsuite/gcc.target/aarch64/movdi_1.c
new file mode 100644
index 0000000000..a22378db00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/movdi_1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-inline" } */
+
+#include <arm_neon.h>
+
+void
+foo1 (uint64_t *a)
+{
+ uint64x1_t val18;
+ uint32x2_t val19;
+ uint64x1_t val20;
+ val19 = vcreate_u32 (0x800000004cf3dffbUL);
+ val20 = vrsra_n_u64 (val18, vreinterpret_u64_u32 (val19), 34);
+ vst1_u64 (a, val20);
+}
+
+void
+foo2 (uint64_t *a)
+{
+ uint64x1_t val18;
+ uint32x2_t val19;
+ uint64x1_t val20;
+ val19 = vcreate_u32 (0xdffbUL);
+ val20 = vrsra_n_u64 (val18, vreinterpret_u64_u32 (val19), 34);
+ vst1_u64 (a, val20);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/movi_1.c b/gcc/testsuite/gcc.target/aarch64/movi_1.c
new file mode 100644
index 0000000000..e2842b39e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/movi_1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+dummy (short* b)
+{
+ /* { dg-final { scan-assembler "movi\tv\[0-9\]+\.4h, 0x4, lsl 8" } } */
+ /* { dg-final { scan-assembler-not "movi\tv\[0-9\]+\.4h, 0x400" } } */
+ /* { dg-final { scan-assembler-not "movi\tv\[0-9\]+\.4h, 1024" } } */
+ register short x asm ("h8") = 1024;
+ asm volatile ("" : : "w" (x));
+ *b = x;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/movk.c b/gcc/testsuite/gcc.target/aarch64/movk.c
new file mode 100644
index 0000000000..e4b22098c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/movk.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+long long int
+dummy_number_generator ()
+{
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xefff, lsl 16" } } */
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xc4cc, lsl 32" } } */
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0xfffe, lsl 48" } } */
+ return -346565474575675;
+}
+
+int
+main (void)
+{
+
+ long long int num = dummy_number_generator ();
+ if (num > 0)
+ abort ();
+
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x4667, lsl 16" } } */
+ /* { dg-final { scan-assembler "movk\tx\[0-9\]+, 0x7a3d, lsl 32" } } */
+ if (num / 69313094915135 != -5)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/mul_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/mul_intrinsic_1.c
new file mode 100644
index 0000000000..dabe10e15e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/mul_intrinsic_1.c
@@ -0,0 +1,83 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define MAPs(size, xx) int##size##xx##_t
+#define MAPu(size, xx) uint##size##xx##_t
+
+
+#define TEST_VMUL(q, su, size, in1_lanes, in2_lanes) \
+static void \
+test_vmulq_lane##q##_##su##size (MAP##su (size, ) * res, \
+ const MAP##su(size, ) *in1, \
+ const MAP##su(size, ) *in2) \
+{ \
+ MAP##su (size, x##in1_lanes) a = vld1q_##su##size (in1); \
+ MAP##su (size, x##in2_lanes) b = vld1##q##_##su##size (in2); \
+ a = vmulq_lane##q##_##su##size (a, b, 1); \
+ vst1q_##su##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VMUL (, s, width, n_lanes, n_half_lanes) \
+TEST_VMUL (q, s, width, n_lanes, n_lanes) \
+TEST_VMUL (, u, width, n_lanes, n_half_lanes) \
+TEST_VMUL (q, u, width, n_lanes, n_lanes) \
+
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (16, 8, 4)
+
+#define POOL4 {0, 1, 2, 3}
+#define POOL8 {0, 1, 2, 3, 4, 5, 6, 7}
+#define EMPTY4 {0, 0, 0, 0}
+#define EMPTY8 {0, 0, 0, 0, 0, 0, 0, 0}
+
+#define BUILD_TEST(su, size, lanes) \
+static void \
+test_##su##size (void) \
+{ \
+ int i; \
+ MAP##su (size,) pool[lanes] = POOL##lanes; \
+ MAP##su (size,) res[lanes] = EMPTY##lanes; \
+ MAP##su (size,) res2[lanes] = EMPTY##lanes; \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmulq_lane_##su##size (res, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res[i] != pool[i]) \
+ abort (); \
+ \
+ /* Forecfully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vmulq_laneq_##su##size (res2, pool, pool); \
+ for (i = 0; i < lanes; i++) \
+ if (res2[i] != pool[i]) \
+ abort (); \
+}
+
+#undef BUILD_VARS
+#define BUILD_VARS(size, lanes) \
+BUILD_TEST (s, size, lanes) \
+BUILD_TEST (u, size, lanes)
+
+BUILD_VARS (32, 4)
+BUILD_VARS (16, 8)
+
+int
+main (int argc, char **argv)
+{
+ test_s32 ();
+ test_u32 ();
+ test_s16 ();
+ test_u16 ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "mul\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.s\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { scan-assembler-times "mul\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h, v\[0-9\]+\.h\\\[\[0-9\]+\\\]" 4 } } */
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/narrow_high-intrinsics.c b/gcc/testsuite/gcc.target/aarch64/narrow_high-intrinsics.c
new file mode 100644
index 0000000000..0f23cc9c7b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/narrow_high-intrinsics.c
@@ -0,0 +1,125 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+
+#define TWO(name, rettype, rmwtype, intype, fs) \
+ rettype test_ ## name ## _ ## fs \
+ (rmwtype a, intype b, intype c) \
+ { \
+ return name ## _ ## fs (a, b, c); \
+ }
+
+TWO (vsubhn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+TWO (vsubhn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+TWO (vsubhn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+TWO (vsubhn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWO (vsubhn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWO (vsubhn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWO (vaddhn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+TWO (vaddhn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+TWO (vaddhn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+TWO (vaddhn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWO (vaddhn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWO (vaddhn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWO (vrsubhn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+TWO (vrsubhn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+TWO (vrsubhn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+TWO (vrsubhn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWO (vrsubhn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWO (vrsubhn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWO (vraddhn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+TWO (vraddhn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+TWO (vraddhn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+TWO (vraddhn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWO (vraddhn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWO (vraddhn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+#define TWOn(name, rettype, rmwtype, intype, fs) \
+ rettype test_ ## name ## _ ## fs \
+ (rmwtype a, intype b) \
+ { \
+ return name ## _ ## fs (a, b, 4); \
+ }
+
+TWOn (vrshrn_high_n, int8x16_t, int8x8_t, int16x8_t, s16)
+TWOn (vrshrn_high_n, int16x8_t, int16x4_t, int32x4_t, s32)
+TWOn (vrshrn_high_n, int32x4_t, int32x2_t, int64x2_t, s64)
+TWOn (vrshrn_high_n, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWOn (vrshrn_high_n, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWOn (vrshrn_high_n, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWOn (vshrn_high_n, int8x16_t, int8x8_t, int16x8_t, s16)
+TWOn (vshrn_high_n, int16x8_t, int16x4_t, int32x4_t, s32)
+TWOn (vshrn_high_n, int32x4_t, int32x2_t, int64x2_t, s64)
+TWOn (vshrn_high_n, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWOn (vshrn_high_n, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWOn (vshrn_high_n, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWOn (vqshrun_high_n, uint8x16_t, uint8x8_t, int16x8_t, s16)
+TWOn (vqshrun_high_n, uint16x8_t, uint16x4_t, int32x4_t, s32)
+TWOn (vqshrun_high_n, uint32x4_t, uint32x2_t, int64x2_t, s64)
+
+TWOn (vqrshrun_high_n, uint8x16_t, uint8x8_t, int16x8_t, s16)
+TWOn (vqrshrun_high_n, uint16x8_t, uint16x4_t, int32x4_t, s32)
+TWOn (vqrshrun_high_n, uint32x4_t, uint32x2_t, int64x2_t, s64)
+
+TWOn (vqshrn_high_n, int8x16_t, int8x8_t, int16x8_t, s16)
+TWOn (vqshrn_high_n, int16x8_t, int16x4_t, int32x4_t, s32)
+TWOn (vqshrn_high_n, int32x4_t, int32x2_t, int64x2_t, s64)
+TWOn (vqshrn_high_n, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWOn (vqshrn_high_n, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWOn (vqshrn_high_n, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+TWOn (vqrshrn_high_n, int8x16_t, int8x8_t, int16x8_t, s16)
+TWOn (vqrshrn_high_n, int16x8_t, int16x4_t, int32x4_t, s32)
+TWOn (vqrshrn_high_n, int32x4_t, int32x2_t, int64x2_t, s64)
+TWOn (vqrshrn_high_n, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+TWOn (vqrshrn_high_n, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+TWOn (vqrshrn_high_n, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+#define ONE(name, rettype, rmwtype, intype, fs) \
+ rettype test_ ## name ## _ ## fs \
+ (rmwtype a, intype b) \
+ { \
+ return name ## _ ## fs (a, b); \
+ }
+
+ONE (vqmovn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+ONE (vqmovn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+ONE (vqmovn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+ONE (vqmovn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+ONE (vqmovn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+ONE (vqmovn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+ONE (vqmovun_high, uint8x16_t, uint8x8_t, int16x8_t, s16)
+ONE (vqmovun_high, uint16x8_t, uint16x4_t, int32x4_t, s32)
+ONE (vqmovun_high, uint32x4_t, uint32x2_t, int64x2_t, s64)
+
+ONE (vmovn_high, int8x16_t, int8x8_t, int16x8_t, s16)
+ONE (vmovn_high, int16x8_t, int16x4_t, int32x4_t, s32)
+ONE (vmovn_high, int32x4_t, int32x2_t, int64x2_t, s64)
+ONE (vmovn_high, uint8x16_t, uint8x8_t, uint16x8_t, u16)
+ONE (vmovn_high, uint16x8_t, uint16x4_t, uint32x4_t, u32)
+ONE (vmovn_high, uint32x4_t, uint32x2_t, uint64x2_t, u64)
+
+
+/* { dg-final { scan-assembler-times "\\tsubhn2 v" 6} } */
+/* { dg-final { scan-assembler-times "\\taddhn2\\tv" 6} } */
+/* { dg-final { scan-assembler-times "rsubhn2 v" 6} } */
+/* { dg-final { scan-assembler-times "raddhn2\\tv" 6} } */
+/* { dg-final { scan-assembler-times "\\trshrn2 v" 6} } */
+/* { dg-final { scan-assembler-times "\\tshrn2 v" 6} } */
+/* { dg-final { scan-assembler-times "sqshrun2 v" 3} } */
+/* { dg-final { scan-assembler-times "sqrshrun2 v" 3} } */
+/* { dg-final { scan-assembler-times "sqshrn2 v" 3} } */
+/* { dg-final { scan-assembler-times "uqshrn2 v" 3} } */
+/* { dg-final { scan-assembler-times "sqrshrn2 v" 3} } */
+/* { dg-final { scan-assembler-times "uqrshrn2 v" 3} } */
+/* { dg-final { scan-assembler-times "uqxtn2 v" 3} } */
+/* { dg-final { scan-assembler-times "sqxtn2 v" 3} } */
+/* { dg-final { scan-assembler-times "sqxtun2 v" 3} } */
+/* { dg-final { scan-assembler-times "\\txtn2 v" 6} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/neg_1.c b/gcc/testsuite/gcc.target/aarch64/neg_1.c
new file mode 100644
index 0000000000..04b0fdd231
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/neg_1.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline --save-temps" } */
+
+extern void abort (void);
+
+long long
+neg64 (long long a)
+{
+ /* { dg-final { scan-assembler "neg\tx\[0-9\]+" } } */
+ return 0 - a;
+}
+
+long long
+neg64_in_dreg (long long a)
+{
+ /* { dg-final { scan-assembler "neg\td\[0-9\]+, d\[0-9\]+" } } */
+ register long long x asm ("d8") = a;
+ register long long y asm ("d9");
+ asm volatile ("" : : "w" (x));
+ y = 0 - x;
+ asm volatile ("" : : "w" (y));
+ return y;
+}
+
+int
+neg32 (int a)
+{
+ /* { dg-final { scan-assembler "neg\tw\[0-9\]+" } } */
+ return 0 - a;
+}
+
+int
+neg32_in_sreg (int a)
+{
+ /* { dg-final { scan-assembler "neg\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+ register int x asm ("s8") = a;
+ register int y asm ("s9");
+ asm volatile ("" : : "w" (x));
+ y = 0 - x;
+ asm volatile ("" : : "w" (y));
+ return y;
+}
+
+int
+main (void)
+{
+ long long a;
+ int b;
+ a = 61;
+ b = 313;
+
+ if (neg64 (a) != -61)
+ abort ();
+
+ if (neg64_in_dreg (a) != -61)
+ abort ();
+
+ if (neg32 (b) != -313)
+ abort ();
+
+ if (neg32_in_sreg (b) != -313)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/negs.c b/gcc/testsuite/gcc.target/aarch64/negs.c
new file mode 100644
index 0000000000..1c23041eae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/negs.c
@@ -0,0 +1,108 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+extern void abort (void);
+int z;
+
+int
+negs_si_test1 (int a, int b, int c)
+{
+ int d = -b;
+
+ /* { dg-final { scan-assembler "negs\tw\[0-9\]+, w\[0-9\]+" } } */
+ if (d < 0)
+ return a + c;
+
+ z = d;
+ return b + c + d;
+}
+
+int
+negs_si_test3 (int a, int b, int c)
+{
+ int d = -(b) << 3;
+
+ /* { dg-final { scan-assembler "negs\tw\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+
+ z = d;
+ return b + c + d;
+}
+
+typedef long long s64;
+s64 zz;
+
+s64
+negs_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = -b;
+
+ /* { dg-final { scan-assembler "negs\tx\[0-9\]+, x\[0-9\]+" } } */
+ if (d < 0)
+ return a + c;
+
+ zz = d;
+ return b + c + d;
+}
+
+s64
+negs_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = -(b) << 3;
+
+ /* { dg-final { scan-assembler "negs\tx\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+
+ zz = d;
+ return b + c + d;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = negs_si_test1 (2, 12, 5);
+ if (x != 7)
+ abort ();
+
+ x = negs_si_test1 (1, 2, 32);
+ if (x != 33)
+ abort ();
+
+ x = negs_si_test3 (13, 14, 5);
+ if (x != -93)
+ abort ();
+
+ x = negs_si_test3 (15, 21, 2);
+ if (x != -145)
+ abort ();
+
+ y = negs_di_test1 (0x20202020ll,
+ 0x65161611ll,
+ 0x42434243ll);
+ if (y != 0x62636263ll)
+ abort ();
+
+ y = negs_di_test1 (0x1010101010101ll,
+ 0x123456789abcdll,
+ 0x5555555555555ll);
+ if (y != 0x6565656565656ll)
+ abort ();
+
+ y = negs_di_test3 (0x62523781ll,
+ 0x64234978ll,
+ 0x12345123ll);
+ if (y != 0xfffffffd553d4edbll)
+ abort ();
+
+ y = negs_di_test3 (0x763526268ll,
+ 0x101010101ll,
+ 0x222222222ll);
+ if (y != 0xfffffffb1b1b1b1bll)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/ngc.c b/gcc/testsuite/gcc.target/aarch64/ngc.c
new file mode 100644
index 0000000000..336432160c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ngc.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+typedef unsigned int u32;
+
+u32
+ngc_si (u32 a, u32 b, u32 c, u32 d)
+{
+ a = -b - (c < d);
+ return a;
+}
+
+typedef unsigned long long u64;
+
+u64
+ngc_si_tst (u64 a, u32 b, u32 c, u32 d)
+{
+ a = -b - (c < d);
+ return a;
+}
+
+u64
+ngc_di (u64 a, u64 b, u64 c, u64 d)
+{
+ a = -b - (c < d);
+ return a;
+}
+
+int
+main ()
+{
+ int x;
+ u64 y;
+
+ x = ngc_si (29, 4, 5, 4);
+ if (x != -4)
+ abort ();
+
+ x = ngc_si (1024, 2, 20, 13);
+ if (x != -2)
+ abort ();
+
+ y = ngc_si_tst (0x130000029ll, 32, 50, 12);
+ if (y != 0xffffffe0)
+ abort ();
+
+ y = ngc_si_tst (0x5000500050005ll, 21, 2, 14);
+ if (y != 0xffffffea)
+ abort ();
+
+ y = ngc_di (0x130000029ll, 0x320000004ll, 0x505050505ll, 0x123123123ll);
+ if (y != 0xfffffffcdffffffc)
+ abort ();
+
+ y = ngc_di (0x5000500050005ll,
+ 0x2111211121112ll, 0x0000000002020ll, 0x1414575046477ll);
+ if (y != 0xfffdeeedeeedeeed)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "ngc\tw\[0-9\]+, w\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler-times "ngc\tx\[0-9\]+, x\[0-9\]+" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c b/gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c
new file mode 100644
index 0000000000..3109d9d4e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pic-constantpool1.c
@@ -0,0 +1,30 @@
+/* { dg-options "-O2 -mcmodel=small -fPIC" } */
+/* { dg-do compile } */
+
+extern int __finite (double __value) __attribute__ ((__nothrow__)) __attribute__ ((__const__));
+int
+__ecvt_r (value, ndigit, decpt, sign, buf, len)
+ double value;
+ int ndigit, *decpt, *sign;
+ char *buf;
+{
+ if ((sizeof (value) == sizeof (float) ? __finitef (value) : __finite (value)) && value != 0.0)
+ {
+ double d;
+ double f = 1.0;
+ d = -value;
+ if (d < 1.0e-307)
+ {
+ do
+ {
+ f *= 10.0;
+ }
+ while (d * f < 1.0);
+ }
+ }
+ if (ndigit <= 0 && len > 0)
+ {
+ buf[0] = '\0';
+ *sign = (sizeof (value) == sizeof (float) ? __finitef (value) : __finite (value)) ? (sizeof (value) == sizeof (float) ? __signbitf (value) : __signbit (value)) != 0 : 0;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c b/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
new file mode 100644
index 0000000000..f277a52857
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pic-symrefplus.c
@@ -0,0 +1,128 @@
+/* { dg-options "-O2 -mcmodel=small -fPIC -fno-builtin" } */
+/* { dg-do compile } */
+
+typedef long unsigned int size_t;
+enum
+{
+ __LC_TIME = 2,
+};
+enum
+{
+ ABDAY_1 = (((__LC_TIME) << 16) | (0)),
+ DAY_1,
+ ABMON_1,
+ MON_1,
+ D_T_FMT,
+};
+typedef struct __locale_struct
+{
+ struct locale_data *__locales[13];
+} *__locale_t;
+struct tm
+{
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+};
+struct locale_data
+{
+ const char *name;
+ struct
+ {
+ const char *string;
+ }
+ values [];
+};
+extern const struct locale_data _nl_C_LC_TIME __attribute__ ((visibility ("hidden")));
+char *
+__strptime_internal (rp, fmt, tmp, statep , locale)
+ const char *rp;
+ const char *fmt;
+ __locale_t locale;
+ void *statep;
+{
+ struct locale_data *const current = locale->__locales[__LC_TIME];
+ const char *rp_backup;
+ const char *rp_longest;
+ int cnt;
+ size_t val;
+ enum ptime_locale_status { not, loc, raw } decided_longest;
+ struct __strptime_state
+ {
+ enum ptime_locale_status decided : 2;
+ } s;
+ struct tm tmb;
+ struct tm *tm;
+ if (statep == ((void *)0))
+ {
+ memset (&s, 0, sizeof (s));
+ }
+ {
+ tm = &tmb;
+ }
+ while (*fmt != '\0')
+ {
+ if (*fmt != '%')
+ {
+ if (*fmt++ != *rp++) return ((void *)0);
+ continue;
+ }
+ if (statep != ((void *)0))
+ {
+ ++fmt;
+ }
+ rp_backup = rp;
+ switch (*fmt++)
+ {
+ case '%':
+ for (cnt = 0; cnt < 7; ++cnt)
+ {
+ const char *trp;
+ if (s.decided !=raw)
+ {
+ if (({ size_t len = strlen ((current->values[((int) (DAY_1 + cnt) & 0xffff)].string)); int result = __strncasecmp_l (((current->values[((int) (DAY_1 + cnt) & 0xffff)].string)), (trp), len, locale) == 0; if (result) (trp) += len; result; })
+ && trp > rp_longest)
+ {
+ }
+ if (({ size_t len = strlen ((current->values[((int) (ABDAY_1 + cnt) & 0xffff)].string)); int result = __strncasecmp_l (((current->values[((int) (ABDAY_1 + cnt) & 0xffff)].string)), (trp), len, locale) == 0; if (result) (trp) += len; result; })
+ && trp > rp_longest)
+ {
+ }
+ }
+ if (s.decided != loc
+ && (((trp = rp, ({ size_t len = strlen ((&_nl_C_LC_TIME.values[((int) (DAY_1) & 0xffff)].string)[cnt]); int result = __strncasecmp_l (((&_nl_C_LC_TIME.values[((int) (DAY_1) & 0xffff)].string)[cnt]), (trp), len, locale) == 0; if (result) (trp) += len; result; }))
+ && trp > rp_longest)
+ || ((trp = rp, ({ size_t len = strlen ((&_nl_C_LC_TIME.values[((int) (ABDAY_1) & 0xffff)].string)[cnt]); int result = __strncasecmp_l (((&_nl_C_LC_TIME.values[((int) (ABDAY_1) & 0xffff)].string)[cnt]), (rp), len, locale) == 0; if (result) (rp) += len; result; }))
+ && trp > rp_longest)))
+ {
+ }
+ }
+ {
+ const char *trp;
+ if (s.decided != loc
+ && (((trp = rp, ({ size_t len = strlen ((&_nl_C_LC_TIME.values[((int) (MON_1) & 0xffff)].string)[cnt]); int result = __strncasecmp_l (((&_nl_C_LC_TIME.values[((int) (MON_1) & 0xffff)].string)[cnt]), (trp), len, locale) == 0; if (result) (trp) += len; result; }))
+ && trp > rp_longest)
+ || ((trp = rp, ({ size_t len = strlen ((&_nl_C_LC_TIME.values[((int) (ABMON_1) & 0xffff)].string)[cnt]); int result = __strncasecmp_l (((&_nl_C_LC_TIME.values[((int) (ABMON_1) & 0xffff)].string)[cnt]), (trp), len, locale) == 0; if (result) (trp) += len; result; }))
+ && trp > rp_longest)))
+ {
+ }
+ }
+ case 'c':
+ {
+ if (!(*((current->values[((int) (D_T_FMT) & 0xffff)].string)) != '\0' && (rp = __strptime_internal (rp, ((current->values[((int) (D_T_FMT) & 0xffff)].string)), tm, &s , locale)) != ((void *)0)))
+ {
+ rp = rp_backup;
+ }
+ }
+ case 'C':
+ do { int __n = 2; val = 0; while (*rp == ' ') ++rp; if (*rp < '0' || *rp > '9') return ((void *)0); do { val *= 10; val += *rp++ - '0'; } while (--__n > 0 && val * 10 <= 99 && *rp >= '0' && *rp <= '9'); if (val < 0 || val > 99) return ((void *)0); } while (0);
+ case 'F':
+ if (!(*("%Y-%m-%d") != '\0' && (rp = __strptime_internal (rp, ("%Y-%m-%d"), tm, &s , locale)) != ((void *)0)))
+ tm->tm_hour = val % 12;
+ }
+ }
+}
+char *
+__strptime_l (buf, format, tm , locale)
+{
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pmull_1.c b/gcc/testsuite/gcc.target/aarch64/pmull_1.c
new file mode 100644
index 0000000000..bccaec1750
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pmull_1.c
@@ -0,0 +1,23 @@
+
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+crypto" } */
+
+#include "arm_neon.h"
+
+poly128_t
+test_vmull_p64 (poly64_t a, poly64_t b)
+{
+ return vmull_p64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "pmull\\tv" 1 } } */
+
+poly128_t
+test_vmull_high_p64 (poly64x2_t a, poly64x2_t b)
+{
+ return vmull_high_p64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "pmull2\\tv" 1 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr58460.c b/gcc/testsuite/gcc.target/aarch64/pr58460.c
new file mode 100644
index 0000000000..a7e149a371
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr58460.c
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O" } */
+extern unsigned long x1;
+
+char *
+f (char *a, char *b)
+{
+ return a;
+}
+
+int
+g (char *a)
+{
+ return 2;
+}
+
+void
+h (char *p[])
+{
+ char n[x1][512];
+ char *l = f (p[1], " ");
+ if (g (p[0]))
+ n[0][0] = '\0';
+ while (l && *l)
+ {
+ }
+}
+
+unsigned long x1;
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr60034.c b/gcc/testsuite/gcc.target/aarch64/pr60034.c
new file mode 100644
index 0000000000..ab7e7f4a33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr60034.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-std=gnu99 -O" } */
+
+static unsigned long global_max_fast;
+
+void __libc_mallopt (int param_number, int value)
+{
+ __asm__ __volatile__ ("# %[_SDT_A21]" :: [_SDT_A21] "nor" ((global_max_fast)));
+ global_max_fast = 1;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr60580_1.c b/gcc/testsuite/gcc.target/aarch64/pr60580_1.c
new file mode 100644
index 0000000000..1adf508cfc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr60580_1.c
@@ -0,0 +1,45 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -fomit-frame-pointer -fno-inline --save-temps" } */
+
+void
+func_leaf (void)
+{
+ int a = 0;
+}
+
+void
+func_no_leaf (void)
+{
+ int a = 0;
+ func_leaf ();
+}
+
+void
+func1 (void)
+{
+ int a = 0;
+ func_no_leaf ();
+}
+
+/*
+ * This function calls XXX(), which modifies SP. This is incompatible to
+ * -fomit-frame-pointer generated code as SP is used to access the frame.
+ */
+__attribute__ ((optimize("no-omit-frame-pointer")))
+void
+func2 (void)
+{
+ int a = 0;
+ func_no_leaf ();
+}
+
+void
+func3 (void)
+{
+ int a = 0;
+ func_no_leaf ();
+}
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr60675.C b/gcc/testsuite/gcc.target/aarch64/pr60675.C
new file mode 100644
index 0000000000..aa88cdb240
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr60675.C
@@ -0,0 +1,277 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c++11 -w -O2 -fPIC" } */
+namespace CLHEP {
+ static const double meter = 1000.*10;
+ static const double meter2 = meter*meter;
+ static const double megaelectronvolt = 1. ;
+ static const double gigaelectronvolt = 1.e+3;
+ static const double GeV = gigaelectronvolt;
+ static const double megavolt = megaelectronvolt;
+ static const double volt = 1.e-6*megavolt;
+ static const double tesla = volt*1.e+9/meter2;
+ }
+ using CLHEP::GeV;
+ using CLHEP::tesla;
+ namespace std {
+ typedef long int ptrdiff_t;
+ }
+ extern "C" {
+ extern double cos (double __x) throw ();
+ extern double sin (double __x) throw ();
+ extern double sqrt (double __x) throw ();
+ }
+ namespace std __attribute__ ((__visibility__ ("default"))) {
+ using ::cos;
+ using ::sin;
+ using ::sqrt;
+ template<class _CharT> struct char_traits;
+ template<typename _CharT, typename _Traits = char_traits<_CharT> > struct basic_ostream;
+ typedef basic_ostream<char> ostream;
+ template<typename _Iterator> struct iterator_traits { };
+ template<typename _Tp> struct iterator_traits<_Tp*> {
+ typedef ptrdiff_t difference_type;
+ typedef _Tp& reference;
+ };
+ }
+ namespace __gnu_cxx __attribute__ ((__visibility__ ("default"))) {
+ using std::iterator_traits;
+ template<typename _Iterator, typename _Container> struct __normal_iterator {
+ _Iterator _M_current;
+ typedef iterator_traits<_Iterator> __traits_type;
+ typedef typename __traits_type::difference_type difference_type;
+ typedef typename __traits_type::reference reference;
+ explicit __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
+ reference operator*() const {
+ return *_M_current;
+ }
+ __normal_iterator operator+(difference_type __n) const {
+ return __normal_iterator(_M_current + __n);
+ }
+ };
+ template<typename _Tp> struct new_allocator {
+ };
+ }
+ namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp> struct allocator: public __gnu_cxx::new_allocator<_Tp> {
+ };
+ struct ios_base { };
+ template<typename _CharT, typename _Traits> struct basic_ios : public ios_base { };
+ template<typename _CharT, typename _Traits> struct basic_ostream : virtual public basic_ios<_CharT, _Traits> {
+ typedef basic_ostream<_CharT, _Traits> __ostream_type;
+ __ostream_type& operator<<(__ostream_type& (*__pf)(__ostream_type&)) { }
+ __ostream_type& operator<<(const void* __p) {
+ return _M_insert(__p);
+ }
+ template<typename _ValueT> __ostream_type& _M_insert(_ValueT __v);
+ };
+ template<typename _CharT, typename _Traits> inline basic_ostream<_CharT, _Traits>& endl(basic_ostream<_CharT, _Traits>& __os) {
+ }
+ }
+ typedef double G4double;
+ typedef int G4int;
+ extern __thread std::ostream *G4cout_p;
+ struct G4Field;
+ struct G4FieldManager {
+ inline G4Field* GetDetectorField() ;
+ };
+ namespace CLHEP {
+ struct Hep3Vector {
+ Hep3Vector(double x, double y, double z);
+ inline ~Hep3Vector();
+ inline double x() const;
+ inline double y() const;
+ inline double z() const;
+ inline double mag() const;
+ inline Hep3Vector cross(const Hep3Vector &) const;
+ double dx;
+ double dy;
+ double dz;
+ };
+ Hep3Vector operator / (const Hep3Vector &, double a);
+ inline double Hep3Vector::x() const {
+ return dx;
+ }
+ inline double Hep3Vector::y() const {
+ return dy;
+ }
+ inline double Hep3Vector::z() const {
+ return dz;
+ }
+ inline Hep3Vector operator + (const Hep3Vector & a, const Hep3Vector & b) { }
+ inline Hep3Vector operator * (const Hep3Vector & p, double a) { }
+ inline double operator * (const Hep3Vector & a, const Hep3Vector & b) { }
+ inline Hep3Vector::Hep3Vector(double x1, double y1, double z1) : dx(x1), dy(y1), dz(z1) {
+ }
+ inline Hep3Vector::~Hep3Vector() { }
+ inline Hep3Vector Hep3Vector::cross(const Hep3Vector & p) const {
+ return Hep3Vector(dy*p.dz-p.dy*dz, dz*p.dx-p.dz*dx, dx*p.dy-p.dx*dy);
+ }
+ }
+ typedef CLHEP::Hep3Vector G4ThreeVector;
+ namespace std __attribute__ ((__visibility__ ("default"))) {
+ template<typename _Tp, typename _Alloc = std::allocator<_Tp> > struct vector
+ {
+ typedef _Tp *pointer;
+ typedef __gnu_cxx::__normal_iterator<pointer, vector> iterator;
+ iterator begin() { }
+ };
+ }
+ struct G4TransportationManager {
+ static G4TransportationManager* GetTransportationManager();
+ inline G4FieldManager* GetFieldManager() const;
+ };
+ struct G4ErrorMatrix {
+ G4ErrorMatrix(G4int p, G4int q, G4int i);
+ virtual ~G4ErrorMatrix();
+ struct G4ErrorMatrix_row {
+ inline G4ErrorMatrix_row(G4ErrorMatrix&,G4int);
+ G4double & operator[](G4int);
+ G4ErrorMatrix& _a;
+ G4int _r;
+ };
+ inline G4ErrorMatrix_row operator[] (G4int);
+ std::vector<G4double > m;
+ G4int nrow, ncol;
+ };
+ inline G4ErrorMatrix::G4ErrorMatrix_row G4ErrorMatrix::operator[] (G4int r) {
+ G4ErrorMatrix_row b(*this,r);
+ return b;
+ }
+ inline G4double &G4ErrorMatrix::G4ErrorMatrix_row::operator[](G4int c) {
+ return *(_a.m.begin()+_r*_a.ncol+c);
+ }
+ inline G4ErrorMatrix:: G4ErrorMatrix_row::G4ErrorMatrix_row(G4ErrorMatrix&a, G4int r) : _a(a) {
+ _r = r;
+ };
+ struct G4DynamicParticle {
+ G4double GetCharge() const;
+ };
+ struct G4Step;
+ struct G4Track {
+ const G4DynamicParticle* GetDynamicParticle() const;
+ const G4ThreeVector& GetPosition() const;
+ G4ThreeVector GetMomentum() const;
+ const G4Step* GetStep() const;
+ };
+ struct G4StepPoint {
+ const G4ThreeVector& GetPosition() const;
+ G4ThreeVector GetMomentum() const;
+ };
+ struct G4Step {
+ G4StepPoint* GetPreStepPoint() const;
+ G4double GetStepLength() const;
+ };
+ namespace HepGeom {
+ template<class T> struct BasicVector3D {
+ T v_[3];
+ BasicVector3D(T x1, T y1, T z1) { }
+ operator T * () {
+ return v_;
+ }
+ T x() const {
+ return v_[0];
+ }
+ T y() const {
+ return v_[1];
+ }
+ T z() const {
+ return v_[2];
+ }
+ T perp2() const { }
+ T perp() const {
+ return std::sqrt(perp2());
+ }
+ T mag2() const { }
+ T mag() const {
+ return std::sqrt(mag2());
+ }
+ T theta() const { }
+ };
+ inline BasicVector3D<double> operator-(const BasicVector3D<double> & a,const BasicVector3D<double> & b) { }
+ inline BasicVector3D<double> operator*(const BasicVector3D<double> & v, double a) { }
+ template<class T> struct Point3D : public BasicVector3D<T> {
+ explicit Point3D(const double * a) : BasicVector3D<double>(a[0],a[1],a[2]) { }
+ Point3D(const CLHEP::Hep3Vector & v) : BasicVector3D<double>(v.dx,v.dy,v.dz) { }
+ };
+ }
+ typedef HepGeom::Point3D<G4double> G4Point3D;
+ namespace HepGeom {
+ template<class T> struct Vector3D : public BasicVector3D<T> {
+ Vector3D(const BasicVector3D<double> & v) : BasicVector3D<double>(v) { }
+ Vector3D(const CLHEP::Hep3Vector & v) : BasicVector3D<double>(v.dx,v.dy,v.dz) { }
+ operator CLHEP::Hep3Vector () const { }
+ };
+ }
+ typedef HepGeom::Vector3D<G4double> G4Vector3D;
+ struct G4ErrorFreeTrajState
+{
+ virtual G4int PropagateError( const G4Track* aTrack );
+ G4int PropagateErrorMSC( const G4Track* aTrack );
+ };
+ G4int G4ErrorFreeTrajState::PropagateError( const G4Track* aTrack ) {
+ G4double stepLengthCm = aTrack->GetStep()->GetStepLength()/10.;
+ G4Point3D vposPost = aTrack->GetPosition()/10.;
+ G4Vector3D vpPost = aTrack->GetMomentum()/GeV;
+ G4Point3D vposPre = aTrack->GetStep()->GetPreStepPoint()->GetPosition()/10.;
+ G4Vector3D vpPre = aTrack->GetStep()->GetPreStepPoint()->GetMomentum()/GeV;
+ G4double pPre = vpPre.mag();
+ G4double pPost = vpPost.mag();
+ G4double pInvPre = 1./pPre;
+ G4double pInvPost = 1./pPost;
+ G4double deltaPInv = pInvPost - pInvPre;
+ G4Vector3D vpPreNorm = vpPre * pInvPre;
+ G4Vector3D vpPostNorm = vpPost * pInvPost;
+ (*G4cout_p) << "G4EP: vpPreNorm " << vpPreNorm << " vpPostNorm " << vpPostNorm << std::endl;
+ G4double sinpPre = std::sin( vpPreNorm.theta() );
+ G4double sinpPostInv = 1./std::sin( vpPreNorm.theta() );
+ G4ErrorMatrix transf(5, 5, 0 );
+ G4double charge = aTrack->GetDynamicParticle()->GetCharge();
+ G4double h1[3], h2[3];
+ G4Field* field
+= G4TransportationManager::GetTransportationManager()->GetFieldManager()->GetDetectorField()
+;
+ if( charge != 0. && field )
+ {
+ G4ThreeVector HPre = G4ThreeVector( h1[0], h1[1], h1[2] ) / tesla *10.;
+ G4ThreeVector HPost= G4ThreeVector( h2[0], h2[1], h2[2] ) / tesla *10.;
+ {
+ G4double pInvAver = 1./(pInvPre + pInvPost );
+ G4double CFACT8 = 2.997925E-4;
+ G4ThreeVector vHAverNorm( (HPre*pInvPre + HPost*pInvPost ) * pInvAver * charge * CFACT8 );
+ G4double HAver = vHAverNorm.mag();
+ G4double pAver = (pPre+pPost)*0.5;
+ G4double QAver = -HAver/pAver;
+ G4double thetaAver = QAver * stepLengthCm;
+ G4double sinThetaAver = std::sin(thetaAver);
+ G4double cosThetaAver = std::cos(thetaAver);
+ G4double gamma = vHAverNorm * vpPostNorm;
+ G4ThreeVector AN2 = vHAverNorm.cross( vpPostNorm );
+ G4double AU = 1./vpPreNorm.perp();
+ G4ThreeVector vUPre( -AU*vpPreNorm.y(), AU*vpPreNorm.x(), 0. );
+ G4ThreeVector vVPre( -vpPreNorm.z()*vUPre.y(), vpPreNorm.z()*vUPre.x(), vpPreNorm.x()*vUPre.y() - vpPreNorm.y()*vUPre.x() );
+ AU = 1./vpPostNorm.perp();
+ G4ThreeVector vUPost( -AU*vpPostNorm.y(), AU*vpPostNorm.x(), 0. );
+ G4ThreeVector vVPost( -vpPostNorm.z()*vUPost.y(), vpPostNorm.z()*vUPost.x(), vpPostNorm.x()*vUPost.y() - vpPostNorm.y()*vUPost.x() );
+ G4Point3D deltaPos( vposPre - vposPost );
+ G4double QP = QAver * pAver;
+ G4double ANV = -( vHAverNorm.x()*vUPost.x() + vHAverNorm.y()*vUPost.y() );
+ G4double ANU = ( vHAverNorm.x()*vVPost.x() + vHAverNorm.y()*vVPost.y() + vHAverNorm.z()*vVPost.z() );
+ G4double OMcosThetaAver = 1. - cosThetaAver;
+ G4double TMSINT = thetaAver - sinThetaAver;
+ G4ThreeVector vHUPre( -vHAverNorm.z() * vUPre.y(), vHAverNorm.z() * vUPre.x(), vHAverNorm.x() * vUPre.y() - vHAverNorm.y() * vUPre.x() );
+ G4ThreeVector vHVPre( vHAverNorm.y() * vVPre.z() - vHAverNorm.z() * vVPre.y(), vHAverNorm.z() * vVPre.x() - vHAverNorm.x() * vVPre.z(), vHAverNorm.x() * vVPre.y() - vHAverNorm.y() * vVPre.x() );
+ transf[0][1] = -deltaPInv/thetaAver* ( TMSINT*gamma*(vHAverNorm.x()*vVPre.x()+vHAverNorm.y()*vVPre.y()+vHAverNorm.z()*vVPre.z()) + sinThetaAver*(vVPre.x()*vpPostNorm.x()+vVPre.y()*vpPostNorm.y()+vVPre.z()*vpPostNorm.z()) + OMcosThetaAver*(vHVPre.x()*vpPostNorm.x()+vHVPre.y()*vpPostNorm.y()+vHVPre.z()*vpPostNorm.z()) );
+ transf[0][2] = -sinpPre*deltaPInv/thetaAver* ( TMSINT*gamma*(vHAverNorm.x()*vUPre.x()+vHAverNorm.y()*vUPre.y() ) + sinThetaAver*(vUPre.x()*vpPostNorm.x()+vUPre.y()*vpPostNorm.y() ) + OMcosThetaAver*(vHUPre.x()*vpPostNorm.x()+vHUPre.y()*vpPostNorm.y()+vHUPre.z()*vpPostNorm.z()) );
+ transf[0][3] = -deltaPInv/stepLengthCm*(vUPre.x()*vpPostNorm.x()+vUPre.y()*vpPostNorm.y() );
+ transf[1][1] = cosThetaAver*(vVPre.x()*vVPost.x()+vVPre.y()*vVPost.y()+vVPre.z()*vVPost.z()) + sinThetaAver*(vHVPre.x()*vVPost.x()+vHVPre.y()*vVPost.y()+vHVPre.z()*vVPost.z()) + OMcosThetaAver*(vHAverNorm.x()*vVPre.x()+vHAverNorm.y()*vVPre.y()+vHAverNorm.z()*vVPre.z())* (vHAverNorm.x()*vVPost.x()+vHAverNorm.y()*vVPost.y()+vHAverNorm.z()*vVPost.z()) + ANV*( -sinThetaAver*(vVPre.x()*vpPostNorm.x()+vVPre.y()*vpPostNorm.y()+vVPre.z()*vpPostNorm.z()) + OMcosThetaAver*(vVPre.x()*AN2.x()+vVPre.y()*AN2.y()+vVPre.z()*AN2.z()) - TMSINT*gamma*(vHAverNorm.x()*vVPre.x()+vHAverNorm.y()*vVPre.y()+vHAverNorm.z()*vVPre.z()) );
+ transf[1][2] = cosThetaAver*(vUPre.x()*vVPost.x()+vUPre.y()*vVPost.y() ) + sinThetaAver*(vHUPre.x()*vVPost.x()+vHUPre.y()*vVPost.y()+vHUPre.z()*vVPost.z()) + OMcosThetaAver*(vHAverNorm.x()*vUPre.x()+vHAverNorm.y()*vUPre.y() )* (vHAverNorm.x()*vVPost.x()+vHAverNorm.y()*vVPost.y()+vHAverNorm.z()*vVPost.z()) + ANV*( -sinThetaAver*(vUPre.x()*vpPostNorm.x()+vUPre.y()*vpPostNorm.y() ) + OMcosThetaAver*(vUPre.x()*AN2.x()+vUPre.y()*AN2.y() ) - TMSINT*gamma*(vHAverNorm.x()*vUPre.x()+vHAverNorm.y()*vUPre.y() ) );
+ transf[2][0] = -QP*ANU*(vpPostNorm.x()*deltaPos.x()+vpPostNorm.y()*deltaPos.y()+vpPostNorm.z()*deltaPos.z())*sinpPostInv *(1.+deltaPInv*pAver);
+ transf[2][3] = -QAver*ANU*(vUPre.x()*vpPostNorm.x()+vUPre.y()*vpPostNorm.y() )*sinpPostInv;
+ transf[3][4] = (vVPre.x()*vUPost.x()+vVPre.y()*vUPost.y() );
+ transf[4][0] = pAver*(vVPost.x()*deltaPos.x()+vVPost.y()*deltaPos.y()+vVPost.z()*deltaPos.z()) *(1.+deltaPInv*pAver);
+ transf[4][1] = ( sinThetaAver*(vVPre.x()*vVPost.x()+vVPre.y()*vVPost.y()+vVPre.z()*vVPost.z()) + OMcosThetaAver*(vHVPre.x()*vVPost.x()+vHVPre.y()*vVPost.y()+vHVPre.z()*vVPost.z()) + TMSINT*(vHAverNorm.x()*vVPost.x()+vHAverNorm.y()*vVPost.y()+vHAverNorm.z()*vVPost.z())* (vHAverNorm.x()*vVPre.x()+vHAverNorm.y()*vVPre.y()+vHAverNorm.z()*vVPre.z()) )/QAver;
+ transf[4][2] = ( sinThetaAver*(vUPre.x()*vVPost.x()+vUPre.y()*vVPost.y() ) + OMcosThetaAver*(vHUPre.x()*vVPost.x()+vHUPre.y()*vVPost.y()+vHUPre.z()*vVPost.z()) + TMSINT*(vHAverNorm.x()*vVPost.x()+vHAverNorm.y()*vVPost.y()+vHAverNorm.z()*vVPost.z())* (vHAverNorm.x()*vUPre.x()+vHAverNorm.y()*vUPre.y() ) )*sinpPre/QAver;
+ }
+ }
+ PropagateErrorMSC( aTrack );
+ }
diff --git a/gcc/testsuite/gcc.target/aarch64/pr60697.c b/gcc/testsuite/gcc.target/aarch64/pr60697.c
new file mode 100644
index 0000000000..57ccecb1da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr60697.c
@@ -0,0 +1,638 @@
+/* { dg-do compile } */
+/* { dg-options "-w -O3 -mcpu=cortex-a53" } */
+typedef struct __sFILE __FILE;
+typedef __FILE FILE;
+typedef int atom_id;
+typedef float real;
+typedef real rvec[3];
+typedef real matrix[3][3];
+enum {
+ ebCGS,ebMOLS,ebSBLOCKS,ebNR
+};
+enum {
+ efepNO, efepYES, efepNR
+};
+enum {
+ esolNO, esolMNO, esolWATER, esolWATERWATER, esolNR
+};
+typedef struct {
+ int nr;
+ atom_id *index;
+ atom_id *a;
+} t_block;
+enum {
+ F_LJ,
+ F_LJLR,
+ F_SR,
+ F_LR,
+ F_DVDL,
+};
+typedef struct {
+ t_block excl;
+} t_atoms;
+typedef struct {
+ t_atoms atoms;
+ t_block blocks[ebNR];
+} t_topology;
+typedef struct {
+} t_nsborder;
+extern FILE *debug;
+typedef struct {
+} t_nrnb;
+typedef struct {
+ int nri,maxnri;
+ int nrj,maxnrj;
+ int maxlen;
+ int solvent;
+ int *gid;
+ int *jindex;
+ atom_id *jjnr;
+ int *nsatoms;
+} t_nblist;
+typedef struct {
+ int nrx,nry,nrz;
+} t_grid;
+typedef struct {
+} t_commrec;
+enum { eNL_VDWQQ, eNL_VDW, eNL_QQ,
+ eNL_VDWQQ_FREE, eNL_VDW_FREE, eNL_QQ_FREE,
+ eNL_VDWQQ_SOLMNO, eNL_VDW_SOLMNO, eNL_QQ_SOLMNO,
+ eNL_VDWQQ_WATER, eNL_QQ_WATER,
+ eNL_VDWQQ_WATERWATER, eNL_QQ_WATERWATER,
+ eNL_NR };
+typedef struct {
+ real rlist,rlistlong;
+ real rcoulomb_switch,rcoulomb;
+ real rvdw_switch,rvdw;
+ int efep;
+ int cg0,hcg;
+ int *solvent_type;
+ int *mno_index;
+ rvec *cg_cm;
+ t_nblist nlist_sr[eNL_NR];
+ t_nblist nlist_lr[eNL_NR];
+ int bTwinRange;
+ rvec *f_twin;
+ int *eg_excl;
+} t_forcerec;
+typedef struct {
+ real *chargeA,*chargeB,*chargeT;
+ int *bPerturbed;
+ int *typeA,*typeB;
+ unsigned short *cTC,*cENER,*cACC,*cFREEZE,*cXTC,*cVCM;
+} t_mdatoms;
+enum { egCOUL, egLJ, egBHAM, egLR, egLJLR, egCOUL14, egLJ14, egNR };
+typedef struct {
+ real *ee[egNR];
+} t_grp_ener;
+typedef struct {
+ t_grp_ener estat;
+} t_groups;
+typedef unsigned long t_excl;
+static void reset_nblist(t_nblist *nl)
+{
+ nl->nri = 0;
+ nl->nrj = 0;
+ nl->maxlen = 0;
+ if (nl->maxnri > 0) {
+ nl->gid[0] = -1;
+ if (nl->maxnrj > 1) {
+ nl->jindex[0] = 0;
+ nl->jindex[1] = 0;
+ }
+ }
+}
+static void reset_neighbor_list(t_forcerec *fr,int bLR,int eNL)
+{
+ reset_nblist(&(fr->nlist_lr[eNL]));
+}
+static void close_i_nblist(t_nblist *nlist)
+{
+ int nri = nlist->nri;
+ int len;
+ nlist->jindex[nri+1] = nlist->nrj;
+ len=nlist->nrj - nlist->jindex[nri];
+ if (nlist->solvent==esolMNO)
+ len *= nlist->nsatoms[3*nri];
+ if(len > nlist->maxlen)
+ nlist->maxlen = len;
+}
+static void close_nblist(t_nblist *nlist)
+{
+ if (nlist->maxnri > 0) {
+ int nri = nlist->nri;
+ if ((nlist->jindex[nri+1] > nlist->jindex[nri]) &&
+ (nlist->gid[nri] != -1)) {
+ nlist->nri++;
+ nlist->jindex[nri+2] = nlist->nrj;
+ }
+ }
+}
+static void close_neighbor_list(t_forcerec *fr,int bLR,int eNL)
+{
+ close_nblist(&(fr->nlist_lr[eNL]));
+}
+static void add_j_to_nblist(t_nblist *nlist,atom_id j_atom)
+{
+ int nrj=nlist->nrj;
+ nlist->jjnr[nrj] = j_atom;
+ nlist->nrj ++;
+}
+static void put_in_list(int bHaveLJ[],
+ int ngid,t_mdatoms *md,
+ int icg,int jgid,int nj,atom_id jjcg[],
+ atom_id index[],
+ t_excl bExcl[],int shift,
+ t_forcerec *fr,int bLR,
+ int bVDWOnly,int bCoulOnly)
+{
+ t_nblist *vdwc,*vdw,*coul;
+ t_nblist *vdwc_ww=((void *)0),*coul_ww=((void *)0);
+ t_nblist *vdwc_free=((void *)0),*vdw_free=((void *)0),*coul_free=((void *)0);
+ int i,j,jcg,igid,gid,ind_ij;
+ atom_id jj,jj0,jj1,i_atom;
+ int i0,nicg,len;
+ int *type,*typeB;
+ unsigned short *cENER;
+ real *charge,*chargeB;
+ real qi,qiB,qq,rlj;
+ int bWater,bMNO,bFree,bFreeJ,bNotEx,*bPert;
+ charge = md->chargeA;
+ chargeB = md->chargeB;
+ type = md->typeA;
+ typeB = md->typeB;
+ cENER = md->cENER;
+ bPert = md->bPerturbed;
+ i0 = index[icg];
+ nicg = index[icg+1]-i0;
+ bMNO = (fr->solvent_type[icg] == esolMNO);
+ if (bLR) {
+ if (bWater) {
+ vdw = &fr->nlist_lr[eNL_VDW];
+ coul = &fr->nlist_lr[eNL_QQ_WATER];
+ vdwc_ww = &fr->nlist_lr[eNL_VDWQQ_WATERWATER];
+ } else if(bMNO) {
+ vdwc = &fr->nlist_lr[eNL_VDWQQ_SOLMNO];
+ }
+ if (fr->efep != efepNO) {
+ vdw_free = &fr->nlist_lr[eNL_VDW_FREE];
+ coul_free = &fr->nlist_lr[eNL_QQ_FREE];
+ }
+ }
+ else {
+ if (bWater) {
+ } else if(bMNO) {
+ vdwc = &fr->nlist_sr[eNL_VDWQQ_SOLMNO];
+ }
+ if (fr->efep != efepNO) {
+ vdwc_free = &fr->nlist_sr[eNL_VDWQQ_FREE];
+ }
+ }
+ if (fr->efep==efepNO) {
+ if (bWater) {
+ igid = cENER[i_atom];
+ gid = ((igid < jgid) ? (igid*ngid+jgid) : (jgid*ngid+igid));
+ if (!bCoulOnly && !bVDWOnly) {
+ new_i_nblist(vdwc,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,((void *)0));
+ new_i_nblist(vdwc_ww,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,((void *)0));
+ }
+ if (!bCoulOnly)
+ new_i_nblist(vdw,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,((void *)0));
+ if (!bVDWOnly) {
+ new_i_nblist(coul,bLR ? F_LR : F_SR,i_atom,shift,gid,((void *)0));
+ new_i_nblist(coul_ww,bLR ? F_LR : F_SR,i_atom,shift,gid,((void *)0));
+ }
+ for(j=0; (j<nj); j++) {
+ jcg=jjcg[j];
+ if (jcg==icg)
+ jj0 = index[jcg];
+ if (bWater && (fr->solvent_type[jcg] == esolWATER)) {
+ if (bVDWOnly)
+ add_j_to_nblist(vdw,jj0);
+ else {
+ add_j_to_nblist(coul_ww,jj0);
+ add_j_to_nblist(vdwc_ww,jj0);
+ }
+ } else {
+ jj1 = index[jcg+1];
+ if (bCoulOnly) {
+ for(jj=jj0; (jj<jj1); jj++) {
+ if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(coul,jj);
+ }
+ } else if (bVDWOnly) {
+ for(jj=jj0; (jj<jj1); jj++)
+ if (bHaveLJ[type[jj]])
+ add_j_to_nblist(vdw,jj);
+ } else {
+ for(jj=jj0; (jj<jj1); jj++) {
+ if (bHaveLJ[type[jj]]) {
+ if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(vdwc,jj);
+ add_j_to_nblist(vdw,jj);
+ } else if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(coul,jj);
+ }
+ }
+ }
+ }
+ close_i_nblist(vdw);
+ close_i_nblist(coul);
+ close_i_nblist(vdwc);
+ close_i_nblist(coul_ww);
+ close_i_nblist(vdwc_ww);
+ } else if (bMNO) {
+ igid = cENER[i_atom];
+ gid = ((igid < jgid) ? (igid*ngid+jgid) : (jgid*ngid+igid));
+ if (!bCoulOnly && !bVDWOnly)
+ new_i_nblist(vdwc,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,
+ &(fr->mno_index[icg*3]));
+ if (!bCoulOnly)
+ new_i_nblist(vdw,bLR ? F_LR : F_SR,i_atom,shift,gid,
+ &(fr->mno_index[icg*3]));
+ if (!bVDWOnly)
+ new_i_nblist(coul,bLR ? F_LR : F_SR,i_atom,shift,gid,
+ &(fr->mno_index[icg*3]));
+ for(j=0; (j<nj); j++) {
+ jcg=jjcg[j];
+ if (jcg == icg)
+ jj0 = index[jcg];
+ jj1=index[jcg+1];
+ for(jj=jj0; (jj<jj1); jj++) {
+ if (bCoulOnly) {
+ if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(coul,jj);
+ } else if (bVDWOnly) {
+ if (bHaveLJ[type[jj]])
+ add_j_to_nblist(vdw,jj);
+ } else {
+ if (bHaveLJ[type[jj]]) {
+ if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(vdwc,jj);
+ add_j_to_nblist(vdw,jj);
+ } else if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(coul,jj);
+ }
+ }
+ close_i_nblist(vdw);
+ close_i_nblist(coul);
+ close_i_nblist(vdwc);
+ }
+ } else {
+ for(i=0; i<nicg; i++) {
+ igid = cENER[i_atom];
+ gid = ((igid < jgid) ? (igid*ngid+jgid) : (jgid*ngid+igid));
+ qi = charge[i_atom];
+ if (!bCoulOnly && !bVDWOnly)
+ new_i_nblist(vdwc,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,((void *)0));
+ if (!bCoulOnly)
+ new_i_nblist(vdw,bLR ? F_LR : F_SR,i_atom,shift,gid,((void *)0));
+ if (!bVDWOnly)
+ new_i_nblist(coul,bLR ? F_LR : F_SR,i_atom,shift,gid,((void *)0));
+ if (!(bVDWOnly || fabs(qi)<1.2e-38) || !(bCoulOnly || !bHaveLJ[type[i_atom]])) {
+ for(j=0; (j<nj); j++) {
+ jcg=jjcg[j];
+ if (jcg == icg)
+ jj0 = i0 + i + 1;
+ else
+ jj0 = index[jcg];
+ jj1=index[jcg+1];
+ for(jj=jj0; jj<jj1; jj++) {
+ bNotEx = !((int) ((bExcl)[((atom_id) (jj))] & (1<<((atom_id) (i)))));
+ if (bNotEx) {
+ if (bCoulOnly) {
+ if (fabs(charge[jj]) > 1.2e-38)
+ add_j_to_nblist(coul,jj);
+ } else if (bVDWOnly) {
+ if (bHaveLJ[type[jj]])
+ add_j_to_nblist(vdw,jj);
+ } else {
+ if (bHaveLJ[type[jj]]) {
+ if (fabs(qi) > 1.2e-38 && (fabs(charge[jj]) > 1.2e-38))
+ add_j_to_nblist(vdwc,jj);
+ add_j_to_nblist(vdw,jj);
+ } else if (fabs(qi) > 1.2e-38 && (fabs(charge[jj]) > 1.2e-38))
+ add_j_to_nblist(coul,jj);
+ }
+ }
+ }
+ }
+ }
+ close_i_nblist(vdw);
+ close_i_nblist(coul);
+ close_i_nblist(vdwc);
+ }
+ }
+ } else {
+ for(i=0; i<nicg; i++) {
+ igid = cENER[i_atom];
+ gid = ((igid < jgid) ? (igid*ngid+jgid) : (jgid*ngid+igid));
+ qi = charge[i_atom];
+ qiB = chargeB[i_atom];
+ if (!bCoulOnly && !bVDWOnly)
+ new_i_nblist(vdwc,bLR ? F_LJLR : F_LJ,i_atom,shift,gid,
+ bMNO ? &(fr->mno_index[icg*3]) : ((void *)0));
+ if (!bCoulOnly)
+ new_i_nblist(vdw,bLR ? F_LR : F_SR,i_atom,shift,gid,
+ bMNO ? &(fr->mno_index[icg*3]) : ((void *)0));
+ new_i_nblist(coul,bLR ? F_LR : F_SR,i_atom,shift,gid,
+ bMNO ? &(fr->mno_index[icg*3]) : ((void *)0));
+ new_i_nblist(vdw_free,F_DVDL,i_atom,shift,gid,((void *)0));
+ new_i_nblist(coul_free,F_DVDL,i_atom,shift,gid,((void *)0));
+ new_i_nblist(vdwc_free,F_DVDL,i_atom,shift,gid,((void *)0));
+ if (!(bVDWOnly || (fabs(qi)<1.2e-38 && fabs(qiB)<1.2e-38)) ||
+ !(bCoulOnly || (!bHaveLJ[type[i_atom]] && !bHaveLJ[typeB[i_atom]]))) {
+ for(j=0; (j<nj); j++) {
+ jcg=jjcg[j];
+ if (jcg == icg)
+ jj0 = i0 + i + 1;
+ else
+ jj0 = index[jcg];
+ jj1=index[jcg+1];
+ bFree = bPert[i_atom];
+ for(jj=jj0; (jj<jj1); jj++) {
+ bFreeJ = bFree || bPert[jj];
+ if ((!bWater && !bMNO) || i==0 || bFreeJ) {
+ bNotEx = !((int) ((bExcl)[((atom_id) (jj))] & (1<<((atom_id) (i)))));
+ if (bNotEx) {
+ if (bFreeJ) {
+ if (bCoulOnly)
+ add_j_to_nblist(coul_free,jj);
+ else if (bVDWOnly)
+ add_j_to_nblist(vdw_free,jj);
+ add_j_to_nblist(vdwc_free,jj);
+ } else if (bCoulOnly) {
+ add_j_to_nblist(coul,jj);
+ } else if (bVDWOnly) {
+ if (bHaveLJ[type[jj]])
+ add_j_to_nblist(vdw,jj);
+ } else {
+ if (bHaveLJ[type[jj]]) {
+ if (fabs(qi) > 1.2e-38 && (fabs(charge[jj]) > 1.2e-38))
+ add_j_to_nblist(vdwc,jj);
+ add_j_to_nblist(vdw,jj);
+ } else if (fabs(qi) > 1.2e-38 && (fabs(charge[jj]) > 1.2e-38))
+ add_j_to_nblist(coul,jj);
+ }
+ }
+ }
+ }
+ }
+ }
+ close_i_nblist(vdw);
+ close_i_nblist(coul);
+ close_i_nblist(vdwc);
+ if (bWater && (i==0)) {
+ close_i_nblist(coul_ww);
+ close_i_nblist(vdwc_ww);
+ }
+ close_i_nblist(vdw_free);
+ close_i_nblist(coul_free);
+ close_i_nblist(vdwc_free);
+ }
+ }
+}
+static void setexcl(atom_id start,atom_id end,t_block *excl,int b,
+ t_excl bexcl[])
+{
+ atom_id i,k;
+ if (b) {
+ for(i=start; i<end; i++) {
+ for(k=excl->index[i]; k<excl->index[i+1]; k++) {
+ (bexcl)[((atom_id) (excl->a[k]))] |= (1<<((atom_id) (i-start)));
+ }
+ }
+ }
+}
+int calc_naaj(int icg,int cgtot)
+{
+ int naaj;
+ if ((cgtot % 2) == 1) {
+ naaj = 1+(cgtot/2);
+ }
+ else if ((cgtot % 4) == 0) {
+ if (icg < cgtot/2) {
+ if ((icg % 2) == 0)
+ naaj=1+(cgtot/2);
+ }
+ else {
+ if ((icg % 2) == 1)
+ naaj=1+(cgtot/2);
+ }
+ }
+ else {
+ if ((icg % 2) == 0)
+ naaj=1+(cgtot/2);
+ else
+ naaj=cgtot/2;
+ }
+ return naaj;
+}
+static void get_dx(int Nx,real gridx,real grid_x,real rc2,real x,
+ int *dx0,int *dx1,real *dcx2)
+{
+ real dcx,tmp;
+ int xgi,xgi0,xgi1,i;
+ xgi = (int)(Nx+x*grid_x)-Nx;
+ if (xgi < 0) {
+ *dx0 = 0;
+ *dx1 = -1;
+ } else if (xgi >= Nx) {
+ *dx0 = Nx;
+ *dx1 = Nx-1;
+ } else {
+ dcx2[xgi] = 0;
+ *dx0 = xgi;
+ xgi0 = xgi-1;
+ *dx1 = xgi;
+ xgi1 = xgi+1;
+ }
+ for(i=xgi0; i>=0; i--) {
+ dcx = (i+1)*gridx-x;
+ tmp = dcx*dcx;
+ if (tmp >= rc2)
+ *dx0 = i;
+ dcx2[i] = tmp;
+ }
+ for(i=xgi1; i<Nx; i++) {
+ dcx = i*gridx-x;
+ tmp = dcx*dcx;
+ if (tmp >= rc2)
+ *dx1 = i;
+ dcx2[i] = tmp;
+ }
+}
+static void do_longrange(FILE *log,t_commrec *cr,t_topology *top,t_forcerec *fr,
+ int ngid,t_mdatoms *md,int icg,
+ int jgid,int nlr,
+ atom_id lr[],t_excl bexcl[],int shift,
+ rvec x[],rvec box_size,t_nrnb *nrnb,
+ real lambda,real *dvdlambda,
+ t_groups *grps,int bVDWOnly,int bCoulOnly,
+ int bDoForces,int bHaveLJ[])
+{
+ int i;
+ for(i=0; (i<eNL_NR); i++) {
+ if ((fr->nlist_lr[i].nri > fr->nlist_lr[i].maxnri-32) || bDoForces) {
+ close_neighbor_list(fr,1,i);
+ do_fnbf(log,cr,fr,x,fr->f_twin,md,
+ grps->estat.ee[egLJLR],grps->estat.ee[egLR],box_size,
+ nrnb,lambda,dvdlambda,1,i);
+ reset_neighbor_list(fr,1,i);
+ }
+ }
+ if (!bDoForces) {
+ put_in_list(bHaveLJ,ngid,md,icg,jgid,nlr,lr,top->blocks[ebCGS].index,
+ bexcl,shift,fr,
+ 1,bVDWOnly,bCoulOnly);
+ }
+}
+static int ns5_core(FILE *log,t_commrec *cr,t_forcerec *fr,int cg_index[],
+ matrix box,rvec box_size,int ngid,
+ t_topology *top,t_groups *grps,
+ t_grid *grid,rvec x[],t_excl bexcl[],int *bExcludeAlleg,
+ t_nrnb *nrnb,t_mdatoms *md,
+ real lambda,real *dvdlambda,
+ int bHaveLJ[])
+{
+ static atom_id **nl_lr_ljc,**nl_lr_one,**nl_sr=((void *)0);
+ static int *nlr_ljc,*nlr_one,*nsr;
+ static real *dcx2=((void *)0),*dcy2=((void *)0),*dcz2=((void *)0);
+ t_block *cgs=&(top->blocks[ebCGS]);
+ unsigned short *gid=md->cENER;
+ int tx,ty,tz,dx,dy,dz,cj;
+ int dx0,dx1,dy0,dy1,dz0,dz1;
+ int Nx,Ny,Nz,shift=-1,j,nrj,nns,nn=-1;
+ real gridx,gridy,gridz,grid_x,grid_y,grid_z;
+ int icg=-1,iicg,cgsnr,i0,nri,naaj,min_icg,icg_naaj,jjcg,cgj0,jgid;
+ int bVDWOnly,bCoulOnly;
+ rvec xi,*cgcm;
+ real r2,rs2,rvdw2,rcoul2,rm2,rl2,XI,YI,ZI,dcx,dcy,dcz,tmp1,tmp2;
+ int *i_eg_excl;
+ int use_twinrange,use_two_cutoffs;
+ cgsnr = cgs->nr;
+ rs2 = ((fr->rlist)*(fr->rlist));
+ if (fr->bTwinRange) {
+ rvdw2 = ((fr->rvdw)*(fr->rvdw));
+ rcoul2 = ((fr->rcoulomb)*(fr->rcoulomb));
+ } else {
+ }
+ rm2 = (((rvdw2) < (rcoul2)) ? (rvdw2) : (rcoul2) );
+ rl2 = (((rvdw2) > (rcoul2)) ? (rvdw2) : (rcoul2) );
+ use_twinrange = (rs2 < rm2);
+ use_two_cutoffs = (rm2 < rl2);
+ bVDWOnly = (rvdw2 > rcoul2);
+ bCoulOnly = !bVDWOnly;
+ if (nl_sr == ((void *)0)) {
+ (nl_sr)=save_calloc("nl_sr","ns.c",1341, (ngid),sizeof(*(nl_sr)));
+ (nsr)=save_calloc("nsr","ns.c",1343, (ngid),sizeof(*(nsr)));
+ (nlr_ljc)=save_calloc("nlr_ljc","ns.c",1344, (ngid),sizeof(*(nlr_ljc)));
+ (nlr_one)=save_calloc("nlr_one","ns.c",1345, (ngid),sizeof(*(nlr_one)));
+ if (use_twinrange)
+ (nl_lr_ljc)=save_calloc("nl_lr_ljc","ns.c",1349, (ngid),sizeof(*(nl_lr_ljc)));
+ if (use_two_cutoffs)
+ (nl_lr_one)=save_calloc("nl_lr_one","ns.c",1353, (ngid),sizeof(*(nl_lr_one)));
+ for(j=0; (j<ngid); j++) {
+ (nl_sr[j])=save_calloc("nl_sr[j]","ns.c",1356, (1024),sizeof(*(nl_sr[j])));
+ if (use_twinrange)
+ (nl_lr_ljc[j])=save_calloc("nl_lr_ljc[j]","ns.c",1358, (1024),sizeof(*(nl_lr_ljc[j])));
+ if (use_two_cutoffs)
+ (nl_lr_one[j])=save_calloc("nl_lr_one[j]","ns.c",1360, (1024),sizeof(*(nl_lr_one[j])));
+ }
+ if (debug)
+ fprintf(debug,"ns5_core: rs2 = %g, rvdw2 = %g, rcoul2 = %g (nm^2)\n",
+ rs2,rvdw2,rcoul2);
+ }
+ cgcm = fr->cg_cm;
+ Nx = grid->nrx;
+ Ny = grid->nry;
+ if (dcx2 == ((void *)0)) {
+ (dcx2)=save_calloc("dcx2","ns.c",1379, (Nx*2),sizeof(*(dcx2)));
+ (dcy2)=save_calloc("dcy2","ns.c",1380, (Ny*2),sizeof(*(dcy2)));
+ (dcz2)=save_calloc("dcz2","ns.c",1381, (Nz*2),sizeof(*(dcz2)));
+ }
+ gridx = box[0][0]/grid->nrx;
+ gridy = box[1][1]/grid->nry;
+ gridz = box[2][2]/grid->nrz;
+ grid_x = 1/gridx;
+ grid_y = 1/gridy;
+ grid_z = 1/gridz;
+ for(iicg=fr->cg0; (iicg < fr->hcg); iicg++) {
+ icg = cg_index[iicg];
+ if (icg != iicg)
+ fatal_error(0,"icg = %d, iicg = %d, file %s, line %d",icg,iicg,"ns.c",
+ 1408);
+ if(bExcludeAlleg[icg])
+ i_eg_excl = fr->eg_excl + ngid*gid[cgs->index[icg]];
+ setexcl(cgs->index[icg],cgs->index[icg+1],&top->atoms.excl,1,bexcl);
+ naaj = calc_naaj(icg,cgsnr);
+ icg_naaj = icg+naaj;
+ for (tz=-1; tz<=1; tz++) {
+ ZI = cgcm[icg][2]+tz*box[2][2];
+ get_dx(Nz,gridz,grid_z,rcoul2,ZI,&dz0,&dz1,dcz2);
+ if (dz0 > dz1)
+ for (ty=-1; ty<=1; ty++) {
+ YI = cgcm[icg][1]+ty*box[1][1]+tz*box[2][1];
+ get_dx(Ny,gridy,grid_y,rcoul2,YI,&dy0,&dy1,dcy2);
+ for (tx=-1; tx<=1; tx++) {
+ get_dx(Nx,gridx,grid_x,rcoul2,XI,&dx0,&dx1,dcx2);
+ shift=((2*1 +1)*((2*1 +1)*((tz)+1)+(ty)+1)+(tx)+1);
+ for (dx=dx0; (dx<=dx1); dx++) {
+ for (dy=dy0; (dy<=dy1); dy++) {
+ for (dz=dz0; (dz<=dz1); dz++) {
+ if (tmp2 > dcz2[dz]) {
+ for (j=0; (j<nrj); j++) {
+ if (((jjcg >= icg) && (jjcg < icg_naaj)) ||
+ ((jjcg < min_icg))) {
+ if (r2 < rl2) {
+ if (!i_eg_excl[jgid]) {
+ if (r2 < rs2) {
+ if (nsr[jgid] >= 1024) {
+ put_in_list(bHaveLJ,ngid,md,icg,jgid,
+ nsr[jgid],nl_sr[jgid],
+ cgs->index, bexcl,
+ shift,fr,0,0,0);
+ }
+ } else if (r2 < rm2) {
+ } else if (use_two_cutoffs) {
+ if (nlr_one[jgid] >= 1024) {
+ do_longrange(log,cr,top,fr,ngid,md,icg,jgid,
+ nlr_one[jgid],
+ nl_lr_one[jgid],bexcl,shift,x,
+ box_size,nrnb,
+ lambda,dvdlambda,grps,
+ bVDWOnly,bCoulOnly,0,
+ bHaveLJ);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+}
+int search_neighbours(FILE *log,t_forcerec *fr,
+ rvec x[],matrix box,
+ t_topology *top,t_groups *grps,
+ t_commrec *cr,t_nsborder *nsb,
+ t_nrnb *nrnb,t_mdatoms *md,
+ real lambda,real *dvdlambda)
+{
+ static t_grid *grid=((void *)0);
+ static t_excl *bexcl;
+ static int *bHaveLJ;
+ static int *cg_index=((void *)0),*slab_index=((void *)0);
+ static int *bExcludeAlleg;
+ rvec box_size;
+ int i,j,m,ngid;
+ int nsearch;
+ nsearch = ns5_core(log,cr,fr,cg_index,box,box_size,ngid,top,grps,
+ grid,x,bexcl,bExcludeAlleg,nrnb,md,lambda,dvdlambda,bHaveLJ);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr61325.c b/gcc/testsuite/gcc.target/aarch64/pr61325.c
new file mode 100644
index 0000000000..45ece53446
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr61325.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+typedef unsigned int wchar_t;
+typedef long unsigned int size_t;
+
+size_t
+wcstombs(char *s , const wchar_t *pwcs , size_t n)
+{
+ int count = 0;
+
+ if (n != 0) {
+ do {
+ if ((*s++ = (char) *pwcs++) == 0)
+ break;
+ count++;
+ } while (--n != 0);
+ }
+ return count;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr62040.c b/gcc/testsuite/gcc.target/aarch64/pr62040.c
new file mode 100644
index 0000000000..cfb4979f88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr62040.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-g -Os" } */
+
+#include "arm_neon.h"
+
+extern void bar (int32x4_t);
+
+void
+foo ()
+{
+ int32x4x4_t rows;
+ uint64x2x2_t row01;
+
+ row01.val[0] = vreinterpretq_u64_s32 (rows.val[0]);
+ row01.val[1] = vreinterpretq_u64_s32 (rows.val[1]);
+ uint64x1_t row3l = vget_low_u64 (row01.val[0]);
+ row01.val[0] = vcombine_u64 (vget_low_u64 (row01.val[1]), row3l);
+ int32x4_t xxx = vreinterpretq_s32_u64 (row01.val[0]);
+ int32x4_t out = vtrn1q_s32 (xxx, xxx);
+ bar (out);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr62262.c b/gcc/testsuite/gcc.target/aarch64/pr62262.c
new file mode 100644
index 0000000000..5bf90bf7fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr62262.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fprofile-use" } */
+
+static inline int CLZ(int mask) {
+ return mask ? __builtin_clz(mask) : 32;
+}
+
+int foo(int value)
+{
+ if (value == 0)
+ return 0;
+
+ int bias = CLZ(value);
+ value >>= bias;
+ int zeros = CLZ(value << 1);
+ value <<= zeros;
+
+ int packed = (unsigned)(value << 9) >> 9;
+ return packed;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/predefine_large.c b/gcc/testsuite/gcc.target/aarch64/predefine_large.c
new file mode 100644
index 0000000000..0d7d4da47a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/predefine_large.c
@@ -0,0 +1,7 @@
+/* { dg-skip-if "Code model already defined" { aarch64_tiny || aarch64_small } } */
+
+#ifdef __AARCH64_CMODEL_LARGE__
+ int dummy;
+#else
+ #error
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/predefine_small.c b/gcc/testsuite/gcc.target/aarch64/predefine_small.c
new file mode 100644
index 0000000000..b1362845cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/predefine_small.c
@@ -0,0 +1,7 @@
+/* { dg-skip-if "Code model already defined" { aarch64_tiny || aarch64_large } } */
+
+#ifdef __AARCH64_CMODEL_SMALL__
+ int dummy;
+#else
+ #error
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/predefine_tiny.c b/gcc/testsuite/gcc.target/aarch64/predefine_tiny.c
new file mode 100644
index 0000000000..d2c844bacd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/predefine_tiny.c
@@ -0,0 +1,7 @@
+/* { dg-skip-if "Code model already defined" { aarch64_small || aarch64_large } } */
+
+#ifdef __AARCH64_CMODEL_TINY__
+ int dummy;
+#else
+ #error
+#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c
new file mode 100644
index 0000000000..b44e56023a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/reload-valid-spoff.c
@@ -0,0 +1,66 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mcmodel=large -fno-builtin" } */
+/* { dg-skip-if "-mcmodel=large -fPIC not currently supported" { aarch64-*-* } { "-fPIC" } { "" } } */
+
+typedef long unsigned int size_t;
+typedef unsigned short int sa_family_t;
+
+struct sockaddr
+{
+ sa_family_t sa_family;
+ char sa_data[14];
+};
+struct arpreq
+{
+ int arp_flags;
+ struct sockaddr arp_netmask;
+};
+typedef struct _IO_FILE FILE;
+extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream);
+extern struct _IO_FILE *stderr;
+extern int optind;
+struct aftype {
+ int (*input) (int type, char *bufp, struct sockaddr *);
+};
+struct aftype *ap;
+static int arp_set(char **args)
+{
+ char host[128];
+ struct arpreq req;
+ struct sockaddr sa;
+ memset((char *) &req, 0, sizeof(req));
+ if (*args == ((void *)0)) {
+ fprintf(stderr, ("arp: need host name\n"));
+ }
+ safe_strncpy(host, *args++, (sizeof host));
+ if (ap->input(0, host, &sa) < 0) {
+ }
+ while (*args != ((void *)0)) {
+ if (!__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (*args) && __builtin_constant_p ("netmask") && (__s1_len = strlen (*args), __s2_len = strlen ("netmask"), (!((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("netmask") + 1) - (size_t)(const void *)("netmask") == 1) || __s2_len >= 4)) ? __builtin_strcmp (*args, "netmask") : (__builtin_constant_p (*args) && ((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) && (__s1_len = strlen (*args), __s1_len < 4) ? (__builtin_constant_p ("netmask") && ((size_t)(const void *)(("netmask") + 1) - (size_t)(const void *)("netmask") == 1) ? __builtin_strcmp (*args, "netmask") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("netmask"); register int __result = (((__const unsigned char *) (__const char *) (*args))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (*args))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (*args))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (*args))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("netmask") && ((size_t)(const void *)(("netmask") + 1) - (size_t)(const void *)("netmask") == 1) && (__s2_len = strlen ("netmask"), __s2_len < 4) ? (__builtin_constant_p (*args) && ((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) ? __builtin_strcmp (*args, "netmask") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (*args); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("netmask"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("netmask"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("netmask"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("netmask"))[3]); } } __result; }))) : __builtin_strcmp (*args, "netmask")))); })) {
+ if (__extension__ ({ size_t __s1_len, __s2_len; (__builtin_constant_p (*args) && __builtin_constant_p ("255.255.255.255") && (__s1_len = strlen (*args), __s2_len = strlen ("255.255.255.255"), (!((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) || __s1_len >= 4) && (!((size_t)(const void *)(("255.255.255.255") + 1) - (size_t)(const void *)("255.255.255.255") == 1) || __s2_len >= 4)) ? __builtin_strcmp (*args, "255.255.255.255") : (__builtin_constant_p (*args) && ((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) && (__s1_len = strlen (*args), __s1_len < 4) ? (__builtin_constant_p ("255.255.255.255") && ((size_t)(const void *)(("255.255.255.255") + 1) - (size_t)(const void *)("255.255.255.255") == 1) ? __builtin_strcmp (*args, "255.255.255.255") : (__extension__ ({ __const unsigned char *__s2 = (__const unsigned char *) (__const char *) ("255.255.255.255"); register int __result = (((__const unsigned char *) (__const char *) (*args))[0] - __s2[0]); if (__s1_len > 0 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (*args))[1] - __s2[1]); if (__s1_len > 1 && __result == 0) { __result = (((__const unsigned char *) (__const char *) (*args))[2] - __s2[2]); if (__s1_len > 2 && __result == 0) __result = (((__const unsigned char *) (__const char *) (*args))[3] - __s2[3]); } } __result; }))) : (__builtin_constant_p ("255.255.255.255") && ((size_t)(const void *)(("255.255.255.255") + 1) - (size_t)(const void *)("255.255.255.255") == 1) && (__s2_len = strlen ("255.255.255.255"), __s2_len < 4) ? (__builtin_constant_p (*args) && ((size_t)(const void *)((*args) + 1) - (size_t)(const void *)(*args) == 1) ? __builtin_strcmp (*args, "255.255.255.255") : (__extension__ ({ __const unsigned char *__s1 = (__const unsigned char *) (__const char *) (*args); register int __result = __s1[0] - ((__const unsigned char *) (__const char *) ("255.255.255.255"))[0]; if (__s2_len > 0 && __result == 0) { __result = (__s1[1] - ((__const unsigned char *) (__const char *) ("255.255.255.255"))[1]); if (__s2_len > 1 && __result == 0) { __result = (__s1[2] - ((__const unsigned char *) (__const char *) ("255.255.255.255"))[2]); if (__s2_len > 2 && __result == 0) __result = (__s1[3] - ((__const unsigned char *) (__const char *) ("255.255.255.255"))[3]); } } __result; }))) : __builtin_strcmp (*args, "255.255.255.255")))); }) != 0) {
+ memcpy((char *) &req.arp_netmask, (char *) &sa,
+ sizeof(struct sockaddr));
+ }
+ }
+ }
+}
+static int arp_file(char *name)
+{
+ char buff[1024];
+ char *sp, *args[32];
+ int linenr, argc;
+ FILE *fp;
+ while (fgets(buff, sizeof(buff), fp) != (char *) ((void *)0)) {
+ if (arp_set(args) != 0)
+ fprintf(stderr, ("arp: cannot set entry on line %u on line %u of etherfile %s !\n"),
+ linenr, name);
+ }
+}
+int main(int argc, char **argv)
+{
+ int i, lop, what;
+ switch (what) {
+ case 0:
+ what = arp_file(argv[optind] ? argv[optind] : "/etc/ethers");
+ }
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/ror.c b/gcc/testsuite/gcc.target/aarch64/ror.c
new file mode 100644
index 0000000000..4d266f0047
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ror.c
@@ -0,0 +1,34 @@
+/* { dg-options "-O2 --save-temps" } */
+/* { dg-do run } */
+
+extern void abort (void);
+
+int
+test_si (int a)
+{
+ /* { dg-final { scan-assembler "ror\tw\[0-9\]+, w\[0-9\]+, 27\n" } } */
+ return (a << 5) | ((unsigned int) a >> 27);
+}
+
+long long
+test_di (long long a)
+{
+ /* { dg-final { scan-assembler "ror\tx\[0-9\]+, x\[0-9\]+, 45\n" } } */
+ return (a << 19) | ((unsigned long long) a >> 45);
+}
+
+int
+main ()
+{
+ int v;
+ long long w;
+ v = test_si (0x0203050);
+ if (v != 0x4060a00)
+ abort();
+ w = test_di (0x0000020506010304ll);
+ if (w != 0x1028300818200000ll)
+ abort();
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sbc.c b/gcc/testsuite/gcc.target/aarch64/sbc.c
new file mode 100644
index 0000000000..e479910bc2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sbc.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps" } */
+
+extern void abort (void);
+
+typedef unsigned int u32int;
+typedef unsigned long long u64int;
+
+u32int
+test_si (u32int w1, u32int w2, u32int w3, u32int w4)
+{
+ u32int w0;
+ /* { dg-final { scan-assembler "sbc\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+\n" } } */
+ w0 = w1 - w2 - (w3 < w4);
+ return w0;
+}
+
+u64int
+test_di (u64int x1, u64int x2, u64int x3, u64int x4)
+{
+ u64int x0;
+ /* { dg-final { scan-assembler "sbc\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+\n" } } */
+ x0 = x1 - x2 - (x3 < x4);
+ return x0;
+}
+
+int
+main ()
+{
+ u32int x;
+ u64int y;
+ x = test_si (7, 8, 12, 15);
+ if (x != -2)
+ abort();
+ y = test_di (0x987654321ll, 0x123456789ll, 0x345345345ll, 0x123123123ll);
+ if (y != 0x8641fdb98ll)
+ abort();
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar-mov.c b/gcc/testsuite/gcc.target/aarch64/scalar-mov.c
new file mode 100644
index 0000000000..5e53d87a6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/scalar-mov.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-g -mgeneral-regs-only" } */
+
+void
+foo (const char *c, ...)
+{
+ char buf[256];
+ buf[256 - 1] = '\0';
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar-vca.c b/gcc/testsuite/gcc.target/aarch64/scalar-vca.c
new file mode 100644
index 0000000000..b1188146c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/scalar-vca.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+extern float fabsf (float);
+extern double fabs (double);
+
+#define NUM_TESTS 8
+
+float input_s1[] = {0.1f, -0.1f, 0.4f, 10.3f, 200.0f, -800.0f, -13.0f, -0.5f};
+float input_s2[] = {-0.2f, 0.4f, 0.04f, -100.3f, 2.0f, -80.0f, 13.0f, -0.5f};
+double input_d1[] = {0.1, -0.1, 0.4, 10.3, 200.0, -800.0, -13.0, -0.5};
+double input_d2[] = {-0.2, 0.4, 0.04, -100.3, 2.0, -80.0, 13.0, -0.5};
+
+#define TEST(TEST, CMP, SUFFIX, WIDTH, F) \
+int \
+test_fca##TEST##SUFFIX##_float##WIDTH##_t (void) \
+{ \
+ int ret = 0; \
+ int i = 0; \
+ uint##WIDTH##_t output[NUM_TESTS]; \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ { \
+ float##WIDTH##_t f1 = fabs##F (input_##SUFFIX##1[i]); \
+ float##WIDTH##_t f2 = fabs##F (input_##SUFFIX##2[i]); \
+ /* Inhibit optimization of our linear test loop. */ \
+ asm volatile ("" : : : "memory"); \
+ output[i] = f1 CMP f2 ? -1 : 0; \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ { \
+ output[i] = vca##TEST##SUFFIX##_f##WIDTH (input_##SUFFIX##1[i], \
+ input_##SUFFIX##2[i]) \
+ ^ output[i]; \
+ /* Inhibit autovectorization of our scalar test loop. */ \
+ asm volatile ("" : : : "memory"); \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ ret |= output[i]; \
+ \
+ return ret; \
+}
+
+TEST (ge, >=, s, 32, f)
+/* { dg-final { scan-assembler "facge\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
+TEST (ge, >=, d, 64, )
+/* { dg-final { scan-assembler "facge\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
+TEST (gt, >, s, 32, f)
+/* { dg-final { scan-assembler "facgt\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
+TEST (gt, >, d, 64, )
+/* { dg-final { scan-assembler "facgt\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_fcages_float32_t ())
+ abort ();
+ if (test_fcaged_float64_t ())
+ abort ();
+ if (test_fcagts_float32_t ())
+ abort ();
+ if (test_fcagtd_float64_t ())
+ abort ();
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c
new file mode 100644
index 0000000000..d1980bc191
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/scalar_intrinsics.c
@@ -0,0 +1,1301 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -dp" } */
+
+#include <arm_neon.h>
+
+/* Used to force a variable to a SIMD register. */
+#define force_simd(V1) asm volatile ("mov %d0, %1.d[0]" \
+ : "=w"(V1) \
+ : "w"(V1) \
+ : /* No clobbers */);
+
+/* { dg-final { scan-assembler-times "\\tadd\\tx\[0-9\]+" 2 } } */
+
+uint64x1_t
+test_vaddd_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vaddd_u64 (a, b);
+}
+
+int64x1_t
+test_vaddd_s64 (int64x1_t a, int64x1_t b)
+{
+ return vaddd_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tadd\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vaddd_s64_2 (int64x1_t a, int64x1_t b, int64x1_t c, int64x1_t d)
+{
+ return vqaddd_s64 (vaddd_s64 (vqaddd_s64 (a, b), vqaddd_s64 (c, d)),
+ vqaddd_s64 (a, d));
+}
+
+/* { dg-final { scan-assembler-times "\\tabs\\td\[0-9\]+, d\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vabs_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vabs_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmeq\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vceqd_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vceqd_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmeq\\td\[0-9\]+, d\[0-9\]+, #?0" 1 } } */
+
+uint64x1_t
+test_vceqzd_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vceqzd_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmge\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 } } */
+
+uint64x1_t
+test_vcged_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcged_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+uint64x1_t
+test_vcled_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcled_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* Idiom recognition will cause this testcase not to generate
+ the expected cmge instruction, so do not check for it. */
+
+uint64x1_t
+test_vcgezd_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vcgezd_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmhs\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vcged_u64 (uint64x1_t a, uint64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcged_u64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmgt\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 } } */
+
+uint64x1_t
+test_vcgtd_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcgtd_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+uint64x1_t
+test_vcltd_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcltd_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmgt\\td\[0-9\]+, d\[0-9\]+, #?0" 1 } } */
+
+uint64x1_t
+test_vcgtzd_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vcgtzd_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmhi\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vcgtd_u64 (uint64x1_t a, uint64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vcgtd_u64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmle\\td\[0-9\]+, d\[0-9\]+, #?0" 1 } } */
+
+uint64x1_t
+test_vclezd_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vclezd_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* Idiom recognition will cause this testcase not to generate
+ the expected cmlt instruction, so do not check for it. */
+
+uint64x1_t
+test_vcltzd_s64 (int64x1_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vcltzd_s64 (a);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "aarch64_get_lanev16qi" 2 } } */
+
+int8_t
+test_vdupb_lane_s8 (int8x16_t a)
+{
+ int8_t res;
+ force_simd (a);
+ res = vdupb_laneq_s8 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+uint8_t
+test_vdupb_lane_u8 (uint8x16_t a)
+{
+ uint8_t res;
+ force_simd (a);
+ res = vdupb_laneq_u8 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "aarch64_get_lanev8hi" 2 } } */
+
+int16_t
+test_vduph_lane_s16 (int16x8_t a)
+{
+ int16_t res;
+ force_simd (a);
+ res = vduph_laneq_s16 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+uint16_t
+test_vduph_lane_u16 (uint16x8_t a)
+{
+ uint16_t res;
+ force_simd (a);
+ res = vduph_laneq_u16 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "aarch64_get_lanev4si" 2 } } */
+
+int32_t
+test_vdups_lane_s32 (int32x4_t a)
+{
+ int32_t res;
+ force_simd (a);
+ res = vdups_laneq_s32 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+uint32_t
+test_vdups_lane_u32 (uint32x4_t a)
+{
+ uint32_t res;
+ force_simd (a);
+ res = vdups_laneq_u32 (a, 2);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "aarch64_get_lanev2di" 2 } } */
+
+int64x1_t
+test_vdupd_lane_s64 (int64x2_t a)
+{
+ int64x1_t res;
+ force_simd (a);
+ res = vdupd_laneq_s64 (a, 1);
+ force_simd (res);
+ return res;
+}
+
+uint64x1_t
+test_vdupd_lane_u64 (uint64x2_t a)
+{
+ uint64x1_t res;
+ force_simd (a);
+ res = vdupd_laneq_u64 (a, 1);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\tcmtst\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 2 } } */
+
+int64x1_t
+test_vtst_s64 (int64x1_t a, int64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vtstd_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+uint64x1_t
+test_vtst_u64 (uint64x1_t a, uint64x1_t b)
+{
+ uint64x1_t res;
+ force_simd (a);
+ force_simd (b);
+ res = vtstd_s64 (a, b);
+ force_simd (res);
+ return res;
+}
+
+/* { dg-final { scan-assembler-times "\\taddp\\td\[0-9\]+, v\[0-9\]+\.2d" 1 } } */
+
+test_vpaddd_s64 (int64x2_t a)
+{
+ return vpaddd_s64 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqadd\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vqaddd_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vqaddd_u64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqadd\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqadds_u32 (uint32_t a, uint32_t b)
+{
+ return vqadds_u32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqadd\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqaddh_u16 (uint16_t a, uint16_t b)
+{
+ return vqaddh_u16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqadd\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqaddb_u8 (uint8_t a, uint8_t b)
+{
+ return vqaddb_u8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqadd\\td\[0-9\]+" 5 } } */
+
+int64x1_t
+test_vqaddd_s64 (int64x1_t a, int64x1_t b)
+{
+ return vqaddd_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqadd\\ts\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int32_t
+test_vqadds_s32 (int32_t a, int32_t b)
+{
+ return vqadds_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqadd\\th\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int16_t
+test_vqaddh_s16 (int16_t a, int16_t b)
+{
+ return vqaddh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqadd\\tb\[0-9\]+, b\[0-9\]+" 1 } } */
+
+int8_t
+test_vqaddb_s8 (int8_t a, int8_t b)
+{
+ return vqaddb_s8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\ts\[0-9\]+, h\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int32_t
+test_vqdmlalh_s16 (int32_t a, int16_t b, int16_t c)
+{
+ return vqdmlalh_s16 (a, b, c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\ts\[0-9\]+, h\[0-9\]+, v" 1 } } */
+
+int32_t
+test_vqdmlalh_lane_s16 (int32_t a, int16_t b, int16x4_t c)
+{
+ return vqdmlalh_lane_s16 (a, b, c, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\td\[0-9\]+, s\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vqdmlals_s32 (int64x1_t a, int32_t b, int32_t c)
+{
+ return vqdmlals_s32 (a, b, c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\td\[0-9\]+, s\[0-9\]+, v" 1 } } */
+
+int64x1_t
+test_vqdmlals_lane_s32 (int64x1_t a, int32_t b, int32x2_t c)
+{
+ return vqdmlals_lane_s32 (a, b, c, 1);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\ts\[0-9\]+, h\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int32_t
+test_vqdmlslh_s16 (int32_t a, int16_t b, int16_t c)
+{
+ return vqdmlslh_s16 (a, b, c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\ts\[0-9\]+, h\[0-9\]+, v" 1 } } */
+
+int32_t
+test_vqdmlslh_lane_s16 (int32_t a, int16_t b, int16x4_t c)
+{
+ return vqdmlslh_lane_s16 (a, b, c, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\td\[0-9\]+, s\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vqdmlsls_s32 (int64x1_t a, int32_t b, int32_t c)
+{
+ return vqdmlsls_s32 (a, b, c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\td\[0-9\]+, s\[0-9\]+, v" 1 } } */
+
+int64x1_t
+test_vqdmlsls_lane_s32 (int64x1_t a, int32_t b, int32x2_t c)
+{
+ return vqdmlsls_lane_s32 (a, b, c, 1);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmulh\\th\[0-9\]+, h\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int16_t
+test_vqdmulhh_s16 (int16_t a, int16_t b)
+{
+ return vqdmulhh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmulh\\th\[0-9\]+, h\[0-9\]+, v" 1 } } */
+
+int16_t
+test_vqdmulhh_lane_s16 (int16_t a, int16x4_t b)
+{
+ return vqdmulhh_lane_s16 (a, b, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmulh\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int32_t
+test_vqdmulhs_s32 (int32_t a, int32_t b)
+{
+ return vqdmulhs_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmulh\\ts\[0-9\]+, s\[0-9\]+, v" 1 } } */
+
+int32_t
+test_vqdmulhs_lane_s32 (int32_t a, int32x2_t b)
+{
+ return vqdmulhs_lane_s32 (a, b, 1);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\ts\[0-9\]+, h\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int32_t
+test_vqdmullh_s16 (int16_t a, int16_t b)
+{
+ return vqdmullh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\ts\[0-9\]+, h\[0-9\]+, v" 1 } } */
+
+int32_t
+test_vqdmullh_lane_s16 (int16_t a, int16x4_t b)
+{
+ return vqdmullh_lane_s16 (a, b, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\td\[0-9\]+, s\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vqdmulls_s32 (int32_t a, int32_t b)
+{
+ return vqdmulls_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\td\[0-9\]+, s\[0-9\]+, v" 1 } } */
+
+int64x1_t
+test_vqdmulls_lane_s32 (int32_t a, int32x2_t b)
+{
+ return vqdmulls_lane_s32 (a, b, 1);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrdmulh\\th\[0-9\]+, h\[0-9\]+, h\[0-9\]+" 1 } } */
+
+int16_t
+test_vqrdmulhh_s16 (int16_t a, int16_t b)
+{
+ return vqrdmulhh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrdmulh\\th\[0-9\]+, h\[0-9\]+, v" 1 } } */
+
+int16_t
+test_vqrdmulhh_lane_s16 (int16_t a, int16x4_t b)
+{
+ return vqrdmulhh_lane_s16 (a, b, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrdmulh\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" 1 } } */
+
+int32_t
+test_vqrdmulhs_s32 (int32_t a, int32_t b)
+{
+ return vqrdmulhs_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrdmulh\\ts\[0-9\]+, s\[0-9\]+, v" 1 } } */
+
+int32_t
+test_vqrdmulhs_lane_s32 (int32_t a, int32x2_t b)
+{
+ return vqrdmulhs_lane_s32 (a, b, 1);
+}
+
+/* { dg-final { scan-assembler-times "\\tsuqadd\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vuqaddb_s8 (int8_t a, int8_t b)
+{
+ return vuqaddb_s8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsuqadd\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vuqaddh_s16 (int16_t a, int8_t b)
+{
+ return vuqaddh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsuqadd\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vuqadds_s32 (int32_t a, int8_t b)
+{
+ return vuqadds_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsuqadd\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vuqaddd_s64 (int64x1_t a, int8_t b)
+{
+ return vuqaddd_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tusqadd\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vsqaddb_u8 (uint8_t a, int8_t b)
+{
+ return vsqaddb_u8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tusqadd\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vsqaddh_u16 (uint16_t a, int8_t b)
+{
+ return vsqaddh_u16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tusqadd\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vsqadds_u32 (uint32_t a, int8_t b)
+{
+ return vsqadds_u32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tusqadd\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vsqaddd_u64 (uint64x1_t a, int8_t b)
+{
+ return vsqaddd_u64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqabs\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqabsb_s8 (int8_t a)
+{
+ return vqabsb_s8 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqabs\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqabsh_s16 (int16_t a)
+{
+ return vqabsh_s16 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqabs\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqabss_s32 (int32_t a)
+{
+ return vqabss_s32 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqneg\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqnegb_s8 (int8_t a)
+{
+ return vqnegb_s8 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqneg\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqnegh_s16 (int16_t a)
+{
+ return vqnegh_s16 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqneg\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqnegs_s32 (int32_t a)
+{
+ return vqnegs_s32 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtun\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqmovunh_s16 (int16_t a)
+{
+ return vqmovunh_s16 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtun\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqmovuns_s32 (int32_t a)
+{
+ return vqmovuns_s32 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtun\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqmovund_s64 (int64x1_t a)
+{
+ return vqmovund_s64 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtn\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqmovnh_s16 (int16_t a)
+{
+ return vqmovnh_s16 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtn\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqmovns_s32 (int32_t a)
+{
+ return vqmovns_s32 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqxtn\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqmovnd_s64 (int64x1_t a)
+{
+ return vqmovnd_s64 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqxtn\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqmovnh_u16 (uint16_t a)
+{
+ return vqmovnh_u16 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqxtn\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqmovns_u32 (uint32_t a)
+{
+ return vqmovns_u32 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqxtn\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqmovnd_u64 (uint64x1_t a)
+{
+ return vqmovnd_u64 (a);
+}
+
+/* { dg-final { scan-assembler-times "\\tsub\\tx\[0-9\]+" 2 } } */
+
+uint64x1_t
+test_vsubd_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vsubd_u64 (a, b);
+}
+
+int64x1_t
+test_vsubd_s64 (int64x1_t a, int64x1_t b)
+{
+ return vsubd_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsub\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vsubd_s64_2 (int64x1_t a, int64x1_t b, int64x1_t c, int64x1_t d)
+{
+ return vqsubd_s64 (vsubd_s64 (vqsubd_s64 (a, b), vqsubd_s64 (c, d)),
+ vqsubd_s64 (a, d));
+}
+
+/* { dg-final { scan-assembler-times "\\tuqsub\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vqsubd_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vqsubd_u64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqsub\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqsubs_u32 (uint32_t a, uint32_t b)
+{
+ return vqsubs_u32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqsub\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqsubh_u16 (uint16_t a, uint16_t b)
+{
+ return vqsubh_u16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqsub\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqsubb_u8 (uint8_t a, uint8_t b)
+{
+ return vqsubb_u8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqsub\\td\[0-9\]+" 5 } } */
+
+int64x1_t
+test_vqsubd_s64 (int64x1_t a, int64x1_t b)
+{
+ return vqsubd_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqsub\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqsubs_s32 (int32_t a, int32_t b)
+{
+ return vqsubs_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqsub\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqsubh_s16 (int16_t a, int16_t b)
+{
+ return vqsubh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqsub\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqsubb_s8 (int8_t a, int8_t b)
+{
+ return vqsubb_s8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshl\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vshld_s64 (int64x1_t a, int64x1_t b)
+{
+ return vshld_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tushl\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vshld_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vshld_u64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsrshl\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vrshld_s64 (int64x1_t a, int64x1_t b)
+{
+ return vrshld_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\turshl\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vrshld_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vrshld_u64 (a, b);
+}
+
+/* Other intrinsics can generate an asr instruction (vcltzd, vcgezd),
+ so we cannot check scan-assembler-times. */
+
+/* { dg-final { scan-assembler "\\tasr\\tx\[0-9\]+" } } */
+
+int64x1_t
+test_vshrd_n_s64 (int64x1_t a)
+{
+ return vshrd_n_s64 (a, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\tlsr\\tx\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vshrd_n_u64 (uint64x1_t a)
+{
+ return vshrd_n_u64 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tssra\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vsrad_n_s64 (int64x1_t a, int64x1_t b)
+{
+ return vsrad_n_s64 (a, b, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tusra\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vsrad_n_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vsrad_n_u64 (a, b, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\tsrshr\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vrshrd_n_s64 (int64x1_t a)
+{
+ return vrshrd_n_s64 (a, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\turshr\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vrshrd_n_u64 (uint64x1_t a)
+{
+ return vrshrd_n_u64 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsrsra\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vrsrad_n_s64 (int64x1_t a, int64x1_t b)
+{
+ return vrsrad_n_s64 (a, b, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsrsra\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vrsrad_n_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vrsrad_n_u64 (a, b, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshl\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqrshlb_s8 (int8_t a, int8_t b)
+{
+ return vqrshlb_s8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshl\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqrshlh_s16 (int16_t a, int16_t b)
+{
+ return vqrshlh_s16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshl\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqrshls_s32 (int32_t a, int32_t b)
+{
+ return vqrshls_s32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshl\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vqrshld_s64 (int64x1_t a, int64x1_t b)
+{
+ return vqrshld_s64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshl\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqrshlb_u8 (uint8_t a, uint8_t b)
+{
+ return vqrshlb_u8 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshl\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqrshlh_u16 (uint16_t a, uint16_t b)
+{
+ return vqrshlh_u16 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshl\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqrshls_u32 (uint32_t a, uint32_t b)
+{
+ return vqrshls_u32 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshl\\td\[0-9\]+" 1 } } */
+
+uint64x1_t
+test_vqrshld_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vqrshld_u64 (a, b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshlu\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqshlub_n_s8 (int8_t a)
+{
+ return vqshlub_n_s8 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshlu\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqshluh_n_s16 (int16_t a)
+{
+ return vqshluh_n_s16 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshlu\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqshlus_n_s32 (int32_t a)
+{
+ return vqshlus_n_s32 (a, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshlu\\td\[0-9\]+" 1 } } */
+
+int64x1_t
+test_vqshlud_n_s64 (int64x1_t a)
+{
+ return vqshlud_n_s64 (a, 6);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshl\\tb\[0-9\]+" 2 } } */
+
+int8_t
+test_vqshlb_s8 (int8_t a, int8_t b)
+{
+ return vqshlb_s8 (a, b);
+}
+
+int8_t
+test_vqshlb_n_s8 (int8_t a)
+{
+ return vqshlb_n_s8 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshl\\th\[0-9\]+" 2 } } */
+
+int16_t
+test_vqshlh_s16 (int16_t a, int16_t b)
+{
+ return vqshlh_s16 (a, b);
+}
+
+int16_t
+test_vqshlh_n_s16 (int16_t a)
+{
+ return vqshlh_n_s16 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshl\\ts\[0-9\]+" 2 } } */
+
+int32_t
+test_vqshls_s32 (int32_t a, int32_t b)
+{
+ return vqshls_s32 (a, b);
+}
+
+int32_t
+test_vqshls_n_s32 (int32_t a)
+{
+ return vqshls_n_s32 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshl\\td\[0-9\]+" 2 } } */
+
+int64x1_t
+test_vqshld_s64 (int64x1_t a, int64x1_t b)
+{
+ return vqshld_s64 (a, b);
+}
+
+int64x1_t
+test_vqshld_n_s64 (int64x1_t a)
+{
+ return vqshld_n_s64 (a, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshl\\tb\[0-9\]+" 2 } } */
+
+uint8_t
+test_vqshlb_u8 (uint8_t a, uint8_t b)
+{
+ return vqshlb_u8 (a, b);
+}
+
+uint8_t
+test_vqshlb_n_u8 (uint8_t a)
+{
+ return vqshlb_n_u8 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshl\\th\[0-9\]+" 2 } } */
+
+uint16_t
+test_vqshlh_u16 (uint16_t a, uint16_t b)
+{
+ return vqshlh_u16 (a, b);
+}
+
+uint16_t
+test_vqshlh_n_u16 (uint16_t a)
+{
+ return vqshlh_n_u16 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshl\\ts\[0-9\]+" 2 } } */
+
+uint32_t
+test_vqshls_u32 (uint32_t a, uint32_t b)
+{
+ return vqshls_u32 (a, b);
+}
+
+uint32_t
+test_vqshls_n_u32 (uint32_t a)
+{
+ return vqshls_n_u32 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshl\\td\[0-9\]+" 2 } } */
+
+uint64x1_t
+test_vqshld_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vqshld_u64 (a, b);
+}
+
+uint64x1_t
+test_vqshld_n_u64 (uint64x1_t a)
+{
+ return vqshld_n_u64 (a, 5);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrun\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqshrunh_n_s16 (int16_t a)
+{
+ return vqshrunh_n_s16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrun\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqshruns_n_s32 (int32_t a)
+{
+ return vqshruns_n_s32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrun\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqshrund_n_s64 (int64x1_t a)
+{
+ return vqshrund_n_s64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrun\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqrshrunh_n_s16 (int16_t a)
+{
+ return vqrshrunh_n_s16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrun\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqrshruns_n_s32 (int32_t a)
+{
+ return vqrshruns_n_s32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrun\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqrshrund_n_s64 (int64x1_t a)
+{
+ return vqrshrund_n_s64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrn\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqshrnh_n_s16 (int16_t a)
+{
+ return vqshrnh_n_s16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrn\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqshrns_n_s32 (int32_t a)
+{
+ return vqshrns_n_s32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqshrn\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqshrnd_n_s64 (int64x1_t a)
+{
+ return vqshrnd_n_s64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshrn\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqshrnh_n_u16 (uint16_t a)
+{
+ return vqshrnh_n_u16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshrn\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqshrns_n_u32 (uint32_t a)
+{
+ return vqshrns_n_u32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqshrn\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqshrnd_n_u64 (uint64x1_t a)
+{
+ return vqshrnd_n_u64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrn\\tb\[0-9\]+" 1 } } */
+
+int8_t
+test_vqrshrnh_n_s16 (int16_t a)
+{
+ return vqrshrnh_n_s16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrn\\th\[0-9\]+" 1 } } */
+
+int16_t
+test_vqrshrns_n_s32 (int32_t a)
+{
+ return vqrshrns_n_s32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqrshrn\\ts\[0-9\]+" 1 } } */
+
+int32_t
+test_vqrshrnd_n_s64 (int64x1_t a)
+{
+ return vqrshrnd_n_s64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshrn\\tb\[0-9\]+" 1 } } */
+
+uint8_t
+test_vqrshrnh_n_u16 (uint16_t a)
+{
+ return vqrshrnh_n_u16 (a, 2);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshrn\\th\[0-9\]+" 1 } } */
+
+uint16_t
+test_vqrshrns_n_u32 (uint32_t a)
+{
+ return vqrshrns_n_u32 (a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tuqrshrn\\ts\[0-9\]+" 1 } } */
+
+uint32_t
+test_vqrshrnd_n_u64 (uint64x1_t a)
+{
+ return vqrshrnd_n_u64 (a, 4);
+}
+
+/* { dg-final { scan-assembler-times "\\tlsl\\tx\[0-9\]+" 2 } } */
+
+int64x1_t
+test_vshl_n_s64 (int64x1_t a)
+{
+ return vshld_n_s64 (a, 9);
+}
+
+uint64x1_t
+test_vshl_n_u64 (uint64x1_t a)
+{
+ return vshld_n_u64 (a, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tsli\\td\[0-9\]+" 2 } } */
+
+int64x1_t
+test_vsli_n_s64 (int64x1_t a, int64x1_t b)
+{
+ return vslid_n_s64 (a, b, 9);
+}
+
+uint64x1_t
+test_vsli_n_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vslid_n_u64 (a, b, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tsri\\td\[0-9\]+" 2 } } */
+
+int64x1_t
+test_vsri_n_s64 (int64x1_t a, int64x1_t b)
+{
+ return vsrid_n_s64 (a, b, 9);
+}
+
+uint64x1_t
+test_vsri_n_u64 (uint64x1_t a, uint64x1_t b)
+{
+ return vsrid_n_u64 (a, b, 9);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c
new file mode 100644
index 0000000000..7cb17f89c5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/scalar_shift_1.c
@@ -0,0 +1,263 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline -save-temps" } */
+
+extern void abort ();
+
+#define force_simd_di(v) asm volatile ("mov %d0, %1.d[0]" :"=w" (v) :"w" (v) :)
+#define force_simd_si(v) asm volatile ("mov %s0, %1.s[0]" :"=w" (v) :"w" (v) :)
+
+typedef unsigned long long int UInt64x1;
+typedef long long int Int64x1;
+typedef unsigned int UInt32x1;
+typedef int Int32x1;
+
+UInt64x1
+test_lshift_left_sisd_di (UInt64x1 b, UInt64x1 c)
+{
+ UInt64x1 a;
+
+ force_simd_di (b);
+ force_simd_di (c);
+ a = b << 8;
+ a = a << c;
+ force_simd_di (a);
+ return a;
+}
+/* { dg-final { scan-assembler "shl\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
+/* { dg-final { scan-assembler "ushl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+
+UInt32x1
+test_lshift_left_sisd_si (UInt32x1 b, UInt32x1 c)
+{
+ UInt32x1 a;
+
+ force_simd_si (b);
+ force_simd_si (c);
+ a = b << 4;
+ a = a << c;
+ force_simd_si (a);
+ return a;
+}
+/* { dg-final { scan-assembler "shl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
+/* "ushl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" (counted later) */
+
+UInt64x1
+test_lshift_right_sisd_di (UInt64x1 b, UInt64x1 c)
+{
+ UInt64x1 a;
+
+ force_simd_di (b);
+ force_simd_di (c);
+ a = b >> 8;
+ a = a >> c;
+ force_simd_di (a);
+ return a;
+}
+/* { dg-final { scan-assembler "ushr\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
+/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
+/* { dg-final { scan-assembler "ushl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+
+UInt64x1
+test_lshift_right_sisd_si (UInt32x1 b, UInt32x1 c)
+{
+ UInt32x1 a;
+
+ force_simd_si (b);
+ force_simd_si (c);
+ a = b >> 4;
+ a = a >> c;
+ force_simd_si (a);
+ return a;
+}
+/* { dg-final { scan-assembler "ushr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
+/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
+/* { dg-final { scan-assembler-times "ushl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" 2 } } */
+
+Int64x1
+test_ashift_right_sisd_di (Int64x1 b, Int64x1 c)
+{
+ Int64x1 a;
+
+ force_simd_di (b);
+ force_simd_di (c);
+ a = b >> 8;
+ a = a >> c;
+ force_simd_di (a);
+ return a;
+}
+/* { dg-final { scan-assembler "sshr\td\[0-9\]+,\ d\[0-9\]+,\ 8" } } */
+/* "neg\td\[0-9\]+,\ d\[0-9\]+" (counted later) */
+/* { dg-final { scan-assembler "sshl\td\[0-9\]+,\ d\[0-9\]+,\ d\[0-9\]+" } } */
+
+Int32x1
+test_ashift_right_sisd_si (Int32x1 b, Int32x1 c)
+{
+ Int32x1 a;
+
+ force_simd_si (b);
+ force_simd_si (c);
+ a = b >> 4;
+ a = a >> c;
+ force_simd_si (a);
+ return a;
+}
+/* { dg-final { scan-assembler "sshr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 4" } } */
+/* { dg-final { scan-assembler-times "neg\td\[0-9\]+,\ d\[0-9\]+" 4 } } */
+/* { dg-final { scan-assembler "sshl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" } } */
+
+
+/* The following are to make sure if the integer instructions lsl/lsr/asr are
+ generated in non-vector scenarios */
+
+UInt64x1
+test_lshift_left_int_di (UInt64x1 b, UInt64x1 c)
+{
+ UInt64x1 a;
+
+ a = b << 8;
+ a = a << c;
+ return a;
+}
+/* { dg-final { scan-assembler "lsl\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
+/* { dg-final { scan-assembler "lsl\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+
+UInt32x1
+test_lshift_left_int_si (UInt32x1 b, UInt32x1 c)
+{
+ UInt32x1 a;
+
+ a = b << 4;
+ a = a << c;
+ return a;
+}
+/* { dg-final { scan-assembler "lsl\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
+/* { dg-final { scan-assembler "lsl\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+
+UInt64x1
+test_lshift_right_int_di (UInt64x1 b, UInt64x1 c)
+{
+ UInt64x1 a;
+
+ a = b >> 8;
+ a = a >> c;
+ return a;
+}
+/* { dg-final { scan-assembler "lsr\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
+/* { dg-final { scan-assembler "lsr\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+
+UInt32x1
+test_lshift_right_int_si (UInt32x1 b, UInt32x1 c)
+{
+ UInt32x1 a;
+
+ a = b >> 4;
+ a = a >> c;
+ return a;
+}
+/* { dg-final { scan-assembler "lsr\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
+/* { dg-final { scan-assembler "lsr\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+
+Int64x1
+test_ashift_right_int_di (Int64x1 b, Int64x1 c)
+{
+ Int64x1 a;
+
+ a = b >> 8;
+ a = a >> c;
+ return a;
+}
+/* { dg-final { scan-assembler "asr\tx\[0-9\]+,\ x\[0-9\]+,\ 8" } } */
+/* { dg-final { scan-assembler "asr\tx\[0-9\]+,\ x\[0-9\]+,\ x\[0-9\]+" } } */
+
+Int32x1
+test_ashift_right_int_si (Int32x1 b, Int32x1 c)
+{
+ Int32x1 a;
+
+ a = b >> 4;
+ a = a >> c;
+ return a;
+}
+/* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ 4" } } */
+/* { dg-final { scan-assembler "asr\tw\[0-9\]+,\ w\[0-9\]+,\ w\[0-9\]+" } } */
+
+Int64x1
+test_corners_sisd_di (Int64x1 b)
+{
+ force_simd_di (b);
+ b = b >> 63;
+ b = b >> 0;
+ b += b >> 65; /* { dg-warning "right shift count >= width of type" } */
+ force_simd_di (b);
+
+ return b;
+}
+/* { dg-final { scan-assembler "sshr\td\[0-9\]+,\ d\[0-9\]+,\ 63" } } */
+/* { dg-final { scan-assembler "shl\td\[0-9\]+,\ d\[0-9\]+,\ 1" } } */
+
+Int32x1
+test_corners_sisd_si (Int32x1 b)
+{
+ force_simd_si (b);
+ b = b >> 31;
+ b = b >> 0;
+ b += b >> 33; /* { dg-warning "right shift count >= width of type" } */
+ force_simd_si (b);
+
+ return b;
+}
+/* { dg-final { scan-assembler "sshr\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 31" } } */
+/* { dg-final { scan-assembler "shl\tv\[0-9\]+\.2s,\ v\[0-9\]+\.2s,\ 1" } } */
+
+
+
+#define CHECK(var,val) \
+do \
+ { \
+ if (var != val) \
+ abort(); \
+ } \
+while(0)
+
+UInt64x1 x = 0xC01dDeadBeefFaceull;
+UInt32x1 y = 0xDeadBeef;
+
+int
+main ()
+{
+ x = test_lshift_left_sisd_di (x, 8);
+ CHECK (x, 0xdeadbeefface0000ull);
+ x = test_lshift_right_int_di (x, 8);
+ CHECK (x, 0x0000deadbeeffaceull);
+ x = test_lshift_right_sisd_di (x, 8);
+ CHECK (x, 0x00000000deadbeefull);
+ x = test_lshift_left_int_di (x, 8);
+ CHECK (x, 0x0000deadbeef0000ull);
+ x = ~x;
+ x = test_ashift_right_int_di (x, 8);
+ CHECK (x, 0xffffffff21524110ull);
+ x = test_ashift_right_sisd_di (x, 8);
+ CHECK (x, 0xffffffffffff2152ull);
+ x = test_corners_sisd_di (x);
+ CHECK (x, 0xfffffffffffffffeull);
+
+ y = test_lshift_left_sisd_si (y, 4);
+ CHECK (y, 0xadbeef00);
+ y = test_lshift_right_int_si (y, 4);
+ CHECK (y, 0x00adbeef);
+ y = test_lshift_right_sisd_si (y, 4);
+ CHECK (y, 0x0000adbe);
+ y = test_lshift_left_int_si (y, 4);
+ CHECK (y, 0x00adbe00);
+ y = ~y;
+ y = test_ashift_right_int_si (y, 4);
+ CHECK (y, 0xffff5241);
+ y = test_ashift_right_sisd_si (y, 4);
+ CHECK (y, 0xffffff52);
+ y = test_corners_sisd_si (y);
+ CHECK (y, 0xfffffffe);
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sha1_1.c b/gcc/testsuite/gcc.target/aarch64/sha1_1.c
new file mode 100644
index 0000000000..776753dcd5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sha1_1.c
@@ -0,0 +1,55 @@
+
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+crypto" } */
+
+#include "arm_neon.h"
+
+uint32x4_t
+test_vsha1cq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
+{
+ return vsha1cq_u32 (hash_abcd, hash_e, wk);
+}
+
+/* { dg-final { scan-assembler-times "sha1c\\tq" 1 } } */
+
+uint32x4_t
+test_vsha1mq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
+{
+ return vsha1mq_u32 (hash_abcd, hash_e, wk);
+}
+
+/* { dg-final { scan-assembler-times "sha1m\\tq" 1 } } */
+
+uint32x4_t
+test_vsha1pq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
+{
+ return vsha1pq_u32 (hash_abcd, hash_e, wk);
+}
+
+/* { dg-final { scan-assembler-times "sha1p\\tq" 1 } } */
+
+uint32_t
+test_vsha1h_u32 (uint32_t hash_e)
+{
+ return vsha1h_u32 (hash_e);
+}
+
+/* { dg-final { scan-assembler-times "sha1h\\ts" 1 } } */
+
+uint32x4_t
+test_vsha1su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7, uint32x4_t w8_11)
+{
+ return vsha1su0q_u32 (w0_3, w4_7, w8_11);
+}
+
+/* { dg-final { scan-assembler-times "sha1su0\\tv" 1 } } */
+
+uint32x4_t
+test_vsha1su1q_u32 (uint32x4_t tw0_3, uint32x4_t w12_15)
+{
+ return vsha1su1q_u32 (tw0_3, w12_15);
+}
+
+/* { dg-final { scan-assembler-times "sha1su1\\tv" 1 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sha256_1.c b/gcc/testsuite/gcc.target/aarch64/sha256_1.c
new file mode 100644
index 0000000000..569817eb08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sha256_1.c
@@ -0,0 +1,40 @@
+
+/* { dg-do compile } */
+/* { dg-options "-march=armv8-a+crypto" } */
+
+#include "arm_neon.h"
+
+uint32x4_t
+test_vsha256hq_u32 (uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk)
+{
+ return vsha256hq_u32 (hash_abcd, hash_efgh, wk);
+}
+
+/* { dg-final { scan-assembler-times "sha256h\\tq" 1 } } */
+
+uint32x4_t
+test_vsha256h2q_u32 (uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk)
+{
+ return vsha256h2q_u32 (hash_efgh, hash_abcd, wk);
+}
+
+/* { dg-final { scan-assembler-times "sha256h2\\tq" 1 } } */
+
+uint32x4_t
+test_vsha256su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7)
+{
+ return vsha256su0q_u32 (w0_3, w4_7);
+}
+
+/* { dg-final { scan-assembler-times "sha256su0\\tv" 1 } } */
+
+uint32x4_t
+test_vsha256su1q_u32 (uint32x4_t tw0_3, uint32x4_t w8_11, uint32x4_t w12_15)
+{
+ return vsha256su1q_u32 (tw0_3, w8_11, w12_15);
+}
+
+/* { dg-final { scan-assembler-times "sha256su1\\tv" 1 } } */
+
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/sshr64_1.c b/gcc/testsuite/gcc.target/aarch64/sshr64_1.c
new file mode 100644
index 0000000000..89c6096ad3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/sshr64_1.c
@@ -0,0 +1,115 @@
+/* Test SIMD shift works correctly. */
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include "arm_neon.h"
+
+extern void abort (void);
+
+int __attribute__ ((noinline))
+test_sshr64 ()
+{
+ int64x1_t arg;
+ int64x1_t result;
+ int64_t got;
+ int64_t exp;
+ arg = vcreate_s64 (0x0000000080000000);
+ result = vshr_n_s64 (arg, 64);
+ got = vget_lane_s64 (result, 0);
+ exp = 0;
+ /* Expect: "result" = 0000000000000000. */
+ if (exp != got)
+ return 1;
+ return 0;
+}
+
+int __attribute__ ((noinline))
+test_sshr64_neg ()
+{
+ int64x1_t arg;
+ int64x1_t result;
+ int64_t got;
+ int64_t exp;
+ arg = vcreate_s64 (0xffffffff80000000);
+ result = vshr_n_s64 (arg, 64);
+ got = vget_lane_s64 (result, 0);
+ exp = 0xffffffffffffffff;
+ /* Expect: "result" = -1. */
+ if (exp != got)
+ return 1;
+ return 0;
+}
+
+int
+__attribute__ ((noinline))
+test_other ()
+{
+ int64x1_t arg;
+ int64x1_t result;
+ int64_t got;
+ int64_t exp;
+ arg = vcreate_s64 (0x0000000080000000);
+ result = vshr_n_s64 (arg, 4);
+ got = vget_lane_s64 (result, 0);
+ exp = 0x0000000008000000;
+ /* Expect: "result" = 0x0000000008000000. */
+ if (exp != got)
+ return 1;
+ return 0;
+}
+
+int __attribute__ ((noinline))
+test_other_neg ()
+{
+ int64x1_t arg;
+ int64x1_t result;
+ int64_t got;
+ int64_t exp;
+ arg = vcreate_s64 (0xffffffff80000000);
+ result = vshr_n_s64 (arg, 4);
+ got = vget_lane_s64 (result, 0);
+ exp = 0xfffffffff8000000;
+ /* Expect: "result" = 0xfffffffff8000000. */
+ if (exp != got)
+ return 1;
+ return 0;
+}
+
+int __attribute__ ((noinline))
+test_no_sshr0 ()
+{
+ int64x1_t arg;
+ int64x1_t result;
+ int64_t got;
+ int64_t exp;
+ arg = vcreate_s64 (0x0000000080000000);
+ result = vshr_n_s64 (arg, 0);
+ got = vget_lane_s64 (result, 0);
+ exp = 0x0000000080000000;
+ /* Expect: "result" = 0x0000000080000000. */
+ if (exp != got)
+ return 1;
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "sshr\\td\[0-9\]+, d\[0-9\]+, 0" } } */
+int
+main ()
+{
+ if (test_sshr64 ())
+ abort ();
+ if (test_other ())
+ abort ();
+
+ if (test_sshr64_neg ())
+ abort ();
+ if (test_other_neg ())
+ abort ();
+
+ if (test_no_sshr0 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/subs.c b/gcc/testsuite/gcc.target/aarch64/subs.c
new file mode 100644
index 0000000000..2bf197585d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/subs.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int z;
+int
+foo (int x, int y)
+{
+ int l = x - y;
+ if (l == 0)
+ return 5;
+
+ /* { dg-final { scan-assembler "subs\tw\[0-9\]" } } */
+ z = l ;
+ return 25;
+}
+
+typedef long long s64;
+
+s64 zz;
+s64
+foo2 (s64 x, s64 y)
+{
+ s64 l = x - y;
+ if (l < 0)
+ return 5;
+
+ /* { dg-final { scan-assembler "subs\tx\[0-9\]" } } */
+ zz = l ;
+ return 25;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/subs1.c b/gcc/testsuite/gcc.target/aarch64/subs1.c
new file mode 100644
index 0000000000..7e4b2b812c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/subs1.c
@@ -0,0 +1,149 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+subs_si_test1 (int a, int b, int c)
+{
+ int d = a - c;
+
+ /* { dg-final { scan-assembler "subs\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+subs_si_test2 (int a, int b, int c)
+{
+ int d = a - 0xff;
+
+ /* { dg-final { scan-assembler "subs\tw\[0-9\]+, w\[0-9\]+, #255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+subs_si_test3 (int a, int b, int c)
+{
+ int d = a - (b << 3);
+
+ /* { dg-final { scan-assembler "subs\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+subs_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - c;
+
+ /* { dg-final { scan-assembler "subs\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+subs_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - 0xff;
+
+ /* { dg-final { scan-assembler "subs\tx\[0-9\]+, x\[0-9\]+, #255" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+subs_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - (b << 3);
+
+ /* { dg-final { scan-assembler "subs\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = subs_si_test1 (29, 4, 5);
+ if (x != 33)
+ abort ();
+
+ x = subs_si_test1 (5, 2, 20);
+ if (x != 7)
+ abort ();
+
+ x = subs_si_test2 (29, 4, 5);
+ if (x != -217)
+ abort ();
+
+ x = subs_si_test2 (1024, 2, 20);
+ if (x != 791)
+ abort ();
+
+ x = subs_si_test3 (35, 4, 5);
+ if (x != 12)
+ abort ();
+
+ x = subs_si_test3 (5, 2, 20);
+ if (x != 11)
+ abort ();
+
+ y = subs_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 0x45000002d)
+ abort ();
+
+ y = subs_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x7111711171117)
+ abort ();
+
+ y = subs_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x955050433)
+ abort ();
+
+ y = subs_di_test2 (0x130002900ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x955052d0a)
+ abort ();
+
+ y = subs_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 0x3790504f6)
+ abort ();
+
+ y = subs_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 0x27d052dcd)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/subs2.c b/gcc/testsuite/gcc.target/aarch64/subs2.c
new file mode 100644
index 0000000000..d90ead5144
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/subs2.c
@@ -0,0 +1,155 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+subs_si_test1 (int a, int b, int c)
+{
+ int d = a - b;
+
+ /* { dg-final { scan-assembler-not "subs\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+subs_si_test2 (int a, int b, int c)
+{
+ int d = a - 0xfff;
+
+ /* { dg-final { scan-assembler-not "subs\tw\[0-9\]+, w\[0-9\]+, #4095" } } */
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+, w\[0-9\]+, #4095" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+subs_si_test3 (int a, int b, int c)
+{
+ int d = a - (b << 3);
+
+ /* { dg-final { scan-assembler-not "subs\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "sub\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+typedef long long s64;
+
+s64
+subs_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - b;
+
+ /* { dg-final { scan-assembler-not "subs\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+subs_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - 0x1000ll;
+
+ /* { dg-final { scan-assembler-not "subs\tx\[0-9\]+, x\[0-9\]+, #4096" } } */
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+, x\[0-9\]+, #4096" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+s64
+subs_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a - (b << 3);
+
+ /* { dg-final { scan-assembler-not "subs\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "sub\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = subs_si_test1 (29, 4, 5);
+ if (x != 34)
+ abort ();
+
+ x = subs_si_test1 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ x = subs_si_test2 (29, 4, 5);
+ if (x != 34)
+ abort ();
+
+ x = subs_si_test2 (1024, 2, 20);
+ if (x != 1044)
+ abort ();
+
+ x = subs_si_test3 (35, 4, 5);
+ if (x != 12)
+ abort ();
+
+ x = subs_si_test3 (5, 2, 20);
+ if (x != 25)
+ abort ();
+
+ y = subs_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 0x63505052e)
+ abort ();
+
+ y = subs_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 0x5000500052025)
+ abort ();
+
+ y = subs_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 0x95504f532)
+ abort ();
+
+ y = subs_di_test2 (0x540004100ll,
+ 0x320000004ll,
+ 0x805050205ll);
+ if (y != 0x1065053309)
+ abort ();
+
+ y = subs_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 0x63505052e)
+ abort ();
+
+ y = subs_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 0x635052e05)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/subs3.c b/gcc/testsuite/gcc.target/aarch64/subs3.c
new file mode 100644
index 0000000000..90f20b8439
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/subs3.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+typedef long long s64;
+
+int
+subs_ext (s64 a, int b, int c)
+{
+ s64 d = a - b;
+
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int
+subs_shift_ext (s64 a, int b, int c)
+{
+ s64 d = (a - ((s64)b << 3));
+
+ if (d == 0)
+ return a + c;
+ else
+ return b + d + c;
+}
+
+int main ()
+{
+ int x;
+ s64 y;
+
+ x = subs_ext (0x13000002ll, 41, 15);
+ if (x != 318767121)
+ abort ();
+
+ x = subs_ext (0x50505050ll, 29, 4);
+ if (x != 1347440724)
+ abort ();
+
+ x = subs_ext (0x12121212121ll, 2, 14);
+ if (x != 555819311)
+ abort ();
+
+ x = subs_shift_ext (0x123456789ll, 4, 12);
+ if (x != 591751033)
+ abort ();
+
+ x = subs_shift_ext (0x02020202ll, 9, 8);
+ if (x != 33685963)
+ abort ();
+
+ x = subs_shift_ext (0x987987987987ll, 23, 41);
+ if (x != -2020050673)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "subs\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, sxtw" 2 } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/table-intrinsics.c b/gcc/testsuite/gcc.target/aarch64/table-intrinsics.c
new file mode 100644
index 0000000000..6281cdae74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/table-intrinsics.c
@@ -0,0 +1,439 @@
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+
+int8x8_t
+tbl_tests8_ (int8x8_t tab, int8x8_t idx)
+{
+ return vtbl1_s8 (tab, idx);
+}
+
+uint8x8_t
+tbl_testu8_ (uint8x8_t tab, uint8x8_t idx)
+{
+ return vtbl1_u8 (tab, idx);
+}
+
+poly8x8_t
+tbl_testp8_ (poly8x8_t tab, uint8x8_t idx)
+{
+ return vtbl1_p8 (tab, idx);
+}
+
+int8x8_t
+tbl_tests8_2 (int8x8x2_t tab, int8x8_t idx)
+{
+ return vtbl2_s8 (tab, idx);
+}
+
+uint8x8_t
+tbl_testu8_2 (uint8x8x2_t tab, uint8x8_t idx)
+{
+ return vtbl2_u8 (tab, idx);
+}
+
+poly8x8_t
+tbl_testp8_2 (poly8x8x2_t tab, uint8x8_t idx)
+{
+ return vtbl2_p8 (tab, idx);
+}
+
+int8x8_t
+tbl_tests8_3 (int8x8x3_t tab, int8x8_t idx)
+{
+ return vtbl3_s8 (tab, idx);
+}
+
+uint8x8_t
+tbl_testu8_3 (uint8x8x3_t tab, uint8x8_t idx)
+{
+ return vtbl3_u8 (tab, idx);
+}
+
+poly8x8_t
+tbl_testp8_3 (poly8x8x3_t tab, uint8x8_t idx)
+{
+ return vtbl3_p8 (tab, idx);
+}
+
+int8x8_t
+tbl_tests8_4 (int8x8x4_t tab, int8x8_t idx)
+{
+ return vtbl4_s8 (tab, idx);
+}
+
+uint8x8_t
+tbl_testu8_4 (uint8x8x4_t tab, uint8x8_t idx)
+{
+ return vtbl4_u8 (tab, idx);
+}
+
+poly8x8_t
+tbl_testp8_4 (poly8x8x4_t tab, uint8x8_t idx)
+{
+ return vtbl4_p8 (tab, idx);
+}
+
+int8x8_t
+tb_tests8_ (int8x8_t r, int8x8_t tab, int8x8_t idx)
+{
+ return vtbx1_s8 (r, tab, idx);
+}
+
+uint8x8_t
+tb_testu8_ (uint8x8_t r, uint8x8_t tab, uint8x8_t idx)
+{
+ return vtbx1_u8 (r, tab, idx);
+}
+
+poly8x8_t
+tb_testp8_ (poly8x8_t r, poly8x8_t tab, uint8x8_t idx)
+{
+ return vtbx1_p8 (r, tab, idx);
+}
+
+int8x8_t
+tb_tests8_2 (int8x8_t r, int8x8x2_t tab, int8x8_t idx)
+{
+ return vtbx2_s8 (r, tab, idx);
+}
+
+uint8x8_t
+tb_testu8_2 (uint8x8_t r, uint8x8x2_t tab, uint8x8_t idx)
+{
+ return vtbx2_u8 (r, tab, idx);
+}
+
+poly8x8_t
+tb_testp8_2 (poly8x8_t r, poly8x8x2_t tab, uint8x8_t idx)
+{
+ return vtbx2_p8 (r, tab, idx);
+}
+
+int8x8_t
+tb_tests8_3 (int8x8_t r, int8x8x3_t tab, int8x8_t idx)
+{
+ return vtbx3_s8 (r, tab, idx);
+}
+
+uint8x8_t
+tb_testu8_3 (uint8x8_t r, uint8x8x3_t tab, uint8x8_t idx)
+{
+ return vtbx3_u8 (r, tab, idx);
+}
+
+poly8x8_t
+tb_testp8_3 (poly8x8_t r, poly8x8x3_t tab, uint8x8_t idx)
+{
+ return vtbx3_p8 (r, tab, idx);
+}
+
+int8x8_t
+tb_tests8_4 (int8x8_t r, int8x8x4_t tab, int8x8_t idx)
+{
+ return vtbx4_s8 (r, tab, idx);
+}
+
+uint8x8_t
+tb_testu8_4 (uint8x8_t r, uint8x8x4_t tab, uint8x8_t idx)
+{
+ return vtbx4_u8 (r, tab, idx);
+}
+
+poly8x8_t
+tb_testp8_4 (poly8x8_t r, poly8x8x4_t tab, uint8x8_t idx)
+{
+ return vtbx4_p8 (r, tab, idx);
+}
+
+int8x8_t
+qtbl_tests8_ (int8x16_t tab, uint8x8_t idx)
+{
+ return vqtbl1_s8 (tab, idx);
+}
+
+uint8x8_t
+qtbl_testu8_ (uint8x16_t tab, uint8x8_t idx)
+{
+ return vqtbl1_u8 (tab, idx);
+}
+
+poly8x8_t
+qtbl_testp8_ (poly8x16_t tab, uint8x8_t idx)
+{
+ return vqtbl1_p8 (tab, idx);
+}
+
+int8x8_t
+qtbl_tests8_2 (int8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbl2_s8 (tab, idx);
+}
+
+uint8x8_t
+qtbl_testu8_2 (uint8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbl2_u8 (tab, idx);
+}
+
+poly8x8_t
+qtbl_testp8_2 (poly8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbl2_p8 (tab, idx);
+}
+
+int8x8_t
+qtbl_tests8_3 (int8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbl3_s8 (tab, idx);
+}
+
+uint8x8_t
+qtbl_testu8_3 (uint8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbl3_u8 (tab, idx);
+}
+
+poly8x8_t
+qtbl_testp8_3 (poly8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbl3_p8 (tab, idx);
+}
+
+int8x8_t
+qtbl_tests8_4 (int8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbl4_s8 (tab, idx);
+}
+
+uint8x8_t
+qtbl_testu8_4 (uint8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbl4_u8 (tab, idx);
+}
+
+poly8x8_t
+qtbl_testp8_4 (poly8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbl4_p8 (tab, idx);
+}
+
+int8x8_t
+qtb_tests8_ (int8x8_t r, int8x16_t tab, uint8x8_t idx)
+{
+ return vqtbx1_s8 (r, tab, idx);
+}
+
+uint8x8_t
+qtb_testu8_ (uint8x8_t r, uint8x16_t tab, uint8x8_t idx)
+{
+ return vqtbx1_u8 (r, tab, idx);
+}
+
+poly8x8_t
+qtb_testp8_ (poly8x8_t r, poly8x16_t tab, uint8x8_t idx)
+{
+ return vqtbx1_p8 (r, tab, idx);
+}
+
+int8x8_t
+qtb_tests8_2 (int8x8_t r, int8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbx2_s8 (r, tab, idx);
+}
+
+uint8x8_t
+qtb_testu8_2 (uint8x8_t r, uint8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbx2_u8 (r, tab, idx);
+}
+
+poly8x8_t
+qtb_testp8_2 (poly8x8_t r, poly8x16x2_t tab, uint8x8_t idx)
+{
+ return vqtbx2_p8 (r, tab, idx);
+}
+
+int8x8_t
+qtb_tests8_3 (int8x8_t r, int8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbx3_s8 (r, tab, idx);
+}
+
+uint8x8_t
+qtb_testu8_3 (uint8x8_t r, uint8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbx3_u8 (r, tab, idx);
+}
+
+poly8x8_t
+qtb_testp8_3 (poly8x8_t r, poly8x16x3_t tab, uint8x8_t idx)
+{
+ return vqtbx3_p8 (r, tab, idx);
+}
+
+int8x8_t
+qtb_tests8_4 (int8x8_t r, int8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbx4_s8 (r, tab, idx);
+}
+
+uint8x8_t
+qtb_testu8_4 (uint8x8_t r, uint8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbx4_u8 (r, tab, idx);
+}
+
+poly8x8_t
+qtb_testp8_4 (poly8x8_t r, poly8x16x4_t tab, uint8x8_t idx)
+{
+ return vqtbx4_p8 (r, tab, idx);
+}
+
+int8x16_t
+qtblq_tests8_ (int8x16_t tab, uint8x16_t idx)
+{
+ return vqtbl1q_s8 (tab, idx);
+}
+
+uint8x16_t
+qtblq_testu8_ (uint8x16_t tab, uint8x16_t idx)
+{
+ return vqtbl1q_u8 (tab, idx);
+}
+
+poly8x16_t
+qtblq_testp8_ (poly8x16_t tab, uint8x16_t idx)
+{
+ return vqtbl1q_p8 (tab, idx);
+}
+
+int8x16_t
+qtblq_tests8_2 (int8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbl2q_s8 (tab, idx);
+}
+
+uint8x16_t
+qtblq_testu8_2 (uint8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbl2q_u8 (tab, idx);
+}
+
+poly8x16_t
+qtblq_testp8_2 (poly8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbl2q_p8 (tab, idx);
+}
+
+int8x16_t
+qtblq_tests8_3 (int8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbl3q_s8 (tab, idx);
+}
+
+uint8x16_t
+qtblq_testu8_3 (uint8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbl3q_u8 (tab, idx);
+}
+
+poly8x16_t
+qtblq_testp8_3 (poly8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbl3q_p8 (tab, idx);
+}
+
+int8x16_t
+qtblq_tests8_4 (int8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbl4q_s8 (tab, idx);
+}
+
+uint8x16_t
+qtblq_testu8_4 (uint8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbl4q_u8 (tab, idx);
+}
+
+poly8x16_t
+qtblq_testp8_4 (poly8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbl4q_p8 (tab, idx);
+}
+
+int8x16_t
+qtbxq_tests8_ (int8x16_t r, int8x16_t tab, uint8x16_t idx)
+{
+ return vqtbx1q_s8 (r, tab, idx);
+}
+
+uint8x16_t
+qtbxq_testu8_ (uint8x16_t r, uint8x16_t tab, uint8x16_t idx)
+{
+ return vqtbx1q_u8 (r, tab, idx);
+}
+
+poly8x16_t
+qtbxq_testp8_ (poly8x16_t r, poly8x16_t tab, uint8x16_t idx)
+{
+ return vqtbx1q_p8 (r, tab, idx);
+}
+
+int8x16_t
+qtbxq_tests8_2 (int8x16_t r, int8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbx2q_s8 (r, tab, idx);
+}
+
+uint8x16_t
+qtbxq_testu8_2 (uint8x16_t r, uint8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbx2q_u8 (r, tab, idx);
+}
+
+poly8x16_t
+qtbxq_testp8_2 (poly8x16_t r, poly8x16x2_t tab, uint8x16_t idx)
+{
+ return vqtbx2q_p8 (r, tab, idx);
+}
+
+int8x16_t
+qtbxq_tests8_3 (int8x16_t r, int8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbx3q_s8 (r, tab, idx);
+}
+
+uint8x16_t
+qtbxq_testu8_3 (uint8x16_t r, uint8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbx3q_u8 (r, tab, idx);
+}
+
+poly8x16_t
+qtbxq_testp8_3 (poly8x16_t r, poly8x16x3_t tab, uint8x16_t idx)
+{
+ return vqtbx3q_p8 (r, tab, idx);
+}
+
+int8x16_t
+qtbxq_tests8_4 (int8x16_t r, int8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbx4q_s8 (r, tab, idx);
+}
+
+uint8x16_t
+qtbxq_testu8_4 (uint8x16_t r, uint8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbx4q_u8 (r, tab, idx);
+}
+
+poly8x16_t
+qtbxq_testp8_4 (poly8x16_t r, poly8x16x4_t tab, uint8x16_t idx)
+{
+ return vqtbx4q_p8 (r, tab, idx);
+}
+
+/* { dg-final { scan-assembler-times "tbl v" 42} } */
+/* { dg-final { scan-assembler-times "tbx v" 30} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c
new file mode 100644
index 0000000000..e44ca6d4cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-1.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-no-clobber-lr.c"
+
+/* omit-frame-pointer is FALSE.
+ omit-leaf-frame-pointer is FALSE.
+ LR is not being clobbered in the leaf.
+
+ With no frame pointer omissions, we expect a frame record
+ for main and the leaf. */
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c
new file mode 100644
index 0000000000..40e483526b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-2.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-no-clobber-lr.c"
+
+/* omit-frame-pointer is TRUE.
+ omit-leaf-frame-pointer is false, but irrelevant due to omit-frame-pointer.
+ LR is not being clobbered in the leaf.
+
+ Since we asked to have no frame pointers anywhere, we expect no frame
+ record in main or the leaf. */
+
+/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c
new file mode 100644
index 0000000000..98cb2e0b62
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-3.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-no-clobber-lr.c"
+
+/* omit-frame-pointer is TRUE.
+ omit-leaf-frame-pointer is true, but irrelevant due to omit-frame-pointer.
+ LR is not being clobbered in the leaf.
+
+ Since we asked to have no frame pointers anywhere, we expect no frame
+ record in main or the leaf. */
+
+/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c
new file mode 100644
index 0000000000..4143a7a9cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-4.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-no-clobber-lr.c"
+
+/* omit-frame-pointer is FALSE.
+ omit-leaf-frame-pointer is TRUE.
+ LR is not being clobbered in the leaf.
+
+ Unless we are removing all frame records, it's OK to remove the frame
+ record for a leaf where LR is not clobbered. Therefore, we expect a
+ frame record only in main. */
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 1 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c
new file mode 100644
index 0000000000..c22bdc304a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-5.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-clobber-lr.c"
+
+/* omit-frame-pointer is FALSE.
+ omit-leaf-frame-pointer is FALSE.
+ LR is being clobbered in the leaf.
+
+ With no frame pointer omissions, we expect a frame record for main
+ and the leaf. */
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c
new file mode 100644
index 0000000000..e08ee43e5e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-6.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer -mno-omit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-clobber-lr.c"
+
+/* omit-frame-pointer is TRUE.
+ omit-leaf-frame-pointer is false, but irrelevant due to omit-frame-pointer.
+ LR is being clobbered in the leaf.
+
+ Since we asked to have no frame pointers anywhere, we expect no frame
+ record in main or the leaf. */
+
+/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c
new file mode 100644
index 0000000000..e8f7cabe77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-7.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fomit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-clobber-lr.c"
+
+/* omit-frame-pointer is TRUE.
+ omit-leaf-frame-pointer is true, but irrelevant due to omit-frame-pointer.
+ LR is being clobbered in the leaf.
+
+ Since we asked to have no frame pointers anywhere, we expect no frame
+ record in main or the leaf. */
+
+/* { dg-final { scan-assembler-not "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c b/gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c
new file mode 100644
index 0000000000..c09b687597
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-framepointer-8.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -momit-leaf-frame-pointer -fno-inline --save-temps" } */
+
+#include "asm-adder-clobber-lr.c"
+
+/* omit-frame-pointer is FALSE.
+ omit-leaf-frame-pointer is TRUE.
+ LR is being clobbered in the leaf.
+
+ Unless we are removing all frame records (which we aren't), it's
+ not OK to remove the frame record for a leaf where LR is clobbered.
+ Therefore, we expect a frame record in main and leaf. */
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test-ptr-arg-on-stack-1.c b/gcc/testsuite/gcc.target/aarch64/test-ptr-arg-on-stack-1.c
new file mode 100644
index 0000000000..bb68e0a568
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test-ptr-arg-on-stack-1.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline" } */
+
+/* Test pass-by-reference and pointer-typed argument passing on stack.
+ This test shall pass on any of the following four combinitions:
+ {big-endian, little-endian} {LP64, ILP32}. */
+
+struct s5
+{
+ double a;
+ double b;
+ double c;
+ double d;
+ double e;
+} gS = {1.0, 2.0, 3.0, 4.0, 5.0};
+
+double __attribute__ ((noinline))
+foo (struct s5 p1, struct s5 p2, struct s5 p3, struct s5 p4,
+ struct s5 p5, struct s5 p6, struct s5 p7, struct s5 p8,
+ struct s5 p9)
+{
+ asm ("");
+ return p9.c;
+}
+
+void abort (void);
+int printf (const char *, ...);
+
+int main (void)
+{
+ printf ("Here we print out some values and more importantly hope that"
+ " the stack is getting a bit dirty for the bug to manifest itself"
+ "\n\t%f, %f, %f, %f, %f\n", gS.a, gS.b, gS.c, gS.d, gS.e);
+
+ if (foo (gS, gS, gS, gS, gS, gS, gS, gS, gS) != 3.0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_1.c b/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_1.c
new file mode 100644
index 0000000000..7538250c9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_1.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -fno-omit-frame-pointer -fno-inline --save-temps" } */
+
+void
+leaf (void)
+{
+ int a = 0;
+}
+
+__attribute__ ((optimize("omit-frame-pointer")))
+void
+non_leaf_1 (void)
+{
+ leaf ();
+}
+
+__attribute__ ((optimize("omit-frame-pointer")))
+void
+non_leaf_2 (void)
+{
+ leaf ();
+}
+
+/* { dg-final { scan-assembler-times "str\tx30, \\\[sp\\\]" 2 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_2.c b/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_2.c
new file mode 100644
index 0000000000..675091f841
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/test_fp_attribute_2.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -fomit-frame-pointer -fno-inline --save-temps" } */
+
+void
+leaf (void)
+{
+ int a = 0;
+}
+
+__attribute__ ((optimize("no-omit-frame-pointer")))
+void
+non_leaf_1 (void)
+{
+ leaf ();
+}
+
+__attribute__ ((optimize("no-omit-frame-pointer")))
+void
+non_leaf_2 (void)
+{
+ leaf ();
+}
+
+/* { dg-final { scan-assembler-times "stp\tx29, x30, \\\[sp, -\[0-9\]+\\\]!" 2 } } */
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tst-1.c b/gcc/testsuite/gcc.target/aarch64/tst-1.c
new file mode 100644
index 0000000000..b37c522e2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tst-1.c
@@ -0,0 +1,49 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+volatile unsigned int w0, w1;
+volatile int result;
+
+void test_si() {
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]*, w\[0-9\]*\n" } } */
+ result = !(w0 & w1);
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]*, \(0x\[0-9a-fA-F\]+\)|\(\[0-9\]+\)" } } */
+ result = !(w0 & 0x00f0);
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]*.*lsl 4" } } */
+ result = !(w0 & (w1 << 4));
+}
+
+void test_si_tbnz() {
+ /* { dg-final { scan-assembler "tbnz\t\[wx\]\[0-9\]*" } } */
+jumpto:
+ if (w0 & 0x08) goto jumpto;
+}
+
+void test_si_tbz() {
+ /* { dg-final { scan-assembler "tbz\t\[wx\]\[0-9\]*" } } */
+jumpto:
+ if (!(w1 & 0x08)) goto jumpto;
+}
+
+volatile unsigned long long x0, x1;
+
+void test_di() {
+ /* { dg-final { scan-assembler "tst\tx\[0-9\]*, x\[0-9\]*\n" } } */
+ result = !(x0 & x1);
+ /* { dg-final { scan-assembler "tst\tx\[0-9\]*, \(0x\[0-9a-fA-F\]+\)|\(\[0-9\]+\)" } } */
+ result = !(x0 & 0x00f0);
+ /* { dg-final { scan-assembler "tst\tx\[0-9\]*.*lsl 4" } } */
+ result = !(x0 & (x1 << 4));
+}
+
+void test_di_tbnz() {
+ /* { dg-final { scan-assembler "tbnz\tx\[0-9\]*" } } */
+jumpto:
+ if (x0 & 0x08) goto jumpto;
+}
+
+void test_di_tbz() {
+ /* { dg-final { scan-assembler "tbz\tx\[0-9\]*" } } */
+jumpto:
+ if (!(x1 & 0x08)) goto jumpto;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/tst_1.c b/gcc/testsuite/gcc.target/aarch64/tst_1.c
new file mode 100644
index 0000000000..4838b1bf75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tst_1.c
@@ -0,0 +1,150 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+tst_si_test1 (int a, int b, int c)
+{
+ int d = a & b;
+
+ /* { dg-final { scan-assembler-times "tst\tw\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+tst_si_test2 (int a, int b, int c)
+{
+ int d = a & 0x99999999;
+
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]+, -1717986919" } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+tst_si_test3 (int a, int b, int c)
+{
+ int d = a & (b << 3);
+
+ /* { dg-final { scan-assembler "tst\tw\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+typedef long long s64;
+
+s64
+tst_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & b;
+
+ /* { dg-final { scan-assembler-times "tst\tx\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+s64
+tst_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & 0xaaaaaaaaaaaaaaaall;
+
+ /* { dg-final { scan-assembler "tst\tx\[0-9\]+, -6148914691236517206" } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+s64
+tst_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & (b << 3);
+
+ /* { dg-final { scan-assembler "tst\tx\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d == 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = tst_si_test1 (29, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test1 (5, 2, 20);
+ if (x != 12)
+ abort ();
+
+ x = tst_si_test2 (29, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test2 (1024, 2, 20);
+ if (x != 12)
+ abort ();
+
+ x = tst_si_test3 (35, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test3 (5, 2, 20);
+ if (x != 12)
+ abort ();
+
+ y = tst_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 12)
+ abort ();
+
+ y = tst_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test2 (0x540004100ll,
+ 0x320000004ll,
+ 0x805050205ll);
+ if (y != 12)
+ abort ();
+
+ y = tst_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 12)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/tst_2.c b/gcc/testsuite/gcc.target/aarch64/tst_2.c
new file mode 100644
index 0000000000..1e8090464b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/tst_2.c
@@ -0,0 +1,156 @@
+/* { dg-do run } */
+/* { dg-options "-O2 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+int
+tst_si_test1 (int a, int b, int c)
+{
+ int d = a & b;
+
+ /* { dg-final { scan-assembler-not "tst\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "and\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+tst_si_test2 (int a, int b, int c)
+{
+ int d = a & 0x99999999;
+
+ /* { dg-final { scan-assembler-not "tst\tw\[0-9\]+, w\[0-9\]+, -1717986919" } } */
+ /* { dg-final { scan-assembler "and\tw\[0-9\]+, w\[0-9\]+, -1717986919" } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+tst_si_test3 (int a, int b, int c)
+{
+ int d = a & (b << 3);
+
+ /* { dg-final { scan-assembler-not "tst\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "and\tw\[0-9\]+, w\[0-9\]+, w\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+typedef long long s64;
+
+s64
+tst_di_test1 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & b;
+
+ /* { dg-final { scan-assembler-not "tst\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" } } */
+ /* { dg-final { scan-assembler-times "and\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+" 2 } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+s64
+tst_di_test2 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & 0xaaaaaaaaaaaaaaaall;
+
+ /* { dg-final { scan-assembler-not "tst\tx\[0-9\]+, x\[0-9\]+, -6148914691236517206" } } */
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, -6148914691236517206" } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+s64
+tst_di_test3 (s64 a, s64 b, s64 c)
+{
+ s64 d = a & (b << 3);
+
+ /* { dg-final { scan-assembler-not "tst\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ /* { dg-final { scan-assembler "and\tx\[0-9\]+, x\[0-9\]+, x\[0-9\]+, lsl 3" } } */
+ if (d <= 0)
+ return 12;
+ else
+ return 18;
+}
+
+int
+main ()
+{
+ int x;
+ s64 y;
+
+ x = tst_si_test1 (29, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test1 (5, 2, 20);
+ if (x != 12)
+ abort ();
+
+ x = tst_si_test2 (29, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test2 (1024, 2, 20);
+ if (x != 12)
+ abort ();
+
+ x = tst_si_test3 (35, 4, 5);
+ if (x != 18)
+ abort ();
+
+ x = tst_si_test3 (5, 2, 20);
+ if (x != 12)
+ abort ();
+
+ y = tst_di_test1 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test1 (0x5000500050005ll,
+ 0x2111211121112ll,
+ 0x0000000002020ll);
+ if (y != 12)
+ abort ();
+
+ y = tst_di_test2 (0x130000029ll,
+ 0x320000004ll,
+ 0x505050505ll);
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test2 (0x540004100ll,
+ 0x320000004ll,
+ 0x805050205ll);
+ if (y != 12)
+ abort ();
+
+ y = tst_di_test3 (0x130000029ll,
+ 0x064000008ll,
+ 0x505050505ll);
+ if (y != 18)
+ abort ();
+
+ y = tst_di_test3 (0x130002900ll,
+ 0x088000008ll,
+ 0x505050505ll);
+ if (y != 12)
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/ushr64_1.c b/gcc/testsuite/gcc.target/aarch64/ushr64_1.c
new file mode 100644
index 0000000000..b1c741dac3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/ushr64_1.c
@@ -0,0 +1,84 @@
+/* Test logical SIMD shift works correctly. */
+/* { dg-do run } */
+/* { dg-options "--save-temps" } */
+
+#include "arm_neon.h"
+
+extern void abort (void);
+
+int __attribute__ ((noinline))
+test_vshr_n_u64_64 (uint64x1_t passed, uint64_t expected)
+{
+ return vget_lane_u64 (vshr_n_u64 (passed, 64), 0) != expected;
+}
+
+int __attribute__ ((noinline))
+test_vshr_n_u64_4 (uint64x1_t passed, uint64_t expected)
+{
+ return vget_lane_u64 (vshr_n_u64 (passed, 4), 0) != expected;
+}
+
+int __attribute__ ((noinline))
+test_vshr_n_u64_0 (uint64x1_t passed, uint64_t expected)
+{
+ return vget_lane_u64 (vshr_n_u64 (passed, 0), 0) != expected;
+}
+
+int __attribute__ ((noinline))
+test_vshrd_n_u64_64 (uint64_t passed, uint64_t expected)
+{
+ return vshrd_n_u64 (passed, 64) != expected;
+}
+
+int __attribute__ ((noinline))
+test_vshrd_n_u64_4 (uint64_t passed, uint64_t expected)
+{
+ return vshrd_n_u64 (passed, 4) != expected;
+}
+
+int __attribute__ ((noinline))
+test_vshrd_n_u64_0 (uint64_t passed, uint64_t expected)
+{
+ return vshrd_n_u64 (passed, 0) != expected;
+}
+
+/* { dg-final { scan-assembler-times "ushr\\td\[0-9\]+, d\[0-9\]+, 64" 2 } } */
+/* { dg-final { (scan-assembler-times "ushr\\td\[0-9\]+, d\[0-9\]+, 4" 2) || \
+ (scan-assembler-times "lsr\\tx\[0-9\]+, x\[0-9\]+, 4" 2) } } */
+/* { dg-final { scan-assembler-not "ushr\\td\[0-9\]+, d\[0-9\]+, 0" } } */
+
+int
+main (int argc, char *argv[])
+{
+ /* Testing vshr_n_u64. */
+ if (test_vshr_n_u64_64 (vcreate_u64 (0x0000000080000000), 0))
+ abort ();
+ if (test_vshr_n_u64_64 (vcreate_u64 (0xffffffff80000000), 0))
+ abort ();
+
+ if (test_vshr_n_u64_4 (vcreate_u64 (0x0000000080000000), 0x0000000008000000))
+ abort ();
+ if (test_vshr_n_u64_4 (vcreate_u64 (0xffffffff80000000), 0x0ffffffff8000000))
+ abort ();
+
+ if (test_vshr_n_u64_0 (vcreate_u64 (0x0000000080000000), 0x0000000080000000))
+ abort ();
+
+ /* Testing vshrd_n_u64. */
+ if (test_vshrd_n_u64_64 (0x0000000080000000, 0))
+ abort ();
+ if (test_vshrd_n_u64_64 (0xffffffff80000000, 0))
+ abort ();
+
+ if (test_vshrd_n_u64_4 (0x0000000080000000, 0x0000000008000000))
+ abort ();
+ if (test_vshrd_n_u64_4 (0xffffffff80000000, 0x0ffffffff8000000))
+ abort ();
+
+ if (test_vshrd_n_u64_0 (0x0000000080000000, 0x0000000080000000))
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vabs_intrinsic_1.c b/gcc/testsuite/gcc.target/aarch64/vabs_intrinsic_1.c
new file mode 100644
index 0000000000..b34738c00a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vabs_intrinsic_1.c
@@ -0,0 +1,101 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define ETYPE(size) int##size##_t
+#define VTYPE(size, lanes) int##size##x##lanes##_t
+
+#define TEST_VABS(q, size, lanes) \
+static void \
+test_vabs##q##_##size (ETYPE (size) * res, \
+ const ETYPE (size) *in1) \
+{ \
+ VTYPE (size, lanes) a = vld1##q##_s##size (res); \
+ VTYPE (size, lanes) b = vld1##q##_s##size (in1); \
+ a = vabs##q##_s##size (b); \
+ vst1##q##_s##size (res, a); \
+}
+
+#define BUILD_VARS(width, n_lanes, n_half_lanes) \
+TEST_VABS (, width, n_half_lanes) \
+TEST_VABS (q, width, n_lanes) \
+
+BUILD_VARS (64, 2, 1)
+BUILD_VARS (32, 4, 2)
+BUILD_VARS (16, 8, 4)
+BUILD_VARS (8, 16, 8)
+
+#define POOL1 {-10}
+#define POOL2 {2, -10}
+#define POOL4 {0, -10, 2, -3}
+#define POOL8 {0, -10, 2, -3, 4, -50, 6, -70}
+#define POOL16 {0, -10, 2, -3, 4, -50, 6, -70, \
+ -5, 10, -2, 3, -4, 50, -6, 70}
+
+#define EXPECTED1 {10}
+#define EXPECTED2 {2, 10}
+#define EXPECTED4 {0, 10, 2, 3}
+#define EXPECTED8 {0, 10, 2, 3, 4, 50, 6, 70}
+#define EXPECTED16 {0, 10, 2, 3, 4, 50, 6, 70, \
+ 5, 10, 2, 3, 4, 50, 6, 70}
+
+#define BUILD_TEST(size, lanes_64, lanes_128) \
+static void \
+test_##size (void) \
+{ \
+ int i; \
+ ETYPE (size) pool1[lanes_64] = POOL##lanes_64; \
+ ETYPE (size) res1[lanes_64] = {0}; \
+ ETYPE (size) expected1[lanes_64] = EXPECTED##lanes_64; \
+ ETYPE (size) pool2[lanes_128] = POOL##lanes_128; \
+ ETYPE (size) res2[lanes_128] = {0}; \
+ ETYPE (size) expected2[lanes_128] = EXPECTED##lanes_128; \
+ \
+ /* Forcefully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vabs_##size (res1, pool1); \
+ for (i = 0; i < lanes_64; i++) \
+ if (res1[i] != expected1[i]) \
+ abort (); \
+ \
+ /* Forcefully avoid optimization. */ \
+ asm volatile ("" : : : "memory"); \
+ test_vabsq_##size (res2, pool2); \
+ for (i = 0; i < lanes_128; i++) \
+ if (res2[i] != expected2[i]) \
+ abort (); \
+}
+
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 1 } } */
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+BUILD_TEST (8 , 8, 16)
+
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 1 } } */
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
+BUILD_TEST (16, 4, 8)
+
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
+BUILD_TEST (32, 2, 4)
+
+/* { dg-final { scan-assembler-times "abs\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" 1 } } */
+BUILD_TEST (64, 1, 2)
+
+#undef BUILD_TEST
+
+#define BUILD_TEST(size) test_##size ()
+
+int
+main (int argc, char **argv)
+{
+ BUILD_TEST (8);
+ BUILD_TEST (16);
+ BUILD_TEST (32);
+ BUILD_TEST (64);
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vadd_f64.c b/gcc/testsuite/gcc.target/aarch64/vadd_f64.c
new file mode 100644
index 0000000000..c3bf734959
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vadd_f64.c
@@ -0,0 +1,114 @@
+/* Test vadd works correctly. */
+/* { dg-do run } */
+/* { dg-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+#define FLT_EPSILON __FLT_EPSILON__
+#define DBL_EPSILON __DBL_EPSILON__
+
+#define TESTA0 0.33333
+#define TESTA1 -1.7777
+#define TESTA2 0
+#define TESTA3 1.23456
+/* 2^54, double has 53 significand bits
+ according to Double-precision floating-point format. */
+#define TESTA4 18014398509481984
+#define TESTA5 (1.0 / TESTA4)
+
+#define TESTB0 0.66667
+#define TESTB1 2
+#define TESTB2 0
+#define TESTB3 -2
+#define TESTB4 1.0
+#define TESTB5 2.0
+
+#define ANSW0 1
+#define ANSW1 0.2223
+#define ANSW2 0
+#define ANSW3 -0.76544
+#define ANSW4 TESTA4
+#define ANSW5 2.0
+
+extern void abort (void);
+
+#define EPSILON __DBL_EPSILON__
+#define ABS(a) __builtin_fabs (a)
+#define ISNAN(a) __builtin_isnan (a)
+#define FP_equals(a, b, epsilon) \
+ ( \
+ ((a) == (b)) \
+ || (ISNAN (a) && ISNAN (b)) \
+ || (ABS (a - b) < epsilon) \
+ )
+
+int
+test_vadd_f64 ()
+{
+ float64x1_t a;
+ float64x1_t b;
+ float64x1_t c;
+
+ a = TESTA0;
+ b = TESTB0;
+ c = ANSW0;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA1;
+ b = TESTB1;
+ c = ANSW1;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA2;
+ b = TESTB2;
+ c = ANSW2;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA3;
+ b = TESTB3;
+ c = ANSW3;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA4;
+ b = TESTB4;
+ c = ANSW4;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA5;
+ b = TESTB5;
+ c = ANSW5;
+
+ a = vadd_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fadd\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 6 } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vadd_f64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic-compile.c b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic-compile.c
new file mode 100644
index 0000000000..11fa984203
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic-compile.c
@@ -0,0 +1,11 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+
+#include "vaddv-intrinsic.x"
+
+/* { dg-final { scan-assembler "faddp\\ts\[0-9\]+"} } */
+/* { dg-final { scan-assembler-times "faddp\\tv\[0-9\]+\.4s" 2} } */
+/* { dg-final { scan-assembler "faddp\\td\[0-9\]+"} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.c b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.c
new file mode 100644
index 0000000000..f6e0829a3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.c
@@ -0,0 +1,28 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+
+extern void abort (void);
+
+#include "vaddv-intrinsic.x"
+
+int
+main (void)
+{
+ const float32_t pool_v2sf[] = {4.0f, 9.0f};
+ const float32_t pool_v4sf[] = {4.0f, 9.0f, 16.0f, 25.0f};
+ const float64_t pool_v2df[] = {4.0, 9.0};
+
+ if (test_vaddv_v2sf (pool_v2sf) != 13.0f)
+ abort ();
+
+ if (test_vaddv_v4sf (pool_v4sf) != 54.0f)
+ abort ();
+
+ if (test_vaddv_v2df (pool_v2df) != 13.0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.x b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.x
new file mode 100644
index 0000000000..7bf38ca0ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vaddv-intrinsic.x
@@ -0,0 +1,27 @@
+
+float32_t
+test_vaddv_v2sf (const float32_t *pool)
+{
+ float32x2_t val;
+
+ val = vld1_f32 (pool);
+ return vaddv_f32 (val);
+}
+
+float32_t
+test_vaddv_v4sf (const float32_t *pool)
+{
+ float32x4_t val;
+
+ val = vld1q_f32 (pool);
+ return vaddvq_f32 (val);
+}
+
+float64_t
+test_vaddv_v2df (const float64_t *pool)
+{
+ float64x2_t val;
+
+ val = vld1q_f64 (pool);
+ return vaddvq_f64 (val);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vclz.c b/gcc/testsuite/gcc.target/aarch64/vclz.c
new file mode 100644
index 0000000000..006f80d77b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vclz.c
@@ -0,0 +1,574 @@
+/* Test vclz works correctly. */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O3 -Wno-div-by-zero --save-temps" } */
+#include <arm_neon.h>
+
+extern void abort (void);
+
+/* Tests in binary should look like:
+ 0
+ 1
+ 10
+ 101
+ 1010
+ 10101
+ etc. */
+
+#define TEST0 0
+#define TEST1 0x1
+#define TEST2 0x2
+#define TEST3 0x5
+#define TEST4 0xa
+#define TEST5 0x15
+#define TEST6 0x2a
+#define TEST7 0x55
+#define TEST8 0xaa
+#define TEST9 0x155
+#define TEST10 0x2aa
+#define TEST11 0x555
+#define TEST12 0xaaa
+#define TEST13 0x1555
+#define TEST14 0x2aaa
+#define TEST15 0x5555
+#define TEST16 0xaaaa
+#define TEST17 0x15555
+#define TEST18 0x2aaaa
+#define TEST19 0x55555
+#define TEST20 0xaaaaa
+#define TEST21 0x155555
+#define TEST22 0x2aaaaa
+#define TEST23 0x555555
+#define TEST24 0xaaaaaa
+#define TEST25 0x1555555
+#define TEST26 0x2aaaaaa
+#define TEST27 0x5555555
+#define TEST28 0xaaaaaaa
+#define TEST29 0x15555555
+#define TEST30 0x2aaaaaaa
+#define TEST31 0x55555555
+#define TEST32 0xaaaaaaaa
+
+#define INHIB_OPTIMIZATION asm volatile ("" : : : "memory")
+
+#define CONCAT(a, b) a##b
+#define CONCAT1(a, b) CONCAT (a, b)
+#define REG_INFEX64 _
+#define REG_INFEX128 q_
+#define SIGNED0 u
+#define SIGNED1 s
+#define SIGNED(x) SIGNED##x
+#define REG_INFEX(reg_len) REG_INFEX##reg_len
+#define POSTFIX(reg_len, data_len, is_signed) \
+ CONCAT1 (REG_INFEX (reg_len), CONCAT1 (SIGNED (is_signed), data_len))
+#define DATA_TYPE(data_len) DATA_TYPE_##data_len
+#define LOAD_INST(reg_len, data_len, is_signed) \
+ CONCAT1 (vld1, POSTFIX (reg_len, data_len, is_signed))
+#define CLZ_INST(reg_len, data_len, is_signed) \
+ CONCAT1 (vclz, POSTFIX (reg_len, data_len, is_signed))
+
+#define RUN_TEST(test_set, answ_set, reg_len, data_len, is_signed, n) \
+ a = LOAD_INST (reg_len, data_len, is_signed) (test_set); \
+ b = LOAD_INST (reg_len, data_len, is_signed) (answ_set); \
+ INHIB_OPTIMIZATION; \
+ a = CLZ_INST (reg_len, data_len, is_signed) (a); \
+ for (i = 0; i < n; i++) \
+ { \
+ INHIB_OPTIMIZATION; \
+ if (a [i] != b [i]) \
+ { \
+ return 1; \
+ } \
+ }
+
+int
+test_vclz_s8 ()
+{
+ int i;
+ int8x8_t a;
+ int8x8_t b;
+
+ int8_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3,
+ TEST4, TEST5, TEST6, TEST7
+ };
+ int8_t test_set1[8] = {
+ TEST8, TEST8, TEST8, TEST8,
+ TEST8, TEST8, TEST8, TEST8
+ };
+ int8_t answ_set0[8] = {
+ 8, 7, 6, 5,
+ 4, 3, 2, 1
+ };
+ int8_t answ_set1[8] = {
+ 0, 0, 0, 0,
+ 0, 0, 0, 0
+ };
+ RUN_TEST (test_set0, answ_set0, 64, 8, 1, 8);
+ RUN_TEST (test_set1, answ_set1, 64, 8, 1, 1);
+
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 4 } } */
+
+int
+test_vclz_s16 ()
+{
+ int i;
+ int16x4_t a;
+ int16x4_t b;
+
+ int16_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ int16_t test_set1[4] = { TEST4, TEST5, TEST6, TEST7 };
+ int16_t test_set2[4] = { TEST8, TEST9, TEST10, TEST11 };
+ int16_t test_set3[4] = { TEST12, TEST13, TEST14, TEST15 };
+ int16_t test_set4[4] = { TEST16, TEST16, TEST16, TEST16 };
+
+ int16_t answ_set0[4] = { 16, 15, 14, 13 };
+ int16_t answ_set1[4] = { 12, 11, 10, 9 };
+ int16_t answ_set2[4] = { 8, 7, 6, 5 };
+ int16_t answ_set3[4] = { 4, 3, 2, 1 };
+ int16_t answ_set4[4] = { 0, 0, 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 64, 16, 1, 4);
+ RUN_TEST (test_set1, answ_set1, 64, 16, 1, 4);
+ RUN_TEST (test_set2, answ_set2, 64, 16, 1, 4);
+ RUN_TEST (test_set3, answ_set3, 64, 16, 1, 4);
+ RUN_TEST (test_set4, answ_set4, 64, 16, 1, 1);
+
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 10} } */
+
+int
+test_vclz_s32 ()
+{
+ int i;
+ int32x2_t a;
+ int32x2_t b;
+
+ int32_t test_set0[2] = { TEST0, TEST1 };
+ int32_t test_set1[2] = { TEST2, TEST3 };
+ int32_t test_set2[2] = { TEST4, TEST5 };
+ int32_t test_set3[2] = { TEST6, TEST7 };
+ int32_t test_set4[2] = { TEST8, TEST9 };
+ int32_t test_set5[2] = { TEST10, TEST11 };
+ int32_t test_set6[2] = { TEST12, TEST13 };
+ int32_t test_set7[2] = { TEST14, TEST15 };
+ int32_t test_set8[2] = { TEST16, TEST17 };
+ int32_t test_set9[2] = { TEST18, TEST19 };
+ int32_t test_set10[2] = { TEST20, TEST21 };
+ int32_t test_set11[2] = { TEST22, TEST23 };
+ int32_t test_set12[2] = { TEST24, TEST25 };
+ int32_t test_set13[2] = { TEST26, TEST27 };
+ int32_t test_set14[2] = { TEST28, TEST29 };
+ int32_t test_set15[2] = { TEST30, TEST31 };
+ int32_t test_set16[2] = { TEST32, TEST32 };
+
+ int32_t answ_set0[2] = { 32, 31 };
+ int32_t answ_set1[2] = { 30, 29 };
+ int32_t answ_set2[2] = { 28, 27 };
+ int32_t answ_set3[2] = { 26, 25 };
+ int32_t answ_set4[2] = { 24, 23 };
+ int32_t answ_set5[2] = { 22, 21 };
+ int32_t answ_set6[2] = { 20, 19 };
+ int32_t answ_set7[2] = { 18, 17 };
+ int32_t answ_set8[2] = { 16, 15 };
+ int32_t answ_set9[2] = { 14, 13 };
+ int32_t answ_set10[2] = { 12, 11 };
+ int32_t answ_set11[2] = { 10, 9 };
+ int32_t answ_set12[2] = { 8, 7 };
+ int32_t answ_set13[2] = { 6, 5 };
+ int32_t answ_set14[2] = { 4, 3 };
+ int32_t answ_set15[2] = { 2, 1 };
+ int32_t answ_set16[2] = { 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 64, 32, 1, 2);
+ RUN_TEST (test_set1, answ_set1, 64, 32, 1, 2);
+ RUN_TEST (test_set2, answ_set2, 64, 32, 1, 2);
+ RUN_TEST (test_set3, answ_set3, 64, 32, 1, 2);
+ RUN_TEST (test_set4, answ_set4, 64, 32, 1, 2);
+ RUN_TEST (test_set5, answ_set5, 64, 32, 1, 2);
+ RUN_TEST (test_set6, answ_set6, 64, 32, 1, 2);
+ RUN_TEST (test_set7, answ_set7, 64, 32, 1, 2);
+ RUN_TEST (test_set8, answ_set8, 64, 32, 1, 2);
+ RUN_TEST (test_set9, answ_set9, 64, 32, 1, 2);
+ RUN_TEST (test_set10, answ_set10, 64, 32, 1, 2);
+ RUN_TEST (test_set11, answ_set11, 64, 32, 1, 2);
+ RUN_TEST (test_set12, answ_set12, 64, 32, 1, 2);
+ RUN_TEST (test_set13, answ_set13, 64, 32, 1, 2);
+ RUN_TEST (test_set14, answ_set14, 64, 32, 1, 2);
+ RUN_TEST (test_set15, answ_set15, 64, 32, 1, 2);
+ RUN_TEST (test_set16, answ_set16, 64, 32, 1, 1);
+
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 34 } } */
+
+int
+test_vclzq_s8 ()
+{
+ int i;
+ int8x16_t a;
+ int8x16_t b;
+
+ int8_t test_set0[16] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, TEST6, TEST7,
+ TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8
+ };
+ int8_t answ_set0[16] = {
+ 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ RUN_TEST (test_set0, answ_set0, 128, 8, 1, 9);
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 2 } } */
+
+int
+test_vclzq_s16 ()
+{
+ int i;
+ int16x8_t a;
+ int16x8_t b;
+
+ int16_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, TEST6, TEST7
+ };
+ int16_t test_set1[8] = {
+ TEST8, TEST9, TEST10, TEST11, TEST12, TEST13, TEST14, TEST15
+ };
+ int16_t test_set2[8] = {
+ TEST16, TEST16, TEST16, TEST16, TEST16, TEST16, TEST16, TEST16
+ };
+
+ int16_t answ_set0[8] = {
+ 16, 15, 14, 13, 12, 11, 10, 9
+ };
+ int16_t answ_set1[8] = {
+ 8, 7, 6, 5, 4, 3, 2, 1
+ };
+ int16_t answ_set2[8] = {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ RUN_TEST (test_set0, answ_set0, 128, 16, 1, 8);
+ RUN_TEST (test_set1, answ_set1, 128, 16, 1, 8);
+ RUN_TEST (test_set2, answ_set2, 128, 16, 1, 1);
+
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 6 } } */
+
+int
+test_vclzq_s32 ()
+{
+ int i;
+ int32x4_t a;
+ int32x4_t b;
+
+ int32_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ int32_t test_set1[4] = { TEST4, TEST5, TEST6, TEST7 };
+ int32_t test_set2[4] = { TEST8, TEST9, TEST10, TEST11 };
+ int32_t test_set3[4] = { TEST12, TEST13, TEST14, TEST15 };
+ int32_t test_set4[4] = { TEST16, TEST17, TEST18, TEST19 };
+ int32_t test_set5[4] = { TEST20, TEST21, TEST22, TEST23 };
+ int32_t test_set6[4] = { TEST24, TEST25, TEST26, TEST27 };
+ int32_t test_set7[4] = { TEST28, TEST29, TEST30, TEST31 };
+ int32_t test_set8[4] = { TEST32, TEST32, TEST32, TEST32 };
+
+ int32_t answ_set0[4] = { 32, 31, 30, 29 };
+ int32_t answ_set1[4] = { 28, 27, 26, 25 };
+ int32_t answ_set2[4] = { 24, 23, 22, 21 };
+ int32_t answ_set3[4] = { 20, 19, 18, 17 };
+ int32_t answ_set4[4] = { 16, 15, 14, 13 };
+ int32_t answ_set5[4] = { 12, 11, 10, 9 };
+ int32_t answ_set6[4] = { 8, 7, 6, 5 };
+ int32_t answ_set7[4] = { 4, 3, 2, 1 };
+ int32_t answ_set8[4] = { 0, 0, 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 128, 32, 1, 4);
+ RUN_TEST (test_set1, answ_set1, 128, 32, 1, 4);
+ RUN_TEST (test_set2, answ_set2, 128, 32, 1, 4);
+ RUN_TEST (test_set3, answ_set3, 128, 32, 1, 4);
+ RUN_TEST (test_set4, answ_set4, 128, 32, 1, 1);
+
+ return 0;
+}
+
+/* Double scan-assembler-times to take account of unsigned functions. */
+/* { dg-final { scan-assembler-times "clz\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 10 } } */
+
+/* Unsigned versions. */
+
+int
+test_vclz_u8 ()
+{
+ int i;
+ uint8x8_t a;
+ uint8x8_t b;
+
+ uint8_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, TEST6, TEST7
+ };
+ uint8_t test_set1[8] = {
+ TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8
+ };
+ uint8_t answ_set0[8] = {
+ 8, 7, 6, 5, 4, 3, 2, 1
+ };
+ uint8_t answ_set1[8] = {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ RUN_TEST (test_set0, answ_set0, 64, 8, 0, 8);
+ RUN_TEST (test_set1, answ_set1, 64, 8, 0, 1);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+test_vclz_u16 ()
+{
+ int i;
+ uint16x4_t a;
+ uint16x4_t b;
+
+ uint16_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ uint16_t test_set1[4] = { TEST4, TEST5, TEST6, TEST7 };
+ uint16_t test_set2[4] = { TEST8, TEST9, TEST10, TEST11 };
+ uint16_t test_set3[4] = { TEST12, TEST13, TEST14, TEST15 };
+ uint16_t test_set4[4] = { TEST16, TEST16, TEST16, TEST16 };
+
+ uint16_t answ_set0[4] = { 16, 15, 14, 13 };
+ uint16_t answ_set1[4] = { 12, 11, 10, 9 };
+ uint16_t answ_set2[4] = { 8, 7, 6, 5 };
+ uint16_t answ_set3[4] = { 4, 3, 2, 1 };
+ uint16_t answ_set4[4] = { 0, 0, 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 64, 16, 0, 4);
+ RUN_TEST (test_set1, answ_set1, 64, 16, 0, 4);
+ RUN_TEST (test_set2, answ_set2, 64, 16, 0, 4);
+ RUN_TEST (test_set3, answ_set3, 64, 16, 0, 4);
+ RUN_TEST (test_set4, answ_set4, 64, 16, 0, 1);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+test_vclz_u32 ()
+{
+ int i;
+ uint32x2_t a;
+ uint32x2_t b;
+
+ uint32_t test_set0[2] = { TEST0, TEST1 };
+ uint32_t test_set1[2] = { TEST2, TEST3 };
+ uint32_t test_set2[2] = { TEST4, TEST5 };
+ uint32_t test_set3[2] = { TEST6, TEST7 };
+ uint32_t test_set4[2] = { TEST8, TEST9 };
+ uint32_t test_set5[2] = { TEST10, TEST11 };
+ uint32_t test_set6[2] = { TEST12, TEST13 };
+ uint32_t test_set7[2] = { TEST14, TEST15 };
+ uint32_t test_set8[2] = { TEST16, TEST17 };
+ uint32_t test_set9[2] = { TEST18, TEST19 };
+ uint32_t test_set10[2] = { TEST20, TEST21 };
+ uint32_t test_set11[2] = { TEST22, TEST23 };
+ uint32_t test_set12[2] = { TEST24, TEST25 };
+ uint32_t test_set13[2] = { TEST26, TEST27 };
+ uint32_t test_set14[2] = { TEST28, TEST29 };
+ uint32_t test_set15[2] = { TEST30, TEST31 };
+ uint32_t test_set16[2] = { TEST32, TEST32 };
+
+ uint32_t answ_set0[2] = { 32, 31 };
+ uint32_t answ_set1[2] = { 30, 29 };
+ uint32_t answ_set2[2] = { 28, 27 };
+ uint32_t answ_set3[2] = { 26, 25 };
+ uint32_t answ_set4[2] = { 24, 23 };
+ uint32_t answ_set5[2] = { 22, 21 };
+ uint32_t answ_set6[2] = { 20, 19 };
+ uint32_t answ_set7[2] = { 18, 17 };
+ uint32_t answ_set8[2] = { 16, 15 };
+ uint32_t answ_set9[2] = { 14, 13 };
+ uint32_t answ_set10[2] = { 12, 11 };
+ uint32_t answ_set11[2] = { 10, 9 };
+ uint32_t answ_set12[2] = { 8, 7 };
+ uint32_t answ_set13[2] = { 6, 5 };
+ uint32_t answ_set14[2] = { 4, 3 };
+ uint32_t answ_set15[2] = { 2, 1 };
+ uint32_t answ_set16[2] = { 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 64, 32, 0, 2);
+ RUN_TEST (test_set1, answ_set1, 64, 32, 0, 2);
+ RUN_TEST (test_set2, answ_set2, 64, 32, 0, 2);
+ RUN_TEST (test_set3, answ_set3, 64, 32, 0, 2);
+ RUN_TEST (test_set4, answ_set4, 64, 32, 0, 2);
+ RUN_TEST (test_set5, answ_set5, 64, 32, 0, 2);
+ RUN_TEST (test_set6, answ_set6, 64, 32, 0, 2);
+ RUN_TEST (test_set7, answ_set7, 64, 32, 0, 2);
+ RUN_TEST (test_set8, answ_set8, 64, 32, 0, 2);
+ RUN_TEST (test_set9, answ_set9, 64, 32, 0, 2);
+ RUN_TEST (test_set10, answ_set10, 64, 32, 0, 2);
+ RUN_TEST (test_set11, answ_set11, 64, 32, 0, 2);
+ RUN_TEST (test_set12, answ_set12, 64, 32, 0, 2);
+ RUN_TEST (test_set13, answ_set13, 64, 32, 0, 2);
+ RUN_TEST (test_set14, answ_set14, 64, 32, 0, 2);
+ RUN_TEST (test_set15, answ_set15, 64, 32, 0, 2);
+ RUN_TEST (test_set16, answ_set16, 64, 32, 0, 1);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+test_vclzq_u8 ()
+{
+ int i;
+ uint8x16_t a;
+ uint8x16_t b;
+
+ uint8_t test_set0[16] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, TEST6, TEST7,
+ TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8, TEST8
+ };
+ uint8_t answ_set0[16] = {
+ 8, 7, 6, 5, 4, 3, 2, 1, 0, 0, 0, 0, 0, 0, 0, 0
+ };
+ RUN_TEST (test_set0, answ_set0, 128, 8, 0, 9);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+test_vclzq_u16 ()
+{
+ int i;
+ uint16x8_t a;
+ uint16x8_t b;
+
+ uint16_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, TEST6, TEST7
+ };
+ uint16_t test_set1[8] = {
+ TEST8, TEST9, TEST10, TEST11, TEST12, TEST13, TEST14, TEST15
+ };
+ uint16_t test_set2[8] = {
+ TEST16, TEST16, TEST16, TEST16, TEST16, TEST16, TEST16, TEST16
+ };
+
+ uint16_t answ_set0[8] = {
+ 16, 15, 14, 13, 12, 11, 10, 9
+ };
+
+ uint16_t answ_set1[8] = {
+ 8, 7, 6, 5, 4, 3, 2, 1
+ };
+ uint16_t answ_set2[8] = {
+ 0, 0, 0, 0, 0, 0, 0, 0
+ };
+
+ RUN_TEST (test_set0, answ_set0, 128, 16, 0, 8);
+ RUN_TEST (test_set1, answ_set1, 128, 16, 0, 8);
+ RUN_TEST (test_set2, answ_set2, 128, 16, 0, 1);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+test_vclzq_u32 ()
+{
+ int i;
+ uint32x4_t a;
+ uint32x4_t b;
+
+ uint32_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ uint32_t test_set1[4] = { TEST4, TEST5, TEST6, TEST7 };
+ uint32_t test_set2[4] = { TEST8, TEST9, TEST10, TEST11 };
+ uint32_t test_set3[4] = { TEST12, TEST13, TEST14, TEST15 };
+ uint32_t test_set4[4] = { TEST16, TEST17, TEST18, TEST19 };
+ uint32_t test_set5[4] = { TEST20, TEST21, TEST22, TEST23 };
+ uint32_t test_set6[4] = { TEST24, TEST25, TEST26, TEST27 };
+ uint32_t test_set7[4] = { TEST28, TEST29, TEST30, TEST31 };
+ uint32_t test_set8[4] = { TEST32, TEST32, TEST32, TEST32 };
+
+ uint32_t answ_set0[4] = { 32, 31, 30, 29 };
+ uint32_t answ_set1[4] = { 28, 27, 26, 25 };
+ uint32_t answ_set2[4] = { 24, 23, 22, 21 };
+ uint32_t answ_set3[4] = { 20, 19, 18, 17 };
+ uint32_t answ_set4[4] = { 16, 15, 14, 13 };
+ uint32_t answ_set5[4] = { 12, 11, 10, 9 };
+ uint32_t answ_set6[4] = { 8, 7, 6, 5 };
+ uint32_t answ_set7[4] = { 4, 3, 2, 1 };
+ uint32_t answ_set8[4] = { 0, 0, 0, 0 };
+
+ RUN_TEST (test_set0, answ_set0, 128, 32, 0, 4);
+ RUN_TEST (test_set1, answ_set1, 128, 32, 0, 4);
+ RUN_TEST (test_set2, answ_set2, 128, 32, 0, 4);
+ RUN_TEST (test_set3, answ_set3, 128, 32, 0, 4);
+ RUN_TEST (test_set4, answ_set4, 128, 32, 0, 1);
+
+ return 0;
+}
+
+/* ASM scan near test for signed version. */
+
+int
+main (int argc, char **argv)
+{
+
+ if (test_vclz_s8 ())
+ abort ();
+
+ if (test_vclz_s16 ())
+ abort ();
+
+ if (test_vclz_s32 ())
+ abort ();
+
+ if (test_vclzq_s8 ())
+ abort ();
+
+ if (test_vclzq_s16 ())
+ abort ();
+
+ if (test_vclzq_s32 ())
+ abort ();
+
+ if (test_vclz_u8 ())
+ abort ();
+
+ if (test_vclz_u16 ())
+ abort ();
+
+ if (test_vclz_u32 ())
+ abort ();
+
+ if (test_vclzq_u8 ())
+ abort ();
+
+ if (test_vclzq_u16 ())
+ abort ();
+
+ if (test_vclzq_u32 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vdiv_f.c b/gcc/testsuite/gcc.target/aarch64/vdiv_f.c
new file mode 100644
index 0000000000..cc3a9570c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vdiv_f.c
@@ -0,0 +1,361 @@
+/* Test vdiv works correctly. */
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+#define FLT_INFINITY (__builtin_inff ())
+#define DBL_INFINITY (__builtin_inf ())
+
+#define NAN (0.0 / 0.0)
+
+#define PI 3.141592653589793
+#define PI_4 0.7853981633974483
+#define SQRT2 1.4142135623730951
+#define SQRT1_2 0.7071067811865475
+
+#define TESTA0 PI
+#define TESTA1 -PI
+#define TESTA2 PI
+#define TESTA3 -PI
+#define TESTA4 1.0
+#define TESTA5 -1.0
+#define TESTA6 1.0
+#define TESTA7 -1.0
+/* 2^25+1, float has 24 significand bits
+ according to Single-precision floating-point format. */
+#define TESTA8_FLT 33554433
+/* 2^54+1, double has 53 significand bits
+ according to Double-precision floating-point format. */
+#define TESTA8_DBL 18014398509481985
+#define TESTA9 -TESTA8
+#define TESTA10 TESTA8
+#define TESTA11 -TESTA8
+#define TESTA12 NAN
+#define TESTA13 1.0
+#define TESTA14 INFINITY
+#define TESTA15 -INFINITY
+#define TESTA16 INFINITY
+#define TESTA17 9.0
+#define TESTA18 11.0
+#define TESTA19 13.0
+
+#define TESTB0 4.0
+#define TESTB1 4.0
+#define TESTB2 -4.0
+#define TESTB3 -4.0
+#define TESTB4 SQRT2
+#define TESTB5 SQRT2
+#define TESTB6 -SQRT2
+#define TESTB7 -SQRT2
+#define TESTB8 2.0
+#define TESTB9 2.0
+#define TESTB10 -2.0
+#define TESTB11 -2.0
+#define TESTB12 3.0
+#define TESTB13 NAN
+#define TESTB14 5.0
+#define TESTB15 7.0
+#define TESTB16 INFINITY
+#define TESTB17 INFINITY
+#define TESTB18 -INFINITY
+#define TESTB19 0
+
+#define ANSW0 PI_4
+#define ANSW1 -PI_4
+#define ANSW2 -PI_4
+#define ANSW3 PI_4
+#define ANSW4 SQRT1_2
+#define ANSW5 -SQRT1_2
+#define ANSW6 -SQRT1_2
+#define ANSW7 SQRT1_2
+#define ANSW8_FLT 16777216
+#define ANSW8_DBL 9007199254740992
+#define ANSW9 -ANSW8
+#define ANSW10 -ANSW8
+#define ANSW11 ANSW8
+#define ANSW12 NAN
+#define ANSW13 NAN
+#define ANSW14 INFINITY
+#define ANSW15 -INFINITY
+#define ANSW16 NAN
+#define ANSW17 0
+#define ANSW18 0
+#define ANSW19 INFINITY
+
+#define CONCAT(a, b) a##b
+#define CONCAT1(a, b) CONCAT (a, b)
+#define REG_INFEX64 _
+#define REG_INFEX128 q_
+#define REG_INFEX(reg_len) REG_INFEX##reg_len
+#define POSTFIX(reg_len, data_len) \
+ CONCAT1 (REG_INFEX (reg_len), f##data_len)
+
+#define DATA_TYPE_32 float
+#define DATA_TYPE_64 double
+#define DATA_TYPE(data_len) DATA_TYPE_##data_len
+
+#define EPSILON_32 __FLT_EPSILON__
+#define EPSILON_64 __DBL_EPSILON__
+#define EPSILON(data_len) EPSILON_##data_len
+
+#define INDEX64_32 [i]
+#define INDEX64_64
+#define INDEX128_32 [i]
+#define INDEX128_64 [i]
+#define INDEX(reg_len, data_len) \
+ CONCAT1 (INDEX, reg_len##_##data_len)
+
+#define LOAD_INST(reg_len, data_len) \
+ CONCAT1 (vld1, POSTFIX (reg_len, data_len))
+#define DIV_INST(reg_len, data_len) \
+ CONCAT1 (vdiv, POSTFIX (reg_len, data_len))
+
+#define ABS(a) __builtin_fabs (a)
+#define ISNAN(a) __builtin_isnan (a)
+#define FP_equals(a, b, epsilon) \
+ ( \
+ ((a) == (b)) \
+ || (ISNAN (a) && ISNAN (b)) \
+ || (ABS (a - b) < epsilon) \
+ )
+
+#define INHIB_OPTIMIZATION asm volatile ("" : : : "memory")
+
+#define RUN_TEST(a, b, c, testseta, testsetb, answset, count, \
+ reg_len, data_len, n) \
+{ \
+ int i; \
+ INHIB_OPTIMIZATION; \
+ (a) = LOAD_INST (reg_len, data_len) (testseta[count]); \
+ (b) = LOAD_INST (reg_len, data_len) (testsetb[count]); \
+ (c) = LOAD_INST (reg_len, data_len) (answset[count]); \
+ INHIB_OPTIMIZATION; \
+ (a) = DIV_INST (reg_len, data_len) (a, b); \
+ for (i = 0; i < n; i++) \
+ { \
+ INHIB_OPTIMIZATION; \
+ if (!FP_equals ((a) INDEX (reg_len, data_len), \
+ (c) INDEX (reg_len, data_len), \
+ EPSILON (data_len))) \
+ return 1; \
+ } \
+}
+
+extern void abort (void);
+
+#define TESTA8 TESTA8_FLT
+#define ANSW8 ANSW8_FLT
+#define INFINITY FLT_INFINITY
+
+int
+test_vdiv_f32 ()
+{
+ int count;
+ float32x2_t a;
+ float32x2_t b;
+ float32x2_t c;
+
+ float32_t testseta[10][2] = {
+ { TESTA0, TESTA1 }, { TESTA2, TESTA3 },
+ { TESTA4, TESTA5 }, { TESTA6, TESTA7 },
+ { TESTA8, TESTA9 }, { TESTA10, TESTA11 },
+ { TESTA12, TESTA13 }, { TESTA14, TESTA15 },
+ { TESTA16, TESTA17 }, { TESTA18, TESTA19 }
+ };
+
+ float32_t testsetb[10][2] = {
+ { TESTB0, TESTB1 }, { TESTB2, TESTB3 },
+ { TESTB4, TESTB5 }, { TESTB6, TESTB7 },
+ { TESTB8, TESTB9 }, { TESTB10, TESTB11 },
+ { TESTB12, TESTB13 }, { TESTB14, TESTB15 },
+ { TESTB16, TESTB17 }, { TESTB18, TESTB19 }
+ };
+
+ float32_t answset[10][2] = {
+ { ANSW0, ANSW1 }, { ANSW2, ANSW3 },
+ { ANSW4, ANSW5 }, { ANSW6, ANSW7 },
+ { ANSW8, ANSW9 }, { ANSW10, ANSW11 },
+ { ANSW12, ANSW13 }, { ANSW14, ANSW15 },
+ { ANSW16, ANSW17 }, { ANSW18, ANSW19 }
+ };
+
+ for (count = 0; count < 10; count++)
+ {
+ RUN_TEST (a, b, c, testseta, testsetb, answset, count, 64, 32, 2);
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fdiv\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
+
+#undef TESTA8
+#undef ANSW8
+#undef INFINITY
+
+#define TESTA8 TESTA8_DBL
+#define ANSW8 ANSW8_DBL
+#define INFINITY DBL_INFINITY
+
+int
+test_vdiv_f64 ()
+{
+ int count;
+ float64x1_t a;
+ float64x1_t b;
+ float64x1_t c;
+
+ float64_t testseta[20][1] = {
+ { TESTA0 }, { TESTA1 }, { TESTA2 }, { TESTA3 },
+ { TESTA4 }, { TESTA5 }, { TESTA6 }, { TESTA7 },
+ { TESTA8 }, { TESTA9 }, { TESTA10 }, { TESTA11 },
+ { TESTA12 }, { TESTA13 }, { TESTA14 }, { TESTA15 },
+ { TESTA16 }, { TESTA17 }, { TESTA18 }, { TESTA19 }
+ };
+
+ float64_t testsetb[20][1] = {
+ { TESTB0 }, { TESTB1 }, { TESTB2 }, { TESTB3 },
+ { TESTB4 }, { TESTB5 }, { TESTB6 }, { TESTB7 },
+ { TESTB8 }, { TESTB9 }, { TESTB10 }, { TESTB11 },
+ { TESTB12 }, { TESTB13 }, { TESTB14 }, { TESTB15 },
+ { TESTB16 }, { TESTB17 }, { TESTB18 }, { TESTB19 }
+ };
+
+ float64_t answset[20][1] = {
+ { ANSW0 }, { ANSW1 }, { ANSW2 }, { ANSW3 },
+ { ANSW4 }, { ANSW5 }, { ANSW6 }, { ANSW7 },
+ { ANSW8 }, { ANSW9 }, { ANSW10 }, { ANSW11 },
+ { ANSW12 }, { ANSW13 }, { ANSW14 }, { ANSW15 },
+ { ANSW16 }, { ANSW17 }, { ANSW18 }, { ANSW19 }
+ };
+
+ for (count = 0; count < 20; count++)
+ {
+ RUN_TEST (a, b, c, testseta, testsetb, answset, count, 64, 64, 1);
+ }
+ return 0;
+}
+
+/* The following assembly should match 2 more times,
+ in 64bit NAN generation. */
+/* { dg-final { scan-assembler-times "fdiv\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 3 } } */
+
+#undef TESTA8
+#undef ANSW8
+#undef INFINITY
+
+#define TESTA8 TESTA8_FLT
+#define ANSW8 ANSW8_FLT
+#define INFINITY FLT_INFINITY
+
+int
+test_vdivq_f32 ()
+{
+ int count;
+ float32x4_t a;
+ float32x4_t b;
+ float32x4_t c;
+
+ float32_t testseta[5][4] = {
+ { TESTA0, TESTA1, TESTA2, TESTA3 },
+ { TESTA4, TESTA5, TESTA6, TESTA7 },
+ { TESTA8, TESTA9, TESTA10, TESTA11 },
+ { TESTA12, TESTA13, TESTA14, TESTA15 },
+ { TESTA16, TESTA17, TESTA18, TESTA19 }
+ };
+
+ float32_t testsetb[5][4] = {
+ { TESTB0, TESTB1, TESTB2, TESTB3 },
+ { TESTB4, TESTB5, TESTB6, TESTB7 },
+ { TESTB8, TESTB9, TESTB10, TESTB11 },
+ { TESTB12, TESTB13, TESTB14, TESTB15 },
+ { TESTB16, TESTB17, TESTB18, TESTB19 }
+ };
+
+ float32_t answset[5][4] = {
+ { ANSW0, ANSW1, ANSW2, ANSW3 },
+ { ANSW4, ANSW5, ANSW6, ANSW7 },
+ { ANSW8, ANSW9, ANSW10, ANSW11 },
+ { ANSW12, ANSW13, ANSW14, ANSW15 },
+ { ANSW16, ANSW17, ANSW18, ANSW19 }
+ };
+
+ for (count = 0; count < 5; count++)
+ {
+ RUN_TEST (a, b, c, testseta, testsetb, answset, count, 128, 32, 4);
+ }
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fdiv\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
+
+#undef TESTA8
+#undef ANSW8
+#undef INFINITY
+
+#define TESTA8 TESTA8_DBL
+#define ANSW8 ANSW8_DBL
+#define INFINITY DBL_INFINITY
+
+int
+test_vdivq_f64 ()
+{
+ int count;
+ float64x2_t a;
+ float64x2_t b;
+ float64x2_t c;
+
+ float64_t testseta[10][2] = {
+ { TESTA0, TESTA1 }, { TESTA2, TESTA3 },
+ { TESTA4, TESTA5 }, { TESTA6, TESTA7 },
+ { TESTA8, TESTA9 }, { TESTA10, TESTA11 },
+ { TESTA12, TESTA13 }, { TESTA14, TESTA15 },
+ { TESTA16, TESTA17 }, { TESTA18, TESTA19 }
+ };
+
+ float64_t testsetb[10][2] = {
+ { TESTB0, TESTB1 }, { TESTB2, TESTB3 },
+ { TESTB4, TESTB5 }, { TESTB6, TESTB7 },
+ { TESTB8, TESTB9 }, { TESTB10, TESTB11 },
+ { TESTB12, TESTB13 }, { TESTB14, TESTB15 },
+ { TESTB16, TESTB17 }, { TESTB18, TESTB19 }
+ };
+
+ float64_t answset[10][2] = {
+ { ANSW0, ANSW1 }, { ANSW2, ANSW3 },
+ { ANSW4, ANSW5 }, { ANSW6, ANSW7 },
+ { ANSW8, ANSW9 }, { ANSW10, ANSW11 },
+ { ANSW12, ANSW13 }, { ANSW14, ANSW15 },
+ { ANSW16, ANSW17 }, { ANSW18, ANSW19 }
+ };
+
+ for (count = 0; count < 10; count++)
+ {
+ RUN_TEST (a, b, c, testseta, testsetb, answset, count, 128, 64, 2);
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fdiv\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" 1 } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vdiv_f32 ())
+ abort ();
+
+ if (test_vdiv_f64 ())
+ abort ();
+
+ if (test_vdivq_f32 ())
+ abort ();
+
+ if (test_vdivq_f64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-abs-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-abs-compile.c
new file mode 100644
index 0000000000..27146b843d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-abs-compile.c
@@ -0,0 +1,12 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#define N 16
+
+#include "vect-abs.x"
+
+/* { dg-final { scan-assembler "abs\\tv\[0-9\]+\.16b" } } */
+/* { dg-final { scan-assembler "abs\\tv\[0-9\]+\.8h" } } */
+/* { dg-final { scan-assembler "abs\\tv\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "abs\\tv\[0-9\]+\.2d" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-abs.c b/gcc/testsuite/gcc.target/aarch64/vect-abs.c
new file mode 100644
index 0000000000..9e0ed99ca6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-abs.c
@@ -0,0 +1,134 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3 -std=c99" } */
+
+#include "limits.h"
+
+extern void abort (void);
+
+#define N 16
+
+#include "vect-abs.x"
+
+#define SET_VEC(size, type) void set_vector_##size (pRINT##size a) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = (type##_MIN) + (i + 1); \
+ }
+
+#define SET_RVEC(size, type) void set_rvector_##size (pRINT##size a) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = type##_MAX - i; \
+ }
+
+#define CHECK_VEC(size) void check_vector_##size (pRINT##size a, \
+ pRINT##size b) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ if (a[i] != b[i]) \
+ abort (); \
+ }
+
+
+SET_RVEC (8, SCHAR)
+SET_RVEC (16, SHRT)
+SET_RVEC (32, INT)
+SET_RVEC (64, LLONG)
+
+void
+set_rvector_long (pRLONG a)
+{
+ int i;
+ for (i=0; i<N; i++)
+ a[i] = (LONG_MAX) - i;
+}
+
+SET_VEC (8, SCHAR)
+SET_VEC (16, SHRT)
+SET_VEC (32, INT)
+SET_VEC (64, LLONG)
+
+void
+set_vector_long (long *__restrict__ a)
+{
+ long i;
+ for (i=0; i<N; i++)
+ a[i] = (LONG_MIN) + i + 1;
+}
+
+CHECK_VEC (8)
+CHECK_VEC (16)
+CHECK_VEC (32)
+CHECK_VEC (64)
+
+void
+check_vector_long (long *__restrict__ a, long *__restrict__ b)
+{
+ long i;
+ for (i=0; i<N; i++)
+ if (a[i] != b[i])
+ abort ();
+}
+
+int main (void)
+{
+
+ signed char a8[N];
+ short a16[N];
+ int a32[N];
+ long long a64[N];
+ /* abs () from stdlib. */
+ int alib32[N];
+ long alibl[N];
+
+
+ signed char b8[N];
+ short b16[N];
+ int b32[N];
+ long long b64[N];
+ /* abs () from stdlib. */
+ long blibl[N];
+
+ signed char abs_vector_8[N];
+ short abs_vector_16[N];
+ int abs_vector_32[N];
+ long long abs_vector_64[N];
+ long abs_vector_long[N];
+
+ /* Set up result vectors. */
+ set_rvector_8 (abs_vector_8);
+ set_rvector_16 (abs_vector_16);
+ set_rvector_32 (abs_vector_32);
+ set_rvector_long (abs_vector_long);
+ set_rvector_64 (abs_vector_64);
+
+ /* Set up inputs. */
+ set_vector_8 (b8);
+ set_vector_16 (b16);
+ set_vector_32 (b32);
+ set_vector_64 (b64);
+ set_vector_long (blibl);
+
+ /* Calculate their absolute values. */
+ absolute_s8 (a8, b8);
+ absolute_s16 (a16, b16);
+ absolute_s32 (a32, b32);
+ absolute_s64 (a64, b64);
+ /* abs () from stdlib. */
+ absolute_s32_lib (alib32, b32);
+ absolute_l32_lib (alibl, blibl);
+
+ /* Check. */
+ check_vector_8 (a8, abs_vector_8);
+ check_vector_16 (a16, abs_vector_16);
+ check_vector_32 (a32, abs_vector_32);
+ check_vector_64 (a64, abs_vector_64);
+ check_vector_32 (alib32, abs_vector_32);
+ check_vector_long (alibl, abs_vector_long);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-abs.x b/gcc/testsuite/gcc.target/aarch64/vect-abs.x
new file mode 100644
index 0000000000..2e67cc296b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-abs.x
@@ -0,0 +1,36 @@
+
+extern int abs (int);
+extern long labs (long);
+
+typedef signed char *__restrict__ pRINT8;
+typedef short *__restrict__ pRINT16;
+typedef int *__restrict__ pRINT32;
+typedef long *__restrict__ pRLONG;
+typedef long long *__restrict__ pRINT64;
+
+#define DEF_ABS(size) void absolute_s##size (pRINT##size a, pRINT##size b) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = (b[i] > 0 ? b[i] : -b[i]); \
+ }
+
+DEF_ABS (8);
+DEF_ABS (16);
+DEF_ABS (32);
+DEF_ABS (64);
+
+/* Test abs () vectorization. */
+void absolute_s32_lib (pRINT32 a, pRINT32 b)
+{
+ int i;
+ for (i=0; i<N; i++)
+ a[i] = abs (b[i]);
+}
+
+void absolute_l32_lib (pRLONG a, pRLONG b)
+{
+ int i;
+ for (i=0; i<N; i++)
+ a[i] = labs (b[i]);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-clz.c b/gcc/testsuite/gcc.target/aarch64/vect-clz.c
new file mode 100644
index 0000000000..8f1fe70905
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-clz.c
@@ -0,0 +1,35 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -save-temps -fno-inline" } */
+
+extern void abort ();
+
+void
+count_lz_v4si (unsigned *__restrict a, int *__restrict b)
+{
+ int i;
+
+ for (i = 0; i < 4; i++)
+ b[i] = __builtin_clz (a[i]);
+}
+
+/* { dg-final { scan-assembler "clz\tv\[0-9\]+\.4s" } } */
+
+int
+main ()
+{
+ unsigned int x[4] = { 0x0, 0xFFFF, 0x1FFFF, 0xFFFFFFFF };
+ int r[4] = { 32, 16, 15, 0 };
+ int d[4], i;
+
+ count_lz_v4si (x, d);
+
+ for (i = 0; i < 4; i++)
+ {
+ if (d[i] != r[i])
+ abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-compile.c
new file mode 100644
index 0000000000..33130aab55
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-compile.c
@@ -0,0 +1,22 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include "vect.x"
+
+/* { dg-final { scan-assembler "orn\\tv" } } */
+/* { dg-final { scan-assembler "bic\\tv" } } */
+/* { dg-final { scan-assembler "mla\\tv" } } */
+/* { dg-final { scan-assembler "mls\\tv" } } */
+/* { dg-final { scan-assembler "smax\\tv" } } */
+/* { dg-final { scan-assembler "smin\\tv" } } */
+/* { dg-final { scan-assembler "umax\\tv" } } */
+/* { dg-final { scan-assembler "umin\\tv" } } */
+/* { dg-final { scan-assembler "umaxv" } } */
+/* { dg-final { scan-assembler "uminv" } } */
+/* { dg-final { scan-assembler "smaxv" } } */
+/* { dg-final { scan-assembler "sminv" } } */
+/* { dg-final { scan-assembler "sabd" } } */
+/* { dg-final { scan-assembler "saba" } } */
+/* { dg-final { scan-assembler-times "addv" 2} } */
+/* { dg-final { scan-assembler-times "addp" 2} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-faddv-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-faddv-compile.c
new file mode 100644
index 0000000000..cce9240343
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-faddv-compile.c
@@ -0,0 +1,7 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math" } */
+
+#include "vect-faddv.x"
+
+/* { dg-final { scan-assembler-times "faddp\\tv" 2} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-faddv.c b/gcc/testsuite/gcc.target/aarch64/vect-faddv.c
new file mode 100644
index 0000000000..f30bde8e8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-faddv.c
@@ -0,0 +1,31 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3 -ffast-math" } */
+
+extern void abort (void);
+
+#include "vect-faddv.x"
+
+int main (void)
+{
+ float addv_f32_value = -120.0f;
+ double addv_f64_value = 120.0;
+ float af32[16];
+ double af64[16];
+ int i;
+
+ /* Set up input vectors. */
+ for (i=0; i<16; i++)
+ {
+ af32[i] = (float)-i;
+ af64[i] = (double)i;
+ }
+
+ if (addv_f32 (af32) != addv_f32_value)
+ abort ();
+
+ if (addv_f64 (af64) != addv_f64_value)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-faddv.x b/gcc/testsuite/gcc.target/aarch64/vect-faddv.x
new file mode 100644
index 0000000000..d99ab21563
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-faddv.x
@@ -0,0 +1,23 @@
+
+typedef float *__restrict__ pRF32;
+typedef double *__restrict__ pRF64;
+
+float addv_f32 (pRF32 a)
+{
+ int i;
+ float s = 0.0;
+ for (i=0; i<16; i++)
+ s += a[i];
+
+ return s;
+}
+
+double addv_f64 (pRF64 a)
+{
+ int i;
+ double s = 0.0;
+ for (i=0; i<16; i++)
+ s += a[i];
+
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c
new file mode 100644
index 0000000000..6c2e2c8b30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-d.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE double
+#define ITYPE long
+#define OP ==
+#define INV_OP !=
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c
new file mode 100644
index 0000000000..5a2109c4ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-eq-f.c
@@ -0,0 +1,15 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE float
+#define ITYPE int
+#define OP ==
+#define INV_OP !=
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */
+/* { dg-final { scan-assembler "fcmeq\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c
new file mode 100644
index 0000000000..8fad79998e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-d.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE double
+#define ITYPE long
+#define OP >=
+#define INV_OP <
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */
+/* { dg-final { scan-assembler "fcmlt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c
new file mode 100644
index 0000000000..7aab9e6b0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-ge-f.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE float
+#define ITYPE int
+#define OP >=
+#define INV_OP <
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */
+/* { dg-final { scan-assembler "fcmge\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */
+/* { dg-final { scan-assembler "fcmlt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c
new file mode 100644
index 0000000000..d26acaae3c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-d.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE double
+#define ITYPE long
+#define OP >
+#define INV_OP <=
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */
+/* { dg-final { scan-assembler "fcmle\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c
new file mode 100644
index 0000000000..2797fd1a11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm-gt-f.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all -fno-unroll-loops --save-temps -fno-inline" } */
+
+#define FTYPE float
+#define ITYPE int
+#define OP >
+#define INV_OP <=
+
+#include "vect-fcm.x"
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 8 "vect" } } */
+/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s" } } */
+/* { dg-final { scan-assembler "fcmgt\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */
+/* { dg-final { scan-assembler "fcmle\\tv\[0-9\]+\.\[24\]s, v\[0-9\]+\.\[24\]s, 0" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fcm.x b/gcc/testsuite/gcc.target/aarch64/vect-fcm.x
new file mode 100644
index 0000000000..614f0dec06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fcm.x
@@ -0,0 +1,124 @@
+#include <stdlib.h>
+#define N 16
+
+FTYPE input1[N] =
+{2.0, 4.0, 8.0, 16.0,
+ 2.125, 4.25, 8.5, 17.0,
+ -2.0, -4.0, -8.0, -16.0,
+ -2.125, -4.25, -8.5, -17.0};
+
+FTYPE input2[N] =
+{-2.0, 4.0, -8.0, 16.0,
+ 2.125, -4.25, 8.5, -17.0,
+ 2.0, -4.0, 8.0, -16.0,
+ -2.125, 4.25, -8.5, 17.0};
+
+/* Float comparisons, float results. */
+
+void
+foo (FTYPE *in1, FTYPE *in2, FTYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] OP in2[i]) ? 2.0 : 4.0;
+}
+
+void
+bar (FTYPE *in1, FTYPE *in2, FTYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] INV_OP in2[i]) ? 4.0 : 2.0;
+}
+
+void
+foobar (FTYPE *in1, FTYPE *in2, FTYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] OP 0.0) ? 4.0 : 2.0;
+}
+
+void
+foobarbar (FTYPE *in1, FTYPE *in2, FTYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] INV_OP 0.0) ? 4.0 : 2.0;
+}
+
+/* Float comparisons, int results. */
+
+void
+foo_int (FTYPE *in1, FTYPE *in2, ITYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] OP in2[i]) ? 2 : 4;
+}
+
+void
+bar_int (FTYPE *in1, FTYPE *in2, ITYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] INV_OP in2[i]) ? 4 : 2;
+}
+
+void
+foobar_int (FTYPE *in1, FTYPE *in2, ITYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] OP 0.0) ? 4 : 2;
+}
+
+void
+foobarbar_int (FTYPE *in1, FTYPE *in2, ITYPE *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = (in1[i] INV_OP 0.0) ? 4 : 2;
+}
+
+int
+main (int argc, char **argv)
+{
+ FTYPE out1[N];
+ FTYPE out2[N];
+ ITYPE outi1[N];
+ ITYPE outi2[N];
+
+ int i = 0;
+ foo (input1, input2, out1);
+ bar (input1, input2, out2);
+ for (i = 0; i < N; i++)
+ if (out1[i] != out2[i])
+ abort ();
+ foobar (input1, input2, out1);
+ foobarbar (input1, input2, out2);
+ for (i = 0; i < N; i++)
+ if (out1[i] == out2[i])
+ abort ();
+
+ foo_int (input1, input2, outi1);
+ bar_int (input1, input2, outi2);
+ for (i = 0; i < N; i++)
+ if (outi1[i] != outi2[i])
+ abort ();
+ foobar_int (input1, input2, outi1);
+ foobarbar_int (input1, input2, outi2);
+ for (i = 0; i < N; i++)
+ if (outi1[i] == outi2[i])
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin-compile.c
new file mode 100644
index 0000000000..1285a50632
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin-compile.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math" } */
+
+#include "vect-fmax-fmin.x"
+
+/* { dg-final { scan-assembler "fmaxnm\\tv" } } */
+/* { dg-final { scan-assembler "fminnm\\tv" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.c b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.c
new file mode 100644
index 0000000000..42600b7393
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.c
@@ -0,0 +1,105 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -ffast-math" } */
+
+extern void abort (void);
+
+#include "vect-fmax-fmin.x"
+
+#include "vect-fmaxv-fminv.x"
+
+#define DEFN_SETV(type) \
+ set_vector_##type (pR##type a, type n) \
+ { \
+ int i; \
+ for (i=0; i<16; i++) \
+ a[i] = n; \
+ }
+
+#define DEFN_CHECKV(type) \
+ void check_vector_##type (pR##type a, pR##type vec) \
+ { \
+ int i; \
+ for (i=0; i<16; i++) \
+ if (a[i] != vec[i]) \
+ abort (); \
+ }
+
+#define TEST2(fname, type) \
+ set_vector_##type (c##type, 0.0); \
+ fname##_##type (a##type, b##type); \
+ check_vector_##type (c##type, fname##_##type##_vector);
+
+#define TEST3(fname, type) \
+ set_vector_##type (c##type, 0.0); \
+ fname##_##type (a##type, b##type, c##type); \
+ check_vector_##type (c##type, fname##_##type##_vector);
+
+#define TEST(fname, N) \
+ TEST##N (fname, F32); \
+ TEST##N (fname, F64);
+
+typedef float F32;
+typedef double F64;
+
+DEFN_SETV (F32)
+DEFN_SETV (F64)
+
+DEFN_CHECKV (F32)
+DEFN_CHECKV (F64)
+
+int main (void)
+{
+
+ F32 aF32[16];
+ F32 bF32[16];
+ F32 cF32[16];
+
+ F64 aF64[16];
+ F64 bF64[16];
+ F64 cF64[16];
+ int i;
+
+ /* Golden vectors. */
+ F32 max_F32_vector[] = { 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0,
+ 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0 };
+
+ F64 max_F64_vector[] = { 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0,
+ 8.0, 9.0, 10.0, 11.0, 12.0, 13.0, 14.0, 15.0 };
+
+ F32 min_F32_vector[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
+ 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0 };
+
+ F64 min_F64_vector[] = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0,
+ 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 0.0 };
+
+ F32 minv_F32_value = 0.0f;
+ F32 maxv_F32_value = 15.0f;
+
+ F64 minv_F64_value = 0.0;
+ F64 maxv_F64_value = 15.0;
+
+ /* Setup input vectors. */
+ for (i=0; i<16; i++)
+ {
+ aF32[i] = (float)(15-i);
+ bF32[i] = (float)i;
+ aF64[i] = (double)(15-i);
+ bF64[i] = (double)i;
+ }
+
+ TEST (max, 3);
+ TEST (min, 3);
+
+ /* Test across lanes ops. */
+ if (maxv_f32 (max_F32_vector) != maxv_F32_value)
+ abort ();
+ if (minv_f32 (min_F32_vector) != minv_F32_value)
+ abort ();
+
+ if (maxv_f64 (max_F64_vector) != maxv_F64_value)
+ abort ();
+ if (minv_f64 (min_F64_vector) != minv_F64_value)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.x b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.x
new file mode 100644
index 0000000000..a8948208a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmax-fmin.x
@@ -0,0 +1,32 @@
+
+typedef float *__restrict__ pRF32;
+typedef double *__restrict__ pRF64;
+
+
+void max_F32 (pRF32 a, pRF32 b, pRF32 c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] > b[i] ? a[i] : b[i]);
+}
+
+void min_F32 (pRF32 a, pRF32 b, pRF32 c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] < b[i] ? a[i] : b[i]);
+}
+
+void max_F64 (pRF64 a, pRF64 b, pRF64 c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] > b[i] ? a[i] : b[i]);
+}
+
+void min_F64 (pRF64 a, pRF64 b, pRF64 c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] < b[i] ? a[i] : b[i]);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv-compile.c
new file mode 100644
index 0000000000..975cef9c58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv-compile.c
@@ -0,0 +1,10 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -fno-vect-cost-model" } */
+
+#include "vect-fmaxv-fminv.x"
+
+/* { dg-final { scan-assembler "fminnmv" } } */
+/* { dg-final { scan-assembler "fmaxnmv" } } */
+/* { dg-final { scan-assembler "fminnmp" } } */
+/* { dg-final { scan-assembler "fmaxnmp" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv.x b/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv.x
new file mode 100644
index 0000000000..0bc6ba494c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmaxv-fminv.x
@@ -0,0 +1,43 @@
+
+typedef float *__restrict__ pRF32;
+typedef double *__restrict__ pRF64;
+
+float maxv_f32 (pRF32 a)
+{
+ int i;
+ float s = a[0];
+ for (i=1;i<8;i++)
+ s = (s > a[i] ? s : a[i]);
+
+ return s;
+}
+
+float minv_f32 (pRF32 a)
+{
+ int i;
+ float s = a[0];
+ for (i=1;i<16;i++)
+ s = (s < a[i] ? s : a[i]);
+
+ return s;
+}
+
+double maxv_f64 (pRF64 a)
+{
+ int i;
+ double s = a[0];
+ for (i=1;i<8;i++)
+ s = (s > a[i] ? s : a[i]);
+
+ return s;
+}
+
+double minv_f64 (pRF64 a)
+{
+ int i;
+ double s = a[0];
+ for (i=1;i<16;i++)
+ s = (s < a[i] ? s : a[i]);
+
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c
new file mode 100644
index 0000000000..667d22745e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovd-zero.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */
+
+#define N 32
+
+void
+foo (double *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = 0.0;
+}
+
+/* { dg-final { scan-assembler "movi\\tv\[0-9\]+\\.2d, 0" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c
new file mode 100644
index 0000000000..a0211c7158
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovd.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */
+
+#define N 32
+
+void
+foo (double *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = 4.25;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-assembler "fmov\\tv\[0-9\]+\\.2d, 4\\.25" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c
new file mode 100644
index 0000000000..259a9d41f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovf-zero.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */
+
+#define N 32
+
+void
+foo (float *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = 0.0;
+}
+
+/* { dg-final { scan-assembler "movi\\tv\[0-9\]+\\.\[24\]s, 0" } } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c b/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c
new file mode 100644
index 0000000000..0bd21dc190
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fmovf.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdump-tree-vect-all" } */
+
+#define N 32
+
+void
+foo (float *output)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = 4.25;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-assembler "fmov\\tv\[0-9\]+\\.\[24\]s, 4\\.25" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fp-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-fp-compile.c
new file mode 100644
index 0000000000..47ef100e87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fp-compile.c
@@ -0,0 +1,14 @@
+
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#include "vect-fp.x"
+
+/* { dg-final { scan-assembler "fadd\\tv" } } */
+/* { dg-final { scan-assembler "fsub\\tv" } } */
+/* { dg-final { scan-assembler "fmul\\tv" } } */
+/* { dg-final { scan-assembler "fdiv\\tv" } } */
+/* { dg-final { scan-assembler "fneg\\tv" } } */
+/* { dg-final { scan-assembler "fabs\\tv" } } */
+/* { dg-final { scan-assembler "fabd\\tv" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fp.c b/gcc/testsuite/gcc.target/aarch64/vect-fp.c
new file mode 100644
index 0000000000..bcf9d9d753
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fp.c
@@ -0,0 +1,148 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+extern void abort (void);
+
+#include "vect-fp.x"
+
+
+#define DEFN_SETV(type) \
+ set_vector_##type (pR##type a, type n) \
+ { \
+ int i; \
+ for (i=0; i<16; i++) \
+ a[i] = n; \
+ }
+
+#define DEFN_CHECKV(type) \
+ void check_vector_##type (pR##type a, pR##type vec) \
+ { \
+ int i; \
+ for (i=0; i<16; i++) \
+ if (a[i] != vec[i]) \
+ abort (); \
+ }
+
+#define TEST2(fname, type) \
+ set_vector_##type (a##type, 0.0); \
+ fname##_##type (a##type, b##type); \
+ check_vector_##type (a##type, fname##_##type##_vector);
+
+#define TEST3(fname, type) \
+ set_vector_##type (a##type, 0.0); \
+ fname##_##type (a##type, b##type, c##type); \
+ check_vector_##type (a##type, fname##_##type##_vector);
+
+#define TEST(fname, N) \
+ TEST##N(fname, F32); \
+ TEST##N(fname, F64);
+
+DEFN_SETV (F32)
+DEFN_SETV (F64)
+
+DEFN_CHECKV (F32)
+DEFN_CHECKV (F64)
+
+int main (void)
+{
+ F32 aF32[16];
+ F32 bF32[16];
+ F32 cF32[16];
+
+ F64 aF64[16];
+ F64 bF64[16];
+ F64 cF64[16];
+ int i;
+
+ F32 add_F32_vector[] = { 3.0f, 5.0f, 7.0f, 9.0f, 11.0f,
+ 13.0f, 15.0f, 17.0f, 19.0f,
+ 21.0f, 23.0f, 25.0f, 27.0f,
+ 29.0f, 31.0f, 33.0f };
+
+ F64 add_F64_vector[] = { 3.0, 5.0, 7.0, 9.0, 11.0,
+ 13.0, 15.0, 17.0, 19.0,
+ 21.0, 23.0, 25.0, 27.0,
+ 29.0, 31.0, 33.0 };
+
+ F32 sub_F32_vector[] = { -1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
+ -1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
+ -1.0f, -1.0f, -1.0f, -1.0f, -1.0f,
+ -1.0f };
+
+ F64 sub_F64_vector[] = { -1.0, -1.0, -1.0, -1.0, -1.0,
+ -1.0, -1.0, -1.0, -1.0, -1.0,
+ -1.0, -1.0, -1.0, -1.0, -1.0,
+ -1.0 };
+
+ F32 mul_F32_vector[] = { 2.0f, 6.0f, 12.0f, 20.0f, 30.0f,
+ 42.0f, 56.0f, 72.0f, 90.0f,
+ 110.0f, 132.0f, 156.0f, 182.0f,
+ 210.0f, 240.0f, 272.0f };
+
+ F64 mul_F64_vector[] = { 2.0, 6.0, 12.0, 20.0, 30.0,
+ 42.0, 56.0, 72.0, 90.0,
+ 110.0, 132.0, 156.0, 182.0,
+ 210.0, 240.0, 272.0 };
+
+ F32 div_F32_vector[] = { 0.5f, (float)(2.0/3.0), 0.75f, 0.8f,
+ (float)(5.0/6.0), (float)(6.0/7.0), 0.875000f,
+ (float)(8.0/9.0), 0.900000f, (float)(10.0/11.0),
+ (float)(11.0/12.0), (float)(12.0/13.0),
+ (float)(13.0/14.0), (float)(14.0/15.0), 0.937500f,
+ (float)(16.0/17.0) };
+
+ F64 div_F64_vector[] = { 0.5, (2.0/3.0), 0.75, 0.8, (5.0/6.0),
+ (6.0/7.0), 0.875000, (8.0/9.0), 0.900000,
+ (10.0/11.0), (11.0/12.0), (12.0/13.0), (13.0/14.0),
+ (14.0/15.0), 0.937500, (16.0/17.0) };
+
+ F32 neg_F32_vector[] = { -1.0f, -2.0f, -3.0f, -4.0f,
+ -5.0f, -6.0f, -7.0f, -8.0f,
+ -9.0f, -10.0f, -11.0f, -12.0f,
+ -13.0f, -14.0f, -15.0f, -16.0f };
+
+ F64 neg_F64_vector[] = { -1.0, -2.0, -3.0, -4.0,
+ -5.0, -6.0, -7.0, -8.0,
+ -9.0, -10.0, -11.0, -12.0,
+ -13.0, -14.0, -15.0, -16.0 };
+
+ F32 abs_F32_vector[] = { 1.0f, 2.0f, 3.0f, 4.0f,
+ 5.0f, 6.0f, 7.0f, 8.0f,
+ 9.0f, 10.0f, 11.0f, 12.0f,
+ 13.0f, 14.0f, 15.0f, 16.0f };
+
+ F64 abs_F64_vector[] = { 1.0, 2.0, 3.0, 4.0,
+ 5.0, 6.0, 7.0, 8.0,
+ 9.0, 10.0, 11.0, 12.0,
+ 13.0, 14.0, 15.0, 16.0 };
+
+ F32 fabd_F32_vector[] = { 1.0f, 1.0f, 1.0f, 1.0f,
+ 1.0f, 1.0f, 1.0f, 1.0f,
+ 1.0f, 1.0f, 1.0f, 1.0f,
+ 1.0f, 1.0f, 1.0f, 1.0f };
+
+ F64 fabd_F64_vector[] = { 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0,
+ 1.0, 1.0, 1.0, 1.0 };
+
+ /* Setup input vectors. */
+ for (i=1; i<=16; i++)
+ {
+ bF32[i-1] = (float)i;
+ cF32[i-1] = (float)(i+1);
+ bF64[i-1] = (double)i;
+ cF64[i-1] = (double)(i+1);
+ }
+
+ TEST (add, 3);
+ TEST (sub, 3);
+ TEST (mul, 3);
+ TEST (div, 3);
+ TEST (neg, 2);
+ TEST (abs, 2);
+ TEST (fabd, 3);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-fp.x b/gcc/testsuite/gcc.target/aarch64/vect-fp.x
new file mode 100644
index 0000000000..82d1b1c50e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-fp.x
@@ -0,0 +1,60 @@
+
+typedef float F32;
+typedef double F64;
+typedef float *__restrict__ pRF32;
+typedef double *__restrict__ pRF64;
+
+extern float fabsf (float);
+extern double fabs (double);
+
+#define DEF3a(fname, type, op) \
+ void fname##_##type (pR##type a, \
+ pR##type b, \
+ pR##type c) \
+ { \
+ int i; \
+ for (i = 0; i < 16; i++) \
+ a[i] = op (b[i] - c[i]); \
+ }
+
+#define DEF3(fname, type, op) \
+ void fname##_##type (pR##type a, \
+ pR##type b, \
+ pR##type c) \
+ { \
+ int i; \
+ for (i = 0; i < 16; i++) \
+ a[i] = b[i] op c[i]; \
+ }
+
+#define DEF2(fname, type, op) \
+ void fname##_##type (pR##type a, \
+ pR##type b) \
+ { \
+ int i; \
+ for (i = 0; i < 16; i++) \
+ a[i] = op(b[i]); \
+ }
+
+
+#define DEFN3a(fname, op) \
+ DEF3a (fname, F32, op) \
+ DEF3a (fname, F64, op)
+
+#define DEFN3(fname, op) \
+ DEF3 (fname, F32, op) \
+ DEF3 (fname, F64, op)
+
+#define DEFN2(fname, op) \
+ DEF2 (fname, F32, op) \
+ DEF2 (fname, F64, op)
+
+DEFN3 (add, +)
+DEFN3 (sub, -)
+DEFN3 (mul, *)
+DEFN3 (div, /)
+DEFN2 (neg, -)
+DEF2 (abs, F32, fabsf)
+DEF2 (abs, F64, fabs)
+DEF3a (fabd, F32, fabsf)
+DEF3a (fabd, F64, fabs)
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile-fp.c b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile-fp.c
new file mode 100644
index 0000000000..66e0168557
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile-fp.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-vect-cost-model" } */
+
+#include "stdint.h"
+#include "vect-ld1r.x"
+
+DEF (float)
+DEF (double)
+
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "ldr\\t\x\[0-9\]+"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.2d"} } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile.c
new file mode 100644
index 0000000000..761777f794
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-compile.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -fno-vect-cost-model" } */
+
+#include "stdint.h"
+#include "vect-ld1r.x"
+
+DEF (int8_t)
+DEF (int16_t)
+DEF (int32_t)
+DEF (int64_t)
+
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.8b"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.16b"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.4h"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.8h"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "ldr\\t\x\[0-9\]+"} } */
+/* { dg-final { scan-assembler "ld1r\\t\{v\[0-9\]+\.2d"} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-ld1r-fp.c b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-fp.c
new file mode 100644
index 0000000000..5e384e1bb4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-ld1r-fp.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+extern void abort (void);
+
+#include "stdint.h"
+#include "vect-ld1r.x"
+
+DEF (float)
+DEF (double)
+
+#define FOOD(TYPE) \
+ foo_ ## TYPE ## _d (&a_ ## TYPE, output_ ## TYPE)
+
+#define FOOQ(TYPE) \
+ foo_ ## TYPE ## _q (&a_ ## TYPE, output_ ## TYPE)
+
+#define CHECKD(TYPE) \
+ for (i = 0; i < 8 / sizeof (TYPE); i++) \
+ if (output_ ## TYPE[i] != a_ ## TYPE) \
+ abort ()
+
+#define CHECKQ(TYPE) \
+ for (i = 0; i < 32 / sizeof (TYPE); i++) \
+ if (output_ ## TYPE[i] != a_ ## TYPE) \
+ abort ()
+
+#define DECL(TYPE) \
+ TYPE output_ ## TYPE[32]; \
+ TYPE a_ ## TYPE = (TYPE)12.2
+
+int
+main (void)
+{
+
+ DECL(float);
+ DECL(double);
+ int i;
+
+ FOOD (float);
+ CHECKD (float);
+ FOOQ (float);
+ CHECKQ (float);
+
+ FOOD (double);
+ CHECKD (double);
+ FOOQ (double);
+ CHECKQ (double);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-ld1r.c b/gcc/testsuite/gcc.target/aarch64/vect-ld1r.c
new file mode 100644
index 0000000000..f0571de9f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-ld1r.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+extern void abort (void);
+
+#include "stdint.h"
+#include "vect-ld1r.x"
+
+DEF (int8_t)
+DEF (int16_t)
+DEF (int32_t)
+DEF (int64_t)
+
+#define FOOD(TYPE) \
+ foo_ ## TYPE ## _d (&a_ ## TYPE, output_ ## TYPE)
+
+#define FOOQ(TYPE) \
+ foo_ ## TYPE ## _q (&a_ ## TYPE, output_ ## TYPE)
+
+#define CHECKD(TYPE) \
+ for (i = 0; i < 8 / sizeof (TYPE); i++) \
+ if (output_ ## TYPE[i] != a_ ## TYPE) \
+ abort ()
+
+#define CHECKQ(TYPE) \
+ for (i = 0; i < 32 / sizeof (TYPE); i++) \
+ if (output_ ## TYPE[i] != a_ ## TYPE) \
+ abort ()
+
+#define DECL(TYPE) \
+ TYPE output_ ## TYPE[32]; \
+ TYPE a_ ## TYPE = (TYPE)12
+
+int
+main (void)
+{
+
+ DECL(int8_t);
+ DECL(int16_t);
+ DECL(int32_t);
+ DECL(int64_t);
+ int i;
+
+ FOOD (int8_t);
+ CHECKD (int8_t);
+ FOOQ (int8_t);
+ CHECKQ (int8_t);
+
+ FOOD (int16_t);
+ CHECKD (int16_t);
+ FOOQ (int16_t);
+ CHECKQ (int16_t);
+
+ FOOD (int32_t);
+ CHECKD (int32_t);
+ FOOQ (int32_t);
+ CHECKQ (int32_t);
+
+ FOOD (int64_t);
+ CHECKD (int64_t);
+ FOOQ (int64_t);
+ CHECKQ (int64_t);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-ld1r.x b/gcc/testsuite/gcc.target/aarch64/vect-ld1r.x
new file mode 100644
index 0000000000..680ce43457
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-ld1r.x
@@ -0,0 +1,15 @@
+
+#define DEF(TYPE) \
+ void \
+ foo_ ## TYPE ## _d (TYPE *a, TYPE *output) \
+ { \
+ int i; \
+ for (i = 0; i < 8 / sizeof (TYPE); i++) \
+ output[i] = *a; \
+ } \
+ foo_ ## TYPE ## _q (TYPE *a, TYPE *output) \
+ { \
+ int i; \
+ for (i = 0; i < 32 / sizeof (TYPE); i++) \
+ output[i] = *a; \
+ }
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-movi.c b/gcc/testsuite/gcc.target/aarch64/vect-movi.c
new file mode 100644
index 0000000000..59a0bd5cc5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-movi.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps -fno-inline" } */
+
+extern void abort (void);
+
+#define N 16
+
+static void
+movi_msl8 (int *__restrict a)
+{
+ int i;
+
+ /* { dg-final { scan-assembler "movi\\tv\[0-9\]+\.4s, 0xab, msl 8" } } */
+ for (i = 0; i < N; i++)
+ a[i] = 0xabff;
+}
+
+static void
+movi_msl16 (int *__restrict a)
+{
+ int i;
+
+ /* { dg-final { scan-assembler "movi\\tv\[0-9\]+\.4s, 0xab, msl 16" } } */
+ for (i = 0; i < N; i++)
+ a[i] = 0xabffff;
+}
+
+static void
+mvni_msl8 (int *__restrict a)
+{
+ int i;
+
+ /* { dg-final { scan-assembler "mvni\\tv\[0-9\]+\.4s, 0xab, msl 8" } } */
+ for (i = 0; i < N; i++)
+ a[i] = 0xffff5400;
+}
+
+static void
+mvni_msl16 (int *__restrict a)
+{
+ int i;
+
+ /* { dg-final { scan-assembler "mvni\\tv\[0-9\]+\.4s, 0xab, msl 16" } } */
+ for (i = 0; i < N; i++)
+ a[i] = 0xff540000;
+}
+
+int
+main (void)
+{
+ int a[N] = { 0 };
+ int i;
+
+#define CHECK_ARRAY(a, val) \
+ for (i = 0; i < N; i++) \
+ if (a[i] != val) \
+ abort ();
+
+ movi_msl8 (a);
+ CHECK_ARRAY (a, 0xabff);
+
+ movi_msl16 (a);
+ CHECK_ARRAY (a, 0xabffff);
+
+ mvni_msl8 (a);
+ CHECK_ARRAY (a, 0xffff5400);
+
+ mvni_msl16 (a);
+ CHECK_ARRAY (a, 0xff540000);
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c b/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c
new file mode 100644
index 0000000000..e90c97ff32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-mull-compile.c
@@ -0,0 +1,24 @@
+
+/* { dg-do compile } */
+/* { dg-options "-O3" } */
+
+#define N 16
+
+#include "vect-mull.x"
+
+DEF_MULL2 (DEF_MULLB)
+DEF_MULL2 (DEF_MULLH)
+DEF_MULL2 (DEF_MULLS)
+
+/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.8h"} } */
+/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "smull\\tv\[0-9\]+\.2d"} } */
+/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.8h"} } */
+/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "umull\\tv\[0-9\]+\.2d"} } */
+/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.8h"} } */
+/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "smull2\\tv\[0-9\]+\.2d"} } */
+/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.8h"} } */
+/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.4s"} } */
+/* { dg-final { scan-assembler "umull2\\tv\[0-9\]+\.2d"} } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-mull.c b/gcc/testsuite/gcc.target/aarch64/vect-mull.c
new file mode 100644
index 0000000000..62a3552f7b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-mull.c
@@ -0,0 +1,138 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+#include "limits.h"
+
+extern void abort (void);
+
+#define N 16
+
+#include "vect-mull.x"
+
+#define SET_VEC(size, type, sign) \
+ void set_vector_##sign##size \
+ (pR##sign##INT##size b, \
+ pR##sign##INT##size c) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ { \
+ b[i] = (type)((INT_MAX >> (32 - size)) - i); \
+ c[i] = (type)((INT_MAX >> (32 - size)) - i * 2); \
+ } \
+ }
+
+#define CHECK_VEC(size, sign) void check_vector_##sign##size (pR##sign##INT##size a, \
+ pR##sign##INT##size b) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ if (a[i] != b[i]) \
+ abort (); \
+ }
+
+SET_VEC (8, signed char, S)
+SET_VEC (16, signed short, S)
+SET_VEC (32, signed int, S)
+
+SET_VEC (8, unsigned char, U)
+SET_VEC (16, unsigned short, U)
+SET_VEC (32, unsigned int, U)
+
+DEF_MULL2 (DEF_MULLB)
+DEF_MULL2 (DEF_MULLH)
+DEF_MULL2 (DEF_MULLS)
+
+CHECK_VEC (8, S)
+CHECK_VEC (8, U)
+CHECK_VEC (16, S)
+CHECK_VEC (16, U)
+CHECK_VEC (32, S)
+CHECK_VEC (32, U)
+CHECK_VEC (64, S)
+CHECK_VEC (64, U)
+
+int main (void)
+{
+
+#define DECL_VAR(name) signed char name##_S8[N]; \
+ signed short name##_S16[N]; \
+ signed int name##_S32[N]; \
+ unsigned char name##_U8[N]; \
+ unsigned short name##_U16[N]; \
+ unsigned int name##_U32[N];
+
+ DECL_VAR (output);
+ signed long long output_S64[N];
+ unsigned long long output_U64[N];
+
+ DECL_VAR (input1);
+ DECL_VAR (input2);
+
+ signed short expected_S16[] =
+ { 16129, 15750, 15375, 15004, 14637, 14274, 13915, 13560,
+ 13209, 12862, 12519, 12180, 11845, 11514, 11187, 10864 };
+
+ signed int expected_S32[] =
+ { 1073676289, 1073577990, 1073479695, 1073381404, 1073283117,
+ 1073184834, 1073086555, 1072988280, 1072890009, 1072791742,
+ 1072693479, 1072595220, 1072496965, 1072398714, 1072300467,
+ 1072202224 };
+
+ signed long long expected_S64[] =
+ { 4611686014132420609LL, 4611686007689969670LL,
+ 4611686001247518735LL, 4611685994805067804LL,
+ 4611685988362616877LL, 4611685981920165954LL,
+ 4611685975477715035LL, 4611685969035264120LL,
+ 4611685962592813209LL, 4611685956150362302LL,
+ 4611685949707911399LL, 4611685943265460500LL,
+ 4611685936823009605LL, 4611685930380558714LL,
+ 4611685923938107827LL, 4611685917495656944LL };
+
+ unsigned short expected_U16[] =
+ { 16129, 15750, 15375, 15004, 14637, 14274, 13915, 13560,
+ 13209, 12862, 12519, 12180, 11845, 11514, 11187, 10864 };
+
+ unsigned int expected_U32[] =
+ { 1073676289, 1073577990, 1073479695, 1073381404, 1073283117,
+ 1073184834, 1073086555, 1072988280, 1072890009, 1072791742,
+ 1072693479, 1072595220, 1072496965, 1072398714, 1072300467,
+ 1072202224 };
+
+ unsigned long long expected_U64[] =
+ { 4611686014132420609ULL, 4611686007689969670ULL,
+ 4611686001247518735ULL, 4611685994805067804ULL,
+ 4611685988362616877ULL, 4611685981920165954ULL,
+ 4611685975477715035ULL, 4611685969035264120ULL,
+ 4611685962592813209ULL, 4611685956150362302ULL,
+ 4611685949707911399ULL, 4611685943265460500ULL,
+ 4611685936823009605ULL, 4611685930380558714ULL,
+ 4611685923938107827ULL, 4611685917495656944ULL };
+
+ /* Set up input. */
+ set_vector_S8 (input1_S8, input2_S8);
+ set_vector_S16 (input1_S16, input2_S16);
+ set_vector_S32 (input1_S32, input2_S32);
+ set_vector_U8 (input1_U8, input2_U8);
+ set_vector_U16 (input1_U16, input2_U16);
+ set_vector_U32 (input1_U32, input2_U32);
+
+ /* Calculate actual results. */
+ widen_mult_Sb (output_S16, input1_S8, input2_S8);
+ widen_mult_Sh (output_S32, input1_S16, input2_S16);
+ widen_mult_Ss (output_S64, input1_S32, input2_S32);
+ widen_mult_Ub (output_U16, input1_U8, input2_U8);
+ widen_mult_Uh (output_U32, input1_U16, input2_U16);
+ widen_mult_Us (output_U64, input1_U32, input2_U32);
+
+ /* Check actual vs. expected. */
+ check_vector_S16 (expected_S16, output_S16);
+ check_vector_S32 (expected_S32, output_S32);
+ check_vector_S64 (expected_S64, output_S64);
+ check_vector_U16 (expected_U16, output_U16);
+ check_vector_U32 (expected_U32, output_U32);
+ check_vector_U64 (expected_U64, output_U64);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-mull.x b/gcc/testsuite/gcc.target/aarch64/vect-mull.x
new file mode 100644
index 0000000000..39ec43d77e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-mull.x
@@ -0,0 +1,49 @@
+
+typedef signed char *__restrict__ pRSINT8;
+typedef signed short *__restrict__ pRSINT16;
+typedef signed int *__restrict__ pRSINT32;
+typedef signed long long *__restrict__ pRSINT64;
+
+typedef unsigned char *__restrict__ pRUINT8;
+typedef unsigned short *__restrict__ pRUINT16;
+typedef unsigned int *__restrict__ pRUINT32;
+typedef unsigned long long *__restrict__ pRUINT64;
+
+typedef signed short SH;
+typedef unsigned short UH;
+typedef signed int SS;
+typedef unsigned int US;
+typedef signed long long SLL;
+typedef unsigned long long ULL;
+
+#define DEF_MULLB(sign) \
+ void widen_mult_##sign##b (pR##sign##INT##16 a, \
+ pR##sign##INT##8 b, \
+ pR##sign##INT##8 c) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = (sign##H)b[i] * c[i]; \
+ }
+
+#define DEF_MULLH(sign) \
+ void widen_mult_##sign##h (pR##sign##INT##32 a, \
+ pR##sign##INT##16 b, \
+ pR##sign##INT##16 c) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = (sign##S)b[i] * c[i]; \
+ }
+#define DEF_MULLS(sign) \
+ void widen_mult_##sign##s (pR##sign##INT##64 a, \
+ pR##sign##INT##32 b, \
+ pR##sign##INT##32 c) \
+ { \
+ int i; \
+ for (i=0; i<N; i++) \
+ a[i] = (sign##LL)b[i] * c[i]; \
+ }
+
+#define DEF_MULL2(x) x (S) \
+ x (U)
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vaddv.c b/gcc/testsuite/gcc.target/aarch64/vect-vaddv.c
new file mode 100644
index 0000000000..7db12047e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vaddv.c
@@ -0,0 +1,128 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps -ffast-math" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+extern float fabsf (float);
+extern double fabs (double);
+
+#define NUM_TESTS 16
+#define DELTA 0.000001
+
+int8_t input_int8[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+int16_t input_int16[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+int32_t input_int32[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+int64_t input_int64[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+
+uint8_t input_uint8[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+uint16_t input_uint16[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+uint32_t input_uint32[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+
+uint64_t input_uint64[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+
+float input_float32[] = {0.1f, -0.1f, 0.4f, 10.3f,
+ 200.0f, -800.0f, -13.0f, -0.5f,
+ 7.9f, -870.0f, 10.4f, 310.11f,
+ 0.0f, -865.0f, -2213.0f, -1.5f};
+
+double input_float64[] = {0.1, -0.1, 0.4, 10.3,
+ 200.0, -800.0, -13.0, -0.5,
+ 7.9, -870.0, 10.4, 310.11,
+ 0.0, -865.0, -2213.0, -1.5};
+
+#define EQUALF(a, b) (fabsf (a - b) < DELTA)
+#define EQUALD(a, b) (fabs (a - b) < DELTA)
+#define EQUALL(a, b) (a == b)
+
+#define TEST(SUFFIX, Q, TYPE, LANES, FLOAT) \
+int \
+test_vaddv##SUFFIX##_##TYPE##x##LANES##_t (void) \
+{ \
+ int i, j; \
+ int moves = (NUM_TESTS - LANES) + 1; \
+ TYPE##_t out_l[NUM_TESTS]; \
+ TYPE##_t out_v[NUM_TESTS]; \
+ \
+ /* Calculate linearly. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ out_l[i] = input_##TYPE[i]; \
+ for (j = 1; j < LANES; j++) \
+ out_l[i] += input_##TYPE[i + j]; \
+ } \
+ \
+ /* Calculate using vector reduction intrinsics. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ TYPE##x##LANES##_t t1 = vld1##Q##_##SUFFIX (input_##TYPE + i); \
+ out_v[i] = vaddv##Q##_##SUFFIX (t1); \
+ } \
+ \
+ /* Compare. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ if (!EQUAL##FLOAT (out_v[i], out_l[i])) \
+ return 0; \
+ } \
+ return 1; \
+}
+
+#define BUILD_VARIANTS(TYPE, STYPE, W32, W64, F) \
+TEST (STYPE, , TYPE, W32, F) \
+TEST (STYPE, q, TYPE, W64, F) \
+
+BUILD_VARIANTS (int8, s8, 8, 16, L)
+BUILD_VARIANTS (uint8, u8, 8, 16, L)
+/* { dg-final { scan-assembler "addv\\tb\[0-9\]+, v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "addv\\tb\[0-9\]+, v\[0-9\]+\.16b" } } */
+BUILD_VARIANTS (int16, s16, 4, 8, L)
+BUILD_VARIANTS (uint16, u16, 4, 8, L)
+/* { dg-final { scan-assembler "addv\\th\[0-9\]+, v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "addv\\th\[0-9\]+, v\[0-9\]+\.8h" } } */
+BUILD_VARIANTS (int32, s32, 2, 4, L)
+BUILD_VARIANTS (uint32, u32, 2, 4, L)
+/* { dg-final { scan-assembler "addp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "addv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+TEST (s64, q, int64, 2, D)
+TEST (u64, q, uint64, 2, D)
+/* { dg-final { scan-assembler "addp\\td\[0-9\]+\, v\[0-9\]+\.2d" } } */
+
+BUILD_VARIANTS (float32, f32, 2, 4, F)
+/* { dg-final { scan-assembler "faddp\\ts\[0-9\]+, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "faddp\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+TEST (f64, q, float64, 2, D)
+/* { dg-final { scan-assembler "faddp\\td\[0-9\]+\, v\[0-9\]+\.2d" } } */
+
+#undef TEST
+#define TEST(SUFFIX, Q, TYPE, LANES, FLOAT) \
+{ \
+ if (!test_vaddv##SUFFIX##_##TYPE##x##LANES##_t ()) \
+ abort (); \
+}
+
+int
+main (int argc, char **argv)
+{
+BUILD_VARIANTS (int8, s8, 8, 16, L)
+BUILD_VARIANTS (uint8, u8, 8, 16, L)
+BUILD_VARIANTS (int16, s16, 4, 8, L)
+BUILD_VARIANTS (uint16, u16, 4, 8, L)
+BUILD_VARIANTS (int32, s32, 2, 4, L)
+BUILD_VARIANTS (uint32, u32, 2, 4, L)
+
+BUILD_VARIANTS (float32, f32, 2, 4, F)
+TEST (f64, q, float64, 2, D)
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vca.c b/gcc/testsuite/gcc.target/aarch64/vect-vca.c
new file mode 100644
index 0000000000..c0cf2efdfb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vca.c
@@ -0,0 +1,89 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+extern float fabsf (float);
+extern double fabs (double);
+
+#define NUM_TESTS 8
+
+float input_s1[] = {0.1f, -0.1f, 0.4f, 10.3f, 200.0f, -800.0f, -13.0f, -0.5f};
+float input_s2[] = {-0.2f, 0.4f, 0.04f, -100.3f, 2.0f, -80.0f, 13.0f, -0.5f};
+double input_d1[] = {0.1, -0.1, 0.4, 10.3, 200.0, -800.0, -13.0, -0.5};
+double input_d2[] = {-0.2, 0.4, 0.04, -100.3, 2.0, -80.0, 13.0, -0.5};
+
+#define TEST(T, CMP, SUFFIX, WIDTH, LANES, Q, F) \
+int \
+test_vca##T##_float##WIDTH##x##LANES##_t (void) \
+{ \
+ int ret = 0; \
+ int i = 0; \
+ uint##WIDTH##_t output[NUM_TESTS]; \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ { \
+ float##WIDTH##_t f1 = fabs##F (input_##SUFFIX##1[i]); \
+ float##WIDTH##_t f2 = fabs##F (input_##SUFFIX##2[i]); \
+ /* Inhibit optimization of our linear test loop. */ \
+ asm volatile ("" : : : "memory"); \
+ output[i] = f1 CMP f2 ? -1 : 0; \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i += LANES) \
+ { \
+ float##WIDTH##x##LANES##_t in1 = \
+ vld1##Q##_f##WIDTH (input_##SUFFIX##1 + i); \
+ float##WIDTH##x##LANES##_t in2 = \
+ vld1##Q##_f##WIDTH (input_##SUFFIX##2 + i); \
+ uint##WIDTH##x##LANES##_t expected_out = \
+ vld1##Q##_u##WIDTH (output + i); \
+ uint##WIDTH##x##LANES##_t out = \
+ veor##Q##_u##WIDTH (vca##T##Q##_f##WIDTH (in1, in2), \
+ expected_out); \
+ vst1##Q##_u##WIDTH (output + i, out); \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ ret |= output[i]; \
+ \
+ return ret; \
+}
+
+#define BUILD_VARIANTS(T, CMP) \
+TEST (T, CMP, s, 32, 2, , f) \
+TEST (T, CMP, s, 32, 4, q, f) \
+TEST (T, CMP, d, 64, 2, q, )
+
+BUILD_VARIANTS (ge, >=)
+/* { dg-final { scan-assembler "facge\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "facge\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "facge\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+
+BUILD_VARIANTS (gt, >)
+/* { dg-final { scan-assembler "facgt\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "facgt\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "facgt\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+
+/* No need for another scan-assembler as these tests
+ also generate facge, facgt instructions. */
+BUILD_VARIANTS (le, <=)
+BUILD_VARIANTS (lt, <)
+
+#undef TEST
+#define TEST(T, CMP, SUFFIX, WIDTH, LANES, Q, F) \
+if (test_vca##T##_float##WIDTH##x##LANES##_t ()) \
+ abort ();
+
+int
+main (int argc, char **argv)
+{
+BUILD_VARIANTS (ge, >=)
+BUILD_VARIANTS (gt, >)
+BUILD_VARIANTS (le, <=)
+BUILD_VARIANTS (lt, <)
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vcvt.c b/gcc/testsuite/gcc.target/aarch64/vect-vcvt.c
new file mode 100644
index 0000000000..6066d7d25c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vcvt.c
@@ -0,0 +1,132 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps -ffast-math" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+extern double fabs (double);
+
+#define NUM_TESTS 8
+#define DELTA 0.000001
+
+float input_f32[] = {0.1f, -0.1f, 0.4f, 10.3f,
+ 200.0f, -800.0f, -13.0f, -0.5f};
+double input_f64[] = {0.1, -0.1, 0.4, 10.3,
+ 200.0, -800.0, -13.0, -0.5};
+
+#define TEST(SUFFIX, Q, WIDTH, LANES, S, U, D) \
+int \
+test_vcvt##SUFFIX##_##S##WIDTH##_f##WIDTH##x##LANES##_t (void) \
+{ \
+ int ret = 1; \
+ int i = 0; \
+ int nlanes = LANES; \
+ U##int##WIDTH##_t expected_out[NUM_TESTS]; \
+ U##int##WIDTH##_t actual_out[NUM_TESTS]; \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ { \
+ expected_out[i] \
+ = vcvt##SUFFIX##D##_##S##WIDTH##_f##WIDTH (input_f##WIDTH[i]); \
+ /* Don't vectorize this. */ \
+ asm volatile ("" : : : "memory"); \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i+=nlanes) \
+ { \
+ U##int##WIDTH##x##LANES##_t out = \
+ vcvt##SUFFIX##Q##_##S##WIDTH##_f##WIDTH \
+ (vld1##Q##_f##WIDTH (input_f##WIDTH + i)); \
+ vst1##Q##_##S##WIDTH (actual_out + i, out); \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ ret &= fabs (expected_out[i] - actual_out[i]) < DELTA; \
+ \
+ return ret; \
+} \
+
+
+#define BUILD_VARIANTS(SUFFIX) \
+TEST (SUFFIX, , 32, 2, s, ,s) \
+TEST (SUFFIX, q, 32, 4, s, ,s) \
+TEST (SUFFIX, q, 64, 2, s, ,d) \
+TEST (SUFFIX, , 32, 2, u,u,s) \
+TEST (SUFFIX, q, 32, 4, u,u,s) \
+TEST (SUFFIX, q, 64, 2, u,u,d) \
+
+BUILD_VARIANTS ( )
+/* { dg-final { scan-assembler "fcvtzs\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtzs\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtzs\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtzs\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtzs\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcvtzu\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtzu\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtzu\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtzu\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtzu\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (a)
+/* { dg-final { scan-assembler "fcvtas\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtas\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtas\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtas\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtas\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcvtau\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtau\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtau\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtau\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtau\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (m)
+/* { dg-final { scan-assembler "fcvtms\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtms\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtms\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtms\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtms\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcvtmu\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtmu\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtmu\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtmu\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtmu\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (n)
+/* { dg-final { scan-assembler "fcvtns\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtns\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtns\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtns\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtns\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcvtnu\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtnu\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtnu\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtnu\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtnu\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (p)
+/* { dg-final { scan-assembler "fcvtps\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtps\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtps\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtps\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtps\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "fcvtpu\\tw\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtpu\\tx\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "fcvtpu\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fcvtpu\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fcvtpu\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+
+#undef TEST
+#define TEST(SUFFIX, Q, WIDTH, LANES, S, U, D) \
+{ \
+ if (!test_vcvt##SUFFIX##_##S##WIDTH##_f##WIDTH##x##LANES##_t ()) \
+ abort (); \
+}
+
+int
+main (int argc, char **argv)
+{
+ BUILD_VARIANTS ( )
+ BUILD_VARIANTS (a)
+ BUILD_VARIANTS (m)
+ BUILD_VARIANTS (n)
+ BUILD_VARIANTS (p)
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vfmaxv.c b/gcc/testsuite/gcc.target/aarch64/vect-vfmaxv.c
new file mode 100644
index 0000000000..58a57a118a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vfmaxv.c
@@ -0,0 +1,169 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps -ffast-math" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+extern float fabsf (float);
+extern double fabs (double);
+extern int isnan (double);
+extern float fmaxf (float, float);
+extern float fminf (float, float);
+extern double fmax (double, double);
+extern double fmin (double, double);
+
+#define NUM_TESTS 16
+#define DELTA 0.000001
+#define NAN (0.0 / 0.0)
+
+float input_float32[] = {0.1f, -0.1f, 0.4f, 10.3f,
+ 200.0f, -800.0f, -13.0f, -0.5f,
+ NAN, -870.0f, 10.4f, 310.11f,
+ 0.0f, -865.0f, -2213.0f, -1.5f};
+
+double input_float64[] = {0.1, -0.1, 0.4, 10.3,
+ 200.0, -800.0, -13.0, -0.5,
+ NAN, -870.0, 10.4, 310.11,
+ 0.0, -865.0, -2213.0, -1.5};
+
+#define EQUALF(a, b) (fabsf (a - b) < DELTA)
+#define EQUALD(a, b) (fabs (a - b) < DELTA)
+
+/* Floating point 'unordered' variants. */
+
+#undef TEST
+#define TEST(MAXMIN, CMP_OP, SUFFIX, Q, TYPE, LANES, FLOAT) \
+int \
+test_v##MAXMIN##v##SUFFIX##_##TYPE##x##LANES##_t (void) \
+{ \
+ int i, j; \
+ int moves = (NUM_TESTS - LANES) + 1; \
+ TYPE##_t out_l[NUM_TESTS]; \
+ TYPE##_t out_v[NUM_TESTS]; \
+ \
+ /* Calculate linearly. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ out_l[i] = input_##TYPE[i]; \
+ for (j = 0; j < LANES; j++) \
+ { \
+ if (isnan (out_l[i])) \
+ continue; \
+ if (isnan (input_##TYPE[i + j]) \
+ || input_##TYPE[i + j] CMP_OP out_l[i]) \
+ out_l[i] = input_##TYPE[i + j]; \
+ } \
+ } \
+ \
+ /* Calculate using vector reduction intrinsics. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ TYPE##x##LANES##_t t1 = vld1##Q##_##SUFFIX (input_##TYPE + i); \
+ out_v[i] = v##MAXMIN##v##Q##_##SUFFIX (t1); \
+ } \
+ \
+ /* Compare. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ if (!EQUAL##FLOAT (out_v[i], out_l[i]) \
+ && !(isnan (out_v[i]) && isnan (out_l[i]))) \
+ return 0; \
+ } \
+ return 1; \
+}
+
+#define BUILD_VARIANTS(TYPE, STYPE, W32, W64, F) \
+TEST (max, >, STYPE, , TYPE, W32, F) \
+TEST (max, >, STYPE, q, TYPE, W64, F) \
+TEST (min, <, STYPE, , TYPE, W32, F) \
+TEST (min, <, STYPE, q, TYPE, W64, F)
+
+BUILD_VARIANTS (float32, f32, 2, 4, F)
+/* { dg-final { scan-assembler "fmaxp\\ts\[0-9\]+, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fminp\\ts\[0-9\]+, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "fmaxv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "fminv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+TEST (max, >, f64, q, float64, 2, D)
+/* { dg-final { scan-assembler "fmaxp\\td\[0-9\]+, v\[0-9\]+\.2d" } } */
+TEST (min, <, f64, q, float64, 2, D)
+/* { dg-final { scan-assembler "fminp\\td\[0-9\]+, v\[0-9\]+\.2d" } } */
+
+/* Floating point 'nm' variants. */
+
+#undef TEST
+#define TEST(MAXMIN, F, SUFFIX, Q, TYPE, LANES, FLOAT) \
+int \
+test_v##MAXMIN##nmv##SUFFIX##_##TYPE##x##LANES##_t (void) \
+{ \
+ int i, j; \
+ int moves = (NUM_TESTS - LANES) + 1; \
+ TYPE##_t out_l[NUM_TESTS]; \
+ TYPE##_t out_v[NUM_TESTS]; \
+ \
+ /* Calculate linearly. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ out_l[i] = input_##TYPE[i]; \
+ for (j = 0; j < LANES; j++) \
+ out_l[i] = f##MAXMIN##F (input_##TYPE[i + j], out_l[i]); \
+ } \
+ \
+ /* Calculate using vector reduction intrinsics. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ TYPE##x##LANES##_t t1 = vld1##Q##_##SUFFIX (input_##TYPE + i); \
+ out_v[i] = v##MAXMIN##nmv##Q##_##SUFFIX (t1); \
+ } \
+ \
+ /* Compare. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ if (!EQUAL##FLOAT (out_v[i], out_l[i])) \
+ return 0; \
+ } \
+ return 1; \
+}
+
+TEST (max, f, f32, , float32, 2, D)
+/* { dg-final { scan-assembler "fmaxnmp\\ts\[0-9\]+, v\[0-9\]+\.2s" } } */
+TEST (min, f, f32, , float32, 2, D)
+/* { dg-final { scan-assembler "fminnmp\\ts\[0-9\]+, v\[0-9\]+\.2s" } } */
+TEST (max, f, f32, q, float32, 4, D)
+/* { dg-final { scan-assembler "fmaxnmv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+TEST (min, f, f32, q, float32, 4, D)
+/* { dg-final { scan-assembler "fminnmv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+TEST (max, , f64, q, float64, 2, D)
+/* { dg-final { scan-assembler "fmaxnmp\\td\[0-9\]+, v\[0-9\]+\.2d" } } */
+TEST (min, , f64, q, float64, 2, D)
+/* { dg-final { scan-assembler "fminnmp\\td\[0-9\]+, v\[0-9\]+\.2d" } } */
+
+#undef TEST
+#define TEST(MAXMIN, CMP_OP, SUFFIX, Q, TYPE, LANES, FLOAT) \
+{ \
+ if (!test_v##MAXMIN##v##SUFFIX##_##TYPE##x##LANES##_t ()) \
+ abort (); \
+}
+
+int
+main (int argc, char **argv)
+{
+ BUILD_VARIANTS (float32, f32, 2, 4, F)
+ TEST (max, >, f64, q, float64, 2, D)
+ TEST (min, <, f64, q, float64, 2, D)
+
+#undef TEST
+#define TEST(MAXMIN, CMP_OP, SUFFIX, Q, TYPE, LANES, FLOAT) \
+{ \
+ if (!test_v##MAXMIN##nmv##SUFFIX##_##TYPE##x##LANES##_t ()) \
+ abort (); \
+}
+
+ BUILD_VARIANTS (float32, f32, 2, 4, F)
+ TEST (max, >, f64, q, float64, 2, D)
+ TEST (min, <, f64, q, float64, 2, D)
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vmaxv.c b/gcc/testsuite/gcc.target/aarch64/vect-vmaxv.c
new file mode 100644
index 0000000000..212e13300b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vmaxv.c
@@ -0,0 +1,117 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps -ffast-math" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define NUM_TESTS 16
+#define DELTA 0.000001
+
+int8_t input_int8[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+int16_t input_int16[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+int32_t input_int32[] = {1, 56, 2, -9, -90, 23, 54, 76,
+ -4, 34, 110, -110, 6, 4, 75, -34};
+
+uint8_t input_uint8[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+uint16_t input_uint16[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+uint32_t input_uint32[] = {1, 56, 2, 9, 90, 23, 54, 76,
+ 4, 34, 110, 110, 6, 4, 75, 34};
+
+#define EQUAL(a, b) (a == b)
+
+#define TEST(MAXMIN, CMP_OP, SUFFIX, Q, TYPE, LANES) \
+int \
+test_v##MAXMIN##v##SUFFIX##_##TYPE##x##LANES##_t (void) \
+{ \
+ int i, j; \
+ int moves = (NUM_TESTS - LANES) + 1; \
+ TYPE##_t out_l[NUM_TESTS]; \
+ TYPE##_t out_v[NUM_TESTS]; \
+ \
+ /* Calculate linearly. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ out_l[i] = input_##TYPE[i]; \
+ for (j = 0; j < LANES; j++) \
+ out_l[i] = input_##TYPE[i + j] CMP_OP out_l[i] ? \
+ input_##TYPE[i + j] : out_l[i]; \
+ } \
+ \
+ /* Calculate using vector reduction intrinsics. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ TYPE##x##LANES##_t t1 = vld1##Q##_##SUFFIX (input_##TYPE + i); \
+ out_v[i] = v##MAXMIN##v##Q##_##SUFFIX (t1); \
+ } \
+ \
+ /* Compare. */ \
+ for (i = 0; i < moves; i++) \
+ { \
+ if (!EQUAL (out_v[i], out_l[i])) \
+ return 0; \
+ } \
+ return 1; \
+}
+
+#define BUILD_VARIANTS(TYPE, STYPE, W32, W64) \
+TEST (max, >, STYPE, , TYPE, W32) \
+TEST (max, >, STYPE, q, TYPE, W64) \
+TEST (min, <, STYPE, , TYPE, W32) \
+TEST (min, <, STYPE, q, TYPE, W64)
+
+BUILD_VARIANTS (int8, s8, 8, 16)
+/* { dg-final { scan-assembler "smaxv\\tb\[0-9\]+, v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "sminv\\tb\[0-9\]+, v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "smaxv\\tb\[0-9\]+, v\[0-9\]+\.16b" } } */
+/* { dg-final { scan-assembler "sminv\\tb\[0-9\]+, v\[0-9\]+\.16b" } } */
+BUILD_VARIANTS (uint8, u8, 8, 16)
+/* { dg-final { scan-assembler "umaxv\\tb\[0-9\]+, v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "uminv\\tb\[0-9\]+, v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "umaxv\\tb\[0-9\]+, v\[0-9\]+\.16b" } } */
+/* { dg-final { scan-assembler "uminv\\tb\[0-9\]+, v\[0-9\]+\.16b" } } */
+BUILD_VARIANTS (int16, s16, 4, 8)
+/* { dg-final { scan-assembler "smaxv\\th\[0-9\]+, v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "sminv\\th\[0-9\]+, v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "smaxv\\th\[0-9\]+, v\[0-9\]+\.8h" } } */
+/* { dg-final { scan-assembler "sminv\\th\[0-9\]+, v\[0-9\]+\.8h" } } */
+BUILD_VARIANTS (uint16, u16, 4, 8)
+/* { dg-final { scan-assembler "umaxv\\th\[0-9\]+, v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "uminv\\th\[0-9\]+, v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "umaxv\\th\[0-9\]+, v\[0-9\]+\.8h" } } */
+/* { dg-final { scan-assembler "uminv\\th\[0-9\]+, v\[0-9\]+\.8h" } } */
+BUILD_VARIANTS (int32, s32, 2, 4)
+/* { dg-final { scan-assembler "smaxp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "sminp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "smaxv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "sminv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+BUILD_VARIANTS (uint32, u32, 2, 4)
+/* { dg-final { scan-assembler "umaxp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "uminp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "umaxv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "uminv\\ts\[0-9\]+, v\[0-9\]+\.4s" } } */
+
+#undef TEST
+#define TEST(MAXMIN, CMP_OP, SUFFIX, Q, TYPE, LANES) \
+{ \
+ if (!test_v##MAXMIN##v##SUFFIX##_##TYPE##x##LANES##_t ()) \
+ abort (); \
+}
+
+int
+main (int argc, char **argv)
+{
+ BUILD_VARIANTS (int8, s8, 8, 16)
+ BUILD_VARIANTS (uint8, u8, 8, 16)
+ BUILD_VARIANTS (int16, s16, 4, 8)
+ BUILD_VARIANTS (uint16, u16, 4, 8)
+ BUILD_VARIANTS (int32, s32, 2, 4)
+ BUILD_VARIANTS (uint32, u32, 2, 4)
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect-vrnd.c b/gcc/testsuite/gcc.target/aarch64/vect-vrnd.c
new file mode 100644
index 0000000000..aa3fd9b401
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect-vrnd.c
@@ -0,0 +1,117 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+extern float fabsf (float);
+extern double fabs (double);
+
+extern double trunc (double);
+extern double round (double);
+extern double nearbyint (double);
+extern double floor (double);
+extern double ceil (double);
+extern double rint (double);
+
+extern float truncf (float);
+extern float roundf (float);
+extern float nearbyintf (float);
+extern float floorf (float);
+extern float ceilf (float);
+extern float rintf (float);
+
+#define NUM_TESTS 8
+#define DELTA 0.000001
+
+float input_f32[] = {0.1f, -0.1f, 0.4f, 10.3f,
+ 200.0f, -800.0f, -13.0f, -0.5f};
+double input_f64[] = {0.1, -0.1, 0.4, 10.3,
+ 200.0, -800.0, -13.0, -0.5};
+
+#define TEST(SUFFIX, Q, WIDTH, LANES, C_FN, F) \
+int \
+test_vrnd##SUFFIX##_float##WIDTH##x##LANES##_t (void) \
+{ \
+ int ret = 1; \
+ int i = 0; \
+ int nlanes = LANES; \
+ float##WIDTH##_t expected_out[NUM_TESTS]; \
+ float##WIDTH##_t actual_out[NUM_TESTS]; \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ { \
+ expected_out[i] = C_FN##F (input_f##WIDTH[i]); \
+ /* Don't vectorize this. */ \
+ asm volatile ("" : : : "memory"); \
+ } \
+ \
+ /* Prevent the compiler from noticing these two loops do the same \
+ thing and optimizing away the comparison. */ \
+ asm volatile ("" : : : "memory"); \
+ \
+ for (i = 0; i < NUM_TESTS; i+=nlanes) \
+ { \
+ float##WIDTH##x##LANES##_t out = \
+ vrnd##SUFFIX##Q##_f##WIDTH \
+ (vld1##Q##_f##WIDTH (input_f##WIDTH + i)); \
+ vst1##Q##_f##WIDTH (actual_out + i, out); \
+ } \
+ \
+ for (i = 0; i < NUM_TESTS; i++) \
+ ret &= fabs##F (expected_out[i] - actual_out[i]) < DELTA; \
+ \
+ return ret; \
+} \
+
+
+#define BUILD_VARIANTS(SUFFIX, C_FN) \
+TEST (SUFFIX, , 32, 2, C_FN, f) \
+TEST (SUFFIX, q, 32, 4, C_FN, f) \
+TEST (SUFFIX, q, 64, 2, C_FN, ) \
+
+BUILD_VARIANTS ( , trunc)
+/* { dg-final { scan-assembler "frintz\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frintz\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frintz\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (a, round)
+/* { dg-final { scan-assembler "frinta\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frinta\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frinta\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (i, nearbyint)
+/* { dg-final { scan-assembler "frinti\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frinti\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frinti\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (m, floor)
+/* { dg-final { scan-assembler "frintm\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frintm\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frintm\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (p, ceil)
+/* { dg-final { scan-assembler "frintp\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frintp\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frintp\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+BUILD_VARIANTS (x, rint)
+/* { dg-final { scan-assembler "frintx\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "frintx\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "frintx\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" } } */
+
+#undef TEST
+#define TEST(SUFFIX, Q, WIDTH, LANES, C_FN, F) \
+{ \
+ if (!test_vrnd##SUFFIX##_float##WIDTH##x##LANES##_t ()) \
+ abort (); \
+}
+
+int
+main (int argc, char **argv)
+{
+ BUILD_VARIANTS ( , trunc)
+ BUILD_VARIANTS (a, round)
+ BUILD_VARIANTS (i, nearbyint)
+ BUILD_VARIANTS (m, floor)
+ BUILD_VARIANTS (p, ceil)
+ BUILD_VARIANTS (x, rint)
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vect.c b/gcc/testsuite/gcc.target/aarch64/vect.c
new file mode 100644
index 0000000000..ff70cae43b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect.c
@@ -0,0 +1,97 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+#include "vect.x"
+
+extern void abort (void);
+
+void set_vector (int *a, int n)
+{
+ int i;
+ for (i=0; i<16; i++)
+ a[i] = n;
+}
+
+void check_vector (pRINT c, pRINT result, char *str)
+{
+ int i;
+ for (i=0; i<16 ; i++)
+ if (c[i] != result[i])
+ abort ();
+}
+
+#define TEST(func, sign) set_vector (sign##c, 0); \
+ func (sign##a, sign##b, sign##c); \
+ check_vector (sign##c, func##_vector, #func);
+
+
+#define TESTV(func, sign) \
+ if (func (sign##a) != func##_value) \
+ abort ();
+
+#define TESTVLL(func, sign) \
+ if (func (ll##sign##a) != func##_value) \
+ abort ();
+
+int main (void)
+{
+ int sa[16];
+ int sb[16];
+ int sc[16];
+ unsigned int ua[16];
+ unsigned int ub[16];
+ unsigned int uc[16];
+ long long llsa[16];
+ unsigned long long llua[16];
+ int i;
+
+ /* Table of standard values to compare against. */
+ unsigned int test_bic_vector[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ unsigned int test_orn_vector[] = {-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1};
+ int mla_vector[] = {0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225};
+ int mls_vector[] = {0, -1, -4, -9, -16, -25, -36, -49, -64, -81, -100, -121, -144, -169, -196, -225};
+ int smax_vector[] = {0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15};
+ int smin_vector[] = {0, -1, -2, -3, -4, -5, -6, -7, -8, -9, -10, -11, -12, -13, -14, -15};
+ unsigned int umax_vector[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+ unsigned int umin_vector[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
+ int sabd_vector[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ int saba_vector[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ int reduce_smax_value = 0;
+ int reduce_smin_value = -15;
+ unsigned int reduce_umax_value = 15;
+ unsigned int reduce_umin_value = 0;
+ unsigned int reduce_add_u32_value = 120;
+ int reduce_add_s32_value = -120;
+ long long reduce_add_s64_value = -120;
+ unsigned long long reduce_add_u64_value = 120;
+
+ /* Set up input vectors. */
+ for (i=0; i < 16; i++)
+ {
+ sa[i] = sb[i] = -i;
+ llsa[i] = (long long)-i;
+ ua[i] = ub[i] = i;
+ llua[i] = (unsigned long long)i;
+ }
+
+ TEST (test_bic, s);
+ TEST (test_orn, s);
+ TEST (mla, s);
+ TEST (mls, s);
+ TEST (smax, s);
+ TEST (smin, s);
+ TEST (umax, u);
+ TEST (umin, u);
+ TEST (sabd, s);
+ TEST (saba, s);
+ TESTV (reduce_smax, s);
+ TESTV (reduce_smin, s);
+ TESTV (reduce_umax, u);
+ TESTV (reduce_umin, u);
+ TESTV (reduce_add_u32, u);
+ TESTV (reduce_add_s32, s);
+ TESTVLL (reduce_add_u64, u);
+ TESTVLL (reduce_add_s64, s);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect.x b/gcc/testsuite/gcc.target/aarch64/vect.x
new file mode 100644
index 0000000000..c0f79b50b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect.x
@@ -0,0 +1,154 @@
+typedef int *__restrict__ pRINT;
+typedef unsigned int *__restrict__ pRUINT;
+typedef long long *__restrict__ pRINT64;
+typedef unsigned long long *__restrict__ pRUINT64;
+
+void test_orn (pRUINT a, pRUINT b, pRUINT c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ c[i] = a[i] | (~b[i]);
+}
+
+void test_bic (pRUINT a, pRUINT b, pRUINT c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ c[i] = a[i] & (~b[i]);
+}
+
+void mla (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] += a[i] * b[i];
+}
+
+void mls (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] -= a[i] * b[i];
+}
+
+void smax (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] > b[i] ? a[i] : b[i]);
+}
+
+void smin (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] < b[i] ? a[i] : b[i]);
+}
+
+void umax (pRUINT a, pRUINT b, pRUINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] > b[i] ? a[i] : b[i]);
+}
+
+void umin (pRUINT a, pRUINT b, pRUINT c)
+{
+ int i;
+ for (i=0;i<16;i++)
+ c[i] = (a[i] < b[i] ? a[i] : b[i]);
+}
+
+unsigned int reduce_umax (pRUINT a)
+{
+ int i;
+ unsigned int s = a[0];
+ for (i = 1; i < 16; i++)
+ s = (s > a[i] ? s : a[i]);
+
+ return s;
+}
+
+unsigned int reduce_umin (pRUINT a)
+{
+ int i;
+ unsigned int s = a[0];
+ for (i = 1; i < 16; i++)
+ s = (s < a[i] ? s : a[i]);
+
+ return s;
+}
+
+int reduce_smax (pRINT a)
+{
+ int i;
+ int s = a[0];
+ for (i = 1; i < 16; i++)
+ s = (s > a[i] ? s : a[i]);
+
+ return s;
+}
+
+int reduce_smin (pRINT a)
+{
+ int i;
+ int s = a[0];
+ for (i = 1; i < 16; i++)
+ s = (s < a[i] ? s : a[i]);
+
+ return s;
+}
+
+unsigned int reduce_add_u32 (pRINT a)
+{
+ int i;
+ unsigned int s = 0;
+ for (i = 0; i < 16; i++)
+ s += a[i];
+
+ return s;
+}
+
+int reduce_add_s32 (pRINT a)
+{
+ int i;
+ int s = 0;
+ for (i = 0; i < 16; i++)
+ s += a[i];
+
+ return s;
+}
+
+unsigned long long reduce_add_u64 (pRUINT64 a)
+{
+ int i;
+ unsigned long long s = 0;
+ for (i = 0; i < 16; i++)
+ s += a[i];
+
+ return s;
+}
+
+long long reduce_add_s64 (pRINT64 a)
+{
+ int i;
+ long long s = 0;
+ for (i = 0; i < 16; i++)
+ s += a[i];
+
+ return s;
+}
+
+void sabd (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ c[i] = abs (a[i] - b[i]);
+}
+
+void saba (pRINT a, pRINT b, pRINT c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ c[i] += abs (a[i] - b[i]);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vect_saddl_1.c b/gcc/testsuite/gcc.target/aarch64/vect_saddl_1.c
new file mode 100644
index 0000000000..ecbd8a8af6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect_saddl_1.c
@@ -0,0 +1,315 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-inline -save-temps -fno-vect-cost-model" } */
+
+typedef signed char S8_t;
+typedef signed short S16_t;
+typedef signed int S32_t;
+typedef signed long long S64_t;
+
+typedef signed char *__restrict__ pS8_t;
+typedef signed short *__restrict__ pS16_t;
+typedef signed int *__restrict__ pS32_t;
+typedef signed long long *__restrict__ pS64_t;
+
+typedef unsigned char U8_t;
+typedef unsigned short U16_t;
+typedef unsigned int U32_t;
+typedef unsigned long long U64_t;
+
+typedef unsigned char *__restrict__ pU8_t;
+typedef unsigned short *__restrict__ pU16_t;
+typedef unsigned int *__restrict__ pU32_t;
+typedef unsigned long long *__restrict__ pU64_t;
+
+extern void abort ();
+
+void
+test_addl_S64_S32_4 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (S64_t) b[i] + (S64_t) c[i];
+}
+/* "saddl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" */
+/* "saddl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" */
+
+/* a = -b + c => a = c - b */
+void
+test_addl_S64_S32_4_neg0 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = -(S64_t) b[i] + (S64_t) c[i];
+}
+/* "ssubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" */
+/* "ssubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" */
+
+/* a = b + -c => a = b - c */
+void
+test_addl_S64_S32_4_neg1 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (S64_t) b[i] + -(S64_t) c[i];
+}
+/* "ssubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" */
+/* "ssubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" */
+
+void
+test_addl_S32_S16_8 (pS32_t a, pS16_t b, pS16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] = (S32_t) b[i] + (S32_t) c[i];
+}
+/* { dg-final { scan-assembler "saddl\tv\[0-9\]+\.4s,\ v\[0-9\]+\.4h,\ v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "saddl2\tv\[0-9\]+\.4s,\ v\[0-9\]+\.8h,\ v\[0-9\]+\.8h" } } */
+
+void
+test_addl_S16_S8_16 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = (S16_t) b[i] + (S16_t) c[i];
+}
+/* { dg-final { scan-assembler "saddl\tv\[0-9\]+\.8h,\ v\[0-9\]+\.8b,\ v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "saddl2\tv\[0-9\]+\.8h,\ v\[0-9\]+\.16b,\ v\[0-9\]+\.16b" } } */
+
+void
+test_addl_U64_U32_4 (pU64_t a, pU32_t b, pU32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (U64_t) b[i] + (U64_t) c[i];
+}
+/* { dg-final { scan-assembler "uaddl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "uaddl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" } } */
+
+void
+test_addl_U32_U16_8 (pU32_t a, pU16_t b, pU16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] = (U32_t) b[i] + (U32_t) c[i];
+}
+/* { dg-final { scan-assembler "uaddl\tv\[0-9\]+\.4s,\ v\[0-9\]+\.4h,\ v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "uaddl2\tv\[0-9\]+\.4s,\ v\[0-9\]+\.8h,\ v\[0-9\]+\.8h" } } */
+
+void
+test_addl_U16_U8_16 (pU16_t a, pU8_t b, pU8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = (U16_t) b[i] + (U16_t) c[i];
+}
+/* { dg-final { scan-assembler "uaddl\tv\[0-9\]+\.8h,\ v\[0-9\]+\.8b,\ v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "uaddl2\tv\[0-9\]+\.8h,\ v\[0-9\]+\.16b,\ v\[0-9\]+\.16b" } } */
+
+void
+test_subl_S64_S32_4 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (S64_t) b[i] - (S64_t) c[i];
+}
+/* "ssubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" */
+/* "ssubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" */
+
+/* a = b - -c => a = b + c */
+void
+test_subl_S64_S32_4_neg0 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (S64_t) b[i] - -(S64_t) c[i];
+}
+/* { dg-final { scan-assembler-times "saddl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" 2 } } */
+/* { dg-final { scan-assembler-times "saddl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" 2 } } */
+
+/* a = -b - -c => a = c - b */
+void
+test_subl_S64_S32_4_neg1 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = -(S64_t) b[i] - -(S64_t) c[i];
+}
+/* "ssubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" */
+/* "ssubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" */
+
+/* a = -(b - c) => a = c - b */
+void
+test_subl_S64_S32_4_neg2 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = -((S64_t) b[i] - (S64_t) c[i]);
+}
+/* { dg-final { scan-assembler-times "ssubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" 5 } } */
+/* { dg-final { scan-assembler-times "ssubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" 5 } } */
+
+void
+test_subl_S32_S16_8 (pS32_t a, pS16_t b, pS16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] = (S32_t) b[i] - (S32_t) c[i];
+}
+/* { dg-final { scan-assembler "ssubl\tv\[0-9\]+\.4s,\ v\[0-9\]+\.4h,\ v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "ssubl2\tv\[0-9\]+\.4s,\ v\[0-9\]+\.8h,\ v\[0-9\]+\.8h" } } */
+
+void
+test_subl_S16_S8_16 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = (S16_t) b[i] - (S16_t) c[i];
+}
+/* { dg-final { scan-assembler "ssubl\tv\[0-9\]+\.8h,\ v\[0-9\]+\.8b,\ v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "ssubl2\tv\[0-9\]+\.8h,\ v\[0-9\]+\.16b,\ v\[0-9\]+\.16b" } } */
+
+void
+test_subl_U64_U32_4 (pU64_t a, pU32_t b, pU32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] = (U64_t) b[i] - (U64_t) c[i];
+}
+/* { dg-final { scan-assembler "usubl\tv\[0-9\]+\.2d,\ v\[0-9\]+\.2s,\ v\[0-9\]+\.2s" } } */
+/* { dg-final { scan-assembler "usubl2\tv\[0-9\]+\.2d,\ v\[0-9\]+\.4s,\ v\[0-9\]+\.4s" } } */
+
+void
+test_subl_U32_U16_8 (pU32_t a, pU16_t b, pU16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] = (U32_t) b[i] - (U32_t) c[i];
+}
+/* { dg-final { scan-assembler "usubl\tv\[0-9\]+\.4s,\ v\[0-9\]+\.4h,\ v\[0-9\]+\.4h" } } */
+/* { dg-final { scan-assembler "usubl2\tv\[0-9\]+\.4s,\ v\[0-9\]+\.8h,\ v\[0-9\]+\.8h" } } */
+
+void
+test_subl_U16_U8_16 (pU16_t a, pU8_t b, pU8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = (U16_t) b[i] - (U16_t) c[i];
+}
+/* { dg-final { scan-assembler "usubl\tv\[0-9\]+\.8h,\ v\[0-9\]+\.8b,\ v\[0-9\]+\.8b" } } */
+/* { dg-final { scan-assembler "usubl2\tv\[0-9\]+\.8h,\ v\[0-9\]+\.16b,\ v\[0-9\]+\.16b" } } */
+
+/* input values */
+
+S64_t S64_ta[4];
+S32_t S32_tb[4] = { 0, 1, 2, 3 };
+S32_t S32_tc[4] = { 2, 2, -2, -2 };
+
+S32_t S32_ta[8];
+S16_t S16_tb[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+S16_t S16_tc[8] = { 2, 2, -2, -2, 2, 2, -2, -2 };
+
+S16_t S16_ta[16];
+S8_t S8_tb[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+S8_t S8_tc[16] = { 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2 };
+
+/* expected output */
+
+S64_t addl_rS64[] = { 2, 3, 0, 1 };
+S64_t neg_r[] = { 2, 1, -4, -5 };
+S32_t addl_rS32[] = { 2, 3, 0, 1, 6, 7, 4, 5 };
+S16_t addl_rS16[] = { 2, 3, 0, 1, 6, 7, 4, 5, 10, 11, 8, 9, 14, 15, 12, 13 };
+S64_t subl_rS64[] = { -2, -1, 4, 5 };
+S32_t subl_rS32[] = { -2, -1, 4, 5, 2, 3, 8, 9 };
+S16_t subl_rS16[] =
+ { -2, -1, 4, 5, 2, 3, 8, 9, 6, 7, 12, 13, 10, 11, 16, 17 };
+U64_t addl_rU64[] = { 2, 3, 0x100000000, 0x100000001 };
+U32_t addl_rU32[] = { 2, 3, 0x10000, 0x10001, 6, 7, 0x10004, 0x10005 };
+U16_t addl_rU16[] =
+{
+ 0x0002, 0x0003, 0x0100, 0x0101, 0x0006, 0x0007, 0x0104, 0x0105,
+ 0x000a, 0x000b, 0x0108, 0x0109, 0x000e, 0x000f, 0x010c, 0x010d
+};
+U64_t subl_rU64[] =
+{
+ 0xfffffffffffffffe, 0xffffffffffffffff,
+ 0xffffffff00000004, 0xffffffff00000005
+};
+U32_t subl_rU32[] =
+{
+ 0xfffffffe, 0xffffffff, 0xffff0004, 0xffff0005,
+ 0x00000002, 0x00000003, 0xffff0008, 0xffff0009
+};
+U16_t subl_rU16[] =
+{
+ 0xfffe, 0xffff, 0xff04, 0xff05, 0x0002, 0x0003, 0xff08, 0xff09,
+ 0x0006, 0x0007, 0xff0c, 0xff0d, 0x000a, 0x000b, 0xff10, 0xff11
+};
+
+#define CHECK(T,N,AS,US) \
+do \
+ { \
+ for (i = 0; i < N; i++) \
+ if ((US##T##_t)S##T##_ta[i] != AS##_##r##US##T[i]) \
+ abort(); \
+ } \
+while (0)
+
+#define NCHECK(RES) \
+do \
+ { \
+ for (i = 0; i < 4; i++) \
+ if (S64_ta[i] != RES[i]) \
+ abort (); \
+ } \
+while (0)
+
+#define SCHECK(T,N,AS) CHECK(T,N,AS,S)
+#define UCHECK(T,N,AS) CHECK(T,N,AS,U)
+
+int
+main ()
+{
+ int i;
+
+ test_addl_S64_S32_4 (S64_ta, S32_tb, S32_tc);
+ SCHECK (64, 4, addl);
+ test_addl_S32_S16_8 (S32_ta, S16_tb, S16_tc);
+ SCHECK (32, 8, addl);
+ test_addl_S16_S8_16 (S16_ta, S8_tb, S8_tc);
+ SCHECK (16, 16, addl);
+ test_subl_S64_S32_4 (S64_ta, S32_tb, S32_tc);
+ SCHECK (64, 4, subl);
+ test_subl_S32_S16_8 (S32_ta, S16_tb, S16_tc);
+ SCHECK (32, 8, subl);
+ test_subl_S16_S8_16 (S16_ta, S8_tb, S8_tc);
+ SCHECK (16, 16, subl);
+
+ test_addl_U64_U32_4 (S64_ta, S32_tb, S32_tc);
+ UCHECK (64, 4, addl);
+ test_addl_U32_U16_8 (S32_ta, S16_tb, S16_tc);
+ UCHECK (32, 8, addl);
+ test_addl_U16_U8_16 (S16_ta, S8_tb, S8_tc);
+ UCHECK (16, 16, addl);
+ test_subl_U64_U32_4 (S64_ta, S32_tb, S32_tc);
+ UCHECK (64, 4, subl);
+ test_subl_U32_U16_8 (S32_ta, S16_tb, S16_tc);
+ UCHECK (32, 8, subl);
+ test_subl_U16_U8_16 (S16_ta, S8_tb, S8_tc);
+ UCHECK (16, 16, subl);
+
+ test_addl_S64_S32_4_neg0 (S64_ta, S32_tb, S32_tc);
+ NCHECK (neg_r);
+ test_addl_S64_S32_4_neg1 (S64_ta, S32_tb, S32_tc);
+ NCHECK (subl_rS64);
+ test_subl_S64_S32_4_neg0 (S64_ta, S32_tb, S32_tc);
+ NCHECK (addl_rS64);
+ test_subl_S64_S32_4_neg1 (S64_ta, S32_tb, S32_tc);
+ NCHECK (neg_r);
+ test_subl_S64_S32_4_neg2 (S64_ta, S32_tb, S32_tc);
+ NCHECK (neg_r);
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
+
diff --git a/gcc/testsuite/gcc.target/aarch64/vect_smlal_1.c b/gcc/testsuite/gcc.target/aarch64/vect_smlal_1.c
new file mode 100644
index 0000000000..b70be4ccb0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vect_smlal_1.c
@@ -0,0 +1,325 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -fno-inline -save-temps -fno-vect-cost-model" } */
+
+typedef signed char S8_t;
+typedef signed short S16_t;
+typedef signed int S32_t;
+typedef signed long long S64_t;
+typedef signed char *__restrict__ pS8_t;
+typedef signed short *__restrict__ pS16_t;
+typedef signed int *__restrict__ pS32_t;
+typedef signed long long *__restrict__ pS64_t;
+typedef unsigned char U8_t;
+typedef unsigned short U16_t;
+typedef unsigned int U32_t;
+typedef unsigned long long U64_t;
+typedef unsigned char *__restrict__ pU8_t;
+typedef unsigned short *__restrict__ pU16_t;
+typedef unsigned int *__restrict__ pU32_t;
+typedef unsigned long long *__restrict__ pU64_t;
+
+extern void abort ();
+
+void
+test_addS64_tS32_t4 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] += (S64_t) b[i] * (S64_t) c[i];
+}
+
+/* { dg-final { scan-assembler "smlal\tv\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "smlal2\tv\[0-9\]+\.2d" } } */
+
+void
+test_addS32_tS16_t8 (pS32_t a, pS16_t b, pS16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] += (S32_t) b[i] * (S32_t) c[i];
+}
+
+/* { dg-final { scan-assembler "smlal\tv\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "smlal2\tv\[0-9\]+\.4s" } } */
+
+void
+test_addS16_tS8_t16 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += (S16_t) b[i] * (S16_t) c[i];
+}
+
+void
+test_addS16_tS8_t16_neg0 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += (S16_t) -b[i] * (S16_t) -c[i];
+}
+
+void
+test_addS16_tS8_t16_neg1 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] -= (S16_t) b[i] * (S16_t) -c[i];
+}
+
+void
+test_addS16_tS8_t16_neg2 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] -= (S16_t) -b[i] * (S16_t) c[i];
+}
+
+/* { dg-final { scan-assembler-times "smlal\tv\[0-9\]+\.8h" 4 } } */
+/* { dg-final { scan-assembler-times "smlal2\tv\[0-9\]+\.8h" 4 } } */
+
+void
+test_subS64_tS32_t4 (pS64_t a, pS32_t b, pS32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] -= (S64_t) b[i] * (S64_t) c[i];
+}
+
+/* { dg-final { scan-assembler "smlsl\tv\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "smlsl2\tv\[0-9\]+\.2d" } } */
+
+void
+test_subS32_tS16_t8 (pS32_t a, pS16_t b, pS16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] -= (S32_t) b[i] * (S32_t) c[i];
+}
+
+/* { dg-final { scan-assembler "smlsl\tv\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "smlsl2\tv\[0-9\]+\.4s" } } */
+
+void
+test_subS16_tS8_t16 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] -= (S16_t) b[i] * (S16_t) c[i];
+}
+
+void
+test_subS16_tS8_t16_neg0 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += (S16_t) -b[i] * (S16_t) c[i];
+}
+
+void
+test_subS16_tS8_t16_neg1 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += (S16_t) b[i] * (S16_t) -c[i];
+}
+
+void
+test_subS16_tS8_t16_neg2 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += -((S16_t) b[i] * (S16_t) c[i]);
+}
+
+void
+test_subS16_tS8_t16_neg3 (pS16_t a, pS8_t b, pS8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] -= (S16_t) -b[i] * (S16_t) -c[i];
+}
+
+/* { dg-final { scan-assembler-times "smlsl\tv\[0-9\]+\.8h" 5 } } */
+/* { dg-final { scan-assembler-times "smlsl2\tv\[0-9\]+\.8h" 5 } } */
+
+void
+test_addU64_tU32_t4 (pU64_t a, pU32_t b, pU32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] += (U64_t) b[i] * (U64_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlal\tv\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "umlal2\tv\[0-9\]+\.2d" } } */
+
+void
+test_addU32_tU16_t8 (pU32_t a, pU16_t b, pU16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] += (U32_t) b[i] * (U32_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlal\tv\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "umlal2\tv\[0-9\]+\.4s" } } */
+
+void
+test_addU16_tU8_t16 (pU16_t a, pU8_t b, pU8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] += (U16_t) b[i] * (U16_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlal\tv\[0-9\]+\.8h" } } */
+/* { dg-final { scan-assembler "umlal2\tv\[0-9\]+\.8h" } } */
+
+void
+test_subU64_tU32_t4 (pU64_t a, pU32_t b, pU32_t c)
+{
+ int i;
+ for (i = 0; i < 4; i++)
+ a[i] -= (U64_t) b[i] * (U64_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlsl\tv\[0-9\]+\.2d" } } */
+/* { dg-final { scan-assembler "umlsl2\tv\[0-9\]+\.2d" } } */
+
+void
+test_subU32_tU16_t8 (pU32_t a, pU16_t b, pU16_t c)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ a[i] -= (U32_t) b[i] * (U32_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlsl\tv\[0-9\]+\.4s" } } */
+/* { dg-final { scan-assembler "umlsl2\tv\[0-9\]+\.4s" } } */
+
+void
+test_subU16_tU8_t16 (pU16_t a, pU8_t b, pU8_t c)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] -= (U16_t) b[i] * (U16_t) c[i];
+}
+
+/* { dg-final { scan-assembler "umlsl\tv\[0-9\]+\.8h" } } */
+/* { dg-final { scan-assembler "umlsl2\tv\[0-9\]+\.8h" } } */
+
+
+S64_t add_rS64[4] = { 6, 7, -4, -3 };
+S32_t add_rS32[8] = { 6, 7, -4, -3, 10, 11, 0, 1 };
+S16_t add_rS16[16] =
+ { 6, 7, -4, -3, 10, 11, 0, 1, 14, 15, 4, 5, 18, 19, 8, 9 };
+
+S64_t sub_rS64[4] = { 0, 1, 2, 3 };
+S32_t sub_rS32[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+S16_t sub_rS16[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+
+U64_t add_rU64[4] = { 0x6, 0x7, 0x2fffffffc, 0x2fffffffd };
+
+U32_t add_rU32[8] =
+{
+ 0x6, 0x7, 0x2fffc, 0x2fffd,
+ 0xa, 0xb, 0x30000, 0x30001
+};
+
+U16_t add_rU16[16] =
+{
+ 0x6, 0x7, 0x2fc, 0x2fd, 0xa, 0xb, 0x300, 0x301,
+ 0xe, 0xf, 0x304, 0x305, 0x12, 0x13, 0x308, 0x309
+};
+
+U64_t sub_rU64[4] = { 0, 1, 2, 3 };
+U32_t sub_rU32[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+U16_t sub_rU16[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+
+S8_t neg_r[16] = { -6, -5, 8, 9, -2, -1, 12, 13, 2, 3, 16, 17, 6, 7, 20, 21 };
+
+S64_t S64_ta[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+S32_t S32_tb[16] = { 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2 };
+S32_t S32_tc[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
+
+S32_t S32_ta[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+S16_t S16_tb[16] = { 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2 };
+S16_t S16_tc[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
+
+S16_t S16_ta[16] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 };
+S8_t S8_tb[16] = { 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2, 2, 2, -2, -2 };
+S8_t S8_tc[16] = { 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
+
+
+#define CHECK(T,N,AS,US) \
+do \
+ { \
+ for (i = 0; i < N; i++) \
+ if (S##T##_ta[i] != AS##_r##US##T[i]) \
+ abort (); \
+ } \
+while (0)
+
+#define SCHECK(T,N,AS) CHECK(T,N,AS,S)
+#define UCHECK(T,N,AS) CHECK(T,N,AS,U)
+
+#define NCHECK(RES) \
+do \
+ { \
+ for (i = 0; i < 16; i++) \
+ if (S16_ta[i] != RES[i]) \
+ abort (); \
+ } \
+while (0)
+
+
+int
+main ()
+{
+ int i;
+
+ test_addS64_tS32_t4 (S64_ta, S32_tb, S32_tc);
+ SCHECK (64, 4, add);
+ test_addS32_tS16_t8 (S32_ta, S16_tb, S16_tc);
+ SCHECK (32, 8, add);
+ test_addS16_tS8_t16 (S16_ta, S8_tb, S8_tc);
+ SCHECK (16, 16, add);
+ test_subS64_tS32_t4 (S64_ta, S32_tb, S32_tc);
+ SCHECK (64, 4, sub);
+ test_subS32_tS16_t8 (S32_ta, S16_tb, S16_tc);
+ SCHECK (32, 8, sub);
+ test_subS16_tS8_t16 (S16_ta, S8_tb, S8_tc);
+ SCHECK (16, 16, sub);
+
+ test_addU64_tU32_t4 (S64_ta, S32_tb, S32_tc);
+ UCHECK (64, 4, add);
+ test_addU32_tU16_t8 (S32_ta, S16_tb, S16_tc);
+ UCHECK (32, 8, add);
+ test_addU16_tU8_t16 (S16_ta, S8_tb, S8_tc);
+ UCHECK (16, 16, add);
+ test_subU64_tU32_t4 (S64_ta, S32_tb, S32_tc);
+ UCHECK (64, 4, sub);
+ test_subU32_tU16_t8 (S32_ta, S16_tb, S16_tc);
+ UCHECK (32, 8, sub);
+ test_subU16_tU8_t16 (S16_ta, S8_tb, S8_tc);
+ UCHECK (16, 16, sub);
+
+ test_addS16_tS8_t16_neg0 (S16_ta, S8_tb, S8_tc);
+ NCHECK (add_rS16);
+ test_subS16_tS8_t16_neg0 (S16_ta, S8_tb, S8_tc);
+ NCHECK (sub_rS16);
+ test_addS16_tS8_t16_neg1 (S16_ta, S8_tb, S8_tc);
+ NCHECK (add_rS16);
+ test_subS16_tS8_t16_neg1 (S16_ta, S8_tb, S8_tc);
+ NCHECK (sub_rS16);
+ test_addS16_tS8_t16_neg2 (S16_ta, S8_tb, S8_tc);
+ NCHECK (add_rS16);
+ test_subS16_tS8_t16_neg2 (S16_ta, S8_tb, S8_tc);
+ NCHECK (sub_rS16);
+ test_subS16_tS8_t16_neg3 (S16_ta, S8_tb, S8_tc);
+ NCHECK (neg_r);
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vector_intrinsics.c b/gcc/testsuite/gcc.target/aarch64/vector_intrinsics.c
new file mode 100644
index 0000000000..52b0496c8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vector_intrinsics.c
@@ -0,0 +1,803 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include "arm_neon.h"
+
+
+/* { dg-final { scan-assembler-times "\\tfmax\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+float32x2_t
+test_vmax_f32 (float32x2_t __a, float32x2_t __b)
+{
+ return vmax_f32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.8b, v\[0-9\].8b, v\[0-9\].8b" 1 } } */
+
+int8x8_t
+test_vmax_s8 (int8x8_t __a, int8x8_t __b)
+{
+ return vmax_s8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.8b, v\[0-9\].8b, v\[0-9\].8b" 1 } } */
+
+uint8x8_t
+test_vmax_u8 (uint8x8_t __a, uint8x8_t __b)
+{
+ return vmax_u8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.4h, v\[0-9\].4h, v\[0-9\].4h" 1 } } */
+
+int16x4_t
+test_vmax_s16 (int16x4_t __a, int16x4_t __b)
+{
+ return vmax_s16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.4h, v\[0-9\].4h, v\[0-9\].4h" 1 } } */
+
+uint16x4_t
+test_vmax_u16 (uint16x4_t __a, uint16x4_t __b)
+{
+ return vmax_u16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+int32x2_t
+test_vmax_s32 (int32x2_t __a, int32x2_t __b)
+{
+ return vmax_s32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+uint32x2_t
+test_vmax_u32 (uint32x2_t __a, uint32x2_t __b)
+{
+ return vmax_u32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tfmax\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+float32x4_t
+test_vmaxq_f32 (float32x4_t __a, float32x4_t __b)
+{
+ return vmaxq_f32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tfmax\\tv\[0-9\]+\.2d, v\[0-9\].2d, v\[0-9\].2d" 1 } } */
+
+float64x2_t
+test_vmaxq_f64 (float64x2_t __a, float64x2_t __b)
+{
+ return vmaxq_f64(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.16b, v\[0-9\].16b, v\[0-9\].16b" 1 } } */
+
+int8x16_t
+test_vmaxq_s8 (int8x16_t __a, int8x16_t __b)
+{
+ return vmaxq_s8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.16b, v\[0-9\].16b, v\[0-9\].16b" 1 } } */
+
+uint8x16_t
+test_vmaxq_u8 (uint8x16_t __a, uint8x16_t __b)
+{
+ return vmaxq_u8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.8h, v\[0-9\].8h, v\[0-9\].8h" 1 } } */
+
+int16x8_t
+test_vmaxq_s16 (int16x8_t __a, int16x8_t __b)
+{
+ return vmaxq_s16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.8h, v\[0-9\].8h, v\[0-9\].8h" 1 } } */
+
+uint16x8_t
+test_vmaxq_u16 (uint16x8_t __a, uint16x8_t __b)
+{
+ return vmaxq_u16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmax\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+int32x4_t
+test_vmaxq_s32 (int32x4_t __a, int32x4_t __b)
+{
+ return vmaxq_s32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumax\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+uint32x4_t
+test_vmaxq_u32 (uint32x4_t __a, uint32x4_t __b)
+{
+ return vmaxq_u32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tfmin\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+float32x2_t
+test_vmin_f32 (float32x2_t __a, float32x2_t __b)
+{
+ return vmin_f32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.8b, v\[0-9\].8b, v\[0-9\].8b" 1 } } */
+
+int8x8_t
+test_vmin_s8 (int8x8_t __a, int8x8_t __b)
+{
+ return vmin_s8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.8b, v\[0-9\].8b, v\[0-9\].8b" 1 } } */
+
+uint8x8_t
+test_vmin_u8 (uint8x8_t __a, uint8x8_t __b)
+{
+ return vmin_u8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.4h, v\[0-9\].4h, v\[0-9\].4h" 1 } } */
+
+int16x4_t
+test_vmin_s16 (int16x4_t __a, int16x4_t __b)
+{
+ return vmin_s16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.4h, v\[0-9\].4h, v\[0-9\].4h" 1 } } */
+
+uint16x4_t
+test_vmin_u16 (uint16x4_t __a, uint16x4_t __b)
+{
+ return vmin_u16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+int32x2_t
+test_vmin_s32 (int32x2_t __a, int32x2_t __b)
+{
+ return vmin_s32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 1 } } */
+
+uint32x2_t
+test_vmin_u32 (uint32x2_t __a, uint32x2_t __b)
+{
+ return vmin_u32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tfmin\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+float32x4_t
+test_vminq_f32 (float32x4_t __a, float32x4_t __b)
+{
+ return vminq_f32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tfmin\\tv\[0-9\]+\.2d, v\[0-9\].2d, v\[0-9\].2d" 1 } } */
+
+float64x2_t
+test_vminq_f64 (float64x2_t __a, float64x2_t __b)
+{
+ return vminq_f64(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.16b, v\[0-9\].16b, v\[0-9\].16b" 1 } } */
+
+int8x16_t
+test_vminq_s8 (int8x16_t __a, int8x16_t __b)
+{
+ return vminq_s8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.16b, v\[0-9\].16b, v\[0-9\].16b" 1 } } */
+
+uint8x16_t
+test_vminq_u8 (uint8x16_t __a, uint8x16_t __b)
+{
+ return vminq_u8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.8h, v\[0-9\].8h, v\[0-9\].8h" 1 } } */
+
+int16x8_t
+test_vminq_s16 (int16x8_t __a, int16x8_t __b)
+{
+ return vminq_s16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.8h, v\[0-9\].8h, v\[0-9\].8h" 1 } } */
+
+uint16x8_t
+test_vminq_u16 (uint16x8_t __a, uint16x8_t __b)
+{
+ return vminq_u16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsmin\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+int32x4_t
+test_vminq_s32 (int32x4_t __a, int32x4_t __b)
+{
+ return vminq_s32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tumin\\tv\[0-9\]+\.4s, v\[0-9\].4s, v\[0-9\].4s" 1 } } */
+
+uint32x4_t
+test_vminq_u32 (uint32x4_t __a, uint32x4_t __b)
+{
+ return vminq_u32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\taddp\\tv\[0-9\]+\.8b, v\[0-9\].8b, v\[0-9\].8b" 2 } } */
+
+int8x8_t
+test_vpadd_s8 (int8x8_t __a, int8x8_t __b)
+{
+ return vpadd_s8(__a, __b);
+}
+
+uint8x8_t
+test_vpadd_u8 (uint8x8_t __a, uint8x8_t __b)
+{
+ return vpadd_u8(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\taddp\\tv\[0-9\]+\.4h, v\[0-9\].4h, v\[0-9\].4h" 2 } } */
+
+int16x4_t
+test_vpadd_s16 (int16x4_t __a, int16x4_t __b)
+{
+ return vpadd_s16(__a, __b);
+}
+
+uint16x4_t
+test_vpadd_u16 (uint16x4_t __a, uint16x4_t __b)
+{
+ return vpadd_u16(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\taddp\\tv\[0-9\]+\.2s, v\[0-9\].2s, v\[0-9\].2s" 2 } } */
+
+int32x2_t
+test_vpadd_s32 (int32x2_t __a, int32x2_t __b)
+{
+ return vpadd_s32(__a, __b);
+}
+
+uint32x2_t
+test_vpadd_u32 (uint32x2_t __a, uint32x2_t __b)
+{
+ return vpadd_u32(__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.4h" 1 } } */
+
+int32x4_t
+test_vqdmlal_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c)
+{
+ return vqdmlal_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
+
+int32x4_t
+test_vqdmlal_high_s16 (int32x4_t __a, int16x8_t __b, int16x8_t __c)
+{
+ return vqdmlal_high_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmlal_high_lane_s16 (int32x4_t a, int16x8_t b, int16x4_t c)
+{
+ return vqdmlal_high_lane_s16 (a, b, c, 3);
+}
+
+int32x4_t
+test_vqdmlal_high_laneq_s16 (int32x4_t a, int16x8_t b, int16x8_t c)
+{
+ return vqdmlal_high_laneq_s16 (a, b, c, 6);
+}
+
+int32x4_t
+test_vqdmlal_high_n_s16 (int32x4_t __a, int16x8_t __b, int16_t __c)
+{
+ return vqdmlal_high_n_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmlal_lane_s16 (int32x4_t a, int16x4_t b, int16x4_t c)
+{
+ return vqdmlal_lane_s16 (a, b, c, 3);
+}
+
+int32x4_t
+test_vqdmlal_laneq_s16 (int32x4_t a, int16x4_t b, int16x8_t c)
+{
+ return vqdmlal_laneq_s16 (a, b, c, 6);
+}
+
+int32x4_t
+test_vqdmlal_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c)
+{
+ return vqdmlal_n_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
+
+int64x2_t
+test_vqdmlal_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c)
+{
+ return vqdmlal_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
+
+int64x2_t
+test_vqdmlal_high_s32 (int64x2_t __a, int32x4_t __b, int32x4_t __c)
+{
+ return vqdmlal_high_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmlal_high_lane_s32 (int64x2_t __a, int32x4_t __b, int32x2_t __c)
+{
+ return vqdmlal_high_lane_s32 (__a, __b, __c, 1);
+}
+
+int64x2_t
+test_vqdmlal_high_laneq_s32 (int64x2_t __a, int32x4_t __b, int32x4_t __c)
+{
+ return vqdmlal_high_laneq_s32 (__a, __b, __c, 3);
+}
+
+int64x2_t
+test_vqdmlal_high_n_s32 (int64x2_t __a, int32x4_t __b, int32_t __c)
+{
+ return vqdmlal_high_n_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlal\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmlal_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c)
+{
+ return vqdmlal_lane_s32 (__a, __b, __c, 1);
+}
+
+int64x2_t
+test_vqdmlal_laneq_s32 (int64x2_t __a, int32x2_t __b, int32x4_t __c)
+{
+ return vqdmlal_laneq_s32 (__a, __b, __c, 3);
+}
+
+int64x2_t
+test_vqdmlal_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c)
+{
+ return vqdmlal_n_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.4h" 1 } } */
+
+int32x4_t
+test_vqdmlsl_s16 (int32x4_t __a, int16x4_t __b, int16x4_t __c)
+{
+ return vqdmlsl_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
+
+int32x4_t
+test_vqdmlsl_high_s16 (int32x4_t __a, int16x8_t __b, int16x8_t __c)
+{
+ return vqdmlsl_high_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmlsl_high_lane_s16 (int32x4_t a, int16x8_t b, int16x4_t c)
+{
+ return vqdmlsl_high_lane_s16 (a, b, c, 3);
+}
+
+int32x4_t
+test_vqdmlsl_high_laneq_s16 (int32x4_t a, int16x8_t b, int16x8_t c)
+{
+ return vqdmlsl_high_laneq_s16 (a, b, c, 6);
+}
+
+int32x4_t
+test_vqdmlsl_high_n_s16 (int32x4_t __a, int16x8_t __b, int16_t __c)
+{
+ return vqdmlsl_high_n_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmlsl_lane_s16 (int32x4_t a, int16x4_t b, int16x4_t c)
+{
+ return vqdmlsl_lane_s16 (a, b, c, 3);
+}
+
+int32x4_t
+test_vqdmlsl_laneq_s16 (int32x4_t a, int16x4_t b, int16x8_t c)
+{
+ return vqdmlsl_laneq_s16 (a, b, c, 6);
+}
+
+int32x4_t
+test_vqdmlsl_n_s16 (int32x4_t __a, int16x4_t __b, int16_t __c)
+{
+ return vqdmlsl_n_s16 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
+
+int64x2_t
+test_vqdmlsl_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c)
+{
+ return vqdmlsl_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
+
+int64x2_t
+test_vqdmlsl_high_s32 (int64x2_t __a, int32x4_t __b, int32x4_t __c)
+{
+ return vqdmlsl_high_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmlsl_high_lane_s32 (int64x2_t __a, int32x4_t __b, int32x2_t __c)
+{
+ return vqdmlsl_high_lane_s32 (__a, __b, __c, 1);
+}
+
+int64x2_t
+test_vqdmlsl_high_laneq_s32 (int64x2_t __a, int32x4_t __b, int32x4_t __c)
+{
+ return vqdmlsl_high_laneq_s32 (__a, __b, __c, 3);
+}
+
+int64x2_t
+test_vqdmlsl_high_n_s32 (int64x2_t __a, int32x4_t __b, int32_t __c)
+{
+ return vqdmlsl_high_n_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmlsl\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmlsl_lane_s32 (int64x2_t __a, int32x2_t __b, int32x2_t __c)
+{
+ return vqdmlsl_lane_s32 (__a, __b, __c, 1);
+}
+
+int64x2_t
+test_vqdmlsl_laneq_s32 (int64x2_t __a, int32x2_t __b, int32x4_t __c)
+{
+ return vqdmlsl_laneq_s32 (__a, __b, __c, 3);
+}
+
+int64x2_t
+test_vqdmlsl_n_s32 (int64x2_t __a, int32x2_t __b, int32_t __c)
+{
+ return vqdmlsl_n_s32 (__a, __b, __c);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.4h" 1 } } */
+
+int32x4_t
+test_vqdmull_s16 (int16x4_t __a, int16x4_t __b)
+{
+ return vqdmull_s16 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
+
+int32x4_t
+test_vqdmull_high_s16 (int16x8_t __a, int16x8_t __b)
+{
+ return vqdmull_high_s16 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull2\\tv\[0-9\]+\.4s, v\[0-9\]+\.8h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmull_high_lane_s16 (int16x8_t a, int16x4_t b)
+{
+ return vqdmull_high_lane_s16 (a, b, 3);
+}
+
+int32x4_t
+test_vqdmull_high_laneq_s16 (int16x8_t a, int16x8_t b)
+{
+ return vqdmull_high_laneq_s16 (a, b, 6);
+}
+
+int32x4_t
+test_vqdmull_high_n_s16 (int16x8_t __a, int16_t __b)
+{
+ return vqdmull_high_n_s16 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\tv\[0-9\]+\.4s, v\[0-9\]+\.4h, v\[0-9\]+\.h" 3 } } */
+
+int32x4_t
+test_vqdmull_lane_s16 (int16x4_t a, int16x4_t b)
+{
+ return vqdmull_lane_s16 (a, b, 3);
+}
+
+int32x4_t
+test_vqdmull_laneq_s16 (int16x4_t a, int16x8_t b)
+{
+ return vqdmull_laneq_s16 (a, b, 6);
+}
+
+int32x4_t
+test_vqdmull_n_s16 (int16x4_t __a, int16_t __b)
+{
+ return vqdmull_n_s16 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.2s" 1 } } */
+
+int64x2_t
+test_vqdmull_s32 (int32x2_t __a, int32x2_t __b)
+{
+ return vqdmull_s32 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.4s" 1 } } */
+
+int64x2_t
+test_vqdmull_high_s32 (int32x4_t __a, int32x4_t __b)
+{
+ return vqdmull_high_s32 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull2\\tv\[0-9\]+\.2d, v\[0-9\]+\.4s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmull_high_lane_s32 (int32x4_t __a, int32x2_t __b)
+{
+ return vqdmull_high_lane_s32 (__a, __b, 1);
+}
+
+int64x2_t
+test_vqdmull_high_laneq_s32 (int32x4_t __a, int32x4_t __b)
+{
+ return vqdmull_high_laneq_s32 (__a, __b, 3);
+}
+
+int64x2_t
+test_vqdmull_high_n_s32 (int32x4_t __a, int32_t __b)
+{
+ return vqdmull_high_n_s32 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsqdmull\\tv\[0-9\]+\.2d, v\[0-9\]+\.2s, v\[0-9\]+\.s" 3 } } */
+
+int64x2_t
+test_vqdmull_lane_s32 (int32x2_t __a, int32x2_t __b)
+{
+ return vqdmull_lane_s32 (__a, __b, 1);
+}
+
+int64x2_t
+test_vqdmull_laneq_s32 (int32x2_t __a, int32x4_t __b)
+{
+ return vqdmull_laneq_s32 (__a, __b, 1);
+}
+
+int64x2_t
+test_vqdmull_n_s32 (int32x2_t __a, int32_t __b)
+{
+ return vqdmull_n_s32 (__a, __b);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll\\tv\[0-9\]+\.2d" 1 } } */
+
+int64x2_t
+test_vshll_n_s32 (int32x2_t __a)
+{
+ return vshll_n_s32 (__a, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll\\tv\[0-9\]+\.2d" 1 } } */
+
+uint64x2_t
+test_vshll_n_u32 (uint32x2_t __a)
+{
+ return vshll_n_u32 (__a, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll\\tv\[0-9\]+\.2d" 2 } } */
+
+int64x2_t
+test_vshll_n_s32_2 (int32x2_t __a)
+{
+ return vshll_n_s32 (__a, 32);
+}
+
+uint64x2_t
+test_vshll_n_u32_2 (uint32x2_t __a)
+{
+ return vshll_n_u32 (__a, 32);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll\\tv\[0-9\]+\.4s" 1 } } */
+
+int32x4_t
+test_vshll_n_s16 (int16x4_t __a)
+{
+ return vshll_n_s16 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll\\tv\[0-9\]+\.4s" 1 } } */
+
+uint32x4_t
+test_vshll_n_u16 (uint16x4_t __a)
+{
+ return vshll_n_u16 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll\\tv\[0-9\]+\.4s" 2 } } */
+
+int32x4_t
+test_vshll_n_s16_2 (int16x4_t __a)
+{
+ return vshll_n_s16 (__a, 16);
+}
+
+uint32x4_t
+test_vshll_n_u16_2 (uint16x4_t __a)
+{
+ return vshll_n_u16 (__a, 16);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll\\tv\[0-9\]+\.8h" 1 } } */
+
+int16x8_t
+test_vshll_n_s8 (int8x8_t __a)
+{
+ return vshll_n_s8 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll\\tv\[0-9\]+\.8h" 1 } } */
+
+uint16x8_t
+test_vshll_n_u8 (uint8x8_t __a)
+{
+ return vshll_n_u8 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll\\tv\[0-9\]+\.8h" 2 } } */
+
+int16x8_t
+test_vshll_n_s8_2 (int8x8_t __a)
+{
+ return vshll_n_s8 (__a, 8);
+}
+
+uint16x8_t
+test_vshll_n_u8_2 (uint8x8_t __a)
+{
+ return vshll_n_u8 (__a, 8);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll2\\tv\[0-9\]+\.2d" 1 } } */
+
+int64x2_t
+test_vshll_high_n_s32 (int32x4_t __a)
+{
+ return vshll_high_n_s32 (__a, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll2\\tv\[0-9\]+\.2d" 1 } } */
+
+uint64x2_t
+test_vshll_high_n_u32 (uint32x4_t __a)
+{
+ return vshll_high_n_u32 (__a, 9);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll2\\tv\[0-9\]+\.2d" 2 } } */
+
+int64x2_t
+test_vshll_high_n_s32_2 (int32x4_t __a)
+{
+ return vshll_high_n_s32 (__a, 32);
+}
+
+uint64x2_t
+test_vshll_high_n_u32_2 (uint32x4_t __a)
+{
+ return vshll_high_n_u32 (__a, 32);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll2\\tv\[0-9\]+\.4s" 1 } } */
+
+int32x4_t
+test_vshll_high_n_s16 (int16x8_t __a)
+{
+ return vshll_high_n_s16 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll2\\tv\[0-9\]+\.4s" 1 } } */
+
+uint32x4_t
+test_vshll_high_n_u16 (uint16x8_t __a)
+{
+ return vshll_high_n_u16 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll2\\tv\[0-9\]+\.4s" 2 } } */
+
+int32x4_t
+test_vshll_high_n_s16_2 (int16x8_t __a)
+{
+ return vshll_high_n_s16 (__a, 16);
+}
+
+uint32x4_t
+test_vshll_high_n_u16_2 (uint16x8_t __a)
+{
+ return vshll_high_n_u16 (__a, 16);
+}
+
+/* { dg-final { scan-assembler-times "\\tsshll2\\tv\[0-9\]+\.8h" 1 } } */
+
+int16x8_t
+test_vshll_high_n_s8 (int8x16_t __a)
+{
+ return vshll_high_n_s8 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tushll2\\tv\[0-9\]+\.8h" 1 } } */
+
+uint16x8_t
+test_vshll_high_n_u8 (uint8x16_t __a)
+{
+ return vshll_high_n_u8 (__a, 3);
+}
+
+/* { dg-final { scan-assembler-times "\\tshll2\\tv\[0-9\]+\.8h" 2 } } */
+
+int16x8_t
+test_vshll_high_n_s8_2 (int8x16_t __a)
+{
+ return vshll_high_n_s8 (__a, 8);
+}
+
+uint16x8_t
+test_vshll_high_n_u8_2 (uint8x16_t __a)
+{
+ return vshll_high_n_u8 (__a, 8);
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vfp-1.c b/gcc/testsuite/gcc.target/aarch64/vfp-1.c
new file mode 100644
index 0000000000..79c571402c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vfp-1.c
@@ -0,0 +1,109 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+extern float fabsf (float);
+extern float sqrtf (float);
+extern double fabs (double);
+extern double sqrt (double);
+
+volatile float f1, f2, f3;
+volatile int cond1, cond2;
+
+void test_sf() {
+ /* abssf2 */
+ /* { dg-final { scan-assembler "fabs\ts\[0-9\]*" } } */
+ f1 = fabsf (f1);
+ /* negsf2 */
+ /* { dg-final { scan-assembler "fneg\ts\[0-9\]*" } } */
+ f1 = -f1;
+ /* addsf3 */
+ /* { dg-final { scan-assembler "fadd\ts\[0-9\]*" } } */
+ f1 = f2 + f3;
+ /* subsf3 */
+ /* { dg-final { scan-assembler "fsub\ts\[0-9\]*" } } */
+ f1 = f2 - f3;
+ /* divsf3 */
+ /* { dg-final { scan-assembler "fdiv\ts\[0-9\]*" } } */
+ f1 = f2 / f3;
+ /* mulsf3 */
+ /* { dg-final { scan-assembler "fmul\ts\[0-9\]*" } } */
+ f1 = f2 * f3;
+ /* sqrtsf2 */
+ /* { dg-final { scan-assembler "fsqrt\ts\[0-9\]*" } } */
+ f1 = sqrtf (f1);
+ /* cmpsf */
+ /* { dg-final { scan-assembler "fcmp\ts\[0-9\]*" } } */
+ if (f1 < f2)
+ cond1 = 1;
+ else
+ cond2 = 1;
+}
+
+volatile double d1, d2, d3;
+
+void test_df() {
+ /* absdf2 */
+ /* { dg-final { scan-assembler "fabs\td\[0-9\]*" } } */
+ d1 = fabs (d1);
+ /* negdf2 */
+ /* { dg-final { scan-assembler "fneg\td\[0-9\]*" } } */
+ d1 = -d1;
+ /* adddf3 */
+ /* { dg-final { scan-assembler "fadd\td\[0-9\]*" } } */
+ d1 = d2 + d3;
+ /* subdf3 */
+ /* { dg-final { scan-assembler "fsub\td\[0-9\]*" } } */
+ d1 = d2 - d3;
+ /* divdf3 */
+ /* { dg-final { scan-assembler "fdiv\td\[0-9\]*" } } */
+ d1 = d2 / d3;
+ /* muldf3 */
+ /* { dg-final { scan-assembler "fmul\td\[0-9\]*" } } */
+ d1 = d2 * d3;
+ /* sqrtdf2 */
+ /* { dg-final { scan-assembler "fsqrt\td\[0-9\]*" } } */
+ d1 = sqrt (d1);
+ /* cmpdf */
+ /* { dg-final { scan-assembler "fcmp\td\[0-9\]*" } } */
+ if (d1 < d2)
+ cond1 = 1;
+ else
+ cond2 = 1;
+}
+
+volatile int i1;
+volatile unsigned int u1;
+
+void test_convert () {
+ /* extendsfdf2 */
+ /* { dg-final { scan-assembler "fcvt\td\[0-9\]*" } } */
+ d1 = f1;
+ /* truncdfsf2 */
+ /* { dg-final { scan-assembler "fcvt\ts\[0-9\]*" } } */
+ f1 = d1;
+ /* fixsfsi2 */
+ /* { dg-final { scan-assembler "fcvtzs\tw\[0-9\], s\[0-9\]*" } } */
+ i1 = f1;
+ /* fixdfsi2 */
+ /* { dg-final { scan-assembler "fcvtzs\tw\[0-9\], d\[0-9\]*" } } */
+ i1 = d1;
+ /* fixunsfsi2 */
+ /* { dg-final { scan-assembler "fcvtzu\tw\[0-9\], s\[0-9\]*" } } */
+ u1 = f1;
+ /* fixunsdfsi2 */
+ /* { dg-final { scan-assembler "fcvtzu\tw\[0-9\], d\[0-9\]*" } } */
+ u1 = d1;
+ /* floatsisf2 */
+ /* { dg-final { scan-assembler "scvtf\ts\[0-9\]*" } } */
+ f1 = i1;
+ /* floatsidf2 */
+ /* { dg-final { scan-assembler "scvtf\td\[0-9\]*" } } */
+ d1 = i1;
+ /* floatunssisf2 */
+ /* { dg-final { scan-assembler "ucvtf\ts\[0-9\]*" } } */
+ f1 = u1;
+ /* floatunssidf2 */
+ /* { dg-final { scan-assembler "ucvtf\td\[0-9\]*" } } */
+ d1 = u1;
+}
+
diff --git a/gcc/testsuite/gcc.target/aarch64/vld1-vst1_1.c b/gcc/testsuite/gcc.target/aarch64/vld1-vst1_1.c
new file mode 100644
index 0000000000..d1834a2647
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vld1-vst1_1.c
@@ -0,0 +1,52 @@
+/* Test vld1 and vst1 maintain consistent indexing. */
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+#include <arm_neon.h>
+
+extern void abort (void);
+
+int __attribute__ ((noinline))
+test_vld1_vst1 ()
+{
+ int8x8_t a;
+ int8x8_t b;
+ int i = 0;
+ int8_t c[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int8_t d[8];
+ a = vld1_s8 (c);
+ asm volatile ("":::"memory");
+ vst1_s8 (d, a);
+ asm volatile ("":::"memory");
+ for (; i < 8; i++)
+ if (c[i] != d[i])
+ return 1;
+ return 0;
+}
+
+int __attribute__ ((noinline))
+test_vld1q_vst1q ()
+{
+ int16x8_t a;
+ int16x8_t b;
+ int i = 0;
+ int16_t c[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+ int16_t d[8];
+ a = vld1q_s16 (c);
+ asm volatile ("":::"memory");
+ vst1q_s16 (d, a);
+ asm volatile ("":::"memory");
+ for (; i < 8; i++)
+ if (c[i] != d[i])
+ return 1;
+ return 0;
+}
+
+int
+main ()
+{
+ if (test_vld1_vst1 ())
+ abort ();
+ if (test_vld1q_vst1q ())
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vmlsq_laneq.c b/gcc/testsuite/gcc.target/aarch64/vmlsq_laneq.c
new file mode 100644
index 0000000000..dd3fb81198
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vmlsq_laneq.c
@@ -0,0 +1,158 @@
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+
+extern void abort (void);
+
+void
+test1 ()
+{
+ int16x8_t val1, val2, val3;
+ int16x8_t result;
+ uint64_t act, exp;
+
+ val1 = vcombine_s16 (vcreate_s16 (UINT64_C (0xffff9ab680000000)),
+ vcreate_s16 (UINT64_C (0x00000000ffff0000)));
+ val2 = vcombine_s16 (vcreate_s16 (UINT64_C (0x32b77fffffff7fff)),
+ vcreate_s16 (UINT64_C (0x0000ffff00007fff)));
+ val3 = vcombine_s16 (vcreate_s16 (UINT64_C (0x7fff00007fff0000)),
+ vcreate_s16 (UINT64_C (0x80007fff00000000)));
+ result = vmlsq_laneq_s16 (val1, val2, val3, 6);
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_s16 (result), 0);
+ exp = UINT64_C (0xb2b69ab5ffffffff);
+ if (act != exp)
+ abort ();
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_s16 (result), 1);
+ exp = UINT64_C (0x00007fffffffffff);
+ if (act != exp)
+ abort ();
+}
+
+void
+test2 ()
+{
+ int32x4_t val1, val2, val3;
+ int32x4_t result;
+ uint64_t exp, act;
+
+ val1 = vcombine_s32 (vcreate_s32 (UINT64_C (0x00008000f46f7fff)),
+ vcreate_s32 (UINT64_C (0x7fffffffffff8000)));
+ val2 = vcombine_s32 (vcreate_s32 (UINT64_C (0x7fff7fff0e700000)),
+ vcreate_s32 (UINT64_C (0xffff000080000000)));
+ val3 = vcombine_s32 (vcreate_s32 (UINT64_C (0x00000000ffff0000)),
+ vcreate_s32 (UINT64_C (0xd9edea1a8000fb28)));
+ result = vmlsq_laneq_s32 (val1, val2, val3, 3);
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_s32 (result), 0);
+ exp = UINT64_C (0xcefb6a1a1d0f7fff);
+ if (act != exp)
+ abort ();
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_s32 (result), 1);
+ exp = UINT64_C (0x6a19ffffffff8000);
+ if (act != exp)
+ abort ();
+}
+
+void
+test3 ()
+{
+ uint16x8_t val1, val2, val3;
+ uint16x8_t result;
+ uint64_t act, exp;
+
+ val1 = vcombine_u16 (vcreate_u16 (UINT64_C (0x000080008000802a)),
+ vcreate_u16 (UINT64_C (0x7fffffff00007fff)));
+ val2 = vcombine_u16 (vcreate_u16 (UINT64_C (0x7fffcdf1ffff0000)),
+ vcreate_u16 (UINT64_C (0xe2550000ffffffff)));
+ val3 = vcombine_u16 (vcreate_u16 (UINT64_C (0x80007fff80000000)),
+ vcreate_u16 (UINT64_C (0xbe2100007fffffff)));
+
+ result = vmlsq_laneq_u16 (val1, val2, val3, 7);
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_u16 (result), 0);
+ exp = UINT64_C (0x3e2115ef3e21802a);
+ if (act != exp)
+ abort ();
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_u16 (result), 1);
+ exp = UINT64_C (0x3d0affffbe213e20);
+ if (act != exp)
+ abort ();
+}
+
+void
+test4 ()
+{
+ uint32x4_t val1, val2, val3;
+ uint32x4_t result;
+ uint64_t act, exp;
+
+ val1 = vcombine_u32 (vcreate_u32 (UINT64_C (0x3295fe3d7fff7fff)),
+ vcreate_u32 (UINT64_C (0x7fff00007fff7fff)));
+ val2 = vcombine_u32 (vcreate_u32 (UINT64_C (0xffff7fff7fff8000)),
+ vcreate_u32 (UINT64_C (0x7fff80008000ffff)));
+ val3 = vcombine_u32 (vcreate_u32 (UINT64_C (0x7fff7fff80008000)),
+ vcreate_u32 (UINT64_C (0x0000800053ab7fff)));
+
+ result = vmlsq_laneq_u32 (val1, val2, val3, 2);
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_u32 (result), 0);
+ exp = UINT64_C (0x4640fe3cbffeffff);
+ if (act != exp)
+ abort ();
+
+ act = vgetq_lane_u64 (vreinterpretq_u64_u32 (result), 1);
+ exp = UINT64_C (0xbffe8000d3abfffe);
+ if (act != exp)
+ abort ();
+}
+
+void
+test5 ()
+{
+ float32x4_t val1, val2, val3;
+ float32x4_t result;
+ float32_t act;
+
+ val1 = vcombine_f32 (vcreate_f32 (UINT64_C (0x3f49daf03ef3dc73)),
+ vcreate_f32 (UINT64_C (0x3f5d467a3ef3dc73)));
+ val2 = vcombine_f32 (vcreate_f32 (UINT64_C (0x3d2064c83d10cd28)),
+ vcreate_f32 (UINT64_C (0x3ea7d1a23d10cd28)));
+ val3 = vcombine_f32 (vcreate_f32 (UINT64_C (0x3f6131993edb1e04)),
+ vcreate_f32 (UINT64_C (0x3f37f4bf3edb1e04)));
+
+ result = vmlsq_laneq_f32 (val1, val2, val3, 0);
+
+ act = vgetq_lane_f32 (result, 0);
+ if (act != 0.46116194128990173f)
+ abort ();
+
+ act = vgetq_lane_f32 (result, 1);
+ if (act != 0.7717385292053223f)
+ abort ();
+
+ act = vgetq_lane_f32 (result, 2);
+ if (act != 0.46116194128990173f)
+ abort ();
+
+ act = vgetq_lane_f32 (result, 3);
+ if (act != 0.7240825295448303f)
+ abort ();
+}
+
+int
+main (void)
+{
+ test1 ();
+ test2 ();
+ test3 ();
+ test4 ();
+ test5 ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vmov_n_1.c b/gcc/testsuite/gcc.target/aarch64/vmov_n_1.c
new file mode 100644
index 0000000000..b9d094a044
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vmov_n_1.c
@@ -0,0 +1,349 @@
+/* Test vmov_n works correctly. */
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+
+extern void abort (void);
+
+#define INHIB_OPTIMIZATION asm volatile ("" : : : "memory")
+
+#define CONCAT(a, b) a##b
+#define CONCAT1(a, b) CONCAT (a, b)
+#define REG_INFEX64 _
+#define REG_INFEX128 q_
+#define REG_INFEX(reg_len) REG_INFEX##reg_len
+#define POSTFIX_N(reg_len, data_len, data_type) \
+ CONCAT1 (REG_INFEX (reg_len), n_##data_type##data_len)
+#define LANE_POSTFIX(reg_len, data_len, data_type) \
+ CONCAT1 (REG_INFEX (reg_len),lane_##data_type##data_len)
+
+/* Test values consist of bytes with following hex values.
+ For example:
+ TEST1 for int16_t will be 0xaaaa
+ TEST1 for int32_t will be 0xaaaaaaaa
+ etc. */
+
+#define TEST1h aa
+#define TEST2h 55
+#define TEST3h ff
+#define TEST4h 00
+#define TEST5h cc
+#define TEST6h 33
+
+#define TESTh_8(x) TEST##x##h
+#define TESTh_16(x) CONCAT1 (TESTh_8 (x), TESTh_8 (x))
+#define TESTh_32(x) CONCAT1 (TESTh_16 (x), TESTh_16 (x))
+#define TESTh_64(x) CONCAT1 (TESTh_32 (x), TESTh_32 (x))
+
+#define TEST_8(x) CONCAT1 (0x, TESTh_8 (x))
+#define TEST_16(x) CONCAT1 (0x, TESTh_16 (x))
+#define TEST_32(x) CONCAT1 (0x, TESTh_32 (x))
+#define TEST_64(x) CONCAT1 (0x, TESTh_64 (x))
+
+#define TEST(test, data_len) \
+ CONCAT1 (TEST, _##data_len) (test)
+
+#define GET_ELEMENT(reg_len, data_len, data_type) \
+ CONCAT1 (vget, LANE_POSTFIX (reg_len, data_len, data_type))
+
+#define VMOV_INST(reg_len, data_len, data_type) \
+ CONCAT1 (vmov, POSTFIX_N (reg_len, data_len, data_type))
+
+#define VMOV_OBSCURE_INST(reg_len, data_len, data_type) \
+ CONCAT1 (VMOV_INST (reg_len, data_len, data_type), _obscure)
+
+#define RUN_TEST(reg_len, data_len, data_type, \
+ test, n, a, b, c) \
+{ \
+ int i; \
+ INHIB_OPTIMIZATION; \
+ (a) = TEST (test, data_len); \
+ INHIB_OPTIMIZATION; \
+ (b) = VMOV_OBSCURE_INST (reg_len, data_len, data_type) (&(a)); \
+ (c) = TEST (test, data_len); \
+ for (i = 0; i < n; i++) \
+ { \
+ INHIB_OPTIMIZATION; \
+ a = GET_ELEMENT (reg_len, data_len, data_type) (b, i); \
+ if ((a) != (c)) \
+ return 1; \
+ } \
+}
+
+#define TYPE_f32 float32_t
+#define TYPE_64_f32 float32x2_t
+#define TYPE_128_f32 float32x4_t
+
+#define TYPE_f64 float64_t
+#define TYPE_64_f64 float64x1_t
+#define TYPE_128_f64 float64x2_t
+
+#define TYPE_s8 int8_t
+#define TYPE_64_s8 int8x8_t
+#define TYPE_128_s8 int8x16_t
+
+#define TYPE_s16 int16_t
+#define TYPE_64_s16 int16x4_t
+#define TYPE_128_s16 int16x8_t
+
+#define TYPE_s32 int32_t
+#define TYPE_64_s32 int32x2_t
+#define TYPE_128_s32 int32x4_t
+
+#define TYPE_s64 int64_t
+#define TYPE_64_s64 int64x1_t
+#define TYPE_128_s64 int64x2_t
+
+#define TYPE_u8 uint8_t
+#define TYPE_64_u8 uint8x8_t
+#define TYPE_128_u8 uint8x16_t
+
+#define TYPE_u16 uint16_t
+#define TYPE_64_u16 uint16x4_t
+#define TYPE_128_u16 uint16x8_t
+
+#define TYPE_u32 uint32_t
+#define TYPE_64_u32 uint32x2_t
+#define TYPE_128_u32 uint32x4_t
+
+#define TYPE_u64 uint64_t
+#define TYPE_64_u64 uint64x1_t
+#define TYPE_128_u64 uint64x2_t
+
+#define TYPE_p8 poly8_t
+#define TYPE_64_p8 poly8x8_t
+#define TYPE_128_p8 poly8x16_t
+
+#define TYPE_p16 poly16_t
+#define TYPE_64_p16 poly16x4_t
+#define TYPE_128_p16 poly16x8_t
+
+#define DIV64_8 8
+#define DIV64_16 4
+#define DIV64_32 2
+#define DIV64_64 1
+
+#define DIV128_8 16
+#define DIV128_16 8
+#define DIV128_32 4
+#define DIV128_64 2
+
+#define DIV(reg_len, data_len) \
+CONCAT1 (CONCAT1 (DIV, reg_len), \
+ CONCAT1 (_, data_len))
+
+#define VECTOR_TYPE(reg_len, data_len, data_type) \
+CONCAT1 (CONCAT1 (CONCAT1 (TYPE_,reg_len), \
+ CONCAT1 (_,data_type)), \
+ data_len)
+
+#define SIMPLE_TYPE(data_len, data_type) \
+CONCAT1 (TYPE_, \
+ CONCAT1 (data_type, \
+ data_len))
+
+#define OBSCURE_FUNC_NAME(reg_len, data_type, data_len) \
+CONCAT1 (CONCAT1 (vmov, \
+ POSTFIX_N (reg_len, data_len, data_type)), \
+ _obscure)
+
+#define OBSCURE_FUNC(reg_len, data_len, data_type) \
+VECTOR_TYPE (reg_len, data_len, data_type) \
+__attribute__ ((noinline)) \
+OBSCURE_FUNC_NAME (reg_len, data_type, data_len) \
+ (SIMPLE_TYPE (data_len, data_type) *ap) \
+{ \
+ SIMPLE_TYPE (data_len, data_type) register a; \
+ INHIB_OPTIMIZATION; \
+ a = *ap; \
+ INHIB_OPTIMIZATION; \
+ return VMOV_INST (reg_len, data_len, data_type) (a); \
+}
+
+#define TESTFUNC_NAME(reg_len, data_type, data_len) \
+CONCAT1 (test_vmov, \
+ POSTFIX_N (reg_len, data_len, data_type))
+
+#define TESTFUNC(reg_len, data_len, data_type) \
+int \
+TESTFUNC_NAME (reg_len, data_type, data_len) () \
+{ \
+ SIMPLE_TYPE (data_len, data_type) a; \
+ VECTOR_TYPE (reg_len, data_len, data_type) b; \
+ SIMPLE_TYPE (data_len, data_type) c; \
+ \
+ RUN_TEST (reg_len, data_len, data_type, 1, \
+ DIV (reg_len, data_len), a, b, c); \
+ RUN_TEST (reg_len, data_len, data_type, 2, \
+ DIV (reg_len, data_len), a, b, c); \
+ RUN_TEST (reg_len, data_len, data_type, 3, \
+ DIV (reg_len, data_len), a, b, c); \
+ RUN_TEST (reg_len, data_len, data_type, 4, \
+ DIV (reg_len, data_len), a, b, c); \
+ RUN_TEST (reg_len, data_len, data_type, 5, \
+ DIV (reg_len, data_len), a, b, c); \
+ RUN_TEST (reg_len, data_len, data_type, 6, \
+ DIV (reg_len, data_len), a, b, c); \
+ return 0; \
+}
+
+OBSCURE_FUNC (64, 32, f)
+TESTFUNC (64, 32, f)
+/* "dup Vd.2s, Rn" is less preferable then "dup Vd.2s, Vn.s[lane]". */
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.2s, v\[0-9\]+\.s\\\[\[0-9\]+\\\]" 1 } } */
+
+OBSCURE_FUNC (64, 64, f)
+TESTFUNC (64, 64, f)
+/* "fmov Dd, Rn" is generated instead of "dup Dd, Rn".
+ No assembley scan included. */
+
+OBSCURE_FUNC (64, 8, p)
+TESTFUNC (64, 8, p)
+/* Generates "dup Vd.8b, Rn". Scan found near s8 version. */
+
+OBSCURE_FUNC (64, 16, p)
+TESTFUNC (64, 16, p)
+/* Generates "dup Vd.4h, Rn". Scan found near s16 version. */
+
+OBSCURE_FUNC (64, 8, s)
+TESTFUNC (64, 8, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.8b, w\[0-9\]+" 3 } } */
+
+OBSCURE_FUNC (64, 16, s)
+TESTFUNC (64, 16, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.4h, w\[0-9\]+" 3 } } */
+
+OBSCURE_FUNC (64, 32, s)
+TESTFUNC (64, 32, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.2s, w\[0-9\]+" 2 } } */
+
+OBSCURE_FUNC (64, 64, s)
+TESTFUNC (64, 64, s)
+/* "fmov Dd, Rn" is generated instead of "dup Dd, Rn".
+ No assembley scan included. */
+
+OBSCURE_FUNC (64, 8, u)
+TESTFUNC (64, 8, u)
+/* Generates "dup Vd.8b, Rn". Scan found near s8 version. */
+
+OBSCURE_FUNC (64, 16, u)
+TESTFUNC (64, 16, u)
+/* Generates "dup Vd.4h, Rn". Scan found near s16 version. */
+
+OBSCURE_FUNC (64, 32, u)
+TESTFUNC (64, 32, u)
+/* Generates "dup Vd.2s, Rn". Scan found near s32 version. */
+
+OBSCURE_FUNC (64, 64, u)
+TESTFUNC (64, 64, u)
+/* "fmov Dd, Rn" is generated instead of "dup Dd, Rn".
+ No assembley scan included. */
+
+OBSCURE_FUNC (128, 32, f)
+TESTFUNC (128, 32, f)
+/* "dup Vd.4s, Rn" is less preferable then "dup Vd.4s, Vn.s[lane]". */
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.4s, v\[0-9\]+\.s\\\[\[0-9\]+\\\]" 1 } } */
+
+OBSCURE_FUNC (128, 64, f)
+TESTFUNC (128, 64, f)
+/* "dup Vd.2d, Rn" is less preferable then "dup Vd.2d, Vn.d[lane]". */
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.2d, v\[0-9\]+\.d\\\[\[0-9\]+\\\]" 1 } } */
+
+OBSCURE_FUNC (128, 8, p)
+TESTFUNC (128, 8, p)
+/* Generates "dup Vd.16b, Rn". Scan found near s8 version. */
+
+OBSCURE_FUNC (128, 16, p)
+TESTFUNC (128, 16, p)
+/* Generates "dup Vd.8h, Rn". Scan found near s16 version. */
+
+OBSCURE_FUNC (128, 8, s)
+TESTFUNC (128, 8, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.16b, w\[0-9\]+" 3 } } */
+
+OBSCURE_FUNC (128, 16, s)
+TESTFUNC (128, 16, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.8h, w\[0-9\]+" 3 } } */
+
+OBSCURE_FUNC (128, 32, s)
+TESTFUNC (128, 32, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.4s, w\[0-9\]+" 2 } } */
+
+OBSCURE_FUNC (128, 64, s)
+TESTFUNC (128, 64, s)
+/* { dg-final { scan-assembler-times "dup\\tv\[0-9\]+\.2d, x\[0-9\]+" 2 } } */
+
+OBSCURE_FUNC (128, 8, u)
+TESTFUNC (128, 8, u)
+/* Generates "dup Vd.16b, Rn". Scan found near s8 version. */
+
+OBSCURE_FUNC (128, 16, u)
+TESTFUNC (128, 16, u)
+/* Generates "dup Vd.8h, Rn". Scan found near s16 version. */
+
+OBSCURE_FUNC (128, 32, u)
+TESTFUNC (128, 32, u)
+/* Generates "dup Vd.4s, Rn". Scan found near s32 version. */
+
+OBSCURE_FUNC (128, 64, u)
+TESTFUNC (128, 64, u)
+/* Generates "dup Vd.2d, Rn". Scan found near s64 version. */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vmov_n_f32 ())
+ abort ();
+ if (test_vmov_n_f64 ())
+ abort ();
+ if (test_vmov_n_p8 ())
+ abort ();
+ if (test_vmov_n_p16 ())
+ abort ();
+ if (test_vmov_n_s8 ())
+ abort ();
+ if (test_vmov_n_s16 ())
+ abort ();
+ if (test_vmov_n_s32 ())
+ abort ();
+ if (test_vmov_n_s64 ())
+ abort ();
+ if (test_vmov_n_u8 ())
+ abort ();
+ if (test_vmov_n_u16 ())
+ abort ();
+ if (test_vmov_n_u32 ())
+ abort ();
+ if (test_vmov_n_u64 ())
+ abort ();
+
+ if (test_vmovq_n_f32 ())
+ abort ();
+ if (test_vmovq_n_f64 ())
+ abort ();
+ if (test_vmovq_n_p8 ())
+ abort ();
+ if (test_vmovq_n_p16 ())
+ abort ();
+ if (test_vmovq_n_s8 ())
+ abort ();
+ if (test_vmovq_n_s16 ())
+ abort ();
+ if (test_vmovq_n_s32 ())
+ abort ();
+ if (test_vmovq_n_s64 ())
+ abort ();
+ if (test_vmovq_n_u8 ())
+ abort ();
+ if (test_vmovq_n_u16 ())
+ abort ();
+ if (test_vmovq_n_u32 ())
+ abort ();
+ if (test_vmovq_n_u64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vneg_f.c b/gcc/testsuite/gcc.target/aarch64/vneg_f.c
new file mode 100644
index 0000000000..0150302854
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vneg_f.c
@@ -0,0 +1,270 @@
+/* Test vneg works correctly. */
+/* { dg-do run } */
+/* { dg-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+#define FLT_EPSILON __FLT_EPSILON__
+#define DBL_EPSILON __DBL_EPSILON__
+#define FLT_MAX __FLT_MAX__
+#define FLT_MIN __FLT_MIN__
+#define DBL_MAX __DBL_MAX__
+#define DBL_MIN __DBL_MIN__
+
+#define TEST0 0
+/* 6 digits of pi. */
+#define TEST1 3.14159
+/* 6 digits of -e. */
+#define TEST2 -2.71828
+/* 2^25, float has 24 significand bits
+ according to Single-precision floating-point format. */
+#define TEST3_FLT 33554432
+/* 2^54, double has 53 significand bits
+ according to Double-precision floating-point format. */
+#define TEST3_DBL 18014398509481984
+
+extern void abort (void);
+
+#define FLT_INFINITY (__builtin_inff ())
+#define DBL_INFINITY (__builtin_inf ())
+
+#ifndef NAN
+#define NAN (0.0 / 0.0)
+#endif
+
+#define CONCAT(a, b) a##b
+#define CONCAT1(a, b) CONCAT (a, b)
+#define REG_INFEX64 _
+#define REG_INFEX128 q_
+#define REG_INFEX(reg_len) REG_INFEX##reg_len
+#define POSTFIX(reg_len, data_len) \
+ CONCAT1 (REG_INFEX (reg_len), f##data_len)
+
+#define DATA_TYPE_32 float
+#define DATA_TYPE_64 double
+#define DATA_TYPE(data_len) DATA_TYPE_##data_len
+
+#define STORE_INST(reg_len, data_len) \
+ CONCAT1 (vst1, POSTFIX (reg_len, data_len))
+#define LOAD_INST(reg_len, data_len) \
+ CONCAT1 (vld1, POSTFIX (reg_len, data_len))
+#define NEG_INST(reg_len, data_len) \
+ CONCAT1 (vneg, POSTFIX (reg_len, data_len))
+
+#define INHIB_OPTIMIZATION asm volatile ("" : : : "memory")
+#define RUN_TEST(test_set, reg_len, data_len, n, a, b, c) \
+ { \
+ int i; \
+ (a) = LOAD_INST (reg_len, data_len) (test_set); \
+ (b) = NEG_INST (reg_len, data_len) (a); \
+ STORE_INST (reg_len, data_len) (c, b); \
+ for (i = 0; i < n; i++) \
+ { \
+ DATA_TYPE (data_len) diff; \
+ INHIB_OPTIMIZATION; \
+ diff = test_set[i] + c[i]; \
+ if (diff > EPSILON) \
+ return 1; \
+ } \
+ }
+
+#define TEST3 TEST3_FLT
+#define EPSILON FLT_EPSILON
+#define VAR_MIN FLT_MIN
+#define VAR_MAX FLT_MAX
+#define INFINITY FLT_INFINITY
+
+int
+test_vneg_f32 ()
+{
+ float32x2_t a;
+ float32x2_t b;
+ float32_t c[2];
+
+ float32_t test_set0[2] = { TEST0, TEST1 };
+ float32_t test_set1[2] = { TEST2, TEST3 };
+ float32_t test_set2[2] = { VAR_MAX, VAR_MIN };
+ float32_t test_set3[2] = { INFINITY, NAN };
+
+ RUN_TEST (test_set0, 64, 32, 2, a, b, c);
+ RUN_TEST (test_set1, 64, 32, 2, a, b, c);
+ RUN_TEST (test_set2, 64, 32, 2, a, b, c);
+ RUN_TEST (test_set3, 64, 32, 0, a, b, c);
+
+ /* Since last test cannot be checked in a uniform way by adding
+ negation result to original value, the number of lanes to be
+ checked in RUN_TEST is 0 (last argument). Instead, result
+ will be checked manually. */
+
+ if (c[0] != -INFINITY)
+ return 1;
+
+ if (!__builtin_isnan (c[1]))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fneg\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 4 } } */
+
+#undef TEST3
+#undef EPSILON
+#undef VAR_MIN
+#undef VAR_MAX
+#undef INFINITY
+
+#define TEST3 TEST3_DBL
+#define EPSILON DBL_EPSILON
+#define VAR_MIN DBL_MIN
+#define VAR_MAX DBL_MAX
+#define INFINITY DBL_INFINITY
+
+int
+test_vneg_f64 ()
+{
+ float64x1_t a;
+ float64x1_t b;
+ float64_t c[1];
+
+ float64_t test_set0[1] = { TEST0 };
+ float64_t test_set1[1] = { TEST1 };
+ float64_t test_set2[1] = { TEST2 };
+ float64_t test_set3[1] = { TEST3 };
+ float64_t test_set4[1] = { VAR_MAX };
+ float64_t test_set5[1] = { VAR_MIN };
+ float64_t test_set6[1] = { INFINITY };
+ float64_t test_set7[1] = { NAN };
+
+ RUN_TEST (test_set0, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set1, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set2, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set3, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set4, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set5, 64, 64, 1, a, b, c);
+ RUN_TEST (test_set6, 64, 64, 0, a, b, c);
+
+ /* Since last test cannot be checked in a uniform way by adding
+ negation result to original value, the number of lanes to be
+ checked in RUN_TEST is 0 (last argument). Instead, result
+ will be checked manually. */
+
+ if (c[0] != -INFINITY)
+ return 1;
+
+ /* Same as above. */
+
+ RUN_TEST (test_set7, 64, 64, 0, a, b, c);
+
+ if (!__builtin_isnan (c[0]))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fneg\\td\[0-9\]+, d\[0-9\]+" 8 } } */
+
+#undef TEST3
+#undef EPSILON
+#undef VAR_MIN
+#undef VAR_MAX
+#undef INFINITY
+
+#define TEST3 TEST3_FLT
+#define EPSILON FLT_EPSILON
+#define VAR_MIN FLT_MIN
+#define VAR_MAX FLT_MAX
+#define INFINITY FLT_INFINITY
+
+int
+test_vnegq_f32 ()
+{
+ float32x4_t a;
+ float32x4_t b;
+ float32_t c[4];
+
+ float32_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ float32_t test_set1[4] = { FLT_MAX, FLT_MIN, INFINITY, NAN };
+
+ RUN_TEST (test_set0, 128, 32, 4, a, b, c);
+ RUN_TEST (test_set1, 128, 32, 2, a, b, c);
+
+ /* Since last test cannot be fully checked in a uniform way by
+ adding negation result to original value, the number of lanes
+ to be checked in RUN_TEST is 0 (last argument). Instead, result
+ will be checked manually. */
+
+ if (c[2] != -INFINITY)
+ return 1;
+
+ if (!__builtin_isnan (c[3]))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fneg\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 2 } } */
+
+#undef TEST3
+#undef EPSILON
+#undef VAR_MIN
+#undef VAR_MAX
+#undef INFINITY
+
+#define TEST3 TEST3_DBL
+#define EPSILON DBL_EPSILON
+#define VAR_MIN DBL_MIN
+#define VAR_MAX DBL_MAX
+#define INFINITY DBL_INFINITY
+
+int
+test_vnegq_f64 ()
+{
+ float64x2_t a;
+ float64x2_t b;
+ float64_t c[2];
+
+ float64_t test_set0[2] = { TEST0, TEST1 };
+ float64_t test_set1[2] = { TEST2, TEST3 };
+ float64_t test_set2[2] = { FLT_MAX, FLT_MIN };
+ float64_t test_set3[2] = { INFINITY, NAN };
+
+ RUN_TEST (test_set0, 128, 64, 2, a, b, c);
+ RUN_TEST (test_set1, 128, 64, 2, a, b, c);
+ RUN_TEST (test_set2, 128, 64, 2, a, b, c);
+ RUN_TEST (test_set3, 128, 64, 0, a, b, c);
+
+ /* Since last test cannot be checked in a uniform way by adding
+ negation result to original value, the number of lanes to be
+ checked in RUN_TEST is 0 (last argument). Instead, result
+ will be checked manually. */
+
+ if (c[0] != -INFINITY)
+ return 1;
+
+ if (!__builtin_isnan (c[1]))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fneg\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" 4 } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vneg_f32 ())
+ abort ();
+
+ if (test_vneg_f64 ())
+ abort ();
+
+ if (test_vnegq_f32 ())
+ abort ();
+
+ if (test_vnegq_f64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vneg_s.c b/gcc/testsuite/gcc.target/aarch64/vneg_s.c
new file mode 100644
index 0000000000..accbf14074
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vneg_s.c
@@ -0,0 +1,309 @@
+/* Test vneg works correctly. */
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -O3 -Wno-div-by-zero --save-temps" } */
+
+#include <arm_neon.h>
+#include <limits.h>
+
+/* Used to force a variable to a SIMD register. */
+#define force_simd(V1) asm volatile ("mov %d0, %1.d[0]" \
+ : "=w"(V1) \
+ : "w"(V1) \
+ : /* No clobbers */);
+#define INHIB_OPTIMIZATION asm volatile ("" : : : "memory")
+
+#define TEST0 0
+#define TEST1 1
+#define TEST2 -1
+#define TEST3 10
+#define TEST4 -10
+#define TEST5 0
+
+#define ANSW0 0
+#define ANSW1 -1
+#define ANSW2 1
+#define ANSW3 -10
+#define ANSW4 10
+#define ANSW5 0
+
+extern void abort (void);
+
+#define CONCAT(a, b) a##b
+#define CONCAT1(a, b) CONCAT (a, b)
+#define REG_INFEX64 _
+#define REG_INFEX128 q_
+#define REG_INFEX(reg_len) REG_INFEX##reg_len
+#define POSTFIX(reg_len, data_len) \
+ CONCAT1 (REG_INFEX (reg_len), s##data_len)
+#define DATA_TYPE_32 float
+#define DATA_TYPE_64 double
+#define DATA_TYPE(data_len) DATA_TYPE_##data_len
+#define INDEX64_8 [i]
+#define INDEX64_16 [i]
+#define INDEX64_32 [i]
+#define INDEX64_64
+#define INDEX128_8 [i]
+#define INDEX128_16 [i]
+#define INDEX128_32 [i]
+#define INDEX128_64 [i]
+
+#define FORCE_SIMD_INST64_8(data)
+#define FORCE_SIMD_INST64_16(data)
+#define FORCE_SIMD_INST64_32(data)
+#define FORCE_SIMD_INST64_64(data) force_simd (data)
+#define FORCE_SIMD_INST128_8(data)
+#define FORCE_SIMD_INST128_16(data)
+#define FORCE_SIMD_INST128_32(data)
+#define FORCE_SIMD_INST128_64(data)
+
+#define INDEX(reg_len, data_len) \
+ CONCAT1 (INDEX, reg_len##_##data_len)
+#define FORCE_SIMD_INST(reg_len, data_len, data) \
+ CONCAT1 (FORCE_SIMD_INST, reg_len##_##data_len) (data)
+#define LOAD_INST(reg_len, data_len) \
+ CONCAT1 (vld1, POSTFIX (reg_len, data_len))
+#define NEG_INST(reg_len, data_len) \
+ CONCAT1 (vneg, POSTFIX (reg_len, data_len))
+
+#define RUN_TEST(test_set, answ_set, reg_len, data_len, n, a, b) \
+ { \
+ int i; \
+ INHIB_OPTIMIZATION; \
+ (a) = LOAD_INST (reg_len, data_len) (test_set); \
+ (b) = LOAD_INST (reg_len, data_len) (answ_set); \
+ FORCE_SIMD_INST (reg_len, data_len, a) \
+ a = NEG_INST (reg_len, data_len) (a); \
+ FORCE_SIMD_INST (reg_len, data_len, a) \
+ for (i = 0; i < n; i++) \
+ { \
+ INHIB_OPTIMIZATION; \
+ if (a INDEX (reg_len, data_len) \
+ != b INDEX (reg_len, data_len)) \
+ return 1; \
+ } \
+ }
+
+int
+test_vneg_s8 ()
+{
+ int8x8_t a;
+ int8x8_t b;
+
+ int8_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, SCHAR_MAX, SCHAR_MIN
+ };
+ int8_t answ_set0[8] = {
+ ANSW0, ANSW1, ANSW2, ANSW3, ANSW4, ANSW5, SCHAR_MIN + 1, SCHAR_MIN
+ };
+
+ RUN_TEST (test_set0, answ_set0, 64, 8, 8, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.8b, v\[0-9\]+\.8b" 1 } } */
+
+int
+test_vneg_s16 ()
+{
+ int16x4_t a;
+ int16x4_t b;
+
+ int16_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ int16_t test_set1[4] = { TEST4, TEST5, SHRT_MAX, SHRT_MIN };
+
+ int16_t answ_set0[4] = { ANSW0, ANSW1, ANSW2, ANSW3 };
+ int16_t answ_set1[4] = { ANSW4, ANSW5, SHRT_MIN + 1, SHRT_MIN };
+
+ RUN_TEST (test_set0, answ_set0, 64, 16, 4, a, b);
+ RUN_TEST (test_set1, answ_set1, 64, 16, 4, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.4h, v\[0-9\]+\.4h" 2 } } */
+
+int
+test_vneg_s32 ()
+{
+ int32x2_t a;
+ int32x2_t b;
+
+ int32_t test_set0[2] = { TEST0, TEST1 };
+ int32_t test_set1[2] = { TEST2, TEST3 };
+ int32_t test_set2[2] = { TEST4, TEST5 };
+ int32_t test_set3[2] = { INT_MAX, INT_MIN };
+
+ int32_t answ_set0[2] = { ANSW0, ANSW1 };
+ int32_t answ_set1[2] = { ANSW2, ANSW3 };
+ int32_t answ_set2[2] = { ANSW4, ANSW5 };
+ int32_t answ_set3[2] = { INT_MIN + 1, INT_MIN };
+
+ RUN_TEST (test_set0, answ_set0, 64, 32, 2, a, b);
+ RUN_TEST (test_set1, answ_set1, 64, 32, 2, a, b);
+ RUN_TEST (test_set2, answ_set2, 64, 32, 2, a, b);
+ RUN_TEST (test_set3, answ_set3, 64, 32, 2, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.2s, v\[0-9\]+\.2s" 4 } } */
+
+int
+test_vneg_s64 ()
+{
+ int64x1_t a;
+ int64x1_t b;
+
+ int64_t test_set0[1] = { TEST0 };
+ int64_t test_set1[1] = { TEST1 };
+ int64_t test_set2[1] = { TEST2 };
+ int64_t test_set3[1] = { TEST3 };
+ int64_t test_set4[1] = { TEST4 };
+ int64_t test_set5[1] = { TEST5 };
+ int64_t test_set6[1] = { LLONG_MAX };
+ int64_t test_set7[1] = { LLONG_MIN };
+
+ int64_t answ_set0[1] = { ANSW0 };
+ int64_t answ_set1[1] = { ANSW1 };
+ int64_t answ_set2[1] = { ANSW2 };
+ int64_t answ_set3[1] = { ANSW3 };
+ int64_t answ_set4[1] = { ANSW4 };
+ int64_t answ_set5[1] = { ANSW5 };
+ int64_t answ_set6[1] = { LLONG_MIN + 1 };
+ int64_t answ_set7[1] = { LLONG_MIN };
+
+ RUN_TEST (test_set0, answ_set0, 64, 64, 1, a, b);
+ RUN_TEST (test_set1, answ_set1, 64, 64, 1, a, b);
+ RUN_TEST (test_set2, answ_set2, 64, 64, 1, a, b);
+ RUN_TEST (test_set3, answ_set3, 64, 64, 1, a, b);
+ RUN_TEST (test_set4, answ_set4, 64, 64, 1, a, b);
+ RUN_TEST (test_set5, answ_set5, 64, 64, 1, a, b);
+ RUN_TEST (test_set6, answ_set6, 64, 64, 1, a, b);
+ RUN_TEST (test_set7, answ_set7, 64, 64, 1, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\td\[0-9\]+, d\[0-9\]+" 8 } } */
+
+int
+test_vnegq_s8 ()
+{
+ int8x16_t a;
+ int8x16_t b;
+
+ int8_t test_set0[16] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, SCHAR_MAX, SCHAR_MIN,
+ 4, 8, 15, 16, 23, 42, -1, -2
+ };
+
+ int8_t answ_set0[16] = {
+ ANSW0, ANSW1, ANSW2, ANSW3, ANSW4, ANSW5, SCHAR_MIN + 1, SCHAR_MIN,
+ -4, -8, -15, -16, -23, -42, 1, 2
+ };
+
+ RUN_TEST (test_set0, answ_set0, 128, 8, 8, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.16b, v\[0-9\]+\.16b" 1 } } */
+
+int
+test_vnegq_s16 ()
+{
+ int16x8_t a;
+ int16x8_t b;
+
+ int16_t test_set0[8] = {
+ TEST0, TEST1, TEST2, TEST3, TEST4, TEST5, SHRT_MAX, SHRT_MIN
+ };
+ int16_t answ_set0[8] = {
+ ANSW0, ANSW1, ANSW2, ANSW3, ANSW4, ANSW5, SHRT_MIN + 1, SHRT_MIN
+ };
+
+ RUN_TEST (test_set0, answ_set0, 128, 16, 8, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.8h, v\[0-9\]+\.8h" 1 } } */
+
+int
+test_vnegq_s32 ()
+{
+ int32x4_t a;
+ int32x4_t b;
+
+ int32_t test_set0[4] = { TEST0, TEST1, TEST2, TEST3 };
+ int32_t test_set1[4] = { TEST4, TEST5, INT_MAX, INT_MIN };
+
+ int32_t answ_set0[4] = { ANSW0, ANSW1, ANSW2, ANSW3 };
+ int32_t answ_set1[4] = { ANSW4, ANSW5, INT_MIN + 1, INT_MIN };
+
+ RUN_TEST (test_set0, answ_set0, 128, 32, 4, a, b);
+ RUN_TEST (test_set1, answ_set1, 128, 32, 4, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.4s, v\[0-9\]+\.4s" 2 } } */
+
+int
+test_vnegq_s64 ()
+{
+ int64x2_t a;
+ int64x2_t b;
+
+ int64_t test_set0[2] = { TEST0, TEST1 };
+ int64_t test_set1[2] = { TEST2, TEST3 };
+ int64_t test_set2[2] = { TEST4, TEST5 };
+ int64_t test_set3[2] = { LLONG_MAX, LLONG_MIN };
+
+ int64_t answ_set0[2] = { ANSW0, ANSW1 };
+ int64_t answ_set1[2] = { ANSW2, ANSW3 };
+ int64_t answ_set2[2] = { ANSW4, ANSW5 };
+ int64_t answ_set3[2] = { LLONG_MIN + 1, LLONG_MIN };
+
+ RUN_TEST (test_set0, answ_set0, 128, 64, 2, a, b);
+ RUN_TEST (test_set1, answ_set1, 128, 64, 2, a, b);
+ RUN_TEST (test_set2, answ_set2, 128, 64, 2, a, b);
+ RUN_TEST (test_set3, answ_set3, 128, 64, 2, a, b);
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "neg\\tv\[0-9\]+\.2d, v\[0-9\]+\.2d" 4 } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vneg_s8 ())
+ abort ();
+
+ if (test_vneg_s16 ())
+ abort ();
+
+ if (test_vneg_s32 ())
+ abort ();
+
+ if (test_vneg_s64 ())
+ abort ();
+
+ if (test_vnegq_s8 ())
+ abort ();
+
+ if (test_vnegq_s16 ())
+ abort ();
+
+ if (test_vnegq_s32 ())
+ abort ();
+
+ if (test_vnegq_s64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-1.c b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-1.c
new file mode 100644
index 0000000000..c69d3a358b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct {
+ char a:1;
+ char b:7;
+ int c;
+} BitStruct;
+
+volatile BitStruct bits;
+
+int foo ()
+{
+ return bits.b;
+}
+
+/* { dg-final { scan-assembler "ldrb\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-2.c b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-2.c
new file mode 100644
index 0000000000..c7a9ebaa2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct {
+ volatile unsigned long a:8;
+ volatile unsigned long b:8;
+ volatile unsigned long c:16;
+} BitStruct;
+
+BitStruct bits;
+
+unsigned long foo ()
+{
+ return bits.b;
+}
+
+/* { dg-final { scan-assembler "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-3.c b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-3.c
new file mode 100644
index 0000000000..ea371dbac9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/volatile-bitfields-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct {
+ volatile unsigned long a:8;
+ volatile unsigned long b:8;
+ volatile unsigned long c:16;
+} BitStruct;
+
+BitStruct bits;
+
+unsigned long foo ()
+{
+ return bits.c;
+}
+
+/* { dg-final { scan-assembler "ldr\[\\t \]+\[^\n\]*,\[\\t \]*\\\[\[^\n\]*\\\]" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s16.c
new file mode 100644
index 0000000000..1388c3b613
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_high_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlal_high_lane_s16 (int32x4_t a, int16x8_t b, int16x4_t c)
+{
+ return vqdmlal_high_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s32.c
new file mode 100644
index 0000000000..f90387dba8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_high_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlal_high_lane_s32 (int64x2_t a, int32x4_t b, int32x2_t c)
+{
+ return vqdmlal_high_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s16.c
new file mode 100644
index 0000000000..5399ce9853
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_high_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlal_high_laneq_s16 (int32x4_t a, int16x8_t b, int16x8_t c)
+{
+ return vqdmlal_high_laneq_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s32.c
new file mode 100644
index 0000000000..e4b55582ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_high_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_high_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlal_high_laneq_s32 (int64x2_t a, int32x4_t b, int32x4_t c)
+{
+ return vqdmlal_high_laneq_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s16.c
new file mode 100644
index 0000000000..7e60c82207
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlal_lane_s16 (int32x4_t a, int16x4_t b, int16x4_t c)
+{
+ return vqdmlal_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s32.c
new file mode 100644
index 0000000000..c0f508dc95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlal_lane_s32 (int64x2_t a, int32x2_t b, int32x2_t c)
+{
+ return vqdmlal_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s16.c
new file mode 100644
index 0000000000..9bf1304351
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlal_laneq_s16 (int32x4_t a, int16x4_t b, int16x8_t c)
+{
+ return vqdmlal_laneq_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s32.c
new file mode 100644
index 0000000000..5fd9c56dc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlal_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlal_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlal_laneq_s32 (int64x2_t a, int32x2_t b, int32x4_t c)
+{
+ return vqdmlal_laneq_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlalh_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlalh_lane_s16.c
new file mode 100644
index 0000000000..9ca041cb81
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlalh_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlalh_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32_t
+t_vqdmlalh_lane_s16 (int32_t a, int16_t b, int16x4_t c)
+{
+ return vqdmlalh_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[sS\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlals_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlals_lane_s32.c
new file mode 100644
index 0000000000..40e4c9ff4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlals_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlals_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x1_t
+t_vqdmlals_lane_s32 (int64x1_t a, int32_t b, int32x2_t c)
+{
+ return vqdmlals_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlal\[ \t\]+\[dD\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s16.c
new file mode 100644
index 0000000000..276a1a2a93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_high_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlsl_high_lane_s16 (int32x4_t a, int16x8_t b, int16x4_t c)
+{
+ return vqdmlsl_high_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s32.c
new file mode 100644
index 0000000000..2ae58ef0bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_high_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlsl_high_lane_s32 (int64x2_t a, int32x4_t b, int32x2_t c)
+{
+ return vqdmlsl_high_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s16.c
new file mode 100644
index 0000000000..1db5db4c96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_high_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlsl_high_laneq_s16 (int32x4_t a, int16x8_t b, int16x8_t c)
+{
+ return vqdmlsl_high_laneq_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s32.c
new file mode 100644
index 0000000000..3a72a7bca9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_high_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_high_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlsl_high_laneq_s32 (int64x2_t a, int32x4_t b, int32x4_t c)
+{
+ return vqdmlsl_high_laneq_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s16.c
new file mode 100644
index 0000000000..0535378e46
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmlsl_lane_s16 (int32x4_t a, int16x4_t b, int16x4_t c)
+{
+ return vqdmlsl_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s32.c
new file mode 100644
index 0000000000..b52e51e1a6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlsl_lane_s32 (int64x2_t a, int32x2_t b, int32x2_t c)
+{
+ return vqdmlsl_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsl_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_laneq_s32.c
new file mode 100644
index 0000000000..7009a35f2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsl_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsl_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmlsl_lane_s32 (int64x2_t a, int32x2_t b, int32x4_t c)
+{
+ return vqdmlsl_laneq_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlslh_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmlslh_lane_s16.c
new file mode 100644
index 0000000000..b3bbc951ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlslh_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlslh_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32_t
+t_vqdmlslh_lane_s16 (int32_t a, int16_t b, int16x4_t c)
+{
+ return vqdmlslh_lane_s16 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl\[ \t\]+\[sS\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmlsls_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmlsls_lane_s32.c
new file mode 100644
index 0000000000..5bd643a240
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmlsls_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmlsls_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x1_t
+t_vqdmlsls_lane_s32 (int64x1_t a, int32_t b, int32x2_t c)
+{
+ return vqdmlsls_lane_s32 (a, b, c, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmlsl\[ \t\]+\[dD\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s16.c
new file mode 100644
index 0000000000..d3c699bd33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmulh_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int16x4_t
+t_vqdmulh_laneq_s16 (int16x4_t a, int16x8_t b)
+{
+ return vqdmulh_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s32.c
new file mode 100644
index 0000000000..c6202ce19b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulh_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmulh_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x2_t
+t_vqdmulh_laneq_s32 (int32x2_t a, int32x4_t b)
+{
+ return vqdmulh_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulhh_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmulhh_lane_s16.c
new file mode 100644
index 0000000000..7635851006
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulhh_lane_s16.c
@@ -0,0 +1,36 @@
+/* Test the vqdmulhh_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do run } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int16_t arg1;
+ int16x4_t arg2;
+ int16_t result;
+ int16_t actual;
+ int16_t expected;
+
+ arg1 = -32768;
+ arg2 = vcreate_s16 (0x0000ffff2489e398ULL);
+ actual = vqdmulhh_lane_s16 (arg1, arg2, 2);
+ expected = 1;
+
+ if (expected != actual)
+ {
+ fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
+ abort ();
+ }
+
+ return 0;
+}
+
+
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[hH\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[2\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s16.c
new file mode 100644
index 0000000000..809c85a775
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmulhq_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int16x8_t
+t_vqdmulhq_laneq_s16 (int16x8_t a, int16x8_t b)
+{
+ return vqdmulhq_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s32.c
new file mode 100644
index 0000000000..d375fe818e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulhq_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmulhq_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmulhq_laneq_s32 (int32x4_t a, int32x4_t b)
+{
+ return vqdmulhq_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulhs_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmulhs_lane_s32.c
new file mode 100644
index 0000000000..9c27f5f3a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulhs_lane_s32.c
@@ -0,0 +1,34 @@
+/* Test the vqdmulhs_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do run } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int32_t arg1;
+ int32x2_t arg2;
+ int32_t result;
+ int32_t actual;
+ int32_t expected;
+
+ arg1 = 57336;
+ arg2 = vcreate_s32 (0x55897fff7fff0000ULL);
+ actual = vqdmulhs_lane_s32 (arg1, arg2, 0);
+ expected = 57334;
+
+ if (expected != actual)
+ {
+ fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
+ abort ();
+ }
+
+ return 0;
+}
+/* { dg-final { scan-assembler-times "sqdmulh\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s16.c
new file mode 100644
index 0000000000..0af320e2c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_high_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmull_high_lane_s16 (int16x8_t a, int16x4_t b)
+{
+ return vqdmull_high_lane_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s32.c
new file mode 100644
index 0000000000..583e8a1721
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_high_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmull_high_lane_s32 (int32x4_t a, int32x2_t b)
+{
+ return vqdmull_high_lane_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s16.c
new file mode 100644
index 0000000000..dcfd14c714
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_high_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmull_high_laneq_s16 (int16x8_t a, int16x8_t b)
+{
+ return vqdmull_high_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull2\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s32.c
new file mode 100644
index 0000000000..3e8b652d90
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_high_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_high_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmull_high_laneq_s32 (int32x4_t a, int32x4_t b)
+{
+ return vqdmull_high_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull2\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s16.c
new file mode 100644
index 0000000000..695d4e3fbc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmull_lane_s16 (int16x4_t a, int16x4_t b)
+{
+ return vqdmull_lane_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s32.c
new file mode 100644
index 0000000000..e6a02b573a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmull_lane_s32 (int32x2_t a, int32x2_t b)
+{
+ return vqdmull_lane_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s16.c
new file mode 100644
index 0000000000..ba761b2312
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqdmull_laneq_s16 (int16x4_t a, int16x8_t b)
+{
+ return vqdmull_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s32.c
new file mode 100644
index 0000000000..82b8e19ed7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmull_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmull_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x2_t
+t_vqdmull_laneq_s32 (int32x2_t a, int32x4_t b)
+{
+ return vqdmull_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[vV\]\[0-9\]+\.2\[dD\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmullh_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqdmullh_lane_s16.c
new file mode 100644
index 0000000000..c3761dfd09
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmullh_lane_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqdmullh_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32_t
+t_vqdmullh_lane_s16 (int16_t a, int16x4_t b)
+{
+ return vqdmullh_lane_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[sS\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqdmulls_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqdmulls_lane_s32.c
new file mode 100644
index 0000000000..6ed8e3a0b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqdmulls_lane_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqdmulls_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int64x1_t
+t_vqdmulls_lane_s32 (int32_t a, int32x2_t b)
+{
+ return vqdmulls_lane_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqdmull\[ \t\]+\[dD\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s16.c
new file mode 100644
index 0000000000..0313f1c07d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqrdmulh_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int16x4_t
+t_vqrdmulh_laneq_s16 (int16x4_t a, int16x8_t b)
+{
+ return vqrdmulh_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.4\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s32.c
new file mode 100644
index 0000000000..a9124ee108
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulh_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqrdmulh_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x2_t
+t_vqrdmulh_laneq_s32 (int32x2_t a, int32x4_t b)
+{
+ return vqrdmulh_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.2\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulhh_lane_s16.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulhh_lane_s16.c
new file mode 100644
index 0000000000..f21863ab46
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulhh_lane_s16.c
@@ -0,0 +1,35 @@
+/* Test the vqrdmulhh_lane_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do run } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int16_t arg1;
+ int16x4_t arg2;
+ int16_t result;
+ int16_t actual;
+ int16_t expected;
+
+ arg1 = -32768;
+ arg2 = vcreate_s16 (0xd78e000005d78000ULL);
+ actual = vqrdmulhh_lane_s16 (arg1, arg2, 3);
+ expected = 10354;
+
+ if (expected != actual)
+ {
+ fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
+ abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[hH\]\[0-9\]+, ?\[hH\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[hH\]\\\[3\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s16.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s16.c
new file mode 100644
index 0000000000..488e694ab4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s16.c
@@ -0,0 +1,15 @@
+/* Test the vqrdmulhq_laneq_s16 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int16x8_t
+t_vqrdmulhq_laneq_s16 (int16x8_t a, int16x8_t b)
+{
+ return vqrdmulhq_laneq_s16 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.8\[hH\], ?\[vV\]\[0-9\]+\.\[hH\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s32.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s32.c
new file mode 100644
index 0000000000..42519f6158
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulhq_laneq_s32.c
@@ -0,0 +1,15 @@
+/* Test the vqrdmulhq_laneq_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+
+int32x4_t
+t_vqrdmulhq_laneq_s32 (int32x4_t a, int32x4_t b)
+{
+ return vqrdmulhq_laneq_s32 (a, b, 0);
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.4\[sS\], ?\[vV\]\[0-9\]+\.\[sS\]\\\[0\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vqrdmulhs_lane_s32.c b/gcc/testsuite/gcc.target/aarch64/vqrdmulhs_lane_s32.c
new file mode 100644
index 0000000000..83d2ba28e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vqrdmulhs_lane_s32.c
@@ -0,0 +1,35 @@
+/* Test the vqrdmulhs_lane_s32 AArch64 SIMD intrinsic. */
+
+/* { dg-do run } */
+/* { dg-options "-save-temps -O3 -fno-inline" } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int32_t arg1;
+ int32x2_t arg2;
+ int32_t result;
+ int32_t actual;
+ int32_t expected;
+
+ arg1 = -2099281921;
+ arg2 = vcreate_s32 (0x000080007fff0000ULL);
+ actual = vqrdmulhs_lane_s32 (arg1, arg2, 1);
+ expected = -32033;
+
+ if (expected != actual)
+ {
+ fprintf (stderr, "Expected: %xd, got %xd\n", expected, actual);
+ abort ();
+ }
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "sqrdmulh\[ \t\]+\[sS\]\[0-9\]+, ?\[sS\]\[0-9\]+, ?\[vV\]\[0-9\]+\.\[sS\]\\\[1\\\]\n" 1 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vrecps.c b/gcc/testsuite/gcc.target/aarch64/vrecps.c
new file mode 100644
index 0000000000..c279a4493a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vrecps.c
@@ -0,0 +1,144 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+#include <math.h>
+#include <stdlib.h>
+
+int
+test_frecps_float32_t (void)
+{
+ int i;
+ float32_t value = 0.2;
+ float32_t reciprocal = 5.0;
+ float32_t step = vrecpes_f32 (value);
+ /* 3 steps should give us within ~0.001 accuracy. */
+ for (i = 0; i < 3; i++)
+ step = step * vrecpss_f32 (step, value);
+
+ return fabs (step - reciprocal) < 0.001;
+}
+
+/* { dg-final { scan-assembler "frecpe\\ts\[0-9\]+, s\[0-9\]+" } } */
+/* { dg-final { scan-assembler "frecps\\ts\[0-9\]+, s\[0-9\]+, s\[0-9\]+" } } */
+
+int
+test_frecps_float32x2_t (void)
+{
+ int i;
+ int ret = 1;
+
+ const float32_t value_pool[] = {0.2, 0.4};
+ const float32_t reciprocal_pool[] = {5.0, 2.5};
+ float32x2_t value = vld1_f32 (value_pool);
+ float32x2_t reciprocal = vld1_f32 (reciprocal_pool);
+
+ float32x2_t step = vrecpe_f32 (value);
+ /* 3 steps should give us within ~0.001 accuracy. */
+ for (i = 0; i < 3; i++)
+ step = step * vrecps_f32 (step, value);
+
+ ret &= fabs (vget_lane_f32 (step, 0)
+ - vget_lane_f32 (reciprocal, 0)) < 0.001;
+ ret &= fabs (vget_lane_f32 (step, 1)
+ - vget_lane_f32 (reciprocal, 1)) < 0.001;
+
+ return ret;
+}
+
+/* { dg-final { scan-assembler "frecpe\\tv\[0-9\]+.2s, v\[0-9\]+.2s" } } */
+/* { dg-final { scan-assembler "frecps\\tv\[0-9\]+.2s, v\[0-9\]+.2s, v\[0-9\]+.2s" } } */
+
+int
+test_frecps_float32x4_t (void)
+{
+ int i;
+ int ret = 1;
+
+ const float32_t value_pool[] = {0.2, 0.4, 0.5, 0.8};
+ const float32_t reciprocal_pool[] = {5.0, 2.5, 2.0, 1.25};
+ float32x4_t value = vld1q_f32 (value_pool);
+ float32x4_t reciprocal = vld1q_f32 (reciprocal_pool);
+
+ float32x4_t step = vrecpeq_f32 (value);
+ /* 3 steps should give us within ~0.001 accuracy. */
+ for (i = 0; i < 3; i++)
+ step = step * vrecpsq_f32 (step, value);
+
+ ret &= fabs (vgetq_lane_f32 (step, 0)
+ - vgetq_lane_f32 (reciprocal, 0)) < 0.001;
+ ret &= fabs (vgetq_lane_f32 (step, 1)
+ - vgetq_lane_f32 (reciprocal, 1)) < 0.001;
+ ret &= fabs (vgetq_lane_f32 (step, 2)
+ - vgetq_lane_f32 (reciprocal, 2)) < 0.001;
+ ret &= fabs (vgetq_lane_f32 (step, 3)
+ - vgetq_lane_f32 (reciprocal, 3)) < 0.001;
+
+ return ret;
+}
+
+/* { dg-final { scan-assembler "frecpe\\tv\[0-9\]+.4s, v\[0-9\]+.4s" } } */
+/* { dg-final { scan-assembler "frecps\\tv\[0-9\]+.4s, v\[0-9\]+.4s, v\[0-9\]+.4s" } } */
+
+int
+test_frecps_float64_t (void)
+{
+ int i;
+ float64_t value = 0.2;
+ float64_t reciprocal = 5.0;
+ float64_t step = vrecped_f64 (value);
+ /* 3 steps should give us within ~0.001 accuracy. */
+ for (i = 0; i < 3; i++)
+ step = step * vrecpsd_f64 (step, value);
+
+ return fabs (step - reciprocal) < 0.001;
+}
+
+/* { dg-final { scan-assembler "frecpe\\td\[0-9\]+, d\[0-9\]+" } } */
+/* { dg-final { scan-assembler "frecps\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" } } */
+
+int
+test_frecps_float64x2_t (void)
+{
+ int i;
+ int ret = 1;
+
+ const float64_t value_pool[] = {0.2, 0.4};
+ const float64_t reciprocal_pool[] = {5.0, 2.5};
+ float64x2_t value = vld1q_f64 (value_pool);
+ float64x2_t reciprocal = vld1q_f64 (reciprocal_pool);
+
+ float64x2_t step = vrecpeq_f64 (value);
+ /* 3 steps should give us within ~0.001 accuracy. */
+ for (i = 0; i < 3; i++)
+ step = step * vrecpsq_f64 (step, value);
+
+ ret &= fabs (vgetq_lane_f64 (step, 0)
+ - vgetq_lane_f64 (reciprocal, 0)) < 0.001;
+ ret &= fabs (vgetq_lane_f64 (step, 1)
+ - vgetq_lane_f64 (reciprocal, 1)) < 0.001;
+
+ return ret;
+}
+
+/* { dg-final { scan-assembler "frecpe\\tv\[0-9\]+.2d, v\[0-9\]+.2d" } } */
+/* { dg-final { scan-assembler "frecps\\tv\[0-9\]+.2d, v\[0-9\]+.2d, v\[0-9\]+.2d" } } */
+
+int
+main (int argc, char **argv)
+{
+ if (!test_frecps_float32_t ())
+ abort ();
+ if (!test_frecps_float32x2_t ())
+ abort ();
+ if (!test_frecps_float32x4_t ())
+ abort ();
+ if (!test_frecps_float64_t ())
+ abort ();
+ if (!test_frecps_float64x2_t ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vrecpx.c b/gcc/testsuite/gcc.target/aarch64/vrecpx.c
new file mode 100644
index 0000000000..63097f1d9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vrecpx.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O3 --save-temps" } */
+
+#include <arm_neon.h>
+#include <math.h>
+#include <stdlib.h>
+
+float32_t in_f[] =
+{2.0, 4.0, 8.0, 16.0, 1.0, 0.5, 0.25, 0.125};
+float32_t rec_f[] =
+{1.0, 0.5, 0.25, 0.125, 2.0, 4.0, 8.0, 16.0};
+float64_t in_d[] =
+{2.0, 4.0, 8.0, 16.0, 1.0, 0.5, 0.25, 0.125};
+float32_t rec_d[] =
+{1.0, 0.5, 0.25, 0.125, 2.0, 4.0, 8.0, 16.0};
+
+int
+test_frecpx_float32_t (void)
+{
+ int i = 0;
+ int ret = 1;
+ for (i = 0; i < 8; i++)
+ ret &= fabs (vrecpxs_f32 (in_f[i]) - rec_f[i]) < 0.001;
+
+ return ret;
+}
+
+/* { dg-final { scan-assembler "frecpx\\ts\[0-9\]+, s\[0-9\]+" } } */
+
+int
+test_frecpx_float64_t (void)
+{
+ int i = 0;
+ int ret = 1;
+ for (i = 0; i < 8; i++)
+ ret &= fabs (vrecpxd_f64 (in_d[i]) - rec_d[i]) < 0.001;
+
+ return ret;
+}
+
+/* { dg-final { scan-assembler "frecpx\\td\[0-9\]+, d\[0-9\]+" } } */
+
+int
+main (int argc, char **argv)
+{
+ if (!test_frecpx_float32_t ())
+ abort ();
+ if (!test_frecpx_float64_t ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/vsqrt.c b/gcc/testsuite/gcc.target/aarch64/vsqrt.c
new file mode 100644
index 0000000000..5b777b236d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vsqrt.c
@@ -0,0 +1,72 @@
+
+
+/* { dg-do run } */
+/* { dg-options "-O3" } */
+
+#include "arm_neon.h"
+#include "stdio.h"
+
+extern void abort (void);
+
+void
+test_square_root_v2sf ()
+{
+ const float32_t pool[] = {4.0f, 9.0f};
+ float32x2_t val;
+ float32x2_t res;
+
+ val = vld1_f32 (pool);
+ res = vsqrt_f32 (val);
+
+ if (vget_lane_f32 (res, 0) != 2.0f)
+ abort ();
+ if (vget_lane_f32 (res, 1) != 3.0f)
+ abort ();
+}
+
+void
+test_square_root_v4sf ()
+{
+ const float32_t pool[] = {4.0f, 9.0f, 16.0f, 25.0f};
+ float32x4_t val;
+ float32x4_t res;
+
+ val = vld1q_f32 (pool);
+ res = vsqrtq_f32 (val);
+
+ if (vgetq_lane_f32 (res, 0) != 2.0f)
+ abort ();
+ if (vgetq_lane_f32 (res, 1) != 3.0f)
+ abort ();
+ if (vgetq_lane_f32 (res, 2) != 4.0f)
+ abort ();
+ if (vgetq_lane_f32 (res, 3) != 5.0f)
+ abort ();
+}
+
+void
+test_square_root_v2df ()
+{
+ const float64_t pool[] = {4.0, 9.0};
+ float64x2_t val;
+ float64x2_t res;
+
+ val = vld1q_f64 (pool);
+ res = vsqrtq_f64 (val);
+
+ if (vgetq_lane_f64 (res, 0) != 2.0)
+ abort ();
+
+ if (vgetq_lane_f64 (res, 1) != 3.0)
+ abort ();
+}
+
+int
+main (void)
+{
+ test_square_root_v2sf ();
+ test_square_root_v4sf ();
+ test_square_root_v2df ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/vsub_f64.c b/gcc/testsuite/gcc.target/aarch64/vsub_f64.c
new file mode 100644
index 0000000000..abf4fc42d4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/vsub_f64.c
@@ -0,0 +1,116 @@
+/* Test vsub works correctly. */
+/* { dg-do run } */
+/* { dg-options "--save-temps" } */
+
+#include <arm_neon.h>
+
+#define FLT_EPSILON __FLT_EPSILON__
+#define DBL_EPSILON __DBL_EPSILON__
+
+#define TESTA0 1
+#define TESTA1 0.2223
+#define TESTA2 0
+#define TESTA3 -0.76544
+/* 2^54, double has 53 significand bits
+ according to Double-precision floating-point format. */
+#define TESTA4 18014398509481984
+#define TESTA5 2.0
+
+#define TESTB0 0.66667
+#define TESTB1 2
+#define TESTB2 0
+#define TESTB3 -2
+#define TESTB4 1.0
+#define TESTB5 (1.0 / TESTA4)
+
+#define ANSW0 0.33333
+#define ANSW1 -1.7777
+#define ANSW2 0
+#define ANSW3 1.23456
+#define ANSW4 TESTA4
+#define ANSW5 2.0
+
+extern void abort (void);
+
+#define EPSILON __DBL_EPSILON__
+#define ISNAN(a) __builtin_isnan (a)
+/* FP_equals is implemented like this to execute subtraction
+ exectly once during a single test run. */
+#define FP_equals(a, b, epsilon) \
+( \
+ ((a) == (b)) \
+ || (ISNAN (a) && ISNAN (b)) \
+ || (((a > b) && (a < (b + epsilon))) \
+ || ((b > a) && (b < (a + epsilon)))) \
+)
+
+int
+test_vsub_f64 ()
+{
+ float64x1_t a;
+ float64x1_t b;
+ float64x1_t c;
+
+ a = TESTA0;
+ b = TESTB0;
+ c = ANSW0;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA1;
+ b = TESTB1;
+ c = ANSW1;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA2;
+ b = TESTB2;
+ c = ANSW2;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA3;
+ b = TESTB3;
+ c = ANSW3;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA4;
+ b = TESTB4;
+ c = ANSW4;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ a = TESTA5;
+ b = TESTB5;
+ c = ANSW5;
+
+ a = vsub_f64 (a, b);
+ if (!FP_equals (a, c, EPSILON))
+ return 1;
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "fsub\\td\[0-9\]+, d\[0-9\]+, d\[0-9\]+" 6 } } */
+
+int
+main (int argc, char **argv)
+{
+ if (test_vsub_f64 ())
+ abort ();
+
+ return 0;
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/alpha/alpha.exp b/gcc/testsuite/gcc.target/alpha/alpha.exp
index edd8d68c1e..bd107c8df4 100644
--- a/gcc/testsuite/gcc.target/alpha/alpha.exp
+++ b/gcc/testsuite/gcc.target/alpha/alpha.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/alpha/pr61586.c b/gcc/testsuite/gcc.target/alpha/pr61586.c
new file mode 100644
index 0000000000..afb1af3597
--- /dev/null
+++ b/gcc/testsuite/gcc.target/alpha/pr61586.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mieee" } */
+
+void foo (int *dimensions, double **params, int hh)
+{
+ if (params[hh])
+ ;
+ else if (dimensions[hh] > 0)
+ params[hh][0] = 1.0f;
+}
diff --git a/gcc/testsuite/gcc.target/arc/arc.exp b/gcc/testsuite/gcc.target/arc/arc.exp
new file mode 100644
index 0000000000..ec7c7381ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/arc.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an arc target.
+if ![istarget arc*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c b/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c
new file mode 100644
index 0000000000..a0eb6d70c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/barrel-shifter-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mcpu=ARC601 -mbarrel-shifter" } */
+int i;
+
+int f (void)
+{
+ i >>= 2;
+}
+
+/* { dg-final { scan-assembler "asr_s" } } */
diff --git a/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c b/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c
new file mode 100644
index 0000000000..97998fbf1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/barrel-shifter-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+int i;
+
+int f (void)
+{
+ i >>= 2;
+}
+
+/* { dg-final { scan-assembler "asr_s" } } */
diff --git a/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-1.c b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-1.c
new file mode 100644
index 0000000000..b1990c628e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-1.c
@@ -0,0 +1,16 @@
+/* { dg-do run } */
+/* { dg-options "-O" } */
+
+extern void abort (void);
+
+/* In macros like optimized memset, we want to be able to decide what
+ alignment a passed pointer has. */
+#define f(p) __builtin_arc_aligned (p, 4)
+
+int main (void)
+{
+ int i;
+ if (f (&i) == 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-2.c b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-2.c
new file mode 100644
index 0000000000..d48a915b8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-2.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O" } */
+
+extern void abort (void);
+
+typedef struct {
+ short x;
+} mytype_t;
+
+mytype_t *__attribute__ ((noinline,weak))
+some_func (void)
+{
+ static mytype_t s;
+ return &s;
+};
+
+int main (void)
+{
+ int y, y2;
+ mytype_t *shorter = some_func();
+ y = __builtin_arc_aligned (shorter, 2);
+ if (!y)
+ abort ();
+ y2 = __builtin_arc_aligned (shorter, 4);
+ if (y2)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-3.c b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-3.c
new file mode 100644
index 0000000000..23d80edd47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/builtin_arc_aligned-3.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O" } */
+
+extern void abort (void);
+
+typedef struct {
+ int b, c;
+}
+__attribute__((aligned(32))) inner_t; // data type is 32 byte aligned
+
+typedef struct {
+ inner_t *inner;
+ int a;
+} outer_t;
+
+void __attribute__ ((noinline,weak))
+somefunc (int a, int b, int c)
+{
+ if (!a || !b || c)
+ abort ();
+};
+
+__attribute__ ((noinline,weak))
+outer_t *
+some_alloc_1 ()
+{
+ static outer_t x;
+ return &x;
+}
+
+__attribute__ ((noinline,weak))
+inner_t *
+some_alloc_2 ()
+{
+ static inner_t x;
+ return &x;
+}
+
+int main (void)
+{
+ int y, y2, y3;
+ // @p_out is pointing to instance of outer_t, naturally aligned to 4+4 = 8
+ // and not gauranteed be 32 byte aligned.
+ outer_t *p_out = some_alloc_1( ); // returns 8 byte aligned ptr
+
+ // @ptr is pointing to instance of inner_t which is naturally aligned to 32.
+ // It is assigned to p_out->inner which is of type inner_t thus 32 byte
+ // aligned as well
+ // Note that gcc can deduce p_out->inner is 32b aligned, not at runtime,
+ // because it was assigned @ptr, but even at compile time, because it's data
+ // type is naturally 32 byte aligned.
+ inner_t *ptr = some_alloc_2(); // returns 32 byte aligned ptr
+ p_out->inner = ptr; // this ptr will also be 32 byte aligned
+
+ y = __builtin_arc_aligned(ptr, 32); // this shd return 1
+ y2 = __builtin_arc_aligned(p_out->inner, 32); // this also shd return 1
+ // Although p_out->inner ptr is 32 byte aligned,
+ // it's container &(p_out->inner) need not be.
+ // That is because the hoister has no relation to contents.
+ // p_out is not gauranteed to be 32 byte
+ // aligned, so it's member @inner in p_out need not be.
+ y3 = __builtin_arc_aligned(&(p_out->inner), 32);
+ // compiler not sure, so must return 0
+
+ somefunc(y, y2, y3);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/cond-set-use.c b/gcc/testsuite/gcc.target/arc/cond-set-use.c
new file mode 100644
index 0000000000..aee27251a5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/cond-set-use.c
@@ -0,0 +1,128 @@
+/* { dg-do run } */
+/* { dg-options "-Os" } */
+
+/* Based on gethostbyname_r,
+ * Copyright (C) 2000-2006 Erik Andersen <andersen@uclibc.org>
+ *
+ * Licensed under the LGPL v2.1, see the file COPYING.LIB
+ *
+ * Extraction / wrapping as test by
+ * Joern Rennecke <joern.rennecke@embecosm.com>
+ * Copyright (C) 2013 Free Software Foundation, Inc.
+ */
+
+typedef unsigned size_t;
+typedef int ssize_t;
+typedef unsigned uint32_t;
+struct resolv_answer {
+ char *dotted;
+ int atype;
+ int aclass;
+ int ttl;
+ int rdlength;
+ const unsigned char *rdata;
+ int rdoffset;
+ char* buf;
+ size_t buflen;
+ size_t add_count;
+};
+struct hostent
+{
+ char *h_name;
+ char **h_aliases;
+ int h_addrtype;
+ int h_length;
+ char **h_addr_list;
+};
+
+int *__attribute__ ((noinline,weak)) nop (void * p) { return p; };
+void __attribute__ ((noinline,weak)) seta (struct resolv_answer * p)
+{ p->atype = 1;}
+
+int ghostbyname_r(
+ struct hostent *result_buf,
+ char *buf,
+ size_t buflen,
+ struct hostent **result,
+ int *h_errnop)
+{
+ char **addr_list;
+ char **alias;
+ char *alias0;
+ int i0;
+ struct resolv_answer a;
+ int i;
+
+ *result = ((void *)0);
+
+ *h_errnop = -1;
+
+ if ((ssize_t)buflen <= 5)
+ return 34;
+
+ alias = (char **)buf;
+ addr_list = (char **)buf;
+
+ /* This got turned into branch with conditional move in delay slot. */
+ if ((ssize_t)buflen < 256)
+ return 34;
+
+
+ {
+ if (!nop(&i0)) {
+ result_buf->h_aliases = alias;
+ result_buf->h_addrtype = 2;
+ result_buf->h_length = 4;
+ result_buf->h_addr_list = addr_list;
+ *result = result_buf;
+ *h_errnop = 0;
+ return 0;
+ }
+ }
+
+
+ seta (&a);
+
+ if (a.atype == 1) {
+
+ int need_bytes = sizeof(addr_list[0]) * (a.add_count + 1 + 1);
+
+ int ips_len = a.add_count * a.rdlength;
+
+ buflen -= (need_bytes + ips_len);
+ if ((ssize_t)buflen < 0) {
+ i = 34;
+ goto free_and_ret;
+ }
+
+ result_buf->h_addrtype = 2;
+ *result = result_buf;
+ *h_errnop = 0;
+ i = 0;
+ goto free_and_ret;
+ }
+
+ /* For cse, the 1 was is loaded into a call-saved register;
+ the load was hoisted into a delay slot before the conditional load,
+ clobbering result_buf, which (conditionally) lived in the same
+ call-saved register, because mark_referenced_resources considered the
+ destination of the COND_EXEC only clobbered, but not used. */
+ *h_errnop = 1;
+ *nop(&i0) = 1;
+ i = 2;
+
+ free_and_ret:
+ nop (&i0);
+ return i;
+}
+
+int
+main ()
+{
+ struct hostent buf, *res;
+ int i;
+ char c;
+ ghostbyname_r (&buf, &c, 1024, &res, &i);
+ ghostbyname_r (&buf, 0, 1024, &res, &i);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arc/interrupt-1.c b/gcc/testsuite/gcc.target/arc/interrupt-1.c
new file mode 100644
index 0000000000..70514572ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/interrupt-1.c
@@ -0,0 +1,5 @@
+void __attribute__ ((interrupt("ilink1")))
+handler1 (void)
+{
+}
+/* { dg-final { scan-assembler-times "j.*\[ilink1\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arc/interrupt-2.c b/gcc/testsuite/gcc.target/arc/interrupt-2.c
new file mode 100644
index 0000000000..ee8593b303
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/interrupt-2.c
@@ -0,0 +1,5 @@
+void __attribute__ ((interrupt("ilink2")))
+handler1 (void)
+{
+}
+/* { dg-final { scan-assembler-times "j.*\[ilink2\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arc/interrupt-3.c b/gcc/testsuite/gcc.target/arc/interrupt-3.c
new file mode 100644
index 0000000000..fa598d67e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/interrupt-3.c
@@ -0,0 +1,14 @@
+void __attribute__ ((interrupt))
+handler0 (void)
+{ /* { dg-error "wrong number of arguments specified" } */
+}
+
+void __attribute__ ((interrupt("you load too")))
+handler1 (void)
+{ /* { dg-warning "is not \"ilink1\" or \"ilink2\"" } */
+}
+
+void __attribute__ ((interrupt(42)))
+hander2 (void)
+{ /* { dg-warning "is not a string constant" } */
+}
diff --git a/gcc/testsuite/gcc.target/arc/jump-around-jump.c b/gcc/testsuite/gcc.target/arc/jump-around-jump.c
new file mode 100644
index 0000000000..1b45328365
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/jump-around-jump.c
@@ -0,0 +1,123 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mlock -mswape -mrtsc -fno-reorder-blocks" } */
+
+/* This caused an ICE in arc_ifcvt when the 1->3 state change was not
+ implemented for TYPE_UNCOND_BRANCH in arc_ccfsm_post_advance. */
+
+typedef long __kernel_long_t;
+typedef __kernel_long_t __kernel_time_t;
+
+struct timespec {
+ __kernel_time_t tv_sec;
+ long tv_nsec;
+};
+
+
+struct module;
+struct device {
+ struct device *parent;
+};
+
+struct rtc_time {
+ int tm_sec;
+ int tm_min;
+ int tm_hour;
+ int tm_mday;
+ int tm_mon;
+ int tm_year;
+ int tm_wday;
+ int tm_yday;
+ int tm_isdst;
+};
+struct rtc_wkalrm {
+ unsigned char enabled;
+ unsigned char pending;
+ struct rtc_time time;
+};
+
+struct rtc_class_ops {
+ int (*open)(struct device *);
+ void (*release)(struct device *);
+ int (*ioctl)(struct device *, unsigned int, unsigned long);
+ int (*read_time)(struct device *, struct rtc_time *);
+ int (*set_time)(struct device *, struct rtc_time *);
+ int (*read_alarm)(struct device *, struct rtc_wkalrm *);
+ int (*set_alarm)(struct device *, struct rtc_wkalrm *);
+ //int (*proc)(struct device *, struct seq_file *);
+ int (*set_mmss)(struct device *, unsigned long secs);
+ int (*read_callback)(struct device *, int data);
+ int (*alarm_irq_enable)(struct device *, unsigned int enabled);
+};
+
+struct rtc_device
+{
+ struct device dev;
+ struct module *owner;
+
+ int id;
+ char name[20];
+
+ const struct rtc_class_ops *ops;
+ // struct mutex ops_lock;
+
+ // struct cdev char_dev;
+ unsigned long flags;
+
+ unsigned long irq_data;
+ //spinlock_t irq_lock;
+ //wait_queue_head_t irq_queue;
+ //struct fasync_struct *async_queue;
+
+ //struct rtc_task *irq_task;
+ //spinlock_t irq_task_lock;
+ int irq_freq;
+ int max_user_freq;
+
+ //struct timerqueue_head timerqueue;
+ //struct rtc_timer aie_timer;
+ //struct rtc_timer uie_rtctimer;
+ //struct hrtimer pie_timer;
+ int pie_enabled;
+ //struct work_struct irqwork;
+
+ int uie_unsupported;
+
+
+ //struct work_struct uie_task;
+ //struct timer_list uie_timer;
+
+ unsigned int oldsecs;
+ unsigned int uie_irq_active:1;
+ unsigned int stop_uie_polling:1;
+ unsigned int uie_task_active:1;
+ unsigned int uie_timer_active:1;
+
+};
+
+extern void rtc_time_to_tm(unsigned long time, struct rtc_time *tm);
+extern struct rtc_device *rtc_class_open(const char *name);
+extern void rtc_class_close(struct rtc_device *rtc);
+
+
+int rtc_set_ntp_time(struct timespec now)
+{
+ struct rtc_device *rtc;
+ struct rtc_time tm;
+ int err = -19;
+
+ if (now.tv_nsec < (1000000000L >> 1))
+ rtc_time_to_tm(now.tv_sec, &tm);
+ else
+ rtc_time_to_tm(now.tv_sec + 1, &tm);
+
+ rtc = rtc_class_open("rtc0");
+ if (rtc) {
+
+
+ if (rtc->ops && (rtc->ops->set_time || rtc->ops->set_mmss))
+ err = rtc_set_time(rtc, &tm);
+ rtc_class_close(rtc);
+ }
+
+ return err;
+}
diff --git a/gcc/testsuite/gcc.target/arc/long-calls.c b/gcc/testsuite/gcc.target/arc/long-calls.c
new file mode 100644
index 0000000000..63fafbcc67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/long-calls.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-calls" } */
+
+int g (void);
+
+int f (void)
+{
+ g();
+}
+
+/* { dg-final { scan-assembler "j @g" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mA6.c b/gcc/testsuite/gcc.target/arc/mA6.c
new file mode 100644
index 0000000000..2e15a86f8a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mA6.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mA6" } */
+
+/* { dg-final { scan-assembler ".cpu ARC600" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mA7.c b/gcc/testsuite/gcc.target/arc/mA7.c
new file mode 100644
index 0000000000..c4430f43b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mA7.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mA7" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mARC600.c b/gcc/testsuite/gcc.target/arc/mARC600.c
new file mode 100644
index 0000000000..20e086aa75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mARC600.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mARC600" } */
+
+/* { dg-final { scan-assembler ".cpu ARC600" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mARC601.c b/gcc/testsuite/gcc.target/arc/mARC601.c
new file mode 100644
index 0000000000..1d30da4caf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mARC601.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mARC601" } */
+
+/* { dg-final { scan-assembler ".cpu ARC601" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mARC700.c b/gcc/testsuite/gcc.target/arc/mARC700.c
new file mode 100644
index 0000000000..43e9baa3f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mARC700.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mARC700" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc600.c b/gcc/testsuite/gcc.target/arc/mcpu-arc600.c
new file mode 100644
index 0000000000..4c915fda0e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mcpu-arc600.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=ARC600" } */
+
+/* { dg-final { scan-assembler ".cpu ARC600" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc601.c b/gcc/testsuite/gcc.target/arc/mcpu-arc601.c
new file mode 100644
index 0000000000..7c93c9dc4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mcpu-arc601.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=ARC601" } */
+
+/* { dg-final { scan-assembler ".cpu ARC601" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mcpu-arc700.c b/gcc/testsuite/gcc.target/arc/mcpu-arc700.c
new file mode 100644
index 0000000000..c805a5af76
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mcpu-arc700.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=ARC700" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mcrc.c b/gcc/testsuite/gcc.target/arc/mcrc.c
new file mode 100644
index 0000000000..d3780bb00d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mcrc.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mcrc" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mdpfp.c b/gcc/testsuite/gcc.target/arc/mdpfp.c
new file mode 100644
index 0000000000..4bbc9057b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mdpfp.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdpfp" } */
+
+double i;
+
+int f (void)
+{
+ i *= 2.0;
+}
+
+/* { dg-final { scan-assembler "daddh" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mdsp-packa.c b/gcc/testsuite/gcc.target/arc/mdsp-packa.c
new file mode 100644
index 0000000000..f013a6dd1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mdsp-packa.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mdsp-packa" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mdvbf.c b/gcc/testsuite/gcc.target/arc/mdvbf.c
new file mode 100644
index 0000000000..e2e545e8bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mdvbf.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mdvbf" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mlock.c b/gcc/testsuite/gcc.target/arc/mlock.c
new file mode 100644
index 0000000000..3a8b050c30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mlock.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mlock" } */
+/* { dg-do assemble } */
+
+int f (void *p)
+{
+ int i;
+
+ __asm__("llock %0, [%1]\n\t"
+ "scond %0, [%1]" : "=&r"(i) : "r"(p));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mmac-24.c b/gcc/testsuite/gcc.target/arc/mmac-24.c
new file mode 100644
index 0000000000..30cb6981a0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mmac-24.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mmac-24" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mmac-d16.c b/gcc/testsuite/gcc.target/arc/mmac-d16.c
new file mode 100644
index 0000000000..0570011fd2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mmac-d16.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mmac-d16" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-crc.c b/gcc/testsuite/gcc.target/arc/mno-crc.c
new file mode 100644
index 0000000000..70ab9c1176
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-crc.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-crc" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("crc %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c b/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c
new file mode 100644
index 0000000000..eb21522af0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-dsp-packa.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-dsp-packa" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("minidl %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-dvbf.c b/gcc/testsuite/gcc.target/arc/mno-dvbf.c
new file mode 100644
index 0000000000..ea96d987c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-dvbf.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-dvbf" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("vbfdw %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-lock.c b/gcc/testsuite/gcc.target/arc/mno-lock.c
new file mode 100644
index 0000000000..62ac885ba9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-lock.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-lock" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (void *p)
+{
+ int i;
+
+ __asm__("llock %0, [%1]\n\t"
+ "scond %0, [%1]" : "=&r"(i) : "r"(p));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-mac-24.c b/gcc/testsuite/gcc.target/arc/mno-mac-24.c
new file mode 100644
index 0000000000..b4839579b1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-mac-24.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-mac-24" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("mult %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-mac-d16.c b/gcc/testsuite/gcc.target/arc/mno-mac-d16.c
new file mode 100644
index 0000000000..68a20f4f55
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-mac-d16.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-mac-d16" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("muldw %1, %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-rtsc.c b/gcc/testsuite/gcc.target/arc/mno-rtsc.c
new file mode 100644
index 0000000000..d74a60e935
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-rtsc.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-rtsc" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-swape.c b/gcc/testsuite/gcc.target/arc/mno-swape.c
new file mode 100644
index 0000000000..c853ab4bdc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-swape.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-swape" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+int f (int i)
+{
+ __asm__("swape %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mno-xy.c b/gcc/testsuite/gcc.target/arc/mno-xy.c
new file mode 100644
index 0000000000..e378b3fc9b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mno-xy.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-xy" } */
+/* Would also like to assemble and check that we get the expected
+ "Error: bad instruction" assembler messages, but at the moment our
+ testharness can't do that. */
+
+void f (int i)
+{
+ __asm__("add x0_u0, x0_u0, %0" : : "r" (i));
+}
diff --git a/gcc/testsuite/gcc.target/arc/mrtsc.c b/gcc/testsuite/gcc.target/arc/mrtsc.c
new file mode 100644
index 0000000000..31852a5e47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mrtsc.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtsc" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("rtsc %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mspfp.c b/gcc/testsuite/gcc.target/arc/mspfp.c
new file mode 100644
index 0000000000..0e41ff89d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mspfp.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mspfp" } */
+
+float i;
+
+int f (void)
+{
+ i *= 2.0;
+}
+
+/* { dg-final { scan-assembler "fadd" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mswape.c b/gcc/testsuite/gcc.target/arc/mswape.c
new file mode 100644
index 0000000000..692e6a2bb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mswape.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mswape" } */
+/* { dg-do assemble } */
+
+int f (int i)
+{
+ __asm__("swape %1, %1" : "=r"(i) : "r"(i));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC600.c b/gcc/testsuite/gcc.target/arc/mtune-ARC600.c
new file mode 100644
index 0000000000..a483d1435c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC600.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC600" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC601.c b/gcc/testsuite/gcc.target/arc/mtune-ARC601.c
new file mode 100644
index 0000000000..ed57bd7092
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC601.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC601" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC700-xmac b/gcc/testsuite/gcc.target/arc/mtune-ARC700-xmac
new file mode 100644
index 0000000000..2f1e137be4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC700-xmac
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC700-xmac" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC700.c b/gcc/testsuite/gcc.target/arc/mtune-ARC700.c
new file mode 100644
index 0000000000..851ea7305e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC700.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC700" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC725D.c b/gcc/testsuite/gcc.target/arc/mtune-ARC725D.c
new file mode 100644
index 0000000000..e2aa484629
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC725D.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC725D" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mtune-ARC750D.c b/gcc/testsuite/gcc.target/arc/mtune-ARC750D.c
new file mode 100644
index 0000000000..20923300ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mtune-ARC750D.c
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-mtune=ARC750D" } */
+
+/* { dg-final { scan-assembler ".cpu ARC700" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mul64.c b/gcc/testsuite/gcc.target/arc/mul64.c
new file mode 100644
index 0000000000..3678b2799d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mul64.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mcpu=ARC600 -mmul64" } */
+#include <stdint.h>
+
+int64_t i;
+int j, k;
+
+int f (void)
+{
+ i = j * k;
+}
+
+/* { dg-final { scan-assembler "mul64" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c
new file mode 100644
index 0000000000..398ecfe948
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-1.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mARC700 --save-temps" } */
+
+#include <stdlib.h>
+
+/* Hide value propagation from the optimizers. */
+static int
+id (int i)
+{
+ asm ("": "+Xr" (i));
+ return i;
+}
+
+static int
+mulhigh (unsigned a, unsigned b)
+{
+ return (unsigned long long) a * b >> 32;
+}
+
+int
+main (void)
+{
+ if (mulhigh (id (0x12345678), id (0x90abcdef)) != 0xa49a83e)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "mpyhu\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
new file mode 100644
index 0000000000..ccc74e7b1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mulsi3_highpart-2.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mARC700 --save-temps -mno-mpy" } */
+
+#include <stdlib.h>
+
+/* Hide value propagation from the optimizers. */
+static int
+id (int i)
+{
+ asm ("": "+Xr" (i));
+ return i;
+}
+
+static int
+mulhigh (unsigned a, unsigned b)
+{
+ return (unsigned long long) a * b >> 32;
+}
+
+int
+main (void)
+{
+ if (mulhigh (id (0x12345678), id (0x90abcdef)) != 0xa49a83e)
+ abort ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "mpyhu\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "@__muldi3" } } */
+/* { dg-final { scan-assembler "@__umulsi3_highpart" } } */
diff --git a/gcc/testsuite/gcc.target/arc/mxy.c b/gcc/testsuite/gcc.target/arc/mxy.c
new file mode 100644
index 0000000000..1ecc34d2bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/mxy.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-mxy" } */
+/* { dg-do assemble } */
+
+void f (int i)
+{
+ __asm__("add x0_u0, x0_u0, %0" : : "r" (i));
+}
diff --git a/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c b/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c
new file mode 100644
index 0000000000..e4e23e4a40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/no-dpfp-lrsr.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mdpfp -mno-dpfp-lrsr" } */
+
+double i;
+
+int f (void)
+{
+ i *= 2.0;
+}
+
+/* { dg-final { scan-assembler-not "\tlr" } } */
diff --git a/gcc/testsuite/gcc.target/arc/nv-cache.c b/gcc/testsuite/gcc.target/arc/nv-cache.c
new file mode 100644
index 0000000000..9687195981
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/nv-cache.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-volatile-cache" } */
+
+volatile int i;
+void f (void)
+{
+ i = 0;
+}
+/* { dg-final { scan-assembler "st\.di" } } */
diff --git a/gcc/testsuite/gcc.target/arc/sdata-1.c b/gcc/testsuite/gcc.target/arc/sdata-1.c
new file mode 100644
index 0000000000..3d8366c156
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/sdata-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msdata" } */
+
+int i;
+
+int f (void)
+{
+ return i;
+}
+/* { dg-final { scan-assembler "@sda" } } */
diff --git a/gcc/testsuite/gcc.target/arc/sdata-2.c b/gcc/testsuite/gcc.target/arc/sdata-2.c
new file mode 100644
index 0000000000..ebaa25e726
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/sdata-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-sdata" } */
+
+int i;
+
+int f (void)
+{
+ return i;
+}
+/* { dg-final { scan-assembler-not "@sda" } } */
diff --git a/gcc/testsuite/gcc.target/arc/v-cache.c b/gcc/testsuite/gcc.target/arc/v-cache.c
new file mode 100644
index 0000000000..7722c43358
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arc/v-cache.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mvolatile-cache" } */
+
+volatile int i;
+void f (void)
+{
+ i = 0;
+}
+/* { dg-final { scan-assembler-not "st\.di" } } */
diff --git a/gcc/testsuite/gcc.target/arm/20131120.c b/gcc/testsuite/gcc.target/arm/20131120.c
new file mode 100644
index 0000000000..c370ae60cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/20131120.c
@@ -0,0 +1,14 @@
+/* Check that CONST_INT is not forced into REG before PLUS. */
+/* { dg-do compile { target { arm_arm_ok || arm_thumb2_ok} } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+typedef int Arr2[50][50];
+
+void
+foo (Arr2 a2, int i)
+{
+ a2[i+20][i] = 1;
+}
+
+/* { dg-final { scan-rtl-dump-not "\\\(set \\\(reg:SI \[0-9\]*\\\)\[\n\r\]+\[ \t]*\\\(const_int 4000" "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp b/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp
index fcc4333464..746429dadf 100644
--- a/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp
+++ b/gcc/testsuite/gcc.target/arm/aapcs/aapcs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/arm/acle/acle.exp b/gcc/testsuite/gcc.target/arm/acle/acle.exp
new file mode 100644
index 0000000000..c8622697ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/acle.exp
@@ -0,0 +1,35 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't an ARM target.
+if ![istarget arm*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
+ "" ""
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32b.c b/gcc/testsuite/gcc.target/arm/acle/crc32b.c
new file mode 100644
index 0000000000..d6f35e9fd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32b.c
@@ -0,0 +1,20 @@
+/* Test the crc32b ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32b (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint8_t arg1_uint8_t;
+
+ out_uint32_t = __crc32b (arg0_uint32_t, arg1_uint8_t);
+}
+
+/* { dg-final { scan-assembler "crc32b\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32cb.c b/gcc/testsuite/gcc.target/arm/acle/crc32cb.c
new file mode 100644
index 0000000000..44aea21fcf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32cb.c
@@ -0,0 +1,20 @@
+/* Test the crc32cb ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32cb (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint8_t arg1_uint8_t;
+
+ out_uint32_t = __crc32cb (arg0_uint32_t, arg1_uint8_t);
+}
+
+/* { dg-final { scan-assembler "crc32cb\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32cd.c b/gcc/testsuite/gcc.target/arm/acle/crc32cd.c
new file mode 100644
index 0000000000..cb7ee0df0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32cd.c
@@ -0,0 +1,20 @@
+/* Test the crc32cd ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32cd (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint64_t arg1_uint64_t;
+
+ out_uint32_t = __crc32cd (arg0_uint32_t, arg1_uint64_t);
+}
+
+/* { dg-final { scan-assembler-times "crc32cw\t...?, ...?, ...?\n" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32ch.c b/gcc/testsuite/gcc.target/arm/acle/crc32ch.c
new file mode 100644
index 0000000000..d8e7338943
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32ch.c
@@ -0,0 +1,20 @@
+/* Test the crc32ch ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32ch (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint16_t arg1_uint16_t;
+
+ out_uint32_t = __crc32ch (arg0_uint32_t, arg1_uint16_t);
+}
+
+/* { dg-final { scan-assembler "crc32ch\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32cw.c b/gcc/testsuite/gcc.target/arm/acle/crc32cw.c
new file mode 100644
index 0000000000..84384c5d54
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32cw.c
@@ -0,0 +1,20 @@
+/* Test the crc32cw ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32cw (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint32_t arg1_uint32_t;
+
+ out_uint32_t = __crc32cw (arg0_uint32_t, arg1_uint32_t);
+}
+
+/* { dg-final { scan-assembler "crc32cw\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32d.c b/gcc/testsuite/gcc.target/arm/acle/crc32d.c
new file mode 100644
index 0000000000..c90fad9a7a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32d.c
@@ -0,0 +1,20 @@
+/* Test the crc32d ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32d (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint64_t arg1_uint64_t;
+
+ out_uint32_t = __crc32d (arg0_uint32_t, arg1_uint64_t);
+}
+
+/* { dg-final { scan-assembler-times "crc32w\t...?, ...?, ...?\n" 2 } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32h.c b/gcc/testsuite/gcc.target/arm/acle/crc32h.c
new file mode 100644
index 0000000000..c21a4ae3e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32h.c
@@ -0,0 +1,20 @@
+/* Test the crc32h ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32h (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint16_t arg1_uint16_t;
+
+ out_uint32_t = __crc32h (arg0_uint32_t, arg1_uint16_t);
+}
+
+/* { dg-final { scan-assembler "crc32h\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/acle/crc32w.c b/gcc/testsuite/gcc.target/arm/acle/crc32w.c
new file mode 100644
index 0000000000..60cd09e4be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/acle/crc32w.c
@@ -0,0 +1,20 @@
+/* Test the crc32w ACLE intrinsic. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crc_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crc } */
+
+#include "arm_acle.h"
+
+void test_crc32w (void)
+{
+ uint32_t out_uint32_t;
+ uint32_t arg0_uint32_t;
+ uint32_t arg1_uint32_t;
+
+ out_uint32_t = __crc32w (arg0_uint32_t, arg1_uint32_t);
+}
+
+/* { dg-final { scan-assembler "crc32w\t...?, ...?, ...?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/anddi3-opt.c b/gcc/testsuite/gcc.target/arm/anddi3-opt.c
new file mode 100644
index 0000000000..cd0d083863
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/anddi3-opt.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+unsigned long long
+muld (unsigned long long X, unsigned long long Y)
+{
+ unsigned long long mask = 0xffffffffull;
+ return (X & mask) * (Y & mask);
+}
+
+/* { dg-final { scan-assembler-not "and\[\\t \]+.+,\[\\t \]*.+,\[\\t \]*.+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/anddi3-opt2.c b/gcc/testsuite/gcc.target/arm/anddi3-opt2.c
new file mode 100644
index 0000000000..efe71f42ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/anddi3-opt2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+long long muld(long long X, long long Y)
+{
+ return X & ~1;
+}
+
+/* { dg-final { scan-assembler-not "and\[\\t \]+.+,\[\\t \]*.+,\[\\t \]*.+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/arm.exp b/gcc/testsuite/gcc.target/arm/arm.exp
index dc6c16ad52..54ff2370ab 100644
--- a/gcc/testsuite/gcc.target/arm/arm.exp
+++ b/gcc/testsuite/gcc.target/arm/arm.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,6 +43,5 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
"" $DEFAULT_CFLAGS
# All done.
-dg-finish
-
set dg_runtest_extra_prunes ""
+dg-finish
diff --git a/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c b/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c
new file mode 100644
index 0000000000..ea6fdd96db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-comp-swap-release-acquire.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-comp-swap-release-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex" 4 } } */
+/* { dg-final { scan-assembler-times "stlex" 4 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c b/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c
new file mode 100644
index 0000000000..ccfa31c34e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-acq_rel.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-acq_rel.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-acquire.c b/gcc/testsuite/gcc.target/arm/atomic-op-acquire.c
new file mode 100644
index 0000000000..52bcf99e83
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-acquire.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-acquire.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-char.c b/gcc/testsuite/gcc.target/arm/atomic-op-char.c
new file mode 100644
index 0000000000..0c30922dba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-char.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-char.x"
+
+/* { dg-final { scan-assembler-times "ldrexb\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexb\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-consume.c b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
new file mode 100644
index 0000000000..0354717cb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-consume.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-consume.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-int.c b/gcc/testsuite/gcc.target/arm/atomic-op-int.c
new file mode 100644
index 0000000000..7716994f0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-int.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-int.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c b/gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c
new file mode 100644
index 0000000000..4b72fd95bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-relaxed.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-relaxed.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-release.c b/gcc/testsuite/gcc.target/arm/atomic-op-release.c
new file mode 100644
index 0000000000..8582e4f1d9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-release.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-release.x"
+
+/* { dg-final { scan-assembler-times "ldrex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c b/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c
new file mode 100644
index 0000000000..70b5b9ebb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-seq_cst.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-seq_cst.x"
+
+/* { dg-final { scan-assembler-times "ldaex\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "stlex\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/atomic-op-short.c b/gcc/testsuite/gcc.target/arm/atomic-op-short.c
new file mode 100644
index 0000000000..a6f5a6df61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/atomic-op-short.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arch_v8a_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#include "../aarch64/atomic-op-short.x"
+
+/* { dg-final { scan-assembler-times "ldrexh\tr\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-times "strexh\t...?, r\[0-9\]+, \\\[r\[0-9\]+\\\]" 6 } } */
+/* { dg-final { scan-assembler-not "dmb" } } */
diff --git a/gcc/testsuite/gcc.target/arm/builtin-bswap-1.c b/gcc/testsuite/gcc.target/arm/builtin-bswap-1.c
new file mode 100644
index 0000000000..43195bd823
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/builtin-bswap-1.c
@@ -0,0 +1,81 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
+/* { dg-add-options arm_arch_v6 } */
+/* { dg-final { scan-assembler-not "orr\[ \t\]" } } */
+/* { dg-final { scan-assembler-times "revsh\\t" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "revshne\\t" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "revsh\\t" 2 { target { ! arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "rev16\\t" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "rev16ne\\t" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "rev16\\t" 2 { target { ! arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "rev\\t" 2 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "revne\\t" 2 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "rev\\t" 4 { target { ! arm_nothumb } } } } */
+
+/* revsh */
+short swaps16 (short x)
+{
+ return __builtin_bswap16 (x);
+}
+
+extern short foos16 (short);
+
+/* revshne */
+short swaps16_cond (short x, int y)
+{
+ short z = x;
+ if (y)
+ z = __builtin_bswap16 (x);
+ return foos16 (z);
+}
+
+/* rev16 */
+unsigned short swapu16 (unsigned short x)
+{
+ return __builtin_bswap16 (x);
+}
+
+extern unsigned short foou16 (unsigned short);
+
+/* rev16ne */
+unsigned short swapu16_cond (unsigned short x, int y)
+{
+ unsigned short z = x;
+ if (y)
+ z = __builtin_bswap16 (x);
+ return foou16 (z);
+}
+
+/* rev */
+int swaps32 (int x) {
+ return __builtin_bswap32 (x);
+}
+
+extern int foos32 (int);
+
+/* revne */
+int swaps32_cond (int x, int y)
+{
+ int z = x;
+ if (y)
+ z = __builtin_bswap32 (x);
+ return foos32 (z);
+}
+
+/* rev */
+unsigned int swapu32 (unsigned int x)
+{
+ return __builtin_bswap32 (x);
+}
+
+extern unsigned int foou32 (unsigned int);
+
+/* revne */
+unsigned int swapsu2 (unsigned int x, int y)
+{
+ int z = x;
+ if (y)
+ z = __builtin_bswap32 (x);
+ return foou32 (z);
+}
diff --git a/gcc/testsuite/gcc.target/arm/builtin-bswap16-1.c b/gcc/testsuite/gcc.target/arm/builtin-bswap16-1.c
new file mode 100644
index 0000000000..6920f004ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/builtin-bswap16-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
+/* { dg-add-options arm_arch_v6 } */
+/* { dg-final { scan-assembler-not "orr\[ \t\]" } } */
+
+unsigned short swapu16_1 (unsigned short x)
+{
+ return (x << 8) | (x >> 8);
+}
+
+unsigned short swapu16_2 (unsigned short x)
+{
+ return (x >> 8) | (x << 8);
+}
diff --git a/gcc/testsuite/gcc.target/arm/builtin-trap.c b/gcc/testsuite/gcc.target/arm/builtin-trap.c
new file mode 100644
index 0000000000..4ff8d253e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/builtin-trap.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm32 } */
+
+void
+trap ()
+{
+ __builtin_trap ();
+}
+
+/* { dg-final { scan-assembler "0xe7f000f0" { target { arm_nothumb } } } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vaesdq_u8.c b/gcc/testsuite/gcc.target/arm/crypto-vaesdq_u8.c
new file mode 100644
index 0000000000..e0b25b93cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vaesdq_u8.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint8x16_t a, b, c;
+ int i = 0;
+
+ for (i = 0; i < 16; ++i)
+ {
+ a[i] = i;
+ b[i] = 15 - i;
+ }
+ c = vaesdq_u8 (a, b);
+ return c[0];
+}
+
+/* { dg-final { scan-assembler "aesd.8\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vaeseq_u8.c b/gcc/testsuite/gcc.target/arm/crypto-vaeseq_u8.c
new file mode 100644
index 0000000000..f47864662e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vaeseq_u8.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint8x16_t a, b, c;
+ int i = 0;
+
+ for (i = 0; i < 16; ++i)
+ {
+ a[i] = i;
+ b[i] = 15 - i;
+ }
+ c = vaeseq_u8 (a, b);
+ return c[0];
+}
+
+/* { dg-final { scan-assembler "aese.8\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vaesimcq_u8.c b/gcc/testsuite/gcc.target/arm/crypto-vaesimcq_u8.c
new file mode 100644
index 0000000000..fbbfda609f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vaesimcq_u8.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint8x16_t a, b;
+ int i = 0;
+
+ for (i = 0; i < 16; ++i)
+ a[i] = i;
+
+ b = vaesimcq_u8 (a);
+ return b[0];
+}
+
+/* { dg-final { scan-assembler "aesimc.8\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vaesmcq_u8.c b/gcc/testsuite/gcc.target/arm/crypto-vaesmcq_u8.c
new file mode 100644
index 0000000000..cae8bd096b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vaesmcq_u8.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint8x16_t a, b;
+ int i = 0;
+
+ for (i = 0; i < 16; ++i)
+ a[i] = i;
+
+ b = vaesmcq_u8 (a);
+ return b[0];
+}
+
+/* { dg-final { scan-assembler "aesmc.8\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vldrq_p128.c b/gcc/testsuite/gcc.target/arm/crypto-vldrq_p128.c
new file mode 100644
index 0000000000..96c0e9a755
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vldrq_p128.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+poly128_t
+foo (poly128_t* ptr)
+{
+ return vldrq_p128 (ptr);
+}
+
+/* { dg-final { scan-assembler "vld1.64\t{d\[0-9\]+-d\[0-9\]+}.*" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vmull_high_p64.c b/gcc/testsuite/gcc.target/arm/crypto-vmull_high_p64.c
new file mode 100644
index 0000000000..1290f31a6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vmull_high_p64.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+poly128_t
+foo (void)
+{
+ poly64x2_t a = { 0xdeadbeef, 0xadabcaca };
+ poly64x2_t b = { 0xdcdcdcdc, 0xbdbdbdbd };
+ return vmull_high_p64 (a, b);
+}
+
+/* { dg-final { scan-assembler "vmull.p64.*" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vmullp64.c b/gcc/testsuite/gcc.target/arm/crypto-vmullp64.c
new file mode 100644
index 0000000000..b788dca52f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vmullp64.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+poly128_t
+foo (void)
+{
+ poly64_t a = 0xdeadbeef;
+ poly64_t b = 0xadadadad;
+ return vmull_p64 (a, b);
+}
+
+/* { dg-final { scan-assembler "vmull.p64.*" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1cq_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1cq_u32.c
new file mode 100644
index 0000000000..4dc9dee661
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1cq_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32_t hash = 0xdeadbeef;
+ uint32x4_t a = {0, 1, 2, 3};
+ uint32x4_t b = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha1cq_u32 (a, hash, b);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha1c.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1h_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1h_u32.c
new file mode 100644
index 0000000000..dee2774852
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1h_u32.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32_t val = 0xdeadbeef;
+ return vsha1h_u32 (val);
+}
+
+/* { dg-final { scan-assembler "sha1h.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1mq_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1mq_u32.c
new file mode 100644
index 0000000000..672b93a974
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1mq_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32_t hash = 0xdeadbeef;
+ uint32x4_t a = {0, 1, 2, 3};
+ uint32x4_t b = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha1mq_u32 (a, hash, b);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha1m.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1pq_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1pq_u32.c
new file mode 100644
index 0000000000..ff508e0dc7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1pq_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32_t hash = 0xdeadbeef;
+ uint32x4_t a = {0, 1, 2, 3};
+ uint32x4_t b = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha1pq_u32 (a, hash, b);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha1p.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1su0q_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1su0q_u32.c
new file mode 100644
index 0000000000..4435d1800b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1su0q_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+ uint32x4_t c = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha1su0q_u32 (a, b, c);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha1su0.32\tq\[0-9\]+, q\[0-9\]+, q\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha1su1q_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha1su1q_u32.c
new file mode 100644
index 0000000000..8610c4de26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha1su1q_u32.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+
+ uint32x4_t res = vsha1su1q_u32 (a, b);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha1su1.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha256h2q_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha256h2q_u32.c
new file mode 100644
index 0000000000..4a3e2e1583
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha256h2q_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+ uint32x4_t c = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha256h2q_u32 (a, b, c);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha256h2.32\tq\[0-9\]+, q\[0-9\]+, q\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha256hq_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha256hq_u32.c
new file mode 100644
index 0000000000..49577f2b72
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha256hq_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+ uint32x4_t c = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha256hq_u32 (a, b, c);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha256h.32\tq\[0-9\]+, q\[0-9\]+, q\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha256su0q_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha256su0q_u32.c
new file mode 100644
index 0000000000..cc4305d38b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha256su0q_u32.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+
+ uint32x4_t res = vsha256su0q_u32 (a, b);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha256su0.32\tq\[0-9\]+, q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vsha256su1q_u32.c b/gcc/testsuite/gcc.target/arm/crypto-vsha256su1q_u32.c
new file mode 100644
index 0000000000..430f38adc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vsha256su1q_u32.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+int
+foo (void)
+{
+ uint32x4_t a = {0xd, 0xe, 0xa, 0xd};
+ uint32x4_t b = {0, 1, 2, 3};
+ uint32x4_t c = {3, 2, 1, 0};
+
+ uint32x4_t res = vsha256su1q_u32 (a, b, c);
+ return res[0];
+}
+
+/* { dg-final { scan-assembler "sha256su1.32\tq\[0-9\]+, q\[0-9\]+, q\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/arm/crypto-vstrq_p128.c b/gcc/testsuite/gcc.target/arm/crypto-vstrq_p128.c
new file mode 100644
index 0000000000..acd8af34f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/crypto-vstrq_p128.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void
+foo (poly128_t* ptr, poly128_t val)
+{
+ vstrq_p128 (ptr, val);
+}
+
+/* { dg-final { scan-assembler "vst1.64\t{d\[0-9\]+-d\[0-9\]+}.*" } } */
diff --git a/gcc/testsuite/gcc.target/arm/div64-unwinding.c b/gcc/testsuite/gcc.target/arm/div64-unwinding.c
new file mode 100644
index 0000000000..7f112eeab9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/div64-unwinding.c
@@ -0,0 +1,24 @@
+/* Performing a 64-bit division should not pull in the unwinder. */
+
+/* { dg-do run { target { ! *-*-linux* } } } */
+/* { dg-options "-O0" } */
+
+#include <stdlib.h>
+
+long long
+foo (long long c, long long d)
+{
+ return c/d;
+}
+
+long long x = 0;
+long long y = 1;
+
+extern int (*_Unwind_RaiseException) (void *) __attribute__((weak));
+
+int main(void)
+{
+ if (&_Unwind_RaiseException != NULL)
+ abort ();;
+ return foo (x, y);
+}
diff --git a/gcc/testsuite/gcc.target/arm/epilog-1.c b/gcc/testsuite/gcc.target/arm/epilog-1.c
new file mode 100644
index 0000000000..f97f1ebeaa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/epilog-1.c
@@ -0,0 +1,17 @@
+/* Register liveness information from epilgoue enables peephole optimization. */
+/* { dg-do compile } */
+/* { dg-options "-mthumb -Os" } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+volatile int g_k;
+extern void bar(int, int, int, int);
+
+int foo(int a, int b, int c, int d)
+{
+ if (g_k & 4) c++;
+ bar (a, b, c, d);
+ return 0;
+}
+
+/* { dg-final { scan-assembler-times "lsls.*#29" 1 } } */
+/* { dg-final { scan-assembler-not "tst" } } */
diff --git a/gcc/testsuite/gcc.target/arm/fixed_float_conversion.c b/gcc/testsuite/gcc.target/arm/fixed_float_conversion.c
new file mode 100644
index 0000000000..078b103745
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/fixed_float_conversion.c
@@ -0,0 +1,20 @@
+/* Check that vcvt is used for fixed and float data conversions. */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_vfp3_ok } */
+/* { dg-options "-O1" } */
+/* { dg-add-options arm_vfp3 } */
+
+float
+fixed_to_float (int i)
+{
+ return ((float) i / (1 << 16));
+}
+
+int
+float_to_fixed (float f)
+{
+ return ((int) (f * (1 << 16)));
+}
+
+/* { dg-final { scan-assembler "vcvt.f32.s32" } } */
+/* { dg-final { scan-assembler "vcvt.s32.f32" } } */
diff --git a/gcc/testsuite/gcc.target/arm/fma-sp.c b/gcc/testsuite/gcc.target/arm/fma-sp.c
new file mode 100644
index 0000000000..e1884545f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/fma-sp.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicts with multilib options" { ! arm_thumb2_ok } { "-march=*" } { "" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-m4" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfpu=*" } { "-mfpu=fpv4-sp-d16" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
+/* { dg-options "-O2 -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mthumb -mfloat-abi=hard" } */
+
+#include "fma.h"
+
+/* { dg-final { scan-assembler-not "vfma\.f64\td\[0-9\]" } } */
+/* { dg-final { scan-assembler-times "vfma\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-not "vfms\.f64\td\[0-9\]" } } */
+/* { dg-final { scan-assembler-times "vfms\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-not "vfnma\.f64\td\[0-9\]" } } */
+/* { dg-final { scan-assembler-times "vfnma\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-not "vfnms\.f64\td\[0-9\]" } } */
+/* { dg-final { scan-assembler-times "vfnms\.f32\ts\[0-9\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/fma.c b/gcc/testsuite/gcc.target/arm/fma.c
new file mode 100644
index 0000000000..704559a579
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/fma.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicts with multilib options" { ! arm_thumb2_ok } { "-mthumb" } { "" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mcpu=*" } { "-mcpu=cortex-a15" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfpu=*" } { "-mfpu=vfpv4" } } */
+/* { dg-skip-if "avoid conflicts with multilib options" { *-*-* } { "-mfloat-abi=*" } { "-mfloat-abi=hard" } } */
+/* { dg-options "-O2 -mcpu=cortex-a15 -mfpu=vfpv4 -mfloat-abi=hard" } */
+
+#include "fma.h"
+
+/* { dg-final { scan-assembler-times "vfma\.f64\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfma\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfms\.f64\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfms\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnma\.f64\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnma\.f32\ts\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnms\.f64\td\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnms\.f32\ts\[0-9\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/fma.h b/gcc/testsuite/gcc.target/arm/fma.h
new file mode 100644
index 0000000000..0812c2d73a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/fma.h
@@ -0,0 +1,50 @@
+extern double fma (double, double, double);
+extern float fmaf (float, float, float);
+
+float
+vfma32 (float x, float y, float z)
+{
+ return fmaf (x, y, z);
+}
+
+float
+vfms32 (float x, float y, float z)
+{
+ return fmaf (-x, y, z);
+}
+
+float
+vfnms32 (float x, float y, float z)
+{
+ return fmaf (x, y, -z);
+}
+
+float
+vfnma32 (float x, float y, float z)
+{
+ return fmaf (-x, y, -z);
+}
+
+double
+vfma64 (double x, double y, double z)
+{
+ return fma (x, y, z);
+}
+
+double
+vfms64 (double x, double y, double z)
+{
+ return fma (-x, y, z);
+}
+
+double
+vfnms64 (double x, double y, double z)
+{
+ return fma (x, y, -z);
+}
+
+double
+vfnma64 (double x, double y, double z)
+{
+ return fma (-x, y, -z);
+}
diff --git a/gcc/testsuite/gcc.target/arm/frame-pointer-1.c b/gcc/testsuite/gcc.target/arm/frame-pointer-1.c
index bb1888e389..c288fef83b 100644
--- a/gcc/testsuite/gcc.target/arm/frame-pointer-1.c
+++ b/gcc/testsuite/gcc.target/arm/frame-pointer-1.c
@@ -1,6 +1,7 @@
/* Check local register variables using a register conventionally
used as the frame pointer aren't clobbered under high register pressure. */
/* { dg-do run } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
/* { dg-options "-Os -mthumb -fomit-frame-pointer" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
new file mode 100644
index 0000000000..4b48ef803d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4-arm.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v4 } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#include "ftest-support.h"
+
+
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
new file mode 100644
index 0000000000..016506f46e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-arm.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v4t } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
new file mode 100644
index 0000000000..9ef944e5fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv4t-thumb.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv4t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v4t } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 4
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
new file mode 100644
index 0000000000..a9403e97c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-arm.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v5t } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
new file mode 100644
index 0000000000..f3ad07ec04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5t-thumb.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5t" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v5t } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
new file mode 100644
index 0000000000..f98c01a0e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-arm.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v5te } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
new file mode 100644
index 0000000000..5d71787e8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv5te-thumb.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv5te" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v5te } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 5
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
new file mode 100644
index 0000000000..88a5089548
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-arm.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v6 } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
new file mode 100644
index 0000000000..0f42a0ca8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6-thumb.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v6 } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
new file mode 100644
index 0000000000..8de021a0f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-arm.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v6k } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
new file mode 100644
index 0000000000..8e4a188042
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6k-thumb.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6k" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v6k } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
new file mode 100644
index 0000000000..ee075e290b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6m-thumb.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v6m } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
new file mode 100644
index 0000000000..83b4bc4c95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-arm.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v6t2 } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
new file mode 100644
index 0000000000..1a1cbc5abc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6t2-thumb.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6t2" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v6t2 } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
new file mode 100644
index 0000000000..e2df0d482b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-arm.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v6z } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 4
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
new file mode 100644
index 0000000000..9761f0a96f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv6z-thumb.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv6z" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v6z } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 6
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 1
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c
new file mode 100644
index 0000000000..c71a7cdb75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7a-arm.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v7a } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c
new file mode 100644
index 0000000000..f1f789e8d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7a-thumb.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v7a } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7em-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7em-thumb.c
new file mode 100644
index 0000000000..688d766e71
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7em-thumb.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7e-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v7em } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c
new file mode 100644
index 0000000000..363b48b751
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7m-thumb.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=arm7-m" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v7m } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'M'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 7
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c
new file mode 100644
index 0000000000..08c017fc2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7r-arm.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v7r } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c
new file mode 100644
index 0000000000..1b69dc0f01
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7r-thumb.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7-r" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v7r } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'R'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c
new file mode 100644
index 0000000000..3cf987ccc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-arm.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v7ve } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c
new file mode 100644
index 0000000000..0d6b432213
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv7ve-thumb.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv7ve" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v7ve } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 7
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c b/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c
new file mode 100644
index 0000000000..7812c5cd50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv8a-arm.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-mthumb" } { "" } } */
+/* { dg-options "-marm" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c b/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c
new file mode 100644
index 0000000000..605b1735e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-armv8a-thumb.c
@@ -0,0 +1,40 @@
+/* { dg-do compile } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-march=*" } { "-march=armv8-a" } } */
+/* { dg-skip-if "avoid conflicting multilib options" { *-*-* } { "-marm" } { "" } } */
+/* { dg-options "-mthumb" } */
+/* { dg-add-options arm_arch_v8a } */
+
+#define NEED_ARM_ARCH
+#define VALUE_ARM_ARCH 8
+
+#define NEED_ARM_ARCH_ISA_ARM
+#define VALUE_ARM_ARCH_ISA_ARM 1
+
+#define NEED_ARM_ARCH_ISA_THUMB
+#define VALUE_ARM_ARCH_ISA_THUMB 2
+
+#define NEED_ARM_ARCH_PROFILE
+#define VALUE_ARM_ARCH_PROFILE 'A'
+
+#define NEED_ARM_FEATURE_UNALIGNED
+#define VALUE_ARM_FEATURE_UNALIGNED 1
+
+#define NEED_ARM_FEATURE_LDREX
+#define VALUE_ARM_FEATURE_LDREX 15
+
+#define NEED_ARM_FEATURE_CLZ
+#define VALUE_ARM_FEATURE_CLZ 1
+
+#define NEED_ARM_FEATURE_DSP
+#define VALUE_ARM_FEATURE_DSP 1
+
+#define NEED_ARM_FEATURE_SIMD32
+#define VALUE_ARM_FEATURE_SIMD32 1
+
+#define NEED_ARM_FEATURE_QBIT
+#define VALUE_ARM_FEATURE_QBIT 1
+
+#define NEED_ARM_FEATURE_SAT
+#define VALUE_ARM_FEATURE_SAT 1
+
+#include "ftest-support.h"
diff --git a/gcc/testsuite/gcc.target/arm/ftest-support.h b/gcc/testsuite/gcc.target/arm/ftest-support.h
new file mode 100644
index 0000000000..c56d2d5886
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ftest-support.h
@@ -0,0 +1,156 @@
+/* For each of several ARM architecture features, check that relevant
+ macros are defined or not, and that they have the expected values. */
+
+#ifdef NEED_ARM_ARCH
+# ifdef __ARM_ARCH
+# if __ARM_ARCH != VALUE_ARM_ARCH
+# error __ARM_ARCH has unexpected value
+# endif
+# else
+# error __ARM_ARCH is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH
+# error __ARM_ARCH is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_ARCH_ISA_ARM
+# ifdef __ARM_ARCH_ISA_ARM
+# if __ARM_ARCH_ISA_ARM != VALUE_ARM_ARCH_ISA_ARM
+# error __ARM_ARCH_ISA_ARM has unexpected value
+# endif
+# else
+# error __ARM_ARCH_ISA_ARM is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_ARM
+# error __ARM_ARCH_ISA_ARM is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_ARCH_ISA_THUMB
+# ifdef __ARM_ARCH_ISA_THUMB
+# if __ARM_ARCH_ISA_THUMB != VALUE_ARM_ARCH_ISA_THUMB
+# error __ARM_ARCH_ISA_THUMB has unexpected value
+# endif
+# else
+# error __ARM_ARCH_ISA_THUMB is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_ISA_THUMB
+# error __ARM_ARCH_ISA_THUMB is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_ARCH_PROFILE
+# ifdef __ARM_ARCH_PROFILE
+# if __ARM_ARCH_PROFILE != VALUE_ARM_ARCH_PROFILE
+# error __ARM_ARCH_PROFILE has unexpected value
+# endif
+# else
+# error __ARM_ARCH_PROFILE is not defined but should be
+# endif
+#else
+# ifdef __ARM_ARCH_PROFILE
+# error __ARM_ARCH_PROFILE is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_UNALIGNED
+# ifdef __ARM_FEATURE_UNALIGNED
+# if __ARM_FEATURE_UNALIGNED != VALUE_ARM_FEATURE_UNALIGNED
+# error __ARM_FEATURE_UNALIGNED has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_UNALIGNED is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_UNALIGNED
+# error __ARM_FEATURE_UNALIGNED is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_LDREX
+# ifdef __ARM_FEATURE_LDREX
+# if __ARM_FEATURE_LDREX != VALUE_ARM_FEATURE_LDREX
+# error __ARM_FEATURE_LDREX has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_LDREX is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_LDREX
+# error __ARM_FEATURE_LDREX is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_CLZ
+# ifdef __ARM_FEATURE_CLZ
+# if __ARM_FEATURE_CLZ != VALUE_ARM_FEATURE_CLZ
+# error __ARM_FEATURE_CLZ has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_CLZ is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_CLZ
+# error __ARM_FEATURE_CLZ is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_DSP
+# ifdef __ARM_FEATURE_DSP
+# if __ARM_FEATURE_DSP != VALUE_ARM_FEATURE_DSP
+# error __ARM_FEATURE_DSP has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_DSP is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_DSP
+# error __ARM_FEATURE_DSP is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_SIMD32
+# ifdef __ARM_FEATURE_SIMD32
+# if __ARM_FEATURE_SIMD32 != VALUE_ARM_FEATURE_SIMD32
+# error __ARM_FEATURE_SIMD32 has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_SIMD32 is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SIMD32
+# error __ARM_FEATURE_SIMD32 is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_QBIT
+# ifdef __ARM_FEATURE_QBIT
+# if __ARM_FEATURE_QBIT != VALUE_ARM_FEATURE_QBIT
+# error __ARM_FEATURE_QBIT has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_QBIT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_QBIT
+# error __ARM_FEATURE_QBIT is defined but should not be
+# endif
+#endif
+
+#ifdef NEED_ARM_FEATURE_SAT
+# ifdef __ARM_FEATURE_SAT
+# if __ARM_FEATURE_SAT != VALUE_ARM_FEATURE_SAT
+# error __ARM_FEATURE_SAT has unexpected value
+# endif
+# else
+# error __ARM_FEATURE_SAT is not defined but should be
+# endif
+#else
+# ifdef __ARM_FEATURE_SAT
+# error __ARM_FEATURE_SAT is defined but should not be
+# endif
+#endif
diff --git a/gcc/testsuite/gcc.target/arm/interrupt-1.c b/gcc/testsuite/gcc.target/arm/interrupt-1.c
index 18379de33d..a38424228c 100644
--- a/gcc/testsuite/gcc.target/arm/interrupt-1.c
+++ b/gcc/testsuite/gcc.target/arm/interrupt-1.c
@@ -1,10 +1,10 @@
/* Verify that prologue and epilogue are correct for functions with
__attribute__ ((interrupt)). */
/* { dg-do compile } */
-/* { dg-options "-O0" } */
+/* { dg-require-effective-target arm_nothumb } */
+/* { dg-options "-O0 -marm" } */
-/* This test is not valid when -mthumb. We just cheat. */
-#ifndef __thumb__
+/* This test is not valid when -mthumb. */
extern void bar (int);
extern void foo (void) __attribute__ ((interrupt("IRQ")));
@@ -12,12 +12,6 @@ void foo ()
{
bar (0);
}
-#else
-void foo ()
-{
- asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}");
- asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}^");
-}
-#endif
+
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, lr}" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, fp, ip, pc}\\^" } } */
diff --git a/gcc/testsuite/gcc.target/arm/interrupt-2.c b/gcc/testsuite/gcc.target/arm/interrupt-2.c
index b979bf17e8..61d3130536 100644
--- a/gcc/testsuite/gcc.target/arm/interrupt-2.c
+++ b/gcc/testsuite/gcc.target/arm/interrupt-2.c
@@ -1,26 +1,19 @@
/* Verify that prologue and epilogue are correct for functions with
__attribute__ ((interrupt)). */
/* { dg-do compile } */
-/* { dg-options "-O1" } */
+/* { dg-require-effective-target arm_nothumb } */
+/* { dg-options "-O1 -marm" } */
-/* This test is not valid when -mthum. We just cheat. */
-#ifndef __thumb__
+/* This test is not valid when -mthumb. */
extern void bar (int);
extern void test (void) __attribute__((__interrupt__));
int foo;
void test()
{
- funcptrs(foo);
+ bar (foo);
foo = 0;
}
-#else
-void test ()
-{
- asm ("stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}");
- asm ("ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}^");
-}
-#endif
/* { dg-final { scan-assembler "stmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, lr}" } } */
/* { dg-final { scan-assembler "ldmfd\tsp!, {r0, r1, r2, r3, r4, r5, ip, pc}\\^" } } */
diff --git a/gcc/testsuite/gcc.target/arm/iordi3-opt.c b/gcc/testsuite/gcc.target/arm/iordi3-opt.c
new file mode 100644
index 0000000000..b3f465b749
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/iordi3-opt.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+unsigned long long or64 (unsigned long long input)
+{
+ return input | 0x200000004ULL;
+}
+
+/* { dg-final { scan-assembler-not "mov\[\\t \]+.+,\[\\t \]*.+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/its.c b/gcc/testsuite/gcc.target/arm/its.c
new file mode 100644
index 0000000000..5425f1e920
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/its.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+int test (int a, int b)
+{
+ int r;
+ if (a > 10)
+ {
+ r = a - b;
+ r += 10;
+ }
+ else
+ {
+ r = b - a;
+ r -= 7;
+ }
+ if (r > 0)
+ r -= 3;
+ return r;
+}
+/* { dg-final { scan-assembler-times "\tit" 2 { target arm_thumb2 } } } */
diff --git a/gcc/testsuite/gcc.target/arm/ivopts-orig_biv-inc.c b/gcc/testsuite/gcc.target/arm/ivopts-orig_biv-inc.c
new file mode 100644
index 0000000000..f466ff35f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ivopts-orig_biv-inc.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fdump-tree-ivopts-details" } */
+/* { dg-skip-if "" { arm_thumb1 } } */
+
+extern char *__ctype_ptr__;
+
+unsigned char * foo(unsigned char *ReadPtr)
+{
+
+ unsigned char c;
+
+ while (!(((__ctype_ptr__+sizeof(""[*ReadPtr]))[(int)(*ReadPtr)])&04) == (!(0)))
+ ReadPtr++;
+
+ return ReadPtr;
+}
+
+/* { dg-final { scan-tree-dump-times "original biv" 2 "ivopts"} } */
+/* { dg-final { cleanup-tree-dump "ivopts" } } */
diff --git a/gcc/testsuite/gcc.target/arm/ldrd-strd-offset.c b/gcc/testsuite/gcc.target/arm/ldrd-strd-offset.c
new file mode 100644
index 0000000000..a128a0a0e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/ldrd-strd-offset.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+typedef struct
+{
+ int x;
+ int i, j;
+} off_struct;
+
+int foo (char *str, int *a, int b, int c)
+{
+ off_struct *p = (off_struct *)(str + 3);
+ b = p->i;
+ c = p->j;
+ *a = b + c;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/lp1189445.c b/gcc/testsuite/gcc.target/arm/lp1189445.c
new file mode 100644
index 0000000000..766748e550
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/lp1189445.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-add-options arm_neon } */
+/* { dg-options "-O3" } */
+
+int id;
+int
+test (const long int *data)
+{
+ int i, retval;
+ retval = id;
+ for (i = 0; i < id; i++)
+ {
+ retval &= (data[i] <= 0);
+ }
+
+ return (retval);
+}
diff --git a/gcc/testsuite/gcc.target/arm/lp1243022.c b/gcc/testsuite/gcc.target/arm/lp1243022.c
new file mode 100644
index 0000000000..cb405908e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/lp1243022.c
@@ -0,0 +1,201 @@
+/* { dg-do compile { target arm_thumb2 } } */
+/* { dg-options "-O2 -fdump-rtl-subreg2" } */
+
+/* { dg-final { scan-rtl-dump "REG_INC" "subreg2" { target { ! arm_neon } } } } */
+/* { dg-final { cleanup-rtl-dump "subreg2" } } */
+struct device;
+typedef unsigned int __u32;
+typedef unsigned long long u64;
+typedef __u32 __le32;
+typedef u64 dma_addr_t;
+typedef unsigned gfp_t;
+int dev_warn (const struct device *dev, const char *fmt, ...);
+struct usb_bus
+{
+ struct device *controller;
+};
+struct usb_hcd
+{
+ struct usb_bus self;
+};
+struct xhci_generic_trb
+{
+ __le32 field[4];
+};
+union xhci_trb
+{
+ struct xhci_generic_trb generic;
+};
+struct xhci_segment
+{
+ union xhci_trb *trbs;
+ dma_addr_t dma;
+};
+struct xhci_ring
+{
+ struct xhci_segment *first_seg;
+};
+struct xhci_hcd
+{
+ struct xhci_ring *cmd_ring;
+ struct xhci_ring *event_ring;
+};
+struct usb_hcd *xhci_to_hcd (struct xhci_hcd *xhci)
+{
+}
+dma_addr_t xhci_trb_virt_to_dma (struct xhci_segment * seg,
+ union xhci_trb * trb);
+struct xhci_segment *trb_in_td (struct xhci_segment *start_seg,
+ dma_addr_t suspect_dma);
+xhci_test_trb_in_td (struct xhci_hcd *xhci, struct xhci_segment *input_seg,
+ union xhci_trb *start_trb, union xhci_trb *end_trb,
+ dma_addr_t input_dma, struct xhci_segment *result_seg,
+ char *test_name, int test_number)
+{
+ unsigned long long start_dma;
+ unsigned long long end_dma;
+ struct xhci_segment *seg;
+ start_dma = xhci_trb_virt_to_dma (input_seg, start_trb);
+ end_dma = xhci_trb_virt_to_dma (input_seg, end_trb);
+ {
+ dev_warn (xhci_to_hcd (xhci)->self.controller,
+ "%d\n", test_number);
+ dev_warn (xhci_to_hcd (xhci)->self.controller,
+ "Expected seg %p, got seg %p\n", result_seg, seg);
+ }
+}
+xhci_check_trb_in_td_math (struct xhci_hcd *xhci, gfp_t mem_flags)
+{
+ struct
+ {
+ dma_addr_t input_dma;
+ struct xhci_segment *result_seg;
+ }
+ simple_test_vector[] =
+ {
+ {
+ 0, ((void *) 0)
+ }
+ ,
+ {
+ xhci->event_ring->first_seg->dma - 16, ((void *) 0)}
+ ,
+ {
+ xhci->event_ring->first_seg->dma - 1, ((void *) 0)}
+ ,
+ {
+ xhci->event_ring->first_seg->dma, xhci->event_ring->first_seg}
+ ,
+ {
+ xhci->event_ring->first_seg->dma + (64 - 1) * 16,
+ xhci->event_ring->first_seg
+ }
+ ,
+ {
+ xhci->event_ring->first_seg->dma + (64 - 1) * 16 + 1, ((void *) 0)}
+ ,
+ {
+ xhci->event_ring->first_seg->dma + (64) * 16, ((void *) 0)}
+ ,
+ {
+ (dma_addr_t) (~0), ((void *) 0)
+ }
+ };
+ struct
+ {
+ struct xhci_segment *input_seg;
+ union xhci_trb *start_trb;
+ union xhci_trb *end_trb;
+ dma_addr_t input_dma;
+ struct xhci_segment *result_seg;
+ }
+ complex_test_vector[] =
+ {
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ xhci->event_ring->first_seg->trbs,.end_trb =
+ &xhci->event_ring->first_seg->trbs[64 - 1],.input_dma =
+ xhci->cmd_ring->first_seg->dma,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ xhci->event_ring->first_seg->trbs,.end_trb =
+ &xhci->cmd_ring->first_seg->trbs[64 - 1],.input_dma =
+ xhci->cmd_ring->first_seg->dma,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ xhci->cmd_ring->first_seg->trbs,.end_trb =
+ &xhci->cmd_ring->first_seg->trbs[64 - 1],.input_dma =
+ xhci->cmd_ring->first_seg->dma,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ &xhci->event_ring->first_seg->trbs[0],.end_trb =
+ &xhci->event_ring->first_seg->trbs[3],.input_dma =
+ xhci->event_ring->first_seg->dma + 4 * 16,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ &xhci->event_ring->first_seg->trbs[3],.end_trb =
+ &xhci->event_ring->first_seg->trbs[6],.input_dma =
+ xhci->event_ring->first_seg->dma + 2 * 16,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ &xhci->event_ring->first_seg->trbs[64 - 3],.end_trb =
+ &xhci->event_ring->first_seg->trbs[1],.input_dma =
+ xhci->event_ring->first_seg->dma + 2 * 16,.result_seg = ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ &xhci->event_ring->first_seg->trbs[64 - 3],.end_trb =
+ &xhci->event_ring->first_seg->trbs[1],.input_dma =
+ xhci->event_ring->first_seg->dma + (64 - 4) * 16,.result_seg =
+ ((void *) 0),
+ }
+ ,
+ {
+ .input_seg = xhci->event_ring->first_seg,.start_trb =
+ &xhci->event_ring->first_seg->trbs[64 - 3],.end_trb =
+ &xhci->event_ring->first_seg->trbs[1],.input_dma =
+ xhci->cmd_ring->first_seg->dma + 2 * 16,.result_seg = ((void *) 0),
+ }
+ };
+ unsigned int num_tests;
+ int i, ret;
+ num_tests =
+ (sizeof (simple_test_vector) / sizeof ((simple_test_vector)[0]) +
+ (sizeof (struct
+ {
+ }
+ )));
+ for (i = 0; i < num_tests; i++)
+ {
+ ret =
+ xhci_test_trb_in_td (xhci, xhci->event_ring->first_seg,
+ xhci->event_ring->first_seg->trbs,
+ &xhci->event_ring->first_seg->trbs[64 - 1],
+ simple_test_vector[i].input_dma,
+ simple_test_vector[i].result_seg, "Simple", i);
+ if (ret < 0)
+ return ret;
+ }
+ for (i = 0; i < num_tests; i++)
+ {
+ ret =
+ xhci_test_trb_in_td (xhci, complex_test_vector[i].input_seg,
+ complex_test_vector[i].start_trb,
+ complex_test_vector[i].end_trb,
+ complex_test_vector[i].input_dma,
+ complex_test_vector[i].result_seg, "Complex", i);
+ if (ret < 0)
+ return ret;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/arm/minmax_minus.c b/gcc/testsuite/gcc.target/arm/minmax_minus.c
new file mode 100644
index 0000000000..906342a87c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/minmax_minus.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_cond_exec } */
+/* { dg-options "-O2" } */
+
+#define MAX(a, b) (a > b ? a : b)
+int
+foo (int a, int b, int c)
+{
+ return c - MAX (a, b);
+}
+
+/* { dg-final { scan-assembler-not "mov" } } */
diff --git a/gcc/testsuite/gcc.target/arm/mmx-2.c b/gcc/testsuite/gcc.target/arm/mmx-2.c
new file mode 100644
index 0000000000..0540f659d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/mmx-2.c
@@ -0,0 +1,166 @@
+/* { dg-do compile } */
+/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mcpu=*" } { "-mcpu=iwmmxt" } } */
+/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-mabi=*" } { "-mabi=iwmmxt" } } */
+/* { dg-skip-if "Test is specific to the iWMMXt" { arm*-*-* } { "-march=*" } { "-march=iwmmxt" } } */
+/* { dg-skip-if "Test is specific to ARM mode" { arm*-*-* } { "-mthumb" } { "" } } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-require-effective-target arm_iwmmxt_ok } */
+/* { dg-options "-mcpu=iwmmxt -flax-vector-conversions -std=gnu99" } */
+
+/* Internal data types for implementing the intrinsics. */
+typedef int __v2si __attribute__ ((vector_size (8)));
+typedef short __v4hi __attribute__ ((vector_size (8)));
+typedef signed char __v8qi __attribute__ ((vector_size (8)));
+
+void
+foo(void)
+{
+ volatile int isink;
+ volatile long long llsink;
+ volatile __v8qi v8sink;
+ volatile __v4hi v4sink;
+ volatile __v2si v2sink;
+
+ isink = __builtin_arm_getwcgr0 ();
+ __builtin_arm_setwcgr0 (isink);
+ isink = __builtin_arm_getwcgr1 ();
+ __builtin_arm_setwcgr1 (isink);
+ isink = __builtin_arm_getwcgr2 ();
+ __builtin_arm_setwcgr2 (isink);
+ isink = __builtin_arm_getwcgr3 ();
+ __builtin_arm_setwcgr3 (isink);
+
+ isink = __builtin_arm_textrmsb (v8sink, 0);
+ isink = __builtin_arm_textrmsh (v4sink, 0);
+ isink = __builtin_arm_textrmsw (v2sink, 0);
+ isink = __builtin_arm_textrmub (v8sink, 0);
+ isink = __builtin_arm_textrmuh (v4sink, 0);
+ isink = __builtin_arm_textrmuw (v2sink, 0);
+ v8sink = __builtin_arm_tinsrb (v8sink, isink, 0);
+ v4sink = __builtin_arm_tinsrh (v4sink, isink, 0);
+ v2sink = __builtin_arm_tinsrw (v2sink, isink, 0);
+ llsink = __builtin_arm_tmia (llsink, isink, isink);
+ llsink = __builtin_arm_tmiabb (llsink, isink, isink);
+ llsink = __builtin_arm_tmiabt (llsink, isink, isink);
+ llsink = __builtin_arm_tmiaph (llsink, isink, isink);
+ llsink = __builtin_arm_tmiatb (llsink, isink, isink);
+ llsink = __builtin_arm_tmiatt (llsink, isink, isink);
+ isink = __builtin_arm_tmovmskb (v8sink);
+ isink = __builtin_arm_tmovmskh (v4sink);
+ isink = __builtin_arm_tmovmskw (v2sink);
+ llsink = __builtin_arm_waccb (v8sink);
+ llsink = __builtin_arm_wacch (v4sink);
+ llsink = __builtin_arm_waccw (v2sink);
+ v8sink = __builtin_arm_waddb (v8sink, v8sink);
+ v8sink = __builtin_arm_waddbss (v8sink, v8sink);
+ v8sink = __builtin_arm_waddbus (v8sink, v8sink);
+ v4sink = __builtin_arm_waddh (v4sink, v4sink);
+ v4sink = __builtin_arm_waddhss (v4sink, v4sink);
+ v4sink = __builtin_arm_waddhus (v4sink, v4sink);
+ v2sink = __builtin_arm_waddw (v2sink, v2sink);
+ v2sink = __builtin_arm_waddwss (v2sink, v2sink);
+ v2sink = __builtin_arm_waddwus (v2sink, v2sink);
+ v8sink = __builtin_arm_walign (v8sink, v8sink, 0); /* waligni: 3-bit immediate. */
+ v8sink = __builtin_arm_walign (v8sink, v8sink, isink); /* walignr: GP register. */
+ llsink = __builtin_arm_wand(llsink, llsink);
+ llsink = __builtin_arm_wandn (llsink, llsink);
+ v8sink = __builtin_arm_wavg2b (v8sink, v8sink);
+ v8sink = __builtin_arm_wavg2br (v8sink, v8sink);
+ v4sink = __builtin_arm_wavg2h (v4sink, v4sink);
+ v4sink = __builtin_arm_wavg2hr (v4sink, v4sink);
+ v8sink = __builtin_arm_wcmpeqb (v8sink, v8sink);
+ v4sink = __builtin_arm_wcmpeqh (v4sink, v4sink);
+ v2sink = __builtin_arm_wcmpeqw (v2sink, v2sink);
+ v8sink = __builtin_arm_wcmpgtsb (v8sink, v8sink);
+ v4sink = __builtin_arm_wcmpgtsh (v4sink, v4sink);
+ v2sink = __builtin_arm_wcmpgtsw (v2sink, v2sink);
+ v8sink = __builtin_arm_wcmpgtub (v8sink, v8sink);
+ v4sink = __builtin_arm_wcmpgtuh (v4sink, v4sink);
+ v2sink = __builtin_arm_wcmpgtuw (v2sink, v2sink);
+ llsink = __builtin_arm_wmacs (llsink, v4sink, v4sink);
+ llsink = __builtin_arm_wmacsz (v4sink, v4sink);
+ llsink = __builtin_arm_wmacu (llsink, v4sink, v4sink);
+ llsink = __builtin_arm_wmacuz (v4sink, v4sink);
+ v4sink = __builtin_arm_wmadds (v4sink, v4sink);
+ v4sink = __builtin_arm_wmaddu (v4sink, v4sink);
+ v8sink = __builtin_arm_wmaxsb (v8sink, v8sink);
+ v4sink = __builtin_arm_wmaxsh (v4sink, v4sink);
+ v2sink = __builtin_arm_wmaxsw (v2sink, v2sink);
+ v8sink = __builtin_arm_wmaxub (v8sink, v8sink);
+ v4sink = __builtin_arm_wmaxuh (v4sink, v4sink);
+ v2sink = __builtin_arm_wmaxuw (v2sink, v2sink);
+ v8sink = __builtin_arm_wminsb (v8sink, v8sink);
+ v4sink = __builtin_arm_wminsh (v4sink, v4sink);
+ v2sink = __builtin_arm_wminsw (v2sink, v2sink);
+ v8sink = __builtin_arm_wminub (v8sink, v8sink);
+ v4sink = __builtin_arm_wminuh (v4sink, v4sink);
+ v2sink = __builtin_arm_wminuw (v2sink, v2sink);
+ v4sink = __builtin_arm_wmulsm (v4sink, v4sink);
+ v4sink = __builtin_arm_wmulul (v4sink, v4sink);
+ v4sink = __builtin_arm_wmulum (v4sink, v4sink);
+ llsink = __builtin_arm_wor (llsink, llsink);
+ v2sink = __builtin_arm_wpackdss (llsink, llsink);
+ v2sink = __builtin_arm_wpackdus (llsink, llsink);
+ v8sink = __builtin_arm_wpackhss (v4sink, v4sink);
+ v8sink = __builtin_arm_wpackhus (v4sink, v4sink);
+ v4sink = __builtin_arm_wpackwss (v2sink, v2sink);
+ v4sink = __builtin_arm_wpackwus (v2sink, v2sink);
+ llsink = __builtin_arm_wrord (llsink, llsink);
+ llsink = __builtin_arm_wrordi (llsink, isink);
+ v4sink = __builtin_arm_wrorh (v4sink, llsink);
+ v4sink = __builtin_arm_wrorhi (v4sink, isink);
+ v2sink = __builtin_arm_wrorw (v2sink, llsink);
+ v2sink = __builtin_arm_wrorwi (v2sink, isink);
+ v2sink = __builtin_arm_wsadb (v2sink, v8sink, v8sink);
+ v2sink = __builtin_arm_wsadbz (v8sink, v8sink);
+ v2sink = __builtin_arm_wsadh (v2sink, v4sink, v4sink);
+ v2sink = __builtin_arm_wsadhz (v4sink, v4sink);
+ v4sink = __builtin_arm_wshufh (v4sink, 0);
+ llsink = __builtin_arm_wslld (llsink, llsink);
+ llsink = __builtin_arm_wslldi (llsink, 0);
+ v4sink = __builtin_arm_wsllh (v4sink, llsink);
+ v4sink = __builtin_arm_wsllhi (v4sink, isink);
+ v2sink = __builtin_arm_wsllw (v2sink, llsink);
+ v2sink = __builtin_arm_wsllwi (v2sink, isink);
+ llsink = __builtin_arm_wsrad (llsink, llsink);
+ llsink = __builtin_arm_wsradi (llsink, isink);
+ v4sink = __builtin_arm_wsrah (v4sink, llsink);
+ v4sink = __builtin_arm_wsrahi (v4sink, isink);
+ v2sink = __builtin_arm_wsraw (v2sink, llsink);
+ v2sink = __builtin_arm_wsrawi (v2sink, isink);
+ llsink = __builtin_arm_wsrld (llsink, llsink);
+ llsink = __builtin_arm_wsrldi (llsink, isink);
+ v4sink = __builtin_arm_wsrlh (v4sink, llsink);
+ v4sink = __builtin_arm_wsrlhi (v4sink, isink);
+ v2sink = __builtin_arm_wsrlw (v2sink, llsink);
+ v2sink = __builtin_arm_wsrlwi (v2sink, isink);
+ v8sink = __builtin_arm_wsubb (v8sink, v8sink);
+ v8sink = __builtin_arm_wsubbss (v8sink, v8sink);
+ v8sink = __builtin_arm_wsubbus (v8sink, v8sink);
+ v4sink = __builtin_arm_wsubh (v4sink, v4sink);
+ v4sink = __builtin_arm_wsubhss (v4sink, v4sink);
+ v4sink = __builtin_arm_wsubhus (v4sink, v4sink);
+ v2sink = __builtin_arm_wsubw (v2sink, v2sink);
+ v2sink = __builtin_arm_wsubwss (v2sink, v2sink);
+ v2sink = __builtin_arm_wsubwus (v2sink, v2sink);
+ v4sink = __builtin_arm_wunpckehsb (v8sink);
+ v2sink = __builtin_arm_wunpckehsh (v4sink);
+ llsink = __builtin_arm_wunpckehsw (v2sink);
+ v4sink = __builtin_arm_wunpckehub (v8sink);
+ v2sink = __builtin_arm_wunpckehuh (v4sink);
+ llsink = __builtin_arm_wunpckehuw (v2sink);
+ v4sink = __builtin_arm_wunpckelsb (v8sink);
+ v2sink = __builtin_arm_wunpckelsh (v4sink);
+ llsink = __builtin_arm_wunpckelsw (v2sink);
+ v4sink = __builtin_arm_wunpckelub (v8sink);
+ v2sink = __builtin_arm_wunpckeluh (v4sink);
+ llsink = __builtin_arm_wunpckeluw (v2sink);
+ v8sink = __builtin_arm_wunpckihb (v8sink, v8sink);
+ v4sink = __builtin_arm_wunpckihh (v4sink, v4sink);
+ v2sink = __builtin_arm_wunpckihw (v2sink, v2sink);
+ v8sink = __builtin_arm_wunpckilb (v8sink, v8sink);
+ v4sink = __builtin_arm_wunpckilh (v4sink, v4sink);
+ v2sink = __builtin_arm_wunpckilw (v2sink, v2sink);
+ llsink = __builtin_arm_wxor (llsink, llsink);
+ llsink = __builtin_arm_wzero ();
+}
diff --git a/gcc/testsuite/gcc.target/arm/naked-1.c b/gcc/testsuite/gcc.target/arm/naked-1.c
index 8f9ff711a5..fefffae812 100644
--- a/gcc/testsuite/gcc.target/arm/naked-1.c
+++ b/gcc/testsuite/gcc.target/arm/naked-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "-O0" } */
/* Check that function arguments aren't assigned and copied to stack slots
- in naked functions. This ususally happens at -O0 (presumably for
+ in naked functions. This usually happens at -O0 (presumably for
better debugging), but is highly undesirable if we haven't created
a stack frame. */
void __attribute__((naked))
diff --git a/gcc/testsuite/gcc.target/arm/negdi-1.c b/gcc/testsuite/gcc.target/arm/negdi-1.c
new file mode 100644
index 0000000000..c9bef049c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/negdi-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O2" } */
+
+signed long long extendsidi_negsi (signed int x)
+{
+ return -x;
+}
+
+/*
+Expected output:
+ rsb r0, r0, #0
+ mov r1, r0, asr #31
+*/
+/* { dg-final { scan-assembler-times "rsb" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "negs\\t" 1 { target { ! { arm_nothumb } } } } } */
+/* { dg-final { scan-assembler-times "asr" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/negdi-2.c b/gcc/testsuite/gcc.target/arm/negdi-2.c
new file mode 100644
index 0000000000..4444c20ea9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/negdi-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O2" } */
+
+signed long long zero_extendsidi_negsi (unsigned int x)
+{
+ return -x;
+}
+/*
+Expected output:
+ rsb r0, r0, #0
+ mov r1, #0
+*/
+/* { dg-final { scan-assembler-times "rsb\\t...?, ...?, #0" 1 { target { arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "negs\\t...?, ...?" 1 { target { ! arm_nothumb } } } } */
+/* { dg-final { scan-assembler-times "mov" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/negdi-3.c b/gcc/testsuite/gcc.target/arm/negdi-3.c
new file mode 100644
index 0000000000..76ddf49fc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/negdi-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-options "-O2" } */
+
+signed long long negdi_zero_extendsidi (unsigned int x)
+{
+ return -((signed long long) x);
+}
+/*
+Expected output:
+ rsbs r0, r0, #0
+ sbc r1, r1, r1
+*/
+/* { dg-final { scan-assembler-times "rsb" 1 } } */
+/* { dg-final { scan-assembler-times "sbc" 1 } } */
+/* { dg-final { scan-assembler-times "mov" 0 } } */
+/* { dg-final { scan-assembler-times "rsc" 0 } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c b/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c
index ad6ba755e6..fe3d78b308 100644
--- a/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c
+++ b/gcc/testsuite/gcc.target/arm/neon-combine-sub-abs-into-vabd.c
@@ -4,10 +4,8 @@
/* { dg-add-options arm_neon } */
#include <arm_neon.h>
-float32x2_t f_sub_abs_to_vabd_32()
+float32x2_t f_sub_abs_to_vabd_32(float32x2_t val1, float32x2_t val2)
{
- float32x2_t val1 = vdup_n_f32 (10);
- float32x2_t val2 = vdup_n_f32 (30);
float32x2_t sres = vsub_f32(val1, val2);
float32x2_t res = vabs_f32 (sres);
@@ -16,10 +14,8 @@ float32x2_t f_sub_abs_to_vabd_32()
/* { dg-final { scan-assembler "vabd\.f32" } }*/
#include <arm_neon.h>
-int8x8_t sub_abs_to_vabd_8()
+int8x8_t sub_abs_to_vabd_8(int8x8_t val1, int8x8_t val2)
{
- int8x8_t val1 = vdup_n_s8 (10);
- int8x8_t val2 = vdup_n_s8 (30);
int8x8_t sres = vsub_s8(val1, val2);
int8x8_t res = vabs_s8 (sres);
@@ -27,10 +23,8 @@ int8x8_t sub_abs_to_vabd_8()
}
/* { dg-final { scan-assembler "vabd\.s8" } }*/
-int16x4_t sub_abs_to_vabd_16()
+int16x4_t sub_abs_to_vabd_16(int16x4_t val1, int16x4_t val2)
{
- int16x4_t val1 = vdup_n_s16 (10);
- int16x4_t val2 = vdup_n_s16 (30);
int16x4_t sres = vsub_s16(val1, val2);
int16x4_t res = vabs_s16 (sres);
@@ -38,10 +32,8 @@ int16x4_t sub_abs_to_vabd_16()
}
/* { dg-final { scan-assembler "vabd\.s16" } }*/
-int32x2_t sub_abs_to_vabd_32()
+int32x2_t sub_abs_to_vabd_32(int32x2_t val1, int32x2_t val2)
{
- int32x2_t val1 = vdup_n_s32 (10);
- int32x2_t val2 = vdup_n_s32 (30);
int32x2_t sres = vsub_s32(val1, val2);
int32x2_t res = vabs_s32 (sres);
diff --git a/gcc/testsuite/gcc.target/arm/neon-extend-1.c b/gcc/testsuite/gcc.target/arm/neon-extend-1.c
new file mode 100644
index 0000000000..cfe83ce1bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-extend-1.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+void
+f (unsigned int a)
+{
+ unsigned long long b = a;
+ asm volatile ("@ extended to %0" : : "w" (b));
+}
+
+/* { dg-final { scan-assembler "vdup.32" } } */
+/* { dg-final { scan-assembler "vshr.u64" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-extend-2.c b/gcc/testsuite/gcc.target/arm/neon-extend-2.c
new file mode 100644
index 0000000000..1c5a17e427
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-extend-2.c
@@ -0,0 +1,13 @@
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+void
+f (int a)
+{
+ long long b = a;
+ asm volatile ("@ extended to %0" : : "w" (b));
+}
+
+/* { dg-final { scan-assembler "vdup.32" } } */
+/* { dg-final { scan-assembler "vshr.s64" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-for-64bits-1.c b/gcc/testsuite/gcc.target/arm/neon-for-64bits-1.c
new file mode 100644
index 0000000000..a2a4103b9a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-for-64bits-1.c
@@ -0,0 +1,54 @@
+/* Check that Neon is *not* used by default to handle 64-bits scalar
+ operations. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+typedef long long i64;
+typedef unsigned long long u64;
+typedef unsigned int u32;
+typedef int i32;
+
+/* Unary operators */
+#define UNARY_OP(name, op) \
+ void unary_##name(u64 *a, u64 *b) { *a = op (*b + 0x1234567812345678ULL) ; }
+
+/* Binary operators */
+#define BINARY_OP(name, op) \
+ void binary_##name(u64 *a, u64 *b, u64 *c) { *a = *b op *c ; }
+
+/* Unsigned shift */
+#define SHIFT_U(name, op, amount) \
+ void ushift_##name(u64 *a, u64 *b, int c) { *a = *b op amount; }
+
+/* Signed shift */
+#define SHIFT_S(name, op, amount) \
+ void sshift_##name(i64 *a, i64 *b, int c) { *a = *b op amount; }
+
+UNARY_OP(not, ~)
+
+BINARY_OP(add, +)
+BINARY_OP(sub, -)
+BINARY_OP(and, &)
+BINARY_OP(or, |)
+BINARY_OP(xor, ^)
+
+SHIFT_U(right1, >>, 1)
+SHIFT_U(right2, >>, 2)
+SHIFT_U(right5, >>, 5)
+SHIFT_U(rightn, >>, c)
+
+SHIFT_S(right1, >>, 1)
+SHIFT_S(right2, >>, 2)
+SHIFT_S(right5, >>, 5)
+SHIFT_S(rightn, >>, c)
+
+/* { dg-final {scan-assembler-times "vmvn" 0} } */
+/* { dg-final {scan-assembler-times "vadd" 0} } */
+/* { dg-final {scan-assembler-times "vsub" 0} } */
+/* { dg-final {scan-assembler-times "vand" 0} } */
+/* { dg-final {scan-assembler-times "vorr" 0} } */
+/* { dg-final {scan-assembler-times "veor" 0} } */
+/* { dg-final {scan-assembler-times "vshr" 0} } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-modes-3.c b/gcc/testsuite/gcc.target/arm/neon-modes-3.c
index fe8187570b..f3e4f335ee 100644
--- a/gcc/testsuite/gcc.target/arm/neon-modes-3.c
+++ b/gcc/testsuite/gcc.target/arm/neon-modes-3.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target arm_neon_ok } */
-/* { dg-options "-O" } */
+/* { dg-options "-O -g" } */
/* { dg-add-options arm_neon } */
#include <arm_neon.h>
diff --git a/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
new file mode 100644
index 0000000000..cd92d7d33e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-nested-apcs.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" }
+/* { dg-add-options arm_neon } */
+
+extern void abort (void);
+
+float data;
+
+void __attribute__((noinline, noclone)) bar (float f)
+{
+ data = f;
+}
+
+float __attribute__((noinline, noclone)) foo (float f)
+{
+ int error_reported = 0;
+
+ void __attribute__((noinline, noclone))
+ nested (int a, int b, int c, int d, float f0, float f1, float f2, float f3)
+ {
+ float e;
+
+ if (f3 > f2)
+ e = f3;
+ else
+ e = f2;
+
+ if (f0 - f1 > e)
+ {
+ error_reported = a + b + c + d;
+ bar (f0);
+ bar (e);
+ }
+ }
+
+ nested (1, 2, 3, 4, 1.0, 1.0, 3.5, 4.2);
+ return f + (float)error_reported;
+}
+
+#define PI 3.1415927f
+
+int main (void)
+{
+ if (foo (PI) != PI)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vceq_p64.c b/gcc/testsuite/gcc.target/arm/neon-vceq_p64.c
new file mode 100644
index 0000000000..21a6a78a22
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vceq_p64.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ uint64_t args[] = { 0x0, 0xdeadbeef, ~0xdeadbeef, 0xffff,
+ ~0xffff, 0xffffffff, ~0xffffffff, ~0x0 };
+ int i, j;
+
+ for (i = 0; i < sizeof (args) / sizeof (args[0]); ++i)
+ {
+ for (j = 0; j < sizeof (args) / sizeof (args[0]); ++j)
+ {
+ uint64_t a1 = args[i];
+ uint64_t a2 = args[j];
+ uint64_t res = vceq_p64 (vreinterpret_p64_u64 (a1),
+ vreinterpret_p64_u64 (a2));
+ uint64_t exp = (a1 == a2) ? ~0x0 : 0x0;
+
+ if (res != exp)
+ {
+ fprintf (stderr, "vceq_p64 (a1= %lx, a2= %lx)"
+ " returned %lx, expected %lx\n",
+ a1, a2, res, exp);
+ abort ();
+ }
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vcond-gt.c b/gcc/testsuite/gcc.target/arm/neon-vcond-gt.c
new file mode 100644
index 0000000000..8e9f378516
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vcond-gt.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O1 -funsafe-math-optimizations -ftree-vectorize" } */
+/* { dg-add-options arm_neon } */
+
+#define MAX(a, b) (a > b ? a : b)
+void foo (int ilast,float* w, float* w2)
+{
+ int i;
+ for (i = 0; i < ilast; ++i)
+ {
+ w[i] = MAX (0.0f, w2[i]);
+ }
+}
+
+/* { dg-final { scan-assembler "vcgt\\.f32\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
+/* { dg-final { scan-assembler "vbsl|vbit|vbif\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vcond-ltgt.c b/gcc/testsuite/gcc.target/arm/neon-vcond-ltgt.c
new file mode 100644
index 0000000000..c8306e364a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vcond-ltgt.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O1 -funsafe-math-optimizations -ftree-vectorize" } */
+/* { dg-add-options arm_neon } */
+
+#define LTGT(a, b) (__builtin_islessgreater (a, b) ? a : b)
+void foo (int ilast,float* w, float* w2)
+{
+ int i;
+ for (i = 0; i < ilast; ++i)
+ {
+ w[i] = LTGT (0.0f, w2[i]);
+ }
+}
+
+/* { dg-final { scan-assembler-times "vcgt\\.f32\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" 2 } } */
+/* { dg-final { scan-assembler "vorr\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
+/* { dg-final { scan-assembler "vbsl|vbit|vbif\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vcond-unordered.c b/gcc/testsuite/gcc.target/arm/neon-vcond-unordered.c
new file mode 100644
index 0000000000..3bb67d3afe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vcond-unordered.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O1 -funsafe-math-optimizations -ftree-vectorize" } */
+/* { dg-add-options arm_neon } */
+
+#define UNORD(a, b) (__builtin_isunordered (a, b) ? a : b)
+void foo (int ilast,float* w, float* w2)
+{
+ int i;
+ for (i = 0; i < ilast; ++i)
+ {
+ w[i] = UNORD (0.0f, w2[i]);
+ }
+}
+
+/* { dg-final { scan-assembler "vcgt\\.f32\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
+/* { dg-final { scan-assembler "vcge\\.f32\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
+/* { dg-final { scan-assembler "vorr\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
+/* { dg-final { scan-assembler "vbsl|vbit|vbif\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+,\[\\t \]*q\[0-9\]+" } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-1.c b/gcc/testsuite/gcc.target/arm/neon-vdup-1.c
new file mode 100644
index 0000000000..41799a25cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-1.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_f32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+float32x4_t out_float32x4_t;
+void test_vdupq_nf32 (void)
+{
+ out_float32x4_t = vdupq_n_f32 (0.0);
+}
+
+/* { dg-final { scan-assembler "vmov\.f32\[ \]+\[qQ\]\[0-9\]+, #0\.0\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-10.c b/gcc/testsuite/gcc.target/arm/neon-vdup-10.c
new file mode 100644
index 0000000000..a06b0647ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-10.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x12000000);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #3992977407\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-11.c b/gcc/testsuite/gcc.target/arm/neon-vdup-11.c
new file mode 100644
index 0000000000..07d08896af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-11.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u16' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint16x8_t out_uint16x8_t;
+void test_vdupq_nu16 (void)
+{
+ out_uint16x8_t = vdupq_n_u16 (0x12);
+}
+
+/* { dg-final { scan-assembler "vmov\.i16\[ \]+\[qQ\]\[0-9\]+, #18\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-12.c b/gcc/testsuite/gcc.target/arm/neon-vdup-12.c
new file mode 100644
index 0000000000..27b4186820
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-12.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u16' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint16x8_t out_uint16x8_t;
+void test_vdupq_nu16 (void)
+{
+ out_uint16x8_t = vdupq_n_u16 (0x1200);
+}
+
+/* { dg-final { scan-assembler "vmov\.i16\[ \]+\[qQ\]\[0-9\]+, #4608\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-13.c b/gcc/testsuite/gcc.target/arm/neon-vdup-13.c
new file mode 100644
index 0000000000..4d38bc0881
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-13.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u16' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint16x8_t out_uint16x8_t;
+void test_vdupq_nu16 (void)
+{
+ out_uint16x8_t = vdupq_n_u16 (~0x12);
+}
+
+/* { dg-final { scan-assembler "vmov\.i16\[ \]+\[qQ\]\[0-9\]+, #65517\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-14.c b/gcc/testsuite/gcc.target/arm/neon-vdup-14.c
new file mode 100644
index 0000000000..a16659fdae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-14.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u16' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint16x8_t out_uint16x8_t;
+void test_vdupq_nu16 (void)
+{
+ out_uint16x8_t = vdupq_n_u16 (~0x1200);
+}
+
+/* { dg-final { scan-assembler "vmov\.i16\[ \]+\[qQ\]\[0-9\]+, #60927\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-15.c b/gcc/testsuite/gcc.target/arm/neon-vdup-15.c
new file mode 100644
index 0000000000..84a6fe04fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-15.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u8' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint8x16_t out_uint8x16_t;
+void test_vdupq_nu8 (void)
+{
+ out_uint8x16_t = vdupq_n_u8 (0x12);
+}
+
+/* { dg-final { scan-assembler "vmov\.i8\[ \]+\[qQ\]\[0-9\]+, #18\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-16.c b/gcc/testsuite/gcc.target/arm/neon-vdup-16.c
new file mode 100644
index 0000000000..70bec0336e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-16.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x12ff);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4863\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-17.c b/gcc/testsuite/gcc.target/arm/neon-vdup-17.c
new file mode 100644
index 0000000000..e0283f1fb9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-17.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x12ffff);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #1245183\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-18.c b/gcc/testsuite/gcc.target/arm/neon-vdup-18.c
new file mode 100644
index 0000000000..7dcf85d396
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-18.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x12ff);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4294962432\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-19.c b/gcc/testsuite/gcc.target/arm/neon-vdup-19.c
new file mode 100644
index 0000000000..09804373f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-19.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x12ffff);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4293722112\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-2.c b/gcc/testsuite/gcc.target/arm/neon-vdup-2.c
new file mode 100644
index 0000000000..f9e6a72aec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-2.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_f32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+float32x4_t out_float32x4_t;
+void test_vdupq_nf32 (void)
+{
+ out_float32x4_t = vdupq_n_f32 (0.125);
+}
+
+/* { dg-final { scan-assembler "vmov\.f32\[ \]+\[qQ\]\[0-9\]+, #1\.25e-1\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-3.c b/gcc/testsuite/gcc.target/arm/neon-vdup-3.c
new file mode 100644
index 0000000000..d407316430
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-3.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x12);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #18\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-4.c b/gcc/testsuite/gcc.target/arm/neon-vdup-4.c
new file mode 100644
index 0000000000..bc1be079fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-4.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x1200);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4608\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-5.c b/gcc/testsuite/gcc.target/arm/neon-vdup-5.c
new file mode 100644
index 0000000000..9b04f16d58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-5.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x120000);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #1179648\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-6.c b/gcc/testsuite/gcc.target/arm/neon-vdup-6.c
new file mode 100644
index 0000000000..0889b80af2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-6.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (0x12000000);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #301989888\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-7.c b/gcc/testsuite/gcc.target/arm/neon-vdup-7.c
new file mode 100644
index 0000000000..f7b1dc8611
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-7.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x12);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4294967277\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-8.c b/gcc/testsuite/gcc.target/arm/neon-vdup-8.c
new file mode 100644
index 0000000000..9d494c3558
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-8.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x1200);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4294962687\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vdup-9.c b/gcc/testsuite/gcc.target/arm/neon-vdup-9.c
new file mode 100644
index 0000000000..799e95ed9b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vdup-9.c
@@ -0,0 +1,17 @@
+/* Test the optimization of `vdupq_n_u32' ARM Neon intrinsic. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint32x4_t out_uint32x4_t;
+void test_vdupq_nu32 (void)
+{
+ out_uint32x4_t = vdupq_n_u32 (~0x120000);
+}
+
+/* { dg-final { scan-assembler "vmov\.i32\[ \]+\[qQ\]\[0-9\]+, #4293787647\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vext-execute.c b/gcc/testsuite/gcc.target/arm/neon-vext-execute.c
new file mode 100644
index 0000000000..8e44d9ad55
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vext-execute.c
@@ -0,0 +1,341 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-require-effective-target arm_little_endian } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+#include <stdlib.h>
+#include <stdio.h>
+
+uint8x8_t
+tst_vext_u8 (uint8x8_t __a, uint8x8_t __b)
+{
+ uint8x8_t __mask1 = {2, 3, 4, 5, 6, 7, 8, 9};
+
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint8x8_t
+tst_vext_u8_rotate (uint8x8_t __a)
+{
+ uint8x8_t __mask1 = {2, 3, 4, 5, 6, 7, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x4_t
+tst_vext_u16 (uint16x4_t __a, uint16x4_t __b)
+{
+ uint16x4_t __mask1 = {2, 3, 4, 5};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint16x4_t
+tst_vext_u16_rotate (uint16x4_t __a)
+{
+ uint16x4_t __mask1 = {2, 3, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint32x2_t
+tst_vext_u32 (uint32x2_t __a, uint32x2_t __b)
+{
+ uint32x2_t __mask1 = {1, 2};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+/* This one is mapped into vrev64.32. */
+uint32x2_t
+tst_vext_u32_rotate (uint32x2_t __a)
+{
+ uint32x2_t __mask1 = {1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x16_t
+tst_vextq_u8 (uint8x16_t __a, uint8x16_t __b)
+{
+ uint8x16_t __mask1 = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint8x16_t
+tst_vextq_u8_rotate (uint8x16_t __a)
+{
+ uint8x16_t __mask1 = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 0, 1, 2, 3};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x8_t
+tst_vextq_u16 (uint16x8_t __a, uint16x8_t __b)
+{
+ uint16x8_t __mask1 = {2, 3, 4, 5, 6, 7, 8, 9};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint16x8_t
+tst_vextq_u16_rotate (uint16x8_t __a)
+{
+ uint16x8_t __mask1 = {2, 3, 4, 5, 6, 7, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint32x4_t
+tst_vextq_u32 (uint32x4_t __a, uint32x4_t __b)
+{
+ uint32x4_t __mask1 = {1, 2, 3, 4};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint32x4_t
+tst_vextq_u32_rotate (uint32x4_t __a)
+{
+ uint32x4_t __mask1 = {1, 2, 3, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint64x2_t
+tst_vextq_u64 (uint64x2_t __a, uint64x2_t __b)
+{
+ uint64x2_t __mask1 = {1, 2};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint64x2_t
+tst_vextq_u64_rotate (uint64x2_t __a)
+{
+ uint64x2_t __mask1 = {1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+int main (void)
+{
+ uint8_t arr_u8x8[] = {0, 1, 2, 3, 4, 5, 6, 7};
+ uint8_t arr2_u8x8[] = {8, 9, 10, 11, 12, 13, 14, 15};
+ uint16_t arr_u16x4[] = {0, 1, 2, 3};
+ uint16_t arr2_u16x4[] = {4, 5, 6, 7};
+ uint32_t arr_u32x2[] = {0, 1};
+ uint32_t arr2_u32x2[] = {2, 3};
+ uint8_t arr_u8x16[] = {0, 1, 2, 3, 4, 5, 6, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15};
+ uint8_t arr2_u8x16[] = {16, 17, 18, 19, 20, 21, 22, 23,
+ 24, 25, 26, 27, 28, 29, 30, 31};
+ uint16_t arr_u16x8[] = {0, 1, 2, 3, 4, 5, 6, 7};
+ uint16_t arr2_u16x8[] = {8, 9, 10, 11, 12, 13, 14, 15};
+ uint32_t arr_u32x4[] = {0, 1, 2, 3};
+ uint32_t arr2_u32x4[] = {4, 5, 6, 7};
+ uint64_t arr_u64x2[] = {0, 1};
+ uint64_t arr2_u64x2[] = {2, 3};
+
+ uint8_t expected_u8x8[] = {2, 3, 4, 5, 6, 7, 8, 9};
+ uint8_t expected_rot_u8x8[] = {2, 3, 4, 5, 6, 7, 0, 1};
+ uint16_t expected_u16x4[] = {2, 3, 4, 5};
+ uint16_t expected_rot_u16x4[] = {2, 3, 0, 1};
+ uint32_t expected_u32x2[] = {1, 2};
+ uint32_t expected_rot_u32x2[] = {1, 0};
+ uint8_t expected_u8x16[] = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19};
+ uint8_t expected_rot_u8x16[] = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 0, 1, 2, 3,};
+ uint16_t expected_u16x8[] = {2, 3, 4, 5, 6, 7, 8, 9};
+ uint16_t expected_rot_u16x8[] = {2, 3, 4, 5, 6, 7, 0, 1};
+ uint32_t expected_u32x4[] = {1, 2, 3, 4};
+ uint32_t expected_rot_u32x4[] = {1, 2, 3, 0};
+ uint64_t expected_u64x2[] = {1, 2};
+ uint64_t expected_rot_u64x2[] = {1, 0};
+
+ uint8x8_t vec_u8x8 = vld1_u8 (arr_u8x8);
+ uint8x8_t vec2_u8x8 = vld1_u8 (arr2_u8x8);
+ uint16x4_t vec_u16x4 = vld1_u16 (arr_u16x4);
+ uint16x4_t vec2_u16x4 = vld1_u16 (arr2_u16x4);
+ uint32x2_t vec_u32x2 = vld1_u32 (arr_u32x2);
+ uint32x2_t vec2_u32x2 = vld1_u32 (arr2_u32x2);
+ uint8x16_t vec_u8x16 = vld1q_u8 (arr_u8x16);
+ uint8x16_t vec2_u8x16 = vld1q_u8 (arr2_u8x16);
+ uint16x8_t vec_u16x8 = vld1q_u16 (arr_u16x8);
+ uint16x8_t vec2_u16x8 = vld1q_u16 (arr2_u16x8);
+ uint32x4_t vec_u32x4 = vld1q_u32 (arr_u32x4);
+ uint32x4_t vec2_u32x4 = vld1q_u32 (arr2_u32x4);
+ uint64x2_t vec_u64x2 = vld1q_u64 (arr_u64x2);
+ uint64x2_t vec2_u64x2 = vld1q_u64 (arr2_u64x2);
+
+ uint8x8_t result_u8x8;
+ uint16x4_t result_u16x4;
+ uint32x2_t result_u32x2;
+ uint8x16_t result_u8x16;
+ uint16x8_t result_u16x8;
+ uint32x4_t result_u32x4;
+ uint64x2_t result_u64x2;
+
+ union {uint8x8_t v; uint8_t buf[8];} mem_u8x8;
+ union {uint16x4_t v; uint16_t buf[4];} mem_u16x4;
+ union {uint32x2_t v; uint32_t buf[2];} mem_u32x2;
+ union {uint8x16_t v; uint8_t buf[16];} mem_u8x16;
+ union {uint16x8_t v; uint16_t buf[8];} mem_u16x8;
+ union {uint32x4_t v; uint32_t buf[4];} mem_u32x4;
+ union {uint64x2_t v; uint64_t buf[2];} mem_u64x2;
+
+ int i;
+
+ result_u8x8 = tst_vext_u8 (vec_u8x8, vec2_u8x8);
+ vst1_u8 (mem_u8x8.buf, result_u8x8);
+
+ for (i=0; i<8; i++)
+ if (mem_u8x8.buf[i] != expected_u8x8[i])
+ {
+ printf ("tst_vext_u8[%d]=%d expected %d\n",
+ i, mem_u8x8.buf[i], expected_u8x8[i]);
+ abort ();
+ }
+
+ result_u8x8 = tst_vext_u8_rotate (vec_u8x8);
+ vst1_u8 (mem_u8x8.buf, result_u8x8);
+
+ for (i=0; i<8; i++)
+ if (mem_u8x8.buf[i] != expected_rot_u8x8[i])
+ {
+ printf ("tst_vext_u8_rotate[%d]=%d expected %d\n",
+ i, mem_u8x8.buf[i], expected_rot_u8x8[i]);
+ abort ();
+ }
+
+
+ result_u16x4 = tst_vext_u16 (vec_u16x4, vec2_u16x4);
+ vst1_u16 (mem_u16x4.buf, result_u16x4);
+
+ for (i=0; i<4; i++)
+ if (mem_u16x4.buf[i] != expected_u16x4[i])
+ {
+ printf ("tst_vext_u16[%d]=%d expected %d\n",
+ i, mem_u16x4.buf[i], expected_u16x4[i]);
+ abort ();
+ }
+
+ result_u16x4 = tst_vext_u16_rotate (vec_u16x4);
+ vst1_u16 (mem_u16x4.buf, result_u16x4);
+
+ for (i=0; i<4; i++)
+ if (mem_u16x4.buf[i] != expected_rot_u16x4[i])
+ {
+ printf ("tst_vext_u16_rotate[%d]=%d expected %d\n",
+ i, mem_u16x4.buf[i], expected_rot_u16x4[i]);
+ abort ();
+ }
+
+
+ result_u32x2 = tst_vext_u32 (vec_u32x2, vec2_u32x2);
+ vst1_u32 (mem_u32x2.buf, result_u32x2);
+
+ for (i=0; i<2; i++)
+ if (mem_u32x2.buf[i] != expected_u32x2[i])
+ {
+ printf ("tst_vext_u32[%d]=%d expected %d\n",
+ i, mem_u32x2.buf[i], expected_u32x2[i]);
+ abort ();
+ }
+
+ result_u32x2 = tst_vext_u32_rotate (vec_u32x2);
+ vst1_u32 (mem_u32x2.buf, result_u32x2);
+
+ for (i=0; i<2; i++)
+ if (mem_u32x2.buf[i] != expected_rot_u32x2[i])
+ {
+ printf ("tst_vext_u32_rotate[%d]=%d expected %d\n",
+ i, mem_u32x2.buf[i], expected_rot_u32x2[i]);
+ abort ();
+ }
+
+
+ result_u8x16 = tst_vextq_u8 (vec_u8x16, vec2_u8x16);
+ vst1q_u8 (mem_u8x16.buf, result_u8x16);
+
+ for (i=0; i<16; i++)
+ if (mem_u8x16.buf[i] != expected_u8x16[i])
+ {
+ printf ("tst_vextq_u8[%d]=%d expected %d\n",
+ i, mem_u8x16.buf[i], expected_u8x16[i]);
+ abort ();
+ }
+
+ result_u8x16 = tst_vextq_u8_rotate (vec_u8x16);
+ vst1q_u8 (mem_u8x16.buf, result_u8x16);
+
+ for (i=0; i<16; i++)
+ if (mem_u8x16.buf[i] != expected_rot_u8x16[i])
+ {
+ printf ("tst_vextq_u8_rotate[%d]=%d expected %d\n",
+ i, mem_u8x16.buf[i], expected_rot_u8x16[i]);
+ abort ();
+ }
+
+ result_u16x8 = tst_vextq_u16 (vec_u16x8, vec2_u16x8);
+ vst1q_u16 (mem_u16x8.buf, result_u16x8);
+
+ for (i=0; i<8; i++)
+ if (mem_u16x8.buf[i] != expected_u16x8[i])
+ {
+ printf ("tst_vextq_u16[%d]=%d expected %d\n",
+ i, mem_u16x8.buf[i], expected_u16x8[i]);
+ abort ();
+ }
+
+ result_u16x8 = tst_vextq_u16_rotate (vec_u16x8);
+ vst1q_u16 (mem_u16x8.buf, result_u16x8);
+
+ for (i=0; i<8; i++)
+ if (mem_u16x8.buf[i] != expected_rot_u16x8[i])
+ {
+ printf ("tst_vextq_u16_rotate[%d]=%d expected %d\n",
+ i, mem_u16x8.buf[i], expected_rot_u16x8[i]);
+ abort ();
+ }
+
+ result_u32x4 = tst_vextq_u32 (vec_u32x4, vec2_u32x4);
+ vst1q_u32 (mem_u32x4.buf, result_u32x4);
+
+ for (i=0; i<4; i++)
+ if (mem_u32x4.buf[i] != expected_u32x4[i])
+ {
+ printf ("tst_vextq_u32[%d]=%d expected %d\n",
+ i, mem_u32x4.buf[i], expected_u32x4[i]);
+ abort ();
+ }
+
+ result_u32x4 = tst_vextq_u32_rotate (vec_u32x4);
+ vst1q_u32 (mem_u32x4.buf, result_u32x4);
+
+ for (i=0; i<4; i++)
+ if (mem_u32x4.buf[i] != expected_rot_u32x4[i])
+ {
+ printf ("tst_vextq_u32_rotate[%d]=%d expected %d\n",
+ i, mem_u32x4.buf[i], expected_rot_u32x4[i]);
+ abort ();
+ }
+
+ result_u64x2 = tst_vextq_u64 (vec_u64x2, vec2_u64x2);
+ vst1q_u64 (mem_u64x2.buf, result_u64x2);
+
+ for (i=0; i<2; i++)
+ if (mem_u64x2.buf[i] != expected_u64x2[i])
+ {
+ printf ("tst_vextq_u64[%d]=%lld expected %lld\n",
+ i, mem_u64x2.buf[i], expected_u64x2[i]);
+ abort ();
+ }
+
+ result_u64x2 = tst_vextq_u64_rotate (vec_u64x2);
+ vst1q_u64 (mem_u64x2.buf, result_u64x2);
+
+ for (i=0; i<2; i++)
+ if (mem_u64x2.buf[i] != expected_rot_u64x2[i])
+ {
+ printf ("tst_vextq_u64_rotate[%d]=%lld expected %lld\n",
+ i, mem_u64x2.buf[i], expected_rot_u64x2[i]);
+ abort ();
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vext.c b/gcc/testsuite/gcc.target/arm/neon-vext.c
new file mode 100644
index 0000000000..4a012a996a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vext.c
@@ -0,0 +1,115 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-require-effective-target arm_little_endian } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+uint8x8_t
+tst_vext_u8 (uint8x8_t __a, uint8x8_t __b)
+{
+ uint8x8_t __mask1 = {2, 3, 4, 5, 6, 7, 8, 9};
+
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint8x8_t
+tst_vext_u8_rotate (uint8x8_t __a)
+{
+ uint8x8_t __mask1 = {2, 3, 4, 5, 6, 7, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x4_t
+tst_vext_u16 (uint16x4_t __a, uint16x4_t __b)
+{
+ uint16x4_t __mask1 = {2, 3, 4, 5};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint16x4_t
+tst_vext_u16_rotate (uint16x4_t __a)
+{
+ uint16x4_t __mask1 = {2, 3, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint32x2_t
+tst_vext_u32 (uint32x2_t __a, uint32x2_t __b)
+{
+ uint32x2_t __mask1 = {1, 2};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+/* This one is mapped into vrev64.32. */
+uint32x2_t
+tst_vext_u32_rotate (uint32x2_t __a)
+{
+ uint32x2_t __mask1 = {1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint8x16_t
+tst_vextq_u8 (uint8x16_t __a, uint8x16_t __b)
+{
+ uint8x16_t __mask1 = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint8x16_t
+tst_vextq_u8_rotate (uint8x16_t __a)
+{
+ uint8x16_t __mask1 = {4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 0, 1, 2, 3};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint16x8_t
+tst_vextq_u16 (uint16x8_t __a, uint16x8_t __b)
+{
+ uint16x8_t __mask1 = {2, 3, 4, 5, 6, 7, 8, 9};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint16x8_t
+tst_vextq_u16_rotate (uint16x8_t __a)
+{
+ uint16x8_t __mask1 = {2, 3, 4, 5, 6, 7, 0, 1};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint32x4_t
+tst_vextq_u32 (uint32x4_t __a, uint32x4_t __b)
+{
+ uint32x4_t __mask1 = {1, 2, 3, 4};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint32x4_t
+tst_vextq_u32_rotate (uint32x4_t __a)
+{
+ uint32x4_t __mask1 = {1, 2, 3, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+uint64x2_t
+tst_vextq_u64 (uint64x2_t __a, uint64x2_t __b)
+{
+ uint64x2_t __mask1 = {1, 2};
+ return __builtin_shuffle ( __a, __b, __mask1) ;
+}
+
+uint64x2_t
+tst_vextq_u64_rotate (uint64x2_t __a)
+{
+ uint64x2_t __mask1 = {1, 0};
+ return __builtin_shuffle ( __a, __mask1) ;
+}
+
+/* { dg-final {scan-assembler-times "vext\.8\\t" 4} } */
+/* { dg-final {scan-assembler-times "vext\.16\\t" 4} } */
+/* { dg-final {scan-assembler-times "vext\.32\\t" 3} } */
+/* { dg-final {scan-assembler-times "vrev64\.32\\t" 1} } */
+/* { dg-final {scan-assembler-times "vext\.64\\t" 2} } */
diff --git a/gcc/testsuite/gcc.target/arm/neon-vfma-1.c b/gcc/testsuite/gcc.target/arm/neon-vfma-1.c
new file mode 100644
index 0000000000..a003a8274f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vfma-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+/* { dg-add-options arm_neonv2 } */
+/* { dg-final { scan-assembler "vfma\\.f32\[ \]+\[dDqQ]" } } */
+
+/* Verify that VFMA is used. */
+void f1(int n, float a, float x[], float y[]) {
+ int i;
+ for (i = 0; i < n; ++i)
+ y[i] = a * x[i] + y[i];
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vfms-1.c b/gcc/testsuite/gcc.target/arm/neon-vfms-1.c
new file mode 100644
index 0000000000..8cefd8a851
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vfms-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
+/* { dg-add-options arm_neonv2 } */
+/* { dg-final { scan-assembler "vfms\\.f32\[ \]+\[dDqQ]" } } */
+
+/* Verify that VFMS is used. */
+void f1(int n, float a, float x[], float y[]) {
+ int i;
+ for (i = 0; i < n; ++i)
+ y[i] = a * -x[i] + y[i];
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vld1_dupQ.c b/gcc/testsuite/gcc.target/arm/neon-vld1_dupQ.c
new file mode 100644
index 0000000000..cf83966434
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vld1_dupQ.c
@@ -0,0 +1,24 @@
+/* Test the `vld1q_s64' ARM Neon intrinsic. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O0" } */
+/* { dg-add-options arm_neon } */
+
+#include "arm_neon.h"
+#include <stdlib.h>
+
+int main (void)
+{
+ int64x1_t input[2] = {(int64x1_t)0x0123456776543210LL,
+ (int64x1_t)0x89abcdeffedcba90LL};
+ int64x1_t output[2] = {0, 0};
+ int64x2_t var = vld1q_dup_s64((int64_t *)input);
+
+ vst1q_s64((int64_t *)output, var);
+ if (output[0] != (int64x1_t)0x0123456776543210LL)
+ abort();
+ if (output[1] != (int64x1_t)0x0123456776543210LL)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon-vmla-1.c b/gcc/testsuite/gcc.target/arm/neon-vmla-1.c
index 9d239ed47d..c60c014e0c 100644
--- a/gcc/testsuite/gcc.target/arm/neon-vmla-1.c
+++ b/gcc/testsuite/gcc.target/arm/neon-vmla-1.c
@@ -1,10 +1,10 @@
/* { dg-require-effective-target arm_neon_hw } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
/* { dg-add-options arm_neon } */
-/* { dg-final { scan-assembler "vmla\\.f32" } } */
+/* { dg-final { scan-assembler "vmla\\.i32" } } */
/* Verify that VMLA is used. */
-void f1(int n, float a, float x[], float y[]) {
+void f1(int n, int a, int x[], int y[]) {
int i;
for (i = 0; i < n; ++i)
y[i] = a * x[i] + y[i];
diff --git a/gcc/testsuite/gcc.target/arm/neon-vmls-1.c b/gcc/testsuite/gcc.target/arm/neon-vmls-1.c
index 2beaebe17c..89ee82b0fe 100644
--- a/gcc/testsuite/gcc.target/arm/neon-vmls-1.c
+++ b/gcc/testsuite/gcc.target/arm/neon-vmls-1.c
@@ -1,10 +1,10 @@
/* { dg-require-effective-target arm_neon_hw } */
/* { dg-options "-O2 -ftree-vectorize -ffast-math" } */
/* { dg-add-options arm_neon } */
-/* { dg-final { scan-assembler "vmls\\.f32" } } */
+/* { dg-final { scan-assembler "vmls\\.i32" } } */
/* Verify that VMLS is used. */
-void f1(int n, float a, float x[], float y[]) {
+void f1(int n, int a, int x[], int y[]) {
int i;
for (i = 0; i < n; ++i)
y[i] = y[i] - a * x[i];
diff --git a/gcc/testsuite/gcc.target/arm/neon-vtst_p64.c b/gcc/testsuite/gcc.target/arm/neon-vtst_p64.c
new file mode 100644
index 0000000000..3a0b117c26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon-vtst_p64.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+#include <stdio.h>
+
+extern void abort (void);
+
+int
+main (void)
+{
+ uint64_t args[] = { 0x0, 0xdeadbeef, ~0xdeadbeef, 0xffff,
+ ~0xffff, 0xffffffff, ~0xffffffff, ~0x0 };
+ int i, j;
+
+ for (i = 0; i < sizeof (args) / sizeof (args[0]); ++i)
+ {
+ for (j = 0; j < sizeof (args) / sizeof (args[0]); ++j)
+ {
+ uint64_t a1 = args[i];
+ uint64_t a2 = args[j];
+ uint64_t res = vtst_p64 (vreinterpret_p64_u64 (a1),
+ vreinterpret_p64_u64 (a2));
+ uint64_t exp = (a1 & a2) ? ~0x0 : 0x0;
+
+ if (res != exp)
+ {
+ fprintf (stderr, "vtst_p64 (a1= %lx, a2= %lx)"
+ " returned %lx, expected %lx\n",
+ a1, a2, res, exp);
+ abort ();
+ }
+ }
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon/neon.exp b/gcc/testsuite/gcc.target/arm/neon/neon.exp
index fcc4333464..746429dadf 100644
--- a/gcc/testsuite/gcc.target/arm/neon/neon.exp
+++ b/gcc/testsuite/gcc.target/arm/neon/neon.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/arm/neon/vbslQp64.c b/gcc/testsuite/gcc.target/arm/neon/vbslQp64.c
new file mode 100644
index 0000000000..519ee370d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vbslQp64.c
@@ -0,0 +1,22 @@
+/* Test the `vbslQp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vbslQp64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ uint64x2_t arg0_uint64x2_t;
+ poly64x2_t arg1_poly64x2_t;
+ poly64x2_t arg2_poly64x2_t;
+
+ out_poly64x2_t = vbslq_p64 (arg0_uint64x2_t, arg1_poly64x2_t, arg2_poly64x2_t);
+}
+
+/* { dg-final { scan-assembler "((vbsl)|(vbit)|(vbif))\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vbslp64.c b/gcc/testsuite/gcc.target/arm/neon/vbslp64.c
new file mode 100644
index 0000000000..51929274db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vbslp64.c
@@ -0,0 +1,22 @@
+/* Test the `vbslp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vbslp64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint64x1_t arg0_uint64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+ poly64x1_t arg2_poly64x1_t;
+
+ out_poly64x1_t = vbsl_p64 (arg0_uint64x1_t, arg1_poly64x1_t, arg2_poly64x1_t);
+}
+
+/* { dg-final { scan-assembler "((vbsl)|(vbit)|(vbif))\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vcombinep64.c b/gcc/testsuite/gcc.target/arm/neon/vcombinep64.c
new file mode 100644
index 0000000000..d5e156bdf3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vcombinep64.c
@@ -0,0 +1,20 @@
+/* Test the `vcombinep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vcombinep64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x1_t arg0_poly64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ out_poly64x2_t = vcombine_p64 (arg0_poly64x1_t, arg1_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vcreatep64.c b/gcc/testsuite/gcc.target/arm/neon/vcreatep64.c
new file mode 100644
index 0000000000..7aedb73fcc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vcreatep64.c
@@ -0,0 +1,19 @@
+/* Test the `vcreatep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vcreatep64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint64_t arg0_uint64_t;
+
+ out_poly64x1_t = vcreate_p64 (arg0_uint64_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vcvtf16_f32.c b/gcc/testsuite/gcc.target/arm/neon/vcvtf16_f32.c
new file mode 100644
index 0000000000..6675596d74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vcvtf16_f32.c
@@ -0,0 +1,20 @@
+/* Test the `vcvtf16_f32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neon_fp16_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neon_fp16 } */
+
+#include "arm_neon.h"
+
+void test_vcvtf16_f32 (void)
+{
+ float16x4_t out_float16x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float16x4_t = vcvt_f16_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vcvt\.f16.f32\[ \]+\[dD\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vcvtf32_f16.c b/gcc/testsuite/gcc.target/arm/neon/vcvtf32_f16.c
new file mode 100644
index 0000000000..dd0ce1702e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vcvtf32_f16.c
@@ -0,0 +1,20 @@
+/* Test the `vcvtf32_f16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neon_fp16_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neon_fp16 } */
+
+#include "arm_neon.h"
+
+void test_vcvtf32_f16 (void)
+{
+ float32x4_t out_float32x4_t;
+ float16x4_t arg0_float16x4_t;
+
+ out_float32x4_t = vcvt_f32_f16 (arg0_float16x4_t);
+}
+
+/* { dg-final { scan-assembler "vcvt\.f32.f16\[ \]+\[qQ\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vdupQ_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vdupQ_lanep64.c
new file mode 100644
index 0000000000..6211413c76
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vdupQ_lanep64.c
@@ -0,0 +1,19 @@
+/* Test the `vdupQ_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vdupQ_lanep64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_poly64x2_t = vdupq_lane_p64 (arg0_poly64x1_t, 0);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vdupQ_np64.c b/gcc/testsuite/gcc.target/arm/neon/vdupQ_np64.c
new file mode 100644
index 0000000000..68a1d746bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vdupQ_np64.c
@@ -0,0 +1,19 @@
+/* Test the `vdupQ_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vdupQ_np64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64_t arg0_poly64_t;
+
+ out_poly64x2_t = vdupq_n_p64 (arg0_poly64_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vdup_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vdup_lanep64.c
new file mode 100644
index 0000000000..ab263f1708
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vdup_lanep64.c
@@ -0,0 +1,19 @@
+/* Test the `vdup_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vdup_lanep64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_poly64x1_t = vdup_lane_p64 (arg0_poly64x1_t, 0);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vdup_np64.c b/gcc/testsuite/gcc.target/arm/neon/vdup_np64.c
new file mode 100644
index 0000000000..3b6b7ec312
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vdup_np64.c
@@ -0,0 +1,19 @@
+/* Test the `vdup_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vdup_np64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64_t arg0_poly64_t;
+
+ out_poly64x1_t = vdup_n_p64 (arg0_poly64_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vextQp64.c b/gcc/testsuite/gcc.target/arm/neon/vextQp64.c
new file mode 100644
index 0000000000..bc5e08aa78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vextQp64.c
@@ -0,0 +1,21 @@
+/* Test the `vextQp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vextQp64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x2_t arg0_poly64x2_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ out_poly64x2_t = vextq_p64 (arg0_poly64x2_t, arg1_poly64x2_t, 0);
+}
+
+/* { dg-final { scan-assembler "vext\.64\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vextp64.c b/gcc/testsuite/gcc.target/arm/neon/vextp64.c
new file mode 100644
index 0000000000..aa1e91f59b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vextp64.c
@@ -0,0 +1,21 @@
+/* Test the `vextp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vextp64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ out_poly64x1_t = vext_p64 (arg0_poly64x1_t, arg1_poly64x1_t, 0);
+}
+
+/* { dg-final { scan-assembler "vext\.64\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vfmaQf32.c b/gcc/testsuite/gcc.target/arm/neon/vfmaQf32.c
new file mode 100644
index 0000000000..d400163a19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vfmaQf32.c
@@ -0,0 +1,22 @@
+/* Test the `vfmaQf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neonv2 } */
+
+#include "arm_neon.h"
+
+void test_vfmaQf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+ float32x4_t arg1_float32x4_t;
+ float32x4_t arg2_float32x4_t;
+
+ out_float32x4_t = vfmaq_f32 (arg0_float32x4_t, arg1_float32x4_t, arg2_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vfma\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vfmaf32.c b/gcc/testsuite/gcc.target/arm/neon/vfmaf32.c
new file mode 100644
index 0000000000..988328dd08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vfmaf32.c
@@ -0,0 +1,22 @@
+/* Test the `vfmaf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neonv2 } */
+
+#include "arm_neon.h"
+
+void test_vfmaf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+ float32x2_t arg1_float32x2_t;
+ float32x2_t arg2_float32x2_t;
+
+ out_float32x2_t = vfma_f32 (arg0_float32x2_t, arg1_float32x2_t, arg2_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vfma\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vfmsQf32.c b/gcc/testsuite/gcc.target/arm/neon/vfmsQf32.c
new file mode 100644
index 0000000000..247a8edfd2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vfmsQf32.c
@@ -0,0 +1,22 @@
+/* Test the `vfmsQf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neonv2 } */
+
+#include "arm_neon.h"
+
+void test_vfmsQf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+ float32x4_t arg1_float32x4_t;
+ float32x4_t arg2_float32x4_t;
+
+ out_float32x4_t = vfmsq_f32 (arg0_float32x4_t, arg1_float32x4_t, arg2_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vfms\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vfmsf32.c b/gcc/testsuite/gcc.target/arm/neon/vfmsf32.c
new file mode 100644
index 0000000000..7f9e8570dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vfmsf32.c
@@ -0,0 +1,22 @@
+/* Test the `vfmsf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neonv2_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_neonv2 } */
+
+#include "arm_neon.h"
+
+void test_vfmsf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+ float32x2_t arg1_float32x2_t;
+ float32x2_t arg2_float32x2_t;
+
+ out_float32x2_t = vfms_f32 (arg0_float32x2_t, arg1_float32x2_t, arg2_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vfms\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vgetQ_lanes64.c b/gcc/testsuite/gcc.target/arm/neon/vgetQ_lanes64.c
index b7f7f33502..e3d3c178e5 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vgetQ_lanes64.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vgetQ_lanes64.c
@@ -10,11 +10,11 @@
void test_vgetQ_lanes64 (void)
{
- int64_t out_int64_t;
+ register int64_t out_int64_t asm ("r0");
int64x2_t arg0_int64x2_t;
out_int64_t = vgetq_lane_s64 (arg0_int64x2_t, 0);
}
-/* { dg-final { scan-assembler "vmov\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "((vmov)|(fmrrd))\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vgetQ_laneu64.c b/gcc/testsuite/gcc.target/arm/neon/vgetQ_laneu64.c
index 33c463e640..3426e46948 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vgetQ_laneu64.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vgetQ_laneu64.c
@@ -10,11 +10,11 @@
void test_vgetQ_laneu64 (void)
{
- uint64_t out_uint64_t;
+ register uint64_t out_uint64_t asm ("r0");
uint64x2_t arg0_uint64x2_t;
out_uint64_t = vgetq_lane_u64 (arg0_uint64x2_t, 0);
}
-/* { dg-final { scan-assembler "vmov\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "((vmov)|(fmrrd))\[ \]+\[rR\]\[0-9\]+, \[rR\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vget_highp64.c b/gcc/testsuite/gcc.target/arm/neon/vget_highp64.c
new file mode 100644
index 0000000000..f2b1b7a9e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vget_highp64.c
@@ -0,0 +1,19 @@
+/* Test the `vget_highp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vget_highp64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_poly64x1_t = vget_high_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vget_lowp64.c b/gcc/testsuite/gcc.target/arm/neon/vget_lowp64.c
new file mode 100644
index 0000000000..94cd3a8ab7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vget_lowp64.c
@@ -0,0 +1,19 @@
+/* Test the `vget_lowp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vget_lowp64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_poly64x1_t = vget_low_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupp64.c b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupp64.c
new file mode 100644
index 0000000000..2d504c163a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld1Q_dupp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1Q_dupp64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+
+ out_poly64x2_t = vld1q_dup_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1Q_dups64.c b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dups64.c
index 912b93d1d6..4fceee82ed 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vld1Q_dups64.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dups64.c
@@ -15,5 +15,5 @@ void test_vld1Q_dups64 (void)
out_int64x2_t = vld1q_dup_s64 (0);
}
-/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupu64.c b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupu64.c
index 234db407b3..ef0a3828c3 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupu64.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1Q_dupu64.c
@@ -15,5 +15,5 @@ void test_vld1Q_dupu64 (void)
out_uint64x2_t = vld1q_dup_u64 (0);
}
-/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1Q_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vld1Q_lanep64.c
new file mode 100644
index 0000000000..d19267a4ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1Q_lanep64.c
@@ -0,0 +1,20 @@
+/* Test the `vld1Q_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1Q_lanep64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ out_poly64x2_t = vld1q_lane_p64 (0, arg1_poly64x2_t, 1);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1Qp64.c b/gcc/testsuite/gcc.target/arm/neon/vld1Qp64.c
new file mode 100644
index 0000000000..99ef876732
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1Qp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld1Qp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1Qp64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+
+ out_poly64x2_t = vld1q_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1_dupp64.c b/gcc/testsuite/gcc.target/arm/neon/vld1_dupp64.c
new file mode 100644
index 0000000000..f2b05c5d1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1_dupp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld1_dupp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1_dupp64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+
+ out_poly64x1_t = vld1_dup_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vld1_lanep64.c
new file mode 100644
index 0000000000..cf09f6cd64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1_lanep64.c
@@ -0,0 +1,20 @@
+/* Test the `vld1_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1_lanep64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ out_poly64x1_t = vld1_lane_p64 (0, arg1_poly64x1_t, 0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld1p64.c b/gcc/testsuite/gcc.target/arm/neon/vld1p64.c
new file mode 100644
index 0000000000..9f182d4419
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld1p64.c
@@ -0,0 +1,19 @@
+/* Test the `vld1p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld1p64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+
+ out_poly64x1_t = vld1_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld2_dupp64.c b/gcc/testsuite/gcc.target/arm/neon/vld2_dupp64.c
new file mode 100644
index 0000000000..0531a732de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld2_dupp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld2_dupp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld2_dupp64 (void)
+{
+ poly64x1x2_t out_poly64x1x2_t;
+
+ out_poly64x1x2_t = vld2_dup_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld2p64.c b/gcc/testsuite/gcc.target/arm/neon/vld2p64.c
new file mode 100644
index 0000000000..0a39b37f01
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld2p64.c
@@ -0,0 +1,19 @@
+/* Test the `vld2p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld2p64 (void)
+{
+ poly64x1x2_t out_poly64x1x2_t;
+
+ out_poly64x1x2_t = vld2_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld3_dupp64.c b/gcc/testsuite/gcc.target/arm/neon/vld3_dupp64.c
new file mode 100644
index 0000000000..23bf88aa6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld3_dupp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld3_dupp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld3_dupp64 (void)
+{
+ poly64x1x3_t out_poly64x1x3_t;
+
+ out_poly64x1x3_t = vld3_dup_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld3p64.c b/gcc/testsuite/gcc.target/arm/neon/vld3p64.c
new file mode 100644
index 0000000000..cc79928924
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld3p64.c
@@ -0,0 +1,19 @@
+/* Test the `vld3p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld3p64 (void)
+{
+ poly64x1x3_t out_poly64x1x3_t;
+
+ out_poly64x1x3_t = vld3_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld4_dupp64.c b/gcc/testsuite/gcc.target/arm/neon/vld4_dupp64.c
new file mode 100644
index 0000000000..bb15964af0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld4_dupp64.c
@@ -0,0 +1,19 @@
+/* Test the `vld4_dupp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld4_dupp64 (void)
+{
+ poly64x1x4_t out_poly64x1x4_t;
+
+ out_poly64x1x4_t = vld4_dup_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vld4p64.c b/gcc/testsuite/gcc.target/arm/neon/vld4p64.c
new file mode 100644
index 0000000000..b11fb93843
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vld4p64.c
@@ -0,0 +1,19 @@
+/* Test the `vld4p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vld4p64 (void)
+{
+ poly64x1x4_t out_poly64x1x4_t;
+
+ out_poly64x1x4_t = vld4_p64 (0);
+}
+
+/* { dg-final { scan-assembler "vld1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p128.c
new file mode 100644
index 0000000000..91cac4df5c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQf32_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQf32_p128 (void)
+{
+ float32x4_t out_float32x4_t;
+ poly128_t arg0_poly128_t;
+
+ out_float32x4_t = vreinterpretq_f32_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p64.c
new file mode 100644
index 0000000000..96909f677d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQf32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQf32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQf32_p64 (void)
+{
+ float32x4_t out_float32x4_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_float32x4_t = vreinterpretq_f32_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_f32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_f32.c
new file mode 100644
index 0000000000..aa7d2e7e7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_f32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_f32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_f32 (void)
+{
+ poly128_t out_poly128_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_poly128_t = vreinterpretq_p128_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p16.c
new file mode 100644
index 0000000000..94f2e9b4af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_p16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_p16 (void)
+{
+ poly128_t out_poly128_t;
+ poly16x8_t arg0_poly16x8_t;
+
+ out_poly128_t = vreinterpretq_p128_p16 (arg0_poly16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p64.c
new file mode 100644
index 0000000000..d32007547e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_p64 (void)
+{
+ poly128_t out_poly128_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_poly128_t = vreinterpretq_p128_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p8.c
new file mode 100644
index 0000000000..112b0c6e3c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_p8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_p8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_p8 (void)
+{
+ poly128_t out_poly128_t;
+ poly8x16_t arg0_poly8x16_t;
+
+ out_poly128_t = vreinterpretq_p128_p8 (arg0_poly8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s16.c
new file mode 100644
index 0000000000..4fa06b2382
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_s16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_s16 (void)
+{
+ poly128_t out_poly128_t;
+ int16x8_t arg0_int16x8_t;
+
+ out_poly128_t = vreinterpretq_p128_s16 (arg0_int16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s32.c
new file mode 100644
index 0000000000..5f17cb8130
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_s32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_s32 (void)
+{
+ poly128_t out_poly128_t;
+ int32x4_t arg0_int32x4_t;
+
+ out_poly128_t = vreinterpretq_p128_s32 (arg0_int32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s64.c
new file mode 100644
index 0000000000..9b83912b97
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_s64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_s64 (void)
+{
+ poly128_t out_poly128_t;
+ int64x2_t arg0_int64x2_t;
+
+ out_poly128_t = vreinterpretq_p128_s64 (arg0_int64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s8.c
new file mode 100644
index 0000000000..49e8b74b45
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_s8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_s8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_s8 (void)
+{
+ poly128_t out_poly128_t;
+ int8x16_t arg0_int8x16_t;
+
+ out_poly128_t = vreinterpretq_p128_s8 (arg0_int8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u16.c
new file mode 100644
index 0000000000..d47429aeb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_u16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_u16 (void)
+{
+ poly128_t out_poly128_t;
+ uint16x8_t arg0_uint16x8_t;
+
+ out_poly128_t = vreinterpretq_p128_u16 (arg0_uint16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u32.c
new file mode 100644
index 0000000000..57abf79a92
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_u32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_u32 (void)
+{
+ poly128_t out_poly128_t;
+ uint32x4_t arg0_uint32x4_t;
+
+ out_poly128_t = vreinterpretq_p128_u32 (arg0_uint32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u64.c
new file mode 100644
index 0000000000..4d04daaaa1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_u64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_u64 (void)
+{
+ poly128_t out_poly128_t;
+ uint64x2_t arg0_uint64x2_t;
+
+ out_poly128_t = vreinterpretq_p128_u64 (arg0_uint64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u8.c
new file mode 100644
index 0000000000..ba07bbc8ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp128_u8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp128_u8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp128_u8 (void)
+{
+ poly128_t out_poly128_t;
+ uint8x16_t arg0_uint8x16_t;
+
+ out_poly128_t = vreinterpretq_p128_u8 (arg0_uint8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p128.c
new file mode 100644
index 0000000000..27d0d0afb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp16_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp16_p128 (void)
+{
+ poly16x8_t out_poly16x8_t;
+ poly128_t arg0_poly128_t;
+
+ out_poly16x8_t = vreinterpretq_p16_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p64.c
new file mode 100644
index 0000000000..a0a3aaff49
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp16_p64 (void)
+{
+ poly16x8_t out_poly16x8_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_poly16x8_t = vreinterpretq_p16_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_f32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_f32.c
new file mode 100644
index 0000000000..9f9b1a4ea1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_f32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_f32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_f32 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_poly64x2_t = vreinterpretq_p64_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p128.c
new file mode 100644
index 0000000000..3f71295135
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_p128 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly128_t arg0_poly128_t;
+
+ out_poly64x2_t = vreinterpretq_p64_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p16.c
new file mode 100644
index 0000000000..897b7cd9d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_p16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_p16 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly16x8_t arg0_poly16x8_t;
+
+ out_poly64x2_t = vreinterpretq_p64_p16 (arg0_poly16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p8.c
new file mode 100644
index 0000000000..772b268bf8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_p8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_p8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_p8 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly8x16_t arg0_poly8x16_t;
+
+ out_poly64x2_t = vreinterpretq_p64_p8 (arg0_poly8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s16.c
new file mode 100644
index 0000000000..29f3f6c1cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_s16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_s16 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ int16x8_t arg0_int16x8_t;
+
+ out_poly64x2_t = vreinterpretq_p64_s16 (arg0_int16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s32.c
new file mode 100644
index 0000000000..fae22f65ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_s32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_s32 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ int32x4_t arg0_int32x4_t;
+
+ out_poly64x2_t = vreinterpretq_p64_s32 (arg0_int32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s64.c
new file mode 100644
index 0000000000..8769bc8e6b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_s64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_s64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ int64x2_t arg0_int64x2_t;
+
+ out_poly64x2_t = vreinterpretq_p64_s64 (arg0_int64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s8.c
new file mode 100644
index 0000000000..1163cc2b7c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_s8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_s8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_s8 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ int8x16_t arg0_int8x16_t;
+
+ out_poly64x2_t = vreinterpretq_p64_s8 (arg0_int8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u16.c
new file mode 100644
index 0000000000..f2b53260e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_u16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_u16 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ uint16x8_t arg0_uint16x8_t;
+
+ out_poly64x2_t = vreinterpretq_p64_u16 (arg0_uint16x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u32.c
new file mode 100644
index 0000000000..6b6179ba41
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_u32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_u32 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ uint32x4_t arg0_uint32x4_t;
+
+ out_poly64x2_t = vreinterpretq_p64_u32 (arg0_uint32x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u64.c
new file mode 100644
index 0000000000..655ffd4faf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_u64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_u64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ uint64x2_t arg0_uint64x2_t;
+
+ out_poly64x2_t = vreinterpretq_p64_u64 (arg0_uint64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u8.c
new file mode 100644
index 0000000000..40b40dd11d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp64_u8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp64_u8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp64_u8 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ uint8x16_t arg0_uint8x16_t;
+
+ out_poly64x2_t = vreinterpretq_p64_u8 (arg0_uint8x16_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p128.c
new file mode 100644
index 0000000000..b517a6fdfa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp8_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp8_p128 (void)
+{
+ poly8x16_t out_poly8x16_t;
+ poly128_t arg0_poly128_t;
+
+ out_poly8x16_t = vreinterpretq_p8_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p64.c
new file mode 100644
index 0000000000..9e70b8a075
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQp8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQp8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQp8_p64 (void)
+{
+ poly8x16_t out_poly8x16_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_poly8x16_t = vreinterpretq_p8_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p128.c
new file mode 100644
index 0000000000..77bfe3882a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs16_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs16_p128 (void)
+{
+ int16x8_t out_int16x8_t;
+ poly128_t arg0_poly128_t;
+
+ out_int16x8_t = vreinterpretq_s16_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p64.c
new file mode 100644
index 0000000000..41890f32aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs16_p64 (void)
+{
+ int16x8_t out_int16x8_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_int16x8_t = vreinterpretq_s16_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p128.c
new file mode 100644
index 0000000000..9a179ae3be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs32_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs32_p128 (void)
+{
+ int32x4_t out_int32x4_t;
+ poly128_t arg0_poly128_t;
+
+ out_int32x4_t = vreinterpretq_s32_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p64.c
new file mode 100644
index 0000000000..cc7ad95ea9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs32_p64 (void)
+{
+ int32x4_t out_int32x4_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_int32x4_t = vreinterpretq_s32_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p128.c
new file mode 100644
index 0000000000..adc1b9bbf0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs64_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs64_p128 (void)
+{
+ int64x2_t out_int64x2_t;
+ poly128_t arg0_poly128_t;
+
+ out_int64x2_t = vreinterpretq_s64_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p64.c
new file mode 100644
index 0000000000..89ab9ccb4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs64_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs64_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs64_p64 (void)
+{
+ int64x2_t out_int64x2_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_int64x2_t = vreinterpretq_s64_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p128.c
new file mode 100644
index 0000000000..d94090068e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs8_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs8_p128 (void)
+{
+ int8x16_t out_int8x16_t;
+ poly128_t arg0_poly128_t;
+
+ out_int8x16_t = vreinterpretq_s8_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p64.c
new file mode 100644
index 0000000000..a9adec3870
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQs8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQs8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQs8_p64 (void)
+{
+ int8x16_t out_int8x16_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_int8x16_t = vreinterpretq_s8_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p128.c
new file mode 100644
index 0000000000..792609246c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu16_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu16_p128 (void)
+{
+ uint16x8_t out_uint16x8_t;
+ poly128_t arg0_poly128_t;
+
+ out_uint16x8_t = vreinterpretq_u16_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p64.c
new file mode 100644
index 0000000000..7a9b538f23
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu16_p64 (void)
+{
+ uint16x8_t out_uint16x8_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_uint16x8_t = vreinterpretq_u16_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p128.c
new file mode 100644
index 0000000000..ce716b0ab1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu32_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu32_p128 (void)
+{
+ uint32x4_t out_uint32x4_t;
+ poly128_t arg0_poly128_t;
+
+ out_uint32x4_t = vreinterpretq_u32_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p64.c
new file mode 100644
index 0000000000..a8b709e029
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu32_p64 (void)
+{
+ uint32x4_t out_uint32x4_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_uint32x4_t = vreinterpretq_u32_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p128.c
new file mode 100644
index 0000000000..789973e0a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu64_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu64_p128 (void)
+{
+ uint64x2_t out_uint64x2_t;
+ poly128_t arg0_poly128_t;
+
+ out_uint64x2_t = vreinterpretq_u64_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p64.c
new file mode 100644
index 0000000000..38071503ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu64_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu64_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu64_p64 (void)
+{
+ uint64x2_t out_uint64x2_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_uint64x2_t = vreinterpretq_u64_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p128.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p128.c
new file mode 100644
index 0000000000..54a832cf41
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p128.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu8_p128' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu8_p128 (void)
+{
+ uint8x16_t out_uint8x16_t;
+ poly128_t arg0_poly128_t;
+
+ out_uint8x16_t = vreinterpretq_u8_p128 (arg0_poly128_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p64.c
new file mode 100644
index 0000000000..3336e6c24e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretQu8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretQu8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretQu8_p64 (void)
+{
+ uint8x16_t out_uint8x16_t;
+ poly64x2_t arg0_poly64x2_t;
+
+ out_uint8x16_t = vreinterpretq_u8_p64 (arg0_poly64x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretf32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretf32_p64.c
new file mode 100644
index 0000000000..e9714658fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretf32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretf32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretf32_p64 (void)
+{
+ float32x2_t out_float32x2_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_float32x2_t = vreinterpret_f32_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp16_p64.c
new file mode 100644
index 0000000000..4cd6818db8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp16_p64 (void)
+{
+ poly16x4_t out_poly16x4_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_poly16x4_t = vreinterpret_p16_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_f32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_f32.c
new file mode 100644
index 0000000000..d9ecd6f88c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_f32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_f32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_f32 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_poly64x1_t = vreinterpret_p64_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p16.c
new file mode 100644
index 0000000000..db437279b5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_p16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_p16 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly16x4_t arg0_poly16x4_t;
+
+ out_poly64x1_t = vreinterpret_p64_p16 (arg0_poly16x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p8.c
new file mode 100644
index 0000000000..1fb0131d8d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_p8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_p8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_p8 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly8x8_t arg0_poly8x8_t;
+
+ out_poly64x1_t = vreinterpret_p64_p8 (arg0_poly8x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s16.c
new file mode 100644
index 0000000000..528db2d57f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_s16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_s16 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ int16x4_t arg0_int16x4_t;
+
+ out_poly64x1_t = vreinterpret_p64_s16 (arg0_int16x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s32.c
new file mode 100644
index 0000000000..c6887d7e08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_s32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_s32 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ int32x2_t arg0_int32x2_t;
+
+ out_poly64x1_t = vreinterpret_p64_s32 (arg0_int32x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s64.c
new file mode 100644
index 0000000000..f2b0416490
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_s64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_s64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ int64x1_t arg0_int64x1_t;
+
+ out_poly64x1_t = vreinterpret_p64_s64 (arg0_int64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s8.c
new file mode 100644
index 0000000000..1866d19fb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_s8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_s8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_s8 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ int8x8_t arg0_int8x8_t;
+
+ out_poly64x1_t = vreinterpret_p64_s8 (arg0_int8x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u16.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u16.c
new file mode 100644
index 0000000000..7903ec26f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u16.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_u16' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_u16 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint16x4_t arg0_uint16x4_t;
+
+ out_poly64x1_t = vreinterpret_p64_u16 (arg0_uint16x4_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u32.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u32.c
new file mode 100644
index 0000000000..3d8e9e40f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u32.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_u32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_u32 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint32x2_t arg0_uint32x2_t;
+
+ out_poly64x1_t = vreinterpret_p64_u32 (arg0_uint32x2_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u64.c
new file mode 100644
index 0000000000..caa0464aac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_u64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_u64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint64x1_t arg0_uint64x1_t;
+
+ out_poly64x1_t = vreinterpret_p64_u64 (arg0_uint64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u8.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u8.c
new file mode 100644
index 0000000000..47e1dfa5f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp64_u8.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp64_u8' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp64_u8 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ uint8x8_t arg0_uint8x8_t;
+
+ out_poly64x1_t = vreinterpret_p64_u8 (arg0_uint8x8_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretp8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp8_p64.c
new file mode 100644
index 0000000000..f5eff21abb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretp8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretp8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretp8_p64 (void)
+{
+ poly8x8_t out_poly8x8_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_poly8x8_t = vreinterpret_p8_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterprets16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterprets16_p64.c
new file mode 100644
index 0000000000..127865d169
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterprets16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterprets16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterprets16_p64 (void)
+{
+ int16x4_t out_int16x4_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_int16x4_t = vreinterpret_s16_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterprets32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterprets32_p64.c
new file mode 100644
index 0000000000..f8be30b924
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterprets32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterprets32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterprets32_p64 (void)
+{
+ int32x2_t out_int32x2_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_int32x2_t = vreinterpret_s32_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterprets64_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterprets64_p64.c
new file mode 100644
index 0000000000..5f7c17bd33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterprets64_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterprets64_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterprets64_p64 (void)
+{
+ int64x1_t out_int64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_int64x1_t = vreinterpret_s64_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterprets8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterprets8_p64.c
new file mode 100644
index 0000000000..8345963ef3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterprets8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterprets8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterprets8_p64 (void)
+{
+ int8x8_t out_int8x8_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_int8x8_t = vreinterpret_s8_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretu16_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu16_p64.c
new file mode 100644
index 0000000000..34f920bbd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu16_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretu16_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretu16_p64 (void)
+{
+ uint16x4_t out_uint16x4_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_uint16x4_t = vreinterpret_u16_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretu32_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu32_p64.c
new file mode 100644
index 0000000000..b5f24fbc4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu32_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretu32_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretu32_p64 (void)
+{
+ uint32x2_t out_uint32x2_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_uint32x2_t = vreinterpret_u32_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretu64_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu64_p64.c
new file mode 100644
index 0000000000..741912a4eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu64_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretu64_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretu64_p64 (void)
+{
+ uint64x1_t out_uint64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_uint64x1_t = vreinterpret_u64_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vreinterpretu8_p64.c b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu8_p64.c
new file mode 100644
index 0000000000..907b67c157
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vreinterpretu8_p64.c
@@ -0,0 +1,19 @@
+/* Test the `vreinterpretu8_p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vreinterpretu8_p64 (void)
+{
+ uint8x8_t out_uint8x8_t;
+ poly64x1_t arg0_poly64x1_t;
+
+ out_uint8x8_t = vreinterpret_u8_p64 (arg0_poly64x1_t);
+}
+
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndaf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndaf32.c
new file mode 100644
index 0000000000..02ca465093
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndaf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndaf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndaf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_float32x2_t = vrnda_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vrinta\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndf32.c
new file mode 100644
index 0000000000..b941657357
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_float32x2_t = vrnd_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vrintz\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndmf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndmf32.c
new file mode 100644
index 0000000000..7f4e90bf33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndmf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndmf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndmf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_float32x2_t = vrndm_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vrintm\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndnf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndnf32.c
new file mode 100644
index 0000000000..df8e3e9343
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndnf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndnf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndnf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_float32x2_t = vrndn_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vrintn\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndpf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndpf32.c
new file mode 100644
index 0000000000..d3900cd78f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndpf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndpf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndpf32 (void)
+{
+ float32x2_t out_float32x2_t;
+ float32x2_t arg0_float32x2_t;
+
+ out_float32x2_t = vrndp_f32 (arg0_float32x2_t);
+}
+
+/* { dg-final { scan-assembler "vrintp\.f32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndqaf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndqaf32.c
new file mode 100644
index 0000000000..b7b5d73c48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndqaf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndqaf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndqaf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float32x4_t = vrndqa_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vrinta\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndqf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndqf32.c
new file mode 100644
index 0000000000..08b4b45f64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndqf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndqf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndqf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float32x4_t = vrndq_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vrintz\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndqmf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndqmf32.c
new file mode 100644
index 0000000000..6d16bfc933
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndqmf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndqmf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndqmf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float32x4_t = vrndqm_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vrintm\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndqnf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndqnf32.c
new file mode 100644
index 0000000000..b31ca95db4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndqnf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndqnf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndqnf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float32x4_t = vrndqn_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vrintn\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vrndqpf32.c b/gcc/testsuite/gcc.target/arm/neon/vrndqpf32.c
new file mode 100644
index 0000000000..5c4a866906
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vrndqpf32.c
@@ -0,0 +1,20 @@
+/* Test the `vrndqpf32' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_v8_neon } */
+
+#include "arm_neon.h"
+
+void test_vrndqpf32 (void)
+{
+ float32x4_t out_float32x4_t;
+ float32x4_t arg0_float32x4_t;
+
+ out_float32x4_t = vrndqp_f32 (arg0_float32x4_t);
+}
+
+/* { dg-final { scan-assembler "vrintp\.f32\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vsliQ_np64.c b/gcc/testsuite/gcc.target/arm/neon/vsliQ_np64.c
new file mode 100644
index 0000000000..cbb47285e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vsliQ_np64.c
@@ -0,0 +1,21 @@
+/* Test the `vsliQ_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vsliQ_np64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x2_t arg0_poly64x2_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ out_poly64x2_t = vsliq_n_p64 (arg0_poly64x2_t, arg1_poly64x2_t, 1);
+}
+
+/* { dg-final { scan-assembler "vsli\.64\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vsli_np64.c b/gcc/testsuite/gcc.target/arm/neon/vsli_np64.c
new file mode 100644
index 0000000000..801add49be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vsli_np64.c
@@ -0,0 +1,21 @@
+/* Test the `vsli_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vsli_np64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ out_poly64x1_t = vsli_n_p64 (arg0_poly64x1_t, arg1_poly64x1_t, 1);
+}
+
+/* { dg-final { scan-assembler "vsli\.64\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vsriQ_np64.c b/gcc/testsuite/gcc.target/arm/neon/vsriQ_np64.c
new file mode 100644
index 0000000000..d2e48165aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vsriQ_np64.c
@@ -0,0 +1,21 @@
+/* Test the `vsriQ_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vsriQ_np64 (void)
+{
+ poly64x2_t out_poly64x2_t;
+ poly64x2_t arg0_poly64x2_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ out_poly64x2_t = vsriq_n_p64 (arg0_poly64x2_t, arg1_poly64x2_t, 1);
+}
+
+/* { dg-final { scan-assembler "vsri\.64\[ \]+\[qQ\]\[0-9\]+, \[qQ\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vsri_np64.c b/gcc/testsuite/gcc.target/arm/neon/vsri_np64.c
new file mode 100644
index 0000000000..0abffc2e0e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vsri_np64.c
@@ -0,0 +1,21 @@
+/* Test the `vsri_np64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vsri_np64 (void)
+{
+ poly64x1_t out_poly64x1_t;
+ poly64x1_t arg0_poly64x1_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ out_poly64x1_t = vsri_n_p64 (arg0_poly64x1_t, arg1_poly64x1_t, 1);
+}
+
+/* { dg-final { scan-assembler "vsri\.64\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, #\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst1Q_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vst1Q_lanep64.c
new file mode 100644
index 0000000000..74a198baf8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1Q_lanep64.c
@@ -0,0 +1,20 @@
+/* Test the `vst1Q_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst1Q_lanep64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ vst1q_lane_p64 (arg0_poly64_t, arg1_poly64x2_t, 1);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst1Q_laneu64-1.c b/gcc/testsuite/gcc.target/arm/neon/vst1Q_laneu64-1.c
new file mode 100644
index 0000000000..5f4c927b6e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1Q_laneu64-1.c
@@ -0,0 +1,25 @@
+/* Test the `vst1Q_laneu64' ARM Neon intrinsic. */
+
+/* Detect ICE in the case of unaligned memory address. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-add-options arm_neon } */
+
+#include "arm_neon.h"
+
+unsigned char dummy_store[1000];
+
+void
+foo (char* addr)
+{
+ uint8x16_t vdata = vld1q_u8 (addr);
+ vst1q_lane_u64 ((uint64_t*) &dummy_store, vreinterpretq_u64_u8 (vdata), 0);
+}
+
+uint64_t
+bar (uint64x2_t vdata)
+{
+ vdata = vld1q_lane_u64 ((uint64_t*) &dummy_store, vdata, 0);
+ return vgetq_lane_u64 (vdata, 0);
+}
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst1Qp64.c b/gcc/testsuite/gcc.target/arm/neon/vst1Qp64.c
new file mode 100644
index 0000000000..7d1e020f11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1Qp64.c
@@ -0,0 +1,20 @@
+/* Test the `vst1Qp64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst1Qp64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x2_t arg1_poly64x2_t;
+
+ vst1q_p64 (arg0_poly64_t, arg1_poly64x2_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst1_lanep64.c b/gcc/testsuite/gcc.target/arm/neon/vst1_lanep64.c
new file mode 100644
index 0000000000..f8c70c3595
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1_lanep64.c
@@ -0,0 +1,20 @@
+/* Test the `vst1_lanep64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst1_lanep64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ vst1_lane_p64 (arg0_poly64_t, arg1_poly64x1_t, 0);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst1p64.c b/gcc/testsuite/gcc.target/arm/neon/vst1p64.c
new file mode 100644
index 0000000000..7329fba9d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst1p64.c
@@ -0,0 +1,20 @@
+/* Test the `vst1p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst1p64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x1_t arg1_poly64x1_t;
+
+ vst1_p64 (arg0_poly64_t, arg1_poly64x1_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+((\\\{\[dD\]\[0-9\]+\\\})|(\[dD\]\[0-9\]+)), \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst2p64.c b/gcc/testsuite/gcc.target/arm/neon/vst2p64.c
new file mode 100644
index 0000000000..3ccaa5464f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst2p64.c
@@ -0,0 +1,20 @@
+/* Test the `vst2p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst2p64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x1x2_t arg1_poly64x1x2_t;
+
+ vst2_p64 (arg0_poly64_t, arg1_poly64x1x2_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst3p64.c b/gcc/testsuite/gcc.target/arm/neon/vst3p64.c
new file mode 100644
index 0000000000..73ced95448
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst3p64.c
@@ -0,0 +1,20 @@
+/* Test the `vst3p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst3p64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x1x3_t arg1_poly64x1x3_t;
+
+ vst3_p64 (arg0_poly64_t, arg1_poly64x1x3_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vst4p64.c b/gcc/testsuite/gcc.target/arm/neon/vst4p64.c
new file mode 100644
index 0000000000..b9f7b168d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/neon/vst4p64.c
@@ -0,0 +1,20 @@
+/* Test the `vst4p64' ARM Neon intrinsic. */
+/* This file was autogenerated by neon-testgen. */
+
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_crypto_ok } */
+/* { dg-options "-save-temps -O0" } */
+/* { dg-add-options arm_crypto } */
+
+#include "arm_neon.h"
+
+void test_vst4p64 (void)
+{
+ poly64_t *arg0_poly64_t;
+ poly64x1x4_t arg1_poly64x1x4_t;
+
+ vst4_p64 (arg0_poly64_t, arg1_poly64x1x4_t);
+}
+
+/* { dg-final { scan-assembler "vst1\.64\[ \]+\\\{((\[dD\]\[0-9\]+-\[dD\]\[0-9\]+)|(\[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+, \[dD\]\[0-9\]+))\\\}, \\\[\[rR\]\[0-9\]+\(:\[0-9\]+\)?\\\]!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vtrnf32.c b/gcc/testsuite/gcc.target/arm/neon/vtrnf32.c
index a0c352e100..c5a301b993 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vtrnf32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vtrnf32.c
@@ -17,5 +17,5 @@ void test_vtrnf32 (void)
out_float32x2x2_t = vtrn_f32 (arg0_float32x2_t, arg1_float32x2_t);
}
-/* { dg-final { scan-assembler "vtrn\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vtrns32.c b/gcc/testsuite/gcc.target/arm/neon/vtrns32.c
index 2966ca5f1f..f01047497a 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vtrns32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vtrns32.c
@@ -17,5 +17,5 @@ void test_vtrns32 (void)
out_int32x2x2_t = vtrn_s32 (arg0_int32x2_t, arg1_int32x2_t);
}
-/* { dg-final { scan-assembler "vtrn\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vtrnu32.c b/gcc/testsuite/gcc.target/arm/neon/vtrnu32.c
index 9875ad3c44..74f5cace6b 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vtrnu32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vtrnu32.c
@@ -17,5 +17,5 @@ void test_vtrnu32 (void)
out_uint32x2x2_t = vtrn_u32 (arg0_uint32x2_t, arg1_uint32x2_t);
}
-/* { dg-final { scan-assembler "vtrn\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vzipf32.c b/gcc/testsuite/gcc.target/arm/neon/vzipf32.c
index d270aa13ad..6c13a07ad2 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vzipf32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vzipf32.c
@@ -17,5 +17,5 @@ void test_vzipf32 (void)
out_float32x2x2_t = vzip_f32 (arg0_float32x2_t, arg1_float32x2_t);
}
-/* { dg-final { scan-assembler "vzip\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vzips32.c b/gcc/testsuite/gcc.target/arm/neon/vzips32.c
index ce3e8117f5..663985ebe6 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vzips32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vzips32.c
@@ -17,5 +17,5 @@ void test_vzips32 (void)
out_int32x2x2_t = vzip_s32 (arg0_int32x2_t, arg1_int32x2_t);
}
-/* { dg-final { scan-assembler "vzip\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/neon/vzipu32.c b/gcc/testsuite/gcc.target/arm/neon/vzipu32.c
index 1e6d3844f1..d9a280bf4e 100644
--- a/gcc/testsuite/gcc.target/arm/neon/vzipu32.c
+++ b/gcc/testsuite/gcc.target/arm/neon/vzipu32.c
@@ -17,5 +17,5 @@ void test_vzipu32 (void)
out_uint32x2x2_t = vzip_u32 (arg0_uint32x2_t, arg1_uint32x2_t);
}
-/* { dg-final { scan-assembler "vzip\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
+/* { dg-final { scan-assembler "vuzp\.32\[ \]+\[dD\]\[0-9\]+, \[dD\]\[0-9\]+!?\(\[ \]+@\[a-zA-Z0-9 \]+\)?\n" } } */
/* { dg-final { cleanup-saved-temps } } */
diff --git a/gcc/testsuite/gcc.target/arm/nested-apcs.c b/gcc/testsuite/gcc.target/arm/nested-apcs.c
new file mode 100644
index 0000000000..9dac3043e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/nested-apcs.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-fno-omit-frame-pointer -mapcs-frame -O" } */
+
+extern void abort (void);
+
+struct x
+{
+ int y;
+ int z;
+};
+
+int __attribute__((noinline)) f (int c, int d, int e, int h, int i)
+{
+ int a;
+ struct x b;
+
+ int __attribute__((noinline)) g (int p, int q, int r, struct x s)
+ {
+ return a + p + q + r + s.y + s.z;
+ }
+
+ a = 5;
+ b.y = h;
+ b.z = i;
+
+ return g(c, d, e, b);
+}
+
+int main(void)
+{
+ if (f (1, 2, 3, 4, 5) != 20)
+ abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
new file mode 100644
index 0000000000..eb2b86ee7b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_prefer_ldrd_strd } */
+/* { dg-options "-O2" } */
+int foo(int a, int b, int* p, int *q)
+{
+ a = p[2] + p[3];
+ *q = a;
+ *p = a;
+ return a;
+}
+/* { dg-final { scan-assembler "ldrd" } } */
diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
new file mode 100644
index 0000000000..bd33076959
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_prefer_ldrd_strd } */
+/* { dg-options "-O2" } */
+void foo(int a, int b, int* p)
+{
+ p[2] = a;
+ p[3] = b;
+}
+/* { dg-final { scan-assembler "strd" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr19599.c b/gcc/testsuite/gcc.target/arm/pr19599.c
new file mode 100644
index 0000000000..c3ee22017e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr19599.c
@@ -0,0 +1,10 @@
+/* { dg-skip-if "need at least armv5te" { *-*-* } { "-march=armv[234]*" "-mthumb" } { "" } } */
+/* { dg-options "-O2 -march=armv5te -marm" } */
+/* { dg-final { scan-assembler "bx" } } */
+
+int (*indirect_func)();
+
+int indirect_call()
+{
+ return indirect_func();
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr40457-1.c b/gcc/testsuite/gcc.target/arm/pr40457-1.c
index 815fd38f09..44122bb2c3 100644
--- a/gcc/testsuite/gcc.target/arm/pr40457-1.c
+++ b/gcc/testsuite/gcc.target/arm/pr40457-1.c
@@ -7,4 +7,4 @@ int bar(int* p)
return x;
}
-/* { dg-final { scan-assembler "ldm" } } */
+/* { dg-final { scan-assembler "ldrd|ldm" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr40457-2.c b/gcc/testsuite/gcc.target/arm/pr40457-2.c
index 187f7bf7f8..31624d3512 100644
--- a/gcc/testsuite/gcc.target/arm/pr40457-2.c
+++ b/gcc/testsuite/gcc.target/arm/pr40457-2.c
@@ -7,4 +7,4 @@ void foo(int* p)
p[1] = 0;
}
-/* { dg-final { scan-assembler "stm" } } */
+/* { dg-final { scan-assembler "strd|stm" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr40457-3.c b/gcc/testsuite/gcc.target/arm/pr40457-3.c
index 9bd5a17bef..81f6a424c1 100644
--- a/gcc/testsuite/gcc.target/arm/pr40457-3.c
+++ b/gcc/testsuite/gcc.target/arm/pr40457-3.c
@@ -7,4 +7,4 @@ void foo(int* p)
p[1] = 0;
}
-/* { dg-final { scan-assembler "stm" } } */
+/* { dg-final { scan-assembler "strd|stm" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr40887.c b/gcc/testsuite/gcc.target/arm/pr40887.c
index ca896fc166..5cabe3ab7f 100644
--- a/gcc/testsuite/gcc.target/arm/pr40887.c
+++ b/gcc/testsuite/gcc.target/arm/pr40887.c
@@ -1,9 +1,10 @@
+/* { dg-skip-if "need at least armv5" { *-*-* } { "-march=armv[234]*" } { "" } } */
/* { dg-options "-O2 -march=armv5te" } */
/* { dg-final { scan-assembler "blx" } } */
-int (*indirect_func)();
+int (*indirect_func)(int x);
int indirect_call()
{
- return indirect_func();
+ return indirect_func(20) + indirect_func (40);
}
diff --git a/gcc/testsuite/gcc.target/arm/pr46975-2.c b/gcc/testsuite/gcc.target/arm/pr46975-2.c
new file mode 100644
index 0000000000..f4017e3f78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr46975-2.c
@@ -0,0 +1,10 @@
+/* { dg-options "-mthumb -O2" } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-final { scan-assembler "sub" } } */
+/* { dg-final { scan-assembler "clz" } } */
+/* { dg-final { scan-assembler "lsr.*#5" } } */
+
+int foo (int s)
+{
+ return s == 1;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr48252.c b/gcc/testsuite/gcc.target/arm/pr48252.c
index 1a06c71e1b..250d5e4d6f 100644
--- a/gcc/testsuite/gcc.target/arm/pr48252.c
+++ b/gcc/testsuite/gcc.target/arm/pr48252.c
@@ -8,8 +8,10 @@
int main(void)
{
- uint8x8_t v1 = {1, 1, 1, 1, 1, 1, 1, 1};
- uint8x8_t v2 = {2, 2, 2, 2, 2, 2, 2, 2};
+ uint8_t v1_init[8] = {1, 1, 1, 1, 1, 1, 1, 1};
+ uint8_t v2_init[8] = {2, 2, 2, 2, 2, 2, 2, 2};
+ uint8x8_t v1 = vld1_u8 (v1_init);
+ uint8x8_t v2 = vld1_u8 (v2_init);
uint8x8x2_t vd1, vd2;
union {uint8x8_t v; uint8_t buf[8];} d1, d2, d3, d4;
int i;
diff --git a/gcc/testsuite/gcc.target/arm/pr50318-1.c b/gcc/testsuite/gcc.target/arm/pr50318-1.c
index 05885e1b5a..be270eefae 100644
--- a/gcc/testsuite/gcc.target/arm/pr50318-1.c
+++ b/gcc/testsuite/gcc.target/arm/pr50318-1.c
@@ -8,4 +8,4 @@ long long test (unsigned int sec, unsigned long long nsecs)
long)nsecs;
}
-/* { dg-final { scan-assembler "umlal" } } */
+/* { dg-final { scan-assembler "smlal" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr52686.c b/gcc/testsuite/gcc.target/arm/pr52686.c
new file mode 100644
index 0000000000..66cbc575ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr52686.c
@@ -0,0 +1,19 @@
+/* PR target/52375 */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_neon_ok } */
+/* { dg-options "-march=armv7-a -mfloat-abi=softfp -mfpu=neon -O -ftree-vectorize" } */
+
+unsigned int output[4];
+
+void test (unsigned short *p)
+{
+ unsigned int x = *p;
+ if (x)
+ {
+ output[0] = x << 1;
+ output[1] = x << 1;
+ output[2] = x << 1;
+ output[3] = x << 1;
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr53447-1.c b/gcc/testsuite/gcc.target/arm/pr53447-1.c
new file mode 100644
index 0000000000..dc094180c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53447-1.c
@@ -0,0 +1,8 @@
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+void t0p(long long * p)
+{
+ *p += 0x100000001;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr53447-2.c b/gcc/testsuite/gcc.target/arm/pr53447-2.c
new file mode 100644
index 0000000000..9a2b0315c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53447-2.c
@@ -0,0 +1,8 @@
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+void t0p(long long * p)
+{
+ *p -= 0x100000008;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr53447-3.c b/gcc/testsuite/gcc.target/arm/pr53447-3.c
new file mode 100644
index 0000000000..8e48f119b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53447-3.c
@@ -0,0 +1,9 @@
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+
+void t0p(long long * p)
+{
+ *p +=0x1fffffff8;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr53447-4.c b/gcc/testsuite/gcc.target/arm/pr53447-4.c
new file mode 100644
index 0000000000..22acb97270
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53447-4.c
@@ -0,0 +1,9 @@
+/* { dg-options "-O2" } */
+/* { dg-require-effective-target arm32 } */
+/* { dg-final { scan-assembler-not "mov" } } */
+
+
+void t0p(long long * p)
+{
+ *p -=0x1fffffff8;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr53636.c b/gcc/testsuite/gcc.target/arm/pr53636.c
new file mode 100644
index 0000000000..dbad7957e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53636.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-O -ftree-vectorize" } */
+/* { dg-add-options arm_neon } */
+
+void fill (short *buf) __attribute__ ((noinline));
+void fill (short *buf)
+{
+ int i;
+
+ for (i = 0; i < 11 * 8; i++)
+ buf[i] = i;
+}
+
+void test (unsigned char *dst) __attribute__ ((noinline));
+void test (unsigned char *dst)
+{
+ short tmp[11 * 8], *tptr;
+ int i;
+
+ fill (tmp);
+
+ tptr = tmp;
+ for (i = 0; i < 8; i++)
+ {
+ dst[0] = (-tptr[0] + 9 * tptr[0 + 1] + 9 * tptr[0 + 2] - tptr[0 + 3]) >> 7;
+ dst[1] = (-tptr[1] + 9 * tptr[1 + 1] + 9 * tptr[1 + 2] - tptr[1 + 3]) >> 7;
+ dst[2] = (-tptr[2] + 9 * tptr[2 + 1] + 9 * tptr[2 + 2] - tptr[2 + 3]) >> 7;
+ dst[3] = (-tptr[3] + 9 * tptr[3 + 1] + 9 * tptr[3 + 2] - tptr[3 + 3]) >> 7;
+ dst[4] = (-tptr[4] + 9 * tptr[4 + 1] + 9 * tptr[4 + 2] - tptr[4 + 3]) >> 7;
+ dst[5] = (-tptr[5] + 9 * tptr[5 + 1] + 9 * tptr[5 + 2] - tptr[5 + 3]) >> 7;
+ dst[6] = (-tptr[6] + 9 * tptr[6 + 1] + 9 * tptr[6 + 2] - tptr[6 + 3]) >> 7;
+ dst[7] = (-tptr[7] + 9 * tptr[7 + 1] + 9 * tptr[7 + 2] - tptr[7 + 3]) >> 7;
+
+ dst += 8;
+ tptr += 11;
+ }
+}
+
+int main (void)
+{
+ char buf [8 * 8];
+
+ test (buf);
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr53859.c b/gcc/testsuite/gcc.target/arm/pr53859.c
new file mode 100644
index 0000000000..003489e0bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr53859.c
@@ -0,0 +1,11 @@
+/* PR target/53859 */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-mcpu=cortex-m4 -mthumb -O2" } */
+
+void bar (int,int,char* ,int);
+
+void foo (char c)
+{
+ bar (1,2,&c,3);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr54051.c b/gcc/testsuite/gcc.target/arm/pr54051.c
new file mode 100644
index 0000000000..1d2e93c894
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr54051.c
@@ -0,0 +1,20 @@
+/* { dg-do assemble } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+
+int32_t a __attribute__ ((aligned (64)));
+
+int32x2x3_t test (void)
+{
+ return vld3_dup_s32 (&a);
+}
+
+int32x2x3_t test1 (void)
+{
+ int32x2x3_t res ;
+ return vld3_lane_s32 (&a, res, 1);
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr54300.C b/gcc/testsuite/gcc.target/arm/pr54300.C
new file mode 100644
index 0000000000..eb1a74e36c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr54300.C
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+#include <stdlib.h>
+
+struct __attribute__ ((aligned(8))) _v16u8_ {
+ uint8x16_t val;
+ _v16u8_( const int16x8_t &src) { val = vreinterpretq_u8_s16(src); }
+ operator int16x8_t () const { return vreinterpretq_s16_u8(val); }
+};
+typedef struct _v16u8_ v16u8;
+
+struct __attribute__ ((aligned(4))) _v8u8_ {
+ uint8x8_t val;
+ _v8u8_( const uint8x8_t &src) { val = src; }
+ operator int16x4_t () const { return vreinterpret_s16_u8(val); }
+};
+typedef struct _v8u8_ v8u8;
+
+typedef v16u8 v8i16;
+typedef int32x4_t v4i32;
+typedef const short cv1i16;
+typedef const unsigned char cv1u8;
+typedef const v8i16 cv8i16;
+
+static inline __attribute__((always_inline)) v8u8 zero_64(){ return vdup_n_u8( 0 ); }
+
+static inline __attribute__((always_inline)) v8i16 loadlo_8i16( cv8i16* p ){
+ return vcombine_s16( vld1_s16( (cv1i16 *)p ), zero_64() );
+}
+static inline __attribute__((always_inline)) v8i16 _loadlo_8i16( cv8i16* p, int offset ){
+ return loadlo_8i16( (cv8i16*)(&((cv1u8*)p)[offset]) );
+}
+
+void __attribute__((noinline))
+test(unsigned short *_Inp, int32_t *_Out,
+ unsigned int s1v, unsigned int dv0,
+ unsigned int smask_v)
+{
+ int32x4_t c = vdupq_n_s32(0);
+
+ for(unsigned int sv=0 ; sv!=dv0 ; sv=(sv+s1v)&smask_v )
+ {
+ int32x4_t s;
+ s = vmovl_s16( vget_low_s16( _loadlo_8i16( (cv8i16*) _Inp, sv ) ) );
+ c = vaddq_s32( c, s );
+ }
+ vst1q_s32( _Out, c );
+}
+
+main()
+{
+ unsigned short a[4] = {1, 2, 3, 4};
+ int32_t b[4] = {0, 0, 0, 0};
+ test(a, b, 1, 1, ~0);
+ if (b[0] != 1 || b[1] != 2 || b[2] != 3 || b[3] != 4)
+ abort();
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr55073.C b/gcc/testsuite/gcc.target/arm/pr55073.C
new file mode 100644
index 0000000000..5575cf7791
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr55073.C
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_neon } */
+
+#include <arm_neon.h>
+#include <stdlib.h>
+
+struct __attribute__((aligned(16))) _v16u8_ {
+ uint8x16_t val;
+ _v16u8_() { }
+
+ _v16u8_( const uint8x16_t &src) { val = src; }
+ _v16u8_( const int16x8_t &src) { val = vreinterpretq_u8_s16(src); }
+ _v16u8_( const uint32x4_t &src) { val = vreinterpretq_u8_u32(src); }
+
+ operator uint8x16_t () const { return val; }
+ operator int8x16_t () const { return vreinterpretq_s8_u8 (val); }
+ operator int16x8_t () const { return vreinterpretq_s16_u8(val); }
+ operator uint32x4_t () const { return vreinterpretq_u32_u8(val); }
+ operator int32x4_t () const { return vreinterpretq_s32_u8(val); }
+};
+typedef struct _v16u8_ v16u8;
+typedef const v16u8 cv16u8;
+
+typedef v16u8 v16i8;
+typedef v16u8 v8i16;
+typedef v16u8 v4u32;
+
+inline v16u8 __attribute__((always_inline)) mergelo( const v16u8 & s, const v16u8 & t )
+{
+ uint8x8x2_t r = vzip_u8( vget_low_u8(s), vget_low_u8(t) );
+ return vcombine_u8( r.val[0], r.val[1] );
+}
+
+inline v8i16 __attribute__((always_inline)) unpacklo(const v16i8 & s)
+{
+ return vmovl_s8( vget_low_s8( s ) );
+}
+
+const uint32_t __attribute__((aligned(16))) _InA [4] = { 0xFF020001, 0xFF020001, 0xFF000101, 0xFF000101 } ;
+const uint32_t __attribute__((aligned(16))) _InB [4] = { 0xFF050002, 0xFF050002, 0xFF000303, 0xFF000203 } ;
+
+__attribute__((noinline)) v16i8 test_func(void)
+{
+ v16u8 A = vld1q_u8( (uint8_t*) _InA );
+ v16u8 B = vld1q_u8( (uint8_t*) _InB );
+ v8i16 r = vdupq_n_s16(2);
+
+ v16u8 _0 = mergelo( A, B );
+ v16u8 _1 = mergelo( B, A );
+
+ v16u8 _2 = mergelo( _0, _1 );
+ v16u8 _3 = mergelo( _1, _0 );
+
+ v8i16 _4 = vsubq_s16( unpacklo( _2 ), r );
+ v8i16 _5 = vsubq_s16( unpacklo( _3 ), r );
+
+ v8i16 ret = vaddq_s16( _4, _5 );
+
+ return ( ret );
+}
+
+int main (int argc, char **argv)
+{
+ v16u8 val = test_func();
+
+ if (vgetq_lane_u32( val, 0 ) != 0xffffffff
+ || vgetq_lane_u32( val, 1 ) != 0xffffffff
+ || vgetq_lane_u32( val, 2 ) != 0xfffcfffc
+ || vgetq_lane_u32( val, 3 ) != 0xfffcfffc)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr55642.c b/gcc/testsuite/gcc.target/arm/pr55642.c
new file mode 100644
index 0000000000..10f2daa252
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr55642.c
@@ -0,0 +1,15 @@
+/* { dg-options "-mthumb -O2" } */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+
+int
+foo (int v)
+{
+ register int i asm ("r0");
+ register int j asm ("r1");
+ if (v > 1)
+ i = abs (j);
+
+ return i;
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr56184.C b/gcc/testsuite/gcc.target/arm/pr56184.C
new file mode 100644
index 0000000000..5d23c40c58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr56184.C
@@ -0,0 +1,258 @@
+/* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
+/* { dg-options "-fno-short-enums -O2 -mthumb -march=armv7-a -mfpu=neon -mfloat-abi=softfp -mtune=cortex-a9 -fno-section-anchors" } */
+
+typedef unsigned int size_t;
+__extension__ typedef int __intptr_t;
+typedef __intptr_t intptr_t;
+typedef union tree_node *tree;
+typedef const union tree_node *const_tree;
+extern void *ggc_internal_cleared_alloc_stat (size_t )
+ __attribute__ ((__malloc__));
+enum tree_code {
+TREE_LIST=2,
+FUNCTION_DECL,
+MAX_TREE_CODES=254
+};
+extern unsigned char tree_contains_struct[MAX_TREE_CODES][64];
+struct tree_base {
+ enum tree_code code : 16;
+};
+struct tree_common {
+ tree chain;
+};
+enum tree_node_structure_enum {
+TS_COMMON,
+TS_DECL_COMMON,
+};
+extern void tree_contains_struct_check_failed (const_tree,
+ const enum tree_node_structure_enum,
+ const char *, int, const char *)
+ __attribute__ ((__noreturn__));
+extern void tree_check_failed (const_tree, const char *, int, const char *,
+ ...) __attribute__ ((__noreturn__));
+struct tree_list {
+ tree value;
+};
+struct tree_decl_common {
+ tree initial;
+};
+struct tree_function_decl {
+ struct function *f;
+};
+union
+ tree_node {
+ struct tree_base base;
+ struct tree_common common;
+ struct tree_decl_common decl_common;
+ struct tree_function_decl function_decl;
+ struct tree_list list;
+};
+inline tree
+tree_check (tree __t, const char *__f, int __l, const char *__g, enum tree_code __c)
+{
+ if (((enum tree_code) (__t)->base.code) != __c)
+ tree_check_failed (__t, __f, __l, __g, __c, 0);
+}
+inline tree
+contains_struct_check (tree __t, const enum tree_node_structure_enum __s,
+ const char *__f, int __l, const char *__g)
+{
+ if (tree_contains_struct[((enum tree_code) (__t)->base.code)][__s] != 1)
+ tree_contains_struct_check_failed (__t, __s, __f, __l, __g);
+}
+struct function {
+ tree static_chain_decl;
+};
+enum gimple_code {
+ LAST_AND_UNUSED_GIMPLE_CODE
+};
+struct eh_catch_d
+{
+ struct eh_catch_d *next_catch;
+ struct eh_catch_d *prev_catch;
+ tree type_list;
+ tree filter_list;
+ tree label;
+};
+struct eh_region_d
+{
+ struct eh_region_d *outer;
+ struct eh_region_d *inner;
+ int index;
+ union eh_region_u {
+ struct eh_region_u_try {
+ struct eh_catch_d *first_catch;
+ } eh_try;
+ } u;
+};
+typedef struct eh_catch_d *eh_catch;
+typedef struct eh_region_d *eh_region;
+extern void add_type_for_runtime (tree);
+enum LTO_tags
+{
+ LTO_null = 0,
+ LTO_bb0 = 1 + MAX_TREE_CODES + LAST_AND_UNUSED_GIMPLE_CODE,
+ LTO_ert_cleanup,
+ LTO_NUM_TAGS
+};
+enum lto_section_type
+{
+ LTO_section_function_body,
+};
+struct lto_input_block
+{
+ const char *data;
+ unsigned int p;
+ unsigned int len;
+};
+extern void lto_section_overrun (struct lto_input_block *) __attribute__ ((__noreturn__));
+extern void lto_value_range_error (const char *,
+ long long, long long,
+ long long) __attribute__ ((__noreturn__));
+long long streamer_read_hwi (struct lto_input_block *);
+static inline unsigned char
+streamer_read_uchar (struct lto_input_block *ib)
+{
+ if (ib->p >= ib->len)
+ lto_section_overrun (ib);
+ return (ib->data[ib->p++]);
+}
+static inline long long
+streamer_read_hwi_in_range (struct lto_input_block *ib,
+ const char *purpose,
+ long long min,
+ long long max)
+{
+ long long range = max - min;
+ long long val = streamer_read_uchar (ib);
+ if (range >= 0xff)
+ val |= ((long long)streamer_read_uchar (ib)) << 8;
+ if (val < min || val > max)
+ lto_value_range_error (purpose, val, min, max);
+ return val;
+}
+static inline enum LTO_tags
+streamer_read_record_start (struct lto_input_block *ib)
+{
+ return (enum LTO_tags)streamer_read_hwi_in_range ((ib), "LTO_tags", 0, (int)(LTO_NUM_TAGS) - 1);
+}
+struct streamer_hooks {
+ tree (*read_tree) (struct lto_input_block *, struct data_in *);
+};
+extern struct streamer_hooks streamer_hooks;
+static struct eh_catch_d *
+lto_input_eh_catch_list (struct lto_input_block *ib, struct data_in *data_in,
+ eh_catch *last_p)
+{
+ eh_catch first;
+ enum LTO_tags tag;
+ *last_p = first = __null;
+ tag = streamer_read_record_start (ib);
+ while (tag)
+ {
+ tree list;
+ eh_catch n;
+ n = ((struct eh_catch_d *)(ggc_internal_cleared_alloc_stat (sizeof (struct eh_catch_d) )));
+ n->type_list = streamer_hooks.read_tree(ib, data_in);
+ n->filter_list = streamer_hooks.read_tree(ib, data_in);
+ n->label = streamer_hooks.read_tree(ib, data_in);
+ for (list = n->filter_list; list; list = ((contains_struct_check ((list), (TS_COMMON), "../../../gcc-4.8~svn195526/gcc/lto-streamer-in.c", 275, __FUNCTION__))->common.chain))
+ add_type_for_runtime (((tree_check ((list), "../../../gcc-4.8~svn195526/gcc/lto-streamer-in.c", 276, __FUNCTION__, (TREE_LIST)))->list.value));
+ if (*last_p)
+ (*last_p)->next_catch = n;
+ n->prev_catch = *last_p;
+ *last_p = n;
+ if (first == __null)
+ first = n;
+ tag = streamer_read_record_start (ib);
+ }
+ return first;
+}
+static eh_region
+input_eh_region (struct lto_input_block *ib, struct data_in *data_in, int ix)
+{
+ enum LTO_tags tag;
+ eh_region r;
+ tag = streamer_read_record_start (ib);
+ if (tag == LTO_null)
+ return __null;
+ r = ((struct eh_region_d *)(ggc_internal_cleared_alloc_stat (sizeof (struct eh_region_d) )));
+ r->index = streamer_read_hwi (ib);
+ r->outer = (eh_region) (intptr_t) streamer_read_hwi (ib);
+ r->inner = (eh_region) (intptr_t) streamer_read_hwi (ib);
+ switch (tag)
+ {
+ case LTO_ert_cleanup:
+ {
+ struct eh_catch_d *last_catch;
+ r->u.eh_try.first_catch = lto_input_eh_catch_list (ib, data_in,
+ &last_catch);
+ }
+ {
+ tree l;
+ add_type_for_runtime (((tree_check ((l), "../../../gcc-4.8~svn195526/gcc/lto-streamer-in.c", 346, __FUNCTION__, (TREE_LIST)))->list.value));
+ }
+ }
+}
+static void
+input_eh_regions (struct lto_input_block *ib, struct data_in *data_in,
+ struct function *fn)
+{
+ long long i, root_region, len;
+ enum LTO_tags tag;
+ tag = streamer_read_record_start (ib);
+ if (tag == LTO_null)
+ return;
+ len = streamer_read_hwi (ib);
+ if (len > 0)
+ {
+ for (i = 0; i < len; i++)
+ {
+ eh_region r = input_eh_region (ib, data_in, i);
+ }
+ }
+}
+static void
+input_ssa_names (struct lto_input_block *ib, struct data_in *data_in,
+ struct function *fn)
+{
+ unsigned int i, size;
+ while (i)
+ {
+ }
+}
+static void
+input_struct_function_base (struct function *fn, struct data_in *data_in,
+ struct lto_input_block *ib)
+{
+ fn->static_chain_decl = streamer_hooks.read_tree(ib, data_in);
+}
+static void
+input_function (tree fn_decl, struct data_in *data_in,
+ struct lto_input_block *ib)
+{
+ struct function *fn;
+ enum LTO_tags tag;
+ fn = ((tree_check ((fn_decl), "../../../gcc-4.8~svn195526/gcc/lto-streamer-in.c", 807, __FUNCTION__, (FUNCTION_DECL)))->function_decl.f);
+ tag = streamer_read_record_start (ib);
+ input_struct_function_base (fn, data_in, ib);
+ input_ssa_names (ib, data_in, fn);
+ input_eh_regions (ib, data_in, fn);
+ ((contains_struct_check ((fn_decl), (TS_DECL_COMMON), "../../../gcc-4.8~svn195526/gcc/lto-streamer-in.c", 823, __FUNCTION__))->decl_common.initial) = streamer_hooks.read_tree(ib, data_in);
+}
+static void
+lto_read_body (struct lto_file_decl_data *file_data, tree fn_decl,
+ const char *data, enum lto_section_type section_type)
+{
+ struct data_in *data_in;
+ struct lto_input_block ib_main;
+ input_function (fn_decl, data_in, &ib_main);
+}
+void
+lto_input_function_body (struct lto_file_decl_data *file_data,
+ tree fn_decl, const char *data)
+{
+ lto_read_body (file_data, fn_decl, data, LTO_section_function_body);
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr56732-1.c b/gcc/testsuite/gcc.target/arm/pr56732-1.c
new file mode 100644
index 0000000000..ac8b8cf670
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr56732-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target naked_functions } */
+/* { dg-options "-O2 -Wall" } */
+extern void bar();
+
+void __attribute__((__naked__))
+foo(void)
+{
+ bar ();
+}
+
+int __attribute__((naked))
+zoo (int a, int b, int c, int d, int e, int f)
+{
+ bar ();
+ return e;
+}
+/* Verify that __attribute__((naked)) produces a naked function that
+ does not use bx to return. */
+/* { dg-final { scan-assembler-not "\tbx\tlr" } } */
diff --git a/gcc/testsuite/gcc.target/arm/pr57637.c b/gcc/testsuite/gcc.target/arm/pr57637.c
new file mode 100644
index 0000000000..2b9bfdded7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr57637.c
@@ -0,0 +1,206 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -fno-inline" } */
+
+typedef struct _GtkCssStyleProperty GtkCssStyleProperty;
+
+struct _GtkCssStyleProperty
+{
+ int *initial_value;
+ unsigned int id;
+ unsigned int inherit :1;
+ unsigned int animated :1;
+ unsigned int affects_size :1;
+ unsigned int affects_font :1;
+
+ int * parse_value;
+ int * query_value;
+ int * assign_value;
+};
+
+void
+g_assertion_message_expr (const char *domain,
+ const char *file,
+ int line,
+ const char *func,
+ const char *expr) __attribute__((__noreturn__));
+
+void
+g_assertion_message_expr (const char *domain,
+ const char *file,
+ int line,
+ const char *func,
+ const char *expr)
+{
+ __builtin_abort ();
+}
+int
+get_id (GtkCssStyleProperty *property)
+{
+ return 1;
+}
+int
+_gtk_css_style_property_get_type ()
+{
+ return 1;
+}
+
+GtkCssStyleProperty *
+g_object_new (int object_type,
+ const char *first_property_name,
+ ...)
+{
+ return (GtkCssStyleProperty *) __builtin_malloc (sizeof (GtkCssStyleProperty));
+}
+
+typedef enum {
+ INHERIT = (1 << 0),
+ ANIMATED = (1 << 1),
+ RESIZE = (1 << 2),
+ FONT = (1 << 3)
+} GtkStylePropertyFlags;
+
+int t = 0;
+void
+gtk_css_style_property_register (const char * name,
+ int expected_id,
+ int value_type,
+ int flags,
+ int *parse_value,
+ int *query_value,
+ int *assign_value,
+ int *initial_value)
+{
+ GtkCssStyleProperty *node;
+
+ do
+ {
+ if (__builtin_expect (__extension__ (
+ {
+ int _g_boolean_var_;
+ if (initial_value != ((void *)0))
+ _g_boolean_var_ = 1;
+ else
+ _g_boolean_var_ = 0;
+ _g_boolean_var_;
+ }),
+ 1))
+ ;
+ else
+ g_assertion_message_expr ("Gtk",
+ "gtkcssstylepropertyimpl.c",
+ 85,
+ ((const char*) (__PRETTY_FUNCTION__)),
+ "initial_value != NULL");
+ } while (0);
+
+ do
+ {
+ if (__builtin_expect (__extension__ (
+ {
+ int _g_boolean_var_;
+ if (parse_value != ((void *)0))
+ _g_boolean_var_ = 1;
+ else
+ _g_boolean_var_ = 0;
+ _g_boolean_var_;
+ }),
+ 1))
+ ;
+ else
+ g_assertion_message_expr ("Gtk",
+ "gtkcssstylepropertyimpl.c",
+ 86,
+ ((const char*) (__PRETTY_FUNCTION__)),
+ "parse_value != NULL");
+ } while (0);
+
+ do
+ {
+ if (__builtin_expect (__extension__ (
+ {
+ int _g_boolean_var_;
+ if (value_type == ((int) ((1) << (2)))
+ || query_value != ((void *)0))
+ _g_boolean_var_ = 1;
+ else
+ _g_boolean_var_ = 0;
+ _g_boolean_var_;
+ }),
+ 1))
+ ;
+ else
+ g_assertion_message_expr ("Gtk",
+ "gtkcssstylepropertyimpl.c",
+ 87, ((const char*) (__PRETTY_FUNCTION__)),
+ "value_type == NONE || query_value != NULL");
+ } while (0);
+
+ /* FLAGS is changed in a cond_exec instruction with pr57637. */
+ if (flags == 15)
+ t = 15;
+
+ do
+ {
+ if (__builtin_expect (__extension__ (
+ {
+ int _g_boolean_var_;
+ if (value_type == ((1) << (2))
+ || assign_value != ((void *)0))
+ _g_boolean_var_ = 1;
+ else
+ _g_boolean_var_ = 0;
+ _g_boolean_var_;
+ }),
+ 1))
+ ;
+ else
+ g_assertion_message_expr ("Gtk",
+ "gtkcssstylepropertyimpl.c",
+ 88, ((const char*) (__PRETTY_FUNCTION__)),
+ "value_type == NONE || assign_value != NULL");
+ } while (0);
+
+ node = g_object_new ((_gtk_css_style_property_get_type ()),
+ "value-type", value_type,
+ "affects-size", (flags & RESIZE) ? (0) : (!(0)),
+ "affects-font", (flags & FONT) ? (!(0)) : (0),
+ "animated", (flags & ANIMATED) ? (!(0)) : (0),
+ "inherit", (flags & INHERIT) ? (!(0)) : (0),
+ "initial-value", initial_value,
+ "name", name,
+ ((void *)0));
+
+ node->parse_value = parse_value;
+ node->query_value = query_value;
+ node->assign_value = assign_value;
+
+ do
+ {
+ if (__builtin_expect (__extension__ (
+ {
+ int _g_boolean_var_;
+ if (get_id (node) == expected_id)
+ _g_boolean_var_ = 1;
+ else
+ _g_boolean_var_ = 0;
+ _g_boolean_var_;
+ }),
+ 1))
+ ;
+ else
+ g_assertion_message_expr ("Gtk",
+ "gtkcssstylepropertyimpl.c",
+ 106,
+ ((const char*) (__PRETTY_FUNCTION__)),
+ "get_id (node) == expected_id");
+ } while (0);
+}
+
+int main ()
+{
+ gtk_css_style_property_register ("test", 1, 4, 15, &t, &t, &t, &t);
+
+ if (t != 15)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr58041.c b/gcc/testsuite/gcc.target/arm/pr58041.c
new file mode 100644
index 0000000000..481a72b81c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr58041.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mno-unaligned-access" } */
+/* { dg-final { scan-assembler "ldrb" } } */
+/* { dg-final { scan-assembler "strb" } } */
+
+struct s
+{
+ char u;
+ long long v[2];
+} __attribute__((packed,aligned(1)));
+
+__attribute__((noinline, noclone))
+long long foo(struct s *x, int y, long long z)
+{
+ long long a = x->v[y];
+ x->v[y] = z;
+ return a;
+}
+
+struct s a = {0,{0,0}};
+int main()
+{
+ if (foo(&a,0,1) != 0)
+ __builtin_abort();
+ if (foo(&a,0,2) != 1)
+ __builtin_abort();
+ if (foo(&a,1,1) != 0)
+ __builtin_abort();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr58578.c b/gcc/testsuite/gcc.target/arm/pr58578.c
new file mode 100644
index 0000000000..2b474f544f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr58578.c
@@ -0,0 +1,54 @@
+
+/* PR target/58578 */
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+#include <stdlib.h>
+
+typedef struct {
+ long _prec;
+ int _flag;
+ long _exp;
+} __my_st_t;
+
+typedef __my_st_t *__my_st_ptr;
+
+int
+_test_fn (__my_st_ptr y, const __my_st_ptr xt)
+{
+ int inexact;
+ if (xt->_exp != -2147483647L)
+ {
+ (y->_flag = xt->_flag);
+ }
+
+ do {
+ __my_st_ptr _y = y;
+ long _err1 = -2 * xt->_exp;
+ long _err2 = 2;
+ if (0 < _err1)
+ {
+ unsigned long _err = (unsigned long) _err1 + _err2;
+ if (__builtin_expect(!!(_err > _y->_prec + 1), 0))
+ return 2;
+ return 3;
+ }
+ } while (0);
+
+ return 0;
+}
+
+int main ()
+{
+ __my_st_t x, y;
+ long pz;
+ int inex;
+
+ x._prec = 914;
+ y._exp = 18;
+ if (_test_fn (&x, &y))
+ {
+ abort();
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr58784.c b/gcc/testsuite/gcc.target/arm/pr58784.c
new file mode 100644
index 0000000000..9a1fcff1cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr58784.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { arm_thumb1 } { "*" } { "" } } */
+/* { dg-options "-march=armv7-a -mfloat-abi=hard -mfpu=neon -marm -O2" } */
+
+typedef struct __attribute__ ((__packed__))
+{
+ char valueField[2];
+} ptp_tlv_t;
+typedef struct __attribute__ ((__packed__))
+{
+ char stepsRemoved;
+ ptp_tlv_t tlv[1];
+} ptp_message_announce_t;
+int ptplib_send_announce(int sequenceId, int i)
+{
+ ptp_message_announce_t tx_packet;
+ ((long long *)tx_packet.tlv[0].valueField)[sequenceId] = i;
+ f(&tx_packet);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr59575.c b/gcc/testsuite/gcc.target/arm/pr59575.c
new file mode 100644
index 0000000000..13494f4635
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr59575.c
@@ -0,0 +1,15 @@
+/* PR target/59575 */
+/* { dg-do compile } */
+/* { dg-options "-Os -g -march=armv7-a" } */
+
+void foo (int *);
+int *bar (int, long long, int);
+
+void
+test (int *p)
+{
+ if (p)
+ foo (p);
+ else if (p = bar (0, 1, 2))
+ foo (p);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr59858.c b/gcc/testsuite/gcc.target/arm/pr59858.c
new file mode 100644
index 0000000000..a944b9afa8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr59858.c
@@ -0,0 +1,163 @@
+/* { dg-do compile } */
+/* { dg-options "-march=armv5te -fno-builtin -mfloat-abi=soft -mthumb -fno-stack-protector -Os -fno-tree-loop-optimize -fno-tree-dominator-opts -fPIC -w" } */
+/* { dg-skip-if "Incompatible command line options: -mfloat-abi=soft -mfloat-abi=hard" { *-*-* } { "-mfloat-abi=hard" } { "" } } */
+
+typedef enum {
+ REG_ENOSYS = -1,
+} reg_errcode_t;
+typedef unsigned long int bitset_word_t;
+typedef bitset_word_t bitset_t[(256 / (sizeof (bitset_word_t) * 8))];
+typedef bitset_word_t *re_bitset_ptr_t;
+typedef const bitset_word_t *re_const_bitset_ptr_t;
+typedef struct {
+ int nelem;
+ int *elems;
+} re_node_set;
+typedef enum {
+ CHARACTER = 1,
+} re_token_type_t;
+typedef struct {
+ re_token_type_t type:8;
+ unsigned int word_char:1;
+} re_token_t;
+struct re_string_t {
+ const unsigned char *raw_mbs;
+ int raw_mbs_idx;
+ int cur_idx;
+ unsigned int tip_context;
+ re_const_bitset_ptr_t word_char;
+};
+typedef struct re_string_t re_string_t;
+typedef struct re_dfa_t re_dfa_t;
+struct re_dfastate_t {
+ re_node_set nodes;
+};
+typedef struct re_dfastate_t re_dfastate_t;
+typedef struct {
+ re_dfastate_t **array;
+} state_array_t;
+typedef struct {
+ state_array_t path;
+} re_sub_match_last_t;
+typedef struct {
+ int nlasts;
+ re_sub_match_last_t **lasts;
+} re_sub_match_top_t;
+typedef struct {
+ re_string_t input;
+ const re_dfa_t *dfa;
+ int nsub_tops;
+ re_sub_match_top_t **sub_tops;
+} re_match_context_t;
+struct re_dfa_t {
+ re_token_t *nodes;
+ re_bitset_ptr_t sb_char;
+ int mb_cur_max;
+ bitset_t word_char;
+} bracket_elem_t;
+static reg_errcode_t
+re_string_reconstruct (
+ re_string_t * pstr,
+ int idx,
+ int eflags
+)
+{
+ int offset = idx - pstr->raw_mbs_idx;
+ int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
+ pstr->tip_context = ((pstr->word_char[c] & ((bitset_word_t) 1)) ? : (c));
+}
+
+static void match_ctx_clean (
+ re_match_context_t *
+);
+static int check_matching (
+);
+static re_dfastate_t *transit_state (
+);
+static int build_trtable (
+);
+re_search_internal (int eflags
+)
+{
+ reg_errcode_t err;
+ int incr;
+ int
+ match_first,
+ match_last = -1;
+ re_match_context_t mctx;
+ err = re_string_allocate (&mctx.input);
+ for (;; match_first += incr)
+ {
+ err = re_string_reconstruct (&mctx.input, match_first, eflags);
+ err = re_string_reconstruct (&mctx.input, match_first, eflags);
+ match_last = check_matching (&mctx, &match_first);
+ match_ctx_clean (&mctx);
+ }
+}
+
+check_matching (re_match_context_t * mctx, int *p_match_first
+)
+{
+ int cur_str_idx = ((&mctx->input)->cur_idx);
+ re_dfastate_t *cur_state;
+ int next_start_idx = cur_str_idx;
+ cur_state = transit_state (mctx, cur_state);
+ *p_match_first += next_start_idx;
+}
+
+static re_dfastate_t *
+transit_state (
+ re_match_context_t * mctx,
+ re_dfastate_t * state
+)
+{
+ if (!build_trtable (mctx->dfa, state))
+ {
+ }
+}
+
+build_trtable (const re_dfa_t * dfa,
+ re_dfastate_t * state
+)
+{
+ int i,
+ j;
+ bitset_t accepts;
+ const re_node_set *cur_nodes = &state->nodes;
+ for (i = 0; i < cur_nodes->nelem; ++i)
+ {
+ re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
+ re_token_type_t type = node->type;
+ {
+ if (dfa->mb_cur_max > 1)
+ bitset_merge (accepts, dfa->sb_char);
+ {
+ bitset_word_t any_set = 0;
+ if (type == CHARACTER && !node->word_char)
+ any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+ else
+ for (j = 0; j < (256 / (sizeof (bitset_word_t) * 8)); ++j)
+ any_set |= (accepts[j] &= dfa->word_char[j]);
+ }
+ }
+ }
+}
+
+static void
+match_ctx_clean (
+ re_match_context_t * mctx
+)
+{
+ int st_idx;
+ for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
+ {
+ int sl_idx;
+ re_sub_match_top_t *top = mctx->sub_tops[st_idx];
+ for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
+ {
+ re_sub_match_last_t *last = top->lasts[sl_idx];
+ free (last->path.array);
+ }
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr59896.c b/gcc/testsuite/gcc.target/arm/pr59896.c
new file mode 100644
index 0000000000..ea6dc248b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr59896.c
@@ -0,0 +1,1375 @@
+/* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
+/* { dg-options "-mthumb -O2" } */
+
+typedef unsigned int size_t;
+typedef unsigned int wchar_t;
+typedef int ptrdiff_t;
+typedef signed char __int8_t ;
+typedef unsigned char __uint8_t ;
+typedef signed short __int16_t;
+typedef unsigned short __uint16_t;
+typedef __int16_t __int_least16_t;
+typedef __uint16_t __uint_least16_t;
+typedef signed int __int32_t;
+typedef unsigned int __uint32_t;
+typedef __int32_t __int_least32_t;
+typedef __uint32_t __uint_least32_t;
+typedef signed long long __int64_t;
+typedef unsigned long long __uint64_t;
+typedef int _LOCK_T;
+typedef int _LOCK_RECURSIVE_T;
+typedef long _off_t;
+typedef short __dev_t;
+typedef unsigned short __uid_t;
+typedef unsigned short __gid_t;
+__extension__ typedef long long _off64_t;
+typedef long _fpos_t;
+typedef signed int _ssize_t;
+typedef unsigned int wint_t;
+typedef struct
+{
+ int __count;
+ union
+ {
+ wint_t __wch;
+ unsigned char __wchb[4];
+ } __value;
+} _mbstate_t;
+typedef _LOCK_RECURSIVE_T _flock_t;
+typedef void *_iconv_t;
+typedef unsigned long __ULong;
+struct _reent;
+struct _Bigint
+{
+ struct _Bigint *_next;
+ int _k, _maxwds, _sign, _wds;
+ __ULong _x[1];
+};
+struct __tm
+{
+ int __tm_sec;
+ int __tm_min;
+ int __tm_hour;
+ int __tm_mday;
+ int __tm_mon;
+ int __tm_year;
+ int __tm_wday;
+ int __tm_yday;
+ int __tm_isdst;
+};
+struct _on_exit_args {
+ void * _fnargs[32];
+ void * _dso_handle[32];
+ __ULong _fntypes;
+ __ULong _is_cxa;
+};
+struct _atexit {
+ struct _atexit *_next;
+ int _ind;
+ void (*_fns[32])(void);
+ struct _on_exit_args _on_exit_args;
+};
+struct __sbuf {
+ unsigned char *_base;
+ int _size;
+};
+struct __sFILE {
+ unsigned char *_p;
+ int _r;
+ int _w;
+ short _flags;
+ short _file;
+ struct __sbuf _bf;
+ int _lbfsize;
+ void * _cookie;
+ int (* _read) (struct _reent *, void *, char *, int)
+ ;
+ int (* _write) (struct _reent *, void *, const char *, int)
+ ;
+ _fpos_t (* _seek) (struct _reent *, void *, _fpos_t, int);
+ int (* _close) (struct _reent *, void *);
+ struct __sbuf _ub;
+ unsigned char *_up;
+ int _ur;
+ unsigned char _ubuf[3];
+ unsigned char _nbuf[1];
+ struct __sbuf _lb;
+ int _blksize;
+ _off_t _offset;
+ struct _reent *_data;
+ _flock_t _lock;
+ _mbstate_t _mbstate;
+ int _flags2;
+};
+typedef struct __sFILE __FILE;
+struct _glue
+{
+ struct _glue *_next;
+ int _niobs;
+ __FILE *_iobs;
+};
+struct _rand48 {
+ unsigned short _seed[3];
+ unsigned short _mult[3];
+ unsigned short _add;
+};
+struct _reent
+{
+ int _errno;
+ __FILE *_stdin, *_stdout, *_stderr;
+ int _inc;
+ char _emergency[25];
+ int _current_category;
+ const char *_current_locale;
+ int __sdidinit;
+ void (* __cleanup) (struct _reent *);
+ struct _Bigint *_result;
+ int _result_k;
+ struct _Bigint *_p5s;
+ struct _Bigint **_freelist;
+ int _cvtlen;
+ char *_cvtbuf;
+ union
+ {
+ struct
+ {
+ unsigned int _unused_rand;
+ char * _strtok_last;
+ char _asctime_buf[26];
+ struct __tm _localtime_buf;
+ int _gamma_signgam;
+ __extension__ unsigned long long _rand_next;
+ struct _rand48 _r48;
+ _mbstate_t _mblen_state;
+ _mbstate_t _mbtowc_state;
+ _mbstate_t _wctomb_state;
+ char _l64a_buf[8];
+ char _signal_buf[24];
+ int _getdate_err;
+ _mbstate_t _mbrlen_state;
+ _mbstate_t _mbrtowc_state;
+ _mbstate_t _mbsrtowcs_state;
+ _mbstate_t _wcrtomb_state;
+ _mbstate_t _wcsrtombs_state;
+ int _h_errno;
+ } _reent;
+ struct
+ {
+ unsigned char * _nextf[30];
+ unsigned int _nmalloc[30];
+ } _unused;
+ } _new;
+ struct _atexit *_atexit;
+ struct _atexit _atexit0;
+ void (**(_sig_func))(int);
+ struct _glue __sglue;
+ __FILE __sf[3];
+};
+extern struct _reent *_impure_ptr ;
+extern struct _reent *const _global_impure_ptr ;
+void _reclaim_reent (struct _reent *);
+typedef struct
+{
+ int quot;
+ int rem;
+} div_t;
+typedef struct
+{
+ long quot;
+ long rem;
+} ldiv_t;
+typedef struct
+{
+ long long int quot;
+ long long int rem;
+} lldiv_t;
+typedef int (*__compar_fn_t) (const void *, const void *);
+int __locale_mb_cur_max (void);
+void abort (void) __attribute__ ((noreturn));
+int abs (int);
+int atexit (void (*__func)(void));
+double atof (const char *__nptr);
+float atoff (const char *__nptr);
+int atoi (const char *__nptr);
+int _atoi_r (struct _reent *, const char *__nptr);
+long atol (const char *__nptr);
+long _atol_r (struct _reent *, const char *__nptr);
+void * bsearch (const void * __key, const void * __base, size_t __nmemb, size_t __size, __compar_fn_t _compar)
+ ;
+void * calloc (size_t __nmemb, size_t __size) ;
+div_t div (int __numer, int __denom);
+void exit (int __status) __attribute__ ((noreturn));
+void free (void *) ;
+char * getenv (const char *__string);
+char * _getenv_r (struct _reent *, const char *__string);
+char * _findenv (const char *, int *);
+char * _findenv_r (struct _reent *, const char *, int *);
+extern char *suboptarg;
+int getsubopt (char **, char * const *, char **);
+long labs (long);
+ldiv_t ldiv (long __numer, long __denom);
+void * malloc (size_t __size) ;
+int mblen (const char *, size_t);
+int _mblen_r (struct _reent *, const char *, size_t, _mbstate_t *);
+int mbtowc (wchar_t *, const char *, size_t);
+int _mbtowc_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
+int wctomb (char *, wchar_t);
+int _wctomb_r (struct _reent *, char *, wchar_t, _mbstate_t *);
+size_t mbstowcs (wchar_t *, const char *, size_t);
+size_t _mbstowcs_r (struct _reent *, wchar_t *, const char *, size_t, _mbstate_t *);
+size_t wcstombs (char *, const wchar_t *, size_t);
+size_t _wcstombs_r (struct _reent *, char *, const wchar_t *, size_t, _mbstate_t *);
+char * mkdtemp (char *);
+int mkostemp (char *, int);
+int mkostemps (char *, int, int);
+int mkstemp (char *);
+int mkstemps (char *, int);
+char * mktemp (char *) __attribute__ ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")));
+char * _mkdtemp_r (struct _reent *, char *);
+int _mkostemp_r (struct _reent *, char *, int);
+int _mkostemps_r (struct _reent *, char *, int, int);
+int _mkstemp_r (struct _reent *, char *);
+int _mkstemps_r (struct _reent *, char *, int);
+char * _mktemp_r (struct _reent *, char *) __attribute__ ((__warning__ ("the use of `mktemp' is dangerous; use `mkstemp' instead")));
+void qsort (void * __base, size_t __nmemb, size_t __size, __compar_fn_t _compar);
+int rand (void);
+void * realloc (void * __r, size_t __size) ;
+void * reallocf (void * __r, size_t __size);
+void srand (unsigned __seed);
+double strtod (const char *__n, char **__end_PTR);
+double _strtod_r (struct _reent *,const char *__n, char **__end_PTR);
+float strtof (const char *__n, char **__end_PTR);
+long strtol (const char *__n, char **__end_PTR, int __base);
+long _strtol_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
+unsigned long strtoul (const char *__n, char **__end_PTR, int __base);
+unsigned long _strtoul_r (struct _reent *,const char *__n, char **__end_PTR, int __base);
+int system (const char *__string);
+long a64l (const char *__input);
+char * l64a (long __input);
+char * _l64a_r (struct _reent *,long __input);
+int on_exit (void (*__func)(int, void *),void * __arg);
+void _Exit (int __status) __attribute__ ((noreturn));
+int putenv (char *__string);
+int _putenv_r (struct _reent *, char *__string);
+void * _reallocf_r (struct _reent *, void *, size_t);
+int setenv (const char *__string, const char *__value, int __overwrite);
+int _setenv_r (struct _reent *, const char *__string, const char *__value, int __overwrite);
+char * gcvt (double,int,char *);
+char * gcvtf (float,int,char *);
+char * fcvt (double,int,int *,int *);
+char * fcvtf (float,int,int *,int *);
+char * ecvt (double,int,int *,int *);
+char * ecvtbuf (double, int, int*, int*, char *);
+char * fcvtbuf (double, int, int*, int*, char *);
+char * ecvtf (float,int,int *,int *);
+char * dtoa (double, int, int, int *, int*, char**);
+int rand_r (unsigned *__seed);
+double drand48 (void);
+double _drand48_r (struct _reent *);
+double erand48 (unsigned short [3]);
+double _erand48_r (struct _reent *, unsigned short [3]);
+long jrand48 (unsigned short [3]);
+long _jrand48_r (struct _reent *, unsigned short [3]);
+void lcong48 (unsigned short [7]);
+void _lcong48_r (struct _reent *, unsigned short [7]);
+long lrand48 (void);
+long _lrand48_r (struct _reent *);
+long mrand48 (void);
+long _mrand48_r (struct _reent *);
+long nrand48 (unsigned short [3]);
+long _nrand48_r (struct _reent *, unsigned short [3]);
+unsigned short *
+ seed48 (unsigned short [3]);
+unsigned short *
+ _seed48_r (struct _reent *, unsigned short [3]);
+void srand48 (long);
+void _srand48_r (struct _reent *, long);
+long long atoll (const char *__nptr);
+long long _atoll_r (struct _reent *, const char *__nptr);
+long long llabs (long long);
+lldiv_t lldiv (long long __numer, long long __denom);
+long long strtoll (const char *__n, char **__end_PTR, int __base);
+long long _strtoll_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
+unsigned long long strtoull (const char *__n, char **__end_PTR, int __base);
+unsigned long long _strtoull_r (struct _reent *, const char *__n, char **__end_PTR, int __base);
+void cfree (void *);
+int unsetenv (const char *__string);
+int _unsetenv_r (struct _reent *, const char *__string);
+char * _dtoa_r (struct _reent *, double, int, int, int *, int*, char**);
+void * _malloc_r (struct _reent *, size_t) ;
+void * _calloc_r (struct _reent *, size_t, size_t) ;
+void _free_r (struct _reent *, void *) ;
+void * _realloc_r (struct _reent *, void *, size_t) ;
+void _mstats_r (struct _reent *, char *);
+int _system_r (struct _reent *, const char *);
+void __eprintf (const char *, const char *, unsigned int, const char *);
+extern long double strtold (const char *, char **);
+extern long double wcstold (const wchar_t *, wchar_t **);
+typedef long int __off_t;
+typedef int __pid_t;
+__extension__ typedef long long int __loff_t;
+struct stat;
+struct tms;
+struct timeval;
+struct timezone;
+extern int _close_r (struct _reent *, int);
+extern int _execve_r (struct _reent *, const char *, char *const *, char *const *);
+extern int _fcntl_r (struct _reent *, int, int, int);
+extern int _fork_r (struct _reent *);
+extern int _fstat_r (struct _reent *, int, struct stat *);
+extern int _getpid_r (struct _reent *);
+extern int _isatty_r (struct _reent *, int);
+extern int _kill_r (struct _reent *, int, int);
+extern int _link_r (struct _reent *, const char *, const char *);
+extern _off_t _lseek_r (struct _reent *, int, _off_t, int);
+extern int _mkdir_r (struct _reent *, const char *, int);
+extern int _open_r (struct _reent *, const char *, int, int);
+extern _ssize_t _read_r (struct _reent *, int, void *, size_t);
+extern int _rename_r (struct _reent *, const char *, const char *);
+extern void *_sbrk_r (struct _reent *, ptrdiff_t);
+extern int _stat_r (struct _reent *, const char *, struct stat *);
+extern unsigned long _times_r (struct _reent *, struct tms *);
+extern int _unlink_r (struct _reent *, const char *);
+extern int _wait_r (struct _reent *, int *);
+extern _ssize_t _write_r (struct _reent *, int, const void *, size_t);
+extern int _gettimeofday_r (struct _reent *, struct timeval *__tp, void *__tzp);
+typedef signed char int8_t ;
+typedef unsigned char uint8_t ;
+typedef signed char int_least8_t;
+typedef unsigned char uint_least8_t;
+typedef signed short int16_t;
+typedef unsigned short uint16_t;
+typedef int16_t int_least16_t;
+typedef uint16_t uint_least16_t;
+typedef signed long int32_t;
+typedef unsigned long uint32_t;
+typedef int32_t int_least32_t;
+typedef uint32_t uint_least32_t;
+typedef signed long long int64_t;
+typedef unsigned long long uint64_t;
+typedef int64_t int_least64_t;
+typedef uint64_t uint_least64_t;
+ typedef signed int int_fast8_t;
+ typedef unsigned int uint_fast8_t;
+ typedef signed int int_fast16_t;
+ typedef unsigned int uint_fast16_t;
+ typedef signed int int_fast32_t;
+ typedef unsigned int uint_fast32_t;
+ typedef int_least64_t int_fast64_t;
+ typedef uint_least64_t uint_fast64_t;
+ typedef long long int intmax_t;
+ typedef long long unsigned int uintmax_t;
+typedef signed int intptr_t;
+typedef unsigned int uintptr_t;
+void * memchr (const void *, int, size_t);
+int memcmp (const void *, const void *, size_t);
+void * memcpy (void * , const void * , size_t);
+void * memmove (void *, const void *, size_t);
+void * memset (void *, int, size_t);
+char *strcat (char *, const char *);
+char *strchr (const char *, int);
+int strcmp (const char *, const char *);
+int strcoll (const char *, const char *);
+char *strcpy (char *, const char *);
+size_t strcspn (const char *, const char *);
+char *strerror (int);
+size_t strlen (const char *);
+char *strncat (char *, const char *, size_t);
+int strncmp (const char *, const char *, size_t);
+char *strncpy (char *, const char *, size_t);
+char *strpbrk (const char *, const char *);
+char *strrchr (const char *, int);
+size_t strspn (const char *, const char *);
+char *strstr (const char *, const char *);
+char *strtok (char *, const char *);
+size_t strxfrm (char *, const char *, size_t);
+char *strtok_r (char *, const char *, char **);
+int bcmp (const void *, const void *, size_t);
+void bcopy (const void *, void *, size_t);
+void bzero (void *, size_t);
+int ffs (int);
+char *index (const char *, int);
+void * memccpy (void * , const void * , int, size_t);
+void * mempcpy (void *, const void *, size_t);
+void * memmem (const void *, size_t, const void *, size_t);
+void * memrchr (const void *, int, size_t);
+void * rawmemchr (const void *, int);
+char *rindex (const char *, int);
+char *stpcpy (char *, const char *);
+char *stpncpy (char *, const char *, size_t);
+int strcasecmp (const char *, const char *);
+char *strcasestr (const char *, const char *);
+char *strchrnul (const char *, int);
+char *strdup (const char *);
+char *_strdup_r (struct _reent *, const char *);
+char *strndup (const char *, size_t);
+char *_strndup_r (struct _reent *, const char *, size_t);
+int strerror_r (int, char *, size_t) __asm__ ("" "__xpg_strerror_r");
+size_t strlcat (char *, const char *, size_t);
+size_t strlcpy (char *, const char *, size_t);
+int strncasecmp (const char *, const char *, size_t);
+size_t strnlen (const char *, size_t);
+char *strsep (char **, const char *);
+char *strlwr (char *);
+char *strupr (char *);
+char *strsignal (int __signo);
+char * _strerror_r (struct _reent *, int, int, int *);
+typedef union
+{
+ double value;
+ struct
+ {
+ unsigned int fraction1:32;
+ unsigned int fraction0:20;
+ unsigned int exponent :11;
+ unsigned int sign : 1;
+ } number;
+ struct
+ {
+ unsigned int function1:32;
+ unsigned int function0:19;
+ unsigned int quiet:1;
+ unsigned int exponent: 11;
+ unsigned int sign : 1;
+ } nan;
+ struct
+ {
+ unsigned long lsw;
+ unsigned long msw;
+ } parts;
+ long aslong[2];
+} __ieee_double_shape_type;
+typedef union
+{
+ float value;
+ struct
+ {
+ unsigned int fraction0: 7;
+ unsigned int fraction1: 16;
+ unsigned int exponent: 8;
+ unsigned int sign : 1;
+ } number;
+ struct
+ {
+ unsigned int function1:16;
+ unsigned int function0:6;
+ unsigned int quiet:1;
+ unsigned int exponent:8;
+ unsigned int sign:1;
+ } nan;
+ long p1;
+} __ieee_float_shape_type;
+typedef int fp_rnd;
+fp_rnd fpgetround (void);
+fp_rnd fpsetround (fp_rnd);
+typedef int fp_except;
+fp_except fpgetmask (void);
+fp_except fpsetmask (fp_except);
+fp_except fpgetsticky (void);
+fp_except fpsetsticky (fp_except);
+typedef int fp_rdi;
+fp_rdi fpgetroundtoi (void);
+fp_rdi fpsetroundtoi (fp_rdi);
+int isnan (double);
+int isinf (double);
+int finite (double);
+int isnanf (float);
+int isinff (float);
+int finitef (float);
+union __dmath
+{
+ double d;
+ __ULong i[2];
+};
+union __fmath
+{
+ float f;
+ __ULong i[1];
+};
+union __ldmath
+{
+ long double ld;
+ __ULong i[4];
+};
+extern double atan (double);
+extern double cos (double);
+extern double sin (double);
+extern double tan (double);
+extern double tanh (double);
+extern double frexp (double, int *);
+extern double modf (double, double *);
+extern double ceil (double);
+extern double fabs (double);
+extern double floor (double);
+extern double acos (double);
+extern double asin (double);
+extern double atan2 (double, double);
+extern double cosh (double);
+extern double sinh (double);
+extern double exp (double);
+extern double ldexp (double, int);
+extern double log (double);
+extern double log10 (double);
+extern double pow (double, double);
+extern double sqrt (double);
+extern double fmod (double, double);
+ typedef float float_t;
+ typedef double double_t;
+extern int __isinff (float x);
+extern int __isinfd (double x);
+extern int __isnanf (float x);
+extern int __isnand (double x);
+extern int __fpclassifyf (float x);
+extern int __fpclassifyd (double x);
+extern int __signbitf (float x);
+extern int __signbitd (double x);
+extern double infinity (void);
+extern double nan (const char *);
+extern int finite (double);
+extern double copysign (double, double);
+extern double logb (double);
+extern int ilogb (double);
+extern double asinh (double);
+extern double cbrt (double);
+extern double nextafter (double, double);
+extern double rint (double);
+extern double scalbn (double, int);
+extern double exp2 (double);
+extern double scalbln (double, long int);
+extern double tgamma (double);
+extern double nearbyint (double);
+extern long int lrint (double);
+extern long long int llrint (double);
+extern double round (double);
+extern long int lround (double);
+extern long long int llround (double);
+extern double trunc (double);
+extern double remquo (double, double, int *);
+extern double fdim (double, double);
+extern double fmax (double, double);
+extern double fmin (double, double);
+extern double fma (double, double, double);
+extern double log1p (double);
+extern double expm1 (double);
+extern double acosh (double);
+extern double atanh (double);
+extern double remainder (double, double);
+extern double gamma (double);
+extern double lgamma (double);
+extern double erf (double);
+extern double erfc (double);
+extern double log2 (double);
+extern double hypot (double, double);
+extern float atanf (float);
+extern float cosf (float);
+extern float sinf (float);
+extern float tanf (float);
+extern float tanhf (float);
+extern float frexpf (float, int *);
+extern float modff (float, float *);
+extern float ceilf (float);
+extern float fabsf (float);
+extern float floorf (float);
+extern float acosf (float);
+extern float asinf (float);
+extern float atan2f (float, float);
+extern float coshf (float);
+extern float sinhf (float);
+extern float expf (float);
+extern float ldexpf (float, int);
+extern float logf (float);
+extern float log10f (float);
+extern float powf (float, float);
+extern float sqrtf (float);
+extern float fmodf (float, float);
+extern float exp2f (float);
+extern float scalblnf (float, long int);
+extern float tgammaf (float);
+extern float nearbyintf (float);
+extern long int lrintf (float);
+extern long long llrintf (float);
+extern float roundf (float);
+extern long int lroundf (float);
+extern long long int llroundf (float);
+extern float truncf (float);
+extern float remquof (float, float, int *);
+extern float fdimf (float, float);
+extern float fmaxf (float, float);
+extern float fminf (float, float);
+extern float fmaf (float, float, float);
+extern float infinityf (void);
+extern float nanf (const char *);
+extern int finitef (float);
+extern float copysignf (float, float);
+extern float logbf (float);
+extern int ilogbf (float);
+extern float asinhf (float);
+extern float cbrtf (float);
+extern float nextafterf (float, float);
+extern float rintf (float);
+extern float scalbnf (float, int);
+extern float log1pf (float);
+extern float expm1f (float);
+extern float acoshf (float);
+extern float atanhf (float);
+extern float remainderf (float, float);
+extern float gammaf (float);
+extern float lgammaf (float);
+extern float erff (float);
+extern float erfcf (float);
+extern float log2f (float);
+extern float hypotf (float, float);
+extern long double atanl (long double);
+extern long double cosl (long double);
+extern long double sinl (long double);
+extern long double tanl (long double);
+extern long double tanhl (long double);
+extern long double frexpl (long double value, int *);
+extern long double modfl (long double, long double *);
+extern long double ceill (long double);
+extern long double fabsl (long double);
+extern long double floorl (long double);
+extern long double log1pl (long double);
+extern long double expm1l (long double);
+extern long double acosl (long double);
+extern long double asinl (long double);
+extern long double atan2l (long double, long double);
+extern long double coshl (long double);
+extern long double sinhl (long double);
+extern long double expl (long double);
+extern long double ldexpl (long double, int);
+extern long double logl (long double);
+extern long double log10l (long double);
+extern long double powl (long double, long double);
+extern long double sqrtl (long double);
+extern long double fmodl (long double, long double);
+extern long double hypotl (long double, long double);
+extern long double copysignl (long double, long double);
+extern long double nanl (const char *);
+extern int ilogbl (long double);
+extern long double asinhl (long double);
+extern long double cbrtl (long double);
+extern long double nextafterl (long double, long double);
+extern long double rintl (long double);
+extern long double scalbnl (long double, int);
+extern long double exp2l (long double);
+extern long double scalblnl (long double, long);
+extern long double tgammal (long double);
+extern long double nearbyintl (long double);
+extern long int lrintl (long double);
+extern long long int llrintl (long double);
+extern long double roundl (long double);
+extern long lroundl (long double);
+extern long long int llroundl (long double);
+extern long double truncl (long double);
+extern long double remquol (long double, long double, int *);
+extern long double fdiml (long double, long double);
+extern long double fmaxl (long double, long double);
+extern long double fminl (long double, long double);
+extern long double fmal (long double, long double, long double);
+extern long double acoshl (long double);
+extern long double atanhl (long double);
+extern long double remainderl (long double, long double);
+extern long double lgammal (long double);
+extern long double erfl (long double);
+extern long double erfcl (long double);
+extern double drem (double, double);
+extern void sincos (double, double *, double *);
+extern double gamma_r (double, int *);
+extern double lgamma_r (double, int *);
+extern double y0 (double);
+extern double y1 (double);
+extern double yn (int, double);
+extern double j0 (double);
+extern double j1 (double);
+extern double jn (int, double);
+extern float dremf (float, float);
+extern void sincosf (float, float *, float *);
+extern float gammaf_r (float, int *);
+extern float lgammaf_r (float, int *);
+extern float y0f (float);
+extern float y1f (float);
+extern float ynf (int, float);
+extern float j0f (float);
+extern float j1f (float);
+extern float jnf (int, float);
+extern double exp10 (double);
+extern double pow10 (double);
+extern float exp10f (float);
+extern float pow10f (float);
+extern int *__signgam (void);
+struct exception
+{
+ int type;
+ char *name;
+ double arg1;
+ double arg2;
+ double retval;
+ int err;
+};
+extern int matherr (struct exception *e);
+enum __fdlibm_version
+{
+ __fdlibm_ieee = -1,
+ __fdlibm_svid,
+ __fdlibm_xopen,
+ __fdlibm_posix
+};
+extern enum __fdlibm_version __fdlib_version;
+typedef int error_t;
+extern int *__errno (void);
+extern const char * const _sys_errlist[];
+extern int _sys_nerr;
+typedef unsigned char u_char;
+typedef unsigned short u_short;
+typedef unsigned int u_int;
+typedef unsigned long u_long;
+typedef unsigned short ushort;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+typedef unsigned long clock_t;
+typedef long time_t;
+struct timespec {
+ time_t tv_sec;
+ long tv_nsec;
+};
+struct itimerspec {
+ struct timespec it_interval;
+ struct timespec it_value;
+};
+typedef long daddr_t;
+typedef char * caddr_t;
+typedef unsigned short ino_t;
+typedef _off_t off_t;
+typedef __dev_t dev_t;
+typedef __uid_t uid_t;
+typedef __gid_t gid_t;
+typedef int pid_t;
+typedef long key_t;
+typedef _ssize_t ssize_t;
+typedef unsigned int mode_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned short nlink_t;
+typedef long fd_mask;
+typedef struct _types_fd_set {
+ fd_mask fds_bits[(((64)+(((sizeof (fd_mask) * 8))-1))/((sizeof (fd_mask) * 8)))];
+} _types_fd_set;
+typedef unsigned long clockid_t;
+typedef unsigned long timer_t;
+typedef unsigned long useconds_t;
+typedef long suseconds_t;
+union double_union
+{
+ double d;
+ __uint32_t i[2];
+};
+typedef __int32_t Long;
+typedef union { double d; __ULong i[2]; } U;
+typedef struct _Bigint _Bigint;
+struct _reent ;
+struct FPI;
+double __ulp (double x);
+double __b2d (_Bigint *a , int *e);
+_Bigint * _Balloc (struct _reent *p, int k);
+void _Bfree (struct _reent *p, _Bigint *v);
+_Bigint * __multadd (struct _reent *p, _Bigint *, int, int);
+_Bigint * __s2b (struct _reent *, const char*, int, int, __ULong);
+_Bigint * __i2b (struct _reent *,int);
+_Bigint * __multiply (struct _reent *, _Bigint *, _Bigint *);
+_Bigint * __pow5mult (struct _reent *, _Bigint *, int k);
+int __hi0bits (__ULong);
+int __lo0bits (__ULong *);
+_Bigint * __d2b (struct _reent *p, double d, int *e, int *bits);
+_Bigint * __lshift (struct _reent *p, _Bigint *b, int k);
+_Bigint * __mdiff (struct _reent *p, _Bigint *a, _Bigint *b);
+int __mcmp (_Bigint *a, _Bigint *b);
+int __gethex (struct _reent *p, const char **sp, const struct FPI *fpi, Long *exp, _Bigint **bp, int sign);
+double __ratio (_Bigint *a, _Bigint *b);
+__ULong __any_on (_Bigint *b, int k);
+void __copybits (__ULong *c, int n, _Bigint *b);
+int __hexnan (const char **sp, const struct FPI *fpi, __ULong *x0);
+extern const double __mprec_tinytens[];
+extern const double __mprec_bigtens[];
+extern const double __mprec_tens[];
+extern const unsigned char __hexdig[];
+double _mprec_log10 (int);
+static int
+quorem(_Bigint * b , _Bigint * S)
+{
+ int n;
+ long borrow, y;
+ __ULong carry, q, ys;
+ __ULong *bx, *bxe, *sx, *sxe;
+ long z;
+ __ULong si, zs;
+ n = S->_wds;
+ if (b->_wds < n)
+ return 0;
+ sx = S->_x;
+ sxe = sx + --n;
+ bx = b->_x;
+ bxe = bx + n;
+ q = *bxe / (*sxe + 1);
+ if (q)
+ {
+ borrow = 0;
+ carry = 0;
+ do
+ {
+ si = *sx++;
+ ys = (si & 0xffff) * q + carry;
+ zs = (si >> 16) * q + (ys >> 16);
+ carry = zs >> 16;
+ y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
+ borrow = y >> 16;
+ ;
+ z = (*bx >> 16) - (zs & 0xffff) + borrow;
+ borrow = z >> 16;
+ ;
+ (*(bx)++ = ((z) << 16) | ((y) & 0xffff));
+ }
+ while (sx <= sxe);
+ if (!*bxe)
+ {
+ bx = b->_x;
+ while (--bxe > bx && !*bxe)
+ --n;
+ b->_wds = n;
+ }
+ }
+ if (__mcmp (b, S) >= 0)
+ {
+ q++;
+ borrow = 0;
+ carry = 0;
+ bx = b->_x;
+ sx = S->_x;
+ do
+ {
+ si = *sx++;
+ ys = (si & 0xffff) + carry;
+ zs = (si >> 16) + (ys >> 16);
+ carry = zs >> 16;
+ y = (*bx & 0xffff) - (ys & 0xffff) + borrow;
+ borrow = y >> 16;
+ ;
+ z = (*bx >> 16) - (zs & 0xffff) + borrow;
+ borrow = z >> 16;
+ ;
+ (*(bx)++ = ((z) << 16) | ((y) & 0xffff));
+ }
+ while (sx <= sxe);
+ bx = b->_x;
+ bxe = bx + n;
+ if (!*bxe)
+ {
+ while (--bxe > bx && !*bxe)
+ --n;
+ b->_wds = n;
+ }
+ }
+ return q;
+}
+char *
+_dtoa_r(struct _reent *ptr , double _d , int mode , int ndigits , int *decpt , int *sign , char **rve)
+{
+ int bbits, b2, b5, be, dig, i, ieps, ilim, ilim0, ilim1, j, j1, k, k0,
+ k_check, leftright, m2, m5, s2, s5, spec_case, try_quick;
+ union double_union d, d2, eps;
+ long L;
+ int denorm;
+ __ULong x;
+ _Bigint *b, *b1, *delta, *mlo = ((void *)0), *mhi, *S;
+ double ds;
+ char *s, *s0;
+ d.d = _d;
+ ;
+ if (((ptr)->_result))
+ {
+ ((ptr)->_result)->_k = ((ptr)->_result_k);
+ ((ptr)->_result)->_maxwds = 1 << ((ptr)->_result_k);
+ _Bfree (ptr, ((ptr)->_result));
+ ((ptr)->_result) = 0;
+ }
+ if ((d.i[1]) & ((__uint32_t)0x80000000L))
+ {
+ *sign = 1;
+ (d.i[1]) &= ~((__uint32_t)0x80000000L);
+ }
+ else
+ *sign = 0;
+ if (((d.i[1]) & ((__uint32_t)0x7ff00000L)) == ((__uint32_t)0x7ff00000L))
+ {
+ *decpt = 9999;
+ s =
+ !(d.i[0]) && !((d.i[1]) & 0xfffff) ? "Infinity" :
+ "NaN";
+ if (rve)
+ *rve =
+ s[3] ? s + 8 :
+ s + 3;
+ return s;
+ }
+ if (!d.d)
+ {
+ *decpt = 1;
+ s = "0";
+ if (rve)
+ *rve = s + 1;
+ return s;
+ }
+ b = __d2b (ptr, d.d, &be, &bbits);
+ if ((i = (int) ((d.i[1]) >> 20 & (((__uint32_t)0x7ff00000L) >> 20))) != 0)
+ {
+ d2.d = d.d;
+ (d2.i[1]) &= ((__uint32_t)0xfffffL);
+ (d2.i[1]) |= ((__uint32_t)0x3ff00000L);
+ i -= 1023;
+ denorm = 0;
+ }
+ else
+ {
+ i = bbits + be + (1023 + (53 - 1) - 1);
+ x = (i > 32) ? ((d.i[1]) << (64 - i)) | ((d.i[0]) >> (i - 32))
+ : ((d.i[0]) << (32 - i));
+ d2.d = x;
+ (d2.i[1]) -= 31 * ((__uint32_t)0x100000L);
+ i -= (1023 + (53 - 1) - 1) + 1;
+ denorm = 1;
+ }
+ ds = (d2.d - 1.5) * 0.289529654602168 + 0.1760912590558 + i * 0.301029995663981;
+ k = (int) ds;
+ if (ds < 0. && ds != k)
+ k--;
+ k_check = 1;
+ if (k >= 0 && k <= 22)
+ {
+ if (d.d < __mprec_tens[k])
+ k--;
+ k_check = 0;
+ }
+ j = bbits - i - 1;
+ if (j >= 0)
+ {
+ b2 = 0;
+ s2 = j;
+ }
+ else
+ {
+ b2 = -j;
+ s2 = 0;
+ }
+ if (k >= 0)
+ {
+ b5 = 0;
+ s5 = k;
+ s2 += k;
+ }
+ else
+ {
+ b2 -= k;
+ b5 = -k;
+ s5 = 0;
+ }
+ if (mode < 0 || mode > 9)
+ mode = 0;
+ try_quick = 1;
+ if (mode > 5)
+ {
+ mode -= 4;
+ try_quick = 0;
+ }
+ leftright = 1;
+ ilim = ilim1 = -1;
+ switch (mode)
+ {
+ case 0:
+ case 1:
+ i = 18;
+ ndigits = 0;
+ break;
+ case 2:
+ leftright = 0;
+ case 4:
+ if (ndigits <= 0)
+ ndigits = 1;
+ ilim = ilim1 = i = ndigits;
+ break;
+ case 3:
+ leftright = 0;
+ case 5:
+ i = ndigits + k + 1;
+ ilim = i;
+ ilim1 = i - 1;
+ if (i <= 0)
+ i = 1;
+ }
+ j = sizeof (__ULong);
+ for (((ptr)->_result_k) = 0; sizeof (_Bigint) - sizeof (__ULong) + j <= i;
+ j <<= 1)
+ ((ptr)->_result_k)++;
+ ((ptr)->_result) = _Balloc (ptr, ((ptr)->_result_k));
+ s = s0 = (char *) ((ptr)->_result);
+ if (ilim >= 0 && ilim <= 14 && try_quick)
+ {
+ i = 0;
+ d2.d = d.d;
+ k0 = k;
+ ilim0 = ilim;
+ ieps = 2;
+ if (k > 0)
+ {
+ ds = __mprec_tens[k & 0xf];
+ j = k >> 4;
+ if (j & 0x10)
+ {
+ j &= 0x10 - 1;
+ d.d /= __mprec_bigtens[5 - 1];
+ ieps++;
+ }
+ for (; j; j >>= 1, i++)
+ if (j & 1)
+ {
+ ieps++;
+ ds *= __mprec_bigtens[i];
+ }
+ d.d /= ds;
+ }
+ else if ((j1 = -k) != 0)
+ {
+ d.d *= __mprec_tens[j1 & 0xf];
+ for (j = j1 >> 4; j; j >>= 1, i++)
+ if (j & 1)
+ {
+ ieps++;
+ d.d *= __mprec_bigtens[i];
+ }
+ }
+ if (k_check && d.d < 1. && ilim > 0)
+ {
+ if (ilim1 <= 0)
+ goto fast_failed;
+ ilim = ilim1;
+ k--;
+ d.d *= 10.;
+ ieps++;
+ }
+ eps.d = ieps * d.d + 7.;
+ (eps.i[1]) -= (53 - 1) * ((__uint32_t)0x100000L);
+ if (ilim == 0)
+ {
+ S = mhi = 0;
+ d.d -= 5.;
+ if (d.d > eps.d)
+ goto one_digit;
+ if (d.d < -eps.d)
+ goto no_digits;
+ goto fast_failed;
+ }
+ if (leftright)
+ {
+ eps.d = 0.5 / __mprec_tens[ilim - 1] - eps.d;
+ for (i = 0;;)
+ {
+ L = d.d;
+ d.d -= L;
+ *s++ = '0' + (int) L;
+ if (d.d < eps.d)
+ goto ret1;
+ if (1. - d.d < eps.d)
+ goto bump_up;
+ if (++i >= ilim)
+ break;
+ eps.d *= 10.;
+ d.d *= 10.;
+ }
+ }
+ else
+ {
+ eps.d *= __mprec_tens[ilim - 1];
+ for (i = 1;; i++, d.d *= 10.)
+ {
+ L = d.d;
+ d.d -= L;
+ *s++ = '0' + (int) L;
+ if (i == ilim)
+ {
+ if (d.d > 0.5 + eps.d)
+ goto bump_up;
+ else if (d.d < 0.5 - eps.d)
+ {
+ while (*--s == '0');
+ s++;
+ goto ret1;
+ }
+ break;
+ }
+ }
+ }
+ fast_failed:
+ s = s0;
+ d.d = d2.d;
+ k = k0;
+ ilim = ilim0;
+ }
+ if (be >= 0 && k <= 14)
+ {
+ ds = __mprec_tens[k];
+ if (ndigits < 0 && ilim <= 0)
+ {
+ S = mhi = 0;
+ if (ilim < 0 || d.d <= 5 * ds)
+ goto no_digits;
+ goto one_digit;
+ }
+ for (i = 1;; i++)
+ {
+ L = d.d / ds;
+ d.d -= L * ds;
+ *s++ = '0' + (int) L;
+ if (i == ilim)
+ {
+ d.d += d.d;
+ if ((d.d > ds) || ((d.d == ds) && (L & 1)))
+ {
+ bump_up:
+ while (*--s == '9')
+ if (s == s0)
+ {
+ k++;
+ *s = '0';
+ break;
+ }
+ ++*s++;
+ }
+ break;
+ }
+ if (!(d.d *= 10.))
+ break;
+ }
+ goto ret1;
+ }
+ m2 = b2;
+ m5 = b5;
+ mhi = mlo = 0;
+ if (leftright)
+ {
+ if (mode < 2)
+ {
+ i =
+ denorm ? be + (1023 + (53 - 1) - 1 + 1) :
+ 1 + 53 - bbits;
+ }
+ else
+ {
+ j = ilim - 1;
+ if (m5 >= j)
+ m5 -= j;
+ else
+ {
+ s5 += j -= m5;
+ b5 += j;
+ m5 = 0;
+ }
+ if ((i = ilim) < 0)
+ {
+ m2 -= i;
+ i = 0;
+ }
+ }
+ b2 += i;
+ s2 += i;
+ mhi = __i2b (ptr, 1);
+ }
+ if (m2 > 0 && s2 > 0)
+ {
+ i = m2 < s2 ? m2 : s2;
+ b2 -= i;
+ m2 -= i;
+ s2 -= i;
+ }
+ if (b5 > 0)
+ {
+ if (leftright)
+ {
+ if (m5 > 0)
+ {
+ mhi = __pow5mult (ptr, mhi, m5);
+ b1 = __multiply (ptr, mhi, b);
+ _Bfree (ptr, b);
+ b = b1;
+ }
+ if ((j = b5 - m5) != 0)
+ b = __pow5mult (ptr, b, j);
+ }
+ else
+ b = __pow5mult (ptr, b, b5);
+ }
+ S = __i2b (ptr, 1);
+ if (s5 > 0)
+ S = __pow5mult (ptr, S, s5);
+ spec_case = 0;
+ if (mode < 2)
+ {
+ if (!(d.i[0]) && !((d.i[1]) & ((__uint32_t)0xfffffL))
+ && (d.i[1]) & ((__uint32_t)0x7ff00000L)
+ )
+ {
+ b2 += 1;
+ s2 += 1;
+ spec_case = 1;
+ }
+ }
+ if ((i = ((s5 ? 32 - __hi0bits (S->_x[S->_wds - 1]) : 1) + s2) & 0x1f) != 0)
+ i = 32 - i;
+ if (i > 4)
+ {
+ i -= 4;
+ b2 += i;
+ m2 += i;
+ s2 += i;
+ }
+ else if (i < 4)
+ {
+ i += 28;
+ b2 += i;
+ m2 += i;
+ s2 += i;
+ }
+ if (b2 > 0)
+ b = __lshift (ptr, b, b2);
+ if (s2 > 0)
+ S = __lshift (ptr, S, s2);
+ if (k_check)
+ {
+ if (__mcmp (b, S) < 0)
+ {
+ k--;
+ b = __multadd (ptr, b, 10, 0);
+ if (leftright)
+ mhi = __multadd (ptr, mhi, 10, 0);
+ ilim = ilim1;
+ }
+ }
+ if (ilim <= 0 && mode > 2)
+ {
+ if (ilim < 0 || __mcmp (b, S = __multadd (ptr, S, 5, 0)) <= 0)
+ {
+ no_digits:
+ k = -1 - ndigits;
+ goto ret;
+ }
+ one_digit:
+ *s++ = '1';
+ k++;
+ goto ret;
+ }
+ if (leftright)
+ {
+ if (m2 > 0)
+ mhi = __lshift (ptr, mhi, m2);
+ mlo = mhi;
+ if (spec_case)
+ {
+ mhi = _Balloc (ptr, mhi->_k);
+ memcpy((char *)&mhi->_sign, (char *)&mlo->_sign, mlo->_wds*sizeof(long) + 2*sizeof(int));
+ mhi = __lshift (ptr, mhi, 1);
+ }
+ for (i = 1;; i++)
+ {
+ dig = quorem (b, S) + '0';
+ j = __mcmp (b, mlo);
+ delta = __mdiff (ptr, S, mhi);
+ j1 = delta->_sign ? 1 : __mcmp (b, delta);
+ _Bfree (ptr, delta);
+ if (j1 == 0 && !mode && !((d.i[0]) & 1))
+ {
+ if (dig == '9')
+ goto round_9_up;
+ if (j > 0)
+ dig++;
+ *s++ = dig;
+ goto ret;
+ }
+ if ((j < 0) || ((j == 0) && !mode
+ && !((d.i[0]) & 1)
+ ))
+ {
+ if (j1 > 0)
+ {
+ b = __lshift (ptr, b, 1);
+ j1 = __mcmp (b, S);
+ if (((j1 > 0) || ((j1 == 0) && (dig & 1)))
+ && dig++ == '9')
+ goto round_9_up;
+ }
+ *s++ = dig;
+ goto ret;
+ }
+ if (j1 > 0)
+ {
+ if (dig == '9')
+ {
+ round_9_up:
+ *s++ = '9';
+ goto roundoff;
+ }
+ *s++ = dig + 1;
+ goto ret;
+ }
+ *s++ = dig;
+ if (i == ilim)
+ break;
+ b = __multadd (ptr, b, 10, 0);
+ if (mlo == mhi)
+ mlo = mhi = __multadd (ptr, mhi, 10, 0);
+ else
+ {
+ mlo = __multadd (ptr, mlo, 10, 0);
+ mhi = __multadd (ptr, mhi, 10, 0);
+ }
+ }
+ }
+ else
+ for (i = 1;; i++)
+ {
+ *s++ = dig = quorem (b, S) + '0';
+ if (i >= ilim)
+ break;
+ b = __multadd (ptr, b, 10, 0);
+ }
+ b = __lshift (ptr, b, 1);
+ j = __mcmp (b, S);
+ if ((j > 0) || ((j == 0) && (dig & 1)))
+ {
+ roundoff:
+ while (*--s == '9')
+ if (s == s0)
+ {
+ k++;
+ *s++ = '1';
+ goto ret;
+ }
+ ++*s++;
+ }
+ else
+ {
+ while (*--s == '0');
+ s++;
+ }
+ret:
+ _Bfree (ptr, S);
+ if (mhi)
+ {
+ if (mlo && mlo != mhi)
+ _Bfree (ptr, mlo);
+ _Bfree (ptr, mhi);
+ }
+ret1:
+ _Bfree (ptr, b);
+ *s = 0;
+ *decpt = k + 1;
+ if (rve)
+ *rve = s;
+ return s0;
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr59923.c b/gcc/testsuite/gcc.target/arm/pr59923.c
new file mode 100644
index 0000000000..86a4e7d835
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr59923.c
@@ -0,0 +1,24 @@
+/* PR target/59923 */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mcpu=cortex-a15 -fno-strict-aliasing -mthumb -g" } */
+
+struct S
+{
+ void *s;
+ struct T { unsigned short a; unsigned char b[4], c[4]; } *t;
+} s;
+void bar (void *);
+
+void
+foo (struct S *x, int *y)
+{
+ if (*y > 0)
+ return;
+ else if (x->t->b[0] == 0x43 && x->t->b[1] == 0x6d && x->t->c[0] == 1)
+ x->s = &s;
+ else
+ *y = 16384;
+ if (*y > 0)
+ bar (x);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr59985.C b/gcc/testsuite/gcc.target/arm/pr59985.C
new file mode 100644
index 0000000000..1351c486fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr59985.C
@@ -0,0 +1,69 @@
+/* { dg-do compile } */
+/* { dg-skip-if "incompatible options" { arm_thumb1 } { "*" } { "" } } */
+/* { dg-options "-g -fcompare-debug -O2 -march=armv7-a -mtune=cortex-a9 -mfpu=vfpv3-d16 -mfloat-abi=hard" } */
+
+extern void *f1 (unsigned long, unsigned long);
+extern const struct line_map *f2 (void *, int, unsigned int, const char *, unsigned int);
+extern unsigned int f3 (void *, unsigned int);
+extern void *v1;
+struct B { const char *s; int t; };
+struct C { unsigned u; unsigned long long v; void *w; };
+unsigned long long f4 (struct C *);
+const char *f5 (void *, unsigned int, unsigned int *);
+unsigned long long f6 (void *);
+
+static inline unsigned long long
+f7 (struct C *x, unsigned y)
+{
+ unsigned long long a, b;
+ int u = x->u;
+ a = y == 64 ? -1ULL : (1ULL << y) - 1;
+ if (u + y > 64)
+ {
+ f6 (x->w);
+ x->u = y;
+ return b & a;
+ }
+ b = x->v;
+ b >>= u;
+ x->u = u + y;
+ return b & a;
+}
+
+static const char *
+f8 (const char *x)
+{
+ B **a;
+ unsigned long t = __builtin_strlen (x);
+ char *b;
+ struct B *c;
+ b = (char *) f1 (t + 1, 1);
+ c = (struct B *) f1 (1, sizeof (struct B));
+ __builtin_memcpy (b, x, t + 1);
+ c->t = t;
+ struct B *d = *a;
+ return d->s;
+}
+
+unsigned int
+f9 (struct C *x, void *y)
+{
+ static const char *a;
+ static int b;
+ static int c;
+ bool d, e, f;
+ unsigned t;
+ bool prev_file = a != __null;
+ if (f7 (x, 1))
+ return ((unsigned int) 0);
+ d = f7 (x, 1);
+ e = f7 (x, 1);
+ f = f7 (x, 1);
+ a = f8 (f5 (y, f4 (x), &t));
+ if (e) b = f4 (x);
+ if (f)
+ if (d)
+ if (prev_file)
+ f2 (v1, 1, false, __null, 0);
+ return f3 (v1, c);
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60264.c b/gcc/testsuite/gcc.target/arm/pr60264.c
new file mode 100644
index 0000000000..4fe6aedb27
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60264.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mapcs -g" } */
+
+double bar(void);
+
+int foo(void)
+{
+ int i = bar() + bar();
+
+ return i;
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/pr60650-2.c b/gcc/testsuite/gcc.target/arm/pr60650-2.c
new file mode 100644
index 0000000000..19467607b6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60650-2.c
@@ -0,0 +1,37 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -march=armv7-a" } */
+
+int a, h, j;
+long long d, e, i;
+int f;
+fn1 (void *p1, int p2)
+{
+ switch (p2)
+ case 8:
+{
+ register b = *(long long *) p1, c asm ("r2");
+ asm ("%0": "=r" (a), "=r" (c):"r" (b), "r" (0));
+ *(long long *) p1 = c;
+ }
+}
+
+fn2 ()
+{
+ int k;
+ k = f;
+ while (1)
+ {
+ fn1 (&i, sizeof i);
+ e = d + k;
+ switch (d)
+ case 0:
+ (
+ {
+ register l asm ("r4");
+ register m asm ("r0");
+ asm (" .err .endif\n\t": "=r" (h), "=r" (j):"r" (m),
+ "r"
+ (l));;
+ });
+ }
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60650.c b/gcc/testsuite/gcc.target/arm/pr60650.c
new file mode 100644
index 0000000000..17a5ed448c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60650.c
@@ -0,0 +1,41 @@
+/* { dg-do compile } */
+/* { dg-skip-if "do not override -mfloat-abi" { *-*-* } { "-mfloat-abi=*" } {"-mfloat-abi=softfp" } } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -mabi=apcs-gnu -mfloat-abi=softfp" } */
+
+
+struct super_block
+{
+ int s_blocksize_bits;
+};
+struct btrfs_fs_info
+{
+ struct super_block *sb;
+};
+struct btrfs_root
+{
+ struct btrfs_fs_info *fs_info;
+} *b;
+
+
+int a, c, d;
+long long e;
+
+truncate_one_csum (struct btrfs_root *p1, long long p2, long long p3)
+{
+ int f, g, i = p1->fs_info->sb->s_blocksize_bits;
+ g = a;
+ long long h = p2 + p3;
+ f = foo1 (b, 0, c, 0);
+ e = f / g;
+ e <<= p1->fs_info->sb->s_blocksize_bits;
+ if (d < p2)
+ {
+ int j = e - h >> i;
+ foo2 (p1, 0, j);
+ }
+ else
+ {
+ asm ("1\t.long ");
+ __builtin_unreachable ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60657.c b/gcc/testsuite/gcc.target/arm/pr60657.c
new file mode 100644
index 0000000000..66355c39a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60657.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a" } */
+
+
+void foo (void);
+
+void
+bar (int x, int y)
+{
+ y = 9999;
+ if (x & (1 << y))
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/arm/pr60663.c b/gcc/testsuite/gcc.target/arm/pr60663.c
new file mode 100644
index 0000000000..b79b830e1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/pr60663.c
@@ -0,0 +1,11 @@
+/* PR rtl-optimization/60663 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=armv7-a" } */
+
+int
+foo (void)
+{
+ unsigned i, j;
+ asm ("%0 %1" : "=r" (i), "=r" (j));
+ return i;
+}
diff --git a/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c
new file mode 100644
index 0000000000..bd85e8640c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/require-pic-register-loc.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-g -fPIC" } */
+
+void *v;
+void a (void *x) { }
+void b (void) { }
+ /* line 7. */
+int /* line 8. */
+main (int argc) /* line 9. */
+{ /* line 10. */
+ if (argc == 12345) /* line 11. */
+ {
+ a (v);
+ return 1;
+ }
+ b ();
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "\.loc 1 7 0" } } */
+/* { dg-final { scan-assembler-not "\.loc 1 8 0" } } */
+/* { dg-final { scan-assembler-not "\.loc 1 9 0" } } */
+
+/* The loc at the start of the prologue. */
+/* { dg-final { scan-assembler-times "\.loc 1 10 0" 1 } } */
+
+/* The loc at the end of the prologue, with the first user line. */
+/* { dg-final { scan-assembler-times "\.loc 1 11 0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/sat-1.c b/gcc/testsuite/gcc.target/arm/sat-1.c
new file mode 100644
index 0000000000..ebde56a455
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/sat-1.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_arm_ok } */
+/* { dg-require-effective-target arm_arch_v6_ok } */
+/* { dg-options "-O2 -marm" } */
+/* { dg-add-options arm_arch_v6 } */
+
+
+static inline int sat1 (int a, int amin, int amax)
+{
+ if (a < amin) return amin;
+ else if (a > amax) return amax;
+ else return a;
+}
+
+static inline int sat2 (int a, int amin, int amax)
+{
+ if (a > amax) return amax;
+ else if (a < amin) return amin;
+ else return a;
+}
+
+int u1 (int x)
+{
+ return sat1 (x, 0, 63);
+}
+
+int us1 (int x)
+{
+ return sat1 (x >> 5, 0, 63);
+}
+
+int s1 (int x)
+{
+ return sat1 (x, -64, 63);
+}
+
+int ss1 (int x)
+{
+ return sat1 (x >> 5, -64, 63);
+}
+
+int u2 (int x)
+{
+ return sat2 (x, 0, 63);
+}
+
+int us2 (int x)
+{
+ return sat2 (x >> 5, 0, 63);
+}
+
+int s2 (int x)
+{
+ return sat2 (x, -64, 63);
+}
+
+int ss2 (int x)
+{
+ return sat2 (x >> 5, -64, 63);
+}
+
+/* { dg-final { scan-assembler-times "usat" 4 } } */
+/* { dg-final { scan-assembler-times "ssat" 4 } } */
+
diff --git a/gcc/testsuite/gcc.target/arm/smlaltb-1.c b/gcc/testsuite/gcc.target/arm/smlaltb-1.c
index 1472c9b3fa..a27009d251 100644
--- a/gcc/testsuite/gcc.target/arm/smlaltb-1.c
+++ b/gcc/testsuite/gcc.target/arm/smlaltb-1.c
@@ -11,4 +11,4 @@ foo (long long x, int in)
return x + b * a;
}
-/* { dg-final { scan-assembler "smlaltb\\t" } } */
+/* { dg-final { scan-assembler "smlaltb\\t" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/arm/smlaltt-1.c b/gcc/testsuite/gcc.target/arm/smlaltt-1.c
index 6bcbce0b95..380e3d01be 100644
--- a/gcc/testsuite/gcc.target/arm/smlaltt-1.c
+++ b/gcc/testsuite/gcc.target/arm/smlaltt-1.c
@@ -11,4 +11,4 @@ foo (long long x, int in1, int in2)
return x + b * a;
}
-/* { dg-final { scan-assembler "smlaltt\\t" } } */
+/* { dg-final { scan-assembler "smlaltt\\t" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/arm/stack-red-zone.c b/gcc/testsuite/gcc.target/arm/stack-red-zone.c
index b9f0f99371..8db2e2c092 100644
--- a/gcc/testsuite/gcc.target/arm/stack-red-zone.c
+++ b/gcc/testsuite/gcc.target/arm/stack-red-zone.c
@@ -1,4 +1,5 @@
/* No stack red zone. PR38644. */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
/* { dg-options "-mthumb -O2" } */
/* { dg-final { scan-assembler "ldrb\[^\n\]*\\n\[\t \]*add\[\t \]*sp" } } */
diff --git a/gcc/testsuite/gcc.target/arm/synchronize.c b/gcc/testsuite/gcc.target/arm/synchronize.c
index cf5dcdf5c5..7ef10e2d97 100644
--- a/gcc/testsuite/gcc.target/arm/synchronize.c
+++ b/gcc/testsuite/gcc.target/arm/synchronize.c
@@ -1,4 +1,4 @@
-/* { dg-final { scan-assembler "__sync_synchronize|dmb|mcr" { target arm*-*-linux-*eabi* } } } */
+/* { dg-final { scan-assembler "__sync_synchronize|dmb|mcr" { target arm*-*-linux-* } } } */
void *foo (void)
{
diff --git a/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c b/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c
new file mode 100644
index 0000000000..90407eb687
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb-16bit-ops.c
@@ -0,0 +1,203 @@
+/* Check that the compiler properly uses 16-bit encodings where available. */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-Os -fno-builtin -mthumb" } */
+
+int
+f (int a, int b)
+{
+ return a + b;
+}
+
+/* { dg-final { scan-assembler "add r0, r0, r1" } } */
+
+int
+f2 (int a, int b, int c)
+{
+ return b + c;
+}
+
+/* { dg-final { scan-assembler "adds r0, r1, r2" } } */
+int
+g1 (int a)
+{
+ return a + 255;
+}
+
+/* { dg-final { scan-assembler "adds r0, r0, #255" } } */
+
+int
+g2 (int a)
+{
+ return a + 256;
+}
+
+/* { dg-final { scan-assembler "add r0, r0, #256" } } */
+
+int
+g3 (int a)
+{
+ return a - 255;
+}
+
+/* { dg-final { scan-assembler "subs r0, r0, #255" } } */
+
+int
+g4 (int a)
+{
+ return a - 256;
+}
+
+/* { dg-final { scan-assembler "sub r0, r0, #256" } } */
+
+int
+h1 (int a, int b)
+{
+ return b + 7;
+}
+
+/* { dg-final { scan-assembler "adds r0, r1, #7" } } */
+
+int
+h2 (int a, int b)
+{
+ return b + 8;
+}
+
+/* { dg-final { scan-assembler "add r0, r1, #8" } } */
+
+int
+h3 (int a, int b)
+{
+ return b - 7;
+}
+
+/* { dg-final { scan-assembler "subs r0, r1, #7" } } */
+
+int
+h4 (int a, int b)
+{
+ return b - 8;
+}
+
+/* { dg-final { scan-assembler "sub r0, r1, #8" } } */
+
+int
+i (int a, int b)
+{
+ return b;
+}
+
+/* { dg-final { scan-assembler "mov r0, r1" } } */
+
+int
+j1 ()
+{
+ return 255;
+}
+
+/* { dg-final { scan-assembler "movs r0, #255" } } */
+
+int
+j2 ()
+{
+ return 256;
+}
+
+/* { dg-final { scan-assembler "mov r0, #256" } } */
+
+int
+k (int a, int b)
+{
+ return b << 15;
+}
+
+/* { dg-final { scan-assembler "lsls r0, r1, #15" } } */
+
+int
+l1 (int a, int b)
+{
+ return a << b;
+}
+
+/* { dg-final { scan-assembler "lsls r0, r0, r1" } } */
+
+int
+l2 (int a, int b, int c)
+{
+ return b << c;
+}
+
+/* { dg-final { scan-assembler "lsl r0, r1, r2" } } */
+
+int
+m (int a, int b)
+{
+ return b >> 15;
+}
+
+/* { dg-final { scan-assembler "asrs r0, r1, #15" } } */
+
+int
+n1 (int a, int b)
+{
+ return a >> b;
+}
+
+/* { dg-final { scan-assembler "asrs r0, r0, r1" } } */
+
+int
+n2 (int a, int b, int c)
+{
+ return b >> c;
+}
+
+/* { dg-final { scan-assembler "asr r0, r1, r2" } } */
+
+unsigned int
+o (unsigned int a, unsigned int b)
+{
+ return b >> 15;
+}
+
+/* { dg-final { scan-assembler "lsrs r0, r1, #15" } } */
+
+unsigned int
+p1 (unsigned int a, unsigned int b)
+{
+ return a >> b;
+}
+
+/* { dg-final { scan-assembler "lsrs r0, r0, r1" } } */
+
+unsigned int
+p2 (unsigned int a, unsigned int b, unsigned int c)
+{
+ return b >> c;
+}
+
+/* { dg-final { scan-assembler "lsr r0, r1, r2" } } */
+
+int
+q (int a, int b)
+{
+ return b * a;
+}
+
+/* { dg-final { scan-assembler "muls r0, r1, r0" } } */
+
+int
+r (int a, int b)
+{
+ return ~b;
+}
+
+/* { dg-final { scan-assembler "mvns r0, r1" } } */
+
+int
+s (int a, int b)
+{
+ return -b;
+}
+
+/* { dg-final { scan-assembler "negs r0, r1" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-builtin-trap.c b/gcc/testsuite/gcc.target/arm/thumb-builtin-trap.c
new file mode 100644
index 0000000000..22e90e7d2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb-builtin-trap.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mthumb" } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+
+void
+trap ()
+{
+ __builtin_trap ();
+}
+
+/* { dg-final { scan-assembler "0xdeff" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-cbranchqi.c b/gcc/testsuite/gcc.target/arm/thumb-cbranchqi.c
index ad28e7f54b..5894df964a 100644
--- a/gcc/testsuite/gcc.target/arm/thumb-cbranchqi.c
+++ b/gcc/testsuite/gcc.target/arm/thumb-cbranchqi.c
@@ -12,4 +12,4 @@ int ldrb(unsigned char* p)
/* { dg-final { scan-assembler "127" } } */
-/* { dg-final { scan-assembler "bhi" } } */
+/* { dg-final { scan-assembler "bhi|bls" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-find-work-register.c b/gcc/testsuite/gcc.target/arm/thumb-find-work-register.c
index f2c0225a4d..e67a627ea3 100644
--- a/gcc/testsuite/gcc.target/arm/thumb-find-work-register.c
+++ b/gcc/testsuite/gcc.target/arm/thumb-find-work-register.c
@@ -1,5 +1,6 @@
/* Wrong method to get number of arg reg will cause argument corruption. */
/* { dg-do run } */
+/* { dg-skip-if "incompatible options" { ! { arm_thumb1_ok || arm_thumb2_ok } } { "*" } { "" } } */
/* { dg-require-effective-target arm_eabi } */
/* { dg-options "-mthumb -O1" } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-ifcvt-2.c b/gcc/testsuite/gcc.target/arm/thumb-ifcvt-2.c
new file mode 100644
index 0000000000..3da9ef080f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb-ifcvt-2.c
@@ -0,0 +1,18 @@
+/* Check that Thumb 16-bit shifts by immediate can be if-converted. */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mthumb" } */
+
+int
+foo (int a, int b)
+{
+ if (a != b)
+ a = a << 1;
+ else
+ a = a >> 1;
+
+ return a + b;
+}
+
+/* { dg-final { scan-assembler "lslne" } } */
+/* { dg-final { scan-assembler "asreq" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-ifcvt.c b/gcc/testsuite/gcc.target/arm/thumb-ifcvt.c
new file mode 100644
index 0000000000..d51827aa74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb-ifcvt.c
@@ -0,0 +1,19 @@
+/* Check that Thumb 16-bit shifts can be if-converted. */
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mthumb" } */
+
+int
+foo (int a, int b)
+{
+ if (a != b)
+ {
+ a = a << b;
+ a = a >> 1;
+ }
+
+ return a + b;
+}
+
+/* { dg-final { scan-assembler "lslne" } } */
+/* { dg-final { scan-assembler "asrne" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb-ltu.c b/gcc/testsuite/gcc.target/arm/thumb-ltu.c
index 24671213e5..d057ea34d2 100644
--- a/gcc/testsuite/gcc.target/arm/thumb-ltu.c
+++ b/gcc/testsuite/gcc.target/arm/thumb-ltu.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-skip-if "incompatible options" { arm*-*-* } { "-march=*" } { "-march=armv6" "-march=armv6j" "-march=armv6z" } } */
+/* { dg-require-effective-target arm_thumb1_ok } */
/* { dg-options "-mcpu=arm1136jf-s -mthumb -O2" } */
void f(unsigned a, unsigned b, unsigned c, unsigned d)
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c b/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c
new file mode 100644
index 0000000000..31b8bd6922
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-Os-mult.c
@@ -0,0 +1,12 @@
+/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { ! { arm_thumb1 } } } */
+
+int
+mymul3 (int x)
+{
+ return x * 0x555;
+}
+
+/* { dg-final { scan-assembler "mul\[\\t \]*r.,\[\\t \]*r." } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c
new file mode 100644
index 0000000000..eb16d2fc99
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-1.c
@@ -0,0 +1,34 @@
+/* Check for thumb1 far jump. Shouldn't save lr for small leaf functions
+ * even with a branch in it. */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { ! { arm_thumb1 } } } */
+
+void f()
+{
+ for (;;);
+}
+
+volatile int g;
+void f2(int i)
+{
+ if (i) g=0;
+}
+
+void f3(int i)
+{
+ if (i) {
+ g=0;
+ g=1;
+ g=2;
+ g=3;
+ g=4;
+ g=5;
+ g=6;
+ g=7;
+ g=8;
+ g=9;
+ }
+}
+
+/* { dg-final { scan-assembler-not "push.*lr" } } */
+
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c
new file mode 100644
index 0000000000..c6878f8ef8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-2.c
@@ -0,0 +1,57 @@
+/* Check for thumb1 far jump. This is the extreme case that far jump
+ * will be used with minimum number of instructions. By passing this case
+ * it means the heuristic of saving lr for far jump meets the most extreme
+ * requirement. */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { ! { arm_thumb1 } } } */
+
+volatile register r4 asm("r4");
+void f3(int i)
+{
+#define GO(n) \
+ extern volatile int g_##n; \
+ r4=(int)&g_##n;
+
+#define GO8(n) \
+ GO(n##_0) \
+ GO(n##_1) \
+ GO(n##_2) \
+ GO(n##_3) \
+ GO(n##_4) \
+ GO(n##_5) \
+ GO(n##_6) \
+ GO(n##_7)
+
+#define GO64(n) \
+ GO8(n##_0) \
+ GO8(n##_1) \
+ GO8(n##_2) \
+ GO8(n##_3) \
+ GO8(n##_4) \
+ GO8(n##_5) \
+ GO8(n##_6) \
+ GO8(n##_7) \
+
+#define GO498(n) \
+ GO64(n##_0) \
+ GO64(n##_1) \
+ GO64(n##_2) \
+ GO64(n##_3) \
+ GO64(n##_4) \
+ GO64(n##_5) \
+ GO64(n##_6) \
+ GO8(n##_0) \
+ GO8(n##_1) \
+ GO8(n##_2) \
+ GO8(n##_3) \
+ GO8(n##_4) \
+ GO8(n##_5) \
+ GO(n##_0) \
+ GO(n##_1) \
+
+ if (i) {
+ GO498(0);
+ }
+}
+
+/* { dg-final { scan-assembler "push.*lr" } } */
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-far-jump-3.c b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-3.c
new file mode 100644
index 0000000000..90559bacb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-far-jump-3.c
@@ -0,0 +1,108 @@
+/* Catch reload ICE on target thumb1 with far jump optimization.
+ * It is also a valid case for non-thumb1 target. */
+
+/* Add -mno-lra option as it is only reproducable with reload. It will
+ be removed after reload is completely removed. */
+/* { dg-options "-mno-lra -fomit-frame-pointer" } */
+/* { dg-do compile } */
+
+#define C 2
+#define A 4
+#define RGB (C | A)
+#define GRAY (A)
+
+typedef unsigned long uint_32;
+typedef unsigned char byte;
+typedef byte * bytep;
+
+typedef struct ss
+{
+ uint_32 w;
+ uint_32 r;
+ byte c;
+ byte b;
+ byte p;
+} info;
+
+typedef info * infop;
+
+void
+foo(infop info, bytep row)
+{
+ uint_32 iw = info->w;
+ if (info->c == RGB)
+ {
+ if (info->b == 8)
+ {
+ bytep sp = row + info->r;
+ bytep dp = sp;
+ byte save;
+ uint_32 i;
+
+ for (i = 0; i < iw; i++)
+ {
+ save = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = save;
+ }
+ }
+
+ else
+ {
+ bytep sp = row + info->r;
+ bytep dp = sp;
+ byte save[2];
+ uint_32 i;
+
+ for (i = 0; i < iw; i++)
+ {
+ save[0] = *(--sp);
+ save[1] = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = save[0];
+ *(--dp) = save[1];
+ }
+ }
+ }
+ else if (info->c == GRAY)
+ {
+ if (info->b == 8)
+ {
+ bytep sp = row + info->r;
+ bytep dp = sp;
+ byte save;
+ uint_32 i;
+
+ for (i = 0; i < iw; i++)
+ {
+ save = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = save;
+ }
+ }
+ else
+ {
+ bytep sp = row + info->r;
+ bytep dp = sp;
+ byte save[2];
+ uint_32 i;
+
+ for (i = 0; i < iw; i++)
+ {
+ save[0] = *(--sp);
+ save[1] = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = *(--sp);
+ *(--dp) = save[0];
+ *(--dp) = save[1];
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-imm.c b/gcc/testsuite/gcc.target/arm/thumb1-imm.c
new file mode 100644
index 0000000000..6d950aa182
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-imm.c
@@ -0,0 +1,12 @@
+/* Check for thumb1 imm [255-510] moves. */
+/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { ! { arm_thumb1 } } } */
+
+int f()
+{
+ return 257;
+}
+
+/* { dg-final { scan-assembler-not "ldr" } } */
+
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c b/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c
new file mode 100644
index 0000000000..df269fc847
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-pic-high-reg.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-options "-mthumb -fpic -mpic-register=9" } */
+
+int g_test;
+
+int
+foo (int par)
+{
+ g_test = par;
+}
diff --git a/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c b/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c
new file mode 100644
index 0000000000..6e9b2570a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb1-pic-single-base.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_thumb1_ok } */
+/* { dg-options "-mthumb -fpic -msingle-pic-base" } */
+
+int g_test;
+
+int
+foo (int par)
+{
+ g_test = par;
+}
diff --git a/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data.c b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data.c
new file mode 100644
index 0000000000..9852ea5d0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/thumb2-slow-flash-data.c
@@ -0,0 +1,74 @@
+/* The option -mslow-flash-data is just for performance tuning, it
+ doesn't totally disable the use of literal pools. But for below
+ simple cases, the use of literal pool should be replaced by
+ movw/movt or read-only constant pool. */
+
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_cortex_m } */
+/* { dg-require-effective-target arm_thumb2_ok } */
+/* { dg-options "-O2 -mthumb -mslow-flash-data" } */
+
+float sf;
+double df;
+long long l;
+static char *p = "Hello World";
+
+float
+testsf (float *p)
+{
+ if (*p > 1.1234f)
+ return 2.1234f;
+ else
+ return 3.1234f;
+}
+
+double
+testdf (double *p)
+{
+ if (*p > 4.1234)
+ return 2.1234;
+ else
+ return 3.1234;
+}
+
+long long
+testll (long long *p)
+{
+ if (*p > 0x123456789ABCDEFll)
+ return 0x111111111ll;
+ else
+ return 0x222222222ll;
+}
+
+char *
+testchar ()
+{
+ return p + 4;
+}
+
+int
+foo (int a, int b)
+{
+ int i;
+ volatile *labelref = &&label1;
+
+ if (a > b)
+ {
+ while (i < b)
+ {
+ a += *labelref;
+ i += 1;
+ }
+ goto *labelref;
+ }
+ else
+ b = b + 3;
+
+ a = a * b;
+
+label1:
+ return a + b;
+}
+
+/* { dg-final { scan-assembler-times "movt" 13 } } */
+/* { dg-final { scan-assembler-times "movt.*LC0\\+4" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
index c7d24c9c5c..1ad730d640 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-2.c
@@ -4,7 +4,7 @@
#include <string.h>
-char dest[16];
+char dest[16] = { 0 };
void aligned_dest (char *src)
{
@@ -14,7 +14,10 @@ void aligned_dest (char *src)
/* Expect a multi-word store for the main part of the copy, but subword
loads/stores for the remainder. */
-/* { dg-final { scan-assembler-times "stmia" 1 } } */
+/* { dg-final { scan-assembler-times "ldmia" 0 } } */
+/* { dg-final { scan-assembler-times "ldrd" 0 } } */
+/* { dg-final { scan-assembler-times "stmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
+/* { dg-final { scan-assembler-times "strd" 1 { target { arm_prefer_ldrd_strd } } } } */
/* { dg-final { scan-assembler-times "ldrh" 1 } } */
/* { dg-final { scan-assembler-times "strh" 1 } } */
/* { dg-final { scan-assembler-times "ldrb" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
index 5f0413738c..d0b09bd48f 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-3.c
@@ -4,7 +4,7 @@
#include <string.h>
-char src[16];
+char src[16] = {0};
void aligned_src (char *dest)
{
@@ -14,8 +14,11 @@ void aligned_src (char *dest)
/* Expect a multi-word load for the main part of the copy, but subword
loads/stores for the remainder. */
-/* { dg-final { scan-assembler-times "ldmia" 1 } } */
-/* { dg-final { scan-assembler-times "ldrh" 1 } } */
+/* { dg-final { scan-assembler-times "ldmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
+/* { dg-final { scan-assembler-times "ldrd" 1 { target { arm_prefer_ldrd_strd } } } } */
+/* { dg-final { scan-assembler-times "strd" 0 } } */
+/* { dg-final { scan-assembler-times "stm" 0 } } */
+/* { dg-final { scan-assembler-times "ldrh" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
/* { dg-final { scan-assembler-times "strh" 1 } } */
-/* { dg-final { scan-assembler-times "ldrb" 1 } } */
+/* { dg-final { scan-assembler-times "ldrb" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
/* { dg-final { scan-assembler-times "strb" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
index 99957086e7..830e22e09d 100644
--- a/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
+++ b/gcc/testsuite/gcc.target/arm/unaligned-memcpy-4.c
@@ -4,8 +4,8 @@
#include <string.h>
-char src[16];
-char dest[16];
+char src[16] = { 0 };
+char dest[16] = { 0 };
void aligned_both (void)
{
@@ -14,5 +14,9 @@ void aligned_both (void)
/* We know both src and dest to be aligned: expect multiword loads/stores. */
-/* { dg-final { scan-assembler-times "ldmia" 1 } } */
-/* { dg-final { scan-assembler-times "stmia" 1 } } */
+/* { dg-final { scan-assembler-times "ldmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
+/* { dg-final { scan-assembler-times "stmia" 1 { target { ! { arm_prefer_ldrd_strd } } } } } */
+/* { dg-final { scan-assembler "ldrd" { target { arm_prefer_ldrd_strd } } } } */
+/* { dg-final { scan-assembler-times "ldm" 0 { target { arm_prefer_ldrd_strd } } } } */
+/* { dg-final { scan-assembler "strd" { target { arm_prefer_ldrd_strd } } } } */
+/* { dg-final { scan-assembler-times "stm" 0 { target { arm_prefer_ldrd_strd } } } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-noalign.c b/gcc/testsuite/gcc.target/arm/vect-noalign.c
new file mode 100644
index 0000000000..a934233a33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vect-noalign.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-require-effective-target arm_neon_hw } */
+/* { dg-options "-mfpu=neon -ffast-math -ftree-vectorize -fno-common -O2 -mno-unaligned-access" } */
+
+
+/* Test for-mno-unaligned-access and -ftree-vectorize and results bus error. */
+#define N 128
+
+char ia[N];
+char ib[N+1];
+
+int main() {
+ int i;
+ for(i = 0; i < N; ++i) {
+ ia[i] = ib[i + 1];
+ }
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
new file mode 100644
index 0000000000..ff033d437e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-btruncf.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-add-options arm_v8_neon } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_truncf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_btruncf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
new file mode 100644
index 0000000000..b54f358f71
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-ceilf.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-add-options arm_v8_neon } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_ceilf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_ceilf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
new file mode 100644
index 0000000000..02e188d965
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-floorf.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-add-options arm_v8_neon } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_floorf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_floorf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c b/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c
new file mode 100644
index 0000000000..85e205806a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vect-rounding-roundf.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_neon_ok } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize" } */
+/* { dg-add-options arm_v8_neon } */
+
+#define N 32
+
+void
+foo (float *output, float *input)
+{
+ int i = 0;
+ /* Vectorizable. */
+ for (i = 0; i < N; i++)
+ output[i] = __builtin_roundf (input[i]);
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_call_roundf } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vfp-1.c b/gcc/testsuite/gcc.target/arm/vfp-1.c
index d455ea42fe..d6d9c46425 100644
--- a/gcc/testsuite/gcc.target/arm/vfp-1.c
+++ b/gcc/testsuite/gcc.target/arm/vfp-1.c
@@ -129,7 +129,7 @@ void test_ldst (float f[], double d[]) {
/* { dg-final { scan-assembler "flds.+ \\\[r0, #1020\\\]" } } */
/* { dg-final { scan-assembler "flds.+ \\\[r\[0-9\], #-1020\\\]" { target { arm32 && { ! arm_thumb2_ok } } } } } */
/* { dg-final { scan-assembler "add.+ r0, #1024" } } */
- /* { dg-final { scan-assembler "fsts.+ \\\[r\[0-9\], #0\\\]\n" } } */
+ /* { dg-final { scan-assembler "fsts.+ \\\[r\[0-9\]\\\]\n" } } */
f[256] = f[255] + f[-255];
/* { dg-final { scan-assembler "fldd.+ \\\[r1, #1016\\\]" } } */
diff --git a/gcc/testsuite/gcc.target/arm/vmaxnmdf.c b/gcc/testsuite/gcc.target/arm/vmaxnmdf.c
new file mode 100644
index 0000000000..1a172b8c01
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vmaxnmdf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ return __builtin_fmax (x, y);
+}
+
+/* { dg-final { scan-assembler-times "vmaxnm.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vmaxnmsf.c b/gcc/testsuite/gcc.target/arm/vmaxnmsf.c
new file mode 100644
index 0000000000..bc2326187f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vmaxnmsf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ return __builtin_fmaxf (x, y);
+}
+
+/* { dg-final { scan-assembler-times "vmaxnm.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vminnmdf.c b/gcc/testsuite/gcc.target/arm/vminnmdf.c
new file mode 100644
index 0000000000..c2a6915b2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vminnmdf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ return __builtin_fmin (x, y);
+}
+
+/* { dg-final { scan-assembler-times "vminnm.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vminnmsf.c b/gcc/testsuite/gcc.target/arm/vminnmsf.c
new file mode 100644
index 0000000000..eee43bce1e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vminnmsf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-ffast-math" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ return __builtin_fminf (x, y);
+}
+
+/* { dg-final { scan-assembler-times "vminnm.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrinta-ce.c b/gcc/testsuite/gcc.target/arm/vrinta-ce.c
new file mode 100644
index 0000000000..71c5b3b0e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrinta-ce.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2 -marm -march=armv8-a" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double foo (double a)
+{
+ if (a > 3.0)
+ return __builtin_round (a);
+
+ return 0.0;
+}
+
+/* { dg-final { scan-assembler-times "vrinta.f64\td\[0-9\]+" 1 } } */
+
diff --git a/gcc/testsuite/gcc.target/arm/vrintaf32.c b/gcc/testsuite/gcc.target/arm/vrintaf32.c
new file mode 100644
index 0000000000..bea4aca551
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintaf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_roundf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrinta.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintaf64.c b/gcc/testsuite/gcc.target/arm/vrintaf64.c
new file mode 100644
index 0000000000..0c393474fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintaf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_round (x);
+}
+
+/* { dg-final { scan-assembler-times "vrinta.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintmf32.c b/gcc/testsuite/gcc.target/arm/vrintmf32.c
new file mode 100644
index 0000000000..33c22885f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintmf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_floorf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintm.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintmf64.c b/gcc/testsuite/gcc.target/arm/vrintmf64.c
new file mode 100644
index 0000000000..d1b3db9649
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintmf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_floor (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintm.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintpf32.c b/gcc/testsuite/gcc.target/arm/vrintpf32.c
new file mode 100644
index 0000000000..ecea15db60
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintpf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_ceilf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintp.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintpf64.c b/gcc/testsuite/gcc.target/arm/vrintpf64.c
new file mode 100644
index 0000000000..a4ce30d646
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintpf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_ceil (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintp.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintrf32.c b/gcc/testsuite/gcc.target/arm/vrintrf32.c
new file mode 100644
index 0000000000..f1b03be5c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintrf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_nearbyintf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintr.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintrf64.c b/gcc/testsuite/gcc.target/arm/vrintrf64.c
new file mode 100644
index 0000000000..3f8171898b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintrf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_nearbyint (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintr.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintxf32.c b/gcc/testsuite/gcc.target/arm/vrintxf32.c
new file mode 100644
index 0000000000..ca00b0f510
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintxf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_rintf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintx.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintxf64.c b/gcc/testsuite/gcc.target/arm/vrintxf64.c
new file mode 100644
index 0000000000..9b86048879
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintxf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_rint (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintx.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintzf32.c b/gcc/testsuite/gcc.target/arm/vrintzf32.c
new file mode 100644
index 0000000000..c76bf6e99c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintzf32.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x)
+{
+ return __builtin_truncf (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintz.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vrintzf64.c b/gcc/testsuite/gcc.target/arm/vrintzf64.c
new file mode 100644
index 0000000000..602e876f58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vrintzf64.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x)
+{
+ return __builtin_trunc (x);
+}
+
+/* { dg-final { scan-assembler-times "vrintz.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vseleqdf.c b/gcc/testsuite/gcc.target/arm/vseleqdf.c
new file mode 100644
index 0000000000..86e147b1f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vseleqdf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i == 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vseleq.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vseleqsf.c b/gcc/testsuite/gcc.target/arm/vseleqsf.c
new file mode 100644
index 0000000000..120f44bf01
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vseleqsf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i == 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vseleq.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselgedf.c b/gcc/testsuite/gcc.target/arm/vselgedf.c
new file mode 100644
index 0000000000..cea08d12ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselgedf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i >= 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselge.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselgesf.c b/gcc/testsuite/gcc.target/arm/vselgesf.c
new file mode 100644
index 0000000000..86f2a04907
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselgesf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i >= 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselge.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselgtdf.c b/gcc/testsuite/gcc.target/arm/vselgtdf.c
new file mode 100644
index 0000000000..2c4a6ba906
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselgtdf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i > 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselgt.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselgtsf.c b/gcc/testsuite/gcc.target/arm/vselgtsf.c
new file mode 100644
index 0000000000..388e74c111
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselgtsf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i > 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselgt.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselledf.c b/gcc/testsuite/gcc.target/arm/vselledf.c
new file mode 100644
index 0000000000..088dc04b27
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselledf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i <= 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselgt.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vsellesf.c b/gcc/testsuite/gcc.target/arm/vsellesf.c
new file mode 100644
index 0000000000..d0afdbcec5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vsellesf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i <= 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselgt.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselltdf.c b/gcc/testsuite/gcc.target/arm/vselltdf.c
new file mode 100644
index 0000000000..fbcb9ea2b3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselltdf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i < 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselge.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselltsf.c b/gcc/testsuite/gcc.target/arm/vselltsf.c
new file mode 100644
index 0000000000..959dab7fa3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselltsf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i < 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselge.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselnedf.c b/gcc/testsuite/gcc.target/arm/vselnedf.c
new file mode 100644
index 0000000000..cf67f29f3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselnedf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ volatile int i = 0;
+ return i != 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vseleq.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselnesf.c b/gcc/testsuite/gcc.target/arm/vselnesf.c
new file mode 100644
index 0000000000..2e16423b57
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselnesf.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ volatile int i = 0;
+ return i != 0 ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vseleq.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselvcdf.c b/gcc/testsuite/gcc.target/arm/vselvcdf.c
new file mode 100644
index 0000000000..7f30270c50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselvcdf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ return !__builtin_isunordered (x, y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselvs.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselvcsf.c b/gcc/testsuite/gcc.target/arm/vselvcsf.c
new file mode 100644
index 0000000000..1bb736925f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselvcsf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ return !__builtin_isunordered (x, y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselvs.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselvsdf.c b/gcc/testsuite/gcc.target/arm/vselvsdf.c
new file mode 100644
index 0000000000..83ad5bf695
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselvsdf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+double
+foo (double x, double y)
+{
+ return __builtin_isunordered (x, y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselvs.f64\td\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/vselvssf.c b/gcc/testsuite/gcc.target/arm/vselvssf.c
new file mode 100644
index 0000000000..7d762899cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/vselvssf.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target arm_v8_vfp_ok } */
+/* { dg-options "-O2" } */
+/* { dg-add-options arm_v8_vfp } */
+
+float
+foo (float x, float y)
+{
+ return __builtin_isunordered (x, y) ? x : y;
+}
+
+/* { dg-final { scan-assembler-times "vselvs.f32\ts\[0-9\]+" 1 } } */
diff --git a/gcc/testsuite/gcc.target/arm/xordi3-opt.c b/gcc/testsuite/gcc.target/arm/xordi3-opt.c
new file mode 100644
index 0000000000..7e031c3af2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/arm/xordi3-opt.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+unsigned long long xor64 (unsigned long long input)
+{
+ return input ^ 0x200000004ULL;
+}
+
+/* { dg-final { scan-assembler-not "mov\[\\t \]+.+,\[\\t \]*.+" } } */
diff --git a/gcc/testsuite/gcc.target/avr/avr.exp b/gcc/testsuite/gcc.target/avr/avr.exp
index a552a96856..86a541a099 100644
--- a/gcc/testsuite/gcc.target/avr/avr.exp
+++ b/gcc/testsuite/gcc.target/avr/avr.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
new file mode 100644
index 0000000000..0a8393e496
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/dev-specific-rmw.c
@@ -0,0 +1,13 @@
+/* Verify that rmw instructions supported */
+/* { dg-do assemble } */
+
+int main()
+{
+ #ifdef __AVR_ISA_RMW__
+ __asm("xch Z, r12");
+ __asm("las Z, r12");
+ __asm("lac Z, r12");
+ __asm("lat Z, r12");
+ #endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/pr58545.c b/gcc/testsuite/gcc.target/avr/pr58545.c
new file mode 100644
index 0000000000..d1b8461f7c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/pr58545.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -mmcu=atmega8" } */
+
+typedef unsigned char uint8_t;
+typedef unsigned int uint16_t;
+
+extern uint8_t f1 (const uint8_t*);
+extern void f2 (uint8_t*, uint8_t);
+
+void func (uint16_t parameter, uint8_t *addr, uint8_t data)
+{
+ uint8_t status;
+
+ status = f1 (addr + 8);
+
+ addr++;
+
+ if (*addr == parameter + 8)
+ *addr = parameter;
+
+ f2 (addr, data);
+ f2 (addr + 8, status + 1);
+}
diff --git a/gcc/testsuite/gcc.target/avr/pr60991.c b/gcc/testsuite/gcc.target/avr/pr60991.c
new file mode 100644
index 0000000000..a09f42a62b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/pr60991.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+
+/* This testcase (simplified from the original bug report) exposes
+ PR60991. The code generated for writing the __int24 value corrupts
+ the frame pointer if the offset is <= 63 + MAX_LD_OFFSET */
+
+#include <stdlib.h>
+
+int main(void)
+{
+ volatile char junk[62];
+ junk[0] = 5;
+ volatile __int24 staticConfig = 0;
+
+ if (junk[0] != 5)
+ abort();
+
+ exit(0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/progmem-error-1.cpp b/gcc/testsuite/gcc.target/avr/progmem-error-1.cpp
index cf53cc8e92..934b93c15a 100644
--- a/gcc/testsuite/gcc.target/avr/progmem-error-1.cpp
+++ b/gcc/testsuite/gcc.target/avr/progmem-error-1.cpp
@@ -2,4 +2,4 @@
#include "progmem.h"
-char str[] PROGMEM = "Hallo"; /* { dg-error "must be const" } */
+char str[] PROGMEM = "Hallo"; /* { dg-error "must be const" "" { target avr-*-* } 1 } */
diff --git a/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp b/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
index 61cd3197fb..3e5fdfbd42 100644
--- a/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
+++ b/gcc/testsuite/gcc.target/avr/torture/avr-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c b/gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c
new file mode 100644
index 0000000000..a8bde2952d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/builtins-3-absfx.c
@@ -0,0 +1,171 @@
+/* { dg-options "-std=gnu99" } */
+/* { dg-do run } */
+
+#include <stdfix.h>
+
+extern void abort (void);
+
+short fract test1_hr (short fract x)
+{
+ return abshr (x);
+}
+
+fract test1_r (fract x)
+{
+ return absr (x);
+}
+
+long fract test1_lr (long fract x)
+{
+ return abslr (x);
+}
+
+long long fract test1_llr (long long fract x)
+{
+ return absllr (x);
+}
+
+short accum test1_hk (short accum x)
+{
+ return abshk (x);
+}
+
+accum test1_k (accum x)
+{
+ return absk (x);
+}
+
+long accum test1_lk (long accum x)
+{
+ return abslk (x);
+}
+
+long long accum test1_llk (long long accum x)
+{
+ return absllk (x);
+}
+
+
+short fract test2_hr (void)
+{
+ return abshr (-0.12hr);
+}
+
+fract test2_r (void)
+{
+ return absr (-0.12r);
+}
+
+long fract test2_lr (void)
+{
+ return abslr (-0.12lr);
+}
+
+long long fract test2_llr (void)
+{
+ return absllr (-0.123456llr);
+}
+
+short accum test2_hk (void)
+{
+ return abshk (-221.12hk);
+}
+
+accum test2_k (void)
+{
+ return absk (-4321.12k);
+}
+
+long accum test2_lk (void)
+{
+ return abslk (-4321.12lk);
+}
+
+long long accum test2_llk (void)
+{
+ return absllk (-4321.12llk);
+}
+
+#define TEST1(VAL,FX) \
+ if (abs ## FX (-VAL ## FX -v) != VAL ## FX + v) \
+ abort(); \
+ if (abs ## FX (-VAL ## FX -v) != abs ## FX (VAL ## FX + v)) \
+ abort();
+
+#define TEST2(VAL,FX) \
+ if (abs ## FX (-VAL ## FX) != VAL ## FX) \
+ abort(); \
+ if (abs ## FX (-VAL ## FX) != abs ## FX (VAL ## FX)) \
+ abort();
+
+const __flash short fract volatile v = 0.33hr;
+const __flash short fract volatile z = 0hr;
+
+void test1 (void)
+{
+ TEST1 (0.123, hr);
+ TEST1 (0.123, r);
+ TEST1 (0.1234567, lr);
+ TEST1 (0.1234567, llr);
+
+ TEST1 (223.123, hk);
+ TEST1 (12345.123, k);
+ TEST1 (12342345.123, lk);
+ TEST1 (12345.123, llk);
+}
+
+
+void test2 (void)
+{
+ TEST2 (0.123, hr);
+ TEST2 (0.123, r);
+ TEST2 (0.1234567, lr);
+ TEST2 (0.1234567, llr);
+
+ TEST2 (223.123, hk);
+ TEST2 (12345.123, k);
+ TEST2 (12342345.123, lk);
+ TEST2 (12345.123, llk);
+}
+
+#define MINMAX(T,FX) \
+ { \
+ int_ ## FX ## _t imin \
+ = (int_ ## FX ## _t) 1 << (8 * sizeof (int_ ## FX ## _t) -1); \
+ int_ ## FX ## _t imax = ~imin; \
+ T fmin = FX ## bits (imin); \
+ T fmax = FX ## bits (imax); \
+ \
+ if (abs ## FX (fmin) != fmax) \
+ abort(); \
+ if (abs ## FX (fmin) != abs ## FX (fmax)) \
+ abort(); \
+ if (abs ## FX (fmin + z) != fmax + z) \
+ abort(); \
+ if (abs ## FX (fmin - z) != abs ## FX (fmax + z)) \
+ abort(); \
+ }
+
+void test3 (void)
+{
+ MINMAX (short fract, hr);
+ MINMAX (fract, r);
+ MINMAX (long fract, lr);
+ MINMAX (long long fract, llr);
+
+ MINMAX (short accum, hk);
+ MINMAX (accum, k);
+ MINMAX (long accum, lk);
+ MINMAX (long long accum, llk);
+}
+
+
+int main (void)
+{
+ test1();
+ test2();
+ test3();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c b/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c
new file mode 100644
index 0000000000..46e915a6c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/builtins-4-roundfx.c
@@ -0,0 +1,164 @@
+/* { dg-options "-std=gnu99" } */
+/* { dg-do run } */
+
+#include <stdfix.h>
+
+extern void abort (void);
+
+typedef short _Fract fx_hr_t;
+typedef _Fract fx_r_t;
+typedef long _Fract fx_lr_t;
+typedef long long _Fract fx_llr_t;
+
+typedef unsigned short _Fract fx_uhr_t;
+typedef unsigned _Fract fx_ur_t;
+typedef unsigned long _Fract fx_ulr_t;
+typedef unsigned long long _Fract fx_ullr_t;
+
+typedef short _Accum fx_hk_t;
+typedef _Accum fx_k_t;
+typedef long _Accum fx_lk_t;
+typedef long long _Accum fx_llk_t;
+
+typedef unsigned short _Accum fx_uhk_t;
+typedef unsigned _Accum fx_uk_t;
+typedef unsigned long _Accum fx_ulk_t;
+typedef unsigned long long _Accum fx_ullk_t;
+
+
+typedef unsigned char int_uhr_t;
+typedef unsigned int int_ur_t;
+typedef unsigned long int_ulr_t;
+typedef unsigned long long int_ullr_t;
+
+typedef unsigned int int_uhk_t;
+typedef unsigned long int_uk_t;
+typedef unsigned long long int_ulk_t;
+typedef unsigned long long int_ullk_t;
+
+
+#define DEFTEST1(T,FX) \
+ T test1_##FX (T x, int rp) \
+ { \
+ return round##FX (x, rp); \
+ } \
+ \
+ unsigned T test1_u##FX (unsigned T x, int rp) \
+ { \
+ return roundu##FX (x, rp); \
+ }
+
+DEFTEST1 (short fract, hr)
+DEFTEST1 (fract, r)
+DEFTEST1 (long fract, lr)
+DEFTEST1 (long long fract, llr)
+
+DEFTEST1 (short accum, hk)
+DEFTEST1 (accum, k)
+
+DEFTEST1 (long accum, lk)
+DEFTEST1 (long long accum, llk)
+
+
+#define TEST2(FX, RP, VAL, ROUND) \
+ { \
+ if (round##FX (FX##bits (VAL), RP) != FX##bits (ROUND)) \
+ abort(); \
+ fx_##FX##_t (*f)(fx_##FX##_t,int) = round##FX; \
+ asm ("" : "+r" (f)); \
+ if (f (FX##bits (VAL), RP) != FX##bits (ROUND)) \
+ abort(); \
+ }
+
+static void test2hr (void)
+{
+ TEST2 (hr, 1, 0x7f, 0x7f);
+ TEST2 (hr, 2, 0x70, 0x7f);
+ TEST2 (hr, 3, 0x78, 0x7f);
+ TEST2 (hr, 4, 0x7f, 0x7f);
+
+ TEST2 (uhr, 1, 0x7f, 0x80);
+ TEST2 (uhr, 2, 0x7f, 0x80);
+ TEST2 (uhr, 3, 0x7f, 0x80);
+ TEST2 (uhr, 4, 0x7f, 0x80);
+}
+
+void test2k (void)
+{
+ TEST2 (k, 1, 0x7fffff00, 0x7fffffff);
+ TEST2 (k, 2, 0x7ffffff0, 0x7fffffff);
+ TEST2 (k, 2, 0x7ffff000, 0x7fffffff);
+ TEST2 (k, 3, 0x7ffff000, 0x7ffff000);
+ TEST2 (k, 3, 0x7ffff800, 0x7fffffff);
+ TEST2 (k, 3, 0x7ffff7ff, 0x7ffff000);
+ TEST2 (k, 4, 0x7ffff7ff, 0x7ffff800);
+
+ TEST2 (uk, 1, 0x7fffffff, 1ul << 31);
+ TEST2 (uk, 2, 0x7fffffff, 1ul << 31);
+ TEST2 (uk, 3, 0x7fffffff, 1ul << 31);
+ TEST2 (uk, 4, 0x7fffffff, 1ul << 31);
+}
+
+#define DEFTEST3(FX, FBIT) \
+ void test3##FX (void) \
+ { \
+ TEST2 (FX, FBIT-1, 0b01100, 0b01100); \
+ TEST2 (FX, FBIT-2, 0b01100, 0b01100); \
+ TEST2 (FX, FBIT-3, 0b01100, 0b10000); \
+ TEST2 (FX, FBIT-4, 0b01100, 0b10000); \
+ TEST2 (FX, FBIT-5, 0b01100, 0); \
+ \
+ if (FX##bits ((int_##FX##_t) -1) > 0) \
+ return; \
+ \
+ TEST2 (FX, FBIT-1, -0b01100, -0b01100); \
+ TEST2 (FX, FBIT-2, -0b01100, -0b01100); \
+ TEST2 (FX, FBIT-3, -0b01100, -0b01000); \
+ TEST2 (FX, FBIT-4, -0b01100, -0b10000); \
+ TEST2 (FX, FBIT-5, -0b01100, -0b00000); \
+ }
+
+DEFTEST3 (hr, SFRACT_FBIT)
+DEFTEST3 (r, FRACT_FBIT)
+DEFTEST3 (lr, LFRACT_FBIT)
+
+DEFTEST3 (uhr, USFRACT_FBIT)
+DEFTEST3 (ur, UFRACT_FBIT)
+DEFTEST3 (ulr, ULFRACT_FBIT)
+
+DEFTEST3 (hk, SACCUM_FBIT)
+DEFTEST3 (k, ACCUM_FBIT)
+DEFTEST3 (lk, LACCUM_FBIT)
+DEFTEST3 (llk, LLACCUM_FBIT)
+
+DEFTEST3 (uhk, USACCUM_FBIT)
+DEFTEST3 (uk, UACCUM_FBIT)
+DEFTEST3 (ulk, ULACCUM_FBIT)
+DEFTEST3 (ullk, ULLACCUM_FBIT)
+
+int main (void)
+{
+ test2hr();
+ test2k();
+
+ test3hr();
+ test3r();
+ test3lr();
+
+ test3uhr();
+ test3ur();
+ test3ulr();
+
+ test3hk();
+ test3k();
+ test3lk();
+ test3llk();
+
+ test3uhk();
+ test3uk();
+ test3ulk();
+ test3ullk();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/builtins-5-countlsfx.c b/gcc/testsuite/gcc.target/avr/torture/builtins-5-countlsfx.c
new file mode 100644
index 0000000000..b0ff5e3d48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/builtins-5-countlsfx.c
@@ -0,0 +1,82 @@
+/* { dg-options "-std=gnu99" } */
+/* { dg-do run } */
+
+#include <stdfix.h>
+
+extern void abort (void);
+
+#define DEFTEST1(T,FX) \
+ int test1_##FX (T x) \
+ { \
+ return countls##FX (x); \
+ } \
+ \
+ int test1_u##FX (unsigned T x) \
+ { \
+ return countlsu##FX (x); \
+ }
+
+DEFTEST1 (short fract, hr)
+DEFTEST1 (fract, r)
+DEFTEST1 (long fract, lr)
+DEFTEST1 (long long fract, llr)
+
+DEFTEST1 (short accum, hk)
+DEFTEST1 (accum, k)
+DEFTEST1 (long accum, lk)
+DEFTEST1 (long long accum, llk)
+
+
+#define TEST2P(FX, VAL, DD) \
+ { \
+ if (countls##FX (FX##bits (VAL)) != 8 * sizeof (0##FX) - DD) \
+ abort(); \
+ \
+ if (countlsu##FX (u##FX##bits (VAL)) != 8 * sizeof (0u##FX) + 1 - DD) \
+ abort(); \
+ }
+
+
+#define TEST2M(FX, VAL, DD) \
+ { \
+ if (countls##FX (FX##bits (VAL)) != 8 * sizeof (0##FX) - (DD)) \
+ abort(); \
+ \
+ if (countlsu##FX (u##FX##bits (VAL)) != 0) \
+ abort(); \
+ }
+
+
+#define TEST2PX(VAL, DD) \
+ TEST2P (hr, VAL, DD); \
+ TEST2P (r, VAL, DD); \
+ TEST2P (lr, VAL, DD); \
+ \
+ TEST2P (hk, VAL, DD); \
+ TEST2P (k, VAL, DD); \
+ TEST2P (lk, VAL, DD); \
+ TEST2P (llk, VAL, DD)
+
+#define TEST2MX(VAL, DD) \
+ TEST2M (hr, VAL, DD); \
+ TEST2M (r, VAL, DD); \
+ TEST2M (lr, VAL, DD); \
+ \
+ TEST2M (hk, VAL, DD); \
+ TEST2M (k, VAL, DD); \
+ TEST2M (lk, VAL, DD); \
+ TEST2M (llk, VAL, DD)
+
+
+int main (void)
+{
+ TEST2PX (1, 2);
+ TEST2PX (2, 3);
+ TEST2PX (3, 3);
+
+ TEST2MX (-1, 1);
+ TEST2MX (-2, 2);
+ TEST2MX (-3, 3);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/fix-types.h b/gcc/testsuite/gcc.target/avr/torture/fix-types.h
new file mode 100644
index 0000000000..f6a2aeb6fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/fix-types.h
@@ -0,0 +1,134 @@
+typedef __INT8_TYPE__ int_hr_t;
+typedef __UINT8_TYPE__ int_uhr_t;
+
+typedef __INT16_TYPE__ int_hk_t;
+typedef __UINT16_TYPE__ int_uhk_t;
+typedef __INT16_TYPE__ int_r_t;
+typedef __UINT16_TYPE__ int_ur_t;
+
+typedef __INT32_TYPE__ int_k_t;
+typedef __UINT32_TYPE__ int_uk_t;
+typedef __INT32_TYPE__ int_lr_t;
+typedef __UINT32_TYPE__ int_ulr_t;
+
+typedef __INT64_TYPE__ int_lk_t;
+typedef __UINT64_TYPE__ int_ulk_t;
+typedef __INT64_TYPE__ int_llr_t;
+typedef __UINT64_TYPE__ int_ullr_t;
+typedef __INT64_TYPE__ int_llk_t;
+typedef __UINT64_TYPE__ int_ullk_t;
+
+typedef __INT16_TYPE__ xint_hr_t;
+typedef __UINT16_TYPE__ xint_uhr_t;
+
+typedef __INT32_TYPE__ xint_hk_t;
+typedef __UINT32_TYPE__ xint_uhk_t;
+typedef __INT32_TYPE__ xint_r_t;
+typedef __UINT32_TYPE__ xint_ur_t;
+
+typedef __INT64_TYPE__ xint_k_t;
+typedef __UINT64_TYPE__ xint_uk_t;
+typedef __INT64_TYPE__ xint_lr_t;
+typedef __UINT64_TYPE__ xint_ulr_t;
+
+#define INThr_MAX __INT8_MAX__
+#define INThr_MIN (-__INT8_MAX__-1)
+#define INTuhr_MAX __UINT8_MAX__
+
+#define INTr_MAX __INT16_MAX__
+#define INTr_MIN (-__INT16_MAX__-1)
+#define INTur_MAX __UINT16_MAX__
+
+#define INThk_MAX __INT16_MAX__
+#define INThk_MIN (-__INT16_MAX__-1)
+#define INTuhk_MAX __UINT16_MAX__
+
+#define INTlr_MAX __INT32_MAX__
+#define INTlr_MIN (-__INT32_MAX__-1)
+#define INTulr_MAX __UINT32_MAX__
+
+#define INTk_MAX __INT32_MAX__
+#define INTk_MIN (-__INT32_MAX__-1)
+#define INTuk_MAX __UINT32_MAX__
+
+#define INTlk_MAX __INT64_MAX__
+#define INTlk_MIN (-__INT64_MAX__-1)
+#define INTulk_MAX __UINT64_MAX__
+
+#define INTllk_MAX __INT64_MAX__
+#define INTllk_MIN (-__INT64_MAX__-1)
+#define INTullk_MAX __UINT64_MAX__
+
+#define SS_FUN(NAME, OP, T, FX) \
+ T __attribute__((noinline,noclone)) \
+ NAME##_##FX (T fa, T fb) \
+ { \
+ int_##FX##_t ia; \
+ int_##FX##_t ib; \
+ xint_##FX##_t ic; \
+ __builtin_memcpy (&ia, &fa, sizeof (ia)); \
+ __builtin_memcpy (&ib, &fb, sizeof (ib)); \
+ ic = (xint_##FX##_t) ia OP ib; \
+ if (ic > INT##FX##_MAX) \
+ ic = INT##FX##_MAX; \
+ else if (ic < INT##FX##_MIN) \
+ ic = INT##FX##_MIN; \
+ ia = (int_##FX##_t) ic; \
+ __builtin_memcpy (&fa, &ia, sizeof (ia)); \
+ return fa; \
+ }
+
+#define US_FUN(NAME, OP, T, FX) \
+ T __attribute__((noinline,noclone)) \
+ NAME##_##FX (T fa, T fb) \
+ { \
+ int_##FX##_t ia; \
+ int_##FX##_t ib; \
+ xint_##FX##_t ic; \
+ __builtin_memcpy (&ia, &fa, sizeof (ia)); \
+ __builtin_memcpy (&ib, &fb, sizeof (ib)); \
+ ic = (xint_##FX##_t) ia OP ib; \
+ if (ic > INT##FX##_MAX) \
+ ic = INT##FX##_MAX; \
+ else if (ic < 0) \
+ ic = 0; \
+ ia = (int_##FX##_t) ic; \
+ __builtin_memcpy (&fa, &ia, sizeof (ia)); \
+ return fa; \
+ }
+
+#define SS_LFUN(NAME, OP, T, FX, CMP) \
+ T __attribute__((noinline,noclone)) \
+ NAME##_##FX (T fa, T fb) \
+ { \
+ int_##FX##_t ia; \
+ int_##FX##_t ib; \
+ int_##FX##_t ic; \
+ __builtin_memcpy (&ia, &fa, sizeof (ia)); \
+ __builtin_memcpy (&ib, &fb, sizeof (ib)); \
+ ic = (int_##FX##_t) ia OP ib; \
+ if (ic < ia && ib CMP 0) \
+ ic = INT##FX##_MAX; \
+ else if (ic > ia && 0 CMP ib) \
+ ic = INT##FX##_MIN; \
+ __builtin_memcpy (&fa, &ic, sizeof (ic)); \
+ return fa; \
+ }
+
+#define US_LFUN(NAME, OP, T, FX, CMP) \
+ T __attribute__((noinline,noclone)) \
+ NAME##_##FX (T fa, T fb) \
+ { \
+ int_##FX##_t ia; \
+ int_##FX##_t ib; \
+ int_##FX##_t ic; \
+ __builtin_memcpy (&ia, &fa, sizeof (ia)); \
+ __builtin_memcpy (&ib, &fb, sizeof (ib)); \
+ ic = (int_##FX##_t) ia OP ib; \
+ if (ia CMP ic && 1 CMP 0) \
+ ic = INT##FX##_MAX; \
+ if (ia CMP ic && 0 CMP 1) \
+ ic = 0; \
+ __builtin_memcpy (&fa, &ic, sizeof (ic)); \
+ return fa; \
+ }
diff --git a/gcc/testsuite/gcc.target/avr/torture/pr57631.c b/gcc/testsuite/gcc.target/avr/torture/pr57631.c
new file mode 100644
index 0000000000..ecefbfc81b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/pr57631.c
@@ -0,0 +1,17 @@
+/* PR target/57631 */
+/* { dg-do compile } */
+
+void __attribute__((signal)) func1 (void) __asm ("__vector1");
+void func1 (void)
+{
+}
+
+void __attribute__((signal)) func2 (void) __asm ("__vecto1");
+void func2 (void) /* { dg-warning "misspelled signal handler" } */
+{
+}
+
+void __attribute__((signal)) __vector_3 (void) __asm ("__vecto1");
+void __vector_3 (void) /* { dg-warning "misspelled signal handler" } */
+{
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/pr61055.c b/gcc/testsuite/gcc.target/avr/torture/pr61055.c
new file mode 100644
index 0000000000..9dd1f427d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/pr61055.c
@@ -0,0 +1,88 @@
+/* { dg-do run } */
+/* { dg-options { -fno-peephole2 } } */
+
+#include <stdlib.h>
+
+typedef __UINT16_TYPE__ uint16_t;
+typedef __INT16_TYPE__ int16_t;
+typedef __UINT8_TYPE__ uint8_t;
+
+uint8_t __attribute__((noinline,noclone))
+fun_inc (uint8_t c0)
+{
+ register uint8_t c asm ("r15") = c0;
+
+ /* Force target value into R15 (lower register) */
+ asm ("" : "+l" (c));
+
+ c++;
+ if (c >= 0x80)
+ c = 0;
+
+ asm ("" : "+l" (c));
+
+ return c;
+}
+
+uint8_t __attribute__((noinline,noclone))
+fun_dec (uint8_t c0)
+{
+ register uint8_t c asm ("r15") = c0;
+
+ /* Force target value into R15 (lower register) */
+ asm ("" : "+l" (c));
+
+ c--;
+ if (c < 0x80)
+ c = 0;
+
+ asm ("" : "+l" (c));
+
+ return c;
+}
+
+
+uint8_t __attribute__((noinline,noclone))
+fun_neg (uint8_t c0)
+{
+ register uint8_t c asm ("r15") = c0;
+
+ c = -c;
+ if (c >= 0x80)
+ c = 0;
+
+ return c;
+}
+
+uint16_t __attribute__((noinline,noclone))
+fun_adiw (uint16_t c0)
+{
+ register uint16_t c asm ("r24") = c0;
+
+ /* Force target value into R24 (for ADIW) */
+ asm ("" : "+r" (c));
+
+ c += 2;
+ if (c >= 0x8000)
+ c = 0;
+
+ asm ("" : "+r" (c));
+
+ return c;
+}
+
+
+int main()
+{
+ if (fun_inc (0x7f) != 0)
+ abort();
+
+ if (fun_neg (0x80) != 0)
+ abort();
+
+ if (fun_adiw (0x7ffe) != 0)
+ abort();
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/pr61443.c b/gcc/testsuite/gcc.target/avr/torture/pr61443.c
new file mode 100644
index 0000000000..12c6bca666
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/pr61443.c
@@ -0,0 +1,134 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99" } */
+
+#include <stdlib.h>
+#include <stdarg.h>
+
+#define NC __attribute__((noinline,noclone))
+
+void NC vfun (char n, ...)
+{
+ va_list ap;
+
+ va_start (ap, n);
+
+ switch (n)
+ {
+ default:
+ abort();
+ case 1:
+ if (11 != va_arg (ap, int))
+ abort();
+ break;
+ case 2:
+ if (2222 != va_arg (ap, int))
+ abort();
+ break;
+ case 3:
+ if (333333 != va_arg (ap, __int24))
+ abort();
+ break;
+ case 4:
+ if (44444444 != va_arg (ap, long))
+ abort();
+ break;
+ case 8:
+ if (8888888888888888 != va_arg (ap, long long))
+ abort();
+ break;
+ }
+
+ va_end (ap);
+}
+
+
+void NC boo_qi (const __flash char *p)
+{
+ vfun (1, *p);
+}
+
+void NC boox_qi (const __memx char *p)
+{
+ vfun (1, *p);
+}
+
+void NC boo_hi (const __flash int *p)
+{
+ vfun (2, *p);
+}
+
+void NC boox_hi (const __memx int *p)
+{
+ vfun (2, *p);
+}
+
+void NC boo_psi (const __flash __int24 *p)
+{
+ vfun (3, *p);
+}
+
+void NC boox_psi (const __memx __int24 *p)
+{
+ vfun (3, *p);
+}
+
+void NC boo_si (const __flash long *p)
+{
+ vfun (4, *p);
+}
+
+void NC boox_si (const __memx long *p)
+{
+ vfun (4, *p);
+}
+
+void NC boo_di (const __flash long long *p)
+{
+ vfun (8, *p);
+}
+
+void NC boox_di (const __memx long long *p)
+{
+ vfun (8, *p);
+}
+
+const __flash char f_qi = 11;
+const __flash int f_hi = 2222;
+const __flash __int24 f_psi = 333333;
+const __flash long f_si = 44444444;
+const __flash long long f_di = 8888888888888888;
+
+const __memx char x_qi = 11;
+const __memx int x_hi = 2222;
+const __memx __int24 x_psi = 333333;
+const __memx long x_si = 44444444;
+const __memx long long x_di = 8888888888888888;
+
+char r_qi = 11;
+int r_hi = 2222;
+__int24 r_psi = 333333;
+long r_si = 44444444;
+long long r_di = 8888888888888888;
+
+int main (void)
+{
+ boo_qi (&f_qi);
+ boo_hi (&f_hi);
+ boo_psi (&f_psi);
+ boo_si (&f_si);
+ boo_di (&f_di);
+
+ boox_qi (&x_qi);
+ boox_hi (&x_hi);
+ boox_psi (&x_psi);
+ boox_si (&x_si);
+ boox_di (&x_di);
+
+ boox_qi (&r_qi);
+ boox_hi (&r_hi);
+ boox_psi (&r_psi);
+ boox_si (&r_si);
+ boox_di (&r_di);
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-hr-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-hr-plus-minus.c
new file mode 100644
index 0000000000..1e6215e4f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-hr-plus-minus.c
@@ -0,0 +1,98 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef short _Fract fx_t;
+typedef short _Sat _Fract satfx_t;
+typedef char intfx_t;
+
+SS_FUN (ss_add, +, fx_t, hr)
+SS_FUN (ss_sub, -, fx_t, hr)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add2_##N (satfx_t a) \
+ { \
+ return ss_add_hr (a, X##P##-##7hr); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##7hr; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub2_##N (satfx_t a) \
+ { \
+ return ss_sub_hr (a, X##P##-##7hr); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##7hr; \
+ }
+#include "vals-hr.def"
+#undef VAL
+
+__attribute__((noinline,noclone))
+satfx_t ss_add2_99 (satfx_t a)
+{
+ return ss_add_hr (a, __FRACT_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_add_99 (satfx_t a)
+{
+ return a + __FRACT_MIN__;
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub2_99 (satfx_t a)
+{
+ return ss_sub_hr (a, __FRACT_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub_99 (satfx_t a)
+{
+ return a - __FRACT_MIN__;
+}
+
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ ss_add_##N, ss_add2_##N, \
+ ss_sub_##N, ss_sub2_##N,
+#include "vals-hr.def"
+ VAL (99,)
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, 1, 2, 0x7f, 0x80, 0x81, 0xff,
+ 0x40, 0x3e, 0x3f, 0xbf, 0xc0, 0xc1
+ };
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-k-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-k-plus-minus.c
new file mode 100644
index 0000000000..8a26ffeeb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-k-plus-minus.c
@@ -0,0 +1,108 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef _Accum fx_t;
+typedef _Sat _Accum satfx_t;
+typedef long intfx_t;
+
+SS_FUN (ss_add, +, fx_t, k)
+SS_FUN (ss_sub, -, fx_t, k)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add2_##N (satfx_t a) \
+ { \
+ return ss_add_k (a, X##P##-##16k); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##16k; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub2_##N (satfx_t a) \
+ { \
+ return ss_sub_k (a, X##P##-##16k); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##16k; \
+ }
+#include "vals-k.def"
+#undef VAL
+
+__attribute__((noinline,noclone))
+satfx_t ss_add2_99 (satfx_t a)
+{
+ return ss_add_k (a, __ACCUM_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_add_99 (satfx_t a)
+{
+ return a + __ACCUM_MIN__;
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub2_99 (satfx_t a)
+{
+ return ss_sub_k (a, __ACCUM_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub_99 (satfx_t a)
+{
+ return a - __ACCUM_MIN__;
+}
+
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ ss_add_##N, ss_add2_##N, \
+ ss_sub_##N, ss_sub2_##N,
+#include "vals-k.def"
+ VAL (99,)
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x40000000, 0x3e800000, 0x3f800000,
+ 0x7ffffffe, 0x7fffffff, 0x7f800000,
+ 0x7f7f7f7f, 0x7f810080, 0x7f008000,
+ 0x7f000001,
+ 0x80000000, 0x80000001, 0x80808080,
+ 0x80810000, 0x80ffffff, 0x80fffffe,
+ 0x81000000, 0x81800000, 0x81800000,
+ 0xff000000, 0xffffff01, 0xffffff80,
+ 0xffffff7f, 0xff80ff80
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-llk-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-llk-plus-minus.c
new file mode 100644
index 0000000000..e81cbb187e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-llk-plus-minus.c
@@ -0,0 +1,108 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef long long _Accum fx_t;
+typedef long long _Sat _Accum satfx_t;
+typedef long long intfx_t;
+
+SS_LFUN (ss_add, +, fx_t, llk, >)
+SS_LFUN (ss_sub, -, fx_t, llk, <)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add2_##N (satfx_t a) \
+ { \
+ return ss_add_llk (a, X##P##-##48llk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##48llk; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub2_##N (satfx_t a) \
+ { \
+ return ss_sub_llk (a, X##P##-##48llk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##48llk; \
+ }
+#include "vals-llk.def"
+#undef VAL
+
+__attribute__((noinline,noclone))
+satfx_t ss_add2_99 (satfx_t a)
+{
+ return ss_add_llk (a, __LLACCUM_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_add_99 (satfx_t a)
+{
+ return a + __LLACCUM_MIN__;
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub2_99 (satfx_t a)
+{
+ return ss_sub_llk (a, __LLACCUM_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub_99 (satfx_t a)
+{
+ return a - __LLACCUM_MIN__;
+}
+
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ ss_add_##N, ss_add2_##N, \
+ ss_sub_##N, ss_sub2_##N,
+#include "vals-llk.def"
+ VAL (99,)
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x4000000000000000, 0x3e80000000000000, 0x3f80000000000000,
+ 0x7ffffffffffffffe, 0x7fffffffffffffff, 0x7f80000000000000,
+ 0x7f7f7f7f7f7f7f7f, 0x7f81000000000080, 0x7f00000080000000,
+ 0x7f00000000000001,
+ 0x8000000000000000, 0x8000000000000001, 0x8080808080808080,
+ 0x8081000000000000, 0x80ffffffffffffff, 0x80fffffffffffffe,
+ 0x8100000000000000, 0x8180000000000000, 0x818000000000000,
+ 0xff00000000000000, 0xffffffffffffff01, 0xffffffffffffff80,
+ 0xffffffffffffff7f, 0xff80ff80ff80ff80
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-r-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-r-plus-minus.c
new file mode 100644
index 0000000000..e59bcf655a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-r-plus-minus.c
@@ -0,0 +1,107 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef _Fract fx_t;
+typedef _Sat _Fract satfx_t;
+typedef int intfx_t;
+
+SS_FUN (ss_add, +, fx_t, r)
+SS_FUN (ss_sub, -, fx_t, r)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add2_##N (satfx_t a) \
+ { \
+ return ss_add_r (a, X##P##-##15r); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##15r; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub2_##N (satfx_t a) \
+ { \
+ return ss_sub_r (a, X##P##-##15r); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t ss_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##15r; \
+ }
+#include "vals-r.def"
+#undef VAL
+
+__attribute__((noinline,noclone))
+satfx_t ss_add2_99 (satfx_t a)
+{
+ return ss_add_r (a, __FRACT_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_add_99 (satfx_t a)
+{
+ return a + __FRACT_MIN__;
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub2_99 (satfx_t a)
+{
+ return ss_sub_r (a, __FRACT_MIN__);
+}
+
+__attribute__((noinline,noclone))
+satfx_t ss_sub_99 (satfx_t a)
+{
+ return a - __FRACT_MIN__;
+}
+
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ ss_add_##N, ss_add2_##N, \
+ ss_sub_##N, ss_sub2_##N,
+#include "vals-r.def"
+ VAL (99,)
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x4000, 0x3e80, 0x3f80,
+ 0x7ffe, 0x7fff,
+ 0x7f7f, 0x7f81, 0x7f80,
+ 0x7f01,
+ 0x8000, 0x8001, 0x8080,
+ 0x8081, 0x80ff, 0x80fe,
+ 0x8100, 0x8180, 0x817f,
+ 0xff00, 0xff01, 0xff01,
+ 0xff7f, 0xff80
+ };
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-uhr-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-uhr-plus-minus.c
new file mode 100644
index 0000000000..6dd191f7ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-uhr-plus-minus.c
@@ -0,0 +1,73 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef unsigned short _Fract fx_t;
+typedef unsigned short _Sat _Fract satfx_t;
+typedef unsigned char intfx_t;
+
+US_LFUN (us_add, +, fx_t, uhr, >)
+US_LFUN (us_sub, -, fx_t, uhr, <)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add2_##N (satfx_t a) \
+ { \
+ return us_add_uhr (a, X##P##-##8uhr); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##8uhr; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub2_##N (satfx_t a) \
+ { \
+ return us_sub_uhr (a, X##P##-##8uhr); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##8uhr; \
+ }
+#include "vals-uhr.def"
+#undef VAL
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ us_add_##N, us_add2_##N, \
+ us_sub_##N, us_sub2_##N,
+#include "vals-uhr.def"
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, 1, 2, 0x7f, 0x80, 0x81, 0xff,
+ 0x40, 0x3e, 0x3f, 0xbf, 0xc0, 0xc1
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-uk-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-uk-plus-minus.c
new file mode 100644
index 0000000000..c9a7cd6ba4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-uk-plus-minus.c
@@ -0,0 +1,82 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef unsigned _Accum fx_t;
+typedef unsigned _Sat _Accum satfx_t;
+typedef unsigned long intfx_t;
+
+US_LFUN (us_add, +, fx_t, uk, >)
+US_LFUN (us_sub, -, fx_t, uk, <)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add2_##N (satfx_t a) \
+ { \
+ return us_add_uk (a, X##P##-##16uk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##16uk; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub2_##N (satfx_t a) \
+ { \
+ return us_sub_uk (a, X##P##-##16uk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##16uk; \
+ }
+#include "vals-uk.def"
+#undef VAL
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ us_add_##N, us_add2_##N, \
+ us_sub_##N, us_sub2_##N,
+#include "vals-uk.def"
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x40000000, 0x3e800000, 0x3f800000,
+ 0x7ffffffe, 0x7fffffff, 0x7f800000,
+ 0x7f7f7f7f, 0x7f810080, 0x7f008000,
+ 0x7f000001,
+ 0x80000000, 0x80000001, 0x80808080,
+ 0x80810000, 0x80ffffff, 0x80fffffe,
+ 0x81000000, 0x81800000, 0x81800000,
+ 0xff000000, 0xffffff01, 0xffffff80,
+ 0xffffff7f, 0xff80ff80
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-ullk-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-ullk-plus-minus.c
new file mode 100644
index 0000000000..22ebb8af50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-ullk-plus-minus.c
@@ -0,0 +1,82 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef unsigned long long _Accum fx_t;
+typedef unsigned long long _Sat _Accum satfx_t;
+typedef unsigned long long intfx_t;
+
+US_LFUN (us_add, +, fx_t, ullk, >)
+US_LFUN (us_sub, -, fx_t, ullk, <)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add2_##N (satfx_t a) \
+ { \
+ return us_add_ullk (a, X##P##-##48ullk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##48ullk; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub2_##N (satfx_t a) \
+ { \
+ return us_sub_ullk (a, X##P##-##48ullk); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##48ullk; \
+ }
+#include "vals-ullk.def"
+#undef VAL
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ us_add_##N, us_add2_##N, \
+ us_sub_##N, us_sub2_##N,
+#include "vals-ullk.def"
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x4000000000000000, 0x3e80000000000000, 0x3f80000000000000,
+ 0x7ffffffffffffffe, 0x7fffffffffffffff, 0x7f80000000000000,
+ 0x7f7f7f7f7f7f7f7f, 0x7f81000000000080, 0x7f00000080000000,
+ 0x7f00000000000001,
+ 0x8000000000000000, 0x8000000000000001, 0x8080808080808080,
+ 0x8081000000000000, 0x80ffffffffffffff, 0x80fffffffffffffe,
+ 0x8100000000000000, 0x8180000000000000, 0x818000000000000,
+ 0xff00000000000000, 0xffffffffffffff01, 0xffffffffffffff80,
+ 0xffffffffffffff7f, 0xff80ff80ff80ff80
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/sat-ur-plus-minus.c b/gcc/testsuite/gcc.target/avr/torture/sat-ur-plus-minus.c
new file mode 100644
index 0000000000..bc3c0bbcd9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/sat-ur-plus-minus.c
@@ -0,0 +1,82 @@
+/* { dg-do run } */
+/* { dg-options "-std=gnu99 -fwrapv" } */
+
+#include "fix-types.h"
+
+extern void abort (void);
+extern void exit (int);
+
+typedef unsigned _Fract fx_t;
+typedef unsigned _Sat _Fract satfx_t;
+typedef unsigned int intfx_t;
+
+US_LFUN (us_add, +, fx_t, ur, >)
+US_LFUN (us_sub, -, fx_t, ur, <)
+
+#define VAL(N, X) \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add2_##N (satfx_t a) \
+ { \
+ return us_add_ur (a, X##P##-##16ur); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_add_##N (satfx_t a) \
+ { \
+ return a + X##P##-##16ur; \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub2_##N (satfx_t a) \
+ { \
+ return us_sub_ur (a, X##P##-##16ur); \
+ } \
+ __attribute__((noinline,noclone)) \
+ satfx_t us_sub_##N (satfx_t a) \
+ { \
+ return a - X##P##-##16ur; \
+ }
+#include "vals-ur.def"
+#undef VAL
+
+satfx_t (* __flash const fun[])(satfx_t) =
+{
+#define VAL(N, X) \
+ us_add_##N, us_add2_##N, \
+ us_sub_##N, us_sub2_##N,
+#include "vals-ur.def"
+#undef VAL
+};
+
+
+const volatile __flash intfx_t vals[] =
+ {
+ 0, -1, 1, -2, 2, -127, -128, -129,
+ 0x7f, 0x80, 0x81, 0x100,
+ 0x4000, 0x3e80, 0x3f80,
+ 0x7ffe, 0x7fff,
+ 0x7f7f, 0x7f81, 0x7f80,
+ 0x7f01,
+ 0x8000, 0x8001, 0x8080,
+ 0x8081, 0x80ff, 0x80fe,
+ 0x8100, 0x8180, 0x817f,
+ 0xff00, 0xff01, 0xff01,
+ 0xff7f, 0xff80
+ };
+
+
+int main (void)
+{
+ for (unsigned int i = 0; i < sizeof (vals) / sizeof (*vals); i++)
+ {
+ satfx_t a, f1, f2;
+ intfx_t val = vals[i];
+ __builtin_memcpy (&a, &val, sizeof (satfx_t));
+ for (unsigned int f = 0; f < sizeof (fun) / sizeof (*fun); f += 2)
+ {
+ if (fun[f](a) != fun[f+1](a))
+ abort();
+ }
+ }
+
+ exit (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-hr.def b/gcc/testsuite/gcc.target/avr/torture/vals-hr.def
new file mode 100644
index 0000000000..f6619c2ff5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-hr.def
@@ -0,0 +1,12 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04,-0x3f)
+VAL (07, 0x40)
+VAL (08,-0x40)
+VAL (10,-0x1)
+VAL (12, 0x3f)
+VAL (13,-0x3f)
+VAL (14, 0x7f)
+VAL (15,-0x7f)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-k.def b/gcc/testsuite/gcc.target/avr/torture/vals-k.def
new file mode 100644
index 0000000000..a490c69b36
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-k.def
@@ -0,0 +1,32 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (05, -0x1)
+VAL (06, -0x3f)
+VAL (07, 0x40000000)
+VAL (08,-0x40000000)
+
+VAL (10,-0x7fffffff)
+VAL (11, 0x7fffffff)
+VAL (12, 0x7f800000)
+VAL (13,-0x7f800000)
+VAL (14, 0x7f800001)
+VAL (15,-0x7f800001)
+VAL (16, 0x7f7f7f7f)
+VAL (17,-0x7f7f7f7f)
+VAL (18, 0x7f808080)
+VAL (19,-0x7f808080)
+VAL (20, 0x3e800000)
+VAL (21,-0x3e800000)
+VAL (22, 0x3f800000)
+VAL (23,-0x3f800000)
+VAL (24, 0x400000)
+VAL (25,-0x400000)
+VAL (26, 0x3f000000)
+VAL (27,-0x3f000000)
+VAL (28, 0xffff00)
+VAL (29,-0xffff00)
+VAL (30, 0x00ff00ff)
+VAL (31,-0x00ff00ff)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-llk.def b/gcc/testsuite/gcc.target/avr/torture/vals-llk.def
new file mode 100644
index 0000000000..726a7ebed3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-llk.def
@@ -0,0 +1,32 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (05, -0x1)
+VAL (06, -0x3f)
+VAL (07, 0x4000000000000000)
+VAL (08,-0x4000000000000000)
+
+VAL (10,-0x7fffffffffffffff)
+VAL (11, 0x7fffffffffffffff)
+VAL (12, 0x7f80000000000000)
+VAL (13,-0x7f80000000000000)
+VAL (14, 0x7f80000000000001)
+VAL (15,-0x7f80000000000001)
+VAL (16, 0x7f7f7f7f7f7f7f7f)
+VAL (17,-0x7f7f7f7f7f7f7f7f)
+VAL (18, 0x7f80808080808000)
+VAL (19,-0x7f80808080808000)
+VAL (20, 0x3e80000000000000)
+VAL (21,-0x3e80000000000000)
+VAL (22, 0x3f80000000000000)
+VAL (23,-0x3f80000000000000)
+VAL (24, 0x40000000000000)
+VAL (25,-0x40000000000000)
+VAL (26, 0x3f000000000000)
+VAL (27,-0x3f000000000000)
+VAL (28, 0xffffff00)
+VAL (29,-0xffffff00)
+VAL (30, 0x00ff00ff00ff00ff)
+VAL (31,-0x00ff00ff00ff00ff)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-r.def b/gcc/testsuite/gcc.target/avr/torture/vals-r.def
new file mode 100644
index 0000000000..0c5f83f7d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-r.def
@@ -0,0 +1,30 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (05, -0x1)
+VAL (06, -0x3f)
+VAL (07, 0x4000)
+VAL (08,-0x4000)
+
+VAL (10,-0x7fff)
+VAL (11, 0x7fff)
+VAL (12, 0x7f80)
+VAL (13,-0x7f80)
+VAL (14, 0x7f81)
+VAL (15,-0x7f81)
+VAL (16, 0x7f7f)
+VAL (17,-0x7f7f)
+VAL (18, 0x7f80)
+VAL (19,-0x7f80)
+VAL (20, 0x3e80)
+VAL (21,-0x3e80)
+VAL (22, 0x3f80)
+VAL (23,-0x3f80)
+VAL (24, 0x40)
+VAL (25,-0x40)
+VAL (26, 0x3f00)
+VAL (27,-0x3f00)
+VAL (30, 0x00ff)
+VAL (31,-0x00ff)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-uhr.def b/gcc/testsuite/gcc.target/avr/torture/vals-uhr.def
new file mode 100644
index 0000000000..71441567ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-uhr.def
@@ -0,0 +1,13 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (07, 0x40)
+VAL (08, 0xc0)
+VAL (10, 0xc1)
+VAL (12, 0xff)
+VAL (14, 0x7f)
+VAL (16, 0x81)
+VAL (20, 0xbf)
+
+VAL (99, 0x80)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-uk.def b/gcc/testsuite/gcc.target/avr/torture/vals-uk.def
new file mode 100644
index 0000000000..3e212836f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-uk.def
@@ -0,0 +1,23 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (07, 0x40000000)
+VAL (08, 0xc0000000)
+VAL (10, 0x7fffffff)
+VAL (12, 0x7f800000)
+VAL (14, 0x7f800001)
+VAL (16, 0x7f7f7f7f)
+VAL (18, 0x7f808000)
+VAL (20, 0x3e800000)
+VAL (22, 0x3f800000)
+VAL (24, 0x40000000)
+VAL (26, 0x3f000000)
+VAL (28, 0xffff00)
+VAL (30, 0x00ff00ff)
+VAL (31, 0xff00ff00)
+VAL (32, 0x10000000)
+VAL (33, 0xff000000)
+
+VAL (99, 0x80000000)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-ullk.def b/gcc/testsuite/gcc.target/avr/torture/vals-ullk.def
new file mode 100644
index 0000000000..620182be64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-ullk.def
@@ -0,0 +1,20 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (07, 0x4000000000000000)
+VAL (08, 0x4000000000000000)
+VAL (10, 0x7fffffffffffffff)
+VAL (12, 0x7f80000000000000)
+VAL (14, 0x7f80000000000001)
+VAL (16, 0x7f7f7f7f7f7f7f7f)
+VAL (18, 0x7f80808080808000)
+VAL (20, 0x3e80000000000000)
+VAL (22, 0x3f80000000000000)
+VAL (24, 0x40000000000000)
+VAL (26, 0x3f000000000000)
+VAL (28, 0xffffff00)
+VAL (30, 0x00ff00ff00ff00ff)
+
+VAL (99, 0x8000000000000000)
+
diff --git a/gcc/testsuite/gcc.target/avr/torture/vals-ur.def b/gcc/testsuite/gcc.target/avr/torture/vals-ur.def
new file mode 100644
index 0000000000..d6ea8f1c50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/avr/torture/vals-ur.def
@@ -0,0 +1,17 @@
+VAL (01, 0x0)
+VAL (02, 0x1)
+VAL (03, 0x3f)
+VAL (04, 0x80)
+VAL (07, 0x4000)
+VAL (08, 0xc000)
+VAL (10, 0x7fff)
+VAL (12, 0x7f80)
+VAL (14, 0x7f81)
+VAL (16, 0x7f7f)
+VAL (20, 0x3e80)
+VAL (22, 0x3f80)
+VAL (26, 0x3f00)
+VAL (32, 0x100)
+
+VAL (99, 0x8000)
+
diff --git a/gcc/testsuite/gcc.target/bfin/bfin.exp b/gcc/testsuite/gcc.target/bfin/bfin.exp
index 85a50a5ba4..a1b6707e29 100644
--- a/gcc/testsuite/gcc.target/bfin/bfin.exp
+++ b/gcc/testsuite/gcc.target/bfin/bfin.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp
index 645460e03c..6ab9929e48 100644
--- a/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp
+++ b/gcc/testsuite/gcc.target/bfin/builtins/bfin-builtins.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/cris/20011127-1.c b/gcc/testsuite/gcc.target/cris/20011127-1.c
index 0e448f8b0b..298a8b9fd8 100644
--- a/gcc/testsuite/gcc.target/cris/20011127-1.c
+++ b/gcc/testsuite/gcc.target/cris/20011127-1.c
@@ -17,7 +17,6 @@ foo (void)
them. */
asm ("\n;# %b0" : : "r" (0)); /* { dg-error "modifier" } */
asm ("\n;# %v0" : : "r" (0)); /* { dg-error "modifier" } */
- asm ("\n;# %P0" : : "r" (0)); /* { dg-error "modifier" } */
asm ("\n;# %p0" : : "r" (0)); /* { dg-error "modifier" } */
asm ("\n;# %z0" : : "r" (0)); /* { dg-error "modifier" } */
asm ("\n;# %H0" : : "F" (0.5)); /* { dg-error "modifier" } */
diff --git a/gcc/testsuite/gcc.target/cris/asm-other.S b/gcc/testsuite/gcc.target/cris/asm-other.S
new file mode 100644
index 0000000000..4fe7ebfc41
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-other.S
@@ -0,0 +1,15 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
+/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
+
+/* Make sure we can assemble for the "other" variant, with the twist
+ that the gcc option -march=v0 isn't valid for the assembler. */
+ .text
+#if OTHER_ISA == 32
+ addoq 42,$r1,$acr
+#else
+0:
+ move.d [$r2=$r0+42],$r1
+ bwf 0b
+ nop
+#endif
diff --git a/gcc/testsuite/gcc.target/cris/asm-v10.S b/gcc/testsuite/gcc.target/cris/asm-v10.S
new file mode 100644
index 0000000000..c85ebe293b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-v10.S
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
+
+/* Check that -march=v10 is also recognized. */
+
+#include "asm-other.S"
diff --git a/gcc/testsuite/gcc.target/cris/asm-v8.S b/gcc/testsuite/gcc.target/cris/asm-v8.S
new file mode 100644
index 0000000000..3fba318845
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/asm-v8.S
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
+
+/* Check that -march=v8 is also recognized. */
+
+#include "asm-other.S"
diff --git a/gcc/testsuite/gcc.target/cris/cris.exp b/gcc/testsuite/gcc.target/cris/cris.exp
index 769052a285..4a04d1920c 100644
--- a/gcc/testsuite/gcc.target/cris/cris.exp
+++ b/gcc/testsuite/gcc.target/cris/cris.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/cris/inasm-other.c b/gcc/testsuite/gcc.target/cris/inasm-other.c
new file mode 100644
index 0000000000..c1c043f56d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-other.c
@@ -0,0 +1,23 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=0 -march=v0" { target crisv32-*-* } } */
+/* { dg-options "-DOTHER_ISA=32 -march=v32" { target cris-*-* } } */
+
+/* Make sure we can (generate code and) assemble for the "other"
+ variant, with the twist that the gcc option -march=v0 isn't
+ valid for the assembler. We don't check that the generated code
+ is for the other variant; other tests cover that already, but they
+ don't *assemble* the result. We can't trust the prologue and
+ epilogue to contain incompatible insns (they actually deliberately
+ don't, usually and it'd be brittle to tweak the function signature
+ to make it so), so we force some with inline asm. */
+
+void f(void)
+{
+#if OTHER_ISA == 32
+ asm volatile ("addoq 42,$r11,$acr");
+#else
+ asm volatile ("0: move.d [$r12=$sp+42],$r10\n\t"
+ "bwf 0b\n\t"
+ "nop");
+#endif
+}
diff --git a/gcc/testsuite/gcc.target/cris/inasm-v10.c b/gcc/testsuite/gcc.target/cris/inasm-v10.c
new file mode 100644
index 0000000000..75379b3c8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-v10.c
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=10 -march=v10" } */
+
+/* Check that -march=v10 is also recognized. */
+
+#include "inasm-other.c"
diff --git a/gcc/testsuite/gcc.target/cris/inasm-v8.c b/gcc/testsuite/gcc.target/cris/inasm-v8.c
new file mode 100644
index 0000000000..b2fb3053c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/inasm-v8.c
@@ -0,0 +1,6 @@
+/* { dg-do assemble } */
+/* { dg-options "-DOTHER_ISA=8 -march=v8" } */
+
+/* Check that -march=v8 is also recognized. */
+
+#include "inasm-other.c"
diff --git a/gcc/testsuite/gcc.target/cris/peep2-andu2.c b/gcc/testsuite/gcc.target/cris/peep2-andu2.c
index 55f638cdb5..fd19cdd906 100644
--- a/gcc/testsuite/gcc.target/cris/peep2-andu2.c
+++ b/gcc/testsuite/gcc.target/cris/peep2-andu2.c
@@ -1,13 +1,20 @@
/* { dg-do assemble } */
-/* { dg-final { scan-assembler "movu.w \\\$r10,\\\$" } } */
-/* { dg-final { scan-assembler "and.w 2047,\\\$" } } */
+/* { dg-final { scan-assembler "movu.w \\\$r10,\\\$|movu.w 2047," } } */
+/* { dg-final { scan-assembler "and.w 2047,\\\$|and.d \\\$r10," } } */
/* { dg-final { scan-assembler-not "move.d \\\$r10,\\\$" } } */
-/* { dg-final { scan-assembler "movu.b \\\$r10,\\\$" } } */
-/* { dg-final { scan-assembler "and.b 95,\\\$" } } */
+/* { dg-final { scan-assembler "movu.b \\\$r10,\\\$|movu.b 95," } } */
+/* { dg-final { scan-assembler "and.b 95,\\\$|and.d \\\$r10," } } */
/* { dg-final { scan-assembler "andq -2,\\\$" } } */
+/* { dg-final { scan-assembler-not "movu.b 254,\\\$" } } */
/* { dg-options "-O2 -save-temps" } */
-/* Test the "andu" peephole2 trivially, register operand. */
+/* Originally used to test the "andu" peephole2 trivially, register operand.
+ Due to reload changes (r186861), the suboptimal sequence isn't
+ generated and the peephole2 doesn't trig for this trivial code
+ anymore. Another minimal sequence is generated, where the constant
+ is loaded to a free register first. Instead another case is exposed;
+ handled by the "andqu" peephole2, trigged by and_peep2_q (the andq
+ and scan-assembler-not-movu.b lines above). */
unsigned int
and_peep2_hi (unsigned int y, unsigned int *x)
diff --git a/gcc/testsuite/gcc.target/cris/sync-1-v10.c b/gcc/testsuite/gcc.target/cris/sync-1-v10.c
new file mode 100644
index 0000000000..6c8dd1a407
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-1-v10.c
@@ -0,0 +1,5 @@
+/* Check that we can assemble both base atomic variants. */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -march=v10" } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-1-v32.c b/gcc/testsuite/gcc.target/cris/sync-1-v32.c
new file mode 100644
index 0000000000..3c1d076ab7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-1-v32.c
@@ -0,0 +1,5 @@
+/* Check that we can assemble both base atomic variants. */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -march=v32" } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-1.c b/gcc/testsuite/gcc.target/cris/sync-1.c
new file mode 100644
index 0000000000..1bc9a674c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-1.c
@@ -0,0 +1,35 @@
+/* Check that we can assemble both base atomic variants, for v0. */
+/* { dg-do assemble } */
+/* { dg-options "-O2 -march=v0" } */
+
+#ifndef type
+#define type char
+#endif
+
+#if !defined(op) && !defined(xchg)
+#define op 1
+#define xchg 1
+#endif
+
+#ifndef op
+#define op 0
+#endif
+
+#ifndef xchg
+#define xchg 0
+#endif
+
+#if op
+int sfa (type *p, type *q, int a)
+{
+ return __atomic_fetch_nand (p, a, __ATOMIC_ACQ_REL)
+ + __atomic_fetch_add (q, a, __ATOMIC_SEQ_CST);
+}
+#endif
+
+#if xchg
+void acen (type *ptr, type *val, type *ret)
+{
+ __atomic_exchange (ptr, val, ret, __ATOMIC_SEQ_CST);
+}
+#endif
diff --git a/gcc/testsuite/gcc.target/cris/sync-2c.c b/gcc/testsuite/gcc.target/cris/sync-2c.c
new file mode 100644
index 0000000000..80e646c20d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-2c.c
@@ -0,0 +1,8 @@
+/* Check that we don't get alignment-checking code, char. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-2i.c b/gcc/testsuite/gcc.target/cris/sync-2i.c
new file mode 100644
index 0000000000..d491d3c086
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-2i.c
@@ -0,0 +1,10 @@
+/* Check that we get the expected alignment-checking code, op variant, int. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dop -Dtype=int" } */
+/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler "\tbreak 8" } } */
+/* { dg-final { scan-assembler "\tbtstq \\(2-1\\)," } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-2s.c b/gcc/testsuite/gcc.target/cris/sync-2s.c
new file mode 100644
index 0000000000..06ff98a276
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-2s.c
@@ -0,0 +1,10 @@
+/* Check that we get the expected alignment-checking code, op variant, short. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dop -Dtype=short" } */
+/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler "\tbreak 8" } } */
+/* { dg-final { scan-assembler "\tbtstq \\(1-1\\)," } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-3i.c b/gcc/testsuite/gcc.target/cris/sync-3i.c
new file mode 100644
index 0000000000..9e67d61cb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-3i.c
@@ -0,0 +1,12 @@
+/* Check that we get the expected alignment-checking code, xchg variant, int.
+ Unfortunately, PRE moves the "and" to a different BB, so combine doesn't
+ see it with the compare to make it a btstq. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dxchg -Dtype=int" } */
+/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler "\tbreak 8" } } */
+/* { dg-final { scan-assembler "\tbtstq \\(2-1\\)," { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "\tand" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-3s.c b/gcc/testsuite/gcc.target/cris/sync-3s.c
new file mode 100644
index 0000000000..8e87a3b622
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-3s.c
@@ -0,0 +1,12 @@
+/* Check that we get the expected alignment-checking code, xchg variant, short.
+ Unfortunately, PRE moves the "and" to a different BB, so combine doesn't
+ see it with the compare to make it a btstq. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dxchg -Dtype=short" } */
+/* { dg-additional-options "-mtrap-using-break8 -mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler "\tbreak 8" } } */
+/* { dg-final { scan-assembler "\tbtstq \\(1-1\\)," { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "\tand" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-4c.c b/gcc/testsuite/gcc.target/cris/sync-4c.c
new file mode 100644
index 0000000000..e8cb69267b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-4c.c
@@ -0,0 +1,8 @@
+/* Check that we get don't alignment-checking code, xchg variant, char. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-trap-unaligned-atomic" } */
+/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-4i.c b/gcc/testsuite/gcc.target/cris/sync-4i.c
new file mode 100644
index 0000000000..78a7012ccd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-4i.c
@@ -0,0 +1,9 @@
+/* Check that we don't get alignment-checking code, int. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dtype=int -mno-trap-unaligned-atomic" } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-4s.c b/gcc/testsuite/gcc.target/cris/sync-4s.c
new file mode 100644
index 0000000000..6691a48283
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-4s.c
@@ -0,0 +1,9 @@
+/* Check that we don't get alignment-checking code, short. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -Dtype=short -mno-trap-unaligned-atomic" } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+/* { dg-final { scan-assembler-not "\tbreak\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "\tbtstq\[ \t\]\[^5\]" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\t\[jb\]sr" } } */
+#include "sync-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/sync-xchg-1.c b/gcc/testsuite/gcc.target/cris/sync-xchg-1.c
new file mode 100644
index 0000000000..21bb7d4ffc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/sync-xchg-1.c
@@ -0,0 +1,21 @@
+/* Check that the basic library call variant is sane; no other calls, no
+ checks compares or branches. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -munaligned-atomic-may-use-library" } */
+/* { dg-final { scan-assembler-not "\tdi" } } */
+/* { dg-final { scan-assembler-not "\tbtstq" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\tclearf" } } */
+/* { dg-final { scan-assembler-not "\tmove.d" } } */
+/* { dg-final { scan-assembler-not "\tcmp" } } */
+/* { dg-final { scan-assembler-not "\tb\[^s\]" } } */
+/* { dg-final { scan-assembler-times "\t\[JjBb\]sr" 1 } } */
+
+#ifndef type
+#define type int
+#endif
+
+type svcsw (type *ptr, type oldval, type newval)
+{
+ return __sync_val_compare_and_swap (ptr, oldval, newval);
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp b/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
index a0b294fcde..cf517fcaf3 100644
--- a/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
+++ b/gcc/testsuite/gcc.target/cris/torture/cris-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c
new file mode 100644
index 0000000000..dd8704cc92
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c
new file mode 100644
index 0000000000..8055fd380e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c
new file mode 100644
index 0000000000..c8cef18414
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-1ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c
new file mode 100644
index 0000000000..3c162e96a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c
new file mode 100644
index 0000000000..61e1c2047b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c
new file mode 100644
index 0000000000..0d78e90019
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-2ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c
new file mode 100644
index 0000000000..626a3d5cba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c
new file mode 100644
index 0000000000..339e74cd86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c
new file mode 100644
index 0000000000..17c6d34d11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-i-3ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c
new file mode 100644
index 0000000000..f2835aa06c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1.c
@@ -0,0 +1,126 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=short -mno-unaligned-atomic-may-use-library" } */
+
+/* Make sure we get a SIGTRAP or equivalent when passing unaligned
+ but otherwise valid pointers to the atomic builtins. */
+
+#include <signal.h>
+#include <stdlib.h>
+
+#ifndef type
+#error type not defined
+#endif
+
+#ifndef op
+#define op 0
+#endif
+
+#ifndef xchg
+#define xchg 0
+#endif
+
+#if op
+int sfa (type *p, type *q, int a);
+#endif
+
+#if xchg
+void acen (type *ptr, type *val, type *ret);
+#endif
+
+#ifndef misalignment
+#define misalignment 1
+#endif
+
+volatile int trap_expected = 0;
+
+struct { char x[misalignment]; type i; } s __attribute__ ((__aligned__ (4)))
+ = { {0}, (type) 0xdeadbeef };
+type x = 2;
+type ret = 42;
+
+#ifdef TRAP_USING_ABORT
+#define SYMSTR(x) STR1(__USER_LABEL_PREFIX__, x)
+#define STR1(x,y) STR2(x, y)
+#define STR2(x,y) #x #y
+/* LTO requires marking seemingly-unused-but-used global functions. */
+void my_abort (void) __asm__ (SYMSTR (abort)) __attribute__ ((__used__));
+void my_abort (void)
+#else
+#ifdef __gnu_linux__
+void trap_handler(int signum)
+#else
+#error "can't catch break 8"
+#endif
+#endif
+{
+ if (1
+#ifndef TRAP_USING_ABORT
+ && signum == SIGTRAP
+#endif
+ && trap_expected
+ && s.i == (type) 0xdeadbeef
+ && x == 2 && ret == 42)
+ exit (0);
+
+#ifdef TRAP_USING_ABORT
+ /* We might be able to trust the exit-value getting through, but add
+ a NULL-dereference SEGV just in case. Make sure gcc doesn't
+ understand the NULL. */
+ *({ int *p; asm ("" : "=rm" (p) : "0" (0)); p; }) = 0xdead;
+ exit (2);
+#else
+ abort ();
+#endif
+}
+
+int main(void)
+{
+ type ret;
+
+#ifndef TRAP_USING_ABORT
+#ifdef __gnu_linux__
+ if (signal (SIGTRAP, trap_handler) == SIG_ERR)
+ abort ();
+#endif
+#endif
+
+#ifndef mis_ok
+ trap_expected = 1;
+#endif
+
+#if op
+ sfa (&s.i, &s.i, 42);
+
+ /* We should have fallen into the trap now. But don't call abort
+ yet: if the trap is implemented as a call to abort, we have to
+ tell the difference. Set a global variable *and* make sure the
+ setting isn't eliminated by optimizers: another call to sfa
+ should do it. */
+ trap_expected = 0;
+
+#ifdef mis_ok
+ /* We're missing a sequence point, but we shouldn't have the initial
+ value. */
+ if (s.i == (type) 0xdeadbeef)
+ abort ();
+ exit (0);
+#endif
+
+ sfa (&x, &x, 1);
+#else
+ acen (&s.i, &x, &ret);
+
+#ifdef mis_ok
+ if (s.i != 2 || x != 2 || ret != (type) 0xdeadbeef)
+ abort ();
+ exit (0);
+#endif
+
+ trap_expected = 0;
+
+ acen (&x, &x, &ret);
+#endif
+
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c
new file mode 100644
index 0000000000..ba639172ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c
new file mode 100644
index 0000000000..3685c50473
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-op-s-1ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dop -Dtype=short -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c
new file mode 100644
index 0000000000..da25614e23
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c
new file mode 100644
index 0000000000..09a7a9ea3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c
new file mode 100644
index 0000000000..d757a683b1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-1ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c
new file mode 100644
index 0000000000..e8a425328e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c
new file mode 100644
index 0000000000..2b97613de3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c
new file mode 100644
index 0000000000..fb711e0ef7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-2ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=2 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c
new file mode 100644
index 0000000000..4a3511bf2f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c
new file mode 100644
index 0000000000..94a25e37f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c
new file mode 100644
index 0000000000..32f8ebbd9b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-i-3ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=int -Dmisalignment=3 -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c
new file mode 100644
index 0000000000..d8dede9c1f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=short -mno-unaligned-atomic-may-use-library" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c
new file mode 100644
index 0000000000..6f5eb02afe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1a.c
@@ -0,0 +1,6 @@
+/* { dg-do run } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=short -DTRAP_USING_ABORT -mno-trap-using-break8" } */
+/* { dg-additional-options "-mtrap-unaligned-atomic" { target cris-*-elf } } */
+/* { dg-additional-options "-mno-unaligned-atomic-may-use-library" { target cris*-*-linux* } } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c
new file mode 100644
index 0000000000..a6f501c10c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/sync-mis-xchg-s-1ml.c
@@ -0,0 +1,4 @@
+/* { dg-do run { target *-*-linux* } } */
+/* { dg-additional-sources "../sync-1.c" } */
+/* { dg-options "-Dxchg -Dtype=short -Dmis_ok" } */
+#include "sync-mis-op-s-1.c"
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-1.c b/gcc/testsuite/gcc.target/cris/torture/trap-1.c
new file mode 100644
index 0000000000..48363fbb3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-1.c
@@ -0,0 +1,13 @@
+/* Check that "break 8" defaults according to CPU version. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march*" } { "" } } */
+/* { dg-final { scan-assembler "break 8" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "bsr" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "jsr" { target { ! cris-*-elf } } } } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" { target cris-*-elf } } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" { target cris-*-elf } } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-2.c b/gcc/testsuite/gcc.target/cris/torture/trap-2.c
new file mode 100644
index 0000000000..155d5fe427
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-2.c
@@ -0,0 +1,11 @@
+/* As trap-1.c but forcing on. */
+/* { dg-do compile } */
+/* { dg-options "-mtrap-using-break8" } */
+/* { dg-final { scan-assembler "break 8" } } */
+/* { dg-final { scan-assembler-not "bsr" } } */
+/* { dg-final { scan-assembler-not "jsr" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-3.c b/gcc/testsuite/gcc.target/cris/torture/trap-3.c
new file mode 100644
index 0000000000..dfa092445e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-3.c
@@ -0,0 +1,10 @@
+/* Like trap-1.c and trap-2.c but force calls to abort. */
+/* { dg-do compile } */
+/* { dg-options "-mno-trap-using-break8" } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-v0.c b/gcc/testsuite/gcc.target/cris/torture/trap-v0.c
new file mode 100644
index 0000000000..084fb28d40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-v0.c
@@ -0,0 +1,11 @@
+/* As trap-1.c but with CPU version specified, excluding. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */
+/* { dg-options "-march=v0" } */
+/* { dg-final { scan-assembler-not "break\[ \t\]" } } */
+/* { dg-final { scan-assembler "\[jb\]sr \[_\]\?abort" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/cris/torture/trap-v3.c b/gcc/testsuite/gcc.target/cris/torture/trap-v3.c
new file mode 100644
index 0000000000..e004c5bc82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/cris/torture/trap-v3.c
@@ -0,0 +1,12 @@
+/* As trap-1.c but with CPU version specified, including. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "*-*-*" } { "-march=*" } { "" } } */
+/* { dg-options "-march=v3" } */
+/* { dg-final { scan-assembler "break 8" } } */
+/* { dg-final { scan-assembler-not "bsr" } } */
+/* { dg-final { scan-assembler-not "jsr" } } */
+
+void do_trap (void)
+{
+ __builtin_trap ();
+}
diff --git a/gcc/testsuite/gcc.target/epiphany/epiphany.exp b/gcc/testsuite/gcc.target/epiphany/epiphany.exp
index dc9fecc728..59226ae158 100644
--- a/gcc/testsuite/gcc.target/epiphany/epiphany.exp
+++ b/gcc/testsuite/gcc.target/epiphany/epiphany.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/epiphany/fnma-1.c b/gcc/testsuite/gcc.target/epiphany/fnma-1.c
new file mode 100644
index 0000000000..3155079f4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/epiphany/fnma-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "fmsub\[ \ta-zA-Z0-9\]*," 1 } } */
+
+float
+f (float ar, float ai, float br, float bi)
+{
+ return ar * br - ai * bi;
+}
diff --git a/gcc/testsuite/gcc.target/frv/frv.exp b/gcc/testsuite/gcc.target/frv/frv.exp
index 82b2541cdf..b3dcc25915 100644
--- a/gcc/testsuite/gcc.target/frv/frv.exp
+++ b/gcc/testsuite/gcc.target/frv/frv.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/h8300/h8300.exp b/gcc/testsuite/gcc.target/h8300/h8300.exp
new file mode 100644
index 0000000000..8523a12857
--- /dev/null
+++ b/gcc/testsuite/gcc.target/h8300/h8300.exp
@@ -0,0 +1,82 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a h8300 target.
+if ![istarget h8300*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a h8300 target.
+if ![istarget h8300*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/h8300/pragma-isr.c b/gcc/testsuite/gcc.target/h8300/pragma-isr.c
new file mode 100644
index 0000000000..24fba30d8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/h8300/pragma-isr.c
@@ -0,0 +1,40 @@
+/* Check whether rte is generated for two ISRs. */
+/* { dg-do compile { target h8300-*-* } } */
+/* { dg-options "-O3" } */
+/* { dg-final { scan-assembler-times "rte" 2} } */
+
+extern void foo (void);
+
+#pragma interrupt
+void
+isr1 (void)
+{
+ foo ();
+}
+
+#pragma interrupt
+void
+isr2 (void)
+{
+ foo ();
+}
+/* Check whether rte is generated for two ISRs. */
+/* { dg-do compile { target h8300-*-* } } */
+/* { dg-options "-O3" } */
+/* { dg-final { scan-assembler-times "rte" 2} } */
+
+extern void foo (void);
+
+#pragma interrupt
+void
+isr1 (void)
+{
+ foo ();
+}
+
+#pragma interrupt
+void
+isr2 (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/h8300/pragma-isr2.c b/gcc/testsuite/gcc.target/h8300/pragma-isr2.c
new file mode 100644
index 0000000000..7c242ec311
--- /dev/null
+++ b/gcc/testsuite/gcc.target/h8300/pragma-isr2.c
@@ -0,0 +1,42 @@
+/* Check whether rte is generated only for an ISR. */
+/* { dg-do compile { target h8300-*-* } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+
+#pragma interrupt
+void
+isr (void)
+{
+}
+
+void
+delay (int a)
+{
+}
+
+int
+main (void)
+{
+ return 0;
+}
+/* Check whether rte is generated only for an ISR. */
+/* { dg-do compile { target h8300-*-* } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+
+#pragma interrupt
+void
+isr (void)
+{
+}
+
+void
+delay (int a)
+{
+}
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/20000724-1.c b/gcc/testsuite/gcc.target/i386/20000724-1.c
index cbcd4f1f1d..e4acdd7e4a 100644
--- a/gcc/testsuite/gcc.target/i386/20000724-1.c
+++ b/gcc/testsuite/gcc.target/i386/20000724-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-require-effective-target ia32 } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
diff --git a/gcc/testsuite/gcc.target/i386/20030217-1.c b/gcc/testsuite/gcc.target/i386/20030217-1.c
index f19fd27fe7..d2b24802ba 100644
--- a/gcc/testsuite/gcc.target/i386/20030217-1.c
+++ b/gcc/testsuite/gcc.target/i386/20030217-1.c
@@ -2,6 +2,7 @@
are parsed correctly. */
/* { dg-do run } */
/* { dg-options "-std=c99" } */
+/* { dg-require-effective-target large_long_double } */
long double d = 0x0.0000003ffffffff00000p-16357L;
long double e = 0x0.0000003ffffffff00000p-16356L;
diff --git a/gcc/testsuite/gcc.target/i386/20030217-2.c b/gcc/testsuite/gcc.target/i386/20030217-2.c
new file mode 100644
index 0000000000..d0606a2420
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/20030217-2.c
@@ -0,0 +1,23 @@
+/* Test whether denormal floating point constants in hexadecimal notation
+ are parsed correctly. */
+/* { dg-do run } */
+/* { dg-options "-std=c99" } */
+
+long double d;
+long double e;
+
+long double f = 2.2250738585072014E-308L;
+
+extern void abort (void);
+extern void exit (int);
+
+int
+main (void)
+{
+ d = 0x0.0000003ffffffff00000p-1048L;
+ e = 0x0.0000003ffffffff00000p-1047L;
+ if (d != e / 2.0)
+ abort ();
+
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/387-3.c b/gcc/testsuite/gcc.target/i386/387-3.c
index d00c729672..0c51a21b9d 100644
--- a/gcc/testsuite/gcc.target/i386/387-3.c
+++ b/gcc/testsuite/gcc.target/i386/387-3.c
@@ -1,7 +1,8 @@
/* Verify that 387 mathematical constants are recognized. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387" } */
+/* { dg-options "-O2 -mfpmath=387 -mfancy-math-387 -mtune=generic" } */
/* { dg-final { scan-assembler "fldpi" } } */
+/* { dg-require-effective-target large_long_double } */
long double add_pi(long double x)
{
diff --git a/gcc/testsuite/gcc.target/i386/387-4.c b/gcc/testsuite/gcc.target/i386/387-4.c
index e4f4a48f2e..10fe931199 100644
--- a/gcc/testsuite/gcc.target/i386/387-4.c
+++ b/gcc/testsuite/gcc.target/i386/387-4.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfancy-math-387" } */
+/* { dg-options "-O2 -mfancy-math-387 -mtune=generic" } */
/* { dg-final { scan-assembler "fldpi" } } */
+/* { dg-require-effective-target large_long_double } */
long double atanl (long double);
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx32-1.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-1.c
new file mode 100644
index 0000000000..daf5779b19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-madx -O2" } */
+/* { dg-final { scan-assembler "adcx" } } */
+
+#include <x86intrin.h>
+
+volatile unsigned char c;
+volatile unsigned int x, y;
+unsigned int *sum;
+
+void extern
+adx_test (void)
+{
+ c = _addcarryx_u32 (c, x, y, sum);
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx32-2.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-2.c
new file mode 100644
index 0000000000..d38d7ee784
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-madx -O2" } */
+/* { dg-require-effective-target adx } */
+
+#include <x86intrin.h>
+#include "adx-check.h"
+
+static void
+adx_test (void)
+{
+ volatile unsigned char c;
+ unsigned int x;
+ volatile unsigned int y, sum_ref;
+
+ c = 0;
+ x = y = 0xFFFFFFFF;
+ sum_ref = 0xFFFFFFFE;
+
+ /* X = 0xFFFFFFFF, Y = 0xFFFFFFFF, C = 0. */
+ c = _addcarryx_u32 (c, x, y, &x);
+ /* X = 0xFFFFFFFE, Y = 0xFFFFFFFF, C = 1. */
+ c = _addcarryx_u32 (c, x, y, &x);
+ /* X = 0xFFFFFFFE, Y = 0xFFFFFFFF, C = 1. */
+
+ if (x != sum_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx32-3.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-3.c
new file mode 100644
index 0000000000..0ed33a9503
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx32-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-adx -O2" } */
+/* { dg-final { scan-assembler "adcl" } } */
+
+#include <x86intrin.h>
+
+volatile unsigned char c;
+volatile unsigned int x, y;
+unsigned int *sum;
+
+void extern
+adx_test (void)
+{
+ c = _addcarryx_u32 (c, x, y, sum);
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx64-1.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-1.c
new file mode 100644
index 0000000000..45beca851f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-madx -O2" } */
+/* { dg-final { scan-assembler "adcx" } } */
+
+#include <x86intrin.h>
+
+volatile unsigned char c;
+volatile unsigned long long x, y;
+unsigned long long *sum;
+
+void extern
+adx_test (void)
+{
+ c = _addcarryx_u64 (c, x, y, sum);
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx64-2.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-2.c
new file mode 100644
index 0000000000..6aa2539c0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run { target { ! ia32 } } } */
+/* { dg-options "-madx -O2" } */
+/* { dg-require-effective-target adx } */
+
+#include <x86intrin.h>
+#include "adx-check.h"
+
+static void
+adx_test (void)
+{
+ volatile unsigned char c;
+ unsigned long long x;
+ volatile unsigned long long y, sum_ref;
+
+ c = 0;
+ x = y = 0xFFFFFFFFFFFFFFFFLL;
+ sum_ref = 0xFFFFFFFFFFFFFFFELL;
+
+ /* X = 0xFFFFFFFFFFFFFFFF, Y = 0xFFFFFFFFFFFFFFFF, C = 0. */
+ c = _addcarryx_u64 (c, x, y, &x);
+ /* X = 0xFFFFFFFFFFFFFFFE, Y = 0xFFFFFFFFFFFFFFFF, C = 1. */
+ c = _addcarryx_u64 (c, x, y, &x);
+ /* X = 0xFFFFFFFFFFFFFFFE, Y = 0xFFFFFFFFFFFFFFFF, C = 1. */
+
+ if (x != sum_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-addcarryx64-3.c b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-3.c
new file mode 100644
index 0000000000..4bbf74bfc2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-addcarryx64-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mno-adx -O2" } */
+/* { dg-final { scan-assembler "adcq" } } */
+
+#include <x86intrin.h>
+
+volatile unsigned char c;
+volatile unsigned long long x, y;
+unsigned long long *sum;
+
+void extern
+adx_test (void)
+{
+ c = _addcarryx_u64 (c, x, y, sum);
+}
diff --git a/gcc/testsuite/gcc.target/i386/adx-check.h b/gcc/testsuite/gcc.target/i386/adx-check.h
new file mode 100644
index 0000000000..580cb49ed4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/adx-check.h
@@ -0,0 +1,40 @@
+#include <stdlib.h>
+#include "cpuid.h"
+
+static void adx_test (void);
+
+static void __attribute__ ((noinline)) do_test (void)
+{
+ adx_test ();
+}
+
+ int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+ /* Run ADX test only if host has ADX support. */
+
+ if (__get_cpuid_max (0, NULL) < 7)
+ return 0;
+
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ if ((ebx & bit_ADX) == bit_ADX)
+ {
+ do_test ();
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+ return 0;
+ }
+#ifdef DEBUG
+ printf ("SKIPPED\n");
+#endif
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/align-main-3.c b/gcc/testsuite/gcc.target/i386/align-main-3.c
index 6f8c758035..b3a000acec 100644
--- a/gcc/testsuite/gcc.target/i386/align-main-3.c
+++ b/gcc/testsuite/gcc.target/i386/align-main-3.c
@@ -1,5 +1,5 @@
/* Test for stack alignment with sibcall optimization. */
-/* { dg-do compile { target { *-*-linux* && ia32 } } } */
+/* { dg-do compile { target { { *-*-linux* *-*-gnu* } && ia32 } } } */
/* { dg-options "-O2 -mpreferred-stack-boundary=4 -mincoming-stack-boundary=2" } */
/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%\[re\]?sp" } } */
/* { dg-final { scan-assembler "call\[\\t \]*foo" } } */
diff --git a/gcc/testsuite/gcc.target/i386/andor-2.c b/gcc/testsuite/gcc.target/i386/andor-2.c
index 88118aab57..eacc7b1e44 100644
--- a/gcc/testsuite/gcc.target/i386/andor-2.c
+++ b/gcc/testsuite/gcc.target/i386/andor-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mtune=i686" } */
+/* { dg-options "-O2 -mtune=generic" } */
int h(int x, int y)
{
diff --git a/gcc/testsuite/gcc.target/i386/asm-1.c b/gcc/testsuite/gcc.target/i386/asm-1.c
index 999c576796..cd60a09bd7 100644
--- a/gcc/testsuite/gcc.target/i386/asm-1.c
+++ b/gcc/testsuite/gcc.target/i386/asm-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
-/* { dg-options "-m32" } */
+/* { dg-options "" } */
register unsigned int EAX asm ("r14"); /* { dg-error "register name" } */
diff --git a/gcc/testsuite/gcc.target/i386/asm-dialect-1.c b/gcc/testsuite/gcc.target/i386/asm-dialect-1.c
new file mode 100644
index 0000000000..b29017eeb4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/asm-dialect-1.c
@@ -0,0 +1,16 @@
+/* { dg-options "-masm=intel" } */
+/* { dg-require-effective-target masm_intel } */
+
+extern void abort (void);
+
+int
+main (void)
+{
+ int f = 0;
+ asm ("{movl $42, %%eax | mov eax, 42}" : :);
+ asm ("{movl $41, %0||mov %0, 43}" : "=r"(f));
+ if (f != 42)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/asm-dialect-2.c b/gcc/testsuite/gcc.target/i386/asm-dialect-2.c
new file mode 100644
index 0000000000..8386d64e52
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/asm-dialect-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-masm=att" } */
+/* { dg-final { scan-assembler "%{a}|" } } */
+
+int a, b;
+
+void f()
+{
+ /* Check for escaped curly braces support. */
+ asm volatile ("{%%%{a%}%||%%%}b}" : :);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-1.c b/gcc/testsuite/gcc.target/i386/avx-1.c
index 4f40abb260..8f28921ca8 100644
--- a/gcc/testsuite/gcc.target/i386/avx-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-1.c
@@ -152,13 +152,224 @@
#define __builtin_ia32_shufpd(A, B, N) __builtin_ia32_shufpd(A, B, 0)
/* xmmintrin.h */
-#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, A, _MM_HINT_NTA)
+#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, 0, _MM_HINT_NTA)
#define __builtin_ia32_pshufw(A, N) __builtin_ia32_pshufw(A, 0)
#define __builtin_ia32_vec_set_v4hi(A, D, N) \
__builtin_ia32_vec_set_v4hi(A, D, 0)
#define __builtin_ia32_vec_ext_v4hi(A, N) __builtin_ia32_vec_ext_v4hi(A, 0)
#define __builtin_ia32_shufps(A, B, N) __builtin_ia32_shufps(A, B, 0)
+/* f16cintrin.h */
+#define __builtin_ia32_vcvtps2ph(A, I) __builtin_ia32_vcvtps2ph(A, 0)
+#define __builtin_ia32_vcvtps2ph256(A, I) __builtin_ia32_vcvtps2ph256(A, 0)
+
+/* rtmintrin.h */
+#define __builtin_ia32_xabort(I) __builtin_ia32_xabort(0)
+
+/* avx512fintrin.h */
+#define __builtin_ia32_addpd512_mask(A, B, C, D, E) __builtin_ia32_addpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addps512_mask(A, B, C, D, E) __builtin_ia32_addps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addsd_round(A, B, C) __builtin_ia32_addsd_round(A, B, 8)
+#define __builtin_ia32_addss_round(A, B, C) __builtin_ia32_addss_round(A, B, 8)
+#define __builtin_ia32_alignd512_mask(A, B, F, D, E) __builtin_ia32_alignd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_alignq512_mask(A, B, F, D, E) __builtin_ia32_alignq512_mask(A, B, 1, D, E)
+#define __builtin_ia32_cmpd512_mask(A, B, E, D) __builtin_ia32_cmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_cmppd512_mask(A, B, F, D, E) __builtin_ia32_cmppd512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpps512_mask(A, B, F, D, E) __builtin_ia32_cmpps512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpq512_mask(A, B, E, D) __builtin_ia32_cmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_cmpsd_mask(A, B, F, D, E) __builtin_ia32_cmpsd_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpss_mask(A, B, F, D, E) __builtin_ia32_cmpss_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cvtdq2ps512_mask(A, B, C, D) __builtin_ia32_cvtdq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2dq512_mask(A, B, C, D) __builtin_ia32_cvtpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2ps512_mask(A, B, C, D) __builtin_ia32_cvtpd2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2udq512_mask(A, B, C, D) __builtin_ia32_cvtpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2dq512_mask(A, B, C, D) __builtin_ia32_cvtps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2pd512_mask(A, B, C, D) __builtin_ia32_cvtps2pd512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2udq512_mask(A, B, C, D) __builtin_ia32_cvtps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtsd2ss_round(A, B, C) __builtin_ia32_cvtsd2ss_round(A, B, 8)
+#define __builtin_ia32_cvtss2sd_round(A, B, C) __builtin_ia32_cvtss2sd_round(A, B, 4)
+#define __builtin_ia32_cvtsi2sd64(A, B, C) __builtin_ia32_cvtsi2sd64(A, B, 8)
+#define __builtin_ia32_cvtsi2ss32(A, B, C) __builtin_ia32_cvtsi2ss32(A, B, 8)
+#define __builtin_ia32_cvtsi2ss64(A, B, C) __builtin_ia32_cvtsi2ss64(A, B, 8)
+#define __builtin_ia32_cvttpd2dq512_mask(A, B, C, D) __builtin_ia32_cvttpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttpd2udq512_mask(A, B, C, D) __builtin_ia32_cvttpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2dq512_mask(A, B, C, D) __builtin_ia32_cvttps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2udq512_mask(A, B, C, D) __builtin_ia32_cvttps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtudq2ps512_mask(A, B, C, D) __builtin_ia32_cvtudq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtusi2sd64(A, B, C) __builtin_ia32_cvtusi2sd64(A, B, 8)
+#define __builtin_ia32_cvtusi2ss32(A, B, C) __builtin_ia32_cvtusi2ss32(A, B, 8)
+#define __builtin_ia32_cvtusi2ss64(A, B, C) __builtin_ia32_cvtusi2ss64(A, B, 8)
+#define __builtin_ia32_divpd512_mask(A, B, C, D, E) __builtin_ia32_divpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divps512_mask(A, B, C, D, E) __builtin_ia32_divps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divsd_round(A, B, C) __builtin_ia32_divsd_round(A, B, 8)
+#define __builtin_ia32_divss_round(A, B, C) __builtin_ia32_divss_round(A, B, 8)
+#define __builtin_ia32_extractf32x4_mask(A, E, C, D) __builtin_ia32_extractf32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extractf64x4_mask(A, E, C, D) __builtin_ia32_extractf64x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti32x4_mask(A, E, C, D) __builtin_ia32_extracti32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti64x4_mask(A, E, C, D) __builtin_ia32_extracti64x4_mask(A, 1, C, D)
+#define __builtin_ia32_fixupimmpd512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmpd512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmss_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmss_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_gatherdiv8df(A, B, C, D, F) __builtin_ia32_gatherdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv8di(A, B, C, D, F) __builtin_ia32_gatherdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16sf(A, B, C, D, F) __builtin_ia32_gatherdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16si(A, B, C, D, F) __builtin_ia32_gatherdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16sf(A, B, C, D, F) __builtin_ia32_gathersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16si(A, B, C, D, F) __builtin_ia32_gathersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8df(A, B, C, D, F) __builtin_ia32_gathersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8di(A, B, C, D, F) __builtin_ia32_gathersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_getexppd512_mask(A, B, C, D) __builtin_ia32_getexppd512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpps512_mask(A, B, C, D) __builtin_ia32_getexpps512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpsd128_round(A, B, C) __builtin_ia32_getexpsd128_round(A, B, 4)
+#define __builtin_ia32_getexpss128_round(A, B, C) __builtin_ia32_getexpss128_round(A, B, 4)
+#define __builtin_ia32_getmantpd512_mask(A, F, C, D, E) __builtin_ia32_getmantpd512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantps512_mask(A, F, C, D, E) __builtin_ia32_getmantps512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantsd_round(A, B, C, D) __builtin_ia32_getmantsd_round(A, B, 1, 4)
+#define __builtin_ia32_getmantss_round(A, B, C, D) __builtin_ia32_getmantss_round(A, B, 1, 4)
+#define __builtin_ia32_insertf32x4_mask(A, B, F, D, E) __builtin_ia32_insertf32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_insertf64x4_mask(A, B, F, D, E) __builtin_ia32_insertf64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti32x4_mask(A, B, F, D, E) __builtin_ia32_inserti32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti64x4_mask(A, B, F, D, E) __builtin_ia32_inserti64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_maxpd512_mask(A, B, C, D, E) __builtin_ia32_maxpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxps512_mask(A, B, C, D, E) __builtin_ia32_maxps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxsd_round(A, B, C) __builtin_ia32_maxsd_round(A, B, 4)
+#define __builtin_ia32_maxss_round(A, B, C) __builtin_ia32_maxss_round(A, B, 4)
+#define __builtin_ia32_minpd512_mask(A, B, C, D, E) __builtin_ia32_minpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minps512_mask(A, B, C, D, E) __builtin_ia32_minps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minsd_round(A, B, C) __builtin_ia32_minsd_round(A, B, 4)
+#define __builtin_ia32_minss_round(A, B, C) __builtin_ia32_minss_round(A, B, 4)
+#define __builtin_ia32_mulpd512_mask(A, B, C, D, E) __builtin_ia32_mulpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulps512_mask(A, B, C, D, E) __builtin_ia32_mulps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulsd_round(A, B, C) __builtin_ia32_mulsd_round(A, B, 8)
+#define __builtin_ia32_mulss_round(A, B, C) __builtin_ia32_mulss_round(A, B, 8)
+#define __builtin_ia32_permdf512_mask(A, E, C, D) __builtin_ia32_permdf512_mask(A, 1, C, D)
+#define __builtin_ia32_permdi512_mask(A, E, C, D) __builtin_ia32_permdi512_mask(A, 1, C, D)
+#define __builtin_ia32_prold512_mask(A, E, C, D) __builtin_ia32_prold512_mask(A, 1, C, D)
+#define __builtin_ia32_prolq512_mask(A, E, C, D) __builtin_ia32_prolq512_mask(A, 1, C, D)
+#define __builtin_ia32_prord512_mask(A, E, C, D) __builtin_ia32_prord512_mask(A, 1, C, D)
+#define __builtin_ia32_prorq512_mask(A, E, C, D) __builtin_ia32_prorq512_mask(A, 1, C, D)
+#define __builtin_ia32_pshufd512_mask(A, E, C, D) __builtin_ia32_pshufd512_mask(A, 1, C, D)
+#define __builtin_ia32_pslldi512_mask(A, E, C, D) __builtin_ia32_pslldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psllqi512_mask(A, E, C, D) __builtin_ia32_psllqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psradi512_mask(A, E, C, D) __builtin_ia32_psradi512_mask(A, 1, C, D)
+#define __builtin_ia32_psraqi512_mask(A, E, C, D) __builtin_ia32_psraqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrldi512_mask(A, E, C, D) __builtin_ia32_psrldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrlqi512_mask(A, E, C, D) __builtin_ia32_psrlqi512_mask(A, 1, C, D)
+#define __builtin_ia32_pternlogd512_mask(A, B, C, F, E) __builtin_ia32_pternlogd512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogd512_maskz(A, B, C, F, E) __builtin_ia32_pternlogd512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_mask(A, B, C, F, E) __builtin_ia32_pternlogq512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_maskz(A, B, C, F, E) __builtin_ia32_pternlogq512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_rndscalepd_mask(A, F, C, D, E) __builtin_ia32_rndscalepd_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscaleps_mask(A, F, C, D, E) __builtin_ia32_rndscaleps_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscalesd_round(A, B, C, D) __builtin_ia32_rndscalesd_round(A, B, 1, 4)
+#define __builtin_ia32_rndscaless_round(A, B, C, D) __builtin_ia32_rndscaless_round(A, B, 1, 4)
+#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefsd_round(A, B, C) __builtin_ia32_scalefsd_round(A, B, 8)
+#define __builtin_ia32_scalefss_round(A, B, C) __builtin_ia32_scalefss_round(A, B, 8)
+#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16si(A, B, C, D, F) __builtin_ia32_scatterdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16sf(A, B, C, D, F) __builtin_ia32_scattersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16si(A, B, C, D, F) __builtin_ia32_scattersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8df(A, B, C, D, F) __builtin_ia32_scattersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8di(A, B, C, D, F) __builtin_ia32_scattersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_shuf_f32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_f32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_f64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_f64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_i32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_i64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufpd512_mask(A, B, F, D, E) __builtin_ia32_shufpd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
+#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtss_round(A, B, C) __builtin_ia32_sqrtss_round(A, B, 8)
+#define __builtin_ia32_sqrtsd_round(A, B, C) __builtin_ia32_sqrtsd_round(A, B, 8)
+#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subsd_round(A, B, C) __builtin_ia32_subsd_round(A, B, 8)
+#define __builtin_ia32_subss_round(A, B, C) __builtin_ia32_subss_round(A, B, 8)
+#define __builtin_ia32_ucmpd512_mask(A, B, E, D) __builtin_ia32_ucmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_ucmpq512_mask(A, B, E, D) __builtin_ia32_ucmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_vcomisd(A, B, C, D) __builtin_ia32_vcomisd(A, B, 1, 8)
+#define __builtin_ia32_vcomiss(A, B, C, D) __builtin_ia32_vcomiss(A, B, 1, 8)
+#define __builtin_ia32_vcvtph2ps512_mask(A, B, C, D) __builtin_ia32_vcvtph2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_vcvtps2ph512_mask(A, E, C, D) __builtin_ia32_vcvtps2ph512_mask(A, 1, C, D)
+#define __builtin_ia32_vcvtsd2si32(A, B) __builtin_ia32_vcvtsd2si32(A, 8)
+#define __builtin_ia32_vcvtsd2si64(A, B) __builtin_ia32_vcvtsd2si64(A, 8)
+#define __builtin_ia32_vcvtsd2usi32(A, B) __builtin_ia32_vcvtsd2usi32(A, 8)
+#define __builtin_ia32_vcvtsd2usi64(A, B) __builtin_ia32_vcvtsd2usi64(A, 8)
+#define __builtin_ia32_vcvtss2si32(A, B) __builtin_ia32_vcvtss2si32(A, 8)
+#define __builtin_ia32_vcvtss2si64(A, B) __builtin_ia32_vcvtss2si64(A, 8)
+#define __builtin_ia32_vcvtss2usi32(A, B) __builtin_ia32_vcvtss2usi32(A, 8)
+#define __builtin_ia32_vcvtss2usi64(A, B) __builtin_ia32_vcvtss2usi64(A, 8)
+#define __builtin_ia32_vcvttsd2si32(A, B) __builtin_ia32_vcvttsd2si32(A, 8)
+#define __builtin_ia32_vcvttsd2si64(A, B) __builtin_ia32_vcvttsd2si64(A, 8)
+#define __builtin_ia32_vcvttsd2usi32(A, B) __builtin_ia32_vcvttsd2usi32(A, 8)
+#define __builtin_ia32_vcvttsd2usi64(A, B) __builtin_ia32_vcvttsd2usi64(A, 8)
+#define __builtin_ia32_vcvttss2si32(A, B) __builtin_ia32_vcvttss2si32(A, 8)
+#define __builtin_ia32_vcvttss2si64(A, B) __builtin_ia32_vcvttss2si64(A, 8)
+#define __builtin_ia32_vcvttss2usi32(A, B) __builtin_ia32_vcvttss2usi32(A, 8)
+#define __builtin_ia32_vcvttss2usi64(A, B) __builtin_ia32_vcvttss2usi64(A, 8)
+#define __builtin_ia32_vfmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsd3_round(A, B, C, D) __builtin_ia32_vfmaddsd3_round(A, B, C, 8)
+#define __builtin_ia32_vfmaddss3_round(A, B, C, D) __builtin_ia32_vfmaddss3_round(A, B, C, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubsd3_mask3(A, B, C, D, E) __builtin_ia32_vfmsubsd3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubss3_mask3(A, B, C, D, E) __builtin_ia32_vfmsubss3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vpermilpd512_mask(A, E, C, D) __builtin_ia32_vpermilpd512_mask(A, 1, C, D)
+#define __builtin_ia32_vpermilps512_mask(A, E, C, D) __builtin_ia32_vpermilps512_mask(A, 1, C, D)
+
+/* avx512erintrin.h */
+#define __builtin_ia32_exp2ps_mask(A, B, C, D) __builtin_ia32_exp2ps_mask(A, B, C, 8)
+#define __builtin_ia32_exp2pd_mask(A, B, C, D) __builtin_ia32_exp2pd_mask(A, B, C, 8)
+#define __builtin_ia32_rcp28ps_mask(A, B, C, D) __builtin_ia32_rcp28ps_mask(A, B, C, 8)
+#define __builtin_ia32_rcp28pd_mask(A, B, C, D) __builtin_ia32_rcp28pd_mask(A, B, C, 8)
+#define __builtin_ia32_rsqrt28ps_mask(A, B, C, D) __builtin_ia32_rsqrt28ps_mask(A, B, C, 8)
+#define __builtin_ia32_rsqrt28pd_mask(A, B, C, D) __builtin_ia32_rsqrt28pd_mask(A, B, C, 8)
+#define __builtin_ia32_rcp28ss_round(A, B, C) __builtin_ia32_rcp28ss_round(A, B, 8)
+#define __builtin_ia32_rcp28sd_round(A, B, C) __builtin_ia32_rcp28sd_round(A, B, 8)
+#define __builtin_ia32_rsqrt28ss_round(A, B, C) __builtin_ia32_rsqrt28ss_round(A, B, 8)
+#define __builtin_ia32_rsqrt28sd_round(A, B, C) __builtin_ia32_rsqrt28sd_round(A, B, 8)
+
+/* avx512pfintrin.h */
+#define __builtin_ia32_gatherpfdps(A, B, C, D, E) __builtin_ia32_gatherpfdps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfqps(A, B, C, D, E) __builtin_ia32_gatherpfqps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfdps(A, B, C, D, E) __builtin_ia32_scatterpfdps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfqps(A, B, C, D, E) __builtin_ia32_scatterpfqps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfdpd(A, B, C, D, E) __builtin_ia32_gatherpfdpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfqpd(A, B, C, D, E) __builtin_ia32_gatherpfqpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfdpd(A, B, C, D, E) __builtin_ia32_scatterpfdpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfqpd(A, B, C, D, E) __builtin_ia32_scatterpfqpd(A, B, C, 1, _MM_HINT_T0)
+
+/* shaintrin.h */
+#define __builtin_ia32_sha1rnds4(A, B, C) __builtin_ia32_sha1rnds4(A, B, 1)
+
#include <wmmintrin.h>
#include <immintrin.h>
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/avx-additional-reg-names.c b/gcc/testsuite/gcc.target/i386/avx-additional-reg-names.c
new file mode 100644
index 0000000000..d984bff44a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-additional-reg-names.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx" } */
+
+void foo ()
+{
+ register int ymm_var asm ("ymm4");
+
+ __asm__ __volatile__("vxorpd %%ymm0, %%ymm0, %%ymm7\n" : : : "ymm7" );
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-inline.c b/gcc/testsuite/gcc.target/i386/avx-inline.c
new file mode 100644
index 0000000000..05df95e052
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-inline.c
@@ -0,0 +1,20 @@
+/* Check if avx target functions can inline lower target functions. */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mno-avx -mno-sse3" } */
+
+__attribute__((always_inline,target("sse3")))
+inline int callee ()
+{
+ return 0;
+}
+
+__attribute__((target("avx")))
+inline int caller ()
+{
+ return callee ();
+}
+
+int main ()
+{
+ return caller ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-os-support.h b/gcc/testsuite/gcc.target/i386/avx-os-support.h
index 21d332f7d3..fb1ce7562d 100644
--- a/gcc/testsuite/gcc.target/i386/avx-os-support.h
+++ b/gcc/testsuite/gcc.target/i386/avx-os-support.h
@@ -1,10 +1,18 @@
/* Check if the OS supports executing AVX instructions. */
+#define XCR_XFEATURE_ENABLED_MASK 0x0
+
+#define XSTATE_FP 0x1
+#define XSTATE_SSE 0x2
+#define XSTATE_YMM 0x4
+
static int
avx_os_support (void)
{
unsigned int eax, edx;
+ unsigned int ecx = XCR_XFEATURE_ENABLED_MASK;
+
+ __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (ecx));
- __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
- return (eax & 6) == 6;
+ return (eax & (XSTATE_SSE | XSTATE_YMM)) == (XSTATE_SSE | XSTATE_YMM);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx-pr51581-1.c b/gcc/testsuite/gcc.target/i386/avx-pr51581-1.c
new file mode 100644
index 0000000000..a1d84bf684
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-pr51581-1.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/51581 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx } */
+
+#ifndef CHECK_H
+#define CHECK_H "avx-check.h"
+#endif
+#ifndef TEST
+#define TEST avx_test
+#endif
+
+#define main main1
+#include "../../gcc.c-torture/execute/pr51581-1.c"
+#undef main
+
+#include CHECK_H
+
+static void
+TEST (void)
+{
+ main1 ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-pr51581-2.c b/gcc/testsuite/gcc.target/i386/avx-pr51581-2.c
new file mode 100644
index 0000000000..6ff54d997d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-pr51581-2.c
@@ -0,0 +1,23 @@
+/* PR tree-optimization/51581 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -mavx -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx } */
+
+#ifndef CHECK_H
+#define CHECK_H "avx-check.h"
+#endif
+#ifndef TEST
+#define TEST avx_test
+#endif
+
+#define main main1
+#include "../../gcc.c-torture/execute/pr51581-2.c"
+#undef main
+
+#include CHECK_H
+
+static void
+TEST (void)
+{
+ main1 ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx-pr57233.c b/gcc/testsuite/gcc.target/i386/avx-pr57233.c
new file mode 100644
index 0000000000..ffc71d908a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx } } */
+/* { dg-options "-O2 -mavx" } */
+
+#include "avx-check.h"
+
+static void
+avx_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-1.c b/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-1.c
index d912122830..cc524c8a64 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-1.c
@@ -15,7 +15,7 @@ void static
avx_test (void)
{
union256d u;
- double e [4] __attribute__ ((aligned (8))) = {41124.234,2344.2354,8653.65635,856.43576};
+ double e [4] __attribute__ ((aligned (32))) = {41124.234,2344.2354,8653.65635,856.43576};
u.x = test (e);
diff --git a/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-2.c b/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-2.c
index 96a664ac11..9224484cac 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vmovapd-256-2.c
@@ -15,7 +15,7 @@ void static
avx_test (void)
{
union256d u;
- double e [4] __attribute__ ((aligned (8))) = {0.0};
+ double e [4] __attribute__ ((aligned (32))) = {0.0};
u.x = _mm256_set_pd (39578.467285, 7856.342941, 85632.783567, 47563.234215);
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-10.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-10.c
index 667bb17180..5007753a0b 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-10.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-10.c
@@ -14,4 +14,4 @@ foo ()
_mm256_zeroupper ();
}
-/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 3 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-11.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-11.c
index d98ceb9201..507f945439 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-11.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-11.c
@@ -16,4 +16,4 @@ foo ()
}
/* { dg-final { scan-assembler-times "\\*avx_vzeroall" 1 } } */
-/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 3 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-12.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-12.c
index f74ea0c2cd..e694d4048b 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-12.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-12.c
@@ -16,5 +16,5 @@ foo ()
_mm256_zeroupper ();
}
-/* { dg-final { scan-assembler-times "avx_vzeroupper" 1 } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 4 } } */
/* { dg-final { scan-assembler-times "\\*avx_vzeroall" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-16.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-16.c
index bc6e0d23c7..66c8446686 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-16.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-16.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c
index 5d3aa48397..acb432945e 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-17.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O2 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O2 -mavx -mabi=ms -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-18.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-18.c
index 06307525d4..6f67f3ee32 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-18.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-18.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target lp64 } } */
-/* { dg-options "-O0 -mavx -mabi=ms -mtune=generic -dp" } */
+/* { dg-options "-O0 -mavx -mabi=ms -dp" } */
typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
index 602de87f54..ae2f8611ea 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-19.c
@@ -14,4 +14,4 @@ void feat_s3_cep_dcep (int cepsize_used, float **mfc, float **feat)
f[i] = w[i] - _w[i];
}
-/* { dg-final { scan-assembler-times "avx_vzeroupper" 1 } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-27.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-27.c
new file mode 100644
index 0000000000..7fa5de4376
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-27.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx -mtune=generic -dp" } */
+
+typedef struct objc_class *Class;
+typedef struct objc_object
+{
+ Class class_pointer;
+} *id;
+
+typedef const struct objc_selector *SEL;
+typedef void * retval_t;
+typedef void * arglist_t;
+
+extern retval_t __objc_forward (id object, SEL sel, arglist_t args);
+
+double
+__objc_double_forward (id rcv, SEL op, ...)
+{
+ void *args, *res;
+
+ args = __builtin_apply_args ();
+ res = __objc_forward (rcv, op, args);
+ __builtin_return (res);
+}
+
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 2 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c
index 0f54602b8c..ba08978ab4 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-5.c
@@ -14,4 +14,4 @@ foo ()
_mm256_zeroupper ();
}
-/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-8.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-8.c
index 0a821c24a8..bb370c5b44 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-8.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-8.c
@@ -13,4 +13,4 @@ foo ()
_mm256_zeroupper ();
}
-/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-9.c b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-9.c
index 5aa05b8390..974e1626a6 100644
--- a/gcc/testsuite/gcc.target/i386/avx-vzeroupper-9.c
+++ b/gcc/testsuite/gcc.target/i386/avx-vzeroupper-9.c
@@ -15,4 +15,4 @@ foo ()
_mm256_zeroupper ();
}
-/* { dg-final { scan-assembler-times "avx_vzeroupper" 1 } } */
+/* { dg-final { scan-assembler-times "avx_vzeroupper" 4 } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-gather-5.c b/gcc/testsuite/gcc.target/i386/avx2-gather-5.c
new file mode 100644
index 0000000000..892a20034e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-gather-5.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx2 } */
+/* { dg-options "-O3 -mavx2 -fno-common" } */
+
+#include "avx2-check.h"
+
+#define N 1024
+float vf1[N+16], vf2[N], vf3[N];
+int k[N];
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ float f;
+ if (vf3[i] < 0.0f)
+ f = vf1[k[i]];
+ else
+ f = 7.0f;
+ vf2[i] = f;
+ }
+}
+
+static void
+avx2_test (void)
+{
+ int i;
+ for (i = 0; i < N + 16; i++)
+ {
+ vf1[i] = 5.5f * i;
+ if (i >= N)
+ continue;
+ vf2[i] = 2.0f;
+ vf3[i] = (i & 1) ? i : -i - 1;
+ k[i] = (i & 1) ? ((i & 2) ? -i : N / 2 + i) : (i * 7) % N;
+ asm ("");
+ }
+ foo ();
+ for (i = 0; i < N; i++)
+ if (vf1[i] != 5.5 * i
+ || vf2[i] != ((i & 1) ? 7.0f : 5.5f * ((i * 7) % N))
+ || vf3[i] != ((i & 1) ? i : -i - 1)
+ || k[i] != ((i & 1) ? ((i & 2) ? -i : N / 2 + i) : ((i * 7) % N)))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx2-gather-6.c b/gcc/testsuite/gcc.target/i386/avx2-gather-6.c
new file mode 100644
index 0000000000..38e2009da7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-gather-6.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx2 -fno-common -fdump-tree-vect-details" } */
+
+#include "avx2-gather-5.c"
+
+/* { dg-final { scan-tree-dump-times "note: vectorized 1 loops in function" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-pr51581-1.c b/gcc/testsuite/gcc.target/i386/avx2-pr51581-1.c
new file mode 100644
index 0000000000..74d507fd9b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-pr51581-1.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/51581 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -mavx2 -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx2 } */
+
+#define CHECK_H "avx2-check.h"
+#define TEST avx2_test
+
+#include "avx-pr51581-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx2-pr51581-2.c b/gcc/testsuite/gcc.target/i386/avx2-pr51581-2.c
new file mode 100644
index 0000000000..bf063c2ef3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-pr51581-2.c
@@ -0,0 +1,9 @@
+/* PR tree-optimization/51581 */
+/* { dg-do run } */
+/* { dg-options "-O2 -ftree-vectorize -mavx2 -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx2 } */
+
+#define CHECK_H "avx2-check.h"
+#define TEST avx2_test
+
+#include "avx-pr51581-2.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx2-pr57233.c b/gcc/testsuite/gcc.target/i386/avx2-pr57233.c
new file mode 100644
index 0000000000..3fb2608ab1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx2-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx2 } } */
+/* { dg-options "-O2 -mavx2" } */
+
+#include "avx2-check.h"
+
+static void
+avx2_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-1.c b/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-1.c
index c0592d5086..7805e3ddbc 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-1.c
@@ -10,5 +10,5 @@ __m128i y;
void extern
avx2_test (void)
{
- x = _mm_broadcastsi128_si256 (y);
+ x = _mm256_broadcastsi128_si256 (y);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-2.c b/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-2.c
index 6d3af38ff2..ef1d370ab4 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vbroadcastsi128-2.c
@@ -19,7 +19,7 @@ avx2_test (void)
for (j = 0; j < 2; j++)
s1.a[j] = j * i;
- res.x = _mm_broadcastsi128_si256 (s1.x);
+ res.x = _mm256_broadcastsi128_si256 (s1.x);
memcpy (res_ref, s1.a, 16);
memcpy (res_ref + 2, s1.a, 16);
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
index 238f020921..ee1f313565 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddb-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
index c57ef8fea3..5c3f22f49c 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddd-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
index 801bd39d82..41a07d26d4 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddq-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
index facee9f2d5..7e7e018c10 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpaddw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
index 67ca4a7cda..8c08bf5ced 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpand-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpblendd128-1.c b/gcc/testsuite/gcc.target/i386/avx2-vpblendd128-1.c
index 92f7e1b8e2..a3fea9554e 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpblendd128-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpblendd128-1.c
@@ -5,9 +5,10 @@
#include <immintrin.h>
__m128i x;
+__m128i y;
void extern
avx2_test (void)
{
- x = _mm_blend_epi32 (x, x, 13);
+ x = _mm_blend_epi32 (x, y, 13);
}
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
index b2d539ba49..8e33a986fb 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpmulld-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
index 46d173fc37..4d61d7a9ff 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpmullw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h b/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
index 143b54dae0..204b11cb3e 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpop-check.h
@@ -47,7 +47,9 @@ avx2_test (void)
gen_pop ();
check_pop ();
- if (memcmp (c, c_ref, SIZE * sizeof (TYPE)))
+ /* We need to cast away volatility from c_ref here in order to eliminate
+ warning if libc version of memcpy is used here. */
+ if (memcmp (c, (void *) c_ref, SIZE * sizeof (TYPE)))
abort();
}
}
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
index 97affb4bb7..a788681c0f 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrad-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
index e7112565b3..70bd5cd6bf 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsraw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
index 97affb4bb7..a788681c0f 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrld-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
index 67f3afc413..691e02f3fa 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsrlw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
index 843128b4f2..45527f5241 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubb-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
index f8f399f6b0..ae7966fbcc 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubd-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
index 0a23a280e5..d96fee1779 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubq-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
index 1cb90b5a8e..404c2eea99 100644
--- a/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx2-vpsubw-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-mavx2 -O2 -ftree-vectorize -save-temps" } */
+/* { dg-options "-mavx2 -mno-prefer-avx128 -O2 -ftree-vectorize -save-temps" } */
/* { dg-require-effective-target avx2 } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
index e7eef6d7a9..0c476cd78f 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load -mno-prefer-avx128" } */
#define N 1024
@@ -14,6 +14,6 @@ avx_test (void)
c[i] = a[i] * b[i+3];
}
-/* { dg-final { scan-assembler-not "avx_loadups256" } } */
-/* { dg-final { scan-assembler "sse_loadups" } } */
+/* { dg-final { scan-assembler-not "(avx_loadups256|vmovups\[^\n\r]*movv8sf_internal)" } } */
+/* { dg-final { scan-assembler "(sse_loadups|movv4sf_internal)" } } */
/* { dg-final { scan-assembler "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
index 3f4fbf7647..30b42aa38c 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-2.c
@@ -1,29 +1,15 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target lp64 } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load" } */
-
-#define N 1024
-
-char **ep;
-char **fp;
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-load -mno-prefer-avx128" } */
void
-avx_test (void)
+avx_test (char **cp, char **ep)
{
int i;
- char **ap;
- char **bp;
- char **cp;
-
- ap = ep;
- bp = fp;
- for (i = 128; i >= 0; i--)
- {
- *ap++ = *cp++;
- *bp++ = 0;
- }
+ char **ap = __builtin_assume_aligned (ep, 32);
+ for (i = 128; i > 0; i--)
+ *ap++ = *cp++;
}
-/* { dg-final { scan-assembler-not "avx_loaddqu256" } } */
-/* { dg-final { scan-assembler "sse2_loaddqu" } } */
+/* { dg-final { scan-assembler-not "(avx_loaddqu256|vmovdqu\[^\n\r]*movv32qi_internal)" } } */
+/* { dg-final { scan-assembler "(sse2_loaddqu|vmovdqu\[^\n\r]*movv16qi_internal)" } } */
/* { dg-final { scan-assembler "vinsert.128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
index b0e0e79bdd..fe66e0b171 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-3.c
@@ -14,6 +14,6 @@ avx_test (void)
c[i] = a[i] * b[i+3];
}
-/* { dg-final { scan-assembler-not "avx_loadupd256" } } */
-/* { dg-final { scan-assembler "sse2_loadupd" } } */
+/* { dg-final { scan-assembler-not "(avx_loadupd256|vmovupd\[^\n\r]*movv4df_internal)" } } */
+/* { dg-final { scan-assembler "(sse2_loadupd|vmovupd\[^\n\r]*movv2df_internal)" } } */
/* { dg-final { scan-assembler "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
index b3927be70a..dcd630d450 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-load-4.c
@@ -1,9 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store" } */
+/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
-float a[N], b[N+3];
+float a[N+3], b[N];
void
avx_test (void)
@@ -14,6 +14,6 @@ avx_test (void)
b[i] = a[i+3] * 2;
}
-/* { dg-final { scan-assembler "avx_loadups256" } } */
-/* { dg-final { scan-assembler-not "sse_loadups" } } */
+/* { dg-final { scan-assembler "(avx_loadups256|vmovups\[^\n\r]*movv8sf_internal)" } } */
+/* { dg-final { scan-assembler-not "(sse_loadups|vmovups\[^\n\r]*movv4sf_internal)" } } */
/* { dg-final { scan-assembler-not "vinsertf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
index 1a53ba14a0..5e8c30d362 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
index e98d1b684d..eeabfe9f3d 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-2.c
@@ -1,6 +1,5 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target lp64 } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store" } */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mno-prefer-avx128" } */
#define N 1024
@@ -25,5 +24,5 @@ avx_test (void)
}
/* { dg-final { scan-assembler-not "avx_storedqu256" } } */
-/* { dg-final { scan-assembler "vmovdqu.*\\*movv16qi_internal/3" } } */
+/* { dg-final { scan-assembler "vmovups.*\\*movv16qi_internal/3" } } */
/* { dg-final { scan-assembler "vextract.128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
index 26c993be7e..6175d52176 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mtune=generic" } */
+/* { dg-options "-O3 -dp -mavx -mavx256-split-unaligned-store -mtune=generic -fno-common" } */
#define N 1024
@@ -18,5 +18,5 @@ avx_test (void)
}
/* { dg-final { scan-assembler-not "avx_storeupd256" } } */
-/* { dg-final { scan-assembler "vmovupd.*\\*movv2df_internal/3" } } */
+/* { dg-final { scan-assembler "vmovups.*\\*movv2df_internal/3" } } */
/* { dg-final { scan-assembler "vextractf128" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
index 6d734faa25..68ff923103 100644
--- a/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
+++ b/gcc/testsuite/gcc.target/i386/avx256-unaligned-store-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store" } */
+/* { dg-options "-O3 -dp -mavx -mno-avx256-split-unaligned-load -mno-avx256-split-unaligned-store -mno-prefer-avx128 -fno-common" } */
#define N 1024
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-check.h b/gcc/testsuite/gcc.target/i386/avx512cd-check.h
new file mode 100644
index 0000000000..bccf8b48e0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-check.h
@@ -0,0 +1,46 @@
+#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) == (bit_OSXSAVE))
+ {
+ if (__get_cpuid_max (0, NULL) < 7)
+ return 0;
+
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ if ((avx512f_os_support ()) && ((ebx & (bit_AVX512CD)) == (bit_AVX512CD)))
+ {
+ 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/avx512cd-vpbroadcastmb2q-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c
new file mode 100644
index 0000000000..036031b765
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler "vpbroadcastmb2q\[ \\t\]+\[^\n\]*k\[1-7\]\[^\n\]*%zmm\[0-7\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m8;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastmb_epi64 (m8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c
new file mode 100644
index 0000000000..05f4bfc425
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmb2q-2.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+
+CALC (long long *res, __mmask8 src)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ res[i] = src;
+}
+
+static void
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res;
+ long long res_ref[SIZE];
+ __mmask8 src;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res.a[i] = -1;
+ }
+
+ res.x = INTRINSIC (_broadcastmb_epi64) (src);
+
+ CALC (res_ref, src);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c
new file mode 100644
index 0000000000..36abb5e7bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler "vpbroadcastmw2d\[ \\t\]+\[^\n\]*k\[1-7\]\[^\n\]*%zmm\[0-7\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m16;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastmw_epi32 (m16);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c
new file mode 100644
index 0000000000..7282110ab3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpbroadcastmw2d-2.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+
+CALC (int *res, __mmask16 src)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ res[i] = src;
+}
+
+static void
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) res;
+ int res_ref[SIZE];
+ __mmask16 src;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res.a[i] = -1;
+ }
+
+ res.x = INTRINSIC (_broadcastmw_epi32) (src);
+
+ CALC (res_ref, src);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-1.c
new file mode 100644
index 0000000000..d3f2a258db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler-times "vpconflictd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpconflictd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpconflictd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512i res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_conflict_epi32 (s);
+ res = _mm512_mask_conflict_epi32 (res, 2, s);
+ res = _mm512_maskz_conflict_epi32 (2, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-2.c
new file mode 100644
index 0000000000..16597fbafb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictd-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s, int *r)
+{
+ int i, j;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 0;
+ for (j = 0; j < i; j++)
+ {
+ r[i] |= s[j] == s[i] ? 1 << j : 0;
+ }
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s, res1, res2, res3;
+ int res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 1234 * (i % 5);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_conflict_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_conflict_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_conflict_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-1.c
new file mode 100644
index 0000000000..795fa6add4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler-times "vpconflictq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpconflictq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpconflictq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512i res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_conflict_epi64 (s);
+ res = _mm512_mask_conflict_epi64 (res, 2, s);
+ res = _mm512_maskz_conflict_epi64 (2, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-2.c
new file mode 100644
index 0000000000..a2695195c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vpconflictq-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s, long long *r)
+{
+ int i, j;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 0;
+ for (j = 0; j < i; j++)
+ {
+ r[i] |= s[i] == s[j] ? 1 << j : 0;
+ }
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s, res1, res2, res3;
+ long long res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345678 * (i % 5);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_conflict_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_conflict_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_conflict_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-1.c
new file mode 100644
index 0000000000..65a2a32751
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1} } */
+/* { dg-final { scan-assembler-times "vplzcntd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512i res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_lzcnt_epi32 (s);
+ res = _mm512_mask_lzcnt_epi32 (res, 2, s);
+ res = _mm512_maskz_lzcnt_epi32 (2, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-2.c
new file mode 100644
index 0000000000..0a357b69fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntd-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include <strings.h>
+
+static void
+CALC (int *s, int *r)
+{
+ int i, res;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res = 0;
+ while ((res < 32) && (((s[i] >> (31 - res)) & 1) == 0))
+ ++res;
+ r[i] = res;
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s, res1, res2, res3;
+ int res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345678 * (i % 5);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_lzcnt_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_lzcnt_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_lzcnt_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-1.c b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-1.c
new file mode 100644
index 0000000000..0324cd0c2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512cd -O2" } */
+/* { dg-final { scan-assembler-times "vplzcntq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vplzcntq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vplzcntq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512i res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_lzcnt_epi64 (s);
+ res = _mm512_maskz_lzcnt_epi64 (2, s);
+ res = _mm512_mask_lzcnt_epi64 (res, 2, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-2.c b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-2.c
new file mode 100644
index 0000000000..f0cc40304c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512cd-vplzcntq-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512cd" } */
+/* { dg-require-effective-target avx512cd } */
+
+#define HAVE_512
+#define AVX512CD
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <strings.h>
+
+static void
+CALC (long long *s, long long *r)
+{
+ int i, res;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res = 0;
+ while ((res < 64) && (((s[i] >> (63 - res)) & 1) == 0))
+ ++res;
+ r[i] = res;
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s, res1, res2, res3;
+ long long res_ref[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345678 * (i % 5);
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_lzcnt_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_lzcnt_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_lzcnt_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-check.h b/gcc/testsuite/gcc.target/i386/avx512er-check.h
new file mode 100644
index 0000000000..34440d346b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-check.h
@@ -0,0 +1,46 @@
+#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) == (bit_OSXSAVE))
+ {
+ if (__get_cpuid_max (0, NULL) < 7)
+ return 0;
+
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ if ((avx512f_os_support ()) && ((ebx & bit_AVX512ER) == bit_AVX512ER))
+ {
+ 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/avx512er-vexp2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-1.c
new file mode 100644
index 0000000000..22c086d5a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vexp2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_exp2a23_pd (x);
+ x = _mm512_mask_exp2a23_pd (x, m, x);
+ x = _mm512_maskz_exp2a23_pd (m, x);
+ x = _mm512_exp2a23_round_pd (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_exp2a23_round_pd (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_exp2a23_round_pd (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-2.c
new file mode 100644
index 0000000000..ce4e86c1f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vexp2pd-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+compute_vexp2pd (double *s, double *r)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ r[i] = pow (2.0, s[i]);
+}
+
+void static
+avx512er_test (void)
+{
+ union512d src, res1, res2, res3;
+ __mmask8 mask = MASK_VALUE;
+ double res_ref[8];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 179.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_exp2a23_pd (src.x);
+ res2.x = _mm512_mask_exp2a23_pd (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_exp2a23_pd (mask, src.x);
+
+ compute_vexp2pd (src.a, res_ref);
+
+ if (check_rough_union512d (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-1.c
new file mode 100644
index 0000000000..9d1178e553
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vexp2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_exp2a23_ps (x);
+ x = _mm512_mask_exp2a23_ps (x, m, x);
+ x = _mm512_maskz_exp2a23_ps (m, x);
+ x = _mm512_exp2a23_round_ps (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_exp2a23_round_ps (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_exp2a23_round_ps (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-2.c
new file mode 100644
index 0000000000..ab911c017a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vexp2ps-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+compute_vexp2ps (float *s, float *r)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ r[i] = pow (2.0, s[i]);
+}
+
+void static
+avx512er_test (void)
+{
+ union512 src, res1, res2, res3;
+ __mmask16 mask = MASK_VALUE;
+ float res_ref[16];
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ src.a[i] = 79.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_exp2a23_ps (src.x);
+ res2.x = _mm512_mask_exp2a23_ps (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_exp2a23_ps (mask, src.x);
+
+ compute_vexp2ps (src.a, res_ref);
+
+ if (check_rough_union512 (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, 16);
+ if (check_rough_union512 (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, 16);
+ if (check_rough_union512 (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-1.c
new file mode 100644
index 0000000000..505c0eb9e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_rcp28_pd (x);
+ x = _mm512_mask_rcp28_pd (x, m, x);
+ x = _mm512_maskz_rcp28_pd (m, x);
+ x = _mm512_rcp28_round_pd (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_rcp28_round_pd (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_rcp28_round_pd (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-2.c
new file mode 100644
index 0000000000..609aeaa31c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28pd-2.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+void static
+compute_vrcp28pd (double *s, double *r)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ r[i] = 1.0 / s[i];
+}
+
+void static
+avx512er_test (void)
+{
+ union512d src, res1, res2, res3;
+ __mmask8 mask = MASK_VALUE;
+ double res_ref[8];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 179.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_rcp28_pd (src.x);
+ res2.x = _mm512_mask_rcp28_pd (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_rcp28_pd (mask, src.x);
+
+ compute_vrcp28pd (src.a, res_ref);
+
+ if (check_rough_union512d (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-1.c
new file mode 100644
index 0000000000..e9245bad4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_rcp28_ps (x);
+ x = _mm512_mask_rcp28_ps (x, m, x);
+ x = _mm512_maskz_rcp28_ps (m, x);
+ x = _mm512_rcp28_round_ps (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_rcp28_round_ps (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_rcp28_round_ps (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-2.c
new file mode 100644
index 0000000000..4059e0e7f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ps-2.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+void static
+compute_vrcp28ps (float *s, float *r)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ r[i] = 1.0 / s[i];
+}
+
+void static
+avx512er_test (void)
+{
+ union512 src, res1, res2, res3;
+ __mmask16 mask = MASK_VALUE;
+ float res_ref[16];
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ src.a[i] = 179.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_rcp28_ps (src.x);
+ res2.x = _mm512_mask_rcp28_ps (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_rcp28_ps (mask, src.x);
+
+ compute_vrcp28ps (src.a, res_ref);
+
+ if (check_rough_union512 (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, 16);
+ if (check_rough_union512 (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, 16);
+ if (check_rough_union512 (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-1.c
new file mode 100644
index 0000000000..d09ba57111
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrcp28sd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28sd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]*\n" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x, y;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm_rcp28_sd (x, y);
+ x = _mm_rcp28_round_sd (x, y, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-2.c
new file mode 100644
index 0000000000..889f990acf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28sd-2.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+avx512er_test (void)
+{
+ union128d src1, src2, res;
+ double res_ref[2];
+ int i;
+
+ for (i = 0; i < 2; i++)
+ {
+ src1.a[i] = 179.345 - 6.5645 * i;
+ src2.a[i] = 204179.345 + 6.5645 * i;
+ res_ref[i] = src1.a[i];
+ }
+
+ res_ref[0] = 1.0 / src2.a[0];
+
+ res.x = _mm_rcp28_round_sd (src1.x, src2.x, _MM_FROUND_NO_EXC);
+
+ if (checkVd (res.a, res_ref, 2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-1.c
new file mode 100644
index 0000000000..3f5ccea150
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrcp28ss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrcp28ss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]*\n" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x, y;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm_rcp28_ss (x, y);
+ x = _mm_rcp28_round_ss (x, y, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-2.c
new file mode 100644
index 0000000000..3280879107
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrcp28ss-2.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+avx512er_test (void)
+{
+ union128 src1, src2, res;
+ float res_ref[4];
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ src1.a[i] = 179.345 - 6.5645 * i;
+ src2.a[i] = 179345.006 + 6.5645 * i;
+ res_ref[i] = src1.a[i];
+ }
+
+ res_ref[0] = 1.0 / src2.a[0];
+
+ res.x = _mm_rcp28_round_ss (src1.x, src2.x, _MM_FROUND_NO_EXC);
+
+ if (checkVf (res.a, res_ref, 4))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-1.c
new file mode 100644
index 0000000000..5d264ac73f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_rsqrt28_pd (x);
+ x = _mm512_mask_rsqrt28_pd (x, m, x);
+ x = _mm512_maskz_rsqrt28_pd (m, x);
+ x = _mm512_rsqrt28_round_pd (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_rsqrt28_round_pd (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_rsqrt28_round_pd (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-2.c
new file mode 100644
index 0000000000..84a66addd5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28pd-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+compute_vrsqrt28pd (double *s, double *r)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ r[i] = 1.0 / sqrt (s[i]);
+}
+
+void static
+avx512er_test (void)
+{
+ union512d src, res1, res2, res3;
+ __mmask8 mask = MASK_VALUE;
+ double res_ref[8];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 179.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_rsqrt28_pd (src.x);
+ res2.x = _mm512_mask_rsqrt28_pd (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_rsqrt28_pd (mask, src.x);
+
+ compute_vrsqrt28pd (src.a, res_ref);
+
+ if (check_rough_union512d (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 8);
+ if (check_rough_union512d (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-1.c
new file mode 100644
index 0000000000..bfdb9ac6ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]*\n" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm512_rsqrt28_ps (x);
+ x = _mm512_mask_rsqrt28_ps (x, m, x);
+ x = _mm512_maskz_rsqrt28_ps (m, x);
+ x = _mm512_rsqrt28_round_ps (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_rsqrt28_round_ps (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_rsqrt28_round_ps (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-2.c
new file mode 100644
index 0000000000..a92472e619
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ps-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+compute_vrsqrt28ps (float *s, float *r)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ r[i] = 1.0 / sqrt (s[i]);
+}
+
+void static
+avx512er_test (void)
+{
+ union512 src, res1, res2, res3;
+ __mmask16 mask = MASK_VALUE;
+ float res_ref[16];
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ src.a[i] = 179.345 - 6.5645 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_rsqrt28_ps (src.x);
+ res2.x = _mm512_mask_rsqrt28_ps (res2.x, mask, src.x);
+ res3.x = _mm512_maskz_rsqrt28_ps (mask, src.x);
+
+ compute_vrsqrt28ps (src.a, res_ref);
+
+ if (check_rough_union512 (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, 16);
+ if (check_rough_union512 (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, 16);
+ if (check_rough_union512 (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-1.c
new file mode 100644
index 0000000000..59dff784eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt28sd\[ \\t\]+\[^\{^\n\]*%xmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28sd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x, y;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm_rsqrt28_sd (x, y);
+ x = _mm_rsqrt28_round_sd (x, y, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-2.c
new file mode 100644
index 0000000000..bd217e8228
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28sd-2.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+avx512er_test (void)
+{
+ union128d src1, src2, res;
+ double res_ref[2];
+ int i;
+
+ for (i = 0; i < 2; i++)
+ {
+ src1.a[i] = 179.345 - 6.5645 * i;
+ src2.a[i] = 45 - 6.5645 * i;
+ res_ref[i] = src1.a[i];
+ }
+
+ res_ref[0] = 1.0 / sqrt (src2.a[0]);
+
+ res.x = _mm_rsqrt28_round_sd (src1.x, src2.x, _MM_FROUND_NO_EXC);
+
+ if (checkVd (res.a, res_ref, 2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-1.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-1.c
new file mode 100644
index 0000000000..a334375811
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512er -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt28ss\[ \\t\]+\[^\{^\n\]*%xmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt28ss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x, y;
+
+void extern
+avx512er_test (void)
+{
+ x = _mm_rsqrt28_ss (x, y);
+ x = _mm_rsqrt28_round_ss (x, y, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-2.c b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-2.c
new file mode 100644
index 0000000000..f7bfff5a50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512er-vrsqrt28ss-2.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512er } */
+/* { dg-options "-O2 -mavx512er" } */
+
+#include "avx512er-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+void static
+avx512er_test (void)
+{
+ union128 src1, src2, res;
+ float res_ref[4];
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ src1.a[i] = 179.345 - 6.5645 * i;
+ src2.a[i] = 179221345 + 6.5645 * i;
+ res_ref[i] = src1.a[i];
+ }
+
+ res_ref[0] = 1.0 / sqrt (src2.a[0]);
+
+ res.x = _mm_rsqrt28_round_ss (src1.x, src2.x, _MM_FROUND_NO_EXC);
+
+ if (checkVf (res.a, res_ref, 4))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c b/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c
new file mode 100644
index 0000000000..1bd428aed1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-additional-reg-names.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+void foo ()
+{
+ register int zmm_var asm ("zmm9");
+
+ __asm__ __volatile__("vxorpd %%zmm0, %%zmm0, %%zmm7\n" : : : "zmm7" );
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-1.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-1.c
new file mode 100644
index 0000000000..f550e22471
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+%r\[^\n\]+%zmm\[0-9\]\[^\{\]" 1 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+%e\[^\n\]+%zmm\[0-9\]\[^\{\]" 1 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\n\]+%zmm\[0-9\]\[^\{\]" 1 { target ia32 } } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\n\]+%zmm\[0-9\]\[^\{\]" 1 { target ia32 } } } */
+
+#include <x86intrin.h>
+
+__m512i
+foo_1 (long long y)
+{
+ return __extension__ (__m512i)(__v8di){ y, y, y, y, y, y, y, y };
+}
+
+__m512i
+foo_2 (int y)
+{
+ return __extension__ (__m512i)(__v16si){ y, y, y, y, y, y, y, y, y,
+ y, y, y, y, y, y, y };
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
new file mode 100644
index 0000000000..91665b299a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-broadcast-gpr-2.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-broadcast-gpr-1.c"
+
+void
+avx512f_test (void)
+{
+ union512i_q q;
+ union512i_d d;
+ int i;
+
+ q.x = foo_1 (3);
+ d.x = foo_2 (5);
+
+ for (i = 0; i < 8; i++)
+ {
+ if (q.a[i] != 3)
+ abort ();
+ }
+
+ for (i = 0; i < 16; i++)
+ {
+ if (d.a[i] != 5)
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
new file mode 100644
index 0000000000..038d25e358
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-1.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
+
+#include <math.h>
+#include "avx512f-check.h"
+
+extern double ceil (double);
+
+#define NUM 64
+
+static void
+__attribute__((__target__("fpmath=sse")))
+init_src (double *src)
+{
+ int i, sign = 1;
+ double f = rand ();
+
+ for (i = 0; i < NUM; i++)
+ {
+ src[i] = (i + 1) * f * M_PI * sign;
+ if (i < (NUM / 2))
+ {
+ if ((i % 6) == 0)
+ f = f * src[i];
+ }
+ else if (i == (NUM / 2))
+ f = rand ();
+ else if ((i % 6) == 0)
+ f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
+ sign = -sign;
+ }
+}
+
+static void
+__attribute__((__target__("fpmath=387")))
+avx512f_test (void)
+{
+ double a[NUM];
+ int r[NUM];
+ int i;
+
+ init_src (a);
+
+ for (i = 0; i < NUM; i++)
+ r[i] = (int) ceil (a[i]);
+
+ /* check results: */
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) ceil (a[i]))
+ abort();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-2.c b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-2.c
new file mode 100644
index 0000000000..8dafb1bf81
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-ceil-sfix-vec-2.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
+
+#include "avx512f-ceil-sfix-vec-1.c"
+
+/* { dg-final { scan-assembler "vrndscalepd\[^\n\]*zmm\[0-9\]" } } */
+/* { dg-final { scan-assembler "vcvttpd2dq\[^\n\]*zmm\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-check.h b/gcc/testsuite/gcc.target/i386/avx512f-check.h
new file mode 100644
index 0000000000..9e01367205
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-check.h
@@ -0,0 +1,47 @@
+#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) == (bit_OSXSAVE))
+ {
+ if (__get_cpuid_max (0, NULL) < 7)
+ return 0;
+
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ if ((avx512f_os_support ()) && ((ebx & bit_AVX512F) == bit_AVX512F))
+ {
+ 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/avx512f-dummy.c b/gcc/testsuite/gcc.target/i386/avx512f-dummy.c
new file mode 100644
index 0000000000..84b062789b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-dummy.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union512i_q u, s1, s2;
+ long long e[8];
+ volatile int tst = check_union512i_q (u, e);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
new file mode 100644
index 0000000000..fab7e6528a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-1.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-skip-if "no M_PI" { vxworks_kernel } } */
+
+#include <math.h>
+#include "avx512f-check.h"
+
+extern double floor (double);
+
+#define NUM 64
+
+static void
+__attribute__((__target__("fpmath=sse")))
+init_src (double *src)
+{
+ int i, sign = 1;
+ double f = rand ();
+
+ for (i = 0; i < NUM; i++)
+ {
+ src[i] = (i + 1) * f * M_PI * sign;
+ if (i < (NUM / 2))
+ {
+ if ((i % 6) == 0)
+ f = f * src[i];
+ }
+ else if (i == (NUM / 2))
+ f = rand ();
+ else if ((i % 6) == 0)
+ f = 1 / (f * (i + 1) * src[i] * M_PI * sign);
+ sign = -sign;
+ }
+}
+
+static void
+__attribute__((__target__("fpmath=387")))
+avx512f_test (void)
+{
+ double a[NUM];
+ int r[NUM];
+ int i;
+
+ init_src (a);
+
+ for (i = 0; i < NUM; i++)
+ r[i] = (int) floor (a[i]);
+
+ /* check results: */
+ for (i = 0; i < NUM; i++)
+ if (r[i] != (int) floor (a[i]))
+ abort();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-2.c b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-2.c
new file mode 100644
index 0000000000..90e625abcd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-floor-sfix-vec-2.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -mavx512f" } */
+
+#include "avx512f-floor-sfix-vec-1.c"
+
+/* { dg-final { scan-assembler "vrndscalepd\[^\n\]*zmm\[0-9\]" } } */
+/* { dg-final { scan-assembler "vcvttpd2dq\[^\n\]*zmm\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-1.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-1.c
new file mode 100644
index 0000000000..5ccb03a1f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-1.c
@@ -0,0 +1,217 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O3 -mavx512f" } */
+
+#include "avx512f-check.h"
+
+#define N 1024
+float vf1[N+16], vf2[N];
+double vd1[N+16], vd2[N];
+int vi1[N+16], vi2[N], k[N];
+long long vl1[N+16], vl2[N];
+long l[N];
+
+__attribute__((noinline, noclone)) void
+f1 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vf2[i] = vf1[k[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f2 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vi2[i] = vi1[k[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f3 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vf2[i] = vf1[k[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f4 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vi2[i] = vi1[k[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f5 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vd2[i] = vd1[k[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f6 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vl2[i] = vl1[k[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f7 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vd2[i] = vd1[k[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f8 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vl2[i] = vl1[k[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f9 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vf2[i] = vf1[l[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f10 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vi2[i] = vi1[l[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f11 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vf2[i] = vf1[l[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f12 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vi2[i] = vi1[l[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f13 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vd2[i] = vd1[l[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f14 (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vl2[i] = vl1[l[i]];
+}
+
+__attribute__((noinline, noclone)) void
+f15 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vd2[i] = vd1[l[i] + x];
+}
+
+__attribute__((noinline, noclone)) void
+f16 (int x)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ vl2[i] = vl1[l[i] + x];
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+
+ for (i = 0; i < N + 16; i++)
+ {
+ asm ("");
+ vf1[i] = 17.0f + i;
+ vd1[i] = 19.0 + i;
+ vi1[i] = 21 + i;
+ vl1[i] = 23L + i;
+ }
+ for (i = 0; i < N; i++)
+ {
+ asm ("");
+ k[i] = (i * 731) & (N - 1);
+ l[i] = (i * 657) & (N - 1);
+ }
+
+ f1 ();
+ f2 ();
+ for (i = 0; i < N; i++)
+ if (vf2[i] != ((i * 731) & (N - 1)) + 17
+ || vi2[i] != ((i * 731) & (N - 1)) + 21)
+ abort ();
+
+ f3 (12);
+ f4 (14);
+ for (i = 0; i < N; i++)
+ if (vf2[i] != ((i * 731) & (N - 1)) + 17 + 12
+ || vi2[i] != ((i * 731) & (N - 1)) + 21 + 14)
+ abort ();
+
+ f5 ();
+ f6 ();
+ for (i = 0; i < N; i++)
+ if (vd2[i] != ((i * 731) & (N - 1)) + 19
+ || vl2[i] != ((i * 731) & (N - 1)) + 23)
+ abort ();
+
+ f7 (6);
+ f8 (3);
+ for (i = 0; i < N; i++)
+ if (vd2[i] != ((i * 731) & (N - 1)) + 19 + 6
+ || vl2[i] != ((i * 731) & (N - 1)) + 23 + 3)
+ abort ();
+
+ f9 ();
+ f10 ();
+ for (i = 0; i < N; i++)
+ if (vf2[i] != ((i * 657) & (N - 1)) + 17
+ || vi2[i] != ((i * 657) & (N - 1)) + 21)
+ abort ();
+
+ f11 (7);
+ f12 (9);
+ for (i = 0; i < N; i++)
+ if (vf2[i] != ((i * 657) & (N - 1)) + 17 + 7
+ || vi2[i] != ((i * 657) & (N - 1)) + 21 + 9)
+ abort ();
+
+ f13 ();
+ f14 ();
+ for (i = 0; i < N; i++)
+ if (vd2[i] != ((i * 657) & (N - 1)) + 19
+ || vl2[i] != ((i * 657) & (N - 1)) + 23)
+ abort ();
+
+ f15 (2);
+ f16 (12);
+ for (i = 0; i < N; i++)
+ if (vd2[i] != ((i * 657) & (N - 1)) + 19 + 2
+ || vl2[i] != ((i * 657) & (N - 1)) + 23 + 12)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
new file mode 100644
index 0000000000..f20d3db228
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */ /* PR59617 */
+/* { dg-options "-O3 -mavx512f -fdump-tree-vect-details" } */
+
+#include "avx512f-gather-1.c"
+
+/* { dg-final { scan-assembler-not "gather\[^\n\]*ymm\[^\n\]*ymm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*xmm\[^\n\]*ymm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*ymm\[^\n\]*xmm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*xmm\[^\n\]*xmm" } } */
+/* { dg-final { scan-tree-dump-times "note: vectorized 1 loops in function" 16 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-3.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-3.c
new file mode 100644
index 0000000000..5e20dd8898
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-3.c
@@ -0,0 +1,169 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O3 -mavx512f -ffast-math" } */
+
+#include "avx512f-check.h"
+
+#define N 1024
+float f[N];
+double d[N];
+int k[N];
+float *l[N];
+double *n[N];
+int **m[N];
+long q[N];
+long long **o[N];
+long long t[N];
+long long *r[N];
+int *s[N];
+
+__attribute__((noinline, noclone)) float
+f1 (void)
+{
+ int i;
+ float g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += f[k[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) float
+f2 (float *p)
+{
+ int i;
+ float g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += p[k[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) float
+f3 (void)
+{
+ int i;
+ float g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += *l[i];
+ return g;
+}
+
+__attribute__((noinline, noclone)) int
+f4 (void)
+{
+ int i;
+ int g = 0;
+ for (i = 0; i < N / 2; i++)
+ g += **m[i];
+ return g;
+}
+
+__attribute__((noinline, noclone)) double
+f5 (void)
+{
+ int i;
+ double g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += d[k[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) double
+f6 (double *p)
+{
+ int i;
+ double g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += p[k[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) double
+f7 (void)
+{
+ int i;
+ double g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += *n[i];
+ return g;
+}
+
+__attribute__((noinline, noclone)) int
+f8 (void)
+{
+ int i;
+ int g = 0;
+ for (i = 0; i < N / 2; i++)
+ g += **o[i];
+ return g;
+}
+
+__attribute__((noinline, noclone)) float
+f9 (void)
+{
+ int i;
+ float g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += f[q[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) float
+f10 (float *p)
+{
+ int i;
+ float g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += p[q[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) double
+f11 (void)
+{
+ int i;
+ double g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += d[q[i]];
+ return g;
+}
+
+__attribute__((noinline, noclone)) double
+f12 (double *p)
+{
+ int i;
+ double g = 0.0;
+ for (i = 0; i < N / 2; i++)
+ g += p[q[i]];
+ return g;
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ asm ("");
+ f[i] = -256.0f + i;
+ d[i] = -258.0 + i;
+ k[i] = (i * 731) & (N - 1);
+ q[i] = (i * 657) & (N - 1);
+ t[i] = (i * 657) & (N - 1);
+ l[i] = &f[(i * 239) & (N - 1)];
+ n[i] = &d[(i * 271) & (N - 1)];
+ r[i] = &t[(i * 323) & (N - 1)];
+ s[i] = &k[(i * 565) & (N - 1)];
+ m[i] = &s[(i * 13) & (N - 1)];
+ o[i] = &r[(i * 19) & (N - 1)];
+ }
+
+ if (f1 () != 136448.0f || f2 (f) != 136448.0f || f3 () != 130304.0)
+ abort ();
+ if (f4 () != 261376 || f5 () != 135424.0 || f6 (d) != 135424.0)
+ abort ();
+ if (f7 () != 129280.0 || f8 () != 259840L || f9 () != 130816.0f)
+ abort ();
+ if (f10 (f) != 130816.0f || f11 () != 129792.0 || f12 (d) != 129792.0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-4.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-4.c
new file mode 100644
index 0000000000..bea8c24b8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-4.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O3 -mavx512f" } */
+
+#include "avx512f-check.h"
+
+#define N 1024
+int a[N], b[N], c[N], d[N];
+
+__attribute__((noinline, noclone)) void
+foo (float *__restrict p, float *__restrict q, float *__restrict r,
+ int s1, int s2, int s3)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ p[i] = q[a[i] * s1 + b[i] * s2 + s3] * r[c[i] * s1 + d[i] * s2 + s3];
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ float e[N], f[N], g[N];
+ for (i = 0; i < N; i++)
+ {
+ a[i] = (i * 7) & (N / 8 - 1);
+ b[i] = (i * 13) & (N / 8 - 1);
+ c[i] = (i * 23) & (N / 8 - 1);
+ d[i] = (i * 5) & (N / 8 - 1);
+ e[i] = 16.5 + i;
+ f[i] = 127.5 - i;
+ }
+ foo (g, e, f, 3, 2, 4);
+ for (i = 0; i < N; i++)
+ if (g[i] != (float) ((20.5 + a[i] * 3 + b[i] * 2)
+ * (123.5 - c[i] * 3 - d[i] * 2)))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
new file mode 100644
index 0000000000..d2237da156
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-gather-5.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f" } */
+
+#include "avx512f-gather-4.c"
+
+/* { dg-final { scan-assembler "gather\[^\n\]*zmm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*ymm\[^\n\]*ymm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*xmm\[^\n\]*ymm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*ymm\[^\n\]*xmm" } } */
+/* { dg-final { scan-assembler-not "gather\[^\n\]*xmm\[^\n\]*xmm" } } */
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-helper.h b/gcc/testsuite/gcc.target/i386/avx512f-helper.h
new file mode 100644
index 0000000000..61b2e90d19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-helper.h
@@ -0,0 +1,96 @@
+/* This file is used to reduce a number of runtime tests for AVX512F
+ instructions. Idea is to create one file per instruction -
+ avx512f-insn-2.c - using defines from this file instead of intrinsic
+ name, vector length etc. Then dg-options are set with appropriate
+ -Dwhatever options in that .c file producing tests for specific
+ length. */
+
+#if defined (AVX512F)
+#include "avx512f-check.h"
+#elif defined (AVX512ER)
+#include "avx512er-check.h"
+#elif defined (AVX512CD)
+#include "avx512cd-check.h"
+#endif
+
+/* Macros expansion. */
+#define CONCAT(a,b,c) a ## b ## c
+#define EVAL(a,b,c) CONCAT(a,b,c)
+
+/* Value to be written into destination.
+ We have one value for all types so it must be small enough
+ to fit into signed char. */
+#define DEFAULT_VALUE 117
+
+#define MAKE_MASK_MERGE(NAME, TYPE) \
+static void \
+__attribute__((noinline, unused)) \
+merge_masking_##NAME (TYPE *arr, unsigned long long mask, int size) \
+{ \
+ int i; \
+ for (i = 0; i < size; i++) \
+ { \
+ arr[i] = (mask & (1LL << i)) ? arr[i] : DEFAULT_VALUE; \
+ } \
+}
+
+MAKE_MASK_MERGE(i_b, char)
+MAKE_MASK_MERGE(i_w, short)
+MAKE_MASK_MERGE(i_d, int)
+MAKE_MASK_MERGE(i_q, long long)
+MAKE_MASK_MERGE(, float)
+MAKE_MASK_MERGE(d, double)
+
+#define MASK_MERGE(TYPE) merge_masking_##TYPE
+
+#define MAKE_MASK_ZERO(NAME, TYPE) \
+static void \
+__attribute__((noinline, unused)) \
+zero_masking_##NAME (TYPE *arr, unsigned long long mask, int size) \
+{ \
+ int i; \
+ for (i = 0; i < size; i++) \
+ { \
+ arr[i] = (mask & (1LL << i)) ? arr[i] : 0; \
+ } \
+}
+
+MAKE_MASK_ZERO(i_b, char)
+MAKE_MASK_ZERO(i_w, short)
+MAKE_MASK_ZERO(i_d, int)
+MAKE_MASK_ZERO(i_q, long long)
+MAKE_MASK_ZERO(, float)
+MAKE_MASK_ZERO(d, double)
+
+#define MASK_ZERO(TYPE) zero_masking_##TYPE
+
+/* Intrinsic being tested. */
+#define INTRINSIC(NAME) EVAL(_mm, AVX512F_LEN, NAME)
+/* Unions used for testing (for example union512d, union256d etc.). */
+#define UNION_TYPE(SIZE, NAME) EVAL(union, SIZE, NAME)
+/* Corresponding union check. */
+#define UNION_CHECK(SIZE, NAME) EVAL(check_union, SIZE, NAME)
+/* Corresponding fp union check. */
+#define UNION_FP_CHECK(SIZE, NAME) EVAL(check_fp_union, SIZE, NAME)
+/* Corresponding rough union check. */
+#define UNION_ROUGH_CHECK(SIZE, NAME) \
+ EVAL(check_rough_union, SIZE, NAME)
+/* Function which tests intrinsic for given length. */
+#define TEST EVAL(test_, AVX512F_LEN,)
+/* Function which calculates result. */
+#define CALC EVAL(calc_, AVX512F_LEN,)
+
+#define AVX512F_LEN 512
+#define AVX512F_LEN_HALF 256
+static void test_512 ();
+
+#if defined (AVX512F)
+void
+avx512f_test (void) { test_512 (); }
+#elif defined (AVX512CD)
+void
+avx512cd_test (void) { test_512 (); }
+#elif defined (AVX512ER)
+void
+avx512er_test (void) { test_512 (); }
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-1.c
new file mode 100644
index 0000000000..7a0ee9978f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpgatherdd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, idx;
+volatile __mmask16 m16;
+int *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i32gather_epi32 (idx, base, 8);
+ x = _mm512_mask_i32gather_epi32 (x, m16, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-2.c
new file mode 100644
index 0000000000..d89ef048d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherd512-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherdd (int *res, __mmask16 m16, int *idx,
+ int *src, int scale, int *r)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (m16 & (1 << i))
+ r[i] = *(int *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512i_d idx, res;
+ int src[16];
+ int res_ref[16];
+ __mmask16 m16 = 0xBC5D;
+
+ for (i = 0; i < 16; i++)
+ {
+ src[i] = 1973 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 4) >> 1;
+ }
+
+ res.x = _mm512_mask_i32gather_epi32 (res.x, m16, idx.x, src, SCALE);
+ compute_gatherdd (res.a, m16, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_d (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i32gather_epi32 (idx.x, src, SCALE);
+ compute_gatherdd (res.a, 0xFFFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-1.c
new file mode 100644
index 0000000000..88b9ae6245
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgatherdpd\[ \\t\]+\[^\n\]*ymm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m256i idx;
+volatile __mmask8 m8;
+double *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i32gather_pd (idx, base, 8);
+ x = _mm512_mask_i32gather_pd (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-2.c
new file mode 100644
index 0000000000..3af491548b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherpd512-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherdpd (double *res, __mmask8 m8, int *idx,
+ double *src, int scale, double *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(double *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512d res;
+ union256i_d idx;
+ double src[8];
+ double res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ res.x = _mm512_setzero_pd();
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ res.x = _mm512_mask_i32gather_pd (res.x, m8, idx.x, src, SCALE);
+ compute_gatherdpd (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i32gather_pd (idx.x, src, SCALE);
+ compute_gatherdpd (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-1.c
new file mode 100644
index 0000000000..6abc2301d5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgatherdps\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m512i idx;
+volatile __mmask16 m16;
+float *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i32gather_ps (idx, base, 8);
+ x = _mm512_mask_i32gather_ps (x, m16, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-2.c
new file mode 100644
index 0000000000..691413ab2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherps512-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherdps (float *res, __mmask16 m16, int *idx,
+ float *src, int scale, float *r)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (m16 & (1 << i))
+ r[i] = *(float *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512 res;
+ union512i_d idx;
+ float src[16];
+ float res_ref[16];
+ __mmask16 m16 = 0xBC5D;
+
+ res.x = _mm512_setzero_ps();
+
+ for (i = 0; i < 16; i++)
+ {
+ src[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 4) >> 1;
+ }
+
+ res.x = _mm512_mask_i32gather_ps (res.x, m16, idx.x, src, SCALE);
+ compute_gatherdps (res.a, m16, idx.a, src, SCALE, res_ref);
+
+ if (check_union512 (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i32gather_ps (idx.x, src, SCALE);
+ compute_gatherdps (res.a, 0xFFFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512 (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-1.c
new file mode 100644
index 0000000000..ee4491eb1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpgatherdq\[ \\t\]+\[^\n\]*ymm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m256i idx;
+volatile __mmask8 m8;
+long long *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i32gather_epi64 (idx, base, 8);
+ x = _mm512_mask_i32gather_epi64 (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-2.c
new file mode 100644
index 0000000000..4d472faa2a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32gatherq512-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherdq (long long *res, __mmask8 m8, int *idx,
+ long long *src, int scale, long long *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(long long *)
+ (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256i_d idx;
+ union512i_q res;
+ long long src[8];
+ long long res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 1983 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ res.x = _mm512_mask_i32gather_epi64 (res.x, m8, idx.x, src, SCALE);
+ compute_gatherdq (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i32gather_epi64 (idx.x, src, SCALE);
+ compute_gatherdq (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-1.c
new file mode 100644
index 0000000000..7a5c311661
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpscatterdd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i src, idx;
+volatile __mmask16 m16;
+int *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i32scatter_epi32 (addr, idx, src, 8);
+ _mm512_mask_i32scatter_epi32 (addr, m16, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-2.c
new file mode 100644
index 0000000000..569690021a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterd512-2.c
@@ -0,0 +1,51 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterdd (__mmask16 m16, int *idx,
+ int *src, int scale, int *r)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (m16 & (1 << i))
+ *(int *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512i_d src, idx;
+ int res[16] = { 0 };
+ int res_ref[16] = { 0 };
+ __mmask16 m16 = 0xBC5D;
+
+ for (i = 0; i < 16; i++)
+ {
+ src.a[i] = 1973 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 4) >> 1;
+ }
+
+ _mm512_mask_i32scatter_epi32 (res, m16, idx.x, src.x, SCALE);
+ compute_scatterdd (m16, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVi (res, res_ref, 16))
+ abort ();
+
+ _mm512_i32scatter_epi32 (res, idx.x, src.x, SCALE);
+ compute_scatterdd (0xFFFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVi (res, res_ref, 16))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-1.c
new file mode 100644
index 0000000000..6c5ddc0a9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscatterdpd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*ymm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512d src;
+volatile __m256i idx;
+volatile __mmask8 m8;
+double *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i32scatter_pd (addr, idx, src, 8);
+ _mm512_mask_i32scatter_pd (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-2.c
new file mode 100644
index 0000000000..987b3f437f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterpd512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterdpd (__mmask8 m8, int *idx, double *src,
+ int scale, double *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(double *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512d src;
+ union256i_d idx;
+ double res[8] = { 0.0 };
+ double res_ref[8] = { 0.0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ _mm512_mask_i32scatter_pd (res, m8, idx.x, src.x, SCALE);
+ compute_scatterdpd (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVd (res, res_ref, 8))
+ abort ();
+
+ _mm512_i32scatter_pd (res, idx.x, src.x, SCALE);
+ compute_scatterdpd (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVd (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-1.c
new file mode 100644
index 0000000000..c24344a28d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscatterdps\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512 src;
+volatile __m512i idx;
+volatile __mmask16 m16;
+float *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i32scatter_ps (addr, idx, src, 8);
+ _mm512_mask_i32scatter_ps (addr, m16, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-2.c
new file mode 100644
index 0000000000..8604c8d5c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterps512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterdps (__mmask16 m16, int *idx,
+ float *src, int scale, float *r)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (m16 & (1 << i))
+ *(float *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512 src;
+ union512i_d idx;
+ float res[16] = { 0.0 };
+ float res_ref[16] = { 0.0 };
+ __mmask16 m16 = 0xBC5D;
+
+ for (i = 0; i < 16; i++)
+ {
+ src.a[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 4) >> 1;
+ }
+
+ _mm512_mask_i32scatter_ps (res, m16, idx.x, src.x, SCALE);
+ compute_scatterdps (m16, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVf (res, res_ref, 16))
+ abort ();
+
+ _mm512_i32scatter_ps (res, idx.x, src.x, SCALE);
+ compute_scatterdps (0xFFFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVf (res, res_ref, 16))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-1.c
new file mode 100644
index 0000000000..5b28175465
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpscatterdq\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*ymm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i src;
+volatile __m256i idx;
+volatile __mmask8 m8;
+long long *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i32scatter_epi64 (addr, idx, src, 8);
+ _mm512_mask_i32scatter_epi64 (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-2.c
new file mode 100644
index 0000000000..fe5c3ade1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i32scatterq512-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterdq (__mmask8 m8, int *idx, long long *src,
+ int scale, long long *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(long long *) (((unsigned char *) r) + idx[i] * scale) =
+ src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256i_d idx;
+ union512i_q src;
+ long long res[8] = { 0 };
+ long long res_ref[8] = { 0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 1983 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ _mm512_mask_i32scatter_epi64 (res, m8, idx.x, src.x, SCALE);
+ compute_scatterdq (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVl (res, res_ref, 8))
+ abort ();
+
+ _mm512_i32scatter_epi64 (res, idx.x, src.x, SCALE);
+ compute_scatterdq (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVl (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-1.c
new file mode 100644
index 0000000000..66dcf6f60c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpgatherqd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*ymm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m256i x;
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i64gather_epi32 (idx, base, 8);
+ x = _mm512_mask_i64gather_epi32 (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-2.c
new file mode 100644
index 0000000000..dff818db4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherd512-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherqd (int *res, __mmask8 m8, long long *idx,
+ int *src, int scale, int *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(int *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256i_d res;
+ union512i_q idx;
+ int src[8];
+ int res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 1973 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (32 - (i + 1) * 4) >> 1;
+ }
+
+ res.x = _mm512_mask_i64gather_epi32 (res.x, m8, idx.x, src, SCALE);
+ compute_gatherqd (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union256i_d (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i64gather_epi32 (idx.x, src, SCALE);
+ compute_gatherqd (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union256i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-1.c
new file mode 100644
index 0000000000..4a3df89049
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgatherqpd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m512i idx;
+volatile __mmask8 m8;
+double *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i64gather_pd (idx, base, 8);
+ x = _mm512_mask_i64gather_pd (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-2.c
new file mode 100644
index 0000000000..7cb6d82eb0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherpd512-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherqpd (double *res, __mmask8 m8, long long *idx,
+ double *src, int scale, double *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(double *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512d res;
+ union512i_q idx;
+ double src[8];
+ double res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ res.x = _mm512_setzero_pd();
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ res.x = _mm512_mask_i64gather_pd (res.x, m8, idx.x, src, SCALE);
+ compute_gatherqpd (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i64gather_pd (idx.x, src, SCALE);
+ compute_gatherqpd (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-1.c
new file mode 100644
index 0000000000..4caee0569b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgatherqps\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*ymm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m256 x;
+volatile __m512i idx;
+volatile __mmask8 m8;
+float *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i64gather_ps (idx, base, 8);
+ x = _mm512_mask_i64gather_ps (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-2.c
new file mode 100644
index 0000000000..8ed0fcef40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherps512-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherqps (float *res, __mmask8 m8, long long *idx,
+ float *src, int scale, float *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(float *) (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256 res;
+ union512i_q idx;
+ float src[8];
+ float res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ res.x = _mm256_setzero_ps();
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (32 - (i + 1) * 4) >> 1;
+ }
+
+ res.x = _mm512_mask_i64gather_ps (res.x, m8, idx.x, src, SCALE);
+ compute_gatherqps (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union256 (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i64gather_ps (idx.x, src, SCALE);
+ compute_gatherqps (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union256 (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-1.c
new file mode 100644
index 0000000000..20d39e7484
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpgatherqq\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, idx;
+volatile __mmask8 m8;
+long long *base;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_i64gather_epi64 (idx, base, 8);
+ x = _mm512_mask_i64gather_epi64 (x, m8, idx, base, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-2.c
new file mode 100644
index 0000000000..134fd18b82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64gatherq512-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_gatherqq (long long *res, __mmask8 m8, long long *idx,
+ long long *src, int scale, long long *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ r[i] = *(long long *)
+ (((unsigned char *) src) + idx[i] * scale);
+ else
+ r[i] = res[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512i_q idx, res;
+ long long src[8];
+ long long res_ref[8];
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src[i] = 1983 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ res.x = _mm512_mask_i64gather_epi64 (res.x, m8, idx.x, src, SCALE);
+ compute_gatherqq (res.a, m8, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+
+ res.x = _mm512_i64gather_epi64 (idx.x, src, SCALE);
+ compute_gatherqq (res.a, 0xFF, idx.a, src, SCALE, res_ref);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-1.c
new file mode 100644
index 0000000000..a2f5275d67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpscatterqd\[ \\t\]+\[^\n\]*ymm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m256i src;
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i64scatter_epi32 (addr, idx, src, 8);
+ _mm512_mask_i64scatter_epi32 (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-2.c
new file mode 100644
index 0000000000..877ef90620
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterd512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterqd (__mmask8 m8, long long *idx,
+ int *src, int scale, int *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(int *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256i_d src;
+ union512i_q idx;
+ int res[8] = { 0 };
+ int res_ref[8] = { 0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 1973 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (32 - (i + 1) * 4) >> 1;
+ }
+
+ _mm512_mask_i64scatter_epi32 (res, m8, idx.x, src.x, SCALE);
+ compute_scatterqd (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVi (res, res_ref, 8))
+ abort ();
+
+ _mm512_i64scatter_epi32 (res, idx.x, src.x, SCALE);
+ compute_scatterqd (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVi (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-1.c
new file mode 100644
index 0000000000..288a2183b0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscatterqpd\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512d src;
+volatile __m512i idx;
+volatile __mmask8 m8;
+double *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i64scatter_pd (addr, idx, src, 8);
+ _mm512_mask_i64scatter_pd (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-2.c
new file mode 100644
index 0000000000..2ded7bc762
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterpd512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterqpd (__mmask8 m8, long long *idx, double *src,
+ int scale, double *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(double *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512d src;
+ union512i_q idx;
+ double res[8] = { 0.0 };
+ double res_ref[8] = { 0.0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ _mm512_mask_i64scatter_pd (res, m8, idx.x, src.x, SCALE);
+ compute_scatterqpd (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVd (res, res_ref, 8))
+ abort ();
+
+ _mm512_i64scatter_pd (res, idx.x, src.x, SCALE);
+ compute_scatterqpd (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVd (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-1.c
new file mode 100644
index 0000000000..6a0b05d799
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscatterqps\[ \\t\]+\[^\n\]*ymm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m256 src;
+volatile __m512i idx;
+volatile __mmask8 m8;
+float *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i64scatter_ps (addr, idx, src, 8);
+ _mm512_mask_i64scatter_ps (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-2.c
new file mode 100644
index 0000000000..4a74d4667b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterps512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterqps (__mmask8 m8, long long *idx,
+ float *src, int scale, float *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(float *) (((unsigned char *) r) + idx[i] * scale) = src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union256 src;
+ union512i_q idx;
+ float res[8] = { 0.0 };
+ float res_ref[8] = { 0.0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 2.718281828459045 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (32 - (i + 1) * 4) >> 1;
+ }
+
+ _mm512_mask_i64scatter_ps (res, m8, idx.x, src.x, SCALE);
+ compute_scatterqps (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVf (res, res_ref, 8))
+ abort ();
+
+ _mm512_i64scatter_ps (res, idx.x, src.x, SCALE);
+ compute_scatterqps (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVf (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-1.c
new file mode 100644
index 0000000000..10a7a4be6f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpscatterqq\[ \\t\]+\[^\n\]*zmm\[0-9\]\[^\n\]*zmm\[0-9\]\[^\n\]*{%k\[1-7\]}" 2 } } */
+
+#include <immintrin.h>
+
+volatile __m512i src, idx;
+volatile __mmask8 m8;
+long long *addr;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_i64scatter_epi64 (addr, idx, src, 8);
+ _mm512_mask_i64scatter_epi64 (addr, m8, idx, src, 8);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-2.c
new file mode 100644
index 0000000000..975973f34f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-i64scatterq512-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+#define SCALE 2
+
+static void
+compute_scatterqq (__mmask8 m8, long long *idx, long long *src,
+ int scale, long long *r)
+{
+ int i;
+
+ for (i = 0; i < 8; i++)
+ {
+ if (m8 & (1 << i))
+ *(long long *) (((unsigned char *) r) + idx[i] * scale) =
+ src[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ union512i_q src, idx;
+ long long res[8] = { 0 };
+ long long res_ref[8] = { 0 };
+ __mmask8 m8 = 0xC5;
+
+ for (i = 0; i < 8; i++)
+ {
+ src.a[i] = 1983 * (i + 1) * (i + 2);
+
+ /* About to gather in reverse order,
+ divide by 2 to demonstrate scale */
+ idx.a[i] = (64 - (i + 1) * 8) >> 1;
+ }
+
+ _mm512_mask_i64scatter_epi64 (res, m8, idx.x, src.x, SCALE);
+ compute_scatterqq (m8, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVl (res, res_ref, 8))
+ abort ();
+
+ _mm512_i64scatter_epi64 (res, idx.x, src.x, SCALE);
+ compute_scatterqq (0xFF, idx.a, src.a, SCALE, res_ref);
+
+ if (checkVl (res, res_ref, 8))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-inline-asm.c b/gcc/testsuite/gcc.target/i386/avx512f-inline-asm.c
new file mode 100644
index 0000000000..2557eab644
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-inline-asm.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static void
+init_vpadd_mask (int* dst, int *src1, int *src2, int seed)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ dst[i] = -1;
+ src1[i] = seed * 2 * i + 1;
+ src2[i] = seed * 2 * i;
+ }
+}
+
+static inline void
+calc_vpadd_mask_zeroed (int *dst, __mmask16 m, int *src1, int *src2)
+{
+ int i;
+
+ for (i = 0; i < 16; i++)
+ {
+ if (m & (1 << i))
+ dst[i] = src1[i] + src2[i];
+ else
+ dst[i] = 0;
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ /* Checking mask arithmetic instruction */
+
+ __mmask16 msk_dst, msk_src1, msk_src2, msk_dst_ref;
+
+ msk_src1 = 0x0FFB;
+ msk_src2 = 0x0F0F;
+
+ asm ("kandw\t%2, %1, %0"
+ : "=k" (msk_dst)
+ : "k" (msk_src1), "k" (msk_src2));
+
+ msk_dst_ref = _mm512_kand (msk_src1, msk_src2);
+ if (msk_dst != msk_dst_ref)
+ abort ();
+
+
+ /* Checking zero-masked vector instruction */
+ union512i_d dst, src1, src2;
+ int dst_ref[16];
+
+ init_vpadd_mask (dst.a, src1.a, src2.a, 1);
+ init_vpadd_mask (dst_ref, src1.a, src2.a, 1);
+
+ asm ("vpaddd\t%2, %1, %0 %{%3%}%{z%}"
+ : "=x" (dst.x)
+ : "x" (src1.x), "x" (src2.x), "Yk" (msk_dst));
+
+ calc_vpadd_mask_zeroed (dst_ref, msk_dst, src1.a, src2.a);
+
+ if (check_union512i_d (dst, dst_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c
new file mode 100644
index 0000000000..3d777c8301
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kandnw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kandnw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kandn (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kandw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kandw-1.c
new file mode 100644
index 0000000000..19a3cf4dbc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kandw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kandw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kand (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c b/gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c
new file mode 100644
index 0000000000..df7fc9b7b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-klogic-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void
+avx512f_test (void)
+{
+ __mmask16 dst, src1, src2, dst_ref;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (src1) : "r" (0x0FFF) );
+ __asm__( "kmovw %1, %0" : "=k" (src2) : "r" (0x0F0F) );
+
+ dst = _mm512_kand (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = src1 & src2;
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_kandn (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = ~src1 & src2;
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_kor (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = src1 | src2;
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_kxnor (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = ~(src1 ^ src2);
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_kxor (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = src1 ^ src2;
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_knot (src1);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = ~src1;
+ if (dst != dst_ref)
+ abort ();
+
+ dst = _mm512_kunpackb (src1, src2);
+ x = _mm512_mask_add_ps (x, dst, x, x);
+ dst_ref = 0xFF0F;
+
+ if (dst != dst_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kmovw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kmovw-1.c
new file mode 100644
index 0000000000..9c20472afc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kmovw-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "kmovw\[ \\t\]+\[^\n\]*%k\[0-7\]" } } */
+
+#include <immintrin.h>
+volatile __mmask16 k1;
+
+void
+avx512f_test ()
+{
+ k1 = _mm512_kmov (11);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
new file mode 100644
index 0000000000..a8f8f10b6b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-knotw-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "knotw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (45) );
+
+ k2 = _mm512_knot (k1);
+
+ x = _mm512_mask_add_ps (x, k1, x, x);
+ x = _mm512_mask_add_ps (x, k2, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kortestw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kortestw-1.c
new file mode 100644
index 0000000000..a3cdd4a1ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kortestw-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512f" } */
+/* { dg-final { scan-assembler-times "kortestw\[ \\t\]+\[^\n\]*%k\[0-7\]" 4 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test () {
+ volatile __mmask16 k1;
+ __mmask16 k2;
+ volatile __mmask8 k3;
+ __mmask8 k4;
+
+ volatile short r;
+
+ /* Check that appropriate insn sequence is generated at -O0. */
+ r = _mm512_kortestc (k1, k2);
+ r = _mm512_kortestz (k1, k2);
+
+ r = _mm512_kortestc (k3, k4);
+ r = _mm512_kortestz (k3, k4);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kortestw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-kortestw-2.c
new file mode 100644
index 0000000000..4b9cadcc2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kortestw-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void
+avx512f_test () {
+ volatile __mmask16 k1;
+ __mmask16 k2;
+ volatile short r = 0;
+
+ /* Test kortestc. */
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (0) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (45) );
+
+ r += _mm512_kortestc (k1, k2);
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (0) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (0) );
+
+ r += _mm512_kortestc (k1, k2);
+ if (r)
+ abort ();
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (-1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (0) );
+
+ r += _mm512_kortestc (k1, k2);
+ if (!r)
+ abort ();
+
+ r = 0;
+ /* Test kortestz. */
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (0) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (45) );
+
+ r += _mm512_kortestz (k1, k2);
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (-1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (0) );
+
+ r += _mm512_kortestz (k1, k2);
+ if (r)
+ abort ();
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (0) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (0) );
+
+ r += _mm512_kortestz (k1, k2);
+ if (!r)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-korw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-korw-1.c
new file mode 100644
index 0000000000..96f837b96b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-korw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "korw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kor (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kunpckbw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kunpckbw-1.c
new file mode 100644
index 0000000000..bc55f8b301
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kunpckbw-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kunpckbw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test () {
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kunpackb (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kxnorw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kxnorw-1.c
new file mode 100644
index 0000000000..8b12b2ac89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kxnorw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kxnorw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kxnor (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-kxorw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-kxorw-1.c
new file mode 100644
index 0000000000..7ae1bc4620
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-kxorw-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "kxorw\[ \\t\]+\[^\n\]*%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+void
+avx512f_test ()
+{
+ __mmask16 k1, k2, k3;
+ volatile __m512 x;
+
+ __asm__( "kmovw %1, %0" : "=k" (k1) : "r" (1) );
+ __asm__( "kmovw %1, %0" : "=k" (k2) : "r" (2) );
+
+ k3 = _mm512_kxor (k1, k2);
+ x = _mm512_mask_add_ps (x, k3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-mask-type.h b/gcc/testsuite/gcc.target/i386/avx512f-mask-type.h
new file mode 100644
index 0000000000..2dacdd67a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-mask-type.h
@@ -0,0 +1,10 @@
+/* Type of mask. */
+#if SIZE <= 8
+#define MASK_TYPE __mmask8
+#define MASK_VALUE 0xB9
+#define MASK_ALL_ONES 0xFF
+#elif SIZE <= 16
+#define MASK_TYPE __mmask16
+#define MASK_VALUE 0xA6BA
+#define MASK_ALL_ONES 0xFFFF
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-os-support.h b/gcc/testsuite/gcc.target/i386/avx512f-os-support.h
new file mode 100644
index 0000000000..deefa5e110
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-os-support.h
@@ -0,0 +1,10 @@
+/* Check if the OS supports executing AVX512F instructions. */
+
+static int
+avx512f_os_support (void)
+{
+ unsigned int eax, edx;
+
+ __asm__ ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (0));
+ return (eax & 230) == 230;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c b/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c
new file mode 100644
index 0000000000..2f1c23a155
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target avx512f } } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#include "avx512f-check.h"
+
+static void
+avx512f_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-rounding.c b/gcc/testsuite/gcc.target/i386/avx512f-rounding.c
new file mode 100644
index 0000000000..254e3a418f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-rounding.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512f" } */
+
+#include <x86intrin.h>
+
+int
+test_rounding (__m128d x, int r)
+{
+ return _mm_cvt_roundsd_i32 (x, r); /* { dg-error "incorrect rounding operand." } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-1.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-1.c
new file mode 100644
index 0000000000..0ae82bc413
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-1.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512
+__attribute__ ((noinline))
+foo (float *v)
+{
+ return _mm512_set_ps (v[15], v[14], v[13], v[12],
+ v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4],
+ v[3], v[2], v[1], v[0]);
+}
+
+static __m512
+__attribute__ ((noinline))
+foo_r (float *v)
+{
+ return _mm512_setr_ps (v[0], v[1], v[2], v[3],
+ v[4], v[5], v[6], v[7],
+ v[8], v[9], v[10], v[11],
+ v[12], v[13], v[14], v[15]);
+}
+
+static void
+avx512f_test (void)
+{
+ float v[16] = { -3.3, 2.6, 1.48, 9.104, -23.9, 17, -13.48, 4,
+ 69.78, 0.33, 81, 0.4, -8.9, -173.37, 0.8, 68 };
+ union512 res;
+
+ res.x = foo (v);
+
+ if (check_union512 (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_ps ();
+
+ res.x = foo_r (v);
+
+ if (check_union512 (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-2.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-2.c
new file mode 100644
index 0000000000..1884c2f334
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-2.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512
+__attribute__ ((noinline))
+foo (float x1, float x2, float x3, float x4,
+ float x5, float x6, float x7, float x8,
+ float x9, float x10, float x11, float x12,
+ float x13, float x14, float x15, float x16)
+{
+ return _mm512_set_ps (x1, x2, x3, x4, x5, x6, x7, x8,
+ x9, x10, x11, x12, x13, x14, x15, x16);
+}
+
+static __m512
+__attribute__ ((noinline))
+foo_r (float x1, float x2, float x3, float x4,
+ float x5, float x6, float x7, float x8,
+ float x9, float x10, float x11, float x12,
+ float x13, float x14, float x15, float x16)
+{
+ return _mm512_setr_ps (x16, x15, x14, x13, x12, x11, x10, x9,
+ x8, x7, x6, x5, x4, x3, x2, x1);
+}
+
+static void
+avx512f_test (void)
+{
+ float v[16] = { -3.3, 2.6, 1.48, 9.104, -23.9, 17, -13.48, 4,
+ 69.78, 0.33, 81, 0.4, -8.9, -173.37, 0.8, 68 };
+ union512 res;
+
+ res.x = foo (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512 (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_ps ();
+
+ res.x = foo_r (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512 (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-3.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-3.c
new file mode 100644
index 0000000000..7ec166a588
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-3.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512
+__attribute__ ((noinline))
+foo (float x)
+{
+ return _mm512_set_ps (x, x, x, x, x, x, x, x,
+ x, x, x, x, x, x, x, x);
+}
+
+static __m512
+__attribute__ ((noinline))
+foo_r (float x)
+{
+ return _mm512_setr_ps (x, x, x, x, x, x, x, x,
+ x, x, x, x, x, x, x, x);
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ float e = 34.5;
+ float v[16];
+ union512 res;
+
+ for (i = 0; i < 16; i++)
+ v[i] = e;
+
+ res.x = foo (e);
+
+ if (check_union512 (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_ps ();
+
+ res.x = foo_r (e);
+
+ if (check_union512 (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-4.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-4.c
new file mode 100644
index 0000000000..cd37e00645
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-4.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512
+__attribute__ ((noinline))
+foo (float x, int i)
+{
+ switch (i)
+ {
+ case 15:
+ return _mm512_set_ps (x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 14:
+ return _mm512_set_ps (0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 13:
+ return _mm512_set_ps (0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 12:
+ return _mm512_set_ps (0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 11:
+ return _mm512_set_ps (0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 10:
+ return _mm512_set_ps (0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 9:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 8:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 7:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0);
+ case 3:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0);
+ case 2:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0);
+ case 1:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0);
+ case 0:
+ return _mm512_set_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512
+__attribute__ ((noinline))
+foo_r (float x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_ps (x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 1:
+ return _mm512_setr_ps (0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 2:
+ return _mm512_setr_ps (0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 3:
+ return _mm512_setr_ps (0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_setr_ps (0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 7:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 8:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0);
+ case 9:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0);
+ case 10:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0);
+ case 11:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0);
+ case 12:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0);
+ case 13:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0);
+ case 14:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0);
+ case 15:
+ return _mm512_setr_ps (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ float e = -3.234;
+ float v[16];
+ union512 res;
+ int i, j;
+
+ for (i = 0; i < 16; i++)
+ {
+ for (j = 0; j < 16; j++)
+ v[j] = 0;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512 (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_ps ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512 (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-5.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-5.c
new file mode 100644
index 0000000000..dec7fd40a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16sf-5.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512
+__attribute__ ((noinline))
+foo (float x, int i)
+{
+ switch (i)
+ {
+ case 15:
+ return _mm512_set_ps (x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 14:
+ return _mm512_set_ps (1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 13:
+ return _mm512_set_ps (1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 12:
+ return _mm512_set_ps (1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 11:
+ return _mm512_set_ps (1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 10:
+ return _mm512_set_ps (1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 9:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 8:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 7:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1);
+ case 3:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1);
+ case 2:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1);
+ case 1:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1);
+ case 0:
+ return _mm512_set_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512
+__attribute__ ((noinline))
+foo_r (float x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_ps (x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 1:
+ return _mm512_setr_ps (1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 2:
+ return _mm512_setr_ps (1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 3:
+ return _mm512_setr_ps (1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_setr_ps (1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 7:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 8:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1);
+ case 9:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1);
+ case 10:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1);
+ case 11:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1);
+ case 12:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1);
+ case 13:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1);
+ case 14:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1);
+ case 15:
+ return _mm512_setr_ps (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ float e = -3.234;
+ float v[16];
+ union512 res;
+ int i, j;
+
+ for (i = 0; i < 16; i++)
+ {
+ for (j = 0; j < 16; j++)
+ v[j] = 1;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512 (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_ps ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512 (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-1.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-1.c
new file mode 100644
index 0000000000..ebd0486999
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-1.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (int *v)
+{
+ return _mm512_set_epi32 (v[15], v[14], v[13], v[12],
+ v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4],
+ v[3], v[2], v[1], v[0]);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (int *v)
+{
+ return _mm512_setr_epi32 (v[0], v[1], v[2], v[3],
+ v[4], v[5], v[6], v[7],
+ v[8], v[9], v[10], v[11],
+ v[12], v[13], v[14], v[15]);
+}
+
+static void
+avx512f_test (void)
+{
+ int v[16] = { 19832468, 2134, 6576856, 6678,
+ 8723467, 54646, 234566, 12314,
+ 786784, 77575, 645245, 234555,
+ 9487733, 411244, 12344, 86533 };
+ union512i_d res;
+
+ res.x = foo (v);
+
+ if (check_union512i_d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (v);
+
+ if (check_union512i_d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c
new file mode 100644
index 0000000000..3090a2de66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-2.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (int x1, int x2, int x3, int x4,
+ int x5, int x6, int x7, int x8,
+ int x9, int x10, int x11, int x12,
+ int x13, int x14, int x15, int x16)
+{
+ return _mm512_set_epi32 (x1, x2, x3, x4, x5, x6, x7, x8,
+ x9, x10, x11, x12, x13, x14, x15, x16);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (int x1, int x2, int x3, int x4,
+ int x5, int x6, int x7, int x8,
+ int x9, int x10, int x11, int x12,
+ int x13, int x14, int x15, int x16)
+{
+ return _mm512_setr_epi32 (x16, x15, x14, x13, x12, x11, x10, x9,
+ x8, x7, x6, x5, x4, x3, x2, x1);
+}
+
+static void
+avx512f_test (void)
+{
+ int v[16] = { -3, -453, 2, -231, 1, -111, 9, -145,
+ 23, 671, -173, 166, -13, 714, 69, 123 };
+ union512i_d res;
+
+ res.x = foo (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512i_d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (v[15], v[14], v[13], v[12], v[11], v[10], v[9], v[8],
+ v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512i_d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-3.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-3.c
new file mode 100644
index 0000000000..c02838ec34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-3.c
@@ -0,0 +1,45 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (int x)
+{
+ return _mm512_set_epi32 (x, x, x, x, x, x, x, x,
+ x, x, x, x, x, x, x, x);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (int x)
+{
+ return _mm512_setr_epi32 (x, x, x, x, x, x, x, x,
+ x, x, x, x, x, x, x, x);
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ int e = 0xabadbeef;
+ int v[16];
+ union512i_d res;
+
+ for (i = 0; i < 16; i++)
+ v[i] = e;
+
+ res.x = foo (e);
+
+ if (check_union512i_d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e);
+
+ if (check_union512i_d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-4.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-4.c
new file mode 100644
index 0000000000..a16f6f0685
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-4.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (int x, int i)
+{
+ switch (i)
+ {
+ case 15:
+ return _mm512_set_epi32 (x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 14:
+ return _mm512_set_epi32 (0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 13:
+ return _mm512_set_epi32 (0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 12:
+ return _mm512_set_epi32 (0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 11:
+ return _mm512_set_epi32 (0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 10:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 9:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 8:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 7:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0);
+ case 3:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0);
+ case 2:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0);
+ case 1:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0);
+ case 0:
+ return _mm512_set_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (int x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_epi32 (x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 1:
+ return _mm512_setr_epi32 (0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 2:
+ return _mm512_setr_epi32 (0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 3:
+ return _mm512_setr_epi32 (0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_setr_epi32 (0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 7:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0, 0);
+ case 8:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0, 0);
+ case 9:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0, 0);
+ case 10:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0, 0);
+ case 11:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0, 0);
+ case 12:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0, 0);
+ case 13:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0, 0);
+ case 14:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x, 0);
+ case 15:
+ return _mm512_setr_epi32 (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int e = 0xabadbeef;
+ int v[16];
+ union512i_d res;
+ int i, j;
+
+ for (i = 0; i < 16; i++)
+ {
+ for (j = 0; j < 16; j++)
+ v[j] = 0;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512i_d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512i_d (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-5.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-5.c
new file mode 100644
index 0000000000..948d4ed42f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v16si-5.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (int x, int i)
+{
+ switch (i)
+ {
+ case 15:
+ return _mm512_set_epi32 (x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 14:
+ return _mm512_set_epi32 (1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 13:
+ return _mm512_set_epi32 (1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 12:
+ return _mm512_set_epi32 (1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 11:
+ return _mm512_set_epi32 (1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 10:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 9:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 8:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 7:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1);
+ case 3:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1);
+ case 2:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1);
+ case 1:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1);
+ case 0:
+ return _mm512_set_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (int x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_epi32 (x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 1:
+ return _mm512_setr_epi32 (1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 2:
+ return _mm512_setr_epi32 (1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 3:
+ return _mm512_setr_epi32 (1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_setr_epi32 (1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 7:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1, 1);
+ case 8:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1, 1);
+ case 9:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1, 1);
+ case 10:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1, 1);
+ case 11:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1, 1);
+ case 12:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1, 1);
+ case 13:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1, 1);
+ case 14:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x, 1);
+ case 15:
+ return _mm512_setr_epi32 (1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int e = 0xabadbeef;
+ int v[16];
+ union512i_d res;
+ int i, j;
+
+ for (i = 0; i < 16; i++)
+ {
+ for (j = 0; j < 16; j++)
+ v[j] = 1;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512i_d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512i_d (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-1.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-1.c
new file mode 100644
index 0000000000..a3514ef727
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-1.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512d
+__attribute__ ((noinline))
+foo (double *v)
+{
+ return _mm512_set_pd (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+}
+
+static __m512d
+__attribute__ ((noinline))
+foo_r (double *v)
+{
+ return _mm512_setr_pd (v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
+}
+
+static void
+avx512f_test (void)
+{
+ double v[8] = { -3.3, 2.6, 1.48, 9.104, -23.9, -173.37, -13.48, 69.78 };
+ union512d res;
+
+ res.x = foo (v);
+
+ if (check_union512d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_pd ();
+
+ res.x = foo_r (v);
+
+ if (check_union512d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-2.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-2.c
new file mode 100644
index 0000000000..a412de5820
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-2.c
@@ -0,0 +1,40 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512d
+__attribute__ ((noinline))
+foo (double x1, double x2, double x3, double x4,
+ double x5, double x6, double x7, double x8)
+{
+ return _mm512_set_pd (x1, x2, x3, x4, x5, x6, x7, x8);
+}
+
+static __m512d
+__attribute__ ((noinline))
+foo_r (double x1, double x2, double x3, double x4,
+ double x5, double x6, double x7, double x8)
+{
+ return _mm512_setr_pd (x8, x7, x6, x5, x4, x3, x2, x1);
+}
+
+static void
+avx512f_test (void)
+{
+ double v[8] = { -3.3, 2.6, 1.48, 9.104, -23.9, -173.37, -13.48, 69.78 };
+ union512d res;
+
+ res.x = foo (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_pd ();
+
+ res.x = foo_r (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-3.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-3.c
new file mode 100644
index 0000000000..751af67037
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-3.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512d
+__attribute__ ((noinline))
+foo (double x)
+{
+ return _mm512_set_pd (x, x, x, x, x, x, x, x);
+}
+
+static __m512d
+__attribute__ ((noinline))
+foo_r (double x)
+{
+ return _mm512_setr_pd (x, x, x, x, x, x, x, x);
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ double e = 34.5;
+ double v[8];
+ union512d res;
+
+ for (i = 0; i < 8; i++)
+ v[i] = e;
+
+ res.x = foo (e);
+
+ if (check_union512d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_pd ();
+
+ res.x = foo_r (e);
+
+ if (check_union512d (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-4.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-4.c
new file mode 100644
index 0000000000..f62bb5fa06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-4.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512d
+__attribute__ ((noinline))
+foo (double x, int i)
+{
+ switch (i)
+ {
+ case 7:
+ return _mm512_set_pd (x, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_set_pd (0, x, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_set_pd (0, 0, x, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_set_pd (0, 0, 0, x, 0, 0, 0, 0);
+ case 3:
+ return _mm512_set_pd (0, 0, 0, 0, x, 0, 0, 0);
+ case 2:
+ return _mm512_set_pd (0, 0, 0, 0, 0, x, 0, 0);
+ case 1:
+ return _mm512_set_pd (0, 0, 0, 0, 0, 0, x, 0);
+ case 0:
+ return _mm512_set_pd (0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512d
+__attribute__ ((noinline))
+foo_r (double x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_pd (x, 0, 0, 0, 0, 0, 0, 0);
+ case 1:
+ return _mm512_setr_pd (0, x, 0, 0, 0, 0, 0, 0);
+ case 2:
+ return _mm512_setr_pd (0, 0, x, 0, 0, 0, 0, 0);
+ case 3:
+ return _mm512_setr_pd (0, 0, 0, x, 0, 0, 0, 0);
+ case 4:
+ return _mm512_setr_pd (0, 0, 0, 0, x, 0, 0, 0);
+ case 5:
+ return _mm512_setr_pd (0, 0, 0, 0, 0, x, 0, 0);
+ case 6:
+ return _mm512_setr_pd (0, 0, 0, 0, 0, 0, x, 0);
+ case 7:
+ return _mm512_setr_pd (0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ double e = -3.234;
+ double v[8];
+ union512d res;
+ int i, j;
+
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 8; j++)
+ v[j] = 0;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_pd ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512d (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-5.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-5.c
new file mode 100644
index 0000000000..c6abd82da0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8df-5.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512d
+__attribute__ ((noinline))
+foo (double x, int i)
+{
+ switch (i)
+ {
+ case 7:
+ return _mm512_set_pd (x, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_set_pd (1, x, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_set_pd (1, 1, x, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_set_pd (1, 1, 1, x, 1, 1, 1, 1);
+ case 3:
+ return _mm512_set_pd (1, 1, 1, 1, x, 1, 1, 1);
+ case 2:
+ return _mm512_set_pd (1, 1, 1, 1, 1, x, 1, 1);
+ case 1:
+ return _mm512_set_pd (1, 1, 1, 1, 1, 1, x, 1);
+ case 0:
+ return _mm512_set_pd (1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512d
+__attribute__ ((noinline))
+foo_r (double x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_pd (x, 1, 1, 1, 1, 1, 1, 1);
+ case 1:
+ return _mm512_setr_pd (1, x, 1, 1, 1, 1, 1, 1);
+ case 2:
+ return _mm512_setr_pd (1, 1, x, 1, 1, 1, 1, 1);
+ case 3:
+ return _mm512_setr_pd (1, 1, 1, x, 1, 1, 1, 1);
+ case 4:
+ return _mm512_setr_pd (1, 1, 1, 1, x, 1, 1, 1);
+ case 5:
+ return _mm512_setr_pd (1, 1, 1, 1, 1, x, 1, 1);
+ case 6:
+ return _mm512_setr_pd (1, 1, 1, 1, 1, 1, x, 1);
+ case 7:
+ return _mm512_setr_pd (1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ double e = -3.234;
+ double v[8];
+ union512d res;
+ int i, j;
+
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 8; j++)
+ v[j] = 1;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512d (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_pd ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512d (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-1.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-1.c
new file mode 100644
index 0000000000..8cb1f8f61b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-1.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (long long *v)
+{
+ return _mm512_set_epi64 (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (long long *v)
+{
+ return _mm512_setr_epi64 (v[0], v[1], v[2], v[3], v[4], v[5], v[6], v[7]);
+}
+
+static void
+avx512f_test (void)
+{
+ long long v[8] = { 0x12e9e94645ad8LL, 0x851c0b39446LL, 2134, 6678,
+ 0x786784645245LL, 0x9487731234LL, 41124, 86530 };
+ union512i_q res;
+
+ res.x = foo (v);
+
+ if (check_union512i_q (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (v);
+
+ if (check_union512i_q (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-2.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-2.c
new file mode 100644
index 0000000000..fd033ce24e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-2.c
@@ -0,0 +1,41 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (long long x1, long long x2, long long x3, long long x4,
+ long long x5, long long x6, long long x7, long long x8)
+{
+ return _mm512_set_epi64 (x1, x2, x3, x4, x5, x6, x7, x8);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (long long x1, long long x2, long long x3, long long x4,
+ long long x5, long long x6, long long x7, long long x8)
+{
+ return _mm512_setr_epi64 (x8, x7, x6, x5, x4, x3, x2, x1);
+}
+
+static void
+avx512f_test (void)
+{
+ long long v[8] = { 0x12e9e94645ad8LL, 0x851c0b39446LL, 2134, 6678,
+ 0x786784645245LL, 0x9487731234LL, 41124, 86530 };
+ union512i_q res;
+
+ res.x = foo (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512i_q (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (v[7], v[6], v[5], v[4], v[3], v[2], v[1], v[0]);
+
+ if (check_union512i_q (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-3.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-3.c
new file mode 100644
index 0000000000..16e12c7f1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-3.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (long long x)
+{
+ return _mm512_set_epi64 (x, x, x, x, x, x, x, x);
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (long long x)
+{
+ return _mm512_setr_epi64 (x, x, x, x, x, x, x, x);
+}
+
+static void
+avx512f_test (void)
+{
+ int i;
+ long long e = 0xfed178ab134badf1LL;
+ long long v[8];
+ union512i_q res;
+
+ for (i = 0; i < 8; i++)
+ v[i] = e;
+
+ res.x = foo (e);
+
+ if (check_union512i_q (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e);
+
+ if (check_union512i_q (res, v))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-4.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-4.c
new file mode 100644
index 0000000000..ea6421fcc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-4.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (long long x, int i)
+{
+ switch (i)
+ {
+ case 7:
+ return _mm512_set_epi64 (x, 0, 0, 0, 0, 0, 0, 0);
+ case 6:
+ return _mm512_set_epi64 (0, x, 0, 0, 0, 0, 0, 0);
+ case 5:
+ return _mm512_set_epi64 (0, 0, x, 0, 0, 0, 0, 0);
+ case 4:
+ return _mm512_set_epi64 (0, 0, 0, x, 0, 0, 0, 0);
+ case 3:
+ return _mm512_set_epi64 (0, 0, 0, 0, x, 0, 0, 0);
+ case 2:
+ return _mm512_set_epi64 (0, 0, 0, 0, 0, x, 0, 0);
+ case 1:
+ return _mm512_set_epi64 (0, 0, 0, 0, 0, 0, x, 0);
+ case 0:
+ return _mm512_set_epi64 (0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (long long x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_epi64 (x, 0, 0, 0, 0, 0, 0, 0);
+ case 1:
+ return _mm512_setr_epi64 (0, x, 0, 0, 0, 0, 0, 0);
+ case 2:
+ return _mm512_setr_epi64 (0, 0, x, 0, 0, 0, 0, 0);
+ case 3:
+ return _mm512_setr_epi64 (0, 0, 0, x, 0, 0, 0, 0);
+ case 4:
+ return _mm512_setr_epi64 (0, 0, 0, 0, x, 0, 0, 0);
+ case 5:
+ return _mm512_setr_epi64 (0, 0, 0, 0, 0, x, 0, 0);
+ case 6:
+ return _mm512_setr_epi64 (0, 0, 0, 0, 0, 0, x, 0);
+ case 7:
+ return _mm512_setr_epi64 (0, 0, 0, 0, 0, 0, 0, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ long long e = 0xabadbeef01234567LL;
+ long long v[8];
+ union512i_q res;
+ int i, j;
+
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 8; j++)
+ v[j] = 0;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512i_q (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512i_q (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-5.c b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-5.c
new file mode 100644
index 0000000000..76ec443889
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-set-v8di-5.c
@@ -0,0 +1,87 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static __m512i
+__attribute__ ((noinline))
+foo (long long x, int i)
+{
+ switch (i)
+ {
+ case 7:
+ return _mm512_set_epi64 (x, 1, 1, 1, 1, 1, 1, 1);
+ case 6:
+ return _mm512_set_epi64 (1, x, 1, 1, 1, 1, 1, 1);
+ case 5:
+ return _mm512_set_epi64 (1, 1, x, 1, 1, 1, 1, 1);
+ case 4:
+ return _mm512_set_epi64 (1, 1, 1, x, 1, 1, 1, 1);
+ case 3:
+ return _mm512_set_epi64 (1, 1, 1, 1, x, 1, 1, 1);
+ case 2:
+ return _mm512_set_epi64 (1, 1, 1, 1, 1, x, 1, 1);
+ case 1:
+ return _mm512_set_epi64 (1, 1, 1, 1, 1, 1, x, 1);
+ case 0:
+ return _mm512_set_epi64 (1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static __m512i
+__attribute__ ((noinline))
+foo_r (long long x, int i)
+{
+ switch (i)
+ {
+ case 0:
+ return _mm512_setr_epi64 (x, 1, 1, 1, 1, 1, 1, 1);
+ case 1:
+ return _mm512_setr_epi64 (1, x, 1, 1, 1, 1, 1, 1);
+ case 2:
+ return _mm512_setr_epi64 (1, 1, x, 1, 1, 1, 1, 1);
+ case 3:
+ return _mm512_setr_epi64 (1, 1, 1, x, 1, 1, 1, 1);
+ case 4:
+ return _mm512_setr_epi64 (1, 1, 1, 1, x, 1, 1, 1);
+ case 5:
+ return _mm512_setr_epi64 (1, 1, 1, 1, 1, x, 1, 1);
+ case 6:
+ return _mm512_setr_epi64 (1, 1, 1, 1, 1, 1, x, 1);
+ case 7:
+ return _mm512_setr_epi64 (1, 1, 1, 1, 1, 1, 1, x);
+ default:
+ abort ();
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ long long e = 0xabadbeef01234567LL;
+ long long v[8];
+ union512i_q res;
+ int i, j;
+
+ for (i = 0; i < 8; i++)
+ {
+ for (j = 0; j < 8; j++)
+ v[j] = 1;
+ v[i] = e;
+
+ res.x = foo (e, i);
+
+ if (check_union512i_q (res, v))
+ abort ();
+
+ res.x = _mm512_setzero_si512 ();
+
+ res.x = foo_r (e, i);
+
+ if (check_union512i_q (res, v))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-setzero-pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-setzero-pd-1.c
new file mode 100644
index 0000000000..f0589bd18a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-setzero-pd-1.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ int i;
+ union512d res;
+ double res_ref[8];
+
+ res.x = _mm512_setzero_pd ();
+
+ for (i = 0; i < 8; i++)
+ res_ref[i] = 0.0;
+
+ if (check_union512d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-setzero-ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-setzero-ps-1.c
new file mode 100644
index 0000000000..5b1ee29e34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-setzero-ps-1.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ int i;
+ union512 res;
+ float res_ref[16];
+
+ res.x = _mm512_setzero_ps ();
+
+ for (i = 0; i < 16; i++)
+ res_ref[i] = 0.0;
+
+ if (check_union512 (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-setzero-si512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-setzero-si512-1.c
new file mode 100644
index 0000000000..1c60489b4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-setzero-si512-1.c
@@ -0,0 +1,21 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ int i;
+ union512i_q res;
+ long long res_ref[8];
+
+ res.x = _mm512_setzero_si512 ();
+
+ for (i = 0; i < 8; i++)
+ res_ref[i] = 0;
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-1.c
new file mode 100644
index 0000000000..567fecffb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vaddpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_add_pd (x, x);
+ x = _mm512_mask_add_pd (x, m, x, x);
+ x = _mm512_maskz_add_pd (m, x, x);
+ x = _mm512_add_round_pd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_add_round_pd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_add_round_pd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-2.c
new file mode 100644
index 0000000000..ce6918ed66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] + s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_add_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_add_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_add_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddps-1.c
new file mode 100644
index 0000000000..66618b9aed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vaddps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_add_ps (x, x);
+ x = _mm512_mask_add_ps (x, m, x, x);
+ x = _mm512_maskz_add_ps (m, x, x);
+ x = _mm512_add_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_add_round_ps (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_add_round_ps (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddps-2.c
new file mode 100644
index 0000000000..6c982bcaff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] + s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_add_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_add_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_add_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-1.c
new file mode 100644
index 0000000000..5cdb76501e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vaddsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_add_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vaddss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vaddss-1.c
new file mode 100644
index 0000000000..0003c44bb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vaddss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vaddss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_add_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-valignd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-valignd-1.c
new file mode 100644
index 0000000000..693adb0577
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-valignd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "valignd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "valignd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "valignd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i z;
+volatile __mmask16 m1;
+
+void extern
+avx512f_test (void)
+{
+ z = _mm512_alignr_epi32 (z, z, 3);
+ z = _mm512_mask_alignr_epi32 (z, m1, z, z, 3);
+ z = _mm512_maskz_alignr_epi32 (m1, z, z, 3);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-valignd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-valignd-2.c
new file mode 100644
index 0000000000..3d2a71ca1c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-valignd-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#define N (SIZE / 2)
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ int i;
+ int s[2 * SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s[i] = s2[i];
+ s[i + SIZE] = s1[i];
+ }
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s[i + N];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 2 * i;
+ s2.a[i] = i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_alignr_epi32) (s1.x, s2.x, N);
+ res2.x = INTRINSIC (_mask_alignr_epi32) (res2.x, mask, s1.x, s2.x, N);
+ res3.x = INTRINSIC (_maskz_alignr_epi32) (mask, s1.x, s2.x, N);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-valignq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-valignq-1.c
new file mode 100644
index 0000000000..a72946837a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-valignq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "valignq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "valignq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "valignq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i z;
+volatile __mmask8 m1;
+
+void extern
+avx512f_test (void)
+{
+ z = _mm512_alignr_epi64 (z, z, 3);
+ z = _mm512_mask_alignr_epi64 (z, m1, z, z, 3);
+ z = _mm512_maskz_alignr_epi64 (m1, z, z, 3);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-valignq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-valignq-2.c
new file mode 100644
index 0000000000..b3c09c7b1a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-valignq-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#define N (SIZE / 2)
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ int i;
+ long long s[2 * SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s[i] = s2[i];
+ s[i + SIZE] = s1[i];
+ }
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s[i + N];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 2 * i;
+ s2.a[i] = i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_alignr_epi64) (s1.x, s2.x, N);
+ res2.x = INTRINSIC (_mask_alignr_epi64) (res2.x, mask, s1.x, s2.x, N);
+ res3.x = INTRINSIC (_maskz_alignr_epi64) (mask, s1.x, s2.x, N);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-1.c
new file mode 100644
index 0000000000..cb0e4c2504
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "(vblendmpd|vmovapd)\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}" } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_blend_pd (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-2.c
new file mode 100644
index 0000000000..1fe4cb6160
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vblendmpd-2.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2, MASK_TYPE mask)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (mask & (1LL << i)) ? s2[i] : s1[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_mask_blend_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-1.c
new file mode 100644
index 0000000000..faee9955b6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "(vblendmps|vmovaps)\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}" } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_blend_ps (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-2.c
new file mode 100644
index 0000000000..e92c70c37e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vblendmps-2.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2, MASK_TYPE mask)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (mask & (1 << i)) ? s2[i] : s1[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_mask_blend_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a, mask);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-1.c
new file mode 100644
index 0000000000..2af23f11db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]|vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]|vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}|vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m128 y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcast_f32x4 (y);
+ x = _mm512_mask_broadcast_f32x4 (x, m, y);
+ x = _mm512_maskz_broadcast_f32x4 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-2.c
new file mode 100644
index 0000000000..79abcdc0d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf32x4-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i % 4];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3;
+ UNION_TYPE (128,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 4; i++)
+ {
+ src.a[i] = 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcast_f32x4) (src.x);
+ res2.x = INTRINSIC (_mask_broadcast_f32x4) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcast_f32x4) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-1.c
new file mode 100644
index 0000000000..dbc3967ccb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]|vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastf64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}|vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m256d y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcast_f64x4 (y);
+ x = _mm512_mask_broadcast_f64x4 (x, m, y);
+ x = _mm512_maskz_broadcast_f64x4 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-2.c
new file mode 100644
index 0000000000..bc5f6a1cc6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastf64x4-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i % 4];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
+ UNION_TYPE (256, d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 2; i++)
+ {
+ src.a[i] = 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcast_f64x4) (src.x);
+ res2.x = INTRINSIC (_mask_broadcast_f64x4) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcast_f64x4) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-1.c
new file mode 100644
index 0000000000..743e1cbcc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]|vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]|vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}|vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcast_i32x4 (y);
+ x = _mm512_mask_broadcast_i32x4 (x, m, y);
+ x = _mm512_maskz_broadcast_i32x4 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-2.c
new file mode 100644
index 0000000000..61dccc227a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti32x4-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i % 4];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (128, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 4; i++)
+ {
+ src.a[i] = 34 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcast_i32x4) (src.x);
+ res2.x = INTRINSIC (_mask_broadcast_i32x4) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcast_i32x4) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-1.c
new file mode 100644
index 0000000000..28a50ed8cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]|vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcasti64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}|vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m256i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcast_i64x4 (y);
+ x = _mm512_mask_broadcast_i64x4 (x, m, y);
+ x = _mm512_maskz_broadcast_i64x4 (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-2.c
new file mode 100644
index 0000000000..6286fca817
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcasti64x4-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i % 4];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ UNION_TYPE (256, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 2; i++)
+ {
+ src.a[i] = 34 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcast_i64x4) (src.x);
+ res2.x = INTRINSIC (_mask_broadcast_i64x4) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcast_i64x4) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-1.c
new file mode 100644
index 0000000000..3d261afea7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m128d y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastsd_pd (y);
+ x = _mm512_mask_broadcastsd_pd (x, m, y);
+ x = _mm512_maskz_broadcastsd_pd (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-2.c
new file mode 100644
index 0000000000..3ecc1a7c58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastsd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[0];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
+ UNION_TYPE (128, d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 2; i++)
+ {
+ src.a[i] = 1.5 + 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcastsd_pd) (src.x);
+ res2.x = INTRINSIC (_mask_broadcastsd_pd) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcastsd_pd) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-1.c
new file mode 100644
index 0000000000..4cc8cb7871
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vbroadcastss\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastss\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastss\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m128 y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastss_ps (y);
+ x = _mm512_mask_broadcastss_ps (x, m, y);
+ x = _mm512_maskz_broadcastss_ps (m, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-2.c
new file mode 100644
index 0000000000..f3f339825b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vbroadcastss-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[0];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3;
+ UNION_TYPE (128,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 4; i++)
+ {
+ src.a[i] = 1.5 + 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcastss_ps) (src.x);
+ res2.x = INTRINSIC (_mask_broadcastss_ps) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcastss_ps) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-1.c
new file mode 100644
index 0000000000..fa3655610c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vcmppd\[ \\t\]+\[^\n\]*\[^\}\]%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmppd\[ \\t\]+\[^\n\]*\[^\}\]%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+/* { dg-final { scan-assembler "vcmppd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmppd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_pd_mask (x, x, _CMP_FALSE_OQ);
+ m = _mm512_mask_cmp_pd_mask (m, x, x, _CMP_FALSE_OQ);
+ m = _mm512_cmp_round_pd_mask (x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+ m = _mm512_mask_cmp_round_pd_mask (m, x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-2.c
new file mode 100644
index 0000000000..add23d07a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmppd-2.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#if AVX512F_LEN == 512
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 8; i++) \
+ { \
+ dst_ref = (((int) rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_pd(s1); \
+ source2.x = _mm512_loadu_pd(s2); \
+ dst1 = _mm512_cmp_pd_mask(source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_pd_mask(mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((dst_ref & mask) != dst2) abort();
+#endif
+
+static void
+TEST ()
+{
+ UNION_TYPE (AVX512F_LEN, d) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+ double s1[8]={2134.3343, 6678.346, 453.345635, 54646.464,
+ 231.23311, 5674.455, 111.111111, 23241.152};
+ double s2[8]={41124.234, 6678.346, 8653.65635, 856.43576,
+ 231.23311, 4646.123, 111.111111, 124.12455};
+
+ CMP(_CMP_EQ_OQ, !isunordered(s1[i], s2[i]) && s1[i] == s2[i]);
+ CMP(_CMP_LT_OS, !isunordered(s1[i], s2[i]) && s1[i] < s2[i]);
+ CMP(_CMP_LE_OS, !isunordered(s1[i], s2[i]) && s1[i] <= s2[i]);
+ CMP(_CMP_UNORD_Q, isunordered(s1[i], s2[i]));
+ CMP(_CMP_NEQ_UQ, isunordered(s1[i], s2[i]) || s1[i] != s2[i]);
+ CMP(_CMP_NLT_US, isunordered(s1[i], s2[i]) || s1[i] >= s2[i]);
+ CMP(_CMP_NLE_US, isunordered(s1[i], s2[i]) || s1[i] > s2[i]);
+ CMP(_CMP_ORD_Q, !isunordered(s1[i], s2[i]));
+
+ CMP(_CMP_EQ_UQ, isunordered(s1[i], s2[i]) || s1[i] == s2[i]);
+ CMP(_CMP_NGE_US, isunordered(s1[i], s2[i]) || s1[i] < s2[i]);
+ CMP(_CMP_NGT_US, isunordered(s1[i], s2[i]) || s1[i] <= s2[i]);
+
+ CMP(_CMP_FALSE_OQ, 0);
+ CMP(_CMP_NEQ_OQ, !isunordered(s1[i], s2[i]) && s1[i] != s2[i]);
+ CMP(_CMP_GE_OS, !isunordered(s1[i], s2[i]) && s1[i] >= s2[i]);
+ CMP(_CMP_GT_OS, !isunordered(s1[i], s2[i]) && s1[i] > s2[i]);
+ CMP(_CMP_TRUE_UQ, 1);
+
+ CMP(_CMP_EQ_OS, !isunordered(s1[i], s2[i]) && s1[i] == s2[i]);
+ CMP(_CMP_LT_OQ, !isunordered(s1[i], s2[i]) && s1[i] < s2[i]);
+ CMP(_CMP_LE_OQ, !isunordered(s1[i], s2[i]) && s1[i] <= s2[i]);
+ CMP(_CMP_UNORD_S, isunordered(s1[i], s2[i]));
+ CMP(_CMP_NEQ_US, isunordered(s1[i], s2[i]) || s1[i] != s2[i]);
+ CMP(_CMP_NLT_UQ, isunordered(s1[i], s2[i]) || s1[i] >= s2[i]);
+ CMP(_CMP_NLE_UQ, isunordered(s1[i], s2[i]) || s1[i] > s2[i]);
+ CMP(_CMP_ORD_S, !isunordered(s1[i], s2[i]));
+ CMP(_CMP_EQ_US, isunordered(s1[i], s2[i]) || s1[i] == s2[i]);
+ CMP(_CMP_NGE_UQ, isunordered(s1[i], s2[i]) || s1[i] < s2[i]);
+ CMP(_CMP_NGT_UQ, isunordered(s1[i], s2[i]) || s1[i] <= s2[i]);
+ CMP(_CMP_FALSE_OS, 0);
+ CMP(_CMP_NEQ_OS, !isunordered(s1[i], s2[i]) && s1[i] != s2[i]);
+ CMP(_CMP_GE_OQ, !isunordered(s1[i], s2[i]) && s1[i] >= s2[i]);
+ CMP(_CMP_GT_OQ, !isunordered(s1[i], s2[i]) && s1[i] > s2[i]);
+ CMP(_CMP_TRUE_US, 1)
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-1.c
new file mode 100644
index 0000000000..b90be8c726
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vcmpps\[ \\t\]+\[^\n\]*\[^\}\]%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpps\[ \\t\]+\[^\n\]*\[^\}\]%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+/* { dg-final { scan-assembler "vcmpps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_ps_mask (x, x, _CMP_FALSE_OQ);
+ m = _mm512_mask_cmp_ps_mask (m, x, x, _CMP_FALSE_OQ);
+ m = _mm512_cmp_round_ps_mask (x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+ m = _mm512_mask_cmp_round_ps_mask (m, x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-2.c
new file mode 100644
index 0000000000..15c314e2d6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpps-2.c
@@ -0,0 +1,80 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#if AVX512F_LEN == 512
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 16; i++) \
+ { \
+ dst_ref = (((int) rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_ps(s1); \
+ source2.x = _mm512_loadu_ps(s2); \
+ dst1 = _mm512_cmp_ps_mask(source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_ps_mask(mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((dst_ref & mask) != dst2) abort();
+#endif
+
+static void
+TEST ()
+{
+ UNION_TYPE (AVX512F_LEN,) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+ float s1[16] = {2134.3343, 6678.346, 453.345635, 54646.464,
+ 231.23311, 5674.455, 111.111111, 23241.152,
+ 123.14811, 1245.124, 244.151353, 53454.141,
+ 926.16717, 3733.261, 643.161644, 23514.633};
+ float s2[16] = {41124.234, 6678.346, 8653.65635, 856.43576,
+ 231.23311, 4646.123, 111.111111, 124.12455,
+ 123.14811, 1245.124, 244.151353, 53454.141,
+ 2134.3343, 6678.346, 453.345635, 54646.464};
+
+ CMP(_CMP_EQ_OQ, !isunordered(s1[i], s2[i]) && s1[i] == s2[i]);
+ CMP(_CMP_LT_OS, !isunordered(s1[i], s2[i]) && s1[i] < s2[i]);
+ CMP(_CMP_LE_OS, !isunordered(s1[i], s2[i]) && s1[i] <= s2[i]);
+ CMP(_CMP_UNORD_Q, isunordered(s1[i], s2[i]));
+ CMP(_CMP_NEQ_UQ, isunordered(s1[i], s2[i]) || s1[i] != s2[i]);
+ CMP(_CMP_NLT_US, isunordered(s1[i], s2[i]) || s1[i] >= s2[i]);
+ CMP(_CMP_NLE_US, isunordered(s1[i], s2[i]) || s1[i] > s2[i]);
+ CMP(_CMP_ORD_Q, !isunordered(s1[i], s2[i]));
+
+ CMP(_CMP_EQ_UQ, isunordered(s1[i], s2[i]) || s1[i] == s2[i]);
+ CMP(_CMP_NGE_US, isunordered(s1[i], s2[i]) || s1[i] < s2[i]);
+ CMP(_CMP_NGT_US, isunordered(s1[i], s2[i]) || s1[i] <= s2[i]);
+
+ CMP(_CMP_FALSE_OQ, 0);
+ CMP(_CMP_NEQ_OQ, !isunordered(s1[i], s2[i]) && s1[i] != s2[i]);
+ CMP(_CMP_GE_OS, !isunordered(s1[i], s2[i]) && s1[i] >= s2[i]);
+ CMP(_CMP_GT_OS, !isunordered(s1[i], s2[i]) && s1[i] > s2[i]);
+ CMP(_CMP_TRUE_UQ, 1);
+
+ CMP(_CMP_EQ_OS, !isunordered(s1[i], s2[i]) && s1[i] == s2[i]);
+ CMP(_CMP_LT_OQ, !isunordered(s1[i], s2[i]) && s1[i] < s2[i]);
+ CMP(_CMP_LE_OQ, !isunordered(s1[i], s2[i]) && s1[i] <= s2[i]);
+ CMP(_CMP_UNORD_S, isunordered(s1[i], s2[i]));
+ CMP(_CMP_NEQ_US, isunordered(s1[i], s2[i]) || s1[i] != s2[i]);
+ CMP(_CMP_NLT_UQ, isunordered(s1[i], s2[i]) || s1[i] >= s2[i]);
+ CMP(_CMP_NLE_UQ, isunordered(s1[i], s2[i]) || s1[i] > s2[i]);
+ CMP(_CMP_ORD_S, !isunordered(s1[i], s2[i]));
+ CMP(_CMP_EQ_US, isunordered(s1[i], s2[i]) || s1[i] == s2[i]);
+ CMP(_CMP_NGE_UQ, isunordered(s1[i], s2[i]) || s1[i] < s2[i]);
+ CMP(_CMP_NGT_UQ, isunordered(s1[i], s2[i]) || s1[i] <= s2[i]);
+ CMP(_CMP_FALSE_OS, 0);
+ CMP(_CMP_NEQ_OS, !isunordered(s1[i], s2[i]) && s1[i] != s2[i]);
+ CMP(_CMP_GE_OQ, !isunordered(s1[i], s2[i]) && s1[i] >= s2[i]);
+ CMP(_CMP_GT_OQ, !isunordered(s1[i], s2[i]) && s1[i] > s2[i]);
+ CMP(_CMP_TRUE_US, 1)
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-1.c
new file mode 100644
index 0000000000..7f92fbea38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vcmpsd\[ \\t\]+\[^\n\]*\[^\}\]%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpsd\[ \\t\]+\[^\n\]*\[^\}\]%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+/* { dg-final { scan-assembler "vcmpsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm_cmp_sd_mask (x, x, _CMP_FALSE_OQ);
+ m = _mm_mask_cmp_sd_mask (m, x, x, _CMP_FALSE_OQ);
+ m = _mm_cmp_round_sd_mask (x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+ m = _mm_mask_cmp_round_sd_mask (m, x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-2.c
new file mode 100644
index 0000000000..3e4729e4aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpsd-2.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+
+#include "avx512f-check.h"
+#include <math.h>
+
+double s1[2] = {2134.3343, 6678.346};
+double s2[2] = {1485.1288, 6678.346};
+
+__mmask8 dst_ref;
+
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ dst_ref = ((int) rel) | dst_ref; \
+ source1 = _mm_loadu_pd(s1); \
+ source2 = _mm_loadu_pd(s2); \
+ dst = _mm_cmp_sd_mask(source1, source2, imm); \
+ dst2 = _mm_mask_cmp_sd_mask(mask, source1, source2, imm);\
+ if (dst_ref != dst) abort(); \
+ if ((dst_ref & mask) != dst2) abort();
+
+static void
+avx512f_test ()
+{
+ __m128d source1, source2;
+ __mmask8 dst, dst2, mask;
+ mask = 1;
+ int i;
+
+ CMP(_CMP_EQ_OQ, !isunordered(s1[0], s2[0]) && s1[0] == s2[0]);
+ CMP(_CMP_LT_OS, !isunordered(s1[0], s2[0]) && s1[0] < s2[0]);
+ CMP(_CMP_LE_OS, !isunordered(s1[0], s2[0]) && s1[0] <= s2[0]);
+ CMP(_CMP_UNORD_Q, isunordered(s1[0], s2[0]));
+ CMP(_CMP_NEQ_UQ, isunordered(s1[0], s2[0]) || s1[0] != s2[0]);
+ CMP(_CMP_NLT_US, isunordered(s1[0], s2[0]) || s1[0] >= s2[0]);
+ CMP(_CMP_NLE_US, isunordered(s1[0], s2[0]) || s1[0] > s2[0]);
+ CMP(_CMP_ORD_Q, !isunordered(s1[0], s2[0]));
+
+ CMP(_CMP_EQ_UQ, isunordered(s1[0], s2[0]) || s1[0] == s2[0]);
+ CMP(_CMP_NGE_US, isunordered(s1[0], s2[0]) || s1[0] < s2[0]);
+ CMP(_CMP_NGT_US, isunordered(s1[0], s2[0]) || s1[0] <= s2[0]);
+
+ CMP(_CMP_FALSE_OQ, 0);
+ CMP(_CMP_NEQ_OQ, !isunordered(s1[0], s2[0]) && s1[0] != s2[0]);
+ CMP(_CMP_GE_OS, !isunordered(s1[0], s2[0]) && s1[0] >= s2[0]);
+ CMP(_CMP_GT_OS, !isunordered(s1[0], s2[0]) && s1[0] > s2[0]);
+ CMP(_CMP_TRUE_UQ, 1);
+
+ CMP(_CMP_EQ_OS, !isunordered(s1[0], s2[0]) && s1[0] == s2[0]);
+ CMP(_CMP_LT_OQ, !isunordered(s1[0], s2[0]) && s1[0] < s2[0]);
+ CMP(_CMP_LE_OQ, !isunordered(s1[0], s2[0]) && s1[0] <= s2[0]);
+ CMP(_CMP_UNORD_S, isunordered(s1[0], s2[0]));
+ CMP(_CMP_NEQ_US, isunordered(s1[0], s2[0]) || s1[0] != s2[0]);
+ CMP(_CMP_NLT_UQ, isunordered(s1[0], s2[0]) || s1[0] >= s2[0]);
+ CMP(_CMP_NLE_UQ, isunordered(s1[0], s2[0]) || s1[0] > s2[0]);
+ CMP(_CMP_ORD_S, !isunordered(s1[0], s2[0]));
+ CMP(_CMP_EQ_US, isunordered(s1[0], s2[0]) || s1[0] == s2[0]);
+ CMP(_CMP_NGE_UQ, isunordered(s1[0], s2[0]) || s1[0] < s2[0]);
+ CMP(_CMP_NGT_UQ, isunordered(s1[0], s2[0]) || s1[0] <= s2[0]);
+ CMP(_CMP_FALSE_OS, 0);
+ CMP(_CMP_NEQ_OS, !isunordered(s1[0], s2[0]) && s1[0] != s2[0]);
+ CMP(_CMP_GE_OQ, !isunordered(s1[0], s2[0]) && s1[0] >= s2[0]);
+ CMP(_CMP_GT_OQ, !isunordered(s1[0], s2[0]) && s1[0] > s2[0]);
+ CMP(_CMP_TRUE_US, 1)
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-1.c
new file mode 100644
index 0000000000..9f370cb0e1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vcmpss\[ \\t\]+\[^\n\]*\[^\}\]%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpss\[ \\t\]+\[^\n\]*\[^\}\]%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+/* { dg-final { scan-assembler "vcmpss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vcmpss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm_cmp_ss_mask (x, x, _CMP_FALSE_OQ);
+ m = _mm_mask_cmp_ss_mask (m, x, x, _CMP_FALSE_OQ);
+ m = _mm_cmp_round_ss_mask (x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+ m = _mm_mask_cmp_round_ss_mask (m, x, x, _CMP_FALSE_OQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-2.c
new file mode 100644
index 0000000000..7343cb05cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcmpss-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+
+#include "avx512f-check.h"
+#include <math.h>
+
+float s1[4] = {2134.3343, 6678.346, 453.345635, 54646.464};
+float s2[4] = {1485.1288, 6678.346, 8653.65635, 856.43576};
+
+__mmask8 dst_ref;
+
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ dst_ref = ((int) rel) | dst_ref; \
+ source1 = _mm_loadu_ps(s1); \
+ source2 = _mm_loadu_ps(s2); \
+ dst = _mm_cmp_ss_mask(source1, source2, imm); \
+ dst2 = _mm_mask_cmp_ss_mask(mask, source1, source2, imm);\
+ if (dst_ref != dst) abort(); \
+ if ((dst_ref & mask)!= dst2) abort();
+
+static void
+avx512f_test ()
+{
+ __m128 source1, source2;
+ __mmask8 dst, dst2, mask;
+ int i;
+
+ mask = 1;
+
+ CMP(_CMP_EQ_OQ, !isunordered(s1[0], s2[0]) && s1[0] == s2[0]);
+ CMP(_CMP_LT_OS, !isunordered(s1[0], s2[0]) && s1[0] < s2[0]);
+ CMP(_CMP_LE_OS, !isunordered(s1[0], s2[0]) && s1[0] <= s2[0]);
+ CMP(_CMP_UNORD_Q, isunordered(s1[0], s2[0]));
+ CMP(_CMP_NEQ_UQ, isunordered(s1[0], s2[0]) || s1[0] != s2[0]);
+ CMP(_CMP_NLT_US, isunordered(s1[0], s2[0]) || s1[0] >= s2[0]);
+ CMP(_CMP_NLE_US, isunordered(s1[0], s2[0]) || s1[0] > s2[0]);
+ CMP(_CMP_ORD_Q, !isunordered(s1[0], s2[0]));
+
+ CMP(_CMP_EQ_UQ, isunordered(s1[0], s2[0]) || s1[0] == s2[0]);
+ CMP(_CMP_NGE_US, isunordered(s1[0], s2[0]) || s1[0] < s2[0]);
+ CMP(_CMP_NGT_US, isunordered(s1[0], s2[0]) || s1[0] <= s2[0]);
+
+ CMP(_CMP_FALSE_OQ, 0);
+ CMP(_CMP_NEQ_OQ, !isunordered(s1[0], s2[0]) && s1[0] != s2[0]);
+ CMP(_CMP_GE_OS, !isunordered(s1[0], s2[0]) && s1[0] >= s2[0]);
+ CMP(_CMP_GT_OS, !isunordered(s1[0], s2[0]) && s1[0] > s2[0]);
+ CMP(_CMP_TRUE_UQ, 1);
+
+ CMP(_CMP_EQ_OS, !isunordered(s1[0], s2[0]) && s1[0] == s2[0]);
+ CMP(_CMP_LT_OQ, !isunordered(s1[0], s2[0]) && s1[0] < s2[0]);
+ CMP(_CMP_LE_OQ, !isunordered(s1[0], s2[0]) && s1[0] <= s2[0]);
+ CMP(_CMP_UNORD_S, isunordered(s1[0], s2[0]));
+ CMP(_CMP_NEQ_US, isunordered(s1[0], s2[0]) || s1[0] != s2[0]);
+ CMP(_CMP_NLT_UQ, isunordered(s1[0], s2[0]) || s1[0] >= s2[0]);
+ CMP(_CMP_NLE_UQ, isunordered(s1[0], s2[0]) || s1[0] > s2[0]);
+ CMP(_CMP_ORD_S, !isunordered(s1[0], s2[0]));
+ CMP(_CMP_EQ_US, isunordered(s1[0], s2[0]) || s1[0] == s2[0]);
+ CMP(_CMP_NGE_UQ, isunordered(s1[0], s2[0]) || s1[0] < s2[0]);
+ CMP(_CMP_NGT_UQ, isunordered(s1[0], s2[0]) || s1[0] <= s2[0]);
+ CMP(_CMP_FALSE_OS, 0);
+ CMP(_CMP_NEQ_OS, !isunordered(s1[0], s2[0]) && s1[0] != s2[0]);
+ CMP(_CMP_GE_OQ, !isunordered(s1[0], s2[0]) && s1[0] >= s2[0]);
+ CMP(_CMP_GT_OQ, !isunordered(s1[0], s2[0]) && s1[0] > s2[0]);
+ CMP(_CMP_TRUE_US, 1)
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcomisd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcomisd-1.c
new file mode 100644
index 0000000000..7b5aff4e34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcomisd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vcomisd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm" } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile int res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm_comi_round_sd (x, x, _CMP_LT_OS, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcomiss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcomiss-1.c
new file mode 100644
index 0000000000..bc50419048
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcomiss-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcomiss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm" 1 } } */
+/* { dg-final { scan-assembler-times "vcomiss\[ \\t\]+\[^{}\n\]*%xmm" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile int res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm_comi_round_ss (x, x, _CMP_LT_OS, _MM_FROUND_NO_EXC);
+}
+
+void extern
+avx512f_test_2 (void)
+{
+ res = _mm_comi_round_ss (x, x, _CMP_LT_OS, _MM_FROUND_CUR_DIRECTION);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-1.c
new file mode 100644
index 0000000000..3f2cdff9c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcompresspd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcompresspd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vcompresspd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_compress_pd (x, m, x);
+ x = _mm512_maskz_compress_pd (m, x);
+
+ _mm512_mask_compressstoreu_pd (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-2.c
new file mode 100644
index 0000000000..4acbadbe72
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcompresspd-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#define MASK ((1 << SIZE) - 1)
+#include <x86intrin.h>
+
+static void
+CALC (double *s, double *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[k++] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s, res1, res2;
+ double res3[SIZE];
+ MASK_TYPE compressed_mask, mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i, mask_bit_count, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345 * (i + 200) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_compress_pd) (res1.x, mask, s.x);
+ res2.x = INTRINSIC (_maskz_compress_pd) (mask, s.x);
+ INTRINSIC (_mask_compressstoreu_pd) (res3, mask, s.x);
+
+ mask_bit_count = __popcntd (mask & MASK);
+ compressed_mask = (1 << mask_bit_count) - 1;
+ CALC (s.a, res_ref, mask);
+
+ MASK_MERGE (d) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, compressed_mask, SIZE);
+ if (checkVd (res3, res_ref, SIZE))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-1.c
new file mode 100644
index 0000000000..ab715c6fc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcompressps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcompressps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vcompressps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+float *p;
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_compress_ps (x, m, x);
+ x = _mm512_maskz_compress_ps (m, x);
+
+ _mm512_mask_compressstoreu_ps (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-2.c
new file mode 100644
index 0000000000..f996452b09
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcompressps-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define MASK ((1 << SIZE) - 1)
+#include <x86intrin.h>
+
+static void
+CALC (float *s, float *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[k++] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s, res1, res2;
+ float res3[SIZE];
+ MASK_TYPE compressed_mask, mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i, mask_bit_count, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345 * (i + 200) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_compress_ps) (res1.x, mask, s.x);
+ res2.x = INTRINSIC (_maskz_compress_ps) (mask, s.x);
+ INTRINSIC (_mask_compressstoreu_ps) (res3, mask, s.x);
+
+ mask_bit_count = __popcntd (mask & MASK);
+ compressed_mask = (1 << mask_bit_count) - 1;
+ CALC (s.a, res_ref, mask);
+
+ MASK_MERGE () (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, compressed_mask, SIZE);
+ if (checkVf (res3, res_ref, SIZE))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-1.c
new file mode 100644
index 0000000000..d2c616b08b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtdq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512d res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi32_pd (s);
+ res = _mm512_mask_cvtepi32_pd (res, m, s);
+ res = _mm512_maskz_cvtepi32_pd (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-2.c
new file mode 100644
index 0000000000..77cdbab0ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2pd-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN_HALF) / 32)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN) / 64)
+
+static void
+CALC (int *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ {
+ r[i] = (double) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) s;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[DST_SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123456 * (i + 2000) * sign;
+ sign = -sign;
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtepi32_pd) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi32_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi32_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-1.c
new file mode 100644
index 0000000000..7c326f0bbe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtdq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512 res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi32_ps (s);
+ res = _mm512_mask_cvtepi32_ps (res, m, s);
+ res = _mm512_maskz_cvtepi32_ps (m, s);
+ res = _mm512_cvt_roundepi32_ps (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundepi32_ps (res, m, s, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundepi32_ps (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-2.c
new file mode 100644
index 0000000000..4a3e3aa4ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtdq2ps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (float) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s;
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123456 * (i + 2000) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi32_ps) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi32_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi32_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-1.c
new file mode 100644
index 0000000000..2a6d38c463
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2dq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtpd_epi32 (s);
+ res = _mm512_mask_cvtpd_epi32 (res, m, s);
+ res = _mm512_maskz_cvtpd_epi32 (m, s);
+ res = _mm512_cvt_roundpd_epi32 (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundpd_epi32 (res, m, s, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundpd_epi32 (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-2.c
new file mode 100644
index 0000000000..5ecb640aec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2dq-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+
+static void
+CALC (double *s, unsigned *r)
+{
+ int i;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ r[i] = (s[i] >= 0) ? (int) (s[i] + 0.5)
+ : (int) (s[i] - 0.5);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[DST_SIZE] = { 0 };
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000) * sign;
+ sign = -sign;
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtpd_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtpd_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtpd_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-1.c
new file mode 100644
index 0000000000..baa8b08487
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 6 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m256 y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_cvtpd_ps (x);
+ y = _mm512_mask_cvtpd_ps (y, 4, x);
+ y = _mm512_maskz_cvtpd_ps (6, x);
+ y = _mm512_cvt_roundpd_ps (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ y = _mm512_mask_cvt_roundpd_ps (y, 4, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ y = _mm512_maskz_cvt_roundpd_ps (6, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-2.c
new file mode 100644
index 0000000000..fa17ef9aa4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2ps-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (float *e, UNION_TYPE (AVX512F_LEN, d) s1)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ e[i] = (float) s1.a[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1;
+ UNION_TYPE (AVX512F_LEN_HALF,) u1, u2, u3;
+ MASK_TYPE mask = MASK_VALUE;
+ float e[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 0.12 * (i + 37.09);
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_cvtpd_ps) (s1.x);
+ u2.x = INTRINSIC (_mask_cvtpd_ps) (u2.x, mask, s1.x);
+ u3.x = INTRINSIC (_maskz_cvtpd_ps) (mask, s1.x);
+
+ CALC (e, s1);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF,) (u1, e))
+ abort ();
+
+ MASK_MERGE ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF,) (u2, e))
+ abort ();
+
+ MASK_ZERO ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF,) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-1.c
new file mode 100644
index 0000000000..33651e3f8a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtpd2udq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtpd_epu32 (s);
+ res = _mm512_mask_cvtpd_epu32 (res, m, s);
+ res = _mm512_maskz_cvtpd_epu32 (m, s);
+ res = _mm512_cvt_roundpd_epu32 (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundpd_epu32 (res, m, s, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundpd_epu32 (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-2.c
new file mode 100644
index 0000000000..24788d97a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtpd2udq-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+
+static void
+CALC (double *s, unsigned *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ {
+ r[i] = (unsigned) (s[i] + 0.5);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[DST_SIZE] = { 0 };
+ int i;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtpd_epu32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtpd_epu32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtpd_epu32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-1.c
new file mode 100644
index 0000000000..b22a950dd6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 6 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtph2ps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i x;
+volatile __m512 y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_cvtph_ps (x);
+ y = _mm512_mask_cvtph_ps (y, 4, x);
+ y = _mm512_maskz_cvtph_ps (6, x);
+ y = _mm512_cvt_roundph_ps (x, _MM_FROUND_NO_EXC);
+ y = _mm512_mask_cvt_roundph_ps (y, 4, x, _MM_FROUND_NO_EXC);
+ y = _mm512_maskz_cvt_roundph_ps (6, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-2.c
new file mode 100644
index 0000000000..725e1e87bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtph2ps-2.c
@@ -0,0 +1,84 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) val;
+ UNION_TYPE (AVX512F_LEN,) res1,res2,res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float exp[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ exp[0] = 1;
+ exp[1] = 2;
+ exp[2] = 4;
+ exp[3] = 8;
+#if AVX512F_LEN > 128
+ exp[4] = -1;
+ exp[5] = -2;
+ exp[6] = -4;
+ exp[7] = -8;
+#endif
+#if AVX512F_LEN > 256
+ exp[8] = 1;
+ exp[9] = 2;
+ exp[10] = 4;
+ exp[11] = 8;
+ exp[12] = -1;
+ exp[13] = -2;
+ exp[14] = -4;
+ exp[15] = -8;
+#endif
+
+ val.a[0] = 0x3c00;
+ val.a[1] = 0x4000;
+ val.a[2] = 0x4400;
+ val.a[3] = 0x4800;
+#if AVX512F_LEN > 128
+ val.a[4] = 0xbc00;
+ val.a[5] = 0xc000;
+ val.a[6] = 0xc400;
+ val.a[7] = 0xc800;
+#endif
+#if AVX512F_LEN > 256
+ val.a[8] = 0x3c00;
+ val.a[9] = 0x4000;
+ val.a[10] = 0x4400;
+ val.a[11] = 0x4800;
+ val.a[12] = 0xbc00;
+ val.a[13] = 0xc000;
+ val.a[14] = 0xc400;
+ val.a[15] = 0xc800;
+#endif
+
+ res1.x = _mm512_cvtph_ps (val.x);
+ res2.x = _mm512_mask_cvtph_ps (res2.x, mask, val.x);
+ res3.x = _mm512_maskz_cvtph_ps (mask, val.x);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, exp))
+ abort ();
+
+ MASK_MERGE () (exp, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, exp))
+ abort ();
+
+ MASK_ZERO () (exp, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, exp))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-1.c
new file mode 100644
index 0000000000..7879e170e8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2dq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtps_epi32 (s);
+ res = _mm512_mask_cvtps_epi32 (res, m, s);
+ res = _mm512_maskz_cvtps_epi32 (m, s);
+ res = _mm512_cvt_roundps_epi32 (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundps_epi32 (res, m, s, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundps_epi32 (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-2.c
new file mode 100644
index 0000000000..a35c2ad02d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2dq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s[i] >= 0) ? (int) (s[i] + 0.5) : (int) (s[i] - 0.5);
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ res2.a[i] = DEFAULT_VALUE;
+ src.a[i] = 1.5 + 34.67 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_cvtps_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_cvtps_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtps_epi32) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-1.c
new file mode 100644
index 0000000000..c6fc473372
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2pd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256 s;
+volatile __m512d res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtps_pd (s);
+ res = _mm512_mask_cvtps_pd (res, m, s);
+ res = _mm512_maskz_cvtps_pd (m, s);
+ res = _mm512_cvt_roundps_pd (s, _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundps_pd (res, m, s, _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundps_pd (m, s, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-2.c
new file mode 100644
index 0000000000..5bed4f33fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2pd-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN_HALF) / 32)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN) / 64)
+
+static void
+CALC (float *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ {
+ r[i] = (double) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, ) s;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[DST_SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000) * sign;
+ sign = -sign;
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtps_pd) (s.x);
+ res2.x = INTRINSIC (_mask_cvtps_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtps_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-1.c
new file mode 100644
index 0000000000..daf701484a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtps2ph\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vcvtps2ph\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2ph\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m256i y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_cvtps_ph (x, 0);
+ y = _mm512_maskz_cvtps_ph (4, x, 0);
+ y = _mm512_mask_cvtps_ph (y, 2, x, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
new file mode 100644
index 0000000000..6fe9effd6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2ph-2.c
@@ -0,0 +1,84 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) val;
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) res1,res2,res3;
+ MASK_TYPE mask = MASK_VALUE;
+ short exp[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ val.a[0] = 1;
+ val.a[1] = 2;
+ val.a[2] = 4;
+ val.a[3] = 8;
+#if AVX512F_LEN > 128
+ val.a[4] = -1;
+ val.a[5] = -2;
+ val.a[6] = -4;
+ val.a[7] = -8;
+#endif
+#if AVX512F_LEN > 256
+ val.a[8] = 1;
+ val.a[9] = 2;
+ val.a[10] = 4;
+ val.a[11] = 8;
+ val.a[12] = -1;
+ val.a[13] = -2;
+ val.a[14] = -4;
+ val.a[15] = -8;
+#endif
+
+ exp[0] = 0x3c00;
+ exp[1] = 0x4000;
+ exp[2] = 0x4400;
+ exp[3] = 0x4800;
+#if AVX512F_LEN > 128
+ exp[4] = 0xbc00;
+ exp[5] = 0xc000;
+ exp[6] = 0xc400;
+ exp[7] = 0xc800;
+#endif
+#if AVX512F_LEN > 256
+ exp[8] = 0x3c00;
+ exp[9] = 0x4000;
+ exp[10] = 0x4400;
+ exp[11] = 0x4800;
+ exp[12] = 0xbc00;
+ exp[13] = 0xc000;
+ exp[14] = 0xc400;
+ exp[15] = 0xc800;
+#endif
+
+ res1.x = _mm512_cvtps_ph (val.x, 0);
+ res2.x = _mm512_mask_cvtps_ph (res2.x, mask, val.x, 0);
+ res3.x = _mm512_maskz_cvtps_ph (mask, val.x, 0);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res1, exp))
+ abort ();
+
+ MASK_MERGE (i_w) (exp, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, exp))
+ abort ();
+
+ MASK_ZERO (i_w) (exp, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, exp))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-1.c
new file mode 100644
index 0000000000..b1d9b91438
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtps2udq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtps_epu32 (s);
+ res = _mm512_mask_cvtps_epu32 (res, m, s);
+ res = _mm512_maskz_cvtps_epu32 (m, s);
+ res = _mm512_cvt_roundps_epu32 (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundps_epu32 (res, m, s, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundps_epu32 (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-2.c
new file mode 100644
index 0000000000..7826e2d795
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtps2udq-2.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ r[i] = (unsigned) (s[i] + 0.5);
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1.5 + 34.67 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtps_epu32) (src.x);
+ res2.x = INTRINSIC (_mask_cvtps_epu32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtps_epu32) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si-1.c
new file mode 100644
index 0000000000..219fc7147f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtsd2si\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvt_roundsd_i32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si64-1.c
new file mode 100644
index 0000000000..7a9f1d8930
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2si64-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtsd2siq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvt_roundsd_i64 (x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2ss-1.c
new file mode 100644
index 0000000000..8aadb9ae01
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2ss-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtsd2ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 s1, r;
+volatile __m128d s2;
+
+void extern
+avx512f_test (void)
+{
+ r = _mm_cvt_roundsd_ss (s1, s2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-1.c
new file mode 100644
index 0000000000..ec28c865a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtsd2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtsd2usi\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvtsd_u32 (x);
+ y = _mm_cvt_roundsd_u32 (x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-2.c
new file mode 100644
index 0000000000..e53012446e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union128d s1;
+ unsigned int d;
+ unsigned int e;
+
+ s1.x = _mm_set_pd (24.43, 68.346);
+ d = _mm_cvtsd_u32 (s1.x);
+ e = (unsigned int)(s1.a[0] + 0.5);
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-1.c
new file mode 100644
index 0000000000..f76e752b65
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtsd2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtsd2usi\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvtsd_u64 (x);
+ y = _mm_cvt_roundsd_u64 (x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-2.c
new file mode 100644
index 0000000000..92843d9e36
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsd2usi64-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union128d s1;
+ unsigned long long d;
+ unsigned long long e;
+
+ s1.x = _mm_set_pd (24.43, 68.346);
+ d = _mm_cvtsd_u64 (s1.x);
+ e = (unsigned long long)(s1.a[0] + 0.5);
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c
new file mode 100644
index 0000000000..d5e18fbf80
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2sd64-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtsi2sdq\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile long long n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvt_roundi64_sd (x, n, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c
new file mode 100644
index 0000000000..1adca43f23
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtsi2ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile int n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvt_roundi32_ss (x, n, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c
new file mode 100644
index 0000000000..0980926660
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtsi2ss64-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtsi2ssq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile long long n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvt_roundi64_ss (x, n, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2sd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2sd-1.c
new file mode 100644
index 0000000000..5b6a43f547
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2sd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtss2sd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d s1, r;
+volatile __m128 s2;
+
+void extern
+avx512f_test (void)
+{
+ r = _mm_cvt_roundss_sd (s1, s2, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si-1.c
new file mode 100644
index 0000000000..a0998a9efe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtss2si\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvt_roundss_i32 (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si64-1.c
new file mode 100644
index 0000000000..e429ead958
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2si64-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtss2siq\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvt_roundss_i64 (x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-1.c
new file mode 100644
index 0000000000..cc3bfcebeb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtss2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtss2usi\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvtss_u32 (x);
+ y = _mm_cvt_roundss_u32 (x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-2.c
new file mode 100644
index 0000000000..bdfab83095
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union128 s1;
+ unsigned int d;
+ unsigned int e;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 35.7765, 34508.51);
+ d = _mm_cvtss_u32 (s1.x);
+ e = (unsigned int)(s1.a[0] + 0.5);
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-1.c
new file mode 100644
index 0000000000..6c5b018708
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvtss2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtss2usi\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvtss_u64 (x);
+ y = _mm_cvt_roundss_u64 (x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-2.c
new file mode 100644
index 0000000000..d19da31719
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtss2usi64-2.c
@@ -0,0 +1,20 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union128 s1;
+ unsigned long long d;
+ unsigned long long e;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 12.34, 80.67);
+ d = _mm_cvtss_u64 (s1.x);
+ e = (unsigned long long)(s1.a[0] + 0.5);
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-1.c
new file mode 100644
index 0000000000..5fad1e354c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvttpd_epi32 (s);
+ res = _mm512_mask_cvttpd_epi32 (res, m, s);
+ res = _mm512_maskz_cvttpd_epi32 (m, s);
+ res = _mm512_cvtt_roundpd_epi32 (s, _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvtt_roundpd_epi32 (res, m, s, _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvtt_roundpd_epi32 (m, s, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-2.c
new file mode 100644
index 0000000000..f73c5c3c9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2dq-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+
+static void
+CALC (double *s, int *r)
+{
+ int i;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ r[i] = (int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[DST_SIZE] = { 0 };
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000) * sign;
+ sign = -sign;
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvttpd_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvttpd_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvttpd_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-1.c
new file mode 100644
index 0000000000..36f2e40c59
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttpd2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvttpd_epu32 (s);
+ res = _mm512_mask_cvttpd_epu32 (res, m, s);
+ res = _mm512_maskz_cvttpd_epu32 (m, s);
+ res = _mm512_cvtt_roundpd_epu32 (s, _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvtt_roundpd_epu32 (res, m, s, _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvtt_roundpd_epu32 (m, s, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-2.c
new file mode 100644
index 0000000000..a8d3adc8d4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttpd2udq-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN_HALF) / 32)
+
+static void
+CALC (double *s, unsigned *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ {
+ r[i] = (unsigned) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[DST_SIZE] = { 0 };
+ int i;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvttpd_epu32) (s.x);
+ res2.x = INTRINSIC (_mask_cvttpd_epu32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvttpd_epu32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SRC_SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-1.c
new file mode 100644
index 0000000000..a156dbee9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2dq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvttps_epi32 (s);
+ res = _mm512_mask_cvttps_epi32 (res, m, s);
+ res = _mm512_maskz_cvttps_epi32 (m, s);
+ res = _mm512_cvtt_roundps_epi32 (s, _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvtt_roundps_epi32 (res, m, s, _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvtt_roundps_epi32 (m, s, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-2.c
new file mode 100644
index 0000000000..f2cb5c708d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2dq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ r[i] = (int) s[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ res2.a[i] = DEFAULT_VALUE;
+ src.a[i] = 1.5 + 34.67 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_cvttps_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_cvttps_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvttps_epi32) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-1.c
new file mode 100644
index 0000000000..ffbfdfca32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvttps2udq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvttps_epu32 (s);
+ res = _mm512_mask_cvttps_epu32 (res, m, s);
+ res = _mm512_maskz_cvttps_epu32 (m, s);
+ res = _mm512_cvtt_roundps_epu32 (s, _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvtt_roundps_epu32 (res, m, s, _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvtt_roundps_epu32 (m, s, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-2.c
new file mode 100644
index 0000000000..2b0212e1c5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttps2udq-2.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned *r, float *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ r[i] = (unsigned) s[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN,) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1.5 + 34.67 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvttps_epu32) (src.x);
+ res2.x = INTRINSIC (_mask_cvttps_epu32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvttps_epu32) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-1.c
new file mode 100644
index 0000000000..e813a24a0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttsd2si\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttsd2si\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttsd_i32 (x);
+ y = _mm_cvtt_roundsd_i32 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-2.c
new file mode 100644
index 0000000000..a447a87342
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si-2.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+static int
+__attribute__ ((noinline, unused))
+test (__m128d x)
+{
+ return _mm_cvttsd_i32 (x);
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1;
+ int res, res_ref;
+
+ s1.x = _mm_set_pd (123.321, 456.987);
+ res = test (s1.x);
+ res_ref = (int) s1.a[0];
+
+ if (res != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-1.c
new file mode 100644
index 0000000000..a3b870c100
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttsd2siq\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttsd2siq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttsd_i64 (x);
+ y = _mm_cvtt_roundsd_i64 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-2.c
new file mode 100644
index 0000000000..7b759c1fa9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2si64-2.c
@@ -0,0 +1,28 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+static int
+__attribute__ ((noinline, unused))
+test (__m128d x)
+{
+ return _mm_cvttsd_i64 (x);
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1;
+ long long res, res_ref;
+
+ s1.x = _mm_set_pd (123.321, 456.987);
+ res = test (s1.x);
+ res_ref = (long long) s1.a[0];
+
+ if (res != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-1.c
new file mode 100644
index 0000000000..3a88517a73
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttsd2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttsd2usi\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttsd_u32 (x);
+ y = _mm_cvtt_roundsd_u32 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-2.c
new file mode 100644
index 0000000000..00f7eb6e5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static unsigned int
+__attribute__((noinline, unused))
+test (union128d s1)
+{
+ return _mm_cvttsd_u32 (s1.x);
+}
+
+void static
+avx512f_test (void)
+{
+ union128d s1;
+ unsigned int d;
+ unsigned int e;
+
+ s1.x = _mm_set_pd (24.43, 68.346);
+ d = test (s1);
+ e = (unsigned int)s1.a[0];
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-1.c
new file mode 100644
index 0000000000..87bbcb7be6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttsd2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttsd2usi\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttsd_u64 (x);
+ y = _mm_cvtt_roundsd_u64 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-2.c
new file mode 100644
index 0000000000..4aa45ef826
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttsd2usi64-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static unsigned long long
+__attribute__((noinline, unused))
+test (union128d s1)
+{
+ return _mm_cvttsd_u64 (s1.x);
+}
+
+void static
+avx512f_test (void)
+{
+ union128d s1;
+ unsigned long long d;
+ unsigned long long e;
+
+ s1.x = _mm_set_pd (24.43, 68.346);
+ d = test (s1);
+ e = (unsigned long long)s1.a[0];
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-1.c
new file mode 100644
index 0000000000..7669a1729a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttss2si\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttss2si\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttss_i32 (x);
+ y = _mm_cvtt_roundss_i32 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-2.c
new file mode 100644
index 0000000000..2aa62c0714
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si-2.c
@@ -0,0 +1,28 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+static int
+__attribute__ ((noinline, unused))
+test (__m128 x)
+{
+ return _mm_cvttss_i32 (x);
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1;
+ int res, res_ref;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 43.35, 546.46);
+ res = test (s1.x);
+ res_ref = (int) s1.a[0];
+
+ if (res != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-1.c
new file mode 100644
index 0000000000..4888d6d1d9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttss2siq\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttss2siq\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttss_i64 (x);
+ y = _mm_cvtt_roundss_i64 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-2.c
new file mode 100644
index 0000000000..cf33b997a8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2si64-2.c
@@ -0,0 +1,28 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+static int
+__attribute__ ((noinline, unused))
+test (__m128 x)
+{
+ return _mm_cvttss_i64 (x);
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1;
+ long long res, res_ref;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 43.35, 546.46);
+ res = test (s1.x);
+ res_ref = (long long) s1.a[0];
+
+ if (res != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-1.c
new file mode 100644
index 0000000000..b270276352
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttss2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttss2usi\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttss_u32 (x);
+ y = _mm_cvtt_roundss_u32 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-2.c
new file mode 100644
index 0000000000..4d19104776
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static unsigned int
+__attribute__((noinline, unused))
+test (union128 s1)
+{
+ return _mm_cvttss_u32 (s1.x);
+}
+
+void static
+avx512f_test (void)
+{
+ union128 s1;
+ unsigned int d;
+ unsigned int e;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 45.12, 90.97);
+ d = test (s1);
+ e = (unsigned int)s1.a[0];
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-1.c
new file mode 100644
index 0000000000..7c3b473c3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vcvttss2usi\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvttss2usi\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned long long y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm_cvttss_u64 (x);
+ y = _mm_cvtt_roundss_u64 (x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-2.c
new file mode 100644
index 0000000000..85f55d6cd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvttss2usi64-2.c
@@ -0,0 +1,27 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static unsigned long long
+__attribute__((noinline, unused))
+test (union128 s1)
+{
+ return _mm_cvttss_u64 (s1.x);
+}
+
+void static
+avx512f_test (void)
+{
+ union128 s1;
+ unsigned long long d;
+ unsigned long long e;
+
+ s1.x = _mm_set_ps (24.43, 68.346, 10.756, 89.145);
+ d = test (s1);
+ e = (unsigned long long)s1.a[0];
+
+ if (e != d)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-1.c
new file mode 100644
index 0000000000..933e785e86
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtudq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2pd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512d res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu32_pd (s);
+ res = _mm512_mask_cvtepu32_pd (res, m, s);
+ res = _mm512_maskz_cvtepu32_pd (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-2.c
new file mode 100644
index 0000000000..814a7b769c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2pd-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE ((AVX512F_LEN_HALF) / 32)
+#include "avx512f-mask-type.h"
+#define DST_SIZE ((AVX512F_LEN) / 64)
+
+static void
+CALC (unsigned *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ {
+ r[i] = (double) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) s;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[DST_SIZE];
+ int i;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s.a[i] = 123456 * (i + 2000);
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_cvtepu32_pd) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu32_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu32_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-1.c
new file mode 100644
index 0000000000..cb904b95d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vcvtudq2ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m512 res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu32_ps (s);
+ res = _mm512_mask_cvtepu32_ps (res, m, s);
+ res = _mm512_maskz_cvtepu32_ps (m, s);
+ res = _mm512_cvt_roundepu32_ps (s, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ res = _mm512_mask_cvt_roundepu32_ps (res, m, s, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ res = _mm512_maskz_cvt_roundepu32_ps (m, s, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-2.c
new file mode 100644
index 0000000000..c43df063ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtudq2ps-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (float) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s;
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123456 * (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu32_ps) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu32_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu32_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-1.c
new file mode 100644
index 0000000000..b00c321c50
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vcvtusi2sd\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvtu32_sd (x, n);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-2.c
new file mode 100644
index 0000000000..2100cbeb42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd-2.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static void
+ __attribute__ ((noinline, unused))
+compute_vcvtusi2sd (double *s1, unsigned s2, double *r)
+{
+ r[0] = (double) s2;
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1, res;
+ unsigned s2;
+ double res_ref[2];
+
+ s1.x = _mm_set_pd (-24.43, -43.35);
+ s2 = 0xFEDCA987;
+
+ res.x = _mm_cvtu32_sd (s1.x, s2);
+
+ compute_vcvtusi2sd (s1.a, s2, res_ref);
+
+ if (check_union128d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c
new file mode 100644
index 0000000000..9bfafce46e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2sd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile unsigned long long n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvtu64_sd (x, n);
+ x = _mm_cvt_roundu64_sd (x, n, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-2.c
new file mode 100644
index 0000000000..997e21bb54
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2sd64-2.c
@@ -0,0 +1,31 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static void
+ __attribute__ ((noinline, unused))
+compute_vcvtusi2sd (double *s1, unsigned long long s2, double *r)
+{
+ r[0] = (double) s2;
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1, res;
+ unsigned long long s2;
+ double res_ref[4];
+
+ s1.x = _mm_set_pd (-24.43, -43.35);
+ s2 = 0xFEDCBA9876543210;
+
+ res.x = _mm_cvtu64_sd (s1.x, s2);
+
+ compute_vcvtusi2sd (s1.a, s2, res_ref);
+
+ if (check_union128d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c
new file mode 100644
index 0000000000..5214af6ee1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvtu32_ss (x, n);
+ x = _mm_cvt_roundu32_ss (x, n, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-2.c
new file mode 100644
index 0000000000..b5f67dd0ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss-2.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static void
+ __attribute__ ((noinline, unused))
+compute_vcvtusi2ss (float *s1, unsigned s2, float *r)
+{
+ r[0] = (float) s2;
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1, res;
+ unsigned s2;
+ float res_ref[4];
+
+ s1.x = _mm_set_ps (-24.43, 68.346, -43.35, 546.46);
+ s2 = 0xFEDCA987;
+
+ res.x = _mm_cvtu32_ss (s1.x, s2);
+
+ compute_vcvtusi2ss (s1.a, s2, res_ref);
+
+ if (check_union128 (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c
new file mode 100644
index 0000000000..70ed64a2d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*%xmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vcvtusi2ss\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile unsigned long long n;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_cvtu64_ss (x, n);
+ x = _mm_cvt_roundu64_ss (x, n, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-2.c
new file mode 100644
index 0000000000..eeb499aac9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vcvtusi2ss64-2.c
@@ -0,0 +1,33 @@
+/* { dg-do run { target { ! { ia32 } } } } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+static void
+ __attribute__ ((noinline, unused))
+compute_vcvtusi2ss (float *s1, unsigned long long s2, float *r)
+{
+ r[0] = (float) s2;
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1, res;
+ unsigned long long s2;
+ float res_ref[4];
+
+ s1.x = _mm_set_ps (-24.43, 68.346, -43.35, 546.46);
+ s2 = 0xFEDCBA9876543210;
+
+ res.x = _mm_cvtu64_ss (s1.x, s2);
+
+ compute_vcvtusi2ss (s1.a, s2, res_ref);
+
+ if (check_union128 (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-1.c
new file mode 100644
index 0000000000..2695ecb1d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vdivpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_div_pd (x, x);
+ x = _mm512_mask_div_pd (x, m, x, x);
+ x = _mm512_maskz_div_pd (m, x, x);
+ x = _mm512_div_round_pd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_div_round_pd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_div_round_pd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-2.c
new file mode 100644
index 0000000000..761ee20f89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] / s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign + 1.0;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_div_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_div_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_div_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivps-1.c
new file mode 100644
index 0000000000..367b1af46b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vdivps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_div_ps (x, x);
+ x = _mm512_mask_div_ps (x, m, x, x);
+ x = _mm512_maskz_div_ps (m, x, x);
+ x = _mm512_div_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_div_round_ps (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_div_round_ps (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivps-2.c
new file mode 100644
index 0000000000..f5a7b78f7a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] / s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign + 1.0;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_div_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_div_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_div_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivsd-1.c
new file mode 100644
index 0000000000..605304b318
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivsd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vdivsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_div_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vdivss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vdivss-1.c
new file mode 100644
index 0000000000..27303ba3a0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vdivss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vdivss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_div_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vec-init.c b/gcc/testsuite/gcc.target/i386/avx512f-vec-init.c
new file mode 100644
index 0000000000..acbd34f3f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vec-init.c
@@ -0,0 +1,121 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+%zmm" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd" 1 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq" 1 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastb" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastw" 2 } } */
+/* { dg-final { scan-assembler-times "vbroadcastss" 1 } } */
+/* { dg-final { scan-assembler-times "vbroadcastsd" 1 } } */
+
+#include <x86intrin.h>
+
+typedef char __v64qi __attribute__ ((vector_size (64)));
+typedef short __v32hi __attribute__ ((vector_size (64)));
+
+__v64qi foo_1 (char c)
+{
+ __v64qi v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v32hi foo_2 (short c)
+{
+ __v32hi v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v16si foo_3 (int c)
+{
+ __v16si v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v8di foo_4 (long long c)
+{
+ __v8di v1 = {
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v32qi foo_5 (char c)
+{
+ __v32qi v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v16hi foo_6 (short c)
+{
+ __v16hi v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v8si foo_7 (int c)
+{
+ __v8si v1 = {
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v4di foo_8 (long long c)
+{
+ __v4di v1 = {
+ c, c, c, c
+ };
+
+ return v1;
+}
+
+
+__v16qi foo_9 (char c)
+{
+ __v16qi v1 = {
+ c, c, c, c, c, c, c, c,
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
+
+__v8hi foo_10(short c)
+{
+ __v8hi v1 = {
+ c, c, c, c, c, c, c, c
+ };
+
+ return v1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vec-unpack.c b/gcc/testsuite/gcc.target/i386/avx512f-vec-unpack.c
new file mode 100644
index 0000000000..8dcdac7b06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vec-unpack.c
@@ -0,0 +1,127 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f" } */
+
+long long *D;
+int *S;
+short *H;
+char *Q;
+
+long long foo_unpack_1 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ D[i] *= S[i];
+
+ return D[ind];
+}
+
+long long foo_unpack_2 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ D[i] *= H[i];
+
+ return D[ind];
+}
+
+long long foo_unpack_3 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ D[i] *= Q[i];
+
+ return D[ind];
+}
+
+int foo_unpack_4 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ S[i] *= H[i];
+
+ return S[ind];
+}
+
+int foo_unpack_5 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ S[i] *= Q[i];
+
+ return S[ind];
+}
+
+short foo_unpack_6 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ H[i] *= Q[i];
+
+ return H[ind];
+}
+
+int foo_expand_1 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ S[i] *= D[i];
+
+ return S[ind];
+}
+
+short foo_expand_2 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ H[i] *= D[i];
+
+ return H[ind];
+}
+
+char foo_expand_3 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ Q[i] *= D[i];
+
+ return Q[ind];
+}
+
+short foo_expand_4 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ H[i] *= S[i];
+
+ return H[ind];
+}
+
+char foo_expand_5 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ Q[i] *= S[i];
+
+ return Q[ind];
+}
+
+char foo_expand_6 (int low, int high, int ind)
+{
+ int i;
+
+ for (i = low; i <= high; i++)
+ Q[i] *= H[i];
+
+ return Q[ind];
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-1.c
new file mode 100644
index 0000000000..b7648c6d02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 4 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexpandpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_expand_pd (x, m, x);
+ x = _mm512_maskz_expand_pd (m, x);
+
+ x = _mm512_mask_expandloadu_pd (x, m, p);
+ x = _mm512_maskz_expandloadu_pd (m, p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-2.c
new file mode 100644
index 0000000000..373c17df16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vexpandpd-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s, double *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, res2, res3, res4, res5;
+ MASK_TYPE mask = MASK_VALUE;
+ double s2[SIZE];
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ double res_ref3[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 123.456 * (i + 200) * sign;
+ s2[i] = 789.012 * (i + 300) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_pd) (res2.x, mask, s1.x);
+ res3.x = INTRINSIC (_maskz_expand_pd) (mask, s1.x);
+ res4.x = INTRINSIC (_mask_expandloadu_pd) (res4.x, mask, s2);
+ res5.x = INTRINSIC (_maskz_expandloadu_pd) (mask, s2);
+
+ /* no mask is the same as all ones mask. */
+ CALC (s1.a, res_ref1, MASK_ALL_ONES);
+ CALC (s1.a, res_ref2, mask);
+ CALC (s2, res_ref3, mask);
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref2))
+ abort ();
+
+ MASK_ZERO (d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref2))
+ abort ();
+
+ MASK_MERGE (d) (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res4, res_ref3))
+ abort ();
+
+ MASK_ZERO (d) (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res5, res_ref3))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-1.c
new file mode 100644
index 0000000000..b0a36c300d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 4 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vexpandps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+
+#include <immintrin.h>
+
+float *p;
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_expand_ps (x, m, x);
+ x = _mm512_maskz_expand_ps (m, x);
+
+ x = _mm512_mask_expandloadu_ps (x, m, p);
+ x = _mm512_maskz_expandloadu_ps (m, p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-2.c
new file mode 100644
index 0000000000..7143c8ae23
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vexpandps-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s, float *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, res2, res3, res4, res5;
+ MASK_TYPE mask = MASK_VALUE;
+ float s2[SIZE];
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ float res_ref3[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 123.456 * (i + 200) * sign;
+ s2[i] = 789.012 * (i + 300) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res4.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res2.x = INTRINSIC (_mask_expand_ps) (res2.x, mask, s1.x);
+ res3.x = INTRINSIC (_maskz_expand_ps) (mask, s1.x);
+ res4.x = INTRINSIC (_mask_expandloadu_ps) (res4.x, mask, s2);
+ res5.x = INTRINSIC (_maskz_expandloadu_ps) (mask, s2);
+
+ CALC (s1.a, res_ref1, MASK_ALL_ONES);
+ CALC (s1.a, res_ref2, mask);
+ CALC (s2, res_ref3, mask);
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref2))
+ abort ();
+
+ MASK_ZERO () (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref2))
+ abort ();
+
+ MASK_MERGE () (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res4, res_ref3))
+ abort ();
+
+ MASK_ZERO () (res_ref3, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res5, res_ref3))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-1.c
new file mode 100644
index 0000000000..b32d161ba9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vextractf32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vextractf32x4\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vextractf32x4\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m128 y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_extractf32x4_ps (x, 1);
+ y = _mm512_mask_extractf32x4_ps (y, 2, x, 1);
+ y = _mm512_maskz_extractf32x4_ps (2, x, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-2.c
new file mode 100644
index 0000000000..35377b4302
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextractf32x4-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (UNION_TYPE (AVX512F_LEN,) s1, float *res_ref, int mask)
+{
+ memset (res_ref, 0, 16);
+ memcpy (res_ref, s1.a + mask * 4, 16);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s1;
+ union128 res1, res2, res3;
+ float res_ref[4];
+ MASK_TYPE mask = MASK_VALUE;
+ int j;
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = j * j / 4.56;
+ }
+
+ for (j = 0; j < 4; j++)
+ {
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_extractf32x4_ps) (s1.x, 1);
+ res2.x = INTRINSIC (_mask_extractf32x4_ps) (res2.x, mask, s1.x, 1);
+ res3.x = INTRINSIC (_maskz_extractf32x4_ps) (mask, s1.x, 1);
+ CALC (s1, res_ref, 1);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, 4);
+ if (check_union128 (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, 4);
+ if (check_union128 (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-1.c
new file mode 100644
index 0000000000..6259ac8062
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vextractf64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vextractf64x4\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vextractf64x4\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m256d y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_extractf64x4_pd (x, 1);
+ y = _mm512_maskz_extractf64x4_pd (2, x, 1);
+ y = _mm512_mask_extractf64x4_pd (y, 2, x, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-2.c
new file mode 100644
index 0000000000..b73044917b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextractf64x4-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#include <string.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+void static
+avx512f_test (void)
+{
+ union512d s1;
+ union256d res1, res2, res3;
+ __mmask8 mask = 0xBA;
+ double res_ref[4];
+ int j;
+
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * j / 4.56;
+ }
+
+ for (j = 0; j < 4; j++)
+ {
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ res1.x = _mm512_extractf64x4_pd (s1.x, 0);
+ res2.x = _mm512_mask_extractf64x4_pd (res2.x, mask, s1.x, 0);
+ res3.x = _mm512_maskz_extractf64x4_pd (mask, s1.x, 0);
+
+ memset (res_ref, 0, 32);
+ memcpy (res_ref, s1.a, 32);
+
+ if (check_union256d (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 4);
+ if (check_union256d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 4);
+ if (check_union256d (res3, res_ref))
+ abort ();
+
+ res1.x = _mm512_extractf64x4_pd (s1.x, 1);
+ res2.x = _mm512_mask_extractf64x4_pd (res2.x, mask, s1.x, 1);
+ res3.x = _mm512_maskz_extractf64x4_pd (mask, s1.x, 1);
+
+ memset (res_ref, 0, 32);
+ memcpy (res_ref, s1.a + 4, 32);
+
+ if (check_union256d (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 4);
+ if (check_union256d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 4);
+ if (check_union256d (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-1.c
new file mode 100644
index 0000000000..87c92f7b5d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vextracti32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vextracti32x4\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vextracti32x4\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_extracti32x4_epi32 (x, 1);
+ y = _mm512_mask_extracti32x4_epi32 (y, 2, x, 1);
+ y = _mm512_maskz_extracti32x4_epi32 (2, x, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-2.c
new file mode 100644
index 0000000000..1ea77b0342
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextracti32x4-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (UNION_TYPE (AVX512F_LEN, i_d) s1, int *res_ref, int mask)
+{
+ memset (res_ref, 0, 16);
+ memcpy (res_ref, s1.a + mask * 4, 16);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1;
+ union128i_d res1, res2, res3;
+ int res_ref[4];
+ MASK_TYPE mask = MASK_VALUE;
+ int j;
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = j * j / 4.56;
+ }
+
+ for (j = 0; j < 4; j++)
+ {
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_extracti32x4_epi32) (s1.x, 1);
+ res2.x =
+ INTRINSIC (_mask_extracti32x4_epi32) (res2.x, mask, s1.x, 1);
+ res3.x = INTRINSIC (_maskz_extracti32x4_epi32) (mask, s1.x, 1);
+ CALC (s1, res_ref, 1);
+
+ if (check_union128i_d (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, 4);
+ if (check_union128i_d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, 4);
+ if (check_union128i_d (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-1.c
new file mode 100644
index 0000000000..71268bcbe5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vextracti64x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vextracti64x4\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vextracti64x4\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m256i y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_extracti64x4_epi64 (x, 1);
+ y = _mm512_mask_extracti64x4_epi64 (y, 2, x, 1);
+ y = _mm512_maskz_extracti64x4_epi64 (2, x, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-2.c
new file mode 100644
index 0000000000..9753d2461f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vextracti64x4-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#include <string.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+void static
+avx512f_test (void)
+{
+ union512i_q s1;
+ union256i_q res1, res2, res3;
+ __mmask8 mask = 0xBA;
+ long long int res_ref[4];
+ int j;
+
+ for (j = 0; j < 8; j++)
+ s1.a[j] = j * j;
+
+ for (j = 0; j < 4; j++)
+ {
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+ res1.x = _mm512_extracti64x4_epi64 (s1.x, 0);
+ res2.x = _mm512_mask_extracti64x4_epi64 (res2.x, mask, s1.x, 0);
+ res3.x = _mm512_maskz_extracti64x4_epi64 (mask, s1.x, 0);
+
+ memset (res_ref, 0, 32);
+ memcpy (res_ref, s1.a, 32);
+
+ if (check_union256i_q (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, 4);
+ if (check_union256i_q (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, 4);
+ if (check_union256i_q (res3, res_ref))
+ abort ();
+
+ res1.x = _mm512_extracti64x4_epi64 (s1.x, 1);
+ res2.x = _mm512_mask_extracti64x4_epi64 (res2.x, mask, s1.x, 1);
+ res3.x = _mm512_maskz_extracti64x4_epi64 (mask, s1.x, 1);
+
+ memset (res_ref, 0, 32);
+ memcpy (res_ref, s1.a + 4, 32);
+
+ if (check_union256i_q (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, 4);
+ if (check_union256i_q (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, 4);
+ if (check_union256i_q (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-1.c
new file mode 100644
index 0000000000..e452ebcffd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfixupimmpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2;
+volatile __m512i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fixupimm_pd (x1, x2, y, 3);
+ x1 = _mm512_mask_fixupimm_pd (x1, m, x2, y, 3);
+ x1 = _mm512_maskz_fixupimm_pd (m, x1, x2, y, 3);
+ x1 = _mm512_fixupimm_round_pd (x1, x2, y, 3, _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fixupimm_round_pd (x1, m, x2, y, 3, _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fixupimm_round_pd (m, x1, x2, y, 3, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
new file mode 100644
index 0000000000..995b446d8a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmpd-2.c
@@ -0,0 +1,117 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=gnu99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+#include "float.h"
+
+
+static void
+CALC (double *r, double src, long long tbl)
+{
+ switch (tbl & 0xf)
+ {
+ case 0:
+ *r = src;
+ break;
+ case 1:
+ *r = src;
+ break;
+ case 2:
+ *r = signbit (src) ? -NAN : NAN;
+ break;
+ case 3:
+ *r = -NAN;
+ break;
+ case 4:
+ *r = -INFINITY;
+ break;
+ case 5:
+ *r = INFINITY;
+ break;
+ case 6:
+ *r = signbit (src) ? -INFINITY : INFINITY;
+ break;
+ case 7:
+ *r = 1.0 / -INFINITY;
+ break;
+ case 8:
+ *r = 0.0;
+ break;
+ case 9:
+ *r = -1.0;
+ break;
+ case 10:
+ *r = 1.0;
+ break;
+ case 11:
+ *r = 1.0 / 2.0;
+ break;
+ case 12:
+ *r = 90.0;
+ break;
+ case 13:
+ *r = M_PI_2;
+ break;
+ case 14:
+ *r = DBL_MAX;
+ break;
+ case 15:
+ *r = -DBL_MAX;
+ break;
+ default:
+ abort ();
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, j, k;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, s1;
+ UNION_TYPE (AVX512F_LEN, i_q) s2;
+ double res_ref[SIZE];
+
+
+ float vals[2] = { -10, 10 };
+ int controls[8] = {0x11111111, 0x77777777, 0x77777777, 0x88888888,
+ 0x99999999, 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc};
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = vals[i];
+ s2.a[j] = controls[j];
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+
+ CALC (&res_ref[j], s1.a[j], s2.a[j]);
+ }
+
+ res1.x = INTRINSIC (_fixupimm_pd) (res1.x, s1.x, s2.x, 0);
+ res2.x = INTRINSIC (_mask_fixupimm_pd) (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = INTRINSIC (_maskz_fixupimm_pd) (mask, res3.x, s1.x, s2.x, 0);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE(d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+ MASK_ZERO(d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-1.c
new file mode 100644
index 0000000000..5cf045df34
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfixupimmps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2;
+volatile __m512i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fixupimm_ps (x1, x2, y, 3);
+ x1 = _mm512_mask_fixupimm_ps (x1, m, x2, y, 3);
+ x1 = _mm512_maskz_fixupimm_ps (m, x1, x2, y, 3);
+ x1 = _mm512_fixupimm_round_ps (x1, x2, y, 3, _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fixupimm_round_ps (x1, m, x2, y, 3, _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fixupimm_round_ps (m, x1, x2, y, 3, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
new file mode 100644
index 0000000000..edb149cf57
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmps-2.c
@@ -0,0 +1,122 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=gnu99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+#include "float.h"
+
+static void
+CALC (float *r, float src, int tbl)
+{
+ switch (tbl & 0xf)
+ {
+ case 0:
+ *r = src;
+ break;
+ case 1:
+ *r = src;
+ break;
+ case 2:
+ *r = signbit (src) ? -NAN : NAN;
+ break;
+ case 3:
+ *r = -NAN;
+ break;
+ case 4:
+ *r = -INFINITY;
+ break;
+ case 5:
+ *r = INFINITY;
+ break;
+ case 6:
+ *r = signbit (src) ? -INFINITY : INFINITY;
+ break;
+ case 7:
+ *r = 1.0 / -INFINITY;
+ break;
+ case 8:
+ *r = 0.0;
+ break;
+ case 9:
+ *r = -1.0;
+ break;
+ case 10:
+ *r = 1.0;
+ break;
+ case 11:
+ *r = 1.0 / 2.0;
+ break;
+ case 12:
+ *r = 90.0;
+ break;
+ case 13:
+ *r = M_PI_2;
+ break;
+ case 14:
+ *r = FLT_MAX;
+ break;
+ case 15:
+ *r = -FLT_MAX;
+ break;
+ default:
+ abort ();
+ }
+}
+
+
+void static
+TEST (void)
+{
+ int i, j, k;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, s1;
+ UNION_TYPE (AVX512F_LEN, i_d) s2;
+ float res_ref[SIZE];
+
+
+ float vals[2] = { -10, 10 };
+ int controls[16] = { 0x11111111,
+ 0x77777777, 0x88888888, 0x99999999,
+ 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
+ 0x77777777, 0x88888888, 0x99999999,
+ 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
+ 0xdddddddd, 0xeeeeeeee, 0xffffffff
+ };
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < 2; i++)
+ {
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = vals[i];
+ s2.a[j] = controls[j];
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+
+ CALC (&res_ref[j], s1.a[j], s2.a[j]);
+ }
+
+ res1.x = INTRINSIC (_fixupimm_ps) (res1.x, s1.x, s2.x, 0);
+ res2.x = INTRINSIC (_mask_fixupimm_ps) (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = INTRINSIC (_maskz_fixupimm_ps) (mask, res3.x, s1.x, s2.x, 0);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE() (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+ MASK_ZERO() (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-1.c
new file mode 100644
index 0000000000..76676afef8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfixupimmsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_fixupimm_sd (x, x, y, 3);
+ x = _mm_mask_fixupimm_sd (x, m, x, y, 3);
+ x = _mm_maskz_fixupimm_sd (m, x, x, y, 3);
+ x = _mm_fixupimm_round_sd (x, x, y, 3, _MM_FROUND_NO_EXC);
+ x = _mm_mask_fixupimm_round_sd (x, m, x, y, 3, _MM_FROUND_NO_EXC);
+ x = _mm_maskz_fixupimm_round_sd (m, x, x, y, 3, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
new file mode 100644
index 0000000000..1b66a98215
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmsd-2.c
@@ -0,0 +1,119 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2 -std=gnu99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+#include <math.h>
+#include <float.h>
+#include "avx512f-mask-type.h"
+
+void
+compute_fixupimmpd (double *r, double src, long long tbl)
+{
+ switch (tbl & 0xf)
+ {
+ case 0:
+ *r = src;
+ break;
+ case 1:
+ *r = src;
+ break;
+ case 2:
+ *r = signbit (src) ? -NAN : NAN;
+ break;
+ case 3:
+ *r = -NAN;
+ break;
+ case 4:
+ *r = -INFINITY;
+ break;
+ case 5:
+ *r = INFINITY;
+ break;
+ case 6:
+ *r = signbit (src) ? -INFINITY : INFINITY;
+ break;
+ case 7:
+ *r = 1.0 / -INFINITY;
+ break;
+ case 8:
+ *r = 0.0;
+ break;
+ case 9:
+ *r = -1.0;
+ break;
+ case 10:
+ *r = 1.0;
+ break;
+ case 11:
+ *r = 1.0 / 2.0;
+ break;
+ case 12:
+ *r = 90.0;
+ break;
+ case 13:
+ *r = M_PI_2;
+ break;
+ case 14:
+ *r = DBL_MAX;
+ break;
+ case 15:
+ *r = -DBL_MAX;
+ break;
+ default:
+ abort ();
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ union128d s1, res1, res2, res3;
+ union128i_q s2;
+ double res_ref[2];
+ int i, j, k;
+
+ float vals[2] = { -10, 10 };
+ int controls[10] = { 0x11111111,
+ 0x77777777, 0x88888888, 0x99999999,
+ 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
+ 0xdddddddd, 0xeeeeeeee, 0xffffffff
+ };
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < 2; i++)
+ {
+ s1.a[0] = vals[i];
+ s1.a[1] = 1.0;
+ s2.a[1] = 1.0;
+
+ res_ref[0] = 1.0;
+ res_ref[1] = 1.0;
+ res1.a[0] = res2.a[0] = res3.a[0] = DEFAULT_VALUE;
+ res1.a[1] = res2.a[1] = res3.a[1] = DEFAULT_VALUE;
+
+ for (j = 0; j < 10; j++)
+ {
+ s2.a[0] = controls[j];
+ compute_fixupimmpd (&res_ref[0], s1.a[0], s2.a[0]);
+
+ res1.x = _mm_fixupimm_sd (res1.x, s1.x, s2.x, 0);
+ res2.x = _mm_mask_fixupimm_sd (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = _mm_maskz_fixupimm_sd (mask, res3.x, s1.x, s2.x, 0);
+
+ if (check_union128d (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, 1);
+ if (check_union128d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, 1);
+ if (check_union128d (res3, res_ref))
+ abort ();
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-1.c
new file mode 100644
index 0000000000..435befbfa6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-1.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfixupimmss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_fixupimm_ss (x, x, y, 3);
+ x = _mm_mask_fixupimm_ss (x, m, x, y, 3);
+ x = _mm_maskz_fixupimm_ss (m, x, x, y, 3);
+ x = _mm_fixupimm_round_ss (x, x, y, 3, _MM_FROUND_NO_EXC);
+ x = _mm_mask_fixupimm_round_ss (x, m, x, y, 3, _MM_FROUND_NO_EXC);
+ x = _mm_maskz_fixupimm_round_ss (m, x, x, y, 3, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
new file mode 100644
index 0000000000..87883ba6a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfixupimmss-2.c
@@ -0,0 +1,120 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2 -std=gnu99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+#include <math.h>
+#include <float.h>
+#include "avx512f-mask-type.h"
+
+void
+compute_fixupimmps (float *r, float src, int tbl)
+{
+ switch (tbl & 0xf)
+ {
+ case 0:
+ *r = src;
+ break;
+ case 1:
+ *r = src;
+ break;
+ case 2:
+ *r = signbit (src) ? -NAN : NAN;
+ break;
+ case 3:
+ *r = -NAN;
+ break;
+ case 4:
+ *r = -INFINITY;
+ break;
+ case 5:
+ *r = INFINITY;
+ break;
+ case 6:
+ *r = signbit (src) ? -INFINITY : INFINITY;
+ break;
+ case 7:
+ *r = 1.0 / -INFINITY;
+ break;
+ case 8:
+ *r = 0.0;
+ break;
+ case 9:
+ *r = -1.0;
+ break;
+ case 10:
+ *r = 1.0;
+ break;
+ case 11:
+ *r = 1.0 / 2.0;
+ break;
+ case 12:
+ *r = 90.0;
+ break;
+ case 13:
+ *r = M_PI_2;
+ break;
+ case 14:
+ *r = FLT_MAX;
+ break;
+ case 15:
+ *r = -FLT_MAX;
+ break;
+ default:
+ abort ();
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ union128 s1, res1, res2, res3;
+ union128i_d s2;
+ float res_ref[4];
+ int i, j, k;
+
+ float vals[2] = { -10, 10 };
+ int controls[10] = { 0x11111111,
+ 0x77777777, 0x88888888, 0x99999999,
+ 0xaaaaaaaa, 0xbbbbbbbb, 0xcccccccc,
+ 0xdddddddd, 0xeeeeeeee, 0xffffffff
+ };
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < 2; i++)
+ {
+ s1.a[0] = vals[i];
+ res1.a[0] = res2.a[0] = res3.a[0] = DEFAULT_VALUE;
+ for (k = 1; k < 4; k++)
+ {
+ s1.a[k] = k;
+ s2.a[k] = k;
+ res_ref[k] = k;
+ res1.a[k] = res2.a[k] = res3.a[k] = DEFAULT_VALUE;
+ }
+
+ for (j = 0; j < 10; j++)
+ {
+ s2.a[0] = controls[j];
+ compute_fixupimmps (&res_ref[0], s1.a[0], s2.a[0]);
+
+ res1.x = _mm_fixupimm_ss (res1.x, s1.x, s2.x, 0);
+ res2.x = _mm_mask_fixupimm_ss (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = _mm_maskz_fixupimm_ss (mask, res3.x, s1.x, s2.x, 0);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, 1);
+ if (check_union128 (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, 1);
+ if (check_union128 (res3, res_ref))
+ abort ();
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-1.c
new file mode 100644
index 0000000000..929afe3e61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmadd_pd (x1, x2, x3);
+ x1 = _mm512_mask_fmadd_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmadd_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmadd_pd (m, x1, x2, x3);
+ x1 = _mm512_fmadd_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmadd_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmadd_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmadd_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-2.c
new file mode 100644
index 0000000000..7973630086
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXpd-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmadd_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmadd_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmadd_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmadd_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-1.c
new file mode 100644
index 0000000000..95b886162f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmadd_ps (x1, x2, x3);
+ x1 = _mm512_mask_fmadd_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmadd_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmadd_ps (m, x1, x2, x3);
+ x1 = _mm512_fmadd_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmadd_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmadd_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmadd_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-2.c
new file mode 100644
index 0000000000..6883b77d7f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXps-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmadd_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmadd_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmadd_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmadd_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXsd-1.c
new file mode 100644
index 0000000000..eb012d2064
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmadd...sd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fmadd_round_sd (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXss-1.c
new file mode 100644
index 0000000000..1c04965b51
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddXXXss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmadd...ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fmadd_round_ss (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c
new file mode 100644
index 0000000000..6445cbaeda
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmaddsub_pd (x1, x2, x3);
+ x1 = _mm512_mask_fmaddsub_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmaddsub_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmaddsub_pd (m, x1, x2, x3);
+ x1 = _mm512_fmaddsub_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmaddsub_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmaddsub_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmaddsub_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-2.c
new file mode 100644
index 0000000000..c546520335
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXpd-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ if (i % 2)
+ r[i] = s1[i] * s2[i] + s3[i];
+ else
+ r[i] = s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmaddsub_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmaddsub_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmaddsub_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmaddsub_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-1.c
new file mode 100644
index 0000000000..9cff06c5cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmaddsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmaddsub_ps (x1, x2, x3);
+ x1 = _mm512_mask_fmaddsub_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmaddsub_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmaddsub_ps (m, x1, x2, x3);
+ x1 = _mm512_fmaddsub_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmaddsub_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmaddsub_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmaddsub_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-2.c
new file mode 100644
index 0000000000..2e27ffb46b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmaddsubXXXps-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ if (i % 2)
+ r[i] = s1[i] * s2[i] + s3[i];
+ else
+ r[i] = s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmaddsub_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmaddsub_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmaddsub_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmaddsub_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-1.c
new file mode 100644
index 0000000000..ef4565b363
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmsub231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmsub_pd (x1, x2, x3);
+ x1 = _mm512_mask_fmsub_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmsub_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmsub_pd (m, x1, x2, x3);
+ x1 = _mm512_fmsub_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmsub_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmsub_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmsub_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-2.c
new file mode 100644
index 0000000000..caebada6d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXpd-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmsub_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmsub_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmsub_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmsub_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-1.c
new file mode 100644
index 0000000000..1ff9256660
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmsub231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmsub_ps (x1, x2, x3);
+ x1 = _mm512_mask_fmsub_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmsub_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmsub_ps (m, x1, x2, x3);
+ x1 = _mm512_fmsub_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmsub_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmsub_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmsub_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-2.c
new file mode 100644
index 0000000000..da8908f33c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXps-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmsub_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmsub_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmsub_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmsub_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXsd-1.c
new file mode 100644
index 0000000000..b8aecf77e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsub...sd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fmsub_round_sd (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXss-1.c
new file mode 100644
index 0000000000..8912eb8a3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubXXXss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsub...ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fmsub_round_ss (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c
new file mode 100644
index 0000000000..dd5db25f32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmsubadd_pd (x1, x2, x3);
+ x1 = _mm512_mask_fmsubadd_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmsubadd_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmsubadd_pd (m, x1, x2, x3);
+ x1 = _mm512_fmsubadd_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmsubadd_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmsubadd_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmsubadd_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-2.c
new file mode 100644
index 0000000000..537948b1c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXpd-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ if (i % 2)
+ r[i] = s1[i] * s2[i] - s3[i];
+ else
+ r[i] = s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmsubadd_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmsubadd_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmsubadd_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmsubadd_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-1.c
new file mode 100644
index 0000000000..7cf3b0cf71
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfmsubadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fmsubadd_ps (x1, x2, x3);
+ x1 = _mm512_mask_fmsubadd_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fmsubadd_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fmsubadd_ps (m, x1, x2, x3);
+ x1 = _mm512_fmsubadd_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fmsubadd_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fmsubadd_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fmsubadd_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-2.c
new file mode 100644
index 0000000000..85be77ccb1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfmsubaddXXXps-2.c
@@ -0,0 +1,69 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ if (i % 2)
+ r[i] = s1[i] * s2[i] - s3[i];
+ else
+ r[i] = s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fmsubadd_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fmsubadd_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fmsubadd_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fmsubadd_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-1.c
new file mode 100644
index 0000000000..78c3c6b1c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfnmadd231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fnmadd_pd (x1, x2, x3);
+ x1 = _mm512_mask_fnmadd_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fnmadd_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fnmadd_pd (m, x1, x2, x3);
+ x1 = _mm512_fnmadd_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fnmadd_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fnmadd_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fnmadd_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-2.c
new file mode 100644
index 0000000000..71939a5628
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXpd-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = -s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fnmadd_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fnmadd_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fnmadd_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fnmadd_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-1.c
new file mode 100644
index 0000000000..c8211ab900
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfnmadd231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmadd...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fnmadd_ps (x1, x2, x3);
+ x1 = _mm512_mask_fnmadd_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fnmadd_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fnmadd_ps (m, x1, x2, x3);
+ x1 = _mm512_fnmadd_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fnmadd_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fnmadd_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fnmadd_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-2.c
new file mode 100644
index 0000000000..b591d23aaa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXps-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = -s1[i] * s2[i] + s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fnmadd_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fnmadd_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fnmadd_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fnmadd_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXsd-1.c
new file mode 100644
index 0000000000..2e2ac1639a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmadd...sd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fnmadd_round_sd (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXss-1.c
new file mode 100644
index 0000000000..b28ed0a56f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmaddXXXss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmadd...ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fnmadd_round_ss (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-1.c
new file mode 100644
index 0000000000..664902aac1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfnmsub231pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub231pd\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...pd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2, x3;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fnmsub_pd (x1, x2, x3);
+ x1 = _mm512_mask_fnmsub_pd (x1, m, x2, x3);
+ x3 = _mm512_mask3_fnmsub_pd (x1, x2, x3, m);
+ x1 = _mm512_maskz_fnmsub_pd (m, x1, x2, x3);
+ x1 = _mm512_fnmsub_round_pd (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fnmsub_round_pd (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fnmsub_round_pd (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fnmsub_round_pd (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-2.c
new file mode 100644
index 0000000000..177ea73062
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXpd-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s1, double *s2, double *s3, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = -s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref1[SIZE];
+ double res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fnmsub_pd) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fnmsub_pd) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fnmsub_pd) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fnmsub_pd) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-1.c
new file mode 100644
index 0000000000..c0751e9a3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-1.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vfnmsub231ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub231ps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vfnmsub...ps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x1, x2, x3;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_fnmsub_ps (x1, x2, x3);
+ x1 = _mm512_mask_fnmsub_ps (x1, m, x2, x3);
+ x3 = _mm512_mask3_fnmsub_ps (x1, x2, x3, m);
+ x1 = _mm512_maskz_fnmsub_ps (m, x1, x2, x3);
+ x1 = _mm512_fnmsub_round_ps (x1, x2, x3, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x1 = _mm512_mask_fnmsub_round_ps (x1, m, x2, x3, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x3 = _mm512_mask3_fnmsub_round_ps (x1, x2, x3, m, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x1 = _mm512_maskz_fnmsub_round_ps (m, x1, x2, x3, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-2.c
new file mode 100644
index 0000000000..379708b464
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXps-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s1, float *s2, float *s3, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = -s1[i] * s2[i] - s3[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, s3, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref1[SIZE];
+ float res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 56.78 * (i + 1) * sign;
+ s3.a[i] = 90.12 * (i + 2) * sign;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_fnmsub_ps) (s1.x, s2.x, s3.x);
+#endif
+ res2.x = INTRINSIC (_mask_fnmsub_ps) (s1.x, mask, s2.x, s3.x);
+ res3.x = INTRINSIC (_mask3_fnmsub_ps) (s2.x, s3.x, s1.x, mask);
+ res4.x = INTRINSIC (_maskz_fnmsub_ps) (mask, s1.x, s2.x, s3.x);
+
+ CALC (s1.a, s2.a, s3.a, res_ref1);
+ CALC (s2.a, s3.a, s1.a, res_ref2);
+
+#if AVX512F_LEN == 512
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res1, res_ref1, 0.0001))
+ abort ();
+#endif
+
+ MASK_MERGE () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res2, res_ref1, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref2, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res3, res_ref2, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref1, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, ) (res4, res_ref1, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXsd-1.c
new file mode 100644
index 0000000000..2c7b0453a8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmsub...sd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fnmsub_round_sd (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXss-1.c
new file mode 100644
index 0000000000..ad25c62f09
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vfnmsubXXXss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vfnmsub...ss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 a, b, c;
+
+void extern
+avx512f_test (void)
+{
+ a = _mm_fnmsub_round_ss (a, b, c, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-1.c
new file mode 100644
index 0000000000..3d899ea2b6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6} } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2} } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2} } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3} } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1} } */
+/* { dg-final { scan-assembler-times "vgetexppd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1} } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_getexp_pd (x);
+ x = _mm512_mask_getexp_pd (x, m, x);
+ x = _mm512_maskz_getexp_pd (m, x);
+ x = _mm512_getexp_round_pd (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_getexp_round_pd (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_getexp_round_pd (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-2.c
new file mode 100644
index 0000000000..ec9321aa89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexppd-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (double *s, double *r)
+{
+ int i = 0;
+ for (i = 0; i < SIZE; i++)
+ r[i] = floor (log (s[i]) / log (2));
+}
+
+void static
+TEST (void)
+{
+ int j;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, s;
+ double res_ref[SIZE];
+ double res_ref_mask[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s.a[j] = j * (j + 12.0231);
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_getexp_pd) (s.x);
+ res2.x = INTRINSIC (_mask_getexp_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_getexp_pd) (mask, s.x);
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE(d) (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO(d) (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-1.c
new file mode 100644
index 0000000000..fb5674d702
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6} } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2} } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2} } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3} } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1} } */
+/* { dg-final { scan-assembler-times "vgetexpps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1} } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_getexp_ps (x);
+ x = _mm512_mask_getexp_ps (x, m, x);
+ x = _mm512_maskz_getexp_ps (m, x);
+ x = _mm512_getexp_round_ps (x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_getexp_round_ps (x, m, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_getexp_round_ps (m, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-2.c
new file mode 100644
index 0000000000..56f4eaa15f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpps-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (float *s, float *r)
+{
+ int i = 0;
+ for (i = 0; i < SIZE; i++)
+ r[i] = floor (log (s[i]) / log (2));
+}
+
+void static
+TEST (void)
+{
+ int j;
+ UNION_TYPE (AVX512F_LEN, ) res1,res2,res3,s;
+ float res_ref[SIZE];
+ float res_ref_mask[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s.a[j] = j * (j + 12.0231);
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_getexp_ps) (s.x);
+ res2.x = INTRINSIC (_mask_getexp_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_getexp_ps) (mask, s.x);
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE() (res_ref,mask,SIZE );
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO() (res_ref,mask,SIZE );
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-1.c
new file mode 100644
index 0000000000..952ed54609
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgetexpsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\, %xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetexpsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\, %xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_getexp_sd (x, x);
+ x = _mm_getexp_round_sd (x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-2.c
new file mode 100644
index 0000000000..c1e5e5f220
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpsd-2.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#define SIZE (128 / 64)
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vgetexpsd (double *s, double *r)
+{
+ r[0] = floor (log (s[0]) / log (2));
+}
+
+void static
+avx512f_test (void)
+{
+ int i;
+ union128d res1, s1;
+ double res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 5.0 - i;
+ res_ref[i] = s1.a[i];
+ }
+
+ res1.x = _mm_getexp_sd (s1.x, s1.x);
+
+ compute_vgetexpsd (s1.a, res_ref);
+
+ if (check_fp_union128d (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-1.c
new file mode 100644
index 0000000000..d946a4788d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vgetexpss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\, %xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetexpss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\, %xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_getexp_ss (x, x);
+ x = _mm_getexp_round_ss (x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-2.c
new file mode 100644
index 0000000000..39d77c7a02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetexpss-2.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#define SIZE (128 / 32)
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vgetexpss (float *s, float *r)
+{
+ r[0] = floor (log (s[0]) / log (2));
+}
+
+void static
+avx512f_test (void)
+{
+ int i;
+ union128 res1, s1;
+ float res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 5.0 - i;
+ res_ref[i] = s1.a[i];
+ }
+
+ res1.x = _mm_getexp_ss (s1.x, s1.x);
+
+ compute_vgetexpss (s1.a, res_ref);
+
+ if (check_fp_union128 (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-1.c
new file mode 100644
index 0000000000..b19846d17e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-1.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vgetmantpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x, y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_getmant_pd (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src);
+ x =
+ _mm512_mask_getmant_pd (x, m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ x =
+ _mm512_maskz_getmant_pd (m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ x = _mm512_getmant_round_pd (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
+ _MM_FROUND_NO_EXC);
+ x =
+ _mm512_mask_getmant_round_pd (x, m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
+ x =
+ _mm512_maskz_getmant_round_pd (m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-2.c
new file mode 100644
index 0000000000..0209021b8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantpd-2.c
@@ -0,0 +1,124 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <math.h>
+
+#ifndef GET_NORM_MANT
+#define GET_NORM_MANT
+
+union fp_int_t
+{
+ long long int int_val;
+ double fp_val;
+};
+
+double
+get_norm_mant (double source, int signctrl, int interv)
+{
+ long long src, sign, exp, fraction;
+ union fp_int_t bin_conv;
+
+ bin_conv.fp_val = source;
+ src = bin_conv.int_val;
+ sign = (signctrl & 0x1) ? 0 : (src >> 63);
+ exp = (src & 0x7ff0000000000000) >> 52;
+ fraction = (src & 0xfffffffffffff);
+
+ if (isnan (source))
+ return signbit (source) ? -NAN : NAN;
+ if (source == 0.0 || source == -0.0 || isinf (source))
+ return sign ? -1.0 : 1.0;
+ if (signbit (source) && (signctrl & 0x2))
+ return -NAN;
+ if (!isnormal (source))
+ {
+ src = (src & 0xfff7ffffffffffff);
+ exp = 0x3ff;
+ while (!(src & 0x8000000000000))
+ {
+ src += fraction & 0x8000000000000;
+ fraction = fraction << 1;
+ exp--;
+ }
+ }
+
+ switch (interv)
+ {
+ case 0:
+ exp = 0x3ff;
+ break;
+ case 1:
+ exp = ((exp - 0x3ff) & 0x1) ? 0x3fe : 0x3ff;
+ break;
+ case 2:
+ exp = 0x3fe;
+ break;
+ case 3:
+ exp = (fraction & 0x8000000000000) ? 0x3fe : 0x3ff;
+ break;
+ default:
+ abort ();
+ }
+
+ bin_conv.int_val = (sign << 63) | (exp << 52) | fraction;
+ return bin_conv.fp_val;
+}
+#endif
+
+void static
+CALC (double *r, double *s, int interv, int signctrl)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = get_norm_mant (s[i], signctrl, interv);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int interv = _MM_MANT_NORM_p5_1;
+ int signctrl = _MM_MANT_SIGN_src;
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_getmant_pd) (src.x, interv, signctrl);
+ res2.x =
+ INTRINSIC (_mask_getmant_pd) (res2.x, mask, src.x, interv,
+ signctrl);
+ res3.x =
+ INTRINSIC (_maskz_getmant_pd) (mask, src.x, interv, signctrl);
+
+ CALC (res_ref, src.a, interv, signctrl);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-1.c
new file mode 100644
index 0000000000..a3ce09e97c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-1.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vgetmantps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x, y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_getmant_ps (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src);
+ x =
+ _mm512_mask_getmant_ps (x, m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ x =
+ _mm512_maskz_getmant_ps (m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src);
+ x = _mm512_getmant_round_ps (y, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
+ _MM_FROUND_NO_EXC);
+ x =
+ _mm512_mask_getmant_round_ps (x, m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
+ x =
+ _mm512_maskz_getmant_round_ps (m, y, _MM_MANT_NORM_p75_1p5,
+ _MM_MANT_SIGN_src, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-2.c
new file mode 100644
index 0000000000..25e41d1821
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantps-2.c
@@ -0,0 +1,125 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include <math.h>
+
+#ifndef GET_NORM_MANT
+#define GET_NORM_MANT
+
+union fp_int_t
+{
+ int int_val;
+ float fp_val;
+};
+
+float
+get_norm_mant (float source, int signctrl, int interv)
+{
+ int src, sign, exp, fraction;
+ union fp_int_t bin_conv;
+
+ bin_conv.fp_val = source;
+ src = bin_conv.int_val;
+ sign = (signctrl & 0x1) ? 0 : (src >> 31);
+ exp = (src & 0x7f800000) >> 23;
+ fraction = (src & 0x7fffff);
+
+ if (isnan (source))
+ return signbit (source) ? -NAN : NAN;
+ if (source == 0.0 || source == -0.0 || isinf (source))
+ return sign ? -1.0 : 1.0;
+ if (signbit (source) && (signctrl & 0x2))
+ return -NAN;
+ if (!isnormal (source))
+ {
+ src = (src & 0xffbfffff);
+ exp = 0x7f;
+ while (!(src & 0x400000))
+ {
+ src += fraction & 0x400000;
+ fraction = fraction << 1;
+ exp--;
+ }
+ }
+
+ switch (interv)
+ {
+ case 0:
+ exp = 0x7f;
+ break;
+ case 1:
+ exp = ((exp - 0x7f) & 0x1) ? 0x7e : 0x7f;
+ break;
+ case 2:
+ exp = 0x7e;
+ break;
+ case 3:
+ exp = (fraction & 0x400000) ? 0x7e : 0x7f;
+ break;
+ default:
+ abort ();
+ }
+
+ bin_conv.int_val = (sign << 31) | (exp << 23) | fraction;
+
+ return bin_conv.fp_val;
+}
+#endif
+
+void static
+CALC (float *r, float *s, int interv, int signctrl)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = get_norm_mant (s[i], signctrl, interv);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, src;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int interv = _MM_MANT_NORM_p5_1;
+ int signctrl = _MM_MANT_SIGN_src;
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 34.67 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_getmant_ps) (src.x, interv, signctrl);
+ res2.x =
+ INTRINSIC (_mask_getmant_ps) (res2.x, mask, src.x, interv,
+ signctrl);
+ res3.x =
+ INTRINSIC (_maskz_getmant_ps) (mask, src.x, interv, signctrl);
+
+ CALC (res_ref, src.a, interv, signctrl);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-1.c
new file mode 100644
index 0000000000..4b252a4161
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vgetmantsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[\\n\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x, y, z;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_getmant_sd (y, z, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src);
+ x = _mm_getmant_round_sd (y, z, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
+ _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-2.c
new file mode 100644
index 0000000000..563d3cc221
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantsd-2.c
@@ -0,0 +1,95 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2 -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+union fp_int_t
+{
+ long long int int_val;
+ double fp_val;
+};
+
+double
+get_norm_mant (double source, int signctrl, int interv)
+{
+ long long src, sign, exp, fraction;
+
+ union fp_int_t bin_conv;
+
+ bin_conv.fp_val = source;
+ src = bin_conv.int_val;
+ sign = (signctrl & 0x1) ? 0 : (src >> 63);
+ exp = (src & 0x7ff0000000000000) >> 52;
+ fraction = (src & 0xfffffffffffff);
+
+ if (isnan (source))
+ return signbit (source) ? -NAN : NAN;
+ if (source == 0.0 || source == -0.0 || isinf (source))
+ return sign ? -1.0 : 1.0;
+ if (signbit (source) && (signctrl & 0x2))
+ return -NAN;
+ if (!isnormal (source))
+ {
+ src = (src & 0xfff7ffffffffffff);
+ exp = 0x3ff;
+ while (!(src & 0x8000000000000))
+ {
+ src += fraction & 0x8000000000000;
+ fraction = fraction << 1;
+ exp--;
+ }
+ }
+
+ switch (interv)
+ {
+ case 0:
+ exp = 0x3ff;
+ break;
+ case 1:
+ exp = ((exp - 0x3ff) & 0x1) ? 0x3fe : 0x3ff;
+ break;
+ case 2:
+ exp = 0x3fe;
+ break;
+ case 3:
+ exp = (fraction & 0x8000000000000) ? 0x3fe : 0x3ff;
+ break;
+ default:
+ abort ();
+ }
+
+ bin_conv.int_val = (sign << 63) | (exp << 52) | fraction;
+ return bin_conv.fp_val;
+}
+
+static void
+compute_vgetmantsd (double *r, double *s1, double *s2, int interv,
+ int signctrl)
+{
+ r[0] = get_norm_mant (s2[0], signctrl, interv);
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ int i, sign;
+ union128d res1, src1, src2;
+ double res_ref[2];
+ int interv = _MM_MANT_NORM_p5_1;
+ int signctrl = _MM_MANT_SIGN_src;
+
+ src1.x = _mm_set_pd (-3.0, 111.111);
+ src2.x = _mm_set_pd (222.222, -2.0);
+
+ res1.x = _mm_getmant_sd (src1.x, src2.x, interv, signctrl);
+
+ compute_vgetmantsd (res_ref, src1.a, src2.a, interv, signctrl);
+
+ if (check_union128d (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-1.c
new file mode 100644
index 0000000000..30c837b6fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vgetmantss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[\\n\]" 2 } } */
+/* { dg-final { scan-assembler-times "vgetmantss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[\\n\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x, y, z;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_getmant_ss (y, z, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src);
+ x = _mm_getmant_round_ss (y, z, _MM_MANT_NORM_p75_1p5, _MM_MANT_SIGN_src,
+ _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-2.c
new file mode 100644
index 0000000000..3ffab4ee15
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vgetmantss-2.c
@@ -0,0 +1,100 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2 -std=c99" } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-require-effective-target c99_runtime } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+#include <math.h>
+
+union fp_int_t
+{
+ int int_val;
+ float fp_val;
+};
+
+float
+get_norm_mant (float source, int signctrl, int interv)
+{
+ int src, sign, exp, fraction;
+ union fp_int_t bin_conv;
+
+ bin_conv.fp_val = source;
+ src = bin_conv.int_val;
+ sign = (signctrl & 0x1) ? 0 : (src >> 31);
+ exp = (src & 0x7f800000) >> 23;
+ fraction = (src & 0x7fffff);
+
+ if (isnan (source))
+ return signbit (source) ? -NAN : NAN;
+ if (source == 0.0 || source == -0.0 || isinf (source))
+ return sign ? -1.0 : 1.0;
+ if (signbit (source) && (signctrl & 0x2))
+ return -NAN;
+ if (!isnormal (source))
+ {
+ src = (src & 0xffbfffff);
+ exp = 0x7f;
+ while (!(src & 0x400000))
+ {
+ src += fraction & 0x400000;
+ fraction = fraction << 1;
+ exp--;
+ }
+ }
+
+ switch (interv)
+ {
+ case 0:
+ exp = 0x7f;
+ break;
+ case 1:
+ exp = ((exp - 0x7f) & 0x1) ? 0x7e : 0x7f;
+ break;
+ case 2:
+ exp = 0x7e;
+ break;
+ case 3:
+ exp = (fraction & 0x400000) ? 0x7e : 0x7f;
+ break;
+ default:
+ abort ();
+ }
+
+ bin_conv.int_val = (sign << 31) | (exp << 23) | fraction;
+
+ return bin_conv.fp_val;
+
+}
+
+static void
+compute_vgetmantss (float *r, float *s1, float *s2, int interv,
+ int signctrl)
+{
+ int i;
+ r[0] = get_norm_mant (s2[0], signctrl, interv);
+ for (i = 1; i < 4; i++)
+ {
+ r[i] = s1[i];
+ }
+}
+
+static void
+avx512f_test (void)
+{
+ int i, sign;
+ union128 res1, src1, src2;
+ float res_ref[4];
+ int interv = _MM_MANT_NORM_p5_1;
+ int signctrl = _MM_MANT_SIGN_src;
+
+ src1.x = _mm_set_ps (-24.043, 68.346, -43.35, 546.46);
+ src2.x = _mm_set_ps (222.222, 333.333, 444.444, -2.0);
+
+ res1.x = _mm_getmant_ss (src1.x, src2.x, interv, signctrl);
+
+ compute_vgetmantss (res_ref, src1.a, src2.a, interv, signctrl);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-1.c
new file mode 100644
index 0000000000..b2caa53246
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vinsertf32x4\[^\n\]*zmm" 3 } } */
+/* { dg-final { scan-assembler-times "vinsertf32x4\[^\n\]*\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vinsertf32x4\[^\n\]*\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+__m128 y;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_insertf32x4 (x, y, 1);
+ x = _mm512_maskz_insertf32x4 (6, x, y, 1);
+ x = _mm512_mask_insertf32x4 (x, 2, x, y, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-2.c
new file mode 100644
index 0000000000..9231163c32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf32x4-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void static
+CALC (UNION_TYPE (AVX512F_LEN,) s1, union128 s2, float *res_ref, int imm)
+{
+ memcpy (res_ref, s1.a, SIZE * sizeof (float));
+ memcpy (res_ref + imm * 4, s2.a, 16);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s1, res1, res2, res3;
+ union128 s2;
+ float res_ref[SIZE];
+ int j;
+
+ MASK_TYPE mask = 6 ^ (0xffd >> SIZE);
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = j * j / 10.2;
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ for (j = 0; j < 4; j++)
+ s2.a[j] = j * j * j / 2.03;
+
+ res1.x = INTRINSIC (_insertf32x4) (s1.x, s2.x, 1);
+ res2.x = INTRINSIC (_mask_insertf32x4) (res2.x, mask, s1.x, s2.x, 1);
+ res3.x = INTRINSIC (_maskz_insertf32x4) (mask, s1.x, s2.x, 1);
+
+ CALC (s1, s2, res_ref, 1);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-1.c
new file mode 100644
index 0000000000..a4c74fd486
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vinsertf64x4\[ \\t\]+\[^\n\]+" 3 } } */
+/* { dg-final { scan-assembler-times "vinsertf64x4\[ \\t\]+\[^\n\]+\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vinsertf64x4\[ \\t\]+\[^\n\]+\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m256d y;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_insertf64x4 (x, y, 1);
+ x = _mm512_mask_insertf64x4 (x, 2, x, y, 1);
+ x = _mm512_maskz_insertf64x4 (2, x, y, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-2.c
new file mode 100644
index 0000000000..17871b8549
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinsertf64x4-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#define SIZE (512 / 64)
+#include "avx512f-mask-type.h"
+#include <string.h>
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+void static
+avx512f_test (void)
+{
+ union512d s1, res, res2, res3;
+ union256d s2;
+ double res_ref[8];
+ MASK_TYPE mask = MASK_VALUE;
+ int j;
+
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * j + 1.6;
+ res2.a[j] = DEFAULT_VALUE;
+ }
+
+ for (j = 0; j < 4; j++)
+ s2.a[j] = j * j * j / 2.7;
+
+ res.x = _mm512_insertf64x4 (s1.x, s2.x, 0);
+ res2.x = _mm512_mask_insertf64x4 (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = _mm512_maskz_insertf64x4 (mask, s1.x, s2.x, 0);
+
+ memcpy (res_ref, s1.a, 64);
+ memcpy (res_ref, s2.a, 32);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (check_union512d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (check_union512d (res3, res_ref))
+ abort ();
+
+ res.x = _mm512_insertf64x4 (s1.x, s2.x, 1);
+ res2.x = _mm512_mask_insertf64x4 (res2.x, mask, s1.x, s2.x, 1);
+ res3.x = _mm512_maskz_insertf64x4 (mask, s1.x, s2.x, 1);
+
+ memcpy (res_ref, s1.a, 64);
+ memcpy (res_ref + 4, s2.a, 32);
+
+ if (check_union512d (res, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (check_union512d (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (check_union512d (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-1.c
new file mode 100644
index 0000000000..44c083137a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vinserti32x4\[^\n\]*xmm\[^\n\]*zmm\[^\n\]*zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vinserti32x4\[^\n\]*\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vinserti32x4\[^\n\]*\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x,a;
+volatile __m128i y;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_maskz_inserti32x4 (6, x, y, 1);
+ x = _mm512_mask_inserti32x4 (a, 6, x, y, 1);
+ x = _mm512_inserti32x4 (x, y, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-2.c
new file mode 100644
index 0000000000..c0cce565b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinserti32x4-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void static
+CALC (UNION_TYPE (AVX512F_LEN, i_d) s1, union128i_d s2, int *res_ref, int imm)
+{
+ memcpy (res_ref, s1.a, SIZE * sizeof (int));
+ memcpy (res_ref + imm * 4, s2.a, 16);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3;
+ union128i_d s2;
+ int res_ref[SIZE];
+ int j;
+
+ MASK_TYPE mask = 6 ^ (0xffd >> SIZE);
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = j * j;
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ for (j = 0; j < 4; j++)
+ s2.a[j] = j * j * j;
+
+ res1.x = INTRINSIC (_inserti32x4) (s1.x, s2.x, 1);
+ res2.x = INTRINSIC (_mask_inserti32x4) (res2.x, mask, s1.x, s2.x, 1);
+ res3.x = INTRINSIC (_maskz_inserti32x4) (mask, s1.x, s2.x, 1);
+
+ CALC (s1, s2, res_ref, 1);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-1.c
new file mode 100644
index 0000000000..f5b7eff096
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vinserti64x4\[ \\t\]+\[^\n\]+\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vinserti64x4\[ \\t\]+\[^\n\]+\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vinserti64x4\[ \\t\]+\[^\n\]+\[^\n\]" 3 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m256i y;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_inserti64x4 (x, y, 1);
+ x = _mm512_mask_inserti64x4 (x, 2, x, y, 1);
+ x = _mm512_maskz_inserti64x4 (2, x, y, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-2.c
new file mode 100644
index 0000000000..58993ad5ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vinserti64x4-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx512f } */
+/* { dg-options "-O2 -mavx512f" } */
+
+#define SIZE (512 / 64)
+#include "avx512f-mask-type.h"
+#include <string.h>
+#include "avx512f-check.h"
+#include "avx512f-mask-type.h"
+#include "avx512f-helper.h"
+
+void static
+avx512f_test (void)
+{
+ union512i_q s1, res, res2, res3;
+ union256i_q s2;
+ long long int res_ref[8];
+ MASK_TYPE mask = MASK_VALUE;
+ int j;
+
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * j;
+ res2.a[j] = DEFAULT_VALUE;
+ }
+
+ for (j = 0; j < 4; j++)
+ s2.a[j] = j * j * j;
+
+ res.x = _mm512_inserti64x4 (s1.x, s2.x, 0);
+ res2.x = _mm512_mask_inserti64x4 (res2.x, mask, s1.x, s2.x, 0);
+ res3.x = _mm512_maskz_inserti64x4 (mask, s1.x, s2.x, 0);
+
+ memcpy (res_ref, s1.a, 64);
+ memcpy (res_ref, s2.a, 32);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (check_union512i_q (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (check_union512i_q (res3, res_ref))
+ abort ();
+
+ res.x = _mm512_inserti64x4 (s1.x, s2.x, 1);
+ res2.x = _mm512_mask_inserti64x4 (res2.x, mask, s1.x, s2.x, 1);
+ res3.x = _mm512_maskz_inserti64x4 (mask, s1.x, s2.x, 1);
+
+ memcpy (res_ref, s1.a, 64);
+ memcpy (res_ref + 4, s2.a, 32);
+
+ if (check_union512i_q (res, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (check_union512i_q (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (check_union512i_q (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-1.c
new file mode 100644
index 0000000000..085a7e5e0c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmaxpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_pd (x, x);
+ x = _mm512_mask_max_pd (x, m, x, x);
+ x = _mm512_maskz_max_pd (m, x, x);
+ x = _mm512_max_round_pd (x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_max_round_pd (x, m, x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_max_round_pd (m, x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-2.c
new file mode 100644
index 0000000000..70f60a9688
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] > s2[i] ? s1[i] : s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_max_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-1.c
new file mode 100644
index 0000000000..564eeb516d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmaxps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_ps (x, x);
+ x = _mm512_mask_max_ps (x, m, x, x);
+ x = _mm512_maskz_max_ps (m, x, x);
+ x = _mm512_max_round_ps (x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_max_round_ps (x, m, x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_max_round_ps (m, x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-2.c
new file mode 100644
index 0000000000..fc92eaa3aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] > s2[i] ? s1[i] : s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_max_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-1.c
new file mode 100644
index 0000000000..8c24704423
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmaxsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_max_round_sd (x1, x2, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmaxss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmaxss-1.c
new file mode 100644
index 0000000000..027445db32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmaxss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmaxss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_max_round_ss (x1, x2, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vminpd-1.c
new file mode 100644
index 0000000000..a4c993e643
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vminpd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_pd (x, x);
+ x = _mm512_mask_min_pd (x, m, x, x);
+ x = _mm512_maskz_min_pd (m, x, x);
+ x = _mm512_min_round_pd (x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_min_round_pd (x, m, x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_min_round_pd (m, x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vminpd-2.c
new file mode 100644
index 0000000000..cfb355539e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] < s2[i] ? s1[i] : s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_min_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vminps-1.c
new file mode 100644
index 0000000000..3cd5904bcc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vminps\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_ps (x, x);
+ x = _mm512_mask_min_ps (x, m, x, x);
+ x = _mm512_maskz_min_ps (m, x, x);
+ x = _mm512_min_round_ps (x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_min_round_ps (x, m, x, x, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_min_round_ps (m, x, x, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vminps-2.c
new file mode 100644
index 0000000000..f619b12fe5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] < s2[i] ? s1[i] : s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_min_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vminsd-1.c
new file mode 100644
index 0000000000..8f8488f8b1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vminsd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_min_round_sd (x1, x2, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vminss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vminss-1.c
new file mode 100644
index 0000000000..0774b75771
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vminss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vminss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_min_round_ss (x1, x2, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-1.c
new file mode 100644
index 0000000000..9cae38ff3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovapd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovapd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovapd\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovapd\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovapd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x1, x2;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_mask_mov_pd (x1, m, x2);
+ x1 = _mm512_maskz_mov_pd (m, x2);
+
+ x1 = _mm512_load_pd (p);
+ x1 = _mm512_mask_load_pd (x1, m, p);
+ x1 = _mm512_maskz_load_pd (m, p);
+
+ _mm512_store_pd (p, x1);
+ _mm512_mask_store_pd (p, m, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-2.c
new file mode 100644
index 0000000000..5e720ae829
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovapd-2.c
@@ -0,0 +1,71 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define ALIGN ((AVX512F_LEN) / 8)
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s2, s3, res1, res3, res4, res5, res6;
+ MASK_TYPE mask = MASK_VALUE;
+ double s1[SIZE] __attribute__ ((aligned (ALIGN)));
+ double res2[SIZE] __attribute__ ((aligned (ALIGN)));
+ double res7[SIZE] __attribute__ ((aligned (ALIGN)));
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 12.34 * (i + 2000) * sign;
+ s2.a[i] = 56.78 * (i - 30) * sign;
+ s3.a[i] = 90.12 * (i + 40) * sign;
+ res3.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ res7[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_load_pd) (s1);
+ INTRINSIC (_store_pd) (res2, s2.x);
+#endif
+ res3.x = INTRINSIC (_mask_mov_pd) (res3.x, mask, s3.x);
+ res4.x = INTRINSIC (_maskz_mov_pd) (mask, s3.x);
+ res5.x = INTRINSIC (_mask_load_pd) (res5.x, mask, s1);
+ res6.x = INTRINSIC (_maskz_load_pd) (mask, s1);
+ INTRINSIC (_mask_store_pd) (res7, mask, s2.x);
+
+#if AVX512F_LEN == 512
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, d) (s2, res2))
+ abort ();
+#endif
+
+ MASK_MERGE (d) (s3.a, mask, SIZE);
+ if (checkVd (res3.a, s3.a, SIZE))
+ abort ();
+
+ MASK_ZERO (d) (s3.a, mask, SIZE);
+ if (checkVd (res4.a, s3.a, SIZE))
+ abort ();
+
+ MASK_MERGE (d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res5, s1))
+ abort ();
+
+ MASK_ZERO (d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res6, s1))
+ abort ();
+
+ MASK_MERGE (d) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (s2, res7))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-1.c
new file mode 100644
index 0000000000..217e29ccb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovaps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovaps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovaps\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovaps\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovaps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+float *p;
+volatile __m512 x1, x2;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_mask_mov_ps (x1, m, x2);
+ x1 = _mm512_maskz_mov_ps (m, x2);
+
+ x1 = _mm512_load_ps (p);
+ x1 = _mm512_mask_load_ps (x1, m, p);
+ x1 = _mm512_maskz_load_ps (m, p);
+
+ _mm512_store_ps (p, x1);
+ _mm512_mask_store_ps (p, m, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-2.c
new file mode 100644
index 0000000000..d92ec968b6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovaps-2.c
@@ -0,0 +1,71 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 32)
+#include "avx512f-mask-type.h"
+#define ALIGN ((AVX512F_LEN) / 8)
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s2, s3, res1, res3, res4, res5, res6;
+ MASK_TYPE mask = MASK_VALUE;
+ float s1[SIZE] __attribute__ ((aligned (ALIGN)));
+ float res2[SIZE] __attribute__ ((aligned (ALIGN)));
+ float res7[SIZE] __attribute__ ((aligned (ALIGN)));
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 12.34 * (i + 2000) * sign;
+ s2.a[i] = 56.78 * (i - 30) * sign;
+ s3.a[i] = 90.12 * (i + 40) * sign;
+ res3.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ res7[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_load_ps) (s1);
+ INTRINSIC (_store_ps) (res2, s2.x);
+#endif
+ res3.x = INTRINSIC (_mask_mov_ps) (res3.x, mask, s3.x);
+ res4.x = INTRINSIC (_maskz_mov_ps) (mask, s3.x);
+ res5.x = INTRINSIC (_mask_load_ps) (res5.x, mask, s1);
+ res6.x = INTRINSIC (_maskz_load_ps) (mask, s1);
+ INTRINSIC (_mask_store_ps) (res7, mask, s2.x);
+
+#if AVX512F_LEN == 512
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, ) (s2, res2))
+ abort ();
+#endif
+
+ MASK_MERGE () (s3.a, mask, SIZE);
+ if (checkVf (res3.a, s3.a, SIZE))
+ abort ();
+
+ MASK_ZERO () (s3.a, mask, SIZE);
+ if (checkVf (res4.a, s3.a, SIZE))
+ abort ();
+
+ MASK_MERGE () (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res5, s1))
+ abort ();
+
+ MASK_ZERO () (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res6, s1))
+ abort ();
+
+ MASK_MERGE () (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (s2, res7))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-1.c
new file mode 100644
index 0000000000..ccaa078ef7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovddup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]|vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vmovddup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]|vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovddup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}|vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x1, x2;
+volatile __mmask8 m8;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_movedup_pd (x2);
+ x1 = _mm512_mask_movedup_pd (x1, m8, x2);
+ x1 = _mm512_maskz_movedup_pd (m8, x2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-2.c
new file mode 100644
index 0000000000..57619c1429
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovddup-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (double *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE/2; i++)
+ {
+ r[2 * i] = s[2 * i];
+ r[2 * i + 1] = s[2 * i];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = i * 123.2 + 32.6;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_movedup_pd) (s.x);
+ res2.x = INTRINSIC (_mask_movedup_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_movedup_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-1.c
new file mode 100644
index 0000000000..1bfd2a591b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovdqa32\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa32\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa32\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa32\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa32\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+int *p;
+volatile __m512i x1, x2;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_mask_mov_epi32 (x1, m, x2);
+ x1 = _mm512_maskz_mov_epi32 (m, x2);
+
+ x1 = _mm512_load_si512 (p);
+ x1 = _mm512_load_epi32 (p);
+ x1 = _mm512_mask_load_epi32 (x1, m, p);
+ x1 = _mm512_maskz_load_epi32 (m, p);
+
+ _mm512_store_si512 (p, x1);
+ _mm512_store_epi32 (p, x1);
+ _mm512_mask_store_epi32 (p, m, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-2.c
new file mode 100644
index 0000000000..685b58b60b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa32-2.c
@@ -0,0 +1,80 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 32)
+#include "avx512f-mask-type.h"
+#define ALIGN ((AVX512F_LEN) / 8)
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s2, s3, res1, res2, res5, res6, res7, res8;
+ MASK_TYPE mask = MASK_VALUE;
+ int s1[SIZE] __attribute__ ((aligned (ALIGN)));
+ int res3[SIZE] __attribute__ ((aligned (ALIGN)));
+ int res4[SIZE] __attribute__ ((aligned (ALIGN)));
+ int res9[SIZE] __attribute__ ((aligned (ALIGN)));
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 1234 * (i + 2000) * sign;
+ s2.a[i] = 5678 * (i - 30) * sign;
+ s3.a[i] = 9012 * (i + 40) * sign;
+ res5.a[i] = DEFAULT_VALUE;
+ res7.a[i] = DEFAULT_VALUE;
+ res9[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_load_si512) (s1);
+ res2.x = INTRINSIC (_load_epi32) (s1);
+ INTRINSIC (_store_si512) (res3, s2.x);
+ INTRINSIC (_store_epi32) (res4, s2.x);
+#endif
+ res5.x = INTRINSIC (_mask_mov_epi32) (res5.x, mask, s3.x);
+ res6.x = INTRINSIC (_maskz_mov_epi32) (mask, s3.x);
+ res7.x = INTRINSIC (_mask_load_epi32) (res7.x, mask, s1);
+ res8.x = INTRINSIC (_maskz_load_epi32) (mask, s1);
+ INTRINSIC (_mask_store_epi32) (res9, mask, s2.x);
+
+#if AVX512F_LEN == 512
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (s2, res3))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (s2, res4))
+ abort ();
+#endif
+
+ MASK_MERGE (i_d) (s3.a, mask, SIZE);
+ if (checkVi (res5.a, s3.a, SIZE))
+ abort ();
+
+ MASK_ZERO (i_d) (s3.a, mask, SIZE);
+ if (checkVi (res6.a, s3.a, SIZE))
+ abort ();
+
+ MASK_MERGE (i_d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res7, s1))
+ abort ();
+
+ MASK_ZERO (i_d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res8, s1))
+ abort ();
+
+ MASK_MERGE (i_d) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (s2, res9))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-1.c
new file mode 100644
index 0000000000..81f958adb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqa64\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+long long *p;
+volatile __m512i x1, x2;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm512_mask_mov_epi64 (x1, m, x2);
+ x1 = _mm512_maskz_mov_epi64 (m, x2);
+
+ x1 = _mm512_load_epi64 (p);
+ x1 = _mm512_mask_load_epi64 (x1, m, p);
+ x1 = _mm512_maskz_load_epi64 (m, p);
+
+ _mm512_store_epi64 (p, x1);
+ _mm512_mask_store_epi64 (p, m, x1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-2.c
new file mode 100644
index 0000000000..d5f51f2d13
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqa64-2.c
@@ -0,0 +1,71 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+#define ALIGN ((AVX512F_LEN) / 8)
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s2, s3, res1, res3, res4, res5, res6;
+ MASK_TYPE mask = MASK_VALUE;
+ long long s1[SIZE] __attribute__ ((aligned (ALIGN)));
+ long long res2[SIZE] __attribute__ ((aligned (ALIGN)));
+ long long res7[SIZE] __attribute__ ((aligned (ALIGN)));
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 1234 * (i + 2000) * sign;
+ s2.a[i] = 5678 * (i - 30) * sign;
+ s3.a[i] = 9012 * (i + 40) * sign;
+ res3.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ res7[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = INTRINSIC (_load_epi64) (s1);
+ INTRINSIC (_store_epi64) (res2, s2.x);
+#endif
+ res3.x = INTRINSIC (_mask_mov_epi64) (res3.x, mask, s3.x);
+ res4.x = INTRINSIC (_maskz_mov_epi64) (mask, s3.x);
+ res5.x = INTRINSIC (_mask_load_epi64) (res5.x, mask, s1);
+ res6.x = INTRINSIC (_maskz_load_epi64) (mask, s1);
+ INTRINSIC (_mask_store_epi64) (res7, mask, s2.x);
+
+#if AVX512F_LEN == 512
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (s2, res2))
+ abort ();
+#endif
+
+ MASK_MERGE (i_q) (s3.a, mask, SIZE);
+ if (checkVl (res3.a, s3.a, SIZE))
+ abort ();
+
+ MASK_ZERO (i_q) (s3.a, mask, SIZE);
+ if (checkVl (res4.a, s3.a, SIZE))
+ abort ();
+
+ MASK_MERGE (i_q) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res5, s1))
+ abort ();
+
+ MASK_ZERO (i_q) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res6, s1))
+ abort ();
+
+ MASK_MERGE (i_q) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (s2, res7))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c
new file mode 100644
index 0000000000..79dbf9dd37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovdqu\[36\]\[24\]\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu32\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu32\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu32\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu32\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+int *p;
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_loadu_si512 (p);
+ x = _mm512_mask_loadu_epi32 (x, m, p);
+ x = _mm512_maskz_loadu_epi32 (m, p);
+
+ _mm512_storeu_si512 (p, x);
+ _mm512_mask_storeu_epi32 (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c
new file mode 100644
index 0000000000..f1ae73c1d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu32-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 32)
+#include "avx512f-mask-type.h"
+
+typedef struct
+{
+ char c;
+ int a[SIZE];
+} __attribute__ ((packed)) EVAL(unaligned_array, AVX512F_LEN,);
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s2, res1, res3, res4;
+ EVAL(unaligned_array, AVX512F_LEN,) s1, res2, res5;
+ MASK_TYPE mask = MASK_VALUE;
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 2000) * sign;
+ s2.a[i] = 67890 * (i + 2000) * sign;
+ res3.a[i] = DEFAULT_VALUE;
+ res5.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+#if AVX512F_LEN == 512
+ res1.x = _mm512_loadu_si512 (s1.a);
+ _mm512_storeu_si512 (res2.a, s2.x);
+#endif
+ res3.x = INTRINSIC (_mask_loadu_epi32) (res3.x, mask, s1.a);
+ res4.x = INTRINSIC (_maskz_loadu_epi32) (mask, s1.a);
+ INTRINSIC (_mask_storeu_epi32) (res5.a, mask, s2.x);
+
+#if AVX512F_LEN == 512
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, s1.a))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (s2, res2.a))
+ abort ();
+#endif
+
+ MASK_MERGE (i_d) (s1.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, s1.a))
+ abort ();
+
+ MASK_ZERO (i_d) (s1.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, s1.a))
+ abort ();
+
+ MASK_MERGE (i_d) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (s2, res5.a))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-1.c
new file mode 100644
index 0000000000..87565489eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovdqu64\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+
+#include <immintrin.h>
+
+long long *p;
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_loadu_epi64 (x, m, p);
+ x = _mm512_maskz_loadu_epi64 (m, p);
+
+ _mm512_mask_storeu_epi64 (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-2.c
new file mode 100644
index 0000000000..867a2517d5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovdqu64-2.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE ((AVX512F_LEN) / 64)
+#include "avx512f-mask-type.h"
+
+typedef struct
+{
+ char c;
+ long long a[SIZE];
+} __attribute__ ((packed)) EVAL(unaligned_array, AVX512F_LEN,);
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s2, res1, res2;
+ EVAL(unaligned_array, AVX512F_LEN,) s1, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 2000) * sign;
+ s2.a[i] = 67890 * (i + 2000) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_loadu_epi64) (res1.x, mask, s1.a);
+ res2.x = INTRINSIC (_maskz_loadu_epi64) (mask, s1.a);
+ INTRINSIC (_mask_storeu_epi64) (res3.a, mask, s2.x);
+
+ MASK_MERGE (i_q) (s1.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, s1.a))
+ abort ();
+
+ MASK_ZERO (i_q) (s1.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, s1.a))
+ abort ();
+
+ MASK_MERGE (i_q) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (s2, res3.a))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-1.c
new file mode 100644
index 0000000000..7a3ba47b1c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vmovntdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+__m512i *x;
+volatile __m512i y;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_stream_si512 (x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-2.c
new file mode 100644
index 0000000000..7b200e37d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdq-2.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union512i_q s, res;
+
+ s.x = _mm512_set_epi64 (39578, -429496, 7856, 0, 85632, -1234, 47563, -1);
+ _mm512_stream_si512 (&res.x, s.x);
+
+ if (check_union512i_q (s, res.a))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-1.c
new file mode 100644
index 0000000000..d5be976e0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vmovntdqa\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+__m512i *x;
+volatile __m512i y;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_stream_load_si512 (x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-2.c
new file mode 100644
index 0000000000..0825781c3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntdqa-2.c
@@ -0,0 +1,17 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union512i_q s, res;
+
+ s.x = _mm512_set_epi64 (39578, -429496, 7856, 0, 85632, -1234, 47563, -1);
+ res.x = _mm512_stream_load_si512 (&s.x);
+
+ if (check_union512i_q (s, res.a))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-1.c
new file mode 100644
index 0000000000..a02162124b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vmovntpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+double *x;
+volatile __m512d y;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_stream_pd (x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c
new file mode 100644
index 0000000000..96c26c21ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntpd-2.c
@@ -0,0 +1,19 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union512d s;
+ double res[8];
+
+ s.x = _mm512_set_pd (-39578.467285, 4294967295.1, -7856.342941, 0,
+ 85632.783567, 1234.9999, 47563.234215, -1.07);
+ _mm512_stream_pd (res, s.x);
+
+ if (check_union512d (s, res))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-1.c
new file mode 100644
index 0000000000..933f01518a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vmovntps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+float *x;
+volatile __m512 y;
+
+void extern
+avx512f_test (void)
+{
+ _mm512_stream_ps (x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c
new file mode 100644
index 0000000000..9f4c7cb5ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovntps-2.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+
+void static
+avx512f_test (void)
+{
+ union512 s;
+ float res[16];
+
+ s.x = _mm512_set_ps (-39578.467285, 4294967295.1, -7856.342941, 0,
+ 85632.783567, 1234.9999, 47563.234215, -1.07,
+ 3453.65743, -1234.9999, 67.234, -1,
+ 0.336624, 34534543, 4345.234234, -1.07234234);
+
+ _mm512_stream_ps (res, s.x);
+
+ if (check_union512 (s, res))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-1.c
new file mode 100644
index 0000000000..b23df0a00b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovshdup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vmovshdup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovshdup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_movehdup_ps (x);
+ x = _mm512_mask_movehdup_ps (x, m, x);
+ x = _mm512_maskz_movehdup_ps (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-2.c
new file mode 100644
index 0000000000..1cd8a6b9e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovshdup-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 1; i < SIZE; i += 2)
+ {
+ r[i - 1] = r[i] = s[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = i * 123.2 + 32.6;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_movehdup_ps) (s.x);
+ res2.x = INTRINSIC (_mask_movehdup_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_movehdup_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-1.c
new file mode 100644
index 0000000000..f2fd4e07d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovsldup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vmovsldup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovsldup\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_moveldup_ps (x);
+ x = _mm512_mask_moveldup_ps (x, m, x);
+ x = _mm512_maskz_moveldup_ps (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-2.c
new file mode 100644
index 0000000000..032fec82e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovsldup-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i += 2)
+ {
+ r[i] = r[i + 1] = s[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = i * 123.2 + 32.6;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_moveldup_ps) (s.x);
+ res2.x = INTRINSIC (_mask_moveldup_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_moveldup_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-1.c
new file mode 100644
index 0000000000..f505819e3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovupd\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovupd\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovupd\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovupd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovupd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+double *p;
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_loadu_pd (p);
+ x = _mm512_mask_loadu_pd (x, m, p);
+ x = _mm512_maskz_loadu_pd (m, p);
+
+ _mm512_storeu_pd (p, x);
+ _mm512_mask_storeu_pd (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-2.c
new file mode 100644
index 0000000000..7e76e29b75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovupd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ double s1[SIZE];
+ double res4[SIZE];
+ double res5[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 123.456 * (i + 2000) * sign;
+ s2.a[i] = 789.012 * (i + 3000) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res5[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_loadu_pd) (s1);
+ res2.x = INTRINSIC (_mask_loadu_pd) (res2.x, mask, s1);
+ res3.x = INTRINSIC (_maskz_loadu_pd) (mask, s1);
+ INTRINSIC (_storeu_pd) (res4, s2.x);
+ INTRINSIC (_mask_storeu_pd) (res5, mask, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, s1))
+ abort ();
+
+ MASK_MERGE (d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, s1))
+ abort ();
+
+ MASK_ZERO (d) (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, d) (s2, res4))
+ abort ();
+
+ MASK_MERGE (d) (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (s2, res5))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovups-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovups-1.c
new file mode 100644
index 0000000000..93b76876ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovups-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmovups\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovups\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovups\[ \\t\]+\[^\n\]*\\)\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vmovups\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmovups\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+float *p;
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_loadu_ps (p);
+ x = _mm512_mask_loadu_ps (x, m, p);
+ x = _mm512_maskz_loadu_ps (m, p);
+
+ _mm512_storeu_ps (p, x);
+ _mm512_mask_storeu_ps (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmovups-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmovups-2.c
new file mode 100644
index 0000000000..7225bda54e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmovups-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ float s1[SIZE];
+ float res4[SIZE];
+ float res5[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1[i] = 123.456 * (i + 2000) * sign;
+ s2.a[i] = 789.012 * (i + 3000) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ res5[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_loadu_ps) (s1);
+ res2.x = INTRINSIC (_mask_loadu_ps) (res2.x, mask, s1);
+ res3.x = INTRINSIC (_maskz_loadu_ps) (mask, s1);
+ INTRINSIC (_storeu_ps) (res4, s2.x);
+ INTRINSIC (_mask_storeu_ps) (res5, mask, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, s1))
+ abort ();
+
+ MASK_MERGE () (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, s1))
+ abort ();
+
+ MASK_ZERO () (s1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, s1))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, ) (s2, res4))
+ abort ();
+
+ MASK_MERGE () (s2.a, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (s2, res5))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-1.c
new file mode 100644
index 0000000000..944e54fb82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmulpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mul_pd (x, x);
+ x = _mm512_mask_mul_pd (x, m, x, x);
+ x = _mm512_maskz_mul_pd (m, x, x);
+ x = _mm512_mul_round_pd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_mul_round_pd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_mul_round_pd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-2.c
new file mode 100644
index 0000000000..bfd2a51559
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_mul_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_mul_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_mul_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulps-1.c
new file mode 100644
index 0000000000..273b82d671
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vmulps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mul_ps (x, x);
+ x = _mm512_mask_mul_ps (x, m, x, x);
+ x = _mm512_maskz_mul_ps (m, x, x);
+ x = _mm512_mul_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_mul_round_ps (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_mul_round_ps (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulps-2.c
new file mode 100644
index 0000000000..09bb29967a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] * s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_mul_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_mul_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_mul_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulsd-1.c
new file mode 100644
index 0000000000..1726f7aa43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmulsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_mul_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vmulss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vmulss-1.c
new file mode 100644
index 0000000000..a3435f800e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vmulss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vmulss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_mul_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpabsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpabsd-2.c
new file mode 100644
index 0000000000..124e2e1a93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpabsd-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *i1, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ if (i1[i] < 0)
+ r[i] = -i1[i];
+ else
+ r[i] = i1[i];
+}
+
+static void
+TEST (void)
+{
+ int ck[SIZE];
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) s, d, dm, dz;
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = i * 7 + (i << 15) + 356;
+ d.a[i] = DEFAULT_VALUE;
+ dm.a[i] = DEFAULT_VALUE;
+ dz.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (s.a, ck);
+
+ d.x = INTRINSIC (_abs_epi32) (s.x);
+ dz.x = INTRINSIC (_maskz_abs_epi32) (mask, s.x);
+ dm.x = INTRINSIC (_mask_abs_epi32) (dm.x, mask, s.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (d, ck))
+ abort ();
+
+ MASK_MERGE (i_d) (ck, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (dm, ck))
+ abort ();
+
+ MASK_ZERO (i_d) (ck, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (dz, ck))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpabsd512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpabsd512-1.c
new file mode 100644
index 0000000000..67b1def173
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpabsd512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpabsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpabsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpabsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_abs_epi32 (x);
+ x = _mm512_maskz_abs_epi32 (7, x);
+ x = _mm512_mask_abs_epi32 (x, 6, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpabsq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpabsq-2.c
new file mode 100644
index 0000000000..ff906f6d41
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpabsq-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *i1, long long *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ if (i1[i] < 0)
+ r[i] = -i1[i];
+ else
+ r[i] = i1[i];
+}
+
+static void
+TEST (void)
+{
+ long long ck[SIZE];
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) s, d, dm, dz;
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = i * 7 + (i << 15) + 356;
+ d.a[i] = DEFAULT_VALUE;
+ dm.a[i] = DEFAULT_VALUE;
+ dz.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (s.a, ck);
+
+ d.x = INTRINSIC (_abs_epi64) (s.x);
+ dz.x = INTRINSIC (_maskz_abs_epi64) (mask, s.x);
+ dm.x = INTRINSIC (_mask_abs_epi64) (dm.x, mask, s.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (d, ck))
+ abort ();
+
+ MASK_MERGE (i_q) (ck, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (dm, ck))
+ abort ();
+
+ MASK_ZERO (i_q) (ck, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (dz, ck))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpabsq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpabsq512-1.c
new file mode 100644
index 0000000000..fee48b1b74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpabsq512-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpabsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpabsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpabsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_abs_epi64 (x);
+ x = _mm512_maskz_abs_epi64 (2, x);
+ x = _mm512_mask_abs_epi64 (x, 3, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-1.c
new file mode 100644
index 0000000000..f4bf7eb3f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpaddd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpaddd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpaddd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_add_epi32 (x, x);
+ x = _mm512_mask_add_epi32 (x, m, x, x);
+ x = _mm512_maskz_add_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-2.c
new file mode 100644
index 0000000000..8aff11eb95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpaddd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] + s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_add_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_add_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_add_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-1.c
new file mode 100644
index 0000000000..6f8223e114
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpaddq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpaddq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpaddq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_add_epi64 (x, x);
+ x = _mm512_mask_add_epi64 (x, m, x, x);
+ x = _mm512_maskz_add_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-2.c
new file mode 100644
index 0000000000..a9d3171522
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpaddq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] + s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_add_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_add_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_add_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandd-1.c
new file mode 100644
index 0000000000..fbf8a49a37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpandd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vpandd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpandd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_and_si512 (x, x);
+ x = _mm512_and_epi32 (x, x);
+ x = _mm512_mask_and_epi32 (x, m, x, x);
+ x = _mm512_maskz_and_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandd-2.c
new file mode 100644
index 0000000000..b422c9d5db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandd-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] & s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_and_si512) (s1.x, s2.x);
+ res2.x = INTRINSIC (_and_epi32) (s1.x, s2.x);
+ res3.x = INTRINSIC (_mask_and_epi32) (res3.x, mask, s1.x, s2.x);
+ res4.x = INTRINSIC (_maskz_and_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-1.c
new file mode 100644
index 0000000000..8f48d601c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpandnd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vpandnd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpandnd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_andnot_si512 (x, x);
+ x = _mm512_andnot_epi32 (x, x);
+ x = _mm512_mask_andnot_epi32 (x, m, x, x);
+ x = _mm512_maskz_andnot_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-2.c
new file mode 100644
index 0000000000..f1b12b6e6b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandnd-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (~s1[i]) & s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_andnot_si512) (s1.x, s2.x);
+ res2.x = INTRINSIC (_andnot_epi32) (s1.x, s2.x);
+ res3.x = INTRINSIC (_mask_andnot_epi32) (res3.x, mask, s1.x, s2.x);
+ res4.x = INTRINSIC (_maskz_andnot_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-1.c
new file mode 100644
index 0000000000..348fb15965
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpandnq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpandnq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpandnq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_andnot_epi64 (x, x);
+ x = _mm512_mask_andnot_epi64 (x,m, x, x);
+ x = _mm512_maskz_andnot_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-2.c
new file mode 100644
index 0000000000..d03bd0692f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandnq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (~s1[i]) & s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_andnot_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_andnot_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_andnot_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandq-1.c
new file mode 100644
index 0000000000..343ff59f57
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpandq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpandq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpandq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_and_epi64 (x, x);
+ x = _mm512_mask_and_epi64 (x,m, x, x);
+ x = _mm512_maskz_and_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpandq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpandq-2.c
new file mode 100644
index 0000000000..86ab76ba89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpandq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] & s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_and_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_and_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_and_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-1.c
new file mode 100644
index 0000000000..3a0aa2429a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "(vpblendmd|vmovdqa32)\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_blend_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-2.c
new file mode 100644
index 0000000000..c2670fbf9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmd-2.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2, MASK_TYPE mask)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (mask & (1LL << i)) ? s2[i] : s1[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 15 + 3467 * i * sign;
+ src2.a[i] = -2217 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_mask_blend_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-1.c
new file mode 100644
index 0000000000..38581beaf6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "(vpblendmq|vmovdqa64)\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_blend_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-2.c
new file mode 100644
index 0000000000..1fc8a5b571
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpblendmq-2.c
@@ -0,0 +1,43 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2, MASK_TYPE mask)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (mask & (1LL << i)) ? s2[i] : s1[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 15 + 3467 * i * sign;
+ src2.a[i] = -2217 * i * sign;
+ sign = sign * -1;
+ }
+
+ res1.x = INTRINSIC (_mask_blend_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a, mask);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-1.c
new file mode 100644
index 0000000000..668db6b81a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+%e\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+%e\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastd\[ \\t\]+%e\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile int z;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastd_epi32 (y);
+ x = _mm512_mask_broadcastd_epi32 (x, m, y);
+ x = _mm512_maskz_broadcastd_epi32 (m, y);
+
+ x = _mm512_set1_epi32 (z);
+ x = _mm512_mask_set1_epi32 (x, m, z);
+ x = _mm512_maskz_set1_epi32 (m, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-2.c
new file mode 100644
index 0000000000..67bd3ac2d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastd-2.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[0];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ UNION_TYPE (128, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 4; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcastd_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_broadcastd_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcastd_epi32) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ res1.x = INTRINSIC (_set1_epi32) (src.a[0]);
+ res2.x = INTRINSIC (_mask_set1_epi32) (res2.x, mask, src.a[0]);
+ res3.x = INTRINSIC (_maskz_set1_epi32) (mask, src.a[0]);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-1.c
new file mode 100644
index 0000000000..7c4698a34d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+%r\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+%r\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "vpbroadcastq\[ \\t\]+%r\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 { target { ! { ia32 } } } } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile long long z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_broadcastq_epi64 (y);
+ x = _mm512_mask_broadcastq_epi64 (x, m, y);
+ x = _mm512_maskz_broadcastq_epi64 (m, y);
+
+ x = _mm512_set1_epi64 (z);
+ x = _mm512_mask_set1_epi64 (x, m, z);
+ x = _mm512_maskz_set1_epi64 (m, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-2.c
new file mode 100644
index 0000000000..4518f6ef4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpbroadcastq-2.c
@@ -0,0 +1,72 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[0];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ UNION_TYPE (128, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < 2; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_broadcastq_epi64) (src.x);
+ res2.x = INTRINSIC (_mask_broadcastq_epi64) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_broadcastq_epi64) (mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+
+ res1.x = INTRINSIC (_set1_epi64) (src.a[0]);
+ res2.x = INTRINSIC (_mask_set1_epi64) (res2.x, mask, src.a[0]);
+ res3.x = INTRINSIC (_maskz_set1_epi64) (mask, src.a[0]);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-1.c
new file mode 100644
index 0000000000..7e835db1e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_epi32_mask (x, x, _MM_CMPINT_GE);
+ m = _mm512_mask_cmp_epi32_mask (m, x, x, _MM_CMPINT_NLE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c
new file mode 100644
index 0000000000..600dfd2c0c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpd-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#if AVX512F_LEN == 512
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 16; i++) \
+ { \
+ dst_ref = ((rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_si512 (s1); \
+ source2.x = _mm512_loadu_si512 (s2); \
+ dst1 = _mm512_cmp_epi32_mask (source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_epi32_mask (mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((mask & dst_ref) != dst2) abort();
+#endif
+
+static void
+TEST ()
+{
+ UNION_TYPE (AVX512F_LEN, i_d) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+ int s1[16] = {2134, 6678, 453, 54646,
+ 231, 5674, 111, 23241,
+ 12314, 145, 671, 77575,
+ 23455, 166, 5321, 5673};
+ int s2[16] = {41124, 6678, 8653, 856,
+ 231, 4646, 111, 124,
+ 2745, 4567, 3676, 123,
+ 714, 3589, 5683, 5673};
+
+ CMP(0x00, s1[i] == s2[i]);
+ CMP(0x01, s1[i] < s2[i]);
+ CMP(0x02, s1[i] <= s2[i]);
+ CMP(0x03, 0);
+ CMP(0x04, s1[i] != s2[i]);
+ CMP(0x05, s1[i] >= s2[i]);
+ CMP(0x06, s1[i] > s2[i]);
+ CMP(0x07, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-1.c
new file mode 100644
index 0000000000..834fae79a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpeqd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcmpeqd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpeq_epi32_mask (x, x);
+ m = _mm512_mask_cmpeq_epi32_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-2.c
new file mode 100644
index 0000000000..9a4c493aa6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqd-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] == s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpeq_epi32_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_cmpeq_epi32_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res_ref != res2)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-1.c
new file mode 100644
index 0000000000..8689fe3a0c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpeqq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcmpeqq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpeq_epi64_mask (x, x);
+ m = _mm512_mask_cmpeq_epi64_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-2.c
new file mode 100644
index 0000000000..8c269eeb10
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpeqq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] == s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res2, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpeq_epi64_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_cmpeq_epi64_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-1.c
new file mode 100644
index 0000000000..83c259eeee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epi32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-2.c
new file mode 100644
index 0000000000..988587810b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpged-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-1.c
new file mode 100644
index 0000000000..ec7a175107
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epi64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-2.c
new file mode 100644
index 0000000000..dfff1dc348
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-1.c
new file mode 100644
index 0000000000..3db73a9fe3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epu32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-2.c
new file mode 100644
index 0000000000..7bb3667839
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeud-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-1.c
new file mode 100644
index 0000000000..4d9c3f4ef2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpge_epu64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-2.c
new file mode 100644
index 0000000000..78cae6941c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgeuq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] >= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpge_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-1.c
new file mode 100644
index 0000000000..1be0f8d263
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpgtd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcmpgtd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpgt_epi32_mask (x, x);
+ m = _mm512_mask_cmpgt_epi32_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-2.c
new file mode 100644
index 0000000000..6c82436051
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtd-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] > s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpgt_epi32_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_cmpgt_epi32_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res_ref != res2)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-1.c
new file mode 100644
index 0000000000..b94be287eb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpgtq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcmpgtq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpgt_epi64_mask (x, x);
+ m = _mm512_mask_cmpgt_epi64_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-2.c
new file mode 100644
index 0000000000..c1eb5801b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpgtq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] > s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res2, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpgt_epi64_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_cmpgt_epi64_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-1.c
new file mode 100644
index 0000000000..68f085ace4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epi32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-2.c
new file mode 100644
index 0000000000..15573766c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpled-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-1.c
new file mode 100644
index 0000000000..0d5b6fab68
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epi64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-2.c
new file mode 100644
index 0000000000..5fdf9d7520
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-1.c
new file mode 100644
index 0000000000..902f4ab05a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epu32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-2.c
new file mode 100644
index 0000000000..22c825a09b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleud-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-1.c
new file mode 100644
index 0000000000..5c5f0e5cc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmple_epu64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-2.c
new file mode 100644
index 0000000000..e7843d1e4f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpleuq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] <= s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmple_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-1.c
new file mode 100644
index 0000000000..16bb1bf1c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epi32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-2.c
new file mode 100644
index 0000000000..f8728cd0db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltd-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-1.c
new file mode 100644
index 0000000000..0e87ad14e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epi64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-2.c
new file mode 100644
index 0000000000..204b69e575
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-1.c
new file mode 100644
index 0000000000..0ad8fd1957
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epu32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-2.c
new file mode 100644
index 0000000000..aea70ec84c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltud-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-1.c
new file mode 100644
index 0000000000..d428b00647
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmplt_epu64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-2.c
new file mode 100644
index 0000000000..83becbd6f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpltuq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] < s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmplt_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-1.c
new file mode 100644
index 0000000000..2cffad5945
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epi32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-2.c
new file mode 100644
index 0000000000..fd9bfc5aa4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqd-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epi32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-1.c
new file mode 100644
index 0000000000..4a2928acbf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epi64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-2.c
new file mode 100644
index 0000000000..1beacd4490
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpneqq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epi64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-1.c
new file mode 100644
index 0000000000..2c204790d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epu32_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-2.c
new file mode 100644
index 0000000000..09d11f52ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequd-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, int *s1, int *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epu32_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res_ref != res1)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-1.c
new file mode 100644
index 0000000000..7701493998
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmpneq_epu64_mask (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-2.c
new file mode 100644
index 0000000000..41e1f5b63a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpnequq-2.c
@@ -0,0 +1,46 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *r, long long *s1, long long *s2)
+{
+ int i;
+ *r = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (s1[i] != s2[i])
+ *r = *r | (one << i);
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res1, res_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ src1.a[i * 2] = i;
+ src1.a[i * 2 + 1] = i * i;
+ src2.a[i * 2] = 2 * i;
+ src2.a[i * 2 + 1] = i * i;
+ }
+
+ res1 = INTRINSIC (_cmpneq_epu64_mask) (src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-1.c
new file mode 100644
index 0000000000..800140d032
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+/* { dg-final { scan-assembler "vpcmpq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_epi64_mask (x, x, _MM_CMPINT_NE);
+ m = _mm512_mask_cmp_epi64_mask (m, x, x, _MM_CMPINT_NLT);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c
new file mode 100644
index 0000000000..2a9ceb6a9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpq-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+__mmask8 dst_ref;
+
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 8; i++) \
+ { \
+ dst_ref = ((rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_si512 (s1); \
+ source2.x = _mm512_loadu_si512 (s2); \
+ dst1 = _mm512_cmp_epi64_mask (source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_epi64_mask (mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((mask & dst_ref) != dst2) abort();
+
+static void
+TEST ()
+{
+ UNION_TYPE (AVX512F_LEN, i_d) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ long long s1[8] = {2134, 6678, 453, 54646,
+ 231, 5674, 111, 23241};
+ long long s2[8] = {41124, 6678, 8653, 856,
+ 231, 4646, 111, 124};
+ int i;
+
+ CMP(0x00, s1[i] == s2[i]);
+ CMP(0x01, s1[i] < s2[i]);
+ CMP(0x02, s1[i] <= s2[i]);
+ CMP(0x03, 0);
+ CMP(0x04, s1[i] != s2[i]);
+ CMP(0x05, s1[i] >= s2[i]);
+ CMP(0x06, s1[i] > s2[i]);
+ CMP(0x07, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c
new file mode 100644
index 0000000000..110c090476
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vpcmpud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_epu32_mask (x, x, _MM_CMPINT_EQ);
+ m = _mm512_mask_cmp_epu32_mask (m, x, x, _MM_CMPINT_LT);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c
new file mode 100644
index 0000000000..c0bb97839f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpud-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#if AVX512F_LEN == 512
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 16; i++) \
+ { \
+ dst_ref = ((rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_si512 (s1); \
+ source2.x = _mm512_loadu_si512 (s2); \
+ dst1 = _mm512_cmp_epu32_mask (source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_epu32_mask (mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((mask & dst_ref) != dst2) abort();
+#endif
+
+static void
+TEST ()
+{
+ unsigned int s1[16] = {2134, 6678, 453, 54646,
+ 231, 5674, 111, 23241,
+ 12314, 145, 671, 77575,
+ 23455, 166, 5321, 5673};
+ unsigned int s2[16] = {41124, 6678, 8653, 856,
+ 231, 4646, 111, 124,
+ 2745, 4567, 3676, 123,
+ 714, 3589, 5683, 5673};
+ UNION_TYPE (AVX512F_LEN, i_d) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ CMP(0x00, s1[i] == s2[i]);
+ CMP(0x01, s1[i] < s2[i]);
+ CMP(0x02, s1[i] <= s2[i]);
+ CMP(0x03, 0);
+ CMP(0x04, s1[i] != s2[i]);
+ CMP(0x05, s1[i] >= s2[i]);
+ CMP(0x06, s1[i] > s2[i]);
+ CMP(0x07, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-1.c
new file mode 100644
index 0000000000..2f79f4dccb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\[^\{\]" } } */
+/* { dg-final { scan-assembler "vpcmpuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n^k\]*%k\[1-7\]\{" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ m = _mm512_cmp_epu64_mask (x, x, _MM_CMPINT_LE);
+ m = _mm512_mask_cmp_epu64_mask (m, x, x, _MM_CMPINT_UNUSED);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c
new file mode 100644
index 0000000000..3bd1b86562
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcmpuq-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#if AVX512F_LEN == 512
+#define CMP(imm, rel) \
+ dst_ref = 0; \
+ for (i = 0; i < 8; i++) \
+ { \
+ dst_ref = ((rel) << i) | dst_ref; \
+ } \
+ source1.x = _mm512_loadu_si512 (s1); \
+ source2.x = _mm512_loadu_si512 (s2); \
+ dst1 = _mm512_cmp_epu64_mask (source1.x, source2.x, imm);\
+ dst2 = _mm512_mask_cmp_epu64_mask (mask, source1.x, source2.x, imm);\
+ if (dst_ref != dst1) abort(); \
+ if ((mask & dst_ref) != dst2) abort();
+#endif
+
+static void
+TEST ()
+{
+ UNION_TYPE (AVX512F_LEN, i_q) source1, source2;
+ MASK_TYPE dst1, dst2, dst_ref;
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+ unsigned long long s1[8] = {2134, 6678, 453, 54646,
+ 231, 5674, 111, 23241};
+ unsigned long long s2[8] = {41124, 6678, 8653, 856,
+ 231, 4646, 111, 124};
+
+ CMP(0x00, s1[i] == s2[i]);
+ CMP(0x01, s1[i] < s2[i]);
+ CMP(0x02, s1[i] <= s2[i]);
+ CMP(0x03, 0);
+ CMP(0x04, s1[i] != s2[i]);
+ CMP(0x05, s1[i] >= s2[i]);
+ CMP(0x06, s1[i] > s2[i]);
+ CMP(0x07, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-1.c
new file mode 100644
index 0000000000..162fa7aef0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcompressd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcompressd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpcompressd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+int *p;
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_compress_epi32 (x, m, x);
+ x = _mm512_maskz_compress_epi32 (m, x);
+
+ _mm512_mask_compressstoreu_epi32 (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-2.c
new file mode 100644
index 0000000000..2c1e3f586d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressd-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define MASK ((1 << SIZE) - 1)
+#include <x86intrin.h>
+
+static void
+CALC (int *s, int *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[k++] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s, res1, res2;
+ int res3[SIZE];
+ MASK_TYPE compressed_mask, mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, mask_bit_count, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345 * (i + 200) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_compress_epi32) (res1.x, mask, s.x);
+ res2.x = INTRINSIC (_maskz_compress_epi32) (mask, s.x);
+ INTRINSIC (_mask_compressstoreu_epi32) (res3, mask, s.x);
+
+ mask_bit_count = __popcntd (mask & MASK);
+ compressed_mask = (1 << mask_bit_count) - 1;
+ CALC (s.a, res_ref, mask);
+
+ MASK_MERGE (i_d) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, compressed_mask, SIZE);
+ if (checkVi (res3, res_ref, SIZE))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-1.c
new file mode 100644
index 0000000000..3a07ee89bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpcompressq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpcompressq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpcompressq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*\\)\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+long long *p;
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_compress_epi64 (x, m, x);
+ x = _mm512_maskz_compress_epi64 (m, x);
+
+ _mm512_mask_compressstoreu_epi64 (p, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-2.c
new file mode 100644
index 0000000000..0ea69f0ab7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpcompressq-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#define MASK ((1 << SIZE) - 1)
+#include <x86intrin.h>
+
+static void
+CALC (long long *s, long long *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[k++] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s, res1, res2;
+ long long res3[SIZE];
+ MASK_TYPE compressed_mask, mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, mask_bit_count, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 12345 * (i + 200) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_compress_epi64) (res1.x, mask, s.x);
+ res2.x = INTRINSIC (_maskz_compress_epi64) (mask, s.x);
+ INTRINSIC (_mask_compressstoreu_epi64) (res3, mask, s.x);
+
+ mask_bit_count = __popcntd (mask & MASK);
+ compressed_mask = (1 << mask_bit_count) - 1;
+ CALC (s.a, res_ref, mask);
+
+ MASK_MERGE (i_q) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, compressed_mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, compressed_mask, SIZE);
+ if (checkVl (res3, res_ref, SIZE))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-1.c
new file mode 100644
index 0000000000..4b5f8d91a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpermd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutexvar_epi32 (x, x);
+ x = _mm512_maskz_permutexvar_epi32 (m, x, x);
+ x = _mm512_mask_permutexvar_epi32 (x, m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c
new file mode 100644
index 0000000000..1c494e3d1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermd-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *mask, int *src1, int *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ dst[i] = src1[mask[i] & 15];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = (i + 10) * (i + 10) * sign;
+ src2.a[i] = (i + 30);
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutexvar_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_maskz_permutexvar_epi32) (mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_mask_permutexvar_epi32) (res3.x, mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-1.c
new file mode 100644
index 0000000000..0436dfd709
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermi2d\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask2_permutex2var_epi32 (x, x, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c
new file mode 100644
index 0000000000..6205cc5300
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2d-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (int *dst, int *src1, int *ind, int *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res, ind;
+ int res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = DEFAULT_VALUE;
+ s1.a[i] = 34 * i + 1;
+ s2.a[i] = 34 * i;
+
+ res.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res.x =
+ INTRINSIC (_mask2_permutex2var_epi32) (s1.x, ind.x, mask, s2.x);
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-1.c
new file mode 100644
index 0000000000..e2b74cc991
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermi2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m512i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask2_permutex2var_pd (x, y, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c
new file mode 100644
index 0000000000..0bb5b4c522
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2pd-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (double *dst, double *src1, long long *ind, double *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, k;
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, res;
+ UNION_TYPE (AVX512F_LEN, i_q) ind;
+ double res_ref[SIZE];
+
+ union
+ {
+ double f;
+ long long i;
+ } ind_copy[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ /* Some of the integer indexes may be interpreted as floating point
+ values in mask-merge mode, that's why we use IND_COPY. */
+ ind.a[i] = ind_copy[i].i = 17 * (i << 1);
+ s1.a[i] = 42.5 * i + 1;
+ s2.a[i] = 22.5 * i;
+
+ res.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res.x = INTRINSIC (_mask2_permutex2var_pd) (s1.x, ind.x, mask, s2.x);
+
+ /* Standard MASK_MERGE cannot be used since VPERMI2PD in mask-merge mode
+ merges vectors of two different types (_m512d and __m512i). */
+ for (k = 0; k < SIZE; k++)
+ res_ref[k] = (mask & (1LL << k)) ? res_ref[k] : ind_copy[k].f;
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-1.c
new file mode 100644
index 0000000000..fc103a90e1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermi2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m512i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask2_permutex2var_ps (x, y, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c
new file mode 100644
index 0000000000..f8038ef159
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2ps-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (float *dst, float *src1, int *ind, float *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, k;
+ UNION_TYPE (AVX512F_LEN,) s1, s2, res;
+ UNION_TYPE (AVX512F_LEN, i_d) ind;
+ float res_ref[SIZE];
+
+ union
+ {
+ float f;
+ int i;
+ } ind_copy[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ /* Some of the integer indexes may be interpreted as floating point
+ values in mask-merge mode, that's why we use IND_COPY. */
+ ind.a[i] = ind_copy[i].i = 17 * (i << 1);
+ s1.a[i] = 42.5 * i + 1;
+ s2.a[i] = 22.5 * i;
+
+ res.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res.x = INTRINSIC (_mask2_permutex2var_ps) (s1.x, ind.x, mask, s2.x);
+
+ /* Standard MASK_MERGE cannot be used since VPERMI2PS in mask-merge mode
+ merges vectors of two different types (_m512 and __m512i). */
+ for (k = 0; k < SIZE; k++)
+ res_ref[k] = (mask & (1LL << k)) ? res_ref[k] : ind_copy[k].f;
+
+ if (UNION_CHECK (AVX512F_LEN,) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-1.c
new file mode 100644
index 0000000000..7d780b2a3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermi2q\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask2_permutex2var_epi64 (x, x, m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c
new file mode 100644
index 0000000000..0268afbce5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermi2q-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (long long *dst, long long *src1, long long *ind, long long *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res, ind;
+ long long res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = DEFAULT_VALUE;
+ s1.a[i] = 34 * i + 1;
+ s2.a[i] = 34 * i;
+
+ res.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res.x =
+ INTRINSIC (_mask2_permutex2var_epi64) (s1.x, ind.x, mask, s2.x);
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-1.c
new file mode 100644
index 0000000000..061a625359
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m512i c;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutevar_pd (x, c);
+ x = _mm512_mask_permutevar_pd (x, m, x, c);
+ x = _mm512_maskz_permutevar_pd (m, x, c);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-2.c
new file mode 100644
index 0000000000..27d697bd84
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpd-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#ifndef CTRL
+#define CTRL 6
+#endif
+
+#undef mask_v
+#define mask_v(pos) (((CTRL & (1ULL << (pos))) >> (pos)) << 1)
+
+static void
+CALC (double *s1, long long *s2, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[(2 * (i / 2)) + ((s2[i] & 0x02) >> 1)];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_q) s2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i + 10.;
+ s2.a[i] = mask_v (i);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutevar_pd) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_permutevar_pd) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_permutevar_pd) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-1.c
new file mode 100644
index 0000000000..8b5ffd023a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermilpd\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permute_pd (x, 13);
+ x = _mm512_mask_permute_pd (x, m, x, 13);
+ x = _mm512_maskz_permute_pd (m, x, 13);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-2.c
new file mode 100644
index 0000000000..9b5ecd4c6c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpdi-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#ifndef CTRL
+#define CTRL 129
+#endif
+
+static void
+CALC (double *s1, int s2, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (s2 & (1 << i)) ? s1[1 + 2 * (i / 2)] : s1[2 * (i / 2)];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i + 10.;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permute_pd) (s1.x, CTRL);
+ res2.x = INTRINSIC (_mask_permute_pd) (res2.x, mask, s1.x, CTRL);
+ res3.x = INTRINSIC (_maskz_permute_pd) (mask, s1.x, CTRL);
+
+ CALC (s1.a, CTRL, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-1.c
new file mode 100644
index 0000000000..b46182b247
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m512i c;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutevar_ps (x, c);
+ x = _mm512_mask_permutevar_ps (x, m, x, c);
+ x = _mm512_maskz_permutevar_ps (m, x, c);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-2.c
new file mode 100644
index 0000000000..92c65538d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilps-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#ifndef CTRL
+#define CTRL 233
+#endif
+
+#undef mask_v
+#define mask_v(pos) ((CTRL & (0x3 << (pos))) >> (pos))
+
+static void
+CALC (float *s1, int *s2, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[(4 * (i / 4)) + (s2[i] & 0x03)];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s1, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_d) s2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i + 10.;
+ s2.a[i] = mask_v (i);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutevar_ps) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_permutevar_ps) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_permutevar_ps) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-1.c
new file mode 100644
index 0000000000..f09213e03e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermilps\[ \\t\]+\[^\n\]*13\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permute_ps (x, 13);
+ x = _mm512_mask_permute_ps (x, m, x, 13);
+ x = _mm512_maskz_permute_ps (m, x, 13);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-2.c
new file mode 100644
index 0000000000..381a794b4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermilpsi-2.c
@@ -0,0 +1,82 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#ifndef CTRL
+#define CTRL 129
+#endif
+
+#ifndef SELECT4_DEFINED
+#define SELECT4_DEFINED
+static int
+select4 (int i, unsigned ctrl)
+{
+ int res;
+ switch (i % 4)
+ {
+ case 0:
+ res = (CTRL & 0x03);
+ break;
+ case 1:
+ res = ((CTRL & 0x0c) >> 2);
+ break;
+ case 2:
+ res = ((CTRL & 0x30) >> 4);
+ break;
+ case 3:
+ res = ((CTRL & 0xc0) >> 6);
+ break;
+ }
+ return res;
+}
+#endif
+
+static void
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[(4 * (i / 4)) + select4 (i, CTRL)];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i + 10.;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permute_ps) (s1.x, CTRL);
+ res2.x = INTRINSIC (_mask_permute_ps) (res2.x, mask, s1.x, CTRL);
+ res3.x = INTRINSIC (_maskz_permute_ps) (mask, s1.x, CTRL);
+
+ CALC (s1.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-1.c
new file mode 100644
index 0000000000..d2e8b9c971
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512d y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_permutexvar_pd (x, y);
+ y = _mm512_mask_permutexvar_pd (y, m, x, y);
+ y = _mm512_maskz_permutexvar_pd (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-2.c
new file mode 100644
index 0000000000..00d171b790
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermpd-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *mask, double *s1, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[mask[i] & 7 % SIZE];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) src1, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutexvar_pd) (src2.x, src1.x);
+ res2.x = INTRINSIC (_mask_permutexvar_pd) (res2.x, mask, src2.x, src1.x);
+ res3.x = INTRINSIC (_maskz_permutexvar_pd) (mask, src2.x, src1.x);
+
+ CALC (src2.a, src1.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-1.c
new file mode 100644
index 0000000000..97fd92c840
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex_pd (x, 13);
+ x = _mm512_mask_permutex_pd (x, m, x, 13);
+ x = _mm512_maskz_permutex_pd (m, x, 13);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-2.c
new file mode 100644
index 0000000000..eb8e583812
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermpdi-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#define N 0x7c
+
+static void
+CALC (double *s1, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ int index = (N >> ((i % 4) * 2)) & 3;
+ int base = i / 4;
+ r[i] = s1[4 * base + index];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) src1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_permutex_pd) (src1.x, N);
+ res2.x = INTRINSIC (_mask_permutex_pd) (res2.x, mask, src1.x, N);
+ res3.x = INTRINSIC (_maskz_permutex_pd) (mask, src1.x, N);
+
+ CALC (src1.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermps-1.c
new file mode 100644
index 0000000000..7b7367afad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermps-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512 y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ y = _mm512_permutexvar_ps (x, y);
+ y = _mm512_mask_permutexvar_ps (y, m, x, y);
+ y = _mm512_maskz_permutexvar_ps (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermps-2.c
new file mode 100644
index 0000000000..53081c48e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermps-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *mask, float *s1, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[mask[i] & 15 % SIZE];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) src1, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_d) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutexvar_ps) (src2.x, src1.x);
+ res2.x = INTRINSIC (_mask_permutexvar_ps) (res2.x, mask, src2.x, src1.x);
+ res3.x = INTRINSIC (_maskz_permutexvar_ps) (mask, src2.x, src1.x);
+
+ CALC (src2.a, src1.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-1.c
new file mode 100644
index 0000000000..ef0271b612
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex_epi64 (x, 13);
+ x = _mm512_mask_permutex_epi64 (x, m, x, 13);
+ x = _mm512_maskz_permutex_epi64 (m, x, 13);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c
new file mode 100644
index 0000000000..6b1d778c6f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-imm-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#define IMM_MASK 0x7c
+
+static void
+CALC (long long *src1, int mask, long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ int index = ((mask >> (2 * (i % 4))) & 3);
+ int base = i / 4;
+ dst[i] = src1[4 * base + index];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = (i + 10) * (i + 10) * sign;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutex_epi64) (src1.x, IMM_MASK);
+ res2.x = INTRINSIC (_maskz_permutex_epi64) (mask, src1.x, IMM_MASK);
+ res3.x = INTRINSIC (_mask_permutex_epi64) (res3.x, mask, src1.x, IMM_MASK);
+
+ CALC (src1.a, IMM_MASK, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-1.c
new file mode 100644
index 0000000000..62b28c33d5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpermq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutexvar_epi64 (x, x);
+ x = _mm512_maskz_permutexvar_epi64 (m, x, x);
+ x = _mm512_mask_permutexvar_epi64 (x, m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c
new file mode 100644
index 0000000000..ff330a571b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermq-var-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *mask, long long *src1, long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ dst[i] = src1[mask[i] & 7];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = (i + 10) * (i + 10) * sign;
+ src2.a[i] = 2 * i + 10;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_permutexvar_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_maskz_permutexvar_epi64) (mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_mask_permutexvar_epi64) (res3.x, mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-1.c
new file mode 100644
index 0000000000..892b5710da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermt2d\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermt2d\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermt2d\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex2var_epi32 (x, x, x);
+ x = _mm512_mask_permutex2var_epi32 (x, m, x, x);
+ x = _mm512_maskz_permutex2var_epi32 (m, x, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c
new file mode 100644
index 0000000000..bba108abdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2d-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (int *dst, int *src1, int *ind, int *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3, ind;
+ int res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = 17 * (i << 1);
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 34 * i;
+
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res1.x = INTRINSIC (_permutex2var_epi32) (s1.x, ind.x, s2.x);
+ res2.x =
+ INTRINSIC (_mask_permutex2var_epi32) (s1.x, mask, ind.x, s2.x);
+ res3.x =
+ INTRINSIC (_maskz_permutex2var_epi32) (mask, s1.x, ind.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-1.c
new file mode 100644
index 0000000000..01595233f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermt2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermt2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermt2pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __m512i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex2var_pd (x, y, x);
+ x = _mm512_mask_permutex2var_pd (x, m, y, x);
+ x = _mm512_maskz_permutex2var_pd (m, x, y, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c
new file mode 100644
index 0000000000..4891c8553c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2pd-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (double *dst, double *src1, long long *ind, double *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_q) ind;
+ double res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = 17 * (i << 1);
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 22.5 * i;
+
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res1.x = INTRINSIC (_permutex2var_pd) (s1.x, ind.x, s2.x);
+ res2.x = INTRINSIC (_mask_permutex2var_pd) (s1.x, mask, ind.x, s2.x);
+ res3.x =
+ INTRINSIC (_maskz_permutex2var_pd) (mask, s1.x, ind.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-1.c
new file mode 100644
index 0000000000..f315055da8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermt2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermt2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermt2ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __m512i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex2var_ps (x, y, x);
+ x = _mm512_mask_permutex2var_ps (x, m, y, x);
+ x = _mm512_maskz_permutex2var_ps (m, x, y, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c
new file mode 100644
index 0000000000..a3d57c41d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2ps-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (float *dst, float *src1, int *ind, float *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN,) s1, s2, res1, res2, res3;
+ UNION_TYPE (AVX512F_LEN, i_d) ind;
+ float res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = 17 * (i << 1);
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 22.5 * i;
+
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res1.x = INTRINSIC (_permutex2var_ps) (s1.x, ind.x, s2.x);
+ res2.x = INTRINSIC (_mask_permutex2var_ps) (s1.x, mask, ind.x, s2.x);
+ res3.x =
+ INTRINSIC (_maskz_permutex2var_ps) (mask, s1.x, ind.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-1.c
new file mode 100644
index 0000000000..65f4afb040
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpermt2q\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpermt2q\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpermt2q\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_permutex2var_epi64 (x, x, x);
+ x = _mm512_mask_permutex2var_epi64 (x, m, x, x);
+ x = _mm512_maskz_permutex2var_epi64 (m, x, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c
new file mode 100644
index 0000000000..57fe3d4b11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpermt2q-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (long long *dst, long long *src1, long long *ind, long long *src2)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ unsigned long long offset = ind[i] & (SIZE - 1);
+ unsigned long long cond = ind[i] & SIZE;
+
+ dst[i] = cond ? src2[offset] : src1[offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3, ind;
+ long long res_ref[SIZE];
+
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ ind.a[i] = 17 * (i << 1);
+ s1.a[i] = DEFAULT_VALUE;
+ s2.a[i] = 34 * i;
+
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ CALC (res_ref, s1.a, ind.a, s2.a);
+
+ res1.x = INTRINSIC (_permutex2var_epi64) (s1.x, ind.x, s2.x);
+ res2.x =
+ INTRINSIC (_mask_permutex2var_epi64) (s1.x, mask, ind.x, s2.x);
+ res3.x =
+ INTRINSIC (_maskz_permutex2var_epi64) (mask, s1.x, ind.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-1.c
new file mode 100644
index 0000000000..c70a2abc9a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpexpandd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+
+#include <immintrin.h>
+
+int *p;
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_expand_epi32 (x, m, x);
+ x = _mm512_maskz_expand_epi32 (m, x);
+
+ x = _mm512_mask_expandloadu_epi32 (x, m, p);
+ x = _mm512_maskz_expandloadu_epi32 (m, p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-2.c
new file mode 100644
index 0000000000..31b3b5a05e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandd-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s, int *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ int s2[SIZE];
+ int res_ref1[SIZE];
+ int res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_expand_epi32) (res1.x, mask, s1.x);
+ res2.x = INTRINSIC (_maskz_expand_epi32) (mask, s1.x);
+ res3.x = INTRINSIC (_mask_expandloadu_epi32) (res3.x, mask, s2);
+ res4.x = INTRINSIC (_maskz_expandloadu_epi32) (mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ MASK_MERGE (i_d) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref1))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref1))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref2))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-1.c
new file mode 100644
index 0000000000..fc477f209a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vpexpandq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+
+#include <immintrin.h>
+
+long long *p;
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mask_expand_epi64 (x, m, x);
+ x = _mm512_maskz_expand_epi64 (m, x);
+
+ x = _mm512_mask_expandloadu_epi64 (x, m, p);
+ x = _mm512_maskz_expandloadu_epi64 (m, p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-2.c
new file mode 100644
index 0000000000..f72799c574
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpexpandq-2.c
@@ -0,0 +1,66 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s, long long *r, MASK_TYPE mask)
+{
+ int i, k;
+
+ for (i = 0, k = 0; i < SIZE; i++)
+ {
+ if (mask & (1 << i))
+ r[i] = s[k++];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ long long s2[SIZE];
+ long long res_ref1[SIZE];
+ long long res_ref2[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 12345 * (i + 200) * sign;
+ s2[i] = 67890 * (i + 300) * sign;
+ res1.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_mask_expand_epi64) (res1.x, mask, s1.x);
+ res2.x = INTRINSIC (_maskz_expand_epi64) (mask, s1.x);
+ res3.x = INTRINSIC (_mask_expandloadu_epi64) (res3.x, mask, s2);
+ res4.x = INTRINSIC (_maskz_expandloadu_epi64) (mask, s2);
+
+ CALC (s1.a, res_ref1, mask);
+ CALC (s2, res_ref2, mask);
+
+ MASK_MERGE (i_q) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref1))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref1, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref1))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref2))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref2, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res4, res_ref2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-1.c
new file mode 100644
index 0000000000..2c88e92bd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmaxsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmaxsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmaxsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_epi32 (x, x);
+ x = _mm512_mask_max_epi32 (x, m, x, x);
+ x = _mm512_maskz_max_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-2.c
new file mode 100644
index 0000000000..78c5511a37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsd-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+
+CALC (int *src1, int *src2, int *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] > src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = (i + 2000) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_max_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_epi32) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-1.c
new file mode 100644
index 0000000000..e15fa2ab3d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmaxsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmaxsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmaxsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_epi64 (x, x);
+ x = _mm512_mask_max_epi64 (x, m, x, x);
+ x = _mm512_maskz_max_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-2.c
new file mode 100644
index 0000000000..10bcd8230f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxsq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+
+CALC (long long *src1, long long *src2, long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] > src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = (i + 2000) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_max_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_epi64) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-1.c
new file mode 100644
index 0000000000..321992ac10
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmaxud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmaxud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmaxud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_epu32 (x, x);
+ x = _mm512_mask_max_epu32 (x, m, x, x);
+ x = _mm512_maskz_max_epu32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-2.c
new file mode 100644
index 0000000000..b014be8627
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxud-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+
+CALC (unsigned *src1, unsigned *src2,
+ unsigned *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] > src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i;
+ src2.a[i] = (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_max_epu32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_epu32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_epu32) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-1.c
new file mode 100644
index 0000000000..2cf8b4cc45
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmaxuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmaxuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmaxuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_max_epu64 (x, x);
+ x = _mm512_mask_max_epu64 (x, m, x, x);
+ x = _mm512_maskz_max_epu64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-2.c
new file mode 100644
index 0000000000..e2daacd398
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmaxuq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+
+CALC (unsigned long long *src1, unsigned long long *src2,
+ unsigned long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] > src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i;
+ src2.a[i] = (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_max_epu64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_max_epu64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_max_epu64) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-1.c
new file mode 100644
index 0000000000..2beffc6e2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpminsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpminsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpminsd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_epi32 (x, x);
+ x = _mm512_mask_min_epi32 (x, m, x, x);
+ x = _mm512_maskz_min_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-2.c
new file mode 100644
index 0000000000..1a6b82bfdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminsd-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+
+CALC (int *src1, int *src2, int *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] < src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = (i + 2000) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_min_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_epi32) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-1.c
new file mode 100644
index 0000000000..8270307fb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpminsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpminsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpminsq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_epi64 (x, x);
+ x = _mm512_mask_min_epi64 (x, m, x, x);
+ x = _mm512_maskz_min_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-2.c
new file mode 100644
index 0000000000..f646489ad4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminsq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+
+CALC (long long *src1, long long *src2, long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] < src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * sign;
+ src2.a[i] = (i + 2000) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_min_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_epi64) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminud-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminud-1.c
new file mode 100644
index 0000000000..6cbb9d631f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminud-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpminud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpminud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpminud\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_epu32 (x, x);
+ x = _mm512_mask_min_epu32 (x, m, x, x);
+ x = _mm512_maskz_min_epu32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminud-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminud-2.c
new file mode 100644
index 0000000000..17aac43a5a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminud-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+
+CALC (unsigned *src1, unsigned *src2,
+ unsigned *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] < src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i;
+ src2.a[i] = i + 20;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_min_epu32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_epu32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_epu32) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-1.c
new file mode 100644
index 0000000000..816c11bcca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpminuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpminuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpminuq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_min_epu64 (x, x);
+ x = _mm512_mask_min_epu64 (x, m, x, x);
+ x = _mm512_maskz_min_epu64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-2.c
new file mode 100644
index 0000000000..4c27977ace
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpminuq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+
+CALC (unsigned long long *src1, unsigned long long *src2,
+ unsigned long long *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] < src2[i] ? src1[i] : src2[i];
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i;
+ src2.a[i] = (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_min_epu64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_min_epu64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_min_epu64) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-1.c
new file mode 100644
index 0000000000..5f1190399b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi32_epi8 (s);
+ res = _mm512_mask_cvtepi32_epi8 (res, m, s);
+ res = _mm512_maskz_cvtepi32_epi8 (m, s);
+ _mm512_mask_cvtepi32_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-2.c
new file mode 100644
index 0000000000..cc63f48165
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdb-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (char *r, int *s)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ {
+ r[i] = (i < SIZE) ? (char) s[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ char res_ref[16];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepi32_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtepi32_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtepi32_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-1.c
new file mode 100644
index 0000000000..a4652a675d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi32_epi16 (s);
+ res = _mm512_mask_cvtepi32_epi16 (res, m, s);
+ res = _mm512_maskz_cvtepi32_epi16 (m, s);
+ _mm512_mask_cvtepi32_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-2.c
new file mode 100644
index 0000000000..43fe8cb163
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovdw-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 16)
+
+CALC (short *r, int *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ r[i] = (i < SIZE) ? (short) s[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ short res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ short res_ref[SIZE_HALF];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepi32_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtepi32_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtepi32_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-1.c
new file mode 100644
index 0000000000..76b6ca5076
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi64_epi8 (s);
+ res = _mm512_mask_cvtepi64_epi8 (res, m, s);
+ res = _mm512_maskz_cvtepi64_epi8 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-2.c
new file mode 100644
index 0000000000..1b0fbbb3d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqb-2.c
@@ -0,0 +1,75 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (char *r, long long *s, int mem)
+{
+ int i;
+ /* Don't zero out upper half if destination is memory. */
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
+ {
+ r[i] = (i < SIZE) ? (char) s[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ char res_ref[16];
+ char res_ref2[16];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ /* To check that memory is not touched. */
+ res4[i] = DEFAULT_VALUE * 2;
+ res_ref2[i] = DEFAULT_VALUE * 2;
+ }
+
+ res1.x = INTRINSIC (_cvtepi64_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtepi64_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtepi64_epi8) (mask, src.x);
+
+ CALC (res_ref, src.a, 0);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+
+
+ INTRINSIC (_mask_cvtepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-1.c
new file mode 100644
index 0000000000..4055bf8ac4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi64_epi32 (s);
+ res = _mm512_mask_cvtepi64_epi32 (res, m, s);
+ res = _mm512_maskz_cvtepi64_epi32 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi32 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-2.c
new file mode 100644
index 0000000000..db5054b932
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqd-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 32)
+
+CALC (int *r, long long *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ r[i] = (i < SIZE) ? (int) s[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3, res5;
+ int res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE_HALF];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepi64_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_cvtepi64_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtepi64_storeu_epi32) (res4, mask, src.x);
+
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-1.c
new file mode 100644
index 0000000000..e63136364d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi64_epi16 (s);
+ res = _mm512_mask_cvtepi64_epi16 (res, m, s);
+ res = _mm512_maskz_cvtepi64_epi16 (m, s);
+ _mm512_mask_cvtepi64_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-2.c
new file mode 100644
index 0000000000..9bdd6e10d6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovqw-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (short *r, long long *s)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ {
+ r[i] = (i < SIZE) ? (short) s[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_w) res1, res2, res3;
+ short res4[8];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ short res_ref[8];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepi64_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtepi64_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtepi64_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-1.c
new file mode 100644
index 0000000000..1b68d9ca76
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtsepi32_epi8 (s);
+ res = _mm512_mask_cvtsepi32_epi8 (res, m, s);
+ res = _mm512_maskz_cvtsepi32_epi8 (m, s);
+ _mm512_mask_cvtsepi32_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-2.c
new file mode 100644
index 0000000000..4ac69b5171
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdb-2.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (char *r, int *s)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ {
+ if (s[i] < CHAR_MIN)
+ r[i] = CHAR_MIN;
+ else if (s[i] > CHAR_MAX)
+ r[i] = CHAR_MAX;
+ else
+ r[i] = s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ char res_ref[16];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtsepi32_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtsepi32_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtsepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi32_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-1.c
new file mode 100644
index 0000000000..ee10c12f03
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtsepi32_epi16 (s);
+ res = _mm512_mask_cvtsepi32_epi16 (res, m, s);
+ res = _mm512_maskz_cvtsepi32_epi16 (m, s);
+ _mm512_mask_cvtsepi32_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-2.c
new file mode 100644
index 0000000000..98d8745d9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsdw-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 16)
+#include <limits.h>
+
+CALC (short *r, int *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ if (s[i] < SHRT_MIN)
+ r[i] = SHRT_MIN;
+ else if (s[i] > SHRT_MAX)
+ r[i] = SHRT_MAX;
+ else
+ r[i] = s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ short res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ short res_ref[SIZE_HALF];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtsepi32_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtsepi32_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtsepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi32_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-1.c
new file mode 100644
index 0000000000..9b2e00449d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtsepi64_epi8 (s);
+ res = _mm512_mask_cvtsepi64_epi8 (res, m, s);
+ res = _mm512_maskz_cvtsepi64_epi8 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c
new file mode 100644
index 0000000000..0fb7883de0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqb-2.c
@@ -0,0 +1,79 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (char *r, long long *s, int mem)
+{
+ int i;
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
+ {
+ if (s[i] < CHAR_MIN)
+ r[i] = CHAR_MIN;
+ else if (s[i] > CHAR_MAX)
+ r[i] = CHAR_MAX;
+ else
+ r[i] = s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ char res_ref[16];
+ char res_ref2[16];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ res_ref2[i] = DEFAULT_VALUE * 2;
+ res4[i] = DEFAULT_VALUE * 2;
+ }
+
+ res1.x = INTRINSIC (_cvtsepi64_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtsepi64_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtsepi64_epi8) (mask, src.x);
+
+ CALC (res_ref, src.a, 0);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+
+ INTRINSIC (_mask_cvtsepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-1.c
new file mode 100644
index 0000000000..ba61989351
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtsepi64_epi32 (s);
+ res = _mm512_mask_cvtsepi64_epi32 (res, m, s);
+ res = _mm512_maskz_cvtsepi64_epi32 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi32 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-2.c
new file mode 100644
index 0000000000..3230528a3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqd-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 32)
+#include <limits.h>
+
+CALC (int *r, long long *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ if (s[i] < INT_MIN)
+ r[i] = INT_MIN;
+ else if (s[i] > INT_MAX)
+ r[i] = INT_MAX;
+ else
+ r[i] = s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ int res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE_HALF];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtsepi64_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_cvtsepi64_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtsepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi64_storeu_epi32) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-1.c
new file mode 100644
index 0000000000..a47e76741e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtsepi64_epi16 (s);
+ res = _mm512_mask_cvtsepi64_epi16 (res, m, s);
+ res = _mm512_maskz_cvtsepi64_epi16 (m, s);
+ _mm512_mask_cvtsepi64_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-2.c
new file mode 100644
index 0000000000..25e54a73de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsqw-2.c
@@ -0,0 +1,67 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (short *r, long long *s)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ {
+ if (s[i] < SHRT_MIN)
+ r[i] = SHRT_MIN;
+ else if (s[i] > SHRT_MAX)
+ r[i] = SHRT_MAX;
+ else
+ r[i] = s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_w) res1, res2, res3;
+ short res4[8];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ short res_ref[8];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i * sign;
+ sign = sign * -1;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtsepi64_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtsepi64_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtsepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtsepi64_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-1.c
new file mode 100644
index 0000000000..18a34ae012
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi8_epi32 (s);
+ res = _mm512_mask_cvtepi8_epi32 (res, m, s);
+ res = _mm512_maskz_cvtepi8_epi32 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-2.c
new file mode 100644
index 0000000000..3bfb6ab75f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (char *s, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_b s;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 8 * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi8_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi8_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi8_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-1.c
new file mode 100644
index 0000000000..e902b6e764
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi8_epi64 (s);
+ res = _mm512_mask_cvtepi8_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepi8_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-2.c
new file mode 100644
index 0000000000..540d21819a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxbq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (char *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (long long int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_b s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 8 * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi8_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi8_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi8_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-1.c
new file mode 100644
index 0000000000..265c9fe323
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi32_epi64 (s);
+ res = _mm512_mask_cvtepi32_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepi32_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-2.c
new file mode 100644
index 0000000000..f1e131e00a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxdq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (long long int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi32_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi32_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi32_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-1.c
new file mode 100644
index 0000000000..cdcba564ea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi16_epi32 (s);
+ res = _mm512_mask_cvtepi16_epi32 (res, m, s);
+ res = _mm512_maskz_cvtepi16_epi32 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-2.c
new file mode 100644
index 0000000000..04b43a6e83
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (short *s, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) s;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi16_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi16_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi16_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-1.c
new file mode 100644
index 0000000000..28d6b17ba2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovsxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovsxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepi16_epi64 (s);
+ res = _mm512_mask_cvtepi16_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepi16_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-2.c
new file mode 100644
index 0000000000..9e6832d86d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovsxwq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (short *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (long long int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_w s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_cvtepi16_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepi16_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepi16_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-1.c
new file mode 100644
index 0000000000..bc0d3d5049
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusdb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtusepi32_epi8 (s);
+ res = _mm512_mask_cvtusepi32_epi8 (res, m, s);
+ res = _mm512_maskz_cvtusepi32_epi8 (m, s);
+ _mm512_mask_cvtusepi32_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-2.c
new file mode 100644
index 0000000000..f13bb95b3d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdb-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (unsigned char *r, unsigned int *s)
+{
+ int i;
+ for (i = 0; i < 16; i++)
+ {
+ r[i] = (s[i] > UCHAR_MAX) ? UCHAR_MAX : s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ unsigned char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned char res_ref[16];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtusepi32_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtusepi32_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtusepi32_epi8) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi32_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ if (checkVc (res4, res_ref, 16))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-1.c
new file mode 100644
index 0000000000..ea987eb2f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusdw\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtusepi32_epi16 (s);
+ res = _mm512_mask_cvtusepi32_epi16 (res, m, s);
+ res = _mm512_maskz_cvtusepi32_epi16 (m, s);
+ _mm512_mask_cvtusepi32_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-2.c
new file mode 100644
index 0000000000..c33a10b711
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusdw-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 16)
+#include <limits.h>
+
+CALC (unsigned short *r, unsigned int *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ r[i] = (s[i] > USHRT_MAX) ? USHRT_MAX : s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) res1, res2, res3;
+ unsigned short res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_d) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned short res_ref[SIZE_HALF];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtusepi32_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtusepi32_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtusepi32_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi32_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-1.c
new file mode 100644
index 0000000000..805b72403c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqb\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtusepi64_epi8 (s);
+ res = _mm512_mask_cvtusepi64_epi8 (res, m, s);
+ res = _mm512_maskz_cvtusepi64_epi8 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi8 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-2.c
new file mode 100644
index 0000000000..43fb9d275c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqb-2.c
@@ -0,0 +1,73 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (unsigned char *r, unsigned long long *s, int mem)
+{
+ int i;
+ int len = mem ? 8 : 16;
+ for (i = 0; i < len; i++)
+ {
+ r[i] = (s[i] > UCHAR_MAX) ? UCHAR_MAX : s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_b) res1, res2, res3;
+ unsigned char res4[16];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned char res_ref[16];
+ unsigned char res_ref2[16];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ for (i = SIZE; i < 16; i++)
+ {
+ res4[i] = DEFAULT_VALUE * 2;
+ res_ref2[i] = DEFAULT_VALUE * 2;
+ }
+
+ res1.x = INTRINSIC (_cvtusepi64_epi8) (src.x);
+ res2.x = INTRINSIC (_mask_cvtusepi64_epi8) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtusepi64_epi8) (mask, src.x);
+
+ CALC (res_ref, src.a, 0);
+
+ if (UNION_CHECK (128, i_b) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_b) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_b) (res3, res_ref))
+ abort ();
+
+ INTRINSIC (_mask_cvtusepi64_storeu_epi8) (res4, mask, src.x);
+
+ CALC (res_ref2, src.a, 1);
+ MASK_MERGE (i_b) (res_ref2, mask, SIZE);
+
+ if (checkVc (res4, res_ref2, 16))
+ abort ();
+
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-1.c
new file mode 100644
index 0000000000..11d7ccbcf1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m256i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtusepi64_epi32 (s);
+ res = _mm512_mask_cvtusepi64_epi32 (res, m, s);
+ res = _mm512_maskz_cvtusepi64_epi32 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi32 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-2.c
new file mode 100644
index 0000000000..79613b36ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqd-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#define SIZE_HALF (AVX512F_LEN_HALF / 32)
+#include <limits.h>
+
+CALC (unsigned int *r, unsigned long long *s)
+{
+ int i;
+ for (i = 0; i < SIZE_HALF; i++)
+ {
+ r[i] = (s[i] > UINT_MAX) ? UINT_MAX : s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) res1, res2, res3;
+ unsigned int res4[SIZE_HALF];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned int res_ref[SIZE_HALF];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtusepi64_epi32) (src.x);
+ res2.x = INTRINSIC (_mask_cvtusepi64_epi32) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtusepi64_epi32) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi64_storeu_epi32) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res2, res_ref))
+ abort ();
+
+ if (checkVi (res4, res_ref, SIZE_HALF))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN_HALF, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-1.c
new file mode 100644
index 0000000000..1f6eb24117
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*" 4 } } */
+/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovusqw\[ \\t\]+\[^\n\]*%xmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i s;
+volatile __m128i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtusepi64_epi16 (s);
+ res = _mm512_mask_cvtusepi64_epi16 (res, m, s);
+ res = _mm512_maskz_cvtusepi64_epi16 (m, s);
+ _mm512_mask_cvtusepi64_storeu_epi16 ((void *) &res, m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-2.c
new file mode 100644
index 0000000000..f905eed83f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovusqw-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <limits.h>
+
+CALC (unsigned short *r, unsigned long long *s)
+{
+ int i;
+ for (i = 0; i < 8; i++)
+ {
+ r[i] = (s[i] > USHRT_MAX) ? USHRT_MAX : s[i];
+ r[i] = (i < SIZE) ? r[i] : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (128, i_w) res1, res2, res3;
+ unsigned short res4[8];
+ UNION_TYPE (AVX512F_LEN, i_q) src;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned short res_ref[8];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src.a[i] = 1 + 34 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ res4[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtusepi64_epi16) (src.x);
+ res2.x = INTRINSIC (_mask_cvtusepi64_epi16) (res2.x, mask, src.x);
+ res3.x = INTRINSIC (_maskz_cvtusepi64_epi16) (mask, src.x);
+ INTRINSIC (_mask_cvtusepi64_storeu_epi16) (res4, mask, src.x);
+
+ CALC (res_ref, src.a);
+
+ if (UNION_CHECK (128, i_w) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res2, res_ref))
+ abort ();
+
+ if (checkVs (res4, res_ref, 8))
+ abort ();
+
+ MASK_ZERO (i_w) (res_ref, mask, SIZE);
+ if (UNION_CHECK (128, i_w) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-1.c
new file mode 100644
index 0000000000..6b4976dca7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovzxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxbd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu8_epi32 (s);
+ res = _mm512_mask_cvtepu8_epi32 (res, m, s);
+ res = _mm512_maskz_cvtepu8_epi32 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-2.c
new file mode 100644
index 0000000000..eb2b9509f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned char *s, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_b s;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 16 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu8_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu8_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu8_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-1.c
new file mode 100644
index 0000000000..758e06654f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovzxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxbq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu8_epi64 (s);
+ res = _mm512_mask_cvtepu8_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepu8_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-2.c
new file mode 100644
index 0000000000..e1629951ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxbq-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned char *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_b s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 16 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu8_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu8_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu8_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-1.c
new file mode 100644
index 0000000000..1a8c37a13c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovzxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxdq\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu32_epi64 (s);
+ res = _mm512_mask_cvtepu32_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepu32_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-2.c
new file mode 100644
index 0000000000..69c352279d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxdq-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_d) s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu32_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu32_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu32_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-1.c
new file mode 100644
index 0000000000..6f95558542
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovzxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxwd\[ \\t\]+\[^\n\]*%ymm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i s;
+volatile __m512i res;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu16_epi32 (s);
+ res = _mm512_mask_cvtepu16_epi32 (res, m, s);
+ res = _mm512_maskz_cvtepu16_epi32 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-2.c
new file mode 100644
index 0000000000..ea53314337
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned short *s, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN_HALF, i_w) s;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu16_epi32) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu16_epi32) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu16_epi32) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-1.c
new file mode 100644
index 0000000000..13f893e630
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmovzxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmovzxwq\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128i s;
+volatile __m512i res;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm512_cvtepu16_epi64 (s);
+ res = _mm512_mask_cvtepu16_epi64 (res, m, s);
+ res = _mm512_maskz_cvtepu16_epi64 (m, s);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-2.c
new file mode 100644
index 0000000000..9e0fc7668c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmovzxwq-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (unsigned short *s, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = (long long int) s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ union128i_w s;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long int res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 2000 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_cvtepu16_epi64) (s.x);
+ res2.x = INTRINSIC (_mask_cvtepu16_epi64) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_cvtepu16_epi64) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-1.c
new file mode 100644
index 0000000000..091de8c393
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmuldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmuldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmuldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}{z}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mul_epi32 (x, x);
+ x = _mm512_mask_mul_epi32 (x, m, x, x);
+ x = _mm512_maskz_mul_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-2.c
new file mode 100644
index 0000000000..83058dcf89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmuldq-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define DST_SIZE (AVX512F_LEN / 64)
+
+static void
+CALC (int *s1, int *s2, long long int *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ r[i] = s1[i * 2] * s2[i * 2];
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[DST_SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s1.a[i] = i * 20;
+ s2.a[i] = i + 20;
+ }
+
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ CALC (s1.a, s2.a, res_ref);
+
+ res1.x = INTRINSIC (_mul_epi32) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_mul_epi32) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_mul_epi32) (mask, s1.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-1.c
new file mode 100644
index 0000000000..d1d77d2e4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmulld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmulld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmulld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}{z}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 mx;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mullo_epi32 (x, x);
+ x = _mm512_mask_mullo_epi32 (x, mx, x, x);
+ x = _mm512_maskz_mullo_epi32 (mx, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-2.c
new file mode 100644
index 0000000000..a08120c436
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmulld-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+
+static void
+CALC (int *src1, int *src2, int *dst)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ dst[i] = src1[i] * src2[i];
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int dst_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i + 50;
+ src2.a[i] = i + 100;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_mullo_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_mullo_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_mullo_epi32) (mask, src1.x, src2.x);
+
+ CALC (src1.a, src2.a, dst_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, dst_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (dst_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, dst_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (dst_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, dst_ref))
+ abort ();
+
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-1.c
new file mode 100644
index 0000000000..b6fd4daf75
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpmuludq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpmuludq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpmuludq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}{z}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_mul_epu32 (x, x);
+ x = _mm512_mask_mul_epu32 (x, m, x, x);
+ x = _mm512_maskz_mul_epu32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-2.c
new file mode 100644
index 0000000000..fc0416b6cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpmuludq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SRC_SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#define DST_SIZE (AVX512F_LEN / 64)
+
+static void
+CALC (unsigned int *s1, unsigned int *s2, unsigned long long *r)
+{
+ int i;
+
+ for (i = 0; i < DST_SIZE; i++)
+ r[i] = s1[i * 2] * s2[i * 2];
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[DST_SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SRC_SIZE; i++)
+ {
+ s1.a[i] = i * 20;
+ s2.a[i] = i + 20;
+ }
+ for (i = 0; i < DST_SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ CALC (s1.a, s2.a, res_ref);
+
+ res1.x = INTRINSIC (_mul_epu32) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_mul_epu32) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_mul_epu32) (mask, s1.x, s2.x);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, DST_SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpord-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpord-1.c
new file mode 100644
index 0000000000..78650751cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpord-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vpord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_or_si512 (x, x);
+ x = _mm512_or_epi32 (x, x);
+ x = _mm512_mask_or_epi32 (x, m, x, x);
+ x = _mm512_maskz_or_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpord-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpord-2.c
new file mode 100644
index 0000000000..9493aa01fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpord-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] | s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_or_si512) (s1.x, s2.x);
+ res2.x = INTRINSIC (_or_epi32) (s1.x, s2.x);
+ res3.x = INTRINSIC (_mask_or_epi32) (res3.x, mask, s1.x, s2.x);
+ res4.x = INTRINSIC (_maskz_or_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vporq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vporq-1.c
new file mode 100644
index 0000000000..c6f8bb576e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vporq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vporq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vporq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vporq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_or_epi64 (x, x);
+ x = _mm512_mask_or_epi64 (x, m, x, x);
+ x = _mm512_maskz_or_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vporq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vporq-2.c
new file mode 100644
index 0000000000..843ecbd37f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vporq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] | s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_or_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_or_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_or_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprold-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprold-1.c
new file mode 100644
index 0000000000..4a98e19925
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprold-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprold\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprold\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprold\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rol_epi32 (x, 12);
+ x = _mm512_mask_rol_epi32 (x, m, x, 12);
+ x = _mm512_maskz_rol_epi32 (m, x, 12);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprold-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprold-2.c
new file mode 100644
index 0000000000..e56115d19a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprold-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#define N 0x5
+
+static void
+CALC (int *s1, int count, int *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] << count) | (s1[i] >> sizeof (s1[i]) * 8 - count);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rol_epi32) (s1.x, N);
+ res2.x = INTRINSIC (_mask_rol_epi32) (res2.x, mask, s1.x, N);
+ res3.x = INTRINSIC (_maskz_rol_epi32) (mask, s1.x, N);
+
+ CALC (s1.a, N, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolq-1.c
new file mode 100644
index 0000000000..91b2462ac8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprolq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprolq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprolq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rol_epi64 (x, 12);
+ x = _mm512_mask_rol_epi64 (x, m, x, 12);
+ x = _mm512_maskz_rol_epi64 (m, x, 12);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolq-2.c
new file mode 100644
index 0000000000..116a6aa6bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#define N 0x5
+
+static void
+CALC (long long *s1, int count, long long *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] << count) | (s1[i] >> sizeof (s1[i]) * 8 - count);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rol_epi64) (s1.x, N);
+ res2.x = INTRINSIC (_mask_rol_epi64) (res2.x, mask, s1.x, N);
+ res3.x = INTRINSIC (_maskz_rol_epi64) (mask, s1.x, N);
+
+ CALC (s1.a, N, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-1.c
new file mode 100644
index 0000000000..10331a61dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprolvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprolvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprolvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rolv_epi32 (x, x);
+ x = _mm512_mask_rolv_epi32 (x, m, x, x);
+ x = _mm512_maskz_rolv_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-2.c
new file mode 100644
index 0000000000..e537ae8f95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolvd-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] << s2[i]) | (s1[i] >> sizeof (s1[i]) * 8 - s2[i]);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ s2.a[i] = (i + 7);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rolv_epi32) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_rolv_epi32) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_rolv_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-1.c
new file mode 100644
index 0000000000..a182a62032
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprolvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprolvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprolvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rolv_epi64 (x, x);
+ x = _mm512_mask_rolv_epi64 (x, m, x, x);
+ x = _mm512_maskz_rolv_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-2.c
new file mode 100644
index 0000000000..a1c748d50b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprolvq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] << s2[i]) | (s1[i] >> sizeof (s1[i]) * 8 - s2[i]);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ s2.a[i] = (i + 7);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rolv_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_rolv_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_rolv_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprord-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprord-1.c
new file mode 100644
index 0000000000..c1cf8a5f0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprord-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_ror_epi32 (x, 12);
+ x = _mm512_mask_ror_epi32 (x, m, x, 12);
+ x = _mm512_maskz_ror_epi32 (m, x, 12);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprord-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprord-2.c
new file mode 100644
index 0000000000..5223fe0a7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprord-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+#define N 0x5
+
+static void
+CALC (int *s1, int count, int *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] >> count) | (s1[i] << sizeof (s1[i]) * 8 - count);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_ror_epi32) (s1.x, N);
+ res2.x = INTRINSIC (_mask_ror_epi32) (res2.x, mask, s1.x, N);
+ res3.x = INTRINSIC (_maskz_ror_epi32) (mask, s1.x, N);
+
+ CALC (s1.a, N, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorq-1.c
new file mode 100644
index 0000000000..66b9e0391c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_ror_epi64 (x, 12);
+ x = _mm512_mask_ror_epi64 (x, m, x, 12);
+ x = _mm512_maskz_ror_epi64 (m, x, 12);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorq-2.c
new file mode 100644
index 0000000000..704b0a50a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+#define N 0x5
+
+static void
+CALC (long long *s1, int count, long long *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] >> count) | (s1[i] << sizeof (s1[i]) * 8 - count);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_ror_epi64) (s1.x, N);
+ res2.x = INTRINSIC (_mask_ror_epi64) (res2.x, mask, s1.x, N);
+ res3.x = INTRINSIC (_maskz_ror_epi64) (mask, s1.x, N);
+
+ CALC (s1.a, N, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-1.c
new file mode 100644
index 0000000000..59f0c95e27
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vprorvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rorv_epi32 (x, x);
+ x = _mm512_mask_rorv_epi32 (x, m, x, x);
+ x = _mm512_maskz_rorv_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-2.c
new file mode 100644
index 0000000000..eaf8df92e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorvd-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] >> s2[i]) | (s1[i] << sizeof (s1[i]) * 8 - s2[i]);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ s2.a[i] = (i + 7);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rorv_epi32) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_rorv_epi32) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_rorv_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-1.c
new file mode 100644
index 0000000000..31b59b1888
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vprorvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vprorvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vprorvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rorv_epi64 (x, x);
+ x = _mm512_mask_rorv_epi64 (x, m, x, x);
+ x = _mm512_maskz_rorv_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-2.c
new file mode 100644
index 0000000000..035ce96772
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vprorvq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = (s1[i] >> s2[i]) | (s1[i] << sizeof (s1[i]) * 8 - s2[i]);
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ unsigned int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 137 * i;
+ s2.a[i] = (i + 7);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rorv_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_rorv_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_rorv_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-1.c
new file mode 100644
index 0000000000..9b7afc54e8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpshufd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpshufd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vpshufd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_epi32 (x, _MM_PERM_AADB);
+ x = _mm512_mask_shuffle_epi32 (x, 2, x, _MM_PERM_AADB);
+ x = _mm512_maskz_shuffle_epi32 (2, x, _MM_PERM_AADB);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-2.c
new file mode 100644
index 0000000000..a6379c372e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpshufd-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, unsigned char imm, int *r)
+{
+ int i, j, offset;
+
+ for (j = 0; j < SIZE / 4; j++)
+ {
+ offset = j * 4;
+ for (i = 0; i < 4; i++)
+ r[i + offset] =
+ s1[((imm & (0x3 << (2 * i))) >> (2 * i)) + offset];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, res1, res2, res3;
+ int res_ref[SIZE];
+ int i, j, sign = 1;
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s1.a[j] = j * i * sign;
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_shuffle_epi32) (s1.x, 0xec);
+ res2.x = INTRINSIC (_mask_shuffle_epi32) (res2.x, mask, s1.x, 0xec);
+ res3.x = INTRINSIC (_maskz_shuffle_epi32) (mask, s1.x, 0xec);
+
+ CALC (s1.a, 0xec, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpslld-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpslld-1.c
new file mode 100644
index 0000000000..a2c3711df5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpslld-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sll_epi32 (x, y);
+ x = _mm512_mask_sll_epi32 (x, m, x, y);
+ x = _mm512_maskz_sll_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpslld-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpslld-2.c
new file mode 100644
index 0000000000..c6c8a9c1c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpslld-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, long long* s2)
+{
+ int i;
+ int count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 32 ? (s1[i] << count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ long long imm;
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (imm = 1; imm <= 33; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sll_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sll_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sll_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-1.c
new file mode 100644
index 0000000000..c81ac92002
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpslld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_slli_epi32 (x, y);
+ x = _mm512_mask_slli_epi32 (x, m, x, y);
+ x = _mm512_maskz_slli_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-2.c
new file mode 100644
index 0000000000..c3bfdd28a5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpslldi-2.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 32 ? (s1[i] << count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_slli_epi32) (src1.x, 2);
+ res2.x = INTRINSIC (_mask_slli_epi32) (res2.x, mask, src1.x, 2);
+ res3.x = INTRINSIC (_maskz_slli_epi32) (mask, src1.x, 2);
+
+ CALC (res_ref, src1.a, 2);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_slli_epi32) (src1.x, 33);
+ res2.x = INTRINSIC (_mask_slli_epi32) (res2.x, mask, src1.x, 33);
+ res3.x = INTRINSIC (_maskz_slli_epi32) (mask, src1.x, 33);
+
+ CALC (res_ref, src1.a, 33);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-1.c
new file mode 100644
index 0000000000..491234e882
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sll_epi64 (x, y);
+ x = _mm512_mask_sll_epi64 (x, m, x, y);
+ x = _mm512_maskz_sll_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-2.c
new file mode 100644
index 0000000000..5addaa5179
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllq-2.c
@@ -0,0 +1,62 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long* s2)
+{
+ int i;
+ long long count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 64 ? (s1[i] << count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ long long imm;
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (imm = 1; imm <= 65; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sll_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sll_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sll_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-1.c
new file mode 100644
index 0000000000..7e077e41b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsllq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_slli_epi64 (x, y);
+ x = _mm512_mask_slli_epi64 (x, m, x, y);
+ x = _mm512_maskz_slli_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-2.c
new file mode 100644
index 0000000000..e15b324d11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllqi-2.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 64 ? (s1[i] << count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_slli_epi64) (src1.x, 3);
+ res2.x = INTRINSIC (_mask_slli_epi64) (res2.x, mask, src1.x, 3);
+ res3.x = INTRINSIC (_maskz_slli_epi64) (mask, src1.x, 3);
+
+ CALC (res_ref, src1.a, 3);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_slli_epi64) (src1.x, 65);
+ res2.x = INTRINSIC (_mask_slli_epi64) (res2.x, mask, src1.x, 65);
+ res3.x = INTRINSIC (_maskz_slli_epi64) (mask, src1.x, 65);
+
+ CALC (res_ref, src1.a, 65);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-1.c
new file mode 100644
index 0000000000..0a966af380
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsllvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsllvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsllvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sllv_epi32 (x, y);
+ x = _mm512_mask_sllv_epi32 (x, m, x, y);
+ x = _mm512_maskz_sllv_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-2.c
new file mode 100644
index 0000000000..82ff3a6525
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned int *r, unsigned int *s1, unsigned int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s2[i] < 32 ? (s1[i] << s2[i]) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned int res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sllv_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sllv_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sllv_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-1.c
new file mode 100644
index 0000000000..8faeef02af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsllvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsllvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsllvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sllv_epi64 (x, y);
+ x = _mm512_mask_sllv_epi64 (x, m, x, y);
+ x = _mm512_maskz_sllv_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-2.c
new file mode 100644
index 0000000000..e2b48d7fdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned long long *r, unsigned long long *s1,
+ unsigned long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s2[i] < 64 ? (s1[i] << s2[i]) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sllv_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sllv_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sllv_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-1.c
new file mode 100644
index 0000000000..e93b8c5297
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vpsllvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sllv_epi64 (x, x);
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-2.c
new file mode 100644
index 0000000000..0c970dbb0f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsllvq512-2.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <string.h>
+#include "avx512f-check.h"
+
+static void
+compute_psllvq512 (long long int *s1, long long int *s2, long long int *r)
+{
+ int i;
+ long long int count;
+
+ for (i = 0; i < 8; ++i)
+ {
+ count = s2[i];
+ r[i] = s1[i] << count;
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ union512i_q s1, s2, res;
+ long long int res_ref[8];
+ int i, j, sign = 1;
+ int fail = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * i * sign;
+ s2.a[j] = (j + i) >> 2;
+ sign = -sign;
+ }
+
+ res.x = _mm512_sllv_epi64 (s1.x, s2.x);
+
+ compute_psllvq512 (s1.a, s2.a, res_ref);
+
+ fail += check_union512i_q (res, res_ref);
+ }
+
+ if (fail != 0)
+ abort ();
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-1.c
new file mode 100644
index 0000000000..3d6c5fc13a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sra_epi32 (x, y);
+ x = _mm512_mask_sra_epi32 (x, m, x, y);
+ x = _mm512_maskz_sra_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-2.c
new file mode 100644
index 0000000000..596f98b439
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrad-2.c
@@ -0,0 +1,64 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, long long *s2)
+{
+ int i;
+ int count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ count < 32 ? (s1[i] >> count) : (s1[i] > 0 ? 0 : 0xFFFFFFFF);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ long long imm;
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (imm = 1; imm <= 33; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sra_epi32) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_sra_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sra_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-1.c
new file mode 100644
index 0000000000..c7bf9385dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrad\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srai_epi32 (x, y);
+ x = _mm512_mask_srai_epi32 (x, m, x, y);
+ x = _mm512_maskz_srai_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-2.c
new file mode 100644
index 0000000000..3ba3ff1315
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsradi-2.c
@@ -0,0 +1,78 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ count < 32 ? (s1[i] >> count) : (s1[i] > 0 ? 0 : 0xFFFFFFFF);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srai_epi32) (src1.x, 3);
+ res2.x =
+ INTRINSIC (_mask_srai_epi32) (res2.x, mask, src1.x, 3);
+ res3.x = INTRINSIC (_maskz_srai_epi32) (mask, src1.x, 3);
+
+ CALC (res_ref, src1.a, 3);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srai_epi32) (src1.x, 33);
+ res2.x =
+ INTRINSIC (_mask_srai_epi32) (res2.x, mask, src1.x, 33);
+ res3.x = INTRINSIC (_maskz_srai_epi32) (mask, src1.x, 33);
+
+ CALC (res_ref, src1.a, 33);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-1.c
new file mode 100644
index 0000000000..1c7a43db43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sra_epi64 (x, y);
+ x = _mm512_mask_sra_epi64 (x, m, x, y);
+ x = _mm512_maskz_sra_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-2.c
new file mode 100644
index 0000000000..c5ae9c67d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsraq-2.c
@@ -0,0 +1,65 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ long long count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ count < 64 ? (s1[i] >> count) : (s1[i] >
+ 0 ? 0 : 0xFFFFFFFFFFFFFFFFLL);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ long long imm;
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (imm = 1; imm <= 65; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sra_epi64) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_sra_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sra_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-1.c
new file mode 100644
index 0000000000..6400ef4c7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsraq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srai_epi64 (x, y);
+ x = _mm512_mask_srai_epi64 (x, m, x, y);
+ x = _mm512_maskz_srai_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-2.c
new file mode 100644
index 0000000000..47c273297d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsraqi-2.c
@@ -0,0 +1,80 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ count < 64 ? (s1[i] >> count) : (s1[i] >
+ 0 ? 0 : 0xFFFFFFFFFFFFFFFFLL);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srai_epi64) (src1.x, 3);
+ res2.x =
+ INTRINSIC (_mask_srai_epi64) (res2.x, mask, src1.x, 3);
+ res3.x = INTRINSIC (_maskz_srai_epi64) (mask, src1.x, 3);
+
+ CALC (res_ref, src1.a, 3);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srai_epi64) (src1.x, 65);
+ res2.x =
+ INTRINSIC (_mask_srai_epi64) (res2.x, mask, src1.x, 65);
+ res3.x = INTRINSIC (_maskz_srai_epi64) (mask, src1.x, 65);
+
+ CALC (res_ref, src1.a, 65);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-1.c
new file mode 100644
index 0000000000..80414c1092
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsravd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsravd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsravd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srav_epi32 (x, y);
+ x = _mm512_mask_srav_epi32 (x, m, x, y);
+ x = _mm512_maskz_srav_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-2.c
new file mode 100644
index 0000000000..0651c24cc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravd-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ s2[i] < 32 ? (s1[i] >> s2[i]) : (s1[i] > 0 ? 0 : 0xFFFFFFFF);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srav_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srav_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srav_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-1.c
new file mode 100644
index 0000000000..db6b8dd37a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsravq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsravq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsravq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srav_epi64 (x, y);
+ x = _mm512_mask_srav_epi64 (x, m, x, y);
+ x = _mm512_maskz_srav_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-2.c
new file mode 100644
index 0000000000..3b7063f57a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq-2.c
@@ -0,0 +1,58 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] =
+ s2[i] < 64 ? (s1[i] >> s2[i]) : (s1[i] >
+ 0 ? 0 : 0xFFFFFFFFFFFFFFFFLL);
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + sign * 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ sign = sign * -1;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srav_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srav_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srav_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-1.c
new file mode 100644
index 0000000000..318769b164
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vpsravq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srav_epi64 (x, x);
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-2.c
new file mode 100644
index 0000000000..c2511e9f5b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsravq512-2.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <string.h>
+#include "avx512f-check.h"
+
+static void
+compute_psravq512 (long long int *s1, long long int *s2, long long int *r)
+{
+ int i;
+ long long int count;
+
+ for (i = 0; i < 8; ++i)
+ {
+ count = s2[i];
+ r[i] = s1[i] >> count;
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ union512i_q s1, s2, res;
+ long long int res_ref[8];
+ int i, j, sign = 1;
+ int fail = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * i * sign;
+ s2.a[j] = (j + i) >> 2;
+ sign = -sign;
+ }
+
+ res.x = _mm512_srav_epi64 (s1.x, s2.x);
+
+ compute_psravq512 (s1.a, s2.a, res_ref);
+
+ fail += check_union512i_q (res, res_ref);
+ }
+
+ if (fail != 0)
+ abort ();
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-1.c
new file mode 100644
index 0000000000..7c9ea16108
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srl_epi32 (x, y);
+ x = _mm512_mask_srl_epi32 (x, m, x, y);
+ x = _mm512_maskz_srl_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-2.c
new file mode 100644
index 0000000000..653a8f8f30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrld-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned int *r, unsigned int *s1, unsigned long long* s2)
+{
+ int i;
+ unsigned int count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 32 ? (s1[i] >> count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned int res_ref[SIZE];
+
+ unsigned long long imm;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ }
+
+ for (imm = 1; imm <= 33; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srl_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srl_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srl_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-1.c
new file mode 100644
index 0000000000..c21566d1ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrld\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srli_epi32 (x, y);
+ x = _mm512_mask_srli_epi32 (x, m, x, y);
+ x = _mm512_maskz_srli_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-2.c
new file mode 100644
index 0000000000..e178445fb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrldi-2.c
@@ -0,0 +1,76 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned int *r, unsigned int *s1, unsigned int count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 32 ? (s1[i] >> count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned int res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srli_epi32) (src1.x, 3);
+ res2.x =
+ INTRINSIC (_mask_srli_epi32) (res2.x, mask, src1.x, 3);
+ res3.x = INTRINSIC (_maskz_srli_epi32) (mask, src1.x, 3);
+
+ CALC (res_ref, src1.a, 3);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srli_epi32) (src1.x, 33);
+ res2.x =
+ INTRINSIC (_mask_srli_epi32) (res2.x, mask, src1.x, 33);
+ res3.x = INTRINSIC (_maskz_srli_epi32) (mask, src1.x, 33);
+
+ CALC (res_ref, src1.a, 33);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-1.c
new file mode 100644
index 0000000000..d3af6091f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m128i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srl_epi64 (x, y);
+ x = _mm512_mask_srl_epi64 (x, m, x, y);
+ x = _mm512_maskz_srl_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-2.c
new file mode 100644
index 0000000000..4030528735
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlq-2.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned long long *r, unsigned long long *s1, unsigned long long* s2)
+{
+ int i;
+ unsigned long long count = s2[0];
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 64 ? (s1[i] >> count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ UNION_TYPE (128, i_q) src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ unsigned long long imm;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ }
+
+ for (imm = 1; imm <= 65; imm++)
+ {
+ src2.a[0] = imm;
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srl_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srl_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srl_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-1.c
new file mode 100644
index 0000000000..b1f6d2766d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrlq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+#define y 7
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srli_epi64 (x, y);
+ x = _mm512_mask_srli_epi64 (x, m, x, y);
+ x = _mm512_maskz_srli_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-2.c
new file mode 100644
index 0000000000..3fedac4c88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlqi-2.c
@@ -0,0 +1,77 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned long long *r, unsigned long long *s1,
+ unsigned long long count)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = count < 64 ? (s1[i] >> count) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srli_epi64) (src1.x, 3);
+ res2.x =
+ INTRINSIC (_mask_srli_epi64) (res2.x, mask, src1.x, 3);
+ res3.x = INTRINSIC (_maskz_srli_epi64) (mask, src1.x, 3);
+
+ CALC (res_ref, src1.a, 3);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srli_epi64) (src1.x, 65);
+ res2.x =
+ INTRINSIC (_mask_srli_epi64) (res2.x, mask, src1.x, 65);
+ res3.x = INTRINSIC (_maskz_srli_epi64) (mask, src1.x, 65);
+
+ CALC (res_ref, src1.a, 65);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-1.c
new file mode 100644
index 0000000000..c8fe74d734
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrlvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrlvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrlvd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512i y;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srlv_epi32 (x, y);
+ x = _mm512_mask_srlv_epi32 (x, m, x, y);
+ x = _mm512_maskz_srlv_epi32 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-2.c
new file mode 100644
index 0000000000..514d36a37d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned int *r, unsigned int *s1, unsigned int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s2[i] < 32 ? (s1[i] >> s2[i]) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned int res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srlv_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srlv_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srlv_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-1.c
new file mode 100644
index 0000000000..b316f68f59
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsrlvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsrlvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsrlvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __m512i y;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srlv_epi64 (x, y);
+ x = _mm512_mask_srlv_epi64 (x, m, x, y);
+ x = _mm512_maskz_srlv_epi64 (m, x, y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-2.c
new file mode 100644
index 0000000000..586b8c2f93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (unsigned long long *r, unsigned long long *s1,
+ unsigned long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s2[i] < 64 ? (s1[i] >> s2[i]) : 0;
+ }
+}
+
+void static
+TEST (void)
+{
+ int i;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ unsigned long long res_ref[SIZE];
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 2 + 7 * i % 291;
+ src2.a[i] = 1 + 17 * i % 71;
+ }
+
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_srlv_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_srlv_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_srlv_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-1.c
new file mode 100644
index 0000000000..99b12d200b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vpsrlvq\[ \\t\]+\[^\n\]*%zmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_srlv_epi64 (x, x);
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-2.c
new file mode 100644
index 0000000000..d262a83527
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsrlvq512-2.c
@@ -0,0 +1,47 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <string.h>
+#include "avx512f-check.h"
+
+static void
+compute_psrlvq512 (long long int *s1, long long int *s2, long long int *r)
+{
+ int i;
+ long long int count;
+
+ for (i = 0; i < 8; ++i)
+ {
+ count = s2[i];
+ r[i] = ((unsigned long long) s1[i]) >> count;
+ }
+}
+
+void static
+avx512f_test (void)
+{
+ union512i_q s1, s2, res;
+ long long int res_ref[8];
+ int i, j, sign = 1;
+ int fail = 0;
+
+ for (i = 0; i < 10; i++)
+ {
+ for (j = 0; j < 8; j++)
+ {
+ s1.a[j] = j * i * sign;
+ s2.a[j] = (j + i) >> 2;
+ sign = -sign;
+ }
+
+ res.x = _mm512_srlv_epi64 (s1.x, s2.x);
+
+ compute_psrlvq512 (s1.a, s2.a, res_ref);
+
+ fail += check_union512i_q (res, res_ref);
+ }
+
+ if (fail != 0)
+ abort ();
+} \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-1.c
new file mode 100644
index 0000000000..28c3584e13
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsubd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsubd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsubd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sub_epi32 (x, x);
+ x = _mm512_mask_sub_epi32 (x, m, x, x);
+ x = _mm512_maskz_sub_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-2.c
new file mode 100644
index 0000000000..acc26ce832
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsubd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] - s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sub_epi32) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sub_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sub_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-1.c
new file mode 100644
index 0000000000..c51b291dae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vpsubq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpsubq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpsubq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sub_epi64 (x, x);
+ x = _mm512_mask_sub_epi64 (x, m, x, x);
+ x = _mm512_maskz_sub_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-2.c
new file mode 100644
index 0000000000..ba16ee1847
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpsubq-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] - s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sub_epi64) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sub_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sub_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-1.c
new file mode 100644
index 0000000000..e4708bf51b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpternlogd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpternlogd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpternlogd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_ternarylogic_epi32 (x, y, z, 0xF0);
+ x = _mm512_mask_ternarylogic_epi32 (x, m, y, z, 0xF0);
+ x = _mm512_maskz_ternarylogic_epi32 (m, x, y, z, 0xF0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-2.c
new file mode 100644
index 0000000000..c9813ed243
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogd-2.c
@@ -0,0 +1,71 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *src1, int *src2, int *src3, int imm, int *r)
+{
+ int i, j, index, res, mask, one_mask = 1;
+ int src1_bit, src2_bit, src3_bit, imm_bit;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res = 0;
+ for (j = 0; j < 32; j++)
+ {
+ mask = one_mask << j;
+ src1_bit = ((src1[i] & mask) >> j) << 2;
+ src2_bit = ((src2[i] & mask) >> j) << 1;
+ src3_bit = ((src3[i] & mask) >> j);
+ index = src1_bit | src2_bit | src3_bit;
+ imm_bit = (imm & (one_mask << index)) >> index;
+ res = res | (imm_bit << j);
+ }
+ r[i] = res;
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) src2, src3, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, imm = 0x7D;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ src2.a[i] = 145132 * i + 123123;
+ src3.a[i] = 1223 * i + 895;
+ }
+
+ CALC (res1.a, src2.a, src3.a, imm, res_ref);
+
+ res1.x = INTRINSIC (_ternarylogic_epi32) (res1.x, src2.x, src3.x,
+ imm);
+ res2.x = INTRINSIC (_mask_ternarylogic_epi32) (res2.x, mask, src2.x,
+ src3.x, imm);
+ res3.x = INTRINSIC (_maskz_ternarylogic_epi32) (mask, res3.x, src2.x,
+ src3.x, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-1.c
new file mode 100644
index 0000000000..7d074668d9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpternlogq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpternlogq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpternlogq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_ternarylogic_epi64 (x, y, z, 0xF0);
+ x = _mm512_mask_ternarylogic_epi64 (x, m, y, z, 0xF0);
+ x = _mm512_maskz_ternarylogic_epi64 (m, x, y, z, 0xF0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-2.c
new file mode 100644
index 0000000000..a8065541ec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpternlogq-2.c
@@ -0,0 +1,73 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *src1, long long *src2, long long *src3,
+ long long imm, long long *r)
+{
+ int i, j;
+ long long res, index, mask, one_mask = 1;
+ long long src1_bit, src2_bit, src3_bit, imm_bit;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res = 0;
+ for (j = 0; j < 64; j++)
+ {
+ mask = one_mask << j;
+ src1_bit = ((src1[i] & mask) >> j) << 2;
+ src2_bit = ((src2[i] & mask) >> j) << 1;
+ src3_bit = ((src3[i] & mask) >> j);
+ index = src1_bit | src2_bit | src3_bit;
+ imm_bit = (imm & (one_mask << index)) >> index;
+ res = res | (imm_bit << j);
+ }
+ r[i] = res;
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) src2, src3, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, imm = 0x7D;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ res1.a[i] = DEFAULT_VALUE;
+ res2.a[i] = DEFAULT_VALUE;
+ res3.a[i] = DEFAULT_VALUE;
+ src2.a[i] = 145132 * i + 123123;
+ src3.a[i] = 1223 * i + 895;
+ }
+
+ CALC (res1.a, src2.a, src3.a, imm, res_ref);
+
+ res1.x = INTRINSIC (_ternarylogic_epi64) (res1.x, src2.x, src3.x,
+ imm);
+ res2.x = INTRINSIC (_mask_ternarylogic_epi64) (res2.x, mask, src2.x,
+ src3.x, imm);
+ res3.x = INTRINSIC (_maskz_ternarylogic_epi64) (mask, res3.x, src2.x,
+ src3.x, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-1.c
new file mode 100644
index 0000000000..2242314ce0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vptestmd\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vptestmd\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m16;
+
+void extern
+avx512f_test (void)
+{
+ m16 = _mm512_test_epi32_mask (x, x);
+ m16 = _mm512_mask_test_epi32_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-2.c
new file mode 100644
index 0000000000..5025fab308
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestmd-2.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *res, int *src1, int *src2)
+{
+ int i;
+ *res = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (src1[i] & src2[i])
+ *res = *res | one << i;
+}
+
+static void
+TEST (void)
+{
+ int i, sign = 1;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ }
+
+ res1 = INTRINSIC (_test_epi32_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_test_epi32_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-1.c
new file mode 100644
index 0000000000..9a92903a2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vptestmq\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vptestmq\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m8;
+
+void extern
+avx512f_test (void)
+{
+ m8 = _mm512_test_epi64_mask (x, x);
+ m8 = _mm512_mask_test_epi64_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-2.c
new file mode 100644
index 0000000000..9ec9e48b3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestmq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *res, long long *src1, long long *src2)
+{
+ int i;
+ *res = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (src1[i] & src2[i])
+ *res = *res | one << i;
+}
+
+static void
+TEST (void)
+{
+ int i, sign = 1;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ }
+
+ res1 = INTRINSIC (_test_epi64_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_test_epi64_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-1.c
new file mode 100644
index 0000000000..1094ee5b0e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vptestnmd\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vptestnmd\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m16;
+
+void extern
+avx512f_test (void)
+{
+ m16 = _mm512_testn_epi32_mask (x, x);
+ m16 = _mm512_mask_testn_epi32_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-2.c
new file mode 100644
index 0000000000..b2b4d0e1e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmd-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *res, int *src1, int *src2)
+{
+ int i;
+ *res = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (!(src1[i] & src2[i]))
+ *res = *res | one << i;
+}
+
+static void
+TEST (void)
+{
+ int i, sign = 1;
+ UNION_TYPE (AVX512F_LEN, i_d) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ }
+
+ res1 = INTRINSIC (_testn_epi32_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_testn_epi32_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-1.c
new file mode 100644
index 0000000000..081a25e173
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vptestnmq\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vptestnmq\[ \\t\]+\[^\n\]*%zmm\[0-7\]\[^\n^k\]*k\[1-7\]\{" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m8;
+
+void extern
+avx512f_test (void)
+{
+ m8 = _mm512_testn_epi64_mask (x, x);
+ m8 = _mm512_mask_testn_epi64_mask (3, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-2.c
new file mode 100644
index 0000000000..b6330d2134
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vptestnmq-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (MASK_TYPE *res, long long *src1, long long *src2)
+{
+ int i;
+ *res = 0;
+ MASK_TYPE one = 1;
+
+ for (i = 0; i < SIZE; i++)
+ if (!(src1[i] & src2[i]))
+ *res = *res | one << i;
+}
+
+static void
+TEST (void)
+{
+ int i, sign = 1;
+ UNION_TYPE (AVX512F_LEN, i_q) src1, src2;
+ MASK_TYPE res_ref, res1, res2;
+ MASK_TYPE mask = MASK_VALUE;
+ res1 = 0;
+ res2 = 0;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = i * i * sign;
+ src2.a[i] = i + 20;
+ sign = -sign;
+ }
+
+ res1 = INTRINSIC (_testn_epi64_mask) (src1.x, src2.x);
+ res2 = INTRINSIC (_mask_testn_epi64_mask) (mask, src1.x, src2.x);
+
+ CALC (&res_ref, src1.a, src2.a);
+
+ if (res1 != res_ref)
+ abort ();
+
+ res_ref &= mask;
+
+ if (res2 != res_ref)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-1.c
new file mode 100644
index 0000000000..800e1e0ef5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpunpckhdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckhdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckhdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpackhi_epi32 (y, z);
+ x = _mm512_mask_unpackhi_epi32 (x, m, y, z);
+ x = _mm512_maskz_unpackhi_epi32 (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-2.c
new file mode 100644
index 0000000000..adb9b7a53a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhdq-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE / 4; i++)
+ {
+ r[4 * i] = s1[4 * i + 2];
+ r[4 * i + 1] = s2[4 * i + 2];
+ r[4 * i + 2] = s1[4 * i + 3];
+ r[4 * i + 3] = s2[4 * i + 3];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 34 * i * sign;
+ src1.a[i] = 179 * i;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_unpackhi_epi32) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_unpackhi_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_unpackhi_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-1.c
new file mode 100644
index 0000000000..05b22297f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpunpckhqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckhqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckhqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpackhi_epi64 (y, z);
+ x = _mm512_mask_unpackhi_epi64 (x, m, y, z);
+ x = _mm512_maskz_unpackhi_epi64 (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-2.c
new file mode 100644
index 0000000000..b226274df1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckhqdq-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ r[2 * i] = s1[2 * i + 1];
+ r[2 * i + 1] = s2[2 * i + 1];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 34 * i * sign;
+ src1.a[i] = 179 * i;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_unpackhi_epi64) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_unpackhi_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_unpackhi_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-1.c
new file mode 100644
index 0000000000..29a2c8dc69
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpunpckldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpckldq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpacklo_epi32 (y, z);
+ x = _mm512_mask_unpacklo_epi32 (x, m, y, z);
+ x = _mm512_maskz_unpacklo_epi32 (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-2.c
new file mode 100644
index 0000000000..b715fde17a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpckldq-2.c
@@ -0,0 +1,59 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (int *r, int *s1, int *s2)
+{
+ int i;
+ for (i = 0; i < SIZE / 4; i++)
+ {
+ r[4 * i] = s1[4 * i];
+ r[4 * i + 1] = s2[4 * i];
+ r[4 * i + 2] = s1[4 * i + 1];
+ r[4 * i + 3] = s2[4 * i + 1];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 34 * i * sign;
+ src1.a[i] = 179 * i;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_unpacklo_epi32) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_unpacklo_epi32) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_unpacklo_epi32) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-1.c
new file mode 100644
index 0000000000..ac6f2976ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpunpcklqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[\\n\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpcklqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpunpcklqdq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpacklo_epi64 (y, z);
+ x = _mm512_mask_unpacklo_epi64 (x, m, y, z);
+ x = _mm512_maskz_unpacklo_epi64 (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-2.c
new file mode 100644
index 0000000000..2892f1c321
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpunpcklqdq-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (long long *r, long long *s1, long long *s2)
+{
+ int i;
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ r[2 * i] = s1[2 * i];
+ r[2 * i + 1] = s2[2 * i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, i_q) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 34 * i * sign;
+ src1.a[i] = 179 * i;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_unpacklo_epi64) (src1.x, src2.x);
+ res2.x =
+ INTRINSIC (_mask_unpacklo_epi64) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_unpacklo_epi64) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpxord-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpxord-1.c
new file mode 100644
index 0000000000..99e82bef45
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpxord-1.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpxord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vpxord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpxord\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_xor_si512 (x, x);
+ x = _mm512_xor_epi32 (x, x);
+ x = _mm512_mask_xor_epi32 (x, m, x, x);
+ x = _mm512_maskz_xor_epi32 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpxord-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpxord-2.c
new file mode 100644
index 0000000000..7a9666ce7c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpxord-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (int *s1, int *s2, int *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] ^ s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) s1, s2, res1, res2, res3, res4;
+ MASK_TYPE mask = MASK_VALUE;
+ int res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res3.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_xor_si512) (s1.x, s2.x);
+ res2.x = INTRINSIC (_xor_epi32) (s1.x, s2.x);
+ res3.x = INTRINSIC (_mask_xor_epi32) (res3.x, mask, s1.x, s2.x);
+ res4.x = INTRINSIC (_maskz_xor_epi32) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res1, res_ref))
+ abort ();
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res2, res_ref))
+ abort ();
+
+ MASK_MERGE (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res3, res_ref))
+ abort ();
+
+ MASK_ZERO (i_d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (res4, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-1.c
new file mode 100644
index 0000000000..cd2853409e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vpxorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vpxorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vpxorq\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_xor_epi64 (x, x);
+ x = _mm512_mask_xor_epi64 (x, m, x, x);
+ x = _mm512_maskz_xor_epi64 (m, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-2.c
new file mode 100644
index 0000000000..288b0085ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vpxorq-2.c
@@ -0,0 +1,53 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (long long *s1, long long *s2, long long *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ r[i] = s1[i] ^ s2[i];
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ long long res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * sign;
+ s2.a[i] = (i + 20) * sign;
+ sign = -sign;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_xor_epi64) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_xor_epi64) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_xor_epi64) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (i_q) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-1.c
new file mode 100644
index 0000000000..7342420489
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrcp14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vrcp14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rcp14_pd (x);
+ x = _mm512_mask_rcp14_pd (x, m, x);
+ x = _mm512_maskz_rcp14_pd (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-2.c
new file mode 100644
index 0000000000..4653d77309
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14pd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 1.0 / s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_rcp14_pd) (s.x);
+ res2.x = INTRINSIC (_mask_rcp14_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_rcp14_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-1.c
new file mode 100644
index 0000000000..ea6c68de7b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrcp14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vrcp14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrcp14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rcp14_ps (x);
+ x = _mm512_mask_rcp14_ps (x, m, x);
+ x = _mm512_maskz_rcp14_ps (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-2.c
new file mode 100644
index 0000000000..6e0e577914
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ps-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 1.0 / s[i];
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i, sign = 1;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000) * sign;
+ res2.a[i] = DEFAULT_VALUE;
+ sign = -sign;
+ }
+
+ res1.x = INTRINSIC (_rcp14_ps) (s.x);
+ res2.x = INTRINSIC (_mask_rcp14_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_rcp14_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-1.c
new file mode 100644
index 0000000000..c0c8d038cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrcp14sd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_rcp14_sd (x1, x2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-2.c
new file mode 100644
index 0000000000..f94460036c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14sd-2.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vrcp14sd (double *s1, double *s2, double *r)
+{
+ r[0] = 1.0 / s2[0];
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1, s2, res1, res2, res3;
+ double res_ref[2];
+
+ s1.x = _mm_set_pd (-3.0, 111.111);
+ s2.x = _mm_set_pd (222.222, -2.0);
+ res2.a[0] = DEFAULT_VALUE;
+
+ res1.x = _mm_rcp14_sd (s1.x, s2.x);
+
+ compute_vrcp14sd (s1.a, s2.a, res_ref);
+
+ if (checkVd (res1.a, res_ref, 2))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-1.c
new file mode 100644
index 0000000000..580dfd6a52
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrcp14ss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_rcp14_ss (x1, x2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-2.c
new file mode 100644
index 0000000000..7aca591bfc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrcp14ss-2.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vrcp14ss (float *s1, float *s2, float *r)
+{
+ r[0] = 1.0 / s2[0];
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1, s2, res1, res2, res3;
+ float res_ref[4];
+
+ s1.x = _mm_set_ps (-24.043, 68.346, -43.35, 546.46);
+ s2.x = _mm_set_ps (222.222, 333.333, 444.444, -2.0);
+ res2.a[0] = DEFAULT_VALUE;
+
+ res1.x = _mm_rcp14_ss (s1.x, s2.x);
+
+ compute_vrcp14ss (s1.a, s2.a, res_ref);
+
+ if (checkVf (res1.a, res_ref, 4))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-1.c
new file mode 100644
index 0000000000..baf505c80b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrndscalepd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_roundscale_pd (x, 0x42);
+ x = _mm512_ceil_pd (x);
+ x = _mm512_floor_pd (x);
+ x = _mm512_mask_roundscale_pd (x, 2, x, 0x42);
+ x = _mm512_mask_ceil_pd (x, 2, x);
+ x = _mm512_mask_floor_pd (x, 2, x);
+ x = _mm512_maskz_roundscale_pd (2, x, 0x42);
+
+ x = _mm512_roundscale_round_pd (x, 0x42, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_roundscale_round_pd (x, 2, x, 0x42, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_roundscale_round_pd (2, x, 0x42, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-2.c
new file mode 100644
index 0000000000..f18cdcbcab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalepd-2.c
@@ -0,0 +1,94 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (double *s, double *r, int imm)
+{
+ int i = 0, rc, m;
+ rc = imm & 0xf;
+ m = imm >> 4;
+ for (i = 0; i < SIZE; i++)
+ switch (rc)
+ {
+ case _MM_FROUND_FLOOR:
+ r[i] = floor (s[i] * pow (2, m)) / pow (2, m);
+ break;
+ case _MM_FROUND_CEIL:
+ r[i] = ceil (s[i] * pow (2, m)) / pow (2, m);
+ break;
+ default:
+ abort ();
+ break;
+ }
+}
+
+void static
+TEST (void)
+{
+ int imm, i, j;
+ UNION_TYPE (AVX512F_LEN, d) res1,res2,res3,s;
+ double res_ref[SIZE];
+ double res_ref_mask[SIZE];
+
+ MASK_TYPE mask = 6 ^ (0xff >> SIZE);
+
+ imm = _MM_FROUND_FLOOR | (7 << 4);
+
+ for (i = 0; i < 3; i++)
+ {
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s.a[j] = j * (j + 12.0231);
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ switch (i)
+ {
+ case 0:
+ imm = _MM_FROUND_FLOOR | (7 << 4);
+ res1.x = INTRINSIC (_roundscale_pd) (s.x, imm);
+ res2.x = INTRINSIC (_mask_roundscale_pd) (res2.x, mask, s.x, imm);
+ res3.x = INTRINSIC (_maskz_roundscale_pd) (mask, s.x, imm);
+ break;
+ case 1:
+ imm = _MM_FROUND_FLOOR;
+ res1.x = INTRINSIC (_floor_pd) (s.x);
+ res2.x = INTRINSIC (_mask_floor_pd) (res2.x, mask, s.x);
+ break;
+ case 2:
+ imm = _MM_FROUND_CEIL;
+ res1.x = INTRINSIC (_ceil_pd) (s.x);
+ res2.x = INTRINSIC (_mask_ceil_pd) (res2.x, mask, s.x);
+ break;
+ }
+
+ CALC (s.a, res_ref, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE(d) (res_ref,mask,SIZE );
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO(d) (res_ref,mask,SIZE );
+
+ if (!i && UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+
+ }
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-1.c
new file mode 100644
index 0000000000..d7a6f9f908
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 4 } } */
+/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrndscaleps\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_roundscale_ps (x, 0x42);
+ x = _mm512_ceil_ps (x);
+ x = _mm512_floor_ps (x);
+ x = _mm512_mask_roundscale_ps (x, 2, x, 0x42);
+ x = _mm512_mask_ceil_ps (x, 2, x);
+ x = _mm512_mask_floor_ps (x, 2, x);
+ x = _mm512_maskz_roundscale_ps (2, x, 0x42);
+
+ x = _mm512_roundscale_round_ps (x, 0x42, _MM_FROUND_NO_EXC);
+ x = _mm512_mask_roundscale_round_ps (x, 2, x, 0x42, _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_roundscale_round_ps (2, x, 0x42, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-2.c
new file mode 100644
index 0000000000..097253d754
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaleps-2.c
@@ -0,0 +1,92 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "math.h"
+
+static void
+CALC (float *s, float *r, int imm)
+{
+ int i = 0, rc, m;
+ rc = imm & 0xf;
+ m = imm >> 4;
+ for (i = 0; i < SIZE; i++)
+ switch (rc)
+ {
+ case _MM_FROUND_FLOOR:
+ r[i] = floor (s[i] * pow (2, m)) / pow (2, m);
+ break;
+ case _MM_FROUND_CEIL:
+ r[i] = ceil (s[i] * pow (2, m)) / pow (2, m);
+ break;
+ default:
+ abort ();
+ break;
+ }
+}
+
+void static
+TEST (void)
+{
+ int imm, i, j;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, s;
+ float res_ref[SIZE];
+
+ MASK_TYPE mask = 6 ^ (0xffff >> SIZE);
+
+ imm = _MM_FROUND_FLOOR | (7 << 4);
+
+ for (i = 0; i < 3; i++)
+ {
+
+ for (j = 0; j < SIZE; j++)
+ {
+ s.a[j] = j * (j + 12.0231);
+ res1.a[j] = DEFAULT_VALUE;
+ res2.a[j] = DEFAULT_VALUE;
+ res3.a[j] = DEFAULT_VALUE;
+ }
+
+ switch (i)
+ {
+ case 0:
+ imm = _MM_FROUND_FLOOR | (7 << 4);
+ res1.x = INTRINSIC (_roundscale_ps) (s.x, imm);
+ res2.x = INTRINSIC (_mask_roundscale_ps) (res2.x, mask, s.x, imm);
+ res3.x = INTRINSIC (_maskz_roundscale_ps) (mask, s.x, imm);
+ break;
+ case 1:
+ imm = _MM_FROUND_FLOOR;
+ res1.x = INTRINSIC (_floor_ps) (s.x);
+ res2.x = INTRINSIC (_mask_floor_ps) (res2.x, mask, s.x);
+ break;
+ case 2:
+ imm = _MM_FROUND_CEIL;
+ res1.x = INTRINSIC (_ceil_ps) (s.x);
+ res2.x = INTRINSIC (_mask_ceil_ps) (res2.x, mask, s.x);
+ break;
+ }
+
+ CALC (s.a, res_ref, imm);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE ()(res_ref, mask, SIZE);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO ()(res_ref, mask, SIZE);
+
+ if (!i && UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c
new file mode 100644
index 0000000000..2f370a9272
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrndscalesd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrndscalesd\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_roundscale_sd (x1, x2, 0x42);
+ x1 = _mm_roundscale_round_sd (x1, x2, 0x42, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c
new file mode 100644
index 0000000000..5b4e8423ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscalesd-2.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#define SIZE (128 / 64)
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_rndscalesd (double *s1, double *s2, double *r, int imm)
+{
+ int rc, m;
+ rc = imm & 0xf;
+ m = imm >> 4;
+
+ switch (rc)
+ {
+ case _MM_FROUND_FLOOR:
+ r[0] = floor (s2[0] * pow (2, m)) / pow (2, m);
+ break;
+ case _MM_FROUND_CEIL:
+ r[0] = ceil (s2[0] * pow (2, m)) / pow (2, m);
+ break;
+ default:
+ abort ();
+ break;
+ }
+
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ int imm = _MM_FROUND_FLOOR | (7 << 4);
+ union128d s1, s2, res1;
+ double res_ref[SIZE];
+
+ s1.x = _mm_set_pd (4.05084, -1.23162);
+ s2.x = _mm_set_pd (-3.53222, 7.33527);
+
+ res1.x = _mm_roundscale_sd (s1.x, s2.x, imm);
+
+ compute_rndscalesd (s1.a, s2.a, res_ref, imm);
+
+ if (check_union128d (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c
new file mode 100644
index 0000000000..c9f5a753d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrndscaless\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vrndscaless\[ \\t\]+\\S*,\[ \\t\]+\{sae\}\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_roundscale_ss (x1, x2, 0x42);
+ x1 = _mm_roundscale_round_ss (x1, x2, 0x42, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c
new file mode 100644
index 0000000000..45052bc61f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrndscaless-2.c
@@ -0,0 +1,52 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#define SIZE (128 / 32)
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_rndscaless (float *s1, float *s2, float *r, int imm)
+{
+ int rc, m;
+ rc = imm & 0xf;
+ m = imm >> 4;
+
+ switch (rc)
+ {
+ case _MM_FROUND_FLOOR:
+ r[0] = __builtin_floorf (s2[0] * pow (2, m)) / pow (2, m);
+ break;
+ case _MM_FROUND_CEIL:
+ r[0] = __builtin_ceilf (s2[0] * pow (2, m)) / pow (2, m);
+ break;
+ default:
+ abort ();
+ break;
+ }
+
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ int imm = _MM_FROUND_FLOOR | (7 << 4);
+ union128 s1, s2, res1;
+ float res_ref[SIZE];
+
+ s1.x = _mm_set_ps (4.05084, -1.23162, 2.00231, -6.22103);
+ s2.x = _mm_set_ps (-4.19319, -3.53222, 7.33527, 5.57655);
+
+ res1.x = _mm_roundscale_ss (s1.x, s2.x, imm);
+
+ compute_rndscaless (s1.a, s2.a, res_ref, imm);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-1.c
new file mode 100644
index 0000000000..e8818a6b63
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt14pd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rsqrt14_pd (x);
+ x = _mm512_mask_rsqrt14_pd (x, m, x);
+ x = _mm512_maskz_rsqrt14_pd (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-2.c
new file mode 100644
index 0000000000..76e39cf805
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14pd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 1.0 / sqrt(s[i]);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rsqrt14_pd) (s.x);
+ res2.x = INTRINSIC (_mask_rsqrt14_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_rsqrt14_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN, d) (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-1.c
new file mode 100644
index 0000000000..b766d85418
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 3 } } */
+/* { dg-final { scan-assembler-times "vrsqrt14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vrsqrt14ps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_rsqrt14_ps (x);
+ x = _mm512_mask_rsqrt14_ps (x, m, x);
+ x = _mm512_maskz_rsqrt14_ps (m, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-2.c
new file mode 100644
index 0000000000..4e6f77dd40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ps-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = 1.0 / sqrt(s[i]);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_rsqrt14_ps) (s.x);
+ res2.x = INTRINSIC (_mask_rsqrt14_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_rsqrt14_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res1, res_ref, 0.0001))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res2, res_ref, 0.0001))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_ROUGH_CHECK (AVX512F_LEN,) (res3, res_ref, 0.0001))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-1.c
new file mode 100644
index 0000000000..bd8b7a84f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt14sd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_rsqrt14_sd (x1, x2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-2.c
new file mode 100644
index 0000000000..ef4e407f7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14sd-2.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vrsqrt14sd (double *s1, double *s2, double *r)
+{
+ r[0] = 1.0 / sqrt (s2[0]);
+ r[1] = s1[1];
+}
+
+static void
+avx512f_test (void)
+{
+ union128d s1, s2, res1, res2, res3;
+ double res_ref[2];
+
+ s1.x = _mm_set_pd (-3.0, 111.111);
+ s2.x = _mm_set_pd (222.222, 4.0);
+ res2.a[0] = DEFAULT_VALUE;
+
+ res1.x = _mm_rsqrt14_sd (s1.x, s2.x);
+
+ compute_vrsqrt14sd (s1.a, s2.a, res_ref);
+
+ if (check_fp_union128d (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-1.c
new file mode 100644
index 0000000000..d4d4eeadc1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vrsqrt14ss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_rsqrt14_ss (x1, x2);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-2.c
new file mode 100644
index 0000000000..b01420f7af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vrsqrt14ss-2.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+static void
+compute_vrsqrt14ss (float *s1, float *s2, float *r)
+{
+ r[0] = 1.0 / sqrt (s2[0]);
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ union128 s1, s2, res1, res2, res3;
+ float res_ref[4];
+
+ s1.x = _mm_set_ps (-24.43, 68.346, -43.35, 546.46);
+ s2.x = _mm_set_ps (222.222, 333.333, 444.444, 4.0);
+ res2.a[0] = DEFAULT_VALUE;
+
+ res1.x = _mm_rsqrt14_ss (s1.x, s2.x);
+
+ compute_vrsqrt14ss (s1.a, s2.a, res_ref);
+
+ if (check_fp_union128 (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-1.c
new file mode 100644
index 0000000000..884a3d4af1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_scalef_pd (x, x);
+ x = _mm512_mask_scalef_pd (x, m, x, x);
+ x = _mm512_maskz_scalef_pd (m, x, x);
+ x = _mm512_scalef_round_pd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_scalef_round_pd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_scalef_round_pd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-2.c
new file mode 100644
index 0000000000..829f7418f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefpd-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include <math.h>
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = ldexp (s1[i], floor (s2[i]));
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_scalef_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_scalef_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_scalef_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-1.c
new file mode 100644
index 0000000000..8299f60ed1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vscalefps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_scalef_ps (x, x);
+ x = _mm512_mask_scalef_ps (x, m, x, x);
+ x = _mm512_maskz_scalef_ps (m, x, x);
+ x = _mm512_scalef_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_scalef_round_ps (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_scalef_round_ps (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-2.c
new file mode 100644
index 0000000000..59c32369f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefps-2.c
@@ -0,0 +1,56 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include <math.h>
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = ldexp (s1[i], floor (s2[i]));
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, ) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_scalef_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_scalef_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_scalef_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c
new file mode 100644
index 0000000000..ab3a791a9c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_scalef_sd (x, x);
+ x = _mm_scalef_round_sd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c
new file mode 100644
index 0000000000..131fc67c03
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefsd-2.c
@@ -0,0 +1,37 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+#define SIZE (128 / 64)
+
+static void
+compute_scalefsd (double *s1, double *s2, double *r)
+{
+ r[0] = s1[0] * pow (2, floor (s2[0]));
+ r[1] = s1[1];
+}
+
+void static
+avx512f_test (void)
+{
+ union128d res1, s1, s2;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 11.5 * (i + 1);
+ s2.a[i] = 10.5 * (i + 1);
+ }
+
+ res1.x = _mm_scalef_sd (s1.x, s2.x);
+
+ compute_scalefsd (s1.a, s2.a, res_ref);
+
+ if (check_union128d (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c
new file mode 100644
index 0000000000..93ea8a1079
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\n\]*%xmm\[0-9\]\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscalefss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm_scalef_ss (x, x);
+ x = _mm_scalef_round_ss (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c
new file mode 100644
index 0000000000..3e8f6d1934
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vscalefss-2.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-require-effective-target avx512f } */
+
+#include <math.h>
+#include "avx512f-check.h"
+#include "avx512f-helper.h"
+
+#define SIZE (128 / 32)
+
+static void
+compute_scalefss (float *s1, float *s2, float *r)
+{
+ r[0] = s1[0] * (float) pow (2, floor (s2[0]));
+ r[1] = s1[1];
+ r[2] = s1[2];
+ r[3] = s1[3];
+}
+
+static void
+avx512f_test (void)
+{
+ union128 res1, s1, s2;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 11.5 * (i + 1);
+ s2.a[i] = 10.5 * (i + 1);
+ }
+
+ res1.x = _mm_scalef_ss (s1.x, s2.x);
+
+ compute_scalefss (s1.a, s2.a, res_ref);
+
+ if (check_union128 (res1, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-1.c
new file mode 100644
index 0000000000..712b314829
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vshuff32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+__m512 x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_f32x4 (x, x, 56);
+ x = _mm512_mask_shuffle_f32x4 (x, 4, x, x, 56);
+ x = _mm512_maskz_shuffle_f32x4 (6, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-2.c
new file mode 100644
index 0000000000..35eabc2cfe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshuff32x4-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (float *e, UNION_TYPE (AVX512F_LEN,) s1, UNION_TYPE (AVX512F_LEN,) s2,
+ int imm)
+{
+ int i, offset, selector;
+ float *source;
+ for (i = 0; i < SIZE / 4; i++)
+ {
+
+#if AVX512F_LEN == 512
+ selector = (imm >> i * 2) & 0x3;
+#else
+ selector = (imm >> i) & 0x1;
+#endif
+
+ offset = i * 4;
+ source = i * 4 * 32 < AVX512F_LEN / 2 ? s1.a : s2.a;
+ memcpy (e + offset, source + selector * 4, 16);
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) u1, u2, u3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ float e[SIZE];
+ int i;
+ int imm = 203;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 1.2 / (i + 0.378);
+ s2.a[i] = 91.02 / (i + 4.3578);
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_shuffle_f32x4) (s1.x, s2.x, imm);
+ u2.x = INTRINSIC (_mask_shuffle_f32x4) (u2.x, mask, s1.x, s2.x, imm);
+ u3.x = INTRINSIC (_maskz_shuffle_f32x4) (mask, s1.x, s2.x, imm);
+
+ CALC (e, s1, s2, imm);
+
+ if (UNION_CHECK (AVX512F_LEN,) (u1, e))
+ abort ();
+
+ MASK_MERGE ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (u2, e))
+ abort ();
+
+ MASK_ZERO ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-1.c
new file mode 100644
index 0000000000..c5ac373cc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vshuff64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+__m512d x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_f64x2 (x, x, 56);
+ x = _mm512_maskz_shuffle_f64x2 (3, x, x, 56);
+ x = _mm512_mask_shuffle_f64x2 (x, 3, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-2.c
new file mode 100644
index 0000000000..9fee4201ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshuff64x2-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (double *e, UNION_TYPE (AVX512F_LEN, d) s1,
+ UNION_TYPE (AVX512F_LEN, d) s2, int imm)
+{
+ int i, offset, selector;
+ double *source;
+ for (i = 0; i < SIZE / 2; i++)
+ {
+
+#if AVX512F_LEN == 512
+ selector = (imm >> i * 2) & 0x3;
+#else
+ selector = (imm >> i) & 0x1;
+#endif
+
+ offset = i * 2;
+ source = i * 2 * 64 < AVX512F_LEN / 2 ? s1.a : s2.a;
+ memcpy (e + offset, source + selector * 2, 16);
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) u1, u2, u3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ double e[SIZE];
+ int i;
+ int imm = 203;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 1.2 / (i + 0.378);
+ s2.a[i] = 91.02 / (i + 4.3578);
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_shuffle_f64x2) (s1.x, s2.x, imm);
+ u2.x = INTRINSIC (_mask_shuffle_f64x2) (u2.x, mask, s1.x, s2.x, imm);
+ u3.x = INTRINSIC (_maskz_shuffle_f64x2) (mask, s1.x, s2.x, imm);
+
+ CALC (e, s1, s2, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (u1, e))
+ abort ();
+
+ MASK_MERGE (d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (u2, e))
+ abort ();
+
+ MASK_ZERO (d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-1.c
new file mode 100644
index 0000000000..8e48fdf7dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vshufi32x4\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+__m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_i32x4 (x, x, 56);
+ x = _mm512_mask_shuffle_i32x4 (x, 8, x, x, 56);
+ x = _mm512_maskz_shuffle_i32x4 (8, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-2.c
new file mode 100644
index 0000000000..9b1603c66f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufi32x4-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (int *e, UNION_TYPE (AVX512F_LEN, i_d) s1,
+ UNION_TYPE (AVX512F_LEN, i_d) s2, int imm)
+{
+ int i, offset, selector;
+ int *source;
+ for (i = 0; i < SIZE / 4; i++)
+ {
+
+#if AVX512F_LEN == 512
+ selector = (imm >> i * 2) & 0x3;
+#else
+ selector = (imm >> i) & 0x1;
+#endif
+
+ offset = i * 4;
+ source = i * 4 * 32 < AVX512F_LEN / 2 ? s1.a : s2.a;
+ memcpy (e + offset, source + selector * 4, 16);
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_d) u1, u2, u3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ int e[SIZE];
+ int i;
+ int imm = 203;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 1.2 / (i + 0.378);
+ s2.a[i] = 91.02 / (i + 4.3578);
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_shuffle_i32x4) (s1.x, s2.x, imm);
+ u2.x = INTRINSIC (_mask_shuffle_i32x4) (u2.x, mask, s1.x, s2.x, imm);
+ u3.x = INTRINSIC (_maskz_shuffle_i32x4) (mask, s1.x, s2.x, imm);
+
+ CALC (e, s1, s2, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, i_d) (u1, e))
+ abort ();
+
+ MASK_MERGE (i_d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (u2, e))
+ abort ();
+
+ MASK_ZERO (i_d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_d) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-1.c
new file mode 100644
index 0000000000..5bb5c8f63f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vshufi64x2\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+__m512i x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_i64x2 (x, x, 56);
+ x = _mm512_mask_shuffle_i64x2 (x, 3, x, x, 56);
+ x = _mm512_maskz_shuffle_i64x2 (2, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-2.c
new file mode 100644
index 0000000000..85a5918833
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufi64x2-2.c
@@ -0,0 +1,68 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+#include "string.h"
+
+void
+CALC (long long *e, UNION_TYPE (AVX512F_LEN, i_q) s1,
+ UNION_TYPE (AVX512F_LEN, i_q) s2, int imm)
+{
+ int i, offset, selector;
+ long long *source;
+ for (i = 0; i < SIZE / 2; i++)
+ {
+
+#if AVX512F_LEN == 512
+ selector = (imm >> i * 2) & 0x3;
+#else
+ selector = (imm >> i) & 0x1;
+#endif
+
+ offset = i * 2;
+ source = i * 2 * 64 < AVX512F_LEN / 2 ? s1.a : s2.a;
+ memcpy (e + offset, source + selector * 2, 16);
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, i_q) u1, u2, u3, s1, s2;
+ MASK_TYPE mask = MASK_VALUE;
+ long long e[SIZE];
+ int i;
+ int imm = 203;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 1.2 / (i + 0.378);
+ s2.a[i] = 91.02 / (i + 4.3578);
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_shuffle_i64x2) (s1.x, s2.x, imm);
+ u2.x = INTRINSIC (_mask_shuffle_i64x2) (u2.x, mask, s1.x, s2.x, imm);
+ u3.x = INTRINSIC (_maskz_shuffle_i64x2) (mask, s1.x, s2.x, imm);
+
+ CALC (e, s1, s2, imm);
+
+ if (UNION_CHECK (AVX512F_LEN, i_q) (u1, e))
+ abort ();
+
+ MASK_MERGE (i_q) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (u2, e))
+ abort ();
+
+ MASK_ZERO (i_q) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, i_q) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-1.c
new file mode 100644
index 0000000000..420a6cfd7b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vshufpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshufpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vshufpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+__m512d x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_pd (x, x, 56);
+ x = _mm512_mask_shuffle_pd (x, 2, x, x, 56);
+ x = _mm512_maskz_shuffle_pd (2, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-2.c
new file mode 100644
index 0000000000..d70228af17
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufpd-2.c
@@ -0,0 +1,61 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+void static
+CALC (double *e, UNION_TYPE (AVX512F_LEN, d) s1,
+ UNION_TYPE (AVX512F_LEN, d) s2, int imm)
+{
+ e[0] = (imm & (1 << 0)) ? s1.a[1] : s1.a[0];
+ e[1] = (imm & (1 << 1)) ? s2.a[1] : s2.a[0];
+#if AVX512F_LEN > 128
+ e[2] = (imm & (1 << 2)) ? s1.a[3] : s1.a[2];
+ e[3] = (imm & (1 << 3)) ? s2.a[3] : s2.a[2];
+#if AVX512F_LEN > 256
+ e[4] = (imm & (1 << 4)) ? s1.a[5] : s1.a[4];
+ e[5] = (imm & (1 << 5)) ? s2.a[5] : s2.a[4];
+ e[6] = (imm & (1 << 6)) ? s1.a[7] : s1.a[6];
+ e[7] = (imm & (1 << 7)) ? s2.a[7] : s2.a[6];
+#endif
+#endif
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) u1, u2, u3, s1, s2;
+ double e[SIZE];
+ MASK_TYPE mask = MASK_VALUE;
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 2134.3343 * i + 54846.4641;
+ s2.a[i] = 856.43576 * i + 1124.209;
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_shuffle_pd) (s1.x, s2.x, 120);
+ u2.x = INTRINSIC (_mask_shuffle_pd) (u2.x, mask, s1.x, s2.x, 120);
+ u3.x = INTRINSIC (_maskz_shuffle_pd) (mask, s1.x, s2.x, 120);
+ CALC (e, s1, s2, 120);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (u1, e))
+ abort ();
+
+ MASK_MERGE (d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (u2, e))
+ abort ();
+
+ MASK_ZERO (d) (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufps-1.c
new file mode 100644
index 0000000000..e3dbf0751f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vshufps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vshufps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vshufps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+__m512 x;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_shuffle_ps (x, x, 56);
+ x = _mm512_mask_shuffle_ps (x, 2, x, x, 56);
+ x = _mm512_maskz_shuffle_ps (2, x, x, 56);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vshufps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vshufps-2.c
new file mode 100644
index 0000000000..ed378d1c40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vshufps-2.c
@@ -0,0 +1,74 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+void
+CALC (float *e, UNION_TYPE (AVX512F_LEN,) s1, UNION_TYPE (AVX512F_LEN,) s2,
+ int imm)
+{
+ e[0] = s1.a[(imm >> 0) & 0x3];
+ e[1] = s1.a[(imm >> 2) & 0x3];
+ e[2] = s2.a[(imm >> 4) & 0x3];
+ e[3] = s2.a[(imm >> 6) & 0x3];
+#if AVX512F_LEN > 128
+ e[4] = s1.a[4 + ((imm >> 0) & 0x3)];
+ e[5] = s1.a[4 + ((imm >> 2) & 0x3)];
+ e[6] = s2.a[4 + ((imm >> 4) & 0x3)];
+ e[7] = s2.a[4 + ((imm >> 6) & 0x3)];
+#if AVX512F_LEN > 256
+ e[8] = s1.a[8 + ((imm >> 0) & 0x3)];
+ e[9] = s1.a[8 + ((imm >> 2) & 0x3)];
+ e[10] = s2.a[8 + ((imm >> 4) & 0x3)];
+ e[11] = s2.a[8 + ((imm >> 6) & 0x3)];
+ e[12] = s1.a[12 + ((imm >> 0) & 0x3)];
+ e[13] = s1.a[12 + ((imm >> 2) & 0x3)];
+ e[14] = s2.a[12 + ((imm >> 4) & 0x3)];
+ e[15] = s2.a[12 + ((imm >> 6) & 0x3)];
+#endif
+#endif
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) u1, u2, u3, s1, s2;
+ float e[SIZE];
+ int i, sign;
+ MASK_TYPE mask = MASK_VALUE;
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = 1.5 + 34.67 * i * sign;
+ s2.a[i] = -22.17 * i * sign;
+ u1.a[i] = DEFAULT_VALUE;
+ u2.a[i] = DEFAULT_VALUE;
+ u3.a[i] = DEFAULT_VALUE;
+ sign = sign * -1;
+ }
+
+
+ u1.x = INTRINSIC (_shuffle_ps) (s1.x, s2.x, 203);
+ u2.x = INTRINSIC (_mask_shuffle_ps) (u2.x, mask, s1.x, s2.x, 203);
+ u3.x = INTRINSIC (_maskz_shuffle_ps) (mask, s1.x, s2.x, 203);
+
+ CALC (e, s1, s2, 203);
+
+ if (UNION_CHECK (AVX512F_LEN,) (u1, e))
+ abort ();
+
+ MASK_MERGE ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (u2, e))
+ abort ();
+
+ MASK_ZERO ()(e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-1.c
new file mode 100644
index 0000000000..cd85b291ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sqrt_pd (x);
+ x = _mm512_mask_sqrt_pd (x, m, x);
+ x = _mm512_maskz_sqrt_pd (m, x);
+ x = _mm512_sqrt_round_pd (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_sqrt_round_pd (x, m, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_sqrt_round_pd (m, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-2.c
new file mode 100644
index 0000000000..27b649157f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtpd-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (double *s, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = sqrt(s[i]);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_sqrt_pd) (s.x);
+ res2.x = INTRINSIC (_mask_sqrt_pd) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_sqrt_pd) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_FP_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-1.c
new file mode 100644
index 0000000000..0e7fcb5e46
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsqrtps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sqrt_ps (x);
+ x = _mm512_mask_sqrt_ps (x, m, x);
+ x = _mm512_maskz_sqrt_ps (m, x);
+ x = _mm512_sqrt_round_ps (x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_sqrt_round_ps (x, m, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_sqrt_round_ps (m, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-2.c
new file mode 100644
index 0000000000..4fc45e3953
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtps-2.c
@@ -0,0 +1,54 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#include <math.h>
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+static void
+CALC (float *s, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = sqrt(s[i]);
+ }
+}
+
+static void
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s.a[i] = 123.456 * (i + 2000);
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_sqrt_ps) (s.x);
+ res2.x = INTRINSIC (_mask_sqrt_ps) (res2.x, mask, s.x);
+ res3.x = INTRINSIC (_maskz_sqrt_ps) (mask, s.x);
+
+ CALC (s.a, res_ref);
+
+ if (UNION_FP_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_FP_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c
new file mode 100644
index 0000000000..80ad414036
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsqrtsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_sqrt_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c
new file mode 100644
index 0000000000..a3bb68f79d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsqrtss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsqrtss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_sqrt_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-1.c
new file mode 100644
index 0000000000..5a9cc9fb0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rd-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsubpd\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sub_pd (x, x);
+ x = _mm512_mask_sub_pd (x, m, x, x);
+ x = _mm512_maskz_sub_pd (m, x, x);
+ x = _mm512_sub_round_pd (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_sub_round_pd (x, m, x, x, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_sub_round_pd (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-2.c
new file mode 100644
index 0000000000..a462631b2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+CALC (double *r, double *s1, double *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] - s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN, d) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sub_pd) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sub_pd) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sub_pd) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubps-1.c
new file mode 100644
index 0000000000..7f711f316b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubps-1.c
@@ -0,0 +1,24 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\[^\{\]" 6 } } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 2 } } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 2 } } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%zmm\[0-9\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{ru-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+/* { dg-final { scan-assembler-times "vsubps\[ \\t\]+\[^\n\]*\{rz-sae\}\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x;
+volatile __mmask16 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_sub_ps (x, x);
+ x = _mm512_mask_sub_ps (x, m, x, x);
+ x = _mm512_maskz_sub_ps (m, x, x);
+ x = _mm512_sub_round_ps (x, x, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+ x = _mm512_mask_sub_round_ps (x, m, x, x, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC);
+ x = _mm512_maskz_sub_round_ps (m, x, x, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubps-2.c
new file mode 100644
index 0000000000..366b7e7443
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubps-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+CALC (float *r, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ r[i] = s1[i] - s2[i];
+ }
+}
+
+void static
+TEST (void)
+{
+ int i, sign;
+ UNION_TYPE (AVX512F_LEN,) res1, res2, res3, src1, src2;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+
+ sign = -1;
+ for (i = 0; i < SIZE; i++)
+ {
+ src1.a[i] = 1.5 + 34.67 * i * sign;
+ src2.a[i] = -22.17 * i * sign;
+ sign = sign * -1;
+ }
+ for (i = 0; i < SIZE; i++)
+ res2.a[i] = DEFAULT_VALUE;
+
+ res1.x = INTRINSIC (_sub_ps) (src1.x, src2.x);
+ res2.x = INTRINSIC (_mask_sub_ps) (res2.x, mask, src1.x, src2.x);
+ res3.x = INTRINSIC (_maskz_sub_ps) (mask, src1.x, src2.x);
+
+ CALC (res_ref, src1.a, src2.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN,) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-1.c
new file mode 100644
index 0000000000..ad552f7651
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubsd-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsubsd\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128d x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_sub_round_sd (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vsubss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vsubss-1.c
new file mode 100644
index 0000000000..809c515975
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vsubss-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vsubss\[ \\t\]+\[^\n\]*\{rn-sae\}\[^\n\]*%xmm\[0-9\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m128 x1, x2;
+
+void extern
+avx512f_test (void)
+{
+ x1 = _mm_sub_round_ss (x1, x2, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vucomisd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vucomisd-1.c
new file mode 100644
index 0000000000..da0df76200
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vucomisd-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vucomisd\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm" } } */
+
+#include <immintrin.h>
+
+volatile __m128d x;
+volatile int res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm_comi_round_sd (x, x, _CMP_NLE_UQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vucomiss-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vucomiss-1.c
new file mode 100644
index 0000000000..d4355de0c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vucomiss-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler "vucomiss\[ \\t\]+\[^\n\]*\{sae\}\[^\n\]*%xmm" } } */
+
+#include <immintrin.h>
+
+volatile __m128 x;
+volatile int res;
+
+void extern
+avx512f_test (void)
+{
+ res = _mm_comi_round_ss (x, x, _CMP_EQ_OQ, _MM_FROUND_NO_EXC);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-1.c
new file mode 100644
index 0000000000..2ce55e4469
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vunpckhpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vunpckhpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vunpckhpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpackhi_pd (y, z);
+ x = _mm512_mask_unpackhi_pd (x, m, y, z);
+ x = _mm512_maskz_unpackhi_pd (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-2.c
new file mode 100644
index 0000000000..60898bbf22
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (double *s1, double *s2, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ r[2 * i] = s1[2 * i + 1];
+ r[2 * i + 1] = s2[2 * i + 1];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * 123.2 + 32.6;
+ s2.a[i] = i + 2.5;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_unpackhi_pd) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_unpackhi_pd) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_unpackhi_pd) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-1.c
new file mode 100644
index 0000000000..9567272c90
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vunpckhps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vunpckhps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vunpckhps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpackhi_ps (y, z);
+ x = _mm512_mask_unpackhi_ps (x, m, y, z);
+ x = _mm512_maskz_unpackhi_ps (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-2.c
new file mode 100644
index 0000000000..6047985bc7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpckhps-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (float *s1, float *s2, float *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE / 4; i++)
+ {
+ r[4 * i] = s1[4 * i + 2];
+ r[4 * i + 1] = s2[4 * i + 2];
+ r[4 * i + 2] = s1[4 * i + 3];
+ r[4 * i + 3] = s2[4 * i + 3];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, ) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ float res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * 123.2 + 32.6;
+ s2.a[i] = i + 2.5;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_unpackhi_ps) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_unpackhi_ps) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_unpackhi_ps) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, ) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO () (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-1.c
new file mode 100644
index 0000000000..5a73037846
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vunpcklpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512d x, y, z;
+volatile __mmask8 m;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpacklo_pd (y, z);
+ x = _mm512_mask_unpacklo_pd (x, m, y, z);
+ x = _mm512_maskz_unpacklo_pd (m, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-2.c
new file mode 100644
index 0000000000..3317e4acff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklpd-2.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 64)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (double *s1, double *s2, double *r)
+{
+ int i;
+
+ for (i = 0; i < SIZE / 2; i++)
+ {
+ r[2 * i] = s1[2 * i];
+ r[2 * i + 1] = s2[2 * i];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN, d) s1, s2, res1, res2, res3;
+ MASK_TYPE mask = MASK_VALUE;
+ double res_ref[SIZE];
+ int i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * 123.2 + 32.6;
+ s2.a[i] = i + 2.5;
+ res2.a[i] = DEFAULT_VALUE;
+ }
+
+ res1.x = INTRINSIC (_unpacklo_pd) (s1.x, s2.x);
+ res2.x = INTRINSIC (_mask_unpacklo_pd) (res2.x, mask, s1.x, s2.x);
+ res3.x = INTRINSIC (_maskz_unpacklo_pd) (mask, s1.x, s2.x);
+
+ CALC (s1.a, s2.a, res_ref);
+
+ if (UNION_CHECK (AVX512F_LEN, d) (res1, res_ref))
+ abort ();
+
+ MASK_MERGE (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res2, res_ref))
+ abort ();
+
+ MASK_ZERO (d) (res_ref, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, d) (res3, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-1.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-1.c
new file mode 100644
index 0000000000..a007a050b0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f -O2" } */
+/* { dg-final { scan-assembler-times "vunpcklps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 3 } } */
+/* { dg-final { scan-assembler-times "vunpcklps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\{z\}" 1 } } */
+/* { dg-final { scan-assembler-times "vunpcklps\[ \\t\]+\[^\n\]*%zmm\[0-9\]\{%k\[1-7\]\}\[^\{\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512 x, y, z;
+
+void extern
+avx512f_test (void)
+{
+ x = _mm512_unpacklo_ps (y, z);
+ x = _mm512_mask_unpacklo_ps (x, 2, y, z);
+ x = _mm512_maskz_unpacklo_ps (2, y, z);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-2.c b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-2.c
new file mode 100644
index 0000000000..538a9fa80e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f-vunpcklps-2.c
@@ -0,0 +1,57 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx512f" } */
+/* { dg-require-effective-target avx512f } */
+
+#define AVX512F
+
+#include "avx512f-helper.h"
+
+#define SIZE (AVX512F_LEN / 32)
+#include "avx512f-mask-type.h"
+
+void static
+CALC (float *e, float *s1, float *s2)
+{
+ int i;
+ for (i = 0; i < SIZE / 4; i++)
+ {
+ e[4 * i] = s1[4 * i];
+ e[4 * i + 1] = s2[4 * i];
+ e[4 * i + 2] = s1[4 * i + 1];
+ e[4 * i + 3] = s2[4 * i + 1];
+ }
+}
+
+void static
+TEST (void)
+{
+ UNION_TYPE (AVX512F_LEN,) s1, s2, u1, u2, u3;
+ MASK_TYPE mask = MASK_VALUE;
+ float e[SIZE];
+ int i;
+ for (i = 0; i < SIZE; i++)
+ {
+ s1.a[i] = i * 123.2 + 32.6;
+ s2.a[i] = i + 2.5;
+ u1.a[i]= DEFAULT_VALUE;
+ u2.a[i]= DEFAULT_VALUE;
+ u3.a[i]= DEFAULT_VALUE;
+ }
+
+ u1.x = INTRINSIC (_unpacklo_ps) (s1.x, s2.x);
+ u2.x = INTRINSIC (_mask_unpacklo_ps) (u2.x, mask, s1.x, s2.x);
+ u3.x = INTRINSIC (_maskz_unpacklo_ps) (mask, s1.x, s2.x);
+
+ CALC (e, s1.a, s2.a);
+
+ if (UNION_CHECK (AVX512F_LEN,) (u1, e))
+ abort ();
+
+ MASK_MERGE () (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (u2, e))
+ abort ();
+
+ MASK_ZERO () (e, mask, SIZE);
+ if (UNION_CHECK (AVX512F_LEN, ) (u3, e))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f_cond_move.c b/gcc/testsuite/gcc.target/i386/avx512f_cond_move.c
new file mode 100644
index 0000000000..c06ee26317
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f_cond_move.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx512f" } */
+/* { dg-final { scan-assembler "(vpblendmd|vmovdqa32)" } } */
+
+unsigned int x[128];
+unsigned int y[128];
+
+void
+foo ()
+{
+ int i;
+ for (i = 0; i < 128; i++)
+ x[i] = y[i] > 3 ? 2 : 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-1.c b/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-1.c
new file mode 100644
index 0000000000..34a4353784
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f -ffixed-xmm0 -ffixed-xmm1 -ffixed-xmm2 -ffixed-xmm3 -ffixed-xmm4 -ffixed-xmm5 -ffixed-xmm6 -ffixed-xmm7 -ffixed-xmm8 -ffixed-xmm9 -ffixed-xmm10 -ffixed-xmm11 -ffixed-xmm12 -ffixed-xmm13 -ffixed-xmm14 -ffixed-xmm15" } */
+
+volatile float a,b,c,d;
+
+void foo()
+{
+ __asm__ __volatile__( "vcmpss $1,%1, %2,%3;" : "=x"(c) : "x"(a),"x"(b),"x"(d) );/* { dg-error "inconsistent operand constraints" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-2.c b/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-2.c
new file mode 100644
index 0000000000..a0a268559a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512f_evex_reg_asm-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mavx512f -ffixed-xmm0 -ffixed-xmm1 -ffixed-xmm2 -ffixed-xmm3 -ffixed-xmm4 -ffixed-xmm5 -ffixed-xmm6 -ffixed-xmm7 -ffixed-xmm8 -ffixed-xmm9 -ffixed-xmm10 -ffixed-xmm11 -ffixed-xmm12 -ffixed-xmm13 -ffixed-xmm14 -ffixed-xmm15" } */
+/* { dg-final { scan-assembler "vaddss\[ \\t\]+\[^\n\]*%xmm(1\[6-9\]|2\[0-9\]|3\[0-1\])\[^\{\]" } } */
+
+volatile float a, b, c, d;
+
+void foo()
+{
+ __asm__ __volatile__( "vaddss %1, %2, %3;" : "=v"(c) : "v"(a),"v"(b),"v"(d) );
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dpd-1.c
new file mode 100644
index 0000000000..9051a1620e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dpd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf0dpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i idx;
+volatile __mmask8 m8;
+void *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, _MM_HINT_T0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dps-1.c
new file mode 100644
index 0000000000..bda31d77ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0dps-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf0dps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask16 m16;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i32gather_ps (idx, m16, base, 8, _MM_HINT_T0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qpd-1.c
new file mode 100644
index 0000000000..34bcecfe2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qpd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf0qpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i64gather_pd (idx, m8, base, 8, _MM_HINT_T0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qps-1.c
new file mode 100644
index 0000000000..a9011b0814
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf0qps-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf0qps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i64gather_ps (idx, m8, base, 8, _MM_HINT_T0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dpd-1.c
new file mode 100644
index 0000000000..a16f4d395e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dpd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf1dpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i32gather_pd (idx, m8, base, 8, _MM_HINT_T1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dps-1.c
new file mode 100644
index 0000000000..c43152b01c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1dps-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf1dps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask16 m16;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i32gather_ps (idx, m16, base, 8, _MM_HINT_T1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qpd-1.c
new file mode 100644
index 0000000000..ab9e351667
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qpd-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf1qpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i64gather_pd (idx, m8, base, 8, _MM_HINT_T1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qps-1.c
new file mode 100644
index 0000000000..28d7cd666b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vgatherpf1qps-1.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vgatherpf1qps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_mask_prefetch_i64gather_ps (idx, m8, base, 8, _MM_HINT_T1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c
new file mode 100644
index 0000000000..14d5c97449
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dpd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf0dpd\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf0dpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i idx;
+volatile __mmask8 m8;
+void *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i32scatter_pd (base, idx, 8, _MM_HINT_T0);
+ _mm512_mask_prefetch_i32scatter_pd (base, m8, idx, 8, _MM_HINT_ET0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c
new file mode 100644
index 0000000000..05f51f2bc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0dps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf0dps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf0dps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask16 m16;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i32scatter_ps (base, idx, 8, _MM_HINT_T0);
+ _mm512_mask_prefetch_i32scatter_ps (base, m16, idx, 8, _MM_HINT_ET0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c
new file mode 100644
index 0000000000..93a65a8c17
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qpd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf0qpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf0qpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+void *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i64scatter_pd (base, idx, 8, _MM_HINT_T0);
+ _mm512_mask_prefetch_i64scatter_pd (base, m8, idx, 8, _MM_HINT_ET0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c
new file mode 100644
index 0000000000..1f9b97363a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf0qps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf0qps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf0qps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i64scatter_ps (base, idx, 8, _MM_HINT_T0);
+ _mm512_mask_prefetch_i64scatter_ps (base, m8, idx, 8, _MM_HINT_ET0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c
new file mode 100644
index 0000000000..04c367ca3f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dpd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf1dpd\[ \\t\]+\[^\n\]*%ymm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf1dpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m256i idx;
+volatile __mmask8 m8;
+void *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i32scatter_pd (base, idx, 8, _MM_HINT_T1);
+ _mm512_mask_prefetch_i32scatter_pd (base, m8, idx, 8, _MM_HINT_ET1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c
new file mode 100644
index 0000000000..a76b77c635
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1dps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf1dps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf1dps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask16 m16;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i32scatter_ps (base, idx, 8, _MM_HINT_T1);
+ _mm512_mask_prefetch_i32scatter_ps (base, m16, idx, 8, _MM_HINT_ET1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c
new file mode 100644
index 0000000000..7a5747cfe5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qpd-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf1qpd\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf1qpd\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i64scatter_pd (base, idx, 8, _MM_HINT_T1);
+ _mm512_mask_prefetch_i64scatter_pd (base, m8, idx, 8, _MM_HINT_ET1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c
new file mode 100644
index 0000000000..d0372b7b3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/avx512pf-vscatterpf1qps-1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512pf -O2" } */
+/* { dg-final { scan-assembler-times "vscatterpf1qps\[ \\t\]+\[^\n\]*%zmm\[0-9\]" 2 } } */
+/* { dg-final { scan-assembler-times "vscatterpf1qps\[ \\t\]+\[^\n\]*\{%k\[1-7\]" 1 } } */
+
+#include <immintrin.h>
+
+volatile __m512i idx;
+volatile __mmask8 m8;
+int *base;
+
+void extern
+avx512pf_test (void)
+{
+ _mm512_prefetch_i64scatter_ps (base, idx, 8, _MM_HINT_T1);
+ _mm512_mask_prefetch_i64scatter_ps (base, m8, idx, 8, _MM_HINT_ET1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi-1.c b/gcc/testsuite/gcc.target/i386/bmi-1.c
index dc964ba3d9..c66a9d83b2 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-1.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-1.c
@@ -1,11 +1,11 @@
/* { dg-do compile } */
/* { dg-options "-O2 -mbmi " } */
-/* { dg-final { scan-assembler "andn\[^\\n]*(%|)eax" } } */
-/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)eax" } } */
-/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)eax" } } */
-/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)eax" } } */
-/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)eax" } } */
-/* { dg-final { scan-assembler "tzcntl\[^\\n]*(%|)eax" } } */
+/* { dg-final { scan-assembler "andn\[^\\n]*eax" } } */
+/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "blsi\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "blsr\[^\\n]*eax" 2 } } */
+/* { dg-final { scan-assembler-times "tzcntl\[^\\n]*eax" 2 } } */
#include <x86intrin.h>
@@ -22,25 +22,57 @@ func_bextr32 (unsigned int X, unsigned int Y)
}
unsigned int
+func_bextr32_3args (unsigned int X,
+ unsigned int Y,
+ unsigned int Z)
+{
+ return _bextr_u32(X, Y, Z);
+}
+
+unsigned int
func_blsi32 (unsigned int X)
{
return __blsi_u32(X);
}
unsigned int
+func_blsi32_2 (unsigned int X)
+{
+ return _blsi_u32(X);
+}
+
+unsigned int
func_blsmsk32 (unsigned int X)
{
return __blsmsk_u32(X);
}
unsigned int
+func_blsmsk32_2 (unsigned int X)
+{
+ return _blsmsk_u32(X);
+}
+
+unsigned int
func_blsr32 (unsigned int X)
{
return __blsr_u32(X);
}
unsigned int
+func_blsr32_2 (unsigned int X)
+{
+ return _blsr_u32(X);
+}
+
+unsigned int
func_tzcnt32 (unsigned int X)
{
return __tzcnt_u32(X);
}
+
+unsigned int
+func_tzcnt32_2 (unsigned int X)
+{
+ return _tzcnt_u32(X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi-2.c b/gcc/testsuite/gcc.target/i386/bmi-2.c
index 56f73876d0..6eea66aa0f 100644
--- a/gcc/testsuite/gcc.target/i386/bmi-2.c
+++ b/gcc/testsuite/gcc.target/i386/bmi-2.c
@@ -1,11 +1,11 @@
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-options "-O2 -mbmi " } */
-/* { dg-final { scan-assembler "andn\[^\\n]*(%|)rax" } } */
-/* { dg-final { scan-assembler "bextr\[^\\n]*(%|)rax" } } */
-/* { dg-final { scan-assembler "blsi\[^\\n]*(%|)rax" } } */
-/* { dg-final { scan-assembler "blsmsk\[^\\n]*(%|)rax" } } */
-/* { dg-final { scan-assembler "blsr\[^\\n]*(%|)rax" } } */
-/* { dg-final { scan-assembler "tzcntq\[^\\n]*(%|)rax" } } */
+/* { dg-final { scan-assembler "andn\[^\\n]*rax" } } */
+/* { dg-final { scan-assembler-times "bextr\[ \\t]+\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "blsi\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "blsmsk\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "blsr\[^\\n]*rax" 2 } } */
+/* { dg-final { scan-assembler-times "tzcntq\[^\\n]*rax" 2 } } */
#include <x86intrin.h>
@@ -22,25 +22,57 @@ func_bextr64 (unsigned long long X, unsigned long long Y)
}
unsigned long long
+func_bextr64_3args (unsigned long long X,
+ unsigned long long Y,
+ unsigned long long Z)
+{
+ return _bextr_u64 (X, Y, Z);
+}
+
+unsigned long long
func_blsi64 (unsigned long long X)
{
return __blsi_u64 (X);
}
unsigned long long
+func_blsi64_2 (unsigned long long X)
+{
+ return _blsi_u64 (X);
+}
+
+unsigned long long
func_blsmsk64 (unsigned long long X)
{
return __blsmsk_u64 (X);
}
unsigned long long
+func_blsmsk64_2 (unsigned long long X)
+{
+ return _blsmsk_u64 (X);
+}
+
+unsigned long long
func_blsr64 (unsigned long long X)
{
return __blsr_u64 (X);
}
unsigned long long
+func_blsr64_2 (unsigned long long X)
+{
+ return _blsr_u64 (X);
+}
+
+unsigned long long
func_tzcnt64 (unsigned long long X)
{
return __tzcnt_u64 (X);
}
+
+unsigned long long
+func_tzcnt64_2 (unsigned long long X)
+{
+ return _tzcnt_u64 (X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c b/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c
new file mode 100644
index 0000000000..fe342b9e0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bmi-bextr-3.c
@@ -0,0 +1,31 @@
+/* PR target/57623 */
+/* { dg-do assemble { target bmi } } */
+/* { dg-options "-O2 -mbmi" } */
+
+#include <x86intrin.h>
+
+unsigned int
+f1 (unsigned int x, unsigned int *y)
+{
+ return __bextr_u32 (x, *y);
+}
+
+unsigned int
+f2 (unsigned int *x, unsigned int y)
+{
+ return __bextr_u32 (*x, y);
+}
+
+#ifdef __x86_64__
+unsigned long long
+f3 (unsigned long long x, unsigned long long *y)
+{
+ return __bextr_u64 (x, *y);
+}
+
+unsigned long long
+f4 (unsigned long long *x, unsigned long long y)
+{
+ return __bextr_u64 (*x, y);
+}
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/bmi-bextr-4.c b/gcc/testsuite/gcc.target/i386/bmi-bextr-4.c
new file mode 100644
index 0000000000..2318847ae3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bmi-bextr-4.c
@@ -0,0 +1,49 @@
+/* { dg-do run { target { bmi } } } */
+/* { dg-require-effective-target bmi } */
+/* { dg-options "-O2 -mbmi -fno-inline" } */
+
+#include <x86intrin.h>
+
+#include "bmi-check.h"
+
+unsigned calc_bextr_u32 (unsigned src1, unsigned src2)
+{
+ unsigned res = 0;
+ unsigned char start = (src2 & 0xff);
+ unsigned char len = (int) ((src2 >> 8) & 0xff);
+ if (start < 32) {
+ unsigned i;
+ unsigned last = (start+len) < 32 ? start+len : 32;
+
+ src1 >>= start;
+ for (i=start; i<last; ++i) {
+ res |= (src1 & 1) << (i-start);
+ src1 >>= 1;
+ }
+ }
+
+ return res;
+}
+
+static void
+bmi_test ()
+{
+ unsigned i;
+ unsigned char start, len;
+ unsigned src1 = 0xfacec0ff;
+ unsigned res, res_ref, src2;
+
+ for (i=0; i<5; ++i) {
+ start = i * 4;
+ len = i * 4;
+
+ src1 = src1 * 3;
+ src2 = (start & 0xff) | ((len & 0xff) << 8);
+
+ res_ref = calc_bextr_u32 (src1, src2);
+ res = _bextr_u32 (src1, start, len);
+
+ if (res != res_ref)
+ abort();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi-bextr-5.c b/gcc/testsuite/gcc.target/i386/bmi-bextr-5.c
new file mode 100644
index 0000000000..fd6e3620fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bmi-bextr-5.c
@@ -0,0 +1,48 @@
+/* { dg-do run { target { bmi && { ! ia32 } } } } */
+/* { dg-options "-O2 -mbmi -fno-inline" } */
+
+#include <x86intrin.h>
+
+#include "bmi-check.h"
+
+long long calc_bextr_u64 (unsigned long long src1,
+ unsigned long long src2)
+{
+ long long res = 0;
+ unsigned char start = (src2 & 0xff);
+ unsigned char len = (int) ((src2 >> 8) & 0xff);
+ if (start < 64) {
+ unsigned i;
+ unsigned last = (start+len) < 64 ? start+len : 64;
+
+ src1 >>= start;
+ for (i=start; i<last; ++i) {
+ res |= (src1 & 1) << (i-start);
+ src1 >>= 1;
+ }
+ }
+
+ return res;
+}
+
+static void
+bmi_test ()
+{
+ unsigned i;
+ unsigned char start, len;
+ unsigned long long src1 = 0xfacec0ffeefacec0;
+ unsigned long long res, res_ref, src2;
+
+ for (i=0; i<5; ++i) {
+ start = i * 4;
+ len = i * 3;
+ src1 = src1 * 3;
+ src2 = (start & 0xff) | ((len & 0xff) << 8);
+
+ res_ref = calc_bextr_u64 (src1, src2);
+ res = _bextr_u64 (src1, start, len);
+
+ if (res != res_ref)
+ abort();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c b/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c
new file mode 100644
index 0000000000..42e002d063
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/bmi2-bzhi-1.c
@@ -0,0 +1,31 @@
+/* PR target/57623 */
+/* { dg-do assemble { target bmi2 } } */
+/* { dg-options "-O2 -mbmi2" } */
+
+#include <x86intrin.h>
+
+unsigned int
+f1 (unsigned int x, unsigned int *y)
+{
+ return _bzhi_u32 (x, *y);
+}
+
+unsigned int
+f2 (unsigned int *x, unsigned int y)
+{
+ return _bzhi_u32 (*x, y);
+}
+
+#ifdef __x86_64__
+unsigned long long
+f3 (unsigned long long x, unsigned long long *y)
+{
+ return _bzhi_u64 (x, *y);
+}
+
+unsigned long long
+f4 (unsigned long long *x, unsigned long long y)
+{
+ return _bzhi_u64 (*x, y);
+}
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/builtin-bswap-4.c b/gcc/testsuite/gcc.target/i386/builtin-bswap-4.c
new file mode 100644
index 0000000000..65198aee89
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/builtin-bswap-4.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "bswap\[ \t\]" } } */
+
+short foo (short x)
+{
+ return __builtin_bswap16 (x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/builtin-ucmp.c b/gcc/testsuite/gcc.target/i386/builtin-ucmp.c
new file mode 100644
index 0000000000..709804c35f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/builtin-ucmp.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ffast-math -mfpmath=sse -msse2" } */
+
+double foo(double a)
+{
+ return __builtin_round(a);
+}
+
+/* { dg-final { scan-assembler-not "ucom" } } */
diff --git a/gcc/testsuite/gcc.target/i386/builtin_target.c b/gcc/testsuite/gcc.target/i386/builtin_target.c
new file mode 100644
index 0000000000..c40983e6b3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/builtin_target.c
@@ -0,0 +1,284 @@
+/* This test checks if the __builtin_cpu_is and __builtin_cpu_supports calls
+ are recognized. It also independently uses CPUID to get cpu type and
+ features supported and checks if the builtins correctly identify the
+ platform. The code to do the identification is adapted from
+ libgcc/config/i386/cpuinfo.c. */
+
+/* { dg-do run } */
+
+#include <assert.h>
+#include "cpuid.h"
+
+/* Check if the Intel CPU model and sub-model are identified. */
+static void
+check_intel_cpu_model (unsigned int family, unsigned int model,
+ unsigned int brand_id)
+{
+ /* Parse family and model only if brand ID is 0. */
+ if (brand_id == 0)
+ {
+ switch (family)
+ {
+ case 0x5:
+ /* Pentium. */
+ break;
+ case 0x6:
+ switch (model)
+ {
+ case 0x1c:
+ case 0x26:
+ /* Atom. */
+ assert (__builtin_cpu_is ("atom"));
+ break;
+ case 0x1a:
+ case 0x1e:
+ case 0x1f:
+ case 0x2e:
+ /* Nehalem. */
+ assert (__builtin_cpu_is ("corei7"));
+ assert (__builtin_cpu_is ("nehalem"));
+ break;
+ case 0x25:
+ case 0x2c:
+ case 0x2f:
+ /* Westmere. */
+ assert (__builtin_cpu_is ("corei7"));
+ assert (__builtin_cpu_is ("westmere"));
+ break;
+ case 0x2a:
+ /* Sandy Bridge. */
+ assert (__builtin_cpu_is ("corei7"));
+ assert (__builtin_cpu_is ("sandybridge"));
+ break;
+ case 0x17:
+ case 0x1d:
+ /* Penryn. */
+ case 0x0f:
+ /* Merom. */
+ assert (__builtin_cpu_is ("core2"));
+ break;
+ default:
+ break;
+ }
+ break;
+ default:
+ /* We have no idea. */
+ break;
+ }
+ }
+}
+
+/* Check if the AMD CPU model and sub-model are identified. */
+static void
+check_amd_cpu_model (unsigned int family, unsigned int model)
+{
+ switch (family)
+ {
+ /* AMD Family 10h. */
+ case 0x10:
+ switch (model)
+ {
+ case 0x2:
+ /* Barcelona. */
+ assert (__builtin_cpu_is ("amdfam10h"));
+ assert (__builtin_cpu_is ("barcelona"));
+ break;
+ case 0x4:
+ /* Shanghai. */
+ assert (__builtin_cpu_is ("amdfam10h"));
+ assert (__builtin_cpu_is ("shanghai"));
+ break;
+ case 0x8:
+ /* Istanbul. */
+ assert (__builtin_cpu_is ("amdfam10h"));
+ assert (__builtin_cpu_is ("istanbul"));
+ break;
+ default:
+ break;
+ }
+ break;
+ /* AMD Family 15h. */
+ case 0x15:
+ assert (__builtin_cpu_is ("amdfam15h"));
+ /* Bulldozer version 1. */
+ if ( model <= 0xf)
+ assert (__builtin_cpu_is ("bdver1"));
+ /* Bulldozer version 2. */
+ if (model >= 0x10 && model <= 0x1f)
+ assert (__builtin_cpu_is ("bdver2"));
+ break;
+ default:
+ break;
+ }
+}
+
+/* Check if the ISA features are identified. */
+static void
+check_features (unsigned int ecx, unsigned int edx,
+ int max_cpuid_level)
+{
+ if (edx & bit_CMOV)
+ assert (__builtin_cpu_supports ("cmov"));
+ if (edx & bit_MMX)
+ assert (__builtin_cpu_supports ("mmx"));
+ if (edx & bit_SSE)
+ assert (__builtin_cpu_supports ("sse"));
+ if (edx & bit_SSE2)
+ assert (__builtin_cpu_supports ("sse2"));
+ if (ecx & bit_POPCNT)
+ assert (__builtin_cpu_supports ("popcnt"));
+ if (ecx & bit_SSE3)
+ assert (__builtin_cpu_supports ("sse3"));
+ if (ecx & bit_SSSE3)
+ assert (__builtin_cpu_supports ("ssse3"));
+ if (ecx & bit_SSE4_1)
+ assert (__builtin_cpu_supports ("sse4.1"));
+ if (ecx & bit_SSE4_2)
+ assert (__builtin_cpu_supports ("sse4.2"));
+ if (ecx & bit_AVX)
+ assert (__builtin_cpu_supports ("avx"));
+
+ /* Get advanced features at level 7 (eax = 7, ecx = 0). */
+ if (max_cpuid_level >= 7)
+ {
+ unsigned int eax, ebx, ecx, edx;
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+ if (ebx & bit_AVX2)
+ assert (__builtin_cpu_supports ("avx2"));
+ }
+}
+
+static int __attribute__ ((noinline))
+__get_cpuid_output (unsigned int __level,
+ unsigned int *__eax, unsigned int *__ebx,
+ unsigned int *__ecx, unsigned int *__edx)
+{
+ return __get_cpuid (__level, __eax, __ebx, __ecx, __edx);
+}
+
+static int
+check_detailed ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ int max_level;
+ unsigned int vendor;
+ unsigned int model, family, brand_id;
+ unsigned int extended_model, extended_family;
+
+ /* Assume cpuid insn present. Run in level 0 to get vendor id. */
+ if (!__get_cpuid_output (0, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+ vendor = ebx;
+ max_level = eax;
+
+ if (max_level < 1)
+ return 0;
+
+ if (!__get_cpuid_output (1, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+ model = (eax >> 4) & 0x0f;
+ family = (eax >> 8) & 0x0f;
+ brand_id = ebx & 0xff;
+ extended_model = (eax >> 12) & 0xf0;
+ extended_family = (eax >> 20) & 0xff;
+
+ if (vendor == signature_INTEL_ebx)
+ {
+ assert (__builtin_cpu_is ("intel"));
+ /* Adjust family and model for Intel CPUs. */
+ if (family == 0x0f)
+ {
+ family += extended_family;
+ model += extended_model;
+ }
+ else if (family == 0x06)
+ model += extended_model;
+ check_intel_cpu_model (family, model, brand_id);
+ check_features (ecx, edx, max_level);
+ }
+ else if (vendor == signature_AMD_ebx)
+ {
+ assert (__builtin_cpu_is ("amd"));
+ /* Adjust model and family for AMD CPUS. */
+ if (family == 0x0f)
+ {
+ family += extended_family;
+ model += (extended_model << 4);
+ }
+ check_amd_cpu_model (family, model);
+ check_features (ecx, edx, max_level);
+ }
+
+ return 0;
+}
+
+static int
+quick_check ()
+{
+ /* Check CPU Features. */
+ assert (__builtin_cpu_supports ("cmov") >= 0);
+
+ assert (__builtin_cpu_supports ("mmx") >= 0);
+
+ assert (__builtin_cpu_supports ("popcnt") >= 0);
+
+ assert (__builtin_cpu_supports ("sse") >= 0);
+
+ assert (__builtin_cpu_supports ("sse2") >= 0);
+
+ assert (__builtin_cpu_supports ("sse3") >= 0);
+
+ assert (__builtin_cpu_supports ("ssse3") >= 0);
+
+ assert (__builtin_cpu_supports ("sse4.1") >= 0);
+
+ assert (__builtin_cpu_supports ("sse4.2") >= 0);
+
+ assert (__builtin_cpu_supports ("avx") >= 0);
+
+ assert (__builtin_cpu_supports ("avx2") >= 0);
+
+ /* Check CPU type. */
+ assert (__builtin_cpu_is ("amd") >= 0);
+
+ assert (__builtin_cpu_is ("intel") >= 0);
+
+ assert (__builtin_cpu_is ("atom") >= 0);
+
+ assert (__builtin_cpu_is ("core2") >= 0);
+
+ assert (__builtin_cpu_is ("corei7") >= 0);
+
+ assert (__builtin_cpu_is ("nehalem") >= 0);
+
+ assert (__builtin_cpu_is ("westmere") >= 0);
+
+ assert (__builtin_cpu_is ("sandybridge") >= 0);
+
+ assert (__builtin_cpu_is ("amdfam10h") >= 0);
+
+ assert (__builtin_cpu_is ("barcelona") >= 0);
+
+ assert (__builtin_cpu_is ("shanghai") >= 0);
+
+ assert (__builtin_cpu_is ("istanbul") >= 0);
+
+ assert (__builtin_cpu_is ("amdfam15h") >= 0);
+
+ assert (__builtin_cpu_is ("bdver1") >= 0);
+
+ assert (__builtin_cpu_is ("bdver2") >= 0);
+
+ return 0;
+}
+
+int main ()
+{
+ __builtin_cpu_init ();
+ quick_check ();
+ check_detailed ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/cleanup-1.c b/gcc/testsuite/gcc.target/i386/cleanup-1.c
index 1a47fcb031..fc82f35a0a 100644
--- a/gcc/testsuite/gcc.target/i386/cleanup-1.c
+++ b/gcc/testsuite/gcc.target/i386/cleanup-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-fexceptions -fnon-call-exceptions -fasynchronous-unwind-tables -O2" } */
/* Test complex CFA value expressions. */
diff --git a/gcc/testsuite/gcc.target/i386/clearcap.map b/gcc/testsuite/gcc.target/i386/clearcap.map
deleted file mode 100644
index 147f922d1e..0000000000
--- a/gcc/testsuite/gcc.target/i386/clearcap.map
+++ /dev/null
@@ -1,3 +0,0 @@
-# clear all hardware capabilities emitted by Sun as: the tests here
-# guard against execution at runtime
-hwcap_1 = V0x0 OVERRIDE;
diff --git a/gcc/testsuite/gcc.target/i386/clearcapv2.map b/gcc/testsuite/gcc.target/i386/clearcapv2.map
deleted file mode 100644
index 95cb14cc5d..0000000000
--- a/gcc/testsuite/gcc.target/i386/clearcapv2.map
+++ /dev/null
@@ -1,7 +0,0 @@
-# clear all hardware capabilities emitted by Sun as: the tests here
-# guard against execution at runtime
-# uses mapfile v2 syntax which is the only way to clear AT_SUN_CAP_HW2 flags
-$mapfile_version 2
-CAPABILITY {
- HW = ;
-};
diff --git a/gcc/testsuite/gcc.target/i386/cold-attribute-2.c b/gcc/testsuite/gcc.target/i386/cold-attribute-2.c
index 93ea906614..4b61b9d56d 100644
--- a/gcc/testsuite/gcc.target/i386/cold-attribute-2.c
+++ b/gcc/testsuite/gcc.target/i386/cold-attribute-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 --param=builtin-expect-probability=100" } */
#include <string.h>
t(int c)
{
diff --git a/gcc/testsuite/gcc.target/i386/excess-precision-1.c b/gcc/testsuite/gcc.target/i386/excess-precision-1.c
index bd825d628e..1bd3b8868b 100644
--- a/gcc/testsuite/gcc.target/i386/excess-precision-1.c
+++ b/gcc/testsuite/gcc.target/i386/excess-precision-1.c
@@ -38,12 +38,22 @@ test_add (void)
abort ();
if (f1 + f2 < fadd1)
abort ();
- if (d1 + d2 + d3 == dadd2)
- abort ();
- if (!(d1 + d2 + d3 > dadd2))
- abort ();
- if (!(d1 + d2 + d3 >= dadd2))
- abort ();
+ if (sizeof(long double) > sizeof(double)) {
+ if ( d1 + d2 + d3 == dadd2)
+ abort ();
+ if (!(d1 + d2 + d3 > dadd2))
+ abort ();
+ if (!(d1 + d2 + d3 >= dadd2))
+ abort ();
+ }
+ else {
+ if ( d1 + d2 + d3 != dadd2 )
+ abort();
+ if ( d1 + d2 + d3 < dadd2 )
+ abort();
+ if ( d1 + d2 + d3 > dadd2 )
+ abort();
+ }
}
volatile long double ldsub1 = 1.0l - 0x1.0p-30l;
@@ -90,10 +100,18 @@ test_mul (void)
abort ();
if ((0, dbl_min * dbl_min * dbl_min) != dbl_min3)
abort ();
- if (dbl_min * dbl_min * dbl_min == 0)
- abort ();
- if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 0) == 0)
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ if (dbl_min * dbl_min * dbl_min == 0)
+ abort ();
+ if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 0) == 0)
+ abort ();
+ }
+ else {
+ if (dbl_min * dbl_min * dbl_min != 0)
+ abort ();
+ if ((flt_min * flt_min ? dbl_min * dbl_min * dbl_min : 1) != 0)
+ abort ();
+ }
if ((flt_min * flt_min ? : 0) == 0)
abort ();
}
diff --git a/gcc/testsuite/gcc.target/i386/excess-precision-3.c b/gcc/testsuite/gcc.target/i386/excess-precision-3.c
index 3de61b4392..1fd038a870 100644
--- a/gcc/testsuite/gcc.target/i386/excess-precision-3.c
+++ b/gcc/testsuite/gcc.target/i386/excess-precision-3.c
@@ -15,6 +15,7 @@ volatile float f3 = 0x1.0p-60f;
volatile double d1 = 1.0;
volatile double d2 = 0x1.0p-30;
volatile double d3 = 0x1.0p-60;
+volatile double d3d = 0x1.0p-52;
volatile float fadd1 = 1.0f + 0x1.0p-30f;
volatile double dadd2 = 1.0 + 0x1.0p-30 + 0x1.0p-60;
volatile double dh = 0x1.0p-24;
@@ -35,9 +36,15 @@ test_assign (void)
if (d != dadd2)
abort ();
/* Verify rounding direct to float without double rounding. */
- f = d1 + dh + d3;
- if (f != fha)
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ f = d1 + dh + d3;
+ if (f != fha)
+ abort ();
+ } else {
+ f = d1 + dh + d3d;
+ if (f != fha)
+ abort ();
+ }
}
void
@@ -193,16 +200,28 @@ test_builtin (void)
abort ();
if (!__builtin_islessgreater (flt_min * flt_min, 0.0f))
abort ();
- if (!__builtin_isgreater (dbl_min * dbl_min, 0.0))
- abort ();
if (!__builtin_isgreaterequal (dbl_min * dbl_min, 0.0))
abort ();
- if (!__builtin_isless (0.0, dbl_min * dbl_min))
- abort ();
- if (__builtin_islessequal (dbl_min * dbl_min, 0.0))
- abort ();
- if (!__builtin_islessgreater (dbl_min * dbl_min, 0.0))
- abort ();
+ if (sizeof(long double) > sizeof(double) ) {
+ if (!__builtin_isgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (!__builtin_isless (0.0, dbl_min * dbl_min))
+ abort ();
+ if (__builtin_islessequal (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (!__builtin_islessgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ }
+ else {
+ if (__builtin_isgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (__builtin_isless (0.0, dbl_min * dbl_min))
+ abort ();
+ if (!__builtin_islessequal (dbl_min * dbl_min, 0.0))
+ abort ();
+ if (__builtin_islessgreater (dbl_min * dbl_min, 0.0))
+ abort ();
+ }
}
int
diff --git a/gcc/testsuite/gcc.target/i386/fma4-builtin.c b/gcc/testsuite/gcc.target/i386/fma4-builtin.c
index 7135cc9339..3e59a7181e 100644
--- a/gcc/testsuite/gcc.target/i386/fma4-builtin.c
+++ b/gcc/testsuite/gcc.target/i386/fma4-builtin.c
@@ -2,7 +2,7 @@
and add instructions FMA4 systems. */
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -mfma4" } */
+/* { dg-options "-O2 -mfma4 -mno-fma" } */
#ifndef __FP_FAST_FMAF
# error "__FP_FAST_FMAF should be defined"
diff --git a/gcc/testsuite/gcc.target/i386/fma4-fma-2.c b/gcc/testsuite/gcc.target/i386/fma4-fma-2.c
index c15be1edac..ae6ca8d6d7 100644
--- a/gcc/testsuite/gcc.target/i386/fma4-fma-2.c
+++ b/gcc/testsuite/gcc.target/i386/fma4-fma-2.c
@@ -3,7 +3,7 @@
vfnmsubss on FMA4 systems. */
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -funsafe-math-optimizations -mfma4" } */
+/* { dg-options "-O2 -funsafe-math-optimizations -mfma4 -mno-fma" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/fma4-fma.c b/gcc/testsuite/gcc.target/i386/fma4-fma.c
index 63b35dc4bc..1b8fb849dd 100644
--- a/gcc/testsuite/gcc.target/i386/fma4-fma.c
+++ b/gcc/testsuite/gcc.target/i386/fma4-fma.c
@@ -3,7 +3,7 @@
vfnmsubss on FMA4 systems. */
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -mfma4" } */
+/* { dg-options "-O2 -mfma4 -mno-fma" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/fma4-vector-2.c b/gcc/testsuite/gcc.target/i386/fma4-vector-2.c
index d8b0d0813b..b518aa8282 100644
--- a/gcc/testsuite/gcc.target/i386/fma4-vector-2.c
+++ b/gcc/testsuite/gcc.target/i386/fma4-vector-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -mfma4 -ftree-vectorize -mtune=generic" } */
+/* { dg-options "-O2 -mfma4 -ftree-vectorize -mtune=generic -mno-fma" } */
float r[256], s[256];
float x[256];
diff --git a/gcc/testsuite/gcc.target/i386/fma4-vector.c b/gcc/testsuite/gcc.target/i386/fma4-vector.c
index db5ffdd339..cd5506344b 100644
--- a/gcc/testsuite/gcc.target/i386/fma4-vector.c
+++ b/gcc/testsuite/gcc.target/i386/fma4-vector.c
@@ -2,7 +2,7 @@
instructions vector into vfmaddps on FMA4 systems. */
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -mfma4 -ftree-vectorize -mtune=generic" } */
+/* { dg-options "-O2 -mfma4 -ftree-vectorize -mtune=generic -mno-fma" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_3.c b/gcc/testsuite/gcc.target/i386/fma_double_3.c
index ac69684fee..3a04777c6b 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_3.c
@@ -8,11 +8,7 @@
#include "fma_3.h"
-/* { dg-final { scan-assembler-times "vfmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231sd" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[132\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[132\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[132\]+sd" 8 } } */
diff --git a/gcc/testsuite/gcc.target/i386/fma_double_5.c b/gcc/testsuite/gcc.target/i386/fma_double_5.c
index 3eca38c149..640b552b0f 100644
--- a/gcc/testsuite/gcc.target/i386/fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/fma_double_5.c
@@ -8,7 +8,7 @@
#include "fma_5.h"
-/* { dg-final { scan-assembler-times "vfmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[132\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[132\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[132\]+sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[132\]+sd" 8 } } */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_3.c b/gcc/testsuite/gcc.target/i386/fma_float_3.c
index afb88b6074..7986ce4ee7 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_3.c
@@ -8,11 +8,7 @@
#include "fma_3.h"
-/* { dg-final { scan-assembler-times "vfmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231ss" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[132\]+ss" 8 } } */
diff --git a/gcc/testsuite/gcc.target/i386/fma_float_5.c b/gcc/testsuite/gcc.target/i386/fma_float_5.c
index cb067ca4a9..2105ae627f 100644
--- a/gcc/testsuite/gcc.target/i386/fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/fma_float_5.c
@@ -8,7 +8,7 @@
#include "fma_5.h"
-/* { dg-final { scan-assembler-times "vfmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[132\]+ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[132\]+ss" 8 } } */
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-2.c b/gcc/testsuite/gcc.target/i386/funcspec-2.c
index 88c14b29b2..e535586f9b 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-2.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-2.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-3.c b/gcc/testsuite/gcc.target/i386/funcspec-3.c
index f3f4db76a8..bac79865d9 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-3.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-3.c
@@ -2,6 +2,7 @@
setting the architecture. */
/* { dg-do compile } */
/* { dg-require-effective-target lp64 } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mno-sse3" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-5.c b/gcc/testsuite/gcc.target/i386/funcspec-5.c
index df97a2d7bd..0acfe000da 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-5.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-5.c
@@ -17,7 +17,9 @@ extern void test_sse4 (void) __attribute__((__target__("sse4")));
extern void test_sse4_1 (void) __attribute__((__target__("sse4.1")));
extern void test_sse4_2 (void) __attribute__((__target__("sse4.2")));
extern void test_sse4a (void) __attribute__((__target__("sse4a")));
+extern void test_fma (void) __attribute__((__target__("fma")));
extern void test_fma4 (void) __attribute__((__target__("fma4")));
+extern void test_xop (void) __attribute__((__target__("xop")));
extern void test_ssse3 (void) __attribute__((__target__("ssse3")));
extern void test_tbm (void) __attribute__((__target__("tbm")));
extern void test_avx (void) __attribute__((__target__("avx")));
@@ -37,7 +39,9 @@ extern void test_no_sse4 (void) __attribute__((__target__("no-sse4")));
extern void test_no_sse4_1 (void) __attribute__((__target__("no-sse4.1")));
extern void test_no_sse4_2 (void) __attribute__((__target__("no-sse4.2")));
extern void test_no_sse4a (void) __attribute__((__target__("no-sse4a")));
+extern void test_no_fma (void) __attribute__((__target__("no-fma")));
extern void test_no_fma4 (void) __attribute__((__target__("no-fma4")));
+extern void test_no_xop (void) __attribute__((__target__("no-xop")));
extern void test_no_ssse3 (void) __attribute__((__target__("no-ssse3")));
extern void test_no_tbm (void) __attribute__((__target__("no-tbm")));
extern void test_no_avx (void) __attribute__((__target__("no-avx")));
@@ -63,6 +67,9 @@ extern void test_arch_pentium4m (void) __attribute__((__target__("arch=pentium4
extern void test_arch_prescott (void) __attribute__((__target__("arch=prescott")));
extern void test_arch_nocona (void) __attribute__((__target__("arch=nocona")));
extern void test_arch_core2 (void) __attribute__((__target__("arch=core2")));
+extern void test_arch_corei7 (void) __attribute__((__target__("arch=corei7")));
+extern void test_arch_corei7_avx (void) __attribute__((__target__("arch=corei7-avx")));
+extern void test_arch_core_avx2 (void) __attribute__((__target__("arch=core-avx2")));
extern void test_arch_geode (void) __attribute__((__target__("arch=geode")));
extern void test_arch_k6 (void) __attribute__((__target__("arch=k6")));
extern void test_arch_k6_2 (void) __attribute__((__target__("arch=k6-2")));
@@ -81,6 +88,9 @@ extern void test_arch_athlon64_sse3 (void) __attribute__((__target__("arch=athlo
extern void test_arch_athlon_fx (void) __attribute__((__target__("arch=athlon-fx")));
extern void test_arch_amdfam10 (void) __attribute__((__target__("arch=amdfam10")));
extern void test_arch_barcelona (void) __attribute__((__target__("arch=barcelona")));
+extern void test_arch_bdver1 (void) __attribute__((__target__("arch=bdver1")));
+extern void test_arch_bdver2 (void) __attribute__((__target__("arch=bdver2")));
+extern void test_arch_bdver3 (void) __attribute__((__target__("arch=bdver3")));
extern void test_arch_foo (void) __attribute__((__target__("arch=foo"))); /* { dg-error "bad value" } */
extern void test_tune_i386 (void) __attribute__((__target__("tune=i386")));
@@ -103,6 +113,9 @@ extern void test_tune_pentium4m (void) __attribute__((__target__("tune=pentium4
extern void test_tune_prescott (void) __attribute__((__target__("tune=prescott")));
extern void test_tune_nocona (void) __attribute__((__target__("tune=nocona")));
extern void test_tune_core2 (void) __attribute__((__target__("tune=core2")));
+extern void test_tune_corei7 (void) __attribute__((__target__("tune=corei7")));
+extern void test_tune_corei7_avx (void) __attribute__((__target__("tune=corei7-avx")));
+extern void test_tune_core_avx2 (void) __attribute__((__target__("tune=core-avx2")));
extern void test_tune_geode (void) __attribute__((__target__("tune=geode")));
extern void test_tune_k6 (void) __attribute__((__target__("tune=k6")));
extern void test_tune_k6_2 (void) __attribute__((__target__("tune=k6-2")));
@@ -121,6 +134,9 @@ extern void test_tune_athlon64_sse3 (void) __attribute__((__target__("tune=athlo
extern void test_tune_athlon_fx (void) __attribute__((__target__("tune=athlon-fx")));
extern void test_tune_amdfam10 (void) __attribute__((__target__("tune=amdfam10")));
extern void test_tune_barcelona (void) __attribute__((__target__("tune=barcelona")));
+extern void test_tune_bdver1 (void) __attribute__((__target__("tune=bdver1")));
+extern void test_tune_bdver2 (void) __attribute__((__target__("tune=bdver2")));
+extern void test_tune_bdver3 (void) __attribute__((__target__("tune=bdver3")));
extern void test_tune_generic (void) __attribute__((__target__("tune=generic")));
extern void test_tune_foo (void) __attribute__((__target__("tune=foo"))); /* { dg-error "bad value" } */
diff --git a/gcc/testsuite/gcc.target/i386/funcspec-9.c b/gcc/testsuite/gcc.target/i386/funcspec-9.c
index 78714e1241..14b7abd260 100644
--- a/gcc/testsuite/gcc.target/i386/funcspec-9.c
+++ b/gcc/testsuite/gcc.target/i386/funcspec-9.c
@@ -1,5 +1,6 @@
/* Test whether using target specific options, we can generate FMA4 code. */
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -march=k8 -mfpmath=sse -msse2" } */
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/i386/fxrstor-1.c b/gcc/testsuite/gcc.target/i386/fxrstor-1.c
new file mode 100644
index 0000000000..0e1ca191f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/fxrstor-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mfxsr -O2" } */
+/* { dg-final { scan-assembler "fxrstor\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+fxsave_test (void)
+{
+ char fxsave_region [512] __attribute__((aligned(16)));
+ _fxrstor (fxsave_region);
+}
diff --git a/gcc/testsuite/gcc.target/i386/fxrstor64-1.c b/gcc/testsuite/gcc.target/i386/fxrstor64-1.c
new file mode 100644
index 0000000000..fbdb1f6fef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/fxrstor64-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mfxsr -O2" } */
+/* { dg-final { scan-assembler "fxrstor64\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+fxsave_test (void)
+{
+ char fxsave_region [512] __attribute__((aligned(16)));
+ _fxrstor64 (fxsave_region);
+}
diff --git a/gcc/testsuite/gcc.target/i386/fxsave-1.c b/gcc/testsuite/gcc.target/i386/fxsave-1.c
new file mode 100644
index 0000000000..567af8d0e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/fxsave-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mfxsr -O2" } */
+/* { dg-final { scan-assembler "fxsave\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+fxsave_test (void)
+{
+ char fxsave_region [512] __attribute__((aligned(16)));
+ _fxsave (fxsave_region);
+}
diff --git a/gcc/testsuite/gcc.target/i386/fxsave64-1.c b/gcc/testsuite/gcc.target/i386/fxsave64-1.c
new file mode 100644
index 0000000000..317548ad67
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/fxsave64-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mfxsr -O2" } */
+/* { dg-final { scan-assembler "fxsave64\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+fxsave_test (void)
+{
+ char fxsave_region [512] __attribute__((aligned(16)));
+ _fxsave64 (fxsave_region);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c
new file mode 100644
index 0000000000..71230d52ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-add-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+add" } } */
+
+void
+hle_add (int *p, int v)
+{
+ __atomic_fetch_add (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c
new file mode 100644
index 0000000000..6b7cfc403e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-add-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+add" } } */
+
+void
+hle_add (int *p, int v)
+{
+ __atomic_fetch_add (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c
new file mode 100644
index 0000000000..078f89610f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-and-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+and" } } */
+
+void
+hle_and (int *p, int v)
+{
+ __atomic_fetch_and (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c
new file mode 100644
index 0000000000..c1025f36b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-and-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+and" } } */
+
+void
+hle_and (int *p, int v)
+{
+ __atomic_fetch_and (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-clear-rel.c b/gcc/testsuite/gcc.target/i386/hle-clear-rel.c
new file mode 100644
index 0000000000..137a820c87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-clear-rel.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+mov" } } */
+
+void
+hle_clear (char *p, int v)
+{
+ __atomic_clear (p, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c
new file mode 100644
index 0000000000..cea7c09ae4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-march=x86-64 -mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+cmpxchg" } } */
+
+int
+hle_cmpxchg (int *p, int oldv, int newv)
+{
+ return __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE, __ATOMIC_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c
new file mode 100644
index 0000000000..a2749e82ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-cmpxchg-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-march=x86-64 -mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+cmpxchg" } } */
+
+int
+hle_cmpxchg (int *p, int oldv, int newv)
+{
+ return __atomic_compare_exchange_n (p, &oldv, newv, 0, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE, __ATOMIC_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c
new file mode 100644
index 0000000000..8b28036bf1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-or-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+or" } } */
+
+void
+hle_or (int *p, int v)
+{
+ __atomic_or_fetch (p, 1, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c
new file mode 100644
index 0000000000..939697a856
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-or-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+or" } } */
+
+void
+hle_xor (int *p, int v)
+{
+ __atomic_fetch_or (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-store-rel.c b/gcc/testsuite/gcc.target/i386/hle-store-rel.c
new file mode 100644
index 0000000000..7295d33213
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-store-rel.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+mov" } } */
+
+void
+hle_store (int *p, int v)
+{
+ __atomic_store_n (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c
new file mode 100644
index 0000000000..02e94b361e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-sub-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+sub" } } */
+
+void
+hle_sub (int *p, int v)
+{
+ __atomic_fetch_sub (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c
new file mode 100644
index 0000000000..3a8c04e5d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-sub-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+sub" } } */
+
+void
+hle_sub (int *p, int v)
+{
+ __atomic_fetch_sub (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c
new file mode 100644
index 0000000000..4527fa9574
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xadd-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-march=x86-64 -mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xadd" } } */
+
+int
+hle_xadd (int *p, int v)
+{
+ return __atomic_fetch_add (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c
new file mode 100644
index 0000000000..dd514143f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xadd-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-march=x86-64 -mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xadd" } } */
+
+int
+hle_xadd (int *p, int v)
+{
+ return __atomic_fetch_add (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xchg-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-xchg-acq-1.c
new file mode 100644
index 0000000000..441c454700
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xchg-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xchg" } } */
+
+int
+hle_xchg (int *p, int v)
+{
+ return __atomic_exchange_n (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c
new file mode 100644
index 0000000000..a6bad3335d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xchg-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xchg" } } */
+
+int
+hle_xchg (int *p, int v)
+{
+ return __atomic_exchange_n (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c b/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c
new file mode 100644
index 0000000000..d381be92c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xor-acq-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xacquire\|\.byte\[ \t\]+0xf2\)\[ \t\n\]+xor" } } */
+
+void
+hle_xor (int *p, int v)
+{
+ __atomic_fetch_xor (p, v, __ATOMIC_ACQUIRE | __ATOMIC_HLE_ACQUIRE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c b/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c
new file mode 100644
index 0000000000..777bc0ac0e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/hle-xor-rel-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-mhle" } */
+/* { dg-final { scan-assembler "lock;?\[ \n\t\]+\(xrelease\|\.byte\[ \t\]+0xf3\)\[ \t\n\]+xor" } } */
+
+void
+hle_xor (int *p, int v)
+{
+ __atomic_fetch_xor (p, v, __ATOMIC_RELEASE | __ATOMIC_HLE_RELEASE);
+}
diff --git a/gcc/testsuite/gcc.target/i386/i386.exp b/gcc/testsuite/gcc.target/i386/i386.exp
index b8bbe1c74f..d9b36cd30d 100644
--- a/gcc/testsuite/gcc.target/i386/i386.exp
+++ b/gcc/testsuite/gcc.target/i386/i386.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2004, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,6 +23,7 @@ if { ![istarget i?86*-*-*] && ![istarget x86_64-*-*] } then {
# Load support procs.
load_lib gcc-dg.exp
+load_lib clearcap.exp
# Return 1 if attribute ms_hook_prologue is supported.
proc check_effective_target_ms_hook_prologue { } {
@@ -210,18 +210,6 @@ proc check_effective_target_lzcnt { } {
} "-mlzcnt" ]
}
-# Return 1 if avx2 instructions can be compiled.
-proc check_effective_target_avx2 { } {
- return [check_no_compiler_messages avx2 object {
- typedef long long __v4di __attribute__ ((__vector_size__ (32)));
- __v4di
- mm256_is32_andnotsi256 (__v4di __X, __v4di __Y)
- {
- return __builtin_ia32_andnotsi256 (__X, __Y);
- }
- } "-O0 -mavx2" ]
-}
-
# Return 1 if bmi instructions can be compiled.
proc check_effective_target_bmi { } {
return [check_no_compiler_messages bmi object {
@@ -243,37 +231,81 @@ proc check_effective_target_bmi2 { } {
} "-mbmi2" ]
}
-# If the linker used understands -M <mapfile>, pass it to clear hardware
-# capabilities set by the Sun assembler.
-# Try mapfile syntax v2 first which is the only way to clear hwcap_2 flags.
-set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcapv2.map"
-
-if ![check_no_compiler_messages mapfilev2 executable {
- int main (void) { return 0; }
-} $clearcap_ldflags ] {
- # If this doesn't work, fall back to the less capable v1 syntax.
- set clearcap_ldflags "-Wl,-M,$srcdir/$subdir/clearcap.map"
-
- if ![check_no_compiler_messages mapfile executable {
- int main (void) { return 0; }
- } $clearcap_ldflags ] {
- unset clearcap_ldflags
- }
+# Return 1 if ADX instructions can be compiled.
+proc check_effective_target_adx { } {
+ return [check_no_compiler_messages adx object {
+ unsigned char
+ _adxcarry_u32 (unsigned char __CF, unsigned int __X,
+ unsigned int __Y, unsigned int *__P)
+ {
+ return __builtin_ia32_addcarryx_u32 (__CF, __X, __Y, __P);
+ }
+ } "-madx" ]
}
-if [info exists clearcap_ldflags] {
- if { [info procs gcc_target_compile] != [list] \
- && [info procs saved_gcc_target_compile] == [list] } {
- rename gcc_target_compile saved_gcc_target_compile
+# Return 1 if rtm instructions can be compiled.
+proc check_effective_target_rtm { } {
+ return [check_no_compiler_messages rtm object {
+ void
+ _rtm_xend (void)
+ {
+ return __builtin_ia32_xend ();
+ }
+ } "-mrtm" ]
+}
- proc gcc_target_compile { source dest type options } {
- global clearcap_ldflags
- # Always pass -Wl,-M,<mapfile>, but don't let it show up in gcc.sum.
- lappend options "additional_flags=$clearcap_ldflags"
+# Return 1 if avx512f instructions can be compiled.
+proc check_effective_target_avx512f { } {
+ return [check_no_compiler_messages avx512f object {
+ typedef long long __v8di __attribute__ ((__vector_size__ (64)));
+ __v8di
+ mm512_and_epi64 (__v8di __X, __v8di __Y)
+ {
+ __v8di __W;
+ return __builtin_ia32_pandq512_mask (__X, __Y, __W, -1);
+ }
+ } "-mavx512f" ]
+}
- return [saved_gcc_target_compile $source $dest $type $options]
- }
- }
+# Return 1 if avx512cd instructions can be compiled.
+proc check_effective_target_avx512cd { } {
+ return [check_no_compiler_messages avx512cd_trans object {
+ typedef long long __v8di __attribute__ ((__vector_size__ (64)));
+ __v8di
+ _mm512_conflict_epi64 (__v8di __W, __v8di __A)
+ {
+ return (__v8di) __builtin_ia32_vpconflictdi_512_mask ((__v8di) __A,
+ (__v8di) __W,
+ -1);
+ }
+ } "-Wno-psabi -mavx512cd" ]
+}
+
+# Return 1 if avx512er instructions can be compiled.
+proc check_effective_target_avx512er { } {
+ return [check_no_compiler_messages avx512er_trans object {
+ typedef float __v16sf __attribute__ ((__vector_size__ (64)));
+ __v16sf
+ mm512_exp2a23_ps (__v16sf __X)
+ {
+ __v16sf __W;
+ return __builtin_ia32_exp2ps_mask (__X, __W, -1, 4);
+ }
+ } "-Wno-psabi -mavx512er" ]
+}
+
+# Return 1 if sha instructions can be compiled.
+proc check_effective_target_sha { } {
+ return [check_no_compiler_messages sha object {
+ typedef long long __m128i __attribute__ ((__vector_size__ (16)));
+ typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+ __m128i _mm_sha1msg1_epu32 (__m128i __X, __m128i __Y)
+ {
+ return (__m128i) __builtin_ia32_sha1msg1 ((__v4si)__X,
+ (__v4si)__Y);
+ }
+ } "-O2 -msha" ]
}
# If a testcase doesn't have special options, use these.
@@ -284,6 +316,7 @@ if ![info exists DEFAULT_CFLAGS] then {
# Initialize `dg'.
dg-init
+clearcap-init
# Special case compilation of vect-args.c so we don't have to
# replicate it 10 times.
@@ -303,4 +336,5 @@ set tests [prune $tests $srcdir/$subdir/vect-args.c]
dg-runtest $tests "" $DEFAULT_CFLAGS
# All done.
+clearcap-finish
dg-finish
diff --git a/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c b/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c
index c8caab5f1d..7d26f31c72 100644
--- a/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c
+++ b/gcc/testsuite/gcc.target/i386/ifcvt-onecmpl-abs-1.c
@@ -2,7 +2,7 @@
/* This test checks for if-conversion of one's complement
* abs function. */
/* { dg-options "-O -mtune=generic" } */
-/* { dg-final { scan-assembler "sar" } } */
+/* { dg-final { scan-assembler "cltd" } } */
/* { dg-final { scan-assembler "xor" } } */
/* Check code generation for one's complement version of abs */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-10.c b/gcc/testsuite/gcc.target/i386/incoming-10.c
index 1fb9ef4f0f..612fa72088 100644
--- a/gcc/testsuite/gcc.target/i386/incoming-10.c
+++ b/gcc/testsuite/gcc.target/i386/incoming-10.c
@@ -12,7 +12,7 @@ void f()
{
int i;
struct s s;
- for (i = 0; i < sizeof(s.x) / sizeof(*s.x); i++) s.x[i] = 0;
+ for (i = 0; i < sizeof(s.x) / sizeof(*s.x); i++) s.x[i] = 1;
g(&s);
}
diff --git a/gcc/testsuite/gcc.target/i386/incoming-11.c b/gcc/testsuite/gcc.target/i386/incoming-11.c
index a7b7db53aa..a830c96f7d 100644
--- a/gcc/testsuite/gcc.target/i386/incoming-11.c
+++ b/gcc/testsuite/gcc.target/i386/incoming-11.c
@@ -10,9 +10,9 @@ int q[100];
void f()
{
int i;
- for (i = 0; i < 100; i++) p[i] = 0;
+ for (i = 0; i < 100; i++) p[i] = 1;
g();
- for (i = 0; i < 100; i++) q[i] = 0;
+ for (i = 0; i < 100; i++) q[i] = 1;
}
/* { dg-final { scan-assembler "andl\[\\t \]*\\$-16,\[\\t \]*%esp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/incoming-5.c b/gcc/testsuite/gcc.target/i386/incoming-5.c
index 9bbecdb95e..f68eefcb90 100644
--- a/gcc/testsuite/gcc.target/i386/incoming-5.c
+++ b/gcc/testsuite/gcc.target/i386/incoming-5.c
@@ -1,6 +1,6 @@
/* PR middle-end/37009 */
/* { dg-do compile { target { { ! *-*-darwin* } && ia32 } } } */
-/* { dg-options "-m32 -mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
+/* { dg-options "-mincoming-stack-boundary=2 -mpreferred-stack-boundary=2" } */
extern void bar (double *);
diff --git a/gcc/testsuite/gcc.target/i386/inline-mcpy.c b/gcc/testsuite/gcc.target/i386/inline-mcpy.c
index 7eacb5f982..c31be050ef 100644
--- a/gcc/testsuite/gcc.target/i386/inline-mcpy.c
+++ b/gcc/testsuite/gcc.target/i386/inline-mcpy.c
@@ -1,7 +1,7 @@
/* Test if we inline memcpy even with -Os, when the user requested it. */
/* Don't name this test with memcpy in its name, otherwise the scan-assembler
would be confused. */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-Os -minline-all-stringops" } */
/* { dg-final { scan-assembler-not "memcpy" } } */
char f(int i)
diff --git a/gcc/testsuite/gcc.target/i386/inline_error.c b/gcc/testsuite/gcc.target/i386/inline_error.c
new file mode 100644
index 0000000000..da1cea10ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/inline_error.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -mno-popcnt" } */
+
+inline int __attribute__ ((__gnu_inline__, __always_inline__, target("popcnt")))
+foo () /* { dg-error "inlining failed in call to always_inline .* target specific option mismatch" } */
+{
+ return 0;
+}
+
+int bar()
+{
+ return foo (); /* { dg-error "called from here" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_1.c b/gcc/testsuite/gcc.target/i386/intrinsics_1.c
new file mode 100644
index 0000000000..802979f3b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_1.c
@@ -0,0 +1,13 @@
+/* Test case to check if intrinsics and function specific target
+ optimizations work together. Check by including x86intrin.h */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse -mno-sse4.1 -mno-sse4.2" } */
+
+#include <x86intrin.h>
+
+__attribute__((target("sse4.2")))
+__m128i foo(__m128i *V)
+{
+ return _mm_stream_load_si128(V);
+}
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_2.c b/gcc/testsuite/gcc.target/i386/intrinsics_2.c
new file mode 100644
index 0000000000..329ac8864c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_2.c
@@ -0,0 +1,13 @@
+/* Test case to check if intrinsics and function specific target
+ optimizations work together. Check by including immintrin.h */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse -mno-sse4.1" } */
+
+#include <immintrin.h>
+
+__attribute__((target("sse4.2")))
+__m128i foo(__m128i *V)
+{
+ return _mm_stream_load_si128(V);
+}
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_3.c b/gcc/testsuite/gcc.target/i386/intrinsics_3.c
new file mode 100644
index 0000000000..e5ea8a967e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_3.c
@@ -0,0 +1,15 @@
+/* Test case to check if intrinsics and function specific target
+ optimizations work together. Check if the POPCNT specific intrinsics
+ in included with popcntintrin.h get enabled by directly including
+ popcntintrin.h */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse -mno-sse4.1 -mno-sse4.2 -mno-popcnt" } */
+
+#include <popcntintrin.h>
+
+__attribute__((target("popcnt")))
+long long foo(unsigned long long X)
+{
+ return _mm_popcnt_u64 (X);
+}
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_4.c b/gcc/testsuite/gcc.target/i386/intrinsics_4.c
new file mode 100644
index 0000000000..e7c074b31c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_4.c
@@ -0,0 +1,21 @@
+/* Test case to check if AVX intrinsics and function specific target
+ optimizations work together. Check by including immintrin.h */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse -mno-avx" } */
+
+#include <immintrin.h>
+
+__m256 a[10], b[10], c[10];
+void __attribute__((target ("avx")))
+foo (void)
+{
+ a[0] = _mm256_and_ps (b[0], c[0]);
+}
+
+/* Try again with a combination of target and optimization attributes. */
+void __attribute__((target ("avx"), optimize(3)))
+bar (void)
+{
+ a[0] = _mm256_and_ps (b[0], c[0]);
+}
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_5.c b/gcc/testsuite/gcc.target/i386/intrinsics_5.c
new file mode 100644
index 0000000000..e4486b17ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_5.c
@@ -0,0 +1,16 @@
+/* Test case to check if intrinsics and function specific target
+ optimizations work together. Check if an error is issued in
+ -O2 mode when foo calls an intrinsic without the right target
+ attribute. */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse -mno-sse4.1 -mno-sse4.2" } */
+
+#include <smmintrin.h>
+
+__m128i foo(__m128i *V)
+{
+ return _mm_stream_load_si128(V); /* { dg-error "called from here" } */
+}
+
+/* { dg-prune-output ".*inlining failed.*" } */
diff --git a/gcc/testsuite/gcc.target/i386/intrinsics_6.c b/gcc/testsuite/gcc.target/i386/intrinsics_6.c
new file mode 100644
index 0000000000..eea22bb795
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/intrinsics_6.c
@@ -0,0 +1,16 @@
+/* Test case to check if intrinsics and function specific target
+ optimizations work together. Check if an error is issued in
+ -O0 mode when foo calls an intrinsic without the right target
+ attribute. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0 -msse -mno-sse4.1 -mno-sse4.2" } */
+
+#include <smmintrin.h>
+
+__m128i foo(__m128i *V)
+{
+ return _mm_stream_load_si128(V); /* { dg-error "called from here" } */
+}
+
+/* { dg-prune-output ".*inlining failed.*" } */
diff --git a/gcc/testsuite/gcc.target/i386/isa-1.c b/gcc/testsuite/gcc.target/i386/isa-1.c
index d98c14ffb1..3a4406fc0e 100644
--- a/gcc/testsuite/gcc.target/i386/isa-1.c
+++ b/gcc/testsuite/gcc.target/i386/isa-1.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=x86-64" } } */
/* { dg-options "-march=x86-64 -msse4" } */
extern void abort (void);
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
index 3451227b2c..94e512b960 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_1.c
@@ -1,26 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_1.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub213sd" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
index e69bd7fe3d..ffceab48f4 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_2.c
@@ -1,18 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_2.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
index 00ed16dad2..cdb4d33bee 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_3.c
@@ -1,26 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_3.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231pd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd213sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub213sd" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
index dbab6430c2..dda487e980 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_4.c
@@ -1,18 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_4.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
index 210d5670c6..98909aeeb8 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_5.c
@@ -1,18 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_5.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
index 68164818fb..538065a310 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_double_6.c
@@ -1,18 +1,19 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
-#define TYPE double
+typedef double adouble __attribute__((aligned(sizeof (double))));
+#define TYPE adouble
#include "l_fma_6.h"
-/* { dg-final { scan-assembler-times "vfmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132pd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132sd" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132sd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+pd" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+sd" 56 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+sd" 56 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
index c98ba1169f..ff109817d5 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,19 +8,11 @@
#include "l_fma_1.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub213ss" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
index 1dafed94e0..38c6b52830 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,11 +8,11 @@
#include "l_fma_2.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
index dbea8fe271..177ba35226 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,19 +8,11 @@
#include "l_fma_3.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub231ps" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmadd213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfmsub213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmadd213ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 4 } } */
-/* { dg-final { scan-assembler-times "vfnmsub213ss" 4 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
index 5ff5dcb6da..8ee68d1af1 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,11 +8,11 @@
#include "l_fma_4.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
index d83ebcc094..23288d0da8 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,11 +8,11 @@
#include "l_fma_5.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
index 942ed7d9e3..07a5fbae31 100644
--- a/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
+++ b/gcc/testsuite/gcc.target/i386/l_fma_float_6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic" } */
+/* { dg-options "-O3 -Wno-attributes -mfpmath=sse -mfma -mtune=generic -mno-fma4" } */
/* Test that the compiler properly optimizes floating point multiply
and add instructions into FMA3 instructions. */
@@ -8,11 +8,11 @@
#include "l_fma_6.h"
-/* { dg-final { scan-assembler-times "vfmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ps" 8 } } */
-/* { dg-final { scan-assembler-times "vfmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfmsub132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmadd132ss" 8 } } */
-/* { dg-final { scan-assembler-times "vfnmsub132ss" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ps" 8 } } */
+/* { dg-final { scan-assembler-times "vfmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfmsub\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmadd\[123\]+ss" 120 } } */
+/* { dg-final { scan-assembler-times "vfnmsub\[123\]+ss" 120 } } */
diff --git a/gcc/testsuite/gcc.target/i386/large-frame.c b/gcc/testsuite/gcc.target/i386/large-frame.c
new file mode 100644
index 0000000000..2b6df1f6db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/large-frame.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-final { scan-assembler "-429496" } } */
+extern void dump (int *buf, int a);
+
+void func (int a)
+{
+ int bigbuf[1 << 30];
+ dump (bigbuf, a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-1.c b/gcc/testsuite/gcc.target/i386/long-double-128-1.c
new file mode 100644
index 0000000000..cbd9bb5ecd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-128" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-2.c b/gcc/testsuite/gcc.target/i386/long-double-128-2.c
new file mode 100644
index 0000000000..9aef4bf0c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-options "-O2 -mbionic" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-3.c b/gcc/testsuite/gcc.target/i386/long-double-128-3.c
new file mode 100644
index 0000000000..86b9b12e20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-options "-O2 -mandroid" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-4.c b/gcc/testsuite/gcc.target/i386/long-double-128-4.c
new file mode 100644
index 0000000000..af7363581d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-options "-O2 -mlong-double-128 -mbionic" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-5.c b/gcc/testsuite/gcc.target/i386/long-double-128-5.c
new file mode 100644
index 0000000000..fb32c5b7e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-5.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && { ! ia32 } } } } */
+/* { dg-options "-O2 -mlong-double-128 -mandroid" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-6.c b/gcc/testsuite/gcc.target/i386/long-double-128-6.c
new file mode 100644
index 0000000000..2797516201
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-6.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64 -mlong-double-128" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-7.c b/gcc/testsuite/gcc.target/i386/long-double-128-7.c
new file mode 100644
index 0000000000..eaa7f63020
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-7.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64" } */
+
+__float128
+foo (__float128 x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-8.c b/gcc/testsuite/gcc.target/i386/long-double-128-8.c
new file mode 100644
index 0000000000..d869efc437
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-8.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -mlong-double-64 -mfpmath=387" } */
+
+int
+main ()
+{
+ __float128 a = -0.23456789;
+ if ((double) a >= 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/long-double-128-9.c b/gcc/testsuite/gcc.target/i386/long-double-128-9.c
new file mode 100644
index 0000000000..bc90f21771
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-128-9.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -mlong-double-64 -mfpmath=sse -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+#include "sse2-check.h"
+
+static void
+sse2_test (void)
+{
+ __float128 a = -0.23456789;
+ if ((double) a >= 0)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-1.c b/gcc/testsuite/gcc.target/i386/long-double-64-1.c
new file mode 100644
index 0000000000..f5c83a5858
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-2.c b/gcc/testsuite/gcc.target/i386/long-double-64-2.c
new file mode 100644
index 0000000000..13a7be08b0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && ia32 } } } */
+/* { dg-options "-O2 -mbionic" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-3.c b/gcc/testsuite/gcc.target/i386/long-double-64-3.c
new file mode 100644
index 0000000000..99d3d5ffc7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && ia32 } } } */
+/* { dg-options "-O2 -mandroid" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-4.c b/gcc/testsuite/gcc.target/i386/long-double-64-4.c
new file mode 100644
index 0000000000..471f0bf72d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-80 -mlong-double-64" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-5.c b/gcc/testsuite/gcc.target/i386/long-double-64-5.c
new file mode 100644
index 0000000000..f634425eb5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-5.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-128 -mlong-double-64" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-6.c b/gcc/testsuite/gcc.target/i386/long-double-64-6.c
new file mode 100644
index 0000000000..76b030d0c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-6.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-80 -mlong-double-128 -mlong-double-64" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-7.c b/gcc/testsuite/gcc.target/i386/long-double-64-7.c
new file mode 100644
index 0000000000..9f66d37e0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-7.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-128 -mlong-double-80 -mlong-double-64" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-8.c b/gcc/testsuite/gcc.target/i386/long-double-64-8.c
new file mode 100644
index 0000000000..fd2fdbc10d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-8.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -mlong-double-64 -mbionic" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-64-9.c b/gcc/testsuite/gcc.target/i386/long-double-64-9.c
new file mode 100644
index 0000000000..595dba358d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-64-9.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -mlong-double-64 -mandroid" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler-not "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-1.c b/gcc/testsuite/gcc.target/i386/long-double-80-1.c
new file mode 100644
index 0000000000..887bd6c9f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-80" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-10.c b/gcc/testsuite/gcc.target/i386/long-double-80-10.c
new file mode 100644
index 0000000000..311ae4f405
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-10.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-128 -mlong-double-64 -mlong-double-80" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-2.c b/gcc/testsuite/gcc.target/i386/long-double-80-2.c
new file mode 100644
index 0000000000..7ca0643940
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -mlong-double-80 -mbionic" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-3.c b/gcc/testsuite/gcc.target/i386/long-double-80-3.c
new file mode 100644
index 0000000000..39dc8a450d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target *-*-linux* } } */
+/* { dg-options "-O2 -mlong-double-80 -mandroid" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-4.c b/gcc/testsuite/gcc.target/i386/long-double-80-4.c
new file mode 100644
index 0000000000..4ee21b662a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64 -mlong-double-80" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-5.c b/gcc/testsuite/gcc.target/i386/long-double-80-5.c
new file mode 100644
index 0000000000..78a16037e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-5.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64" } */
+
+__float80
+foo (__float80 x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-6.c b/gcc/testsuite/gcc.target/i386/long-double-80-6.c
new file mode 100644
index 0000000000..a395a26594
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-6.c
@@ -0,0 +1,11 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -mlong-double-64 -mfpmath=387" } */
+
+int
+main ()
+{
+ __float80 a = -0.23456789;
+ if ((double) a >= 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-7.c b/gcc/testsuite/gcc.target/i386/long-double-80-7.c
new file mode 100644
index 0000000000..e6f9cbebef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-7.c
@@ -0,0 +1,13 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -mlong-double-64 -mfpmath=sse -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+#include "sse2-check.h"
+
+static void
+sse2_test (void)
+{
+ __float80 a = -0.23456789;
+ if ((double) a >= 0)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-8.c b/gcc/testsuite/gcc.target/i386/long-double-80-8.c
new file mode 100644
index 0000000000..b82305ffb6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-8.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-128 -mlong-double-80" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/long-double-80-9.c b/gcc/testsuite/gcc.target/i386/long-double-80-9.c
new file mode 100644
index 0000000000..91ff9d10ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/long-double-80-9.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mlong-double-64 -mlong-double-128 -mlong-double-80" } */
+
+long double
+foo (long double x)
+{
+ return x * x;
+}
+
+/* { dg-final { scan-assembler "fldt" } } */
+/* { dg-final { scan-assembler-not "call\[\\t \]*_?__multf3" } } */
diff --git a/gcc/testsuite/gcc.target/i386/m128-check.h b/gcc/testsuite/gcc.target/i386/m128-check.h
index 4e2deecb17..98dc269983 100644
--- a/gcc/testsuite/gcc.target/i386/m128-check.h
+++ b/gcc/testsuite/gcc.target/i386/m128-check.h
@@ -113,6 +113,8 @@ checkV##ARRAY (const TYPE *v, const TYPE *e, int n) \
return err; \
}
+CHECK_ARRAY(c, char, "0x%hhx")
+CHECK_ARRAY(s, short, "0x%hx")
CHECK_ARRAY(i, int, "0x%x")
CHECK_ARRAY(l, long long, "0x%llx")
@@ -164,3 +166,26 @@ union ieee754_double
} bits __attribute__((packed));
};
#endif
+
+#define CHECK_FP_EXP(UINON_TYPE, VALUE_TYPE, ESP, FMT) \
+static int \
+__attribute__((noinline, unused)) \
+check_fp_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v) \
+{ \
+ int i; \
+ int err = 0; \
+ \
+ for (i = 0; i < ARRAY_SIZE (u.a); i++) \
+ if (u.a[i] > (v[i] + (ESP)) || u.a[i] < (v[i] - (ESP))) \
+ { \
+ err++; \
+ PRINTF ("%i: " FMT " != " FMT "\n", \
+ i, v[i], u.a[i]); \
+ } \
+ return err; \
+}
+
+CHECK_FP_EXP (union128, float, ESP_FLOAT, "%f")
+#ifdef __SSE2__
+CHECK_FP_EXP (union128d, double, ESP_DOUBLE, "%f")
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/m512-check.h b/gcc/testsuite/gcc.target/i386/m512-check.h
new file mode 100644
index 0000000000..375b15ade7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/m512-check.h
@@ -0,0 +1,83 @@
+#include <immintrin.h>
+#include "m256-check.h"
+
+typedef union
+{
+ __m512i x;
+ char a[64];
+} union512i_b;
+
+typedef union
+{
+ __m512i x;
+ short a[32];
+} union512i_w;
+
+typedef union
+{
+ __m512i x;
+ int a[16];
+} union512i_d;
+
+typedef union
+{
+ __m512i x;
+ long long a[8];
+} union512i_q;
+
+typedef union
+{
+ __m512 x;
+ float a[16];
+} union512;
+
+typedef union
+{
+ __m512d x;
+ double a[8];
+} union512d;
+
+CHECK_EXP (union512i_b, char, "%d")
+CHECK_EXP (union512i_w, short, "%d")
+CHECK_EXP (union512i_d, int, "0x%x")
+CHECK_EXP (union512i_q, long long, "0x%llx")
+CHECK_EXP (union512, float, "%f")
+CHECK_EXP (union512d, double, "%f")
+
+CHECK_FP_EXP (union512, float, ESP_FLOAT, "%f")
+CHECK_FP_EXP (union512d, double, ESP_DOUBLE, "%f")
+
+#define CHECK_ROUGH_EXP(UINON_TYPE, VALUE_TYPE, FMT) \
+static int \
+__attribute__((noinline, unused)) \
+check_rough_##UINON_TYPE (UINON_TYPE u, const VALUE_TYPE *v, \
+ VALUE_TYPE eps) \
+{ \
+ int i; \
+ int err = 0; \
+ \
+ for (i = 0; i < ARRAY_SIZE (u.a); i++) \
+ { \
+ /* We can have have v[i] == 0 == u.a[i] for some i, \
+ when we test zero-masking. */ \
+ if (v[i] == 0.0 && u.a[i] == 0.0) \
+ continue; \
+ if (v[i] == 0.0 && u.a[i] != 0.0) \
+ { \
+ err++; \
+ PRINTF ("%i: " FMT " != " FMT "\n", \
+ i, v[i], u.a[i]); \
+ } \
+ VALUE_TYPE rel_err = (u.a[i] - v[i]) / v[i]; \
+ if (((rel_err < 0) ? -rel_err : rel_err) > eps) \
+ { \
+ err++; \
+ PRINTF ("%i: " FMT " != " FMT "\n", \
+ i, v[i], u.a[i]); \
+ } \
+ } \
+ return err; \
+}
+
+CHECK_ROUGH_EXP (union512, float, "%f")
+CHECK_ROUGH_EXP (union512d, double, "%f")
diff --git a/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
index 2b1d63de17..112fb33add 100644
--- a/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
+++ b/gcc/testsuite/gcc.target/i386/math-torture/math-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-1.c b/gcc/testsuite/gcc.target/i386/memcpy-1.c
index bc6f95ab6b..b716c5d958 100644
--- a/gcc/testsuite/gcc.target/i386/memcpy-1.c
+++ b/gcc/testsuite/gcc.target/i386/memcpy-1.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
-/* { dg-options "-O2 -march=pentiumpro -minline-all-stringops" } */
+/* { dg-options "-O2 -march=pentiumpro -minline-all-stringops -fno-common" } */
/* { dg-final { scan-assembler "rep" } } */
/* { dg-final { scan-assembler "movs" } } */
/* { dg-final { scan-assembler-not "test" } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-2.c b/gcc/testsuite/gcc.target/i386/memcpy-2.c
new file mode 100644
index 0000000000..56cdd56fae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+void *a;
+void *b;
+t(unsigned int c)
+{
+ if (c<10)
+ __builtin_memcpy (a,b,c+1);
+}
+/* Memcpy should be inlined because block size is known. */
+/* { dg-final { scan-assembler-not "(jmp|call)\[\\t \]*memcpy" } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-3.c b/gcc/testsuite/gcc.target/i386/memcpy-3.c
new file mode 100644
index 0000000000..b9ea9c28e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+void *a;
+void *b;
+t(int c)
+{
+ if (c<10)
+ __builtin_memcpy (a,b,c);
+}
+/* Memcpy should be inlined because block size is known. */
+/* { dg-final { scan-assembler-not "(jmp|call)\[\\t \]*memcpy" } } */
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
new file mode 100644
index 0000000000..3117771d43
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:-1:align" } */
+/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
+
+char a[2048];
+char b[2048];
+void t (void)
+{
+ __builtin_memcpy (a, b, 2048);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
new file mode 100644
index 0000000000..303edca950
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:3000:align,libcall:-1:align" } */
+/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
+
+char a[2048];
+char b[2048];
+void t (void)
+{
+ __builtin_memcpy (a, b, 2048);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c b/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c
new file mode 100644
index 0000000000..ddd1ef7c0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-strategy-3.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=atom -mmemcpy-strategy=vector_loop:2000:align,libcall:-1:align" } */
+/* { dg-final { scan-assembler-times "memcpy" 2 } } */
+
+char a[2048];
+char b[2048];
+void t (void)
+{
+ __builtin_memcpy (a, b, 2048);
+}
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
new file mode 100644
index 0000000000..1ea682a106
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
+/* { dg-final { scan-assembler-times "movdqa" 8 { target { ! { ia32 } } } } } */
+/* { dg-final { scan-assembler-times "movdqa" 4 { target { ia32 } } } } */
+
+char a[2048];
+char b[2048];
+void t (void)
+{
+ __builtin_memcpy (a, b, 2048);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
new file mode 100644
index 0000000000..3befef95d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memcpy-vector_loop-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
+/* { dg-final { scan-assembler-times "movdqa" 4} } */
+
+char *a;
+char *b;
+void t (void)
+{
+ __builtin_memcpy (a, b, 2048);
+}
+
+
diff --git a/gcc/testsuite/gcc.target/i386/memset-strategy-1.c b/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
new file mode 100644
index 0000000000..d1b97c5df1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memset-strategy-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=atom -mmemset-strategy=libcall:-1:align" } */
+/* { dg-final { scan-assembler-times "memset" 2 } } */
+
+char a[2048];
+void t (void)
+{
+ __builtin_memset (a, 1, 2048);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
new file mode 100644
index 0000000000..f7e45165c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
+/* { dg-final { scan-assembler-times "movdqa" 4 } } */
+
+char a[2048];
+void t (void)
+{
+ __builtin_memset (a, 0, 2048);
+}
+
+
diff --git a/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
new file mode 100644
index 0000000000..92e6100042
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/memset-vector_loop-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=atom" } } */
+/* { dg-options "-O2 -march=atom -minline-all-stringops -mstringop-strategy=vector_loop" } */
+/* { dg-final { scan-assembler-times "movdqa" 4} } */
+
+char *a;
+void t (void)
+{
+ __builtin_memset (a, 0, 2048);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/merge-1.c b/gcc/testsuite/gcc.target/i386/merge-1.c
new file mode 100644
index 0000000000..d525685109
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/merge-1.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -msse2" } */
+
+#include <x86intrin.h>
+
+void
+f (double *r, __m128d x, __m128d y, __m128d z)
+{
+ __m128d t=_mm_move_sd(x,y);
+ __m128d u=_mm_move_sd(t,z);
+ *r = u[0];
+}
+
+__m128d
+g(__m128d x, __m128d y, __m128d z)
+{
+ __m128d t=_mm_move_sd(x,y);
+ __m128d u=_mm_move_sd(t,z);
+ return u;
+}
+
+/* { dg-final { scan-assembler-times "movsd" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/mmx-1.c b/gcc/testsuite/gcc.target/i386/mmx-1.c
index 0b31a531a4..e304acaa3f 100644
--- a/gcc/testsuite/gcc.target/i386/mmx-1.c
+++ b/gcc/testsuite/gcc.target/i386/mmx-1.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-do compile { target { nonpic } } } */
/* { dg-options "-O2 -Werror-implicit-function-declaration -mmmx" } */
/* Test that the intrinsics compile with optimization. All of them are
diff --git a/gcc/testsuite/gcc.target/i386/movabs-1.c b/gcc/testsuite/gcc.target/i386/movabs-1.c
new file mode 100644
index 0000000000..75ef8d2a6c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/movabs-1.c
@@ -0,0 +1,10 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -masm=intel" } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target masm_intel } */
+
+void
+foo (void)
+{
+ *(volatile long*)0xFFFF800000000000 = -1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/movti.c b/gcc/testsuite/gcc.target/i386/movti.c
index e306c1e3f0..86a0279faa 100644
--- a/gcc/testsuite/gcc.target/i386/movti.c
+++ b/gcc/testsuite/gcc.target/i386/movti.c
@@ -7,4 +7,4 @@ _Decimal128 test (void)
return 1234123412341234.123412341234dl;
}
-/* { dg-final { scan-assembler-not "movabs" } } */
+/* { dg-final { scan-assembler-not "movabs" { target { ! x86_64-*-mingw* } } } } */
diff --git a/gcc/testsuite/gcc.target/i386/nest-1.c b/gcc/testsuite/gcc.target/i386/nest-1.c
new file mode 100644
index 0000000000..ba75350fb0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/nest-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target llp64 } } */
+/* { dg-options "" } */
+
+void foo (int i)
+{
+ void nested (void)
+ {
+ char arr[(1U << 31) + 4U];
+ arr[i] = 0;
+ }
+
+ nested ();
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pad-10.c b/gcc/testsuite/gcc.target/i386/pad-10.c
index d721c64a5c..cd65041fd5 100644
--- a/gcc/testsuite/gcc.target/i386/pad-10.c
+++ b/gcc/testsuite/gcc.target/i386/pad-10.c
@@ -15,5 +15,5 @@ foo2 (int z, int x)
return z;
}
else
- return x + z;
+ return x - z;
}
diff --git a/gcc/testsuite/gcc.target/i386/perm-concat.c b/gcc/testsuite/gcc.target/i386/perm-concat.c
new file mode 100644
index 0000000000..10955c2073
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/perm-concat.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -mfpmath=sse" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (16)));
+
+v2df
+f (double d)
+{
+ v2df x = {-d, d};
+ return __builtin_ia32_vpermilpd (x, 1);
+}
+
+/* { dg-final { scan-assembler-not "\tvpermilpd\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr19398.c b/gcc/testsuite/gcc.target/i386/pr19398.c
new file mode 100644
index 0000000000..60931c0a0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr19398.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-Os -msse -mno-sse3 -mfpmath=387" } */
+
+int test (float a)
+{
+ return (a * a);
+}
+
+/* { dg-final { scan-assembler-not "cvttss2si\[^\\n\]*%xmm" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr20020-1.c b/gcc/testsuite/gcc.target/i386/pr20020-1.c
new file mode 100644
index 0000000000..f36a8a0953
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr20020-1.c
@@ -0,0 +1,27 @@
+/* Check that 128-bit struct's are represented as TImode values. */
+/* { dg-do compile { target int128 } } */
+/* { dg-skip-if "different ABI" { x86_64-*-mingw* } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+struct shared_ptr_struct
+{
+ unsigned long long phase:48;
+ unsigned short thread:16;
+ union
+ {
+ void *addr;
+ unsigned long long pad;
+ };
+};
+typedef struct shared_ptr_struct sptr_t;
+
+sptr_t S;
+
+sptr_t
+sptr_result (void)
+{
+ return S;
+}
+/* { dg-final { scan-rtl-dump "\\\(set \\\(reg:TI \[0-9\]* \\\[ <retval> \\\]\\\)" "expand" } } */
+/* { dg-final { scan-rtl-dump "\\\(set \\\(reg/i:TI 0 ax\\\)" "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr20020-2.c b/gcc/testsuite/gcc.target/i386/pr20020-2.c
new file mode 100644
index 0000000000..fa5b6edaf8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr20020-2.c
@@ -0,0 +1,25 @@
+/* Check that 128-bit struct's are represented as TImode values. */
+/* { dg-do compile { target int128 } } */
+/* { dg-skip-if "different ABI" { x86_64-*-mingw* } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+struct shared_ptr_struct
+{
+ unsigned long long phase:48;
+ unsigned short thread:16;
+ union
+ {
+ void *addr;
+ unsigned long long pad;
+ };
+};
+typedef struct shared_ptr_struct sptr_t;
+
+void
+copy_sptr (sptr_t *dest, sptr_t src)
+{
+ *dest = src;
+}
+
+/* { dg-final { scan-rtl-dump "\\\(set \\\(reg:TI \[0-9\]*" "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr20020-3.c b/gcc/testsuite/gcc.target/i386/pr20020-3.c
new file mode 100644
index 0000000000..a30fbc4b11
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr20020-3.c
@@ -0,0 +1,28 @@
+/* Check that 128-bit struct's are represented as TImode values. */
+/* { dg-do compile { target int128 } } */
+/* { dg-skip-if "different ABI" { x86_64-*-mingw* } } */
+/* { dg-options "-O2 -fdump-rtl-expand" } */
+
+struct shared_ptr_struct
+{
+ unsigned long long phase:48;
+ unsigned short thread:16;
+ union
+ {
+ void *addr;
+ unsigned long long pad;
+ };
+};
+typedef struct shared_ptr_struct sptr_t;
+
+sptr_t sptr_1, sptr_2;
+
+void
+copy_sptr (void)
+{
+ sptr_1 = sptr_2;
+}
+
+/* { dg-final { scan-rtl-dump "\\\(set \\\(reg:TI \[0-9\]*" "expand" } } */
+/* { dg-final { scan-rtl-dump "\\\(set \\\(mem/c:TI" "expand" } } */
+/* { dg-final { cleanup-rtl-dump "expand" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr22076.c b/gcc/testsuite/gcc.target/i386/pr22076.c
index c1da4e9aa0..38b40a26b5 100644
--- a/gcc/testsuite/gcc.target/i386/pr22076.c
+++ b/gcc/testsuite/gcc.target/i386/pr22076.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx" } */
-/* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx -mno-vect8-ret-in-mem" { target i?86-*-solaris2.[89] *-*-vxworks* } } */
+/* { dg-options "-O2 -fomit-frame-pointer -flax-vector-conversions -mmmx -mno-vect8-ret-in-mem" { target i?86-*-solaris2.9 *-*-vxworks* } } */
#include <mmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr22152.c b/gcc/testsuite/gcc.target/i386/pr22152.c
index 6d24432cfb..b20a22a4c9 100644
--- a/gcc/testsuite/gcc.target/i386/pr22152.c
+++ b/gcc/testsuite/gcc.target/i386/pr22152.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -msse2" } */
-/* { dg-options "-O2 -msse2 -mno-vect8-ret-in-mem" { target i?86-*-solaris2.[89] *-*-vxworks* } } */
+/* { dg-options "-O2 -msse2 -mtune=core2" } */
+/* { dg-additional-options "-mno-vect8-ret-in-mem" { target i?86-*-solaris2.9 *-*-vxworks* } } */
/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */
#include <mmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/pr23943.c b/gcc/testsuite/gcc.target/i386/pr23943.c
index 9e14036ec7..d70e5a6b2a 100644
--- a/gcc/testsuite/gcc.target/i386/pr23943.c
+++ b/gcc/testsuite/gcc.target/i386/pr23943.c
@@ -4,7 +4,7 @@
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fPIC" } */
-typedef long unsigned int size_t;
+__extension__ typedef __SIZE_TYPE__ size_t;
extern size_t strlen (__const char *__s)
__attribute__ ((__nothrow__)) __attribute__ ((__pure__)) __attribute__ ((__nonnull__ (1)));
diff --git a/gcc/testsuite/gcc.target/i386/pr27971.c b/gcc/testsuite/gcc.target/i386/pr27971.c
index 27888de6d2..149bf2b8e5 100644
--- a/gcc/testsuite/gcc.target/i386/pr27971.c
+++ b/gcc/testsuite/gcc.target/i386/pr27971.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-O2 -mno-tbm" } */
unsigned array[4];
diff --git a/gcc/testsuite/gcc.target/i386/pr28946.c b/gcc/testsuite/gcc.target/i386/pr28946.c
index bdc2fd15f7..3272079772 100644
--- a/gcc/testsuite/gcc.target/i386/pr28946.c
+++ b/gcc/testsuite/gcc.target/i386/pr28946.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-Os" } */
+/* { dg-options "-Os -fno-ident" } */
/* { dg-final { scan-assembler-not "test" } } */
int fct1 (void);
diff --git a/gcc/testsuite/gcc.target/i386/pr30315.c b/gcc/testsuite/gcc.target/i386/pr30315.c
index 998d5071e5..557b4f7517 100644
--- a/gcc/testsuite/gcc.target/i386/pr30315.c
+++ b/gcc/testsuite/gcc.target/i386/pr30315.c
@@ -1,6 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-times "cmp" 4 } } */
+/* { dg-final { scan-assembler-not "cmp" } } */
extern void abort (void);
int c;
@@ -34,39 +34,10 @@ void pluscconly##t##C (T a, T b) \
}
#define PLUSCCONLY(T, t) PLUSCCONLY1(T, t, a) PLUSCCONLY1(T, t, b)
-#define MINUSCC(T, t) \
-T minuscc##t (T a, T b) \
-{ \
- T difference = a - b; \
- if (difference > a) \
- abort (); \
- return difference; \
-}
-
-#define DECCC(T, t) \
-T deccc##t (T a, T b) \
-{ \
- T difference = a - b; \
- if (difference > a) \
- c --; \
- return difference; \
-}
-
-#define MINUSCCONLY(T, t) \
-void minuscconly##t (T a, T b) \
-{ \
- T difference = a - b; \
- if (difference > a) \
- abort (); \
-}
-
#define TEST(T, t) \
PLUSCC(T, t) \
PLUSCCONLY(T, t) \
- INCCC(T, t) \
- MINUSCC(T, t) \
- MINUSCCONLY(T, t) \
- DECCC(T, t)
+ INCCC(T, t)
TEST (unsigned long, l)
TEST (unsigned int, i)
@@ -84,14 +55,3 @@ unsigned long pluscczext##C (unsigned int a, unsigned int b) \
PLUSCCZEXT(a)
PLUSCCZEXT(b)
-
-#define MINUSCCZEXT \
-unsigned long minuscczext (unsigned int a, unsigned int b) \
-{ \
- unsigned int difference = a - b; \
- if (difference > a) \
- abort (); \
- return difference; \
-}
-
-MINUSCCZEXT
diff --git a/gcc/testsuite/gcc.target/i386/pr30970.c b/gcc/testsuite/gcc.target/i386/pr30970.c
index 96d64e5a96..b1fc2d3ecf 100644
--- a/gcc/testsuite/gcc.target/i386/pr30970.c
+++ b/gcc/testsuite/gcc.target/i386/pr30970.c
@@ -1,5 +1,5 @@
/* { dg-do compile }
-/* { dg-options "-msse2 -O2 -ftree-vectorize" } */
+/* { dg-options "-msse2 -O2 -ftree-vectorize -mtune=generic" } */
#define N 256
int b[N];
diff --git a/gcc/testsuite/gcc.target/i386/pr32268.c b/gcc/testsuite/gcc.target/i386/pr32268.c
index a5d673ad94..66ed506194 100644
--- a/gcc/testsuite/gcc.target/i386/pr32268.c
+++ b/gcc/testsuite/gcc.target/i386/pr32268.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2" } */
extern void abort(void);
diff --git a/gcc/testsuite/gcc.target/i386/pr33329.c b/gcc/testsuite/gcc.target/i386/pr33329.c
index bb589ee278..5aae9aa7de 100644
--- a/gcc/testsuite/gcc.target/i386/pr33329.c
+++ b/gcc/testsuite/gcc.target/i386/pr33329.c
@@ -5,13 +5,13 @@ extern void g (int *);
void f (void)
{
- int tabs[8], tabcount;
+ int tabs[1024], tabcount;
for (tabcount = 1; tabcount <= 8; tabcount += 7)
{
int i;
- for (i = 0; i < 8; i++)
- tabs[i] = i * 2;
+ for (i = 0; i < 1024; i++)
+ tabs[i] = i * 12345;
g (tabs);
}
}
diff --git a/gcc/testsuite/gcc.target/i386/pr34283.c b/gcc/testsuite/gcc.target/i386/pr34283.c
new file mode 100644
index 0000000000..60e11a5097
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr34283.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse4" } */
+
+typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
+typedef long long __v2di __attribute__ ((__vector_size__ (16)));
+
+__m128i _mm_set_epi64x (long long __q1, long long __q0)
+{
+ return __extension__ (__m128i)(__v2di){ __q0, __q1 };
+}
+
+/* { dg-final { scan-assembler-not "movdqa" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr36578-1.c b/gcc/testsuite/gcc.target/i386/pr36578-1.c
index 49999351f0..5ede23a11a 100644
--- a/gcc/testsuite/gcc.target/i386/pr36578-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr36578-1.c
@@ -2,6 +2,7 @@
/* { dg-do run } */
/* { dg-options "-msse2 -mfpmath=sse" } */
/* { dg-require-effective-target sse2 } */
+/* { dg-require-effective-target large_long_double } */
#include "sse2-check.h"
diff --git a/gcc/testsuite/gcc.target/i386/pr36578-2.c b/gcc/testsuite/gcc.target/i386/pr36578-2.c
index 5d6556f557..bfde2cb0ff 100644
--- a/gcc/testsuite/gcc.target/i386/pr36578-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr36578-2.c
@@ -11,13 +11,18 @@ extern int printf(const char *, ...);
volatile double d1 = 0x1.000001p0;
volatile double d2 = 0x1p-54;
+volatile double d2d = 0x1p-52;
volatile float f = 0x1.000002p0f;
volatile float f2;
static void
sse2_test (void)
{
- f2 = (float)((long double)d1 + (long double)d2);
+ if (sizeof(long double) > sizeof(double) ) {
+ f2 = (float)((long double)d1 + (long double)d2);
+ } else {
+ f2 = (float)((long double)d1 + (long double)d2d);
+ }
if (f != f2)
abort ();
exit (0);
diff --git a/gcc/testsuite/gcc.target/i386/pr36613.c b/gcc/testsuite/gcc.target/i386/pr36613.c
index e9d7d11ced..358e1cd725 100644
--- a/gcc/testsuite/gcc.target/i386/pr36613.c
+++ b/gcc/testsuite/gcc.target/i386/pr36613.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target { { i?86-*-linux* x86_64-*-linux* } && ilp32 } } } */
+/* { dg-do run { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ilp32 } } } */
/* { dg-options "-Os" } */
/* PR target/36613 */
diff --git a/gcc/testsuite/gcc.target/i386/pr38988.c b/gcc/testsuite/gcc.target/i386/pr38988.c
index 8e2c8eaa67..8449cc69cf 100644
--- a/gcc/testsuite/gcc.target/i386/pr38988.c
+++ b/gcc/testsuite/gcc.target/i386/pr38988.c
@@ -3,7 +3,7 @@
/* { dg-require-effective-target fpic } */
/* { dg-options "-O2 -fpic -mcmodel=large" } */
-typedef long unsigned int size_t;
+__extension__ typedef __SIZE_TYPE__ size_t;
typedef void (*func_ptr) (void);
static func_ptr __DTOR_LIST__[1] = { (func_ptr) (-1) };
diff --git a/gcc/testsuite/gcc.target/i386/pr39013-1.c b/gcc/testsuite/gcc.target/i386/pr39013-1.c
index 25f02fcdba..1bfab88b7f 100644
--- a/gcc/testsuite/gcc.target/i386/pr39013-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr39013-1.c
@@ -1,5 +1,5 @@
/* PR target/39013 */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fpie -std=gnu89" } */
inline int foo (void);
diff --git a/gcc/testsuite/gcc.target/i386/pr39013-2.c b/gcc/testsuite/gcc.target/i386/pr39013-2.c
index 615d54900f..a85ce76e4c 100644
--- a/gcc/testsuite/gcc.target/i386/pr39013-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr39013-2.c
@@ -1,5 +1,5 @@
/* PR target/39013 */
-/* { dg-do compile { target *-*-linux* } } */
+/* { dg-do compile { target *-*-linux* *-*-gnu* } } */
/* { dg-options "-O2 -fpie -std=gnu99" } */
inline int foo (void); /* { dg-warning "declared but never defined" } */
diff --git a/gcc/testsuite/gcc.target/i386/pr39082-1.c b/gcc/testsuite/gcc.target/i386/pr39082-1.c
index 1d8be2a7d9..36d566dc16 100644
--- a/gcc/testsuite/gcc.target/i386/pr39082-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr39082-1.c
@@ -13,7 +13,7 @@ extern int bar1 (union un);
extern union un bar2 (int);
int
-foo1 (union un u)
+foo1 (union un u) /* { dg-message "note: the ABI of passing union with long double has changed in GCC 4.4" } */
{
bar1 (u);
return u.i;
@@ -30,6 +30,6 @@ foo2 (void)
int
foo3 (int x)
{
- union un u = bar2 (x); /* { dg-message "note: the ABI of passing union with long double has changed in GCC 4.4" } */
+ union un u = bar2 (x);
return u.i;
}
diff --git a/gcc/testsuite/gcc.target/i386/pr39162.c b/gcc/testsuite/gcc.target/i386/pr39162.c
index c549106adb..efb46deae7 100644
--- a/gcc/testsuite/gcc.target/i386/pr39162.c
+++ b/gcc/testsuite/gcc.target/i386/pr39162.c
@@ -1,11 +1,14 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Wno-psabi -msse2 -mno-avx" } */
+/* { dg-prune-output "ABI for passing parameters" } */
+/* { dg-options "-O2 -msse2 -mno-avx" } */
/* { dg-additional-options "-mabi=sysv" { target x86_64-*-mingw* } } */
typedef long long __m256i __attribute__ ((__vector_size__ (32), __may_alias__));
-__m256i
+extern __m256i y;
+
+void
bar (__m256i x) /* { dg-warning "AVX" "" } */
{
- return x;
+ y = x;
}
diff --git a/gcc/testsuite/gcc.target/i386/pr39496.c b/gcc/testsuite/gcc.target/i386/pr39496.c
index e14c87513c..6efc0b8bb6 100644
--- a/gcc/testsuite/gcc.target/i386/pr39496.c
+++ b/gcc/testsuite/gcc.target/i386/pr39496.c
@@ -1,5 +1,5 @@
/* PR target/39496 */
-/* { dg-do compile { target { { i?86-*-linux* x86_64-*-linux* } && ia32 } } } */
+/* { dg-do compile { target { { i?86-*-linux* i?86-*-gnu* x86_64-*-linux* } && ia32 } } } */
/* { dg-options "-O0 -fverbose-asm -fno-omit-frame-pointer -mtune=i686 -msse2 -mfpmath=sse" } */
/* Verify that {foo,bar}{,2}param are all passed on the stack, using
normal calling conventions, when not optimizing. */
diff --git a/gcc/testsuite/gcc.target/i386/pr40906-3.c b/gcc/testsuite/gcc.target/i386/pr40906-3.c
index ac7d183b71..13be303cd2 100644
--- a/gcc/testsuite/gcc.target/i386/pr40906-3.c
+++ b/gcc/testsuite/gcc.target/i386/pr40906-3.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target *-*-linux* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* } } */
/* { dg-require-effective-target ia32 } */
/* { dg-require-effective-target sse2 } */
/* { dg-options "-O2 -fomit-frame-pointer -fno-asynchronous-unwind-tables -msse2 -mpush-args -mno-accumulate-outgoing-args" } */
diff --git a/gcc/testsuite/gcc.target/i386/pr42542-4a.c b/gcc/testsuite/gcc.target/i386/pr42542-4a.c
index bea6c1f504..19e872a7e7 100644
--- a/gcc/testsuite/gcc.target/i386/pr42542-4a.c
+++ b/gcc/testsuite/gcc.target/i386/pr42542-4a.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O1 -msse4.2 -ftree-vectorize" } */
+/* { dg-options "-O1 -msse4.2 -ftree-vectorize -mno-avx" } */
#include "pr42542-4.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr43546.c b/gcc/testsuite/gcc.target/i386/pr43546.c
new file mode 100644
index 0000000000..53cb3a07fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr43546.c
@@ -0,0 +1,12 @@
+/* PR target/43546 */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-additional-options "-mpreferred-stack-boundary=2 -msseregparm -msse" { target ia32 } } */
+
+extern void bar (double);
+
+void
+foo (void)
+{
+ bar (1.0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr44578.c b/gcc/testsuite/gcc.target/i386/pr44578.c
new file mode 100644
index 0000000000..20f76c31c4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr44578.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -mtune=athlon64" } */
+
+extern void abort (void);
+
+long double
+__attribute__((noinline, noclone))
+test (float num)
+{
+ unsigned int i;
+
+ if (num < 0.0)
+ num = 0.0;
+
+ __builtin_memcpy (&i, &num, sizeof(unsigned int));
+
+ return (long double)(unsigned long long) i;
+}
+
+int
+main ()
+{
+ long double x;
+
+ x = test (0.0);
+
+ if (x != 0.0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr45830.c b/gcc/testsuite/gcc.target/i386/pr45830.c
index a74d434546..85d5a3c5ab 100644
--- a/gcc/testsuite/gcc.target/i386/pr45830.c
+++ b/gcc/testsuite/gcc.target/i386/pr45830.c
@@ -26,6 +26,6 @@ foo (int *a)
}
}
-/* { dg-final { scan-tree-dump "Expanding as bit test is preferable" "switchconv" } } */
+/* { dg-final { scan-tree-dump "expanding as bit test is preferable" "switchconv" } } */
/* { dg-final { scan-assembler-not "CSWTCH" } } */
/* { dg-final { cleanup-tree-dump "switchconv" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr46084.c b/gcc/testsuite/gcc.target/i386/pr46084.c
index 3ca22eb292..30bac08cc9 100644
--- a/gcc/testsuite/gcc.target/i386/pr46084.c
+++ b/gcc/testsuite/gcc.target/i386/pr46084.c
@@ -1,6 +1,6 @@
/* This test needs to use setrlimit to set the stack size, so it can
only run on Unix. */
-/* { dg-do run { target *-*-linux* *-*-solaris* *-*-darwin* } } */
+/* { dg-do run { target *-*-linux* *-*-gnu* *-*-solaris* *-*-darwin* } } */
/* { dg-require-effective-target avx_runtime } */
/* { dg-require-effective-target split_stack } */
/* { dg-options "-fsplit-stack -O2 -mavx" } */
diff --git a/gcc/testsuite/gcc.target/i386/pr46295.c b/gcc/testsuite/gcc.target/i386/pr46295.c
index b7fccb7fb3..4ac7c101ab 100644
--- a/gcc/testsuite/gcc.target/i386/pr46295.c
+++ b/gcc/testsuite/gcc.target/i386/pr46295.c
@@ -9,7 +9,7 @@ void Parse_Vector ()
EXPRESS Express;
int Terms;
for (Terms = 0; Terms < 5; Terms++)
- Express[Terms] = 0.0;
+ Express[Terms] = 1.0;
Parse_Rel_Factor(Express,&Terms);
}
diff --git a/gcc/testsuite/gcc.target/i386/pr46716.c b/gcc/testsuite/gcc.target/i386/pr46716.c
new file mode 100644
index 0000000000..29c5e1e492
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr46716.c
@@ -0,0 +1,33 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msse -mno-sse2" } */
+/* { dg-require-effective-target sse } */
+
+#include "sse-check.h"
+
+typedef double V __attribute__ ((__vector_size__ (16), __may_alias__));
+typedef union
+{
+ V x;
+ double a[2];
+} u;
+
+#define EMM_FLT8(a) ((double *)&(a))
+
+void __attribute__ ((noinline))
+test (V s1, V s2)
+{
+ if (EMM_FLT8(s1)[0] != EMM_FLT8(s2)[0]
+ || EMM_FLT8(s1)[1] != EMM_FLT8(s2)[1])
+ abort ();
+}
+
+static void
+sse_test (void)
+{
+ u s1;
+
+ s1.a[0] = 1.0;
+ s1.a[1] = 2.0;
+
+ test (s1.x, s1.x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr46829.c b/gcc/testsuite/gcc.target/i386/pr46829.c
new file mode 100644
index 0000000000..d4c04d30fc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr46829.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fschedule-insns" } */
+
+struct S
+{
+ int i, j;
+};
+
+extern struct S s[];
+
+extern void bar (int, ...);
+
+void
+foo (int n)
+{
+ while (s[n].i)
+ bar (0, n, s[n].j, s, s[n].i / s[n].j);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr46843.c b/gcc/testsuite/gcc.target/i386/pr46843.c
new file mode 100644
index 0000000000..3b0d76d134
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr46843.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fschedule-insns" } */
+
+void foo (double *d1, double *u1, double *u2, double *d2, int s, int j, int i)
+{
+ int n = 1 << s;
+ double x = 0;
+
+ for (; j < n; j++)
+ x += d1[j] * d2[i];
+ d1[i] = x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr47735.c b/gcc/testsuite/gcc.target/i386/pr47735.c
new file mode 100644
index 0000000000..0d44df4d5c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr47735.c
@@ -0,0 +1,16 @@
+/* PR middle-end/47735 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+
+unsigned
+mulh (unsigned a, unsigned b)
+{
+ unsigned long long l __attribute__ ((aligned (32)))
+ = ((unsigned long long) a * (unsigned long long) b) >> 32;
+ return l;
+}
+
+/* No need to dynamically realign the stack here. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*%\[re\]sp" } } */
+/* Nor use a frame pointer. */
+/* { dg-final { scan-assembler-not "%\[re\]bp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr49002-2.c b/gcc/testsuite/gcc.target/i386/pr49002-2.c
index b0e10091b5..dfb83b4a75 100644
--- a/gcc/testsuite/gcc.target/i386/pr49002-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr49002-2.c
@@ -11,4 +11,5 @@ void foo(const __m128d from, __m256d *to)
/* Ensure we store ymm, not xmm. */
/* { dg-final { scan-assembler-not "vmovapd\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
-/* { dg-final { scan-assembler "vmovapd\[\t \]*%ymm\[0-9\]\+,\[^,\]*" } } */
+/* { dg-final { scan-assembler-not "vmovaps\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
+/* { dg-final { scan-assembler "vmovap\[sd\]\[\t \]*%ymm\[0-9\]\+,\[^,\]*" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr49168-1.c b/gcc/testsuite/gcc.target/i386/pr49168-1.c
index 9676dc85a8..4ca5e34d9c 100644
--- a/gcc/testsuite/gcc.target/i386/pr49168-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr49168-1.c
@@ -2,7 +2,8 @@
/* { dg-do compile } */
/* { dg-options "-O2 -msse2 -mtune=generic" } */
/* { dg-final { scan-assembler-not "movdqa\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
-/* { dg-final { scan-assembler "movdqu\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
+/* { dg-final { scan-assembler-not "movaps\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
+/* { dg-final { scan-assembler "movups\[\t \]*%xmm\[0-9\]\+,\[^,\]*" } } */
void
flt128_va (void *mem, __float128 d)
diff --git a/gcc/testsuite/gcc.target/i386/pr49715-2.c b/gcc/testsuite/gcc.target/i386/pr49715-2.c
index 3fc8e4e8df..76d713790b 100644
--- a/gcc/testsuite/gcc.target/i386/pr49715-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr49715-2.c
@@ -1,5 +1,4 @@
-/* { dg-do compile } */
-/* { dg-require-effective-target lp64 } */
+/* { dg-do compile { target { ! ia32 } } } */
/* { dg-options "-O2" } */
double func(unsigned long long x)
diff --git a/gcc/testsuite/gcc.target/i386/pr50725.c b/gcc/testsuite/gcc.target/i386/pr50725.c
index ef74ecb021..c9ca7d9475 100644
--- a/gcc/testsuite/gcc.target/i386/pr50725.c
+++ b/gcc/testsuite/gcc.target/i386/pr50725.c
@@ -39,7 +39,7 @@ main ()
if (bar (22) != 24 || bar (20) != 128)
abort ();
#ifdef __x86_64__
- register long r10 __asm__ ("r10") = 0xdeadbeefdeadbeefUL;
+ register long long r10 __asm__ ("r10") = 0xdeadbeefdeadbeefULL;
asm volatile ("" : "+r" (r10));
#endif
if (baz (0, 0, 0, 0, 0, 0, 22) != 24 || baz (0, 0, 0, 0, 0, 0, 20) != 128)
diff --git a/gcc/testsuite/gcc.target/i386/pr52146.c b/gcc/testsuite/gcc.target/i386/pr52146.c
index a4804e6779..4eb91c06dd 100644
--- a/gcc/testsuite/gcc.target/i386/pr52146.c
+++ b/gcc/testsuite/gcc.target/i386/pr52146.c
@@ -15,4 +15,4 @@ test2 (void)
*apic_tpr_addr = 0;
}
-/* { dg-final { scan-assembler-not "-18874240" } } */
+/* { dg-final { scan-assembler-not "\[,\\t \]+-18874240" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr52698.c b/gcc/testsuite/gcc.target/i386/pr52698.c
new file mode 100644
index 0000000000..d84685cb3b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52698.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
+
+extern void abort (void);
+static __thread unsigned char foo [32]
+__attribute__ ((tls_model ("initial-exec"), aligned (sizeof (void *))));
+
+void
+test2 (void)
+{
+ unsigned int s;
+ for (s = 0; s < sizeof (foo); ++s)
+ {
+ if (foo [s] != s)
+ abort ();
+ foo [s] = sizeof (foo) - s;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr52857-1.c b/gcc/testsuite/gcc.target/i386/pr52857-1.c
new file mode 100644
index 0000000000..16fd78f96f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52857-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-g -O -mx32 -maddress-mode=long" } */
+
+extern void get_BID128 (int *);
+void
+__bid128_div (void)
+{
+ int res;
+ get_BID128 (&res);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr52857-2.c b/gcc/testsuite/gcc.target/i386/pr52857-2.c
new file mode 100644
index 0000000000..879240a75e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52857-2.c
@@ -0,0 +1,8 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-g -O -mx32 -maddress-mode=long" } */
+
+void uw_init_context_1 (void *);
+void _Unwind_ForcedUnwind (void)
+{
+ uw_init_context_1 (__builtin_dwarf_cfa ());
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr52876.c b/gcc/testsuite/gcc.target/i386/pr52876.c
new file mode 100644
index 0000000000..6d5e47a94d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52876.c
@@ -0,0 +1,25 @@
+/* { dg-do run { target { x32 } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
+
+extern void abort (void);
+
+long long li;
+
+long long
+__attribute__ ((noinline))
+testfunc (void* addr)
+{
+ li = (long long)(int)addr;
+ li &= 0xffffffff;
+ return li;
+}
+
+int main (void)
+{
+ volatile long long rv_test;
+ rv_test = testfunc((void*)0x87651234);
+ if (rv_test != 0x87651234ULL)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr52882.c b/gcc/testsuite/gcc.target/i386/pr52882.c
new file mode 100644
index 0000000000..5f0f12a72b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52882.c
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+struct S1 {
+ int f0;
+ int f1;
+};
+
+int fn1 ();
+void fn2 (struct S1);
+
+void
+fn3 () {
+ struct S1 a = { 1, 0 };
+ if (fn1 ())
+ fn2 (a);
+ for (; a.f1;) {
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr52883.c b/gcc/testsuite/gcc.target/i386/pr52883.c
new file mode 100644
index 0000000000..766e87ee16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr52883.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+int a, b, d, e, f, i, j, k, l, m;
+unsigned c;
+int g[] = { }, h[0];
+
+int
+fn1 () {
+ return 0;
+}
+
+void
+fn2 () {
+ c = 0;
+ e = 0;
+ for (;; e = 0)
+ if (f > j) {
+ k = fn1 ();
+ l = (d || k) * b;
+ m = l * a;
+ h[0] = m <= i;
+ } else
+ i = g[c];
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53249.c b/gcc/testsuite/gcc.target/i386/pr53249.c
new file mode 100644
index 0000000000..c41d3e9ede
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53249.c
@@ -0,0 +1,26 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -ftls-model=initial-exec -maddress-mode=short" } */
+
+struct gomp_task
+{
+ struct gomp_task *parent;
+};
+
+struct gomp_thread
+{
+ int foo1;
+ struct gomp_task *task;
+};
+
+extern __thread struct gomp_thread gomp_tls_data;
+
+void
+__attribute__ ((noinline))
+gomp_end_task (void)
+{
+ struct gomp_thread *thr = &gomp_tls_data;
+ struct gomp_task *task = thr->task;
+
+ thr->task = task->parent;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53315.c b/gcc/testsuite/gcc.target/i386/pr53315.c
new file mode 100644
index 0000000000..350efa7246
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53315.c
@@ -0,0 +1,27 @@
+/* PR target/53315 and PR target/53291 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mrtm" } */
+/* { dg-require-effective-target rtm } */
+
+#include <x86intrin.h>
+#include "rtm-check.h"
+
+static void
+rtm_test (void)
+{
+ int flag = -1;
+ unsigned status;
+
+ if ((status = _xbegin ()) == _XBEGIN_STARTED)
+ {
+ flag = _xtest ();
+ _xend ();
+ }
+ else
+ return;
+
+ if (flag != 1)
+ abort ();
+ if (_xtest () != 0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53397-1.c b/gcc/testsuite/gcc.target/i386/pr53397-1.c
new file mode 100644
index 0000000000..63650366ca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53397-1.c
@@ -0,0 +1,28 @@
+/* Prefetching when the step is loop invariant. */
+/* { dg-do compile } */
+/* { dg-require-effective-target sse2 } */
+/* { dg-options "-O3 -msse2 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
+
+
+double data[16384];
+void prefetch_when_non_constant_step_is_invariant(int step, int n)
+{
+ int a;
+ int b;
+ for (a = 1; a < step; a++) {
+ for (b = 0; b < n; b += 2 * step) {
+
+ int i = 2*(b + a);
+ int j = 2*(b + a + step);
+
+
+ data[j] = data[i];
+ data[j+1] = data[i+1];
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump "Issued prefetch" "aprefetch" } } */
+/* { dg-final { scan-assembler "prefetcht0" } } */
+
+/* { dg-final { cleanup-tree-dump "aprefetch" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr53397-2.c b/gcc/testsuite/gcc.target/i386/pr53397-2.c
new file mode 100644
index 0000000000..b34fafc525
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53397-2.c
@@ -0,0 +1,28 @@
+/* Not prefetching when the step is loop variant. */
+/* { dg-do compile } */
+/* { dg-require-effective-target sse2 } */
+/* { dg-options "-O3 -msse2 -fprefetch-loop-arrays -fdump-tree-aprefetch-details --param min-insn-to-prefetch-ratio=3 --param simultaneous-prefetches=10 -fdump-tree-aprefetch-details" } */
+
+double data[16384];
+void donot_prefetch_when_non_constant_step_is_variant(int step, int n)
+{
+ int a;
+ int b;
+ for (a = 1; a < step; a++,step*=2) {
+ for (b = 0; b < n; b += 2 * step) {
+
+ int i = 2*(b + a);
+ int j = 2*(b + a + step);
+
+
+ data[j] = data[i];
+ data[j+1] = data[i+1];
+ }
+ }
+}
+
+/* { dg-final { scan-tree-dump "Not prefetching" "aprefetch" } } */
+/* { dg-final { scan-tree-dump "loop variant step" "aprefetch" } } */
+
+/* { dg-final { cleanup-tree-dump "aprefetch" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr53425-1.c b/gcc/testsuite/gcc.target/i386/pr53425-1.c
new file mode 100644
index 0000000000..00143f32ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53425-1.c
@@ -0,0 +1,15 @@
+/* PR target/53425 */
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mno-sse" } */
+/* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+
+typedef double __v2df __attribute__ ((__vector_size__ (16)));
+
+extern __v2df x;
+
+extern void bar (__v2df);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: SSE vector argument without SSE enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53425-2.c b/gcc/testsuite/gcc.target/i386/pr53425-2.c
new file mode 100644
index 0000000000..97523f35bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53425-2.c
@@ -0,0 +1,15 @@
+/* PR target/53425 */
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mno-sse" } */
+/* { dg-skip-if "no SSE vector" { x86_64-*-mingw* } } */
+
+typedef float __v2sf __attribute__ ((__vector_size__ (8)));
+
+extern __v2sf x;
+
+extern void bar (__v2sf);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: SSE vector argument without SSE enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53623.c b/gcc/testsuite/gcc.target/i386/pr53623.c
new file mode 100644
index 0000000000..35c578bd61
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53623.c
@@ -0,0 +1,25 @@
+/* { dg-do compile { target {! ia32 } } } */
+/* { dg-options "-O2 -fdump-rtl-ree" } */
+
+
+#include <stdint.h>
+
+typedef (*inst_t)(int64_t rdi, int64_t rsi, int64_t rdx);
+
+int16_t code[256];
+inst_t dispatch[256];
+
+void an_inst(int64_t rdi, int64_t rsi, int64_t rdx) {
+ rdx = code[rdx];
+ uint8_t inst = (uint8_t) rdx;
+ rdx >>= 8;
+ dispatch[inst](rdi, rsi, rdx);
+}
+
+int main(void) {
+ return 0;
+}
+
+/* { dg-final { scan-rtl-dump "copy needed" "ree" } } */
+/* { dg-final { cleanup-rtl-dump "ree" } } */
+
diff --git a/gcc/testsuite/gcc.target/i386/pr53698.c b/gcc/testsuite/gcc.target/i386/pr53698.c
new file mode 100644
index 0000000000..3acefba00b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53698.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O -mx32 -maddress-mode=long -fno-tree-dominator-opts" } */
+
+extern char foo[];
+
+void
+test2 (void)
+{
+ int s;
+ for (s = 0;; ++s)
+ {
+ if (foo[s] != s)
+ __builtin_abort ();
+ foo[s] = s;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr53712.c b/gcc/testsuite/gcc.target/i386/pr53712.c
new file mode 100644
index 0000000000..5c47e20c30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53712.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse4.2" } */
+
+typedef char v16qi __attribute__ ((__vector_size__ (16)));
+
+int test (const char *s1, const char *s2)
+{
+ v16qi s1chars = __builtin_ia32_loaddqu ((const char *) s2);
+ v16qi s2chars = __builtin_ia32_loaddqu ((const char *) s1);
+ return __builtin_ia32_pcmpistri128 (s1chars, s2chars, 0);
+}
+
+/* { dg-final { scan-assembler-times "movdqu" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr53907.c b/gcc/testsuite/gcc.target/i386/pr53907.c
new file mode 100644
index 0000000000..27e2e02985
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr53907.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O -msse2" } */
+
+#include <emmintrin.h>
+
+__extension__ typedef __UINTPTR_TYPE__ uintptr_t;
+
+__m128i x(char *s)
+{
+ __m128i sz,z,mvec;
+ s-=((uintptr_t) s)%16;
+ sz=_mm_load_si128((__m128i *)s);
+ return sz;
+}
+
+/* { dg-final { scan-assembler "movdqa" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr54157.c b/gcc/testsuite/gcc.target/i386/pr54157.c
index 59fcd792bd..b5c4528b80 100644
--- a/gcc/testsuite/gcc.target/i386/pr54157.c
+++ b/gcc/testsuite/gcc.target/i386/pr54157.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { ! { ia32 } } } } */
-/* { dg-options "-O2 -mx32 -ftree-vectorize" } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long -ftree-vectorize" } */
struct s2{
int n[24 -1][24 -1][24 -1];
diff --git a/gcc/testsuite/gcc.target/i386/pr54400.c b/gcc/testsuite/gcc.target/i386/pr54400.c
new file mode 100644
index 0000000000..5ed5ba0664
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54400.c
@@ -0,0 +1,53 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse3 -mfpmath=sse" } */
+
+#include <x86intrin.h>
+
+double f (__m128d p)
+{
+ return p[0] - p[1];
+}
+
+double g1 (__m128d p)
+{
+ return p[0] + p[1];
+}
+
+double g2 (__m128d p)
+{
+ return p[1] + p[0];
+}
+
+__m128d h (__m128d p, __m128d q)
+{
+ __m128d r = { p[0] - p[1], q[0] - q[1] };
+ return r;
+}
+
+__m128d i1 (__m128d p, __m128d q)
+{
+ __m128d r = { p[0] + p[1], q[0] + q[1] };
+ return r;
+}
+
+__m128d i2 (__m128d p, __m128d q)
+{
+ __m128d r = { p[0] + p[1], q[1] + q[0] };
+ return r;
+}
+
+__m128d i3 (__m128d p, __m128d q)
+{
+ __m128d r = { p[1] + p[0], q[0] + q[1] };
+ return r;
+}
+
+__m128d i4 (__m128d p, __m128d q)
+{
+ __m128d r = { p[1] + p[0], q[1] + q[0] };
+ return r;
+}
+
+/* { dg-final { scan-assembler-times "hsubpd" 2 } } */
+/* { dg-final { scan-assembler-times "haddpd" 6 } } */
+/* { dg-final { scan-assembler-not "unpck" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr54445-1.c b/gcc/testsuite/gcc.target/i386/pr54445-1.c
new file mode 100644
index 0000000000..ebac532eb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54445-1.c
@@ -0,0 +1,25 @@
+/* { dg-do run { target tls_runtime } } */
+/* { dg-options "-O2" } */
+/* { dg-add-options tls } */
+
+__thread unsigned char tls_array[64];
+
+unsigned char
+__attribute__ ((noinline))
+tls_array_lookup_with_negative_constant(long long int position) {
+ return tls_array[position - 1];
+}
+
+int
+main ()
+{
+ int i;
+
+ for (i = 0; i < sizeof (tls_array) / sizeof (tls_array[0]); i++)
+ tls_array[i] = i;
+
+ for (i = 0; i < sizeof (tls_array) / sizeof (tls_array[0]); i++)
+ if (i != tls_array_lookup_with_negative_constant (i + 1))
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr54445-2.c b/gcc/testsuite/gcc.target/i386/pr54445-2.c
new file mode 100644
index 0000000000..5151c13284
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54445-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { *-*-linux* && { ! { ia32 } } } } } */
+/* { dg-options "-O2 -fno-pic" } */
+
+__thread unsigned char tls_array[64];
+
+unsigned char
+tls_array_lookup_with_negative_constant(long long int position) {
+ return tls_array[position - 1];
+}
+
+/* { dg-final { scan-assembler "mov(b|zbl)\[ \t\](%fs:)?tls_array@tpoff-1\\(%" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr54457.c b/gcc/testsuite/gcc.target/i386/pr54457.c
new file mode 100644
index 0000000000..9abfbd3202
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54457.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=short" } */
+
+extern char array[40];
+
+char foo (long long position)
+{
+ return array[position + 1];
+}
+
+/* { dg-final { scan-assembler-not "add\[lq\]?\[^\n\]*1" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr54592.c b/gcc/testsuite/gcc.target/i386/pr54592.c
new file mode 100644
index 0000000000..20dc11c235
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54592.c
@@ -0,0 +1,17 @@
+/* PR target/54592 */
+/* { dg-do compile } */
+/* { dg-options "-Os -msse2" } */
+/* { dg-require-effective-target sse2 } */
+
+#include <emmintrin.h>
+
+void
+func (__m128i * foo, size_t a, size_t b, int *dst)
+{
+ __m128i x = foo[a];
+ __m128i y = foo[b];
+ __m128i sum = _mm_add_epi32 (x, y);
+ *dst = _mm_cvtsi128_si32 (sum);
+}
+
+/* { dg-final { scan-assembler "paddd\[^\n\r\]*(\\(\[^\n\r\]*\\)|XMMWORD PTR)" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr54694.c b/gcc/testsuite/gcc.target/i386/pr54694.c
new file mode 100644
index 0000000000..bcf82c2a16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr54694.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+
+register void *hfp __asm__("%ebp"); /* { dg-message "note: for" } */
+
+extern void g(void *);
+
+void f(int x) /* { dg-error "frame pointer required" } */
+{
+ g(__builtin_alloca(x));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55049-1.c b/gcc/testsuite/gcc.target/i386/pr55049-1.c
new file mode 100644
index 0000000000..cb7fb9b3fd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55049-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fPIC -mx32" } */
+
+extern void __morestack_fail (const char *msg);
+void
+foo (void)
+{
+ static const char msg[] = "munmap of stack space failed: errno ";
+ __morestack_fail (msg);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55093.c b/gcc/testsuite/gcc.target/i386/pr55093.c
new file mode 100644
index 0000000000..3d32a5799d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55093.c
@@ -0,0 +1,81 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
+/* { dg-skip-if "different ABI" { x86_64-*-mingw* } } */
+
+typedef union tree_node *tree;
+typedef const union tree_node *const_tree;
+typedef struct {
+ unsigned long long low;
+ long long high;
+} double_int;
+struct real_value {
+};
+struct real_format {
+ int has_signed_zero;
+};
+extern const struct real_format * real_format_for_mode[];
+extern int real_isnegzero (const struct real_value *);
+enum tree_code { REAL_CST, SSA_NAME };
+struct tree_base {
+ enum tree_code code : 16;
+ union {
+ unsigned int version;
+ }
+ u;
+};
+extern void tree_check_failed (const_tree, const char *, int, const char *, ...) __attribute__ ((__noreturn__));
+union tree_node {
+ struct tree_base base;
+};
+inline tree tree_check (tree __t, const char *__f, int __l, const char *__g, enum tree_code __c) {
+ if (((enum tree_code) (__t)->base.code) != __c)
+ tree_check_failed (__t, __f, __l, __g, __c, 0);
+ return __t;
+}
+struct prop_value_d {
+ int lattice_val;
+ tree value;
+ double_int mask;
+};
+typedef struct prop_value_d prop_value_t;
+static prop_value_t *const_val;
+static void canonicalize_float_value (prop_value_t *);
+typedef void (*ssa_prop_visit_stmt_fn) (prop_value_t);
+typedef void (*ssa_prop_visit_phi_fn) (void);
+typedef void (*ssa_prop_fold_stmt_fn) (void *gsi);
+typedef void (*ssa_prop_get_value_fn) ( prop_value_t *val);
+void ssa_propagate (ssa_prop_visit_stmt_fn, ssa_prop_visit_phi_fn);
+int substitute_and_fold (ssa_prop_get_value_fn, ssa_prop_fold_stmt_fn);
+void ccp_fold_stmt (void *);
+static void get_constant_value (prop_value_t *val) {
+ canonicalize_float_value (val);
+}
+static void canonicalize_float_value (prop_value_t *val) {
+ int mode;
+ struct real_value d;
+ if (val->lattice_val != 1
+ || ((enum tree_code) (val->value)->base.code) != REAL_CST)
+ return;
+ mode = val->lattice_val;
+ if (real_format_for_mode[mode]->has_signed_zero && real_isnegzero (&d))
+ ccp_fold_stmt (0);
+}
+static void set_lattice_value (tree var, prop_value_t new_val) {
+ prop_value_t *old_val = &const_val[(tree_check ((var), "",
+ 0, "",
+ (SSA_NAME)))->base.u.version];
+ canonicalize_float_value (&new_val);
+ canonicalize_float_value (old_val);
+}
+static void ccp_visit_phi_node (void) {
+ prop_value_t new_val;
+ set_lattice_value (0, new_val);
+}
+static void ccp_visit_stmt (prop_value_t v) {
+ set_lattice_value (0, v);
+}
+unsigned int do_ssa_ccp (void) {
+ ssa_propagate (ccp_visit_stmt, ccp_visit_phi_node);
+ substitute_and_fold (get_constant_value, ccp_fold_stmt);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55116-1.c b/gcc/testsuite/gcc.target/i386/pr55116-1.c
new file mode 100644
index 0000000000..de272445aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55116-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
+
+int glob_int_arr[100];
+int glob_int = 4;
+
+void
+expr_global (void)
+{
+ __builtin_prefetch (glob_int_arr + glob_int, 0, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55116-2.c b/gcc/testsuite/gcc.target/i386/pr55116-2.c
new file mode 100644
index 0000000000..7ef8eade06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55116-2.c
@@ -0,0 +1,86 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long" } */
+
+typedef struct rtx_def *rtx;
+enum rtx_code { MINUS };
+union rtunion_def {
+ rtx rt_rtx;
+};
+typedef union rtunion_def rtunion;
+struct rtx_def {
+ enum rtx_code code: 16;
+ union u {
+ rtunion fld[1];
+ }
+ u;
+};
+rtx simplify_binary_operation (enum rtx_code code, int mode,
+ rtx op0, rtx op1);
+struct simplify_plus_minus_op_data {
+ rtx op;
+ short neg;
+};
+void simplify_plus_minus (enum rtx_code code, int mode, rtx op0, rtx op1)
+{
+ struct simplify_plus_minus_op_data ops[8];
+ rtx tem = (rtx) 0;
+ int n_ops = 2, input_ops = 2;
+ int changed, canonicalized = 0;
+ int i, j;
+ __builtin_memset (ops, 0, sizeof (ops));
+ do
+ {
+ changed = 0;
+ for (i = 0; i < n_ops; i++)
+ {
+ rtx this_op = ops[i].op;
+ int this_neg = ops[i].neg;
+ enum rtx_code this_code = ((enum rtx_code) (this_op)->code);
+ switch (this_code)
+ {
+ case MINUS:
+ if (n_ops == 7)
+ return;
+ n_ops++;
+ input_ops++;
+ changed = 1;
+ canonicalized |= this_neg;
+ break;
+ }
+ }
+ }
+ while (changed);
+ do
+ {
+ j = n_ops - 1;
+ for (i = n_ops - 1; j >= 0; j--)
+ {
+ rtx lhs = ops[j].op, rhs = ops[i].op;
+ int lneg = ops[j].neg, rneg = ops[i].neg;
+ if (lhs != 0 && rhs != 0)
+ {
+ enum rtx_code ncode = MINUS;
+ if (((enum rtx_code) (lhs)->code) == MINUS)
+ tem = simplify_binary_operation (ncode, mode, lhs, rhs);
+ if (tem && ! (((enum rtx_code) (tem)->code) == MINUS
+ && ((((((tem)->u.fld[0]).rt_rtx))->u.fld[0]).rt_rtx) == lhs
+ && ((((((tem)->u.fld[0]).rt_rtx))->u.fld[1]).rt_rtx) == rhs))
+ {
+ lneg &= rneg;
+ ops[i].op = tem;
+ ops[i].neg = lneg;
+ ops[j].op = (rtx) 0;
+ changed = 1;
+ canonicalized = 1;
+ }
+ }
+ }
+ for (i = 0, j = 0; j < n_ops; j++)
+ if (ops[j].op)
+ {
+ ops[i] = ops[j];
+ i++;
+ }
+ }
+ while (changed);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55130.c b/gcc/testsuite/gcc.target/i386/pr55130.c
new file mode 100644
index 0000000000..61b98dc934
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55130.c
@@ -0,0 +1,15 @@
+/* PR middle-end/55130 */
+/* { dg-do compile { target ia32 } } */
+/* { dg-options "-O1 -mregparm=3 -mpreferred-stack-boundary=2" } */
+
+extern void bar(long long);
+
+int foo(long long a, char b, long long c, long long d)
+{
+ if (c == 0)
+ c = d;
+
+ bar(b + c);
+
+ return a == d;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55141.c b/gcc/testsuite/gcc.target/i386/pr55141.c
new file mode 100644
index 0000000000..a457755993
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55141.c
@@ -0,0 +1,29 @@
+/* { dg-do run } */
+/* { dg-options "-O -fno-split-wide-types" } */
+
+typedef struct
+{
+ long int p_x, p_y;
+} Point;
+
+static __attribute__ ((noinline, noclone))
+ void foo (Point p0, Point p1, Point p2, Point p3)
+{
+ if (p0.p_x != 1
+ || p1.p_x != 3
+ || p2.p_x != 5
+ || p3.p_x != 7)
+ __builtin_abort ();
+}
+
+int
+main (int argc, char *argv[])
+{
+ Point p0, p1, p2, p3, p4, p5;
+ p0.p_x = 1;
+ p1.p_x = 3;
+ p2.p_x = 5;
+ p3.p_x = 7;
+ foo (p0, p1, p2, p3);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55142-1.c b/gcc/testsuite/gcc.target/i386/pr55142-1.c
index 28375b5476..e6b5f126cc 100644
--- a/gcc/testsuite/gcc.target/i386/pr55142-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr55142-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
/* { dg-require-effective-target fpic } */
-/* { dg-options "-O2 -mx32 -fpic" } */
+/* { dg-options "-O2 -mx32 -maddress-mode=long -fpic" } */
typedef int int32_t;
typedef unsigned int uint32_t;
diff --git a/gcc/testsuite/gcc.target/i386/pr55142-2.c b/gcc/testsuite/gcc.target/i386/pr55142-2.c
index 9daae9dca9..34f4687193 100644
--- a/gcc/testsuite/gcc.target/i386/pr55142-2.c
+++ b/gcc/testsuite/gcc.target/i386/pr55142-2.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
/* { dg-require-effective-target fpic } */
-/* { dg-options "-O3 -mx32 -fpic" } */
+/* { dg-options "-O3 -mx32 -maddress-mode=long -fpic" } */
/* { dg-final { scan-assembler-not "movl\[\\t \]*%.*,\[\\t \]*-1073742592\\(%r(.x|.i|.p|\[1-9\]*)\\)" } } */
typedef int int32_t;
diff --git a/gcc/testsuite/gcc.target/i386/pr55147.c b/gcc/testsuite/gcc.target/i386/pr55147.c
new file mode 100644
index 0000000000..5be02f11c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55147.c
@@ -0,0 +1,25 @@
+/* PR target/55147 */
+/* { dg-do run } */
+/* { dg-options "-O1" } */
+/* { dg-additional-options "-march=i486" { target ia32 } } */
+
+extern void abort (void);
+
+__attribute__((noclone, noinline)) unsigned int
+foo (unsigned long long *p, int i)
+{
+ return __builtin_bswap64 (p[i]);
+}
+
+int
+main ()
+{
+ unsigned long long p[64];
+ int i;
+ for (i = 0; i < 64; i++)
+ p[i] = 0x123456789abcdef0ULL ^ (1ULL << i) ^ (1ULL << (63 - i));
+ for (i = 0; i < 64; i++)
+ if (foo (p, i) != __builtin_bswap32 (p[i] >> 32))
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55151.c b/gcc/testsuite/gcc.target/i386/pr55151.c
new file mode 100644
index 0000000000..2bf68df4a1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55151.c
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/55151 */
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-fPIC" } */
+
+int a, b, c, d, e, f, g, h, i, j, k, l;
+void f4 (void)
+{
+ __asm__ volatile ("":[a] "=r,m" (a),[b] "=r,m" (b),[c] "=r,m" (c),
+ [d] "=r,m" (d),[e] "=r,m" (e),[f] "=r,m" (f),
+ [g] "=r,m" (g),[h] "=r,m" (h),[i] "=r,m" (i),
+ [j] "=r,m" (j),[k] "=r,m" (k),[l] "=r,m" (l):"[a],m" (a),
+ "[j],m" (j), "[k],m" (k), "[l],m" (l));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55154.c b/gcc/testsuite/gcc.target/i386/pr55154.c
new file mode 100644
index 0000000000..2ed3f00edd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55154.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -mcx16 -fpic -mcmodel=large -fno-split-wide-types" } */
+
+__int128 i;
+
+void test ()
+{
+ __sync_val_compare_and_swap (&i, i, i);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55247-2.c b/gcc/testsuite/gcc.target/i386/pr55247-2.c
new file mode 100644
index 0000000000..d91b504e66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55247-2.c
@@ -0,0 +1,37 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -mtune=generic -maddress-mode=long" } */
+
+typedef unsigned int uint32_t;
+typedef uint32_t Elf32_Word;
+typedef uint32_t Elf32_Addr;
+typedef struct {
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_other;
+} Elf32_Sym;
+typedef struct {
+ Elf32_Word r_info;
+}
+Elf32_Rela;
+typedef struct {
+ union {
+ Elf32_Addr d_ptr;
+ }
+ d_un;
+} Elf32_Dyn;
+struct link_map {
+ Elf32_Dyn *l_info[34];
+};
+extern void symbind32 (Elf32_Sym *);
+void
+_dl_profile_fixup (struct link_map *l, Elf32_Word reloc_arg)
+{
+ const Elf32_Sym *const symtab = (const void *) l->l_info[6]->d_un.d_ptr;
+ const Elf32_Rela *const reloc = (const void *) (l->l_info[23]->d_un.d_ptr + reloc_arg * sizeof (Elf32_Rela));
+ Elf32_Sym sym = symtab[(reloc->r_info) >> 8];
+ symbind32 (&sym);
+}
+
+/* { dg-final { scan-assembler-not "%xmm\[0-9\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr55247.c b/gcc/testsuite/gcc.target/i386/pr55247.c
new file mode 100644
index 0000000000..6259ea4f7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55247.c
@@ -0,0 +1,35 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mno-sse -mno-mmx -mx32 -maddress-mode=long" } */
+
+typedef unsigned int uint32_t;
+typedef uint32_t Elf32_Word;
+typedef uint32_t Elf32_Addr;
+typedef struct {
+ Elf32_Word st_name;
+ Elf32_Addr st_value;
+ Elf32_Word st_size;
+ unsigned char st_other;
+} Elf32_Sym;
+typedef struct {
+ Elf32_Word r_info;
+}
+Elf32_Rela;
+typedef struct {
+ union {
+ Elf32_Addr d_ptr;
+ }
+ d_un;
+} Elf32_Dyn;
+struct link_map {
+ Elf32_Dyn *l_info[34];
+};
+extern void symbind32 (Elf32_Sym *);
+void
+_dl_profile_fixup (struct link_map *l, Elf32_Word reloc_arg)
+{
+ const Elf32_Sym *const symtab = (const void *) l->l_info[6]->d_un.d_ptr;
+ const Elf32_Rela *const reloc = (const void *) (l->l_info[23]->d_un.d_ptr + reloc_arg * sizeof (Elf32_Rela));
+ Elf32_Sym sym = symtab[(reloc->r_info) >> 8];
+ symbind32 (&sym);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55277.c b/gcc/testsuite/gcc.target/i386/pr55277.c
new file mode 100644
index 0000000000..0bdcdc47f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55277.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ilp32 } */
+/* { dg-options "-O1" } */
+
+int a, c;
+
+void f(long long p)
+{
+ long long b;
+
+ if(b)
+ b = p ? : 0;
+
+ for (; p; p++)
+ p *= a & (c = p *= !a < 2);
+
+ a = b += !(b & 3740917449u);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55342.c b/gcc/testsuite/gcc.target/i386/pr55342.c
new file mode 100644
index 0000000000..0d9e6c6238
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55342.c
@@ -0,0 +1,28 @@
+/* PR rtl-optimization/55342 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "notb" } } */
+
+
+void convert_image(unsigned char *in, unsigned char *out, int size) {
+ int i;
+ unsigned char * read = in,
+ * write = out;
+ for(i = 0; i < size; i++) {
+ unsigned char r = *read++;
+ unsigned char g = *read++;
+ unsigned char b = *read++;
+ unsigned char c, m, y, k, tmp;
+ c = 255 - r;
+ m = 255 - g;
+ y = 255 - b;
+ if (c < m)
+ k = ((c) > (y)?(y):(c));
+ else
+ k = ((m) > (y)?(y):(m));
+ *write++ = c - k;
+ *write++ = m - k;
+ *write++ = y - k;
+ *write++ = k;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55359.c b/gcc/testsuite/gcc.target/i386/pr55359.c
new file mode 100644
index 0000000000..222affc664
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55359.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx2 -O2" } */
+
+#include <x86intrin.h>
+
+__m128d
+f (__m256d x)
+{
+ return *((__m128d*) ((double *) &x + 1));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55433.c b/gcc/testsuite/gcc.target/i386/pr55433.c
new file mode 100644
index 0000000000..6a2602ad42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55433.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { *-*-darwin* } } } */
+/* { dg-options "-O1" } */
+
+typedef unsigned long long tick_t;
+extern int foo(void);
+extern tick_t tick(void);
+double test(void) {
+ struct { tick_t ticks; } st;
+ st.ticks = tick();
+ foo();
+ return (double)st.ticks;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55448.c b/gcc/testsuite/gcc.target/i386/pr55448.c
new file mode 100644
index 0000000000..874a5077f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55448.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+#include <immintrin.h>
+
+static inline __m256 add1(const __m256 *a, const __m256 *b)
+{
+ return _mm256_add_ps(*a, *b);
+}
+
+void foo1(__m256 *a, const __m256 b)
+{
+ *a = add1(a, &b);
+}
+
+static inline __m128 add2(const __m128 *a, const __m128 *b)
+{
+ return _mm_add_ps(*a, *b);
+}
+
+void foo2(__m128 *a, const __m128 b)
+{
+ *a = add2(a, &b);
+}
+
+/* { dg-final { scan-assembler-not "vmovups" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr55458.c b/gcc/testsuite/gcc.target/i386/pr55458.c
new file mode 100644
index 0000000000..81d85ec8f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55458.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-fPIC" } */
+
+int a, b, c;
+
+void
+foo (void)
+{
+ asm volatile ("":"+m" (a), "+m" (b), "+m" (c)); /* { dg-error "operand has impossible constraints" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55512-1.c b/gcc/testsuite/gcc.target/i386/pr55512-1.c
new file mode 100644
index 0000000000..de88f60f0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55512-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int x)
+{
+ asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */
+ "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
+ "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
+ "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15) : : lab);
+ __builtin_unreachable ();
+ lab:
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55512-2.c b/gcc/testsuite/gcc.target/i386/pr55512-2.c
new file mode 100644
index 0000000000..114710c6da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55512-2.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+foo (int x)
+{
+ asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */
+ "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
+ "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
+ "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15) : : lab);
+ lab:
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55512-3.c b/gcc/testsuite/gcc.target/i386/pr55512-3.c
new file mode 100644
index 0000000000..2a351c3beb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55512-3.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+bar (int x)
+{
+ asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */
+ "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
+ "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
+ "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15),
+ "r" (x + 16) : : lab);
+ __builtin_unreachable ();
+ lab:
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55512-4.c b/gcc/testsuite/gcc.target/i386/pr55512-4.c
new file mode 100644
index 0000000000..250243afba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55512-4.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int
+bar (int x)
+{
+ asm goto ("" : : "r" (x), "r" (x + 1), "r" (x + 2), "r" (x + 3), /* { dg-error "operand has impossible constraints" } */
+ "r" (x + 4), "r" (x + 5), "r" (x + 6), "r" (x + 7),
+ "r" (x + 8), "r" (x + 9), "r" (x + 10), "r" (x + 11),
+ "r" (x + 12), "r" (x + 13), "r" (x + 14), "r" (x + 15),
+ "r" (x + 16) : : lab);
+ lab:
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55590-1.c b/gcc/testsuite/gcc.target/i386/pr55590-1.c
new file mode 100644
index 0000000000..a8dd91232c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55590-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+#include <immintrin.h>
+
+struct S
+{
+ __m128 a, b;
+};
+
+struct T
+{
+ int a;
+ struct S s;
+};
+
+
+void foo (struct T *p, __m128 v)
+{
+ struct S s;
+
+ s = p->s;
+ s.b = _mm_add_ps(s.b, v);
+ p->s = s;
+}
+
+/* { dg-final { scan-assembler-not "vmovups" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr55590-2.c b/gcc/testsuite/gcc.target/i386/pr55590-2.c
new file mode 100644
index 0000000000..afc0a6379a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55590-2.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+#include <immintrin.h>
+
+struct S
+{
+ __m128 a, b;
+};
+
+struct T
+{
+ int a;
+ struct S s[8];
+};
+
+
+void foo (struct T *p, int i, __m128 v)
+{
+ struct S s;
+
+ s = p->s[i];
+ s.b = _mm_add_ps(s.b, v);
+ p->s[i] = s;
+}
+
+/* { dg-final { scan-assembler-not "vmovups" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr55597.c b/gcc/testsuite/gcc.target/i386/pr55597.c
index cafe194c1b..0ed7a3a2ea 100644
--- a/gcc/testsuite/gcc.target/i386/pr55597.c
+++ b/gcc/testsuite/gcc.target/i386/pr55597.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! { ia32 } } } } */
/* { dg-require-effective-target fpic } */
-/* { dg-options "-O2 -fPIC -mx32" } */
+/* { dg-options "-O2 -fPIC -mx32 -maddress-mode=long" } */
struct initial_sp
{
diff --git a/gcc/testsuite/gcc.target/i386/pr55672.c b/gcc/testsuite/gcc.target/i386/pr55672.c
new file mode 100644
index 0000000000..6f1c898c74
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55672.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fstack-check=generic" } */
+
+int main ()
+{
+ int x[8];
+ if (x[0] != 4)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55686.c b/gcc/testsuite/gcc.target/i386/pr55686.c
new file mode 100644
index 0000000000..a263b08dd7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55686.c
@@ -0,0 +1,16 @@
+/* PR target/55686 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (long x, long *y)
+{
+ long *a = y - 64, i;
+ for (i = 0; i < x; i++)
+ {
+ long v = y[i];
+ *a++ = v;
+ }
+ register void **c __asm__ ("di");
+ goto **c;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55775.c b/gcc/testsuite/gcc.target/i386/pr55775.c
new file mode 100644
index 0000000000..1902f68832
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55775.c
@@ -0,0 +1,56 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+int *ptr;
+int *fn1 (int *);
+int fn2 (int, int);
+int fn3 (void);
+int fn4 (int);
+
+static int
+foo (int x, int y, int z)
+{
+ int b;
+ asm ("" : "=a" (b), "=&d" (x) : "0" (y), "1" (x), "mr" (z));
+ return x;
+}
+
+static int
+bar (int x, int y)
+{
+ int a;
+ if (!y)
+ {
+ for (a = 0; a <= (x >> 1); )
+ ;
+ a = foo (y, fn2 (2, x), x);
+ if (x)
+ a = x;
+ return a;
+ }
+}
+
+static int
+baz (int x, int y)
+{
+ int *a = ptr;
+ int t, xk1 = fn3 (), xk = x * xk1;
+ for (t = 0; t < xk; t += xk1)
+ {
+ if (fn4 (a[2]))
+ return -y;
+ a = fn1 (a);
+ }
+ return 0;
+}
+
+void
+test (int x, long y, int z)
+{
+ int a = fn3 ();
+ int b;
+ int c = bar (x, z);
+ for (b = 0; b <= y; b++)
+ c = baz (x, c);
+ fn2 (c, a);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55829.c b/gcc/testsuite/gcc.target/i386/pr55829.c
new file mode 100644
index 0000000000..be70ba2f24
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55829.c
@@ -0,0 +1,34 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse3 -fno-expensive-optimizations" } */
+
+typedef double __m128d __attribute__ ((__vector_size__ (16)));
+
+extern double p1[];
+extern double p2[];
+extern double ck[];
+extern int n;
+
+__attribute__((__noinline__, __noclone__)) int chk_pd (double *v1, double *v2)
+{
+ return v2[n] != v1[n];
+}
+
+static inline void sse3_test_movddup_reg_subsume_ldsd (double *i1, double *r)
+{
+ __m128d t1 = (__m128d){*i1, 0};
+ __m128d t2 = __builtin_ia32_shufpd (t1, t1, 0);
+ __builtin_ia32_storeupd (r, t2);
+}
+
+int sse3_test (void)
+{
+ int i = 0;
+ int fail = 0;
+ for (; i < 80; i += 1)
+ {
+ ck[0] = p1[0];
+ fail += chk_pd (ck, p2);
+ sse3_test_movddup_reg_subsume_ldsd (p1, p2);
+ }
+ return fail;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55845.c b/gcc/testsuite/gcc.target/i386/pr55845.c
new file mode 100644
index 0000000000..daf04e54a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55845.c
@@ -0,0 +1,40 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O3 -ffast-math -fschedule-insns -mavx -mvzeroupper" } */
+
+#include "avx-check.h"
+
+#define N 100
+
+double
+__attribute__((noinline))
+foo (int size, double *y, double *x)
+{
+ double sum = 0.0;
+ int i;
+
+ for (i = 0; i < size; i++)
+ sum += y[i] * x[i];
+
+ return sum;
+}
+
+static void
+__attribute__ ((noinline))
+avx_test ()
+{
+ double x[N], y[N];
+ double s;
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ x[i] = i;
+ y[i] = i;
+ }
+
+ s = foo (N, y, x);
+
+ if (s != 328350.0)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr55934.c b/gcc/testsuite/gcc.target/i386/pr55934.c
new file mode 100644
index 0000000000..ea489559c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr55934.c
@@ -0,0 +1,11 @@
+/* PR inline-asm/55934 */
+/* { dg-do compile } */
+/* { dg-require-effective-target sse } */
+/* { dg-options "-std=c99 -msse" } */
+_Complex float
+foo (void)
+{
+ _Complex float x;
+ __asm ("" : "=x" (x)); /* { dg-error "inconsistent .* constraint" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/pr55981.c b/gcc/testsuite/gcc.target/i386/pr55981.c
index 36498d63cf..36498d63cf 100644
--- a/gcc/testsuite/gcc.target/pr55981.c
+++ b/gcc/testsuite/gcc.target/i386/pr55981.c
diff --git a/gcc/testsuite/gcc.target/i386/pr56022.c b/gcc/testsuite/gcc.target/i386/pr56022.c
new file mode 100644
index 0000000000..db43162fbb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56022.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx" } */
+
+typedef float __m256 __attribute__ ((__vector_size__ (32), __may_alias__));
+__attribute__((target("no-avx"))) static int currentImplementationSupported()
+{}
+__m256 foo0(__m256 a) {}
diff --git a/gcc/testsuite/gcc.target/i386/pr56114.c b/gcc/testsuite/gcc.target/i386/pr56114.c
new file mode 100644
index 0000000000..43e62ae3b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56114.c
@@ -0,0 +1,10 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -masm=intel" } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-require-effective-target masm_intel } */
+
+long
+foo2 (void)
+{
+ return *(volatile int *) 0xFEE00000;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56148.c b/gcc/testsuite/gcc.target/i386/pr56148.c
new file mode 100644
index 0000000000..78d2efba19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56148.c
@@ -0,0 +1,12 @@
+/* PR inline-asm/56148 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+foo (void)
+{
+ unsigned char e[16];
+ unsigned long a, b, c, d;
+ __asm__ __volatile__ ("" : "=d" (a), "=&c" (c), "=&D" (d), "=&a" (b)
+ : "0" (-1U), "mr" (e), "1" (128 >> 5), "2" (e), "3" (-1U));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56151.c b/gcc/testsuite/gcc.target/i386/pr56151.c
new file mode 100644
index 0000000000..24a1b8ae46
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56151.c
@@ -0,0 +1,17 @@
+/* PR rtl-optimization/56151 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+int vara, varb;
+
+void
+foo (int i, int j)
+{
+ vara = varb | vara;
+}
+
+/* Verify the above is compiled into movl varb, %reg; orl %reg, vara instead
+ of longer movl vara, %reg; orl varb, %reg; movl %reg, vara. */
+/* { dg-final { scan-assembler-not "mov\[^\n\r]*vara" { target nonpic } } } */
+/* { dg-final { scan-assembler-times "mov\[^\n\r]*varb" 1 { target nonpic } } } */
+/* { dg-final { scan-assembler-times "or\[^\n\r]*vara" 1 { target nonpic } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56225.c b/gcc/testsuite/gcc.target/i386/pr56225.c
new file mode 100644
index 0000000000..638c0cef5f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56225.c
@@ -0,0 +1,12 @@
+/* PR target/56225 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -march=pentium3 -mtune=generic" } */
+
+void bar (int);
+
+void
+foo (int x, int y)
+{
+ __attribute__ ((vector_size (8 * sizeof (short)))) short s0 = { x };
+ bar ((short) (long) &s0 + y);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56246.c b/gcc/testsuite/gcc.target/i386/pr56246.c
new file mode 100644
index 0000000000..b4d527396d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56246.c
@@ -0,0 +1,7 @@
+/* PR target/56225 */
+/* { dg-do compile { target { ia32 && fpic } } } */
+/* { dg-options "-O2 -fno-omit-frame-pointer -march=i686 -fpic" } */
+
+void NoBarrier_AtomicExchange (long long *ptr) {
+ while (__sync_val_compare_and_swap (ptr, 1, 0) );
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56348.c b/gcc/testsuite/gcc.target/i386/pr56348.c
new file mode 100644
index 0000000000..af63828129
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56348.c
@@ -0,0 +1,38 @@
+/* PR target/56348 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -fPIC -mfpmath=sse -msse2" } */
+
+typedef unsigned int size_t;
+
+extern double fabs (double __x) __attribute__ ((__nothrow__, __leaf__))
+ __attribute__ ((__const__));
+
+typedef struct cholmod_sparse_struct
+{
+ size_t ncol;
+ void *p;
+} cholmod_sparse;
+
+int cholmod_l_reallocate_sparse (size_t, cholmod_sparse *, void *);
+
+int
+cholmod_l_drop (double tol, cholmod_sparse * A)
+{
+ double aij;
+ double *Ax;
+ long long *Ap, *Ai, *Anz;
+ long long packed, i, j, nrow, ncol, p, pend, nz, values;
+ Ap = A->p;
+ ncol = A->ncol;
+ nz = 0;
+ for (j = 0; j < ncol; j++)
+ for (; p < pend; p++)
+ {
+ i = Ai[p];
+ aij = Ax[p];
+ if (i <= j && (fabs (aij) > tol || ((aij) != (aij))))
+ nz++;
+ }
+ Ap[ncol] = nz;
+ cholmod_l_reallocate_sparse (nz, A, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56560.c b/gcc/testsuite/gcc.target/i386/pr56560.c
deleted file mode 100644
index 5417cbdded..0000000000
--- a/gcc/testsuite/gcc.target/i386/pr56560.c
+++ /dev/null
@@ -1,19 +0,0 @@
-/* { dg-do compile } */
-/* { dg-options "-O2 -mavx -mvzeroupper -dp" } */
-
-extern void abort (void);
-
-typedef double vec_t __attribute__((vector_size(32)));
-
-struct S { int i1; int i2; int i3; };
-
-extern int bar (vec_t, int, int, int, int, int, struct S);
-
-void foo (vec_t v, struct S s)
-{
- int i = bar (v, 1, 2, 3, 4, 5, s);
- if (i == 0)
- abort ();
-}
-
-/* { dg-final { scan-assembler-not "avx_vzeroupper" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56564-1.c b/gcc/testsuite/gcc.target/i386/pr56564-1.c
new file mode 100644
index 0000000000..13955bcd1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56564-1.c
@@ -0,0 +1,26 @@
+/* PR target/56564 */
+/* { dg-do compile { target { fpic && lp64 } } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
+
+struct S { long a, b; } s = { 5, 6 };
+char t[16] = { 7 };
+
+int
+foo (void)
+{
+ return ((__UINTPTR_TYPE__) &s) & 15;
+}
+
+int
+bar (void)
+{
+ return ((__UINTPTR_TYPE__) &t[0]) & 15;
+}
+
+/* { dg-final { scan-tree-dump-times "&s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "&t" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "return 0" 1 "optimized" } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]s:" { target { *-*-linux* } } } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target { *-*-linux* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56564-2.c b/gcc/testsuite/gcc.target/i386/pr56564-2.c
new file mode 100644
index 0000000000..fc89a4ccaf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56564-2.c
@@ -0,0 +1,25 @@
+/* PR target/56564 */
+/* { dg-do compile { target { *-*-linux* && lp64 } } } */
+/* { dg-options "-O3 -fno-pic -fdump-tree-optimized" } */
+
+struct S { long a, b; } s = { 5, 6 };
+char t[16] = { 7 };
+
+int
+foo (void)
+{
+ return ((__UINTPTR_TYPE__) &s) & 15;
+}
+
+int
+bar (void)
+{
+ return ((__UINTPTR_TYPE__) &t[0]) & 15;
+}
+
+/* { dg-final { scan-tree-dump-times "&s" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "&t" 0 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "return 0" 2 "optimized" } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]s:" { target { *-*-linux* } } } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target { *-*-linux* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56564-3.c b/gcc/testsuite/gcc.target/i386/pr56564-3.c
new file mode 100644
index 0000000000..d45bffb069
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56564-3.c
@@ -0,0 +1,29 @@
+/* PR target/56564 */
+/* { dg-do compile { target { fpic && lp64 } } } */
+/* { dg-skip-if "No symbol interposition for PIC" { *-*-mingw* *-*-cygwin* *-*-darwin* } } */
+/* { dg-options "-O3 -fpic -fdump-tree-optimized" } */
+
+__thread struct S { long a, b; } s = { 5, 6 };
+__thread char t[16] = { 7 };
+
+int
+foo (void)
+{
+ return ((__UINTPTR_TYPE__) &s) & 15;
+}
+
+/* For backwards compatibility we don't assume that t must
+ be aligned to 16 bytes, but align it anyway. */
+
+int
+bar (void)
+{
+ return ((__UINTPTR_TYPE__) &t[0]) & 15;
+}
+
+/* { dg-final { scan-tree-dump-times "&s" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "&t" 1 "optimized" } } */
+/* { dg-final { scan-tree-dump-times "return 0" 0 "optimized" } } */
+/* { dg-final { scan-assembler-not ".align\[ \t]*16\[^:]*\[\n\r]s:" { target { *-*-linux* } } } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target { *-*-linux* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56564-4.c b/gcc/testsuite/gcc.target/i386/pr56564-4.c
new file mode 100644
index 0000000000..a0b3d3d394
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56564-4.c
@@ -0,0 +1,22 @@
+/* PR target/56564 */
+/* { dg-do compile { target { *-*-linux* && lp64 } } } */
+/* { dg-options "-O3 -fno-pic -fdump-tree-optimized" } */
+
+__thread struct S { long a, b; } s = { 5, 6 };
+__thread char t[16] = { 7 };
+
+int
+foo (void)
+{
+ return ((__UINTPTR_TYPE__) &s) & 15;
+}
+
+int
+bar (void)
+{
+ return ((__UINTPTR_TYPE__) &t[0]) & 15;
+}
+
+/* { dg-final { scan-assembler-not ".align\[ \t]*16\[^:]*\[\n\r]s:" { target { *-*-linux* } } } } */
+/* { dg-final { scan-assembler ".align\[ \t]*16\[^:]*\[\n\r]t:" { target { *-*-linux* } } } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr56866.c b/gcc/testsuite/gcc.target/i386/pr56866.c
new file mode 100644
index 0000000000..fbd1517456
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56866.c
@@ -0,0 +1,16 @@
+/* PR target/56866 */
+/* { dg-do run } */
+/* { dg-require-effective-target xop } */
+/* { dg-options "-O3 -mxop" } */
+
+#define main xop_test_main
+#include "../../gcc.c-torture/execute/pr56866.c"
+#undef main
+
+#include "xop-check.h"
+
+static void
+xop_test (void)
+{
+ xop_test_main ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr56903.c b/gcc/testsuite/gcc.target/i386/pr56903.c
new file mode 100644
index 0000000000..9e6a1c3916
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr56903.c
@@ -0,0 +1,18 @@
+/* PR rtl-optimization/56903 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-additional-options "-march=pentium3" { target ia32 } } */
+
+int a, *b, c;
+struct S { int s : 1; } *fn1 (void);
+extern int fn3 (void), fn4 (int *);
+
+void
+fn2 (void)
+{
+ int e = fn3 ();
+ char f = c + fn1 ()->s * 4;
+ if (*b && f == e)
+ a = *b;
+ fn4 (b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57003.c b/gcc/testsuite/gcc.target/i386/pr57003.c
new file mode 100644
index 0000000000..dfa6b8b509
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57003.c
@@ -0,0 +1,54 @@
+/* PR rtl-optimization/57003 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+#define N 2001
+unsigned short *b, *c, *d;
+
+__attribute__ ((noinline, noclone)) unsigned
+bar (void)
+{
+ asm volatile ("" : : : "memory");
+ return N;
+}
+
+__attribute__ ((noinline, noclone)) unsigned short *
+baz (unsigned long x)
+{
+ if (x != N * sizeof (unsigned short) + 20)
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+ return d;
+}
+
+__attribute__ ((ms_abi, noinline, noclone))
+foo (void)
+{
+ unsigned d;
+ unsigned short *e;
+ if ((d = bar ()))
+ {
+ e = baz (d * sizeof (unsigned short) + 20);
+ __builtin_memcpy (e, b, d * sizeof (unsigned short));
+ c = e;
+ }
+}
+
+int
+main ()
+{
+ unsigned short a[2 * N];
+ int i;
+ for (i = 0; i < 2 * N; i++)
+ a[i] = i + 1;
+ b = a;
+ d = a + N;
+ asm volatile ("" : : : "memory");
+ foo ();
+ for (i = 0; i < N; i++)
+ if (a[i] != i + 1 || a[i + N] != i + 1)
+ __builtin_abort ();
+ if (c != a + N)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57018.c b/gcc/testsuite/gcc.target/i386/pr57018.c
new file mode 100644
index 0000000000..fb0d849adc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57018.c
@@ -0,0 +1,31 @@
+/* { dg-do run } */
+/* { dg-options "-Os -fomit-frame-pointer -fno-asynchronous-unwind-tables" } */
+/* { dg-additional-options "-march=i686" { target ia32 } } */
+
+struct A { char a[16]; } a;
+
+void __attribute__((noinline, noclone))
+foo (struct A b)
+{
+ if (__builtin_memcmp (b.a, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0", 16))
+ __builtin_abort ();
+ asm volatile ("" : : : "memory");
+}
+
+void __attribute__((noinline, noclone))
+bar (struct A b)
+{
+ foo (a);
+ a = b;
+}
+
+int
+main ()
+{
+ struct A b = { "\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17" };
+ bar (b);
+ if (__builtin_memcmp (a.a, b.a, 16))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr57046.c b/gcc/testsuite/gcc.target/i386/pr57046.c
new file mode 100644
index 0000000000..0aa43f9df6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57046.c
@@ -0,0 +1,77 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+struct emac {
+ unsigned reg[23];
+};
+
+struct mop {
+ unsigned long long addr;
+ unsigned int size;
+};
+
+unsigned int __attribute__((__noinline__))
+level(const struct emac *obj)
+{
+ return 0;
+}
+
+void __attribute__((__noinline__))
+info(struct emac *dev, unsigned long long addr)
+{
+ asm("" : : : "memory");
+}
+
+unsigned long long __attribute__((__noinline__))
+get_value(const struct mop *mop)
+{
+ return 0x1234567890abcdefull;
+}
+
+int __attribute__((__noinline__))
+emac_operation(struct emac *obj, struct mop *mop)
+{
+ unsigned long long addr = mop->addr;
+ int index = addr >> 2;
+ unsigned int value, old_value;
+
+ if (mop->size != 4)
+ return 0;
+
+ if (index >= 23) {
+ if (level(obj) >= 1)
+ info(obj, addr);
+ return 0;
+ }
+
+ value = get_value(mop);
+ old_value = obj->reg[index];
+
+ info(obj, 0);
+
+ switch (index) {
+ case 0:
+ obj->reg[0] = old_value;
+ break;
+ case 7:
+ case 8:
+ obj->reg[index] = value;
+ break;
+ }
+
+ return 0;
+}
+
+int main(void)
+{
+ struct emac e = { { 0 } };
+ struct mop mop = { 32, 4 };
+
+ e.reg[8] = 0xdeadbeef;
+ emac_operation(&e, &mop);
+
+ if (e.reg[8] != 0x90abcdef)
+ __builtin_abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57091.c b/gcc/testsuite/gcc.target/i386/pr57091.c
new file mode 100644
index 0000000000..4fc7ed769b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57091.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mcmodel=large" { target lp64 } } */
+void (*bar)();
+
+void foo (void)
+{
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57097.c b/gcc/testsuite/gcc.target/i386/pr57097.c
new file mode 100644
index 0000000000..2f0093840d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57097.c
@@ -0,0 +1,29 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fPIC" } */
+extern double ad[], bd[], cd[], dd[];
+extern long long all[], bll[], cll[], dll[];
+
+int
+main (int i, char **a)
+{
+ bd[i] = i + 64;
+ if (i % 3 == 0)
+ {
+ cd[i] = i;
+ }
+ dd[i] = i / 2;
+ ad[i] = i * 2;
+ if (i % 3 == 1)
+ {
+ dll[i] = 127;
+ }
+ dll[i] = i;
+ cll[i] = i * 2;
+ switch (i % 3)
+ {
+ case 0:
+ bll[i] = i + 64;
+ }
+ all[i] = i / 2;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57098.c b/gcc/testsuite/gcc.target/i386/pr57098.c
new file mode 100644
index 0000000000..c0f1cc34cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57098.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-msse4 -mcmodel=large" } */
+
+typedef int V __attribute__((vector_size(16)));
+
+void
+foo (V *p, V *mask)
+{
+ *p = __builtin_shuffle (*p, *mask);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57106.c b/gcc/testsuite/gcc.target/i386/pr57106.c
new file mode 100644
index 0000000000..6fccd8aac8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57106.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fschedule-insns -funroll-all-loops -fcompare-debug" } */
+
+typedef void block128_f (int *, int);
+
+void
+foo (int *out, int *iv, block128_f block)
+{
+ while (1)
+ {
+ *out = *out ^ *iv;
+ block (out, *out);
+ iv = out;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57189.c b/gcc/testsuite/gcc.target/i386/pr57189.c
new file mode 100644
index 0000000000..389052cd66
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57189.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msse2 -march=k8" } */
+/* { dg-final { scan-assembler-not "movaps" } } */
+
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+int test (__v4si __A)
+{
+ return __builtin_ia32_vec_ext_v4si (__A, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57233.c b/gcc/testsuite/gcc.target/i386/pr57233.c
new file mode 100644
index 0000000000..34182fa7dc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57233.c
@@ -0,0 +1,15 @@
+/* PR tree-optimization/57233 */
+/* { dg-do compile { target avx } } */
+/* { dg-options "-O2 -mavx -mno-xop" } */
+
+typedef unsigned V4 __attribute__((vector_size(4 * sizeof (int))));
+V4 a;
+
+__attribute__((noinline)) void
+foo (void)
+{
+ a = (a << 2) | (a >> 30);
+}
+
+/* { dg-final { scan-assembler "vpsrld\[^\n\r]*30" } } */
+/* { dg-final { scan-assembler "vpslld\[^\n\r]*2" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr57264.c b/gcc/testsuite/gcc.target/i386/pr57264.c
new file mode 100644
index 0000000000..46fce7f04e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57264.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-options "-O1 -mcld" } */
+
+void test (int x, int **pp)
+{
+ while (x)
+ {
+ int *ip = *pp;
+ int *op = *pp;
+ while (*ip)
+ {
+ int v = *ip++;
+ *op++ = v + 1;
+ }
+ }
+}
+
+/* { dg-final { scan-assembler-not "stosl" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr57275.c b/gcc/testsuite/gcc.target/i386/pr57275.c
new file mode 100644
index 0000000000..01b9bb416e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57275.c
@@ -0,0 +1,39 @@
+/* { dg-do run } */
+/* { dg-options "-O3 -march=native" } */
+
+extern void abort (void);
+
+#define N 1024
+
+float a[N], b[N], c[N];
+int k[N];
+
+__attribute__((noinline, noclone)) void
+f (void)
+{
+ int i;
+ for (i = 0; i < N; i++)
+ {
+ a[i] = b[k[i]];
+ b[i] = c[i];
+ }
+}
+
+int main ()
+{
+ int i;
+
+ for (i = 0; i < N; i++)
+ {
+ k[i] = i%2;
+ b[i] = i;
+ c[i] = 179;
+ }
+
+ f ();
+
+ if (a[2] != 179 || a[3] != 179)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57293.c b/gcc/testsuite/gcc.target/i386/pr57293.c
new file mode 100644
index 0000000000..fa016d55f2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57293.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -fomit-frame-pointer" } */
+/* { dg-final { scan-assembler-not "%ebp" } } */
+
+__attribute__((__noinline__, __noclone__, __stdcall__)) void g(int a)
+{
+ __builtin_printf("in g(): %d\n", a);
+}
+
+__attribute__((__noinline__, __noclone__, __thiscall__)) void h(int a, int b)
+{
+ __builtin_printf("in h(): %d %d\n", a, b);
+}
+
+void f()
+{
+ g(0);
+ h(0, 1);
+ __builtin_puts("in f()");
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57410.c b/gcc/testsuite/gcc.target/i386/pr57410.c
new file mode 100644
index 0000000000..6ca65d0003
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57410.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O -fpeel-loops" } */
+
+extern char outbuffer[];
+extern char buffer[];
+
+void foo(int j)
+{
+ unsigned i, fp = fp;
+ for (i = 0; i < 6; i++)
+ buffer[j++] = outbuffer[fp - i];
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57459.c b/gcc/testsuite/gcc.target/i386/pr57459.c
new file mode 100644
index 0000000000..75101145af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57459.c
@@ -0,0 +1,60 @@
+/* PR rtl-optimization/57459 */
+/* { dg-do run } */
+/* { dg-options "-fno-inline -O2 -minline-all-stringops -fno-omit-frame-pointer" } */
+
+int total1[10], total2[10], total3[10], total4[10], total5[10], a[20];
+int len;
+
+void stackclean() {
+ void *ptr = __builtin_alloca(20000);
+ __builtin_memset(ptr, 0, 20000);
+}
+
+void foo(const char *s) {
+ int r1 = a[1];
+ int r2 = a[2];
+ int r3 = a[3];
+ int r4 = a[4];
+ int r5 = a[5];
+
+ len = __builtin_strlen(s);
+
+ if (s != 0)
+ return;
+
+ while (r1) {
+ total1[r1] = r1;
+ r1--;
+ }
+
+ while (r2) {
+ total2[r2] = r2;
+ r2--;
+ }
+
+ while (r3) {
+ total3[r3] = r3;
+ r3--;
+ }
+
+ while (r4) {
+ total4[r4] = r4;
+ r4--;
+ }
+
+ while (r5) {
+ total5[r5] = r5;
+ r5--;
+ }
+}
+
+extern void abort (void);
+
+int main() {
+ stackclean();
+ foo("abcdefgh");
+ if (len != 8)
+ abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr57655.c b/gcc/testsuite/gcc.target/i386/pr57655.c
new file mode 100644
index 0000000000..586d338622
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57655.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx -mvzeroupper -mno-fp-ret-in-387" }
+
+/* { dg-error "x87 register return with x87 disabled" "" { target { ! ia32 } } 8 } */
+
+long double
+foo (long double x)
+{
+ return __builtin_ilogbl (x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57736.c b/gcc/testsuite/gcc.target/i386/pr57736.c
new file mode 100644
index 0000000000..120e5dc3a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57736.c
@@ -0,0 +1,41 @@
+/* PR target/57736 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+#include <x86intrin.h>
+
+unsigned long long
+f1 (void)
+{
+ return __rdtsc ();
+}
+
+unsigned long long
+f2 (unsigned int *x)
+{
+ return __rdtscp (x);
+}
+
+unsigned long long
+f3 (unsigned int x)
+{
+ return __rdpmc (x);
+}
+
+void
+f4 (void)
+{
+ __rdtsc ();
+}
+
+void
+f5 (unsigned int *x)
+{
+ __rdtscp (x);
+}
+
+void
+f6 (unsigned int x)
+{
+ __rdpmc (x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57756.c b/gcc/testsuite/gcc.target/i386/pr57756.c
new file mode 100644
index 0000000000..f3faa4f816
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57756.c
@@ -0,0 +1,20 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-sse3" } */
+
+/* callee cannot be inlined into caller because it has a higher target ISA. */
+__attribute__((always_inline,target("sse4.2")))
+__inline int callee () /* { dg-error "inlining failed in call to always_inline" } */
+{
+ return 0;
+}
+
+__attribute__((target("sse")))
+__inline int caller ()
+{
+ return callee(); /* { dg-error "called from here" } */
+}
+
+int main ()
+{
+ return caller();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57756_2.c b/gcc/testsuite/gcc.target/i386/pr57756_2.c
new file mode 100644
index 0000000000..0227d8ff40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57756_2.c
@@ -0,0 +1,132 @@
+/* { dg-do run } */
+/* { dg-options "-mno-sse2 -mno-popcnt -mno-avx" } */
+
+
+__attribute__((always_inline,target("avx2")))
+__inline int c1 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("avx")))
+__inline int c2 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("popcnt")))
+__inline int c3 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("sse4.2")))
+__inline int c4 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("sse4.1")))
+__inline int c5 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("ssse3")))
+__inline int c6 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("sse3")))
+__inline int c7 ()
+{
+ return 0;
+}
+
+__attribute__((always_inline,target("sse2")))
+__inline int c8 ()
+{
+ return 0;
+}
+
+int nop ()
+{
+ return 1;
+}
+
+#pragma GCC push_options
+#pragma GCC target("sse2")
+int C8 ()
+{
+ return c8 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("sse3")
+int C7 ()
+{
+ return c7 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("ssse3")
+int C6 ()
+{
+ return c6 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("sse4.1")
+int C5 ()
+{
+ return c5 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("sse4.2")
+int C4 ()
+{
+ return c4 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("popcnt")
+int C3 ()
+{
+ return c3 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("avx")
+int C2 ()
+{
+ return c2 ();
+}
+#pragma GCC pop_options
+
+
+#pragma GCC push_options
+#pragma GCC target("avx2")
+int C1 ()
+{
+ return c1 ();
+}
+#pragma GCC pop_options
+
+int main ()
+{
+ return C1 () + C2 () + C3 () + C4 () + C5 () + C6 () + C7 () + C8 ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57777.c b/gcc/testsuite/gcc.target/i386/pr57777.c
new file mode 100644
index 0000000000..9c1a392aa9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57777.c
@@ -0,0 +1,13 @@
+/* PR target/57777 */
+/* { dg-do assemble { target avx2 } } */
+/* { dg-options "-O3 -mavx2" } */
+/* { dg-additional-options "-fpic" { target fpic } } */
+
+void
+foo (unsigned long *x, int *y)
+{
+ static unsigned long b[2] = { 0x0UL, 0x9908b0dfUL };
+ int c;
+ for (c = 0; c < 512; c++)
+ x[c] = b[x[c] & 1UL];
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57807.c b/gcc/testsuite/gcc.target/i386/pr57807.c
new file mode 100644
index 0000000000..48c1e99e96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57807.c
@@ -0,0 +1,11 @@
+/* { dg-do assemble } */
+/* { dg-options "-msse2 -masm=intel" } */
+/* { dg-require-effective-target sse2 } */
+/* { dg-require-effective-target masm_intel } */
+
+typedef double __v2df __attribute__((__vector_size__(16)));
+typedef double __m128d __attribute__((__vector_size__(16), __may_alias__));
+
+__m128d _mm_unpacklo_pd(__m128d __A, __m128d __B) {
+ return (__m128d)__builtin_ia32_unpcklpd((__v2df)__A, (__v2df)__B);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr57819.c b/gcc/testsuite/gcc.target/i386/pr57819.c
new file mode 100644
index 0000000000..b086a40c4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57819.c
@@ -0,0 +1,38 @@
+/* PR target/57819 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=core2" } */
+
+void foo (void);
+
+__extension__ typedef __INTPTR_TYPE__ intptr_t;
+
+int
+test1 (intptr_t x, intptr_t n)
+{
+ n &= sizeof (intptr_t) * __CHAR_BIT__ - 1;
+
+ if (x & ((intptr_t) 1 << n))
+ foo ();
+
+ return 0;
+}
+
+int
+test2 (intptr_t x, intptr_t n)
+{
+ if (x & ((intptr_t) 1 << ((int) n & (sizeof (intptr_t) * __CHAR_BIT__ - 1))))
+ foo ();
+
+ return 0;
+}
+
+int
+test3 (intptr_t x, intptr_t n)
+{
+ if (x & ((intptr_t) 1 << ((int) n & ((int) sizeof (intptr_t) * __CHAR_BIT__ - 1))))
+ foo ();
+
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "and\[lq\]\[ \t\]" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr57848.c b/gcc/testsuite/gcc.target/i386/pr57848.c
new file mode 100644
index 0000000000..c686b37282
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57848.c
@@ -0,0 +1,6 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+extern unsigned int __builtin_ia32_crc32si (unsigned int, unsigned int);
+#pragma GCC target("sse4.2")
+
diff --git a/gcc/testsuite/gcc.target/i386/pr57915.c b/gcc/testsuite/gcc.target/i386/pr57915.c
new file mode 100644
index 0000000000..0b143e0cc4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr57915.c
@@ -0,0 +1,33 @@
+/* PR rtl-optimization/57915 */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+extern struct T { char a[8]; char b[16]; } t;
+int c;
+void foo (void);
+
+extern inline char *
+baz (char *x, const char *y)
+{
+ const char *e = y;
+ unsigned long f, g;
+ asm ("" : "+c" (f), "+D" (e) : "a" ('\0'), "X" (*e));
+ g = e - 1 - y;
+ __builtin_memcpy (x, y, g);
+ x[g] = '\0';
+ return x;
+}
+
+void
+bar (void)
+{
+ char d[16];
+ baz (d, t.b);
+
+ for (;;)
+ {
+ foo ();
+ if (c)
+ baz (d, t.b);
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58048.c b/gcc/testsuite/gcc.target/i386/pr58048.c
new file mode 100644
index 0000000000..a7249d0a91
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58048.c
@@ -0,0 +1,11 @@
+/* PR target/58048 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+void
+div3 (void)
+{
+ double tmp1;
+
+ asm volatile ("fscale":"=t" (tmp1):"0" (0), "u" (0)); /* { dg-error "inconsistent operand constraints in an 'asm'" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58137.c b/gcc/testsuite/gcc.target/i386/pr58137.c
new file mode 100644
index 0000000000..0a7daf83cd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58137.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx2" } */
+
+typedef unsigned int U32;
+
+struct sv {
+ void* sv_any;
+ U32 sv_refcnt;
+ U32 sv_flags;
+};
+typedef struct sv SV;
+
+struct xrv {
+ SV * xrv_rv;
+};
+typedef struct xrv XRV;
+
+extern XRV * PL_xrv_root;
+
+void
+more_xrv (void)
+{
+ register XRV* xrv;
+ register XRV* xrvend;
+ xrv = PL_xrv_root;
+ xrvend = &xrv[200 / sizeof (XRV) - 1];
+ while (xrv < xrvend)
+ {
+ xrv->xrv_rv = (SV*)(xrv + 1);
+ xrv++;
+ }
+ xrv->xrv_rv = 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58218.c b/gcc/testsuite/gcc.target/i386/pr58218.c
new file mode 100644
index 0000000000..4145242059
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58218.c
@@ -0,0 +1,5 @@
+/* PR target/58218 */
+/* { dg-do assemble { target lp64 } } */
+/* { dg-options "-mcmodel=medium" } */
+
+struct { float x[16385]; } a = { { 0.f, } };
diff --git a/gcc/testsuite/gcc.target/i386/pr58418.c b/gcc/testsuite/gcc.target/i386/pr58418.c
new file mode 100644
index 0000000000..27634c9c2f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58418.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+extern void abort (void);
+int a, b, *c = &b, d = -1, e, f, *g, *h = &f, **i = &g, j;
+
+unsigned int
+foo (unsigned int p)
+{
+ return p == 0 ? 0 : 1 / p;
+}
+
+static int *
+bar ()
+{
+ *c = *h = foo (d) & (-9 < d);
+ for (e = 0; e; e++)
+ ;
+ return 0;
+}
+
+int
+main ()
+{
+ for (; j; j++)
+ for (;; a--)
+ ;
+ *i = bar ();
+ if (f != 0)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58679-1.c b/gcc/testsuite/gcc.target/i386/pr58679-1.c
new file mode 100644
index 0000000000..91db8e63e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58679-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+typedef struct { char a; long long b; } S;
+
+S foo (S x, S y)
+{
+ S z;
+
+ z.a = 0;
+ z.b = x.b / y.b;
+ return z;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58679-2.c b/gcc/testsuite/gcc.target/i386/pr58679-2.c
new file mode 100644
index 0000000000..b63545bc07
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58679-2.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+int f (long long a, long long b)
+{
+ return (a * b) >> 16;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58690.c b/gcc/testsuite/gcc.target/i386/pr58690.c
new file mode 100644
index 0000000000..87a87cc9c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58690.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O2 -mx32 -maddress-mode=short" } */
+
+struct gomp_thread
+{
+ char foo[41];
+};
+extern __thread struct gomp_thread gomp_tls_data;
+void
+foo (void)
+{
+ __builtin_memset (&gomp_tls_data, '\0', sizeof (gomp_tls_data));
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58759.c b/gcc/testsuite/gcc.target/i386/pr58759.c
new file mode 100644
index 0000000000..8257dde533
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58759.c
@@ -0,0 +1,38 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+
+int a, b, c, d, e, f, h, l, m, n, k, o;
+long long g;
+
+struct S
+{
+ int f1;
+ int f2;
+ int f3;
+ int f4;
+};
+
+static struct S i = {0,0,0,0}, j;
+
+void
+foo ()
+{
+ m = 1 & d;
+ n = b + c;
+ o = k >> 1;
+ f = 0 == e;
+}
+
+int
+main ()
+{
+ for (; h < 1; h++)
+ {
+ g = 1 | (0 > 1 - a ? 0 : a);
+ foo ();
+ for (l = 0; l < 3; l++)
+ j = i;
+ }
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58853.c b/gcc/testsuite/gcc.target/i386/pr58853.c
new file mode 100644
index 0000000000..046da8bee5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58853.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-minline-all-stringops" } */
+/* { dg-additional-options "-mtune=pentiumpro" { target { ia32 } } } */
+
+void
+my_memcpy (char *dest, const char *src, int n)
+{
+ __builtin_memcpy (dest, src, n);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr58944.c b/gcc/testsuite/gcc.target/i386/pr58944.c
new file mode 100644
index 0000000000..9a92e9b6ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr58944.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-Wunused-macros" } */
+
+#pragma GCC push_options
+#pragma GCC target("xsaveopt")
+void fn1(void) {}
+#pragma GCC pop_options
diff --git a/gcc/testsuite/gcc.target/i386/pr59021.c b/gcc/testsuite/gcc.target/i386/pr59021.c
new file mode 100644
index 0000000000..a1df27b105
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59021.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx -mvzeroupper" } */
+
+extern void abort (void);
+
+struct S {
+ int i1;
+ int i2;
+ int i3;
+};
+
+typedef double v4df __attribute__ ((vector_size (32)));
+
+extern int foo (v4df, int i1, int i2, int i3, int i4, int i5, struct S s);
+
+void bar (v4df v, struct S s)
+{
+ int r = foo (v, 1, 2, 3, 4, 5, s);
+ if (r)
+ abort ();
+}
+
+/* { dg-final { scan-assembler-not "vzeroupper" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59034-1.c b/gcc/testsuite/gcc.target/i386/pr59034-1.c
new file mode 100644
index 0000000000..1f4c4e04a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59034-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=short" } */
+
+extern int foo(int, ...);
+int bar(void) {
+ long double l = 1.2345E6;
+ foo(0, l);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59034-2.c b/gcc/testsuite/gcc.target/i386/pr59034-2.c
new file mode 100644
index 0000000000..14e594ba60
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59034-2.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-require-effective-target maybe_x32 } */
+/* { dg-options "-O -mx32 -mtune=corei7 -maddress-mode=long" } */
+
+extern int foo(int, ...);
+int bar(void) {
+ long double l = 1.2345E6;
+ foo(0, l);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59099.c b/gcc/testsuite/gcc.target/i386/pr59099.c
new file mode 100644
index 0000000000..cf4a8da7db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59099.c
@@ -0,0 +1,77 @@
+/* { dg-do run } */
+/* { dg-require-effective-target fpic } */
+/* { dg-options "-O2 -fPIC" } */
+
+void (*pfn)(void);
+
+struct s
+{
+ void** q;
+ int h;
+ int t;
+ int s;
+};
+
+
+void* f (struct s *, struct s *) __attribute__ ((noinline, regparm(1)));
+
+void*
+__attribute__ ((regparm(1)))
+f (struct s *p, struct s *p2)
+{
+ void *gp, *gp1;
+ int t, h, s, t2, h2, c, i;
+
+ if (p2->h == p2->t)
+ return 0;
+
+ (*pfn) ();
+
+ h = p->h;
+ t = p->t;
+ s = p->s;
+
+ h2 = p2->h;
+ t2 = p2->t;
+
+ gp = p2->q[h2++];
+
+ c = (t2 - h2) / 2;
+ for (i = 0; i != c; i++)
+ {
+ if (t == h || (h == 0 && t == s - 1))
+ break;
+ gp1 = p2->q[h2++];
+ p->q[t++] = gp1;
+ if (t == s)
+ t = 0;
+ }
+
+ p2->h = h2;
+ return gp;
+}
+
+static void gn () { }
+
+int
+main()
+{
+ struct s s1, s2;
+ void *q[10];
+
+ pfn = gn;
+
+ s1.q = q;
+ s1.h = 0;
+ s1.t = 2;
+ s1.s = 4;
+
+ s2.q = q;
+ s2.h = 0;
+ s2.t = 4;
+ s2.s = 2;
+
+ f (&s1, &s2);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59133.c b/gcc/testsuite/gcc.target/i386/pr59133.c
new file mode 100644
index 0000000000..ef8ef741de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59133.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -ffast-math -march=core-avx2" } */
+
+#define XX 0
+#define YY 1
+#define ZZ 2
+#define DIM 3
+typedef float matrix[DIM][DIM];
+typedef float rvec[DIM];
+extern int det (matrix);
+extern void foo(matrix);
+
+void bar1 (int n,int *index,rvec x[],matrix trans)
+{
+ float xt,yt,zt;
+ int i,ii;
+
+ for(i=0; (i<n); i++) {
+ ii=index ? index[i] : i;
+ xt=x[ii][XX];
+ yt=x[ii][YY];
+ zt=x[ii][ZZ];
+ x[ii][XX]=trans[XX][XX]*xt+trans[XX][YY]*yt+trans[XX][ZZ]*zt;
+ x[ii][YY]=trans[YY][XX]*xt+trans[YY][YY]*yt+trans[YY][ZZ]*zt;
+ x[ii][ZZ]=trans[ZZ][XX]*xt+trans[ZZ][YY]*yt+trans[ZZ][ZZ]*zt;
+ }
+}
+
+
+void bar2 (int n, rvec x[])
+{
+ int m;
+ matrix trans;
+
+ foo (trans);
+
+ if (det (trans) < 0) {
+ for(m=0; (m<DIM); m++)
+ trans[ZZ][m] = -trans[ZZ][m];
+ }
+ bar1 (n,(int*) 0,x,trans);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59153.c b/gcc/testsuite/gcc.target/i386/pr59153.c
new file mode 100644
index 0000000000..262726a945
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59153.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -flive-range-shrinkage -mdispatch-scheduler -march=bdver1" } */
+
+int foo (float f)
+{
+ union
+ {
+ float f;
+ int i;
+ } z = { .f = f };
+
+ return z.i - 1;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59363.c b/gcc/testsuite/gcc.target/i386/pr59363.c
new file mode 100644
index 0000000000..a4e1240354
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59363.c
@@ -0,0 +1,24 @@
+/* PR target/59363 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mtune=amdfam10" } */
+
+typedef struct {
+ int ctxlen;
+ long interhunkctxlen;
+ int flags;
+ long find_func;
+ void *find_func_priv;
+ int hunk_func;
+} xdemitconf_t;
+
+__attribute__((noinline))
+int xdi_diff(xdemitconf_t *xecfg) {
+ if (xecfg->hunk_func == 0)
+ __builtin_abort();
+ return 0;
+}
+int main() {
+ xdemitconf_t xecfg = {0};
+ xecfg.hunk_func = 1;
+ return xdi_diff(&xecfg);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59390.c b/gcc/testsuite/gcc.target/i386/pr59390.c
new file mode 100644
index 0000000000..749c61a58f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59390.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -O3 -mno-fma -mno-fma4" } */
+
+extern double fma (double, double, double);
+void fun() __attribute__((target("fma")));
+
+void
+other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++) {
+ out[i] = fma(a[i], b[i], c[i]);
+ }
+}
+
+/* { dg-final { scan-assembler-not "vfmadd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59390_1.c b/gcc/testsuite/gcc.target/i386/pr59390_1.c
new file mode 100644
index 0000000000..632eb6f9a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59390_1.c
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -O3" } */
+
+extern double fma (double, double, double);
+void fun() __attribute__((target("fma")));
+
+__attribute__((target("fma")))
+void
+other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++) {
+ out[i] = fma(a[i], b[i], c[i]);
+ }
+}
+
+/* { dg-final { scan-assembler "vfmadd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59390_2.c b/gcc/testsuite/gcc.target/i386/pr59390_2.c
new file mode 100644
index 0000000000..6142a085ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59390_2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99 -O3 -mfma" } */
+
+extern double fma (double, double, double);
+void fun() __attribute__((target("fma")));
+
+void
+other_fun(double *restrict out, double * restrict a, double * restrict b, double * restrict c, int n)
+{
+ int i;
+ for (i = 0; i < n; i++) {
+ out[i] = fma(a[i], b[i], c[i]);
+ }
+}
+
+/* { dg-final { scan-assembler "vfmadd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59405.c b/gcc/testsuite/gcc.target/i386/pr59405.c
new file mode 100644
index 0000000000..1136e2e450
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59405.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-options "-mmmx -mfpmath=387" } */
+
+#include "mmx-check.h"
+
+#include <mmintrin.h>
+
+typedef float float32x2_t __attribute__ ((vector_size (8)));
+
+float
+foo32x2_be (float32x2_t x)
+{
+ _mm_empty ();
+ return x[1];
+}
+
+static void
+mmx_test (void)
+{
+ float32x2_t b = { 0.0f, 1.0f };
+
+ if (foo32x2_be (b) != 1.0f)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59470.c b/gcc/testsuite/gcc.target/i386/pr59470.c
new file mode 100644
index 0000000000..0d9952fb4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59470.c
@@ -0,0 +1,17 @@
+/* PR middle-end/58956 */
+/* PR middle-end/59470 */
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+
+int a, b, d[1024];
+
+int
+main ()
+{
+ int c = a;
+ asm ("{movl $6, (%2); movl $1, %0|mov dword ptr [%2], 6; mov %0, 1}"
+ : "=r" (d[c]) : "rm" (b), "r" (&a) : "memory");
+ if (d[0] != 1 || d[6] != 0)
+ __builtin_abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-1.c b/gcc/testsuite/gcc.target/i386/pr59501-1.c
new file mode 100644
index 0000000000..18db93a9be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-1.c
@@ -0,0 +1,31 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -mno-accumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include CHECK_H
+
+typedef double V __attribute__ ((vector_size (32)));
+
+__attribute__((noinline, noclone)) V
+foo (double *x, unsigned *y)
+{
+ V r = { x[y[0]], x[y[1]], x[y[2]], x[y[3]] };
+ return r;
+}
+
+static void
+TEST (void)
+{
+ double a[16];
+ unsigned b[4] = { 5, 0, 15, 7 };
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = 0.5 + i;
+ V v = foo (a, b);
+ if (v[0] != 5.5 || v[1] != 0.5 || v[2] != 15.5 || v[3] != 7.5)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-1a.c b/gcc/testsuite/gcc.target/i386/pr59501-1a.c
new file mode 100644
index 0000000000..5b468e5563
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-1a.c
@@ -0,0 +1,17 @@
+/* PR target/59501 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mavx -mno-accumulate-outgoing-args" } */
+
+typedef double V __attribute__ ((vector_size (32)));
+
+V
+foo (double *x, unsigned *y)
+{
+ V r = { x[y[0]], x[y[1]], x[y[2]], x[y[3]] };
+ return r;
+}
+
+/* Verify no dynamic realignment is performed. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*sp" } } */
+/* And DRAP isn't needed either. */
+/* { dg-final { scan-assembler-not "r10" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-2.c b/gcc/testsuite/gcc.target/i386/pr59501-2.c
new file mode 100644
index 0000000000..1d53d2ead6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-2.c
@@ -0,0 +1,6 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -maccumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#include "pr59501-1.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-2a.c b/gcc/testsuite/gcc.target/i386/pr59501-2a.c
new file mode 100644
index 0000000000..c0fe362696
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-2a.c
@@ -0,0 +1,10 @@
+/* PR target/59501 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mavx -maccumulate-outgoing-args" } */
+
+#include "pr59501-1a.c"
+
+/* Verify no dynamic realignment is performed. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*sp" } } */
+/* And DRAP isn't needed either. */
+/* { dg-final { scan-assembler-not "r10" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-3.c b/gcc/testsuite/gcc.target/i386/pr59501-3.c
new file mode 100644
index 0000000000..f27e9b3bb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-3.c
@@ -0,0 +1,31 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -mno-accumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include CHECK_H
+
+typedef double V __attribute__ ((vector_size (32)));
+
+__attribute__((noinline, noclone)) V
+foo (double *x, int a, int b, int c, int d, int e, int f, unsigned *y)
+{
+ V r = { x[y[0]], x[y[1]], x[y[2]], x[y[3]] };
+ return r;
+}
+
+static void
+TEST (void)
+{
+ double a[16];
+ unsigned b[4] = { 5, 0, 15, 7 };
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = 0.5 + i;
+ V v = foo (a, 0, 0, 0, 0, 0, 0, b);
+ if (v[0] != 5.5 || v[1] != 0.5 || v[2] != 15.5 || v[3] != 7.5)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-3a.c b/gcc/testsuite/gcc.target/i386/pr59501-3a.c
new file mode 100644
index 0000000000..ded4336fc8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-3a.c
@@ -0,0 +1,15 @@
+/* PR target/59501 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mavx -mno-accumulate-outgoing-args" } */
+
+typedef double V __attribute__ ((vector_size (32)));
+
+V
+foo (double *x, int a, int b, int c, int d, int e, int f, unsigned *y)
+{
+ V r = { x[y[0]], x[y[1]], x[y[2]], x[y[3]] };
+ return r;
+}
+
+/* Verify no dynamic realignment is performed. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*sp" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-4.c b/gcc/testsuite/gcc.target/i386/pr59501-4.c
new file mode 100644
index 0000000000..57da107803
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-4.c
@@ -0,0 +1,6 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -maccumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#include "pr59501-3.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-4a.c b/gcc/testsuite/gcc.target/i386/pr59501-4a.c
new file mode 100644
index 0000000000..5c3cb683a2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-4a.c
@@ -0,0 +1,8 @@
+/* PR target/59501 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mavx -maccumulate-outgoing-args" } */
+
+#include "pr59501-3a.c"
+
+/* Verify no dynamic realignment is performed. */
+/* { dg-final { scan-assembler-not "and\[^\n\r]*sp" { xfail *-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-5.c b/gcc/testsuite/gcc.target/i386/pr59501-5.c
new file mode 100644
index 0000000000..2ec9f0cb57
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-5.c
@@ -0,0 +1,40 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -mno-accumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#define CHECK_H "avx-check.h"
+#define TEST avx_test
+
+#include CHECK_H
+
+typedef double V __attribute__ ((vector_size (32)));
+
+__attribute__((noinline, noclone)) void
+bar (char *p)
+{
+ p[0] = 1;
+ p[37] = 2;
+ asm volatile ("" : : "r" (p) : "memory");
+}
+
+__attribute__((noinline, noclone)) V
+foo (double *x, int a, int b, int c, int d, int e, int f, unsigned *y)
+{
+ bar (__builtin_alloca (a + b + c + d + e + f));
+ V r = { x[y[0]], x[y[1]], x[y[2]], x[y[3]] };
+ return r;
+}
+
+static void
+TEST (void)
+{
+ double a[16];
+ unsigned b[4] = { 5, 0, 15, 7 };
+ int i;
+ for (i = 0; i < 16; i++)
+ a[i] = 0.5 + i;
+ V v = foo (a, 0, 30, 0, 0, 8, 0, b);
+ if (v[0] != 5.5 || v[1] != 0.5 || v[2] != 15.5 || v[3] != 7.5)
+ __builtin_abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59501-6.c b/gcc/testsuite/gcc.target/i386/pr59501-6.c
new file mode 100644
index 0000000000..8d166cef2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59501-6.c
@@ -0,0 +1,6 @@
+/* PR target/59501 */
+/* { dg-do run } */
+/* { dg-options "-O2 -mavx -maccumulate-outgoing-args" } */
+/* { dg-require-effective-target avx } */
+
+#include "pr59501-5.c"
diff --git a/gcc/testsuite/gcc.target/i386/pr59539-1.c b/gcc/testsuite/gcc.target/i386/pr59539-1.c
new file mode 100644
index 0000000000..9b34053c4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59539-1.c
@@ -0,0 +1,16 @@
+/* PR target/59539 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx" } */
+
+#include <immintrin.h>
+
+int
+foo (void *p1, void *p2)
+{
+ __m128i d1 = _mm_loadu_si128 ((__m128i *) p1);
+ __m128i d2 = _mm_loadu_si128 ((__m128i *) p2);
+ __m128i result = _mm_cmpeq_epi16 (d1, d2);
+ return _mm_movemask_epi8 (result);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59539-2.c b/gcc/testsuite/gcc.target/i386/pr59539-2.c
new file mode 100644
index 0000000000..b53b8c407a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59539-2.c
@@ -0,0 +1,16 @@
+/* PR target/59539 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx2" } */
+
+#include <immintrin.h>
+
+int
+foo (void *p1, void *p2)
+{
+ __m256i d1 = _mm256_loadu_si256 ((__m256i *) p1);
+ __m256i d2 = _mm256_loadu_si256 ((__m256i *) p2);
+ __m256i result = _mm256_cmpeq_epi16 (d1, d2);
+ return _mm256_movemask_epi8 (result);
+}
+
+/* { dg-final { scan-assembler-times "vmovdqu" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59544.c b/gcc/testsuite/gcc.target/i386/pr59544.c
new file mode 100644
index 0000000000..5499a53d95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59544.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mavx -ftree-vectorize -fdump-tree-vect-details" } */
+
+void test1(short * __restrict__ x, short * __restrict__ y, short * __restrict__ z)
+{
+ int i;
+ for (i=127; i>=0; i--) {
+ x[i] = y[127-i] + z[127-i];
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59588-1.c b/gcc/testsuite/gcc.target/i386/pr59588-1.c
new file mode 100644
index 0000000000..6f5fb7238c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59588-1.c
@@ -0,0 +1,7 @@
+/* { dg-do preprocess } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-march=i686" } */
+
+#ifndef __tune_i686__
+#error "__tune_i686__ should be defined for this test"
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/pr59588-2.c b/gcc/testsuite/gcc.target/i386/pr59588-2.c
new file mode 100644
index 0000000000..7c427e3e1c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59588-2.c
@@ -0,0 +1,7 @@
+/* { dg-do preprocess } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-mtune=i686" } */
+
+#ifndef __tune_i686__
+#error "__tune_i686__ should be defined for this test"
+#endif
diff --git a/gcc/testsuite/gcc.target/i386/pr59591-1.c b/gcc/testsuite/gcc.target/i386/pr59591-1.c
new file mode 100644
index 0000000000..a88c6fd936
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59591-1.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/59591 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fopenmp-simd -mavx2 -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx2 } */
+
+#define CHECK_H "avx2-check.h"
+#define TEST avx2_test
+
+#include "../../gcc.dg/vect/pr59591-1.c"
+
+#include CHECK_H
+
+static void
+TEST (void)
+{
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59591-2.c b/gcc/testsuite/gcc.target/i386/pr59591-2.c
new file mode 100644
index 0000000000..c0323649b4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59591-2.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/59591 */
+/* { dg-do run } */
+/* { dg-options "-O2 -fopenmp-simd -mavx2 -fno-vect-cost-model" } */
+/* { dg-require-effective-target avx2 } */
+
+#define CHECK_H "avx2-check.h"
+#define TEST avx2_test
+
+#include "../../gcc.dg/vect/pr59591-2.c"
+
+#include CHECK_H
+
+static void
+TEST (void)
+{
+ bar ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59625.c b/gcc/testsuite/gcc.target/i386/pr59625.c
new file mode 100644
index 0000000000..8e1a7794bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59625.c
@@ -0,0 +1,36 @@
+/* PR target/59625 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mtune=atom" } */
+
+int
+foo (void)
+{
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ asm goto ("" : : : : lab);
+ return 0;
+lab:
+ return 1;
+}
+
+/* Verify we don't consider asm goto as a jump for four jumps limit
+ optimization. asm goto doesn't have to contain a jump at all,
+ the branching to labels can happen through different means. */
+/* { dg-final { scan-assembler-not "(p2align\[^\n\r\]*\[\n\r]*\[^\n\r\]*){8}p2align" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59644.c b/gcc/testsuite/gcc.target/i386/pr59644.c
new file mode 100644
index 0000000000..96006b3e33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59644.c
@@ -0,0 +1,42 @@
+/* PR target/59644 */
+/* { dg-do run { target lp64 } } */
+/* { dg-options "-O2 -ffreestanding -mno-sse -mpreferred-stack-boundary=3 -maccumulate-outgoing-args -mno-red-zone" } */
+
+/* This test uses __builtin_trap () instead of e.g. abort,
+ because due to -mpreferred-stack-boundary=3 it should not call
+ any library function from within main (). */
+
+#include <stdarg.h>
+
+__attribute__((noinline, noclone))
+int
+bar (int x, int y, int z, int w, const char *fmt, va_list ap)
+{
+ if (x != 1 || y != 2 || z != 3 || w != 4)
+ __builtin_trap ();
+ if (fmt[0] != 'f' || fmt[1] != 'o' || fmt[2] != 'o' || fmt[3])
+ __builtin_trap ();
+ if (va_arg (ap, int) != 5 || va_arg (ap, int) != 6
+ || va_arg (ap, long long) != 7LL)
+ __builtin_trap ();
+ return 9;
+}
+
+__attribute__((noinline, noclone, optimize ("Os")))
+int
+foo (const char *fmt, ...)
+{
+ va_list ap;
+ va_start (ap, fmt);
+ int r = bar (1, 2, 3, 4, fmt, ap);
+ va_end (ap);
+ return r;
+}
+
+int
+main ()
+{
+ if (foo ("foo", 5, 6, 7LL) != 9)
+ __builtin_trap ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59789.c b/gcc/testsuite/gcc.target/i386/pr59789.c
new file mode 100644
index 0000000000..b1440254bb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59789.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target ia32 } */
+/* { dg-options "-O -march=i686" } */
+
+#pragma GCC push_options
+#pragma GCC target("sse2")
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+typedef long long __m128i __attribute__ ((__vector_size__ (16), __may_alias__));
+
+extern __inline __m128i __attribute__((__gnu_inline__, __always_inline__, __artificial__))
+_mm_set_epi32 (int __q3, int __q2, int __q1, int __q0) /* { dg-error "target specific option mismatch" } */
+{
+ return __extension__ (__m128i)(__v4si){ __q0, __q1, __q2, __q3 };
+}
+#pragma GCC pop_options
+
+
+__m128i
+f1(void)
+{ /* { dg-message "warning: SSE vector return without SSE enabled changes the ABI" } */
+ return _mm_set_epi32 (0, 0, 0, 0); /* { dg-error "called from here" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-1.c b/gcc/testsuite/gcc.target/i386/pr59794-1.c
new file mode 100644
index 0000000000..46bff01817
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-1.c
@@ -0,0 +1,15 @@
+/* PR target/59794 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -mno-mmx" } */
+/* { dg-skip-if "no MMX vector" { *-*-mingw* } } */
+
+typedef int __v2si __attribute__ ((__vector_size__ (8)));
+
+extern __v2si x;
+
+extern void bar (__v2si);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: MMX vector argument without MMX enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-2.c b/gcc/testsuite/gcc.target/i386/pr59794-2.c
new file mode 100644
index 0000000000..f13998214e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-2.c
@@ -0,0 +1,15 @@
+/* PR target/59794 */
+/* { dg-prune-output "ABI for passing parameters" } */
+/* { dg-options "-O2 -mno-sse" } */
+/* { dg-skip-if "no SSE vector" { *-*-mingw* } } */
+
+typedef double __v2df __attribute__ ((__vector_size__ (16)));
+
+extern __v2df x;
+
+extern void bar (__v2df);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: SSE vector argument without SSE enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-3.c b/gcc/testsuite/gcc.target/i386/pr59794-3.c
new file mode 100644
index 0000000000..a65893c63b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-3.c
@@ -0,0 +1,15 @@
+/* PR target/59794 */
+/* { dg-prune-output "ABI for passing parameters" } */
+/* { dg-options "-O2 -mno-avx" } */
+/* { dg-skip-if "no AVX vector" { *-*-mingw* } } */
+
+typedef int __v8si __attribute__ ((__vector_size__ (32)));
+
+extern __v8si x;
+
+extern void bar (__v8si);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: AVX vector argument without AVX enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-4.c b/gcc/testsuite/gcc.target/i386/pr59794-4.c
new file mode 100644
index 0000000000..5ad0b070ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-4.c
@@ -0,0 +1,14 @@
+/* PR target/59794 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -mno-mmx" } */
+/* { dg-skip-if "no MMX vector" { *-*-mingw* } } */
+
+typedef int __v2si __attribute__ ((__vector_size__ (8)));
+
+extern __v2si x;
+
+__v2si
+foo (void)
+{ /* { dg-warning "MMX vector return without MMX enabled changes the ABI" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-5.c b/gcc/testsuite/gcc.target/i386/pr59794-5.c
new file mode 100644
index 0000000000..24c88be094
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-5.c
@@ -0,0 +1,14 @@
+/* PR target/59794 */
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -mno-sse" } */
+/* { dg-skip-if "no SSE vector" { *-*-mingw* } } */
+
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+extern __v4si x;
+
+__v4si
+foo (void)
+{ /* { dg-warning "SSE vector return without SSE enabled changes the ABI" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-6.c b/gcc/testsuite/gcc.target/i386/pr59794-6.c
new file mode 100644
index 0000000000..c809f95792
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-6.c
@@ -0,0 +1,14 @@
+/* PR target/59794 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mno-sse" } */
+/* { dg-skip-if "no SSE vector" { *-*-mingw* } } */
+
+typedef int __v4si __attribute__ ((__vector_size__ (16)));
+
+extern __v4si x;
+
+__v4si
+foo (void)
+{ /* { dg-error "SSE register return with SSE disabled" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59794-7.c b/gcc/testsuite/gcc.target/i386/pr59794-7.c
new file mode 100644
index 0000000000..57fd3d276a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59794-7.c
@@ -0,0 +1,13 @@
+/* PR target/59794 */
+/* { dg-options "-O2 -mno-avx" } */
+/* { dg-skip-if "no AVX vector" { *-*-mingw* } } */
+
+typedef int __v8si __attribute__ ((__vector_size__ (32)));
+
+extern __v8si x;
+
+__v8si
+foo (void)
+{ /* { dg-warning "AVX vector return without AVX enabled changes the ABI" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59839.c b/gcc/testsuite/gcc.target/i386/pr59839.c
new file mode 100644
index 0000000000..dfb89456f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59839.c
@@ -0,0 +1,12 @@
+/* PR target/59839 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx2" } */
+
+#include <x86intrin.h>
+
+void
+test (const float *x)
+{
+ __m256i i = _mm256_set1_epi32 (1);
+ __m256 d = _mm256_i32gather_ps (x, i, 1);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59880.c b/gcc/testsuite/gcc.target/i386/pr59880.c
new file mode 100644
index 0000000000..5a116925fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59880.c
@@ -0,0 +1,14 @@
+/* PR target/59880 */
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2 -mtune=silvermont" } */
+
+register unsigned int r13 __asm ("r13");
+unsigned long long
+foo (void)
+{
+ return r13;
+}
+
+/* Ensure we don't emit a useless zero-extension after another
+ zero-extension. */
+/* { dg-final { scan-assembler-not "%eax, %eax" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr59927.c b/gcc/testsuite/gcc.target/i386/pr59927.c
new file mode 100644
index 0000000000..693c765951
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59927.c
@@ -0,0 +1,17 @@
+/* PR target/59927 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -g" } */
+
+extern void baz (int) __attribute__ ((__ms_abi__));
+
+void
+foo (void (__attribute__ ((ms_abi)) *fn) (int))
+{
+ fn (0);
+}
+
+void
+bar (void)
+{
+ baz (0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr59929.c b/gcc/testsuite/gcc.target/i386/pr59929.c
new file mode 100644
index 0000000000..4591dc4d60
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr59929.c
@@ -0,0 +1,55 @@
+/* { dg-do run } */
+/* { dg-options "-O0 -mno-accumulate-outgoing-args" } */
+/* { dg-options "-O0 -mno-accumulate-outgoing-args -mx32 -maddress-mode=short" { target x32 } } */
+
+void
+__attribute__ ((noinline))
+test (float x1, float x2, float x3, float x4, float x5, float x6,
+ float x7, float x8, float x9, float x10, float x11, float x12,
+ float x13, float x14, float x15, float x16)
+{
+ if (x1 != 91
+ || x2 != 92
+ || x3 != 93
+ || x4 != 94
+ || x5 != 95
+ || x6 != 96
+ || x7 != 97
+ || x8 != 98
+ || x9 != 99
+ || x10 != 100
+ || x11 != 101
+ || x12 != 102
+ || x13 != 103
+ || x14 != 104
+ || x15 != 105
+ || x16 != 106)
+ __builtin_abort ();
+}
+
+float x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13,
+ x14, x15, x16;
+
+int
+main ()
+{
+ x1 = 91;
+ x2 = 92;
+ x3 = 93;
+ x4 = 94;
+ x5 = 95;
+ x6 = 96;
+ x7 = 97;
+ x8 = 98;
+ x9 = 99;
+ x10 = 100;
+ x11 = 101;
+ x12 = 102;
+ x13 = 103;
+ x14 = 104;
+ x15 = 105;
+ x16 = 106;
+ test (x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13,
+ x14, x15, x16);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60077-1.c b/gcc/testsuite/gcc.target/i386/pr60077-1.c
new file mode 100644
index 0000000000..f20ca0a3c0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60077-1.c
@@ -0,0 +1,18 @@
+/* Test that we generate aligned load when memory is aligned. */
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float v8sf __attribute__ ((__vector_size__ (32)));
+
+extern void foo (v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf);
+
+int
+test (void)
+{
+ v8sf x = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
+
+ foo (x, x, x, x, x, x, x, x, x);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60077-2.c b/gcc/testsuite/gcc.target/i386/pr60077-2.c
new file mode 100644
index 0000000000..bbf846f689
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60077-2.c
@@ -0,0 +1,18 @@
+/* Test that we generate aligned load when memory is aligned. */
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -mtune=generic" } */
+/* { dg-final { scan-assembler-not "movups" } } */
+/* { dg-final { scan-assembler "movaps" } } */
+
+typedef float v8sf __attribute__ ((__vector_size__ (32)));
+
+extern void foo (int, int, int, int, int, int, int, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf, v8sf);
+
+int
+test (void)
+{
+ v8sf x = { 0.0, 1.0, 2.0, 3.0, 4.0, 5.0, 6.0, 7.0 };
+
+ foo (1, 2, 3, 4, 5, 6, 7, x, x, x, x, x, x, x, x, x);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60205-1.c b/gcc/testsuite/gcc.target/i386/pr60205-1.c
new file mode 100644
index 0000000000..259959a8e3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60205-1.c
@@ -0,0 +1,15 @@
+/* PR target/60205 */
+/* { dg-prune-output "ABI for passing parameters" } */
+/* { dg-options "-O2 -mno-avx512f" } */
+/* { dg-skip-if "no AVX512F vector" { *-*-mingw* } } */
+
+typedef int __v16si __attribute__ ((__vector_size__ (64)));
+
+extern __v16si x;
+
+extern void bar (__v16si);
+void
+foo (void)
+{
+ bar (x); /* { dg-message "warning: AVX512F vector argument without AVX512F enabled changes the ABI" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60205-2.c b/gcc/testsuite/gcc.target/i386/pr60205-2.c
new file mode 100644
index 0000000000..8a6558793c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60205-2.c
@@ -0,0 +1,13 @@
+/* PR target/60205 */
+/* { dg-options "-O2 -mno-avx512f" } */
+/* { dg-skip-if "no AVX512F vector" { *-*-mingw* } } */
+
+typedef int __v16si __attribute__ ((__vector_size__ (64)));
+
+extern __v16si x;
+
+__v16si
+foo (void)
+{ /* { dg-warning "AVX512F vector return without AVX512F enabled changes the ABI" } */
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60508.c b/gcc/testsuite/gcc.target/i386/pr60508.c
new file mode 100644
index 0000000000..78dfb78152
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60508.c
@@ -0,0 +1,31 @@
+/* { dg-do compile } */
+/* { dg-options "-O -w" } */
+int a = 1, g, h = 1, d, e, *f;
+char b;
+static int c[] = { 0, 0 };
+void fn2 (void);
+
+void
+fn1 (short x, int l)
+{
+lab:
+ {
+ int k, m[0];
+ long j = h ? 0 : 0 / 0;
+ unsigned char n = j;
+ unsigned char i = x >= 0 ? n : n >> x;
+ g = i;
+ for (;;)
+ {
+ if (a)
+ goto lab;
+ while (d)
+ {
+ e = b = c[l];
+ fn2 ();
+ }
+ int o = m[0];
+ f = &k;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60516.c b/gcc/testsuite/gcc.target/i386/pr60516.c
new file mode 100644
index 0000000000..575c8b61d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60516.c
@@ -0,0 +1,20 @@
+/* PR target/60516 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+struct S { char c[65536]; };
+
+__attribute__((ms_abi, thiscall)) void
+foo (void *x, struct S y)
+{
+}
+
+__attribute__((ms_abi, fastcall)) void
+bar (void *x, void *y, struct S z)
+{
+}
+
+__attribute__((ms_abi, stdcall)) void
+baz (struct S x)
+{
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60693.c b/gcc/testsuite/gcc.target/i386/pr60693.c
new file mode 100644
index 0000000000..e6033a783f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60693.c
@@ -0,0 +1,13 @@
+/* PR target/60693 */
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+
+void bar (char *);
+
+void
+foo (void)
+{
+ char buf[4096];
+ __builtin_memcpy (buf, (void *) 0x8000, 4096);
+ bar (buf);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60700.c b/gcc/testsuite/gcc.target/i386/pr60700.c
new file mode 100644
index 0000000000..5428f36162
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60700.c
@@ -0,0 +1,59 @@
+/* PR rtl-optimization/60700 */
+/* { dg-do run { target ia32 } } */
+/* { dg-options "-O3 -march=i686" } */
+
+int
+__attribute__((noinline))
+foo (void)
+{
+ return 0;
+}
+
+void *g = (void *)1;
+
+struct st {
+ char data[36]; /* must be greater than 32. */
+};
+
+int
+__attribute__((noinline))
+repro(struct st **out)
+{
+ int status = 0;
+
+ *out = 0;
+
+ status = foo();
+ if (status != 0) {
+ return status;
+ }
+
+ if (0 == g) {
+ status = 999;
+ return status;
+ }
+
+ *out = (struct st *)__builtin_malloc(sizeof(struct st));
+ if (0 == *out) {
+ status = 42;
+ return status;
+ }
+
+ __builtin_memset(*out, 0, sizeof(struct st));
+
+ return status;
+}
+
+int
+main ()
+{
+ struct st *p;
+ int ret = repro (&p);
+ unsigned int i;
+
+ for (i = 0; i < sizeof (p->data)/sizeof (p->data[0]); i++)
+ if (p->data[i] != 0)
+ __builtin_abort ();
+
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60868.c b/gcc/testsuite/gcc.target/i386/pr60868.c
new file mode 100644
index 0000000000..c30bbfc183
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60868.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -minline-all-stringops -minline-stringops-dynamically -march=core2" } */
+
+void bar (float *);
+
+void foo (void)
+{
+ float b[256] = {0};
+ bar(b);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60901.c b/gcc/testsuite/gcc.target/i386/pr60901.c
new file mode 100644
index 0000000000..f0f25a1dc2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60901.c
@@ -0,0 +1,17 @@
+/* { dg-options "-O -fselective-scheduling -fschedule-insns -fsel-sched-pipelining -fsel-sched-pipelining-outer-loops -fno-tree-dominator-opts" } */
+
+extern int n;
+extern void bar (void);
+extern int baz (int);
+
+void
+foo (void)
+{
+ int i, j;
+ for (j = 0; j < n; j++)
+ {
+ for (i = 1; i < j; i++)
+ bar ();
+ baz (0);
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60902.c b/gcc/testsuite/gcc.target/i386/pr60902.c
new file mode 100644
index 0000000000..b81dcd76f3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60902.c
@@ -0,0 +1,32 @@
+/* { dg-do run } */
+/* { dg-options "-O2" } */
+extern void abort ();
+extern void exit (int);
+
+int x;
+
+foo()
+{
+ static int count;
+ count++;
+ if (count > 1)
+ abort ();
+}
+
+static inline int
+frob ()
+{
+ int a;
+ __asm__ ("mov %1, %0\n\t" : "=r" (a) : "m" (x));
+ x++;
+ return a;
+}
+
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 10 && frob () == 0; i++)
+ foo();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60909-1.c b/gcc/testsuite/gcc.target/i386/pr60909-1.c
new file mode 100644
index 0000000000..5a1ac3c0f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60909-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdrnd" } */
+
+extern void bar (int);
+
+void
+foo (unsigned *u)
+{
+ int i = __builtin_ia32_rdrand32_step (u);
+ bar (i);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr60909-2.c b/gcc/testsuite/gcc.target/i386/pr60909-2.c
new file mode 100644
index 0000000000..dd356685ba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr60909-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdseed" } */
+
+extern void bar (int);
+
+void
+foo (unsigned *u)
+{
+ int i = __builtin_ia32_rdseed_si_step (u);
+ bar (i);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr61423.c b/gcc/testsuite/gcc.target/i386/pr61423.c
new file mode 100644
index 0000000000..5b538a2650
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61423.c
@@ -0,0 +1,38 @@
+/* PR target/61423 */
+/* { dg-do run { target ia32 } } */
+/* { dg-options "-O1 -ftree-vectorize -msse2 -mfpmath=387 -mtune=core2" } */
+
+#define N 1024
+static unsigned int A[N];
+
+double
+__attribute__((noinline))
+func (void)
+{
+ unsigned int sum = 0;
+ unsigned i;
+ double t;
+
+ for (i = 0; i < N; i++)
+ sum += A[i];
+
+ t = sum;
+ return t;
+}
+
+int
+main ()
+{
+ unsigned i;
+ double d;
+
+ for(i = 0; i < N; i++)
+ A[i] = 1;
+
+ d = func();
+
+ if (d != 1024.0)
+ __builtin_abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr61446.c b/gcc/testsuite/gcc.target/i386/pr61446.c
new file mode 100644
index 0000000000..fc32f63ee6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61446.c
@@ -0,0 +1,14 @@
+/* PR rtl-optimization/61446 */
+
+/* { dg-do compile { target { ia32 } } } */
+/* { dg-options "-O2 -march=corei7 -mfpmath=387" } */
+
+unsigned long long
+foo (float a)
+{
+ const double dfa = a;
+ const unsigned int hi = dfa / 0x1p32f;
+ const unsigned int lo = dfa - (double) hi * 0x1p32f;
+
+ return ((unsigned long long) hi << (4 * (8))) | lo;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr61794.c b/gcc/testsuite/gcc.target/i386/pr61794.c
new file mode 100644
index 0000000000..5f8e7d06c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61794.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+#include <x86intrin.h>
+
+__m512i zmm;
+__m128i xmm;
+
+void test (void)
+{
+ xmm = _mm512_extracti32x4_epi32 (zmm, 0);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr61801.c b/gcc/testsuite/gcc.target/i386/pr61801.c
new file mode 100644
index 0000000000..d0d08ccb40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61801.c
@@ -0,0 +1,21 @@
+/* PR rtl-optimization/61801 */
+/* { dg-do compile } */
+/* { dg-options "-Os -fcompare-debug" } */
+
+int a, c;
+int bar (void);
+void baz (void);
+
+void
+foo (void)
+{
+ int d;
+ if (bar ())
+ {
+ int e;
+ baz ();
+ asm volatile ("" : "=a" (e) : "0" (a), "i" (0));
+ d = e;
+ }
+ c = d;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr61855.c b/gcc/testsuite/gcc.target/i386/pr61855.c
new file mode 100644
index 0000000000..09c62aebba
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61855.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx512f" } */
+
+#include <x86intrin.h>
+
+__m512 test (__m512 x)
+{
+ return _mm512_getmant_ps(x, _MM_MANT_NORM_1_2, _MM_MANT_SIGN_zero);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/pr61923.c b/gcc/testsuite/gcc.target/i386/pr61923.c
new file mode 100644
index 0000000000..458158cc6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr61923.c
@@ -0,0 +1,36 @@
+/* PR debug/61923 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+typedef struct
+{
+ struct
+ {
+ struct
+ {
+ char head;
+ } tickets;
+ };
+} arch_spinlock_t;
+struct ext4_map_blocks
+{
+ int m_lblk;
+ int m_len;
+ int m_flags;
+};
+int ext4_da_map_blocks_ei_0;
+void fn1 (int p1, struct ext4_map_blocks *p2)
+{
+ int ret;
+ if (p2->m_flags)
+ {
+ ext4_da_map_blocks_ei_0++;
+ arch_spinlock_t *lock;
+ switch (sizeof *&lock->tickets.head)
+ case 1:
+ asm("" : "+m"(*&lock->tickets.head) : ""(0));
+ __asm__("");
+ ret = 0;
+ }
+ fn2 (p2->m_lblk, p2->m_len);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr63285.c b/gcc/testsuite/gcc.target/i386/pr63285.c
new file mode 100644
index 0000000000..e4df8fb923
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr63285.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fcompare-debug" } */
+
+struct S { int a; };
+struct T { int b, c; } a;
+long b;
+int c, d;
+void bar (int, int);
+void baz (void *, int);
+
+void
+foo (struct S *x, int y, int z, void *f, int *p, struct T *e)
+{
+ while (x)
+ {
+ baz (f, &d > p);
+ if (z & 1)
+ bar (f > (void *) &f, z);
+ }
+ if (c)
+ {
+ asm ("" : "+m" (a) : "i" (0));
+ y--;
+ }
+ if (e->b == e->c)
+ c = y;
+ y--;
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr63448.c b/gcc/testsuite/gcc.target/i386/pr63448.c
new file mode 100644
index 0000000000..3f8262e87e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr63448.c
@@ -0,0 +1,120 @@
+/* PR rtl-optimization/63448 */
+/* { dg-do compile } */
+/* { dg-options "-O -std=c99" } */
+
+int a, d, e, g, h, j;
+float b, c, k, l, m, n;
+int *__restrict i;
+void
+foo (void)
+{
+ int o = e;
+ int *p;
+ float *q, *r = (float *) 0x1234000;
+ float s, t, u, v, w, x;
+ do
+ {
+ for (a = o; a; a--)
+ {
+ s += m;
+ t += n;
+ u += m;
+ v += n;
+ w += d;
+ x += d;
+ n = l;
+ s += r[1];
+ t += n;
+ v += r[1];
+ m = k * r[4];
+ n = q[0] * r[4];
+ s += m;
+ m = q[1] * r[4];
+ t += n;
+ q += g;
+ k = *q;
+ n = q[1] * r[4];
+ s += m;
+ t += n;
+ u += r[4];
+ m = q[8] * r[4];
+ q += 1;
+ n = q[1] * r[4];
+ s += m;
+ m = q[4];
+ t += n;
+ q += g;
+ w += m;
+ m = k * r[4];
+ s += m;
+ t += q[0];
+ m = q[1] * r[4];
+ v += q[0];
+ n = q[10] * r[4];
+ s += m;
+ t += n;
+ u += b;
+ m = q[8] * r[4];
+ n = q[2] * r[4];
+ s += m;
+ m = q[4] * r[4];
+ t += n;
+ q++;
+ n = q[2] * r[16];
+ s += m;
+ m = q[4];
+ t += n;
+ s += m;
+ t += r[6];
+ q += g;
+ k = *q;
+ w += m;
+ m = k * r[20];
+ x += r[16];
+ n = q[1] * r[20];
+ s += m;
+ t += n;
+ q += g;
+ k = *q;
+ w += m;
+ m = k * r[2];
+ n = q[1] * r[22];
+ s += m;
+ m = q[4];
+ t += n;
+ q += g;
+ s += m;
+ t += q[0];
+ s += m;
+ u += m;
+ n = q[1] * r[22];
+ s += m;
+ m = q[4] * r[22];
+ t += n;
+ q += g;
+ k = 1;
+ w += m;
+ c = q[10];
+ x += r[22];
+ s += m;
+ t += r[22];
+ u += m;
+ v += r[22];
+ n = q[10] * r[30];
+ d = r[32];
+ l = q[1];
+ b = 0;
+ w += m;
+ m = r[32];
+ x += n;
+ r = 0;
+ }
+ *i = s;
+ p[0] = t;
+ p[1] = u;
+ p[6] = v;
+ p[8] = w;
+ p[10] = x;
+ }
+ while (j);
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr63495.c b/gcc/testsuite/gcc.target/i386/pr63495.c
new file mode 100644
index 0000000000..7f02f37d8c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr63495.c
@@ -0,0 +1,6 @@
+/* PR c/63495 */
+/* { dg-do compile { target { i?86-*-linux* x86_64-*-linux* } } } */
+/* { dg-options "-std=gnu11" } */
+
+struct __attribute__ ((aligned (8))) S { char c; };
+_Static_assert (_Alignof (struct S) >= 8, "wrong alignment");
diff --git a/gcc/testsuite/gcc.target/i386/pr63563.c b/gcc/testsuite/gcc.target/i386/pr63563.c
new file mode 100644
index 0000000000..ce3e4658e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr63563.c
@@ -0,0 +1,17 @@
+/* PR tree-optimization/63563 */
+/* { dg-do compile } */
+/* { dg-options "-O3 -mavx2" } */
+
+struct A { unsigned long a, b, c, d; } a[1024] = { { 0, 1, 2, 3 } }, b;
+
+void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ a[i].a = a[i].b = a[i].c = b.c;
+ if (a[i].d)
+ a[i].d = b.d;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/pr9771-1.c b/gcc/testsuite/gcc.target/i386/pr9771-1.c
index 38586fe972..9fa21ff0fa 100644
--- a/gcc/testsuite/gcc.target/i386/pr9771-1.c
+++ b/gcc/testsuite/gcc.target/i386/pr9771-1.c
@@ -28,7 +28,7 @@ void foo()
*adr = save;
}
-/* This must not be inlined becuase main() requires the frame pointer
+/* This must not be inlined because main() requires the frame pointer
for stack alignment. */
void test(void) __attribute__((noinline));
void test(void)
@@ -45,7 +45,17 @@ void test(void)
exit(0);
}
-int main()
+/* main usually performs dynamic realignment of the stack in case
+ _start would fail to properly align the stack, but for dynamic
+ stack realignment we need frame pointer which is incompatible
+ with -ffixed-ebp and the global register var. So, cheat here
+ and hide from the compiler that main is really main. */
+#define ASMNAME(cname) ASMNAME2 (__USER_LABEL_PREFIX__, cname)
+#define ASMNAME2(prefix, cname) STRING (prefix) cname
+#define STRING(x) #x
+int real_main() __asm (ASMNAME ("main"));
+
+int real_main()
{
test();
return 0;
diff --git a/gcc/testsuite/gcc.target/i386/prefetchw-1.c b/gcc/testsuite/gcc.target/i386/prefetchw-1.c
new file mode 100644
index 0000000000..d0babe4d1d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/prefetchw-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mprfchw -O2" } */
+/* { dg-final { scan-assembler "\[ \\t\]+prefetchw\[ \\t\]+" } } */
+
+#include <x86intrin.h>
+
+void *p;
+
+void extern
+prefetchw__test (void)
+{
+ _m_prefetchw (p);
+}
diff --git a/gcc/testsuite/gcc.target/i386/prefetchwt1-1.c b/gcc/testsuite/gcc.target/i386/prefetchwt1-1.c
new file mode 100644
index 0000000000..1b88516ede
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/prefetchwt1-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-mprefetchwt1 -O2" } */
+/* { dg-final { scan-assembler "\[ \\t\]+prefetchwt1\[ \\t\]+" } } */
+
+#include <x86intrin.h>
+
+void *p;
+
+void extern
+prefetchw__test (void)
+{
+ _mm_prefetch (p, _MM_HINT_ET1);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/rdseed16-1.c b/gcc/testsuite/gcc.target/i386/rdseed16-1.c
new file mode 100644
index 0000000000..fe637f1ac5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rdseed16-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdseed -O2" } */
+/* { dg-final { scan-assembler "rdseed\[ \\t\]+" } } */
+
+#include <x86intrin.h>
+
+void extern
+rdseed_test (unsigned short *p)
+{
+ volatile int r;
+ r = _rdseed16_step (p);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/rdseed32-1.c b/gcc/testsuite/gcc.target/i386/rdseed32-1.c
new file mode 100644
index 0000000000..646dff26da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rdseed32-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mrdseed -O2" } */
+/* { dg-final { scan-assembler "rdseed\[ \\t\]+" } } */
+
+#include <x86intrin.h>
+
+void extern
+rdseed_test (unsigned int *p)
+{
+ volatile int r;
+ r = _rdseed32_step (p);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/rdseed64-1.c b/gcc/testsuite/gcc.target/i386/rdseed64-1.c
new file mode 100644
index 0000000000..bdacd7ad64
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rdseed64-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mrdseed -O2" } */
+/* { dg-final { scan-assembler "rdseed\[ \\t\]+" } } */
+
+#include <x86intrin.h>
+
+void extern
+rdseed_test (unsigned long long *p)
+{
+ volatile int r;
+ r = _rdseed64_step (p);
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/readeflags-1.c b/gcc/testsuite/gcc.target/i386/readeflags-1.c
new file mode 100644
index 0000000000..6b2fa7e8d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/readeflags-1.c
@@ -0,0 +1,40 @@
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+#include <x86intrin.h>
+
+#ifdef __x86_64__
+#define EFLAGS_TYPE unsigned long long int
+#else
+#define EFLAGS_TYPE unsigned int
+#endif
+
+static EFLAGS_TYPE
+readeflags_test (unsigned int a, unsigned int b)
+{
+ unsigned x = (a == b);
+ return __readeflags ();
+}
+
+int
+main ()
+{
+ EFLAGS_TYPE flags;
+
+ flags = readeflags_test (100, 100);
+
+ if ((flags & 1) != 0) /* Read CF */
+ abort ();
+
+ flags = readeflags_test (100, 101);
+
+ if ((flags & 1) == 0) /* Read CF */
+ abort ();
+
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/recip-vec-divf.c b/gcc/testsuite/gcc.target/i386/recip-vec-divf.c
index 0c0cd42ae8..fa126e45f6 100644
--- a/gcc/testsuite/gcc.target/i386/recip-vec-divf.c
+++ b/gcc/testsuite/gcc.target/i386/recip-vec-divf.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip -fno-common" } */
float a[4];
float b[4];
diff --git a/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf.c b/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf.c
index 9ac9bd76ce..6c0d49b221 100644
--- a/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf.c
+++ b/gcc/testsuite/gcc.target/i386/recip-vec-sqrtf.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip" } */
+/* { dg-options "-O2 -ffast-math -ftree-vectorize -msse -mfpmath=sse -mrecip -fno-common" } */
float a[4];
float b[4];
diff --git a/gcc/testsuite/gcc.target/i386/retarg.c b/gcc/testsuite/gcc.target/i386/retarg.c
new file mode 100644
index 0000000000..a69b60feaf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/retarg.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-O2" } */
+
+#include <string.h>
+
+void *p (void *x, void *y, int z)
+{
+ memcpy (x, y, z);
+ return x;
+}
+
+/* { dg-final { scan-assembler-not "%\[re\]di" } } */
diff --git a/gcc/testsuite/gcc.target/i386/rotate-1.c b/gcc/testsuite/gcc.target/i386/rotate-1.c
index 23dc2ee670..399cbd96cd 100644
--- a/gcc/testsuite/gcc.target/i386/rotate-1.c
+++ b/gcc/testsuite/gcc.target/i386/rotate-1.c
@@ -13,4 +13,4 @@ main (void)
return c;
}
-/* { dg-final { scan-assembler "rolb" } } */
+/* { dg-final { scan-assembler "ro\[lr]b" } } */
diff --git a/gcc/testsuite/gcc.target/i386/rotate-3.c b/gcc/testsuite/gcc.target/i386/rotate-3.c
new file mode 100644
index 0000000000..7f255732b5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-3.c
@@ -0,0 +1,18 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target avx2 } */
+/* { dg-options "-O3 -mavx2 -fdump-tree-vect-details" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+unsigned int a[1024] __attribute__((aligned (32)));
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ int j = i & 31;
+ a[i] = (a[i] << j) | (a[i] >> ((-j) & 31));
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/rotate-3a.c b/gcc/testsuite/gcc.target/i386/rotate-3a.c
new file mode 100644
index 0000000000..0685efbd0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-3a.c
@@ -0,0 +1,24 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx2 } */
+/* { dg-options "-O3 -mavx2" } */
+
+#include "avx2-check.h"
+
+#include "rotate-3.c"
+
+static void
+__attribute__((noinline))
+avx2_test (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = i * 1073741789U;
+ foo ();
+ for (i = 0; i < 1024; i++)
+ {
+ int j = i & 31;
+ unsigned int x = i * 1073741789U;
+ if (a[i] != ((x << j) | (x >> ((-j) & 31))))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/rotate-4.c b/gcc/testsuite/gcc.target/i386/rotate-4.c
new file mode 100644
index 0000000000..7faa052cbf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-4.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O3 -mavx -fdump-tree-vect-details" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+unsigned int a[1024] __attribute__((aligned (32)));
+
+__attribute__((noinline, noclone)) void
+foo (int j)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = (a[i] << j) | (a[i] >> ((-j) & 31));
+}
diff --git a/gcc/testsuite/gcc.target/i386/rotate-4a.c b/gcc/testsuite/gcc.target/i386/rotate-4a.c
new file mode 100644
index 0000000000..3da440fb78
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-4a.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O3 -mavx" } */
+
+#include "avx-check.h"
+
+#include "rotate-4.c"
+
+static void
+__attribute__((noinline))
+avx_test (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = i * 1073741789U;
+ foo (3);
+ for (i = 0; i < 1024; i++)
+ {
+ unsigned int x = i * 1073741789U;
+ if (a[i] != ((x << 3) | (x >> ((-3) & 31))))
+ abort ();
+ }
+ foo (0);
+ for (i = 0; i < 1024; i++)
+ {
+ unsigned int x = i * 1073741789U;
+ if (a[i] != ((x << 3) | (x >> ((-3) & 31))))
+ abort ();
+ }
+ foo (29);
+ for (i = 0; i < 1024; i++)
+ if (a[i] != i * 1073741789U)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/rotate-5.c b/gcc/testsuite/gcc.target/i386/rotate-5.c
new file mode 100644
index 0000000000..7d5888db2c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-5.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O3 -mavx -fdump-tree-vect-details" } */
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+unsigned int a[1024] __attribute__((aligned (32)));
+
+__attribute__((noinline, noclone)) void
+foo (void)
+{
+ int i, j = 3;
+ for (i = 0; i < 1024; i++)
+ a[i] = (a[i] << j) | (a[i] >> ((-j) & 31));
+}
diff --git a/gcc/testsuite/gcc.target/i386/rotate-5a.c b/gcc/testsuite/gcc.target/i386/rotate-5a.c
new file mode 100644
index 0000000000..5813654014
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rotate-5a.c
@@ -0,0 +1,23 @@
+/* { dg-do run } */
+/* { dg-require-effective-target avx } */
+/* { dg-options "-O3 -mavx" } */
+
+#include "avx-check.h"
+
+#include "rotate-5.c"
+
+static void
+__attribute__((noinline))
+avx_test (void)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = i * 1073741789U;
+ foo ();
+ for (i = 0; i < 1024; i++)
+ {
+ unsigned int x = i * 1073741789U;
+ if (a[i] != ((x << 3) | (x >> ((-3) & 31))))
+ abort ();
+ }
+}
diff --git a/gcc/testsuite/gcc.target/i386/rtm-check.h b/gcc/testsuite/gcc.target/i386/rtm-check.h
new file mode 100644
index 0000000000..593b40391c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rtm-check.h
@@ -0,0 +1,32 @@
+#include <stdlib.h>
+#include "cpuid.h"
+
+static void rtm_test (void);
+
+static void __attribute__ ((noinline)) do_test (void)
+{
+ rtm_test ();
+}
+
+int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (__get_cpuid_max (0, NULL) >= 7)
+ {
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+ if (ebx & bit_RTM)
+ {
+ do_test ();
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+ return 0;
+ }
+ }
+#ifdef DEBUG
+ printf ("SKIPPED\n");
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/rtm-xabort-1.c b/gcc/testsuite/gcc.target/i386/rtm-xabort-1.c
new file mode 100644
index 0000000000..808095d273
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rtm-xabort-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtm" } */
+/* { dg-final { scan-assembler "\txabort" } } */
+
+#include <immintrin.h>
+
+void
+rtm_test (void)
+{
+ _xabort (13);
+}
diff --git a/gcc/testsuite/gcc.target/i386/rtm-xbegin-1.c b/gcc/testsuite/gcc.target/i386/rtm-xbegin-1.c
new file mode 100644
index 0000000000..caced5f5f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rtm-xbegin-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtm" } */
+/* { dg-final { scan-assembler "\txbegin" } } */
+
+#include <immintrin.h>
+
+unsigned int
+rtm_test (void)
+{
+ return _xbegin ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/rtm-xend-1.c b/gcc/testsuite/gcc.target/i386/rtm-xend-1.c
new file mode 100644
index 0000000000..2bd8a0a9ce
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rtm-xend-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtm" } */
+/* { dg-final { scan-assembler "\txend" } } */
+
+#include <immintrin.h>
+
+void
+rtm_test (void)
+{
+ _xend ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/rtm-xtest-1.c b/gcc/testsuite/gcc.target/i386/rtm-xtest-1.c
new file mode 100644
index 0000000000..cdf346fcb2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/rtm-xtest-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mrtm -dp" } */
+/* { dg-final { scan-assembler "\txtest" } } */
+
+#include <immintrin.h>
+
+int
+rtm_xtest (void)
+{
+ return _xtest ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha-check.h b/gcc/testsuite/gcc.target/i386/sha-check.h
new file mode 100644
index 0000000000..e0a18076e1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha-check.h
@@ -0,0 +1,37 @@
+#include <stdlib.h>
+#include "cpuid.h"
+
+static void sha_test (void);
+
+static void
+__attribute__ ((noinline))
+do_test (void)
+{
+ sha_test ();
+}
+
+int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (__get_cpuid_max (0, NULL) >= 7)
+ {
+ __cpuid_count (7, 0, eax, ebx, ecx, edx);
+
+ /* Run SHA test only if host has SHA support. */
+ if (ebx & bit_SHA)
+ {
+ do_test ();
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+ return 0;
+ }
+ }
+
+#ifdef DEBUG
+ printf ("SKIPPED\n");
+#endif
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1msg1-1.c b/gcc/testsuite/gcc.target/i386/sha1msg1-1.c
new file mode 100644
index 0000000000..808f3617f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1msg1-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha1msg1\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha1msg1_epu32 (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1msg1-2.c b/gcc/testsuite/gcc.target/i386/sha1msg1-2.c
new file mode 100644
index 0000000000..35a60571f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1msg1-2.c
@@ -0,0 +1,42 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <immintrin.h>
+
+static void
+compute_sha1msg1 (int *s1, int *s2, int *r)
+{
+ int w0, w1, w2, w3, w4, w5;
+
+ w0 = s1[3];
+ w1 = s1[2];
+ w2 = s1[1];
+ w3 = s1[0];
+ w4 = s2[3];
+ w5 = s2[2];
+
+ r[0] = w5 ^ w3;
+ r[1] = w4 ^ w2;
+ r[2] = w3 ^ w1;
+ r[3] = w2 ^ w0;
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 222, 333, 444);
+ s2.x = _mm_set_epi32 (555, 666, 0, 0);
+
+ res.x = _mm_sha1msg1_epu32 (s1.x, s2.x);
+
+ compute_sha1msg1 (s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1msg2-1.c b/gcc/testsuite/gcc.target/i386/sha1msg2-1.c
new file mode 100644
index 0000000000..9c0ffc13f6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1msg2-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha1msg2\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha1msg2_epu32 (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1msg2-2.c b/gcc/testsuite/gcc.target/i386/sha1msg2-2.c
new file mode 100644
index 0000000000..21eaf8dd9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1msg2-2.c
@@ -0,0 +1,44 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static void
+compute_sha1msg2 (int *s1, int *s2, int *r)
+{
+ int w13, w14, w15, w16, w17, w18, w19;
+
+ w13 = s2[2];
+ w14 = s2[1];
+ w15 = s2[0];
+ w16 = __rold (s1[3] ^ w13, 1);
+ w17 = __rold (s1[2] ^ w14, 1);
+ w18 = __rold (s1[1] ^ w15, 1);
+ w19 = __rold (s1[0] ^ w16, 1);
+
+ r[0] = w19;
+ r[1] = w18;
+ r[2] = w17;
+ r[3] = w16;
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 222, 333, 444);
+ s2.x = _mm_set_epi32 (555, 666, 777, 0);
+
+ res.x = _mm_sha1msg2_epu32 (s1.x, s2.x);
+
+ compute_sha1msg2 (s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1nexte-1.c b/gcc/testsuite/gcc.target/i386/sha1nexte-1.c
new file mode 100644
index 0000000000..40edc780ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1nexte-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha1nexte\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha1nexte_epu32 (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1nexte-2.c b/gcc/testsuite/gcc.target/i386/sha1nexte-2.c
new file mode 100644
index 0000000000..f0dc6cbc6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1nexte-2.c
@@ -0,0 +1,36 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static void
+compute_sha1nexte (int *s1, int *s2, int *r)
+{
+ int tmp = __rold (s1[3], 30);
+
+ r[0] = s2[0];
+ r[1] = s2[1];
+ r[2] = s2[2];
+ r[3] = s2[3] + tmp;
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 0, 0, 0);
+ s2.x = _mm_set_epi32 (222, 333, 444, 555);
+
+ res.x = _mm_sha1nexte_epu32 (s1.x, s2.x);
+
+ compute_sha1nexte (s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1rnds4-1.c b/gcc/testsuite/gcc.target/i386/sha1rnds4-1.c
new file mode 100644
index 0000000000..c9da57df00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1rnds4-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha1rnds4\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha1rnds4_epu32 (x, x, 3);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha1rnds4-2.c b/gcc/testsuite/gcc.target/i386/sha1rnds4-2.c
new file mode 100644
index 0000000000..91210b1f0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha1rnds4-2.c
@@ -0,0 +1,93 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static int
+f0 (int b, int c, int d)
+{
+ return (b & c) ^ (~b & d);
+}
+
+static int
+f1 (int b, int c, int d)
+{
+ return b ^ c ^ d;
+}
+
+static int
+f2 (int b, int c, int d)
+{
+ return (b & c) ^ (b & d) ^ (c & d);
+}
+
+int (*f_arr[4])(int, int, int) = { f0, f1, f2, f1 };
+const int k_arr[4] = { 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xCA62C1D6 };
+
+
+static void
+compute_sha1rnds4 (int *src1, int *src2, int imm, int *res)
+{
+ int k = k_arr[imm];
+ int (*f)(int, int, int) = f_arr[imm];
+
+ int w[4] = { src2[3], src2[2], src2[1], src2[0] };
+ int a[5], b[5], c[5], d[5], e[5];
+
+ a[0] = src1[3];
+ b[0] = src1[2];
+ c[0] = src1[1];
+ d[0] = src1[0];
+ e[0] = 0;
+
+ int i;
+ for (i = 0; i <= 3; i++)
+ {
+ a[i+1] = f(b[i], c[i], d[i]) + __rold (a[i], 5) + w[i] + e[i] + k;
+ b[i+1] = a[i];
+ c[i+1] = __rold (b[i], 30);
+ d[i+1] = c[i];
+ e[i+1] = d[i];
+ }
+
+ res[0] = d[4];
+ res[1] = c[4];
+ res[2] = b[4];
+ res[3] = a[4];
+}
+
+
+static void
+sha_test (void)
+{
+ int imm;
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 222, 333, 444);
+ s2.x = _mm_set_epi32 (555, 666, 777, 888);
+
+ res.x = _mm_sha1rnds4_epu32 (s1.x, s2.x, 0);
+ compute_sha1rnds4 (s1.a, s2.a, 0, res_ref);
+ if (check_union128i_d (res, res_ref))
+ abort ();
+
+ res.x = _mm_sha1rnds4_epu32 (s1.x, s2.x, 1);
+ compute_sha1rnds4 (s1.a, s2.a, 1, res_ref);
+ if (check_union128i_d (res, res_ref))
+ abort ();
+
+ res.x = _mm_sha1rnds4_epu32 (s1.x, s2.x, 2);
+ compute_sha1rnds4 (s1.a, s2.a, 2, res_ref);
+ if (check_union128i_d (res, res_ref))
+ abort ();
+
+ res.x = _mm_sha1rnds4_epu32 (s1.x, s2.x, 3);
+ compute_sha1rnds4 (s1.a, s2.a, 3, res_ref);
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256msg1-1.c b/gcc/testsuite/gcc.target/i386/sha256msg1-1.c
new file mode 100644
index 0000000000..020874e4a4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256msg1-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha256msg1\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha256msg1_epu32 (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256msg1-2.c b/gcc/testsuite/gcc.target/i386/sha256msg1-2.c
new file mode 100644
index 0000000000..2b70920b02
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256msg1-2.c
@@ -0,0 +1,48 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static int
+s0 (int w)
+{
+ return __rord (w, 7) ^ __rord (w, 18) ^ (w >> 3);
+}
+
+static void
+compute_sha256msg1 (int *src1, int *src2, int *res)
+{
+ int w0, w1, w2, w3, w4;
+
+ w0 = src1[0];
+ w1 = src1[1];
+ w2 = src1[2];
+ w3 = src1[3];
+ w4 = src2[0];
+
+ res[0] = w0 + s0 (w1);
+ res[1] = w1 + s0 (w2);
+ res[2] = w2 + s0 (w3);
+ res[3] = w3 + s0 (w4);
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 222, 333, 444);
+ s2.x = _mm_set_epi32 (0, 0, 0, 555);
+
+ res.x = _mm_sha256msg1_epu32 (s1.x, s2.x);
+
+ compute_sha256msg1 (s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256msg2-1.c b/gcc/testsuite/gcc.target/i386/sha256msg2-1.c
new file mode 100644
index 0000000000..88a9a03e4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256msg2-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha256msg2\[ \\t\]+\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha256msg2_epu32 (x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256msg2-2.c b/gcc/testsuite/gcc.target/i386/sha256msg2-2.c
new file mode 100644
index 0000000000..ffb0c2582b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256msg2-2.c
@@ -0,0 +1,49 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static int
+s1 (int w)
+{
+ return __rord (w, 17) ^ __rord (w, 19) ^ (w >> 10);
+}
+
+static void
+compute_sha256msg2 (int *src1, int *src2, int *res)
+{
+ int w14, w15, w16, w17, w18, w19;
+
+ w14 = src2[2];
+ w15 = src2[3];
+ w16 = src1[0] + s1 (w14);
+ w17 = src1[1] + s1 (w15);
+ w18 = src1[2] + s1 (w16);
+ w19 = src1[3] + s1 (w17);
+
+ res[0] = w16;
+ res[1] = w17;
+ res[2] = w18;
+ res[3] = w19;
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s1, s2, res;
+ int res_ref[4];
+
+ s1.x = _mm_set_epi32 (111, 222, 333, 444);
+ s2.x = _mm_set_epi32 (555, 666, 0, 0);
+
+ res.x = _mm_sha256msg2_epu32 (s1.x, s2.x);
+
+ compute_sha256msg2 (s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256rnds2-1.c b/gcc/testsuite/gcc.target/i386/sha256rnds2-1.c
new file mode 100644
index 0000000000..8bdf664207
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256rnds2-1.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-final { scan-assembler "sha256rnds2\[ \\t\]+\[^\n\]*%xmm0\[^\n\]*%xmm\[0-9\]" } } */
+
+#include <immintrin.h>
+
+volatile __m128i x;
+
+void extern
+sha_test (void)
+{
+ x = _mm_sha256rnds2_epu32 (x, x, x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/sha256rnds2-2.c b/gcc/testsuite/gcc.target/i386/sha256rnds2-2.c
new file mode 100644
index 0000000000..4e586749de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sha256rnds2-2.c
@@ -0,0 +1,85 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -msha" } */
+/* { dg-require-effective-target sha } */
+
+#include "sha-check.h"
+#include "m128-check.h"
+#include <x86intrin.h>
+#include <immintrin.h>
+
+static int
+ch (int e, int f, int g)
+{
+ return (e & f) ^ (~e & g);
+}
+
+static int
+maj (int a, int b, int c)
+{
+ return (a & b) ^ (a & c) ^ (b & c);
+}
+
+static int
+s0 (int a)
+{
+ return __rord (a, 2) ^ __rord (a, 13) ^ __rord (a, 22);
+}
+
+static int
+s1 (int e)
+{
+ return __rord (e, 6) ^ __rord (e, 11) ^ __rord (e, 25);
+}
+
+static void
+compute_sha256rnds2 (int *src0, int *src1, int *src2, int *res)
+{
+ int wk[2] = { src0[0], src0[1] };
+ int a[3], b[3], c[3], d[3], e[3], f[3], g[3], h[3];
+
+ a[0] = src2[3];
+ b[0] = src2[2];
+ c[0] = src1[3];
+ d[0] = src1[2];
+ e[0] = src2[1];
+ f[0] = src2[0];
+ g[0] = src1[1];
+ h[0] = src1[0];
+
+ int i;
+ for (i = 0; i <= 1; i++)
+ {
+ a[i+1] = ch (e[i], f[i], g[i]) + s1 (e[i]) + wk[i] + h[i]
+ + maj (a[i], b[i], c[i]) + s0 (a[i]);
+ b[i+1] = a[i];
+ c[i+1] = b[i];
+ d[i+1] = c[i];
+ e[i+1] = ch (e[i], f[i], g[i]) + s1 (e[i]) + wk[i] + h[i] + d[i];
+ f[i+1] = e[i];
+ g[i+1] = f[i];
+ h[i+1] = g[i];
+ }
+
+ res[0] = f[2];
+ res[1] = e[2];
+ res[2] = b[2];
+ res[3] = a[2];
+}
+
+static void
+sha_test (void)
+{
+ union128i_d s0, s1, s2, res;
+ int res_ref[4];
+
+ s0.x = _mm_set_epi32 (0, 0, 111, 222);
+ s1.x = _mm_set_epi32 (333, 444, 555, 666);
+ s2.x = _mm_set_epi32 (777, 888, 999, 123);
+
+ res.x = _mm_sha256rnds2_epu32 (s1.x, s2.x, s0.x);
+
+ compute_sha256rnds2 (s0.a, s1.a, s2.a, res_ref);
+
+ if (check_union128i_d (res, res_ref))
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/i386/shuf-concat.c b/gcc/testsuite/gcc.target/i386/shuf-concat.c
new file mode 100644
index 0000000000..04ed4a9dbb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/shuf-concat.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O -msse2 -mfpmath=sse" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (16)));
+
+v2df f(double d,double e){
+ v2df x={-d,d};
+ v2df y={-e,e};
+ return __builtin_ia32_shufpd(x,y,1);
+}
+
+/* { dg-final { scan-assembler-not "\tv?shufpd\[ \t\]" } } */
+/* { dg-final { scan-assembler-times "\tv?unpcklpd\[ \t\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse-12.c b/gcc/testsuite/gcc.target/i386/sse-12.c
index 66a36c68cb..51de357cc9 100644
--- a/gcc/testsuite/gcc.target/i386/sse-12.c
+++ b/gcc/testsuite/gcc.target/i386/sse-12.c
@@ -3,7 +3,7 @@
popcntintrin.h and mm_malloc.h are usable
with -O -std=c89 -pedantic-errors. */
/* { dg-do compile } */
-/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */
+/* { dg-options "-O -std=c89 -pedantic-errors -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1" } */
#include <x86intrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse-13.c b/gcc/testsuite/gcc.target/i386/sse-13.c
index 4bc0a2ef0e..171e242382 100644
--- a/gcc/testsuite/gcc.target/i386/sse-13.c
+++ b/gcc/testsuite/gcc.target/i386/sse-13.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */
+/* { dg-options "-O2 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1" } */
#include <mm_malloc.h>
@@ -55,6 +55,20 @@
#define __builtin_ia32_vcvtps2ph(A, I) __builtin_ia32_vcvtps2ph(A, 1)
#define __builtin_ia32_vcvtps2ph256(A, I) __builtin_ia32_vcvtps2ph256(A, 1)
+/* avx512pfintrin.h */
+#define __builtin_ia32_gatherpfdps(A, B, C, D, E) __builtin_ia32_gatherpfdps (A, B, C, 1, 1)
+#define __builtin_ia32_gatherpfqps(A, B, C, D, E) __builtin_ia32_gatherpfqps (A, B, C, 1, 1)
+#define __builtin_ia32_scatterpfdps(A, B, C, D, E) __builtin_ia32_scatterpfdps (A, B, C, 1, 1)
+#define __builtin_ia32_scatterpfqps(A, B, C, D, E) __builtin_ia32_scatterpfqps (A, B, C, 1, 1)
+
+/* avx512erintrin.h */
+#define __builtin_ia32_exp2pd_mask(A, B, C, D) __builtin_ia32_exp2pd_mask (A, B, C, 1)
+#define __builtin_ia32_exp2ps_mask(A, B, C, D) __builtin_ia32_exp2ps_mask (A, B, C, 1)
+#define __builtin_ia32_rcp28pd_mask(A, B, C, D) __builtin_ia32_rcp28pd_mask (A, B, C, 1)
+#define __builtin_ia32_rcp28ps_mask(A, B, C, D) __builtin_ia32_rcp28ps_mask (A, B, C, 1)
+#define __builtin_ia32_rsqrt28pd_mask(A, B, C, D) __builtin_ia32_rsqrt28pd_mask (A, B, C, 1)
+#define __builtin_ia32_rsqrt28ps_mask(A, B, C, D) __builtin_ia32_rsqrt28ps_mask (A, B, C, 1)
+
/* wmmintrin.h */
#define __builtin_ia32_aeskeygenassist128(X, C) __builtin_ia32_aeskeygenassist128(X, 1)
#define __builtin_ia32_pclmulqdq128(X, Y, I) __builtin_ia32_pclmulqdq128(X, Y, 1)
@@ -124,7 +138,7 @@
#define __builtin_ia32_shufpd(A, B, N) __builtin_ia32_shufpd(A, B, 0)
/* xmmintrin.h */
-#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, A, _MM_HINT_NTA)
+#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, 0, _MM_HINT_NTA)
#define __builtin_ia32_pshufw(A, N) __builtin_ia32_pshufw(A, 0)
#define __builtin_ia32_vec_set_v4hi(A, D, N) \
__builtin_ia32_vec_set_v4hi(A, D, 0)
@@ -180,4 +194,191 @@
#define __builtin_ia32_gatherdiv4si(X, Y, Z, K, M) __builtin_ia32_gatherdiv4si(X, Y, Z, K, 1)
#define __builtin_ia32_gatherdiv4si256(X, Y, Z, K, M) __builtin_ia32_gatherdiv4si256(X, Y, Z, K, 1)
-#include <x86intrin.h>
+/* rtmintrin.h */
+#define __builtin_ia32_xabort (N) __builtin_ia32_xabort (1)
+
+/* avx512fintrin.h */
+#define __builtin_ia32_addpd512_mask(A, B, C, D, E) __builtin_ia32_addpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addps512_mask(A, B, C, D, E) __builtin_ia32_addps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addsd_mask(A, B, C, D, E) __builtin_ia32_addsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_addss_mask(A, B, C, D, E) __builtin_ia32_addss_mask(A, B, C, D, 8)
+#define __builtin_ia32_alignd512_mask(A, B, F, D, E) __builtin_ia32_alignd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_alignq512_mask(A, B, F, D, E) __builtin_ia32_alignq512_mask(A, B, 1, D, E)
+#define __builtin_ia32_cmpd512_mask(A, B, E, D) __builtin_ia32_cmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_cmppd512_mask(A, B, F, D, E) __builtin_ia32_cmppd512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpps512_mask(A, B, F, D, E) __builtin_ia32_cmpps512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpq512_mask(A, B, E, D) __builtin_ia32_cmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_cmpsd_mask(A, B, F, D, E) __builtin_ia32_cmpsd_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpss_mask(A, B, F, D, E) __builtin_ia32_cmpss_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cvtdq2ps512_mask(A, B, C, D) __builtin_ia32_cvtdq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2dq512_mask(A, B, C, D) __builtin_ia32_cvtpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2ps512_mask(A, B, C, D) __builtin_ia32_cvtpd2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2udq512_mask(A, B, C, D) __builtin_ia32_cvtpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2dq512_mask(A, B, C, D) __builtin_ia32_cvtps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2pd512_mask(A, B, C, D) __builtin_ia32_cvtps2pd512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2udq512_mask(A, B, C, D) __builtin_ia32_cvtps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtsd2ss_mask(A, B, C, D, E) __builtin_ia32_cvtsd2ss_mask(A, B, C, D, 8)
+#define __builtin_ia32_cvtsi2sd64(A, B, C) __builtin_ia32_cvtsi2sd64(A, B, 8)
+#define __builtin_ia32_cvtsi2ss32(A, B, C) __builtin_ia32_cvtsi2ss32(A, B, 8)
+#define __builtin_ia32_cvtsi2ss64(A, B, C) __builtin_ia32_cvtsi2ss64(A, B, 8)
+#define __builtin_ia32_cvtss2sd_mask(A, B, C, D, E) __builtin_ia32_cvtss2sd_mask(A, B, C, D, 8)
+#define __builtin_ia32_cvttpd2dq512_mask(A, B, C, D) __builtin_ia32_cvttpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttpd2udq512_mask(A, B, C, D) __builtin_ia32_cvttpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2dq512_mask(A, B, C, D) __builtin_ia32_cvttps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2udq512_mask(A, B, C, D) __builtin_ia32_cvttps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtudq2ps512_mask(A, B, C, D) __builtin_ia32_cvtudq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtusi2sd64(A, B, C) __builtin_ia32_cvtusi2sd64(A, B, 8)
+#define __builtin_ia32_cvtusi2ss32(A, B, C) __builtin_ia32_cvtusi2ss32(A, B, 8)
+#define __builtin_ia32_cvtusi2ss64(A, B, C) __builtin_ia32_cvtusi2ss64(A, B, 8)
+#define __builtin_ia32_divpd512_mask(A, B, C, D, E) __builtin_ia32_divpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divps512_mask(A, B, C, D, E) __builtin_ia32_divps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divsd_mask(A, B, C, D, E) __builtin_ia32_divsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_divss_mask(A, B, C, D, E) __builtin_ia32_divss_mask(A, B, C, D, 8)
+#define __builtin_ia32_extractf32x4_mask(A, E, C, D) __builtin_ia32_extractf32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extractf64x4_mask(A, E, C, D) __builtin_ia32_extractf64x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti32x4_mask(A, E, C, D) __builtin_ia32_extracti32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti64x4_mask(A, E, C, D) __builtin_ia32_extracti64x4_mask(A, 1, C, D)
+#define __builtin_ia32_fixupimmpd512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmpd512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmss_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmss_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_gatherdiv8df(A, B, C, D, F) __builtin_ia32_gatherdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv8di(A, B, C, D, F) __builtin_ia32_gatherdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16sf(A, B, C, D, F) __builtin_ia32_gatherdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16si(A, B, C, D, F) __builtin_ia32_gatherdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16sf(A, B, C, D, F) __builtin_ia32_gathersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16si(A, B, C, D, F) __builtin_ia32_gathersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8df(A, B, C, D, F) __builtin_ia32_gathersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8di(A, B, C, D, F) __builtin_ia32_gathersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_getexppd512_mask(A, B, C, D) __builtin_ia32_getexppd512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpps512_mask(A, B, C, D) __builtin_ia32_getexpps512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpsd128_mask(A, B, C, D, E) __builtin_ia32_getexpsd128_mask(A, B, C, D, 8)
+#define __builtin_ia32_getexpss128_mask(A, B, C, D, E) __builtin_ia32_getexpss128_mask(A, B, C, D, 8)
+#define __builtin_ia32_getmantpd512_mask(A, F, C, D, E) __builtin_ia32_getmantpd512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantps512_mask(A, F, C, D, E) __builtin_ia32_getmantps512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantsd_mask(A, B, I, D, E, F) __builtin_ia32_getmantsd_mask(A, B, 1, D, E, 8)
+#define __builtin_ia32_getmantss_mask(A, B, I, D, E, F) __builtin_ia32_getmantss_mask(A, B, 1, D, E, 8)
+#define __builtin_ia32_insertf32x4_mask(A, B, F, D, E) __builtin_ia32_insertf32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_insertf64x4_mask(A, B, F, D, E) __builtin_ia32_insertf64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti32x4_mask(A, B, F, D, E) __builtin_ia32_inserti32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti64x4_mask(A, B, F, D, E) __builtin_ia32_inserti64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_maxpd512_mask(A, B, C, D, E) __builtin_ia32_maxpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxps512_mask(A, B, C, D, E) __builtin_ia32_maxps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxsd_mask(A, B, C, D, E) __builtin_ia32_maxsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxss_mask(A, B, C, D, E) __builtin_ia32_maxss_mask(A, B, C, D, 8)
+#define __builtin_ia32_minpd512_mask(A, B, C, D, E) __builtin_ia32_minpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minps512_mask(A, B, C, D, E) __builtin_ia32_minps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minsd_mask(A, B, C, D, E) __builtin_ia32_minsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_minss_mask(A, B, C, D, E) __builtin_ia32_minss_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulpd512_mask(A, B, C, D, E) __builtin_ia32_mulpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulps512_mask(A, B, C, D, E) __builtin_ia32_mulps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulsd_mask(A, B, C, D, E) __builtin_ia32_mulsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulss_mask(A, B, C, D, E) __builtin_ia32_mulss_mask(A, B, C, D, 8)
+#define __builtin_ia32_permdf512_mask(A, E, C, D) __builtin_ia32_permdf512_mask(A, 1, C, D)
+#define __builtin_ia32_permdi512_mask(A, E, C, D) __builtin_ia32_permdi512_mask(A, 1, C, D)
+#define __builtin_ia32_prold512_mask(A, E, C, D) __builtin_ia32_prold512_mask(A, 1, C, D)
+#define __builtin_ia32_prolq512_mask(A, E, C, D) __builtin_ia32_prolq512_mask(A, 1, C, D)
+#define __builtin_ia32_prord512_mask(A, E, C, D) __builtin_ia32_prord512_mask(A, 1, C, D)
+#define __builtin_ia32_prorq512_mask(A, E, C, D) __builtin_ia32_prorq512_mask(A, 1, C, D)
+#define __builtin_ia32_pshufd512_mask(A, E, C, D) __builtin_ia32_pshufd512_mask(A, 1, C, D)
+#define __builtin_ia32_pslldi512_mask(A, E, C, D) __builtin_ia32_pslldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psllqi512_mask(A, E, C, D) __builtin_ia32_psllqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psradi512_mask(A, E, C, D) __builtin_ia32_psradi512_mask(A, 1, C, D)
+#define __builtin_ia32_psraqi512_mask(A, E, C, D) __builtin_ia32_psraqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrldi512_mask(A, E, C, D) __builtin_ia32_psrldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrlqi512_mask(A, E, C, D) __builtin_ia32_psrlqi512_mask(A, 1, C, D)
+#define __builtin_ia32_pternlogd512_mask(A, B, C, F, E) __builtin_ia32_pternlogd512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogd512_maskz(A, B, C, F, E) __builtin_ia32_pternlogd512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_mask(A, B, C, F, E) __builtin_ia32_pternlogq512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_maskz(A, B, C, F, E) __builtin_ia32_pternlogq512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_rndscalepd_mask(A, F, C, D, E) __builtin_ia32_rndscalepd_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscaleps_mask(A, F, C, D, E) __builtin_ia32_rndscaleps_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscalesd_mask(A, B, I, D, E, F) __builtin_ia32_rndscalesd_mask(A, B, 1, D, E, 8)
+#define __builtin_ia32_rndscaless_mask(A, B, I, D, E, F) __builtin_ia32_rndscaless_mask(A, B, 1, D, E, 8)
+#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefsd_mask(A, B, C, D, E) __builtin_ia32_scalefsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefss_mask(A, B, C, D, E) __builtin_ia32_scalefss_mask(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16si(A, B, C, D, F) __builtin_ia32_scatterdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16sf(A, B, C, D, F) __builtin_ia32_scattersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16si(A, B, C, D, F) __builtin_ia32_scattersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8df(A, B, C, D, F) __builtin_ia32_scattersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8di(A, B, C, D, F) __builtin_ia32_scattersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_shuf_f32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_f32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_f64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_f64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_i32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_i64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufpd512_mask(A, B, F, D, E) __builtin_ia32_shufpd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
+#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtsd_mask(A, B, C, D, E) __builtin_ia32_sqrtsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_sqrtss_mask(A, B, C, D, E) __builtin_ia32_sqrtss_mask(A, B, C, D, 8)
+#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subsd_mask(A, B, C, D, E) __builtin_ia32_subsd_mask(A, B, C, D, 8)
+#define __builtin_ia32_subss_mask(A, B, C, D, E) __builtin_ia32_subss_mask(A, B, C, D, 8)
+#define __builtin_ia32_ucmpd512_mask(A, B, E, D) __builtin_ia32_ucmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_ucmpq512_mask(A, B, E, D) __builtin_ia32_ucmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_vcomisd(A, B, C, D) __builtin_ia32_vcomisd(A, B, 1, 8)
+#define __builtin_ia32_vcomiss(A, B, C, D) __builtin_ia32_vcomiss(A, B, 1, 8)
+#define __builtin_ia32_vcvtph2ps512_mask(A, B, C, D) __builtin_ia32_vcvtph2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_vcvtps2ph512_mask(A, E, C, D) __builtin_ia32_vcvtps2ph512_mask(A, 1, C, D)
+#define __builtin_ia32_vcvtsd2si32(A, B) __builtin_ia32_vcvtsd2si32(A, 8)
+#define __builtin_ia32_vcvtsd2si64(A, B) __builtin_ia32_vcvtsd2si64(A, 8)
+#define __builtin_ia32_vcvtsd2usi32(A, B) __builtin_ia32_vcvtsd2usi32(A, 8)
+#define __builtin_ia32_vcvtsd2usi64(A, B) __builtin_ia32_vcvtsd2usi64(A, 8)
+#define __builtin_ia32_vcvtss2si32(A, B) __builtin_ia32_vcvtss2si32(A, 8)
+#define __builtin_ia32_vcvtss2si64(A, B) __builtin_ia32_vcvtss2si64(A, 8)
+#define __builtin_ia32_vcvtss2usi32(A, B) __builtin_ia32_vcvtss2usi32(A, 8)
+#define __builtin_ia32_vcvtss2usi64(A, B) __builtin_ia32_vcvtss2usi64(A, 8)
+#define __builtin_ia32_vcvttsd2si32(A, B) __builtin_ia32_vcvttsd2si32(A, 8)
+#define __builtin_ia32_vcvttsd2si64(A, B) __builtin_ia32_vcvttsd2si64(A, 8)
+#define __builtin_ia32_vcvttsd2usi32(A, B) __builtin_ia32_vcvttsd2usi32(A, 8)
+#define __builtin_ia32_vcvttsd2usi64(A, B) __builtin_ia32_vcvttsd2usi64(A, 8)
+#define __builtin_ia32_vcvttss2si32(A, B) __builtin_ia32_vcvttss2si32(A, 8)
+#define __builtin_ia32_vcvttss2si64(A, B) __builtin_ia32_vcvttss2si64(A, 8)
+#define __builtin_ia32_vcvttss2usi32(A, B) __builtin_ia32_vcvttss2usi32(A, 8)
+#define __builtin_ia32_vcvttss2usi64(A, B) __builtin_ia32_vcvttss2usi64(A, 8)
+#define __builtin_ia32_vfmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsd3_mask(A, B, C, D, E) __builtin_ia32_vfmaddsd3_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsd3_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsd3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsd3_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsd3_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddss3_mask(A, B, C, D, E) __builtin_ia32_vfmaddss3_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddss3_mask3(A, B, C, D, E) __builtin_ia32_vfmaddss3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddss3_maskz(A, B, C, D, E) __builtin_ia32_vfmaddss3_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubsd3_mask3(A, B, C, D, E) __builtin_ia32_vfmsubsd3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubss3_mask3(A, B, C, D, E) __builtin_ia32_vfmsubss3_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vpermilpd512_mask(A, E, C, D) __builtin_ia32_vpermilpd512_mask(A, 1, C, D)
+#define __builtin_ia32_vpermilps512_mask(A, E, C, D) __builtin_ia32_vpermilps512_mask(A, 1, C, D)
+
+/* shaintrin.h */
+#define __builtin_ia32_sha1rnds4(A, B, C) __builtin_ia32_sha1rnds4(A, B, 1)
diff --git a/gcc/testsuite/gcc.target/i386/sse-14.c b/gcc/testsuite/gcc.target/i386/sse-14.c
index 6451166ca1..d9a5feddae 100644
--- a/gcc/testsuite/gcc.target/i386/sse-14.c
+++ b/gcc/testsuite/gcc.target/i386/sse-14.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma" } */
+/* { dg-options "-O0 -Werror-implicit-function-declaration -march=k8 -msse4a -m3dnow -mavx -mavx2 -mfma4 -mxop -maes -mpclmul -mpopcnt -mabm -mlzcnt -mbmi -mbmi2 -mtbm -mlwp -mfsgsbase -mrdrnd -mf16c -mfma -mrtm -mrdseed -mprfchw -madx -mfxsr -mxsaveopt -mavx512f -mavx512er -mavx512cd -mavx512pf -msha -mprefetchwt1" } */
#include <mm_malloc.h>
@@ -19,6 +19,10 @@
#define _CONCAT(x,y) x ## y
+#define test_0(func, type, imm) \
+ type _CONCAT(_,func) (int const I) \
+ { return func (imm); }
+
#define test_1(func, type, op1_type, imm) \
type _CONCAT(_,func) (op1_type A, int const I) \
{ return func (A, imm); }
@@ -27,6 +31,10 @@
type _CONCAT(_,func) (op1_type A, int const I, int const L) \
{ return func (A, imm1, imm2); }
+#define test_1y(func, type, op1_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, int const I, int const L, int const R)\
+ { return func (A, imm1, imm2, imm3); }
+
#define test_2(func, type, op1_type, op2_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, int const I) \
{ return func (A, B, imm); }
@@ -35,16 +43,60 @@
type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
{ return func (A, B, imm1, imm2); }
+#define test_2y(func, type, op1_type, op2_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L,\
+ int const R) \
+ { return func (A, B, imm1, imm2, imm3); }
+
+#define test_2vx(func, op1_type, op2_type, imm1, imm2) \
+ _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
+ { func (A, B, imm1, imm2); }
+
#define test_3(func, type, op1_type, op2_type, op3_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I) \
{ return func (A, B, C, imm); }
+#define test_3x(func, type, op1_type, op2_type, op3_type, imm1, imm2) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L) \
+ { return func (A, B, C, imm1, imm2); }
+
+#define test_3y(func, type, op1_type, op2_type, op3_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L, int const R) \
+ { return func (A, B, C, imm1, imm2, imm3); }
+
+#define test_3v(func, op1_type, op2_type, op3_type, imm) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I) \
+ { func (A, B, C, imm); }
+
+#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L) \
+ { func (A, B, C, imm1, imm2); }
+
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, op4_type D, int const I) \
{ return func (A, B, C, D, imm); }
+#define test_4x(func, type, op1_type, op2_type, op3_type, op4_type, imm1, imm2) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, op4_type D, int const I, int const L) \
+ { return func (A, B, C, D, imm1, imm2); }
+
+#define test_4y(func, type, op1_type, op2_type, op3_type, op4_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, op3_type C, \
+ op4_type D, int const I, int const L, int const R) \
+ { return func (A, B, C, D, imm1, imm2, imm3); }
+
+#define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, op4_type D, int const I) \
+ { func (A, B, C, D, imm); }
+
/* Following intrinsics require immediate arguments. They
are defined as macros for non-optimized compilations. */
@@ -90,21 +142,424 @@ test_2 (_mm256_insert_epi32, __m256i, __m256i, int, 3)
#ifdef __x86_64__
test_2 (_mm256_insert_epi64, __m256i, __m256i, long long, 1)
#endif
-test_1 (_mm256_round_pd, __m256d, __m256d, 1)
-test_1 (_mm256_round_ps, __m256, __m256, 1)
+test_1 (_mm256_round_pd, __m256d, __m256d, 9)
+test_1 (_mm256_round_ps, __m256, __m256, 9)
test_1 (_cvtss_sh, unsigned short, float, 1)
test_1 (_mm_cvtps_ph, __m128i, __m128, 1)
test_1 (_mm256_cvtps_ph, __m128i, __m256, 1)
+test_0 (_xabort, void, 1)
+test_1 (_mm512_cvt_roundepi32_ps, __m512, __m512i, 9)
+test_1 (_mm512_cvt_roundepu32_ps, __m512, __m512i, 9)
+test_1 (_mm512_cvt_roundpd_epi32, __m256i, __m512d, 9)
+test_1 (_mm512_cvt_roundpd_epu32, __m256i, __m512d, 9)
+test_1 (_mm512_cvt_roundpd_ps, __m256, __m512d, 9)
+test_1 (_mm512_cvt_roundph_ps, __m512, __m256i, 8)
+test_1 (_mm512_cvt_roundps_epi32, __m512i, __m512, 9)
+test_1 (_mm512_cvt_roundps_epu32, __m512i, __m512, 9)
+test_1 (_mm512_cvt_roundps_pd, __m512d, __m256, 8)
+test_1 (_mm512_cvtps_ph, __m256i, __m512, 1)
+test_1 (_mm512_cvtt_roundpd_epi32, __m256i, __m512d, 8)
+test_1 (_mm512_cvtt_roundpd_epu32, __m256i, __m512d, 8)
+test_1 (_mm512_cvtt_roundps_epi32, __m512i, __m512, 8)
+test_1 (_mm512_cvtt_roundps_epu32, __m512i, __m512, 8)
+test_1 (_mm512_extractf32x4_ps, __m128, __m512, 1)
+test_1 (_mm512_extractf64x4_pd, __m256d, __m512d, 1)
+test_1 (_mm512_extracti32x4_epi32, __m128i, __m512i, 1)
+test_1 (_mm512_extracti64x4_epi64, __m256i, __m512i, 1)
+test_1 (_mm512_getexp_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_getexp_round_ps, __m512, __m512, 8)
+test_1y (_mm512_getmant_round_pd, __m512d, __m512d, 1, 1, 8)
+test_1y (_mm512_getmant_round_ps, __m512, __m512, 1, 1, 8)
+test_1 (_mm512_permute_pd, __m512d, __m512d, 1)
+test_1 (_mm512_permute_ps, __m512, __m512, 1)
+test_1 (_mm512_permutex_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_permutex_pd, __m512d, __m512d, 1)
+test_1 (_mm512_rol_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_rol_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_ror_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_ror_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_shuffle_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_slli_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_slli_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_sqrt_round_pd, __m512d, __m512d, 9)
+test_1 (_mm512_sqrt_round_ps, __m512, __m512, 9)
+test_1 (_mm512_srai_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_srai_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_srli_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_srli_epi64, __m512i, __m512i, 1)
+test_1 (_mm_cvt_roundsd_i32, int, __m128d, 9)
+test_1 (_mm_cvt_roundsd_u32, unsigned, __m128d, 9)
+test_1 (_mm_cvt_roundss_i32, int, __m128, 9)
+test_1 (_mm_cvt_roundss_u32, unsigned, __m128, 9)
+test_1 (_mm_cvtt_roundsd_i32, int, __m128d, 8)
+test_1 (_mm_cvtt_roundsd_u32, unsigned, __m128d, 8)
+test_1 (_mm_cvtt_roundss_i32, int, __m128, 8)
+test_1 (_mm_cvtt_roundss_u32, unsigned, __m128, 8)
+test_1x (_mm512_getmant_pd, __m512d, __m512d, 1, 1)
+test_1x (_mm512_getmant_ps, __m512, __m512, 1, 1)
+test_1x (_mm512_roundscale_round_pd, __m512d, __m512d, 1, 8)
+test_1x (_mm512_roundscale_round_ps, __m512, __m512, 1, 8)
+test_1x (_mm_cvt_roundi32_ss, __m128, __m128, 1, 9)
+test_2 (_mm512_add_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_add_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_alignr_epi32, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_alignr_epi64, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epi32_mask, __mmask16, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epi64_mask, __mmask8, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epu32_mask, __mmask16, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epu64_mask, __mmask8, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_pd_mask, __mmask8, __m512d, __m512d, 1)
+test_2 (_mm512_cmp_ps_mask, __mmask16, __m512, __m512, 1)
+test_2 (_mm512_div_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_div_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_i32gather_epi32, __m512i, __m512i, void const *, 1)
+test_2 (_mm512_i32gather_epi64, __m512i, __m256i, void const *, 1)
+test_2 (_mm512_i32gather_pd, __m512d, __m256i, void const *, 1)
+test_2 (_mm512_i32gather_ps, __m512, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_epi32, __m256i, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_epi64, __m512i, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_pd, __m512d, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_ps, __m256, __m512i, void const *, 1)
+test_2 (_mm512_insertf32x4, __m512, __m512, __m128, 1)
+test_2 (_mm512_insertf64x4, __m512d, __m512d, __m256d, 1)
+test_2 (_mm512_inserti32x4, __m512i, __m512i, __m128i, 1)
+test_2 (_mm512_inserti64x4, __m512i, __m512i, __m256i, 1)
+test_2 (_mm512_maskz_cvt_roundepi32_ps, __m512, __mmask16, __m512i, 9)
+test_2 (_mm512_maskz_cvt_roundepu32_ps, __m512, __mmask16, __m512i, 9)
+test_2 (_mm512_maskz_cvt_roundpd_epi32, __m256i, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundpd_epu32, __m256i, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundpd_ps, __m256, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundph_ps, __m512, __mmask16, __m256i, 8)
+test_2 (_mm512_maskz_cvt_roundps_epi32, __m512i, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_cvt_roundps_epu32, __m512i, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_cvt_roundps_pd, __m512d, __mmask8, __m256, 8)
+test_2 (_mm512_maskz_cvtps_ph, __m256i, __mmask16, __m512, 1)
+test_2 (_mm512_maskz_cvtt_roundpd_epi32, __m256i, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_cvtt_roundpd_epu32, __m256i, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_cvtt_roundps_epi32, __m512i, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_cvtt_roundps_epu32, __m512i, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_extractf32x4_ps, __m128, __mmask8, __m512, 1)
+test_2 (_mm512_maskz_extractf64x4_pd, __m256d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_extracti32x4_epi32, __m128i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_extracti64x4_epi64, __m256i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_getexp_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_getexp_round_ps, __m512, __mmask16, __m512, 8)
+test_2y (_mm512_maskz_getmant_round_pd, __m512d, __mmask8, __m512d, 1, 1, 8)
+test_2y (_mm512_maskz_getmant_round_ps, __m512, __mmask16, __m512, 1, 1, 8)
+test_2 (_mm512_maskz_permute_pd, __m512d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_permute_ps, __m512, __mmask16, __m512, 1)
+test_2 (_mm512_maskz_permutex_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_permutex_pd, __m512d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_rol_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_rol_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_ror_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_ror_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_shuffle_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_slli_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_slli_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_sqrt_round_pd, __m512d, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_sqrt_round_ps, __m512, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_srai_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_srai_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_srli_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_srli_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_max_round_pd, __m512d, __m512d, __m512d, 8)
+test_2 (_mm512_max_round_ps, __m512, __m512, __m512, 8)
+test_2 (_mm512_min_round_pd, __m512d, __m512d, __m512d, 8)
+test_2 (_mm512_min_round_ps, __m512, __m512, __m512, 8)
+test_2 (_mm512_mul_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_mul_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_scalef_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_scalef_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_shuffle_f32x4, __m512, __m512, __m512, 1)
+test_2 (_mm512_shuffle_f64x2, __m512d, __m512d, __m512d, 1)
+test_2 (_mm512_shuffle_i32x4, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_shuffle_i64x2, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_shuffle_pd, __m512d, __m512d, __m512d, 1)
+test_2 (_mm512_shuffle_ps, __m512, __m512, __m512, 1)
+test_2 (_mm512_sub_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_sub_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm_add_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_add_round_ss, __m128, __m128, __m128, 9)
+test_2 (_mm_cmp_sd_mask, __mmask8, __m128d, __m128d, 1)
+test_2 (_mm_cmp_ss_mask, __mmask8, __m128, __m128, 1)
+#ifdef __x86_64__
+test_2 (_mm_cvt_roundi64_sd, __m128d, __m128d, long long, 9)
+test_2 (_mm_cvt_roundi64_ss, __m128, __m128, long long, 9)
+#endif
+test_2 (_mm_cvt_roundsd_ss, __m128, __m128, __m128d, 9)
+test_2 (_mm_cvt_roundss_sd, __m128d, __m128d, __m128, 8)
+test_2 (_mm_cvt_roundu32_ss, __m128, __m128, unsigned, 9)
+#ifdef __x86_64__
+test_2 (_mm_cvt_roundu64_sd, __m128d, __m128d, unsigned long long, 9)
+test_2 (_mm_cvt_roundu64_ss, __m128, __m128, unsigned long long, 9)
+#endif
+test_2 (_mm_div_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_div_round_ss, __m128, __m128, __m128, 9)
+test_2 (_mm_getexp_round_sd, __m128d, __m128d, __m128d, 8)
+test_2 (_mm_getexp_round_ss, __m128, __m128, __m128, 8)
+test_2y (_mm_getmant_round_sd, __m128d, __m128d, __m128d, 1, 1, 8)
+test_2y (_mm_getmant_round_ss, __m128, __m128, __m128, 1, 1, 8)
+test_2 (_mm_mul_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_mul_round_ss, __m128, __m128, __m128, 9)
+test_2 (_mm_scalef_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_scalef_round_ss, __m128, __m128, __m128, 9)
+test_2 (_mm_sqrt_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_sqrt_round_ss, __m128, __m128, __m128, 9)
+test_2 (_mm_sub_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_sub_round_ss, __m128, __m128, __m128, 9)
+test_2x (_mm512_cmp_round_pd_mask, __mmask8, __m512d, __m512d, 1, 8)
+test_2x (_mm512_cmp_round_ps_mask, __mmask16, __m512, __m512, 1, 8)
+test_2x (_mm512_maskz_roundscale_round_pd, __m512d, __mmask8, __m512d, 1, 8)
+test_2x (_mm512_maskz_roundscale_round_ps, __m512, __mmask16, __m512, 1, 8)
+test_2x (_mm_cmp_round_sd_mask, __mmask8, __m128d, __m128d, 1, 8)
+test_2x (_mm_cmp_round_ss_mask, __mmask8, __m128, __m128, 1, 8)
+test_2x (_mm_comi_round_sd, int, __m128d, __m128d, 1, 8)
+test_2x (_mm_comi_round_ss, int, __m128, __m128, 1, 8)
+test_2x (_mm_roundscale_round_sd, __m128d, __m128d, __m128d, 1, 8)
+test_2x (_mm_roundscale_round_ss, __m128, __m128, __m128, 1, 8)
+test_3 (_mm512_fmadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmaddsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmaddsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmsubadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmsubadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fnmadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fnmadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fnmsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fnmsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_mask_cmp_epi32_mask, __mmask16, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epi64_mask, __mmask8, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epu32_mask, __mmask16, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epu64_mask, __mmask8, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_pd_mask, __mmask8, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_mask_cmp_ps_mask, __mmask16, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_mask_cvt_roundepi32_ps, __m512, __m512, __mmask16, __m512i, 9)
+test_3 (_mm512_mask_cvt_roundepu32_ps, __m512, __m512, __mmask16, __m512i, 9)
+test_3 (_mm512_mask_cvt_roundpd_epi32, __m256i, __m256i, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundpd_epu32, __m256i, __m256i, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundpd_ps, __m256, __m256, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundph_ps, __m512, __m512, __mmask16, __m256i, 8)
+test_3 (_mm512_mask_cvt_roundps_epi32, __m512i, __m512i, __mmask16, __m512, 9)
+test_3 (_mm512_mask_cvt_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 9)
+test_3 (_mm512_mask_cvt_roundps_pd, __m512d, __m512d, __mmask8, __m256, 8)
+test_3 (_mm512_mask_cvtps_ph, __m256i, __m256i, __mmask16, __m512, 1)
+test_3 (_mm512_mask_cvtt_roundpd_epi32, __m256i, __m256i, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_cvtt_roundpd_epu32, __m256i, __m256i, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_cvtt_roundps_epi32, __m512i, __m512i, __mmask16, __m512, 8)
+test_3 (_mm512_mask_cvtt_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 8)
+test_3 (_mm512_mask_extractf32x4_ps, __m128, __m128, __mmask8, __m512, 1)
+test_3 (_mm512_mask_extractf64x4_pd, __m256d, __m256d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_extracti32x4_epi32, __m128i, __m128i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_extracti64x4_epi64, __m256i, __m256i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_getexp_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_getexp_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3y (_mm512_mask_getmant_round_pd, __m512d, __m512d, __mmask8, __m512d, 1, 1, 8)
+test_3y (_mm512_mask_getmant_round_ps, __m512, __m512, __mmask16, __m512, 1, 1, 8)
+test_3 (_mm512_mask_permute_pd, __m512d, __m512d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_permute_ps, __m512, __m512, __mmask16, __m512, 1)
+test_3 (_mm512_mask_permutex_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_permutex_pd, __m512d, __m512d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_rol_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_rol_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_ror_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_ror_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_shuffle_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_slli_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_slli_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_sqrt_round_pd, __m512d, __m512d, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_sqrt_round_ps, __m512, __m512, __mmask16, __m512, 9)
+test_3 (_mm512_mask_srai_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_srai_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_srli_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_srli_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_maskz_add_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_add_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_alignr_epi32, __m512i, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_alignr_epi64, __m512i, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_div_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_div_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_insertf32x4, __m512, __mmask16, __m512, __m128, 1)
+test_3 (_mm512_maskz_insertf64x4, __m512d, __mmask8, __m512d, __m256d, 1)
+test_3 (_mm512_maskz_inserti32x4, __m512i, __mmask16, __m512i, __m128i, 1)
+test_3 (_mm512_maskz_inserti64x4, __m512i, __mmask8, __m512i, __m256i, 1)
+test_3 (_mm512_maskz_max_round_pd, __m512d, __mmask8, __m512d, __m512d, 8)
+test_3 (_mm512_maskz_max_round_ps, __m512, __mmask16, __m512, __m512, 8)
+test_3 (_mm512_maskz_min_round_pd, __m512d, __mmask8, __m512d, __m512d, 8)
+test_3 (_mm512_maskz_min_round_ps, __m512, __mmask16, __m512, __m512, 8)
+test_3 (_mm512_maskz_mul_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_mul_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_scalef_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_scalef_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_shuffle_f32x4, __m512, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_maskz_shuffle_f64x2, __m512d, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_maskz_shuffle_i32x4, __m512i, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_shuffle_i64x2, __m512i, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_shuffle_pd, __m512d, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_maskz_shuffle_ps, __m512, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_maskz_sub_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_sub_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_ternarylogic_epi32, __m512i, __m512i, __m512i, __m512i, 1)
+test_3 (_mm512_ternarylogic_epi64, __m512i, __m512i, __m512i, __m512i, 1)
+test_3 (_mm_fmadd_round_sd, __m128d, __m128d, __m128d, __m128d, 9)
+test_3 (_mm_fmadd_round_ss, __m128, __m128, __m128, __m128, 9)
+test_3 (_mm_fmsub_round_sd, __m128d, __m128d, __m128d, __m128d, 9)
+test_3 (_mm_fmsub_round_ss, __m128, __m128, __m128, __m128, 9)
+test_3 (_mm_fnmadd_round_sd, __m128d, __m128d, __m128d, __m128d, 9)
+test_3 (_mm_fnmadd_round_ss, __m128, __m128, __m128, __m128, 9)
+test_3 (_mm_fnmsub_round_sd, __m128d, __m128d, __m128d, __m128d, 9)
+test_3 (_mm_fnmsub_round_ss, __m128, __m128, __m128, __m128, 9)
+test_3 (_mm_mask_cmp_sd_mask, __mmask8, __mmask8, __m128d, __m128d, 1)
+test_3 (_mm_mask_cmp_ss_mask, __mmask8, __mmask8, __m128, __m128, 1)
+test_3v (_mm512_i32scatter_epi32, void *, __m512i, __m512i, 1)
+test_3v (_mm512_i32scatter_epi64, void *, __m256i, __m512i, 1)
+test_3v (_mm512_i32scatter_pd, void *, __m256i, __m512d, 1)
+test_3v (_mm512_i32scatter_ps, void *, __m512i, __m512, 1)
+test_3v (_mm512_i64scatter_epi32, void *, __m512i, __m256i, 1)
+test_3v (_mm512_i64scatter_epi64, void *, __m512i, __m512i, 1)
+test_3v (_mm512_i64scatter_pd, void *, __m512i, __m512d, 1)
+test_3v (_mm512_i64scatter_ps, void *, __m512i, __m256, 1)
+test_3x (_mm512_mask_roundscale_round_pd, __m512d, __m512d, __mmask8, __m512d, 1, 8)
+test_3x (_mm512_mask_roundscale_round_ps, __m512, __m512, __mmask16, __m512, 1, 8)
+test_3x (_mm_fixupimm_round_sd, __m128d, __m128d, __m128d, __m128i, 1, 8)
+test_3x (_mm_fixupimm_round_ss, __m128, __m128, __m128, __m128i, 1, 8)
+test_3x (_mm_mask_cmp_round_sd_mask, __mmask8, __mmask8, __m128d, __m128d, 1, 8)
+test_3x (_mm_mask_cmp_round_ss_mask, __mmask8, __mmask8, __m128, __m128, 1, 8)
+test_4 (_mm512_mask3_fmadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmaddsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmaddsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmsubadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmsubadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fnmadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fnmadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fnmsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fnmsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask_add_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_add_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_alignr_epi32, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_alignr_epi64, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_mask_div_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_div_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmaddsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmaddsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmsubadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmsubadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fnmadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fnmadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fnmsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fnmsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_i32gather_epi32, __m512i, __m512i, __mmask16, __m512i, void const *, 1)
+test_4 (_mm512_mask_i32gather_epi64, __m512i, __m512i, __mmask8, __m256i, void const *, 1)
+test_4 (_mm512_mask_i32gather_pd, __m512d, __m512d, __mmask8, __m256i, void const *, 1)
+test_4 (_mm512_mask_i32gather_ps, __m512, __m512, __mmask16, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_epi32, __m256i, __m256i, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_epi64, __m512i, __m512i, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_pd, __m512d, __m512d, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_ps, __m256, __m256, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_insertf32x4, __m512, __m512, __mmask16, __m512, __m128, 1)
+test_4 (_mm512_mask_insertf64x4, __m512d, __m512d, __mmask8, __m512d, __m256d, 1)
+test_4 (_mm512_mask_inserti32x4, __m512i, __m512i, __mmask16, __m512i, __m128i, 1)
+test_4 (_mm512_mask_inserti64x4, __m512i, __m512i, __mmask8, __m512i, __m256i, 1)
+test_4 (_mm512_mask_max_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 8)
+test_4 (_mm512_mask_max_round_ps, __m512, __m512, __mmask16, __m512, __m512, 8)
+test_4 (_mm512_mask_min_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 8)
+test_4 (_mm512_mask_min_round_ps, __m512, __m512, __mmask16, __m512, __m512, 8)
+test_4 (_mm512_mask_mul_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_mul_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_scalef_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_scalef_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_shuffle_f32x4, __m512, __m512, __mmask16, __m512, __m512, 1)
+test_4 (_mm512_mask_shuffle_f64x2, __m512d, __m512d, __mmask8, __m512d, __m512d, 1)
+test_4 (_mm512_mask_shuffle_i32x4, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_shuffle_i64x2, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_mask_shuffle_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 1)
+test_4 (_mm512_mask_shuffle_ps, __m512, __m512, __mmask16, __m512, __m512, 1)
+test_4 (_mm512_mask_sub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_sub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_ternarylogic_epi32, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_ternarylogic_epi64, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_maskz_fmadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmaddsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmaddsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmsubadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmsubadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fnmadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fnmadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fnmsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fnmsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_ternarylogic_epi32, __m512i, __mmask16, __m512i, __m512i, __m512i, 1)
+test_4 (_mm512_maskz_ternarylogic_epi64, __m512i, __mmask8, __m512i, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_epi32, void *, __mmask16, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_epi64, void *, __mmask8, __m256i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_pd, void *, __mmask8, __m256i, __m512d, 1)
+test_4v (_mm512_mask_i32scatter_ps, void *, __mmask16, __m512i, __m512, 1)
+test_4v (_mm512_mask_i64scatter_epi32, void *, __mmask8, __m512i, __m256i, 1)
+test_4v (_mm512_mask_i64scatter_epi64, void *, __mmask8, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i64scatter_pd, void *, __mmask8, __m512i, __m512d, 1)
+test_4v (_mm512_mask_i64scatter_ps, void *, __mmask8, __m512i, __m256, 1)
+test_4x (_mm512_mask_fixupimm_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512i, 1, 8)
+test_4x (_mm512_mask_fixupimm_round_ps, __m512, __m512, __mmask16, __m512, __m512i, 1, 8)
+test_4x (_mm512_maskz_fixupimm_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512i, 1, 8)
+test_4x (_mm512_maskz_fixupimm_round_ps, __m512, __mmask16, __m512, __m512, __m512i, 1, 8)
+test_4x (_mm_mask_fixupimm_round_sd, __m128d, __m128d, __mmask8, __m128d, __m128i, 1, 8)
+test_4x (_mm_mask_fixupimm_round_ss, __m128, __m128, __mmask8, __m128, __m128i, 1, 8)
+test_4x (_mm_maskz_fixupimm_round_sd, __m128d, __mmask8, __m128d, __m128d, __m128i, 1, 8)
+test_4x (_mm_maskz_fixupimm_round_ss, __m128, __mmask8, __m128, __m128, __m128i, 1, 8)
+
+/* avx512pfintrin.h */
+test_3vx (_mm512_mask_prefetch_i32gather_ps, __m512i, __mmask16, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i32scatter_ps, void const *, __mmask16, __m512i, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64gather_ps, __m512i, __mmask8, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64scatter_ps, void const *, __mmask8, __m512i, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i32gather_pd, __m256i, __mmask8, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i32scatter_pd, void const *, __mmask8, __m256i, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64gather_pd, __m512i, __mmask8, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64scatter_pd, void const *, __mmask8, __m512i, 1, _MM_HINT_T0)
+
+/* avx512erintrin.h */
+test_1 (_mm512_exp2a23_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_exp2a23_round_ps, __m512, __m512, 8)
+test_1 (_mm512_rcp28_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_rcp28_round_ps, __m512, __m512, 8)
+test_1 (_mm512_rsqrt28_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_rsqrt28_round_ps, __m512, __m512, 8)
+test_2 (_mm512_maskz_exp2a23_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_exp2a23_round_ps, __m512, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_rcp28_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_rcp28_round_ps, __m512, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_rsqrt28_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_rsqrt28_round_ps, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_exp2a23_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_exp2a23_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_rcp28_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_rcp28_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_rsqrt28_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_rsqrt28_round_ps, __m512, __m512, __mmask16, __m512, 8)
+
+/* shaintrin.h */
+test_2 (_mm_sha1rnds4_epu32, __m128i, __m128i, __m128i, 1)
/* wmmintrin.h */
test_1 (_mm_aeskeygenassist_si128, __m128i, __m128i, 1)
test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
/* smmintrin.h */
-test_1 (_mm_round_pd, __m128d, __m128d, 1)
-test_1 (_mm_round_ps, __m128, __m128, 1)
-test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 1)
-test_2 (_mm_round_ss, __m128, __m128, __m128, 1)
+test_1 (_mm_round_pd, __m128d, __m128d, 9)
+test_1 (_mm_round_ps, __m128, __m128, 9)
+test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_round_ss, __m128, __m128, __m128, 9)
test_2 (_mm_blend_epi16, __m128i, __m128i, __m128i, 1)
test_2 (_mm_blend_ps, __m128, __m128, __m128, 1)
diff --git a/gcc/testsuite/gcc.target/i386/sse-22.c b/gcc/testsuite/gcc.target/i386/sse-22.c
index 9ccb92d1b6..e9f227a2a8 100644
--- a/gcc/testsuite/gcc.target/i386/sse-22.c
+++ b/gcc/testsuite/gcc.target/i386/sse-22.c
@@ -18,6 +18,10 @@
#define _CONCAT(x,y) x ## y
+#define test_0(func, type, imm) \
+ type _CONCAT(_,func) (int const I) \
+ { return func (imm); }
+
#define test_1(func, type, op1_type, imm) \
type _CONCAT(_,func) (op1_type A, int const I) \
{ return func (A, imm); }
@@ -26,6 +30,10 @@
type _CONCAT(_,func) (op1_type A, int const I, int const L) \
{ return func (A, imm1, imm2); }
+#define test_1y(func, type, op1_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, int const I, int const L, int const R)\
+ { return func (A, imm1, imm2, imm3); }
+
#define test_2(func, type, op1_type, op2_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, int const I) \
{ return func (A, B, imm); }
@@ -34,19 +42,64 @@
type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
{ return func (A, B, imm1, imm2); }
+#define test_2y(func, type, op1_type, op2_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L,\
+ int const R) \
+ { return func (A, B, imm1, imm2, imm3); }
+
+#define test_2vx(func, op1_type, op2_type, imm1, imm2) \
+ _CONCAT(_,func) (op1_type A, op2_type B, int const I, int const L) \
+ { func (A, B, imm1, imm2); }
+
#define test_3(func, type, op1_type, op2_type, op3_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, int const I) \
{ return func (A, B, C, imm); }
+#define test_3x(func, type, op1_type, op2_type, op3_type, imm1, imm2) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L) \
+ { return func (A, B, C, imm1, imm2); }
+
+#define test_3y(func, type, op1_type, op2_type, op3_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L, int const R) \
+ { return func (A, B, C, imm1, imm2, imm3); }
+
+#define test_3v(func, op1_type, op2_type, op3_type, imm) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I) \
+ { func (A, B, C, imm); }
+
+#define test_3vx(func, op1_type, op2_type, op3_type, imm1, imm2) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, int const I, int const L) \
+ { func (A, B, C, imm1, imm2); }
+
#define test_4(func, type, op1_type, op2_type, op3_type, op4_type, imm) \
type _CONCAT(_,func) (op1_type A, op2_type B, \
op3_type C, op4_type D, int const I) \
{ return func (A, B, C, D, imm); }
+#define test_4x(func, type, op1_type, op2_type, op3_type, op4_type, imm1, imm2) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, op4_type D, int const I, int const L) \
+ { return func (A, B, C, D, imm1, imm2); }
+
+#define test_4y(func, type, op1_type, op2_type, op3_type, op4_type, imm1, imm2, imm3) \
+ type _CONCAT(_,func) (op1_type A, op2_type B, op3_type C, \
+ op4_type D, int const I, int const L, int const R) \
+ { return func (A, B, C, D, imm1, imm2, imm3); }
+
+
+#define test_4v(func, op1_type, op2_type, op3_type, op4_type, imm) \
+ _CONCAT(_,func) (op1_type A, op2_type B, \
+ op3_type C, op4_type D, int const I) \
+ { func (A, B, C, D, imm); }
+
#ifndef DIFFERENT_PRAGMAS
-#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c")
+#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,avx512f,avx512er,avx512cd,avx512pf,sha,prefetchwt1")
#endif
/* Following intrinsics require immediate arguments. They
@@ -121,10 +174,10 @@ test_2x (_mm_inserti_si64, __m128i, __m128i, __m128i, 1, 1)
#endif
#include <nmmintrin.h>
/* smmintrin.h (SSE4.2). */
-test_1 (_mm_round_pd, __m128d, __m128d, 1)
-test_1 (_mm_round_ps, __m128, __m128, 1)
-test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 1)
-test_2 (_mm_round_ss, __m128, __m128, __m128, 1)
+test_1 (_mm_round_pd, __m128d, __m128d, 9)
+test_1 (_mm_round_ps, __m128, __m128, 9)
+test_2 (_mm_round_sd, __m128d, __m128d, __m128d, 9)
+test_2 (_mm_round_ss, __m128, __m128, __m128, 9)
test_2 (_mm_blend_epi16, __m128i, __m128i, __m128i, 1)
test_2 (_mm_blend_ps, __m128, __m128, __m128, 1)
@@ -159,9 +212,9 @@ test_4 (_mm_cmpestro, int, __m128i, int, __m128i, int, 1)
test_4 (_mm_cmpestrs, int, __m128i, int, __m128i, int, 1)
test_4 (_mm_cmpestrz, int, __m128i, int, __m128i, int, 1)
-/* immintrin.h (AVX/AVX2/RDRND/FSGSBASE/F16C) */
+/* immintrin.h (AVX/AVX2/RDRND/FSGSBASE/F16C/RTM/AVX512F/SHA) */
#ifdef DIFFERENT_PRAGMAS
-#pragma GCC target ("avx,avx2,rdrnd,fsgsbase,f16c")
+#pragma GCC target ("avx,avx2,rdrnd,fsgsbase,f16c,rtm,avx512f,avx512er,avx512cd,avx512pf,sha")
#endif
#include <immintrin.h>
test_1 (_cvtss_sh, unsigned short, float, 1)
@@ -205,8 +258,8 @@ test_2 (_mm256_insert_epi32, __m256i, __m256i, int, 3)
#ifdef __x86_64__
test_2 (_mm256_insert_epi64, __m256i, __m256i, long long, 1)
#endif
-test_1 (_mm256_round_pd, __m256d, __m256d, 1)
-test_1 (_mm256_round_ps, __m256, __m256, 1)
+test_1 (_mm256_round_pd, __m256d, __m256d, 9)
+test_1 (_mm256_round_ps, __m256, __m256, 9)
/* avx2intrin.h */
test_2 ( _mm256_mpsadbw_epu8, __m256i, __m256i, __m256i, 1)
@@ -241,6 +294,390 @@ test_2 ( _mm256_i32gather_epi32, __m256i, int const *, __m256i, 1)
test_2 ( _mm_i64gather_epi32, __m128i, int const *, __m128i, 1)
test_2 ( _mm256_i64gather_epi32, __m128i, int const *, __m256i, 1)
+/* rtmintrin.h */
+test_0 ( _xabort, void, 1)
+
+/* avx512fintrin.h */
+test_1 (_mm512_cvt_roundepi32_ps, __m512, __m512i, 9)
+test_1 (_mm512_cvt_roundepu32_ps, __m512, __m512i, 9)
+test_1 (_mm512_cvt_roundpd_epi32, __m256i, __m512d, 9)
+test_1 (_mm512_cvt_roundpd_epu32, __m256i, __m512d, 9)
+test_1 (_mm512_cvt_roundpd_ps, __m256, __m512d, 9)
+test_1 (_mm512_cvt_roundph_ps, __m512, __m256i, 8)
+test_1 (_mm512_cvt_roundps_epi32, __m512i, __m512, 9)
+test_1 (_mm512_cvt_roundps_epu32, __m512i, __m512, 9)
+test_1 (_mm512_cvt_roundps_pd, __m512d, __m256, 8)
+test_1 (_mm512_cvtps_ph, __m256i, __m512, 1)
+test_1 (_mm512_cvtt_roundpd_epi32, __m256i, __m512d, 8)
+test_1 (_mm512_cvtt_roundpd_epu32, __m256i, __m512d, 8)
+test_1 (_mm512_cvtt_roundps_epi32, __m512i, __m512, 8)
+test_1 (_mm512_cvtt_roundps_epu32, __m512i, __m512, 8)
+test_1 (_mm512_extractf32x4_ps, __m128, __m512, 1)
+test_1 (_mm512_extractf64x4_pd, __m256d, __m512d, 1)
+test_1 (_mm512_extracti32x4_epi32, __m128i, __m512i, 1)
+test_1 (_mm512_extracti64x4_epi64, __m256i, __m512i, 1)
+test_1 (_mm512_getexp_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_getexp_round_ps, __m512, __m512, 8)
+test_1y (_mm512_getmant_round_pd, __m512d, __m512d, 1, 1, 8)
+test_1y (_mm512_getmant_round_ps, __m512, __m512, 1, 1, 8)
+test_1 (_mm512_permute_pd, __m512d, __m512d, 1)
+test_1 (_mm512_permute_ps, __m512, __m512, 1)
+test_1 (_mm512_permutex_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_permutex_pd, __m512d, __m512d, 1)
+test_1 (_mm512_rol_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_rol_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_ror_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_ror_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_shuffle_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_slli_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_slli_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_sqrt_round_pd, __m512d, __m512d, 9)
+test_1 (_mm512_sqrt_round_ps, __m512, __m512, 9)
+test_1 (_mm512_srai_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_srai_epi64, __m512i, __m512i, 1)
+test_1 (_mm512_srli_epi32, __m512i, __m512i, 1)
+test_1 (_mm512_srli_epi64, __m512i, __m512i, 1)
+test_1 (_mm_cvt_roundsd_i32, int, __m128d, 9)
+test_1 (_mm_cvt_roundsd_u32, unsigned, __m128d, 9)
+test_1 (_mm_cvt_roundss_i32, int, __m128, 9)
+test_1 (_mm_cvt_roundss_u32, unsigned, __m128, 9)
+test_1 (_mm_cvtt_roundsd_i32, int, __m128d, 8)
+test_1 (_mm_cvtt_roundsd_u32, unsigned, __m128d, 8)
+test_1 (_mm_cvtt_roundss_i32, int, __m128, 8)
+test_1 (_mm_cvtt_roundss_u32, unsigned, __m128, 8)
+test_1x (_mm512_getmant_pd, __m512d, __m512d, 1, 1)
+test_1x (_mm512_getmant_ps, __m512, __m512, 1, 1)
+test_1x (_mm_cvt_roundi32_ss, __m128, __m128, 1, 9)
+test_2 (_mm512_add_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_add_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_alignr_epi32, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_alignr_epi64, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epi32_mask, __mmask16, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epi64_mask, __mmask8, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epu32_mask, __mmask16, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_epu64_mask, __mmask8, __m512i, __m512i, 1)
+test_2 (_mm512_cmp_pd_mask, __mmask8, __m512d, __m512d, 1)
+test_2 (_mm512_cmp_ps_mask, __mmask16, __m512, __m512, 1)
+test_2 (_mm512_div_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_div_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_i32gather_epi32, __m512i, __m512i, void const *, 1)
+test_2 (_mm512_i32gather_epi64, __m512i, __m256i, void const *, 1)
+test_2 (_mm512_i32gather_pd, __m512d, __m256i, void const *, 1)
+test_2 (_mm512_i32gather_ps, __m512, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_epi32, __m256i, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_epi64, __m512i, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_pd, __m512d, __m512i, void const *, 1)
+test_2 (_mm512_i64gather_ps, __m256, __m512i, void const *, 1)
+test_2 (_mm512_insertf32x4, __m512, __m512, __m128, 1)
+test_2 (_mm512_insertf64x4, __m512d, __m512d, __m256d, 1)
+test_2 (_mm512_inserti32x4, __m512i, __m512i, __m128i, 1)
+test_2 (_mm512_inserti64x4, __m512i, __m512i, __m256i, 1)
+test_2 (_mm512_maskz_cvt_roundepi32_ps, __m512, __mmask16, __m512i, 9)
+test_2 (_mm512_maskz_cvt_roundepu32_ps, __m512, __mmask16, __m512i, 9)
+test_2 (_mm512_maskz_cvt_roundpd_epi32, __m256i, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundpd_epu32, __m256i, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundpd_ps, __m256, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_cvt_roundph_ps, __m512, __mmask16, __m256i, 8)
+test_2 (_mm512_maskz_cvt_roundps_epi32, __m512i, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_cvt_roundps_epu32, __m512i, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_cvt_roundps_pd, __m512d, __mmask8, __m256, 8)
+test_2 (_mm512_maskz_cvtps_ph, __m256i, __mmask16, __m512, 1)
+test_2 (_mm512_maskz_cvtt_roundpd_epi32, __m256i, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_cvtt_roundpd_epu32, __m256i, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_cvtt_roundps_epi32, __m512i, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_cvtt_roundps_epu32, __m512i, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_extractf32x4_ps, __m128, __mmask8, __m512, 1)
+test_2 (_mm512_maskz_extractf64x4_pd, __m256d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_extracti32x4_epi32, __m128i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_extracti64x4_epi64, __m256i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_getexp_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_getexp_round_ps, __m512, __mmask16, __m512, 8)
+test_2y (_mm512_maskz_getmant_round_pd, __m512d, __mmask8, __m512d, 1, 1, 8)
+test_2y (_mm512_maskz_getmant_round_ps, __m512, __mmask16, __m512, 1, 1, 8)
+test_2 (_mm512_maskz_permute_pd, __m512d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_permute_ps, __m512, __mmask16, __m512, 1)
+test_2 (_mm512_maskz_permutex_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_permutex_pd, __m512d, __mmask8, __m512d, 1)
+test_2 (_mm512_maskz_rol_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_rol_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_ror_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_ror_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_shuffle_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_slli_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_slli_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_sqrt_round_pd, __m512d, __mmask8, __m512d, 9)
+test_2 (_mm512_maskz_sqrt_round_ps, __m512, __mmask16, __m512, 9)
+test_2 (_mm512_maskz_srai_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_srai_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_maskz_srli_epi32, __m512i, __mmask16, __m512i, 1)
+test_2 (_mm512_maskz_srli_epi64, __m512i, __mmask8, __m512i, 1)
+test_2 (_mm512_max_round_pd, __m512d, __m512d, __m512d, 8)
+test_2 (_mm512_max_round_ps, __m512, __m512, __m512, 8)
+test_2 (_mm512_min_round_pd, __m512d, __m512d, __m512d, 8)
+test_2 (_mm512_min_round_ps, __m512, __m512, __m512, 8)
+test_2 (_mm512_mul_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_mul_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_scalef_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_scalef_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm512_shuffle_f32x4, __m512, __m512, __m512, 1)
+test_2 (_mm512_shuffle_f64x2, __m512d, __m512d, __m512d, 1)
+test_2 (_mm512_shuffle_i32x4, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_shuffle_i64x2, __m512i, __m512i, __m512i, 1)
+test_2 (_mm512_shuffle_pd, __m512d, __m512d, __m512d, 1)
+test_2 (_mm512_shuffle_ps, __m512, __m512, __m512, 1)
+test_2 (_mm512_sub_round_pd, __m512d, __m512d, __m512d, 9)
+test_2 (_mm512_sub_round_ps, __m512, __m512, __m512, 9)
+test_2 (_mm_cmp_sd_mask, __mmask8, __m128d, __m128d, 1)
+test_2 (_mm_cmp_ss_mask, __mmask8, __m128, __m128, 1)
+#ifdef __x86_64__
+test_2 (_mm_cvt_roundi64_sd, __m128d, __m128d, long long, 9)
+test_2 (_mm_cvt_roundi64_ss, __m128, __m128, long long, 9)
+#endif
+test_2 (_mm_cvt_roundu32_ss, __m128, __m128, unsigned, 9)
+#ifdef __x86_64__
+test_2 (_mm_cvt_roundu64_sd, __m128d, __m128d, unsigned long long, 9)
+test_2 (_mm_cvt_roundu64_ss, __m128, __m128, unsigned long long, 9)
+#endif
+test_2x (_mm512_cmp_round_pd_mask, __mmask8, __m512d, __m512d, 1, 8)
+test_2x (_mm512_cmp_round_ps_mask, __mmask16, __m512, __m512, 1, 8)
+test_2x (_mm512_maskz_roundscale_round_pd, __m512d, __mmask8, __m512d, 1, 8)
+test_2x (_mm512_maskz_roundscale_round_ps, __m512, __mmask16, __m512, 1, 8)
+test_2x (_mm_cmp_round_sd_mask, __mmask8, __m128d, __m128d, 1, 8)
+test_2x (_mm_cmp_round_ss_mask, __mmask8, __m128, __m128, 1, 8)
+test_2x (_mm_comi_round_sd, int, __m128d, __m128d, 1, 8)
+test_2x (_mm_comi_round_ss, int, __m128, __m128, 1, 8)
+test_3 (_mm512_fmadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmaddsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmaddsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fmsubadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fmsubadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fnmadd_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fnmadd_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_fnmsub_round_pd, __m512d, __m512d, __m512d, __m512d, 9)
+test_3 (_mm512_fnmsub_round_ps, __m512, __m512, __m512, __m512, 9)
+test_3 (_mm512_mask_cmp_epi32_mask, __mmask16, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epi64_mask, __mmask8, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epu32_mask, __mmask16, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_epu64_mask, __mmask8, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_mask_cmp_pd_mask, __mmask8, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_mask_cmp_ps_mask, __mmask16, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_mask_cvt_roundepi32_ps, __m512, __m512, __mmask16, __m512i, 9)
+test_3 (_mm512_mask_cvt_roundepu32_ps, __m512, __m512, __mmask16, __m512i, 9)
+test_3 (_mm512_mask_cvt_roundpd_epi32, __m256i, __m256i, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundpd_epu32, __m256i, __m256i, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundpd_ps, __m256, __m256, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_cvt_roundph_ps, __m512, __m512, __mmask16, __m256i, 8)
+test_3 (_mm512_mask_cvt_roundps_epi32, __m512i, __m512i, __mmask16, __m512, 9)
+test_3 (_mm512_mask_cvt_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 9)
+test_3 (_mm512_mask_cvt_roundps_pd, __m512d, __m512d, __mmask8, __m256, 8)
+test_3 (_mm512_mask_cvtps_ph, __m256i, __m256i, __mmask16, __m512, 1)
+test_3 (_mm512_mask_cvtt_roundpd_epi32, __m256i, __m256i, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_cvtt_roundpd_epu32, __m256i, __m256i, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_cvtt_roundps_epi32, __m512i, __m512i, __mmask16, __m512, 8)
+test_3 (_mm512_mask_cvtt_roundps_epu32, __m512i, __m512i, __mmask16, __m512, 8)
+test_3 (_mm512_mask_extractf32x4_ps, __m128, __m128, __mmask8, __m512, 1)
+test_3 (_mm512_mask_extractf64x4_pd, __m256d, __m256d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_extracti32x4_epi32, __m128i, __m128i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_extracti64x4_epi64, __m256i, __m256i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_getexp_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_getexp_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3y (_mm512_mask_getmant_round_pd, __m512d, __m512d, __mmask8, __m512d, 1, 1, 8)
+test_3y (_mm512_mask_getmant_round_ps, __m512, __m512, __mmask16, __m512, 1, 1, 8)
+test_3 (_mm512_mask_permute_pd, __m512d, __m512d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_permute_ps, __m512, __m512, __mmask16, __m512, 1)
+test_3 (_mm512_mask_permutex_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_permutex_pd, __m512d, __m512d, __mmask8, __m512d, 1)
+test_3 (_mm512_mask_rol_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_rol_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_ror_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_ror_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_shuffle_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_slli_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_slli_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_sqrt_round_pd, __m512d, __m512d, __mmask8, __m512d, 9)
+test_3 (_mm512_mask_sqrt_round_ps, __m512, __m512, __mmask16, __m512, 9)
+test_3 (_mm512_mask_srai_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_srai_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_mask_srli_epi32, __m512i, __m512i, __mmask16, __m512i, 1)
+test_3 (_mm512_mask_srli_epi64, __m512i, __m512i, __mmask8, __m512i, 1)
+test_3 (_mm512_maskz_add_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_add_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_alignr_epi32, __m512i, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_alignr_epi64, __m512i, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_div_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_div_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_insertf32x4, __m512, __mmask16, __m512, __m128, 1)
+test_3 (_mm512_maskz_insertf64x4, __m512d, __mmask8, __m512d, __m256d, 1)
+test_3 (_mm512_maskz_inserti32x4, __m512i, __mmask16, __m512i, __m128i, 1)
+test_3 (_mm512_maskz_inserti64x4, __m512i, __mmask8, __m512i, __m256i, 1)
+test_3 (_mm512_maskz_max_round_pd, __m512d, __mmask8, __m512d, __m512d, 8)
+test_3 (_mm512_maskz_max_round_ps, __m512, __mmask16, __m512, __m512, 8)
+test_3 (_mm512_maskz_min_round_pd, __m512d, __mmask8, __m512d, __m512d, 8)
+test_3 (_mm512_maskz_min_round_ps, __m512, __mmask16, __m512, __m512, 8)
+test_3 (_mm512_maskz_mul_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_mul_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_scalef_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_scalef_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_maskz_shuffle_f32x4, __m512, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_maskz_shuffle_f64x2, __m512d, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_maskz_shuffle_i32x4, __m512i, __mmask16, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_shuffle_i64x2, __m512i, __mmask8, __m512i, __m512i, 1)
+test_3 (_mm512_maskz_shuffle_pd, __m512d, __mmask8, __m512d, __m512d, 1)
+test_3 (_mm512_maskz_shuffle_ps, __m512, __mmask16, __m512, __m512, 1)
+test_3 (_mm512_maskz_sub_round_pd, __m512d, __mmask8, __m512d, __m512d, 9)
+test_3 (_mm512_maskz_sub_round_ps, __m512, __mmask16, __m512, __m512, 9)
+test_3 (_mm512_ternarylogic_epi32, __m512i, __m512i, __m512i, __m512i, 1)
+test_3 (_mm512_ternarylogic_epi64, __m512i, __m512i, __m512i, __m512i, 1)
+test_3 (_mm_mask_cmp_sd_mask, __mmask8, __mmask8, __m128d, __m128d, 1)
+test_3 (_mm_mask_cmp_ss_mask, __mmask8, __mmask8, __m128, __m128, 1)
+test_3v (_mm512_i32scatter_epi32, void *, __m512i, __m512i, 1)
+test_3v (_mm512_i32scatter_epi64, void *, __m256i, __m512i, 1)
+test_3v (_mm512_i32scatter_pd, void *, __m256i, __m512d, 1)
+test_3v (_mm512_i32scatter_ps, void *, __m512i, __m512, 1)
+test_3v (_mm512_i64scatter_epi32, void *, __m512i, __m256i, 1)
+test_3v (_mm512_i64scatter_epi64, void *, __m512i, __m512i, 1)
+test_3v (_mm512_i64scatter_pd, void *, __m512i, __m512d, 1)
+test_3v (_mm512_i64scatter_ps, void *, __m512i, __m256, 1)
+test_3x (_mm512_mask_roundscale_round_pd, __m512d, __m512d, __mmask8, __m512d, 1, 8)
+test_3x (_mm512_mask_roundscale_round_ps, __m512, __m512, __mmask16, __m512, 1, 8)
+test_3x (_mm512_mask_cmp_round_pd_mask, __mmask8, __mmask8, __m512d, __m512d, 1, 8)
+test_3x (_mm512_mask_cmp_round_ps_mask, __mmask16, __mmask16, __m512, __m512, 1, 8)
+test_3x (_mm_fixupimm_round_sd, __m128d, __m128d, __m128d, __m128i, 1, 8)
+test_3x (_mm_fixupimm_round_ss, __m128, __m128, __m128, __m128i, 1, 8)
+test_3x (_mm_mask_cmp_round_sd_mask, __mmask8, __mmask8, __m128d, __m128d, 1, 8)
+test_3x (_mm_mask_cmp_round_ss_mask, __mmask8, __mmask8, __m128, __m128, 1, 8)
+test_4 (_mm512_mask3_fmadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmaddsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmaddsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fmsubadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fmsubadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fnmadd_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fnmadd_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask3_fnmsub_round_pd, __m512d, __m512d, __m512d, __m512d, __mmask8, 9)
+test_4 (_mm512_mask3_fnmsub_round_ps, __m512, __m512, __m512, __m512, __mmask16, 9)
+test_4 (_mm512_mask_add_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_add_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_alignr_epi32, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_alignr_epi64, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_mask_div_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_div_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmaddsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmaddsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fmsubadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fmsubadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fnmadd_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fnmadd_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_fnmsub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_fnmsub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_i32gather_epi32, __m512i, __m512i, __mmask16, __m512i, void const *, 1)
+test_4 (_mm512_mask_i32gather_epi64, __m512i, __m512i, __mmask8, __m256i, void const *, 1)
+test_4 (_mm512_mask_i32gather_pd, __m512d, __m512d, __mmask8, __m256i, void const *, 1)
+test_4 (_mm512_mask_i32gather_ps, __m512, __m512, __mmask16, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_epi32, __m256i, __m256i, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_epi64, __m512i, __m512i, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_pd, __m512d, __m512d, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_i64gather_ps, __m256, __m256, __mmask8, __m512i, void const *, 1)
+test_4 (_mm512_mask_insertf32x4, __m512, __m512, __mmask16, __m512, __m128, 1)
+test_4 (_mm512_mask_insertf64x4, __m512d, __m512d, __mmask8, __m512d, __m256d, 1)
+test_4 (_mm512_mask_inserti32x4, __m512i, __m512i, __mmask16, __m512i, __m128i, 1)
+test_4 (_mm512_mask_inserti64x4, __m512i, __m512i, __mmask8, __m512i, __m256i, 1)
+test_4 (_mm512_mask_max_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 8)
+test_4 (_mm512_mask_max_round_ps, __m512, __m512, __mmask16, __m512, __m512, 8)
+test_4 (_mm512_mask_min_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 8)
+test_4 (_mm512_mask_min_round_ps, __m512, __m512, __mmask16, __m512, __m512, 8)
+test_4 (_mm512_mask_mul_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_mul_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_scalef_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_scalef_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_shuffle_f32x4, __m512, __m512, __mmask16, __m512, __m512, 1)
+test_4 (_mm512_mask_shuffle_f64x2, __m512d, __m512d, __mmask8, __m512d, __m512d, 1)
+test_4 (_mm512_mask_shuffle_i32x4, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_shuffle_i64x2, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_mask_shuffle_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 1)
+test_4 (_mm512_mask_shuffle_ps, __m512, __m512, __mmask16, __m512, __m512, 1)
+test_4 (_mm512_mask_sub_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512d, 9)
+test_4 (_mm512_mask_sub_round_ps, __m512, __m512, __mmask16, __m512, __m512, 9)
+test_4 (_mm512_mask_ternarylogic_epi32, __m512i, __m512i, __mmask16, __m512i, __m512i, 1)
+test_4 (_mm512_mask_ternarylogic_epi64, __m512i, __m512i, __mmask8, __m512i, __m512i, 1)
+test_4 (_mm512_maskz_fmadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmaddsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmaddsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fmsubadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fmsubadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fnmadd_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fnmadd_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_fnmsub_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512d, 9)
+test_4 (_mm512_maskz_fnmsub_round_ps, __m512, __mmask16, __m512, __m512, __m512, 9)
+test_4 (_mm512_maskz_ternarylogic_epi32, __m512i, __mmask16, __m512i, __m512i, __m512i, 1)
+test_4 (_mm512_maskz_ternarylogic_epi64, __m512i, __mmask8, __m512i, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_epi32, void *, __mmask16, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_epi64, void *, __mmask8, __m256i, __m512i, 1)
+test_4v (_mm512_mask_i32scatter_pd, void *, __mmask8, __m256i, __m512d, 1)
+test_4v (_mm512_mask_i32scatter_ps, void *, __mmask16, __m512i, __m512, 1)
+test_4v (_mm512_mask_i64scatter_epi32, void *, __mmask8, __m512i, __m256i, 1)
+test_4v (_mm512_mask_i64scatter_epi64, void *, __mmask8, __m512i, __m512i, 1)
+test_4v (_mm512_mask_i64scatter_pd, void *, __mmask8, __m512i, __m512d, 1)
+test_4v (_mm512_mask_i64scatter_ps, void *, __mmask8, __m512i, __m256, 1)
+test_4x (_mm512_mask_fixupimm_round_pd, __m512d, __m512d, __mmask8, __m512d, __m512i, 1, 8)
+test_4x (_mm512_mask_fixupimm_round_ps, __m512, __m512, __mmask16, __m512, __m512i, 1, 8)
+test_4x (_mm512_maskz_fixupimm_round_pd, __m512d, __mmask8, __m512d, __m512d, __m512i, 1, 8)
+test_4x (_mm512_maskz_fixupimm_round_ps, __m512, __mmask16, __m512, __m512, __m512i, 1, 8)
+test_4x (_mm_mask_fixupimm_round_sd, __m128d, __m128d, __mmask8, __m128d, __m128i, 1, 8)
+test_4x (_mm_mask_fixupimm_round_ss, __m128, __m128, __mmask8, __m128, __m128i, 1, 8)
+test_4x (_mm_maskz_fixupimm_round_sd, __m128d, __mmask8, __m128d, __m128d, __m128i, 1, 8)
+test_4x (_mm_maskz_fixupimm_round_ss, __m128, __mmask8, __m128, __m128, __m128i, 1, 8)
+
+/* avx512pfintrin.h */
+test_3vx (_mm512_mask_prefetch_i32gather_ps, __m512i, __mmask16, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i32scatter_ps, void const *, __mmask16, __m512i, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64gather_ps, __m512i, __mmask8, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64scatter_ps, void const *, __mmask8, __m512i, 1, _MM_HINT_T0)
+
+test_3vx (_mm512_mask_prefetch_i32gather_pd, __m256i, __mmask8, void const *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i32scatter_pd, void const *, __mmask8, __m256i, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64gather_pd, __m512i, __mmask8, long long *, 1, _MM_HINT_T0)
+test_3vx (_mm512_mask_prefetch_i64scatter_pd, void const *, __mmask8, __m512i, 1, _MM_HINT_T0)
+
+/* avx512erintrin.h */
+test_1 (_mm512_exp2a23_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_exp2a23_round_ps, __m512, __m512, 8)
+test_1 (_mm512_rcp28_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_rcp28_round_ps, __m512, __m512, 8)
+test_1 (_mm512_rsqrt28_round_pd, __m512d, __m512d, 8)
+test_1 (_mm512_rsqrt28_round_ps, __m512, __m512, 8)
+test_2 (_mm512_maskz_exp2a23_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_exp2a23_round_ps, __m512, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_rcp28_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_rcp28_round_ps, __m512, __mmask16, __m512, 8)
+test_2 (_mm512_maskz_rsqrt28_round_pd, __m512d, __mmask8, __m512d, 8)
+test_2 (_mm512_maskz_rsqrt28_round_ps, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_exp2a23_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_exp2a23_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_rcp28_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_rcp28_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_3 (_mm512_mask_rsqrt28_round_pd, __m512d, __m512d, __mmask8, __m512d, 8)
+test_3 (_mm512_mask_rsqrt28_round_ps, __m512, __m512, __mmask16, __m512, 8)
+test_2 (_mm_rcp28_round_sd, __m128d, __m128d, __m128d, 8)
+test_2 (_mm_rcp28_round_ss, __m128, __m128, __m128, 8)
+test_2 (_mm_rsqrt28_round_sd, __m128d, __m128d, __m128d, 8)
+test_2 (_mm_rsqrt28_round_ss, __m128, __m128, __m128, 8)
+
+/* shaintrin.h */
+test_2 (_mm_sha1rnds4_epu32, __m128i, __m128i, __m128i, 1)
+
/* wmmintrin.h (AES/PCLMUL). */
#ifdef DIFFERENT_PRAGMAS
#pragma GCC target ("aes,pclmul")
@@ -257,7 +694,7 @@ test_2 (_mm_clmulepi64_si128, __m128i, __m128i, __m128i, 1)
/* x86intrin.h (FMA4/XOP/LWP/BMI/BMI2/TBM/LZCNT/FMA). */
#ifdef DIFFERENT_PRAGMAS
-#pragma GCC target ("fma4,xop,lwp,bmi,bmi2,tbm,lzcnt,fma")
+#pragma GCC target ("fma4,xop,lwp,bmi,bmi2,tbm,lzcnt,fma,rdseed,prfchw,adx,fxsr,xsaveopt")
#endif
#include <x86intrin.h>
/* xopintrin.h */
diff --git a/gcc/testsuite/gcc.target/i386/sse-23.c b/gcc/testsuite/gcc.target/i386/sse-23.c
index 462f8c9acd..d227babb8c 100644
--- a/gcc/testsuite/gcc.target/i386/sse-23.c
+++ b/gcc/testsuite/gcc.target/i386/sse-23.c
@@ -90,7 +90,7 @@
#define __builtin_ia32_shufpd(A, B, N) __builtin_ia32_shufpd(A, B, 0)
/* xmmintrin.h */
-#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, A, _MM_HINT_NTA)
+#define __builtin_prefetch(P, A, I) __builtin_prefetch(P, 0, _MM_HINT_NTA)
#define __builtin_ia32_pshufw(A, N) __builtin_ia32_pshufw(A, 0)
#define __builtin_ia32_vec_set_v4hi(A, D, N) \
__builtin_ia32_vec_set_v4hi(A, D, 0)
@@ -180,7 +180,212 @@
#define __builtin_ia32_gatherdiv4si(X, Y, Z, K, M) __builtin_ia32_gatherdiv4si(X, Y, Z, K, 1)
#define __builtin_ia32_gatherdiv4si256(X, Y, Z, K, M) __builtin_ia32_gatherdiv4si256(X, Y, Z, K, 1)
-#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma")
+/* rtmintrin.h */
+#define __builtin_ia32_xabort(M) __builtin_ia32_xabort(1)
+
+/* avx512fintrin.h */
+#define __builtin_ia32_addpd512_mask(A, B, C, D, E) __builtin_ia32_addpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addps512_mask(A, B, C, D, E) __builtin_ia32_addps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_addsd_round(A, B, C) __builtin_ia32_addsd_round(A, B, 8)
+#define __builtin_ia32_addss_round(A, B, C) __builtin_ia32_addss_round(A, B, 8)
+#define __builtin_ia32_alignd512_mask(A, B, F, D, E) __builtin_ia32_alignd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_alignq512_mask(A, B, F, D, E) __builtin_ia32_alignq512_mask(A, B, 1, D, E)
+#define __builtin_ia32_cmpd512_mask(A, B, E, D) __builtin_ia32_cmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_cmppd512_mask(A, B, F, D, E) __builtin_ia32_cmppd512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpps512_mask(A, B, F, D, E) __builtin_ia32_cmpps512_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpq512_mask(A, B, E, D) __builtin_ia32_cmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_cmpsd_mask(A, B, F, D, E) __builtin_ia32_cmpsd_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cmpss_mask(A, B, F, D, E) __builtin_ia32_cmpss_mask(A, B, 1, D, 8)
+#define __builtin_ia32_cvtdq2ps512_mask(A, B, C, D) __builtin_ia32_cvtdq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2dq512_mask(A, B, C, D) __builtin_ia32_cvtpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2ps512_mask(A, B, C, D) __builtin_ia32_cvtpd2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtpd2udq512_mask(A, B, C, D) __builtin_ia32_cvtpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2dq512_mask(A, B, C, D) __builtin_ia32_cvtps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2pd512_mask(A, B, C, D) __builtin_ia32_cvtps2pd512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtps2udq512_mask(A, B, C, D) __builtin_ia32_cvtps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtsd2ss_round(A, B, C) __builtin_ia32_cvtsd2ss_round(A, B, 8)
+#define __builtin_ia32_cvtss2sd_round(A, B, C) __builtin_ia32_cvtss2sd_round(A, B, 4)
+#define __builtin_ia32_cvtsi2sd64(A, B, C) __builtin_ia32_cvtsi2sd64(A, B, 8)
+#define __builtin_ia32_cvtsi2ss32(A, B, C) __builtin_ia32_cvtsi2ss32(A, B, 8)
+#define __builtin_ia32_cvtsi2ss64(A, B, C) __builtin_ia32_cvtsi2ss64(A, B, 8)
+#define __builtin_ia32_cvttpd2dq512_mask(A, B, C, D) __builtin_ia32_cvttpd2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttpd2udq512_mask(A, B, C, D) __builtin_ia32_cvttpd2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2dq512_mask(A, B, C, D) __builtin_ia32_cvttps2dq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvttps2udq512_mask(A, B, C, D) __builtin_ia32_cvttps2udq512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtudq2ps512_mask(A, B, C, D) __builtin_ia32_cvtudq2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_cvtusi2sd64(A, B, C) __builtin_ia32_cvtusi2sd64(A, B, 8)
+#define __builtin_ia32_cvtusi2ss32(A, B, C) __builtin_ia32_cvtusi2ss32(A, B, 8)
+#define __builtin_ia32_cvtusi2ss64(A, B, C) __builtin_ia32_cvtusi2ss64(A, B, 8)
+#define __builtin_ia32_divpd512_mask(A, B, C, D, E) __builtin_ia32_divpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divps512_mask(A, B, C, D, E) __builtin_ia32_divps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_divsd_round(A, B, C) __builtin_ia32_divsd_round(A, B, 8)
+#define __builtin_ia32_divss_round(A, B, C) __builtin_ia32_divss_round(A, B, 8)
+#define __builtin_ia32_extractf32x4_mask(A, E, C, D) __builtin_ia32_extractf32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extractf64x4_mask(A, E, C, D) __builtin_ia32_extractf64x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti32x4_mask(A, E, C, D) __builtin_ia32_extracti32x4_mask(A, 1, C, D)
+#define __builtin_ia32_extracti64x4_mask(A, E, C, D) __builtin_ia32_extracti64x4_mask(A, 1, C, D)
+#define __builtin_ia32_fixupimmpd512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmpd512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmpd512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmps512_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmps512_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmsd_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmsd_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_mask(A, B, C, I, E, F) __builtin_ia32_fixupimmss_mask(A, B, C, 1, E, 8)
+#define __builtin_ia32_fixupimmss_maskz(A, B, C, I, E, F) __builtin_ia32_fixupimmss_maskz(A, B, C, 1, E, 8)
+#define __builtin_ia32_gatherdiv8df(A, B, C, D, F) __builtin_ia32_gatherdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv8di(A, B, C, D, F) __builtin_ia32_gatherdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16sf(A, B, C, D, F) __builtin_ia32_gatherdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gatherdiv16si(A, B, C, D, F) __builtin_ia32_gatherdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16sf(A, B, C, D, F) __builtin_ia32_gathersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv16si(A, B, C, D, F) __builtin_ia32_gathersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8df(A, B, C, D, F) __builtin_ia32_gathersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_gathersiv8di(A, B, C, D, F) __builtin_ia32_gathersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_getexppd512_mask(A, B, C, D) __builtin_ia32_getexppd512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpps512_mask(A, B, C, D) __builtin_ia32_getexpps512_mask(A, B, C, 8)
+#define __builtin_ia32_getexpsd128_round(A, B, C) __builtin_ia32_getexpsd128_round(A, B, 4)
+#define __builtin_ia32_getexpss128_round(A, B, C) __builtin_ia32_getexpss128_round(A, B, 4)
+#define __builtin_ia32_getmantpd512_mask(A, F, C, D, E) __builtin_ia32_getmantpd512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantps512_mask(A, F, C, D, E) __builtin_ia32_getmantps512_mask(A, 1, C, D, 8)
+#define __builtin_ia32_getmantsd_round(A, B, C, D) __builtin_ia32_getmantsd_round(A, B, 1, 4)
+#define __builtin_ia32_getmantss_round(A, B, C, D) __builtin_ia32_getmantss_round(A, B, 1, 4)
+#define __builtin_ia32_insertf32x4_mask(A, B, F, D, E) __builtin_ia32_insertf32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_insertf64x4_mask(A, B, F, D, E) __builtin_ia32_insertf64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti32x4_mask(A, B, F, D, E) __builtin_ia32_inserti32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_inserti64x4_mask(A, B, F, D, E) __builtin_ia32_inserti64x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_maxpd512_mask(A, B, C, D, E) __builtin_ia32_maxpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxps512_mask(A, B, C, D, E) __builtin_ia32_maxps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_maxsd_round(A, B, C) __builtin_ia32_maxsd_round(A, B, 4)
+#define __builtin_ia32_maxss_round(A, B, C) __builtin_ia32_maxss_round(A, B, 4)
+#define __builtin_ia32_minpd512_mask(A, B, C, D, E) __builtin_ia32_minpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minps512_mask(A, B, C, D, E) __builtin_ia32_minps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_minsd_round(A, B, C) __builtin_ia32_minsd_round(A, B, 4)
+#define __builtin_ia32_minss_round(A, B, C) __builtin_ia32_minss_round(A, B, 4)
+#define __builtin_ia32_mulpd512_mask(A, B, C, D, E) __builtin_ia32_mulpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulps512_mask(A, B, C, D, E) __builtin_ia32_mulps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_mulsd_round(A, B, C) __builtin_ia32_mulsd_round(A, B, 8)
+#define __builtin_ia32_mulss_round(A, B, C) __builtin_ia32_mulss_round(A, B, 8)
+#define __builtin_ia32_permdf512_mask(A, E, C, D) __builtin_ia32_permdf512_mask(A, 1, C, D)
+#define __builtin_ia32_permdi512_mask(A, E, C, D) __builtin_ia32_permdi512_mask(A, 1, C, D)
+#define __builtin_ia32_prold512_mask(A, E, C, D) __builtin_ia32_prold512_mask(A, 1, C, D)
+#define __builtin_ia32_prolq512_mask(A, E, C, D) __builtin_ia32_prolq512_mask(A, 1, C, D)
+#define __builtin_ia32_prord512_mask(A, E, C, D) __builtin_ia32_prord512_mask(A, 1, C, D)
+#define __builtin_ia32_prorq512_mask(A, E, C, D) __builtin_ia32_prorq512_mask(A, 1, C, D)
+#define __builtin_ia32_pshufd512_mask(A, E, C, D) __builtin_ia32_pshufd512_mask(A, 1, C, D)
+#define __builtin_ia32_pslldi512_mask(A, E, C, D) __builtin_ia32_pslldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psllqi512_mask(A, E, C, D) __builtin_ia32_psllqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psradi512_mask(A, E, C, D) __builtin_ia32_psradi512_mask(A, 1, C, D)
+#define __builtin_ia32_psraqi512_mask(A, E, C, D) __builtin_ia32_psraqi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrldi512_mask(A, E, C, D) __builtin_ia32_psrldi512_mask(A, 1, C, D)
+#define __builtin_ia32_psrlqi512_mask(A, E, C, D) __builtin_ia32_psrlqi512_mask(A, 1, C, D)
+#define __builtin_ia32_pternlogd512_mask(A, B, C, F, E) __builtin_ia32_pternlogd512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogd512_maskz(A, B, C, F, E) __builtin_ia32_pternlogd512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_mask(A, B, C, F, E) __builtin_ia32_pternlogq512_mask(A, B, C, 1, E)
+#define __builtin_ia32_pternlogq512_maskz(A, B, C, F, E) __builtin_ia32_pternlogq512_maskz(A, B, C, 1, E)
+#define __builtin_ia32_rndscalepd_mask(A, F, C, D, E) __builtin_ia32_rndscalepd_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscaleps_mask(A, F, C, D, E) __builtin_ia32_rndscaleps_mask(A, 1, C, D, 8)
+#define __builtin_ia32_rndscalesd_round(A, B, C, D) __builtin_ia32_rndscalesd_round(A, B, 1, 4)
+#define __builtin_ia32_rndscaless_round(A, B, C, D) __builtin_ia32_rndscaless_round(A, B, 1, 4)
+#define __builtin_ia32_scalefpd512_mask(A, B, C, D, E) __builtin_ia32_scalefpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefps512_mask(A, B, C, D, E) __builtin_ia32_scalefps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_scalefsd_round(A, B, C) __builtin_ia32_scalefsd_round(A, B, 8)
+#define __builtin_ia32_scalefss_round(A, B, C) __builtin_ia32_scalefss_round(A, B, 8)
+#define __builtin_ia32_scatterdiv8df(A, B, C, D, F) __builtin_ia32_scatterdiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv8di(A, B, C, D, F) __builtin_ia32_scatterdiv8di(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16sf(A, B, C, D, F) __builtin_ia32_scatterdiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scatterdiv16si(A, B, C, D, F) __builtin_ia32_scatterdiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16sf(A, B, C, D, F) __builtin_ia32_scattersiv16sf(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv16si(A, B, C, D, F) __builtin_ia32_scattersiv16si(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8df(A, B, C, D, F) __builtin_ia32_scattersiv8df(A, B, C, D, 8)
+#define __builtin_ia32_scattersiv8di(A, B, C, D, F) __builtin_ia32_scattersiv8di(A, B, C, D, 8)
+#define __builtin_ia32_shuf_f32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_f32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_f64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_f64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i32x4_mask(A, B, F, D, E) __builtin_ia32_shuf_i32x4_mask(A, B, 1, D, E)
+#define __builtin_ia32_shuf_i64x2_mask(A, B, F, D, E) __builtin_ia32_shuf_i64x2_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufpd512_mask(A, B, F, D, E) __builtin_ia32_shufpd512_mask(A, B, 1, D, E)
+#define __builtin_ia32_shufps512_mask(A, B, F, D, E) __builtin_ia32_shufps512_mask(A, B, 1, D, E)
+#define __builtin_ia32_sqrtpd512_mask(A, B, C, D) __builtin_ia32_sqrtpd512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtps512_mask(A, B, C, D) __builtin_ia32_sqrtps512_mask(A, B, C, 8)
+#define __builtin_ia32_sqrtss_round(A, B, C) __builtin_ia32_sqrtss_round(A, B, 8)
+#define __builtin_ia32_sqrtsd_round(A, B, C) __builtin_ia32_sqrtsd_round(A, B, 8)
+#define __builtin_ia32_subpd512_mask(A, B, C, D, E) __builtin_ia32_subpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subps512_mask(A, B, C, D, E) __builtin_ia32_subps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_subsd_round(A, B, C) __builtin_ia32_subsd_round(A, B, 8)
+#define __builtin_ia32_subss_round(A, B, C) __builtin_ia32_subss_round(A, B, 8)
+#define __builtin_ia32_ucmpd512_mask(A, B, E, D) __builtin_ia32_ucmpd512_mask(A, B, 1, D)
+#define __builtin_ia32_ucmpq512_mask(A, B, E, D) __builtin_ia32_ucmpq512_mask(A, B, 1, D)
+#define __builtin_ia32_vcomisd(A, B, C, D) __builtin_ia32_vcomisd(A, B, 1, 8)
+#define __builtin_ia32_vcomiss(A, B, C, D) __builtin_ia32_vcomiss(A, B, 1, 8)
+#define __builtin_ia32_vcvtph2ps512_mask(A, B, C, D) __builtin_ia32_vcvtph2ps512_mask(A, B, C, 8)
+#define __builtin_ia32_vcvtps2ph512_mask(A, E, C, D) __builtin_ia32_vcvtps2ph512_mask(A, 1, C, D)
+#define __builtin_ia32_vcvtsd2si32(A, B) __builtin_ia32_vcvtsd2si32(A, 8)
+#define __builtin_ia32_vcvtsd2si64(A, B) __builtin_ia32_vcvtsd2si64(A, 8)
+#define __builtin_ia32_vcvtsd2usi32(A, B) __builtin_ia32_vcvtsd2usi32(A, 8)
+#define __builtin_ia32_vcvtsd2usi64(A, B) __builtin_ia32_vcvtsd2usi64(A, 8)
+#define __builtin_ia32_vcvtss2si32(A, B) __builtin_ia32_vcvtss2si32(A, 8)
+#define __builtin_ia32_vcvtss2si64(A, B) __builtin_ia32_vcvtss2si64(A, 8)
+#define __builtin_ia32_vcvtss2usi32(A, B) __builtin_ia32_vcvtss2usi32(A, 8)
+#define __builtin_ia32_vcvtss2usi64(A, B) __builtin_ia32_vcvtss2usi64(A, 8)
+#define __builtin_ia32_vcvttsd2si32(A, B) __builtin_ia32_vcvttsd2si32(A, 8)
+#define __builtin_ia32_vcvttsd2si64(A, B) __builtin_ia32_vcvttsd2si64(A, 8)
+#define __builtin_ia32_vcvttsd2usi32(A, B) __builtin_ia32_vcvttsd2usi32(A, 8)
+#define __builtin_ia32_vcvttsd2usi64(A, B) __builtin_ia32_vcvttsd2usi64(A, 8)
+#define __builtin_ia32_vcvttss2si32(A, B) __builtin_ia32_vcvttss2si32(A, 8)
+#define __builtin_ia32_vcvttss2si64(A, B) __builtin_ia32_vcvttss2si64(A, 8)
+#define __builtin_ia32_vcvttss2usi32(A, B) __builtin_ia32_vcvttss2usi32(A, 8)
+#define __builtin_ia32_vcvttss2usi64(A, B) __builtin_ia32_vcvttss2usi64(A, 8)
+#define __builtin_ia32_vfmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsd3_round(A, B, C, D) __builtin_ia32_vfmaddsd3_round(A, B, C, 8)
+#define __builtin_ia32_vfmaddss3_round(A, B, C, D) __builtin_ia32_vfmaddss3_round(A, B, C, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubpd512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, E) __builtin_ia32_vfmaddsubps512_maskz(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubaddps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmaddps512_mask(A, B, C, D, E) __builtin_ia32_vfnmaddps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubpd512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask(A, B, C, D, 8)
+#define __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, E) __builtin_ia32_vfnmsubps512_mask3(A, B, C, D, 8)
+#define __builtin_ia32_vpermilpd512_mask(A, E, C, D) __builtin_ia32_vpermilpd512_mask(A, 1, C, D)
+#define __builtin_ia32_vpermilps512_mask(A, E, C, D) __builtin_ia32_vpermilps512_mask(A, 1, C, D)
+
+/* avx512pfintrin.h */
+#define __builtin_ia32_gatherpfdps(A, B, C, D, E) __builtin_ia32_gatherpfdps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfqps(A, B, C, D, E) __builtin_ia32_gatherpfqps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfdps(A, B, C, D, E) __builtin_ia32_scatterpfdps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfqps(A, B, C, D, E) __builtin_ia32_scatterpfqps(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfdpd(A, B, C, D, E) __builtin_ia32_gatherpfdpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_gatherpfqpd(A, B, C, D, E) __builtin_ia32_gatherpfqpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfdpd(A, B, C, D, E) __builtin_ia32_scatterpfdpd(A, B, C, 1, _MM_HINT_T0)
+#define __builtin_ia32_scatterpfqpd(A, B, C, D, E) __builtin_ia32_scatterpfqpd(A, B, C, 1, _MM_HINT_T0)
+
+/* avx512erintrin.h */
+#define __builtin_ia32_exp2pd_mask(A, B, C, D) __builtin_ia32_exp2pd_mask (A, B, C, 8)
+#define __builtin_ia32_exp2ps_mask(A, B, C, D) __builtin_ia32_exp2ps_mask (A, B, C, 8)
+#define __builtin_ia32_rcp28pd_mask(A, B, C, D) __builtin_ia32_rcp28pd_mask (A, B, C, 8)
+#define __builtin_ia32_rcp28ps_mask(A, B, C, D) __builtin_ia32_rcp28ps_mask (A, B, C, 8)
+#define __builtin_ia32_rsqrt28pd_mask(A, B, C, D) __builtin_ia32_rsqrt28pd_mask (A, B, C, 8)
+#define __builtin_ia32_rsqrt28ps_mask(A, B, C, D) __builtin_ia32_rsqrt28ps_mask (A, B, C, 8)
+#define __builtin_ia32_rcp28sd_round(A, B, C) __builtin_ia32_rcp28sd_round(A, B, 8)
+#define __builtin_ia32_rcp28ss_round(A, B, C) __builtin_ia32_rcp28ss_round(A, B, 8)
+#define __builtin_ia32_rsqrt28sd_round(A, B, C) __builtin_ia32_rsqrt28sd_round(A, B, 8)
+#define __builtin_ia32_rsqrt28ss_round(A, B, C) __builtin_ia32_rsqrt28ss_round(A, B, 8)
+
+/* shaintrin.h */
+#define __builtin_ia32_sha1rnds4(A, B, C) __builtin_ia32_sha1rnds4(A, B, 1)
+
+#pragma GCC target ("sse4a,3dnow,avx,avx2,fma4,xop,aes,pclmul,popcnt,abm,lzcnt,bmi,bmi2,tbm,lwp,fsgsbase,rdrnd,f16c,fma,rtm,rdseed,prfchw,adx,fxsr,xsaveopt,avx512f,avx512er,avx512cd,avx512pf,sha,prefetchwt1")
#include <wmmintrin.h>
#include <smmintrin.h>
#include <mm3dnow.h>
diff --git a/gcc/testsuite/gcc.target/i386/sse-5.c b/gcc/testsuite/gcc.target/i386/sse-5.c
index af935c2f00..8f5d9bc244 100644
--- a/gcc/testsuite/gcc.target/i386/sse-5.c
+++ b/gcc/testsuite/gcc.target/i386/sse-5.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* { dg-require-effective-target ia32 } */
-/* { dg-options "-Winline -Wno-psabi -O2 -mno-sse" } */
+/* { dg-prune-output "ABI for passing parameters" } */
+/* { dg-options "-Winline -O2 -mno-sse" } */
typedef double v2df __attribute__ ((vector_size (16)));
v2df p;
diff --git a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
index f4d3a9a8f2..6a50573a55 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-init-v2di-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=core2" } } */
/* { dg-options "-O2 -msse4 -march=core2 -dp" } */
#include <emmintrin.h>
@@ -9,4 +10,4 @@ test (long long b)
return _mm_cvtsi64_si128 (b);
}
-/* { dg-final { scan-assembler-times "\\*vec_concatv2di_rex64/4" 1 } } */
+/* { dg-final { scan-assembler-times "vec_concatv2di/3" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/sse2-movapd-1.c b/gcc/testsuite/gcc.target/i386/sse2-movapd-1.c
index b8b9dba0c2..55d9f594f5 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-movapd-1.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-movapd-1.c
@@ -25,7 +25,7 @@ static void
TEST (void)
{
union128d u;
- double e[2] __attribute__ ((aligned (8))) = {2134.3343,1234.635654};
+ double e[2] __attribute__ ((aligned (16))) = {2134.3343,1234.635654};
u.x = test (e);
diff --git a/gcc/testsuite/gcc.target/i386/sse2-movapd-2.c b/gcc/testsuite/gcc.target/i386/sse2-movapd-2.c
index 8298551baf..87da332779 100644
--- a/gcc/testsuite/gcc.target/i386/sse2-movapd-2.c
+++ b/gcc/testsuite/gcc.target/i386/sse2-movapd-2.c
@@ -25,7 +25,7 @@ static void
TEST (void)
{
union128d u;
- double e[2] __attribute__ ((aligned (8))) = {0.0};
+ double e[2] __attribute__ ((aligned (16))) = {0.0};
u.x = _mm_set_pd (2134.3343,1234.635654);
diff --git a/gcc/testsuite/gcc.target/i386/sse2-pr57233.c b/gcc/testsuite/gcc.target/i386/sse2-pr57233.c
new file mode 100644
index 0000000000..8a3bb2fc5e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/sse2-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target sse2 } } */
+/* { dg-options "-O2 -msse2" } */
+
+#include "sse2-check.h"
+
+static void
+sse2_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c
index aa2976d5b0..7e18b46f59 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-sfix-vec.c
@@ -15,8 +15,6 @@
#include <math.h>
-extern float floorf (float);
-
#define NUM 64
static void
@@ -53,10 +51,10 @@ TEST (void)
init_src (a);
for (i = 0; i < NUM; i++)
- r[i] = (int) floorf (a[i]);
+ r[i] = (int) __builtin_floorf (a[i]);
/* check results: */
for (i = 0; i < NUM; i++)
- if (r[i] != (int) floorf (a[i]))
+ if (r[i] != (int) __builtin_floorf (a[i]))
abort();
}
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
index 2f339f3b50..019ef89417 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-floorf-vec.c
@@ -15,8 +15,6 @@
#include <math.h>
-extern float floorf (float);
-
#define NUM 64
static void
@@ -53,10 +51,10 @@ TEST (void)
init_src (a);
for (i = 0; i < NUM; i++)
- r[i] = floorf (a[i]);
+ r[i] = __builtin_floorf (a[i]);
/* check results: */
for (i = 0; i < NUM; i++)
- if (r[i] != floorf (a[i]))
+ if (r[i] != __builtin_floorf (a[i]))
abort();
}
diff --git a/gcc/testsuite/gcc.target/i386/sse4_1-pmuldq.c b/gcc/testsuite/gcc.target/i386/sse4_1-pmuldq.c
index dda1ba3c19..fc3830a457 100644
--- a/gcc/testsuite/gcc.target/i386/sse4_1-pmuldq.c
+++ b/gcc/testsuite/gcc.target/i386/sse4_1-pmuldq.c
@@ -32,7 +32,7 @@ TEST (void)
int i, sign = 1;
long long value;
- for (i = 0; i < NUM; i += 2)
+ for (i = 0; i < NUM * 2; i += 2)
{
src1.i[i] = i * i * sign;
src2.i[i] = (i + 20) * sign;
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-1.c b/gcc/testsuite/gcc.target/i386/ssetype-1.c
index ef89059b8d..a825229558 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-1.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-1.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "andnpd\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-2.c b/gcc/testsuite/gcc.target/i386/ssetype-2.c
index b68a63923f..37953ca64d 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-2.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-2.c
@@ -1,4 +1,5 @@
/* { dg-do compile } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "andpd" } } */
/* { dg-final { scan-assembler "andnpd" } } */
diff --git a/gcc/testsuite/gcc.target/i386/ssetype-5.c b/gcc/testsuite/gcc.target/i386/ssetype-5.c
index 75133e9fa6..4e22e59e55 100644
--- a/gcc/testsuite/gcc.target/i386/ssetype-5.c
+++ b/gcc/testsuite/gcc.target/i386/ssetype-5.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
/* This test checks for absolute memory operands. */
/* { dg-require-effective-target nonpic } */
+/* { dg-skip-if "" { i?86-*-* x86_64-*-* } { "-march=*" } { "-march=k8" } } */
/* { dg-options "-O2 -msse2 -march=k8" } */
/* { dg-final { scan-assembler "pand\[^\\n\]*magic" } } */
/* { dg-final { scan-assembler "pandn\[^\\n\]*magic" } } */
diff --git a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
index 463ba612e0..0e0d55bf7b 100644
--- a/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
+++ b/gcc/testsuite/gcc.target/i386/stackalign/stackalign.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/i386/sw-1.c b/gcc/testsuite/gcc.target/i386/sw-1.c
index fcb1bbd80b..d07ac9cf5b 100644
--- a/gcc/testsuite/gcc.target/i386/sw-1.c
+++ b/gcc/testsuite/gcc.target/i386/sw-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fshrink-wrap -fdump-rtl-pro_and_epilogue" } */
+/* { dg-options "-O2 -mtune=generic -fshrink-wrap -fdump-rtl-pro_and_epilogue" } */
/* { dg-skip-if "No shrink-wrapping preformed" { x86_64-*-mingw* } { "*" } { "" } } */
#include <string.h>
diff --git a/gcc/testsuite/gcc.target/i386/testimm-10.c b/gcc/testsuite/gcc.target/i386/testimm-10.c
new file mode 100644
index 0000000000..d744e1c08a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/testimm-10.c
@@ -0,0 +1,192 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512f" } */
+
+#include <x86intrin.h>
+
+__m512i m512i;
+__m512d m512d;
+__m512 m512;
+__m256i m256i;
+__m256d m256d;
+__m256 m256;
+__m128i m128i;
+__m128d m128d;
+__m128 m128;
+__mmask8 mmask8;
+__mmask16 mmask16;
+
+void
+test8bit (void)
+{
+ m512i = _mm512_permutex_epi64 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_permutex_epi64 (m512i, mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_permutex_epi64 (mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_ternarylogic_epi64 (m512i, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_ternarylogic_epi64 (m512i, mmask8, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_ternarylogic_epi64 (mmask8, m512i, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_ternarylogic_epi32 (m512i, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_ternarylogic_epi32 (m512i, mmask16, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_ternarylogic_epi32 (mmask16, m512i, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_shuffle_epi32 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_shuffle_epi32 (m512i, mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_shuffle_epi32 (mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_shuffle_i64x2 (m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_shuffle_i64x2 (m512i, mmask8, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_shuffle_i64x2 (mmask8, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_shuffle_i32x4 (m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_shuffle_i32x4 (m512i, mmask16, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_shuffle_i32x4 (mmask16, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_shuffle_f64x2 (m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_shuffle_f64x2 (m512d, mmask8, m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_shuffle_f64x2 (mmask8, m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512 = _mm512_shuffle_f32x4 (m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_mask_shuffle_f32x4 (m512, mmask16, m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_maskz_shuffle_f32x4 (mmask16, m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_permutex_pd (m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_permutex_pd (m512d, mmask8, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_permutex_pd (mmask8, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_permute_pd (m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_permute_pd (m512d, mmask8, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_permute_pd (mmask8, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512 = _mm512_permute_ps (m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_mask_permute_ps (m512, mmask16, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_maskz_permute_ps (mmask16, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_shuffle_pd (m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_shuffle_pd (m512d, mmask8, m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_shuffle_pd (mmask8, m512d, m512d, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512 = _mm512_shuffle_ps (m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_mask_shuffle_ps (m512, mmask16, m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512 = _mm512_maskz_shuffle_ps (mmask16, m512, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_fixupimm_pd (m512d, m512d, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_fixupimm_pd (m512d, mmask8, m512d, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_fixupimm_pd (mmask8, m512d, m512d, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m512 = _mm512_fixupimm_ps (m512, m512, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512 = _mm512_mask_fixupimm_ps (m512, mmask16, m512, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512 = _mm512_maskz_fixupimm_ps (mmask16, m512, m512, m512i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m128d = _mm_fixupimm_sd (m128d, m128d, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m128d = _mm_mask_fixupimm_sd (m128d, mmask8, m128d, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m128d = _mm_maskz_fixupimm_sd (mmask8, m128d, m128d, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m128 = _mm_fixupimm_ss (m128, m128, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m128 = _mm_mask_fixupimm_ss (m128, mmask8, m128, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m128 = _mm_maskz_fixupimm_ss (mmask8, m128, m128, m128i, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_rol_epi32 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_rol_epi32 (m512i, mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_rol_epi32 (mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_ror_epi32 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_ror_epi32 (m512i, mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_ror_epi32 (mmask16, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_rol_epi64 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_rol_epi64 (m512i, mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_rol_epi64 (mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_ror_epi64 (m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_ror_epi64 (m512i, mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_ror_epi64 (mmask8, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m256i = _mm512_cvtps_ph (m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m256i = _mm512_mask_cvtps_ph (m256i, mmask16, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m256i = _mm512_maskz_cvtps_ph (mmask16, m512, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ m512d = _mm512_roundscale_pd (m512d, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512d = _mm512_mask_roundscale_pd (m512d, mmask8, m512d, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512d = _mm512_maskz_roundscale_pd (mmask8, m512d, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m512 = _mm512_roundscale_ps (m512, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512 = _mm512_mask_roundscale_ps (m512, mmask16, m512, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m512 = _mm512_maskz_roundscale_ps (mmask16, m512, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m128d = _mm_roundscale_sd (m128d, m128d, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+ m128 = _mm_roundscale_ss (m128, m128, 256); /* { dg-error "the immediate argument must be an 8-bit immediate" } */
+
+ m512i = _mm512_alignr_epi32 (m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_alignr_epi32 (m512i, mmask16, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_alignr_epi32 (mmask16, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_alignr_epi64 (m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_mask_alignr_epi64 (m512i, mmask8, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+ m512i = _mm512_maskz_alignr_epi64 (mmask8, m512i, m512i, 256); /* { dg-error "the last argument must be an 8-bit immediate" } */
+
+ mmask8 = _mm512_cmp_epi64_mask (m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_cmp_epi32_mask (m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_cmp_epu64_mask (m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_cmp_epu32_mask (m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_cmp_pd_mask (m512d, m512d, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm512_cmp_ps_mask (m512, m512, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_epi64_mask (2, m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_epi32_mask (2, m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_epu64_mask (2, m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_epu32_mask (2, m512i, m512i, 256); /* { dg-error "the last argument must be a 3-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_pd_mask (2, m512d, m512d, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm512_mask_cmp_ps_mask (2, m512, m512, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm_cmp_sd_mask (m128d, m128d, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm_cmp_ss_mask (m128, m128, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm_mask_cmp_sd_mask (1, m128d, m128d, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+ mmask8 = _mm_mask_cmp_ss_mask (1, m128, m128, 256); /* { dg-error "the immediate argument must be a 5-bit immediate" } */
+
+}
+
+test1bit (void) {
+ m256d = _mm512_extractf64x4_pd (m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m256d = _mm512_mask_extractf64x4_pd (m256d, mmask8, m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m256d = _mm512_maskz_extractf64x4_pd (mmask8, m512d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+
+ m256i = _mm512_extracti64x4_epi64 (m512i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m256i = _mm512_mask_extracti64x4_epi64 (m256i, mmask8, m512i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m256i = _mm512_maskz_extracti64x4_epi64 (mmask8, m512i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+
+ m512d = _mm512_insertf64x4 (m512d, m256d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m512d = _mm512_mask_insertf64x4 (m512d, mmask8, m512d, m256d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m512d = _mm512_maskz_insertf64x4 (mmask8, m512d, m256d, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+
+ m512i = _mm512_inserti64x4 (m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m512i = _mm512_mask_inserti64x4 (m512i, mmask8, m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+ m512i = _mm512_maskz_inserti64x4 (mmask8, m512i, m256i, 256); /* { dg-error "the last argument must be a 1-bit immediate" } */
+}
+
+test2bit (void) {
+ m128 = _mm512_extractf32x4_ps(m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m128 = _mm512_mask_extractf32x4_ps(m128, mmask8, m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m128 = _mm512_maskz_extractf32x4_ps(mmask8, m512, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+
+ m128i = _mm512_extracti32x4_epi32 (m512i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m128i = _mm512_mask_extracti32x4_epi32 (m128i, mmask8, m512i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m128i = _mm512_maskz_extracti32x4_epi32 (mmask8, m512i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+
+ m512 = _mm512_insertf32x4 (m512, m128, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m512 = _mm512_mask_insertf32x4 (m512, mmask16, m512, m128, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m512 = _mm512_maskz_insertf32x4 (mmask16, m512, m128, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+
+ m512i = _mm512_inserti32x4 (m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m512i = _mm512_mask_inserti32x4 (m512i, mmask16, m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+ m512i = _mm512_maskz_inserti32x4 (mmask16, m512i, m128i, 256); /* { dg-error "the last argument must be a 2-bit immediate" } */
+}
+
+test4bit (void) {
+ m512d = _mm512_getmant_pd (m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+ m512d = _mm512_mask_getmant_pd (m512d, mmask8, m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+ m512d = _mm512_maskz_getmant_pd (mmask8, m512d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+
+ m512 = _mm512_getmant_ps (m512, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+ m512 = _mm512_mask_getmant_ps (m512, mmask16, m512, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+ m512 = _mm512_maskz_getmant_ps (mmask16, m512, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+
+ m128d = _mm_getmant_sd (m128d, m128d, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+ m128 = _mm_getmant_ss (m128, m128, 1, 64); /* { dg-error "the immediate argument must be a 4-bit immediate" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/testround-1.c b/gcc/testsuite/gcc.target/i386/testround-1.c
new file mode 100644
index 0000000000..20c039ab0b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/testround-1.c
@@ -0,0 +1,507 @@
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx512f" } */
+
+#include <x86intrin.h>
+
+int i;
+unsigned int ui;
+__m512i m512i;
+__m512d m512d;
+__m512 m512;
+__m256i m256i;
+__m256 m256;
+__m128i m128i;
+__m128d m128d;
+__m128 m128;
+__mmask8 mmask8;
+__mmask16 mmask16;
+
+void
+test_round (void)
+{
+ m128d = _mm_add_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_add_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_sub_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_sub_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_sqrt_round_pd (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_sqrt_round_pd (m512d, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_sqrt_round_pd (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_sqrt_round_ps (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_sqrt_round_ps (m512, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_sqrt_round_ps (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_sqrt_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_sqrt_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_add_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_add_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_add_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_add_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_add_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_add_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_sub_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_sub_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_sub_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_sub_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_sub_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_sub_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_mul_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_mul_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_mul_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mul_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_mul_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_mul_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_div_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_div_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_div_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_div_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_div_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_div_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_mul_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_mul_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_div_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_div_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_scalef_round_pd(m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_scalef_round_pd(m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_scalef_round_pd(mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_scalef_round_ps(m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_scalef_round_ps(m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_scalef_round_ps(mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_scalef_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_scalef_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_fmadd_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmadd_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmadd_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmadd_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmadd_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmadd_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmadd_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmadd_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmsub_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmsub_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmsub_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmsub_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmsub_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmsub_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmsub_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmsub_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmaddsub_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmaddsub_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmaddsub_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmaddsub_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmaddsub_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmaddsub_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmaddsub_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmaddsub_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmsubadd_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmsubadd_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmsubadd_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmsubadd_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmsubadd_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmsubadd_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmsubadd_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmsubadd_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fnmadd_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fnmadd_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fnmadd_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fnmadd_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fnmadd_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fnmadd_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fnmadd_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fnmadd_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fnmsub_round_pd (m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fnmsub_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fnmsub_round_pd (m512d, m512d, m512d, mmask8, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fnmsub_round_pd (mmask8, m512d, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fnmsub_round_ps (m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fnmsub_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fnmsub_round_ps (m512, m512, m512, mmask16, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fnmsub_round_ps (mmask16, m512, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m256i = _mm512_cvt_roundpd_epi32 (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvt_roundpd_epi32 (m256i, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvt_roundpd_epi32 (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_cvt_roundpd_epu32 (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvt_roundpd_epu32 (m256i, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvt_roundpd_epu32 (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512i = _mm512_cvt_roundps_epi32 (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvt_roundps_epi32 (m512i, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvt_roundps_epi32 (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_cvt_roundps_epu32 (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvt_roundps_epu32 (m512i, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvt_roundps_epu32 (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_cvt_roundu32_ss (m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundi32_ss (m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512 = _mm512_cvt_roundepi32_ps (m512i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundepi32_ps (m512, mmask16, m512i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundepi32_ps (mmask16, m512i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_cvt_roundepu32_ps (m512i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundepu32_ps (m512, mmask16, m512i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundepu32_ps (mmask16, m512i, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvt_roundss_u32 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvt_roundss_i32 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvt_roundsd_u32 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvt_roundsd_i32 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m256 = _mm512_cvt_roundpd_ps (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256 = _mm512_mask_cvt_roundpd_ps (m256, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256 = _mm512_maskz_cvt_roundpd_ps (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundsd_ss (m128, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m128d = _mm_fmadd_round_sd (m128d, m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fmadd_round_ss (m128, m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fmsub_round_sd (m128d, m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fmsub_round_ss (m128, m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fnmadd_round_sd (m128d, m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fnmadd_round_ss (m128, m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fnmsub_round_sd (m128d, m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fnmsub_round_ss (m128, m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_max_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_max_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_max_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_max_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_max_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_max_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_min_round_pd (m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_min_round_pd (m512d, mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_min_round_pd (mmask8, m512d, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_min_round_ps (m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_min_round_ps (m512, mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_min_round_ps (mmask16, m512, m512, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m256i = _mm512_cvtt_roundpd_epi32 (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvtt_roundpd_epi32 (m256i, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvtt_roundpd_epi32 (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_cvtt_roundpd_epu32 (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvtt_roundpd_epu32 (m256i, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvtt_roundpd_epu32 (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512i = _mm512_cvtt_roundps_epi32 (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvtt_roundps_epi32 (m512i, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvtt_roundps_epi32 (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_cvtt_roundps_epu32 (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvtt_roundps_epu32 (m512i, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvtt_roundps_epu32 (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_fixupimm_round_pd (m512d, m512d, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fixupimm_round_pd (m512d, mmask8, m512d, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fixupimm_round_pd (mmask8, m512d, m512d, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fixupimm_round_ps (m512, m512, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fixupimm_round_ps (m512, mmask16, m512, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fixupimm_round_ps (mmask16, m512, m512, m512i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fixupimm_round_sd (m128d, m128d, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_mask_fixupimm_round_sd (m128d, mmask8, m128d, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_maskz_fixupimm_round_sd (mmask8, m128d, m128d, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fixupimm_round_ss (m128, m128, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_mask_fixupimm_round_ss (m128, mmask8, m128, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_maskz_fixupimm_round_ss (mmask8, m128, m128, m128i, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvtt_roundss_u32 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvtt_roundss_i32 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvtt_roundsd_u32 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvtt_roundsd_i32 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_cvt_roundps_pd (m256, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_cvt_roundps_pd (m512d, mmask8, m256, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_cvt_roundps_pd (mmask8, m256, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_cvt_roundph_ps (m256i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundph_ps (m512, mmask16, m256i, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundph_ps (mmask16, m256i, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m128d = _mm_cvt_roundss_sd (m128d, m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_getexp_round_ss (m128, m128, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_getexp_round_sd (m128d, m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_getexp_round_ps (m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_getexp_round_ps (m512, mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_getexp_round_ps (mmask16, m512, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_getexp_round_pd (m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_getexp_round_pd (m512d, mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_getexp_round_pd (mmask8, m512d, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_getmant_round_pd (m512d, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_getmant_round_pd (m512d, mmask8, m512d, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_getmant_round_pd (mmask8, m512d, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_getmant_round_ps (m512, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_getmant_round_ps (m512, mmask16, m512, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_getmant_round_ps (mmask16, m512, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_getmant_round_sd (m128d, m128d, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_getmant_round_ss (m128, m128, 0, 0, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m512 = _mm512_roundscale_round_ps (m512, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_roundscale_round_ps (m512, mmask16, m512, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_roundscale_round_ps (mmask16, m512, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_roundscale_round_pd (m512d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_roundscale_round_pd (m512d, mmask8, m512d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_roundscale_round_pd (mmask8, m512d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_roundscale_round_ss (m128, m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_roundscale_round_sd (m128d, m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ mmask8 = _mm512_cmp_round_pd_mask (m512d, m512d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm512_cmp_round_ps_mask (m512, m512, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm512_mask_cmp_round_pd_mask (mmask8, m512d, m512d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm512_mask_cmp_round_ps_mask (mmask16, m512, m512, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm_cmp_round_sd_mask (m128d, m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm_mask_cmp_round_sd_mask (mmask8, m128d, m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm_cmp_round_ss_mask (m128, m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm_mask_cmp_round_ss_mask (mmask8, m128, m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ i = _mm_comi_round_ss (m128, m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_comi_round_sd (m128d, m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+}
+
+void
+test_round_sae (void)
+{
+ m128d = _mm_add_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_add_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_sub_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_sub_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_sqrt_round_pd (m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_sqrt_round_pd (m512d, mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_sqrt_round_pd (mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_sqrt_round_ps (m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_sqrt_round_ps (m512, mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_sqrt_round_ps (mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_sqrt_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_sqrt_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_add_round_pd (m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_add_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_add_round_pd (mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_add_round_ps (m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_add_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_add_round_ps (mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_sub_round_pd (m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_sub_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_sub_round_pd (mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_sub_round_ps (m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_sub_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_sub_round_ps (mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_mul_round_pd (m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_mul_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_mul_round_pd (mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mul_round_ps (m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_mul_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_mul_round_ps (mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_div_round_pd (m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_div_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_div_round_pd (mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_div_round_ps (m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_div_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_div_round_ps (mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_mul_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_mul_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_div_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_div_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_scalef_round_pd(m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_scalef_round_pd(m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_scalef_round_pd(mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_scalef_round_ps(m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_scalef_round_ps(m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_scalef_round_ps(mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_scalef_round_sd (m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_scalef_round_ss (m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_fmadd_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmadd_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmadd_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmadd_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmadd_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmadd_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmadd_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmadd_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmsub_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmsub_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmsub_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmsub_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmsub_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmsub_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmsub_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmsub_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmaddsub_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmaddsub_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmaddsub_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmaddsub_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmaddsub_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmaddsub_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmaddsub_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmaddsub_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fmsubadd_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fmsubadd_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fmsubadd_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fmsubadd_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fmsubadd_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fmsubadd_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fmsubadd_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fmsubadd_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fnmadd_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fnmadd_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fnmadd_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fnmadd_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fnmadd_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fnmadd_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fnmadd_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fnmadd_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_fnmsub_round_pd (m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fnmsub_round_pd (m512d, mmask8, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask3_fnmsub_round_pd (m512d, m512d, m512d, mmask8, 5); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fnmsub_round_pd (mmask8, m512d, m512d, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fnmsub_round_ps (m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fnmsub_round_ps (m512, mmask16, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask3_fnmsub_round_ps (m512, m512, m512, mmask16, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fnmsub_round_ps (mmask16, m512, m512, m512, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m256i = _mm512_cvt_roundpd_epi32 (m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvt_roundpd_epi32 (m256i, mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvt_roundpd_epi32 (mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_cvt_roundpd_epu32 (m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvt_roundpd_epu32 (m256i, mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvt_roundpd_epu32 (mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512i = _mm512_cvt_roundps_epi32 (m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvt_roundps_epi32 (m512i, mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvt_roundps_epi32 (mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_cvt_roundps_epu32 (m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvt_roundps_epu32 (m512i, mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvt_roundps_epu32 (mmask16, m512, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_cvt_roundu32_ss (m128, 4, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundi32_ss (m128, 4, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m512 = _mm512_cvt_roundepi32_ps (m512i, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundepi32_ps (m512, mmask16, m512i, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundepi32_ps (mmask16, m512i, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_cvt_roundepu32_ps (m512i, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundepu32_ps (m512, mmask16, m512i, 5); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundepu32_ps (mmask16, m512i, 5); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvt_roundss_u32 (m128, 5); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvt_roundss_i32 (m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvt_roundsd_u32 (m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvt_roundsd_i32 (m128d, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m256 = _mm512_cvt_roundpd_ps (m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256 = _mm512_mask_cvt_roundpd_ps (m256, mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m256 = _mm512_maskz_cvt_roundpd_ps (mmask8, m512d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundsd_ss (m128, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m128d = _mm_fmadd_round_sd (m128d, m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fmadd_round_ss (m128, m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fmsub_round_sd (m128d, m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fmsub_round_ss (m128, m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fnmadd_round_sd (m128d, m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fnmadd_round_ss (m128, m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fnmsub_round_sd (m128d, m128d, m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fnmsub_round_ss (m128, m128, m128, 5); /* { dg-error "incorrect rounding operand" } */
+}
+
+void
+test_sae_only (void)
+{
+ m512d = _mm512_max_round_pd (m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_max_round_pd (m512d, mmask8, m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_max_round_pd (mmask8, m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_max_round_ps (m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_max_round_ps (m512, mmask16, m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_max_round_ps (mmask16, m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_min_round_pd (m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_min_round_pd (m512d, mmask8, m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_min_round_pd (mmask8, m512d, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_min_round_ps (m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_min_round_ps (m512, mmask16, m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_min_round_ps (mmask16, m512, m512, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m256i = _mm512_cvtt_roundpd_epi32 (m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvtt_roundpd_epi32 (m256i, mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvtt_roundpd_epi32 (mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_cvtt_roundpd_epu32 (m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_mask_cvtt_roundpd_epu32 (m256i, mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m256i = _mm512_maskz_cvtt_roundpd_epu32 (mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m512i = _mm512_cvtt_roundps_epi32 (m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvtt_roundps_epi32 (m512i, mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvtt_roundps_epi32 (mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_cvtt_roundps_epu32 (m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_mask_cvtt_roundps_epu32 (m512i, mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512i = _mm512_maskz_cvtt_roundps_epu32 (mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_fixupimm_round_pd (m512d, m512d, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_fixupimm_round_pd (m512d, mmask8, m512d, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_fixupimm_round_pd (mmask8, m512d, m512d, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_fixupimm_round_ps (m512, m512, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_fixupimm_round_ps (m512, mmask16, m512, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_fixupimm_round_ps (mmask16, m512, m512, m512i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_fixupimm_round_sd (m128d, m128d, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_mask_fixupimm_round_sd (m128d, mmask8, m128d, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_maskz_fixupimm_round_sd (mmask8, m128d, m128d, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_fixupimm_round_ss (m128, m128, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_mask_fixupimm_round_ss (m128, mmask8, m128, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_maskz_fixupimm_round_ss (mmask8, m128, m128, m128i, 4, 3); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvtt_roundss_u32 (m128, 3); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvtt_roundss_i32 (m128, 3); /* { dg-error "incorrect rounding operand" } */
+
+ ui = _mm_cvtt_roundsd_u32 (m128d, 3); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_cvtt_roundsd_i32 (m128d, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m512d = _mm512_cvt_roundps_pd (m256, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_cvt_roundps_pd (m512d, mmask8, m256, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_cvt_roundps_pd (mmask8, m256, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_cvt_roundph_ps (m256i, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_cvt_roundph_ps (m512, mmask16, m256i, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_cvt_roundph_ps (mmask16, m256i, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m128d = _mm_cvt_roundss_sd (m128d, m128, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_getexp_round_ss (m128, m128, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_getexp_round_sd (m128d, m128d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_getexp_round_ps (m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_getexp_round_ps (m512, mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_getexp_round_ps (mmask16, m512, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_getexp_round_pd (m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_getexp_round_pd (m512d, mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_getexp_round_pd (mmask8, m512d, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_getmant_round_pd (m512d, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_getmant_round_pd (m512d, mmask8, m512d, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_getmant_round_pd (mmask8, m512d, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_getmant_round_ps (m512, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_getmant_round_ps (m512, mmask16, m512, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_getmant_round_ps (mmask16, m512, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_getmant_round_sd (m128d, m128d, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_getmant_round_ss (m128, m128, 0, 0, 3); /* { dg-error "incorrect rounding operand" } */
+
+ m512 = _mm512_roundscale_round_ps (m512, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_mask_roundscale_round_ps (m512, mmask16, m512, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512 = _mm512_maskz_roundscale_round_ps (mmask16, m512, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_roundscale_round_pd (m512d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_mask_roundscale_round_pd (m512d, mmask8, m512d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m512d = _mm512_maskz_roundscale_round_pd (mmask8, m512d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_roundscale_round_ss (m128, m128, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_roundscale_round_sd (m128d, m128d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+
+ mmask8 = _mm512_cmp_round_pd_mask (m512d, m512d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm512_cmp_round_ps_mask (m512, m512, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm512_mask_cmp_round_pd_mask (mmask8, m512d, m512d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm512_mask_cmp_round_ps_mask (mmask16, m512, m512, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm_cmp_round_sd_mask (m128d, m128d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask8 = _mm_mask_cmp_round_sd_mask (mmask8, m128d, m128d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm_cmp_round_ss_mask (m128, m128, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ mmask16 = _mm_mask_cmp_round_ss_mask (mmask8, m128, m128, 4, 3); /* { dg-error "incorrect rounding operand" } */
+
+ i = _mm_comi_round_ss (m128, m128, 4, 3); /* { dg-error "incorrect rounding operand" } */
+ i = _mm_comi_round_sd (m128d, m128d, 4, 3); /* { dg-error "incorrect rounding operand" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/testround-2.c b/gcc/testsuite/gcc.target/i386/testround-2.c
new file mode 100644
index 0000000000..7236bfb9b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/testround-2.c
@@ -0,0 +1,57 @@
+/* { dg-do compile { target { ! { ia32 } } } } */
+/* { dg-options "-O0 -mavx512f" } */
+
+#include <x86intrin.h>
+
+long long l;
+unsigned long long ul;
+__m128d m128d;
+__m128 m128;
+
+void
+test_round_64 (void)
+{
+ m128d = _mm_cvt_roundu64_sd (m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_cvt_roundi64_sd (m128d, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_cvt_roundu64_ss (m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundi64_ss (m128, 4, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvt_roundss_u64 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvt_roundss_i64 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvt_roundsd_u64 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvt_roundsd_i64 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvtt_roundss_u64 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvtt_roundss_i64 (m128, 7); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvtt_roundsd_u64 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvtt_roundsd_i64 (m128d, 7); /* { dg-error "incorrect rounding operand" } */
+}
+
+void
+test_round_sae_64 (void)
+{
+ m128d = _mm_cvt_roundu64_sd (m128d, 4, 5); /* { dg-error "incorrect rounding operand" } */
+ m128d = _mm_cvt_roundi64_sd (m128d, 4, 5); /* { dg-error "incorrect rounding operand" } */
+
+ m128 = _mm_cvt_roundu64_ss (m128, 4, 5); /* { dg-error "incorrect rounding operand" } */
+ m128 = _mm_cvt_roundi64_ss (m128, 4, 5); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvt_roundss_u64 (m128, 5); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvt_roundss_i64 (m128, 5); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvt_roundsd_u64 (m128d, 5); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvt_roundsd_i64 (m128d, 5); /* { dg-error "incorrect rounding operand" } */
+}
+
+void
+test_sae_only_64 (void)
+{
+ ul = _mm_cvtt_roundss_u64 (m128, 3); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvtt_roundss_i64 (m128, 3); /* { dg-error "incorrect rounding operand" } */
+
+ ul = _mm_cvtt_roundsd_u64 (m128d, 3); /* { dg-error "incorrect rounding operand" } */
+ l = _mm_cvtt_roundsd_i64 (m128d, 3); /* { dg-error "incorrect rounding operand" } */
+}
diff --git a/gcc/testsuite/gcc.target/i386/vec-may_alias.c b/gcc/testsuite/gcc.target/i386/vec-may_alias.c
new file mode 100644
index 0000000000..e970497454
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vec-may_alias.c
@@ -0,0 +1,25 @@
+/* { dg-do run } */
+/* { dg-options "-O2 -w -Wno-abi" } */
+
+typedef int v2si __attribute__ ((vector_size (8)));
+typedef short v4hi __attribute__ ((vector_size (8)));
+typedef short v4hia __attribute__ ((vector_size (8), may_alias));
+
+__attribute__ ((noinline, noclone))
+int f (v2si A, int N)
+{ return ((v4hia)A)[N]; }
+
+__attribute__ ((noinline, noclone))
+int g (v2si A, int N)
+{ return ((v4hi)A)[N]; }
+
+int main()
+{
+ v2si x = { 0, 0 }, y = { 1, 1 };
+ if (f (x, 0) || f (x, 1) || f (x, 2) || f (x, 3))
+ __builtin_abort ();
+ if (g (y, 0) != 1 || g (y, 1) || g (y, 2) != 1 || g (y, 3))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/vect-abs-s16.c b/gcc/testsuite/gcc.target/i386/vect-abs-s16.c
new file mode 100644
index 0000000000..191ae3434e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-abs-s16.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
+
+
+void test (short* a, short* b)
+{
+ int i;
+ for (i = 0; i < 10000; ++i)
+ a[i] = abs (b[i]);
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-abs-s32.c b/gcc/testsuite/gcc.target/i386/vect-abs-s32.c
new file mode 100644
index 0000000000..575e8efe0a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-abs-s32.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
+
+
+void test (int* a, int* b)
+{
+ int i;
+ for (i = 0; i < 10000; ++i)
+ a[i] = abs (b[i]);
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-abs-s8.c b/gcc/testsuite/gcc.target/i386/vect-abs-s8.c
new file mode 100644
index 0000000000..3f3f3facb7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-abs-s8.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -msse2 -mno-sse3 -fdump-tree-vect-details" } */
+
+
+void test (char* a, char* b)
+{
+ int i;
+ for (i = 0; i < 10000; ++i)
+ a[i] = abs (b[i]);
+}
+
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-cond-1.c b/gcc/testsuite/gcc.target/i386/vect-cond-1.c
new file mode 100644
index 0000000000..12ae771038
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-cond-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -mavx2" { target avx2 } } */
+
+int a[1024];
+
+int
+foo (int *p)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ {
+ int t;
+ if (a[i] < 30)
+ t = *p;
+ else
+ t = a[i] + 12;
+ a[i] = t;
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-div-1.c b/gcc/testsuite/gcc.target/i386/vect-div-1.c
new file mode 100644
index 0000000000..b3eed19c7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-div-1.c
@@ -0,0 +1,43 @@
+/* { dg-do compile { target sse2 } } */
+/* { dg-options "-O2 -ftree-vectorize -fno-common -msse2" } */
+
+unsigned short b[1024] = { 0 };
+int a[1024] = { 0 };
+
+int
+f1 (int x)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = (b[i] + 7) / 15;
+}
+
+int
+f2 (int x)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = (b[i] + 7) % 15;
+}
+
+int
+f3 (int x)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = (b[i] - 66000) / 15;
+}
+
+int
+f4 (int x)
+{
+ int i;
+ for (i = 0; i < 1024; i++)
+ a[i] = (b[i] - 66000) % 15;
+}
+
+/* In f1 and f2, VRP can prove the first operand of division or modulo
+ is always non-negative, so there is no need to do >> 31 shift
+ etc. to check if it is. And in f3 and f4, VRP can prove it is always
+ negative. */
+/* { dg-final { scan-assembler-not "psrad\[^\n\r\]*\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-double-1.c b/gcc/testsuite/gcc.target/i386/vect-double-1.c
index 0b691bcbba..d96d6399cc 100644
--- a/gcc/testsuite/gcc.target/i386/vect-double-1.c
+++ b/gcc/testsuite/gcc.target/i386/vect-double-1.c
@@ -32,5 +32,5 @@ sse2_test (void)
}
}
-/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } } */
+/* { dg-final { scan-tree-dump-times "Vectorized loops: 1" 1 "vect" } } */
/* { dg-final { cleanup-tree-dump "vect" } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-rebuild.c b/gcc/testsuite/gcc.target/i386/vect-rebuild.c
new file mode 100644
index 0000000000..570967f6b5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/vect-rebuild.c
@@ -0,0 +1,33 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mavx -fno-tree-forwprop" } */
+
+typedef double v2df __attribute__ ((__vector_size__ (16)));
+typedef double v4df __attribute__ ((__vector_size__ (32)));
+
+v2df f1 (v2df x)
+{
+ v2df xx = { x[0], x[1] };
+ return xx;
+}
+
+v4df f2 (v4df x)
+{
+ v4df xx = { x[0], x[1], x[2], x[3] };
+ return xx;
+}
+
+v2df g (v2df x)
+{
+ v2df xx = { x[1], x[0] };
+ return xx;
+}
+
+v2df h (v4df x)
+{
+ v2df xx = { x[2], x[3] };
+ return xx;
+}
+
+/* { dg-final { scan-assembler-not "unpck" } } */
+/* { dg-final { scan-assembler-times "\tv?permilpd\[ \t\]" 1 } } */
+/* { dg-final { scan-assembler-times "\tv?extractf128\[ \t\]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/i386/vect-sizes-1.c b/gcc/testsuite/gcc.target/i386/vect-sizes-1.c
index 3c18f3bd69..6ca38d2fe4 100644
--- a/gcc/testsuite/gcc.target/i386/vect-sizes-1.c
+++ b/gcc/testsuite/gcc.target/i386/vect-sizes-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O3 -ffast-math -mavx -mtune=generic" } */
+/* { dg-options "-O3 -ffast-math -mavx -mtune=generic -fno-common" } */
double a[1024];
diff --git a/gcc/testsuite/gcc.target/i386/vect8-ret.c b/gcc/testsuite/gcc.target/i386/vect8-ret.c
index c2e21068a0..513369d0fa 100644
--- a/gcc/testsuite/gcc.target/i386/vect8-ret.c
+++ b/gcc/testsuite/gcc.target/i386/vect8-ret.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target ia32 } } */
-/* { dg-options "-mmmx" { target i?86-*-solaris2.[89] *-*-vxworks* } } */
+/* { dg-options "-mmmx" { target i?86-*-solaris2.9 *-*-vxworks* } } */
/* { dg-options "-mmmx -mvect8-ret-in-mem" } */
#include <mmintrin.h>
diff --git a/gcc/testsuite/gcc.target/i386/writeeflags-1.c b/gcc/testsuite/gcc.target/i386/writeeflags-1.c
new file mode 100644
index 0000000000..446840cb33
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/writeeflags-1.c
@@ -0,0 +1,30 @@
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+#include <x86intrin.h>
+
+#ifdef __x86_64__
+#define EFLAGS_TYPE unsigned long long int
+#else
+#define EFLAGS_TYPE unsigned int
+#endif
+
+int
+main ()
+{
+ EFLAGS_TYPE flags = 0xD7; /* 111010111b */
+
+ __writeeflags (flags);
+
+ flags = __readeflags ();
+
+ if ((flags & 0xFF) != 0xD7)
+ abort ();
+
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/i386/xop-frczX.c b/gcc/testsuite/gcc.target/i386/xop-frczX.c
new file mode 100644
index 0000000000..931b5ce397
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xop-frczX.c
@@ -0,0 +1,60 @@
+/* { dg-do run } */
+/* { dg-require-effective-target xop } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "xop-check.h"
+
+#include <x86intrin.h>
+
+void
+check_mm_vmfrcz_sd (__m128d __A, __m128d __B)
+{
+ union128d a, b, c;
+ double d[2];
+
+ a.x = __A;
+ b.x = __B;
+ c.x = _mm_frcz_sd (__A, __B);
+ d[0] = b.a[0] - (int)b.a[0] ;
+ d[1] = a.a[1];
+ if (check_union128d (c, d))
+ abort ();
+}
+
+void
+check_mm_vmfrcz_ss (__m128 __A, __m128 __B)
+{
+ union128 a, b, c;
+ float f[4];
+
+ a.x = __A;
+ b.x = __B;
+ c.x = _mm_frcz_ss (__A, __B);
+ f[0] = b.a[0] - (int)b.a[0] ;
+ f[1] = a.a[1];
+ f[2] = a.a[2];
+ f[3] = a.a[3];
+ if (check_union128 (c, f))
+ abort ();
+}
+
+static void
+xop_test (void)
+{
+ union128 a, b;
+ union128d c,d;
+ int i;
+
+ for (i = 0; i < 4; i++)
+ {
+ a.a[i] = i + 3.5;
+ b.a[i] = i + 7.9;
+ }
+ for (i = 0; i < 2; i++)
+ {
+ c.a[i] = i + 3.5;
+ d.a[i] = i + 7.987654321;
+ }
+ check_mm_vmfrcz_ss (a.x, b.x);
+ check_mm_vmfrcz_sd (c.x, d.x);
+}
diff --git a/gcc/testsuite/gcc.target/i386/xop-imul64-vector.c b/gcc/testsuite/gcc.target/i386/xop-imul64-vector.c
index 382677e605..97ef3935a8 100644
--- a/gcc/testsuite/gcc.target/i386/xop-imul64-vector.c
+++ b/gcc/testsuite/gcc.target/i386/xop-imul64-vector.c
@@ -33,4 +33,3 @@ int main ()
/* { dg-final { scan-assembler "vpmulld" } } */
/* { dg-final { scan-assembler "vphadddq" } } */
-/* { dg-final { scan-assembler "vpmacsdql" } } */
diff --git a/gcc/testsuite/gcc.target/i386/xop-pr57233.c b/gcc/testsuite/gcc.target/i386/xop-pr57233.c
new file mode 100644
index 0000000000..6129dc2174
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xop-pr57233.c
@@ -0,0 +1,16 @@
+/* PR tree-optimization/57233 */
+/* { dg-do run { target xop } } */
+/* { dg-options "-O2 -mxop" } */
+
+#include "xop-check.h"
+
+static void
+xop_test (void)
+{
+ do_main ();
+}
+
+#undef main
+#define main() do_main ()
+
+#include "../../gcc.dg/pr57233.c"
diff --git a/gcc/testsuite/gcc.target/i386/xorps-sse2.c b/gcc/testsuite/gcc.target/i386/xorps-sse2.c
index 3c268b4cba..b9576d9700 100644
--- a/gcc/testsuite/gcc.target/i386/xorps-sse2.c
+++ b/gcc/testsuite/gcc.target/i386/xorps-sse2.c
@@ -1,8 +1,8 @@
/* Test that we generate xorps when the result is used in FP math. */
/* { dg-do compile } */
/* { dg-options "-O -msse2 -mno-sse3" } */
-/* { dg-final { scan-assembler "xorps\[ \t\]" { xfail *-*-* } } } */
-/* { dg-final { scan-assembler-not "pxor" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler "xorps\[ \t\]" } } */
+/* { dg-final { scan-assembler-not "pxor" } } */
#define vector __attribute__ ((vector_size (16)))
diff --git a/gcc/testsuite/gcc.target/i386/xrstor-1.c b/gcc/testsuite/gcc.target/i386/xrstor-1.c
new file mode 100644
index 0000000000..3e70139489
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xrstor-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mavx -O2" } */
+/* { dg-final { scan-assembler "xrstor\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsave_region [512] __attribute__((aligned(64)));
+ _xrstor (xsave_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/i386/xrstor64-1.c b/gcc/testsuite/gcc.target/i386/xrstor64-1.c
new file mode 100644
index 0000000000..3cf2a66cc9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xrstor64-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mxsave -O2" } */
+/* { dg-final { scan-assembler "xrstor64\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsave_region [512] __attribute__((aligned(64)));
+ _xrstor64 (xsave_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/i386/xsave-1.c b/gcc/testsuite/gcc.target/i386/xsave-1.c
new file mode 100644
index 0000000000..9eee597392
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xsave-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mxsave -O2" } */
+/* { dg-final { scan-assembler "xsave\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsave_region [512] __attribute__((aligned(64)));
+ _xsave (xsave_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/i386/xsave64-1.c b/gcc/testsuite/gcc.target/i386/xsave64-1.c
new file mode 100644
index 0000000000..661da9171c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xsave64-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mxsave -O2" } */
+/* { dg-final { scan-assembler "xsave64\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsave_region [512] __attribute__((aligned(64)));
+ _xsave64 (xsave_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/i386/xsaveopt-1.c b/gcc/testsuite/gcc.target/i386/xsaveopt-1.c
new file mode 100644
index 0000000000..b08a50a234
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xsaveopt-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-mxsaveopt -O2" } */
+/* { dg-final { scan-assembler "xsaveopt\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsaveopt_region [512] __attribute__((aligned(64)));
+ _xsaveopt (xsaveopt_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/i386/xsaveopt64-1.c b/gcc/testsuite/gcc.target/i386/xsaveopt64-1.c
new file mode 100644
index 0000000000..f7864fe399
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/xsaveopt64-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { ! ia32 } } } */
+/* { dg-options "-mxsaveopt -O2" } */
+/* { dg-final { scan-assembler "xsaveopt64\[ \\t\]" } } */
+
+#include <x86intrin.h>
+
+void extern
+xsave_test (void)
+{
+ char xsaveopt_region [512] __attribute__((aligned(64)));
+ _xsaveopt64 (xsaveopt_region, ((long long) 0xA0000000F));
+}
diff --git a/gcc/testsuite/gcc.target/ia64/ia64.exp b/gcc/testsuite/gcc.target/ia64/ia64.exp
index 2d917fa9a0..d70e990c39 100644
--- a/gcc/testsuite/gcc.target/ia64/ia64.exp
+++ b/gcc/testsuite/gcc.target/ia64/ia64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/ia64/pr52731.c b/gcc/testsuite/gcc.target/ia64/pr52731.c
new file mode 100644
index 0000000000..50ef1d78d7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/ia64/pr52731.c
@@ -0,0 +1,19 @@
+/* { dg-do compile { target ia64-*-* } } */
+/* { dg-options "-O2" } */
+
+char* area;
+long int area_size;
+char* base;
+
+void fun(unsigned long int addr)
+{
+ unsigned long int size32 = (addr + 4096 - 1) & ~(4096 - 1);
+ unsigned long int size = size32 * sizeof(unsigned int);
+
+ if (size > 0) {
+ size = (size + 1) & ~(1);
+ }
+
+ area_size = size;
+ area = base + size;
+}
diff --git a/gcc/testsuite/gcc.target/m68k/m68k.exp b/gcc/testsuite/gcc.target/m68k/m68k.exp
index 4ac6264409..a917898ab3 100644
--- a/gcc/testsuite/gcc.target/m68k/m68k.exp
+++ b/gcc/testsuite/gcc.target/m68k/m68k.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/m68k/pr36134.c b/gcc/testsuite/gcc.target/m68k/pr36134.c
index d8d65c16c0..c91956b5c3 100644
--- a/gcc/testsuite/gcc.target/m68k/pr36134.c
+++ b/gcc/testsuite/gcc.target/m68k/pr36134.c
@@ -1,10 +1,15 @@
/* pr36134.c
This test ensures that the shorter LEA instruction is used in preference
- to the longer ADD instruction. */
+ to the longer ADD instruction.
+
+ This preference is applicable to ColdFire only. On CPU32, we can
+ use a sequence of two ADDQ instructions, which is faster than the
+ LEA instruction. */
/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-skip-if "" { *-*-* } { "-mcpu=*" } { "-mcpu=5208" } } */
+/* { dg-options "-O2 -mcpu=5208" } */
/* { dg-final { scan-assembler "lea" } } */
/* { dg-final { scan-assembler-not "add" } } */
diff --git a/gcc/testsuite/gcc.target/m68k/pr52573.c b/gcc/testsuite/gcc.target/m68k/pr52573.c
new file mode 100644
index 0000000000..df4119b0f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/pr52573.c
@@ -0,0 +1,157 @@
+
+/* { dg-options "-w -O3 -funroll-loops" } */
+/* { dg-final { scan-assembler-not "%d0:%d0" } } */
+/* { dg-final { scan-assembler-not "%d1:%d1" } } */
+/* { dg-final { scan-assembler-not "%d2:%d2" } } */
+/* { dg-final { scan-assembler-not "%d3:%d3" } } */
+/* { dg-final { scan-assembler-not "%d4:%d4" } } */
+/* { dg-final { scan-assembler-not "%d5:%d5" } } */
+/* { dg-final { scan-assembler-not "%d6:%d6" } } */
+/* { dg-final { scan-assembler-not "%d7:%d7" } } */
+/* Test arithmetics on bitfields. */
+
+extern void abort (void);
+extern void exit (int);
+
+unsigned int
+myrnd (void)
+{
+ static unsigned int s = 1388815473;
+ s *= 1103515245;
+ s += 12345;
+ return (s / 65536) % 2048;
+}
+
+#define T(S) \
+struct S s##S; \
+struct S retme##S (struct S x) \
+{ \
+ return x; \
+} \
+ \
+unsigned int fn1##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y = retme##S (y); \
+ return y.k; \
+} \
+ \
+unsigned int fn2##S (unsigned int x) \
+{ \
+ struct S y = s##S; \
+ y.k += x; \
+ y.k %= 15; \
+ return y.k; \
+} \
+ \
+unsigned int retit##S (void) \
+{ \
+ return s##S.k; \
+} \
+ \
+unsigned int fn3##S (unsigned int x) \
+{ \
+ s##S.k += x; \
+ return retit##S (); \
+} \
+ \
+void test##S (void) \
+{ \
+ int i; \
+ unsigned int mask, v, a, r; \
+ struct S x; \
+ char *p = (char *) &s##S; \
+ for (i = 0; i < sizeof (s##S); ++i) \
+ *p++ = myrnd (); \
+ if (__builtin_classify_type (s##S.l) == 8) \
+ s##S.l = 5.25; \
+ s##S.k = -1; \
+ mask = s##S.k; \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn1##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn2##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || x.k != s##S.k || x.l != s##S.l \
+ || ((((v + a) & mask) % 15) & mask) != r) \
+ abort (); \
+ v = myrnd (); \
+ a = myrnd (); \
+ s##S.k = v; \
+ x = s##S; \
+ r = fn3##S (a); \
+ if (x.i != s##S.i || x.j != s##S.j \
+ || s##S.k != r || x.l != s##S.l \
+ || ((v + a) & mask) != r) \
+ abort (); \
+}
+
+struct A { unsigned int i : 6, l : 1, j : 10, k : 15; }; T(A)
+struct B { unsigned int i : 6, j : 11, k : 15; unsigned int l; }; T(B)
+struct C { unsigned int l; unsigned int i : 6, j : 11, k : 15; }; T(C)
+struct D { unsigned long long l : 6, i : 6, j : 23, k : 29; }; T(D)
+struct E { unsigned long long l, i : 12, j : 23, k : 29; }; T(E)
+struct F { unsigned long long i : 12, j : 23, k : 29, l; }; T(F)
+struct G { unsigned int i : 12, j : 13, k : 7; unsigned long long l; }; T(G)
+struct H { unsigned int i : 12, j : 11, k : 9; unsigned long long l; }; T(H)
+struct I { unsigned short i : 1, j : 6, k : 9; unsigned long long l; }; T(I)
+struct J { unsigned short i : 1, j : 8, k : 7; unsigned short l; }; T(J)
+struct K { unsigned int k : 6, l : 1, j : 10, i : 15; }; T(K)
+struct L { unsigned int k : 6, j : 11, i : 15; unsigned int l; }; T(L)
+struct M { unsigned int l; unsigned int k : 6, j : 11, i : 15; }; T(M)
+struct N { unsigned long long l : 6, k : 6, j : 23, i : 29; }; T(N)
+struct O { unsigned long long l, k : 12, j : 23, i : 29; }; T(O)
+struct P { unsigned long long k : 12, j : 23, i : 29, l; }; T(P)
+struct Q { unsigned int k : 12, j : 13, i : 7; unsigned long long l; }; T(Q)
+struct R { unsigned int k : 12, j : 11, i : 9; unsigned long long l; }; T(R)
+struct S { unsigned short k : 1, j : 6, i : 9; unsigned long long l; }; T(S)
+struct T { unsigned short k : 1, j : 8, i : 7; unsigned short l; }; T(T)
+struct U { unsigned short j : 6, k : 1, i : 9; unsigned long long l; }; T(U)
+struct V { unsigned short j : 8, k : 1, i : 7; unsigned short l; }; T(V)
+struct W { long double l; unsigned int k : 12, j : 13, i : 7; }; T(W)
+struct X { unsigned int k : 12, j : 13, i : 7; long double l; }; T(X)
+struct Y { unsigned int k : 12, j : 11, i : 9; long double l; }; T(Y)
+struct Z { long double l; unsigned int j : 13, i : 7, k : 12; }; T(Z)
+
+int
+main (void)
+{
+ testA ();
+ testB ();
+ testC ();
+ testD ();
+ testE ();
+ testF ();
+ testG ();
+ testH ();
+ testI ();
+ testJ ();
+ testK ();
+ testL ();
+ testM ();
+ testN ();
+ testO ();
+ testP ();
+ testQ ();
+ testR ();
+ testS ();
+ testT ();
+ testU ();
+ testV ();
+ testW ();
+ testX ();
+ testY ();
+ testZ ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/m68k/pr54041.c b/gcc/testsuite/gcc.target/m68k/pr54041.c
new file mode 100644
index 0000000000..645cb6d238
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/pr54041.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O -mshort" } */
+
+extern int r[];
+
+int *fn(int i)
+{
+ return &r[i];
+}
+
diff --git a/gcc/testsuite/gcc.target/m68k/stack-limit-1.c b/gcc/testsuite/gcc.target/m68k/stack-limit-1.c
new file mode 100644
index 0000000000..b1e9b99b26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/m68k/stack-limit-1.c
@@ -0,0 +1,6 @@
+/* -fstack-limit- should be ignored without an ICE if not supported. */
+/* { dg-do compile } */
+/* { dg-options "-fstack-limit-symbol=_stack_limit -m68000" } */
+/* { dg-warning "not supported" "" { target *-*-* } 1 } */
+
+void dummy (void) { }
diff --git a/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c
new file mode 100644
index 0000000000..79cc5f9dd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/microblaze/isa/fcmp4.c
@@ -0,0 +1,9 @@
+/* { dg-options "-O3 -mcpu=v6.00.a -mhard-float" } */
+
+void float_func(float f1, float f2, float f3)
+{
+ /* { dg-final { scan-assembler "fcmp\.eq\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])\[^0-9]" } } */
+ /* { dg-final { scan-assembler "fcmp\.le\tr(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1]),r(\[0-9]\|\[1-2]\[0-9]\|3\[0-1])\[^0-9]" } } */
+ if(f1==f2 && f1<=f3)
+ print ("f1 eq f2 && f1 le f3");
+}
diff --git a/gcc/testsuite/gcc.target/microblaze/microblaze.exp b/gcc/testsuite/gcc.target/microblaze/microblaze.exp
index a8994e91f1..f343181415 100644
--- a/gcc/testsuite/gcc.target/microblaze/microblaze.exp
+++ b/gcc/testsuite/gcc.target/microblaze/microblaze.exp
@@ -1,4 +1,4 @@
-# Copyright 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,12 +22,6 @@ if { ![istarget microblaze*-*-*] } then {
return
}
-# Don't execute when we are testing some configuration of GCC or G++.
-# This we figure out by looking at target_config_cflags which needs to be "" for microblaze.exp
-if { $target_config_cflags != "" } {
- return
-}
-
global TORTURE_OPTIONS
set TORTURE_OPTIONS [list \
{ -O0 } \
diff --git a/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
new file mode 100644
index 0000000000..fdcde1fa7d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/microblaze/others/builtin-trap.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+
+void trap ()
+{
+ __builtin_trap ();
+}
+
+/* { dg-final { scan-assembler "brki\tr0,-1" } } */ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/microblaze/others/mem_reload.c b/gcc/testsuite/gcc.target/microblaze/others/mem_reload.c
new file mode 100644
index 0000000000..e285fb8212
--- /dev/null
+++ b/gcc/testsuite/gcc.target/microblaze/others/mem_reload.c
@@ -0,0 +1,74 @@
+/* { dg-options "-O2 -fPIC" } */
+
+typedef struct test_struct
+{
+ unsigned long long h[8];
+ unsigned long long Nl,Nh;
+ union {
+ unsigned long long d[16];
+ unsigned char p[(16*8)];
+ } u;
+ unsigned int num,md_len;
+} TEST_STRUCT;
+
+static const unsigned long long K512[12] = {
+ 0x428a2f98d728ae22,0x7137449123ef65cd,
+ 0xb5c0fbcfec4d3b2f,0xe9b5dba58189dbbc,
+ 0x3956c25bf348b538,0x59f111f1b605d019,
+ 0x923f82a4af194f9b,0xab1c5ed5da6d8118,
+ 0xd807aa98a3030242,0x12835b0145706fbe,
+ 0x243185be4ee4b28c,0x550c7dc3d5ffb4e2};
+
+#define ROTR(x,s) (((x)>>s) | (x)<<(64-s))
+#define Sigma0(x) (ROTR((x),28) ^ ROTR((x),34) ^ ROTR((x),39))
+#define Sigma1(x) (ROTR((x),14) ^ ROTR((x),18) ^ ROTR((x),41))
+#define Ch(x,y,z) (((x) & (y)) ^ ((~(x)) & (z)))
+#define Maj(x,y,z) (((x) & (y)) ^ ((x) & (z)) ^ ((y) & (z)))
+
+#define ROUND_00_15(i,a,b,c,d,e,f,g,h) do { \
+ T1 += h + Sigma1(e) + Ch(e,f,g) + K512[i]; \
+ h = Sigma0(a) + Maj(a,b,c); \
+ d += T1; h += T1; } while (0)
+
+#define ROUND_16_80(i,a,b,c,d,e,f,g,h,X) do { \
+ T1 = X[(i)&0x0f] += s0 + s1 + X[(i+9)&0x0f]; \
+ ROUND_00_15(i,a,b,c,d,e,f,g,h); } while (0)
+
+static void testfunc1 (TEST_STRUCT *ctx, const void *in, unsigned int num)
+{
+ const unsigned long long *W=in;
+ unsigned long long a,b,c,d,e,f,g,h,s0,s1,T1;
+ unsigned long long X[16];
+ int i;
+
+ while (num--) {
+
+ T1 = X[0] = W[0]; ROUND_00_15(0,a,b,c,d,e,f,g,h);
+ T1 = X[1] = W[1]; ROUND_00_15(1,h,a,b,c,d,e,f,g);
+ T1 = X[2] = W[2]; ROUND_00_15(2,g,h,a,b,c,d,e,f);
+ T1 = X[3] = W[3]; ROUND_00_15(3,f,g,h,a,b,c,d,e);
+ T1 = X[4] = W[4]; ROUND_00_15(4,e,f,g,h,a,b,c,d);
+ T1 = X[5] = W[5]; ROUND_00_15(5,d,e,f,g,h,a,b,c);
+ T1 = X[6] = W[6]; ROUND_00_15(6,c,d,e,f,g,h,a,b);
+ T1 = X[7] = W[7]; ROUND_00_15(7,b,c,d,e,f,g,h,a);
+ T1 = X[8] = W[8]; ROUND_00_15(8,a,b,c,d,e,f,g,h);
+ T1 = X[9] = W[9]; ROUND_00_15(9,h,a,b,c,d,e,f,g);
+
+ for (i=16;i<80;i+=8)
+ {
+ ROUND_16_80(i+0,a,b,c,d,e,f,g,h,X);
+ }
+
+ ctx->h[4] += e; ctx->h[5] += f; ctx->h[6] += g; ctx->h[7] += h;
+ }
+}
+
+int testfunc2 (TEST_STRUCT *c, const void *_data, unsigned int len)
+{
+ const unsigned char *data=(const unsigned char *)_data;
+
+ unsigned char *p=(unsigned char *)c->u.p;
+
+ testfunc1 (c,p,0);
+ testfunc1 (c,data,len/sizeof(c->u));
+}
diff --git a/gcc/testsuite/gcc.target/mips/20020620-1.c b/gcc/testsuite/gcc.target/mips/20020620-1.c
index 1f2affe48f..f3bed59634 100644
--- a/gcc/testsuite/gcc.target/mips/20020620-1.c
+++ b/gcc/testsuite/gcc.target/mips/20020620-1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mlong64" } */
+/* { dg-options "-mlong64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
int foo (int *x, int i)
{
return x[i] + i;
}
-/* { dg-final { scan-assembler-not "move" } } */
+/* { dg-final { scan-assembler-not "\tmove" } } */
diff --git a/gcc/testsuite/gcc.target/mips/abi-eabi32-long32.c b/gcc/testsuite/gcc.target/mips/abi-eabi32-long32.c
index ebc5dd6724..75bd1b664b 100644
--- a/gcc/testsuite/gcc.target/mips/abi-eabi32-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-eabi32-long32.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=eabi -mgp32 -mlong32 -O2" } */
+/* { dg-options "-mabi=eabi -mgp32 -mlong32" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-eabi32-long64.c b/gcc/testsuite/gcc.target/mips/abi-eabi32-long64.c
index 5a776eca98..1649433e63 100644
--- a/gcc/testsuite/gcc.target/mips/abi-eabi32-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-eabi32-long64.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=eabi -mgp32 -mlong64 -O2" } */
+/* { dg-options "-mabi=eabi -mgp32 -mlong64" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-eabi64-long32.c b/gcc/testsuite/gcc.target/mips/abi-eabi64-long32.c
index 3882e48fa3..03d7c27183 100644
--- a/gcc/testsuite/gcc.target/mips/abi-eabi64-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-eabi64-long32.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=eabi -mgp64 -mlong32 -O2" } */
+/* { dg-options "-mabi=eabi -mgp64 -mlong32" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-eabi64-long64.c b/gcc/testsuite/gcc.target/mips/abi-eabi64-long64.c
index 5569bf521e..bb6fa17ac0 100644
--- a/gcc/testsuite/gcc.target/mips/abi-eabi64-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-eabi64-long64.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=eabi -mgp64 -mlong64 -O2" } */
+/* { dg-options "-mabi=eabi -mgp64 -mlong64" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long32-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-n32-long32-no-shared.c
index 5cab4c97a6..11dfe2bc89 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long32-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long32-no-shared.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=n32 -mlong32 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=n32 -mlong32 -mabicalls -mno-shared -mno-plt" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long32-pic.c b/gcc/testsuite/gcc.target/mips/abi-n32-long32-pic.c
index eb455da96a..ffbe62c48c 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long32-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long32-pic.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=n32 -mlong32 -fpic -O2" } */
+/* { dg-options "-mabi=n32 -mlong32 -fpic" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long32.c b/gcc/testsuite/gcc.target/mips/abi-n32-long32.c
index 6a0f7023c9..f6fa20d120 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long32.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=n32 -mlong32 addressing=absolute -O2" } */
+/* { dg-options "-mabi=n32 -mlong32 addressing=absolute" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long64-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-n32-long64-no-shared.c
index 3edf86787c..a30b573cb1 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long64-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long64-no-shared.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=n32 -mlong64 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=n32 -mlong64 -mabicalls -mno-shared -mno-plt" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long64-pic.c b/gcc/testsuite/gcc.target/mips/abi-n32-long64-pic.c
index b444209e3b..f9729a3dc4 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long64-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long64-pic.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=n32 -mlong64 -fpic -O2" } */
+/* { dg-options "-mabi=n32 -mlong64 -fpic" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n32-long64.c b/gcc/testsuite/gcc.target/mips/abi-n32-long64.c
index 868719c445..b064bf5e92 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n32-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n32-long64.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=n32 -mlong64 addressing=absolute -O2" } */
+/* { dg-options "-mabi=n32 -mlong64 addressing=absolute" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long32-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-n64-long32-no-shared.c
index b268d888a4..6a52409121 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long32-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long32-no-shared.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=64 -mlong32 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=64 -mlong32 -mabicalls -mno-shared -mno-plt" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long32-pic.c b/gcc/testsuite/gcc.target/mips/abi-n64-long32-pic.c
index 5a0d917265..6a5203e8c5 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long32-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long32-pic.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=64 -mlong32 -fpic -O2" } */
+/* { dg-options "-mabi=64 -mlong32 -fpic" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long32.c b/gcc/testsuite/gcc.target/mips/abi-n64-long32.c
index 4227169ec7..d5f52d94ca 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long32.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=64 -mlong32 addressing=absolute -O2" } */
+/* { dg-options "-mabi=64 -mlong32 addressing=absolute" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long64-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-n64-long64-no-shared.c
index 5301cfc5b7..113bbcc5a3 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long64-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long64-no-shared.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=64 -mlong64 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=64 -mlong64 -mabicalls -mno-shared -mno-plt" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long64-pic.c b/gcc/testsuite/gcc.target/mips/abi-n64-long64-pic.c
index f43e9157ba..5f734687cf 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long64-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long64-pic.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=64 -mlong64 -fpic -O2" } */
+/* { dg-options "-mabi=64 -mlong64 -fpic" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-n64-long64.c b/gcc/testsuite/gcc.target/mips/abi-n64-long64.c
index a670fe5af9..19e6d91d2d 100644
--- a/gcc/testsuite/gcc.target/mips/abi-n64-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-n64-long64.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=64 -mlong64 addressing=absolute -O2" } */
+/* { dg-options "-mabi=64 -mlong64 addressing=absolute" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long32-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-o32-long32-no-shared.c
index 2032b36d9d..fb1b888d88 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long32-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long32-no-shared.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=32 -mlong32 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=32 -mlong32 -mabicalls -mno-shared -mno-plt" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long32-pic.c b/gcc/testsuite/gcc.target/mips/abi-o32-long32-pic.c
index 5a3e93effa..64a7f58546 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long32-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long32-pic.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=32 -mlong32 -fpic -O2" } */
+/* { dg-options "-mabi=32 -mlong32 -fpic" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long32.c b/gcc/testsuite/gcc.target/mips/abi-o32-long32.c
index bdb9464c74..790122077c 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long32.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=32 -mlong32 addressing=absolute -O2" } */
+/* { dg-options "-mabi=32 -mlong32 addressing=absolute" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long64-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-o32-long64-no-shared.c
index 6340b63252..2f28aeb61e 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long64-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long64-no-shared.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=32 -mlong64 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=32 -mlong64 -mabicalls -mno-shared -mno-plt" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long64-pic.c b/gcc/testsuite/gcc.target/mips/abi-o32-long64-pic.c
index 1583034b2a..89cd9a2079 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long64-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long64-pic.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=32 -mlong64 -fpic -O2" } */
+/* { dg-options "-mabi=32 -mlong64 -fpic" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o32-long64.c b/gcc/testsuite/gcc.target/mips/abi-o32-long64.c
index 4a88739b69..840e9aa130 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o32-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o32-long64.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=32 -mlong64 addressing=absolute -O2" } */
+/* { dg-options "-mabi=32 -mlong64 addressing=absolute" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long32-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-o64-long32-no-shared.c
index 548ae0d4a1..832550e45c 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long32-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long32-no-shared.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=o64 -mlong32 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=o64 -mlong32 -mabicalls -mno-shared -mno-plt" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long32-pic.c b/gcc/testsuite/gcc.target/mips/abi-o64-long32-pic.c
index 89d03ab674..e06b882929 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long32-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long32-pic.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=o64 -mlong32 -fpic -O2" } */
+/* { dg-options "-mabi=o64 -mlong32 -fpic" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long32.c b/gcc/testsuite/gcc.target/mips/abi-o64-long32.c
index db5893e452..54ac2d707f 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long32.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long32.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=o64 -mlong32 addressing=absolute -O2" } */
+/* { dg-options "-mabi=o64 -mlong32 addressing=absolute" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long64-no-shared.c b/gcc/testsuite/gcc.target/mips/abi-o64-long64-no-shared.c
index df164b22f6..94848f4e1b 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long64-no-shared.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long64-no-shared.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=o64 -mlong64 -mabicalls -mno-shared -mno-plt -O2" } */
+/* { dg-options "-mabi=o64 -mlong64 -mabicalls -mno-shared -mno-plt" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long64-pic.c b/gcc/testsuite/gcc.target/mips/abi-o64-long64-pic.c
index df58d1f028..8c2ca36d9f 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long64-pic.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long64-pic.c
@@ -1,3 +1,3 @@
-/* { dg-options "-mabi=o64 -mlong64 -fpic -O2" } */
+/* { dg-options "-mabi=o64 -mlong64 -fpic" } */
/* { dg-error "is incompatible with" "" { target *-*-* } 0 } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/abi-o64-long64.c b/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
index 43078f6809..02633567ca 100644
--- a/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
+++ b/gcc/testsuite/gcc.target/mips/abi-o64-long64.c
@@ -1,2 +1,2 @@
-/* { dg-options "-mabi=o64 -mlong64 -mno-abicalls -O2" } */
+/* { dg-options "-mabi=o64 -mlong64 -mno-abicalls" } */
#include "abi-main.h"
diff --git a/gcc/testsuite/gcc.target/mips/args-1.c b/gcc/testsuite/gcc.target/mips/args-1.c
index 56def9488a..3a132deaf3 100644
--- a/gcc/testsuite/gcc.target/mips/args-1.c
+++ b/gcc/testsuite/gcc.target/mips/args-1.c
@@ -12,7 +12,7 @@ const char *optimized_for = _MIPS_TUNE;
/* Test complementary macro pairs: exactly one of each pair
must be defined. */
-#if defined (_R3000) == defined (_R4000) && !defined (__sgi__)
+#if defined (_R3000) == defined (_R4000)
#error _R3000 / _R4000 mismatch
#endif
@@ -26,7 +26,7 @@ const char *optimized_for = _MIPS_TUNE;
/* Check for __mips64 consistency. */
-#if defined (__mips64) != defined (_R4000) && !defined (__sgi__)
+#if defined (__mips64) != defined (_R4000)
#error __mips64 / _R4000 mismatch
#endif
diff --git a/gcc/testsuite/gcc.target/mips/asm-1.c b/gcc/testsuite/gcc.target/mips/asm-1.c
index 9f9cb3a348..8df2689469 100644
--- a/gcc/testsuite/gcc.target/mips/asm-1.c
+++ b/gcc/testsuite/gcc.target/mips/asm-1.c
@@ -1,7 +1,6 @@
/* PR target/17565. GCC used to put the asm into the delay slot
of the call. */
/* { dg-do assemble } */
-/* { dg-options "-O" } */
NOMIPS16 int foo (int n)
{
diff --git a/gcc/testsuite/gcc.target/mips/atomic-memory-2.c b/gcc/testsuite/gcc.target/mips/atomic-memory-2.c
index bc597ab2d2..506295b615 100644
--- a/gcc/testsuite/gcc.target/mips/atomic-memory-2.c
+++ b/gcc/testsuite/gcc.target/mips/atomic-memory-2.c
@@ -1,10 +1,11 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa>=2 -mabi=32" } */
-/* { dg-final { scan-assembler "addiu" } } */
-/* { dg-final { scan-assembler-not "subu" } } */
+/* { dg-options "isa>=2 -mabi=32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\taddiu\t" } } */
+/* { dg-final { scan-assembler-not "\tsubu" } } */
NOMIPS16 unsigned long
f(unsigned long *p)
{
- return __sync_fetch_and_sub (p, 5);
+ return __sync_fetch_and_sub (p, 5);
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-1.c b/gcc/testsuite/gcc.target/mips/branch-1.c
index 2f4510f8dd..6ef50e8a18 100644
--- a/gcc/testsuite/gcc.target/mips/branch-1.c
+++ b/gcc/testsuite/gcc.target/mips/branch-1.c
@@ -2,7 +2,7 @@
but we test for "bbit" elsewhere. On other targets, we should implement
the "if" statements using an "andi" instruction followed by a branch
on zero. */
-/* { dg-options "-O2 forbid_cpu=octeon.*" } */
+/* { dg-options "forbid_cpu=octeon.*" } */
void bar (void);
NOMIPS16 void f1 (int x) { if (x & 4) bar (); }
diff --git a/gcc/testsuite/gcc.target/mips/branch-10.c b/gcc/testsuite/gcc.target/mips/branch-10.c
index 8186030e6e..e2b1b5f6ba 100644
--- a/gcc/testsuite/gcc.target/mips/branch-10.c
+++ b/gcc/testsuite/gcc.target/mips/branch-10.c
@@ -5,9 +5,9 @@
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fff8;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-11.c b/gcc/testsuite/gcc.target/mips/branch-11.c
index a314740655..962eb1b5d6 100644
--- a/gcc/testsuite/gcc.target/mips/branch-11.c
+++ b/gcc/testsuite/gcc.target/mips/branch-11.c
@@ -9,9 +9,9 @@
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fffc;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-12.c b/gcc/testsuite/gcc.target/mips/branch-12.c
index 3e5b421cf8..4aef160ade 100644
--- a/gcc/testsuite/gcc.target/mips/branch-12.c
+++ b/gcc/testsuite/gcc.target/mips/branch-12.c
@@ -5,9 +5,9 @@
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fff8;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-13.c b/gcc/testsuite/gcc.target/mips/branch-13.c
index 9bd94146a6..8a6fb049f2 100644
--- a/gcc/testsuite/gcc.target/mips/branch-13.c
+++ b/gcc/testsuite/gcc.target/mips/branch-13.c
@@ -9,9 +9,9 @@
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fffc;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-2.c b/gcc/testsuite/gcc.target/mips/branch-2.c
index f6642cb874..6409c4cc50 100644
--- a/gcc/testsuite/gcc.target/mips/branch-2.c
+++ b/gcc/testsuite/gcc.target/mips/branch-2.c
@@ -1,7 +1,7 @@
/* { dg-options "-mshared -mabi=32" } */
/* { dg-final { scan-assembler-not "(\\\$25|\\\$28|cpload)" } } */
/* { dg-final { scan-assembler-not "\tjr\t\\\$1\n" } } */
-/* { dg-final { scan-assembler-not "cprestore" } } */
+/* { dg-final { scan-assembler-not "\\.cprestore" } } */
#include "branch-helper.h"
diff --git a/gcc/testsuite/gcc.target/mips/branch-3.c b/gcc/testsuite/gcc.target/mips/branch-3.c
index 198d6ec648..5fcfece3e9 100644
--- a/gcc/testsuite/gcc.target/mips/branch-3.c
+++ b/gcc/testsuite/gcc.target/mips/branch-3.c
@@ -1,7 +1,7 @@
/* { dg-options "-mshared -mabi=32" } */
/* { dg-final { scan-assembler "\t\\.cpload\t\\\$25\n" } } */
/* { dg-final { scan-assembler "\tjr\t\\\$1\n" } } */
-/* { dg-final { scan-assembler-not "cprestore" } } */
+/* { dg-final { scan-assembler-not "\\.cprestore" } } */
#include "branch-helper.h"
diff --git a/gcc/testsuite/gcc.target/mips/branch-8.c b/gcc/testsuite/gcc.target/mips/branch-8.c
index 4595feafa6..ba5f954378 100644
--- a/gcc/testsuite/gcc.target/mips/branch-8.c
+++ b/gcc/testsuite/gcc.target/mips/branch-8.c
@@ -5,9 +5,9 @@
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fff8;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-9.c b/gcc/testsuite/gcc.target/mips/branch-9.c
index 417507cc48..cad1c003c3 100644
--- a/gcc/testsuite/gcc.target/mips/branch-9.c
+++ b/gcc/testsuite/gcc.target/mips/branch-9.c
@@ -1,18 +1,18 @@
/* { dg-options "-mshared -mabi=32" } */
/* { dg-final { scan-assembler "\t\\.cpload\t\\\$25\n" } } */
/* { dg-final { scan-assembler "\t\\.cprestore\t16\n" } } */
-/* { dg-final { scan-assembler "\tlw\t\\\$1,16\\(\\\$fp\\)\n" } } */
+/* { dg-final { scan-assembler "\tlw\t\\\$1,16\\(\\\$(fp|sp)\\)\n" } } */
/* { dg-final { scan-assembler "\tlw\t\\\$1,%got\\(\[^)\]*\\)\\(\\\$1\\)\n" } } */
/* { dg-final { scan-assembler "\taddiu\t\\\$1,\\\$1,%lo\\(\[^)\]*\\)\n" } } */
/* { dg-final { scan-assembler "\tjr\t\\\$1\n" } } */
-/* { dg-final { scan-assembler-not "\tlw\t\\\$28,16\\(\\\$sp\\)\n" } } */
+/* { dg-final { scan-assembler-not "\\\$28" } } */
#include "branch-helper.h"
NOMIPS16 void
-foo (void (*bar) (void), volatile int *x)
+foo (int (*bar) (void), int *x)
{
- bar ();
+ *x = bar ();
if (__builtin_expect (*x == 0, 1))
OCCUPY_0x1fffc;
}
diff --git a/gcc/testsuite/gcc.target/mips/branch-cost-1.c b/gcc/testsuite/gcc.target/mips/branch-cost-1.c
index d825e06176..f72f2acfb3 100644
--- a/gcc/testsuite/gcc.target/mips/branch-cost-1.c
+++ b/gcc/testsuite/gcc.target/mips/branch-cost-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mbranch-cost=1 isa>=4 -O2" } */
+/* { dg-options "-mbranch-cost=1 isa>=4" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int
foo (int x, int y, int z, int k)
{
diff --git a/gcc/testsuite/gcc.target/mips/branch-cost-2.c b/gcc/testsuite/gcc.target/mips/branch-cost-2.c
index 23f528ad63..3b2c4a13e5 100644
--- a/gcc/testsuite/gcc.target/mips/branch-cost-2.c
+++ b/gcc/testsuite/gcc.target/mips/branch-cost-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mbranch-cost=10 isa>=4 -O2" } */
+/* { dg-options "-mbranch-cost=10 isa>=4" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int
foo (int x, int y, int z, int k)
{
diff --git a/gcc/testsuite/gcc.target/mips/bswap-1.c b/gcc/testsuite/gcc.target/mips/bswap-1.c
new file mode 100644
index 0000000000..24016f2693
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-1.c
@@ -0,0 +1,10 @@
+/* { dg-options "isa_rev>=2" } */
+/* { dg-skip-if "bswap recognition needs expensive optimizations" { *-*-* } { "-O0" "-O1" } { "" } } */
+
+NOMIPS16 unsigned short
+foo (unsigned short x)
+{
+ return ((x << 8) & 0xff00) | ((x >> 8) & 0xff);
+}
+
+/* { dg-final { scan-assembler "\twsbh\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/bswap-2.c b/gcc/testsuite/gcc.target/mips/bswap-2.c
new file mode 100644
index 0000000000..e0ca496b6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-2.c
@@ -0,0 +1,9 @@
+/* { dg-options "isa_rev>=2" } */
+
+NOMIPS16 unsigned short
+foo (unsigned short x)
+{
+ return __builtin_bswap16 (x);
+}
+
+/* { dg-final { scan-assembler "\twsbh\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/bswap-3.c b/gcc/testsuite/gcc.target/mips/bswap-3.c
new file mode 100644
index 0000000000..5d2086fd32
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-3.c
@@ -0,0 +1,14 @@
+/* { dg-options "isa_rev>=2" } */
+/* { dg-skip-if "bswap recognition needs expensive optimizations" { *-*-* } { "-O0" "-O1" } { "" } } */
+
+NOMIPS16 unsigned int
+foo (unsigned int x)
+{
+ return (((x << 24) & 0xff000000)
+ | ((x << 8) & 0xff0000)
+ | ((x >> 8) & 0xff00)
+ | ((x >> 24) & 0xff));
+}
+
+/* { dg-final { scan-assembler "\twsbh\t" } } */
+/* { dg-final { scan-assembler "\tror\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/bswap-4.c b/gcc/testsuite/gcc.target/mips/bswap-4.c
new file mode 100644
index 0000000000..ac37a01144
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-4.c
@@ -0,0 +1,10 @@
+/* { dg-options "isa_rev>=2" } */
+
+NOMIPS16 unsigned int
+foo (unsigned int x)
+{
+ return __builtin_bswap32 (x);
+}
+
+/* { dg-final { scan-assembler "\twsbh\t" } } */
+/* { dg-final { scan-assembler "\tror\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/bswap-5.c b/gcc/testsuite/gcc.target/mips/bswap-5.c
new file mode 100644
index 0000000000..45520e4ab8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-5.c
@@ -0,0 +1,20 @@
+/* { dg-options "isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "bswap recognition needs expensive optimizations" { *-*-* } { "-O0" "-O1" } { "" } } */
+
+typedef unsigned long long uint64_t;
+
+NOMIPS16 uint64_t
+foo (uint64_t x)
+{
+ return (((x << 56) & 0xff00000000000000ull)
+ | ((x << 40) & 0xff000000000000ull)
+ | ((x << 24) & 0xff0000000000ull)
+ | ((x << 8) & 0xff00000000ull)
+ | ((x >> 8) & 0xff000000)
+ | ((x >> 24) & 0xff0000)
+ | ((x >> 40) & 0xff00)
+ | ((x >> 56) & 0xff));
+}
+
+/* { dg-final { scan-assembler "\tdsbh\t" } } */
+/* { dg-final { scan-assembler "\tdshd\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/bswap-6.c b/gcc/testsuite/gcc.target/mips/bswap-6.c
new file mode 100644
index 0000000000..1145357fef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/bswap-6.c
@@ -0,0 +1,12 @@
+/* { dg-options "isa_rev>=2 -mgp64" } */
+
+typedef unsigned long long uint64_t;
+
+NOMIPS16 uint64_t
+foo (uint64_t x)
+{
+ return __builtin_bswap64 (x);
+}
+
+/* { dg-final { scan-assembler "\tdsbh\t" } } */
+/* { dg-final { scan-assembler "\tdshd\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/cache-1.c b/gcc/testsuite/gcc.target/mips/cache-1.c
index da897066d4..f5c3dd307d 100644
--- a/gcc/testsuite/gcc.target/mips/cache-1.c
+++ b/gcc/testsuite/gcc.target/mips/cache-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 isa>=3" } */
+/* { dg-options "isa>=3" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 void
f1 (int *area)
diff --git a/gcc/testsuite/gcc.target/mips/call-1.c b/gcc/testsuite/gcc.target/mips/call-1.c
index 7dceefaa3d..e4b7acefaf 100644
--- a/gcc/testsuite/gcc.target/mips/call-1.c
+++ b/gcc/testsuite/gcc.target/mips/call-1.c
@@ -1,9 +1,12 @@
-/* { dg-options "-O2 -mrelax-pic-calls -mshared" } */
-/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalr\t" } } */
-/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalr\t" } } */
-/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalr\t" } } */
+/* { dg-options "-mrelax-pic-calls -mshared -foptimize-sibling-calls -mabi=32" } */
+/* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalrs?\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalrs?\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalrs?\t" } } */
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail\n1:\tjr\t" } } */
/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail2\n1:\tjr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail3\n1:\tjr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail4\n1:\tjr\t" } } */
__attribute__ ((noinline)) static void staticfunc () { asm (""); }
int normal ();
@@ -30,3 +33,17 @@ NOMIPS16 void g ()
{
tail2 ();
}
+
+__attribute__ ((visibility ("hidden"))) void tail3 ();
+
+NOMIPS16 void j ()
+{
+ tail3 ();
+}
+
+__attribute__ ((noinline)) static void tail4 () { asm (""); }
+
+NOMIPS16 void k ()
+{
+ tail4 ();
+}
diff --git a/gcc/testsuite/gcc.target/mips/call-2.c b/gcc/testsuite/gcc.target/mips/call-2.c
index 8e74991903..c2fc8eaad1 100644
--- a/gcc/testsuite/gcc.target/mips/call-2.c
+++ b/gcc/testsuite/gcc.target/mips/call-2.c
@@ -1,14 +1,8 @@
/* See through some simple data-flow. */
-/* { dg-options "-O2 -mrelax-pic-calls" } */
-/* { dg-final { scan-assembler-times "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalr\t" 3 } } */
+/* { dg-options "-mrelax-pic-calls" } */
+/* { dg-final { scan-assembler-times "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalrs?\t" 2 } } */
-NOMIPS16 f (int i)
-{
- while (i--)
- g ();
-}
-
-NOMIPS16 ff ()
+NOMIPS16 f ()
{
g ();
g ();
diff --git a/gcc/testsuite/gcc.target/mips/call-3.c b/gcc/testsuite/gcc.target/mips/call-3.c
index 25f01d2a90..37609088df 100644
--- a/gcc/testsuite/gcc.target/mips/call-3.c
+++ b/gcc/testsuite/gcc.target/mips/call-3.c
@@ -1,5 +1,5 @@
-/* { dg-options "-O2 -mrelax-pic-calls -mno-shared" } */
-/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalr\t" } } */
+/* { dg-options "-mrelax-pic-calls -mno-shared" } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalrs?\t" } } */
/* { dg-require-visibility "" } */
__attribute__ ((visibility ("hidden"))) void g ();
diff --git a/gcc/testsuite/gcc.target/mips/call-4.c b/gcc/testsuite/gcc.target/mips/call-4.c
new file mode 100644
index 0000000000..049e33882f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/call-4.c
@@ -0,0 +1,9 @@
+/* See through some simple data-flow. */
+/* { dg-options "-mrelax-pic-calls" } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,g\n1:\tjalr\t" } } */
+
+NOMIPS16 f (int i)
+{
+ while (i--)
+ g ();
+}
diff --git a/gcc/testsuite/gcc.target/mips/call-5.c b/gcc/testsuite/gcc.target/mips/call-5.c
new file mode 100644
index 0000000000..2e58178ba9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/call-5.c
@@ -0,0 +1,51 @@
+/* Like call-1.c, but for n32. We cannot use sibling calls for tail and tail2
+ in this case (PR target/57260). */
+/* { dg-options "-mrelax-pic-calls -mshared -foptimize-sibling-calls -mabi=n32" } */
+/* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail2\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail3\n1:\tjr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail4\n1:\tjr\t" } } */
+
+__attribute__ ((noinline)) static void staticfunc () { asm (""); }
+int normal ();
+void normal2 ();
+
+NOMIPS16 f (int *p)
+{
+ *p = normal ();
+ normal2 ();
+ staticfunc ();
+ return 1;
+}
+
+int tail ();
+
+NOMIPS16 h ()
+{
+ return tail ();
+}
+
+void tail2 ();
+
+NOMIPS16 void g ()
+{
+ tail2 ();
+}
+
+__attribute__ ((visibility ("hidden"))) void tail3 ();
+
+NOMIPS16 void j ()
+{
+ tail3 ();
+}
+
+__attribute__ ((noinline)) static void tail4 () { asm (""); }
+
+NOMIPS16 void k ()
+{
+ tail4 ();
+}
diff --git a/gcc/testsuite/gcc.target/mips/call-6.c b/gcc/testsuite/gcc.target/mips/call-6.c
new file mode 100644
index 0000000000..86f3dc4a8f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/call-6.c
@@ -0,0 +1,50 @@
+/* Like call-5.c, but for n64. */
+/* { dg-options "-mrelax-pic-calls -mshared -foptimize-sibling-calls -mabi=64" } */
+/* { dg-skip-if "requires -foptimize-sibling-calls" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,normal2\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,staticfunc\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail2\n1:\tjalr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail3\n1:\tjr\t" } } */
+/* { dg-final { scan-assembler "\\.reloc\t1f,R_MIPS_JALR,tail4\n1:\tjr\t" } } */
+
+__attribute__ ((noinline)) static void staticfunc () { asm (""); }
+int normal ();
+void normal2 ();
+
+NOMIPS16 f (int *p)
+{
+ *p = normal ();
+ normal2 ();
+ staticfunc ();
+ return 1;
+}
+
+int tail ();
+
+NOMIPS16 h ()
+{
+ return tail ();
+}
+
+void tail2 ();
+
+NOMIPS16 void g ()
+{
+ tail2 ();
+}
+
+__attribute__ ((visibility ("hidden"))) void tail3 ();
+
+NOMIPS16 void j ()
+{
+ tail3 ();
+}
+
+__attribute__ ((noinline)) static void tail4 () { asm (""); }
+
+NOMIPS16 void k ()
+{
+ tail4 ();
+}
diff --git a/gcc/testsuite/gcc.target/mips/call-saved-2.c b/gcc/testsuite/gcc.target/mips/call-saved-2.c
index 9ac7a2735a..b55c30ab06 100644
--- a/gcc/testsuite/gcc.target/mips/call-saved-2.c
+++ b/gcc/testsuite/gcc.target/mips/call-saved-2.c
@@ -1,5 +1,6 @@
/* Check that we save non-MIPS16 GPRs if they are explicitly clobbered. */
-/* { dg-options "(-mips16) isa_rev=0 -O2" } */
+/* { dg-options "(-mips16) isa_rev=0" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
MIPS16 void
foo (void)
diff --git a/gcc/testsuite/gcc.target/mips/call-saved-3.c b/gcc/testsuite/gcc.target/mips/call-saved-3.c
index e178eb0f06..84cdb3b889 100644
--- a/gcc/testsuite/gcc.target/mips/call-saved-3.c
+++ b/gcc/testsuite/gcc.target/mips/call-saved-3.c
@@ -1,6 +1,6 @@
/* Check that we save all call-saved GPRs in a MIPS16 __builtin_setjmp
function. */
-/* { dg-options "(-mips16) isa_rev=0 -O2" } */
+/* { dg-options "(-mips16) isa_rev=0" } */
void bar (void);
extern int buf[];
diff --git a/gcc/testsuite/gcc.target/mips/clear-cache-1.c b/gcc/testsuite/gcc.target/mips/clear-cache-1.c
index 0ccc007fbc..f1554f593d 100644
--- a/gcc/testsuite/gcc.target/mips/clear-cache-1.c
+++ b/gcc/testsuite/gcc.target/mips/clear-cache-1.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -msynci isa_rev>=2" } */
-/* { dg-final { scan-assembler "synci" } } */
-/* { dg-final { scan-assembler "jr.hb" } } */
-/* { dg-final { scan-assembler-not "_flush_cache" } } */
+/* { dg-options "-msynci isa_rev>=2" } */
+/* { dg-final { scan-assembler "\tsynci\t" } } */
+/* { dg-final { scan-assembler "\tjr.hb\t" } } */
+/* { dg-final { scan-assembler-not "_flush_cache|mips_sync_icache|_cacheflush" } } */
NOMIPS16 void f()
{
diff --git a/gcc/testsuite/gcc.target/mips/clear-cache-2.c b/gcc/testsuite/gcc.target/mips/clear-cache-2.c
index 2c925b8603..f1f7f81909 100644
--- a/gcc/testsuite/gcc.target/mips/clear-cache-2.c
+++ b/gcc/testsuite/gcc.target/mips/clear-cache-2.c
@@ -1,8 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mips32" } */
-/* { dg-final { scan-assembler-not "synci" } } */
-/* { dg-final { scan-assembler-not "jr.hb" } } */
-/* { dg-final { scan-assembler "_flush_cache" } } */
+/* { dg-options "-mips32" } */
+/* { dg-final { scan-assembler-not "\tsynci" } } */
+/* { dg-final { scan-assembler-not "\tjr.hb" } } */
+/* { dg-final { scan-assembler "_flush_cache|mips_sync_icache|_cacheflush" } } */
void f()
{
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-1.c b/gcc/testsuite/gcc.target/mips/code-readable-1.c
index d9b6e65ea2..b3e864df6f 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-1.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-1.c
@@ -1,17 +1,34 @@
/* { dg-options "(-mips16) -mcode-readable=yes -mgp32 addressing=absolute" } */
+/* { dg-skip-if ".half requires -O" { *-*-* } { "-O0" } { "" } } */
+
+volatile int x1;
+volatile int x2;
+volatile int x3;
+volatile int x4;
+volatile int x5;
+volatile int x6;
+volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
MIPS16 int
-foo (int i)
+foo (int i, volatile *x)
{
switch (i)
{
- case 1: return 40;
- case 2: return 11;
- case 3: return 29;
- case 4: return 10;
- case 5: return 12;
- case 6: return 35;
- case 7: return 23;
+ case 1: return x1 + x[0];
+ case 2: return x2 + x[1];
+ case 3: return x3 + x[2];
+ case 4: return x4 + x[3];
+ case 5: return x5 + x[4];
+ case 6: return x6 + x[5];
+ case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-2.c b/gcc/testsuite/gcc.target/mips/code-readable-2.c
index e0176c3dbd..3d325049d5 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-2.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-2.c
@@ -1,17 +1,33 @@
/* { dg-options "(-mips16) -mcode-readable=pcrel -mgp32 addressing=absolute" } */
+volatile int x1;
+volatile int x2;
+volatile int x3;
+volatile int x4;
+volatile int x5;
+volatile int x6;
+volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
+
MIPS16 int
-foo (int i)
+foo (int i, volatile *x)
{
switch (i)
{
- case 1: return 40;
- case 2: return 11;
- case 3: return 29;
- case 4: return 10;
- case 5: return 12;
- case 6: return 35;
- case 7: return 23;
+ case 1: return x1 + x[0];
+ case 2: return x2 + x[1];
+ case 3: return x3 + x[2];
+ case 4: return x4 + x[3];
+ case 5: return x5 + x[4];
+ case 6: return x6 + x[5];
+ case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-3.c b/gcc/testsuite/gcc.target/mips/code-readable-3.c
index 075ca8d174..aaf1874937 100644
--- a/gcc/testsuite/gcc.target/mips/code-readable-3.c
+++ b/gcc/testsuite/gcc.target/mips/code-readable-3.c
@@ -1,17 +1,33 @@
/* { dg-options "(-mips16) -mcode-readable=no -mgp32 addressing=absolute" } */
+volatile int x1;
+volatile int x2;
+volatile int x3;
+volatile int x4;
+volatile int x5;
+volatile int x6;
+volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
+
MIPS16 int
-foo (int i)
+foo (int i, volatile *x)
{
switch (i)
{
- case 1: return 40;
- case 2: return 11;
- case 3: return 29;
- case 4: return 10;
- case 5: return 12;
- case 6: return 35;
- case 7: return 23;
+ case 1: return x1 + x[0];
+ case 2: return x2 + x[1];
+ case 3: return x3 + x[2];
+ case 4: return x4 + x[3];
+ case 5: return x5 + x[4];
+ case 6: return x6 + x[5];
+ case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
default: return 0;
}
}
diff --git a/gcc/testsuite/gcc.target/mips/code-readable-4.c b/gcc/testsuite/gcc.target/mips/code-readable-4.c
new file mode 100644
index 0000000000..4db89f8746
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/code-readable-4.c
@@ -0,0 +1,51 @@
+/* { dg-options "(-mips16) -mcode-readable=yes -mabi=eabi -mgp64" } */
+/* { dg-skip-if ".half requires -O" { *-*-* } { "-O0" } { "" } } */
+
+volatile int x1;
+volatile int x2;
+volatile int x3;
+volatile int x4;
+volatile int x5;
+volatile int x6;
+volatile int x7;
+volatile int x8;
+volatile int x9;
+volatile int x10;
+volatile int x11;
+
+MIPS16 int
+foo (int i, volatile *x)
+{
+ switch (i)
+ {
+ case 1: return x1 + x[0];
+ case 2: return x2 + x[1];
+ case 3: return x3 + x[2];
+ case 4: return x4 + x[3];
+ case 5: return x5 + x[4];
+ case 6: return x6 + x[5];
+ case 7: return x7 + x[6];
+ case 8: return x8 + x[7];
+ case 9: return x9 + x[8];
+ case 10: return x10 + x[9];
+ case 11: return x11 + x[10];
+ default: return 0;
+ }
+}
+
+extern int k[];
+
+MIPS16 int *
+bar (void)
+{
+ return k;
+}
+
+/* { dg-final { scan-assembler "\tla\t" } } */
+/* { dg-final { scan-assembler "\t\\.half\t" } } */
+/* { dg-final { scan-assembler-not "%hi\\(\[^)\]*L" } } */
+/* { dg-final { scan-assembler-not "%lo\\(\[^)\]*L" } } */
+
+/* { dg-final { scan-assembler "\t\\.dword\tk\n" } } */
+/* { dg-final { scan-assembler-not "%hi\\(k\\)" } } */
+/* { dg-final { scan-assembler-not "%lo\\(k\\)" } } */
diff --git a/gcc/testsuite/gcc.target/mips/const-anchor-1.c b/gcc/testsuite/gcc.target/mips/const-anchor-1.c
index 66981671d0..a5f01e4ec1 100644
--- a/gcc/testsuite/gcc.target/mips/const-anchor-1.c
+++ b/gcc/testsuite/gcc.target/mips/const-anchor-1.c
@@ -1,8 +1,8 @@
/* Derive a constant (0x1233ffff) from an intermediate value
(0x1234000) used to build another constant. */
-/* { dg-options "-O" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "0x12330000|305332224" } } */
-/* { dg-final { scan-assembler "addiu\t\\\$5,\\\$\[0-9\]*,-1" } } */
+/* { dg-final { scan-assembler "\td?addiu\t\\\$5,\\\$\[0-9\]*,-1" } } */
NOMIPS16 void f ()
{
diff --git a/gcc/testsuite/gcc.target/mips/const-anchor-2.c b/gcc/testsuite/gcc.target/mips/const-anchor-2.c
index ccb89bb766..8dad5a70b2 100644
--- a/gcc/testsuite/gcc.target/mips/const-anchor-2.c
+++ b/gcc/testsuite/gcc.target/mips/const-anchor-2.c
@@ -1,7 +1,7 @@
/* Derive a constant (0x30001) from another constant. */
-/* { dg-options "-O" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "0x300000|196608" } } */
-/* { dg-final { scan-assembler "addiu\t\\\$5,\\\$\[0-9\]*,32763" } } */
+/* { dg-final { scan-assembler "\td?addiu\t\\\$5,\\\$\[0-9\]*,32763" } } */
NOMIPS16 void f ()
{
diff --git a/gcc/testsuite/gcc.target/mips/div-1.c b/gcc/testsuite/gcc.target/mips/div-1.c
index e1976c25e0..08234a6e1b 100644
--- a/gcc/testsuite/gcc.target/mips/div-1.c
+++ b/gcc/testsuite/gcc.target/mips/div-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tddiv\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-10.c b/gcc/testsuite/gcc.target/mips/div-10.c
index 23075da2c3..fb8953def4 100644
--- a/gcc/testsuite/gcc.target/mips/div-10.c
+++ b/gcc/testsuite/gcc.target/mips/div-10.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdivu\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-11.c b/gcc/testsuite/gcc.target/mips/div-11.c
index 68f1658484..ff129292a3 100644
--- a/gcc/testsuite/gcc.target/mips/div-11.c
+++ b/gcc/testsuite/gcc.target/mips/div-11.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdiv\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-12.c b/gcc/testsuite/gcc.target/mips/div-12.c
index c2384b20a9..57866ceb02 100644
--- a/gcc/testsuite/gcc.target/mips/div-12.c
+++ b/gcc/testsuite/gcc.target/mips/div-12.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdivu\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-13.c b/gcc/testsuite/gcc.target/mips/div-13.c
new file mode 100644
index 0000000000..cf746a6630
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/div-13.c
@@ -0,0 +1,17 @@
+/* { dg-options "(-mips16) -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+typedef int int32_t;
+typedef unsigned int uint32_t;
+typedef long long int64_t;
+typedef unsigned long long uint64_t;
+
+MIPS16 int32_t f1 (int32_t x, int32_t y) { return x / y + x % y; }
+MIPS16 uint32_t f2 (uint32_t x, uint32_t y) { return x / y + x % y; }
+MIPS16 int64_t f3 (int64_t x, int64_t y) { return x / y + x % y; }
+MIPS16 uint64_t f4 (uint64_t x, uint64_t y) { return x / y + x % y; }
+
+/* { dg-final { scan-assembler-times "\tdiv\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tdivu\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tddiv\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tddivu\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-2.c b/gcc/testsuite/gcc.target/mips/div-2.c
index af6e2fa8e1..257ca923d0 100644
--- a/gcc/testsuite/gcc.target/mips/div-2.c
+++ b/gcc/testsuite/gcc.target/mips/div-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tddivu\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-3.c b/gcc/testsuite/gcc.target/mips/div-3.c
index 684b6a8e44..b9ae3684ef 100644
--- a/gcc/testsuite/gcc.target/mips/div-3.c
+++ b/gcc/testsuite/gcc.target/mips/div-3.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tddiv\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-4.c b/gcc/testsuite/gcc.target/mips/div-4.c
index 251b88f816..5f05d8e78e 100644
--- a/gcc/testsuite/gcc.target/mips/div-4.c
+++ b/gcc/testsuite/gcc.target/mips/div-4.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tddivu\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-5.c b/gcc/testsuite/gcc.target/mips/div-5.c
index a08f3e6f4b..294cc7f24a 100644
--- a/gcc/testsuite/gcc.target/mips/div-5.c
+++ b/gcc/testsuite/gcc.target/mips/div-5.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdiv\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-6.c b/gcc/testsuite/gcc.target/mips/div-6.c
index 23075da2c3..fb8953def4 100644
--- a/gcc/testsuite/gcc.target/mips/div-6.c
+++ b/gcc/testsuite/gcc.target/mips/div-6.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdivu\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-7.c b/gcc/testsuite/gcc.target/mips/div-7.c
index 68f1658484..ff129292a3 100644
--- a/gcc/testsuite/gcc.target/mips/div-7.c
+++ b/gcc/testsuite/gcc.target/mips/div-7.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdiv\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-8.c b/gcc/testsuite/gcc.target/mips/div-8.c
index c2384b20a9..57866ceb02 100644
--- a/gcc/testsuite/gcc.target/mips/div-8.c
+++ b/gcc/testsuite/gcc.target/mips/div-8.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdivu\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/div-9.c b/gcc/testsuite/gcc.target/mips/div-9.c
index a08f3e6f4b..294cc7f24a 100644
--- a/gcc/testsuite/gcc.target/mips/div-9.c
+++ b/gcc/testsuite/gcc.target/mips/div-9.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
/* { dg-final { scan-assembler "\tdiv\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c b/gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c
index 87d1da98cb..a48f561f32 100644
--- a/gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c
+++ b/gcc/testsuite/gcc.target/mips/dpaq_sa_l_w.c
@@ -1,5 +1,7 @@
/* { dg-do compile { target { fixed_point } } } */
-/* { dg-options "-O2 -mgp32 -mdsp" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp32 -mdsp -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tdpaq_sa.l.w\t\\\$ac" 3 } } */
NOMIPS16 _Sat long long _Fract
diff --git a/gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c b/gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c
index 9aeb5667ac..fb63a1db80 100644
--- a/gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c
+++ b/gcc/testsuite/gcc.target/mips/dpsq_sa_l_w.c
@@ -1,5 +1,7 @@
/* { dg-do compile { target { fixed_point } } } */
-/* { dg-options "-O2 -mgp32 -mdsp" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp32 -mdsp -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tdpsq_sa.l.w\t\\\$ac" 2 } } */
NOMIPS16 _Sat long long _Fract
diff --git a/gcc/testsuite/gcc.target/mips/dse-1.c b/gcc/testsuite/gcc.target/mips/dse-1.c
index 6ef55cde25..e53189cadd 100644
--- a/gcc/testsuite/gcc.target/mips/dse-1.c
+++ b/gcc/testsuite/gcc.target/mips/dse-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-mgp64 -O" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(ID, TYPE1, TYPE2) \
union u##ID { \
diff --git a/gcc/testsuite/gcc.target/mips/dsp-ctrl.c b/gcc/testsuite/gcc.target/mips/dsp-ctrl.c
index bb89e84f23..4bf449b86c 100644
--- a/gcc/testsuite/gcc.target/mips/dsp-ctrl.c
+++ b/gcc/testsuite/gcc.target/mips/dsp-ctrl.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mdsp -mgp32" } */
+/* { dg-options "-mdsp -mgp32" } */
extern void abort (void);
extern void exit (int);
diff --git a/gcc/testsuite/gcc.target/mips/dsp-lhx.c b/gcc/testsuite/gcc.target/mips/dsp-lhx.c
index 416356f2a0..8fa20a0909 100644
--- a/gcc/testsuite/gcc.target/mips/dsp-lhx.c
+++ b/gcc/testsuite/gcc.target/mips/dsp-lhx.c
@@ -1,6 +1,7 @@
/* Test MIPS32 DSP LHX instruction */
/* { dg-do compile } */
-/* { dg-options "-mgp32 -mdsp -O2" } */
+/* { dg-options "-mgp32 -mdsp" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tlhx\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
index a37c42f1a9..42c4688cd0 100644
--- a/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
+++ b/gcc/testsuite/gcc.target/mips/dsp-no-lhx.c
@@ -1,6 +1,6 @@
/* Test MIPS32 DSP LHX instruction */
/* { dg-do compile } */
-/* { dg-options "-mgp32 -mdsp -O2" } */
+/* { dg-options "-mgp32 -mdsp" } */
/* { dg-final { scan-assembler-not "\tlhx\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/dspr2-MULT.c b/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
index c685974895..b668e0c6b5 100644
--- a/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
+++ b/gcc/testsuite/gcc.target/mips/dspr2-MULT.c
@@ -1,12 +1,14 @@
/* Test MIPS32 DSP REV 2 MULT instruction. Tune for a CPU that has
pipelined mult. */
/* { dg-do compile } */
-/* { dg-options "-mgp32 -mdspr2 -O2 -mtune=74kc" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp32 -mdspr2 -mtune=74kc -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* See PR target/51729 for the reason behind the XFAILs. */
/* { dg-final { scan-assembler "\tmult\t" } } */
-/* { dg-final { scan-assembler "ac1" { xfail *-*-* } } } */
-/* { dg-final { scan-assembler "ac2" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler "\\\$ac1" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler "\\\$ac2" { xfail *-*-* } } } */
typedef long long a64;
diff --git a/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c b/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
index 7f04315efe..886e4ca881 100644
--- a/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
+++ b/gcc/testsuite/gcc.target/mips/dspr2-MULTU.c
@@ -1,12 +1,13 @@
/* Test MIPS32 DSP REV 2 MULTU instruction. Tune for a CPU that has
pipelined multu. */
/* { dg-do compile } */
-/* { dg-options "-mgp32 -mdspr2 -O2 -mtune=74kc" } */
+/* { dg-options "-mgp32 -mdspr2 -mtune=74kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* See PR target/51729 for the reason behind the XFAILs. */
/* { dg-final { scan-assembler "\tmultu\t" } } */
-/* { dg-final { scan-assembler "ac1" { xfail *-*-* } } } */
-/* { dg-final { scan-assembler "ac2" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler "\\\$ac1" { xfail *-*-* } } } */
+/* { dg-final { scan-assembler "\\\$ac2" { xfail *-*-* } } } */
typedef unsigned long long a64;
diff --git a/gcc/testsuite/gcc.target/mips/ext-1.c b/gcc/testsuite/gcc.target/mips/ext-1.c
index 426cbb2857..177b5033b0 100644
--- a/gcc/testsuite/gcc.target/mips/ext-1.c
+++ b/gcc/testsuite/gcc.target/mips/ext-1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-options "isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdext\t" } } */
-/* { dg-final { scan-assembler-not "and" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
struct
{
diff --git a/gcc/testsuite/gcc.target/mips/ext-2.c b/gcc/testsuite/gcc.target/mips/ext-2.c
index d6ccce29e0..320d42d2f6 100644
--- a/gcc/testsuite/gcc.target/mips/ext-2.c
+++ b/gcc/testsuite/gcc.target/mips/ext-2.c
@@ -2,10 +2,11 @@
zero_extract. The truncate is due to TARGET_PROMOTE_PROTOTYPES, the
zero_extend to PROMOTE_MODE. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-options "isa_rev>=2 -mgp64 -mlong64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdext\t" } } */
-/* { dg-final { scan-assembler-not "and" } } */
-/* { dg-final { scan-assembler-not "srl" } } */
+/* { dg-final { scan-assembler-not "\tand" } } */
+/* { dg-final { scan-assembler-not "\td?srl" } } */
NOMIPS16 void
f (unsigned char x, unsigned char *r)
diff --git a/gcc/testsuite/gcc.target/mips/ext-3.c b/gcc/testsuite/gcc.target/mips/ext-3.c
index acdbbc9a41..66780551b8 100644
--- a/gcc/testsuite/gcc.target/mips/ext-3.c
+++ b/gcc/testsuite/gcc.target/mips/ext-3.c
@@ -1,8 +1,9 @@
/* For MIPS64r2 use DEXT rather than DSLL/DSRL to zero-extend. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-options "isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdext\t" } } */
-/* { dg-final { scan-assembler-not "sll" } } */
+/* { dg-final { scan-assembler-not "\td?sll" } } */
NOMIPS16 unsigned long long
f (unsigned *i)
diff --git a/gcc/testsuite/gcc.target/mips/ext-4.c b/gcc/testsuite/gcc.target/mips/ext-4.c
index f3d2ad92aa..16b848c358 100644
--- a/gcc/testsuite/gcc.target/mips/ext-4.c
+++ b/gcc/testsuite/gcc.target/mips/ext-4.c
@@ -1,8 +1,9 @@
/* For MIPS64r2 use DEXT rather than DSLL/DSRL for clear_upper32. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-options "isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdext\t" } } */
-/* { dg-final { scan-assembler-not "sll" } } */
+/* { dg-final { scan-assembler-not "\td?sll" } } */
NOMIPS16 unsigned long long
f (unsigned long long i)
diff --git a/gcc/testsuite/gcc.target/mips/ext-5.c b/gcc/testsuite/gcc.target/mips/ext-5.c
index 64186383cb..8bab2148f4 100644
--- a/gcc/testsuite/gcc.target/mips/ext-5.c
+++ b/gcc/testsuite/gcc.target/mips/ext-5.c
@@ -1,6 +1,7 @@
/* For MIPS32r2 use EXT when ANDing with low-order bitmasks. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2" } */
+/* { dg-options "isa_rev>=2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\text\t" } } */
/* { dg-final { scan-assembler-not "\tandi?\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/ext-6.c b/gcc/testsuite/gcc.target/mips/ext-6.c
index b4a7dd2515..e12cbe6e1c 100644
--- a/gcc/testsuite/gcc.target/mips/ext-6.c
+++ b/gcc/testsuite/gcc.target/mips/ext-6.c
@@ -1,6 +1,7 @@
/* For MIPS64r2 use DEXT when ANDing with low-order bitmasks. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp64" } */
+/* { dg-options "isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdext\t" } } */
/* { dg-final { scan-assembler-not "\tandi?\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/ext-7.c b/gcc/testsuite/gcc.target/mips/ext-7.c
index 394d41f06c..2e23dd6525 100644
--- a/gcc/testsuite/gcc.target/mips/ext-7.c
+++ b/gcc/testsuite/gcc.target/mips/ext-7.c
@@ -1,6 +1,7 @@
/* No need to use ext if we can use andi. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2" } */
+/* { dg-options "isa_rev>=2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tandi\t" } } */
/* { dg-final { scan-assembler-not "\td?ext\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/ext-8.c b/gcc/testsuite/gcc.target/mips/ext-8.c
index 90241dd2f1..9ceee7b9f7 100644
--- a/gcc/testsuite/gcc.target/mips/ext-8.c
+++ b/gcc/testsuite/gcc.target/mips/ext-8.c
@@ -1,6 +1,6 @@
/* Also make sure we don't use ext for MIPS*r1. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev<=1" } */
+/* { dg-options "isa_rev<=1" } */
/* { dg-final { scan-assembler "\tand\t" } } */
/* { dg-final { scan-assembler-not "\td?ext\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/ext_ins.c b/gcc/testsuite/gcc.target/mips/ext_ins.c
index 8186b84a27..36f0f3fd61 100644
--- a/gcc/testsuite/gcc.target/mips/ext_ins.c
+++ b/gcc/testsuite/gcc.target/mips/ext_ins.c
@@ -1,7 +1,7 @@
/* { dg-do compile } */
/* { dg-options "isa_rev>=2" } */
-/* { dg-final { scan-assembler "ext" } } */
-/* { dg-final { scan-assembler "ins" } } */
+/* { dg-final { scan-assembler "\td?ext\t" } } */
+/* { dg-final { scan-assembler "\td?ins\t" } } */
struct A
{
@@ -13,14 +13,13 @@ struct A
void func (struct A);
-unsigned int f1 (struct A a)
+NOMIPS16 unsigned int f1 (struct A a)
{
return a.j;
}
-void f2 (int i)
+NOMIPS16 struct A f2 (struct A a, int i)
{
- struct A c;
- c.j = i;
- func (c);
+ a.j = i;
+ return a;
}
diff --git a/gcc/testsuite/gcc.target/mips/extend-1.c b/gcc/testsuite/gcc.target/mips/extend-1.c
index 94d199f887..9240ea5588 100644
--- a/gcc/testsuite/gcc.target/mips/extend-1.c
+++ b/gcc/testsuite/gcc.target/mips/extend-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 forbid_cpu=octeon.*" } */
+/* { dg-options "-mgp64 forbid_cpu=octeon.*" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tdsll\t" 5 } } */
/* { dg-final { scan-assembler-times "\tdsra\t" 5 } } */
/* { dg-final { scan-assembler-not "\tsll\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/extend-2.c b/gcc/testsuite/gcc.target/mips/extend-2.c
index b91ae209c0..a2036a899e 100644
--- a/gcc/testsuite/gcc.target/mips/extend-2.c
+++ b/gcc/testsuite/gcc.target/mips/extend-2.c
@@ -1,6 +1,6 @@
/* Check the shift_shift alternative of the AND patterns. */
/* { dg-do compile } */
-/* { dg-options "-O isa_rev<=1 -mgp64" } */
+/* { dg-options "isa_rev<=1 -mgp64" } */
/* { dg-final { scan-assembler "\tdsrl\t" } } */
/* { dg-final { scan-assembler "\tdsll\t" } } */
/* { dg-final { scan-assembler-not "\td?ext\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fabs-2008.c b/gcc/testsuite/gcc.target/mips/fabs-2008.c
new file mode 100644
index 0000000000..211d561d47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fabs-2008.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=2008" } */
+
+NOMIPS16 double
+fabs_2008 (double d)
+{
+ return __builtin_fabs (d);
+}
+
+/* { dg-final { scan-assembler "\tabs\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fabs-legacy.c b/gcc/testsuite/gcc.target/mips/fabs-legacy.c
new file mode 100644
index 0000000000..dabc9d09c1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fabs-legacy.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=legacy" } */
+
+NOMIPS16 double
+fabs_legacy (double d)
+{
+ return __builtin_fabs (d);
+}
+
+/* { dg-final { scan-assembler-not "\tabs\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fabsf-2008.c b/gcc/testsuite/gcc.target/mips/fabsf-2008.c
new file mode 100644
index 0000000000..2b0363abc6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fabsf-2008.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=2008" } */
+
+NOMIPS16 float
+fabsf_2008 (float f)
+{
+ return __builtin_fabsf (f);
+}
+
+/* { dg-final { scan-assembler "\tabs\\.s\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fabsf-legacy.c b/gcc/testsuite/gcc.target/mips/fabsf-legacy.c
new file mode 100644
index 0000000000..7278f7d773
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fabsf-legacy.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=legacy" } */
+
+NOMIPS16 float
+fabsf_legacy (float f)
+{
+ return __builtin_fabsf (f);
+}
+
+/* { dg-final { scan-assembler-not "\tabs\\.s\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-1.c b/gcc/testsuite/gcc.target/mips/fix-r10000-1.c
index 76f3b86ec5..edf4d70c63 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-1.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-10.c b/gcc/testsuite/gcc.target/mips/fix-r10000-10.c
index 6ac908a71b..ab353b6b1e 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-10.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-10.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-11.c b/gcc/testsuite/gcc.target/mips/fix-r10000-11.c
index e1677b6577..30f6038b71 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-11.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-11.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-12.c b/gcc/testsuite/gcc.target/mips/fix-r10000-12.c
index f767ae2028..855000df2b 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-12.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-12.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
/* { dg-message "note: '__sync_nand_and_fetch' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-13.c b/gcc/testsuite/gcc.target/mips/fix-r10000-13.c
index b0779e0ec3..aa2d236f67 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-13.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-13.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-14.c b/gcc/testsuite/gcc.target/mips/fix-r10000-14.c
index 4a690f59ed..542e02f9cb 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-14.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-14.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-15.c b/gcc/testsuite/gcc.target/mips/fix-r10000-15.c
index bb5fd743af..f44a725ec6 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-15.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-15.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-2.c b/gcc/testsuite/gcc.target/mips/fix-r10000-2.c
index bac0191340..88a5918419 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-2.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-3.c b/gcc/testsuite/gcc.target/mips/fix-r10000-3.c
index bec7951c1d..fbeeca10f5 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-3.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-4.c b/gcc/testsuite/gcc.target/mips/fix-r10000-4.c
index 864ab8c1ee..344c6277b5 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-4.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-5.c b/gcc/testsuite/gcc.target/mips/fix-r10000-5.c
index 62fd70f5f0..a775a6c0e6 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-5.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-5.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-6.c b/gcc/testsuite/gcc.target/mips/fix-r10000-6.c
index d8bdb4516d..62f8fdfb4b 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-6.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-6.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
/* { dg-message "note: '__sync_fetch_and_nand' changed semantics in GCC 4.4" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-7.c b/gcc/testsuite/gcc.target/mips/fix-r10000-7.c
index d4b558e011..635326c5c5 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-7.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-8.c b/gcc/testsuite/gcc.target/mips/fix-r10000-8.c
index d48ed263c8..68978494d6 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-8.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-8.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r10000-9.c b/gcc/testsuite/gcc.target/mips/fix-r10000-9.c
index 88afad339c..3d140b1bc8 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r10000-9.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r10000-9.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mfix-r10000" } */
+/* { dg-options "-mfix-r10000" } */
/* { dg-final { scan-assembler-times "\tbeql\t" 3 } } */
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-1.c b/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
index 551d3549d8..5c812f2560 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -dp" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
typedef int int32_t;
typedef int uint32_t;
NOMIPS16 int32_t foo (int32_t x, int32_t y) { return x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-10.c b/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
index 8c938b7d21..7227bc8c09 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-10.c
@@ -1,7 +1,8 @@
/* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
result to $2, which prevents the register allocators from storing the
multiplication result in $2. */
-/* { dg-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips3 -mfix-r4000 -mgp64 -EL -fno-split-wide-types -dp" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
typedef unsigned long long uint64_t;
typedef unsigned int uint128_t __attribute__((mode(TI)));
NOMIPS16 uint128_t foo (uint64_t x, uint64_t y) { return (uint128_t) x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-11.c b/gcc/testsuite/gcc.target/mips/fix-r4000-11.c
index 7cfad3d2f7..1ea7a7c408 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-11.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-11.c
@@ -1,4 +1,6 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-skip-if "using DDIV gives a shorter sequence" { *-*-* } { "-Os" } { "" } } */
typedef long long int64_t;
NOMIPS16 int64_t foo (int64_t x) { return x / 11993; }
/* { dg-final { scan-assembler "[concat {\tdmult\t\$4,\$[0-9]+[^\n]+smuldi3_highpart[^\n]+\n\tmfhi\t\$[0-9]+\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-12.c b/gcc/testsuite/gcc.target/mips/fix-r4000-12.c
index d449283ddf..a2afabbc73 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-12.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-12.c
@@ -1,4 +1,6 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-skip-if "using DDIVU gives a shorter sequence" { *-*-* } { "-Os" } { "" } } */
typedef unsigned long long uint64_t;
NOMIPS16 uint64_t foo (uint64_t x) { return x / 11993; }
/* { dg-final { scan-assembler "[concat {\tdmultu\t\$4,\$[0-9]+[^\n]+umuldi3_highpart[^\n]+\n\tmfhi\t\$[0-9]+\n}]" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
index 6cb7d3594e..0261b16b1c 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-2.c
@@ -1,4 +1,6 @@
-/* { dg-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
+/* This test requires widening_mul */
+/* { dg-options "-mips1 -mfix-r4000 -dp -EB -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef int int32_t;
typedef long long int64_t;
NOMIPS16 int32_t foo (int32_t x, int32_t y) { return ((int64_t) x * y) >> 32; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
index bd12509d1b..195a9d10ce 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mips1 -mfix-r4000 -O2 -dp -EB" } */
+/* { dg-options "-mips1 -mfix-r4000 -dp -EB" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
NOMIPS16 uint32_t foo (uint32_t x, uint32_t y) { return ((uint64_t) x * y) >> 32; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-4.c b/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
index 3854db8967..7a66182f52 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-4.c
@@ -1,7 +1,9 @@
/* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
result to $2, which prevents the register allocators from storing the
multiplication result in $2. */
-/* { dg-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
+/* This test requires widening_mul */
+/* { dg-options "-mips1 -mfix-r4000 -fno-split-wide-types -dp -EL -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef int int32_t;
typedef long long int64_t;
NOMIPS16 int64_t foo (int32_t x, int32_t y) { return (int64_t) x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-5.c b/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
index c46300f62d..0c06308006 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-5.c
@@ -1,7 +1,8 @@
/* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
result to $2, which prevents the register allocators from storing the
multiplication result in $2. */
-/* { dg-options "-mips1 -mfix-r4000 -O2 -fno-split-wide-types -dp -EL" } */
+/* { dg-options "-mips1 -mfix-r4000 -fno-split-wide-types -dp -EL" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
NOMIPS16 uint64_t foo (uint32_t x, uint32_t y) { return (uint64_t) x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-6.c b/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
index 1e33cc4f76..9647a900cd 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -O2 -dp" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp" } */
+/* { dg-skip-if "naming registers makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
typedef long long int64_t;
typedef unsigned long long uint64_t;
NOMIPS16 int64_t foo (int64_t x, int64_t y) { return x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
index 118ba99dfe..ddba303835 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-7.c
@@ -1,4 +1,6 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef long long int64_t;
typedef int int128_t __attribute__((mode(TI)));
NOMIPS16 int64_t foo (int64_t x, int64_t y) { return ((int128_t) x * y) >> 64; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
index f2c71c1ef1..4ae670622b 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-8.c
@@ -1,4 +1,5 @@
-/* { dg-options "-march=r4000 -mfix-r4000 -O2 -mgp64 -dp -EB" } */
+/* { dg-options "-march=r4000 -mfix-r4000 -mgp64 -dp -EB" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef unsigned long long uint64_t;
typedef unsigned int uint128_t __attribute__((mode(TI)));
NOMIPS16 uint64_t foo (uint64_t x, uint64_t y) { return ((uint128_t) x * y) >> 64; }
diff --git a/gcc/testsuite/gcc.target/mips/fix-r4000-9.c b/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
index da9c11364d..316715c593 100644
--- a/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
+++ b/gcc/testsuite/gcc.target/mips/fix-r4000-9.c
@@ -1,7 +1,9 @@
/* ??? At the moment, lower-subreg.c decomposes the copy of the multiplication
result to $2, which prevents the register allocators from storing the
multiplication result in $2. */
-/* { dg-options "-mips3 -mfix-r4000 -mgp64 -O2 -fno-split-wide-types -dp -EL" } */
+/* This test requires widening_mul */
+/* { dg-options "-mips3 -mfix-r4000 -mgp64 -fno-split-wide-types -dp -EL -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
typedef long long int64_t;
typedef int int128_t __attribute__((mode(TI)));
NOMIPS16 int128_t foo (int64_t x, int64_t y) { return (int128_t) x * y; }
diff --git a/gcc/testsuite/gcc.target/mips/fixed-scalar-type.c b/gcc/testsuite/gcc.target/mips/fixed-scalar-type.c
index b4734f4d52..810c82c2f6 100644
--- a/gcc/testsuite/gcc.target/mips/fixed-scalar-type.c
+++ b/gcc/testsuite/gcc.target/mips/fixed-scalar-type.c
@@ -1,6 +1,7 @@
/* Test scalar fixed-point instructions */
/* { dg-do compile { target { fixed_point } } } */
-/* { dg-options "-mdspr2 -O2" } */
+/* { dg-options "-mdspr2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\taddu\t" 10 } } */
/* { dg-final { scan-assembler-times "\tsubu\t" 10 } } */
/* { dg-final { scan-assembler "\taddu_s.qb\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fixed-vector-type.c b/gcc/testsuite/gcc.target/mips/fixed-vector-type.c
index 9b67704794..ddd9660f1d 100644
--- a/gcc/testsuite/gcc.target/mips/fixed-vector-type.c
+++ b/gcc/testsuite/gcc.target/mips/fixed-vector-type.c
@@ -1,6 +1,7 @@
/* Test vector fixed-point instructions */
/* { dg-do compile { target { fixed_point } } } */
-/* { dg-options "-mdspr2 -O2" } */
+/* { dg-options "-mdspr2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\taddq_s.ph\t" 2 } } */
/* { dg-final { scan-assembler-times "\tsubq_s.ph\t" 2 } } */
/* { dg-final { scan-assembler-times "\taddu_s.qb\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/mips/fneg-2008.c b/gcc/testsuite/gcc.target/mips/fneg-2008.c
new file mode 100644
index 0000000000..899268af73
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fneg-2008.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=2008" } */
+
+NOMIPS16 double
+fneg_2008 (double d)
+{
+ return -d;
+}
+
+/* { dg-final { scan-assembler "\tneg\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fneg-legacy.c b/gcc/testsuite/gcc.target/mips/fneg-legacy.c
new file mode 100644
index 0000000000..38f810cf95
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fneg-legacy.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=legacy" } */
+
+NOMIPS16 double
+fneg_legacy (double d)
+{
+ return -d;
+}
+
+/* { dg-final { scan-assembler-not "\tneg\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fnegf-2008.c b/gcc/testsuite/gcc.target/mips/fnegf-2008.c
new file mode 100644
index 0000000000..a64a6e6937
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fnegf-2008.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=2008" } */
+
+NOMIPS16 float
+fnegf_2008 (float f)
+{
+ return -f;
+}
+
+/* { dg-final { scan-assembler "\tneg\\.s\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fnegf-legacy.c b/gcc/testsuite/gcc.target/mips/fnegf-legacy.c
new file mode 100644
index 0000000000..e628c2bd00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/fnegf-legacy.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mabs=legacy" } */
+
+NOMIPS16 float
+fnegf_legacy (float f)
+{
+ return -f;
+}
+
+/* { dg-final { scan-assembler-not "\tneg\\.s\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fpcmp-1.c b/gcc/testsuite/gcc.target/mips/fpcmp-1.c
index cae48a0e93..c0594ff356 100644
--- a/gcc/testsuite/gcc.target/mips/fpcmp-1.c
+++ b/gcc/testsuite/gcc.target/mips/fpcmp-1.c
@@ -1,6 +1,6 @@
/* We used to use c.lt.fmt instead of c.ule.fmt here. */
-/* { dg-options "-mhard-float -O2" } */
+/* { dg-options "-mhard-float" } */
NOMIPS16 int f1 (float x, float y) { return __builtin_isless (x, y); }
NOMIPS16 int f2 (double x, double y) { return __builtin_isless (x, y); }
-/* { dg-final { scan-assembler "c\\.ule\\.s" } } */
-/* { dg-final { scan-assembler "c\\.ule\\.d" } } */
+/* { dg-final { scan-assembler "\tc\\.ule\\.s\t" } } */
+/* { dg-final { scan-assembler "\tc\\.ule\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fpcmp-2.c b/gcc/testsuite/gcc.target/mips/fpcmp-2.c
index 3e1c259f89..23d5cb0c4c 100644
--- a/gcc/testsuite/gcc.target/mips/fpcmp-2.c
+++ b/gcc/testsuite/gcc.target/mips/fpcmp-2.c
@@ -1,6 +1,6 @@
/* We used to use c.le.fmt instead of c.ult.fmt here. */
-/* { dg-options "-mhard-float -O2" } */
+/* { dg-options "-mhard-float" } */
NOMIPS16 int f1 (float x, float y) { return __builtin_islessequal (x, y); }
NOMIPS16 int f2 (double x, double y) { return __builtin_islessequal (x, y); }
-/* { dg-final { scan-assembler "c\\.ult\\.s" } } */
-/* { dg-final { scan-assembler "c\\.ult\\.d" } } */
+/* { dg-final { scan-assembler "\tc\\.ult\\.s\t" } } */
+/* { dg-final { scan-assembler "\tc\\.ult\\.d\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-1.c b/gcc/testsuite/gcc.target/mips/fpr-moves-1.c
index 92977e04e3..51a5f17238 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-1.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=32 -mhard-float -mips1 -O2 -EL" } */
+/* { dg-options "-mabi=32 -mhard-float -mips1 -EL" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 void
foo (double d, double *x)
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-2.c b/gcc/testsuite/gcc.target/mips/fpr-moves-2.c
index 3f4f833ba5..ffe614fcbb 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-2.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=32 -mhard-float -mips1 -O2 -EB" } */
+/* { dg-options "-mabi=32 -mhard-float -mips1 -EB" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 void
foo (double d, double *x)
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-3.c b/gcc/testsuite/gcc.target/mips/fpr-moves-3.c
index 34784d01ce..80db0710c4 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-3.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=32 -mfp64 -O2 -EL" } */
+/* { dg-options "-mabi=32 -mfp64 -EL" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 double
foo (double d)
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-4.c b/gcc/testsuite/gcc.target/mips/fpr-moves-4.c
index 282cf761b3..d8f78586ce 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-4.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-4.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=32 -mfp64 -O2 -EB" } */
+/* { dg-options "-mabi=32 -mfp64 -EB" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 double
foo (double d)
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-5.c b/gcc/testsuite/gcc.target/mips/fpr-moves-5.c
index 8f685750f7..18d8880490 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-5.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-5.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=64 -mhard-float -O2 -EL" } */
+/* { dg-options "-mabi=64 -mhard-float -EL" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-require-effective-target mips_newabi_large_long_double } */
NOMIPS16 void
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-6.c b/gcc/testsuite/gcc.target/mips/fpr-moves-6.c
index f89a40a3bc..30a83ec66f 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-6.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-mabi=64 -mhard-float -O2 -EB" } */
+/* { dg-options "-mabi=64 -mhard-float -EB" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-require-effective-target mips_newabi_large_long_double } */
NOMIPS16 void
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-7.c b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c
index 3abd10417d..56d7ccd637 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-7.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-7.c
@@ -1,4 +1,4 @@
-/* { dg-options "(-mips16) -mabi=64 -O2 -EL" } */
+/* { dg-options "(-mips16) -mabi=64 -EL" } */
extern long double g[16];
extern unsigned char gstuff[0x10000];
diff --git a/gcc/testsuite/gcc.target/mips/fpr-moves-8.c b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c
index 8b6901b7fc..bf64193b87 100644
--- a/gcc/testsuite/gcc.target/mips/fpr-moves-8.c
+++ b/gcc/testsuite/gcc.target/mips/fpr-moves-8.c
@@ -1,4 +1,4 @@
-/* { dg-options "(-mips16) -mabi=64 -O2 -EB" } */
+/* { dg-options "(-mips16) -mabi=64 -EB" } */
extern long double g[16];
extern unsigned char gstuff[0x10000];
diff --git a/gcc/testsuite/gcc.target/mips/get-fcsr-1.c b/gcc/testsuite/gcc.target/mips/get-fcsr-1.c
new file mode 100644
index 0000000000..46379b2575
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/get-fcsr-1.c
@@ -0,0 +1,9 @@
+/* { dg-options "-mhard-float" } */
+
+NOMIPS16 unsigned int
+foo (void)
+{
+ return __builtin_mips_get_fcsr ();
+}
+
+/* { dg-final { scan-assembler "cfc1\t\\\$2,\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/get-fcsr-2.c b/gcc/testsuite/gcc.target/mips/get-fcsr-2.c
new file mode 100644
index 0000000000..29a97d3091
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/get-fcsr-2.c
@@ -0,0 +1,10 @@
+/* { dg-options "-mhard-float (-mips16)" } */
+
+MIPS16 unsigned int
+foo (void)
+{
+ return __builtin_mips_get_fcsr ();
+}
+
+/* { dg-final { scan-assembler "__mips16_get_fcsr" } } */
+/* { dg-final { scan-assembler "cfc1\t\\\$2,\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/ins-1.c b/gcc/testsuite/gcc.target/mips/ins-1.c
index 9e19354d1a..02bb8ae9e2 100644
--- a/gcc/testsuite/gcc.target/mips/ins-1.c
+++ b/gcc/testsuite/gcc.target/mips/ins-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O isa_rev>=2 -mgp32" } */
+/* { dg-options "isa_rev>=2 -mgp32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tins\t" } } */
struct
diff --git a/gcc/testsuite/gcc.target/mips/ins-2.c b/gcc/testsuite/gcc.target/mips/ins-2.c
index a71e6c0532..916bc4b5e2 100644
--- a/gcc/testsuite/gcc.target/mips/ins-2.c
+++ b/gcc/testsuite/gcc.target/mips/ins-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -meb isa_rev>=2 -mgp64" } */
+/* { dg-options "-meb isa_rev>=2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tins\t|\tdins\t" 1 } } */
/* { dg-final { scan-assembler-times "\tsll\t|\tins\t" 1 } } */
diff --git a/gcc/testsuite/gcc.target/mips/int-moves-1.c b/gcc/testsuite/gcc.target/mips/int-moves-1.c
index 485555c39f..77a554d21a 100644
--- a/gcc/testsuite/gcc.target/mips/int-moves-1.c
+++ b/gcc/testsuite/gcc.target/mips/int-moves-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "(-mips16) -mgp64 -O2 -EL" } */
+/* { dg-options "(-mips16) -mgp64 -EL" } */
typedef unsigned uint128_t __attribute__((mode(TI)));
diff --git a/gcc/testsuite/gcc.target/mips/int-moves-2.c b/gcc/testsuite/gcc.target/mips/int-moves-2.c
index eba7983707..930c36f9f8 100644
--- a/gcc/testsuite/gcc.target/mips/int-moves-2.c
+++ b/gcc/testsuite/gcc.target/mips/int-moves-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "(-mips16) -mgp64 -O2 -EB" } */
+/* { dg-options "(-mips16) -mgp64 -EB" } */
typedef unsigned uint128_t __attribute__((mode(TI)));
diff --git a/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp b/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp
index e6ed6b9bcb..cfa64b1929 100644
--- a/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp
+++ b/gcc/testsuite/gcc.target/mips/inter/mips16-inter.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.target/mips/interrupt_handler-2.c b/gcc/testsuite/gcc.target/mips/interrupt_handler-2.c
index 0ab2dc3348..9ab32bf5a0 100644
--- a/gcc/testsuite/gcc.target/mips/interrupt_handler-2.c
+++ b/gcc/testsuite/gcc.target/mips/interrupt_handler-2.c
@@ -1,10 +1,10 @@
/* Make sure that we emit .cfa_restore notes for LO and HI. */
-/* { dg-options "-mips32r2 -msoft-float -O -g" } */
+/* { dg-options "-mips32r2 -msoft-float -g" } */
+/* { dg-skip-if "forbidding a frame pointer makes this a code quallity test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\t\\\.cfi_restore 64\n" } } */
/* { dg-final { scan-assembler "\t\\\.cfi_restore 65\n" } } */
/* { dg-final { scan-assembler-not "\\\.cfi_def_cfa( |\t)" } } */
/* { dg-final { scan-assembler-not "\\\.cfi_def_cfa_register( |\t)" } } */
-/* { dg-skip-if "PR target/50580" { mips-sgi-irix6* } } */
extern void f (void);
diff --git a/gcc/testsuite/gcc.target/mips/interrupt_handler-3.c b/gcc/testsuite/gcc.target/mips/interrupt_handler-3.c
index 3fd49a322f..298e046777 100644
--- a/gcc/testsuite/gcc.target/mips/interrupt_handler-3.c
+++ b/gcc/testsuite/gcc.target/mips/interrupt_handler-3.c
@@ -1,5 +1,6 @@
/* Make sure that we emit .cfa_restore notes for LO, HI and GPRs. */
-/* { dg-options "-mips32r2 -msoft-float -O -g" } */
+/* { dg-options "-mips32r2 -msoft-float -g" } */
+/* { dg-skip-if "forbidding a frame pointer makes this a code quallity test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\t\\\.cfi_restore 1\n" } } */
/* { dg-final { scan-assembler "\t\\\.cfi_restore 2\n" } } */
/* { dg-final { scan-assembler "\t\\\.cfi_restore 3\n" } } */
@@ -23,7 +24,6 @@
/* { dg-final { scan-assembler "\t\\\.cfi_def_cfa_offset 0\n" } } */
/* { dg-final { scan-assembler-not "\\\.cfi_def_cfa( |\t)" } } */
/* { dg-final { scan-assembler-not "\\\.cfi_def_cfa_register( |\t)" } } */
-/* { dg-skip-if "PR target/50580" { mips-sgi-irix6* } } */
extern void f (void);
diff --git a/gcc/testsuite/gcc.target/mips/lazy-binding-1.c b/gcc/testsuite/gcc.target/mips/lazy-binding-1.c
index e281a270a6..a30594840d 100644
--- a/gcc/testsuite/gcc.target/mips/lazy-binding-1.c
+++ b/gcc/testsuite/gcc.target/mips/lazy-binding-1.c
@@ -1,5 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-mshared -mexplicit-relocs -O2 -fno-delayed-branch" } */
+/* { dg-options "-mshared -mexplicit-relocs -fno-delayed-branch -fno-unroll-loops" } */
+/* We can load into something other than $25 when not optimizing,
+ then immediately move into $25. */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
void bar (void);
@@ -16,6 +19,6 @@ foo (int n)
/* There should be exactly five uses of $25: one to set up $gp, two to
load the address of bar (), and two to call it. */
/* { dg-final { scan-assembler-times "\tl.\t\\\$25,%call16\\\(bar\\\)" 2 } } */
-/* { dg-final { scan-assembler-times "\tjalr\t\\\$25" 2 } } */
+/* { dg-final { scan-assembler-times "\tjalrs?\t\\\$25" 2 } } */
/* { dg-final { scan-assembler "(\\\$28,|\t.cpload\t)\\\$25" } } */
/* { dg-final { scan-assembler-times "\\\$25" 5 } } */
diff --git a/gcc/testsuite/gcc.target/mips/long-calls-pg.c b/gcc/testsuite/gcc.target/mips/long-calls-pg.c
index 5e554c497d..5ccfe5149b 100644
--- a/gcc/testsuite/gcc.target/mips/long-calls-pg.c
+++ b/gcc/testsuite/gcc.target/mips/long-calls-pg.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mabi=32 -pg -mno-abicalls -mlong-calls" } */
+/* { dg-options "-mabi=32 -pg -mno-abicalls -mlong-calls" } */
/* { dg-final { scan-assembler-not "\tjal\t_mcount" } } */
NOMIPS16 void
foo (void)
diff --git a/gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c b/gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c
index fd7289ceaf..2efc3ef3f3 100644
--- a/gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c
+++ b/gcc/testsuite/gcc.target/mips/loongson-muldiv-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 isa=loongson" } */
+/* { dg-options "isa=loongson" } */
typedef int st;
typedef unsigned int ut;
diff --git a/gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c b/gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c
index 6f1f138755..07523aa4a4 100644
--- a/gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c
+++ b/gcc/testsuite/gcc.target/mips/loongson-muldiv-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 isa=loongson -mgp64" } */
+/* { dg-options "isa=loongson -mgp64" } */
typedef long long st;
typedef unsigned long long ut;
diff --git a/gcc/testsuite/gcc.target/mips/loongson-shift-count-truncated-1.c b/gcc/testsuite/gcc.target/mips/loongson-shift-count-truncated-1.c
index 1c892d8062..778d739813 100644
--- a/gcc/testsuite/gcc.target/mips/loongson-shift-count-truncated-1.c
+++ b/gcc/testsuite/gcc.target/mips/loongson-shift-count-truncated-1.c
@@ -4,9 +4,9 @@
/* loongson.h does not handle or check for MIPS16ness. There doesn't
seem any good reason for it to, given that the Loongson processors
do not support MIPS16. */
-/* { dg-options "isa=loongson -mhard-float -mno-mips16 -O1" } */
+/* { dg-options "isa=loongson -mhard-float -mno-mips16" } */
/* See PR 52155. */
-/* { dg-options "isa=loongson -mhard-float -mno-mips16 -O1 -mlong64" { mips*-*-elf* && ilp32 } } */
+/* { dg-options "isa=loongson -mhard-float -mno-mips16 -mlong64" { mips*-*-elf* && ilp32 } } */
#include "loongson.h"
#include <assert.h>
diff --git a/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-1.c b/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-1.c
index cc15b83ab9..1c4d010b35 100644
--- a/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-1.c
+++ b/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -march=loongson3a" } */
+/* { dg-options "-march=loongson3a" } */
typedef int st;
typedef unsigned int ut;
diff --git a/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-2.c b/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-2.c
index 592b492c30..9695b3f625 100644
--- a/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-2.c
+++ b/gcc/testsuite/gcc.target/mips/loongson3a-muldiv-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -march=loongson3a -mgp64" } */
+/* { dg-options "-march=loongson3a -mgp64" } */
typedef long long st;
typedef unsigned long long ut;
diff --git a/gcc/testsuite/gcc.target/mips/madd-1.c b/gcc/testsuite/gcc.target/mips/madd-1.c
index 53881a4b08..416673b46d 100644
--- a/gcc/testsuite/gcc.target/mips/madd-1.c
+++ b/gcc/testsuite/gcc.target/mips/madd-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr4130 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr4130 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmacc\t\\\$1," 3 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/madd-2.c b/gcc/testsuite/gcc.target/mips/madd-2.c
index eab7a68454..ce0d9eb6fa 100644
--- a/gcc/testsuite/gcc.target/mips/madd-2.c
+++ b/gcc/testsuite/gcc.target/mips/madd-2.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5500 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5500 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmadd\t" 3 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/madd-3.c b/gcc/testsuite/gcc.target/mips/madd-3.c
index 6b479f59c7..29f4c9b376 100644
--- a/gcc/testsuite/gcc.target/mips/madd-3.c
+++ b/gcc/testsuite/gcc.target/mips/madd-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
+/* { dg-options "isa_rev>=1 -mgp32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmadd\t" 3 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/madd-4.c b/gcc/testsuite/gcc.target/mips/madd-4.c
index f325af7469..28c751b40f 100644
--- a/gcc/testsuite/gcc.target/mips/madd-4.c
+++ b/gcc/testsuite/gcc.target/mips/madd-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mdspr2 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-mdspr2 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmadd\t\\\$ac" 3 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/madd-5.c b/gcc/testsuite/gcc.target/mips/madd-5.c
index 1ad1c91f3e..d1696a6a86 100644
--- a/gcc/testsuite/gcc.target/mips/madd-5.c
+++ b/gcc/testsuite/gcc.target/mips/madd-5.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmadd\t" 4 } } */
/* { dg-final { scan-assembler-not "\tmtlo\t" } } */
/* { dg-final { scan-assembler-times "\tmflo\t" 3 } } */
diff --git a/gcc/testsuite/gcc.target/mips/madd-6.c b/gcc/testsuite/gcc.target/mips/madd-6.c
index 4e5afadceb..9323b8e104 100644
--- a/gcc/testsuite/gcc.target/mips/madd-6.c
+++ b/gcc/testsuite/gcc.target/mips/madd-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tmadd\t" } } */
/* { dg-final { scan-assembler "\tmul\t" } } */
/* { dg-final { scan-assembler "\taddu\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/madd-7.c b/gcc/testsuite/gcc.target/mips/madd-7.c
index b43d720742..a639aa4f8f 100644
--- a/gcc/testsuite/gcc.target/mips/madd-7.c
+++ b/gcc/testsuite/gcc.target/mips/madd-7.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-skip-if "requires -fira-region=all or =mixed" { *-*-* } { "-Os" } { "" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
/* { dg-final { scan-assembler "\tmadd\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/madd-8.c b/gcc/testsuite/gcc.target/mips/madd-8.c
index 35092a8ad9..794a6ff172 100644
--- a/gcc/testsuite/gcc.target/mips/madd-8.c
+++ b/gcc/testsuite/gcc.target/mips/madd-8.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmul\t" } } */
/* { dg-final { scan-assembler-not "\tmadd\t" } } */
/* { dg-final { scan-assembler-not "\tmtlo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/madd-9.c b/gcc/testsuite/gcc.target/mips/madd-9.c
index 25dbd18a51..28681a9100 100644
--- a/gcc/testsuite/gcc.target/mips/madd-9.c
+++ b/gcc/testsuite/gcc.target/mips/madd-9.c
@@ -1,6 +1,13 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
+/* { dg-options "isa_rev>=1 -mgp32 -mtune=4kc" } */
+/* References to X within the loop need to have a higher frequency than
+ references to X outside the loop, otherwise there is no reason
+ to prefer multiply/accumulator registers over GPRs. */
+/* { dg-skip-if "requires register frequencies" { *-*-* } { "-O0" "-Os" } { "" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
+/* { dg-final { scan-assembler-not "\tmthi" } } */
+/* { dg-final { scan-assembler-not "\tmtlo" } } */
+/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler "\tmadd\t" } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/maddu-1.c b/gcc/testsuite/gcc.target/mips/maddu-1.c
index 04161ce3a2..af2b4181cd 100644
--- a/gcc/testsuite/gcc.target/mips/maddu-1.c
+++ b/gcc/testsuite/gcc.target/mips/maddu-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr4130 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr4130 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmaccu\t\\\$1," 3 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/maddu-2.c b/gcc/testsuite/gcc.target/mips/maddu-2.c
index a9768f15bf..ea091e4e1c 100644
--- a/gcc/testsuite/gcc.target/mips/maddu-2.c
+++ b/gcc/testsuite/gcc.target/mips/maddu-2.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5500 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5500 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmaddu\t" 3 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/maddu-3.c b/gcc/testsuite/gcc.target/mips/maddu-3.c
index b0b4817a47..27a7350f07 100644
--- a/gcc/testsuite/gcc.target/mips/maddu-3.c
+++ b/gcc/testsuite/gcc.target/mips/maddu-3.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "isa_rev>=1 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmaddu\t" 3 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/maddu-4.c b/gcc/testsuite/gcc.target/mips/maddu-4.c
index 9c1ccd5f92..58c4a7ebe0 100644
--- a/gcc/testsuite/gcc.target/mips/maddu-4.c
+++ b/gcc/testsuite/gcc.target/mips/maddu-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mdspr2 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-mdspr2 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmaddu\t\\\$ac" 3 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/memcpy-1.c b/gcc/testsuite/gcc.target/mips/memcpy-1.c
index f3eda7500d..94786a7371 100644
--- a/gcc/testsuite/gcc.target/mips/memcpy-1.c
+++ b/gcc/testsuite/gcc.target/mips/memcpy-1.c
@@ -1,5 +1,5 @@
-/* { dg-do compile } */
-/* { dg-options "-O2" } */
+/* { dg-options "-fno-common" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tlbu\t" } } */
#include <string.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-1.c b/gcc/testsuite/gcc.target/mips/mips-3d-1.c
index eb3f8f9a86..f11ffc5a80 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-1.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-2.c b/gcc/testsuite/gcc.target/mips/mips-3d-2.c
index dc815748eb..b04c3bfb5d 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-2.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-2.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D branch-if-any-two builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-3.c b/gcc/testsuite/gcc.target/mips/mips-3d-3.c
index 7df590f5c3..e4de8fb19b 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-3.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D absolute compare builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-4.c b/gcc/testsuite/gcc.target/mips/mips-3d-4.c
index 7f9cbdb1b8..3d28d7f2c6 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-4.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-4.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D branch-if-any-four builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-5.c b/gcc/testsuite/gcc.target/mips/mips-3d-5.c
index c07dbe5058..a433675cab 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-5.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-5.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D absolute-compare & branch-if-any-four builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-6.c b/gcc/testsuite/gcc.target/mips/mips-3d-6.c
index 848414540f..e6b44f0758 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-6.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-6.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D absolute compare (floats) builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-7.c b/gcc/testsuite/gcc.target/mips/mips-3d-7.c
index d5d09f9986..2531ddf8b1 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-7.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-7.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D absolute compare (doubles) builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-8.c b/gcc/testsuite/gcc.target/mips/mips-3d-8.c
index c80f2b9c89..1d199d7d0c 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-8.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-8.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Test MIPS-3D absolute compare and conditional move builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-3d-9.c b/gcc/testsuite/gcc.target/mips/mips-3d-9.c
index 3875391b53..d697efdedf 100644
--- a/gcc/testsuite/gcc.target/mips/mips-3d-9.c
+++ b/gcc/testsuite/gcc.target/mips/mips-3d-9.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mips3d" } */
+/* { dg-options "-mips3d" } */
/* Matrix Multiplications */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-nonpic/README b/gcc/testsuite/gcc.target/mips/mips-nonpic/README
index 1b42becbed..b7a46e4b00 100644
--- a/gcc/testsuite/gcc.target/mips/mips-nonpic/README
+++ b/gcc/testsuite/gcc.target/mips/mips-nonpic/README
@@ -20,7 +20,7 @@ main-15.c address and call address taken only Neither (* But creating a PLT entr
main-16.c address and call address and call PLT entry
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2008-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp b/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp
index 47443acda5..d99b3d183e 100644
--- a/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp
+++ b/gcc/testsuite/gcc.target/mips/mips-nonpic/mips-nonpic.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-1.c b/gcc/testsuite/gcc.target/mips/mips-ps-1.c
index 9e6c660061..73598a840b 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-1.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-1.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mpaired-single" } */
+/* { dg-options "-mpaired-single" } */
/* Test v2sf calculations */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-2.c b/gcc/testsuite/gcc.target/mips/mips-ps-2.c
index baec12c1ce..5264255866 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-2.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-2.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mpaired-single" } */
+/* { dg-options "-mpaired-single" } */
/* Test MIPS paired-single builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-3.c b/gcc/testsuite/gcc.target/mips/mips-ps-3.c
index e9ed4c03f5..7e6ffd0667 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-3.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-3.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mpaired-single" } */
+/* { dg-options "-mpaired-single" } */
/* Test MIPS paired-single conditional move */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-4.c b/gcc/testsuite/gcc.target/mips/mips-ps-4.c
index b4452d0910..06850adb30 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-4.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-4.c
@@ -1,5 +1,5 @@
/* { dg-do run } */
-/* { dg-options "-O2 -mpaired-single" } */
+/* { dg-options "-mpaired-single" } */
/* Test MIPS paired-single comparisons */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-5.c b/gcc/testsuite/gcc.target/mips/mips-ps-5.c
index 94d2f80efc..077076f473 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-5.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-5.c
@@ -1,7 +1,10 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mpaired-single -mgp64 -ftree-vectorize" } */
+/* { dg-options "-mpaired-single -mgp64 -ftree-vectorize" } */
+/* { dg-skip-if "requires vectorization" { *-*-* } { "-O0" "-Os" } { "" } } */
-extern float a[], b[], c[];
+extern float a[] __attribute__ ((aligned (8)));
+extern float b[] __attribute__ ((aligned (8)));
+extern float c[] __attribute__ ((aligned (8)));
NOMIPS16 void
foo (void)
@@ -11,6 +14,6 @@ foo (void)
a[i] = b[i] == c[i] + 1 ? b[i] : c[i];
}
-/* { dg-final { scan-assembler "add\\.ps" } } */
-/* { dg-final { scan-assembler "c\\.eq\\.ps" } } */
-/* { dg-final { scan-assembler "mov\[tf\]\\.ps" } } */
+/* { dg-final { scan-assembler "\tadd\\.ps\t" } } */
+/* { dg-final { scan-assembler "\tc\\.eq\\.ps\t" } } */
+/* { dg-final { scan-assembler "\tmov\[tf\]\\.ps\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-6.c b/gcc/testsuite/gcc.target/mips/mips-ps-6.c
index 5b8b252286..5bdfe436f4 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-6.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-6.c
@@ -1,7 +1,7 @@
/* mips-ps-2.c with an extra -ffinite-math-only option. This option
changes the way that abs.ps is handled. */
/* { dg-do run } */
-/* { dg-options "-O2 -mpaired-single -ffinite-math-only" } */
+/* { dg-options "-mpaired-single -ffinite-math-only" } */
/* Test MIPS paired-single builtin functions */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-7.c b/gcc/testsuite/gcc.target/mips/mips-ps-7.c
index 65a1104ba3..3b4e530859 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-7.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-7.c
@@ -1,8 +1,11 @@
/* mips-ps-5.c with -mgp32 instead of -mgp64. */
/* { dg-do compile } */
-/* { dg-options "-mgp32 -O2 -mpaired-single -ftree-vectorize" } */
+/* { dg-options "-mgp32 -mpaired-single -ftree-vectorize" } */
+/* { dg-skip-if "requires vectorization" { *-*-* } { "-O0" "-Os" } { "" } } */
-extern float a[], b[], c[];
+extern float a[] __attribute__ ((aligned (8)));
+extern float b[] __attribute__ ((aligned (8)));
+extern float c[] __attribute__ ((aligned (8)));
NOMIPS16 void
foo (void)
@@ -12,6 +15,6 @@ foo (void)
a[i] = b[i] == c[i] + 1 ? b[i] : c[i];
}
-/* { dg-final { scan-assembler "add\\.ps" } } */
-/* { dg-final { scan-assembler "c\\.eq\\.ps" } } */
-/* { dg-final { scan-assembler "mov\[tf\]\\.ps" } } */
+/* { dg-final { scan-assembler "\tadd\\.ps\t" } } */
+/* { dg-final { scan-assembler "\tc\\.eq\\.ps\t" } } */
+/* { dg-final { scan-assembler "\tmov\[tf\]\\.ps\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c
index f798855339..f52cf91e81 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-type-2.c
@@ -1,21 +1,22 @@
/* Test v2sf calculations. The nmadd and nmsub patterns need
-ffinite-math-only. */
/* { dg-do compile } */
-/* { dg-options "isa_rev>=2 -mgp32 -O2 -mpaired-single -ffinite-math-only" } */
-/* { dg-final { scan-assembler "cvt.ps.s" } } */
-/* { dg-final { scan-assembler "mov.ps" } } */
-/* { dg-final { scan-assembler "ldc1" } } */
-/* { dg-final { scan-assembler "sdc1" } } */
-/* { dg-final { scan-assembler "add.ps" } } */
-/* { dg-final { scan-assembler "sub.ps" } } */
-/* { dg-final { scan-assembler "neg.ps" } } */
-/* { dg-final { scan-assembler "mul.ps" } } */
-/* { dg-final { scan-assembler "madd.ps" } } */
-/* { dg-final { scan-assembler "msub.ps" } } */
-/* { dg-final { scan-assembler "nmadd.ps" } } */
-/* { dg-final { scan-assembler "nmsub.ps" } } */
-/* { dg-final { scan-assembler "movn.ps" } } */
-/* { dg-final { scan-assembler "movz.ps" } } */
+/* { dg-options "isa_rev>=2 -mgp32 -mpaired-single -ffinite-math-only" } */
+/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tcvt.ps.s\t" } } */
+/* { dg-final { scan-assembler "\tmov.ps\t" } } */
+/* { dg-final { scan-assembler "\tldc1\t" } } */
+/* { dg-final { scan-assembler "\tsdc1\t" } } */
+/* { dg-final { scan-assembler "\tadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tneg.ps\t" } } */
+/* { dg-final { scan-assembler "\tmul.ps\t" } } */
+/* { dg-final { scan-assembler "\tmadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tmsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tnmadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tmovn.ps\t" } } */
+/* { dg-final { scan-assembler "\tmovz.ps\t" } } */
typedef float v2sf __attribute__ ((vector_size(8)));
void gobble (v2sf);
diff --git a/gcc/testsuite/gcc.target/mips/mips-ps-type.c b/gcc/testsuite/gcc.target/mips/mips-ps-type.c
index 2a10f91bd5..c36dc25c9d 100644
--- a/gcc/testsuite/gcc.target/mips/mips-ps-type.c
+++ b/gcc/testsuite/gcc.target/mips/mips-ps-type.c
@@ -1,20 +1,21 @@
/* Test v2sf calculations. The nmadd and nmsub patterns need
-ffinite-math-only. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mpaired-single -mgp64 -ffinite-math-only" } */
-/* { dg-final { scan-assembler "cvt.ps.s" } } */
-/* { dg-final { scan-assembler "mov.ps" } } */
-/* { dg-final { scan-assembler "ldc1" } } */
-/* { dg-final { scan-assembler "sdc1" } } */
-/* { dg-final { scan-assembler "add.ps" } } */
-/* { dg-final { scan-assembler "sub.ps" } } */
-/* { dg-final { scan-assembler "neg.ps" } } */
-/* { dg-final { scan-assembler "mul.ps" } } */
-/* { dg-final { scan-assembler "madd.ps" } } */
-/* { dg-final { scan-assembler "msub.ps" } } */
-/* { dg-final { scan-assembler "nmadd.ps" } } */
-/* { dg-final { scan-assembler "nmsub.ps" } } */
-/* { dg-final { scan-assembler "mov(n|z).ps" } } */
+/* { dg-options "-mpaired-single -mgp64 -ffinite-math-only" } */
+/* { dg-skip-if "nmadd and nmsub need combine" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tcvt.ps.s\t" } } */
+/* { dg-final { scan-assembler "\tmov.ps\t" } } */
+/* { dg-final { scan-assembler "\tldc1\t" } } */
+/* { dg-final { scan-assembler "\tsdc1\t" } } */
+/* { dg-final { scan-assembler "\tadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tneg.ps\t" } } */
+/* { dg-final { scan-assembler "\tmul.ps\t" } } */
+/* { dg-final { scan-assembler "\tmadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tmsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tnmadd.ps\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.ps\t" } } */
+/* { dg-final { scan-assembler "\tmov(n|z).ps\t" } } */
typedef float v2sf __attribute__ ((vector_size(8)));
diff --git a/gcc/testsuite/gcc.target/mips/mips-sched-madd.c b/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
index c0f9d332a5..1db1550fd4 100644
--- a/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
+++ b/gcc/testsuite/gcc.target/mips/mips-sched-madd.c
@@ -1,7 +1,8 @@
/* Test for case where another independent multiply insn may interfere
with a macc chain. */
/* { dg-do compile } */
-/* { dg-options "-Os -march=24kf" } */
+/* { dg-options "-march=24kf" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int foo (int a, int b, int c, int d, int e, int f, int g)
{
diff --git a/gcc/testsuite/gcc.target/mips/mips.exp b/gcc/testsuite/gcc.target/mips/mips.exp
index 1be2f1e372..8c72cff722 100644
--- a/gcc/testsuite/gcc.target/mips/mips.exp
+++ b/gcc/testsuite/gcc.target/mips/mips.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -222,6 +222,10 @@ load_lib gcc-dg.exp
# A list of GROUP REGEXP pairs. Each GROUP represents a logical group of
# options from which only one option should be chosen. REGEXP matches all
# the options in that group; it is implicitly wrapped in "^(...)$".
+#
+# Note that -O* is deliberately omitted from this list. Tests in this
+# directory are run at various optimisation levels and should use
+# dg-skip-if to skip any incompatible levels.
set mips_option_groups {
abi "-mabi=.*"
addressing "addressing=.*"
@@ -234,9 +238,9 @@ set mips_option_groups {
fp "-mfp(32|64)"
gp "-mgp(32|64)"
long "-mlong(32|64)"
+ micromips "-mmicromips|-mno-micromips"
mips16 "-mips16|-mno-mips16|-mflip-mips16"
mips3d "-mips3d|-mno-mips3d"
- optimization "-O(|[0-3s])"
pic "-f(no-|)(pic|PIC)"
profiling "-pg"
small-data "-G[0-9]+"
@@ -272,8 +276,10 @@ foreach option {
# Add -mfoo= options to mips_option_groups.
foreach option {
+ abs
branch-cost
code-readable
+ nan
r10k-cache-barrier
tune
} {
@@ -282,14 +288,23 @@ foreach option {
# Add -ffoo/-fno-foo options to mips_option_groups.
foreach option {
+ common
delayed-branch
+ expensive-optimizations
fast-math
+ fat-lto-objects
finite-math-only
fixed-hi
fixed-lo
lax-vector-conversions
+ omit-frame-pointer
+ optimize-sibling-calls
+ peephole2
+ schedule-insns2
split-wide-types
tree-vectorize
+ unroll-all-loops
+ unroll-loops
} {
lappend mips_option_groups $option "-f(no-|)$option"
}
@@ -692,6 +707,18 @@ proc mips-dg-init {} {
"-msoft-float",
#endif
+ #ifdef __mips_abs2008
+ "-mabs=2008",
+ #else
+ "-mabs=legacy",
+ #endif
+
+ #ifdef __mips_nan2008
+ "-mnan=2008",
+ #else
+ "-mnan=legacy",
+ #endif
+
#if __mips_fpr == 64
"-mfp64",
#else
@@ -756,6 +783,12 @@ proc mips-dg-init {} {
"-mno-smartmips",
#endif
+ #ifdef __mips_synci
+ "-msynci",
+ #else
+ "-mno-synci",
+ #endif
+
0
};
}]
@@ -799,12 +832,16 @@ proc mips-dg-finish {} {
# | |
# -mips16/-mflip-mips16 -mno-mips16
# | |
+# -micromips -mno-micromips
+# | |
# -mips3d -mno-mips3d
# | |
# -mpaired-single -mno-paired-single
# | |
# -mfp64 -mfp32
# | |
+# -mabs=2008/-mabs=legacy <no option>
+# | |
# -mhard-float -msoft-float
# | |
# -mno-sym32 -msym32
@@ -839,6 +876,8 @@ proc mips-dg-finish {} {
# | |
# -mdsp -mno-dsp
# | |
+# -msynci -mno-synci
+# | |
# +-- gp, abi & arch ---------+
#
# For these purposes, the "gp", "abi" & "arch" option groups are treated
@@ -879,11 +918,19 @@ proc mips-dg-options { args } {
}
}
+ # Handle dependencies between the test options and the optimization ones.
+ mips_option_dependency options "-fno-unroll-loops" "-fno-unroll-all-loops"
+ mips_option_dependency options "-pg" "-fno-omit-frame-pointer"
+
# Handle dependencies between options on the left of the
# dependency diagram.
+ mips_option_dependency options "-mips16" "-mno-micromips"
+ mips_option_dependency options "-mmicromips" "-mno-mips16"
mips_option_dependency options "-mips3d" "-mpaired-single"
mips_option_dependency options "-mpaired-single" "-mfp64"
mips_option_dependency options "-mfp64" "-mhard-float"
+ mips_option_dependency options "-mabs=2008" "-mhard-float"
+ mips_option_dependency options "-mabs=legacy" "-mhard-float"
mips_option_dependency options "-mrelax-pic-calls" "-mno-plt"
mips_option_dependency options "-mrelax-pic-calls" "-mabicalls"
mips_option_dependency options "-mrelax-pic-calls" "-mexplicit-relocs"
@@ -987,6 +1034,7 @@ proc mips-dg-options { args } {
# - the DSP ASE
if { $isa_rev < 2
&& (($gp_size == 32 && [mips_have_test_option_p options "-mfp64"])
+ || [mips_have_test_option_p options "-msynci"]
|| [mips_have_test_option_p options "-mdsp"]
|| [mips_have_test_option_p options "-mdspr2"]) } {
if { $gp_size == 32 } {
@@ -1116,7 +1164,7 @@ proc mips-dg-options { args } {
if { [mips_using_mips16_p options]
&& ![mips_same_option_p $abi "-mabi=32"]
&& ![mips_same_option_p $abi "-mabi=o64"]
- && (![mips_have_option_p options "addressing=absolute"]
+ && ([mips_have_option_p options "-mabicalls"]
|| [mips_have_option_p options "-mhard-float"]) } {
if { [mips_test_option_p options mips16] } {
mips_make_test_option options "addressing=absolute"
@@ -1150,6 +1198,7 @@ proc mips-dg-options { args } {
mips_make_test_option options "-mfp32"
}
mips_make_test_option options "-mno-dsp"
+ mips_make_test_option options "-mno-synci"
}
unset arch
unset isa
@@ -1221,6 +1270,10 @@ proc mips-dg-options { args } {
append extra_tool_flags " -DMIPS16=__attribute__((mips16))"
}
+ if { [mips_have_test_option_p options "-mmicromips"] } {
+ append extra_tool_flags " -DMICROMIPS=__attribute__((micromips))"
+ }
+
# Use our version of gcc-dg-test for this test.
if { ![string equal [info procs "mips-gcc-dg-test"] ""] } {
rename gcc-dg-test mips-old-gcc-dg-test
@@ -1249,8 +1302,7 @@ proc mips-gcc-dg-test { prog do_what extra_tool_flags } {
dg-init
mips-dg-init
-# MIPS16 is defined by "-mips16" or "(-mips16)" in dg-options.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" \
- "-DNOMIPS16=__attribute__((nomips16))"
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] \
+ "-DNOMIPS16=__attribute__((nomips16)) -DNOMICROMIPS=__attribute__((nomicromips)) -DNOCOMPRESSION=__attribute__((nocompression))"
mips-dg-finish
dg-finish
diff --git a/gcc/testsuite/gcc.target/mips/mips16-attributes-5.c b/gcc/testsuite/gcc.target/mips/mips16-attributes-5.c
new file mode 100644
index 0000000000..b84fa88623
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mips16-attributes-5.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "(-mips16) addressing=absolute" } */
+/* { dg-skip-if "requires inlining" { *-*-* } { "-O0" } { "" } } */
+
+static inline MIPS16 int i1 (void) { return 1; }
+static inline NOMIPS16 int i2 (void) { return 2; }
+static inline MIPS16 int i3 (void) { return 3; }
+static inline NOMIPS16 int i4 (void) { return 4; }
+
+int NOMIPS16 f1 (void) { return i1 (); }
+int MIPS16 f2 (void) { return i2 (); }
+int MIPS16 f3 (void) { return i3 (); }
+int NOMIPS16 f4 (void) { return i4 (); }
+
+/* { dg-final { scan-assembler "i1:" } } */
+/* { dg-final { scan-assembler "i2:" } } */
+/* { dg-final { scan-assembler-not "i3:" } } */
+/* { dg-final { scan-assembler-not "i4:" } } */
+/* { dg-final { scan-assembler "\tjal\ti1" } } */
+/* { dg-final { scan-assembler "\tjal\ti2" } } */
+/* { dg-final { scan-assembler-not "\tjal\ti3" } } */
+/* { dg-final { scan-assembler-not "\tjal\ti4" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips16-attributes-6.c b/gcc/testsuite/gcc.target/mips/mips16-attributes-6.c
new file mode 100644
index 0000000000..99bdf8c3ef
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mips16-attributes-6.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-mips16 addressing=absolute -mips3d" } */
+
+static inline NOMIPS16 float
+i1 (float f)
+{
+ return __builtin_mips_recip1_s (f);
+}
+
+float f1 (float f) { return i1 (f); }
+
+/* { dg-final { scan-assembler "\trecip1.s\t" } } */
+/* { dg-final { scan-assembler "\tjal\ti1" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips16e-extends.c b/gcc/testsuite/gcc.target/mips/mips16e-extends.c
index d077f2fae6..d8946c979a 100644
--- a/gcc/testsuite/gcc.target/mips/mips16e-extends.c
+++ b/gcc/testsuite/gcc.target/mips/mips16e-extends.c
@@ -1,5 +1,6 @@
/* -mlong32 added because of PR target/38595. */
-/* { dg-options "(-mips16) -Os isa_rev>=1 -mlong32" } */
+/* { dg-options "(-mips16) isa_rev>=1 -mlong32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
MIPS16 short cksum16 (unsigned long n)
{
@@ -15,7 +16,7 @@ MIPS16 signed char cksum8 (unsigned long n)
return l;
}
-/* { dg-final { scan-assembler "zeh" } } */
-/* { dg-final { scan-assembler "seh" } } */
-/* { dg-final { scan-assembler "zeb" } } */
-/* { dg-final { scan-assembler "seb" } } */
+/* { dg-final { scan-assembler "\tzeh\t" } } */
+/* { dg-final { scan-assembler "\tseh\t" } } */
+/* { dg-final { scan-assembler "\tzeb\t" } } */
+/* { dg-final { scan-assembler "\tseb\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-1.c b/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-1.c
new file mode 100644
index 0000000000..d26f998407
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-1.c
@@ -0,0 +1,22 @@
+/* { dg-options "-mdspr2 -mgp32 -mtune=74kc" } */
+/* References to RESULT within the loop need to have a higher frequency than
+ references to RESULT outside the loop, otherwise there is no reason
+ to prefer multiply/accumulator registers over GPRs. */
+/* { dg-skip-if "requires register frequencies" { *-*-* } { "-O0" "-Os" } { "" } } */
+
+/* Check that the zero-initialization of the accumulator feeding into
+ the madd is done by means of a mult instruction instead of mthi/mtlo. */
+
+NOMIPS16 long long f (int n, int *v, int m)
+{
+ long long result = 0;
+ int i;
+
+ for (i = 0; i < n; i++)
+ result = __builtin_mips_madd (result, v[i], m);
+ return result;
+}
+
+/* { dg-final { scan-assembler "\tmult\t\\\$ac.,\\\$0,\\\$0" } } */
+/* { dg-final { scan-assembler-not "mthi\t" } } */
+/* { dg-final { scan-assembler-not "mtlo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-2.c b/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-2.c
new file mode 100644
index 0000000000..74608d943b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp-accinit-2.c
@@ -0,0 +1,23 @@
+/* { dg-options "-mdspr2 -mgp32 -mtune=4kp" } */
+/* References to RESULT within the loop need to have a higher frequency than
+ references to RESULT outside the loop, otherwise there is no reason
+ to prefer multiply/accumulator registers over GPRs. */
+/* { dg-skip-if "requires register frequencies" { *-*-* } { "-O0" "-Os" } { "" } } */
+
+/* Check that the zero-initialization of the accumulator feeding into
+ the madd is done by means of an mthi & mtlo pair instead of a
+ "mult $0,$0" instruction. */
+
+NOMIPS16 long long f (int n, int *v, int m)
+{
+ long long result = 0;
+ int i;
+
+ for (i = 0; i < n; i++)
+ result = __builtin_mips_madd (result, v[i], m);
+ return result;
+}
+
+/* { dg-final { scan-assembler-not "mult\t\[^\n\]*\\\$0" } } */
+/* { dg-final { scan-assembler "\tmthi\t" } } */
+/* { dg-final { scan-assembler "\tmtlo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c b/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
index ccbdef553e..ccd9d380fb 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp-run.c
@@ -1,6 +1,6 @@
/* Test MIPS32 DSP instructions */
/* { dg-do run } */
-/* { dg-options "-mdsp -O2" } */
+/* { dg-options "-mdsp" } */
#include <stdlib.h>
#include <stdio.h>
@@ -59,8 +59,10 @@ NOMIPS16 void test_MIPS_DSP ()
v4i8 v4i8_a,v4i8_b,v4i8_c,v4i8_r,v4i8_s;
v2q15 v2q15_a,v2q15_b,v2q15_c,v2q15_r,v2q15_s;
q31 q31_a,q31_b,q31_c,q31_r,q31_s;
- i32 i32_a,i32_b,i32_c,i32_r,i32_s;
- ui32 ui32_a,ui32_b,ui32_c;
+ /* To protect the multiplication-related tests from being optimized
+ at compile time. */
+ volatile i32 i32_a,i32_b,i32_c,i32_r,i32_s;
+ volatile ui32 ui32_a,ui32_b,ui32_c;
a64 a64_a,a64_b,a64_c,a64_r,a64_s;
void *ptr_a;
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp-type.c b/gcc/testsuite/gcc.target/mips/mips32-dsp-type.c
index cbf347b29c..2a901bbf38 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dsp-type.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp-type.c
@@ -1,10 +1,10 @@
/* Test MIPS32 DSP instructions */
/* { dg-do compile } */
/* { dg-options "-mdsp" } */
-/* { dg-final { scan-assembler "addq.ph" } } */
-/* { dg-final { scan-assembler "addu.qb" } } */
-/* { dg-final { scan-assembler "subq.ph" } } */
-/* { dg-final { scan-assembler "subu.qb" } } */
+/* { dg-final { scan-assembler "\taddq.ph\t" } } */
+/* { dg-final { scan-assembler "\taddu.qb\t" } } */
+/* { dg-final { scan-assembler "\tsubq.ph\t" } } */
+/* { dg-final { scan-assembler "\tsubu.qb\t" } } */
typedef char v4qi __attribute__ ((vector_size(4)));
typedef short v2hi __attribute__ ((vector_size(4)));
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dsp.c b/gcc/testsuite/gcc.target/mips/mips32-dsp.c
index c2a8ae7750..9aaf120184 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dsp.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dsp.c
@@ -1,103 +1,103 @@
/* Test MIPS32 DSP instructions */
/* { dg-do compile } */
/* { dg-options "-mgp32 -mdsp" } */
-/* { dg-final { scan-assembler "addq.ph" } } */
-/* { dg-final { scan-assembler "addq_s.ph" } } */
-/* { dg-final { scan-assembler "addq_s.w" } } */
-/* { dg-final { scan-assembler "addu.qb" } } */
-/* { dg-final { scan-assembler "addu_s.qb" } } */
-/* { dg-final { scan-assembler "subq.ph" } } */
-/* { dg-final { scan-assembler "subq_s.ph" } } */
-/* { dg-final { scan-assembler "subq_s.w" } } */
-/* { dg-final { scan-assembler "subu.qb" } } */
-/* { dg-final { scan-assembler "subu_s.qb" } } */
-/* { dg-final { scan-assembler "addsc" } } */
-/* { dg-final { scan-assembler "addwc" } } */
-/* { dg-final { scan-assembler "modsub" } } */
-/* { dg-final { scan-assembler "raddu.w.qb" } } */
-/* { dg-final { scan-assembler "absq_s.ph" } } */
-/* { dg-final { scan-assembler "absq_s.w" } } */
-/* { dg-final { scan-assembler "precrq.qb.ph" } } */
-/* { dg-final { scan-assembler "precrq.ph.w" } } */
-/* { dg-final { scan-assembler "precrq_rs.ph.w" } } */
-/* { dg-final { scan-assembler "precrqu_s.qb.ph" } } */
-/* { dg-final { scan-assembler "preceq.w.phl" } } */
-/* { dg-final { scan-assembler "preceq.w.phr" } } */
-/* { dg-final { scan-assembler "precequ.ph.qbl" } } */
-/* { dg-final { scan-assembler "precequ.ph.qbr" } } */
-/* { dg-final { scan-assembler "precequ.ph.qbla" } } */
-/* { dg-final { scan-assembler "precequ.ph.qbra" } } */
-/* { dg-final { scan-assembler "preceu.ph.qbl" } } */
-/* { dg-final { scan-assembler "preceu.ph.qbr" } } */
-/* { dg-final { scan-assembler "preceu.ph.qbla" } } */
-/* { dg-final { scan-assembler "preceu.ph.qbra" } } */
-/* { dg-final { scan-assembler "shllv?.qb" } } */
-/* { dg-final { scan-assembler "shllv?.ph" } } */
-/* { dg-final { scan-assembler "shllv?_s.ph" } } */
-/* { dg-final { scan-assembler "shllv?_s.w" } } */
-/* { dg-final { scan-assembler "shrlv?.qb" } } */
-/* { dg-final { scan-assembler "shrav?.ph" } } */
-/* { dg-final { scan-assembler "shrav?_r.ph" } } */
-/* { dg-final { scan-assembler "shrav?_r.w" } } */
-/* { dg-final { scan-assembler "muleu_s.ph.qbl" } } */
-/* { dg-final { scan-assembler "muleu_s.ph.qbr" } } */
-/* { dg-final { scan-assembler "mulq_rs.ph" } } */
-/* { dg-final { scan-assembler "muleq_s.w.phl" } } */
-/* { dg-final { scan-assembler "muleq_s.w.phr" } } */
-/* { dg-final { scan-assembler "dpau.h.qbl" } } */
-/* { dg-final { scan-assembler "dpau.h.qbr" } } */
-/* { dg-final { scan-assembler "dpsu.h.qbl" } } */
-/* { dg-final { scan-assembler "dpsu.h.qbr" } } */
-/* { dg-final { scan-assembler "dpaq_s.w.ph" } } */
-/* { dg-final { scan-assembler "dpsq_s.w.ph" } } */
-/* { dg-final { scan-assembler "mulsaq_s.w.ph" } } */
-/* { dg-final { scan-assembler "dpaq_sa.l.w" } } */
-/* { dg-final { scan-assembler "dpsq_sa.l.w" } } */
-/* { dg-final { scan-assembler "maq_s.w.phl" } } */
-/* { dg-final { scan-assembler "maq_s.w.phr" } } */
-/* { dg-final { scan-assembler "maq_sa.w.phl" } } */
-/* { dg-final { scan-assembler "maq_sa.w.phr" } } */
-/* { dg-final { scan-assembler "bitrev" } } */
-/* { dg-final { scan-assembler "insv" } } */
-/* { dg-final { scan-assembler "replv?.qb" } } */
-/* { dg-final { scan-assembler "repl.ph" } } */
-/* { dg-final { scan-assembler "replv.ph" } } */
-/* { dg-final { scan-assembler "cmpu.eq.qb" } } */
-/* { dg-final { scan-assembler "cmpu.lt.qb" } } */
-/* { dg-final { scan-assembler "cmpu.le.qb" } } */
-/* { dg-final { scan-assembler "cmpgu.eq.qb" } } */
-/* { dg-final { scan-assembler "cmpgu.lt.qb" } } */
-/* { dg-final { scan-assembler "cmpgu.le.qb" } } */
-/* { dg-final { scan-assembler "cmp.eq.ph" } } */
-/* { dg-final { scan-assembler "cmp.lt.ph" } } */
-/* { dg-final { scan-assembler "cmp.le.ph" } } */
-/* { dg-final { scan-assembler "pick.qb" } } */
-/* { dg-final { scan-assembler "pick.ph" } } */
-/* { dg-final { scan-assembler "packrl.ph" } } */
-/* { dg-final { scan-assembler "extrv?.w" } } */
-/* { dg-final { scan-assembler "extrv?_s.h" } } */
-/* { dg-final { scan-assembler "extrv?_r.w" } } */
-/* { dg-final { scan-assembler "extrv?_rs.w" } } */
-/* { dg-final { scan-assembler "extpv?" } } */
-/* { dg-final { scan-assembler "extpdpv?" } } */
-/* { dg-final { scan-assembler "shilov?" } } */
-/* { dg-final { scan-assembler "mthlip" } } */
-/* { dg-final { scan-assembler "mfhi" } } */
-/* { dg-final { scan-assembler "mflo" } } */
-/* { dg-final { scan-assembler "mthi" } } */
-/* { dg-final { scan-assembler "mtlo" } } */
-/* { dg-final { scan-assembler "wrdsp" } } */
-/* { dg-final { scan-assembler "rddsp" } } */
-/* { dg-final { scan-assembler "lbux?" } } */
-/* { dg-final { scan-assembler "lhx?" } } */
-/* { dg-final { scan-assembler "lwx?" } } */
-/* { dg-final { scan-assembler "bposge32" } } */
-/* { dg-final { scan-assembler "madd" } } */
-/* { dg-final { scan-assembler "maddu" } } */
-/* { dg-final { scan-assembler "msub" } } */
-/* { dg-final { scan-assembler "msubu" } } */
-/* { dg-final { scan-assembler "mult" } } */
-/* { dg-final { scan-assembler "multu" } } */
+/* { dg-final { scan-assembler "\taddq.ph\t" } } */
+/* { dg-final { scan-assembler "\taddq_s.ph\t" } } */
+/* { dg-final { scan-assembler "\taddq_s.w\t" } } */
+/* { dg-final { scan-assembler "\taddu.qb\t" } } */
+/* { dg-final { scan-assembler "\taddu_s.qb\t" } } */
+/* { dg-final { scan-assembler "\tsubq.ph\t" } } */
+/* { dg-final { scan-assembler "\tsubq_s.ph\t" } } */
+/* { dg-final { scan-assembler "\tsubq_s.w\t" } } */
+/* { dg-final { scan-assembler "\tsubu.qb\t" } } */
+/* { dg-final { scan-assembler "\tsubu_s.qb\t" } } */
+/* { dg-final { scan-assembler "\taddsc\t" } } */
+/* { dg-final { scan-assembler "\taddwc\t" } } */
+/* { dg-final { scan-assembler "\tmodsub\t" } } */
+/* { dg-final { scan-assembler "\traddu.w.qb\t" } } */
+/* { dg-final { scan-assembler "\tabsq_s.ph\t" } } */
+/* { dg-final { scan-assembler "\tabsq_s.w\t" } } */
+/* { dg-final { scan-assembler "\tprecrq.qb.ph\t" } } */
+/* { dg-final { scan-assembler "\tprecrq.ph.w\t" } } */
+/* { dg-final { scan-assembler "\tprecrq_rs.ph.w\t" } } */
+/* { dg-final { scan-assembler "\tprecrqu_s.qb.ph\t" } } */
+/* { dg-final { scan-assembler "\tpreceq.w.phl\t" } } */
+/* { dg-final { scan-assembler "\tpreceq.w.phr\t" } } */
+/* { dg-final { scan-assembler "\tprecequ.ph.qbl\t" } } */
+/* { dg-final { scan-assembler "\tprecequ.ph.qbr\t" } } */
+/* { dg-final { scan-assembler "\tprecequ.ph.qbla\t" } } */
+/* { dg-final { scan-assembler "\tprecequ.ph.qbra\t" } } */
+/* { dg-final { scan-assembler "\tpreceu.ph.qbl\t" } } */
+/* { dg-final { scan-assembler "\tpreceu.ph.qbr\t" } } */
+/* { dg-final { scan-assembler "\tpreceu.ph.qbla\t" } } */
+/* { dg-final { scan-assembler "\tpreceu.ph.qbra\t" } } */
+/* { dg-final { scan-assembler "\tshllv?.qb\t" } } */
+/* { dg-final { scan-assembler "\tshllv?.ph\t" } } */
+/* { dg-final { scan-assembler "\tshllv?_s.ph\t" } } */
+/* { dg-final { scan-assembler "\tshllv?_s.w\t" } } */
+/* { dg-final { scan-assembler "\tshrlv?.qb\t" } } */
+/* { dg-final { scan-assembler "\tshrav?.ph\t" } } */
+/* { dg-final { scan-assembler "\tshrav?_r.ph\t" } } */
+/* { dg-final { scan-assembler "\tshrav?_r.w\t" } } */
+/* { dg-final { scan-assembler "\tmuleu_s.ph.qbl\t" } } */
+/* { dg-final { scan-assembler "\tmuleu_s.ph.qbr\t" } } */
+/* { dg-final { scan-assembler "\tmulq_rs.ph\t" } } */
+/* { dg-final { scan-assembler "\tmuleq_s.w.phl\t" } } */
+/* { dg-final { scan-assembler "\tmuleq_s.w.phr\t" } } */
+/* { dg-final { scan-assembler "\tdpau.h.qbl\t" } } */
+/* { dg-final { scan-assembler "\tdpau.h.qbr\t" } } */
+/* { dg-final { scan-assembler "\tdpsu.h.qbl\t" } } */
+/* { dg-final { scan-assembler "\tdpsu.h.qbr\t" } } */
+/* { dg-final { scan-assembler "\tdpaq_s.w.ph\t" } } */
+/* { dg-final { scan-assembler "\tdpsq_s.w.ph\t" } } */
+/* { dg-final { scan-assembler "\tmulsaq_s.w.ph\t" } } */
+/* { dg-final { scan-assembler "\tdpaq_sa.l.w\t" } } */
+/* { dg-final { scan-assembler "\tdpsq_sa.l.w\t" } } */
+/* { dg-final { scan-assembler "\tmaq_s.w.phl\t" } } */
+/* { dg-final { scan-assembler "\tmaq_s.w.phr\t" } } */
+/* { dg-final { scan-assembler "\tmaq_sa.w.phl\t" } } */
+/* { dg-final { scan-assembler "\tmaq_sa.w.phr\t" } } */
+/* { dg-final { scan-assembler "\tbitrev\t" } } */
+/* { dg-final { scan-assembler "\tinsv\t" } } */
+/* { dg-final { scan-assembler "\treplv?.qb\t" } } */
+/* { dg-final { scan-assembler "\trepl.ph\t" } } */
+/* { dg-final { scan-assembler "\treplv.ph\t" } } */
+/* { dg-final { scan-assembler "\tcmpu.eq.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmpu.lt.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmpu.le.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmpgu.eq.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmpgu.lt.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmpgu.le.qb\t" } } */
+/* { dg-final { scan-assembler "\tcmp.eq.ph\t" } } */
+/* { dg-final { scan-assembler "\tcmp.lt.ph\t" } } */
+/* { dg-final { scan-assembler "\tcmp.le.ph\t" } } */
+/* { dg-final { scan-assembler "\tpick.qb\t" } } */
+/* { dg-final { scan-assembler "\tpick.ph\t" } } */
+/* { dg-final { scan-assembler "\tpackrl.ph\t" } } */
+/* { dg-final { scan-assembler "\textrv?.w\t" } } */
+/* { dg-final { scan-assembler "\textrv?_s.h\t" } } */
+/* { dg-final { scan-assembler "\textrv?_r.w\t" } } */
+/* { dg-final { scan-assembler "\textrv?_rs.w\t" } } */
+/* { dg-final { scan-assembler "\textpv?\t" } } */
+/* { dg-final { scan-assembler "\textpdpv?\t" } } */
+/* { dg-final { scan-assembler "\tshilov?\t" } } */
+/* { dg-final { scan-assembler "\tmthlip\t" } } */
+/* { dg-final { scan-assembler "\tmfhi\t" } } */
+/* { dg-final { scan-assembler "\tmflo\t" } } */
+/* { dg-final { scan-assembler "\tmthi\t" } } */
+/* { dg-final { scan-assembler "\tmtlo\t" } } */
+/* { dg-final { scan-assembler "\twrdsp\t" } } */
+/* { dg-final { scan-assembler "\trddsp\t" } } */
+/* { dg-final { scan-assembler "\tlbux?\t" } } */
+/* { dg-final { scan-assembler "\tlhx?\t" } } */
+/* { dg-final { scan-assembler "\tlwx?\t" } } */
+/* { dg-final { scan-assembler "\tbposge32\t" } } */
+/* { dg-final { scan-assembler "\tmadd\t" } } */
+/* { dg-final { scan-assembler "\tmaddu\t" } } */
+/* { dg-final { scan-assembler "\tmsub\t" } } */
+/* { dg-final { scan-assembler "\tmsubu\t" } } */
+/* { dg-final { scan-assembler "\tmult\t" } } */
+/* { dg-final { scan-assembler "\tmultu\t" } } */
#include <stdlib.h>
#include <stdio.h>
@@ -156,8 +156,10 @@ NOMIPS16 void test_MIPS_DSP ()
v4i8 v4i8_a,v4i8_b,v4i8_c,v4i8_r,v4i8_s;
v2q15 v2q15_a,v2q15_b,v2q15_c,v2q15_r,v2q15_s;
q31 q31_a,q31_b,q31_c,q31_r,q31_s;
- i32 i32_a,i32_b,i32_c,i32_r,i32_s;
- ui32 ui32_a,ui32_b,ui32_c;
+ /* To protect the multiplication-related tests from being optimized
+ at compile time. */
+ volatile i32 i32_a,i32_b,i32_c,i32_r,i32_s;
+ volatile ui32 ui32_a,ui32_b,ui32_c;
a64 a64_a,a64_b,a64_c,a64_r,a64_s;
void *ptr_a;
diff --git a/gcc/testsuite/gcc.target/mips/mips32-dspr2.c b/gcc/testsuite/gcc.target/mips/mips32-dspr2.c
index 1b3031ff19..1f7e928731 100644
--- a/gcc/testsuite/gcc.target/mips/mips32-dspr2.c
+++ b/gcc/testsuite/gcc.target/mips/mips32-dspr2.c
@@ -1,6 +1,6 @@
/* Test MIPS32 DSP REV 2 instructions */
/* { dg-do run } */
-/* { dg-options "-mdspr2 -O2" } */
+/* { dg-options "-mdspr2" } */
typedef signed char v4q7 __attribute__ ((vector_size(4)));
typedef signed char v4i8 __attribute__ ((vector_size(4)));
diff --git a/gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c b/gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c
index cf57323db1..899ac01007 100644
--- a/gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c
+++ b/gcc/testsuite/gcc.target/mips/mips32r2-mxhc1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O -mabi=32 -mfp64" } */
-/* { dg-final { scan-assembler "mthc1" } } */
-/* { dg-final { scan-assembler "mfhc1" } } */
+/* { dg-options "-mabi=32 -mfp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tmthc1\t" } } */
+/* { dg-final { scan-assembler "\tmfhc1\t" } } */
NOMIPS16 double func1 (long long a)
{
diff --git a/gcc/testsuite/gcc.target/mips/mips64-dsp-ldx.c b/gcc/testsuite/gcc.target/mips/mips64-dsp-ldx.c
index d136676190..02e6166577 100644
--- a/gcc/testsuite/gcc.target/mips/mips64-dsp-ldx.c
+++ b/gcc/testsuite/gcc.target/mips/mips64-dsp-ldx.c
@@ -1,6 +1,7 @@
/* Test MIPS64 DSP instructions */
/* { dg-do compile } */
-/* { dg-options "-mgp64 -mdsp -O" } */
+/* { dg-options "-mgp64 -mdsp" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tldx\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-1.c b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-1.c
index 8514ed8cb4..3d07939ca5 100644
--- a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-1.c
+++ b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -pg -mmcount-ra-address -mabi=64" } */
+/* { dg-options "-pg -mmcount-ra-address -mabi=64" } */
/* { dg-final { scan-assembler "\tmove\t\\\$12,\\\$0" } } */
NOMIPS16 int bazl(int i)
{
diff --git a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-2.c b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-2.c
index bb59a1828c..34b30d9874 100644
--- a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-2.c
+++ b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -pg -mmcount-ra-address -mabi=64" } */
+/* { dg-options "-pg -mmcount-ra-address -mabi=64 -mno-abicalls" } */
+/* { dg-skip-if "requiring a specific frame layout makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdla\t\\\$12,8\\(\\\$sp\\)" } } */
int foo (int);
NOMIPS16 int bar (int i)
diff --git a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-3.c b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-3.c
index 8c94c8345e..17bcb76be5 100644
--- a/gcc/testsuite/gcc.target/mips/mmcount-ra-address-3.c
+++ b/gcc/testsuite/gcc.target/mips/mmcount-ra-address-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -pg -mmcount-ra-address -mabi=64" } */
+/* { dg-options "-pg -mmcount-ra-address -mabi=64 -mno-abicalls" } */
+/* { dg-skip-if "requiring a specific frame layout makes this a code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdla\t\\\$12,200008\\(\\\$sp\\)" } } */
int foo (int *);
NOMIPS16 int bar(int i)
diff --git a/gcc/testsuite/gcc.target/mips/movcc-1.c b/gcc/testsuite/gcc.target/mips/movcc-1.c
index 1a930c9ac0..b3fe188d2c 100644
--- a/gcc/testsuite/gcc.target/mips/movcc-1.c
+++ b/gcc/testsuite/gcc.target/mips/movcc-1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa>=4" } */
-/* { dg-final { scan-assembler "movz" } } */
-/* { dg-final { scan-assembler "movn" } } */
+/* { dg-options "isa>=4" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tmovz\t" } } */
+/* { dg-final { scan-assembler "\tmovn\t" } } */
void ext_int (int);
diff --git a/gcc/testsuite/gcc.target/mips/movcc-2.c b/gcc/testsuite/gcc.target/mips/movcc-2.c
index d42acc1d77..2638d51fd6 100644
--- a/gcc/testsuite/gcc.target/mips/movcc-2.c
+++ b/gcc/testsuite/gcc.target/mips/movcc-2.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa>=4" } */
-/* { dg-final { scan-assembler "movz" } } */
-/* { dg-final { scan-assembler "movn" } } */
+/* { dg-options "isa>=4" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tmovz\t" } } */
+/* { dg-final { scan-assembler "\tmovn\t" } } */
void ext_long (long);
diff --git a/gcc/testsuite/gcc.target/mips/movcc-3.c b/gcc/testsuite/gcc.target/mips/movcc-3.c
index e6481777ad..f356465c88 100644
--- a/gcc/testsuite/gcc.target/mips/movcc-3.c
+++ b/gcc/testsuite/gcc.target/mips/movcc-3.c
@@ -1,13 +1,14 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa>=4 -mhard-float" } */
-/* { dg-final { scan-assembler "movt" } } */
-/* { dg-final { scan-assembler "movf" } } */
-/* { dg-final { scan-assembler "movz.s" } } */
-/* { dg-final { scan-assembler "movn.s" } } */
-/* { dg-final { scan-assembler "movt.s" } } */
-/* { dg-final { scan-assembler "movz.d" } } */
-/* { dg-final { scan-assembler "movn.d" } } */
-/* { dg-final { scan-assembler "movf.d" } } */
+/* { dg-options "isa>=4 -mhard-float" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tmovt\t" } } */
+/* { dg-final { scan-assembler "\tmovf\t" } } */
+/* { dg-final { scan-assembler "\tmovz.s\t" } } */
+/* { dg-final { scan-assembler "\tmovn.s\t" } } */
+/* { dg-final { scan-assembler "\tmovt.s\t" } } */
+/* { dg-final { scan-assembler "\tmovz.d\t" } } */
+/* { dg-final { scan-assembler "\tmovn.d\t" } } */
+/* { dg-final { scan-assembler "\tmovf.d\t" } } */
void ext_int (int);
void ext_long (long);
diff --git a/gcc/testsuite/gcc.target/mips/msub-1.c b/gcc/testsuite/gcc.target/mips/msub-1.c
index 803ea77df7..9a222bfda9 100644
--- a/gcc/testsuite/gcc.target/mips/msub-1.c
+++ b/gcc/testsuite/gcc.target/mips/msub-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5400 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5400 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsac\t\\\$0," 2 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/msub-2.c b/gcc/testsuite/gcc.target/mips/msub-2.c
index e6cdc2c1a9..c0923cd113 100644
--- a/gcc/testsuite/gcc.target/mips/msub-2.c
+++ b/gcc/testsuite/gcc.target/mips/msub-2.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5500 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5500 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/msub-3.c b/gcc/testsuite/gcc.target/mips/msub-3.c
index c44f34f4f0..aedd04302a 100644
--- a/gcc/testsuite/gcc.target/mips/msub-3.c
+++ b/gcc/testsuite/gcc.target/mips/msub-3.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "isa_rev>=1 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsub\t" 2 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/msub-4.c b/gcc/testsuite/gcc.target/mips/msub-4.c
index d41c312991..84cb5fe333 100644
--- a/gcc/testsuite/gcc.target/mips/msub-4.c
+++ b/gcc/testsuite/gcc.target/mips/msub-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mdspr2 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-mdspr2 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsub\t\\\$ac" 2 } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/msub-5.c b/gcc/testsuite/gcc.target/mips/msub-5.c
index dcb124a719..eba104c7f0 100644
--- a/gcc/testsuite/gcc.target/mips/msub-5.c
+++ b/gcc/testsuite/gcc.target/mips/msub-5.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsub\t" 4 } } */
/* { dg-final { scan-assembler-not "\tmtlo\t" } } */
/* { dg-final { scan-assembler-times "\tmflo\t" 3 } } */
diff --git a/gcc/testsuite/gcc.target/mips/msub-6.c b/gcc/testsuite/gcc.target/mips/msub-6.c
index ee4ca3d8da..32411e61fa 100644
--- a/gcc/testsuite/gcc.target/mips/msub-6.c
+++ b/gcc/testsuite/gcc.target/mips/msub-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tmsub\t" } } */
/* { dg-final { scan-assembler "\tmul\t" } } */
/* { dg-final { scan-assembler "\tsubu\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/msub-7.c b/gcc/testsuite/gcc.target/mips/msub-7.c
index 7ae96acb42..ee049876e3 100644
--- a/gcc/testsuite/gcc.target/mips/msub-7.c
+++ b/gcc/testsuite/gcc.target/mips/msub-7.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-skip-if "requires -fira-region=all or =mixed" { *-*-* } { "-Os" } { "" } } */
/* { dg-final { scan-assembler-not "\tmul\t" } } */
/* { dg-final { scan-assembler "\tmsub\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/msub-8.c b/gcc/testsuite/gcc.target/mips/msub-8.c
index 49d67f24a6..a66307f104 100644
--- a/gcc/testsuite/gcc.target/mips/msub-8.c
+++ b/gcc/testsuite/gcc.target/mips/msub-8.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O2 -march=5kc" } */
+/* { dg-options "-march=5kc" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmul\t" } } */
/* { dg-final { scan-assembler-not "\tmsub\t" } } */
/* { dg-final { scan-assembler-not "\tmtlo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/msubu-1.c b/gcc/testsuite/gcc.target/mips/msubu-1.c
index ae80403464..e1146f8bca 100644
--- a/gcc/testsuite/gcc.target/mips/msubu-1.c
+++ b/gcc/testsuite/gcc.target/mips/msubu-1.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5400 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5400 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsacu\t\\\$0," 2 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/msubu-2.c b/gcc/testsuite/gcc.target/mips/msubu-2.c
index 186dc47d6f..642d123946 100644
--- a/gcc/testsuite/gcc.target/mips/msubu-2.c
+++ b/gcc/testsuite/gcc.target/mips/msubu-2.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5500 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-march=vr5500 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/msubu-3.c b/gcc/testsuite/gcc.target/mips/msubu-3.c
index 272c64818e..2e936ebe03 100644
--- a/gcc/testsuite/gcc.target/mips/msubu-3.c
+++ b/gcc/testsuite/gcc.target/mips/msubu-3.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa_rev>=1 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "isa_rev>=1 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsubu\t" 2 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/msubu-4.c b/gcc/testsuite/gcc.target/mips/msubu-4.c
index 8f5fd647b3..a4f6118600 100644
--- a/gcc/testsuite/gcc.target/mips/msubu-4.c
+++ b/gcc/testsuite/gcc.target/mips/msubu-4.c
@@ -1,5 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -mdspr2 -mgp32" } */
+/* This test requires widening_mul */
+/* { dg-options "-mdspr2 -mgp32 -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tmsubu\t\\\$ac" 2 } } */
typedef unsigned int ui;
diff --git a/gcc/testsuite/gcc.target/mips/mulsize-1.c b/gcc/testsuite/gcc.target/mips/mulsize-1.c
new file mode 100644
index 0000000000..0997fd9345
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mulsize-1.c
@@ -0,0 +1,10 @@
+/* { dg-final { scan-assembler "\t.globl\tf7" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
+/* { dg-final { scan-assembler "\tsubu\t" } } */
+/* { dg-final { scan-assembler-not "\tli\t" } } */
+/* { dg-final { scan-assembler-not "\tmul\t" } } */
+int
+f7(int x)
+{
+ return x * 7;
+}
diff --git a/gcc/testsuite/gcc.target/mips/mulsize-2.c b/gcc/testsuite/gcc.target/mips/mulsize-2.c
new file mode 100644
index 0000000000..4cc2224dff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mulsize-2.c
@@ -0,0 +1,10 @@
+/* { dg-final { scan-assembler "\t.globl\tf9" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
+/* { dg-final { scan-assembler "\taddu\t" } } */
+/* { dg-final { scan-assembler-not "\tli\t" } } */
+/* { dg-final { scan-assembler-not "\tmul\t" } } */
+int
+f9(int x)
+{
+ return x * 9;
+}
diff --git a/gcc/testsuite/gcc.target/mips/mulsize-3.c b/gcc/testsuite/gcc.target/mips/mulsize-3.c
new file mode 100644
index 0000000000..552d8c99df
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mulsize-3.c
@@ -0,0 +1,12 @@
+/* { dg-final { scan-assembler "\t.globl\tf15" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
+/* { dg-final { scan-assembler "\tsubu\t" } } */
+/* { dg-final { scan-assembler-not "\tli\t" } } */
+/* { dg-final { scan-assembler-not "\tmul\t" } } */
+int
+f15(int x)
+{
+ return x * 15;
+}
+
+ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/mips/mulsize-4.c b/gcc/testsuite/gcc.target/mips/mulsize-4.c
new file mode 100644
index 0000000000..7694d2c03d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/mulsize-4.c
@@ -0,0 +1,11 @@
+/* { dg-final { scan-assembler "\t.globl\tf17" } } */
+/* { dg-final { scan-assembler "\tsll\t" } } */
+/* { dg-final { scan-assembler "\taddu\t" } } */
+/* { dg-final { scan-assembler-not "\tli\t" } } */
+/* { dg-final { scan-assembler-not "\tmul\t" } } */
+int
+f17(int x)
+{
+ return x * 17;
+}
+ \ No newline at end of file
diff --git a/gcc/testsuite/gcc.target/mips/mult-1.c b/gcc/testsuite/gcc.target/mips/mult-1.c
index 8630ec95d5..1038797f22 100644
--- a/gcc/testsuite/gcc.target/mips/mult-1.c
+++ b/gcc/testsuite/gcc.target/mips/mult-1.c
@@ -1,6 +1,8 @@
/* For SI->DI widening multiplication we should use DINS to combine the two
halves. For Octeon use DMUL with explicit widening. */
-/* { dg-options "-O2 -mgp64 isa_rev>=2 forbid_cpu=octeon.*" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 isa_rev>=2 forbid_cpu=octeon.* -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdins\t" } } */
/* { dg-final { scan-assembler-not "\tdsll\t" } } */
/* { dg-final { scan-assembler-not "\tdsrl\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-10.c b/gcc/testsuite/gcc.target/mips/mult-10.c
index 0b990c3641..c479ebbc55 100644
--- a/gcc/testsuite/gcc.target/mips/mult-10.c
+++ b/gcc/testsuite/gcc.target/mips/mult-10.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp64 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" { xfail *-*-* } } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-11.c b/gcc/testsuite/gcc.target/mips/mult-11.c
index d2ba695f6d..8b26c1de7a 100644
--- a/gcc/testsuite/gcc.target/mips/mult-11.c
+++ b/gcc/testsuite/gcc.target/mips/mult-11.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp64 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-12.c b/gcc/testsuite/gcc.target/mips/mult-12.c
index bd772d2cd7..bf8d36c762 100644
--- a/gcc/testsuite/gcc.target/mips/mult-12.c
+++ b/gcc/testsuite/gcc.target/mips/mult-12.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-13.c b/gcc/testsuite/gcc.target/mips/mult-13.c
index e0859f629f..beb6ab9432 100644
--- a/gcc/testsuite/gcc.target/mips/mult-13.c
+++ b/gcc/testsuite/gcc.target/mips/mult-13.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-14.c b/gcc/testsuite/gcc.target/mips/mult-14.c
index c4b54b7ec4..e3cbd75bf2 100644
--- a/gcc/testsuite/gcc.target/mips/mult-14.c
+++ b/gcc/testsuite/gcc.target/mips/mult-14.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp32 (-mips16)" } */
+/* { dg-options "-mgp32 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-15.c b/gcc/testsuite/gcc.target/mips/mult-15.c
index a96049e04e..da47bd2922 100644
--- a/gcc/testsuite/gcc.target/mips/mult-15.c
+++ b/gcc/testsuite/gcc.target/mips/mult-15.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp32 (-mips16)" } */
+/* { dg-options "-mgp32 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-16.c b/gcc/testsuite/gcc.target/mips/mult-16.c
index cb1707d912..3e9b3785b1 100644
--- a/gcc/testsuite/gcc.target/mips/mult-16.c
+++ b/gcc/testsuite/gcc.target/mips/mult-16.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp32 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp32 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-17.c b/gcc/testsuite/gcc.target/mips/mult-17.c
index 3539f63d96..84baff8cd8 100644
--- a/gcc/testsuite/gcc.target/mips/mult-17.c
+++ b/gcc/testsuite/gcc.target/mips/mult-17.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp32 (-mips16)" } */
+/* { dg-options "-mgp32 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-18.c b/gcc/testsuite/gcc.target/mips/mult-18.c
index cfdac8b0de..52487f30df 100644
--- a/gcc/testsuite/gcc.target/mips/mult-18.c
+++ b/gcc/testsuite/gcc.target/mips/mult-18.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp32 (-mips16)" } */
+/* { dg-options "-mgp32 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-19.c b/gcc/testsuite/gcc.target/mips/mult-19.c
index 47cdd5c23c..11cdb17c86 100644
--- a/gcc/testsuite/gcc.target/mips/mult-19.c
+++ b/gcc/testsuite/gcc.target/mips/mult-19.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp32 (-mips16)" } */
+/* { dg-options "-mgp32 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-2.c b/gcc/testsuite/gcc.target/mips/mult-2.c
index 8494e14c35..77be311627 100644
--- a/gcc/testsuite/gcc.target/mips/mult-2.c
+++ b/gcc/testsuite/gcc.target/mips/mult-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmult\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-3.c b/gcc/testsuite/gcc.target/mips/mult-3.c
index fa7cfa34e2..e46978bc40 100644
--- a/gcc/testsuite/gcc.target/mips/mult-3.c
+++ b/gcc/testsuite/gcc.target/mips/mult-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmultu\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-4.c b/gcc/testsuite/gcc.target/mips/mult-4.c
index d579f0023d..939ca5cdb4 100644
--- a/gcc/testsuite/gcc.target/mips/mult-4.c
+++ b/gcc/testsuite/gcc.target/mips/mult-4.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp64 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmult\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-5.c b/gcc/testsuite/gcc.target/mips/mult-5.c
index 6df86a1163..efb06af855 100644
--- a/gcc/testsuite/gcc.target/mips/mult-5.c
+++ b/gcc/testsuite/gcc.target/mips/mult-5.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmultu\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
/* { dg-final { scan-assembler-not "\tmflo\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-6.c b/gcc/testsuite/gcc.target/mips/mult-6.c
index a6b910ec40..82d4f5d453 100644
--- a/gcc/testsuite/gcc.target/mips/mult-6.c
+++ b/gcc/testsuite/gcc.target/mips/mult-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-7.c b/gcc/testsuite/gcc.target/mips/mult-7.c
index 7c2989baa5..35b0749807 100644
--- a/gcc/testsuite/gcc.target/mips/mult-7.c
+++ b/gcc/testsuite/gcc.target/mips/mult-7.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64 (-mips16)" } */
+/* { dg-options "-mgp64 (-mips16)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tdmultu?\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler-not "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-8.c b/gcc/testsuite/gcc.target/mips/mult-8.c
index 3e3acde81e..18dce2013d 100644
--- a/gcc/testsuite/gcc.target/mips/mult-8.c
+++ b/gcc/testsuite/gcc.target/mips/mult-8.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp64 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmult\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/mult-9.c b/gcc/testsuite/gcc.target/mips/mult-9.c
index aa2ededa67..59d450ab2c 100644
--- a/gcc/testsuite/gcc.target/mips/mult-9.c
+++ b/gcc/testsuite/gcc.target/mips/mult-9.c
@@ -1,4 +1,6 @@
-/* { dg-options "-O2 -mgp64 (-mips16)" } */
+/* This test requires widening_mul */
+/* { dg-options "-mgp64 (-mips16) -fexpensive-optimizations" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tmultu\t" } } */
/* { dg-final { scan-assembler "\tmflo\t" } } */
/* { dg-final { scan-assembler "\tmfhi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nan-2008.c b/gcc/testsuite/gcc.target/mips/nan-2008.c
new file mode 100644
index 0000000000..fc776e5fea
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nan-2008.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=2008 -EB" } */
+
+double d = __builtin_nan ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146959360\n\t\\.word\t0\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nan-legacy.c b/gcc/testsuite/gcc.target/mips/nan-legacy.c
new file mode 100644
index 0000000000..359ca221ed
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nan-legacy.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=legacy -EB" } */
+
+double d = __builtin_nan ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146959359\n\t\\.word\t(?:-1|4294967295)\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nanf-2008.c b/gcc/testsuite/gcc.target/mips/nanf-2008.c
new file mode 100644
index 0000000000..fb5e285881
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nanf-2008.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=2008 -EB" } */
+
+float f = __builtin_nanf ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2143289344\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nanf-legacy.c b/gcc/testsuite/gcc.target/mips/nanf-legacy.c
new file mode 100644
index 0000000000..6db278ef18
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nanf-legacy.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=legacy -EB" } */
+
+float f = __builtin_nanf ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2143289343\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nans-2008.c b/gcc/testsuite/gcc.target/mips/nans-2008.c
new file mode 100644
index 0000000000..2da0c2df47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nans-2008.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=2008 -EB" } */
+
+double ds = __builtin_nans ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2146697216\n\t\\.word\t0\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nans-legacy.c b/gcc/testsuite/gcc.target/mips/nans-legacy.c
new file mode 100644
index 0000000000..0ce4226b16
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nans-legacy.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=legacy -EB" } */
+
+double ds = __builtin_nans ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2147483647\n\t\\.word\t(?:-1|4294967295)\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nansf-2008.c b/gcc/testsuite/gcc.target/mips/nansf-2008.c
new file mode 100644
index 0000000000..d368add190
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nansf-2008.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=2008 -EB" } */
+
+float fs = __builtin_nansf ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\t2008\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2141192192\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/nansf-legacy.c b/gcc/testsuite/gcc.target/mips/nansf-legacy.c
new file mode 100644
index 0000000000..8a518670c9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nansf-legacy.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-mnan=legacy -EB" } */
+
+float fs = __builtin_nansf ("");
+
+/* { dg-final { scan-assembler "\t\\.nan\tlegacy\n" } } */
+/* { dg-final { scan-assembler "\t\\.word\t2147483647\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/near-far-3.c b/gcc/testsuite/gcc.target/mips/near-far-3.c
index f4ae791f1a..d4d48b1ed5 100644
--- a/gcc/testsuite/gcc.target/mips/near-far-3.c
+++ b/gcc/testsuite/gcc.target/mips/near-far-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mlong-calls addressing=absolute -O2" } */
+/* { dg-options "-mlong-calls addressing=absolute" } */
NOMIPS16 extern int long_call_func () __attribute__((long_call));
NOMIPS16 extern int far_func () __attribute__((far));
@@ -13,5 +13,5 @@ NOMIPS16 int test4 () { return normal_func (); }
/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
-/* { dg-final { scan-assembler "\tj\tnear_func\n" } } */
+/* { dg-final { scan-assembler "\tj(|al)\tnear_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tnormal_func\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/near-far-4.c b/gcc/testsuite/gcc.target/mips/near-far-4.c
index b9aa21fe4f..0ea07b0620 100644
--- a/gcc/testsuite/gcc.target/mips/near-far-4.c
+++ b/gcc/testsuite/gcc.target/mips/near-far-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-mno-long-calls addressing=absolute -O2" } */
+/* { dg-options "-mno-long-calls addressing=absolute" } */
NOMIPS16 extern int long_call_func () __attribute__((long_call));
NOMIPS16 extern int far_func () __attribute__((far));
@@ -13,5 +13,5 @@ NOMIPS16 int test4 () { return normal_func (); }
/* { dg-final { scan-assembler-not "\tj\tlong_call_func\n" } } */
/* { dg-final { scan-assembler-not "\tj\tfar_func\n" } } */
-/* { dg-final { scan-assembler "\tj\tnear_func\n" } } */
-/* { dg-final { scan-assembler "\tj\tnormal_func\n" } } */
+/* { dg-final { scan-assembler "\tj(|al)\tnear_func\n" } } */
+/* { dg-final { scan-assembler "\tj(|al)\tnormal_func\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/neg-abs-1.c b/gcc/testsuite/gcc.target/mips/neg-abs-1.c
index 20691ff2c4..fca525667b 100644
--- a/gcc/testsuite/gcc.target/mips/neg-abs-1.c
+++ b/gcc/testsuite/gcc.target/mips/neg-abs-1.c
@@ -1,11 +1,11 @@
/* Make sure that we use abs.fmt and neg.fmt when the signs of NaNs don't
matter. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mhard-float -ffinite-math-only" } */
-/* { dg-final { scan-assembler "neg.s" } } */
-/* { dg-final { scan-assembler "neg.d" } } */
-/* { dg-final { scan-assembler "abs.s" } } */
-/* { dg-final { scan-assembler "abs.d" } } */
+/* { dg-options "-mhard-float -ffinite-math-only" } */
+/* { dg-final { scan-assembler "\tneg.s\t" } } */
+/* { dg-final { scan-assembler "\tneg.d\t" } } */
+/* { dg-final { scan-assembler "\tabs.s\t" } } */
+/* { dg-final { scan-assembler "\tabs.d\t" } } */
NOMIPS16 float f1 (float f) { return -f; }
NOMIPS16 float f2 (float f) { return __builtin_fabsf (f); }
diff --git a/gcc/testsuite/gcc.target/mips/neg-abs-2.c b/gcc/testsuite/gcc.target/mips/neg-abs-2.c
index 67125f78a6..435751e0cc 100644
--- a/gcc/testsuite/gcc.target/mips/neg-abs-2.c
+++ b/gcc/testsuite/gcc.target/mips/neg-abs-2.c
@@ -1,11 +1,11 @@
/* Make sure that we avoid abs.fmt and neg.fmt when the signs of NaNs
matter. */
/* { dg-do compile } */
-/* { dg-options "-O2 -mhard-float -fno-finite-math-only" } */
-/* { dg-final { scan-assembler-not "neg.s" } } */
-/* { dg-final { scan-assembler-not "neg.d" } } */
-/* { dg-final { scan-assembler-not "abs.s" } } */
-/* { dg-final { scan-assembler-not "abs.d" } } */
+/* { dg-options "-mhard-float -fno-finite-math-only" } */
+/* { dg-final { scan-assembler-not "\tneg.s\t" } } */
+/* { dg-final { scan-assembler-not "\tneg.d\t" } } */
+/* { dg-final { scan-assembler-not "\tabs.s\t" } } */
+/* { dg-final { scan-assembler-not "\tabs.d\t" } } */
float f1 (float f) { return -f; }
float f2 (float f) { return __builtin_fabsf (f); }
diff --git a/gcc/testsuite/gcc.target/mips/nmadd-1.c b/gcc/testsuite/gcc.target/mips/nmadd-1.c
index 123d48799e..00be144d16 100644
--- a/gcc/testsuite/gcc.target/mips/nmadd-1.c
+++ b/gcc/testsuite/gcc.target/mips/nmadd-1.c
@@ -1,9 +1,10 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math isa=4 -mhard-float" } */
-/* { dg-final { scan-assembler "nmadd.s" } } */
-/* { dg-final { scan-assembler "nmadd.d" } } */
-/* { dg-final { scan-assembler "nmsub.s" } } */
-/* { dg-final { scan-assembler "nmsub.d" } } */
+/* { dg-options "-ffast-math isa=4 -mhard-float" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tnmadd.s\t" } } */
+/* { dg-final { scan-assembler "\tnmadd.d\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.s\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.d\t" } } */
NOMIPS16 float
sub1 (float f, float g, float h)
diff --git a/gcc/testsuite/gcc.target/mips/nmadd-2.c b/gcc/testsuite/gcc.target/mips/nmadd-2.c
index 90e4d838d8..a271f33b69 100644
--- a/gcc/testsuite/gcc.target/mips/nmadd-2.c
+++ b/gcc/testsuite/gcc.target/mips/nmadd-2.c
@@ -1,9 +1,10 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-fast-math -ffinite-math-only isa=4 -mhard-float" } */
-/* { dg-final { scan-assembler "nmadd.s" } } */
-/* { dg-final { scan-assembler "nmadd.d" } } */
-/* { dg-final { scan-assembler "nmsub.s" } } */
-/* { dg-final { scan-assembler "nmsub.d" } } */
+/* { dg-options "-fno-fast-math -ffinite-math-only isa=4 -mhard-float" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tnmadd.s\t" } } */
+/* { dg-final { scan-assembler "\tnmadd.d\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.s\t" } } */
+/* { dg-final { scan-assembler "\tnmsub.d\t" } } */
NOMIPS16 float
sub1 (float f, float g, float h)
diff --git a/gcc/testsuite/gcc.target/mips/nmadd-3.c b/gcc/testsuite/gcc.target/mips/nmadd-3.c
index df72618612..85de518a73 100644
--- a/gcc/testsuite/gcc.target/mips/nmadd-3.c
+++ b/gcc/testsuite/gcc.target/mips/nmadd-3.c
@@ -1,11 +1,9 @@
/* The same code as nmadd-2.c, but compiled with -fno-finite-math-only.
We can't use nmadd and nmsub in that case. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fno-fast-math -fno-finite-math-only isa=4 -mhard-float" } */
-/* { dg-final { scan-assembler-not "nmadd.s" } } */
-/* { dg-final { scan-assembler-not "nmadd.d" } } */
-/* { dg-final { scan-assembler-not "nmsub.s" } } */
-/* { dg-final { scan-assembler-not "nmsub.d" } } */
+/* { dg-options "-fno-fast-math -fno-finite-math-only isa=4 -mhard-float" } */
+/* { dg-final { scan-assembler-not "\tnmadd" } } */
+/* { dg-final { scan-assembler-not "\tnmsub" } } */
float
sub1 (float f, float g, float h)
diff --git a/gcc/testsuite/gcc.target/mips/no-dsp-1.c b/gcc/testsuite/gcc.target/mips/no-dsp-1.c
index 093037579b..c4a7b0aede 100644
--- a/gcc/testsuite/gcc.target/mips/no-dsp-1.c
+++ b/gcc/testsuite/gcc.target/mips/no-dsp-1.c
@@ -1,7 +1,8 @@
-/* { dg-options "-mno-dsp" } */
+/* { dg-options "-mno-dsp -ffat-lto-objects" } */
void
foo (void)
{
register int x asm ("$ac1hi"); /* { dg-error "cannot be accessed" } */
+ asm volatile ("" : "=r" (x));
}
diff --git a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
index ee7f3d54d5..ecf856ea7f 100644
--- a/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
+++ b/gcc/testsuite/gcc.target/mips/no-smartmips-lwxs.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mno-smartmips" } */
+/* { dg-options "-mno-smartmips" } */
NOMIPS16 int scaled_indexed_word_load (int a[], int b)
{
diff --git a/gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c b/gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c
index d1f50a8fbe..419d086b8a 100644
--- a/gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c
+++ b/gcc/testsuite/gcc.target/mips/no-smartmips-ror-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -mno-smartmips -march=mips32" } */
+/* { dg-options "-mno-smartmips -march=mips32" } */
NOMIPS16 int rotate_left (unsigned a, unsigned s)
{
diff --git a/gcc/testsuite/gcc.target/mips/nor.c b/gcc/testsuite/gcc.target/mips/nor.c
new file mode 100644
index 0000000000..e71791ba31
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/nor.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-times "\tnor\t" 1 } } */
+/* { dg-final { scan-assembler-not "\tor" } } */
+
+/* Test that we generate a 'nor' instruction and no 'or' instructions. */
+
+NOMIPS16 int f (int a, int b)
+{
+ return ~(a|b);
+}
diff --git a/gcc/testsuite/gcc.target/mips/octeon-baddu-1.c b/gcc/testsuite/gcc.target/mips/octeon-baddu-1.c
index 8dd5be1676..e7150d2973 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-baddu-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-baddu-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon" } */
+/* { dg-options "-march=octeon" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tbaddu\t" 4 } } */
/* { dg-final { scan-assembler-not "\tandi\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
index 6629dbb584..f91c68bcdc 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-1.c
@@ -1,7 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=octeon" } */
-/* { dg-final { scan-assembler-times "\tbbit1\t" 4 } } */
-/* { dg-final { scan-assembler-times "\tbbit0\t" 2 } } */
+/* { dg-options "-march=octeon" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tbbit1\t" } } */
+/* { dg-final { scan-assembler "\tbbit0\t" } } */
+/* { dg-final { scan-assembler-times "\tbbit.\t" 6 } } */
/* { dg-final { scan-assembler-not "andi\t" } } */
NOMIPS16 void foo (void);
diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c
index 55bf23eae4..7e78d70e77 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-2.c
@@ -1,24 +1,24 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=octeon -mbranch-likely" } */
+/* { dg-options "-march=octeon -mbranch-likely -fno-unroll-loops" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler "\tbbit\[01\]\t" } } */
/* { dg-final { scan-assembler-not "\tbbit\[01\]l\t" } } */
/* { dg-final { scan-assembler "\tbnel\t" } } */
-/* { dg-final { scan-assembler-not "\tbne\t" } } */
NOMIPS16 int
-f (int n, int i)
+f (int *a, int *b)
{
- int s = 0;
- for (; i & 1; i++)
- s += i;
- return s;
+ do
+ if (__builtin_expect (*a & 1, 1))
+ *a = 0;
+ while (++a < b);
}
NOMIPS16 int
-g (int n, int i)
+g (int *a, int *b)
{
- int s = 0;
- for (i = 0; i < n; i++)
- s += i;
- return s;
+ do
+ if (__builtin_expect (*a == 3, 1))
+ *a = 0;
+ while (++a < b);
}
diff --git a/gcc/testsuite/gcc.target/mips/octeon-bbit-3.c b/gcc/testsuite/gcc.target/mips/octeon-bbit-3.c
index bcc37d29e3..7b73f43a1f 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-bbit-3.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-bbit-3.c
@@ -11,12 +11,14 @@
which does not get recognized as a valid bbit pattern. The
middle-end should be able to simplify this further. */
-/* { dg-options "-O2 -march=octeon -meb" } */
+/* { dg-options "-march=octeon -meb" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
-/* { dg-final { scan-assembler-times "\tbbit\[01\]\t|\tbgez\t" 2 } } */
+/* { dg-final { scan-assembler-times "\tbbit\[01\]\t|\tbgez\t|\tbltz\t" 2 } } */
/* { dg-final { scan-assembler-not "ext\t" } } */
void abort (void);
+void abort1 (void);
void exit (int);
typedef unsigned long long ulong64;
@@ -38,7 +40,7 @@ f ()
if (bar.a != 0x1)
abort ();
else if (!bar.c)
- abort ();
+ abort1 ();
else
exit (0);
}
diff --git a/gcc/testsuite/gcc.target/mips/octeon-cins-1.c b/gcc/testsuite/gcc.target/mips/octeon-cins-1.c
index ac85e23784..dd0b753ec0 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-cins-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-cins-1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
/* The tests also work with -mgp32. For long long tests, only one of
the 32-bit parts is used. */
-/* { dg-options "-O -march=octeon" } */
+/* { dg-options "-march=octeon" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tcins\t" 3 } } */
/* { dg-final { scan-assembler-not "\tandi\t|sll\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-cins-2.c b/gcc/testsuite/gcc.target/mips/octeon-cins-2.c
index 2dcff0aad1..71611bc9ff 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-cins-2.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-cins-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tcins\t" } } */
NOMIPS16 unsigned
diff --git a/gcc/testsuite/gcc.target/mips/octeon-dmul-2.c b/gcc/testsuite/gcc.target/mips/octeon-dmul-2.c
index 6b2308c0bb..cf8da24ca7 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-dmul-2.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-dmul-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "using DMUL is no worse size-wise, and can be better if the constant is used elsewhere" { *-*-* } { "-Os" } { "" } } */
/* { dg-final { scan-assembler-not "\tdmul" } } */
NOMIPS16 long long
diff --git a/gcc/testsuite/gcc.target/mips/octeon-dmul-3.c b/gcc/testsuite/gcc.target/mips/octeon-dmul-3.c
index 01f0eefca8..38150a87ec 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-dmul-3.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-dmul-3.c
@@ -1,5 +1,6 @@
/* Use DMUL for widening multiplication too. */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\tdmul\t" 2 } } */
/* { dg-final { scan-assembler-not "\td?mult\t" } } */
/* { dg-final { scan-assembler-times "\tdext\t" 2 } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-2.c b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c
index fc5df639d0..21353d9061 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-2.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -meb" } */
+/* { dg-options "-march=octeon -meb" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\texts\t" 4 } } */
struct bar
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-3.c b/gcc/testsuite/gcc.target/mips/octeon-exts-3.c
index 9d0e9302a5..be04198907 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-3.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\texts\t" 3 } } */
struct foo
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-4.c b/gcc/testsuite/gcc.target/mips/octeon-exts-4.c
index 7e6a578a19..0071ae173b 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-4.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
/* { dg-final { scan-assembler-times "\texts\t" 6 } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-5.c b/gcc/testsuite/gcc.target/mips/octeon-exts-5.c
index e7a4738b96..0e587d7eb2 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-5.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-5.c
@@ -1,6 +1,7 @@
/* -mel version of octeon-exts-2.c. */
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mel" } */
+/* { dg-options "-march=octeon -mel" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\texts\t" 4 } } */
struct bar
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-6.c b/gcc/testsuite/gcc.target/mips/octeon-exts-6.c
index d37ed95559..b8da271ae3 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-6.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-6.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\texts\t" 5 } } */
/* { dg-final { scan-assembler-not "\t(dsll|dsra)\t" } } */
/* { dg-final { scan-assembler-not "\tsll\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-exts-7.c b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
index 04805d06de..fcae012615 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-exts-7.c
@@ -1,13 +1,15 @@
/* Remove the redundant sign-extension after the sign-extraction. */
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times "\texts\t" 1 } } */
-/* { dg-final { scan-assembler-not "sll|sra" } } */
+/* { dg-final { scan-assembler-not "\td?(sll|sra)" } } */
struct bar
{
long long a:18;
- long long b:14;
+ long long b:24;
+ long long c:22;
};
NOMIPS16 int
diff --git a/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c b/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
index bbcf7c8fcb..4488e3d511 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-pipe-1.c
@@ -1,6 +1,7 @@
/* Check that we use the octeon pipeline description. */
/* { dg-do compile } */
-/* { dg-options "-O2 -march=octeon -fdump-rtl-sched2" } */
+/* { dg-options "-march=octeon -fschedule-insns2 -fdump-rtl-sched2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int f (int a, int b)
{
@@ -8,4 +9,4 @@ NOMIPS16 int f (int a, int b)
}
/* { dg-final { scan-rtl-dump "octeon_mult\\*71" "sched2" } } */
-/* { dg-final { cleanup-tree-dump "sched2" } } */
+/* { dg-final { cleanup-rtl-dump "sched2" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-pop-1.c b/gcc/testsuite/gcc.target/mips/octeon-pop-1.c
index 54d2e9c04a..6a6791ce61 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-pop-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-pop-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
/* { dg-final { scan-assembler "\tpop\t" } } */
/* { dg-final { scan-assembler "\tdpop\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-pop-2.c b/gcc/testsuite/gcc.target/mips/octeon-pop-2.c
new file mode 100644
index 0000000000..d6d2a7afb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/octeon-pop-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* The pop instruction does not depend on the word value to be sign extended. */
+/* { dg-final { scan-assembler-not "sll\t" } } */
+
+NOMIPS16 long long f(long long i)
+{
+ return __builtin_popcount (i);
+}
+
diff --git a/gcc/testsuite/gcc.target/mips/octeon-seq-3.c b/gcc/testsuite/gcc.target/mips/octeon-seq-3.c
index 899f145844..71e09dc6f0 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-seq-3.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-seq-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -march=octeon -mgp64" } */
+/* { dg-options "-march=octeon -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
/* { dg-final { scan-assembler-times "\tseqi\t\|\tsnei\t" 4 } } */
diff --git a/gcc/testsuite/gcc.target/mips/octeon-seq-4.c b/gcc/testsuite/gcc.target/mips/octeon-seq-4.c
index e61bcb361c..0fd83f0b30 100644
--- a/gcc/testsuite/gcc.target/mips/octeon-seq-4.c
+++ b/gcc/testsuite/gcc.target/mips/octeon-seq-4.c
@@ -1,6 +1,7 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -march=octeon" } */
-/* { dg-final { scan-assembler-not "xor" } } */
+/* { dg-options "-march=octeon" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-not "\txor" } } */
unsigned
m (unsigned e);
diff --git a/gcc/testsuite/gcc.target/mips/octeon2-lx-1.c b/gcc/testsuite/gcc.target/mips/octeon2-lx-1.c
index 34d8af8521..445e3fc2e7 100644
--- a/gcc/testsuite/gcc.target/mips/octeon2-lx-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon2-lx-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=octeon2 -O -mgp64" } */
+/* { dg-options "-march=octeon2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(N, R, T) \
T fll##N (T j, signed R *b, long long i) { return j + b[i]; } \
diff --git a/gcc/testsuite/gcc.target/mips/octeon2-lx-2.c b/gcc/testsuite/gcc.target/mips/octeon2-lx-2.c
index 521a71f961..b487637bec 100644
--- a/gcc/testsuite/gcc.target/mips/octeon2-lx-2.c
+++ b/gcc/testsuite/gcc.target/mips/octeon2-lx-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=octeon2 -O -mgp64" } */
+/* { dg-options "-march=octeon2 -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(N, T) \
T f##N (T *p, int i) { return p[i]; } \
diff --git a/gcc/testsuite/gcc.target/mips/octeon2-lx-3.c b/gcc/testsuite/gcc.target/mips/octeon2-lx-3.c
index 51d2e1031c..110cf8bd7f 100644
--- a/gcc/testsuite/gcc.target/mips/octeon2-lx-3.c
+++ b/gcc/testsuite/gcc.target/mips/octeon2-lx-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-march=octeon2 -O -mgp32" } */
+/* { dg-options "-march=octeon2 -mgp32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(N, T) \
T f##N (T *p, int i) { return p[i]; } \
diff --git a/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c b/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c
index da4f6321c7..18fd966715 100644
--- a/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c
+++ b/gcc/testsuite/gcc.target/mips/octeon2-pipe-1.c
@@ -1,6 +1,7 @@
/* Check that we use the octeon2 pipeline description. */
/* { dg-do compile } */
-/* { dg-options "-O2 -fdump-rtl-sched2 -march=octeon2" } */
+/* { dg-options "-fschedule-insns2 -fdump-rtl-sched2 -march=octeon2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int f (int a, int b)
{
@@ -8,4 +9,4 @@ NOMIPS16 int f (int a, int b)
}
/* { dg-final { scan-rtl-dump "octeon_mult\\*17" "sched2" } } */
-/* { dg-final { cleanup-tree-dump "sched2" } } */
+/* { dg-final { cleanup-rtl-dump "sched2" } } */
diff --git a/gcc/testsuite/gcc.target/mips/pr26765.c b/gcc/testsuite/gcc.target/mips/pr26765.c
index 25c2e8d4c8..c4716cff5b 100644
--- a/gcc/testsuite/gcc.target/mips/pr26765.c
+++ b/gcc/testsuite/gcc.target/mips/pr26765.c
@@ -2,7 +2,7 @@
This testcase used to trigger an unrecognizable insn. */
/* { dg-do compile } */
-/* { dg-options "-O2 -w" } */
+/* { dg-options "-w" } */
__thread int *a = 0;
diff --git a/gcc/testsuite/gcc.target/mips/pr33256.c b/gcc/testsuite/gcc.target/mips/pr33256.c
index ead5888cc0..109da4899e 100644
--- a/gcc/testsuite/gcc.target/mips/pr33256.c
+++ b/gcc/testsuite/gcc.target/mips/pr33256.c
@@ -1,6 +1,6 @@
/* GCC used to report an ICE for this test because we generated a LO_SUM
for an illegitimate constant. */
-/* { dg-options "-mabi=64 -msym32 -O2 -EB -mno-abicalls" } */
+/* { dg-options "-mabi=64 -msym32 -EB -mno-abicalls" } */
extern unsigned long a[];
int b (int);
diff --git a/gcc/testsuite/gcc.target/mips/pr33635-1.c b/gcc/testsuite/gcc.target/mips/pr33635-1.c
index 78e761f71c..f849b396ea 100644
--- a/gcc/testsuite/gcc.target/mips/pr33635-1.c
+++ b/gcc/testsuite/gcc.target/mips/pr33635-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-mabi=64 -O2" } */
+/* { dg-options "-mabi=64" } */
NOMIPS16 long double __powitf2 (long double x, int m)
{
diff --git a/gcc/testsuite/gcc.target/mips/pr33755.c b/gcc/testsuite/gcc.target/mips/pr33755.c
index ca6a1e6984..c3e2cbfd7d 100644
--- a/gcc/testsuite/gcc.target/mips/pr33755.c
+++ b/gcc/testsuite/gcc.target/mips/pr33755.c
@@ -1,5 +1,4 @@
/* { dg-do link } */
-/* { dg-options "-O2" } */
volatile int gv;
const char *ptrs[2];
diff --git a/gcc/testsuite/gcc.target/mips/pr35802.c b/gcc/testsuite/gcc.target/mips/pr35802.c
index 9ecc4d06ea..acdfaebe33 100644
--- a/gcc/testsuite/gcc.target/mips/pr35802.c
+++ b/gcc/testsuite/gcc.target/mips/pr35802.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -march=74kc -mgp32" } */
+/* { dg-options "-march=74kc -mgp32" } */
__thread int x __attribute__((tls_model("initial-exec")));
__thread int y __attribute__((tls_model("initial-exec")));
diff --git a/gcc/testsuite/gcc.target/mips/pr37362.c b/gcc/testsuite/gcc.target/mips/pr37362.c
index a37836640d..848d879d32 100644
--- a/gcc/testsuite/gcc.target/mips/pr37362.c
+++ b/gcc/testsuite/gcc.target/mips/pr37362.c
@@ -1,5 +1,5 @@
/* mips*-sde-elf doesn't have 128-bit long doubles. */
-/* { dg-do compile { target { ! mips*-sde-elf } } } */
+/* { dg-do compile { target { ! { mips*-sde-elf mips*-mti-elf } } } } */
/* { dg-options "-march=mips64r2 -mabi=n32" } */
typedef float TFtype __attribute__((mode(TF)));
diff --git a/gcc/testsuite/gcc.target/mips/pr45074.c b/gcc/testsuite/gcc.target/mips/pr45074.c
index ba578c838c..129467fb02 100644
--- a/gcc/testsuite/gcc.target/mips/pr45074.c
+++ b/gcc/testsuite/gcc.target/mips/pr45074.c
@@ -1,4 +1,4 @@
-/* { dg-options "-mhard-float -mgp32 -O" } */
+/* { dg-options "-mhard-float -mgp32" } */
register double g __asm__("$f20");
NOMIPS16 void
diff --git a/gcc/testsuite/gcc.target/mips/pr52125.c b/gcc/testsuite/gcc.target/mips/pr52125.c
new file mode 100644
index 0000000000..2ac8067206
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr52125.c
@@ -0,0 +1,20 @@
+/* { dg-options "-mno-gpopt addressing=absolute" } */
+
+int a, b, c, d;
+
+NOMIPS16 void
+foo (void)
+{
+ asm ("%1 %z3"
+ : "=m" (a), "=m" (b)
+ : "m" (c), "m" (d));
+}
+
+/* { dg-final { scan-assembler-not "%hi\\(a\\)" } } */
+/* { dg-final { scan-assembler-not "%lo\\(a\\)" } } */
+/* { dg-final { scan-assembler "%hi\\(b\\)" } } */
+/* { dg-final { scan-assembler "%lo\\(b\\)" } } */
+/* { dg-final { scan-assembler-not "%hi\\(c\\)" } } */
+/* { dg-final { scan-assembler-not "%lo\\(c\\)" } } */
+/* { dg-final { scan-assembler "%hi\\(d\\)" } } */
+/* { dg-final { scan-assembler "%lo\\(d\\)" } } */
diff --git a/gcc/testsuite/gcc.target/mips/pr54240.c b/gcc/testsuite/gcc.target/mips/pr54240.c
new file mode 100644
index 0000000000..cedb97a6ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr54240.c
@@ -0,0 +1,28 @@
+/* { dg-do compile } */
+/* { dg-options "-fdump-tree-phiopt-details -ffat-lto-objects isa>=4" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" "-O1" } { "" } } */
+
+typedef struct s {
+ int v;
+ int b;
+ struct s *l;
+ struct s *r;
+} S;
+
+/* Test requires conditional moves. */
+NOMIPS16 int foo(S *s)
+{
+ S *this;
+ S *next;
+
+ this = s;
+ if (this->b)
+ next = this->l;
+ else
+ next = this->r;
+
+ return next->v;
+}
+
+/* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt1" } } */
+/* { dg-final { cleanup-tree-dump "phiopt1" } } */
diff --git a/gcc/testsuite/gcc.target/mips/pr55315.c b/gcc/testsuite/gcc.target/mips/pr55315.c
new file mode 100644
index 0000000000..9dcf2893a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr55315.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+
+int data[4096];
+
+int
+f (void)
+{
+ return (((unsigned long) &data[0]) == 0xdeadbea0U);
+}
+
+/* { dg-final { scan-assembler-not "\tmove\t\\\$2,\\\$0" } } */
diff --git a/gcc/testsuite/gcc.target/mips/pr56524.c b/gcc/testsuite/gcc.target/mips/pr56524.c
new file mode 100644
index 0000000000..7df021b699
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr56524.c
@@ -0,0 +1,8 @@
+/* { dg-options "-mips16" } */
+
+void bar (void) {}
+
+void __attribute__((optimize("schedule-insns")))
+foo (void)
+{
+}
diff --git a/gcc/testsuite/gcc.target/mips/pr59137.c b/gcc/testsuite/gcc.target/mips/pr59137.c
new file mode 100644
index 0000000000..8986506568
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr59137.c
@@ -0,0 +1,34 @@
+/* { dg-do run } */
+/* { dg-options "-mno-plt" } */
+
+extern void abort (void);
+
+struct lispstruct
+{
+ int e;
+ int t;
+};
+
+struct lispstruct Cnil_body;
+struct lispstruct Ct_body;
+int nvalues;
+
+struct lispstruct * __attribute__ ((noinline))
+fLlistp (struct lispstruct *x0)
+{
+ if (x0 == &Cnil_body
+ || (((unsigned long) x0 >= 0x80000000) ? 0
+ : (!x0->e ? (x0 != &Cnil_body) : x0->t)))
+ x0 = &Ct_body;
+ else
+ x0 = &Cnil_body;
+ nvalues = 1;
+ return x0;
+}
+
+int main ()
+{
+ if (fLlistp ((struct lispstruct *) 0xa0000001) != &Cnil_body)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/mips/pr59317.c b/gcc/testsuite/gcc.target/mips/pr59317.c
new file mode 100644
index 0000000000..dd23f7c864
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr59317.c
@@ -0,0 +1,83 @@
+/* { dg-do compile } */
+/* { dg-options "-mips16" } */
+extern void abort();
+
+int i_0, i_1, i_2, i_3, i_4, i_5, i_6, i_7, i_8, i_9;
+int j_0, j_1, j_2, j_3, j_4, j_5, j_6, j_7, j_8, j_9;
+
+int main()
+{
+ register int *x1 = &i_1;
+ register int *x2 = &i_2;
+ register int *x3 = &i_3;
+ register int *x4 = &i_4;
+ register int *x5 = &i_5;
+ register int *x6 = &i_6;
+ register int *x7 = &i_7;
+ register int *x8 = &i_8;
+ register int *x9 = &i_9;
+
+ register int *y0 = &j_0;
+ register int *y1 = &j_1;
+ register int *y2 = &i_2;
+ register int *y3 = &j_3;
+ register int *y4 = &j_4;
+ register int *y5 = &j_5;
+ register int *y6 = &j_6;
+ register int *y7 = &j_7;
+ register int *y8 = &j_8;
+ register int *y9 = &j_9;
+
+ asm volatile ("" : "=r" (x2) : "0" (x2));
+ asm volatile ("" : "=r" (x3) : "0" (x3));
+ asm volatile ("" : "=r" (x4) : "0" (x4));
+ asm volatile ("" : "=r" (x5) : "0" (x5));
+ asm volatile ("" : "=r" (x6) : "0" (x6));
+ asm volatile ("" : "=r" (x7) : "0" (x7));
+ asm volatile ("" : "=r" (x8) : "0" (x8));
+ asm volatile ("" : "=r" (x9) : "0" (x9));
+
+ asm volatile ("" : "=r" (y0) : "0" (y0));
+ asm volatile ("" : "=r" (y1) : "0" (y1));
+ asm volatile ("" : "=r" (y2) : "0" (y2));
+ asm volatile ("" : "=r" (y3) : "0" (y3));
+ asm volatile ("" : "=r" (y4) : "0" (y4));
+ asm volatile ("" : "=r" (y5) : "0" (y5));
+ asm volatile ("" : "=r" (y6) : "0" (y6));
+ asm volatile ("" : "=r" (y7) : "0" (y7));
+ asm volatile ("" : "=r" (y8) : "0" (y8));
+ asm volatile ("" : "=r" (y9) : "0" (y9));
+
+ asm volatile ("" : "=r" (x1) : "0" (x1));
+ asm volatile ("" : "=r" (x2) : "0" (x2));
+ asm volatile ("" : "=r" (x3) : "0" (x3));
+ asm volatile ("" : "=r" (x4) : "0" (x4));
+ asm volatile ("" : "=r" (x5) : "0" (x5));
+ asm volatile ("" : "=r" (x6) : "0" (x6));
+ asm volatile ("" : "=r" (x7) : "0" (x7));
+ asm volatile ("" : "=r" (x8) : "0" (x8));
+ asm volatile ("" : "=r" (x9) : "0" (x9));
+
+ asm volatile ("" : "=r" (y0) : "0" (y0));
+ asm volatile ("" : "=r" (y1) : "0" (y1));
+ asm volatile ("" : "=r" (y2) : "0" (y2));
+ asm volatile ("" : "=r" (y3) : "0" (y3));
+ asm volatile ("" : "=r" (y4) : "0" (y4));
+ asm volatile ("" : "=r" (y5) : "0" (y5));
+ asm volatile ("" : "=r" (y6) : "0" (y6));
+ asm volatile ("" : "=r" (y7) : "0" (y7));
+ asm volatile ("" : "=r" (y8) : "0" (y8));
+ asm volatile ("" : "=r" (y9) : "0" (y9));
+
+ if (y0 != &j_0) abort ();
+ if (y1 != &j_1) abort ();
+ if (y2 != &j_2) abort ();
+ if (y3 != &j_3) abort ();
+ if (y4 != &j_4) abort ();
+ if (y5 != &j_5) abort ();
+ if (y6 != &j_6) abort ();
+ if (y7 != &j_7) abort ();
+ if (y8 != &j_8) abort ();
+ if (y9 != &j_9) abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/mips/pr62030-octeon.c b/gcc/testsuite/gcc.target/mips/pr62030-octeon.c
new file mode 100644
index 0000000000..5e3d3b3b63
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/pr62030-octeon.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-options "-march=octeon" } */
+
+extern void abort (void);
+
+struct node
+{
+ struct node *next;
+ struct node *prev;
+};
+
+struct node node;
+
+struct head
+{
+ struct node *first;
+};
+
+struct head heads[5];
+
+int k = 2;
+
+struct head *head = &heads[2];
+
+static int __attribute__((noinline))
+foo (void)
+{
+ node.prev = (void *)head;
+ head->first = &node;
+
+ struct node *n = head->first;
+ struct head *h = &heads[k];
+ struct node *next = n->next;
+
+ if (n->prev == (void *)h)
+ h->first = next;
+ else
+ n->prev->next = next;
+
+ n->next = h->first;
+ return n->next == &node;
+}
+
+int
+main (void)
+{
+ if (foo ())
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c
index b271e2bf41..b5ffd0aebb 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-1.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
+/* { dg-options "-mabi=64 -mr10k-cache-barrier=store" } */
/* Test that stores to uncached addresses do not get unnecessary
cache barriers. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c
index 68c4b7ef23..ad0d2b0491 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-10.c
@@ -1,18 +1,26 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mips4 -mbranch-likely -mno-abicalls" } */
-int bar (int);
+/* { dg-options "-mr10k-cache-barrier=store -mips4 -mbranch-likely -mno-abicalls" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+unsigned char *bar (int);
/* Test that code after a branch-likely does not get an unnecessary
cache barrier. */
NOMIPS16 void
-foo (int n, int *x)
+foo (unsigned char *n)
{
+ /* n starts in $4, but will be in $2 after the call to bar.
+ Encourage it to be in $2 on entry to the loop as well,
+ by doing some computation on it beforehand (D?ADDIU $2,$4,4).
+ dbr_schedule should then pull the *n load (L[WD] ...,0($2))
+ into the delay slot. */
+ n += 4;
do
- n = bar (n * 4 + 1);
+ n = bar (*n + 1);
while (n);
/* The preceding branch should be a branch likely, with the shift as
its delay slot. We therefore don't need a cache barrier here. */
- x[0] = 0;
+ n[0] = 0;
}
/* { dg-final { scan-assembler-not "\tcache\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c
index d1082d910d..936c2589d3 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-11.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
/* Test that loads are not unnecessarily protected. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c
index d416391090..34a12489cb 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-12.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=load-store -mno-abicalls" } */
+/* { dg-options "-mr10k-cache-barrier=load-store -mno-abicalls" } */
/* Test that loads are correctly protected. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c
index 3e955abf54..ee9c84b598 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-13.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store" } */
+/* { dg-options "-mr10k-cache-barrier=store" } */
/* Test that indirect calls are protected. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c
index 1fdcee0e25..92c37f497c 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-14.c
@@ -1,4 +1,4 @@
-/* { dg-options "(-mips16) -O2 -mr10k-cache-barrier=store" } */
+/* { dg-options "(-mips16) -mr10k-cache-barrier=store -ffat-lto-objects" } */
/* Test that indirect calls are protected. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c
index a3e7f0db92..da655cda14 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-15.c
@@ -1,2 +1,2 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mips2" } */
+/* { dg-options "-mr10k-cache-barrier=store -mips2" } */
/* { dg-error "requires.*cache.*instruction" "" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c
index 3d06d0ddb6..ebf45f94f3 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-2.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mabi=64 -mr10k-cache-barrier=store" } */
+/* { dg-options "-mabi=64 -mr10k-cache-barrier=store" } */
/* Test that stores to constant cached addresses are protected
by cache barriers. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c
index be2c7fbd76..9e56789813 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-3.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
/* Test that in-range stores to the frame are not protected by
cache barriers. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c
index 9dd23eafa7..7780460b2d 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-4.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
void bar (int *x);
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c
index a6b53a9ea3..757beefc23 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-5.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls -mabi=64" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-abicalls -mabi=64" } */
/* Test that in-range stores to static objects do not get an unnecessary
cache barrier. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c
index c52caaa1ad..32dd78cb58 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-6.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mabi=64" } */
+/* { dg-options "-mr10k-cache-barrier=store -mabi=64" } */
int x[4];
void bar (void);
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c
index 3f738654cc..3a7a2538ee 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-7.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -mno-abicalls" } */
+/* { dg-options "-mr10k-cache-barrier=store -mno-abicalls" } */
void bar1 (void);
void bar2 (void);
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c
index 394bf486f3..121b907233 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-8.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -G8" } */
+/* { dg-options "-mr10k-cache-barrier=store -G8" } */
/* Test that in-range stores to components of static objects
do not get an unnecessary cache barrier. */
diff --git a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
index 67b52f92d3..2f83968aad 100644
--- a/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
+++ b/gcc/testsuite/gcc.target/mips/r10k-cache-barrier-9.c
@@ -1,4 +1,4 @@
-/* { dg-options "-O2 -mr10k-cache-barrier=store -G8" } */
+/* { dg-options "-mr10k-cache-barrier=store -G8" } */
/* Test that out-of-range stores to components of static objects
are protected by a cache barrier. */
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-1.c b/gcc/testsuite/gcc.target/mips/rsqrt-1.c
index f0a9b3aed6..93fca39d60 100644
--- a/gcc/testsuite/gcc.target/mips/rsqrt-1.c
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-1.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math isa=4 -mhard-float -mgp64" } */
-/* { dg-final { scan-assembler "rsqrt.d" } } */
-/* { dg-final { scan-assembler "rsqrt.s" } } */
+/* { dg-options "-ffast-math isa=4 -mhard-float -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\trsqrt.d\t" } } */
+/* { dg-final { scan-assembler "\trsqrt.s\t" } } */
extern double sqrt(double);
extern float sqrtf(float);
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-2.c b/gcc/testsuite/gcc.target/mips/rsqrt-2.c
index bc81039d52..c35ca0c6ac 100644
--- a/gcc/testsuite/gcc.target/mips/rsqrt-2.c
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-2.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math isa=4 -mhard-float -mgp64" } */
-/* { dg-final { scan-assembler "rsqrt.d" } } */
-/* { dg-final { scan-assembler "rsqrt.s" } } */
+/* { dg-options "-ffast-math isa=4 -mhard-float -mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\trsqrt.d\t" } } */
+/* { dg-final { scan-assembler "\trsqrt.s\t" } } */
extern double sqrt(double);
extern float sqrtf(float);
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-3.c b/gcc/testsuite/gcc.target/mips/rsqrt-3.c
index cfa771ef86..25178f2c8f 100644
--- a/gcc/testsuite/gcc.target/mips/rsqrt-3.c
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-3.c
@@ -1,7 +1,8 @@
/* { dg-do compile } */
-/* { dg-options "-O2 isa=4 -mhard-float" } */
-/* { dg-final { scan-assembler-not "rsqrt.d" } } */
-/* { dg-final { scan-assembler-not "rsqrt.s" } } */
+/* { dg-options "isa=4 -mhard-float" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-not "\trsqrt.d\t" } } */
+/* { dg-final { scan-assembler-not "\trsqrt.s\t" } } */
extern double sqrt(double);
extern float sqrtf(float);
diff --git a/gcc/testsuite/gcc.target/mips/rsqrt-4.c b/gcc/testsuite/gcc.target/mips/rsqrt-4.c
index 726c35403d..6b6577e2e0 100644
--- a/gcc/testsuite/gcc.target/mips/rsqrt-4.c
+++ b/gcc/testsuite/gcc.target/mips/rsqrt-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -mips64 -mhard-float -mgp32" } */
+/* { dg-options "-ffast-math -mips64 -mhard-float -mgp32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\trsqrt.d\t" } } */
/* { dg-final { scan-assembler-times "\trsqrt.s\t" 2 } } */
diff --git a/gcc/testsuite/gcc.target/mips/save-restore-1.c b/gcc/testsuite/gcc.target/mips/save-restore-1.c
index ad92e5d75d..b3ce1b18dc 100644
--- a/gcc/testsuite/gcc.target/mips/save-restore-1.c
+++ b/gcc/testsuite/gcc.target/mips/save-restore-1.c
@@ -1,6 +1,5 @@
/* Check that we can use the save instruction to save varargs. */
-/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
-/* { dg-skip-if "PR target/46610" { mips-sgi-irix6* } } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32" } */
#include <stdarg.h>
diff --git a/gcc/testsuite/gcc.target/mips/save-restore-2.c b/gcc/testsuite/gcc.target/mips/save-restore-2.c
index 4a11bc2108..899460fe7b 100644
--- a/gcc/testsuite/gcc.target/mips/save-restore-2.c
+++ b/gcc/testsuite/gcc.target/mips/save-restore-2.c
@@ -1,5 +1,6 @@
/* Check that we can use the save instruction to save spilled arguments. */
-/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
MIPS16 void
foo (int *a, int b, int c)
diff --git a/gcc/testsuite/gcc.target/mips/save-restore-3.c b/gcc/testsuite/gcc.target/mips/save-restore-3.c
index 191362a284..5d7aeb0edd 100644
--- a/gcc/testsuite/gcc.target/mips/save-restore-3.c
+++ b/gcc/testsuite/gcc.target/mips/save-restore-3.c
@@ -1,7 +1,6 @@
/* Check that we can use the save instruction to save spilled arguments
when the argument save area is out of range of a direct load or store. */
-/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
-/* { dg-skip-if "PR target/46610" { mips-sgi-irix6* } } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32" } */
void bar (int *);
diff --git a/gcc/testsuite/gcc.target/mips/save-restore-4.c b/gcc/testsuite/gcc.target/mips/save-restore-4.c
index 5bc5bcc3d5..25f3e6199d 100644
--- a/gcc/testsuite/gcc.target/mips/save-restore-4.c
+++ b/gcc/testsuite/gcc.target/mips/save-restore-4.c
@@ -1,6 +1,6 @@
/* Check that we can use the save instruction to save $16, $17 and $31. */
-/* { dg-options "(-mips16) isa_rev>=1 -mabi=32 -O2" } */
-/* { dg-skip-if "PR target/46610" { mips-sgi-irix6* } } */
+/* { dg-options "(-mips16) isa_rev>=1 -mabi=32" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
void bar (void);
diff --git a/gcc/testsuite/gcc.target/mips/save-restore-5.c b/gcc/testsuite/gcc.target/mips/save-restore-5.c
index 52524b3b4f..b0dc1f057e 100644
--- a/gcc/testsuite/gcc.target/mips/save-restore-5.c
+++ b/gcc/testsuite/gcc.target/mips/save-restore-5.c
@@ -1,6 +1,5 @@
/* Check that we don't try to save the same register twice. */
-/* { dg-options "(-mips16) isa_rev>=1 -mgp32 -O2" } */
-/* { dg-skip-if "PR target/46610" { mips-sgi-irix6* } } */
+/* { dg-options "(-mips16) isa_rev>=1 -mgp32" } */
int bar (int, int, int, int);
void frob (void);
diff --git a/gcc/testsuite/gcc.target/mips/sb1-1.c b/gcc/testsuite/gcc.target/mips/sb1-1.c
index 819938fcdc..0c2ae066a7 100644
--- a/gcc/testsuite/gcc.target/mips/sb1-1.c
+++ b/gcc/testsuite/gcc.target/mips/sb1-1.c
@@ -1,10 +1,11 @@
/* Test SB-1 v2sf extensions. */
/* { dg-do compile } */
-/* { dg-options "-march=sb1 -O2 -mpaired-single -mgp64 -ffast-math" } */
-/* { dg-final { scan-assembler "div.ps" } } */
-/* { dg-final { scan-assembler "recip.ps" } } */
-/* { dg-final { scan-assembler "sqrt.ps" } } */
-/* { dg-final { scan-assembler "rsqrt.ps" } } */
+/* { dg-options "-march=sb1 -mpaired-single -mgp64 -ffast-math" } */
+/* { dg-skip-if "rsqrt code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tdiv.ps\t" } } */
+/* { dg-final { scan-assembler "\trecip.ps\t" } } */
+/* { dg-final { scan-assembler "\tsqrt.ps\t" } } */
+/* { dg-final { scan-assembler "\trsqrt.ps\t" } } */
typedef float v2sf __attribute__ ((vector_size (8)));
diff --git a/gcc/testsuite/gcc.target/mips/scc-1.c b/gcc/testsuite/gcc.target/mips/scc-1.c
index d0dc040151..17599a8375 100644
--- a/gcc/testsuite/gcc.target/mips/scc-1.c
+++ b/gcc/testsuite/gcc.target/mips/scc-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "(-mips16) -O isa_rev>=1" } */
+/* { dg-options "(-mips16) isa_rev>=1" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-times {slt \$2,\$5,\$4} 1 } } */
/* { dg-final { scan-assembler-times {sltu \$2,\$5,\$4} 1 } } */
diff --git a/gcc/testsuite/gcc.target/mips/scc-2.c b/gcc/testsuite/gcc.target/mips/scc-2.c
index 440c28b84b..132da7bcf6 100644
--- a/gcc/testsuite/gcc.target/mips/scc-2.c
+++ b/gcc/testsuite/gcc.target/mips/scc-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
/* { dg-final { scan-assembler-times "slt\t\|slti?u\t" 12 } } */
diff --git a/gcc/testsuite/gcc.target/mips/scc-3.c b/gcc/testsuite/gcc.target/mips/scc-3.c
index b295e782c2..a07a85adad 100644
--- a/gcc/testsuite/gcc.target/mips/scc-3.c
+++ b/gcc/testsuite/gcc.target/mips/scc-3.c
@@ -1,4 +1,5 @@
-/* { dg-options "(-mips16) -O -mabi=o64" } */
+/* { dg-options "(-mips16) -mabi=o64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "and\t\|andi\t\|ext\t\|sll\t\|srl\t" } } */
/* { dg-final { scan-assembler-times "slt\t\|slti?u\t" 8 } } */
diff --git a/gcc/testsuite/gcc.target/mips/scc-4.c b/gcc/testsuite/gcc.target/mips/scc-4.c
index 40460666c7..b8e289982a 100644
--- a/gcc/testsuite/gcc.target/mips/scc-4.c
+++ b/gcc/testsuite/gcc.target/mips/scc-4.c
@@ -1,8 +1,9 @@
/* { dg-do compile } */
-/* { dg-options "-O -mabi=o64" } */
+/* { dg-options "-mabi=o64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
-/* { dg-final { scan-assembler "slt\t" } } */
-/* { dg-final { scan-assembler "sltu\t\|xor\t\|xori\t" } } */
+/* { dg-final { scan-assembler "\tslt\t" } } */
+/* { dg-final { scan-assembler "\tsltu\t\|\txor\t\|\txori\t" } } */
/* This test should work both in mips16 and non-mips16 mode. */
diff --git a/gcc/testsuite/gcc.target/mips/sdata-1.c b/gcc/testsuite/gcc.target/mips/sdata-1.c
index f9a25cdc9f..646a449947 100644
--- a/gcc/testsuite/gcc.target/mips/sdata-1.c
+++ b/gcc/testsuite/gcc.target/mips/sdata-1.c
@@ -20,9 +20,9 @@
/* { dg-final { scan-assembler-not "%gp_?rel\\(g8b\\)" } } */
/* { dg-final { scan-assembler "%gp_?rel\\(g8c\\)" } } */
-static int l4a;
-static int l4b = 1;
-static int __attribute__((section(".sdata"))) l4c;
+static volatile int l4a;
+static volatile int l4b = 1;
+static volatile int __attribute__((section(".sdata"))) l4c;
extern int e4a;
extern int __attribute__((section(".sdata"))) e4b;
int __attribute__((common)) c4;
@@ -30,9 +30,9 @@ int __attribute__((nocommon)) g4a;
int g4b = 1;
int __attribute__((section(".sdata"))) g4c = 2;
-static int l8a[2];
-static int l8b[2] = { 1, 2 };
-static int __attribute__((section(".sdata"))) l8c[2];
+static volatile int l8a[2];
+static volatile int l8b[2] = { 1, 2 };
+static volatile int __attribute__((section(".sdata"))) l8c[2];
extern int e8a[2];
extern int __attribute__((section(".sdata"))) e8b[2];
int __attribute__((common)) c8[2];
diff --git a/gcc/testsuite/gcc.target/mips/sdata-2.c b/gcc/testsuite/gcc.target/mips/sdata-2.c
index 5a9fff2da1..fe55120f64 100644
--- a/gcc/testsuite/gcc.target/mips/sdata-2.c
+++ b/gcc/testsuite/gcc.target/mips/sdata-2.c
@@ -20,9 +20,9 @@
/* { dg-final { scan-assembler-not "%gp_?rel\\(g8b\\)" } } */
/* { dg-final { scan-assembler "%gp_?rel\\(g8c\\)" } } */
-static int l4a;
-static int l4b = 1;
-static int __attribute__((section(".sdata"))) l4c;
+static volatile int l4a;
+static volatile int l4b = 1;
+static volatile int __attribute__((section(".sdata"))) l4c;
extern int e4a;
extern int __attribute__((section(".sdata"))) e4b;
int __attribute__((common)) c4;
@@ -30,9 +30,9 @@ int __attribute__((nocommon)) g4a;
int g4b = 1;
int __attribute__((section(".sdata"))) g4c = 2;
-static int l8a[2];
-static int l8b[2] = { 1, 2 };
-static int __attribute__((section(".sdata"))) l8c[2];
+static volatile int l8a[2];
+static volatile int l8b[2] = { 1, 2 };
+static volatile int __attribute__((section(".sdata"))) l8c[2];
extern int e8a[2];
extern int __attribute__((section(".sdata"))) e8b[2];
int __attribute__((common)) c8[2];
diff --git a/gcc/testsuite/gcc.target/mips/sdata-3.c b/gcc/testsuite/gcc.target/mips/sdata-3.c
index f232324954..6705ee35a8 100644
--- a/gcc/testsuite/gcc.target/mips/sdata-3.c
+++ b/gcc/testsuite/gcc.target/mips/sdata-3.c
@@ -20,9 +20,9 @@
/* { dg-final { scan-assembler-not "%gp_?rel\\(g8b\\)" } } */
/* { dg-final { scan-assembler "%gp_?rel\\(g8c\\)" } } */
-static int l4a;
-static int l4b = 1;
-static int __attribute__((section(".sdata"))) l4c;
+static volatile int l4a;
+static volatile int l4b = 1;
+static volatile int __attribute__((section(".sdata"))) l4c;
extern int e4a;
extern int __attribute__((section(".sdata"))) e4b;
int __attribute__((common)) c4;
@@ -30,9 +30,9 @@ int __attribute__((nocommon)) g4a;
int g4b = 1;
int __attribute__((section(".sdata"))) g4c = 2;
-static int l8a[2];
-static int l8b[2] = { 1, 2 };
-static int __attribute__((section(".sdata"))) l8c[2];
+static volatile int l8a[2];
+static volatile int l8b[2] = { 1, 2 };
+static volatile int __attribute__((section(".sdata"))) l8c[2];
extern int e8a[2];
extern int __attribute__((section(".sdata"))) e8b[2];
int __attribute__((common)) c8[2];
diff --git a/gcc/testsuite/gcc.target/mips/sdata-4.c b/gcc/testsuite/gcc.target/mips/sdata-4.c
index 7786c6db9e..82cfa61f89 100644
--- a/gcc/testsuite/gcc.target/mips/sdata-4.c
+++ b/gcc/testsuite/gcc.target/mips/sdata-4.c
@@ -3,9 +3,9 @@
/* { dg-final { scan-assembler-not "%gp_?rel" } } */
/* { dg-final { scan-assembler-not "\\\$gp" } } */
-static int l4a;
-static int l4b = 1;
-static int __attribute__((section(".sdata"))) l4c;
+static volatile int l4a;
+static volatile int l4b = 1;
+static volatile int __attribute__((section(".sdata"))) l4c;
extern int e4a;
extern int __attribute__((section(".sdata"))) e4b;
int __attribute__((common)) c4;
@@ -13,9 +13,9 @@ int __attribute__((nocommon)) g4a;
int g4b = 1;
int __attribute__((section(".sdata"))) g4c = 2;
-static int l8a[2];
-static int l8b[2] = { 1, 2 };
-static int __attribute__((section(".sdata"))) l8c[2];
+static volatile int l8a[2];
+static volatile int l8b[2] = { 1, 2 };
+static volatile int __attribute__((section(".sdata"))) l8c[2];
extern int e8a[2];
extern int __attribute__((section(".sdata"))) e8b[2];
int __attribute__((common)) c8[2];
diff --git a/gcc/testsuite/gcc.target/mips/set-fcsr-1.c b/gcc/testsuite/gcc.target/mips/set-fcsr-1.c
new file mode 100644
index 0000000000..0237272cfc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/set-fcsr-1.c
@@ -0,0 +1,10 @@
+/* { dg-options "-mhard-float" } */
+/* { dg-skip-if "requiring \$4 is a code-quality test" { *-*-* } { "-O0" } { "" } } */
+
+NOMIPS16 void
+foo (unsigned int x)
+{
+ __builtin_mips_set_fcsr (x);
+}
+
+/* { dg-final { scan-assembler "ctc1\t\\\$4,\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/set-fcsr-2.c b/gcc/testsuite/gcc.target/mips/set-fcsr-2.c
new file mode 100644
index 0000000000..82696298f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/set-fcsr-2.c
@@ -0,0 +1,10 @@
+/* { dg-options "-mhard-float (-mips16)" } */
+
+MIPS16 void
+foo (unsigned int x)
+{
+ __builtin_mips_set_fcsr (x);
+}
+
+/* { dg-final { scan-assembler "__mips16_set_fcsr" } } */
+/* { dg-final { scan-assembler "ctc1\t\\\$4,\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c b/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
index 92f46250eb..ce64b13a77 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-lwxs.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -msmartmips" } */
+/* { dg-options "-msmartmips" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int scaled_indexed_word_load (int a[], int b)
{
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
index e9735b20a5..6300f8f03f 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -msmartmips" } */
+/* { dg-options "-msmartmips" } */
NOMIPS16 int rotate_left (unsigned a, unsigned s)
{
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
index ac4c94df8e..2d7c5dcd63 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -msmartmips" } */
+/* { dg-options "-msmartmips" } */
NOMIPS16 int rotate_right (unsigned a, unsigned s)
{
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
index 360f3c463f..5e51aa3f01 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -msmartmips" } */
+/* { dg-options "-msmartmips" } */
#define S 13
diff --git a/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
index b8b8294454..fc88a9a826 100644
--- a/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
+++ b/gcc/testsuite/gcc.target/mips/smartmips-ror-4.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O -msmartmips" } */
+/* { dg-options "-msmartmips" } */
#define S 13
diff --git a/gcc/testsuite/gcc.target/mips/soft-float-1.c b/gcc/testsuite/gcc.target/mips/soft-float-1.c
index 4c45646279..855ff8eadd 100644
--- a/gcc/testsuite/gcc.target/mips/soft-float-1.c
+++ b/gcc/testsuite/gcc.target/mips/soft-float-1.c
@@ -1,7 +1,8 @@
-/* { dg-options "-msoft-float" } */
+/* { dg-options "-msoft-float -ffat-lto-objects" } */
void
foo (void)
{
register float x asm ("$f0"); /* { dg-error "cannot be accessed" } */
+ asm volatile ("" : "=r" (x));
}
diff --git a/gcc/testsuite/gcc.target/mips/stack-1.c b/gcc/testsuite/gcc.target/mips/stack-1.c
index 3d495453dd..a28e4bf207 100644
--- a/gcc/testsuite/gcc.target/mips/stack-1.c
+++ b/gcc/testsuite/gcc.target/mips/stack-1.c
@@ -1,9 +1,9 @@
-/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler "addiu\t(\\\$sp,)?\\\$sp,\[1-9\]" } } */
+/* { dg-final { scan-assembler "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\]" } } */
/* { dg-final { scan-assembler "\tlw\t" } } */
-/* { dg-final { scan-assembler-not "addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */
+/* { dg-final { scan-assembler-not "\td?addiu\t(\\\$sp,)?\\\$sp,\[1-9\].*\tlw\t" } } */
-int foo (int y)
+/* Avoid use of SAVE and RESTORE. */
+NOMIPS16 int foo (int y)
{
volatile int a = y;
volatile int *volatile b = &a;
diff --git a/gcc/testsuite/gcc.target/mips/timode-1.c b/gcc/testsuite/gcc.target/mips/timode-1.c
index fc087ee1c3..606fee0cb1 100644
--- a/gcc/testsuite/gcc.target/mips/timode-1.c
+++ b/gcc/testsuite/gcc.target/mips/timode-1.c
@@ -1,4 +1,5 @@
/* { dg-options "-mgp64" } */
+/* { dg-skip-if "we deliberately use calls when optimizing for size" { *-*-* } { "-Os" } { "" } } */
typedef int int128_t __attribute__((mode(TI)));
typedef unsigned int uint128_t __attribute__((mode(TI)));
@@ -22,44 +23,84 @@ volatile int amount = 4;
volatile uint128_t result;
int
-main (void)
+test1 (void)
{
result = a * b;
if (result != c)
return 1;
+ return 0;
+}
+int
+test2 (void)
+{
result = c + d;
if (result != e)
return 1;
+ return 0;
+}
+int
+test3 (void)
+{
result = e - d;
if (result != c)
return 1;
+ return 0;
+}
+int
+test4 (void)
+{
result = d & e;
if (result != f)
return 1;
+ return 0;
+}
+int
+test5 (void)
+{
result = d ^ e;
if (result != g)
return 1;
+ return 0;
+}
+int
+test6 (void)
+{
result = d | e;
if (result != h)
return 1;
+ return 0;
+}
+int
+test7 (void)
+{
result = g << amount;
if (result != i)
return 1;
+ return 0;
+}
+int
+test8 (void)
+{
result = g >> amount;
if (result != j)
return 1;
+ return 0;
+}
+int
+test9 (void)
+{
result = (int128_t) g >> amount;
if (result != k)
return 1;
-
return 0;
}
+
/* { dg-final { scan-assembler-not "\tjal" } } */
diff --git a/gcc/testsuite/gcc.target/mips/timode-2.c b/gcc/testsuite/gcc.target/mips/timode-2.c
index 9f3e43c41b..b6b8ea99ba 100644
--- a/gcc/testsuite/gcc.target/mips/timode-2.c
+++ b/gcc/testsuite/gcc.target/mips/timode-2.c
@@ -23,43 +23,96 @@ volatile int amount = 4;
volatile uint128_t result;
int
-main (void)
+test1 (void)
{
result = a * b;
if (result != c)
return 1;
+ return 0;
+}
+int
+test2 (void)
+{
result = c + d;
if (result != e)
return 1;
+ return 0;
+}
+int
+test3 (void)
+{
result = e - d;
if (result != c)
return 1;
+ return 0;
+}
+int
+test4 (void)
+{
result = d & e;
if (result != f)
return 1;
+ return 0;
+}
+int
+test5 (void)
+{
result = d ^ e;
if (result != g)
return 1;
+ return 0;
+}
+int
+test6 (void)
+{
result = d | e;
if (result != h)
return 1;
+ return 0;
+}
+int
+test7 (void)
+{
result = g << amount;
if (result != i)
return 1;
+ return 0;
+}
+int
+test8 (void)
+{
result = g >> amount;
if (result != j)
return 1;
+ return 0;
+}
+int
+test9 (void)
+{
result = (int128_t) g >> amount;
if (result != k)
return 1;
-
return 0;
}
+
+int
+main (void)
+{
+ return (test1 ()
+ | test2 ()
+ | test3 ()
+ | test4 ()
+ | test5 ()
+ | test6 ()
+ | test7 ()
+ | test8 ()
+ | test9 ());
+}
diff --git a/gcc/testsuite/gcc.target/mips/truncate-1.c b/gcc/testsuite/gcc.target/mips/truncate-1.c
index 7e54aae3eb..d12ebd3111 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-1.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-1.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(ID, TYPE, SHIFT) \
int __attribute__((nomips16)) \
diff --git a/gcc/testsuite/gcc.target/mips/truncate-2.c b/gcc/testsuite/gcc.target/mips/truncate-2.c
index 423dc26f4d..06ab58f5a3 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-2.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-2.c
@@ -1,4 +1,5 @@
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
#define TEST(ID, TYPE, SHIFT) \
int NOMIPS16 \
diff --git a/gcc/testsuite/gcc.target/mips/truncate-3.c b/gcc/testsuite/gcc.target/mips/truncate-3.c
index 90f2c772f8..fcb69e4b44 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-3.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-3.c
@@ -1,5 +1,6 @@
/* Remove redundant operations in truncate's operand. */
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tandi?\t" } } */
f (long long d)
diff --git a/gcc/testsuite/gcc.target/mips/truncate-4.c b/gcc/testsuite/gcc.target/mips/truncate-4.c
index 4c783681ab..cda90e00cd 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-4.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-4.c
@@ -1,5 +1,6 @@
/* The and is performed in DI mode so there is no need for truncation. */
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tsll\t" } } */
NOMIPS16 unsigned long long
diff --git a/gcc/testsuite/gcc.target/mips/truncate-5.c b/gcc/testsuite/gcc.target/mips/truncate-5.c
index 6cdb7f71e7..f2a1875e95 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-5.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-5.c
@@ -1,6 +1,7 @@
/* If we AND in DI mode (i.e. replace the order of TRUNCATE and AND) then we
can remove the TRUNCATE. */
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
struct s
diff --git a/gcc/testsuite/gcc.target/mips/truncate-6.c b/gcc/testsuite/gcc.target/mips/truncate-6.c
index 1ccd6c59c3..178d4baa4c 100644
--- a/gcc/testsuite/gcc.target/mips/truncate-6.c
+++ b/gcc/testsuite/gcc.target/mips/truncate-6.c
@@ -1,7 +1,8 @@
/* setup_incoming_promotions should detect x to be already sign-extended due
to PROMOTE_MODE. Thus the truncation should be removed by combine. Based
on gcc.c-torture/execute/pr34070-2.c. */
-/* { dg-options "-O -mgp64" } */
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
/* { dg-final { scan-assembler-not "\tsll\t\[^\n\]*,0" } } */
NOMIPS16 int f(unsigned int x, int n, int *p)
diff --git a/gcc/testsuite/gcc.target/mips/truncate-8.c b/gcc/testsuite/gcc.target/mips/truncate-8.c
new file mode 100644
index 0000000000..f172b2223f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/truncate-8.c
@@ -0,0 +1,18 @@
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler "\tlw\t" } } */
+/* { dg-final { scan-assembler-not "\tsll\t" } } */
+/* { dg-final { scan-assembler-not "\tld\t" } } */
+
+struct s
+{
+ long long a;
+ int b;
+};
+
+int
+foo (struct s *x)
+{
+ return x->a;
+}
+
diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-1.c b/gcc/testsuite/gcc.target/mips/umips-branch-1.c
new file mode 100644
index 0000000000..441abcaf3a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-branch-1.c
@@ -0,0 +1,10 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+int MICROMIPS
+foo (void)
+{
+ return 0;
+}
+
+/* { dg-final { scan-assembler "\tjr?\t\\\$31\n\tmove\t\\\$2,\\\$0" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-2.c b/gcc/testsuite/gcc.target/mips/umips-branch-2.c
new file mode 100644
index 0000000000..1564763118
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-branch-2.c
@@ -0,0 +1,10 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+int MICROMIPS
+foo (int *x)
+{
+ return x[5000];
+}
+
+/* { dg-final { scan-assembler "\tjr?\t\\\$31\n\tlw\t\\\$2,20000\\(\\\$4\\)" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-3.c b/gcc/testsuite/gcc.target/mips/umips-branch-3.c
new file mode 100644
index 0000000000..8717362e04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-branch-3.c
@@ -0,0 +1,10 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (void)
+{
+ return;
+}
+
+/* { dg-final { scan-assembler "\tjrc\t\\\$31\n" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-branch-4.c b/gcc/testsuite/gcc.target/mips/umips-branch-4.c
new file mode 100644
index 0000000000..0bd21f63bc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-branch-4.c
@@ -0,0 +1,12 @@
+/* { dg-options "(-mmicromips) addressing=absolute" } */
+
+void foo (void);
+
+int MICROMIPS
+a (void)
+{
+ foo ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler "\tjals\tfoo\n\tnop" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-constraints-1.c b/gcc/testsuite/gcc.target/mips/umips-constraints-1.c
new file mode 100644
index 0000000000..ddec815b0f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-constraints-1.c
@@ -0,0 +1,14 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+MICROMIPS void
+foo (int *x)
+{
+ asm volatile ("insn1\t%a0" :: "ZD" (&x[0]));
+ asm volatile ("insn2\t%a0" :: "ZD" (&x[511]));
+ asm volatile ("insn3\t%a0" :: "ZD" (&x[512]));
+}
+
+/* { dg-final { scan-assembler "\tinsn1\t0\\(" } } */
+/* { dg-final { scan-assembler "\tinsn2\t2044\\(" } } */
+/* { dg-final { scan-assembler-not "\tinsn3\t2048\\(" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-constraints-2.c b/gcc/testsuite/gcc.target/mips/umips-constraints-2.c
new file mode 100644
index 0000000000..0240d46702
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-constraints-2.c
@@ -0,0 +1,14 @@
+/* { dg-options "(-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+MICROMIPS void
+foo (int *x)
+{
+ asm volatile ("insn1\t%0" :: "ZC" (x[0]));
+ asm volatile ("insn2\t%0" :: "ZC" (x[511]));
+ asm volatile ("insn3\t%0" :: "ZC" (x[512]));
+}
+
+/* { dg-final { scan-assembler "\tinsn1\t0\\(" } } */
+/* { dg-final { scan-assembler "\tinsn2\t2044\\(" } } */
+/* { dg-final { scan-assembler-not "\tinsn3\t2048\\(" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-1.c b/gcc/testsuite/gcc.target/mips/umips-lwp-1.c
new file mode 100644
index 0000000000..0cdb1b7f2b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-1.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[0];
+ int r6 = r4[1];
+ r4[2] = r5 * r5;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tlwp\t\\\$5,0\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-2.c b/gcc/testsuite/gcc.target/mips/umips-lwp-2.c
new file mode 100644
index 0000000000..ea3f396074
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-2.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[0];
+ int r6 = r4[1];
+ r4[2] = r6 * r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tlwp\t\\\$5,0\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-3.c b/gcc/testsuite/gcc.target/mips/umips-lwp-3.c
new file mode 100644
index 0000000000..2cb37510fe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-3.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[511];
+ int r6 = r4[512];
+ r4[2] = r5 * r5;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tlwp\t\\\$5,2044\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-4.c b/gcc/testsuite/gcc.target/mips/umips-lwp-4.c
new file mode 100644
index 0000000000..b8a86b4ed9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-4.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[511];
+ int r6 = r4[512];
+ r4[2] = r6 * r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tlwp\t\\\$5,2044\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-5.c b/gcc/testsuite/gcc.target/mips/umips-lwp-5.c
new file mode 100644
index 0000000000..2315f21e91
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-5.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[512];
+ int r6 = r4[513];
+ r4[2] = r5 * r5;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler-not "\tlwp" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-6.c b/gcc/testsuite/gcc.target/mips/umips-lwp-6.c
new file mode 100644
index 0000000000..9534974de8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-6.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4)
+{
+ int r5 = r4[512];
+ int r6 = r4[513];
+ r4[2] = r6 * r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[3]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler-not "\tlwp" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-7.c b/gcc/testsuite/gcc.target/mips/umips-lwp-7.c
new file mode 100644
index 0000000000..87ff6dc115
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-7.c
@@ -0,0 +1,41 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+f1 (int *r4, int dummy, int *other)
+{
+ int r5 = r4[1];
+ int newr4 = r4[0];
+ other[0] = r5 * r5;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r4asm asm ("$4") = newr4;
+ asm ("#foo" : "=m" (other[1]) : "d" (r4asm), "d" (r5asm));
+ }
+}
+
+void MICROMIPS
+f2 (int *r4, int dummy, int *other)
+{
+ int newr4 = r4[0];
+ int r5 = *(int *)(newr4 + 4);
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r4asm asm ("$4") = newr4;
+ asm ("#foo" : "=m" (other[0]) : "d" (r4asm), "d" (r5asm));
+ }
+}
+
+void MICROMIPS
+f3 (int dummy, int *r5, int *other)
+{
+ int newr5 = r5[1];
+ int r4 = *(int *)newr5;
+ {
+ register int r5asm asm ("$4") = r4;
+ register int r4asm asm ("$5") = newr5;
+ asm ("#foo" : "=m" (other[0]) : "d" (r4asm), "d" (r5asm));
+ }
+}
+
+/* { dg-final { scan-assembler-not "\tlwp" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-8.c b/gcc/testsuite/gcc.target/mips/umips-lwp-8.c
new file mode 100644
index 0000000000..43b98423df
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-8.c
@@ -0,0 +1,17 @@
+/* { dg-options "-mgp32 -fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+f1 (int dummy, int *r5, int *other)
+{
+ int r4 = r5[0];
+ int newr5 = r5[1];
+ other[0] = r4 * r4;
+ {
+ register int r5asm asm ("$4") = r4;
+ register int r4asm asm ("$5") = newr5;
+ asm ("#foo" : "=m" (other[1]) : "d" (r4asm), "d" (r5asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tlwp\t\\\$4,0\\(\\\$5\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c b/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c
new file mode 100644
index 0000000000..da2cbaff38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-lwp-swp-volatile.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-options "-mmicromips" } */
+
+/* This test ensures that we do not generate microMIPS SWP or LWP
+ instructions when any component of the accessed memory is volatile;
+ they are unsafe for such since they might cause replay of partial
+ accesses if interrupted by an exception. */
+
+static void set_csr (volatile void *p, int v)
+{
+ *(volatile int *) (p) = v;
+}
+
+static int get_csr (volatile void *p)
+{
+ return *(volatile int *) (p);
+}
+
+int main ()
+{
+ int i, q = 0, p = 0, r = 0;
+
+ for (i = 0; i < 20; i++)
+ {
+ set_csr ((volatile void *) 0xbf0100a8, 0xffff0002);
+ set_csr ((volatile void *) 0xbf0100a4, 0x80000008);
+ }
+
+ for (i = 0; i < 20; i++)
+ {
+ register int k, j;
+ k = get_csr ((volatile void *) 0xbf0100b8);
+ p += k;
+ j = get_csr ((volatile void *) 0xbf0100b4);
+ r += j;
+ q = j + k;
+ }
+ return q + r + p;
+}
+
+/* { dg-final { scan-assembler-not "\tswp" } } */
+/* { dg-final { scan-assembler-not "\tlwp" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-movep-1.c b/gcc/testsuite/gcc.target/mips/umips-movep-1.c
new file mode 100644
index 0000000000..0865b78bd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-movep-1.c
@@ -0,0 +1,16 @@
+/* Check that we can generate the MOVEP instruction. */
+/* { dg-options "-mgp32 -fpeephole2 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+long long bar (long long, long long);
+
+MICROMIPS long long
+foo (long long n, long long a)
+{
+ long long i, j;
+
+ i = bar (n, a);
+ j = bar (n, a);
+ return i + j;
+}
+/* { dg-final { scan-assembler "\tmovep\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-movep-2.c b/gcc/testsuite/gcc.target/mips/umips-movep-2.c
new file mode 100644
index 0000000000..5a3a8419ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-movep-2.c
@@ -0,0 +1,13 @@
+/* Check that we can generate the MOVEP instruction. */
+/* { dg-options "-fpeephole2 -mgp32 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+int bar (int, int);
+
+int MICROMIPS
+foo (int n, int a)
+{
+ return bar (0, 0);
+}
+
+/* { dg-final { scan-assembler "\tmovep\t\\\$4,\\\$5,\\\$0,\\\$0" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c
new file mode 100644
index 0000000000..ff1ea4b339
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-1.c
@@ -0,0 +1,18 @@
+/* Check that we can use the swm/lwm instructions. */
+/* { dg-options "-mabi=32 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+int bar (int, int, int, int, int);
+
+MICROMIPS int
+foo (int n, int a, int b, int c, int d)
+{
+ int i, j;
+
+ i = bar (n, a, b, c, d);
+ j = bar (n, a, b, c, d);
+ return i + j;
+}
+
+/* { dg-final { scan-assembler "\tswm\t\\\$16-\\\$2(0|1),\\\$31" } } */
+/* { dg-final { scan-assembler "\tlwm\t\\\$16-\\\$2(0|1),\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c
new file mode 100644
index 0000000000..cb421d5d4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-2.c
@@ -0,0 +1,16 @@
+/* Check that we can use the save instruction to save spilled arguments. */
+/* { dg-options "-mabi=32 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+MICROMIPS void
+foo (int *a, int b, int c)
+{
+ asm volatile ("" ::: "$2", "$3", "$4", "$5", "$6", "$7", "$8",
+ "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$16",
+ "$17", "$18", "$19", "$20", "$21", "$22", "$23", "$24",
+ "$25", "$30", "memory");
+ a[b] = 1;
+ a[c] = 1;
+}
+/* { dg-final { scan-assembler "\tswm\t\\\$16-\\\$23,\\\$fp" } } */
+/* { dg-final { scan-assembler "\tlwm\t\\\$16-\\\$23,\\\$fp" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c b/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c
new file mode 100644
index 0000000000..22c6f45f71
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-save-restore-3.c
@@ -0,0 +1,14 @@
+/* Check that we can use the swm instruction to save $16, $17 and $31. */
+/* { dg-options "-mgp32 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void bar (void);
+
+MICROMIPS void
+foo (void)
+{
+ bar ();
+ asm volatile ("" ::: "$16", "$17");
+}
+/* { dg-final { scan-assembler "\tswm\t\\\$16-\\\$17,\\\$31" } } */
+/* { dg-final { scan-assembler "\tlwm\t\\\$16-\\\$17,\\\$31" } } */
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-1.c b/gcc/testsuite/gcc.target/mips/umips-swp-1.c
new file mode 100644
index 0000000000..5e337b27b6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-1.c
@@ -0,0 +1,10 @@
+/* { dg-options "-fpeephole2 -mgp32 (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (long long l1, long long *l2)
+{
+ *l2 = l1;
+}
+
+/* { dg-final { scan-assembler "\tswp\t\\\$4,0\\(\\\$6\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-2.c b/gcc/testsuite/gcc.target/mips/umips-swp-2.c
new file mode 100644
index 0000000000..042322c217
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-2.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r6 *= r6;
+ r4[0] = r5;
+ r4[1] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tswp\t\\\$5,0\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-3.c b/gcc/testsuite/gcc.target/mips/umips-swp-3.c
new file mode 100644
index 0000000000..f0e54647d9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-3.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r5 *= r5;
+ r4[0] = r5;
+ r4[1] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tswp\t\\\$5,0\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-4.c b/gcc/testsuite/gcc.target/mips/umips-swp-4.c
new file mode 100644
index 0000000000..5e8f5ea2a7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-4.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r6 *= r6;
+ r4[511] = r5;
+ r4[512] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tswp\t\\\$5,2044\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-5.c b/gcc/testsuite/gcc.target/mips/umips-swp-5.c
new file mode 100644
index 0000000000..dc1938e47b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-5.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r5 *= r5;
+ r4[511] = r5;
+ r4[512] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler "\tswp\t\\\$5,2044\\(\\\$4\\)" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-6.c b/gcc/testsuite/gcc.target/mips/umips-swp-6.c
new file mode 100644
index 0000000000..b489006ce9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-6.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r6 *= r6;
+ r4[512] = r5;
+ r4[513] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler-not "\tswp" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/umips-swp-7.c b/gcc/testsuite/gcc.target/mips/umips-swp-7.c
new file mode 100644
index 0000000000..6dde49b8a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/umips-swp-7.c
@@ -0,0 +1,17 @@
+/* { dg-options "-fpeephole2 -mtune=m14k (-mmicromips)" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+
+void MICROMIPS
+foo (int *r4, int r5, int r6)
+{
+ r5 *= r5;
+ r4[512] = r5;
+ r4[513] = r6;
+ {
+ register int r5asm asm ("$5") = r5;
+ register int r6asm asm ("$6") = r6;
+ asm ("#foo" : "=m" (r4[2]) : "d" (r5asm), "d" (r6asm));
+ }
+}
+
+/* { dg-final { scan-assembler-not "\tswp" } }*/
diff --git a/gcc/testsuite/gcc.target/mips/unaligned-1.c b/gcc/testsuite/gcc.target/mips/unaligned-1.c
new file mode 100644
index 0000000000..938f52d21f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/mips/unaligned-1.c
@@ -0,0 +1,45 @@
+/* { dg-options "-mgp64" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
+/* { dg-final { scan-assembler-times "\tsdl\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tsdr\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tldl\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tldr\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tswl\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tswr\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tlwl\t" 1 } } */
+/* { dg-final { scan-assembler-times "\tlwr\t" 1 } } */
+/* { dg-final { scan-assembler-not "\tnop" } } */
+
+/* Test to make sure we produce the unaligned load/store for
+ both 64bit and 32bits sized accesses. */
+
+struct s
+{
+ char c;
+ int i;
+ long long l;
+} __attribute__ ((packed)) s __attribute__((aligned(1) ));
+
+NOMIPS16 void
+sd (long long l)
+{
+ s.l = l;
+}
+
+NOMIPS16 long long
+ld ()
+{
+ return s.l;
+}
+
+NOMIPS16 void
+sw (int i)
+{
+ s.i = i;
+}
+
+NOMIPS16 int
+lw ()
+{
+ return s.i;
+}
diff --git a/gcc/testsuite/gcc.target/mips/vr-mult-1.c b/gcc/testsuite/gcc.target/mips/vr-mult-1.c
index 2ed4f2f9b0..db9ae3430a 100644
--- a/gcc/testsuite/gcc.target/mips/vr-mult-1.c
+++ b/gcc/testsuite/gcc.target/mips/vr-mult-1.c
@@ -1,7 +1,8 @@
/* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
is preferred over mtlo/msac. */
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5400" } */
+/* { dg-options "-march=vr5400 -fpeephole2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int f1 (int a, int b, int c) { return a + b * c; }
NOMIPS16 int f2 (int a, int b, int c) { return a - b * c; }
/* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */
diff --git a/gcc/testsuite/gcc.target/mips/vr-mult-2.c b/gcc/testsuite/gcc.target/mips/vr-mult-2.c
index 7e8be5e428..58bdc08933 100644
--- a/gcc/testsuite/gcc.target/mips/vr-mult-2.c
+++ b/gcc/testsuite/gcc.target/mips/vr-mult-2.c
@@ -1,7 +1,8 @@
/* Make sure that mul/addu is preferred over mtlo/macc and that mul/subu
is preferred over mtlo/msac. */
/* { dg-do compile } */
-/* { dg-options "-O2 -march=vr5500" } */
+/* { dg-options "-march=vr5500 -fpeephole2" } */
+/* { dg-skip-if "code quality test" { *-*-* } { "-O0" } { "" } } */
NOMIPS16 int f1 (int a, int b, int c) { return a + b * c; }
NOMIPS16 int f2 (int a, int b, int c) { return a - b * c; }
/* { dg-final { scan-assembler "\tmul\t.*\tmul\t" } } */
diff --git a/gcc/testsuite/gcc.target/nds32/basic-main.c b/gcc/testsuite/gcc.target/nds32/basic-main.c
new file mode 100644
index 0000000000..6fdbc357fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/basic-main.c
@@ -0,0 +1,9 @@
+/* This is a basic main function test program. */
+
+/* { dg-do run } */
+/* { dg-options "-O0" } */
+
+int main(void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-isb.c b/gcc/testsuite/gcc.target/nds32/builtin-isb.c
new file mode 100644
index 0000000000..e65061bae0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-isb.c
@@ -0,0 +1,11 @@
+/* Verify that we generate isb instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tisb" } } */
+
+void
+test (void)
+{
+ __builtin_nds32_isb ();
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-isync.c b/gcc/testsuite/gcc.target/nds32/builtin-isync.c
new file mode 100644
index 0000000000..3160e4ad38
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-isync.c
@@ -0,0 +1,12 @@
+/* Verify that we generate isync instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tisync" } } */
+
+void
+test (void)
+{
+ int *addr = (int *) 0x53000000;
+ __builtin_nds32_isync (addr);
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-mfsr-mtsr.c b/gcc/testsuite/gcc.target/nds32/builtin-mfsr-mtsr.c
new file mode 100644
index 0000000000..db4c55845c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-mfsr-mtsr.c
@@ -0,0 +1,17 @@
+/* Verify that we generate mfsr/mtsr instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tmfsr" } } */
+/* { dg-final { scan-assembler "\\tmtsr" } } */
+
+#include <nds32_intrinsic.h>
+
+void
+test (void)
+{
+ int ipsw_value;
+
+ ipsw_value = __builtin_nds32_mfsr (__NDS32_REG_IPSW__);
+ __builtin_nds32_mtsr (ipsw_value, __NDS32_REG_IPSW__);
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-mfusr-mtusr.c b/gcc/testsuite/gcc.target/nds32/builtin-mfusr-mtusr.c
new file mode 100644
index 0000000000..3cfaab9511
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-mfusr-mtusr.c
@@ -0,0 +1,17 @@
+/* Verify that we generate mfusr/mtusr instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tmfusr" } } */
+/* { dg-final { scan-assembler "\\tmtusr" } } */
+
+#include <nds32_intrinsic.h>
+
+void
+test (void)
+{
+ int itype_value;
+
+ itype_value = __builtin_nds32_mfusr (__NDS32_REG_ITYPE__);
+ __builtin_nds32_mtusr (itype_value, __NDS32_REG_ITYPE__);
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-setgie-dis.c b/gcc/testsuite/gcc.target/nds32/builtin-setgie-dis.c
new file mode 100644
index 0000000000..2dceed98ac
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-setgie-dis.c
@@ -0,0 +1,11 @@
+/* Verify that we generate setgie.d instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tsetgie.d" } } */
+
+void
+test (void)
+{
+ __builtin_nds32_setgie_dis ();
+}
diff --git a/gcc/testsuite/gcc.target/nds32/builtin-setgie-en.c b/gcc/testsuite/gcc.target/nds32/builtin-setgie-en.c
new file mode 100644
index 0000000000..892887019c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/builtin-setgie-en.c
@@ -0,0 +1,11 @@
+/* Verify that we generate setgie.e instruction with builtin function. */
+
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "\\tsetgie.e" } } */
+
+void
+test (void)
+{
+ __builtin_nds32_setgie_en ();
+}
diff --git a/gcc/testsuite/gcc.target/nds32/nds32.exp b/gcc/testsuite/gcc.target/nds32/nds32.exp
new file mode 100644
index 0000000000..14665653a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nds32/nds32.exp
@@ -0,0 +1,45 @@
+# Target test cases of Andes NDS32 cpu for GNU compiler
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+# Contributed by Andes Technology Corporation.
+#
+# This file is part of GCC.
+#
+# GCC is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published
+# by the Free Software Foundation; either version 3, or (at your
+# option) any later version.
+#
+# GCC is distributed in the hope that it will be useful, but WITHOUT
+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
+# License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a nds32 target.
+if ![istarget nds32*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/nios2/biggot-1.c b/gcc/testsuite/gcc.target/nios2/biggot-1.c
new file mode 100644
index 0000000000..49b14ed0c2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/biggot-1.c
@@ -0,0 +1,67 @@
+/* Check that the GOT pointer is being initialized correctly to allow
+ access to the full 64K maximum GOT size for -fpic, rather than only 32K
+ (which would happen if the GOT pointer points to the base of the GOT,
+ as the GOT16 and CALL16 relocations are signed). */
+
+/* { dg-options "-fpic" } */
+/* { dg-do run { target nios2-*-linux-gnu } } */
+
+extern void abort (void);
+
+static int n = 0;
+
+void
+doit (int m)
+{
+ if (m != n)
+ abort ();
+ n++;
+}
+
+#define X(N) \
+ void f_##N (void) { doit (0x##N); }
+
+#define F(N) f_##N ();
+
+#define A(N) \
+ X(N##0) X(N##1) X(N##2) X(N##3) X(N##4) X(N##5) X(N##6) X(N##7) \
+ X(N##8) X(N##9) X(N##a) X(N##b) X(N##c) X(N##d) X(N##e) X(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define B(N) \
+ A(N##0) A(N##1) A(N##2) A(N##3) A(N##4) A(N##5) A(N##6) A(N##7) \
+ A(N##8) A(N##9) A(N##a) A(N##b) A(N##c) A(N##d) A(N##e) A(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define C(N) \
+ B(N##0) B(N##1) B(N##2) B(N##3) B(N##4) B(N##5) B(N##6) B(N##7) \
+ B(N##8) B(N##9) B(N##a) B(N##b) B(N##c) B(N##d) B(N##e) B(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define D(N) \
+ C(N##0) C(N##1) C(N##2) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) \
+ }
+
+/* This defines 16x16x16x3 leaf functions, requiring something over
+ 48K of GOT space overall. */
+D(0)
+
+int
+main (void)
+{
+ f_0 ();
+ if (n != 16*16*16*3)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/biggot-2.c b/gcc/testsuite/gcc.target/nios2/biggot-2.c
new file mode 100644
index 0000000000..7a34d3f6de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/biggot-2.c
@@ -0,0 +1,68 @@
+/* Check that a program that requires large-GOT support builds and
+ executes without error. This program defines a very large number
+ of leaf functions; compiled with -fPIC, they all require GOT
+ entries, which will overflow the range addressible by 16-bit -fpic
+ offsets by about a factor of 2. */
+
+/* { dg-options "-fPIC" } */
+/* { dg-do run { target nios2-*-linux-gnu } } */
+
+extern void abort (void);
+
+static int n = 0;
+
+void
+doit (int m)
+{
+ if (m != n)
+ abort ();
+ n++;
+}
+
+#define X(N) \
+ void f_##N (void) { doit (0x##N); }
+
+#define F(N) f_##N ();
+
+#define A(N) \
+ X(N##0) X(N##1) X(N##2) X(N##3) X(N##4) X(N##5) X(N##6) X(N##7) \
+ X(N##8) X(N##9) X(N##a) X(N##b) X(N##c) X(N##d) X(N##e) X(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define B(N) \
+ A(N##0) A(N##1) A(N##2) A(N##3) A(N##4) A(N##5) A(N##6) A(N##7) \
+ A(N##8) A(N##9) A(N##a) A(N##b) A(N##c) A(N##d) A(N##e) A(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define C(N) \
+ B(N##0) B(N##1) B(N##2) B(N##3) B(N##4) B(N##5) B(N##6) B(N##7) \
+ B(N##8) B(N##9) B(N##a) B(N##b) B(N##c) B(N##d) B(N##e) B(N##f) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ F(N##8) F(N##9) F(N##a) F(N##b) F(N##c) F(N##d) F(N##e) F(N##f) \
+ }
+
+#define D(N) \
+ C(N##0) C(N##1) C(N##2) C(N##3) C(N##4) C(N##5) C(N##6) C(N##7) \
+ void f_##N (void) { \
+ F(N##0) F(N##1) F(N##2) F(N##3) F(N##4) F(N##5) F(N##6) F(N##7) \
+ }
+
+/* This defines 16x16x16x8 leaf functions, requiring something over
+ 128K of GOT space overall. */
+D(0)
+
+int
+main (void)
+{
+ f_0 ();
+ if (n != 16*16*16*8)
+ abort ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-1.c b/gcc/testsuite/gcc.target/nios2/custom-fp-1.c
new file mode 100644
index 0000000000..c9afa68297
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-1.c
@@ -0,0 +1,22 @@
+/* Test specification of custom instructions via command-line options. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only -mcustom-fmaxs=246 -mcustom-fmins=247 -mcustom-fsqrts=251" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+ result[2] = sqrtf (operand_a);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
+/* { dg-final { scan-assembler "custom\\t251, .* # fsqrts .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-2.c b/gcc/testsuite/gcc.target/nios2/custom-fp-2.c
new file mode 100644
index 0000000000..fc7c643705
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-2.c
@@ -0,0 +1,26 @@
+/* Test specification of custom instructions via pragmas. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+#pragma GCC target ("custom-fmaxs=246")
+#pragma GCC target ("custom-fmins=247")
+#pragma GCC target ("custom-fsqrts=251")
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+ result[2] = sqrtf (operand_a);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
+/* { dg-final { scan-assembler "custom\\t251, .* # fsqrts .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-3.c b/gcc/testsuite/gcc.target/nios2/custom-fp-3.c
new file mode 100644
index 0000000000..703bc9fa5b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-3.c
@@ -0,0 +1,26 @@
+/* Test specification of custom instructions via function attributes. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmaxs=246,custom-fmins=247,custom-fsqrts=251")));
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+ result[2] = sqrtf (operand_a);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
+/* { dg-final { scan-assembler "custom\\t251, .* # fsqrts .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-4.c b/gcc/testsuite/gcc.target/nios2/custom-fp-4.c
new file mode 100644
index 0000000000..6c5f2a24be
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-4.c
@@ -0,0 +1,29 @@
+/* Test conflict between pragma and attribute specification of custom
+ instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+/* This test case is expected to cause an error because GCC does not know
+ how to merge different custom instruction attribute sets. The extern
+ declaration sees the options specified by both the pragma and the function
+ attribute, but the function definition sees only the pragma options. */
+
+#pragma GCC target ("custom-fmaxs=246")
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmins=247")));
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{ /* { dg-error "conflicting" } */
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-5.c b/gcc/testsuite/gcc.target/nios2/custom-fp-5.c
new file mode 100644
index 0000000000..1dba87a4e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-5.c
@@ -0,0 +1,26 @@
+/* Test that forward declaration and definition don't conflict when used
+ with pragma specification of custom instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+#pragma GCC target ("custom-fmaxs=246,custom-fmins=247")
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result);
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-6.c b/gcc/testsuite/gcc.target/nios2/custom-fp-6.c
new file mode 100644
index 0000000000..7540c57b28
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-6.c
@@ -0,0 +1,30 @@
+/* Test conflict between pragma and attribute specification of custom
+ instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+/* This test case is expected to cause an error because GCC does not know
+ how to merge different custom instruction attribute sets, even if they
+ do not overlap. */
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmaxs=246")));
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmins=247"))); /* { dg-error "conflicting" } */
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-7.c b/gcc/testsuite/gcc.target/nios2/custom-fp-7.c
new file mode 100644
index 0000000000..6f17336fbb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-7.c
@@ -0,0 +1,33 @@
+/* Test that duplicate declarations with the same custom insn attributes
+ don't cause an error. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+/* This test case is expected to cause an error because GCC does not know
+ how to merge different custom instruction attribute sets, even if they
+ do not overlap. */
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmaxs=246,custom-fmins=247")));
+
+extern void
+custom_fp (float operand_a, float operand_b, float *result)
+ __attribute__ ((target ("custom-fmaxs=246,custom-fmins=247")));
+
+void
+custom_fp (float operand_a, float operand_b, float *result)
+{
+ result[0] = fmaxf (operand_a, operand_b);
+ result[1] = fminf (operand_a, operand_b);
+}
+
+/* { dg-final { scan-assembler "custom\\t246, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t247, .* # fmins .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-8.c b/gcc/testsuite/gcc.target/nios2/custom-fp-8.c
new file mode 100644
index 0000000000..32f8a04147
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-8.c
@@ -0,0 +1,24 @@
+/* Test whitespace skipping in target attributes. */
+
+/* { dg-do compile } */
+
+#pragma GCC target ("custom-fdivs=246")
+#pragma GCC target (" custom-fdivs=246")
+#pragma GCC target ("custom-fdivs =246")
+#pragma GCC target ("custom-fdivs= 246")
+#pragma GCC target ("custom-fdivs=246 ")
+
+#pragma GCC target ("custom-fdivs=246,custom-fabss=247")
+#pragma GCC target ("custom-fdivs=246 ,custom-fabss=247")
+#pragma GCC target ("custom-fdivs=246, custom-fabss=247")
+#pragma GCC target ("custom-fdivs=246 , custom-fabss=247")
+
+void foo (void) __attribute__ ((target ("custom-fcmpnes=226,custom-fcmpeqs=227")));
+void foo (void) __attribute__ ((target ("custom-fcmpnes =226 ,custom-fcmpeqs=227")));
+void foo (void) __attribute__ ((target ("custom-fcmpnes= 226, custom-fcmpeqs=227")));
+void foo (void) __attribute__ ((target (" custom-fcmpnes=226 , custom-fcmpeqs = 227")));
+void foo (void) __attribute__ ((target (" custom-fcmpnes=226 ,custom-fcmpeqs =227 ")));
+
+#pragma GCC target ("custom-fpu-cfg=60-1")
+#pragma GCC target ("custom-fpu-cfg =60-1 ")
+#pragma GCC target (" custom-fpu-cfg= 60-1 ")
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-cmp-1.c b/gcc/testsuite/gcc.target/nios2/custom-fp-cmp-1.c
new file mode 100644
index 0000000000..b290c41e47
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-cmp-1.c
@@ -0,0 +1,53 @@
+/* Test generation of floating-point compare custom instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#pragma GCC target ("custom-frdxhi=40")
+#pragma GCC target ("custom-frdxlo=41")
+#pragma GCC target ("custom-frdy=42")
+#pragma GCC target ("custom-fwrx=43")
+#pragma GCC target ("custom-fwry=44")
+
+#pragma GCC target ("custom-fcmpeqs=200")
+
+int
+test_fcmpeqs (float a, float b)
+{
+ return (a == b);
+}
+
+/* { dg-final { scan-assembler "custom\\t200, .* # fcmpeqs .*" } } */
+
+#pragma GCC target ("custom-fcmpgtd=201")
+
+int
+test_fcmpgtd (double a, double b)
+{
+ return (a > b);
+}
+
+/* { dg-final { scan-assembler "custom\\t201, .* # fcmpgtd .*" } } */
+
+#pragma GCC target ("custom-fcmples=202")
+
+int
+test_fcmples (float a, float b)
+{
+ return (a <= b);
+}
+
+/* { dg-final { scan-assembler "custom\\t202, .* # fcmples .*" } } */
+
+#pragma GCC target ("custom-fcmpned=203")
+
+int
+test_fcmpned (double a, double b)
+{
+ return (a != b);
+}
+
+/* { dg-final { scan-assembler "custom\\t203, .* # fcmpned .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-conversion.c b/gcc/testsuite/gcc.target/nios2/custom-fp-conversion.c
new file mode 100644
index 0000000000..20b2159960
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-conversion.c
@@ -0,0 +1,66 @@
+/* Test generation of conversion custom instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only -funsafe-math-optimizations" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+#pragma GCC target ("custom-frdxhi=40")
+#pragma GCC target ("custom-frdxlo=41")
+#pragma GCC target ("custom-frdy=42")
+#pragma GCC target ("custom-fwrx=43")
+#pragma GCC target ("custom-fwry=44")
+
+#pragma GCC target ("custom-fextsd=100")
+#pragma GCC target ("custom-fixdi=101")
+#pragma GCC target ("custom-fixdu=102")
+#pragma GCC target ("custom-fixsi=103")
+#pragma GCC target ("custom-fixsu=104")
+#pragma GCC target ("custom-floatid=105")
+#pragma GCC target ("custom-floatis=106")
+#pragma GCC target ("custom-floatud=107")
+#pragma GCC target ("custom-floatus=108")
+#pragma GCC target ("custom-ftruncds=109")
+
+typedef struct data {
+ double fextsd;
+ int fixdi;
+ unsigned fixdu;
+ int fixsi;
+ unsigned fixsu;
+ double floatid;
+ float floatis;
+ double floatud;
+ float floatus;
+ float ftruncds;
+} data_t;
+
+void
+custom_fp (int i, unsigned u, float f, double d, data_t *out)
+{
+ out->fextsd = (double) f;
+ out->fixdi = (int) d;
+ out->fixdu = (unsigned) d;
+ out->fixsi = (int) f;
+ out->fixsu = (unsigned) f;
+ out->floatid = (double) i;
+ out->floatis = (float) i;
+ out->floatud = (double) u;
+ out->floatus = (float) u;
+ out->ftruncds = (float) d;
+}
+
+/* { dg-final { scan-assembler "custom\\t100, .* # fextsd .*" } } */
+/* { dg-final { scan-assembler "custom\\t101, .* # fixdi .*" } } */
+/* { dg-final { scan-assembler "custom\\t102, .* # fixdu .*" } } */
+/* { dg-final { scan-assembler "custom\\t103, .* # fixsi .*" } } */
+/* { dg-final { scan-assembler "custom\\t104, .* # fixsu .*" } } */
+/* { dg-final { scan-assembler "custom\\t105, .* # floatid .*" } } */
+/* { dg-final { scan-assembler "custom\\t106, .* # floatis .*" } } */
+/* { dg-final { scan-assembler "custom\\t107, .* # floatud .*" } } */
+/* { dg-final { scan-assembler "custom\\t108, .* # floatus .*" } } */
+/* { dg-final { scan-assembler "custom\\t109, .* # ftruncds .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-double.c b/gcc/testsuite/gcc.target/nios2/custom-fp-double.c
new file mode 100644
index 0000000000..d907c572af
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-double.c
@@ -0,0 +1,86 @@
+/* Test generation of all double-float custom instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only -funsafe-math-optimizations" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+#pragma GCC target ("custom-frdxhi=40")
+#pragma GCC target ("custom-frdxlo=41")
+#pragma GCC target ("custom-frdy=42")
+#pragma GCC target ("custom-fwrx=43")
+#pragma GCC target ("custom-fwry=44")
+
+#pragma GCC target ("custom-fabsd=100")
+#pragma GCC target ("custom-faddd=101")
+#pragma GCC target ("custom-fatand=102")
+#pragma GCC target ("custom-fcosd=103")
+#pragma GCC target ("custom-fdivd=104")
+#pragma GCC target ("custom-fexpd=105")
+#pragma GCC target ("custom-flogd=106")
+#pragma GCC target ("custom-fmaxd=107")
+#pragma GCC target ("custom-fmind=108")
+#pragma GCC target ("custom-fmuld=109")
+#pragma GCC target ("custom-fnegd=110")
+#pragma GCC target ("custom-fsind=111")
+#pragma GCC target ("custom-fsqrtd=112")
+#pragma GCC target ("custom-fsubd=113")
+#pragma GCC target ("custom-ftand=114")
+#pragma GCC target ("custom-fcmpeqd=200")
+#pragma GCC target ("custom-fcmpged=201")
+#pragma GCC target ("custom-fcmpgtd=202")
+#pragma GCC target ("custom-fcmpled=203")
+#pragma GCC target ("custom-fcmpltd=204")
+#pragma GCC target ("custom-fcmpned=205")
+
+void
+custom_fp (double a, double b, double *fp, int *ip)
+{
+ fp[0] = fabs (a);
+ fp[1] = a + b;
+ fp[2] = atan (a);
+ fp[3] = cos (a);
+ fp[4] = a / b;
+ fp[5] = exp (a);
+ fp[6] = log (a);
+ fp[7] = fmax (a, b);
+ fp[8] = fmin (a, b);
+ fp[9] = a * b;
+ fp[10] = -b;
+ fp[11] = sin (b);
+ fp[12] = sqrt (a);
+ fp[13] = a - b;
+ fp[14] = tan (a);
+ ip[0] = (a == fp[0]);
+ ip[1] = (a >= fp[1]);
+ ip[2] = (a > fp[2]);
+ ip[3] = (a <= fp[3]);
+ ip[4] = (a < fp[4]);
+ ip[5] = (a != fp[5]);
+}
+
+/* { dg-final { scan-assembler "custom\\t100, .* # fabsd .*" } } */
+/* { dg-final { scan-assembler "custom\\t101, .* # faddd .*" } } */
+/* { dg-final { scan-assembler "custom\\t102, .* # fatand .*" } } */
+/* { dg-final { scan-assembler "custom\\t103, .* # fcosd .*" } } */
+/* { dg-final { scan-assembler "custom\\t104, .* # fdivd .*" } } */
+/* { dg-final { scan-assembler "custom\\t105, .* # fexpd .*" } } */
+/* { dg-final { scan-assembler "custom\\t106, .* # flogd .*" } } */
+/* { dg-final { scan-assembler "custom\\t107, .* # fmaxd .*" } } */
+/* { dg-final { scan-assembler "custom\\t108, .* # fmind .*" } } */
+/* { dg-final { scan-assembler "custom\\t109, .* # fmuld .*" } } */
+/* { dg-final { scan-assembler "custom\\t110, .* # fnegd .*" } } */
+/* { dg-final { scan-assembler "custom\\t111, .* # fsind .*" } } */
+/* { dg-final { scan-assembler "custom\\t112, .* # fsqrtd .*" } } */
+/* { dg-final { scan-assembler "custom\\t113, .* # fsubd .*" } } */
+/* { dg-final { scan-assembler "custom\\t114, .* # ftand .*" } } */
+/* { dg-final { scan-assembler "custom\\t200, .* # fcmpeqd .*" } } */
+/* { dg-final { scan-assembler "custom\\t201, .* # fcmpged .*" } } */
+/* { dg-final { scan-assembler "custom\\t202, .* # fcmpgtd .*" } } */
+/* { dg-final { scan-assembler "custom\\t203, .* # fcmpled .*" } } */
+/* { dg-final { scan-assembler "custom\\t204, .* # fcmpltd .*" } } */
+/* { dg-final { scan-assembler "custom\\t205, .* # fcmpned .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/custom-fp-float.c b/gcc/testsuite/gcc.target/nios2/custom-fp-float.c
new file mode 100644
index 0000000000..26919d2f20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/custom-fp-float.c
@@ -0,0 +1,80 @@
+/* Test generation of all single-float custom instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only -funsafe-math-optimizations" } */
+
+/* -O1 in the options is significant. Without it FP operations may not be
+ optimized to custom instructions. */
+
+#include <stdio.h>
+#include <math.h>
+
+#pragma GCC target ("custom-fabss=100")
+#pragma GCC target ("custom-fadds=101")
+#pragma GCC target ("custom-fatans=102")
+#pragma GCC target ("custom-fcoss=103")
+#pragma GCC target ("custom-fdivs=104")
+#pragma GCC target ("custom-fexps=105")
+#pragma GCC target ("custom-flogs=106")
+#pragma GCC target ("custom-fmaxs=107")
+#pragma GCC target ("custom-fmins=108")
+#pragma GCC target ("custom-fmuls=109")
+#pragma GCC target ("custom-fnegs=110")
+#pragma GCC target ("custom-fsins=111")
+#pragma GCC target ("custom-fsqrts=112")
+#pragma GCC target ("custom-fsubs=113")
+#pragma GCC target ("custom-ftans=114")
+#pragma GCC target ("custom-fcmpeqs=200")
+#pragma GCC target ("custom-fcmpges=201")
+#pragma GCC target ("custom-fcmpgts=202")
+#pragma GCC target ("custom-fcmples=203")
+#pragma GCC target ("custom-fcmplts=204")
+#pragma GCC target ("custom-fcmpnes=205")
+
+void
+custom_fp (float a, float b, float *fp, int *ip)
+{
+ fp[0] = fabsf (a);
+ fp[1] = a + b;
+ fp[2] = atanf (a);
+ fp[3] = cosf (a);
+ fp[4] = a / b;
+ fp[5] = expf (a);
+ fp[6] = logf (a);
+ fp[7] = fmaxf (a, b);
+ fp[8] = fminf (a, b);
+ fp[9] = a * b;
+ fp[10] = -b;
+ fp[11] = sinf (b);
+ fp[12] = sqrtf (a);
+ fp[13] = a - b;
+ fp[14] = tanf (a);
+ ip[0] = (a == fp[0]);
+ ip[1] = (a >= fp[1]);
+ ip[2] = (a > fp[2]);
+ ip[3] = (a <= fp[3]);
+ ip[4] = (a < fp[4]);
+ ip[5] = (a != fp[5]);
+}
+
+/* { dg-final { scan-assembler "custom\\t100, .* # fabss .*" } } */
+/* { dg-final { scan-assembler "custom\\t101, .* # fadds .*" } } */
+/* { dg-final { scan-assembler "custom\\t102, .* # fatans .*" } } */
+/* { dg-final { scan-assembler "custom\\t103, .* # fcoss .*" } } */
+/* { dg-final { scan-assembler "custom\\t104, .* # fdivs .*" } } */
+/* { dg-final { scan-assembler "custom\\t105, .* # fexps .*" } } */
+/* { dg-final { scan-assembler "custom\\t106, .* # flogs .*" } } */
+/* { dg-final { scan-assembler "custom\\t107, .* # fmaxs .*" } } */
+/* { dg-final { scan-assembler "custom\\t108, .* # fmins .*" } } */
+/* { dg-final { scan-assembler "custom\\t109, .* # fmuls .*" } } */
+/* { dg-final { scan-assembler "custom\\t110, .* # fnegs .*" } } */
+/* { dg-final { scan-assembler "custom\\t111, .* # fsins .*" } } */
+/* { dg-final { scan-assembler "custom\\t112, .* # fsqrts .*" } } */
+/* { dg-final { scan-assembler "custom\\t113, .* # fsubs .*" } } */
+/* { dg-final { scan-assembler "custom\\t114, .* # ftans .*" } } */
+/* { dg-final { scan-assembler "custom\\t200, .* # fcmpeqs .*" } } */
+/* { dg-final { scan-assembler "custom\\t201, .* # fcmpges .*" } } */
+/* { dg-final { scan-assembler "custom\\t202, .* # fcmpgts .*" } } */
+/* { dg-final { scan-assembler "custom\\t203, .* # fcmples .*" } } */
+/* { dg-final { scan-assembler "custom\\t204, .* # fcmplts .*" } } */
+/* { dg-final { scan-assembler "custom\\t205, .* # fcmpnes .*" } } */
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-ashlsi3-one_shift.c b/gcc/testsuite/gcc.target/nios2/nios2-ashlsi3-one_shift.c
new file mode 100644
index 0000000000..6af6d4f9cb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-ashlsi3-one_shift.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options " " } */
+/* { dg-final { scan-assembler-not "slli" } } */
+
+int x;
+
+void foo(void)
+{
+ x <<= 1;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-builtin-custom.c b/gcc/testsuite/gcc.target/nios2/nios2-builtin-custom.c
new file mode 100644
index 0000000000..18399facc0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-builtin-custom.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "custom" } } */
+
+/* This test case used to cause an unrecognizable insn crash. */
+
+void foo (void)
+{
+ int offset = __builtin_custom_in(0x1);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-builtin-io.c b/gcc/testsuite/gcc.target/nios2/nios2-builtin-io.c
new file mode 100644
index 0000000000..58bc83f8ab
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-builtin-io.c
@@ -0,0 +1,26 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "ldbio" } } */
+/* { dg-final { scan-assembler "ldbuio" } } */
+/* { dg-final { scan-assembler "ldhio" } } */
+/* { dg-final { scan-assembler "ldhuio" } } */
+/* { dg-final { scan-assembler "ldwio" } } */
+/* { dg-final { scan-assembler "stbio" } } */
+/* { dg-final { scan-assembler "sthio" } } */
+/* { dg-final { scan-assembler "stwio" } } */
+
+volatile char b;
+volatile short h;
+volatile int w;
+
+void x ()
+{
+ __builtin_ldbio (&b);
+ __builtin_ldbuio (&b);
+ __builtin_ldhio (&h);
+ __builtin_ldhuio (&h);
+ __builtin_ldwio (&w);
+
+ __builtin_stbio (&b, 42);
+ __builtin_sthio (&h, 43);
+ __builtin_stwio (&w, 44);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-cache-1.c b/gcc/testsuite/gcc.target/nios2/nios2-cache-1.c
new file mode 100644
index 0000000000..5516a1367c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-cache-1.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "ldwio" } } */
+/* { dg-final { scan-assembler-not "stwio" } } */
+
+/* Make sure the default behavior is not to generate I/O variants of
+ the load and stores to foo. */
+
+extern volatile int foo;
+
+int
+read_foo (void)
+{
+ return foo;
+}
+
+void
+write_foo (int x)
+{
+ foo = x;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-cache-2.c b/gcc/testsuite/gcc.target/nios2/nios2-cache-2.c
new file mode 100644
index 0000000000..239c600ac5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-cache-2.c
@@ -0,0 +1,21 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-cache-volatile" } */
+/* { dg-final { scan-assembler "ldwio" } } */
+/* { dg-final { scan-assembler "stwio" } } */
+
+/* Make sure -mno-cache-volatile generates I/O variants of the load and
+ stores to foo. */
+
+extern volatile int foo;
+
+int
+read_foo (void)
+{
+ return foo;
+}
+
+void
+write_foo (int x)
+{
+ foo = x;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-custom-1.c b/gcc/testsuite/gcc.target/nios2/nios2-custom-1.c
new file mode 100644
index 0000000000..c6e4b517e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-custom-1.c
@@ -0,0 +1,64 @@
+/* { dg-do compile } */
+
+float fres, f1, f2;
+int ires, i1, i2;
+void *pres, *p1, *p2;
+
+void x ()
+{
+ __builtin_custom_n (0);
+ __builtin_custom_ni (1, i1);
+ __builtin_custom_nf (2, f1);
+ __builtin_custom_np (3, p1);
+ __builtin_custom_nii (4, i1, i2);
+ __builtin_custom_nif (5, i1, f2);
+ __builtin_custom_nip (6, i1, p2);
+ __builtin_custom_nfi (7, f1, i2);
+ __builtin_custom_nff (8, f1, f2);
+ __builtin_custom_nfp (9, f1, p2);
+ __builtin_custom_npi (10, p1, i2);
+ __builtin_custom_npf (11, p1, f2);
+ __builtin_custom_npp (12, p1, p2);
+
+ ires = __builtin_custom_in (13+0);
+ ires = __builtin_custom_ini (13+1, i1);
+ ires = __builtin_custom_inf (13+2, f1);
+ ires = __builtin_custom_inp (13+3, p1);
+ ires = __builtin_custom_inii (13+4, i1, i2);
+ ires = __builtin_custom_inif (13+5, i1, f2);
+ ires = __builtin_custom_inip (13+6, i1, p2);
+ ires = __builtin_custom_infi (13+7, f1, i2);
+ ires = __builtin_custom_inff (13+8, f1, f2);
+ ires = __builtin_custom_infp (13+9, f1, p2);
+ ires = __builtin_custom_inpi (13+10, p1, i2);
+ ires = __builtin_custom_inpf (13+11, p1, f2);
+ ires = __builtin_custom_inpp (13+12, p1, p2);
+
+ fres = __builtin_custom_fn (26+0);
+ fres = __builtin_custom_fni (26+1, i1);
+ fres = __builtin_custom_fnf (26+2, f1);
+ fres = __builtin_custom_fnp (26+3, p1);
+ fres = __builtin_custom_fnii (26+4, i1, i2);
+ fres = __builtin_custom_fnif (26+5, i1, f2);
+ fres = __builtin_custom_fnip (26+6, i1, p2);
+ fres = __builtin_custom_fnfi (26+7, f1, i2);
+ fres = __builtin_custom_fnff (26+8, f1, f2);
+ fres = __builtin_custom_fnfp (26+9, f1, p2);
+ fres = __builtin_custom_fnpi (26+10, p1, i2);
+ fres = __builtin_custom_fnpf (26+11, p1, f2);
+ fres = __builtin_custom_fnpp (26+12, p1, p2);
+
+ pres = __builtin_custom_pn (39+0);
+ pres = __builtin_custom_pni (39+1, i1);
+ pres = __builtin_custom_pnf (39+2, f1);
+ pres = __builtin_custom_pnp (39+3, p1);
+ pres = __builtin_custom_pnii (39+4, i1, i2);
+ pres = __builtin_custom_pnif (39+5, i1, f2);
+ pres = __builtin_custom_pnip (39+6, i1, p2);
+ pres = __builtin_custom_pnfi (39+7, f1, i2);
+ pres = __builtin_custom_pnff (39+8, f1, f2);
+ pres = __builtin_custom_pnfp (39+9, f1, p2);
+ pres = __builtin_custom_pnpi (39+10, p1, i2);
+ pres = __builtin_custom_pnpf (39+11, p1, f2);
+ pres = __builtin_custom_pnpp (39+12, p1, p2);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-custom-2.c b/gcc/testsuite/gcc.target/nios2/nios2-custom-2.c
new file mode 100644
index 0000000000..7f5d21a544
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-custom-2.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+
+float foo (float) __attribute__ ((target ("custom-fsqrts=128")));
+float foo (float x)
+{
+ return __builtin_custom_fsqrts (x) + __builtin_custom_fnf (128, x);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-int-types.c b/gcc/testsuite/gcc.target/nios2/nios2-int-types.c
new file mode 100644
index 0000000000..21b4a02be9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-int-types.c
@@ -0,0 +1,34 @@
+/* Test that various types are all derived from int. */
+/* { dg-do compile } */
+
+#include <stddef.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+extern size_t a;
+unsigned int a;
+extern unsigned int aa;
+size_t aa;
+
+extern ssize_t b;
+int b;
+extern int bb;
+ssize_t bb;
+
+extern ptrdiff_t c;
+int c;
+extern int cc;
+ptrdiff_t cc;
+
+extern intptr_t d;
+int d;
+extern int dd;
+intptr_t dd;
+
+extern uintptr_t e;
+unsigned int e;
+extern unsigned int ee;
+uintptr_t ee;
+
+
+
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-mul-options-1.c b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-1.c
new file mode 100644
index 0000000000..b639482bfa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-1.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-final { scan-assembler "__muldi3" } } */
+
+long long x, y, z;
+
+void test()
+{
+ x = y * z;
+}
+
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-mul-options-2.c b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-2.c
new file mode 100644
index 0000000000..f93b4e7c58
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mhw-mulx" } */
+/* { dg-final { scan-assembler-not "__muldi3" } } */
+
+long long x, y, z;
+
+void test()
+{
+ x = y * z;
+}
+
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-mul-options-3.c b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-3.c
new file mode 100644
index 0000000000..2da74ba6b3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-3.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-final { scan-assembler-not "__mulsi3" } } */
+
+int x, y, z;
+
+void test()
+{
+ x = y * z;
+}
+
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-mul-options-4.c b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-4.c
new file mode 100644
index 0000000000..7794f6d875
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-mul-options-4.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mno-hw-mul" } */
+/* { dg-final { scan-assembler "__mulsi3" } } */
+
+int x, y, z;
+
+void test()
+{
+ x = y * z;
+}
+
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-nor.c b/gcc/testsuite/gcc.target/nios2/nios2-nor.c
new file mode 100644
index 0000000000..3a1911e326
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-nor.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler "nor" } } */
+
+int foo (int x, int y)
+{
+ return ~(x | y);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c b/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c
new file mode 100644
index 0000000000..6b44d88e65
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-rdctl.c
@@ -0,0 +1,8 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "rdctl" } } */
+
+int x ()
+{
+ __builtin_rdctl (0);
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c b/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c
new file mode 100644
index 0000000000..922942ab98
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-rdwrctl-1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile } */
+
+volatile int res;
+
+void x ()
+{
+ __builtin_wrctl (0, res);
+ __builtin_wrctl (15, res);
+ __builtin_wrctl (31, res);
+
+ res = __builtin_rdctl (0);
+ res = __builtin_rdctl (15);
+ res = __builtin_rdctl (31);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-stack-check-1.c b/gcc/testsuite/gcc.target/nios2/nios2-stack-check-1.c
new file mode 100644
index 0000000000..415906fc5e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-stack-check-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options "-fstack-limit-register=et" } */
+/* { dg-final { scan-assembler "bgeu\\tsp, et" } } */
+/* { dg-final { scan-assembler "break\\t3" } } */
+/* check stack checking */
+void test()
+{
+ int a, b, c;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-stack-check-2.c b/gcc/testsuite/gcc.target/nios2/nios2-stack-check-2.c
new file mode 100644
index 0000000000..b903db5cdc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-stack-check-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile } */
+/* { dg-options " " } */
+/* { dg-final { scan-assembler-not "bgeu\\tsp, et" } } */
+/* { dg-final { scan-assembler-not "break\\t3" } } */
+/* check stack checking */
+void test()
+{
+ int a, b, c;
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-stxio.c b/gcc/testsuite/gcc.target/nios2/nios2-stxio.c
new file mode 100644
index 0000000000..af079d641c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-stxio.c
@@ -0,0 +1,25 @@
+/* { dg-do compile } */
+
+void test_stbio (unsigned char* p1, unsigned char* p2)
+{
+ __builtin_stbio (p1, *p2);
+ __builtin_stbio (p2, 0);
+ __builtin_stbio (p2 + 1, 0x80);
+ __builtin_stbio (p2 + 2, 0x7f);
+}
+
+void test_sthio (unsigned short* p1, unsigned short* p2)
+{
+ __builtin_sthio (p1, *p2);
+ __builtin_sthio (p2, 0);
+ __builtin_sthio (p2 + 1, 0x8000);
+ __builtin_sthio (p2 + 2, 0x7fff);
+}
+
+void test_stwio (unsigned int* p1, unsigned int* p2)
+{
+ __builtin_stwio (p1, *p2);
+ __builtin_stwio (p2, 0);
+ __builtin_stwio (p2 + 1, 0x80000000);
+ __builtin_stwio (p2 + 2, 0x7fffffff);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-trap-insn.c b/gcc/testsuite/gcc.target/nios2/nios2-trap-insn.c
new file mode 100644
index 0000000000..dd881d166c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-trap-insn.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "break\\t3" } } */
+
+/* Test the nios2 trap instruction */
+void foo(void){
+ __builtin_trap();
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-wrctl-not-zero.c b/gcc/testsuite/gcc.target/nios2/nios2-wrctl-not-zero.c
new file mode 100644
index 0000000000..f32a9ca4e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-wrctl-not-zero.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options " " } */
+/* { dg-final { scan-assembler-not "wrctl\\tctl6, zero" } } */
+
+void foo(void){
+ __builtin_wrctl(6,4);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-wrctl-zero.c b/gcc/testsuite/gcc.target/nios2/nios2-wrctl-zero.c
new file mode 100644
index 0000000000..93f01b0770
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-wrctl-zero.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-final { scan-assembler "wrctl\\tctl6, zero" } } */
+
+void foo(void){
+ __builtin_wrctl(6,0);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2-wrctl.c b/gcc/testsuite/gcc.target/nios2/nios2-wrctl.c
new file mode 100644
index 0000000000..5ebdc24b8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2-wrctl.c
@@ -0,0 +1,7 @@
+/* { dg-do compile } */
+/* { dg-options "" } */
+/* { dg-final { scan-assembler "wrctl" } } */
+
+void foo(void){
+ __builtin_wrctl(6,4);
+}
diff --git a/gcc/testsuite/gcc.target/nios2/nios2.exp b/gcc/testsuite/gcc.target/nios2/nios2.exp
new file mode 100644
index 0000000000..4f027048a9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nios2/nios2.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a Nios II target.
+if ![istarget nios2*-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cCS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/powerpc/20020118-1.c b/gcc/testsuite/gcc.target/powerpc/20020118-1.c
index 49197b4903..b92dd2a7a3 100644
--- a/gcc/testsuite/gcc.target/powerpc/20020118-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/20020118-1.c
@@ -1,6 +1,8 @@
/* { dg-do run { target powerpc*-*-* } }*/
/* VxWorks only guarantees 64 bits of alignment (STACK_BOUNDARY == 64). */
/* { dg-skip-if "" { "powerpc*-*-vxworks*" } { "*" } { "" } } */
+/* Force 128-bit stack alignment for eabi targets. */
+/* { dg-options "-mno-eabi" { target powerpc*-*-eabi* } } */
/* Test local alignment. Test new target macro STARTING_FRAME_PHASE. */
/* Origin: Aldy Hernandez <aldyh@redhat.com>. */
diff --git a/gcc/testsuite/gcc.target/powerpc/405-dlmzb-strlen-1.c b/gcc/testsuite/gcc.target/powerpc/405-dlmzb-strlen-1.c
index 2971e553ed..b06a74f646 100644
--- a/gcc/testsuite/gcc.target/powerpc/405-dlmzb-strlen-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/405-dlmzb-strlen-1.c
@@ -1,6 +1,7 @@
/* Test generation of dlmzb for strlen on 405. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
+/* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mcpu=405" } */
/* { dg-skip-if "other options override -mcpu=405" { ! powerpc_405_nocache } { "*" } { "" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/440-dlmzb-strlen-1.c b/gcc/testsuite/gcc.target/powerpc/440-dlmzb-strlen-1.c
index c69a7c91bc..9571b66954 100644
--- a/gcc/testsuite/gcc.target/powerpc/440-dlmzb-strlen-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/440-dlmzb-strlen-1.c
@@ -1,6 +1,7 @@
/* Test generation of dlmzb for strlen on 440. */
/* Origin: Joseph Myers <joseph@codesourcery.com> */
/* { dg-do compile } */
+/* { dg-skip-if "" { powerpc*-*-aix* } { "*" } { "" } } */
/* { dg-require-effective-target ilp32 } */
/* { dg-options "-O2 -mcpu=440" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-20.c b/gcc/testsuite/gcc.target/powerpc/altivec-20.c
index b2c29a979d..1af8ed7dc5 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-20.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-20.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target powerpc_altivec_ok } } */
-/* { dg-options "-maltivec -mcpu=G5 -O2" } */
+/* { dg-options "-maltivec -mcpu=G5 -O2 -Wno-deprecated" } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-6.c b/gcc/testsuite/gcc.target/powerpc/altivec-6.c
index 51d411688f..29856fd079 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-6.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-6.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target powerpc*-*-* } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -O0 -Wall" } */
+/* { dg-options "-maltivec -O0 -Wall -Wno-deprecated" } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-consts.c b/gcc/testsuite/gcc.target/powerpc/altivec-consts.c
index 2c5bc99cff..2afd13fa85 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-consts.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-consts.c
@@ -11,31 +11,24 @@ typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
typedef __attribute__ ((vector_size (16))) unsigned int v4si;
-char w[16] __attribute__((aligned(16)));
-
-
-/* Emulate the vspltis? instructions on a 16-byte array of chars. */
+typedef __attribute__((aligned(16))) char c16[16];
+typedef __attribute__((aligned(16))) short s8[8];
+typedef __attribute__((aligned(16))) int i4[4];
-void vspltisb (char *v, int val)
-{
- int i;
- for (i = 0; i < 16; i++)
- v[i] = val;
-}
+#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \
+ v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \
+ static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \
+ check_v16qi (v, w);
-void vspltish (char *v, int val)
-{
- int i;
- for (i = 0; i < 16; i += 2)
- v[i] = val >> 7, v[i + 1] = val;
-}
+#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \
+ v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \
+ static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \
+ check_v8hi (v, w);
-void vspltisw (char *v, int val)
-{
- int i;
- for (i = 0; i < 16; i += 4)
- v[i] = v[i + 1] = v[i + 2] = val >> 7, v[i + 3] = val;
-}
+#define V4SI(V1,V2,V3,V4) \
+ v4si v = {V1,V2,V3,V4}; \
+ static i4 w = {V1,V2,V3,V4}; \
+ check_v4si (v, w);
/* Use three different check functions for each mode-instruction pair.
@@ -48,13 +41,13 @@ void __attribute__ ((noinline)) check_v16qi (v16qi v1, char *v2)
abort ();
}
-void __attribute__ ((noinline)) check_v8hi (v8hi v1, char *v2)
+void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2)
{
if (memcmp (&v1, v2, 16))
abort ();
}
-void __attribute__ ((noinline)) check_v4si (v4si v1, char *v2)
+void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2)
{
if (memcmp (&v1, v2, 16))
abort ();
@@ -65,72 +58,52 @@ void __attribute__ ((noinline)) check_v4si (v4si v1, char *v2)
void v16qi_vspltisb ()
{
- v16qi v = { 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15 };
- vspltisb (w, 15);
- check_v16qi (v, w);
+ V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15);
}
void v16qi_vspltisb_neg ()
{
- v16qi v = { -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5 };
- vspltisb (w, -5);
- check_v16qi (v, w);
+ V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5);
}
void v16qi_vspltisb_addself ()
{
- v16qi v = { 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30 };
- vspltisb (w, 30);
- check_v16qi (v, w);
+ V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);
}
void v16qi_vspltisb_neg_addself ()
{
- v16qi v = { -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24 };
- vspltisb (w, -24);
- check_v16qi (v, w);
+ V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24);
}
void v16qi_vspltish ()
{
- v16qi v = { 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15 };
- vspltish (w, 15);
- check_v16qi (v, w);
+ V16QI (0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15);
}
void v16qi_vspltish_addself ()
{
- v16qi v = { 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30 };
- vspltish (w, 30);
- check_v16qi (v, w);
+ V16QI (0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30);
}
void v16qi_vspltish_neg ()
{
- v16qi v = { -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5 };
- vspltish (w, -5);
- check_v16qi (v, w);
+ V16QI (-1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5);
}
void v16qi_vspltisw ()
{
- v16qi v = { 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15 };
- vspltisw (w, 15);
- check_v16qi (v, w);
+ V16QI (0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15);
}
void v16qi_vspltisw_addself ()
{
- v16qi v = { 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30 };
- vspltisw (w, 30);
- check_v16qi (v, w);
+ V16QI (0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30);
}
void v16qi_vspltisw_neg ()
{
- v16qi v = { -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5 };
- vspltisw (w, -5);
- check_v16qi (v, w);
+ V16QI (-1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5);
}
@@ -138,144 +111,104 @@ void v16qi_vspltisw_neg ()
void v8hi_vspltisb ()
{
- v8hi v = { 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F };
- vspltisb (w, 15);
- check_v8hi (v, w);
+ V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F);
}
void v8hi_vspltisb_addself ()
{
- v8hi v = { 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E };
- vspltisb (w, 30);
- check_v8hi (v, w);
+ V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E);
}
void v8hi_vspltisb_neg ()
{
- v8hi v = { 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB };
- vspltisb (w, -5);
- check_v8hi (v, w);
+ V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB);
}
void v8hi_vspltish ()
{
- v8hi v = { 15, 15, 15, 15, 15, 15, 15, 15 };
- vspltish (w, 15);
- check_v8hi (v, w);
+ V8HI (15, 15, 15, 15, 15, 15, 15, 15);
}
void v8hi_vspltish_neg ()
{
- v8hi v = { -5, -5, -5, -5, -5, -5, -5, -5 };
- vspltish (w, -5);
- check_v8hi (v, w);
+ V8HI (-5, -5, -5, -5, -5, -5, -5, -5);
}
void v8hi_vspltish_addself ()
{
- v8hi v = { 30, 30, 30, 30, 30, 30, 30, 30 };
- vspltish (w, 30);
- check_v8hi (v, w);
+ V8HI (30, 30, 30, 30, 30, 30, 30, 30);
}
void v8hi_vspltish_neg_addself ()
{
- v8hi v = { -24, -24, -24, -24, -24, -24, -24, -24 };
- vspltish (w, -24);
- check_v8hi (v, w);
+ V8HI (-24, -24, -24, -24, -24, -24, -24, -24);
}
void v8hi_vspltisw ()
{
- v8hi v = { 0, 15, 0, 15, 0, 15, 0, 15 };
- vspltisw (w, 15);
- check_v8hi (v, w);
+ V8HI (0, 15, 0, 15, 0, 15, 0, 15);
}
void v8hi_vspltisw_addself ()
{
- v8hi v = { 0, 30, 0, 30, 0, 30, 0, 30 };
- vspltisw (w, 30);
- check_v8hi (v, w);
+ V8HI (0, 30, 0, 30, 0, 30, 0, 30);
}
void v8hi_vspltisw_neg ()
{
- v8hi v = { -1, -5, -1, -5, -1, -5, -1, -5 };
- vspltisw (w, -5);
- check_v8hi (v, w);
+ V8HI (-1, -5, -1, -5, -1, -5, -1, -5);
}
/* V4SI tests. */
void v4si_vspltisb ()
{
- v4si v = { 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F };
- vspltisb (w, 15);
- check_v4si (v, w);
+ V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F);
}
void v4si_vspltisb_addself ()
{
- v4si v = { 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E };
- vspltisb (w, 30);
- check_v4si (v, w);
+ V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E);
}
void v4si_vspltisb_neg ()
{
- v4si v = { 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB };
- vspltisb (w, -5);
- check_v4si (v, w);
+ V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB);
}
void v4si_vspltish ()
{
- v4si v = { 0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F };
- vspltish (w, 15);
- check_v4si (v, w);
+ V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F);
}
void v4si_vspltish_addself ()
{
- v4si v = { 0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E };
- vspltish (w, 30);
- check_v4si (v, w);
+ V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E);
}
void v4si_vspltish_neg ()
{
- v4si v = { 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB };
- vspltish (w, -5);
- check_v4si (v, w);
+ V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB);
}
void v4si_vspltisw ()
{
- v4si v = { 15, 15, 15, 15 };
- vspltisw (w, 15);
- check_v4si (v, w);
+ V4SI (15, 15, 15, 15);
}
void v4si_vspltisw_neg ()
{
- v4si v = { -5, -5, -5, -5 };
- vspltisw (w, -5);
- check_v4si (v, w);
+ V4SI (-5, -5, -5, -5);
}
void v4si_vspltisw_addself ()
{
- v4si v = { 30, 30, 30, 30 };
- vspltisw (w, 30);
- check_v4si (v, w);
+ V4SI (30, 30, 30, 30);
}
void v4si_vspltisw_neg_addself ()
{
- v4si v = { -24, -24, -24, -24 };
- vspltisw (w, -24);
- check_v4si (v, w);
+ V4SI (-24, -24, -24, -24);
}
@@ -316,3 +249,5 @@ int main ()
v4si_vspltisw_neg_addself ();
return 0;
}
+
+/* { dg-final { scan-assembler-not "lvx" { target { ! powerpc*le-*-* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c b/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c
index ee5c5eee90..c3cf67e44f 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-perm-1.c
@@ -19,19 +19,6 @@ V b4(V x)
return __builtin_shuffle(x, (V){ 4,5,6,7, 4,5,6,7, 4,5,6,7, 4,5,6,7, });
}
-V p2(V x, V y)
-{
- return __builtin_shuffle(x, y,
- (V){ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 });
-
-}
-
-V p4(V x, V y)
-{
- return __builtin_shuffle(x, y,
- (V){ 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31 });
-}
-
V h1(V x, V y)
{
return __builtin_shuffle(x, y,
@@ -72,5 +59,3 @@ V l4(V x, V y)
/* { dg-final { scan-assembler "vspltb" } } */
/* { dg-final { scan-assembler "vsplth" } } */
/* { dg-final { scan-assembler "vspltw" } } */
-/* { dg-final { scan-assembler "vpkuhum" } } */
-/* { dg-final { scan-assembler "vpkuwum" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-perm-3.c b/gcc/testsuite/gcc.target/powerpc/altivec-perm-3.c
new file mode 100644
index 0000000000..d0b671eac7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-perm-3.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
+/* { dg-options "-O -maltivec -mno-vsx" } */
+
+typedef unsigned char V __attribute__((vector_size(16)));
+
+V p2(V x, V y)
+{
+ return __builtin_shuffle(x, y,
+ (V){ 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31 });
+
+}
+
+V p4(V x, V y)
+{
+ return __builtin_shuffle(x, y,
+ (V){ 2, 3, 6, 7, 10, 11, 14, 15, 18, 19, 22, 23, 26, 27, 30, 31 });
+}
+
+/* { dg-final { scan-assembler-not "vperm" } } */
+/* { dg-final { scan-assembler "vpkuhum" } } */
+/* { dg-final { scan-assembler "vpkuwum" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c b/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
index 3689f97490..b1ed8b8649 100644
--- a/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
+++ b/gcc/testsuite/gcc.target/powerpc/altivec-vec-merge.c
@@ -1,7 +1,7 @@
/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
/* { dg-require-effective-target powerpc_altivec_ok } */
-/* { dg-options "-maltivec -O2" } */
+/* { dg-options "-maltivec -O2 -Wno-deprecated" } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/atomic-p7.c b/gcc/testsuite/gcc.target/powerpc/atomic-p7.c
new file mode 100644
index 0000000000..3442bfba4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/atomic-p7.c
@@ -0,0 +1,207 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-not "lbarx" } } */
+/* { dg-final { scan-assembler-not "lharx" } } */
+/* { dg-final { scan-assembler-times "lwarx" 18 } } */
+/* { dg-final { scan-assembler-times "ldarx" 6 } } */
+/* { dg-final { scan-assembler-not "lqarx" } } */
+/* { dg-final { scan-assembler-not "stbcx" } } */
+/* { dg-final { scan-assembler-not "sthcx" } } */
+/* { dg-final { scan-assembler-times "stwcx" 18 } } */
+/* { dg-final { scan-assembler-times "stdcx" 6 } } */
+/* { dg-final { scan-assembler-not "stqcx" } } */
+/* { dg-final { scan-assembler-times "bl __atomic" 6 } } */
+/* { dg-final { scan-assembler-times "isync" 12 } } */
+/* { dg-final { scan-assembler-times "lwsync" 8 } } */
+/* { dg-final { scan-assembler-not "mtvsrd" } } */
+/* { dg-final { scan-assembler-not "mtvsrwa" } } */
+/* { dg-final { scan-assembler-not "mtvsrwz" } } */
+/* { dg-final { scan-assembler-not "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "mfvsrwz" } } */
+
+/* Test for the byte atomic operations on power8 using lbarx/stbcx. */
+char
+char_fetch_add_relaxed (char *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+char
+char_fetch_sub_consume (char *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+char
+char_fetch_and_acquire (char *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+char
+char_fetch_ior_release (char *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+char
+char_fetch_xor_acq_rel (char *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+char
+char_fetch_nand_seq_cst (char *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+/* Test for the half word atomic operations on power8 using lharx/sthcx. */
+short
+short_fetch_add_relaxed (short *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+short
+short_fetch_sub_consume (short *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+short
+short_fetch_and_acquire (short *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+short
+short_fetch_ior_release (short *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+short
+short_fetch_xor_acq_rel (short *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+short
+short_fetch_nand_seq_cst (short *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+/* Test for the word atomic operations on power8 using lwarx/stwcx. */
+int
+int_fetch_add_relaxed (int *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+int
+int_fetch_sub_consume (int *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+int
+int_fetch_and_acquire (int *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+int
+int_fetch_ior_release (int *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+int
+int_fetch_xor_acq_rel (int *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+int
+int_fetch_nand_seq_cst (int *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+/* Test for the double word atomic operations on power8 using ldarx/stdcx. */
+long
+long_fetch_add_relaxed (long *ptr, long value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+long
+long_fetch_sub_consume (long *ptr, long value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+long
+long_fetch_and_acquire (long *ptr, long value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+long
+long_fetch_ior_release (long *ptr, long value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+long
+long_fetch_xor_acq_rel (long *ptr, long value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+long
+long_fetch_nand_seq_cst (long *ptr, long value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+/* Test for the quad word atomic operations on power8 using ldarx/stdcx. */
+__int128_t
+quad_fetch_add_relaxed (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+__int128_t
+quad_fetch_sub_consume (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+__int128_t
+quad_fetch_and_acquire (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+__int128_t
+quad_fetch_ior_release (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+__int128_t
+quad_fetch_xor_acq_rel (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+__int128_t
+quad_fetch_nand_seq_cst (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/atomic-p8.c b/gcc/testsuite/gcc.target/powerpc/atomic-p8.c
new file mode 100644
index 0000000000..17460ac4c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/atomic-p8.c
@@ -0,0 +1,237 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler-times "lbarx" 7 } } */
+/* { dg-final { scan-assembler-times "lharx" 7 } } */
+/* { dg-final { scan-assembler-times "lwarx" 7 } } */
+/* { dg-final { scan-assembler-times "ldarx" 7 } } */
+/* { dg-final { scan-assembler-times "lqarx" 7 } } */
+/* { dg-final { scan-assembler-times "stbcx" 7 } } */
+/* { dg-final { scan-assembler-times "sthcx" 7 } } */
+/* { dg-final { scan-assembler-times "stwcx" 7 } } */
+/* { dg-final { scan-assembler-times "stdcx" 7 } } */
+/* { dg-final { scan-assembler-times "stqcx" 7 } } */
+/* { dg-final { scan-assembler-not "bl __atomic" } } */
+/* { dg-final { scan-assembler-times "isync" 20 } } */
+/* { dg-final { scan-assembler-times "lwsync" 10 } } */
+/* { dg-final { scan-assembler-not "mtvsrd" } } */
+/* { dg-final { scan-assembler-not "mtvsrwa" } } */
+/* { dg-final { scan-assembler-not "mtvsrwz" } } */
+/* { dg-final { scan-assembler-not "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "mfvsrwz" } } */
+
+/* Test for the byte atomic operations on power8 using lbarx/stbcx. */
+char
+char_fetch_add_relaxed (char *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+char
+char_fetch_sub_consume (char *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+char
+char_fetch_and_acquire (char *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+char
+char_fetch_ior_release (char *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+char
+char_fetch_xor_acq_rel (char *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+char
+char_fetch_nand_seq_cst (char *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+void
+char_val_compare_and_swap (char *p, int i, int j, char *q)
+{
+ *q = __sync_val_compare_and_swap (p, i, j);
+}
+
+/* Test for the half word atomic operations on power8 using lharx/sthcx. */
+short
+short_fetch_add_relaxed (short *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+short
+short_fetch_sub_consume (short *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+short
+short_fetch_and_acquire (short *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+short
+short_fetch_ior_release (short *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+short
+short_fetch_xor_acq_rel (short *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+short
+short_fetch_nand_seq_cst (short *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+void
+short_val_compare_and_swap (short *p, int i, int j, short *q)
+{
+ *q = __sync_val_compare_and_swap (p, i, j);
+}
+
+/* Test for the word atomic operations on power8 using lwarx/stwcx. */
+int
+int_fetch_add_relaxed (int *ptr, int value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+int
+int_fetch_sub_consume (int *ptr, int value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+int
+int_fetch_and_acquire (int *ptr, int value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+int
+int_fetch_ior_release (int *ptr, int value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+int
+int_fetch_xor_acq_rel (int *ptr, int value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+int
+int_fetch_nand_seq_cst (int *ptr, int value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+void
+int_val_compare_and_swap (int *p, int i, int j, int *q)
+{
+ *q = __sync_val_compare_and_swap (p, i, j);
+}
+
+/* Test for the double word atomic operations on power8 using ldarx/stdcx. */
+long
+long_fetch_add_relaxed (long *ptr, long value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+long
+long_fetch_sub_consume (long *ptr, long value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+long
+long_fetch_and_acquire (long *ptr, long value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+long
+long_fetch_ior_release (long *ptr, long value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+long
+long_fetch_xor_acq_rel (long *ptr, long value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+long
+long_fetch_nand_seq_cst (long *ptr, long value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+void
+long_val_compare_and_swap (long *p, long i, long j, long *q)
+{
+ *q = __sync_val_compare_and_swap (p, i, j);
+}
+
+/* Test for the quad word atomic operations on power8 using ldarx/stdcx. */
+__int128_t
+quad_fetch_add_relaxed (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_RELAXED);
+}
+
+__int128_t
+quad_fetch_sub_consume (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_sub (ptr, value, __ATOMIC_CONSUME);
+}
+
+__int128_t
+quad_fetch_and_acquire (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+__int128_t
+quad_fetch_ior_release (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_RELEASE);
+}
+
+__int128_t
+quad_fetch_xor_acq_rel (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_xor (ptr, value, __ATOMIC_ACQ_REL);
+}
+
+__int128_t
+quad_fetch_nand_seq_cst (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_nand (ptr, value, __ATOMIC_SEQ_CST);
+}
+
+void
+quad_val_compare_and_swap (__int128_t *p, __int128_t i, __int128_t j, __int128_t *q)
+{
+ *q = __sync_val_compare_and_swap (p, i, j);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c b/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c
new file mode 100644
index 0000000000..8a5cbfaa36
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/atomic_load_store-p8.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler-times "lq" 1 } } */
+/* { dg-final { scan-assembler-times "stq" 1 } } */
+/* { dg-final { scan-assembler-not "bl __atomic" } } */
+/* { dg-final { scan-assembler-not "lqarx" } } */
+/* { dg-final { scan-assembler-not "stqcx" } } */
+
+__int128
+atomic_load_128_relaxed (__int128 *ptr)
+{
+ return __atomic_load_n (ptr, __ATOMIC_RELAXED);
+}
+
+void
+atomic_store_128_relaxed (__int128 *ptr, __int128 val)
+{
+ __atomic_store_n (ptr, val, __ATOMIC_RELAXED);
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/bcd-1.c b/gcc/testsuite/gcc.target/powerpc/bcd-1.c
new file mode 100644
index 0000000000..c7496c2357
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bcd-1.c
@@ -0,0 +1,27 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-times "cdtbcd " 1 } } */
+/* { dg-final { scan-assembler-times "cbcdtd " 1 } } */
+/* { dg-final { scan-assembler-times "addg6s " 1 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+
+unsigned int
+to_bcd (unsigned int a)
+{
+ return __builtin_cdtbcd (a);
+}
+
+unsigned int
+from_bcd (unsigned int a)
+{
+ return __builtin_cbcdtd (a);
+}
+
+unsigned int
+bcd_arith (unsigned int a, unsigned int b)
+{
+ return __builtin_addg6s (a, b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/bcd-2.c b/gcc/testsuite/gcc.target/powerpc/bcd-2.c
new file mode 100644
index 0000000000..d330b74237
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bcd-2.c
@@ -0,0 +1,44 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler-times "bcdadd\[.\] " 2 } } */
+/* { dg-final { scan-assembler-times "bcdsub\[.\] " 2 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+/* { dg-final { scan-assembler-not "mtvsr" } } */
+/* { dg-final { scan-assembler-not "mfvsr" } } */
+/* { dg-final { scan-assembler-not "lvx" } } */
+/* { dg-final { scan-assembler-not "lxvw4x" } } */
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
+/* { dg-final { scan-assembler-not "stvx" } } */
+/* { dg-final { scan-assembler-not "stxvw4x" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+
+typedef __int128_t __attribute__((__vector_size__(16))) vector_128_t;
+typedef __int128_t scalar_128_t;
+typedef unsigned long long scalar_64_t;
+
+vector_128_t
+do_add_0 (vector_128_t a, vector_128_t b)
+{
+ return __builtin_bcdadd (a, b, 0);
+}
+
+vector_128_t
+do_add_1 (vector_128_t a, vector_128_t b)
+{
+ return __builtin_bcdadd (a, b, 1);
+}
+
+vector_128_t
+do_sub_0 (vector_128_t a, vector_128_t b)
+{
+ return __builtin_bcdsub (a, b, 0);
+}
+
+vector_128_t
+do_sub_1 (vector_128_t a, vector_128_t b)
+{
+ return __builtin_bcdsub (a, b, 1);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/bcd-3.c b/gcc/testsuite/gcc.target/powerpc/bcd-3.c
new file mode 100644
index 0000000000..436cecf6ff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bcd-3.c
@@ -0,0 +1,103 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler-times "bcdadd\[.\] " 4 } } */
+/* { dg-final { scan-assembler-times "bcdsub\[.\] " 4 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+/* { dg-final { scan-assembler-not "mtvsr" } } */
+/* { dg-final { scan-assembler-not "mfvsr" } } */
+/* { dg-final { scan-assembler-not "lvx" } } */
+/* { dg-final { scan-assembler-not "lxvw4x" } } */
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
+/* { dg-final { scan-assembler-not "stvx" } } */
+/* { dg-final { scan-assembler-not "stxvw4x" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+
+typedef __int128_t __attribute__((__vector_size__(16))) vector_128_t;
+typedef __int128_t scalar_128_t;
+typedef unsigned long long scalar_64_t;
+
+/* Test whether the peephole works to allow folding a bcdadd, with a
+ bcdadd_<test> into a single instruction. */
+
+vector_128_t
+do_add_lt (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdadd (a, b, 0);
+ if (__builtin_bcdadd_lt (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_add_eq (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdadd (a, b, 0);
+ if (__builtin_bcdadd_eq (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_add_gt (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdadd (a, b, 0);
+ if (__builtin_bcdadd_gt (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_add_ov (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdadd (a, b, 0);
+ if (__builtin_bcdadd_ov (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_sub_lt (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdsub (a, b, 0);
+ if (__builtin_bcdsub_lt (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_sub_eq (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdsub (a, b, 0);
+ if (__builtin_bcdsub_eq (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_sub_gt (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdsub (a, b, 0);
+ if (__builtin_bcdsub_gt (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
+
+vector_128_t
+do_sub_ov (vector_128_t a, vector_128_t b, int *p)
+{
+ vector_128_t ret = __builtin_bcdsub (a, b, 0);
+ if (__builtin_bcdsub_ov (a, b, 0))
+ *p = 1;
+
+ return ret;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/bool.c b/gcc/testsuite/gcc.target/powerpc/bool.c
new file mode 100644
index 0000000000..f007db4b5b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler "eqv" } } */
+/* { dg-final { scan-assembler "nand" } } */
+/* { dg-final { scan-assembler "nor" } } */
+
+#ifndef TYPE
+#define TYPE unsigned long
+#endif
+
+TYPE op1 (TYPE a, TYPE b) { return ~(a ^ b); } /* eqv */
+TYPE op2 (TYPE a, TYPE b) { return ~(a & b); } /* nand */
+TYPE op3 (TYPE a, TYPE b) { return ~(a | b); } /* nor */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/bool2-av.c b/gcc/testsuite/gcc.target/powerpc/bool2-av.c
new file mode 100644
index 0000000000..fc56ce261c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool2-av.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -mcpu=power6 -maltivec" } */
+/* { dg-final { scan-assembler-not "\[ \t\]and " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]or " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]eqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]orc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nand " } } */
+/* { dg-final { scan-assembler "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+#ifndef TYPE
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+
+#include "bool2.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool2-p5.c b/gcc/testsuite/gcc.target/powerpc/bool2-p5.c
new file mode 100644
index 0000000000..e4810d00d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool2-p5.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -mcpu=power5 -mabi=altivec -mno-altivec -mno-vsx" } */
+/* { dg-final { scan-assembler "\[ \t\]and " } } */
+/* { dg-final { scan-assembler "\[ \t\]or " } } */
+/* { dg-final { scan-assembler "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler "\[ \t\]eqv " } } */
+/* { dg-final { scan-assembler "\[ \t\]orc " } } */
+/* { dg-final { scan-assembler "\[ \t\]nand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+#ifndef TYPE
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+
+#include "bool2.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool2-p7.c b/gcc/testsuite/gcc.target/powerpc/bool2-p7.c
new file mode 100644
index 0000000000..274fcb090e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool2-p7.c
@@ -0,0 +1,31 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mcpu=power7" } */
+/* { dg-final { scan-assembler-not "\[ \t\]and " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]or " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]eqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]orc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+#ifndef TYPE
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+
+#include "bool2.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool2-p8.c b/gcc/testsuite/gcc.target/powerpc/bool2-p8.c
new file mode 100644
index 0000000000..34f4d2df8b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool2-p8.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-O2 -mcpu=power8" } */
+/* { dg-final { scan-assembler-not "\[ \t\]and " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]or " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]eqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]orc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]nand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler "\[ \t\]xxlnand " } } */
+
+#ifndef TYPE
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+
+#include "bool2.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool2.h b/gcc/testsuite/gcc.target/powerpc/bool2.h
new file mode 100644
index 0000000000..4513944c29
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool2.h
@@ -0,0 +1,29 @@
+/* Test various logical operations. */
+
+TYPE arg1 (TYPE p, TYPE q) { return p & q; } /* AND */
+TYPE arg2 (TYPE p, TYPE q) { return p | q; } /* OR */
+TYPE arg3 (TYPE p, TYPE q) { return p ^ q; } /* XOR */
+TYPE arg4 (TYPE p) { return ~ p; } /* NOR */
+TYPE arg5 (TYPE p, TYPE q) { return ~(p & q); } /* NAND */
+TYPE arg6 (TYPE p, TYPE q) { return ~(p | q); } /* NOR */
+TYPE arg7 (TYPE p, TYPE q) { return ~(p ^ q); } /* EQV */
+TYPE arg8 (TYPE p, TYPE q) { return (~p) & q; } /* ANDC */
+TYPE arg9 (TYPE p, TYPE q) { return (~p) | q; } /* ORC */
+TYPE arg10(TYPE p, TYPE q) { return (~p) ^ q; } /* EQV */
+TYPE arg11(TYPE p, TYPE q) { return p & (~q); } /* ANDC */
+TYPE arg12(TYPE p, TYPE q) { return p | (~q); } /* ORC */
+TYPE arg13(TYPE p, TYPE q) { return p ^ (~q); } /* EQV */
+
+void ptr1 (TYPE *p) { p[0] = p[1] & p[2]; } /* AND */
+void ptr2 (TYPE *p) { p[0] = p[1] | p[2]; } /* OR */
+void ptr3 (TYPE *p) { p[0] = p[1] ^ p[2]; } /* XOR */
+void ptr4 (TYPE *p) { p[0] = ~p[1]; } /* NOR */
+void ptr5 (TYPE *p) { p[0] = ~(p[1] & p[2]); } /* NAND */
+void ptr6 (TYPE *p) { p[0] = ~(p[1] | p[2]); } /* NOR */
+void ptr7 (TYPE *p) { p[0] = ~(p[1] ^ p[2]); } /* EQV */
+void ptr8 (TYPE *p) { p[0] = ~(p[1]) & p[2]; } /* ANDC */
+void ptr9 (TYPE *p) { p[0] = (~p[1]) | p[2]; } /* ORC */
+void ptr10(TYPE *p) { p[0] = (~p[1]) ^ p[2]; } /* EQV */
+void ptr11(TYPE *p) { p[0] = p[1] & (~p[2]); } /* ANDC */
+void ptr12(TYPE *p) { p[0] = p[1] | (~p[2]); } /* ORC */
+void ptr13(TYPE *p) { p[0] = p[1] ^ (~p[2]); } /* EQV */
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-av.c b/gcc/testsuite/gcc.target/powerpc/bool3-av.c
new file mode 100644
index 0000000000..d4aac786b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-av.c
@@ -0,0 +1,37 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-O2 -mcpu=power6 -mabi=altivec -maltivec -mno-vsx" } */
+/* { dg-final { scan-assembler "\[ \t\]and " } } */
+/* { dg-final { scan-assembler "\[ \t\]or " } } */
+/* { dg-final { scan-assembler "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+/* On altivec, for 128-bit types, ORC/ANDC/EQV might not show up, since the
+ vector unit doesn't support these, so the appropriate combine patterns may
+ not be generated. */
+
+#ifndef TYPE
+#ifdef _ARCH_PPC64
+#define TYPE __int128_t
+#else
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+#endif
+
+#include "bool3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-p7.c b/gcc/testsuite/gcc.target/powerpc/bool3-p7.c
new file mode 100644
index 0000000000..34e3c9e79d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-p7.c
@@ -0,0 +1,37 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mcpu=power7" } */
+/* { dg-final { scan-assembler "\[ \t\]and " } } */
+/* { dg-final { scan-assembler "\[ \t\]or " } } */
+/* { dg-final { scan-assembler "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+/* On power7, for 128-bit types, ORC/ANDC/EQV might not show up, since the
+ vector unit doesn't support these, so the appropriate combine patterns may
+ not be generated. */
+
+#ifndef TYPE
+#ifdef _ARCH_PPC64
+#define TYPE __int128_t
+#else
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+#endif
+
+#include "bool3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3-p8.c b/gcc/testsuite/gcc.target/powerpc/bool3-p8.c
new file mode 100644
index 0000000000..e1b2dfa7ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool3-p8.c
@@ -0,0 +1,36 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-O2 -mcpu=power8" } */
+/* { dg-final { scan-assembler "\[ \t\]and " } } */
+/* { dg-final { scan-assembler "\[ \t\]or " } } */
+/* { dg-final { scan-assembler "\[ \t\]xor " } } */
+/* { dg-final { scan-assembler "\[ \t\]nor " } } */
+/* { dg-final { scan-assembler "\[ \t\]andc " } } */
+/* { dg-final { scan-assembler "\[ \t\]eqv " } } */
+/* { dg-final { scan-assembler "\[ \t\]orc " } } */
+/* { dg-final { scan-assembler "\[ \t\]nand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vand " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]vnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxland " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlxor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnor " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlandc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxleqv " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlorc " } } */
+/* { dg-final { scan-assembler-not "\[ \t\]xxlnand " } } */
+
+#ifndef TYPE
+#ifdef _ARCH_PPC64
+#define TYPE __int128_t
+#else
+typedef int v4si __attribute__ ((vector_size (16)));
+#define TYPE v4si
+#endif
+#endif
+
+#include "bool3.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/bool3.h b/gcc/testsuite/gcc.target/powerpc/bool3.h
new file mode 100644
index 0000000000..7b99a4a610
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/bool3.h
@@ -0,0 +1,186 @@
+/* Test forcing 128-bit logical types into GPR registers. */
+
+#if defined(NO_ASM)
+#define FORCE_REG1(X)
+#define FORCE_REG2(X,Y)
+
+#else
+#if defined(USE_ALTIVEC)
+#define REG_CLASS "+v"
+#define PRINT_REG1 "# altivec reg %0"
+#define PRINT_REG2 "# altivec reg %0, %1"
+
+#elif defined(USE_FPR)
+#define REG_CLASS "+d"
+#define PRINT_REG1 "# fpr reg %0"
+#define PRINT_REG2 "# fpr reg %0, %1"
+
+#elif defined(USE_VSX)
+#define REG_CLASS "+wa"
+#define PRINT_REG1 "# vsx reg %x0"
+#define PRINT_REG2 "# vsx reg %x0, %x1"
+
+#else
+#define REG_CLASS "+r"
+#define PRINT_REG1 "# gpr reg %0"
+#define PRINT_REG2 "# gpr reg %0, %1"
+#endif
+
+#define FORCE_REG1(X) __asm__ (PRINT_REG1 : REG_CLASS (X))
+#define FORCE_REG2(X,Y) __asm__ (PRINT_REG2 : REG_CLASS (X), REG_CLASS (Y))
+#endif
+
+void ptr1 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a & b; /* AND */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr2 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a | b; /* OR */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr3 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a ^ b; /* XOR */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr4 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b;
+
+ FORCE_REG1 (a);
+ b = ~a; /* NOR */
+ FORCE_REG1 (b);
+ p[0] = b;
+}
+
+void ptr5 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = ~(a & b); /* NAND */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr6 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = ~(a | b); /* AND */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr7 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = ~(a ^ b); /* EQV */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr8 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = (~a) & b; /* ANDC */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr9 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = (~a) | b; /* ORC */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr10 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = (~a) ^ b; /* EQV */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr11 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a & (~b); /* ANDC */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr12 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a | (~b); /* ORC */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
+
+void ptr13 (TYPE *p)
+{
+ TYPE a = p[1];
+ TYPE b = p[2];
+ TYPE c;
+
+ FORCE_REG2 (a, b);
+ c = a ^ (~b); /* AND */
+ FORCE_REG1 (c);
+ p[0] = c;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1.c
new file mode 100644
index 0000000000..ce5da6a03d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/crypto-builtin-1.c
@@ -0,0 +1,130 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+typedef vector unsigned long long crypto_t;
+typedef vector unsigned long long v2di_t;
+typedef vector unsigned int v4si_t;
+typedef vector unsigned short v8hi_t;
+typedef vector unsigned char v16qi_t;
+
+crypto_t crpyto1 (crypto_t a)
+{
+ return __builtin_crypto_vsbox (a);
+}
+
+crypto_t crypto2 (crypto_t a, crypto_t b)
+{
+ return __builtin_crypto_vcipher (a, b);
+}
+
+crypto_t crypto3 (crypto_t a, crypto_t b)
+{
+ return __builtin_crypto_vcipherlast (a, b);
+}
+
+crypto_t crypto4 (crypto_t a, crypto_t b)
+{
+ return __builtin_crypto_vncipher (a, b);
+}
+
+crypto_t crypto5 (crypto_t a, crypto_t b)
+{
+ return __builtin_crypto_vncipherlast (a, b);
+}
+
+v16qi_t crypto6a (v16qi_t a, v16qi_t b, v16qi_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v8hi_t crypto6b (v8hi_t a, v8hi_t b, v8hi_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v4si_t crypto6c (v4si_t a, v4si_t b, v4si_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v2di_t crypto6d (v2di_t a, v2di_t b, v2di_t c)
+{
+ return __builtin_crypto_vpermxor (a, b, c);
+}
+
+v16qi_t crypto7a (v16qi_t a, v16qi_t b)
+{
+ return __builtin_crypto_vpmsumb (a, b);
+}
+
+v16qi_t crypto7b (v16qi_t a, v16qi_t b)
+{
+ return __builtin_crypto_vpmsum (a, b);
+}
+
+v8hi_t crypto7c (v8hi_t a, v8hi_t b)
+{
+ return __builtin_crypto_vpmsumh (a, b);
+}
+
+v8hi_t crypto7d (v8hi_t a, v8hi_t b)
+{
+ return __builtin_crypto_vpmsum (a, b);
+}
+
+v4si_t crypto7e (v4si_t a, v4si_t b)
+{
+ return __builtin_crypto_vpmsumw (a, b);
+}
+
+v4si_t crypto7f (v4si_t a, v4si_t b)
+{
+ return __builtin_crypto_vpmsum (a, b);
+}
+
+v2di_t crypto7g (v2di_t a, v2di_t b)
+{
+ return __builtin_crypto_vpmsumd (a, b);
+}
+
+v2di_t crypto7h (v2di_t a, v2di_t b)
+{
+ return __builtin_crypto_vpmsum (a, b);
+}
+
+v2di_t crypto8a (v2di_t a)
+{
+ return __builtin_crypto_vshasigmad (a, 0, 8);
+}
+
+v2di_t crypto8b (v2di_t a)
+{
+ return __builtin_crypto_vshasigma (a, 0, 8);
+}
+
+v4si_t crypto8c (v4si_t a)
+{
+ return __builtin_crypto_vshasigmaw (a, 1, 15);
+}
+
+v4si_t crypto8d (v4si_t a)
+{
+ return __builtin_crypto_vshasigma (a, 1, 15);
+}
+
+/* Note space is used after the instruction so that vcipherlast does not match
+ vcipher. */
+/* { dg-final { scan-assembler-times "vcipher " 1 } } */
+/* { dg-final { scan-assembler-times "vcipherlast " 1 } } */
+/* { dg-final { scan-assembler-times "vncipher " 1 } } */
+/* { dg-final { scan-assembler-times "vncipherlast " 1 } } */
+/* { dg-final { scan-assembler-times "vpermxor " 4 } } */
+/* { dg-final { scan-assembler-times "vpmsumb " 2 } } */
+/* { dg-final { scan-assembler-times "vpmsumd " 2 } } */
+/* { dg-final { scan-assembler-times "vpmsumh " 2 } } */
+/* { dg-final { scan-assembler-times "vpmsumw " 2 } } */
+/* { dg-final { scan-assembler-times "vsbox " 1 } } */
+/* { dg-final { scan-assembler-times "vshasigmad " 2 } } */
+/* { dg-final { scan-assembler-times "vshasigmaw " 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c b/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c
index 0692b3d806..14b56d0828 100644
--- a/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c
+++ b/gcc/testsuite/gcc.target/powerpc/darwin-longlong.c
@@ -11,7 +11,11 @@ int msw(long long in)
int i[2];
} ud;
ud.ll = in;
+#ifdef __LITTLE_ENDIAN__
+ return ud.i[1];
+#else
return ud.i[0];
+#endif
}
int main()
diff --git a/gcc/testsuite/gcc.target/powerpc/dfmode_off.c b/gcc/testsuite/gcc.target/powerpc/dfmode_off.c
new file mode 100644
index 0000000000..ab711195fa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfmode_off.c
@@ -0,0 +1,47 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
+
+void w1 (void *x, double y) { *(double *) (x + 32767) = y; }
+void w2 (void *x, double y) { *(double *) (x + 32766) = y; }
+void w3 (void *x, double y) { *(double *) (x + 32765) = y; }
+void w4 (void *x, double y) { *(double *) (x + 32764) = y; }
+void w5 (void *x, double y) { *(double *) (x + 32763) = y; }
+void w6 (void *x, double y) { *(double *) (x + 32762) = y; }
+void w7 (void *x, double y) { *(double *) (x + 32761) = y; }
+void w8 (void *x, double y) { *(double *) (x + 32760) = y; }
+void w9 (void *x, double y) { *(double *) (x + 32759) = y; }
+void w10 (void *x, double y) { *(double *) (x + 32758) = y; }
+void w11 (void *x, double y) { *(double *) (x + 32757) = y; }
+void w12 (void *x, double y) { *(double *) (x + 32756) = y; }
+void w13 (void *x, double y) { *(double *) (x + 32755) = y; }
+void w14 (void *x, double y) { *(double *) (x + 32754) = y; }
+void w15 (void *x, double y) { *(double *) (x + 32753) = y; }
+void w16 (void *x, double y) { *(double *) (x + 32752) = y; }
+void w17 (void *x, double y) { *(double *) (x + 32751) = y; }
+void w18 (void *x, double y) { *(double *) (x + 32750) = y; }
+void w19 (void *x, double y) { *(double *) (x + 32749) = y; }
+void w20 (void *x, double y) { *(double *) (x + 32748) = y; }
+
+double r1 (void *x) { return *(double *) (x + 32767); }
+double r2 (void *x) { return *(double *) (x + 32766); }
+double r3 (void *x) { return *(double *) (x + 32765); }
+double r4 (void *x) { return *(double *) (x + 32764); }
+double r5 (void *x) { return *(double *) (x + 32763); }
+double r6 (void *x) { return *(double *) (x + 32762); }
+double r7 (void *x) { return *(double *) (x + 32761); }
+double r8 (void *x) { return *(double *) (x + 32760); }
+double r9 (void *x) { return *(double *) (x + 32759); }
+double r10 (void *x) { return *(double *) (x + 32758); }
+double r11 (void *x) { return *(double *) (x + 32757); }
+double r12 (void *x) { return *(double *) (x + 32756); }
+double r13 (void *x) { return *(double *) (x + 32755); }
+double r14 (void *x) { return *(double *) (x + 32754); }
+double r15 (void *x) { return *(double *) (x + 32753); }
+double r16 (void *x) { return *(double *) (x + 32752); }
+double r17 (void *x) { return *(double *) (x + 32751); }
+double r18 (void *x) { return *(double *) (x + 32750); }
+double r19 (void *x) { return *(double *) (x + 32749); }
+double r20 (void *x) { return *(double *) (x + 32748); }
+
+/* { dg-final { object-size text == 320 } } */
+/* { dg-final { cleanup-saved-temps "dfmode_off" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/dfp-builtin-1.c
new file mode 100644
index 0000000000..614f272642
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp-builtin-1.c
@@ -0,0 +1,88 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-times "ddedpd " 4 } } */
+/* { dg-final { scan-assembler-times "denbcd " 2 } } */
+/* { dg-final { scan-assembler-times "dxex " 1 } } */
+/* { dg-final { scan-assembler-times "diex " 1 } } */
+/* { dg-final { scan-assembler-times "dscli " 2 } } */
+/* { dg-final { scan-assembler-times "dscri " 2 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+/* { dg-final { scan-assembler-not "dctqpq" } } */
+/* { dg-final { scan-assembler-not "drdpq" } } */
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-not "lfd" } } */
+
+_Decimal64
+do_dedpd_0 (_Decimal64 a)
+{
+ return __builtin_ddedpd (0, a);
+}
+
+_Decimal64
+do_dedpd_1 (_Decimal64 a)
+{
+ return __builtin_ddedpd (1, a);
+}
+
+_Decimal64
+do_dedpd_2 (_Decimal64 a)
+{
+ return __builtin_ddedpd (2, a);
+}
+
+_Decimal64
+do_dedpd_3 (_Decimal64 a)
+{
+ return __builtin_ddedpd (3, a);
+}
+
+_Decimal64
+do_enbcd_0 (_Decimal64 a)
+{
+ return __builtin_denbcd (0, a);
+}
+
+_Decimal64
+do_enbcd_1 (_Decimal64 a)
+{
+ return __builtin_denbcd (1, a);
+}
+
+_Decimal64
+do_xex (_Decimal64 a)
+{
+ return __builtin_dxex (a);
+}
+
+_Decimal64
+do_iex (_Decimal64 a, _Decimal64 b)
+{
+ return __builtin_diex (a, b);
+}
+
+_Decimal64
+do_scli_1 (_Decimal64 a)
+{
+ return __builtin_dscli (a, 1);
+}
+
+_Decimal64
+do_scli_10 (_Decimal64 a)
+{
+ return __builtin_dscli (a, 10);
+}
+
+_Decimal64
+do_scri_1 (_Decimal64 a)
+{
+ return __builtin_dscri (a, 1);
+}
+
+_Decimal64
+do_scri_10 (_Decimal64 a)
+{
+ return __builtin_dscri (a, 10);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp-builtin-2.c b/gcc/testsuite/gcc.target/powerpc/dfp-builtin-2.c
new file mode 100644
index 0000000000..189bc9ad6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp-builtin-2.c
@@ -0,0 +1,88 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-times "ddedpdq " 4 } } */
+/* { dg-final { scan-assembler-times "denbcdq " 2 } } */
+/* { dg-final { scan-assembler-times "dxexq " 1 } } */
+/* { dg-final { scan-assembler-times "diexq " 1 } } */
+/* { dg-final { scan-assembler-times "dscliq " 2 } } */
+/* { dg-final { scan-assembler-times "dscriq " 2 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+/* { dg-final { scan-assembler-not "dctqpq" } } */
+/* { dg-final { scan-assembler-not "drdpq" } } */
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-not "lfd" } } */
+
+_Decimal128
+do_dedpdq_0 (_Decimal128 a)
+{
+ return __builtin_ddedpdq (0, a);
+}
+
+_Decimal128
+do_dedpdq_1 (_Decimal128 a)
+{
+ return __builtin_ddedpdq (1, a);
+}
+
+_Decimal128
+do_dedpdq_2 (_Decimal128 a)
+{
+ return __builtin_ddedpdq (2, a);
+}
+
+_Decimal128
+do_dedpdq_3 (_Decimal128 a)
+{
+ return __builtin_ddedpdq (3, a);
+}
+
+_Decimal128
+do_enbcdq_0 (_Decimal128 a)
+{
+ return __builtin_denbcdq (0, a);
+}
+
+_Decimal128
+do_enbcdq_1 (_Decimal128 a)
+{
+ return __builtin_denbcdq (1, a);
+}
+
+_Decimal128
+do_xexq (_Decimal128 a)
+{
+ return __builtin_dxexq (a);
+}
+
+_Decimal128
+do_iexq (_Decimal128 a, _Decimal128 b)
+{
+ return __builtin_diexq (a, b);
+}
+
+_Decimal128
+do_scliq_1 (_Decimal128 a)
+{
+ return __builtin_dscliq (a, 1);
+}
+
+_Decimal128
+do_scliq_10 (_Decimal128 a)
+{
+ return __builtin_dscliq (a, 10);
+}
+
+_Decimal128
+do_scriq_1 (_Decimal128 a)
+{
+ return __builtin_dscriq (a, 1);
+}
+
+_Decimal128
+do_scriq_10 (_Decimal128 a)
+{
+ return __builtin_dscriq (a, 10);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp-dd-2.c b/gcc/testsuite/gcc.target/powerpc/dfp-dd-2.c
new file mode 100644
index 0000000000..fcb72bdff2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp-dd-2.c
@@ -0,0 +1,26 @@
+/* Test generation of DFP instructions for POWER6. */
+/* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
+
+/* { dg-final { scan-assembler-times "fneg" 1 } } */
+/* { dg-final { scan-assembler-times "fabs" 1 } } */
+/* { dg-final { scan-assembler-times "fnabs" 1 } } */
+/* { dg-final { scan-assembler-times "fmr" 0 } } */
+
+_Decimal64
+func1 (_Decimal64 a, _Decimal64 b)
+{
+ return -b;
+}
+
+_Decimal64
+func2 (_Decimal64 a, _Decimal64 b)
+{
+ return __builtin_fabsd64 (b);
+}
+
+_Decimal64
+func3 (_Decimal64 a, _Decimal64 b)
+{
+ return - __builtin_fabsd64 (b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp-td-2.c b/gcc/testsuite/gcc.target/powerpc/dfp-td-2.c
new file mode 100644
index 0000000000..a078cc4698
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp-td-2.c
@@ -0,0 +1,29 @@
+/* Test generation of DFP instructions for POWER6. */
+/* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
+
+/* { dg-final { scan-assembler-times "fneg" 1 } } */
+/* { dg-final { scan-assembler-times "fabs" 1 } } */
+/* { dg-final { scan-assembler-times "fnabs" 1 } } */
+/* { dg-final { scan-assembler-times "fmr" 0 } } */
+
+/* These tests verify we only generate fneg, fabs and fnabs
+ instructions and no fmr's since these are done in place. */
+
+_Decimal128
+func1 (_Decimal128 a)
+{
+ return -a;
+}
+
+_Decimal128
+func2 (_Decimal128 a)
+{
+ return __builtin_fabsd128 (a);
+}
+
+_Decimal128
+func3 (_Decimal128 a)
+{
+ return - __builtin_fabsd128 (a);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dfp-td-3.c b/gcc/testsuite/gcc.target/powerpc/dfp-td-3.c
new file mode 100644
index 0000000000..e825e5cad2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dfp-td-3.c
@@ -0,0 +1,29 @@
+/* Test generation of DFP instructions for POWER6. */
+/* { dg-do compile { target { powerpc*-*-linux* && powerpc_fprs } } } */
+/* { dg-options "-std=gnu99 -O1 -mcpu=power6" } */
+
+/* { dg-final { scan-assembler-times "fneg" 1 } } */
+/* { dg-final { scan-assembler-times "fabs" 1 } } */
+/* { dg-final { scan-assembler-times "fnabs" 1 } } */
+/* { dg-final { scan-assembler-times "fmr" 3 } } */
+
+/* These tests verify we generate fneg, fabs and fnabs and
+ associated fmr's since these are not done in place. */
+
+_Decimal128
+func1 (_Decimal128 a, _Decimal128 b)
+{
+ return -b;
+}
+
+_Decimal128
+func2 (_Decimal128 a, _Decimal128 b)
+{
+ return __builtin_fabsd128 (b);
+}
+
+_Decimal128
+func3 (_Decimal128 a, _Decimal128 b)
+{
+ return - __builtin_fabsd128 (b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/dimode_off.c b/gcc/testsuite/gcc.target/powerpc/dimode_off.c
new file mode 100644
index 0000000000..3d7489b59b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/dimode_off.c
@@ -0,0 +1,50 @@
+/* { dg-do assemble } */
+/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
+
+void w1 (void *x, long long y) { *(long long *) (x + 32767) = y; }
+void w2 (void *x, long long y) { *(long long *) (x + 32766) = y; }
+void w3 (void *x, long long y) { *(long long *) (x + 32765) = y; }
+void w4 (void *x, long long y) { *(long long *) (x + 32764) = y; }
+void w5 (void *x, long long y) { *(long long *) (x + 32763) = y; }
+void w6 (void *x, long long y) { *(long long *) (x + 32762) = y; }
+void w7 (void *x, long long y) { *(long long *) (x + 32761) = y; }
+void w8 (void *x, long long y) { *(long long *) (x + 32760) = y; }
+void w9 (void *x, long long y) { *(long long *) (x + 32759) = y; }
+void w10 (void *x, long long y) { *(long long *) (x + 32758) = y; }
+void w11 (void *x, long long y) { *(long long *) (x + 32757) = y; }
+void w12 (void *x, long long y) { *(long long *) (x + 32756) = y; }
+void w13 (void *x, long long y) { *(long long *) (x + 32755) = y; }
+void w14 (void *x, long long y) { *(long long *) (x + 32754) = y; }
+void w15 (void *x, long long y) { *(long long *) (x + 32753) = y; }
+void w16 (void *x, long long y) { *(long long *) (x + 32752) = y; }
+void w17 (void *x, long long y) { *(long long *) (x + 32751) = y; }
+void w18 (void *x, long long y) { *(long long *) (x + 32750) = y; }
+void w19 (void *x, long long y) { *(long long *) (x + 32749) = y; }
+void w20 (void *x, long long y) { *(long long *) (x + 32748) = y; }
+
+long long r1 (void *x) { return *(long long *) (x + 32767); }
+long long r2 (void *x) { return *(long long *) (x + 32766); }
+long long r3 (void *x) { return *(long long *) (x + 32765); }
+long long r4 (void *x) { return *(long long *) (x + 32764); }
+long long r5 (void *x) { return *(long long *) (x + 32763); }
+long long r6 (void *x) { return *(long long *) (x + 32762); }
+long long r7 (void *x) { return *(long long *) (x + 32761); }
+long long r8 (void *x) { return *(long long *) (x + 32760); }
+long long r9 (void *x) { return *(long long *) (x + 32759); }
+long long r10 (void *x) { return *(long long *) (x + 32758); }
+long long r11 (void *x) { return *(long long *) (x + 32757); }
+long long r12 (void *x) { return *(long long *) (x + 32756); }
+long long r13 (void *x) { return *(long long *) (x + 32755); }
+long long r14 (void *x) { return *(long long *) (x + 32754); }
+long long r15 (void *x) { return *(long long *) (x + 32753); }
+long long r16 (void *x) { return *(long long *) (x + 32752); }
+long long r17 (void *x) { return *(long long *) (x + 32751); }
+long long r18 (void *x) { return *(long long *) (x + 32750); }
+long long r19 (void *x) { return *(long long *) (x + 32749); }
+long long r20 (void *x) { return *(long long *) (x + 32748); }
+
+/* { dg-final { object-size text == 440 { target { lp64 } } } } */
+/* 32-bit test should really be == 512 bytes, see pr54110 */
+/* { dg-final { object-size text <= 640 { target { ilp32 } } } } */
+/* { dg-final { scan-assembler-not "(st|l)fd" } } */
+/* { dg-final { cleanup-saved-temps "dimode_off" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c
new file mode 100644
index 0000000000..2569ac8436
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-double1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+
+/* Check code generation for direct move for double types. */
+
+#define TYPE double
+#define IS_FLOAT 1
+#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "ws"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c
new file mode 100644
index 0000000000..c8702204b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-double2.c
@@ -0,0 +1,15 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+/* Check whether we get the right bits for direct move at runtime. */
+
+#define TYPE double
+#define IS_FLOAT 1
+#define NO_ALTIVEC 1
+#define DO_MAIN
+#define VSX_REG_ATTR "ws"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c
new file mode 100644
index 0000000000..524c0eead4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-float1.c
@@ -0,0 +1,18 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+/* { dg-final { scan-assembler "xscvdpspn" } } */
+/* { dg-final { scan-assembler "xscvspdpn" } } */
+
+/* Check code generation for direct move for float types. */
+
+#define TYPE float
+#define IS_FLOAT 1
+#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "ww"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c
new file mode 100644
index 0000000000..352e76166d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-float2.c
@@ -0,0 +1,15 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+/* Check whether we get the right bits for direct move at runtime. */
+
+#define TYPE float
+#define IS_FLOAT 1
+#define NO_ALTIVEC 1
+#define DO_MAIN
+#define VSX_REG_ATTR "ww"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c
new file mode 100644
index 0000000000..0a78f9cb25
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-long1.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+
+/* Check code generation for direct move for long types. */
+
+#define TYPE long
+#define IS_INT 1
+#define NO_ALTIVEC 1
+#define VSX_REG_ATTR "d"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c
new file mode 100644
index 0000000000..cee9e0e0f1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-long2.c
@@ -0,0 +1,15 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+/* Check whether we get the right bits for direct move at runtime. */
+
+#define TYPE long
+#define IS_INT 1
+#define NO_ALTIVEC 1
+#define DO_MAIN
+#define VSX_REG_ATTR "d"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c b/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c
new file mode 100644
index 0000000000..3067b9a8e6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-vint1.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+/* { dg-final { scan-assembler "mtvsrd" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+
+/* Check code generation for direct move for vector types. */
+
+#define TYPE vector int
+#define VSX_REG_ATTR "wa"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c b/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c
new file mode 100644
index 0000000000..0d8264faf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move-vint2.c
@@ -0,0 +1,13 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+/* Check whether we get the right bits for direct move at runtime. */
+
+#define TYPE vector int
+#define DO_MAIN
+#define VSX_REG_ATTR "wa"
+
+#include "direct-move.h"
diff --git a/gcc/testsuite/gcc.target/powerpc/direct-move.h b/gcc/testsuite/gcc.target/powerpc/direct-move.h
new file mode 100644
index 0000000000..6a5b7ba180
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/direct-move.h
@@ -0,0 +1,188 @@
+/* Test functions for direct move support. */
+
+#include <math.h>
+extern void abort (void);
+
+#ifndef VSX_REG_ATTR
+#define VSX_REG_ATTR "wa"
+#endif
+
+void __attribute__((__noinline__))
+copy (TYPE *a, TYPE *b)
+{
+ *b = *a;
+}
+
+#ifndef NO_GPR
+void __attribute__((__noinline__))
+load_gpr (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ __asm__ ("# gpr, reg = %0" : "+b" (c));
+ *b = c;
+}
+#endif
+
+#ifndef NO_FPR
+void __attribute__((__noinline__))
+load_fpr (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ __asm__ ("# fpr, reg = %0" : "+d" (c));
+ *b = c;
+}
+#endif
+
+#ifndef NO_ALTIVEC
+void __attribute__((__noinline__))
+load_altivec (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ __asm__ ("# altivec, reg = %0" : "+v" (c));
+ *b = c;
+}
+#endif
+
+#ifndef NO_VSX
+void __attribute__((__noinline__))
+load_vsx (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (c));
+ *b = c;
+}
+#endif
+
+#ifndef NO_GPR_TO_VSX
+void __attribute__((__noinline__))
+load_gpr_to_vsx (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ TYPE d;
+ __asm__ ("# gpr, reg = %0" : "+b" (c));
+ d = c;
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (d));
+ *b = d;
+}
+#endif
+
+#ifndef NO_VSX_TO_GPR
+void __attribute__((__noinline__))
+load_vsx_to_gpr (TYPE *a, TYPE *b)
+{
+ TYPE c = *a;
+ TYPE d;
+ __asm__ ("# vsx, reg = %x0" : "+" VSX_REG_ATTR (c));
+ d = c;
+ __asm__ ("# gpr, reg = %0" : "+b" (d));
+ *b = d;
+}
+#endif
+
+#ifdef DO_MAIN
+typedef void (fn_type (TYPE *, TYPE *));
+
+struct test_struct {
+ fn_type *func;
+ const char *name;
+};
+
+const struct test_struct test_functions[] = {
+ { copy, "copy" },
+#ifndef NO_GPR
+ { load_gpr, "load_gpr" },
+#endif
+#ifndef NO_FPR
+ { load_fpr, "load_fpr" },
+#endif
+#ifndef NO_ALTIVEC
+ { load_altivec, "load_altivec" },
+#endif
+#ifndef NO_VSX
+ { load_vsx, "load_vsx" },
+#endif
+#ifndef NO_GPR_TO_VSX
+ { load_gpr_to_vsx, "load_gpr_to_vsx" },
+#endif
+#ifndef NO_VSX_TO_GPR
+ { load_vsx_to_gpr, "load_vsx_to_gpr" },
+#endif
+};
+
+/* Test a given value for each of the functions. */
+void __attribute__((__noinline__))
+test_value (TYPE a)
+{
+ long i;
+
+ for (i = 0; i < sizeof (test_functions) / sizeof (test_functions[0]); i++)
+ {
+ TYPE b;
+
+ test_functions[i].func (&a, &b);
+ if (memcmp ((void *)&a, (void *)&b, sizeof (TYPE)) != 0)
+ abort ();
+ }
+}
+
+/* Main program. */
+int
+main (void)
+{
+ long i,j;
+ union {
+ TYPE value;
+ unsigned char bytes[sizeof (TYPE)];
+ } u;
+
+#if IS_INT
+ TYPE value = (TYPE)-5;
+ for (i = 0; i < 12; i++)
+ {
+ test_value (value);
+ value++;
+ }
+
+ for (i = 0; i < 8*sizeof (TYPE); i++)
+ test_value (((TYPE)1) << i);
+
+#elif IS_UNS
+ TYPE value = (TYPE)0;
+ for (i = 0; i < 10; i++)
+ {
+ test_value (value);
+ test_value (~ value);
+ value++;
+ }
+
+ for (i = 0; i < 8*sizeof (TYPE); i++)
+ test_value (((TYPE)1) << i);
+
+#elif IS_FLOAT
+ TYPE value = (TYPE)-5;
+ for (i = 0; i < 12; i++)
+ {
+ test_value (value);
+ value++;
+ }
+
+ test_value ((TYPE)3.1415926535);
+ test_value ((TYPE)1.23456);
+ test_value ((TYPE)(-0.0));
+ test_value ((TYPE)NAN);
+ test_value ((TYPE)+INFINITY);
+ test_value ((TYPE)-INFINITY);
+#else
+
+ for (j = 0; j < 10; j++)
+ {
+ for (i = 0; i < sizeof (TYPE); i++)
+ u.bytes[i] = (unsigned char) (random () >> 4);
+
+ test_value (u.value);
+ }
+#endif
+
+ return 0;
+}
+#endif
diff --git a/gcc/testsuite/gcc.target/powerpc/e500-ord-1.c b/gcc/testsuite/gcc.target/powerpc/e500-ord-1.c
new file mode 100644
index 0000000000..c4f2769901
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/e500-ord-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile { target powerpc*-*-eabi* } } */
+/* { dg-options "-O -ftrapping-math -fdump-rtl-final" } */
+
+int isgreater (float f1, float f2)
+{
+ int r = (f1 > f2);
+ return !r ? -1 : 1;
+}
+
+int isgreaterequal (float f1, float f2)
+{
+ int r = (f1 >= f2);
+ return !r ? -1 : 1;
+}
+
+int isless (float f1, float f2)
+{
+ int r = (f1 < f2);
+ return !r ? -1 : 1;
+}
+
+int islessequal (float f1, float f2)
+{
+ int r = (f1 <= f2);
+ return !r ? -1 : 1;
+}
+
+/* { dg-final { scan-rtl-dump-not "__unordsf2" "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/e500-ord-2.c b/gcc/testsuite/gcc.target/powerpc/e500-ord-2.c
new file mode 100644
index 0000000000..a6b5c29737
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/e500-ord-2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile { target powerpc*-*-eabi* } } */
+/* { dg-options "-O -fno-trapping-math -fdump-rtl-final" } */
+
+int isgreater (float f1, float f2)
+{
+ int r = (f1 > f2);
+ return !r ? -1 : 1;
+}
+
+int isgreaterequal (float f1, float f2)
+{
+ int r = (f1 >= f2);
+ return !r ? -1 : 1;
+}
+
+int isless (float f1, float f2)
+{
+ int r = (f1 < f2);
+ return !r ? -1 : 1;
+}
+
+int islessequal (float f1, float f2)
+{
+ int r = (f1 <= f2);
+ return !r ? -1 : 1;
+}
+
+/* { dg-final { scan-rtl-dump-not "__unordsf2" "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/e500-unord-1.c b/gcc/testsuite/gcc.target/powerpc/e500-unord-1.c
new file mode 100644
index 0000000000..0cd75d8d30
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/e500-unord-1.c
@@ -0,0 +1,29 @@
+/* { dg-do compile { target powerpc*-*-eabi* } } */
+/* { dg-options "-O -ftrapping-math -fdump-rtl-final" } */
+
+int isgreater (float f1, float f2)
+{
+ int r = __builtin_isgreater (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int isgreaterequal (float f1, float f2)
+{
+ int r = __builtin_isgreaterequal (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int isless (float f1, float f2)
+{
+ int r = __builtin_isless (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int islessequal (float f1, float f2)
+{
+ int r = __builtin_islessequal (f1, f2);
+ return !r ? -1 : 1;
+}
+
+/* { dg-final { scan-rtl-dump-times "__unordsf2" 4 "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/e500-unord-2.c b/gcc/testsuite/gcc.target/powerpc/e500-unord-2.c
new file mode 100644
index 0000000000..51b1316f27
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/e500-unord-2.c
@@ -0,0 +1,29 @@
+/* { dg-do compile { target powerpc*-*-eabi* } } */
+/* { dg-options "-O -fno-trapping-math -fdump-rtl-final" } */
+
+int isgreater (float f1, float f2)
+{
+ int r = __builtin_isgreater (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int isgreaterequal (float f1, float f2)
+{
+ int r = __builtin_isgreaterequal (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int isless (float f1, float f2)
+{
+ int r = __builtin_isless (f1, f2);
+ return !r ? -1 : 1;
+}
+
+int islessequal (float f1, float f2)
+{
+ int r = __builtin_islessequal (f1, f2);
+ return !r ? -1 : 1;
+}
+
+/* { dg-final { scan-rtl-dump-not "__unordsf2" "final" } } */
+/* { dg-final { cleanup-rtl-dump "final" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c b/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
new file mode 100644
index 0000000000..5f948b7212
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/extend-divide-1.c
@@ -0,0 +1,34 @@
+/* { dg-do compile { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-times "divwe " 1 } } */
+/* { dg-final { scan-assembler-times "divweo " 1 } } */
+/* { dg-final { scan-assembler-times "divweu " 1 } } */
+/* { dg-final { scan-assembler-times "divweuo " 1 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+
+int
+div_we (int a, int b)
+{
+ return __builtin_divwe (a, b);
+}
+
+int
+div_weo (int a, int b)
+{
+ return __builtin_divweo (a, b);
+}
+
+unsigned int
+div_weu (unsigned int a, unsigned int b)
+{
+ return __builtin_divweu (a, b);
+}
+
+unsigned int
+div_weuo (unsigned int a, unsigned int b)
+{
+ return __builtin_divweuo (a, b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c b/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c
new file mode 100644
index 0000000000..8ee6c8cf76
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/extend-divide-2.c
@@ -0,0 +1,34 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O2" } */
+/* { dg-final { scan-assembler-times "divde " 1 } } */
+/* { dg-final { scan-assembler-times "divdeo " 1 } } */
+/* { dg-final { scan-assembler-times "divdeu " 1 } } */
+/* { dg-final { scan-assembler-times "divdeuo " 1 } } */
+/* { dg-final { scan-assembler-not "bl __builtin" } } */
+
+long
+div_de (long a, long b)
+{
+ return __builtin_divde (a, b);
+}
+
+long
+div_deo (long a, long b)
+{
+ return __builtin_divdeo (a, b);
+}
+
+unsigned long
+div_deu (unsigned long a, unsigned long b)
+{
+ return __builtin_divdeu (a, b);
+}
+
+unsigned long
+div_deuo (unsigned long a, unsigned long b)
+{
+ return __builtin_divdeuo (a, b);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/fusion.c b/gcc/testsuite/gcc.target/powerpc/fusion.c
new file mode 100644
index 0000000000..60e635972c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/fusion.c
@@ -0,0 +1,24 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power7 -mtune=power8 -O3" } */
+
+#define LARGE 0x12345
+
+int fusion_uchar (unsigned char *p){ return p[LARGE]; }
+int fusion_schar (signed char *p){ return p[LARGE]; }
+int fusion_ushort (unsigned short *p){ return p[LARGE]; }
+int fusion_short (short *p){ return p[LARGE]; }
+int fusion_int (int *p){ return p[LARGE]; }
+unsigned fusion_uns (unsigned *p){ return p[LARGE]; }
+
+vector double fusion_vector (vector double *p) { return p[2]; }
+
+/* { dg-final { scan-assembler-times "gpr load fusion" 6 } } */
+/* { dg-final { scan-assembler-times "vector load fusion" 1 } } */
+/* { dg-final { scan-assembler-times "lbz" 2 } } */
+/* { dg-final { scan-assembler-times "extsb" 1 } } */
+/* { dg-final { scan-assembler-times "lhz" 2 } } */
+/* { dg-final { scan-assembler-times "extsh" 1 } } */
+/* { dg-final { scan-assembler-times "lwz" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
new file mode 100644
index 0000000000..e58816a7f0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/htm-builtin-1.c
@@ -0,0 +1,51 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_htm_ok } */
+/* { dg-options "-O2 -mhtm" } */
+
+/* { dg-final { scan-assembler-times "tbegin\\." 1 } } */
+/* { dg-final { scan-assembler-times "tend\\." 2 } } */
+/* { dg-final { scan-assembler-times "tabort\\." 2 } } */
+/* { dg-final { scan-assembler-times "tabortdc\\." 1 } } */
+/* { dg-final { scan-assembler-times "tabortdci\\." 1 } } */
+/* { dg-final { scan-assembler-times "tabortwc\\." 1 } } */
+/* { dg-final { scan-assembler-times "tabortwci\\." 2 } } */
+/* { dg-final { scan-assembler-times "tcheck\\." 1 } } */
+/* { dg-final { scan-assembler-times "trechkpt\\." 1 } } */
+/* { dg-final { scan-assembler-times "treclaim\\." 1 } } */
+/* { dg-final { scan-assembler-times "tsr\\." 3 } } */
+/* { dg-final { scan-assembler-times "mfspr" 4 } } */
+/* { dg-final { scan-assembler-times "mtspr" 4 } } */
+
+void use_builtins (long *p, char code, long *a, long *b)
+{
+ p[0] = __builtin_tbegin (0);
+ p[1] = __builtin_tend (0);
+ p[2] = __builtin_tendall ();
+ p[3] = __builtin_tabort (0);
+ p[4] = __builtin_tabort (code);
+
+ p[5] = __builtin_tabortdc (0xf, a[5], b[5]);
+ p[6] = __builtin_tabortdci (0xf, a[6], 13);
+ p[7] = __builtin_tabortwc (0xf, a[7], b[7]);
+ p[8] = __builtin_tabortwci (0xf, a[8], 13);
+
+ p[9] = __builtin_tcheck (5);
+ p[10] = __builtin_trechkpt ();
+ p[11] = __builtin_treclaim (0);
+ p[12] = __builtin_tresume ();
+ p[13] = __builtin_tsuspend ();
+ p[14] = __builtin_tsr (0);
+ p[15] = __builtin_ttest (); /* This expands to a tabortwci. */
+
+
+ p[16] = __builtin_get_texasr ();
+ p[17] = __builtin_get_texasru ();
+ p[18] = __builtin_get_tfhar ();
+ p[19] = __builtin_get_tfiar ();
+
+ __builtin_set_texasr (a[20]);
+ __builtin_set_texasru (a[21]);
+ __builtin_set_tfhar (a[22]);
+ __builtin_set_tfiar (a[23]);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-ttest.c b/gcc/testsuite/gcc.target/powerpc/htm-ttest.c
new file mode 100644
index 0000000000..29cbd5b90b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/htm-ttest.c
@@ -0,0 +1,14 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_htm_ok } */
+/* { dg-options "-O2 -mhtm" } */
+
+/* { dg-final { scan-assembler "rlwinm r?\[0-9\]+,r?\[0-9\]+,3,30,31" { target { ilp32 } } } } */
+/* { dg-final { scan-assembler "rldicl r?\[0-9\]+,r?\[0-9\]+,35,62" { target { lp64 } } } } */
+
+#include <htmintrin.h>
+long
+ttest (void)
+{
+ return _HTM_STATE(__builtin_ttest());
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/htm-xl-intrin-1.c b/gcc/testsuite/gcc.target/powerpc/htm-xl-intrin-1.c
new file mode 100644
index 0000000000..5e92814b77
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/htm-xl-intrin-1.c
@@ -0,0 +1,32 @@
+/* This checks the availability of the XL compiler intrinsics for
+ transactional execution with the expected prototypes. */
+
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_htm_ok } */
+/* { dg-options "-O2 -mhtm" } */
+
+#include <htmxlintrin.h>
+
+void
+foo (void *TM_buff, long *result, unsigned char *code)
+{
+ *result++ = __TM_simple_begin ();
+ *result++ = __TM_begin (TM_buff);
+ *result++ = __TM_end ();
+ __TM_abort ();
+ __TM_named_abort (*code);
+ __TM_resume ();
+ __TM_suspend ();
+ *result++ = __TM_is_user_abort (TM_buff);
+ *result++ = __TM_is_named_user_abort (TM_buff, code);
+ *result++ = __TM_is_illegal (TM_buff);
+ *result++ = __TM_is_footprint_exceeded (TM_buff);
+ *result++ = __TM_nesting_depth (TM_buff);
+ *result++ = __TM_is_nested_too_deep (TM_buff);
+ *result++ = __TM_is_conflict (TM_buff);
+ *result++ = __TM_is_failure_persistent (TM_buff);
+ *result++ = __TM_failure_address (TM_buff);
+ *result++ = __TM_failure_code (TM_buff);
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c b/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
new file mode 100644
index 0000000000..75733d64bd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/le-altivec-consts.c
@@ -0,0 +1,253 @@
+/* { dg-do run { target { powerpc*-*-* && vmx_hw } } } */
+/* { dg-do compile { target { powerpc*-*-* && { ! vmx_hw } } } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec -mabi=altivec -O2" } */
+
+/* Check that "easy" AltiVec constants are correctly synthesized. */
+
+extern void abort (void);
+
+typedef __attribute__ ((vector_size (16))) unsigned char v16qi;
+typedef __attribute__ ((vector_size (16))) unsigned short v8hi;
+typedef __attribute__ ((vector_size (16))) unsigned int v4si;
+
+typedef __attribute__((aligned(16))) char c16[16];
+typedef __attribute__((aligned(16))) short s8[8];
+typedef __attribute__((aligned(16))) int i4[4];
+
+#define V16QI(V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16) \
+ v16qi v = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \
+ static c16 w = {V1,V2,V3,V4,V5,V6,V7,V8,V9,V10,V11,V12,V13,V14,V15,V16}; \
+ check_v16qi (v, w);
+
+#define V8HI(V1,V2,V3,V4,V5,V6,V7,V8) \
+ v8hi v = {V1,V2,V3,V4,V5,V6,V7,V8}; \
+ static s8 w = {V1,V2,V3,V4,V5,V6,V7,V8}; \
+ check_v8hi (v, w);
+
+#define V4SI(V1,V2,V3,V4) \
+ v4si v = {V1,V2,V3,V4}; \
+ static i4 w = {V1,V2,V3,V4}; \
+ check_v4si (v, w);
+
+
+/* Use three different check functions for each mode-instruction pair.
+ The callers have no typecasting and no addressable vectors, to make
+ the test more robust. */
+
+void __attribute__ ((noinline)) check_v16qi (v16qi v1, char *v2)
+{
+ if (memcmp (&v1, v2, 16))
+ abort ();
+}
+
+void __attribute__ ((noinline)) check_v8hi (v8hi v1, short *v2)
+{
+ if (memcmp (&v1, v2, 16))
+ abort ();
+}
+
+void __attribute__ ((noinline)) check_v4si (v4si v1, int *v2)
+{
+ if (memcmp (&v1, v2, 16))
+ abort ();
+}
+
+
+/* V16QI tests. */
+
+void v16qi_vspltisb ()
+{
+ V16QI (15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15);
+}
+
+void v16qi_vspltisb_neg ()
+{
+ V16QI (-5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5, -5);
+}
+
+void v16qi_vspltisb_addself ()
+{
+ V16QI (30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30);
+}
+
+void v16qi_vspltisb_neg_addself ()
+{
+ V16QI (-24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24, -24);
+}
+
+void v16qi_vspltish ()
+{
+ V16QI (15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0, 15, 0);
+}
+
+void v16qi_vspltish_addself ()
+{
+ V16QI (30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0, 30, 0);
+}
+
+void v16qi_vspltish_neg ()
+{
+ V16QI (-5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1, -5, -1);
+}
+
+void v16qi_vspltisw ()
+{
+ V16QI (15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0, 15, 0, 0, 0);
+}
+
+void v16qi_vspltisw_addself ()
+{
+ V16QI (30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0, 30, 0, 0, 0);
+}
+
+void v16qi_vspltisw_neg ()
+{
+ V16QI (-5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1, -5, -1, -1, -1);
+}
+
+
+/* V8HI tests. */
+
+void v8hi_vspltisb ()
+{
+ V8HI (0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F, 0x0F0F);
+}
+
+void v8hi_vspltisb_addself ()
+{
+ V8HI (0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E, 0x1E1E);
+}
+
+void v8hi_vspltisb_neg ()
+{
+ V8HI (0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB, 0xFBFB);
+}
+
+void v8hi_vspltish ()
+{
+ V8HI (15, 15, 15, 15, 15, 15, 15, 15);
+}
+
+void v8hi_vspltish_neg ()
+{
+ V8HI (-5, -5, -5, -5, -5, -5, -5, -5);
+}
+
+void v8hi_vspltish_addself ()
+{
+ V8HI (30, 30, 30, 30, 30, 30, 30, 30);
+}
+
+void v8hi_vspltish_neg_addself ()
+{
+ V8HI (-24, -24, -24, -24, -24, -24, -24, -24);
+}
+
+void v8hi_vspltisw ()
+{
+ V8HI (15, 0, 15, 0, 15, 0, 15, 0);
+}
+
+void v8hi_vspltisw_addself ()
+{
+ V8HI (30, 0, 30, 0, 30, 0, 30, 0);
+}
+
+void v8hi_vspltisw_neg ()
+{
+ V8HI (-5, -1, -5, -1, -5, -1, -5, -1);
+}
+
+/* V4SI tests. */
+
+void v4si_vspltisb ()
+{
+ V4SI (0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F, 0x0F0F0F0F);
+}
+
+void v4si_vspltisb_addself ()
+{
+ V4SI (0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E, 0x1E1E1E1E);
+}
+
+void v4si_vspltisb_neg ()
+{
+ V4SI (0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB, 0xFBFBFBFB);
+}
+
+void v4si_vspltish ()
+{
+ V4SI (0x000F000F, 0x000F000F, 0x000F000F, 0x000F000F);
+}
+
+void v4si_vspltish_addself ()
+{
+ V4SI (0x001E001E, 0x001E001E, 0x001E001E, 0x001E001E);
+}
+
+void v4si_vspltish_neg ()
+{
+ V4SI (0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB, 0xFFFBFFFB);
+}
+
+void v4si_vspltisw ()
+{
+ V4SI (15, 15, 15, 15);
+}
+
+void v4si_vspltisw_neg ()
+{
+ V4SI (-5, -5, -5, -5);
+}
+
+void v4si_vspltisw_addself ()
+{
+ V4SI (30, 30, 30, 30);
+}
+
+void v4si_vspltisw_neg_addself ()
+{
+ V4SI (-24, -24, -24, -24);
+}
+
+
+
+int main ()
+{
+ v16qi_vspltisb ();
+ v16qi_vspltisb_neg ();
+ v16qi_vspltisb_addself ();
+ v16qi_vspltisb_neg_addself ();
+ v16qi_vspltish ();
+ v16qi_vspltish_addself ();
+ v16qi_vspltish_neg ();
+ v16qi_vspltisw ();
+ v16qi_vspltisw_addself ();
+ v16qi_vspltisw_neg ();
+
+ v8hi_vspltisb ();
+ v8hi_vspltisb_addself ();
+ v8hi_vspltisb_neg ();
+ v8hi_vspltish ();
+ v8hi_vspltish_neg ();
+ v8hi_vspltish_addself ();
+ v8hi_vspltish_neg_addself ();
+ v8hi_vspltisw ();
+ v8hi_vspltisw_addself ();
+ v8hi_vspltisw_neg ();
+
+ v4si_vspltisb ();
+ v4si_vspltisb_addself ();
+ v4si_vspltisb_neg ();
+ v4si_vspltish ();
+ v4si_vspltish_addself ();
+ v4si_vspltish_neg ();
+ v4si_vspltisw ();
+ v4si_vspltisw_neg ();
+ v4si_vspltisw_addself ();
+ v4si_vspltisw_neg_addself ();
+ return 0;
+}
+
+/* { dg-final { scan-assembler-not "lvx" { target { powerpc*le-*-* } } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/loop_align.c b/gcc/testsuite/gcc.target/powerpc/loop_align.c
index 489380f2fc..b49980ab4d 100644
--- a/gcc/testsuite/gcc.target/powerpc/loop_align.c
+++ b/gcc/testsuite/gcc.target/powerpc/loop_align.c
@@ -1,5 +1,5 @@
/* { dg-do compile { target { powerpc*-*-* } } } */
-/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
/* { dg-options "-O2 -mcpu=power7 -falign-functions=16" } */
/* { dg-final { scan-assembler ".p2align 5,,31" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c b/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
new file mode 100644
index 0000000000..71dd0a24ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/lvsl-lvsr.c
@@ -0,0 +1,21 @@
+/* Test expected code generation for lvsl and lvsr on little endian.
+ Note that lvsl and lvsr are each produced once, but the filename
+ causes them to appear twice in the file. */
+
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-options "-O0 -Wno-deprecated" } */
+/* { dg-final { scan-assembler-times "lvsl" 2 } } */
+/* { dg-final { scan-assembler-times "lvsr" 2 } } */
+/* { dg-final { scan-assembler-times "lxvd2x" 2 } } */
+/* { dg-final { scan-assembler-times "vperm" 2 } } */
+
+
+#include <altivec.h>
+
+float f[20];
+
+void foo ()
+{
+ vector unsigned char a = vec_lvsl (4, f);
+ vector unsigned char b = vec_lvsr (8, f);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/medium_offset.c b/gcc/testsuite/gcc.target/powerpc/medium_offset.c
new file mode 100644
index 0000000000..f29eba08c3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/medium_offset.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-not "\\+4611686018427387904" } } */
+
+static int x;
+
+unsigned long
+foo (void)
+{
+ return ((unsigned long) &x) - 0xc000000000000000;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/mmfpgpr.c b/gcc/testsuite/gcc.target/powerpc/mmfpgpr.c
new file mode 100644
index 0000000000..7f2d3d3eff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/mmfpgpr.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mcpu=power6x -mmfpgpr" } */
+/* { dg-final { scan-assembler "mffgpr" } } */
+/* { dg-final { scan-assembler "mftgpr" } } */
+
+/* Test that we generate the instructions to move between the GPR and FPR
+ registers under power6x. */
+
+extern long return_long (void);
+extern double return_double (void);
+
+double return_double2 (void)
+{
+ return (double) return_long ();
+}
+
+long return_long2 (void)
+{
+ return (long) return_double ();
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/no-r11-1.c b/gcc/testsuite/gcc.target/powerpc/no-r11-1.c
index 57c01a3e25..94b7988ec7 100644
--- a/gcc/testsuite/gcc.target/powerpc/no-r11-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/no-r11-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
/* { dg-options "-O2 -mno-pointers-to-nested-functions" } */
int
diff --git a/gcc/testsuite/gcc.target/powerpc/no-r11-2.c b/gcc/testsuite/gcc.target/powerpc/no-r11-2.c
index 3e4a6ca0ff..214a9dfb49 100644
--- a/gcc/testsuite/gcc.target/powerpc/no-r11-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/no-r11-2.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
/* { dg-options "-O2 -mpointers-to-nested-functions" } */
int
diff --git a/gcc/testsuite/gcc.target/powerpc/no-r11-3.c b/gcc/testsuite/gcc.target/powerpc/no-r11-3.c
index c98797e7f6..9cc8309092 100644
--- a/gcc/testsuite/gcc.target/powerpc/no-r11-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/no-r11-3.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-skip-if "" { *-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
/* { dg-options "-O2 -mno-pointers-to-nested-functions" } */
extern void ext_call (int (func) (void));
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-1.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-1.c
new file mode 100644
index 0000000000..f0a68ec884
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-1.c
@@ -0,0 +1,65 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#ifndef TYPE
+#define TYPE long long
+#endif
+
+#ifndef SIGN_TYPE
+#define SIGN_TYPE signed TYPE
+#endif
+
+#ifndef UNS_TYPE
+#define UNS_TYPE unsigned TYPE
+#endif
+
+typedef vector SIGN_TYPE v_sign;
+typedef vector UNS_TYPE v_uns;
+
+v_sign sign_add (v_sign a, v_sign b)
+{
+ return a + b;
+}
+
+v_sign sign_sub (v_sign a, v_sign b)
+{
+ return a - b;
+}
+
+v_sign sign_shift_left (v_sign a, v_sign b)
+{
+ return a << b;
+}
+
+v_sign sign_shift_right (v_sign a, v_sign b)
+{
+ return a >> b;
+}
+
+v_uns uns_add (v_uns a, v_uns b)
+{
+ return a + b;
+}
+
+v_uns uns_sub (v_uns a, v_uns b)
+{
+ return a - b;
+}
+
+v_uns uns_shift_left (v_uns a, v_uns b)
+{
+ return a << b;
+}
+
+v_uns uns_shift_right (v_uns a, v_uns b)
+{
+ return a >> b;
+}
+
+/* { dg-final { scan-assembler-times "vaddudm" 2 } } */
+/* { dg-final { scan-assembler-times "vsubudm" 2 } } */
+/* { dg-final { scan-assembler-times "vsld" 2 } } */
+/* { dg-final { scan-assembler-times "vsrad" 1 } } */
+/* { dg-final { scan-assembler-times "vsrd" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-2.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-2.c
new file mode 100644
index 0000000000..394f416403
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-2.c
@@ -0,0 +1,204 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#include <altivec.h>
+
+typedef vector long long v_sign;
+typedef vector unsigned long long v_uns;
+typedef vector bool long long v_bool;
+
+v_sign sign_add_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vaddudm (a, b);
+}
+
+v_sign sign_add_2 (v_sign a, v_sign b)
+{
+ return vec_add (a, b);
+}
+
+v_sign sign_add_3 (v_sign a, v_sign b)
+{
+ return vec_vaddudm (a, b);
+}
+
+v_sign sign_sub_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vsubudm (a, b);
+}
+
+v_sign sign_sub_2 (v_sign a, v_sign b)
+{
+ return vec_sub (a, b);
+}
+
+
+v_sign sign_sub_3 (v_sign a, v_sign b)
+{
+ return vec_vsubudm (a, b);
+}
+
+v_sign sign_min_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vminsd (a, b);
+}
+
+v_sign sign_min_2 (v_sign a, v_sign b)
+{
+ return vec_min (a, b);
+}
+
+v_sign sign_min_3 (v_sign a, v_sign b)
+{
+ return vec_vminsd (a, b);
+}
+
+v_sign sign_max_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vmaxsd (a, b);
+}
+
+v_sign sign_max_2 (v_sign a, v_sign b)
+{
+ return vec_max (a, b);
+}
+
+v_sign sign_max_3 (v_sign a, v_sign b)
+{
+ return vec_vmaxsd (a, b);
+}
+
+v_sign sign_abs (v_sign a)
+{
+ return vec_abs (a); /* xor, vsubudm, vmaxsd. */
+}
+
+v_bool sign_eq (v_sign a, v_sign b)
+{
+ return vec_cmpeq (a, b);
+}
+
+v_bool sign_lt (v_sign a, v_sign b)
+{
+ return vec_cmplt (a, b);
+}
+
+v_uns uns_add_2 (v_uns a, v_uns b)
+{
+ return vec_add (a, b);
+}
+
+v_uns uns_add_3 (v_uns a, v_uns b)
+{
+ return vec_vaddudm (a, b);
+}
+
+v_uns uns_sub_2 (v_uns a, v_uns b)
+{
+ return vec_sub (a, b);
+}
+
+v_uns uns_sub_3 (v_uns a, v_uns b)
+{
+ return vec_vsubudm (a, b);
+}
+
+v_uns uns_min_2 (v_uns a, v_uns b)
+{
+ return vec_min (a, b);
+}
+
+v_uns uns_min_3 (v_uns a, v_uns b)
+{
+ return vec_vminud (a, b);
+}
+
+v_uns uns_max_2 (v_uns a, v_uns b)
+{
+ return vec_max (a, b);
+}
+
+v_uns uns_max_3 (v_uns a, v_uns b)
+{
+ return vec_vmaxud (a, b);
+}
+
+v_bool uns_eq (v_uns a, v_uns b)
+{
+ return vec_cmpeq (a, b);
+}
+
+v_bool uns_lt (v_uns a, v_uns b)
+{
+ return vec_cmplt (a, b);
+}
+
+v_sign sign_rl_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vrld (a, b);
+}
+
+v_sign sign_rl_2 (v_sign a, v_uns b)
+{
+ return vec_rl (a, b);
+}
+
+v_uns uns_rl_2 (v_uns a, v_uns b)
+{
+ return vec_rl (a, b);
+}
+
+v_sign sign_sl_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vsld (a, b);
+}
+
+v_sign sign_sl_2 (v_sign a, v_uns b)
+{
+ return vec_sl (a, b);
+}
+
+v_sign sign_sl_3 (v_sign a, v_uns b)
+{
+ return vec_vsld (a, b);
+}
+
+v_uns uns_sl_2 (v_uns a, v_uns b)
+{
+ return vec_sl (a, b);
+}
+
+v_uns uns_sl_3 (v_uns a, v_uns b)
+{
+ return vec_vsld (a, b);
+}
+
+v_sign sign_sra_1 (v_sign a, v_sign b)
+{
+ return __builtin_altivec_vsrad (a, b);
+}
+
+v_sign sign_sra_2 (v_sign a, v_uns b)
+{
+ return vec_sra (a, b);
+}
+
+v_sign sign_sra_3 (v_sign a, v_uns b)
+{
+ return vec_vsrad (a, b);
+}
+
+/* { dg-final { scan-assembler-times "vaddudm" 5 } } */
+/* { dg-final { scan-assembler-times "vsubudm" 6 } } */
+/* { dg-final { scan-assembler-times "vmaxsd" 4 } } */
+/* { dg-final { scan-assembler-times "vminsd" 3 } } */
+/* { dg-final { scan-assembler-times "vmaxud" 2 } } */
+/* { dg-final { scan-assembler-times "vminud" 2 } } */
+/* { dg-final { scan-assembler-times "vcmpequd" 2 } } */
+/* { dg-final { scan-assembler-times "vcmpgtsd" 1 } } */
+/* { dg-final { scan-assembler-times "vcmpgtud" 1 } } */
+/* { dg-final { scan-assembler-times "vrld" 3 } } */
+/* { dg-final { scan-assembler-times "vsld" 5 } } */
+/* { dg-final { scan-assembler-times "vsrad" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-3.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-3.c
new file mode 100644
index 0000000000..cb8a5b8afe
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-3.c
@@ -0,0 +1,104 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3 -ftree-vectorize -fvect-cost-model=dynamic" } */
+
+#include <altivec.h>
+
+typedef vector long long vll_sign;
+typedef vector unsigned long long vll_uns;
+typedef vector bool long long vll_bool;
+
+typedef vector int vi_sign;
+typedef vector unsigned int vi_uns;
+typedef vector bool int vi_bool;
+
+typedef vector short vs_sign;
+typedef vector unsigned short vs_uns;
+typedef vector bool short vs_bool;
+
+typedef vector signed char vc_sign;
+typedef vector unsigned char vc_uns;
+typedef vector bool char vc_bool;
+
+
+vi_sign vi_pack_1 (vll_sign a, vll_sign b)
+{
+ return __builtin_altivec_vpkudum (a, b);
+}
+
+vi_sign vi_pack_2 (vll_sign a, vll_sign b)
+{
+ return vec_pack (a, b);
+}
+
+vi_sign vi_pack_3 (vll_sign a, vll_sign b)
+{
+ return vec_vpkudum (a, b);
+}
+
+vs_sign vs_pack_1 (vi_sign a, vi_sign b)
+{
+ return __builtin_altivec_vpkuwum (a, b);
+}
+
+vs_sign vs_pack_2 (vi_sign a, vi_sign b)
+{
+ return vec_pack (a, b);
+}
+
+vs_sign vs_pack_3 (vi_sign a, vi_sign b)
+{
+ return vec_vpkuwum (a, b);
+}
+
+vc_sign vc_pack_1 (vs_sign a, vs_sign b)
+{
+ return __builtin_altivec_vpkuhum (a, b);
+}
+
+vc_sign vc_pack_2 (vs_sign a, vs_sign b)
+{
+ return vec_pack (a, b);
+}
+
+vc_sign vc_pack_3 (vs_sign a, vs_sign b)
+{
+ return vec_vpkuhum (a, b);
+}
+
+vll_sign vll_unpack_hi_1 (vi_sign a)
+{
+ return __builtin_altivec_vupkhsw (a);
+}
+
+vll_sign vll_unpack_hi_2 (vi_sign a)
+{
+ return vec_unpackh (a);
+}
+
+vll_sign vll_unpack_hi_3 (vi_sign a)
+{
+ return __builtin_vec_vupkhsw (a);
+}
+
+vll_sign vll_unpack_lo_1 (vi_sign a)
+{
+ return vec_vupklsw (a);
+}
+
+vll_sign vll_unpack_lo_2 (vi_sign a)
+{
+ return vec_unpackl (a);
+}
+
+vll_sign vll_unpack_lo_3 (vi_sign a)
+{
+ return vec_vupklsw (a);
+}
+
+/* { dg-final { scan-assembler-times "vpkudum" 3 } } */
+/* { dg-final { scan-assembler-times "vpkuwum" 3 } } */
+/* { dg-final { scan-assembler-times "vpkuhum" 3 } } */
+/* { dg-final { scan-assembler-times "vupklsw" 3 } } */
+/* { dg-final { scan-assembler-times "vupkhsw" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-4.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-4.c
new file mode 100644
index 0000000000..8aaa6eacaa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-4.c
@@ -0,0 +1,249 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3 -ftree-vectorize -fvect-cost-model=dynamic" } */
+
+#include <altivec.h>
+
+typedef vector long long vll_sign;
+typedef vector unsigned long long vll_uns;
+typedef vector bool long long vll_bool;
+
+typedef vector int vi_sign;
+typedef vector unsigned int vi_uns;
+typedef vector bool int vi_bool;
+
+typedef vector short vs_sign;
+typedef vector unsigned short vs_uns;
+typedef vector bool short vs_bool;
+
+typedef vector signed char vc_sign;
+typedef vector unsigned char vc_uns;
+typedef vector bool char vc_bool;
+
+vll_sign vll_clz_1 (vll_sign a)
+{
+ return __builtin_altivec_vclzd (a);
+}
+
+vll_sign vll_clz_2 (vll_sign a)
+{
+ return vec_vclz (a);
+}
+
+vll_sign vll_clz_3 (vll_sign a)
+{
+ return vec_vclzd (a);
+}
+
+vll_uns vll_clz_4 (vll_uns a)
+{
+ return vec_vclz (a);
+}
+
+vll_uns vll_clz_5 (vll_uns a)
+{
+ return vec_vclzd (a);
+}
+
+vi_sign vi_clz_1 (vi_sign a)
+{
+ return __builtin_altivec_vclzw (a);
+}
+
+vi_sign vi_clz_2 (vi_sign a)
+{
+ return vec_vclz (a);
+}
+
+vi_sign vi_clz_3 (vi_sign a)
+{
+ return vec_vclzw (a);
+}
+
+vi_uns vi_clz_4 (vi_uns a)
+{
+ return vec_vclz (a);
+}
+
+vi_uns vi_clz_5 (vi_uns a)
+{
+ return vec_vclzw (a);
+}
+
+vs_sign vs_clz_1 (vs_sign a)
+{
+ return __builtin_altivec_vclzh (a);
+}
+
+vs_sign vs_clz_2 (vs_sign a)
+{
+ return vec_vclz (a);
+}
+
+vs_sign vs_clz_3 (vs_sign a)
+{
+ return vec_vclzh (a);
+}
+
+vs_uns vs_clz_4 (vs_uns a)
+{
+ return vec_vclz (a);
+}
+
+vs_uns vs_clz_5 (vs_uns a)
+{
+ return vec_vclzh (a);
+}
+
+vc_sign vc_clz_1 (vc_sign a)
+{
+ return __builtin_altivec_vclzb (a);
+}
+
+vc_sign vc_clz_2 (vc_sign a)
+{
+ return vec_vclz (a);
+}
+
+vc_sign vc_clz_3 (vc_sign a)
+{
+ return vec_vclzb (a);
+}
+
+vc_uns vc_clz_4 (vc_uns a)
+{
+ return vec_vclz (a);
+}
+
+vc_uns vc_clz_5 (vc_uns a)
+{
+ return vec_vclzb (a);
+}
+
+vll_sign vll_popcnt_1 (vll_sign a)
+{
+ return __builtin_altivec_vpopcntd (a);
+}
+
+vll_sign vll_popcnt_2 (vll_sign a)
+{
+ return vec_vpopcnt (a);
+}
+
+vll_sign vll_popcnt_3 (vll_sign a)
+{
+ return vec_vpopcntd (a);
+}
+
+vll_uns vll_popcnt_4 (vll_uns a)
+{
+ return vec_vpopcnt (a);
+}
+
+vll_uns vll_popcnt_5 (vll_uns a)
+{
+ return vec_vpopcntd (a);
+}
+
+vi_sign vi_popcnt_1 (vi_sign a)
+{
+ return __builtin_altivec_vpopcntw (a);
+}
+
+vi_sign vi_popcnt_2 (vi_sign a)
+{
+ return vec_vpopcnt (a);
+}
+
+vi_sign vi_popcnt_3 (vi_sign a)
+{
+ return vec_vpopcntw (a);
+}
+
+vi_uns vi_popcnt_4 (vi_uns a)
+{
+ return vec_vpopcnt (a);
+}
+
+vi_uns vi_popcnt_5 (vi_uns a)
+{
+ return vec_vpopcntw (a);
+}
+
+vs_sign vs_popcnt_1 (vs_sign a)
+{
+ return __builtin_altivec_vpopcnth (a);
+}
+
+vs_sign vs_popcnt_2 (vs_sign a)
+{
+ return vec_vpopcnt (a);
+}
+
+vs_sign vs_popcnt_3 (vs_sign a)
+{
+ return vec_vpopcnth (a);
+}
+
+vs_uns vs_popcnt_4 (vs_uns a)
+{
+ return vec_vpopcnt (a);
+}
+
+vs_uns vs_popcnt_5 (vs_uns a)
+{
+ return vec_vpopcnth (a);
+}
+
+vc_sign vc_popcnt_1 (vc_sign a)
+{
+ return __builtin_altivec_vpopcntb (a);
+}
+
+vc_sign vc_popcnt_2 (vc_sign a)
+{
+ return vec_vpopcnt (a);
+}
+
+vc_sign vc_popcnt_3 (vc_sign a)
+{
+ return vec_vpopcntb (a);
+}
+
+vc_uns vc_popcnt_4 (vc_uns a)
+{
+ return vec_vpopcnt (a);
+}
+
+vc_uns vc_popcnt_5 (vc_uns a)
+{
+ return vec_vpopcntb (a);
+}
+
+vc_uns vc_gbb_1 (vc_uns a)
+{
+ return __builtin_altivec_vgbbd (a);
+}
+
+vc_sign vc_gbb_2 (vc_sign a)
+{
+ return vec_vgbbd (a);
+}
+
+vc_uns vc_gbb_3 (vc_uns a)
+{
+ return vec_vgbbd (a);
+}
+
+/* { dg-final { scan-assembler-times "vclzd" 5 } } */
+/* { dg-final { scan-assembler-times "vclzw" 5 } } */
+/* { dg-final { scan-assembler-times "vclzh" 5 } } */
+/* { dg-final { scan-assembler-times "vclzb" 5 } } */
+
+/* { dg-final { scan-assembler-times "vpopcntd" 5 } } */
+/* { dg-final { scan-assembler-times "vpopcntw" 5 } } */
+/* { dg-final { scan-assembler-times "vpopcnth" 5 } } */
+/* { dg-final { scan-assembler-times "vpopcntb" 5 } } */
+
+/* { dg-final { scan-assembler-times "vgbbd" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-5.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-5.c
new file mode 100644
index 0000000000..36de9eb9bf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-5.c
@@ -0,0 +1,105 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#include <altivec.h>
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#ifndef ATTR_ALIGN
+#define ATTR_ALIGN __attribute__((__aligned__(ALIGN)))
+#endif
+
+#define DOIT(TYPE, PREFIX) \
+TYPE PREFIX ## _eqv_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_eqv (a, b); \
+} \
+ \
+TYPE PREFIX ## _eqv_arith (TYPE a, TYPE b) \
+{ \
+ return ~(a ^ b); \
+} \
+ \
+TYPE PREFIX ## _nand_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_nand (a, b); \
+} \
+ \
+TYPE PREFIX ## _nand_arith1 (TYPE a, TYPE b) \
+{ \
+ return ~(a & b); \
+} \
+ \
+TYPE PREFIX ## _nand_arith2 (TYPE a, TYPE b) \
+{ \
+ return (~a) | (~b); \
+} \
+ \
+TYPE PREFIX ## _orc_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_orc (a, b); \
+} \
+ \
+TYPE PREFIX ## _orc_arith1 (TYPE a, TYPE b) \
+{ \
+ return (~ a) | b; \
+} \
+ \
+TYPE PREFIX ## _orc_arith2 (TYPE a, TYPE b) \
+{ \
+ return a | (~ b); \
+}
+
+#define DOIT_FLOAT(TYPE, PREFIX) \
+TYPE PREFIX ## _eqv_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_eqv (a, b); \
+} \
+ \
+TYPE PREFIX ## _nand_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_nand (a, b); \
+} \
+ \
+TYPE PREFIX ## _orc_builtin (TYPE a, TYPE b) \
+{ \
+ return vec_orc (a, b); \
+}
+
+typedef vector signed char sign_char_vec;
+typedef vector short sign_short_vec;
+typedef vector int sign_int_vec;
+typedef vector long long sign_llong_vec;
+
+typedef vector unsigned char uns_char_vec;
+typedef vector unsigned short uns_short_vec;
+typedef vector unsigned int uns_int_vec;
+typedef vector unsigned long long uns_llong_vec;
+
+typedef vector float float_vec;
+typedef vector double double_vec;
+
+DOIT(sign_char_vec, sign_char)
+DOIT(sign_short_vec, sign_short)
+DOIT(sign_int_vec, sign_int)
+DOIT(sign_llong_vec, sign_llong)
+
+DOIT(uns_char_vec, uns_char)
+DOIT(uns_short_vec, uns_short)
+DOIT(uns_int_vec, uns_int)
+DOIT(uns_llong_vec, uns_llong)
+
+DOIT_FLOAT(float_vec, float)
+DOIT_FLOAT(double_vec, double)
+
+/* { dg-final { scan-assembler-times "xxleqv" 18 } } */
+/* { dg-final { scan-assembler-times "xxlnand" 26 } } */
+/* { dg-final { scan-assembler-times "xxlorc" 26 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-6.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-6.c
new file mode 100644
index 0000000000..8b81781c6a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-6.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+vector float dbl_to_float_p8 (double x) { return __builtin_vsx_xscvdpspn (x); }
+double float_to_dbl_p8 (vector float x) { return __builtin_vsx_xscvspdpn (x); }
+
+/* { dg-final { scan-assembler "xscvdpspn" } } */
+/* { dg-final { scan-assembler "xscvspdpn" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-7.c b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-7.c
new file mode 100644
index 0000000000..45a300fb94
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-builtin-7.c
@@ -0,0 +1,32 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+#include <altivec.h>
+
+typedef vector int v_sign;
+typedef vector unsigned int v_uns;
+
+v_sign even_sign (v_sign a, v_sign b)
+{
+ return vec_vmrgew (a, b);
+}
+
+v_uns even_uns (v_uns a, v_uns b)
+{
+ return vec_vmrgew (a, b);
+}
+
+v_sign odd_sign (v_sign a, v_sign b)
+{
+ return vec_vmrgow (a, b);
+}
+
+v_uns odd_uns (v_uns a, v_uns b)
+{
+ return vec_vmrgow (a, b);
+}
+
+/* { dg-final { scan-assembler-times "vmrgew" 2 } } */
+/* { dg-final { scan-assembler-times "vmrgow" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-fp.c b/gcc/testsuite/gcc.target/powerpc/p8vector-fp.c
new file mode 100644
index 0000000000..3cfd8161dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-fp.c
@@ -0,0 +1,139 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -mupper-regs-df -mupper-regs-sf -fno-math-errno" } */
+
+float abs_sf (float *p)
+{
+ float f = *p;
+ __asm__ ("# reg %x0" : "+v" (f));
+ return __builtin_fabsf (f);
+}
+
+float nabs_sf (float *p)
+{
+ float f = *p;
+ __asm__ ("# reg %x0" : "+v" (f));
+ return - __builtin_fabsf (f);
+}
+
+float neg_sf (float *p)
+{
+ float f = *p;
+ __asm__ ("# reg %x0" : "+v" (f));
+ return - f;
+}
+
+float add_sf (float *p, float *q)
+{
+ float f1 = *p;
+ float f2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (f1), "+v" (f2));
+ return f1 + f2;
+}
+
+float sub_sf (float *p, float *q)
+{
+ float f1 = *p;
+ float f2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (f1), "+v" (f2));
+ return f1 - f2;
+}
+
+float mul_sf (float *p, float *q)
+{
+ float f1 = *p;
+ float f2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (f1), "+v" (f2));
+ return f1 * f2;
+}
+
+float div_sf (float *p, float *q)
+{
+ float f1 = *p;
+ float f2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (f1), "+v" (f2));
+ return f1 / f2;
+}
+
+float sqrt_sf (float *p)
+{
+ float f = *p;
+ __asm__ ("# reg %x0" : "+v" (f));
+ return __builtin_sqrtf (f);
+}
+
+
+double abs_df (double *p)
+{
+ double d = *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return __builtin_fabs (d);
+}
+
+double nabs_df (double *p)
+{
+ double d = *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return - __builtin_fabs (d);
+}
+
+double neg_df (double *p)
+{
+ double d = *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return - d;
+}
+
+double add_df (double *p, double *q)
+{
+ double d1 = *p;
+ double d2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (d1), "+v" (d2));
+ return d1 + d2;
+}
+
+double sub_df (double *p, double *q)
+{
+ double d1 = *p;
+ double d2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (d1), "+v" (d2));
+ return d1 - d2;
+}
+
+double mul_df (double *p, double *q)
+{
+ double d1 = *p;
+ double d2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (d1), "+v" (d2));
+ return d1 * d2;
+}
+
+double div_df (double *p, double *q)
+{
+ double d1 = *p;
+ double d2 = *q;
+ __asm__ ("# reg %x0, %x1" : "+v" (d1), "+v" (d2));
+ return d1 / d2;
+}
+
+double sqrt_df (float *p)
+{
+ double d = *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return __builtin_sqrt (d);
+}
+
+/* { dg-final { scan-assembler "xsabsdp" } } */
+/* { dg-final { scan-assembler "xsadddp" } } */
+/* { dg-final { scan-assembler "xsaddsp" } } */
+/* { dg-final { scan-assembler "xsdivdp" } } */
+/* { dg-final { scan-assembler "xsdivsp" } } */
+/* { dg-final { scan-assembler "xsmuldp" } } */
+/* { dg-final { scan-assembler "xsmulsp" } } */
+/* { dg-final { scan-assembler "xsnabsdp" } } */
+/* { dg-final { scan-assembler "xsnegdp" } } */
+/* { dg-final { scan-assembler "xssqrtdp" } } */
+/* { dg-final { scan-assembler "xssqrtsp" } } */
+/* { dg-final { scan-assembler "xssubdp" } } */
+/* { dg-final { scan-assembler "xssubsp" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-int128-1.c b/gcc/testsuite/gcc.target/powerpc/p8vector-int128-1.c
new file mode 100644
index 0000000000..86bde32419
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-int128-1.c
@@ -0,0 +1,85 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3 -mvsx-timode" } */
+
+#include <altivec.h>
+
+#ifndef TYPE
+#define TYPE vector __int128_t
+#endif
+
+TYPE
+do_addcuq (TYPE p, TYPE q)
+{
+ return __builtin_vec_vaddcuq (p, q);
+}
+
+TYPE
+do_adduqm (TYPE p, TYPE q)
+{
+ return __builtin_vec_add (p, q);
+}
+
+TYPE
+do_addeuqm (TYPE p, TYPE q, TYPE r)
+{
+ return __builtin_vec_vaddeuqm (p, q, r);
+}
+
+TYPE
+do_addecuq (TYPE p, TYPE q, TYPE r)
+{
+ return __builtin_vec_vaddecuq (p, q, r);
+}
+
+TYPE
+do_subeuqm (TYPE p, TYPE q, TYPE r)
+{
+ return __builtin_vec_vsubeuqm (p, q, r);
+}
+
+TYPE
+do_subecuq (TYPE p, TYPE q, TYPE r)
+{
+ return __builtin_vec_vsubecuq (p, q, r);
+}
+
+TYPE
+do_subcuq (TYPE p, TYPE q)
+{
+ return __builtin_vec_vsubcuq (p, q);
+}
+
+TYPE
+do_subuqm (TYPE p, TYPE q)
+{
+ return __builtin_vec_vsubuqm (p, q);
+}
+
+TYPE
+do_zero (void)
+{
+ return (TYPE) { 0 };
+}
+
+TYPE
+do_minus_one (void)
+{
+ return (TYPE) { -1 };
+}
+
+/* { dg-final { scan-assembler "vaddcuq" } } */
+/* { dg-final { scan-assembler "vadduqm" } } */
+/* { dg-final { scan-assembler "vaddecuq" } } */
+/* { dg-final { scan-assembler "vaddeuqm" } } */
+/* { dg-final { scan-assembler "vsubecuq" } } */
+/* { dg-final { scan-assembler "vsubeuqm" } } */
+/* { dg-final { scan-assembler "vsubcuq" } } */
+/* { dg-final { scan-assembler "vsubuqm" } } */
+/* { dg-final { scan-assembler-not "mtvsrd" } } */
+/* { dg-final { scan-assembler-not "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "ori 2,2,0" } } */
+/* { dg-final { scan-assembler-not "xxpermdi" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "stxvw4x" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-int128-2.c b/gcc/testsuite/gcc.target/powerpc/p8vector-int128-2.c
new file mode 100644
index 0000000000..1064894dc4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-int128-2.c
@@ -0,0 +1,177 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <altivec.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#define UNUSED
+
+#ifdef __LITTLE_ENDIAN__
+#define HI_WORD 1
+#define LO_WORD 0
+#else
+#define HI_WORD 0
+#define LO_WORD 1
+#endif
+
+#else
+#define UNUSED __attribute__((__unused__))
+#endif
+
+#ifndef S_TYPE
+#define S_TYPE __uint128_t
+#endif
+
+#ifndef V_TYPE
+#define V_TYPE vector S_TYPE
+#endif
+
+static int compare (S_TYPE, V_TYPE, const char *, const char *)
+ __attribute__((__noinline__));
+
+static int
+compare (S_TYPE scalar,
+ V_TYPE vect,
+ const char *nl UNUSED,
+ const char *which UNUSED)
+{
+ unsigned long scalar_lo = (unsigned long) scalar;
+ unsigned long scalar_hi = (unsigned long) (scalar >> 64);
+ unsigned long vect_lo;
+ unsigned long vect_hi;
+ vector long long tmp;
+ int ret;
+
+ __asm__ ("mfvsrd %0,%x3\n\t"
+ "xxpermdi %x2,%x3,%x3,3\n\t"
+ "mfvsrd %1,%x2"
+ : "=r" (vect_hi),
+ "=r" (vect_lo),
+ "=wa" (tmp)
+ : "wa" (vect));
+
+ ret = (scalar_lo != vect_lo) || (scalar_hi != vect_hi);
+
+#ifdef DEBUG
+ printf ("%s%s: 0x%.16lx %.16lx %s 0x%.16lx %.16lx\n",
+ nl, which,
+ scalar_hi, scalar_lo,
+ (ret) ? "!=" : "==",
+ vect_hi, vect_lo);
+
+ fflush (stdout);
+#endif
+
+ return ret;
+}
+
+static void convert_via_mem (V_TYPE *, S_TYPE *)
+ __attribute__((__noinline__));
+
+static void
+convert_via_mem (V_TYPE *v, S_TYPE *s)
+{
+ *v = (V_TYPE) { *s };
+ __asm__ volatile ("nop"
+ : "+m" (*s), "+m" (*v)
+ :
+ : "memory");
+
+}
+
+
+/* Check if vadduqm returns the same values as normal 128-bit add. */
+
+/* Values to add together. */
+const static struct {
+ unsigned long hi_1;
+ unsigned long lo_1;
+ unsigned long hi_2;
+ unsigned long lo_2;
+} values[] = {
+ { 0x0000000000000000UL, 0xfffffffffffffffeUL,
+ 0x0000000000000000UL, 0x0000000000000002UL },
+ { 0x0000000000000000UL, 0x0000000000000002UL,
+ 0x0000000000000000UL, 0xfffffffffffffffeUL },
+ { 0xffffffffffffffffUL, 0xfffffffffffffffeUL,
+ 0x0000000000000000UL, 0x0000000000000002UL },
+ { 0xfffffffffffffff2UL, 0xffffffffffffffffUL,
+ 0x0000000000000002UL, 0x0000000000000000UL },
+ { 0x7fffffffffffffffUL, 0xfffffffffffffffeUL,
+ 0x0000000000000000UL, 0x0000000000000002UL },
+ { 0x7ffffffffffffff2UL, 0xffffffffffffffffUL,
+ 0x0000000000000002UL, 0x0000000000000000UL },
+};
+
+int
+main (void)
+{
+ int reg_errors = 0;
+ int mem_errors = 0;
+ size_t i;
+ const char *nl = "";
+
+ for (i = 0; i < sizeof (values) / sizeof (values[0]); i++)
+ {
+ S_TYPE s_reg_res, s_reg_in1, s_reg_in2, s_mem_res, s_mem_in1, s_mem_in2;
+ V_TYPE v_reg_res, v_reg_in1, v_reg_in2, v_mem_res, v_mem_in1, v_mem_in2;
+
+ s_reg_in1 = ((((S_TYPE)values[i].hi_1 << 64)) + ((S_TYPE)values[i].lo_1));
+ reg_errors += compare (s_reg_in1, (V_TYPE) { s_reg_in1 }, nl, "reg, in1");
+
+ s_reg_in2 = ((((S_TYPE)values[i].hi_2 << 64)) + ((S_TYPE)values[i].lo_2));
+ reg_errors += compare (s_reg_in2, (V_TYPE) { s_reg_in2 }, "", "reg, in2");
+
+ s_reg_res = s_reg_in1 + s_reg_in2;
+
+ v_reg_in1 = (V_TYPE) { s_reg_in1 };
+ v_reg_in2 = (V_TYPE) { s_reg_in2 };
+ v_reg_res = vec_vadduqm (v_reg_in1, v_reg_in2);
+ reg_errors += compare (s_reg_res, v_reg_res, "", "reg, res");
+
+ s_mem_in1 = s_reg_in1;
+ convert_via_mem (&v_mem_in1, &s_mem_in1);
+ mem_errors += compare (s_mem_in1, (V_TYPE) { s_mem_in1 }, "\n", "mem, in1");
+
+ s_mem_in2 = s_reg_in2;
+ convert_via_mem (&v_mem_in2, &s_mem_in2);
+ mem_errors += compare (s_mem_in2, (V_TYPE) { s_mem_in2 }, "", "mem, in2");
+
+ s_mem_res = s_mem_in1 + s_mem_in2;
+ v_mem_res = vec_vadduqm (v_mem_in1, v_mem_in2);
+ mem_errors += compare (s_mem_res, v_mem_res, "", "mem, res");
+
+ nl = "\n";
+ }
+
+#ifdef DEBUG
+ putchar ('\n');
+
+ if (!reg_errors)
+ fputs ("no errors found on register operations\n", stdout);
+ else
+ printf ("%d error%s found on register operations\n",
+ reg_errors,
+ (reg_errors == 1) ? "s" : "");
+
+ if (!mem_errors)
+ fputs ("no errors found on memory operations\n", stdout);
+ else
+ printf ("%d error%s found on memory operations\n",
+ mem_errors,
+ (mem_errors == 1) ? "s" : "");
+
+ fflush (stdout);
+#endif
+
+ if ((reg_errors + mem_errors) != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c b/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c
new file mode 100644
index 0000000000..33f19991f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-ldst.c
@@ -0,0 +1,42 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -mupper-regs-df -mupper-regs-sf" } */
+
+float load_sf (float *p)
+{
+ float f = *p;
+ __asm__ ("# reg %x0" : "+v" (f));
+ return f;
+}
+
+double load_df (double *p)
+{
+ double d = *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return d;
+}
+
+double load_dfsf (float *p)
+{
+ double d = (double) *p;
+ __asm__ ("# reg %x0" : "+v" (d));
+ return d;
+}
+
+void store_sf (float *p, float f)
+{
+ __asm__ ("# reg %x0" : "+v" (f));
+ *p = f;
+}
+
+void store_df (double *p, double d)
+{
+ __asm__ ("# reg %x0" : "+v" (d));
+ *p = d;
+}
+
+/* { dg-final { scan-assembler "lxsspx" } } */
+/* { dg-final { scan-assembler "lxsdx" } } */
+/* { dg-final { scan-assembler "stxsspx" } } */
+/* { dg-final { scan-assembler "stxsdx" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vbpermq.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vbpermq.c
new file mode 100644
index 0000000000..d1664985a5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vbpermq.c
@@ -0,0 +1,27 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-O3 -mcpu=power8" } */
+/* { dg-final { scan-assembler "vbpermq" } } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+
+#include <altivec.h>
+
+#if __LITTLE_ENDIAN__
+#define OFFSET 1
+#else
+#define OFFSET 0
+#endif
+
+long foos (vector signed char a, vector signed char b)
+{
+ return vec_extract (vec_vbpermq (a, b), OFFSET);
+}
+
+long foou (vector unsigned char a, vector unsigned char b)
+{
+ return vec_extract (vec_vbpermq (a, b), OFFSET);
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-1.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-1.c
new file mode 100644
index 0000000000..99b7ddfb2d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-1.c
@@ -0,0 +1,200 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#ifndef TYPE
+#define TYPE long long
+#endif
+
+#ifndef SIGN_TYPE
+#define SIGN_TYPE signed TYPE
+#endif
+
+#ifndef UNS_TYPE
+#define UNS_TYPE unsigned TYPE
+#endif
+
+#define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))
+
+SIGN_TYPE sa[SIZE] ALIGN_ATTR;
+SIGN_TYPE sb[SIZE] ALIGN_ATTR;
+SIGN_TYPE sc[SIZE] ALIGN_ATTR;
+
+UNS_TYPE ua[SIZE] ALIGN_ATTR;
+UNS_TYPE ub[SIZE] ALIGN_ATTR;
+UNS_TYPE uc[SIZE] ALIGN_ATTR;
+
+void
+sign_add (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = sb[i] + sc[i];
+}
+
+void
+sign_sub (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = sb[i] - sc[i];
+}
+
+void
+sign_shift_left (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = sb[i] << sc[i];
+}
+
+void
+sign_shift_right (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = sb[i] >> sc[i];
+}
+
+void
+sign_max (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = (sb[i] > sc[i]) ? sb[i] : sc[i];
+}
+
+void
+sign_min (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = (sb[i] < sc[i]) ? sb[i] : sc[i];
+}
+
+void
+sign_abs (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = (sb[i] < 0) ? -sb[i] : sb[i]; /* xor, vsubudm, vmaxsd. */
+}
+
+void
+sign_eq (SIGN_TYPE val1, SIGN_TYPE val2)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = (sb[i] == sc[i]) ? val1 : val2;
+}
+
+void
+sign_lt (SIGN_TYPE val1, SIGN_TYPE val2)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ sa[i] = (sb[i] < sc[i]) ? val1 : val2;
+}
+
+void
+uns_add (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = ub[i] + uc[i];
+}
+
+void
+uns_sub (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = ub[i] - uc[i];
+}
+
+void
+uns_shift_left (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = ub[i] << uc[i];
+}
+
+void
+uns_shift_right (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = ub[i] >> uc[i];
+}
+
+void
+uns_max (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = (ub[i] > uc[i]) ? ub[i] : uc[i];
+}
+
+void
+uns_min (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = (ub[i] < uc[i]) ? ub[i] : uc[i];
+}
+
+void
+uns_eq (UNS_TYPE val1, UNS_TYPE val2)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = (ub[i] == uc[i]) ? val1 : val2;
+}
+
+void
+uns_lt (UNS_TYPE val1, UNS_TYPE val2)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ ua[i] = (ub[i] < uc[i]) ? val1 : val2;
+}
+
+/* { dg-final { scan-assembler-times "\[\t \]vaddudm\[\t \]" 2 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vsubudm\[\t \]" 3 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vmaxsd\[\t \]" 2 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vmaxud\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vminsd\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vminud\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vsld\[\t \]" 2 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vsrad\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vsrd\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vcmpequd\[\t \]" 2 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vcmpgtsd\[\t \]" 1 } } */
+/* { dg-final { scan-assembler-times "\[\t \]vcmpgtud\[\t \]" 1 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c
new file mode 100644
index 0000000000..a29240754f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-2.c
@@ -0,0 +1,30 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */
+
+#include <stddef.h>
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))
+
+long long sign_ll[SIZE] ALIGN_ATTR;
+int sign_i [SIZE] ALIGN_ATTR;
+
+void copy_int_to_long_long (void)
+{
+ size_t i;
+
+ for (i = 0; i < SIZE; i++)
+ sign_ll[i] = sign_i[i];
+}
+
+/* { dg-final { scan-assembler "vupkhsw" } } */
+/* { dg-final { scan-assembler "vupklsw" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-3.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-3.c
new file mode 100644
index 0000000000..b86f7de816
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-3.c
@@ -0,0 +1,29 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic" } */
+
+#include <stddef.h>
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))
+
+long long sign_ll[SIZE] ALIGN_ATTR;
+int sign_i [SIZE] ALIGN_ATTR;
+
+void copy_long_long_to_int (void)
+{
+ size_t i;
+
+ for (i = 0; i < SIZE; i++)
+ sign_i[i] = sign_ll[i];
+}
+
+/* { dg-final { scan-assembler "vpkudum" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-4.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-4.c
new file mode 100644
index 0000000000..1e886387ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-4.c
@@ -0,0 +1,69 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#define ALIGN_ATTR __attribute__((__aligned__(ALIGN)))
+
+#define DO_BUILTIN(PREFIX, TYPE, CLZ, POPCNT) \
+TYPE PREFIX ## _a[SIZE] ALIGN_ATTR; \
+TYPE PREFIX ## _b[SIZE] ALIGN_ATTR; \
+ \
+void \
+PREFIX ## _clz (void) \
+{ \
+ unsigned long i; \
+ \
+ for (i = 0; i < SIZE; i++) \
+ PREFIX ## _a[i] = CLZ (PREFIX ## _b[i]); \
+} \
+ \
+void \
+PREFIX ## _popcnt (void) \
+{ \
+ unsigned long i; \
+ \
+ for (i = 0; i < SIZE; i++) \
+ PREFIX ## _a[i] = POPCNT (PREFIX ## _b[i]); \
+}
+
+#if !defined(DO_LONG_LONG) && !defined(DO_LONG) && !defined(DO_INT) && !defined(DO_SHORT) && !defined(DO_CHAR)
+#define DO_INT 1
+#endif
+
+#if DO_LONG_LONG
+/* At the moment, only int is auto vectorized. */
+DO_BUILTIN (sll, long long, __builtin_clzll, __builtin_popcountll)
+DO_BUILTIN (ull, unsigned long long, __builtin_clzll, __builtin_popcountll)
+#endif
+
+#if defined(_ARCH_PPC64) && DO_LONG
+DO_BUILTIN (sl, long, __builtin_clzl, __builtin_popcountl)
+DO_BUILTIN (ul, unsigned long, __builtin_clzl, __builtin_popcountl)
+#endif
+
+#if DO_INT
+DO_BUILTIN (si, int, __builtin_clz, __builtin_popcount)
+DO_BUILTIN (ui, unsigned int, __builtin_clz, __builtin_popcount)
+#endif
+
+#if DO_SHORT
+DO_BUILTIN (ss, short, __builtin_clz, __builtin_popcount)
+DO_BUILTIN (us, unsigned short, __builtin_clz, __builtin_popcount)
+#endif
+
+#if DO_CHAR
+DO_BUILTIN (sc, signed char, __builtin_clz, __builtin_popcount)
+DO_BUILTIN (uc, unsigned char, __builtin_clz, __builtin_popcount)
+#endif
+
+/* { dg-final { scan-assembler-times "vclzw" 2 } } */
+/* { dg-final { scan-assembler-times "vpopcntw" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-5.c b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-5.c
new file mode 100644
index 0000000000..0102510dad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/p8vector-vectorize-5.c
@@ -0,0 +1,87 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O2 -ftree-vectorize -fvect-cost-model=dynamic -fno-unroll-loops -fno-unroll-all-loops" } */
+
+#ifndef SIZE
+#define SIZE 1024
+#endif
+
+#ifndef ALIGN
+#define ALIGN 32
+#endif
+
+#ifndef ATTR_ALIGN
+#define ATTR_ALIGN __attribute__((__aligned__(ALIGN)))
+#endif
+
+#ifndef TYPE
+#define TYPE unsigned int
+#endif
+
+TYPE in1 [SIZE] ATTR_ALIGN;
+TYPE in2 [SIZE] ATTR_ALIGN;
+TYPE eqv [SIZE] ATTR_ALIGN;
+TYPE nand1[SIZE] ATTR_ALIGN;
+TYPE nand2[SIZE] ATTR_ALIGN;
+TYPE orc1 [SIZE] ATTR_ALIGN;
+TYPE orc2 [SIZE] ATTR_ALIGN;
+
+void
+do_eqv (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ eqv[i] = ~(in1[i] ^ in2[i]);
+ }
+}
+
+void
+do_nand1 (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ nand1[i] = ~(in1[i] & in2[i]);
+ }
+}
+
+void
+do_nand2 (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ nand2[i] = (~in1[i]) | (~in2[i]);
+ }
+}
+
+void
+do_orc1 (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ orc1[i] = (~in1[i]) | in2[i];
+ }
+}
+
+void
+do_orc2 (void)
+{
+ unsigned long i;
+
+ for (i = 0; i < SIZE; i++)
+ {
+ orc1[i] = in1[i] | (~in2[i]);
+ }
+}
+
+/* { dg-final { scan-assembler-times "xxleqv" 1 } } */
+/* { dg-final { scan-assembler-times "xxlnand" 2 } } */
+/* { dg-final { scan-assembler-times "xxlorc" 2 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pack01.c b/gcc/testsuite/gcc.target/powerpc/pack01.c
new file mode 100644
index 0000000000..efac4087c7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pack01.c
@@ -0,0 +1,91 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <altivec.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+typedef __int128_t __attribute__((__vector_size__(16))) vector_128_t;
+typedef __int128_t scalar_128_t;
+typedef unsigned long long scalar_64_t;
+
+volatile scalar_64_t one = 1;
+volatile scalar_64_t two = 2;
+
+int
+main (void)
+{
+ scalar_128_t a = (((scalar_128_t)one) << 64) | ((scalar_128_t)two);
+ vector_128_t v1 = (vector_128_t) { a };
+ vector_128_t v2 = __builtin_pack_vector_int128 (one, two);
+ scalar_64_t x0 = __builtin_unpack_vector_int128 (v1, 0);
+ scalar_64_t x1 = __builtin_unpack_vector_int128 (v1, 1);
+ vector_128_t v3 = __builtin_pack_vector_int128 (x0, x1);
+
+ size_t i;
+ union {
+ scalar_128_t i128;
+ vector_128_t v128;
+ scalar_64_t u64;
+ unsigned char uc[sizeof (scalar_128_t)];
+ char c[sizeof (scalar_128_t)];
+ } u, u2;
+
+#ifdef DEBUG
+ {
+ printf ("a = 0x");
+ u.i128 = a;
+ for (i = 0; i < sizeof (scalar_128_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nv1 = 0x");
+ u.v128 = v1;
+ for (i = 0; i < sizeof (scalar_128_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nv2 = 0x");
+ u.v128 = v2;
+ for (i = 0; i < sizeof (scalar_128_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nv3 = 0x");
+ u.v128 = v3;
+ for (i = 0; i < sizeof (scalar_128_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nx0 = 0x");
+ u.u64 = x0;
+ for (i = 0; i < sizeof (scalar_64_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nx1 = 0x");
+ u.u64 = x1;
+ for (i = 0; i < sizeof (scalar_64_t); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\n");
+ }
+#endif
+
+ u2.i128 = a;
+ u.v128 = v1;
+ if (memcmp (u.c, u2.c, sizeof (scalar_128_t)) != 0)
+ abort ();
+
+ u.v128 = v2;
+ if (memcmp (u.c, u2.c, sizeof (scalar_128_t)) != 0)
+ abort ();
+
+ u.v128 = v3;
+ if (memcmp (u.c, u2.c, sizeof (scalar_128_t)) != 0)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pack02.c b/gcc/testsuite/gcc.target/powerpc/pack02.c
new file mode 100644
index 0000000000..f85d3ff00b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pack02.c
@@ -0,0 +1,96 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_fprs } */
+/* { dg-require-effective-target longdouble128 } */
+/* { dg-options "-O2 -mhard-float" } */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <math.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+int
+main (void)
+{
+ double high = pow (2.0, 60);
+ double low = 2.0;
+ long double a = ((long double)high) + ((long double)low);
+ double x0 = __builtin_unpack_longdouble (a, 0);
+ double x1 = __builtin_unpack_longdouble (a, 1);
+ long double b = __builtin_pack_longdouble (x0, x1);
+
+#ifdef DEBUG
+ {
+ size_t i;
+ union {
+ long double ld;
+ double d;
+ unsigned char uc[sizeof (long double)];
+ char c[sizeof (long double)];
+ } u;
+
+ printf ("a = 0x");
+ u.ld = a;
+ for (i = 0; i < sizeof (long double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (", %Lg\n", a);
+
+ printf ("b = 0x");
+ u.ld = b;
+ for (i = 0; i < sizeof (long double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (", %Lg\n", b);
+
+ printf ("hi = 0x");
+ u.d = high;
+ for (i = 0; i < sizeof (double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", high);
+
+ printf ("lo = 0x");
+ u.d = low;
+ for (i = 0; i < sizeof (double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", low);
+
+ printf ("x0 = 0x");
+ u.d = x0;
+ for (i = 0; i < sizeof (double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", x0);
+
+ printf ("x1 = 0x");
+ u.d = x1;
+ for (i = 0; i < sizeof (double); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (",%*s %g\n", (int)(2 * (sizeof (long double) - sizeof (double))), "", x1);
+ }
+#endif
+
+ if (high != x0)
+ abort ();
+
+ if (low != x1)
+ abort ();
+
+ if (a != b)
+ abort ();
+
+ if (x0 != high)
+ abort ();
+
+ if (x1 != low)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pack03.c b/gcc/testsuite/gcc.target/powerpc/pack03.c
new file mode 100644
index 0000000000..dfaf2efa07
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pack03.c
@@ -0,0 +1,88 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target dfp_hw } */
+/* { dg-options "-O2 -mhard-dfp" } */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <math.h>
+
+#ifdef DEBUG
+#include <stdio.h>
+#endif
+
+int
+main (void)
+{
+ _Decimal128 one = (_Decimal128)1.0;
+ _Decimal128 two = (_Decimal128)2.0;
+ _Decimal128 ten = (_Decimal128)10.0;
+ _Decimal128 a = one;
+ _Decimal128 b;
+ _Decimal128 c;
+ unsigned long long x0;
+ unsigned long long x1;
+ size_t i;
+
+ for (i = 0; i < 25; i++)
+ a *= ten;
+
+ a += two;
+
+ x0 = __builtin_unpack_dec128 (a, 0);
+ x1 = __builtin_unpack_dec128 (a, 1);
+ b = __builtin_pack_dec128 (x0, x1);
+ c = __builtin_dscliq (one, 25) + two;
+
+#ifdef DEBUG
+ {
+ union {
+ _Decimal128 d;
+ unsigned long long ull;
+ unsigned char uc[sizeof (_Decimal128)];
+ } u;
+
+ printf ("a = 0x");
+ u.d = a;
+ for (i = 0; i < sizeof (_Decimal128); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (", %Lg\n", (long double)a);
+
+ printf ("b = 0x");
+ u.d = b;
+ for (i = 0; i < sizeof (_Decimal128); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (", %Lg\n", (long double)b);
+
+ printf ("c = 0x");
+ u.d = c;
+ for (i = 0; i < sizeof (_Decimal128); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf (", %Lg\n", (long double)c);
+
+ printf ("x0 = 0x");
+ u.ull = x0;
+ for (i = 0; i < sizeof (unsigned long long); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\nx1 = 0x");
+ u.ull = x1;
+ for (i = 0; i < sizeof (unsigned long long); i++)
+ printf ("%.2x", u.uc[i]);
+
+ printf ("\n");
+ }
+#endif
+
+ if (a != b)
+ abort ();
+
+ if (a != c)
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/powerpc.exp b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
index bb97e1e975..bf270d58d1 100644
--- a/gcc/testsuite/gcc.target/powerpc/powerpc.exp
+++ b/gcc/testsuite/gcc.target/powerpc/powerpc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,6 +23,7 @@ if { ![istarget powerpc*-*-*] && ![istarget rs6000-*-*] } then {
# Load support procs.
load_lib gcc-dg.exp
+load_lib torture-options.exp
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
@@ -37,5 +38,15 @@ dg-init
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
"" $DEFAULT_CFLAGS
+set SAVRES_TEST_OPTS [list -Os -O2 {-Os -mno-multiple} {-O2 -mno-multiple}]
+set alti ""
+if [check_vmx_hw_available] {
+ set alti "-maltivec"
+}
+torture-init
+set-torture-options $SAVRES_TEST_OPTS
+gcc-dg-runtest [list $srcdir/$subdir/savres.c] $alti
+
# All done.
+torture-finish
dg-finish
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c b/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
index 47ba1a7339..cd15586c29 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-eabi.c
@@ -1,4 +1,5 @@
/* PR target/16952 */
-/* { dg-do compile { target { powerpc*-*-linux* && ilp32 } } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
/* { dg-options "-meabi -mrelocatable" } */
char *s = "boo";
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-get-timebase.c b/gcc/testsuite/gcc.target/powerpc/ppc-get-timebase.c
new file mode 100644
index 0000000000..9de8929af1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-get-timebase.c
@@ -0,0 +1,20 @@
+/* { dg-do run { target { powerpc*-*-* } } } */
+
+/* Test if __builtin_ppc_get_timebase () is compatible with the current
+ processor and if it's changing between reads. A read failure might indicate
+ a Power ISA or binutils change. */
+
+#include <inttypes.h>
+
+int
+main (void)
+{
+ uint64_t t = __builtin_ppc_get_timebase ();
+ int j;
+
+ for (j = 0; j < 1000000; j++)
+ if (t != __builtin_ppc_get_timebase ())
+ return 0;
+
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c b/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
index da6001fcd3..ffb4264773 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-ldstruct.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* } } */
+/* { dg-do run { target powerpc*-*-eabi* powerpc*-*-elf* powerpc*-*-linux* powerpc*-*-rtems* } } */
/* { dg-options "-O -mlong-double-128" } */
#include <stdlib.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-mftb.c b/gcc/testsuite/gcc.target/powerpc/ppc-mftb.c
new file mode 100644
index 0000000000..f64e45d1da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-mftb.c
@@ -0,0 +1,18 @@
+/* { dg-do run { target { powerpc*-*-* } } } */
+
+/* Test if __builtin_ppc_mftb () is compatible with the current processor and
+ if it's changing between reads. A read failure might indicate a Power
+ ISA or binutils change. */
+
+int
+main (void)
+{
+ unsigned long t = __builtin_ppc_mftb ();
+ int j;
+
+ for (j = 0; j < 1000000; j++)
+ if (t != __builtin_ppc_mftb ())
+ return 0;
+
+ return 1;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c
index 750cf85f08..3a79f93547 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-mov-1.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
/* { dg-options "-O2" } */
-/* { dg-final { scan-assembler-not "fmr \[0-9\]+,\[0-9\]+" } }
+/* { dg-final { scan-assembler-not "lfd \(f?\[0-9\]+\),\[^\n\r\]*\[\n\r\]+\[ \t]*fmr f?1,\\1\[\n\r\]+\[ \t]*blr" } } */
/* Origin:Pete Steinmetz <steinmtz@us.ibm.com> */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c
new file mode 100644
index 0000000000..63c4b6087d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-ne0-1.c
@@ -0,0 +1,33 @@
+/* PR target/51274 */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mno-isel" } */
+
+/* { dg-final { scan-assembler-times "addic" 4 } } */
+/* { dg-final { scan-assembler-times "subfe" 1 } } */
+/* { dg-final { scan-assembler-times "addze" 3 } } */
+
+long ne0(long a)
+{
+ return a != 0;
+}
+
+long plus_ne0(long a, long b)
+{
+ return (a != 0) + b;
+}
+
+void dummy(void);
+
+void cmp_plus_ne0(long a, long b)
+{
+ if ((a != 0) + b)
+ dummy();
+}
+
+long plus_ne0_cmp(long a, long b)
+{
+ a = (a != 0) + b;
+ if (a)
+ dummy();
+ return a;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-pow.c b/gcc/testsuite/gcc.target/powerpc/ppc-pow.c
index 29614e8f51..041a34b09d 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-pow.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-pow.c
@@ -1,4 +1,5 @@
-/* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
+/* { dg-do compile } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* Check for VSX here, even though we don't use VSX to eliminate SPE, PAIRED
and other ppc floating point varients. However, we need to also eliminate
Darwin, since it doesn't like -mcpu=power6. */
@@ -6,8 +7,8 @@
/* { dg-options "-O2 -ffast-math -mcpu=power6 -mno-vsx -mno-altivec" } */
/* { dg-final { scan-assembler-times "fsqrt" 3 } } */
/* { dg-final { scan-assembler-times "fmul" 1 } } */
-/* { dg-final { scan-assembler-times "bl? pow" 1 } } */
-/* { dg-final { scan-assembler-times "bl? sqrt" 1 } } */
+/* { dg-final { scan-assembler-times "bl?\[\\. \]+pow" 1 } } */
+/* { dg-final { scan-assembler-times "bl?\[\\. \]+sqrt" 1 } } */
double
do_pow_0_75_default (double a)
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
index 5f39d86362..efd5a5ec40 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-1.c
@@ -1,5 +1,6 @@
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fno-common -G 8 -meabi -msdata=eabi" } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
/* { dg-require-effective-target nonpic } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata2," } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
index f102b1d1fe..570c81f7e3 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-sdata-2.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* powerpc-*-rtems* } } } } */
/* { dg-options "-O2 -fno-common -G 8 -msdata=sysv" } */
/* { dg-require-effective-target nonpic } */
/* { dg-final { scan-assembler "\\.section\[ \t\]\\.sdata," } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c
index f07e818fae..a9d632bf9f 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-spe64-1.c
@@ -4,4 +4,4 @@
/* { dg-options "-m64" } */
/* { dg-error "-m64 not supported in this configuration" "SPE not 64-bit" { target *-*-* } 0 } */
-/* { dg-error "64-bit E500 not supported" "64-bit E500" { target *-*-* } 0 } */
+/* { dg-error "64-bit SPE not supported" "64-bit SPE" { target *-*-* } 0 } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
index 465fc41e1d..59bd39fcf1 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-stackalign-1.c
@@ -1,4 +1,4 @@
-/* { dg-do run { target powerpc*-*-linux* powerpc*-*-eabi* } } */
+/* { dg-do run { target powerpc*-*-linux* powerpc*-*-eabi* powerpc-*-rtems* } } */
/* { dg-options {} } */
/* Test stack pointer alignment against variable alloca. */
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-target-1.c b/gcc/testsuite/gcc.target/powerpc/ppc-target-1.c
index c98666c47a..b39fe4115b 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-target-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-target-1.c
@@ -5,8 +5,7 @@
/* { dg-final { scan-assembler-times "fabs" 3 } } */
/* { dg-final { scan-assembler-times "fnabs" 3 } } */
/* { dg-final { scan-assembler-times "fsel" 3 } } */
-/* { dg-final { scan-assembler-times "fcpsgn" 3 } } */
-/* { dg-final { scan-assembler-times "xscpsgndp" 1 } } */
+/* { dg-final { scan-assembler-times "fcpsgn\|xscpsgndp" 4 } } */
double normal1 (double, double);
double power5 (double, double) __attribute__((__target__("cpu=power5")));
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-target-2.c b/gcc/testsuite/gcc.target/powerpc/ppc-target-2.c
index 8ef95b7a15..e8a2de3636 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-target-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-target-2.c
@@ -5,8 +5,7 @@
/* { dg-final { scan-assembler-times "fabs" 3 } } */
/* { dg-final { scan-assembler-times "fnabs" 3 } } */
/* { dg-final { scan-assembler-times "fsel" 3 } } */
-/* { dg-final { scan-assembler-times "fcpsgn" 3 } } */
-/* { dg-final { scan-assembler-times "xscpsgndp" 1 } } */
+/* { dg-final { scan-assembler-times "fcpsgn\|xscpsgndp" 4 } } */
/* fabs/fnabs/fsel */
double normal1 (double a, double b) { return __builtin_copysign (a, b); }
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c b/gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
index 797c4074da..7d4207ff75 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc-vector-memcpy.c
@@ -3,8 +3,12 @@
/* { dg-options "-O -maltivec -mno-vsx" } */
/* { dg-final { scan-assembler "lvx" } } */
+#include <string.h>
+
void foo(void)
{
- int x[8] __attribute__((aligned(128))) = { 1, 1, 1, 1, 1, 1, 1, 1 };
- bar (x);
+ extern int x[8] __attribute__((aligned(128)));
+ int y[8] __attribute__((aligned(128)));
+ memcpy (y, x, sizeof (x));
+ bar (y);
}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c
index 8fcb7fd7fa..9dc730e0db 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-1.c
@@ -89,8 +89,10 @@ typedef struct sf
long a1;
long a2;
long a3;
+#if _CALL_ELF != 2
long a4;
long a5;
+#endif
parm_t slot[100];
} stack_frame_t;
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c
index a9883d9e33..e4825973b1 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-2.c
@@ -107,8 +107,10 @@ typedef struct sf
long a1;
long a2;
long a3;
+#if _CALL_ELF != 2
long a4;
long a5;
+#endif
parm_t slot[100];
} stack_frame_t;
@@ -119,6 +121,12 @@ typedef union
vector int v;
} vector_int_t;
+#ifdef __LITTLE_ENDIAN__
+#define MAKE_SLOT(x, y) ((long)x | ((long)y << 32))
+#else
+#define MAKE_SLOT(x, y) ((long)y | ((long)x << 32))
+#endif
+
/* Paramter passing.
s : gpr 3
v : vpr 2
@@ -226,8 +234,8 @@ fcevv (char *s, ...)
sp = __builtin_frame_address(0);
sp = sp->backchain;
- if (sp->slot[2].l != 0x100000002ULL
- || sp->slot[4].l != 0x500000006ULL)
+ if (sp->slot[2].l != MAKE_SLOT (1, 2)
+ || sp->slot[4].l != MAKE_SLOT (5, 6))
abort();
}
@@ -268,8 +276,8 @@ fciievv (char *s, int i, int j, ...)
sp = __builtin_frame_address(0);
sp = sp->backchain;
- if (sp->slot[4].l != 0x100000002ULL
- || sp->slot[6].l != 0x500000006ULL)
+ if (sp->slot[4].l != MAKE_SLOT (1, 2)
+ || sp->slot[6].l != MAKE_SLOT (5, 6))
abort();
}
@@ -296,8 +304,8 @@ fcvevv (char *s, vector int x, ...)
sp = __builtin_frame_address(0);
sp = sp->backchain;
- if (sp->slot[4].l != 0x100000002ULL
- || sp->slot[6].l != 0x500000006ULL)
+ if (sp->slot[4].l != MAKE_SLOT (1, 2)
+ || sp->slot[6].l != MAKE_SLOT (5, 6))
abort();
}
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c
index eb54a653bf..4e91b1bba2 100644
--- a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-dfp-1.c
@@ -33,15 +33,27 @@ reg_parms_t gparms;
/* Wrapper to save the GPRs and FPRs and then jump to the real function. */
+#if _CALL_ELF != 2
+#define FUNC_START(NAME) \
+ "\t.globl\t" NAME "\n\t" \
+ ".section \".opd\",\"aw\"\n\t" \
+ ".align 3\n" \
+ NAME ":\n\t" \
+ ".quad .L." NAME ",.TOC.@tocbase,0\n\t" \
+ ".text\n\t" \
+ ".type " NAME ", @function\n" \
+ ".L." NAME ":\n\t"
+#else
+#define FUNC_START(NAME) \
+ "\t.globl\t" NAME "\n\t" \
+ ".text\n\t" \
+ NAME ":\n" \
+ "0:\taddis 2,12,(.TOC.-0b)@ha\n\t" \
+ "addi 2,2,(.TOC.-0b)@l\n\t" \
+ ".localentry " NAME ",.-" NAME "\n\t"
+#endif
#define WRAPPER(NAME) \
-__asm__ ("\t.globl\t" #NAME "_asm\n\t" \
- ".section \".opd\",\"aw\"\n\t" \
- ".align 3\n" \
- #NAME "_asm:\n\t" \
- ".quad .L." #NAME "_asm,.TOC.@tocbase,0\n\t" \
- ".text\n\t" \
- ".type " #NAME "_asm, @function\n" \
- ".L." #NAME "_asm:\n\t" \
+__asm__ (FUNC_START (#NAME "_asm") \
"ld 11,gparms@got(2)\n\t" \
"std 3,0(11)\n\t" \
"std 4,8(11)\n\t" \
@@ -75,8 +87,10 @@ typedef struct sf
long a1;
long a2;
long a3;
+#if _CALL_ELF != 2
long a4;
long a5;
+#endif
unsigned long slot[100];
} stack_frame_t;
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
new file mode 100644
index 0000000000..6e0d54883a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-options "-mabi=elfv2" } */
+
+struct f8
+ {
+ float x[8];
+ };
+
+void test (struct f8 a, struct f8 b) /* { dg-message "note: the ABI of passing homogeneous float aggregates will change" } */
+{
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
new file mode 100644
index 0000000000..c4820e9251
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-2.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+
+struct test
+ {
+ long a __attribute__((aligned (16)));
+ };
+
+void test (struct test a) /* { dg-message "note: the ABI of passing aggregates with 16-byte alignment will change" } */
+{
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
new file mode 100644
index 0000000000..830de6bcca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ppc64-abi-warn-3.c
@@ -0,0 +1,9 @@
+/* { dg-do compile { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec" } */
+
+struct test
+ {
+ int a __attribute__((vector_size (8)));
+ }; /* { dg-message "note: the layout of aggregates containing vectors with 8-byte alignment will change" } */
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr16458-1.c b/gcc/testsuite/gcc.target/powerpc/pr16458-1.c
new file mode 100644
index 0000000000..45b8c75c06
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr16458-1.c
@@ -0,0 +1,18 @@
+/* Test cse'ing of unsigned compares. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* { dg-final { scan-assembler-not "cmpw" } } */
+/* { dg-final { scan-assembler-times "cmplw" 1 } } */
+
+unsigned int a, b;
+
+int
+foo (void)
+{
+ if (a == b) return 1;
+ if (a > b) return 2;
+ if (a < b) return 3;
+ if (a != b) return 4;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr16458-2.c b/gcc/testsuite/gcc.target/powerpc/pr16458-2.c
new file mode 100644
index 0000000000..95e97de556
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr16458-2.c
@@ -0,0 +1,18 @@
+/* Test cse'ing of unsigned compares. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+/* { dg-final { scan-assembler-not "cmpw" } } */
+/* { dg-final { scan-assembler-times "cmplw" 1 } } */
+
+unsigned int *a, *b;
+
+int
+foo (void)
+{
+ if (*a == *b) return 1;
+ if (*a > *b) return 2;
+ if (*a < *b) return 3;
+ if (*a != *b) return 4;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr16458-3.c b/gcc/testsuite/gcc.target/powerpc/pr16458-3.c
new file mode 100644
index 0000000000..740d61dcc7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr16458-3.c
@@ -0,0 +1,41 @@
+/* Test cse'ing of unsigned compares. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-jump-tables" } */
+
+/* { dg-final { scan-assembler-not "cmpwi" } } */
+/* { dg-final { scan-assembler-times "cmplwi" 5 } } */
+
+extern int case0 (void);
+extern int case1 (void);
+extern int case2 (void);
+extern int case3 (void);
+extern int case4 (void);
+
+enum CASE_VALUES
+{
+ CASE0 = 1,
+ CASE1,
+ CASE2,
+ CASE3,
+ CASE4
+};
+
+int
+foo (enum CASE_VALUES index)
+{
+ switch (index)
+ {
+ case CASE0:
+ return case0 ();
+ case CASE1:
+ return case1 ();
+ case CASE2:
+ return case2 ();
+ case CASE3:
+ return case3 ();
+ case CASE4:
+ return case4 ();
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr16458-4.c b/gcc/testsuite/gcc.target/powerpc/pr16458-4.c
new file mode 100644
index 0000000000..8db43e8238
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr16458-4.c
@@ -0,0 +1,44 @@
+/* Test cse'ing of unsigned compares. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -fno-jump-tables" } */
+
+/* The following tests fail due to an issue in expand not
+ attaching an type expression information on *index's reg rtx. */
+
+/* { dg-final { scan-assembler-not "cmpwi" } } */
+/* { dg-final { scan-assembler-times "cmplwi" 5 } } */
+
+extern int case0 (void);
+extern int case1 (void);
+extern int case2 (void);
+extern int case3 (void);
+extern int case4 (void);
+
+enum CASE_VALUES
+{
+ CASE0 = 1,
+ CASE1,
+ CASE2,
+ CASE3,
+ CASE4
+};
+
+int
+foo (enum CASE_VALUES *index)
+{
+ switch (*index)
+ {
+ case CASE0:
+ return case0 ();
+ case CASE1:
+ return case1 ();
+ case CASE2:
+ return case2 ();
+ case CASE3:
+ return case3 ();
+ case CASE4:
+ return case4 ();
+ }
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr42747.c b/gcc/testsuite/gcc.target/powerpc/pr42747.c
index 9e7310e176..41362db177 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr42747.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr42747.c
@@ -5,4 +5,4 @@
double foo (double x) { return __builtin_sqrt (x); }
-/* { dg-final { scan-assembler "xssqrtdp" } } */
+/* { dg-final { scan-assembler "xssqrtdp\|fsqrt" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr43154.c b/gcc/testsuite/gcc.target/powerpc/pr43154.c
index d083e977b2..eb1919743b 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr43154.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr43154.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O2 -mcpu=power7" } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-1.c b/gcc/testsuite/gcc.target/powerpc/pr46728-1.c
index 16336243a3..fc2cd7d7c9 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-1.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -27,5 +27,5 @@ main (int argc, char *argv[])
}
-/* { dg-final { scan-assembler-times "fsqrt" 2 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-times "fsqrt|xssqrtdp" 2 { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-10.c b/gcc/testsuite/gcc.target/powerpc/pr46728-10.c
index 84833c84a0..3be4728d33 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-10.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-10.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-11.c b/gcc/testsuite/gcc.target/powerpc/pr46728-11.c
index 0dd0f7571a..43b6728a4b 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-11.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-11.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-13.c b/gcc/testsuite/gcc.target/powerpc/pr46728-13.c
index 71015a942c..b9fd63973b 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-13.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-13.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-14.c b/gcc/testsuite/gcc.target/powerpc/pr46728-14.c
index d5fc83ba2d..5affff13bd 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-14.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-14.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-15.c b/gcc/testsuite/gcc.target/powerpc/pr46728-15.c
index 0586e29013..b4c9660626 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-15.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-15.c
@@ -1,4 +1,5 @@
/* { dg-do run } */
+/* { dg-skip-if "-mpowerpc-gpopt not supported" { powerpc*-*-darwin* } } */
/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
#include <math.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-2.c b/gcc/testsuite/gcc.target/powerpc/pr46728-2.c
index abf92491f9..77679873b9 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-2.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -27,5 +27,5 @@ main (int argc, char *argv[])
}
-/* { dg-final { scan-assembler-times "fsqrt" 4 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-times "fsqrt|xssqrtdp" 4 { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-3.c b/gcc/testsuite/gcc.target/powerpc/pr46728-3.c
index a00f7940a4..db972168cb 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-3.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -28,4 +28,4 @@ main (int argc, char *argv[])
/* { dg-final { scan-assembler-times "sqrt" 4 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-4.c b/gcc/testsuite/gcc.target/powerpc/pr46728-4.c
index 95d8fbe89e..249898ac03 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-4.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -28,4 +29,4 @@ main (int argc, char *argv[])
/* { dg-final { scan-assembler-times "cbrt" 2 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-5.c b/gcc/testsuite/gcc.target/powerpc/pr46728-5.c
index a380d52252..e15e7c0977 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-5.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -28,4 +29,4 @@ main (int argc, char *argv[])
/* { dg-final { scan-assembler-times "cbrt" 2 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not " pow " { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-7.c b/gcc/testsuite/gcc.target/powerpc/pr46728-7.c
index 873596cff3..2b7d0940a0 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-7.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-7.c
@@ -1,5 +1,5 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -54,4 +54,4 @@ main (int argc, char *argv[])
/* { dg-final { scan-assembler-times "sqrt" 5 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr46728-8.c b/gcc/testsuite/gcc.target/powerpc/pr46728-8.c
index 6480c7df9b..7d2af12db8 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr46728-8.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr46728-8.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt" } */
+/* { dg-skip-if "No __builtin_cbrt" { powerpc*-*-darwin* } } */
+/* { dg-options "-O2 -ffast-math -fno-inline -fno-unroll-loops -lm -mpowerpc-gpopt -fno-ident" } */
#include <math.h>
@@ -58,4 +59,4 @@ main (int argc, char *argv[])
/* { dg-final { scan-assembler-times "cbrt" 5 { target powerpc*-*-* } } } */
-/* { dg-final { scan-assembler-not "pow" { target powerpc*-*-* } } } */
+/* { dg-final { scan-assembler-not "bl\[\\. \]+pow" { target powerpc*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr47197.c b/gcc/testsuite/gcc.target/powerpc/pr47197.c
new file mode 100644
index 0000000000..a8930f2a5c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr47197.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_altivec_ok } */
+/* { dg-options "-maltivec" } */
+
+/* Compile-only test to ensure that expressions can be passed to
+ Altivec builtins without error. */
+
+#include <altivec.h>
+
+void func(unsigned char *buf, unsigned len)
+{
+ vec_dst(buf, (len >= 256 ? 0 : len) | 512, 2);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr48258-1.c b/gcc/testsuite/gcc.target/powerpc/pr48258-1.c
index 4f37815d38..3ccbf7693d 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr48258-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr48258-1.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*le-*-* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -mcpu=power7 -mabi=altivec -ffast-math -fno-unroll-loops" } */
/* { dg-final { scan-assembler-times "xvaddsp" 3 } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr48258-2.c b/gcc/testsuite/gcc.target/powerpc/pr48258-2.c
index 443fb624e3..23ed9f26d2 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr48258-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr48258-2.c
@@ -1,17 +1,10 @@
/* { dg-do compile } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-O3 -mcpu=power7 -mabi=altivec -ffast-math -fno-unroll-loops" } */
-/* { dg-final { scan-assembler-times "xvadddp" 1 } } */
-/* { dg-final { scan-assembler-times "xvmindp" 1 } } */
-/* { dg-final { scan-assembler-times "xvmaxdp" 1 } } */
-/* { dg-final { scan-assembler-times "xsadddp" 1 } } */
-/* { dg-final { scan-assembler-times "xsmindp" 1 } } */
-/* { dg-final { scan-assembler-times "xsmaxdp" 1 } } */
-/* { dg-final { scan-assembler-not "xxsldwi" } } */
-/* { dg-final { scan-assembler-not "stvx" } } */
-/* { dg-final { scan-assembler-not "stxvd2x" } } */
-/* { dg-final { scan-assembler-not "stxvw4x" } } */
+/* { dg-options "-O3 -mcpu=power7 -mabi=altivec -ffast-math" } */
+/* { dg-final { scan-assembler "xvadddp" } } */
+/* { dg-final { scan-assembler "xvmindp" } } */
+/* { dg-final { scan-assembler "xvmaxdp" } } */
#include <stddef.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/pr51623.c b/gcc/testsuite/gcc.target/powerpc/pr51623.c
index 37b7d6557a..2ac118c7fa 100644
--- a/gcc/testsuite/gcc.target/powerpc/pr51623.c
+++ b/gcc/testsuite/gcc.target/powerpc/pr51623.c
@@ -1,5 +1,5 @@
/* PR target/51623 */
-/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* } } } } */
+/* { dg-do compile { target { { powerpc*-*-linux* && ilp32 } || { powerpc-*-eabi* powerpc-*-rtems* } } } } */
/* { dg-options "-mrelocatable -ffreestanding" } */
/* This generated an error, since the compiler was calling
diff --git a/gcc/testsuite/gcc.target/powerpc/pr53487.c b/gcc/testsuite/gcc.target/powerpc/pr53487.c
new file mode 100644
index 0000000000..3e8265b371
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr53487.c
@@ -0,0 +1,27 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7 -misel -ffast-math" } */
+
+struct phylo_s {
+ int left;
+};
+
+int Cluster(float **dmx, int N, struct phylo_s *tree)
+{
+ float **mx;
+ int *coord;
+ int i;
+ int Np;
+ int row, col;
+ float min;
+ for (col = 0; col < N; Np--)
+ {
+ for (row = 0; row < Np; row++)
+ for (col = row+1; col < Np; col++)
+ if (mx[row][col] < min)
+ i = row;
+ tree[Np-2].left = coord[i];
+ }
+ Free2DArray((void **) mx, N);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr54009.c b/gcc/testsuite/gcc.target/powerpc/pr54009.c
new file mode 100644
index 0000000000..9af98ab6c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr54009.c
@@ -0,0 +1,43 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target powerpc_fprs } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-not "\[\+\]32768" } } */
+
+/* -O2 -m32 store to x.d in w was
+ lis 9,x+32764@ha
+ stw 10,x+32764@l(9)
+ stw 11,x+32768@l(9) <-- wrap! */
+
+struct big {
+ char a[32764];
+ double d __attribute__ ((aligned (4)));
+} __attribute__ ((packed));
+
+extern struct big x;
+double y;
+
+void r (void)
+{
+ double tmp = x.d;
+#if 1
+ asm ("#": "+r" (tmp)
+ : : "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
+ "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31");
+#endif
+ y = tmp;
+}
+
+void w (void)
+{
+ double tmp = y;
+#if 1
+ asm ("#": "+r" (tmp)
+ : : "fr0", "fr1", "fr2", "fr3", "fr4", "fr5", "fr6", "fr7",
+ "fr8", "fr9", "fr10", "fr11", "fr12", "fr13", "fr14", "fr15",
+ "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23",
+ "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31");
+#endif
+ x.d = tmp;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr54240.c b/gcc/testsuite/gcc.target/powerpc/pr54240.c
new file mode 100644
index 0000000000..3e67fd5781
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr54240.c
@@ -0,0 +1,27 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -misel -fdump-tree-phiopt-details" } */
+
+typedef struct s {
+ int v;
+ int b;
+ struct s *l;
+ struct s *r;
+} S;
+
+
+int foo(S *s)
+{
+ S *this;
+ S *next;
+
+ this = s;
+ if (this->b)
+ next = this->l;
+ else
+ next = this->r;
+
+ return next->v;
+}
+
+/* { dg-final { scan-tree-dump "Hoisting adjacent loads" "phiopt1" } } */
+/* { dg-final { cleanup-tree-dump "phiopt1" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr55033.c b/gcc/testsuite/gcc.target/powerpc/pr55033.c
new file mode 100644
index 0000000000..fcc6bfcedd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr55033.c
@@ -0,0 +1,23 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
+/* { dg-options "-mcpu=8540 -msoft-float -meabi -msdata=eabi -G 8 -fno-common" } */
+
+extern void f (void);
+
+struct s
+{
+ int *p;
+ int *q;
+};
+
+extern int a;
+
+extern const struct s c;
+
+const struct s c = { &a, 0 };
+
+void
+f (void)
+{
+ char buf[4] = { 0, 1, 2, 3 };
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr56256.c b/gcc/testsuite/gcc.target/powerpc/pr56256.c
new file mode 100644
index 0000000000..6c9501a864
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr56256.c
@@ -0,0 +1,11 @@
+/* PR target/56256 */
+/* { dg-do assemble } */
+/* { dg-options "-O2" } */
+
+int
+foo (void)
+{
+ int a;
+ __asm__ ("{lil|li} %0,%1" : "=r" (a) : "I" (26));
+ return a;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr56605.c b/gcc/testsuite/gcc.target/powerpc/pr56605.c
new file mode 100644
index 0000000000..7e5af449d0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr56605.c
@@ -0,0 +1,13 @@
+/* PR rtl-optimization/56605 */
+/* { dg-do compile { target { powerpc64-*-* && lp64 } } } */
+/* { dg-options "-O3 -mvsx -mcpu=power7 -fno-unroll-loops -fdump-rtl-loop2_doloop" } */
+
+void foo (short* __restrict sb, int* __restrict ia)
+{
+ int i;
+ for (i = 0; i < 4000; i++)
+ ia[i] = (int) sb[i];
+}
+
+/* { dg-final { scan-rtl-dump-times "\\\(compare:CC \\\(subreg:SI \\\(reg:DI" 1 "loop2_doloop" } } */
+/* { dg-final { cleanup-rtl-dump "loop2_doloop" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr57150.c b/gcc/testsuite/gcc.target/powerpc/pr57150.c
new file mode 100644
index 0000000000..119bc4c52f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr57150.c
@@ -0,0 +1,23 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7 -fcaller-saves" } */
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
+/* { dg-final { scan-assembler-not "lxvw4x" } } */
+/* { dg-final { scan-assembler-not "lvx" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+/* { dg-final { scan-assembler-not "stxvw4x" } } */
+/* { dg-final { scan-assembler-not "stvx" } } */
+
+/* Insure caller save on long double does not use VSX instructions. */
+
+extern long double modify (long double);
+
+void
+sum (long double *ptr, long double value, unsigned long n)
+{
+ unsigned long i;
+
+ for (i = 0; i < n; i++)
+ ptr[i] += modify (value);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr57363.c b/gcc/testsuite/gcc.target/powerpc/pr57363.c
new file mode 100644
index 0000000000..45ea3f3fe6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr57363.c
@@ -0,0 +1,19 @@
+/* { dg-do run { target { powerpc*-*-linux* } } } */
+/* { dg-options "-mlong-double-128" } */
+
+/* Check if adding a qNAN and a normal long double does not generate a
+ inexact exception. */
+
+#define _GNU_SOURCE
+#include <fenv.h>
+
+int main(void)
+{
+ double x = __builtin_nan ("");
+ long double y = 1.1L;
+
+ feenableexcept (FE_INEXACT);
+ feclearexcept (FE_ALL_EXCEPT);
+ x = x + y;
+ return fetestexcept(FE_INEXACT);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr57744.c b/gcc/testsuite/gcc.target/powerpc/pr57744.c
new file mode 100644
index 0000000000..222fd6abd4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr57744.c
@@ -0,0 +1,39 @@
+/* { dg-do run { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+void abort (void);
+
+typedef unsigned U_16 __attribute__((mode(TI)));
+
+extern int libat_compare_exchange_16 (U_16 *, U_16 *, U_16, int, int)
+ __attribute__((__noinline__));
+
+/* PR 57744: lqarx/stqcx needs even/odd register pairs. The assembler will
+ complain if the compiler gets an odd/even register pair. Create a function
+ which has the 16 byte compare and exchange instructions, but don't actually
+ execute it, so that we can detect these failures on older machines. */
+
+int
+libat_compare_exchange_16 (U_16 *mptr, U_16 *eptr, U_16 newval,
+ int smodel, int fmodel __attribute__((unused)))
+{
+ if (((smodel) == 0))
+ return __atomic_compare_exchange_n (mptr, eptr, newval, 0, 0, 0);
+ else if (((smodel) != 5))
+ return __atomic_compare_exchange_n (mptr, eptr, newval, 0, 4, 0);
+ else
+ return __atomic_compare_exchange_n (mptr, eptr, newval, 0, 5, 0);
+}
+
+U_16 a = 1, b = 1, c = -2;
+volatile int do_test = 0;
+
+int main (void)
+{
+ if (do_test && !libat_compare_exchange_16 (&a, &b, c, 0, 0))
+ abort ();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr57949-1.c b/gcc/testsuite/gcc.target/powerpc/pr57949-1.c
new file mode 100644
index 0000000000..c2eecea1b8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr57949-1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
+/* { dg-options "-O2 -mcpu=power7" } */
+
+/* Verify that vs is 16-byte aligned in the absence of -mcompat-align-parm. */
+
+typedef float v4sf __attribute__ ((vector_size (16)));
+struct s { long m; v4sf v; };
+long n;
+v4sf ve;
+
+void pr57949 (long d1, long d2, long d3, long d4, long d5, long d6,
+ long d7, long d8, long d9, struct s vs) {
+ n = vs.m;
+ ve = vs.v;
+}
+
+/* { dg-final { scan-assembler "li \.\*,144" } } */
+/* { dg-final { scan-assembler "ld \.\*,128\\(1\\)" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr57949-2.c b/gcc/testsuite/gcc.target/powerpc/pr57949-2.c
new file mode 100644
index 0000000000..e5ad212f3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr57949-2.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc64*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc_elfv2 } { "*" } { "" } } */
+/* { dg-options "-O2 -mcpu=power7 -mcompat-align-parm" } */
+
+/* Verify that vs is not 16-byte aligned with -mcompat-align-parm. */
+
+typedef float v4sf __attribute__ ((vector_size (16)));
+struct s { long m; v4sf v; };
+long n;
+v4sf ve;
+
+void pr57949 (long d1, long d2, long d3, long d4, long d5, long d6,
+ long d7, long d8, long d9, struct s vs) {
+ n = vs.m;
+ ve = vs.v;
+}
+
+/* { dg-final { scan-assembler "ld .\*,136\\(1\\)" } } */
+/* { dg-final { scan-assembler "ld .\*,120\\(1\\)" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/pr58330.c b/gcc/testsuite/gcc.target/powerpc/pr58330.c
new file mode 100644
index 0000000000..76983dd55a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr58330.c
@@ -0,0 +1,11 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O -mno-popcntb" } */
+/* { dg-final { scan-assembler-not "stwbrx" } } */
+
+void
+write_reverse (unsigned long *addr, unsigned long val)
+{
+ unsigned long reverse = __builtin_bswap64 (val);
+ __atomic_store_n (addr, reverse, __ATOMIC_RELAXED);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr58673-1.c b/gcc/testsuite/gcc.target/powerpc/pr58673-1.c
new file mode 100644
index 0000000000..6f7838f8dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr58673-1.c
@@ -0,0 +1,78 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -m64 -O1" } */
+
+enum typecode
+{
+ QIcode, QUcode, HIcode, HUcode, SIcode, SUcode, DIcode, DUcode, SFcode,
+ DFcode, XFcode, Pcode, Tcode, LAST_AND_UNUSED_TYPECODE
+};
+enum bytecode_opcode
+{
+ neverneverland, drop, duplicate, over, setstackSI, adjstackSI, constQI,
+ constHI, constSI, constDI, constSF, constDF, constXF, constP, loadQI,
+ loadHI, loadSI, loadDI, loadSF, loadDF, loadXF, loadP, storeQI, storeHI,
+ storeSI, storeDI, storeSF, storeDF, storeXF, storeP, storeBLK, clearBLK,
+ addconstPSI, newlocalSI, localP, argP, convertQIHI, convertHISI,
+ convertSIDI, convertQISI, convertQUHU, convertHUSU, convertSUDU,
+ convertQUSU, convertSFDF, convertDFXF, convertHIQI, convertSIHI,
+ convertDISI, convertSIQI, convertSUQU, convertDFSF, convertXFDF,
+ convertSISF, convertSIDF, convertSIXF, convertSUSF, convertSUDF,
+ convertSUXF, convertDISF, convertDIDF, convertDIXF, convertDUSF,
+ convertDUDF, convertDUXF, convertSFSI, convertDFSI, convertXFSI,
+ convertSFSU, convertDFSU, convertXFSU, convertSFDI, convertDFDI,
+ convertXFDI, convertSFDU, convertDFDU, convertXFDU, convertPSI,
+ convertSIP, convertSIT, convertDIT, convertSFT, convertDFT, convertXFT,
+ convertPT, zxloadBI, sxloadBI, sstoreBI, addSI, addDI, addSF, addDF,
+ addXF, addPSI, subSI, subDI, subSF, subDF, subXF, subPP, mulSI, mulDI,
+ mulSU, mulDU, mulSF, mulDF, mulXF, divSI, divDI, divSU, divDU, divSF,
+ divDF, divXF, modSI, modDI, modSU, modDU, andSI, andDI, iorSI, iorDI,
+ xorSI, xorDI, lshiftSI, lshiftSU, lshiftDI, lshiftDU, rshiftSI, rshiftSU,
+ rshiftDI, rshiftDU, ltSI, ltSU, ltDI, ltDU, ltSF, ltDF, ltXF, ltP, leSI,
+ leSU, leDI, leDU, leSF, leDF, leXF, leP, geSI, geSU, geDI, geDU, geSF,
+ geDF, geXF, geP, gtSI, gtSU, gtDI, gtDU, gtSF, gtDF, gtXF, gtP, eqSI,
+ eqDI, eqSF, eqDF, eqXF, eqP, neSI, neDI, neSF, neDF, neXF, neP, negSI,
+ negDI, negSF, negDF, negXF, notSI, notDI, notT, predecQI, predecHI,
+ predecSI, predecDI, predecP, predecSF, predecDF, predecXF, predecBI,
+ preincQI, preincHI, preincSI, preincDI, preincP, preincSF, preincDF,
+ preincXF, preincBI, postdecQI, postdecHI, postdecSI, postdecDI, postdecP,
+ postdecSF, postdecDF, postdecXF, postdecBI, postincQI, postincHI,
+ postincSI, postincDI, postincP, postincSF, postincDF, postincXF,
+ postincBI, xjumpif, xjumpifnot, jump, jumpP, caseSI, caseSU, caseDI,
+ caseDU, call, returnP, ret, linenote, LAST_AND_UNUSED_OPCODE
+};
+struct binary_operator
+{
+ enum bytecode_opcode opcode;
+ enum typecode arg0;
+};
+static struct conversion_recipe
+{
+ unsigned char *opcodes;
+ int cost;
+}
+conversion_recipe[((int) LAST_AND_UNUSED_TYPECODE)][((int)
+ LAST_AND_UNUSED_TYPECODE)];
+static struct conversion_recipe
+deduce_conversion (from, to)
+ enum typecode from, to;
+{
+ (conversion_recipe[(int) from][(int) to].
+ opcodes ? 0 : (conversion_recipe[(int) from][(int) to] =
+ deduce_conversion (from, to), 0));
+}
+
+void
+bc_expand_binary_operation (optab, resulttype, arg0, arg1)
+ struct binary_operator optab[];
+{
+ int i, besti, cost, bestcost;
+ enum typecode resultcode, arg0code;
+ for (i = 0; optab[i].opcode != -1; ++i)
+ {
+ (conversion_recipe[(int) arg0code][(int) optab[i].arg0].
+ opcodes ? 0 : (conversion_recipe[(int) arg0code][(int) optab[i].arg0] =
+ deduce_conversion (arg0code, optab[i].arg0), 0));
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr58673-2.c b/gcc/testsuite/gcc.target/powerpc/pr58673-2.c
new file mode 100644
index 0000000000..b70d2eed88
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr58673-2.c
@@ -0,0 +1,217 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3 -m64 -funroll-loops" } */
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <math.h>
+#include <string.h>
+
+typedef long unsigned int size_t;
+typedef struct _IO_FILE FILE;
+typedef float real;
+typedef real rvec[3];
+typedef real matrix[3][3];
+typedef real tensor[3][3];
+enum
+{
+ F_BONDS, F_G96BONDS, F_MORSE, F_CUBICBONDS, F_CONNBONDS, F_HARMONIC,
+ F_ANGLES, F_G96ANGLES, F_PDIHS, F_RBDIHS, F_IDIHS, F_LJ14, F_COUL14, F_LJ,
+ F_BHAM, F_LJLR, F_DISPCORR, F_SR, F_LR, F_WPOL, F_POSRES, F_DISRES,
+ F_DISRESVIOL, F_ORIRES, F_ORIRESDEV, F_ANGRES, F_ANGRESZ, F_SHAKE,
+ F_SHAKENC, F_SETTLE, F_DUMMY2, F_DUMMY3, F_DUMMY3FD, F_DUMMY3FAD,
+ F_DUMMY3OUT, F_DUMMY4FD, F_EQM, F_EPOT, F_EKIN, F_ETOT, F_TEMP, F_PRES,
+ F_DVDL, F_DVDLKIN, F_NRE
+};
+typedef union
+{
+ struct
+ {
+ }
+ bham;
+ struct
+ {
+ real rA, krA, rB, krB;
+ }
+ harmonic;
+}
+t_iparams;
+typedef struct
+{
+ t_iparams *iparams;
+}
+t_idef;
+typedef struct
+{
+}
+t_inputrec;
+typedef struct
+{
+}
+t_commrec;
+typedef struct
+{
+}
+t_forcerec;
+typedef struct
+{
+}
+t_mdatoms;
+typedef struct
+{
+}
+t_filenm;
+enum
+{
+ eoPres, eoEpot, eoVir, eoDist, eoMu, eoForce, eoFx, eoFy, eoFz, eoPx, eoPy,
+ eoPz, eoPolarizability, eoDipole, eoObsNR, eoMemory =
+ eoObsNR, eoInter, eoUseVirial, eoNR
+};
+extern char *eoNames[eoNR];
+typedef struct
+{
+ int bPrint;
+}
+t_coupl_LJ;
+typedef struct
+{
+ int eObs;
+ t_iparams xi;
+}
+t_coupl_iparams;
+typedef struct
+{
+ real act_value[eoObsNR];
+ real av_value[eoObsNR];
+ real ref_value[eoObsNR];
+ int bObsUsed[eoObsNR];
+ int nLJ, nBU, nQ, nIP;
+ t_coupl_LJ *tcLJ;
+}
+t_coupl_rec;
+static void
+pr_ff (t_coupl_rec * tcr, real time, t_idef * idef, t_commrec * cr, int nfile,
+ t_filenm fnm[])
+{
+ static FILE *prop;
+ static FILE **out = ((void *) 0);
+ static FILE **qq = ((void *) 0);
+ static FILE **ip = ((void *) 0);
+ char buf[256];
+ char *leg[] = {
+ "C12", "C6"
+ };
+ char **raleg;
+ int i, j, index;
+ if ((prop == ((void *) 0)) && (out == ((void *) 0)) && (qq == ((void *) 0))
+ && (ip == ((void *) 0)))
+ {
+ for (i = j = 0; (i < eoObsNR); i++)
+ {
+ if (tcr->bObsUsed[i])
+ {
+ raleg[j++] =
+ (__extension__
+ (__builtin_constant_p (eoNames[i])
+ && ((size_t) (const void *) ((eoNames[i]) + 1) -
+ (size_t) (const void *) (eoNames[i]) ==
+ 1) ? (((const char *) (eoNames[i]))[0] ==
+ '\0' ? (char *) calloc ((size_t) 1,
+ (size_t) 1) : (
+ {
+ size_t
+ __len
+ =
+ strlen
+ (eoNames
+ [i])
+ +
+ 1;
+ char
+ *__retval
+ =
+ (char
+ *)
+ malloc
+ (__len);
+ __retval;}
+ )): __strdup (eoNames[i])));
+ raleg[j++] =
+ (__extension__
+ (__builtin_constant_p (buf)
+ && ((size_t) (const void *) ((buf) + 1) -
+ (size_t) (const void *) (buf) ==
+ 1) ? (((const char *) (buf))[0] ==
+ '\0' ? (char *) calloc ((size_t) 1,
+ (size_t) 1) : (
+ {
+ size_t
+ __len
+ =
+ strlen
+ (buf)
+ +
+ 1;
+ char
+ *__retval
+ =
+ (char
+ *)
+ malloc
+ (__len);
+ __retval;}
+ )): __strdup (buf)));
+ }
+ }
+ if (tcr->nLJ)
+ {
+ for (i = 0; (i < tcr->nLJ); i++)
+ {
+ if (tcr->tcLJ[i].bPrint)
+ {
+ xvgr_legend (out[i], (sizeof (leg) / sizeof ((leg)[0])),
+ leg);
+ }
+ }
+ }
+ }
+}
+
+void
+do_coupling (FILE * log, int nfile, t_filenm fnm[], t_coupl_rec * tcr, real t,
+ int step, real ener[], t_forcerec * fr, t_inputrec * ir,
+ int bMaster, t_mdatoms * md, t_idef * idef, real mu_aver,
+ int nmols, t_commrec * cr, matrix box, tensor virial,
+ tensor pres, rvec mu_tot, rvec x[], rvec f[], int bDoIt)
+{
+ int i, j, ati, atj, atnr2, type, ftype;
+ real deviation[eoObsNR], prdev[eoObsNR], epot0, dist, rmsf;
+ real ff6, ff12, ffa, ffb, ffc, ffq, factor, dt, mu_ind;
+ int bTest, bPrint;
+ t_coupl_iparams *tip;
+ if (bPrint)
+ {
+ pr_ff (tcr, t, idef, cr, nfile, fnm);
+ }
+ for (i = 0; (i < eoObsNR); i++)
+ {
+ deviation[i] =
+ calc_deviation (tcr->av_value[i], tcr->act_value[i],
+ tcr->ref_value[i]);
+ prdev[i] = tcr->ref_value[i] - tcr->act_value[i];
+ }
+ if (bPrint)
+ pr_dev (tcr, t, prdev, cr, nfile, fnm);
+ for (i = 0; (i < atnr2); i++)
+ {
+ factor = dt * deviation[tip->eObs];
+ switch (ftype)
+ {
+ case F_BONDS:
+ if (fabs (tip->xi.harmonic.krA) > 1.2e-38)
+ idef->iparams[type].harmonic.krA *=
+ (1 + factor / tip->xi.harmonic.krA);
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr59054.c b/gcc/testsuite/gcc.target/powerpc/pr59054.c
new file mode 100644
index 0000000000..052f238ba0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr59054.c
@@ -0,0 +1,6 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mcpu=power7 -O0 -m64" } */
+
+long foo (void) { return 0; }
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60032.c b/gcc/testsuite/gcc.target/powerpc/pr60032.c
new file mode 100644
index 0000000000..e1115b8170
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60032.c
@@ -0,0 +1,13 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-require-effective-target dfp } */
+/* { dg-options "-O2" } */
+
+void foo (void)
+{
+ register float __attribute__ ((mode(SD))) r31 __asm__ ("r31");
+ register float __attribute__ ((mode(SD))) fr1 __asm__ ("fr1");
+
+ __asm__ ("#" : "=d" (fr1));
+ r31 = fr1;
+ __asm__ ("#" : : "r" (r31));
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60102.c b/gcc/testsuite/gcc.target/powerpc/pr60102.c
new file mode 100644
index 0000000000..d32e41d687
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60102.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
+/* { dg-options "-mcpu=8548 -mspe -mabi=spe -g -mfloat-gprs=double" } */
+
+double
+pr60102 (double x, int m)
+{
+ double y;
+ y = m % 2 ? x : 1;
+ return y;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60137.c b/gcc/testsuite/gcc.target/powerpc/pr60137.c
new file mode 100644
index 0000000000..4777a53829
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60137.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3 -mno-vsx" } */
+
+/* target/60137, compiler got a 'could not split insn error'. */
+
+extern int target_flags;
+extern char fixed_regs[53];
+extern char call_used_regs[53];
+
+void init_reg_sets_1(void)
+{
+ int i;
+ for (i = 0; i < 53; i++)
+ fixed_regs[i] = call_used_regs[i] = (call_used_regs[i] &((target_flags & 0x02000000) ? 2 : 1)) != 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60203.c b/gcc/testsuite/gcc.target/powerpc/pr60203.c
new file mode 100644
index 0000000000..6a4b4fa1dd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60203.c
@@ -0,0 +1,40 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-mcpu=power8 -O3" } */
+
+union u_ld { long double ld; double d[2]; };
+
+long double
+pack (double a, double aa)
+{
+ union u_ld u;
+ u.d[0] = a;
+ u.d[1] = aa;
+ return u.ld;
+}
+
+double
+unpack_0 (long double x)
+{
+ union u_ld u;
+ u.ld = x;
+ return u.d[0];
+}
+
+double
+unpack_1 (long double x)
+{
+ union u_ld u;
+ u.ld = x;
+ return u.d[1];
+}
+
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-not "lfd" } } */
+/* { dg-final { scan-assembler-not "lxsdx" } } */
+/* { dg-final { scan-assembler-not "stxsdx" } } */
+/* { dg-final { scan-assembler-not "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "mtvsrd" } } */
+
+
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60676.c b/gcc/testsuite/gcc.target/powerpc/pr60676.c
new file mode 100644
index 0000000000..86fd8c6d2e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60676.c
@@ -0,0 +1,128 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7" } */
+/* { dg-final { scan-assembler "xxsldwi" } } */
+/* { dg-final { scan-assembler "xxpermdi" } } */
+
+#include <altivec.h>
+
+vector double
+v2df_shift (vector double a, vector double b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector float
+v4sf_shift (vector float a, vector float b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector long long
+v2di_shift (vector long long a, vector long long b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector unsigned long long
+v2diu_shift (vector unsigned long long a, vector unsigned long long b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector int
+v4si_shift (vector int a, vector int b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector unsigned int
+v4siu_shift (vector unsigned int a, vector unsigned int b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector short
+v8hi_shift (vector short a, vector short b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector unsigned short
+v8hiu_shift (vector unsigned short a, vector unsigned short b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector signed char
+v16qi_shift (vector signed char a, vector signed char b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector unsigned char
+v16qiu_shift (vector unsigned char a, vector unsigned char b)
+{
+ return vec_xxsldwi (a, b, 1);
+}
+
+vector double
+v2df_permute (vector double a, vector double b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector float
+v4sf_permute (vector float a, vector float b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector long long
+v2di_permute (vector long long a, vector long long b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector unsigned long long
+v2diu_permute (vector unsigned long long a, vector unsigned long long b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector int
+v4si_permute (vector int a, vector int b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector unsigned int
+v4siu_permute (vector unsigned int a, vector unsigned int b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector short
+v8hi_permute (vector short a, vector short b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector unsigned short
+v8hiu_permute (vector unsigned short a, vector unsigned short b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector signed char
+v16qi_permute (vector signed char a, vector signed char b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
+
+vector unsigned char
+v16qiu_permute (vector unsigned char a, vector unsigned char b)
+{
+ return vec_xxpermdi (a, b, 1);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr60735.c b/gcc/testsuite/gcc.target/powerpc/pr60735.c
new file mode 100644
index 0000000000..9bac30b51d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr60735.c
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=8548 -mspe -mabi=spe -O2" } */
+/* { dg-skip-if "not an SPE target" { ! powerpc_spe_nocache } { "*" } { "" } } */
+
+/* In PR60735, the type _Decimal64 generated an insn not found message. */
+
+void
+pr60735 (_Decimal64 *p, _Decimal64 *q)
+{
+ *p = *q;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/pr63335.c b/gcc/testsuite/gcc.target/powerpc/pr63335.c
new file mode 100644
index 0000000000..931a8b6e99
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/pr63335.c
@@ -0,0 +1,30 @@
+/* { dg-do run { target { powerpc64*-*-* } } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-mvsx" } */
+
+#include <altivec.h>
+
+void abort (void);
+
+vector double vec = (vector double) {99.0, 99.0};
+
+int main() {
+
+ int actual = vec_all_nge(vec, vec);
+ if ( actual != 0)
+ abort();
+
+ actual = vec_all_nle(vec, vec);
+ if ( actual != 0)
+ abort();
+
+ actual = vec_any_nge(vec, vec);
+ if ( actual != 0)
+ abort();
+
+ actual = vec_any_nle(vec, vec);
+ if ( actual != 0)
+ abort();
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/quad-atomic.c b/gcc/testsuite/gcc.target/powerpc/quad-atomic.c
new file mode 100644
index 0000000000..6cf278852d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/quad-atomic.c
@@ -0,0 +1,67 @@
+/* { dg-do run { target { powerpc*-*-linux* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-skip-if "" { powerpc*-*-*spe* } { "*" } { "" } } */
+/* { dg-require-effective-target p8vector_hw } */
+/* { dg-options "-mcpu=power8 -O2" } */
+
+/* Test whether we get the right bits for quad word atomic instructions. */
+#include <stdlib.h>
+
+static __int128_t quad_fetch_and (__int128_t *, __int128_t value) __attribute__((__noinline__));
+static __int128_t quad_fetch_or (__int128_t *, __int128_t value) __attribute__((__noinline__));
+static __int128_t quad_fetch_add (__int128_t *, __int128_t value) __attribute__((__noinline__));
+
+static __int128_t
+quad_fetch_and (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_and (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+static __int128_t
+quad_fetch_or (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_or (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+static __int128_t
+quad_fetch_add (__int128_t *ptr, __int128_t value)
+{
+ return __atomic_fetch_add (ptr, value, __ATOMIC_ACQUIRE);
+}
+
+int
+main (void)
+{
+ __int128_t result;
+ __int128_t value;
+ __int128_t and_input = ((((__int128_t) 0x1234567890abcdefULL) << 64) | ((__int128_t) 0xfedcba0987654321ULL));
+ __int128_t and_value = ((((__int128_t) 0xfffffffffffffff0ULL) << 64) | ((__int128_t) 0xfffffffffffffff0ULL));
+ __int128_t and_exp = ((((__int128_t) 0x1234567890abcde0ULL) << 64) | ((__int128_t) 0xfedcba0987654320ULL));
+
+ __int128_t or_input = ((((__int128_t) 0x1234567890abcdefULL) << 64) | ((__int128_t) 0xfedcba0987654321ULL));
+ __int128_t or_value = ((((__int128_t) 0x0000000000000010ULL) << 64) | ((__int128_t) 0x000000000000000eULL));
+ __int128_t or_exp = ((((__int128_t) 0x1234567890abcdffULL) << 64) | ((__int128_t) 0xfedcba098765432fULL));
+
+ __int128_t add_input = ((((__int128_t) 0x1234567890abcdefULL) << 64) | ((__int128_t) 0xfedcba0987654321ULL));
+ __int128_t add_value = ((((__int128_t) 0x0000000001000000ULL) << 64) | ((__int128_t) 0x0000001000000000ULL));
+ __int128_t add_exp = ((((__int128_t) 0x1234567891abcdefULL) << 64) | ((__int128_t) 0xfedcba1987654321ULL));
+
+
+ value = and_input;
+ result = quad_fetch_and (&value, and_value);
+ if (result != and_input || value != and_exp)
+ abort ();
+
+ value = or_input;
+ result = quad_fetch_or (&value, or_value);
+ if (result != or_input || value != or_exp)
+ abort ();
+
+ value = add_input;
+ result = quad_fetch_add (&value, add_value);
+ if (result != add_input || value != add_exp)
+ abort ();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/recip-1.c b/gcc/testsuite/gcc.target/powerpc/recip-1.c
index 4ae0c4f119..59660e35bd 100644
--- a/gcc/testsuite/gcc.target/powerpc/recip-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/recip-1.c
@@ -3,8 +3,8 @@
/* { dg-options "-O2 -mrecip -ffast-math -mcpu=power6" } */
/* { dg-final { scan-assembler-times "frsqrte" 2 } } */
/* { dg-final { scan-assembler-times "fmsub" 2 } } */
-/* { dg-final { scan-assembler-times "fmul" 8 } } */
-/* { dg-final { scan-assembler-times "fnmsub" 4 } } */
+/* { dg-final { scan-assembler-times "fmul" 6 } } */
+/* { dg-final { scan-assembler-times "fnmsub" 3 } } */
double
rsqrt_d (double a)
diff --git a/gcc/testsuite/gcc.target/powerpc/recip-3.c b/gcc/testsuite/gcc.target/powerpc/recip-3.c
index 905e793952..1f8e30572b 100644
--- a/gcc/testsuite/gcc.target/powerpc/recip-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/recip-3.c
@@ -1,14 +1,14 @@
/* { dg-do compile { target { { powerpc*-*-* } && { ! powerpc*-apple-darwin* } } } } */
/* { dg-require-effective-target powerpc_fprs } */
/* { dg-options "-O2 -mrecip -ffast-math -mcpu=power7" } */
-/* { dg-final { scan-assembler-times "xsrsqrtedp" 1 } } */
+/* { dg-final { scan-assembler-times "xsrsqrtedp\|frsqrte\ " 1 } } */
/* { dg-final { scan-assembler-times "xsmsub.dp\|fmsub\ " 1 } } */
-/* { dg-final { scan-assembler-times "xsmuldp" 4 } } */
+/* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 4 } } */
/* { dg-final { scan-assembler-times "xsnmsub.dp\|fnmsub\ " 2 } } */
-/* { dg-final { scan-assembler-times "frsqrtes" 1 } } */
-/* { dg-final { scan-assembler-times "fmsubs" 1 } } */
-/* { dg-final { scan-assembler-times "fmuls" 4 } } */
-/* { dg-final { scan-assembler-times "fnmsubs" 2 } } */
+/* { dg-final { scan-assembler-times "xsrsqrtesp\|frsqrtes" 1 } } */
+/* { dg-final { scan-assembler-times "xsmsub.sp\|fmsubs" 1 } } */
+/* { dg-final { scan-assembler-times "xsmulsp\|fmuls" 2 } } */
+/* { dg-final { scan-assembler-times "xsnmsub.sp\|fnmsubs" 1 } } */
double
rsqrt_d (double a)
diff --git a/gcc/testsuite/gcc.target/powerpc/recip-4.c b/gcc/testsuite/gcc.target/powerpc/recip-4.c
index 35eef6f0f0..a62b60db20 100644
--- a/gcc/testsuite/gcc.target/powerpc/recip-4.c
+++ b/gcc/testsuite/gcc.target/powerpc/recip-4.c
@@ -7,8 +7,8 @@
/* { dg-final { scan-assembler-times "xvnmsub.dp" 2 } } */
/* { dg-final { scan-assembler-times "xvrsqrtesp" 1 } } */
/* { dg-final { scan-assembler-times "xvmsub.sp" 1 } } */
-/* { dg-final { scan-assembler-times "xvmulsp" 4 } } */
-/* { dg-final { scan-assembler-times "xvnmsub.sp" 2 } } */
+/* { dg-final { scan-assembler-times "xvmulsp" 2 } } */
+/* { dg-final { scan-assembler-times "xvnmsub.sp" 1 } } */
#define SIZE 1024
diff --git a/gcc/testsuite/gcc.target/powerpc/recip-5.c b/gcc/testsuite/gcc.target/powerpc/recip-5.c
index 3d7d691d5a..11d125c110 100644
--- a/gcc/testsuite/gcc.target/powerpc/recip-5.c
+++ b/gcc/testsuite/gcc.target/powerpc/recip-5.c
@@ -4,8 +4,16 @@
/* { dg-options "-O3 -ftree-vectorize -mrecip=all -ffast-math -mcpu=power7 -fno-unroll-loops" } */
/* { dg-final { scan-assembler-times "xvredp" 4 } } */
/* { dg-final { scan-assembler-times "xvresp" 5 } } */
-/* { dg-final { scan-assembler-times "xsredp" 2 } } */
-/* { dg-final { scan-assembler-times "fres" 2 } } */
+/* { dg-final { scan-assembler-times "xsredp\|fre\ " 2 } } */
+/* { dg-final { scan-assembler-times "fres\|xsresp" 2 } } */
+/* { dg-final { scan-assembler-times "fmuls\|xsmulsp" 2 } } */
+/* { dg-final { scan-assembler-times "fnmsubs\|xsnmsub.sp" 2 } } */
+/* { dg-final { scan-assembler-times "xsmuldp\|fmul\ " 2 } } */
+/* { dg-final { scan-assembler-times "xsnmsub.dp\|fnmsub\ " 4 } } */
+/* { dg-final { scan-assembler-times "xvmulsp" 7 } } */
+/* { dg-final { scan-assembler-times "xvnmsub.sp" 5 } } */
+/* { dg-final { scan-assembler-times "xvmuldp" 6 } } */
+/* { dg-final { scan-assembler-times "xvnmsub.dp" 8 } } */
#include <altivec.h>
diff --git a/gcc/testsuite/gcc.target/powerpc/rs6000-ldouble-3.c b/gcc/testsuite/gcc.target/powerpc/rs6000-ldouble-3.c
new file mode 100644
index 0000000000..1c78052e6d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/rs6000-ldouble-3.c
@@ -0,0 +1,21 @@
+/* Test accuracy of long double division (glibc bug 15396). */
+/* { dg-do run { target powerpc*-*-linux* powerpc*-*-darwin* powerpc*-*-aix* rs6000-*-* } } */
+/* { dg-options "-mlong-double-128" } */
+
+extern void exit (int);
+extern void abort (void);
+
+volatile long double a = 0x1p-1024L;
+volatile long double b = 0x3p-53L;
+volatile long double r;
+volatile long double expected = 0x1.55555555555555555555555555p-973L;
+
+int
+main (void)
+{
+ r = a / b;
+ /* Allow error up to 2ulp. */
+ if (__builtin_fabsl (r - expected) > 0x1p-1073L)
+ abort ();
+ exit (0);
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/rs6000-power2-1.c b/gcc/testsuite/gcc.target/powerpc/rs6000-power2-1.c
deleted file mode 100644
index 375241ec65..0000000000
--- a/gcc/testsuite/gcc.target/powerpc/rs6000-power2-1.c
+++ /dev/null
@@ -1,21 +0,0 @@
-/* { dg-do compile { target { ilp32 } } } */
-/* { dg-options "-O3 -mcpu=power2 -fno-schedule-insns -w -mhard-float" } */
-/* This used to ICE as the peephole was not checking to see
- if the register is a floating point one (I think this cannot
- happen in real life except in this example). */
-
-register volatile double t1 __asm__("r14");
-register volatile double t2 __asm__("r15");
-register volatile double t3 __asm__("r16"), t4 __asm__("r17");
-void t(double *a, double *b)
-{
- t1 = a[-1];
- t2 = a[0];
- t3 = a[1];
- t4 = a[2];
- b[-1] = t1;
- b[0] = t2;
- b[1] = t3;
- b[2] = t4;
-}
-
diff --git a/gcc/testsuite/gcc.target/powerpc/rs6000-power2-2.c b/gcc/testsuite/gcc.target/powerpc/rs6000-power2-2.c
deleted file mode 100644
index 567ad8c927..0000000000
--- a/gcc/testsuite/gcc.target/powerpc/rs6000-power2-2.c
+++ /dev/null
@@ -1,22 +0,0 @@
-/* { dg-do compile { target { powerpc_fprs && ilp32 } } } */
-/* { dg-options "-O3 -mcpu=power2 -fno-schedule-insns -w" } */
-/* { dg-final { scan-assembler-not "lfd" } } */
-/* { dg-final { scan-assembler-not "sfd" } } */
-/* { dg-final { scan-assembler "lfq" } } */
-/* { dg-final { scan-assembler "stfq" } } */
-
-register volatile double t1 __asm__("fr0");
-register volatile double t2 __asm__("fr1");
-register volatile double t3 __asm__("fr2"), t4 __asm__("fr3");
-void t(double *a, double *b)
-{
- t1 = a[-1];
- t2 = a[0];
- t3 = a[1];
- t4 = a[2];
- b[-1] = t1;
- b[0] = t2;
- b[1] = t3;
- b[2] = t4;
-}
-
diff --git a/gcc/testsuite/gcc.target/powerpc/savres.c b/gcc/testsuite/gcc.target/powerpc/savres.c
new file mode 100644
index 0000000000..f10c99a4b9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/savres.c
@@ -0,0 +1,1228 @@
+/* { dg-do run } */
+/* { dg-options "-fno-inline -fomit-frame-pointer" } */
+/* { dg-additional-options "-mdynamic-no-pic" { target *-*-darwin* } } */
+
+/* -fno-inline -maltivec -m32/-m64 -mmultiple/no-multiple -Os/-O2. */
+#ifndef NO_BODY
+#define abort() __builtin_abort ()
+#define vec_all_eq(v1,v2) __builtin_vec_vcmpeq_p (2, v1, v2)
+#define SET(T,R,V) register T R __asm__ (#R) = V
+#define SET_GPR(R,V) SET (long, R, V)
+#define SET_FPR(R,V) SET (double, R, V)
+#define SET_VR(R,V) SET (__attribute__ ((vector_size (16))) int, R, V)
+#define SET_CR(R,V) __asm__ __volatile__ ("mtcrf %0,%1" : : "n" (1<<(7-R)), "r" (V<<(4*(7-R))) : "cr" #R)
+#define TRASH_GPR(R) SET_GPR (R, 0)
+#define TRASH_FPR(R) SET_FPR (R, 0)
+#define TRASH_VR(R) SET_VR (R, val0)
+#define TRASH_CR(R) SET_CR (R, 0)
+#define TRASH_SOME_GPR TRASH_GPR (r30); TRASH_GPR (r31)
+#define TRASH_SOME_FPR TRASH_FPR (fr28); TRASH_FPR (fr31)
+#define TRASH_SOME_VR TRASH_VR (v26); TRASH_VR (v27); TRASH_VR (v31)
+#define TRASH_SOME_CR TRASH_CR (2)
+#define TRASH_ALL_GPR TRASH_GPR (r14); TRASH_GPR (r15); TRASH_GPR (r16); TRASH_GPR (r17); TRASH_GPR (r18); TRASH_GPR (r19); TRASH_GPR (r20); TRASH_GPR (r21); TRASH_GPR (r22); TRASH_GPR (r23); TRASH_GPR (r24); TRASH_GPR (r25); TRASH_GPR (r26); TRASH_GPR (r27); TRASH_GPR (r28); TRASH_GPR (r29); TRASH_GPR (r30); TRASH_GPR (r31)
+#define TRASH_ALL_FPR TRASH_FPR (fr14); TRASH_FPR (fr15); TRASH_FPR (fr16); TRASH_FPR (fr17); TRASH_FPR (fr18); TRASH_FPR (fr19); TRASH_FPR (fr20); TRASH_FPR (fr21); TRASH_FPR (fr22); TRASH_FPR (fr23); TRASH_FPR (fr24); TRASH_FPR (fr25); TRASH_FPR (fr26); TRASH_FPR (fr27); TRASH_FPR (fr28); TRASH_FPR (fr29); TRASH_FPR (fr30); TRASH_FPR (fr31)
+#define TRASH_ALL_VR TRASH_VR (v20); TRASH_VR (v21); TRASH_VR (v22); TRASH_VR (v23); TRASH_VR (v24); TRASH_VR (v25); TRASH_VR (v26); TRASH_VR (v27); TRASH_VR (v28); TRASH_VR (v29); TRASH_VR (v30); TRASH_VR (v31)
+#define TRASH_ALL_CR TRASH_CR (2); TRASH_CR (3); TRASH_CR (4)
+#define USE_SOME_GPR __asm__ __volatile__ ("#%0 %1" : : "r" (r30), "r" (r31))
+#define USE_SOME_FPR __asm__ __volatile__ ("#%0 %1" : : "f" (fr28), "f" (fr31))
+#define USE_SOME_VR __asm__ __volatile__ ("#%0 %1 %2" : : "v" (v26), "v" (v27), "v" (v31))
+#define USE_SOME_CR
+#define USE_ALL_GPR __asm__ __volatile__ ("#%0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17" : : "r" (r14), "r" (r15), "r" (r16), "r" (r17), "r" (r18), "r" (r19), "r" (r20), "r" (r21), "r" (r22), "r" (r23), "r" (r24), "r" (r25), "r" (r26), "r" (r27), "r" (r28), "r" (r29), "r" (r30), "r" (r31))
+#define USE_ALL_FPR __asm__ __volatile__ ("#%0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11 %12 %13 %14 %15 %16 %17" : : "f" (fr14), "f" (fr15), "f" (fr16), "f" (fr17), "f" (fr18), "f" (fr19), "f" (fr20), "f" (fr21), "f" (fr22), "f" (fr23), "f" (fr24), "f" (fr25), "f" (fr26), "f" (fr27), "f" (fr28), "f" (fr29), "f" (fr30), "f" (fr31))
+#define USE_ALL_VR __asm__ __volatile__ ("#%0 %1 %2 %3 %4 %5 %6 %7 %8 %9 %10 %11" : : "v" (v20), "v" (v21), "v" (v22), "v" (v23), "v" (v24), "v" (v25), "v" (v26), "v" (v27), "v" (v28), "v" (v29), "v" (v30), "v" (v31))
+#define USE_ALL_CR
+
+#define INIT_GPR SET_GPR (r14, 14); SET_GPR (r15, 15); SET_GPR (r16, 16); SET_GPR (r17, 17); SET_GPR (r18, 18); SET_GPR (r19, 19); SET_GPR (r20, 20); SET_GPR (r21, 21); SET_GPR (r22, 22); SET_GPR (r23, 23); SET_GPR (r24, 24); SET_GPR (r25, 25); SET_GPR (r26, 26); SET_GPR (r27, 27); SET_GPR (r28, 28); SET_GPR (r29, 29); SET_GPR (r30, 30); SET_GPR (r31, 31)
+#define INIT_FPR SET_FPR (fr14, 140.0); SET_FPR (fr15, 150.0); SET_FPR (fr16, 160.0); SET_FPR (fr17, 170.0); SET_FPR (fr18, 180.0); SET_FPR (fr19, 190.0); SET_FPR (fr20, 200.0); SET_FPR (fr21, 210.0); SET_FPR (fr22, 220.0); SET_FPR (fr23, 230.0); SET_FPR (fr24, 240.0); SET_FPR (fr25, 250.0); SET_FPR (fr26, 260.0); SET_FPR (fr27, 270.0); SET_FPR (fr28, 280.0); SET_FPR (fr29, 290.0); SET_FPR (fr30, 300.0); SET_FPR (fr31, 310.0)
+#define INIT_VR SET_VR (v20, val20); SET_VR (v21, val21); SET_VR (v22, val22); SET_VR (v23, val23); SET_VR (v24, val24); SET_VR (v25, val25); SET_VR (v26, val26); SET_VR (v27, val27); SET_VR (v28, val28); SET_VR (v29, val29); SET_VR (v30, val30); SET_VR (v31, val31)
+#define INIT_CR SET_CR (2, 6); SET_CR (3, 7); SET_CR (4, 8)
+#ifdef __ALTIVEC__
+__attribute__ ((vector_size (16))) int val0 = {0,0,0,0};
+__attribute__ ((vector_size (16))) int val20 = {-201,-202,-203,-204};
+__attribute__ ((vector_size (16))) int val21 = {-211,-212,-213,-214};
+__attribute__ ((vector_size (16))) int val22 = {-221,-222,-223,-224};
+__attribute__ ((vector_size (16))) int val23 = {-231,-232,-233,-234};
+__attribute__ ((vector_size (16))) int val24 = {-241,-242,-243,-244};
+__attribute__ ((vector_size (16))) int val25 = {-251,-252,-253,-254};
+__attribute__ ((vector_size (16))) int val26 = {-261,-262,-263,-264};
+__attribute__ ((vector_size (16))) int val27 = {-271,-272,-273,-274};
+__attribute__ ((vector_size (16))) int val28 = {-281,-282,-283,-284};
+__attribute__ ((vector_size (16))) int val29 = {-291,-292,-293,-294};
+__attribute__ ((vector_size (16))) int val30 = {-301,-302,-303,-304};
+__attribute__ ((vector_size (16))) int val31 = {-311,-312,-313,-314};
+#define INIT_REGS INIT_VR; INIT_FPR; INIT_GPR; INIT_CR
+#else
+#ifndef __NO_FPRS__
+#define INIT_REGS INIT_FPR; INIT_GPR; INIT_CR
+#else
+#define INIT_REGS INIT_GPR; INIT_CR
+#endif
+#endif
+#define VERIFY_GPR if (r14 != 14 || r15 != 15 || r16 != 16 || r17 != 17 || r18 != 18 || r19 != 19 || r20 != 20 || r21 != 21 || r22 != 22 || r23 != 23 || r24 != 24 || r25 != 25 || r26 != 26 || r27 != 27 || r28 != 28 || r29 != 29 || r30 != 30 || r31 != 31) abort ()
+#define VERIFY_FPR if (fr14 != 140.0 || fr15 != 150.0 || fr16 != 160.0 || fr17 != 170.0 || fr18 != 180.0 || fr19 != 190.0 || fr20 != 200.0 || fr21 != 210.0 || fr22 != 220.0 || fr23 != 230.0 || fr24 != 240.0 || fr25 != 250.0 || fr26 != 260.0 || fr27 != 270.0 || fr28 != 280.0 || fr29 != 290.0 || fr30 != 300.0 || fr31 != 310.0) abort ()
+#define VERIFY_VR if (!vec_all_eq (v20, val20) || !vec_all_eq (v21, val21) || !vec_all_eq (v22, val22) || !vec_all_eq (v23, val23) || !vec_all_eq (v24, val24) || !vec_all_eq (v25, val25) || !vec_all_eq (v26, val26) || !vec_all_eq (v27, val27) || !vec_all_eq (v28, val28) || !vec_all_eq (v29, val29) || !vec_all_eq (v30, val30) || !vec_all_eq (v31, val31)) abort ()
+#define VERIFY_CR ({ int tmp; __asm__ __volatile__ ("mfcr %0" : "=r" (tmp)); if ((tmp & ((15 << 20) | (15 << 16) | (15 << 12))) != ((6 << 20) | (7 << 16) | (8 << 12))) abort (); })
+#ifdef __ALTIVEC__
+#define VERIFY_REGS VERIFY_VR; VERIFY_FPR; VERIFY_GPR; VERIFY_CR
+#else
+#ifndef __NO_FPRS__
+#define VERIFY_REGS VERIFY_FPR; VERIFY_GPR; VERIFY_CR
+#else
+#define VERIFY_REGS VERIFY_GPR; VERIFY_CR
+#endif
+#endif
+
+#else /* NO_BODY */
+/* For looking at prologue and epilogue code without distractions. */
+#define abort()
+#define TRASH_ALL_CR
+#define TRASH_ALL_VR
+#define TRASH_ALL_FPR
+#define TRASH_ALL_GPR
+#define USE_ALL_CR
+#define USE_ALL_VR
+#define USE_ALL_FPR
+#define USE_ALL_GPR
+#define TRASH_SOME_CR
+#define TRASH_SOME_VR
+#define TRASH_SOME_FPR
+#define TRASH_SOME_GPR
+#define USE_SOME_CR
+#define USE_SOME_VR
+#define USE_SOME_FPR
+#define USE_SOME_GPR
+#define INIT_REGS
+#define VERIFY_REGS
+#endif
+
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+void b_all (void)
+{
+ char a[33000];
+ TRASH_ALL_CR;
+ TRASH_ALL_VR;
+ TRASH_ALL_FPR;
+ TRASH_ALL_GPR;
+ USE_ALL_CR;
+ USE_ALL_VR;
+ USE_ALL_FPR;
+ USE_ALL_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "cr3", "cr4", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31");
+}
+
+void b_cvfr (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+}
+
+void b_vfr (void)
+{
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+}
+
+void b_cvf (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "fr28", "fr31");
+}
+
+void b_vf (void)
+{
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "fr28", "fr31");
+}
+#endif
+
+void b_cvr (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "r30", "r31");
+}
+
+void b_vr (void)
+{
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "r30", "r31");
+}
+
+void b_cv (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31");
+}
+
+void b_v (void)
+{
+ char a[33000];
+ TRASH_SOME_VR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31");
+}
+#endif
+
+#ifndef __NO_FPRS__
+void b_cfr (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "fr28", "fr31", "r30", "r31");
+}
+
+void b_fr (void)
+{
+ char a[33000];
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "fr28", "fr31", "r30", "r31");
+}
+
+void b_cf (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "fr28", "fr31");
+}
+
+void b_f (void)
+{
+ char a[33000];
+ TRASH_SOME_FPR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "fr28", "fr31");
+}
+#endif
+
+void b_cr (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "r30", "r31");
+}
+
+void b_r (void)
+{
+ char a[33000];
+ TRASH_SOME_GPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "r30", "r31");
+}
+
+void b_c (void)
+{
+ char a[33000];
+ TRASH_SOME_CR;
+ USE_SOME_CR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2");
+}
+
+void b_0 (void)
+{
+ char a[33000];
+ __asm __volatile ("#%0" : "=m" (a) );
+}
+
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+void s_all (void)
+{
+ char a[33];
+ TRASH_ALL_CR;
+ TRASH_ALL_VR;
+ TRASH_ALL_FPR;
+ TRASH_ALL_GPR;
+ USE_ALL_CR;
+ USE_ALL_VR;
+ USE_ALL_FPR;
+ USE_ALL_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "cr3", "cr4", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31");
+}
+
+void s_cvfr (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+}
+
+void s_vfr (void)
+{
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+}
+
+void s_cvf (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "fr28", "fr31");
+}
+
+void s_vf (void)
+{
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "fr28", "fr31");
+}
+#endif
+
+void s_cvr (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31", "r30", "r31");
+}
+
+void s_vr (void)
+{
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31", "r30", "r31");
+}
+
+void s_cv (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "v26", "v27", "v31");
+}
+
+void s_v (void)
+{
+ char a[33];
+ TRASH_SOME_VR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0" : "=m" (a) : : "v26", "v27", "v31");
+}
+#endif
+
+#ifndef __NO_FPRS__
+void s_cfr (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "fr28", "fr31", "r30", "r31");
+}
+
+void s_fr (void)
+{
+ char a[33];
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "fr28", "fr31", "r30", "r31");
+}
+
+void s_cf (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "fr28", "fr31");
+}
+
+void s_f (void)
+{
+ char a[33];
+ TRASH_SOME_FPR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "fr28", "fr31");
+}
+#endif
+
+void s_cr (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2", "r30", "r31");
+}
+
+void s_r (void)
+{
+ char a[33];
+ TRASH_SOME_GPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0" : "=m" (a) : : "r30", "r31");
+}
+
+void s_c (void)
+{
+ char a[33];
+ TRASH_SOME_CR;
+ USE_SOME_CR;
+ __asm __volatile ("#%0" : "=m" (a) : : "cr2");
+}
+
+void s_0 (void)
+{
+ char a[33];
+ __asm __volatile ("#%0" : "=m" (a) );
+}
+
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+void wb_all (void)
+{
+ char b[10];
+ char *nb_all (void)
+ {
+ char a[33000];
+ TRASH_ALL_CR;
+ TRASH_ALL_VR;
+ TRASH_ALL_FPR;
+ TRASH_ALL_GPR;
+ USE_ALL_CR;
+ USE_ALL_VR;
+ USE_ALL_FPR;
+ USE_ALL_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "cr3", "cr4", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31");
+ return b;
+ }
+ if (nb_all() != b)
+ abort ();
+}
+
+void wb_cvfr (void)
+{
+ char b[10];
+ char *nb_cvfr (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (nb_cvfr () != b)
+ abort ();
+}
+
+void wb_vfr (void)
+{
+ char b[10];
+ char *nb_vfr (void)
+ {
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (nb_vfr () != b)
+ abort ();
+}
+
+void wb_cvf (void)
+{
+ char b[10];
+ char *nb_cvf (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "fr28", "fr31");
+ return b;
+ }
+ if (nb_cvf () != b)
+ abort ();
+}
+
+void wb_vf (void)
+{
+ char b[10];
+ char *nb_vf (void)
+ {
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "fr28", "fr31");
+ return b;
+ }
+ if (nb_vf () != b)
+ abort ();
+}
+#endif
+
+void wb_cvr (void)
+{
+ char b[10];
+ char *nb_cvr (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "r30", "r31");
+ return b;
+ }
+ if (nb_cvr () != b)
+ abort ();
+}
+
+void wb_vr (void)
+{
+ char b[10];
+ char *nb_vr (void)
+ {
+ char a[33000];
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "r30", "r31");
+ return b;
+ }
+ if (nb_vr () != b)
+ abort ();
+}
+
+void wb_cv (void)
+{
+ char b[10];
+ char *nb_cv (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31");
+ return b;
+ }
+ if (nb_cv () != b)
+ abort ();
+}
+
+void wb_v (void)
+{
+ char b[10];
+ char *nb_v (void)
+ {
+ char a[33000];
+ TRASH_SOME_VR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31");
+ return b;
+ }
+ if (nb_v () != b)
+ abort ();
+}
+#endif
+
+#ifndef __NO_FPRS__
+void wb_cfr (void)
+{
+ char b[10];
+ char *nb_cfr (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (nb_cfr () != b)
+ abort ();
+}
+
+void wb_fr (void)
+{
+ char b[10];
+ char *nb_fr (void)
+ {
+ char a[33000];
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (nb_fr () != b)
+ abort ();
+}
+
+void wb_cf (void)
+{
+ char b[10];
+ char *nb_cf (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "fr28", "fr31");
+ return b;
+ }
+ if (nb_cf () != b)
+ abort ();
+}
+
+void wb_f (void)
+{
+ char b[10];
+ char *nb_f (void)
+ {
+ char a[33000];
+ TRASH_SOME_FPR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "fr28", "fr31");
+ return b;
+ }
+ if (nb_f () != b)
+ abort ();
+}
+#endif
+
+void wb_cr (void)
+{
+ char b[10];
+ char *nb_cr (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "r30", "r31");
+ return b;
+ }
+ if (nb_cr () != b)
+ abort ();
+}
+
+void wb_r (void)
+{
+ char b[10];
+ char *nb_r (void)
+ {
+ char a[33000];
+ TRASH_SOME_GPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "r30", "r31");
+ return b;
+ }
+ if (nb_r () != b)
+ abort ();
+}
+
+void wb_c (void)
+{
+ char b[10];
+ char *nb_c (void)
+ {
+ char a[33000];
+ TRASH_SOME_CR;
+ USE_SOME_CR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2");
+ return b;
+ }
+ if (nb_c () != b)
+ abort ();
+}
+
+void wb_0 (void)
+{
+ char b[10];
+ char *nb_0 (void)
+ {
+ char a[33000];
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) );
+ return b;
+ }
+ if (nb_0 () != b)
+ abort ();
+}
+
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+void ws_all (void)
+{
+ char b[10];
+ char *ns_all (void)
+ {
+ char a[33];
+ TRASH_ALL_CR;
+ TRASH_ALL_VR;
+ TRASH_ALL_FPR;
+ TRASH_ALL_GPR;
+ USE_ALL_CR;
+ USE_ALL_VR;
+ USE_ALL_FPR;
+ USE_ALL_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "cr3", "cr4", "v20", "v21", "v22", "v23", "v24", "v25", "v26", "v27", "v28", "v29", "v30", "v31", "fr14", "fr15", "fr16", "fr17", "fr18", "fr19", "fr20", "fr21", "fr22", "fr23", "fr24", "fr25", "fr26", "fr27", "fr28", "fr29", "fr30", "fr31", "r14", "r15", "r16", "r17", "r18", "r19", "r20", "r21", "r22", "r23", "r24", "r25", "r26", "r27", "r28", "r29", "r30", "r31");
+ return b;
+ }
+ if (ns_all() != b)
+ abort ();
+}
+
+void ws_cvfr (void)
+{
+ char b[10];
+ char *ns_cvfr (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (ns_cvfr () != b)
+ abort ();
+}
+
+void ws_vfr (void)
+{
+ char b[10];
+ char *ns_vfr (void)
+ {
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (ns_vfr () != b)
+ abort ();
+}
+
+void ws_cvf (void)
+{
+ char b[10];
+ char *ns_cvf (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "fr28", "fr31");
+ return b;
+ }
+ if (ns_cvf () != b)
+ abort ();
+}
+
+void ws_vf (void)
+{
+ char b[10];
+ char *ns_vf (void)
+ {
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "fr28", "fr31");
+ return b;
+ }
+ if (ns_vf () != b)
+ abort ();
+}
+#endif
+
+void ws_cvr (void)
+{
+ char b[10];
+ char *ns_cvr (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31", "r30", "r31");
+ return b;
+ }
+ if (ns_cvr () != b)
+ abort ();
+}
+
+void ws_vr (void)
+{
+ char b[10];
+ char *ns_vr (void)
+ {
+ char a[33];
+ TRASH_SOME_VR;
+ TRASH_SOME_FPR;
+ USE_SOME_VR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31", "r30", "r31");
+ return b;
+ }
+ if (ns_vr () != b)
+ abort ();
+}
+
+void ws_cv (void)
+{
+ char b[10];
+ char *ns_cv (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_VR;
+ USE_SOME_CR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "v26", "v27", "v31");
+ return b;
+ }
+ if (ns_cv () != b)
+ abort ();
+}
+
+void ws_v (void)
+{
+ char b[10];
+ char *ns_v (void)
+ {
+ char a[33];
+ TRASH_SOME_VR;
+ USE_SOME_VR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "v26", "v27", "v31");
+ return b;
+ }
+ if (ns_v () != b)
+ abort ();
+}
+#endif
+
+#ifndef __NO_FPRS__
+void ws_cfr (void)
+{
+ char b[10];
+ char *ns_cfr (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (ns_cfr () != b)
+ abort ();
+}
+
+void ws_fr (void)
+{
+ char b[10];
+ char *ns_fr (void)
+ {
+ char a[33];
+ TRASH_SOME_FPR;
+ TRASH_SOME_GPR;
+ USE_SOME_FPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "fr28", "fr31", "r30", "r31");
+ return b;
+ }
+ if (ns_fr () != b)
+ abort ();
+}
+
+void ws_cf (void)
+{
+ char b[10];
+ char *ns_cf (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_FPR;
+ USE_SOME_CR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "fr28", "fr31");
+ return b;
+ }
+ if (ns_cf () != b)
+ abort ();
+}
+
+void ws_f (void)
+{
+ char b[10];
+ char *ns_f (void)
+ {
+ char a[33];
+ TRASH_SOME_FPR;
+ USE_SOME_FPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "fr28", "fr31");
+ return b;
+ }
+ if (ns_f () != b)
+ abort ();
+}
+#endif
+
+void ws_cr (void)
+{
+ char b[10];
+ char *ns_cr (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ TRASH_SOME_GPR;
+ USE_SOME_CR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2", "r30", "r31");
+ return b;
+ }
+ if (ns_cr () != b)
+ abort ();
+}
+
+void ws_r (void)
+{
+ char b[10];
+ char *ns_r (void)
+ {
+ char a[33];
+ TRASH_SOME_GPR;
+ USE_SOME_GPR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "r30", "r31");
+ return b;
+ }
+ if (ns_r () != b)
+ abort ();
+}
+
+void ws_c (void)
+{
+ char b[10];
+ char *ns_c (void)
+ {
+ char a[33];
+ TRASH_SOME_CR;
+ USE_SOME_CR;
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) : : "cr2");
+ return b;
+ }
+ if (ns_c () != b)
+ abort ();
+}
+
+void ws_0 (void)
+{
+ char b[10];
+ char *ns_0 (void)
+ {
+ char a[33];
+ __asm __volatile ("#%0 %1" : "=m" (a), "=m" (b) );
+ return b;
+ }
+ if (ns_0 () != b)
+ abort ();
+}
+
+int main (void)
+{
+ INIT_REGS;
+ USE_ALL_CR;
+#ifdef __ALTIVEC__
+ USE_ALL_VR;
+#ifndef __NO_FPRS__
+ USE_ALL_FPR;
+#endif
+#endif
+ USE_ALL_GPR;
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+ b_all ();
+ VERIFY_REGS;
+ b_cvfr ();
+ VERIFY_REGS;
+ b_vfr ();
+ VERIFY_REGS;
+ b_cvf ();
+ VERIFY_REGS;
+ b_vf ();
+ VERIFY_REGS;
+#endif
+ b_cvr ();
+ VERIFY_REGS;
+ b_vr ();
+ VERIFY_REGS;
+ b_cv ();
+ VERIFY_REGS;
+ b_v ();
+ VERIFY_REGS;
+#endif
+#ifndef __NO_FPRS__
+ b_cfr ();
+ VERIFY_REGS;
+ b_fr ();
+ VERIFY_REGS;
+ b_cf ();
+ VERIFY_REGS;
+ b_f ();
+ VERIFY_REGS;
+#endif
+ b_cr ();
+ VERIFY_REGS;
+ b_r ();
+ VERIFY_REGS;
+ b_c ();
+ VERIFY_REGS;
+ b_0 ();
+ VERIFY_REGS;
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+ s_all ();
+ VERIFY_REGS;
+ s_cvfr ();
+ VERIFY_REGS;
+ s_vfr ();
+ VERIFY_REGS;
+ s_cvf ();
+ VERIFY_REGS;
+ s_vf ();
+ VERIFY_REGS;
+#endif
+ s_cvr ();
+ VERIFY_REGS;
+ s_vr ();
+ VERIFY_REGS;
+ s_cv ();
+ VERIFY_REGS;
+ s_v ();
+ VERIFY_REGS;
+#endif
+#ifndef __NO_FPRS__
+ s_cfr ();
+ VERIFY_REGS;
+ s_fr ();
+ VERIFY_REGS;
+ s_cf ();
+ VERIFY_REGS;
+ s_f ();
+ VERIFY_REGS;
+#endif
+ s_cr ();
+ VERIFY_REGS;
+ s_r ();
+ VERIFY_REGS;
+ s_c ();
+ VERIFY_REGS;
+ s_0 ();
+ VERIFY_REGS;
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+ wb_all ();
+ VERIFY_REGS;
+ wb_cvfr ();
+ VERIFY_REGS;
+ wb_vfr ();
+ VERIFY_REGS;
+ wb_cvf ();
+ VERIFY_REGS;
+ wb_vf ();
+ VERIFY_REGS;
+#endif
+ wb_cvr ();
+ VERIFY_REGS;
+ wb_vr ();
+ VERIFY_REGS;
+ wb_cv ();
+ VERIFY_REGS;
+ wb_v ();
+ VERIFY_REGS;
+#endif
+#ifndef __NO_FPRS__
+ wb_cfr ();
+ VERIFY_REGS;
+ wb_fr ();
+ VERIFY_REGS;
+ wb_cf ();
+ VERIFY_REGS;
+ wb_f ();
+ VERIFY_REGS;
+#endif
+ wb_cr ();
+ VERIFY_REGS;
+ wb_r ();
+ VERIFY_REGS;
+ wb_c ();
+ VERIFY_REGS;
+ wb_0 ();
+ VERIFY_REGS;
+#ifdef __ALTIVEC__
+#ifndef __NO_FPRS__
+ ws_all ();
+ VERIFY_REGS;
+ ws_cvfr ();
+ VERIFY_REGS;
+ ws_vfr ();
+ VERIFY_REGS;
+ ws_cvf ();
+ VERIFY_REGS;
+ ws_vf ();
+ VERIFY_REGS;
+#endif
+ ws_cvr ();
+ VERIFY_REGS;
+ ws_vr ();
+ VERIFY_REGS;
+ ws_cv ();
+ VERIFY_REGS;
+ ws_v ();
+ VERIFY_REGS;
+#endif
+#ifndef __NO_FPRS__
+ ws_cfr ();
+ VERIFY_REGS;
+ ws_fr ();
+ VERIFY_REGS;
+ ws_cf ();
+ VERIFY_REGS;
+ ws_f ();
+ VERIFY_REGS;
+#endif
+ ws_cr ();
+ VERIFY_REGS;
+ ws_r ();
+ VERIFY_REGS;
+ ws_c ();
+ VERIFY_REGS;
+ ws_0 ();
+ VERIFY_REGS;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c b/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c
new file mode 100644
index 0000000000..59b68ee36e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sd-pwr6.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-require-effective-target dfp } */
+/* { dg-options "-O2 -mcpu=power6 -mhard-dfp" } */
+/* { dg-final { scan-assembler-not "lfiwzx" } } */
+/* { dg-final { scan-assembler-times "lfd" 2 } } */
+/* { dg-final { scan-assembler-times "dctdp" 2 } } */
+/* { dg-final { scan-assembler-times "dadd" 1 } } */
+/* { dg-final { scan-assembler-times "drsp" 1 } } */
+
+/* Test that for power6 we need to use a bounce buffer on the stack to load
+ SDmode variables because the power6 does not have a way to directly load
+ 32-bit values from memory. */
+_Decimal32 a;
+
+void inc_dec32 (void)
+{
+ a += (_Decimal32) 1.0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/sd-vsx.c b/gcc/testsuite/gcc.target/powerpc/sd-vsx.c
new file mode 100644
index 0000000000..c7cb751128
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/sd-vsx.c
@@ -0,0 +1,21 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* powerpc-ibm-aix* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-require-effective-target dfp } */
+/* { dg-options "-O2 -mcpu=power7 -mhard-dfp" } */
+/* { dg-final { scan-assembler-times "lfiwzx" 2 } } */
+/* { dg-final { scan-assembler-times "stfiwx" 1 } } */
+/* { dg-final { scan-assembler-not "lfd" } } */
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-times "dctdp" 2 } } */
+/* { dg-final { scan-assembler-times "dadd" 1 } } */
+/* { dg-final { scan-assembler-times "drsp" 1 } } */
+
+/* Test that power7 can directly load/store SDmode variables without using a
+ bounce buffer. */
+_Decimal32 a;
+
+void inc_dec32 (void)
+{
+ a += (_Decimal32) 1.0;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c b/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
index 2a466e344f..5354e49f47 100644
--- a/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
+++ b/gcc/testsuite/gcc.target/powerpc/spe-small-data-2.c
@@ -1,5 +1,6 @@
/* Verify that we don't ICE trying to put float data in .sdata2. */
-/* { dg-do run { target { powerpc*-*-linux* && powerpc_spe } } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target powerpc_eabi_ok } */
/* { dg-options "-msdata=eabi -mcall-eabi -G 8" } */
double x;
diff --git a/gcc/testsuite/gcc.target/powerpc/tfmode_off.c b/gcc/testsuite/gcc.target/powerpc/tfmode_off.c
new file mode 100644
index 0000000000..ea703f0ee0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/tfmode_off.c
@@ -0,0 +1,52 @@
+/* { dg-do assemble } */
+/* { dg-skip-if "" { powerpc-ibm-aix* } { "*" } { "" } } */
+/* { dg-skip-if "no TFmode" { powerpc-*-eabi* } { "*" } { "" } } */
+/* { dg-require-effective-target longdouble128 } */
+/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps" } */
+
+typedef float TFmode __attribute__ ((mode (TF)));
+
+void w1 (void *x, TFmode y) { *(TFmode *) (x + 32767) = y; }
+void w2 (void *x, TFmode y) { *(TFmode *) (x + 32766) = y; }
+void w3 (void *x, TFmode y) { *(TFmode *) (x + 32765) = y; }
+void w4 (void *x, TFmode y) { *(TFmode *) (x + 32764) = y; }
+void w5 (void *x, TFmode y) { *(TFmode *) (x + 32763) = y; }
+void w6 (void *x, TFmode y) { *(TFmode *) (x + 32762) = y; }
+void w7 (void *x, TFmode y) { *(TFmode *) (x + 32761) = y; }
+void w8 (void *x, TFmode y) { *(TFmode *) (x + 32760) = y; }
+void w9 (void *x, TFmode y) { *(TFmode *) (x + 32759) = y; }
+void w10 (void *x, TFmode y) { *(TFmode *) (x + 32758) = y; }
+void w11 (void *x, TFmode y) { *(TFmode *) (x + 32757) = y; }
+void w12 (void *x, TFmode y) { *(TFmode *) (x + 32756) = y; }
+void w13 (void *x, TFmode y) { *(TFmode *) (x + 32755) = y; }
+void w14 (void *x, TFmode y) { *(TFmode *) (x + 32754) = y; }
+void w15 (void *x, TFmode y) { *(TFmode *) (x + 32753) = y; }
+void w16 (void *x, TFmode y) { *(TFmode *) (x + 32752) = y; }
+void w17 (void *x, TFmode y) { *(TFmode *) (x + 32751) = y; }
+void w18 (void *x, TFmode y) { *(TFmode *) (x + 32750) = y; }
+void w19 (void *x, TFmode y) { *(TFmode *) (x + 32749) = y; }
+void w20 (void *x, TFmode y) { *(TFmode *) (x + 32748) = y; }
+
+TFmode r1 (void *x) { return *(TFmode *) (x + 32767); }
+TFmode r2 (void *x) { return *(TFmode *) (x + 32766); }
+TFmode r3 (void *x) { return *(TFmode *) (x + 32765); }
+TFmode r4 (void *x) { return *(TFmode *) (x + 32764); }
+TFmode r5 (void *x) { return *(TFmode *) (x + 32763); }
+TFmode r6 (void *x) { return *(TFmode *) (x + 32762); }
+TFmode r7 (void *x) { return *(TFmode *) (x + 32761); }
+TFmode r8 (void *x) { return *(TFmode *) (x + 32760); }
+TFmode r9 (void *x) { return *(TFmode *) (x + 32759); }
+TFmode r10 (void *x) { return *(TFmode *) (x + 32758); }
+TFmode r11 (void *x) { return *(TFmode *) (x + 32757); }
+TFmode r12 (void *x) { return *(TFmode *) (x + 32756); }
+TFmode r13 (void *x) { return *(TFmode *) (x + 32755); }
+TFmode r14 (void *x) { return *(TFmode *) (x + 32754); }
+TFmode r15 (void *x) { return *(TFmode *) (x + 32753); }
+TFmode r16 (void *x) { return *(TFmode *) (x + 32752); }
+TFmode r17 (void *x) { return *(TFmode *) (x + 32751); }
+TFmode r18 (void *x) { return *(TFmode *) (x + 32750); }
+TFmode r19 (void *x) { return *(TFmode *) (x + 32749); }
+TFmode r20 (void *x) { return *(TFmode *) (x + 32748); }
+
+/* { dg-final { object-size text == 544 } } */
+/* { dg-final { cleanup-saved-temps "tfmode_off" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/ti_math1.c b/gcc/testsuite/gcc.target/powerpc/ti_math1.c
new file mode 100644
index 0000000000..cdf9251004
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ti_math1.c
@@ -0,0 +1,20 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "addc" 1 } } */
+/* { dg-final { scan-assembler-times "adde" 1 } } */
+/* { dg-final { scan-assembler-times "subfc" 1 } } */
+/* { dg-final { scan-assembler-times "subfe" 1 } } */
+/* { dg-final { scan-assembler-not "subf " } } */
+
+__int128
+add_128 (__int128 *ptr, __int128 val)
+{
+ return (*ptr + val);
+}
+
+__int128
+sub_128 (__int128 *ptr, __int128 val)
+{
+ return (*ptr - val);
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/ti_math2.c b/gcc/testsuite/gcc.target/powerpc/ti_math2.c
new file mode 100644
index 0000000000..b9c03300d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/ti_math2.c
@@ -0,0 +1,73 @@
+/* { dg-do run { target { powerpc*-*-* && lp64 } } } */
+/* { dg-options "-O2 -fno-inline" } */
+
+union U {
+ __int128 i128;
+ struct {
+ long l1;
+ long l2;
+ } s;
+};
+
+union U u1,u2;
+
+__int128
+create_128 (long most_sig, long least_sig)
+{
+ union U u;
+
+#if __LITTLE_ENDIAN__
+ u.s.l1 = least_sig;
+ u.s.l2 = most_sig;
+#else
+ u.s.l1 = most_sig;
+ u.s.l2 = least_sig;
+#endif
+ return u.i128;
+}
+
+long most_sig (union U * u)
+{
+#if __LITTLE_ENDIAN__
+ return (*u).s.l2;
+#else
+ return (*u).s.l1;
+#endif
+}
+
+long least_sig (union U * u)
+{
+#if __LITTLE_ENDIAN__
+ return (*u).s.l1;
+#else
+ return (*u).s.l2;
+#endif
+}
+
+__int128
+add_128 (__int128 *ptr, __int128 val)
+{
+ return (*ptr + val);
+}
+
+__int128
+sub_128 (__int128 *ptr, __int128 val)
+{
+ return (*ptr - val);
+}
+
+int
+main (void)
+{
+ /* Do a simple add/sub to make sure carry is happening between the dwords
+ and that dwords are in correct endian order. */
+ u1.i128 = create_128 (1, -1);
+ u2.i128 = add_128 (&u1.i128, 1);
+ if ((most_sig (&u2) != 2) || (least_sig (&u2) != 0))
+ __builtin_abort ();
+ u2.i128 = sub_128 (&u2.i128, 1);
+ if ((most_sig (&u2) != 1) || (least_sig (&u2) != -1))
+ __builtin_abort ();
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/powerpc/timode_off.c b/gcc/testsuite/gcc.target/powerpc/timode_off.c
new file mode 100644
index 0000000000..c169e503e8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/timode_off.c
@@ -0,0 +1,57 @@
+/* { dg-do assemble { target { lp64 } } } */
+/* { dg-options "-O2 -fno-align-functions -mtraceback=no -save-temps -mcpu=power5" } */
+
+typedef int TImode __attribute__ ((mode (TI)));
+
+void w1 (void *x, TImode y) { *(TImode *) (x + 32767) = y; }
+void w2 (void *x, TImode y) { *(TImode *) (x + 32766) = y; }
+void w3 (void *x, TImode y) { *(TImode *) (x + 32765) = y; }
+void w4 (void *x, TImode y) { *(TImode *) (x + 32764) = y; }
+void w5 (void *x, TImode y) { *(TImode *) (x + 32763) = y; }
+void w6 (void *x, TImode y) { *(TImode *) (x + 32762) = y; }
+void w7 (void *x, TImode y) { *(TImode *) (x + 32761) = y; }
+void w8 (void *x, TImode y) { *(TImode *) (x + 32760) = y; }
+void w9 (void *x, TImode y) { *(TImode *) (x + 32759) = y; }
+void w10 (void *x, TImode y) { *(TImode *) (x + 32758) = y; }
+void w11 (void *x, TImode y) { *(TImode *) (x + 32757) = y; }
+void w12 (void *x, TImode y) { *(TImode *) (x + 32756) = y; }
+void w13 (void *x, TImode y) { *(TImode *) (x + 32755) = y; }
+void w14 (void *x, TImode y) { *(TImode *) (x + 32754) = y; }
+void w15 (void *x, TImode y) { *(TImode *) (x + 32753) = y; }
+void w16 (void *x, TImode y) { *(TImode *) (x + 32752) = y; }
+void w17 (void *x, TImode y) { *(TImode *) (x + 32751) = y; }
+void w18 (void *x, TImode y) { *(TImode *) (x + 32750) = y; }
+void w19 (void *x, TImode y) { *(TImode *) (x + 32749) = y; }
+void w20 (void *x, TImode y) { *(TImode *) (x + 32748) = y; }
+
+TImode r1 (void *x) { return *(TImode *) (x + 32767); }
+TImode r2 (void *x) { return *(TImode *) (x + 32766); }
+TImode r3 (void *x) { return *(TImode *) (x + 32765); }
+TImode r4 (void *x) { return *(TImode *) (x + 32764); }
+TImode r5 (void *x) { return *(TImode *) (x + 32763); }
+TImode r6 (void *x) { return *(TImode *) (x + 32762); }
+TImode r7 (void *x) { return *(TImode *) (x + 32761); }
+TImode r8 (void *x) { return *(TImode *) (x + 32760); }
+TImode r9 (void *x) { return *(TImode *) (x + 32759); }
+TImode r10 (void *x) { return *(TImode *) (x + 32758); }
+TImode r11 (void *x) { return *(TImode *) (x + 32757); }
+TImode r12 (void *x) { return *(TImode *) (x + 32756); }
+TImode r13 (void *x) { return *(TImode *) (x + 32755); }
+TImode r14 (void *x) { return *(TImode *) (x + 32754); }
+TImode r15 (void *x) { return *(TImode *) (x + 32753); }
+TImode r16 (void *x) { return *(TImode *) (x + 32752); }
+TImode r17 (void *x) { return *(TImode *) (x + 32751); }
+TImode r18 (void *x) { return *(TImode *) (x + 32750); }
+TImode r19 (void *x) { return *(TImode *) (x + 32749); }
+TImode r20 (void *x) { return *(TImode *) (x + 32748); }
+
+/* test should really be == 616, see pr54110 */
+/* When TImode is allowed in VSX registers, the allowable address modes for
+ TImode is just a single indirect address in order for the value to be loaded
+ and store in either GPR or VSX registers. This affects the generated code,
+ and it would cause this test to fail, when such an option is used. Fall
+ back to power5 to test the code. */
+
+/* { dg-final { object-size text <= 700 } } */
+/* { dg-final { scan-assembler-not "(st|l)fd" } } */
+/* { dg-final { cleanup-saved-temps "timode_off" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c
index 8450920ec0..7aeba6cb56 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-3.c
@@ -16,9 +16,9 @@
/* { dg-final { scan-assembler "xvrspiz" } } */
/* { dg-final { scan-assembler "xsrdpi" } } */
/* { dg-final { scan-assembler "xsrdpic" } } */
-/* { dg-final { scan-assembler "xsrdpim" } } */
-/* { dg-final { scan-assembler "xsrdpip" } } */
-/* { dg-final { scan-assembler "xsrdpiz" } } */
+/* { dg-final { scan-assembler "xsrdpim\|frim" } } */
+/* { dg-final { scan-assembler "xsrdpip\|frip" } } */
+/* { dg-final { scan-assembler "xsrdpiz\|friz" } } */
/* { dg-final { scan-assembler "xsmaxdp" } } */
/* { dg-final { scan-assembler "xsmindp" } } */
/* { dg-final { scan-assembler "xxland" } } */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
index 836b3851ca..934cdad250 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-builtin-8.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { powerpc*-*-* } } } */
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
-/* { dg-options "-O3 -mcpu=power7" } */
+/* { dg-options "-O3 -mcpu=power7 -Wno-deprecated" } */
/* Test the various load/store varients. */
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-extract-1.c b/gcc/testsuite/gcc.target/powerpc/vsx-extract-1.c
new file mode 100644
index 0000000000..c4e76e6ac0
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-extract-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7" } */
+/* { dg-final { scan-assembler "lfd" } } */
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
+
+#include <altivec.h>
+
+double get_value (vector double *p) { return vec_extract (*p, 0); }
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-extract-2.c b/gcc/testsuite/gcc.target/powerpc/vsx-extract-2.c
new file mode 100644
index 0000000000..be29af8611
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-extract-2.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O3 -mcpu=power7" } */
+/* { dg-final { scan-assembler "xxlor" } } */
+/* { dg-final { scan-assembler-not "lfd" } } */
+/* { dg-final { scan-assembler-not "lxvd2x" } } */
+
+#include <altivec.h>
+
+#if __LITTLE_ENDIAN__
+#define OFFSET 1
+#else
+#define OFFSET 0
+#endif
+
+double get_value (vector double v) { return vec_extract (v, OFFSET); }
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-extract-3.c b/gcc/testsuite/gcc.target/powerpc/vsx-extract-3.c
new file mode 100644
index 0000000000..ea421265e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-extract-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { powerpc*-*-* && lp64 } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_p8vector_ok } */
+/* { dg-options "-O3 -mcpu=power8" } */
+/* { dg-final { scan-assembler "mfvsrd" } } */
+/* { dg-final { scan-assembler-not "stfd" } } */
+/* { dg-final { scan-assembler-not "stxvd2x" } } */
+
+#include <altivec.h>
+
+#if __LITTLE_ENDIAN__
+#define OFFSET 1
+#else
+#define OFFSET 0
+#endif
+
+long get_value (vector long v) { return vec_extract (v, OFFSET); }
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-float0.c b/gcc/testsuite/gcc.target/powerpc/vsx-float0.c
new file mode 100644
index 0000000000..7e4fea6895
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-float0.c
@@ -0,0 +1,16 @@
+/* { dg-do compile { target { powerpc*-*-* } } } */
+/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
+/* { dg-require-effective-target powerpc_vsx_ok } */
+/* { dg-options "-O2 -mcpu=power7" } */
+/* { dg-final { scan-assembler "xxlxor" } } */
+
+/* Test that we generate xxlor to clear a SFmode register. */
+
+float sum (float *p, unsigned long n)
+{
+ float sum = 0.0f; /* generate xxlxor instead of load */
+ while (n-- > 0)
+ sum += *p++;
+
+ return sum;
+}
diff --git a/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c b/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
index 8f4062be7b..adb5c9fae3 100644
--- a/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
+++ b/gcc/testsuite/gcc.target/powerpc/vsx-mass-1.c
@@ -2,58 +2,58 @@
/* { dg-skip-if "" { powerpc*-*-darwin* } { "*" } { "" } } */
/* { dg-require-effective-target powerpc_vsx_ok } */
/* { dg-options "-O3 -ftree-vectorize -mcpu=power7 -ffast-math -mveclibabi=mass" } */
-/* { dg-final { scan-assembler "bl atan2d2" } } */
-/* { dg-final { scan-assembler "bl atan2f4" } } */
-/* { dg-final { scan-assembler "bl hypotd2" } } */
-/* { dg-final { scan-assembler "bl hypotf4" } } */
-/* { dg-final { scan-assembler "bl powd2" } } */
-/* { dg-final { scan-assembler "bl powf4" } } */
-/* { dg-final { scan-assembler "bl acosd2" } } */
-/* { dg-final { scan-assembler "bl acosf4" } } */
-/* { dg-final { scan-assembler "bl acoshd2" } } */
-/* { dg-final { scan-assembler "bl acoshf4" } } */
-/* { dg-final { scan-assembler "bl asind2" } } */
-/* { dg-final { scan-assembler "bl asinf4" } } */
-/* { dg-final { scan-assembler "bl asinhd2" } } */
-/* { dg-final { scan-assembler "bl asinhf4" } } */
-/* { dg-final { scan-assembler "bl atand2" } } */
-/* { dg-final { scan-assembler "bl atanf4" } } */
-/* { dg-final { scan-assembler "bl atanhd2" } } */
-/* { dg-final { scan-assembler "bl atanhf4" } } */
-/* { dg-final { scan-assembler "bl cbrtd2" } } */
-/* { dg-final { scan-assembler "bl cbrtf4" } } */
-/* { dg-final { scan-assembler "bl cosd2" } } */
-/* { dg-final { scan-assembler "bl cosf4" } } */
-/* { dg-final { scan-assembler "bl coshd2" } } */
-/* { dg-final { scan-assembler "bl coshf4" } } */
-/* { dg-final { scan-assembler "bl erfd2" } } */
-/* { dg-final { scan-assembler "bl erff4" } } */
-/* { dg-final { scan-assembler "bl erfcd2" } } */
-/* { dg-final { scan-assembler "bl erfcf4" } } */
-/* { dg-final { scan-assembler "bl exp2d2" } } */
-/* { dg-final { scan-assembler "bl exp2f4" } } */
-/* { dg-final { scan-assembler "bl expd2" } } */
-/* { dg-final { scan-assembler "bl expf4" } } */
-/* { dg-final { scan-assembler "bl expm1d2" } } */
-/* { dg-final { scan-assembler "bl expm1f4" } } */
-/* { dg-final { scan-assembler "bl lgamma" } } */
-/* { dg-final { scan-assembler "bl lgammaf" } } */
-/* { dg-final { scan-assembler "bl log10d2" } } */
-/* { dg-final { scan-assembler "bl log10f4" } } */
-/* { dg-final { scan-assembler "bl log1pd2" } } */
-/* { dg-final { scan-assembler "bl log1pf4" } } */
-/* { dg-final { scan-assembler "bl log2d2" } } */
-/* { dg-final { scan-assembler "bl log2f4" } } */
-/* { dg-final { scan-assembler "bl logd2" } } */
-/* { dg-final { scan-assembler "bl logf4" } } */
-/* { dg-final { scan-assembler "bl sind2" } } */
-/* { dg-final { scan-assembler "bl sinf4" } } */
-/* { dg-final { scan-assembler "bl sinhd2" } } */
-/* { dg-final { scan-assembler "bl sinhf4" } } */
-/* { dg-final { scan-assembler "bl tand2" } } */
-/* { dg-final { scan-assembler "bl tanf4" } } */
-/* { dg-final { scan-assembler "bl tanhd2" } } */
-/* { dg-final { scan-assembler "bl tanhf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atan2d2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atan2f4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+hypotd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+hypotf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+powd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+powf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+acosd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+acosf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+acoshd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+acoshf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+asind2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+asinf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+asinhd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+asinhf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atand2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atanf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atanhd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+atanhf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+cbrtd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+cbrtf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+cosd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+cosf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+coshd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+coshf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+erfd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+erff4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+erfcd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+erfcf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+exp2d2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+exp2f4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+expd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+expf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+expm1d2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+expm1f4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+lgamma" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+lgammaf" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log10d2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log10f4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log1pd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log1pf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log2d2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+log2f4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+logd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+logf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+sind2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+sinf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+sinhd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+sinhf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+tand2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+tanf4" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+tanhd2" } } */
+/* { dg-final { scan-assembler "bl\[\\. \]+tanhf4" } } */
#ifndef SIZE
#define SIZE 1024
diff --git a/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c b/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
new file mode 100644
index 0000000000..bf889aaa22
--- /dev/null
+++ b/gcc/testsuite/gcc.target/powerpc/warn-lvsl-lvsr.c
@@ -0,0 +1,14 @@
+/* Test for deprecation messages on use of lvsl and lvsr for little endian. */
+
+/* { dg-do compile { target { powerpc64le-*-* } } } */
+/* { dg-options "-O0 -Wdeprecated" } */
+
+#include <altivec.h>
+
+float f[20];
+
+void foo ()
+{
+ vector unsigned char a = vec_lvsl (4, f); /* { dg-warning "vec_lvsl is deprecated for little endian; use assignment for unaligned loads and stores" } */
+ vector unsigned char b = vec_lvsr (8, f); /* { dg-warning "vec_lvsr is deprecated for little endian; use assignment for unaligned loads and stores" } */
+}
diff --git a/gcc/testsuite/gcc.target/rx/rx.exp b/gcc/testsuite/gcc.target/rx/rx.exp
index aa516e4555..159add18bb 100644
--- a/gcc/testsuite/gcc.target/rx/rx.exp
+++ b/gcc/testsuite/gcc.target/rx/rx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/s390/20030123-1.c b/gcc/testsuite/gcc.target/s390/20030123-1.c
index 96ac6f76ce..c426866fd5 100644
--- a/gcc/testsuite/gcc.target/s390/20030123-1.c
+++ b/gcc/testsuite/gcc.target/s390/20030123-1.c
@@ -12,7 +12,7 @@ void test (void)
char *p = alloca (4096);
long idx;
- asm ("" : "=r" (idx) : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
+ asm volatile ("" : "=r" (idx) : : "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "12");
func (p + idx + 1);
}
diff --git a/gcc/testsuite/gcc.target/s390/20140327-1.c b/gcc/testsuite/gcc.target/s390/20140327-1.c
new file mode 100644
index 0000000000..f71c38f090
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/20140327-1.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -m31 -mzarch" } */
+
+void
+foo ()
+{
+ asm ("" ::: "%f4");
+}
+
+/* { dg-final { scan-assembler "ld" } } */
diff --git a/gcc/testsuite/gcc.target/s390/fp2int1.c b/gcc/testsuite/gcc.target/s390/fp2int1.c
new file mode 100644
index 0000000000..4a90a8b91d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/fp2int1.c
@@ -0,0 +1,95 @@
+/* Test for the 32 bit fp to 64 bit int conversion routines.
+
+ On S/390 32 bit we use our own implementations in order to be IEEE
+ complaint as we are with our machine instructions. These missed to
+ throw FE_INVALID exceptions in a bunch of cases. */
+
+/* { dg-do run { target s390-*-* } } */
+/* { dg-options "-O3 -mesa" } */
+/* { dg-require-effective-target fenv_exceptions } */
+
+#define _GNU_SOURCE
+#include <stdlib.h>
+#include <stdio.h>
+#include <fenv.h>
+
+#define INFINITYf (__builtin_inff())
+#define INFINITY (__builtin_inf())
+#define INFINITYl (__builtin_infl())
+#define NANf (__builtin_nanf (""))
+#define NAN (__builtin_nan (""))
+#define NANl (__builtin_nanl (""))
+
+#define TESTEXCEPT_FUNC(FUNC, TYPE_FROM, TYPE_TO) \
+ TYPE_TO \
+ __attribute__((noinline)) FUNC (TYPE_FROM a) \
+ { \
+ asm volatile ("" : : "f" (a)); \
+ return (TYPE_TO)a; \
+ }
+
+#define TESTEXCEPT(FUNC, EXCEPT, EXPECT, VALUE, TYPE_TO) \
+ { \
+ TYPE_TO b; \
+ feclearexcept (FE_ALL_EXCEPT); \
+ b = FUNC (VALUE); \
+ if ((fetestexcept (EXCEPT) & (EXCEPT)) != EXPECT) \
+ { \
+ printf ("FAIL in line: %d\n", __LINE__); \
+ abort (); \
+ } \
+ }
+
+#define TESTEXCEPT_FUNC_ALLFLOATS(FUNC, TYPE_TO) \
+ TESTEXCEPT_FUNC (FUNC##_f, float, TYPE_TO); \
+ TESTEXCEPT_FUNC (FUNC##_d, double, TYPE_TO); \
+ TESTEXCEPT_FUNC (FUNC##_l, long double, TYPE_TO); \
+
+#define TESTEXCEPT_ALLFLOATS(FUNC, EXCEPT, EXPECT, VALUE, TYPE_TO) \
+ TESTEXCEPT (FUNC##_f, EXCEPT, EXPECT, VALUE##f, TYPE_TO); \
+ TESTEXCEPT (FUNC##_d, EXCEPT, EXPECT, VALUE, TYPE_TO); \
+ TESTEXCEPT (FUNC##_l, EXCEPT, EXPECT, VALUE##l, TYPE_TO); \
+
+TESTEXCEPT_FUNC_ALLFLOATS (a, unsigned long long);
+TESTEXCEPT_FUNC_ALLFLOATS (u, long long);
+
+
+int
+main ()
+{
+ /* Prevent getting signals. */
+ fedisableexcept (FE_INVALID);
+
+ /* To unsigned long long */
+
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, INFINITY, unsigned long long);
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, -INFINITY, unsigned long long);
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, NAN, unsigned long long);
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, -NAN, unsigned long long);
+
+ /* Negative values >-1.0 must not cause FE_INVALID. */
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, 0, -0x0.ffffffp0, unsigned long long);
+ /* -1.0 instead must. */
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, -0x1.0p+0, unsigned long long);
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, 0, 0x1.0p+63, unsigned long long);
+ TESTEXCEPT_ALLFLOATS (a, FE_INVALID, FE_INVALID, 0x1.0p+64, unsigned long long);
+
+ /* To signed long long */
+
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, INFINITY, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, -INFINITY, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, NAN, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, -NAN, long long);
+
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, 0, -0x1.0p+63, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, -0x1.1p+63, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, 0, 0x0.fffffp+63, long long);
+ TESTEXCEPT_ALLFLOATS (u, FE_INVALID, FE_INVALID, 0x1.0p+63, long long);
+
+ /* If there are additional bits which would not make it into the
+ integer value no exception is supposed to occur. */
+ TESTEXCEPT (u_l, FE_INVALID, 0, -0x1.000000000000000123p+63l, long long);
+ TESTEXCEPT (u_l, FE_INVALID, FE_INVALID, -0x1.000000000000000223p+63l, long long);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-1.c b/gcc/testsuite/gcc.target/s390/hotpatch-1.c
new file mode 100644
index 0000000000..b9d6139b08
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-1.c
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 12 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-10.c b/gcc/testsuite/gcc.target/s390/hotpatch-10.c
new file mode 100644
index 0000000000..b91b3478ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-10.c
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mno-hotpatch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(2)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 2 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-11.c b/gcc/testsuite/gcc.target/s390/hotpatch-11.c
new file mode 100644
index 0000000000..4916773425
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-11.c
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch -mno-hotpatch --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-12.c b/gcc/testsuite/gcc.target/s390/hotpatch-12.c
new file mode 100644
index 0000000000..b3e9427d4e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-12.c
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mno-hotpatch -mhotpatch=1 --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-2.c b/gcc/testsuite/gcc.target/s390/hotpatch-2.c
new file mode 100644
index 0000000000..6cc29447de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-2.c
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1 --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-3.c b/gcc/testsuite/gcc.target/s390/hotpatch-3.c
new file mode 100644
index 0000000000..9f0b2b756a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-3.c
@@ -0,0 +1,20 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0 --save-temps" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-4.c b/gcc/testsuite/gcc.target/s390/hotpatch-4.c
new file mode 100644
index 0000000000..c1dba20a37
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-4.c
@@ -0,0 +1,26 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+inline void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((always_inline))
+void hp2(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp2' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-5.c b/gcc/testsuite/gcc.target/s390/hotpatch-5.c
new file mode 100644
index 0000000000..ec267d65aa
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-5.c
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 12 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-6.c b/gcc/testsuite/gcc.target/s390/hotpatch-6.c
new file mode 100644
index 0000000000..5af090d03a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-6.c
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(1)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 1 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-7.c b/gcc/testsuite/gcc.target/s390/hotpatch-7.c
new file mode 100644
index 0000000000..e73a510b4d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-7.c
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(0)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-8.c b/gcc/testsuite/gcc.target/s390/hotpatch-8.c
new file mode 100644
index 0000000000..399aa7260b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-8.c
@@ -0,0 +1,28 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch))
+inline void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch))
+__attribute__ ((always_inline))
+void hp2(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp2' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-not "nopr\t%r7" } } */
+/* { dg-final { scan-assembler-not "nop\t0" } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-9.c b/gcc/testsuite/gcc.target/s390/hotpatch-9.c
new file mode 100644
index 0000000000..5da675866b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-9.c
@@ -0,0 +1,21 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1 --save-temps" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch(2)))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
+
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "nopr\t%r7" 2 } } */
+/* { dg-final { scan-assembler-times "nop\t0" 1 } } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
new file mode 100644
index 0000000000..45a2cc5dc2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-1.c
@@ -0,0 +1,27 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((always_inline))
+void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c
new file mode 100644
index 0000000000..5947f564f5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-2.c
@@ -0,0 +1,27 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch=0" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((always_inline))
+void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c
new file mode 100644
index 0000000000..e0c7f6f52c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-3.c
@@ -0,0 +1,27 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((always_inline))
+void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c
new file mode 100644
index 0000000000..d9f13425ad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-4.c
@@ -0,0 +1,11 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=-1" } */
+
+int main (void)
+{
+ return 0;
+}
+
+/* { dg-excess-errors "argument to '-mhotpatch=' should be a non-negative integer" } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c
new file mode 100644
index 0000000000..53f7eac9e5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-5.c
@@ -0,0 +1,28 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000000" } */
+
+#include <stdio.h>
+
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000000)))
+void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1000001)))
+void hp3(void)
+{ /* { dg-error "requested 'hotpatch' attribute is not a non-negative integer constant or too large .max. 1000000." } */
+ printf("hello, world!\n");
+}
+
+int main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c
new file mode 100644
index 0000000000..cb10b66f0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-6.c
@@ -0,0 +1,11 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -mzarch -mhotpatch=1000001" } */
+
+int main (void)
+{
+ return 0;
+}
+
+/* { dg-excess-errors "argument to '-mhotpatch=' is too large .max. 1000000." } */
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c
new file mode 100644
index 0000000000..98ccb42c00
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-7.c
@@ -0,0 +1,68 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mno-hotpatch" } */
+
+#include <stdio.h>
+
+__attribute__ ((hotpatch))
+void hp1(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch))
+inline void hp2(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch))
+__attribute__ ((always_inline))
+void hp3(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp3' with the 'always_inline' attribute is not hotpatchable" } */
+
+__attribute__ ((hotpatch(0)))
+void hp4(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(0)))
+inline void hp5(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(0)))
+__attribute__ ((always_inline))
+void hp6(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp6' with the 'always_inline' attribute is not hotpatchable" } */
+
+__attribute__ ((hotpatch(1)))
+void hp7(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1)))
+inline void hp8(void)
+{
+ printf("hello, world!\n");
+}
+
+__attribute__ ((hotpatch(1)))
+__attribute__ ((always_inline))
+void hp9(void) /* { dg-warning "always_inline function might not be inlinable" } */
+{
+ printf("hello, world!\n");
+} /* { dg-warning "function 'hp9' with the 'always_inline' attribute is not hotpatchable" } */
+
+int main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c b/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
new file mode 100644
index 0000000000..489fc5dd9f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-compile-8.c
@@ -0,0 +1,23 @@
+/* Functional tests for the function hotpatching feature. */
+
+/* { dg-do run } */
+/* { dg-options "-O3 -mzarch -mhotpatch" } */
+
+#include <stdio.h>
+
+int hp1(void)
+{
+ int nested1(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
+ { return 1; }
+
+ __attribute__ ((hotpatch))
+ int nested2(void) /* { dg-warning "hotpatching is not compatible with nested functions" } */
+ { return 1; }
+
+ return nested1() - nested2();
+}
+
+int main (void)
+{
+ return hp1();
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-1.c b/gcc/testsuite/gcc.target/s390/htm-builtins-1.c
new file mode 100644
index 0000000000..c90490faa5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-1.c
@@ -0,0 +1,1073 @@
+/* Functional tests of the htm __builtin_... macros. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target htm } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+/* ---------------------------- included header files ---------------------- */
+
+#include <stdio.h>
+#include <string.h>
+#include <stdint.h>
+#include <htmintrin.h>
+
+/* ---------------------------- local definitions -------------------------- */
+
+#define DEFAULT_MAX_REPETITIONS 5
+#define DEFAULT_REQUIRED_QUORUM ((DEFAULT_MAX_REPETITIONS) - 1)
+#define NUM_WARMUP_RUNS 10
+
+/* ---------------------------- local macros ------------------------------- */
+
+#define TEST_DF_REP(name) \
+ { #name, name, DEFAULT_MAX_REPETITIONS, DEFAULT_REQUIRED_QUORUM }
+#define TEST_NO_REP(name) { #name, name, 1, 1 }
+
+/* ---------------------------- local types -------------------------------- */
+
+typedef int (*test_func_t)(void);
+
+typedef struct
+{
+ const char *name;
+ test_func_t test_func;
+ int max_repetitions;
+ int required_quorum;
+} test_table_entry_t;
+
+/* ---------------------------- local variables ---------------------------- */
+
+__attribute__ ((aligned(256))) static struct __htm_tdb local_tdb256;
+static struct __htm_tdb local_tdb;
+static int do_dump_tdb = 0;
+
+/* ---------------------------- exported variables (globals) --------------- */
+
+__attribute__ ((aligned(256))) struct
+{
+ float float_1;
+ float float_2;
+ float float_3;
+} global = { 1.0, 2.5, 0.0 };
+
+__attribute__ ((aligned(256))) struct
+{
+ volatile uint64_t c1;
+ volatile uint64_t c2;
+ volatile uint64_t c3;
+} counters = { 0, 0, 0 };
+
+/* ---------------------------- local helper functions --------------------- */
+
+static void dump_tdb (struct __htm_tdb *tdb)
+{
+ unsigned char *p;
+ int i;
+ int j;
+
+ if (do_dump_tdb == 0)
+ {
+ return;
+ }
+ p = (unsigned char *)tdb;
+ for (i = 0; i < 16; i++)
+ {
+ fprintf (stderr, "0x%02x ", i * 16);
+ for (j = 0; j < 16; j++)
+ {
+ fprintf (stderr, "%02x", (int)p[i * 16 + j]);
+ if (j < 15)
+ {
+ fprintf (stderr, " ");
+ }
+ if (j == 7)
+ {
+ fprintf (stderr, " ");
+ }
+ }
+ fprintf (stderr, "\n");
+ }
+
+ return;
+}
+
+/* ---------------------------- local test functions ----------------------- */
+
+/* Check values of the constants defined in htmintrin.h. */
+static int test_constants (void)
+{
+ if (_HTM_TBEGIN_STARTED != 0)
+ {
+ return 100 * _HTM_TBEGIN_STARTED + 1;
+ }
+ if (_HTM_TBEGIN_INDETERMINATE != 1)
+ {
+ return 100 * _HTM_TBEGIN_INDETERMINATE + 2;
+ }
+ if (_HTM_TBEGIN_TRANSIENT != 2)
+ {
+ return 100 * _HTM_TBEGIN_TRANSIENT + 3;
+ }
+ if (_HTM_TBEGIN_PERSISTENT != 3)
+ {
+ return 100 * _HTM_TBEGIN_PERSISTENT + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_ntstg_tend (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ __builtin_non_tx_store ((uint64_t *)&counters.c1, 1);
+ counters.c2 = 2;
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 5;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 2)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ }
+ else
+ {
+ return 100 * rc + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_ntstg_tabort (void)
+{
+ float f;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ f = 0;
+ if (__builtin_tbegin ((void *)0) == 0)
+ {
+ __builtin_non_tx_store ((uint64_t *)&counters.c1, 1);
+ counters.c2 = 2;
+ f = 1;
+ __builtin_tabort (256);
+ return 1;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 0)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (f != 0)
+ {
+ return 100 * f + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_nofloat (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ if ((rc = __builtin_tbegin_nofloat ((void *)0)) == 0)
+ {
+ __builtin_non_tx_store ((uint64_t *)&counters.c1, 1);
+ counters.c2 = 2;
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 5;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 2)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ }
+ else
+ {
+ return 100 * rc + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ counters.c3 = 0;
+ if ((rc = __builtin_tbegin_retry ((void *)0, 5)) == 0)
+ {
+ int do_abort;
+
+ do_abort = (counters.c1 == 0) ? 1 : 0;
+ __builtin_non_tx_store (
+ (uint64_t *)&counters.c1, counters.c1 + 1);
+ if (do_abort == 1)
+ {
+ __builtin_tabort (256);
+ }
+ counters.c2 = counters.c2 + 10;
+ __builtin_non_tx_store ((uint64_t *)&counters.c3, 3);
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 5;
+ }
+ if (counters.c1 != 2)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 10)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (counters.c3 != 3)
+ {
+ return 100 * counters.c3 + 6;
+ }
+ }
+ else
+ {
+ return 100 * rc + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry_nofloat (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ counters.c3 = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat ((void *)0, 5)) == 0)
+ {
+ int do_abort;
+
+ do_abort = (counters.c1 == 0) ? 1 : 0;
+ __builtin_non_tx_store (
+ (uint64_t *)&counters.c1, counters.c1 + 1);
+ if (do_abort == 1)
+ {
+ __builtin_tabort (256);
+ }
+ counters.c2 = counters.c2 + 10;
+ __builtin_non_tx_store ((uint64_t *)&counters.c3, 3);
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 5;
+ }
+ if (counters.c1 != 2)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 10)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (counters.c3 != 3)
+ {
+ return 100 * counters.c3 + 6;
+ }
+ }
+ else
+ {
+ return 100 * rc + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_aborts (void)
+{
+ float f;
+ int rc;
+
+ f = 77;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ f = 88;
+ __builtin_tabort (256);
+ return 2;
+ }
+ else if (rc != 2)
+ {
+ return 3;
+ }
+ if (f != 77)
+ {
+ return 4;
+ }
+ f = 66;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ f = 99;
+ __builtin_tabort (257);
+ return 5;
+ }
+ else if (rc != 3)
+ {
+ return 100 * rc + 6;
+ }
+ if (f != 66)
+ {
+ return 100 * f + 7;
+ }
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ global.float_3 = global.float_1 + global.float_2;
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 8;
+ }
+ }
+ else
+ {
+ return 100 * rc + 9;
+ }
+ if (global.float_3 != global.float_1 + global.float_2)
+ {
+ return 100 * rc + 10;
+ }
+
+ return 0;
+}
+
+static __attribute__((noinline)) void indirect_abort(int abort_code)
+{
+ __builtin_tabort (abort_code);
+
+ return;
+}
+
+static int test_tbegin_indirect_aborts (void)
+{
+ float f;
+ int rc;
+
+ f = 77;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ f = 88;
+ indirect_abort(256);
+ return 2;
+ }
+ else if (rc != 2)
+ {
+ return 100 * rc + 3;
+ }
+ if (f != 77)
+ {
+ return 100 * rc + 4;
+ }
+ f = 66;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ f = 99;
+ indirect_abort(257);
+ return 5;
+ }
+ else if (rc != 3)
+ {
+ return 100 * rc + 6;
+ }
+ if (f != 66)
+ {
+ return 100 * f + 7;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_nofloat_aborts (void)
+{
+ int rc;
+
+ if ((rc = __builtin_tbegin_nofloat ((void *)0)) == 0)
+ {
+ __builtin_tabort (256);
+ return 2;
+ }
+ if ((rc = __builtin_tbegin_nofloat ((void *)0)) == 0)
+ {
+ __builtin_tabort (257);
+ return 1005;
+ }
+ else if (rc != 3)
+ {
+ return 1000 * rc + 6;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_nofloat_indirect_aborts (void)
+{
+ int rc;
+
+ if ((rc = __builtin_tbegin_nofloat ((void *)0)) == 0)
+ {
+ indirect_abort (256);
+ return 2;
+ }
+ if ((rc = __builtin_tbegin_nofloat ((void *)0)) == 0)
+ {
+ indirect_abort (257);
+ return 1005;
+ }
+ else if (rc != 3)
+ {
+ return 1000 * rc + 6;
+ }
+
+ return 0;
+}
+
+static
+int _test_tbegin_retry_aborts (int retries, uint64_t abort_code)
+{
+ int rc;
+
+ counters.c1 = 0;
+ if ((rc = __builtin_tbegin_retry ((void *)0, retries)) == 0)
+ {
+ __builtin_non_tx_store ((uint64_t *)&counters.c1, counters.c1 + 1);
+ __builtin_tabort (abort_code);
+ return 2;
+ }
+ else
+ {
+ if ((abort_code & 1) == 0)
+ {
+ if (rc != 2)
+ {
+ return 100 * rc + 2003;
+ }
+ else if (counters.c1 != (uint64_t)retries + 1)
+ {
+ return 1000 * counters.c1 + 100 * retries + 4;
+ }
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 3005;
+ }
+ else if (counters.c1 != 1)
+ {
+ return 1000 * counters.c1 + 100 * retries + 6;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry_aborts (void)
+{
+ int rc;
+ int retries;
+
+ for (retries = 1; retries <= 3; retries++)
+ {
+ rc = _test_tbegin_retry_aborts (retries, 256);
+ if (rc != 0)
+ {
+ return 10000 + rc;
+ }
+ }
+ for (retries = 1; retries <= 3; retries++)
+ {
+ rc = _test_tbegin_retry_aborts (retries, 257);
+ if (rc != 0)
+ {
+ return 20000 + rc;
+ }
+ }
+ if ((rc = __builtin_tbegin_retry ((void *)0, 5)) == 0)
+ {
+ global.float_3 = global.float_1 + global.float_2;
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 30000 + 100 * rc + 6;
+ }
+ }
+ else
+ {
+ return 30000 + 100 * rc + 7;
+ }
+
+ return 0;
+}
+
+static int _test_tbegin_retry_nofloat_aborts (int retries, uint64_t abort_code)
+{
+ int rc;
+
+ counters.c1 = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat ((void *)0, retries)) == 0)
+ {
+ __builtin_non_tx_store ((uint64_t *)&counters.c1, counters.c1 + 1);
+ __builtin_tabort (abort_code);
+ return 2;
+ }
+ else
+ {
+ if ((abort_code & 1) == 0)
+ {
+ if (rc != 2)
+ {
+ return 100 * rc + 2003;
+ }
+ else if (counters.c1 != (uint64_t)retries + 1)
+ {
+ return 1000 * counters.c1 + 100 * retries + 4;
+ }
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 3005;
+ }
+ else if (counters.c1 != 1)
+ {
+ return 1000 * counters.c1 + 100 * retries + 6;
+ }
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry_nofloat_aborts (void)
+{
+ int rc;
+ int retries;
+
+ for (retries = 1; retries <= 3; retries++)
+ {
+ rc = _test_tbegin_retry_nofloat_aborts (retries, 256);
+ if (rc != 0)
+ {
+ return 10 * retries + rc;
+ }
+ }
+ for (retries = 1; retries <= 3; retries++)
+ {
+ rc = _test_tbegin_retry_nofloat_aborts (retries, 257);
+ if (rc != 0)
+ {
+ return 10000 + 10 * retries + rc;
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_tdb (void)
+{
+ int rc;
+
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin (&local_tdb)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 1;
+ }
+ if (local_tdb.format != 0)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 2;
+ }
+ }
+ else
+ {
+ return 100 * rc + 3;
+ }
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin (&local_tdb)) == 0)
+ {
+ __builtin_tabort (257);
+ return 4;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 5;
+ }
+ if (local_tdb.format != 1)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 6;
+ }
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin (&local_tdb256)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 1100 * rc + 1;
+ }
+ if (local_tdb256.format != 0)
+ {
+ dump_tdb (&local_tdb256);
+ return 1100 * local_tdb256.format + 2;
+ }
+ }
+ else
+ {
+ return 1100 * rc + 3;
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin (&local_tdb256)) == 0)
+ {
+ __builtin_tabort (257);
+ return 2004;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 2100 * rc + 5;
+ }
+ if (local_tdb256.format != 1)
+ {
+ dump_tdb (&local_tdb256);
+ return 2100 * local_tdb256.format + 6;
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_nofloat_tdb (void)
+{
+ int rc;
+
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin_nofloat (&local_tdb)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 1;
+ }
+ if (local_tdb.format != 0)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 2;
+ }
+ }
+ else
+ {
+ return 3;
+ }
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin_nofloat (&local_tdb)) == 0)
+ {
+ __builtin_tabort (257);
+ return 4;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 5;
+ }
+ if (local_tdb.format != 1)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 6;
+ }
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_nofloat (&local_tdb256)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 1100 * rc + 1;
+ }
+ if (local_tdb256.format != 0)
+ {
+ dump_tdb (&local_tdb256);
+ return 1100 * local_tdb256.format + 2;
+ }
+ }
+ else
+ {
+ return 1003;
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_nofloat (&local_tdb256)) == 0)
+ {
+ __builtin_tabort (257);
+ return 2004;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 2100 * rc + 5;
+ }
+ if (local_tdb256.format != 1)
+ {
+ dump_tdb (&local_tdb256);
+ return 2100 * local_tdb256.format + 6;
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry_tdb (void)
+{
+ int rc;
+
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_retry (&local_tdb256, 2)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 1100 * rc + 1;
+ }
+ if (local_tdb256.format != 0)
+ {
+ dump_tdb (&local_tdb256);
+ return 1100 * local_tdb256.format + 2;
+ }
+ }
+ else
+ {
+ return 1003;
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_retry (&local_tdb256, 2)) == 0)
+ {
+ __builtin_tabort (257);
+ return 2004;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 2100 * rc + 5;
+ }
+ if (local_tdb256.format != 1)
+ {
+ dump_tdb (&local_tdb256);
+ return 2100 * local_tdb256.format + 6;
+ }
+ }
+
+ return 0;
+}
+
+static int test_tbegin_retry_nofloat_tdb (void)
+{
+ int rc;
+
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat (&local_tdb, 2)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 100 * rc + 1;
+ }
+ if (local_tdb.format != 0)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 2;
+ }
+ }
+ else
+ {
+ return 100 * rc + 3;
+ }
+ local_tdb.format = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat (&local_tdb, 2)) == 0)
+ {
+ __builtin_tabort (257);
+ return 4;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 5;
+ }
+ if (local_tdb.format != 1)
+ {
+ dump_tdb (&local_tdb);
+ return 100 * local_tdb.format + 6;
+ }
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat (&local_tdb256, 2)) == 0)
+ {
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 1100 * rc + 1;
+ }
+ if (local_tdb256.format != 0)
+ {
+ dump_tdb (&local_tdb256);
+ return 1100 * local_tdb256.format + 2;
+ }
+ }
+ else
+ {
+ return 1100 * rc + 3;
+ }
+ local_tdb256.format = 0;
+ if ((rc = __builtin_tbegin_retry_nofloat (&local_tdb256, 2)) == 0)
+ {
+ __builtin_tabort (257);
+ return 2004;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 2100 * rc + 5;
+ }
+ if (local_tdb256.format != 1)
+ {
+ dump_tdb (&local_tdb256);
+ return 2100 * local_tdb256.format + 6;
+ }
+ }
+
+ return 0;
+}
+
+static int test_etnd (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ counters.c3 = 0;
+ if ((rc = __builtin_tbegin ((void *)0)) == 0)
+ {
+ counters.c1 = __builtin_tx_nesting_depth ();
+ if (__builtin_tbegin ((void *)0) == 0)
+ {
+ counters.c2 = __builtin_tx_nesting_depth ();
+ if (__builtin_tbegin ((void *)0) == 0)
+ {
+ counters.c3 = __builtin_tx_nesting_depth ();
+ __builtin_tend ();
+ }
+ __builtin_tend ();
+ }
+ __builtin_tend ();
+ }
+ else
+ {
+ return 100 * rc + 1;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 2)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (counters.c3 != 3)
+ {
+ return 100 * counters.c3 + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbeginc (void)
+{
+ int rc;
+
+ counters.c1 = 0;
+ __builtin_tbeginc ();
+ counters.c1 = 1;
+ rc = __builtin_tend ();
+ if (rc != 0)
+ {
+ return 10000 * rc + 1;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100000 * counters.c1 + 3;
+ }
+
+ return 0;
+}
+
+/* ---------------------------- local testing framework functions ---------- */
+
+static int run_one_test (const test_table_entry_t *test_entry)
+{
+ int do_print_passes;
+ int succeeded;
+ int rc;
+ int i;
+
+ /* Warmup run to get all necessary data and instruction pages into the page
+ * tables. */
+ {
+ int run;
+
+ do_dump_tdb = 0;
+ for (run = 0; run < NUM_WARMUP_RUNS; run++)
+ {
+ test_entry->test_func ();
+ }
+ do_dump_tdb = 1;
+ }
+ do_print_passes = (
+ test_entry->required_quorum != 1 ||
+ test_entry->max_repetitions != 1);
+ printf ("RRR RUN %s\n", test_entry->name);
+ if (do_print_passes == 1)
+ {
+ printf (
+ " (requires %d successful out of %d runs)\n",
+ test_entry->required_quorum,
+ test_entry->max_repetitions);
+ }
+ succeeded = 0;
+ rc = 0;
+ for (rc = 0, i = 0; i < test_entry->max_repetitions; i++)
+ {
+ if (do_print_passes == 1)
+ {
+ if (i == 0)
+ {
+ printf (" ");
+ }
+ else
+ {
+ printf (",");
+ }
+ }
+ rc = test_entry->test_func ();
+ if (rc == 0)
+ {
+ if (do_print_passes == 1)
+ {
+ printf (" success");
+ }
+ succeeded++;
+ if (succeeded >= test_entry->required_quorum)
+ {
+ break;
+ }
+ }
+ else
+ {
+ printf (" failed (rc = %d)", rc);
+ }
+ }
+ if (do_print_passes == 1 || rc != 0)
+ {
+ printf ("\n");
+ }
+ if (succeeded >= test_entry->required_quorum)
+ {
+ printf ("+++ OK %s\n", test_entry->name);
+
+ return 0;
+ }
+ else
+ {
+ printf ("--- FAIL %s\n", test_entry->name);
+
+ return (rc != 0) ? rc : -1;
+ }
+}
+
+static int run_all_tests (const test_table_entry_t *test_table)
+{
+ const test_table_entry_t *test;
+ int rc;
+
+ for (
+ rc = 0, test = &test_table[0];
+ test->test_func != NULL && rc == 0; test++)
+ {
+ rc = run_one_test (test);
+ }
+
+ return rc;
+}
+
+/* ---------------------------- interface functions ------------------------ */
+
+int main (void)
+{
+ const test_table_entry_t test_table[] = {
+ TEST_NO_REP (test_constants),
+ TEST_DF_REP (test_tbegin_ntstg_tend),
+ TEST_DF_REP (test_tbegin_ntstg_tabort),
+ TEST_DF_REP (test_tbegin_nofloat),
+ TEST_NO_REP (test_tbegin_retry),
+ TEST_NO_REP (test_tbegin_retry_nofloat),
+ TEST_DF_REP (test_tbegin_aborts),
+ TEST_DF_REP (test_tbegin_indirect_aborts),
+ TEST_DF_REP (test_tbegin_nofloat_aborts),
+ TEST_DF_REP (test_tbegin_nofloat_indirect_aborts),
+ TEST_NO_REP (test_tbegin_retry_aborts),
+ TEST_NO_REP (test_tbegin_retry_nofloat_aborts),
+ TEST_DF_REP (test_tbegin_tdb),
+ TEST_DF_REP (test_tbegin_nofloat_tdb),
+ TEST_NO_REP (test_tbegin_retry_tdb),
+ TEST_NO_REP (test_tbegin_retry_nofloat_tdb),
+ TEST_DF_REP (test_etnd),
+ TEST_DF_REP (test_tbeginc),
+ { (void *)0, 0, 0 }
+ };
+
+ {
+ int rc;
+
+ rc = run_all_tests (test_table);
+
+ return rc;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-2.c b/gcc/testsuite/gcc.target/s390/htm-builtins-2.c
new file mode 100644
index 0000000000..15b0d12ae9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-2.c
@@ -0,0 +1,682 @@
+/* Functional tests of the htm __TM_... macros. */
+
+/* { dg-do run } */
+/* { dg-require-effective-target htm } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+/* ---------------------------- included header files ---------------------- */
+
+#include <stdio.h>
+#include <string.h>
+#include <inttypes.h>
+#include <htmxlintrin.h>
+
+/* ---------------------------- local definitions -------------------------- */
+
+#define DEFAULT_MAX_REPETITIONS 5
+#define DEFAULT_REQUIRED_QUORUM ((DEFAULT_MAX_REPETITIONS) - 1)
+#define DEFAULT_ABORT_ADDRESS (0x12345678u)
+
+/* ---------------------------- local macros ------------------------------- */
+
+#define TEST_DF_REP(name) \
+ { #name, name, DEFAULT_MAX_REPETITIONS, DEFAULT_REQUIRED_QUORUM }
+#define TEST_NO_REP(name) { #name, name, 1, 1 }
+
+/* ---------------------------- local types -------------------------------- */
+
+typedef int (*test_func_t)(void);
+
+typedef struct
+{
+ const char *name;
+ test_func_t test_func;
+ int max_repetitions;
+ int required_quorum;
+} test_table_entry_t;
+
+typedef enum
+{
+ ABORT_T_SYSTEM = 0,
+ ABORT_T_USER = 1,
+} abort_user_t;
+
+typedef enum
+{
+ ABORT_T_NONE = 0,
+ ABORT_T_ILLEGAL,
+ ABORT_T_FOOTPRINT_EXCEEDED,
+ ABORT_T_NESTED_TOO_DEEP,
+ ABORT_T_CONFLICT,
+
+ ABORT_T_INVALID_ABORT_CODE
+} abort_t;
+
+/* ---------------------------- local variables ---------------------------- */
+
+__attribute__ ((aligned(256))) static struct __htm_tdb local_tdb256;
+static struct __htm_tdb local_tdb;
+
+static abort_t const abort_classes[] =
+{
+ ABORT_T_INVALID_ABORT_CODE,
+ ABORT_T_NONE,
+ ABORT_T_NONE,
+ ABORT_T_NONE,
+
+ ABORT_T_ILLEGAL,
+ ABORT_T_NONE,
+ ABORT_T_NONE,
+ ABORT_T_FOOTPRINT_EXCEEDED,
+
+ ABORT_T_FOOTPRINT_EXCEEDED,
+ ABORT_T_CONFLICT,
+ ABORT_T_CONFLICT,
+ ABORT_T_ILLEGAL,
+
+ ABORT_T_NONE,
+ ABORT_T_NESTED_TOO_DEEP,
+ ABORT_T_NONE,
+ ABORT_T_NONE,
+
+ ABORT_T_NONE
+};
+
+static size_t num_abort_classes = sizeof(abort_classes) / sizeof(abort_t);
+
+/* ---------------------------- exported variables (globals) --------------- */
+
+int global_int = 0;
+uint64_t global_u64 = 0;
+float global_float_1 = 1.0;
+float global_float_2 = 2.5;
+float global_float_3 = 0.0;
+__attribute__ ((aligned(256))) struct
+{
+ volatile uint64_t c1;
+ volatile uint64_t c2;
+ volatile uint64_t c3;
+} counters = { 0, 0, 0 };
+
+/* ---------------------------- local helper functions --------------------- */
+
+static void dump_tdb(struct __htm_tdb *tdb)
+{
+ unsigned char *p;
+ int i;
+ int j;
+
+ p = (unsigned char *)tdb;
+ for (i = 0; i < 16; i++)
+ {
+ fprintf(stderr, "0x%02x ", i * 16);
+ for (j = 0; j < 16; j++)
+ {
+ fprintf(stderr, "%02x", (int)p[i * 16 + j]);
+ if (j < 15)
+ {
+ fprintf(stderr, " ");
+ }
+ if (j == 7)
+ {
+ fprintf(stderr, " ");
+ }
+ }
+ fprintf(stderr, "\n");
+ }
+
+ return;
+}
+
+static void make_fake_tdb(struct __htm_tdb *tdb)
+{
+ memset(tdb, 0, sizeof(*tdb));
+ tdb->format = 1;
+ tdb->nesting_depth = 1;
+ tdb->atia = DEFAULT_ABORT_ADDRESS;
+ tdb->abort_code = 11;
+
+ return;
+}
+
+static int check_abort_code_in_tdb(struct __htm_tdb *tdb, uint64_t abort_code)
+{
+ long expect_rc;
+ long rc;
+
+ if (abort_code != 0)
+ {
+ long addr;
+
+ addr = __TM_failure_address(&local_tdb);
+ if (addr != DEFAULT_ABORT_ADDRESS)
+ {
+ return 11;
+ }
+ }
+ {
+ long long tdb_abort_code;
+
+ tdb_abort_code = __TM_failure_code(tdb);
+ if ((uint64_t)tdb_abort_code != abort_code)
+ {
+ fprintf(
+ stderr, "tm_ac %" PRIu64 ", ac %" PRIu64
+ ", tdb_ac %" PRIu64 "\n",
+ (uint64_t)tdb_abort_code, abort_code,
+ (uint64_t)tdb->abort_code);
+ return 10;
+ }
+ }
+ expect_rc = (abort_code >= 256) ? 1 : 0;
+ rc = __TM_is_user_abort(tdb);
+ if (rc != expect_rc)
+ {
+ fprintf(stderr, "rc %ld, expect_rc %ld\n", rc, expect_rc);
+ return 1;
+ }
+ {
+ unsigned char code;
+
+ code = 0xffu;
+ rc = __TM_is_named_user_abort(tdb, &code);
+ if (rc != expect_rc)
+ {
+ fprintf(
+ stderr, "rc %ld, expect_rc %ld\n", rc,
+ expect_rc);
+ return 2;
+ }
+ if (expect_rc == 1 && code != abort_code - 256)
+ {
+ return 3;
+ }
+ }
+ if (abort_code > (uint64_t)num_abort_classes)
+ {
+ abort_code = (uint64_t)num_abort_classes;
+ }
+ expect_rc = (abort_classes[abort_code] == ABORT_T_ILLEGAL) ? 1 : 0;
+ rc = __TM_is_illegal(tdb);
+ if (rc != expect_rc)
+ {
+ dump_tdb(tdb);
+ fprintf(stderr, "rc %ld, expect_rc %ld\n", rc, expect_rc);
+ return 4;
+ }
+ expect_rc =
+ (abort_classes[abort_code] == ABORT_T_FOOTPRINT_EXCEEDED) ?
+ 1 : 0;
+ rc = __TM_is_footprint_exceeded(tdb);
+ if (rc != expect_rc)
+ {
+ dump_tdb(tdb);
+ fprintf(stderr, "rc %ld, expect_rc %ld\n", rc, expect_rc);
+ return 5;
+ }
+ expect_rc =
+ (abort_classes[abort_code] == ABORT_T_NESTED_TOO_DEEP) ? 1 : 0;
+ rc = __TM_is_nested_too_deep(tdb);
+ if (rc != expect_rc)
+ {
+ dump_tdb(tdb);
+ fprintf(stderr, "rc %ld, expect_rc %ld\n", rc, expect_rc);
+ return 6;
+ }
+ expect_rc = (abort_classes[abort_code] == ABORT_T_CONFLICT) ? 1 : 0;
+ rc = __TM_is_conflict(tdb);
+ if (rc != expect_rc)
+ {
+ dump_tdb(tdb);
+ fprintf(stderr, "rc %ld, expect_rc %ld\n", rc, expect_rc);
+ return 7;
+ }
+
+ return 0;
+}
+
+/* ---------------------------- local test functions ----------------------- */
+
+/* Not a test; make sure that the involved global cachelines are reserved for
+ * writing. */
+static int init_cache(void)
+{
+ make_fake_tdb(&local_tdb);
+ make_fake_tdb(&local_tdb256);
+ global_int = 0;
+ global_u64 = 0;
+ global_float_1 = 1.0;
+ global_float_2 = 2.5;
+ global_float_3 = 0.0;
+ counters.c1 = 0;
+ counters.c2 = 0;
+ counters.c3 = 0;
+
+ return 0;
+}
+
+static int test_abort_classification(void)
+{
+ int i;
+
+ make_fake_tdb(&local_tdb);
+ for (i = 0; i <= 256; i++)
+ {
+ int rc;
+
+ local_tdb.abort_code = (uint64_t)i;
+ rc = check_abort_code_in_tdb(&local_tdb, (uint64_t)i);
+ if (rc != 0)
+ {
+ return 100 * i + rc;
+ }
+ }
+
+ return 0;
+}
+
+static int test_cc_classification(void)
+{
+ long rc;
+
+ rc = __TM_is_failure_persistent(0);
+ if (rc != 0)
+ {
+ return 1;
+ }
+ rc = __TM_is_failure_persistent(1);
+ if (rc != 0)
+ {
+ return 2;
+ }
+ rc = __TM_is_failure_persistent(2);
+ if (rc != 0)
+ {
+ return 3;
+ }
+ rc = __TM_is_failure_persistent(3);
+ if (rc != 1)
+ {
+ return 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_ntstg_tend(void)
+{
+ long rc;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ if ((rc = __TM_simple_begin()) == 0)
+ {
+ __TM_non_transactional_store((uint64_t *)&counters.c1, 1);
+ counters.c2 = 2;
+ rc = __TM_end();
+ if (rc != 0)
+ {
+ return 100 * rc + 5;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 2)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ }
+ else
+ {
+ return 100 * rc + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_ntstg_tabort(void)
+{
+ register float f;
+
+ counters.c1 = 0;
+ counters.c2 = 0;
+ f = 0;
+ if (__TM_simple_begin() == 0)
+ {
+ __TM_non_transactional_store((uint64_t *)&counters.c1, 1);
+ counters.c2 = 2;
+ f = 1;
+ __TM_named_abort(0);
+ return 1;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 0)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (f != 0)
+ {
+ return 100 * f + 4;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_aborts(void)
+{
+ float f;
+ long rc;
+
+ f = 77;
+ if ((rc = __TM_simple_begin()) == 0)
+ {
+ f = 88;
+ __TM_abort();
+ return 2;
+ }
+ else if (rc != 2)
+ {
+ return 3;
+ }
+ if (f != 77)
+ {
+ return 4;
+ }
+ f = 66;
+ if ((rc = __TM_simple_begin()) == 0)
+ {
+ f = 99;
+ __TM_named_abort(3);
+ return 5;
+ }
+ else if (rc != 3)
+ {
+ return 100 * rc + 6;
+ }
+ if (f != 66)
+ {
+ return 100 * f + 7;
+ }
+ if ((rc = __TM_simple_begin()) == 0)
+ {
+ global_float_3 = global_float_1 + global_float_2;
+ rc = __TM_end();
+ if (rc != 0)
+ {
+ return 100 * rc + 8;
+ }
+ }
+ else
+ {
+ return 100 * rc + 9;
+ }
+ if (global_float_3 != global_float_1 + global_float_2)
+ {
+ return 100 * rc + 10;
+ }
+
+ return 0;
+}
+
+static int test_tbegin_tdb(void)
+{
+ long rc;
+
+ local_tdb.format = 0;
+ if ((rc = __TM_begin(&local_tdb)) == 0)
+ {
+ rc = __TM_end();
+ if (rc != 0)
+ {
+ return 100 * rc + 1;
+ }
+ if (local_tdb.format != 0)
+ {
+ dump_tdb(&local_tdb);
+ return 100 * local_tdb.format + 2;
+ }
+ }
+ else
+ {
+ return 100 * rc + 3;
+ }
+ local_tdb.format = 0;
+ if ((rc = __TM_begin(&local_tdb)) == 0)
+ {
+ __TM_named_abort(1);
+ return 4;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 100 * rc + 5;
+ }
+ if (local_tdb.format != 1)
+ {
+ dump_tdb(&local_tdb);
+ return 100 * local_tdb.format + 6;
+ }
+ }
+ local_tdb256.format = 0;
+ if ((rc = __TM_begin(&local_tdb256)) == 0)
+ {
+ rc = __TM_end();
+ if (rc != 0)
+ {
+ return 1100 * rc + 1;
+ }
+ if (local_tdb256.format != 0)
+ {
+ dump_tdb(&local_tdb256);
+ return 1100 * local_tdb256.format + 2;
+ }
+ }
+ else
+ {
+ return 1100 * rc + 3;
+ }
+#if 1 /*!!!does not work*/
+ local_tdb256.format = 0;
+ if ((rc = __TM_begin(&local_tdb256)) == 0)
+ {
+ __TM_named_abort(1);
+ return 2004;
+ }
+ else
+ {
+ if (rc != 3)
+ {
+ return 2100 * rc + 5;
+ }
+ if (local_tdb256.format != 1)
+ {
+ dump_tdb(&local_tdb256);
+ return 2100 * local_tdb256.format + 6;
+ }
+ }
+#endif
+
+ return 0;
+}
+
+static int test_etnd(void)
+{
+ long rc;
+
+ {
+ long nd;
+
+ make_fake_tdb(&local_tdb);
+ local_tdb.nesting_depth = 0;
+ nd = __TM_nesting_depth(&local_tdb);
+ if (nd != 0)
+ {
+ return 1;
+ }
+ local_tdb.nesting_depth = 7;
+ nd = __TM_nesting_depth(&local_tdb);
+ if (nd != 7)
+ {
+ return 7;
+ }
+ local_tdb.format = 0;
+ nd = __TM_nesting_depth(&local_tdb);
+ if (nd != 0)
+ {
+ return 2;
+ }
+ }
+ counters.c1 = 0;
+ counters.c1 = 0;
+ counters.c2 = 0;
+ counters.c3 = 0;
+ if ((rc = __TM_simple_begin()) == 0)
+ {
+ counters.c1 = __TM_nesting_depth(0);
+ if (__TM_simple_begin() == 0)
+ {
+ counters.c2 = __TM_nesting_depth(0);
+ if (__TM_simple_begin() == 0)
+ {
+ counters.c3 = __TM_nesting_depth(0);
+ __TM_end();
+ }
+ __TM_end();
+ }
+ __TM_end();
+ }
+ else
+ {
+ return 100 * rc + 1;
+ }
+ if (counters.c1 != 1)
+ {
+ return 100 * counters.c1 + 2;
+ }
+ if (counters.c2 != 2)
+ {
+ return 100 * counters.c2 + 3;
+ }
+ if (counters.c3 != 3)
+ {
+ return 100 * counters.c3 + 4;
+ }
+
+ return 0;
+}
+
+/* ---------------------------- local testing framework functions ---------- */
+
+static int run_one_test(const test_table_entry_t *test_entry)
+{
+ int do_print_passes;
+ int succeeded;
+ int rc;
+ int i;
+
+ do_print_passes = (
+ test_entry->required_quorum != 1 ||
+ test_entry->max_repetitions != 1);
+ printf("RRR RUN %s\n", test_entry->name);
+ if (do_print_passes == 1)
+ {
+ printf(
+ " (requires %d successful out of %d runs)\n",
+ test_entry->required_quorum,
+ test_entry->max_repetitions);
+ }
+ succeeded = 0;
+ rc = 0;
+ for (rc = 0, i = 0; i < test_entry->max_repetitions; i++)
+ {
+ if (do_print_passes == 1)
+ {
+ if (i == 0)
+ {
+ printf(" ");
+ }
+ else
+ {
+ printf(",");
+ }
+ }
+ rc = test_entry->test_func();
+ if (rc == 0)
+ {
+ if (do_print_passes == 1)
+ {
+ printf(" success");
+ }
+ succeeded++;
+ if (succeeded >= test_entry->required_quorum)
+ {
+ break;
+ }
+ }
+ else
+ {
+ printf(" failed (rc = %d)", rc);
+ }
+ }
+ if (do_print_passes == 1 || rc != 0)
+ {
+ printf("\n");
+ }
+ if (succeeded >= test_entry->required_quorum)
+ {
+ printf("+++ OK %s\n", test_entry->name);
+
+ return 0;
+ }
+ else
+ {
+ printf("--- FAIL %s\n", test_entry->name);
+
+ return (rc != 0) ? rc : -1;
+ }
+}
+
+static int run_all_tests(const test_table_entry_t *test_table)
+{
+ const test_table_entry_t *test;
+ int rc;
+
+ for (
+ rc = 0, test = &test_table[0];
+ test->test_func != NULL && rc == 0; test++)
+ {
+ rc = run_one_test(test);
+ }
+
+ return rc;
+}
+
+/* ---------------------------- interface functions ------------------------ */
+
+int main(void)
+{
+ const test_table_entry_t test_table[] = {
+ TEST_NO_REP(init_cache),
+ TEST_NO_REP(test_abort_classification),
+ TEST_NO_REP(test_cc_classification),
+ TEST_DF_REP(test_tbegin_ntstg_tend),
+ TEST_DF_REP(test_tbegin_ntstg_tabort),
+ TEST_DF_REP(test_tbegin_aborts),
+ TEST_DF_REP(test_tbegin_tdb),
+ TEST_DF_REP(test_etnd),
+ { (void *)0, 0, 0 }
+ };
+
+ {
+ int rc;
+
+ rc = run_all_tests(test_table);
+
+ return rc;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c
new file mode 100644
index 0000000000..982a7483db
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-1.c
@@ -0,0 +1,164 @@
+/* This checks the availability of the low-level builtins introduced
+ for transactional execution. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+#include <stdint.h>
+#include <htmintrin.h>
+
+int global = 0;
+uint64_t g;
+struct __htm_tdb global_tdb;
+
+int
+foo (struct __htm_tdb* tdb, int reg, int *mem, uint64_t *mem64)
+{
+
+ int cc;
+ int n;
+
+ __builtin_tbegin ((void *)0);
+ __builtin_tbegin ((void *)-99999);
+ __builtin_tbegin ((void *)99999);
+ while (__builtin_tbegin ((void *)0) != 0)
+ {
+ }
+ cc = __builtin_tbegin ((void *)0x12345678);
+ cc = __builtin_tbegin (tdb);
+ cc = __builtin_tbegin (&global_tdb);
+ cc = __builtin_tbegin ((void *)(long)(reg + 0x12345678));
+ cc = __builtin_tbegin ((void *)(long)(reg));
+
+ __builtin_tbegin_nofloat ((void *)0);
+ __builtin_tbegin_nofloat ((void *)-99999);
+ __builtin_tbegin_nofloat ((void *)99999);
+ cc = __builtin_tbegin_nofloat ((void *)0x12345678);
+ cc = __builtin_tbegin_nofloat (tdb);
+ cc = __builtin_tbegin_nofloat (&global_tdb);
+ cc = __builtin_tbegin_nofloat ((void *)(long)(reg + 0x12345678));
+ cc = __builtin_tbegin_nofloat ((void *)(long)(reg));
+
+ __builtin_tbegin_retry ((void *)0, 0);
+ cc = __builtin_tbegin_retry ((void *)0, 1);
+ cc = __builtin_tbegin_retry ((void *)0, -1);
+ cc = __builtin_tbegin_retry ((void *)0, 42);
+ cc = __builtin_tbegin_retry ((void *)0, reg);
+ cc = __builtin_tbegin_retry ((void *)0, *mem);
+ cc = __builtin_tbegin_retry ((void *)0, global);
+ cc = __builtin_tbegin_retry (tdb, 42);
+ cc = __builtin_tbegin_retry (&global_tdb, 42);
+ cc = __builtin_tbegin_retry ((void *)0x12345678, global);
+ cc = __builtin_tbegin_retry (
+ (void *)(long) (reg + 0x12345678), global + 1);
+ cc = __builtin_tbegin_retry (
+ (void *)(long)(reg), global - 1);
+
+ __builtin_tbegin_retry_nofloat ((void *)0, 0);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, 1);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, -1);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, 42);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, reg);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, *mem);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0, global);
+ cc = __builtin_tbegin_retry_nofloat (tdb, 42);
+ cc = __builtin_tbegin_retry_nofloat (&global_tdb, 42);
+ cc = __builtin_tbegin_retry_nofloat ((void *)0x12345678, global);
+ cc = __builtin_tbegin_retry_nofloat (
+ (void *)(long) (reg + 0x12345678), global + 1);
+ cc = __builtin_tbegin_retry_nofloat (
+ (void *)(long)(reg), global - 1);
+
+ __builtin_tbeginc ();
+
+ __builtin_tx_nesting_depth ();
+ n = __builtin_tx_nesting_depth ();
+
+ __builtin_non_tx_store (mem64, 0);
+ {
+ const uint64_t val_var = 0x1122334455667788;
+
+ __builtin_non_tx_store (mem64, val_var);
+ }
+ __builtin_non_tx_store (mem64, (uint64_t)reg);
+ __builtin_non_tx_store (mem64, g);
+ __builtin_non_tx_store ((uint64_t *)0, 0);
+ __builtin_non_tx_store ((uint64_t *)0x12345678, 0);
+ __builtin_non_tx_store (&g, 23);
+ __builtin_non_tx_store (&g, reg);
+ __builtin_non_tx_store (&g, *mem);
+ __builtin_non_tx_store (&g, global);
+
+ __builtin_tend();
+
+ __builtin_tx_assist (0);
+ __builtin_tx_assist (1);
+ __builtin_tx_assist (reg);
+ __builtin_tx_assist (*mem);
+ __builtin_tx_assist (global);
+}
+
+/* The taborts must go into separate function since they are
+ "noreturn". */
+
+void
+tabort1 ()
+{
+ __builtin_tabort (256);
+}
+
+void
+tabort2 (int reg)
+{
+ __builtin_tabort (reg);
+}
+
+void
+tabort3 (int reg)
+{
+ /* { dg-final { scan-assembler-times "tabort\t255" 1 } } */
+ __builtin_tabort (reg + 255);
+}
+
+void
+tabort4 (int *mem)
+{
+ __builtin_tabort (*mem);
+}
+
+void
+tabort5 ()
+{
+ __builtin_tabort (global);
+}
+
+void
+tabort6 (int *mem)
+{
+ /* Here global + 255 gets reloaded into a reg. Better would be to
+ just reload global or *mem and get the +255 for free as address
+ arithmetic. */
+ __builtin_tabort (*mem + 255);
+}
+
+void
+tabort7 ()
+{
+ __builtin_tabort (global + 255);
+}
+
+void
+tabort8 ()
+{
+ __builtin_tabort (-1);
+}
+
+
+/* Make sure the tdb NULL argument ends up as immediate value in the
+ instruction. */
+/* { dg-final { scan-assembler-times "tbegin\t0," 17 } } */
+/* { dg-final { scan-assembler-times "tbegin\t" 41 } } */
+/* Check number of occurences of certain instructions. */
+/* { dg-final { scan-assembler-times "tbeginc\t" 1 } } */
+/* { dg-final { scan-assembler-times "tabort\t" 8 } } */
+/* { dg-final { scan-assembler "ppa\t" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-2.c b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-2.c
new file mode 100644
index 0000000000..67d76a6d3d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-2.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+void must_not_compile1 (void)
+{
+ __builtin_tabort (0); /* { dg-error "Invalid transaction abort code:" } */
+}
+
+void must_not_compile2 (void)
+{
+ __builtin_tabort (255); /* { dg-error "Invalid transaction abort code:" } */
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c
new file mode 100644
index 0000000000..77ceeb7706
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-builtins-compile-3.c
@@ -0,0 +1,37 @@
+/* This checks the availability of the XL compiler intrinsics for
+ transactional execution with the expected prototypes. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+#include <htmxlintrin.h>
+
+int a = 0;
+unsigned long g;
+
+int
+foo ()
+{
+ struct __htm_tdb *tdb_struct;
+ void * const tdb = tdb_struct;
+ long result;
+ unsigned char code;
+
+ result = __TM_simple_begin ();
+ result = __TM_begin (tdb);
+ result = __TM_end ();
+ __TM_abort ();
+ __TM_named_abort (42);
+ __TM_non_transactional_store (&g, 42);
+ result = __TM_nesting_depth (tdb);
+
+ result = __TM_is_user_abort (tdb);
+ result = __TM_is_named_user_abort (tdb, &code);
+ result = __TM_is_illegal (tdb);
+ result = __TM_is_footprint_exceeded (tdb);
+ result = __TM_is_nested_too_deep (tdb);
+ result = __TM_is_conflict (tdb);
+ result = __TM_is_failure_persistent (result);
+ result = __TM_failure_address (tdb);
+ result = __TM_failure_code (tdb);
+}
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
new file mode 100644
index 0000000000..6022efb97f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-1.c
@@ -0,0 +1,50 @@
+/* { dg-do run } */
+/* { dg-require-effective-target htm } */
+/* { dg-options "-O3 -march=zEC12 -mzarch --save-temps" } */
+
+/* __builtin_tbegin has to emit clobbers for all FPRs since the tbegin
+ instruction does not automatically preserves them. If the
+ transaction body is fully contained in a function the backend tries
+ after reload to get rid of the FPR save/restore operations
+ triggered by the clobbers. This testcase failed since the backend
+ was able to get rid of all FPR saves/restores and since these were
+ the only stack operations also of the entire stack space. So even
+ the save/restore of the stack pointer was omitted in the end.
+ However, since the frame layout has been fixed before, the prologue
+ still generated the stack pointer decrement making foo return with
+ a modified stack pointer. */
+
+void abort(void);
+
+void __attribute__((noinline))
+foo (int a)
+{
+ if (__builtin_tbegin (0) == 0)
+ __builtin_tend ();
+}
+
+#ifdef __s390x__
+#define GET_STACK_POINTER(SP) \
+ asm volatile ("stg %%r15, %0" : "=QRST" (SP));
+#else
+#define GET_STACK_POINTER(SP) \
+ asm volatile ("st %%r15, %0" : "=QR" (SP));
+#endif
+
+int main(void)
+{
+ unsigned long new_sp, old_sp;
+
+ GET_STACK_POINTER (old_sp);
+ foo(42);
+ GET_STACK_POINTER (new_sp);
+
+ if (old_sp != new_sp)
+ abort ();
+
+ return 0;
+}
+
+/* Make sure no FPR saves/restores are emitted. */
+/* { dg-final { scan-assembler-not "\tstd\t" } } */
+/* { dg-final { scan-assembler-not "\tld\t" } } */
diff --git a/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c b/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c
new file mode 100644
index 0000000000..df7e2bac87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/htm-nofloat-compile-1.c
@@ -0,0 +1,12 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=zEC12 -mzarch" } */
+
+int
+foo ()
+{
+ __builtin_tbegin_nofloat (0);
+ __builtin_tbegin_retry_nofloat (0, 42);
+}
+/* Make sure no FPR saves/restores are emitted. */
+/* { dg-final { scan-assembler-not "std" } } */
+/* { dg-final { scan-assembler-not "ld" } } */
diff --git a/gcc/testsuite/gcc.target/s390/nearestint-1.c b/gcc/testsuite/gcc.target/s390/nearestint-1.c
new file mode 100644
index 0000000000..1d9a753b3e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/nearestint-1.c
@@ -0,0 +1,48 @@
+/* Since z196 the nearest integer functions can be expanded to single
+ instructions. */
+
+/* { dg-do compile } */
+/* { dg-options "-O3 -march=z196 -mzarch" } */
+
+extern float ceilf (float x);
+extern double ceil (double x);
+extern long double ceill (long double x);
+extern float floorf (float x);
+extern double floor (double x);
+extern long double floorl (long double x);
+extern float truncf (float x);
+extern double trunc (double x);
+extern long double truncl (long double x);
+extern float nearbyintf (float x);
+extern double nearbyint (double x);
+extern long double nearbyintl (long double x);
+extern float rintf (float x);
+extern double rint (double x);
+extern long double rintl (long double x);
+
+float my_ceilf (float x) { return ceilf (x); }
+double my_ceil (double x) { return ceil (x); }
+long double my_ceill (long double x) { return ceill (x); }
+
+float my_floorf (float x) { return floorf (x); }
+double my_floor (double x) { return floor (x); }
+long double my_floorl (long double x) { return floorl (x); }
+
+float my_truncf (float x) { return truncf (x); }
+double my_trunc (double x) { return trunc (x); }
+long double my_truncl (long double x) { return truncl (x); }
+
+float my_nearbyintf (float x) { return nearbyintf (x); }
+double my_nearbyint (double x) { return nearbyint (x); }
+long double my_nearbyintl (long double x) { return nearbyintl (x); }
+
+float my_rintf (float x) { return rintf (x); }
+double my_rint (double x) { return rint (x); }
+long double my_rintl (long double x) { return rintl (x); }
+
+/* { dg-final { scan-assembler-times "fiebr\t" 1 } } */
+/* { dg-final { scan-assembler-times "fidbr\t" 1 } } */
+/* { dg-final { scan-assembler-times "fixbr\t" 1 } } */
+/* { dg-final { scan-assembler-times "fiebra\t" 4 } } */
+/* { dg-final { scan-assembler-times "fidbra\t" 4 } } */
+/* { dg-final { scan-assembler-times "fixbra\t" 4 } } */
diff --git a/gcc/testsuite/gcc.target/s390/pr55718.c b/gcc/testsuite/gcc.target/s390/pr55718.c
new file mode 100644
index 0000000000..a82d435229
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr55718.c
@@ -0,0 +1,29 @@
+/* PR target/55717 */
+
+/* { dg-do compile } */
+/* { dg-options "-O2 -march=z10 -fPIC" } */
+
+extern char temp[];
+short ansi_value[256];
+void terminal_state(void)
+{
+ static const char *puc[] = { "", "<", "=", ">", "?", 0};
+ int i, j, k, l, modes_found;
+ char buf[256];
+ k = (int) __builtin_strlen(temp);
+ for (j = l = 0; j < 255 && j - l < 50; j++)
+ {
+ __builtin_sprintf(temp, "\033[%s%d$p", puc[i], j);
+ if (ansi_value[1])
+ {
+ l = j;
+ buf[k] = '\0';
+ put_crlf();
+ ptextln(buf);
+ buf[k++] = ' ';
+ k = (int) __builtin_strlen(temp);
+ }
+ }
+ for (i = j = 0; j < modes_found; j = ++i >> 1)
+ ;
+}
diff --git a/gcc/testsuite/gcc.target/s390/pr57559.c b/gcc/testsuite/gcc.target/s390/pr57559.c
new file mode 100644
index 0000000000..15c3878c4c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr57559.c
@@ -0,0 +1,24 @@
+/* PR rtl-optimization/57559 */
+
+/* { dg-do compile } */
+/* { dg-options "-march=z10 -m64 -mzarch -O1" } */
+
+typedef int int32_t;
+typedef unsigned char uint8_t;
+typedef unsigned int uint32_t;
+struct _IO_marker
+{
+};
+static const int32_t mfcone = 1;
+static const uint8_t *mfctop = (const uint8_t *) &mfcone;
+int32_t
+decContextTestEndian (uint8_t quiet)
+{
+ int32_t res = 0;
+ uint32_t dle = (uint32_t) 0;
+ if (*(int *) 10 != 0)
+ {
+ res = (int32_t) * mfctop - dle;
+ }
+ return res;
+}
diff --git a/gcc/testsuite/gcc.target/s390/pr57960.c b/gcc/testsuite/gcc.target/s390/pr57960.c
new file mode 100644
index 0000000000..ee751edc84
--- /dev/null
+++ b/gcc/testsuite/gcc.target/s390/pr57960.c
@@ -0,0 +1,30 @@
+/* PR rtl-optimization/57960 */
+
+/* { dg-do compile } */
+/* { dg-options "-march=z10 -m64 -mzarch -O1" } */
+
+typedef union
+{
+ long double value;
+ struct
+ {
+ unsigned int w0, w1, w2, w3;
+ }
+ parts32;
+}
+ ieee854_long_double_shape_type;
+static const long double one = 1.0L;
+long double
+__ieee754_acosl (long double x)
+{
+ long double z, w;
+ int ix;
+ ieee854_long_double_shape_type u;
+
+ z = (one - u.value) * 0.5;
+ u.parts32.w2 = 0;
+ u.parts32.w3 = 0;
+ w = z - u.value * u.value;
+ return 2.0 * w;
+
+}
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index d693309861..f2ba929861 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -24,6 +24,19 @@ if ![istarget s390*-*-*] then {
# Load support procs.
load_lib gcc-dg.exp
+# Return 1 if htm (etnd - extract nesting depth) instructions are
+# understood by the assembler and can be executed.
+proc check_effective_target_htm { } {
+ if { ![check_runtime s390_check_htm [subst {
+ int main (void)
+ {
+ unsigned int nd;
+ asm ("etnd %0" : "=d" (nd));
+ return nd;
+ }
+ }] "-march=zEC12 -mzarch" ] } { return 0 } else { return 1 }
+}
+
# If a testcase doesn't have special options, use these.
global DEFAULT_CFLAGS
if ![info exists DEFAULT_CFLAGS] then {
diff --git a/gcc/testsuite/gcc.target/sh/20080410-1.c b/gcc/testsuite/gcc.target/sh/20080410-1.c
index 63e517e94d..c398674c2a 100644
--- a/gcc/testsuite/gcc.target/sh/20080410-1.c
+++ b/gcc/testsuite/gcc.target/sh/20080410-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target "sh-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O0" } */
/* { dg-skip-if "" { "sh*-*-*" } "-mb" "" } */
/* { dg-final { scan-assembler-not "add\tr0,r0" } } */
diff --git a/gcc/testsuite/gcc.target/sh/attr-isr-nosave_low_regs.c b/gcc/testsuite/gcc.target/sh/attr-isr-nosave_low_regs.c
new file mode 100644
index 0000000000..2f1d518014
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/attr-isr-nosave_low_regs.c
@@ -0,0 +1,32 @@
+/* A call will clobber all call-saved registers.
+ If #pragma nosave_low_regs is specified, do not save/restore r0..r7.
+ (On SH3* and SH4* r0..r7 are banked)
+ One of these registers will also do fine to hold the function address.
+ Call-saved registers r8..r13 also don't need to be restored. */
+/* { dg-do compile { target { { "sh*-*-*" } && nonpic } } } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1*" "-m2*" "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+/* { dg-final { scan-assembler-not "\[^f\]r\[0-9\]\[ \t\]*," } } */
+/* { dg-final { scan-assembler-not "\[^f\]r\[89\]" } } */
+/* { dg-final { scan-assembler-not "\[^f\]r1\[,0-3\]" } } */
+/* { dg-final { scan-assembler-times "macl" 2 } } */
+
+extern void bar (void);
+
+void
+foo (void)
+{
+}
+
+#pragma interrupt
+void
+( __attribute__ ((nosave_low_regs)) isr) (void)
+{
+ bar ();
+}
+
+void
+delay (int a)
+{
+}
diff --git a/gcc/testsuite/gcc.target/sh/attr-isr-trap_exit.c b/gcc/testsuite/gcc.target/sh/attr-isr-trap_exit.c
new file mode 100644
index 0000000000..a45e92f8c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/attr-isr-trap_exit.c
@@ -0,0 +1,31 @@
+/* Check that trapa / interrput_handler attributes can paired in
+ either order. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler "trapa\[ \t\]\[ \t\]*#4"} } */
+/* { dg-final { scan-assembler-times "trapa" 1 } } */
+
+void h0 (void) __attribute__ ((trap_exit (4))) __attribute__ ((interrupt_handler));
+void h1 (void) __attribute__ ((interrupt_handler)) __attribute__ ((trap_exit (5)));
+
+void
+foo (void)
+{
+}
+
+void
+h0 (void)
+{
+}
+
+void delay
+(int a)
+{
+}
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/attr-isr-trapa.c b/gcc/testsuite/gcc.target/sh/attr-isr-trapa.c
new file mode 100644
index 0000000000..e1bc8a4af6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/attr-isr-trapa.c
@@ -0,0 +1,18 @@
+/* Check that no interrupt-specific register saves are generated. */
+/* { dg-do compile { target { { "sh*-*-*" } && nonpic } } } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+/* { dg-final { scan-assembler-not "r\[0-7\]\[ \t,\]\[^\n\]*r15" } } */
+/* { dg-final { scan-assembler-not "@r15\[^\n\]*r\[0-7\]\n" } } */
+/* { dg-final { scan-assembler-not "r\[8-9\]" } } */
+/* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
+/* { dg-final { scan-assembler-not "macl" } } */
+
+extern void foo (void);
+
+void
+(__attribute__ ((trapa_handler)) isr) (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/sh/cmpstr.c b/gcc/testsuite/gcc.target/sh/cmpstr.c
new file mode 100644
index 0000000000..4d638cc3e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/cmpstr.c
@@ -0,0 +1,27 @@
+/* Check that the __builtin_strcmp function is inlined with cmp/str
+ when optimizing for speed. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "jmp" } } */
+/* { dg-final { scan-assembler-times "cmp/str" 3 } } */
+/* { dg-final { scan-assembler-times "tst\t#3" 2 } } */
+
+test00 (const char *s1, const char *s2)
+{
+ return __builtin_strcmp (s1, s2);
+}
+
+/* NB: This might change as further optimisation might detect the
+ max length and fallback to cmpstrn. */
+test01(const char *s2)
+{
+ return __builtin_strcmp ("abc", s2);
+}
+
+/* Check that no test for alignment is needed. */
+test03(const char *s1, const char *s2)
+{
+ return __builtin_strcmp (__builtin_assume_aligned (s1, 4),
+ __builtin_assume_aligned (s2, 4));
+}
diff --git a/gcc/testsuite/gcc.target/sh/cmpstrn.c b/gcc/testsuite/gcc.target/sh/cmpstrn.c
new file mode 100644
index 0000000000..3a1d0d1519
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/cmpstrn.c
@@ -0,0 +1,28 @@
+/* Check that the __builtin_strncmp function is inlined
+ when optimizing for speed. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "jmp" } } */
+/* { dg-final { scan-assembler-times "cmp/str" 1 } } */
+
+/* Test that cmp/str is not used for small lengths. */
+test01(const char *s1)
+{
+ return __builtin_strncmp (s1, "abcde", 3);
+}
+
+/* Test that the cmp/str loop is used. */
+test02(const char *s1)
+{
+ return __builtin_strncmp (s1, "abcdefghi", 8);
+}
+
+/* Test that no call is generated */
+test03(const char *s1, int n)
+{
+ return __builtin_strncmp (s1, "abcde", n);
+}
+
+
+
diff --git a/gcc/testsuite/gcc.target/sh/fpul-usage-1.c b/gcc/testsuite/gcc.target/sh/fpul-usage-1.c
new file mode 100644
index 0000000000..5c3bb196de
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/fpul-usage-1.c
@@ -0,0 +1,24 @@
+/* Check that the FPUL register is used when reading a float as an int and
+ vice versa, as opposed to pushing and popping the values over the stack. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fpul" } } */
+/* { dg-final { scan-assembler-not "r15" } } */
+
+int
+float_as_int (float val)
+{
+ union { float f; int i; } u;
+ u.f = val;
+ return u.i;
+}
+
+float
+int_as_float (int val)
+{
+ union { float f; int i; } u;
+ u.i = val;
+ return u.f;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/mfmovd.c b/gcc/testsuite/gcc.target/sh/mfmovd.c
index b5653c7648..ce3e99332e 100644
--- a/gcc/testsuite/gcc.target/sh/mfmovd.c
+++ b/gcc/testsuite/gcc.target/sh/mfmovd.c
@@ -1,8 +1,9 @@
/* Verify that we generate fmov.d instructions to move doubles when -mfmovd
option is enabled. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
+/* { dg-require-effective-target hard_float } */
/* { dg-options "-mfmovd" } */
-/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a" "-m2a-single" "-m4" "-m4-single" "-m4-100" "-m4-100-single" "-m4-200" "-m4-200-single" "-m4-300" "-m4-300-single" "-m4a" "-m4a-single" } } */
+/* { dg-skip-if "" { *-*-* } { "*-single-only" } { "" } } */
/* { dg-final { scan-assembler "fmov.d" } } */
extern double g;
@@ -13,3 +14,9 @@ f (double d)
g = d;
}
+extern float h;
+
+void f2 ()
+{
+ h = g;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr21255-1.c b/gcc/testsuite/gcc.target/sh/pr21255-1.c
index 5d5b6d7f9a..3e9b78515f 100644
--- a/gcc/testsuite/gcc.target/sh/pr21255-1.c
+++ b/gcc/testsuite/gcc.target/sh/pr21255-1.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh-*-* } } } */
/* { dg-final { scan-assembler "mov fr4,fr.; mov fr5,fr." { target sh[1234lb]*-*-* } } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr21255-2-mb.c b/gcc/testsuite/gcc.target/sh/pr21255-2-mb.c
index ac2ce687e1..531ed3979d 100644
--- a/gcc/testsuite/gcc.target/sh/pr21255-2-mb.c
+++ b/gcc/testsuite/gcc.target/sh/pr21255-2-mb.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-mb -O2 -fomit-frame-pointer" } */
/* { dg-final { scan-assembler "mov @r.,r.; mov @\\(4,r.\\),r." } } */
double d;
diff --git a/gcc/testsuite/gcc.target/sh/pr21255-2-ml.c b/gcc/testsuite/gcc.target/sh/pr21255-2-ml.c
index 570e7dd0b5..6948f475ea 100644
--- a/gcc/testsuite/gcc.target/sh/pr21255-2-ml.c
+++ b/gcc/testsuite/gcc.target/sh/pr21255-2-ml.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-mb" && "-m5*"} { "" } } */
/* { dg-final { scan-assembler "mov @\\(4,r.\\),r.; mov @r.,r." } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr21255-3.c b/gcc/testsuite/gcc.target/sh/pr21255-3.c
index 7edd8cb7c1..a672784183 100644
--- a/gcc/testsuite/gcc.target/sh/pr21255-3.c
+++ b/gcc/testsuite/gcc.target/sh/pr21255-3.c
@@ -1,5 +1,6 @@
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O2 -fomit-frame-pointer" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m2e" "-m3e" "*single-only" } { "" } } */
/* { dg-final { scan-assembler "mov #?0,r.*; mov #?20,r" } } */
/* { dg-final { scan-assembler "mov #?1077149696,r.*; mov #?0,r" } } */
double
diff --git a/gcc/testsuite/gcc.target/sh/pr33135-1.c b/gcc/testsuite/gcc.target/sh/pr33135-1.c
new file mode 100644
index 0000000000..cc6a3f984d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr33135-1.c
@@ -0,0 +1,32 @@
+/* Check that fcmp/eq and fcmp/gt instructions are generated by default
+ (implicit -mieee). */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fcmp/eq" 4 } } */
+/* { dg-final { scan-assembler-times "fcmp/gt" 4 } } */
+
+int
+test_00 (float a, float b)
+{
+ return a <= b;
+}
+
+int
+test_01 (float a, float b)
+{
+ return a >= b;
+}
+
+int
+test_02 (double a, double b)
+{
+ return a <= b;
+}
+
+int
+test_03 (double a, double b)
+{
+ return a >= b;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr33135-2.c b/gcc/testsuite/gcc.target/sh/pr33135-2.c
new file mode 100644
index 0000000000..b93ecb81e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr33135-2.c
@@ -0,0 +1,32 @@
+/* Check that only the fcmp/gt instruction is generated when specifying
+ -ffinite-math-only (implicit -mno-ieee). */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "fcmp/eq" } } */
+/* { dg-final { scan-assembler-times "fcmp/gt" 4 } } */
+
+int
+test_00 (float a, float b)
+{
+ return a <= b;
+}
+
+int
+test_01 (float a, float b)
+{
+ return a >= b;
+}
+
+int
+test_02 (double a, double b)
+{
+ return a <= b;
+}
+
+int
+test_03 (double a, double b)
+{
+ return a >= b;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr33135-3.c b/gcc/testsuite/gcc.target/sh/pr33135-3.c
new file mode 100644
index 0000000000..f5f9a5b922
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr33135-3.c
@@ -0,0 +1,32 @@
+/* Check that fcmp/eq and fcmp/gt instructions are generated when specifying
+ -ffinite-math-only and -mieee. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffinite-math-only -mieee" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fcmp/eq" 4 } } */
+/* { dg-final { scan-assembler-times "fcmp/gt" 4 } } */
+
+int
+test_00 (float a, float b)
+{
+ return a <= b;
+}
+
+int
+test_01 (float a, float b)
+{
+ return a >= b;
+}
+
+int
+test_02 (double a, double b)
+{
+ return a <= b;
+}
+
+int
+test_03 (double a, double b)
+{
+ return a >= b;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr33135-4.c b/gcc/testsuite/gcc.target/sh/pr33135-4.c
new file mode 100644
index 0000000000..20178d7e49
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr33135-4.c
@@ -0,0 +1,32 @@
+/* Check that only the fcmp/gt instruction is generated when specifying
+ -fno-finite-math-only and -mno-ieee. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fno-finite-math-only -mno-ieee" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "fcmp/eq" } } */
+/* { dg-final { scan-assembler-times "fcmp/gt" 4 } } */
+
+int
+test_00 (float a, float b)
+{
+ return a <= b;
+}
+
+int
+test_01 (float a, float b)
+{
+ return a >= b;
+}
+
+int
+test_02 (double a, double b)
+{
+ return a <= b;
+}
+
+int
+test_03 (double a, double b)
+{
+ return a >= b;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr39423-1.c b/gcc/testsuite/gcc.target/sh/pr39423-1.c
new file mode 100644
index 0000000000..1e02937ccb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr39423-1.c
@@ -0,0 +1,48 @@
+/* Check that displacement addressing is used for indexed addresses with a
+ small offset, instead of re-calculating the index. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "add\t#1" } } */
+
+int
+test_00 (int tab[], int index)
+{
+ return tab[index + 1];
+}
+
+int
+test_01 (short tab[], int index)
+{
+ return tab[index + 1];
+}
+
+int
+test_02 (unsigned short tab[], int index)
+{
+ return tab[index + 1];
+}
+
+int
+test_03 (long long tab[], int index)
+{
+ return (int)tab[index + 1];
+}
+
+void
+test_04 (int tab[], int index, int val)
+{
+ tab[index + 1] = val;
+}
+
+void
+test_05 (short tab[], int index, int val)
+{
+ tab[index + 1] = (short)val;
+}
+
+void
+test_06 (unsigned short tab[], int index, int val)
+{
+ tab[index + 1] = (unsigned short)val;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr39423-2.c b/gcc/testsuite/gcc.target/sh/pr39423-2.c
new file mode 100644
index 0000000000..702384dc27
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr39423-2.c
@@ -0,0 +1,14 @@
+/* Check that displacement addressing is used for indexed addresses with a
+ small offset, instead of re-calculating the index and that the movu.w
+ instruction is used on SH2A. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-not "add\t#1" } } */
+/* { dg-final { scan-assembler "movu.w" } } */
+
+int
+test_00 (unsigned short tab[], int index)
+{
+ return tab[index + 1];
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr49263.c b/gcc/testsuite/gcc.target/sh/pr49263.c
index b5ffe714fa..783d865592 100644
--- a/gcc/testsuite/gcc.target/sh/pr49263.c
+++ b/gcc/testsuite/gcc.target/sh/pr49263.c
@@ -2,7 +2,7 @@
allows it. Under some circumstances another compare instruction might
be selected, which is also fine. Any AND instructions are considered
counter productive and fail the test. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-final { scan-assembler-not "and" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49468-di.c b/gcc/testsuite/gcc.target/sh/pr49468-di.c
new file mode 100644
index 0000000000..4b17fce30b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr49468-di.c
@@ -0,0 +1,23 @@
+/* Check that 64 bit integer abs is generated as negc instruction pairs
+ and conditional branch instead of default branch-free code. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "negc" 4 } } */
+
+
+/* Normal integer absolute value. */
+long long
+abs_0 (long long i)
+{
+ return (i < 0) ? -i : i;
+}
+
+/* Negated integer absolute value.
+ The generated code should be the same, except that the branch
+ condition is inverted. */
+long long
+abs_1 (long long i)
+{
+ return (i > 0) ? -i : i;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr49468-si.c b/gcc/testsuite/gcc.target/sh/pr49468-si.c
index 69fbe230ef..8c771ed20b 100644
--- a/gcc/testsuite/gcc.target/sh/pr49468-si.c
+++ b/gcc/testsuite/gcc.target/sh/pr49468-si.c
@@ -1,7 +1,8 @@
/* Check that 32 bit integer abs is generated as neg instruction and
conditional branch instead of default branch-free code. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
/* { dg-final { scan-assembler-times "neg" 2 } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49880-1.c b/gcc/testsuite/gcc.target/sh/pr49880-1.c
index e19f1bf38a..249fae0028 100644
--- a/gcc/testsuite/gcc.target/sh/pr49880-1.c
+++ b/gcc/testsuite/gcc.target/sh/pr49880-1.c
@@ -1,5 +1,5 @@
/* Check that the option -mdiv=call-div1 works. */
-/* { dg-do link { target "sh*-*-*" } } */
+/* { dg-do link } */
/* { dg-options "-mdiv=call-div1" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49880-2.c b/gcc/testsuite/gcc.target/sh/pr49880-2.c
index eef832e30d..35e23dec43 100644
--- a/gcc/testsuite/gcc.target/sh/pr49880-2.c
+++ b/gcc/testsuite/gcc.target/sh/pr49880-2.c
@@ -1,5 +1,5 @@
/* Check that the option -mdiv=call-fp works. */
-/* { dg-do link { target "sh*-*-*" } } */
+/* { dg-do link } */
/* { dg-options "-mdiv=call-fp" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49880-3.c b/gcc/testsuite/gcc.target/sh/pr49880-3.c
index 80a7df548a..be6ea523ca 100644
--- a/gcc/testsuite/gcc.target/sh/pr49880-3.c
+++ b/gcc/testsuite/gcc.target/sh/pr49880-3.c
@@ -1,5 +1,5 @@
/* Check that the option -mdiv=call-table works. */
-/* { dg-do link { target "sh*-*-*" } } */
+/* { dg-do link } */
/* { dg-options "-mdiv=call-table" } */
/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49880-4.c b/gcc/testsuite/gcc.target/sh/pr49880-4.c
index 998a8b69fd..5b5af1e401 100644
--- a/gcc/testsuite/gcc.target/sh/pr49880-4.c
+++ b/gcc/testsuite/gcc.target/sh/pr49880-4.c
@@ -1,7 +1,7 @@
/* Check that the option -mdiv=call-fp does not produce calls to the
library function that uses FPU to implement integer division if FPU insns
are not supported or are disabled. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-mdiv=call-fp" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" } } */
/* { dg-final { scan-assembler-not "sdivsi3_i4\n|udivsi3_i4\n" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr49880-5.c b/gcc/testsuite/gcc.target/sh/pr49880-5.c
index 09e99a85f6..bff9f331f9 100644
--- a/gcc/testsuite/gcc.target/sh/pr49880-5.c
+++ b/gcc/testsuite/gcc.target/sh/pr49880-5.c
@@ -1,6 +1,6 @@
/* Check that the option -mdiv=call-fp results in the corresponding library
function calls on targets that have a double precision FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-mdiv=call-fp" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m2a" "-m4" "-m4a" "*single-only" } } */
/* { dg-final { scan-assembler "sdivsi3_i4\n" } } */
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-1.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-1.c
new file mode 100644
index 0000000000..90db97a273
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-1.c
@@ -0,0 +1,34 @@
+/* PR target/50749: Verify that post-increment addressing is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.w\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.l\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+
+char*
+test_func_00 (char* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+short*
+test_func_01 (short* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+int*
+test_func_02 (int* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-2.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-2.c
new file mode 100644
index 0000000000..b695db173f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-2.c
@@ -0,0 +1,70 @@
+/* PR target/50749: Verify that subsequent post-increment addressings
+ are generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\t@r\[0-9]\+\\+,r\[0-9]\+" 5 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.w\t@r\[0-9]\+\\+,r\[0-9]\+" 5 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.l\t@r\[0-9]\+\\+,r\[0-9]\+" 5 { xfail *-*-*} } } */
+
+char*
+test_func_00 (char* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+char*
+test_func_01 (char* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+short*
+test_func_02 (short* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+short*
+test_func_03 (short* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+int*
+test_func_04 (int* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+int*
+test_func_05 (int* p, int* x)
+{
+ int r = 0;
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-3.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-3.c
new file mode 100644
index 0000000000..6e54d4dd72
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-3.c
@@ -0,0 +1,40 @@
+/* PR target/50749: Verify that post-increment addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.w\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.l\t@r\[0-9]\+\\+,r\[0-9]\+" 1 } } */
+
+int
+test_func_00 (char* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ } while (--c);
+ return r;
+}
+
+int
+test_func_01 (short* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ } while (--c);
+ return r;
+}
+
+int
+test_func_02 (int* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ } while (--c);
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-4.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-4.c
new file mode 100644
index 0000000000..fc6fa8da03
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-postinc-4.c
@@ -0,0 +1,46 @@
+/* PR target/50749: Verify that post-increment addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\t@r\[0-9]\+\\+,r\[0-9]\+" 3 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.w\t@r\[0-9]\+\\+,r\[0-9]\+" 3 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.l\t@r\[0-9]\+\\+,r\[0-9]\+" 3 { xfail *-*-*} } } */
+
+int
+test_func_00 (char* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ } while (--c);
+ return r;
+}
+
+int
+test_func_01 (short* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ } while (--c);
+ return r;
+}
+
+int
+test_func_02 (int* p, int c)
+{
+ int r = 0;
+ do
+ {
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ } while (--c);
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-1.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-1.c
new file mode 100644
index 0000000000..4f455743cf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-1.c
@@ -0,0 +1,28 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 1 { xfail *-*-*} } } */
+
+char*
+test_func_00 (char* p, int c)
+{
+ *--p = (char)c;
+ return p;
+}
+
+short*
+test_func_01 (short* p, int c)
+{
+ *--p = (short)c;
+ return p;
+}
+
+int*
+test_func_02 (int* p, int c)
+{
+ *--p = c;
+ return p;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-2.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-2.c
new file mode 100644
index 0000000000..beda957fa8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-2.c
@@ -0,0 +1,58 @@
+/* PR target/50749: Verify that subsequent pre-decrement addressings
+ are generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
+
+char*
+test_func_00 (char* p, int c)
+{
+ *--p = (char)c;
+ *--p = (char)c;
+ return p;
+}
+
+char*
+test_func_01 (char* p, int c)
+{
+ *--p = (char)c;
+ *--p = (char)c;
+ *--p = (char)c;
+ return p;
+}
+
+short*
+test_func_02 (short* p, int c)
+{
+ *--p = (short)c;
+ *--p = (short)c;
+ return p;
+}
+
+short*
+test_func_03 (short* p, int c)
+{
+ *--p = (short)c;
+ *--p = (short)c;
+ *--p = (short)c;
+ return p;
+}
+
+int*
+test_func_04 (int* p, int c)
+{
+ *--p = c;
+ *--p = c;
+ return p;
+}
+
+int*
+test_func_05 (int* p, int c)
+{
+ *--p = c;
+ *--p = c;
+ *--p = c;
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-3.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-3.c
new file mode 100644
index 0000000000..541749750e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-3.c
@@ -0,0 +1,37 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 1 } } */
+/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 1 } } */
+
+char*
+test_func_00 (char* p, int c, int x)
+{
+ do
+ {
+ *--p = (char)x;
+ } while (--c);
+ return p;
+}
+
+short*
+test_func_01 (short* p, int c, int x)
+{
+ do
+ {
+ *--p = (short)x;
+ } while (--c);
+ return p;
+}
+
+int*
+test_func_02 (int* p, int c, int x)
+{
+ do
+ {
+ *--p = x;
+ } while (--c);
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-4.c b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-4.c
new file mode 100644
index 0000000000..e8c03481e2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-qihisi-predec-4.c
@@ -0,0 +1,43 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-final { scan-assembler-times "mov.b\tr\[0-9]\+,@-r\[0-9]\+" 3 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.w\tr\[0-9]\+,@-r\[0-9]\+" 3 { xfail *-*-*} } } */
+/* { dg-final { scan-assembler-times "mov.l\tr\[0-9]\+,@-r\[0-9]\+" 3 { xfail *-*-*} } } */
+
+char*
+test_func_00 (char* p, int c, int x)
+{
+ do
+ {
+ *--p = (char)x;
+ *--p = (char)x;
+ *--p = (char)x;
+ } while (--c);
+ return p;
+}
+
+short*
+test_func_01 (short* p, int c, int x)
+{
+ do
+ {
+ *--p = (short)x;
+ *--p = (short)x;
+ *--p = (short)x;
+ } while (--c);
+ return p;
+}
+
+int*
+test_func_02 (int* p, int c, int x)
+{
+ do
+ {
+ *--p = x;
+ *--p = x;
+ *--p = x;
+ } while (--c);
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-1.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-1.c
new file mode 100644
index 0000000000..41e3bdd283
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-1.c
@@ -0,0 +1,15 @@
+/* PR target/50749: Verify that post-increment addressing is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 1 } } */
+
+float*
+test_func_00 (float* p, float* x)
+{
+ float r = 0;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-2.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-2.c
new file mode 100644
index 0000000000..304ed11c42
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-2.c
@@ -0,0 +1,27 @@
+/* PR target/50749: Verify that subsequent post-increment addressings
+ are generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 5 { xfail *-*-*} } } */
+
+float*
+test_func_00 (float* p, float* x)
+{
+ float r = 0;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
+
+float*
+test_func_01 (float* p, float* x)
+{
+ float r = 0;
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ *x = r;
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-3.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-3.c
new file mode 100644
index 0000000000..7461bedb4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-3.c
@@ -0,0 +1,17 @@
+/* PR target/50749: Verify that post-increment addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 1 } } */
+
+float
+test_func_00 (float* p, int c)
+{
+ float r = 0;
+ do
+ {
+ r += *p++;
+ } while (--c);
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-4.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-4.c
new file mode 100644
index 0000000000..b6dce42fca
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-postinc-4.c
@@ -0,0 +1,19 @@
+/* PR target/50749: Verify that post-increment addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\t@r\[0-9]\+\\+,fr\[0-9]\+" 3 { xfail *-*-*} } } */
+
+float
+test_func_00 (float* p, int c)
+{
+ float r = 0;
+ do
+ {
+ r += *p++;
+ r += *p++;
+ r += *p++;
+ } while (--c);
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-1.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-1.c
new file mode 100644
index 0000000000..d51aa9e09a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-1.c
@@ -0,0 +1,13 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\tfr\[0-9]\+,@-r\[0-9]\+" 1 } } */
+
+float*
+test_func_00 (float* p, float c)
+{
+ *--p = c;
+ return p;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-2.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-2.c
new file mode 100644
index 0000000000..cd87ce95f8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-2.c
@@ -0,0 +1,23 @@
+/* PR target/50749: Verify that subsequent pre-decrement addressings
+ are generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\tfr\[0-9]\+,@-r\[0-9]\+" 5 { xfail *-*-*} } } */
+
+float*
+test_func_00 (float* p, float c)
+{
+ *--p = c;
+ *--p = c;
+ return p;
+}
+
+float*
+test_func_01 (float* p, float c)
+{
+ *--p = c;
+ *--p = c;
+ *--p = c;
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-3.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-3.c
new file mode 100644
index 0000000000..a772b23a4b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-3.c
@@ -0,0 +1,16 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\tfr\[0-9]\+,@-r\[0-9]\+" 1 } } */
+
+float*
+test_func_00 (float* p, int c, float x)
+{
+ do
+ {
+ *--p = x;
+ } while (--c);
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-4.c b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-4.c
new file mode 100644
index 0000000000..9d080387d2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50749-sf-predec-4.c
@@ -0,0 +1,18 @@
+/* PR target/50749: Verify that pre-decrement addressing is generated
+ inside a loop. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmov.s\tfr\[0-9]\+,@-r\[0-9]\+" 3 { xfail *-*-*} } } */
+
+float*
+test_func_00 (float* p, int c, float x)
+{
+ do
+ {
+ *--p = x;
+ *--p = x;
+ *--p = x;
+ } while (--c);
+ return p;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-1.c b/gcc/testsuite/gcc.target/sh/pr50751-1.c
new file mode 100644
index 0000000000..80c63fb365
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-1.c
@@ -0,0 +1,30 @@
+/* Check that the mov.b displacement addressing insn is generated.
+ If the insn is generated as expected, there should be no address
+ calculations outside the mov insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "add|sub" } } */
+
+void
+testfunc_00 (const char* ap, char* bp, char val)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[15];
+ bp[4] = val;
+ bp[14] = val;
+}
+
+void
+testfunc_01 (volatile const char* ap, volatile char* bp, char val)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[15];
+ bp[4] = val;
+ bp[14] = val;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-2.c b/gcc/testsuite/gcc.target/sh/pr50751-2.c
new file mode 100644
index 0000000000..cd71642611
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-2.c
@@ -0,0 +1,27 @@
+/* Check that the mov.b displacement addressing insn is generated and the
+ base address is adjusted only once. On SH2A this test is skipped because
+ there is a 4 byte mov.b insn that can handle larger displacements. Thus
+ on SH2A the base address will not be adjusted in this case. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "add" 2 } } */
+
+void
+testfunc_00 (const char* ap, char* bp)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[25];
+}
+
+void
+testfunc_01 (volatile const char* ap, volatile char* bp)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[25];
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-3.c b/gcc/testsuite/gcc.target/sh/pr50751-3.c
new file mode 100644
index 0000000000..5b8d3514e4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-3.c
@@ -0,0 +1,26 @@
+/* Check that on SH2A the 4 byte mov.b displacement insn is generated to
+ handle larger displacements. If it is generated correctly, there should
+ be no base address adjustments outside the mov.b insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-not "add|sub" } } */
+
+void
+testfunc_00 (const char* ap, char* bp)
+{
+ bp[100] = ap[15];
+ bp[200] = ap[50];
+ bp[900] = ap[71];
+ bp[0] = ap[25];
+}
+
+void
+testfunc_01 (volatile const char* ap, volatile char* bp)
+{
+ bp[100] = ap[15];
+ bp[200] = ap[50];
+ bp[900] = ap[71];
+ bp[0] = ap[25];
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-4.c b/gcc/testsuite/gcc.target/sh/pr50751-4.c
new file mode 100644
index 0000000000..e0f3ab799e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-4.c
@@ -0,0 +1,30 @@
+/* Check that the mov.w displacement addressing insn is generated.
+ If the insn is generated as expected, there should be no address
+ calculations outside the mov insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "add|sub" } } */
+
+void
+testfunc_00 (const short* ap, short* bp, short val)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[15];
+ bp[4] = val;
+ bp[14] = val;
+}
+
+void
+testfunc_01 (volatile const short* ap, volatile short* bp, short val)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[15];
+ bp[4] = val;
+ bp[14] = val;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-5.c b/gcc/testsuite/gcc.target/sh/pr50751-5.c
new file mode 100644
index 0000000000..5da9ac2a12
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-5.c
@@ -0,0 +1,27 @@
+/* Check that the mov.w displacement addressing insn is generated and the
+ base address is adjusted only once. On SH2A this test is skipped because
+ there is a 4 byte mov.w insn that can handle larger displacements. Thus
+ on SH2A the base address will not be adjusted in this case. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "add" 2 } } */
+
+void
+testfunc_00 (const short* ap, short* bp)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[25];
+}
+
+void
+testfunc_01 (volatile const short* ap, volatile short* bp)
+{
+ bp[0] = ap[15];
+ bp[2] = ap[5];
+ bp[9] = ap[7];
+ bp[0] = ap[25];
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-6.c b/gcc/testsuite/gcc.target/sh/pr50751-6.c
new file mode 100644
index 0000000000..129729037e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-6.c
@@ -0,0 +1,26 @@
+/* Check that on SH2A the 4 byte mov.w displacement insn is generated to
+ handle larger displacements. If it is generated correctly, there should
+ be no base address adjustments outside the mov.w insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-not "add|sub" } } */
+
+void
+testfunc_00 (const short* ap, short* bp)
+{
+ bp[100] = ap[15];
+ bp[200] = ap[50];
+ bp[900] = ap[71];
+ bp[0] = ap[25];
+}
+
+void
+testfunc_01 (volatile const short* ap, volatile short* bp)
+{
+ bp[100] = ap[15];
+ bp[200] = ap[50];
+ bp[900] = ap[71];
+ bp[0] = ap[25];
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-7.c b/gcc/testsuite/gcc.target/sh/pr50751-7.c
new file mode 100644
index 0000000000..014575ad0d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-7.c
@@ -0,0 +1,35 @@
+/* Check that mov.b and mov.w displacement insns are generated.
+ If this is working properly, there should be no base address adjustments
+ outside the mov insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "add|sub" } } */
+
+typedef struct
+{
+ char a;
+ char b;
+ char c;
+ char d;
+
+ short e;
+ short f;
+
+ int g;
+ int h;
+} X;
+
+void
+testfunc_00 (X* x)
+{
+ x->g = x->b | x->c;
+ x->h = x->e | x->f;
+ x->d = x->g;
+ x->f = x->h;
+}
+
+int testfunc_01 (X* x)
+{
+ return x->b | x->e | x->g;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr50751-8.c b/gcc/testsuite/gcc.target/sh/pr50751-8.c
new file mode 100644
index 0000000000..d9eda44f04
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr50751-8.c
@@ -0,0 +1,100 @@
+/* Check that on SH2A the 4 byte movu.b and movu.w displacement insns are
+ generated. This has to be checked with -O2 because some of the patterns
+ rely on peepholes. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "movu.b" 4 } } */
+/* { dg-final { scan-assembler-times "movu.w" 3 } } */
+
+int
+test_00 (unsigned char* x)
+{
+ /* 1x movu.b */
+ return x[0];
+}
+
+int
+test_01 (unsigned short* x)
+{
+ /* 1x movu.w */
+ return x[0];
+}
+
+int
+test_02 (unsigned char* x)
+{
+ /* 1x movu.b */
+ return x[1];
+}
+
+int
+test_03 (unsigned char* x)
+{
+ /* 1x movu.b */
+ return x[32];
+}
+
+int
+test_04 (unsigned char* x)
+{
+ /* 1x movu.b */
+ return x[9000];
+}
+
+int
+test_05 (unsigned short* x)
+{
+ /* 1x movu.w */
+ return x[9000];
+}
+
+int
+test_06 (unsigned char* x, int i)
+{
+ /* No movu.b expected here. Should use mov.b (r0,r4) + extu.b instead. */
+ return x[i];
+}
+
+int
+test_07 (unsigned short* x, int i)
+{
+ /* No movu.w expected here. Should use mov.w (r0,r4) + extu.w instead. */
+ return x[i];
+}
+
+int
+test_08 (unsigned char* x, int c)
+{
+ /* No movu.b expected here. Should use post-inc addressing instead. */
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += x[i];
+ return s;
+}
+
+void
+test_09 (unsigned char* x, unsigned char* y)
+{
+ /* No movu.b expected here, since the zero-extension is irrelevant. */
+ x[1] = y[1];
+ x[2] = y[2];
+}
+
+void
+test_10 (unsigned char* x, unsigned short* y)
+{
+ /* No movu.w expected here, since the zero-extension is irrelevant. */
+ x[1] = y[1];
+ x[2] = y[2];
+}
+
+int
+test_11 (unsigned char* x, unsigned short* y)
+{
+ /* 1x movu.w */
+ int yy = y[1];
+ x[1] = yy;
+ return yy;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-1.c b/gcc/testsuite/gcc.target/sh/pr51244-1.c
new file mode 100644
index 0000000000..15e2ebd1bf
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-1.c
@@ -0,0 +1,32 @@
+/* Check that inverted conditional branch logic does not generate
+ unnecessary explicit T bit extractions, inversions and
+ test instructions. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mbranch-cost=2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "movt|tst|negc|extu" } } */
+
+int
+testfunc_00 (int a, int b, int c, int d)
+{
+ return (a != b || a != d) ? b : c;
+}
+
+int
+testfunc_01 (int a, int b, int c, int d)
+{
+ return (a == b || a == d) ? b : c;
+}
+
+int
+testfunc_02 (int a, int b, int c, int d)
+{
+ return (a == b && a == d) ? b : c;
+}
+
+int
+testfunc_03 (int a, int b, int c, int d)
+{
+ return (a != b && a != d) ? b : c;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-10.c b/gcc/testsuite/gcc.target/sh/pr51244-10.c
new file mode 100644
index 0000000000..ef16b75ff7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-10.c
@@ -0,0 +1,27 @@
+/* Check that compare-branch is inverted properly.
+ In this case the improved bit test is a side effect of compare-branch
+ inversion patterns, even though the branch condition does not get
+ inverted here.
+ Example:
+ mov.b @(14,r9),r0 -> mov.b @(14,r9),r0
+ shll r0 cmp/pz r0
+ subc r0,r0 bt .L192
+ and #1,r0
+ tst r0,r0
+ bt .L195
+*/
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "shll|subc|and" } } */
+int
+test_00 (int* p)
+{
+ int nr = 15;
+ volatile char* addr = (volatile char*)&p[1];
+
+ if ((addr[(nr >> 3) ^ 7] & (1 << (nr & 7))) == 0)
+ return 40;
+ else
+ return 50;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-11.c b/gcc/testsuite/gcc.target/sh/pr51244-11.c
new file mode 100644
index 0000000000..b673e9ac48
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-11.c
@@ -0,0 +1,24 @@
+/* Check that zero-displacement branches are used instead of branch-free
+ execution patterns. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mzdcbranch" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "subc|and" } } */
+
+int*
+test_00 (int* s)
+{
+ if (s[0] == 0)
+ if (!s[3])
+ s = 0;
+ return s;
+}
+
+int*
+test_01 (int* s)
+{
+ if (s[0] == 0)
+ if (s[3])
+ s = 0;
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-12.c b/gcc/testsuite/gcc.target/sh/pr51244-12.c
new file mode 100644
index 0000000000..da941015cc
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-12.c
@@ -0,0 +1,68 @@
+/* Check that the negc instruction is generated as expected for the cases
+ below. If we see a movrt or #-1 negc sequence it means that the pattern
+ which handles the inverted case does not work properly. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "negc" 10 } } */
+/* { dg-final { scan-assembler-not "movrt|#-1|add|sub" } } */
+
+int
+test00 (int a, int b, int* x)
+{
+ return (a == b) ? 0x7FFFFFFF : 0x80000000;
+}
+
+int
+test00_inv (int a, int b)
+{
+ return (a != b) ? 0x80000000 : 0x7FFFFFFF;
+}
+
+int
+test01 (int a, int b)
+{
+ return (a >= b) ? 0x7FFFFFFF : 0x80000000;
+}
+
+int
+test01_inv (int a, int b)
+{
+ return (a < b) ? 0x80000000 : 0x7FFFFFFF;
+}
+
+int
+test02 (int a, int b)
+{
+ return (a > b) ? 0x7FFFFFFF : 0x80000000;
+}
+
+int
+test02_inv (int a, int b)
+{
+ return (a <= b) ? 0x80000000 : 0x7FFFFFFF;
+}
+
+int
+test03 (int a, int b)
+{
+ return ((a & b) == 0) ? 0x7FFFFFFF : 0x80000000;
+}
+
+int
+test03_inv (int a, int b)
+{
+ return ((a & b) != 0) ? 0x80000000 : 0x7FFFFFFF;
+}
+
+int
+test04 (int a)
+{
+ return ((a & 0x55) == 0) ? 0x7FFFFFFF : 0x80000000;
+}
+
+int
+test04_inv (int a)
+{
+ return ((a & 0x55) != 0) ? 0x80000000 : 0x7FFFFFFF;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-13.c b/gcc/testsuite/gcc.target/sh/pr51244-13.c
new file mode 100644
index 0000000000..41d23eb943
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-13.c
@@ -0,0 +1,85 @@
+/* This is a case extracted from CSiBE which contained the following
+ sequence:
+ shll r0
+ movt r0
+ tst r0,r0
+ bf .L11
+ where the 'tst r0,r0' before the branch can be omitted by inverting the
+ branch condition. The tested function contains two other tst insns. If
+ everything goes as expected we will be seeing only those other two tst
+ insns. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "tst" 2 } } */
+
+static __inline__ int
+__test_bit (unsigned long nr, volatile void * addr)
+{
+ /* This is on purpose. */
+ int oldbit;
+ return oldbit & 1;
+}
+
+static __inline__ int
+__constant_test_bit (unsigned long nr, volatile void * addr)
+{
+ return (((volatile char *) addr)[(nr>>3)^7] & (1<<(nr&7))) != 0;
+}
+
+struct list_head
+{
+ struct list_head *next, *prev;
+};
+
+static inline void
+__list_del (struct list_head *prev, struct list_head *next)
+{
+ next->prev = prev;
+ prev->next = next;
+}
+
+static inline void
+list_del (struct list_head *entry)
+{
+ __list_del(entry->prev, entry->next);
+ entry->next = 0;
+ entry->prev = 0;
+}
+
+extern int nr_active_pages;
+extern int nr_inactive_pages;
+extern struct list_head active_list;
+
+typedef struct page
+{
+ unsigned long flags;
+ struct list_head lru;
+} mem_map_t;
+
+void
+activate_page_nolock (struct page * page)
+{
+ if ((__builtin_constant_p((6))
+ ? __constant_test_bit((6),(&(page)->flags))
+ : __test_bit((6),(&(page)->flags)) )
+ && !(__builtin_constant_p((7))
+ ? __constant_test_bit((7),(&(page)->flags))
+ : __test_bit((7),(&(page)->flags)) ))
+ {
+ list_del(&(page)->lru);
+ nr_inactive_pages--;
+ if (!(__builtin_constant_p(6) ? __constant_test_bit((6),(&(page)->flags))
+ : __test_bit((6),(&(page)->flags))))
+ printk("", "", 43);
+
+ if ((__builtin_constant_p(7) ? __constant_test_bit((7),(&(page)->flags))
+ : __test_bit((7),(&(page)->flags))))
+ printk("", "", 43);
+
+ (__builtin_constant_p(7) ? __constant_set_bit((7),(&(page)->flags))
+ : __set_bit((7),(&(page)->flags)) );
+ list_add(&(page)->lru, &active_list);
+ nr_active_pages++;
+ }
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-14.c b/gcc/testsuite/gcc.target/sh/pr51244-14.c
new file mode 100644
index 0000000000..844eb3a569
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-14.c
@@ -0,0 +1,107 @@
+/* This is a case extracted from CSiBE which would sometimes contain the
+ following sequence:
+ cmp/eq r12,r13
+ movt r0
+ xor #1,r0
+ extu.b r0,r0
+ movt r3
+ tst r0,r0
+ bf/s .L35
+ where the negated T bit store did not combine properly. Since there are
+ other movt insns we only check for the xor and the extu. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "xor|extu" } } */
+
+typedef struct transaction_s transaction_t;
+
+struct journal_head
+{
+ transaction_t * b_transaction;
+ struct journal_head *b_cpnext, *b_cpprev;
+};
+
+struct transaction_s
+{
+ struct journal_head * t_checkpoint_list;
+ transaction_t *t_cpnext, *t_cpprev;
+};
+
+struct journal_s
+{
+ transaction_t * j_checkpoint_transactions;
+ unsigned long j_first, j_last;
+};
+
+typedef struct journal_s journal_t;
+
+extern int __try_to_free_cp_buf (struct journal_head *jh);
+extern int __cleanup_transaction (journal_t *journal, transaction_t *transaction);
+extern void __flush_batch (void **bhs, int *batch_count);
+extern void* jh2bh (void*);
+
+static int
+__flush_buffer (journal_t *journal, struct journal_head *jh,
+ void **bhs, int *batch_count, int *drop_count)
+{
+ void *bh = jh2bh (jh);
+ int ret = 0;
+ if (bh)
+ {
+ bhs[*batch_count] = bh;
+ (*batch_count)++;
+ if (*batch_count == 64)
+ ret = 1;
+ }
+ else
+ {
+ int last_buffer = 0;
+ if (jh->b_cpnext == jh)
+ last_buffer = 1;
+ if (__try_to_free_cp_buf (jh))
+ {
+ (*drop_count)++;
+ ret = last_buffer;
+ }
+ }
+ return ret;
+}
+
+int
+log_do_checkpoint (journal_t *journal, int nblocks)
+{
+ transaction_t *transaction, *last_transaction, *next_transaction;
+ int batch_count = 0;
+ void *bhs[64];
+
+repeat:
+ transaction = journal->j_checkpoint_transactions;
+ if (transaction == ((void *)0))
+ return 0;
+ last_transaction = transaction->t_cpprev;
+ next_transaction = transaction;
+ do
+ {
+ struct journal_head *jh, *last_jh, *next_jh;
+ int drop_count = 0;
+ int cleanup_ret, retry = 0;
+ transaction = next_transaction;
+ next_transaction = transaction->t_cpnext;
+ jh = transaction->t_checkpoint_list;
+ last_jh = jh->b_cpprev;
+ next_jh = jh;
+ do
+ {
+ jh = next_jh;
+ next_jh = jh->b_cpnext;
+ retry = __flush_buffer(journal, jh, bhs, &batch_count, &drop_count);
+ } while (jh != last_jh && !retry);
+
+ if (retry)
+ goto repeat;
+
+ cleanup_ret = __cleanup_transaction(journal, transaction);
+ goto repeat;
+ } while (transaction != last_transaction);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-15.c b/gcc/testsuite/gcc.target/sh/pr51244-15.c
new file mode 100644
index 0000000000..e99963f8f9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-15.c
@@ -0,0 +1,71 @@
+/* Check that the redundant test removal code in the *cbranch_t split works
+ as expected on non-SH2A targets. Because on SH2A the movrt instruction
+ is used, this test is re-used and checked differently in pr51244-16.c. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "tst" 6 } } */
+/* { dg-final { scan-assembler-times "movt" 6 } } */
+/* { dg-final { scan-assembler-times "xor" 3 } } */
+/* { dg-final { scan-assembler-not "extu|exts|negc" } } */
+
+typedef char bool;
+
+int
+test_0 (int a, int b, int c, int* d)
+{
+ /* non SH2A: 1x tst, 1x movt, 1x xor
+ SH2A: 1x tst, 1x movrt */
+ bool x = a == 0;
+ d[2] = !x;
+ return x ? b : c;
+}
+
+int
+test_1 (int a, int b, int c, int* d)
+{
+ /* 1x tst, 1x movt */
+ bool x = a != 0;
+ d[2] = !x;
+ return x ? b : c;
+}
+
+int
+test_2 (int a, int b, int c, char* d)
+{
+ /* Check that there is no sign/zero-extension before the store.
+ non SH2A: 1x tst, 1x movt, 1x xor
+ SH2A: 1x tst, 1x movrt */
+ bool x = a == 0;
+ d[2] = !x;
+ return x ? b : c;
+}
+
+int
+test_3 (int a, int b, int c, char* d)
+{
+ /* Check that there is no sign/zero-extension before the store.
+ 1x tst, 1x movt */
+ bool x = a != 0;
+ d[2] = !x;
+ return x ? b : c;
+}
+
+int
+test_4 (int a, int b, int c, char* d)
+{
+ /* 1x tst, 1x movt */
+ bool x = a != 0;
+ d[2] = !x;
+ return !x ? b : c;
+}
+
+int
+test_5 (int a, int b, int c, char* d)
+{
+ /* non SH2A: 1x tst, 1x movt, 1x xor
+ SH2A: 1x tst, 1x movrt */
+ bool x = a == 0;
+ d[2] = !x;
+ return !x ? b : c;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-16.c b/gcc/testsuite/gcc.target/sh/pr51244-16.c
new file mode 100644
index 0000000000..5132f7433f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-16.c
@@ -0,0 +1,11 @@
+/* Check that the redundant test removal code in the *cbranch_t split works
+ as expected on SH2A targets. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "tst" 6 } } */
+/* { dg-final { scan-assembler-times "movt" 3 } } */
+/* { dg-final { scan-assembler-times "movrt" 3 } } */
+/* { dg-final { scan-assembler-not "extu|exts|negc" } } */
+
+#include "pr51244-15.c"
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-17.c b/gcc/testsuite/gcc.target/sh/pr51244-17.c
new file mode 100644
index 0000000000..621abb788a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-17.c
@@ -0,0 +1,297 @@
+/* Check that no unnecessary zero extensions are done on values that are
+ results of arithmetic with T bit inputs. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "extu|exts" } } */
+
+int
+test00 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x == y;
+}
+
+int
+test01 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == d;
+ return x == y;
+}
+
+int
+test02 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c == d;
+ return x == y;
+}
+
+int
+test03 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != d;
+ return x == y;
+}
+
+int
+test04 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != d;
+ return x == y;
+}
+
+int
+test05 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x != y;
+}
+
+int
+test06 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x ^ y;
+}
+
+int
+test07 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x | y;
+}
+
+int
+test08 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x & y;
+}
+
+int
+test09 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == d;
+ return x != y;
+}
+
+int
+test10 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c == d;
+ return x != y;
+}
+
+int
+test11 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != d;
+ return x != y;
+}
+
+int
+test12 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != d;
+ return x != y;
+}
+
+int
+test13 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a == b;
+ int y = c == 0;
+ int z = d == e;
+ return x == y || x == z;
+}
+
+int
+test14 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a == b;
+ int y = c == 0;
+ int z = d == e;
+ return x == y && x == z;
+}
+
+int
+test15 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c == 0;
+ int z = d == e;
+ return x == y || x == z;
+}
+
+int
+test16 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c == 0;
+ int z = d == e;
+ return x == y && x == z;
+}
+
+int
+test17 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c != 0;
+ int z = d == e;
+ return x == y || x == z;
+}
+
+int
+test18 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c != 0;
+ int z = d == e;
+ return x == y && x == z;
+}
+
+int
+test19 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c != 0;
+ int z = d == e;
+ return x == y || x == z;
+}
+
+int
+test20 (int a, int b, int c, int d, int e, int f)
+{
+ int x = a != b;
+ int y = c != 0;
+ int z = d != e;
+ return x == y && x == z;
+}
+
+int
+test21 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x + y;
+}
+
+int
+test22 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c == 0;
+ return x + y;
+}
+
+int
+test23 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != 0;
+ return x + y;
+}
+
+int
+test24 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x - y;
+}
+
+int
+test25 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c == 0;
+ return x - y;
+}
+
+int
+test26 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != 0;
+ return x - y;
+}
+
+int
+test27 (int a, int b, int c, int d)
+{
+ int x = a == b;
+ int y = c == 0;
+ return x * y;
+}
+
+int
+test28 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c == 0;
+ return x * y;
+}
+
+int
+test29 (int a, int b, int c, int d)
+{
+ int x = a != b;
+ int y = c != 0;
+ return x * y;
+}
+
+int
+test30 (int a, int b)
+{
+ return ((a & 0x7F) == 1)
+ | ((a & 0xFF00) == 0x0200)
+ | ((a & 0xFF0000) == 0x030000);
+}
+
+int
+test31 (int a, int b)
+{
+ return ((a & 0x7F) == 1)
+ | ((a & 0xFF00) == 0x0200)
+ | ((a & 0xFF0000) == 0x030000)
+ | ((a & 0xFF000000) == 0x04000000);
+}
+
+int
+test32 (int* a, int b, int c, volatile char* d)
+{
+ d[1] = a[0] != 0;
+ return b;
+}
+
+int
+test33 (int* a, int b, int c, volatile char* d)
+{
+ d[1] = a[0] == 0;
+ return b;
+}
+
+char
+test34 (int a, int* b)
+{
+ return (b[4] & b[0] & a) == a;
+}
+
+unsigned char
+test35 (int a, int* b)
+{
+ return (b[4] & b[0] & a) == a;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-18.c b/gcc/testsuite/gcc.target/sh/pr51244-18.c
new file mode 100644
index 0000000000..19b244cea1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-18.c
@@ -0,0 +1,102 @@
+/* Check that no unnecessary T bit stores are done before conditional
+ branches.
+ This case was extracted from the CSiBE set and contained the following
+ sequence:
+ cmp/hi r1,r0
+ movt r1
+ tst r1,r1
+ bt .L12
+ mov.l @r10,r1
+ In this reduced code the movt and tst insns were only present in the
+ unwanted sequence. Thus, if we see any tst or movt insns, something is
+ not working as expected. This test requires -O2 because the T bit stores
+ in question will be eliminated in additional insn split passes after
+ reload. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "movt|tst" } } */
+
+typedef char Char;
+typedef unsigned char Bool;
+typedef unsigned char UChar;
+typedef int Int32;
+typedef unsigned int UInt32;
+typedef short Int16;
+typedef unsigned short UInt16;
+
+static inline Bool
+mainGtU (UInt32 i1, UInt32 i2, UChar* block, UInt16* quadrant, UInt32 nblock,
+ Int32* budget)
+{
+ Int32 k;
+ UChar c1, c2;
+ UInt16 s1, s2;
+ k = nblock + 8;
+ do
+ {
+ c1 = block[i1];
+ c2 = block[i2];
+ if (c1 != c2)
+ return (c1 > c2);
+ s1 = quadrant[i1];
+ s2 = quadrant[i2];
+ if (s1 != s2)
+ return (s1 > s2);
+
+ i1++; i2++;
+ k -= 8;
+ } while (k >= 0);
+
+ return 0;
+}
+
+static inline void
+mainSimpleSort (UInt32* ptr, UChar* block, UInt16* quadrant, Int32 nblock,
+ Int32 lo, Int32 hi, Int32 d, Int32* budget)
+{
+ Int32 i, j, h, bigN, hp;
+ UInt32 v;
+ bigN = hi - lo + 1;
+ hp = 0;
+ h = 1;
+ j = lo + h;
+ v = ptr[j];
+
+ while (mainGtU (ptr[j-h]+d, v+d, block, quadrant, nblock, budget))
+ {
+ ptr[j] = ptr[j-h];
+ j = j - h;
+ }
+}
+
+static inline void
+mainQSort3 (UInt32* ptr, UChar* block, UInt16* quadrant, Int32 nblock,
+ Int32 loSt, Int32 hiSt, Int32 dSt, Int32* budget)
+{
+ Int32 unLo, unHi, ltLo, gtHi;
+ Int32 sp, lo, hi, d;
+
+ Int32 stackLo[100];
+ Int32 stackHi[100];
+ Int32 stackD [100];
+
+ sp = 0;
+ stackLo[sp] = loSt;
+ stackHi[sp] = hiSt;
+ stackD [sp] = dSt;
+ lo = stackLo[sp];
+ hi = stackHi[sp];
+ d = stackD [sp];
+ mainSimpleSort (ptr, block, quadrant, nblock, lo, hi, d, budget);
+}
+
+void
+mainSort (UInt32* ptr, UChar* block, UInt16* quadrant, UInt32* ftab,
+ Int32 nblock, Int32 verb, Int32* budget)
+{
+ Int32 sb = 0;
+ Int32 lo = ftab[sb] & (~((1 << 21)));
+ Int32 hi = (ftab[sb+1] & (~((1 << 21)))) - 1;
+ mainQSort3 (ptr, block, quadrant, nblock, lo, hi, 2, budget);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-19.c b/gcc/testsuite/gcc.target/sh/pr51244-19.c
new file mode 100644
index 0000000000..5845d93f60
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-19.c
@@ -0,0 +1,75 @@
+/* Check that no unnecessary T bit stores are done before conditional
+ branches.
+ This case was extracted from the CSiBE set and contained the following
+ sequence:
+ mov.l @(8,r4),r2
+ mov.l @(4,r4),r3
+ cmp/gt r2,r3
+ movt r2
+.L3:
+ tst r2,r2
+ bt/s .L12
+ mov #-1,r0
+
+ .....
+
+ mov.l @r4,r2
+ tst r2,r2
+ bra .L3
+ movt r2
+
+ In this reduced code the movt insns were only present in the
+ unwanted sequences. Thus, if we see any movt insns, something is not
+ working as expected. This test requires -O2 because the T bit stores
+ in question will be eliminated in additional insn split passes after
+ reload. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "movt" } } */
+
+struct request
+{
+ unsigned long nr_sectors;
+};
+
+struct request_list
+{
+ int count;
+};
+
+struct request_queue
+{
+ struct request_list rq;
+ volatile int nr_sectors;
+ int max_queue_sectors;
+ int can_throttle;
+ unsigned long bounce_pfn;
+};
+
+typedef struct request_queue request_queue_t;
+
+static inline int
+blk_oversized_queue (request_queue_t* q)
+{
+ if (q->can_throttle)
+ return q->nr_sectors > q->max_queue_sectors;
+ return q->rq.count == 0;
+}
+
+struct request*
+get_request (request_queue_t* q, int rw)
+{
+ struct request* rq = ((void*)0);
+ struct request_list *rl = &q->rq;
+
+ if (blk_oversized_queue (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return ((void*)0);
+ if (blk_oversized_queue (q))
+ return ((void*)0);
+ }
+
+ return (void*)-100;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-2.c b/gcc/testsuite/gcc.target/sh/pr51244-2.c
new file mode 100644
index 0000000000..a81ee7ed9d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-2.c
@@ -0,0 +1,18 @@
+/* Check that when taking the complement of the T bit using the negc
+ instruction pattern, the constant -1 is loaded only once.
+ On SH2A this test is skipped because the movrt instruction is used
+ to get the complement of the T bit. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mbranch-cost=2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "mov\t#-1" 1 } } */
+
+void
+testfunc_00 (int* a, int* b, int c, int d)
+{
+ b[0] = a[0] != c;
+ b[1] = a[1] != d;
+ b[2] = a[2] != c;
+ b[3] = a[3] != d;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-20-sh2a.c b/gcc/testsuite/gcc.target/sh/pr51244-20-sh2a.c
new file mode 100644
index 0000000000..f2cd2de04f
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-20-sh2a.c
@@ -0,0 +1,14 @@
+/* Check that the SH specific sh_treg_combine RTL optimization pass works as
+ expected. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "tst" 5 } } */
+/* { dg-final { scan-assembler-times "movt" 0 } } */
+/* { dg-final { scan-assembler-times "nott" 1 } } */
+/* { dg-final { scan-assembler-times "cmp/eq" 2 } } */
+/* { dg-final { scan-assembler-times "cmp/hi" 4 } } */
+/* { dg-final { scan-assembler-times "cmp/gt" 3 } } */
+/* { dg-final { scan-assembler-times "not\t" 1 } } */
+
+#include "pr51244-20.c"
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-20.c b/gcc/testsuite/gcc.target/sh/pr51244-20.c
new file mode 100644
index 0000000000..a9ded46351
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-20.c
@@ -0,0 +1,103 @@
+/* Check that the SH specific sh_treg_combine RTL optimization pass works as
+ expected. On SH2A the expected insns are slightly different, see
+ pr51244-21.c. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "tst" 6 } } */
+/* { dg-final { scan-assembler-times "movt" 1 } } */
+/* { dg-final { scan-assembler-times "cmp/eq" 2 } } */
+/* { dg-final { scan-assembler-times "cmp/hi" 4 } } */
+/* { dg-final { scan-assembler-times "cmp/gt" 2 } } */
+/* { dg-final { scan-assembler-times "not\t" 1 } } */
+
+
+/* non-SH2A: 2x tst, 1x movt, 2x cmp/eq, 1x cmp/hi
+ SH2A: 1x tst, 1x nott, 2x cmp/eq, 1x cmp/hi */
+static inline int
+blk_oversized_queue_0 (int* q)
+{
+ if (q[2])
+ return q[1] == 5;
+ return (q[0] != 5);
+}
+
+int __attribute__ ((noinline))
+get_request_0 (int* q, int rw)
+{
+ if (blk_oversized_queue_0 (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return -33;
+ return 0;
+ }
+ return -100;
+}
+
+
+/* 1x tst, 1x cmp/gt, 1x cmp/hi
+ On SH2A mem loads/stores have a wrong length of 4 bytes and thus will
+ not be placed in a delay slot. This introduces an extra cmp/gt insn. */
+static inline int
+blk_oversized_queue_1 (int* q)
+{
+ if (q[2])
+ return q[1] > 5;
+ return (q[0] > 5);
+}
+
+int __attribute__ ((noinline))
+get_request_1 (int* q, int rw)
+{
+ if (blk_oversized_queue_1 (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return -33;
+ return 0;
+ }
+ return -100;
+}
+
+
+/* 1x tst, 1x cmp/gt, 1x cmp/hi, 1x cmp/hi */
+static inline int
+blk_oversized_queue_2 (int* q)
+{
+ if (q[2])
+ return q[1] > 5;
+ return (q[0] < 5);
+}
+
+int __attribute__ ((noinline))
+get_request_2 (int* q, int rw)
+{
+ if (blk_oversized_queue_2 (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return -33;
+ return 0;
+ }
+ return -100;
+}
+
+
+/* 2x tst, 1x cmp/hi, 1x not */
+static inline int
+blk_oversized_queue_5 (int* q)
+{
+ if (q[2])
+ return q[1] != 0;
+ return q[0] == 0;
+}
+
+int __attribute__ ((noinline))
+get_request_5 (int* q, int rw)
+{
+ if (blk_oversized_queue_5 (q))
+ {
+ if ((rw == 1) || (rw == 0))
+ return -33;
+ return 0;
+ }
+ return -100;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-3.c b/gcc/testsuite/gcc.target/sh/pr51244-3.c
new file mode 100644
index 0000000000..92963c4bec
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-3.c
@@ -0,0 +1,16 @@
+/* Check that when taking the complement of the T bit on SH2A,
+ the movrt instruction is being generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mbranch-cost=2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "movrt" 4 } } */
+
+void
+testfunc_00 (int* a, int* b, int c, int d)
+{
+ b[0] = a[0] != c;
+ b[1] = a[1] != d;
+ b[2] = a[2] != c;
+ b[3] = a[3] != d;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-4.c b/gcc/testsuite/gcc.target/sh/pr51244-4.c
new file mode 100644
index 0000000000..a11429b15e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-4.c
@@ -0,0 +1,19 @@
+/* Check that storing the (negated) T bit as all ones or zeros in a reg
+ uses the subc instruction. On SH2A a sequence with the movrt instruction
+ is also OK instead of subc. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mbranch-cost=2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "movt|tst|negc" } } */
+/* { dg-final { scan-assembler "subc|movrt|neg|not" } } */
+
+int test_00 (int x, int y)
+{
+ return x != y ? -1 : 0;
+}
+
+int test_01 (int x, int y)
+{
+ return x == y ? -1 : 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-5.c b/gcc/testsuite/gcc.target/sh/pr51244-5.c
new file mode 100644
index 0000000000..c0f05a1052
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-5.c
@@ -0,0 +1,50 @@
+/* Check that no unnecessary sign or zero extension insn is generated after
+ a negc or movrt insn that stores the inverted T bit in a reg. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "extu|exts" } } */
+
+int
+test_00 (int a, int b, int* c, short* d, int x)
+{
+ *d = x != 0;
+ *c = -1;
+
+ if (x != 0)
+ return a > 0;
+
+ return 0;
+}
+
+unsigned char
+test_01 (int x)
+{
+ if (x < 58 && x > 47)
+ return 1;
+ return 0;
+}
+
+char
+test_02 (int x)
+{
+ if (x < 58 && x > 47)
+ return 1;
+ return 0;
+}
+
+unsigned short
+test_03 (int x)
+{
+ if (x < 58 && x > 47)
+ return 1;
+ return 0;
+}
+
+short
+test_04 (int x)
+{
+ if (x < 58 && x > 47)
+ return 1;
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-6.c b/gcc/testsuite/gcc.target/sh/pr51244-6.c
new file mode 100644
index 0000000000..3f9aafb7d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-6.c
@@ -0,0 +1,15 @@
+/* Check that no unnecessary sign or zero extension insn is generated after
+ a negc or movrt insn that stores the inverted T bit in a reg. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "extu|exts" } } */
+
+float
+test_00 (float q[4], float m[9])
+{
+ float s0 = m[0] + m[1];
+ float s1 = m[0] - m[1];
+
+ return q[s0 > s1 ? 0 : 1];
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-7.c b/gcc/testsuite/gcc.target/sh/pr51244-7.c
new file mode 100644
index 0000000000..d4d39745da
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-7.c
@@ -0,0 +1,26 @@
+/* Check that compare-branch is inverted properly.
+ Example:
+ clrt -> clrt
+ subc r0,r6 subc r0,r6
+ mov r3,r7 mov r3,r7
+ subc r1,r7 subc r1,r7
+ mov #0,r1 tst r7,r7
+ cmp/hi r1,r7 bf .L111
+ bt .L111 bra .L197
+ bra .L197
+ nop
+*/
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "cmp/hi" } } */
+/* { dg-final { scan-assembler-not "mov\t#0" } } */
+
+int other_func (long long);
+int
+test_00 (unsigned long long a, unsigned long long b)
+{
+ if ((a - b) > 0xFFFFFFFFLL)
+ return other_func (a - b);
+ return 20;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-8.c b/gcc/testsuite/gcc.target/sh/pr51244-8.c
new file mode 100644
index 0000000000..d8c1269bb3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-8.c
@@ -0,0 +1,27 @@
+/* Check that compare-branch is inverted properly.
+ Example:
+ mov #1,r0 -> tst r8,r8
+ neg r8,r1 bt .L47
+ shad r1,r0
+ tst #1,r0
+ bf .L47
+*/
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "shad|neg" } } */
+
+int test_01_00 (int*, void*);
+int
+test_01 (int* m, void* v)
+{
+ unsigned long n = (unsigned long)v - 1;
+
+ if (!n)
+ return 50;
+
+ if (1 & (1 << n)) /* if n == 0: 1 & (1 << 0) -> true */
+ return 60;
+ else /* if n != 0: 1 & (1 << n) -> false */
+ return -8;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51244-9.c b/gcc/testsuite/gcc.target/sh/pr51244-9.c
new file mode 100644
index 0000000000..cca90a8439
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51244-9.c
@@ -0,0 +1,35 @@
+/* Check that compare-branch is inverted properly.
+ Example:
+ mov.w .L566,r2 -> mov.w .L566,r2
+ add r11,r2 add r11,r2
+ mov.l @(12,r2),r7 mov.l @(8,r2),r5
+ mov.l @(8,r2),r5 mov.l @(12,r2),r2
+ mov #0,r2 tst r2,r2
+ cmp/hi r2,r7 bt .L534
+ bf .L534
+*/
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "mov\t#0" } } */
+static inline unsigned int
+test_03_00 (unsigned int x)
+{
+ /* Return unassigned value on purpose. */
+ unsigned int res;
+ return res;
+}
+
+struct S
+{
+ unsigned int a;
+ unsigned int b;
+};
+
+int test_03 (struct S* i)
+{
+ if ((i->a != 2 && i->a != 3) || i->a > test_03_00 (i->b))
+ return -5;
+
+ return -55;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr51697.c b/gcc/testsuite/gcc.target/sh/pr51697.c
new file mode 100644
index 0000000000..d63e329bff
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr51697.c
@@ -0,0 +1,21 @@
+/* Check that DImode comparisons are optimized as expected when compiling
+ with -Os. */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "tst" 2 } } */
+/* { dg-final { scan-assembler-not "cmp" } } */
+
+int
+test_00 (long long* x)
+{
+ /* 1x tst, no cmp/* insns. */
+ return *x & 0xFFFFFFFF ? -20 : -40;
+}
+
+int
+test_01 (unsigned long long x)
+{
+ /* 1x tst, no cmp/* insns. */
+ return x >= 0x100000000LL ? -20 : -40;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52483-1.c b/gcc/testsuite/gcc.target/sh/pr52483-1.c
new file mode 100644
index 0000000000..ca64a0a2c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52483-1.c
@@ -0,0 +1,54 @@
+/* Check that loads/stores from/to volatile mems don't result in redundant
+ sign/zero extensions. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "exts|extu" } } */
+
+int
+test_00 (volatile char* x)
+{
+ return *x;
+}
+
+void
+test_100 (volatile char* x, char y)
+{
+ *x = y;
+}
+
+int
+test_01 (volatile short* x)
+{
+ return *x;
+}
+
+void
+test_101 (volatile unsigned char* x, unsigned char y)
+{
+ *x = y;
+}
+
+int
+test_02 (volatile unsigned char* x)
+{
+ return *x == 0x80;
+}
+
+void
+test_102 (volatile short* x, short y)
+{
+ *x = y;
+}
+
+int
+test_03 (volatile unsigned short* x)
+{
+ return *x == 0xFF80;
+}
+
+void
+test_103 (volatile unsigned short* x, unsigned short y)
+{
+ *x = y;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52483-2.c b/gcc/testsuite/gcc.target/sh/pr52483-2.c
new file mode 100644
index 0000000000..68e7f8e251
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52483-2.c
@@ -0,0 +1,110 @@
+/* Check that loads/stores from/to volatile mems utilize displacement
+ addressing modes and do not result in redundant sign/zero extensions. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "@\\(5," 4 } } */
+/* { dg-final { scan-assembler-times "@\\(10," 4 } } */
+/* { dg-final { scan-assembler-times "@\\(20," 4 } } */
+/* { dg-final { scan-assembler-times "@\\(40," 4 } } */
+/* { dg-final { scan-assembler-times "@\\(44," 4 } } */
+/* { dg-final { scan-assembler-not "exts" } } */
+/* { dg-final { scan-assembler-times "extu|movu" 2 } } */
+
+int
+test_00 (volatile char* x)
+{
+ return x[5];
+}
+
+void
+test_100 (volatile char* x, char y)
+{
+ x[5] = y;
+}
+
+int
+test_01 (volatile short* x)
+{
+ return x[5];
+}
+
+void
+test_101 (volatile short* x, short y)
+{
+ x[5] = y;
+}
+
+int
+test_02 (volatile int* x)
+{
+ return x[5];
+}
+
+void
+test_102 (volatile int* x, int y)
+{
+ x[5] = y;
+}
+
+long long
+test_03 (volatile long long* x)
+{
+ return x[5];
+}
+
+void
+test_103 (volatile long long* x, long long y)
+{
+ x[5] = y;
+}
+
+unsigned int
+test_04 (volatile unsigned char* x)
+{
+ // expected 1x extu.b or movu.b
+ return x[5];
+}
+
+void
+test_104 (volatile unsigned char* x, unsigned char y)
+{
+ x[5] = y;
+}
+
+unsigned int
+test_05 (volatile unsigned short* x)
+{
+ // expected 1x extu.w or movu.w
+ return x[5];
+}
+
+void
+test_105 (volatile unsigned short* x, unsigned short y)
+{
+ x[5] = y;
+}
+
+unsigned int
+test_06 (volatile unsigned int* x)
+{
+ return x[5];
+}
+
+void
+test_106 (volatile unsigned int* x, unsigned int y)
+{
+ x[5] = y;
+}
+
+unsigned long long
+test_07 (volatile unsigned long long* x)
+{
+ return x[5];
+}
+
+void
+test_107 (volatile unsigned long long* x, unsigned long long y)
+{
+ x[5] = y;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52483-3.c b/gcc/testsuite/gcc.target/sh/pr52483-3.c
new file mode 100644
index 0000000000..baeec33433
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52483-3.c
@@ -0,0 +1,43 @@
+/* Check that loads/stores from/to volatile mems utilize indexed addressing
+ modes and do not result in redundant sign/zero extensions. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "@\\(r0," 6 } } */
+/* { dg-final { scan-assembler-not "exts|extu" } } */
+
+int
+test_00 (volatile char* x, unsigned int y)
+{
+ return x[y];
+}
+
+void
+test_100 (volatile char* x, unsigned int y, char z)
+{
+ x[y] = z;
+}
+
+int
+test_01 (volatile short* x, unsigned int y)
+{
+ return x[y];
+}
+
+void
+test_101 (volatile short* x, unsigned int y, short z)
+{
+ x[y] = z;
+}
+
+int
+test_02 (volatile int* x, unsigned int y)
+{
+ return x[y];
+}
+
+int
+test_102 (volatile int* x, unsigned int y, int z)
+{
+ x[y] = z;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52483-4.c b/gcc/testsuite/gcc.target/sh/pr52483-4.c
new file mode 100644
index 0000000000..743e8dc546
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52483-4.c
@@ -0,0 +1,18 @@
+/* Check that loads/stores from/to volatile floating point mems utilize
+ indexed addressing modes. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "@\\(r0," 2 } } */
+
+float
+test_00 (volatile float* x, unsigned int y)
+{
+ return x[y];
+}
+
+void
+test_100 (volatile float* x, unsigned int y, float z)
+{
+ x[y] = z;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52483-5.c b/gcc/testsuite/gcc.target/sh/pr52483-5.c
new file mode 100644
index 0000000000..50aefe2cdd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52483-5.c
@@ -0,0 +1,28 @@
+/* Check that loads from volatile mems utilize post-increment addressing
+ modes and do not result in redundant sign extensions. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "@r\[0-9\]\+\\+," 3 } } */
+/* { dg-final { scan-assembler-not "exts" } } */
+
+volatile char*
+test_00 (volatile char* x)
+{
+ int xx = *x++;
+ return x;
+}
+
+volatile short*
+test_01 (volatile short* x)
+{
+ int xx = *x++;
+ return x;
+}
+
+volatile int*
+test_02 (volatile int* x)
+{
+ int xx = *x++;
+ return x;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52933-1.c b/gcc/testsuite/gcc.target/sh/pr52933-1.c
new file mode 100644
index 0000000000..b65707ee40
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52933-1.c
@@ -0,0 +1,168 @@
+/* Check that the div0s instruction is used for integer sign comparisons.
+ Each test case is expected to emit at least one div0s insn.
+ Problems when combining the div0s comparison result with surrounding
+ logic usually show up as redundant tst insns. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "div0s" 25 } } */
+/* { dg-final { scan-assembler-not "tst" } } */
+
+typedef unsigned char bool;
+
+int other_func_a (int, int);
+int other_func_b (int, int);
+
+bool
+test_00 (int a, int b)
+{
+ return (a ^ b) >= 0;
+}
+
+bool
+test_01 (int a, int b)
+{
+ return (a ^ b) < 0;
+}
+
+int
+test_02 (int a, int b, int c, int d)
+{
+ if ((a ^ b) < 0)
+ return other_func_a (a, c);
+ else
+ return other_func_b (d, b);
+}
+
+int
+test_03 (int a, int b, int c, int d)
+{
+ if ((a ^ b) >= 0)
+ return other_func_a (a, c);
+ else
+ return other_func_b (d, b);
+}
+
+int
+test_04 (int a, int b)
+{
+ return (a ^ b) >= 0 ? -20 : -40;
+}
+
+bool
+test_05 (int a, int b)
+{
+ return (a ^ b) < 0;
+}
+
+int
+test_06 (int a, int b)
+{
+ return (a ^ b) < 0 ? -20 : -40;
+}
+
+bool
+test_07 (int a, int b)
+{
+ return (a < 0) == (b < 0);
+}
+
+int
+test_08 (int a, int b)
+{
+ return (a < 0) == (b < 0) ? -20 : -40;
+}
+
+bool
+test_09 (int a, int b)
+{
+ return (a < 0) != (b < 0);
+}
+
+int
+test_10 (int a, int b)
+{
+ return (a < 0) != (b < 0) ? -20 : -40;
+}
+
+bool
+test_11 (int a, int b)
+{
+ return (a >= 0) ^ (b < 0);
+}
+
+int
+test_12 (int a, int b)
+{
+ return (a >= 0) ^ (b < 0) ? -20 : -40;
+}
+
+bool
+test_13 (int a, int b)
+{
+ return !((a >= 0) ^ (b < 0));
+}
+
+int
+test_14 (int a, int b)
+{
+ return !((a >= 0) ^ (b < 0)) ? -20 : -40;
+}
+
+bool
+test_15 (int a, int b)
+{
+ return (a & 0x80000000) == (b & 0x80000000);
+}
+
+int
+test_16 (int a, int b)
+{
+ return (a & 0x80000000) == (b & 0x80000000) ? -20 : -40;
+}
+
+bool
+test_17 (int a, int b)
+{
+ return (a & 0x80000000) != (b & 0x80000000);
+}
+
+int
+test_18 (int a, int b)
+{
+ return (a & 0x80000000) != (b & 0x80000000) ? -20 : -40;
+}
+
+int
+test_19 (unsigned int a, unsigned int b)
+{
+ return (a ^ b) >> 31;
+}
+
+int
+test_20 (unsigned int a, unsigned int b)
+{
+ return (a >> 31) ^ (b >> 31);
+}
+
+int
+test_21 (int a, int b)
+{
+ return ((a & 0x80000000) ^ (b & 0x80000000)) >> 31 ? -30 : -10;
+}
+
+int
+test_22 (int a, int b, int c, int d)
+{
+ if ((a < 0) == (b < 0))
+ return other_func_a (a, b);
+ else
+ return other_func_b (c, d);
+}
+
+bool
+test_23 (int a, int b, int c, int d)
+{
+ /* Should emit 2x div0s. */
+ return ((a < 0) == (b < 0)) | ((c < 0) == (d < 0));
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr52933-2.c b/gcc/testsuite/gcc.target/sh/pr52933-2.c
new file mode 100644
index 0000000000..865cb37091
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr52933-2.c
@@ -0,0 +1,12 @@
+/* Check that the div0s instruction is used for integer sign comparisons
+ when -mpretend-cmove is enabled.
+ Each test case is expected to emit at least one div0s insn.
+ Problems when combining the div0s comparison result with surrounding
+ logic usually show up as redundant tst insns. */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mpretend-cmove" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "div0s" 25 } } */
+/* { dg-final { scan-assembler-not "tst" } } */
+
+#include "pr52933-1.c"
diff --git a/gcc/testsuite/gcc.target/sh/pr53511-1.c b/gcc/testsuite/gcc.target/sh/pr53511-1.c
new file mode 100644
index 0000000000..d58a72c3b2
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53511-1.c
@@ -0,0 +1,14 @@
+/* Verify that the fmac insn is used for the standard fmaf function. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fmac" } } */
+
+#include <math.h>
+
+float
+test_func_00 (float a, float b, float c)
+{
+ return fmaf (a, b, c);
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr53512-1.c b/gcc/testsuite/gcc.target/sh/pr53512-1.c
new file mode 100644
index 0000000000..c54671bd20
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53512-1.c
@@ -0,0 +1,26 @@
+/* Verify that the fsca insn is used when specifying -mfsca and
+ -funsafe-math-optimizations. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mfsca -funsafe-math-optimizations" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m3*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fsca" 3 } } */
+
+#include <math.h>
+
+float
+test_func_00 (float x)
+{
+ return sinf (x) + cosf (x);
+}
+
+float
+test_func_01 (float x)
+{
+ return sinf (x);
+}
+
+float
+test_func_02 (float x)
+{
+ return cosf (x);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr53512-2.c b/gcc/testsuite/gcc.target/sh/pr53512-2.c
new file mode 100644
index 0000000000..ed410116c6
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53512-2.c
@@ -0,0 +1,26 @@
+/* Verify that the fsca insn is not used when specifying -mno-fsca and
+ -funsafe-math-optimizations. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mno-fsca -funsafe-math-optimizations" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "fsca" } } */
+
+#include <math.h>
+
+float
+test_func_00 (float x)
+{
+ return sinf (x) + cosf (x);
+}
+
+float
+test_func_01 (float x)
+{
+ return sinf (x);
+}
+
+float
+test_func_02 (float x)
+{
+ return cosf (x);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr53512-3.c b/gcc/testsuite/gcc.target/sh/pr53512-3.c
new file mode 100644
index 0000000000..71522c8d96
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53512-3.c
@@ -0,0 +1,15 @@
+/* Verify that the fsrra insn is used when specifying -mfsrra and
+ -funsafe-math-optimizations and -ffinite-math-only. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mfsrra -funsafe-math-optimizations -ffinite-math-only" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m3*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler "fsrra" } } */
+
+#include <math.h>
+
+float
+test_func_00 (float x)
+{
+ return 1 / sqrtf (x);
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr53512-4.c b/gcc/testsuite/gcc.target/sh/pr53512-4.c
new file mode 100644
index 0000000000..1645eed528
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53512-4.c
@@ -0,0 +1,15 @@
+/* Verify that the fsrra insn is not used when specifying -mno-fsrra and
+ -funsafe-math-optimizations and -ffinite-math-only. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -mno-fsrra -funsafe-math-optimizations -ffinite-math-only" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "fsrra" } } */
+
+#include <math.h>
+
+float
+test_func_00 (float x)
+{
+ return 1 / sqrtf (x);
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr53568-1.c b/gcc/testsuite/gcc.target/sh/pr53568-1.c
new file mode 100644
index 0000000000..e274170fe1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53568-1.c
@@ -0,0 +1,82 @@
+/* Check that the bswap32 pattern is generated as swap.b and swap.w
+ instructions. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "swap.w" 7 } } */
+/* { dg-final { scan-assembler-times "swap.b" 16 } } */
+/* { dg-final { scan-assembler-times "extu.w" 2 } } */
+/* { dg-final { scan-assembler-times "mov" 1 } } */
+/* { dg-final { scan-assembler-not "{shll8|shlr8|shld|shad}" } } */
+
+int
+test_func_00 (int a)
+{
+ /* 1x swap.w
+ 2x swap.b */
+ return __builtin_bswap32 (a);
+}
+
+unsigned int
+test_func_01 (unsigned int a)
+{
+ /* 1x swap.w
+ 2x swap.b */
+ return __builtin_bswap32 (a);
+}
+
+int
+test_func_02 (int a)
+{
+ /* 1x swap.w
+ 2x swap.b */
+ return (((a >> 0) & 0xFF) << 24)
+ | (((a >> 8) & 0xFF) << 16)
+ | (((a >> 16) & 0xFF) << 8)
+ | (((a >> 24) & 0xFF) << 0);
+}
+
+unsigned int
+test_func_03 (unsigned int a)
+{
+ /* 1x swap.w
+ 2x swap.b */
+ return (((a >> 0) & 0xFF) << 24)
+ | (((a >> 8) & 0xFF) << 16)
+ | (((a >> 16) & 0xFF) << 8)
+ | (((a >> 24) & 0xFF) << 0);
+}
+
+int
+test_func_04 (int a)
+{
+ /* 1x swap.b
+ 1x extu.w */
+ return __builtin_bswap32 (a) >> 16;
+}
+
+unsigned short
+test_func_05 (unsigned short a)
+{
+ /* 1x swap.b
+ 1x extu.w */
+ return __builtin_bswap32 (a) >> 16;
+}
+
+long long
+test_func_06 (long long a)
+{
+ /* 2x swap.w
+ 4x swap.b */
+ return __builtin_bswap64 (a);
+}
+
+long long
+test_func_07 (long long a)
+{
+ /* 1x swap.w
+ 2x swap.b
+ 1x mov #0,Rn */
+ return __builtin_bswap64 (a) >> 32;
+}
+
diff --git a/gcc/testsuite/gcc.target/sh/pr53976-1.c b/gcc/testsuite/gcc.target/sh/pr53976-1.c
new file mode 100644
index 0000000000..4893b0668a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53976-1.c
@@ -0,0 +1,41 @@
+/* Check that the SH specific sh_optimize_sett_clrt RTL optimization pass
+ works as expected. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "clrt" 2 } } */
+/* { dg-final { scan-assembler-times "sett" 1 } } */
+
+long long
+test_00 (long long a, long long b, long long c, int d)
+{
+ /* One of the blocks should have a clrt and the other one should not. */
+ if (d > 5)
+ return a + b;
+ else
+ return a + c;
+}
+
+long long
+test_01 (long long a, long long b)
+{
+ /* Must see a clrt because T bit is undefined at function entry. */
+ return a + b;
+}
+
+int
+test_02 (const char* a)
+{
+ /* Must not see a sett after the inlined strlen. */
+ return __builtin_strlen (a);
+}
+
+int
+test_03 (int a, int b, int c, int d)
+{
+ /* One of the blocks should have a sett and the other one should not. */
+ if (d > 4)
+ return a + b + 1;
+ else
+ return a + c + 1;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr53988.c b/gcc/testsuite/gcc.target/sh/pr53988.c
new file mode 100644
index 0000000000..a2e7213cd8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr53988.c
@@ -0,0 +1,74 @@
+/* Check that the tst Rm,Rn instruction is generated for QImode and HImode
+ values loaded from memory. If everything goes as expected we won't see
+ any sign/zero extensions or and ops. On SH2A we don't expect to see the
+ movu insn. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "tst\tr" 8 } } */
+/* { dg-final { scan-assembler-not "tst\t#255" } } */
+/* { dg-final { scan-assembler-not "exts|extu|and|movu" } } */
+
+int
+test00 (char* a, char* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test01 (unsigned char* a, unsigned char* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test02 (short* a, short* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test03 (unsigned short* a, unsigned short* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test04 (char* a, short* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test05 (short* a, char* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test06 (int* a, char* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
+
+int
+test07 (int* a, short* b, int c, int d)
+{
+ if (*a & *b)
+ return c;
+ return d;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-1.c b/gcc/testsuite/gcc.target/sh/pr54089-1.c
new file mode 100644
index 0000000000..3eb700ad26
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-1.c
@@ -0,0 +1,174 @@
+/* Check that the rotcr instruction is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "rotcr" 24 } } */
+/* { dg-final { scan-assembler-times "shll\t" 1 } } */
+
+typedef char bool;
+
+long long
+test_00 (long long a)
+{
+ return a >> 1;
+}
+
+unsigned int
+test_01 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 1) | (r << 31));
+}
+
+unsigned int
+test_02 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 2) | (r << 31));
+}
+
+unsigned int
+test_03 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 3) | (r << 31));
+}
+
+unsigned int
+test_04 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 4) | (r << 31));
+}
+
+unsigned int
+test_05 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 5) | (r << 31));
+}
+
+unsigned int
+test_06 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 6) | (r << 31));
+}
+
+unsigned int
+test_07 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 7) | (r << 31));
+}
+
+unsigned int
+test_08 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 8) | (r << 31));
+}
+
+unsigned int
+test_09 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a >> 31) | (r << 31));
+}
+
+int
+test_10 (int a, int b)
+{
+ bool r = a == b;
+ return r << 31;
+}
+
+unsigned int
+test_11 (unsigned int a, int b)
+{
+ /* 1x shlr, 1x rotcr */
+ return (a >> 1) | (b << 31);
+}
+
+unsigned int
+test_12 (unsigned int a, int b)
+{
+ return (a >> 2) | (b << 31);
+}
+
+unsigned int
+test_13 (unsigned int a, int b)
+{
+ return (a >> 3) | (b << 31);
+}
+
+unsigned int
+test_14 (unsigned int a, int b)
+{
+ /* 1x shll, 1x rotcr */
+ bool r = b < 0;
+ return ((a >> 1) | (r << 31));
+}
+
+unsigned int
+test_15 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 1) | (r << 31));
+}
+
+unsigned int
+test_16 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 2) | (r << 31));
+}
+
+unsigned int
+test_17 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 3) | (r << 31));
+}
+
+unsigned int
+test_18 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 4) | (r << 31));
+}
+
+unsigned int
+test_19 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 5) | (r << 31));
+}
+
+unsigned int
+test_20 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 6) | (r << 31));
+}
+
+unsigned int
+test_21 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 7) | (r << 31));
+}
+
+unsigned int
+test_22 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 8) | (r << 31));
+}
+
+unsigned int
+test_23 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a >> 31) | (r << 31));
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-2.c b/gcc/testsuite/gcc.target/sh/pr54089-2.c
new file mode 100644
index 0000000000..17466f3e19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-2.c
@@ -0,0 +1,22 @@
+/* Check that for dynamic logical right shifts with a constant the negated
+ constant is loaded directly, instead of loading the postitive constant
+ and negating it separately. This was a case that happened at optimization
+ level -O2 and looked like:
+ cmp/eq r6,r5
+ mov #30,r1
+ neg r1,r1
+ shld r1,r4
+ mov r4,r0
+ rts
+ rotcr r0 */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m3* -m2a* -m4*" } } */
+/* { dg-final { scan-assembler-not "neg" } } */
+
+unsigned int
+test (unsigned int a, int b, int c)
+{
+ unsigned char r = b == c;
+ return ((a >> 31) | (r << 31));
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-3.c b/gcc/testsuite/gcc.target/sh/pr54089-3.c
new file mode 100644
index 0000000000..abdb021cad
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-3.c
@@ -0,0 +1,40 @@
+/* The dynamic shift library functions truncate the shift count to 5 bits.
+ Verify that this is taken into account and no extra shift count
+ truncations are generated before the library call. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m1*" "-m2" "-m2e*" } } */
+/* { dg-final { scan-assembler-not "and" } } */
+/* { dg-final { scan-assembler-not "#31" } } */
+
+int
+test00 (unsigned int a, int* b, int c, int* d, unsigned int e)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += d[i] + b[i] + (e << (i & 31));
+ return s;
+}
+
+int
+test01 (unsigned int a, int* b, int c, int* d, unsigned int e)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += d[i] + b[i] + (e >> (i & 31));
+ return s;
+}
+
+int
+test03 (unsigned int a, unsigned int b)
+{
+ return b << (a & 31);
+}
+
+unsigned int
+test04 (unsigned int a, int b)
+{
+ return a >> (b & 31);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-4.c b/gcc/testsuite/gcc.target/sh/pr54089-4.c
new file mode 100644
index 0000000000..e01e51c0a3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-4.c
@@ -0,0 +1,15 @@
+/* Check that the rotcr instruction is generated when shifting the
+ negated T bit on non-SH2A. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" "-m2a*" } { "" } } */
+/* { dg-final { scan-assembler-times "rotcr" 1 } } */
+/* { dg-final { scan-assembler-times "tst" 1 } } */
+/* { dg-final { scan-assembler-times "movt" 1 } } */
+
+int
+test_00 (int a, int b)
+{
+ int r = a != b;
+ return r << 31;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-5.c b/gcc/testsuite/gcc.target/sh/pr54089-5.c
new file mode 100644
index 0000000000..decb9db950
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-5.c
@@ -0,0 +1,14 @@
+/* Check that the movrt rotr instruction sequence is generated when shifting
+ the negated T bit on SH2A. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "movrt" 1 } } */
+/* { dg-final { scan-assembler-times "rotr" 1 } } */
+
+int
+test_00 (int a, int b)
+{
+ int r = a != b;
+ return r << 31;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-6.c b/gcc/testsuite/gcc.target/sh/pr54089-6.c
new file mode 100644
index 0000000000..577690dd83
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-6.c
@@ -0,0 +1,36 @@
+/* Check that the rotr and rotl instructions are generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "rotr" 2 } } */
+/* { dg-final { scan-assembler-times "rotl" 3 } } */
+
+int
+test_00 (int a)
+{
+ return (a << 1) | ((a >> 31) & 1);
+}
+
+int
+test_01 (int a)
+{
+ return (a << 1) | ((unsigned int)a >> 31);
+}
+
+int
+test_02 (int a)
+{
+ return ((unsigned int)a >> 1) | (a << 31);
+}
+
+int
+test_03 (int a)
+{
+ return ((a >> 1) & 0x7FFFFFFF) | (a << 31);
+}
+
+int
+test_04 (int a)
+{
+ return a + a + ((a >> 31) & 1);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-7.c b/gcc/testsuite/gcc.target/sh/pr54089-7.c
new file mode 100644
index 0000000000..0476f75d19
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-7.c
@@ -0,0 +1,63 @@
+/* Check that the rotcr instruction is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "rotcr" 4 } } */
+/* { dg-final { scan-assembler-not "movt" } } */
+/* { dg-final { scan-assembler-not "or\t" } } */
+/* { dg-final { scan-assembler-not "rotr" } } */
+/* { dg-final { scan-assembler-not "and" } } */
+
+typedef char bool;
+
+int
+test_00 (int* a, int* b)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (t << 31) | (r >> 1);
+ }
+ return r;
+}
+
+int
+test_01 (int* a, int* b)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (t << 31) | (r >> 2);
+ }
+ return r;
+}
+
+int
+test_02 (int* a, int* b)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (t << 31) | (r >> 3);
+ }
+ return r;
+}
+
+unsigned int
+test_03 (const bool* a)
+{
+ int i;
+ unsigned int r = 0;
+ for (i = 0; i < 32; ++i)
+ {
+ bool t = a[i];
+ r = (t << 31) | (r >> 1);
+ }
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-8.c b/gcc/testsuite/gcc.target/sh/pr54089-8.c
new file mode 100644
index 0000000000..d2cced75a5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-8.c
@@ -0,0 +1,203 @@
+/* Check that the rotcl instruction is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "rotcl" 28 } } */
+
+typedef char bool;
+
+long long
+test_00 (long long a)
+{
+ return a << 1;
+}
+
+unsigned int
+test_01 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 1) | r);
+}
+
+unsigned int
+test_02 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 2) | r);
+}
+
+unsigned int
+test_03 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 3) | r);
+}
+
+unsigned int
+test_04 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 4) | r);
+}
+
+unsigned int
+test_05 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 5) | r);
+}
+
+unsigned int
+test_06 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 6) | r);
+}
+
+unsigned int
+test_07 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 7) | r);
+}
+
+unsigned int
+test_08 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 8) | r);
+}
+
+unsigned int
+test_09 (unsigned int a, int b, int c)
+{
+ bool r = b == c;
+ return ((a << 31) | r);
+}
+
+unsigned int
+test_10 (unsigned int a, int b)
+{
+ /* 1x shlr, 1x rotcl */
+ return (a << 1) | (b & 1);
+}
+
+unsigned int
+test_11 (unsigned int a, int b)
+{
+ /* 1x shlr, 1x rotcl (+1x add as shll) */
+ return (a << 2) | (b & 1);
+}
+
+unsigned int
+test_12 (unsigned int a, int b)
+{
+ /* 1x shlr, 1x shll2, 1x rotcl */
+ return (a << 3) | (b & 1);
+}
+
+unsigned int
+test_13 (unsigned int a, int b)
+{
+ /* 1x shll, 1x rotcl */
+ bool r = b < 0;
+ return (a << 1) | r;
+}
+
+unsigned int
+test_14 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 1) | r);
+}
+
+unsigned int
+test_15 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 11) | r);
+}
+
+unsigned int
+test_16 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 3) | r);
+}
+
+unsigned int
+test_17 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 4) | r);
+}
+
+unsigned int
+test_18 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 5) | r);
+}
+
+unsigned int
+test_19 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 6) | r);
+}
+
+unsigned int
+test_20 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 7) | r);
+}
+
+unsigned int
+test_21 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 8) | r);
+}
+
+unsigned int
+test_22 (unsigned int a, int b, int c)
+{
+ bool r = b != c;
+ return ((a << 31) | r);
+}
+
+unsigned int
+test_23 (unsigned int a, int b, int c)
+{
+ /* 1x shll, 1x rotcl */
+ return (a >> 31) | (b << 13);
+}
+
+unsigned int
+test_24 (unsigned int a, unsigned int b)
+{
+ /* 1x shll, 1x rotcl */
+ return (a >> 31) | (b << 1);
+}
+
+unsigned int
+test_25 (unsigned int a, unsigned int b)
+{
+ /* 1x shll, 1x rotcl */
+ return (a >> 31) | (b << 3);
+}
+
+unsigned int
+test_26 (unsigned int a, unsigned int b)
+{
+ /* 1x shll, 1x rotcl */
+ return (b << 3) | (a >> 31);
+}
+
+unsigned int
+test_27 (unsigned int a, unsigned int b)
+{
+ /* 1x shlr, 1x rotcl */
+ return (a << 1) | ((b >> 4) & 1);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54089-9.c b/gcc/testsuite/gcc.target/sh/pr54089-9.c
new file mode 100644
index 0000000000..8aa15df860
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54089-9.c
@@ -0,0 +1,63 @@
+/* Check that the rotcr instruction is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "rotcl" 4 } } */
+/* { dg-final { scan-assembler-not "movt" } } */
+/* { dg-final { scan-assembler-not "or\t" } } */
+/* { dg-final { scan-assembler-not "rotl" } } */
+/* { dg-final { scan-assembler-not "and" } } */
+
+typedef char bool;
+
+int
+test_00 (int* a, int* b)
+{
+ int i;
+ int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (r << 1) | t;
+ }
+ return r;
+}
+
+int
+test_01 (int* a, int* b)
+{
+ int i;
+ int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (r << 2) | t;
+ }
+ return r;
+}
+
+int
+test_02 (int* a, int* b)
+{
+ int i;
+ int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i] == b[i];
+ r = (r << 3) | t;
+ }
+ return r;
+}
+
+int
+test_03 (const bool* a)
+{
+ int i;
+ int r = 0;
+ for (i = 0; i < 16; ++i)
+ {
+ bool t = a[i];
+ r = (r << 1) | (t & 1);
+ }
+ return r;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54236-1.c b/gcc/testsuite/gcc.target/sh/pr54236-1.c
new file mode 100644
index 0000000000..f7568a92c5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54236-1.c
@@ -0,0 +1,83 @@
+/* Tests to check the utilization of addc, subc and negc instructions in
+ special cases. If everything works as expected we won't see any
+ movt instructions in these cases. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "addc" 4 } } */
+/* { dg-final { scan-assembler-times "subc" 3 } } */
+/* { dg-final { scan-assembler-times "sett" 5 } } */
+/* { dg-final { scan-assembler-times "negc" 1 } } */
+/* { dg-final { scan-assembler-not "movt" } } */
+
+int
+test_00 (int a, int b, int c, int d)
+{
+ /* 1x addc, 1x sett */
+ return a + b + 1;
+}
+
+int
+test_01 (int a, int b, int c, int d)
+{
+ /* 1x addc */
+ return a + (c == d);
+}
+
+int
+test_02 (int a, int b, int c, int d)
+{
+ /* 1x subc, 1x sett */
+ return a - b - 1;
+}
+
+int
+test_03 (int a, int b, int c, int d)
+{
+ /* 1x subc */
+ return a - (c == d);
+}
+
+int
+test_04 (int a, int b, int c, int d)
+{
+ /* 1x addc, 1x sett */
+ return a + b + c + 1;
+}
+
+int
+test_05 (int a, int b, int c, int d)
+{
+ /* 1x subc, 1x sett */
+ return a - b - c - 1;
+}
+
+int
+test_06 (int a, int b, int c, int d)
+{
+ /* 1x negc */
+ return 0 - a - (b == c);
+}
+
+int
+test_07 (int *vec)
+{
+ /* Must not see a 'sett' or 'addc' here.
+ This is a case where combine tries to produce
+ 'a + (0 - b) + 1' out of 'a - b + 1'. */
+ int z = vec[0];
+ int vi = vec[1];
+ int zi = vec[2];
+
+ if (zi != 0 && z < -1)
+ vi -= (((vi >> 7) & 0x01) << 1) - 1;
+
+ return vi;
+}
+
+int
+test_08 (int a)
+{
+ /* 1x addc, 1x sett */
+ return (a << 1) + 1;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54236-2.c b/gcc/testsuite/gcc.target/sh/pr54236-2.c
new file mode 100644
index 0000000000..b3cf48c9d3
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54236-2.c
@@ -0,0 +1,270 @@
+/* Tests to check the utilization of the addc instruction in special cases.
+ If everything works as expected we won't see any movt instructions in
+ these cases. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "addc" 37 } } */
+/* { dg-final { scan-assembler-times "shlr" 23 } } */
+/* { dg-final { scan-assembler-times "shll" 14 } } */
+/* { dg-final { scan-assembler-times "add\t" 12 } } */
+/* { dg-final { scan-assembler-not "movt" } } */
+
+int
+test_000 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return a + (b & 1);
+}
+
+int
+test_001 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return a + b + (c & 1);
+}
+
+int
+test_002 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + b + c + (d & 1);
+}
+
+int
+test_003 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return (b & 1) + a;
+}
+
+int
+test_004 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return a + (c & 1) + b;
+}
+
+int
+test_005 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + b + (d & 1) + c;
+}
+
+int
+test_006 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return (c & 1) + a + b;
+}
+
+int
+test_007 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + (d & 1) + b + c;
+}
+
+int
+test_008 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return (d & 1) + a + b + c;
+}
+
+int
+test_009 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return a + b + (b & 1);
+}
+
+int
+test_010 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return a + (b & 1) + b;
+}
+
+int
+test_011 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x addc
+ return (b & 1) + a + b;
+}
+
+int
+test_012 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + b + d + (b & 1);
+}
+
+int
+test_013 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + d + (b & 1) + b;
+}
+
+int
+test_014 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return a + (b & 1) + d + b;
+}
+
+int
+test_015 (int a, int c, int b, int d)
+{
+ // 1x shlr, 1x add, 1x addc
+ return (b & 1) + a + d + b;
+}
+
+int
+test_016 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return a + (a & 1);
+}
+
+int
+test_017 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return a + a + (a & 1);
+}
+
+int
+test_018 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return a + (a & 1) + a;
+}
+
+int
+test_019 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return (a & 1) + a + a;
+}
+
+int
+test_020 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return b + b + (a & 1);
+}
+
+int
+test_021 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return b + (a & 1) + b;
+}
+
+int
+test_022 (int a, int b, int c, int d)
+{
+ // 1x shlr, 1x addc
+ return (a & 1) + b + b;
+}
+
+int
+test_023 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + ((b >> 31) & 1);
+}
+
+int
+test_024 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return ((b >> 31) & 1) + a;
+}
+
+int
+test_025 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return ((a >> 31) & 1) + a;
+}
+
+int
+test_026 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + ((a >> 31) & 1);
+}
+
+int
+test_027 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + b + ((c >> 31) & 1);
+}
+
+int
+test_028 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + ((c >> 31) & 1) + b;
+}
+
+int
+test_029 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return ((c >> 31) & 1) + a + b;
+}
+
+int
+test_030 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc, 1x add
+ return a + b + c + ((d >> 31) & 1);
+}
+
+int
+test_031 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc, 1x add
+ return a + b + ((d >> 31) & 1) + c;
+}
+
+int
+test_032 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc, 1x add
+ return a + ((d >> 31) & 1) + b + c;
+}
+
+int
+test_033 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc, 1x add
+ return ((d >> 31) & 1) + a + b + c;
+}
+
+int
+test_034 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + a + ((d >> 31) & 1);
+}
+
+int
+test_035 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return a + ((d >> 31) & 1) + a;
+}
+
+int
+test_036 (int a, int b, int c, int d)
+{
+ // 1x shll, 1x addc
+ return ((d >> 31) & 1) + a + a;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54386.c b/gcc/testsuite/gcc.target/sh/pr54386.c
new file mode 100644
index 0000000000..ec52d89405
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54386.c
@@ -0,0 +1,41 @@
+/* Check that the inlined mem load is not handled as unaligned load. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "shll|extu|or" } } */
+
+static inline int
+readint0 (int* x)
+{
+ return *x;
+}
+
+int
+test0 (int* x)
+{
+ return readint0 (x);
+}
+
+inline int
+readint1 (int* x)
+{
+ return *x;
+}
+
+int
+test1 (int* x)
+{
+ return readint1 (x);
+}
+
+static int
+readint2 (int* x)
+{
+ return *x;
+}
+
+int
+test2 (int* x)
+{
+ return readint2 (x);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54602-1.c b/gcc/testsuite/gcc.target/sh/pr54602-1.c
new file mode 100644
index 0000000000..bd402b3a0c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54602-1.c
@@ -0,0 +1,15 @@
+/* Verify that the delay slot is stuffed with register pop insns for normal
+ (i.e. not interrupt handler) function returns. If everything goes as
+ expected we won't see any nop insns. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "nop" } } */
+
+int test00 (int a, int b);
+
+int
+test01 (int a, int b, int c, int d)
+{
+ return test00 (a, b) + c;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54602-2.c b/gcc/testsuite/gcc.target/sh/pr54602-2.c
new file mode 100644
index 0000000000..05592ddbfd
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54602-2.c
@@ -0,0 +1,15 @@
+/* Verify that the delay slot is not stuffed with register pop insns for
+ interrupt handler function returns on SH1* and SH2* targets, where the
+ rte insn uses the stack pointer. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m1*" "-m2*" } } */
+/* { dg-final { scan-assembler-times "nop" 1 } } */
+
+int test00 (int a, int b);
+
+int __attribute__ ((interrupt_handler))
+test01 (int a, int b, int c, int d)
+{
+ return test00 (a, b) + c;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54602-3.c b/gcc/testsuite/gcc.target/sh/pr54602-3.c
new file mode 100644
index 0000000000..5d6a75a70a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54602-3.c
@@ -0,0 +1,12 @@
+/* Verify that the rte delay slot is not stuffed with register pop insns
+ which touch the banked registers r0..r7 on SH3* and SH4* targets. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m3*" "-m4*" } } */
+/* { dg-final { scan-assembler-times "nop" 1 } } */
+
+int __attribute__ ((interrupt_handler))
+test00 (int a, int b, int c, int d)
+{
+ return a + b;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54602-4.c b/gcc/testsuite/gcc.target/sh/pr54602-4.c
new file mode 100644
index 0000000000..78fb9096e9
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54602-4.c
@@ -0,0 +1,15 @@
+/* Verify that the delay slot is stuffed with register pop insns on SH3* and
+ SH4* targets, where the stack pointer is not used by the rte insn. If
+ everything works out, we won't see a nop insn. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m3*" "-m4*" } } */
+/* { dg-final { scan-assembler-not "nop" } } */
+
+int test00 (int a, int b);
+
+int __attribute__ ((interrupt_handler))
+test01 (int a, int b, int c, int d)
+{
+ return test00 (a, b) + c;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54680.c b/gcc/testsuite/gcc.target/sh/pr54680.c
new file mode 100644
index 0000000000..9171eeaf65
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54680.c
@@ -0,0 +1,66 @@
+/* Verify that the fsca input value is not converted to float and then back
+ to int. Notice that we can't count just "lds" insns because mode switches
+ use "lds.l". */
+/* { dg-do compile } */
+/* { dg-options "-O2 -mfsca -funsafe-math-optimizations" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2*" "-m3*" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fsca" 7 } } */
+/* { dg-final { scan-assembler-times "shad" 1 } } */
+/* { dg-final { scan-assembler-times "lds\t" 6 } } */
+/* { dg-final { scan-assembler-times "fmul" 2 } } */
+/* { dg-final { scan-assembler-times "ftrc" 1 } } */
+
+#include <math.h>
+
+static const float pi = 3.14159265359f;
+
+float
+test00 (int x)
+{
+ /* 1x shad, 1x lds, 1x fsca */
+ return sinf ( (x >> 8) * (2*pi) / (1 << 16));
+}
+
+float
+test01 (int x)
+{
+ /* 1x lds, 1x fsca */
+ return sinf (x * (2*pi) / 65536);
+}
+
+float
+test02 (int x)
+{
+ /* 1x lds, 1x fsca */
+ return sinf (x * (2*pi / 65536));
+}
+
+float
+test03 (int x)
+{
+ /* 1x lds, 1x fsca */
+ float scale = 2*pi / 65536;
+ return sinf (x * scale);
+}
+
+float
+test04 (int x)
+{
+ /* 1x lds, 1x fsca */
+ return cosf (x / 65536.0f * 2*pi);
+}
+
+float
+test05 (int x)
+{
+ /* 1x lds, 1x fsca, 1x fmul */
+ float scale = 2*pi / 65536;
+ return sinf (x * scale) * cosf (x * scale);
+}
+
+float
+test_06 (float x)
+{
+ /* 1x fmul, 1x ftrc, 1x fsca */
+ return sinf (x);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54685.c b/gcc/testsuite/gcc.target/sh/pr54685.c
new file mode 100644
index 0000000000..111a12013d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54685.c
@@ -0,0 +1,58 @@
+/* Check that a comparison 'unsigned int <= 0x7FFFFFFF' results in code
+ utilizing the cmp/pz instruction. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-not "not\[ \t\]" } } */
+/* { dg-final { scan-assembler-times "cmp/pz" 7 } } */
+/* { dg-final { scan-assembler-times "shll" 1 } } */
+/* { dg-final { scan-assembler-times "movt" 4 } } */
+
+int
+test_00 (unsigned int a)
+{
+ return !(a > 0x7FFFFFFF);
+}
+
+int
+test_01 (unsigned int a)
+{
+ return !(a > 0x7FFFFFFF) ? -5 : 10;
+}
+
+int
+test_02 (unsigned int a)
+{
+ /* 1x shll, 1x movt */
+ return a >= 0x80000000;
+}
+
+int
+test_03 (unsigned int a)
+{
+ return a >= 0x80000000 ? -5 : 10;
+}
+
+int
+test_04 (unsigned int a)
+{
+ return a <= 0x7FFFFFFF;
+}
+
+int
+test_05 (unsigned int a)
+{
+ return a <= 0x7FFFFFFF ? -5 : 10;
+}
+
+int
+test_06 (unsigned int a)
+{
+ return a < 0x80000000;
+}
+
+int
+test_07 (unsigned int a)
+{
+ return a < 0x80000000 ? -5 : 10;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54760-1.c b/gcc/testsuite/gcc.target/sh/pr54760-1.c
new file mode 100644
index 0000000000..4437511cf7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54760-1.c
@@ -0,0 +1,20 @@
+/* Check that the __builtin_thread_pointer and __builtin_set_thread_pointer
+ built-in functions result in gbr store / load instructions. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "ldc" 1 } } */
+/* { dg-final { scan-assembler-times "stc" 1 } } */
+/* { dg-final { scan-assembler-times "gbr" 2 } } */
+
+void*
+test00 (void)
+{
+ return __builtin_thread_pointer ();
+}
+
+void
+test01 (void* p)
+{
+ __builtin_set_thread_pointer (p);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54760-2.c b/gcc/testsuite/gcc.target/sh/pr54760-2.c
new file mode 100644
index 0000000000..4a3561a56e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54760-2.c
@@ -0,0 +1,259 @@
+/* Check that thread pointer relative memory accesses are converted to
+ gbr displacement address modes. If we see a gbr register store
+ instruction something is not working properly. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "stc\tgbr" 0 } } */
+
+/* ---------------------------------------------------------------------------
+ Simple GBR load.
+*/
+#define func(name, rettype, type, disp)\
+ rettype \
+ name ## _tp_load (void) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ return tp[disp]; \
+ }
+
+func (test00, int, int, 0)
+func (test01, int, int, 5)
+func (test02, int, int, 255)
+
+func (test03, int, short, 0)
+func (test04, int, short, 5)
+func (test05, int, short, 255)
+
+func (test06, int, char, 0)
+func (test07, int, char, 5)
+func (test08, int, char, 255)
+
+func (test09, int, unsigned int, 0)
+func (test10, int, unsigned int, 5)
+func (test11, int, unsigned int, 255)
+
+func (test12, int, unsigned short, 0)
+func (test13, int, unsigned short, 5)
+func (test14, int, unsigned short, 255)
+
+func (test15, int, unsigned char, 0)
+func (test16, int, unsigned char, 5)
+func (test17, int, unsigned char, 255)
+
+func (test18, long long, long long, 0)
+func (test19, long long, long long, 5)
+func (test20, long long, long long, 127)
+
+func (test21, long long, unsigned long long, 0)
+func (test22, long long, unsigned long long, 5)
+func (test23, long long, unsigned long long, 127)
+
+#undef func
+
+/* ---------------------------------------------------------------------------
+ Simple GBR store.
+*/
+#define func(name, argtype, type, disp)\
+ void \
+ name ## _tp_store (argtype a) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ tp[disp] = (type)a; \
+ }
+
+func (test00, int, int, 0)
+func (test01, int, int, 5)
+func (test02, int, int, 255)
+
+func (test03, int, short, 0)
+func (test04, int, short, 5)
+func (test05, int, short, 255)
+
+func (test06, int, char, 0)
+func (test07, int, char, 5)
+func (test08, int, char, 255)
+
+func (test09, int, unsigned int, 0)
+func (test10, int, unsigned int, 5)
+func (test11, int, unsigned int, 255)
+
+func (test12, int, unsigned short, 0)
+func (test13, int, unsigned short, 5)
+func (test14, int, unsigned short, 255)
+
+func (test15, int, unsigned char, 0)
+func (test16, int, unsigned char, 5)
+func (test17, int, unsigned char, 255)
+
+func (test18, long long, long long, 0)
+func (test19, long long, long long, 5)
+func (test20, long long, long long, 127)
+
+func (test21, long long, unsigned long long, 0)
+func (test22, long long, unsigned long long, 5)
+func (test23, long long, unsigned long long, 127)
+
+#undef func
+
+/* ---------------------------------------------------------------------------
+ Arithmetic on the result of a GBR load.
+*/
+#define func(name, retargtype, type, disp, op, opname)\
+ retargtype \
+ name ## _tp_load_arith_ ##opname (retargtype a) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ return tp[disp] op a; \
+ }
+
+#define funcs(op, opname) \
+ func (test00, int, int, 0, op, opname) \
+ func (test01, int, int, 5, op, opname) \
+ func (test02, int, int, 255, op, opname) \
+ func (test03, int, short, 0, op, opname) \
+ func (test04, int, short, 5, op, opname) \
+ func (test05, int, short, 255, op, opname) \
+ func (test06, int, char, 0, op, opname) \
+ func (test07, int, char, 5, op, opname) \
+ func (test08, int, char, 255, op, opname) \
+ func (test09, int, unsigned int, 0, op, opname) \
+ func (test10, int, unsigned int, 5, op, opname) \
+ func (test11, int, unsigned int, 255, op, opname) \
+ func (test12, int, unsigned short, 0, op, opname) \
+ func (test13, int, unsigned short, 5, op, opname) \
+ func (test14, int, unsigned short, 255, op, opname) \
+ func (test15, int, unsigned char, 0, op, opname) \
+ func (test16, int, unsigned char, 5, op, opname) \
+ func (test17, int, unsigned char, 255, op, opname) \
+ func (test18, long long, long long, 0, op, opname) \
+ func (test19, long long, long long, 5, op, opname) \
+ func (test20, long long, long long, 127, op, opname) \
+ func (test21, long long, unsigned long long, 0, op, opname) \
+ func (test22, long long, unsigned long long, 5, op, opname) \
+ func (test23, long long, unsigned long long, 127, op, opname) \
+
+funcs (+, plus)
+funcs (-, minus)
+funcs (*, mul)
+funcs (&, and)
+funcs (|, or)
+funcs (^, xor)
+
+#undef funcs
+#undef func
+
+/* ---------------------------------------------------------------------------
+ Arithmetic of the result of two GBR loads.
+*/
+#define func(name, rettype, type, disp0, disp1, op, opname)\
+ rettype \
+ name ## _tp_load_load_arith_ ##opname (void) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ return tp[disp0] op tp[disp1]; \
+ }
+
+#define funcs(op, opname) \
+ func (test00, int, int, 0, 5, op, opname) \
+ func (test02, int, int, 1, 255, op, opname) \
+ func (test03, int, short, 0, 5, op, opname) \
+ func (test05, int, short, 1, 255, op, opname) \
+ func (test06, int, char, 0, 5, op, opname) \
+ func (test08, int, char, 1, 255, op, opname) \
+ func (test09, int, unsigned int, 0, 5, op, opname) \
+ func (test11, int, unsigned int, 1, 255, op, opname) \
+ func (test12, int, unsigned short, 0, 5, op, opname) \
+ func (test14, int, unsigned short, 1, 255, op, opname) \
+ func (test15, int, unsigned char, 0, 5, op, opname) \
+ func (test17, int, unsigned char, 1, 255, op, opname) \
+ func (test18, long long, long long, 0, 5, op, opname) \
+ func (test19, long long, long long, 1, 127, op, opname) \
+ func (test20, long long, unsigned long long, 0, 5, op, opname) \
+ func (test21, long long, unsigned long long, 1, 127, op, opname) \
+
+funcs (+, plus)
+funcs (-, minus)
+funcs (*, mul)
+funcs (&, and)
+funcs (|, or)
+funcs (^, xor)
+
+#undef funcs
+#undef func
+
+/* ---------------------------------------------------------------------------
+ GBR load GBR store copy.
+*/
+
+#define func(name, type, disp0, disp1)\
+ void \
+ name ## _tp_copy (void) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ tp[disp0] = tp[disp1]; \
+ }
+
+func (test00, int, 0, 5)
+func (test02, int, 1, 255)
+func (test03, short, 0, 5)
+func (test05, short, 1, 255)
+func (test06, char, 0, 5)
+func (test08, char, 1, 255)
+func (test09, unsigned int, 0, 5)
+func (test11, unsigned int, 1, 255)
+func (test12, unsigned short, 0, 5)
+func (test14, unsigned short, 1, 255)
+func (test15, unsigned char, 0, 5)
+func (test17, unsigned char, 1, 255)
+func (test18, long long, 0, 5)
+func (test19, long long, 1, 127)
+func (test20, unsigned long long, 0, 5)
+func (test21, unsigned long long, 1, 127)
+
+#undef func
+
+/* ---------------------------------------------------------------------------
+ GBR load, arithmetic, GBR store
+*/
+
+#define func(name, argtype, type, disp, op, opname)\
+ void \
+ name ## _tp_load_arith_store_ ##opname (argtype a) \
+ { \
+ type* tp = (type*)__builtin_thread_pointer (); \
+ tp[disp] op a; \
+ }
+
+#define funcs(op, opname) \
+ func (test00, int, int, 0, op, opname) \
+ func (test01, int, int, 5, op, opname) \
+ func (test02, int, int, 255, op, opname) \
+ func (test03, int, short, 0, op, opname) \
+ func (test04, int, short, 5, op, opname) \
+ func (test05, int, short, 255, op, opname) \
+ func (test06, int, char, 0, op, opname) \
+ func (test07, int, char, 5, op, opname) \
+ func (test08, int, char, 255, op, opname) \
+ func (test09, int, unsigned int, 0, op, opname) \
+ func (test10, int, unsigned int, 5, op, opname) \
+ func (test11, int, unsigned int, 255, op, opname) \
+ func (test12, int, unsigned short, 0, op, opname) \
+ func (test13, int, unsigned short, 5, op, opname) \
+ func (test14, int, unsigned short, 255, op, opname) \
+ func (test15, int, unsigned char, 0, op, opname) \
+ func (test16, int, unsigned char, 5, op, opname) \
+ func (test17, int, unsigned char, 255, op, opname) \
+ func (test18, long long, long long, 0, op, opname) \
+ func (test19, long long, long long, 5, op, opname) \
+ func (test20, long long, long long, 127, op, opname) \
+ func (test21, long long, unsigned long long, 0, op, opname) \
+ func (test22, long long, unsigned long long, 5, op, opname) \
+ func (test23, long long, unsigned long long, 127, op, opname) \
+
+funcs (+=, plus)
+funcs (-=, minus)
+funcs (*=, mul)
+funcs (&=, and)
+funcs (|=, or)
+funcs (^=, xor)
diff --git a/gcc/testsuite/gcc.target/sh/pr54760-3.c b/gcc/testsuite/gcc.target/sh/pr54760-3.c
new file mode 100644
index 0000000000..678fb39542
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54760-3.c
@@ -0,0 +1,69 @@
+/* Check that these thread relative memory accesses play along with
+ surrounding code.
+ These should be moved to C torture tests once there are target
+ independent thread_pointer built-in functions available. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+
+int
+test00 (void* p, int x)
+{
+ int* tcb = (int*)__builtin_thread_pointer ();
+ int r = tcb[4];
+
+ __builtin_set_thread_pointer (p);
+
+ tcb = (int*)__builtin_thread_pointer ();
+ return tcb[255] + r;
+}
+
+int
+test01 (void)
+{
+ unsigned short* tcb = (unsigned short*)__builtin_thread_pointer ();
+ return tcb[500];
+}
+
+void
+test02 (int* x, int a, int b)
+{
+ int* tcb = (int*)__builtin_thread_pointer ();
+ tcb[50] = a;
+
+ __builtin_set_thread_pointer (x);
+
+ tcb = (int*)__builtin_thread_pointer ();
+ tcb[40] = b;
+}
+
+int
+test03 (const int* x, int c)
+{
+ volatile int* tcb = (volatile int*)__builtin_thread_pointer ();
+
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s ^= x[i] + tcb[40];
+
+ return s;
+}
+
+int
+test04 (const int* x, int c, int** xx, int d)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ {
+ volatile int* tcb = (volatile int*)__builtin_thread_pointer ();
+ tcb[20] = s;
+
+ __builtin_set_thread_pointer (xx[i]);
+
+ tcb = (volatile int*)__builtin_thread_pointer ();
+ s ^= x[i] + tcb[40] + d;
+ }
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr54760-4.c b/gcc/testsuite/gcc.target/sh/pr54760-4.c
new file mode 100644
index 0000000000..d21828196b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr54760-4.c
@@ -0,0 +1,19 @@
+/* Check that the GBR address optimization does not combine a gbr store
+ and its use when a function call is in between, when GBR is a call used
+ register, i.e. it is invalidated by function calls. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -fcall-used-gbr" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler "stc\tgbr" } } */
+
+extern int test00 (void);
+int
+test01 (int x)
+{
+ /* We must see a stc gbr,rn before the function call, because
+ a function call could modify the gbr. In this case the user requests
+ the old gbr value, before the function call. */
+ int* p = (int*)__builtin_thread_pointer ();
+ p[5] = test00 ();
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr55146.c b/gcc/testsuite/gcc.target/sh/pr55146.c
new file mode 100644
index 0000000000..91f09359d1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr55146.c
@@ -0,0 +1,50 @@
+/* Check that the 'extu.b' instruction is generated for short jump tables. */
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler "extu.b" } } */
+
+int
+test (int arg)
+{
+ int rc;
+ switch (arg)
+ {
+ case 0:
+ asm ("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "mov r4,%0"
+ : "=r" (rc)
+ : "r" (arg));
+ break;
+ case 1:
+ asm ("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "mov r5,%0"
+ : "=r" (rc)
+ : "r" (arg));
+ break;
+ case 2:
+ asm ("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "mov r6,%0"
+ : "=r" (rc)
+ : "r" (arg));
+ break;
+ case 3:
+ asm ("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "mov r7,%0"
+ : "=r" (rc)
+ : "r" (arg));
+ break;
+ case 4:
+ asm ("nop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "nop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\tnop\n\t"
+ "mov r8,%0"
+ : "=r" (rc)
+ : "r" (arg));
+ break;
+ }
+ return rc;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr55160.c b/gcc/testsuite/gcc.target/sh/pr55160.c
new file mode 100644
index 0000000000..dca15c9b5a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr55160.c
@@ -0,0 +1,25 @@
+/* Check that the decrement-and-test instruction is generated. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*"} { "" } } */
+/* { dg-final { scan-assembler-times "dt\tr" 2 } } */
+
+int
+test_00 (int* x, int c)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += x[i];
+ return s;
+}
+
+int
+test_01 (int* x, int c)
+{
+ int s = 0;
+ int i;
+ for (i = 0; i < c; ++i)
+ s += *--x;
+ return s;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr55303-1.c b/gcc/testsuite/gcc.target/sh/pr55303-1.c
new file mode 100644
index 0000000000..b77c5e10ee
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr55303-1.c
@@ -0,0 +1,87 @@
+/* Verify that the SH2A clips and clipu instructions are generated as
+ expected. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "clips.b" 2 } } */
+/* { dg-final { scan-assembler-times "clips.w" 2 } } */
+/* { dg-final { scan-assembler-times "clipu.b" 2 } } */
+/* { dg-final { scan-assembler-times "clipu.w" 2 } } */
+
+static inline int
+min (int a, int b)
+{
+ return a < b ? a : b;
+}
+
+static inline int
+max (int a, int b)
+{
+ return a < b ? b : a;
+}
+
+int
+test_00 (int a)
+{
+ /* 1x clips.b */
+ return max (-128, min (127, a));
+}
+
+int
+test_01 (int a)
+{
+ /* 1x clips.b */
+ return min (127, max (-128, a));
+}
+
+int
+test_02 (int a)
+{
+ /* 1x clips.w */
+ return max (-32768, min (32767, a));
+}
+
+int
+test_03 (int a)
+{
+ /* 1x clips.w */
+ return min (32767, max (-32768, a));
+}
+
+unsigned int
+test_04 (unsigned int a)
+{
+ /* 1x clipu.b */
+ return a > 255 ? 255 : a;
+}
+
+unsigned int
+test_05 (unsigned int a)
+{
+ /* 1x clipu.b */
+ return a >= 255 ? 255 : a;
+}
+
+unsigned int
+test_06 (unsigned int a)
+{
+ /* 1x clipu.w */
+ return a > 65535 ? 65535 : a;
+}
+
+unsigned int
+test_07 (unsigned int a)
+{
+ /* 1x clipu.w */
+ return a >= 65535 ? 65535 : a;
+}
+
+void
+test_08 (unsigned short a, unsigned short b, unsigned int* r)
+{
+ /* Must not see a clip insn here -- it is not needed. */
+ unsigned short x = a + b;
+ if (x > 65535)
+ x = 65535;
+ *r = x;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr55303-2.c b/gcc/testsuite/gcc.target/sh/pr55303-2.c
new file mode 100644
index 0000000000..34f706327d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr55303-2.c
@@ -0,0 +1,35 @@
+/* Verify that for SH2A smax/smin -> cbranch conversion is done properly
+ if the clips insn is not used and the expected comparison insns are
+ generated. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "cmp/pl" 4 } } */
+
+int
+test_00 (int a)
+{
+ /* 1x cmp/pl */
+ return a >= 0 ? a : 0;
+}
+
+int
+test_01 (int a)
+{
+ /* 1x cmp/pl */
+ return a <= 0 ? a : 0;
+}
+
+int
+test_02 (int a)
+{
+ /* 1x cmp/pl */
+ return a < 1 ? 1 : a;
+}
+
+int
+test_03 (int a)
+{
+ /* 1x cmp/pl */
+ return a < 1 ? a : 1;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr55303-3.c b/gcc/testsuite/gcc.target/sh/pr55303-3.c
new file mode 100644
index 0000000000..57c2f403e7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr55303-3.c
@@ -0,0 +1,15 @@
+/* Verify that the special case (umin (reg const_int 1)) results in the
+ expected instruction sequence on SH2A. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" } } */
+/* { dg-final { scan-assembler-times "tst" 1 } } */
+/* { dg-final { scan-assembler-times "movrt" 1 } } */
+
+unsigned int
+test_00 (unsigned int a)
+{
+ /* 1x tst
+ 1x movrt */
+ return a > 1 ? 1 : a;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr56547-1.c b/gcc/testsuite/gcc.target/sh/pr56547-1.c
new file mode 100644
index 0000000000..0c7c97e81d
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr56547-1.c
@@ -0,0 +1,19 @@
+/* Verify that the fmac insn is used for the expression 'a * b + a' and
+ 'a * a + a'.
+ This assumes that the default compiler setting is -ffp-contract=fast. */
+/* { dg-do compile } */
+/* { dg-options "-O1" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmac" 2 } } */
+
+float
+test_00 (float a, float b)
+{
+ return a * b + a;
+}
+
+float
+test_01 (float a)
+{
+ return a * a + a;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr56547-2.c b/gcc/testsuite/gcc.target/sh/pr56547-2.c
new file mode 100644
index 0000000000..2d36fa9c56
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr56547-2.c
@@ -0,0 +1,18 @@
+/* Verify that the fmac insn is used for the expression 'a * b + a' and
+ 'a * a + a' when -ffast-math is specified. */
+/* { dg-do compile } */
+/* { dg-options "-O1 -ffast-math" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "fmac" 2 } } */
+
+float
+test_00 (float a, float b)
+{
+ return a * b + a;
+}
+
+float
+test_01 (float a)
+{
+ return a * a + a;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr61996.c b/gcc/testsuite/gcc.target/sh/pr61996.c
new file mode 100644
index 0000000000..51a5f929d5
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr61996.c
@@ -0,0 +1,12 @@
+/* Check that the option -musermode has no effect on targets that do not
+ support user/privileged mode and that it does not interfere with option
+ -matomic-model=soft-imask. */
+/* { dg-do compile } */
+/* { dg-options "-matomic-model=soft-imask" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*"} { "-m1*" "-m2*" } } */
+
+int
+test (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pr6526.c b/gcc/testsuite/gcc.target/sh/pr6526.c
new file mode 100644
index 0000000000..a49b877b57
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pr6526.c
@@ -0,0 +1,64 @@
+/* Check that the XF registers are not clobbered by an integer division
+ that is done using double precision FPU division. */
+/* { dg-do run } */
+/* { dg-options "-O1 -mdiv=call-fp" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4*-single" "-m4*-single-only" } } */
+
+#include <assert.h>
+#include <stdlib.h>
+
+extern void __set_fpscr (int);
+
+void
+write_xf0 (float* f)
+{
+ __asm__ __volatile__ ("frchg; fmov.s @%0,fr0; frchg" : : "r" (f) : "memory");
+}
+
+void
+read_xf0 (float* f)
+{
+ __asm__ __volatile__ ("frchg; fmov.s fr0,@%0; frchg" : : "r" (f) : "memory");
+}
+
+int __attribute__ ((noinline))
+test_00 (int a, int b)
+{
+ return a / b;
+}
+
+unsigned int __attribute__ ((noinline))
+test_01 (unsigned a, unsigned b)
+{
+ return a / b;
+}
+
+int __attribute__ ((noinline))
+test_02 (int x)
+{
+ return x & 0;
+}
+
+int
+main (void)
+{
+ float test_value;
+ int r = 0;
+
+ /* Set FPSCR.FR to 1. */
+ __set_fpscr (0x200000);
+
+ test_value = 123;
+ write_xf0 (&test_value);
+ r += test_00 (40, 4);
+ read_xf0 (&test_value);
+ assert (test_value == 123);
+
+ test_value = 321;
+ write_xf0 (&test_value);
+ r += test_01 (50, 5);
+ read_xf0 (&test_value);
+ assert (test_value == 321);
+
+ return test_02 (r);
+}
diff --git a/gcc/testsuite/gcc.target/sh/pragma-isr-nosave_low_regs.c b/gcc/testsuite/gcc.target/sh/pragma-isr-nosave_low_regs.c
new file mode 100644
index 0000000000..e1d880d330
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pragma-isr-nosave_low_regs.c
@@ -0,0 +1,23 @@
+/* A call will clobber all call-saved registers.
+ If #pragma nosave_low_regs is specified, do not save/restore r0..r7.
+ (On SH3* and SH4* r0..r7 are banked)
+ One of these registers will also do fine to hold the function address.
+ Call-saved registers r8..r13 also don't need to be restored. */
+/* { dg-do compile { target { { "sh*-*-*" } && nonpic } } } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1*" "-m2*" "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+/* { dg-final { scan-assembler-not "\[^f\]r\[0-9\]\[ \t\]*," } } */
+/* { dg-final { scan-assembler-not "\[^f\]r\[89\]" } } */
+/* { dg-final { scan-assembler-not "\[^f\]r1\[,0-3\]" } } */
+/* { dg-final { scan-assembler-times "macl" 2 } } */
+
+extern void foo (void);
+
+#pragma interrupt
+#pragma nosave_low_regs
+void
+isr (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/sh/pragma-isr-trap-exit.c b/gcc/testsuite/gcc.target/sh/pragma-isr-trap-exit.c
new file mode 100644
index 0000000000..6dbd8e7c93
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pragma-isr-trap-exit.c
@@ -0,0 +1,24 @@
+/* Check whether trapa is generated only for an ISR. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "trapa\[ \t\]\[ \t\]*#4" 1 } } */
+
+#pragma interrupt
+void isr (void) __attribute__ ((trap_exit (4)));
+
+void
+isr (void)
+{
+}
+
+void
+delay (int a)
+{
+}
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/pragma-isr-trapa.c b/gcc/testsuite/gcc.target/sh/pragma-isr-trapa.c
new file mode 100644
index 0000000000..cc57014dde
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pragma-isr-trapa.c
@@ -0,0 +1,19 @@
+/* Check that no interrupt-specific register saves are generated. */
+/* { dg-do compile { target { { "sh*-*-*" } && nonpic } } } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+/* { dg-final { scan-assembler-not "r\[0-7\]\[ \t,\]\[^\n\]*r15" } } */
+/* { dg-final { scan-assembler-not "@r15\[^\n\]*r\[0-7\]\n" } } */
+/* { dg-final { scan-assembler-not "r\[8-9\]" } } */
+/* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
+/* { dg-final { scan-assembler-not "macl" } } */
+
+extern void foo (void);
+
+#pragma trapa
+void
+isr (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/sh/pragma-isr-trapa2.c b/gcc/testsuite/gcc.target/sh/pragma-isr-trapa2.c
new file mode 100644
index 0000000000..9a23b976f4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/pragma-isr-trapa2.c
@@ -0,0 +1,24 @@
+/* Check that no interrupt-specific register saves are generated.
+ The function call will require to load the address first into a register,
+ then use that for a jsr or jmp. It will also need to load a constant
+ address in order to load fpscr. */
+/* { dg-do compile { target { { "sh*-*-*" } && nonpic } } } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m1" "-m2" "-m3" "-m4al" "*nofpu" "-m4-340*" "-m4-400*" "-m4-500*" "-m5*" } { "" } } */
+/* { dg-options "-O" } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+/* { dg-final { scan-assembler-times "r\[0-7\]\n" 3 } } */
+/* { dg-final { scan-assembler-not "r\[8-9\]" } } */
+/* { dg-final { scan-assembler-not "r1\[,0-3\]" } } */
+/* { dg-final { scan-assembler-not "macl" } } */
+
+/* Expect that fpscr needs to be saved, loaded and restored. */
+/* { dg-final { scan-assembler-times "\[^_\]fpscr" 3 } } */
+
+extern void foo (void);
+
+#pragma trapa
+void
+isr (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/sh/prefetch.c b/gcc/testsuite/gcc.target/sh/prefetch.c
new file mode 100644
index 0000000000..fb580bde87
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/prefetch.c
@@ -0,0 +1,35 @@
+/* Testcase to check generation of a SH4 and SH2A operand cache prefetch
+ instruction PREF @Rm. */
+/* { dg-do assemble } */
+/* { dg-options "-O0" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m2a*" "-m3*" "-m4*" } } */
+/* { dg-final { scan-assembler "pref"} } */
+
+void
+opt (void)
+{
+ int *p, wk;
+ int data[100];
+
+ /* data prefetch , instructions hit the cache. */
+
+ __builtin_prefetch (&data[0], 0, 0);
+ __builtin_prefetch (&data[0], 0, 1);
+ __builtin_prefetch (&data[0], 0, 2);
+ __builtin_prefetch (&data[0], 0, 3);
+ __builtin_prefetch (&data[0], 1, 0);
+ __builtin_prefetch (&data[0], 1, 1);
+ __builtin_prefetch (&data[0], 1, 2);
+ __builtin_prefetch (&data[0], 1, 3);
+
+
+ for (p = &data[0]; p < &data[9]; p++)
+ {
+ if (*p > *(p + 1))
+ {
+ wk = *p;
+ *p = *(p + 1);
+ *(p + 1) = wk;
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/sh/rte-delay-slot.c b/gcc/testsuite/gcc.target/sh/rte-delay-slot.c
index eca5db9435..48f1b13b0d 100644
--- a/gcc/testsuite/gcc.target/sh/rte-delay-slot.c
+++ b/gcc/testsuite/gcc.target/sh/rte-delay-slot.c
@@ -1,4 +1,4 @@
-/* { dg-do compile { target "sh-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O2" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m1 -m2*" } */
/* { dg-final { scan-assembler-not "\trte\t\n\tmov.l\t@r15\\+" } } */
diff --git a/gcc/testsuite/gcc.target/sh/sh.exp b/gcc/testsuite/gcc.target/sh/sh.exp
index 9389d4455b..ac428cde5b 100644
--- a/gcc/testsuite/gcc.target/sh/sh.exp
+++ b/gcc/testsuite/gcc.target/sh/sh.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2007 Free Software Foundation, Inc.
+# Copyright (C) 2007-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-band.c b/gcc/testsuite/gcc.target/sh/sh2a-band.c
index 34862b7256..a5096262c8 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-band.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-band.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
"BAND.B #imm3, @(disp12, Rn)". */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1 -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "band.b"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bclr.c b/gcc/testsuite/gcc.target/sh/sh2a-bclr.c
index d4e11f9529..ab1e3ddab2 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bclr.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bclr.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction
'BCLR #imm3,Rn'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bclr"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bclrmem.c b/gcc/testsuite/gcc.target/sh/sh2a-bclrmem.c
index 41cb3bdfed..9c99c59298 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bclrmem.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bclrmem.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction
"BCLR #imm3,@(disp12,Rn)". */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O2 -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bclr"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bld.c b/gcc/testsuite/gcc.target/sh/sh2a-bld.c
index 1cf56fe271..d0c74c9c72 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bld.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bld.c
@@ -4,7 +4,7 @@
BLD #imm3, Rn
BLD.B #imm3, @(disp12, Rn)
*/
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-Os -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bld"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bor.c b/gcc/testsuite/gcc.target/sh/sh2a-bor.c
index c3803c6b9c..8db4377099 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bor.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bor.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
"BOR.B #imm3, @(disp12, Rn)". */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1 -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bor.b"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bset.c b/gcc/testsuite/gcc.target/sh/sh2a-bset.c
index b64852b4c3..322821b5ac 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bset.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bset.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction
'BSET #imm3,Rn'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bset"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bsetmem.c b/gcc/testsuite/gcc.target/sh/sh2a-bsetmem.c
index b0ebf0851d..cf35ed632b 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bsetmem.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bsetmem.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction
"BSET #imm3,@(disp12,Rn)". */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O2 -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bset"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-bxor.c b/gcc/testsuite/gcc.target/sh/sh2a-bxor.c
index afe0a5ec97..6cca825e61 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-bxor.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-bxor.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
"BXOR.B #imm3, @(disp12, Rn)". */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1 -mbitops" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "bxor.b"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-jsrn.c b/gcc/testsuite/gcc.target/sh/sh2a-jsrn.c
index 9b9b92cb92..3f55327f0d 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-jsrn.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-jsrn.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
'JSR/N @Rm'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O0" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "jsr/n"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-movi20s.c b/gcc/testsuite/gcc.target/sh/sh2a-movi20s.c
index 55d2f665b3..fe3226e251 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-movi20s.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-movi20s.c
@@ -1,5 +1,5 @@
/* Testcase to check generation of 'MOVI20S #imm20, Rn'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O0" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "movi20s"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-movrt.c b/gcc/testsuite/gcc.target/sh/sh2a-movrt.c
index 9df9f4ba97..3e72930ca6 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-movrt.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-movrt.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
'MOVRT Rn'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O1" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "movrt"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-prefetch.c b/gcc/testsuite/gcc.target/sh/sh2a-prefetch.c
deleted file mode 100644
index e0c9a0d7dc..0000000000
--- a/gcc/testsuite/gcc.target/sh/sh2a-prefetch.c
+++ /dev/null
@@ -1,34 +0,0 @@
-/* Testcase to check generation of a SH2A specific instruction PREF @Rm. */
-/* { dg-do assemble {target sh*-*-*}} */
-/* { dg-options "-O0" } */
-/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
-/* { dg-final { scan-assembler "pref"} } */
-
-void
-opt (void)
-{
- int *p, wk;
- int data[100];
-
- /* data prefetch , instructions hit the cache. */
-
- __builtin_prefetch (&data[0], 0, 0);
- __builtin_prefetch (&data[0], 0, 1);
- __builtin_prefetch (&data[0], 0, 2);
- __builtin_prefetch (&data[0], 0, 3);
- __builtin_prefetch (&data[0], 1, 0);
- __builtin_prefetch (&data[0], 1, 1);
- __builtin_prefetch (&data[0], 1, 2);
- __builtin_prefetch (&data[0], 1, 3);
-
-
- for (p = &data[0]; p < &data[9]; p++)
- {
- if (*p > *(p + 1))
- {
- wk = *p;
- *p = *(p + 1);
- *(p + 1) = wk;
- }
- }
-}
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-resbank.c b/gcc/testsuite/gcc.target/sh/sh2a-resbank.c
index aab6852f33..a12a711afa 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-resbank.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-resbank.c
@@ -1,5 +1,5 @@
/* Test for resbank attribute. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "resbank" } } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-rtsn.c b/gcc/testsuite/gcc.target/sh/sh2a-rtsn.c
index 2601ced5cf..612c3032de 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-rtsn.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-rtsn.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific instruction for
'RTS/N'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "-O0" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler "rts/n"} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c b/gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c
index 8029b03dd4..24b57febe6 100644
--- a/gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c
+++ b/gcc/testsuite/gcc.target/sh/sh2a-tbr-jump.c
@@ -1,6 +1,6 @@
/* Testcase to check generation of a SH2A specific,
TBR relative jump instruction - 'JSR @@(disp8,TBR)'. */
-/* { dg-do assemble {target sh*-*-*}} */
+/* { dg-do assemble } */
/* { dg-options "" } */
/* { dg-skip-if "" { "sh*-*-*" } "*" "-m2a -m2a-nofpu -m2a-single -m2a-single-only" } */
/* { dg-final { scan-assembler-times "jsr/n\\t@@\\(40,tbr\\)" 1} } */
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c b/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
index 1c9ae6ee6b..35ebf5cd3e 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-bitmovua.c
@@ -1,7 +1,7 @@
/* Verify that we generate movua to load unaligned 32-bit values on SH4A. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O" } */
-/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" "-m4a-nofpu" } } */
+/* { dg-do run } */
+/* { dg-options "-O1 -save-temps -fno-inline" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a*" } } */
/* { dg-final { scan-assembler-times "movua.l" 6 } } */
/* Aligned. */
@@ -64,4 +64,28 @@ unsigned long long g4() {
return y4.d;
}
+#include <assert.h>
+int
+main (void)
+{
+ x1.d = 0x12345678;
+ assert (f1 () == 0x12345678);
+
+ x2.d = 0x12345678;
+ assert (f2 () == 0x12345678);
+
+ x3.d = 0x12345678;
+ assert (f3 () == 0x12345678);
+
+ y_1.d = 0x12345678;
+ assert (g1 () == 0x12345678);
+
+ y2.d = 0x12345678;
+ assert (g2 () == 0x12345678);
+
+ y3.d = 0x12345678;
+ assert (g3 () == 0x12345678);
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-cos.c b/gcc/testsuite/gcc.target/sh/sh4a-cos.c
deleted file mode 100644
index c2e421c6a0..0000000000
--- a/gcc/testsuite/gcc.target/sh/sh4a-cos.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode on SH4A with FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
-/* { dg-final { scan-assembler "fsca" } } */
-
-#include <math.h>
-
-double test(double f) { return cos(f); }
-
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-cosf.c b/gcc/testsuite/gcc.target/sh/sh4a-cosf.c
index 68bb20f2c3..d6277da7e9 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-cosf.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-cosf.c
@@ -1,6 +1,6 @@
/* Verify that we generate single-precision sine and cosine approximate
(fsca) in fast math mode on SH4A with FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O -ffast-math" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
/* { dg-final { scan-assembler "fsca" } } */
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-fprun.c b/gcc/testsuite/gcc.target/sh/sh4a-fprun.c
index 40c2b05aab..e5fbc4acad 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-fprun.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-fprun.c
@@ -11,25 +11,43 @@ float sqrt_arg = 4.0f, sqrt_res = 2.0f;
float dg2rad_f;
double dg2rad_d;
-void check_f (float res, float expected) {
+float __attribute__ ((noinline))
+test_sinf (float x)
+{
+ return sinf (x);
+}
+
+float __attribute ((noinline))
+test_cosf (float x)
+{
+ return cosf (x);
+}
+
+void
+check_f (float res, float expected)
+{
if (res >= expected - 0.001f && res <= expected + 0.001f)
return;
abort ();
}
-void check_d (double res, double expected) {
+void
+check_d (double res, double expected)
+{
if (res >= expected - 0.001 && res <= expected + 0.001)
return;
abort ();
}
-int main() {
+int
+main()
+{
check_f (sqrtf(sqrt_arg), sqrt_res);
dg2rad_f = dg2rad_d = atan(1) / 45;
- check_f (sinf(90*dg2rad_f), 1);
- check_f (cosf(90*dg2rad_f), 0);
+ check_f (test_sinf(90*dg2rad_f), 1);
+ check_f (test_cosf(90*dg2rad_f), 0);
check_d (sin(-90*dg2rad_d), -1);
check_d (cos(180*dg2rad_d), -1);
check_d (sin(-45*dg2rad_d) * cosf(135*dg2rad_f), 0.5);
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-fsrra.c b/gcc/testsuite/gcc.target/sh/sh4a-fsrra.c
index 4ce2e28e22..0bd7d8773b 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-fsrra.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-fsrra.c
@@ -1,6 +1,6 @@
/* Verify that we generate single-precision square root reciprocal
approximate (fsrra) in fast math mode on SH4A with FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O -ffast-math" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
/* { dg-final { scan-assembler "fsrra" } } */
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-sin.c b/gcc/testsuite/gcc.target/sh/sh4a-sin.c
deleted file mode 100644
index cd8f0783d7..0000000000
--- a/gcc/testsuite/gcc.target/sh/sh4a-sin.c
+++ /dev/null
@@ -1,11 +0,0 @@
-/* Verify that we generate single-precision sine and cosine approximate
- (fsca) in fast math mode on SH4A with FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
-/* { dg-final { scan-assembler "fsca" } } */
-
-#include <math.h>
-
-double test(double f) { return sin(f); }
-
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-sincos.c b/gcc/testsuite/gcc.target/sh/sh4a-sincos.c
deleted file mode 100644
index 423dda1433..0000000000
--- a/gcc/testsuite/gcc.target/sh/sh4a-sincos.c
+++ /dev/null
@@ -1,12 +0,0 @@
-/* Verify that we generate a single single-precision sine and cosine
- approximate (fsca) in fast math mode when a function computes both
- sine and cosine. */
-/* { dg-do compile { target "sh*-*-*" } } */
-/* { dg-options "-O -ffast-math" } */
-/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
-/* { dg-final { scan-assembler-times "fsca" 1 } } */
-
-#include <math.h>
-
-double test(double f) { return sin(f) + cos(f); }
-
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-sincosf.c b/gcc/testsuite/gcc.target/sh/sh4a-sincosf.c
index 0ca33e30a0..b85fa86a27 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-sincosf.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-sincosf.c
@@ -1,7 +1,7 @@
/* Verify that we generate a single single-precision sine and cosine
approximate (fsca) in fast math mode when a function computes both
sine and cosine. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O -ffast-math" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
/* { dg-final { scan-assembler-times "fsca" 1 } } */
diff --git a/gcc/testsuite/gcc.target/sh/sh4a-sinf.c b/gcc/testsuite/gcc.target/sh/sh4a-sinf.c
index 4d9abea045..0ce13263ec 100644
--- a/gcc/testsuite/gcc.target/sh/sh4a-sinf.c
+++ b/gcc/testsuite/gcc.target/sh/sh4a-sinf.c
@@ -1,6 +1,6 @@
/* Verify that we generate single-precision sine and cosine approximate
(fsca) in fast math mode on SH4A with FPU. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-O -ffast-math" } */
/* { dg-skip-if "" { "sh*-*-*" } { "*" } { "-m4a" "-m4a-single" "-m4a-single-only" } } */
/* { dg-final { scan-assembler "fsca" } } */
diff --git a/gcc/testsuite/gcc.target/sh/sp-switch.c b/gcc/testsuite/gcc.target/sh/sp-switch.c
new file mode 100644
index 0000000000..aad6ba001c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/sp-switch.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-final { scan-assembler "mov\tr0,r15" } } */
+/* { dg-final { scan-assembler ".long\t_alt_stack" } } */
+
+void *alt_stack;
+void f() __attribute__ ((interrupt_handler, sp_switch ("alt_stack")));
+
+void f()
+{
+}
diff --git a/gcc/testsuite/gcc.target/sh/strlen.c b/gcc/testsuite/gcc.target/sh/strlen.c
new file mode 100644
index 0000000000..115baba99c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/strlen.c
@@ -0,0 +1,19 @@
+/* Check that the __builtin_strlen function is inlined with cmp/str
+ when optimizing for speed. */
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-not "jmp" } } */
+/* { dg-final { scan-assembler-times "cmp/str" 2 } } */
+/* { dg-final { scan-assembler-times "tst\t#3" 1 } } */
+
+test00 (const char *s1)
+{
+ return __builtin_strlen (s1);
+}
+
+/* Check that no test for alignment is needed. */
+test03(const char *s1)
+{
+ return __builtin_strlen (__builtin_assume_aligned (s1, 4));
+}
diff --git a/gcc/testsuite/gcc.target/sh/struct-arg-dw2.c b/gcc/testsuite/gcc.target/sh/struct-arg-dw2.c
index 81f80df1e6..50c8f34c3e 100644
--- a/gcc/testsuite/gcc.target/sh/struct-arg-dw2.c
+++ b/gcc/testsuite/gcc.target/sh/struct-arg-dw2.c
@@ -1,6 +1,6 @@
/* Verify that we don't generate frame related insn against stack adjustment
for the object sent partially in registers. */
-/* { dg-do compile { target "sh*-*-*" } } */
+/* { dg-do compile } */
/* { dg-options "-g" } */
/* { dg-final { scan-assembler-not "\t.cfi_def_cfa_offset 16" } } */
diff --git a/gcc/testsuite/gcc.target/sh/torture/pr30807.c b/gcc/testsuite/gcc.target/sh/torture/pr30807.c
new file mode 100644
index 0000000000..c9cc771b68
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pr30807.c
@@ -0,0 +1,218 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fpic -std=c99" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+
+typedef unsigned int size_t;
+typedef struct
+{
+ unsigned long __val[(1024 / (8 * sizeof (unsigned long)))];
+} __sigset_t;
+struct __jmp_buf_tag
+{
+ __sigset_t __saved_mask;
+};
+typedef struct __jmp_buf_tag sigjmp_buf[1];
+struct stat
+{
+ long long st_dev;
+ unsigned short int __pad1;
+ int tm_isdst;
+ long int tm_gmtoff;
+ char *tm_zone;
+};
+
+typedef size_t STRLEN;
+typedef struct op OP;
+typedef struct cop COP;
+typedef struct interpreter PerlInterpreter;
+typedef struct sv SV;
+typedef struct av AV;
+typedef struct cv CV;
+typedef struct gp GP;
+typedef struct gv GV;
+typedef struct xpv XPV;
+typedef struct xpvio XPVIO;
+typedef union any ANY;
+typedef unsigned char U8;
+typedef long I32;
+typedef unsigned long U32;
+typedef U32 line_t;
+typedef struct _PerlIO PerlIOl;
+typedef PerlIOl *PerlIO;
+struct sv
+{
+ void *sv_any;
+ U32 sv_flags;
+ union
+ {
+ char *svu_pv;
+ } sv_u;
+};
+struct gv
+{
+ U32 sv_flags;
+ union
+ {
+ GP *svu_gp;
+ } sv_u;
+};
+struct io
+{
+ XPVIO *sv_any;
+};
+struct xpv
+{
+ STRLEN xpv_cur;
+};
+struct xpvio
+{
+ PerlIO *xio_ofp;
+};
+struct gp
+{
+ SV *gp_sv;
+ struct io *gp_io;
+};
+struct jmpenv
+{
+ struct jmpenv *je_prev;
+ sigjmp_buf je_buf;
+ int je_ret;
+};
+typedef struct jmpenv JMPENV;
+struct cop
+{
+ line_t cop_line;
+ struct refcounted_he *cop_hints_hash;
+};
+struct interpreter
+{
+ SV **Istack_sp;
+ OP *Iop;
+ SV **Icurpad;
+ SV **Istack_base;
+ SV **Istack_max;
+ I32 *Iscopestack;
+ I32 Iscopestack_ix;
+ I32 Iscopestack_max;
+ ANY *Isavestack;
+ I32 Isavestack_ix;
+ I32 Isavestack_max;
+ SV **Itmps_stack;
+ I32 Itmps_ix;
+ I32 Itmps_floor;
+ I32 Itmps_max;
+ I32 Imodcount;
+ I32 *Imarkstack;
+ I32 *Imarkstack_ptr;
+ I32 *Imarkstack_max;
+ SV *ISv;
+ XPV *IXpv;
+ STRLEN Ina;
+ struct stat Istatbuf;
+ struct stat Istatcache;
+ OP *Irestartop;
+ COP *volatile Icurcop;
+ JMPENV *Itop_env;
+ U8 Iexit_flags;
+ I32 Istatusvalue;
+ I32 Istatusvalue_posix;
+ GV *Istderrgv;
+ GV *Ierrgv;
+ AV *Ibeginav;
+ AV *Iunitcheckav;
+ COP Icompiling;
+ char Isavebegin;
+ volatile U32 Idebug;
+ AV *Ibeginav_save;
+ AV *Icheckav_save;
+ AV *Iunitcheckav_save;
+};
+
+void S_my_exit_jump (PerlInterpreter *my_perl __attribute__((unused)))
+ __attribute__((noreturn));
+
+int Perl_av_len (PerlInterpreter*, AV*);
+void Perl_av_create_and_push (PerlInterpreter*, AV**, SV*);
+int __sigsetjmp (sigjmp_buf env, int savemask);
+void Perl_sv_2pv_flags (PerlInterpreter*, SV*, STRLEN*, int);
+void Perl_deb (PerlInterpreter*,
+ const char*, const char*, int, const char*, int);
+void Perl_croak (PerlInterpreter*, const char*, void*);
+void foo (void);
+
+void
+Perl_call_list (PerlInterpreter *my_perl __attribute__((unused)),
+ I32 oldscope, AV *paramList)
+{
+ SV *atsv;
+ CV *cv;
+ STRLEN len;
+ int ret;
+ JMPENV cur_env;
+ GV *shplep;
+ volatile line_t oldline;
+
+ oldline = (my_perl->Icurcop) ? my_perl->Icurcop->cop_line : 0;
+
+ while (Perl_av_len (my_perl, paramList) >= 0)
+ {
+ if (my_perl->Isavebegin)
+ {
+ if (paramList == my_perl->Ibeginav)
+ {
+ Perl_av_create_and_push (my_perl, &my_perl->Ibeginav_save,
+ (SV*) cv);
+ Perl_av_create_and_push(my_perl, &my_perl->Icheckav_save,
+ (SV*) cv);
+ }
+ else if (paramList == my_perl->Iunitcheckav)
+ Perl_av_create_and_push(my_perl, &my_perl->Iunitcheckav_save,
+ (SV*) cv);
+ }
+
+ cur_env.je_ret = __sigsetjmp (cur_env.je_buf, 0);
+
+ switch (ret)
+ {
+ case 0:
+ shplep = (GV *) my_perl->Ierrgv;
+ *my_perl->Imarkstack_ptr = my_perl->Istack_sp - my_perl->Istack_base;
+ atsv = shplep->sv_u.svu_gp->gp_sv;
+ if (atsv->sv_flags & 0x00000400 == 0x00000400)
+ len = ((XPV*) ((SV *) atsv)->sv_any)->xpv_cur;
+ else
+ Perl_sv_2pv_flags (my_perl, atsv, &len, 2|32);
+
+ if (len)
+ {
+ my_perl->Icurcop = &my_perl->Icompiling;
+ while (my_perl->Iscopestack_ix > oldscope)
+ {
+ if (my_perl->Idebug & 0x00000004)
+ Perl_deb (my_perl, "scope", "LEAVE",
+ my_perl->Iscopestack_ix, "perl.c", 5166);
+ (my_perl->Itop_env) = cur_env.je_prev;
+ }
+
+ Perl_croak (my_perl, "%""-p""", (void*) atsv);
+ }
+
+ case 1:
+ my_perl->Istatusvalue = 1;
+ my_perl->Istatusvalue_posix = 1;
+ case 2:
+ while (my_perl->Iscopestack_ix > oldscope)
+ if (my_perl->Idebug & 0x00000004)
+ foo ();
+ my_perl->Icurcop = &my_perl->Icompiling;
+ my_perl->Icurcop->cop_line = oldline;
+ if (my_perl->Idebug & 0x00000004)
+ foo ();
+ S_my_exit_jump (my_perl);
+ case 3:
+ if (my_perl->Irestartop)
+ foo ();
+ }
+ }
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/pr34777.c b/gcc/testsuite/gcc.target/sh/torture/pr34777.c
new file mode 100644
index 0000000000..de6ba028c8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pr34777.c
@@ -0,0 +1,30 @@
+/* { dg-do compile } */
+/* { dg-additional-options "-fschedule-insns -fPIC -mprefergot" } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+
+static __inline __attribute__ ((__always_inline__)) void *
+_dl_mmap (void * start, int length, int prot, int flags, int fd,
+ int offset)
+{
+ register long __sc3 __asm__ ("r3") = 90;
+ register long __sc4 __asm__ ("r4") = (long) start;
+ register long __sc5 __asm__ ("r5") = (long) length;
+ register long __sc6 __asm__ ("r6") = (long) prot;
+ register long __sc7 __asm__ ("r7") = (long) flags;
+ register long __sc0 __asm__ ("r0") = (long) fd;
+ register long __sc1 __asm__ ("r1") = (long) offset;
+ __asm__ __volatile__ ("trapa %1"
+ : "=z" (__sc0)
+ : "i" (0x10 + 6), "0" (__sc0), "r" (__sc4),
+ "r" (__sc5), "r" (__sc6), "r" (__sc7),
+ "r" (__sc3), "r" (__sc1)
+ : "memory" );
+}
+
+extern int _dl_pagesize;
+void
+_dl_dprintf(int fd, const char *fmt, ...)
+{
+ static char *buf;
+ buf = _dl_mmap ((void *) 0, _dl_pagesize, 0x1 | 0x2, 0x02 | 0x20, -1, 0);
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/pr58314.c b/gcc/testsuite/gcc.target/sh/torture/pr58314.c
new file mode 100644
index 0000000000..7a11508405
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pr58314.c
@@ -0,0 +1,102 @@
+/* { dg-do compile } */
+/* { dg-options "-Os" } */
+
+typedef unsigned short __u16;
+typedef unsigned int __u32;
+
+typedef signed short s16;
+
+
+static inline __attribute__((always_inline)) __attribute__((__const__)) __u16 __arch_swab16(__u16 x)
+{
+ __asm__(
+ "swap.b %1, %0"
+ : "=r" (x)
+ : "r" (x));
+ return x;
+}
+
+void u16_add_cpu(__u16 *var)
+{
+ *var = __arch_swab16(*var);
+}
+
+typedef struct xfs_mount {
+ int m_attr_magicpct;
+} xfs_mount_t;
+
+typedef struct xfs_da_args {
+ struct xfs_mount *t_mountp;
+ int index;
+} xfs_da_args_t;
+
+typedef struct xfs_dabuf {
+ void *data;
+} xfs_dabuf_t;
+
+typedef struct xfs_attr_leaf_map {
+ __u16 base;
+ __u16 size;
+} xfs_attr_leaf_map_t;
+typedef struct xfs_attr_leaf_hdr {
+ __u16 count;
+ xfs_attr_leaf_map_t freemap[3];
+} xfs_attr_leaf_hdr_t;
+
+typedef struct xfs_attr_leaf_entry {
+ __u16 nameidx;
+} xfs_attr_leaf_entry_t;
+
+typedef struct xfs_attr_leafblock {
+ xfs_attr_leaf_hdr_t hdr;
+ xfs_attr_leaf_entry_t entries[1];
+} xfs_attr_leafblock_t;
+
+int
+xfs_attr_leaf_remove(xfs_attr_leafblock_t *leaf, xfs_da_args_t *args)
+{
+ xfs_attr_leaf_hdr_t *hdr;
+ xfs_attr_leaf_map_t *map;
+ xfs_attr_leaf_entry_t *entry;
+ int before, after, smallest, entsize;
+ int tablesize, tmp, i;
+ xfs_mount_t *mp;
+ hdr = &leaf->hdr;
+ mp = args->t_mountp;
+
+ entry = &leaf->entries[args->index];
+
+ tablesize = __arch_swab16(hdr->count);
+
+ map = &hdr->freemap[0];
+ tmp = map->size;
+ before = after = -1;
+ smallest = 3 - 1;
+ entsize = xfs_attr_leaf_entsize(leaf, args->index);
+
+ for (i = 0; i < 2; map++, i++) {
+
+ if (map->base == tablesize)
+ u16_add_cpu(&map->base);
+
+ if (__arch_swab16(map->base) + __arch_swab16(map->size) == __arch_swab16(entry->nameidx))
+ before = i;
+ else if (map->base == entsize)
+ after = i;
+ else if (__arch_swab16(map->size) < tmp)
+ smallest = i;
+ }
+
+ if (before >= 0)
+ {
+ map = &hdr->freemap[after];
+ map->base = entry->nameidx;
+
+ }
+
+ map = &hdr->freemap[smallest];
+
+ map->base = __arch_swab16(entry->nameidx);
+
+ return(tmp < mp->m_attr_magicpct);
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/pr58475.c b/gcc/testsuite/gcc.target/sh/torture/pr58475.c
new file mode 100644
index 0000000000..f44780d297
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pr58475.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+
+int
+kerninfo(int __bsx, double tscale)
+{
+ return (
+ (int)(__extension__
+ ({
+ ((((__bsx) & 0xff000000u) >> 24)
+ | (((__bsx) & 0x00ff0000) >> 8)
+ | (((__bsx) & 0x0000ff00) << 8)
+ | (((__bsx) & 0x000000ff) << 24)
+ ); }))
+ * tscale);
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/pragma-isr.c b/gcc/testsuite/gcc.target/sh/torture/pragma-isr.c
new file mode 100644
index 0000000000..9e665bafb4
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pragma-isr.c
@@ -0,0 +1,20 @@
+/* Check whether rte is generated for two ISRs. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "rte" 2 } } */
+
+extern void foo (void);
+
+#pragma interrupt
+void
+isr1 (void)
+{
+ foo ();
+}
+
+#pragma interrupt
+void
+isr2 (void)
+{
+ foo ();
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/pragma-isr2.c b/gcc/testsuite/gcc.target/sh/torture/pragma-isr2.c
new file mode 100644
index 0000000000..ce984e73fb
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/pragma-isr2.c
@@ -0,0 +1,21 @@
+/* Check whether rte is generated only for an ISRs. */
+/* { dg-do compile } */
+/* { dg-skip-if "" { "sh*-*-*" } { "-m5*" } { "" } } */
+/* { dg-final { scan-assembler-times "rte" 1 } } */
+
+#pragma interrupt
+void
+isr (void)
+{
+}
+
+void
+delay (int a)
+{
+}
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
new file mode 100644
index 0000000000..8fef587f82
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/sh-torture.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `gcc-dg.exp' driver, looping over
+# optimization options.
+
+# Exit immediately if this isn't a SH target.
+if { ![istarget sh*-*-*] } then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/sh/torture/strncmp.c b/gcc/testsuite/gcc.target/sh/torture/strncmp.c
new file mode 100644
index 0000000000..cd50f5c05a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sh/torture/strncmp.c
@@ -0,0 +1,22 @@
+/* { dg-do run } */
+
+extern void abort (void);
+
+const char *s="astc";
+const char *s1="-----BEGIN RSA PRIVATE KEY-----";
+const char *s2="atextaac";
+
+main()
+{
+ if (! __builtin_strncmp ("astb", s, 4))
+ abort();
+
+ if (__builtin_strncmp(s1, "-----BEGIN ", 11))
+ abort();
+
+ if (! __builtin_strncmp ("atextaacb", s2, 9))
+ abort();
+
+ return 0;
+}
+
diff --git a/gcc/testsuite/gcc.target/sparc/bmaskbshuf.c b/gcc/testsuite/gcc.target/sparc/bmaskbshuf.c
index 7108a018e5..22809b5f5e 100644
--- a/gcc/testsuite/gcc.target/sparc/bmaskbshuf.c
+++ b/gcc/testsuite/gcc.target/sparc/bmaskbshuf.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O -mcpu=ultrasparc3 -mvis -mvis2" } */
+/* { dg-options "-O -mvis2" } */
+
typedef long long int64_t;
typedef int vec32 __attribute__((vector_size(8)));
typedef short vec16 __attribute__((vector_size(8)));
diff --git a/gcc/testsuite/gcc.target/sparc/pdistn-2.c b/gcc/testsuite/gcc.target/sparc/pdistn-2.c
new file mode 100644
index 0000000000..008496f9ae
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/pdistn-2.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=ultrasparc -mvis3 -O1 -fdump-tree-optimized" } */
+
+typedef unsigned char vec8 __attribute__((vector_size(8)));
+
+#define _(A) (unsigned char)A
+
+long foo () {
+ vec8 a = { _(1), _(2), _(3), _(4), _(5), _(6), _(7), _(255) };
+ vec8 b = { _(2), _(4), _(8), _(16), _(32), _(64), _(128), _(8) };
+ return __builtin_vis_pdistn (a, b);
+}
+
+/* { dg-final { scan-assembler-not "pdistn\t%" } } */
+/* { dg-final { scan-tree-dump "return 473" "optimized" } } */
+/* { dg-final { cleanup-tree-dump "optimized" } } */
diff --git a/gcc/testsuite/gcc.target/sparc/pdistn.c b/gcc/testsuite/gcc.target/sparc/pdistn.c
new file mode 100644
index 0000000000..2f534f70b7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/pdistn.c
@@ -0,0 +1,10 @@
+/* { dg-do compile } */
+/* { dg-options "-mcpu=ultrasparc -mvis3" } */
+
+typedef unsigned char vec8 __attribute__((vector_size(8)));
+
+long foo (vec8 a, vec8 b) {
+ return __builtin_vis_pdistn (a, b);
+}
+
+/* { dg-final { scan-assembler-times "pdistn\t%" 1 } } */
diff --git a/gcc/testsuite/gcc.target/sparc/setcc-4.c b/gcc/testsuite/gcc.target/sparc/setcc-4.c
new file mode 100644
index 0000000000..ffa4ee046c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/setcc-4.c
@@ -0,0 +1,44 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O1 -mno-vis3" } */
+
+long neq (long a, long b)
+{
+ return a != b;
+}
+
+long eq (long a, long b)
+{
+ return a == b;
+}
+
+long lt (unsigned long a, unsigned long b)
+{
+ return a < b;
+}
+
+long leq (unsigned long a, unsigned long b)
+{
+ return a <= b;
+}
+
+long geq (unsigned long a, unsigned long b)
+{
+ return a >= b;
+}
+
+long gt (unsigned long a, unsigned long b)
+{
+ return a > b;
+}
+
+/* { dg-final { scan-assembler-times "xor\t%" 2 } } */
+/* { dg-final { scan-assembler-times "cmp\t%" 4 } } */
+/* { dg-final { scan-assembler-times "movrne\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movre\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movlu\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movleu\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movgeu\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movgu\t%" 1 } } */
+/* { dg-final { scan-assembler-not "sra\t%" } } */
+/* { dg-final { scan-assembler-not "and\t%" } } */
diff --git a/gcc/testsuite/gcc.target/sparc/setcc-5.c b/gcc/testsuite/gcc.target/sparc/setcc-5.c
new file mode 100644
index 0000000000..58f1ee39f7
--- /dev/null
+++ b/gcc/testsuite/gcc.target/sparc/setcc-5.c
@@ -0,0 +1,42 @@
+/* { dg-do compile } */
+/* { dg-require-effective-target lp64 } */
+/* { dg-options "-O1 -mvis3" } */
+
+long neq (long a, long b)
+{
+ return a != b;
+}
+
+long eq (long a, long b)
+{
+ return a == b;
+}
+
+long lt (unsigned long a, unsigned long b)
+{
+ return a < b;
+}
+
+long leq (unsigned long a, unsigned long b)
+{
+ return a <= b;
+}
+
+long geq (unsigned long a, unsigned long b)
+{
+ return a >= b;
+}
+
+long gt (unsigned long a, unsigned long b)
+{
+ return a > b;
+}
+
+/* { dg-final { scan-assembler-times "xor\t%" 2 } } */
+/* { dg-final { scan-assembler-times "cmp\t%" 4 } } */
+/* { dg-final { scan-assembler-times "addxc\t%" 3 } } */
+/* { dg-final { scan-assembler-times "movre\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movleu\t%" 1 } } */
+/* { dg-final { scan-assembler-times "movgeu\t%" 1 } } */
+/* { dg-final { scan-assembler-not "sra\t%" } } */
+/* { dg-final { scan-assembler-not "and\t%" } } */
diff --git a/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c b/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c
index 491f9d3f8b..a882ffbf37 100644
--- a/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c
+++ b/gcc/testsuite/gcc.target/sparc/sparc-constant-1.c
@@ -3,7 +3,7 @@
/* { dg-do compile } */
/* Verify that adding the constant 4096 is turned
- into substracting the constant -4096. */
+ into subtracting the constant -4096. */
int foo(int a)
{
diff --git a/gcc/testsuite/gcc.target/sparc/sparc.exp b/gcc/testsuite/gcc.target/sparc/sparc.exp
index 51c9c16ecb..e8b59fb861 100644
--- a/gcc/testsuite/gcc.target/sparc/sparc.exp
+++ b/gcc/testsuite/gcc.target/sparc/sparc.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/sparc/struct-ret-check.c b/gcc/testsuite/gcc.target/sparc/struct-ret-check.c
index 350224eb66..00307fe297 100644
--- a/gcc/testsuite/gcc.target/sparc/struct-ret-check.c
+++ b/gcc/testsuite/gcc.target/sparc/struct-ret-check.c
@@ -96,7 +96,7 @@ int main (void)
/* If the caller does an unconditional adjustment it will skip
the mov, and then we can fail the test based on check's value
We pass a valid pointer to a save area in order to check if
- caller incorrectly wrote to the save area aswell. There may
+ caller incorrectly wrote to the save area as well. There may
be a case where the unimp check and skip is correct, but the
write to the save area still occurs. */
diff --git a/gcc/testsuite/gcc.target/spu/ea/ea.exp b/gcc/testsuite/gcc.target/spu/ea/ea.exp
index 8485d0fc72..2e04f9d77b 100644
--- a/gcc/testsuite/gcc.target/spu/ea/ea.exp
+++ b/gcc/testsuite/gcc.target/spu/ea/ea.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/spu/spu.exp b/gcc/testsuite/gcc.target/spu/spu.exp
index e0d76a7e51..ea99c58024 100644
--- a/gcc/testsuite/gcc.target/spu/spu.exp
+++ b/gcc/testsuite/gcc.target/spu/spu.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp b/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
index 3a7f0896e5..e3e99acd6a 100644
--- a/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
+++ b/gcc/testsuite/gcc.target/tic6x/builtins/c6x-builtins.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/tic6x/tic6x.exp b/gcc/testsuite/gcc.target/tic6x/tic6x.exp
index f9d1c7a162..52e5b83fb3 100644
--- a/gcc/testsuite/gcc.target/tic6x/tic6x.exp
+++ b/gcc/testsuite/gcc.target/tic6x/tic6x.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/vax/pr56875.c b/gcc/testsuite/gcc.target/vax/pr56875.c
new file mode 100644
index 0000000000..f409afe88e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/pr56875.c
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O0" } */
+/* { dg-final { scan-assembler "ashq .*,\\\$0xffffffffffffffff," } } */
+/* { dg-final { scan-assembler-not "ashq .*,\\\$-1," } } */
+
+void
+a (void)
+{
+ unsigned long i = 1;
+ unsigned long long v;
+
+ v = ~ (unsigned long long) 0 << i;
+}
diff --git a/gcc/testsuite/gcc.target/vax/vax.exp b/gcc/testsuite/gcc.target/vax/vax.exp
new file mode 100644
index 0000000000..9a6148498c
--- /dev/null
+++ b/gcc/testsuite/gcc.target/vax/vax.exp
@@ -0,0 +1,41 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# GCC testsuite that uses the `dg.exp' driver.
+
+# Exit immediately if this isn't a VAX target.
+if ![istarget vax-*-*] then {
+ return
+}
+
+# Load support procs.
+load_lib gcc-dg.exp
+
+# If a testcase doesn't have special options, use these.
+global DEFAULT_CFLAGS
+if ![info exists DEFAULT_CFLAGS] then {
+ set DEFAULT_CFLAGS " -ansi -pedantic-errors"
+}
+
+# Initialize `dg'.
+dg-init
+
+# Main loop.
+dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] \
+ "" $DEFAULT_CFLAGS
+
+# All done.
+dg-finish
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/README.gcc b/gcc/testsuite/gcc.target/x86_64/abi/README.gcc
index 7db8d4157a..e668a4dd8c 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/README.gcc
+++ b/gcc/testsuite/gcc.target/x86_64/abi/README.gcc
@@ -18,7 +18,7 @@ The current maintainer is:
matz@suse.de
-Copyright (C) 2005 Free Software Foundation, Inc.
+Copyright (C) 2005-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp b/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp
index 521bd53ee9..5ecfe4be8d 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/abi-x86_64.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp
index a509f2b083..624b7ea75f 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/abi-avx.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,6 +20,7 @@
load_lib c-torture.exp
load_lib target-supports.exp
load_lib torture-options.exp
+load_lib clearcap.exp
if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
|| ![is-effective-target lp64]
@@ -28,20 +29,10 @@ if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
}
-# If the linker used understands -M <mapfile>, pass it to clear hardware
-# capabilities set by the Sun assembler.
-set flags ""
-set clearcap_ldflags "-Wl,-M,$srcdir/gcc.target/i386/clearcap.map"
-
-if [check_no_compiler_messages mapfile executable {
- int main (void) { return 0; }
- } $clearcap_ldflags ] {
- set flags $clearcap_ldflags
-}
-
torture-init
+clearcap-init
set-torture-options $C_TORTURE_OPTIONS
-set additional_flags "-W -Wall -mavx $flags"
+set additional_flags "-W -Wall -mavx"
foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
if {[runtest_file_p $runtests $src]} {
@@ -58,4 +49,5 @@ foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
}
}
+clearcap-finish
torture-finish
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
index 9a8f71dbb8..7dbf6a59bb 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_structs.c
@@ -53,7 +53,7 @@ avx_test (void)
clear_struct_registers;
for (i = 0; i < 8; i++)
- fregs.ymm0._m256[i] = m256s[i].x;
+ (&fregs.ymm0)[i]._m256[0] = m256s[i].x;
num_fregs = 8;
WRAP_CALL (check_struct_passing1)(m256s[0], m256s[1], m256s[2], m256s[3],
m256s[4], m256s[5], m256s[6], m256s[7]);
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
index f83209b276..127dd5f301 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx/test_passing_unions.c
@@ -113,7 +113,7 @@ avx_test (void)
clear_struct_registers;
for (i = 0; i < 8; i++)
- fregs.ymm0._m256[i] = u1[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u1[i].x;
num_fregs = 8;
check_union_passing1(u1[0], u1[1], u1[2], u1[3],
u1[4], u1[5], u1[6], u1[7]);
@@ -122,7 +122,7 @@ avx_test (void)
for (i = 0; i < 8; i++)
{
u2[i].x = u1[i].x;
- fregs.ymm0._m256[i] = u2[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u2[i].x;
}
num_fregs = 8;
check_union_passing2(u2[0], u2[1], u2[2], u2[3],
@@ -132,7 +132,7 @@ avx_test (void)
for (i = 0; i < 8; i++)
{
u3[i].x = u1[i].x;
- fregs.ymm0._m256[i] = u3[i].x;
+ (&fregs.ymm0)[i]._m256[0] = u3[i].x;
}
num_fregs = 8;
check_union_passing3(u3[0], u3[1], u3[2], u3[3],
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp
new file mode 100644
index 0000000000..f8f991e927
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/abi-avx512f.exp
@@ -0,0 +1,53 @@
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# The x86-64 AVX512F ABI testsuite needs one additional assembler file for most
+# testcases. For simplicity we will just link it into each test.
+
+load_lib c-torture.exp
+load_lib target-supports.exp
+load_lib torture-options.exp
+load_lib clearcap.exp
+
+if { (![istarget x86_64-*-*] && ![istarget i?86-*-*])
+ || ![is-effective-target lp64]
+ || ![is-effective-target avx512f] } then {
+ return
+}
+
+
+torture-init
+clearcap-init
+set-torture-options $C_TORTURE_OPTIONS
+set additional_flags "-W -Wall -mavx512f"
+
+foreach src [lsort [glob -nocomplain $srcdir/$subdir/test_*.c]] {
+ if {[runtest_file_p $runtests $src]} {
+ if { ([istarget *-*-darwin*]) } then {
+ # FIXME: Darwin isn't tested.
+ c-torture-execute [list $src \
+ $srcdir/$subdir/asm-support-darwin.s] \
+ $additional_flags
+ } else {
+ c-torture-execute [list $src \
+ $srcdir/$subdir/asm-support.S] \
+ $additional_flags
+ }
+ }
+}
+
+clearcap-finish
+torture-finish
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/args.h b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/args.h
new file mode 100644
index 0000000000..5e3b265ece
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/args.h
@@ -0,0 +1,184 @@
+#ifndef INCLUDED_ARGS_H
+#define INCLUDED_ARGS_H
+
+#include <immintrin.h>
+#include <string.h>
+
+/* Assertion macro. */
+#define assert(test) if (!(test)) abort()
+
+#ifdef __GNUC__
+#define ATTRIBUTE_UNUSED __attribute__((__unused__))
+#else
+#define ATTRIBUTE_UNUSED
+#endif
+
+/* This defines the calling sequences for integers and floats. */
+#define I0 rdi
+#define I1 rsi
+#define I2 rdx
+#define I3 rcx
+#define I4 r8
+#define I5 r9
+#define F0 zmm0
+#define F1 zmm1
+#define F2 zmm2
+#define F3 zmm3
+#define F4 zmm4
+#define F5 zmm5
+#define F6 zmm6
+#define F7 zmm7
+
+typedef union {
+ float _float[16];
+ double _double[8];
+ long _long[8];
+ int _int[16];
+ unsigned long _ulong[8];
+ __m64 _m64[8];
+ __m128 _m128[4];
+ __m256 _m256[2];
+ __m512 _m512[1];
+} ZMM_T;
+
+typedef union {
+ float _float;
+ double _double;
+ long double _ldouble;
+ unsigned long _ulong[2];
+} X87_T;
+extern void (*callthis)(void);
+extern unsigned long rax,rbx,rcx,rdx,rsi,rdi,rsp,rbp,r8,r9,r10,r11,r12,r13,r14,r15;
+ZMM_T zmm_regs[32];
+X87_T x87_regs[8];
+extern volatile unsigned long volatile_var;
+extern void snapshot (void);
+extern void snapshot_ret (void);
+#define WRAP_CALL(N) \
+ (callthis = (void (*)()) (N), (typeof (&N)) snapshot)
+#define WRAP_RET(N) \
+ (callthis = (void (*)()) (N), (typeof (&N)) snapshot_ret)
+
+/* Clear all integer registers. */
+#define clear_int_hardware_registers \
+ asm __volatile__ ("xor %%rax, %%rax\n\t" \
+ "xor %%rbx, %%rbx\n\t" \
+ "xor %%rcx, %%rcx\n\t" \
+ "xor %%rdx, %%rdx\n\t" \
+ "xor %%rsi, %%rsi\n\t" \
+ "xor %%rdi, %%rdi\n\t" \
+ "xor %%r8, %%r8\n\t" \
+ "xor %%r9, %%r9\n\t" \
+ "xor %%r10, %%r10\n\t" \
+ "xor %%r11, %%r11\n\t" \
+ "xor %%r12, %%r12\n\t" \
+ "xor %%r13, %%r13\n\t" \
+ "xor %%r14, %%r14\n\t" \
+ "xor %%r15, %%r15\n\t" \
+ ::: "rax", "rbx", "rcx", "rdx", "rsi", "rdi", "r8", \
+ "r9", "r10", "r11", "r12", "r13", "r14", "r15");
+
+/* This is the list of registers available for passing arguments. Not all of
+ these are used or even really available. */
+struct IntegerRegisters
+{
+ unsigned long rax, rbx, rcx, rdx, rsi, rdi, r8, r9, r10, r11, r12, r13, r14, r15;
+};
+struct FloatRegisters
+{
+ double mm0, mm1, mm2, mm3, mm4, mm5, mm6, mm7;
+ long double st0, st1, st2, st3, st4, st5, st6, st7;
+ ZMM_T zmm0, zmm1, zmm2, zmm3, zmm4, zmm5, zmm6, zmm7, zmm8, zmm9,
+ zmm10, zmm11, zmm12, zmm13, zmm14, zmm15, zmm16, zmm17, zmm18,
+ zmm19, zmm20, zmm21, zmm22, zmm23, zmm24, zmm25, zmm26, zmm27,
+ zmm28, zmm29, zmm30, zmm31;
+};
+
+/* Implemented in scalarargs.c */
+extern struct IntegerRegisters iregs;
+extern struct FloatRegisters fregs;
+extern unsigned int num_iregs, num_fregs;
+
+#define check_int_arguments do { \
+ assert (num_iregs <= 0 || iregs.I0 == I0); \
+ assert (num_iregs <= 1 || iregs.I1 == I1); \
+ assert (num_iregs <= 2 || iregs.I2 == I2); \
+ assert (num_iregs <= 3 || iregs.I3 == I3); \
+ assert (num_iregs <= 4 || iregs.I4 == I4); \
+ assert (num_iregs <= 5 || iregs.I5 == I5); \
+ } while (0)
+
+#define check_char_arguments check_int_arguments
+#define check_short_arguments check_int_arguments
+#define check_long_arguments check_int_arguments
+
+/* Clear register struct. */
+#define clear_struct_registers \
+ rax = rbx = rcx = rdx = rdi = rsi = rbp = rsp \
+ = r8 = r9 = r10 = r11 = r12 = r13 = r14 = r15 = 0; \
+ memset (&iregs, 0, sizeof (iregs)); \
+ memset (&fregs, 0, sizeof (fregs)); \
+ memset (zmm_regs, 0, sizeof (zmm_regs)); \
+ memset (x87_regs, 0, sizeof (x87_regs));
+
+/* Clear both hardware and register structs for integers. */
+#define clear_int_registers \
+ clear_struct_registers \
+ clear_int_hardware_registers
+
+/* TODO: Do the checking. */
+#define check_f_arguments(T) do { \
+ assert (num_fregs <= 0 || fregs.zmm0._ ## T [0] == zmm_regs[0]._ ## T [0]); \
+ assert (num_fregs <= 1 || fregs.zmm1._ ## T [0] == zmm_regs[1]._ ## T [0]); \
+ assert (num_fregs <= 2 || fregs.zmm2._ ## T [0] == zmm_regs[2]._ ## T [0]); \
+ assert (num_fregs <= 3 || fregs.zmm3._ ## T [0] == zmm_regs[3]._ ## T [0]); \
+ assert (num_fregs <= 4 || fregs.zmm4._ ## T [0] == zmm_regs[4]._ ## T [0]); \
+ assert (num_fregs <= 5 || fregs.zmm5._ ## T [0] == zmm_regs[5]._ ## T [0]); \
+ assert (num_fregs <= 6 || fregs.zmm6._ ## T [0] == zmm_regs[6]._ ## T [0]); \
+ assert (num_fregs <= 7 || fregs.zmm7._ ## T [0] == zmm_regs[7]._ ## T [0]); \
+ } while (0)
+
+#define check_float_arguments check_f_arguments(float)
+#define check_double_arguments check_f_arguments(double)
+
+#define check_vector_arguments(T,O) do { \
+ assert (num_fregs <= 0 \
+ || memcmp (((char *) &fregs.zmm0) + (O), \
+ &zmm_regs[0], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 1 \
+ || memcmp (((char *) &fregs.zmm1) + (O), \
+ &zmm_regs[1], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 2 \
+ || memcmp (((char *) &fregs.zmm2) + (O), \
+ &zmm_regs[2], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 3 \
+ || memcmp (((char *) &fregs.zmm3) + (O), \
+ &zmm_regs[3], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 4 \
+ || memcmp (((char *) &fregs.zmm4) + (O), \
+ &zmm_regs[4], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 5 \
+ || memcmp (((char *) &fregs.zmm5) + (O), \
+ &zmm_regs[5], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 6 \
+ || memcmp (((char *) &fregs.zmm6) + (O), \
+ &zmm_regs[6], \
+ sizeof (__ ## T) - (O)) == 0); \
+ assert (num_fregs <= 7 \
+ || memcmp (((char *) &fregs.zmm7) + (O), \
+ &zmm_regs[7], \
+ sizeof (__ ## T) - (O)) == 0); \
+ } while (0)
+
+#define check_m64_arguments check_vector_arguments(m64, 0)
+#define check_m128_arguments check_vector_arguments(m128, 0)
+#define check_m256_arguments check_vector_arguments(m256, 0)
+#define check_m512_arguments check_vector_arguments(m512, 0)
+
+#endif /* INCLUDED_ARGS_H */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S
new file mode 100644
index 0000000000..e0309aeac1
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/asm-support.S
@@ -0,0 +1,98 @@
+ .file "snapshot.S"
+ .text
+ .p2align 4,,15
+.globl snapshot
+ .type snapshot, @function
+snapshot:
+.LFB3:
+ movq %rax, rax(%rip)
+ movq %rbx, rbx(%rip)
+ movq %rcx, rcx(%rip)
+ movq %rdx, rdx(%rip)
+ movq %rdi, rdi(%rip)
+ movq %rsi, rsi(%rip)
+ movq %rbp, rbp(%rip)
+ movq %rsp, rsp(%rip)
+ movq %r8, r8(%rip)
+ movq %r9, r9(%rip)
+ movq %r10, r10(%rip)
+ movq %r11, r11(%rip)
+ movq %r12, r12(%rip)
+ movq %r13, r13(%rip)
+ movq %r14, r14(%rip)
+ movq %r15, r15(%rip)
+ vmovdqu32 %zmm0, zmm_regs+0(%rip)
+ vmovdqu32 %zmm1, zmm_regs+64(%rip)
+ vmovdqu32 %zmm2, zmm_regs+128(%rip)
+ vmovdqu32 %zmm3, zmm_regs+192(%rip)
+ vmovdqu32 %zmm4, zmm_regs+256(%rip)
+ vmovdqu32 %zmm5, zmm_regs+320(%rip)
+ vmovdqu32 %zmm6, zmm_regs+384(%rip)
+ vmovdqu32 %zmm7, zmm_regs+448(%rip)
+ vmovdqu32 %zmm8, zmm_regs+512(%rip)
+ vmovdqu32 %zmm9, zmm_regs+576(%rip)
+ vmovdqu32 %zmm10, zmm_regs+640(%rip)
+ vmovdqu32 %zmm11, zmm_regs+704(%rip)
+ vmovdqu32 %zmm12, zmm_regs+768(%rip)
+ vmovdqu32 %zmm13, zmm_regs+832(%rip)
+ vmovdqu32 %zmm14, zmm_regs+896(%rip)
+ vmovdqu32 %zmm15, zmm_regs+960(%rip)
+ vmovdqu32 %zmm16, zmm_regs+1024(%rip)
+ vmovdqu32 %zmm17, zmm_regs+1088(%rip)
+ vmovdqu32 %zmm18, zmm_regs+1152(%rip)
+ vmovdqu32 %zmm19, zmm_regs+1216(%rip)
+ vmovdqu32 %zmm20, zmm_regs+1280(%rip)
+ vmovdqu32 %zmm21, zmm_regs+1344(%rip)
+ vmovdqu32 %zmm22, zmm_regs+1408(%rip)
+ vmovdqu32 %zmm23, zmm_regs+1472(%rip)
+ vmovdqu32 %zmm24, zmm_regs+1536(%rip)
+ vmovdqu32 %zmm25, zmm_regs+1600(%rip)
+ vmovdqu32 %zmm26, zmm_regs+1664(%rip)
+ vmovdqu32 %zmm27, zmm_regs+1728(%rip)
+ vmovdqu32 %zmm28, zmm_regs+1792(%rip)
+ vmovdqu32 %zmm29, zmm_regs+1856(%rip)
+ vmovdqu32 %zmm30, zmm_regs+1920(%rip)
+ vmovdqu32 %zmm31, zmm_regs+1984(%rip)
+ jmp *callthis(%rip)
+.LFE3:
+ .size snapshot, .-snapshot
+
+ .p2align 4,,15
+.globl snapshot_ret
+ .type snapshot_ret, @function
+snapshot_ret:
+ movq %rdi, rdi(%rip)
+ subq $8, %rsp
+ call *callthis(%rip)
+ addq $8, %rsp
+ movq %rax, rax(%rip)
+ movq %rdx, rdx(%rip)
+ vmovdqu32 %zmm0, zmm_regs+0(%rip)
+ vmovdqu32 %zmm1, zmm_regs+64(%rip)
+ fstpt x87_regs(%rip)
+ fstpt x87_regs+16(%rip)
+ fldt x87_regs+16(%rip)
+ fldt x87_regs(%rip)
+ ret
+ .size snapshot_ret, .-snapshot_ret
+
+ .comm callthis,8,8
+ .comm rax,8,8
+ .comm rbx,8,8
+ .comm rcx,8,8
+ .comm rdx,8,8
+ .comm rsi,8,8
+ .comm rdi,8,8
+ .comm rsp,8,8
+ .comm rbp,8,8
+ .comm r8,8,8
+ .comm r9,8,8
+ .comm r10,8,8
+ .comm r11,8,8
+ .comm r12,8,8
+ .comm r13,8,8
+ .comm r14,8,8
+ .comm r15,8,8
+ .comm zmm_regs,2048,64
+ .comm x87_regs,128,32
+ .comm volatile_var,8,8
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h
new file mode 100644
index 0000000000..25ce544c4a
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/avx512f-check.h
@@ -0,0 +1,41 @@
+#include <stdlib.h>
+#include "cpuid.h"
+
+static void avx512f_test (void);
+
+int
+main ()
+{
+ unsigned int eax, ebx, ecx, edx;
+
+ if (!__get_cpuid (1, &eax, &ebx, &ecx, &edx))
+ return 0;
+
+#define DEBUG
+ /* Run AVX test only if host has AVX 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 ((ebx & bit_AVX512F) == bit_AVX512F)
+ {
+ avx512f_test ();
+#ifdef DEBUG
+ printf ("PASSED\n");
+#endif
+ }
+#ifdef DEBUG
+ else
+ printf ("SKIPPED\n");
+#endif
+ }
+#ifdef DEBUG
+ else
+ printf ("SKIPPED\n");
+#endif
+
+ return 0;
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_m512_returning.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_m512_returning.c
new file mode 100644
index 0000000000..ee126b5510
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_m512_returning.c
@@ -0,0 +1,32 @@
+#include <stdio.h>
+#include "avx512f-check.h"
+#include "args.h"
+
+struct IntegerRegisters iregs;
+struct FloatRegisters fregs;
+unsigned int num_iregs, num_fregs;
+
+__m512
+fun_test_returning___m512 (void)
+{
+ volatile_var++;
+ return (__m512){73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+}
+
+__m512 test_512;
+
+static void
+avx512f_test (void)
+{
+ unsigned failed = 0;
+ ZMM_T zmmt1, zmmt2;
+
+ clear_struct_registers;
+ test_512 = (__m512){73,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
+ zmmt1._m512[0] = test_512;
+ zmmt2._m512[0] = WRAP_RET (fun_test_returning___m512)();
+ if (memcmp (&zmmt1, &zmmt2, sizeof (zmmt2)) != 0)
+ printf ("fail m512\n"), failed++;
+ if (failed)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c
new file mode 100644
index 0000000000..ead9c6797e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_m512.c
@@ -0,0 +1,168 @@
+#include <stdio.h>
+#include "avx512f-check.h"
+#include "args.h"
+
+struct IntegerRegisters iregs;
+struct FloatRegisters fregs;
+unsigned int num_iregs, num_fregs;
+
+/* This struct holds values for argument checking. */
+struct
+{
+ ZMM_T i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23;
+} values;
+
+char *pass;
+int failed = 0;
+
+#undef assert
+#define assert(c) do { \
+ if (!(c)) {failed++; printf ("failed %s\n", pass); } \
+} while (0)
+
+#define compare(X1,X2,T) do { \
+ assert (memcmp (&X1, &X2, sizeof (T)) == 0); \
+} while (0)
+
+fun_check_passing_m512_8_values (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED)
+{
+ /* Check argument values. */
+ compare (values.i0, i0, __m512);
+ compare (values.i1, i1, __m512);
+ compare (values.i2, i2, __m512);
+ compare (values.i3, i3, __m512);
+ compare (values.i4, i4, __m512);
+ compare (values.i5, i5, __m512);
+ compare (values.i6, i6, __m512);
+ compare (values.i7, i7, __m512);
+}
+
+void
+fun_check_passing_m512_8_regs (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+void
+fun_check_passing_m512_20_values (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED, __m512 i8 ATTRIBUTE_UNUSED, __m512 i9 ATTRIBUTE_UNUSED, __m512 i10 ATTRIBUTE_UNUSED, __m512 i11 ATTRIBUTE_UNUSED, __m512 i12 ATTRIBUTE_UNUSED, __m512 i13 ATTRIBUTE_UNUSED, __m512 i14 ATTRIBUTE_UNUSED, __m512 i15 ATTRIBUTE_UNUSED, __m512 i16 ATTRIBUTE_UNUSED, __m512 i17 ATTRIBUTE_UNUSED, __m512 i18 ATTRIBUTE_UNUSED, __m512 i19 ATTRIBUTE_UNUSED)
+{
+ /* Check argument values. */
+ compare (values.i0, i0, __m512);
+ compare (values.i1, i1, __m512);
+ compare (values.i2, i2, __m512);
+ compare (values.i3, i3, __m512);
+ compare (values.i4, i4, __m512);
+ compare (values.i5, i5, __m512);
+ compare (values.i6, i6, __m512);
+ compare (values.i7, i7, __m512);
+ compare (values.i8, i8, __m512);
+ compare (values.i9, i9, __m512);
+ compare (values.i10, i10, __m512);
+ compare (values.i11, i11, __m512);
+ compare (values.i12, i12, __m512);
+ compare (values.i13, i13, __m512);
+ compare (values.i14, i14, __m512);
+ compare (values.i15, i15, __m512);
+ compare (values.i16, i16, __m512);
+ compare (values.i17, i17, __m512);
+ compare (values.i18, i18, __m512);
+ compare (values.i19, i19, __m512);
+}
+
+void
+fun_check_passing_m512_20_regs (__m512 i0 ATTRIBUTE_UNUSED, __m512 i1 ATTRIBUTE_UNUSED, __m512 i2 ATTRIBUTE_UNUSED, __m512 i3 ATTRIBUTE_UNUSED, __m512 i4 ATTRIBUTE_UNUSED, __m512 i5 ATTRIBUTE_UNUSED, __m512 i6 ATTRIBUTE_UNUSED, __m512 i7 ATTRIBUTE_UNUSED, __m512 i8 ATTRIBUTE_UNUSED, __m512 i9 ATTRIBUTE_UNUSED, __m512 i10 ATTRIBUTE_UNUSED, __m512 i11 ATTRIBUTE_UNUSED, __m512 i12 ATTRIBUTE_UNUSED, __m512 i13 ATTRIBUTE_UNUSED, __m512 i14 ATTRIBUTE_UNUSED, __m512 i15 ATTRIBUTE_UNUSED, __m512 i16 ATTRIBUTE_UNUSED, __m512 i17 ATTRIBUTE_UNUSED, __m512 i18 ATTRIBUTE_UNUSED, __m512 i19 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+
+#define def_check_passing8(_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _func1, _func2, TYPE) \
+ values.i0.TYPE[0] = _i0; \
+ values.i1.TYPE[0] = _i1; \
+ values.i2.TYPE[0] = _i2; \
+ values.i3.TYPE[0] = _i3; \
+ values.i4.TYPE[0] = _i4; \
+ values.i5.TYPE[0] = _i5; \
+ values.i6.TYPE[0] = _i6; \
+ values.i7.TYPE[0] = _i7; \
+ WRAP_CALL(_func1) (_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7); \
+ \
+ clear_struct_registers; \
+ fregs.F0.TYPE[0] = _i0; \
+ fregs.F1.TYPE[0] = _i1; \
+ fregs.F2.TYPE[0] = _i2; \
+ fregs.F3.TYPE[0] = _i3; \
+ fregs.F4.TYPE[0] = _i4; \
+ fregs.F5.TYPE[0] = _i5; \
+ fregs.F6.TYPE[0] = _i6; \
+ fregs.F7.TYPE[0] = _i7; \
+ num_fregs = 8; \
+ WRAP_CALL(_func2) (_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7);
+
+#define def_check_passing20(_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9, _i10, _i11, _i12, _i13, _i14, _i15, _i16, _i17, _i18, _i19, _func1, _func2, TYPE) \
+ values.i0.TYPE[0] = _i0; \
+ values.i1.TYPE[0] = _i1; \
+ values.i2.TYPE[0] = _i2; \
+ values.i3.TYPE[0] = _i3; \
+ values.i4.TYPE[0] = _i4; \
+ values.i5.TYPE[0] = _i5; \
+ values.i6.TYPE[0] = _i6; \
+ values.i7.TYPE[0] = _i7; \
+ values.i8.TYPE[0] = _i8; \
+ values.i9.TYPE[0] = _i9; \
+ values.i10.TYPE[0] = _i10; \
+ values.i11.TYPE[0] = _i11; \
+ values.i12.TYPE[0] = _i12; \
+ values.i13.TYPE[0] = _i13; \
+ values.i14.TYPE[0] = _i14; \
+ values.i15.TYPE[0] = _i15; \
+ values.i16.TYPE[0] = _i16; \
+ values.i17.TYPE[0] = _i17; \
+ values.i18.TYPE[0] = _i18; \
+ values.i19.TYPE[0] = _i19; \
+ WRAP_CALL(_func1) (_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9, _i10, _i11, _i12, _i13, _i14, _i15, _i16, _i17, _i18, _i19); \
+ \
+ clear_struct_registers; \
+ fregs.F0.TYPE[0] = _i0; \
+ fregs.F1.TYPE[0] = _i1; \
+ fregs.F2.TYPE[0] = _i2; \
+ fregs.F3.TYPE[0] = _i3; \
+ fregs.F4.TYPE[0] = _i4; \
+ fregs.F5.TYPE[0] = _i5; \
+ fregs.F6.TYPE[0] = _i6; \
+ fregs.F7.TYPE[0] = _i7; \
+ num_fregs = 8; \
+ WRAP_CALL(_func2) (_i0, _i1, _i2, _i3, _i4, _i5, _i6, _i7, _i8, _i9, _i10, _i11, _i12, _i13, _i14, _i15, _i16, _i17, _i18, _i19);
+
+void
+test_m512_on_stack ()
+{
+ __m512 x[8];
+ int i;
+ for (i = 0; i < 8; i++)
+ x[i] = (__m512){32+i, 0, 0, 0, 0, 0, 0, 0};
+ pass = "m512-8";
+ def_check_passing8(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], fun_check_passing_m512_8_values, fun_check_passing_m512_8_regs, _m512);
+}
+
+void
+test_too_many_m512 ()
+{
+ __m512 x[20];
+ int i;
+ for (i = 0; i < 20; i++)
+ x[i] = (__m512){32+i, 0, 0, 0, 0, 0, 0, 0};
+ pass = "m512-20";
+ def_check_passing20(x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10], x[11], x[12], x[13], x[14], x[15], x[16], x[17], x[18], x[19], fun_check_passing_m512_20_values, fun_check_passing_m512_20_regs, _m512);
+}
+
+static void
+avx512f_test (void)
+{
+ test_m512_on_stack ();
+ test_too_many_m512 ();
+ if (failed)
+ abort ();
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_structs.c
new file mode 100644
index 0000000000..8daa676e7e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_structs.c
@@ -0,0 +1,65 @@
+#include "avx512f-check.h"
+#include "args.h"
+
+struct IntegerRegisters iregs;
+struct FloatRegisters fregs;
+unsigned int num_iregs, num_fregs;
+
+struct m512_struct
+{
+ __m512 x;
+};
+
+struct m512_2_struct
+{
+ __m512 x1, x2;
+};
+
+/* Check that the struct is passed as the individual members in fregs. */
+void
+check_struct_passing1 (struct m512_struct ms1 ATTRIBUTE_UNUSED,
+ struct m512_struct ms2 ATTRIBUTE_UNUSED,
+ struct m512_struct ms3 ATTRIBUTE_UNUSED,
+ struct m512_struct ms4 ATTRIBUTE_UNUSED,
+ struct m512_struct ms5 ATTRIBUTE_UNUSED,
+ struct m512_struct ms6 ATTRIBUTE_UNUSED,
+ struct m512_struct ms7 ATTRIBUTE_UNUSED,
+ struct m512_struct ms8 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+void
+check_struct_passing2 (struct m512_2_struct ms ATTRIBUTE_UNUSED)
+{
+ /* Check the passing on the stack by comparing the address of the
+ stack elements to the expected place on the stack. */
+ assert ((unsigned long)&ms.x1 == rsp+8);
+ assert ((unsigned long)&ms.x2 == rsp+72);
+}
+
+static void
+avx512f_test (void)
+{
+ struct m512_struct m512s [8];
+ struct m512_2_struct m512_2s = {
+ { 48.394, 39.3, -397.9, 3484.9, -8.394, -93.3, 7.9, 84.94,
+ 48.3941, 39.31, -397.91, 3484.91, -8.3941, -93.31, 7.91, 84.941 },
+ { -8.394, -3.3, -39.9, 34.9, 7.9, 84.94, -48.394, 39.3,
+ -8.3942, -3.32, -39.92, 34.92, 7.92, 84.942, -48.3942, 39.32 }
+ };
+ int i;
+
+ for (i = 0; i < 8; i++)
+ m512s[i].x = (__m512){32+i, 0, i, 0, -i, 0, i - 12, i + 8,
+ 32+i, 0, i, 0, -i, 0, i - 12, i + 8};
+
+ clear_struct_registers;
+ for (i = 0; i < 8; i++)
+ (&fregs.zmm0)[i]._m512[0] = m512s[i].x;
+ num_fregs = 8;
+ WRAP_CALL (check_struct_passing1)(m512s[0], m512s[1], m512s[2], m512s[3],
+ m512s[4], m512s[5], m512s[6], m512s[7]);
+ WRAP_CALL (check_struct_passing2)(m512_2s);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_unions.c b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_unions.c
new file mode 100644
index 0000000000..370d15b627
--- /dev/null
+++ b/gcc/testsuite/gcc.target/x86_64/abi/avx512f/test_passing_unions.c
@@ -0,0 +1,180 @@
+#include "avx512f-check.h"
+#include "args.h"
+
+struct IntegerRegisters iregs;
+struct FloatRegisters fregs;
+unsigned int num_iregs, num_fregs;
+
+union un1
+{
+ __m512 x;
+ float f;
+};
+
+union un2
+{
+ __m512 x;
+ double d;
+};
+
+union un3
+{
+ __m512 x;
+ __m128 v;
+};
+
+union un4
+{
+ __m512 x;
+ long double ld;
+};
+
+union un5
+{
+ __m512 x;
+ int i;
+};
+
+union un6
+{
+ __m512 x;
+ __m256 v;
+};
+
+
+void
+check_union_passing1(union un1 u1 ATTRIBUTE_UNUSED,
+ union un1 u2 ATTRIBUTE_UNUSED,
+ union un1 u3 ATTRIBUTE_UNUSED,
+ union un1 u4 ATTRIBUTE_UNUSED,
+ union un1 u5 ATTRIBUTE_UNUSED,
+ union un1 u6 ATTRIBUTE_UNUSED,
+ union un1 u7 ATTRIBUTE_UNUSED,
+ union un1 u8 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+void
+check_union_passing2(union un2 u1 ATTRIBUTE_UNUSED,
+ union un2 u2 ATTRIBUTE_UNUSED,
+ union un2 u3 ATTRIBUTE_UNUSED,
+ union un2 u4 ATTRIBUTE_UNUSED,
+ union un2 u5 ATTRIBUTE_UNUSED,
+ union un2 u6 ATTRIBUTE_UNUSED,
+ union un2 u7 ATTRIBUTE_UNUSED,
+ union un2 u8 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+void
+check_union_passing3(union un3 u1 ATTRIBUTE_UNUSED,
+ union un3 u2 ATTRIBUTE_UNUSED,
+ union un3 u3 ATTRIBUTE_UNUSED,
+ union un3 u4 ATTRIBUTE_UNUSED,
+ union un3 u5 ATTRIBUTE_UNUSED,
+ union un3 u6 ATTRIBUTE_UNUSED,
+ union un3 u7 ATTRIBUTE_UNUSED,
+ union un3 u8 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+void
+check_union_passing4(union un4 u ATTRIBUTE_UNUSED)
+{
+ /* Check the passing on the stack by comparing the address of the
+ stack elements to the expected place on the stack. */
+ assert ((unsigned long)&u.x == rsp+8);
+ assert ((unsigned long)&u.ld == rsp+8);
+}
+
+void
+check_union_passing5(union un5 u ATTRIBUTE_UNUSED)
+{
+ /* Check the passing on the stack by comparing the address of the
+ stack elements to the expected place on the stack. */
+ assert ((unsigned long)&u.x == rsp+8);
+ assert ((unsigned long)&u.i == rsp+8);
+}
+
+void
+check_union_passing6(union un6 u1 ATTRIBUTE_UNUSED,
+ union un6 u2 ATTRIBUTE_UNUSED,
+ union un6 u3 ATTRIBUTE_UNUSED,
+ union un6 u4 ATTRIBUTE_UNUSED,
+ union un6 u5 ATTRIBUTE_UNUSED,
+ union un6 u6 ATTRIBUTE_UNUSED,
+ union un6 u7 ATTRIBUTE_UNUSED,
+ union un6 u8 ATTRIBUTE_UNUSED)
+{
+ /* Check register contents. */
+ check_m512_arguments;
+}
+
+#define check_union_passing1 WRAP_CALL(check_union_passing1)
+#define check_union_passing2 WRAP_CALL(check_union_passing2)
+#define check_union_passing3 WRAP_CALL(check_union_passing3)
+#define check_union_passing4 WRAP_CALL(check_union_passing4)
+#define check_union_passing5 WRAP_CALL(check_union_passing5)
+#define check_union_passing6 WRAP_CALL(check_union_passing6)
+
+static void
+avx512f_test (void)
+{
+ union un1 u1[8];
+ union un2 u2[8];
+ union un3 u3[8];
+ union un4 u4;
+ union un5 u5;
+ union un6 u6[8];
+ int i;
+
+ for (i = 0; i < 8; i++)
+ u1[i].x = (__m512){32+i, 0, i, 0, -i, 0, i - 12, i + 8,
+ 32+i, 0, i, 0, -i, 0, i - 12, i + 8};
+
+ clear_struct_registers;
+ for (i = 0; i < 8; i++)
+ (&fregs.zmm0)[i]._m512[0] = u1[i].x;
+ num_fregs = 8;
+ check_union_passing1(u1[0], u1[1], u1[2], u1[3],
+ u1[4], u1[5], u1[6], u1[7]);
+
+ clear_struct_registers;
+ for (i = 0; i < 8; i++)
+ {
+ u2[i].x = u1[i].x;
+ (&fregs.zmm0)[i]._m512[0] = u2[i].x;
+ }
+ num_fregs = 8;
+ check_union_passing2(u2[0], u2[1], u2[2], u2[3],
+ u2[4], u2[5], u2[6], u2[7]);
+
+ clear_struct_registers;
+ for (i = 0; i < 8; i++)
+ {
+ u3[i].x = u1[i].x;
+ (&fregs.zmm0)[i]._m512[0] = u3[i].x;
+ }
+ num_fregs = 8;
+ check_union_passing3(u3[0], u3[1], u3[2], u3[3],
+ u3[4], u3[5], u3[6], u3[7]);
+
+ check_union_passing4(u4);
+ check_union_passing5(u5);
+
+ clear_struct_registers;
+ for (i = 0; i < 8; i++)
+ {
+ u6[i].x = u1[i].x;
+ (&fregs.zmm0)[i]._m512[0] = u6[i].x;
+ }
+ num_fregs = 8;
+ check_union_passing6(u6[0], u6[1], u6[2], u6[3],
+ u6[4], u6[5], u6[6], u6[7]);
+}
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp b/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp
index e76d0c1015..930942b046 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/callabi.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
index 048da6e56a..513f5619a2 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-2a.c
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi standard calls. */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
/* { dg-additional-sources "func-2b.c" } */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
index 730b8db9c1..e1ff8f8337 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/func-indirect-2a.c
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi standard calls via variable. */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -ffast-math -fno-builtin" } */
/* { dg-additional-sources "func-indirect-2b.c" } */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
index a44470431f..36bd3483f6 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-4a.c
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
/* { dg-additional-sources "vaarg-4b.c" } */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
index e9912957e7..fa85677797 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/callabi/vaarg-5a.c
@@ -1,5 +1,5 @@
/* Test for cross x86_64<->w64 abi va_list calls. */
-/* { dg-do run { target i?86-*-linux* x86_64-*-linux* } } */
+/* { dg-do run } */
/* { dg-options "-O2 -mabi=ms -std=gnu99 -fno-builtin" } */
/* { dg-additional-sources "vaarg-5b.c" } */
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
index 299bc80cab..ad6d835ba0 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_structs.c
@@ -216,7 +216,7 @@ main (void)
for (i = 0; i < 8; i++)
{
m128s[i].x = (__m128){32+i, 0, i, 0};
- fregs.xmm0._m128[i] = m128s[i].x;
+ (&fregs.xmm0)[i]._m128[0] = m128s[i].x;
}
num_fregs = 8;
clear_float_hardware_registers;
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_unions.c b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_unions.c
index 1e3e85fdb5..cff244abb9 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/test_passing_unions.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/test_passing_unions.c
@@ -206,7 +206,7 @@ main (void)
for (i = 0; i < 8; i++)
{
u4[i].x = (__m128){32+i, 0, i, 0};
- fregs.xmm0._m128[i] = u4[i].x;
+ (&fregs.xmm0)[i]._m128[0] = u4[i].x;
}
num_fregs = 8;
clear_float_hardware_registers;
diff --git a/gcc/testsuite/gcc.target/x86_64/abi/test_struct_returning.c b/gcc/testsuite/gcc.target/x86_64/abi/test_struct_returning.c
index ef8d329048..2881f8ec85 100644
--- a/gcc/testsuite/gcc.target/x86_64/abi/test_struct_returning.c
+++ b/gcc/testsuite/gcc.target/x86_64/abi/test_struct_returning.c
@@ -190,7 +190,7 @@ void check_all (Type class, unsigned long size)
is given to the f_* functions, otherwise a conforming program
could notice the struct changing already before the function returns.
This temporary struct could be anywhere. For GCC it will be on
- stack, but noone is forbidding that it could be a static variable
+ stack, but no one is forbidding that it could be a static variable
if there's no threading or proper locking. Nobody in his right mind
will not use the stack for that. */
case MEM: assert (*(unsigned char*)struct_addr == 42 && rdi == rax); break;
diff --git a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
index 2c61cf2809..c6ed370dc1 100644
--- a/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
+++ b/gcc/testsuite/gcc.target/xstormy16/xstormy16.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gcc.test-framework/README b/gcc/testsuite/gcc.test-framework/README
index 4055b53be4..49446c1807 100644
--- a/gcc/testsuite/gcc.test-framework/README
+++ b/gcc/testsuite/gcc.test-framework/README
@@ -25,7 +25,7 @@ The awk script prints unexpected results followed by the number of tests
that passed and failed.
-Copyright (C) 2005, 2007 Free Software Foundation, Inc.
+Copyright (C) 2005-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gcc.test-framework/gen_directive_tests b/gcc/testsuite/gcc.test-framework/gen_directive_tests
index 6aa63ad6f6..e247fe83b5 100755
--- a/gcc/testsuite/gcc.test-framework/gen_directive_tests
+++ b/gcc/testsuite/gcc.test-framework/gen_directive_tests
@@ -14,7 +14,7 @@
# This script has evolved and could be rewritten to be more compact.
#
#
-# Copyright (c) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.test-framework/test-framework.awk b/gcc/testsuite/gcc.test-framework/test-framework.awk
index ccede06b5f..7716cc064e 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.awk
+++ b/gcc/testsuite/gcc.test-framework/test-framework.awk
@@ -3,8 +3,7 @@
# of passing tests.
#
#
-# Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gcc.test-framework/test-framework.exp b/gcc/testsuite/gcc.test-framework/test-framework.exp
index c669f0ad1c..7fbfecf37b 100644
--- a/gcc/testsuite/gcc.test-framework/test-framework.exp
+++ b/gcc/testsuite/gcc.test-framework/test-framework.exp
@@ -1,5 +1,4 @@
-# Copyright (c) 2002, 2003, 2004, 2005, 2007, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_1.f90 b/gcc/testsuite/gfortran.dg/abstract_type_1.f90
index d0cd4320a7..09757b1f92 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/abstract_type_1.f90
@@ -11,4 +11,3 @@ MODULE m
END TYPE t ! { dg-error "END MODULE" }
END MODULE m
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_2.f03 b/gcc/testsuite/gfortran.dg/abstract_type_2.f03
index 2583f1f4f8..b261ce2fe1 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_2.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_2.f03
@@ -11,4 +11,3 @@ MODULE m
END TYPE error_t ! { dg-error "END MODULE" }
END MODULE m
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_3.f03 b/gcc/testsuite/gfortran.dg/abstract_type_3.f03
index 79bc131e0c..e7a9d9b635 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_3.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_3.f03
@@ -49,4 +49,3 @@ CONTAINS
END SUBROUTINE impl
END MODULE m
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_4.f03 b/gcc/testsuite/gfortran.dg/abstract_type_4.f03
index a6e5de2088..dd0b0abc07 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_4.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_4.f03
@@ -26,4 +26,3 @@ PROGRAM main
! See if constructing the extending type works.
conc = concrete_t (1, 2)
END PROGRAM main
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_5.f03 b/gcc/testsuite/gfortran.dg/abstract_type_5.f03
index 42ac963fac..6e72882cfe 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_5.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_5.f03
@@ -43,4 +43,3 @@ CONTAINS
END SUBROUTINE test
END MODULE m
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_6.f03 b/gcc/testsuite/gfortran.dg/abstract_type_6.f03
index de1cea3632..5eefcb8361 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_6.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_6.f03
@@ -10,7 +10,7 @@
module m
TYPE, ABSTRACT :: top
CONTAINS
- PROCEDURE(xxx), DEFERRED :: proc_a ! { dg-error "must be a module procedure" }
+ PROCEDURE(xxx), DEFERRED :: proc_a ! { dg-error "must be explicit" }
! some useful default behaviour
PROCEDURE :: proc_c => top_c ! { dg-error "must be a module procedure" }
END TYPE top
@@ -50,4 +50,3 @@ SUBROUTINE bottom_c(obj)
! other stuff
END SUBROUTINE bottom_c
end module
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_7.f03 b/gcc/testsuite/gfortran.dg/abstract_type_7.f03
index 3ea0fdca61..382cf9e795 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_7.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_7.f03
@@ -15,4 +15,3 @@ module ice_module
end type c_type
end module ice_module
-! { dg-final { cleanup-modules "ice_module" } }
diff --git a/gcc/testsuite/gfortran.dg/abstract_type_8.f03 b/gcc/testsuite/gfortran.dg/abstract_type_8.f03
index c924abac9a..edcb37a6e1 100644
--- a/gcc/testsuite/gfortran.dg/abstract_type_8.f03
+++ b/gcc/testsuite/gfortran.dg/abstract_type_8.f03
@@ -25,5 +25,3 @@ abstract interface
end subroutine generic_desc
end interface
end module factory_pattern
-
-! { dg-final { cleanup-modules "factory_pattern" } }
diff --git a/gcc/testsuite/gfortran.dg/access_spec_1.f90 b/gcc/testsuite/gfortran.dg/access_spec_1.f90
index 2c080c9c62..8bebd11313 100644
--- a/gcc/testsuite/gfortran.dg/access_spec_1.f90
+++ b/gcc/testsuite/gfortran.dg/access_spec_1.f90
@@ -15,4 +15,3 @@ module mod
integer, private :: z ! Fortran 2003
end type
end module
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/access_spec_2.f90 b/gcc/testsuite/gfortran.dg/access_spec_2.f90
index 7b67e6c859..ccb56e2cdc 100644
--- a/gcc/testsuite/gfortran.dg/access_spec_2.f90
+++ b/gcc/testsuite/gfortran.dg/access_spec_2.f90
@@ -37,4 +37,3 @@ program x
public :: i ! { dg-error "only allowed in the specification part of a module" }
integer,public :: j ! { dg-error "not allowed outside of the specification part of a module" }
end program x
-! { dg-final { cleanup-modules "test mod" } }
diff --git a/gcc/testsuite/gfortran.dg/access_spec_3.f90 b/gcc/testsuite/gfortran.dg/access_spec_3.f90
index 9a076b66c5..838b47b2f4 100644
--- a/gcc/testsuite/gfortran.dg/access_spec_3.f90
+++ b/gcc/testsuite/gfortran.dg/access_spec_3.f90
@@ -31,4 +31,3 @@ program user
bint = 8
write(*,*) aint
end program
-! { dg-final { cleanup-modules "base a b c" } }
diff --git a/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90 b/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90
index 69bfcd05a5..1caf652212 100644
--- a/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90
+++ b/gcc/testsuite/gfortran.dg/actual_array_constructor_1.f90
@@ -78,5 +78,3 @@ contains
end subroutine option_stopwatch_a
end program main
-! { dg-final { cleanup-modules "global my_module" } }
-
diff --git a/gcc/testsuite/gfortran.dg/actual_array_result_1.f90 b/gcc/testsuite/gfortran.dg/actual_array_result_1.f90
index cf79315cbb..04c7e679b1 100644
--- a/gcc/testsuite/gfortran.dg/actual_array_result_1.f90
+++ b/gcc/testsuite/gfortran.dg/actual_array_result_1.f90
@@ -68,4 +68,3 @@ program main
n = 5
if(any (foo3(n) /= [ 0,1,2,3,0 ])) call abort()
end program
-! { dg-final { cleanup-modules "one" } }
diff --git a/gcc/testsuite/gfortran.dg/actual_array_vect_1.f90 b/gcc/testsuite/gfortran.dg/actual_array_vect_1.f90
index cbee22676a..8b4d6f4951 100644
--- a/gcc/testsuite/gfortran.dg/actual_array_vect_1.f90
+++ b/gcc/testsuite/gfortran.dg/actual_array_vect_1.f90
@@ -31,5 +31,3 @@ call bb(w(2:4))
call bb(w((/3,2,1/))) ! { dg-error "vector subscript" }
write(*,*)w
end
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/actual_procedure_1.f90 b/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
index 5327cb73d7..4a7f3d8118 100644
--- a/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
+++ b/gcc/testsuite/gfortran.dg/actual_procedure_1.f90
@@ -69,4 +69,3 @@ function proc_ext (arg, chr)
proc_ext = arg
chr = "proc_ext"
end function
-! { dg-final { cleanup-modules "m" } } \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/aint_anint_1.f90 b/gcc/testsuite/gfortran.dg/aint_anint_1.f90
index 179748c119..aadb62cd96 100644
--- a/gcc/testsuite/gfortran.dg/aint_anint_1.f90
+++ b/gcc/testsuite/gfortran.dg/aint_anint_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
program aint_anint_1
implicit none
diff --git a/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90 b/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90
index d8899d2ecf..ddfba012ae 100644
--- a/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90
+++ b/gcc/testsuite/gfortran.dg/aliasing_array_result_1.f90
@@ -161,4 +161,3 @@ contains
get_d = d
end function get_d
end program test
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/aliasing_dummy_5.f90 b/gcc/testsuite/gfortran.dg/aliasing_dummy_5.f90
index 379fbd7f8f..cc52456f0d 100644
--- a/gcc/testsuite/gfortran.dg/aliasing_dummy_5.f90
+++ b/gcc/testsuite/gfortran.dg/aliasing_dummy_5.f90
@@ -51,5 +51,3 @@ contains
CALL foobar (x)
end subroutine bar
END subroutine test
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f90 b/gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f90
index 13b2230c0a..e7a5ff21cf 100644
--- a/gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_alloc_expr_3.f90
@@ -21,5 +21,3 @@ function func2()
end function
end module foo
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90
index c85edea62f..808a2898cf 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_10.f90
@@ -57,5 +57,3 @@ program tao_program
deallocate (u%design, u%model)
deallocate (s%u)
end program
-
-! { dg-final { cleanup-modules "test_struct" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f03 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f03
index b44769d966..ea8067d389 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f03
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_12.f03
@@ -40,5 +40,3 @@ program main2
call o%make(u)
if (any (int (o%disp()) .ne. [1,2])) call abort
end program main2
-! { dg-final { cleanup-modules "foo" } }
-
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_6.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_6.f90
index 4e8edc2287..c3882761f9 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_assign_6.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_6.f90
@@ -51,5 +51,3 @@ program VST28
call abort ()
end if
end program VST28
-
-! { dg-final { cleanup-modules "iso_varying_string" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90
index c7e9b757d7..08e98c2c33 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_7.f90
@@ -36,5 +36,3 @@ end module PrettyPix_module
if (this%look_at_path%r(i)%y2(1) .ne. x(i)) call abort
end do
end
-
-! { dg-final { cleanup-modules "prettypix_module" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_assign_8.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_assign_8.f90
index ab4868de13..655ef856ba 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_assign_8.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_assign_8.f90
@@ -46,5 +46,3 @@ end module
if (t1%a .ne. -0.5d0) call abort
if (any(t1%b .ne. [-1d0, -2d0])) call abort
end
-
-! { dg-final { cleanup-modules "typemodule" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90
index c8945cfc37..c4c4ae21e0 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_auto_array_2.f90
@@ -38,4 +38,3 @@ end module grid_io
call read_grid_header
end
! { dg-final { cleanup-tree-dump "grid_io" } }
-! { dg-final { cleanup-modules "grid_io" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
index e53112ce46..65724fe4b7 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_basics_1.f90
@@ -33,8 +33,10 @@ program alloc
integer, allocatable :: a2(:)
end type alloc2
- type(alloc2) :: b
integer :: i
+
+ BLOCK ! To ensure that the allocatables are freed at the end of the scope
+ type(alloc2) :: b
type(alloc2), allocatable :: c(:)
if (allocated(b%a2) .OR. allocated(b%a1)) then
@@ -64,7 +66,7 @@ program alloc
deallocate(c)
! 7 calls to _gfortran_deallocate (b (3) and c(4) goes aout of scope)
-
+ END BLOCK
contains
subroutine allocate_alloc2(b)
@@ -141,4 +143,3 @@ contains
end program alloc
! { dg-final { scan-tree-dump-times "builtin_free" 18 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "alloc_m" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_basics_4.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_basics_4.f90
index 508d567068..9877d3b7ec 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_basics_4.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_basics_4.f90
@@ -21,5 +21,3 @@ MODULE globals_m
USE types_m
TYPE(grib_t) g_dest ! output field
END MODULE
-! { dg-final { cleanup-modules "types_m globals_m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_basics_5.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_basics_5.f90
index 99cd9e08ce..9dd4e97f5b 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_basics_5.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_basics_5.f90
@@ -43,5 +43,3 @@ program tsave
if (info .ne. 10) call abort ()
end program tsave
-
-! { dg-final { cleanup-modules "bar_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_basics_6.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_basics_6.f90
new file mode 100644
index 0000000000..3ed221db24
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_basics_6.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! PR 58026: Bad error recovery for allocatable component of undeclared type
+!
+! Contributed by Joost VandeVondele <Joost.VandeVondele@mat.ethz.ch>
+
+ type sysmtx_t
+ type(ext_complex_t), allocatable :: S(:) ! { dg-error "has not been previously defined" }
+ end type
+
+end
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_class_1.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_class_1.f90
index c783f49ff7..8add2c7f48 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_class_1.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_class_1.f90
@@ -30,4 +30,3 @@ contains
type(d_sparse_mat), intent(out) :: a
end subroutine bug14
end
-! { dg-final { cleanup-modules "d_mat_mod " } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_constraint_6.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_constraint_6.f90
index e2b609aee5..787f30a609 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_constraint_6.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_constraint_6.f90
@@ -18,4 +18,3 @@ module cell
return
end subroutine cell_output
end module cell
-! { dg-final { cleanup-modules "cell" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
index 969e703094..8003c05147 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_constructor_1.f90
@@ -19,9 +19,12 @@ Program test_constructor
type(thytype), allocatable :: q(:)
end type mytype
- type (mytype) :: x
type (thytype) :: foo = thytype(reshape ([43, 100, 54, 76], [2,2]))
integer :: y(0:1, -1:0) = reshape ([42, 99, 55, 77], [2,2])
+
+ BLOCK ! Add scoping unit as the vars are otherwise implicitly SAVEd
+
+ type (mytype) :: x
integer, allocatable :: yy(:,:)
type (thytype), allocatable :: bar(:)
integer :: i
@@ -70,7 +73,7 @@ Program test_constructor
! Check that passing the constructor to a procedure works
call check_mytype (mytype(y, [foo, foo]))
-
+ END BLOCK
contains
subroutine check_mytype(x)
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_initializer_1.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_initializer_1.f90
index 1976509aaa..ac37fd6e38 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_initializer_1.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_initializer_1.f90
@@ -68,4 +68,3 @@ contains
end subroutine p_bld
end program foo
-! { dg-final { cleanup-modules "p_type_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/alloc_comp_result_1.f90 b/gcc/testsuite/gfortran.dg/alloc_comp_result_1.f90
index 90f6d97fdf..34f25c0ed6 100644
--- a/gcc/testsuite/gfortran.dg/alloc_comp_result_1.f90
+++ b/gcc/testsuite/gfortran.dg/alloc_comp_result_1.f90
@@ -30,4 +30,3 @@ program test
x = a_fun(0)
if (any (x(1)%mons%coeff .ne. 99)) call abort
end program test
-! { dg-final { cleanup-modules "mod_a" } }
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_1.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_1.f90
index fc3b983ad1..05e0be069f 100644
--- a/gcc/testsuite/gfortran.dg/allocatable_function_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocatable_function_1.f90
@@ -109,4 +109,3 @@ contains
end program alloc_fun
! { dg-final { scan-tree-dump-times "free" 10 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_5.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_5.f90
index 087100cafd..8e7d49b0fa 100644
--- a/gcc/testsuite/gfortran.dg/allocatable_function_5.f90
+++ b/gcc/testsuite/gfortran.dg/allocatable_function_5.f90
@@ -46,5 +46,3 @@ contains
bar = carg(1:12)
end function
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_6.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_6.f90
new file mode 100644
index 0000000000..3af68cc182
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocatable_function_6.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+!
+! PR fortran/56138
+!
+! Contributed by John Chludzinski, using the code of John Reid
+!
+implicit none
+CHARACTER(LEN=:),ALLOCATABLE :: str
+if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) call abort()
+str = s_to_c("ABCdef")
+if (str /= "ABCdef" .or. len(str) /= 6) call abort()
+str(1:3) = s_to_c("123")
+if (str /= "123def" .or. len(str) /= 6) call abort()
+
+contains
+
+PURE FUNCTION s_to_c(string)
+ CHARACTER(LEN=*),INTENT(IN) :: string
+ CHARACTER(LEN=:),ALLOCATABLE :: s_to_c
+ s_to_c = string
+ENDFUNCTION s_to_c
+end
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_7.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_7.f90
new file mode 100644
index 0000000000..755584ca1b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocatable_function_7.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+!
+! PR fortran/56138
+!
+! Contributed by Dominique d'Humieres and John Chludzinski,
+! using the code of John Reid
+!
+implicit none
+interface
+PURE FUNCTION s_to_c(string)
+ CHARACTER(LEN=*),INTENT(IN) :: string
+ CHARACTER(LEN=:),ALLOCATABLE :: s_to_c
+ENDFUNCTION s_to_c
+end interface
+CHARACTER(LEN=:),ALLOCATABLE :: str
+if (s_to_c("ABCdef") /= "ABCdef" .or. len(s_to_c("ABCdef")) /= 6) call abort()
+str = s_to_c("ABCdef")
+if (str /= "ABCdef" .or. len(str) /= 6) call abort()
+str(1:3) = s_to_c("123")
+if (str /= "123def" .or. len(str) /= 6) call abort()
+
+end
+
+PURE FUNCTION s_to_c(string)
+ CHARACTER(LEN=*),INTENT(IN) :: string
+ CHARACTER(LEN=:),ALLOCATABLE :: s_to_c
+ s_to_c = string
+END FUNCTION s_to_c
diff --git a/gcc/testsuite/gfortran.dg/allocatable_function_8.f90 b/gcc/testsuite/gfortran.dg/allocatable_function_8.f90
new file mode 100644
index 0000000000..48f6dd2165
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocatable_function_8.f90
@@ -0,0 +1,59 @@
+! { dg-do run }
+! Test the fix for PR61459 and PR58883.
+!
+! Contributed by John Wingate <johnww@tds.net>
+! and Tao Song <songtao.thu@gmail.com>
+!
+module a
+
+ implicit none
+ private
+ public :: f_segfault, f_segfault_plus, f_workaround
+ integer, dimension(2,2) :: b = reshape([1,-1,1,1],[2,2])
+
+contains
+
+ function f_segfault(x)
+ real, dimension(:), allocatable :: f_segfault
+ real, dimension(:), intent(in) :: x
+ allocate(f_segfault(2))
+ f_segfault = matmul(b,x)
+ end function f_segfault
+
+! Sefaulted without the ALLOCATE as well.
+ function f_segfault_plus(x)
+ real, dimension(:), allocatable :: f_segfault_plus
+ real, dimension(:), intent(in) :: x
+ f_segfault_plus = matmul(b,x)
+ end function f_segfault_plus
+
+ function f_workaround(x)
+ real, dimension(:), allocatable :: f_workaround
+ real, dimension(:), intent(in) :: x
+ real, dimension(:), allocatable :: tmp
+ allocate(f_workaround(2),tmp(2))
+ tmp = matmul(b,x)
+ f_workaround = tmp
+ end function f_workaround
+
+end module a
+
+program main
+ use a
+ implicit none
+ real, dimension(2) :: x = 1.0, y
+! PR61459
+ y = f_workaround (x)
+ if (any (f_segfault (x) .ne. y)) call abort
+ if (any (f_segfault_plus (x) .ne. y)) call abort
+! PR58883
+ if (any (foo () .ne. reshape([1,2,3,4,5,6,7,8],[2,4]))) call abort
+contains
+ function foo()
+ integer, allocatable :: foo(:,:)
+ integer, allocatable :: temp(:)
+
+ temp = [1,2,3,4,5,6,7,8]
+ foo = reshape(temp,[2,4])
+ end function
+end program main
diff --git a/gcc/testsuite/gfortran.dg/allocatable_module_1.f90 b/gcc/testsuite/gfortran.dg/allocatable_module_1.f90
index 47f10008ef..36671fee2b 100644
--- a/gcc/testsuite/gfortran.dg/allocatable_module_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocatable_module_1.f90
@@ -15,4 +15,3 @@ program fred
use fred1
use fred2
end program fred
-! { dg-final { cleanup-modules "fred1 fred2" } }
diff --git a/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90 b/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90
index f4c6599b02..fd0b4dbf21 100644
--- a/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90
+++ b/gcc/testsuite/gfortran.dg/allocatable_scalar_9.f90
@@ -28,10 +28,12 @@ end type t4
end module m
use m
+block ! Start new scoping unit as otherwise the vars are implicitly SAVEd
type(t1) :: na1, a1, aa1(:)
type(t2) :: na2, a2, aa2(:)
type(t3) :: na3, a3, aa3(:)
type(t4) :: na4, a4, aa4(:)
+
allocatable :: a1, a2, a3, a4, aa1, aa2, aa3,aa4
if(allocated(a1)) call abort()
@@ -47,9 +49,8 @@ if(allocated(na1%b1)) call abort()
if(allocated(na2%b2)) call abort()
if(allocated(na3%b3)) call abort()
if(allocated(na4%b4)) call abort()
+end block
end
! { dg-final { scan-tree-dump-times "__builtin_free" 32 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
index 52e0262f4e..95571fdfe1 100644
--- a/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_alloc_opt_1.f90
@@ -24,7 +24,7 @@ program a
allocate(i(2), errmsg=err) ! { dg-warning "useless without a STAT" }
allocate(i(2), stat=j, errmsg=x) ! { dg-error "must be a scalar CHARACTER" }
- allocate(err) ! { dg-error "nonprocedure pointer or an allocatable" }
+ allocate(err) ! { dg-error "neither a data pointer nor an allocatable" }
allocate(error(2),stat=j,errmsg=error(1)) ! { dg-error "shall not be ALLOCATEd within" }
allocate(i(2), stat = i(1)) ! { dg-error "shall not be ALLOCATEd within" }
diff --git a/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90 b/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
index 7e6d7d1f0d..305136cd65 100644
--- a/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_char_star_scalar_1.f90
@@ -29,5 +29,3 @@ program hum
call foo(q)
end program hum
-
-! { dg-final { cleanup-modules "moo" } }
diff --git a/gcc/testsuite/gfortran.dg/allocate_class_1.f90 b/gcc/testsuite/gfortran.dg/allocate_class_1.f90
index 1dea056b74..d8f80ed5ec 100644
--- a/gcc/testsuite/gfortran.dg/allocate_class_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_class_1.f90
@@ -7,5 +7,5 @@
type :: t0
end type
class(t0) :: x ! { dg-error "must be dummy, allocatable or pointer" }
- allocate(x) ! { dg-error "is not a nonprocedure pointer or an allocatable variable" }
+ allocate(x) ! { dg-error "is neither a data pointer nor an allocatable variable" }
end
diff --git a/gcc/testsuite/gfortran.dg/allocate_class_2.f90 b/gcc/testsuite/gfortran.dg/allocate_class_2.f90
new file mode 100644
index 0000000000..733dca62b9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_class_2.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR 52552: [OOP] ICE when trying to allocate non-allocatable object giving a dynamic type
+!
+! Contributed by <gccbgz.lionm@xoxy.net>
+
+
+ type t
+ integer :: i
+ end type
+
+ class(t) :: o ! { dg-error "must be dummy, allocatable or pointer" }
+
+ allocate(t::o) ! { dg-error "is neither a data pointer nor an allocatable variable" }
+
+end
diff --git a/gcc/testsuite/gfortran.dg/allocate_class_3.f90 b/gcc/testsuite/gfortran.dg/allocate_class_3.f90
new file mode 100644
index 0000000000..ddc7e23283
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_class_3.f90
@@ -0,0 +1,107 @@
+! { dg-do run }
+! Tests the fix for PR59414, comment #3, in which the allocate
+! expressions were not correctly being stripped to provide the
+! vpointer as an lhs to the pointer assignment of the vptr from
+! the SOURCE expression.
+!
+! Contributed by Antony Lewis <antony@cosmologist.info>
+!
+module ObjectLists
+ implicit none
+
+ type :: t
+ integer :: i
+ end type
+
+ type Object_array_pointer
+ class(t), pointer :: p(:)
+ end type
+
+contains
+
+ subroutine AddArray1 (P, Pt)
+ class(t) :: P(:)
+ class(Object_array_pointer) :: Pt
+
+ select type (Pt)
+ class is (Object_array_pointer)
+ if (associated (Pt%P)) deallocate (Pt%P)
+ allocate(Pt%P(1:SIZE(P)), source=P)
+ end select
+ end subroutine
+
+ subroutine AddArray2 (P, Pt)
+ class(t) :: P(:)
+ class(Object_array_pointer) :: Pt
+
+ select type (Pt)
+ type is (Object_array_pointer)
+ if (associated (Pt%P)) deallocate (Pt%P)
+ allocate(Pt%P(1:SIZE(P)), source=P)
+ end select
+ end subroutine
+
+ subroutine AddArray3 (P, Pt)
+ class(t) :: P
+ class(Object_array_pointer) :: Pt
+
+ select type (Pt)
+ class is (Object_array_pointer)
+ if (associated (Pt%P)) deallocate (Pt%P)
+ allocate(Pt%P(1:4), source=P)
+ end select
+ end subroutine
+
+ subroutine AddArray4 (P, Pt)
+ type(t) :: P(:)
+ class(Object_array_pointer) :: Pt
+
+ select type (Pt)
+ class is (Object_array_pointer)
+ if (associated (Pt%P)) deallocate (Pt%P)
+ allocate(Pt%P(1:SIZE(P)), source=P)
+ end select
+ end subroutine
+end module
+
+ use ObjectLists
+ type(Object_array_pointer), pointer :: Pt
+ class(t), pointer :: P(:)
+
+ allocate (P(2), source = [t(1),t(2)])
+ allocate (Pt, source = Object_array_pointer(NULL()))
+ call AddArray1 (P, Pt)
+ select type (x => Pt%p)
+ type is (t)
+ if (any (x%i .ne. [1,2])) call abort
+ end select
+ deallocate (P)
+ deallocate (pt)
+
+ allocate (P(3), source = [t(3),t(4),t(5)])
+ allocate (Pt, source = Object_array_pointer(NULL()))
+ call AddArray2 (P, Pt)
+ select type (x => Pt%p)
+ type is (t)
+ if (any (x%i .ne. [3,4,5])) call abort
+ end select
+ deallocate (P)
+ deallocate (pt)
+
+ allocate (Pt, source = Object_array_pointer(NULL()))
+ call AddArray3 (t(6), Pt)
+ select type (x => Pt%p)
+ type is (t)
+ if (any (x%i .ne. [6,6,6,6])) call abort
+ end select
+ deallocate (pt)
+
+ allocate (Pt, source = Object_array_pointer(NULL()))
+ call AddArray4 ([t(7), t(8)], Pt)
+ select type (x => Pt%p)
+ type is (t)
+ if (any (x%i .ne. [7,8])) call abort
+ end select
+ deallocate (pt)
+ end
+
diff --git a/gcc/testsuite/gfortran.dg/allocate_derived_1.f90 b/gcc/testsuite/gfortran.dg/allocate_derived_1.f90
index 648012431a..d2c65ffa38 100644
--- a/gcc/testsuite/gfortran.dg/allocate_derived_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_derived_1.f90
@@ -24,28 +24,27 @@
real :: r
end type
-! FIXME: uncomment and dejagnuify the lines below once class arrays are enabled
-! class(t1),dimension(:),allocatable :: x
+ class(t1),dimension(:),allocatable :: x
type(t2),dimension(:),allocatable :: y
-! class(t3),dimension(:),allocatable :: z
+ class(t3),dimension(:),allocatable :: z
-! allocate( x(1))
-! allocate(t1 :: x(2))
-! allocate(t2 :: x(3))
-! allocate(t3 :: x(4))
-! allocate(tx :: x(5)) ! { "Error in type-spec at" }
-! allocate(u0 :: x(6)) ! { "may not be ABSTRACT" }
-! allocate(v1 :: x(7)) ! { "is type incompatible with typespec" }
+ allocate( x(1))
+ allocate(t1 :: x(2))
+ allocate(t2 :: x(3))
+ allocate(t3 :: x(4))
+ allocate(tx :: x(5)) ! { dg-error "Error in type-spec at" }
+ allocate(u0 :: x(6)) ! { dg-error "may not be ABSTRACT" }
+ allocate(v1 :: x(7)) ! { dg-error "is type incompatible with typespec" }
allocate( y(1))
allocate(t1 :: y(2)) ! { dg-error "is type incompatible with typespec" }
allocate(t2 :: y(3))
allocate(t3 :: y(3)) ! { dg-error "is type incompatible with typespec" }
-! allocate( z(1))
-! allocate(t1 :: z(2)) ! { "is type incompatible with typespec" }
-! allocate(t2 :: z(3)) ! { "is type incompatible with typespec" }
-! allocate(t3 :: z(4))
+ allocate( z(1))
+ allocate(t1 :: z(2)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t2 :: z(3)) ! { dg-error "is type incompatible with typespec" }
+ allocate(t3 :: z(4))
end
diff --git a/gcc/testsuite/gfortran.dg/allocate_stat.f90 b/gcc/testsuite/gfortran.dg/allocate_stat.f90
index ceddc92538..7f9eaf58d6 100644
--- a/gcc/testsuite/gfortran.dg/allocate_stat.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_stat.f90
@@ -74,4 +74,3 @@ contains
if(associated(p)) deallocate(p)
end subroutine sub
end module test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_1.f90 b/gcc/testsuite/gfortran.dg/allocate_with_source_1.f90
index d386bb33b7..0069092f6b 100644
--- a/gcc/testsuite/gfortran.dg/allocate_with_source_1.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_with_source_1.f90
@@ -26,4 +26,3 @@ program note7_35
if (name .ne. 'xxxxxxxxxx') call abort
if (len (name) .ne. 10 ) call abort
end program note7_35
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_3.f90 b/gcc/testsuite/gfortran.dg/allocate_with_source_3.f90
new file mode 100644
index 0000000000..f7e010948a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_with_source_3.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! Contributed by Reinhold Bader
+!
+program assumed_shape_01
+ use, intrinsic :: iso_c_binding
+ implicit none
+ type, bind(c) :: cstruct
+ integer(c_int) :: i
+ real(c_float) :: r(2)
+ end type cstruct
+ interface
+ subroutine psub(this, that) bind(c, name='Psub')
+ import :: c_float, cstruct
+ real(c_float) :: this(:,:)
+ type(cstruct) :: that(:)
+ end subroutine psub
+ end interface
+
+ real(c_float) :: t(3,7)
+ type(cstruct), pointer :: u(:)
+
+! The following is VALID Fortran 2008 but NOT YET supported
+ allocate(u, source=[cstruct( 4, [1.1,2.2] ) ]) ! { dg-error "Array specification required in ALLOCATE statement" }
+ call psub(t, u)
+ deallocate (u)
+
+end program assumed_shape_01
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_source_4.f90 b/gcc/testsuite/gfortran.dg/allocate_with_source_4.f90
new file mode 100644
index 0000000000..dcd42a7981
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_with_source_4.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+!
+! PR 58916: [F03] Allocation of scalar with array source not rejected
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+
+ class(*), allocatable :: a1
+ real, allocatable :: a2
+ real b(1)
+ allocate(a1, source=b) ! { dg-error "must be scalar or have the same rank" }
+ allocate(a2, source=b) ! { dg-error "must be scalar or have the same rank" }
+end
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_typespec_4.f90 b/gcc/testsuite/gfortran.dg/allocate_with_typespec_4.f90
index 327f28dcdc..cc09697f38 100644
--- a/gcc/testsuite/gfortran.dg/allocate_with_typespec_4.f90
+++ b/gcc/testsuite/gfortran.dg/allocate_with_typespec_4.f90
@@ -21,7 +21,7 @@ subroutine not_an_f03_intrinsic
allocate(real*8 :: y(1)) ! { dg-error "Invalid type-spec at" }
allocate(real*4 :: x8) ! { dg-error "Invalid type-spec at" }
allocate(real*4 :: y8(1)) ! { dg-error "Invalid type-spec at" }
- allocate(double complex :: d1) ! { dg-error "not a nonprocedure pointer or an allocatable" }
+ allocate(double complex :: d1) ! { dg-error "neither a data pointer nor an allocatable" }
allocate(real_type :: b)
allocate(real_type :: c(1))
diff --git a/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90 b/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90
new file mode 100644
index 0000000000..cd130761a1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/allocate_with_typespec_6.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR fortran/51055
+! PR fortran/45170 comment 14
+!
+! Contributed by Juha Ruokolainen
+! and Hans-Werner Boschmann
+!
+! gfortran was before checking whether the length
+! was a specification expression.
+!
+
+program a
+ character(len=:), allocatable :: s
+ integer :: i=10
+ allocate(character(len=i)::s)
+end program a
diff --git a/gcc/testsuite/gfortran.dg/altreturn_1.f90 b/gcc/testsuite/gfortran.dg/altreturn_1.f90
index c0ae15f9a6..7ec77c178f 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_1.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_1.f90
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
+
subroutine foo (a)
real t, a, baz
call bar (*10)
diff --git a/gcc/testsuite/gfortran.dg/altreturn_2.f90 b/gcc/testsuite/gfortran.dg/altreturn_2.f90
index d0556d0370..9abf3501fb 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_2.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_2.f90
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
+
program altreturn_2
call foo() ! { dg-error "Missing alternate return" }
contains
diff --git a/gcc/testsuite/gfortran.dg/altreturn_3.f90 b/gcc/testsuite/gfortran.dg/altreturn_3.f90
index daa0901785..c445159872 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_3.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_3.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
!
! Tests the fix for PR30236, which was due to alternate returns
! in generic interfaces causing a segfault. They now work
@@ -42,4 +42,3 @@ program test
20 continue
if (i /= -1) call abort ()
end
-! { dg-final { cleanup-modules "arswitch" } }
diff --git a/gcc/testsuite/gfortran.dg/altreturn_4.f90 b/gcc/testsuite/gfortran.dg/altreturn_4.f90
index 409ea51be7..7375544d20 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_4.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_4.f90
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
! Tests the fix for PR28172, in which an ICE would result from
! the contained call with an alternate retrun.
diff --git a/gcc/testsuite/gfortran.dg/altreturn_5.f90 b/gcc/testsuite/gfortran.dg/altreturn_5.f90
index a8b6ff83cd..a552d3904a 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_5.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_5.f90
@@ -1,33 +1,32 @@
-! { dg-do run }
-! { dg-options "-std=legacy" }
-!
-! Tests the fix for PR31483, in which dummy argument procedures
-! produced an ICE if they had an alternate return.
-!
-! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
-
- SUBROUTINE R (i, *, *)
- INTEGER i
- RETURN i
- END
-
+! { dg-do run }
+! { dg-options "-std=gnu" }
+!
+! Tests the fix for PR31483, in which dummy argument procedures
+! produced an ICE if they had an alternate return.
+!
+! Contributed by Mathias Fröhlich <M.Froehlich@science-computing.de>
+
+ SUBROUTINE R (i, *, *)
+ INTEGER i
+ RETURN i
+ END
+
SUBROUTINE PHLOAD (READER, i, res)
IMPLICIT NONE
- EXTERNAL READER
- integer i
+ EXTERNAL READER
+ integer i
character(3) res
CALL READER (i, *1, *2)
- 1 res = "one"
+ 1 res = "one"
return
- 2 res = "two"
+ 2 res = "two"
return
- END
-
- EXTERNAL R
- character(3) res
- call PHLOAD (R, 1, res)
- if (res .ne. "one") call abort ()
- CALL PHLOAD (R, 2, res)
- if (res .ne. "two") call abort ()
END
+ EXTERNAL R
+ character(3) res
+ call PHLOAD (R, 1, res)
+ if (res .ne. "one") call abort ()
+ CALL PHLOAD (R, 2, res)
+ if (res .ne. "two") call abort ()
+ END
diff --git a/gcc/testsuite/gfortran.dg/altreturn_6.f90 b/gcc/testsuite/gfortran.dg/altreturn_6.f90
index 19c851e509..82bb46df12 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_6.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_6.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
!
! PR 32938
subroutine r (*)
diff --git a/gcc/testsuite/gfortran.dg/altreturn_7.f90 b/gcc/testsuite/gfortran.dg/altreturn_7.f90
index d1786d038c..522d767794 100644
--- a/gcc/testsuite/gfortran.dg/altreturn_7.f90
+++ b/gcc/testsuite/gfortran.dg/altreturn_7.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-std=legacy" }
+! { dg-options "-std=gnu" }
!
! PR 40848: [4.5 Regression] ICE with alternate returns
!
@@ -30,6 +30,3 @@ END MODULE
CALL ABORT()
2 CONTINUE
END
-
-! { dg-final { cleanup-modules "tt" } }
-
diff --git a/gcc/testsuite/gfortran.dg/altreturn_8.f90 b/gcc/testsuite/gfortran.dg/altreturn_8.f90
new file mode 100644
index 0000000000..ccd58a2b08
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/altreturn_8.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
+! PR 56284: [OOP] ICE with alternate return in type-bound procedure
+!
+! Contributed by Arjen Markus <arjen.markus@deltares.nl>
+
+module try_this
+ implicit none
+
+ type :: table_t
+ contains
+ procedure, nopass :: getRecord
+ end type
+
+contains
+
+ subroutine getRecord ( * )
+ end subroutine
+
+end module
+
+! { dg-final { cleanup-modules "try_this" } }
diff --git a/gcc/testsuite/gfortran.dg/ambiguous_reference_1.f90 b/gcc/testsuite/gfortran.dg/ambiguous_reference_1.f90
index 93b155ef56..552118fd4f 100644
--- a/gcc/testsuite/gfortran.dg/ambiguous_reference_1.f90
+++ b/gcc/testsuite/gfortran.dg/ambiguous_reference_1.f90
@@ -47,4 +47,3 @@ end program test
function x(z)
x = z
end function x
-! { dg-final { cleanup-modules "m1 m2 m3 m4 m5 m6" } }
diff --git a/gcc/testsuite/gfortran.dg/ambiguous_reference_2.f90 b/gcc/testsuite/gfortran.dg/ambiguous_reference_2.f90
index 3ffaa14591..bb29d84937 100644
--- a/gcc/testsuite/gfortran.dg/ambiguous_reference_2.f90
+++ b/gcc/testsuite/gfortran.dg/ambiguous_reference_2.f90
@@ -28,6 +28,3 @@ contains
end subroutine myRoutine ! this is not ambiguous !
end module
-
-! { dg-final { cleanup-modules "a1 a2 b" } }
-
diff --git a/gcc/testsuite/gfortran.dg/ambiguous_specific_1.f90 b/gcc/testsuite/gfortran.dg/ambiguous_specific_1.f90
index b5292b2dd8..1097b9f3cb 100644
--- a/gcc/testsuite/gfortran.dg/ambiguous_specific_1.f90
+++ b/gcc/testsuite/gfortran.dg/ambiguous_specific_1.f90
@@ -35,4 +35,3 @@ PROGRAM P
CALL FOO(10.)
call bar (foo) ! { dg-error "is ambiguous" }
END PROGRAM P
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/ambiguous_specific_2.f90 b/gcc/testsuite/gfortran.dg/ambiguous_specific_2.f90
index 4597b3c863..79385db8c0 100644
--- a/gcc/testsuite/gfortran.dg/ambiguous_specific_2.f90
+++ b/gcc/testsuite/gfortran.dg/ambiguous_specific_2.f90
@@ -39,4 +39,3 @@ END PROGRAM P
SUBROUTINE bar (arg)
EXTERNAL arg
END SUBROUTINE bar
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/argument_checking_17.f90 b/gcc/testsuite/gfortran.dg/argument_checking_17.f90
index df8296ba51..0921a12de7 100644
--- a/gcc/testsuite/gfortran.dg/argument_checking_17.f90
+++ b/gcc/testsuite/gfortran.dg/argument_checking_17.f90
@@ -22,5 +22,3 @@ contains
call sub2(a%mdr(GRH_SIZE+1),a%size-GRH_SIZE)
end subroutine sub1
end module teststr
-
-! { dg-final { cleanup-modules "teststr" } }
diff --git a/gcc/testsuite/gfortran.dg/argument_checking_8.f90 b/gcc/testsuite/gfortran.dg/argument_checking_8.f90
index 05c94f625f..fd1daa64f9 100644
--- a/gcc/testsuite/gfortran.dg/argument_checking_8.f90
+++ b/gcc/testsuite/gfortran.dg/argument_checking_8.f90
@@ -26,4 +26,3 @@ program test
if (astr(i:i) /= achar(0)) call abort
end do
end program test
-! { dg-final { cleanup-modules "cyclic" } }
diff --git a/gcc/testsuite/gfortran.dg/array_5.f90 b/gcc/testsuite/gfortran.dg/array_5.f90
new file mode 100644
index 0000000000..82ab243a6b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_5.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/54166
+! There was an ICE while chosing the bounds to scalarize the FAIL line.
+!
+! Contributed by Koen Poppe <koen.poppe@cs.kuleuven.be>
+!
+
+module ds_routines
+contains
+ subroutine dsget(vertic,rstore)
+ real, dimension(:), intent(in out) :: rstore
+ real, dimension(:,:), intent(out) :: vertic
+ integer :: nrvert,point
+ nrvert = 4
+ point = 26
+ vertic(1,1:nrvert) = rstore(point+1:point+nrvert) ! FAIL
+ end subroutine dsget
+end module ds_routines
+
+program ds_routines_program
+ use ds_routines
+ print *, "ok"
+end program ds_routines_program
diff --git a/gcc/testsuite/gfortran.dg/array_assignment_5.f90 b/gcc/testsuite/gfortran.dg/array_assignment_5.f90
new file mode 100644
index 0000000000..6d585270ce
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_assignment_5.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize" }
+! PR 62214 - this used to give the wrong result.
+! Original test case by Oliver Fuhrer
+PROGRAM test
+ IMPLICIT NONE
+ CHARACTER(LEN=20) :: fullNames(2)
+ CHARACTER(LEN=255) :: pathName
+ CHARACTER(LEN=5) :: fileNames(2)
+
+ pathName = "/dir1/dir2/"
+ fileNames = (/ "file1", "file2" /)
+ fullNames = SPREAD(TRIM(pathName),1,2) // fileNames
+ if (fullNames(1) /= '/dir1/dir2/file1' .or. &
+ & fullnames(2) /= '/dir1/dir2/file2') call abort
+END PROGRAM test
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_11.f90 b/gcc/testsuite/gfortran.dg/array_constructor_11.f90
index bb9f0dddb1..410fbcb7dd 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_11.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_11.f90
@@ -1,6 +1,7 @@
! Like array_constructor_6.f90, but check iterators with non-default stride,
! including combinations which lead to zero-length vectors.
! { dg-do run }
+! { dg-options "-Wzerotrip" }
program main
implicit none
call build (77)
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_18.f90 b/gcc/testsuite/gfortran.dg/array_constructor_18.f90
index c78976839d..6853c06963 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_18.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_18.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wzerotrip" }
! Tests the fix for PR32875, in which the character length for the
! array constructor would get lost in simplification and would lead
! the error 'Not Implemented: complex character array constructor'.
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_20.f90 b/gcc/testsuite/gfortran.dg/array_constructor_20.f90
index 2908edb66e..32a05a667e 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_20.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_20.f90
@@ -18,5 +18,3 @@ CONTAINS
if (present (j1)) stop
end subroutine
END MODULE s_TESTS
-
-! { dg-final { cleanup-modules "m s_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_21.f90 b/gcc/testsuite/gfortran.dg/array_constructor_21.f90
index e24b146f38..1b92c4ea1f 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_21.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_21.f90
@@ -33,4 +33,3 @@
UDS0L = SEQ(RESHAPE ( (/ ((CA_T(J1,J2), J1 = 1, 1), J2 = 1, 2)/),(/2/)))
END SUBROUTINE
END
-! { dg-final { cleanup-modules "o_type_defs tests" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_22.f90 b/gcc/testsuite/gfortran.dg/array_constructor_22.f90
index 4744dcd313..f7cdb27423 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_22.f90
+++ b/gcc/testsuite/gfortran.dg/array_constructor_22.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wzerotrip" }
! PR34990 ICE in gfc_typenode_for_spec, at fortran/trans-types.c:842
! Test case that of the reporters.
module test
@@ -25,4 +26,3 @@ program len_test
write(*,*) my_string(x)
end program len_test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_26.f03 b/gcc/testsuite/gfortran.dg/array_constructor_26.f03
index 18c08c486b..ac5dc90cc8 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_26.f03
+++ b/gcc/testsuite/gfortran.dg/array_constructor_26.f03
@@ -15,5 +15,3 @@ MODULE WinData
! { dg-error "specification expression" "" { target *-*-* } 13 }
END TYPE TWindowData
END MODULE WinData
-
-! { dg-final { cleanup-modules "windata" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_38.f90 b/gcc/testsuite/gfortran.dg/array_constructor_38.f90
new file mode 100644
index 0000000000..961e580320
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_38.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+!
+! PR fortran/44354
+! array constructors were giving unexpected results when the ac-implied-do
+! variable was used in one of the ac-implied-do bounds.
+!
+! Original testcase by Vittorio Zecca <zeccav@gmail.com>
+!
+ I=5
+ print *,(/(i,i=I,8)/) ! { dg-error "initial expression references control variable" }
+ print *,(/(i,i=1,I)/) ! { dg-error "final expression references control variable" }
+ print *,(/(i,i=1,50,I)/) ! { dg-error "step expression references control variable" }
+ end
+
+
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_39.f90 b/gcc/testsuite/gfortran.dg/array_constructor_39.f90
new file mode 100644
index 0000000000..83eff05ddc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_39.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+!
+! PR fortran/44354
+! array constructors were giving unexpected results when the ac-implied-do
+! variable was used in one of the ac-implied-do bounds.
+!
+! Original testcase by Vittorio Zecca <zeccav@gmail.com>
+!
+ I=5
+ if (any((/(i,i=1,I)/) /= (/1,2,3,4,5/))) call abort ! { dg-warning "final expression references control variable" }
+ if (I /= 5) call abort
+ end
+
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_40.f90 b/gcc/testsuite/gfortran.dg/array_constructor_40.f90
new file mode 100644
index 0000000000..424f6f4fe7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_40.f90
@@ -0,0 +1,52 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 55806 - replace ANY intrinsic for array
+! constructor with .or.
+
+module mymod
+ implicit none
+contains
+ subroutine bar(a,b,c, lo)
+ real, dimension(3,3), intent(in) :: a,b
+ logical, dimension(3,3), intent(in) :: lo
+ integer, intent(out) :: c
+ real, parameter :: acc = 1e-4
+ integer :: i,j
+
+ c = 0
+ do i=1,3
+ if (any([abs(a(i,1) - b(i,1)) > acc, &
+ (j==i+1,j=3,8)])) cycle
+ if (any([abs(a(i,2) - b(i,2)) > acc, &
+ abs(a(i,3) - b(i,3)) > acc, lo(i,:)])) cycle
+ c = c + i
+ end do
+ end subroutine bar
+
+ subroutine baz(a, b, c)
+ real, dimension(3,3), intent(in) :: a,b
+ real, intent(out) :: c
+ c = sum([a(1,1),a(2,2),a(3,3),b(:,1)])
+ end subroutine baz
+end module mymod
+
+program main
+ use mymod
+ implicit none
+ real, dimension(3,3) :: a,b
+ real :: res
+ integer :: c
+ logical lo(3,3)
+ data a/1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9/
+
+ b = a
+ b(2,2) = a(2,2) + 0.2
+ lo = .false.
+ lo(3,3) = .true.
+ call bar(a,b,c,lo)
+ if (c /= 1) call abort
+ call baz(a,b,res);
+ if (abs(res - 8.1) > 1e-5) call abort
+end program main
+! { dg-final { scan-tree-dump-times "while" 5 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_41.f90 b/gcc/testsuite/gfortran.dg/array_constructor_41.f90
new file mode 100644
index 0000000000..eb5fd92a1e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_41.f90
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! Test fix for PR55789
+!
+! Contributed by Joost VandVandole <Joost.VandeVondele@mat.ethz.ch>
+!
+MODULE M1
+CONTAINS
+ SUBROUTINE cp_1d_i4_sort(arr)
+ INTEGER(kind=4), DIMENSION(:), &
+ INTENT(inout) :: arr
+ arr = (/ (i, i = 1, SIZE(arr)) /)
+ END SUBROUTINE
+END MODULE M1
+
+PROGRAM TEST
+ USE M1
+ INTEGER :: arr(1)
+ INTERFACE
+ SUBROUTINE mtrace() BIND(C,name="mtrace")
+ END SUBROUTINE
+ END INTERFACE
+ INTERFACE
+ SUBROUTINE muntrace() BIND(C,name="muntrace")
+ END SUBROUTINE
+ END INTERFACE
+ CALL mtrace()
+ CALL cp_1d_i4_sort(arr)
+ CALL muntrace()
+END
+
+! { dg-final { scan-tree-dump-times "realloc" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_42.f90 b/gcc/testsuite/gfortran.dg/array_constructor_42.f90
new file mode 100644
index 0000000000..676247cdd5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_42.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR fortran/54730
+! A symbol 'a' was created while attempting to parse a typespec in the array
+! constructor. That (invalid) symbol was kept until translation stage
+! where it was leading to an ICE.
+!
+! Original testcase from Paul Kapinos <kapinos@rz.rwth-aachen.de>
+!
+
+ subroutine s
+ implicit none
+ intrinsic :: real
+ real :: vec(1:2)
+ vec = (/ real(a = 1), 1. /)
+ end subroutine s
+
+ program main
+ implicit none
+ intrinsic :: real
+ print *,(/ real(a = 1) /)
+ end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_43.f90 b/gcc/testsuite/gfortran.dg/array_constructor_43.f90
new file mode 100644
index 0000000000..0fe96377e9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_43.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+program main
+ implicit none
+ real :: a,b,c,d
+ call random_number(a)
+ call random_number(b)
+ call random_number(c)
+ call random_number(d)
+ if (any ([a,b,c,d] < 0.2)) print *,"foo"
+end program main
+! { dg-final { scan-tree-dump-times "\\\|\\\|" 3 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_44.f90 b/gcc/testsuite/gfortran.dg/array_constructor_44.f90
new file mode 100644
index 0000000000..e0cffd168b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_44.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize" }
+! PR 56872 - wrong front-end optimization with a single constructor.
+! Original bug report by Rich Townsend.
+ integer :: k
+ real :: s
+ integer :: m
+ s = 2.0
+ m = 4
+ res = SUM([(s**(REAL(k-1)/REAL(m-1)),k=1,m)])
+ if (abs(res - 5.84732246) > 1e-6) call abort
+ end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_45.f90 b/gcc/testsuite/gfortran.dg/array_constructor_45.f90
new file mode 100644
index 0000000000..fdf049c378
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_45.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! PR PR 56872 - wrong front-end optimization with a
+! single array constructor and another value.
+program main
+ real :: s
+ integer :: m
+ integer :: k
+ real :: res
+
+ m = 2
+ s = 1000.
+
+ res = SUM([3.0,(s**(REAL(k-1)/REAL(m-1)),k=1,m),17.])
+ if (abs(res - 1021.)>1e-4) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_46.f90 b/gcc/testsuite/gfortran.dg/array_constructor_46.f90
new file mode 100644
index 0000000000..471c6a86fb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_46.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! Test that nested array constructors are optimized.
+program main
+ implicit none
+ integer, parameter :: dp=selected_real_kind(15)
+ real(kind=dp), dimension(2,2) :: a
+ real(kind=dp) thirteen
+
+ data a /2._dp,3._dp,5._dp,7._dp/
+ thirteen = 13._dp
+ if (abs (product([[11._dp, thirteen], a]) - 30030._dp) > 1e-8) call abort
+end program main
+! { dg-final { scan-tree-dump-times "while" 2 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_47.f90 b/gcc/testsuite/gfortran.dg/array_constructor_47.f90
new file mode 100644
index 0000000000..2ad85be349
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_47.f90
@@ -0,0 +1,24 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! Test that reduction optimization doesn't break with a function expression
+! in an array constructor.
+program main
+ implicit none
+ integer, parameter :: dp=selected_real_kind(15)
+ real(kind=dp), dimension(2,2) :: a
+ real(kind=dp) thirteen
+
+ data a /2._dp,3._dp,5._dp,7._dp/
+ thirteen = 13._dp
+ if (abs (product([[sum([eleven_ones()]), thirteen], a]) - 30030._dp) > 1e-8) call abort
+ contains
+ function eleven_ones()
+ real(kind=dp) :: eleven_ones(11)
+ integer :: i
+
+ eleven_ones = [ (1._dp, i=1,11) ]
+ end function eleven_ones
+end program main
+! { dg-final { scan-tree-dump-times "while" 4 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_48.f90 b/gcc/testsuite/gfortran.dg/array_constructor_48.f90
new file mode 100644
index 0000000000..5916eddf83
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_48.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR fortran/57549
+!
+! Contributed by Vladimir Fuka
+!
+ type t
+ end type
+ type(t),allocatable :: a(:)
+ a = [t::t()]
+ print *, [ integer :: ]
+end
+
+subroutine invalid()
+ print *, [ type(integer) :: ] ! { dg-error "Syntax error in array constructor" }
+ print *, [ type(tt) :: ] ! { dg-error "Syntax error in array constructor" }
+end subroutine invalid
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_49.f90 b/gcc/testsuite/gfortran.dg/array_constructor_49.f90
new file mode 100644
index 0000000000..6a198d676f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/array_constructor_49.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 62106 - this used to give wrong results because
+! of a bogus extra temporary variable.
+! Original test case by Martien Hulsen
+program t
+ integer :: ndim=2, ndfp=4, i
+ character (len=8) :: line
+ write (unit=line,fmt='(4I2)'), (/ ( i, i = 1, ndfp ) /) + ndim
+ if (line /= ' 3 4 5 6') call abort
+end program t
+! { dg-final { scan-tree-dump-times "__var" 3 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_type_14.f03 b/gcc/testsuite/gfortran.dg/array_constructor_type_14.f03
index 04ac728010..0e24334dcf 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_type_14.f03
+++ b/gcc/testsuite/gfortran.dg/array_constructor_type_14.f03
@@ -16,7 +16,7 @@ PROGRAM test
TYPE(foo), DIMENSION(2) :: arr
- arr = (/ TYPE(foo) :: x, foo(0, 1.) /)
+ arr = (/ foo :: x, foo(0, 1.) /)
IF (arr(1)%i /= 42 .OR. arr(1)%x /= 42. .OR. &
arr(2)%i /= 0 .OR. arr(2)%x /= 1.) THEN
CALL abort()
diff --git a/gcc/testsuite/gfortran.dg/array_constructor_type_15.f03 b/gcc/testsuite/gfortran.dg/array_constructor_type_15.f03
index 20736988b5..a94655562e 100644
--- a/gcc/testsuite/gfortran.dg/array_constructor_type_15.f03
+++ b/gcc/testsuite/gfortran.dg/array_constructor_type_15.f03
@@ -18,5 +18,5 @@ PROGRAM test
TYPE(foo), PARAMETER :: x = foo(42, 42.)
- WRITE (*,*) (/ TYPE(foo) :: x, foo(0, 1.), bar(.TRUE.) /) ! { dg-error "convert TYPE" }
+ WRITE (*,*) (/ foo :: x, foo(0, 1.), bar(.TRUE.) /) ! { dg-error "convert TYPE" }
END PROGRAM test
diff --git a/gcc/testsuite/gfortran.dg/array_function_3.f90 b/gcc/testsuite/gfortran.dg/array_function_3.f90
index b1a9cac440..3d0ee91176 100644
--- a/gcc/testsuite/gfortran.dg/array_function_3.f90
+++ b/gcc/testsuite/gfortran.dg/array_function_3.f90
@@ -44,5 +44,3 @@ ubound(overlap_1(vorticityMag,lbound(vorticityMag),ubound(vorticityMag)),3)))
return
end subroutine write_out_particles
-
-! { dg-final { cleanup-modules "communication_tools" } }
diff --git a/gcc/testsuite/gfortran.dg/array_function_4.f90 b/gcc/testsuite/gfortran.dg/array_function_4.f90
index 20cb2d5884..f98b545518 100644
--- a/gcc/testsuite/gfortran.dg/array_function_4.f90
+++ b/gcc/testsuite/gfortran.dg/array_function_4.f90
@@ -25,5 +25,3 @@ CONTAINS
lenf = x(1)
end function lenf
END MODULE B1
-
-! { dg-final { cleanup-modules "b1" } }
diff --git a/gcc/testsuite/gfortran.dg/array_memset_2.f90 b/gcc/testsuite/gfortran.dg/array_memset_2.f90
index 7805f7b942..28c15ae59a 100644
--- a/gcc/testsuite/gfortran.dg/array_memset_2.f90
+++ b/gcc/testsuite/gfortran.dg/array_memset_2.f90
@@ -35,4 +35,3 @@ end program
! { dg-final { scan-tree-dump-times "= {}" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/array_temporaries_3.f90 b/gcc/testsuite/gfortran.dg/array_temporaries_3.f90
index 929a4c08e6..909c7ec5e7 100644
--- a/gcc/testsuite/gfortran.dg/array_temporaries_3.f90
+++ b/gcc/testsuite/gfortran.dg/array_temporaries_3.f90
@@ -27,5 +27,3 @@ end module bar
call xmain
if (c(1) .ne. "ab") call abort
end
-! { dg-final { cleanup-modules "bar" } }
-
diff --git a/gcc/testsuite/gfortran.dg/arrayio_13.f90 b/gcc/testsuite/gfortran.dg/arrayio_13.f90
new file mode 100644
index 0000000000..92a856bc86
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_13.f90
@@ -0,0 +1,14 @@
+! { dg-do run }
+! PR60810 Bogus end-of-file
+program readstrlist
+ character(len=80), dimension(2) :: ver
+ integer :: a, b, c
+ a = 1
+ b = 2
+ c = 3
+ ver(1) = '285 383'
+ ver(2) = '985'
+ read( ver, *) a, b, c
+ if (a /= 285 .or. b /= 383 .or. c /= 985) call abort
+ !write ( *, *) a, b, c
+end
diff --git a/gcc/testsuite/gfortran.dg/arrayio_14.f90 b/gcc/testsuite/gfortran.dg/arrayio_14.f90
new file mode 100644
index 0000000000..3d878c7564
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_14.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+! PR61173.f90 Bogus END condition
+module bd
+ character(len=25, kind=1), dimension(:), allocatable, save :: source
+ contains
+ subroutine init_data
+ allocate(source(2))
+ source=[" 1 1 1 ", " 4 4 4 "]
+ end subroutine init_data
+end module bd
+program read_internal
+ use bd
+ integer :: x(6),i
+
+ call init_data
+ read(source,*) (x(i), i=1,6)
+ if (any(x/=[1,1,1,4,4,4])) call abort
+end program read_internal
diff --git a/gcc/testsuite/gfortran.dg/arrayio_15.f90 b/gcc/testsuite/gfortran.dg/arrayio_15.f90
new file mode 100644
index 0000000000..df497dc027
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_15.f90
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR61499
+program read_internal
+
+ integer :: x(9),i,iostat
+ character(len=512) :: iomsg
+ character(kind=1,len=30), dimension(:), allocatable, save :: source
+ allocate(source(3))
+ source=[" 1 1 -1"," 1 -1 1"," -1 1 1"] !This fails
+ read(source,*) (x(i), i=1,6)
+end program read_internal
diff --git a/gcc/testsuite/gfortran.dg/arrayio_16.f90 b/gcc/testsuite/gfortran.dg/arrayio_16.f90
new file mode 100644
index 0000000000..46814ae5d5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/arrayio_16.f90
@@ -0,0 +1,13 @@
+! { dg-do run }
+! PR61640 KIND=4 Character Array Internal Unit Read Fail
+program read_internal
+ integer :: x(9),i
+ integer :: y(9)
+ character(kind=4,len=30), dimension(3) :: source
+
+ y = reshape ((/ 1,1,-1,1,-1,1,-1,1,1 /), shape(x))
+ source=[4_" 1 1 -1",4_" 1 -1 1",4_" -1 1 1"]
+ !print *, (trim(source(i)), i=1,3)
+ read(source,*) (x(i), i=1,9) ! This read fails for KIND=4 character
+ if (any(x /= y )) call abort
+end program read_internal
diff --git a/gcc/testsuite/gfortran.dg/assignment_1.f90 b/gcc/testsuite/gfortran.dg/assignment_1.f90
index c8018a3d4c..4322e5934c 100644
--- a/gcc/testsuite/gfortran.dg/assignment_1.f90
+++ b/gcc/testsuite/gfortran.dg/assignment_1.f90
@@ -12,7 +12,7 @@ integer, target :: t, s
t = 1
p => s
! We didn't dereference the pointer in the following line.
-p = f() ! { dg-warning "POINTER valued function" "" }
+p = f() ! { dg-warning "POINTER-valued function" "" }
p = p+1
if (p.ne.2) call abort()
if (p.ne.s) call abort()
diff --git a/gcc/testsuite/gfortran.dg/assignment_2.f90 b/gcc/testsuite/gfortran.dg/assignment_2.f90
index 18f303b368..a31082767e 100644
--- a/gcc/testsuite/gfortran.dg/assignment_2.f90
+++ b/gcc/testsuite/gfortran.dg/assignment_2.f90
@@ -46,5 +46,3 @@ contains
REAL,INTENT(IN) :: b(:,:)
END SUBROUTINE
end module m3
-
-! { dg-final { cleanup-modules "m1 m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/assignment_3.f90 b/gcc/testsuite/gfortran.dg/assignment_3.f90
index cdaaa8c5a4..d843c3200c 100644
--- a/gcc/testsuite/gfortran.dg/assignment_3.f90
+++ b/gcc/testsuite/gfortran.dg/assignment_3.f90
@@ -59,5 +59,3 @@ TYPE (distributed_vector) :: SCALP_DV
ZTEMP = PVAZG * SCALP_DV
END SUBROUTINE CAININAD_SCALE_DISTVEC
END MODULE YOMCAIN
-
-! { dg-final { cleanup-modules "yomcain" } }
diff --git a/gcc/testsuite/gfortran.dg/assignment_4.f90 b/gcc/testsuite/gfortran.dg/assignment_4.f90
new file mode 100644
index 0000000000..77181a2054
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assignment_4.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR 55855: [OOP] incorrect warning with procedure pointer component on pointer-valued base object
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+ implicit none
+ type :: event
+ procedure(logical), pointer, nopass :: task
+ end type event
+ logical :: r
+ type(event), pointer :: myEvent
+ allocate(myEvent)
+ r=myEvent%task()
+end
diff --git a/gcc/testsuite/gfortran.dg/associate_11.f90 b/gcc/testsuite/gfortran.dg/associate_11.f90
new file mode 100644
index 0000000000..182c80b18b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_11.f90
@@ -0,0 +1,25 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/55134
+!
+! Contributed by Valery Weber
+!
+program bug
+ implicit none
+ integer,dimension(1)::i
+ i(:)=1
+ associate(a =>i)
+ call foo(a)
+ end associate
+! write(*,*) i
+ if (i(1) /= 2) call abort
+contains
+ subroutine foo(v)
+ integer, dimension(*) :: v
+ v(1)=2
+ end subroutine foo
+end program bug
+
+! { dg-final { scan-tree-dump-times "foo ..integer.kind=4..0:. . restrict. a.data.;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/associate_12.f90 b/gcc/testsuite/gfortran.dg/associate_12.f90
new file mode 100644
index 0000000000..1ead1e7112
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_12.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR 55199: [OOP] Equivalenced variable has wrong type when used with generic member function
+!
+! Contributed by Rich Townsend <townsend@astro.wisc.edu>
+
+module assoc_err_m
+ implicit none
+ type :: foo_t
+ contains
+ procedure :: func_1
+ generic :: func => func_1
+ end type
+contains
+ real function func_1 (this)
+ class(foo_t), intent(in) :: this
+ end function
+end module
+
+program assoc_err
+ use assoc_err_m
+ implicit none
+ type(foo_t) :: f
+ associate(b => f%func())
+ print *, 1. + b
+ end associate
+end program
+
+! { dg-final { cleanup-modules "assoc_err_m" } }
diff --git a/gcc/testsuite/gfortran.dg/associate_13.f90 b/gcc/testsuite/gfortran.dg/associate_13.f90
new file mode 100644
index 0000000000..7c64d3f0aa
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_13.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+!
+! Tests the fix for PR56047. This is actually a development of
+! the test case of comment #10.
+!
+! Reported by Juergen Reuter <juergen.reuter@desy.de>
+!
+ implicit none
+ type :: process_variant_def_t
+ integer :: i
+ end type
+ type :: process_component_def_t
+ class(process_variant_def_t), allocatable :: variant_def
+ end type
+ type(process_component_def_t), dimension(1:2) :: initial
+ allocate (initial(1)%variant_def, source = process_variant_def_t (99))
+ associate (template => initial(1)%variant_def)
+ template%i = 77
+ end associate
+ if (initial(1)%variant_def%i .ne. 77) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/associate_14.f90 b/gcc/testsuite/gfortran.dg/associate_14.f90
new file mode 100644
index 0000000000..765e36520c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_14.f90
@@ -0,0 +1,56 @@
+! { dg-do compile }
+! Tests the fix for PR55984.
+!
+! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
+!
+module bcd_m
+ type, abstract :: bcd_t
+ contains
+ procedure(bcd_fill_halos), deferred :: fill_halos
+ end type
+ abstract interface
+ subroutine bcd_fill_halos(this)
+ import :: bcd_t
+ class(bcd_t ) :: this
+ end subroutine
+ end interface
+end module
+
+module solver_m
+ use bcd_m
+ type, abstract :: solver_t
+ integer :: n, hlo
+ class(bcd_t), pointer :: bcx, bcy
+ contains
+ procedure(solver_advop), deferred :: advop
+ end type
+ abstract interface
+ subroutine solver_advop(this)
+ import solver_t
+ class(solver_t) :: this
+ end subroutine
+ end interface
+ contains
+end module
+
+module solver_mpdata_m
+ use solver_m
+ type :: mpdata_t
+ class(bcd_t), pointer :: bcx, bcy
+ contains
+ procedure :: advop => mpdata_advop
+ end type
+ contains
+ subroutine mpdata_advop(this)
+ class(mpdata_t) :: this
+ associate ( bcx => this%bcx, bcy => this%bcy )
+ call bcx%fill_halos()
+ end associate
+ end subroutine
+end module
+
+ use solver_mpdata_m
+ class(mpdata_t), allocatable :: that
+ call mpdata_advop (that)
+end
+
diff --git a/gcc/testsuite/gfortran.dg/associate_15.f90 b/gcc/testsuite/gfortran.dg/associate_15.f90
new file mode 100644
index 0000000000..7e34eb518e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_15.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+! Test the fix for PR58085, where the offset for 'x' was set to zero,
+! rather than -1.
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+!
+module foo
+contains
+ function bar (arg) result (res)
+ integer arg, res(3)
+ res = [arg, arg+1, arg +2]
+ end function
+end module
+ use foo
+ real d(3,3)
+ integer a,b,c
+ character(48) line1, line2
+ associate (x=>shape(d))
+ a = x(1)
+ b = x(2)
+ write (line1, *) a, b
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+ associate (x=>[1,2])
+ a = x(1)
+ b = x(2)
+ write (line1, *) a, b
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+ associate (x=>bar(5)) ! make sure that we haven't broken function association
+ a = x(1)
+ b = x(2)
+ c = x(3)
+ write (line1, *) a, b, c
+ write (line2, *) x
+ if (trim (line1) .ne. trim (line2)) call abort
+ end associate
+end
diff --git a/gcc/testsuite/gfortran.dg/associate_16.f90 b/gcc/testsuite/gfortran.dg/associate_16.f90
new file mode 100644
index 0000000000..9129388b25
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_16.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! PR 60834 - this used to ICE.
+
+module m
+ implicit none
+ type :: t
+ real :: diffusion=1.
+ end type
+contains
+ subroutine solve(this, x)
+ class(t), intent(in) :: this
+ real, intent(in) :: x(:)
+ integer :: i
+ integer, parameter :: n(1:5)=[(i,i=1, 5)]
+
+ associate( nu=>this%diffusion)
+ associate( exponential=>exp(-(x(i)-n) ))
+ do i = 1, size(x)
+ end do
+ end associate
+ end associate
+ end subroutine solve
+end module m
diff --git a/gcc/testsuite/gfortran.dg/associate_17.f90 b/gcc/testsuite/gfortran.dg/associate_17.f90
new file mode 100644
index 0000000000..5c39cf0624
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associate_17.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! Test the fix for PR61406
+! Contributed by Adam Hirst <adam@aphirst.karoo.co.uk>
+program test
+ implicit none
+ real :: theta = 1.0
+
+ associate (n => [cos(theta), sin(theta)])
+ if (abs (norm2(n) - 1.0) .gt. 1.0e-4) call abort
+ end associate
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/associate_6.f03 b/gcc/testsuite/gfortran.dg/associate_6.f03
index ba0e5c0980..356d388ef4 100644
--- a/gcc/testsuite/gfortran.dg/associate_6.f03
+++ b/gcc/testsuite/gfortran.dg/associate_6.f03
@@ -34,6 +34,5 @@ PROGRAM main
IF (arr(1) /= 1 .OR. arr(4) /= 4) CALL abort ()
END ASSOCIATE
END PROGRAM main
-! { dg-final { cleanup-modules "m" } }
! { dg-final { scan-tree-dump-times "func" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/associate_9.f03 b/gcc/testsuite/gfortran.dg/associate_9.f03
index 13a10fc0d9..3a262b6da0 100644
--- a/gcc/testsuite/gfortran.dg/associate_9.f03
+++ b/gcc/testsuite/gfortran.dg/associate_9.f03
@@ -48,4 +48,3 @@ PROGRAM main
END PROGRAM main
! { dg-excess-errors "Syntex error in IF" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/associated_6.f90 b/gcc/testsuite/gfortran.dg/associated_6.f90
new file mode 100644
index 0000000000..b31c5bb915
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associated_6.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+!
+! PR 54881: [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
+!
+! Contributed by Richard L Lozes <richard@lozestech.com>
+
+ implicit none
+
+ type treeNode
+ type(treeNode), pointer :: right => null()
+ end type
+
+ type(treeNode) :: n
+
+ if (associated(RightOf(n))) call abort()
+ allocate(n%right)
+ if (.not.associated(RightOf(n))) call abort()
+ deallocate(n%right)
+
+contains
+
+ function RightOf (theNode)
+ class(treeNode), pointer :: RightOf
+ type(treeNode), intent(in) :: theNode
+ RightOf => theNode%right
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/associated_7.f90 b/gcc/testsuite/gfortran.dg/associated_7.f90
new file mode 100644
index 0000000000..bc56f84c85
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associated_7.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+!
+! PR 55692: ICE on incorrect use of ASSOCIATED function
+!
+! Contributed by Gilbert Scott <gilbert.scott@easynet.co.uk>
+
+INTEGER, POINTER :: P1, P2
+PRINT *, ASSOCIATED([P1,P2]) ! { dg-error "must be a POINTER" }
+END
diff --git a/gcc/testsuite/gfortran.dg/associated_target_3.f90 b/gcc/testsuite/gfortran.dg/associated_target_3.f90
index e6a1d0f0ad..423499a2f7 100644
--- a/gcc/testsuite/gfortran.dg/associated_target_3.f90
+++ b/gcc/testsuite/gfortran.dg/associated_target_3.f90
@@ -31,5 +31,3 @@ contains
if (.not. associated (a, b)) call abort()
end subroutine cmpPtr
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/associated_target_5.f03 b/gcc/testsuite/gfortran.dg/associated_target_5.f03
new file mode 100644
index 0000000000..5c29b6014b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/associated_target_5.f03
@@ -0,0 +1,40 @@
+! { dg-do run }
+! Test the fix for PR57522, in which the associate name had a
+! 'span' of an INTEGER rather than that of 'mytype'.
+!
+! Contributed by A Briolat <alan.briolat@gmail.com>
+!
+program test_associate
+ type mytype
+ integer :: a = 1, b = 2
+ end type
+ type(mytype) :: t(4), u(2,2)
+ integer :: c(4)
+ t%a = [0, 1, 2, 3]
+ t%b = [4, 5, 6, 7]
+ associate (a => t%a)
+! Test 'a' is OK on lhs and/or rhs of assignments
+ c = a - 1
+ if (any (c .ne. [-1,0,1,2])) call abort
+ a = a + 1
+ if (any (a .ne. [1,2,3,4])) call abort
+ a = t%b
+ if (any (a .ne. t%b)) call abort
+! Test 'a' is OK as an actual argument
+ c = foo(a)
+ if (any (c .ne. t%b + 10)) call abort
+ end associate
+! Make sure that the fix works for multi-dimensional arrays...
+ associate (a => u%a)
+ if (any (a .ne. reshape ([1,1,1,1],[2,2]))) call abort
+ end associate
+! ...and sections
+ associate (a => t(2:3)%b)
+ if (any (a .ne. [5,6])) call abort
+ end associate
+contains
+ function foo(arg) result(res)
+ integer :: arg(4), res(4)
+ res = arg + 10
+ end function
+end program
diff --git a/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90 b/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
index 13a79a6fe5..a7f7939164 100644
--- a/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_charlen_function_1.f90
@@ -77,4 +77,3 @@ end function not_OK
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f90 b/gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f90
index 49d1a2e55d..ed4f9dd053 100644
--- a/gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_charlen_function_6.f90
@@ -33,5 +33,3 @@ contains
integer, intent(in) :: x
end function assumed_len
end program main
-
-! { dg-final { cleanup-modules "funcs mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_dummy_1.f90 b/gcc/testsuite/gfortran.dg/assumed_dummy_1.f90
index f8d7fea31a..7935898d87 100644
--- a/gcc/testsuite/gfortran.dg/assumed_dummy_1.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_dummy_1.f90
@@ -42,5 +42,3 @@ contains
x (2) = 21.0
END SUBROUTINE roo
end program test
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_1.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_1.f90
new file mode 100644
index 0000000000..afddc83009
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_1.f90
@@ -0,0 +1,145 @@
+! { dg-do run }
+! { dg-additional-sources assumed_rank_1_c.c }
+!
+! PR fortran/48820
+!
+! Assumed-rank tests
+!
+
+implicit none
+
+interface
+ subroutine check_value(b, n, val)
+ integer :: b(..)
+ integer, value :: n
+ integer :: val(n)
+ end subroutine
+end interface
+
+integer, target :: x(2:5,4:7), y(-4:4)
+integer, allocatable, target :: z(:,:,:,:)
+integer, allocatable :: val(:)
+integer :: i
+
+allocate(z(1:4, -2:5, 4, 10:11))
+
+if (rank(x) /= 2) call abort ()
+val = [(2*i+3, i = 1, size(x))]
+x = reshape (val, shape(x))
+call foo(x, rank(x), lbound(x), ubound(x), val)
+call foo2(x, rank(x), lbound(x), ubound(x), val)
+call bar(x,x,.true.)
+call bar(x,prsnt=.false.)
+
+if (rank(y) /= 1) call abort ()
+val = [(2*i+7, i = 1, size(y))]
+y = reshape (val, shape(y))
+call foo(y, rank(y), lbound(y), ubound(y), val)
+call foo2(y, rank(y), lbound(y), ubound(y), val)
+call bar(y,y,.true.)
+call bar(y,prsnt=.false.)
+
+if (rank(z) /= 4) call abort ()
+val = [(2*i+5, i = 1, size(z))]
+z(:,:,:,:) = reshape (val, shape(z))
+call foo(z, rank(z), lbound(z), ubound(z), val)
+call foo(z, rank(z), lbound(z), ubound(z), val)
+call foo2(z, rank(z), lbound(z), ubound(z), val)
+call bar(z,z,.true.)
+call bar(z,prsnt=.false.)
+
+contains
+ subroutine bar(a,b, prsnt)
+ integer, pointer, optional, intent(in) :: a(..),b(..)
+ logical, value :: prsnt
+ if (.not. associated(a)) call abort()
+ if (present(b)) then
+ ! The following is not valid.
+ ! Technically, it could be allowed and might be in Fortran 2015:
+ ! if (.not. associated(a,b)) call abort()
+ else
+ if (.not. associated(a)) call abort()
+ end if
+ if (.not. present(a)) call abort()
+ if (prsnt .neqv. present(b)) call abort()
+ end subroutine
+
+ ! POINTER argument - bounds as specified before
+ subroutine foo(a, rnk, low, high, val)
+ integer,pointer, intent(in) :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (low(1) /= lbound(a,1)) call abort()
+ if (high(1) /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (low(i) /= lbound(a,i)) call abort()
+ if (high(i) /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ call check_value (a, rnk, val)
+ call foo2(a, rnk, low, high, val)
+ end subroutine
+
+ ! Non-pointer, non-allocatable bounds. lbound == 1
+ subroutine foo2(a, rnk, low, high, val)
+ integer, intent(in) :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (1 /= lbound(a,1)) call abort()
+ if (high(1)-low(1)+1 /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (1 /= lbound(a,i)) call abort()
+ if (high(i)-low(i)+1 /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ call check_value (a, rnk, val)
+ end subroutine foo2
+
+ ! ALLOCATABLE argument - bounds as specified before
+ subroutine foo3 (a, rnk, low, high, val)
+ integer, allocatable, intent(in), target :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (low(1) /= lbound(a,1)) call abort()
+ if (high(1) /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (low(i) /= lbound(a,i)) call abort()
+ if (high(i) /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ call check_value (a, rnk, val)
+ call foo(a, rnk, low, high, val)
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_10.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_10.f90
new file mode 100644
index 0000000000..ac28283949
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_10.f90
@@ -0,0 +1,106 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/48820
+!
+! Ensure that the value of scalars to assumed-rank arrays is
+! copied back, if and only its pointer address could have changed.
+!
+program test
+ implicit none
+ type t
+ integer :: aa
+ end type t
+
+ integer, allocatable :: iia
+ integer, pointer :: iip
+
+ type(t), allocatable :: jja
+ type(t), pointer :: jjp
+
+ logical :: is_present
+
+ is_present = .true.
+
+ allocate (iip, jjp)
+
+ iia = 7
+ iip = 7
+ jja = t(88)
+ jjp = t(88)
+
+ call faa(iia, jja) ! Copy back
+ if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ call fai(iia, jja) ! No copy back
+ if (iia /= 7 .and. jja%aa /= 88) call abort ()
+
+ call fpa(iip, jjp) ! Copy back
+ if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ call fpi(iip, jjp) ! No copy back
+ if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+
+ call fnn(iia, jja) ! No copy back
+ if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ call fno(iia, jja) ! No copy back
+ if (iia /= 7 .and. jja%aa /= 88) call abort ()
+ call fnn(iip, jjp) ! No copy back
+ if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+ call fno(iip, jjp) ! No copy back
+ if (iip /= 7 .and. jjp%aa /= 88) call abort ()
+
+ is_present = .false.
+
+ call fpa(null(), null()) ! No copy back
+ call fpi(null(), null()) ! No copy back
+ call fno(null(), null()) ! No copy back
+
+ call fno() ! No copy back
+
+contains
+
+ subroutine faa (xx1, yy1)
+ integer, allocatable :: xx1(..)
+ type(t), allocatable :: yy1(..)
+ if (.not. allocated (xx1)) call abort ()
+ if (.not. allocated (yy1)) call abort ()
+ end subroutine faa
+ subroutine fai (xx1, yy1)
+ integer, allocatable, intent(in) :: xx1(..)
+ type(t), allocatable, intent(in) :: yy1(..)
+ if (.not. allocated (xx1)) call abort ()
+ if (.not. allocated (yy1)) call abort ()
+ end subroutine fai
+ subroutine fpa (xx1, yy1)
+ integer, pointer :: xx1(..)
+ type(t), pointer :: yy1(..)
+ if (is_present .neqv. associated (xx1)) call abort ()
+ if (is_present .neqv. associated (yy1)) call abort ()
+ end subroutine fpa
+
+ subroutine fpi (xx1, yy1)
+ integer, pointer, intent(in) :: xx1(..)
+ type(t), pointer, intent(in) :: yy1(..)
+ if (is_present .neqv. associated (xx1)) call abort ()
+ if (is_present .neqv. associated (yy1)) call abort ()
+ end subroutine fpi
+
+ subroutine fnn(xx2,yy2)
+ integer :: xx2(..)
+ type(t) :: yy2(..)
+ end subroutine fnn
+
+ subroutine fno(xx2,yy2)
+ integer, optional :: xx2(..)
+ type(t), optional :: yy2(..)
+ if (is_present .neqv. present (xx2)) call abort ()
+ if (is_present .neqv. present (yy2)) call abort ()
+ end subroutine fno
+end program test
+
+! We should have exactly one copy back per variable
+!
+! { dg-final { scan-tree-dump-times "iip = .integer.kind=4. .. desc.\[0-9\]+.data;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "iia = .integer.kind=4. .. desc.\[0-9\]+.data;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "jjp = .struct t .. desc.\[0-9\]+.data;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "jja = .struct t .. desc.\[0-9\]+.data;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_11.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_11.f90
new file mode 100644
index 0000000000..46dffd0740
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_11.f90
@@ -0,0 +1,52 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/48820
+!
+! Assumed-rank tests
+subroutine foo(X)
+ integer :: x(..)
+ codimension :: x[*] ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" }
+end
+
+subroutine foo2(X)
+ integer, dimension(..) :: x[*] ! { dg-error "The assumed-rank array at .1. shall not have a codimension" }
+end
+
+subroutine foo3(X)
+ integer, codimension[*] :: x(..) ! { dg-error "The assumed-rank array at .1. shall not have a codimension" }
+end
+
+subroutine foo4(X)
+ integer, codimension[*], dimension(..) :: x ! { dg-error "The assumed-rank array at .1. shall not have a codimension" }
+end
+
+subroutine bar(X)
+ integer :: x[*]
+ dimension :: x(..) ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" }
+end
+
+subroutine foobar(X)
+ integer :: x
+ codimension :: x[*]
+ dimension :: x(..) ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" }
+end
+
+subroutine barfoo(X)
+ integer :: x
+ dimension :: x(..)
+ codimension :: x[*] ! { dg-error "The assumed-rank array 'x' at .1. shall not have a codimension" }
+end
+
+subroutine orig(X) ! { dg-error "may not have the VALUE or CODIMENSION attribute" }
+ integer :: x(..)[*]
+end
+
+subroutine val1(X)
+ integer, value :: x(..) ! { dg-error "VALUE attribute conflicts with DIMENSION attribute" }
+end
+
+subroutine val2(X)
+ integer, value :: x
+ dimension :: x(..) ! { dg-error "VALUE attribute conflicts with DIMENSION attribute" }
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_12.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_12.f90
new file mode 100644
index 0000000000..f947f4941f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_12.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/48820
+!
+! Ensure that the value of scalars to assumed-rank arrays is
+! copied back - and everything happens in the correct order.
+
+call sub(f())
+contains
+subroutine sub(x)
+ integer, pointer :: x(..)
+end subroutine sub
+function f() result(res)
+ integer, pointer :: res
+end function f
+end
+
+! { dg-final { scan-tree-dump " = f \\(\\);.*desc.0.dtype = .*;.*desc.0.data = .void .. D.*;.*sub \\(&desc.0\\);.*D.*= .integer.kind=4. .. desc.0.data;" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_13.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_13.f90
new file mode 100644
index 0000000000..99a982b33e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_13.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR fortran/57458
+!
+!
+
+ integer, pointer, asynchronous :: i(:)
+ integer, pointer, volatile :: j(:)
+ call foo(i)
+ call foo2(i)
+ call foo3(j)
+ call foo4(j)
+contains
+ subroutine foo(x)
+ type(*), dimension(:), asynchronous :: x
+ end subroutine foo
+ subroutine foo2(x)
+ type(*), dimension(..), asynchronous :: x
+ end subroutine foo2
+ subroutine foo3(x)
+ type(*), dimension(:), asynchronous :: x
+ end subroutine foo3
+ subroutine foo4(x)
+ type(*), dimension(..), asynchronous :: x
+ end subroutine foo4
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_1_c.c b/gcc/testsuite/gfortran.dg/assumed_rank_1_c.c
new file mode 100644
index 0000000000..85dd72db10
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_1_c.c
@@ -0,0 +1,16 @@
+/* Called by assumed_rank_1.f90. */
+
+#include <stdlib.h> /* For abort(). */
+
+struct array {
+ int *data;
+};
+
+void check_value_ (struct array *b, int n, int val[])
+{
+ int i;
+
+ for (i = 0; i < n; i++)
+ if (b->data[i] != val[i])
+ abort ();
+}
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_2.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_2.f90
new file mode 100644
index 0000000000..8a1ea05768
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_2.f90
@@ -0,0 +1,135 @@
+! { dg-do run }
+! { dg-options "-fcheck=all" }
+!
+! PR fortran/48820
+!
+! Assumed-rank tests - same as assumed_rank_1.f90,
+! but with bounds checks and w/o call to C function
+!
+
+implicit none
+
+integer, target :: x(2:5,4:7), y(-4:4)
+integer, allocatable, target :: z(:,:,:,:)
+integer, allocatable :: val(:)
+integer :: i
+
+allocate(z(1:4, -2:5, 4, 10:11))
+
+if (rank(x) /= 2) call abort ()
+val = [(2*i+3, i = 1, size(x))]
+x = reshape (val, shape(x))
+call foo(x, rank(x), lbound(x), ubound(x), val)
+call foo2(x, rank(x), lbound(x), ubound(x), val)
+call bar(x,x,.true.)
+call bar(x,prsnt=.false.)
+
+if (rank(y) /= 1) call abort ()
+val = [(2*i+7, i = 1, size(y))]
+y = reshape (val, shape(y))
+call foo(y, rank(y), lbound(y), ubound(y), val)
+call foo2(y, rank(y), lbound(y), ubound(y), val)
+call bar(y,y,.true.)
+call bar(y,prsnt=.false.)
+
+if (rank(z) /= 4) call abort ()
+val = [(2*i+5, i = 1, size(z))]
+z(:,:,:,:) = reshape (val, shape(z))
+call foo(z, rank(z), lbound(z), ubound(z), val)
+call foo(z, rank(z), lbound(z), ubound(z), val)
+call foo2(z, rank(z), lbound(z), ubound(z), val)
+call bar(z,z,.true.)
+call bar(z,prsnt=.false.)
+
+contains
+ subroutine bar(a,b, prsnt)
+ integer, pointer, optional, intent(in) :: a(..),b(..)
+ logical, value :: prsnt
+ if (.not. associated(a)) call abort()
+ if (present(b)) then
+ ! The following is not valid
+ ! Technically, it could be allowed and might be in Fortran 2015:
+ ! if (.not. associated(a,b)) call abort()
+ else
+ if (.not. associated(a)) call abort()
+ end if
+ if (.not. present(a)) call abort()
+ if (prsnt .neqv. present(b)) call abort()
+ end subroutine
+
+ ! POINTER argument - bounds as specified before
+ subroutine foo(a, rnk, low, high, val)
+ integer,pointer, intent(in) :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (low(1) /= lbound(a,1)) call abort()
+ if (high(1) /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (low(i) /= lbound(a,i)) call abort()
+ if (high(i) /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ call foo2(a, rnk, low, high, val)
+ end subroutine
+
+ ! Non-pointer, non-allocatable bounds. lbound == 1
+ subroutine foo2(a, rnk, low, high, val)
+ integer, intent(in) :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (1 /= lbound(a,1)) call abort()
+ if (high(1)-low(1)+1 /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (1 /= lbound(a,i)) call abort()
+ if (high(i)-low(i)+1 /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ end subroutine foo2
+
+ ! ALLOCATABLE argument - bounds as specified before
+ subroutine foo3 (a, rnk, low, high, val)
+ integer, allocatable, intent(in), target :: a(..)
+ integer, value :: rnk
+ integer, intent(in) :: low(:), high(:), val(:)
+ integer :: i
+
+ if (rank(a) /= rnk) call abort()
+ if (size(low) /= rnk .or. size(high) /= rnk) call abort()
+ if (size(a) /= product (high - low +1)) call abort()
+
+ if (rnk > 0) then
+ if (low(1) /= lbound(a,1)) call abort()
+ if (high(1) /= ubound(a,1)) call abort()
+ if (size (a,1) /= high(1)-low(1)+1) call abort()
+ end if
+
+ do i = 1, rnk
+ if (low(i) /= lbound(a,i)) call abort()
+ if (high(i) /= ubound(a,i)) call abort()
+ if (size (a,i) /= high(i)-low(i)+1) call abort()
+ end do
+ call foo(a, rnk, low, high, val)
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_3.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_3.f90
new file mode 100644
index 0000000000..ab5c0d90b3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_3.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! { dg-options "-fcheck=bounds" }
+! { dg-shouldfail "Array reference out of bounds" }
+!
+! PR fortran/48820
+!
+! Do assumed-rank bound checking
+
+implicit none
+integer :: a(4,4)
+call bar(a)
+contains
+ subroutine bar(x)
+ integer :: x(..)
+ print *, ubound(x,dim=3) ! << wrong dim
+ end subroutine
+end
+
+! { dg-output "Fortran runtime error: Array reference out of bounds" }
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_4.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_4.f90
new file mode 100644
index 0000000000..756ab2245c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_4.f90
@@ -0,0 +1,50 @@
+! { dg-do compile }
+! { dg-options "-std=f2008ts" }
+!
+! PR fortran/48820
+!
+! Assumed-rank constraint checks and other diagnostics
+!
+
+subroutine valid1a(x)
+ integer, intent(in), pointer, contiguous :: x(..)
+end subroutine valid1a
+
+subroutine valid1(x)
+ integer, intent(in) :: x(..)
+end subroutine valid1
+
+subroutine valid2(x)
+ type(*) :: x
+end subroutine valid2
+
+subroutine foo99(x)
+ integer x(99)
+ call valid1(x) ! { dg-error "Explicit interface required" }
+ call valid2(x(1)) ! { dg-error "Explicit interface required" }
+end subroutine foo99
+
+subroutine foo(x)
+ integer :: x(..)
+ print *, ubound(x,dim=2000) ! { dg-error "is not a valid dimension index" }
+ call bar(x) ! { dg-error "Assumed-rank argument requires an explicit interface" }
+ call intnl(x) ! { dg-error "requires that the dummy argument 'x' has assumed-rank" }
+contains
+ subroutine intnl(x)
+ integer :: x(:)
+ end subroutine intnl
+end subroutine foo
+
+subroutine foo2(x)
+ integer :: x(..)
+ call valid3(x(:)) ! { dg-error "Assumed-rank variable x at .1. shall not have a subobject reference" }
+ call valid3(x+1) ! { dg-error "Assumed-rank variable x at .1. may only be used as actual argument" }
+contains
+ subroutine valid3(y)
+ integer :: y(..)
+ end subroutine
+end subroutine
+
+subroutine foo3()
+ integer :: x(..) ! { dg-error "Assumed-rank array at .1. must be a dummy argument" }
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_5.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_5.f90
new file mode 100644
index 0000000000..a7949969b9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_5.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! PR fortran/48820
+!
+!
+subroutine foo(x)
+ integer :: x(..) ! { dg-error "TS 29113: Assumed-rank array" }
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_6.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_6.f90
new file mode 100644
index 0000000000..86da3f853c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_6.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/48820
+!
+! Assumed-rank constraint checks and other diagnostics
+!
+
+subroutine foo(x) ! { dg-error "Assumed-type variable x at .1. may not have the INTENT.OUT. attribute" }
+ type(*), intent(out) :: x
+end subroutine
+
+subroutine bar(x)
+ integer, intent(out) :: x(..)
+end subroutine bar
+
+subroutine foo3(y)
+ integer :: y(..)
+ y = 7 ! { dg-error "Assumed-rank variable y at .1. may only be used as actual argument" }
+ print *, y + 10 ! { dg-error "Assumed-rank variable y at .1. may only be used as actual argument" }
+ print *, y ! { dg-error "Assumed-rank variable y at .1. may only be used as actual argument" }
+end subroutine
+
+subroutine foo2(x, y)
+ integer :: x(..), y(..)
+ call valid3(x(:)) ! { dg-error "Assumed-rank variable x at .1. shall not have a subobject reference" }
+contains
+ subroutine valid3(y)
+ integer :: y(..)
+ end subroutine
+end subroutine
+
+subroutine foo4(x)
+ integer, codimension[*] :: x(..) ! { dg-error "The assumed-rank array at .1. shall not have a codimension" }
+end subroutine
+
+subroutine foo5(y) ! { dg-error "may not have the VALUE or CODIMENSION attribute" }
+ integer :: y(..)[*]
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_7.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_7.f90
new file mode 100644
index 0000000000..f9ff3b9aa4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_7.f90
@@ -0,0 +1,64 @@
+! { dg-do run }
+!
+! PR fortran/48820
+!
+! Handle type/class for assumed-rank arrays
+!
+! FIXME: Passing a CLASS to a CLASS has to be re-enabled.
+implicit none
+type t
+ integer :: i
+end type
+
+class(T), allocatable :: ac(:,:)
+type(T), allocatable :: at(:,:)
+integer :: i
+
+allocate(ac(2:3,2:4))
+allocate(at(2:3,2:4))
+
+i = 0
+call foo(ac)
+call foo(at)
+call bar(ac)
+call bar(at)
+if (i /= 12) call abort()
+
+contains
+ subroutine bar(x)
+ type(t) :: x(..)
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
+ if (size(x) /= 6) call abort()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ i = i + 1
+ call foo(x)
+ call bar2(x)
+ end subroutine
+ subroutine bar2(x)
+ type(t) :: x(..)
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
+ if (size(x) /= 6) call abort()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ i = i + 1
+ end subroutine
+ subroutine foo(x)
+ class(t) :: x(..)
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
+ if (size(x) /= 6) call abort()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ i = i + 1
+ call foo2(x)
+! call bar2(x) ! Passing a CLASS to a TYPE does not yet work
+ end subroutine
+ subroutine foo2(x)
+ class(t) :: x(..)
+ if (lbound(x,1) /= 1 .or. lbound(x,2) /= 1) call abort()
+ if (size(x) /= 6) call abort()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ if (ubound(x,1) /= 2 .or. ubound(x,2) /= 3) call abort()
+ i = i + 1
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_8.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_8.f90
new file mode 100644
index 0000000000..b1ccab5322
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_8.f90
@@ -0,0 +1,71 @@
+! { dg-do run }
+! { dg-additional-sources assumed_rank_8_c.c }
+!
+! PR fortran/48820
+!
+! Scalars to assumed-rank tests
+!
+program main
+ implicit none
+
+ interface
+ subroutine check (x)
+ integer :: x(..)
+ end subroutine check
+ end interface
+
+ integer, target :: ii, j
+ integer, allocatable :: kk
+ integer, pointer :: ll
+ ii = 489
+ j = 0
+ call f (ii)
+ call f (489)
+ call f ()
+ call f (null())
+ call f (kk)
+ if (j /= 2) call abort()
+
+ j = 0
+ nullify (ll)
+ call g (null())
+ call g (ll)
+ call g (ii)
+ if (j /= 1) call abort()
+
+ j = 0
+ call h (kk)
+ kk = 489
+ call h (kk)
+ if (j /= 1) call abort()
+
+contains
+
+ subroutine f (x)
+ integer, optional :: x(..)
+
+ if (.not. present (x)) return
+ if (rank (x) /= 0) call abort
+ call check (x)
+ j = j + 1
+ end subroutine
+
+ subroutine g (x)
+ integer, pointer, intent(in) :: x(..)
+
+ if (.not. associated (x)) return
+ if (rank (x) /= 0) call abort ()
+ call check (x)
+ j = j + 1
+ end subroutine
+
+ subroutine h (x)
+ integer, allocatable :: x(..)
+
+ if (.not. allocated (x)) return
+ if (rank (x) /= 0) call abort
+ call check (x)
+ j = j + 1
+ end subroutine
+
+end program main
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_8_c.c b/gcc/testsuite/gfortran.dg/assumed_rank_8_c.c
new file mode 100644
index 0000000000..3910d318e3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_8_c.c
@@ -0,0 +1,25 @@
+/* Called by assumed_rank_8.f90 and assumed_rank_9.f90. */
+
+#include <stdlib.h> /* For abort(). */
+
+struct a {
+ int *dat;
+};
+
+struct b {
+ struct a _data;
+};
+
+
+void check_ (struct a *x)
+{
+ if (*x->dat != 489)
+ abort ();
+}
+
+
+void check2_ (struct b *x)
+{
+ if (*x->_data.dat != 489)
+ abort ();
+}
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_9.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_9.f90
new file mode 100644
index 0000000000..39151f5878
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_9.f90
@@ -0,0 +1,139 @@
+! { dg-do run }
+! { dg-additional-sources assumed_rank_8_c.c }
+!
+! PR fortran/48820
+!
+! Scalars to assumed-rank tests
+!
+program main
+ implicit none
+
+ type t
+ integer :: i
+ end type t
+
+ interface
+ subroutine check (x)
+ integer :: x(..)
+ end subroutine check
+ subroutine check2 (x)
+ import t
+ class(t) :: x(..)
+ end subroutine check2
+ end interface
+
+ integer :: j
+
+ type(t), target :: y
+ class(t), allocatable, target :: yac
+
+ y%i = 489
+ allocate (yac)
+ yac%i = 489
+ j = 0
+ call fc()
+ call fc(null())
+ call fc(y)
+ call fc(yac)
+ if (j /= 2) call abort ()
+
+ j = 0
+ call gc(null())
+ call gc(y)
+ call gc(yac)
+ deallocate (yac)
+ call gc(yac)
+ if (j /= 2) call abort ()
+
+ j = 0
+ call hc(yac)
+ allocate (yac)
+ yac%i = 489
+ call hc(yac)
+ if (j /= 1) call abort ()
+
+ j = 0
+ call ft()
+ call ft(null())
+ call ft(y)
+ call ft(yac)
+ if (j /= 2) call abort ()
+
+ j = 0
+ call gt(null())
+ call gt(y)
+ call gt(yac)
+ deallocate (yac)
+ call gt(yac)
+ if (j /= 2) call abort ()
+
+ j = 0
+ call ht(yac)
+ allocate (yac)
+ yac%i = 489
+ call ht(yac)
+ if (j /= 1) call abort ()
+
+contains
+
+ subroutine fc (x)
+ class(t), optional :: x(..)
+
+ if (.not. present (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+ subroutine gc (x)
+ class(t), pointer, intent(in) :: x(..)
+
+ if (.not. associated (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort ()
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+ subroutine hc (x)
+ class(t), allocatable :: x(..)
+
+ if (.not. allocated (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+ subroutine ft (x)
+ type(t), optional :: x(..)
+
+ if (.not. present (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+ subroutine gt (x)
+ type(t), pointer, intent(in) :: x(..)
+
+ if (.not. associated (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort ()
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+ subroutine ht (x)
+ type(t), allocatable :: x(..)
+
+ if (.not. allocated (x)) return
+ if (.not. SAME_TYPE_AS (x, yac)) call abort ()
+ if (rank (x) /= 0) call abort
+ call check2 (x)
+ j = j + 1
+ end subroutine
+
+end program main
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_bounds_1.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_bounds_1.f90
new file mode 100644
index 0000000000..11d15f6a53
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_bounds_1.f90
@@ -0,0 +1,143 @@
+! { dg-do run }
+!
+! Test the behaviour of lbound, ubound of shape with assumed rank arguments
+! in an array context (without DIM argument).
+!
+
+program test
+
+ integer :: a(2:4,-2:5)
+ integer, allocatable :: b(:,:)
+ integer, pointer :: c(:,:)
+ character(52) :: buffer
+
+ call foo(a)
+
+ allocate(b(2:4,-2:5))
+ call foo(b)
+ call bar(b)
+
+ allocate(c(2:4,-2:5))
+ call foo(c)
+ call baz(c)
+
+contains
+ subroutine foo(arg)
+ integer :: arg(..)
+
+ !print *, lbound(arg)
+ !print *, id(lbound(arg))
+ if (any(lbound(arg) /= [1, 1])) call abort
+ if (any(id(lbound(arg)) /= [1, 1])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) lbound(arg)
+ if (buffer /= ' 1 1') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(lbound(arg))
+ if (buffer /= ' 1 1') call abort
+
+ !print *, ubound(arg)
+ !print *, id(ubound(arg))
+ if (any(ubound(arg) /= [3, 8])) call abort
+ if (any(id(ubound(arg)) /= [3, 8])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) ubound(arg)
+ if (buffer /= ' 3 8') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(ubound(arg))
+ if (buffer /= ' 3 8') call abort
+
+ !print *, shape(arg)
+ !print *, id(shape(arg))
+ if (any(shape(arg) /= [3, 8])) call abort
+ if (any(id(shape(arg)) /= [3, 8])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) shape(arg)
+ if (buffer /= ' 3 8') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(shape(arg))
+ if (buffer /= ' 3 8') call abort
+
+ end subroutine foo
+ subroutine bar(arg)
+ integer, allocatable :: arg(:,:)
+
+ !print *, lbound(arg)
+ !print *, id(lbound(arg))
+ if (any(lbound(arg) /= [2, -2])) call abort
+ if (any(id(lbound(arg)) /= [2, -2])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) lbound(arg)
+ if (buffer /= ' 2 -2') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(lbound(arg))
+ if (buffer /= ' 2 -2') call abort
+
+ !print *, ubound(arg)
+ !print *, id(ubound(arg))
+ if (any(ubound(arg) /= [4, 5])) call abort
+ if (any(id(ubound(arg)) /= [4, 5])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) ubound(arg)
+ if (buffer /= ' 4 5') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(ubound(arg))
+ if (buffer /= ' 4 5') call abort
+
+ !print *, shape(arg)
+ !print *, id(shape(arg))
+ if (any(shape(arg) /= [3, 8])) call abort
+ if (any(id(shape(arg)) /= [3, 8])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) shape(arg)
+ if (buffer /= ' 3 8') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(shape(arg))
+ if (buffer /= ' 3 8') call abort
+
+ end subroutine bar
+ subroutine baz(arg)
+ integer, pointer :: arg(..)
+
+ !print *, lbound(arg)
+ !print *, id(lbound(arg))
+ if (any(lbound(arg) /= [2, -2])) call abort
+ if (any(id(lbound(arg)) /= [2, -2])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) lbound(arg)
+ if (buffer /= ' 2 -2') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(lbound(arg))
+ if (buffer /= ' 2 -2') call abort
+
+ !print *, ubound(arg)
+ !print *, id(ubound(arg))
+ if (any(ubound(arg) /= [4, 5])) call abort
+ if (any(id(ubound(arg)) /= [4, 5])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) ubound(arg)
+ if (buffer /= ' 4 5') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(ubound(arg))
+ if (buffer /= ' 4 5') call abort
+
+ !print *, shape(arg)
+ !print *, id(shape(arg))
+ if (any(shape(arg) /= [3, 8])) call abort
+ if (any(id(shape(arg)) /= [3, 8])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) shape(arg)
+ if (buffer /= ' 3 8') call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) id(shape(arg))
+ if (buffer /= ' 3 8') call abort
+
+ end subroutine baz
+ elemental function id(arg)
+ integer, intent(in) :: arg
+ integer :: id
+
+ id = arg
+ end function id
+end program test
+
diff --git a/gcc/testsuite/gfortran.dg/assumed_rank_bounds_2.f90 b/gcc/testsuite/gfortran.dg/assumed_rank_bounds_2.f90
new file mode 100644
index 0000000000..b9c8e56f42
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_rank_bounds_2.f90
@@ -0,0 +1,112 @@
+! { dg-do run }
+!
+! Test the behaviour of lbound, ubound of shape with assumed rank arguments
+! in an array context (without DIM argument).
+!
+
+program test
+
+ integer :: a(2:4,-2:5)
+ integer, allocatable :: b(:,:)
+ integer, allocatable :: c(:,:)
+ integer, pointer :: d(:,:)
+ character(52) :: buffer
+
+ b = foo(a)
+ !print *,b(:,1)
+ if (any(b(:,1) /= [11, 101])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,1)
+ if (buffer /= ' 11 101') call abort
+
+ !print *,b(:,2)
+ if (any(b(:,2) /= [3, 8])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,2)
+ if (buffer /= ' 3 8') call abort
+
+ !print *,b(:,3)
+ if (any(b(:,3) /= [13, 108])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,3)
+ if (buffer /= ' 13 108') call abort
+
+
+ allocate(c(1:2,-3:6))
+ b = bar(c)
+ !print *,b(:,1)
+ if (any(b(:,1) /= [11, 97])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,1)
+ if (buffer /= ' 11 97') call abort
+
+ !print *,b(:,2)
+ if (any(b(:,2) /= [12, 106])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,2)
+ if (buffer /= ' 12 106') call abort
+
+ !print *,b(:,3)
+ if (any(b(:,3) /= [2, 10])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,3)
+ if (buffer /= ' 2 10') call abort
+
+
+ allocate(d(3:5,-1:10))
+ b = baz(d)
+ !print *,b(:,1)
+ if (any(b(:,1) /= [3, -1])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,1)
+ if (buffer /= ' 3 -1') call abort
+
+ !print *,b(:,2)
+ if (any(b(:,2) /= [15, 110])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,2)
+ if (buffer /= ' 15 110') call abort
+
+ !print *,b(:,3)
+ if (any(b(:,3) /= [13, 112])) call abort
+ buffer = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
+ write(buffer,*) b(:,3)
+ if (buffer /= ' 13 112') call abort
+
+
+contains
+ function foo(arg) result(res)
+ integer :: arg(..)
+ integer, allocatable :: res(:,:)
+
+ allocate(res(rank(arg), 3))
+
+ res(:,1) = lbound(arg) + (/ 10, 100 /)
+ res(:,2) = ubound(arg)
+ res(:,3) = (/ 10, 100 /) + shape(arg)
+
+ end function foo
+ function bar(arg) result(res)
+ integer, allocatable :: arg(..)
+ integer, allocatable :: res(:,:)
+
+ allocate(res(-1:rank(arg)-2, 3))
+
+ res(:,1) = lbound(arg) + (/ 10, 100 /)
+ res(:,2) = (/ 10, 100 /) + ubound(arg)
+ res(:,3) = shape(arg)
+
+ end function bar
+ function baz(arg) result(res)
+ integer, pointer :: arg(..)
+ integer, allocatable :: res(:,:)
+
+ allocate(res(2:rank(arg)+1, 3))
+
+ res(:,1) = lbound(arg)
+ res(:,2) = (/ 10, 100 /) + ubound(arg)
+ res(:,3) = shape(arg) + (/ 10, 100 /)
+
+ end function baz
+end program test
+
diff --git a/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90 b/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
index e24414ad35..a1c549bed8 100644
--- a/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_shape_ranks_1.f90
@@ -22,5 +22,3 @@ CONTAINS
write(6,*) I
END SUBROUTINE TST
END
-
-! { dg-final { cleanup-modules "addon" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_shape_ranks_2.f90 b/gcc/testsuite/gfortran.dg/assumed_shape_ranks_2.f90
index da59213d91..641d3d929f 100644
--- a/gcc/testsuite/gfortran.dg/assumed_shape_ranks_2.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_shape_ranks_2.f90
@@ -43,5 +43,3 @@ end module mod1
call foo (bar, i)
if (i .ne. 2) call abort ()
end
-
-! { dg-final { cleanup-modules "mod1" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_size_1.f90 b/gcc/testsuite/gfortran.dg/assumed_size_1.f90
new file mode 100644
index 0000000000..1ad1ae844a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_size_1.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR 54189: ICE (segfault) with invalid assumed-size dummy
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+ implicit none
+ procedure(g), pointer :: x ! { dg-error "must be a dummy argument" }
+ x => g
+
+contains
+
+ function g() ! { dg-error "must be a dummy argument" }
+ integer :: g(*)
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_size_dt_dummy.f90 b/gcc/testsuite/gfortran.dg/assumed_size_dt_dummy.f90
index 7e84e9e60a..06f0f7592f 100644
--- a/gcc/testsuite/gfortran.dg/assumed_size_dt_dummy.f90
+++ b/gcc/testsuite/gfortran.dg/assumed_size_dt_dummy.f90
@@ -14,5 +14,3 @@ CONTAINS
END MODULE TEST
end
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_1.f90 b/gcc/testsuite/gfortran.dg/assumed_type_1.f90
new file mode 100644
index 0000000000..637b39387f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_1.f90
@@ -0,0 +1,54 @@
+! { dg-do compile }
+!
+! PR fortran/48820
+!
+! Test TYPE(*)
+!
+! Based on a contributed test case by Walter Spector
+!
+module mpi_interface
+ implicit none
+
+ interface mpi_send
+ subroutine MPI_Send (buf, count, datatype, dest, tag, comm, ierr)
+ type(*), intent(in) :: buf(:)
+ integer, intent(in) :: count
+ integer, intent(in) :: datatype
+ integer, intent(in) :: dest
+ integer, intent(in) :: tag
+ integer, intent(in) :: comm
+ integer, intent(out):: ierr
+ end subroutine
+ end interface
+
+ interface mpi_send2
+ subroutine MPI_Send2 (buf, count, datatype, dest, tag, comm, ierr)
+ type(*), intent(in) :: buf(*)
+ integer, intent(in) :: count
+ integer, intent(in) :: datatype
+ integer, intent(in) :: dest
+ integer, intent(in) :: tag
+ integer, intent(in) :: comm
+ integer, intent(out):: ierr
+ end subroutine
+ end interface
+
+end module
+
+use mpi_interface
+ real :: a(3)
+ integer :: b(3)
+ call foo(a)
+ call foo(b)
+ call foo(a(1:2))
+ call foo(b(1:2))
+ call MPI_Send(a, 1, 1,1,1,j,i)
+ call MPI_Send(b, 1, 1,1,1,j,i)
+ call MPI_Send2(a, 1, 1,1,1,j,i)
+ call MPI_Send2(b, 1, 1,1,1,j,i)
+contains
+ subroutine foo(x)
+ type(*):: x(*)
+ call MPI_Send2(x, 1, 1,1,1,j,i)
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_2.f90 b/gcc/testsuite/gfortran.dg/assumed_type_2.f90
new file mode 100644
index 0000000000..28d38a1698
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_2.f90
@@ -0,0 +1,178 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/48820
+!
+! Test TYPE(*)
+!
+
+module mod
+ use iso_c_binding, only: c_loc, c_ptr, c_bool
+ implicit none
+ interface my_c_loc
+ function my_c_loc1(x) bind(C)
+ import c_ptr
+ type(*) :: x
+ type(c_ptr) :: my_c_loc1
+ end function
+ function my_c_loc2(x) bind(C)
+ import c_ptr
+ type(*) :: x(*)
+ type(c_ptr) :: my_c_loc2
+ end function
+ end interface my_c_loc
+contains
+ subroutine sub_scalar (arg1, presnt)
+ type(*), target, optional :: arg1
+ logical :: presnt
+ type(c_ptr) :: cpt
+ if (presnt .neqv. present (arg1)) call abort ()
+ cpt = c_loc (arg1)
+ end subroutine sub_scalar
+
+ subroutine sub_array_shape (arg2, lbounds, ubounds)
+ type(*), target :: arg2(:,:)
+ type(c_ptr) :: cpt
+ integer :: lbounds(2), ubounds(2)
+ if (any (lbound(arg2) /= lbounds)) call abort ()
+ if (any (ubound(arg2) /= ubounds)) call abort ()
+ if (any (shape(arg2) /= ubounds-lbounds+1)) call abort ()
+ if (size(arg2) /= product (ubounds-lbounds+1)) call abort ()
+ if (rank (arg2) /= 2) call abort ()
+! if (.not. is_continuous (arg2)) call abort () !<< Not yet implemented
+! cpt = c_loc (arg2) ! << FIXME: Valid since TS29113
+ call sub_array_assumed (arg2)
+ end subroutine sub_array_shape
+
+ subroutine sub_array_assumed (arg3)
+ type(*), target :: arg3(*)
+ type(c_ptr) :: cpt
+ cpt = c_loc (arg3)
+ end subroutine sub_array_assumed
+end module
+
+use mod
+use iso_c_binding, only: c_int, c_null_ptr
+implicit none
+type t1
+ integer :: a
+end type t1
+type :: t2
+ sequence
+ integer :: b
+end type t2
+type, bind(C) :: t3
+ integer(c_int) :: c
+end type t3
+
+integer :: scalar_int
+real, allocatable :: scalar_real_alloc
+character, pointer :: scalar_char_ptr
+
+integer :: array_int(3)
+real, allocatable :: array_real_alloc(:,:)
+character, pointer :: array_char_ptr(:,:)
+
+type(t1) :: scalar_t1
+type(t2), allocatable :: scalar_t2_alloc
+type(t3), pointer :: scalar_t3_ptr
+
+type(t1) :: array_t1(4)
+type(t2), allocatable :: array_t2_alloc(:,:)
+type(t3), pointer :: array_t3_ptr(:,:)
+
+class(t1), allocatable :: scalar_class_t1_alloc
+class(t1), pointer :: scalar_class_t1_ptr
+
+class(t1), allocatable :: array_class_t1_alloc(:,:)
+class(t1), pointer :: array_class_t1_ptr(:,:)
+
+scalar_char_ptr => null()
+scalar_t3_ptr => null()
+
+call sub_scalar (presnt=.false.)
+call sub_scalar (scalar_real_alloc, .false.)
+call sub_scalar (scalar_char_ptr, .false.)
+call sub_scalar (null (), .false.)
+call sub_scalar (scalar_t2_alloc, .false.)
+call sub_scalar (scalar_t3_ptr, .false.)
+
+allocate (scalar_real_alloc, scalar_char_ptr, scalar_t3_ptr)
+allocate (scalar_class_t1_alloc, scalar_class_t1_ptr, scalar_t2_alloc)
+allocate (array_real_alloc(3:5,2:4), array_char_ptr(-2:2,2))
+allocate (array_t2_alloc(3:5,2:4), array_t3_ptr(-2:2,2))
+allocate (array_class_t1_alloc(3,3), array_class_t1_ptr(4,4))
+
+call sub_scalar (scalar_int, .true.)
+call sub_scalar (scalar_real_alloc, .true.)
+call sub_scalar (scalar_char_ptr, .true.)
+call sub_scalar (array_int(2), .true.)
+call sub_scalar (array_real_alloc(3,2), .true.)
+call sub_scalar (array_char_ptr(0,1), .true.)
+call sub_scalar (scalar_t1, .true.)
+call sub_scalar (scalar_t2_alloc, .true.)
+call sub_scalar (scalar_t3_ptr, .true.)
+call sub_scalar (array_t1(2), .true.)
+call sub_scalar (array_t2_alloc(3,2), .true.)
+call sub_scalar (array_t3_ptr(0,1), .true.)
+call sub_scalar (array_class_t1_alloc(2,1), .true.)
+call sub_scalar (array_class_t1_ptr(3,3), .true.)
+
+call sub_array_assumed (array_int)
+call sub_array_assumed (array_real_alloc)
+call sub_array_assumed (array_char_ptr)
+call sub_array_assumed (array_t1)
+call sub_array_assumed (array_t2_alloc)
+call sub_array_assumed (array_t3_ptr)
+call sub_array_assumed (array_class_t1_alloc)
+call sub_array_assumed (array_class_t1_ptr)
+
+call sub_array_shape (array_real_alloc, [1,1], shape(array_real_alloc))
+call sub_array_shape (array_char_ptr, [1,1], shape(array_char_ptr))
+call sub_array_shape (array_t2_alloc, [1,1], shape(array_t2_alloc))
+call sub_array_shape (array_t3_ptr, [1,1], shape(array_t3_ptr))
+call sub_array_shape (array_class_t1_alloc, [1,1], shape(array_class_t1_alloc))
+call sub_array_shape (array_class_t1_ptr, [1,1], shape(array_class_t1_ptr))
+
+deallocate (scalar_char_ptr, scalar_class_t1_ptr, array_char_ptr)
+deallocate (array_class_t1_ptr, array_t3_ptr)
+
+end
+
+! { dg-final { scan-tree-dump-times "sub_scalar .0B," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_real_alloc," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_char_ptr," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_t2_alloc," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_t3_ptr" 2 "original" } }
+
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_int," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_t1," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&array_int.1.," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_t1," 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(real.kind=4..0:. . restrict\\) array_real_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(character.kind=1..0:..1:1. .\\) array_char_ptr.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(struct t2.0:. . restrict\\) array_t2_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(struct t3.0:. .\\) array_t3_ptr.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_alloc._data.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_ptr._data.dat" 1 "original" } }a
+
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 3 "original" } }
+! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&parm" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(&array_int\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(real\\(kind=4\\).0:. . restrict\\) array_real_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&array_char_ptr\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "\\.data = \\(void .\\) &array_t1.0.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) parm" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t2.0:. . restrict\\) array_t2_alloc.data\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. . restrict\\) array_class_t1_alloc._data.data\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_real_alloc," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_char_ptr," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_t2_alloc," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_t3_ptr," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_class_t1_alloc._data," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_shape \\(&array_class_t1_ptr._data," 1 "original" } }
+
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_3.f90 b/gcc/testsuite/gfortran.dg/assumed_type_3.f90
new file mode 100644
index 0000000000..e5bff509e4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_3.f90
@@ -0,0 +1,119 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/48820
+!
+! Test TYPE(*)
+
+subroutine one(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+ type(*), value :: a
+end subroutine one
+
+subroutine two(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+ type(*), pointer :: a
+end subroutine two
+
+subroutine three(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+ type(*), allocatable :: a
+end subroutine three
+
+subroutine four(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+ type(*) :: a[*]
+end subroutine four
+
+subroutine five(a) ! { dg-error "shall not be an explicit-shape array" }
+ type(*) :: a(3)
+end subroutine five
+
+subroutine six()
+ type(*) :: nodum ! { dg-error "is only permitted for dummy variables" }
+end subroutine six
+
+subroutine seven(y)
+ type(*) :: y(:)
+ call a7(y(3:5)) ! { dg-error "Assumed-type variable y at .1. shall not have a subobject reference" }
+contains
+ subroutine a7(x)
+ type(*) :: x(*)
+ end subroutine a7
+end subroutine seven
+
+subroutine eight()
+ type t
+ type(*) :: x ! { dg-error "is not allowed for components" }
+ end type t
+end subroutine eight
+
+subroutine nine()
+ interface one
+ subroutine okay(x)
+ type(*) :: x
+ end subroutine okay
+ subroutine okay2(x)
+ type(*) :: x(*)
+ end subroutine okay2
+ subroutine okay3(x,y)
+ integer :: x
+ type(*) :: y
+ end subroutine okay3
+ end interface
+ interface two
+ subroutine okok1(x)
+ type(*) :: x
+ end subroutine okok1
+ subroutine okok2(x)
+ integer :: x(*)
+ end subroutine okok2
+ end interface
+ interface three
+ subroutine ambig1(x)
+ type(*) :: x
+ end subroutine ambig1
+ subroutine ambig2(x)
+ integer :: x
+ end subroutine ambig2 ! { dg-error "Ambiguous interfaces 'ambig2' and 'ambig1' in generic interface 'three'" }
+ end interface
+end subroutine nine
+
+subroutine ten()
+ interface
+ subroutine bar()
+ end subroutine
+ end interface
+ type t
+ contains
+ procedure, nopass :: proc => bar
+ end type
+ type(t) :: xx
+ call sub(xx) ! { dg-error "is of derived type with type-bound or FINAL procedures" }
+contains
+ subroutine sub(a)
+ type(*) :: a
+ end subroutine sub
+end subroutine ten
+
+subroutine eleven(x)
+ external bar
+ type(*) :: x
+ call bar(x) ! { dg-error "Assumed-type argument x at .1. requires an explicit interface" }
+end subroutine eleven
+
+subroutine twelf(x)
+ type(*) :: x
+ call bar(x) ! { dg-error "Type mismatch in argument" }
+contains
+ subroutine bar(x)
+ integer :: x
+ end subroutine bar
+end subroutine twelf
+
+subroutine thirteen(x, y)
+ type(*) :: x
+ integer :: y(:)
+ print *, ubound(y, dim=x) ! { dg-error "Assumed-type argument at .1. is only permitted as first actual argument to the intrinsic ubound" }
+end subroutine thirteen
+
+subroutine fourteen(x)
+ type(*) :: x
+ x = x ! { dg-error "Assumed-type variable x at .1. may only be used as actual argument" }
+end subroutine fourteen
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_4.f90 b/gcc/testsuite/gfortran.dg/assumed_type_4.f90
new file mode 100644
index 0000000000..1ea982e9ad
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_4.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! PR fortran/48820
+!
+! Test TYPE(*)
+
+subroutine one(a)
+ type(*) :: a ! { dg-error "TS 29113: Assumed type" }
+end subroutine one
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_5.f90 b/gcc/testsuite/gfortran.dg/assumed_type_5.f90
new file mode 100644
index 0000000000..5f4c553d98
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_5.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! PR fortran/57035
+!
+!
+
+subroutine assumed_rank (a)
+ use iso_c_binding
+ integer, intent(in), target :: a(..)
+ integer :: c(1:4)
+ type(c_ptr) :: xx
+ c = ubound(c,a) ! { dg-error "Assumed-rank argument at .1. is only permitted as first actual argument to the intrinsic inquiry function ubound" }
+ c = transfer(a,1) ! { dg-error "Assumed-rank argument at .1. is only permitted as actual argument to intrinsic inquiry functions" }
+ xx = c_loc(a)
+end subroutine
+
+subroutine assumed_type (a)
+ use iso_c_binding
+ type(*), intent(in), target :: a
+ integer :: c(1:4)
+ type(c_ptr) :: xx
+ c = ubound(c,a) ! { dg-error "Assumed-type argument at .1. is only permitted as first actual argument to the intrinsic ubound" }
+ c = transfer(a,1) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic transfer" }
+ xx = c_loc(a)
+end subroutine
+
+subroutine no_arg_check (a)
+ use iso_c_binding
+ integer, intent(in), target :: a
+ !gcc$ attributes no_arg_check :: a
+ integer :: c(1:4)
+ type(c_ptr) :: xx
+ c = ubound(c,a) ! { dg-error "Variable with NO_ARG_CHECK attribute at .1. is only permitted as argument to the intrinsic functions C_LOC and PRESENT" }
+ c = transfer(a,1) ! { dg-error "Variable with NO_ARG_CHECK attribute at .1. is only permitted as argument to the intrinsic functions C_LOC and PRESENT" }
+ xx = c_loc(a)
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_6.f90 b/gcc/testsuite/gfortran.dg/assumed_type_6.f90
new file mode 100644
index 0000000000..78ff849768
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_6.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+!
+! PR fortran/
+!
+! Contributed by Vladimír Fuka
+!
+function avg(a)
+ integer :: avg
+ integer,intent(in) :: a(..)
+
+ avg = sum(a)/size(a) ! { dg-error "Assumed-rank argument at .1. is only permitted as actual argument to intrinsic inquiry functions" }
+end function
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_7.f90 b/gcc/testsuite/gfortran.dg/assumed_type_7.f90
new file mode 100644
index 0000000000..48cb43e7f8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_7.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+implicit none
+call sub(f) ! { dg-error "Type mismatch in argument" }
+contains
+
+ subroutine f(x)
+ type(*) :: x
+ end subroutine
+
+ subroutine sub(g)
+ interface
+ subroutine g(x)
+ integer :: x
+ end subroutine
+ end interface
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/assumed_type_8.f90 b/gcc/testsuite/gfortran.dg/assumed_type_8.f90
new file mode 100644
index 0000000000..543e693bb4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/assumed_type_8.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+!
+! Issue came up during the review of PR fortran/58793
+!
+! Test for TS29113:2012's C407b.
+!
+program test
+ use iso_c_binding
+ integer,target ::aa
+ call up(c_loc(aa))
+contains
+ subroutine up(x)
+ class(*) :: x
+ end subroutine
+ subroutine bar(x)
+ type(*) :: x
+ call up(x) ! { dg-error "Assumed-type actual argument at .1. requires that dummy argument 'x' is of assumed type" }
+ end subroutine bar
+end program test
diff --git a/gcc/testsuite/gfortran.dg/asynchronous_4.f90 b/gcc/testsuite/gfortran.dg/asynchronous_4.f90
new file mode 100644
index 0000000000..ca6cd6c026
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/asynchronous_4.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR 59228: ICE with assumed type and ASYNCHRONOUS
+!
+! Contributed by Valery Weber <valeryweber@hotmail.com>
+
+ IMPLICIT NONE
+
+ interface
+ subroutine test(base)
+ TYPE(*), ASYNCHRONOUS :: base
+ end subroutine
+ end interface
+
+CONTAINS
+
+ SUBROUTINE foo ( data )
+ REAL, DIMENSION( : ), ASYNCHRONOUS :: data
+ CALL test ( data ) ! { dg-error "Rank mismatch in argument" }
+ END SUBROUTINE
+
+END
diff --git a/gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90 b/gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90
index 6ed6f45769..6a660c2038 100644
--- a/gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90
+++ b/gcc/testsuite/gfortran.dg/auto_char_dummy_array_1.f90
@@ -53,5 +53,3 @@ contains
end subroutine a
end program oh_no_not_pr15908_again
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/auto_char_len_3.f90 b/gcc/testsuite/gfortran.dg/auto_char_len_3.f90
index da8cf5e4e7..b94151148a 100644
--- a/gcc/testsuite/gfortran.dg/auto_char_len_3.f90
+++ b/gcc/testsuite/gfortran.dg/auto_char_len_3.f90
@@ -23,5 +23,3 @@ program TestStringTools
if (txt .ne. "AaBbCcDdEeFfGgHhIiJjKkLlMmNnOoPpQqRrSsTtUuVvWwXxYyZz") &
call abort ()
end program TestStringTools
-
-! { dg-final { cleanup-modules "chtest" } }
diff --git a/gcc/testsuite/gfortran.dg/auto_char_len_4.f90 b/gcc/testsuite/gfortran.dg/auto_char_len_4.f90
index 6b4e26e6b4..72ee8450dc 100644
--- a/gcc/testsuite/gfortran.dg/auto_char_len_4.f90
+++ b/gcc/testsuite/gfortran.dg/auto_char_len_4.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-fwhole-file" }
+! { dg-options "-pedantic -fwhole-file" }
!
! Tests the fix for PR25087, in which the following invalid code
! was not detected.
@@ -14,8 +14,8 @@ FUNCTION a()
END FUNCTION a
SUBROUTINE s(n)
- CHARACTER(LEN=n), EXTERNAL :: a ! { dg-error "must have an explicit interface" }
- CHARACTER(LEN=n), EXTERNAL :: d ! { dg-error "must have an explicit interface" }
+ CHARACTER(LEN=n), EXTERNAL :: a ! { dg-error "Character length mismatch" }
+ CHARACTER(LEN=n), EXTERNAL :: d ! { dg-error "Character length mismatch" }
interface
function b (m) ! This is OK
CHARACTER(LEN=m) :: b
diff --git a/gcc/testsuite/gfortran.dg/auto_dealloc_1.f90 b/gcc/testsuite/gfortran.dg/auto_dealloc_1.f90
index 95a71609d1..7e5fbd1486 100644
--- a/gcc/testsuite/gfortran.dg/auto_dealloc_1.f90
+++ b/gcc/testsuite/gfortran.dg/auto_dealloc_1.f90
@@ -54,6 +54,4 @@ end module
! { dg-final { scan-tree-dump-times "__builtin_free" 4 "original" } }
-
-! { dg-final { cleanup-modules "automatic_deallocation" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90 b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
index e607b6ad91..04ee7f2699 100644
--- a/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
+++ b/gcc/testsuite/gfortran.dg/auto_dealloc_2.f90
@@ -11,11 +11,12 @@ type :: t
integer, allocatable :: i(:)
end type
+block ! New block as the main program implies SAVE
type(t) :: a
call init(a)
call init(a)
-
+end block
contains
subroutine init(x)
@@ -25,5 +26,6 @@ contains
end program
-! { dg-final { scan-tree-dump-times "__builtin_free" 3 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_free" 4 "original" } }
+! { dg-final { scan-tree-dump-times "x->_vptr->_final \\(" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/automatic_default_init_1.f90 b/gcc/testsuite/gfortran.dg/automatic_default_init_1.f90
index 525632b36d..178706a342 100644
--- a/gcc/testsuite/gfortran.dg/automatic_default_init_1.f90
+++ b/gcc/testsuite/gfortran.dg/automatic_default_init_1.f90
@@ -18,4 +18,3 @@ END MODULE M1
USE M1
CALL S1(2)
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/automatic_module_variable.f90 b/gcc/testsuite/gfortran.dg/automatic_module_variable.f90
index c88b355b24..201dcf4e1d 100644
--- a/gcc/testsuite/gfortran.dg/automatic_module_variable.f90
+++ b/gcc/testsuite/gfortran.dg/automatic_module_variable.f90
@@ -14,5 +14,3 @@ contains
init = x
end function init
end module sd
-
-! { dg-final { cleanup-modules "sd" } }
diff --git a/gcc/testsuite/gfortran.dg/bad_automatic_objects_1.f90 b/gcc/testsuite/gfortran.dg/bad_automatic_objects_1.f90
index c4c1f2cb0c..2734418619 100644
--- a/gcc/testsuite/gfortran.dg/bad_automatic_objects_1.f90
+++ b/gcc/testsuite/gfortran.dg/bad_automatic_objects_1.f90
@@ -18,5 +18,3 @@ program foobar
integer, dimension (i) :: k ! { dg-error "must have constant shape" }
character (len = i) :: c2 ! { dg-error "must have constant character length" }
end program foobar
-
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/bessel_7.f90 b/gcc/testsuite/gfortran.dg/bessel_7.f90
index 7e63ed1e85..c6b5f7407f 100644
--- a/gcc/testsuite/gfortran.dg/bessel_7.f90
+++ b/gcc/testsuite/gfortran.dg/bessel_7.f90
@@ -16,7 +16,7 @@
implicit none
real,parameter :: values(*) = [0.0, 0.5, 1.0, 0.9, 1.8,2.0,3.0,4.0,4.25,8.0,34.53, 475.78]
real,parameter :: myeps(size(values)) = epsilon(0.0) &
- * [2, 3, 4, 5, 8, 2, 12, 6, 7, 6, 36, 168 ]
+ * [2, 3, 4, 5, 8, 2, 13, 6, 7, 6, 36, 168 ]
! The following is sufficient for me - the values above are a bit
! more tolerant
! * [0, 0, 0, 3, 3, 0, 9, 0, 2, 1, 22, 130 ]
diff --git a/gcc/testsuite/gfortran.dg/bind_c_array_params.f03 b/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
index 6590db1d1d..0e9903c639 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_array_params.f03
@@ -1,14 +1,15 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
module bind_c_array_params
use, intrinsic :: iso_c_binding
implicit none
contains
- subroutine sub0(assumed_array) bind(c) ! { dg-error "cannot be an argument" }
+ subroutine sub0(assumed_array) bind(c) ! { dg-error "TS 29113: Assumed-shape array 'assumed_array' at .1. as dummy argument to the BIND.C. procedure 'sub0'" }
integer(c_int), dimension(:) :: assumed_array
end subroutine sub0
- subroutine sub1(deferred_array) bind(c) ! { dg-error "cannot" }
+ subroutine sub1(deferred_array) bind(c) ! { dg-error "TS 29113: Variable 'deferred_array' at .1. with POINTER attribute in procedure 'sub1' with BIND.C." }
integer(c_int), pointer :: deferred_array(:)
end subroutine sub1
end module bind_c_array_params
diff --git a/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90 b/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90
new file mode 100644
index 0000000000..54c95cf779
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_array_params_2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-std=f2008ts -fdump-tree-original" }
+! { dg-additional-options "-mno-explicit-relocs" { target alpha*-*-* } }
+! { dg-additional-options "-mno-relax-pic-calls" { target mips*-*-* } }
+!
+! Check that assumed-shape variables are correctly passed to BIND(C)
+! as defined in TS 29913
+!
+interface
+ subroutine test (xx) bind(C, name="myBindC")
+ type(*), dimension(:,:) :: xx
+ end subroutine test
+end interface
+
+integer :: aa(4,4)
+call test(aa)
+end
+
+! { dg-final { scan-assembler-times "myBindC" 1 { target { ! { hppa*-*-hpux* } } } } }
+! { dg-final { scan-assembler-times "myBindC,%r2" 1 { target { hppa*-*-hpux* } } } }
+! { dg-final { scan-tree-dump-times "test \\\(&parm\\." 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90 b/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90
new file mode 100644
index 0000000000..871405a77b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_bool_1.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/55758
+!
+
+function sub2() bind(C) ! { dg-error "GNU Extension: LOGICAL result variable 'sub2' at .1. with non-C_Bool kind in BIND.C. procedure 'sub2'" }
+ logical(kind=8) :: sub2
+ logical(kind=4) :: local ! OK
+end function sub2
+
+function sub4() bind(C) result(res) ! { dg-error "GNU Extension: LOGICAL result variable 'res' at .1. with non-C_Bool kind in BIND.C. procedure 'sub4'" }
+ logical(kind=2) :: res
+ logical(kind=4) :: local ! OK
+end function sub4
+
+
+subroutine sub(x) bind(C) ! { dg-error "GNU Extension: LOGICAL dummy argument 'x' at .1. with non-C_Bool kind in BIND.C. procedure 'sub'" }
+ logical(kind=2) :: x
+end subroutine sub
+
+subroutine sub3(y) bind(C)
+ use iso_c_binding, only : c_bool
+ logical(kind=c_bool) :: y ! OK
+end subroutine sub3
diff --git a/gcc/testsuite/gfortran.dg/bind_c_coms.f90 b/gcc/testsuite/gfortran.dg/bind_c_coms.f90
index e88d56d182..85ead9fb63 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_coms.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_coms.f90
@@ -47,5 +47,3 @@ module bind_c_coms_2
integer(c_int) :: m, n
bind(c, name="") /com3/
end module bind_c_coms_2
-
-! { dg-final { cleanup-modules "bind_c_coms bind_c_coms_2" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_dts.f90 b/gcc/testsuite/gfortran.dg/bind_c_dts.f90
index f0a31e5408..f78630ba56 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_dts.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_dts.f90
@@ -39,5 +39,3 @@ contains
myDerived%s = myDerived%s + 1.0;
end subroutine types_test
end module bind_c_dts
-
-! { dg-final { cleanup-modules "bind_c_dts" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_dts_2.f03 b/gcc/testsuite/gfortran.dg/bind_c_dts_2.f03
index 4b423e53de..4e5e61b4ee 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_dts_2.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_dts_2.f03
@@ -59,5 +59,3 @@ contains
end if
end subroutine sub0
end module bind_c_dts_2
-
-! { dg-final { cleanup-modules "bind_c_dts_2" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_dts_3.f03 b/gcc/testsuite/gfortran.dg/bind_c_dts_3.f03
index fa54fb761b..e28769ddf8 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_dts_3.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_dts_3.f03
@@ -35,5 +35,3 @@ contains
end if
end subroutine sub0
end module bind_c_dts_3
-
-! { dg-final { cleanup-modules "bind_c_dts_3" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_dts_4.f03 b/gcc/testsuite/gfortran.dg/bind_c_dts_4.f03
index b2eb5694f1..1e42d5b9be 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_dts_4.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_dts_4.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
module test
use iso_c_binding, only: c_int
type, bind(c) :: foo
@@ -6,5 +7,3 @@ use iso_c_binding, only: c_int
end type
type(foo), bind(c) :: cp
end module test
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_dts_5.f90 b/gcc/testsuite/gfortran.dg/bind_c_dts_5.f90
index 497c0501b1..5fe5e2b36c 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_dts_5.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_dts_5.f90
@@ -50,5 +50,3 @@ PROGRAM main
write (*,*) liter_cb(link_info)
END PROGRAM main
-
-! { dg-final { cleanup-modules "liter_cb_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_implicit_vars.f03 b/gcc/testsuite/gfortran.dg/bind_c_implicit_vars.f03
index d6b4b6d617..5df783fcf2 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_implicit_vars.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_implicit_vars.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
module bind_c_implicit_vars
bind(c) :: j ! { dg-warning "may not be C interoperable" }
@@ -8,5 +9,3 @@ contains
i = 0
end subroutine sub0
end module bind_c_implicit_vars
-
-! { dg-final { cleanup-modules "bind_c_implicit_vars" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_module.f90 b/gcc/testsuite/gfortran.dg/bind_c_module.f90
index a17f5d0b34..6cb7387a46 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_module.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_module.f90
@@ -19,4 +19,3 @@ module d
implicit none
bind(c) :: a ! { dg-error "applied to" }
end module d
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_procs.f03 b/gcc/testsuite/gfortran.dg/bind_c_procs.f03
index 718042bafc..3bb6ea319c 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_procs.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_procs.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
module bind_c_procs
use, intrinsic :: iso_c_binding, only: c_int
@@ -35,5 +36,3 @@ contains
end function my_f03_func
end module bind_c_procs
-
-! { dg-final { cleanup-modules "bind_c_procs" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_procs_2.f90 b/gcc/testsuite/gfortran.dg/bind_c_procs_2.f90
new file mode 100644
index 0000000000..d3e751c3dc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_procs_2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR 59023: [4.9 regression] ICE in gfc_search_interface with BIND(C)
+!
+! Contributed by Francois-Xavier Coudert <fxcoudert@gcc.gnu.org>
+
+ type t
+ integer hidden
+ end type
+
+contains
+
+ subroutine bar
+ type(t) :: toto
+ interface
+ integer function helper() bind(c)
+ end function
+ end interface
+ toto = t(helper())
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03
index 4f2268aee6..c6f2b79c1f 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_10.f03
@@ -71,5 +71,3 @@ contains
func4ent = -88.0
end function func4
end module mod
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_13.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_13.f03
index d89963d8b1..b8c2261866 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_13.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_13.f03
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-fdump-tree-original" }
+! { dg-options "-fdump-tree-original -Wc-binding-type" }
!
! PR fortran/34079
! Character bind(c) arguments shall not pass the length as additional argument
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_15.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_15.f90
index 55caba45f5..c5201a634d 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_15.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_15.f90
@@ -27,5 +27,3 @@ program main
call gen(x)
if(x /= 17) call abort()
end program main
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_16.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_16.f03
index 68b043cba4..990918fcc5 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_16.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_16.f03
@@ -55,5 +55,3 @@ subroutine test() bind(c)
if(iachar(d(i)(2:2)) /=32 .or. iachar(d(i)(3:3)) /= 32) call abort()
end do
end subroutine
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_17.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_17.f90
index ba342755c3..ad7ffd08f3 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_17.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_17.f90
@@ -34,5 +34,3 @@ PROGRAM test
WRITE(str4,'(i0)') ICHAR(cdir())
if(str4 /= '47' .or. ichar(str4(3:3)) /= 32) call abort()
END PROGRAM
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_18.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_18.f90
index 2bce215af1..ede9f60e83 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_18.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_18.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
!
! PR fortran/38160
!
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_21.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_21.f90
index 10a86dbbbc..3ed8dc90a4 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_21.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_21.f90
@@ -21,5 +21,3 @@ contains
liter_cb = 0
END FUNCTION liter_cb
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90
index a6ebd5833c..a46772be24 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_24.f90
@@ -39,5 +39,3 @@ program test
call c_proc (.true._c_bool, val)
if (val /= 7) call abort ()
end program test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_25.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_25.f90
new file mode 100644
index 0000000000..ae3cf07fcb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_25.f90
@@ -0,0 +1,58 @@
+! { dg-do compile }
+! { dg-options "-Wno-c-binding-type" }
+!
+! That's a copy of "bind_c_usage_8.f03", "bind_c_dts_4.f03",
+! "bind_c_implicit_vars.f03" and "c_kind_tests_2.f03"
+! to check that with -Wno-c-binding-type no warning is printed.
+!
+
+MODULE ISO_C_UTILITIES
+ USE ISO_C_BINDING
+ implicit none
+ CHARACTER(C_CHAR), DIMENSION(1), SAVE, TARGET, PRIVATE :: dummy_string="?"
+CONTAINS
+ FUNCTION C_F_STRING(CPTR) RESULT(FPTR)
+ use, intrinsic :: iso_c_binding
+ TYPE(C_PTR), INTENT(IN) :: CPTR ! The C address
+ CHARACTER(KIND=C_CHAR), DIMENSION(:), POINTER :: FPTR
+ INTERFACE
+ FUNCTION strlen(string) RESULT(len) BIND(C,NAME="strlen")
+ USE ISO_C_BINDING
+ TYPE(C_PTR), VALUE :: string ! A C pointer
+ END FUNCTION
+ END INTERFACE
+ CALL C_F_POINTER(FPTR=FPTR, CPTR=CPTR, SHAPE=[strlen(CPTR)])
+ END FUNCTION
+END MODULE ISO_C_UTILITIES
+
+module test
+use iso_c_binding, only: c_int
+ type, bind(c) :: foo
+ integer :: p
+ end type
+ type(foo), bind(c) :: cp
+end module test
+
+module bind_c_implicit_vars
+
+bind(c) :: j
+
+contains
+ subroutine sub0(i) bind(c)
+ i = 0
+ end subroutine sub0
+end module bind_c_implicit_vars
+
+module c_kind_tests_2
+ use, intrinsic :: iso_c_binding
+
+ integer, parameter :: myF = c_float
+ real(myF), bind(c) :: myCFloat
+ integer(myF), bind(c) :: myCInt ! { dg-warning "is for type REAL" }
+ integer(c_double), bind(c) :: myCInt2 ! { dg-warning "is for type REAL" }
+
+ integer, parameter :: myI = c_int
+ real(myI) :: myReal ! { dg-warning "is for type INTEGER" }
+ real(myI), bind(c) :: myCFloat2 ! { dg-warning "is for type INTEGER" }
+ real(4), bind(c) :: myFloat
+end module c_kind_tests_2
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_26.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_26.f90
new file mode 100644
index 0000000000..20a68d1af2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_26.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/53985
+!
+! Check that the (default) -Wno-c-binding-type works
+! and no warning is printed.
+!
+! With -Wc-binding-type, one gets:
+! Warning: Variable 'x' at (1) is a dummy argument to the BIND(C) procedure
+! 'test' but may not be C interoperable )
+!
+subroutine test(x) bind(C)
+ integer :: x
+end subroutine test
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_27.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_27.f90
new file mode 100644
index 0000000000..a1b0fcc620
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_27.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-std=f2008ts" }
+!
+! Contributed by Reinhold Bader
+!
+use iso_c_binding
+type, bind(C) :: cstruct
+ integer :: i
+end type
+interface
+ subroutine psub(this, that) bind(c, name='Psub')
+ import :: c_float, cstruct
+ real(c_float), pointer :: this(:)
+ type(cstruct), allocatable :: that(:)
+ end subroutine psub
+ end interface
+end
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_28.f90 b/gcc/testsuite/gfortran.dg/bind_c_usage_28.f90
new file mode 100644
index 0000000000..ff03ef48f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_28.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! Contributed by Reinhold Bader
+!
+use iso_c_binding
+type, bind(C) :: cstruct
+ integer :: i
+end type
+interface
+ subroutine psub(this) bind(c, name='Psub') ! { dg-error "TS 29113: Variable 'this' at .1. with POINTER attribute in procedure 'psub' with BIND.C." }
+ import :: c_float, cstruct
+ real(c_float), pointer :: this(:)
+ end subroutine psub
+ subroutine psub2(that) bind(c, name='Psub2') ! { dg-error "TS 29113: Variable 'that' at .1. with ALLOCATABLE attribute in procedure 'psub2' with BIND.C." }
+ import :: c_float, cstruct
+ type(cstruct), allocatable :: that(:)
+ end subroutine psub2
+ end interface
+end
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_3.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_3.f03
index 8f070335aa..47f9d9a921 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_3.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_3.f03
@@ -17,4 +17,3 @@ module test
type(foo), bind(c) :: cp ! { dg-error "is not C interoperable" }
real(c_double), pointer,bind(c) :: p ! { dg-error "cannot have both the POINTER and BIND.C." }
end module test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_7.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_7.f03
index 845aab9532..25adb2c7f1 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_7.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_7.f03
@@ -12,5 +12,3 @@ contains
my_string_func = 'my_string' // C_NULL_CHAR
end function my_string_func
end module x
-
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/bind_c_usage_8.f03 b/gcc/testsuite/gfortran.dg/bind_c_usage_8.f03
index a94545cc51..15843b5c9d 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_usage_8.f03
+++ b/gcc/testsuite/gfortran.dg/bind_c_usage_8.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
! This should compile, though there is a warning about the type of len
! (return variable of strlen()) for being implicit.
! PR fortran/32797
@@ -21,5 +22,3 @@ CONTAINS
CALL C_F_POINTER(FPTR=FPTR, CPTR=CPTR, SHAPE=[strlen(CPTR)])
END FUNCTION
END MODULE ISO_C_UTILITIES
-! { dg-final { cleanup-modules "iso_c_utilities" } }
-
diff --git a/gcc/testsuite/gfortran.dg/bind_c_vars.f90 b/gcc/testsuite/gfortran.dg/bind_c_vars.f90
index e57edf09d3..4f4a0cfd79 100644
--- a/gcc/testsuite/gfortran.dg/bind_c_vars.f90
+++ b/gcc/testsuite/gfortran.dg/bind_c_vars.f90
@@ -36,5 +36,3 @@ contains
end subroutine changeF90Globals
end module bind_c_vars
-
-! { dg-final { cleanup-modules "bind_c_vars" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests.f03
index 34986501e2..a13e9673aa 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests.f03
@@ -73,5 +73,3 @@ module binding_label_tests
subroutine sub4() BIND(c, name = " ")
end subroutine sub4
end module binding_label_tests
-
-! { dg-final { cleanup-modules "binding_label_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_10.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_10.f03
index 99c9c52762..e609d34a52 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_10.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_10.f03
@@ -6,5 +6,4 @@ module binding_label_tests_10
implicit none
integer(c_int), bind(c,name="c_one") :: one
end module binding_label_tests_10
-
-! Do not use dg-final to cleanup-modules
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_10_main.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_10_main.f03
index aa24a6ac1d..5216fbedf6 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_10_main.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_10_main.f03
@@ -4,12 +4,11 @@
module binding_label_tests_10_main
use iso_c_binding
implicit none
- integer(c_int), bind(c,name="c_one") :: one ! { dg-error "collides" }
+ integer(c_int), bind(c,name="c_one") :: one ! { dg-error "Variable one from module binding_label_tests_10 with binding label c_one at .1. uses the same global identifier as entity at .2. from module binding_label_tests_10_main" }
end module binding_label_tests_10_main
program main
- use binding_label_tests_10 ! { dg-error "collides" }
+ use binding_label_tests_10 ! { dg-error "Variable one from module binding_label_tests_10 with binding label c_one at .1. uses the same global identifier as entity at .2. from module binding_label_tests_10_main" }
use binding_label_tests_10_main
end program main
-
-! { dg-final { cleanup-modules "binding_label_tests_10_main binding_label_tests_10" } }
+! { dg-final { cleanup-modules "binding_label_tests_10" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_11.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_11.f03
index 5e889a7886..8dcf99869f 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_11.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_11.f03
@@ -10,5 +10,4 @@ contains
one = 1
end function one
end module binding_label_tests_11
-
-! Do not use dg-final to cleanup-modules
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_11_main.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_11_main.f03
index 53eac7cf54..851c32ce7c 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_11_main.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_11_main.f03
@@ -5,15 +5,14 @@ module binding_label_tests_11_main
use iso_c_binding, only: c_int
implicit none
contains
- function one() bind(c, name="c_one") ! { dg-error "collides" }
+ function one() bind(c, name="c_one") ! { dg-error "Procedure one with binding label c_one at .1. uses the same global identifier as entity at .2." }
integer(c_int) one
one = 1
end function one
end module binding_label_tests_11_main
program main
- use binding_label_tests_11 ! { dg-error "collides" }
+ use binding_label_tests_11 ! { dg-error "Procedure one with binding label c_one at .1. uses the same global identifier as entity at .2." }
use binding_label_tests_11_main
end program main
-
-! { dg-final { cleanup-modules "binding_label_tests_11_main binding_label_tests_11" } }
+! { dg-final { cleanup-modules "binding_label_tests_11" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_12.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_12.f03
index 0a00066811..ce9cd9f93a 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_12.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_12.f03
@@ -20,5 +20,3 @@ end module two
use one, only: foo_one => foo
use two, only: foo_two => foo
end
-
-! { dg-final { cleanup-modules "one two" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_13.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_13.f03
index 786945d3af..a8e3179bf3 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_13.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_13.f03
@@ -6,3 +6,4 @@ module binding_label_tests_13
integer(c_int) :: c3
bind(c) c3
end module binding_label_tests_13
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f03
index 1addc9c495..da93a8bbd8 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_13_main.f03
@@ -4,13 +4,12 @@
! binding_label_tests_13.mod can not be removed until after this test is done.
module binding_label_tests_13_main
use, intrinsic :: iso_c_binding, only: c_int
- integer(c_int) :: c3 ! { dg-error "collides" }
+ integer(c_int) :: c3 ! { dg-error "Variable c3 from module binding_label_tests_13_main with binding label c3 at .1. uses the same global identifier as entity at .2. from module binding_label_tests_13" }
bind(c) c3
contains
subroutine c_sub() BIND(c, name = "C_Sub")
- use binding_label_tests_13 ! { dg-error "collides" }
+ use binding_label_tests_13 ! { dg-error "Variable c3 from module binding_label_tests_13_main with binding label c3 at .1. uses the same global identifier as entity at .2. from module binding_label_tests_13" }
end subroutine c_sub
end module binding_label_tests_13_main
-! { dg-final { cleanup-modules "binding_label_tests_13 binding_label_tests_13_main" } }
-
+! { dg-final { cleanup-modules "binding_label_tests_13" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_16.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_16.f03
index 6b8f1f89ba..7029b2ea19 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_16.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_16.f03
@@ -19,4 +19,3 @@ implicit none
print *, a, b
if (a /= 5 .or. b /= -5) call abort()
end program prog
-! { dg-final { cleanup-modules "m n" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_17.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_17.f90
new file mode 100644
index 0000000000..4243ffbdb1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_17.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+subroutine foo() bind(C, name="bar") ! { dg-error "Global binding name 'bar' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
+subroutine sub() bind(C, name="bar") ! { dg-error "Global binding name 'bar' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine sub
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_18.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_18.f90
new file mode 100644
index 0000000000..548d367e3d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_18.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+subroutine foo() ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
+subroutine foo() ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_19.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_19.f90
new file mode 100644
index 0000000000..a6f63e6858
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_19.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+subroutine foo() bind(C,name="bar")
+end subroutine foo
+
+subroutine foo() bind(C,name="sub")
+end subroutine foo
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_2.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_2.f03
index bf9da112ab..46bbbbd04c 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_2.f03
@@ -31,5 +31,3 @@ contains
subroutine sub8() bind(c, name) ! { dg-error "Syntax error" }
end subroutine sub8 ! { dg-error "Expecting END MODULE" }
end module binding_label_tests_2
-
-! { dg-final { cleanup-modules "binding_label_tests_2" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_20.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_20.f90
new file mode 100644
index 0000000000..2b0da43169
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_20.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/48858
+!
+subroutine foo() bind(C,name="bar") ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
+subroutine foo() bind(C,name="sub") ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_21.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_21.f90
new file mode 100644
index 0000000000..0519d0f1d2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_21.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+subroutine foo() bind(C, name="bar") ! { dg-error "Global binding name 'bar' at .1. is already being used as a SUBROUTINE at .2." }
+entry sub() bind(C, name="bar") ! { dg-error "Global binding name 'bar' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_22.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_22.f90
new file mode 100644
index 0000000000..b136754d59
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_22.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+subroutine foo() ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+entry foo() ! { dg-error "Global name 'foo' at .1. is already being used as a SUBROUTINE at .2." }
+end subroutine foo
+
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_23.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_23.f90
new file mode 100644
index 0000000000..ba9e61550f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_23.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+!
+! PR fortran/48858
+!
+integer function foo(x)
+ integer :: x
+ call abort()
+ foo = 99
+end function foo
+
+integer function other() bind(C, name="bar")
+ other = 42
+end function other
+
+program test
+ interface
+ integer function foo() bind(C, name="bar")
+ end function foo
+ end interface
+ if (foo() /= 42) call abort() ! Ensure that the binding name is all what counts
+end program test
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_24.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_24.f90
new file mode 100644
index 0000000000..56e6858703
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_24.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+! PR fortran/55465
+!
+! Was rejected before but it perfectly valid
+!
+module m
+ interface
+ subroutine f() bind(C, name="func")
+ end subroutine
+ end interface
+contains
+ subroutine sub()
+ call f()
+ end subroutine
+end module m
+
+module m2
+ interface
+ subroutine g() bind(C, name="func")
+ end subroutine
+ end interface
+contains
+ subroutine sub2()
+ call g()
+ end subroutine
+end module m2
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_25.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_25.f90
new file mode 100644
index 0000000000..0769eb05de
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_25.f90
@@ -0,0 +1,61 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+! PR fortran/55465
+!
+! Seems to be regarded as valid, even if it is doubtful
+!
+
+
+module m_odbc_if
+ implicit none
+
+ interface sql_set_env_attr
+ function sql_set_env_attr_int( input_handle,attribute,value,length ) &
+ result(res) bind(C,name="SQLSetEnvAttr")
+ use, intrinsic :: iso_c_binding
+ implicit none
+ type(c_ptr), value :: input_handle
+ integer(c_int), value :: attribute
+ integer(c_int), value :: value ! <<<< HERE: int passed by value (int with ptr address)
+ integer(c_int), value :: length
+ integer(c_short) :: res
+ end function
+ function sql_set_env_attr_ptr( input_handle,attribute,value,length ) &
+ result(res) bind(C,name="SQLSetEnvAttr")
+ use, intrinsic :: iso_c_binding
+ implicit none
+ type(c_ptr), value :: input_handle
+ integer(c_int), value :: attribute
+ type(c_ptr), value :: value ! <<< HERE: "void *" (pointer address)
+ integer(c_int), value :: length
+ integer(c_short) :: res
+ end function
+ end interface
+end module
+
+module graph_partitions
+ use,intrinsic :: iso_c_binding
+
+ interface Cfun
+ subroutine cfunc1 (num, array) bind(c, name="Cfun")
+ import :: c_int
+ integer(c_int),value :: num
+ integer(c_int) :: array(*) ! <<< HERE: int[]
+ end subroutine cfunc1
+
+ subroutine cfunf2 (num, array) bind(c, name="Cfun")
+ import :: c_int, c_ptr
+ integer(c_int),value :: num
+ type(c_ptr),value :: array ! <<< HERE: void*
+ end subroutine cfunf2
+ end interface
+end module graph_partitions
+
+program test
+ use graph_partitions
+ integer(c_int) :: a(100)
+
+ call Cfun (1, a)
+ call Cfun (2, C_NULL_PTR)
+end program test
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_26a.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_26a.f90
new file mode 100644
index 0000000000..32cf07ae7c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_26a.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR 58182: [4.9 Regression] ICE with global binding name used as a FUNCTION
+!
+! Contributed by Andrew Bensons <abensonca@gmail.com>
+!
+! This file must be compiled BEFORE binding_label_tests_26b.f90, which it
+! should be because dejagnu will sort the files.
+
+module fg
+contains
+ function fffi(f)
+ interface
+ function f() bind(c)
+ end function
+ end interface
+ end function
+end module
+
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_26b.f90 b/gcc/testsuite/gfortran.dg/binding_label_tests_26b.f90
new file mode 100644
index 0000000000..ad8426bc2c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_26b.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR 58182: [4.9 Regression] ICE with global binding name used as a FUNCTION
+!
+! Contributed by Andrew Bensons <abensonca@gmail.com>
+!
+! This file must be compiled AFTER binding_label_tests_26a.f90, which it
+! should be because dejagnu will sort the files.
+
+module f ! { dg-error "uses the same global identifier" }
+ use fg ! { dg-error "uses the same global identifier" }
+end module
+
+! { dg-final { cleanup-modules "fg f" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_3.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_3.f03
index 6e12447025..429fa0b0e8 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_3.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_3.f03
@@ -2,14 +2,14 @@
program main
use iso_c_binding
interface
- subroutine p1(f, a1, a2, a3, a4) bind(c, name='printf') ! { dg-error "collides" }
+ subroutine p1(f, a1, a2, a3, a4) bind(c, name='printf') ! Doubtful use ...
import :: c_ptr, c_int, c_double
type(c_ptr), value :: f
integer(c_int), value :: a1, a3
real(c_double), value :: a2, a4
end subroutine p1
- subroutine p2(f, a1, a2, a3, a4) bind(c, name='printf') ! { dg-error "collides" }
+ subroutine p2(f, a1, a2, a3, a4) bind(c, name='printf') ! ... with incompatible interfaces
import :: c_ptr, c_int, c_double
type(c_ptr), value :: f
real(c_double), value :: a1, a3
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
index 5a0767d878..455726e75d 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_4.f03
@@ -2,7 +2,7 @@
module A
use, intrinsic :: iso_c_binding
contains
- subroutine pA() bind(c, name='printf') ! { dg-error "collides" }
+ subroutine pA() bind(c, name='printf') ! { dg-error "Procedure pb with binding label printf at .1. uses the same global identifier as entity at .2." }
print *, 'hello from pA'
end subroutine pA
end module A
@@ -11,7 +11,7 @@ module B
use, intrinsic :: iso_c_binding
contains
- subroutine pB() bind(c, name='printf') ! { dg-error "collides" }
+ subroutine pB() bind(c, name='printf') ! { dg-error "Procedure pb with binding label printf at .1. uses the same global identifier as entity at .2." }
print *, 'hello from pB'
end subroutine pB
end module B
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_5.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_5.f03
index c8aa4e8621..41999b3e60 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_5.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_5.f03
@@ -3,10 +3,10 @@ module binding_label_tests_5
use, intrinsic :: iso_c_binding
interface
- subroutine sub0() bind(c, name='c_sub') ! { dg-error "collides" }
+ subroutine sub0() bind(c, name='c_sub') ! Odd declaration but perfectly valid
end subroutine sub0
- subroutine sub1() bind(c, name='c_sub') ! { dg-error "collides" }
+ subroutine sub1() bind(c, name='c_sub') ! Ditto.
end subroutine sub1
end interface
end module binding_label_tests_5
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_6.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_6.f03
index 0784de12e2..d213819f20 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_6.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_6.f03
@@ -1,6 +1,6 @@
! { dg-do compile }
module binding_label_tests_6
use, intrinsic :: iso_c_binding
- integer(c_int), bind(c, name='my_int') :: my_f90_int_1 ! { dg-error "collides" }
- integer(c_int), bind(c, name='my_int') :: my_f90_int_2 ! { dg-error "collides" }
+ integer(c_int), bind(c, name='my_int') :: my_f90_int_1 ! { dg-error "Variable my_f90_int_2 from module binding_label_tests_6 with binding label my_int at .1. uses the same global identifier as entity at .2. from module binding_label_tests_6" }
+ integer(c_int), bind(c, name='my_int') :: my_f90_int_2 ! { dg-error "Variable my_f90_int_2 from module binding_label_tests_6 with binding label my_int at .1. uses the same global identifier as entity at .2. from module binding_label_tests_6" }
end module binding_label_tests_6
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_7.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_7.f03
index 136fb5e507..1e261a995b 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_7.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_7.f03
@@ -1,17 +1,15 @@
! { dg-do compile }
module A
use, intrinsic :: iso_c_binding, only: c_int
- integer(c_int), bind(c, name='my_c_print') :: my_int ! { dg-error "collides" }
+ integer(c_int), bind(c, name='my_c_print') :: my_int ! { dg-error "Procedure my_c_print with binding label my_c_print at .1. uses the same global identifier as entity at .2." }
end module A
program main
use A
interface
- subroutine my_c_print() bind(c) ! { dg-error "collides" }
+ subroutine my_c_print() bind(c) ! { dg-error "Procedure my_c_print with binding label my_c_print at .1. uses the same global identifier as entity at .2." }
end subroutine my_c_print
end interface
call my_c_print()
end program main
-
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_8.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_8.f03
index c49ee62545..2f507b9e23 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_8.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_8.f03
@@ -1,9 +1,9 @@
! { dg-do compile }
module binding_label_tests_8
use, intrinsic :: iso_c_binding, only: c_int
- integer(c_int), bind(c, name='my_f90_sub') :: my_c_int ! { dg-error "collides" }
+ integer(c_int), bind(c, name='my_f90_sub') :: my_c_int ! { dg-error "Variable my_c_int with binding label my_f90_sub at .1. uses the same global identifier as entity at .2." }
contains
- subroutine my_f90_sub() bind(c) ! { dg-error "collides" }
+ subroutine my_f90_sub() bind(c) ! { dg-error "Variable my_c_int with binding label my_f90_sub at .1. uses the same global identifier as entity at .2." }
end subroutine my_f90_sub
end module binding_label_tests_8
diff --git a/gcc/testsuite/gfortran.dg/binding_label_tests_9.f03 b/gcc/testsuite/gfortran.dg/binding_label_tests_9.f03
index cdf1ef880d..bb61cbf12c 100644
--- a/gcc/testsuite/gfortran.dg/binding_label_tests_9.f03
+++ b/gcc/testsuite/gfortran.dg/binding_label_tests_9.f03
@@ -19,5 +19,3 @@ contains
subroutine my_public_sub() bind(c, name="my_sub")
end subroutine my_public_sub
end module x
-
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/block_11.f90 b/gcc/testsuite/gfortran.dg/block_11.f90
new file mode 100644
index 0000000000..6fe244d91e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/block_11.f90
@@ -0,0 +1,66 @@
+! { dg-do link }
+!
+! PR fortran/52729
+!
+! Based on a contribution of Andrew Benson
+!
+module testMod
+ type testType
+ end type testType
+contains
+ subroutine testSub()
+ implicit none
+ procedure(double precision ), pointer :: r
+ class (testType ), pointer :: testObject
+ double precision :: testVal
+
+ ! Failed as testFunc was BT_UNKNOWN
+ select type (testObject)
+ class is (testType)
+ testVal=testFunc()
+ r => testFunc
+ end select
+ return
+ end subroutine testSub
+
+ double precision function testFunc()
+ implicit none
+ return
+ end function testFunc
+end module testMod
+
+module testMod2
+ implicit none
+contains
+ subroutine testSub()
+ procedure(double precision ), pointer :: r
+ double precision :: testVal
+ ! Failed as testFunc was BT_UNKNOWN
+ block
+ r => testFunc
+ testVal=testFunc()
+ end block
+ end subroutine testSub
+
+ double precision function testFunc()
+ end function testFunc
+end module testMod2
+
+module m3
+ implicit none
+contains
+ subroutine my_test()
+ procedure(sub), pointer :: ptr
+ ! Before the fix, one had the link error
+ ! "undefined reference to `sub.1909'"
+ block
+ ptr => sub
+ call sub()
+ end block
+ end subroutine my_test
+ subroutine sub(a)
+ integer, optional :: a
+ end subroutine sub
+end module m3
+
+end
diff --git a/gcc/testsuite/gfortran.dg/blockdata_7.f90 b/gcc/testsuite/gfortran.dg/blockdata_7.f90
new file mode 100644
index 0000000000..b7de9642cd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/blockdata_7.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR fortran/55444
+!
+! Contributed by Henrik Holst
+!
+ BLOCKDATA
+! USE ISO_C_BINDING, ONLY: C_INT, C_FLOAT ! WORKS
+ USE :: ISO_C_BINDING ! FAILS
+ INTEGER(C_INT) X
+ REAL(C_FLOAT) Y
+ COMMON /FOO/ X,Y
+ BIND(C,NAME='fortranStuff') /FOO/
+ DATA X /1/
+ DATA Y /2.0/
+ END BLOCKDATA
diff --git a/gcc/testsuite/gfortran.dg/blockdata_8.f90 b/gcc/testsuite/gfortran.dg/blockdata_8.f90
new file mode 100644
index 0000000000..d3f992564a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/blockdata_8.f90
@@ -0,0 +1,48 @@
+! { dg-do compile }
+!
+! PR fortran/44350
+!
+! Fortran 2008, C1116 only permits a small subset of statements in BLOCK DATA
+!
+! Part of the test case was contributed by Vittorio Zecca
+!
+module m
+end module m
+
+BLOCK DATA valid2
+ use m
+ implicit integer(a-z)
+ intrinsic :: sin
+ common /one/ a, c
+ bind(C) :: /one/
+ dimension c(5)
+ parameter (g = 7)
+END BLOCK DATA valid2
+
+BLOCK DATA valid
+ use m
+ implicit none
+ type t
+ sequence
+ end type t
+ type(t), save :: x
+ integer :: y
+ real :: q
+ save :: y
+ dimension :: q(5)
+! class(*) :: zz ! See PR fortran/58857
+! pointer :: zz
+ target :: q
+ volatile y
+ asynchronous q
+END BLOCK DATA valid
+
+block data invalid
+ common x
+ f(x)=x ! { dg-error "STATEMENT FUNCTION statement is not allowed inside of BLOCK DATA" }
+ interface ! { dg-error "INTERFACE statement is not allowed inside of BLOCK DATA" }
+ end interface
+1 format() ! { dg-error "FORMAT statement is not allowed inside of BLOCK DATA" }
+end block invalid ! { dg-error "Expecting END BLOCK DATA statement" }
+
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/bound_2.f90 b/gcc/testsuite/gfortran.dg/bound_2.f90
index 3b99a1f547..d26695c30f 100644
--- a/gcc/testsuite/gfortran.dg/bound_2.f90
+++ b/gcc/testsuite/gfortran.dg/bound_2.f90
@@ -193,7 +193,8 @@ contains
end subroutine sub3
subroutine foo (x,n)
- integer :: x(7,n,2,*), n
+ integer :: n
+ integer :: x(7,n,2,*)
if (ubound(x,1) /= 7 .or. ubound(x,2) /= 4 .or. ubound(x,3) /= 2) call abort
end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/bound_simplification_2.f90 b/gcc/testsuite/gfortran.dg/bound_simplification_2.f90
index 05477776f0..a3f1e4321f 100644
--- a/gcc/testsuite/gfortran.dg/bound_simplification_2.f90
+++ b/gcc/testsuite/gfortran.dg/bound_simplification_2.f90
@@ -6,4 +6,3 @@ module foo
INTEGER, PARAMETER, DIMENSION(2) :: IP_ARRAY1_32_S = &
& (/ LBOUND(IP_ARRAY2_4_S(5:10,2:3))/)
END module foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_17.f90 b/gcc/testsuite/gfortran.dg/bounds_check_17.f90
new file mode 100644
index 0000000000..50d66c75a8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bounds_check_17.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+! { dg-options "-fcheck=bounds" }
+! { dg-shouldfail "above upper bound" }
+!
+! PR fortran/29800
+!
+! Contributed by Joost VandeVondele
+!
+
+TYPE data
+ INTEGER :: x(10)
+END TYPE
+TYPE data_areas
+ TYPE(data) :: y(10)
+END TYPE
+
+TYPE(data_areas) :: z(10)
+
+integer, volatile :: i,j,k
+i=1 ; j=1 ; k=11
+
+z(i)%y(j)%x(k)=0
+
+END
+
+! { dg-output "At line 22 of file .*bounds_check_17.f90.*Fortran runtime error: Index '11' of dimension 1 of array 'z%y%x' above upper bound of 10" }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_18.f90 b/gcc/testsuite/gfortran.dg/bounds_check_18.f90
new file mode 100644
index 0000000000..afd0503ef1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/bounds_check_18.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+program main
+ implicit none
+ integer :: n
+ real, dimension(10) :: a
+ n = 0
+ call random_number(a)
+ if (any(a(n+1:n+5) > [1.0, 2.0, 3.0])) print *,"Hello!" ! { dg-error "not conformable" }
+end program main
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_4.f90 b/gcc/testsuite/gfortran.dg/bounds_check_4.f90
index 9ce2298f23..7ede11fd09 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_4.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_4.f90
@@ -1,3 +1,5 @@
+! { dg-do run }
+! { dg-options "-fbounds-check" }
subroutine foo(n,x)
implicit none
integer, intent(in) :: n
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_5.f90 b/gcc/testsuite/gfortran.dg/bounds_check_5.f90
index 3a2fc6306a..e2e32e3e53 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_5.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_5.f90
@@ -1,4 +1,5 @@
! { dg-do run }
+! { dg-options "-fbounds-check" }
! This tests the fix for PR30190, in which the array reference
! in the associated statement would cause a segfault.
!
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_7.f90 b/gcc/testsuite/gfortran.dg/bounds_check_7.f90
index c488a68cad..b38419908b 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_7.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_7.f90
@@ -5,7 +5,7 @@
subroutine foo(a)
integer a(*), i
i = 0
- a(i) = 42 ! {
+ a(i) = 42
end subroutine foo
program test
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_9.f90 b/gcc/testsuite/gfortran.dg/bounds_check_9.f90
index 3b487efa14..c0abd2896e 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_9.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_9.f90
@@ -34,4 +34,3 @@ program main
call sub()
call sub((/4,5/))
end program main
-! { dg-final { cleanup-modules "sub_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_fail_2.f90 b/gcc/testsuite/gfortran.dg/bounds_check_fail_2.f90
index d79272b387..bb2c247bf3 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_fail_2.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_fail_2.f90
@@ -37,4 +37,3 @@ program main
call sub((/4/))
end program main
! { dg-output "Fortran runtime error: Array bound mismatch" }
-! { dg-final { cleanup-modules "sub_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90
index 7ecce2a71d..241db66239 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_2.f90
@@ -30,4 +30,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "shorter than the declared one for dummy argument 'str' \\(3/5\\)" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90
index 69be0884c3..a6be86a8c4 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_3.f90
@@ -30,4 +30,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "does not match the declared one for dummy argument 'str' \\(7/5\\)" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90
index db8ce3c3b1..284e2eae38 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_4.f90
@@ -30,4 +30,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "does not match the declared one for dummy argument 'str' \\(7/5\\)" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90
index 36fda721f3..4820248824 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_5.f90
@@ -30,4 +30,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "does not match the declared one for dummy argument 'str' \\(7/5\\)" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90
index 550cca8431..c46bfe2db2 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_6.f90
@@ -24,5 +24,3 @@ PROGRAM main
CALL test ('abcde') ! String length matches.
CALL test ('abcdef') ! String too long, is ok.
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90
index 9f08ba1ca8..99a0d8697f 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_7.f90
@@ -22,4 +22,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "shorter than the declared one for dummy argument 'opt' \\(0/5\\)" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/bounds_check_strlen_8.f90 b/gcc/testsuite/gfortran.dg/bounds_check_strlen_8.f90
index c54f14144f..7319988968 100644
--- a/gcc/testsuite/gfortran.dg/bounds_check_strlen_8.f90
+++ b/gcc/testsuite/gfortran.dg/bounds_check_strlen_8.f90
@@ -36,5 +36,3 @@ END MODULE M3
USE M3
CALL S1
END
-
-! { dg-final { cleanup-modules "m1 m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/c_assoc.f90 b/gcc/testsuite/gfortran.dg/c_assoc.f90
index 7b34663a34..9b2af24f98 100644
--- a/gcc/testsuite/gfortran.dg/c_assoc.f90
+++ b/gcc/testsuite/gfortran.dg/c_assoc.f90
@@ -66,5 +66,3 @@ contains
end subroutine verify_assoc
end module c_assoc
-
-! { dg-final { cleanup-modules "c_assoc" } }
diff --git a/gcc/testsuite/gfortran.dg/c_assoc_2.f03 b/gcc/testsuite/gfortran.dg/c_assoc_2.f03
index 4b3b7963af..275e88eadc 100644
--- a/gcc/testsuite/gfortran.dg/c_assoc_2.f03
+++ b/gcc/testsuite/gfortran.dg/c_assoc_2.f03
@@ -16,19 +16,19 @@ contains
call abort()
end if
- if(.not. c_associated(my_c_ptr, my_c_ptr, my_c_ptr)) then ! { dg-error "More actual than formal arguments" }
+ if(.not. c_associated(my_c_ptr, my_c_ptr, my_c_ptr)) then ! { dg-error "Too many arguments in call" }
call abort()
end if
- if(.not. c_associated()) then ! { dg-error "Missing argument" }
+ if(.not. c_associated()) then ! { dg-error "Missing actual argument 'C_PTR_1' in call to 'c_associated'" }
call abort()
- end if ! { dg-error "Expecting END SUBROUTINE" }
+ end if
if(.not. c_associated(my_c_ptr_2)) then
call abort()
end if
- if(.not. c_associated(my_integer)) then ! { dg-error "Type mismatch" }
+ if(.not. c_associated(my_integer)) then ! { dg-error "shall have the type TYPE.C_PTR. or TYPE.C_FUNPTR." }
call abort()
end if
end subroutine sub0
diff --git a/gcc/testsuite/gfortran.dg/c_assoc_4.f90 b/gcc/testsuite/gfortran.dg/c_assoc_4.f90
new file mode 100644
index 0000000000..5421a363f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_assoc_4.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/49023
+!
+PROGRAM test
+
+ USE, INTRINSIC :: iso_c_binding
+ IMPLICIT NONE
+
+ TYPE (C_PTR) :: x, y
+
+ PRINT *, C_ASSOCIATED([x,y]) ! { dg-error "'C_PTR_1' argument of 'c_associated' intrinsic at .1. must be a scalar" }
+
+END PROGRAM test
diff --git a/gcc/testsuite/gfortran.dg/c_assoc_5.f90 b/gcc/testsuite/gfortran.dg/c_assoc_5.f90
new file mode 100644
index 0000000000..105b8f8c39
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_assoc_5.f90
@@ -0,0 +1,69 @@
+! { dg-do compile }
+!
+! PR fortran/56969
+!
+! Contributed by Salvatore Filippone
+!
+! Was before rejected as the different c_associated weren't recognized to
+! come from the same module.
+!
+module test_mod
+ use iso_c_binding
+
+ type(c_ptr), save :: test_context = c_null_ptr
+
+ type, bind(c) :: s_Cmat
+ type(c_ptr) :: Mat = c_null_ptr
+ end type s_Cmat
+
+
+ interface
+ function FtestCreate(context) &
+ & bind(c,name="FtestCreate") result(res)
+ use iso_c_binding
+ type(c_ptr) :: context
+ integer(c_int) :: res
+ end function FtestCreate
+ end interface
+contains
+
+ function initFtest() result(res)
+ implicit none
+ integer(c_int) :: res
+ if (c_associated(test_context)) then
+ res = 0
+ else
+ res = FtestCreate(test_context)
+ end if
+ end function initFtest
+end module test_mod
+
+module base_mat_mod
+ type base_sparse_mat
+ integer, allocatable :: ia(:)
+ end type base_sparse_mat
+end module base_mat_mod
+
+module extd_mat_mod
+
+ use iso_c_binding
+ use test_mod
+ use base_mat_mod
+
+ type, extends(base_sparse_mat) :: extd_sparse_mat
+ type(s_Cmat) :: deviceMat
+ end type extd_sparse_mat
+
+end module extd_mat_mod
+
+subroutine extd_foo(a)
+
+ use extd_mat_mod
+ implicit none
+ class(extd_sparse_mat), intent(inout) :: a
+
+ if (c_associated(a%deviceMat%Mat)) then
+ write(*,*) 'C Associated'
+ end if
+
+end subroutine extd_foo
diff --git a/gcc/testsuite/gfortran.dg/c_by_val_5.f90 b/gcc/testsuite/gfortran.dg/c_by_val_5.f90
index 90ef299aa9..3a8bc3bf75 100644
--- a/gcc/testsuite/gfortran.dg/c_by_val_5.f90
+++ b/gcc/testsuite/gfortran.dg/c_by_val_5.f90
@@ -23,7 +23,7 @@ module x
! "external" only.
interface
subroutine bmp_write(nx)
- integer :: nx
+ integer, value :: nx
end subroutine bmp_write
end interface
contains
@@ -65,5 +65,3 @@ program main
call Grid2BMP(10)
! call test()
end program main
-
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/c_char_tests.f03 b/gcc/testsuite/gfortran.dg/c_char_tests.f03
index 72b136e01d..cbdfd9f2a9 100644
--- a/gcc/testsuite/gfortran.dg/c_char_tests.f03
+++ b/gcc/testsuite/gfortran.dg/c_char_tests.f03
@@ -25,5 +25,3 @@ contains
if(my_char_ref /= c_char_'y') call abort()
end subroutine sub1
end module c_char_tests
-
-! { dg-final { cleanup-modules "c_char_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_complex.f03 b/gcc/testsuite/gfortran.dg/c_f_pointer_complex.f03
index fd9703139e..b68eadbf9a 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_complex.f03
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_complex.f03
@@ -57,5 +57,3 @@ contains
end do
end subroutine test_complex_arrays
end module c_f_pointer_complex
-! { dg-final { cleanup-modules "c_f_pointer_complex" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03 b/gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03
index 977c4cb070..5558697c1f 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_logical.f03
@@ -31,4 +31,3 @@ contains
end do
end subroutine test_array
end module c_f_pointer_logical
-! { dg-final { cleanup-modules "c_f_pointer_logical" } }
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
index c6204bdac7..9b130ad6e5 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_test.f90
@@ -1,7 +1,7 @@
! { dg-do compile }
-! verify that the compiler catches the error in the call to c_f_pointer
-! because it is missing the required SHAPE parameter. the SHAPE parameter
-! is optional, in general, but must exist if given a fortran pointer
+! Verify that the compiler catches the error in the call to c_f_pointer
+! because it is missing the required SHAPE argument. The SHAPE argument
+! is optional, in general, but must exist if given a Fortran pointer
! to a non-zero rank object. --Rickett, 09.26.06
module c_f_pointer_shape_test
contains
@@ -13,7 +13,8 @@ contains
type(c_ptr), value :: cPtr
myArrayPtr => myArray
- call c_f_pointer(cPtr, myArrayPtr) ! { dg-error "Missing SHAPE parameter" }
+ call c_f_pointer(cPtr, myArrayPtr) ! { dg-error "Expected SHAPE argument to C_F_POINTER with array FPTR" }
end subroutine test_0
end module c_f_pointer_shape_test
+! { dg-final { cleanup-modules "c_f_pointer_shape_test" } }
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
index 662908931b..426279b5cf 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_2.f03
@@ -110,5 +110,3 @@ contains
end do
end subroutine test_mixed
end module c_f_pointer_shape_tests_2
-! { dg-final { cleanup-modules "c_f_pointer_shape_tests_2" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03
index 31fd938106..632e4579ce 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_3.f03
@@ -8,7 +8,7 @@ contains
type(c_ptr), value :: my_c_array
integer(c_int), dimension(:), pointer :: my_array_ptr
- call c_f_pointer(my_c_array, my_array_ptr, (/ 10.0 /)) ! { dg-error "must be a rank 1 INTEGER array" }
+ call c_f_pointer(my_c_array, my_array_ptr, (/ 10.0 /)) ! { dg-error "must be INTEGER" }
end subroutine sub0
subroutine sub1(my_c_array) bind(c)
@@ -17,6 +17,6 @@ contains
integer(c_int), dimension(1,1) :: shape
shape(1,1) = 10
- call c_f_pointer(my_c_array, my_array_ptr, shape) ! { dg-error "must be a rank 1 INTEGER array" }
+ call c_f_pointer(my_c_array, my_array_ptr, shape) ! { dg-error "must be of rank 1" }
end subroutine sub1
end module c_f_pointer_shape_tests_3
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
index 89b8666d7a..b3caff0a5a 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_4.f03
@@ -111,5 +111,3 @@ contains
end do
end subroutine test_mixed
end module c_f_pointer_shape_tests_4
-! { dg-final { cleanup-modules "c_f_pointer_shape_tests_4" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f90
new file mode 100644
index 0000000000..f3e17892bf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_5.f90
@@ -0,0 +1,27 @@
+! { dg-do run }
+!
+! Check that C_F_Pointer works with a noncontiguous SHAPE argument
+!
+use iso_c_binding
+type(c_ptr) :: x
+integer, target :: array(3)
+integer, pointer :: ptr(:,:)
+integer, pointer :: ptr2(:,:,:)
+integer :: myshape(5)
+
+array = [22,33,44]
+x = c_loc(array)
+myshape = [1,2,3,4,1]
+
+call c_f_pointer(x, ptr, shape=myshape(1:4:2))
+if (any (lbound(ptr) /= [ 1, 1])) call abort ()
+if (any (ubound(ptr) /= [ 1, 3])) call abort ()
+if (any (shape(ptr) /= [ 1, 3])) call abort ()
+if (any (ptr(1,:) /= array)) call abort()
+
+call c_f_pointer(x, ptr2, shape=myshape([1,3,1]))
+if (any (lbound(ptr2) /= [ 1, 1, 1])) call abort ()
+if (any (ubound(ptr2) /= [ 1, 3, 1])) call abort ()
+if (any (shape(ptr2) /= [ 1, 3, 1])) call abort ()
+if (any (ptr2(1,:,1) /= array)) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f90
new file mode 100644
index 0000000000..dd9b163664
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_shape_tests_6.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR 60302: [4.9 Regression] ICE with c_f_pointer and android cross compiler
+!
+! Contributed by Valery Weber <valeryweber@hotmail.com>
+
+subroutine reshape_inplace_c2_c2 (new_shape)
+ use, intrinsic :: iso_c_binding
+ implicit none
+ integer :: new_shape(:)
+ complex, pointer :: ptr_x(:)
+ type(c_ptr) :: loc_x
+ call c_f_pointer (loc_x, ptr_x, new_shape)
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90
index d35f9d1c15..1e4dbc0201 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests.f90
@@ -66,5 +66,3 @@ module c_f_pointer_tests
endif
end subroutine testDerivedPtrs
end module c_f_pointer_tests
-
-! { dg-final { cleanup-modules "c_f_pointer_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
index f7d6fa78eb..29072b814f 100644
--- a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_3.f90
@@ -21,14 +21,21 @@ program test
call c_f_procpointer(cfunptr, fprocptr)
end program test
-! Make sure there is only a single function call:
-! { dg-final { scan-tree-dump-times "c_f" 1 "original" } }
-! { dg-final { scan-tree-dump-times "c_f_pointer" 1 "original" } }
-! { dg-final { scan-tree-dump-times "c_f_pointer_i4" 1 "original" } }
+! Make sure there is no function call:
+! { dg-final { scan-tree-dump-times "c_f" 0 "original" } }
+! { dg-final { scan-tree-dump-times "c_f_pointer" 0 "original" } }
+! { dg-final { scan-tree-dump-times "c_f_pointer_i4" 0 "original" } }
!
! Check scalar c_f_pointer
! { dg-final { scan-tree-dump-times " fptr = .integer.kind=4. .. cptr" 1 "original" } }
!
+! Array c_f_pointer:
+!
+! { dg-final { scan-tree-dump-times " fptr_array.data = cptr;" 1 "original" } }
+! { dg-final { scan-tree-dump-times " fptr_array.dim\\\[S..\\\].lbound = 1;" 1 "original" } }
+! { dg-final { scan-tree-dump-times " fptr_array.dim\\\[S..\\\].ubound = " 1 "original" } }
+! { dg-final { scan-tree-dump-times " fptr_array.dim\\\[S..\\\].stride = " 1 "original" } }
+!
! Check c_f_procpointer
! { dg-final { scan-tree-dump-times " fprocptr = .integer.kind=4. .\\*<.*>. ... cfunptr;" 1 "original" } }
!
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_5.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_5.f90
new file mode 100644
index 0000000000..5194e40b1e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_5.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+!
+! PR 54667: [OOP] gimplification failure with c_f_pointer
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+use, intrinsic :: ISO_C_Binding
+type :: nc
+end type
+type(c_ptr) :: cSelf
+class(nc), pointer :: self
+call c_f_pointer(cSelf, self) ! { dg-error "shall not be polymorphic" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90
new file mode 100644
index 0000000000..6dc439770d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_6.f90
@@ -0,0 +1,43 @@
+! { dg-do compile }
+!
+! PR fortran/38894
+!
+!
+
+subroutine test2
+use iso_c_binding
+type(c_funptr) :: fun
+type(c_ptr) :: fptr
+procedure(), pointer :: bar
+integer, pointer :: bari
+call c_f_procpointer(fptr,bar) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
+call c_f_pointer(fun,bari) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." }
+fun = fptr ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." }
+end
+
+subroutine test()
+use iso_c_binding, c_ptr2 => c_ptr
+type(c_ptr2) :: fun
+procedure(), pointer :: bar
+integer, pointer :: foo
+call c_f_procpointer(fun,bar) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
+call c_f_pointer(fun,foo) ! OK
+end
+
+module rename
+ use, intrinsic :: iso_c_binding, only: my_c_ptr_0 => c_ptr
+end module rename
+
+program p
+ use, intrinsic :: iso_c_binding, my_c_ptr => c_ptr
+ type(my_c_ptr) :: my_ptr
+ print *,c_associated(my_ptr)
+contains
+ subroutine sub()
+ use rename ! (***)
+ type(my_c_ptr_0) :: my_ptr2
+ type(c_funptr) :: myfun
+ print *,c_associated(my_ptr,my_ptr2)
+ print *,c_associated(my_ptr,myfun) ! { dg-error "Argument C_PTR_2 at .1. to C_ASSOCIATED shall have the same type as C_PTR_1: TYPE.c_ptr. instead of TYPE.c_funptr." }
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_7.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_7.f90
new file mode 100644
index 0000000000..8cabd18d13
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_7.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+!
+! PR fortran/54263
+!
+use iso_c_binding
+type(c_ptr) :: cp
+integer, pointer :: p
+call c_f_pointer (cp, p, shape=[2]) ! { dg-error "Unexpected SHAPE argument at .1. to C_F_POINTER with scalar FPTR" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c_f_pointer_tests_8.f90 b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_8.f90
new file mode 100644
index 0000000000..d82c9ea8a3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_f_pointer_tests_8.f90
@@ -0,0 +1,37 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/57834
+!
+! (Gave a bogus warning before.)
+!
+program main
+
+ use iso_c_binding
+ use iso_fortran_env
+
+ implicit none
+
+ interface
+ function strerror(errno) bind(C, NAME = 'strerror')
+ import
+ type(C_PTR) :: strerror
+ integer(C_INT), value :: errno
+ end function
+ end interface
+
+ integer :: i
+ type(C_PTR) :: cptr
+ character(KIND=C_CHAR), pointer :: str(:)
+
+ cptr = strerror(INT(42, KIND = C_INT))
+ call C_F_POINTER(cptr, str, [255])
+
+ do i = 1, SIZE(str)
+ if (str(i) == C_NULL_CHAR) exit
+ write (ERROR_UNIT, '(A1)', ADVANCE = 'NO') str(i:i)
+ enddo
+
+ write (ERROR_UNIT, '(1X)')
+
+end program main
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests.f03 b/gcc/testsuite/gfortran.dg/c_funloc_tests.f03
index 8ba07b9fbb..823c5e39d2 100644
--- a/gcc/testsuite/gfortran.dg/c_funloc_tests.f03
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests.f03
@@ -17,5 +17,3 @@ program driver
call sub0()
end program driver
-
-! { dg-final { cleanup-modules "c_funloc_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_2.f03 b/gcc/testsuite/gfortran.dg/c_funloc_tests_2.f03
index d3ed265ea8..4db7bcc5fc 100644
--- a/gcc/testsuite/gfortran.dg/c_funloc_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_2.f03
@@ -8,9 +8,9 @@ contains
type(c_funptr) :: my_c_funptr
integer :: my_local_variable
- my_c_funptr = c_funloc() ! { dg-error "Missing argument" }
+ my_c_funptr = c_funloc() ! { dg-error "Missing actual argument 'x' in call to 'c_funloc'" }
my_c_funptr = c_funloc(sub0)
- my_c_funptr = c_funloc(sub0, sub0) ! { dg-error "More actual than formal" }
- my_c_funptr = c_funloc(my_local_variable) ! { dg-error "must be a procedure" }
+ my_c_funptr = c_funloc(sub0, sub0) ! { dg-error "Too many arguments in call to 'c_funloc'" }
+ my_c_funptr = c_funloc(my_local_variable) ! { dg-error "Argument X at .1. to C_FUNLOC shall be a procedure or a procedure pointer" }
end subroutine sub0
end module c_funloc_tests_2
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_3.f03 b/gcc/testsuite/gfortran.dg/c_funloc_tests_3.f03
index 2d23efb243..b08d35187f 100644
--- a/gcc/testsuite/gfortran.dg/c_funloc_tests_3.f03
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_3.f03
@@ -33,4 +33,3 @@ program main
p = c_funloc(ffunc)
call callFunc(p, 21,-17*21)
end program main
-! { dg-final { cleanup-modules "c_funloc_tests_3" } }
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_4.f03 b/gcc/testsuite/gfortran.dg/c_funloc_tests_4.f03
index 0733c5e20b..16a5066870 100644
--- a/gcc/testsuite/gfortran.dg/c_funloc_tests_4.f03
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_4.f03
@@ -36,5 +36,3 @@ contains
func0 = desired_retval
end function func0
end module c_funloc_tests_4
-! { dg-final { cleanup-modules "c_funloc_tests_4" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_5.f03 b/gcc/testsuite/gfortran.dg/c_funloc_tests_5.f03
index bbb418de62..ae321a998d 100644
--- a/gcc/testsuite/gfortran.dg/c_funloc_tests_5.f03
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_5.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
! Test that the arg checking for c_funloc verifies the procedures are
! C interoperable.
module c_funloc_tests_5
@@ -7,9 +8,9 @@ contains
subroutine sub0() bind(c)
type(c_funptr) :: my_c_funptr
- my_c_funptr = c_funloc(sub1) ! { dg-error "must be BIND.C." }
+ my_c_funptr = c_funloc(sub1) ! { dg-error "TS 29113: Noninteroperable procedure at .1. to C_FUNLOC" }
- my_c_funptr = c_funloc(func0) ! { dg-error "must be BIND.C." }
+ my_c_funptr = c_funloc(func0) ! { dg-error "TS 29113: Noninteroperable procedure at .1. to C_FUNLOC" }
end subroutine sub0
subroutine sub1()
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90 b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90
new file mode 100644
index 0000000000..1a7f0362d1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_6.f90
@@ -0,0 +1,31 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! Check relaxed TS29113 constraints for procedures
+! and c_f_*pointer argument checking for c_ptr/c_funptr.
+!
+
+use iso_c_binding
+implicit none
+type(c_ptr) :: cp
+type(c_funptr) :: cfp
+
+interface
+ subroutine sub() bind(C)
+ end subroutine sub
+end interface
+integer(c_int), pointer :: int
+procedure(sub), pointer :: fsub
+
+integer, external :: noCsub
+procedure(integer), pointer :: fint
+
+cp = c_funloc (sub) ! { dg-error "Can't convert TYPE.c_funptr. to TYPE.c_ptr." })
+cfp = c_loc (int) ! { dg-error "Can't convert TYPE.c_ptr. to TYPE.c_funptr." }
+
+call c_f_pointer (cfp, int) ! { dg-error "Argument CPTR at .1. to C_F_POINTER shall have the type TYPE.C_PTR." }
+call c_f_procpointer (cp, fsub) ! { dg-error "Argument CPTR at .1. to C_F_PROCPOINTER shall have the type TYPE.C_FUNPTR." }
+
+cfp = c_funloc (noCsub) ! { dg-error "TS 29113: Noninteroperable procedure at .1. to C_FUNLOC" }
+call c_f_procpointer (cfp, fint) ! { dg-error "TS 29113: Noninteroperable procedure pointer at .1. to C_F_PROCPOINTER" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_7.f90 b/gcc/testsuite/gfortran.dg/c_funloc_tests_7.f90
new file mode 100644
index 0000000000..8e51c892cb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_7.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-std=f2008ts -fdump-tree-original" }
+!
+! Check relaxed TS29113 constraints for procedures
+! and c_f_*pointer argument checking for c_ptr/c_funptr.
+!
+
+use iso_c_binding
+implicit none
+type(c_funptr) :: cfp
+
+integer, external :: noCsub
+procedure(integer), pointer :: fint
+
+cfp = c_funloc (noCsub)
+call c_f_procpointer (cfp, fint)
+end
+
+! { dg-final { scan-tree-dump-times "cfp =\[^;\]+ nocsub;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "fint =\[^;\]+ cfp;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/c_funloc_tests_8.f90 b/gcc/testsuite/gfortran.dg/c_funloc_tests_8.f90
new file mode 100644
index 0000000000..1650a79e10
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_funloc_tests_8.f90
@@ -0,0 +1,49 @@
+! { dg-do compile }
+!
+! PR fortran/50612
+! PR fortran/47023
+!
+subroutine test
+ use iso_c_binding
+ implicit none
+ external foo
+ procedure(), pointer :: pp
+ print *, c_sizeof(pp) ! { dg-error "Procedure unexpected as argument" }
+ print *, c_sizeof(foo) ! { dg-error "Procedure unexpected as argument" }
+ print *, c_sizeof(bar) ! { dg-error "Procedure unexpected as argument" }
+contains
+ subroutine bar()
+ end subroutine bar
+end
+
+integer function foo2()
+ procedure(), pointer :: ptr
+ ptr => foo2 ! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
+ foo2 = 7
+ block
+ ptr => foo2 ! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
+ end block
+contains
+ subroutine foo()
+ ptr => foo2 ! { dg-error "Function result 'foo2' is invalid as proc-target in procedure pointer assignment" }
+ end subroutine foo
+end function foo2
+
+module m2
+contains
+integer function foo(i, fptr) bind(C)
+ use iso_c_binding
+ implicit none
+ integer :: i
+ type(c_funptr) :: fptr
+ fptr = c_funloc(foo) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }
+ block
+ fptr = c_funloc(foo) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }
+ end block
+ foo = 42*i
+contains
+ subroutine bar()
+ fptr = c_funloc(foo) ! { dg-error "Function result 'foo' at .1. is invalid as X argument to C_FUNLOC" }
+ end subroutine bar
+end function foo
+end module m2
diff --git a/gcc/testsuite/gfortran.dg/c_kind_params.f90 b/gcc/testsuite/gfortran.dg/c_kind_params.f90
index 4176157887..c595a3bbcf 100644
--- a/gcc/testsuite/gfortran.dg/c_kind_params.f90
+++ b/gcc/testsuite/gfortran.dg/c_kind_params.f90
@@ -74,4 +74,3 @@ contains
end subroutine param_test
end module c_kind_params
-! { dg-final { cleanup-modules "c_kind_params" } }
diff --git a/gcc/testsuite/gfortran.dg/c_kind_tests_2.f03 b/gcc/testsuite/gfortran.dg/c_kind_tests_2.f03
index a8cdbdff50..592953c0c0 100644
--- a/gcc/testsuite/gfortran.dg/c_kind_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/c_kind_tests_2.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
module c_kind_tests_2
use, intrinsic :: iso_c_binding
@@ -12,4 +13,3 @@ module c_kind_tests_2
real(myI), bind(c) :: myCFloat2 ! { dg-warning "is for type INTEGER" }
real(4), bind(c) :: myFloat ! { dg-warning "may not be a C interoperable" }
end module c_kind_tests_2
-! { dg-final { cleanup-modules "c_kind_tests_2" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test.f90 b/gcc/testsuite/gfortran.dg/c_loc_test.f90
index 673e6f7282..9b120dc9cd 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_test.f90
+++ b/gcc/testsuite/gfortran.dg/c_loc_test.f90
@@ -21,4 +21,3 @@ contains
call test_address(my_c_ptr, 100)
end subroutine test0
end module c_loc_test
-! { dg-final { cleanup-modules "c_loc_test" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_17.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_17.f90
new file mode 100644
index 0000000000..4c2a7d657e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_17.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "" }
+!
+! PR fortran/56378
+! PR fortran/52426
+!
+! Contributed by David Sagan & Joost VandeVondele
+!
+
+module t
+ use, intrinsic :: iso_c_binding
+ interface fvec2vec
+ module procedure int_fvec2vec
+ end interface
+contains
+ function int_fvec2vec (f_vec, n) result (c_vec)
+ integer f_vec(:)
+ integer(c_int), target :: c_vec(n)
+ end function int_fvec2vec
+ subroutine lat_to_c (Fp, C) bind(c)
+ integer, allocatable :: ic(:)
+ call lat_to_c2 (c_loc(fvec2vec(ic, n1_ic))) ! { dg-error "Argument X at .1. to C_LOC shall have either the POINTER or the TARGET attribute" }
+ end subroutine lat_to_c
+end module
+
+use iso_c_binding
+print *, c_loc([1]) ! { dg-error "Argument X at .1. to C_LOC shall have either the POINTER or the TARGET attribute" }
+end
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_18.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_18.f90
new file mode 100644
index 0000000000..b8542002f5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_18.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! PR fortran/39288
+!
+! From IR F03/0129, cf.
+! Fortran 2003, Technical Corrigendum 5
+!
+! Was invalid before.
+
+ SUBROUTINE S(A,I,K)
+ USE ISO_C_BINDING
+ CHARACTER(*),TARGET :: A
+ CHARACTER(:),ALLOCATABLE,TARGET :: B
+ TYPE(C_PTR) P1,P2,P3,P4,P5
+ P1 = C_LOC(A(1:1)) ! *1
+ P2 = C_LOC(A(I:I)) ! *2
+ P3 = C_LOC(A(1:)) ! *3
+ P4 = C_LOC(A(I:K)) ! *4
+ ALLOCATE(CHARACTER(1)::B)
+ P5 = C_LOC(B) ! *5
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_19.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_19.f90
new file mode 100644
index 0000000000..ea62715f33
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_19.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/50269
+!
+Program gf
+ Use iso_c_binding
+ Real( c_double ), Dimension( 1:10 ), Target :: a
+ Call test( a )
+Contains
+ Subroutine test( aa )
+ Real( c_double ), Dimension( : ), Target :: aa
+ Type( c_ptr ), Pointer :: b
+ b = c_loc( aa( 1 ) ) ! was rejected before.
+ b = c_loc( aa ) ! { dg-error "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
+ End Subroutine test
+End Program gf
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_20.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_20.f90
new file mode 100644
index 0000000000..4ff0ca1bac
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_20.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+!
+! PR fortran/38829
+! PR fortran/40963
+! PR fortran/38813
+!
+!
+program testcloc
+ use, intrinsic :: iso_c_binding
+ implicit none
+
+ type obj
+ real :: array(10,10)
+ real, allocatable :: array2(:,:)
+ end type
+
+ type(obj), target :: obj1
+ type(c_ptr) :: cptr
+ integer :: i
+ real, pointer :: array(:)
+
+ allocate (obj1%array2(10,10))
+ obj1%array = reshape ([(i, i=1,100)], shape (obj1%array))
+ obj1%array2 = reshape ([(i, i=1,100)], shape (obj1%array))
+
+ cptr = c_loc (obj1%array)
+ call c_f_pointer (cptr, array, shape=[100])
+ if (any (array /= [(i, i=1,100)])) call abort ()
+
+ cptr = c_loc (obj1%array2)
+ call c_f_pointer (cptr, array, shape=[100])
+ if (any (array /= [(i, i=1,100)])) call abort ()
+end program testcloc
+
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_21.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_21.f90
new file mode 100644
index 0000000000..a31ca034fb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_21.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+
+subroutine foo(a,b,c,d)
+ use iso_c_binding, only: c_loc, c_ptr
+ implicit none
+ real, intent(in), target :: a(:)
+ real, intent(in), target :: b(5)
+ real, intent(in), target :: c(*)
+ real, intent(in), target, allocatable :: d(:)
+ type(c_ptr) :: ptr
+ ptr = C_LOC(b)
+ ptr = C_LOC(c)
+ ptr = C_LOC(d)
+ ptr = C_LOC(a) ! { dg-error "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/c_loc_test_22.f90 b/gcc/testsuite/gfortran.dg/c_loc_test_22.f90
new file mode 100644
index 0000000000..2eea2a5277
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_test_22.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56907
+!
+subroutine sub(xxx, yyy)
+ use iso_c_binding
+ implicit none
+ integer, target, contiguous :: xxx(:)
+ integer, target :: yyy(:)
+ type(c_ptr) :: ptr1, ptr2, ptr3, ptr4
+ ptr1 = c_loc (xxx)
+ ptr2 = c_loc (xxx(5:))
+ ptr3 = c_loc (yyy)
+ ptr4 = c_loc (yyy(5:))
+end
+! { dg-final { scan-tree-dump-not " _gfortran_internal_pack" "original" } }
+! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
+! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.xxx.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
+! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
+! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void .\\) &\\(.yyy.\[0-9\]+\\)\\\[D.\[0-9\]+ \\* 4\\\];" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "D.\[0-9\]+ = parm.\[0-9\]+.data;\[^;]+ptr\[1-4\] = D.\[0-9\]+;" 4 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
index 867ba18cc6..21b8526c2a 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_10.f03
@@ -1,8 +1,9 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
subroutine aaa(in)
use iso_c_binding
implicit none
integer(KIND=C_int), DIMENSION(:), TARGET :: in
type(c_ptr) :: cptr
- cptr = c_loc(in) ! { dg-error "not C interoperable" }
+ cptr = c_loc(in) ! { dg-error "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
end subroutine aaa
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_11.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_11.f03
index 197666d309..c00e5ed164 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_11.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_11.f03
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
! Test argument checking for C_LOC with subcomponent parameters.
module c_vhandle_mod
use iso_c_binding
@@ -29,9 +31,9 @@ contains
integer(c_int), intent(in) :: handle
if (.true.) then ! The ultimate component is an allocatable target
- get_double_vector_address = c_loc(dbv_pool(handle)%v)
+ get_double_vector_address = c_loc(dbv_pool(handle)%v) ! OK: Interop type and allocatable
else
- get_double_vector_address = c_loc(vv)
+ get_double_vector_address = c_loc(vv) ! OK: Interop type and allocatable
endif
end function get_double_vector_address
@@ -39,9 +41,9 @@ contains
type(c_ptr) function get_foo_address(handle)
integer(c_int), intent(in) :: handle
- get_foo_address = c_loc(foo_pool(handle)%v)
+ get_foo_address = c_loc(foo_pool(handle)%v)
- get_foo_address = c_loc(foo_pool2(handle)%v) ! { dg-error "must be a scalar" }
+ get_foo_address = c_loc(foo_pool2(handle)%v) ! { dg-error "TS 29113: Noninteroperable array at .1. as argument to C_LOC: Expression is a noninteroperable derived type" }
end function get_foo_address
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_12.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_12.f03
index 252c1c5274..9ebfd08ec5 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_12.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_12.f03
@@ -23,10 +23,9 @@ program test2
interface
subroutine sub1(argv) bind(c)
import
- type(c_ptr) :: argv
+ type(c_ptr), intent(in) :: argv
end subroutine sub1
end interface
call sub1(c_loc(argv))
end program test2
!
-! { dg-final { cleanup-modules "test1" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90 b/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90
index 63f8816379..c8d5868705 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_15.f90
@@ -11,6 +11,6 @@
type(c_ptr) :: tt_cptr
class(t), pointer :: tt_fptr
- if (associated(tt_fptr)) tt_cptr = c_loc(tt_fptr) ! { dg-error "must not be polymorphic" }
+ if (associated(tt_fptr)) tt_cptr = c_loc(tt_fptr) ! { dg-error "shall not be polymorphic" }
end
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_16.f90 b/gcc/testsuite/gfortran.dg/c_loc_tests_16.f90
index 1c86a1f9c4..55e8d00fa9 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_16.f90
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_16.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-fcoarray=single" }
+! { dg-options "-fcoarray=single -std=f2008" }
! PR 38536 - array sections as arguments to c_loc are illegal.
use iso_c_binding
type, bind(c) :: t1
@@ -18,8 +18,8 @@
integer(c_int), target :: x[*]
type(C_PTR) :: p
- p = c_loc(tt%t%i(1)) ! { dg-error "Array section not permitted" }
- p = c_loc(n(1:2)) ! { dg-warning "Array section" }
- p = c_loc(ttt%t(5,1:2)%i(1)) ! { dg-error "Array section not permitted" }
- p = c_loc(x[1]) ! { dg-error "Coindexed argument not permitted" }
+ p = c_loc(tt%t%i(1))
+ p = c_loc(n(1:2)) ! OK: interop type + contiguous
+ p = c_loc(ttt%t(5,1:2)%i(1)) ! FIXME: Noncontiguous (invalid) - compile-time testable
+ p = c_loc(x[1]) ! { dg-error "shall not be coindexed" }
end
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90 b/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90
new file mode 100644
index 0000000000..5e4eb8affa
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_17.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/55574
+! The following code used to be accepted because C_LOC pulls in C_PTR
+! implicitly.
+!
+! Contributed by Valery Weber <valeryweber@hotmail.com>
+!
+program aaaa
+ use iso_c_binding, only : c_loc
+ integer, target :: i
+ type(C_PTR) :: f_ptr ! { dg-error "being used before it is defined" }
+ f_ptr=c_loc(i) ! { dg-error "Can't convert" }
+end program aaaa
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_2.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_2.f03
index 4bdf395d14..b8e2436b67 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_2.f03
@@ -85,4 +85,3 @@ program driver
call test1()
call test2()
end program driver
-! { dg-final { cleanup-modules "c_loc_tests_2" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_3.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_3.f03
index 95eac4af38..0cd56a6846 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_3.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_3.f03
@@ -3,6 +3,6 @@ use iso_c_binding
implicit none
character(kind=c_char,len=256),target :: arg
type(c_ptr),pointer :: c
-c = c_loc(arg) ! { dg-error "must have a length of 1" }
+c = c_loc(arg) ! OK since Fortran 2003, Tech Corrigenda 5; IR F03/0129
end
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_4.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_4.f03
index 8453ec7727..d45a89156f 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_4.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_4.f03
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
module c_loc_tests_4
use, intrinsic :: iso_c_binding
implicit none
@@ -10,6 +12,6 @@ contains
type(c_ptr) :: my_c_ptr
my_array_ptr => my_array
- my_c_ptr = c_loc(my_array_ptr) ! { dg-error "must be an associated scalar POINTER" }
+ my_c_ptr = c_loc(my_array_ptr) ! { dg-error "Fortran 2008: Array of interoperable type at .1. to C_LOC which is nonallocatable and neither assumed size nor explicit size" }
end subroutine sub0
end module c_loc_tests_4
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_5.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_5.f03
index a389437ce1..48597cb6bd 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_5.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_5.f03
@@ -16,4 +16,3 @@ contains
end subroutine sub0
end module c_loc_tests_5
-! { dg-final { cleanup-modules "c_loc_tests_5" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_6.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_6.f03
index c82a2adbf7..3d830e7a91 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_6.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_6.f03
@@ -10,4 +10,3 @@ SUBROUTINE glutInit_f03()
argv(1)=C_LOC(empty_string)
END SUBROUTINE
end module x
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_7.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_7.f03
index 78f5276bde..cc0ebc365f 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_7.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_7.f03
@@ -8,4 +8,3 @@ SUBROUTINE glutInit_f03()
argv(1)=C_LOC(empty_string)
END SUBROUTINE
end module c_loc_tests_7
-! { dg-final { cleanup-modules "c_loc_tests_7" } }
diff --git a/gcc/testsuite/gfortran.dg/c_loc_tests_8.f03 b/gcc/testsuite/gfortran.dg/c_loc_tests_8.f03
index a094d690bd..4a4e73ee7c 100644
--- a/gcc/testsuite/gfortran.dg/c_loc_tests_8.f03
+++ b/gcc/testsuite/gfortran.dg/c_loc_tests_8.f03
@@ -7,7 +7,7 @@ contains
SUBROUTINE glutInit_f03()
TYPE(C_PTR), DIMENSION(1), TARGET :: argv=C_NULL_PTR
character(kind=c_char, len=5), target :: string="hello"
- argv(1)=C_LOC(string) ! { dg-error "must have a length of 1" }
+ argv(1)=C_LOC(string) ! OK since Fortran 2003, Tech Corrigenda 5; IR F03/0129
END SUBROUTINE
end module x
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests.f03
index f0c9a3329d..0b7c98be71 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests.f03
@@ -42,5 +42,3 @@ module c_ptr_tests
call c_f_pointer(self%myServices, localServices)
end subroutine sub0
end module c_ptr_tests
-
-! { dg-final { cleanup-modules "c_ptr_tests" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03
index fe41622759..4ce1c6809e 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_10.f03
@@ -15,5 +15,3 @@ program main
use c_ptr_tests_10
call sub0()
end program main
-
-! { dg-final { cleanup-modules "c_ptr_tests_10" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_11.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_11.f03
index 9448f82ba8..353a7956b9 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_11.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_11.f03
@@ -38,5 +38,3 @@ contains
type(t), intent(out) :: a
end subroutine func
end module m
-! { dg-final { cleanup-modules "fgsl m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_12.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_12.f03
index 71e8170937..d4ab175ca5 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_12.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_12.f03
@@ -40,6 +40,3 @@ contains
status = fgsl_vector_align(p_x, f_x)
end subroutine expb_df
end module tmod
-
-! { dg-final { cleanup-modules "fgsl tmod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03
index c7a603bcce..020b057fe2 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_13.f03
@@ -10,6 +10,6 @@ program main
integer(C_INTPTR_T) p
type(C_PTR) cptr
p = 0
- cptr = C_PTR(p+1) ! { dg-error "Components of structure constructor" }
- cptr = C_PTR(1) ! { dg-error "Components of structure constructor" }
+ cptr = C_PTR(p+1) ! { dg-error "is a PRIVATE component of 'c_ptr'" }
+ cptr = C_PTR(1) ! { dg-error "is a PRIVATE component of 'c_ptr'" }
end program main
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_14.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_14.f90
index c4101fb030..2bf4262898 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_14.f90
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_14.f90
@@ -39,8 +39,10 @@ program test
if(c_associated(file%gsl_func)) call abort()
end program test
-! { dg-final { scan-tree-dump-times "gsl_file = 0B" 1 "original" } }
-! { dg-final { scan-tree-dump-times "gsl_func = 0B" 1 "original" } }
+! { dg-final { scan-tree-dump-times "c_funptr.\[0-9\]+ = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "fgsl_file.\[0-9\]+.gsl_func = c_funptr.\[0-9\]+;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "c_ptr.\[0-9\]+ = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "fgsl_file.\[0-9\]+.gsl_file = c_ptr.\[0-9\]+;" 1 "original" } }
! { dg-final { scan-tree-dump-times "NIptr = 0B" 0 "original" } }
! { dg-final { scan-tree-dump-times "NIfunptr = 0B" 0 "original" } }
@@ -48,4 +50,3 @@ end program test
! { dg-final { scan-tree-dump-times "bbb =" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90
index 1ce0c15fdf..dec2e8e4ad 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_15.f90
@@ -41,8 +41,10 @@ program test
if(c_associated(file%gsl_func)) call abort()
end program test
-! { dg-final { scan-tree-dump-times "gsl_file = 0B" 1 "original" } }
-! { dg-final { scan-tree-dump-times "gsl_func = 0B" 1 "original" } }
+! { dg-final { scan-tree-dump-times "c_funptr.\[0-9\]+ = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "fgsl_file.\[0-9\]+.gsl_func = c_funptr.\[0-9\]+;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "c_ptr.\[0-9\]+ = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "fgsl_file.\[0-9\]+.gsl_file = c_ptr.\[0-9\]+;" 1 "original" } }
! { dg-final { scan-tree-dump-times "NIptr = 0B" 0 "original" } }
! { dg-final { scan-tree-dump-times "NIfunptr = 0B" 0 "original" } }
@@ -50,4 +52,3 @@ end program test
! { dg-final { scan-tree-dump-times "bbb =" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_17.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_17.f90
index 9bbd0dd41a..05063471c0 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_17.f90
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_17.f90
@@ -84,5 +84,3 @@ function kill_C_FUNPTR() bind(C)
end interface
kill_C_FUNPTR = C_FUNLOC(fun)
end function kill_C_FUNPTR
-
-! { dg-final { cleanup-modules "m3 m1" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_18.f90 b/gcc/testsuite/gfortran.dg/c_ptr_tests_18.f90
index 6239516ec2..ae6fd98b91 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_18.f90
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_18.f90
@@ -31,5 +31,3 @@ program cfpointerstress
write(*,*) 'ASSOCIATED =', associated(img)
deallocate(r)
end program cfpointerstress
-
-! { dg-final { cleanup-modules "nag_j_types" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_7.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_7.f03
index 04cb8b22ab..38768b141d 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_7.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_7.f03
@@ -9,4 +9,3 @@ contains
func0 = c_null_ptr
end function func0
end module c_ptr_tests_7
-! { dg-final { cleanup-modules "c_ptr_tests_7" } }
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c b/gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c
index 2ad0121165..dceec33063 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_8_funcs.c
@@ -1,4 +1,4 @@
-/* This file provides auxilliary functions for c_ptr_tests_8. */
+/* This file provides auxiliary functions for c_ptr_tests_8. */
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03 b/gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03
index f723492643..5a32553b8c 100644
--- a/gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03
+++ b/gcc/testsuite/gfortran.dg/c_ptr_tests_9.f03
@@ -16,9 +16,9 @@ contains
type(myF90Derived), pointer :: my_f90_type_ptr
my_f90_type%my_c_ptr = c_null_ptr
- print *, 'my_f90_type is: ', my_f90_type
+ print *, 'my_f90_type is: ', my_f90_type%my_c_ptr
my_f90_type_ptr => my_f90_type
- print *, 'my_f90_type_ptr is: ', my_f90_type_ptr
+ print *, 'my_f90_type_ptr is: ', my_f90_type_ptr%my_c_ptr
end subroutine sub0
end module c_ptr_tests_9
@@ -28,5 +28,3 @@ program main
call sub0()
end program main
-
-! { dg-final { cleanup-modules "c_ptr_tests_9" } }
diff --git a/gcc/testsuite/gfortran.dg/c_size_t_test.f03 b/gcc/testsuite/gfortran.dg/c_size_t_test.f03
index 68064d78b0..91d7aa57b0 100644
--- a/gcc/testsuite/gfortran.dg/c_size_t_test.f03
+++ b/gcc/testsuite/gfortran.dg/c_size_t_test.f03
@@ -14,5 +14,3 @@ contains
end if
end subroutine sub0
end module c_size_t_test
-
-! { dg-final { cleanup-modules "c_size_t_test" } }
diff --git a/gcc/testsuite/gfortran.dg/c_sizeof_1.f90 b/gcc/testsuite/gfortran.dg/c_sizeof_1.f90
index e0ac06f940..4a8385b8d8 100644
--- a/gcc/testsuite/gfortran.dg/c_sizeof_1.f90
+++ b/gcc/testsuite/gfortran.dg/c_sizeof_1.f90
@@ -4,7 +4,8 @@
use iso_c_binding, only: c_int, c_char, c_ptr, c_intptr_t, c_null_ptr, c_sizeof
integer(kind=c_int) :: i, j(10)
-character(kind=c_char,len=4),parameter :: str(1) = "abcd"
+character(kind=c_char,len=4),parameter :: str(1 ) = "abcd"
+character(kind=c_char,len=1),parameter :: str2(4) = ["a","b","c","d"]
type(c_ptr) :: cptr
integer(c_intptr_t) :: iptr
@@ -15,13 +16,13 @@ if (i /= 4) call abort()
i = c_sizeof(j)
if (i /= 40) call abort()
-i = c_sizeof(str)
+i = c_sizeof(str2)
if (i /= 4) call abort()
-i = c_sizeof(str(1))
-if (i /= 4) call abort()
+i = c_sizeof(str2(1))
+if (i /= 1) call abort()
-i = c_sizeof(str(1)(1:3))
+i = c_sizeof(str2(1:3))
if (i /= 3) call abort()
write(*,*) c_sizeof(cptr), c_sizeof(iptr), c_sizeof(C_NULL_PTR)
diff --git a/gcc/testsuite/gfortran.dg/c_sizeof_5.f90 b/gcc/testsuite/gfortran.dg/c_sizeof_5.f90
new file mode 100644
index 0000000000..127a24ab6a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/c_sizeof_5.f90
@@ -0,0 +1,12 @@
+! { dg-do run }
+! { dg-options "-fcray-pointer" }
+!
+use iso_c_binding
+real target(10)
+real pointee(10)
+pointer (ipt, pointee)
+integer(c_intptr_t) :: int_cptr
+real :: x
+if (c_sizeof(ipt) /= c_sizeof(int_cptr)) call abort()
+if (c_sizeof(pointee) /= c_sizeof(x)*10) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/char_array_constructor.f90 b/gcc/testsuite/gfortran.dg/char_array_constructor.f90
index 5f562e9fa6..2cf3ae722c 100644
--- a/gcc/testsuite/gfortran.dg/char_array_constructor.f90
+++ b/gcc/testsuite/gfortran.dg/char_array_constructor.f90
@@ -12,5 +12,3 @@ program y
if (b(1) /= 'abcd ') call abort
if (b(2) /= 'efghij') call abort
end program y
-
-! { dg-final { cleanup-modules "z" } }
diff --git a/gcc/testsuite/gfortran.dg/char_array_constructor_2.f90 b/gcc/testsuite/gfortran.dg/char_array_constructor_2.f90
index 766eb52903..d6abc260ca 100644
--- a/gcc/testsuite/gfortran.dg/char_array_constructor_2.f90
+++ b/gcc/testsuite/gfortran.dg/char_array_constructor_2.f90
@@ -11,4 +11,3 @@ end module foomod
use foomod
print *, aa, bb
end
-! { dg-final { cleanup-modules "foomod" } }
diff --git a/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90 b/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90
index 22669363e0..cfe787b537 100644
--- a/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90
+++ b/gcc/testsuite/gfortran.dg/char_array_structure_constructor.f90
@@ -31,5 +31,3 @@ contains
ENDDO
end subroutine alloc
END program char_array_structure_constructor
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/char_length_13.f90 b/gcc/testsuite/gfortran.dg/char_length_13.f90
index 576d5be777..dd5c05a858 100644
--- a/gcc/testsuite/gfortran.dg/char_length_13.f90
+++ b/gcc/testsuite/gfortran.dg/char_length_13.f90
@@ -32,5 +32,3 @@ program main
use bar
call xmain()
end program main
-
-! { dg-final { cleanup-modules "bar" } }
diff --git a/gcc/testsuite/gfortran.dg/char_length_19.f90 b/gcc/testsuite/gfortran.dg/char_length_19.f90
new file mode 100644
index 0000000000..e52d018b7c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/char_length_19.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+!
+! PR fortran/58579
+!
+! Contributed by Joost VandeVondele
+!
+! Was ICEing before due to the patch for PR 58593
+!
+ subroutine test
+ CHARACTER(len=20) :: tmpStr
+ CHARACTER(len=20, kind=4) :: tmpStr4
+ INTEGER :: output_unit=6
+ WRITE (UNIT=output_unit,FMT="(T2,A,T61,A20)")&
+ "DFT| Self-interaction correction (SIC)",ADJUSTR(TRIM(tmpstr))
+ WRITE (UNIT=output_unit,FMT="(T2,A,T61,A20)")&
+ 4_"DFT| Self-interaction correction (SIC)",ADJUSTR(TRIM(tmpstr4))
+ END
+
+!
+! PR fortran/58593
+! Contributed by Albert Bartok
+!
+! The PR was overallocating memory. I placed it here to check for a
+! variant of the test case above, which takes a slightly differnt code
+! patch. Thus, its purpose is just to ensure that it won't ICE.
+!
+program test_char
+
+ implicit none
+ integer :: i
+
+ read*, i
+ print*, trim(test(i))
+
+ contains
+
+ function test(i)
+ integer, intent(in) :: i
+ character(len=i) :: test
+
+ test(1:1) = "A"
+ endfunction test
+
+endprogram test_char
diff --git a/gcc/testsuite/gfortran.dg/char_length_5.f90 b/gcc/testsuite/gfortran.dg/char_length_5.f90
index 03a4d85602..929f01b22b 100644
--- a/gcc/testsuite/gfortran.dg/char_length_5.f90
+++ b/gcc/testsuite/gfortran.dg/char_length_5.f90
@@ -58,4 +58,3 @@ program xjoin
if (len (join (words2(2:4:2), sep2)) .ne. 10) call abort ()
end program xjoin
-! { dg-final { cleanup-modules "util_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/char_length_7.f90 b/gcc/testsuite/gfortran.dg/char_length_7.f90
index 221c84090f..d9c1b38744 100644
--- a/gcc/testsuite/gfortran.dg/char_length_7.f90
+++ b/gcc/testsuite/gfortran.dg/char_length_7.f90
@@ -29,4 +29,3 @@ program xx
! This was another bug, uncovered when the PR was fixed.
if (any(ccopy(z//mz(:)(i:j)) .ne. (/"zzgh ","zzjk "/))) call abort ()
end program xx
-! { dg-final { cleanup-modules "str_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/char_length_9.f90 b/gcc/testsuite/gfortran.dg/char_length_9.f90
index dbec68cd8c..36f724a0e0 100644
--- a/gcc/testsuite/gfortran.dg/char_length_9.f90
+++ b/gcc/testsuite/gfortran.dg/char_length_9.f90
@@ -18,5 +18,3 @@ CONTAINS
val%c_val(i)(1:MIN (80, l_out-(i-1)*default_string_length))
END SUBROUTINE val_get
END MODULE input_val_types
-
-! { dg-final { cleanup-modules "input_val_types" } }
diff --git a/gcc/testsuite/gfortran.dg/char_result_11.f90 b/gcc/testsuite/gfortran.dg/char_result_11.f90
index 75e68f1ef4..c37b20eb75 100644
--- a/gcc/testsuite/gfortran.dg/char_result_11.f90
+++ b/gcc/testsuite/gfortran.dg/char_result_11.f90
@@ -113,5 +113,3 @@ program test
print *, str
end program test
-
-! { dg-final { cleanup-modules "cutils" } }
diff --git a/gcc/testsuite/gfortran.dg/char_result_13.f90 b/gcc/testsuite/gfortran.dg/char_result_13.f90
index 741d55f166..638d6381e1 100644
--- a/gcc/testsuite/gfortran.dg/char_result_13.f90
+++ b/gcc/testsuite/gfortran.dg/char_result_13.f90
@@ -45,5 +45,3 @@ end module abc
use abc
call xmain(3, 2)
end
-! { dg-final { cleanup-modules "abc" } }
-
diff --git a/gcc/testsuite/gfortran.dg/char_result_9.f90 b/gcc/testsuite/gfortran.dg/char_result_9.f90
index 062901e1be..e32df0e01b 100644
--- a/gcc/testsuite/gfortran.dg/char_result_9.f90
+++ b/gcc/testsuite/gfortran.dg/char_result_9.f90
@@ -22,5 +22,3 @@ program huj
s = s_to_c(c)
end program huj
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/character_assign_1.f90 b/gcc/testsuite/gfortran.dg/character_assign_1.f90
index a4e073299b..02625ad5dc 100644
--- a/gcc/testsuite/gfortran.dg/character_assign_1.f90
+++ b/gcc/testsuite/gfortran.dg/character_assign_1.f90
@@ -14,4 +14,3 @@ CONTAINS
TDA1L(NF1:NF2:NF1)%C = TDA1L(NF0+2:NF3:NF2/2)%C
END SUBROUTINE
END MODULE TESTS
-! { dg-final { cleanup-modules "tests" } }
diff --git a/gcc/testsuite/gfortran.dg/character_comparison_3.f90 b/gcc/testsuite/gfortran.dg/character_comparison_3.f90
index dbcdbefb20..c5acace53a 100644
--- a/gcc/testsuite/gfortran.dg/character_comparison_3.f90
+++ b/gcc/testsuite/gfortran.dg/character_comparison_3.f90
@@ -25,6 +25,7 @@ program main
if (c(:k3) == c(:k44)) call abort
end program main
-! { dg-final { scan-tree-dump-times "gfortran_compare_string" 8 "original" } }
+! { dg-final { scan-tree-dump-times "gfortran_compare_string" 6 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_memcmp" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/character_comparison_5.f90 b/gcc/testsuite/gfortran.dg/character_comparison_5.f90
index b9ad921579..08af59a579 100644
--- a/gcc/testsuite/gfortran.dg/character_comparison_5.f90
+++ b/gcc/testsuite/gfortran.dg/character_comparison_5.f90
@@ -16,6 +16,6 @@ program main
end program main
! { dg-final { scan-tree-dump-times "gfortran_concat_string" 0 "original" } }
-! { dg-final { scan-tree-dump-times "gfortran_compare_string" 2 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_memcmp" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/character_comparison_9.f90 b/gcc/testsuite/gfortran.dg/character_comparison_9.f90
new file mode 100644
index 0000000000..9d17b3c99c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/character_comparison_9.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+program main
+ character (len=2) :: a, b
+ character (kind=4,len=4) :: c,d
+ a = 'ab'
+ b = 'aa'
+ if (a < b) call abort
+ c = 4_"aaaa"
+ d = 4_"aaab"
+ if (c == d) call abort
+ if (c > d) call abort
+end program main
+! { dg-final { scan-tree-dump-times "_gfortran_compare_string_char4" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_memcmp" 2 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_10.f03 b/gcc/testsuite/gfortran.dg/class_10.f03
index f238a597a6..1e3b8547bb 100644
--- a/gcc/testsuite/gfortran.dg/class_10.f03
+++ b/gcc/testsuite/gfortran.dg/class_10.f03
@@ -28,5 +28,3 @@ end module
class(gradient_class), pointer :: g_initial, ip_save
ip_save => g_initial%inner_product() ! ICE
end
-
-! { dg-final { cleanup-modules "abstract_gradient" } }
diff --git a/gcc/testsuite/gfortran.dg/class_12.f03 b/gcc/testsuite/gfortran.dg/class_12.f03
index 56c68a5778..312ca572de 100644
--- a/gcc/testsuite/gfortran.dg/class_12.f03
+++ b/gcc/testsuite/gfortran.dg/class_12.f03
@@ -41,5 +41,3 @@ contains
operand = operand%product(scale)
end subroutine
end module
-
-! { dg-final { cleanup-modules "abstract_algebra" } }
diff --git a/gcc/testsuite/gfortran.dg/class_13.f03 b/gcc/testsuite/gfortran.dg/class_13.f03
index 84073bf227..d83a856104 100644
--- a/gcc/testsuite/gfortran.dg/class_13.f03
+++ b/gcc/testsuite/gfortran.dg/class_13.f03
@@ -34,4 +34,3 @@ contains
end function
end module concrete_inner_product
-! { dg-final { cleanup-modules "concrete_vector concrete_gradient concrete_inner_product" } }
diff --git a/gcc/testsuite/gfortran.dg/class_14.f03 b/gcc/testsuite/gfortran.dg/class_14.f03
index 4e6db17c96..5116c661b9 100644
--- a/gcc/testsuite/gfortran.dg/class_14.f03
+++ b/gcc/testsuite/gfortran.dg/class_14.f03
@@ -50,5 +50,3 @@ module concrete_inner_product
use concrete_gradient
implicit none
end module concrete_inner_product
-! { dg-final { cleanup-modules "abstract_vector concrete_vector" } }
-! { dg-final { cleanup-modules "concrete_gradient concrete_inner_product" } }
diff --git a/gcc/testsuite/gfortran.dg/class_15.f03 b/gcc/testsuite/gfortran.dg/class_15.f03
index 4520a5996f..1fc7ce4a24 100644
--- a/gcc/testsuite/gfortran.dg/class_15.f03
+++ b/gcc/testsuite/gfortran.dg/class_15.f03
@@ -39,5 +39,3 @@ module mod_D
use mod_A
use mod_C
end module
-
-! { dg-final { cleanup-modules "mod_a mod_b mod_c mod_d" } }
diff --git a/gcc/testsuite/gfortran.dg/class_16.f03 b/gcc/testsuite/gfortran.dg/class_16.f03
index 7d0d38f80b..136097b41c 100644
--- a/gcc/testsuite/gfortran.dg/class_16.f03
+++ b/gcc/testsuite/gfortran.dg/class_16.f03
@@ -19,5 +19,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "m_rotation_matrix" } }
diff --git a/gcc/testsuite/gfortran.dg/class_17.f03 b/gcc/testsuite/gfortran.dg/class_17.f03
index b015c1319f..0c5c23884d 100644
--- a/gcc/testsuite/gfortran.dg/class_17.f03
+++ b/gcc/testsuite/gfortran.dg/class_17.f03
@@ -60,5 +60,3 @@ module b_module
end type b_type
end module b_module
-
-! { dg-final { cleanup-modules "error_stack_module b_module" } }
diff --git a/gcc/testsuite/gfortran.dg/class_19.f03 b/gcc/testsuite/gfortran.dg/class_19.f03
index 27ee7b4e2c..428015c99e 100644
--- a/gcc/testsuite/gfortran.dg/class_19.f03
+++ b/gcc/testsuite/gfortran.dg/class_19.f03
@@ -39,7 +39,5 @@ program main
end program main
-! { dg-final { scan-tree-dump-times "__builtin_free" 11 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_free" 12 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-
-! { dg-final { cleanup-modules "foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/class_21.f03 b/gcc/testsuite/gfortran.dg/class_21.f03
index 93b9616aee..4a7135d3bb 100644
--- a/gcc/testsuite/gfortran.dg/class_21.f03
+++ b/gcc/testsuite/gfortran.dg/class_21.f03
@@ -14,5 +14,3 @@ module m
type(t),save :: default_t
end module
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_22.f03 b/gcc/testsuite/gfortran.dg/class_22.f03
index df68783b4a..7e179f4215 100644
--- a/gcc/testsuite/gfortran.dg/class_22.f03
+++ b/gcc/testsuite/gfortran.dg/class_22.f03
@@ -27,5 +27,3 @@ contains
end subroutine ice_proc
end module ice_module
-
-! { dg-final { cleanup-modules "ice_module" } }
diff --git a/gcc/testsuite/gfortran.dg/class_25.f03 b/gcc/testsuite/gfortran.dg/class_25.f03
index 3588b7759e..4c3563ccb6 100644
--- a/gcc/testsuite/gfortran.dg/class_25.f03
+++ b/gcc/testsuite/gfortran.dg/class_25.f03
@@ -24,5 +24,3 @@ contains
end module
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_26.f03 b/gcc/testsuite/gfortran.dg/class_26.f03
index 629c9c98e4..ed4a2690cf 100644
--- a/gcc/testsuite/gfortran.dg/class_26.f03
+++ b/gcc/testsuite/gfortran.dg/class_26.f03
@@ -26,4 +26,3 @@ end module
end
-! { dg-final { cleanup-modules "s_mat_mod s_tester" } }
diff --git a/gcc/testsuite/gfortran.dg/class_27.f03 b/gcc/testsuite/gfortran.dg/class_27.f03
index 3525dc467b..a3f2c882e2 100644
--- a/gcc/testsuite/gfortran.dg/class_27.f03
+++ b/gcc/testsuite/gfortran.dg/class_27.f03
@@ -63,5 +63,3 @@ module type1_type
endif
end function Type1_initProc
end module type1_type
-
-! { dg-final { cleanup-modules "type2_type extended2a_type type1_type" } }
diff --git a/gcc/testsuite/gfortran.dg/class_28.f03 b/gcc/testsuite/gfortran.dg/class_28.f03
index 684b8cdab7..258633df45 100644
--- a/gcc/testsuite/gfortran.dg/class_28.f03
+++ b/gcc/testsuite/gfortran.dg/class_28.f03
@@ -41,5 +41,3 @@ program p
allocate(x(1))
end program p
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_29.f03 b/gcc/testsuite/gfortran.dg/class_29.f03
index d5ed8fae35..b27793f908 100644
--- a/gcc/testsuite/gfortran.dg/class_29.f03
+++ b/gcc/testsuite/gfortran.dg/class_29.f03
@@ -30,5 +30,3 @@ allocate (t2 :: y)
print *, x%a
print *, y%b
end
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_30.f90 b/gcc/testsuite/gfortran.dg/class_30.f90
index f2cedcb976..343c0d6139 100644
--- a/gcc/testsuite/gfortran.dg/class_30.f90
+++ b/gcc/testsuite/gfortran.dg/class_30.f90
@@ -15,7 +15,6 @@ end type t2
type, bind(C):: t3
class(t), pointer :: y
- ! { dg-warning "may not be C interoperable" "" { target *-*-* } 17 }
! { dg-error "Polymorphic component y at .1. in SEQUENCE or BIND" "" { target *-*-* } 17 }
end type t3
end
diff --git a/gcc/testsuite/gfortran.dg/class_32.f90 b/gcc/testsuite/gfortran.dg/class_32.f90
index b5857c1f64..c388be42fc 100644
--- a/gcc/testsuite/gfortran.dg/class_32.f90
+++ b/gcc/testsuite/gfortran.dg/class_32.f90
@@ -37,5 +37,3 @@ END MODULE
PROGRAM p
USE m
END
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_33.f90 b/gcc/testsuite/gfortran.dg/class_33.f90
index 7c3c197262..c2bd4e4293 100644
--- a/gcc/testsuite/gfortran.dg/class_33.f90
+++ b/gcc/testsuite/gfortran.dg/class_33.f90
@@ -9,5 +9,3 @@ module Molecular_Abundances_Structure
end type
class(molecularAbundancesStructure), pointer :: molecules
end module
-
-! { dg-final { cleanup-modules "molecular_abundances_structure" } }
diff --git a/gcc/testsuite/gfortran.dg/class_34.f90 b/gcc/testsuite/gfortran.dg/class_34.f90
index ecdb4ddc80..3375396aa6 100644
--- a/gcc/testsuite/gfortran.dg/class_34.f90
+++ b/gcc/testsuite/gfortran.dg/class_34.f90
@@ -20,5 +20,3 @@ module m2
end module
end
-
-! { dg-final { cleanup-modules "m0 m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_35.f90 b/gcc/testsuite/gfortran.dg/class_35.f90
index 1b5502a787..87a5c87129 100644
--- a/gcc/testsuite/gfortran.dg/class_35.f90
+++ b/gcc/testsuite/gfortran.dg/class_35.f90
@@ -22,5 +22,3 @@ class(three), allocatable :: a2
if (same_type_as(a1,a2)) call abort()
end
-
-! { dg-final { cleanup-modules "one one_two" } }
diff --git a/gcc/testsuite/gfortran.dg/class_37.f03 b/gcc/testsuite/gfortran.dg/class_37.f03
index e3ff8ce8d0..1d75999626 100644
--- a/gcc/testsuite/gfortran.dg/class_37.f03
+++ b/gcc/testsuite/gfortran.dg/class_37.f03
@@ -259,5 +259,3 @@ subroutine psb_cdall(ictxt, desc, info,mg,ng,vg,vl,flag,nl,repl, globalcheck)
return
end subroutine psb_cdall
-
-! { dg-final { cleanup-modules "psb_penv_mod psb_indx_map_mod psb_gen_block_map_mod psb_descriptor_type psb_cd_if_tools_mod psb_cd_tools_mod psb_base_tools_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/class_39.f03 b/gcc/testsuite/gfortran.dg/class_39.f03
index 6fe762ba35..c29a3b06a6 100644
--- a/gcc/testsuite/gfortran.dg/class_39.f03
+++ b/gcc/testsuite/gfortran.dg/class_39.f03
@@ -8,6 +8,6 @@
end type T
contains
class(T) function add() ! { dg-error "must be dummy, allocatable or pointer" }
- add = 1 ! { dg-error "Variable must not be polymorphic in intrinsic assignment" }
+ add = 1 ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" }
end function
end
diff --git a/gcc/testsuite/gfortran.dg/class_40.f03 b/gcc/testsuite/gfortran.dg/class_40.f03
index dde1acdc32..b6214a9e60 100644
--- a/gcc/testsuite/gfortran.dg/class_40.f03
+++ b/gcc/testsuite/gfortran.dg/class_40.f03
@@ -32,5 +32,3 @@ program test
type(treeNode) :: node
call walk (node)
end program
-
-! { dg-final { cleanup-modules "tree_nodes merger_trees merger_tree_build" } }
diff --git a/gcc/testsuite/gfortran.dg/class_41.f03 b/gcc/testsuite/gfortran.dg/class_41.f03
index bcab2b4cee..5c24fe1be5 100644
--- a/gcc/testsuite/gfortran.dg/class_41.f03
+++ b/gcc/testsuite/gfortran.dg/class_41.f03
@@ -20,5 +20,3 @@ contains
print *,a_string(this)
end subroutine b_sub
end module a_module
-
-! { dg-final { cleanup-modules "a_module" } }
diff --git a/gcc/testsuite/gfortran.dg/class_42.f03 b/gcc/testsuite/gfortran.dg/class_42.f03
index cd3047fb88..10acf3bd8b 100644
--- a/gcc/testsuite/gfortran.dg/class_42.f03
+++ b/gcc/testsuite/gfortran.dg/class_42.f03
@@ -12,5 +12,3 @@ contains
class(Overload_AnException_impl_t) :: self
end subroutine
end module
-
-! { dg-final { cleanup-modules "overload_anexception_impl" } }
diff --git a/gcc/testsuite/gfortran.dg/class_45a.f03 b/gcc/testsuite/gfortran.dg/class_45a.f03
index 91f11c4ecc..c3c9ac20e8 100644
--- a/gcc/testsuite/gfortran.dg/class_45a.f03
+++ b/gcc/testsuite/gfortran.dg/class_45a.f03
@@ -26,3 +26,4 @@ contains
end function basicGet
end module G_Nodes
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/class_45b.f03 b/gcc/testsuite/gfortran.dg/class_45b.f03
index ed0d67435c..5c047e2c59 100644
--- a/gcc/testsuite/gfortran.dg/class_45b.f03
+++ b/gcc/testsuite/gfortran.dg/class_45b.f03
@@ -10,5 +10,3 @@ program Test
class(t0), allocatable :: c
allocate(t1 :: c)
end program Test
-
-! { dg-final { cleanup-modules "G_Nodes" } }
diff --git a/gcc/testsuite/gfortran.dg/class_46.f03 b/gcc/testsuite/gfortran.dg/class_46.f03
index 4719c252f6..ef718db25d 100644
--- a/gcc/testsuite/gfortran.dg/class_46.f03
+++ b/gcc/testsuite/gfortran.dg/class_46.f03
@@ -14,5 +14,3 @@ use m
implicit none
if (allocated(x)) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_47.f90 b/gcc/testsuite/gfortran.dg/class_47.f90
index 90a7560bc5..56f342e076 100644
--- a/gcc/testsuite/gfortran.dg/class_47.f90
+++ b/gcc/testsuite/gfortran.dg/class_47.f90
@@ -36,5 +36,3 @@ PROGRAM main
call test(sparseMatrix)
END PROGRAM
-
-! { dg-final { cleanup-modules "m_sparsematrix m_subroutine" } }
diff --git a/gcc/testsuite/gfortran.dg/class_4a.f03 b/gcc/testsuite/gfortran.dg/class_4a.f03
index 3cf0b7abf5..9441cc79ca 100644
--- a/gcc/testsuite/gfortran.dg/class_4a.f03
+++ b/gcc/testsuite/gfortran.dg/class_4a.f03
@@ -12,3 +12,4 @@ module m
type t
end type t
end module m
+! { dg-final { keep-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_4b.f03 b/gcc/testsuite/gfortran.dg/class_4b.f03
index 4658b8cf3f..a5d914a523 100644
--- a/gcc/testsuite/gfortran.dg/class_4b.f03
+++ b/gcc/testsuite/gfortran.dg/class_4b.f03
@@ -13,3 +13,4 @@ module m2
type, extends(t) :: t2
end type t2
end module m2
+! { dg-final { keep-modules "m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_4c.f03 b/gcc/testsuite/gfortran.dg/class_4c.f03
index c28a32b0fc..088acae6b3 100644
--- a/gcc/testsuite/gfortran.dg/class_4c.f03
+++ b/gcc/testsuite/gfortran.dg/class_4c.f03
@@ -27,5 +27,4 @@
end select
print *, i
end
-
-! { dg-final { cleanup-modules "m m2 m3" } }
+! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_5.f03 b/gcc/testsuite/gfortran.dg/class_5.f03
index 087d745aec..0307cae4f8 100644
--- a/gcc/testsuite/gfortran.dg/class_5.f03
+++ b/gcc/testsuite/gfortran.dg/class_5.f03
@@ -20,7 +20,7 @@
x = t2(45,478)
allocate(t2 :: cp)
- cp = x ! { dg-error "Variable must not be polymorphic" }
+ cp = x ! { dg-error "Nonallocatable variable must not be polymorphic" }
select type (cp)
type is (t2)
@@ -28,4 +28,3 @@
end select
end
- \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/class_51.f90 b/gcc/testsuite/gfortran.dg/class_51.f90
new file mode 100644
index 0000000000..1fdad92dd0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_51.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/52270
+!
+! From IR F08/0073 by Malcolm Cohen
+!
+
+ Program m013
+ Type t
+ Real c
+ End Type
+ Type(t),Target :: x
+ Call sub(x)
+ Print *,x%c
+ if (x%c /= 3) call abort ()
+ Contains
+ Subroutine sub(p)
+ Class(t),Pointer,Intent(In) :: p
+ p%c = 3
+ End Subroutine
+ End Program
+
+! { dg-final { scan-tree-dump-times "sub \\(&class" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_52.f90 b/gcc/testsuite/gfortran.dg/class_52.f90
new file mode 100644
index 0000000000..42cb86db4a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_52.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/52270
+!
+! From IR F08/0073 by Malcolm Cohen
+!
+
+ Program m013
+ Type t
+ Real c
+ End Type
+ Type(t),Target :: x
+ Call sub(x) ! { dg-error "Fortran 2008: Non-pointer actual argument" }
+ Print *,x%c
+ if (x%c /= 3) call abort ()
+ Contains
+ Subroutine sub(p)
+ Class(t),Pointer,Intent(In) :: p
+ p%c = 3
+ End Subroutine
+ End Program
+
diff --git a/gcc/testsuite/gfortran.dg/class_53.f90 b/gcc/testsuite/gfortran.dg/class_53.f90
new file mode 100644
index 0000000000..83f55712d0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_53.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR 54778: [OOP] an ICE on invalid OO code
+!
+! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
+
+implicit none
+
+type :: arr_t
+ real :: at
+end type
+
+type(arr_t) :: this
+class(arr_t) :: elem ! { dg-error "must be dummy, allocatable or pointer" }
+
+elem = this ! { dg-error "Nonallocatable variable must not be polymorphic in intrinsic assignment" }
+
+end
diff --git a/gcc/testsuite/gfortran.dg/class_54.f90 b/gcc/testsuite/gfortran.dg/class_54.f90
new file mode 100644
index 0000000000..39c306c83d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_54.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR 53718: [4.7/4.8 regression] [OOP] gfortran generates asm label twice in the same output file
+!
+! Contributed by Adrian Prantl <adrian@llnl.gov>
+
+module m
+ type t
+ end type
+end module
+
+subroutine sub1
+ use m
+ class(t), pointer :: a1
+end subroutine
+
+subroutine sub2
+ use m
+ class(t), pointer :: a2
+end subroutine
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_56.f90 b/gcc/testsuite/gfortran.dg/class_56.f90
index 7ec4bda4a4..26df798f41 100644
--- a/gcc/testsuite/gfortran.dg/class_56.f90
+++ b/gcc/testsuite/gfortran.dg/class_56.f90
@@ -19,3 +19,4 @@ contains
class(Container), intent(inout):: self
end subroutine proc
end module lib_container
+
diff --git a/gcc/testsuite/gfortran.dg/class_57.f90 b/gcc/testsuite/gfortran.dg/class_57.f90
new file mode 100644
index 0000000000..7256dfc4d2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_57.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR 59502: [OOP] ICE on invalid on pointer assignment to non-pointer CLASS
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+ implicit none
+
+ type :: d
+ end type
+
+ type :: p
+ class(d) :: cc ! { dg-error "must be allocatable or pointer" }
+ end type
+
+contains
+
+ function pc(pd)
+ type(p) :: pc
+ class(d), intent(in), target :: pd
+ pc%cc => pd ! { dg-error "Non-POINTER in pointer association context" }
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/class_7.f03 b/gcc/testsuite/gfortran.dg/class_7.f03
index d7f1c835ef..99fbf6fc69 100644
--- a/gcc/testsuite/gfortran.dg/class_7.f03
+++ b/gcc/testsuite/gfortran.dg/class_7.f03
@@ -9,8 +9,7 @@
end type t0
type t
integer :: i
-! FIXME: uncomment and dejagnuify once class arrays are enabled
-! class(t0), allocatable :: foo(3) ! { "deferred shape" }
+ class(t0), allocatable :: foo(3) ! { dg-error "deferred shape" }
end type t
! PR41608: Would ICE on missing type decl
diff --git a/gcc/testsuite/gfortran.dg/class_9.f03 b/gcc/testsuite/gfortran.dg/class_9.f03
index 5dbd4597ab..0e6509c050 100644
--- a/gcc/testsuite/gfortran.dg/class_9.f03
+++ b/gcc/testsuite/gfortran.dg/class_9.f03
@@ -65,4 +65,3 @@ end
allocate(x)
call s (x)
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_10.f03 b/gcc/testsuite/gfortran.dg/class_allocate_10.f03
index d3afa395ec..2e4f3b8aa3 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_10.f03
+++ b/gcc/testsuite/gfortran.dg/class_allocate_10.f03
@@ -60,5 +60,3 @@ program main
type is (integrand); if (any (kernel1%variable .ne. [3,4,5])) call abort
end select
end program
-! { dg-final { cleanup-modules "show_producer_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_11.f03 b/gcc/testsuite/gfortran.dg/class_allocate_11.f03
index e36e810aba..b8422c0f9f 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_11.f03
+++ b/gcc/testsuite/gfortran.dg/class_allocate_11.f03
@@ -58,5 +58,3 @@ program prog
end if
end select
end program prog
-! { dg-final { cleanup-modules "generic_deferred" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_12.f90 b/gcc/testsuite/gfortran.dg/class_allocate_12.f90
index 2dce84e613..d50943d5e4 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_12.f90
+++ b/gcc/testsuite/gfortran.dg/class_allocate_12.f90
@@ -88,5 +88,3 @@ program main
attractor = constructor( [1., 1., 1.] , timed_lorenz_integrator)
call integrate(attractor)
end program main
-
-! { dg-final { cleanup-modules "surrogate_module strategy_module integrand_module runge_kutta_2nd_module" } }
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_14.f90 b/gcc/testsuite/gfortran.dg/class_allocate_14.f90
new file mode 100644
index 0000000000..0c7aeb432d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_allocate_14.f90
@@ -0,0 +1,31 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56845
+!
+module m
+type t
+integer ::a
+end type t
+contains
+subroutine sub
+ type(t), save, allocatable :: x
+ class(t), save,allocatable :: y
+ if (.not. same_type_as(x,y)) call abort()
+end subroutine sub
+subroutine sub2
+ type(t), save, allocatable :: a(:)
+ class(t), save,allocatable :: b(:)
+ if (.not. same_type_as(a,b)) call abort()
+end subroutine sub2
+end module m
+
+use m
+call sub()
+call sub2()
+end
+
+! { dg-final { scan-tree-dump-times "static struct __class_m_T_1_0a b = {._data={.data=0B}, ._vptr=&__vtab_m_T};" 1 "original" } }
+! { dg-final { scan-tree-dump-times "static struct __class_m_T_a y = {._data=0B, ._vptr=&__vtab_m_T};" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_15.f90 b/gcc/testsuite/gfortran.dg/class_allocate_15.f90
new file mode 100644
index 0000000000..07c1cb49db
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_allocate_15.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original -fdump-tree-original -fmax-stack-var-size=1" }
+!
+! PR fortran/56845
+!
+type t
+end type t
+type, extends(t) :: t2
+end type t2
+type(t) :: y
+call foo()
+call bar()
+contains
+ subroutine foo()
+ class(t), allocatable :: x
+ if(allocated(x)) call abort()
+ if(.not.same_type_as(x,y)) call abort()
+ allocate (t2 :: x)
+ end
+ subroutine bar()
+ class(t), allocatable :: x(:)
+ if(allocated(x)) call abort()
+ if(.not.same_type_as(x,y)) call abort()
+ allocate (t2 :: x(4))
+ end
+end
+! { dg-final { scan-tree-dump-times "__builtin_free" 2 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_16.f90 b/gcc/testsuite/gfortran.dg/class_allocate_16.f90
new file mode 100644
index 0000000000..28776084d8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_allocate_16.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR 59589: [4.9 Regression] [OOP] Memory leak when deallocating polymorphic
+!
+! Contributed by Rich Townsend <townsend@astro.wisc.edu>
+
+ implicit none
+
+ type :: foo
+ real, allocatable :: x(:)
+ end type
+
+ type :: bar
+ type(foo) :: f
+ end type
+
+ class(bar), allocatable :: b
+
+ allocate(bar::b)
+ allocate(b%f%x(1000000))
+ b%f%x = 1.
+ deallocate(b)
+
+end
+
+! { dg-final { scan-tree-dump-times "__builtin_free" 4 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_7.f03 b/gcc/testsuite/gfortran.dg/class_allocate_7.f03
index ddab4073de..ee01faddf4 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_7.f03
+++ b/gcc/testsuite/gfortran.dg/class_allocate_7.f03
@@ -31,5 +31,3 @@ program main
allocate(kernel,source=executive_producer%create_show ())
if (kernel%variable .ne. 99) call abort
end program
-! { dg-final { cleanup-modules "show_producer_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_8.f03 b/gcc/testsuite/gfortran.dg/class_allocate_8.f03
index 85094ad1fe..1abc55776f 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_8.f03
+++ b/gcc/testsuite/gfortran.dg/class_allocate_8.f03
@@ -49,5 +49,3 @@ program main
type is (integrand); if (any (kernel%variable .ne. -1)) call abort
end select
end program
-! { dg-final { cleanup-modules "show_producer_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_allocate_9.f03 b/gcc/testsuite/gfortran.dg/class_allocate_9.f03
index 2446ed6141..0c7b1f79ce 100644
--- a/gcc/testsuite/gfortran.dg/class_allocate_9.f03
+++ b/gcc/testsuite/gfortran.dg/class_allocate_9.f03
@@ -32,5 +32,3 @@ program main
if (kernel1%variable .ne. -1) call abort
if (kernel2%variable .ne. -1) call abort
end program
-! { dg-final { cleanup-modules "show_producer_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/class_array_10.f03 b/gcc/testsuite/gfortran.dg/class_array_10.f03
index 8ca8e0b596..9eb3ef7181 100644
--- a/gcc/testsuite/gfortran.dg/class_array_10.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_10.f03
@@ -1,4 +1,4 @@
-! { dg-do compile}
+! { dg-do compile }
!
! PR fortran/41587
! This program was leading to an ICE related to class allocatable arrays
diff --git a/gcc/testsuite/gfortran.dg/class_array_12.f03 b/gcc/testsuite/gfortran.dg/class_array_12.f03
index 2a1e440636..9873db7b0b 100644
--- a/gcc/testsuite/gfortran.dg/class_array_12.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_12.f03
@@ -29,5 +29,3 @@ contains
end function BGet
end module test
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_13.f90 b/gcc/testsuite/gfortran.dg/class_array_13.f90
new file mode 100644
index 0000000000..567bbf8154
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_13.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/41587
+!
+
+type t0
+ integer :: j = 42
+end type t0
+
+type t
+ integer :: i
+ class(t0), allocatable :: foo(3) ! { dg-error "must have a deferred shape" }
+end type t
+
+type t2
+ integer :: i
+ class(t0), pointer :: foo(3) ! { dg-error "must have a deferred shape" }
+end type t2
+
+type t3
+ integer :: i
+ class(t0), allocatable :: foo[3] ! { dg-error "Upper bound of last coarray dimension must be '\\*'" }
+end type t3
+
+end
diff --git a/gcc/testsuite/gfortran.dg/class_array_14.f90 b/gcc/testsuite/gfortran.dg/class_array_14.f90
new file mode 100644
index 0000000000..ad227a9074
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_14.f90
@@ -0,0 +1,53 @@
+! { dg-do run }
+!
+! PR fortran/54618
+!
+! Check whether default initialization works with INTENT(OUT)
+! and ALLOCATABLE and no segfault occurs with OPTIONAL.
+!
+
+subroutine test1()
+ type typ1
+ integer :: i = 6
+ end type typ1
+
+ type(typ1) :: x
+
+ x%i = 77
+ call f(x)
+ if (x%i /= 6) call abort ()
+ call f()
+contains
+ subroutine f(y1)
+ class(typ1), intent(out), optional :: y1
+ end subroutine f
+end subroutine test1
+
+subroutine test2()
+ type mytype
+ end type mytype
+ type, extends(mytype):: mytype2
+ end type mytype2
+
+ class(mytype), allocatable :: x,y
+ allocate (mytype2 :: x)
+ call g(x)
+ if (allocated (x) .or. .not. same_type_as (x,y)) call abort()
+
+ allocate (mytype2 :: x)
+ call h(x)
+ if (allocated (x) .or. .not. same_type_as (x,y)) call abort()
+
+ call h()
+contains
+ subroutine g(y2)
+ class(mytype), intent(out), allocatable :: y2
+ end subroutine g
+ subroutine h(y3)
+ class(mytype), optional, intent(out), allocatable :: y3
+ end subroutine h
+end subroutine test2
+
+call test1()
+call test2()
+end
diff --git a/gcc/testsuite/gfortran.dg/class_array_15.f03 b/gcc/testsuite/gfortran.dg/class_array_15.f03
new file mode 100644
index 0000000000..d3a123259f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_15.f03
@@ -0,0 +1,119 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! Tests the fixes for three bugs with the same underlying cause. All are regressions
+! that come about because class array elements end up with a different tree type
+! to the class array. In addition, the language specific flag that marks a class
+! container is not being set.
+!
+! PR53876 contributed by Prince Ogunbade <pogos77@hotmail.com>
+! PR54990 contributed by Janus Weil <janus@gcc.gnu.org>
+! PR54992 contributed by Tobias Burnus <burnus@gcc.gnu.org>
+! The two latter bugs were reported by Andrew Benson
+! starting at http://gcc.gnu.org/ml/fortran/2012-10/msg00087.html
+!
+module G_Nodes
+ type :: nc
+ type(tn), pointer :: hostNode
+ end type nc
+ type, extends(nc) :: ncBh
+ end type ncBh
+ type, public, extends(ncBh) :: ncBhStd
+ double precision :: massSeedData
+ end type ncBhStd
+ type, public :: tn
+ class (ncBh), allocatable, dimension(:) :: cBh
+ end type tn
+ type(ncBhStd) :: defaultBhC
+contains
+ subroutine Node_C_Bh_Move(targetNode)
+ implicit none
+ type (tn ), intent(inout) , target :: targetNode
+ class(ncBh), allocatable , dimension(:) :: instancesTemporary
+! These two lines resulted in the wrong result:
+ allocate(instancesTemporary(2),source=defaultBhC)
+ call Move_Alloc(instancesTemporary,targetNode%cBh)
+! These two lines gave the correct result:
+!!deallocate(targetNode%cBh)
+!!allocate(targetNode%cBh(2))
+ targetNode%cBh(1)%hostNode => targetNode
+ targetNode%cBh(2)%hostNode => targetNode
+ return
+ end subroutine Node_C_Bh_Move
+ function bhGet(self,instance)
+ implicit none
+ class (ncBh), pointer :: bhGet
+ class (tn ), intent(inout), target :: self
+ integer , intent(in ) :: instance
+ bhGet => self%cBh(instance)
+ return
+ end function bhGet
+end module G_Nodes
+
+ call pr53876
+ call pr54990
+ call pr54992
+end
+
+subroutine pr53876
+ IMPLICIT NONE
+ TYPE :: individual
+ integer :: icomp ! Add an extra component to test offset
+ REAL, DIMENSION(:), ALLOCATABLE :: genes
+ END TYPE
+ CLASS(individual), DIMENSION(:), ALLOCATABLE :: indv
+ allocate (indv(2), source = [individual(1, [99,999]), &
+ individual(2, [999,9999])])
+ CALL display_indv(indv(2)) ! Similarly, reference 2nd element to test offset
+CONTAINS
+ SUBROUTINE display_indv(self)
+ CLASS(individual), INTENT(IN) :: self
+ if (any(self%genes .ne. [999,9999]) )call abort
+ END SUBROUTINE
+END
+
+subroutine pr54990
+ implicit none
+ type :: ncBhStd
+ integer :: i
+ end type
+ type, extends(ncBhStd) :: ncBhStde
+ integer :: i2(2)
+ end type
+ type :: tn
+ integer :: i ! Add an extra component to test offset
+ class (ncBhStd), allocatable, dimension(:) :: cBh
+ end type
+ integer :: i
+ type(tn), target :: a
+ allocate (a%cBh(2), source = [(ncBhStde(i*99, [1,2]), i = 1,2)])
+ select type (q => a%cBh(2)) ! Similarly, reference 2nd element to test offset
+ type is (ncBhStd)
+ call abort
+ type is (ncBhStde)
+ if (q%i .ne. 198) call abort ! This tests that the component really gets the
+ end select ! language specific flag denoting a class type
+end
+
+subroutine pr54992 ! This test remains as the original.
+ use G_Nodes
+ implicit none
+ type (tn), target :: b
+ class(ncBh), pointer :: bh
+ class(ncBh), allocatable, dimension(:) :: t
+ allocate(b%cBh(1),source=defaultBhC)
+ b%cBh(1)%hostNode => b
+! #1 this worked
+ if (loc(b) .ne. loc(b%cBh(1)%hostNode)) call abort
+ call Node_C_Bh_Move(b)
+! #2 this worked
+ if (loc(b) .ne. loc(b%cBh(1)%hostNode)) call abort
+ if (loc(b) .ne. loc(b%cBh(2)%hostNode)) call abort
+! #3 this did not
+ bh => bhGet(b,instance=1)
+ if (loc (b) .ne. loc(bh%hostNode)) call abort
+ bh => bhGet(b,instance=2)
+ if (loc (b) .ne. loc(bh%hostNode)) call abort
+end
+! { dg-final { scan-tree-dump-times "builtin_free" 12 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_16.f90 b/gcc/testsuite/gfortran.dg/class_array_16.f90
new file mode 100644
index 0000000000..fc8edbf140
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_16.f90
@@ -0,0 +1,71 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+module m
+ implicit none
+ type t
+ end type t
+
+ type, extends(t) :: t2
+ end type t2
+
+ type(t) :: var_t
+ type(t2) :: var_t2
+contains
+ subroutine sub(x)
+ class(t), allocatable, intent(out) :: x(:)
+
+ if (allocated (x)) call abort()
+ if (.not. same_type_as(x, var_t)) call abort()
+
+ allocate (t2 :: x(5))
+ end subroutine sub
+
+ subroutine sub2(x)
+ class(t), allocatable, OPTIONAL, intent(out) :: x(:)
+
+ if (.not. present(x)) return
+ if (allocated (x)) call abort()
+ if (.not. same_type_as(x, var_t)) call abort()
+
+ allocate (t2 :: x(5))
+ end subroutine sub2
+end module m
+
+use m
+implicit none
+class(t), save, allocatable :: y(:)
+
+if (allocated (y)) call abort()
+if (.not. same_type_as(y,var_t)) call abort()
+
+call sub(y)
+if (.not.allocated(y)) call abort()
+if (.not. same_type_as(y, var_t2)) call abort()
+if (size (y) /= 5) call abort()
+
+call sub(y)
+if (.not.allocated(y)) call abort()
+if (.not. same_type_as(y, var_t2)) call abort()
+if (size (y) /= 5) call abort()
+
+deallocate (y)
+if (allocated (y)) call abort()
+if (.not. same_type_as(y,var_t)) call abort()
+
+call sub2()
+
+call sub2(y)
+if (.not.allocated(y)) call abort()
+if (.not. same_type_as(y, var_t2)) call abort()
+if (size (y) /= 5) call abort()
+
+call sub2(y)
+if (.not.allocated(y)) call abort()
+if (.not. same_type_as(y, var_t2)) call abort()
+if (size (y) /= 5) call abort()
+end
+
+! { dg-final { scan-tree-dump-times "__builtin_free" 5 "original" } }
+! { dg-final { scan-tree-dump-times "finally" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_17.f90 b/gcc/testsuite/gfortran.dg/class_array_17.f90
new file mode 100644
index 0000000000..e5961e1103
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_17.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/57456
+!
+module m
+ implicit none
+ type t
+ integer :: i
+ end type t
+ type, extends(t) :: t2
+ integer :: j
+ end type t2
+end module m
+
+program test
+ use m
+ implicit none
+ integer :: i
+ class(t), save, allocatable :: y(:)
+
+ allocate (t2 :: y(5))
+ select type(y)
+ type is (t2)
+ do i = 1, 5
+ y(i)%i = i
+ y(i)%j = i*10
+ end do
+ end select
+ deallocate(y)
+end
+
+! { dg-final { scan-tree-dump-times "__builtin_malloc \\(40\\);" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_18.f90 b/gcc/testsuite/gfortran.dg/class_array_18.f90
new file mode 100644
index 0000000000..5f2f3dee7f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_18.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR fortran/57535
+!
+program test
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+contains
+ function func2()
+ class(t), allocatable :: func2(:)
+ allocate(func2(3))
+ func2%ii = [111,222,333]
+ end function func2
+end program test
diff --git a/gcc/testsuite/gfortran.dg/class_array_19.f90 b/gcc/testsuite/gfortran.dg/class_array_19.f90
new file mode 100644
index 0000000000..0b28db180d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_array_19.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR 57285: [OOP] ICE on invalid: "gfc_array_dimen_size(): Bad dimension" due to SIZE intrinsic with invalid dim on CLASS dummy
+!
+! Contributed by Lorenz Hüdepohl <bugs@stellardeath.org>
+
+ type type_t
+ end type
+contains
+ subroutine foo(a)
+ class(type_t), intent(in) :: a(:)
+ type(type_t) :: c(size(a,dim=2)) ! { dg-error "is not a valid dimension index" }
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/class_array_3.f03 b/gcc/testsuite/gfortran.dg/class_array_3.f03
index 8972161fbb..6db375c942 100644
--- a/gcc/testsuite/gfortran.dg/class_array_3.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_3.f03
@@ -136,5 +136,3 @@ program main
! print *, "After qsort: ", A%disp()
if (any (A%disp() .ne. [2,3,4,5,7])) call abort
end program main
-
-! { dg-final { cleanup-modules "m_qsort test" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_4.f03 b/gcc/testsuite/gfortran.dg/class_array_4.f03
index 7c748f008d..46b254db67 100644
--- a/gcc/testsuite/gfortran.dg/class_array_4.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_4.f03
@@ -23,4 +23,3 @@ end module m
call x(:)%foo(n)
if (any(n .ne. [99,199,299])) call abort
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_5.f03 b/gcc/testsuite/gfortran.dg/class_array_5.f03
index 2a7e2f1bc4..740a0d4f27 100644
--- a/gcc/testsuite/gfortran.dg/class_array_5.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_5.f03
@@ -22,4 +22,3 @@ module ice6
end subroutine do_something_else
end module ice6
-! { dg-final { cleanup-modules "ice6" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_6.f03 b/gcc/testsuite/gfortran.dg/class_array_6.f03
index 4f8b803bef..ab4766f9d0 100644
--- a/gcc/testsuite/gfortran.dg/class_array_6.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_6.f03
@@ -30,4 +30,3 @@ CONTAINS
!TYPE(ParentVector), INTENT(INOUT) :: pvec
END SUBROUTINE item_operation
END MODULE procedure_intent_nonsense
-! { dg-final { cleanup-modules "procedure_intent_nonsense" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_7.f03 b/gcc/testsuite/gfortran.dg/class_array_7.f03
index 225cc7e06c..5c9673ff72 100644
--- a/gcc/testsuite/gfortran.dg/class_array_7.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_7.f03
@@ -54,6 +54,5 @@ program main
if (trim (print_type ("a", a)) .ne. "a is extended_type") call abort
call reallocate (a)
if (trim (print_type ("a", a)) .ne. "a is base_type") call abort
+ deallocate (a)
end program main
-
-! { dg-final { cleanup-modules "realloc" } }
diff --git a/gcc/testsuite/gfortran.dg/class_array_9.f03 b/gcc/testsuite/gfortran.dg/class_array_9.f03
index 6b07aeac4d..c771c61a12 100644
--- a/gcc/testsuite/gfortran.dg/class_array_9.f03
+++ b/gcc/testsuite/gfortran.dg/class_array_9.f03
@@ -42,5 +42,3 @@ end module
if (x(4)%disp () .ne. 4) call abort
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/class_defined_operator_1.f03 b/gcc/testsuite/gfortran.dg/class_defined_operator_1.f03
index 0b878f2014..008739e3f9 100644
--- a/gcc/testsuite/gfortran.dg/class_defined_operator_1.f03
+++ b/gcc/testsuite/gfortran.dg/class_defined_operator_1.f03
@@ -100,5 +100,3 @@ contains
this = this*scale
end subroutine
end program
-
-! { dg-final { cleanup-modules "bar_module foo_module" } }
diff --git a/gcc/testsuite/gfortran.dg/class_dummy_2.f03 b/gcc/testsuite/gfortran.dg/class_dummy_2.f03
index c1735822bb..2078cd7a66 100644
--- a/gcc/testsuite/gfortran.dg/class_dummy_2.f03
+++ b/gcc/testsuite/gfortran.dg/class_dummy_2.f03
@@ -29,5 +29,3 @@ contains
end module fails_test
end
-
-! { dg-final { cleanup-modules "fails_mod fails_test" } }
diff --git a/gcc/testsuite/gfortran.dg/class_dummy_4.f03 b/gcc/testsuite/gfortran.dg/class_dummy_4.f03
new file mode 100644
index 0000000000..fa302bf1ad
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_dummy_4.f03
@@ -0,0 +1,44 @@
+! { dg-do compile }
+!
+! PR 55037: [4.8 Regression] [OOP] ICE with local allocatable variable of abstract type
+!
+! Contributed by <mrestelli@gmail.com>
+
+module m1
+ implicit none
+ type, abstract :: c_stv
+ contains
+ procedure, pass(x) :: source
+ end type c_stv
+contains
+ pure subroutine source(y,x)
+ class(c_stv), intent(in) :: x
+ class(c_stv), allocatable, intent(out) :: y
+ end subroutine source
+end module m1
+
+module m2
+ use m1, only : c_stv
+ implicit none
+contains
+ subroutine sub(u0)
+ class(c_stv), intent(inout) :: u0
+ class(c_stv), allocatable :: tmp
+ call u0%source(tmp)
+ end subroutine sub
+end module m2
+
+
+program p
+ implicit none
+ type :: c_stv
+ end type
+ class(c_stv), allocatable :: tmp
+ call source(tmp)
+contains
+ subroutine source(y)
+ type(c_stv), allocatable, intent(out) :: y
+ end subroutine
+end
+
+! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/class_nameclash.f90 b/gcc/testsuite/gfortran.dg/class_nameclash.f90
new file mode 100644
index 0000000000..227d865962
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_nameclash.f90
@@ -0,0 +1,39 @@
+! { dg-do run }
+!
+! try to provoke class name clashes in gfc_build_class_symbol
+!
+module test_module
+
+ implicit none
+
+ type, public :: test_p
+ private
+ class (test_p), pointer :: next => null()
+ end type test_p
+
+ type, public :: test
+! Error in "call do_it (x)" below:
+! Type mismatch in argument 'x' at (1); passed CLASS(test_p) to CLASS(test)
+ class (test), pointer :: next => null()
+ end type test
+
+contains
+
+ subroutine do_it (x)
+ class (test_p), target :: x
+
+ x%next => x
+ return
+ end subroutine do_it
+
+end module test_module
+
+use test_module
+
+ implicit none
+ class (test_p), pointer :: x
+
+ allocate (x)
+ call do_it (x)
+ deallocate (x)
+end
diff --git a/gcc/testsuite/gfortran.dg/class_optional_1.f90 b/gcc/testsuite/gfortran.dg/class_optional_1.f90
new file mode 100644
index 0000000000..2b408dbda0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_optional_1.f90
@@ -0,0 +1,175 @@
+! { dg-do run }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/50981
+! PR fortran/54618
+!
+
+ implicit none
+ type t
+ integer, allocatable :: i
+ end type t
+ type, extends (t):: t2
+ integer, allocatable :: j
+ end type t2
+
+ class(t), allocatable :: xa, xa2(:), xac[:], xa2c(:)[:]
+ class(t), pointer :: xp, xp2(:)
+
+ xp => null()
+ xp2 => null()
+
+ call suba(alloc=.false., prsnt=.false.)
+ call suba(xa, alloc=.false., prsnt=.true.)
+ if (.not. allocated (xa)) call abort ()
+ if (.not. allocated (xa%i)) call abort ()
+ if (xa%i /= 5) call abort ()
+ xa%i = -3
+ call suba(xa, alloc=.true., prsnt=.true.)
+ if (allocated (xa)) call abort ()
+
+ call suba2(alloc=.false., prsnt=.false.)
+ call suba2(xa2, alloc=.false., prsnt=.true.)
+ if (.not. allocated (xa2)) call abort ()
+ if (size (xa2) /= 1) call abort ()
+ if (.not. allocated (xa2(1)%i)) call abort ()
+ if (xa2(1)%i /= 5) call abort ()
+ xa2(1)%i = -3
+ call suba2(xa2, alloc=.true., prsnt=.true.)
+ if (allocated (xa2)) call abort ()
+
+ call subp(alloc=.false., prsnt=.false.)
+ call subp(xp, alloc=.false., prsnt=.true.)
+ if (.not. associated (xp)) call abort ()
+ if (.not. allocated (xp%i)) call abort ()
+ if (xp%i /= 5) call abort ()
+ xp%i = -3
+ call subp(xp, alloc=.true., prsnt=.true.)
+ if (associated (xp)) call abort ()
+
+ call subp2(alloc=.false., prsnt=.false.)
+ call subp2(xp2, alloc=.false., prsnt=.true.)
+ if (.not. associated (xp2)) call abort ()
+ if (size (xp2) /= 1) call abort ()
+ if (.not. allocated (xp2(1)%i)) call abort ()
+ if (xp2(1)%i /= 5) call abort ()
+ xp2(1)%i = -3
+ call subp2(xp2, alloc=.true., prsnt=.true.)
+ if (associated (xp2)) call abort ()
+
+ call subac(alloc=.false., prsnt=.false.)
+ call subac(xac, alloc=.false., prsnt=.true.)
+ if (.not. allocated (xac)) call abort ()
+ if (.not. allocated (xac%i)) call abort ()
+ if (xac%i /= 5) call abort ()
+ xac%i = -3
+ call subac(xac, alloc=.true., prsnt=.true.)
+ if (allocated (xac)) call abort ()
+
+ call suba2c(alloc=.false., prsnt=.false.)
+ call suba2c(xa2c, alloc=.false., prsnt=.true.)
+ if (.not. allocated (xa2c)) call abort ()
+ if (size (xa2c) /= 1) call abort ()
+ if (.not. allocated (xa2c(1)%i)) call abort ()
+ if (xa2c(1)%i /= 5) call abort ()
+ xa2c(1)%i = -3
+ call suba2c(xa2c, alloc=.true., prsnt=.true.)
+ if (allocated (xa2c)) call abort ()
+
+contains
+ subroutine suba2c(x, prsnt, alloc)
+ class(t), optional, allocatable :: x(:)[:]
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (prsnt) then
+ if (alloc .neqv. allocated(x)) call abort ()
+ if (.not. allocated (x)) then
+ allocate (x(1)[*])
+ x(1)%i = 5
+ else
+ if (x(1)%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine suba2c
+
+ subroutine subac(x, prsnt, alloc)
+ class(t), optional, allocatable :: x[:]
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (present (x)) then
+ if (alloc .neqv. allocated(x)) call abort ()
+ if (.not. allocated (x)) then
+ allocate (x[*])
+ x%i = 5
+ else
+ if (x%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine subac
+
+ subroutine suba2(x, prsnt, alloc)
+ class(t), optional, allocatable :: x(:)
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (prsnt) then
+ if (alloc .neqv. allocated(x)) call abort ()
+ if (.not. allocated (x)) then
+ allocate (x(1))
+ x(1)%i = 5
+ else
+ if (x(1)%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine suba2
+
+ subroutine suba(x, prsnt, alloc)
+ class(t), optional, allocatable :: x
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (present (x)) then
+ if (alloc .neqv. allocated(x)) call abort ()
+ if (.not. allocated (x)) then
+ allocate (x)
+ x%i = 5
+ else
+ if (x%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine suba
+
+ subroutine subp2(x, prsnt, alloc)
+ class(t), optional, pointer :: x(:)
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (present (x)) then
+ if (alloc .neqv. associated(x)) call abort ()
+ if (.not. associated (x)) then
+ allocate (x(1))
+ x(1)%i = 5
+ else
+ if (x(1)%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine subp2
+
+ subroutine subp(x, prsnt, alloc)
+ class(t), optional, pointer :: x
+ logical prsnt, alloc
+ if (present (x) .neqv. prsnt) call abort ()
+ if (present (x)) then
+ if (alloc .neqv. associated(x)) call abort ()
+ if (.not. associated (x)) then
+ allocate (x)
+ x%i = 5
+ else
+ if (x%i /= -3) call abort()
+ deallocate (x)
+ end if
+ end if
+ end subroutine subp
+end
diff --git a/gcc/testsuite/gfortran.dg/class_optional_2.f90 b/gcc/testsuite/gfortran.dg/class_optional_2.f90
new file mode 100644
index 0000000000..3472eaa973
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_optional_2.f90
@@ -0,0 +1,800 @@
+! { dg-do run }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/50981
+! PR fortran/54618
+! PR fortran/55978
+
+ implicit none
+ type t
+ integer, allocatable :: i
+ end type t
+ type, extends (t):: t2
+ integer, allocatable :: j
+ end type t2
+
+ call s1a1()
+ call s1a()
+ call s1ac1()
+ call s1ac()
+ call s2()
+ call s2p(psnt=.false.)
+ call s2caf()
+ call s2elem()
+ call s2elem_t()
+ call s2elem_t2()
+ call s2t()
+ call s2tp(psnt=.false.)
+ call s2t2()
+ call s2t2p(psnt=.false.)
+
+ call a1a1()
+ call a1a()
+ call a1ac1()
+ call a1ac()
+ call a2()
+ call a2p(psnt=.false.)
+ call a2caf()
+
+ call a3a1()
+ call a3a()
+ call a3ac1()
+ call a3ac()
+ call a4()
+ call a4p(psnt=.false.)
+ call a4caf()
+
+ call ar1a1()
+ call ar1a()
+ call ar1ac1()
+ call ar1ac()
+ call ar()
+ call art()
+ call arp(psnt=.false.)
+ call artp(psnt=.false.)
+
+contains
+
+ subroutine s1a1(z, z2, z3, z4, z5)
+ type(t), optional :: z, z4[*]
+ type(t), pointer, optional :: z2
+ type(t), allocatable, optional :: z3, z5[:]
+ type(t), allocatable :: x
+ type(t), pointer :: y
+ y => null()
+ call s2(x)
+ call s2(y)
+ call s2(z)
+ call s2(z2)
+ call s2(z3)
+ call s2(z4)
+ call s2(z5)
+ call s2p(y,psnt=.true.)
+ call s2p(z2,psnt=.false.)
+ call s2elem(x)
+ call s2elem(y)
+ call s2elem(z)
+ call s2elem(z2)
+ call s2elem(z3)
+ call s2elem(z4)
+ call s2elem(z5)
+ call s2elem_t(x)
+ call s2elem_t(y)
+ call s2elem_t(z)
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ call s2caf(z4)
+ call s2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+ call s2t(x)
+ call s2t(y)
+ call s2t(z)
+! call s2t(z2) ! FIXME: Segfault
+! call s2t(z3) ! FIXME: Segfault
+! call s2t(z4) ! FIXME: Segfault
+! call s2t(z5) ! FIXME: Segfault
+ call s2tp(y,psnt=.true.)
+ call s2tp(z2,psnt=.false.)
+ end subroutine s1a1
+ subroutine s1a(z, z2, z3, z4, z5)
+ type(t2), optional :: z, z4[*]
+ type(t2), optional, pointer :: z2
+ type(t2), optional, allocatable :: z3, z5[:]
+ type(t2), allocatable :: x
+ type(t2), pointer :: y
+ y => null()
+ call s2(x)
+ call s2(y)
+ call s2(z)
+ call s2(z2)
+ call s2(z3)
+ call s2(z4)
+ call s2(z5)
+ call s2p(y,psnt=.true.)
+ call s2p(z2,psnt=.false.)
+ call s2elem(x)
+ call s2elem(y)
+ call s2elem(z)
+ call s2elem(z2)
+ call s2elem(z3)
+ call s2elem(z4)
+ call s2elem(z5)
+ call s2elem_t2(x)
+ call s2elem_t2(y)
+ call s2elem_t2(z)
+! call s2elem_t2(z2) ! FIXME: Segfault
+! call s2elem_t2(z3) ! FIXME: Segfault
+! call s2elem_t2(z4) ! FIXME: Segfault
+! call s2elem_t2(z5) ! FIXME: Segfault
+ call s2caf(z4)
+ call s2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+ call s2t2(x)
+ call s2t2(y)
+ call s2t2(z)
+! call s2t2(z2) ! FIXME: Segfault
+! call s2t2(z3) ! FIXME: Segfault
+ call s2t2(z4)
+! call s2t2(z5) ! FIXME: Segfault
+ call s2t2p(y,psnt=.true.)
+ call s2t2p(z2,psnt=.false.)
+ end subroutine s1a
+ subroutine s1ac1(z, z2, z3, z4, z5)
+ class(t), optional :: z, z4[*]
+ class(t), optional, pointer :: z2
+ class(t), optional, allocatable :: z3, z5[:]
+ class(t), allocatable :: x
+ class(t), pointer :: y
+ y => null()
+ call s2(x)
+ call s2(y)
+ call s2(z)
+ call s2(z2)
+ call s2(z3)
+ call s2(z4)
+ call s2(z5)
+ call s2p(y,psnt=.true.)
+ call s2p(z2,psnt=.false.)
+ call s2elem(x)
+ call s2elem(y)
+ call s2elem(z)
+ call s2elem(z2)
+ call s2elem(z3)
+ call s2elem(z4)
+ call s2elem(z5)
+ call s2elem_t(x)
+ call s2elem_t(y)
+! call s2elem_t(z) ! FIXME: Segfault
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ call s2caf(z4)
+ call s2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+ call s2t(x)
+ call s2t(y)
+! call s2t(z) ! FIXME: Segfault
+! call s2t(z2) ! FIXME: Segfault
+! call s2t(z3) ! FIXME: Segfault
+! call s2t(z4) ! FIXME: Segfault
+! call s2t(z5) ! FIXME: Segfault
+ call s2tp(y,psnt=.true.)
+ call s2tp(z2,psnt=.false.)
+ end subroutine s1ac1
+ subroutine s1ac(z, z2, z3, z4, z5)
+ class(t2), optional :: z, z4[*]
+ class(t2), optional, pointer :: z2
+ class(t2), optional, allocatable :: z3, z5[:]
+ class(t2), allocatable :: x
+ class(t2), pointer :: y
+ y => null()
+ call s2(x)
+ call s2(y)
+ call s2(z)
+ call s2(z2)
+ call s2(z3)
+ call s2(z4)
+ call s2(z5)
+ call s2p(y,psnt=.true.)
+ call s2p(z2,psnt=.false.)
+ call s2elem(x)
+ call s2elem(y)
+ call s2elem(z)
+ call s2elem(z2)
+ call s2elem(z3)
+ call s2elem(z4)
+ call s2elem(z5)
+ call s2elem_t2(x)
+! call s2elem_t2(y) ! FIXME: Segfault
+! call s2elem_t2(z) ! FIXME: Segfault
+! call s2elem_t2(z2) ! FIXME: Segfault
+! call s2elem_t2(z3) ! FIXME: Segfault
+! call s2elem_t2(z4) ! FIXME: Segfault
+! call s2elem_t2(z5) ! FIXME: Segfault
+ call s2caf(z4)
+ call s2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+ call s2t2(x)
+ call s2t2(y)
+! call s2t2(z) ! FIXME: Segfault
+! call s2t2(z2) ! FIXME: Segfault
+! call s2t2(z3) ! FIXME: Segfault
+! call s2t2(z4) ! FIXME: Segfault
+! call s2t2(z5) ! FIXME: Segfault
+ call s2t2p(y,psnt=.true.)
+ call s2t2p(z2,psnt=.false.)
+ end subroutine s1ac
+
+ subroutine s2(x)
+ class(t), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2
+ subroutine s2p(x,psnt)
+ class(t), intent(in), pointer, optional :: x
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine s2p
+ subroutine s2caf(x)
+ class(t), intent(in), optional :: x[*]
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2caf
+ subroutine s2t(x)
+ type(t), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2t
+ subroutine s2t2(x)
+ type(t2), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2t2
+ subroutine s2tp(x, psnt)
+ type(t), pointer, intent(in), optional :: x
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine s2tp
+ subroutine s2t2p(x, psnt)
+ type(t2), pointer, intent(in), optional :: x
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine s2t2p
+ impure elemental subroutine s2elem(x)
+ class(t), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2elem
+ impure elemental subroutine s2elem_t(x)
+ type(t), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2elem_t
+ impure elemental subroutine s2elem_t2(x)
+ type(t2), intent(in), optional :: x
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine s2elem_t2
+
+
+ subroutine a1a1(z, z2, z3, z4, z5)
+ type(t), optional :: z(:), z4(:)[*]
+ type(t), optional, pointer :: z2(:)
+ type(t), optional, allocatable :: z3(:), z5(:)[:]
+ type(t), allocatable :: x(:)
+ type(t), pointer :: y(:)
+ y => null()
+ call a2(x)
+ call a2(y)
+ call a2(z)
+ call a2(z2)
+ call a2(z3)
+ call a2(z4)
+ call a2(z5)
+ call a2p(y,psnt=.true.)
+ call a2p(z2,psnt=.false.)
+ call a2caf(z4)
+ call a2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(z) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ end subroutine a1a1
+ subroutine a1a(z, z2, z3, z4, z5)
+ type(t2), optional :: z(:), z4(:)[*]
+ type(t2), optional, pointer :: z2(:)
+ type(t2), optional, allocatable :: z3(:), z5(:)[:]
+ type(t2), allocatable :: x(:)
+ type(t2), pointer :: y(:)
+ y => null()
+ call a2(x)
+ call a2(y)
+ call a2(z)
+ call a2(z2)
+ call a2(z3)
+ call a2(z4)
+ call a2(z5)
+ call a2p(y,psnt=.true.)
+ call a2p(z2,psnt=.false.)
+ call a2caf(z4)
+ call a2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t2(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t2(y) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t2(z) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t2(z2) ! FIXME: Segfault
+! call s2elem_t2(z3) ! FIXME: Segfault
+! call s2elem_t2(z4) ! FIXME: Segfault
+! call s2elem_t2(z5) ! FIXME: Segfault
+ end subroutine a1a
+ subroutine a1ac1(z, z2, z3, z4, z5)
+ class(t), optional :: z(:), z4(:)[*]
+ class(t), optional, pointer :: z2(:)
+ class(t), optional, allocatable :: z3(:), z5(:)[:]
+ class(t), allocatable :: x(:)
+ class(t), pointer :: y(:)
+ y => null()
+ call a2(x)
+ call a2(y)
+ call a2(z)
+ call a2(z2)
+ call a2(z3)
+ call a2(z4)
+ call a2(z5)
+ call a2p(y,psnt=.true.)
+ call a2p(z2,psnt=.false.)
+ call a2caf(z4)
+ call a2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t(x) ! FIXME: Segfault
+! call s2elem_t(y) ! FIXME: Segfault
+! call s2elem_t(z) ! FIXME: Segfault
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ end subroutine a1ac1
+ subroutine a1ac(z, z2, z3, z4, z5)
+ class(t2), optional :: z(:), z4(:)[*]
+ class(t2), optional, pointer :: z2(:)
+ class(t2), optional, allocatable :: z3(:), z5(:)[:]
+ class(t2), allocatable :: x(:)
+ class(t2), pointer :: y(:)
+ y => null()
+ call a2(x)
+ call a2(y)
+ call a2(z)
+ call a2(z2)
+ call a2(z3)
+ call a2(z4)
+ call a2(z5)
+ call a2p(y,psnt=.true.)
+ call a2p(z2,psnt=.false.)
+ call a2caf(z4)
+ call a2caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t2(x) ! FIXME: Segfault
+! call s2elem_t2(y) ! FIXME: Segfault
+! call s2elem_t2(z) ! FIXME: Segfault
+! call s2elem_t2(z2) ! FIXME: Segfault
+! call s2elem_t2(z3) ! FIXME: Segfault
+! call s2elem_t2(z4) ! FIXME: Segfault
+! call s2elem_t2(z5) ! FIXME: Segfault
+ end subroutine a1ac
+
+ subroutine a2(x)
+ class(t), intent(in), optional :: x(:)
+ if (present (x)) call abort ()
+ ! print *, present(x)
+ end subroutine a2
+ subroutine a2p(x, psnt)
+ class(t), pointer, intent(in), optional :: x(:)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ ! print *, present(x)
+ end subroutine a2p
+ subroutine a2caf(x)
+ class(t), intent(in), optional :: x(:)[*]
+ if (present (x)) call abort ()
+ ! print *, present(x)
+ end subroutine a2caf
+
+
+ subroutine a3a1(z, z2, z3, z4, z5)
+ type(t), optional :: z(4), z4(4)[*]
+ type(t), optional, pointer :: z2(:)
+ type(t), optional, allocatable :: z3(:), z5(:)[:]
+ type(t), allocatable :: x(:)
+ type(t), pointer :: y(:)
+ y => null()
+ call a4(x)
+ call a4(y)
+ call a4(z)
+ call a4(z2)
+ call a4(z3)
+ call a4(z4)
+ call a4(z5)
+ call a4p(y,psnt=.true.)
+ call a4p(z2,psnt=.false.)
+ call a4t(x)
+ call a4t(y)
+ call a4t(z)
+! call a4t(z2) ! FIXME: Segfault
+! call a4t(z3) ! FIXME: Segfault
+! call a4t(z4) ! FIXME: Segfault
+! call a4t(z5) ! FIXME: Segfault
+ call a4tp(y,psnt=.true.)
+ call a4tp(z2,psnt=.false.)
+ call a4caf(z4)
+ call a4caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
+ call s2elem_t(z)
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ end subroutine a3a1
+ subroutine a3a(z, z2, z3)
+ type(t2), optional :: z(4)
+ type(t2), optional, pointer :: z2(:)
+ type(t2), optional, allocatable :: z3(:)
+ type(t2), allocatable :: x(:)
+ type(t2), pointer :: y(:)
+ y => null()
+ call a4(x)
+ call a4(y)
+ call a4(z)
+ call a4(z2)
+ call a4(z3)
+ call a4p(y,psnt=.true.)
+ call a4p(z2,psnt=.false.)
+ call a4t2(x)
+ call a4t2(y)
+ call a4t2(z)
+! call a4t2(z2) ! FIXME: Segfault
+! call a4t2(z3) ! FIXME: Segfault
+ call a4t2p(y,psnt=.true.)
+ call a4t2p(z2,psnt=.false.)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Segfault
+! call s2elem(y) ! FIXME: Segfault
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t2(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t2(y) ! FIXME: Conditional jump or move depends on uninitialised value
+ call s2elem_t2(z)
+! call s2elem_t2(z2) ! FIXME: Segfault
+! call s2elem_t2(z3) ! FIXME: Segfault
+! call s2elem_t2(z4) ! FIXME: Segfault
+! call s2elem_t2(z5) ! FIXME: Segfault
+ end subroutine a3a
+ subroutine a3ac1(z, z2, z3, z4, z5)
+ class(t), optional :: z(4), z4(4)[*]
+ class(t), optional, pointer :: z2(:)
+ class(t), optional, allocatable :: z3(:), z5(:)[:]
+ class(t), allocatable :: x(:)
+ class(t), pointer :: y(:)
+ y => null()
+ call a4(x)
+ call a4(y)
+ call a4(z)
+ call a4(z2)
+ call a4(z3)
+ call a4(z4)
+ call a4(z5)
+ call a4p(y,psnt=.true.)
+ call a4p(z2,psnt=.false.)
+! call a4t(x) ! FIXME: Segfault
+! call a4t(y) ! FIXME: Segfault
+! call a4t(z) ! FIXME: Segfault
+! call a4t(z2) ! FIXME: Segfault
+! call a4t(z3) ! FIXME: Segfault
+! call a4t(z4) ! FIXME: Segfault
+! call a4t(z5) ! FIXME: Segfault
+! call a4tp(y,psnt=.true.) ! FIXME: Segfault
+! call a4tp(z2,psnt=.false.) ! FIXME: Segfault
+ call a4caf(z4)
+ call a4caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+! call s2elem(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem(y) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem(z) ! FIXME: Segfault
+! call s2elem(z2) ! FIXME: Segfault
+! call s2elem(z3) ! FIXME: Segfault
+! call s2elem(z4) ! FIXME: Segfault
+! call s2elem(z5) ! FIXME: Segfault
+! call s2elem_t(x) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(y) ! FIXME: Conditional jump or move depends on uninitialised value
+! call s2elem_t(z) ! FIXME: Segfault
+! call s2elem_t(z2) ! FIXME: Segfault
+! call s2elem_t(z3) ! FIXME: Segfault
+! call s2elem_t(z4) ! FIXME: Segfault
+! call s2elem_t(z5) ! FIXME: Segfault
+ end subroutine a3ac1
+ subroutine a3ac(z, z2, z3, z4, z5)
+ class(t2), optional :: z(4), z4(4)[*]
+ class(t2), optional, pointer :: z2(:)
+ class(t2), optional, allocatable :: z3(:), z5(:)[:]
+ class(t2), allocatable :: x(:)
+ class(t2), pointer :: y(:)
+ y => null()
+ call a4(x)
+ call a4(y)
+ call a4(z)
+ call a4(z2)
+ call a4(z3)
+ call a4(z4)
+ call a4(z5)
+ call a4p(y,psnt=.true.)
+ call a4p(z2,psnt=.false.)
+! call a4t2(x) ! FIXME: Segfault
+! call a4t2(y) ! FIXME: Segfault
+! call a4t2(z) ! FIXME: Segfault
+! call a4t2(z2) ! FIXME: Segfault
+! call a4t2(z3) ! FIXME: Segfault
+! call a4t2(z4) ! FIXME: Segfault
+! call a4t2(z5) ! FIXME: Segfault
+! call a4t2p(y,psnt=.true.) ! FIXME: Segfault
+! call a4t2p(z2,psnt=.false.) ! FIXME: Segfault
+ call a4caf(z4)
+ call a4caf(z5)
+ call ar(x)
+ call ar(y)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call ar(z4)
+ call ar(z5)
+ call arp(y,psnt=.true.)
+ call arp(z2,psnt=.false.)
+ end subroutine a3ac
+
+ subroutine a4(x)
+ class(t), intent(in), optional :: x(4)
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine a4
+ subroutine a4p(x, psnt)
+ class(t), pointer, intent(in), optional :: x(:)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine a4p
+ subroutine a4caf(x)
+ class(t), intent(in), optional :: x(4)[*]
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine a4caf
+ subroutine a4t(x)
+ type(t), intent(in), optional :: x(4)
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine a4t
+ subroutine a4t2(x)
+ type(t2), intent(in), optional :: x(4)
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine a4t2
+ subroutine a4tp(x, psnt)
+ type(t), pointer, intent(in), optional :: x(:)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine a4tp
+ subroutine a4t2p(x, psnt)
+ type(t2), pointer, intent(in), optional :: x(:)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine a4t2p
+
+
+ subroutine ar(x)
+ class(t), intent(in), optional :: x(..)
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine ar
+
+ subroutine art(x)
+ type(t), intent(in), optional :: x(..)
+ if (present (x)) call abort ()
+ !print *, present(x)
+ end subroutine art
+
+ subroutine arp(x, psnt)
+ class(t), pointer, intent(in), optional :: x(..)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine arp
+
+ subroutine artp(x, psnt)
+ type(t), intent(in), pointer, optional :: x(..)
+ logical psnt
+ if (present (x).neqv. psnt) call abort ()
+ !print *, present(x)
+ end subroutine artp
+
+
+
+ subroutine ar1a1(z, z2, z3)
+ type(t), optional :: z(..)
+ type(t), pointer, optional :: z2(..)
+ type(t), allocatable, optional :: z3(..)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call art(z)
+ call art(z2)
+ call art(z3)
+ call arp(z2, .false.)
+ call artp(z2, .false.)
+ end subroutine ar1a1
+ subroutine ar1a(z, z2, z3)
+ type(t2), optional :: z(..)
+ type(t2), optional, pointer :: z2(..)
+ type(t2), optional, allocatable :: z3(..)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call arp(z2, .false.)
+ end subroutine ar1a
+ subroutine ar1ac1(z, z2, z3)
+ class(t), optional :: z(..)
+ class(t), optional, pointer :: z2(..)
+ class(t), optional, allocatable :: z3(..)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+! call art(z) ! FIXME: ICE - This requires packing support for assumed-rank
+! call art(z2)! FIXME: ICE - This requires packing support for assumed-rank
+! call art(z3)! FIXME: ICE - This requires packing support for assumed-rank
+ call arp(z2, .false.)
+! call artp(z2, .false.) ! FIXME: ICE
+ end subroutine ar1ac1
+ subroutine ar1ac(z, z2, z3)
+ class(t2), optional :: z(..)
+ class(t2), optional, pointer :: z2(..)
+ class(t2), optional, allocatable :: z3(..)
+ call ar(z)
+ call ar(z2)
+ call ar(z3)
+ call arp(z2, .false.)
+ end subroutine ar1ac
+end
diff --git a/gcc/testsuite/gfortran.dg/class_result_1.f03 b/gcc/testsuite/gfortran.dg/class_result_1.f03
index f1f542bb12..011878e958 100644
--- a/gcc/testsuite/gfortran.dg/class_result_1.f03
+++ b/gcc/testsuite/gfortran.dg/class_result_1.f03
@@ -58,5 +58,3 @@ program random_walk
end do
end program random_walk
-
-! { dg-final { cleanup-modules "points2d" } }
diff --git a/gcc/testsuite/gfortran.dg/class_result_2.f90 b/gcc/testsuite/gfortran.dg/class_result_2.f90
new file mode 100644
index 0000000000..be37a1991d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/class_result_2.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! PR 59414: [OOP] Class array pointers: compile error on valid code (Different ranks in pointer assignment)
+!
+! Contributed by Antony Lewis <antony@cosmologist.info>
+
+ implicit none
+
+ Type TObjectList
+ end Type
+
+ Class(TObjectList), pointer :: Arr(:)
+ Arr => ArrayItem()
+
+ contains
+
+ function ArrayItem() result(P)
+ Class(TObjectList), pointer :: P(:)
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/class_to_type_2.f90 b/gcc/testsuite/gfortran.dg/class_to_type_2.f90
index 75c2a88761..e6181a4d33 100644
--- a/gcc/testsuite/gfortran.dg/class_to_type_2.f90
+++ b/gcc/testsuite/gfortran.dg/class_to_type_2.f90
@@ -93,5 +93,3 @@ program prog
call subpr2_array (g ())
end program
-
-! { dg-final { cleanup-modules "mod_subpr" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90 b/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90
new file mode 100644
index 0000000000..13c823e747
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/alloc_comp_2.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+!
+! PR fortran/56929
+!
+! Contributed by Damian Rouson
+!
+! Allocatable scalar corrays were mishandled (ICE)
+!
+module parent_coarray_component
+ type parent
+ real, allocatable :: dummy[:]
+ end type
+ type, extends(parent) :: child
+ end type
+contains
+ subroutine do_something(this)
+ class(child) this
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray/caf.exp b/gcc/testsuite/gfortran.dg/coarray/caf.exp
index c7e46f6bed..011b5c9d61 100644
--- a/gcc/testsuite/gfortran.dg/coarray/caf.exp
+++ b/gcc/testsuite/gfortran.dg/coarray/caf.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -61,15 +61,18 @@ foreach test [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]]
set option_list [list { -O2 } ]
set nshort [file tail [file dirname $test]]/[file tail $test]
+ list-module-names $test
foreach flags $option_list {
verbose "Testing $nshort (single), $flags" 1
dg-test $test "-fcoarray=single $flags" ""
+ cleanup-modules ""
}
foreach flags $option_list {
verbose "Testing $nshort (libcaf_single), $flags" 1
dg-test $test "-fcoarray=lib $flags -lcaf_single" ""
+ cleanup-modules ""
}
}
torture-finish
diff --git a/gcc/testsuite/gfortran.dg/coarray/lib_realloc_1.f90 b/gcc/testsuite/gfortran.dg/coarray/lib_realloc_1.f90
new file mode 100644
index 0000000000..f3d7f35f27
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/lib_realloc_1.f90
@@ -0,0 +1,29 @@
+! { dg-do run }
+!
+! Test that for CAF components _gfortran_caf_deregister is called
+! Test that norealloc happens for CAF components during assignment
+!
+module m
+type t
+ integer, allocatable :: CAF[:]
+end type t
+end module m
+
+program main
+use m
+type(t), target :: x,y
+integer, pointer :: ptr
+allocate(x%caf[*], y%caf[*])
+ptr => y%caf
+ptr = 6
+if (.not.allocated(x%caf)) call abort()
+if (.not.allocated(y%caf)) call abort()
+if (y%caf /= 6) call abort ()
+x = y
+if (x%caf /= 6) call abort ()
+if (.not. associated (ptr,y%caf)) call abort()
+if (associated (ptr,x%caf)) call abort()
+ptr = 123
+if (y%caf /= 123) call abort ()
+if (x%caf /= 6) call abort ()
+end program main
diff --git a/gcc/testsuite/gfortran.dg/coarray/move_alloc_1.f90 b/gcc/testsuite/gfortran.dg/coarray/move_alloc_1.f90
new file mode 100644
index 0000000000..1f32052248
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/move_alloc_1.f90
@@ -0,0 +1,24 @@
+! { dg-do run }
+!
+! PR fortran/53526
+!
+! Check handling of move_alloc with coarrays
+!
+implicit none
+integer, allocatable :: u[:], v[:], w(:)[:,:], x(:)[:,:]
+
+allocate (u[4:*])
+call move_alloc (u, v)
+if (allocated (u)) call abort ()
+if (lcobound (v, dim=1) /= 4) call abort ()
+if (ucobound (v, dim=1) /= 3 + num_images()) call abort ()
+
+allocate (w(-2:3)[4:5,-1:*])
+call move_alloc (w, x)
+if (allocated (w)) call abort ()
+if (lbound (x, dim=1) /= -2) call abort ()
+if (ubound (x, dim=1) /= 3) call abort ()
+if (any (lcobound (x) /= [4, -1])) call abort ()
+if (any (ucobound (x) /= [5, -2 + (num_images()+1)/2])) call abort ()
+
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray/registering_1.f90 b/gcc/testsuite/gfortran.dg/coarray/registering_1.f90
index c6bcf92c18..a18ba615af 100644
--- a/gcc/testsuite/gfortran.dg/coarray/registering_1.f90
+++ b/gcc/testsuite/gfortran.dg/coarray/registering_1.f90
@@ -39,5 +39,3 @@ contains
if (not_refed /= 784) call abort()
end subroutine uncalled
end subroutine test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray/sync_3.f90 b/gcc/testsuite/gfortran.dg/coarray/sync_3.f90
new file mode 100644
index 0000000000..205a787767
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray/sync_3.f90
@@ -0,0 +1,75 @@
+! { dg-do run }
+! { dg-options "-fcheck=all" }
+! { dg-shouldfail "Invalid image number -1 in SYNC IMAGES" }
+!
+! As sync_1, but with bounds checking enabled.
+! PR fortran/52161
+!
+! Coarray support
+! PR fortran/18918
+
+implicit none
+integer :: n
+character(len=30) :: str
+critical
+end critical
+myCr: critical
+end critical myCr
+
+!
+! Test SYNC ALL
+!
+sync all
+sync all ( )
+sync all (errmsg=str)
+
+n = 5
+sync all (stat=n)
+if (n /= 0) call abort()
+
+n = 5
+sync all (stat=n,errmsg=str)
+if (n /= 0) call abort()
+
+
+!
+! Test SYNC MEMORY
+!
+sync memory
+sync memory ( )
+sync memory (errmsg=str)
+
+n = 5
+sync memory (stat=n)
+if (n /= 0) call abort()
+
+n = 5
+sync memory (errmsg=str,stat=n)
+if (n /= 0) call abort()
+
+
+!
+! Test SYNC IMAGES
+!
+sync images (*)
+if (this_image() == 1) then
+ sync images (1)
+ sync images (1, errmsg=str)
+ sync images ([1])
+end if
+
+n = 5
+sync images (*, stat=n)
+if (n /= 0) call abort()
+
+n = 5
+sync images (*,errmsg=str,stat=n)
+if (n /= 0) call abort()
+
+n = -1
+sync images ( num_images() )
+sync images (n) ! Invalid: "-1"
+
+end
+
+! { dg-output "Fortran runtime error: Invalid image number -1 in SYNC IMAGES" }
diff --git a/gcc/testsuite/gfortran.dg/coarray_14.f90 b/gcc/testsuite/gfortran.dg/coarray_14.f90
index 49188d60e1..d7eb6b6be0 100644
--- a/gcc/testsuite/gfortran.dg/coarray_14.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_14.f90
@@ -47,9 +47,7 @@ end subroutine test
program myTest
type t
end type t
-type(t), allocatable :: a[:]
+class(t), allocatable :: a[:]
allocate (t :: a) ! { dg-error "Coarray specification required in ALLOCATE statement" }
allocate (t :: a[*]) ! OK
end program myTest
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_15.f90 b/gcc/testsuite/gfortran.dg/coarray_15.f90
index 0aecb2f4e1..ee01e61ccc 100644
--- a/gcc/testsuite/gfortran.dg/coarray_15.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_15.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-fcoarray=single" }
+! { dg-options "-fcoarray=single -Wzerotrip" }
!
! PR fortran/18918
!
diff --git a/gcc/testsuite/gfortran.dg/coarray_19.f90 b/gcc/testsuite/gfortran.dg/coarray_19.f90
index cbb1dd20d8..637750a612 100644
--- a/gcc/testsuite/gfortran.dg/coarray_19.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_19.f90
@@ -23,5 +23,3 @@ end module m
! as->cotype was not AS_DEFERERED.
use m
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_21.f90 b/gcc/testsuite/gfortran.dg/coarray_21.f90
index 8aa0aa6c5a..e805cf68a0 100644
--- a/gcc/testsuite/gfortran.dg/coarray_21.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_21.f90
@@ -22,6 +22,3 @@ program test
type(pct) :: picture[*]
allocate(picture%data(size, size))
end program test
-
-
-! { dg-final { cleanup-modules "mod_reduction" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_27.f90 b/gcc/testsuite/gfortran.dg/coarray_27.f90
new file mode 100644
index 0000000000..de9cfad8df
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_27.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! Coarray/coindex checks for MOVE_ALLOC
+!
+integer, allocatable :: a(:), b(:)[:,:], c(:)[:,:]
+
+type t
+ integer, allocatable :: d(:)
+end type t
+type(t) :: x[*]
+class(t), allocatable :: y[:], z[:], u
+
+
+call move_alloc (A, b) ! { dg-error "must have the same corank" }
+call move_alloc (c, A) ! { dg-error "must have the same corank" }
+call move_alloc (b, c) ! OK - same corank
+
+call move_alloc (u, y) ! { dg-error "must have the same corank" }
+call move_alloc (z, u) ! { dg-error "must have the same corank" }
+call move_alloc (y, z) ! OK - same corank
+
+
+call move_alloc (x%d, a) ! OK
+call move_alloc (a, x%d) ! OK
+call move_alloc (x[1]%d, a) ! { dg-error "The FROM argument to MOVE_ALLOC at .1. shall not be coindexed" }
+call move_alloc (a, x[1]%d) ! { dg-error "The TO argument to MOVE_ALLOC at .1. shall not be coindexed" }
+
+call move_alloc (y%d, a) ! OK
+call move_alloc (a, y%d) ! OK
+call move_alloc (y[1]%d, a) ! { dg-error "The FROM argument to MOVE_ALLOC at .1. shall not be coindexed" }
+call move_alloc (a, y[1]%d) ! { dg-error "The TO argument to MOVE_ALLOC at .1. shall not be coindexed" }
+
+end
diff --git a/gcc/testsuite/gfortran.dg/coarray_29_1.f90 b/gcc/testsuite/gfortran.dg/coarray_29_1.f90
new file mode 100644
index 0000000000..2c49b1c646
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_29_1.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+
+! To be used by coarray_29_2.f90
+! PR fortran/55272
+
+module co_sum_module
+ implicit none
+contains
+ subroutine co_sum(scalar)
+ integer scalar[*]
+ end subroutine
+end module
+
+! DO NOT CLEAN UP THE MODULE FILE - coarray_29_2.f90 does it.
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_29_2.f90 b/gcc/testsuite/gfortran.dg/coarray_29_2.f90
new file mode 100644
index 0000000000..8c0e81f863
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_29_2.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+
+! Requires that coarray_29.f90 has been compiled before
+! and that, thus, co_sum_module is available
+
+! PR fortran/55272
+!
+! Contributed by Damian Rouson
+
+program main
+ use co_sum_module
+ implicit none
+ integer score[*]
+ call co_sum(score)
+end program
+
+! { dg-final { cleanup-modules "co_sum_module" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_30.f90 b/gcc/testsuite/gfortran.dg/coarray_30.f90
new file mode 100644
index 0000000000..2cfb50abfb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_30.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single -fdump-tree-original" }
+!
+! PR fortran/57093
+!
+! Contributed by Damian Rouson
+!
+program main
+ character(len=25), allocatable :: greeting[:]
+ allocate(greeting[*])
+ write(greeting,"(a)") "z"
+end
+
+! { dg-final { scan-tree-dump-times "greeting.data = \\(void . restrict\\) __builtin_malloc \\(25\\);" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_31.f90 b/gcc/testsuite/gfortran.dg/coarray_31.f90
new file mode 100644
index 0000000000..bab8b0aecf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_31.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original -fcoarray=single" }
+!
+! PR fortran/57906
+! PR fortran/52052
+!
+type t
+ integer, allocatable :: x(:)[:]
+ class(*), allocatable :: z(:)[:]
+ class(*), allocatable :: d[:]
+end type t
+type t2
+ type(t) :: y
+end type t2
+type(t2) :: a, b
+a = b
+end
+
+! { dg-final { scan-tree-dump "a.y.x.data = D.\[0-9\]+.y.x.data;" "original" } }
+! { dg-final { scan-tree-dump "a.y.z._data.data = D.\[0-9\]+.y.z._data.data;" "original" } }
+! { dg-final { scan-tree-dump "a.y.d._data.data = D.\[0-9\]+.y.d._data.data;" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_6.f90 b/gcc/testsuite/gfortran.dg/coarray_6.f90
index d3c600b361..f44ac01597 100644
--- a/gcc/testsuite/gfortran.dg/coarray_6.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_6.f90
@@ -75,11 +75,9 @@ subroutine valid(a)
type t2
type(t) :: b
end type t2
- type(t2), save :: xt2[*]
+ type(t2), save :: xt2[*] ! { dg-error "nonpointer, nonallocatable scalar, which is not a coarray" }
end subroutine valid
program main
integer :: A[*] ! Valid, implicit SAVE attribute
end program main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_8.f90 b/gcc/testsuite/gfortran.dg/coarray_8.f90
index 6ceba8b9a9..91d6e9a57a 100644
--- a/gcc/testsuite/gfortran.dg/coarray_8.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_8.f90
@@ -112,7 +112,7 @@ contains
type(t),allocatable :: x[:]
type(t) :: y
x = y
- x[1] = y ! { dg-error "must not be have an allocatable ultimate component" }
+ x[1] = y ! { dg-error "must not have an allocatable ultimate component" }
end subroutine assign2
end module mmm3
@@ -187,5 +187,3 @@ subroutine assign42()
integer, allocatable :: z(:)[:]
z(:)[1] = z
end subroutine assign42
-
-! { dg-final { cleanup-modules "mod2 m mmm3 mmm4" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_allocate_1.f90 b/gcc/testsuite/gfortran.dg/coarray_allocate_1.f90
new file mode 100644
index 0000000000..b2f3136f08
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_allocate_1.f90
@@ -0,0 +1,95 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+! PR 53824 - this used to ICE.
+! Original test case by Vladimír Fuka
+program Jac
+ implicit none
+
+ integer,parameter:: KND=KIND(1.0)
+
+ type Domain
+ real(KND),dimension(:,:,:),allocatable:: A,B
+ integer :: n=64,niter=20000,blockit=1000
+ integer :: starti,endi
+ integer :: startj,endj
+ integer :: startk,endk
+ integer,dimension(:),allocatable :: startsi,startsj,startsk
+ integer,dimension(:),allocatable :: endsi,endsj,endsk
+ end type
+
+ type(Domain),allocatable :: D[:,:,:]
+! real(KND),codimension[*] :: sumA,sumB,diffAB
+ integer i,j,k,ncom
+ integer nims,nxims,nyims,nzims
+ integer im,iim,jim,kim
+ character(20):: ch
+
+ nims = num_images()
+ nxims = nint(nims**(1./3.))
+ nyims = nint(nims**(1./3.))
+ nzims = nims / (nxims*nyims)
+
+ im = this_image()
+ if (im==1) write(*,*) "n: [",nxims,nyims,nzims,"]"
+
+ kim = (im-1) / (nxims*nyims) + 1
+ jim = ((im-1) - (kim-1)*(nxims*nyims)) / nxims + 1
+ iim = (im-1) - (kim-1)*(nxims*nyims) - (jim-1)*(nxims) + 1
+
+ write (*,*) im,"[",iim,jim,kim,"]"
+
+ allocate(D[nxims,nyims,*])
+
+ ncom=command_argument_count()
+ if (command_argument_count() >=2) then
+ call get_command_argument(1,value=ch)
+ read (ch,*) D%n
+ call get_command_argument(2,value=ch)
+ read (ch,*) D%niter
+ call get_command_argument(3,value=ch)
+ read (ch,*) D%blockit
+ end if
+
+ allocate(D%startsi(nxims))
+ allocate(D%startsj(nyims))
+ allocate(D%startsk(nzims))
+ allocate(D%endsi(nxims))
+ allocate(D%endsj(nyims))
+ allocate(D%endsk(nzims))
+
+ D%startsi(1) = 1
+ do i=2,nxims
+ D%startsi(i) = D%startsi(i-1) + D%n/nxims
+ end do
+ D%endsi(nxims) = D%n
+ D%endsi(1:nxims-1) = D%startsi(2:nxims) - 1
+
+ D%startsj(1) = 1
+ do j=2,nyims
+ D%startsj(j) = D%startsj(j-1) + D%n/nyims
+ end do
+ D%endsj(nyims) = D%n
+ D%endsj(1:nyims-1) = D%startsj(2:nyims) - 1
+
+ D%startsk(1) = 1
+ do k=2,nzims
+ D%startsk(k) = D%startsk(k-1) + D%n/nzims
+ end do
+ D%endsk(nzims) = D%n
+ D%endsk(1:nzims-1) = D%startsk(2:nzims) - 1
+
+ D%starti = D%startsi(iim)
+ D%endi = D%endsi(iim)
+ D%startj = D%startsj(jim)
+ D%endj = D%endsj(jim)
+ D%startk = D%startsk(kim)
+ D%endk = D%endsk(kim)
+
+ write(*,*) D%startsi,D%endsi
+ write(*,*) D%startsj,D%endsj
+ write(*,*) D%startsk,D%endsk
+
+ !$hmpp JacKernel allocate, args[A,B].size={0:D%n+1,0:D%n+1,0:D%n+1}
+ allocate(D%A(D%starti-1:D%endi+1,D%startj-1:D%endj+1,D%startk-1:D%endk+1),&
+ D%B(D%starti-1:D%endi+1,D%startj-1:D%endj+1,D%startk-1:D%endk+1))
+end program Jac
diff --git a/gcc/testsuite/gfortran.dg/coarray_args_2.f90 b/gcc/testsuite/gfortran.dg/coarray_args_2.f90
index 66a5a921c6..c7dc490cc4 100644
--- a/gcc/testsuite/gfortran.dg/coarray_args_2.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_args_2.f90
@@ -46,5 +46,3 @@ program rank_mismatch_02
write(*, *) 'OK'
end if
end program
-
-! { dg-final { cleanup-modules "mod_rank_mismatch_02" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_class_1.f90 b/gcc/testsuite/gfortran.dg/coarray_class_1.f90
new file mode 100644
index 0000000000..1644166bcf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_class_1.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/51632
+!
+! Was rejected before as __def_init and __copy were
+! resolved and coarray components aren't valid in this
+! context
+!
+module periodic_2nd_order_module
+ implicit none
+
+ type periodic_2nd_order
+ real, allocatable :: global_f(:)[:]
+ contains
+ procedure :: output
+ end type
+
+contains
+ subroutine output (this)
+ class(periodic_2nd_order), intent(in) :: this
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f90
index c0d06a4bd2..926d531ef7 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_1.f90
@@ -4,6 +4,7 @@
! Allocate/deallocate with libcaf.
!
+ subroutine test()
integer(4), allocatable :: xx[:], yy(:)[:]
integer :: stat
character(len=200) :: errmsg
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f90
index 3aaff1e8c3..472e0beb71 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_2.f90
@@ -4,6 +4,7 @@
! Allocate/deallocate with libcaf.
!
+ subroutine test()
type t
end type t
class(t), allocatable :: xx[:], yy(:)[:]
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_alloc_3.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_3.f90
new file mode 100644
index 0000000000..bec7ee225f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_alloc_3.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdump-tree-original" }
+!
+! Allocate/deallocate with libcaf.
+!
+! As coarray_lib_alloc_2.f90 but for a subroutine instead of the PROGRAM
+!
+subroutine test
+ type t
+ end type t
+ class(t), allocatable :: xx[:], yy(:)[:]
+ integer :: stat
+ character(len=200) :: errmsg
+ allocate(xx[*], stat=stat, errmsg=errmsg)
+ allocate(yy(2)[*], stat=stat, errmsg=errmsg)
+ deallocate(xx,yy,stat=stat, errmsg=errmsg)
+ end
+
+! { dg-final { scan-tree-dump-times "_gfortran_caf_register .1, 1, &xx._data.token, &stat.., &errmsg, 200.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_register .1, 1, &yy._data.token, &stat.., &errmsg, 200.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&xx._data.token, &stat.., &errmsg, 200.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&yy._data.token, &stat.., &errmsg, 200.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&yy._data.token, 0B, 0B, 0.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister .&xx._data.token, 0B, 0B, 0.;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_move_alloc_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_move_alloc_1.f90
new file mode 100644
index 0000000000..fef9d718bf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_move_alloc_1.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=lib -fdump-tree-original" }
+!
+! PR fortran/53526
+!
+! Check handling of move_alloc with coarrays
+
+subroutine ma_scalar (aa, bb)
+ integer, allocatable :: aa[:], bb[:]
+ call move_alloc(aa,bb)
+end
+
+subroutine ma_array (cc, dd)
+ integer, allocatable :: cc(:)[:], dd(:)[:]
+ call move_alloc (cc, dd)
+end
+
+! { dg-final { scan-tree-dump-times "free" 0 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_sync_all" 2 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister" 2 "original" } }
+! { dg-final { scan-tree-dump-times "\\*bb = \\*aa" 1 "original" } }
+! { dg-final { scan-tree-dump-times "\\*dd = \\*cc" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_realloc_1.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_realloc_1.f90
new file mode 100644
index 0000000000..60d4456323
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_realloc_1.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original -fcoarray=lib" }
+!
+! PR fortran/52052
+!
+! Test that for CAF components _gfortran_caf_deregister is called
+! Test that norealloc happens for CAF components during assignment
+!
+module m
+type t
+ integer, allocatable :: CAF[:]
+ integer, allocatable :: ii
+end type t
+end module m
+
+subroutine foo()
+use m
+type(t) :: x,y
+if (allocated(x%caf)) call abort()
+x = y
+end
+
+! For comp%ii: End of scope of x + y (2x) and for the LHS of the assignment (1x)
+! { dg-final { scan-tree-dump-times "__builtin_free" 3 "original" } }
+
+! For comp%CAF: End of scope of x + y (2x); no LHS freeing for the CAF in assignment
+! { dg-final { scan-tree-dump-times "_gfortran_caf_deregister" 2 "original" } }
+
+! Only malloc "ii":
+! { dg-final { scan-tree-dump-times "__builtin_malloc" 1 "original" } }
+
+! But copy "ii" and "CAF":
+! { dg-final { scan-tree-dump-times "__builtin_memcpy" 2 "original" } }
+
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_token_2.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_token_2.f90
index 0631154701..fe4df3b0da 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lib_token_2.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_token_2.f90
@@ -113,4 +113,3 @@ end program main
! { dg-final { scan-tree-dump-times "sub_opt \\(.integer.kind=4. .. caf.data, caf.token, 0\\)" 1 "original" } }
!
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "matrix_data" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_lib_token_4.f90 b/gcc/testsuite/gfortran.dg/coarray_lib_token_4.f90
index 2616d257d9..43da9f4c90 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lib_token_4.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lib_token_4.f90
@@ -40,7 +40,6 @@ end program test_caf
! { dg-final { scan-tree-dump-times "foo \\(struct array2_integer\\(kind=4\\) & restrict x, struct array2_integer\\(kind=4\\) & restrict y, integer\\(kind=4\\) & restrict test, void . restrict caf_token.\[0-9\]+, integer\\(kind=.\\) caf_offset.\[0-9\]+, void . restrict caf_token.\[0-9\]+, integer\\(kind=.\\) caf_offset.\[0-9\]+\\)" 1 "original" } }
!
! { dg-final { scan-tree-dump-times "bar \\(&parm.\[0-9\]+, caf_token.\[0-9\]+, \\(\\(integer\\(kind=.\\)\\) parm.\[0-9\]+.data - \\(integer\\(kind=.\\)\\) x.\[0-9\]+\\) \\+ caf_offset.\[0-9\]+\\);" 1 "original" } }
-! { d_g-final { scan-tree-dump-times "bar \\(&parm.\[0-9\]+, caf_token.\[0-9\]+, \\(\\(integer\\(kind=.\\) parm.\[0-9\]+.data - \\(integer\\(kind=.\\)\\) x.\[0-9\]+\\) \\+ caf_offset.\[0-9\]+\\);" 1 "original" } }
!
! { dg-final { scan-tree-dump-times "expl \\(\\(integer\\(kind=4\\).0:. .\\) parm.\[0-9\]+.data, caf_token.\[0-9\]+, \\(\\(integer\\(kind=.\\)\\) parm.\[0-9\]+.data - \\(\\(integer\\(kind=.\\)\\) y.\[0-9\]+\\) \\+ caf_offset.\[0-9\]+\\);" 0 "original" } }
!
diff --git a/gcc/testsuite/gfortran.dg/coarray_lock_3.f90 b/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
index 958cee4c09..388857307f 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lock_3.f90
@@ -113,5 +113,3 @@ contains
type(lock_type), intent(in) :: x[*]
end subroutine test
end subroutine argument_check
-
-! { dg-final { cleanup-modules "m m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_lock_5.f90 b/gcc/testsuite/gfortran.dg/coarray_lock_5.f90
index aac9027985..b419606b0d 100644
--- a/gcc/testsuite/gfortran.dg/coarray_lock_5.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_lock_5.f90
@@ -49,5 +49,3 @@ subroutine test2()
integer, allocatable :: d[:] ! { dg-error "Noncoarray component c at .1. of type LOCK_TYPE or with subcomponent of type LOCK_TYPE must have a codimension or be a subcomponent of a coarray. .Variables of type t5 may not have a codimension as d at .2. has a codimension or a coarray subcomponent." }
end type t5
end subroutine test2
-
-! { dg-final { cleanup-modules "m3" } }
diff --git a/gcc/testsuite/gfortran.dg/coarray_poly_3.f90 b/gcc/testsuite/gfortran.dg/coarray_poly_3.f90
index e6b19ae893..fd46206ea1 100644
--- a/gcc/testsuite/gfortran.dg/coarray_poly_3.f90
+++ b/gcc/testsuite/gfortran.dg/coarray_poly_3.f90
@@ -3,13 +3,13 @@
!
-subroutine cont1(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape array" }
+subroutine cont1(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array" }
type t
end type t
class(t), contiguous, allocatable :: x(:)
end
-subroutine cont2(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape array" }
+subroutine cont2(x) ! { dg-error "has the CONTIGUOUS attribute but is not an array pointer or an assumed-shape or assumed-rank array" }
type t
end type t
class(t), contiguous, allocatable :: x(:)[:]
@@ -25,7 +25,7 @@ end
function func() ! { dg-error "shall not be a coarray or have a coarray component" }
type t
end type t
- class(t), allocatable :: func[*] ! { dg-error ""
+ class(t), allocatable :: func[*]
end
function func2() ! { dg-error "must be dummy, allocatable or pointer" }
@@ -33,7 +33,7 @@ function func2() ! { dg-error "must be dummy, allocatable or pointer" }
integer, allocatable :: caf[:]
end type t
class(t) :: func2a ! { dg-error "CLASS variable 'func2a' at .1. must be dummy, allocatable or pointer" }
- class(t) :: func2 ! {CLASS variable 'func' at (1) must be dummy, allocatable or pointer
+ class(t) :: func2
end
subroutine foo1(x1) ! { dg-error "Coarray variable 'x1' at .1. shall not have codimensions with deferred shape" }
diff --git a/gcc/testsuite/gfortran.dg/com_block_driver.f90 b/gcc/testsuite/gfortran.dg/com_block_driver.f90
index 691a40fe59..0445635c88 100644
--- a/gcc/testsuite/gfortran.dg/com_block_driver.f90
+++ b/gcc/testsuite/gfortran.dg/com_block_driver.f90
@@ -32,5 +32,3 @@ program comBlockDriver
call testTypes()
end program comBlockDriver
-
-! { dg-final { cleanup-modules "mycommodule comblocktests" } }
diff --git a/gcc/testsuite/gfortran.dg/common_12.f90 b/gcc/testsuite/gfortran.dg/common_12.f90
index 0eea80f03b..39082f8931 100644
--- a/gcc/testsuite/gfortran.dg/common_12.f90
+++ b/gcc/testsuite/gfortran.dg/common_12.f90
@@ -14,5 +14,3 @@ contains
call bar(z0)
end subroutine foo
end module
-
-! { dg-final { cleanup-modules "pr39594" } }
diff --git a/gcc/testsuite/gfortran.dg/common_14.f90 b/gcc/testsuite/gfortran.dg/common_14.f90
index 892e4a5705..911d695e15 100644
--- a/gcc/testsuite/gfortran.dg/common_14.f90
+++ b/gcc/testsuite/gfortran.dg/common_14.f90
@@ -24,5 +24,3 @@ end
call two()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/common_17.f90 b/gcc/testsuite/gfortran.dg/common_17.f90
index 8ac21e7afd..bc9602dd9f 100644
--- a/gcc/testsuite/gfortran.dg/common_17.f90
+++ b/gcc/testsuite/gfortran.dg/common_17.f90
@@ -8,4 +8,3 @@ module foo
integer:: a, b
common a
end module foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/common_18.f90 b/gcc/testsuite/gfortran.dg/common_18.f90
new file mode 100644
index 0000000000..374eda8eee
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_18.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/48858
+!
+!
+use iso_c_binding
+contains
+subroutine one()
+ bind(C, name="com1") :: /foo/
+ integer(c_int) :: a
+ common /foo/ a
+end subroutine
+subroutine two()
+ integer(c_long) :: a
+ common /foo/ a
+end subroutine two
+end
+
+! { dg-final { scan-assembler "com1" } }
+! { dg-final { scan-assembler "foo_" } }
diff --git a/gcc/testsuite/gfortran.dg/common_19.f90 b/gcc/testsuite/gfortran.dg/common_19.f90
new file mode 100644
index 0000000000..020420193e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_19.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+!
+! PR fortran/48858
+!
+integer :: i
+common /foo/ i
+bind(C) :: /foo/ ! { dg-error "Fortran 2003: BIND.C. statement" }
+end
diff --git a/gcc/testsuite/gfortran.dg/common_20.f90 b/gcc/testsuite/gfortran.dg/common_20.f90
new file mode 100644
index 0000000000..836a9ecb3e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_20.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/48858
+!
+subroutine test
+ integer :: l, m
+ common /g/ l ! { dg-error "Fortran 2008: COMMON block 'g' with binding label at .1. sharing the identifier with global non-COMMON-block entity at .2." }
+ common /jj/ m ! { dg-error "Global name 'jj' at .1. is already being used as a COMMON at .2." }
+ bind(C,name="bar") :: /g/
+ bind(C,name="foo") :: /jj/
+end
+
+subroutine g ! { dg-error "Fortran 2008: COMMON block 'g' with binding label at .1. sharing the identifier with global non-COMMON-block entity at .2." }
+ call jj() ! { dg-error "Global name 'jj' at .1. is already being used as a COMMON at .2." }
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/common_21.f90 b/gcc/testsuite/gfortran.dg/common_21.f90
new file mode 100644
index 0000000000..73a1b58a1a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/common_21.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! PR fortran/48858
+!
+subroutine test
+ integer :: l, m
+ common /g/ l
+ common /jj/ m
+ bind(C,name="bar") :: /g/
+ bind(C,name="foo") :: /jj/
+end
+
+subroutine g
+ call jj()
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90 b/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90
index 49b8eaaa68..1f76f0ad05 100644
--- a/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90
+++ b/gcc/testsuite/gfortran.dg/complex_intrinsic_5.f90
@@ -217,5 +217,3 @@ PROGRAM ArcTrigHyp
call check(atanh(z4), cmplx(-0.38187020129010862908881230531688930_4, -1.07198475450905931839240655913126728_4, kind=4))
call check(atanh(z8), cmplx(-0.38187020129010862908881230531688930_8, -1.07198475450905931839240655913126728_8, kind=8))
END PROGRAM ArcTrigHyp
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_1.f90 b/gcc/testsuite/gfortran.dg/constructor_1.f90
index e8fe03ac38..7b995f52b1 100644
--- a/gcc/testsuite/gfortran.dg/constructor_1.f90
+++ b/gcc/testsuite/gfortran.dg/constructor_1.f90
@@ -38,5 +38,3 @@ program myuse
c = mycomplex(x=0.0, y=1.0) ! A function reference
c = mycomplex(0.0, 1.0) ! A function reference
end program myuse
-
-! { dg-final { cleanup-modules "mycomplex_module" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_3.f90 b/gcc/testsuite/gfortran.dg/constructor_3.f90
index 4015090bce..badff3f6af 100644
--- a/gcc/testsuite/gfortran.dg/constructor_3.f90
+++ b/gcc/testsuite/gfortran.dg/constructor_3.f90
@@ -43,5 +43,3 @@ if (k /= 42) call abort ()
!print *, x%j
!print *, k
end
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_5.f90 b/gcc/testsuite/gfortran.dg/constructor_5.f90
index ab9c9f2f5e..197e082fed 100644
--- a/gcc/testsuite/gfortran.dg/constructor_5.f90
+++ b/gcc/testsuite/gfortran.dg/constructor_5.f90
@@ -30,5 +30,3 @@ contains
type(t2) :: f2
end function
end module
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_6.f90 b/gcc/testsuite/gfortran.dg/constructor_6.f90
index 00b99f2eba..84b6f375c3 100644
--- a/gcc/testsuite/gfortran.dg/constructor_6.f90
+++ b/gcc/testsuite/gfortran.dg/constructor_6.f90
@@ -167,5 +167,3 @@ program Struct_over
if (my_test_cnt /= 6) call abort()
end program Struct_over
-
-! { dg-final { cleanup-modules "test_cnt rational temp_node" } }
diff --git a/gcc/testsuite/gfortran.dg/constructor_9.f90 b/gcc/testsuite/gfortran.dg/constructor_9.f90
new file mode 100644
index 0000000000..5196703031
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/constructor_9.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR 58471: [4.8/4.9 Regression] ICE on invalid with missing type constructor and -Wall
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module cf
+ implicit none
+ type :: cfmde
+ end type
+ interface cfmde
+ module procedure mdedc ! { dg-error "is neither function nor subroutine" }
+ end interface
+contains
+ subroutine cfi()
+ type(cfmde), pointer :: cfd
+ cfd=cfmde() ! { dg-error "Can't convert" }
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "cf" } }
diff --git a/gcc/testsuite/gfortran.dg/contained_1.f90 b/gcc/testsuite/gfortran.dg/contained_1.f90
index 05216b2285..9b6e439549 100644
--- a/gcc/testsuite/gfortran.dg/contained_1.f90
+++ b/gcc/testsuite/gfortran.dg/contained_1.f90
@@ -31,5 +31,3 @@ program contained_1
call a
if (i .ne. 1) call abort
end program
-
-! { dg-final { cleanup-modules "contained_1_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/contained_3.f90 b/gcc/testsuite/gfortran.dg/contained_3.f90
index 5ae41597c0..d5543a149f 100644
--- a/gcc/testsuite/gfortran.dg/contained_3.f90
+++ b/gcc/testsuite/gfortran.dg/contained_3.f90
@@ -46,5 +46,3 @@ END PROGRAM test
INTEGER FUNCTION setbd()
setbd=42
END FUNCTION setbd
-
-! { dg-final { cleanup-modules "ksbin1_aux_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/contained_module_proc_1.f90 b/gcc/testsuite/gfortran.dg/contained_module_proc_1.f90
index a1e5892937..a6c2462f64 100644
--- a/gcc/testsuite/gfortran.dg/contained_module_proc_1.f90
+++ b/gcc/testsuite/gfortran.dg/contained_module_proc_1.f90
@@ -36,5 +36,3 @@ program fire
implicit none
if(.not. is_gfortran()) call abort()
end program fire
-! { dg-final { cleanup-modules "chk_gfortran" } }
-
diff --git a/gcc/testsuite/gfortran.dg/contains_empty_2.f03 b/gcc/testsuite/gfortran.dg/contains_empty_2.f03
index 62e18f43d1..b530d89d70 100644
--- a/gcc/testsuite/gfortran.dg/contains_empty_2.f03
+++ b/gcc/testsuite/gfortran.dg/contains_empty_2.f03
@@ -10,5 +10,3 @@ module truc
integer, parameter :: answer = 42
contains
end module truc
-
-! { dg-final { cleanup-modules "truc" } }
diff --git a/gcc/testsuite/gfortran.dg/contiguous_1.f90 b/gcc/testsuite/gfortran.dg/contiguous_1.f90
index e75c08d8ef..78c84cbbe0 100644
--- a/gcc/testsuite/gfortran.dg/contiguous_1.f90
+++ b/gcc/testsuite/gfortran.dg/contiguous_1.f90
@@ -129,7 +129,7 @@ subroutine C1241
integer, pointer, contiguous :: a(:)
integer, pointer :: b(:)
call test(a)
- call test(b) ! { dg-error "must be simply contigous" }
+ call test(b) ! { dg-error "must be simply contiguous" }
contains
subroutine test(x)
integer, pointer, contiguous :: x(:)
@@ -169,7 +169,7 @@ end subroutine sect12528
subroutine test34
implicit none
integer, volatile,pointer :: a(:,:),i
- call foo(a(2,2:3:2)) ! { dg-error "must be simply contigous" }
+ call foo(a(2,2:3:2)) ! { dg-error "must be simply contiguous" }
contains
subroutine foo(x)
integer, pointer, contiguous, volatile :: x(:)
diff --git a/gcc/testsuite/gfortran.dg/continuation_9.f90 b/gcc/testsuite/gfortran.dg/continuation_9.f90
index 04a7c331e2..87c0cfafa8 100644
--- a/gcc/testsuite/gfortran.dg/continuation_9.f90
+++ b/gcc/testsuite/gfortran.dg/continuation_9.f90
@@ -4,6 +4,6 @@
&
&
end
-! { dg-warning "not allowed by itself in line 3" "" {target "*-*-*"} 0 }
-! { dg-warning "not allowed by itself in line 4" "" {target "*-*-*"} 0 }
-! { dg-warning "not allowed by itself in line 5" "" {target "*-*-*"} 0 }
+! { dg-warning "not allowed by itself in line 3" "" { target *-*-* } 0 }
+! { dg-warning "not allowed by itself in line 4" "" { target *-*-* } 0 }
+! { dg-warning "not allowed by itself in line 5" "" { target *-*-* } 0 }
diff --git a/gcc/testsuite/gfortran.dg/convert_1.f90 b/gcc/testsuite/gfortran.dg/convert_1.f90
index 97ebc65bc7..0723cd012f 100644
--- a/gcc/testsuite/gfortran.dg/convert_1.f90
+++ b/gcc/testsuite/gfortran.dg/convert_1.f90
@@ -14,5 +14,3 @@ USE MODULE_A
USE MODULE_B
a = 0
END
-
-! { dg-final { cleanup-modules "module_a module_b" } }
diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_10.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_10.f90
new file mode 100644
index 0000000000..1ac98f3ea4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_10.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+! { dg-options "-fcray-pointer" }
+!
+! PR fortran/45187
+!
+module foo
+ implicit none
+ real :: a
+ pointer(c_a, a)
+end module foo
+
+program test
+ use foo
+ real :: z
+ c_a = loc(z)
+ a = 42
+ if (z /= 42) call abort
+end program test
diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_5.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_5.f90
index 21081194bc..76bb9791b8 100644
--- a/gcc/testsuite/gfortran.dg/cray_pointers_5.f90
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_5.f90
@@ -13,5 +13,3 @@ end module cray_pointers_5
ipt = loc (arr)
if (any (var .ne. (/1, 2, 3, 4, 5, 6, 7, 8, 9, 10/))) call abort
end
-
-! { dg-final { cleanup-modules "cray_pointers_5" } }
diff --git a/gcc/testsuite/gfortran.dg/cray_pointers_9.f90 b/gcc/testsuite/gfortran.dg/cray_pointers_9.f90
index 81bcb199a1..cdcd56f68f 100644
--- a/gcc/testsuite/gfortran.dg/cray_pointers_9.f90
+++ b/gcc/testsuite/gfortran.dg/cray_pointers_9.f90
@@ -101,4 +101,3 @@ program fptr
p = transfer(fp,p)
write(*,'(a)') fun([1,2,3])
end program fptr
-! { dg-final { cleanup-modules "funcs other_fun" } }
diff --git a/gcc/testsuite/gfortran.dg/data_constraints_1.f90 b/gcc/testsuite/gfortran.dg/data_constraints_1.f90
index bcf23ba34a..188eb7c6b8 100644
--- a/gcc/testsuite/gfortran.dg/data_constraints_1.f90
+++ b/gcc/testsuite/gfortran.dg/data_constraints_1.f90
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "" }
! Tests standard indepedendent constraints for variables in a data statement
!
! Contributed by Paul Thomas <pault@gcc.gnu.org>
@@ -28,5 +29,3 @@ contains
data foobar /0/ ! { dg-error "conflicts with FUNCTION" }
end function foobar
end
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/data_constraints_3.f90 b/gcc/testsuite/gfortran.dg/data_constraints_3.f90
new file mode 100644
index 0000000000..44aadb60fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/data_constraints_3.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+!
+! PR fortran/40881
+!
+integer :: a(3)
+print *, 'Hello'
+data a/3*5/ ! { dg-warning "Obsolescent feature: DATA statement at .1. after the first executable statement" }
+end
diff --git a/gcc/testsuite/gfortran.dg/data_namelist_conflict.f90 b/gcc/testsuite/gfortran.dg/data_namelist_conflict.f90
index b09f167fc7..177553c716 100644
--- a/gcc/testsuite/gfortran.dg/data_namelist_conflict.f90
+++ b/gcc/testsuite/gfortran.dg/data_namelist_conflict.f90
@@ -23,4 +23,3 @@ program test
if (i /= 0 .or. j /= 1) call abort
close(10)
end program
-! { dg-final { cleanup-modules "globals" } }
diff --git a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90 b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
index 5c00741f61..969ce257ef 100644
--- a/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
+++ b/gcc/testsuite/gfortran.dg/deallocate_alloc_opt_1.f90
@@ -24,7 +24,7 @@ program a
deallocate(i, errmsg=err) ! { dg-warning "useless without a STAT" }
deallocate(i, stat=j, errmsg=x) ! { dg-error "must be a scalar CHARACTER" }
- deallocate(err) ! { dg-error "nonprocedure pointer or an allocatable" }
+ deallocate(err) ! { dg-error "nonprocedure pointer nor an allocatable" }
deallocate(error,stat=j,errmsg=error(1)) ! { dg-error "shall not be DEALLOCATEd within" }
deallocate(i, stat = i(1)) ! { dg-error "shall not be DEALLOCATEd within" }
diff --git a/gcc/testsuite/gfortran.dg/debug/debug.exp b/gcc/testsuite/gfortran.dg/debug/debug.exp
index 0e0b4b91d0..d434750762 100644
--- a/gcc/testsuite/gfortran.dg/debug/debug.exp
+++ b/gcc/testsuite/gfortran.dg/debug/debug.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f b/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
index 4b518fe9e4..fd731994f3 100644
--- a/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
+++ b/gcc/testsuite/gfortran.dg/debug/pr35154-stabs.f
@@ -1,6 +1,6 @@
C Test program for common block debugging. G. Helffrich 11 July 2004.
C { dg-do compile }
-C { dg-skip-if "No stabs" { mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } }
+C { dg-skip-if "No stabs" { aarch64*-*-* mmix-*-* alpha*-*-* hppa*64*-*-* ia64-*-* *-*-vxworks* } { "*" } { "" } }
C { dg-skip-if "No stabs" {*-*-* } { "*" } { "-gstabs" } }
common i,j
common /label/l,m
diff --git a/gcc/testsuite/gfortran.dg/default_format_1.f90 b/gcc/testsuite/gfortran.dg/default_format_1.f90
index e374f1b895..65307bb471 100644
--- a/gcc/testsuite/gfortran.dg/default_format_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail spu-*-* } }
+! { dg-do run { xfail spu-*-* powerpc-ibm-aix* } }
! Test XFAILed on Darwin because the system's printf() lacks
! proper support for denormals.
!
@@ -24,4 +24,3 @@ program main
if (test (-huge(0.0_8), 1) /= 0) call abort
end program main
!
-! { dg-final { cleanup-modules "test_default_format" } }
diff --git a/gcc/testsuite/gfortran.dg/default_format_2.f90 b/gcc/testsuite/gfortran.dg/default_format_2.f90
index 2642467322..e970090aa1 100644
--- a/gcc/testsuite/gfortran.dg/default_format_2.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_2.f90
@@ -20,4 +20,3 @@ program main
if (test (-huge(0.0_kl), 1) /= 0) call abort
end program main
!
-! { dg-final { cleanup-modules "test_default_format" } }
diff --git a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90 b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
index 7c96053837..d74daacdd3 100644
--- a/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_denormal_1.f90
@@ -1,4 +1,4 @@
-! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* spu-*-* } }
+! { dg-do run { xfail *-*-darwin[89]* *-*-cygwin* spu-*-* powerpc-ibm-aix* } }
! Test XFAILed on these platforms because the system's printf() lacks
! proper support for denormals.
!
@@ -23,4 +23,3 @@ program main
end program main
!
-! { dg-final { cleanup-modules "test_default_format" } }
diff --git a/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90 b/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
index 36697067c7..6134a56253 100644
--- a/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
+++ b/gcc/testsuite/gfortran.dg/default_format_denormal_2.f90
@@ -1,6 +1,6 @@
! { dg-require-effective-target fortran_large_real }
-! { dg-do run { xfail powerpc*-apple-darwin* powerpc*-*-linux* } }
-! Test XFAILed on these platforms because the system's printf() lacks
+! { dg-do run { xfail powerpc*-apple-darwin* } }
+! Test XFAILed on this platform because the system's printf() lacks
! proper support for denormalized long doubles. See PR24685
!
! This tests that the default formats for formatted I/O of reals are
@@ -18,4 +18,3 @@ program main
if (test (-tiny(0.0_kl), 1) /= 0) call abort
end program main
!
-! { dg-final { cleanup-modules "test_default_format" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_1.f90 b/gcc/testsuite/gfortran.dg/default_initialization_1.f90
index b03b698f5c..6a76feb9f2 100644
--- a/gcc/testsuite/gfortran.dg/default_initialization_1.f90
+++ b/gcc/testsuite/gfortran.dg/default_initialization_1.f90
@@ -17,5 +17,3 @@ module bad
end type default_initialization
type (default_initialization) t ! { dg-error "default initialization" }
end module bad
-
-! { dg-final { cleanup-modules "bad" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_2.f90 b/gcc/testsuite/gfortran.dg/default_initialization_2.f90
index cc7ecdc406..d3595ee909 100644
--- a/gcc/testsuite/gfortran.dg/default_initialization_2.f90
+++ b/gcc/testsuite/gfortran.dg/default_initialization_2.f90
@@ -32,5 +32,3 @@ TYPE(BLOCK) MATRIX
POINTER MATRIX
ALLOCATE(MATRIX)
END
-
-! { dg-final { cleanup-modules "mat" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_3.f90 b/gcc/testsuite/gfortran.dg/default_initialization_3.f90
index 720b35523e..e0bd63d004 100644
--- a/gcc/testsuite/gfortran.dg/default_initialization_3.f90
+++ b/gcc/testsuite/gfortran.dg/default_initialization_3.f90
@@ -105,4 +105,3 @@ END
call other
call dominique
end
-! { dg-final { cleanup-modules "demo m1" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_4.f90 b/gcc/testsuite/gfortran.dg/default_initialization_4.f90
index 7a15ba2c37..b65020f187 100644
--- a/gcc/testsuite/gfortran.dg/default_initialization_4.f90
+++ b/gcc/testsuite/gfortran.dg/default_initialization_4.f90
@@ -19,4 +19,3 @@ if (t%x /= 42) call abort()
t%x = 0
if (t%x /= 0) call abort()
end
-! { dg-final { cleanup-modules "good" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_5.f90 b/gcc/testsuite/gfortran.dg/default_initialization_5.f90
index 11927619db..50860e0d06 100644
--- a/gcc/testsuite/gfortran.dg/default_initialization_5.f90
+++ b/gcc/testsuite/gfortran.dg/default_initialization_5.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run }
! { dg-options "-fdump-tree-original" }
!
! PR fortran/51435
@@ -63,4 +63,3 @@ end program
! { dg-final { scan-tree-dump-times "my_data.head = 0B" 1 "original" } }
! { dg-final { scan-tree-dump-times "my_data.head = &tgt" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "arr_m list_m worker_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/default_initialization_7.f90 b/gcc/testsuite/gfortran.dg/default_initialization_7.f90
new file mode 100644
index 0000000000..fc8be98b11
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/default_initialization_7.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR fortran/57033
+! ICE on a structure constructor of an extended derived type whose parent
+! type last component has a default initializer
+!
+! Contributed by Tilo Schwarz <tilo@tilo-schwarz.de>
+
+program ice
+
+type m
+ integer i
+ logical :: f = .false.
+end type m
+
+type, extends(m) :: me
+end type me
+
+type(me) meo
+
+meo = me(1) ! ICE
+end program ice
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_component_1.f90 b/gcc/testsuite/gfortran.dg/deferred_type_component_1.f90
new file mode 100644
index 0000000000..a7826d9bde
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_component_1.f90
@@ -0,0 +1,60 @@
+! { dg-do run }
+!
+! PR 51976: [F2003] Support deferred-length character components of derived types (allocatable string length)
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+ type t
+ character(len=:), allocatable :: str_comp
+ character(len=:), allocatable :: str_comp1
+ end type t
+ type(t) :: x
+ type(t), allocatable, dimension(:) :: array
+
+ ! Check scalars
+ allocate (x%str_comp, source = "abc")
+ call check (x%str_comp, "abc")
+ deallocate (x%str_comp)
+ allocate (x%str_comp, source = "abcdefghijklmnop")
+ call check (x%str_comp, "abcdefghijklmnop")
+ x%str_comp = "xyz"
+ call check (x%str_comp, "xyz")
+ x%str_comp = "abcdefghijklmnop"
+ x%str_comp1 = "lmnopqrst"
+ call foo (x%str_comp1, "lmnopqrst")
+ call bar (x, "abcdefghijklmnop", "lmnopqrst")
+
+ ! Check arrays and structure constructors
+ allocate (array(2), source = [t("abcedefg","hi"), t("jkl","mnop")])
+ call check (array(1)%str_comp, "abcedefg")
+ call check (array(1)%str_comp1, "hi")
+ call check (array(2)%str_comp, "jkl")
+ call check (array(2)%str_comp1, "mnop")
+ deallocate (array)
+ allocate (array(3), source = [x, x, x])
+ array(2)%str_comp = "blooey"
+ call bar (array(1), "abcdefghijklmnop", "lmnopqrst")
+ call bar (array(2), "blooey", "lmnopqrst")
+ call bar (array(3), "abcdefghijklmnop", "lmnopqrst")
+
+contains
+
+ subroutine foo (chr1, chr2)
+ character (*) :: chr1, chr2
+ call check (chr1, chr2)
+ end subroutine
+
+ subroutine bar (a, chr1, chr2)
+ character (*) :: chr1, chr2
+ type(t) :: a
+ call check (a%str_comp, chr1)
+ call check (a%str_comp1, chr2)
+ end subroutine
+
+ subroutine check (chr1, chr2)
+ character (*) :: chr1, chr2
+ if (len(chr1) .ne. len (chr2)) call abort
+ if (chr1 .ne. chr2) call abort
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_component_2.f90 b/gcc/testsuite/gfortran.dg/deferred_type_component_2.f90
new file mode 100644
index 0000000000..63e7fa3930
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_component_2.f90
@@ -0,0 +1,60 @@
+! { dg-do run }
+!
+! PR 51976: [F2003] Support deferred-length character components of derived types (allocatable string length)
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+ type t
+ character(len=:,kind=4), allocatable :: str_comp
+ character(len=:,kind=4), allocatable :: str_comp1
+ end type t
+ type(t) :: x
+ type(t), allocatable, dimension(:) :: array
+
+ ! Check scalars
+ allocate (x%str_comp, source = 4_"abc")
+ call check (x%str_comp, 4_"abc")
+ deallocate (x%str_comp)
+ allocate (x%str_comp, source = 4_"abcdefghijklmnop")
+ call check (x%str_comp, 4_"abcdefghijklmnop")
+ x%str_comp = 4_"xyz"
+ call check (x%str_comp, 4_"xyz")
+ x%str_comp = 4_"abcdefghijklmnop"
+ x%str_comp1 = 4_"lmnopqrst"
+ call foo (x%str_comp1, 4_"lmnopqrst")
+ call bar (x, 4_"abcdefghijklmnop", 4_"lmnopqrst")
+
+ ! Check arrays and structure constructors
+ allocate (array(2), source = [t(4_"abcedefg",4_"hi"), t(4_"jkl",4_"mnop")])
+ call check (array(1)%str_comp, 4_"abcedefg")
+ call check (array(1)%str_comp1, 4_"hi")
+ call check (array(2)%str_comp, 4_"jkl")
+ call check (array(2)%str_comp1, 4_"mnop")
+ deallocate (array)
+ allocate (array(3), source = [x, x, x])
+ array(2)%str_comp = 4_"blooey"
+ call bar (array(1), 4_"abcdefghijklmnop", 4_"lmnopqrst")
+ call bar (array(2), 4_"blooey", 4_"lmnopqrst")
+ call bar (array(3), 4_"abcdefghijklmnop", 4_"lmnopqrst")
+
+contains
+
+ subroutine foo (chr1, chr2)
+ character (len=*,kind=4) :: chr1, chr2
+ call check (chr1, chr2)
+ end subroutine
+
+ subroutine bar (a, chr1, chr2)
+ character (len=*,kind=4) :: chr1, chr2
+ type(t) :: a
+ call check (a%str_comp, chr1)
+ call check (a%str_comp1, chr2)
+ end subroutine
+
+ subroutine check (chr1, chr2)
+ character (len=*,kind=4) :: chr1, chr2
+ if (len(chr1) .ne. len (chr2)) call abort
+ if (chr1 .ne. chr2) call abort
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_3.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_3.f90
new file mode 100644
index 0000000000..809738d5b9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_3.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR fortran/45170
+! PR fortran/52158
+!
+! Contributed by Damian Rouson
+
+module speaker_class
+ type speaker
+ contains
+ procedure :: speak
+ end type
+contains
+ function speak(this)
+ class(speaker) ,intent(in) :: this
+ character(:) ,allocatable :: speak
+ end function
+ subroutine say_something(somebody)
+ class(speaker) :: somebody
+ print *,somebody%speak()
+ end subroutine
+end module
+
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_4.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_4.f90
new file mode 100644
index 0000000000..c0583f5686
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_4.f90
@@ -0,0 +1,33 @@
+! { dg-do run }
+!
+! PR fortran/51055
+! PR fortran/49110
+!
+!
+program test
+ implicit none
+ character(len=:), allocatable :: str
+ integer :: i
+ i = 5
+ str = f()
+ call printIt ()
+ i = 7
+ str = repeat('X', i)
+ call printIt ()
+contains
+ function f()
+ character(len=i) :: f
+ f = '1234567890'
+ end function f
+ subroutine printIt
+! print *, len(str)
+! print '(3a)', '>',str,'<'
+ if (i == 5) then
+ if (str /= "12345" .or. len(str) /= 5) call abort ()
+ else if (i == 7) then
+ if (str /= "XXXXXXX" .or. len(str) /= 7) call abort ()
+ else
+ call abort ()
+ end if
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_5.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_5.f90
new file mode 100644
index 0000000000..8380b9d2d4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_5.f90
@@ -0,0 +1,51 @@
+! { dg-do compile }
+!
+! PR fortran/49110
+! PR fortran/52843
+!
+! Based on a contributed code by jwmwalrus@gmail.com
+!
+! Before, character(len=:) result variable were rejected in PURE functions.
+!
+module mod1
+ use iso_c_binding
+ implicit none
+
+contains
+ pure function c_strlen(str)
+ character(KIND = C_CHAR), intent(IN) :: str(*)
+ integer :: c_strlen,i
+
+ i = 1
+ do
+ if (i < 1) then
+ c_strlen = 0
+ return
+ end if
+ if (str(i) == c_null_char) exit
+ i = i + 1
+ end do
+ c_strlen = i - 1
+ end function c_strlen
+ pure function c2fstring(cbuffer) result(string)
+ character(:), allocatable :: string
+ character(KIND = C_CHAR), intent(IN) :: cbuffer(*)
+ integer :: i
+
+ continue
+ string = REPEAT(' ', c_strlen(cbuffer))
+
+ do i = 1, c_strlen(cbuffer)
+ if (cbuffer(i) == C_NULL_CHAR) exit
+ string(i:i) = cbuffer(i)
+ enddo
+
+ string = TRIM(string)
+ end function
+end module mod1
+
+use mod1
+character(len=:), allocatable :: str
+str = c2fstring("ABCDEF"//c_null_char//"GHI")
+if (len(str) /= 6 .or. str /= "ABCDEF") call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_6.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_6.f90
new file mode 100644
index 0000000000..eb0077840f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_6.f90
@@ -0,0 +1,33 @@
+! { dg-do run }
+!
+! PR fortran/51055
+! PR fortran/49110
+!
+
+subroutine test()
+ implicit none
+ integer :: i = 5
+ character(len=:), allocatable :: s1
+ call sub(s1, i)
+ if (len(s1) /= 5) call abort()
+ if (s1 /= "ZZZZZ") call abort()
+contains
+ subroutine sub(str,j)
+ character(len=:), allocatable :: str
+ integer :: j
+ str = REPEAT("Z",j)
+ if (len(str) /= 5) call abort()
+ if (str /= "ZZZZZ") call abort()
+ end subroutine sub
+end subroutine test
+
+program a
+ character(len=:),allocatable :: s
+ integer :: j=2
+ s = repeat ('x', j)
+ if (len(repeat(' ',j)) /= 2) call abort()
+ if (repeat('y',j) /= "yy") call abort()
+ if (len(s) /= 2) call abort()
+ if (s /= "xx") call abort()
+ call test()
+end program a
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_8.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_8.f90
new file mode 100644
index 0000000000..3c768c567a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_8.f90
@@ -0,0 +1,54 @@
+! { dg-do run }
+!
+! PR fortran/53642
+! PR fortran/45170 (comments 24, 34, 37)
+!
+
+PROGRAM helloworld
+ implicit none
+ character(:),allocatable::string
+ character(11), parameter :: cmp = "hello world"
+ real::rnd
+ integer :: n, i
+ do i = 1, 10
+ call random_number(rnd)
+ n = ceiling(11*rnd)
+ call hello(n, string)
+! print '(A,1X,I0)', '>' // string // '<', len(string)
+ if (n /= len (string) .or. string /= cmp(1:n)) call abort ()
+ end do
+
+ call test_PR53642()
+
+contains
+
+ subroutine hello (n,string)
+ character(:), allocatable, intent(out) :: string
+ integer,intent(in) :: n
+ character(11) :: helloworld="hello world"
+
+ string=helloworld(:n) ! Didn't work
+! string=(helloworld(:n)) ! Works.
+! allocate(string, source=helloworld(:n)) ! Fixed for allocate_with_source_2.f90
+! allocate(string, source=(helloworld(:n))) ! Works.
+ end subroutine hello
+
+ subroutine test_PR53642()
+ character(len=4) :: string="123 "
+ character(:), allocatable :: trimmed
+
+ trimmed = trim(string)
+ if (len_trim(string) /= len(trimmed)) call abort ()
+ if (len(trimmed) /= 3) call abort ()
+ if (trimmed /= "123") call abort ()
+! print *,len_trim(string),len(trimmed)
+
+ ! Clear
+ trimmed = "XXXXXX"
+ if (trimmed /= "XXXXXX" .or. len(trimmed) /= 6) call abort ()
+
+ trimmed = string(1:len_trim(string))
+ if (len_trim(trimmed) /= 3) call abort ()
+ if (trimmed /= "123") call abort ()
+ end subroutine test_PR53642
+end PROGRAM helloworld
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_param_9.f90 b/gcc/testsuite/gfortran.dg/deferred_type_param_9.f90
new file mode 100644
index 0000000000..a6e685753f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_param_9.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+!
+! PR fortran/57596
+!
+! Contributed by Valery Weber
+!
+PROGRAM main
+ IMPLICIT NONE
+ call get ()
+ call get2 ()
+contains
+ SUBROUTINE get (c_val)
+ CHARACTER( : ), INTENT( INOUT ), ALLOCATABLE, OPTIONAL :: c_val
+ CHARACTER( 10 ) :: c_val_tmp
+ if(present(c_val)) call abort()
+ END SUBROUTINE get
+ SUBROUTINE get2 (c_val)
+ CHARACTER( : ), INTENT( OUT ), ALLOCATABLE, OPTIONAL :: c_val
+ CHARACTER( 10 ) :: c_val_tmp
+ if(present(c_val)) call abort()
+ END SUBROUTINE get2
+END PROGRAM main
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_1.f90 b/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_1.f90
new file mode 100644
index 0000000000..3fc055e0e9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_1.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+!
+! PR fortran/45170
+! PR fortran/52158
+!
+! Contributed by Tobias Burnus
+
+module test
+ implicit none
+ type t
+ procedure(deferred_len), pointer, nopass :: ppt
+ end type t
+contains
+ function deferred_len()
+ character(len=:), allocatable :: deferred_len
+ deferred_len = 'abc'
+ end function deferred_len
+ subroutine doIt()
+ type(t) :: x
+ x%ppt => deferred_len
+ if ("abc" /= x%ppt()) call abort()
+ end subroutine doIt
+end module test
+
+use test
+call doIt ()
+end
diff --git a/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_2.f90 b/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_2.f90
new file mode 100644
index 0000000000..dbdb3bdba3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/deferred_type_proc_pointer_2.f90
@@ -0,0 +1,27 @@
+! { dg-do compile }
+!
+! PR fortran/45170
+! PR fortran/52158
+
+module test
+ implicit none
+ type t
+ procedure(deferred_len), pointer, nopass :: ppt
+ end type t
+contains
+ function deferred_len()
+ character(len=:), allocatable :: deferred_len
+ deferred_len = 'abc'
+ end function deferred_len
+ subroutine doIt()
+ type(t) :: x
+ character(:), allocatable :: temp
+ x%ppt => deferred_len
+ temp = deferred_len()
+ if ("abc" /= temp) call abort()
+ end subroutine doIt
+end module test
+
+use test
+call doIt ()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_1.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_1.f90
new file mode 100644
index 0000000000..da06f26d19
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_1.f90
@@ -0,0 +1,90 @@
+! { dg-do run }
+! Test the fix for PR46897.
+!
+! Contributed by Rouson Damian <rouson@sandia.gov>
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 0
+ contains
+ procedure :: assign0
+ generic :: assignment(=)=>assign0
+ end type
+ type parent
+ type(component) :: foo
+ end type
+ type, extends(parent) :: child
+ integer :: j
+ end type
+contains
+ subroutine assign0(lhs,rhs)
+ class(component), intent(out) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+ type(child) function new_child()
+ end function
+end module
+
+module m1
+ implicit none
+ type component1
+ integer :: i = 1
+ contains
+ procedure :: assign1
+ generic :: assignment(=)=>assign1
+ end type
+ type t
+ type(component1) :: foo
+ end type
+contains
+ subroutine assign1(lhs,rhs)
+ class(component1), intent(out) :: lhs
+ class(component1), intent(in) :: rhs
+ lhs%i = 21
+ end subroutine
+end module
+
+module m2
+ implicit none
+ type component2
+ integer :: i = 2
+ end type
+ interface assignment(=)
+ module procedure assign2
+ end interface
+ type t2
+ type(component2) :: foo
+ end type
+contains
+ subroutine assign2(lhs,rhs)
+ type(component2), intent(out) :: lhs
+ type(component2), intent(in) :: rhs
+ lhs%i = 22
+ end subroutine
+end module
+
+program main
+ use m0
+ use m1
+ use m2
+ implicit none
+ type(child) :: infant0
+ type(t) :: infant1, newchild1
+ type(t2) :: infant2, newchild2
+
+! Test the reported problem.
+ infant0 = new_child()
+ if (infant0%parent%foo%i .ne. 20) call abort
+
+! Test the case of comment #1 of the PR.
+ infant1 = newchild1
+ if (infant1%foo%i .ne. 21) call abort
+
+! Test the case of comment #2 of the PR.
+ infant2 = newchild2
+ if (infant2%foo%i .ne. 2) call abort
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_10.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_10.f90
new file mode 100644
index 0000000000..4385925dcd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_10.f90
@@ -0,0 +1,35 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 42
+ contains
+ procedure :: assign0
+ generic :: assignment(=) => assign0
+ end type
+ type parent
+ type(component) :: foo
+ end type
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(INout) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+program main
+ use m0
+ implicit none
+ type(parent), allocatable :: left
+ type(parent) :: right
+! print *, right%foo
+ left = right
+! print *, left%foo
+ if (left%foo%i /= 20) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_11.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_11.f90
new file mode 100644
index 0000000000..ec297d5492
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_11.f90
@@ -0,0 +1,43 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+ implicit none
+ type :: component
+ integer :: i = 42
+ integer, allocatable :: b
+ contains
+ procedure :: assign0
+ generic :: assignment(=) => assign0
+ end type
+ type, extends(component) :: comp2
+ real :: aa
+ end type comp2
+ type parent
+ type(component) :: foo
+ real :: cc
+ end type
+ type p2
+ type(parent) :: x
+ end type p2
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(INout) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+program main
+ use m0
+ implicit none
+ type(p2), allocatable :: left
+ type(p2) :: right
+! print *, right%x%foo%i
+ left = right
+! print *, left%x%foo%i
+ if (left%x%foo%i /= 20) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_2.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_2.f90
new file mode 100644
index 0000000000..78f2abb22f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_2.f90
@@ -0,0 +1,74 @@
+! { dg-do run }
+! Test the fix for PR46897. defined_assignment_1.f90 checks that the PR
+! testcases run correctly, this checks that other requirements of the
+! standard are satisfied.
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 0
+ integer, allocatable :: j(:)
+ contains
+ procedure :: assign0
+ generic :: assignment(=)=>assign0
+ end type
+ type parent
+ type(component) :: foo1
+ end type
+ type, extends(parent) :: child
+ integer :: k = 1000
+ integer, allocatable :: l(:)
+ type(component) :: foo2
+ end type
+contains
+ subroutine assign0(lhs,rhs)
+ class(component), intent(inout) :: lhs
+ class(component), intent(in) :: rhs
+ if (lhs%i .eq. 0) then
+ lhs%i = rhs%i
+ lhs%j = rhs%j
+ else
+ lhs%i = rhs%i*2
+ lhs%j = [rhs%j, rhs%j*2]
+ end if
+ end subroutine
+ type(child) function new_child()
+ new_child%parent%foo1%i = 20
+ new_child%foo2%i = 21
+ new_child%parent%foo1%j = [99,199]
+ new_child%foo2%j = [199,299]
+ new_child%l = [299,399]
+ new_child%k = 1001
+ end function
+end module
+
+program main
+ use m0
+ implicit none
+ type(child) :: infant0
+
+! Check that the INTENT(INOUT) of assign0 is respected and that the
+! correct thing is done with allocatable components.
+ infant0 = new_child()
+ if (infant0%parent%foo1%i .ne. 20) call abort
+ if (infant0%foo2%i .ne. 21) call abort
+ if (any (infant0%parent%foo1%j .ne. [99,199])) call abort
+ if (any (infant0%foo2%j .ne. [199,299])) call abort
+ if (infant0%foo2%i .ne. 21) call abort
+ if (any (infant0%l .ne. [299,399])) call abort
+
+! Now, since the defined assignment depends on whether or not the 'i'
+! component is the default initialization value, the result will be
+! different.
+ infant0 = new_child()
+ if (infant0%parent%foo1%i .ne. 40) call abort
+ if (any (infant0%parent%foo1%j .ne. [99,199,198,398])) call abort
+ if (any (infant0%foo2%j .ne. [199,299,398,598])) call abort
+ if (infant0%foo2%i .ne. 42) call abort
+ if (any (infant0%l .ne. [299,399])) call abort
+
+! Finally, make sure that normal components of the declared type survive.
+ if (infant0%k .ne. 1001) call abort
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_3.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_3.f90
new file mode 100644
index 0000000000..81a9841434
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_3.f90
@@ -0,0 +1,38 @@
+! { dg-do run }
+! Test the fix for PR46897. defined_assignment_1.f90 checks that the PR
+! testcases run correctly, this checks array components are OK.
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 0
+ contains
+ procedure :: assign0
+ generic :: assignment(=)=>assign0
+ end type
+ type parent
+ type(component) :: foo(2)
+ end type
+ type, extends(parent) :: child
+ integer :: j
+ end type
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(out) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+
+program main
+ use m0
+ implicit none
+ type(child) :: infant0, infant1(2)
+
+ infant0 = child([component(1),component(2)], 99)
+ if (any (infant0%parent%foo%i .ne. [20, 20])) call abort
+
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_4.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_4.f90
new file mode 100644
index 0000000000..e7a1b8e0f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_4.f90
@@ -0,0 +1,35 @@
+! { dg-do run }
+! Test the fix for PR46897. First patch did not run this case correctly.
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+module a_mod
+ type :: a
+ integer :: i = 99
+ contains
+ procedure :: a_ass
+ generic :: assignment(=) => a_ass
+ end type a
+
+ type c
+ type(a) :: ta
+ end type c
+
+ type :: b
+ type(c) :: tc
+ end type b
+
+contains
+ elemental subroutine a_ass(out, in)
+ class(a), intent(INout) :: out
+ type(a), intent(in) :: in
+ out%i = 2*in%i
+ end subroutine a_ass
+end module a_mod
+
+program assign
+ use a_mod
+ type(b) :: tt
+ type(b) :: tb1
+ tt = tb1
+ if (tt%tc%ta%i .ne. 198) call abort
+end program assign
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_5.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_5.f90
new file mode 100644
index 0000000000..faf38298e4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_5.f90
@@ -0,0 +1,76 @@
+! { dg-do run }
+! Further test of typebound defined assignment
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 0
+ contains
+ procedure :: assign0
+ generic :: assignment(=)=>assign0
+ end type
+ type parent
+ type(component) :: foo(2)
+ end type
+ type, extends(parent) :: child
+ integer :: j
+ end type
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(INout) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+module m1
+ implicit none
+ type component1
+ integer :: i = 0
+ contains
+ procedure :: assign1
+ generic :: assignment(=)=>assign1
+ end type
+ type parent1
+ type(component1) :: foo
+ end type
+ type, extends(parent1) :: child1
+ integer :: j = 7
+ end type
+contains
+ elemental subroutine assign1(lhs,rhs)
+ class(component1), intent(out) :: lhs
+ class(component1), intent(in) :: rhs
+ lhs%i = 30
+ end subroutine
+end module
+
+
+program main
+ use m0
+ use m1
+ implicit none
+ type(child) :: infant(2)
+ type(parent) :: dad, mum
+ type(child1) :: orphan(5)
+ type(child1), allocatable :: annie(:)
+ integer :: i, j, k
+
+ dad = parent ([component (3), component (4)])
+ mum = parent ([component (5), component (6)])
+ infant = [child(dad, 999), child(mum, 9999)] ! { dg-warning "multiple part array references" }
+
+! Check that array sections are OK
+ i = 3
+ j = 4
+ orphan(i:j) = child1(component1(777), 1)
+ if (any (orphan%parent1%foo%i .ne. [0,0,30,30,0])) call abort
+ if (any (orphan%j .ne. [7,7,1,1,7])) call abort
+
+! Check that allocatable lhs's work OK.
+ annie = [(child1(component1(k), 2*k), k = 1,3)]
+ if (any (annie%parent1%foo%i .ne. [30,30,30])) call abort
+ if (any (annie%j .ne. [2,4,6])) call abort
+end
+
+
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_6.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_6.f90
new file mode 100644
index 0000000000..a5666fe510
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_6.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! PR fortran/57364
+!
+! Contributed by Damian Rouson
+!
+module ref_counter_implementation
+ type ref_counter
+ contains
+ procedure :: assign
+ generic :: assignment(=) => assign
+ end type
+contains
+ subroutine assign (lhs, rhs)
+ class (ref_counter), intent(inout) :: lhs
+ class (ref_counter), intent(in) :: rhs
+ end subroutine
+end module
+module foo_parent_implementation
+ use ref_counter_implementation ,only: ref_counter
+ type :: foo_parent
+ type(ref_counter) :: counter
+ end type
+contains
+ type(foo_parent) function new_foo_parent()
+ end function
+end module
+module foo_implementation
+ use foo_parent_implementation ,only: foo_parent,new_foo_parent
+ type, extends(foo_parent) :: foo
+ end type
+contains
+ type(foo) function new_foo()
+ new_foo%foo_parent = new_foo_parent()
+ end function
+end module
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_7.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_7.f90
new file mode 100644
index 0000000000..b2e43535e6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_7.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR fortran/57508
+!
+module ForTrilinos_ref_counter
+ type ref_counter
+ contains
+ procedure :: assign
+ generic :: assignment(=) => assign
+ end type
+contains
+ subroutine assign (lhs, rhs)
+ class (ref_counter), intent(inout) :: lhs
+ class (ref_counter), intent(in) :: rhs
+ end subroutine
+end module
+module FEpetra_BlockMap
+ use ForTrilinos_ref_counter, only : ref_counter
+ type :: Epetra_BlockMap
+ type(ref_counter) :: counter
+ end type
+contains
+ function from_struct() result(new_Epetra_BlockMap)
+ type(Epetra_BlockMap) :: new_Epetra_BlockMap
+ end function
+ type(Epetra_BlockMap) function create_arbitrary()
+ create_arbitrary = from_struct()
+ end function
+end module
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_8.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_8.f90
new file mode 100644
index 0000000000..aab808583a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_8.f90
@@ -0,0 +1,40 @@
+! { dg-do compile }
+!
+! PR fortran/58469
+!
+! Related: PR fortran/57697
+!
+! Was ICEing before
+!
+module m0
+ implicit none
+ type :: component
+ integer :: i = 42
+ contains
+ procedure :: assign0
+ generic :: assignment(=) => assign0
+ end type
+ type, extends(component) :: comp2
+ real :: aa
+ end type comp2
+ type parent
+ type(comp2) :: foo
+ end type
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(INout) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+program main
+ use m0
+ implicit none
+ type(parent), allocatable :: left
+ type(parent) :: right
+ print *, right%foo
+ left = right
+ print *, left%foo
+ if (left%foo%i /= 42) call abort()
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_assignment_9.f90 b/gcc/testsuite/gfortran.dg/defined_assignment_9.f90
new file mode 100644
index 0000000000..50fa0070f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/defined_assignment_9.f90
@@ -0,0 +1,45 @@
+! { dg-do run }
+!
+! PR fortran/57697
+!
+! Further test of typebound defined assignment
+!
+module m0
+ implicit none
+ type component
+ integer :: i = 42
+ contains
+ procedure :: assign0
+ generic :: assignment(=) => assign0
+ end type
+ type parent
+ type(component) :: foo
+ end type
+contains
+ elemental subroutine assign0(lhs,rhs)
+ class(component), intent(INout) :: lhs
+ class(component), intent(in) :: rhs
+ lhs%i = 20
+ end subroutine
+end module
+
+program main
+ use m0
+ implicit none
+ block
+ type(parent), allocatable :: left
+ type(parent) :: right
+! print *, right%foo
+ left = right
+! print *, left%foo
+ if (left%foo%i /= 20) call abort()
+ end block
+ block
+ type(parent), allocatable :: left(:)
+ type(parent) :: right(5)
+! print *, right%foo
+ left = right
+! print *, left%foo
+ if (any (left%foo%i /= 20)) call abort()
+ end block
+end
diff --git a/gcc/testsuite/gfortran.dg/defined_operators_1.f90 b/gcc/testsuite/gfortran.dg/defined_operators_1.f90
index c7868d14c6..9d9901853d 100644
--- a/gcc/testsuite/gfortran.dg/defined_operators_1.f90
+++ b/gcc/testsuite/gfortran.dg/defined_operators_1.f90
@@ -65,4 +65,3 @@ contains
foo_3 = a + 3 * b - c
end function foo_3
end module mymod
-! { dg-final { cleanup-modules "mymod" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_19.f90 b/gcc/testsuite/gfortran.dg/dependency_19.f90
index b0af158553..3d20cc1969 100644
--- a/gcc/testsuite/gfortran.dg/dependency_19.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_19.f90
@@ -31,4 +31,3 @@ contains
end subroutine construct
end module gfcbug49
-! { dg-final { cleanup-modules "gfcbug49" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_23.f90 b/gcc/testsuite/gfortran.dg/dependency_23.f90
index 447d626c53..5a90cdaaa0 100644
--- a/gcc/testsuite/gfortran.dg/dependency_23.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_23.f90
@@ -52,6 +52,3 @@ end module rg0045_stuff
use rg0045_stuff
call rg0045(1, 2, 3)
end
-! { dg-final { cleanup-modules "rg0045_stuff" } }
-
-
diff --git a/gcc/testsuite/gfortran.dg/dependency_24.f90 b/gcc/testsuite/gfortran.dg/dependency_24.f90
index 9645f20753..81c2be288a 100644
--- a/gcc/testsuite/gfortran.dg/dependency_24.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_24.f90
@@ -78,4 +78,3 @@ contains
if (any (a%j .ne. 99)) call abort
end subroutine
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_25.f90 b/gcc/testsuite/gfortran.dg/dependency_25.f90
index 141811eea1..f2517f52eb 100644
--- a/gcc/testsuite/gfortran.dg/dependency_25.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_25.f90
@@ -91,5 +91,3 @@ program TestProgram
if (any (abs(Table%RealData(:,4) - 1) > epsilon(1.0))) call abort ()
if (any (abs(Table%RealData(:,[1,2,3,5]) - 42) > epsilon(1.0))) call abort ()
end program TestProgram
-
-! { dg-final { cleanup-modules "unitvalue_module" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_26.f90 b/gcc/testsuite/gfortran.dg/dependency_26.f90
index e893d992c5..d37307c5cc 100644
--- a/gcc/testsuite/gfortran.dg/dependency_26.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_26.f90
@@ -47,7 +47,6 @@ END MODULE M1
cell%h = reshape ([(real(i), i = 1, 9)], [3, 3])
call s1 (cell)
end
-! { dg-final { cleanup-modules "m1 m2" } }
! { dg-final { scan-tree-dump-times "&a" 1 "original" } }
! { dg-final { scan-tree-dump-times "pack" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_28.f90 b/gcc/testsuite/gfortran.dg/dependency_28.f90
index 5d70abe395..bcb6e663ad 100644
--- a/gcc/testsuite/gfortran.dg/dependency_28.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_28.f90
@@ -18,4 +18,3 @@ contains
a(c%k:c%m) = a(c%i:c%j) + b(c%k:c%m) ! { dg-warning "Creating array temporary" }
end subroutine foo
end module foobar
-! { dg-final { cleanup-modules "foobar" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_34.f90 b/gcc/testsuite/gfortran.dg/dependency_34.f90
index 82d286ebbc..db6ba01f9d 100644
--- a/gcc/testsuite/gfortran.dg/dependency_34.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_34.f90
@@ -19,4 +19,3 @@ program main
a(bar(i,i+2):2) = a(bar(i,i+2):2)
a(int(i,kind=2):5) = a(int(i,kind=2)+1:6)
end program main
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_35.f90 b/gcc/testsuite/gfortran.dg/dependency_35.f90
index 11b9e8b944..23b7e74607 100644
--- a/gcc/testsuite/gfortran.dg/dependency_35.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_35.f90
@@ -21,4 +21,3 @@ program main
a = bar(3,4)*5 + b
e = sum(b,1) + 3
end program main
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_36.f90 b/gcc/testsuite/gfortran.dg/dependency_36.f90
index 920df2fc2e..f3c0ef760f 100644
--- a/gcc/testsuite/gfortran.dg/dependency_36.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_36.f90
@@ -26,5 +26,3 @@ CONTAINS
x = matmul(a,b) ! { dg-warning "Creating array temporary" }
END SUBROUTINE GeneticOptimize
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_37.f90 b/gcc/testsuite/gfortran.dg/dependency_37.f90
index a66f5aff3e..12900c74f7 100644
--- a/gcc/testsuite/gfortran.dg/dependency_37.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_37.f90
@@ -46,4 +46,3 @@ program TestProgram
Table%RealData = 1
Table%RealData(:,1) = Table%RealData(:,1) * CENTIMETER
end program TestProgram
-! { dg-final { cleanup-modules "unitvalue_module" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_39.f90 b/gcc/testsuite/gfortran.dg/dependency_39.f90
index 68c48a4dc8..357827c7e7 100644
--- a/gcc/testsuite/gfortran.dg/dependency_39.f90
+++ b/gcc/testsuite/gfortran.dg/dependency_39.f90
@@ -34,4 +34,3 @@ program main
deallocate(t%data)
deallocate(t)
end program main
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/dependency_41.f90 b/gcc/testsuite/gfortran.dg/dependency_41.f90
new file mode 100644
index 0000000000..db9e0e6288
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dependency_41.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+! { dg-options "-Warray-temporaries" }
+! No temporary should be generated in this case.
+program main
+ implicit none
+ integer :: i,n
+ integer :: a(10)
+ integer :: b(10)
+ do i=1,10
+ a(i) = i
+ b(i) = i
+ end do
+ n = 1
+ ! Same result when assigning to a or b
+ b(n+1:10:4) = a(n+2:8:2)
+ a(n+1:10:4) = a(n+2:8:2)
+ if (any (a/=b)) call abort
+end program main
+
diff --git a/gcc/testsuite/gfortran.dg/dependency_42.f90 b/gcc/testsuite/gfortran.dg/dependency_42.f90
new file mode 100644
index 0000000000..8f067322f9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dependency_42.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! { dg-options "-Warray-temporaries" }
+! PR fortran/56937 - unnecessary temporaries with vector indices
+program main
+ real :: q(4), r(4), p(3)
+ integer :: idx(3)
+ p = [0.5, 1.0, 2.0]
+ idx = [4,3,1]
+ r = 1.0
+ r(idx) = r(idx) + p
+ q = 1.0
+ q(4) = q(4) + p(1)
+ q(3) = q(3) + p(2)
+ q(1) = q(1) + p(3)
+ if (any (q - r /= 0)) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/dependency_43.f90 b/gcc/testsuite/gfortran.dg/dependency_43.f90
new file mode 100644
index 0000000000..c407369c5e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dependency_43.f90
@@ -0,0 +1,14 @@
+! { dg-do run }
+! { dg-options "-Warray-temporaries" }
+! PR fortran/56937 - unnecessary temporaries with vector indices
+program main
+ integer, dimension(3) :: i1, i2
+ real :: a(3,2)
+
+ data a / 1.0, 2.0, 3.0, 4.0, 5.0, 6.0 /
+ i1 = [ 1, 2, 3 ]
+ i2 = [ 3, 2, 1 ]
+ a (i1,1) = a (i2,2)
+ if (a(1,1) /= 6.0 .or. a(2,1) /= 5.0 .or. a(3,1) /= 4.0) call abort
+ if (a(1,2) /= 4.0 .or. a(2,2) /= 5.0 .or. a(3,2) /= 6.0) call abort
+end program main
diff --git a/gcc/testsuite/gfortran.dg/dependency_44.f90 b/gcc/testsuite/gfortran.dg/dependency_44.f90
new file mode 100644
index 0000000000..ebfeec64c8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dependency_44.f90
@@ -0,0 +1,36 @@
+! { dg-do run }
+! Tests fix for PR61780 in which the loop reversal mechanism was
+! not accounting for the first index being an element so that no
+! loop in this dimension is created.
+!
+! Contributed by Manfred Tietze on clf.
+!
+program prgm3
+ implicit none
+ integer, parameter :: n = 10, k = 3
+ integer :: i, j
+ integer, dimension(n,n) :: y
+ integer :: res1(n), res2(n)
+
+1 format(10i5)
+
+!initialize
+ do i=1,n
+ do j=1,n
+ y(i,j) = n*i + j
+ end do
+ end do
+ res2 = y(k,:)
+
+!shift right
+ y(k,4:n) = y(k,3:n-1)
+ y(k,3) = 0
+ res1 = y(k,:)
+ y(k,:) = res2
+ y(k,n:4:-1) = y(k,n-1:3:-1)
+ y(k,3) = 0
+ res2 = y(k,:)
+! print *, res1
+! print *, res2
+ if (any(res1 /= res2)) call abort ()
+end program prgm3
diff --git a/gcc/testsuite/gfortran.dg/der_charlen_1.f90 b/gcc/testsuite/gfortran.dg/der_charlen_1.f90
index 4bdace228d..9f394c73f2 100644
--- a/gcc/testsuite/gfortran.dg/der_charlen_1.f90
+++ b/gcc/testsuite/gfortran.dg/der_charlen_1.f90
@@ -22,5 +22,3 @@ CONTAINS
type(T), intent(in) :: X
end subroutine
end module another_core
-
-! { dg-final { cleanup-modules "core another_core" } }
diff --git a/gcc/testsuite/gfortran.dg/der_io_2.f90 b/gcc/testsuite/gfortran.dg/der_io_2.f90
index 09878b690e..e102a97a57 100644
--- a/gcc/testsuite/gfortran.dg/der_io_2.f90
+++ b/gcc/testsuite/gfortran.dg/der_io_2.f90
@@ -51,5 +51,3 @@ program prog
write (*, *) z ! { dg-error "PRIVATE components" }
write (*, *) zb
end program prog
-
-! { dg-final { cleanup-modules "gfortran2" } }
diff --git a/gcc/testsuite/gfortran.dg/der_io_3.f90 b/gcc/testsuite/gfortran.dg/der_io_3.f90
index 1cb370ce17..13035fe986 100644
--- a/gcc/testsuite/gfortran.dg/der_io_3.f90
+++ b/gcc/testsuite/gfortran.dg/der_io_3.f90
@@ -41,5 +41,3 @@ end module m2
use m2
call test
end
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/der_pointer_1.f90 b/gcc/testsuite/gfortran.dg/der_pointer_1.f90
index b9f98f518b..bf4ffc320f 100644
--- a/gcc/testsuite/gfortran.dg/der_pointer_1.f90
+++ b/gcc/testsuite/gfortran.dg/der_pointer_1.f90
@@ -16,5 +16,3 @@ module test
type(x_t), pointer :: x
end module test
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/der_pointer_3.f90 b/gcc/testsuite/gfortran.dg/der_pointer_3.f90
index ad9f7a7f88..ed56ffc6c0 100644
--- a/gcc/testsuite/gfortran.dg/der_pointer_3.f90
+++ b/gcc/testsuite/gfortran.dg/der_pointer_3.f90
@@ -16,5 +16,3 @@ end module ints
program size_test
use ints
end program size_test
-
-! { dg-final { cleanup-modules "ints" } }
diff --git a/gcc/testsuite/gfortran.dg/der_pointer_4.f90 b/gcc/testsuite/gfortran.dg/der_pointer_4.f90
index 260afa4937..ec48146736 100644
--- a/gcc/testsuite/gfortran.dg/der_pointer_4.f90
+++ b/gcc/testsuite/gfortran.dg/der_pointer_4.f90
@@ -9,5 +9,3 @@ module crash
end type foo
type (foo), save :: bar
end module crash
-
-! { dg-final { cleanup-modules "crash" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90 b/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90
index 6056c83aaa..274aada6aa 100644
--- a/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90
+++ b/gcc/testsuite/gfortran.dg/derived_array_intrinisics_1.f90
@@ -29,4 +29,3 @@
end
! { dg-final { scan-tree-dump-times "j = 50" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_1.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_1.f90
index 1a868f3910..bbc109d92b 100644
--- a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_1.f90
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_1.f90
@@ -31,5 +31,3 @@ end module gd_calc
call activate_gd_calcs (used_, outputs_)
if (any (outputs_(ndim:1:-1)%used .neqv. used_)) call abort ()
end
-
-! { dg-final { cleanup-modules "gd_calc" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_2.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_2.f90
index 0530b0e6ea..014a3fb809 100644
--- a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_2.f90
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_2.f90
@@ -29,4 +29,3 @@ END MODULE cdf_beta_mod
call cdf_beta (1, 99)
call cdf_beta (2, 999)
end
-! { dg-final { cleanup-modules "cdf_aux_mod cdf_beta_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_3.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_3.f90
index 7a0b77ea80..a3bb78d037 100644
--- a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_3.f90
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_3.f90
@@ -26,4 +26,3 @@ END MODULE cdf_nc_chisq_mod
use cdf_nc_chisq_mod
call local_cum_nc_chisq
end
-! { dg-final { cleanup-modules "cdf_nc_chisq_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_4.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_4.f90
index 0c7853989e..1fe03fc651 100644
--- a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_4.f90
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_4.f90
@@ -35,4 +35,3 @@ end module gfcbug70
call chk (2)
call chk (1)
end
-! { dg-final { cleanup-modules "foo gfcbug70" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_6.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_6.f90
index 36a30672e3..c0fb7c86ca 100644
--- a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_6.f90
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_6.f90
@@ -23,5 +23,3 @@
CALL set_bound(the_beta%parameters(1:which)) ! { dg-error "Rank mismatch" }
END SUBROUTINE cdf_beta
END MODULE cdf_beta_mod
-
-! { dg-final { cleanup-modules "cdf_aux_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_comp_array_ref_8.f90 b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_8.f90
new file mode 100644
index 0000000000..739f4adfb7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/derived_comp_array_ref_8.f90
@@ -0,0 +1,8 @@
+! { dg-do compile }
+!
+! PR fortran/52325
+!
+real :: f
+cc%a = 5 ! { dg-error "Symbol 'cc' at .1. has no IMPLICIT type" }
+f%a = 5 ! { dg-error "Unexpected '%' for nonderived-type variable 'f' at" }
+end
diff --git a/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90 b/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
index 83d127931c..1c02a31c7a 100644
--- a/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
+++ b/gcc/testsuite/gfortran.dg/derived_constructor_comps_1.f90
@@ -54,4 +54,3 @@ contains
end function foo
end program prog
-! { dg-final { cleanup-modules "foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_constructor_comps_3.f90 b/gcc/testsuite/gfortran.dg/derived_constructor_comps_3.f90
index 0aa2e4e1c1..9ce03beb79 100644
--- a/gcc/testsuite/gfortran.dg/derived_constructor_comps_3.f90
+++ b/gcc/testsuite/gfortran.dg/derived_constructor_comps_3.f90
@@ -19,4 +19,3 @@ program bug4_structure
t = bug4()
write(*,*) t
end program bug4_structure
-! { dg-final { cleanup-modules "bug4_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_external_function_1.f90 b/gcc/testsuite/gfortran.dg/derived_external_function_1.f90
new file mode 100644
index 0000000000..7421c4c0f2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/derived_external_function_1.f90
@@ -0,0 +1,27 @@
+! { dg-do run }
+!
+! PR fortran/58771
+!
+! Contributed by Vittorio Secca <zeccav@gmail.com>
+!
+! ICEd on the write statement with f() because the derived type backend
+! declaration not built.
+!
+module m
+ type t
+ integer(4) g
+ end type
+end
+
+type(t) function f() result(ff)
+ use m
+ ff%g = 42
+end
+
+ use m
+ character (20) :: line1, line2
+ type(t) f
+ write (line1, *) f()
+ write (line2, *) 42_4
+ if (line1 .ne. line2) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/derived_function_interface_1.f90 b/gcc/testsuite/gfortran.dg/derived_function_interface_1.f90
index b7ee4df89a..24a0095091 100644
--- a/gcc/testsuite/gfortran.dg/derived_function_interface_1.f90
+++ b/gcc/testsuite/gfortran.dg/derived_function_interface_1.f90
@@ -42,4 +42,3 @@ contains
end function fun ! { dg-error "Expecting END PROGRAM" }
end
-! { dg-final { cleanup-modules "kinds" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_init_2.f90 b/gcc/testsuite/gfortran.dg/derived_init_2.f90
index 18d7544ecd..10a16b532a 100644
--- a/gcc/testsuite/gfortran.dg/derived_init_2.f90
+++ b/gcc/testsuite/gfortran.dg/derived_init_2.f90
@@ -45,4 +45,3 @@ program main
call foo(aa)
end program main
-! { dg-final { cleanup-modules "dt subs" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_pointer_recursion.f90 b/gcc/testsuite/gfortran.dg/derived_pointer_recursion.f90
index 4af2ceefec..4f4b70a4cc 100644
--- a/gcc/testsuite/gfortran.dg/derived_pointer_recursion.f90
+++ b/gcc/testsuite/gfortran.dg/derived_pointer_recursion.f90
@@ -19,5 +19,3 @@
end module llo
! copyright 1996 Loren P. Meissner -- May be distributed if this line is included.
! Linked List operations with Pointer to Pointer
-
-! { dg-final { cleanup-modules "llo" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_pointer_recursion_2.f90 b/gcc/testsuite/gfortran.dg/derived_pointer_recursion_2.f90
index f6bda4d053..675be1b3c0 100644
--- a/gcc/testsuite/gfortran.dg/derived_pointer_recursion_2.f90
+++ b/gcc/testsuite/gfortran.dg/derived_pointer_recursion_2.f90
@@ -43,6 +43,3 @@ program pr40594
if (ap%initialized .neqv. .false.) call abort()
END
-
-! { dg-final { cleanup-modules "atom_types" } }
-
diff --git a/gcc/testsuite/gfortran.dg/derived_recursion.f90 b/gcc/testsuite/gfortran.dg/derived_recursion.f90
index d0c0ea8d46..d52732ff27 100644
--- a/gcc/testsuite/gfortran.dg/derived_recursion.f90
+++ b/gcc/testsuite/gfortran.dg/derived_recursion.f90
@@ -22,5 +22,3 @@ end module snafu
! use snafu
! foo%v = 1
! end
-
-! { dg-final { cleanup-modules "snafu" } }
diff --git a/gcc/testsuite/gfortran.dg/derived_sub.f90 b/gcc/testsuite/gfortran.dg/derived_sub.f90
index 9b6624579c..1750ada124 100644
--- a/gcc/testsuite/gfortran.dg/derived_sub.f90
+++ b/gcc/testsuite/gfortran.dg/derived_sub.f90
@@ -31,4 +31,3 @@ contains
end subroutine
end module
-! { dg-final { cleanup-modules "modone modtwo" } }
diff --git a/gcc/testsuite/gfortran.dg/dg.exp b/gcc/testsuite/gfortran.dg/dg.exp
index ea04283153..3019951e3f 100644
--- a/gcc/testsuite/gfortran.dg/dg.exp
+++ b/gcc/testsuite/gfortran.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gfortran.dg/do_1.f90 b/gcc/testsuite/gfortran.dg/do_1.f90
index 171275af3f..b041279f6d 100644
--- a/gcc/testsuite/gfortran.dg/do_1.f90
+++ b/gcc/testsuite/gfortran.dg/do_1.f90
@@ -1,4 +1,5 @@
! { dg-do run }
+! { dg-options "-Wall" }
! Program to check corner cases for DO statements.
program do_1
implicit none
diff --git a/gcc/testsuite/gfortran.dg/do_3.F90 b/gcc/testsuite/gfortran.dg/do_3.F90
index 67723a508f..eb4751d6b0 100644
--- a/gcc/testsuite/gfortran.dg/do_3.F90
+++ b/gcc/testsuite/gfortran.dg/do_3.F90
@@ -1,5 +1,5 @@
! { dg-do run }
-! { dg-options "-std=legacy -ffree-line-length-none -fno-range-check -fwrapv" }
+! { dg-options "-std=legacy -ffree-line-length-none -fno-range-check -fwrapv -Wzerotrip" }
program test
integer :: count
integer :: i
diff --git a/gcc/testsuite/gfortran.dg/do_5.f90 b/gcc/testsuite/gfortran.dg/do_5.f90
new file mode 100644
index 0000000000..f7cec363e8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_5.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR fortran/54370
+!
+! The following program was ICEing at tree-check time
+! "L()" was regarded as default-kind logical.
+!
+! Contributed by Kirill Chilikin
+!
+ MODULE M
+ CONTAINS
+
+ LOGICAL(C_BOOL) FUNCTION L() BIND(C)
+ USE, INTRINSIC :: ISO_C_BINDING
+ L = .FALSE.
+ END FUNCTION
+
+ LOGICAL(8) FUNCTION L2() BIND(C) ! { dg-warning "GNU Extension: LOGICAL result variable 'l2' at .1. with non-C_Bool kind in BIND.C. procedure 'l2'" }
+ L2 = .FALSE._8
+ END FUNCTION
+
+ SUBROUTINE S()
+ DO WHILE (L())
+ ENDDO
+ DO WHILE (L2())
+ ENDDO
+ END
+
+ END
diff --git a/gcc/testsuite/gfortran.dg/do_check_10.f90 b/gcc/testsuite/gfortran.dg/do_check_10.f90
new file mode 100644
index 0000000000..016dab7ade
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_10.f90
@@ -0,0 +1,7 @@
+! { dg-do compile }
+! { dg-options "-Wall -Wno-zerotrip" }
+program main
+ do i=1,0
+ print *,i
+ end do
+end program main
diff --git a/gcc/testsuite/gfortran.dg/do_check_5.f90 b/gcc/testsuite/gfortran.dg/do_check_5.f90
index 3df7b14f0e..57930fd61a 100644
--- a/gcc/testsuite/gfortran.dg/do_check_5.f90
+++ b/gcc/testsuite/gfortran.dg/do_check_5.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-!
+! { dg-options "-Wall" }
! PR/fortran 38432
! DO-loop compile-time checks
!
diff --git a/gcc/testsuite/gfortran.dg/do_check_6.f90 b/gcc/testsuite/gfortran.dg/do_check_6.f90
new file mode 100644
index 0000000000..2e18f219f8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_6.f90
@@ -0,0 +1,84 @@
+! { dg-do compile }
+!
+! PR fortran/54958
+!
+module m
+ integer, protected :: i
+ integer :: j
+end module m
+
+subroutine test1()
+ use m
+ implicit none
+ integer :: A(5)
+ ! Valid: data-implied-do (has a scope of the statement or construct)
+ DATA (A(i), i=1,5)/5*42/ ! OK
+
+ ! Valid: ac-implied-do (has a scope of the statement or construct)
+ print *, [(i, i=1,5 )] ! OK
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ forall (i = 1:5) ! OK
+ end forall
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ do concurrent (i = 1:5) ! OK
+ end do
+
+ ! Invalid: io-implied-do
+ print *, (i, i=1,5 ) ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." }
+
+ ! Invalid: do-variable in a do-stmt
+ do i = 1, 5 ! { dg-error "PROTECTED and can not appear in a variable definition context .iterator variable." }
+ end do
+end subroutine test1
+
+subroutine test2(i)
+ implicit none
+ integer, intent(in) :: i
+ integer :: A(5)
+ ! Valid: data-implied-do (has a scope of the statement or construct)
+ DATA (A(i), i=1,5)/5*42/ ! OK
+
+ ! Valid: ac-implied-do (has a scope of the statement or construct)
+ print *, [(i, i=1,5 )] ! OK
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ forall (i = 1:5) ! OK
+ end forall
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ do concurrent (i = 1:5) ! OK
+ end do
+
+ ! Invalid: io-implied-do
+ print *, (i, i=1,5 ) ! { dg-error "INTENT.IN. in variable definition context .iterator variable." }
+
+ ! Invalid: do-variable in a do-stmt
+ do i = 1, 5 ! { dg-error "INTENT.IN. in variable definition context .iterator variable." }
+ end do
+end subroutine test2
+
+pure subroutine test3()
+ use m
+ implicit none
+ integer :: A(5)
+ !DATA (A(j), j=1,5)/5*42/ ! Not allowed in pure
+
+ ! Valid: ac-implied-do (has a scope of the statement or construct)
+ A = [(j, j=1,5 )] ! OK
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ forall (j = 1:5) ! OK
+ end forall
+
+ ! Valid: index-name (has a scope of the statement or construct)
+ do concurrent (j = 1:5) ! OK
+ end do
+
+ ! print *, (j, j=1,5 ) ! I/O not allowed in PURE
+
+ ! Invalid: do-variable in a do-stmt
+ do j = 1, 5 ! { dg-error "variable definition context .iterator variable. at .1. in PURE procedure" }
+ end do
+end subroutine test3
diff --git a/gcc/testsuite/gfortran.dg/do_check_7.f90 b/gcc/testsuite/gfortran.dg/do_check_7.f90
new file mode 100644
index 0000000000..9648722568
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_7.f90
@@ -0,0 +1,40 @@
+! { dg-do compile }
+! PR 30146 - warn about DO variables as argument to INTENT(IN) and
+! INTENT(INOUT) dummy arguments
+program main
+ implicit none
+ integer :: i,j, k, l
+ do k=1,2 ! { dg-error "undefined value" }
+ do i=1,10 ! { dg-error "definable" }
+ do j=1,10 ! { dg-error "undefined value" }
+ do l=1,10 ! { dg-error "definable" }
+ call s_out(k) ! { dg-error "undefined" }
+ call s_inout(i) ! { dg-error "definable" }
+ print *,f_out(j) ! { dg-error "undefined" }
+ print *,f_inout(l) ! { dg-error "definable" }
+ end do
+ end do
+ end do
+ end do
+contains
+ subroutine s_out(i_arg)
+ integer, intent(out) :: i_arg
+ end subroutine s_out
+
+ subroutine s_inout(i_arg)
+ integer, intent(inout) :: i_arg
+ end subroutine s_inout
+
+ function f_out(i_arg)
+ integer, intent(out) :: i_arg
+ integer :: f_out
+ f_out = i_arg
+ end function f_out
+
+ function f_inout(i_arg)
+ integer, intent(inout) :: i_arg
+ integer :: f_inout
+ f_inout = i_arg
+ end function f_inout
+
+end program main
diff --git a/gcc/testsuite/gfortran.dg/do_check_8.f90 b/gcc/testsuite/gfortran.dg/do_check_8.f90
new file mode 100644
index 0000000000..458ae40b60
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_8.f90
@@ -0,0 +1,59 @@
+! { dg-do compile }
+! PR 55593 - bogus error with generic subroutines
+module foo
+ implicit none
+ interface sub
+ subroutine sub2(i)
+ integer, intent(in) :: i
+ end subroutine sub2
+ subroutine sub(i)
+ integer, dimension(:), intent(out) :: i
+ end subroutine sub
+ end interface sub
+
+ interface tub2
+ subroutine tub2(i)
+ integer, intent(in) :: i
+ end subroutine tub2
+ subroutine tub(i)
+ integer, dimension(:), intent(out) :: i
+ end subroutine tub
+ end interface tub2
+
+ interface func
+ integer function ifunc(i)
+ integer, intent(in) :: i
+ end function ifunc
+ integer function func(i)
+ integer, intent(in) :: i(:)
+ end function func
+ end interface func
+
+ interface igunc
+ integer function igunc(i)
+ integer, intent(in) :: i
+ end function igunc
+ integer function gunc(i)
+ integer, intent(in) :: i(:)
+ end function gunc
+ end interface igunc
+end module foo
+
+program main
+ use foo
+ implicit none
+ integer :: i
+ do i=1,10
+ call sub(i)
+ call tub2(i)
+ end do
+ do i=1,10
+ print *,func(i)
+ print *,igunc(i)
+ end do
+
+ do undeclared=1,10 ! { dg-error "has no IMPLICIT type" }
+ call sub(undeclared)
+ end do
+end program main
+! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/do_check_9.f90 b/gcc/testsuite/gfortran.dg/do_check_9.f90
new file mode 100644
index 0000000000..9cc133b8f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_check_9.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/50554
+!
+! Contributed by Vittorio Zecca
+!
+! INQUIRE cannot redefine DO index
+!
+ do I=1,10 ! { dg-error "cannot be redefined inside loop beginning at" }
+ inquire(iolength=I) n ! { dg-error "cannot be redefined inside loop beginning at" }
+ inquire(99,size=I) ! { dg-error "cannot be redefined inside loop beginning at" }
+ read(99,'(i4)',size=I,advance="no") n ! { dg-error "cannot be redefined inside loop beginning at" }
+ end do
+ end
diff --git a/gcc/testsuite/gfortran.dg/do_concurrent_3.f90 b/gcc/testsuite/gfortran.dg/do_concurrent_3.f90
new file mode 100644
index 0000000000..09bb0cce72
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/do_concurrent_3.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! PR 56519 - flag impure intrinsic subroutine calls
+! within DO CONCURRENT
+program main
+ implicit none
+ integer :: i
+ real :: array(123), val
+
+ do concurrent (i = 1:123)
+ call random_number (val) ! { dg-error "is not PURE" }
+ array(i) = val
+ end do
+end program main
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_1.f90 b/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
index 37f0f888d6..6c0dfcb24d 100644
--- a/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
+++ b/gcc/testsuite/gfortran.dg/dollar_sym_1.f90
@@ -3,7 +3,7 @@
! Variable names containing $ signs
!
REAL*4 PLT$C_HOUSTPIX ! { dg-error "Invalid character '\\$'" }
- INTEGER PLT$C_COMMAND ! { dg-error "Invalid character '\\$'" }
- PARAMETER (PLT$B_OPC=0) ! { dg-error "Invalid character '\\$'" }
- common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND ! { dg-error "Invalid character '\\$'" }
+ INTEGER PLT$C_COMMAND ! Unreachable as the error above is now fatal
+ PARAMETER (PLT$B_OPC=0) ! Unreachable as the error above is now fatal
+ common /abc$def/ PLT$C_HOUSTPIX, PLT$C_COMMAND ! Unreachable as the error above is now fatal
end
diff --git a/gcc/testsuite/gfortran.dg/dollar_sym_3.f b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
new file mode 100644
index 0000000000..7cf2047eda
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dollar_sym_3.f
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/57895
+!
+! Contributed by Vittorio Zecca
+!
+c Segmentation fault in gfc_restore_last_undo_checkpoint
+ COMMON RADE3155V62$JUTMU9L9E(3,3,3), LADE314JUTMP9 ! { dg-error "Invalid character '\\$' at .1.. Use -fdollar-ok to allow it as an extension" }
+ +LHEDDJNTMP9L(3,3,3)
+ end
diff --git a/gcc/testsuite/gfortran.dg/dot_product_2.f90 b/gcc/testsuite/gfortran.dg/dot_product_2.f90
new file mode 100644
index 0000000000..a5fe3b0517
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dot_product_2.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/57785
+!
+! Contributed by Kontantinos Anagnostopoulos
+!
+! The implicit complex conjugate was missing for DOT_PRODUCT
+
+
+! For the following, the compile-time simplification fails for SUM;
+! see PR fortran/56342. Hence, a manually expanded SUM is used.
+
+!if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
+! /= SUM (CONJG ((/ (1.0, 2.0), (2.0, 3.0) /))*(/ (1.0, 1.0), (1.0, 4.0) /))) &
+! call abort ()
+!
+!if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
+! RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) /= &
+! SUM ((/ (1.0, 2.0), (2.0, 3.0) /)*(/ (1.0, 1.0), (1.0, 4.0) /)))) &
+! call abort ()
+
+
+if (DOT_PRODUCT ((/ (1.0, 2.0), (2.0, 3.0) /), (/ (1.0, 1.0), (1.0, 4.0) /)) &
+ /= CONJG (cmplx(1.0, 2.0)) * cmplx(1.0, 1.0) &
+ + CONJG (cmplx(2.0, 3.0)) * cmplx(1.0, 4.0)) &
+ call abort ()
+
+if (ANY (MATMUL ((/ (1.0, 2.0), (2.0, 3.0) /), &
+ RESHAPE ((/ (1.0, 1.0), (1.0, 4.0) /),(/2, 1/))) &
+ /= cmplx(1.0, 2.0) * cmplx(1.0, 1.0) &
+ + cmplx(2.0, 3.0) * cmplx(1.0, 4.0))) &
+ call abort ()
+end
+
+
+! { dg-final { scan-tree-dump-not "abort" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/dot_product_3.f90 b/gcc/testsuite/gfortran.dg/dot_product_3.f90
new file mode 100644
index 0000000000..6e11556ee8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dot_product_3.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR 61999 - this used to ICE.
+! Original test case by A. Kasahara
+program main
+ use, intrinsic:: iso_fortran_env, only: output_unit
+
+ implicit none
+
+ write(output_unit, *) dot_product([1, 2], [2.0, 3.0])
+
+ stop
+end program main
+! { dg-final { scan-tree-dump-times "8\\.0e\\+0" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_functions_1.f90 b/gcc/testsuite/gfortran.dg/dummy_functions_1.f90
index 8076cf911a..dfcf644c25 100644
--- a/gcc/testsuite/gfortran.dg/dummy_functions_1.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_functions_1.f90
@@ -34,5 +34,3 @@ program test
use innerfun
call foo(3,f)
end program test
-
-! { dg-final { cleanup-modules "innerfun outerfun" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90
index 55107b69a6..564aff23fc 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_1.f90
@@ -48,5 +48,3 @@ contains
w = 1
end function w
end
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_10.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_10.f90
new file mode 100644
index 0000000000..2720b8f2eb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_10.f90
@@ -0,0 +1,56 @@
+! { dg-do compile }
+!
+! PR 35831: [F95] Shape mismatch check missing for dummy procedure argument
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+program test_attributes
+
+ call tester1 (a1) ! { dg-error "ASYNCHRONOUS mismatch in argument" }
+ call tester2 (a2) ! { dg-error "CONTIGUOUS mismatch in argument" }
+ call tester3 (a1) ! { dg-error "VALUE mismatch in argument" }
+ call tester4 (a1) ! { dg-error "VOLATILE mismatch in argument" }
+
+contains
+
+ subroutine a1(aa)
+ real :: aa
+ end subroutine
+
+ subroutine a2(bb)
+ real :: bb(:)
+ end subroutine
+
+ subroutine tester1 (f1)
+ interface
+ subroutine f1 (a)
+ real, asynchronous :: a
+ end subroutine
+ end interface
+ end subroutine
+
+ subroutine tester2 (f2)
+ interface
+ subroutine f2 (b)
+ real, contiguous :: b(:)
+ end subroutine
+ end interface
+ end subroutine
+
+ subroutine tester3 (f3)
+ interface
+ subroutine f3 (c)
+ real, value :: c
+ end subroutine
+ end interface
+ end subroutine
+
+ subroutine tester4 (f4)
+ interface
+ subroutine f4 (d)
+ real, volatile :: d
+ end subroutine
+ end interface
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_2.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_2.f90
index b589808639..dd609bd000 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_2.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_2.f90
@@ -31,4 +31,3 @@ contains
print *,integrate (g,0d0,3d0)
end subroutine foo2
end
-! { dg-final { cleanup-modules "integrator" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_3.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_3.f90
index cde2f0166a..2a17b06d19 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_3.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_3.f90
@@ -36,5 +36,3 @@ contains
end do
end function
end
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_4.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_4.f90
index 498685bde3..8c1e55417e 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_4.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_4.f90
@@ -44,5 +44,3 @@ contains
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
index 0133cbf7d1..cb0e7c04d0 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_5.f90
@@ -15,7 +15,7 @@ program main
end type
type(u), external :: ufunc
- call sub(ufunc) ! { dg-error "Type/rank mismatch in return value" }
+ call sub(ufunc) ! { dg-error "Type mismatch in function result" }
contains
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_6.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_6.f90
index fa9ebfe354..dfd51d65a7 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_6.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_6.f90
@@ -67,5 +67,3 @@ contains
end subroutine
end program
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90
index 32cd65ae8b..0e5b7d9eef 100644
--- a/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_7.f90
@@ -61,5 +61,3 @@ program test
call sol(cost)
if (icheck /= 1) call abort ()
end program test
-
-! { dg-final { cleanup-modules "t tt check" } }
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_8.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_8.f90
new file mode 100644
index 0000000000..7b8a2645f7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_8.f90
@@ -0,0 +1,88 @@
+! { dg-do compile }
+!
+! PR 35831: [F95] Shape mismatch check missing for dummy procedure argument
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+implicit none
+
+call call_a(a1) ! { dg-error "Character length mismatch in function result" }
+call call_a(a2) ! { dg-error "Character length mismatch in function result" }
+call call_b(b1) ! { dg-error "Shape mismatch" }
+call call_c(c1) ! { dg-error "POINTER attribute mismatch in function result" }
+call call_d(c1) ! { dg-error "ALLOCATABLE attribute mismatch in function result" }
+call call_e(e1) ! { dg-error "CONTIGUOUS attribute mismatch in function result" }
+call call_f(c1) ! { dg-error "PROCEDURE POINTER mismatch in function result" }
+
+contains
+
+ character(1) function a1()
+ end function
+
+ character(:) function a2()
+ end function
+
+ subroutine call_a(a3)
+ interface
+ character(2) function a3()
+ end function
+ end interface
+ end subroutine
+
+
+ function b1()
+ integer, dimension(1:3) :: b1
+ end function
+
+ subroutine call_b(b2)
+ interface
+ function b2()
+ integer, dimension(0:4) :: b2
+ end function
+ end interface
+ end subroutine
+
+
+ integer function c1()
+ end function
+
+ subroutine call_c(c2)
+ interface
+ function c2()
+ integer, pointer :: c2
+ end function
+ end interface
+ end subroutine
+
+
+ subroutine call_d(d2)
+ interface
+ function d2()
+ integer, allocatable :: d2
+ end function
+ end interface
+ end subroutine
+
+
+ function e1()
+ integer, dimension(:), pointer :: e1
+ end function
+
+ subroutine call_e(e2)
+ interface
+ function e2()
+ integer, dimension(:), pointer, contiguous :: e2
+ end function
+ end interface
+ end subroutine
+
+
+ subroutine call_f(f2)
+ interface
+ function f2()
+ procedure(integer), pointer :: f2
+ end function
+ end interface
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/dummy_procedure_9.f90 b/gcc/testsuite/gfortran.dg/dummy_procedure_9.f90
new file mode 100644
index 0000000000..16da37f189
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dummy_procedure_9.f90
@@ -0,0 +1,37 @@
+! { dg-do compile }
+!
+! PR 40453: [F95] Enhanced (recursive) argument checking
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+program RecursiveInterface
+
+ call c(b2) ! { dg-error "Interface mismatch in dummy procedure" }
+
+ contains
+
+ subroutine a1(x)
+ real :: x
+ end subroutine
+
+ subroutine a2(i)
+ integer :: i
+ end subroutine
+
+ !!!!!!!!!!!!!!!
+
+ subroutine b1 (f1)
+ procedure(a1) :: f1
+ end subroutine
+
+ subroutine b2 (f2)
+ procedure(a2) :: f2
+ end subroutine
+
+ !!!!!!!!!!!!!!!
+
+ subroutine c(g)
+ procedure(b1) :: g
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f03
index 2182dce3e4..c07b189e21 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_1.f03
@@ -76,4 +76,3 @@ end module m
if (a%prod() .ne. 42) call abort
if (a%extract (4) .ne. 168) call abort
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f03
index 21cf1409e1..2831b08874 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_10.f03
@@ -167,5 +167,3 @@ program main
end do
end
-
-! { dg-final { cleanup-modules "basestrategy laxwendroffstrategy kestrategy" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_11.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_11.f03
index e4abcb2846..a4fb39a809 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_11.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_11.f03
@@ -30,6 +30,3 @@ end module
allocate(a)
if (a%get()/=1) call abort()
end
-
-
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90
new file mode 100644
index 0000000000..d37e1f6a9b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_12.f90
@@ -0,0 +1,74 @@
+! { dg-do run }
+!
+! PR 59654: [4.8/4.9 Regression] [OOP] Broken function table with complex OO use case
+!
+! Contributed by Thomas Clune <Thomas.L.Clune@nasa.gov>
+
+module TestResult_mod
+ implicit none
+
+ type TestResult
+ integer :: numRun = 0
+ contains
+ procedure :: run
+ procedure, nopass :: getNumRun
+ end type
+
+contains
+
+ subroutine run (this)
+ class (TestResult) :: this
+ this%numRun = this%numRun + 1
+ end subroutine
+
+ subroutine getNumRun()
+ end subroutine
+
+end module
+
+
+module BaseTestRunner_mod
+ implicit none
+
+ type :: BaseTestRunner
+ contains
+ procedure, nopass :: norun
+ end type
+
+contains
+
+ function norun () result(result)
+ use TestResult_mod, only: TestResult
+ type (TestResult) :: result
+ end function
+
+end module
+
+
+module TestRunner_mod
+ use BaseTestRunner_mod, only: BaseTestRunner
+ implicit none
+end module
+
+
+program main
+ use TestRunner_mod, only: BaseTestRunner
+ use TestResult_mod, only: TestResult
+ implicit none
+
+ type (TestResult) :: result
+
+ call runtest (result)
+
+contains
+
+ subroutine runtest (result)
+ use TestResult_mod, only: TestResult
+ class (TestResult) :: result
+ call result%run()
+ if (result%numRun /= 1) call abort()
+ end subroutine
+
+end
+
+! { dg-final { cleanup-modules "TestResult_mod BaseTestRunner_mod TestRunner_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f03
index 95ce837232..c30ce6a808 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_2.f03
@@ -94,4 +94,3 @@ end module m
call a%extract (4, i)
if (i .ne. 168) call abort
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f03
index 884d342603..41c784d170 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_3.f03
@@ -83,4 +83,3 @@ end module m2
if (a%prod() .ne. 42) call abort
if (a%extract (4) .ne. 168) call abort
end
-! { dg-final { cleanup-modules "m1, m2" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03
index b72819acc4..b31f910cfb 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_4.f03
@@ -92,5 +92,3 @@ end module a_bar_mod
call a%doit
if (a%getit () .ne. 3) call abort
end
-! { dg-final { cleanup-modules "foo_mod s_bar_mod a_bar_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03
index 9cc16bc1c0..dee6aae596 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_5.f03
@@ -183,5 +183,3 @@ end module s_mat_mod
call a%scal (1.0_spk_, info)
if (info .ne. 700) call abort
end
-! { dg-final { cleanup-modules "const_mod base_mat_mod s_base_mat_mod s_mat_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_6.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_6.f03
index e2d880e0ef..e54966bf1e 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_6.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_6.f03
@@ -65,5 +65,3 @@ program main
allocate (periodic_5th_factory :: field_creator)
u => field_creator%create()
end program
-
-! { dg-final { cleanup-modules "field_module periodic_5th_order_module field_factory_module periodic_5th_factory_module" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_7.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_7.f03
index 3cd0510472..89ed05c753 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_7.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_7.f03
@@ -56,6 +56,4 @@ end module
z%a => y
if ((z%sizeof() .ne. 2) .or. (z%a%sizeof() .ne. 2)) call abort
end
-
-! { dg-final { cleanup-modules "m1 m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_8.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_8.f03
index 4f3d8069b4..889cd33c03 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_8.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_8.f03
@@ -103,6 +103,3 @@ program testd10
if (a%getit() .ne. 3) call abort
end program testd10
-
-! { dg-final { cleanup-modules "foo_mod foo2_mod bar_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f03 b/gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f03
index bf6a3d5587..9541fa8d69 100644
--- a/gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f03
+++ b/gcc/testsuite/gfortran.dg/dynamic_dispatch_9.f03
@@ -49,6 +49,3 @@ end
if (o2%gen(3) .ne. 9) call abort
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/edit_real_1.f90 b/gcc/testsuite/gfortran.dg/edit_real_1.f90
index 3ac7cb4772..594b2f1722 100644
--- a/gcc/testsuite/gfortran.dg/edit_real_1.f90
+++ b/gcc/testsuite/gfortran.dg/edit_real_1.f90
@@ -68,7 +68,7 @@ program edit_real_1
if (s .ne. '12.345E-01z') call abort
! E format, negative scale factor
s = x
- write (s, '(-2PE10.4,A)') 1.25, "z"
+ write (s, '(-2PE10.4,A)') 1.250001, "z"
if (s .ne. '0.0013E+03z') call abort
! E format, single digit precision
s = x
diff --git a/gcc/testsuite/gfortran.dg/elemental_args_check_2.f90 b/gcc/testsuite/gfortran.dg/elemental_args_check_2.f90
index e8b429305e..51e69a49ee 100644
--- a/gcc/testsuite/gfortran.dg/elemental_args_check_2.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_args_check_2.f90
@@ -17,4 +17,3 @@ CONTAINS
END INTERFACE
END SUBROUTINE S1
END MODULE M1
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_args_check_3.f90 b/gcc/testsuite/gfortran.dg/elemental_args_check_3.f90
index 77111f1c51..8d63874579 100644
--- a/gcc/testsuite/gfortran.dg/elemental_args_check_3.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_args_check_3.f90
@@ -13,7 +13,7 @@ CONTAINS
(a, & ! { dg-error "must be scalar" }
b, & ! { dg-error "POINTER attribute" }
c, & ! { dg-error "ALLOCATABLE attribute" }
- d) ! { dg-error "INTENT specified" }
+ d) ! { dg-error "must have its INTENT specified or have the VALUE attribute" }
INTEGER, INTENT(IN) :: a(:)
INTEGER, POINTER, INTENT(IN) :: b
INTEGER, ALLOCATABLE, INTENT(IN) :: c
diff --git a/gcc/testsuite/gfortran.dg/elemental_args_check_7.f90 b/gcc/testsuite/gfortran.dg/elemental_args_check_7.f90
new file mode 100644
index 0000000000..7b5843b950
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_args_check_7.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR fortran/55638
+!
+! Additionally, VALUE no INTENT is required (and only "intent(in)" allowed)
+!
+
+ elemental subroutine foo(x, y, z)
+ integer, intent(inout) :: x
+ integer, VALUE :: y
+ integer, VALUE, intent(in) :: z
+ x = y
+ end subroutine foo
+
+ impure elemental subroutine foo2(x, y, z) ! { dg-error "Argument 'x' of elemental procedure 'foo2' at .1. must have its INTENT specified or have the VALUE attribute" }
+ integer :: x
+ integer, VALUE :: y
+ integer, VALUE :: z
+ x = y
+ end subroutine foo2
+
+ subroutine foo3(x, y, z)
+ integer, VALUE, intent(in) :: x
+ integer, VALUE, intent(inout) :: y ! { dg-error "VALUE attribute conflicts with INTENT.INOUT. attribute" }
+ integer, VALUE, intent(out) :: z ! { dg-error "VALUE attribute conflicts with INTENT.OUT. attribute" }
+ end subroutine foo3
diff --git a/gcc/testsuite/gfortran.dg/elemental_by_value_1.f90 b/gcc/testsuite/gfortran.dg/elemental_by_value_1.f90
new file mode 100644
index 0000000000..4fc59471b5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_by_value_1.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+!
+! PR fortran/59026
+!
+! Contributed by F-X Coudert <fxcoudert@gcc.gnu.org>
+!
+! Failed to dereference the argument in scalarized loop.
+!
+elemental integer function foo(x)
+ integer, value :: x
+ foo = x + 1
+end function
+
+ interface
+ elemental integer function foo(x)
+ integer, value :: x
+ end function
+ end interface
+
+ if (foo(42) .ne. 43) call abort
+ if (any (foo([0,1]) .ne. [1,2])) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/elemental_dependency_2.f90 b/gcc/testsuite/gfortran.dg/elemental_dependency_2.f90
index 2282e8821f..348c6c7aa5 100644
--- a/gcc/testsuite/gfortran.dg/elemental_dependency_2.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_dependency_2.f90
@@ -32,5 +32,3 @@ contains
call add (c , b )
end subroutine foo
end module gfcbug82
-
-! { dg-final { cleanup-modules "gfcbug82" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_initializer_1.f90 b/gcc/testsuite/gfortran.dg/elemental_initializer_1.f90
index 0e717c947d..7280e2582b 100644
--- a/gcc/testsuite/gfortran.dg/elemental_initializer_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_initializer_1.f90
@@ -31,5 +31,3 @@ contains
end function len_
end module iso_varying_string
-
-! { dg-final { cleanup-modules "iso_varying_string" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_non_intrinsic_dummy_1.f90 b/gcc/testsuite/gfortran.dg/elemental_non_intrinsic_dummy_1.f90
index b9404a0c0d..c14a5d87fa 100644
--- a/gcc/testsuite/gfortran.dg/elemental_non_intrinsic_dummy_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_non_intrinsic_dummy_1.f90
@@ -19,5 +19,3 @@ INTEGER FUNCTION SUB(XX)
INTEGER :: XX
SUB=XX()
END
-
-! { dg-final { cleanup-modules "tt" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_optional_args_5.f03 b/gcc/testsuite/gfortran.dg/elemental_optional_args_5.f03
index 70a27d80cd..e0ed0c20d5 100644
--- a/gcc/testsuite/gfortran.dg/elemental_optional_args_5.f03
+++ b/gcc/testsuite/gfortran.dg/elemental_optional_args_5.f03
@@ -69,6 +69,156 @@ if (s /= 5*2) call abort()
if (any (v /= [5*2, 5*2])) call abort()
+! ARRAY COMPONENTS: Non alloc/assoc
+
+v = [9, 33]
+
+call sub1 (v, x%a2, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+call sub1 (v, x%p2, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+
+! ARRAY COMPONENTS: alloc/assoc
+
+allocate (x%a2(2), x%p2(2))
+x%a2(:) = [84, 82]
+x%p2 = [35, 58]
+
+call sub1 (v, x%a2, .true.)
+!print *, v
+if (any (v /= [84*2, 82*2])) call abort()
+
+call sub1 (v, x%p2, .true.)
+!print *, v
+if (any (v /= [35*2, 58*2])) call abort()
+
+
+! =============== sub_t ==================
+! SCALAR DT: Non alloc/assoc
+
+s = 3
+v = [9, 33]
+
+call sub_t (s, ta, .false.)
+call sub_t (v, ta, .false.)
+!print *, s, v
+if (s /= 3) call abort()
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (s, tp, .false.)
+call sub_t (v, tp, .false.)
+!print *, s, v
+if (s /= 3) call abort()
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (s, ca, .false.)
+call sub_t (v, ca, .false.)
+!print *, s, v
+if (s /= 3) call abort()
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (s, cp, .false.)
+call sub_t (v, cp, .false.)
+!print *, s, v
+if (s /= 3) call abort()
+if (any (v /= [9, 33])) call abort()
+
+! SCALAR COMPONENTS: alloc/assoc
+
+allocate (ta, tp, ca, cp)
+ta%a = 4
+tp%a = 5
+ca%a = 6
+cp%a = 7
+
+call sub_t (s, ta, .true.)
+call sub_t (v, ta, .true.)
+!print *, s, v
+if (s /= 4*2) call abort()
+if (any (v /= [4*2, 4*2])) call abort()
+
+call sub_t (s, tp, .true.)
+call sub_t (v, tp, .true.)
+!print *, s, v
+if (s /= 5*2) call abort()
+if (any (v /= [5*2, 5*2])) call abort()
+
+call sub_t (s, ca, .true.)
+call sub_t (v, ca, .true.)
+!print *, s, v
+if (s /= 6*2) call abort()
+if (any (v /= [6*2, 6*2])) call abort()
+
+call sub_t (s, cp, .true.)
+call sub_t (v, cp, .true.)
+!print *, s, v
+if (s /= 7*2) call abort()
+if (any (v /= [7*2, 7*2])) call abort()
+
+! ARRAY COMPONENTS: Non alloc/assoc
+
+v = [9, 33]
+
+call sub_t (v, taa, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (v, tpa, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (v, caa, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+call sub_t (v, cpa, .false.)
+!print *, v
+if (any (v /= [9, 33])) call abort()
+
+deallocate(ta, tp, ca, cp)
+
+
+! ARRAY COMPONENTS: alloc/assoc
+
+allocate (taa(2), tpa(2))
+taa(1:2)%a = [44, 444]
+tpa(1:2)%a = [55, 555]
+allocate (caa(2), source=[t(66), t(666)])
+allocate (cpa(2), source=[t(77), t(777)])
+
+select type (caa)
+type is (t)
+ if (any (caa(:)%a /= [66, 666])) call abort()
+end select
+
+select type (cpa)
+type is (t)
+ if (any (cpa(:)%a /= [77, 777])) call abort()
+end select
+
+call sub_t (v, taa, .true.)
+!print *, v
+if (any (v /= [44*2, 444*2])) call abort()
+
+call sub_t (v, tpa, .true.)
+!print *, v
+if (any (v /= [55*2, 555*2])) call abort()
+
+
+call sub_t (v, caa, .true.)
+!print *, v
+if (any (v /= [66*2, 666*2])) call abort()
+
+call sub_t (v, cpa, .true.)
+!print *, v
+if (any (v /= [77*2, 777*2])) call abort()
+
+deallocate (taa, tpa, caa, cpa)
+
contains
@@ -82,5 +232,15 @@ contains
x = y*2
end subroutine sub1
+ elemental subroutine sub_t(x, y, alloc)
+ integer, intent(inout) :: x
+ type(t), intent(in), optional :: y
+ logical, intent(in) :: alloc
+ if (alloc .neqv. present (y)) &
+ x = -99
+ if (present(y)) &
+ x = y%a*2
+ end subroutine sub_t
+
end
diff --git a/gcc/testsuite/gfortran.dg/elemental_optional_args_6.f90 b/gcc/testsuite/gfortran.dg/elemental_optional_args_6.f90
new file mode 100644
index 0000000000..ad1c252fb0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_optional_args_6.f90
@@ -0,0 +1,56 @@
+! { dg-do run }
+!
+! PR fortran/53692
+!
+! Check that the nonabsent arrary is used for scalarization:
+! Either the NONOPTIONAL one or, if there are none, any array.
+!
+! Based on a program by Daniel C Chen
+!
+Program main
+ implicit none
+ integer :: arr1(2), arr2(2)
+ arr1 = [ 1, 2 ]
+ arr2 = [ 1, 2 ]
+ call sub1 (arg2=arr2)
+
+ call two ()
+contains
+ subroutine sub1 (arg1, arg2)
+ integer, optional :: arg1(:)
+ integer :: arg2(:)
+! print *, fun1 (arg1, arg2)
+ if (size (fun1 (arg1, arg2)) /= 2) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ if (any (fun1 (arg1, arg2) /= [1,2])) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ end subroutine
+
+ elemental function fun1 (arg1, arg2)
+ integer,intent(in), optional :: arg1
+ integer,intent(in) :: arg2
+ integer :: fun1
+ fun1 = arg2
+ end function
+end program
+
+subroutine two ()
+ implicit none
+ integer :: arr1(2), arr2(2)
+ arr1 = [ 1, 2 ]
+ arr2 = [ 1, 2 ]
+ call sub2 (arr1, arg2=arr2)
+contains
+ subroutine sub2 (arg1, arg2)
+ integer, optional :: arg1(:)
+ integer, optional :: arg2(:)
+! print *, fun2 (arg1, arg2)
+ if (size (fun2 (arg1, arg2)) /= 2) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ if (any (fun2 (arg1, arg2) /= [1,2])) call abort() ! { dg-warning "is an array and OPTIONAL" }
+ end subroutine
+
+ elemental function fun2 (arg1,arg2)
+ integer,intent(in), optional :: arg1
+ integer,intent(in), optional :: arg2
+ integer :: fun2
+ fun2 = arg2
+ end function
+end subroutine two
diff --git a/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90 b/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
index bce34527a8..b5d99611c7 100644
--- a/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_pointer_1.f90
@@ -9,5 +9,3 @@ CONTAINS
POINTER :: LL ! { dg-error " POINTER attribute conflicts with ELEMENTAL attribute" }
END FUNCTION LL
END MODULE Test
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_result_1.f90 b/gcc/testsuite/gfortran.dg/elemental_result_1.f90
index 09f785af76..566303953c 100644
--- a/gcc/testsuite/gfortran.dg/elemental_result_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_result_1.f90
@@ -18,4 +18,3 @@ CONTAINS
INTEGER, pointer :: MM ! { dg-error "conflicts with ELEMENTAL" }
END FUNCTION MM
END MODULE Test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90 b/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90
index d180bc931d..4e2a21ea82 100644
--- a/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_scalar_args_1.f90
@@ -84,4 +84,3 @@ contains
if (any (b .ne. real_one)) call abort
end subroutine test_real
end program main
-! { dg-final { cleanup-modules "polar_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
index 802d1ed20f..a19a7807c1 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_1.f90
@@ -58,5 +58,3 @@ contains
b = -a
end subroutine foobar
end
-
-! { dg-final { cleanup-modules "pr22146" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_10.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_10.f90
new file mode 100644
index 0000000000..be343e6ff2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_10.f90
@@ -0,0 +1,68 @@
+! { dg-do run }
+!
+! PR fortran/60066
+!
+! Contributed by F Martinez Fadrique <fmartinez@gmv.com>
+!
+! Fixed by the patch for PR59906 but adds another, different test.
+!
+module m_assertion_character
+ implicit none
+ type :: t_assertion_character
+ character(len=8) :: name
+ contains
+ procedure :: assertion_character
+ procedure :: write => assertion_array_write
+ end type t_assertion_character
+contains
+ elemental subroutine assertion_character( ast, name )
+ class(t_assertion_character), intent(out) :: ast
+ character(len=*), intent(in) :: name
+ ast%name = name
+ end subroutine assertion_character
+ subroutine assertion_array_write( ast, unit )
+ class(t_assertion_character), intent(in) :: ast
+ character(*), intent(inOUT) :: unit
+ write(unit,*) trim (unit(2:len(unit)))//trim (ast%name)
+ end subroutine assertion_array_write
+end module m_assertion_character
+
+module m_assertion_array_character
+ use m_assertion_character
+ implicit none
+ type :: t_assertion_array_character
+ type(t_assertion_character), dimension(:), allocatable :: rast
+ contains
+ procedure :: assertion_array_character
+ procedure :: write => assertion_array_character_write
+ end type t_assertion_array_character
+contains
+ pure subroutine assertion_array_character( ast, name, nast )
+ class(t_assertion_array_character), intent(out) :: ast
+ character(len=*), intent(in) :: name
+ integer, intent(in) :: nast
+ integer :: i
+ allocate ( ast%rast(nast) )
+ call ast%rast%assertion_character ( name )
+ end subroutine assertion_array_character
+ subroutine assertion_array_character_write( ast, unit )
+ class(t_assertion_array_character), intent(in) :: ast
+ CHARACTER(*), intent(inOUT) :: unit
+ integer :: i
+ do i = 1, size (ast%rast)
+ call ast%rast(i)%write (unit)
+ end do
+ end subroutine assertion_array_character_write
+end module m_assertion_array_character
+
+program main
+ use m_assertion_array_character
+ implicit none
+ type(t_assertion_array_character) :: ast
+ character(len=8) :: name
+ character (26) :: line = ''
+ name = 'test'
+ call ast%assertion_array_character ( name, 5 )
+ call ast%write (line)
+ if (line(2:len (line)) .ne. "testtesttesttesttest") call abort
+end program main
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_2.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_2.f90
index e958311869..b7d9afe9e0 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_2.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_2.f90
@@ -62,5 +62,3 @@ program test_assign
if (any(reshape (i, (/4/)).ne.(/1,8,27,64/))) call abort ()
end program test_assign
-
-! { dg-final { cleanup-modules "type assign" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_3.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_3.f90
index 1f93cd4a2c..22c0b20b15 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_3.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_3.f90
@@ -48,6 +48,3 @@ program test
y = reshape (z, (/6/))
if (any(y%x .ne. (/ 64000, 128000, 19200, 64, 128000, 256000/))) call abort ()
end program test
-
-! { dg-final { cleanup-modules "elem_assign" } }
-
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90
index 9d2bc492f5..625810479c 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_4.f90
@@ -34,5 +34,3 @@ CONTAINS
INTEGER, INTENT(IN) :: I,J
END SUBROUTINE S
END
-
-! { dg-final { cleanup-modules "elem_assign" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90
index 44577c888b..d26833710a 100644
--- a/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_6.f90
@@ -22,4 +22,3 @@ CONTAINS
out(1, 1:42) = in(1, 1:42)
END SUBROUTINE
END MODULE foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_8.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_8.f90
new file mode 100644
index 0000000000..c557d3a9d9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_8.f90
@@ -0,0 +1,50 @@
+! { dg-do compile }
+!
+! PR fortran/58099
+!
+! See also interpretation request F03-0130 in 09-217 and 10-006T5r1.
+!
+! - ELEMENTAL is only permitted for external names with PROCEDURE/INTERFACE
+! but not for dummy arguments or proc-pointers
+! - Using PROCEDURE with an elemental intrinsic as interface name a is valid,
+! but doesn't make the proc-pointer/dummy argument elemental
+!
+
+ interface
+ elemental real function x(y)
+ real, intent(in) :: y
+ end function x
+ end interface
+ intrinsic :: sin
+ procedure(x) :: xx1 ! OK
+ procedure(x), pointer :: xx2 ! { dg-error "Procedure pointer 'xx2' at .1. shall not be elemental" }
+ procedure(real), pointer :: pp
+ procedure(sin) :: bar ! OK
+ procedure(sin), pointer :: foo ! { dg-error "Procedure pointer 'foo' at .1. shall not be elemental" }
+ pp => sin !OK
+contains
+ subroutine sub1(z) ! { dg-error "Dummy procedure 'z' at .1. shall not be elemental" }
+ procedure(x) :: z
+ end subroutine sub1
+ subroutine sub2(z) ! { dg-error "Procedure pointer 'z' at .1. shall not be elemental" }
+ procedure(x), pointer :: z
+ end subroutine sub2
+ subroutine sub3(z)
+ interface
+ elemental real function z(y) ! { dg-error "Dummy procedure 'z' at .1. shall not be elemental" }
+ real, intent(in) :: y
+ end function z
+ end interface
+ end subroutine sub3
+ subroutine sub4(z)
+ interface
+ elemental real function z(y) ! { dg-error "Procedure pointer 'z' at .1. shall not be elemental" }
+ real, intent(in) :: y
+ end function z
+ end interface
+ pointer :: z
+ end subroutine sub4
+ subroutine sub5(z) ! { dg-error "Dummy procedure 'z' at .1. shall not be elemental" }
+ procedure(sin) :: z
+ end subroutine sub5
+end
diff --git a/gcc/testsuite/gfortran.dg/elemental_subroutine_9.f90 b/gcc/testsuite/gfortran.dg/elemental_subroutine_9.f90
new file mode 100644
index 0000000000..8f574bf595
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/elemental_subroutine_9.f90
@@ -0,0 +1,39 @@
+! { dg-do run }
+!
+! PR fortran/59906
+!
+! Contributed by H Anlauf <anlauf@gmx.de>
+!
+! Failed generate character scalar for scalarized loop for elemantal call.
+!
+program x
+ implicit none
+ call y('bbb')
+contains
+
+ subroutine y(str)
+ character(len=*), intent(in) :: str
+ character(len=len_trim(str)) :: str_aux
+ character(len=3) :: str3 = 'abc'
+
+ str_aux = str
+
+ ! Compiled but did not give correct result
+ if (any (str_cmp((/'aaa','bbb'/), str) .neqv. [.FALSE.,.TRUE.])) call abort
+
+ ! Did not compile
+ if (any (str_cmp((/'bbb', 'aaa'/), str_aux) .neqv. [.TRUE.,.FALSE.])) call abort
+
+ ! Verify patch
+ if (any (str_cmp((/'bbb', 'aaa'/), str3) .neqv. [.FALSE.,.FALSE.])) call abort
+ if (any (str_cmp((/'bbb', 'aaa'/), 'aaa') .neqv. [.FALSE.,.TRUE.])) call abort
+
+ end subroutine y
+
+ elemental logical function str_cmp(str1, str2)
+ character(len=*), intent(in) :: str1
+ character(len=*), intent(in) :: str2
+ str_cmp = (str1 == str2)
+ end function str_cmp
+
+end program x
diff --git a/gcc/testsuite/gfortran.dg/empty_derived_type.f90 b/gcc/testsuite/gfortran.dg/empty_derived_type.f90
index d6fad1235f..6bf616c2c6 100644
--- a/gcc/testsuite/gfortran.dg/empty_derived_type.f90
+++ b/gcc/testsuite/gfortran.dg/empty_derived_type.f90
@@ -5,5 +5,3 @@ module stuff
! Empty!
end type junk
end module stuff
-
-! { dg-final { cleanup-modules "stuff" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_1.f90 b/gcc/testsuite/gfortran.dg/entry_1.f90
index c9048a0442..dae868ec85 100644
--- a/gcc/testsuite/gfortran.dg/entry_1.f90
+++ b/gcc/testsuite/gfortran.dg/entry_1.f90
@@ -43,5 +43,3 @@ program p
call test1 ()
call test2 ()
end program
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_10.f90 b/gcc/testsuite/gfortran.dg/entry_10.f90
index 154d44ea9b..dc80c7949e 100644
--- a/gcc/testsuite/gfortran.dg/entry_10.f90
+++ b/gcc/testsuite/gfortran.dg/entry_10.f90
@@ -33,4 +33,3 @@ end module
if (e (1.0) .ne. 3.0) call abort ()
if (f (1 ) .ne. 4.0) call abort ()
end
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_12.f90 b/gcc/testsuite/gfortran.dg/entry_12.f90
index 5513697a17..15e874e2b0 100644
--- a/gcc/testsuite/gfortran.dg/entry_12.f90
+++ b/gcc/testsuite/gfortran.dg/entry_12.f90
@@ -28,4 +28,3 @@ END MODULE ksbin1_aux_mod
if (any ((/foo (), bar (99), foobar (), foobar (99), j (), k (99)/) .ne. &
(/1, 2, 1, 2, 1, 2/))) Call abort ()
end
-! { dg-final { cleanup-modules "ksbin1_aux_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_13.f90 b/gcc/testsuite/gfortran.dg/entry_13.f90
index 3a45fc5ea0..1858cc3773 100644
--- a/gcc/testsuite/gfortran.dg/entry_13.f90
+++ b/gcc/testsuite/gfortran.dg/entry_13.f90
@@ -76,5 +76,3 @@ program test
z1 = y1==x1
if (abs(z1%x - 19.0_4/7.0_4) > epsilon(x1%x)) call abort ()
end program test
-! { dg-final { cleanup-modules "type_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/entry_14.f90 b/gcc/testsuite/gfortran.dg/entry_14.f90
index e0aa00078c..dfed19549f 100644
--- a/gcc/testsuite/gfortran.dg/entry_14.f90
+++ b/gcc/testsuite/gfortran.dg/entry_14.f90
@@ -99,5 +99,3 @@ contains
if(abs(ent(27) + 216.0) > tiny(1.0)) call abort()
end subroutine test4
end program main
-
-! { dg-final { cleanup-modules "m1 m2 m3 m4" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_16.f90 b/gcc/testsuite/gfortran.dg/entry_16.f90
index 384d99fd72..ba8eff86b8 100644
--- a/gcc/testsuite/gfortran.dg/entry_16.f90
+++ b/gcc/testsuite/gfortran.dg/entry_16.f90
@@ -41,4 +41,3 @@ END MODULE complex
if (.not.((a + b) .eq. (b + a))) call abort ()
if (.not.((a + b) .eq. cx (4, 2))) call abort ()
end
-! { dg-final { cleanup-modules "complex" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_18.f90 b/gcc/testsuite/gfortran.dg/entry_18.f90
index 0cfe842137..b9cc41740a 100644
--- a/gcc/testsuite/gfortran.dg/entry_18.f90
+++ b/gcc/testsuite/gfortran.dg/entry_18.f90
@@ -33,4 +33,3 @@ entry glocalb( x, y )
y = x
end subroutine
end module
-! { dg-final { cleanup-modules "gsub" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_3.f90 b/gcc/testsuite/gfortran.dg/entry_3.f90
index b4473df31b..36595ee31e 100644
--- a/gcc/testsuite/gfortran.dg/entry_3.f90
+++ b/gcc/testsuite/gfortran.dg/entry_3.f90
@@ -23,5 +23,3 @@ program entry_4_prog
call bar(a)
if (any (a .ne. (/3, 4/))) call abort
end program
-
-! { dg-final { cleanup-modules "entry_4" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_6.f90 b/gcc/testsuite/gfortran.dg/entry_6.f90
index 103392606b..c1d6c7cbb2 100644
--- a/gcc/testsuite/gfortran.dg/entry_6.f90
+++ b/gcc/testsuite/gfortran.dg/entry_6.f90
@@ -52,5 +52,3 @@ end module foo
if (z1((3,4)) .ne. (-5, 10)) call abort ()
if (z2((5,6)) .ne. (-9, 38)) call abort ()
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_7.f90 b/gcc/testsuite/gfortran.dg/entry_7.f90
index 6dd87f437f..0ffcf34ebe 100644
--- a/gcc/testsuite/gfortran.dg/entry_7.f90
+++ b/gcc/testsuite/gfortran.dg/entry_7.f90
@@ -22,6 +22,3 @@ CONTAINS
bar = "abcd"
end function
END MODULE TT
-
-
-! { dg-final { cleanup-modules "tt" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_9.f90 b/gcc/testsuite/gfortran.dg/entry_9.f90
index 5dcb6e3b17..ecffcd83a6 100644
--- a/gcc/testsuite/gfortran.dg/entry_9.f90
+++ b/gcc/testsuite/gfortran.dg/entry_9.f90
@@ -27,5 +27,3 @@ program main
if (F2(4) /= -4) call abort()
if (F1(1) /= -1) call abort()
end program main
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/entry_dummy_ref_2.f90 b/gcc/testsuite/gfortran.dg/entry_dummy_ref_2.f90
index 20f1c10654..1634e25d4b 100644
--- a/gcc/testsuite/gfortran.dg/entry_dummy_ref_2.f90
+++ b/gcc/testsuite/gfortran.dg/entry_dummy_ref_2.f90
@@ -16,5 +16,3 @@ FUNCTION F1(I) RESULT(RF1)
END FUNCTION F1
END MODULE M1
END
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/enum_10.f90 b/gcc/testsuite/gfortran.dg/enum_10.f90
index 188976637d..80e7fca801 100644
--- a/gcc/testsuite/gfortran.dg/enum_10.f90
+++ b/gcc/testsuite/gfortran.dg/enum_10.f90
@@ -1,7 +1,7 @@
! { dg-do run }
! { dg-additional-sources enum_10.c }
! { dg-options "-fshort-enums -w" }
-! { dg-options "-fshort-enums -w -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi* } }
+! { dg-options "-fshort-enums -w -Wl,--no-enum-size-warning" { target arm*-*-linux* } }
! Make sure short enums are indeed interoperable with the
! corresponding C type.
@@ -60,5 +60,3 @@ call f4 (one4, 1)
call f4 (two4, 2)
call f4 (max4, huge(1_4)+0)
end
-
-! { dg-final { cleanup-modules "enum_10" } }
diff --git a/gcc/testsuite/gfortran.dg/enum_9.f90 b/gcc/testsuite/gfortran.dg/enum_9.f90
index fec5d92c6b..d3187c75b9 100644
--- a/gcc/testsuite/gfortran.dg/enum_9.f90
+++ b/gcc/testsuite/gfortran.dg/enum_9.f90
@@ -1,6 +1,6 @@
! { dg-do run }
! { dg-options "-fshort-enums" }
-! { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux*eabi* } }
+! { dg-options "-fshort-enums -Wl,--no-enum-size-warning" { target arm*-*-linux* } }
! Program to test enumerations when option -fshort-enums is given
program main
diff --git a/gcc/testsuite/gfortran.dg/eof_4.f90 b/gcc/testsuite/gfortran.dg/eof_4.f90
new file mode 100644
index 0000000000..293c0fa39f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/eof_4.f90
@@ -0,0 +1,130 @@
+! { dg-do run }
+! PR55818 Reading a REAL from a file which doesn't end in a new line fails
+! Test case from PR reporter.
+implicit none
+integer :: stat
+!integer :: var ! << works
+real :: var ! << fails
+character(len=10) :: cvar ! << fails
+complex :: cval
+logical :: lvar
+
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "1", new_line("")
+write(99) "2", new_line("")
+write(99) "3"
+close(99)
+
+! Test character kind
+open(99, file="test.dat")
+read (99,*, iostat=stat) cvar
+if (stat /= 0 .or. cvar /= "1") call abort()
+read (99,*, iostat=stat) cvar
+if (stat /= 0 .or. cvar /= "2") call abort()
+read (99,*, iostat=stat) cvar ! << FAILS: stat /= 0
+if (stat /= 0 .or. cvar /= "3") call abort() ! << aborts here
+
+! Test real kind
+rewind(99)
+read (99,*, iostat=stat) var
+if (stat /= 0 .or. var /= 1.0) call abort()
+read (99,*, iostat=stat) var
+if (stat /= 0 .or. var /= 2.0) call abort()
+read (99,*, iostat=stat) var ! << FAILS: stat /= 0
+if (stat /= 0 .or. var /= 3.0) call abort()
+close(99, status="delete")
+
+! Test real kind with exponents
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "1.0e3", new_line("")
+write(99) "2.0e-03", new_line("")
+write(99) "3.0e2"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*) var ! << FAILS: stat /= 0
+if (stat /= 0) call abort()
+close(99, status="delete")
+
+! Test logical kind
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "Tru", new_line("")
+write(99) "fal", new_line("")
+write(99) "t"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) lvar
+if (stat /= 0 .or. (.not.lvar)) call abort()
+read (99,*, iostat=stat) lvar
+if (stat /= 0 .or. lvar) call abort()
+read (99,*) lvar ! << FAILS: stat /= 0
+if (stat /= 0 .or. (.not.lvar)) call abort()
+close(99, status="delete")
+
+! Test combinations of Inf and Nan
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "infinity", new_line("")
+write(99) "nan", new_line("")
+write(99) "infinity"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*) var ! << FAILS: stat /= 0
+if (stat /= 0) call abort ! << aborts here
+close(99, status="delete")
+
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "infinity", new_line("")
+write(99) "inf", new_line("")
+write(99) "nan"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*) var ! << FAILS: stat /= 0
+if (stat /= 0) call abort ! << aborts here
+close(99, status="delete")
+
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "infinity", new_line("")
+write(99) "nan", new_line("")
+write(99) "inf"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*, iostat=stat) var
+if (stat /= 0) call abort()
+read (99,*) var ! << FAILS: stat /= 0
+if (stat /= 0) call abort ! << aborts here
+close(99, status="delete")
+
+! Test complex kind
+open(99, file="test.dat", access="stream", form="unformatted", status="new")
+write(99) "(1,2)", new_line("")
+write(99) "(2,3)", new_line("")
+write(99) "(4,5)"
+close(99)
+
+open(99, file="test.dat")
+read (99,*, iostat=stat) cval
+if (stat /= 0 .or. cval /= cmplx(1,2)) call abort()
+read (99,*, iostat=stat) cval
+if (stat /= 0 .or. cval /= cmplx(2,3)) call abort()
+read (99,*, iostat=stat) cval ! << FAILS: stat /= 0, value is okay
+if (stat /= 0 .or. cval /= cmplx(4,5)) call abort()
+close(99, status="delete")
+end
diff --git a/gcc/testsuite/gfortran.dg/eof_5.f90 b/gcc/testsuite/gfortran.dg/eof_5.f90
new file mode 100644
index 0000000000..88671ba237
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/eof_5.f90
@@ -0,0 +1,21 @@
+! { dg-do run }
+!
+! PR fortran/56696
+!
+! Contributed by Keith Refson
+!
+
+program iotest
+ character(len=258) :: inp = ' 1.0 1.0 1.0'
+ character(len=7) :: inp2 = '1 2 3 4'
+ integer :: ios
+ real :: a1, a2, a3, a4
+
+ read(inp2,*,iostat=ios) a1, a2, a3, a4
+ if (ios /= 0) call abort ()
+
+ read(inp,*,iostat=ios) a1, a2, a3, a4
+ if (ios == 0) call abort ()
+! write(*,*) 'IOSTAT=',ios
+end program iotest
+
diff --git a/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90 b/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90
index c39d1448aa..99e9248b39 100644
--- a/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90
+++ b/gcc/testsuite/gfortran.dg/equiv_constraint_3.f90
@@ -9,5 +9,3 @@ USE TEST, ONLY : K=>I
INTEGER :: L
EQUIVALENCE(K,L) ! { dg-error "conflicts with USE ASSOCIATED attribute" }
END
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90 b/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90
index 080cdef548..872e05b90f 100644
--- a/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90
+++ b/gcc/testsuite/gfortran.dg/equiv_constraint_7.f90
@@ -9,4 +9,3 @@
EQUIVALENCE(I,J)
END MODULE DATA
END
-! { dg-final { cleanup-modules "data" } }
diff --git a/gcc/testsuite/gfortran.dg/erf_3.F90 b/gcc/testsuite/gfortran.dg/erf_3.F90
new file mode 100644
index 0000000000..32c1ba6e54
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/erf_3.F90
@@ -0,0 +1,54 @@
+! { dg-do run { xfail spu-*-* ia64-*-linux* } }
+! { dg-options "-fno-range-check -ffree-line-length-none -O0" }
+! { dg-add-options ieee }
+! { dg-skip-if "PR libfortran/59313" { sparc*-*-solaris2.9* hppa*-*-hpux* } }
+!
+! Check that simplification functions and runtime library agree on ERF,
+! ERFC and ERFC_SCALED, for quadruple-precision.
+!
+! XFAILed for SPU targets because our library implementation of
+! the double-precision erf/erfc functions is not accurate enough.
+!
+! XFAILed for IA64 Linux because of a glibc bug:
+! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59227
+
+program test
+ use, intrinsic :: iso_fortran_env
+ implicit none
+
+ ! QP will be the largest supported real kind, possibly real(kind=16)
+ integer, parameter :: qp = real_kinds(ubound(real_kinds,dim=1))
+ real(kind=qp) :: x
+
+#define CHECK(a) \
+ x = a ; \
+ call check(erf(real(a,kind=qp)), erf(x)) ; \
+ call check(erfc(real(a,kind=qp)), erfc(x)) ; \
+ call check(erfc_scaled(real(a,kind=qp)), erfc_scaled(x))
+
+ CHECK(0.0)
+ CHECK(0.9)
+ CHECK(1.9)
+ CHECK(10.)
+ CHECK(11.)
+ CHECK(12.)
+ CHECK(13.)
+ CHECK(14.)
+ CHECK(49.)
+ CHECK(190.)
+
+ CHECK(-0.0)
+ CHECK(-0.9)
+ CHECK(-1.9)
+ CHECK(-19.)
+ CHECK(-190.)
+
+contains
+
+ subroutine check (a, b)
+ real(kind=qp), intent(in) :: a, b
+ print *, abs(a-b) / spacing(a)
+ if (abs(a - b) > 10 * spacing(a)) call abort
+ end subroutine
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/error_recovery_3.f90 b/gcc/testsuite/gfortran.dg/error_recovery_3.f90
index 35804be894..52699037e5 100644
--- a/gcc/testsuite/gfortran.dg/error_recovery_3.f90
+++ b/gcc/testsuite/gfortran.dg/error_recovery_3.f90
@@ -7,5 +7,3 @@ MODULE M1
END MODULE M1
USE M1, ONLY: I,&! { dg-error "Missing" }
-! { dg-final { cleanup-modules "m1" } }
-
diff --git a/gcc/testsuite/gfortran.dg/extends_1.f03 b/gcc/testsuite/gfortran.dg/extends_1.f03
index 57a50732c5..bb01728a5e 100644
--- a/gcc/testsuite/gfortran.dg/extends_1.f03
+++ b/gcc/testsuite/gfortran.dg/extends_1.f03
@@ -69,5 +69,3 @@ contains
new_person%supervisor => supervisor
end function
end
-
-! { dg-final { cleanup-modules "persons person_education" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_10.f03 b/gcc/testsuite/gfortran.dg/extends_10.f03
index fbcaa7efc3..40e928e3e5 100644
--- a/gcc/testsuite/gfortran.dg/extends_10.f03
+++ b/gcc/testsuite/gfortran.dg/extends_10.f03
@@ -30,5 +30,3 @@ program pr
print *,a%t1%i
print *,b%u1%j ! { dg-error "is a PRIVATE component of" }
end program
-
-! { dg-final { cleanup-modules "mo" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_12.f03 b/gcc/testsuite/gfortran.dg/extends_12.f03
index a93f6d0f12..972ab3a743 100644
--- a/gcc/testsuite/gfortran.dg/extends_12.f03
+++ b/gcc/testsuite/gfortran.dg/extends_12.f03
@@ -20,5 +20,3 @@ program diff_01
implicit none
call create_ext()
end program
-
-! { dg-final { cleanup-modules "mod_diff_01" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_13.f03 b/gcc/testsuite/gfortran.dg/extends_13.f03
index 5d986877df..9181004997 100644
--- a/gcc/testsuite/gfortran.dg/extends_13.f03
+++ b/gcc/testsuite/gfortran.dg/extends_13.f03
@@ -26,5 +26,3 @@ end module
use type_definitions
use elliptical_elements
end
-
-! { dg-final { cleanup-modules "type_definitions elliptical_elements" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_14.f03 b/gcc/testsuite/gfortran.dg/extends_14.f03
index 876e8c703c..15e38ff908 100644
--- a/gcc/testsuite/gfortran.dg/extends_14.f03
+++ b/gcc/testsuite/gfortran.dg/extends_14.f03
@@ -16,12 +16,13 @@ program evolve_aflow
type, extends(state_t) :: astate_t
end type
+ block ! New scoping unit as "a"/"b" are otherwise implicitly SAVEd
type(astate_t) :: a,b
allocate(a%U(1000))
a = b
-
+ end block
end program
! { dg-final { scan-tree-dump-times "__builtin_free" 3 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_15.f90 b/gcc/testsuite/gfortran.dg/extends_15.f90
new file mode 100644
index 0000000000..06c31799a0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/extends_15.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR 58355: [4.7/4.8/4.9 Regression] [F03] ICE with TYPE, EXTENDS before parent TYPE defined
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module ct
+ public :: t1
+
+ type, extends(t1) :: t2 ! { dg-error "has not been previously defined" }
+
+ type :: t1
+ end type
+end
+
+! { dg-final { cleanup-modules "ct" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_2.f03 b/gcc/testsuite/gfortran.dg/extends_2.f03
index aabbf662a4..ca92378a72 100644
--- a/gcc/testsuite/gfortran.dg/extends_2.f03
+++ b/gcc/testsuite/gfortran.dg/extends_2.f03
@@ -62,5 +62,3 @@ contains
supervisor)
end function
end
-
-! { dg-final { cleanup-modules "persons person_education" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_3.f03 b/gcc/testsuite/gfortran.dg/extends_3.f03
index 27ae670d95..eabac67b68 100644
--- a/gcc/testsuite/gfortran.dg/extends_3.f03
+++ b/gcc/testsuite/gfortran.dg/extends_3.f03
@@ -67,5 +67,3 @@ contains
SUPERVISOR = supervisor)
end function
end
-
-! { dg-final { cleanup-modules "persons person_education" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_4.f03 b/gcc/testsuite/gfortran.dg/extends_4.f03
index 831c9ebb6e..a0c91fd198 100644
--- a/gcc/testsuite/gfortran.dg/extends_4.f03
+++ b/gcc/testsuite/gfortran.dg/extends_4.f03
@@ -48,5 +48,3 @@ end module mymod
q = d (b = set_b (), id = 99)
call check_b (q%b)
end
-
-! { dg-final { cleanup-modules "mymod" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_5.f03 b/gcc/testsuite/gfortran.dg/extends_5.f03
index 5146d45635..d2b011764b 100644
--- a/gcc/testsuite/gfortran.dg/extends_5.f03
+++ b/gcc/testsuite/gfortran.dg/extends_5.f03
@@ -23,5 +23,3 @@ end module m
type, extends(dt) :: dt_type ! { dg-error "because it is BIND" }
end type ! { dg-error "Expecting END PROGRAM" }
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_6.f03 b/gcc/testsuite/gfortran.dg/extends_6.f03
index a50a9b751b..fd2b9e7029 100644
--- a/gcc/testsuite/gfortran.dg/extends_6.f03
+++ b/gcc/testsuite/gfortran.dg/extends_6.f03
@@ -45,5 +45,3 @@ contains
foo_dt%dt%day = 1 ! { dg-error "not a member" }
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_7.f03 b/gcc/testsuite/gfortran.dg/extends_7.f03
index ebb2fcc3ef..35f74d001b 100644
--- a/gcc/testsuite/gfortran.dg/extends_7.f03
+++ b/gcc/testsuite/gfortran.dg/extends_7.f03
@@ -21,5 +21,3 @@ MODULE m2
END TYPE subt
END MODULE m2
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_8.f03 b/gcc/testsuite/gfortran.dg/extends_8.f03
index 4af5ab9327..0773f329a0 100644
--- a/gcc/testsuite/gfortran.dg/extends_8.f03
+++ b/gcc/testsuite/gfortran.dg/extends_8.f03
@@ -14,4 +14,3 @@ end module
use m, only: A
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/extends_9.f03 b/gcc/testsuite/gfortran.dg/extends_9.f03
index f59b97396b..a8d2d1b66a 100644
--- a/gcc/testsuite/gfortran.dg/extends_9.f03
+++ b/gcc/testsuite/gfortran.dg/extends_9.f03
@@ -33,4 +33,3 @@ END MODULE
END
-! { dg-final { cleanup-modules "run_example_fortran03" } }
diff --git a/gcc/testsuite/gfortran.dg/external_procedures_2.f90 b/gcc/testsuite/gfortran.dg/external_procedures_2.f90
index 3f13dac3da..6566e653e4 100644
--- a/gcc/testsuite/gfortran.dg/external_procedures_2.f90
+++ b/gcc/testsuite/gfortran.dg/external_procedures_2.f90
@@ -38,4 +38,3 @@ program gfcbug53
call foo (x0)
print *, x0
end program gfcbug53
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_1.f08 b/gcc/testsuite/gfortran.dg/finalize_1.f08
index e1501ef66b..391a0f13ef 100644
--- a/gcc/testsuite/gfortran.dg/finalize_1.f08
+++ b/gcc/testsuite/gfortran.dg/finalize_1.f08
@@ -27,5 +27,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing here
END PROGRAM finalizer
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_10.f90 b/gcc/testsuite/gfortran.dg/finalize_10.f90
new file mode 100644
index 0000000000..e042f11146
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_10.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/37336
+!
+! Finalize nonallocatable INTENT(OUT)
+!
+module m
+ type t
+ end type t
+ type t2
+ contains
+ final :: fini
+ end type t2
+contains
+ elemental subroutine fini(var)
+ type(t2), intent(inout) :: var
+ end subroutine fini
+end module m
+
+subroutine foo(x,y,aa,bb)
+ use m
+ class(t), intent(out) :: x(:),y
+ type(t2), intent(out) :: aa(:),bb
+end subroutine foo
+
+! Finalize CLASS + set default init
+! { dg-final { scan-tree-dump-times "y->_vptr->_final \\(&desc.\[0-9\]+, y->_vptr->_size, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump "__builtin_memcpy \\(\\(void .\\) y->_data, \\(void .\\) y->_vptr->_def_init, \\((unsigned long|unsigned int|character\\(kind=4\\))\\) y->_vptr->_size\\);" "original" } }
+! { dg-final { scan-tree-dump-times "x->_vptr->_final \\(&x->_data, x->_vptr->_size, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "x->_vptr->_copy \\(x->_vptr->_def_init, &x->_data\\);" 1 "original" } }
+
+! FINALIZE TYPE:
+! { dg-final { scan-tree-dump-times "parm.\[0-9\]+.data = \\(void \\*\\) &\\(\\*aa.\[0-9\]+\\)\\\[0\\\];" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__final_m_T2 \\(&parm.\[0-9\]+, 0, 0\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "desc.\[0-9\]+.data = \\(void \\* restrict\\) bb;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__final_m_T2 \\(&desc.\[0-9\]+, 0, 0\\);" 1 "original" } }
+
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_11.f90 b/gcc/testsuite/gfortran.dg/finalize_11.f90
new file mode 100644
index 0000000000..e9bb814778
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_11.f90
@@ -0,0 +1,31 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! Copied from finalize_6.f90 - was before rejected as the finalization
+! wrapper uses TS29913 (-std=f2008ts) features.
+!
+
+MODULE final_type
+ IMPLICIT NONE
+
+ TYPE :: mytype
+ INTEGER :: fooarr(42)
+ REAL :: foobar
+ CONTAINS
+ FINAL :: finalize_single
+ END TYPE mytype
+
+CONTAINS
+
+ SUBROUTINE finalize_single (el)
+ IMPLICIT NONE
+ TYPE(mytype) :: el
+ ! Do nothing in this test
+ END SUBROUTINE finalize_single
+
+END MODULE final_type
+
+PROGRAM finalizer
+ IMPLICIT NONE
+ ! Do nothing
+END PROGRAM finalizer
diff --git a/gcc/testsuite/gfortran.dg/finalize_12.f90 b/gcc/testsuite/gfortran.dg/finalize_12.f90
new file mode 100644
index 0000000000..f1508ec813
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_12.f90
@@ -0,0 +1,175 @@
+! { dg-do run }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/37336
+!
+module m
+ implicit none
+ type t
+ integer :: i
+ contains
+ final :: fini, fini2
+ end type t
+ integer :: global_count1, global_count2
+contains
+ subroutine fini(x)
+ type(t) :: x
+ !print *, 'fini:',x%i
+ if (global_count1 == -1) call abort ()
+ if (x%i /= 42) call abort()
+ x%i = 33
+ global_count1 = global_count1 + 1
+ end subroutine fini
+ subroutine fini2(x)
+ type(t) :: x(:)
+ !print *, 'fini2', x%i
+ if (global_count2 == -1) call abort ()
+ if (size(x) /= 5) call abort()
+ if (any (x%i /= [1,2,3,4,5]) .and. any (x%i /= [6,7,8,9,10])) call abort()
+ x%i = 33
+ global_count2 = global_count2 + 10
+ end subroutine fini2
+end module m
+
+program pp
+ use m
+ implicit none
+ type(t), allocatable :: ya
+ class(t), allocatable :: yc
+ type(t), allocatable :: yaa(:)
+ class(t), allocatable :: yca(:)
+
+ type(t), allocatable :: ca[:]
+ class(t), allocatable :: cc[:]
+ type(t), allocatable :: caa(:)[:]
+ class(t), allocatable :: cca(:)[:]
+
+ global_count1 = -1
+ global_count2 = -1
+ allocate (ya, yc, yaa(5), yca(5))
+ global_count1 = 0
+ global_count2 = 0
+ ya%i = 42
+ yc%i = 42
+ yaa%i = [1,2,3,4,5]
+ yca%i = [1,2,3,4,5]
+
+ call foo(ya, yc, yaa, yca)
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+
+ ! Coarray finalization
+ allocate (ca[*], cc[*], caa(5)[*], cca(5)[*])
+ global_count1 = 0
+ global_count2 = 0
+ ca%i = 42
+ cc%i = 42
+ caa%i = [1,2,3,4,5]
+ cca%i = [1,2,3,4,5]
+ deallocate (ca, cc, caa, cca)
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+ global_count1 = -1
+ global_count2 = -1
+
+ block
+ type(t), allocatable :: za
+ class(t), allocatable :: zc
+ type(t), allocatable :: zaa(:)
+ class(t), allocatable :: zca(:)
+
+ ! Test intent(out) finalization
+ allocate (za, zc, zaa(5), zca(5))
+ global_count1 = 0
+ global_count2 = 0
+ za%i = 42
+ zc%i = 42
+ zaa%i = [1,2,3,4,5]
+ zca%i = [1,2,3,4,5]
+
+ call foo(za, zc, zaa, zca)
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+
+ ! Test intent(out) finalization with optional
+ call foo_opt()
+ call opt()
+
+ ! Test intent(out) finalization with optional
+ allocate (za, zc, zaa(5), zca(5))
+ global_count1 = 0
+ global_count2 = 0
+ za%i = 42
+ zc%i = 42
+ zaa%i = [1,2,3,4,5]
+ zca%i = [1,2,3,4,5]
+
+ call foo_opt(za, zc, zaa, zca)
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+
+ ! Test DEALLOCATE finalization
+ allocate (za, zc, zaa(5), zca(5))
+ global_count1 = 0
+ global_count2 = 0
+ za%i = 42
+ zc%i = 42
+ zaa%i = [1,2,3,4,5]
+ zca%i = [6,7,8,9,10]
+ deallocate (za, zc, zaa, zca)
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+
+ ! Test end-of-scope finalization
+ allocate (za, zc, zaa(5), zca(5))
+ global_count1 = 0
+ global_count2 = 0
+ za%i = 42
+ zc%i = 42
+ zaa%i = [1,2,3,4,5]
+ zca%i = [6,7,8,9,10]
+ end block
+
+ if (global_count1 /= 2) call abort ()
+ if (global_count2 /= 20) call abort ()
+
+ ! Test that no end-of-scope finalization occurs
+ ! for SAVED variable in main
+ allocate (ya, yc, yaa(5), yca(5))
+ global_count1 = -1
+ global_count2 = -1
+
+contains
+
+ subroutine opt(xa, xc, xaa, xca)
+ type(t), allocatable, optional :: xa
+ class(t), allocatable, optional :: xc
+ type(t), allocatable, optional :: xaa(:)
+ class(t), allocatable, optional :: xca(:)
+ call foo_opt(xc, xc, xaa)
+ !call foo_opt(xa, xc, xaa, xca) ! FIXME: Fails (ICE) due to PR 57445
+ end subroutine opt
+ subroutine foo_opt(xa, xc, xaa, xca)
+ type(t), allocatable, intent(out), optional :: xa
+ class(t), allocatable, intent(out), optional :: xc
+ type(t), allocatable, intent(out), optional :: xaa(:)
+ class(t), allocatable, intent(out), optional :: xca(:)
+
+ if (.not. present(xa)) &
+ return
+ if (allocated (xa)) call abort ()
+ if (allocated (xc)) call abort ()
+ if (allocated (xaa)) call abort ()
+ if (allocated (xca)) call abort ()
+ end subroutine foo_opt
+ subroutine foo(xa, xc, xaa, xca)
+ type(t), allocatable, intent(out) :: xa
+ class(t), allocatable, intent(out) :: xc
+ type(t), allocatable, intent(out) :: xaa(:)
+ class(t), allocatable, intent(out) :: xca(:)
+ if (allocated (xa)) call abort ()
+ if (allocated (xc)) call abort ()
+ if (allocated (xaa)) call abort ()
+ if (allocated (xca)) call abort ()
+ end subroutine foo
+end program
diff --git a/gcc/testsuite/gfortran.dg/finalize_13.f90 b/gcc/testsuite/gfortran.dg/finalize_13.f90
new file mode 100644
index 0000000000..78b20acd5d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_13.f90
@@ -0,0 +1,161 @@
+! { dg-do run }
+!
+! PR fortran/37336
+!
+module m
+ implicit none
+ type t
+ integer :: i
+ contains
+ final :: fini3, fini2, fini_elm
+ end type t
+
+ type, extends(t) :: t2
+ integer :: j
+ contains
+ final :: f2ini2, f2ini_elm
+ end type t2
+
+ logical :: elem_call
+ logical :: rank2_call
+ logical :: rank3_call
+ integer :: cnt, cnt2
+ integer :: fini_call
+
+contains
+ subroutine fini2 (x)
+ type(t), intent(in), contiguous :: x(:,:)
+ if (.not. rank2_call) call abort ()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ !print *, 'fini2:', x%i
+ if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
+ fini_call = fini_call + 1
+ end subroutine
+
+ subroutine fini3 (x)
+ type(t), intent(in) :: x(2,2,*)
+ integer :: i,j,k
+ if (.not. elem_call) call abort ()
+ if (.not. rank3_call) call abort ()
+ if (cnt2 /= 9) call abort()
+ if (cnt /= 1) call abort()
+ do i = 1, 2
+ do j = 1, 2
+ do k = 1, 2
+ !print *, k,j,i,x(k,j,i)%i
+ if (x(k,j,i)%i /= k+10*j+100*i) call abort()
+ end do
+ end do
+ end do
+ fini_call = fini_call + 1
+ end subroutine
+
+ impure elemental subroutine fini_elm (x)
+ type(t), intent(in) :: x
+ if (.not. elem_call) call abort ()
+ if (rank3_call) call abort ()
+ if (cnt2 /= 6) call abort()
+ if (cnt /= x%i) call abort()
+ !print *, 'fini_elm:', cnt, x%i
+ fini_call = fini_call + 1
+ cnt = cnt + 1
+ end subroutine
+
+ subroutine f2ini2 (x)
+ type(t2), intent(in), target :: x(:,:)
+ if (.not. rank2_call) call abort ()
+ if (size(x,1) /= 2 .or. size(x,2) /= 3) call abort()
+ !print *, 'f2ini2:', x%i
+ !print *, 'f2ini2:', x%j
+ if (any (x%i /= reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
+ if (any (x%j /= 100*reshape([11, 12, 21, 22, 31, 32], [2,3]))) call abort()
+ fini_call = fini_call + 1
+ end subroutine
+
+ impure elemental subroutine f2ini_elm (x)
+ type(t2), intent(in) :: x
+ integer, parameter :: exprected(*) &
+ = [111, 112, 121, 122, 211, 212, 221, 222]
+
+ if (.not. elem_call) call abort ()
+ !print *, 'f2ini_elm:', cnt2, x%i, x%j
+ if (rank3_call) then
+ if (x%i /= exprected(cnt2)) call abort ()
+ if (x%j /= 1000*exprected(cnt2)) call abort ()
+ else
+ if (cnt2 /= x%i .or. cnt2*10 /= x%j) call abort()
+ end if
+ cnt2 = cnt2 + 1
+ fini_call = fini_call + 1
+ end subroutine
+end module m
+
+
+program test
+ use m
+ implicit none
+ class(t), save, allocatable :: y(:), z(:,:), zz(:,:,:)
+ target :: z, zz
+ integer :: i,j,k
+
+ elem_call = .false.
+ rank2_call = .false.
+ rank3_call = .false.
+ allocate (t2 :: y(5))
+ select type (y)
+ type is (t2)
+ do i = 1, 5
+ y(i)%i = i
+ y(i)%j = i*10
+ end do
+ end select
+ cnt = 1
+ cnt2 = 1
+ fini_call = 0
+ elem_call = .true.
+ deallocate (y)
+ if (fini_call /= 10) call abort ()
+
+ elem_call = .false.
+ rank2_call = .false.
+ rank3_call = .false.
+ allocate (t2 :: z(2,3))
+ select type (z)
+ type is (t2)
+ do i = 1, 3
+ do j = 1, 2
+ z(j,i)%i = j+10*i
+ z(j,i)%j = (j+10*i)*100
+ end do
+ end do
+ end select
+ cnt = 1
+ cnt2 = 1
+ fini_call = 0
+ rank2_call = .true.
+ deallocate (z)
+ if (fini_call /= 2) call abort ()
+
+ elem_call = .false.
+ rank2_call = .false.
+ rank3_call = .false.
+ allocate (t2 :: zz(2,2,2))
+ select type (zz)
+ type is (t2)
+ do i = 1, 2
+ do j = 1, 2
+ do k = 1, 2
+ zz(k,j,i)%i = k+10*j+100*i
+ zz(k,j,i)%j = (k+10*j+100*i)*1000
+ end do
+ end do
+ end do
+ end select
+ cnt = 1
+ cnt2 = 1
+ fini_call = 0
+ rank3_call = .true.
+ elem_call = .true.
+ deallocate (zz)
+ if (fini_call /= 2*2*2+1) call abort ()
+end program test
diff --git a/gcc/testsuite/gfortran.dg/finalize_14.f90 b/gcc/testsuite/gfortran.dg/finalize_14.f90
new file mode 100644
index 0000000000..edec8841ee
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_14.f90
@@ -0,0 +1,220 @@
+! { dg-do compile }
+!
+! PR fortran/37336
+!
+! Started to fail when finalization was added.
+!
+! Contributed by Ian Chivers in PR fortran/44465
+!
+module shape_module
+
+ type shape_type
+ integer :: x_=0
+ integer :: y_=0
+ contains
+ procedure , pass(this) :: getx
+ procedure , pass(this) :: gety
+ procedure , pass(this) :: setx
+ procedure , pass(this) :: sety
+ procedure , pass(this) :: moveto
+ procedure , pass(this) :: draw
+ end type shape_type
+
+interface assignment(=)
+ module procedure generic_shape_assign
+end interface
+
+contains
+
+ integer function getx(this)
+ implicit none
+ class (shape_type) , intent(in) :: this
+ getx=this%x_
+ end function getx
+
+ integer function gety(this)
+ implicit none
+ class (shape_type) , intent(in) :: this
+ gety=this%y_
+ end function gety
+
+ subroutine setx(this,x)
+ implicit none
+ class (shape_type), intent(inout) :: this
+ integer , intent(in) :: x
+ this%x_=x
+ end subroutine setx
+
+ subroutine sety(this,y)
+ implicit none
+ class (shape_type), intent(inout) :: this
+ integer , intent(in) :: y
+ this%y_=y
+ end subroutine sety
+
+ subroutine moveto(this,newx,newy)
+ implicit none
+ class (shape_type), intent(inout) :: this
+ integer , intent(in) :: newx
+ integer , intent(in) :: newy
+ this%x_=newx
+ this%y_=newy
+ end subroutine moveto
+
+ subroutine draw(this)
+ implicit none
+ class (shape_type), intent(in) :: this
+ print *,' x = ' , this%x_
+ print *,' y = ' , this%y_
+ end subroutine draw
+
+ subroutine generic_shape_assign(lhs,rhs)
+ implicit none
+ class (shape_type) , intent(out) , allocatable :: lhs
+ class (shape_type) , intent(in) :: rhs
+ print *,' In generic_shape_assign'
+ if ( allocated(lhs) ) then
+ deallocate(lhs)
+ end if
+ allocate(lhs,source=rhs)
+ end subroutine generic_shape_assign
+
+end module shape_module
+
+! Circle_p.f90
+
+module circle_module
+
+use shape_module
+
+type , extends(shape_type) :: circle_type
+
+ integer :: radius_
+
+ contains
+
+ procedure , pass(this) :: getradius
+ procedure , pass(this) :: setradius
+ procedure , pass(this) :: draw => draw_circle
+
+end type circle_type
+
+ contains
+
+ integer function getradius(this)
+ implicit none
+ class (circle_type) , intent(in) :: this
+ getradius=this%radius_
+ end function getradius
+
+ subroutine setradius(this,radius)
+ implicit none
+ class (circle_type) , intent(inout) :: this
+ integer , intent(in) :: radius
+ this%radius_=radius
+ end subroutine setradius
+
+ subroutine draw_circle(this)
+ implicit none
+ class (circle_type), intent(in) :: this
+ print *,' x = ' , this%x_
+ print *,' y = ' , this%y_
+ print *,' radius = ' , this%radius_
+ end subroutine draw_circle
+
+end module circle_module
+
+
+! Rectangle_p.f90
+
+module rectangle_module
+
+use shape_module
+
+type , extends(shape_type) :: rectangle_type
+
+ integer :: width_
+ integer :: height_
+
+ contains
+
+ procedure , pass(this) :: getwidth
+ procedure , pass(this) :: setwidth
+ procedure , pass(this) :: getheight
+ procedure , pass(this) :: setheight
+ procedure , pass(this) :: draw => draw_rectangle
+
+end type rectangle_type
+
+ contains
+
+ integer function getwidth(this)
+ implicit none
+ class (rectangle_type) , intent(in) :: this
+ getwidth=this%width_
+ end function getwidth
+
+ subroutine setwidth(this,width)
+ implicit none
+ class (rectangle_type) , intent(inout) :: this
+ integer , intent(in) :: width
+ this%width_=width
+ end subroutine setwidth
+
+ integer function getheight(this)
+ implicit none
+ class (rectangle_type) , intent(in) :: this
+ getheight=this%height_
+ end function getheight
+
+ subroutine setheight(this,height)
+ implicit none
+ class (rectangle_type) , intent(inout) :: this
+ integer , intent(in) :: height
+ this%height_=height
+ end subroutine setheight
+
+ subroutine draw_rectangle(this)
+ implicit none
+ class (rectangle_type), intent(in) :: this
+ print *,' x = ' , this%x_
+ print *,' y = ' , this%y_
+ print *,' width = ' , this%width_
+ print *,' height = ' , this%height_
+
+ end subroutine draw_rectangle
+
+end module rectangle_module
+
+
+
+program polymorphic
+
+use shape_module
+use circle_module
+use rectangle_module
+
+implicit none
+
+type shape_w
+ class (shape_type) , allocatable :: shape_v
+end type shape_w
+
+type (shape_w) , dimension(3) :: p
+
+ print *,' shape '
+
+ p(1)%shape_v=shape_type(10,20)
+ call p(1)%shape_v%draw()
+
+ print *,' circle '
+
+ p(2)%shape_v=circle_type(100,200,300)
+ call p(2)%shape_v%draw()
+
+ print *,' rectangle '
+
+ p(3)%shape_v=rectangle_type(1000,2000,3000,4000)
+ call p(3)%shape_v%draw()
+
+end program polymorphic
diff --git a/gcc/testsuite/gfortran.dg/finalize_15.f90 b/gcc/testsuite/gfortran.dg/finalize_15.f90
new file mode 100644
index 0000000000..3c18b2ae10
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_15.f90
@@ -0,0 +1,238 @@
+! { dg-do run }
+!
+! PR fortran/37336
+!
+! Check the scalarizer/array packing with strides
+! in the finalization wrapper
+!
+module m
+ implicit none
+
+ type t1
+ integer :: i
+ contains
+ final :: fini_elem
+ end type t1
+
+ type, extends(t1) :: t1e
+ integer :: j
+ contains
+ final :: fini_elem2
+ end type t1e
+
+ type t2
+ integer :: i
+ contains
+ final :: fini_shape
+ end type t2
+
+ type, extends(t2) :: t2e
+ integer :: j
+ contains
+ final :: fini_shape2
+ end type t2e
+
+ type t3
+ integer :: i
+ contains
+ final :: fini_explicit
+ end type t3
+
+ type, extends(t3) :: t3e
+ integer :: j
+ contains
+ final :: fini_explicit2
+ end type t3e
+
+ integer :: cnt1, cnt1e, cnt2, cnt2e, cnt3, cnt3e
+
+contains
+
+ impure elemental subroutine fini_elem(x)
+ type(t1), intent(inout) :: x
+ integer :: i, j, i2, j2
+
+ if (cnt1e /= 5*4) call abort ()
+ j = mod (cnt1,5)+1
+ i = cnt1/5 + 1
+ i2 = (i-1)*3 + 1
+ j2 = (j-1)*2 + 1
+ if (x%i /= j2 + 100*i2) call abort ()
+ x%i = x%i * (-13)
+ cnt1 = cnt1 + 1
+ end subroutine fini_elem
+
+ impure elemental subroutine fini_elem2(x)
+ type(t1e), intent(inout) :: x
+ integer :: i, j, i2, j2
+
+ j = mod (cnt1e,5)+1
+ i = cnt1e/5 + 1
+ i2 = (i-1)*3 + 1
+ j2 = (j-1)*2 + 1
+ if (x%i /= j2 + 100*i2) call abort ()
+ if (x%j /= (j2 + 100*i2)*100) call abort ()
+ x%j = x%j * (-13)
+ cnt1e = cnt1e + 1
+ end subroutine fini_elem2
+
+ subroutine fini_shape(x)
+ type(t2) :: x(:,:)
+ if (cnt2e /= 1 .or. cnt2 /= 0) call abort ()
+ call check_var_sec(x%i, 1)
+ x%i = x%i * (-13)
+ cnt2 = cnt2 + 1
+ end subroutine fini_shape
+
+ subroutine fini_shape2(x)
+ type(t2e) :: x(:,:)
+ call check_var_sec(x%i, 1)
+ call check_var_sec(x%j, 100)
+ x%j = x%j * (-13)
+ cnt2e = cnt2e + 1
+ end subroutine fini_shape2
+
+ subroutine fini_explicit(x)
+ type(t3) :: x(5,4)
+ if (cnt3e /= 1 .or. cnt3 /= 0) call abort ()
+ call check_var_sec(x%i, 1)
+ x%i = x%i * (-13)
+ cnt3 = cnt3 + 1
+ end subroutine fini_explicit
+
+ subroutine fini_explicit2(x)
+ type(t3e) :: x(5,4)
+ call check_var_sec(x%i, 1)
+ call check_var_sec(x%j, 100)
+ x%j = x%j * (-13)
+ cnt3e = cnt3e + 1
+ end subroutine fini_explicit2
+
+ subroutine fin_test_1(x)
+ class(t1), intent(out) :: x(5,4)
+ end subroutine fin_test_1
+
+ subroutine fin_test_2(x)
+ class(t2), intent(out) :: x(:,:)
+ end subroutine fin_test_2
+
+ subroutine fin_test_3(x)
+ class(t3), intent(out) :: x(:,:)
+ if (any (shape(x) /= [5,4])) call abort ()
+ end subroutine fin_test_3
+
+ subroutine check_var_sec(x, factor)
+ integer :: x(:,:)
+ integer, value :: factor
+ integer :: i, j, i2, j2
+
+ do i = 1, 4
+ i2 = (i-1)*3 + 1
+ do j = 1, 5
+ j2 = (j-1)*2 + 1
+ if (x(j,i) /= (j2 + 100*i2)*factor) call abort ()
+ end do
+ end do
+ end subroutine check_var_sec
+end module m
+
+
+program test
+ use m
+ implicit none
+
+ class(t1), allocatable :: x(:,:)
+ class(t2), allocatable :: y(:,:)
+ class(t3), allocatable :: z(:,:)
+ integer :: i, j
+
+ cnt1 = 0; cnt1e = 0; cnt2 = 0; cnt2e = 0; cnt3 = 0; cnt3e = 0
+
+ allocate (t1e :: x(10,10))
+ allocate (t2e :: y(10,10))
+ allocate (t3e :: z(10,10))
+
+ select type(x)
+ type is (t1e)
+ do i = 1, 10
+ do j = 1, 10
+ x(j,i)%i = j + 100*i
+ x(j,i)%j = (j + 100*i)*100
+ end do
+ end do
+ end select
+
+ select type(y)
+ type is (t2e)
+ do i = 1, 10
+ do j = 1, 10
+ y(j,i)%i = j + 100*i
+ y(j,i)%j = (j + 100*i)*100
+ end do
+ end do
+ end select
+
+ select type(z)
+ type is (t3e)
+ do i = 1, 10
+ do j = 1, 10
+ z(j,i)%i = j + 100*i
+ z(j,i)%j = (j + 100*i)*100
+ end do
+ end do
+ end select
+
+ if (cnt1 + cnt1e + cnt2 + cnt2e + cnt3 + cnt3e /= 0) call abort()
+
+ call fin_test_1(x(::2,::3))
+ if (cnt1 /= 5*4) call abort ()
+ if (cnt1e /= 5*4) call abort ()
+ cnt1 = 0; cnt1e = 0
+ if (cnt2 + cnt2e + cnt3 + cnt3e /= 0) call abort()
+
+ call fin_test_2(y(::2,::3))
+ if (cnt2 /= 1) call abort ()
+ if (cnt2e /= 1) call abort ()
+ cnt2 = 0; cnt2e = 0
+ if (cnt1 + cnt1e + cnt3 + cnt3e /= 0) call abort()
+
+ call fin_test_3(z(::2,::3))
+ if (cnt3 /= 1) call abort ()
+ if (cnt3e /= 1) call abort ()
+ cnt3 = 0; cnt3e = 0
+ if (cnt1 + cnt1e + cnt2 + cnt2e /= 0) call abort()
+
+ select type(x)
+ type is (t1e)
+ call check_val(x%i, 1)
+ call check_val(x%j, 100)
+ end select
+
+ select type(y)
+ type is (t2e)
+ call check_val(y%i, 1)
+ call check_val(y%j, 100)
+ end select
+
+ select type(z)
+ type is (t3e)
+ call check_val(z%i, 1)
+ call check_val(z%j, 100)
+ end select
+
+contains
+ subroutine check_val(x, factor)
+ integer :: x(:,:)
+ integer, value :: factor
+ integer :: i, j
+ do i = 1, 10
+ do j = 1, 10
+ if (mod (j-1, 2) == 0 .and. mod (i-1, 3) == 0) then
+ if (x(j,i) /= (j + 100*i)*factor*(-13)) call abort ()
+ else
+ if (x(j,i) /= (j + 100*i)*factor) call abort ()
+ end if
+ end do
+ end do
+ end subroutine check_val
+end program test
diff --git a/gcc/testsuite/gfortran.dg/finalize_16.f90 b/gcc/testsuite/gfortran.dg/finalize_16.f90
new file mode 100644
index 0000000000..89c5cfb8d9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_16.f90
@@ -0,0 +1,32 @@
+! { dg-do compile }
+! { dg-options "-fcheck=all" }
+!
+! PR fortran/57542
+!
+! Contributed by Salvatore Filippone
+!
+module type_mod
+ type inner
+ end type inner
+
+ type outer
+ class(inner), allocatable :: item
+ end type outer
+
+ type container
+ class(outer), allocatable :: item
+ end type container
+
+ type maintype
+ type(container), allocatable :: v(:)
+ end type maintype
+
+end module type_mod
+
+subroutine testfinal(var)
+ use type_mod
+ type(maintype), intent(inout) :: var
+ ! A real code would obviously check
+ ! this is really allocated
+ deallocate(var%v(1)%item%item)
+end subroutine testfinal
diff --git a/gcc/testsuite/gfortran.dg/finalize_17.f90 b/gcc/testsuite/gfortran.dg/finalize_17.f90
new file mode 100644
index 0000000000..ce2306cce8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_17.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+!
+! PR fortran/37336
+!
+! Test for finalization of nonallocatable variables
+!
+module m
+ implicit none
+ type t
+ integer :: i
+ contains
+ final :: finit
+ end type t
+ integer, save :: called_final = -1
+contains
+ impure elemental subroutine finit(x)
+ type(t), intent(in) :: x
+ if (called_final == -1) call abort ()
+ called_final = called_final + 1
+ if (called_final /= x%i) call abort ()
+ end subroutine finit
+end module m
+
+ use m
+ implicit none
+ type(t) :: x2, y2(2)
+ block
+ type(t) :: xx, yy(2)
+ type(t), save :: x3, y3(2)
+ yy%i = [1, 2]
+ xx%i = 3
+ y3%i = [-4, -5]
+ x3%i = -6
+ called_final = 0
+ end block
+ if (called_final /= 3) call abort
+ called_final = -1
+ y2%i = [-7, -8]
+ x2%i = -9
+end
diff --git a/gcc/testsuite/gfortran.dg/finalize_18.f90 b/gcc/testsuite/gfortran.dg/finalize_18.f90
new file mode 100644
index 0000000000..f018ae2e19
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_18.f90
@@ -0,0 +1,47 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/37336
+!
+module m
+ type t
+ contains
+ final :: fini
+ end type t
+ type t2
+ integer :: ii
+ type(t), allocatable :: aa
+ type(t), allocatable :: bb(:)
+ class(t), allocatable :: cc
+ class(t), allocatable :: dd(:)
+ end type t2
+ integer, save :: cnt = -1
+contains
+ subroutine fini(x)
+ type(t) :: x
+ if (cnt == -1) call abort ()
+ cnt = cnt + 1
+ end subroutine fini
+end module m
+
+use m
+block
+ type(t2) :: y
+ y%ii = 123
+end block
+end
+
+! { dg-final { scan-tree-dump-times "if \\(y.aa != 0B\\)" 2 "original" } }
+! { dg-final { scan-tree-dump-times "if \\(y.cc._data != 0B\\)" 2 "original" } }
+! { dg-final { scan-tree-dump-times "if \\(\\(struct t\\\[0:\\\] . restrict\\) y.bb.data != 0B\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "if \\(\\(struct t\\\[0:\\\] . restrict\\) y.dd._data.data != 0B\\)" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "desc.\[0-9\]+.data = \\(void . restrict\\) y.aa;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "desc.\[0-9\]+.data = \\(void . restrict\\) y.cc._data;" 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "__final_m_T \\(&desc.\[0-9\]+, 0, 1\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__final_m_T \\(&y.bb, 0, 1\\);" 1 "original" } }
+! { dg-final { scan-tree-dump "y.cc._vptr->_final \\(&desc.\[0-9\]+, (\\(integer\\(kind=8\\)\\) )?y.cc._vptr->_size, 1\\);" "original" } }
+! { dg-final { scan-tree-dump "y.dd._vptr->_final \\(&y.dd._data, (\\(integer\\(kind=8\\)\\) )?y.dd._vptr->_size, 1\\);" "original" } }
+
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_19.f90 b/gcc/testsuite/gfortran.dg/finalize_19.f90
new file mode 100644
index 0000000000..1eeb6af658
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_19.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+!
+! PR fortran/58356
+!
+! Contributed by Andrew Benson
+!
+module ct
+ type :: cfl
+ contains
+ final :: cfld
+ end type cfl
+ type, extends(cfl) :: cfde
+ contains
+ end type cfde
+contains
+ subroutine cfld(self)
+ implicit none
+ type(cfl), intent(inout) :: self
+ return
+ end subroutine cfld
+end module ct
diff --git a/gcc/testsuite/gfortran.dg/finalize_2.f03 b/gcc/testsuite/gfortran.dg/finalize_2.f03
index b91bedff81..37b532efcb 100644
--- a/gcc/testsuite/gfortran.dg/finalize_2.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_2.f03
@@ -19,5 +19,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing here
END PROGRAM finalizer
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_21.f90 b/gcc/testsuite/gfortran.dg/finalize_21.f90
new file mode 100644
index 0000000000..6f6ede3e46
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_21.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/58436
+!
+! The following was ICEing and lacking _final=0
+!
+class(*), allocatable :: var
+end
+
+! { dg-final { scan-tree-dump "static struct __vtype__STAR __vtab__STAR = {._hash=0, ._size=., ._extends=0B, ._def_init=0B, ._copy=0B, ._final=0B};" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_22.f90 b/gcc/testsuite/gfortran.dg/finalize_22.f90
new file mode 100644
index 0000000000..57fa6e78de
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_22.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR 58470: [4.9 Regression] [OOP] ICE on invalid with FINAL procedure and type extension
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module cf
+ type :: cfml
+ contains
+ final :: mld
+ end type cfml
+ type, extends(cfml) :: cfmde
+ end type cfmde
+contains
+ subroutine mld(s) ! { dg-error "must be of type" }
+ class(cfml), intent(inout) :: s
+ end subroutine mld
+end module cf
+
+! { dg-final { cleanup-modules "cf" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_23.f90 b/gcc/testsuite/gfortran.dg/finalize_23.f90
new file mode 100644
index 0000000000..ea3972981d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_23.f90
@@ -0,0 +1,31 @@
+! { dg-do compile }
+!
+! PR 60234: [4.9 Regression] [OOP] ICE in generate_finalization_wrapper at fortran/class.c:1883
+!
+! Contribued by Antony Lewis <antony@cosmologist.info>
+
+module ObjectLists
+ implicit none
+
+ Type TObjectList
+ contains
+ FINAL :: finalize
+ end Type
+
+ Type, extends(TObjectList):: TRealCompareList
+ end Type
+
+contains
+
+ subroutine finalize(L)
+ Type(TObjectList) :: L
+ end subroutine
+
+
+ integer function CompareReal(this)
+ Class(TRealCompareList) :: this
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "ObjectLists" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_24.f90 b/gcc/testsuite/gfortran.dg/finalize_24.f90
new file mode 100644
index 0000000000..2a218584a8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_24.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR fortran/58880
+!
+! Contributed by Andrew Benson
+!
+
+module gn
+ type sl
+ integer, allocatable, dimension(:) :: lv
+ contains
+ final :: sld
+ end type sl
+ type :: nde
+ type(sl) :: r
+ end type nde
+contains
+ subroutine ndm(s)
+ type(nde), intent(inout) :: s
+ type(nde) :: i
+ i=s
+ end subroutine ndm
+ subroutine sld(s)
+ implicit none
+ type(sl), intent(inout) :: s
+ return
+ end subroutine sld
+end module gn
diff --git a/gcc/testsuite/gfortran.dg/finalize_25.f90 b/gcc/testsuite/gfortran.dg/finalize_25.f90
new file mode 100644
index 0000000000..cdbec4caca
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/finalize_25.f90
@@ -0,0 +1,55 @@
+! { dg-do run }
+!
+! PR fortran/58880
+! PR fortran/60495
+!
+! Contributed by Andrew Benson and Janus Weil
+!
+
+module gn
+ implicit none
+ type sl
+ integer, allocatable, dimension(:) :: lv
+ contains
+ final :: sld
+ end type
+ type :: nde
+ type(sl) :: r
+ end type nde
+
+ integer :: cnt = 0
+
+contains
+
+ subroutine sld(s)
+ type(sl) :: s
+ cnt = cnt + 1
+ ! print *,'Finalize sl'
+ end subroutine
+ subroutine ndm(s)
+ type(nde), intent(inout) :: s
+ type(nde) :: i
+ i=s
+ end subroutine ndm
+end module
+
+program main
+ use gn
+ type :: nde2
+ type(sl) :: r
+ end type nde2
+ type(nde) :: x
+
+ cnt = 0
+ call ndm(x)
+ if (cnt /= 2) call abort()
+
+ cnt = 0
+ call ndm2()
+ if (cnt /= 3) call abort()
+contains
+ subroutine ndm2
+ type(nde2) :: s,i
+ i=s
+ end subroutine ndm2
+end program main
diff --git a/gcc/testsuite/gfortran.dg/finalize_3.f03 b/gcc/testsuite/gfortran.dg/finalize_3.f03
index edc493bfca..0d7d34cdeb 100644
--- a/gcc/testsuite/gfortran.dg/finalize_3.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_3.f03
@@ -21,5 +21,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing here
END PROGRAM finalizer
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_4.f03 b/gcc/testsuite/gfortran.dg/finalize_4.f03
index 6e99256c25..b4c08f236d 100644
--- a/gcc/testsuite/gfortran.dg/finalize_4.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_4.f03
@@ -48,8 +48,3 @@ PROGRAM finalizer
DEALLOCATE(mat)
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_5.f03 b/gcc/testsuite/gfortran.dg/finalize_5.f03
index 1df2d8cf28..fb8153140b 100644
--- a/gcc/testsuite/gfortran.dg/finalize_5.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_5.f03
@@ -107,8 +107,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Nothing here, errors above
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_6.f90 b/gcc/testsuite/gfortran.dg/finalize_6.f90
index e790f4efb1..d155c7bd0a 100644
--- a/gcc/testsuite/gfortran.dg/finalize_6.f90
+++ b/gcc/testsuite/gfortran.dg/finalize_6.f90
@@ -10,9 +10,9 @@ MODULE final_type
TYPE :: mytype
INTEGER :: fooarr(42)
REAL :: foobar
- CONTAINS ! { dg-error "Fortran 2003" }
- FINAL :: finalize_single ! { dg-error "Fortran 2003" }
- END TYPE mytype
+ CONTAINS ! { dg-error "Fortran 2003: CONTAINS block in derived type definition" }
+ FINAL :: finalize_single ! { dg-error "Fortran 2003: FINAL procedure declaration|FINAL procedure 'finalize_single' at .1. is not a SUBROUTINE" }
+ END TYPE mytype ! { dg-error "Fortran 2008: Derived type definition at .1. with empty CONTAINS section" }
CONTAINS
@@ -28,8 +28,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_7.f03 b/gcc/testsuite/gfortran.dg/finalize_7.f03
index db6b4bea94..5807ed50e1 100644
--- a/gcc/testsuite/gfortran.dg/finalize_7.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_7.f03
@@ -52,8 +52,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Nothing here
END PROGRAM finalizer
-
-! TODO: Remove this once finalization is implemented.
-! { dg-excess-errors "not yet implemented" }
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/finalize_8.f03 b/gcc/testsuite/gfortran.dg/finalize_8.f03
index 6a4a135e0d..b2027a0ba6 100644
--- a/gcc/testsuite/gfortran.dg/finalize_8.f03
+++ b/gcc/testsuite/gfortran.dg/finalize_8.f03
@@ -33,5 +33,3 @@ PROGRAM finalizer
IMPLICIT NONE
! Do nothing here
END PROGRAM finalizer
-
-! { dg-final { cleanup-modules "final_type" } }
diff --git a/gcc/testsuite/gfortran.dg/fmt_en.f90 b/gcc/testsuite/gfortran.dg/fmt_en.f90
new file mode 100644
index 0000000000..4c5b721233
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/fmt_en.f90
@@ -0,0 +1,186 @@
+! { dg-do run }
+! PR60128 Invalid outputs with EN descriptors
+! Test case provided by Walt Brainerd.
+program pr60128
+use ISO_FORTRAN_ENV
+ implicit none
+ integer, parameter :: j(size(real_kinds)+4)=[REAL_KINDS, [4, 4, 4, 4]]
+ logical :: l_skip(4) = .false.
+ integer :: i
+ integer :: n_tst = 0, n_cnt = 0, n_skip = 0
+ character(len=20) :: s, s1
+
+ open (unit = 10, file = 'fmt_en.res')
+! Check that the default rounding mode is to nearest and to even on tie.
+ do i=1,size(real_kinds)
+ if (i == 1) then
+ write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(1)), &
+ real(9.49999905,kind=j(1)), &
+ real(9.5,kind=j(1)), real(8.5,kind=j(1))
+ write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(1)), &
+ real(98765.0,kind=j(1))
+ else if (i == 2) then
+ write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(2)), &
+ real(9.49999905,kind=j(2)), &
+ real(9.5,kind=j(2)), real(8.5,kind=j(2))
+ write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(2)), &
+ real(98765.0,kind=j(2))
+ else if (i == 3) then
+ write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(3)), &
+ real(9.49999905,kind=j(3)), &
+ real(9.5,kind=j(3)), real(8.5,kind=j(3))
+ write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(3)), &
+ real(98765.0,kind=j(3))
+ else if (i == 4) then
+ write(s, '(2F4.1,2F4.0)') real(-9.49999905,kind=j(4)), &
+ real(9.49999905,kind=j(4)), &
+ real(9.5,kind=j(4)), real(8.5,kind=j(4))
+ write(s1, '(3PE10.3,2PE10.3)') real(987350.,kind=j(4)), &
+ real(98765.0,kind=j(4))
+ end if
+ if (s /= '-9.5 9.5 10. 8.' .or. s1 /= ' 987.4E+03 98.76E+03') then
+ l_skip(i) = .true.
+! print "('Unsupported rounding for real(',i0,')')", j(i)
+ end if
+ end do
+
+
+! Original test.
+ call checkfmt("(en15.2)", -.44444, " -444.44E-03")
+
+! Test for the bug in comment 6.
+ call checkfmt("(en15.0)", 1.0, " 1.E+00")
+ call checkfmt("(en15.0)", 1.00000012, " 1.E+00")
+ call checkfmt("(en15.0)", 0.99999994, " 1.E+00")
+ call checkfmt("(en15.0)", 10.0, " 10.E+00")
+ call checkfmt("(en15.0)", 10.0000010, " 10.E+00")
+ call checkfmt("(en15.0)", 9.99999905, " 10.E+00")
+ call checkfmt("(en15.0)", 100.0, " 100.E+00")
+ call checkfmt("(en15.0)", 100.000008, " 100.E+00")
+ call checkfmt("(en15.0)", 99.9999924, " 100.E+00")
+ call checkfmt("(en15.0)", 1000.0, " 1.E+03")
+ call checkfmt("(en15.0)", 1000.00006, " 1.E+03")
+ call checkfmt("(en15.0)", 999.999939, " 1.E+03")
+ call checkfmt("(en15.0)", 9.5, " 10.E+00")
+ call checkfmt("(en15.0)", 9.50000095, " 10.E+00")
+ call checkfmt("(en15.0)", 9.49999905, " 9.E+00")
+ call checkfmt("(en15.0)", 99.5, " 100.E+00")
+ call checkfmt("(en15.0)", 99.5000076, " 100.E+00")
+ call checkfmt("(en15.0)", 99.4999924, " 99.E+00")
+ call checkfmt("(en15.0)", 999.5, " 1.E+03")
+ call checkfmt("(en15.0)", 999.500061, " 1.E+03")
+ call checkfmt("(en15.0)", 999.499939, " 999.E+00")
+ call checkfmt("(en15.0)", 9500.0, " 10.E+03")
+ call checkfmt("(en15.0)", 9500.00098, " 10.E+03")
+ call checkfmt("(en15.0)", 9499.99902, " 9.E+03")
+ call checkfmt("(en15.1)", 9950.0, " 10.0E+03")
+ call checkfmt("(en15.2)", 9995.0, " 10.00E+03")
+ call checkfmt("(en15.3)", 9999.5, " 10.000E+03")
+ call checkfmt("(en15.1)", 9.5, " 9.5E+00")
+ call checkfmt("(en15.1)", 9.50000095, " 9.5E+00")
+ call checkfmt("(en15.1)", 9.49999905, " 9.5E+00")
+ call checkfmt("(en15.1)", 0.099951, " 100.0E-03")
+ call checkfmt("(en15.1)", 0.009951, " 10.0E-03")
+ call checkfmt("(en15.1)", 0.000999951," 1.0E-03")
+
+ call checkfmt("(en15.0)", -1.0, " -1.E+00")
+ call checkfmt("(en15.0)", -1.00000012, " -1.E+00")
+ call checkfmt("(en15.0)", -0.99999994, " -1.E+00")
+ call checkfmt("(en15.0)", -10.0, " -10.E+00")
+ call checkfmt("(en15.0)", -10.0000010, " -10.E+00")
+ call checkfmt("(en15.0)", -9.99999905, " -10.E+00")
+ call checkfmt("(en15.0)", -100.0, " -100.E+00")
+ call checkfmt("(en15.0)", -100.000008, " -100.E+00")
+ call checkfmt("(en15.0)", -99.9999924, " -100.E+00")
+ call checkfmt("(en15.0)", -1000.0, " -1.E+03")
+ call checkfmt("(en15.0)", -1000.00006, " -1.E+03")
+ call checkfmt("(en15.0)", -999.999939, " -1.E+03")
+ call checkfmt("(en15.0)", -9.5, " -10.E+00")
+ call checkfmt("(en15.0)", -9.50000095, " -10.E+00")
+ call checkfmt("(en15.0)", -9.49999905, " -9.E+00")
+ call checkfmt("(en15.0)", -99.5, " -100.E+00")
+ call checkfmt("(en15.0)", -99.5000076, " -100.E+00")
+ call checkfmt("(en15.0)", -99.4999924, " -99.E+00")
+ call checkfmt("(en15.0)", -999.5, " -1.E+03")
+ call checkfmt("(en15.0)", -999.500061, " -1.E+03")
+ call checkfmt("(en15.0)", -999.499939, " -999.E+00")
+ call checkfmt("(en15.0)", -9500.0, " -10.E+03")
+ call checkfmt("(en15.0)", -9500.00098, " -10.E+03")
+ call checkfmt("(en15.0)", -9499.99902, " -9.E+03")
+ call checkfmt("(en15.1)", -9950.0, " -10.0E+03")
+ call checkfmt("(en15.2)", -9995.0, " -10.00E+03")
+ call checkfmt("(en15.3)", -9999.5, " -10.000E+03")
+ call checkfmt("(en15.1)", -9.5, " -9.5E+00")
+ call checkfmt("(en15.1)", -9.50000095, " -9.5E+00")
+ call checkfmt("(en15.1)", -9.49999905, " -9.5E+00")
+ call checkfmt("(en15.1)", -0.099951, " -100.0E-03")
+ call checkfmt("(en15.1)", -0.009951, " -10.0E-03")
+ call checkfmt("(en15.1)", -0.000999951," -1.0E-03")
+
+ call checkfmt("(en15.1)", 987350., " 987.4E+03")
+ call checkfmt("(en15.2)", 98735., " 98.74E+03")
+ call checkfmt("(en15.3)", 9873.5, " 9.874E+03")
+ call checkfmt("(en15.1)", 987650., " 987.6E+03")
+ call checkfmt("(en15.2)", 98765., " 98.76E+03")
+ call checkfmt("(en15.3)", 9876.5, " 9.876E+03")
+ call checkfmt("(en15.1)", 3.125E-02, " 31.2E-03")
+ call checkfmt("(en15.1)", 9.375E-02, " 93.8E-03")
+ call checkfmt("(en15.2)", 1.5625E-02, " 15.62E-03")
+ call checkfmt("(en15.2)", 4.6875E-02, " 46.88E-03")
+ call checkfmt("(en15.3)", 7.8125E-03, " 7.812E-03")
+ call checkfmt("(en15.3)", 2.34375E-02, " 23.438E-03")
+ call checkfmt("(en15.3)", 9.765625E-04," 976.562E-06")
+ call checkfmt("(en15.6)", 2.9296875E-03," 2.929688E-03")
+
+ call checkfmt("(en15.1)", -987350., " -987.4E+03")
+ call checkfmt("(en15.2)", -98735., " -98.74E+03")
+ call checkfmt("(en15.3)", -9873.5, " -9.874E+03")
+ call checkfmt("(en15.1)", -987650., " -987.6E+03")
+ call checkfmt("(en15.2)", -98765., " -98.76E+03")
+ call checkfmt("(en15.3)", -9876.5, " -9.876E+03")
+ call checkfmt("(en15.1)", -3.125E-02, " -31.2E-03")
+ call checkfmt("(en15.1)", -9.375E-02, " -93.8E-03")
+ call checkfmt("(en15.2)", -1.5625E-02, " -15.62E-03")
+ call checkfmt("(en15.2)", -4.6875E-02, " -46.88E-03")
+ call checkfmt("(en15.3)", -7.8125E-03, " -7.812E-03")
+ call checkfmt("(en15.3)", -2.34375E-02, " -23.438E-03")
+ call checkfmt("(en15.3)", -9.765625E-04," -976.562E-06")
+ call checkfmt("(en15.6)", -2.9296875E-03," -2.929688E-03")
+
+ ! print *, n_tst, n_cnt, n_skip
+ if (n_cnt /= 0) call abort
+ if (all(.not. l_skip)) write (10, *) "All kinds rounded to nearest"
+ close (10)
+
+contains
+ subroutine checkfmt(fmt, x, cmp)
+ implicit none
+ integer :: i
+ character(len=*), intent(in) :: fmt
+ real, intent(in) :: x
+ character(len=*), intent(in) :: cmp
+ do i=1,size(real_kinds)
+ if (i == 1) then
+ write(s, fmt) real(x,kind=j(1))
+ else if (i == 2) then
+ write(s, fmt) real(x,kind=j(2))
+ else if (i == 3) then
+ write(s, fmt) real(x,kind=j(3))
+ else if (i == 4) then
+ write(s, fmt) real(x,kind=j(4))
+ end if
+ n_tst = n_tst + 1
+ if (s /= cmp) then
+ if (l_skip(i)) then
+ n_skip = n_skip + 1
+ else
+ print "(a,1x,a,' expected: ',1x,a)", fmt, s, cmp
+ n_cnt = n_cnt + 1
+ end if
+ end if
+ end do
+
+ end subroutine
+end program
+! { dg-final { scan-file fmt_en.res "All kinds rounded to nearest" { xfail { i?86-*-solaris2.9* hppa*-*-hpux* } } } }
+! { dg-final { cleanup-saved-temps } }
diff --git a/gcc/testsuite/gfortran.dg/fmt_g_1.f90 b/gcc/testsuite/gfortran.dg/fmt_g_1.f90
new file mode 100644
index 0000000000..715df0dfc0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/fmt_g_1.f90
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR59771 Cleanup handling of Gw.0 and Gw.0Ee format
+! Test case prepared by Dominique d'Humieres <dominiq@lps.ens.fr>
+ PROGRAM FOO
+ character(len=60) :: buffer, buffer1
+
+ write (buffer ,'(6(1X,1PG9.0e2))') 0.0, 0.04, 0.06, 0.4, 0.6, 243.0
+ write (buffer1,'(6(1X,1PE9.0e2))') 0.0, 0.04, 0.06, 0.4, 0.6, 243.0
+
+ if (buffer /= buffer1) call abort
+ end
diff --git a/gcc/testsuite/gfortran.dg/forall_4.f90 b/gcc/testsuite/gfortran.dg/forall_4.f90
index e71e0b847f..0b0d731650 100644
--- a/gcc/testsuite/gfortran.dg/forall_4.f90
+++ b/gcc/testsuite/gfortran.dg/forall_4.f90
@@ -64,4 +64,3 @@ contains
w = 5 - i
end function w
end
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/forall_5.f90 b/gcc/testsuite/gfortran.dg/forall_5.f90
index 1d9efb904a..43ed2b5c31 100644
--- a/gcc/testsuite/gfortran.dg/forall_5.f90
+++ b/gcc/testsuite/gfortran.dg/forall_5.f90
@@ -38,4 +38,3 @@ contains
w = 5 - i
end function w
end
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/fraction.f90 b/gcc/testsuite/gfortran.dg/fraction.f90
new file mode 100644
index 0000000000..7a981118e0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/fraction.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+!
+! Test for pr52413
+!
+
+program test_frac
+
+ real :: y
+ y=fraction (-2.0)
+ if (fraction (-2.0) /= -0.5) call abort ()
+ if (fraction (-0.0) /= 0.0) call abort ()
+ if (sign(1.0, fraction(-0.0)) /= -1.0) call abort ()
+ if (fraction (-2.0_8) /= -0.5) call abort ()
+
+end program test_frac
diff --git a/gcc/testsuite/gfortran.dg/func_assign.f90 b/gcc/testsuite/gfortran.dg/func_assign.f90
index 430198b813..7ecf32941c 100644
--- a/gcc/testsuite/gfortran.dg/func_assign.f90
+++ b/gcc/testsuite/gfortran.dg/func_assign.f90
@@ -31,5 +31,3 @@ contains
end module mod
end
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/func_assign_3.f90 b/gcc/testsuite/gfortran.dg/func_assign_3.f90
index 7846c87813..db81adf8ec 100644
--- a/gcc/testsuite/gfortran.dg/func_assign_3.f90
+++ b/gcc/testsuite/gfortran.dg/func_assign_3.f90
@@ -29,4 +29,3 @@ program bugTest
testCatch = testObj%test(2,2) ! This would cause an ICE
if (any (testCatch .ne. dble (reshape ([(i, i = 1, 4)],[2,2])))) call abort
end program bugTest
-! { dg-final { cleanup-modules "bugtestmod" } }
diff --git a/gcc/testsuite/gfortran.dg/func_derived_1.f90 b/gcc/testsuite/gfortran.dg/func_derived_1.f90
index 2cf8e449c7..c8820aac3b 100644
--- a/gcc/testsuite/gfortran.dg/func_derived_1.f90
+++ b/gcc/testsuite/gfortran.dg/func_derived_1.f90
@@ -38,5 +38,3 @@ function f(i,x,c,arr)
end function f
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/func_derived_2.f90 b/gcc/testsuite/gfortran.dg/func_derived_2.f90
index 35860182a3..d79f120b05 100644
--- a/gcc/testsuite/gfortran.dg/func_derived_2.f90
+++ b/gcc/testsuite/gfortran.dg/func_derived_2.f90
@@ -38,5 +38,3 @@ program func_derived_2
y => get2 (x)
if (y%i.ne.112) call abort ()
end program func_derived_2
-
-! { dg-final { cleanup-modules "mpoint" } }
diff --git a/gcc/testsuite/gfortran.dg/func_derived_3.f90 b/gcc/testsuite/gfortran.dg/func_derived_3.f90
index 6facf218e0..a271fe98f6 100644
--- a/gcc/testsuite/gfortran.dg/func_derived_3.f90
+++ b/gcc/testsuite/gfortran.dg/func_derived_3.f90
@@ -123,5 +123,3 @@ end module func_derived_3a
if (trim (line).ne."simple = 1") call abort ()
close (10)
end program
-
-! { dg-final { cleanup-modules "func_derived_3 func_derived_3a" } }
diff --git a/gcc/testsuite/gfortran.dg/func_derived_4.f90 b/gcc/testsuite/gfortran.dg/func_derived_4.f90
index 532d821dee..03560230dd 100644
--- a/gcc/testsuite/gfortran.dg/func_derived_4.f90
+++ b/gcc/testsuite/gfortran.dg/func_derived_4.f90
@@ -101,5 +101,3 @@ program test_pnt
call create_field(quality,msh)
mshp => msh_(quality)
end program test_pnt
-
-! { dg-final { cleanup-modules "class_mesh class_field class_scalar_field" } }
diff --git a/gcc/testsuite/gfortran.dg/func_derived_5.f90 b/gcc/testsuite/gfortran.dg/func_derived_5.f90
index 76d45a883d..d4e7b7c73b 100644
--- a/gcc/testsuite/gfortran.dg/func_derived_5.f90
+++ b/gcc/testsuite/gfortran.dg/func_derived_5.f90
@@ -10,5 +10,3 @@ type(t) function foo()
use m
foo = t()
end function foo
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/func_result_6.f90 b/gcc/testsuite/gfortran.dg/func_result_6.f90
index e64a2ef7ab..48b34f3b70 100644
--- a/gcc/testsuite/gfortran.dg/func_result_6.f90
+++ b/gcc/testsuite/gfortran.dg/func_result_6.f90
@@ -69,5 +69,3 @@ contains
foo = [33, 77]
end function foo
end subroutine test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/function_charlen_1.f90 b/gcc/testsuite/gfortran.dg/function_charlen_1.f90
index e0ecc63b89..40f602f25f 100644
--- a/gcc/testsuite/gfortran.dg/function_charlen_1.f90
+++ b/gcc/testsuite/gfortran.dg/function_charlen_1.f90
@@ -20,4 +20,3 @@ end function test
end interface
print *, test()
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/function_charlen_2.f90 b/gcc/testsuite/gfortran.dg/function_charlen_2.f90
index 84d3d7e953..5713c307bd 100644
--- a/gcc/testsuite/gfortran.dg/function_charlen_2.f90
+++ b/gcc/testsuite/gfortran.dg/function_charlen_2.f90
@@ -28,4 +28,3 @@ contains
if (len (g) == 2) g= "2"
end function g
end program test
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/function_kinds_1.f90 b/gcc/testsuite/gfortran.dg/function_kinds_1.f90
index f0140df062..7d143740c2 100644
--- a/gcc/testsuite/gfortran.dg/function_kinds_1.f90
+++ b/gcc/testsuite/gfortran.dg/function_kinds_1.f90
@@ -51,4 +51,3 @@ end module mymodule
z = func()
if (z%i .ne. 5) call abort ()
end
-! { dg-final { cleanup-modules "kinds mymodule" } }
diff --git a/gcc/testsuite/gfortran.dg/function_kinds_2.f90 b/gcc/testsuite/gfortran.dg/function_kinds_2.f90
index f14453df9b..8282f01278 100644
--- a/gcc/testsuite/gfortran.dg/function_kinds_2.f90
+++ b/gcc/testsuite/gfortran.dg/function_kinds_2.f90
@@ -17,5 +17,3 @@ module x
end function
end interface
end module
-! { dg-final { cleanup-modules "types x" } }
-
diff --git a/gcc/testsuite/gfortran.dg/function_kinds_3.f90 b/gcc/testsuite/gfortran.dg/function_kinds_3.f90
index b1dd2b4a2d..db95729690 100644
--- a/gcc/testsuite/gfortran.dg/function_kinds_3.f90
+++ b/gcc/testsuite/gfortran.dg/function_kinds_3.f90
@@ -27,5 +27,3 @@ character(1,kind=char_t) function test4()
use m
test4 = 'A'
end function test4
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/function_kinds_4.f90 b/gcc/testsuite/gfortran.dg/function_kinds_4.f90
index bcde1e4478..d0e48f6b4d 100644
--- a/gcc/testsuite/gfortran.dg/function_kinds_4.f90
+++ b/gcc/testsuite/gfortran.dg/function_kinds_4.f90
@@ -53,4 +53,3 @@ contains
two = 1
end function two
end program main
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/function_optimize_10.f90 b/gcc/testsuite/gfortran.dg/function_optimize_10.f90
index 0be6b997ae..8906934d1c 100644
--- a/gcc/testsuite/gfortran.dg/function_optimize_10.f90
+++ b/gcc/testsuite/gfortran.dg/function_optimize_10.f90
@@ -1,4 +1,4 @@
-! { do-do run }
+! { dg-do run }
! PR 51858 - this used to generate wrong code.
! Original test case by Don Simons.
diff --git a/gcc/testsuite/gfortran.dg/function_optimize_8.f90 b/gcc/testsuite/gfortran.dg/function_optimize_8.f90
index c197a6d7ff..56e48c5034 100644
--- a/gcc/testsuite/gfortran.dg/function_optimize_8.f90
+++ b/gcc/testsuite/gfortran.dg/function_optimize_8.f90
@@ -33,4 +33,3 @@ end program main
! { dg-final { scan-tree-dump-times "myfunc" 2 "original" } }
! { dg-final { scan-tree-dump-times "mychar" 2 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/function_types_1.f90 b/gcc/testsuite/gfortran.dg/function_types_1.f90
index fb18d2f0e5..f56884f93a 100644
--- a/gcc/testsuite/gfortran.dg/function_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/function_types_1.f90
@@ -9,4 +9,3 @@ contains
type(non_exist) function func2() ! { dg-error "not accessible" }
end function func2
end module bar
-! { dg-final { cleanup-modules "bar" } }
diff --git a/gcc/testsuite/gfortran.dg/function_types_2.f90 b/gcc/testsuite/gfortran.dg/function_types_2.f90
index b3b5a0aee9..0c16039394 100644
--- a/gcc/testsuite/gfortran.dg/function_types_2.f90
+++ b/gcc/testsuite/gfortran.dg/function_types_2.f90
@@ -101,4 +101,3 @@ contains
d1%m = 55
end function d1
end program main
-! { dg-final { cleanup-modules "m1 m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/function_types_3.f90 b/gcc/testsuite/gfortran.dg/function_types_3.f90
index 49d5d5f561..e834725144 100644
--- a/gcc/testsuite/gfortran.dg/function_types_3.f90
+++ b/gcc/testsuite/gfortran.dg/function_types_3.f90
@@ -5,7 +5,7 @@
! PR 50401: SIGSEGV in resolve_transfer
interface
- function f() ! { dg-error "must be a dummy argument" }
+ function f() ! { dg-error "must be a dummy argument|Interface mismatch in global procedure" }
dimension f(*)
end function
end interface
diff --git a/gcc/testsuite/gfortran.dg/g77/19990826-3.f b/gcc/testsuite/gfortran.dg/g77/19990826-3.f
index dba24becb4..374c5538e1 100644
--- a/gcc/testsuite/gfortran.dg/g77/19990826-3.f
+++ b/gcc/testsuite/gfortran.dg/g77/19990826-3.f
@@ -64,7 +64,7 @@ C
IF(M2.LT.64)INDE=5
IF(M2.LT.32)INDE=4
DO 3 NUN =3,INUN
- DO 3 NDE=3,INDE
+ DO 3 NDE=3,INDE ! { dg-warning "Obsolescent feature: Shared DO termination" }
N10=2**NUN
N20=2**NDE
NDIF=(N10-N20)
diff --git a/gcc/testsuite/gfortran.dg/g77/20020307-1.f b/gcc/testsuite/gfortran.dg/g77/20020307-1.f
index 730c14d328..73585434cf 100644
--- a/gcc/testsuite/gfortran.dg/g77/20020307-1.f
+++ b/gcc/testsuite/gfortran.dg/g77/20020307-1.f
@@ -6,7 +6,7 @@ c { dg-do compile }
DIMENSION BNORM(MAXVEC),BINV(MAXVEC),WT(MAXVEC),W0(MAXVEC)
DIMENSION C1(MAXVEC),C2(MAXVEC),R1(MAXVEC),R2(MAXVEC)
DO 200 ILAT=1,2**IDIM
- DO 200 I1=1,IDIM
+ DO 200 I1=1,IDIM ! { dg-warning "Obsolescent feature: Shared DO termination" }
DO 220 I2=1,IDIM
CALL INTACT(ILAT,I1,I1,W1)
220 CONTINUE
diff --git a/gcc/testsuite/gfortran.dg/g77/980310-3.f b/gcc/testsuite/gfortran.dg/g77/980310-3.f
index 5656023785..098e22c680 100644
--- a/gcc/testsuite/gfortran.dg/g77/980310-3.f
+++ b/gcc/testsuite/gfortran.dg/g77/980310-3.f
@@ -128,7 +128,7 @@ c compute right side vector in resulting linear equations
c
basl = dlog10(2.0d0)
do 240 i = low,igh
- do 240 j = low,igh
+ do 240 j = low,igh ! { dg-warning "Obsolescent feature: Shared DO termination" }
tb = b(i,j)
ta = a(i,j)
if (ta .eq. 0.0d0) go to 220
@@ -242,7 +242,7 @@ c
ir = wk(i,1)
fi = 2.0d0**ir
if (i .lt. low) fi = 1.0d0
- do 400 j =low,n
+ do 400 j =low,n ! { dg-warning "Obsolescent feature: Shared DO termination" }
jc = cscale(j)
fj = 2.0d0**jc
if (j .le. igh) go to 390
diff --git a/gcc/testsuite/gfortran.dg/g77/README b/gcc/testsuite/gfortran.dg/g77/README
index a790ca86f6..f0c34c0fed 100644
--- a/gcc/testsuite/gfortran.dg/g77/README
+++ b/gcc/testsuite/gfortran.dg/g77/README
@@ -201,7 +201,7 @@ check0.f Y
select_no_compile.f Y
-Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+Copyright (C) 2004-2014 Free Software Foundation, Inc.
Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
diff --git a/gcc/testsuite/gfortran.dg/g77/cabs.f b/gcc/testsuite/gfortran.dg/g77/cabs.f
index 998327b6e6..eafe92c8f1 100644
--- a/gcc/testsuite/gfortran.dg/g77/cabs.f
+++ b/gcc/testsuite/gfortran.dg/g77/cabs.f
@@ -1,5 +1,4 @@
c { dg-do run }
-c { dg-xfail-run-if "PR target/16292" { mips-sgi-irix6* } { -O0 } }
program cabs_1
complex z0
real r0
diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f
index 89a8df2caf..7a22ae6b81 100644
--- a/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f
+++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-s-out.f
@@ -4,7 +4,7 @@ C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
-C ( dg-output "^" }
+C { dg-output "^" }
10 format(SP,I3,1X,SS,I3)
20 format(SP,I3,1X,SS,I3,SP,I3)
30 format(SP,I3,1X,SS,I3,S,I3)
diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-t-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-t-out.f
index 8e411888f2..b47b747760 100644
--- a/gcc/testsuite/gfortran.dg/g77/f77-edit-t-out.f
+++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-t-out.f
@@ -4,9 +4,9 @@ C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
-C ( dg-output "^" }
+C { dg-output "^" }
write(*,'(I4,T8,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
write(*,'(I4,TR3,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
write(*,'(I4,5X,TL2,I1)') 1234,8 ! { dg-output "1234 8(\n|\r\n|\r)" }
-C ( dg-output "\$" }
+C { dg-output "\$" }
end
diff --git a/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
index 9d196331dd..13a9d7a93e 100644
--- a/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
+++ b/gcc/testsuite/gfortran.dg/g77/f77-edit-x-out.f
@@ -4,7 +4,7 @@ C
C Origin: David Billinghurst <David.Billinghurst@riotinto.com>
C
C { dg-do run }
-C ( dg-output "^" }
+C { dg-output "^" }
write(*,'(I1,1X,I1,2X,I1)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
C Section 13.5.3 explains why there are no trailing blanks
write(*,'(I1,1X,I1,2X,I1,3X)') 1,2,3 ! { dg-output "1 2 3(\n|\r\n|\r)" }
diff --git a/gcc/testsuite/gfortran.dg/generic_1.f90 b/gcc/testsuite/gfortran.dg/generic_1.f90
index 6a7a6df4a0..1cbf4bb8cb 100644
--- a/gcc/testsuite/gfortran.dg/generic_1.f90
+++ b/gcc/testsuite/gfortran.dg/generic_1.f90
@@ -17,5 +17,3 @@ end module
subroutine BAZ(X)
use FOO
end subroutine
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_10.f90 b/gcc/testsuite/gfortran.dg/generic_10.f90
index 8f9ff6fcbe..6684c4ff85 100644
--- a/gcc/testsuite/gfortran.dg/generic_10.f90
+++ b/gcc/testsuite/gfortran.dg/generic_10.f90
@@ -33,4 +33,3 @@ end module gfcbug46
call random_number (z)
print *, z
end
-! { dg-final { cleanup-modules "gfcbug46" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_11.f90 b/gcc/testsuite/gfortran.dg/generic_11.f90
index 7547a43da7..decc0aeebb 100644
--- a/gcc/testsuite/gfortran.dg/generic_11.f90
+++ b/gcc/testsuite/gfortran.dg/generic_11.f90
@@ -26,6 +26,3 @@ use m_bar
call foo ! { dg-error "is an ambiguous reference" }
end
-! { dg-final { cleanup-modules "m_foo m_bar" } }
-
-
diff --git a/gcc/testsuite/gfortran.dg/generic_12.f90 b/gcc/testsuite/gfortran.dg/generic_12.f90
index 59c3c96e3e..007f3ee4c9 100644
--- a/gcc/testsuite/gfortran.dg/generic_12.f90
+++ b/gcc/testsuite/gfortran.dg/generic_12.f90
@@ -29,4 +29,3 @@ PROGRAM main
IMPLICIT NONE
CALL hello(10)
END PROGRAM main
-! { dg-final { cleanup-modules "interfaces global_module" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_13.f90 b/gcc/testsuite/gfortran.dg/generic_13.f90
index 5661345111..58b886d9d4 100644
--- a/gcc/testsuite/gfortran.dg/generic_13.f90
+++ b/gcc/testsuite/gfortran.dg/generic_13.f90
@@ -33,4 +33,3 @@ PROGRAM TT
CALL SUB(xx,I)
IF (I.NE.7) CALL ABORT()
END PROGRAM
-! { dg-final { cleanup-modules "test too" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_14.f90 b/gcc/testsuite/gfortran.dg/generic_14.f90
index e95f6f2ede..5636e9a5d2 100644
--- a/gcc/testsuite/gfortran.dg/generic_14.f90
+++ b/gcc/testsuite/gfortran.dg/generic_14.f90
@@ -101,5 +101,3 @@ module h
end module h
end
-
-! { dg-final { cleanup-modules "a inclmod" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_15.f90 b/gcc/testsuite/gfortran.dg/generic_15.f90
index 127868473f..179d04a53c 100644
--- a/gcc/testsuite/gfortran.dg/generic_15.f90
+++ b/gcc/testsuite/gfortran.dg/generic_15.f90
@@ -41,4 +41,3 @@ PROGRAM main
CALL odfname(base,i,cnames)
if (trim (cnames(1)) .ne. "odfamilycnames") call abort
END PROGRAM
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_16.f90 b/gcc/testsuite/gfortran.dg/generic_16.f90
index 501e146bcc..cb6e34df55 100644
--- a/gcc/testsuite/gfortran.dg/generic_16.f90
+++ b/gcc/testsuite/gfortran.dg/generic_16.f90
@@ -32,4 +32,3 @@ PROGRAM main
REAL(kind=dp) :: rawData(2), data, work(3)
data = median(rawData, work) ! { dg-error "no specific function" }
END PROGRAM main
-! { dg-final { cleanup-modules "auxiliary" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_17.f90 b/gcc/testsuite/gfortran.dg/generic_17.f90
index 0e9a41d5b0..bd919bcb36 100644
--- a/gcc/testsuite/gfortran.dg/generic_17.f90
+++ b/gcc/testsuite/gfortran.dg/generic_17.f90
@@ -37,4 +37,3 @@ end module foo_mod
subroutine s_foobar2(x)
use foo_mod
end subroutine s_foobar2
-! { dg-final { cleanup-modules "s_foo_mod d_foo_mod foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_18.f90 b/gcc/testsuite/gfortran.dg/generic_18.f90
index 695262b304..8bfd770b9b 100644
--- a/gcc/testsuite/gfortran.dg/generic_18.f90
+++ b/gcc/testsuite/gfortran.dg/generic_18.f90
@@ -51,4 +51,3 @@ END PROGRAM MakeAChoice
! { dg-final { scan-tree-dump-times "specproc" 3 "original" } }
! { dg-final { scan-tree-dump-times "elemproc" 3 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "someoptions" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_19.f90 b/gcc/testsuite/gfortran.dg/generic_19.f90
index f023c5e635..8bbbf8a0ee 100644
--- a/gcc/testsuite/gfortran.dg/generic_19.f90
+++ b/gcc/testsuite/gfortran.dg/generic_19.f90
@@ -34,4 +34,3 @@ program prog
call sub(1, "integer ")
call sub(1.0, "real ")
end program prog
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_2.f90 b/gcc/testsuite/gfortran.dg/generic_2.f90
index 459dd7ec81..802e966c4b 100644
--- a/gcc/testsuite/gfortran.dg/generic_2.f90
+++ b/gcc/testsuite/gfortran.dg/generic_2.f90
@@ -18,5 +18,3 @@ end module bidon
integer,intent(in) :: nspden
end subroutine nonlinear
-
-! { dg-final { cleanup-modules "bidon" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_20.f90 b/gcc/testsuite/gfortran.dg/generic_20.f90
index 04a57b0905..83485b6f7b 100644
--- a/gcc/testsuite/gfortran.dg/generic_20.f90
+++ b/gcc/testsuite/gfortran.dg/generic_20.f90
@@ -27,5 +27,3 @@ real :: res(1)
res = matmul (one(2.0), (/ 2.0/))
if (abs (res(1)-4.0) > epsilon (res)) call abort ()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_21.f90 b/gcc/testsuite/gfortran.dg/generic_21.f90
index c651e63942..b11aa7facf 100644
--- a/gcc/testsuite/gfortran.dg/generic_21.f90
+++ b/gcc/testsuite/gfortran.dg/generic_21.f90
@@ -29,5 +29,3 @@ contains
end do
end function sqrt_vector
end module gfcbug102
-
-! { dg-final { cleanup-modules "gfcbug102" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_22.f03 b/gcc/testsuite/gfortran.dg/generic_22.f03
index 487d93c511..040fddd95f 100644
--- a/gcc/testsuite/gfortran.dg/generic_22.f03
+++ b/gcc/testsuite/gfortran.dg/generic_22.f03
@@ -35,4 +35,3 @@ contains
end module base_mod
-! { dg-final { cleanup-modules "base_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_23.f03 b/gcc/testsuite/gfortran.dg/generic_23.f03
index eab185b483..94dbbbcc16 100644
--- a/gcc/testsuite/gfortran.dg/generic_23.f03
+++ b/gcc/testsuite/gfortran.dg/generic_23.f03
@@ -63,5 +63,3 @@ program testd15
if (af2%get() .ne. 3) call abort
end program testd15
-
-! { dg-final { cleanup-modules "foo_mod foo2_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_24.f90 b/gcc/testsuite/gfortran.dg/generic_24.f90
index 2388722b55..18ca81ced9 100644
--- a/gcc/testsuite/gfortran.dg/generic_24.f90
+++ b/gcc/testsuite/gfortran.dg/generic_24.f90
@@ -96,5 +96,3 @@ program test
use sparse_matrices_fields
use global_numbering
end program test
-
-! { dg-final { cleanup-modules "sparse_tools sparse_matrices_fields global_numbering" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_25.f90 b/gcc/testsuite/gfortran.dg/generic_25.f90
new file mode 100644
index 0000000000..39b7e23eb0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/generic_25.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+!
+! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
+!
+! Contributed by <wangmianzhi1@linuxmail.org>
+
+ interface test
+ procedure testAlloc
+ procedure testPtr
+ end interface
+
+ integer, allocatable :: a1
+ integer, pointer :: a2
+
+ if (.not.test(a1)) call abort()
+ if (test(a2)) call abort()
+
+contains
+
+ logical function testAlloc(obj)
+ integer, allocatable :: obj
+ testAlloc = .true.
+ end function
+
+ logical function testPtr(obj)
+ integer, pointer :: obj
+ testPtr = .false.
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/generic_26.f90 b/gcc/testsuite/gfortran.dg/generic_26.f90
new file mode 100644
index 0000000000..a1deef19f9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/generic_26.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
+!
+! Contributed by <wangmianzhi1@linuxmail.org>
+
+module a
+
+ interface test
+ procedure testAlloc
+ procedure testPtr ! { dg-error "Ambiguous interfaces" }
+ end interface
+
+contains
+
+ logical function testAlloc(obj)
+ integer, allocatable :: obj
+ testAlloc = .true.
+ end function
+
+ logical function testPtr(obj)
+ integer, pointer :: obj
+ testPtr = .false.
+ end function
+
+end
+
+! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_27.f90 b/gcc/testsuite/gfortran.dg/generic_27.f90
new file mode 100644
index 0000000000..f4f4f5ab9c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/generic_27.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+!
+! PR 45521: [F08] GENERIC resolution with ALLOCATABLE/POINTER and PROCEDURE
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m
+ implicit none
+ interface testIF
+ module procedure test1
+ module procedure test2
+ end interface
+contains
+ real function test1 (obj)
+ real :: obj
+ test1 = obj
+ end function
+ real function test2 (pr)
+ procedure(real) :: pr
+ test2 = pr(0.)
+ end function
+end module
+
+program test
+ use m
+ implicit none
+ intrinsic :: cos
+
+ if (testIF(2.0)/=2.0) call abort()
+ if (testIF(cos)/=1.0) call abort()
+
+end program
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_28.f90 b/gcc/testsuite/gfortran.dg/generic_28.f90
new file mode 100644
index 0000000000..5ddc9798f9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/generic_28.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR 58998: [4.8/4.9 Regression] Generic interface problem with gfortran
+!
+! Contributed by Paul van Delst
+
+ interface iargc
+ procedure iargc_8
+ end interface
+
+contains
+
+ integer(8) function iargc_8()
+ integer(4) iargc
+ iargc_8 = iargc()
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/generic_3.f90 b/gcc/testsuite/gfortran.dg/generic_3.f90
index 5492603851..3cd2e9d5d5 100644
--- a/gcc/testsuite/gfortran.dg/generic_3.f90
+++ b/gcc/testsuite/gfortran.dg/generic_3.f90
@@ -28,5 +28,3 @@ subroutine mrqcof( x, y, sig, ndata, a, ia, ma )
call gauss( x(i), a, yan, dyda, ma )
end do
end subroutine mrqcof
-
-! { dg-final { cleanup-modules "fit_functions" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_4.f90 b/gcc/testsuite/gfortran.dg/generic_4.f90
index 53cf900328..62bc569a21 100644
--- a/gcc/testsuite/gfortran.dg/generic_4.f90
+++ b/gcc/testsuite/gfortran.dg/generic_4.f90
@@ -26,5 +26,3 @@ y = (/1,2,3/)
call baz(y,z)
if (any (y /= z)) call abort ()
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_5.f90 b/gcc/testsuite/gfortran.dg/generic_5.f90
index cb72098034..f7a9a97155 100644
--- a/gcc/testsuite/gfortran.dg/generic_5.f90
+++ b/gcc/testsuite/gfortran.dg/generic_5.f90
@@ -26,4 +26,3 @@ CONTAINS
CALL ice(23.0) ! { dg-error "no specific subroutine" }
END SUBROUTINE
END MODULE
-! { dg-final { cleanup-modules "ice_gfortran provoke_ice" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_6.f90 b/gcc/testsuite/gfortran.dg/generic_6.f90
index 928861e3e9..5a8bc03f11 100644
--- a/gcc/testsuite/gfortran.dg/generic_6.f90
+++ b/gcc/testsuite/gfortran.dg/generic_6.f90
@@ -46,4 +46,3 @@ end module
use c
call useCreate
end
-! { dg-final { cleanup-modules "a b c" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_7.f90 b/gcc/testsuite/gfortran.dg/generic_7.f90
index e520c0973a..7b9db24d5b 100644
--- a/gcc/testsuite/gfortran.dg/generic_7.f90
+++ b/gcc/testsuite/gfortran.dg/generic_7.f90
@@ -24,5 +24,3 @@ CONTAINS
WRITE(*,*) x, y
END SUBROUTINE
END MODULE
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_8.f90 b/gcc/testsuite/gfortran.dg/generic_8.f90
index a129efe4ca..c84396be8a 100644
--- a/gcc/testsuite/gfortran.dg/generic_8.f90
+++ b/gcc/testsuite/gfortran.dg/generic_8.f90
@@ -28,4 +28,3 @@ CONTAINS
CALL A(MAXVAL(X),Y)
END SUBROUTINE T
END MODULE M
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_9.f90 b/gcc/testsuite/gfortran.dg/generic_9.f90
index 92dd65096c..6ecd5bdbbf 100644
--- a/gcc/testsuite/gfortran.dg/generic_9.f90
+++ b/gcc/testsuite/gfortran.dg/generic_9.f90
@@ -42,4 +42,3 @@ contains
END SUBROUTINE
END MODULE
-! { dg-final { cleanup-modules "class_foo_type class_foo" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_actual_arg.f90 b/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
index 3f328c95b0..9c1fc3e728 100644
--- a/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
+++ b/gcc/testsuite/gfortran.dg/generic_actual_arg.f90
@@ -42,4 +42,3 @@ END
SUBROUTINE F()
END SUBROUTINE
-! { dg-final { cleanup-modules "test test2" } }
diff --git a/gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f90 b/gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f90
index 32a17e3bd8..76c15e97ba 100644
--- a/gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f90
+++ b/gcc/testsuite/gfortran.dg/generic_typebound_operator_1.f90
@@ -17,5 +17,3 @@ module m_sort
end function gt_cmp
end interface
end module m_sort
-
-! { dg-final { cleanup-modules "m_sort" } }
diff --git a/gcc/testsuite/gfortran.dg/global_references_1.f90 b/gcc/testsuite/gfortran.dg/global_references_1.f90
index 7e0a5bd0a3..cfff8b32c0 100644
--- a/gcc/testsuite/gfortran.dg/global_references_1.f90
+++ b/gcc/testsuite/gfortran.dg/global_references_1.f90
@@ -23,7 +23,7 @@ function g(x) ! Global entity
! Function 'f' cannot be referenced as a subroutine. The previous
! definition is in 'line 12'.
- call f(g) ! { dg-error "is already being used as a FUNCTION" }
+ call f(g) ! { dg-error "is already being used as a FUNCTION|Interface mismatch in global procedure" }
end function g
! Error only appears once but testsuite associates with both lines.
function h(x) ! { dg-error "is already being used as a FUNCTION" }
@@ -59,7 +59,7 @@ END SUBROUTINE TT
! Function 'h' cannot be referenced as a subroutine. The previous
! definition is in 'line 29'.
- call h (x) ! { dg-error "is already being used as a FUNCTION" }
+ call h (x) ! { dg-error "is already being used as a FUNCTION|Interface mismatch in global procedure" }
! PR23308===========================================================
! Lahey - 2521-S: "SOURCE.F90", line 68: Intrinsic procedure name or
@@ -96,5 +96,3 @@ END SUBROUTINE j
entry link2 (nameg) ! { dg-error "is already being used as a SUBROUTINE" }
return
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/global_vars_c_init.f90 b/gcc/testsuite/gfortran.dg/global_vars_c_init.f90
index 15f28f5bd2..6040808395 100644
--- a/gcc/testsuite/gfortran.dg/global_vars_c_init.f90
+++ b/gcc/testsuite/gfortran.dg/global_vars_c_init.f90
@@ -14,5 +14,3 @@ contains
endif
end subroutine test_globals
end module global_vars_c_init
-
-! { dg-final { cleanup-modules "global_vars_c_init" } }
diff --git a/gcc/testsuite/gfortran.dg/global_vars_f90_init.f90 b/gcc/testsuite/gfortran.dg/global_vars_f90_init.f90
index aa1a60ba40..7702f3dbb7 100644
--- a/gcc/testsuite/gfortran.dg/global_vars_f90_init.f90
+++ b/gcc/testsuite/gfortran.dg/global_vars_f90_init.f90
@@ -14,5 +14,3 @@ contains
endif
end subroutine test_globals
end module global_vars_f90_init
-
-! { dg-final { cleanup-modules "global_vars_f90_init" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90 b/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90
new file mode 100644
index 0000000000..b6e20b9ce6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/affinity-1.f90
@@ -0,0 +1,19 @@
+ integer :: i, j
+ integer, dimension (10, 10) :: a
+!$omp parallel do default(none)proc_bind(master)shared(a)
+ do i = 1, 10
+ j = 4
+ do j = 1, 10
+ a(i, j) = i + j
+ end do
+ j = 8
+ end do
+!$omp end parallel do
+!$omp parallel proc_bind (close)
+!$omp parallel default(none) proc_bind (spread) firstprivate(a) private (i)
+ do i = 1, 10
+ a(i, i) = i
+ enddo
+!$omp end parallel
+!$omp endparallel
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/allocatable_components_1.f90 b/gcc/testsuite/gfortran.dg/gomp/allocatable_components_1.f90
index 225d0a2b5e..bc06cc8662 100644
--- a/gcc/testsuite/gfortran.dg/gomp/allocatable_components_1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/allocatable_components_1.f90
@@ -14,7 +14,7 @@ CONTAINS
TYPE(t), SAVE :: a
!$omp threadprivate(a)
- !$omp parallel copyin(a) ! { dg-error "has ALLOCATABLE components" }
+ !$omp parallel copyin(a)
! do something
!$omp end parallel
END SUBROUTINE
@@ -22,7 +22,7 @@ CONTAINS
SUBROUTINE test_copyprivate()
TYPE(t) :: a
- !$omp single ! { dg-error "has ALLOCATABLE components" }
+ !$omp single
! do something
!$omp end single copyprivate (a)
END SUBROUTINE
@@ -30,7 +30,7 @@ CONTAINS
SUBROUTINE test_firstprivate
TYPE(t) :: a
- !$omp parallel firstprivate(a) ! { dg-error "has ALLOCATABLE components" }
+ !$omp parallel firstprivate(a)
! do something
!$omp end parallel
END SUBROUTINE
@@ -39,7 +39,7 @@ CONTAINS
TYPE(t) :: a
INTEGER :: i
- !$omp parallel do lastprivate(a) ! { dg-error "has ALLOCATABLE components" }
+ !$omp parallel do lastprivate(a)
DO i = 1, 1
END DO
!$omp end parallel do
@@ -49,11 +49,9 @@ CONTAINS
TYPE(t) :: a(10)
INTEGER :: i
- !$omp parallel do reduction(+: a) ! { dg-error "must be of numeric type" }
+ !$omp parallel do reduction(+: a) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
DO i = 1, SIZE(a)
END DO
!$omp end parallel do
END SUBROUTINE
END MODULE
-
-! { dg-final { cleanup-modules "test_allocatable_components" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.11.2.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.11.2.f90
index 11fdc1caa4..6a9d7a5314 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.11.2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.11.2.f90
@@ -1,4 +1,4 @@
-! { do-do compile }
+! { dg-do compile }
SUBROUTINE A11_2(AA, BB, CC, DD, EE, FF, N)
INTEGER N
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f90
index 2a637580ba..f769fc18f3 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.22.4.f90
@@ -9,4 +9,3 @@
!$OMP THREADPRIVATE(/T/) ! { dg-error "COMMON block" }
!non-conforming because /T/ not declared in A22_4_WRONG
END SUBROUTINE A22_4_WRONG
-! { dg-final { cleanup-modules "A22_MODULE" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.26.2.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.26.2.f90
index 3d43424b60..97c14d945d 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.26.2.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.26.2.f90
@@ -20,4 +20,3 @@
!$OMP END PARALLEL DO
END SUBROUTINE F
END MODULE A26_2
-! { dg-final { cleanup-modules "A26_2" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
index f67c91c215..598c904206 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.31.3.f90
@@ -5,7 +5,7 @@
!$OMP PARALLEL DO REDUCTION(MAX: M) ! MAX is no longer the
! intrinsic so this
! is non-conforming
-! { dg-error "is not INTRINSIC procedure name" "" { target *-*-* } 5 } */
+! { dg-error "OMP DECLARE REDUCTION max not found" "" { target *-*-* } 5 } */
DO I = 1, 100
CALL SUB(M,I)
END DO
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90
index 498a6d324a..8e0b5e093c 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.32.1.f90
@@ -22,4 +22,3 @@
ALLOCATE(WORK(SIZE))
WORK = TOL
END SUBROUTINE BUILD
-! { dg-final { cleanup-modules "M" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.5.f90 b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.5.f90
index 083c0b3b72..a580a3baf6 100644
--- a/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.5.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/appendix-a/a.35.5.f90
@@ -6,7 +6,7 @@
!$OMP CRITICAL
CALL WORK(N,1)
! incorrect nesting of barrier region in a critical region
-!$OMP BARRIER
+!$OMP BARRIER ! { dg-error "region may not be closely nested inside of" }
CALL WORK(N,2)
!$OMP END CRITICAL
!$OMP END PARALLEL
diff --git a/gcc/testsuite/gfortran.dg/gomp/associate1.f90 b/gcc/testsuite/gfortran.dg/gomp/associate1.f90
new file mode 100644
index 0000000000..abc5ae95a0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/associate1.f90
@@ -0,0 +1,83 @@
+! { dg-do compile }
+
+program associate1
+ type dl
+ integer :: i
+ end type
+ type dt
+ integer :: i
+ real :: a(3, 3)
+ type(dl) :: c(3, 3)
+ end type
+ integer :: v, i, j
+ real :: a(3, 3)
+ type(dt) :: b(3)
+ i = 1
+ j = 2
+ associate(k => v, l => a(i, j), m => a(i, :))
+ associate(n => b(j)%c(:, :)%i, o => a, p => b)
+!$omp parallel shared (l) ! { dg-error "ASSOCIATE name" }
+!$omp end parallel
+!$omp parallel firstprivate (m) ! { dg-error "ASSOCIATE name" }
+!$omp end parallel
+!$omp parallel reduction (+: k) ! { dg-error "ASSOCIATE name" }
+!$omp end parallel
+!$omp parallel do firstprivate (k) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp parallel do lastprivate (n) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp parallel do private (o) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp parallel do shared (p) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp task private (k) ! { dg-error "ASSOCIATE name" }
+!$omp end task
+!$omp task shared (l) ! { dg-error "ASSOCIATE name" }
+!$omp end task
+!$omp task firstprivate (m) ! { dg-error "ASSOCIATE name" }
+!$omp end task
+!$omp do private (l) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp do reduction (*: k) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+!$omp sections private(o) ! { dg-error "ASSOCIATE name" }
+!$omp section
+!$omp section
+!$omp end sections
+!$omp parallel sections firstprivate(p) ! { dg-error "ASSOCIATE name" }
+!$omp section
+!$omp section
+!$omp endparallelsections
+!$omp parallelsections lastprivate(m) ! { dg-error "ASSOCIATE name" }
+!$omp section
+!$omp section
+!$omp endparallelsections
+!$omp sections reduction(+:k) ! { dg-error "ASSOCIATE name" }
+!$omp section
+!$omp section
+!$omp end sections
+!$omp simd private (l) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+ k = 1
+!$omp simd lastprivate (m) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+ k = 1
+!$omp simd reduction (+: k) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ end do
+ k = 1
+!$omp simd linear (k : 2) ! { dg-error "ASSOCIATE name" }
+ do i = 1, 10
+ k = k + 2
+ end do
+ end associate
+ end associate
+end program
diff --git a/gcc/testsuite/gfortran.dg/gomp/declare-simd-1.f90 b/gcc/testsuite/gfortran.dg/gomp/declare-simd-1.f90
new file mode 100644
index 0000000000..d6ae7c9c81
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/declare-simd-1.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+
+subroutine fn1 (x)
+ integer :: x
+!$omp declare simd (fn1) inbranch notinbranch uniform (x) ! { dg-error "Unclassifiable OpenMP directive" }
+end subroutine fn1
+subroutine fn2 (x)
+!$omp declare simd (fn100) ! { dg-error "should refer to containing procedure" }
+end subroutine fn2
diff --git a/gcc/testsuite/gfortran.dg/gomp/depend-1.f90 b/gcc/testsuite/gfortran.dg/gomp/depend-1.f90
new file mode 100644
index 0000000000..bd6d26a383
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/depend-1.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+
+subroutine foo (x)
+ integer :: x(5, *)
+!$omp parallel
+!$omp single
+!$omp task depend(in:x(:,5))
+!$omp end task
+!$omp task depend(in:x(5,:)) ! { dg-error "Rightmost upper bound of assumed size array section|proper array section" }
+!$omp end task
+!$omp end single
+!$omp end parallel
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/gomp.exp b/gcc/testsuite/gfortran.dg/gomp/gomp.exp
index e12864b4f9..cb2e8a7247 100644
--- a/gcc/testsuite/gfortran.dg/gomp/gomp.exp
+++ b/gcc/testsuite/gfortran.dg/gomp/gomp.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2005-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/gfortran.dg/gomp/intentin1.f90 b/gcc/testsuite/gfortran.dg/gomp/intentin1.f90
new file mode 100644
index 0000000000..f2a2e98fd7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/intentin1.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+
+subroutine foo (x)
+ integer, pointer, intent (in) :: x
+ integer :: i
+!$omp parallel private (x) ! { dg-error "INTENT.IN. POINTER" }
+!$omp end parallel
+!$omp parallel do lastprivate (x) ! { dg-error "INTENT.IN. POINTER" }
+ do i = 1, 10
+ end do
+!$omp simd linear (x) ! { dg-error "INTENT.IN. POINTER" }
+ do i = 1, 10
+ end do
+!$omp single ! { dg-error "INTENT.IN. POINTER" }
+!$omp end single copyprivate (x)
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/omp_do_concurrent.f90 b/gcc/testsuite/gfortran.dg/gomp/omp_do_concurrent.f90
new file mode 100644
index 0000000000..83204791d9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/omp_do_concurrent.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+!
+! PR fortran/60127
+!
+! OpenMP 4.0 doesn't permit DO CONCURRENT (yet)
+!
+
+!$omp do
+do concurrent(i=1:5) ! { dg-error "OMP DO cannot be a DO CONCURRENT loop" }
+print *, 'Hello'
+end do
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/omp_threadprivate1.f90 b/gcc/testsuite/gfortran.dg/gomp/omp_threadprivate1.f90
index 2ccf93caca..55aad06708 100644
--- a/gcc/testsuite/gfortran.dg/gomp/omp_threadprivate1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/omp_threadprivate1.f90
@@ -15,4 +15,3 @@
!$omp end parallel ! { dg-error "" }
end subroutine bad3
end subroutine bad2
-! { dg-final { cleanup-modules "omp_threadprivate1" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-1.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-1.f90
new file mode 100644
index 0000000000..c9ce70c4f4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-1.f90
@@ -0,0 +1,137 @@
+! { dg-do compile }
+! { dg-options "-fno-openmp -fopenmp-simd -fdump-tree-original -O2" }
+
+!$omp declare reduction (foo:integer:omp_out = omp_out + omp_in)
+ interface
+ integer function foo (x, y)
+ integer, value :: x, y
+!$omp declare simd (foo) linear (y : 2)
+ end function foo
+ end interface
+ integer :: i, a(64), b, c
+ integer, save :: d
+!$omp threadprivate (d)
+ d = 5
+ a = 6
+!$omp simd
+ do i = 1, 64
+ a(i) = foo (a(i), 2 * i)
+ end do
+ b = 0
+ c = 0
+!$omp simd reduction (+:b) reduction (foo:c)
+ do i = 1, 64
+ b = b + a(i)
+ c = c + a(i) * 2
+ end do
+ print *, b
+ b = 0
+!$omp parallel
+!$omp do simd schedule(static, 4) safelen (8) reduction (+:b)
+ do i = 1, 64
+ a(i) = a(i) + 1
+ b = b + 1
+ end do
+!$omp end parallel
+ print *, b
+ b = 0
+!$omp parallel do simd schedule(static, 4) safelen (8) &
+!$omp num_threads (4) if (.true.) reduction (+:b)
+ do i = 1, 64
+ a(i) = a(i) + 1
+ b = b + 1
+ end do
+ print *, b
+ b = 0
+!$omp parallel
+!$omp do simd schedule(static, 4) safelen (8) reduction (+:b)
+ do i = 1, 64
+ a(i) = a(i) + 1
+ b = b + 1
+ end do
+!$omp enddosimd
+!$omp end parallel
+ print *, b
+ b = 0
+!$omp parallel do simd schedule(static, 4) safelen (8) &
+!$omp num_threads (4) if (.true.) reduction (+:b)
+ do i = 1, 64
+ a(i) = a(i) + 1
+ b = b + 1
+ end do
+!$omp end parallel do simd
+!$omp atomic seq_cst
+ b = b + 1
+!$omp end atomic
+!$omp barrier
+!$omp parallel private (i)
+!$omp cancellation point parallel
+!$omp critical (bar)
+ b = b + 1
+!$omp end critical (bar)
+!$omp flush(b)
+!$omp single
+ b = b + 1
+!$omp end single
+!$omp do ordered
+ do i = 1, 10
+ !$omp atomic
+ b = b + 1
+ !$omp end atomic
+ !$omp ordered
+ print *, b
+ !$omp end ordered
+ end do
+!$omp end do
+!$omp master
+ b = b + 1
+!$omp end master
+!$omp cancel parallel
+!$omp end parallel
+!$omp parallel do schedule(runtime) num_threads(8)
+ do i = 1, 10
+ print *, b
+ end do
+!$omp end parallel do
+!$omp sections
+!$omp section
+ b = b + 1
+!$omp section
+ c = c + 1
+!$omp end sections
+ print *, b
+!$omp parallel sections firstprivate (b) if (.true.)
+!$omp section
+ b = b + 1
+!$omp section
+ c = c + 1
+!$omp endparallelsections
+!$omp workshare
+ b = 24
+!$omp end workshare
+!$omp parallel workshare num_threads (2)
+ b = b + 1
+ c = c + 1
+!$omp end parallel workshare
+ print *, b
+!$omp parallel
+!$omp single
+!$omp taskgroup
+!$omp task firstprivate (b)
+ b = b + 1
+!$omp taskyield
+!$omp end task
+!$omp task firstprivate (b)
+ b = b + 1
+!$omp end task
+!$omp taskwait
+!$omp end taskgroup
+!$omp end single
+!$omp end parallel
+ print *, a, c
+end
+
+! { dg-final { scan-tree-dump-times "pragma omp simd" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp" 6 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90
new file mode 100644
index 0000000000..4b2046a58c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-2.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-fopenmp -fopenmp-simd -fdump-tree-original -O2" }
+
+include 'openmp-simd-1.f90'
+
+! { dg-final { scan-tree-dump-times "pragma omp simd" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp" 39 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp for" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp parallel" 9 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp taskgroup" 1 "original" } }
+! Includes the above taskgroup
+! { dg-final { scan-tree-dump-times "pragma omp task" 3 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp critical" 1 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp atomic" 2 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp sections" 2 "original" } }
+! Includes the above sections
+! { dg-final { scan-tree-dump-times "pragma omp section" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp single" 4 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp ordered" 1 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp master" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP" 5 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_barrier" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_cancellation_point" 1 "original" } }
+! Includes the above cancellation point
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_cancel" 2 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_taskyield" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_taskwait" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90 b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90
new file mode 100644
index 0000000000..2dece895f3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/openmp-simd-3.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-fopenmp -fno-openmp-simd -fdump-tree-original -O2" }
+
+include 'openmp-simd-1.f90'
+
+! { dg-final { scan-tree-dump-times "pragma omp simd" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp" 39 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp for" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp parallel" 9 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp taskgroup" 1 "original" } }
+! Includes the above taskgroup
+! { dg-final { scan-tree-dump-times "pragma omp task" 3 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp critical" 1 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp atomic" 2 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp sections" 2 "original" } }
+! Includes the above sections
+! { dg-final { scan-tree-dump-times "pragma omp section" 6 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp single" 4 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp ordered" 1 "original" } }
+! { dg-final { scan-tree-dump-times "pragma omp master" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP" 5 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_barrier" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_cancellation_point" 1 "original" } }
+! Includes the above cancellation point
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_cancel" 2 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_taskyield" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_GOMP_taskwait" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr35786-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr35786-1.f90
index c8639abdbb..ab72f066c4 100644
--- a/gcc/testsuite/gfortran.dg/gomp/pr35786-1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/pr35786-1.f90
@@ -70,5 +70,3 @@ contains
end subroutine fn14
end function fn12
end module
-
-! { dg-final { cleanup-modules "pr35768" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr57089.f90 b/gcc/testsuite/gfortran.dg/gomp/pr57089.f90
new file mode 100644
index 0000000000..ff742c68bc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr57089.f90
@@ -0,0 +1,12 @@
+! PR middle-end/57089
+! { dg-do compile }
+! { dg-options "-O -fopenmp" }
+ SUBROUTINE T()
+ INTEGER :: npoints, grad_deriv
+ SELECT CASE(grad_deriv)
+ CASE (0)
+ !$omp do
+ DO ii=1,npoints
+ END DO
+ END SELECT
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr59467.f90 b/gcc/testsuite/gfortran.dg/gomp/pr59467.f90
new file mode 100644
index 0000000000..e69c9eb49a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr59467.f90
@@ -0,0 +1,24 @@
+! PR libgomp/59467
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+ FUNCTION t()
+ INTEGER :: a, b, t
+ a = 0
+ b = 0
+ !$OMP PARALLEL REDUCTION(+:b)
+ !$OMP SINGLE ! { dg-error "is not threadprivate or private in outer context" }
+ !$OMP ATOMIC WRITE
+ a = 6
+ !$OMP END SINGLE COPYPRIVATE (a)
+ b = a
+ !$OMP END PARALLEL
+ t = b
+ b = 0
+ !$OMP PARALLEL REDUCTION(+:b)
+ !$OMP SINGLE
+ !$OMP ATOMIC WRITE
+ b = 6
+ !$OMP END SINGLE COPYPRIVATE (b)
+ !$OMP END PARALLEL
+ t = t + b
+ END FUNCTION
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90 b/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
new file mode 100644
index 0000000000..9db17dd276
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr59488-1.f90
@@ -0,0 +1,13 @@
+! PR fortran/59488
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+ implicit none
+ integer, parameter :: p(2) = (/ 11, 12 /)
+ integer :: r
+
+ !$omp parallel do default(none)
+ do r = 1, 2
+ print *, p(r)
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90 b/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
new file mode 100644
index 0000000000..38f157b81a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr59488-2.f90
@@ -0,0 +1,16 @@
+! PR fortran/59488
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+ implicit none
+ type t
+ integer :: s1, s2, s3
+ end type
+ integer :: r
+ type(t), parameter :: u = t(1, 2, 3)
+
+ !$omp parallel do default(none)
+ do r = 1, 2
+ print *, u
+ end do
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/pr62131.f90 b/gcc/testsuite/gfortran.dg/gomp/pr62131.f90
new file mode 100644
index 0000000000..8e88cd70bc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/pr62131.f90
@@ -0,0 +1,19 @@
+! PR fortran/62131
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+program pr62131
+ integer,allocatable :: nerrs(:,:)
+ allocate(nerrs(10,10))
+ nerrs(:,:) = 0
+!$omp parallel do
+ do k=1,10
+ call uperrs(k,1)
+ end do
+contains
+ subroutine uperrs(i,io)
+ integer,intent(in) :: i,io
+!$omp atomic
+ nerrs(i,io)=nerrs(i,io)+1
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/proc_ptr_1.f90 b/gcc/testsuite/gfortran.dg/gomp/proc_ptr_1.f90
new file mode 100644
index 0000000000..952c31491e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/proc_ptr_1.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR 46271: [F03] OpenMP default(none) and procedure pointers
+!
+! Contributed by Marco Restelli <mrestelli@gmail.com>
+
+program test
+ implicit none
+ integer :: i
+ real :: s(1000)
+ procedure(f), pointer :: pf
+
+ pf => f
+
+ !$omp parallel do schedule(static) private(i) shared(s,pf) default(none)
+ do i=1,1000
+ call pf(real(i),s(i))
+ enddo
+ !$omp end parallel do
+
+ write(*,*) 'Sum ',sum(s)
+contains
+ pure subroutine f(x,y)
+ real, intent(in) :: x
+ real, intent(out) :: y
+ y = sin(x)*cos(x)
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/proc_ptr_2.f90 b/gcc/testsuite/gfortran.dg/gomp/proc_ptr_2.f90
new file mode 100644
index 0000000000..d993429a76
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/proc_ptr_2.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+ procedure(foo), pointer :: ptr
+ integer :: i
+ ptr => foo
+!$omp do reduction (+ : ptr) ! { dg-error "Procedure pointer|not found" }
+ do i = 1, 10
+ end do
+!$omp simd linear (ptr) ! { dg-error "must be INTEGER" }
+ do i = 1, 10
+ end do
+contains
+ subroutine foo
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/gomp/reduction1.f90 b/gcc/testsuite/gfortran.dg/gomp/reduction1.f90
index 4912f7178c..cdc530bf0f 100644
--- a/gcc/testsuite/gfortran.dg/gomp/reduction1.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/reduction1.f90
@@ -60,73 +60,73 @@ common /blk/ i1
!$omp end parallel
!$omp parallel reduction (*:ia1) ! { dg-error "Assumed size" }
!$omp end parallel
-!$omp parallel reduction (+:l1) ! { dg-error "must be of numeric type, got LOGICAL" }
+!$omp parallel reduction (+:l1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (*:la1) ! { dg-error "must be of numeric type, got LOGICAL" }
+!$omp parallel reduction (*:la1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (-:a1) ! { dg-error "must be of numeric type, got CHARACTER" }
+!$omp parallel reduction (-:a1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (+:t1) ! { dg-error "must be of numeric type, got TYPE" }
+!$omp parallel reduction (+:t1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (*:ta1) ! { dg-error "must be of numeric type, got TYPE" }
+!$omp parallel reduction (*:ta1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.and.:i3) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.and.:i3) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.or.:ia2) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.or.:ia2) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.eqv.:r1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.eqv.:r1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.neqv.:ra1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.neqv.:ra1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.and.:d1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.and.:d1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.or.:da1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.or.:da1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.eqv.:c1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.eqv.:c1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.neqv.:ca1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.neqv.:ca1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.and.:a1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.and.:a1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.or.:t1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.or.:t1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (.eqv.:ta1) ! { dg-error "must be LOGICAL" }
+!$omp parallel reduction (.eqv.:ta1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (min:c1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (min:c1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (max:ca1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (max:ca1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (max:l1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (max:l1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (min:la1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (min:la1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (max:a1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (max:a1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (min:t1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (min:t1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (max:ta1) ! { dg-error "must be INTEGER or REAL" }
+!$omp parallel reduction (max:ta1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (iand:r1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (iand:r1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ior:ra1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ior:ra1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ieor:d1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ieor:d1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ior:da1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ior:da1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (iand:c1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (iand:c1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ior:ca1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ior:ca1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ieor:l1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ieor:l1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (iand:la1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (iand:la1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ior:a1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ior:a1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (ieor:t1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (ieor:t1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
-!$omp parallel reduction (iand:ta1) ! { dg-error "must be INTEGER" }
+!$omp parallel reduction (iand:ta1) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found for type" }
!$omp end parallel
end subroutine
diff --git a/gcc/testsuite/gfortran.dg/gomp/reduction3.f90 b/gcc/testsuite/gfortran.dg/gomp/reduction3.f90
index 0272a74159..9cab6d57d0 100644
--- a/gcc/testsuite/gfortran.dg/gomp/reduction3.f90
+++ b/gcc/testsuite/gfortran.dg/gomp/reduction3.f90
@@ -16,7 +16,7 @@ subroutine f1
integer :: i, ior
ior = 6
i = 6
-!$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
+!$omp parallel reduction (ior:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
!$omp end parallel
end subroutine f1
subroutine f2
@@ -27,7 +27,7 @@ subroutine f2
end function
end interface
i = 6
-!$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
+!$omp parallel reduction (ior:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
i = ior (i, 3)
!$omp end parallel
end subroutine f2
@@ -50,7 +50,7 @@ subroutine f5
use mreduction3
integer :: i
i = 6
-!$omp parallel reduction (ior:i) ! { dg-error "is not INTRINSIC procedure name" }
+!$omp parallel reduction (ior:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
i = ior (i, 7)
!$omp end parallel
end subroutine f5
@@ -58,8 +58,7 @@ subroutine f6
use mreduction3
integer :: i
i = 6
-!$omp parallel reduction (iand:i) ! { dg-error "is not INTRINSIC procedure name" }
+!$omp parallel reduction (iand:i) ! { dg-error "OMP DECLARE REDUCTION\[^\n\r\]*not found" }
i = iand (i, 18)
!$omp end parallel
end subroutine f6
-! { dg-final { cleanup-modules "mreduction3" } }
diff --git a/gcc/testsuite/gfortran.dg/gomp/target1.f90 b/gcc/testsuite/gfortran.dg/gomp/target1.f90
new file mode 100644
index 0000000000..14db4970bd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/target1.f90
@@ -0,0 +1,520 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+module target1
+ interface
+ subroutine dosomething (a, n, m)
+ integer :: a (:), n, m
+ !$omp declare target
+ end subroutine dosomething
+ end interface
+contains
+ subroutine foo (n, o, p, q, r, pp)
+ integer :: n, o, p, q, r, s, i, j
+ integer :: a (2:o)
+ integer, pointer :: pp
+ !$omp target data device (n + 1) if (n .ne. 6) map (tofrom: n, r)
+ !$omp target device (n + 1) if (n .ne. 6) map (from: n) map (alloc: a(2:o))
+ call dosomething (a, n, 0)
+ !$omp end target
+ !$omp target teams device (n + 1) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r)
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp end target teams
+ !$omp target teams distribute device (n + 1) num_teams (n + 4) collapse (2) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp target teams distribute device (n + 1) num_teams (n + 4) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end target teams distribute
+ !$omp target teams distribute parallel do device (n + 1) num_teams (n + 4) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s) &
+ !$omp & ordered schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10 + j
+ end do
+ end do
+ !$omp target teams distribute parallel do device (n + 1) num_teams (n + 4) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10
+ end do
+ !$omp end target teams distribute parallel do
+ !$omp target teams distribute parallel do simd device (n + 1) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s) &
+ !$omp & schedule (static, 8) num_teams (n + 4) safelen(8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp target teams distribute parallel do simd device (n + 1) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) schedule (static, 8) &
+ !$omp & num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end target teams distribute parallel do simd
+ !$omp target teams distribute simd device (n + 1) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & lastprivate (s) num_teams (n + 4) safelen(8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp target teams distribute simd device (n + 1) &
+ !$omp & if (n .ne. 6)map (from: n) map (alloc: a(2:o)) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) lastprivate (s) &
+ !$omp & num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end target teams distribute simd
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams num_teams (n + 4) thread_limit (n * 2) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r)
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp end teams
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute num_teams (n + 4) collapse (2) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute num_teams (n + 4) default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end teams distribute
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute parallel do num_teams (n + 4) &
+ !$omp & if (n .ne. 6) default(shared) ordered schedule (static, 8) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute parallel do num_teams (n + 4)if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10
+ end do
+ !$omp end teams distribute parallel do
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute parallel do simd if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s) &
+ !$omp & schedule (static, 8) num_teams (n + 4) safelen(8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute parallel do simd if (n .ne. 6)default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) schedule (static, 8) &
+ !$omp & num_teams (n + 4) safelen(16) linear(i:1) aligned (pp:4)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end teams distribute parallel do simd
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute simd default(shared) safelen(8) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) collapse (2) &
+ !$omp & lastprivate (s) num_teams (n + 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target
+ !$omp target device (n + 1) if (n .ne. 6)map (from: n) map (alloc: a(2:o))
+ !$omp teams distribute simd default(shared) aligned (pp:4) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & thread_limit (n * 2) dist_schedule (static, 4) lastprivate (s)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end teams distribute simd
+ !$omp end target
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction ( + : r )
+ !$omp distribute collapse (2) firstprivate (q) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute firstprivate (q) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end distribute
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do if (n .ne. 6) default(shared) &
+ !$omp & ordered schedule (static, 8) private (p) firstprivate (q) &
+ !$omp & shared(n)reduction(+:r)dist_schedule(static,4)collapse(2)&
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10
+ end do
+ !$omp end distribute parallel do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do simd if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) collapse (2) safelen(8) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s) &
+ !$omp & schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do simd if (n .ne. 6)default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) schedule (static, 8) &
+ !$omp & safelen(16) linear(i:1) aligned (pp:4)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end distribute parallel do simd
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute simd safelen(8) lastprivate(s) &
+ !$omp & private (p) firstprivate (q) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) collapse (2)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute simd aligned (pp:4) &
+ !$omp & private (p) firstprivate (q) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) lastprivate (s)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end distribute simd
+ !$omp end target teams
+ !$omp end target data
+ end subroutine
+ subroutine bar (n, o, p, r, pp)
+ integer :: n, o, p, q, r, s, i, j
+ integer :: a (2:o)
+ integer, pointer :: pp
+ common /blk/ i, j, q
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction ( + : r )
+ !$omp distribute collapse (2) firstprivate (q) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute firstprivate (q) dist_schedule (static, 4)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ end do
+ !$omp end distribute
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do if (n .ne. 6) default(shared) &
+ !$omp & ordered schedule (static, 8) private (p) firstprivate (q) &
+ !$omp & shared(n)reduction(+:r)dist_schedule(static,4)collapse(2)&
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) ordered schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ call dosomething (a, n, p + q)
+ end do
+ !$omp ordered
+ p = q
+ !$omp end ordered
+ s = i * 10
+ end do
+ !$omp end distribute parallel do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do simd if(n.ne.6)default(shared)&
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) collapse (2) safelen(8) &
+ !$omp & num_threads (n + 4) proc_bind (spread) lastprivate (s) &
+ !$omp & schedule (static, 8)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute parallel do simd if (n .ne. 6)default(shared) &
+ !$omp & private (p) firstprivate (q) shared (n) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) num_threads (n + 4) &
+ !$omp & proc_bind (master) lastprivate (s) schedule (static, 8) &
+ !$omp & safelen(16) linear(i:1) aligned (pp:4)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end distribute parallel do simd
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute simd safelen(8) lastprivate(s) &
+ !$omp & private (p) firstprivate (q) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) collapse (2)
+ do i = 1, 10
+ do j = 1, 10
+ r = r + 1
+ p = q
+ a(2+i*10+j) = p + q
+ s = i * 10 + j
+ end do
+ end do
+ !$omp end target teams
+ !$omp target teams device (n + 1) if (n .ne. 6)map (from: n) &
+ !$omp & map (alloc: a(2:o)) num_teams (n + 4) thread_limit (n * 2) &
+ !$omp & default(shared) shared(n) private (p) reduction(+:r)
+ !$omp distribute simd aligned (pp:4) &
+ !$omp & private (p) firstprivate (q) reduction (+: r) &
+ !$omp & dist_schedule (static, 4) lastprivate (s)
+ do i = 1, 10
+ r = r + 1
+ p = q
+ a(1+i) = p + q
+ s = i * 10
+ end do
+ !$omp end distribute simd
+ !$omp end target teams
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/gomp/target2.f90 b/gcc/testsuite/gfortran.dg/gomp/target2.f90
new file mode 100644
index 0000000000..7521331fcb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/target2.f90
@@ -0,0 +1,74 @@
+! { dg-do compile }
+! { dg-options "-fopenmp -ffree-line-length-160" }
+
+subroutine foo (n, s, t, u, v, w)
+ integer :: n, i, s, t, u, v, w
+ common /bar/ i
+ !$omp simd safelen(s + 1)
+ do i = 1, n
+ end do
+ !$omp do schedule (static, t * 2)
+ do i = 1, n
+ end do
+ !$omp do simd safelen(s + 1) schedule (static, t * 2)
+ do i = 1, n
+ end do
+ !$omp parallel do schedule (static, t * 2) num_threads (u - 1)
+ do i = 1, n
+ end do
+ !$omp parallel do simd safelen(s + 1) schedule (static, t * 2) num_threads (u - 1)
+ do i = 1, n
+ end do
+ !$omp distribute dist_schedule (static, v + 8)
+ do i = 1, n
+ end do
+ !$omp distribute simd dist_schedule (static, v + 8) safelen(s + 1)
+ do i = 1, n
+ end do
+ !$omp distribute parallel do simd dist_schedule (static, v + 8) safelen(s + 1) &
+ !$omp & schedule (static, t * 2) num_threads (u - 1)
+ do i = 1, n
+ end do
+ !$omp distribute parallel do dist_schedule (static, v + 8) num_threads (u - 1) &
+ !$omp & schedule (static, t * 2)
+ do i = 1, n
+ end do
+ !$omp target
+ !$omp teams distribute dist_schedule (static, v + 8) num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp end target
+ !$omp target
+ !$omp teams distribute simd dist_schedule (static, v + 8) safelen(s + 1) &
+ !$omp & num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp end target
+ !$omp target
+ !$omp teams distribute parallel do simd dist_schedule (static, v + 8) safelen(s + 1) &
+ !$omp & schedule (static, t * 2) num_threads (u - 1) num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp end target
+ !$omp target
+ !$omp teams distribute parallel do dist_schedule (static, v + 8) num_threads (u - 1) &
+ !$omp & schedule (static, t * 2) num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp end target
+ !$omp target teams distribute dist_schedule (static, v + 8) num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp target teams distribute simd dist_schedule (static, v + 8) safelen(s + 1) &
+ !$omp & num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp target teams distribute parallel do simd dist_schedule (static, v + 8) safelen(s + 1) &
+ !$omp & schedule (static, t * 2) num_threads (u - 1) num_teams (w + 8)
+ do i = 1, n
+ end do
+ !$omp target teams distribute parallel do dist_schedule (static, v + 8) num_threads (u - 1) &
+ !$omp & schedule (static, t * 2) num_teams (w + 8)
+ do i = 1, n
+ end do
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/gomp/target3.f90 b/gcc/testsuite/gfortran.dg/gomp/target3.f90
new file mode 100644
index 0000000000..53a9682bf9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/target3.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! { dg-options "-fopenmp" }
+
+subroutine foo (r)
+ integer :: i, r
+ !$omp target
+ !$omp target teams distribute parallel do reduction (+: r) ! { dg-warning "target construct inside of target region" }
+ do i = 1, 10
+ r = r + 1
+ end do
+ !$omp end target
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr1.f90 b/gcc/testsuite/gfortran.dg/gomp/udr1.f90
new file mode 100644
index 0000000000..84601310c4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr1.f90
@@ -0,0 +1,41 @@
+! { dg-do compile }
+
+subroutine f1
+!$omp declare reduction (.le.:integer:omp_out = omp_out + omp_in) ! { dg-error "Invalid operator for" }
+end subroutine f1
+subroutine f2
+!$omp declare reduction (bar:real(kind=4):omp_out = omp_out + omp_in)
+ real(kind=4) :: r
+ integer :: i
+ r = 0.0
+!$omp parallel do reduction (bar:r)
+ do i = 1, 10
+ r = r + i
+ end do
+!$omp parallel do reduction (foo:r) ! { dg-error "foo not found" }
+ do i = 1, 10
+ r = r + i
+ end do
+!$omp parallel do reduction (.gt.:r) ! { dg-error "cannot be used as a defined operator" }
+ do i = 1, 10
+ r = r + i
+ end do
+end subroutine f2
+subroutine f3
+!$omp declare reduction (foo:blah:omp_out=omp_out + omp_in) ! { dg-error "Unclassifiable OpenMP directive" }
+end subroutine f3
+subroutine f4
+!$omp declare reduction (foo:integer:a => null()) ! { dg-error "Invalid character in name" }
+!$omp declare reduction (foo:integer:omp_out = omp_in + omp_out) &
+!$omp & initializer(a => null()) ! { dg-error "Invalid character in name" }
+end subroutine f4
+subroutine f5
+ integer :: a, b
+!$omp declare reduction (foo:integer:a = b + 1) ! { dg-error "Variable other than OMP_OUT or OMP_IN used in combiner" }
+!$omp declare reduction (bar:integer:omp_out = omp_out * omp_in) &
+!$omp & initializer(b = a + 1) ! { dg-error "Variable other than OMP_PRIV or OMP_ORIG used in INITIALIZER clause" }
+end subroutine f5
+subroutine f6
+!$omp declare reduction (foo:integer:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_orig=omp_priv)
+end subroutine f6
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr2.f90 b/gcc/testsuite/gfortran.dg/gomp/udr2.f90
new file mode 100644
index 0000000000..7038d1869d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr2.f90
@@ -0,0 +1,53 @@
+! { dg-do compile }
+
+subroutine f6
+!$omp declare reduction (foo:real:omp_out (omp_in)) ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction (bar:real:omp_out = omp_in * omp_out) & ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp & initializer (omp_priv (omp_orig))
+end subroutine f6
+subroutine f7
+ integer :: a
+!$omp declare reduction (foo:integer:a (omp_out, omp_in)) ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction (bar:real:omp_out = omp_out.or.omp_in) ! { dg-error "Operands of logical operator" }
+!$omp declare reduction (baz:real:omp_out = omp_out + omp_in)
+!$omp & initializer (a (omp_priv, omp_orig)) ! { dg-error "Unclassifiable OpenMP directive" }
+ real :: r
+ r = 0.0
+!$omp parallel reduction (bar:r)
+!$omp end parallel
+end subroutine f7
+subroutine f8
+ interface
+ subroutine f8a (x)
+ integer :: x
+ end subroutine f8a
+ end interface
+!$omp declare reduction (baz:integer:omp_out = omp_out + omp_in) &
+!$omp & initializer (f8a (omp_orig)) ! { dg-error "One of actual subroutine arguments in INITIALIZER clause" }
+!$omp declare reduction (foo:integer:f8a) ! { dg-error "is not a variable" }
+!$omp declare reduction (bar:integer:omp_out = omp_out - omp_in) &
+!$omp & initializer (f8a) ! { dg-error "is not a variable" }
+end subroutine f8
+subroutine f9
+ type dt ! { dg-error "which is not consistent with the CALL" }
+ integer :: x = 0
+ integer :: y = 0
+ end type dt
+ integer :: i
+!$omp declare reduction (foo:integer:dt (omp_out, omp_in)) ! { dg-error "which is not consistent with the CALL" }
+!$omp declare reduction (bar:integer:omp_out = omp_out + omp_in) &
+!$omp & initializer (dt (omp_priv, omp_orig)) ! { dg-error "which is not consistent with the CALL" }
+ i = 0
+!$omp parallel reduction (foo : i)
+!$omp end parallel
+!$omp parallel reduction (bar : i)
+!$omp end parallel
+end subroutine f9
+subroutine f10
+ integer :: a, b
+!$omp declare reduction(foo:character(len=64) &
+!$omp & :omp_out(a:b) = omp_in(a:b)) ! { dg-error "Variable other than OMP_OUT or OMP_IN used in combiner" }
+!$omp declare reduction(bar:character(len=16) &
+!$omp & :omp_out = trim(omp_out) // omp_in) &
+!$omp & initializer (omp_priv(a:b) = ' ') ! { dg-error "Variable other than OMP_PRIV or OMP_ORIG used in INITIALIZER clause" }
+end subroutine f10
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr3.f90 b/gcc/testsuite/gfortran.dg/gomp/udr3.f90
new file mode 100644
index 0000000000..a4feaddd1a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr3.f90
@@ -0,0 +1,75 @@
+! { dg-do compile }
+
+subroutine f1
+ type dt
+ logical :: l = .false.
+ end type
+ type dt2
+ logical :: l = .false.
+ end type
+!$omp declare reduction (foo:integer(kind = 4) & ! { dg-error "Previous !.OMP DECLARE REDUCTION" }
+!$omp & :omp_out = omp_out + omp_in)
+!$omp declare reduction (foo:integer(kind = 4) : & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION" }
+!$omp & omp_out = omp_out + omp_in)
+!$omp declare reduction (bar:integer, &
+!$omp & real:omp_out = omp_out + omp_in)
+!$omp declare reduction (baz:integer,real,integer & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION|Previous" }
+!$omp & : omp_out = omp_out + omp_in)
+!$omp declare reduction (id1:dt,dt2:omp_out%l=omp_out%l &
+!$omp & .or.omp_in%l)
+!$omp declare reduction (id2:dt,dt:omp_out%l=omp_out%l & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION|Previous" }
+!$omp & .or.omp_in%l)
+!$omp declare reduction (id3:dt2,dt:omp_out%l=omp_out%l & ! { dg-error "Previous !.OMP DECLARE REDUCTION" }
+!$omp & .or.omp_in%l)
+!$omp declare reduction (id3:dt2:omp_out%l=omp_out%l & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION" }
+!$omp & .or.omp_in%l)
+end subroutine f1
+subroutine f2
+ interface
+ subroutine f2a (x, y, z)
+ character (len = *) :: x, y
+ logical :: z
+ end subroutine
+ end interface
+ interface f2b
+ subroutine f2b (x, y, z)
+ character (len = *, kind = 1) :: x, y
+ logical :: z
+ end subroutine
+ subroutine f2c (x, y, z)
+ character (kind = 4, len = *) :: x, y
+ logical :: z
+ end subroutine
+ end interface
+!$omp declare reduction (foo:character(len=*): &
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (bar:character(len=:): &
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (baz:character(len=4): &
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (baz:character(len=5): &
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (baz:character(len=6): &
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (id:character(len=*): & ! { dg-error "Previous !.OMP DECLARE REDUCTION" }
+!$omp & f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (id: & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION" }
+!$omp & character(len=:) : f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction & ! { dg-error "Redefinition of !.OMP DECLARE REDUCTION|Previous" }
+!$omp (id2:character(len=*), character(len=:): &
+!$omp f2a (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2a (omp_priv, omp_orig, .true.))
+!$omp declare reduction (id3:character(len=*, kind = 1), character(kind=4, len=:): &
+!$omp f2b (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2b (omp_priv, omp_orig, .true.))
+!$omp declare reduction (id4:character(kind=4, len=4), character(kind =1, len=4): &
+!$omp f2b (omp_out, omp_in, .false.)) &
+!$omp & initializer (f2b (omp_priv, omp_orig, .true.))
+end subroutine f2
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr4.f90 b/gcc/testsuite/gfortran.dg/gomp/udr4.f90
new file mode 100644
index 0000000000..b48c1090f2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr4.f90
@@ -0,0 +1,74 @@
+! { dg-do compile }
+
+subroutine f3
+!$omp declare reduction ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction foo ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction (foo) ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction (foo:integer) ! { dg-error "Unclassifiable OpenMP directive" }
+!$omp declare reduction (foo:integer:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=0) initializer(omp_priv=0) ! { dg-error "Unexpected junk after" }
+end subroutine f3
+subroutine f4
+ implicit integer (o)
+ implicit real (b)
+!$omp declare reduction (foo:integer:omp_priv(omp_out,omp_in)) ! { dg-error "Implicitly declared subroutine omp_priv" }
+!$omp declare reduction (foo:real:bar(omp_out,omp_in)) ! { dg-error "Implicitly declared subroutine bar used" }
+!$omp declare reduction (bar:integer:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_out (omp_priv)) ! { dg-error "Implicitly declared subroutine omp_out used" }
+!$omp declare reduction (bar:real:omp_out=omp_out+omp_in) &
+!$omp & initializer(bar (omp_priv, omp_orig)) ! { dg-error "Implicitly declared subroutine bar used" }
+!$omp declare reduction (id1:integer:omp_out=omp_orig(omp_out,omp_in)) ! { dg-error "Implicitly declared function omp_orig used" }
+!$omp declare reduction (id1:real:omp_out=foo(omp_out,omp_in)) ! { dg-error "Implicitly declared function foo used" }
+!$omp declare reduction (id2:integer:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv = omp_in (omp_orig)) ! { dg-error "Implicitly declared function omp_in used" }
+!$omp declare reduction (id2:real:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv = baz (omp_orig)) ! { dg-error "Implicitly declared function baz used" }
+ integer :: i
+ real :: r
+ i = 0
+ r = 0
+!$omp parallel reduction (foo: i, r)
+!$omp end parallel
+!$omp parallel reduction (bar: i, r)
+!$omp end parallel
+!$omp parallel reduction (id1: i, r)
+!$omp end parallel
+!$omp parallel reduction (id2: i, r)
+!$omp end parallel
+end subroutine f4
+subroutine f5
+ interface
+ subroutine f5a (x, *, y)
+ double precision :: x, y
+ end subroutine f5a
+ end interface
+!$omp declare reduction (foo:double precision: & ! { dg-error "Subroutine call with alternate returns in combiner" }
+!$omp & f5a (omp_out, *10, omp_in))
+!$omp declare reduction (bar:double precision: &
+!$omp omp_out = omp_in + omp_out) &
+!$omp & initializer (f5a (omp_priv, *20, omp_orig)) ! { dg-error "Subroutine call with alternate returns in INITIALIZER clause" }
+10 continue
+20 continue
+end subroutine f5
+subroutine f6
+ integer :: a
+!$omp declare reduction(foo:character(len=a*2) & ! { dg-error "cannot appear in the expression|not constant" }
+!$omp & :omp_out=trim(omp_out)//omp_in) &
+!$omp & initializer(omp_priv=' ')
+end subroutine f6
+subroutine f7
+ type dt1
+ integer :: a = 1
+ integer :: b
+ end type
+ type dt2
+ integer :: a = 2
+ integer :: b = 3
+ end type
+ type dt3
+ integer :: a
+ integer :: b
+ end type dt3
+!$omp declare reduction(foo:dt1,dt2:omp_out%a=omp_out%a+omp_in%a)
+!$omp declare reduction(foo:dt3:omp_out%a=omp_out%a+omp_in%a) ! { dg-error "Missing INITIALIZER clause for !.OMP DECLARE REDUCTION of derived type without default initializer" }
+end subroutine f7
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr5.f90 b/gcc/testsuite/gfortran.dg/gomp/udr5.f90
new file mode 100644
index 0000000000..aebeee3a24
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr5.f90
@@ -0,0 +1,59 @@
+! { dg-do compile }
+
+module udr5m1
+ type dt
+ real :: r
+ end type dt
+end module udr5m1
+module udr5m2
+ use udr5m1
+ interface operator(+)
+ module procedure addm2
+ end interface
+!$omp declare reduction(+:dt:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+!$omp declare reduction(.myadd.:dt:omp_out=omp_out.myadd.omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+ interface operator(.myadd.)
+ module procedure addm2
+ end interface
+contains
+ type(dt) function addm2 (x, y)
+ type(dt), intent (in):: x, y
+ addm2%r = x%r + y%r
+ end function
+end module udr5m2
+module udr5m3
+ use udr5m1
+ interface operator(.myadd.)
+ module procedure addm3
+ end interface
+!$omp declare reduction(+:dt:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+!$omp declare reduction(.myadd.:dt:omp_out=omp_out.myadd.omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+ interface operator(+)
+ module procedure addm3
+ end interface
+contains
+ type(dt) function addm3 (x, y)
+ type(dt), intent (in):: x, y
+ addm3%r = x%r + y%r
+ end function
+end module udr5m3
+subroutine f1
+ use udr5m2
+ type(dt) :: d, e
+ integer :: i
+ d=dt(0.0)
+ e = dt (0.0)
+!$omp parallel do reduction (+ : d) reduction ( .myadd. : e)
+ do i=1,100
+ d=d+dt(i)
+ e=e+dt(i)
+ end do
+end subroutine f1
+subroutine f2
+ use udr5m3 ! { dg-error "Previous !.OMP DECLARE REDUCTION|Ambiguous interfaces" }
+ use udr5m2 ! { dg-error "Ambiguous !.OMP DECLARE REDUCTION" }
+end subroutine f2
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr6.f90 b/gcc/testsuite/gfortran.dg/gomp/udr6.f90
new file mode 100644
index 0000000000..92fc5bb1be
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr6.f90
@@ -0,0 +1,205 @@
+! { dg-do compile }
+! { dg-options "-fmax-errors=1000 -fopenmp -ffree-line-length-160" }
+
+module udr6
+ type dt
+ integer :: i
+ end type
+end module udr6
+subroutine f1
+ use udr6, only : dt
+!$omp declare reduction (+:integer:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (+:real(kind=4):omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (+:double precision:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (+:integer(kind=8),integer(kind=1) & ! { dg-error "Redefinition of predefined" }
+!$omp & :omp_out = omp_out + omp_in)
+!$omp declare reduction (+:complex:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (+:complex(kind=8):omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(+)
+ function addf1 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: addf1
+ end function
+ end interface
+end subroutine f1
+subroutine f2
+ use udr6, only : dt
+ interface operator(-)
+ function subf2 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: subf2
+ end function
+ end interface
+!$omp declare reduction (-:integer:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (-:real(kind=4):omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (-:double precision:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (-:integer(kind=8),integer(kind=1) & ! { dg-error "Redefinition of predefined" }
+!$omp & :omp_out = omp_out + omp_in)
+!$omp declare reduction (-:complex:omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (-:complex(kind=8):omp_out = omp_out + omp_in) ! { dg-error "Redefinition of predefined" }
+end subroutine f2
+subroutine f3
+ use udr6, only : dt
+ interface operator(*)
+ function mulf3 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: mulf3
+ end function
+ end interface
+!$omp declare reduction (*:integer:omp_out = omp_out * omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (*:real(kind=4):omp_out = omp_out * omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (*:double precision:omp_out = omp_out * omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (*:integer(kind=8),integer(kind=1) & ! { dg-error "Redefinition of predefined" }
+!$omp & :omp_out = omp_out * omp_in)
+!$omp declare reduction (*:complex:omp_out = omp_out * omp_in) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (*:complex(kind=8):omp_out = omp_out * omp_in) ! { dg-error "Redefinition of predefined" }
+end subroutine f3
+subroutine f4
+ use udr6, only : dt
+ interface operator(.and.)
+ function andf4 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: andf4
+ end function
+ end interface
+!$omp declare reduction (.neqv.:logical:omp_out = omp_out .or. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.or.)
+ function orf4 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: orf4
+ end function
+ end interface
+!$omp declare reduction (.eqv.:logical:omp_out = omp_out .or. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.eqv.)
+ function eqvf4 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: eqvf4
+ end function
+ end interface
+!$omp declare reduction (.or.:logical:omp_out = omp_out .or. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.neqv.)
+ function neqvf4 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: neqvf4
+ end function
+ end interface
+!$omp declare reduction (.and.:logical:omp_out = omp_out .and. omp_in) ! { dg-error "Redefinition of predefined" }
+end subroutine f4
+subroutine f5
+ use udr6, only : dt
+ interface operator(.and.)
+ function andf5 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: andf5
+ end function
+ end interface
+!$omp declare reduction (.neqv.:logical(kind =4):omp_out = omp_out .neqv. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.or.)
+ function orf5 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: orf5
+ end function
+ end interface
+!$omp declare reduction (.eqv.:logical(kind= 4):omp_out = omp_out .eqv. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.eqv.)
+ function eqvf5 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: eqvf5
+ end function
+ end interface
+!$omp declare reduction (.or.:logical(kind=4):omp_out = omp_out .or. omp_in) ! { dg-error "Redefinition of predefined" }
+ interface operator(.neqv.)
+ function neqvf5 (x, y)
+ use udr6, only : dt
+ type(dt), intent (in) :: x, y
+ type(dt) :: neqvf5
+ end function
+ end interface
+!$omp declare reduction (.and.:logical(kind = 4):omp_out = omp_out .and. omp_in) ! { dg-error "Redefinition of predefined" }
+end subroutine f5
+subroutine f6
+!$omp declare reduction (min:integer:omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:integer:omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (iand:integer:omp_out = iand (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (ior:integer:omp_out = ior (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (ieor:integer:omp_out = ieor (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (min:real:omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:real:omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (min:double precision:omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:double precision:omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+end subroutine f6
+subroutine f7
+!$omp declare reduction (min:integer(kind=2):omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:integer(kind=4):omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (iand:integer(kind=1):omp_out = iand (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (ior:integer(kind=8):omp_out = ior (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (ieor:integer(kind=4):omp_out = ieor (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (min:real(kind=4):omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:real(kind=4):omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (min:double precision:omp_out = min (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+!$omp declare reduction (max:double precision:omp_out = max (omp_out, omp_in)) ! { dg-error "Redefinition of predefined" }
+end subroutine f7
+subroutine f8
+ integer :: min
+!$omp declare reduction (min:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (min:real:omp_out = omp_out + omp_in)
+!$omp declare reduction (min:double precision:omp_out = omp_out + omp_in)
+end subroutine f8
+subroutine f9
+ integer :: max
+!$omp declare reduction (max:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (max:real:omp_out = omp_out + omp_in)
+!$omp declare reduction (max:double precision:omp_out = omp_out + omp_in)
+end subroutine f9
+subroutine f10
+ integer :: iand
+!$omp declare reduction (iand:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (iand:real:omp_out = omp_out + omp_in)
+end subroutine f10
+subroutine f11
+ integer :: ior
+!$omp declare reduction (ior:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (ior:real:omp_out = omp_out + omp_in)
+end subroutine f11
+subroutine f12
+ integer :: ieor
+!$omp declare reduction (ieor:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (ieor:real:omp_out = omp_out + omp_in)
+end subroutine f12
+subroutine f13
+!$omp declare reduction (min:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (min:real:omp_out = omp_out + omp_in)
+!$omp declare reduction (min:double precision:omp_out = omp_out + omp_in)
+ integer :: min
+end subroutine f13
+subroutine f14
+!$omp declare reduction (max:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (max:real:omp_out = omp_out + omp_in)
+!$omp declare reduction (max:double precision:omp_out = omp_out + omp_in)
+ integer :: max
+end subroutine f14
+subroutine f15
+!$omp declare reduction (iand:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (iand:real:omp_out = omp_out + omp_in)
+ integer :: iand
+end subroutine f15
+subroutine f16
+!$omp declare reduction (ior:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (ior:real:omp_out = omp_out + omp_in)
+ integer :: ior
+end subroutine f16
+subroutine f17
+!$omp declare reduction (ieor:integer:omp_out = omp_out + omp_in)
+!$omp declare reduction (ieor:real:omp_out = omp_out + omp_in)
+ integer :: ieor
+end subroutine f17
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr7.f90 b/gcc/testsuite/gfortran.dg/gomp/udr7.f90
new file mode 100644
index 0000000000..230a3fc44d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr7.f90
@@ -0,0 +1,90 @@
+! { dg-do compile }
+
+module udr7m1
+ type dt
+ real :: r
+ end type dt
+end module udr7m1
+module udr7m2
+ use udr7m1
+ interface operator(+)
+ module procedure addm2
+ end interface
+!$omp declare reduction(+:dt:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+!$omp declare reduction(.myadd.:dt:omp_out=omp_out.myadd.omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+ interface operator(.myadd.)
+ module procedure addm2
+ end interface
+ private
+ public :: operator(+), operator(.myadd.), dt
+contains
+ type(dt) function addm2 (x, y)
+ type(dt), intent (in):: x, y
+ addm2%r = x%r + y%r
+ end function
+end module udr7m2
+module udr7m3
+ use udr7m1
+ private
+ public :: operator(.myadd.), operator(+), dt
+ interface operator(.myadd.)
+ module procedure addm3
+ end interface
+!$omp declare reduction(+:dt:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+!$omp declare reduction(.myadd.:dt:omp_out=omp_out.myadd.omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+ interface operator(+)
+ module procedure addm3
+ end interface
+contains
+ type(dt) function addm3 (x, y)
+ type(dt), intent (in):: x, y
+ addm3%r = x%r + y%r
+ end function
+end module udr7m3
+module udr7m4
+ use udr7m1
+ private
+ interface operator(.myadd.)
+ module procedure addm4
+ end interface
+!$omp declare reduction(+:dt:omp_out=omp_out+omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+!$omp declare reduction(.myadd.:dt:omp_out=omp_out.myadd.omp_in) &
+!$omp & initializer(omp_priv=dt(0.0))
+ interface operator(+)
+ module procedure addm4
+ end interface
+contains
+ type(dt) function addm4 (x, y)
+ type(dt), intent (in):: x, y
+ addm4%r = x%r + y%r
+ end function
+end module udr7m4
+subroutine f1
+ use udr7m2
+ type(dt) :: d, e
+ integer :: i
+ d=dt(0.0)
+ e = dt (0.0)
+!$omp parallel do reduction (+ : d) reduction ( .myadd. : e)
+ do i=1,100
+ d=d+dt(i)
+ e=e+dt(i)
+ end do
+end subroutine f1
+subroutine f2
+ use udr7m3 ! { dg-error "Previous !.OMP DECLARE REDUCTION|Ambiguous interfaces" }
+ use udr7m2 ! { dg-error "Ambiguous !.OMP DECLARE REDUCTION" }
+end subroutine f2
+subroutine f3
+ use udr7m4
+ use udr7m2
+end subroutine f3
+subroutine f4
+ use udr7m3
+ use udr7m4
+end subroutine f4
diff --git a/gcc/testsuite/gfortran.dg/gomp/udr8.f90 b/gcc/testsuite/gfortran.dg/gomp/udr8.f90
new file mode 100644
index 0000000000..e040b3d1e8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/gomp/udr8.f90
@@ -0,0 +1,351 @@
+! { dg-do compile }
+! { dg-options "-fmax-errors=1000 -fopenmp" }
+
+module m
+contains
+ function fn1 (x, y)
+ integer, intent(in) :: x, y
+ integer :: fn1
+ fn1 = x + 2 * y
+ end function
+ subroutine sub1 (x, y)
+ integer, intent(in) :: y
+ integer, intent(out) :: x
+ x = y
+ end subroutine
+ function fn2 (x)
+ integer, intent(in) :: x
+ integer :: fn2
+ fn2 = x
+ end function
+ subroutine sub2 (x, y)
+ integer, intent(in) :: y
+ integer, intent(inout) :: x
+ x = x + y
+ end subroutine
+ function fn3 (x, y)
+ integer, intent(in) :: x(:), y(:)
+ integer :: fn3(lbound(x, 1):ubound(x, 1))
+ fn3 = x + 2 * y
+ end function
+ subroutine sub3 (x, y)
+ integer, intent(in) :: y(:)
+ integer, intent(out) :: x(:)
+ x = y
+ end subroutine
+ function fn4 (x)
+ integer, intent(in) :: x(:)
+ integer :: fn4(lbound(x, 1):ubound(x, 1))
+ fn4 = x
+ end function
+ subroutine sub4 (x, y)
+ integer, intent(in) :: y(:)
+ integer, intent(inout) :: x(:)
+ x = x + y
+ end subroutine
+ function fn5 (x, y)
+ integer, intent(in) :: x(10), y(10)
+ integer :: fn5(10)
+ fn5 = x + 2 * y
+ end function
+ subroutine sub5 (x, y)
+ integer, intent(in) :: y(10)
+ integer, intent(out) :: x(10)
+ x = y
+ end subroutine
+ function fn6 (x)
+ integer, intent(in) :: x(10)
+ integer :: fn6(10)
+ fn6 = x
+ end function
+ subroutine sub6 (x, y)
+ integer, intent(in) :: y(10)
+ integer, intent(inout) :: x(10)
+ x = x + y
+ end subroutine
+ function fn7 (x, y)
+ integer, allocatable, intent(in) :: x(:), y(:)
+ integer, allocatable :: fn7(:)
+ fn7 = x + 2 * y
+ end function
+ subroutine sub7 (x, y)
+ integer, allocatable, intent(in) :: y(:)
+ integer, allocatable, intent(out) :: x(:)
+ x = y
+ end subroutine
+ function fn8 (x)
+ integer, allocatable, intent(in) :: x(:)
+ integer, allocatable :: fn8(:)
+ fn8 = x
+ end function
+ subroutine sub8 (x, y)
+ integer, allocatable, intent(in) :: y(:)
+ integer, allocatable, intent(inout) :: x(:)
+ x = x + y
+ end subroutine
+end module
+subroutine test1
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn1 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp & initializer (sub1 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp declare reduction (baz : integer : sub2 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp initializer (omp_priv = fn2 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+ integer :: a(10)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test1
+subroutine test2
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn1 (omp_out, omp_in)) &
+!$omp & initializer (sub1 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub2 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn2 (omp_orig))
+ integer :: a
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test2
+subroutine test3
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn1 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp & initializer (sub1 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp declare reduction (baz : integer : sub2 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+!$omp initializer (omp_priv = fn2 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*scalar and rank-1" }
+ integer, allocatable :: a(:)
+ allocate (a(10))
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test3
+subroutine test4
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn1 (omp_out, omp_in)) &
+!$omp & initializer (sub1 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub2 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn2 (omp_orig))
+ integer, allocatable :: a
+ allocate (a)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test4
+subroutine test5
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn3 (omp_out, omp_in)) &
+!$omp & initializer (sub3 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub4 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn4 (omp_orig))
+ integer :: a(10)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test5
+subroutine test6
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn3 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub3 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub4 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn4 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer :: a
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test6
+subroutine test7
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn3 (omp_out, omp_in)) &
+!$omp & initializer (sub3 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub4 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn4 (omp_orig))
+ integer, allocatable :: a(:)
+ allocate (a(10))
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test7
+subroutine test8
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn3 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub3 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub4 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn4 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer, allocatable :: a
+ allocate (a)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test8
+subroutine test9
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn5 (omp_out, omp_in)) &
+!$omp & initializer (sub5 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub6 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn6 (omp_orig))
+ integer :: a(10)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test9
+subroutine test10
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn5 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub5 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub6 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn6 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer :: a
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test10
+subroutine test11
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn5 (omp_out, omp_in)) &
+!$omp & initializer (sub5 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub6 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn6 (omp_orig))
+ integer, allocatable :: a(:)
+ allocate (a(10))
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test11
+subroutine test12
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn5 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub5 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub6 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn6 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer, allocatable :: a
+ allocate (a)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test12
+subroutine test13
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = & ! { dg-error "Different shape for array assignment at \[^\n\r]* on dimension 1 .9 and 10" }
+!$omp & fn5 (omp_out, omp_in)) & ! { dg-warning "Actual argument contains too few elements for dummy argument \[^\n\r]* .9/10" }
+!$omp & initializer (sub5 (omp_priv, omp_orig)) ! { dg-warning "Actual argument contains too few elements for dummy argument \[^\n\r]* .9/10" }
+!$omp declare reduction (baz : integer : sub6 (omp_out, omp_in)) & ! { dg-warning "Actual argument contains too few elements for dummy argument \[^\n\r]* .9/10" }
+!$omp initializer (omp_priv = & ! { dg-error "Different shape for array assignment at \[^\n\r]* on dimension 1 .9 and 10" }
+!$omp & fn6 (omp_orig)) ! { dg-warning "Actual argument contains too few elements for dummy argument \[^\n\r]* .9/10" }
+ integer :: a(9)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test13
+subroutine test14
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn7 (omp_out, omp_in)) & ! { dg-error "Actual argument for \[^\n\r]* must be ALLOCATABLE" }
+!$omp & initializer (sub7 (omp_priv, omp_orig)) ! { dg-error "Actual argument for \[^\n\r]* must be ALLOCATABLE" }
+!$omp declare reduction (baz : integer : sub8 (omp_out, omp_in)) & ! { dg-error "Actual argument for \[^\n\r]* must be ALLOCATABLE" }
+!$omp initializer (omp_priv = fn8 (omp_orig)) ! { dg-error "Actual argument for \[^\n\r]* must be ALLOCATABLE" }
+ integer :: a(10)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test14
+subroutine test15
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn7 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub7 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub8 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn8 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer :: a
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test15
+subroutine test16
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn7 (omp_out, omp_in)) &
+!$omp & initializer (sub7 (omp_priv, omp_orig))
+!$omp declare reduction (baz : integer : sub8 (omp_out, omp_in)) &
+!$omp initializer (omp_priv = fn8 (omp_orig))
+ integer, allocatable :: a(:)
+ allocate (a(10))
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test16
+subroutine test17
+ use m
+!$omp declare reduction (foo : integer : omp_out = omp_out + omp_in) initializer (omp_priv = 0)
+!$omp declare reduction (bar : integer : omp_out = fn7 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+!$omp & initializer (sub7 (omp_priv, omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp declare reduction (baz : integer : sub8 (omp_out, omp_in)) & ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar" }
+!$omp initializer (omp_priv = fn8 (omp_orig)) ! { dg-error "Rank mismatch in argument\[^\n\r]*rank-1 and scalar|Incompatible ranks 0 and 1 in assignment" }
+ integer, allocatable :: a
+ allocate (a)
+!$omp parallel reduction (foo : a)
+!$omp end parallel
+!$omp parallel reduction (bar : a)
+!$omp end parallel
+!$omp parallel reduction (baz : a)
+!$omp end parallel
+end subroutine test17
diff --git a/gcc/testsuite/gfortran.dg/graphite/graphite.exp b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
index 73c2aeed42..c3aad13b76 100644
--- a/gcc/testsuite/gfortran.dg/graphite/graphite.exp
+++ b/gcc/testsuite/gfortran.dg/graphite/graphite.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-18.f90 b/gcc/testsuite/gfortran.dg/graphite/id-18.f90
index ed78067365..273e670fce 100644
--- a/gcc/testsuite/gfortran.dg/graphite/id-18.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/id-18.f90
@@ -23,4 +23,3 @@ CONTAINS
END SELECT
END FUNCTION dlegendre
END MODULE spherical_harmonics
-! { dg-final { cleanup-modules "spherical_harmonics" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-2.f90 b/gcc/testsuite/gfortran.dg/graphite/id-2.f90
index 2f9f9dbec3..720fff8dd0 100644
--- a/gcc/testsuite/gfortran.dg/graphite/id-2.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/id-2.f90
@@ -11,4 +11,3 @@ contains
subroutine fourir(A,ntot,kconjg, E,useold)
end subroutine fourir
end module solv_cap
-! { dg-final { cleanup-modules "solv_cap" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-21.f b/gcc/testsuite/gfortran.dg/graphite/id-21.f
index e75193411f..4fa047ed6f 100644
--- a/gcc/testsuite/gfortran.dg/graphite/id-21.f
+++ b/gcc/testsuite/gfortran.dg/graphite/id-21.f
@@ -18,5 +18,3 @@
END DO
ENDDO
END
-
-! { dg-final { cleanup-modules "les3d_data" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/id-4.f90 b/gcc/testsuite/gfortran.dg/graphite/id-4.f90
index 83899445de..b2c6cb04ed 100644
--- a/gcc/testsuite/gfortran.dg/graphite/id-4.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/id-4.f90
@@ -30,4 +30,3 @@ CONTAINS
END IF
END SUBROUTINE QSORT
END SUBROUTINE READIN
-! { dg-final { cleanup-modules "vimage vcimage" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr37980.f90 b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90
index e964adec1b..62eccf35ff 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr37980.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr37980.f90
@@ -9,4 +9,3 @@ contains
mat0 = 0.0d0
end function spher_cartesians
end module INT_MODULE
-! { dg-final { cleanup-modules "int_module" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr38953.f90 b/gcc/testsuite/gfortran.dg/graphite/pr38953.f90
index 391549e3cd..73224764f1 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr38953.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr38953.f90
@@ -113,4 +113,3 @@
ENDIF
999 CONTINUE
END
-! { dg-final { cleanup-modules "main1" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr40982.f90 b/gcc/testsuite/gfortran.dg/graphite/pr40982.f90
index c49def850b..b9641aef03 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr40982.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr40982.f90
@@ -67,5 +67,3 @@ contains
end subroutine mutual_ind_quad_cir_coil
end module mqc_m
-! { dg-final { cleanup-modules "mqc_m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr41924.f90 b/gcc/testsuite/gfortran.dg/graphite/pr41924.f90
index 2f248d0b89..f8dc8078e5 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr41924.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr41924.f90
@@ -13,4 +13,3 @@ SUBROUTINE VOLCALC()
IF ( WETSCIM ) HRVALD(ITYP) = 0.0
ENDDO
END SUBROUTINE VOLCALC
-! { dg-final { cleanup-modules "main1" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42050.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42050.f90
index e019917414..09cab6f0f1 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42050.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42050.f90
@@ -23,4 +23,3 @@ CONTAINS
CALL test()
END SUBROUTINE sic_explicit_orbitals
END MODULE qs_ks_methods
-! { dg-final { cleanup-modules "qs_ks_methods" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42180.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42180.f90
index bb5bc0c58d..523c479e21 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42180.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42180.f90
@@ -20,4 +20,3 @@ contains
l12 = coefficient * l12
end subroutine mutual_ind_cir_cir_coils
end module mcc_m
-! { dg-final { cleanup-modules "mcc_m" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42181.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42181.f90
index 06ce47d9e7..dafb63fdc8 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42181.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42181.f90
@@ -17,4 +17,3 @@ CONTAINS
END IF
END SUBROUTINE newuob
END MODULE powell
-! { dg-final { cleanup-modules "powell" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42185.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42185.f90
index 6fa6e30367..5002521ac4 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42185.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42185.f90
@@ -25,4 +25,3 @@ CONTAINS
END DO mainloop
END SUBROUTINE trsapp
END MODULE powell
-! { dg-final { cleanup-modules "powell" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42186.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42186.f90
index 0e3669bf5e..9e488f4f18 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42186.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42186.f90
@@ -12,4 +12,3 @@ CONTAINS
END IF
END SUBROUTINE CALERF
END MODULE erf_fn
-! { dg-final { cleanup-modules "erf_fn" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90
index 45c635b761..fb62e20f45 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42393-1.f90
@@ -22,4 +22,3 @@ CONTAINS
fn_val = sum
END FUNCTION basym
END MODULE beta_gamma_psi
-! { dg-final { cleanup-modules "beta_gamma_psi" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr42393.f90 b/gcc/testsuite/gfortran.dg/graphite/pr42393.f90
index da9a348dd4..1fc708ef96 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr42393.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr42393.f90
@@ -28,4 +28,3 @@ CONTAINS
fn_val = e0*t*u*sum
END FUNCTION basym
END MODULE beta_gamma_psi
-! { dg-final { cleanup-modules "beta_gamma_psi" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr45758.f90 b/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
index d6a197397e..90baa4ccee 100644
--- a/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
+++ b/gcc/testsuite/gfortran.dg/graphite/pr45758.f90
@@ -38,4 +38,3 @@ CONTAINS
ENDDO
END SUBROUTINE create_destination_list
END MODULE
-! { dg-final { cleanup-modules "util" } }
diff --git a/gcc/testsuite/gfortran.dg/graphite/pr59817.f b/gcc/testsuite/gfortran.dg/graphite/pr59817.f
new file mode 100644
index 0000000000..a9ee8f19dd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/graphite/pr59817.f
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-O2 -floop-interchange" }
+ SUBROUTINE PREPD(ICAST,ICAS,ICASX,ICAS1,ICAS2,NDET,NM,III,IMP,
+ * CASMIN)
+ LOGICAL CASMIN
+ DIMENSION ICAST(NDET,NM),IMP(NM)
+ IF(CASMIN) THEN
+ DO K=1,NDET
+ DO L=1,NM
+ IF(L.EQ.K-1) ICAST(K,L) = 1
+ END DO
+ END DO
+ END IF
+ END SUBROUTINE
diff --git a/gcc/testsuite/gfortran.dg/guality/guality.exp b/gcc/testsuite/gfortran.dg/guality/guality.exp
index 8bb19a54b1..b3f64fbed7 100644
--- a/gcc/testsuite/gfortran.dg/guality/guality.exp
+++ b/gcc/testsuite/gfortran.dg/guality/guality.exp
@@ -4,11 +4,15 @@ load_lib gfortran-dg.exp
load_lib gcc-gdb-test.exp
# Disable on darwin until radr://7264615 is resolved.
-# Disable on Tru64 UNIX (PR testsuite/48251).
-if { [istarget *-*-darwin*] || [istarget alpha*-dec-osf*] } {
+if { [istarget *-*-darwin*] } {
return
}
+if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+}
+
dg-init
global GDB
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f90
index 07f9ed478b..7f24fecb0e 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_blockdata_1.f90
@@ -9,4 +9,3 @@ END module globals
BLOCK DATA
use globals
END BLOCK DATA
-! { dg-final { cleanup-modules "globals" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90 b/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90
index 40e3ac4d5d..3cb4abaedd 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_blockdata_2.f90
@@ -15,4 +15,3 @@ program main
use globals
common /co/ pdm_bps ! { dg-error "already in a COMMON block" }
end program main
-! { dg-final { cleanup-modules "globals" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90
index 804929080a..df9951efe4 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_1.f90
@@ -14,4 +14,3 @@ CONTAINS
END SUBROUTINE sub2
END SUBROUTINE sub1
END MODULE ksbin2_aux_mod
-! { dg-final { cleanup-modules "ksbin2_aux_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
index 1175c46b31..7a6b64df9c 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_2.f90
@@ -15,4 +15,3 @@ contains
call InitialDiatomicX () ! { dg-error "which is not consistent with the CALL" }
end subroutine FindDiatomicPeriod
end module Diatoms
-! { dg-final { cleanup-modules "diatoms" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_3.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_3.f90
index 28c55bfa56..49dff0c5f6 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_3.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_3.f90
@@ -52,4 +52,3 @@ END MODULE
CALL S3
call S4
END
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_4.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_4.f90
index 50e1e3fce7..e5c8bde801 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_4.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_4.f90
@@ -45,4 +45,3 @@ contains
call GetBasicElementData (TargetElement, ProcedureName, ErrorNumber, ErrorLevel, ErrorMessage, CallingStat)
end subroutine WH_ERR
end module ErrorMod
-! { dg-final { cleanup-modules "errelmnt errormod" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_5.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_5.f90
index 6ce57ce019..a788be1926 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_5.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_5.f90
@@ -18,4 +18,3 @@ contains
subroutine other_sub ()
end subroutine other_sub
end module foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90 b/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
index 60a5edc53c..da5cb374e9 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_call_6.f90
@@ -22,4 +22,3 @@ END MODULE
USE m
CALL g()
END
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_1.f90
index f80f97a27a..dffaa93333 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_1.f90
@@ -40,4 +40,3 @@ END MODULE
use m
call s()
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_2.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_2.f90
index 5d63d7aa37..f2a37b6869 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_2.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_2.f90
@@ -45,4 +45,3 @@ contains
end subroutine foo
end module gfcbug64_mod2
-! { dg-final { cleanup-modules "gfcbug64_mod1 gfcbug64_mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_3.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_3.f90
index a83fa1738a..cebe646fa5 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_3.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_3.f90
@@ -24,4 +24,3 @@ END MODULE m
use m
call s
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_4.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_4.f90
index 73ad21af91..46fb5f8006 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_4.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_4.f90
@@ -27,4 +27,3 @@ END MODULE
USE M2
CALL S2
END
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_5.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_5.f90
index c75202e445..4c5d17178a 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_5.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_5.f90
@@ -44,4 +44,3 @@ contains
mons(1) = p1%mons(1)*p2%mons(2)
end function
end module
-! { dg-final { cleanup-modules "mod_symmon mod_sympoly" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_6.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_6.f90
index 28cd7c8369..5f4748f505 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_6.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_6.f90
@@ -31,5 +31,3 @@ contains
mu = a_fun(x)
end function fun
end module mod_b
-
-! { dg-final { cleanup-modules "mod_a mod_b" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_7.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_7.f90
index 15684438a9..df240a9f98 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_7.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_7.f90
@@ -37,5 +37,3 @@ end module sa0054_stuff
call SA0054 (RDA)
IF (ANY (INT (RDA) .ne. [(6 * I, I = 1, 10)])) print *, rda
END
-
-! { dg-final { cleanup-modules "sa0054_stuff" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_function_9.f90 b/gcc/testsuite/gfortran.dg/host_assoc_function_9.f90
index 58cae435fb..1bdd6e842a 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_function_9.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_function_9.f90
@@ -29,5 +29,3 @@ END MODULE
use m
call s
end
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_types_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_types_1.f90
index 53c968410e..4a2377df01 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_types_1.f90
@@ -15,4 +15,3 @@ CONTAINS
ENDDO vertex
END SUBROUTINE
END MODULE test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_types_2.f90 b/gcc/testsuite/gfortran.dg/host_assoc_types_2.f90
index 824a495921..a3fd345001 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_types_2.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_types_2.f90
@@ -66,4 +66,3 @@ contains
call overloaded_sub(dval)
end subroutine
end program
-! { dg-final { cleanup-modules "stype dtype" } }
diff --git a/gcc/testsuite/gfortran.dg/host_assoc_variable_1.f90 b/gcc/testsuite/gfortran.dg/host_assoc_variable_1.f90
index 1e7adea889..57231157c1 100644
--- a/gcc/testsuite/gfortran.dg/host_assoc_variable_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_assoc_variable_1.f90
@@ -74,4 +74,3 @@ program testit
print *, "in the main:", k
call write(33)
end program testit
-! { dg-final { cleanup-modules "gfcbug68 gfcbug68a m n" } }
diff --git a/gcc/testsuite/gfortran.dg/host_used_types_1.f90 b/gcc/testsuite/gfortran.dg/host_used_types_1.f90
index 2076fdb891..0dfd9d1ecd 100644
--- a/gcc/testsuite/gfortran.dg/host_used_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/host_used_types_1.f90
@@ -38,5 +38,3 @@ contains
end subroutine SetTimeSteps
end module ThermoData
-
-! { dg-final { cleanup-modules "modelparams thermodata" } }
diff --git a/gcc/testsuite/gfortran.dg/ichar_3.f90 b/gcc/testsuite/gfortran.dg/ichar_3.f90
new file mode 100644
index 0000000000..d0f5c8b8cf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ichar_3.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+!
+! PR fortran/59599
+! The call to ichar was triggering an ICE.
+!
+! Original testcase from Fran Martinez Fadrique <fmartinez@gmv.com>
+
+character(1) cpk(2)
+integer res(2)
+cpk = 'a'
+res = ichar( cpk, kind=1 )
+print *, ichar( cpk, kind=1 )
+end
diff --git a/gcc/testsuite/gfortran.dg/implicit_1.f90 b/gcc/testsuite/gfortran.dg/implicit_1.f90
index 21e9d214e3..610c473dd8 100644
--- a/gcc/testsuite/gfortran.dg/implicit_1.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_1.f90
@@ -8,5 +8,3 @@ end module AHFinder_dat
implicit none
common/rommel/aaa ! { dg-error "no IMPLICIT type" "no IMPLICIT type" }
end
-
-! { dg-final { cleanup-modules "ahfinder_dat" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_10.f90 b/gcc/testsuite/gfortran.dg/implicit_10.f90
index 0f5094f420..4bb1493917 100644
--- a/gcc/testsuite/gfortran.dg/implicit_10.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_10.f90
@@ -30,4 +30,3 @@
call sub(di(i),i)
if (i.NE.4) call abort()
end
-! { dg-final { cleanup-modules "mod1" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_11.f90 b/gcc/testsuite/gfortran.dg/implicit_11.f90
index be4ad6ca8c..61091ec41a 100644
--- a/gcc/testsuite/gfortran.dg/implicit_11.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_11.f90
@@ -34,5 +34,3 @@
ALLOCATE (RLA1(NF10), STAT = ISTAT2) ! { dg-error "is not a variable" }
END SUBROUTINE
END MODULE tests2
-
-! { dg-final { cleanup-modules "tests" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_12.f90 b/gcc/testsuite/gfortran.dg/implicit_12.f90
index 3b47352d6c..161d440266 100644
--- a/gcc/testsuite/gfortran.dg/implicit_12.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_12.f90
@@ -21,5 +21,3 @@ program startest
if('#'//Q2//'#' /='#abcdefghijkl#') call abort()
call sub('ABCDEFGHIJKLM') ! len=13
end program startest
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_2.f90 b/gcc/testsuite/gfortran.dg/implicit_2.f90
index 4bff178400..c0582d703b 100644
--- a/gcc/testsuite/gfortran.dg/implicit_2.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_2.f90
@@ -46,5 +46,3 @@ subroutine bar()
v%i = 42
end subroutine
end module
-
-! { dg-final { cleanup-modules "implicit_2" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_actual.f90 b/gcc/testsuite/gfortran.dg/implicit_actual.f90
index 750d3f3850..108c040796 100644
--- a/gcc/testsuite/gfortran.dg/implicit_actual.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_actual.f90
@@ -31,5 +31,3 @@ contains
end subroutine foo
end program snafu
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_class_1.f90 b/gcc/testsuite/gfortran.dg/implicit_class_1.f90
new file mode 100644
index 0000000000..329f57aaa1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/implicit_class_1.f90
@@ -0,0 +1,35 @@
+! { dg-do run }
+!
+! PR 56500: [OOP] "IMPLICIT CLASS(...)" wrongly rejected
+!
+! Contributed by Reinhold Bader <Reinhold.Bader@lrz.de>
+
+program upimp
+ implicit class(foo) (a-b)
+ implicit class(*) (c)
+ type :: foo
+ integer :: i
+ end type
+ allocatable :: aaf, caf
+
+ allocate(aaf, source=foo(2))
+ select type (aaf)
+ type is (foo)
+ if (aaf%i /= 2) call abort
+ class default
+ call abort
+ end select
+
+ allocate(caf, source=foo(3))
+ select type (caf)
+ type is (foo)
+ if (caf%i /= 3) call abort
+ class default
+ call abort
+ end select
+
+contains
+ subroutine gloo(x)
+ implicit class(*) (a-z)
+ end
+end program
diff --git a/gcc/testsuite/gfortran.dg/implicit_derived_type_1.f90 b/gcc/testsuite/gfortran.dg/implicit_derived_type_1.f90
index 661eb83a58..baa36d1ba3 100644
--- a/gcc/testsuite/gfortran.dg/implicit_derived_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_derived_type_1.f90
@@ -18,5 +18,3 @@ contains
print *, x(1)%i
end subroutine s
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_1.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_1.f90
index d4a5a364e5..f49b9ae193 100644
--- a/gcc/testsuite/gfortran.dg/implicit_pure_1.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_pure_1.f90
@@ -50,4 +50,3 @@ program gfcbug114a
end program gfcbug114a
! { dg-final { scan-module "b" "IMPLICIT_PURE" } }
-! { dg-final { cleanup-modules "b" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_2.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
index 496e856e04..16fa64f39e 100644
--- a/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
+++ b/gcc/testsuite/gfortran.dg/implicit_pure_2.f90
@@ -14,4 +14,3 @@ contains
end module m
! { dg-final { scan-module-absence "m" "IMPLICIT_PURE" } }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/implicit_pure_4.f90 b/gcc/testsuite/gfortran.dg/implicit_pure_4.f90
new file mode 100644
index 0000000000..8563dd7210
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/implicit_pure_4.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR fortran/60543
+! PR fortran/60283
+!
+module m
+contains
+ REAL(8) FUNCTION random()
+ CALL RANDOM_NUMBER(random)
+ END FUNCTION random
+ REAL(8) FUNCTION random2()
+ block
+ block
+ block
+ CALL RANDOM_NUMBER(random2)
+ end block
+ end block
+ end block
+ END FUNCTION random2
+end module m
+
+! { dg-final { scan-module-absence "m" "IMPLICIT_PURE" } }
diff --git a/gcc/testsuite/gfortran.dg/import.f90 b/gcc/testsuite/gfortran.dg/import.f90
index 521f87222b..1934a2c49a 100644
--- a/gcc/testsuite/gfortran.dg/import.f90
+++ b/gcc/testsuite/gfortran.dg/import.f90
@@ -75,4 +75,3 @@ program foo
call test(z)
if(z%i /= 1) call abort()
end program foo
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/import2.f90 b/gcc/testsuite/gfortran.dg/import2.f90
index 0f380b7b3f..76c87d617d 100644
--- a/gcc/testsuite/gfortran.dg/import2.f90
+++ b/gcc/testsuite/gfortran.dg/import2.f90
@@ -4,30 +4,6 @@
! Test whether import does not work with -std=f95
! PR fortran/29601
-subroutine test(x)
- type myType3
- sequence
- integer :: i
- end type myType3
- type(myType3) :: x
- if(x%i /= 7) call abort()
- x%i = 1
-end subroutine test
-
-
-subroutine bar(x,y)
- type myType
- sequence
- integer :: i
- end type myType
- type(myType) :: x
- integer(8) :: y
- if(y /= 8) call abort()
- if(x%i /= 2) call abort()
- x%i = 5
- y = 42
-end subroutine bar
-
module testmod
implicit none
integer, parameter :: kind = 8
@@ -66,15 +42,4 @@ program foo
end subroutine test
end interface
- type(myType) :: y
- type(myType3) :: z
- integer(dp) :: i8
- y%i = 2
- i8 = 8
- call bar(y,i8) ! { dg-error "Type mismatch in argument" }
- if(y%i /= 5 .or. i8/= 42) call abort()
- z%i = 7
- call test(z) ! { dg-error "Type mismatch in argument" }
- if(z%i /= 1) call abort()
end program foo
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/import4.f90 b/gcc/testsuite/gfortran.dg/import4.f90
index 761c9846b3..99ffd8ad5a 100644
--- a/gcc/testsuite/gfortran.dg/import4.f90
+++ b/gcc/testsuite/gfortran.dg/import4.f90
@@ -96,4 +96,3 @@ contains
if(r /= -123.0 .or. t%c /= -44) call abort()
end subroutine test3
end program all
-! { dg-final { cleanup-modules "modtest general" } }
diff --git a/gcc/testsuite/gfortran.dg/import5.f90 b/gcc/testsuite/gfortran.dg/import5.f90
index 0106c4ec12..306ba519a5 100644
--- a/gcc/testsuite/gfortran.dg/import5.f90
+++ b/gcc/testsuite/gfortran.dg/import5.f90
@@ -41,4 +41,3 @@ contains
end subroutine sub1
end module test_import
-! { dg-final { cleanup-modules "test_import" } }
diff --git a/gcc/testsuite/gfortran.dg/import6.f90 b/gcc/testsuite/gfortran.dg/import6.f90
index 1bf9669c5b..d57a6368b7 100644
--- a/gcc/testsuite/gfortran.dg/import6.f90
+++ b/gcc/testsuite/gfortran.dg/import6.f90
@@ -7,6 +7,7 @@
!
subroutine func1(param)
type :: my_type
+ sequence
integer :: data
end type my_type
type(my_type) :: param
@@ -15,6 +16,7 @@ end subroutine func1
subroutine func2(param)
type :: my_type
+ sequence
integer :: data
end type my_type
type(my_type) :: param
@@ -22,6 +24,7 @@ subroutine func2(param)
end subroutine func2
type :: my_type
+ sequence
integer :: data
end type my_type
diff --git a/gcc/testsuite/gfortran.dg/import7.f90 b/gcc/testsuite/gfortran.dg/import7.f90
index c115cc3f2b..973851fdd7 100644
--- a/gcc/testsuite/gfortran.dg/import7.f90
+++ b/gcc/testsuite/gfortran.dg/import7.f90
@@ -53,6 +53,3 @@
END TYPE
TYPE(T1) X
END
-
-! { dg-final { cleanup-modules "mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/impure_1.f08 b/gcc/testsuite/gfortran.dg/impure_1.f08
index 9d09eaa4c7..694b6e38b2 100644
--- a/gcc/testsuite/gfortran.dg/impure_1.f08
+++ b/gcc/testsuite/gfortran.dg/impure_1.f08
@@ -67,5 +67,3 @@ CONTAINS
END FUNCTION accumulate
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/impure_2.f08 b/gcc/testsuite/gfortran.dg/impure_2.f08
index 4bc2ca1fba..b829e0825a 100644
--- a/gcc/testsuite/gfortran.dg/impure_2.f08
+++ b/gcc/testsuite/gfortran.dg/impure_2.f08
@@ -23,5 +23,3 @@ CONTAINS
END SUBROUTINE purified
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/impure_actual_1.f90 b/gcc/testsuite/gfortran.dg/impure_actual_1.f90
index 12f3375bf0..ee12ddfdac 100644
--- a/gcc/testsuite/gfortran.dg/impure_actual_1.f90
+++ b/gcc/testsuite/gfortran.dg/impure_actual_1.f90
@@ -20,6 +20,3 @@ END MODULE M1
USE M1
write(6,*) J(L) ! { dg-error "Mismatch in PURE attribute" }
END
-
-! { dg-final { cleanup-modules "m1" } }
-
diff --git a/gcc/testsuite/gfortran.dg/impure_assignment_1.f90 b/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
index 28ef2693c6..103244cefa 100644
--- a/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
+++ b/gcc/testsuite/gfortran.dg/impure_assignment_1.f90
@@ -24,5 +24,3 @@ PURE SUBROUTINE S2(I,J)
I=J ! { dg-error "is not PURE" }
END SUBROUTINE S2
END
-! { dg-final { cleanup-modules "m1" } }
-
diff --git a/gcc/testsuite/gfortran.dg/impure_assignment_2.f90 b/gcc/testsuite/gfortran.dg/impure_assignment_2.f90
index 6378ec8a47..38d841d7a5 100644
--- a/gcc/testsuite/gfortran.dg/impure_assignment_2.f90
+++ b/gcc/testsuite/gfortran.dg/impure_assignment_2.f90
@@ -66,5 +66,3 @@ CONTAINS
RES = B
END FUNCTION
END MODULE pr20882
-! { dg-final { cleanup-modules "pr20863 pr20882" } }
-
diff --git a/gcc/testsuite/gfortran.dg/impure_constructor_1.f90 b/gcc/testsuite/gfortran.dg/impure_constructor_1.f90
index 01aa01b63a..cfd9993853 100644
--- a/gcc/testsuite/gfortran.dg/impure_constructor_1.f90
+++ b/gcc/testsuite/gfortran.dg/impure_constructor_1.f90
@@ -26,5 +26,3 @@ contains
z = t3(x) ! { dg-error "Invalid expression in the structure constructor" }
end subroutine foo
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/impure_spec_expr_1.f90 b/gcc/testsuite/gfortran.dg/impure_spec_expr_1.f90
index 8c42a57c44..1489b5c739 100644
--- a/gcc/testsuite/gfortran.dg/impure_spec_expr_1.f90
+++ b/gcc/testsuite/gfortran.dg/impure_spec_expr_1.f90
@@ -11,5 +11,3 @@ contains
integer :: u(n(1)) ! { dg-error "must be PURE" }
end subroutine
end module test
-! { dg-final { cleanup-modules "test" } }
-
diff --git a/gcc/testsuite/gfortran.dg/include_3.f95 b/gcc/testsuite/gfortran.dg/include_3.f95
index fba07cbb1f..1e429c41aa 100644
--- a/gcc/testsuite/gfortran.dg/include_3.f95
+++ b/gcc/testsuite/gfortran.dg/include_3.f95
@@ -24,3 +24,4 @@ end function
! { dg-do compile }
! { dg-options "-fpreprocessed -g3" }
+! { dg-warning "Nonexistent include directory" "missing directory" { target *-*-* } 0 }
diff --git a/gcc/testsuite/gfortran.dg/include_6.f90 b/gcc/testsuite/gfortran.dg/include_6.f90
new file mode 100644
index 0000000000..0bac3909b8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/include_6.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! { dg-options "-I gfortran.log" }
+! { dg-warning "is not a directory" "" { target *-*-* } 0 }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/include_7.f90 b/gcc/testsuite/gfortran.dg/include_7.f90
new file mode 100644
index 0000000000..9a30945f10
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/include_7.f90
@@ -0,0 +1,5 @@
+! { dg-do compile }
+! { dg-options "-I nothere" }
+! { dg-warning "Nonexistent include directory" "missing directory" { target *-*-* } 0 }
+end
+
diff --git a/gcc/testsuite/gfortran.dg/include_8.f90 b/gcc/testsuite/gfortran.dg/include_8.f90
new file mode 100644
index 0000000000..84d04583f8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/include_8.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-J./" }
+! PR 55919 - a trailing dir separator would cause a warning
+! on Windows.
+program main
+end program main
diff --git a/gcc/testsuite/gfortran.dg/init_flag_11.f90 b/gcc/testsuite/gfortran.dg/init_flag_11.f90
new file mode 100644
index 0000000000..d881c2c9ce
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/init_flag_11.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-finit-local-zero -fno-automatic" }
+!
+! PR fortran/53818
+!
+! Contributed by John Moyard
+!
+logical function testing(date1, date2) result(test)
+ integer date1, date2
+ test = ( (date1 < date2) .or. ( date1==date2 ))
+end function testing
diff --git a/gcc/testsuite/gfortran.dg/init_flag_12.f90 b/gcc/testsuite/gfortran.dg/init_flag_12.f90
new file mode 100644
index 0000000000..5844398d53
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/init_flag_12.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fno-automatic -finit-local-zero" }
+!
+! PR 55907: [4.7/4.8/4.9 Regression] ICE with -fno-automatic -finit-local-zero
+!
+! Contributed by J.R. Garcia <garcia.espinosa.jr@gmail.com>
+
+subroutine cchaine (i)
+ implicit none
+ integer :: i
+ character(len=i) :: chaine
+ write(*,*) chaine
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/initialization_1.f90 b/gcc/testsuite/gfortran.dg/initialization_1.f90
index 2fb014eced..ac351e2de2 100644
--- a/gcc/testsuite/gfortran.dg/initialization_1.f90
+++ b/gcc/testsuite/gfortran.dg/initialization_1.f90
@@ -35,5 +35,3 @@ contains
end subroutine foo
end module const
-
-! { dg-final { cleanup-modules "const" } }
diff --git a/gcc/testsuite/gfortran.dg/initialization_10.f90 b/gcc/testsuite/gfortran.dg/initialization_10.f90
index 387ea6df49..d8e82d519b 100644
--- a/gcc/testsuite/gfortran.dg/initialization_10.f90
+++ b/gcc/testsuite/gfortran.dg/initialization_10.f90
@@ -28,5 +28,3 @@ end select
END SUBROUTINE Parser
END MODULE Readdata_mod
-
-! { dg-final { cleanup-modules "readdata_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/initialization_12.f90 b/gcc/testsuite/gfortran.dg/initialization_12.f90
index 53db60baaf..1a4812a372 100644
--- a/gcc/testsuite/gfortran.dg/initialization_12.f90
+++ b/gcc/testsuite/gfortran.dg/initialization_12.f90
@@ -25,5 +25,3 @@ module AtmoIonoSphere
use EGOPS_Utilities
use AtmoIono
end module AtmoIonoSphere
-
-! { dg-final { cleanup-modules "egops_utilities atmoiono atmoionosphere" } }
diff --git a/gcc/testsuite/gfortran.dg/initialization_19.f90 b/gcc/testsuite/gfortran.dg/initialization_19.f90
index 2465f9b333..1fba5f01d3 100644
--- a/gcc/testsuite/gfortran.dg/initialization_19.f90
+++ b/gcc/testsuite/gfortran.dg/initialization_19.f90
@@ -30,5 +30,3 @@ call g
call g
end program t
-
-! ! { dg-final { cleanup-modules "c s" } }
diff --git a/gcc/testsuite/gfortran.dg/initialization_23.f90 b/gcc/testsuite/gfortran.dg/initialization_23.f90
index cc2aca4e22..1931bca96b 100644
--- a/gcc/testsuite/gfortran.dg/initialization_23.f90
+++ b/gcc/testsuite/gfortran.dg/initialization_23.f90
@@ -12,6 +12,3 @@
CHARACTER, PARAMETER :: the_alpha = one_parameter('c') ! { dg-error "Can't convert TYPE" }
CHARACTER, PARAMETER :: the_beta = (/one_parameter('c')/) ! { dg-error "Incompatible ranks" }
END MODULE cdf_aux_mod
-
-! { dg-final { cleanup-modules "cdf_aux_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/inline_sum_5.f90 b/gcc/testsuite/gfortran.dg/inline_sum_5.f90
new file mode 100644
index 0000000000..bda73fd99a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/inline_sum_5.f90
@@ -0,0 +1,33 @@
+! { dg-do run }
+!
+! PR fortran/57798
+! The call to sum used to be inlined into a loop with an uninitialized bound
+!
+! Original testcase by Stephan Kramer <stephan.kramer@imperial.ac.uk>
+
+program test
+ implicit none
+
+ call sub(2, 11)
+
+ contains
+
+ function func(m, n)
+ integer, intent(in):: m,n
+ real, dimension(m, n):: func
+
+ func = 1.0
+
+ end function func
+
+ subroutine sub(m, n)
+ integer, intent(in):: m, n
+ real, dimension(m,n):: y
+
+ y = 1.0
+ if (any(sum(y*func(m,n), dim=1) /= m)) call abort
+
+ end subroutine sub
+
+end program test
+
diff --git a/gcc/testsuite/gfortran.dg/inquire_10.f90 b/gcc/testsuite/gfortran.dg/inquire_10.f90
index 5343f2b3a0..bc7d6e36b3 100644
--- a/gcc/testsuite/gfortran.dg/inquire_10.f90
+++ b/gcc/testsuite/gfortran.dg/inquire_10.f90
@@ -1,3 +1,4 @@
+! { dg-do run { target { ! newlib } } }
character(len=800) :: cwd
integer :: unit
@@ -9,6 +10,8 @@
inquire(file=trim(cwd) // '/cseq',number=unit)
if (unit /= 23) call abort
+ close(unit=23, status = 'delete')
+
inquire(file='foo/../cseq2',number=unit)
if (unit >= 0) call abort
inquire(file='cseq2',number=unit)
diff --git a/gcc/testsuite/gfortran.dg/inquire_11.f90 b/gcc/testsuite/gfortran.dg/inquire_11.f90
index cc5e26d090..f4107661d7 100644
--- a/gcc/testsuite/gfortran.dg/inquire_11.f90
+++ b/gcc/testsuite/gfortran.dg/inquire_11.f90
@@ -8,4 +8,3 @@ CONTAINS
INQUIRE (UNIT=1, EXIST=qexist)
END SUBROUTINE i
END MODULE print_it
-! { dg-final { cleanup-modules "print_it" } }
diff --git a/gcc/testsuite/gfortran.dg/inquire_15.f90 b/gcc/testsuite/gfortran.dg/inquire_15.f90
new file mode 100644
index 0000000000..ae94270ca8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/inquire_15.f90
@@ -0,0 +1,29 @@
+! { dg-do run }
+! PR48976 test case by jvdelisle@gcc.gnu.org
+character(len=20) :: str
+str = "abcdefg"
+inquire(file="abcddummy", stream=str)
+!print *, "str=",str
+if (str /= "UNKNOWN") call abort
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "UNKNOWN") call abort
+open(99,access="stream")
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "YES") goto 10
+close(99)
+open(99,access="direct", recl=16)
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "NO") goto 10
+close(99)
+open(99,access="sequential")
+inquire(99, stream=str)
+!print *, "str=",str
+if (str /= "NO") goto 10
+close(99, status="delete")
+stop
+10 close(99, status="delete")
+call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/inquire_16.f90 b/gcc/testsuite/gfortran.dg/inquire_16.f90
new file mode 100644
index 0000000000..b52e23db6b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/inquire_16.f90
@@ -0,0 +1,29 @@
+! { dg-do run }
+!
+! PR fortran/60286
+!
+! Contributed by Alexander Vogt
+!
+program test_inquire
+ use, intrinsic :: ISO_Fortran_env
+ implicit none
+ character(len=20) :: s_read, s_write, s_readwrite
+
+ inquire(unit=input_unit, read=s_read, write=s_write, &
+ readwrite=s_readwrite)
+ if (s_read /= "YES" .or. s_write /= "NO" .or. s_readwrite /="NO") then
+ call abort()
+ endif
+
+ inquire(unit=output_unit, read=s_read, write=s_write, &
+ readwrite=s_readwrite)
+ if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
+ call abort()
+ endif
+
+ inquire(unit=error_unit, read=s_read, write=s_write, &
+ readwrite=s_readwrite)
+ if (s_read /= "NO" .or. s_write /= "YES" .or. s_readwrite /="NO") then
+ call abort()
+ endif
+end program test_inquire
diff --git a/gcc/testsuite/gfortran.dg/int_1.f90 b/gcc/testsuite/gfortran.dg/int_1.f90
index 853578e269..77ba1e2e69 100644
--- a/gcc/testsuite/gfortran.dg/int_1.f90
+++ b/gcc/testsuite/gfortran.dg/int_1.f90
@@ -171,5 +171,3 @@ program test_int
if (i4 /= 17_ik4 .or. i8 /= 17_ik8) call abort
end program test_int
-
-! { dg-final { cleanup-modules "mykinds" } }
diff --git a/gcc/testsuite/gfortran.dg/int_2.f90 b/gcc/testsuite/gfortran.dg/int_2.f90
index b9a3ec43d4..a6006aad8f 100644
--- a/gcc/testsuite/gfortran.dg/int_2.f90
+++ b/gcc/testsuite/gfortran.dg/int_2.f90
@@ -1,6 +1,5 @@
! PR fortran/32823
! { dg-do compile }
-! { dg-final { cleanup-modules "token_module" } }
module token_module
diff --git a/gcc/testsuite/gfortran.dg/int_range_io_1.f90 b/gcc/testsuite/gfortran.dg/int_range_io_1.f90
new file mode 100644
index 0000000000..de1fdb8130
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/int_range_io_1.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+! { dg-options "-fno-range-check" }
+! PR 52428 Read IO of integers near the end of range. Note that we
+! support the two's complement representation even though the Fortran
+! numerical model has a symmetric range. (The -fno-range-check option
+! is needed to allow the -2147483648 literal.)
+program int_range
+ implicit none
+ character(25) :: inputline = "-2147483648"
+ integer(4) :: test
+ integer :: st
+
+ read(inputline,100) test
+100 format(1i11)
+ if (test /= -2147483648) call abort
+ inputline(1:1) = " "
+ read(inputline, 100, iostat=st) test
+ if (st == 0) call abort
+ inputline(11:11) = "7"
+ read(inputline, 100) test
+ if (test /= 2147483647) call abort
+
+ ! Same as above but with list-formatted IO
+ inputline = "-2147483648"
+ read(inputline, *) test
+ if (test /= -2147483648) call abort
+ inputline(1:1) = " "
+ read(inputline, *, iostat=st) test
+ if (st == 0) call abort
+ inputline(11:11) = "7"
+ read(inputline, *) test
+ if (test /= 2147483647) call abort
+
+end program int_range
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
index 5c6c5bfe5e..e4088c361a 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_3.F90
@@ -201,5 +201,3 @@ program test
ATEST((1.0,0.),-9,c4)
end program test
-
-! { dg-final { cleanup-modules "mod_check" } }
diff --git a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90 b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
index 58c7614d51..35bb281678 100644
--- a/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
+++ b/gcc/testsuite/gfortran.dg/integer_exponentiation_5.F90
@@ -76,5 +76,3 @@ program test
TEST(nearest(1.0,-1.0),-huge(0),r4)
end program test
-
-! { dg-final { cleanup-modules "mod_check" } }
diff --git a/gcc/testsuite/gfortran.dg/intent_out_2.f90 b/gcc/testsuite/gfortran.dg/intent_out_2.f90
index 4dc5191e9a..e85cf84f3a 100644
--- a/gcc/testsuite/gfortran.dg/intent_out_2.f90
+++ b/gcc/testsuite/gfortran.dg/intent_out_2.f90
@@ -43,5 +43,3 @@ program test
implicit none
call setup ()
end program test
-! { dg-final { cleanup-modules "gfcbug72" } }
-
diff --git a/gcc/testsuite/gfortran.dg/intent_out_3.f90 b/gcc/testsuite/gfortran.dg/intent_out_3.f90
index e3300c988f..1afb504be0 100644
--- a/gcc/testsuite/gfortran.dg/intent_out_3.f90
+++ b/gcc/testsuite/gfortran.dg/intent_out_3.f90
@@ -17,4 +17,3 @@ END MODULE M1
USE M1
CALL S1(D1%I(3)) ! { dg-error "variable definition context" }
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/intent_out_6.f90 b/gcc/testsuite/gfortran.dg/intent_out_6.f90
index 1a411072fa..a36316428f 100644
--- a/gcc/testsuite/gfortran.dg/intent_out_6.f90
+++ b/gcc/testsuite/gfortran.dg/intent_out_6.f90
@@ -35,5 +35,3 @@ program test
call sub1(x)
if(x(1) /= 5) call abort()
end program
-
-! { dg-final { cleanup-modules "test_module" } }
diff --git a/gcc/testsuite/gfortran.dg/intent_out_7.f90 b/gcc/testsuite/gfortran.dg/intent_out_7.f90
new file mode 100644
index 0000000000..d75fff803d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intent_out_7.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/53643
+!
+type t
+ integer, allocatable :: comp
+end type t
+contains
+ subroutine foo(x,y)
+ class(t), allocatable, intent(out) :: x(:)
+ class(t), intent(out) :: y(:)
+ end subroutine
+ subroutine foo2(x,y)
+ class(t), allocatable, intent(out) :: x
+ class(t), intent(out) :: y
+ end subroutine
+ subroutine bar(x,y)
+ class(t), intent(out) :: x(:)[*]
+ class(t), intent(out) :: y[*]
+ end subroutine
+ subroutine bar2(x,y)
+ type(t), intent(out) :: x(:)[*]
+ type(t), intent(out) :: y[*]
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/intent_out_8.f90 b/gcc/testsuite/gfortran.dg/intent_out_8.f90
new file mode 100644
index 0000000000..674d8338bf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intent_out_8.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR 53655: [F03] "default initializer" warnings
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+type t
+end type t
+
+contains
+
+ subroutine foo(x)
+ type(t), intent(out) :: x
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/intent_used_1.f90 b/gcc/testsuite/gfortran.dg/intent_used_1.f90
index ec23bf5857..ecc06e989c 100644
--- a/gcc/testsuite/gfortran.dg/intent_used_1.f90
+++ b/gcc/testsuite/gfortran.dg/intent_used_1.f90
@@ -15,5 +15,3 @@ MODULE global
END SUBROUTINE foo
END INTERFACE
END MODULE global
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_1.f90 b/gcc/testsuite/gfortran.dg/interface_1.f90
index e170f870e1..3bbdd570c0 100644
--- a/gcc/testsuite/gfortran.dg/interface_1.f90
+++ b/gcc/testsuite/gfortran.dg/interface_1.f90
@@ -38,5 +38,3 @@ module z
end function
end module z
-
-! { dg-final { cleanup-modules "y z" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_10.f90 b/gcc/testsuite/gfortran.dg/interface_10.f90
index 99ecc8c857..96c364b579 100644
--- a/gcc/testsuite/gfortran.dg/interface_10.f90
+++ b/gcc/testsuite/gfortran.dg/interface_10.f90
@@ -54,4 +54,3 @@ contains
nsz=size(x)
end subroutine solve_s_foo
end module class_s_foo
-! { dg-final { cleanup-modules "class_s_fld class_fld class_s_foo" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_11.f90 b/gcc/testsuite/gfortran.dg/interface_11.f90
index a143bb374f..9a7e780907 100644
--- a/gcc/testsuite/gfortran.dg/interface_11.f90
+++ b/gcc/testsuite/gfortran.dg/interface_11.f90
@@ -26,4 +26,3 @@ CONTAINS
END MODULE
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_12.f90 b/gcc/testsuite/gfortran.dg/interface_12.f90
index a45817dabb..d519789bf9 100644
--- a/gcc/testsuite/gfortran.dg/interface_12.f90
+++ b/gcc/testsuite/gfortran.dg/interface_12.f90
@@ -87,4 +87,3 @@ pure function f (x)
f = 2*x+1
end function f
-! { dg-final { cleanup-modules "test1" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_13.f90 b/gcc/testsuite/gfortran.dg/interface_13.f90
index 42c794a3e5..a29342553c 100644
--- a/gcc/testsuite/gfortran.dg/interface_13.f90
+++ b/gcc/testsuite/gfortran.dg/interface_13.f90
@@ -29,5 +29,3 @@
data_r8(1)=0
end subroutine my_sio_file_read_common
end module files_module
-
-! { dg-final { cleanup-modules "files_module" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_14.f90 b/gcc/testsuite/gfortran.dg/interface_14.f90
index 994d97ee73..ebd16f9a78 100644
--- a/gcc/testsuite/gfortran.dg/interface_14.f90
+++ b/gcc/testsuite/gfortran.dg/interface_14.f90
@@ -69,5 +69,3 @@
call new (a)
call new (b)
end
-
-! { dg-final { cleanup-modules "p_class s_class t_class d_class poly_class" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_15.f90 b/gcc/testsuite/gfortran.dg/interface_15.f90
index 8ad940ae77..49aaddace8 100644
--- a/gcc/testsuite/gfortran.dg/interface_15.f90
+++ b/gcc/testsuite/gfortran.dg/interface_15.f90
@@ -18,5 +18,3 @@ CONTAINS
F1 = D%I
END FUNCTION
END MODULE
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_16.f90 b/gcc/testsuite/gfortran.dg/interface_16.f90
index 8be9d684a6..1cad75f3c4 100644
--- a/gcc/testsuite/gfortran.dg/interface_16.f90
+++ b/gcc/testsuite/gfortran.dg/interface_16.f90
@@ -96,6 +96,3 @@ Subroutine foo_sub(a,pr,b,x,eps,cd,info)
Call foo_pwrk(pr,p,f,cd,info,work=aux) ! This worked if bar_pwrk was called!
return
End Subroutine foo_sub
-
-! { dg-final { cleanup-modules "foo_base_mod foo_pr_mod bar_pr_mod bar_prt" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_17.f90 b/gcc/testsuite/gfortran.dg/interface_17.f90
index 44b8a46159..9315137543 100644
--- a/gcc/testsuite/gfortran.dg/interface_17.f90
+++ b/gcc/testsuite/gfortran.dg/interface_17.f90
@@ -21,4 +21,3 @@ END MODULE util
MODULE graphcon
USE util, ONLY: sort
END MODULE graphcon
-! { dg-final { cleanup-modules "kinds util graphcon" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_18.f90 b/gcc/testsuite/gfortran.dg/interface_18.f90
index d0a5475488..30461e5c4c 100644
--- a/gcc/testsuite/gfortran.dg/interface_18.f90
+++ b/gcc/testsuite/gfortran.dg/interface_18.f90
@@ -17,5 +17,3 @@
type(mytype_type), intent(in out) :: mytype
end subroutine mytype_test
end module mytype_application
-
-! { dg-final { cleanup-modules "mytype_application" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_19.f90 b/gcc/testsuite/gfortran.dg/interface_19.f90
index 7a88fc91b3..2d72caa058 100644
--- a/gcc/testsuite/gfortran.dg/interface_19.f90
+++ b/gcc/testsuite/gfortran.dg/interface_19.f90
@@ -27,6 +27,3 @@ intrinsic dcos
call sub()
call sub(dcos)
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_2.f90 b/gcc/testsuite/gfortran.dg/interface_2.f90
index 4e6309899e..6b0bf2b239 100644
--- a/gcc/testsuite/gfortran.dg/interface_2.f90
+++ b/gcc/testsuite/gfortran.dg/interface_2.f90
@@ -27,5 +27,3 @@ CONTAINS
END FUNCTION Compare_Float_Single
END MODULE Compare_Float_Numbers
-
-! { dg-final { cleanup-modules "compare_float_numbers" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_20.f90 b/gcc/testsuite/gfortran.dg/interface_20.f90
index 9a7dc5cb13..829add2ff9 100644
--- a/gcc/testsuite/gfortran.dg/interface_20.f90
+++ b/gcc/testsuite/gfortran.dg/interface_20.f90
@@ -18,6 +18,3 @@ implicit none
intrinsic cos
call sub(cos) ! { dg-error "wrong number of arguments" }
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_21.f90 b/gcc/testsuite/gfortran.dg/interface_21.f90
index 566a9ef370..e3db771a93 100644
--- a/gcc/testsuite/gfortran.dg/interface_21.f90
+++ b/gcc/testsuite/gfortran.dg/interface_21.f90
@@ -20,6 +20,3 @@ implicit none
EXTERNAL foo ! implicit interface is undefined
call sub(foo) ! { dg-error "is not a function" }
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_22.f90 b/gcc/testsuite/gfortran.dg/interface_22.f90
index fa8e517a18..6228fc9f13 100644
--- a/gcc/testsuite/gfortran.dg/interface_22.f90
+++ b/gcc/testsuite/gfortran.dg/interface_22.f90
@@ -23,6 +23,3 @@ module gswap
module procedure sreal, schar, sint => sreal ! { dg-error "Syntax error in MODULE PROCEDURE statement" }
end interface swap
end module gswap
-
-! { dg-final { cleanup-modules "foo g gswap" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_23.f90 b/gcc/testsuite/gfortran.dg/interface_23.f90
index 60b6e79690..b2e7a697fd 100644
--- a/gcc/testsuite/gfortran.dg/interface_23.f90
+++ b/gcc/testsuite/gfortran.dg/interface_23.f90
@@ -31,5 +31,3 @@ program c
end interface
call bar() ! { dg-error "Missing actual argument" }
end program
-
-! { dg-final { cleanup-modules "a b" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_24.f90 b/gcc/testsuite/gfortran.dg/interface_24.f90
index 1afc5ef2fb..f97d2babcd 100644
--- a/gcc/testsuite/gfortran.dg/interface_24.f90
+++ b/gcc/testsuite/gfortran.dg/interface_24.f90
@@ -62,5 +62,3 @@ module m6
end function
end interface
end module
-
-! { dg-final { cleanup-modules "m1 m2 m3 m4 m5 m6" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_25.f90 b/gcc/testsuite/gfortran.dg/interface_25.f90
index b239b2125a..0118cd563c 100644
--- a/gcc/testsuite/gfortran.dg/interface_25.f90
+++ b/gcc/testsuite/gfortran.dg/interface_25.f90
@@ -43,5 +43,3 @@ CONTAINS
end if
END FUNCTION recSum
END PROGRAM test
-
-! { dg-final { cleanup-modules "funcs" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_26.f90 b/gcc/testsuite/gfortran.dg/interface_26.f90
index 54ede6d53e..6f8325faf3 100644
--- a/gcc/testsuite/gfortran.dg/interface_26.f90
+++ b/gcc/testsuite/gfortran.dg/interface_26.f90
@@ -23,7 +23,7 @@ PROGRAM test
USE funcs
INTEGER :: rs
INTEGER, PARAMETER :: a = 2, b = 1
- rs = recSum( a, b, test1, sumInts ) ! { dg-error "Type/rank mismatch in argument" }
+ rs = recSum( a, b, test1, sumInts ) ! { dg-error "Type mismatch in argument" }
write(*,*) "Results", rs
CONTAINS
RECURSIVE INTEGER FUNCTION recSum( a,b,UserFunction,UserOp ) RESULT( res )
@@ -37,12 +37,10 @@ CONTAINS
END INTERFACE
INTEGER, EXTERNAL :: UserOp
- res = UserFunction( a,b, UserOp ) ! { dg-error "Type/rank mismatch in return value" }
+ res = UserFunction( a,b, UserOp ) ! { dg-error "Type mismatch in function result" }
if( res .lt. 10 ) then
res = recSum( a, res, UserFunction, UserOp )
end if
END FUNCTION recSum
END PROGRAM test
-
-! { dg-final { cleanup-modules "funcs" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_27.f90 b/gcc/testsuite/gfortran.dg/interface_27.f90
index 71975b6b7d..128d6a6f52 100644
--- a/gcc/testsuite/gfortran.dg/interface_27.f90
+++ b/gcc/testsuite/gfortran.dg/interface_27.f90
@@ -36,6 +36,3 @@ subroutine caller
end subroutine
end module
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_28.f90 b/gcc/testsuite/gfortran.dg/interface_28.f90
index 42a8208f4b..c827227083 100644
--- a/gcc/testsuite/gfortran.dg/interface_28.f90
+++ b/gcc/testsuite/gfortran.dg/interface_28.f90
@@ -38,6 +38,3 @@ program interfaceCheck
call test(subActual) ! { dg-error "INTENT mismatch in argument" }
call test(subActual2) ! { dg-error "OPTIONAL mismatch in argument" }
end program
-
-! { dg-final { cleanup-modules "sub testsub" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_29.f90 b/gcc/testsuite/gfortran.dg/interface_29.f90
index b3d123a42b..4a5626d003 100644
--- a/gcc/testsuite/gfortran.dg/interface_29.f90
+++ b/gcc/testsuite/gfortran.dg/interface_29.f90
@@ -47,6 +47,3 @@ end subroutine bar
complex, intent(out) :: y(:)
end subroutine
end module test
-
-! { dg-final { cleanup-modules "m test" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_3.f90 b/gcc/testsuite/gfortran.dg/interface_3.f90
index 1d954eef8b..febb12050d 100644
--- a/gcc/testsuite/gfortran.dg/interface_3.f90
+++ b/gcc/testsuite/gfortran.dg/interface_3.f90
@@ -67,5 +67,3 @@ subroutine his_fun (a)
use test_mod2
print *, my_fun (a) ! { dg-error "ambiguous reference" }
end subroutine his_fun
-
-! { dg-final { cleanup-modules "test_mod test_mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_31.f90 b/gcc/testsuite/gfortran.dg/interface_31.f90
index 3b0e8f8283..88aac32c2e 100644
--- a/gcc/testsuite/gfortran.dg/interface_31.f90
+++ b/gcc/testsuite/gfortran.dg/interface_31.f90
@@ -38,4 +38,3 @@ CONTAINS
r%j = lhs%j + rhs%j
END FUNCTION add_b
END MODULE mod2
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_32.f90 b/gcc/testsuite/gfortran.dg/interface_32.f90
index 6cdb091aec..a0f5f15d4a 100644
--- a/gcc/testsuite/gfortran.dg/interface_32.f90
+++ b/gcc/testsuite/gfortran.dg/interface_32.f90
@@ -78,4 +78,3 @@ contains
ip_save => g_initial%inquire_inner_product()
end subroutine cg
end module m4
-! { dg-final { cleanup-modules "m1 m2 m3 m4" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_33.f90 b/gcc/testsuite/gfortran.dg/interface_33.f90
index 955d50731b..60543f9d5c 100644
--- a/gcc/testsuite/gfortran.dg/interface_33.f90
+++ b/gcc/testsuite/gfortran.dg/interface_33.f90
@@ -32,5 +32,3 @@ CONTAINS
SUBROUTINE subr_name()
END SUBROUTINE
END MODULE
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_35.f90 b/gcc/testsuite/gfortran.dg/interface_35.f90
index eb4de12c1b..8c62a5dbb6 100644
--- a/gcc/testsuite/gfortran.dg/interface_35.f90
+++ b/gcc/testsuite/gfortran.dg/interface_35.f90
@@ -75,5 +75,3 @@ contains
end function
end
-
-! { dg-final { cleanup-modules "module_m module_m2 s_hard sidl_string_array" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_37.f90 b/gcc/testsuite/gfortran.dg/interface_37.f90
new file mode 100644
index 0000000000..a39f4748ac
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/interface_37.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR fortran/39290
+! Subroutine/function ambiguity in generics.
+!
+ interface q
+ subroutine qr(f)
+ implicit real(f)
+ external f
+ end subroutine
+ subroutine qc(f)
+ implicit complex(f)
+ external f
+ end subroutine ! { dg-error "Ambiguous interfaces" }
+ end interface q
+ end
diff --git a/gcc/testsuite/gfortran.dg/interface_4.f90 b/gcc/testsuite/gfortran.dg/interface_4.f90
index 8f6c3317ee..a09d656f91 100644
--- a/gcc/testsuite/gfortran.dg/interface_4.f90
+++ b/gcc/testsuite/gfortran.dg/interface_4.f90
@@ -43,4 +43,3 @@ program main
call bl_copy(1.0, chr)
if (chr /= "recopy") call abort ()
end program main
-! { dg-final { cleanup-modules "f77_blas_generic f77_blas_extra" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_5.f90 b/gcc/testsuite/gfortran.dg/interface_5.f90
index cc5a7129d4..de7719178c 100644
--- a/gcc/testsuite/gfortran.dg/interface_5.f90
+++ b/gcc/testsuite/gfortran.dg/interface_5.f90
@@ -53,4 +53,3 @@ program main
call bl_copy(1.0, chr)
if (chr /= "recopy") call abort ()
end program main
-! { dg-final { cleanup-modules "f77_blas_generic f77_blas_extra" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_7.f90 b/gcc/testsuite/gfortran.dg/interface_7.f90
index 9f59b49721..b3274ef9b8 100644
--- a/gcc/testsuite/gfortran.dg/interface_7.f90
+++ b/gcc/testsuite/gfortran.dg/interface_7.f90
@@ -28,5 +28,3 @@ module xx
END SUBROUTINE S9C ! { dg-error "Ambiguous interfaces" }
END INTERFACE BAD9
end module xx
-
-! { dg-final { cleanup-modules "xx" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_8.f90 b/gcc/testsuite/gfortran.dg/interface_8.f90
index 7feccb38b4..2060e7dd66 100644
--- a/gcc/testsuite/gfortran.dg/interface_8.f90
+++ b/gcc/testsuite/gfortran.dg/interface_8.f90
@@ -26,5 +26,3 @@ program main
use mod1, only: generic ! { dg-warning "has ambiguous interfaces" }
use mod2
end program main
-
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_9.f90 b/gcc/testsuite/gfortran.dg/interface_9.f90
index b407ab0652..2f38040b93 100644
--- a/gcc/testsuite/gfortran.dg/interface_9.f90
+++ b/gcc/testsuite/gfortran.dg/interface_9.f90
@@ -42,6 +42,3 @@ contains
if (inverse(1_4) /= 3_4) call abort ()
end subroutine sub
end program gfcbug48
-
-! { dg-final { cleanup-modules "module1 module2" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_assignment_1.f90 b/gcc/testsuite/gfortran.dg/interface_assignment_1.f90
index 5129832850..f76b9da496 100644
--- a/gcc/testsuite/gfortran.dg/interface_assignment_1.f90
+++ b/gcc/testsuite/gfortran.dg/interface_assignment_1.f90
@@ -36,4 +36,3 @@ CALL set(E,(E))
IF (D%I.NE.4) call abort ()
IF (4.NE.E%I) call abort ()
END
-! { dg-final { cleanup-modules "tt" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_assignment_2.f90 b/gcc/testsuite/gfortran.dg/interface_assignment_2.f90
index 8d7484b31b..e17d78e5a7 100644
--- a/gcc/testsuite/gfortran.dg/interface_assignment_2.f90
+++ b/gcc/testsuite/gfortran.dg/interface_assignment_2.f90
@@ -46,4 +46,3 @@ PROGRAM VST_2
if (any (str_ara(1)%chars(1:5) .ne. char_elm(1:5))) call abort
if (any (str_ara(2)%chars(1:5) .ne. char_elm(6:10))) call abort
END PROGRAM VST_2
-! { dg-final { cleanup-modules "iso_varying_string" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_assignment_3.f90 b/gcc/testsuite/gfortran.dg/interface_assignment_3.f90
index 6b7881bd14..2f5c7ae83e 100644
--- a/gcc/testsuite/gfortran.dg/interface_assignment_3.f90
+++ b/gcc/testsuite/gfortran.dg/interface_assignment_3.f90
@@ -45,5 +45,3 @@ contains
y% m = x% m ! ICE
end subroutine assign_atm_to_atm
end module gfcbug74
-! { dg-final { cleanup-modules "mo_memory gfcbug74" } }
-
diff --git a/gcc/testsuite/gfortran.dg/interface_assignment_5.f90 b/gcc/testsuite/gfortran.dg/interface_assignment_5.f90
index 8444dd0847..ac834bbf6b 100644
--- a/gcc/testsuite/gfortran.dg/interface_assignment_5.f90
+++ b/gcc/testsuite/gfortran.dg/interface_assignment_5.f90
@@ -46,4 +46,3 @@ contains
end subroutine assign_to_atm
end module mod2
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90 b/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
index 710fcff9cd..efd81fd674 100644
--- a/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/interface_derived_type_1.f90
@@ -52,5 +52,3 @@ subroutine sim_3(func3,params)
end interface
type(fcnparms) :: params ! -ditto-
end subroutine sim_3
-
-! { dg-final { cleanup-modules "test type_decl" } }
diff --git a/gcc/testsuite/gfortran.dg/interface_proc_end.f90 b/gcc/testsuite/gfortran.dg/interface_proc_end.f90
index efe5855584..2fc9921df4 100644
--- a/gcc/testsuite/gfortran.dg/interface_proc_end.f90
+++ b/gcc/testsuite/gfortran.dg/interface_proc_end.f90
@@ -16,5 +16,3 @@
END INTERFACE
end subroutine
end module
-
-! { dg-final { cleanup-modules "n" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_dummy_2.f08 b/gcc/testsuite/gfortran.dg/internal_dummy_2.f08
index 7ec6ad4c64..2d2ec6837b 100644
--- a/gcc/testsuite/gfortran.dg/internal_dummy_2.f08
+++ b/gcc/testsuite/gfortran.dg/internal_dummy_2.f08
@@ -60,5 +60,3 @@ CONTAINS
END SUBROUTINE incA
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_dummy_3.f08 b/gcc/testsuite/gfortran.dg/internal_dummy_3.f08
index 9780c27b3b..ff8dd822ec 100644
--- a/gcc/testsuite/gfortran.dg/internal_dummy_3.f08
+++ b/gcc/testsuite/gfortran.dg/internal_dummy_3.f08
@@ -62,5 +62,3 @@ PROGRAM main
CALL test (1)
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_dummy_4.f08 b/gcc/testsuite/gfortran.dg/internal_dummy_4.f08
index 1d8b8b2288..8ade99efb8 100644
--- a/gcc/testsuite/gfortran.dg/internal_dummy_4.f08
+++ b/gcc/testsuite/gfortran.dg/internal_dummy_4.f08
@@ -54,4 +54,3 @@ contains
two = -123*y
end function two
end program main
-! { dg-final { cleanup-modules "test_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_10.f90 b/gcc/testsuite/gfortran.dg/internal_pack_10.f90
index 8d972f44c1..fd1574dbfa 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_10.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_10.f90
@@ -38,4 +38,3 @@ program test
type(t_set) :: c (1)
call get_rule (c)
end program test
-! { dg-final { cleanup-modules "mo_obs_rules" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_12.f90 b/gcc/testsuite/gfortran.dg/internal_pack_12.f90
index 32bacfa393..bdcc7d1090 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_12.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_12.f90
@@ -57,5 +57,3 @@ subroutine bar(x)
end subroutine bar
! { dg-final { scan-tree-dump-times "unpack" 4 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_4.f90 b/gcc/testsuite/gfortran.dg/internal_pack_4.f90
index 5ddc035e9c..0bcfc799a8 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_4.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_4.f90
@@ -29,4 +29,3 @@ END
! { dg-final { scan-tree-dump-times "a != 0B \\? \\\(.*\\\) _gfortran_internal_pack" 1 "original" } }
! { dg-final { scan-tree-dump-times "if \\(a != 0B &&" 1 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_6.f90 b/gcc/testsuite/gfortran.dg/internal_pack_6.f90
index 05dd20aee8..7ec3225759 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_6.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_6.f90
@@ -54,6 +54,5 @@ END SUBROUTINE S2
call s2
end
-! { dg-final { cleanup-modules "m1" } }
! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_7.f90 b/gcc/testsuite/gfortran.dg/internal_pack_7.f90
index 32d98f7725..2a056fcb90 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_7.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_7.f90
@@ -30,6 +30,5 @@ CONTAINS
s2=0
END FUNCTION S2
END MODULE M1
-! { dg-final { cleanup-modules "m1" } }
! { dg-final { scan-tree-dump-times "pack" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_pack_8.f90 b/gcc/testsuite/gfortran.dg/internal_pack_8.f90
index d38403fa4a..0e27aab765 100644
--- a/gcc/testsuite/gfortran.dg/internal_pack_8.f90
+++ b/gcc/testsuite/gfortran.dg/internal_pack_8.f90
@@ -30,4 +30,3 @@ END MODULE M1
USE M1
CALL S1
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_readwrite_3.f90 b/gcc/testsuite/gfortran.dg/internal_readwrite_3.f90
new file mode 100644
index 0000000000..279fac5a6d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/internal_readwrite_3.f90
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR 52724 - this used to generate a "Bad integer" error.
+program main
+ implicit none
+ integer :: i
+ character(len=100,kind=4) :: buffer, a
+ buffer = 4_"123"
+ read(buffer,*) i
+ write (a,'(I3)') i
+ if (a /= 4_"123") call abort
+end program main
diff --git a/gcc/testsuite/gfortran.dg/internal_references_1.f90 b/gcc/testsuite/gfortran.dg/internal_references_1.f90
index 73b9da67c6..12041df9d7 100644
--- a/gcc/testsuite/gfortran.dg/internal_references_1.f90
+++ b/gcc/testsuite/gfortran.dg/internal_references_1.f90
@@ -33,4 +33,3 @@ contains
bar = 1.0
end function bar
end program test
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/internal_references_2.f90 b/gcc/testsuite/gfortran.dg/internal_references_2.f90
index 6d4c21dc21..d72d9065ad 100644
--- a/gcc/testsuite/gfortran.dg/internal_references_2.f90
+++ b/gcc/testsuite/gfortran.dg/internal_references_2.f90
@@ -18,5 +18,3 @@ contains
real a
end subroutine sub
end module aap
-
-! { dg-final { cleanup-modules "aap" } }
diff --git a/gcc/testsuite/gfortran.dg/interop_params.f03 b/gcc/testsuite/gfortran.dg/interop_params.f03
index ea3dadac04..6eafba0ea6 100644
--- a/gcc/testsuite/gfortran.dg/interop_params.f03
+++ b/gcc/testsuite/gfortran.dg/interop_params.f03
@@ -1,4 +1,5 @@
! { dg-do compile }
+! { dg-options "-Wc-binding-type" }
module interop_params
use, intrinsic :: iso_c_binding
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_1.f90 b/gcc/testsuite/gfortran.dg/intrinsic_1.f90
index b2413de1a3..15c0d39ac1 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_1.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_1.f90
@@ -23,6 +23,3 @@ contains
END FUNCTION next_state
end module vector_calculus
-
-! { dg-final { cleanup-modules "vector_calculus" } }
-
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_3.f90 b/gcc/testsuite/gfortran.dg/intrinsic_3.f90
index fcd40e94bb..3d639e3744 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_3.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_3.f90
@@ -35,6 +35,3 @@ module p
end function erfc
end module p
-
-! { dg-final { cleanup-modules "p" } }
-
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90 b/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90
index c2dd07cda5..4c159bde17 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90
+++ b/gcc/testsuite/gfortran.dg/intrinsic_actual_3.f90
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
! Tests the fix for PR30237 in which alternate returns in intrinsic
! actual arglists were quietly ignored.
!
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_shadow_1.f03 b/gcc/testsuite/gfortran.dg/intrinsic_shadow_1.f03
index 776d0f692d..8ad3a6379a 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_shadow_1.f03
+++ b/gcc/testsuite/gfortran.dg/intrinsic_shadow_1.f03
@@ -53,5 +53,3 @@ REAL FUNCTION random_seed () ! { dg-bogus "of an intrinsic" }
END FUNCTION random_seed
! We do only compile, so no main program needed.
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_shadow_2.f03 b/gcc/testsuite/gfortran.dg/intrinsic_shadow_2.f03
index 5c046166d7..326edb0c57 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_shadow_2.f03
+++ b/gcc/testsuite/gfortran.dg/intrinsic_shadow_2.f03
@@ -25,5 +25,3 @@ REAL FUNCTION acosh (arg) ! { dg-warning "of an intrinsic" }
END FUNCTION acosh
! We do only compile, so no main program needed.
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_shadow_3.f03 b/gcc/testsuite/gfortran.dg/intrinsic_shadow_3.f03
index 069a99b343..4516349a64 100644
--- a/gcc/testsuite/gfortran.dg/intrinsic_shadow_3.f03
+++ b/gcc/testsuite/gfortran.dg/intrinsic_shadow_3.f03
@@ -23,5 +23,3 @@ REAL FUNCTION acos (arg) ! { dg-bogus "of an intrinsic" }
END FUNCTION acos
! We do only compile, so no main program needed.
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/intrinsic_shadow_4.f90 b/gcc/testsuite/gfortran.dg/intrinsic_shadow_4.f90
new file mode 100644
index 0000000000..df614bb638
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/intrinsic_shadow_4.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR fortran/54199
+!
+subroutine test()
+contains
+ real function fraction(x) ! { dg-warning "'fraction' declared at .1. may shadow the intrinsic of the same name. In order to call the intrinsic, explicit INTRINSIC declarations may be required." }
+ real :: x
+ fraction = x
+ end function fraction
+end subroutine test
diff --git a/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90 b/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
index f3c6e1269b..4fd747616a 100644
--- a/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
+++ b/gcc/testsuite/gfortran.dg/invalid_interface_assignment.f90
@@ -1,4 +1,6 @@
! { dg-do compile }
+! { dg-options "-std=gnu" }
+!
! Tests the fix for PR25102, which did not diagnose the aberrant interface
! assignement below.
!
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_1.f90 b/gcc/testsuite/gfortran.dg/io_constraints_1.f90
index eb8ab8d534..c6f956958c 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_1.f90
+++ b/gcc/testsuite/gfortran.dg/io_constraints_1.f90
@@ -76,5 +76,3 @@ end module global
100 continue
200 format (2i6)
END
-
-! { dg-final { cleanup-modules "fails global" } }
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_2.f90 b/gcc/testsuite/gfortran.dg/io_constraints_2.f90
index 42aba66a8d..e0e0db6332 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_2.f90
+++ b/gcc/testsuite/gfortran.dg/io_constraints_2.f90
@@ -73,5 +73,3 @@ end module global
100 continue
200 format (2i6)
END
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_6.f03 b/gcc/testsuite/gfortran.dg/io_constraints_6.f03
index d0484f5f4f..be7b1c45b3 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_6.f03
+++ b/gcc/testsuite/gfortran.dg/io_constraints_6.f03
@@ -36,5 +36,3 @@ program main
read (*, nml=definable)
write (*, nml=definable)
end program main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/io_constraints_7.f03 b/gcc/testsuite/gfortran.dg/io_constraints_7.f03
index 4d18491981..6b686f38d2 100644
--- a/gcc/testsuite/gfortran.dg/io_constraints_7.f03
+++ b/gcc/testsuite/gfortran.dg/io_constraints_7.f03
@@ -33,5 +33,3 @@ program main
open (newunit=a, file="foo") ! { dg-error "variable definition context" }
close (unit=a)
end program main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/io_err_1.f90 b/gcc/testsuite/gfortran.dg/io_err_1.f90
new file mode 100644
index 0000000000..4159a041a7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/io_err_1.f90
@@ -0,0 +1,14 @@
+! { dg-do run }
+! { dg-shouldfail "Compile-time specifier checking" }
+!
+! Contributed by Dominique Dhumieres <dominiq at lps dot ens dot fr>
+program read
+ character(50) :: buf='0.D99999'
+ double precision val
+ read (UNIT=buf, FMT='(D60.0)', ERR=10) Val
+ call abort
+10 read (UNIT=buf, FMT='(D60.0)') Val
+end program read
+! { dg-output "At line 10 of file.*" }
+! { dg-output "Fortran runtime error: Bad value during floating point read" }
+
diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_3.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_3.f90
index 8043167cd7..abf02ba168 100644
--- a/gcc/testsuite/gfortran.dg/io_real_boz_3.f90
+++ b/gcc/testsuite/gfortran.dg/io_real_boz_3.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run }
! { dg-options "-std=f2008" }
! { dg-require-effective-target fortran_real_16 }
!
diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_4.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_4.f90
index f2c2aca4bd..044f755e23 100644
--- a/gcc/testsuite/gfortran.dg/io_real_boz_4.f90
+++ b/gcc/testsuite/gfortran.dg/io_real_boz_4.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run }
! { dg-options "-std=f2003" }
! { dg-require-effective-target fortran_real_16 }
!
diff --git a/gcc/testsuite/gfortran.dg/io_real_boz_5.f90 b/gcc/testsuite/gfortran.dg/io_real_boz_5.f90
index db8e6e7557..a908dd7bbc 100644
--- a/gcc/testsuite/gfortran.dg/io_real_boz_5.f90
+++ b/gcc/testsuite/gfortran.dg/io_real_boz_5.f90
@@ -1,4 +1,4 @@
-! { dg-do run }
+! { dg-do run }
! { dg-options "-std=f2008" }
! { dg-require-effective-target fortran_real_16 }
!
diff --git a/gcc/testsuite/gfortran.dg/ipcp-array-1.f90 b/gcc/testsuite/gfortran.dg/ipcp-array-1.f90
new file mode 100644
index 0000000000..e39109c976
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/ipcp-array-1.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! { dg-options "-O2 -fdump-ipa-cp-details -fno-inline -fdump-tree-optimized" }
+
+subroutine bar (a, b, n)
+ integer :: a(n), b(n)
+ call foo (a, b)
+contains
+subroutine foo (a, b)
+ integer :: a(:), b(:)
+ a = b
+end subroutine
+end
+
+! { dg-final { scan-ipa-dump "Creating a specialized node of foo" "cp" } }
+! { dg-final { scan-ipa-dump-times "Aggregate replacements\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=" 2 "cp" } }
+! { dg-final { cleanup-ipa-dump "cp" } }
+! { dg-final { scan-tree-dump-not "stride;" "optimized" } }
+! { dg-final { scan-tree-dump-not "lbound;" "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90 b/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90
index d9f9dfdd79..71fde9db68 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_3.f90
@@ -23,5 +23,3 @@ end module test_mod
subroutine test
use test_mod
end subroutine test
-
-! { dg-final { cleanup-modules "test_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_4.f90 b/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_4.f90
index 8a87fe5f50..4c35264d93 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_4.f90
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_compiler_4.f90
@@ -14,5 +14,3 @@ module mymod
public :: c_null_ptr
end module mymod
-
-! { dg-final { cleanup-modules "mymod" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f03 b/gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f03
index 0a0099628b..45eaa5c244 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f03
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_init_expr.f03
@@ -5,7 +5,7 @@ use iso_c_binding
implicit none
integer, target :: a
type t
- type(c_ptr) :: ptr = c_loc(a) ! { dg-error "must be an intrinsic function" }
+ type(c_ptr) :: ptr = c_loc(a) ! { dg-error "Intrinsic function 'c_loc' at .1. is not permitted in an initialization expression" }
end type t
-type(c_ptr) :: ptr2 = c_loc(a) ! { dg-error "must be an intrinsic function" }
+type(c_ptr) :: ptr2 = c_loc(a) ! { dg-error "Intrinsic function 'c_loc' at .1. is not permitted in an initialization expression" }
end
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_only.f03 b/gcc/testsuite/gfortran.dg/iso_c_binding_only.f03
index dff4318e80..be2fbbf43f 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_only.f03
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_only.f03
@@ -7,5 +7,3 @@ module iso_c_binding_only
! a mangled name to prevent collisions.
integer :: c_ptr
end module iso_c_binding_only
-! { dg-final { cleanup-modules "iso_c_binding_only" } }
-
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03 b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03
index 799ba35e9b..12828a7f54 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_1.f03
@@ -80,5 +80,3 @@ contains
end if
end subroutine sub4
end module iso_c_binding_rename_1
-
-! { dg-final { cleanup-modules "iso_c_binding_rename_0 iso_c_binding_rename_1" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_rename_2.f03 b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_2.f03
index e7c18db2f1..75797e78f7 100644
--- a/gcc/testsuite/gfortran.dg/iso_c_binding_rename_2.f03
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_2.f03
@@ -38,5 +38,3 @@ contains
end subroutine sub4
end module mod2
-
-! { dg-final { cleanup-modules "mod0 mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_c_binding_rename_3.f90 b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_3.f90
new file mode 100644
index 0000000000..bbe17cb896
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/iso_c_binding_rename_3.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR fortran/55343
+!
+! Contributed by Janus Weil
+!
+module my_mod
+ implicit none
+ type int_type
+ integer :: i
+ end type int_type
+end module my_mod
+program main
+ use iso_c_binding, only: C_void_ptr=>C_ptr, C_string_ptr=>C_ptr
+ use my_mod, only: i1_type=>int_type, i2_type=>int_type
+ implicit none
+ type(C_string_ptr) :: p_string
+ type(C_void_ptr) :: p_void
+ type (i1_type) :: i1
+ type (i2_type) :: i2
+ p_void = p_string
+ i1 = i2
+end program main
diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_1.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_1.f90
index dfcf49bf96..17e9c7ade3 100644
--- a/gcc/testsuite/gfortran.dg/iso_fortran_env_1.f90
+++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_1.f90
@@ -41,4 +41,3 @@ program test
call bar
call bar2
end
-! { dg-final { cleanup-modules "iso_fortran_env" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_2.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_2.f90
index 6f8d228d92..1c5f69715a 100644
--- a/gcc/testsuite/gfortran.dg/iso_fortran_env_2.f90
+++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_2.f90
@@ -72,5 +72,3 @@ subroutine gee5
use ,non_intrinsic :: iso_fortran_env
print *, x
end
-
-! { dg-final { cleanup-modules "iso_fortran_env" } }
diff --git a/gcc/testsuite/gfortran.dg/iso_fortran_env_4.f90 b/gcc/testsuite/gfortran.dg/iso_fortran_env_4.f90
index 515269bd7e..48d13a8330 100644
--- a/gcc/testsuite/gfortran.dg/iso_fortran_env_4.f90
+++ b/gcc/testsuite/gfortran.dg/iso_fortran_env_4.f90
@@ -11,4 +11,3 @@ subroutine truc
use, non_intrinsic :: iso_fortran_env
use, intrinsic :: iso_fortran_env ! { dg-error "conflicts with non-intrinsic module" }
end subroutine truc
-! { dg-final { cleanup-modules "iso_fortran_env" } }
diff --git a/gcc/testsuite/gfortran.dg/kind_tests_2.f03 b/gcc/testsuite/gfortran.dg/kind_tests_2.f03
index 2a0d7c985d..d740657a26 100644
--- a/gcc/testsuite/gfortran.dg/kind_tests_2.f03
+++ b/gcc/testsuite/gfortran.dg/kind_tests_2.f03
@@ -5,5 +5,3 @@ module kind_tests_2
integer, parameter :: myFKind = c_float
real(myFKind), bind(c) :: myF
end module kind_tests_2
-
-! { dg-final { cleanup-modules "kind_tests_2" } }
diff --git a/gcc/testsuite/gfortran.dg/kind_tests_3.f03 b/gcc/testsuite/gfortran.dg/kind_tests_3.f03
index af041b0f9e..83cb91e95d 100644
--- a/gcc/testsuite/gfortran.dg/kind_tests_3.f03
+++ b/gcc/testsuite/gfortran.dg/kind_tests_3.f03
@@ -8,5 +8,3 @@ module my_module
use my_kinds
real(myFKind), bind(c) :: myF
end module my_module
-
-! { dg-final { cleanup-modules "my_kinds my_module" } }
diff --git a/gcc/testsuite/gfortran.dg/large_integer_kind_1.f90 b/gcc/testsuite/gfortran.dg/large_integer_kind_1.f90
index 2f272db923..9511317901 100644
--- a/gcc/testsuite/gfortran.dg/large_integer_kind_1.f90
+++ b/gcc/testsuite/gfortran.dg/large_integer_kind_1.f90
@@ -36,5 +36,3 @@ program test
x = -huge(0_8)
call testoutput (x,-huge(0_8),50,'(I50)')
end program test
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/large_real_kind_1.f90 b/gcc/testsuite/gfortran.dg/large_real_kind_1.f90
index 28e406730f..0d95718eb4 100644
--- a/gcc/testsuite/gfortran.dg/large_real_kind_1.f90
+++ b/gcc/testsuite/gfortran.dg/large_real_kind_1.f90
@@ -75,5 +75,3 @@ program test
c2(1:1) = ' '
if (c1 /= c2) call abort
end program test
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/ldist-pr43023.f90 b/gcc/testsuite/gfortran.dg/ldist-pr43023.f90
index 7a298ea4b2..3e2d04c949 100644
--- a/gcc/testsuite/gfortran.dg/ldist-pr43023.f90
+++ b/gcc/testsuite/gfortran.dg/ldist-pr43023.f90
@@ -29,5 +29,3 @@ end do
END SUBROUTINE NFT_Init
END MODULE NFT_mod
-
-! { dg-final { cleanup-modules "nft_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/ldist-pr45199.f b/gcc/testsuite/gfortran.dg/ldist-pr45199.f
index 22b202e07e..e01d32f266 100644
--- a/gcc/testsuite/gfortran.dg/ldist-pr45199.f
+++ b/gcc/testsuite/gfortran.dg/ldist-pr45199.f
@@ -22,6 +22,6 @@
! GCC should apply memset zero loop distribution and it should not ICE.
-! { dg-final { scan-tree-dump "distributed: split to 9 loops" "ldist" } }
+! { dg-final { scan-tree-dump "distributed: split to 0 loops and 9 library calls" "ldist" } }
! { dg-final { scan-tree-dump-times "generated memset zero" 9 "ldist" } }
! { dg-final { cleanup-tree-dump "ldist" } }
diff --git a/gcc/testsuite/gfortran.dg/list_read_11.f90 b/gcc/testsuite/gfortran.dg/list_read_11.f90
new file mode 100644
index 0000000000..10344a1959
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/list_read_11.f90
@@ -0,0 +1,38 @@
+! { dg-do run }
+! { dg-options "-fbackslash" }
+!
+! PR fortran/57633
+!
+program teststuff
+ implicit none
+ integer::a
+ character(len=10)::s1,s2
+
+ open(11,file="testcase.txt",form='unformatted',access='stream',status='new')
+ write(11) 'line1,1,\r\nline2'
+ close(11)
+
+ open(11,file="testcase.txt",form='formatted')
+ s1 = repeat('x', len(s1))
+ a = 99
+ read(11,*)s1,a
+ if (s1 /= "line1" .or. a /= 1) call abort()
+
+ s1 = repeat('x', len(s1))
+ read(11,"(a)")s1
+ close(11,status="delete")
+ if (s1 /= "line2") call abort()
+
+
+ open(11,file="testcase.txt",form='unformatted',access='stream',status='new')
+ write(11) 'word1\rword2,\n'
+ close(11)
+
+ open(11,file="testcase.txt",form='formatted')
+ s1 = repeat('x', len(s1))
+ s2 = repeat('x', len(s1))
+ read(11,*)s1,s2
+ close(11,status="delete")
+ if (s1 /= "word1") call abort()
+ if (s2 /= "word2") call abort()
+end program teststuff
diff --git a/gcc/testsuite/gfortran.dg/list_read_12.f90 b/gcc/testsuite/gfortran.dg/list_read_12.f90
new file mode 100644
index 0000000000..811ef152a5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/list_read_12.f90
@@ -0,0 +1,11 @@
+! { dg-do run }
+! PR58324 Bogus end of file condition
+integer :: i, ios
+open(99, access='stream', form='unformatted')
+write(99) "5 a"
+close(99)
+
+open(99, access='sequential', form='formatted')
+read(99, *, iostat=ios) i
+if (ios /= 0) call abort
+end
diff --git a/gcc/testsuite/gfortran.dg/list_read_13.f b/gcc/testsuite/gfortran.dg/list_read_13.f
new file mode 100644
index 0000000000..0f8efd86c3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/list_read_13.f
@@ -0,0 +1,13 @@
+c { dg-do run }
+c PR61049, reduced test case by Dominique d'Humieres
+ character(len=30) :: buff = ", (2.0, 3.0),,6.0D0, 2*,"
+ DOUBLE PRECISION AVD, BVD, CVD, DVCORR
+ COMPLEX AVC, BVC, CVC, ZVCORR
+
+ read(buff, *, err=10) AVD, AVC, BVC, BVD, CVC, CVD
+ goto 20
+ 10 call abort
+ 20 continue
+ end
+
+
diff --git a/gcc/testsuite/gfortran.dg/lto/20100222-1_0.f03 b/gcc/testsuite/gfortran.dg/lto/20100222-1_0.f03
index fece781543..e94ec97d1b 100644
--- a/gcc/testsuite/gfortran.dg/lto/20100222-1_0.f03
+++ b/gcc/testsuite/gfortran.dg/lto/20100222-1_0.f03
@@ -32,4 +32,3 @@ program main
p = c_funloc(ffunc)
call callFunc(p, 21,-17*21)
end program main
-! { dg-final { cleanup-modules "c_funloc_tests_3" } }
diff --git a/gcc/testsuite/gfortran.dg/lto/lto.exp b/gcc/testsuite/gfortran.dg/lto/lto.exp
index e211426db2..3e329792ef 100644
--- a/gcc/testsuite/gfortran.dg/lto/lto.exp
+++ b/gcc/testsuite/gfortran.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -34,17 +34,17 @@ load_lib gfortran-dg.exp
# Load the language-independent compabibility support procedures.
load_lib lto.exp
+# If LTO has not been enabled, bail.
+if { ![check_effective_target_lto] } {
+ return
+}
+
lto_init no-mathlib
# Define an identifier for use with this suite to avoid name conflicts
# with other lto tests running at the same time.
set sid "f_lto"
-# If LTO has not been enabled, bail.
-if { ![check_effective_target_lto] } {
- return
-}
-
# Main loop.
foreach src [lsort [glob -nocomplain $srcdir/$subdir/*_0.\[fF\]{,90,95,03,08} ]] {
# If we're only testing specific files and this isn't one of them, skip it.
diff --git a/gcc/testsuite/gfortran.dg/lto/pr40725_0.f03 b/gcc/testsuite/gfortran.dg/lto/pr40725_0.f03
index db783159a2..91d84bd074 100644
--- a/gcc/testsuite/gfortran.dg/lto/pr40725_0.f03
+++ b/gcc/testsuite/gfortran.dg/lto/pr40725_0.f03
@@ -13,5 +13,3 @@ contains
end if
end subroutine sub0
end module bind_c_dts_2
-
-! { dg-final { cleanup-modules "bind_c_dts_2" } }
diff --git a/gcc/testsuite/gfortran.dg/lto/pr45586-2_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr45586-2_0.f90
index 52e2bb1e6d..5f9e5027a1 100644
--- a/gcc/testsuite/gfortran.dg/lto/pr45586-2_0.f90
+++ b/gcc/testsuite/gfortran.dg/lto/pr45586-2_0.f90
@@ -30,5 +30,3 @@ END MODULE
USE M2
CALL S1()
END
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/lto/pr45586_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr45586_0.f90
index 551ba6c424..84f3633df7 100644
--- a/gcc/testsuite/gfortran.dg/lto/pr45586_0.f90
+++ b/gcc/testsuite/gfortran.dg/lto/pr45586_0.f90
@@ -27,5 +27,3 @@
CALL S1(x)
write(6,*) x%r
END
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/lto/pr47839_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr47839_0.f90
index ec7fe3f242..9ea9315284 100644
--- a/gcc/testsuite/gfortran.dg/lto/pr47839_0.f90
+++ b/gcc/testsuite/gfortran.dg/lto/pr47839_0.f90
@@ -6,5 +6,3 @@ MODULE globalvar_mod
integer :: xstop
CONTAINS
END MODULE globalvar_mod
-
-! { dg-final { cleanup-modules "globalvar_mod pec_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90 b/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90
new file mode 100644
index 0000000000..e121879859
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/lto/pr60635_0.f90
@@ -0,0 +1,16 @@
+! { dg-lto-do link }
+program test
+ use iso_fortran_env
+
+ interface
+ integer(int16) function bigendc16(x) bind(C)
+ import
+ integer(int16), intent(in) :: x
+ end function
+ end interface
+
+ integer(int16) :: x16 = 12345
+ x16 = bigendc16(x16)
+ print *,x16
+end program
+
diff --git a/gcc/testsuite/gfortran.dg/lto/pr60635_1.c b/gcc/testsuite/gfortran.dg/lto/pr60635_1.c
new file mode 100644
index 0000000000..eddc569e65
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/lto/pr60635_1.c
@@ -0,0 +1,14 @@
+#include <stdint.h>
+#include <stdbool.h>
+
+static bool littleendian=true;
+
+uint16_t bigendc16(union{uint16_t * n;uint8_t* b;}x){
+
+ if (!littleendian) return *x.n;
+
+ uint16_t res = ((uint16_t)(x.b[1])<<0) |
+ ((uint16_t)(x.b[0])<<8);
+ return res;
+}
+
diff --git a/gcc/testsuite/gfortran.dg/mapping_1.f90 b/gcc/testsuite/gfortran.dg/mapping_1.f90
index 02042c0262..eda198e828 100644
--- a/gcc/testsuite/gfortran.dg/mapping_1.f90
+++ b/gcc/testsuite/gfortran.dg/mapping_1.f90
@@ -67,4 +67,3 @@ program spec_test
c_size = 5
if (tricky ('Help me', butt_ugly) .ne. transfer (butt_ugly (1), chr)) call abort ()
end program spec_test
-! { dg-final { cleanup-modules "mykinds spec_xpr xtra_fun" } }
diff --git a/gcc/testsuite/gfortran.dg/mapping_2.f90 b/gcc/testsuite/gfortran.dg/mapping_2.f90
index 9104184a59..1245c6640b 100644
--- a/gcc/testsuite/gfortran.dg/mapping_2.f90
+++ b/gcc/testsuite/gfortran.dg/mapping_2.f90
@@ -29,4 +29,3 @@ program len_test
if (my_string(x) .ne. "01234567890") call abort ()
end program len_test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90 b/gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90
index 7ba103d616..b1c7ca752d 100644
--- a/gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90
+++ b/gcc/testsuite/gfortran.dg/maxloc_bounds_4.f90
@@ -19,5 +19,3 @@ program main
call foo(res)
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
-! { dg-final { cleanup-modules "tst" } }
-
diff --git a/gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90 b/gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90
index 34d06da55a..ad93d238e7 100644
--- a/gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90
+++ b/gcc/testsuite/gfortran.dg/maxloc_bounds_5.f90
@@ -19,4 +19,3 @@ program main
call foo(res)
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
-! { dg-final { cleanup-modules "tst" } }
diff --git a/gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90 b/gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90
index 817bf8fac3..206a29b149 100644
--- a/gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90
+++ b/gcc/testsuite/gfortran.dg/maxloc_bounds_7.f90
@@ -19,4 +19,3 @@ program main
call foo(res)
end program main
! { dg-output "Fortran runtime error: Incorrect extent in return value of MAXLOC intrinsic: is 3, should be 2" }
-! { dg-final { cleanup-modules "tst" } }
diff --git a/gcc/testsuite/gfortran.dg/merge_char_1.f90 b/gcc/testsuite/gfortran.dg/merge_char_1.f90
index 5974e8c06c..ece939eea0 100644
--- a/gcc/testsuite/gfortran.dg/merge_char_1.f90
+++ b/gcc/testsuite/gfortran.dg/merge_char_1.f90
@@ -4,6 +4,13 @@
! PR 15327
! The merge intrinsic didn't work for strings
character*2 :: c(2)
+logical :: ll(2)
+
+ll = (/ .TRUE., .FALSE. /)
+c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), ll )
+if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
+
+c = ""
c = merge( (/ "AA", "BB" /), (/ "CC", "DD" /), (/ .TRUE., .FALSE. /) )
if (c(1).ne."AA" .or. c(2).ne."DD") call abort ()
end
diff --git a/gcc/testsuite/gfortran.dg/merge_char_3.f90 b/gcc/testsuite/gfortran.dg/merge_char_3.f90
index 498e3ec73c..114214136e 100644
--- a/gcc/testsuite/gfortran.dg/merge_char_3.f90
+++ b/gcc/testsuite/gfortran.dg/merge_char_3.f90
@@ -12,7 +12,8 @@ subroutine foo(a)
implicit none
character(len=*) :: a
character(len=3) :: b
-print *, merge(a,b,.true.) ! Unequal character lengths
+logical :: ll = .true.
+print *, merge(a,b,ll) ! Unequal character lengths
end subroutine foo
call foo("ab")
diff --git a/gcc/testsuite/gfortran.dg/merge_init_expr_2.f90 b/gcc/testsuite/gfortran.dg/merge_init_expr_2.f90
new file mode 100644
index 0000000000..9b20310caf
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/merge_init_expr_2.f90
@@ -0,0 +1,58 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56649
+! MERGE was not properly compile-time simplified
+!
+! Contributed by Bill Long
+!
+module m
+ implicit none
+
+ integer, parameter :: int32 = 4
+ type MPI_Datatype
+ integer :: i
+ end type MPI_Datatype
+
+ integer,private,parameter :: dik = kind(0)
+ type(MPI_Datatype),parameter,private :: MPIx_I4 = MPI_Datatype( 1275069467)
+ type(MPI_Datatype),parameter,private :: MPIx_I8 = MPI_Datatype( 1275070491)
+ type(MPI_Datatype),parameter :: MPI_INTEGER = merge(MPIx_I4, MPIx_I8, &
+ dik==int32)
+contains
+ subroutine foo
+ integer :: check1
+ check1 = MPI_INTEGER%i
+ end subroutine foo
+end module m
+
+module m2
+ implicit none
+ integer, parameter :: int32 = 4
+ type MPI_Datatype
+ integer :: i
+ end type MPI_Datatype
+
+ integer,private,parameter :: dik = kind(0)
+ type(MPI_Datatype),parameter,private :: MPIx_I4 = MPI_Datatype( 1275069467)
+ type(MPI_Datatype),parameter,private :: MPIx_I8 = MPI_Datatype( 1275070491)
+ type(MPI_Datatype),parameter :: MPI_INTEGER(1) = merge([MPIx_I4], [MPIx_I8], &
+ [dik==int32])
+contains
+ subroutine foo
+ logical :: check2
+ check2 = MPI_INTEGER(1)%i == 1275069467
+ end subroutine foo
+end module m2
+
+
+subroutine test
+ character(len=3) :: one, two, three
+ logical, parameter :: true = .true.
+ three = merge (one, two, true)
+end subroutine test
+
+! { dg-final { scan-tree-dump-times "check1 = 1275069467;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "check2 = 1;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "__builtin_memmove ..void .. &three, .void .. &one, 3.;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/min_max_conformance_2.f90 b/gcc/testsuite/gfortran.dg/min_max_conformance_2.f90
new file mode 100644
index 0000000000..085206c492
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/min_max_conformance_2.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/57894
+!
+! Contributed by Vittorio Zecca
+!
+print *, max(a2=2,a65=45,a2=5) ! { dg-error "has already appeared in the current argument list" }
+print *, min(a1=2.0,a65=45.0,a2=5.0e0) ! OK
+print *, max(a2=2,a65=45,a3=5) ! { dg-error "Missing 'a1' argument to the max intrinsic" }
+print *, min(a1=2.0,a65=45.0,a3=5.0e0) ! { dg-error "Missing 'a2' argument to the min intrinsic" }
+print *, min1(2.0,a1=45.0,a2=5.0e0) ! { dg-error "Duplicate argument 'a1'" }
+
+print *, max0(a1=2,a65a=45,a2=5) ! { dg-error "Unknown argument 'a65a'" }
+print *, amax0(a1=2,as65=45,a2=5) ! { dg-error "Unknown argument 'as65'" }
+print *, max1(a1=2,a2=45,5) ! { dg-error "Missing keyword name in actual argument list" }
+print *, amax1(a1=2,a3=45,a4=5) ! { dg-error "Missing 'a2' argument" }
+print *, dmax1(a1=2,a2=45,a4z=5) ! { dg-error "Unknown argument 'a4z'" }
+
+print *, min0(a1=2,a65a=45,a2=5) ! { dg-error "Unknown argument 'a65a'" }
+print *, amin0(a1=2,as65=45,a2=5) ! { dg-error "Unknown argument 'as65'" }
+print *, min1(a1=2,a2=45,5) ! { dg-error "Missing keyword name in actual argument list" }
+print *, amin1(a1=2,a3=45,a4=5) ! { dg-error "Missing 'a2' argument" }
+print *, dmin1(a1=2,a2=45,a4z=5) ! { dg-error "Unknown argument 'a4z'" }
+end
diff --git a/gcc/testsuite/gfortran.dg/minloc_3.f90 b/gcc/testsuite/gfortran.dg/minloc_3.f90
index b1655e9814..465c77c999 100644
--- a/gcc/testsuite/gfortran.dg/minloc_3.f90
+++ b/gcc/testsuite/gfortran.dg/minloc_3.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
real :: a(30), m
real, allocatable :: c(:)
integer :: e(30), n, ia(1)
diff --git a/gcc/testsuite/gfortran.dg/minlocval_3.f90 b/gcc/testsuite/gfortran.dg/minlocval_3.f90
index 6a4fc558a3..5b25d05776 100644
--- a/gcc/testsuite/gfortran.dg/minlocval_3.f90
+++ b/gcc/testsuite/gfortran.dg/minlocval_3.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
real :: a(30), b(10, 10), m
real, allocatable :: c(:), d(:, :)
integer :: e(30), f(10, 10), n
diff --git a/gcc/testsuite/gfortran.dg/missing_derived_type_1.f90 b/gcc/testsuite/gfortran.dg/missing_derived_type_1.f90
index c890927179..0e6623ef40 100644
--- a/gcc/testsuite/gfortran.dg/missing_derived_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/missing_derived_type_1.f90
@@ -11,4 +11,3 @@ module test
type(nonexist),pointer :: l ! { dg-error "has not been declared" }
end type epot_t
end module test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90 b/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
index 100784d870..d6d0cf0952 100644
--- a/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
+++ b/gcc/testsuite/gfortran.dg/missing_optional_dummy_2.f90
@@ -36,5 +36,3 @@ contains
if (.not.present(substr)) isscan = myscan ("foo", "over")
end function isscan
end
-! { dg-final { cleanup-modules "myint" } }
-
diff --git a/gcc/testsuite/gfortran.dg/missing_optional_dummy_4.f90 b/gcc/testsuite/gfortran.dg/missing_optional_dummy_4.f90
index 9b1a574d79..30db273c5d 100644
--- a/gcc/testsuite/gfortran.dg/missing_optional_dummy_4.f90
+++ b/gcc/testsuite/gfortran.dg/missing_optional_dummy_4.f90
@@ -24,5 +24,3 @@ end module krmod
! { dg-final { scan-tree-dump " tm_doit \\(0B, 0\\);" "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "krmod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/missing_optional_dummy_5.f90 b/gcc/testsuite/gfortran.dg/missing_optional_dummy_5.f90
index 29a9d70f89..1130d43f40 100644
--- a/gcc/testsuite/gfortran.dg/missing_optional_dummy_5.f90
+++ b/gcc/testsuite/gfortran.dg/missing_optional_dummy_5.f90
@@ -25,5 +25,3 @@ end module krmod
! { dg-final { scan-tree-dump " tm_doit \\(&parm\.., 0B, 0\\);" "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "krmod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/mod_large_1.f90 b/gcc/testsuite/gfortran.dg/mod_large_1.f90
new file mode 100644
index 0000000000..1047ad62e9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/mod_large_1.f90
@@ -0,0 +1,16 @@
+! { dg-do run }
+! PR fortran/24518
+! MOD/MODULO of large arguments.
+! The naive algorithm goes pear-shaped for large arguments, instead
+! use fmod.
+! Here we test only with constant arguments (evaluated with
+! mpfr_fmod), as we don't want to cause failures on targets with a
+! crappy libm.
+program mod_large_1
+ implicit none
+ real :: r1
+ r1 = mod (1e22, 1.7)
+ if (abs(r1 - 0.995928764) > 1e-5) call abort
+ r1 = modulo (1e22, -1.7)
+ if (abs(r1 + 0.704071283) > 1e-5) call abort
+end program mod_large_1
diff --git a/gcc/testsuite/gfortran.dg/mod_sign0_1.f90 b/gcc/testsuite/gfortran.dg/mod_sign0_1.f90
new file mode 100644
index 0000000000..61ef5fd046
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/mod_sign0_1.f90
@@ -0,0 +1,54 @@
+! { dg-do run }
+! PR fortran/49010
+! MOD/MODULO sign of zero.
+
+! We wish to provide the following guarantees:
+
+! MOD(A, P): The result has the sign of A and a magnitude less than
+! that of P.
+
+! MODULO(A, P): The result has the sign of P and a magnitude less than
+! that of P.
+
+! Here we test only with constant arguments (evaluated with
+! mpfr_fmod), as we don't want to cause failures on targets with a
+! crappy libm. But, a target where fmod follows C99 Annex F is
+! fine. Also, targets where GCC inline expands fmod (such as x86(-64))
+! are also fine.
+program mod_sign0_1
+ implicit none
+ real :: r, t
+
+ r = mod (4., 2.)
+ t = sign (1., r)
+ if (t < 0.) call abort
+
+ r = modulo (4., 2.)
+ t = sign (1., r)
+ if (t < 0.) call abort
+
+ r = mod (-4., 2.)
+ t = sign (1., r)
+ if (t > 0.) call abort
+
+ r = modulo (-4., 2.)
+ t = sign (1., r)
+ if (t < 0.) call abort
+
+ r = mod (4., -2.)
+ t = sign (1., r)
+ if (t < 0.) call abort
+
+ r = modulo (4., -2.)
+ t = sign (1., r)
+ if (t > 0.) call abort
+
+ r = mod (-4., -2.)
+ t = sign (1., r)
+ if (t > 0.) call abort
+
+ r = modulo (-4., -2.)
+ t = sign (1., r)
+ if (t > 0.) call abort
+
+end program mod_sign0_1
diff --git a/gcc/testsuite/gfortran.dg/module_blank_common.f90 b/gcc/testsuite/gfortran.dg/module_blank_common.f90
index a06ff0098e..1eab444938 100644
--- a/gcc/testsuite/gfortran.dg/module_blank_common.f90
+++ b/gcc/testsuite/gfortran.dg/module_blank_common.f90
@@ -15,5 +15,3 @@ program blank_common
b = -999.0_4
if (z.ne.cmplx (a,b)) call abort ()
end program blank_common
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/module_commons_1.f90 b/gcc/testsuite/gfortran.dg/module_commons_1.f90
index bd2c7f99be..73d5257f7a 100644
--- a/gcc/testsuite/gfortran.dg/module_commons_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_commons_1.f90
@@ -21,5 +21,3 @@ program collision
b = 99.0
call foo ()
end program collision
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/module_commons_2.f90 b/gcc/testsuite/gfortran.dg/module_commons_2.f90
index 3c3214c20f..a61008166e 100644
--- a/gcc/testsuite/gfortran.dg/module_commons_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_commons_2.f90
@@ -17,5 +17,3 @@ end module h5global
program bug
use h5global
end
-
-! { dg-final { cleanup-modules "h5global" } }
diff --git a/gcc/testsuite/gfortran.dg/module_commons_3.f90 b/gcc/testsuite/gfortran.dg/module_commons_3.f90
index e60cf9b530..89c71b897e 100644
--- a/gcc/testsuite/gfortran.dg/module_commons_3.f90
+++ b/gcc/testsuite/gfortran.dg/module_commons_3.f90
@@ -54,4 +54,3 @@ PROGRAM TEST1
call BAR (T2)
CALL FOOBAR (T2)
END PROGRAM TEST1
-! { dg-final { cleanup-modules "test2 test3 test4" } }
diff --git a/gcc/testsuite/gfortran.dg/module_double_reuse.f90 b/gcc/testsuite/gfortran.dg/module_double_reuse.f90
index 694e821b78..04e851220a 100644
--- a/gcc/testsuite/gfortran.dg/module_double_reuse.f90
+++ b/gcc/testsuite/gfortran.dg/module_double_reuse.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
! Test of fix for PR18878
!
! Based on example in PR by Steve Kargl
@@ -16,5 +17,3 @@ program d
if (kind(x).ne.kind(y)) call abort ()
if (v.ne.u) call abort ()
end program d
-
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_1.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_1.f90
index fecfb89fac..50a19f2a43 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_1.f90
@@ -22,5 +22,3 @@ program module_equiv
c = (/99.0_4, 999.0_4, 999.0_4, 99.0_4/)
call foo ()
end program module_equiv
-
-! { dg-final { cleanup-modules "test_equiv" } }
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_2.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
index f6a3c34039..3ec8efb41a 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_2.f90
@@ -22,4 +22,3 @@ end module b
reM = 0.57d1
if (M .ne. 0.57d1) call abort ()
end
-! { dg-final { cleanup-modules "a b" } }
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_3.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_3.f90
index d646f97407..75b90285a2 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_3.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_3.f90
@@ -34,5 +34,3 @@ contains
if (any(d(3:5) .ne. b)) call abort ()
end subroutine
end
-
-! { dg-final { cleanup-modules "aap" } }
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_4.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_4.f90
index c30fd52058..09eb914af0 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_4.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_4.f90
@@ -25,5 +25,3 @@ end subroutine nudata
real :: a_(2) = (/1.,2./)
call nudata (nlibe_, a_, l_)
end
-
-! { dg-final { cleanup-modules "data_c" } }
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_5.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_5.f90
index de1d5043d7..e5acfaaa9d 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_5.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_5.f90
@@ -29,6 +29,3 @@ program try_cf004
nf2 = 2
call cf0004
end
-
-! { dg-final { cleanup-modules "stuff" } }
-
diff --git a/gcc/testsuite/gfortran.dg/module_equivalence_6.f90 b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
index 40e8b4b788..67a52358e2 100644
--- a/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
+++ b/gcc/testsuite/gfortran.dg/module_equivalence_6.f90
@@ -19,4 +19,3 @@ PROGRAM fortranlibtest
INTEGER :: ii
ii = H5P_DEFAULT_F
END PROGRAM fortranlibtest
-! { dg-final { cleanup-modules "h5global hdf5" } }
diff --git a/gcc/testsuite/gfortran.dg/module_function_type_1.f90 b/gcc/testsuite/gfortran.dg/module_function_type_1.f90
index a1063b1496..793205cf59 100644
--- a/gcc/testsuite/gfortran.dg/module_function_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_function_type_1.f90
@@ -28,6 +28,3 @@ program C
type(A_type):: A_var
A_var = initA()
end program C
-
-! { dg-final { cleanup-modules "a b" } }
-
diff --git a/gcc/testsuite/gfortran.dg/module_implicit_conversion.f90 b/gcc/testsuite/gfortran.dg/module_implicit_conversion.f90
index d7835a7f96..9626f951b1 100644
--- a/gcc/testsuite/gfortran.dg/module_implicit_conversion.f90
+++ b/gcc/testsuite/gfortran.dg/module_implicit_conversion.f90
@@ -5,5 +5,3 @@ module module_implicit_conversion
! double complex :: s = (1.0D0, 0D0)
double complex :: s = (1.0, 0D0)
end module module_implicit_conversion
-
-! { dg-final { cleanup-modules "module_implicit_conversion" } }
diff --git a/gcc/testsuite/gfortran.dg/module_interface_1.f90 b/gcc/testsuite/gfortran.dg/module_interface_1.f90
index 54ea14bcae..354aa97f64 100644
--- a/gcc/testsuite/gfortran.dg/module_interface_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_interface_1.f90
@@ -34,5 +34,3 @@
return
end subroutine Selection_Sort
end program module_interface
-
-! { dg-final { cleanup-modules "max_loc_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/module_interface_2.f90 b/gcc/testsuite/gfortran.dg/module_interface_2.f90
index 1f9fde81ed..d233797da5 100644
--- a/gcc/testsuite/gfortran.dg/module_interface_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_interface_2.f90
@@ -28,4 +28,3 @@ end module foo_mod
print *, two (2.3)
print *, dbl (2.3)
end program xfoo
-! { dg-final { cleanup-modules "foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/module_md5_1.f90 b/gcc/testsuite/gfortran.dg/module_md5_1.f90
deleted file mode 100644
index 0816a7053f..0000000000
--- a/gcc/testsuite/gfortran.dg/module_md5_1.f90
+++ /dev/null
@@ -1,14 +0,0 @@
-! Check that we can write a module file, that it has a correct MD5 sum,
-! and that we can read it back.
-!
-! { dg-do compile }
-module foo
- integer(kind=4), parameter :: pi = 3_4
-end module foo
-
-program test
- use foo
- print *, pi
-end program test
-! { dg-final { scan-module "foo" "MD5:510304affe70481794fecdb22fc9ca0c" } }
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/module_naming_1.f90 b/gcc/testsuite/gfortran.dg/module_naming_1.f90
index 8024300fb0..2a2d00b1d3 100644
--- a/gcc/testsuite/gfortran.dg/module_naming_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_naming_1.f90
@@ -29,4 +29,3 @@ contains
! mangled to __m2_mod_m2_MOD_m3
end subroutine m3
end module m2_MOD_m2
-! { dg-final { cleanup-modules "m1 m1__m2 m2 m2_mod_m2" } }
diff --git a/gcc/testsuite/gfortran.dg/module_nan.f90 b/gcc/testsuite/gfortran.dg/module_nan.f90
index 202781f07c..5f41514bc0 100644
--- a/gcc/testsuite/gfortran.dg/module_nan.f90
+++ b/gcc/testsuite/gfortran.dg/module_nan.f90
@@ -26,5 +26,3 @@ program a
write(str,*) nan
if (adjustl(str) /= "NaN") call abort()
end program a
-
-! { dg-final { cleanup-modules "nonordinal" } }
diff --git a/gcc/testsuite/gfortran.dg/module_parameter_array_refs_1.f90 b/gcc/testsuite/gfortran.dg/module_parameter_array_refs_1.f90
index 592e2f3dd2..9ef75d9e69 100644
--- a/gcc/testsuite/gfortran.dg/module_parameter_array_refs_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_parameter_array_refs_1.f90
@@ -10,5 +10,3 @@ module foo
integer :: arr(max(len,1))
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/module_parameter_array_refs_2.f90 b/gcc/testsuite/gfortran.dg/module_parameter_array_refs_2.f90
index 385761d1d1..7324ff6c51 100644
--- a/gcc/testsuite/gfortran.dg/module_parameter_array_refs_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_parameter_array_refs_2.f90
@@ -19,5 +19,3 @@ integer :: i
i = 1
if (para(i) /= 1) call i_am_optimized_away()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/module_private_1.f90 b/gcc/testsuite/gfortran.dg/module_private_1.f90
index 7d854a1a95..66bc56405b 100644
--- a/gcc/testsuite/gfortran.dg/module_private_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_private_1.f90
@@ -18,5 +18,3 @@ program main
j = 1
print *, i, j
end program main
-
-! { dg-final { cleanup-modules "bar foo" } }
diff --git a/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90 b/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
index e2591ab4b6..56bd6f261e 100644
--- a/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_private_array_refs_1.f90
@@ -48,5 +48,3 @@ end
use bar
call sub ()
end
-
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90 b/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90
index 86c66c2fad..08f61b05f6 100644
--- a/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90
+++ b/gcc/testsuite/gfortran.dg/module_proc_external_dummy.f90
@@ -27,4 +27,3 @@ end module test_module
call sub_module (sub)
call sub_module (str)
end
-! { dg-final { cleanup-modules "test_module" } }
diff --git a/gcc/testsuite/gfortran.dg/module_procedure_1.f90 b/gcc/testsuite/gfortran.dg/module_procedure_1.f90
index 5e1fa15c72..35ec18c0b6 100644
--- a/gcc/testsuite/gfortran.dg/module_procedure_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_procedure_1.f90
@@ -50,4 +50,3 @@ subroutine test_sub(input1, input2)
if (mysum(1) /= 3 .and. mysum(2) /= 4) call abort
end subroutine test_sub
-! { dg-final { cleanup-modules "myoperator" } }
diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90
index 200f0ff26e..3987759f99 100644
--- a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_1.f90
@@ -20,4 +20,3 @@ contains
real x
end subroutine
end module
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90
index 9300215e74..b59e766f07 100644
--- a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_2.f90
@@ -21,4 +21,3 @@ contains
real x
end subroutine
end module
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_3.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_3.f90
new file mode 100644
index 0000000000..620f82ac1f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_3.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/49265
+!
+! Contributed by Erik Toussaint
+!
+module m1
+ implicit none
+ interface foo
+ procedure :: bar ! { dg-error "Fortran 2008: double colon in MODULE PROCEDURE statement" }
+ end interface
+contains
+ subroutine bar
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/module_procedure_double_colon_4.f90 b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_4.f90
new file mode 100644
index 0000000000..d56823c1f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_procedure_double_colon_4.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-std=f2008" }
+!
+! PR fortran/49265
+!
+! Contributed by Erik Toussaint
+!
+module m1
+ implicit none
+ interface foo
+ procedure :: bar ! "::" is valid since Fortran 2008
+ end interface
+contains
+ subroutine bar
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/module_read_1.f90 b/gcc/testsuite/gfortran.dg/module_read_1.f90
index 226c7366cd..ad3e3d1dcd 100644
--- a/gcc/testsuite/gfortran.dg/module_read_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_read_1.f90
@@ -27,4 +27,3 @@ program test
if(len(push(0)) /= 0) call abort()
if(len(push(1)) /= 1) call abort()
end program
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/module_read_2.f90 b/gcc/testsuite/gfortran.dg/module_read_2.f90
index d001ca7589..565c188f88 100644
--- a/gcc/testsuite/gfortran.dg/module_read_2.f90
+++ b/gcc/testsuite/gfortran.dg/module_read_2.f90
@@ -26,5 +26,3 @@ str%string = ['H','e','l','l','o']
if (len (string_to_char (str)) /= 5) call abort ()
if (string_to_char (str) /= "Hello") call abort ()
end
-
-! { dg-final { cleanup-modules "m_string" } }
diff --git a/gcc/testsuite/gfortran.dg/module_variable_1.f90 b/gcc/testsuite/gfortran.dg/module_variable_1.f90
new file mode 100644
index 0000000000..fcf6df8d4a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_variable_1.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+module foo
+ integer, private :: i ! { dg-warning "Unused PRIVATE" }
+ integer, private :: j = 0
+contains
+ subroutine bar
+ j = j + 1
+ end subroutine bar
+end module foo
+
+module bar
+ private
+ integer :: i ! { dg-warning "Unused PRIVATE" }
+end module bar
diff --git a/gcc/testsuite/gfortran.dg/module_variable_2.f90 b/gcc/testsuite/gfortran.dg/module_variable_2.f90
new file mode 100644
index 0000000000..ed5b903ca2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/module_variable_2.f90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-Wall -fmodule-private" }
+
+module bar
+ integer :: i ! { dg-warning "Unused PRIVATE" }
+end module bar
diff --git a/gcc/testsuite/gfortran.dg/module_widestring_1.f90 b/gcc/testsuite/gfortran.dg/module_widestring_1.f90
index f2e9fe2352..c34091015d 100644
--- a/gcc/testsuite/gfortran.dg/module_widestring_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_widestring_1.f90
@@ -12,5 +12,3 @@ end module m
if (ichar(a(2:2)) /= 0) call abort
write (s,"(A)") a
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/module_write_1.f90 b/gcc/testsuite/gfortran.dg/module_write_1.f90
index 3b488ce55d..0613c92e16 100644
--- a/gcc/testsuite/gfortran.dg/module_write_1.f90
+++ b/gcc/testsuite/gfortran.dg/module_write_1.f90
@@ -56,4 +56,3 @@ use FoX_dom
implicit none
print *, vs_str("ABC")
end
-! { dg-final { cleanup-modules "fox_m_fsys_array_str fox_m_fsys_format m_dom_dom fox_dom" } }
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_10.f90 b/gcc/testsuite/gfortran.dg/move_alloc_10.f90
index 3a538be456..e5979287af 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_10.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_10.f90
@@ -75,5 +75,3 @@ program main
call abort ()
end select
end program main
-
-! { dg-final { cleanup-modules "myalloc" } }
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_13.f90 b/gcc/testsuite/gfortran.dg/move_alloc_13.f90
index 9c3e0bcd58..f889e11a58 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_13.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_13.f90
@@ -1,4 +1,4 @@
-! { dg-do run}
+! { dg-do run }
!
! PR fortran/51970
! PR fortran/51977
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_14.f90 b/gcc/testsuite/gfortran.dg/move_alloc_14.f90
new file mode 100644
index 0000000000..bc5e491651
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/move_alloc_14.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+!
+! Ensure that move_alloc for CLASS resets the FROM variable's dynamic type
+! to the declared one
+!
+implicit none
+type t
+end type t
+type, extends(t) :: t2
+end type t2
+
+class(t), allocatable :: a, b, c
+class(t), allocatable :: a2(:), b2(:), c2(:)
+allocate (t2 :: a)
+allocate (t2 :: a2(5))
+call move_alloc (from=a, to=b)
+call move_alloc (from=a2, to=b2)
+!print *, same_type_as (a,c), same_type_as (a,b)
+!print *, same_type_as (a2,c2), same_type_as (a2,b2)
+if (.not. same_type_as (a,c) .or. same_type_as (a,b)) call abort ()
+if (.not. same_type_as (a2,c2) .or. same_type_as (a2,b2)) call abort ()
+end
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_4.f90 b/gcc/testsuite/gfortran.dg/move_alloc_4.f90
index 4dc493f097..b23ef70bb9 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_4.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_4.f90
@@ -10,13 +10,14 @@ program testmv3
integer, allocatable :: ia(:), ja(:)
end type
+ block ! For auto-dealloc, as PROGRAM implies SAVE
type(bar), allocatable :: sm,sm2
allocate(sm)
allocate(sm%ia(10),sm%ja(10))
call move_alloc(sm2,sm)
-
+ end block
end program testmv3
! { dg-final { scan-tree-dump-times "__builtin_free" 9 "original" } }
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_8.f90 b/gcc/testsuite/gfortran.dg/move_alloc_8.f90
index 2fa5306660..f624b703cc 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_8.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_8.f90
@@ -102,5 +102,3 @@ CONTAINS
call move_alloc(dt%VALUE, lv) ! { dg-error "cannot be INTENT.IN." }
END SUBROUTINE
end subroutine test4
-
-! { dg-final { cleanup-modules "bug" } }
diff --git a/gcc/testsuite/gfortran.dg/move_alloc_9.f90 b/gcc/testsuite/gfortran.dg/move_alloc_9.f90
index 60d6f1496e..bf3f7b1b73 100644
--- a/gcc/testsuite/gfortran.dg/move_alloc_9.f90
+++ b/gcc/testsuite/gfortran.dg/move_alloc_9.f90
@@ -53,5 +53,3 @@ program testmv1
if (allocated(sm2)) call abort()
if (.not. allocated(sm)) call abort()
end program
-
-! { dg-final { cleanup-modules "m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/mvbits_1.f90 b/gcc/testsuite/gfortran.dg/mvbits_1.f90
index 90e92bb0e2..15cbf8c8b8 100644
--- a/gcc/testsuite/gfortran.dg/mvbits_1.f90
+++ b/gcc/testsuite/gfortran.dg/mvbits_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
! PR 25577
! MVBITS didn't work correctly for integer types wider than a C int
! The testcase is based on the one Dale Ranta posted in the bug report
diff --git a/gcc/testsuite/gfortran.dg/mvbits_6.f90 b/gcc/testsuite/gfortran.dg/mvbits_6.f90
index 56ceacc5ec..c8986df21c 100644
--- a/gcc/testsuite/gfortran.dg/mvbits_6.f90
+++ b/gcc/testsuite/gfortran.dg/mvbits_6.f90
@@ -31,4 +31,3 @@
call yg0009(tda2l,4,3,1,-1,-4,-3)
end
-! { dg-final { cleanup-modules "yg0009_stuff" } }
diff --git a/gcc/testsuite/gfortran.dg/named_interface.f90 b/gcc/testsuite/gfortran.dg/named_interface.f90
index 29cfae8827..90fea809fb 100644
--- a/gcc/testsuite/gfortran.dg/named_interface.f90
+++ b/gcc/testsuite/gfortran.dg/named_interface.f90
@@ -7,5 +7,3 @@ module snafu
end subroutine really_snafu
end interface foo
end module snafu
-
-! { dg-final { cleanup-modules "snafu" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_1.f90 b/gcc/testsuite/gfortran.dg/namelist_1.f90
index e4154e9181..ee028dd0e5 100644
--- a/gcc/testsuite/gfortran.dg/namelist_1.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_1.f90
@@ -5,5 +5,3 @@ module namelist_1
integer,private :: x
namelist /n/ x ! { dg-error "cannot be member of PUBLIC namelist" "" }
end module
-
-! { dg-final { cleanup-modules "namelist_1" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_14.f90 b/gcc/testsuite/gfortran.dg/namelist_14.f90
index 478e07fe67..341d1a3e98 100644
--- a/gcc/testsuite/gfortran.dg/namelist_14.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_14.f90
@@ -95,5 +95,3 @@ contains
end subroutine foo
end program namelist_14
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_15.f90 b/gcc/testsuite/gfortran.dg/namelist_15.f90
index e900e71d14..ea02f9f7af 100644
--- a/gcc/testsuite/gfortran.dg/namelist_15.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_15.f90
@@ -61,5 +61,3 @@ program namelist_15
(x(2)%m(2)%ch(2) == "kz"))) call abort ()
end program namelist_15
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_33.f90 b/gcc/testsuite/gfortran.dg/namelist_33.f90
index 8bbe59715e..79459eecef 100644
--- a/gcc/testsuite/gfortran.dg/namelist_33.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_33.f90
@@ -66,5 +66,3 @@ contains
namelist /nml2/ t5 ! { dg-error "has use-associated PRIVATE components" }
end subroutine
end program
-
-! { dg-final { cleanup-modules "types nml" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_34.f90 b/gcc/testsuite/gfortran.dg/namelist_34.f90
index f7c5e1cf6f..94327710d3 100644
--- a/gcc/testsuite/gfortran.dg/namelist_34.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_34.f90
@@ -26,5 +26,3 @@ USE types
namelist /a/ t1 ! { dg-error "has ALLOCATABLE or POINTER components and thus requires a defined input/output" }
namelist /b/ t3 ! { dg-error "has ALLOCATABLE or POINTER components and thus requires a defined input/output" }
END MODULE
-
-! { dg-final { cleanup-modules "types nml" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_36.f90 b/gcc/testsuite/gfortran.dg/namelist_36.f90
index b6a14e36bc..83f420e843 100644
--- a/gcc/testsuite/gfortran.dg/namelist_36.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_36.f90
@@ -25,5 +25,3 @@ contains
namelist /nml3/ t2 ! ok, private components
end subroutine
END MODULE
-
-! { dg-final { cleanup-modules "nml" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_4.f90 b/gcc/testsuite/gfortran.dg/namelist_4.f90
index ad4e1ab62d..538bceaa4b 100644
--- a/gcc/testsuite/gfortran.dg/namelist_4.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_4.f90
@@ -38,4 +38,3 @@ CONTAINS
END FUNCTION
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_40.f90 b/gcc/testsuite/gfortran.dg/namelist_40.f90
index d6f896a395..195a78b64d 100644
--- a/gcc/testsuite/gfortran.dg/namelist_40.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_40.f90
@@ -51,4 +51,3 @@ end program namelist_40
! { dg-output "Missing colon in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
! { dg-output "Substring out of range for namelist variable x%m%ch(\n|\r\n|\r)" }
! { dg-output "Bad character in substring qualifier for namelist variable x%m%ch(\n|\r\n|\r)" }
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_47.f90 b/gcc/testsuite/gfortran.dg/namelist_47.f90
index 581924720b..45f3823552 100644
--- a/gcc/testsuite/gfortran.dg/namelist_47.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_47.f90
@@ -49,4 +49,3 @@ end program namelist_47
! { dg-output "Missing colon in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
! { dg-output "Substring out of range for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
! { dg-output "Bad character in substring qualifier for namelist variable x%m%c012345678901234567890123456789012345678901234567890123456789h(\n|\r\n|\r)" }
-! { dg-final { cleanup-modules "nml_47" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_52.f90 b/gcc/testsuite/gfortran.dg/namelist_52.f90
index 253bd3fc9a..6e31382927 100644
--- a/gcc/testsuite/gfortran.dg/namelist_52.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_52.f90
@@ -30,5 +30,3 @@ read(31,nml=info_adjoint)
if (adjoint%solver_type /= 'direct') call abort
if (adjoint%screen_io_fs_ntime%begin /= 42) call abort
end program gfortran_error_2
-
-! { dg-final { cleanup-modules "mod1" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_62.f90 b/gcc/testsuite/gfortran.dg/namelist_62.f90
index 23e2562076..eb7f4a84c6 100644
--- a/gcc/testsuite/gfortran.dg/namelist_62.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_62.f90
@@ -16,5 +16,3 @@ PROGRAM gafortran
NAMELIST /ga/ nichflg
READ (23, nml=ga)
END PROGRAM gafortran
-
-! { dg-final { cleanup-modules "ga_commons" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_75.f90 b/gcc/testsuite/gfortran.dg/namelist_75.f90
new file mode 100644
index 0000000000..c88da65d6b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_75.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! Tests a write-after-free memory error fix in gfc_undo_symbols
+
+program test_nml
+
+ namelist /foo/ bar, baz
+ namelist /foo/ wrong, , ! { dg-error "Syntax error in NAMELIST" }
+
+end program test_nml
diff --git a/gcc/testsuite/gfortran.dg/namelist_77.f90 b/gcc/testsuite/gfortran.dg/namelist_77.f90
new file mode 100644
index 0000000000..5cbfe3aad6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_77.f90
@@ -0,0 +1,49 @@
+! { dg-do run }
+!
+! PR libfortran/51825 - Fortran runtime error: Cannot match namelist object name
+! Test case derived from PR.
+
+module local_mod
+
+ type mytype1
+ integer :: int1
+ end type
+
+ type mytype2
+ integer :: n_x
+ integer :: n_px
+ end type
+
+ type beam_init_struct
+ character(16) :: chars(1) = ''
+ type (mytype1) dummy
+ type (mytype2) grid(1)
+ end type
+
+end module
+
+program error_namelist
+
+ use local_mod
+
+ implicit none
+
+ type (beam_init_struct) beam_init
+
+ namelist / error_params / beam_init
+
+ open (10, status='scratch')
+ write (10, '(a)') "&error_params"
+ write (10, '(a)') " beam_init%chars(1)='JUNK'"
+ write (10, '(a)') " beam_init%grid(1)%n_x=3"
+ write (10, '(a)') " beam_init%grid(1)%n_px=2"
+ write (10, '(a)') "/"
+ rewind(10)
+ read(10, nml=error_params)
+ close (10)
+
+ if (beam_init%chars(1) /= 'JUNK') call abort
+ if (beam_init%grid(1)%n_x /= 3) call abort
+ if (beam_init%grid(1)%n_px /= 2) call abort
+
+end program
diff --git a/gcc/testsuite/gfortran.dg/namelist_78.f90 b/gcc/testsuite/gfortran.dg/namelist_78.f90
new file mode 100644
index 0000000000..d4e29ab822
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_78.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+!
+! PR libfortran/51825
+! Test case regarding namelist problems with derived types
+
+program namelist
+
+ type d1
+ integer :: j = 0
+ end type d1
+
+ type d2
+ type(d1) k
+ end type d2
+
+ type d3
+ type(d2) d(2)
+ end type d3
+
+ type(d3) der
+ namelist /nmlst/ der
+
+ open (10, status='scratch')
+ write (10, '(a)') "&NMLST"
+ write (10, '(a)') " DER%D(1)%K%J = 1,"
+ write (10, '(a)') " DER%D(2)%K%J = 2,"
+ write (10, '(a)') "/"
+ rewind(10)
+ read(10, nml=nmlst)
+ close (10)
+
+ if (der%d(1)%k%j /= 1) call abort
+ if (der%d(2)%k%j /= 2) call abort
+end program namelist
diff --git a/gcc/testsuite/gfortran.dg/namelist_79.f90 b/gcc/testsuite/gfortran.dg/namelist_79.f90
new file mode 100644
index 0000000000..2b2ef310d0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_79.f90
@@ -0,0 +1,43 @@
+! { dg-do run }
+! PR libfortran/52512 - Cannot match namelist object name
+! Test case derived from PR.
+
+program testje
+
+ implicit none
+
+ integer :: getal, jn
+ type ptracer
+ character(len = 8) :: sname !: short name
+ logical :: lini !: read in a file or not
+ end type ptracer
+ type(ptracer) , dimension(3) :: tracer
+ namelist/namtoptrc/ getal,tracer
+
+ ! standard values
+ getal = 9999
+ do jn = 1, 3
+ tracer(jn)%sname = 'default_name'
+ tracer(jn)%lini = .false.
+ end do
+
+ open (10, status='scratch')
+ write (10, '(a)') "&namtoptrc"
+ write (10, '(a)') " getal = 7"
+ write (10, '(a)') " tracer(1) = 'DIC ', .true."
+ write (10, '(a)') " tracer(2) = 'Alkalini', .true."
+ write (10, '(a)') " tracer(3) = 'O2 ', .true."
+ write (10, '(a)') "/"
+ rewind(10)
+ read(10, nml=namtoptrc)
+ close (10)
+
+ if (getal /= 7) call abort
+ if (tracer(1)%sname /= 'DIC ') call abort
+ if (tracer(2)%sname /= 'Alkalini') call abort
+ if (tracer(3)%sname /= 'O2 ') call abort
+ if (.not. tracer(1)%lini) call abort
+ if (.not. tracer(2)%lini) call abort
+ if (.not. tracer(3)%lini) call abort
+
+end program testje
diff --git a/gcc/testsuite/gfortran.dg/namelist_81.f90 b/gcc/testsuite/gfortran.dg/namelist_81.f90
new file mode 100644
index 0000000000..ddb100bf88
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_81.f90
@@ -0,0 +1,43 @@
+! { dg-do run }
+! PR56786 Error on embedded spaces
+integer :: i(3)
+namelist /nml/ i
+
+i = -42
+open(99,status='scratch')
+write(99,'(a)') '&nml i(3 ) = 5 /'
+rewind(99)
+read(99,nml=nml)
+close(99)
+if (i(1)/=-42 .or. i(2)/=-42 .or. i(3)/=5) call abort()
+
+! Shorten the file so the read hits EOF
+
+open(99,status='scratch')
+write(99,'(a)') '&nml i(3 ) = 5 '
+rewind(99)
+read(99,nml=nml, end=30)
+call abort()
+! Shorten some more
+ 30 close(99)
+open(99,status='scratch')
+write(99,'(a)') '&nml i(3 ) ='
+rewind(99)
+read(99,nml=nml, end=40)
+call abort()
+! Shorten some more
+ 40 close(99)
+open(99,status='scratch')
+write(99,'(a)') '&nml i(3 )'
+rewind(99)
+read(99,nml=nml, end=50)
+call abort()
+! Shorten some more
+ 50 close(99)
+open(99,status='scratch')
+write(99,'(a)') '&nml i(3 '
+rewind(99)
+read(99,nml=nml, end=60)
+call abort()
+ 60 close(99)
+end
diff --git a/gcc/testsuite/gfortran.dg/namelist_82.f90 b/gcc/testsuite/gfortran.dg/namelist_82.f90
new file mode 100644
index 0000000000..399d59fe66
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_82.f90
@@ -0,0 +1,33 @@
+! { dg-do run }
+! PR56660 Fails to read NAMELIST with certain form array syntax
+type ptracer
+ character(len = 2) :: sname
+ logical :: lini
+end type ptracer
+
+type(ptracer) , dimension(3) :: tracer
+namelist/naml1/ tracer
+
+tracer(:) = ptracer('XXX', .false.)
+
+open (99, file='nml.dat', status="replace")
+write(99,*) "&naml1"
+!write(99,*) " tracer(2) = 'bb' , .true."
+write(99,*) " tracer(:) = 'aa' , .true."
+write(99,*) " tracer(2) = 'bb' , .true."
+write(99,*) "/"
+rewind(99)
+
+read (99, nml=naml1)
+close (99, status="delete")
+
+if (tracer(1)%sname.ne.'aa') call abort()
+if (.not.tracer(1)%lini) call abort()
+if (tracer(2)%sname.ne.'bb') call abort()
+if (.not.tracer(2)%lini) call abort()
+if (tracer(3)%sname.ne.'XX') call abort()
+if (tracer(3)%lini) call abort()
+
+!write (*, nml=naml1)
+
+end
diff --git a/gcc/testsuite/gfortran.dg/namelist_83.f90 b/gcc/testsuite/gfortran.dg/namelist_83.f90
new file mode 100644
index 0000000000..f87d4cdf61
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_83.f90
@@ -0,0 +1,22 @@
+! { dg-do link }
+! { dg-options "-g" }
+! { dg-additional-sources namelist_83_2.f90 }
+!
+! Note: compilation would be sufficient, but "compile" cannot be combined
+! with dg-additional-sources.
+!
+! PR fortran/59440
+!
+! Contributed by Harald Anlauf
+!
+! Was ICEing during DWARF generation.
+!
+! This is the first file - dg-additional-sources contains the second one
+!
+
+module mo_t_datum
+ implicit none
+ integer :: qbit_conv = 0
+end module mo_t_datum
+
+! { dg-final { cleanup-modules "gfcbug126" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_83_2.f90 b/gcc/testsuite/gfortran.dg/namelist_83_2.f90
new file mode 100644
index 0000000000..0a0ca6ed34
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_83_2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile { target { ! *-*-* } } }
+!
+! To be compiled with "-g" via namelist_83.f90
+!
+! PR fortran/59440
+!
+! Contributed by Harald Anlauf
+!
+! Was ICEing during DWARF generation.
+!
+! This is the second file, the module is in namelist_83.f90
+!
+
+!
+MODULE gfcbug126
+ use mo_t_datum, only: qbit_conv
+ implicit none
+ namelist /OBSERVATIONS/ qbit_conv
+end module gfcbug126
+
+! As we have to link, add an empty main program:
+end
diff --git a/gcc/testsuite/gfortran.dg/namelist_84.f90 b/gcc/testsuite/gfortran.dg/namelist_84.f90
new file mode 100644
index 0000000000..af139d91ed
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/namelist_84.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+program namelist_delim_none
+ implicit none
+ character(512) :: internal_unit
+ character(5), dimension(5) :: mystring
+ real, dimension(4) :: somenum
+ integer :: i
+ namelist /mylist/ mystring, somenum
+ mystring(1)='mon'
+ mystring(2)='tue'
+ mystring(3)='wed'
+ mystring(4)='thu'
+ mystring(5)='fri'
+ somenum = reshape(source = (/ 2, 3, 5, 7 /), shape=shape(somenum))
+
+ open(unit=10,status='scratch',delim='none')
+ write(10, mylist)
+ rewind(10)
+ mystring = "xxxxx"
+ read(10,mylist)
+ if (any(mystring /= (/ 'mon', 'tue', 'wed', 'thu', 'fri' /))) call abort
+ rewind(10)
+ do i=1,5
+ read(10,'(a)') internal_unit
+ if (scan(internal_unit,"""'").ne.0) call abort
+ end do
+ close(10)
+end program
diff --git a/gcc/testsuite/gfortran.dg/namelist_print_1.f b/gcc/testsuite/gfortran.dg/namelist_print_1.f
index 2e5de8305b..d97d1c9e9a 100644
--- a/gcc/testsuite/gfortran.dg/namelist_print_1.f
+++ b/gcc/testsuite/gfortran.dg/namelist_print_1.f
@@ -8,6 +8,6 @@
real x
namelist /mynml/ x
x = 1
-! ( dg-output "^" }
+! { dg-output "^" }
print mynml ! { dg-output "&MYNML(\n|\r\n|\r) X= 1.00000000 ,(\n|\r\n|\r) /(\n|\r\n|\r)" }
end
diff --git a/gcc/testsuite/gfortran.dg/namelist_use.f90 b/gcc/testsuite/gfortran.dg/namelist_use.f90
index d550e00aa6..d7e6272330 100644
--- a/gcc/testsuite/gfortran.dg/namelist_use.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_use.f90
@@ -29,5 +29,3 @@ program namelist_use
close (10)
end program namelist_use
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/namelist_use_only.f90 b/gcc/testsuite/gfortran.dg/namelist_use_only.f90
index d9a28a8567..d2a533e6d6 100644
--- a/gcc/testsuite/gfortran.dg/namelist_use_only.f90
+++ b/gcc/testsuite/gfortran.dg/namelist_use_only.f90
@@ -34,5 +34,3 @@ program namelist_use_only
if ((i.ne.0).or.(rrrr.ne.3.5).or.foo()) call abort ()
close (10)
end program namelist_use_only
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/nan_1.f90 b/gcc/testsuite/gfortran.dg/nan_1.f90
index 609780d69d..4ff1b873f0 100644
--- a/gcc/testsuite/gfortran.dg/nan_1.f90
+++ b/gcc/testsuite/gfortran.dg/nan_1.f90
@@ -122,5 +122,3 @@ program test
if (isinf(max(-large, -inf, nan))) call abort
end program test
-
-! { dg-final { cleanup-modules "aux2" } }
diff --git a/gcc/testsuite/gfortran.dg/nan_2.f90 b/gcc/testsuite/gfortran.dg/nan_2.f90
index 5c821d6513..709b147183 100644
--- a/gcc/testsuite/gfortran.dg/nan_2.f90
+++ b/gcc/testsuite/gfortran.dg/nan_2.f90
@@ -105,4 +105,3 @@ program test
if (isinf(max(-large, -inf, nan))) call abort
end program test
-! { dg-final { cleanup-modules "aux2" } }
diff --git a/gcc/testsuite/gfortran.dg/nan_7.f90 b/gcc/testsuite/gfortran.dg/nan_7.f90
index 12c7b3ce40..4c2f62eeae 100644
--- a/gcc/testsuite/gfortran.dg/nan_7.f90
+++ b/gcc/testsuite/gfortran.dg/nan_7.f90
@@ -2,6 +2,7 @@
! { dg-options "-fno-range-check" }
! { dg-require-effective-target fortran_real_16 }
! { dg-require-effective-target fortran_integer_16 }
+! { dg-skip-if "" { "powerpc*le-*-*" } { "*" } { "" } }
! PR47293 NAN not correctly read
character(len=200) :: str
real(16) :: r
diff --git a/gcc/testsuite/gfortran.dg/nested_forall_1.f b/gcc/testsuite/gfortran.dg/nested_forall_1.f
index 6aa66ee97a..bf93b6b81c 100644
--- a/gcc/testsuite/gfortran.dg/nested_forall_1.f
+++ b/gcc/testsuite/gfortran.dg/nested_forall_1.f
@@ -35,4 +35,3 @@
END FORALL
END SUBROUTINE
END MODULE TESTS
-! { dg-final { cleanup-modules "tests" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_1.f90 b/gcc/testsuite/gfortran.dg/nested_modules_1.f90
index a0bd963614..336467f609 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_1.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_1.f90
@@ -41,5 +41,3 @@
call eyeore ()
call tigger (w)
end
-
-! { dg-final { cleanup-modules "mod0 mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_2.f90 b/gcc/testsuite/gfortran.dg/nested_modules_2.f90
index 0714eedee6..deb980e39a 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_2.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_2.f90
@@ -35,5 +35,3 @@ program testfoobar
call sub2 (l)
if (any (l.ne.(/84,42,0/))) call abort ()
end program testfoobar
-
-! { dg-final { cleanup-modules "foo bar foobar" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_3.f90 b/gcc/testsuite/gfortran.dg/nested_modules_3.f90
index 7550368bcd..364460c613 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_3.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_3.f90
@@ -53,5 +53,3 @@ PROGRAM use_foobar
CALL sub3 (z, j)
IF (ALL (j.ne.(/3,2,1/))) CALL abort ()
END PROGRAM use_foobar
-
-! { dg-final { cleanup-modules "foo bar foobar" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_4.f90 b/gcc/testsuite/gfortran.dg/nested_modules_4.f90
index 6be77b3676..f78b16fa7b 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_4.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_4.f90
@@ -24,5 +24,3 @@ end module serial
character*15 :: buffer
buffer = lc ("Have a Nice DAY")
end
-
-! { dg-final { cleanup-modules "string serial" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_5.f90 b/gcc/testsuite/gfortran.dg/nested_modules_5.f90
index 2ed68244ed..90a55819db 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_5.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_5.f90
@@ -25,5 +25,3 @@ end module serial
character*15 :: buffer
buffer = lc ("Have a Nice DAY")
end
-
-! { dg-final { cleanup-modules "anything serial" } }
diff --git a/gcc/testsuite/gfortran.dg/nested_modules_6.f90 b/gcc/testsuite/gfortran.dg/nested_modules_6.f90
index ab9cc2e803..b95742270b 100644
--- a/gcc/testsuite/gfortran.dg/nested_modules_6.f90
+++ b/gcc/testsuite/gfortran.dg/nested_modules_6.f90
@@ -32,4 +32,3 @@ end module vamp_rest
print *, s_last
print *, diag (x)
end
-! { dg-final { cleanup-modules "tao_random_numbers linalg vamp_rest" } }
diff --git a/gcc/testsuite/gfortran.dg/newunit_3.f90 b/gcc/testsuite/gfortran.dg/newunit_3.f90
new file mode 100644
index 0000000000..a0e5a8a75a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/newunit_3.f90
@@ -0,0 +1,7 @@
+! { dg-do run }
+! PR48960 On ERROR newunit should not modify user variable.
+program test_newunit
+ integer :: st, un = 0
+ open (newunit=un, file='nonexisting.dat', status='old', iostat=st)
+ if (un /= 0) call abort
+end program test_newunit
diff --git a/gcc/testsuite/gfortran.dg/nint_2.f90 b/gcc/testsuite/gfortran.dg/nint_2.f90
index 7520727f04..0727136dfc 100644
--- a/gcc/testsuite/gfortran.dg/nint_2.f90
+++ b/gcc/testsuite/gfortran.dg/nint_2.f90
@@ -4,7 +4,8 @@
! http://gcc.gnu.org/ml/fortran/2005-04/msg00139.html
!
! { dg-do run }
-! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix powerpc*-*-linux* *-*-mingw* } { "-O0" } { "" } }
+! { dg-xfail-run-if "PR 33271, math library bug" { powerpc-ibm-aix* powerpc-*-linux* powerpc64-*-linux* *-*-mingw* } { "-O0" } { "" } }
+! Note that this doesn't fail on powerpc64le-*-linux*.
real(kind=8) :: a
integer(kind=8) :: i1, i2
real :: b
diff --git a/gcc/testsuite/gfortran.dg/no_arg_check_1.f90 b/gcc/testsuite/gfortran.dg/no_arg_check_1.f90
new file mode 100644
index 0000000000..1e1855d317
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/no_arg_check_1.f90
@@ -0,0 +1,56 @@
+! { dg-do compile }
+!
+! PR fortran/39505
+!
+! Test NO_ARG_CHECK
+! Copied from assumed_type_1.f90
+!
+module mpi_interface
+ implicit none
+
+ interface !mpi_send
+ subroutine MPI_Send (buf, count, datatype, dest, tag, comm, ierr)
+!GCC$ attributes NO_ARG_CHECK :: buf
+ integer, intent(in) :: buf
+ integer, intent(in) :: count
+ integer, intent(in) :: datatype
+ integer, intent(in) :: dest
+ integer, intent(in) :: tag
+ integer, intent(in) :: comm
+ integer, intent(out):: ierr
+ end subroutine
+ end interface
+
+ interface !mpi_send2
+ subroutine MPI_Send2 (buf, count, datatype, dest, tag, comm, ierr)
+!GCC$ attributes NO_ARG_CHECK :: buf
+ type(*), intent(in) :: buf(*)
+ integer, intent(in) :: count
+ integer, intent(in) :: datatype
+ integer, intent(in) :: dest
+ integer, intent(in) :: tag
+ integer, intent(in) :: comm
+ integer, intent(out):: ierr
+ end subroutine
+ end interface
+
+end module
+
+use mpi_interface
+ real :: a(3)
+ integer :: b(3)
+ call foo(a)
+ call foo(b)
+ call foo(a(1:2))
+ call foo(b(1:2))
+ call MPI_Send(a, 1, 1,1,1,j,i)
+ call MPI_Send(b, 1, 1,1,1,j,i)
+ call MPI_Send2(a, 1, 1,1,1,j,i)
+ call MPI_Send2(b, 1, 1,1,1,j,i)
+contains
+ subroutine foo(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ real :: x(*)
+ call MPI_Send2(x, 1, 1,1,1,j,i)
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/no_arg_check_2.f90 b/gcc/testsuite/gfortran.dg/no_arg_check_2.f90
new file mode 100644
index 0000000000..5ff98940d6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/no_arg_check_2.f90
@@ -0,0 +1,153 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/39505
+!
+! Test NO_ARG_CHECK
+! Copied from assumed_type_2.f90
+!
+
+module mod
+ use iso_c_binding, only: c_loc, c_ptr, c_bool
+ implicit none
+ interface my_c_loc
+ function my_c_loc1(x) bind(C)
+ import c_ptr
+!GCC$ attributes NO_ARG_CHECK :: x
+ type(*) :: x
+ type(c_ptr) :: my_c_loc1
+ end function
+ end interface my_c_loc
+contains
+ subroutine sub_scalar (arg1, presnt)
+ integer(8), target, optional :: arg1
+ logical :: presnt
+ type(c_ptr) :: cpt
+!GCC$ attributes NO_ARG_CHECK :: arg1
+ if (presnt .neqv. present (arg1)) call abort ()
+ cpt = c_loc (arg1)
+ end subroutine sub_scalar
+
+ subroutine sub_array_assumed (arg3)
+!GCC$ attributes NO_ARG_CHECK :: arg3
+ logical(1), target :: arg3(*)
+ type(c_ptr) :: cpt
+ cpt = c_loc (arg3)
+ end subroutine sub_array_assumed
+end module
+
+use mod
+use iso_c_binding, only: c_int, c_null_ptr
+implicit none
+type t1
+ integer :: a
+end type t1
+type :: t2
+ sequence
+ integer :: b
+end type t2
+type, bind(C) :: t3
+ integer(c_int) :: c
+end type t3
+
+integer :: scalar_int
+real, allocatable :: scalar_real_alloc
+character, pointer :: scalar_char_ptr
+
+integer :: array_int(3)
+real, allocatable :: array_real_alloc(:,:)
+character, pointer :: array_char_ptr(:,:)
+
+type(t1) :: scalar_t1
+type(t2), allocatable :: scalar_t2_alloc
+type(t3), pointer :: scalar_t3_ptr
+
+type(t1) :: array_t1(4)
+type(t2), allocatable :: array_t2_alloc(:,:)
+type(t3), pointer :: array_t3_ptr(:,:)
+
+class(t1), allocatable :: scalar_class_t1_alloc
+class(t1), pointer :: scalar_class_t1_ptr
+
+class(t1), allocatable :: array_class_t1_alloc(:,:)
+class(t1), pointer :: array_class_t1_ptr(:,:)
+
+scalar_char_ptr => null()
+scalar_t3_ptr => null()
+
+call sub_scalar (presnt=.false.)
+call sub_scalar (scalar_real_alloc, .false.)
+call sub_scalar (scalar_char_ptr, .false.)
+call sub_scalar (null (), .false.)
+call sub_scalar (scalar_t2_alloc, .false.)
+call sub_scalar (scalar_t3_ptr, .false.)
+
+allocate (scalar_real_alloc, scalar_char_ptr, scalar_t3_ptr)
+allocate (scalar_class_t1_alloc, scalar_class_t1_ptr, scalar_t2_alloc)
+allocate (array_real_alloc(3:5,2:4), array_char_ptr(-2:2,2))
+allocate (array_t2_alloc(3:5,2:4), array_t3_ptr(-2:2,2))
+allocate (array_class_t1_alloc(3,3), array_class_t1_ptr(4,4))
+
+call sub_scalar (scalar_int, .true.)
+call sub_scalar (scalar_real_alloc, .true.)
+call sub_scalar (scalar_char_ptr, .true.)
+call sub_scalar (array_int(2), .true.)
+call sub_scalar (array_real_alloc(3,2), .true.)
+call sub_scalar (array_char_ptr(0,1), .true.)
+call sub_scalar (scalar_t1, .true.)
+call sub_scalar (scalar_t2_alloc, .true.)
+call sub_scalar (scalar_t3_ptr, .true.)
+call sub_scalar (array_t1(2), .true.)
+call sub_scalar (array_t2_alloc(3,2), .true.)
+call sub_scalar (array_t3_ptr(0,1), .true.)
+call sub_scalar (array_class_t1_alloc(2,1), .true.)
+call sub_scalar (array_class_t1_ptr(3,3), .true.)
+
+call sub_array_assumed (array_int)
+call sub_array_assumed (array_real_alloc)
+call sub_array_assumed (array_char_ptr)
+call sub_array_assumed (array_t1)
+call sub_array_assumed (array_t2_alloc)
+call sub_array_assumed (array_t3_ptr)
+call sub_array_assumed (array_class_t1_alloc)
+call sub_array_assumed (array_class_t1_ptr)
+
+deallocate (scalar_char_ptr, scalar_class_t1_ptr, array_char_ptr)
+deallocate (array_class_t1_ptr, array_t3_ptr)
+contains
+ subroutine sub(x)
+ integer :: x(:)
+ call sub_array_assumed (x)
+ end subroutine sub
+end
+
+! { dg-final { scan-tree-dump-times "sub_scalar .0B," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_real_alloc," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_char_ptr," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_t2_alloc," 2 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .scalar_t3_ptr" 2 "original" } }
+
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_int," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_t1," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&array_int.1.," 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&scalar_t1," 1 "original" } }
+
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(real.kind=4..0:. . restrict\\) array_real_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(character.kind=1..0:..1:1. .\\) array_char_ptr.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(struct t2.0:. . restrict\\) array_t2_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .&\\(.\\(struct t3.0:. .\\) array_t3_ptr.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_alloc._data.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_scalar .\\(struct t1 .\\) array_class_t1_ptr._data.dat" 1 "original" } }a
+
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(D" 3 "original" } }
+! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&parm" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(&array_int\\)" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(real\\(kind=4\\).0:. . restrict\\) array_real_alloc.data" 1 "original" } }
+! { dg-final { scan-tree-dump-times " = _gfortran_internal_pack \\(&array_char_ptr\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "\\.data = \\(void .\\) &array_t1.0.;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) parm" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t2.0:. . restrict\\) array_t2_alloc.data\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. . restrict\\) array_class_t1_alloc._data.data\\);" 1 "original" } }
+! { dg-final { scan-tree-dump-times "sub_array_assumed \\(\\(struct t1.0:. .\\) array_class_t1_ptr._data.data\\);" 1 "original" } }
+
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/no_arg_check_3.f90 b/gcc/testsuite/gfortran.dg/no_arg_check_3.f90
new file mode 100644
index 0000000000..ff176fef81
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/no_arg_check_3.f90
@@ -0,0 +1,124 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/39505
+!
+! Test NO_ARG_CHECK
+! Copied from assumed_type_2.f90
+!
+subroutine one(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer, value :: a
+end subroutine one
+
+subroutine two(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer, pointer :: a
+end subroutine two
+
+subroutine three(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer, allocatable :: a
+end subroutine three
+
+subroutine four(a) ! { dg-error "may not have the ALLOCATABLE, CODIMENSION, POINTER or VALUE attribute" }
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer :: a[*]
+end subroutine four
+
+subroutine five(a) ! { dg-error "with NO_ARG_CHECK attribute shall either be a scalar or an assumed-size array" }
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer :: a(3)
+end subroutine five
+
+subroutine six()
+!GCC$ attributes NO_ARG_CHECK :: nodum ! { dg-error "with NO_ARG_CHECK attribute shall be a dummy argument" }
+ integer :: nodum
+end subroutine six
+
+subroutine seven(y)
+!GCC$ attributes NO_ARG_CHECK :: y
+ integer :: y(*)
+ call a7(y(3:5)) ! { dg-error "with NO_ARG_CHECK attribute shall not have a subobject reference" }
+contains
+ subroutine a7(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x(*)
+ end subroutine a7
+end subroutine seven
+
+subroutine nine()
+ interface one
+ subroutine okay(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ end subroutine okay
+ end interface
+ interface two
+ subroutine ambig1(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ end subroutine ambig1
+ subroutine ambig2(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x(*)
+ end subroutine ambig2 ! { dg-error "Ambiguous interfaces 'ambig2' and 'ambig1' in generic interface 'two'" }
+ end interface
+ interface three
+ subroutine ambig3(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ end subroutine ambig3
+ subroutine ambig4(x)
+ integer :: x
+ end subroutine ambig4 ! { dg-error "Ambiguous interfaces 'ambig4' and 'ambig3' in generic interface 'three'" }
+ end interface
+end subroutine nine
+
+subroutine ten()
+ interface
+ subroutine bar()
+ end subroutine
+ end interface
+ type t
+ contains
+ procedure, nopass :: proc => bar
+ end type
+ type(t) :: xx
+ call sub(xx) ! { dg-error "is of derived type with type-bound or FINAL procedures" }
+contains
+ subroutine sub(a)
+!GCC$ attributes NO_ARG_CHECK :: a
+ integer :: a
+ end subroutine sub
+end subroutine ten
+
+subroutine eleven(x)
+ external bar
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ call bar(x) ! { dg-error "Assumed-type argument x at .1. requires an explicit interface" }
+end subroutine eleven
+
+subroutine twelf(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ call bar(x) ! { dg-error "Type mismatch in argument" }
+contains
+ subroutine bar(x)
+ integer :: x
+ end subroutine bar
+end subroutine twelf
+
+subroutine thirteen(x, y)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ integer :: y(:)
+ print *, ubound(y, dim=x) ! { dg-error "Variable with NO_ARG_CHECK attribute at .1. is only permitted as argument to the intrinsic functions C_LOC and PRESENT" }
+end subroutine thirteen
+
+subroutine fourteen(x)
+!GCC$ attributes NO_ARG_CHECK :: x
+ integer :: x
+ x = x ! { dg-error "with NO_ARG_CHECK attribute may only be used as actual argument" }
+end subroutine fourteen
diff --git a/gcc/testsuite/gfortran.dg/nosigned_zero_3.f90 b/gcc/testsuite/gfortran.dg/nosigned_zero_3.f90
new file mode 100644
index 0000000000..3f0f7101f2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/nosigned_zero_3.f90
@@ -0,0 +1,15 @@
+! { dg-do run }
+! { dg-options "-fno-sign-zero" }
+!
+! PR fortran/55539
+!
+program nosigned_zero_3
+ implicit none
+ character(len=20) :: s
+ real(4) :: x = -1.2e-3
+ real(8) :: y = -1.2e-3
+ write(s,'(7f10.3)') x
+ if (trim(adjustl(s)) /= "-0.001") call abort
+ write(s, '(7f10.3)') y
+ if (trim(adjustl(s)) /= "-0.001") call abort
+end program nosigned_zero_3
diff --git a/gcc/testsuite/gfortran.dg/null_5.f90 b/gcc/testsuite/gfortran.dg/null_5.f90
index 886a6a1ff8..50b41c3e8b 100644
--- a/gcc/testsuite/gfortran.dg/null_5.f90
+++ b/gcc/testsuite/gfortran.dg/null_5.f90
@@ -34,7 +34,7 @@ subroutine test_PR34547_1 ()
end subroutine test_PR34547_1
subroutine test_PR34547_2 ()
- print *, null () ! { dg-error "in data transfer statement requires MOLD" }
+ print *, null () ! { dg-error "Invalid context" }
end subroutine test_PR34547_2
subroutine test_PR34547_3 ()
diff --git a/gcc/testsuite/gfortran.dg/null_6.f90 b/gcc/testsuite/gfortran.dg/null_6.f90
index dd517cfa3e..6b8f21e63b 100644
--- a/gcc/testsuite/gfortran.dg/null_6.f90
+++ b/gcc/testsuite/gfortran.dg/null_6.f90
@@ -30,5 +30,5 @@ end subroutine test_PR50375_2
subroutine test_PR34547_3 ()
integer, allocatable :: i(:)
- print *, NULL(i)
+ print *, NULL(i) ! { dg-error "Invalid context for NULL" }
end subroutine test_PR34547_3
diff --git a/gcc/testsuite/gfortran.dg/null_7.f90 b/gcc/testsuite/gfortran.dg/null_7.f90
new file mode 100644
index 0000000000..d6d77d2b0a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/null_7.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/55763
+!
+
+implicit none
+integer, pointer :: x
+class(*), pointer :: y
+integer, pointer :: p1 => null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+integer, pointer :: p2 => null(mold=x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+class(*), pointer :: p3 =>null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+type t
+ real, pointer :: a1 => null(x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+ real, pointer :: a2 => null ( mold = x) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+ class(*), pointer :: a3 => null(mold = x ) ! { dg-error "NULL.. initialization at .1. may not have MOLD" }
+end type t
+
+x => null(x) ! OK
+y => null(y) ! OK
+end
diff --git a/gcc/testsuite/gfortran.dg/null_8.f90 b/gcc/testsuite/gfortran.dg/null_8.f90
new file mode 100644
index 0000000000..514c0a78f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/null_8.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+!
+! PR fortran/57141
+!
+! Contributed by Roger Ferrer Ibanez
+!
+MODULE M
+ INTRINSIC :: NULL
+END MODULE M
+
+MODULE M_INTERN
+ USE M
+ IMPLICIT NONE
+ REAL, POINTER :: ARR(:) => NULL()
+END MODULE M_INTERN
diff --git a/gcc/testsuite/gfortran.dg/nullify_2.f90 b/gcc/testsuite/gfortran.dg/nullify_2.f90
index ebfcb374c9..893ac2408f 100644
--- a/gcc/testsuite/gfortran.dg/nullify_2.f90
+++ b/gcc/testsuite/gfortran.dg/nullify_2.f90
@@ -3,5 +3,5 @@
program i
implicit none
TYPE (a) t1 ! { dg-error "is being used before" }
- nullify(t1%x) ! { dg-error "error in NULLIFY" }
+ nullify(t1%x) ! { dg-error "Symbol 't1' at .1. has no IMPLICIT type" }
end program
diff --git a/gcc/testsuite/gfortran.dg/nullify_4.f90 b/gcc/testsuite/gfortran.dg/nullify_4.f90
index 48dcf72ca9..0fd5056ee0 100644
--- a/gcc/testsuite/gfortran.dg/nullify_4.f90
+++ b/gcc/testsuite/gfortran.dg/nullify_4.f90
@@ -4,5 +4,5 @@
! Check error recovery; was crashing before.
!
real, pointer :: ptr
-nullify(ptr, mesh%coarser) ! { dg-error "Syntax error in NULLIFY statement" }
+nullify(ptr, mesh%coarser) ! { dg-error "Symbol 'mesh' at .1. has no IMPLICIT type" }
end
diff --git a/gcc/testsuite/gfortran.dg/oldstyle_1.f90 b/gcc/testsuite/gfortran.dg/oldstyle_1.f90
index e26c467bf8..47c07cb82a 100644
--- a/gcc/testsuite/gfortran.dg/oldstyle_1.f90
+++ b/gcc/testsuite/gfortran.dg/oldstyle_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
integer i, j /1/, g/2/, h ! { dg-warning "" "" }
integer k, l(3) /2*2,1/ ! { dg-warning "" "" }
real pi /3.1416/, e ! { dg-warning "" "" }
diff --git a/gcc/testsuite/gfortran.dg/oldstyle_4.f90 b/gcc/testsuite/gfortran.dg/oldstyle_4.f90
new file mode 100644
index 0000000000..d40abeb61d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/oldstyle_4.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-std=f95" }
+!
+! PR fortran/52101
+!
+! Contributed by John Harper
+!
+program foo
+ character*10 s ! { dg-warning "Obsolescent feature: Old-style character length" }
+ character t*10 ! Still okay
+ s = 'foo'
+ t = 'bar'
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/oldstyle_5.f b/gcc/testsuite/gfortran.dg/oldstyle_5.f
new file mode 100644
index 0000000000..8a0d3119fb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/oldstyle_5.f
@@ -0,0 +1,8 @@
+C { dg-do compile }
+ TYPE T
+ INTEGER A(2)/1,2/ ! { dg-error "Invalid old style initialization for derived type component" }
+ END TYPE
+ TYPE S
+ INTEGER B/1/ ! { dg-error "Invalid old style initialization for derived type component" }
+ END TYPE
+ END
diff --git a/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90 b/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90
new file mode 100644
index 0000000000..bbcf46b72a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/open_negative_unit_1.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+! PR48618 - Negative unit number in OPEN(...) is sometimes allowed
+!
+! Test originally from Janne Blomqvist in PR:
+! http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48618
+
+program nutest
+ implicit none
+ logical l
+ integer id, ios
+
+ open(newunit=id, file="foo.txt", iostat=ios)
+ if (ios /= 0) call abort
+
+ open(id, file="bar.txt", iostat=ios)
+ if (ios /= 0) call abort
+
+ close(id, status="delete")
+
+ open(unit=10, file="foo.txt", status="old", iostat=ios)
+ if (ios /= 0) call abort
+
+ close(10, status="delete")
+
+ open(-10, file="foo.txt", iostat=ios)
+ if (ios == 0) call abort
+
+ inquire(file="foo.txt", exist=l)
+ if (l) call abort
+end program nutest
diff --git a/gcc/testsuite/gfortran.dg/openmp-define-1.f90 b/gcc/testsuite/gfortran.dg/openmp-define-1.f90
new file mode 100644
index 0000000000..4e1c076f30
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/openmp-define-1.f90
@@ -0,0 +1,7 @@
+! { dg-options "-cpp" }
+! { dg-do preprocess }
+! { dg-require-effective-target fopenmp }
+
+#ifdef _OPENMP
+# error _OPENMP defined
+#endif
diff --git a/gcc/testsuite/gfortran.dg/openmp-define-2.f90 b/gcc/testsuite/gfortran.dg/openmp-define-2.f90
new file mode 100644
index 0000000000..cd167eabd8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/openmp-define-2.f90
@@ -0,0 +1,7 @@
+! { dg-options "-cpp -fno-openmp" }
+! { dg-do preprocess }
+! { dg-require-effective-target fopenmp }
+
+#ifdef _OPENMP
+# error _OPENMP defined
+#endif
diff --git a/gcc/testsuite/gfortran.dg/openmp-define-3.f90 b/gcc/testsuite/gfortran.dg/openmp-define-3.f90
new file mode 100644
index 0000000000..44d5c9de49
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/openmp-define-3.f90
@@ -0,0 +1,11 @@
+! { dg-options "-cpp -fopenmp" }
+! { dg-do preprocess }
+! { dg-require-effective-target fopenmp }
+
+#ifndef _OPENMP
+# error _OPENMP not defined
+#endif
+
+#if _OPENMP != 201307
+# error _OPENMP defined to wrong value
+#endif
diff --git a/gcc/testsuite/gfortran.dg/operator_1.f90 b/gcc/testsuite/gfortran.dg/operator_1.f90
index 1800b68e36..6f27246d73 100644
--- a/gcc/testsuite/gfortran.dg/operator_1.f90
+++ b/gcc/testsuite/gfortran.dg/operator_1.f90
@@ -66,4 +66,3 @@ end module m1
if (any((ac*bc) /= matmul(ac,bc))) call abort()
end
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_2.f90 b/gcc/testsuite/gfortran.dg/operator_2.f90
index 0e560dad79..11540caaf8 100644
--- a/gcc/testsuite/gfortran.dg/operator_2.f90
+++ b/gcc/testsuite/gfortran.dg/operator_2.f90
@@ -38,4 +38,3 @@ contains
end function f3
end
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_4.f90 b/gcc/testsuite/gfortran.dg/operator_4.f90
index 39cd7ebdf0..f131503423 100644
--- a/gcc/testsuite/gfortran.dg/operator_4.f90
+++ b/gcc/testsuite/gfortran.dg/operator_4.f90
@@ -96,5 +96,3 @@ PROGRAM pr17711
A = (A > C) ! { dg-error "comparison operator '>'" }
A = (A.GT.C) ! { dg-error "comparison operator '.gt.'" }
END PROGRAM
-
-! { dg-final { cleanup-modules "mod_t" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_5.f90 b/gcc/testsuite/gfortran.dg/operator_5.f90
index 6ce77c8dc4..307b341ad1 100644
--- a/gcc/testsuite/gfortran.dg/operator_5.f90
+++ b/gcc/testsuite/gfortran.dg/operator_5.f90
@@ -47,5 +47,3 @@ CONTAINS
t_bar = .FALSE.
END FUNCTION
END MODULE
-
-! { dg-final { cleanup-modules "mod_t" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_6.f90 b/gcc/testsuite/gfortran.dg/operator_6.f90
index f7b4693f58..5ca2d609bf 100644
--- a/gcc/testsuite/gfortran.dg/operator_6.f90
+++ b/gcc/testsuite/gfortran.dg/operator_6.f90
@@ -9,4 +9,3 @@ end module foo
program test
use foo, only : operator(.none.) ! { dg-error "not found in module" }
end program test
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_7.f90 b/gcc/testsuite/gfortran.dg/operator_7.f90
index 66d8dd187e..a2a81e335c 100644
--- a/gcc/testsuite/gfortran.dg/operator_7.f90
+++ b/gcc/testsuite/gfortran.dg/operator_7.f90
@@ -23,5 +23,3 @@ end module
type(foo) :: a, b
print *, a == b
end subroutine
-
-! { dg-final { cleanup-modules "foo_type" } }
diff --git a/gcc/testsuite/gfortran.dg/operator_c1202.f90 b/gcc/testsuite/gfortran.dg/operator_c1202.f90
index ae5e1263b1..c53079ac5d 100644
--- a/gcc/testsuite/gfortran.dg/operator_c1202.f90
+++ b/gcc/testsuite/gfortran.dg/operator_c1202.f90
@@ -66,5 +66,3 @@ module op
end function f1
end module op
-
-! { dg-final { cleanup-modules "op" } }
diff --git a/gcc/testsuite/gfortran.dg/optional_absent_3.f90 b/gcc/testsuite/gfortran.dg/optional_absent_3.f90
new file mode 100644
index 0000000000..f03b4798b3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/optional_absent_3.f90
@@ -0,0 +1,83 @@
+! { dg-do run }
+!
+! PR fortran/35203
+!
+! Test VALUE + OPTIONAL
+! for integer/real/complex/logical which are passed by value
+!
+program main
+ implicit none
+ call value_test ()
+contains
+ subroutine value_test (ii, rr, cc, ll, ii2, rr2, cc2, ll2)
+ integer, optional :: ii, ii2
+ real, optional :: rr, rr2
+ complex, optional :: cc, cc2
+ logical, optional :: ll, ll2
+ value :: ii, rr, cc, ll
+
+ call int_test (.false., 0)
+ call int_test (.false., 0, ii)
+ call int_test (.false., 0, ii2)
+ call int_test (.true., 0, 0)
+ call int_test (.true., 2, 2)
+
+ call real_test (.false., 0.0)
+ call real_test (.false., 0.0, rr)
+ call real_test (.false., 0.0, rr2)
+ call real_test (.true., 0.0, 0.0)
+ call real_test (.true., 2.0, 2.0)
+
+ call cmplx_test (.false., cmplx (0.0))
+ call cmplx_test (.false., cmplx (0.0), cc)
+ call cmplx_test (.false., cmplx (0.0), cc2)
+ call cmplx_test (.true., cmplx (0.0), cmplx (0.0))
+ call cmplx_test (.true., cmplx (2.0), cmplx (2.0))
+
+ call bool_test (.false., .false.)
+ call bool_test (.false., .false., ll)
+ call bool_test (.false., .false., ll2)
+ call bool_test (.true., .false., .false.)
+ call bool_test (.true., .true., .true.)
+ end subroutine value_test
+
+ subroutine int_test (ll, val, x)
+ logical, value :: ll
+ integer, value :: val
+ integer, value, optional :: x
+ if (ll .neqv. present(x)) call abort
+ if (present(x)) then
+ if (x /= val) call abort ()
+ endif
+ end subroutine int_test
+
+ subroutine real_test (ll, val, x)
+ logical, value :: ll
+ real, value :: val
+ real, value, optional :: x
+ if (ll .neqv. present(x)) call abort
+ if (present(x)) then
+ if (x /= val) call abort ()
+ endif
+ end subroutine real_test
+
+ subroutine cmplx_test (ll, val, x)
+ logical, value :: ll
+ complex, value :: val
+ complex, value, optional :: x
+ if (ll .neqv. present(x)) call abort
+ if (present(x)) then
+ if (x /= val) call abort ()
+ endif
+ end subroutine cmplx_test
+
+ subroutine bool_test (ll, val, x)
+ logical, value :: ll
+ logical, value :: val
+ logical, value, optional :: x
+ if (ll .neqv. present(x)) call abort
+ if (present(x)) then
+ if (x .neqv. val) call abort ()
+ endif
+ end subroutine bool_test
+end program main
diff --git a/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90 b/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
index 90631aa616..5c929e8ae3 100644
--- a/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
+++ b/gcc/testsuite/gfortran.dg/optional_assumed_charlen_1.f90
@@ -17,4 +17,3 @@
END SUBROUTINE sub2
END MODULE foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/optional_class_1.f90 b/gcc/testsuite/gfortran.dg/optional_class_1.f90
new file mode 100644
index 0000000000..589fc6023e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/optional_class_1.f90
@@ -0,0 +1,45 @@
+! { dg-do run }
+!
+! PR fortran/57445
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+! Spurious assert was added at revision 192495
+!
+module m
+ implicit none
+ type t
+ integer :: i
+ end type t
+contains
+ subroutine opt(xa, xc, xaa, xca)
+ type(t), allocatable, intent(out), optional :: xa
+ class(t), allocatable, intent(out), optional :: xc
+ type(t), allocatable, intent(out), optional :: xaa(:)
+ class(t), allocatable, intent(out), optional :: xca(:)
+ if (present (xca)) call foo_opt(xca=xca)
+ end subroutine opt
+ subroutine foo_opt(xa, xc, xaa, xca)
+ type(t), allocatable, intent(out), optional :: xa
+ class(t), allocatable, intent(out), optional :: xc
+ type(t), allocatable, intent(out), optional :: xaa(:)
+ class(t), allocatable, intent(out), optional :: xca(:)
+ if (present (xca)) then
+ if (allocated (xca)) deallocate (xca)
+ allocate (xca(3), source = [t(9),t(99),t(999)])
+ end if
+ end subroutine foo_opt
+end module m
+ use m
+ class(t), allocatable :: xca(:)
+ allocate (xca(1), source = t(42))
+ select type (xca)
+ type is (t)
+ if (any (xca%i .ne. [42])) call abort
+ end select
+ call opt (xca = xca)
+ select type (xca)
+ type is (t)
+ if (any (xca%i .ne. [9,99,999])) call abort
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/optional_dim_3.f90 b/gcc/testsuite/gfortran.dg/optional_dim_3.f90
index 45099a3073..fc66ba5b84 100644
--- a/gcc/testsuite/gfortran.dg/optional_dim_3.f90
+++ b/gcc/testsuite/gfortran.dg/optional_dim_3.f90
@@ -50,4 +50,3 @@ program main
call sub(bound=.false., dimmy=1_8)
call sub()
end program main
-! { dg-final { cleanup-modules "tst_foo" } }
diff --git a/gcc/testsuite/gfortran.dg/overload_1.f90 b/gcc/testsuite/gfortran.dg/overload_1.f90
index fc38a6c90f..97aa843351 100644
--- a/gcc/testsuite/gfortran.dg/overload_1.f90
+++ b/gcc/testsuite/gfortran.dg/overload_1.f90
@@ -181,4 +181,3 @@ contains
& abort
end subroutine checku
end program main
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/parameter_array_element_2.f90 b/gcc/testsuite/gfortran.dg/parameter_array_element_2.f90
new file mode 100644
index 0000000000..352ed57f54
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/parameter_array_element_2.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! PR fortran/48831
+! Contributed by Tobias Burnus
+
+program p1
+ implicit none
+ integer, parameter :: i1 = kind(0)
+ integer, parameter :: i2(1) = [i1]
+ integer(kind=i2(1)) :: i3
+
+ i3 = int(0, i1)
+ print *, i3
+
+ i3 = int(0, i2(1)) ! This line gives an error when compiling.
+ print *, i3
+end program p1
diff --git a/gcc/testsuite/gfortran.dg/parameter_array_init_3.f90 b/gcc/testsuite/gfortran.dg/parameter_array_init_3.f90
index e39da8e806..6eaa98e801 100644
--- a/gcc/testsuite/gfortran.dg/parameter_array_init_3.f90
+++ b/gcc/testsuite/gfortran.dg/parameter_array_init_3.f90
@@ -13,4 +13,3 @@ module abuse_mod
integer(1), parameter :: MSKa1(len(HEX1)) = [(1,i=1,len(HEX1))]
integer(1), parameter :: ARR1(len(HEX1)) = [( MSKa1(i), i=1,len(HEX1) )]
end module abuse_mod
-! { dg-final { cleanup-modules "abuse_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/parameter_array_init_5.f90 b/gcc/testsuite/gfortran.dg/parameter_array_init_5.f90
index 2977b88af7..0f4127af27 100644
--- a/gcc/testsuite/gfortran.dg/parameter_array_init_5.f90
+++ b/gcc/testsuite/gfortran.dg/parameter_array_init_5.f90
@@ -23,4 +23,3 @@ program TEST
use bug3
call sr
end program TEST
-! { dg-final { cleanup-modules "bug3" } }
diff --git a/gcc/testsuite/gfortran.dg/parameter_array_section_1.f90 b/gcc/testsuite/gfortran.dg/parameter_array_section_1.f90
index 6c69593326..30c7abd834 100644
--- a/gcc/testsuite/gfortran.dg/parameter_array_section_1.f90
+++ b/gcc/testsuite/gfortran.dg/parameter_array_section_1.f90
@@ -21,4 +21,3 @@ end module gfcbug45
use gfcbug45
call foo
end
-! { dg-final { cleanup-modules "gfcbug45" } }
diff --git a/gcc/testsuite/gfortran.dg/parens_5.f90 b/gcc/testsuite/gfortran.dg/parens_5.f90
index ac631ef08a..91c58d006d 100644
--- a/gcc/testsuite/gfortran.dg/parens_5.f90
+++ b/gcc/testsuite/gfortran.dg/parens_5.f90
@@ -19,5 +19,3 @@ program test
c = bobo(5)
if (c .ne. "12345") call abort
end program test
-
-! { dg-final { cleanup-modules "para" } }
diff --git a/gcc/testsuite/gfortran.dg/parens_7.f90 b/gcc/testsuite/gfortran.dg/parens_7.f90
index 9cf9e5b84e..5060e7a80d 100644
--- a/gcc/testsuite/gfortran.dg/parens_7.f90
+++ b/gcc/testsuite/gfortran.dg/parens_7.f90
@@ -15,5 +15,3 @@ end function test4
end program test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90 b/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
index 174d645693..d8c84e7cd6 100644
--- a/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
+++ b/gcc/testsuite/gfortran.dg/parent_result_ref_4.f90
@@ -20,5 +20,3 @@ end module m
use m
if (f ().ne.2) call abort ()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_assign_10.f90 b/gcc/testsuite/gfortran.dg/pointer_assign_10.f90
new file mode 100644
index 0000000000..756e530209
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_assign_10.f90
@@ -0,0 +1,36 @@
+! { dg-do run }
+!
+! PR fortran/57530
+!
+!
+! TYPE => TYPE pointer assignment for functions
+!
+module m
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+contains
+ function f1()
+ type(t), pointer :: f1
+ allocate (f1)
+ f1%ii = 123
+ end function f1
+ function f2()
+ type(t), pointer :: f2(:)
+ allocate (f2(3))
+ f2(:)%ii = [-11,-22,-33]
+ end function f2
+end module m
+
+program test
+ use m
+ implicit none
+ type(t), pointer :: p1, p2(:), p3(:,:)
+ p1 => f1()
+ if (p1%ii /= 123) call abort ()
+ p2 => f2()
+ if (any (p2%ii /= [-11,-22,-33])) call abort ()
+ p3(2:2,1:3) => f2()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
+end program test
diff --git a/gcc/testsuite/gfortran.dg/pointer_assign_11.f90 b/gcc/testsuite/gfortran.dg/pointer_assign_11.f90
new file mode 100644
index 0000000000..f32c531571
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_assign_11.f90
@@ -0,0 +1,51 @@
+! { dg-do run }
+!
+! PR fortran/57530
+!
+!
+! CLASS => CLASS pointer assignment for function results
+!
+module m
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+ type, extends(t) :: t2
+ end type t2
+contains
+ function f1()
+ class(t), pointer :: f1
+ allocate (f1)
+ f1%ii = 123
+ end function f1
+ function f2()
+ class(t), pointer :: f2(:)
+ allocate (f2(3))
+ f2(:)%ii = [-11,-22,-33]
+ end function f2
+end module m
+
+program test
+ use m
+ implicit none
+ class(t), pointer :: p1, p2(:), p3(:,:)
+ type(t) :: my_t
+ type(t2) :: my_t2
+
+ allocate (t2 :: p1, p2(1), p3(1,1))
+ if (.not. same_type_as (p1, my_t2)) call abort()
+ if (.not. same_type_as (p2, my_t2)) call abort()
+ if (.not. same_type_as (p3, my_t2)) call abort()
+
+ p1 => f1()
+ if (p1%ii /= 123) call abort ()
+ if (.not. same_type_as (p1, my_t)) call abort()
+
+ p2 => f2()
+ if (any (p2%ii /= [-11,-22,-33])) call abort ()
+ if (.not. same_type_as (p2, my_t)) call abort()
+
+ p3(2:2,1:3) => f2()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
+ if (.not. same_type_as (p3, my_t)) call abort()
+end program test
diff --git a/gcc/testsuite/gfortran.dg/pointer_assign_8.f90 b/gcc/testsuite/gfortran.dg/pointer_assign_8.f90
new file mode 100644
index 0000000000..e8fb2c3a6b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_assign_8.f90
@@ -0,0 +1,46 @@
+! { dg-do run }
+!
+! PR fortran/57530
+!
+!
+! TYPE => CLASS pointer assignment for variables
+!
+module m
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+contains
+ subroutine sub (tgt, tgt2)
+ class(t), target :: tgt, tgt2(:)
+ type(t), pointer :: ptr, ptr2(:), ptr3(:,:)
+
+ if (tgt%ii /= 43) call abort()
+ if (size (tgt2) /= 3) call abort()
+ if (any (tgt2(:)%ii /= [11,22,33])) call abort()
+
+ ptr => tgt ! TYPE => CLASS
+ ptr2 => tgt2 ! TYPE => CLASS
+ ptr3(-3:-3,1:3) => tgt2 ! TYPE => CLASS
+
+ if (.not. associated(ptr)) call abort()
+ if (.not. associated(ptr2)) call abort()
+ if (.not. associated(ptr3)) call abort()
+ if (.not. associated(ptr,tgt)) call abort()
+ if (.not. associated(ptr2,tgt2)) call abort()
+ if (ptr%ii /= 43) call abort()
+ if (size (ptr2) /= 3) call abort()
+ if (size (ptr3) /= 3) call abort()
+ if (any (ptr2(:)%ii /= [11,22,33])) call abort()
+ if (any (shape (ptr3) /= [1,3])) call abort()
+ if (any (ptr3(-3,:)%ii /= [11,22,33])) call abort()
+ end subroutine sub
+end module m
+
+use m
+type(t), target :: x
+type(t), target :: y(3)
+x%ii = 43
+y(:)%ii = [11,22,33]
+call sub(x,y)
+end
diff --git a/gcc/testsuite/gfortran.dg/pointer_assign_9.f90 b/gcc/testsuite/gfortran.dg/pointer_assign_9.f90
new file mode 100644
index 0000000000..7f8152aae6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_assign_9.f90
@@ -0,0 +1,36 @@
+! { dg-do run }
+!
+! PR fortran/57530
+!
+!
+! TYPE => CLASS pointer assignment for functions
+!
+module m
+ implicit none
+ type t
+ integer :: ii = 55
+ end type t
+contains
+ function f1()
+ class(t), pointer :: f1
+ allocate (f1)
+ f1%ii = 123
+ end function f1
+ function f2()
+ class(t), pointer :: f2(:)
+ allocate (f2(3))
+ f2(:)%ii = [-11,-22,-33]
+ end function f2
+end module m
+
+program test
+ use m
+ implicit none
+ type(t), pointer :: p1, p2(:),p3(:,:)
+ p1 => f1()
+ if (p1%ii /= 123) call abort ()
+ p2 => f2()
+ if (any (p2%ii /= [-11,-22,-33])) call abort ()
+ p3(2:2,1:3) => f2()
+ if (any (p3(2,:)%ii /= [-11,-22,-33])) call abort ()
+end program test
diff --git a/gcc/testsuite/gfortran.dg/pointer_check_13.f90 b/gcc/testsuite/gfortran.dg/pointer_check_13.f90
new file mode 100644
index 0000000000..f936f2d745
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_check_13.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! { dg-options "-Wall -Wno-uninitialized" }
+!
+! PR fortran/56477
+! The pointer target live range checking code used to trigger a NULL pointer
+! dereference with the following case.
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+!
+module s
+contains
+ function so()
+ implicit none
+ integer, target :: so
+ integer, pointer :: sp
+ sp => so
+ return
+ end function So
+end module s
diff --git a/gcc/testsuite/gfortran.dg/pointer_check_6.f90 b/gcc/testsuite/gfortran.dg/pointer_check_6.f90
index 2f7373fe6b..81dbae847a 100644
--- a/gcc/testsuite/gfortran.dg/pointer_check_6.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_check_6.f90
@@ -113,6 +113,3 @@ contains
integer :: b
end subroutine
end
-
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_check_7.f90 b/gcc/testsuite/gfortran.dg/pointer_check_7.f90
index 0f6dcdc87f..5b0c212cb7 100644
--- a/gcc/testsuite/gfortran.dg/pointer_check_7.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_check_7.f90
@@ -32,5 +32,3 @@ contains
end subroutine
end module
-
-! { dg-final { cleanup-modules "base_mat_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_comp_init_1.f90 b/gcc/testsuite/gfortran.dg/pointer_comp_init_1.f90
index 44f360e982..5738de6c9f 100644
--- a/gcc/testsuite/gfortran.dg/pointer_comp_init_1.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_comp_init_1.f90
@@ -26,5 +26,3 @@ contains
end subroutine add_item_to_dict
end module m_common_attrs
-
-! { dg-final { cleanup-modules "m_common_attrs" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_2.f90 b/gcc/testsuite/gfortran.dg/pointer_init_2.f90
index 8f72663e25..a280a3e4f9 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_2.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_2.f90
@@ -24,13 +24,26 @@ subroutine sub
type :: t
integer, pointer :: dpc0 => 13 ! { dg-error "Error in pointer initialization" }
- integer, pointer :: dpc1 => r ! { dg-error "is REAL but should be INTEGER" }
- integer, pointer :: dpc2 => v ! { dg-error "rank of the element.*does not match" }
- integer, pointer :: dpc3 => i ! { dg-error "should be a POINTER or a TARGET" }
+ end type t
+
+ type t2
+ integer, pointer :: dpc1 => r ! { dg-error "attempted assignment of REAL.4. to INTEGER.4." }
+ end type t2
+
+ type t3
+ integer, pointer :: dpc2 => v ! { dg-error "Different ranks in pointer assignment" }
+ end type t3
+
+ type t4
+ integer, pointer :: dpc3 => i ! { dg-error "Pointer assignment target is neither TARGET nor POINTER" }
+ end type t4
+
+ type t5
integer, pointer :: dpc4 => j ! { dg-error "must have the SAVE attribute" }
- integer, pointer :: dpc5 => a ! { dg-error "must not be ALLOCATABLE" }
- end type
+ end type t5
- type(t) ::u
+ type t6
+ integer, pointer :: dpc5 => a ! { dg-error "must not be ALLOCATABLE" }
+ end type t6
end subroutine
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_3.f90 b/gcc/testsuite/gfortran.dg/pointer_init_3.f90
index 867a428bf4..a91e518cc4 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_3.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_3.f90
@@ -40,5 +40,3 @@ dp3 = 4
if (u%i/=4) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_4.f90 b/gcc/testsuite/gfortran.dg/pointer_init_4.f90
index 75ead45291..2ca173468d 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_4.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_4.f90
@@ -38,5 +38,3 @@ if (pp()/=42) call abort()
if (u%ppc()/=43) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_5.f90 b/gcc/testsuite/gfortran.dg/pointer_init_5.f90
index beedad27d1..1ca773874a 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_5.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_5.f90
@@ -38,5 +38,3 @@ if (pp()/=42) call abort()
if (u%ppc()/=43) call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_6.f90 b/gcc/testsuite/gfortran.dg/pointer_init_6.f90
index 92cece3a8e..428a7dee84 100644
--- a/gcc/testsuite/gfortran.dg/pointer_init_6.f90
+++ b/gcc/testsuite/gfortran.dg/pointer_init_6.f90
@@ -27,7 +27,7 @@ module m2
type(t) :: x
procedure(s), pointer :: pp1 => s
procedure(s), pointer :: pp2 => pp1 ! { dg-error "may not be a procedure pointer" }
- procedure(s), pointer :: pp3 => t%ppc ! { dg-error "Syntax error" }
+ procedure(s), pointer :: pp3 => t%ppc ! { dg-error "Symbol 't' at .1. has no IMPLICIT type" }
contains
@@ -35,5 +35,3 @@ contains
end subroutine
end module m2
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_7.f90 b/gcc/testsuite/gfortran.dg/pointer_init_7.f90
new file mode 100644
index 0000000000..dfde6156e6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_init_7.f90
@@ -0,0 +1,56 @@
+! { dg-do compile }
+!
+! PR fortran/55763
+!
+
+subroutine sub()
+ type t
+ integer :: i
+ end type t
+
+ type(t), target :: tgt
+ type(t), target, save :: tgt2(2)
+
+ type t2a
+ type(t), pointer :: cmp1 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ end type t2a
+
+ type t2b
+ class(t), pointer :: cmp2 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ end type t2b
+
+ type t2c
+ class(t), pointer :: cmp3 => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ end type t2c
+
+ type t2d
+ integer, pointer :: cmp4 => tgt%i ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ end type t2d
+
+ type(t), pointer :: w => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ class(t), pointer :: x => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ class(*), pointer :: y => tgt ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+ integer, pointer :: z => tgt%i ! { dg-error "Pointer initialization target at .1. must have the SAVE attribute" }
+end subroutine
+
+program main
+ type t3
+ integer :: j
+ end type t3
+
+ type(t3), target :: tgt
+
+ type t4
+ type(t3), pointer :: cmp1 => tgt ! OK
+ class(t3), pointer :: cmp2 => tgt ! OK
+ class(t3), pointer :: cmp3 => tgt ! OK
+ integer, pointer :: cmp4 => tgt%j ! OK
+ end type t4
+
+ type(t3), target :: mytarget
+
+ type(t3), pointer :: a => mytarget ! OK
+ class(t3), pointer :: b => mytarget ! OK
+ class(*), pointer :: c => mytarget ! OK
+ integer, pointer :: d => mytarget%j ! OK
+end program main
diff --git a/gcc/testsuite/gfortran.dg/pointer_init_8.f90 b/gcc/testsuite/gfortran.dg/pointer_init_8.f90
new file mode 100644
index 0000000000..aacd9a8e16
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_init_8.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+!
+! PR 57306: [OOP] ICE on valid with class pointer initialization
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module m
+ type :: c
+ end type c
+ type, extends(c) :: d
+ end type d
+ type(c), target :: x
+ type(d), target :: y
+end module m
+
+ use m
+ class(c), pointer :: px => x
+ class(c), pointer :: py => y
+
+ if (.not. associated(px, x)) call abort()
+ if (.not. same_type_as(px, x)) call abort()
+ if (.not. associated(py, y)) call abort()
+ if (.not. same_type_as(py, y)) call abort()
+end
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/pointer_intent_7.f90 b/gcc/testsuite/gfortran.dg/pointer_intent_7.f90
new file mode 100644
index 0000000000..5387ace8c1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_intent_7.f90
@@ -0,0 +1,45 @@
+! { dg-do compile }
+!
+! PR fortran/
+!
+! Contributed by Neil Carlson
+!
+! Check whether passing an intent(in) pointer
+! to an intent(inout) nonpointer is allowed
+!
+module modA
+ type :: typeA
+ integer, pointer :: ptr
+ end type
+contains
+ subroutine foo (a,b,c)
+ type(typeA), intent(in) :: a
+ type(typeA), intent(in) , pointer :: b
+ class(typeA), intent(in) , pointer :: c
+
+ call bar (a%ptr)
+ call bar2 (b)
+ call bar3 (b)
+ call bar2 (c)
+ call bar3 (c)
+ call bar2p (b) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
+ call bar3p (b) ! { dg-error "Actual argument to .n. at \\(1\\) must be polymorphic" }
+ call bar2p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
+ call bar3p (c) ! { dg-error "INTENT\\(IN\\) in pointer association context \\(actual argument to INTENT = OUT/INOUT" }
+ end subroutine
+ subroutine bar (n)
+ integer, intent(inout) :: n
+ end subroutine
+ subroutine bar2 (n)
+ type(typeA), intent(inout) :: n
+ end subroutine
+ subroutine bar3 (n)
+ class(typeA), intent(inout) :: n
+ end subroutine
+ subroutine bar2p (n)
+ type(typeA), intent(inout), pointer :: n
+ end subroutine
+ subroutine bar3p (n)
+ class(typeA), intent(inout), pointer :: n
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/pointer_remapping_8.f90 b/gcc/testsuite/gfortran.dg/pointer_remapping_8.f90
new file mode 100644
index 0000000000..94fe6c553e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pointer_remapping_8.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR 54788 ICE on pointer-array element assignment
+!
+program bug
+ integer, pointer :: a(:)
+ integer :: b
+ allocate(a(0:0))
+ a(0:0) => b ! { dg-error "Rank remapping target must be rank 1 or simply contiguous" }
+end
diff --git a/gcc/testsuite/gfortran.dg/power_3.f90 b/gcc/testsuite/gfortran.dg/power_3.f90
new file mode 100644
index 0000000000..381c5d3185
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/power_3.f90
@@ -0,0 +1,38 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 57071 - Check that (-1)**k is transformed into 1-2*iand(k,1).
+program main
+ implicit none
+ integer, parameter :: n = 3
+ integer(kind=8), dimension(-n:n) :: a, b
+ integer, dimension(-n:n) :: c, d, e
+ integer :: m
+ integer :: i, v
+ integer (kind=2) :: i2
+
+ m = n
+ v = -1
+ ! Test in scalar expressions
+ do i=-n,n
+ if (v**i /= (-1)**i) call abort
+ end do
+
+ ! Test in array constructors
+ a(-m:m) = [ ((-1)**i, i= -m, m) ]
+ b(-m:m) = [ ( v**i, i= -m, m) ]
+ if (any(a .ne. b)) call abort
+
+ ! Test in array expressions
+ c = [ ( i, i = -n , n ) ]
+ d = (-1)**c
+ e = v**c
+ if (any(d .ne. e)) call abort
+
+ ! Test in different kind expressions
+ do i2=-n,n
+ if (v**i2 /= (-1)**i2) call abort
+ end do
+
+end program main
+! { dg-final { scan-tree-dump-times "_gfortran_pow_i4_i4" 4 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/power_4.f90 b/gcc/testsuite/gfortran.dg/power_4.f90
new file mode 100644
index 0000000000..1d53259664
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/power_4.f90
@@ -0,0 +1,29 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 57071 - Check that 2**k is transformed into ishift(1,k).
+program main
+ implicit none
+ integer :: i,m,v
+ integer, parameter :: n=30
+ integer, dimension(-n:n) :: a,b,c,d,e
+ m = n
+
+ v = 2
+ ! Test scalar expressions.
+ do i=-n,n
+ if (2**i /= v**i) call abort
+ end do
+
+ ! Test array constructors
+ b = [(2**i,i=-m,m)]
+ c = [(v**i,i=-m,m)]
+ if (any(b /= c)) call abort
+
+ ! Test array expressions
+ a = [(i,i=-m,m)]
+ d = 2**a
+ e = v**a
+ if (any(d /= e)) call abort
+end program main
+! { dg-final { scan-tree-dump-times "_gfortran_pow_i4_i4" 3 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/power_5.f90 b/gcc/testsuite/gfortran.dg/power_5.f90
new file mode 100644
index 0000000000..f42b26051c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/power_5.f90
@@ -0,0 +1,36 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 57071 - Check that 1**k is transformed into 1
+program main
+ implicit none
+ integer, parameter :: n = 3
+ integer(kind=8), dimension(-n:n) :: a
+ integer, dimension(-n:n) :: c, d
+ integer :: m
+ integer :: i, v
+ integer (kind=2) :: i2
+
+ v = 1
+ m = n
+ ! Test in scalar expressions
+ do i=-n,n
+ if (v /= 1**i) call abort
+ end do
+
+ ! Test in array constructors
+ a(-m:m) = [ (1**i, i= -m, m) ]
+ if (any(a .ne. v)) call abort
+
+ ! Test in array expressions
+ c = [ ( i, i = -n , n ) ]
+ d = 1**c
+ if (any(d .ne. v)) call abort
+
+ ! Test in different kind expressions
+ do i2=-n,n
+ if (v /= 1**i2) call abort
+ end do
+
+end program main
+! { dg-final { scan-tree-dump-times "_gfortran_pow_i4_i4" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/power_6.f90 b/gcc/testsuite/gfortran.dg/power_6.f90
new file mode 100644
index 0000000000..65d1bd0268
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/power_6.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-O1 -fdump-tree-optimized" }
+!
+! PR middle-end/57073
+! See also PR 57073
+!
+real function f(k)
+ integer, value :: k
+ f = (-1.0)**k
+end
+
+! { dg-final { scan-tree-dump-not "__builtin_powif" "optimized" } }
+! { dg-final { scan-tree-dump "powi_cond_\[0-9\] = k_\[0-9\]\\(D\\) & 1;" "optimized" } }
+! { dg-final { scan-tree-dump "powi_\[0-9\] = powi_cond_\[0-9\] \\? -1.0e\\+0 : 1.0e\\+0;" "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/pr15164.f90 b/gcc/testsuite/gfortran.dg/pr15164.f90
index f8098710be..def29318e1 100644
--- a/gcc/testsuite/gfortran.dg/pr15164.f90
+++ b/gcc/testsuite/gfortran.dg/pr15164.f90
@@ -13,5 +13,3 @@
return
end subroutine split
end module specfiles
-
-! { dg-final { cleanup-modules "specfiles" } }
diff --git a/gcc/testsuite/gfortran.dg/pr16597.f90 b/gcc/testsuite/gfortran.dg/pr16597.f90
index c29147411a..fc191efef7 100644
--- a/gcc/testsuite/gfortran.dg/pr16597.f90
+++ b/gcc/testsuite/gfortran.dg/pr16597.f90
@@ -19,7 +19,7 @@
open (UNIT=iunit,FORM='unformatted',ACCESS='direct',RECL=strlen)
write (iunit, rec=1) 'ABCD'
read (iunit, rec=1) string
- close (iunit)
+ close (iunit, status = 'delete')
if (string.ne.'ABCD') call abort
open (UNIT=iunit,FORM='unformatted',ACCESS='direct',STATUS='scratch',RECL=strlen)
diff --git a/gcc/testsuite/gfortran.dg/pr16861.f90 b/gcc/testsuite/gfortran.dg/pr16861.f90
index 88f89fa78b..4a73edaf4f 100644
--- a/gcc/testsuite/gfortran.dg/pr16861.f90
+++ b/gcc/testsuite/gfortran.dg/pr16861.f90
@@ -30,5 +30,3 @@ end subroutine quus
program test
call quus
end program test
-
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/pr17615.f90 b/gcc/testsuite/gfortran.dg/pr17615.f90
index 76676182f4..13b90334a7 100644
--- a/gcc/testsuite/gfortran.dg/pr17615.f90
+++ b/gcc/testsuite/gfortran.dg/pr17615.f90
@@ -17,5 +17,3 @@ PROGRAM TEST
real(8) :: c(3)
c = cross_product()
END PROGRAM TEST
-
-! { dg-final { cleanup-modules "module_vec3d" } }
diff --git a/gcc/testsuite/gfortran.dg/pr19926.f90 b/gcc/testsuite/gfortran.dg/pr19926.f90
index ae70d5b0fa..3b452c1cf6 100644
--- a/gcc/testsuite/gfortran.dg/pr19926.f90
+++ b/gcc/testsuite/gfortran.dg/pr19926.f90
@@ -22,5 +22,3 @@ subroutine string_comp(i)
integer :: i
i = map(42)
end subroutine string_comp
-
-! { dg-final { cleanup-modules "b" } }
diff --git a/gcc/testsuite/gfortran.dg/pr20163-2.f b/gcc/testsuite/gfortran.dg/pr20163-2.f
index 0638aeaf9d..5849cfcb2f 100644
--- a/gcc/testsuite/gfortran.dg/pr20163-2.f
+++ b/gcc/testsuite/gfortran.dg/pr20163-2.f
@@ -1,3 +1,4 @@
+! { dg-do run }
open(10,status="foo",err=100) ! { dg-warning "STATUS specifier in OPEN statement .* has invalid value" }
call abort
100 continue
diff --git a/gcc/testsuite/gfortran.dg/pr21177.f90 b/gcc/testsuite/gfortran.dg/pr21177.f90
index 48d3531231..8ce0180dfc 100644
--- a/gcc/testsuite/gfortran.dg/pr21177.f90
+++ b/gcc/testsuite/gfortran.dg/pr21177.f90
@@ -51,5 +51,3 @@ program test
if (tt(null(c4)) /= 3) call abort()
if (tt(null(c8)) /= 4) call abort()
end program test
-
-! { dg-final { cleanup-modules "mymod" } }
diff --git a/gcc/testsuite/gfortran.dg/pr25923.f90 b/gcc/testsuite/gfortran.dg/pr25923.f90
index e0df5b0c81..3283ba21f3 100644
--- a/gcc/testsuite/gfortran.dg/pr25923.f90
+++ b/gcc/testsuite/gfortran.dg/pr25923.f90
@@ -22,5 +22,3 @@ contains
end function baz ! { dg-warning "res.yr' may be" }
end module foo
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/pr26246_1.f90 b/gcc/testsuite/gfortran.dg/pr26246_1.f90
index e35bcaca30..a1cb45535f 100644
--- a/gcc/testsuite/gfortran.dg/pr26246_1.f90
+++ b/gcc/testsuite/gfortran.dg/pr26246_1.f90
@@ -16,4 +16,3 @@ end module pr26246_1
! { dg-final { scan-tree-dump-times "static int" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "pr26246_1" } }
diff --git a/gcc/testsuite/gfortran.dg/pr32222.f90 b/gcc/testsuite/gfortran.dg/pr32222.f90
index 1daac1ef17..fbe33ed129 100644
--- a/gcc/testsuite/gfortran.dg/pr32222.f90
+++ b/gcc/testsuite/gfortran.dg/pr32222.f90
@@ -1,6 +1,5 @@
!PR fortran/32222
! { dg-do compile }
-! { dg-final { cleanup-modules "splinemod" } }
module splinemod
implicit none
diff --git a/gcc/testsuite/gfortran.dg/pr32238.f90 b/gcc/testsuite/gfortran.dg/pr32238.f90
index 2c88b35656..6af64ca606 100644
--- a/gcc/testsuite/gfortran.dg/pr32238.f90
+++ b/gcc/testsuite/gfortran.dg/pr32238.f90
@@ -1,6 +1,5 @@
!PR fortran/32238
! { dg-do compile }
-! { dg-final { cleanup-modules "bug_test" } }
module bug_test
diff --git a/gcc/testsuite/gfortran.dg/pr32242.f90 b/gcc/testsuite/gfortran.dg/pr32242.f90
index 21ecdd1786..8699e0050a 100644
--- a/gcc/testsuite/gfortran.dg/pr32242.f90
+++ b/gcc/testsuite/gfortran.dg/pr32242.f90
@@ -1,7 +1,6 @@
!PR fortran/32242
! { dg-do compile }
! { dg-options "-Wreturn-type" }
-! { dg-final { cleanup-modules "kahan_sum" } }
MODULE kahan_sum
INTEGER, PARAMETER :: dp=KIND(0.0D0)
diff --git a/gcc/testsuite/gfortran.dg/pr32535.f90 b/gcc/testsuite/gfortran.dg/pr32535.f90
index 43ea48e04c..e16882103d 100644
--- a/gcc/testsuite/gfortran.dg/pr32535.f90
+++ b/gcc/testsuite/gfortran.dg/pr32535.f90
@@ -22,5 +22,3 @@ contains
end subroutine subsub
end subroutine sub
end module mo
-
-! { dg-final { cleanup-modules "mo" } }
diff --git a/gcc/testsuite/gfortran.dg/pr32601.f03 b/gcc/testsuite/gfortran.dg/pr32601.f03
index 90fa6b3f41..a4048cc321 100644
--- a/gcc/testsuite/gfortran.dg/pr32601.f03
+++ b/gcc/testsuite/gfortran.dg/pr32601.f03
@@ -19,10 +19,9 @@ type(c_ptr) :: t
t = c_null_ptr
! Next two lines should be errors if -pedantic or -std=f2003
-print *, c_null_ptr, t ! { dg-error "has PRIVATE components" }
-print *, t ! { dg-error "has PRIVATE components" }
+print *, c_null_ptr, t ! { dg-error "cannot have PRIVATE components" }
+print *, t ! { dg-error "cannot have PRIVATE components" }
-print *, c_loc(get_ptr()) ! { dg-error "has PRIVATE components" }
+print *, c_loc(get_ptr()) ! { dg-error "cannot have PRIVATE components" }
end
-! { dg-final { cleanup-modules "pr32601" } }
diff --git a/gcc/testsuite/gfortran.dg/pr32601_1.f03 b/gcc/testsuite/gfortran.dg/pr32601_1.f03
index 3e9aa73842..a297e1728e 100644
--- a/gcc/testsuite/gfortran.dg/pr32601_1.f03
+++ b/gcc/testsuite/gfortran.dg/pr32601_1.f03
@@ -1,10 +1,12 @@
! { dg-do compile }
+! { dg-options "" }
+!
! PR fortran/32601
use, intrinsic :: iso_c_binding, only: c_loc, c_ptr
implicit none
! This was causing an ICE, but is an error because the argument to C_LOC
! needs to be a variable.
-print *, c_loc(4) ! { dg-error "not a variable" }
+print *, c_loc(4) ! { dg-error "shall have either the POINTER or the TARGET attribute" }
end
diff --git a/gcc/testsuite/gfortran.dg/pr32738.f90 b/gcc/testsuite/gfortran.dg/pr32738.f90
index bee6f184cc..3c413f10cb 100644
--- a/gcc/testsuite/gfortran.dg/pr32738.f90
+++ b/gcc/testsuite/gfortran.dg/pr32738.f90
@@ -42,5 +42,3 @@ program example
implicit none
print *, tree_size(1)
end program example
-
-! { dg-final { cleanup-modules "cluster_definition cluster_tree" } }
diff --git a/gcc/testsuite/gfortran.dg/pr32921.f b/gcc/testsuite/gfortran.dg/pr32921.f
index e809d6ced2..45ea6479b8 100644
--- a/gcc/testsuite/gfortran.dg/pr32921.f
+++ b/gcc/testsuite/gfortran.dg/pr32921.f
@@ -47,4 +47,3 @@
END
! { dg-final { scan-tree-dump-times "stride" 4 "lim1" } }
! { dg-final { cleanup-tree-dump "lim1" } }
-! { dg-final { cleanup-modules "les3d_data" } }
diff --git a/gcc/testsuite/gfortran.dg/pr33646.f90 b/gcc/testsuite/gfortran.dg/pr33646.f90
index 15186b615f..3b5662e4ca 100644
--- a/gcc/testsuite/gfortran.dg/pr33646.f90
+++ b/gcc/testsuite/gfortran.dg/pr33646.f90
@@ -55,5 +55,3 @@ contains
call create_(self)
end subroutine
end
-
-! { dg-final { cleanup-modules "bar_module foo_module" } }
diff --git a/gcc/testsuite/gfortran.dg/pr33794.f90 b/gcc/testsuite/gfortran.dg/pr33794.f90
index 740f1ea1d3..affad5eb66 100644
--- a/gcc/testsuite/gfortran.dg/pr33794.f90
+++ b/gcc/testsuite/gfortran.dg/pr33794.f90
@@ -46,5 +46,3 @@ program test
call self_ind_cir_coil (r, l, turns, mu, self_l)
end program test
-
-! { dg-final { cleanup-modules "scc_m" } }
diff --git a/gcc/testsuite/gfortran.dg/pr36680.f90 b/gcc/testsuite/gfortran.dg/pr36680.f90
new file mode 100644
index 0000000000..b554b76543
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr36680.f90
@@ -0,0 +1,43 @@
+! PR target/36680
+! { dg-do compile { target i?86-*-* x86_64-*-* } }
+! { dg-options "-O1 -fschedule-insns" }
+
+MODULE class_dummy_atom_kdtree_types
+ TYPE dummy_atom_kdtree_data
+ INTEGER :: dummy
+ END TYPE
+
+ TYPE :: dummy_atom_kdtree_node
+ TYPE(dummy_atom_kdtree_node_private), POINTER :: p
+ END TYPE
+
+ TYPE :: dummy_atom_kdtree_node_private
+ TYPE(dummy_atom_kdtree_data) :: data
+ END TYPE
+
+ TYPE :: dummy_atom_kdtree
+ TYPE(dummy_atom_kdtree_node) :: root
+ END TYPE
+END MODULE
+
+FUNCTION dummy_atom_kdtree_insert(this, item)
+ USE class_dummy_atom_kdtree_types
+
+ TYPE(dummy_atom_kdtree), INTENT(inout) :: this
+ TYPE(dummy_atom_kdtree_data), INTENT(in) :: item
+
+ TYPE(dummy_atom_kdtree_node) :: parent, current
+ INTEGER :: cmp, level, discriminator
+
+ parent = dummy_atom_kdtree_node(null())
+ current = this%root
+ level = 1
+ discriminator = 1
+
+ DO WHILE (ASSOCIATED( current%p ))
+ discriminator = MODULO(level-1, 3) + 1
+ cmp = dummy_atom_kdtree_data_compare(item, current%p%data, discriminator)
+ level = level + 1
+ END DO
+
+END FUNCTION
diff --git a/gcc/testsuite/gfortran.dg/pr37243.f b/gcc/testsuite/gfortran.dg/pr37243.f
index 0a606ad770..f5dda43e71 100644
--- a/gcc/testsuite/gfortran.dg/pr37243.f
+++ b/gcc/testsuite/gfortran.dg/pr37243.f
@@ -13,10 +13,10 @@
DO 160 I = 1,M
DUMI = ZERO
DO 100 K = 1,N
- 100 DUMI = DUMI+V(K,I)*V(K,I)
+ 100 DUMI = DUMI+V(K,I)*V(K,I) ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" }
DUMI = ONE/ SQRT(DUMI)
DO 120 K = 1,N
- 120 V(K,I) = V(K,I)*DUMI
+ 120 V(K,I) = V(K,I)*DUMI ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" }
IF (I .EQ. M) GO TO 160
I1 = I+1
DO 140 J = I1,M
@@ -34,15 +34,15 @@
220 J = J+1
IF (J .GT. N) GO TO 320
DO 240 K = 1,N
- 240 V(K,I) = ZERO
+ 240 V(K,I) = ZERO ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" }
CALL DAXPY(N,DUM,V(1,I),1,V(1,I),1)
260 CONTINUE
DUMI = ZERO
DO 280 K = 1,N
- 280 DUMI = DUMI+V(K,I)*V(K,I)
+ 280 DUMI = DUMI+V(K,I)*V(K,I) ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" }
IF ( ABS(DUMI) .LT. TOL) GO TO 220
DO 300 K = 1,N
- 300 V(K,I) = V(K,I)*DUMI
+ 300 V(K,I) = V(K,I)*DUMI ! { dg-warning "Obsolescent feature: DO termination statement which is not END DO or CONTINUE" }
GO TO 200
320 END
program main
diff --git a/gcc/testsuite/gfortran.dg/pr37286.f90 b/gcc/testsuite/gfortran.dg/pr37286.f90
index 75c6814415..607fca496e 100644
--- a/gcc/testsuite/gfortran.dg/pr37286.f90
+++ b/gcc/testsuite/gfortran.dg/pr37286.f90
@@ -54,5 +54,3 @@ contains
end function gn_monte_rand
end module general_rand
-
-! { dg-final { cleanup-modules "general_rand" } }
diff --git a/gcc/testsuite/gfortran.dg/pr37287-1.f90 b/gcc/testsuite/gfortran.dg/pr37287-1.f90
index 629966fe9f..c2d42e6de0 100644
--- a/gcc/testsuite/gfortran.dg/pr37287-1.f90
+++ b/gcc/testsuite/gfortran.dg/pr37287-1.f90
@@ -12,5 +12,3 @@ contains
end subroutine set_null
end module pr37287_1
end
-! { dg-final { cleanup-modules "pr37287_1" } }
-! { dg-final { cleanup-modules "pr37287_2" } }
diff --git a/gcc/testsuite/gfortran.dg/pr37287-2.F90 b/gcc/testsuite/gfortran.dg/pr37287-2.F90
index 330ab42cd3..576b645d07 100644
--- a/gcc/testsuite/gfortran.dg/pr37287-2.F90
+++ b/gcc/testsuite/gfortran.dg/pr37287-2.F90
@@ -7,4 +7,3 @@ module pr37287_2
#endif
implicit none
end module pr37287_2
-! { dg-final { cleanup-modules "pr37287_2" } }
diff --git a/gcc/testsuite/gfortran.dg/pr41347.f90 b/gcc/testsuite/gfortran.dg/pr41347.f90
index e8ceef5f7d..ae48857d50 100644
--- a/gcc/testsuite/gfortran.dg/pr41347.f90
+++ b/gcc/testsuite/gfortran.dg/pr41347.f90
@@ -30,4 +30,3 @@ module hsl_ma41_m
end subroutine prininfo
end module hsl_ma41_m
-! { dg-final { cleanup-modules "hsl_ma41_m" } }
diff --git a/gcc/testsuite/gfortran.dg/pr41928.f90 b/gcc/testsuite/gfortran.dg/pr41928.f90
index 3d0c25cdb2..1438b0c122 100644
--- a/gcc/testsuite/gfortran.dg/pr41928.f90
+++ b/gcc/testsuite/gfortran.dg/pr41928.f90
@@ -261,4 +261,3 @@ CONTAINS
END DO
END SUBROUTINE diff_momop
END MODULE ai_moments
-! { dg-final { cleanup-modules "kinds ai_moments" } }
diff --git a/gcc/testsuite/gfortran.dg/pr42051.f03 b/gcc/testsuite/gfortran.dg/pr42051.f03
index 308c1e7229..7a5be635f1 100644
--- a/gcc/testsuite/gfortran.dg/pr42051.f03
+++ b/gcc/testsuite/gfortran.dg/pr42051.f03
@@ -32,5 +32,3 @@ contains
end module
end
-
-! { dg-final { cleanup-modules "grid_module field_module" } }
diff --git a/gcc/testsuite/gfortran.dg/pr42119.f90 b/gcc/testsuite/gfortran.dg/pr42119.f90
index 962181d2f4..f848e9e9f6 100644
--- a/gcc/testsuite/gfortran.dg/pr42119.f90
+++ b/gcc/testsuite/gfortran.dg/pr42119.f90
@@ -22,4 +22,3 @@ program Main
call Check(C_FUNLOC(Callback))
end program Main
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/pr42166.f90 b/gcc/testsuite/gfortran.dg/pr42166.f90
index 910a08c36f..e29867edae 100644
--- a/gcc/testsuite/gfortran.dg/pr42166.f90
+++ b/gcc/testsuite/gfortran.dg/pr42166.f90
@@ -17,5 +17,3 @@ CONTAINS
END DO
END SUBROUTINE newuob
END MODULE powell
-
-! { dg-final { cleanup-modules "powell" } }
diff --git a/gcc/testsuite/gfortran.dg/pr43505.f90 b/gcc/testsuite/gfortran.dg/pr43505.f90
index b912c9ff0d..1f6b0b2722 100644
--- a/gcc/testsuite/gfortran.dg/pr43505.f90
+++ b/gcc/testsuite/gfortran.dg/pr43505.f90
@@ -39,6 +39,3 @@
end subroutine
END PROGRAM TEST
-! { dg-final { cleanup-modules "main1" } }
-
-
diff --git a/gcc/testsuite/gfortran.dg/pr43793.f90 b/gcc/testsuite/gfortran.dg/pr43793.f90
index c30f8422be..17d5bbe694 100644
--- a/gcc/testsuite/gfortran.dg/pr43793.f90
+++ b/gcc/testsuite/gfortran.dg/pr43793.f90
@@ -20,4 +20,3 @@ contains
end if
end subroutine sparse_alltoall
end module fft_tools
-! { dg-final { cleanup-modules "fft_tools" } }
diff --git a/gcc/testsuite/gfortran.dg/pr43866.f90 b/gcc/testsuite/gfortran.dg/pr43866.f90
index abfdaa1557..4cfec0feb1 100644
--- a/gcc/testsuite/gfortran.dg/pr43866.f90
+++ b/gcc/testsuite/gfortran.dg/pr43866.f90
@@ -40,5 +40,3 @@ END MODULE PR43866
Q%B=0
CALL FOO (Q,N,N,.FALSE.)
END
-
-! { dg-final { cleanup-modules "pr43866" } }
diff --git a/gcc/testsuite/gfortran.dg/pr43984.f90 b/gcc/testsuite/gfortran.dg/pr43984.f90
index a4f151d3d9..40c81b84c6 100644
--- a/gcc/testsuite/gfortran.dg/pr43984.f90
+++ b/gcc/testsuite/gfortran.dg/pr43984.f90
@@ -54,4 +54,3 @@ end
! { dg-final { scan-tree-dump-times "= iyz.data" 3 "pre" } }
! { dg-final { cleanup-tree-dump "pre" } }
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/pr45636.f90 b/gcc/testsuite/gfortran.dg/pr45636.f90
index ee7cf3863c..c80dda45ba 100644
--- a/gcc/testsuite/gfortran.dg/pr45636.f90
+++ b/gcc/testsuite/gfortran.dg/pr45636.f90
@@ -10,5 +10,5 @@ program main
b = y
call sub(a, b)
end program main
-! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { mips*-*-* && { ! nomips16 } } } } }
+! { dg-final { scan-tree-dump-times "memset" 0 "forwprop2" { xfail { { hppa*-*-* && { ! lp64 } } || { mips*-*-* && { ! nomips16 } } } } } }
! { dg-final { cleanup-tree-dump "forwprop2" } }
diff --git a/gcc/testsuite/gfortran.dg/pr46519-2.f90 b/gcc/testsuite/gfortran.dg/pr46519-2.f90
index b4d6980550..be810cca61 100644
--- a/gcc/testsuite/gfortran.dg/pr46519-2.f90
+++ b/gcc/testsuite/gfortran.dg/pr46519-2.f90
@@ -10,7 +10,7 @@
REAL :: fluxout
INTEGER :: min_q, max_q, var
do k=kts,kte
- praci(k)=0.0
+ praci(k)=1.0
enddo
min_q=kte
max_q=kts-1
diff --git a/gcc/testsuite/gfortran.dg/pr48636-2.f90 b/gcc/testsuite/gfortran.dg/pr48636-2.f90
new file mode 100644
index 0000000000..75012c7750
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr48636-2.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+! { dg-options "-O3 -fdump-ipa-cp-details -fno-inline" }
+
+module foo
+ implicit none
+contains
+ subroutine bar(a,x)
+ real, dimension(:,:), intent(in) :: a
+ real, intent(out) :: x
+ integer :: i,j
+
+ x = 0
+ do j=1,ubound(a,2)
+ do i=1,ubound(a,1)
+ x = x + a(i,j)**2
+ end do
+ end do
+ end subroutine bar
+end module foo
+
+program main
+ use foo
+ implicit none
+ real, dimension(2,3) :: a
+ real :: x
+ integer :: i
+
+ data a /1.0, 2.0, 3.0, -1.0, -2.0, -3.0/
+
+ do i=1,2000000
+ call bar(a,x)
+ end do
+ print *,x
+end program main
+
+! { dg-final { scan-ipa-dump "Creating a specialized node of bar/\[0-9\]*\\." "cp" } }
+! { dg-final { scan-ipa-dump-times "Aggregate replacements\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=\[^=\]*=" 2 "cp" } }
+! { dg-final { cleanup-ipa-dump "cp" } }
diff --git a/gcc/testsuite/gfortran.dg/pr48636.f90 b/gcc/testsuite/gfortran.dg/pr48636.f90
new file mode 100644
index 0000000000..f35eb519f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr48636.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-options "-O3 -fdump-ipa-inline-details -fno-ipa-cp" }
+
+module foo
+ implicit none
+contains
+ subroutine bar(a,x)
+ real, dimension(:,:), intent(in) :: a
+ real, intent(out) :: x
+ integer :: i,j
+
+ x = 0
+ do j=1,ubound(a,2)
+ do i=1,ubound(a,1)
+ x = x + a(i,j)**2
+ end do
+ end do
+ end subroutine bar
+end module foo
+
+program main
+ use foo
+ implicit none
+ real, dimension(2,3) :: a
+ real :: x
+ integer :: i
+
+ data a /1.0, 2.0, 3.0, -1.0, -2.0, -3.0/
+
+ do i=1,2000000
+ call bar(a,x)
+ end do
+ print *,x
+end program main
+
+! { dg-final { scan-ipa-dump "bar\[^\\n\]*inline copy in MAIN" "inline" } }
+! { dg-final { scan-ipa-dump-times "phi predicate:" 5 "inline" } }
+! { dg-final { scan-ipa-dump "inline hints: loop_iterations" "inline" } }
+! { dg-final { cleanup-ipa-dump "inline" } }
diff --git a/gcc/testsuite/gfortran.dg/pr50875.f90 b/gcc/testsuite/gfortran.dg/pr50875.f90
index 6b4476c14e..0c71080f0b 100644
--- a/gcc/testsuite/gfortran.dg/pr50875.f90
+++ b/gcc/testsuite/gfortran.dg/pr50875.f90
@@ -35,5 +35,3 @@ contains
end subroutine routine_A
end module test
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/pr52370.f90 b/gcc/testsuite/gfortran.dg/pr52370.f90
new file mode 100644
index 0000000000..66a6fe2b80
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr52370.f90
@@ -0,0 +1,21 @@
+! PR fortran/52370
+! { dg-do compile }
+! { dg-options "-O1 -Wall" }
+
+module pr52370
+contains
+ subroutine foo(a,b)
+ real, intent(out) :: a
+ real, dimension(:), optional, intent(out) :: b
+ a=0.5
+ if (present(b)) then
+ b=1.0
+ end if
+ end subroutine foo
+end module pr52370
+
+program prg52370
+ use pr52370
+ real :: a
+ call foo(a)
+end program prg52370
diff --git a/gcc/testsuite/gfortran.dg/pr52608.f90 b/gcc/testsuite/gfortran.dg/pr52608.f90
new file mode 100644
index 0000000000..a632800128
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr52608.f90
@@ -0,0 +1,17 @@
+! { dg-do run }
+! PR 52608
+! Testcase reduced from NIST testsuite FM110
+program fm110_snippet
+ implicit none
+ real :: aavs
+ character(len=100) :: s(2), s2(2)
+ AAVS = .087654
+35043 FORMAT (" ",16X,"COMPUTED: ",22X,1P/26X,F5.4,3X,2P,F5.3,+3P," ",&
+ (23X,F6.2),3X)
+5043 FORMAT (17X,"CORRECT: ",/24X,&
+ " .8765 8.765 87.65")
+ WRITE (s,35043) AAVS,AAVS,AAVS
+ WRITE (s2,5043)
+ if (s(2) /= s2(2)) call abort()
+end program fm110_snippet
+
diff --git a/gcc/testsuite/gfortran.dg/pr53217.f90 b/gcc/testsuite/gfortran.dg/pr53217.f90
new file mode 100644
index 0000000000..82f34f0646
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr53217.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math" }
+
+! This tests only for compile-time failure, which formerly occurred
+! when statements were emitted out of order, failing verify_ssa.
+
+MODULE xc_cs1
+ INTEGER, PARAMETER :: dp=KIND(0.0D0)
+ REAL(KIND=dp), PARAMETER :: a = 0.04918_dp, &
+ c = 0.2533_dp, &
+ d = 0.349_dp
+CONTAINS
+ SUBROUTINE cs1_u_2 ( rho, grho, r13, e_rho_rho, e_rho_ndrho, e_ndrho_ndrho,&
+ npoints, error)
+ REAL(KIND=dp), DIMENSION(*), &
+ INTENT(INOUT) :: e_rho_rho, e_rho_ndrho, &
+ e_ndrho_ndrho
+ DO ip = 1, npoints
+ IF ( rho(ip) > eps_rho ) THEN
+ oc = 1.0_dp/(r*r*r3*r3 + c*g*g)
+ d2rF4 = c4p*f13*f23*g**4*r3/r * (193*d*r**5*r3*r3+90*d*d*r**5*r3 &
+ -88*g*g*c*r**3*r3-100*d*d*c*g*g*r*r*r3*r3 &
+ +104*r**6)*od**3*oc**4
+ e_rho_rho(ip) = e_rho_rho(ip) + d2F1 + d2rF2 + d2F3 + d2rF4
+ END IF
+ END DO
+ END SUBROUTINE cs1_u_2
+END MODULE xc_cs1
diff --git a/gcc/testsuite/gfortran.dg/pr53787.f90 b/gcc/testsuite/gfortran.dg/pr53787.f90
new file mode 100644
index 0000000000..0103e9ddce
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr53787.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-O3 -fdump-ipa-cp-details -fno-inline -fwhole-program" }
+
+ real x(10)
+ n = 10
+ call init(x,n)
+ print *, x
+end program
+
+subroutine init(x, n)
+ real x(10)
+ do i=1,n
+ x(i) = i*i + 1
+ enddo
+
+ return
+end subroutine init
+
+! { dg-final { scan-ipa-dump "Creating a specialized node of init" "cp" } }
+! { dg-final { scan-ipa-dump-times "Aggregate replacements" 2 "cp" } }
+! { dg-final { cleanup-ipa-dump "cp" } }
diff --git a/gcc/testsuite/gfortran.dg/pr54131.f b/gcc/testsuite/gfortran.dg/pr54131.f
new file mode 100644
index 0000000000..1550967dfb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr54131.f
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-O2 -funroll-loops" }
+
+ SUBROUTINE EFPGRD(IFCM,NAT,NVIB,NPUN,FCM,
+ * DEN,GRD,ENG,DIP,NVST,NFTODO,LIST)
+ IMPLICIT DOUBLE PRECISION (A-H,O-Z)
+ DIMENSION DEN(*),GRD(*),ENG(*),DIP(*),LIST(*)
+ PARAMETER (MXPT=100, MXFRG=50, MXFGPT=MXPT*MXFRG)
+ COMMON /FGRAD / DEF(3,MXFGPT),DEFT(3,MXFRG),TORQ(3,MXFRG),
+ * ATORQ(3,MXFRG)
+ IF(NVST.EQ.0) THEN
+ CALL PUVIB(IFCM,IW,.FALSE.,NCOORD,IVIB,IATOM,ICOORD,
+ * ENG(IENG),GRD(IGRD),DIP(IDIP))
+ END IF
+ DO 290 IVIB=1,NVIB
+ DO 220 IFRG=1,NFRG
+ DO 215 J=1,3
+ DEFT(J,IFRG)=GRD(INDX+J-1)
+ 215 CONTINUE
+ INDX=INDX+6
+ 220 CONTINUE
+ 290 CONTINUE
+ END
diff --git a/gcc/testsuite/gfortran.dg/pr54889.f90 b/gcc/testsuite/gfortran.dg/pr54889.f90
new file mode 100644
index 0000000000..68c6bee00b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr54889.f90
@@ -0,0 +1,10 @@
+! PR tree-optimization/54889
+! { dg-do compile }
+! { dg-options "-O3" }
+! { dg-additional-options "-mavx" { target { i?86-*-* x86_64-*-* } } }
+
+subroutine foo(x,y,z)
+ logical, pointer :: x(:,:)
+ integer :: y, z
+ x=x(1:y,1:z)
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/pr54967.f90 b/gcc/testsuite/gfortran.dg/pr54967.f90
new file mode 100644
index 0000000000..bc6f2de95a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr54967.f90
@@ -0,0 +1,18 @@
+ SUBROUTINE calc_S_derivs()
+ INTEGER, DIMENSION(6, 2) :: c_map_mat
+ INTEGER, DIMENSION(:), POINTER:: C_mat
+ DO j=1,3
+ DO m=j,3
+ n=n+1
+ c_map_mat(n,1)=j
+ IF(m==j)CYCLE
+ c_map_mat(n,2)=m
+ END DO
+ END DO
+ DO m=1,6
+ DO j=1,2
+ IF(c_map_mat(m,j)==0)CYCLE
+ CALL foo(C_mat(c_map_mat(m,j)))
+ END DO
+ END DO
+ END SUBROUTINE calc_S_derivs
diff --git a/gcc/testsuite/gfortran.dg/pr55330.f90 b/gcc/testsuite/gfortran.dg/pr55330.f90
new file mode 100644
index 0000000000..2e05a27729
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr55330.f90
@@ -0,0 +1,73 @@
+! PR rtl-optimization/55330
+! { dg-do compile }
+! { dg-options "-O -fPIC -fno-dse -fno-guess-branch-probability" }
+
+module global
+ public p, line
+ interface p
+ module procedure p
+ end interface
+ character(128) :: line = 'abcdefghijklmnopqrstuvwxyz'
+contains
+ subroutine p()
+ character(128) :: word
+ word = line
+ call redirect_((/word/))
+ end subroutine
+ subroutine redirect_ (ch)
+ character(*) :: ch(:)
+ if (ch(1) /= line) call abort ()
+ end subroutine redirect_
+end module global
+
+module my_module
+ implicit none
+ type point
+ real :: x
+ end type point
+ type(point), pointer, public :: stdin => NULL()
+contains
+ subroutine my_p(w)
+ character(128) :: w
+ call r(stdin,(/w/))
+ end subroutine my_p
+ subroutine r(ptr, io)
+ use global
+ type(point), pointer :: ptr
+ character(128) :: io(:)
+ if (associated (ptr)) call abort ()
+ if (io(1) .ne. line) call abort ()
+ end subroutine r
+end module my_module
+
+program main
+ use global
+ use my_module
+
+ integer :: i(6) = (/1,6,3,4,5,2/)
+ character (6) :: a = 'hello ', t
+ character(len=1) :: s(6) = (/'g','g','d','d','a','o'/)
+ equivalence (s, t)
+
+ call option_stopwatch_s (a)
+ call p ()
+ call my_p (line)
+
+ s = s(i)
+ call option_stopwatch_a ((/a,'hola! ', t/))
+
+contains
+
+ subroutine option_stopwatch_s(a)
+ character (*), intent(in) :: a
+ character (len=len(a)) :: b
+
+ b = 'hola! '
+ call option_stopwatch_a((/a, b, 'goddag'/))
+ end subroutine option_stopwatch_s
+ subroutine option_stopwatch_a (a)
+ character (*) :: a(:)
+ if (any (a .ne. (/'hello ','hola! ','goddag'/))) call abort ()
+ end subroutine option_stopwatch_a
+
+end program main
diff --git a/gcc/testsuite/gfortran.dg/pr57393-1.f90 b/gcc/testsuite/gfortran.dg/pr57393-1.f90
new file mode 100644
index 0000000000..6b2cb1b3fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr57393-1.f90
@@ -0,0 +1,38 @@
+! PR middle-end/57393
+! { dg-do compile }
+! { dg-options "-g -O2 -ffast-math" }
+
+SUBROUTINE pr57393(nn,e,g,t0,t1,t2,t3,t4,t5,t6,t7,&
+ t8,t9,t10,t11,t12,t13,t14,t15,&
+ t16,t17,t18,t19,t20,t21,t22,t23,&
+ t24,t25,t26,t27,t28,t29,t30,&
+ t31,t32,t33,t34,t35,t36,t37,t38,&
+ t39,t40,t41,t42,t43,t44,t45,t46,t47)
+ IMPLICIT REAL*8 (t)
+ INTEGER, PARAMETER :: dp=8
+ REAL(kind=dp) :: e(nn)
+ DO ii=1,nn
+ t48 = 0.1955555555e2_dp * t1 * t2 + &
+ 0.6000000000e1_dp * t3 * t4 * t5
+ t49 = 0.1620000000e3_dp * t6 * t7 * t8 + &
+ 0.1080000000e3_dp * t6 * t9 * t5 - &
+ 0.6000000000e1_dp * t10 * t20 * t21 * t55 - &
+ 0.2400000000e2_dp * t10 * t11 * t12 - &
+ 0.1200000000e2_dp * t13 * t14 * t15
+ t50 = t49 + t16
+ t51 = (3 * t17 * t18 * t19) + &
+ (t22 * t23 * t19) + (t50 * t19) - &
+ 0.3333333336e0_dp * t24 * t25
+ t52 = 0.1555555556e1_dp * t26 * t27 * t12 + &
+ (t51 + t28 + t29 + t30) * &
+ 0.3125000000e0_dp * t31 * t32 * t33 * t34
+ t53 = -0.1000000001e1_dp * t35 * t36 * t5 - &
+ (t37 + t38 + t39 + t52) - &
+ 0.8333333340e-1_dp * t40 * t41 * t42
+ t54 = -0.1000000001e1_dp * t43 * t44 * t45 - &
+ t47 * (t46 + t53)
+ IF (g >= 3 .OR. g == -3) THEN
+ e(ii) = e(ii) + t54 * t0
+ END IF
+ END DO
+END SUBROUTINE pr57393
diff --git a/gcc/testsuite/gfortran.dg/pr57393-2.f90 b/gcc/testsuite/gfortran.dg/pr57393-2.f90
new file mode 100644
index 0000000000..fafa8f900f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr57393-2.f90
@@ -0,0 +1,10 @@
+! PR middle-end/57393
+! { dg-do compile }
+! { dg-options "-g -O2" }
+
+SUBROUTINE pr57393 ( a1, a2, a3, a4, a5, a6, a7 )
+ COMPLEX(kind=8), DIMENSION(:), INTENT(IN) :: a1
+ INTEGER, DIMENSION(:), INTENT(IN) :: a2, a3, a5, a6
+ COMPLEX(kind=8), DIMENSION(:), INTENT(INOUT) :: a4
+ a4(a6(1)+1:a6(1)+a5(1))=a1(a3(1)+1:a3(1)+a2(1))
+END SUBROUTINE pr57393
diff --git a/gcc/testsuite/gfortran.dg/pr57904.f90 b/gcc/testsuite/gfortran.dg/pr57904.f90
new file mode 100644
index 0000000000..69fa7ed782
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr57904.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+
+program test
+ call test2 ()
+contains
+ subroutine test2 ()
+ type t
+ integer, allocatable :: x
+ end type t
+
+ type t2
+ class(t), allocatable :: a
+ end type t2
+
+ type(t2) :: one, two
+
+ allocate (two%a)
+ one = two
+ end subroutine test2
+end program test
+
diff --git a/gcc/testsuite/gfortran.dg/pr57987.f90 b/gcc/testsuite/gfortran.dg/pr57987.f90
new file mode 100644
index 0000000000..c881e6d64a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr57987.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+! { dg-options "-O3 -fno-ipa-cp -fdump-ipa-inline" }
+
+program test
+ call test2 ()
+contains
+ subroutine test2 ()
+ type t
+ integer, allocatable :: x
+ end type t
+
+ type t2
+ class(t), allocatable :: a
+ end type t2
+
+ type(t2) :: one, two
+
+ allocate (two%a)
+ one = two
+ end subroutine test2
+end program test
+
+! { dg-final { scan-ipa-dump-not "redefined extern inline functions are not considered for inlining" "inline" } }
+! { dg-final { cleanup-ipa-dump "inline" } }
diff --git a/gcc/testsuite/gfortran.dg/pr58290.f90 b/gcc/testsuite/gfortran.dg/pr58290.f90
new file mode 100644
index 0000000000..b19cdde05c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr58290.f90
@@ -0,0 +1,33 @@
+! PR ipa/58290
+! { dg-do compile }
+! { dg-options "-O1 -fipa-pta" }
+
+MODULE pr58290
+ TYPE b
+ CHARACTER(10) :: s = ''
+ END TYPE b
+ TYPE c
+ TYPE(b) :: d
+ END TYPE c
+ TYPE h
+ INTEGER, DIMENSION(:), POINTER :: b
+ END TYPE h
+CONTAINS
+ SUBROUTINE foo(x, y)
+ LOGICAL, INTENT(IN) :: x
+ TYPE(c), INTENT(INOUT) :: y
+ END SUBROUTINE
+ FUNCTION bar (g) RESULT (z)
+ TYPE(h), INTENT(IN) :: g
+ TYPE(c) :: y
+ CALL foo (.TRUE., y)
+ z = SIZE (g%b)
+ END FUNCTION bar
+ SUBROUTINE baz (g)
+ TYPE(h), INTENT(INOUT) :: g
+ INTEGER :: i, j
+ j = bar(g)
+ DO i = 1, j
+ ENDDO
+ END SUBROUTINE baz
+END MODULE
diff --git a/gcc/testsuite/gfortran.dg/pr58484.f b/gcc/testsuite/gfortran.dg/pr58484.f
new file mode 100644
index 0000000000..2fd791347e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr58484.f
@@ -0,0 +1,15 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+ SUBROUTINE UMPSE(AIBJ,NOC,NDIM,NOCA,NVIRA,NOCCA,E2)
+ DIMENSION AIBJ(NOC,NDIM,*)
+ DO 20 MA=1,NVIRA
+ DO 20 MI=1,NOCA
+ DO 10 MB=1,MA
+ MBI = MI+NOCA*(MB-1)
+ DO 10 MJ=1,NOCCA
+ DUM = AIBJ(MJ,MAI,MB)-AIBJ(MJ,MBI,MA)
+ E2A = E2A-DUM
+ 10 CONTINUE
+ 20 CONTINUE
+ E2 = E2+E2A
+ END
diff --git a/gcc/testsuite/gfortran.dg/pr58968.f b/gcc/testsuite/gfortran.dg/pr58968.f
new file mode 100644
index 0000000000..db06d50fa2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr58968.f
@@ -0,0 +1,96 @@
+C PR rtl-optimization/58968.f
+C { dg-do compile { target powerpc*-*-*} }
+C { dg-options "-mcpu=power7 -O3 -w -ffast-math -funroll-loops" }
+ SUBROUTINE MAKTABS(IW,SOME,LBOX1,LBOX2,LBOX3,NSPACE,NA,NB,
+ * LBST,X,
+ * NX,IAMA,IAMI,IBMA,IBMI,MNUM,IDIM,MSTA,IBO,
+ * IDSYM,ISYM1,NSYM,
+ * NACT,LWRK,KTAB,LGMUL,
+ * LCON,LCOA,LCOB,
+ * LANDET,LBNDET,NAST,NBST,LSYMA,LSYMB,LGCOM,
+ * MINI,MAXI,LSPA,LSPB,LDISB,
+ * LSAS,LSBS,LSAC,LSBC,
+ * ITGA,ITGB,IAST,IBST,NCI,NA1EX,NB1EX,FDIRCT)
+ IMPLICIT DOUBLE PRECISION(A-H,O-Z)
+ LOGICAL SOME
+ DIMENSION LBOX1(NSPACE),LBOX2(NSPACE),LBOX3(NSPACE),LBST(NSPACE)
+ DIMENSION X(NX)
+ DIMENSION IAMA(NSPACE),IAMI(NSPACE),IBMA(NSPACE),IBMI(NSPACE)
+ DIMENSION MNUM(NSPACE),IDIM(NSPACE),MSTA(NSPACE+1),IBO(NACT)
+ DIMENSION LWRK(43),KTAB(NSYM),LGMUL(NSYM,NSYM)
+ DIMENSION LCON(NA)
+ DIMENSION LCOA(NSYM,ITGA),LCOB(NSYM,ITGB)
+ DIMENSION LANDET(NSPACE,ITGA),LBNDET(NSPACE,ITGB)
+ DIMENSION NAST(ITGA+1),NBST(ITGB+1)
+ DIMENSION LSYMA(IAST),LSYMB(IBST)
+ DIMENSION LGCOM(ITGB,ITGA)
+ DIMENSION MINI(NSPACE),MAXI(NSPACE)
+ DIMENSION LSPA(IAST),LSPB(IBST)
+ DIMENSION LDISB(NSYM,ITGB,ITGA)
+ DIMENSION LSAS(NSYM+1,ITGA),LSBS(NSYM+1,ITGB)
+ DIMENSION LSAC(IAST),LSBC(IBST)
+ LOGICAL FDIRCT
+ LCOA = 0
+ LCOB = 0
+ ISTA1 = LBST(1)
+ CALL RESETCO(LBOX1,NSPACE,NB,IBMA,IBMI,LBOX2)
+ NAST(1) = 0
+ NBST(1) = 0
+ DO II=1,ITGA
+ ITOT = 1
+ DO JJ=1,NSPACE
+ ITOT = ITOT * LANDET(JJ,II)
+ ENDDO
+ NAST(II+1) = NAST(II) + ITOT
+ ENDDO
+ DO II=1,ITGB
+ ITOT = 1
+ DO JJ=1,NSPACE
+ ITOT = ITOT * LBNDET(JJ,II)
+ ENDDO
+ NBST(II+1) = NBST(II) + ITOT
+ ENDDO
+ ICOMP = 0
+ CALL RESETCO(LBOX1,NSPACE,NA,IAMA,IAMI,LBOX3)
+ NA1EX = 0
+ NB1EX = 0
+ CALL RESETCO(LBOX1,NSPACE,NB,IBMA,IBMI,LBOX3)
+ DO IIB = 1,ITGB
+ CALL RESETDE(LBOX1,NSPACE,NB,MSTA,LCON)
+ DO KKB=NBST(IIB)+1,NBST(IIB+1)
+ DO II=1,NSPACE
+ LBOX2(II) = LBOX1(II)
+ ENDDO
+ IEBS = NB+1
+ DO ISPB1=NSPACE,1,-1
+ IOC1 = LBOX1(ISPB1)
+ IEBE = IEBS - 1
+ IEBS = IEBS - IOC1
+ LBOX2(ISPB1) = LBOX2(ISPB1)-1
+ DO IB1=IEBE,IEBS,-1
+ IO1 = LCON(IB1)
+ IGBE = IEBE - LBOX1(ISPB1)
+ DO ISPB2=ISPB1,NSPACE
+ IGBS = IGBE + 1
+ IGBE = IGBE + LBOX1(ISPB2)
+ LBOX2(ISPB2) = LBOX2(ISPB2) + 1
+ IGBA = MAX(IB1+1,IGBS)
+ DO IGAP=IGBA,IGBE+1
+ DO JJ=ISTA,IEND
+ NB1EX = NB1EX + 1
+ ENDDO
+ ISTA = LCON(IGAP)+1
+ IEND = LCON(IGAP+1)-1
+ IF (IGAP.EQ.IGBE) IEND=MSTA(ISPB2+1)-1
+ ENDDO
+ LBOX2(ISPB2) = LBOX2(ISPB2) - 1
+ ENDDO
+ ENDDO
+ LBOX2(ISPB1) = LBOX2(ISPB1) + 1
+ ENDDO
+ CALL MOVEUP2(LBOX1,NSPACE,NB,MSTA,LCON)
+ ENDDO
+ CALL PUSHCO(LBOX1,NSPACE,NB,IBMA,IBMI,LBOX3,IEND)
+ ENDDO
+ RETURN
+ END
diff --git a/gcc/testsuite/gfortran.dg/pr59440-1.f90 b/gcc/testsuite/gfortran.dg/pr59440-1.f90
new file mode 100644
index 0000000000..d874c6dcec
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr59440-1.f90
@@ -0,0 +1,23 @@
+! PR fortran/59440
+! { dg-do compile }
+! { dg-options "-O2 -g" }
+
+module pr59440
+ implicit none
+ type t
+ integer :: grid = 0
+ end type t
+contains
+ subroutine read_nml (nnml, s)
+ integer, intent(in) :: nnml
+ type(t), intent(out) :: s
+ integer :: grid
+ namelist /N/ grid
+ call read_nml_type_2
+ s%grid = grid
+ contains
+ subroutine read_nml_type_2
+ read (nnml, nml=N)
+ end subroutine read_nml_type_2
+ end subroutine read_nml
+end module pr59440
diff --git a/gcc/testsuite/gfortran.dg/pr59440-2.f90 b/gcc/testsuite/gfortran.dg/pr59440-2.f90
new file mode 100644
index 0000000000..a9f027c47b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr59440-2.f90
@@ -0,0 +1,16 @@
+! PR fortran/59440
+! { dg-do compile }
+! { dg-options "-O2 -g" }
+
+subroutine foo (nnml, outv)
+ integer, intent(in) :: nnml
+ integer, intent(out) :: outv
+ integer :: grid
+ namelist /N/ grid
+ read (nnml, nml=N)
+ call bar
+contains
+ subroutine bar
+ outv = grid
+ end subroutine bar
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/pr59440-3.f90 b/gcc/testsuite/gfortran.dg/pr59440-3.f90
new file mode 100644
index 0000000000..70fe6a5c5c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr59440-3.f90
@@ -0,0 +1,16 @@
+! PR fortran/59440
+! { dg-do compile }
+! { dg-options "-O2 -g" }
+
+subroutine foo (nnml, outv)
+ integer, intent(in) :: nnml
+ integer, intent(out) :: outv
+ integer :: grid
+ call bar
+ outv = grid
+contains
+ subroutine bar
+ namelist /N/ grid
+ read (nnml, nml=N)
+ end subroutine bar
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/pr59700.f90 b/gcc/testsuite/gfortran.dg/pr59700.f90
new file mode 100644
index 0000000000..579d8a48c9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr59700.f90
@@ -0,0 +1,40 @@
+! { dg-do run }
+! PR59700 Test case by Steve Kargl
+program foo
+
+ implicit none
+
+ character(len=80) msg
+ integer, parameter :: fd = 10
+ integer i1, i2, i3, i4
+ real x1, x2, x3, x4
+ complex c1, c2
+ logical a
+
+ open(unit=fd, status='scratch')
+ write(fd, '(A)') '1 2 3.4 q'
+
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=10, iomsg=msg) i1, i2, i3, i4
+10 if (msg /= 'Bad integer for item 3 in list input') call abort
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=20, iomsg=msg) x1, x2, x3, x4
+20 if (msg /= 'Bad real number in item 4 of list input') call abort
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=30, iomsg=msg) i1, x2, x1, a
+30 if (msg /= 'Bad logical value while reading item 4') call abort
+ rewind(fd)
+ read(fd, *, err=31, iomsg=msg) i1, x2, a, x1
+31 if (msg /= 'Bad repeat count in item 3 of list input') call abort
+ close(fd)
+ open(unit=fd, status='scratch')
+ write(fd, '(A)') '(1, 2) (3.4, q)'
+ rewind(fd)
+ msg = 'ok'
+ read(fd, *, err=40, iomsg=msg) c1, c2
+40 if (msg /= 'Bad floating point number for item 2') call abort
+ close(fd)
+end program foo
diff --git a/gcc/testsuite/gfortran.dg/pr59706.f90 b/gcc/testsuite/gfortran.dg/pr59706.f90
new file mode 100644
index 0000000000..64a7de5d96
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pr59706.f90
@@ -0,0 +1,10 @@
+! PR middle-end/59706
+! { dg-do compile }
+
+ integer i
+ do concurrent (i=1:2)
+ end do
+contains
+ subroutine foo
+ end
+end
diff --git a/gcc/testsuite/gfortran.dg/present_1.f90 b/gcc/testsuite/gfortran.dg/present_1.f90
index a3850c44d9..22e6c0a5a2 100644
--- a/gcc/testsuite/gfortran.dg/present_1.f90
+++ b/gcc/testsuite/gfortran.dg/present_1.f90
@@ -17,4 +17,3 @@
END SUBROUTINE S1
END MODULE
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_1.f90 b/gcc/testsuite/gfortran.dg/private_type_1.f90
index 96b2eb4c8b..0f0f8d25c4 100644
--- a/gcc/testsuite/gfortran.dg/private_type_1.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_1.f90
@@ -17,5 +17,3 @@ contains
real :: local_array(4)
end subroutine dummysub
end module modboom
-
-! { dg-final { cleanup-modules "modboom" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_10.f90 b/gcc/testsuite/gfortran.dg/private_type_10.f90
index 561cfb7fd2..b091db4f7f 100644
--- a/gcc/testsuite/gfortran.dg/private_type_10.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_10.f90
@@ -30,5 +30,3 @@ module demo2
type(myint), save :: foo2 ! { dg-error "of PRIVATE derived type" }
public :: foo2
end module demo2
-
-! { dg-final { cleanup-modules "demo" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_11.f90 b/gcc/testsuite/gfortran.dg/private_type_11.f90
index 57c22dd523..53d5f4c705 100644
--- a/gcc/testsuite/gfortran.dg/private_type_11.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_11.f90
@@ -21,4 +21,3 @@ CONTAINS
TYPE(T1) FUNCTION F2()
END FUNCTION F2
END MODULE M1
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_12.f90 b/gcc/testsuite/gfortran.dg/private_type_12.f90
index 5bebcf030b..c9867bcf87 100644
--- a/gcc/testsuite/gfortran.dg/private_type_12.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_12.f90
@@ -21,4 +21,3 @@ CONTAINS
TYPE(T1) FUNCTION F2() ! { dg-error "Fortran 2003: PUBLIC variable 'f2'" }
END FUNCTION F2
END MODULE M1
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_13.f90 b/gcc/testsuite/gfortran.dg/private_type_13.f90
index 77c41a44f1..598e06281b 100644
--- a/gcc/testsuite/gfortran.dg/private_type_13.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_13.f90
@@ -29,4 +29,3 @@ module m
end subroutine
end module
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_14.f90 b/gcc/testsuite/gfortran.dg/private_type_14.f90
index 6c90b86411..ac31721b8a 100644
--- a/gcc/testsuite/gfortran.dg/private_type_14.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_14.f90
@@ -39,5 +39,3 @@ program test_ext
end do
write(*, *) 'OK'
end program
-
-! { dg-final { cleanup-modules "type_ext" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_2.f90 b/gcc/testsuite/gfortran.dg/private_type_2.f90
index f41e151b4c..3850ad1a9c 100644
--- a/gcc/testsuite/gfortran.dg/private_type_2.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_2.f90
@@ -23,5 +23,3 @@ MODULE TEST
public all_type, any_type
END MODULE
END
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_3.f90 b/gcc/testsuite/gfortran.dg/private_type_3.f90
index dea35818ea..89ffa638d0 100644
--- a/gcc/testsuite/gfortran.dg/private_type_3.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_3.f90
@@ -30,5 +30,3 @@ module c
arg_t%c = 42
end subroutine d
end module c
-
-! { dg-final { cleanup-modules "a c" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_4.f90 b/gcc/testsuite/gfortran.dg/private_type_4.f90
index 42303ca53c..95b8fe3041 100644
--- a/gcc/testsuite/gfortran.dg/private_type_4.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_4.f90
@@ -18,5 +18,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_5.f90 b/gcc/testsuite/gfortran.dg/private_type_5.f90
index 0fcf00e53a..a6a417f176 100644
--- a/gcc/testsuite/gfortran.dg/private_type_5.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_5.f90
@@ -22,4 +22,3 @@ contains
end subroutine init
end subroutine sub
end module test
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_6.f90 b/gcc/testsuite/gfortran.dg/private_type_6.f90
index 4af3f704f9..e980cb9690 100644
--- a/gcc/testsuite/gfortran.dg/private_type_6.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_6.f90
@@ -22,4 +22,3 @@ program foo_test
foo2 = bartype(1,2) ! { dg-error "is a PRIVATE component" }
foo2%dummy2 = 5 ! { dg-error "is a PRIVATE component" }
end program foo_test
-! { dg-final { cleanup-modules "foomod" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_7.f90 b/gcc/testsuite/gfortran.dg/private_type_7.f90
index b9ad8fab7e..c44917259c 100644
--- a/gcc/testsuite/gfortran.dg/private_type_7.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_7.f90
@@ -32,4 +32,3 @@ program testit
k = foo(i)
print *, "in the main:", k
end program testit
-! { dg-final { cleanup-modules "gfcbug68" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_8.f90 b/gcc/testsuite/gfortran.dg/private_type_8.f90
index df1609646c..111cbb1bec 100644
--- a/gcc/testsuite/gfortran.dg/private_type_8.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_8.f90
@@ -17,5 +17,3 @@ contains
real :: local_array(4)
end subroutine dummysub
end module modboom
-
-! { dg-final { cleanup-modules "modboom" } }
diff --git a/gcc/testsuite/gfortran.dg/private_type_9.f90 b/gcc/testsuite/gfortran.dg/private_type_9.f90
index 3ca2fd5fb0..078041ae0b 100644
--- a/gcc/testsuite/gfortran.dg/private_type_9.f90
+++ b/gcc/testsuite/gfortran.dg/private_type_9.f90
@@ -39,4 +39,3 @@ module m4
end module m4
end
-! { dg-final { cleanup-modules "m1 m2 m3 m4" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_assign_1.f90 b/gcc/testsuite/gfortran.dg/proc_assign_1.f90
index e85df7635d..d6a8783919 100644
--- a/gcc/testsuite/gfortran.dg/proc_assign_1.f90
+++ b/gcc/testsuite/gfortran.dg/proc_assign_1.f90
@@ -77,4 +77,3 @@ contains
y = 2 ! OK - function result
end function y
end
-! { dg-final { cleanup-modules "simple simpler" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_assign_2.f90 b/gcc/testsuite/gfortran.dg/proc_assign_2.f90
index 8f313c58fa..4c343bf53c 100644
--- a/gcc/testsuite/gfortran.dg/proc_assign_2.f90
+++ b/gcc/testsuite/gfortran.dg/proc_assign_2.f90
@@ -18,4 +18,3 @@ CONTAINS
END FUNCTION
END FUNCTION
END MODULE
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_10.f90 b/gcc/testsuite/gfortran.dg/proc_decl_10.f90
index 88fd6d8a79..ff725c3ec0 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_10.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_10.f90
@@ -28,5 +28,3 @@ procedure(cos) :: my2 ! { dg-error "Cannot change attributes" }
procedure(dprod) :: my3 ! { dg-error "Cannot change attributes" }
end program test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_12.f90 b/gcc/testsuite/gfortran.dg/proc_decl_12.f90
index 092c24d361..37fc4a4e42 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_12.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_12.f90
@@ -23,5 +23,3 @@ contains
call f([1,2,3])
end subroutine foo
end program test
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_13.f90 b/gcc/testsuite/gfortran.dg/proc_decl_13.f90
index b875376a09..1df220b7cf 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_13.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_13.f90
@@ -40,6 +40,4 @@ contains
end interface
call f([1,2,3]) ! Works
end subroutine foo2
-
-! { dg-final { cleanup-modules "m" } }
end program test
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_17.f90 b/gcc/testsuite/gfortran.dg/proc_decl_17.f90
index 858022a43f..0daee46689 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_17.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_17.f90
@@ -64,5 +64,3 @@ my_message = (/'a','b','c','d','e','f'/)
call check(foo,i)
end program
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_18.f90 b/gcc/testsuite/gfortran.dg/proc_decl_18.f90
index 46493eb9e0..c421613510 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_18.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_18.f90
@@ -23,7 +23,7 @@ implicit none
abstract interface
function abs_fun(x,sz)
- integer :: x(:)
+ integer,intent(in) :: x(:)
interface
pure integer function sz(b)
integer,intent(in) :: b(:)
@@ -59,5 +59,3 @@ end
p(l) = y(l)*2
end do
end function
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_2.f90 b/gcc/testsuite/gfortran.dg/proc_decl_2.f90
index 1cbfe97942..97e06148e2 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_2.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_2.f90
@@ -124,12 +124,12 @@ integer function p2(x)
end function
subroutine p3(x)
- real,intent(inout):: x
+ real :: x
x=x+1.0
end subroutine
subroutine p4(x)
- real,intent(inout):: x
+ real :: x
x=x-1.5
end subroutine
@@ -137,7 +137,7 @@ subroutine p5()
end subroutine
subroutine p6(x)
- real,intent(inout):: x
+ real :: x
x=x*2.
end subroutine
@@ -146,5 +146,3 @@ function p7(x)
integer :: x, p7
p7 = x*(-2)
end function
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_20.f90 b/gcc/testsuite/gfortran.dg/proc_decl_20.f90
index 612dac1952..7afac3369f 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_20.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_20.f90
@@ -20,5 +20,3 @@ end module other_fun
use other_fun
procedure(abstract_fun) :: fun
end program fptr
-
-! { dg-final { cleanup-modules "other_fun" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_23.f90 b/gcc/testsuite/gfortran.dg/proc_decl_23.f90
index 66cf5fff73..fa50dc13c8 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_23.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_23.f90
@@ -41,4 +41,3 @@ end module m_string
print *, char1 (["j","k","l"])
end
! { dg-final { cleanup-tree-dump "m_string" } }
-! { dg-final { cleanup-modules "m_string" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_27.f90 b/gcc/testsuite/gfortran.dg/proc_decl_27.f90
index 30ff4def30..cb16ecfa2b 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_27.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_27.f90
@@ -21,5 +21,3 @@ end
implicit none
procedure(Proc) :: Proc_Get
end
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_28.f90 b/gcc/testsuite/gfortran.dg/proc_decl_28.f90
new file mode 100644
index 0000000000..b3a557b149
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_decl_28.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+!
+! PR 53956: [F03] PROCEDURE w/ interface: Bogus "EXTERNAL attribute conflicts with FUNCTION attribute"
+!
+! Contributed by James van Buskirk
+
+ interface
+ subroutine sub (a)
+ integer, external :: a
+ end subroutine
+ end interface
+
+ procedure(sub) :: proc
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_29.f90 b/gcc/testsuite/gfortran.dg/proc_decl_29.f90
new file mode 100644
index 0000000000..6a92118409
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_decl_29.f90
@@ -0,0 +1,30 @@
+! { dg-do compile }
+!
+! PR 42418: PROCEDURE: Rejects interface which is both specific and generic procedure
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+ interface gen
+ procedure gen
+ end interface
+
+ procedure(gen) :: p1
+ procedure(gen2) :: p2 ! { dg-error "may not be generic" }
+ procedure(sf) :: p3 ! { dg-error "may not be a statement function" }
+ procedure(char) :: p4
+
+ interface gen2
+ procedure char
+ end interface
+
+ sf(x) = x**2 ! { dg-warning "Obsolescent feature" }
+
+contains
+
+ subroutine gen
+ end subroutine
+
+ subroutine char
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_5.f90 b/gcc/testsuite/gfortran.dg/proc_decl_5.f90
index b327d5c128..d2cb046378 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_5.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_5.f90
@@ -24,5 +24,3 @@ program test
implicit none
if(x() /= -5) call abort()
end program test
-
-! { dg-final { cleanup-modules "modproc" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_7.f90 b/gcc/testsuite/gfortran.dg/proc_decl_7.f90
index c8c2a81c5c..829add2ff9 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_7.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_7.f90
@@ -18,4 +18,3 @@ implicit none
intrinsic cos
call sub(cos) ! { dg-error "wrong number of arguments" }
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_8.f90 b/gcc/testsuite/gfortran.dg/proc_decl_8.f90
index 2d3514ec89..dce45b4265 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_8.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_8.f90
@@ -22,4 +22,3 @@ EXTERNAL foo ! interface is undefined
procedure(cos) :: foo ! { dg-error "Duplicate EXTERNAL attribute specified" }
call sub(foo) ! { dg-error "is not a function" }
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_decl_9.f90 b/gcc/testsuite/gfortran.dg/proc_decl_9.f90
index 08faee931e..455c27ce98 100644
--- a/gcc/testsuite/gfortran.dg/proc_decl_9.f90
+++ b/gcc/testsuite/gfortran.dg/proc_decl_9.f90
@@ -1,14 +1,14 @@
! { dg-do run }
! PR33162 INTRINSIC functions as ACTUAL argument
! Test case adapted from PR by Jerry DeLisle <jvdelisle@gcc.gnu.org>
-real function t(x)
- real ::x
+elemental real function t(x)
+ real, intent(in) ::x
t = x
end function
program p
implicit none
intrinsic sin
- procedure(sin):: t
+ procedure(sin) :: t
if (t(1.0) /= 1.0) call abort
end program
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_1.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_1.f90
index fe8e201000..b9c0ce6858 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_1.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_1.f90
@@ -69,5 +69,3 @@ program procPtrTest
if (ptr6()/=6.3) call abort()
end program
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_10.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_10.f90
index e673efe4cd..dfe8ce9f0a 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_10.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_10.f90
@@ -27,4 +27,3 @@ program myProg
call proc4( p )
end program myProg
-! { dg-final { cleanup-modules "mymod" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_11.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
index d1c7b4869d..61921e78ad 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_11.f90
@@ -7,16 +7,23 @@
program bsp
implicit none
-
+ intrinsic :: isign, iabs
abstract interface
subroutine up()
end subroutine up
+ ! As intrinsics but not elemental
+ pure integer function isign_interf(a, b)
+ integer, intent(in) :: a, b
+ end function isign_interf
+ pure integer function iabs_interf(x)
+ integer, intent(in) :: x
+ end function iabs_interf
end interface
procedure( up ) , pointer :: pptr
- procedure(isign), pointer :: q
+ procedure(isign_interf), pointer :: q
- procedure(iabs),pointer :: p1
+ procedure(iabs_interf),pointer :: p1
procedure(f), pointer :: p2
pointer :: p3
@@ -40,21 +47,21 @@ program bsp
p2 => p1
p1 => p2
- p1 => abs ! { dg-error "Type/rank mismatch in return value" }
- p2 => abs ! { dg-error "Type/rank mismatch in return value" }
+ p1 => abs ! { dg-error "Type mismatch in function result" }
+ p2 => abs ! { dg-error "Type mismatch in function result" }
p3 => dsin
- p3 => sin ! { dg-error "Type/rank mismatch in return value" }
+ p3 => sin ! { dg-error "Type mismatch in function result" }
contains
- function add( a, b )
+ pure function add( a, b )
integer :: add
integer, intent( in ) :: a, b
add = a + b
end function add
- integer function f(x)
+ pure integer function f(x)
integer,intent(in) :: x
f = 317 + x
end function
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_13.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_13.f90
index 5c66c54e9d..989cd66efe 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_13.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_13.f90
@@ -25,5 +25,3 @@ END MODULE myfortran_binding
use myfortran_binding
error_handler => error_stop
end
-
-! { dg-final { cleanup-modules "myfortran_binding" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_15.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
index f5a748660e..b4f1b2f6ee 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_15.f90
@@ -19,10 +19,10 @@ p4 => p3
p6 => p1
! invalid
-p1 => iabs ! { dg-error "Type/rank mismatch in return value" }
-p1 => p2 ! { dg-error "Type/rank mismatch in return value" }
-p1 => p5 ! { dg-error "Type/rank mismatch in return value" }
-p6 => iabs ! { dg-error "Type/rank mismatch in return value" }
+p1 => iabs ! { dg-error "Type mismatch in function result" }
+p1 => p2 ! { dg-error "Type mismatch in function result" }
+p1 => p5 ! { dg-error "Type mismatch in function result" }
+p6 => iabs ! { dg-error "Type mismatch in function result" }
p4 => p2 ! { dg-error "is not a subroutine" }
contains
@@ -32,4 +32,3 @@ contains
end subroutine
end
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_20.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_20.f90
index 79c9ba8f1e..5aead5b5de 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_20.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_20.f90
@@ -37,6 +37,3 @@ CONTAINS
PRINT*, 'sub'
END SUBROUTINE s
END PROGRAM prog
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_22.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_22.f90
index 1f13280326..69d165e33a 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_22.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_22.f90
@@ -25,6 +25,3 @@ program bugTest
pp2 => returnMat
if (sum(pp2(3,2))/=6) call abort()
end program bugTest
-
-! { dg-final { cleanup-modules "bugtestmod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_26.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_26.f90
index 044f0a403b..8ae027fe87 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_26.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_26.f90
@@ -27,5 +27,3 @@ program main
if (associated(p_fun) .or. associated(p_fun2)) &
call abort ()
end program main
-
-! { dg-final { cleanup-modules "mod_a" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_27.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
index 83f0959811..1d916de431 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_27.f90
@@ -16,5 +16,3 @@ module m
end interface
procedure(i_f), pointer, protected :: p_f => null()
end module m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_28.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_28.f90
index 8754d8e298..ce383cf799 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_28.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_28.f90
@@ -35,5 +35,3 @@ CONTAINS
END SUBROUTINE use_sub
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_29.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_29.f90
index 69f0b03419..7247c06a95 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_29.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_29.f90
@@ -25,5 +25,3 @@ contains
y = p(x)
end function i_g
end module m2
-
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_32.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_32.f90
index 5664ddecd5..9b1ed582bd 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_32.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_32.f90
@@ -5,8 +5,8 @@
! Contributed by James Van Buskirk
implicit none
- procedure(my_dcos), pointer :: f
- f => my_dcos ! { dg-error "invalid in procedure pointer assigment" }
+ procedure(my_dcos), pointer :: f ! { dg-error "Procedure pointer 'f' at .1. shall not be elemental" }
+ f => my_dcos ! { dg-error "Nonintrinsic elemental procedure 'my_dcos' is invalid in procedure pointer assignment" }
contains
real elemental function my_dcos(x)
real, intent(in) :: x
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_33.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_33.f90
index 803d90e05e..30014610a0 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_33.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_33.f90
@@ -22,11 +22,9 @@ end module
program start
use funcs
implicit none
- procedure(fun), pointer :: f
+ procedure(fun), pointer :: f ! { dg-error "Procedure pointer 'f' at .1. shall not be elemental" }
real x(3)
x = [1,2,3]
f => my_dcos ! { dg-error "Mismatch in PURE attribute" }
write(*,*) f(x)
end program start
-
-! { dg-final { cleanup-modules "funcs" } } \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_34.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_34.f90
index 6226414b81..fc5df1f298 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_34.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_34.f90
@@ -75,5 +75,3 @@ program test_proc_ptr
stop
end program test_proc_ptr
-
-! { dg-final { cleanup-modules "examplefuncs" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_35.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_35.f90
new file mode 100644
index 0000000000..b6ca3a67b4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_35.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR fortran/52542
+!
+! Ensure that the procedure myproc is Bind(C).
+!
+! Contributed by Mat Cross of NAG
+!
+interface
+ subroutine s() bind(c)
+ end subroutine s
+end interface
+procedure(s) :: myproc
+call myproc()
+end
+! { dg-final { scan-assembler-not "myproc_" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_36.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_36.f90
new file mode 100644
index 0000000000..7f3525eed2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_36.f90
@@ -0,0 +1,46 @@
+! { dg-do run }
+!
+! PR fortran/52585
+!
+! Test proc-pointer dummies with ASSOCIATE
+!
+! Contributed by Mat Cross of NAG
+!
+module m0
+ abstract interface
+ subroutine sub
+ end subroutine sub
+ end interface
+ interface
+ subroutine s(ss, isassoc)
+ import sub
+ logical :: isassoc
+ procedure(sub), pointer, intent(in) :: ss
+ end subroutine s
+ end interface
+end module m0
+
+use m0, only : sub, s
+procedure(sub) :: sub2, pp
+pointer :: pp
+pp => sub2
+if (.not. associated(pp)) call abort ()
+if (.not. associated(pp,sub2)) call abort ()
+call s(pp, .true.)
+pp => null()
+if (associated(pp)) call abort ()
+if (associated(pp,sub2)) call abort ()
+call s(pp, .false.)
+end
+
+subroutine s(ss, isassoc)
+ use m0, only : sub
+ logical :: isassoc
+ procedure(sub), pointer, intent(in) :: ss
+ procedure(sub) :: sub2
+ if (isassoc .neqv. associated(ss)) call abort ()
+ if (isassoc .neqv. associated(ss,sub2)) call abort ()
+end subroutine s
+
+subroutine sub2
+end subroutine sub2
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_37.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_37.f90
new file mode 100644
index 0000000000..485e76f664
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_37.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+!
+! PR 51081: [F03] Proc-pointer assignment: Rejects valid internal proc
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+procedure(), pointer :: p1
+procedure(real), pointer :: p2
+p1 => int2
+p2 => scale ! { dg-error "is invalid in procedure pointer assignment" }
+contains
+ subroutine int2()
+ print *,"..."
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_38.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_38.f90
new file mode 100644
index 0000000000..9387b6b8fe
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_38.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+!
+! PR 54387: [F03] Wrongly accepts non-proc result variable on the RHS of a proc-pointer assignment
+!
+! Contributed by James Van Buskirk
+
+integer function foo()
+ procedure(), pointer :: i
+ i => foo ! { dg-error "is invalid as proc-target in procedure pointer assignment" }
+end
+
+recursive function bar() result (res)
+ integer :: res
+ procedure(), pointer :: j
+ j => bar
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_39.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_39.f90
new file mode 100644
index 0000000000..6eb0f15d40
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_39.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR 52909: [F03] Procedure pointers not private to modules
+!
+! Contributed by Andrew Benson <abenson@caltech.edu>
+
+module Module1
+ procedure(), pointer, private :: procPtr => null()
+end module
+
+module Module2
+ procedure(), pointer, private :: procPtr => null()
+end module
+
+program Test
+ use Module1
+ use Module2
+end program
+
+! { dg-final { cleanup-modules "Module1 Module2" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_40.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_40.f90
new file mode 100644
index 0000000000..dae91df1c3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_40.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR 56261: [OOP] seg fault call procedure pointer on polymorphic array
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+ implicit none
+ type :: nc
+ end type
+ external :: qq
+ procedure( ), pointer :: f1
+ procedure(ff), pointer :: f2
+
+ f1 => ff ! { dg-error "Explicit interface required" }
+ f2 => qq ! { dg-error "Explicit interface required" }
+
+contains
+
+ subroutine ff (self)
+ class(nc) :: self
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_41.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_41.f90
new file mode 100644
index 0000000000..7f50abab21
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_41.f90
@@ -0,0 +1,37 @@
+! { dg-do compile }
+!
+! PR 56968: [4.7/4.8/4.9 Regression] [F03] Issue with a procedure defined with a generic name returning procedure pointer
+!
+! Contributed by Samuel Debionne <samuel.debionne@ujf-grenoble.fr>
+
+module test
+
+ interface generic_name_get_proc_ptr
+ module procedure specific_name_get_proc_ptr
+ end interface
+
+ abstract interface
+ double precision function foo(arg1)
+ real, intent(in) :: arg1
+ end function
+ end interface
+
+contains
+
+ function specific_name_get_proc_ptr() result(res)
+ procedure(foo), pointer :: res
+ end function
+
+end module test
+
+program crash_test
+ use :: test
+
+ procedure(foo), pointer :: ptr
+
+ ptr => specific_name_get_proc_ptr()
+ ptr => generic_name_get_proc_ptr()
+
+end program
+
+! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_42.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_42.f90
new file mode 100644
index 0000000000..8556fdf0c2
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_42.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! PR 56814: [4.8/4.9 Regression] Bogus Interface mismatch in dummy procedure
+!
+! Contributed by Marco Restelli <mrestelli@gmail.com>
+
+module m1
+ abstract interface
+ pure function i_f(x) result(d)
+ real, intent(in) :: x(:,:)
+ real :: d(size(x,1),size(x,2))
+ end function
+ end interface
+
+ procedure(i_f), pointer :: f => null()
+end module
+
+module m2
+contains
+ pure subroutine ns_dirdata(fun)
+ interface
+ pure function fun(x) result(d)
+ real, intent(in) :: x(:,:)
+ real :: d(size(x,1),size(x,2))
+ end function
+ end interface
+ end subroutine
+end module
+
+program p
+ use m1
+ use m2
+ call ns_dirdata(f)
+end
+
+! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_43.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_43.f90
new file mode 100644
index 0000000000..b1f77a06ec
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_43.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+!
+! PR 58099: [4.8/4.9 Regression] [F03] over-zealous procedure-pointer error checking
+!
+! Contributed by Daniel Price <daniel.price@monash.edu>
+
+ implicit none
+ procedure(real), pointer :: wfunc
+
+ wfunc => w_cubic
+
+contains
+
+ pure real function w_cubic(q2)
+ real, intent(in) :: q2
+ w_cubic = 0.
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_44.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_44.f90
new file mode 100644
index 0000000000..3ed65a88b5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_44.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR 54949: [F03] abstract procedure pointers not rejected
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+ implicit none
+
+ abstract interface
+ subroutine abssub1
+ end subroutine
+ end interface
+ pointer :: abssub1 ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" }
+
+ pointer :: abssub2
+ abstract interface
+ subroutine abssub2 ! { dg-error "PROCEDURE POINTER attribute conflicts with ABSTRACT attribute" }
+ end subroutine
+ end interface
+
+ abssub1 => sub ! { dg-error "is not a variable" }
+ abssub2 => sub
+
+contains
+
+ subroutine sub
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_45.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_45.f90
new file mode 100644
index 0000000000..a506473ad9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_45.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/49397
+!
+! Valid per IR F08/0060 and F2008Corr2, C729
+!
+Program m5
+ Print *,f()
+Contains
+ Subroutine s
+ Procedure(Real),Pointer :: p
+ Print *,g()
+ p => f ! (1)
+ Print *,p()
+ p => g ! (2)
+ Print *,p()
+ End Subroutine
+End Program
+Function f()
+ f = 1
+End Function
+Function g()
+ g = 2
+End Function
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_46.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_46.f90
new file mode 100644
index 0000000000..2c05f59d8a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_46.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/49397
+!
+! Invalid per IR F08/0060 and F2008Corr2, C729
+!
+
+! Print *,f() ! << Valid when uncommented
+Contains
+ Subroutine s
+ Procedure(Real),Pointer :: p
+ p => f ! { dg-error "Procedure pointer target 'f' at .1. must be either an intrinsic, host or use associated, referenced or have the EXTERNAL attribute" }
+ End Subroutine
+End
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_8.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_8.f90
index 55ba58daa6..4785383e96 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_8.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_8.f90
@@ -41,5 +41,3 @@ contains
end subroutine
END
-
-! { dg-final { cleanup-modules "x" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90
index 382f412553..715d4368a7 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_10.f90
@@ -26,6 +26,3 @@ type(t) :: obj
obj%ppc => pp
pp => obj%ppc
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_12.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_12.f90
index 41668b817a..8c658d8838 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_12.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_12.f90
@@ -30,6 +30,3 @@ program bugTest
print *,testObj%test(3,3)
if (sum(testObj%test(3,3))/=9) call abort()
end program bugTest
-
-! { dg-final { cleanup-modules "bugtestmod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f90
index 9f15d14dbe..37f3a7ae48 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_15.f90
@@ -23,6 +23,3 @@ use m
str = x%ptr()
if (str/='abcde') call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f90
index e6b77a22f0..ff5634b4e8 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_16.f90
@@ -25,6 +25,3 @@ use m
str = x%ptr(3)
if (str/='abc') call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f90
index cfe498b0ec..6a9f32fdeb 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_17.f90
@@ -27,6 +27,3 @@ use m
str = 'fghij'
if (strptr/='fghij') call abort()
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
index 3cad7dfa66..29a2ef9f0d 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_20.f90
@@ -27,11 +27,11 @@ type(t2) :: o2
procedure(logical),pointer :: pp1
procedure(complex),pointer :: pp2
-pp1 => pp2 ! { dg-error "Type/rank mismatch" }
-pp2 => o2%ppc ! { dg-error "Type/rank mismatch" }
+pp1 => pp2 ! { dg-error "Type mismatch in function result" }
+pp2 => o2%ppc ! { dg-error "Type mismatch in function result" }
-o1%ppc => pp1 ! { dg-error "Type/rank mismatch" }
-o1%ppc => o2%ppc ! { dg-error "Type/rank mismatch" }
+o1%ppc => pp1 ! { dg-error "Type mismatch in function result" }
+o1%ppc => o2%ppc ! { dg-error "Type mismatch in function result" }
contains
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f90
index b82564ff4c..ac3982e588 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_22.f90
@@ -28,4 +28,3 @@ PROGRAM main
arr%myproc => myproc ! { dg-error "must not have the POINTER attribute" }
END PROGRAM main
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_23.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_23.f90
index 8b1c6912d2..d91851e824 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_23.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_23.f90
@@ -70,4 +70,3 @@ print *, p(nr=3,x=(/0.1,0.1/))
print *, funcp%p(nr=3,x=(/0.1,0.1/))
end program t
-! { dg-final { cleanup-modules "poisson_functions_m element_defs_m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90
index 67d5b53606..eb1d84555d 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_3.f90
@@ -24,10 +24,13 @@ type :: t
procedure, pointer, nopass :: ptr6 ! { dg-error "Syntax error" }
procedure(), nopass :: ptr8 ! { dg-error "POINTER attribute is required" }
procedure(pp), pointer, nopass :: ptr9 ! { dg-error "declared in a later PROCEDURE statement" }
- procedure(aaargh), pointer, nopass :: ptr10 ! { dg-error "must be explicit" }
real :: y
end type t
+type :: t2
+ procedure(aaargh), pointer, nopass :: ptr10 ! { dg-error "must be explicit" }
+end type
+
type,bind(c) :: bct ! { dg-error "BIND.C. derived type" }
procedure(), pointer,nopass :: ptr ! { dg-error "cannot be a member of|may not be C interoperable" }
end type bct
@@ -47,4 +50,3 @@ print *,x%ptr3() ! { dg-error "attribute conflicts with" }
call x%y ! { dg-error "Expected type-bound procedure or procedure pointer component" }
end
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_31.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_31.f90
index 6a5d8c967e..e0e528be28 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_31.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_31.f90
@@ -18,5 +18,3 @@ program test_objects
type(rectangle) :: rect
write(*,*) rect ! { dg-error "cannot have procedure pointer components" }
end program
-
-! { dg-final { cleanup-modules "proc_pointers" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_32.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_32.f90
index eda972a454..c1d01c5271 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_32.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_32.f90
@@ -33,5 +33,3 @@ use m
type(rectangle) :: rect
rect%get_special_area => get_my_area ! { dg-error "Interface mismatch in procedure pointer assignment" }
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_33.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_33.f90
index 1bb863d3a9..55a768017f 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_33.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_33.f90
@@ -11,7 +11,7 @@ module m
type :: rectangle
real :: width, height
- procedure(get_area_ai), pointer :: get_area => get_my_area ! { dg-error "Type/rank mismatch" }
+ procedure(get_area_ai), pointer :: get_area => get_my_area ! { dg-error "Type mismatch in argument" }
end type rectangle
abstract interface
@@ -51,7 +51,7 @@ program p
type(rectangle) :: rect
rect = rectangle (1.0, 2.0, get1)
- rect = rectangle (3.0, 4.0, get2) ! { dg-error "Type/rank mismatch" }
+ rect = rectangle (3.0, 4.0, get2) ! { dg-error "Type mismatch in argument" }
contains
@@ -66,6 +66,3 @@ contains
end function get2
end
-
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_34.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_34.f90
new file mode 100644
index 0000000000..031f74418c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_34.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+!
+! PR 51082: [F03] Wrong result for a pointer to a proc-pointer component
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+program ala
+ implicit none
+
+ type process_list
+ procedure(ala1), pointer, nopass :: process
+ end type
+
+ type(process_list), target :: p_list
+ type(process_list), pointer :: p
+
+ p_list%process => ala1
+ p => p_list
+
+ write(*,*) p_list%process(1.0)
+ write(*,*) p%process(1.0) !!!! failed
+
+contains
+
+ real function ala1(x)
+ real, intent(in) :: x
+ ala1 = x
+ end function
+
+end program
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f90
new file mode 100644
index 0000000000..75a76b8ebb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_35.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+!
+! PR 54147: [F03] Interface checks for PPCs & deferred TBPs
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+ interface gen
+ procedure gen
+ end interface
+
+ type t1
+ procedure(gen),pointer,nopass :: p1
+ procedure(gen2),pointer,nopass :: p2 ! { dg-error "may not be generic" }
+ end type
+
+ type t2
+ procedure(sf),pointer,nopass :: p3 ! { dg-error "may not be a statement function" }
+ end type
+
+ type t3
+ procedure(char),pointer,nopass :: p4 ! { dg-error "Intrinsic procedure" }
+ end type
+
+ interface gen2
+ procedure gen
+ end interface
+
+ sf(x) = x**2 ! { dg-warning "Obsolescent feature" }
+
+contains
+
+ subroutine gen
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_36.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_36.f90
new file mode 100644
index 0000000000..63140bb454
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_36.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+!
+! PR 54107: [4.8 Regression] Memory hog with abstract interface
+!
+! Contributed by Arjen Markus <arjen.markus895@gmail.com>
+
+ implicit none
+ type computation_method
+ character(len=40) :: name
+ procedure(compute_routine), pointer, nopass :: compute
+ end type
+ abstract interface
+ subroutine compute_routine( param_value, zfunc, probability )
+ real, dimension(:), intent(in) :: param_value
+ procedure(compute_routine) :: zfunc
+ real, intent(in) :: probability
+ end subroutine
+ end interface
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_38.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_38.f90
new file mode 100644
index 0000000000..2a71ca052c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_38.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+!
+! PR fortran/58803
+!
+! Contributed by Vittorio Zecca
+!
+! Was before ICEing due to a double free
+!
+ type t
+ procedure(real), pointer, nopass :: f1, f2
+ end type
+ end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f90
index b904a2f86a..be36fda410 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_4.f90
@@ -115,6 +115,3 @@ contains
end function var_list_get_var_ptr
end
-
-! { dg-final { cleanup-modules "expressions process_libraries hard_interactions" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f90
index f0dcf4ccf0..12aaf7951b 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_6.f90
@@ -59,6 +59,3 @@ program main
if (calls/=2) call abort
end program main
-
-! { dg-final { cleanup-modules "proc_component_example" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_7.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_7.f90
index 860c2dd9b8..48fd5219e4 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_7.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_7.f90
@@ -35,6 +35,3 @@ type(public_t) :: x
integer :: j
j = x%ppc()
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_1.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_1.f90
index 4513083ac5..0798a7b16f 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_1.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_1.f90
@@ -43,6 +43,3 @@ program Test_03
if (m%i/=6) call abort()
end program Test_03
-
-! { dg-final { cleanup-modules "mymod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_2.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_2.f90
index 03770ce3ff..dc5253dd6d 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_2.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_2.f90
@@ -43,6 +43,3 @@ program main
call x%proc (output_unit)
end program main
-
-! { dg-final { cleanup-modules "passed_object_example" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
index 0a28b5340b..b0e7a77272 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_4.f90
@@ -70,6 +70,3 @@ contains
end function
end module m
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_5.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_5.f90
index 216a554f11..70a99f9211 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_5.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_5.f90
@@ -34,6 +34,3 @@ call t1%foo()
call t2%foo()
call t2%foo(t1)
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_6.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_6.f90
index 4382a3bc2b..b9ce92daec 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_6.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_6.f90
@@ -31,5 +31,3 @@ PROGRAM ProgA
CALL arr(i)%Proc(ierr)
END DO
END PROGRAM ProgA
-
-! { dg-final { cleanup-modules "moda" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_7.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_7.f90
index a15018db34..9c960dda21 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_7.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_comp_pass_7.f90
@@ -61,5 +61,3 @@ program main
call obj%base_t%write_procptr ! { dg-error "is of ABSTRACT type" }
end program main
-
-! { dg-final { cleanup-modules "types" } }
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90
index df830d3b1f..4a8020e35b 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_1.f90
@@ -171,13 +171,16 @@ contains
end function
function l()
- procedure(iabs),pointer :: l
+ ! we cannot use iabs directly as it is elemental
+ abstract interface
+ pure function interf_iabs(x)
+ integer, intent(in) :: x
+ end function interf_iabs
+ end interface
+ procedure(interf_iabs),pointer :: l
integer :: i
l => iabs
if (l(-11)/=11) call abort()
end function
end
-
-! { dg-final { cleanup-modules "mo" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_2.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_2.f90
index 362a1f7f84..f5a4fd221e 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_2.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_2.f90
@@ -57,6 +57,3 @@ contains
end function
end
-
-! { dg-final { cleanup-modules "proc_ptr_15" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_3.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_3.f90
index a84ff2420b..6e2e5244e9 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_3.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_3.f90
@@ -51,6 +51,3 @@ recursive subroutine my_sub(j)
j = j*3
call set_sub(my_sub)
end subroutine my_sub
-
-! { dg-final { cleanup-modules "store_subroutine" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
index 97e67e558e..5dd67bfe2b 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_4.f90
@@ -8,7 +8,13 @@ contains
function f()
intrinsic :: sin
- procedure(sin), pointer :: f
+ abstract interface
+ pure real function sin_interf(x)
+ real, intent(in) :: x
+ end function sin_interf
+ end interface
+ ! We cannot use "sin" directly as it is ELEMENTAL
+ procedure(sin_interf), pointer :: f
f => sin
end function f
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
index de03523367..121fd4d87f 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_5.f90
@@ -6,7 +6,7 @@
program test
procedure(real), pointer :: p
- p => f() ! { dg-error "Type/rank mismatch in return value" }
+ p => f() ! { dg-error "Type mismatch in function result" }
contains
function f()
pointer :: f
@@ -17,4 +17,3 @@ contains
f = .true._1
end function f
end program test
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_6.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_6.f90
index c9e1a8b067..9d625afb7a 100644
--- a/gcc/testsuite/gfortran.dg/proc_ptr_result_6.f90
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_6.f90
@@ -46,6 +46,3 @@ contains
getPtr2 => func
end function
end program test
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_7.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_7.f90
new file mode 100644
index 0000000000..b77e40b7b6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_7.f90
@@ -0,0 +1,34 @@
+! { dg-do run }
+!
+! PR 54285: [F03] Calling a PPC with proc-ptr result
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+type :: t
+ procedure(a), pointer, nopass :: p
+end type
+
+type(t) :: x
+
+! We cannot use "iabs" directly as it is elemental.
+abstract interface
+ pure integer function interf_iabs(x)
+ integer, intent(in) :: x
+ end function interf_iabs
+end interface
+procedure(interf_iabs), pointer :: pp
+
+x%p => a
+
+pp => x%p()
+
+if (pp(-3) /= 3) call abort
+
+contains
+
+ function a() result (b)
+ procedure(interf_iabs), pointer :: b
+ b => iabs
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/proc_ptr_result_8.f90 b/gcc/testsuite/gfortran.dg/proc_ptr_result_8.f90
new file mode 100644
index 0000000000..be23f5196c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/proc_ptr_result_8.f90
@@ -0,0 +1,69 @@
+! { dg-do compile }
+! Test fix for PR54286.
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+! Module 'm' added later because original fix missed possibility of
+! null interfaces - thanks to Dominique Dhumieres <dominiq@lps.ens.fr>
+!
+module m
+ type :: foobar
+ real, pointer :: array(:)
+ procedure (), pointer, nopass :: f
+ end type
+contains
+ elemental subroutine fooAssgn (a1, a2)
+ type(foobar), intent(out) :: a1
+ type(foobar), intent(in) :: a2
+ allocate (a1%array(size(a2%array)))
+ a1%array = a2%array
+ a1%f => a2%f
+ end subroutine
+end module m
+
+implicit integer (a)
+type :: t
+ procedure(a), pointer, nopass :: p
+end type
+type(t) :: x
+
+! We cannot use iabs directly as it is elemental
+abstract interface
+ integer pure function interf_iabs(x)
+ integer, intent(in) :: x
+ end function interf_iabs
+end interface
+
+procedure(interf_iabs), pointer :: pp
+procedure(foo), pointer :: pp1
+
+x%p => a ! ok
+if (x%p(0) .ne. loc(foo)) call abort
+if (x%p(1) .ne. loc(iabs)) call abort
+
+x%p => a(1) ! { dg-error "PROCEDURE POINTER mismatch in function result" }
+
+pp => a(1) ! ok
+if (pp(-99) .ne. iabs(-99)) call abort
+
+pp1 => a(2) ! ok
+if (pp1(-99) .ne. -iabs(-99)) call abort
+
+pp => a ! { dg-error "PROCEDURE POINTER mismatch in function result" }
+
+contains
+
+ function a (c) result (b)
+ integer, intent(in) :: c
+ procedure(interf_iabs), pointer :: b
+ if (c .eq. 1) then
+ b => iabs
+ else
+ b => foo
+ end if
+ end function
+
+ pure integer function foo (arg)
+ integer, intent (in) :: arg
+ foo = -iabs(arg)
+ end function
+end
diff --git a/gcc/testsuite/gfortran.dg/procedure_lvalue.f90 b/gcc/testsuite/gfortran.dg/procedure_lvalue.f90
index 741dc8c34a..915f75e810 100644
--- a/gcc/testsuite/gfortran.dg/procedure_lvalue.f90
+++ b/gcc/testsuite/gfortran.dg/procedure_lvalue.f90
@@ -17,5 +17,3 @@ subroutine r
b = 1. ! { dg-error "is not a variable" }
y = a(1.)
end subroutine r
-
-! { dg-final { cleanup-modules "t" } }
diff --git a/gcc/testsuite/gfortran.dg/promotion_2.f90 b/gcc/testsuite/gfortran.dg/promotion_2.f90
new file mode 100644
index 0000000000..3acf249705
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/promotion_2.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-fdefault-real-8 -fexternal-blas -fdump-tree-original" }
+!
+! PR fortran/54463
+!
+! Contributed by Simon Reinhardt
+!
+program test
+ implicit none
+ real, dimension(3,3) :: A
+ A = matmul(A,A)
+end program test
+
+! { dg-final { scan-tree-dump-times "sgemm_" 0 "original" } }
+! { dg-final { scan-tree-dump-times "dgemm_" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_1.f90 b/gcc/testsuite/gfortran.dg/protected_1.f90
index fbc30e8c6d..0805e98664 100644
--- a/gcc/testsuite/gfortran.dg/protected_1.f90
+++ b/gcc/testsuite/gfortran.dg/protected_1.f90
@@ -57,5 +57,3 @@ contains
if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
end subroutine
end program main
-
-! { dg-final { cleanup-modules "protmod" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_2.f90 b/gcc/testsuite/gfortran.dg/protected_2.f90
index dcdce51c86..c00222d08b 100644
--- a/gcc/testsuite/gfortran.dg/protected_2.f90
+++ b/gcc/testsuite/gfortran.dg/protected_2.f90
@@ -51,5 +51,3 @@ contains
if(a /= 44 .or. ap /= 79 .or. at /= 4) call abort()
end subroutine
end program main
-
-! { dg-final { cleanup-modules "protmod" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_4.f90 b/gcc/testsuite/gfortran.dg/protected_4.f90
index 7f0e49f09a..2834680a98 100644
--- a/gcc/testsuite/gfortran.dg/protected_4.f90
+++ b/gcc/testsuite/gfortran.dg/protected_4.f90
@@ -54,5 +54,3 @@ module test
real :: a
protected :: test ! { dg-error "MODULE attribute conflicts with PROTECTED" }
end module test
-
-! { dg-final { cleanup-modules "protmod test" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_5.f90 b/gcc/testsuite/gfortran.dg/protected_5.f90
index 85046c3cb9..4901b82143 100644
--- a/gcc/testsuite/gfortran.dg/protected_5.f90
+++ b/gcc/testsuite/gfortran.dg/protected_5.f90
@@ -53,5 +53,3 @@ program main
nullify(t%p) ! { dg-error "pointer association context" }
allocate(t%array(15))! { dg-error "variable definition context" }
end program main
-
-! { dg-final { cleanup-modules "good1 good2 bad1 bad2" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_6.f90 b/gcc/testsuite/gfortran.dg/protected_6.f90
index e7f3e4e933..8e85bbfe06 100644
--- a/gcc/testsuite/gfortran.dg/protected_6.f90
+++ b/gcc/testsuite/gfortran.dg/protected_6.f90
@@ -47,5 +47,3 @@ contains
real, protected :: b ! { dg-error "only allowed in specification part of a module" }
end subroutine bar
end module prot2
-
-! { dg-final { cleanup-modules "protmod" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_7.f90 b/gcc/testsuite/gfortran.dg/protected_7.f90
index abdc9592aa..0f84da5488 100644
--- a/gcc/testsuite/gfortran.dg/protected_7.f90
+++ b/gcc/testsuite/gfortran.dg/protected_7.f90
@@ -18,5 +18,3 @@ program p
unprotected_pointer => protected_target ! { dg-error "target has PROTECTED attribute" }
unprotected_pointer => protected_pointer ! OK
end program p
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/protected_8.f90 b/gcc/testsuite/gfortran.dg/protected_8.f90
index aaa34a68f9..7e02044720 100644
--- a/gcc/testsuite/gfortran.dg/protected_8.f90
+++ b/gcc/testsuite/gfortran.dg/protected_8.f90
@@ -46,5 +46,3 @@ PROGRAM test
b%j = 5 ! OK 5
END PROGRAM test
-
-! { dg-final { cleanup-modules "amod" } }
diff --git a/gcc/testsuite/gfortran.dg/public_private_module.f90 b/gcc/testsuite/gfortran.dg/public_private_module.f90
index 48e78b60cf..709c01e8d8 100644
--- a/gcc/testsuite/gfortran.dg/public_private_module.f90
+++ b/gcc/testsuite/gfortran.dg/public_private_module.f90
@@ -16,4 +16,3 @@ module d
implicit none
private a ! { dg-error "attribute applied to" }
end module d
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_2.f90 b/gcc/testsuite/gfortran.dg/public_private_module_2.f90
new file mode 100644
index 0000000000..aa6b9fc726
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_2.f90
@@ -0,0 +1,70 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+!
+! PR fortran/52751 (top, "module mod")
+! PR fortran/40973 (bottom, "module m"
+!
+! Ensure that (only) those module variables and procedures which are PRIVATE
+! and have no C-binding label are optimized away.
+!
+ module mod
+ integer :: aa
+ integer, private :: iii
+ integer, private, bind(C) :: jj ! { dg-warning "PRIVATE but has been given the binding label" }
+ integer, private, bind(C,name='lll') :: kk ! { dg-warning "PRIVATE but has been given the binding label" }
+ integer, private, bind(C,name='') :: mmmm
+ integer, bind(C) :: nnn
+ integer, bind(C,name='oo') :: pp
+ integer, bind(C,name='') :: qq
+ end module mod
+
+ ! { dg-final { scan-assembler "__mod_MOD_aa" } }
+ ! { dg-final { scan-assembler-not "iii" } }
+ ! { dg-final { scan-assembler "jj" } }
+ ! { dg-final { scan-assembler "lll" } }
+ ! { dg-final { scan-assembler-not "kk" } }
+ ! { dg-final { scan-assembler-not "mmmm" } }
+ ! { dg-final { scan-assembler "nnn" } }
+ ! { dg-final { scan-assembler "oo" } }
+ ! { dg-final { scan-assembler "__mod_MOD_qq" } }
+
+MODULE M
+ PRIVATE :: two, three, four, six
+ PUBLIC :: one, seven, eight, ten
+CONTAINS
+ SUBROUTINE one(a)
+ integer :: a
+ a = two()
+ END SUBROUTINE one
+ integer FUNCTION two()
+ two = 42
+ END FUNCTION two
+ integer FUNCTION three() bind(C) ! { dg-warning "PRIVATE but has been given the binding label" }
+ three = 43
+ END FUNCTION three
+ integer FUNCTION four() bind(C, name='five') ! { dg-warning "PRIVATE but has been given the binding label" }
+ four = 44
+ END FUNCTION four
+ integer FUNCTION six() bind(C, name='')
+ six = 46
+ END FUNCTION six
+ integer FUNCTION seven() bind(C)
+ seven = 46
+ END FUNCTION seven
+ integer FUNCTION eight() bind(C, name='nine')
+ eight = 48
+ END FUNCTION eight
+ integer FUNCTION ten() bind(C, name='')
+ ten = 48
+ END FUNCTION ten
+END MODULE
+
+! { dg-final { scan-assembler "__m_MOD_one" } }
+! { dg-final { scan-assembler-not "two" } }
+! { dg-final { scan-assembler "three" } }
+! { dg-final { scan-assembler-not "four" } }
+! { dg-final { scan-assembler "five" } }
+! { dg-final { scan-assembler-not "six" } }
+! { dg-final { scan-assembler "seven" } }
+! { dg-final { scan-assembler "nine" } }
+! { dg-final { scan-assembler "__m_MOD_ten" } }
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_3.f90 b/gcc/testsuite/gfortran.dg/public_private_module_3.f90
new file mode 100644
index 0000000000..03f00c200e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_3.f90
@@ -0,0 +1,59 @@
+! { dg-do link }
+! { dg-additional-sources public_private_module_4.f90 }
+!
+! PR fortran/52916
+! Cf. PR fortran/40973
+!
+! Ensure that PRIVATE specific functions do not get
+! marked as TREE_PUBLIC() = 0, if the generic name is
+! PUBLIC.
+!
+module m
+ interface gen
+ module procedure bar
+ end interface gen
+
+ type t
+ end type t
+
+ interface operator(.myop.)
+ module procedure my_op
+ end interface
+
+ interface operator(+)
+ module procedure my_plus
+ end interface
+
+ interface assignment(=)
+ module procedure my_assign
+ end interface
+
+ private :: bar, my_op, my_plus, my_assign
+contains
+ subroutine bar()
+ print *, "bar"
+ end subroutine bar
+ function my_op(op1, op2) result(res)
+ type(t) :: res
+ type(t), intent(in) :: op1, op2
+ end function my_op
+ function my_plus(op1, op2) result(res)
+ type(t) :: res
+ type(t), intent(in) :: op1, op2
+ end function my_plus
+ subroutine my_assign(lhs, rhs)
+ type(t), intent(out) :: lhs
+ type(t), intent(in) :: rhs
+ end subroutine my_assign
+end module m
+
+module m2
+ type t2
+ contains
+ procedure, nopass :: func => foo
+ end type t2
+ private :: foo
+contains
+ subroutine foo()
+ end subroutine foo
+end module m2
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_4.f90 b/gcc/testsuite/gfortran.dg/public_private_module_4.f90
new file mode 100644
index 0000000000..82600e46b0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_4.f90
@@ -0,0 +1,23 @@
+! { dg-do compile { target skip-all-targets } }
+!
+! To be used by public_private_module_3.f90
+!
+! PR fortran/52916
+! Cf. PR fortran/40973
+!
+! Ensure that PRIVATE specific functions do not get
+! marked as TREE_PUBLIC() = 0, if the generic name is
+! PUBLIC.
+!
+use m
+use m2
+implicit none
+
+type(t) :: a, b, c
+type(t2) :: x
+
+call gen()
+a = b + (c .myop. a)
+
+call x%func()
+end
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_5.f90 b/gcc/testsuite/gfortran.dg/public_private_module_5.f90
new file mode 100644
index 0000000000..9c9d15dbd7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_5.f90
@@ -0,0 +1,40 @@
+! { dg-do compile }
+! { dg-options "-O3" }
+!
+! PR fortran/53175
+!
+
+MODULE ENERGY_FUNCTION
+ IMPLICIT NONE
+
+ TYPE PARAM
+ PRIVATE
+ INTEGER :: WHICH_VECTOR
+ END TYPE PARAM
+
+ INTEGER, PRIVATE :: DIM2
+ INTEGER, PRIVATE :: DIM5
+
+ private :: specific
+ interface gen
+ module procedure specific
+ end interface gen
+
+ CONTAINS
+
+ FUNCTION ENERGY_FUNCTION_CURRENT_ARGS()
+ INTEGER, DIMENSION(DIM2) :: ENERGY_FUNCTION_CURRENT_ARGS
+ END FUNCTION ENERGY_FUNCTION_CURRENT_ARGS
+
+ FUNCTION ENERGY_FUNCTION_GET_PARAMS()
+ TYPE(PARAM), DIMENSION(DIM2) :: ENERGY_FUNCTION_GET_PARAMS
+ END FUNCTION ENERGY_FUNCTION_GET_PARAMS
+
+ function specific()
+ character(len=dim5) :: specific
+ end function specific
+END MODULE ENERGY_FUNCTION
+
+! { dg-final { scan-assembler "__energy_function_MOD_dim2" } }
+! { dg-final { scan-assembler "__energy_function_MOD_dim5" } }
+
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_6.f90 b/gcc/testsuite/gfortran.dg/public_private_module_6.f90
new file mode 100644
index 0000000000..85d6930d3d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_6.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-O1" }
+!
+! PR fortran/54221
+!
+! Check that the unused PRIVATE "aaaa" variable is optimized away
+!
+
+module m
+ private
+ integer, save :: aaaa
+end module m
+
+! { dg-final { scan-assembler-not "aaaa" } }
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_7.f90 b/gcc/testsuite/gfortran.dg/public_private_module_7.f90
new file mode 100644
index 0000000000..d03b7047a1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_7.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+!
+! PR fortran/54884
+!
+! Check that get_key_len is not optimized away as it
+! is used in a publicly visible specification expression.
+!
+module m_common_attrs
+ private
+ !...
+ public :: get_key
+contains
+ pure function get_key_len() result(n)
+ n = 5
+ end function get_key_len
+ pure function other() result(n)
+ n = 5
+ end function other
+ ! ...
+ function get_key() result(key)
+ ! ...
+ character(len=get_key_len()) :: key
+ key = ''
+ end function get_key
+end module m_common_attrs
+
+! { dg-final { scan-assembler-not "__m_common_attrs_MOD_other" } }
+! { dg-final { scan-assembler "__m_common_attrs_MOD_get_key_len" } }
diff --git a/gcc/testsuite/gfortran.dg/public_private_module_8.f90 b/gcc/testsuite/gfortran.dg/public_private_module_8.f90
new file mode 100644
index 0000000000..bfc1b368f4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/public_private_module_8.f90
@@ -0,0 +1,49 @@
+! { dg-do compile }
+! { dg-options "-O2" }
+!
+! PR fortran/54884
+!
+! Check that get_key_len is not optimized away as it
+! is used in a publicly visible specification expression.
+!
+
+module m
+ private
+ public :: foo
+ interface foo
+ module procedure bar
+ end interface foo
+contains
+ pure function mylen()
+ integer :: mylen
+ mylen = 42
+ end function mylen
+ pure function myotherlen()
+ integer :: myotherlen
+ myotherlen = 99
+ end function myotherlen
+ subroutine bar(x)
+ character(len=mylen()) :: x
+ character :: z2(myotherlen())
+ call internal(x)
+ block
+ character(len=myotherlen()) :: z
+ z = "abc"
+ x(1:5) = z
+ end block
+ x(6:10) = intern_func()
+ contains
+ function intern_func()
+ character(len=myotherlen()) :: intern_func
+ intern_func = "zuzu"
+ end function intern_func
+ subroutine internal(y)
+ character(len=myotherlen()) :: y
+ y = "abc"
+ end subroutine internal
+ end subroutine bar
+end module m
+
+! { dg-final { scan-assembler-not "__m_MOD_myotherlen" } }
+! { dg-final { scan-assembler "__m_MOD_bar" } }
+! { dg-final { scan-assembler "__m_MOD_mylen" } }
diff --git a/gcc/testsuite/gfortran.dg/pure_byref_3.f90 b/gcc/testsuite/gfortran.dg/pure_byref_3.f90
index a9d860bf04..cb2644ff89 100644
--- a/gcc/testsuite/gfortran.dg/pure_byref_3.f90
+++ b/gcc/testsuite/gfortran.dg/pure_byref_3.f90
@@ -31,5 +31,3 @@ program pure_byref_3
a = hoj()
if (.not. all(a == (/1, 2, 3/))) call abort()
end program pure_byref_3
-
-! { dg-final { cleanup-modules "huj_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/pure_formal_3.f90 b/gcc/testsuite/gfortran.dg/pure_formal_3.f90
new file mode 100644
index 0000000000..5d08057b37
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/pure_formal_3.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! Clean up, made when working on PR fortran/52864
+!
+! Test some PURE and intent checks - related to pointers.
+module m
+ type t
+ end type t
+ integer, pointer :: x
+ class(t), pointer :: y
+end module m
+
+pure subroutine foo()
+ use m
+ call bar(x) ! { dg-error "can not appear in a variable definition context" }
+ call bar2(x) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
+ call bb(y) ! { dg-error "is local to a PURE procedure and has the POINTER attribute" }
+contains
+ pure subroutine bar(x)
+ integer, pointer, intent(inout) :: x
+ end subroutine
+ pure subroutine bar2(x)
+ integer, pointer :: x
+ end subroutine
+ pure subroutine bb(x)
+ class(t), pointer, intent(in) :: x
+ end subroutine
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/pure_formal_proc_2.f90 b/gcc/testsuite/gfortran.dg/pure_formal_proc_2.f90
index 687e43e93f..c683a6c51f 100644
--- a/gcc/testsuite/gfortran.dg/pure_formal_proc_2.f90
+++ b/gcc/testsuite/gfortran.dg/pure_formal_proc_2.f90
@@ -45,4 +45,3 @@ program Test
deallocate(pT1)
end program Test
-! { dg-final { cleanup-modules "testpure" } }
diff --git a/gcc/testsuite/gfortran.dg/pure_initializer_2.f90 b/gcc/testsuite/gfortran.dg/pure_initializer_2.f90
index 4fd2556efc..afb00c661a 100644
--- a/gcc/testsuite/gfortran.dg/pure_initializer_2.f90
+++ b/gcc/testsuite/gfortran.dg/pure_initializer_2.f90
@@ -43,4 +43,3 @@ pure function test()
integer :: test
test = p
end function test
-! { dg-final { cleanup-modules "mod_xyz mod_xyz2 mod_xyz3" } }
diff --git a/gcc/testsuite/gfortran.dg/quad_2.f90 b/gcc/testsuite/gfortran.dg/quad_2.f90
index d3c90a0bc2..996ed165d8 100644
--- a/gcc/testsuite/gfortran.dg/quad_2.f90
+++ b/gcc/testsuite/gfortran.dg/quad_2.f90
@@ -31,9 +31,9 @@ program test_qp
read (str2, *) fp3
if (fp1 /= fp3) call abort()
read (str3, *) fp4
- if (fp2 /= fp4) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
read (str4, *) fp4
- if (fp2 /= fp4) call abort()
+ if (abs (fp2 - fp4)/fp2 > epsilon(fp2)) call abort()
select case (qp)
case (8)
diff --git a/gcc/testsuite/gfortran.dg/quad_3.f90 b/gcc/testsuite/gfortran.dg/quad_3.f90
new file mode 100644
index 0000000000..be8e3c38f1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/quad_3.f90
@@ -0,0 +1,31 @@
+! { dg-do run }
+!
+! I/O test for REAL(16)
+!
+! Contributed by Dominique d'Humieres
+!
+program test_qp
+ use iso_fortran_env, only: real_kinds
+ implicit none
+ integer, parameter :: QP = real_kinds(ubound(real_kinds,dim=1))
+ real(kind=qp) :: a,b(2), c
+ integer :: exponent, i
+ character(len=180) :: tmp
+
+ ! Run this only with libquadmath; assume that all those systems
+ ! have also kind=10.
+ if (size (real_kinds) >= 4 .and. qp == 16) then
+ i = 3
+ if (real_kinds(i) /= 10) stop
+
+ exponent = 4000
+ b(:) = huge (1.0_qp)/10.0_qp**exponent
+! print *, 'real(16) big value: ', b(1)
+ write (tmp, *) b
+ read (tmp, *) a, c
+! print *, 'same value read again: ', a, c
+! print *, 'difference: looks OK now ', a-b(1)
+ if (abs (a-b(1))/a > epsilon(0.0_qp) &
+ .or. abs (c-b(1))/c > epsilon (0.0_qp)) call abort()
+ end if
+end program test_qp
diff --git a/gcc/testsuite/gfortran.dg/random_seed_3.f90 b/gcc/testsuite/gfortran.dg/random_seed_3.f90
new file mode 100644
index 0000000000..c4be96541b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/random_seed_3.f90
@@ -0,0 +1,22 @@
+! { dg-do run }
+! Check that array constructors using non-compile-time
+! iterators are handled correctly.
+program main
+ implicit none
+ call init_random_seed
+contains
+ SUBROUTINE init_random_seed()
+ INTEGER :: i, n, clock
+ INTEGER, DIMENSION(:), ALLOCATABLE :: seed
+
+ CALL RANDOM_SEED(size = n)
+ ALLOCATE(seed(n))
+
+ CALL SYSTEM_CLOCK(COUNT=clock)
+
+ seed = clock + 37 * (/ (i - 1, i = 1, n) /)
+ CALL RANDOM_SEED(PUT = seed)
+
+ DEALLOCATE(seed)
+ END SUBROUTINE init_random_seed
+end program main
diff --git a/gcc/testsuite/gfortran.dg/read_float_4.f90 b/gcc/testsuite/gfortran.dg/read_float_4.f90
new file mode 100644
index 0000000000..01a0de8c04
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/read_float_4.f90
@@ -0,0 +1,18 @@
+! { dg-do run }
+!
+! PR libgfortran/53051
+!
+! Check that reading "4.0q0" works, i.e. floating-point
+! numbers which use "q" to indicate the exponential.
+! (Which is a vendor extension.)
+!
+ character(len=20) :: str
+ real :: r
+ integer :: i
+
+ r = 0
+ str = '1.0q0'
+ read(str, *, iostat=i) r
+ if (r /= 1.0 .or. i /= 0) call abort()
+ !print *, r
+ end
diff --git a/gcc/testsuite/gfortran.dg/read_repeat_2.f90 b/gcc/testsuite/gfortran.dg/read_repeat_2.f90
new file mode 100644
index 0000000000..4b8659e5f3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/read_repeat_2.f90
@@ -0,0 +1,19 @@
+! { dg-do run }
+!
+! PR fortran/56810
+!
+! Contributed by Jonathan Hogg
+!
+program test
+ implicit none
+
+ integer :: i
+ complex :: a(4)
+
+ open (99, status='scratch')
+ write (99, *) '4*(1.0,2.0)'
+ rewind (99)
+ read (99,*) a(:)
+ close (99)
+ if (any (a /= cmplx (1.0,2.0))) call abort()
+end program test
diff --git a/gcc/testsuite/gfortran.dg/read_x_eor.f90 b/gcc/testsuite/gfortran.dg/read_x_eor.f90
index 064835a8b2..a06e6df145 100644
--- a/gcc/testsuite/gfortran.dg/read_x_eor.f90
+++ b/gcc/testsuite/gfortran.dg/read_x_eor.f90
@@ -1,5 +1,5 @@
! { dg-do run }
-! ( dg-output "^" }
+! { dg-output "^" }
!
! Test fix for pr24785 - EOR used to scrub the 2X.
! Reduced from PR example submitted by Harald Anlauf <anlauf@gmx.de>
diff --git a/gcc/testsuite/gfortran.dg/real_compare_1.f90 b/gcc/testsuite/gfortran.dg/real_compare_1.f90
new file mode 100644
index 0000000000..fd8417706c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/real_compare_1.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-Wcompare-reals" }
+program main
+ real :: a
+ complex :: c
+ read (*,*) a
+ read (*,*) c
+ if (a .eq. 3.14) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
+ if (3.14 == a) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
+ if (a .eq. 3) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
+ if (3. == a) print *,"foo" ! { dg-warning "Equality comparison for REAL" }
+ if (a .ne. 4.14) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
+ if (4.14 /= a) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
+ if (a .ne. 4) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
+ if (4 /= a) print *,"foo" ! { dg-warning "Inequality comparison for REAL" }
+
+ if (c .eq. (3.14, 2.11)) print *,"foo" ! { dg-warning "Equality comparison for COMPLEX" }
+ if ((3.14, 2.11) == a) print *,"foo" ! { dg-warning "Equality comparison for COMPLEX" }
+ if (c .ne. (3.14, 2.11)) print *,"foo" ! { dg-warning "Inequality comparison for COMPLEX" }
+ if ((3.14, 2.11) /= a) print *,"foo" ! { dg-warning "Inequality comparison for COMPLEX" }
+end program main
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90
index 9661d724f5..bc7395a9ba 100644
--- a/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_13.f90
@@ -16,5 +16,3 @@ contains
reduced = pack (array, mask)
end function reduced
end module cascades
-! { dg-final { cleanup-modules "cascades" } }
-
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_14.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_14.f90
new file mode 100644
index 0000000000..b8b669f640
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_14.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+! { dg-options "-Wrealloc-lhs-all -Wrealloc-lhs" }
+!
+! PR fortran/52196
+!
+implicit none
+type t
+ integer :: x
+end type t
+integer, allocatable :: a(:), b
+real, allocatable :: r(:)
+type(t), allocatable :: c(:)
+character(len=:), allocatable :: str
+character(len=:), allocatable :: astr(:)
+
+allocate(a(2), b, c(1))
+b = 4 ! { dg-warning "Code for reallocating the allocatable variable" }
+a = [b,b] ! { dg-warning "Code for reallocating the allocatable array" }
+c = [t(4)] ! { dg-warning "Code for reallocating the allocatable variable" }
+a = 5 ! no realloc
+c = t(5) ! no realloc
+str = 'abc' ! { dg-warning "Code for reallocating the allocatable variable" }
+astr = 'abc' ! no realloc
+astr = ['abc'] ! { dg-warning "Code for reallocating the allocatable array" }
+a = reshape(a,shape(a)) ! { dg-warning "Code for reallocating the allocatable array" }
+r = sin(r)
+r = sin(r(1)) ! no realloc
+b = sin(r(1)) ! { dg-warning "Code for reallocating the allocatable variable" }
+
+a = nar() ! { dg-warning "Code for reallocating the allocatable array" }
+a = nar2() ! { dg-warning "Code for reallocating the allocatable array" }
+contains
+ function nar()
+ integer,allocatable :: nar(:)
+ end function
+ function nar2()
+ integer :: nar2(8)
+ end function
+end
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_16.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_16.f90
new file mode 100644
index 0000000000..84af6670f6
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_16.f90
@@ -0,0 +1,28 @@
+! { dg-do run }
+! Test the fix for PR56008
+!
+! Contributed by Stefan Mauerberger <stefan.mauerberger@gmail.com>
+!
+PROGRAM main
+ !USE MPI
+
+ TYPE :: test_typ
+ REAL, ALLOCATABLE :: a(:)
+ END TYPE
+
+ TYPE(test_typ) :: xx, yy
+ TYPE(test_typ), ALLOCATABLE :: conc(:)
+
+ !CALL MPI_INIT(i)
+
+ xx = test_typ( [1.0,2.0] )
+ yy = test_typ( [4.0,4.9] )
+
+ conc = [ xx, yy ]
+
+ if (any (int (10.0*conc(1)%a) .ne. [10,20])) call abort
+ if (any (int (10.0*conc(2)%a) .ne. [40,49])) call abort
+
+ !CALL MPI_FINALIZE(i)
+
+END PROGRAM main
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_17.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_17.f90
new file mode 100644
index 0000000000..61b1e91d64
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_17.f90
@@ -0,0 +1,47 @@
+! { dg-do run }
+! Test the fix for PR47517
+!
+! Reported by Tobias Burnus <burnus@gcc.gnu.org>
+! from a testcase by James Van Buskirk
+module mytypes
+ implicit none
+ type label
+ integer, allocatable :: parts(:)
+ end type label
+ type table
+ type(label), allocatable :: headers(:)
+ end type table
+end module mytypes
+
+program allocate_assign
+ use mytypes
+ implicit none
+ integer, parameter :: ik8 = selected_int_kind(18)
+ type(table) x1(2)
+ type(table) x2(3)
+ type(table), allocatable :: x(:)
+ integer i, j, k
+ integer(ik8) s
+ call foo
+ s = 0
+ do k = 1, 10000
+ x = x1
+ s = s+x(2)%headers(2)%parts(2)
+ x = x2
+ s = s+x(2)%headers(2)%parts(2)
+ end do
+ if (s .ne. 40000) call abort
+contains
+!
+! TODO - these assignments lose 1872 bytes on x86_64/FC17
+! This is PR38319
+!
+ subroutine foo
+ x1 = [table([(label([(j,j=1,3)]),i=1,3)]), &
+ table([(label([(j,j=1,4)]),i=1,4)])]
+
+ x2 = [table([(label([(j,j=1,4)]),i=1,4)]), &
+ table([(label([(j,j=1,5)]),i=1,5)]), &
+ table([(label([(j,j=1,6)]),i=1,6)])]
+ end subroutine
+end program allocate_assign
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_18.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_18.f90
new file mode 100644
index 0000000000..d1743551e3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_18.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! Ensure that for zero-sized array, nonzero memory is allocated
+!
+type t
+end type t
+
+type(t), allocatable :: x, y(:)
+
+x = t()
+y = [ t :: ]
+
+if (.not. allocated (x)) call abort ()
+if (.not. allocated (y)) call abort ()
+end
+
+! { dg-final { scan-tree-dump "x = \\(struct t .\\) __builtin_malloc \\(1\\);" "original" } }
+! { dg-final { scan-tree-dump "y.data = \\(void . restrict\\) __builtin_malloc \\(1\\);" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_19.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_19.f90
new file mode 100644
index 0000000000..c54a35f40d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_19.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+! PR 52243 - avoid check for reallocation when doing simple
+! assignments with the same variable on both sides.
+module foo
+contains
+ elemental function ele(a)
+ real, intent(in) :: a
+ real :: ele
+ ele = 1./(2+a)
+ end function ele
+
+ subroutine bar(a)
+ real, dimension(:), allocatable :: a
+ a = a * 2.0
+ a = sin(a-0.3)
+ a = ele(a)
+ end subroutine bar
+end module foo
+! { dg-final { scan-tree-dump-times "alloc" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_20.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_20.f90
new file mode 100644
index 0000000000..d4cfaf841c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_20.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+! PR fortran/43366
+!
+! Invalid assignment to an allocatable polymorphic var.
+!
+type t
+end type t
+class(t), allocatable :: var
+
+var = t() ! { dg-error "Fortran 2008: Assignment to an allocatable polymorphic variable" }
+end
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_21.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_21.f90
new file mode 100644
index 0000000000..fd8f9aca93
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_21.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fno-realloc-lhs" }
+!
+! PR fortran/43366
+!
+! Invalid assignment to an allocatable polymorphic var.
+!
+type t
+end type t
+class(t), allocatable :: var
+
+var = t() ! { dg-error "Assignment to an allocatable polymorphic variable at .1. requires -frealloc-lhs" }
+end
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_22.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_22.f90
new file mode 100644
index 0000000000..f759c6aca0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_22.f90
@@ -0,0 +1,13 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+!
+! PR fortran/43366
+!
+! Invalid assignment to an allocatable polymorphic var.
+!
+type t
+end type t
+class(t), allocatable :: caf[:]
+
+caf = t() ! { dg-error "Assignment to polymorphic coarray at .1. is not permitted" }
+end
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_23.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_23.f90
new file mode 100644
index 0000000000..f9897f1740
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_23.f90
@@ -0,0 +1,30 @@
+! { dg-do run }
+!
+! PR fortran/57354
+!
+! Contributed by Vladimir Fuka <vladimir.fuka@gmail.com>
+!
+ type t
+ integer,allocatable :: i
+ end type
+
+ type(t) :: e
+ type(t), allocatable :: a(:)
+ integer :: chksum = 0
+
+ do i=1,3 ! Was 100 in original
+ e%i = i
+ chksum = chksum + i
+ if (.not.allocated(a)) then
+ a = [e]
+ else
+ call foo
+ end if
+ end do
+
+ if (sum ([(a(i)%i, i=1,size(a))]) .ne. chksum) call abort
+contains
+ subroutine foo
+ a = [a, e]
+ end subroutine
+end
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
new file mode 100644
index 0000000000..6f88c2bf27
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_24.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! PR 62142 - this used to segfault
+! Original test case by Ondřej Čertík .
+program test_segfault
+ implicit none
+ real, allocatable :: X(:)
+ allocate (x(1))
+ x = 1.
+ X = floor(X)
+end program
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_4.f03 b/gcc/testsuite/gfortran.dg/realloc_on_assign_4.f03
index 682a81c962..8e7d49b0fa 100644
--- a/gcc/testsuite/gfortran.dg/realloc_on_assign_4.f03
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_4.f03
@@ -46,6 +46,3 @@ contains
bar = carg(1:12)
end function
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_6.f03 b/gcc/testsuite/gfortran.dg/realloc_on_assign_6.f03
index 7c170ebce2..3c96c73a74 100644
--- a/gcc/testsuite/gfortran.dg/realloc_on_assign_6.f03
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_6.f03
@@ -124,6 +124,3 @@ do k = 1,size(some_type_to_save)
end do
end subroutine print_after_transfer
-! { dg-final { cleanup-modules "m gf33" } }
-! { dg-final { cleanup-modules "custom_type custom_interfaces" } }
-! { dg-final { cleanup-modules "store_data_test" } }
diff --git a/gcc/testsuite/gfortran.dg/realloc_on_assign_9.f90 b/gcc/testsuite/gfortran.dg/realloc_on_assign_9.f90
index d03db3244b..69f1ecc021 100644
--- a/gcc/testsuite/gfortran.dg/realloc_on_assign_9.f90
+++ b/gcc/testsuite/gfortran.dg/realloc_on_assign_9.f90
@@ -30,5 +30,3 @@ program main
july4 = new_show(boom=fireworks)
end program
-
-! { dg-final { cleanup-modules "soop_stars_class" } }
diff --git a/gcc/testsuite/gfortran.dg/reassoc_10.f b/gcc/testsuite/gfortran.dg/reassoc_10.f
new file mode 100644
index 0000000000..698e2c49bb
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_10.f
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math -fdump-tree-optimized" }
+
+ SUBROUTINE S55199(P,Q,Dvdph)
+ implicit none
+ real(8) :: c1,c2,c3,P,Q,Dvdph
+ c1=0.1d0
+ c2=0.2d0
+ c3=0.3d0
+ Dvdph = c1 + 2.*P*c2 + 3.*P**2*Q**3*c3
+ END
+
+! There should be five multiplies following un-distribution
+! and power expansion.
+
+! { dg-final { scan-tree-dump-times " \\\* " 5 "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/reassoc_11.f b/gcc/testsuite/gfortran.dg/reassoc_11.f
new file mode 100644
index 0000000000..242201680b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_11.f
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math" }
+
+! This tests only for compile-time failure, which formerly occurred
+! when a __builtin_powi was introduced by reassociation in a bad place.
+
+ SUBROUTINE GRDURBAN(URBWSTR, ZIURB, GRIDHT)
+
+ IMPLICIT NONE
+ INTEGER :: I
+ REAL :: SW2, URBWSTR, ZIURB, GRIDHT(87)
+
+ SAVE
+
+ SW2 = 1.6*(GRIDHT(I)/ZIURB)**0.667*URBWSTR**2
+
+ END
diff --git a/gcc/testsuite/gfortran.dg/reassoc_12.f90 b/gcc/testsuite/gfortran.dg/reassoc_12.f90
new file mode 100644
index 0000000000..7f4d70e31c
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_12.f90
@@ -0,0 +1,74 @@
+! { dg-do compile }
+! { dg-options "-O2 -ffast-math" }
+! PR middle-end/57370
+
+ SUBROUTINE xb88_lr_adiabatic_lda_calc(e_ndrho_ndrho_ndrho, &
+ grad_deriv,npoints, sx)
+ IMPLICIT REAL*8 (t)
+ INTEGER, PARAMETER :: dp=8
+ REAL(kind=dp), DIMENSION(1:npoints) :: e_ndrho_ndrho_ndrho, &
+ e_ndrho_ndrho_rho
+ DO ii=1,npoints
+ IF( grad_deriv >= 2 .OR. grad_deriv == -2 ) THEN
+ t1425 = t233 * t557
+ t1429 = beta * t225
+ t1622 = t327 * t1621
+ t1626 = t327 * t1625
+ t1632 = t327 * t1631
+ t1685 = t105 * t1684
+ t2057 = t1636 + t8 * (t2635 + t3288)
+ END IF
+ IF( grad_deriv >= 3 .OR. grad_deriv == -3 ) THEN
+ t5469 = t5440 - t5443 - t5446 - t5449 - &
+ t5451 - t5454 - t5456 + t5459 - &
+ t5462 + t5466 - t5468
+ t5478 = 0.240e2_dp * t1616 * t973 * t645 * t1425
+ t5489 = 0.1600000000e2_dp * t1429 * t1658
+ t5531 = 0.160e2_dp * t112 * t1626
+ t5533 = 0.160e2_dp * t112 * t1632
+ t5537 = 0.160e2_dp * t112 * t1622
+ t5541 = t5472 - t5478 - t5523 + t5525 + &
+ t5531 + t5533 + t5535 + t5537 + &
+ t5540
+ t5565 = t112 * t1685
+ t5575 = t5545 - t5548 + t5551 + t5553 - &
+ t5558 + t5560 - t5562 + t5564 - &
+ 0.80e1_dp * t5565 + t5568 + t5572 + &
+ t5574
+ t5611 = t5579 - t5585 + t5590 - t5595 + &
+ t5597 - t5602 + t5604 + t5607 + &
+ t5610
+ t5613 = t5469 + t5541 + t5575 + t5611
+ t6223 = t6189 - &
+ 0.3333333336e0_dp * t83 * t84 * t5613 + &
+ t6222
+ t6227 = - t8 * (t5305 + t6223)
+ e_ndrho_ndrho_rho(ii) = e_ndrho_ndrho_rho(ii) + &
+ t6227 * sx
+ t6352 = t5440 - t5443 - t5446 - t5449 - &
+ t5451 - t5454 + &
+ 0.40e1_dp * t102 * t327 * t2057 * t557 - &
+ t5456 + t5459 - t5462 + t5466 - &
+ t5468
+ t6363 = t5480 - t5489 + &
+ 0.9600000000e2_dp * t1054 * t640 * t3679
+ t6367 = t5472 - t5474 - t5478 - t5523 + &
+ t5525 + t5531 + t5533 + t5535 + &
+ t5537 - 0.20e1_dp * t102 * t105 * t6363 + &
+ t5540
+ t6370 = t5545 - t5548 + t5551 + t5553 - &
+ t5558 + t5560 - t5562 + t5564 - &
+ 0.40e1_dp * t5565 + &
+ t5568 + t5572 + t5574
+ t6373 = t5579 - t5585 + t5590 - t5595 + &
+ t5597 - t5602 + t5604 + t5607 + &
+ t5610
+ t6375 = t6352 + t6367 + t6370 + t6373
+ t6380 = - 0.3333333336e0_dp * t83 * t84 * t6375 + t5701
+ t6669 = -t4704 - t8 * (t6344 + t6380 + t6665)
+ e_ndrho_ndrho_ndrho(ii) = e_ndrho_ndrho_ndrho(ii) + &
+ t6669 * sx
+ END IF
+ END DO
+ END SUBROUTINE xb88_lr_adiabatic_lda_calc
+
diff --git a/gcc/testsuite/gfortran.dg/reassoc_4.f b/gcc/testsuite/gfortran.dg/reassoc_4.f
index bc3d9852ab..a6d5fa53f7 100644
--- a/gcc/testsuite/gfortran.dg/reassoc_4.f
+++ b/gcc/testsuite/gfortran.dg/reassoc_4.f
@@ -1,7 +1,6 @@
! { dg-do compile }
-! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1" }
+! { dg-options "-O3 -ffast-math -fdump-tree-reassoc1 --param max-completely-peeled-insns=400" }
! { dg-additional-options "--param max-completely-peel-times=16" { target spu-*-* } }
-! { dg-additional-options "--param max-completely-peeled-insns=400" { target s390*-*-* } }
subroutine anisonl(w,vo,anisox,s,ii1,jj1,weight)
integer ii1,jj1,i1,iii1,j1,jjj1,k1,l1,m1,n1
real*8 w(3,3),vo(3,3),anisox(3,3,3,3),s(60,60),weight
diff --git a/gcc/testsuite/gfortran.dg/reassoc_7.f b/gcc/testsuite/gfortran.dg/reassoc_7.f
new file mode 100644
index 0000000000..4f70ef6f9d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_7.f
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math -fdump-tree-optimized" }
+
+ SUBROUTINE S55199(P,Dvdph)
+ implicit none
+ real(8) :: c1,c2,c3,P,Dvdph
+ c1=0.1d0
+ c2=0.2d0
+ c3=0.3d0
+ Dvdph = c1 + 2.*P*c2 + 3.*P**2*c3
+ END
+
+! There should be two multiplies following un-distribution.
+
+! { dg-final { scan-tree-dump-times " \\\* " 2 "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/reassoc_8.f b/gcc/testsuite/gfortran.dg/reassoc_8.f
new file mode 100644
index 0000000000..4a6ea72f22
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_8.f
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math -fdump-tree-optimized" }
+
+ SUBROUTINE S55199(P,Dvdph)
+ implicit none
+ real(8) :: c1,c2,c3,P,Dvdph
+ c1=0.1d0
+ c2=0.2d0
+ c3=0.3d0
+ Dvdph = c1 + 2.*P**2*c2 + 3.*P**3*c3
+ END
+
+! There should be three multiplies following un-distribution
+! and power expansion.
+
+! { dg-final { scan-tree-dump-times " \\\* " 3 "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/reassoc_9.f b/gcc/testsuite/gfortran.dg/reassoc_9.f
new file mode 100644
index 0000000000..53950ee9bc
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reassoc_9.f
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-O3 -ffast-math -fdump-tree-optimized" }
+
+ SUBROUTINE S55199(P,Dvdph)
+ implicit none
+ real(8) :: c1,c2,c3,P,Dvdph
+ c1=0.1d0
+ c2=0.2d0
+ c3=0.3d0
+ Dvdph = c1 + 2.*P**2*c2 + 3.*P**4*c3
+ END
+
+! There should be three multiplies following un-distribution
+! and power expansion.
+
+! { dg-final { scan-tree-dump-times " \\\* " 3 "optimized" } }
+! { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_12.f90 b/gcc/testsuite/gfortran.dg/recursive_check_12.f90
index 22eaf7d0f2..ec85c11ed8 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_12.f90
+++ b/gcc/testsuite/gfortran.dg/recursive_check_12.f90
@@ -26,4 +26,3 @@ program test
call f(.false.)
call f(.false.)
end program test
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_13.f90 b/gcc/testsuite/gfortran.dg/recursive_check_13.f90
index ed222a322e..05d0c2fac5 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_13.f90
+++ b/gcc/testsuite/gfortran.dg/recursive_check_13.f90
@@ -29,4 +29,3 @@ program test
call f(.false.)
call f(.true.)
end program test
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_3.f90 b/gcc/testsuite/gfortran.dg/recursive_check_3.f90
index 7678286108..ec358cb12c 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_3.f90
+++ b/gcc/testsuite/gfortran.dg/recursive_check_3.f90
@@ -20,4 +20,3 @@ recursive recursive subroutine a3(b) ! { dg-error "Duplicate RECURSIVE attribute
real, intent(in) :: b ! { dg-error "Unexpected data declaration statement" }
end subroutine a3 ! { dg-error "Expecting END MODULE" }
end module m3
-! { dg-final { cleanup-modules "m1 m2 m3" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_4.f03 b/gcc/testsuite/gfortran.dg/recursive_check_4.f03
index d33e53555c..ece42ca231 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_4.f03
+++ b/gcc/testsuite/gfortran.dg/recursive_check_4.f03
@@ -32,5 +32,3 @@ CONTAINS
END FUNCTION func
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_5.f03 b/gcc/testsuite/gfortran.dg/recursive_check_5.f03
index 4014986b3b..4fe84106a2 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_5.f03
+++ b/gcc/testsuite/gfortran.dg/recursive_check_5.f03
@@ -23,5 +23,3 @@ CONTAINS
END FUNCTION func
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_check_6.f03 b/gcc/testsuite/gfortran.dg/recursive_check_6.f03
index 478539e6a4..9414f587b9 100644
--- a/gcc/testsuite/gfortran.dg/recursive_check_6.f03
+++ b/gcc/testsuite/gfortran.dg/recursive_check_6.f03
@@ -62,5 +62,3 @@ CONTAINS
END SUBROUTINE main
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/recursive_interface_1.f90 b/gcc/testsuite/gfortran.dg/recursive_interface_1.f90
new file mode 100644
index 0000000000..61db0c1102
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/recursive_interface_1.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR fortran/54107
+! The compiler used to ICE on recursive interfaces.
+
+module m
+ contains
+ function foo() result(r1)
+ procedure(foo), pointer :: r1
+ end function foo
+
+ function bar() result(r2)
+ procedure(baz), pointer :: r2
+ end function bar
+
+ function baz() result(r3)
+ procedure(bar), pointer :: r3
+ end function baz
+end module m
+
diff --git a/gcc/testsuite/gfortran.dg/recursive_interface_2.f90 b/gcc/testsuite/gfortran.dg/recursive_interface_2.f90
new file mode 100644
index 0000000000..9726a0ef7e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/recursive_interface_2.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+!
+! PR fortran/54107
+! Recursive interfaces used to lead to an infinite recursion during
+! translation.
+
+module m
+ contains
+ subroutine foo (arg)
+ procedure(foo) :: arg
+ end subroutine
+ function foo2 (arg) result(r)
+ procedure(foo2) :: arg
+ procedure(foo2), pointer :: r
+ end function
+ subroutine bar (arg)
+ procedure(baz) :: arg
+ end subroutine
+ subroutine baz (arg)
+ procedure(bar) :: arg
+ end subroutine
+end module m
diff --git a/gcc/testsuite/gfortran.dg/recursive_reference_2.f90 b/gcc/testsuite/gfortran.dg/recursive_reference_2.f90
index 59df43cdf1..265b8701b9 100644
--- a/gcc/testsuite/gfortran.dg/recursive_reference_2.f90
+++ b/gcc/testsuite/gfortran.dg/recursive_reference_2.f90
@@ -30,5 +30,3 @@ integer :: ans(5)
IF (ANY(TEST(3).NE.(/5,5,5,5,5/))) CALL ABORT()
IF (ANY(TEST(6).NE.(/0,0,0,0,0/))) CALL ABORT()
END
-! { dg-final { cleanup-modules "m1" } }
-
diff --git a/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f90 b/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f90
index 8eb47e19b8..40a0910b1e 100644
--- a/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f90
+++ b/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment.f90
@@ -16,4 +16,3 @@ CONTAINS
I=-J
END SUBROUTINE T1
END MODULE M1
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f90 b/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f90
index ba70902091..5e953222ec 100644
--- a/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f90
+++ b/gcc/testsuite/gfortran.dg/redefined_intrinsic_assignment_2.f90
@@ -64,5 +64,3 @@ contains
lhs(:) = rhs(:)
end subroutine invalid3
end module test4
-
-! { dg-final { cleanup-modules "test1" } }
diff --git a/gcc/testsuite/gfortran.dg/repeat_1.f90 b/gcc/testsuite/gfortran.dg/repeat_1.f90
index 7a1d6f9294..1ac105c2e3 100644
--- a/gcc/testsuite/gfortran.dg/repeat_1.f90
+++ b/gcc/testsuite/gfortran.dg/repeat_1.f90
@@ -17,4 +17,4 @@ contains
f = x
end function f
end
-! { dg-output "Fortran runtime error: Argument NCOPIES of REPEAT intrinsic is negative .* line 6)"
+! { dg-output "Fortran runtime error: Argument NCOPIES of REPEAT intrinsic is negative \\(its value is -1\\)" }
diff --git a/gcc/testsuite/gfortran.dg/reshape_2.f90 b/gcc/testsuite/gfortran.dg/reshape_2.f90
index d28058dddb..1a85712292 100644
--- a/gcc/testsuite/gfortran.dg/reshape_2.f90
+++ b/gcc/testsuite/gfortran.dg/reshape_2.f90
@@ -21,4 +21,3 @@ program test
if (nxttab(linem, 1) .ne. 6) call abort
if (nxttab(linem, nplam) .ne. 132) call abort
end program test
-! { dg-final { cleanup-modules "splitprms" } } \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/reshape_5.f90 b/gcc/testsuite/gfortran.dg/reshape_5.f90
new file mode 100644
index 0000000000..a7d4a3f001
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape_5.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/56849
+!
+integer :: x(2,2),y(4)
+y = reshape([1,2,3,4],[4])
+x(:,1:1) = reshape(y(::2), [1,2], order=[1,2]) ! { dg-error "Different shape for array assignment at .1. on dimension 1 .2 and 1." }
+print *, y
+print *, x(:,1)
+end
diff --git a/gcc/testsuite/gfortran.dg/reshape_6.f90 b/gcc/testsuite/gfortran.dg/reshape_6.f90
new file mode 100644
index 0000000000..149f31efe7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/reshape_6.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+! PR fortran/58989
+!
+program test
+
+ real(8), dimension(4,4) :: fluxes
+ real(8), dimension(2,2,2,2) :: f
+ integer, dimension(3) :: dmmy
+ integer, parameter :: indx(4)=(/2,2,2,2/)
+
+ fluxes = 1
+
+ dmmy = (/2,2,2/)
+
+ f = reshape(fluxes,(/dmmy,2/)) ! Caused an ICE
+ f = reshape(fluxes,(/2,2,2,2/)) ! Works as expected
+ f = reshape(fluxes,indx) ! Works as expected
+
+end program test
diff --git a/gcc/testsuite/gfortran.dg/reshape_zerosize_3.f90 b/gcc/testsuite/gfortran.dg/reshape_zerosize_3.f90
index 870a76c652..de39a306da 100644
--- a/gcc/testsuite/gfortran.dg/reshape_zerosize_3.f90
+++ b/gcc/testsuite/gfortran.dg/reshape_zerosize_3.f90
@@ -40,4 +40,3 @@ END MODULE M1
USE M1
CALL S2(0)
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/result_in_spec_1.f90 b/gcc/testsuite/gfortran.dg/result_in_spec_1.f90
index cbeb60f2d8..6189e55919 100644
--- a/gcc/testsuite/gfortran.dg/result_in_spec_1.f90
+++ b/gcc/testsuite/gfortran.dg/result_in_spec_1.f90
@@ -49,4 +49,3 @@ pure function f(x)
integer f
f = 2*x+1
end function f
-! { dg-final { cleanup-modules "test1" } }
diff --git a/gcc/testsuite/gfortran.dg/result_in_spec_2.f90 b/gcc/testsuite/gfortran.dg/result_in_spec_2.f90
index cffa2300c2..028e4034a6 100644
--- a/gcc/testsuite/gfortran.dg/result_in_spec_2.f90
+++ b/gcc/testsuite/gfortran.dg/result_in_spec_2.f90
@@ -28,4 +28,3 @@ program test
if(len (test2()) /= 3) call abort ()
if(test2() /= '123') call abort ()
end program test
-! { dg-final { cleanup-modules "test1" } }
diff --git a/gcc/testsuite/gfortran.dg/result_in_spec_4.f90 b/gcc/testsuite/gfortran.dg/result_in_spec_4.f90
index 3f0e9a3791..5228b9b842 100644
--- a/gcc/testsuite/gfortran.dg/result_in_spec_4.f90
+++ b/gcc/testsuite/gfortran.dg/result_in_spec_4.f90
@@ -23,5 +23,3 @@ contains
sigma2 = MATMUL(getPhaseMatrix(), sigma2)
END SUBROUTINE
end module m
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/round_1.f03 b/gcc/testsuite/gfortran.dg/round_1.f03
index db5d6ec926..f74b13791b 100644
--- a/gcc/testsuite/gfortran.dg/round_1.f03
+++ b/gcc/testsuite/gfortran.dg/round_1.f03
@@ -20,9 +20,9 @@ write(line, fmt(4)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.12") call abort
write(line, fmt(5)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
if (line.ne." 1.20 1.22 1.25 1.27 1.30 1.13") call abort
-write(line, fmt(6)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
+write(line, fmt(6)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
if (line.ne." 1.2 1.2 1.3 1.3 1.3 1.1") call abort
-write(line, fmt(7)) 1.20, 1.22, 1.25, 1.27, 1.30, 1.125
+write(line, fmt(7)) 1.20, 1.22, 1.250001, 1.27, 1.30, 1.125
if (line.ne." +1.2 +1.2 +1.3 +1.3 +1.3 +1.1") call abort
end
diff --git a/gcc/testsuite/gfortran.dg/round_3.f08 b/gcc/testsuite/gfortran.dg/round_3.f08
index 8b03ce562f..2bb36d9eee 100644
--- a/gcc/testsuite/gfortran.dg/round_3.f08
+++ b/gcc/testsuite/gfortran.dg/round_3.f08
@@ -16,19 +16,44 @@ program pr48615
call checkfmt("(RU,1P,G6.0E2)", 2.0, "2.E+00")
call checkfmt("(RU,1P,G10.4E2)", 2.3456e5, "2.3456E+05")
- call checkfmt("(RU,F2.0)", 0.09, "1.") ! 0.
+ call checkfmt("(RC,G10.2)", 99.5, " 0.10E+03") ! pr59774
+ call checkfmt("(RC,G10.2)", 995., " 0.10E+04") ! pr59774
+ call checkfmt("(RC,G10.3)", 999.5, " 0.100E+04") ! pr59774
+ call checkfmt("(RC,G10.3)", 9995., " 0.100E+05") ! pr59774
+ call checkfmt("(RU,G10.2)", .099, " 0.10 ") ! pr59774
+ call checkfmt("(RC,G10.1)", .095, " 0.1 ") ! pr59774
+ call checkfmt("(RU,G10.3)", .0999, " 0.100 ") ! pr59774
+ call checkfmt("(RC,G10.2)", .0995, " 0.10 ") ! pr59774
+
+ call checkfmt("(RU,G9.3)", 891.1, " 892.") ! pr59836
+ call checkfmt("(RD,G9.3)", -891.1, "-892.") ! pr59836
+
+ call checkfmt("(RU,F6.4)", 0.00006, "0.0001")! 0.
+ call checkfmt("(RU,F5.3)", 0.0007, "0.001") ! 0.
+ call checkfmt("(RU,F4.2)", 0.008, "0.01") ! 0.
+ call checkfmt("(RU,F3.1)", 0.09, "0.1") ! 0.
+
+ call checkfmt("(RU,F2.0)", 0.09, "1.") ! 0.
call checkfmt("(RD,F3.0)", -0.09, "-1.") ! -0.
- call checkfmt("(RU,F2.0)", 2.0, "2.") ! 3.
- call checkfmt("(RD,F3.0)", -2.0, "-2.") ! -3.
- call checkfmt("(RU,F6.4)", 2.0, "2.0000") ! 2.0001
- call checkfmt("(RD,F7.4)", -2.0, "-2.0000") ! -2.0001
- call checkfmt("(RU,1P,E6.0E2)", 2.0, "2.E+00") ! 3.E+00
+ call checkfmt("(RU,F2.0)", 0.9, "1.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.4, "0.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.5, "1.") ! pr59836
+ call checkfmt("(RC,F2.0)", 0.6, "1.") ! pr59836
+ call checkfmt("(RD,F3.0)", -0.9, "-1.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.4, "-0.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.5, "-1.") ! pr59836
+ call checkfmt("(RC,F3.0)", -0.6, "-1.") ! pr59836
+ call checkfmt("(RU,F2.0)", 2.0, "2.") ! 3.
+ call checkfmt("(RD,F3.0)", -2.0, "-2.") ! -3.
+ call checkfmt("(RU,F6.4)", 2.0, "2.0000") ! 2.0001
+ call checkfmt("(RD,F7.4)", -2.0, "-2.0000") ! -2.0001
+ call checkfmt("(RU,1P,E6.0E2)", 2.0, "2.E+00") ! 3.E+00
call checkfmt("(RD,1P,E7.0E2)", -2.0, "-2.E+00") ! -3.E+00
- call checkfmt("(RU,1P,E7.1E2)", 2.5, "2.5E+00") ! 2.6E+00
+ call checkfmt("(RU,1P,E7.1E2)", 2.5, "2.5E+00") ! 2.6E+00
call checkfmt("(RD,1P,E8.1E2)", -2.5, "-2.5E+00") ! -2.6E+00
call checkfmt("(RU,1P,E10.4E2)", 2.5, "2.5000E+00") ! 2.5001E+00
call checkfmt("(RD,1P,E11.4E2)", -2.5, "-2.5000E+00") ! -2.5001E+00
- call checkfmt("(RU,1P,G6.0E2)", 2.0, "2.E+00") ! 3.E+00
+ call checkfmt("(RU,1P,G6.0E2)", 2.0, "2.E+00") ! 3.E+00
call checkfmt("(RD,1P,G7.0E2)", -2.0, "-2.E+00") ! -3.E+00
call checkfmt("(RU,1P,G10.4E2)", 2.3456e5, "2.3456E+05") ! 2.3457E+05
call checkfmt("(RD,1P,G11.4E2)", -2.3456e5, "-2.3456E+05") ! -2.3457E+05
diff --git a/gcc/testsuite/gfortran.dg/round_4.f90 b/gcc/testsuite/gfortran.dg/round_4.f90
new file mode 100644
index 0000000000..f60e1f785f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/round_4.f90
@@ -0,0 +1,121 @@
+! { dg-do run }
+! { dg-add-options ieee }
+! { dg-skip-if "PR libfortran/58015" { *-*-solaris2.9* hppa*-*-hpux* } }
+! { dg-skip-if "IBM long double 31 bits of precision, test requires 38" { powerpc*-*-linux* } }
+!
+! PR fortran/35862
+!
+! Test whether I/O rounding works. Uses internally (libgfortran) strtod
+! for the conversion - and sets the CPU rounding mode accordingly.
+!
+! Only few strtod implementations currently support rounding. Therefore
+! we use a heuristic to determine if the rounding support is available.
+! The assumption is that if strtod gives *different* results for up/down
+! rounding, then it will give *correct* results for nearest/zero/up/down
+! rounding too. And that is what is effectively checked.
+!
+! If it doesn't work on your system, please check whether strtod handles
+! rounding correctly and whether your system is supported in
+! libgfortran/config/fpu*.c
+!
+! Please only add ... run { target { ! { triplets } } } if it is unfixable
+! on your target - and a note why (strtod has broken rounding support, etc.)
+!
+program main
+ use iso_fortran_env
+ implicit none
+
+ ! The following uses kinds=10 and 16 if available or
+ ! 8 and 10 - or 8 and 16 - or 4 and 8.
+ integer, parameter :: xp = real_kinds(ubound(real_kinds,dim=1)-1)
+ integer, parameter :: qp = real_kinds(ubound(real_kinds,dim=1))
+
+ real(4) :: r4p, r4m, ref4u, ref4d
+ real(8) :: r8p, r8m, ref8u, ref8d
+ real(xp) :: r10p, r10m, ref10u, ref10d
+ real(qp) :: r16p, r16m, ref16u, ref16d
+ character(len=20) :: str, round
+ logical :: rnd4, rnd8, rnd10, rnd16
+
+ ! Test for which types glibc's strtod function supports rounding
+ str = '0.01 0.01 0.01 0.01'
+ read (str, *, round='up') r4p, r8p, r10p, r16p
+ read (str, *, round='down') r4m, r8m, r10m, r16m
+ rnd4 = r4p /= r4m
+ rnd8 = r8p /= r8m
+ rnd10 = r10p /= r10m
+ rnd16 = r16p /= r16m
+! write (*, *) rnd4, rnd8, rnd10, rnd16
+
+ ref4u = 0.100000001_4
+ ref8u = 0.10000000000000001_8
+
+ if (xp == 4) then
+ ref10u = 0.100000001_xp
+ elseif (xp == 8) then
+ ref10u = 0.10000000000000001_xp
+ else ! xp == 10
+ ref10u = 0.1000000000000000000014_xp
+ end if
+
+ if (qp == 8) then
+ ref16u = 0.10000000000000001_qp
+ elseif (qp == 10) then
+ ref16u = 0.1000000000000000000014_qp
+ else ! qp == 16
+ ref16u = 0.10000000000000000000000000000000000481_qp
+ end if
+
+ ! ref*d = 9.999999...
+ ref4d = nearest (ref4u, -1.0_4)
+ ref8d = nearest (ref8u, -1.0_8)
+ ref10d = nearest (ref10u, -1.0_xp)
+ ref16d = nearest (ref16u, -1.0_qp)
+
+ round = 'up'
+ call t()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4d)) call abort()
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8d)) call abort()
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10d)) call abort()
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16d)) call abort()
+
+ round = 'down'
+ call t()
+ if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4u)) call abort()
+ if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8u)) call abort()
+ if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10u)) call abort()
+ if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16u)) call abort()
+
+ round = 'zero'
+ call t()
+ if (rnd4 .and. (r4p /= ref4d .or. r4m /= -ref4d)) call abort()
+ if (rnd8 .and. (r8p /= ref8d .or. r8m /= -ref8d)) call abort()
+ if (rnd10 .and. (r10p /= ref10d .or. r10m /= -ref10d)) call abort()
+ if (rnd16 .and. (r16p /= ref16d .or. r16m /= -ref16d)) call abort()
+
+ round = 'nearest'
+ call t()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) call abort()
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) call abort()
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) call abort()
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) call abort()
+
+! Same as nearest (but rounding towards zero if there is a tie
+! [does not apply here])
+ round = 'compatible'
+ call t()
+ if (rnd4 .and. (r4p /= ref4u .or. r4m /= -ref4u)) call abort()
+ if (rnd8 .and. (r8p /= ref8u .or. r8m /= -ref8u)) call abort()
+ if (rnd10 .and. (r10p /= ref10u .or. r10m /= -ref10u)) call abort()
+ if (rnd16 .and. (r16p /= ref16u .or. r16m /= -ref16u)) call abort()
+contains
+ subroutine t()
+! print *, round
+ str = "0.1 0.1 0.1 0.1"
+ read (str, *,round=round) r4p, r8p, r10p, r16p
+! write (*, '(*(g0:" "))') r4p, r8p, r10p, r16p
+ str = "-0.1 -0.1 -0.1 -0.1"
+ read (str, *,round=round) r4m, r8m, r10m, r16m
+! write (*, *) r4m, r8m, r10m, r16m
+ end subroutine t
+end program main
diff --git a/gcc/testsuite/gfortran.dg/same_name_1.f90 b/gcc/testsuite/gfortran.dg/same_name_1.f90
index 5cf13a93be..cbeb875e36 100644
--- a/gcc/testsuite/gfortran.dg/same_name_1.f90
+++ b/gcc/testsuite/gfortran.dg/same_name_1.f90
@@ -11,5 +11,3 @@ contains
subroutine u
end subroutine u
end module m
-
-! { dg-final { cleanup-modules "n m" } }
diff --git a/gcc/testsuite/gfortran.dg/same_name_2.f90 b/gcc/testsuite/gfortran.dg/same_name_2.f90
index c8da3e1dbb..463ac8533f 100644
--- a/gcc/testsuite/gfortran.dg/same_name_2.f90
+++ b/gcc/testsuite/gfortran.dg/same_name_2.f90
@@ -13,4 +13,3 @@ subroutine aa ! { dg-error "is already defined" }
write(*,*) 'BB'
end subroutine aa
end module
-! { dg-final { cleanup-modules "aha" } }
diff --git a/gcc/testsuite/gfortran.dg/same_type_as_1.f03 b/gcc/testsuite/gfortran.dg/same_type_as_1.f03
index 45b5d26627..5f349c7ba0 100644
--- a/gcc/testsuite/gfortran.dg/same_type_as_1.f03
+++ b/gcc/testsuite/gfortran.dg/same_type_as_1.f03
@@ -6,7 +6,7 @@
type :: t1
integer :: i
- end type
+ end type
type :: ts
sequence
@@ -18,10 +18,10 @@
integer :: i
- print *, SAME_TYPE_AS (i,x1) ! { dg-error "must be of a derived type" }
+ print *, SAME_TYPE_AS (i,x1) ! { dg-error "cannot be of type INTEGER" }
print *, SAME_TYPE_AS (x1,x2) ! { dg-error "must be of an extensible type" }
- print *, EXTENDS_TYPE_OF (i,x1) ! { dg-error "must be of a derived type" }
+ print *, EXTENDS_TYPE_OF (i,x1) ! { dg-error "cannot be of type INTEGER" }
print *, EXTENDS_TYPE_OF (x1,x2) ! { dg-error "must be of an extensible type" }
end
diff --git a/gcc/testsuite/gfortran.dg/save_1.f90 b/gcc/testsuite/gfortran.dg/save_1.f90
index 614986277a..b0035f14a7 100644
--- a/gcc/testsuite/gfortran.dg/save_1.f90
+++ b/gcc/testsuite/gfortran.dg/save_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
! { dg-options "-O2 -fno-automatic" }
subroutine foo (b)
logical b
diff --git a/gcc/testsuite/gfortran.dg/save_3.f90 b/gcc/testsuite/gfortran.dg/save_3.f90
index ab2ee52685..d2deed17e0 100644
--- a/gcc/testsuite/gfortran.dg/save_3.f90
+++ b/gcc/testsuite/gfortran.dg/save_3.f90
@@ -14,5 +14,3 @@ pure function tell_i() result (answer)
answer=i
end function tell_i
end module g95bug
-
-! { dg-final { cleanup-modules "g95bug" } }
diff --git a/gcc/testsuite/gfortran.dg/save_5.f90 b/gcc/testsuite/gfortran.dg/save_5.f90
new file mode 100644
index 0000000000..20d3b7ad88
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/save_5.f90
@@ -0,0 +1,52 @@
+! { dg-do run }
+! { dg-options "-fno-automatic" }
+!
+! PR fortran/55733
+!
+! Check that -fno-automatic makes the local variable SAVEd
+!
+
+! Scalar allocatable
+subroutine foo(i)
+ integer :: i
+ integer, allocatable :: j
+ if (i == 1) j = 42
+ if (.not. allocated (j)) call abort ()
+ if (j /= 42) call abort ()
+end
+
+! Deferred-length string scalar
+subroutine bar()
+ logical, save :: first = .true.
+ character(len=:), allocatable :: str
+ if (first) then
+ first = .false.
+ if (allocated (str)) call abort ()
+ str = "ABCDEF"
+ end if
+ if (.not. allocated (str)) call abort ()
+ if (len (str) /= 6) call abort ()
+ if (str(1:6) /= "ABCDEF") call abort ()
+end subroutine bar
+
+! Deferred-length string array
+subroutine bar_array()
+ logical, save :: first = .true.
+ character(len=:), allocatable :: str
+ if (first) then
+ first = .false.
+ if (allocated (str)) call abort ()
+ str = "ABCDEF"
+ end if
+ if (.not. allocated (str)) call abort ()
+ if (len (str) /= 6) call abort ()
+ if (str(1:6) /= "ABCDEF") call abort ()
+end subroutine bar_array
+
+call foo(1)
+call foo(2)
+call bar()
+call bar_array()
+call bar()
+call bar_array()
+end
diff --git a/gcc/testsuite/gfortran.dg/save_parameter.f90 b/gcc/testsuite/gfortran.dg/save_parameter.f90
index dd879bb869..9020ac5eac 100644
--- a/gcc/testsuite/gfortran.dg/save_parameter.f90
+++ b/gcc/testsuite/gfortran.dg/save_parameter.f90
@@ -6,5 +6,3 @@ MODULE test
CHARACTER(len=1), PARAMETER :: backslash = '\\'
PUBLIC :: backslash
END MODULE
-
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/scan_1.f90 b/gcc/testsuite/gfortran.dg/scan_1.f90
index ceaa9eb626..5ae64912e2 100644
--- a/gcc/testsuite/gfortran.dg/scan_1.f90
+++ b/gcc/testsuite/gfortran.dg/scan_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
program b
integer w
character(len=2) s, t
diff --git a/gcc/testsuite/gfortran.dg/scan_2.f90 b/gcc/testsuite/gfortran.dg/scan_2.f90
new file mode 100644
index 0000000000..1e68130c3f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/scan_2.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/54608
+!
+! Contributed by James Van Buskirk
+!
+module m1
+ implicit none
+ contains
+ subroutine s1(A)
+ logical A
+ integer iscan, iverify
+ character(7), parameter :: tf(2) = ['.FALSE.','.TRUE. ']
+
+ iscan = scan('AA','A',back=A)
+ iverify = verify('xx','A',back=A)
+ if (iscan /= 2 .or. iverify /= 2) call abort ()
+ print *, iverify, iscan
+! write(*,'(a)') 'SCAN test: A = '//trim(tf(iscan)) ! should print true
+! write(*,'(a)') 'VERIFY test: A = '//trim(tf(iverify)) ! should print true
+ end subroutine s1
+end module m1
+
+program p1
+ use m1
+ implicit none
+ logical B
+
+ call s1(.TRUE.)
+end program p1
+
+! { dg-final { scan-tree-dump-times "iscan = _gfortran_string_scan \\(2," 1 "original" } }
+! { dg-final { scan-tree-dump-times "iverify = _gfortran_string_verify \\(2," 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/select_char_1.f90 b/gcc/testsuite/gfortran.dg/select_char_1.f90
index 83c5268302..d4e1852e20 100644
--- a/gcc/testsuite/gfortran.dg/select_char_1.f90
+++ b/gcc/testsuite/gfortran.dg/select_char_1.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
integer function char_select (s)
character(len=*), intent(in) :: s
diff --git a/gcc/testsuite/gfortran.dg/select_type_10.f03 b/gcc/testsuite/gfortran.dg/select_type_10.f03
index 217d72a837..0db9af9599 100644
--- a/gcc/testsuite/gfortran.dg/select_type_10.f03
+++ b/gcc/testsuite/gfortran.dg/select_type_10.f03
@@ -30,5 +30,3 @@ contains
end function
end module
-
-! { dg-final { cleanup-modules "bar_module" } }
diff --git a/gcc/testsuite/gfortran.dg/select_type_15.f03 b/gcc/testsuite/gfortran.dg/select_type_15.f03
index 6be045c097..f408527d60 100644
--- a/gcc/testsuite/gfortran.dg/select_type_15.f03
+++ b/gcc/testsuite/gfortran.dg/select_type_15.f03
@@ -72,6 +72,3 @@ program bug20
end select
end program bug20
-
-
-! { dg-final { cleanup-modules "base_mat_mod d_base_mat_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/select_type_16.f03 b/gcc/testsuite/gfortran.dg/select_type_16.f03
index 29d19300a1..109252ee54 100644
--- a/gcc/testsuite/gfortran.dg/select_type_16.f03
+++ b/gcc/testsuite/gfortran.dg/select_type_16.f03
@@ -36,6 +36,3 @@ contains
end subroutine bug21
end module d_base_mat_mod
-
-
-! { dg-final { cleanup-modules "d_base_mat_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/select_type_18.f03 b/gcc/testsuite/gfortran.dg/select_type_18.f03
index e4bacd377e..e2a481d316 100644
--- a/gcc/testsuite/gfortran.dg/select_type_18.f03
+++ b/gcc/testsuite/gfortran.dg/select_type_18.f03
@@ -86,5 +86,3 @@ subroutine trans2(a,b)
return
end subroutine trans2
-
-! { dg-final { cleanup-modules "base_mod s_base_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/select_type_26.f03 b/gcc/testsuite/gfortran.dg/select_type_26.f03
new file mode 100644
index 0000000000..7d9c43739f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_26.f03
@@ -0,0 +1,110 @@
+! { dg-do run }
+! Tests fix for PR41600 and further SELECT TYPE functionality.
+!
+! Reported by Tobias Burnus <burnus@gcc.gnu.org>
+!
+ implicit none
+ type t0
+ integer :: j = 42
+ end type t0
+
+ type, extends(t0) :: t1
+ integer :: k = 99
+ end type t1
+
+ type t
+ integer :: i
+ class(t0), allocatable :: foo(:)
+ end type t
+
+ type t_scalar
+ integer :: i
+ class(t0), allocatable :: foo
+ end type t_scalar
+
+ type(t) :: m
+ type(t_scalar) :: m1(4)
+ integer :: n
+
+! Test the fix for PR41600 itself - first with m%foo of declared type.
+ allocate(m%foo(3), source = [(t0(n), n = 1,3)])
+ select type(bar => m%foo)
+ type is(t0)
+ if (any (bar%j .ne. [1,2,3])) call abort
+ type is(t1)
+ call abort
+ end select
+
+ deallocate(m%foo)
+ allocate(m%foo(3), source = [(t1(n, n*10), n = 4,6)])
+
+! Then with m%foo of another dynamic type.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ type is(t1)
+ if (any (bar%k .ne. [40,50,60])) call abort
+ end select
+
+! Try it with a selector array section.
+ select type(bar => m%foo(2:3))
+ type is(t0)
+ call abort
+ type is(t1)
+ if (any (bar%k .ne. [50,60])) call abort
+ end select
+
+! Try it with a selector array element.
+ select type(bar => m%foo(2))
+ type is(t0)
+ call abort
+ type is(t1)
+ if (bar%k .ne. 50) call abort
+ end select
+
+! Now try class is and a selector which is an array section of an associate name.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ class is (t1)
+ if (any (bar%j .ne. [4,5,6])) call abort
+ select type (foobar => bar(3:2:-1))
+ type is (t1)
+ if (any (foobar%k .ne. [60,50])) call abort
+ end select
+ end select
+
+! Now try class is and a selector which is an array element of an associate name.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ class is (t1)
+ if (any (bar%j .ne. [4,5,6])) call abort
+ select type (foobar => bar(2))
+ type is (t1)
+ if (foobar%k .ne. 50) call abort
+ end select
+ end select
+
+! Check class a component of an element of an array. Note that an array of such
+! objects cannot be allowed since the elements could have different dynamic types.
+! (F2003 C614)
+ do n = 1, 2
+ allocate(m1(n)%foo, source = t1(n*99, n*999))
+ end do
+ do n = 3, 4
+ allocate(m1(n)%foo, source = t0(n*99))
+ end do
+ select type(bar => m1(3)%foo)
+ type is(t0)
+ if (bar%j .ne. 297) call abort
+ type is(t1)
+ call abort
+ end select
+ select type(bar => m1(1)%foo)
+ type is(t0)
+ call abort
+ type is(t1)
+ if (bar%k .ne. 999) call abort
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/select_type_27.f03 b/gcc/testsuite/gfortran.dg/select_type_27.f03
new file mode 100644
index 0000000000..5bd3c1a357
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_27.f03
@@ -0,0 +1,115 @@
+! { dg-do run }
+! Tests fix for PR41600 and further SELECT TYPE functionality.
+! This differs from the original and select_type_26.f03 by 'm'
+! being a class object rather than a derived type.
+!
+! Reported by Tobias Burnus <burnus@gcc.gnu.org>
+!
+ implicit none
+ type t0
+ integer :: j = 42
+ end type t0
+
+ type, extends(t0) :: t1
+ integer :: k = 99
+ end type t1
+
+ type t
+ integer :: i
+ class(t0), allocatable :: foo(:)
+ end type t
+
+ type t_scalar
+ integer :: i
+ class(t0), allocatable :: foo
+ end type t_scalar
+
+ class(t), allocatable :: m
+ class(t_scalar), allocatable :: m1(:)
+ integer :: n
+
+ allocate (m)
+ allocate (m1(4))
+
+! Test the fix for PR41600 itself - first with m%foo of declared type.
+ allocate(m%foo(3), source = [(t0(n), n = 1,3)])
+ select type(bar => m%foo)
+ type is(t0)
+ if (any (bar%j .ne. [1,2,3])) call abort
+ type is(t1)
+ call abort
+ end select
+
+ deallocate(m%foo)
+ allocate(m%foo(3), source = [(t1(n, n*10), n = 4,6)])
+
+! Then with m%foo of another dynamic type.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ type is(t1)
+ if (any (bar%k .ne. [40,50,60])) call abort
+ end select
+
+! Try it with a selector array section.
+ select type(bar => m%foo(2:3))
+ type is(t0)
+ call abort
+ type is(t1)
+ if (any (bar%k .ne. [50,60])) call abort
+ end select
+
+! Try it with a selector array element.
+ select type(bar => m%foo(2))
+ type is(t0)
+ call abort
+ type is(t1)
+ if (bar%k .ne. 50) call abort
+ end select
+
+! Now try class is and a selector which is an array section of an associate name.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ class is (t1)
+ if (any (bar%j .ne. [4,5,6])) call abort
+ select type (foobar => bar(3:2:-1))
+ type is (t1)
+ if (any (foobar%k .ne. [60,50])) call abort
+ end select
+ end select
+
+! Now try class is and a selector which is an array element of an associate name.
+ select type(bar => m%foo)
+ type is(t0)
+ call abort
+ class is (t1)
+ if (any (bar%j .ne. [4,5,6])) call abort
+ select type (foobar => bar(2))
+ type is (t1)
+ if (foobar%k .ne. 50) call abort
+ end select
+ end select
+
+! Check class a component of an element of an array. Note that an array of such
+! objects cannot be allowed since the elements could have different dynamic types.
+! (F2003 C614)
+ do n = 1, 2
+ allocate(m1(n)%foo, source = t1(n*99, n*999))
+ end do
+ do n = 3, 4
+ allocate(m1(n)%foo, source = t0(n*99))
+ end do
+ select type(bar => m1(3)%foo)
+ type is(t0)
+ if (bar%j .ne. 297) call abort
+ type is(t1)
+ call abort
+ end select
+ select type(bar => m1(1)%foo)
+ type is(t0)
+ call abort
+ type is(t1)
+ if (bar%k .ne. 999) call abort
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/select_type_28.f03 b/gcc/testsuite/gfortran.dg/select_type_28.f03
new file mode 100644
index 0000000000..9cab721449
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_28.f03
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! Fix for PR53191
+!
+ implicit none
+ type t0
+ integer :: j = 42
+ end type t0
+ type, extends(t0) :: t1
+ integer :: k = 99
+ end type t1
+ type t
+ integer :: i
+ class(t0), allocatable :: foo
+ end type t
+ type(t) :: m(4)
+ integer :: n
+
+ do n = 1, 2
+ allocate(m(n)%foo, source = t0(n*99))
+ end do
+ do n = 3, 4
+ allocate(m(n)%foo, source = t1(n*99, n*999))
+ end do
+
+! An array of objects with ultimate class components cannot be a selector
+! since each element could have a different dynamic type. (F2003 C614)
+
+ select type(bar => m%foo) ! { dg-error "part reference with nonzero rank" }
+ type is(t0)
+ if (any (bar%j .ne. [99, 198, 297, 396])) call abort
+ type is(t1)
+ call abort
+ end select
+
+end
diff --git a/gcc/testsuite/gfortran.dg/select_type_30.f03 b/gcc/testsuite/gfortran.dg/select_type_30.f03
new file mode 100644
index 0000000000..f467b83429
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_30.f03
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR 54881: [4.8 Regression] [OOP] ICE in fold_convert_loc, at fold-const.c:2016
+!
+! Contributed by Richard L Lozes <richard@lozestech.com>
+
+ implicit none
+
+ type treeNode
+ end type
+
+ class(treeNode), pointer :: theNode
+ logical :: lstatus
+
+ select type( theNode )
+ type is (treeNode)
+ call DestroyNode (theNode, lstatus )
+ class is (treeNode)
+ call DestroyNode (theNode, lstatus )
+ end select
+
+contains
+
+ subroutine DestroyNode( theNode, lstatus )
+ type(treeNode), pointer :: theNode
+ logical, intent(out) :: lstatus
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/select_type_31.f03 b/gcc/testsuite/gfortran.dg/select_type_31.f03
new file mode 100644
index 0000000000..a285812195
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_31.f03
@@ -0,0 +1,52 @@
+! { dg-do compile }
+! { dg-options "-fcoarray=single" }
+! Test the fix for PR55172.
+!
+! Contributed by Arjen Markus <arjen.markus@deltares.nl>
+!
+module gn
+ type :: ncb
+ end type ncb
+ type, public :: tn
+ class(ncb), allocatable, dimension(:) :: cb
+ end type tn
+contains
+ integer function name(self)
+ implicit none
+ class (tn), intent(in) :: self
+ select type (component => self%cb(i)) ! { dg-error "has no IMPLICIT type" }
+ end select
+ end function name
+end module gn
+
+! Further issues, raised by Tobias Burnus in the course of fixing the PR
+
+module gn1
+ type :: ncb1
+ end type ncb1
+ type, public :: tn1
+ class(ncb1), allocatable, dimension(:) :: cb
+ end type tn1
+contains
+ integer function name(self)
+ implicit none
+ class (tn1), intent(in) :: self
+ select type (component => self%cb([4,7+1])) ! { dg-error "needs a temporary" }
+ end select
+ end function name
+end module gn1
+
+module gn2
+ type :: ncb2
+ end type ncb2
+ type, public :: tn2
+ class(ncb2), allocatable :: cb[:]
+ end type tn2
+contains
+ integer function name(self)
+ implicit none
+ class (tn2), intent(in) :: self
+ select type (component => self%cb[4]) ! { dg-error "must not be coindexed" }
+ end select
+ end function name
+end module gn2
diff --git a/gcc/testsuite/gfortran.dg/select_type_32.f90 b/gcc/testsuite/gfortran.dg/select_type_32.f90
new file mode 100644
index 0000000000..5e366398ac
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_32.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+!
+! PR fortran/55763
+!
+! Contributed by Harald Anlauf
+!
+
+module gfcbug122
+ implicit none
+ type myobj
+ class(*), allocatable :: x
+ contains
+ procedure :: print
+ end type myobj
+contains
+ subroutine print(this)
+ class(myobj) :: this
+ select type (this)
+ type is (integer) ! { dg-error "Unexpected intrinsic type 'INTEGER'" }
+ type is (real) ! { dg-error "Unexpected intrinsic type 'REAL'" }
+ type is (complex) ! { dg-error "Unexpected intrinsic type 'COMPLEX'" }
+ type is (character(len=*)) ! { dg-error "Unexpected intrinsic type 'CHARACTER'" }
+ end select
+ end subroutine print
+end module gfcbug122
diff --git a/gcc/testsuite/gfortran.dg/select_type_33.f03 b/gcc/testsuite/gfortran.dg/select_type_33.f03
new file mode 100644
index 0000000000..3ba27e0103
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_33.f03
@@ -0,0 +1,43 @@
+! { dg-do compile }
+!
+! PR fortran/56816
+! The unfinished SELECT TYPE statement below was leading to an ICE because
+! at the time the statement was rejected, the compiler tried to free
+! some symbols that had already been freed with the SELECT TYPE
+! namespace.
+!
+! Original testcase from Dominique Pelletier <dominique.pelletier@polymtl.ca>
+!
+module any_list_module
+ implicit none
+
+ private
+ public :: anylist, anyitem
+
+ type anylist
+ end type
+
+ type anyitem
+ class(*), allocatable :: value
+ end type
+end module any_list_module
+
+
+module my_item_list_module
+
+ use any_list_module
+ implicit none
+
+ type, extends (anyitem) :: myitem
+ end type myitem
+
+contains
+
+ subroutine myprint (this)
+ class (myitem) :: this
+
+ select type ( v => this % value ! { dg-error "parse error in SELECT TYPE" }
+ end select ! { dg-error "Expecting END SUBROUTINE" }
+ end subroutine myprint
+
+end module my_item_list_module
diff --git a/gcc/testsuite/gfortran.dg/select_type_34.f90 b/gcc/testsuite/gfortran.dg/select_type_34.f90
new file mode 100644
index 0000000000..e75a7abd56
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/select_type_34.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR 58185: [4.8/4.9 Regression] [OOP] ICE when selector in SELECT TYPE is non-polymorphic
+!
+! Contributed by John <jwmwalrus@gmail.com>
+
+ integer :: array
+ select type (a => array) ! { dg-error "Selector shall be polymorphic" }
+ end select
+end
diff --git a/gcc/testsuite/gfortran.dg/select_type_4.f90 b/gcc/testsuite/gfortran.dg/select_type_4.f90
index 95488e5f72..7e12d93544 100644
--- a/gcc/testsuite/gfortran.dg/select_type_4.f90
+++ b/gcc/testsuite/gfortran.dg/select_type_4.f90
@@ -172,4 +172,3 @@ program main
call destroy_list(list)
stop
end program main
-! { dg-final { cleanup-modules "poly_list" } }
diff --git a/gcc/testsuite/gfortran.dg/sequence_types_1.f90 b/gcc/testsuite/gfortran.dg/sequence_types_1.f90
index 62cd8fd688..6c0bb247c8 100644
--- a/gcc/testsuite/gfortran.dg/sequence_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/sequence_types_1.f90
@@ -77,4 +77,3 @@ module data_types
Integer(kindInt), dimension(:), pointer :: subset
end type GroupDefLL
end module data_types
-! { dg-final { cleanup-modules "data_types" } }
diff --git a/gcc/testsuite/gfortran.dg/shape_4.f90 b/gcc/testsuite/gfortran.dg/shape_4.f90
index 9275b11b8f..31f3d78a4a 100644
--- a/gcc/testsuite/gfortran.dg/shape_4.f90
+++ b/gcc/testsuite/gfortran.dg/shape_4.f90
@@ -1,3 +1,4 @@
+! { dg-do run }
! PR 35001 - we need to return 0 for the shapes of
! negative extents. Test case adapted from Tobias Burnus.
program main
diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90
index c632c5b1b1..2c7acbe1ba 100644
--- a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90
+++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_1.f90
@@ -30,5 +30,3 @@ contains
call bar(self, z)
end subroutine
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90
index 3bd3164995..042666016f 100644
--- a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90
+++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_2.f90
@@ -30,5 +30,3 @@ contains
call bar_(self, z)
end subroutine
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90 b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90
index 21bdceead9..5f1391edb6 100644
--- a/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90
+++ b/gcc/testsuite/gfortran.dg/sibling_dummy_procedure_3.f90
@@ -16,5 +16,3 @@ module ice
end subroutine bar
end subroutine foo
end module
-
-! { dg-final { cleanup-modules "ice" } }
diff --git a/gcc/testsuite/gfortran.dg/simplify_argN_1.f90 b/gcc/testsuite/gfortran.dg/simplify_argN_1.f90
index 933b1f32af..6cc64715c6 100644
--- a/gcc/testsuite/gfortran.dg/simplify_argN_1.f90
+++ b/gcc/testsuite/gfortran.dg/simplify_argN_1.f90
@@ -23,4 +23,3 @@ END MODULE MODS
if (any (ISHFTC(X, 3, 5) /= D)) call abort ()
if (any (ISHFTC(X, Y, 5) /= E)) call abort ()
end
-! { dg-final { cleanup-modules "mods" } }
diff --git a/gcc/testsuite/gfortran.dg/size_kind_2.f90 b/gcc/testsuite/gfortran.dg/size_kind_2.f90
new file mode 100644
index 0000000000..002221c5b3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/size_kind_2.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/57142
+!
+integer :: B(huge(1)+3_8,2_8)
+integer(8) :: var1(2), var2, var3
+
+var1 = shape(B,kind=8)
+var2 = size(B,kind=8)
+var3 = size(B,dim=1,kind=8)
+end
+
+! { dg-final { scan-tree-dump "static integer.kind=8. A..\\\[2\\\] = \\\{2147483650, 2\\\};" "original" } }
+! { dg-final { scan-tree-dump "var2 = 4294967300;" "original" } }
+! { dg-final { scan-tree-dump "var3 = 2147483650;" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/size_kind_3.f90 b/gcc/testsuite/gfortran.dg/size_kind_3.f90
new file mode 100644
index 0000000000..ae57bd9a15
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/size_kind_3.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+!
+! PR fortran/57142
+!
+integer :: B(huge(1)+3_8,2_8)
+integer(8) :: var1(2), var2, var3
+
+var1 = shape(B) ! { dg-error "SHAPE overflows its kind" }
+var2 = size(B) ! { dg-error "SIZE overflows its kind" }
+var3 = size(B,dim=1) ! { dg-error "SIZE overflows its kind" }
+end
diff --git a/gcc/testsuite/gfortran.dg/sizeof_2.f90 b/gcc/testsuite/gfortran.dg/sizeof_2.f90
new file mode 100644
index 0000000000..5f19288280
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/sizeof_2.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR fortran/56650
+! PR fortran/36437
+!
+subroutine foo(x, y)
+ use iso_c_binding
+ type(*) :: x
+ integer :: y(*)
+ integer(8) :: ii
+ procedure() :: proc
+
+ ii = sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic sizeof" }
+ ii = c_sizeof (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic c_sizeof" }
+ ii = storage_size (x) ! { dg-error "Assumed-type argument at .1. is not permitted as actual argument to the intrinsic storage_size" }
+
+ ii = sizeof (y) ! { dg-error "shall not be an assumed-size array" }
+ ii = c_sizeof (y) ! { dg-error "shall not be an assumed-size array" }
+ ii = storage_size (y) ! okay, element-size is known
+
+ ii = sizeof (proc) ! { dg-error "shall not be a procedure" }
+ ii = c_sizeof (proc) ! { dg-error "Procedure unexpected as argument" }
+ ii = storage_size (proc) ! { dg-error "shall not be a procedure" }
+end
diff --git a/gcc/testsuite/gfortran.dg/sizeof_3.f90 b/gcc/testsuite/gfortran.dg/sizeof_3.f90
new file mode 100644
index 0000000000..d6d1fc4095
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/sizeof_3.f90
@@ -0,0 +1,45 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56650
+! PR fortran/36437
+!
+module m
+ use iso_c_binding, only: c_sizeof, c_int
+ implicit none
+
+ integer(c_int), bind(C) :: MPI_Status_C_obj
+ integer,parameter :: MPI_STATUS_SIZE = c_sizeof(MPI_Status_C_obj)
+end module m
+
+module m2
+ use iso_c_binding, only: c_sizeof, c_int
+ implicit none
+
+ integer(c_int), bind(C) :: MPI_Status_C_obj2
+ integer,parameter :: MPI_STATUS_SIZE2 &
+ = c_sizeof(MPI_Status_C_obj2)*8/bit_size(0)
+end module m2
+
+subroutine test()
+ use m
+ use m2
+ integer :: m1test, m2test
+ m1test = MPI_STATUS_SIZE
+ m2test = MPI_STATUS_SIZE2
+end subroutine test
+
+type t
+ character(len=20) :: str
+end type t
+type(t):: x(5)
+integer :: iii, jjj
+iii = sizeof (x) ! 5*20 (whole size in bytes)
+jjj = storage_size (x) ! 8*20 (element size in bits)
+end
+
+! { dg-final { scan-tree-dump-times "m1test = 4;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "m2test = 1;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "iii = 100;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "jjj = 160;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/sizeof_proc.f90 b/gcc/testsuite/gfortran.dg/sizeof_proc.f90
index b4a2d73200..0a63537888 100644
--- a/gcc/testsuite/gfortran.dg/sizeof_proc.f90
+++ b/gcc/testsuite/gfortran.dg/sizeof_proc.f90
@@ -9,11 +9,11 @@ procedure(real) :: proc
procedure(real), pointer :: pp
pp => sin
-print *,sizeof(proc) ! { dg-error "may not be a procedure" }
-print *,sizeof(pp) ! { dg-error "may not be a procedure" }
+print *,sizeof(proc) ! { dg-error "shall not be a procedure" }
+print *,sizeof(pp) ! { dg-error "shall not be a procedure" }
print *,sizeof(pp(0.))
-print *,sizeof(sub) ! { dg-error "may not be a procedure" }
-print *,sizeof(func) ! { dg-error "may not be a procedure" }
+print *,sizeof(sub) ! { dg-error "shall not be a procedure" }
+print *,sizeof(func) ! { dg-error "shall not be a procedure" }
print *,sizeof(func())
contains
diff --git a/gcc/testsuite/gfortran.dg/spec_expr_4.f90 b/gcc/testsuite/gfortran.dg/spec_expr_4.f90
index cf655b920b..7b2d5b6be1 100644
--- a/gcc/testsuite/gfortran.dg/spec_expr_4.f90
+++ b/gcc/testsuite/gfortran.dg/spec_expr_4.f90
@@ -31,4 +31,3 @@ end module global_numbering
e%numbering => ent
print *, element_local_coords (e)
end
-! { dg-final { cleanup-modules "elements global_numbering" } }
diff --git a/gcc/testsuite/gfortran.dg/spec_expr_6.f90 b/gcc/testsuite/gfortran.dg/spec_expr_6.f90
index 3b5b973ecd..2d15b31a1e 100644
--- a/gcc/testsuite/gfortran.dg/spec_expr_6.f90
+++ b/gcc/testsuite/gfortran.dg/spec_expr_6.f90
@@ -48,5 +48,3 @@ contains
p1_type = 42
end function p1_type
end module m2
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90 b/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
index b830b5dfc7..1e4bb08b32 100644
--- a/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
+++ b/gcc/testsuite/gfortran.dg/specification_type_resolution_1.f90
@@ -28,4 +28,3 @@ end module test
print *, elements_uncommon_with (z)
print *, n_elements_uncommon_with_ (z)
end
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/specification_type_resolution_2.f90 b/gcc/testsuite/gfortran.dg/specification_type_resolution_2.f90
index 0fcb7bd873..f87cd11b0b 100644
--- a/gcc/testsuite/gfortran.dg/specification_type_resolution_2.f90
+++ b/gcc/testsuite/gfortran.dg/specification_type_resolution_2.f90
@@ -21,5 +21,3 @@ contains
end function bar
end module gfcbug50
-
-! { dg-final { cleanup-modules "gfcbug50" } }
diff --git a/gcc/testsuite/gfortran.dg/spread_bounds_1.f90 b/gcc/testsuite/gfortran.dg/spread_bounds_1.f90
index 7e5bc651ff..53e08b1c65 100644
--- a/gcc/testsuite/gfortran.dg/spread_bounds_1.f90
+++ b/gcc/testsuite/gfortran.dg/spread_bounds_1.f90
@@ -8,5 +8,5 @@ program main
times = 2
target = spread(source,2,times)
end program main
-! { dg-output "Fortran runtime error: Incorrect extent in return value of SPREAD intrinsic in dimension 2: is 3, should be 2"
+! { dg-output "Fortran runtime error: Incorrect extent in return value of SPREAD intrinsic in dimension 2: is 3, should be 2" }
diff --git a/gcc/testsuite/gfortran.dg/stfunc_5.f90 b/gcc/testsuite/gfortran.dg/stfunc_5.f90
index 09b6da338f..49170208af 100644
--- a/gcc/testsuite/gfortran.dg/stfunc_5.f90
+++ b/gcc/testsuite/gfortran.dg/stfunc_5.f90
@@ -6,6 +6,3 @@
MODULE stmt
f(x) = x**2 ! { dg-error "Unexpected STATEMENT FUNCTION" }
END MODULE
-
-! { dg-final { cleanup-modules "stmt" } }
-
diff --git a/gcc/testsuite/gfortran.dg/stfunc_8.f90 b/gcc/testsuite/gfortran.dg/stfunc_8.f90
new file mode 100644
index 0000000000..f13cacaeb8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/stfunc_8.f90
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "" }
+!
+! PR fortran/50405
+!
+! Submitted by zeccav@gmail.com
+!
+ f(f) = 0 ! { dg-error "Self-referential argument" }
+ end
diff --git a/gcc/testsuite/gfortran.dg/storage_size_2.f08 b/gcc/testsuite/gfortran.dg/storage_size_2.f08
index 82913c88b1..ba8bd229cd 100644
--- a/gcc/testsuite/gfortran.dg/storage_size_2.f08
+++ b/gcc/testsuite/gfortran.dg/storage_size_2.f08
@@ -14,10 +14,10 @@ integer(4) :: i1
integer(c_int) :: i2
type(t) :: x
-print *,c_sizeof(i1) ! { dg-error "must be an interoperable data entity" }
+print *,c_sizeof(i1)
print *,c_sizeof(i2)
print *,c_sizeof(x)
-print *, c_sizeof(ran()) ! { dg-error "must be an interoperable data entity" }
+print *, c_sizeof(ran())
print *,storage_size(1.0,4)
print *,storage_size(1.0,3.2) ! { dg-error "must be INTEGER" }
diff --git a/gcc/testsuite/gfortran.dg/storage_size_4.f90 b/gcc/testsuite/gfortran.dg/storage_size_4.f90
new file mode 100644
index 0000000000..bcfd5c3e4f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/storage_size_4.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/57553
+!
+! Ensure that there is no ICE and that compile-time simplication works.
+!
+ use iso_fortran_env
+ implicit none
+ integer, parameter :: ESize = storage_size('a')
+ integer, parameter :: ESize2 = storage_size('aa')
+ if ( ESize/CHARACTER_STORAGE_SIZE /= 1) call abort()
+ if ( ESize2/CHARACTER_STORAGE_SIZE /= 2) call abort()
+end
+
+subroutine S ( A )
+ character(len=*), intent(in) :: A
+ integer :: ESize = 4
+ esize = ( storage_size(a) + 7 ) / 8
+end
+
+! { dg-final { scan-tree-dump-not "abort" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/str_comp_optimize_1.f90 b/gcc/testsuite/gfortran.dg/str_comp_optimize_1.f90
new file mode 100644
index 0000000000..84287b475a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/str_comp_optimize_1.f90
@@ -0,0 +1,22 @@
+! { dg-do compile }
+! { dg-options "-ffrontend-optimize" }
+!
+! PR fortran/60341
+! An unguarded union access was wrongly enabling a frontend optimization on a
+! string comparison, leading to an ICE.
+!
+! Original testcase from Steve Chapel <steve.chapel@a2pg.com>.
+! Reduced by Steven G. Kargl <kargl@gcc.gnu.org>.
+!
+
+ subroutine modelg(ncm)
+ implicit none
+ integer, parameter :: pc = 30, pm = pc - 1
+ integer i
+ character*4 catt(pm,2)
+ integer ncm,iatt(pm,pc)
+ do i=1,ncm
+ if (catt(i,1)//catt(i,2).eq.'central') exit
+ end do
+ iatt(i,4)=1
+ end
diff --git a/gcc/testsuite/gfortran.dg/string_assign_1.f90 b/gcc/testsuite/gfortran.dg/string_assign_1.f90
new file mode 100644
index 0000000000..8a520ff1dd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/string_assign_1.f90
@@ -0,0 +1,11 @@
+! { dg-do compile }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR 52861 - optimize this to c = '' so that there is
+! no memcpy in the generated code.
+program main
+ character (len=20) :: c
+ c = ' '
+ print *,c
+end program main
+! { dg-final { scan-tree-dump-times "memcpy" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/string_assign_2.f90 b/gcc/testsuite/gfortran.dg/string_assign_2.f90
new file mode 100644
index 0000000000..f3cfa45e0d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/string_assign_2.f90
@@ -0,0 +1,9 @@
+! { dg-do run }
+! { dg-options "-ffrontend-optimize" }
+program main
+ character (len=:), allocatable :: a
+ a = 'a'
+ if (len(a) /= 1) call abort
+ a = ' '
+ if (len(a) /= 2) call abort
+end program main
diff --git a/gcc/testsuite/gfortran.dg/string_compare_2.f90 b/gcc/testsuite/gfortran.dg/string_compare_2.f90
index 966ed554ab..dc68bef2ad 100644
--- a/gcc/testsuite/gfortran.dg/string_compare_2.f90
+++ b/gcc/testsuite/gfortran.dg/string_compare_2.f90
@@ -35,5 +35,3 @@ program pack_bug
end if
end do
end
-
-! { dg-final { cleanup-modules "xparams" } }
diff --git a/gcc/testsuite/gfortran.dg/string_compare_4.f90 b/gcc/testsuite/gfortran.dg/string_compare_4.f90
new file mode 100644
index 0000000000..64cbf93bfd
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/string_compare_4.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+! { dg-options "-ffrontend-optimize -fdump-tree-original" }
+! PR fortran/52537 - optimize comparisons with empty strings
+program main
+ implicit none
+ character(len=10) :: a
+ character(len=30) :: line
+ character(len=4,kind=4) :: c4
+ line = 'x'
+ read (unit=line,fmt='(A)') a
+ c4 = 4_'foo'
+ if (c4 == 4_' ') print *,"foobar"
+ if (trim(a) == '') print *,"empty"
+ call foo(a)
+ if (trim(a) == ' ') print *,"empty"
+contains
+ subroutine foo(b)
+ character(*) :: b
+ if (b /= ' ') print *,"full"
+ end subroutine foo
+end program main
+! { dg-final { scan-tree-dump-times "_gfortran_string_len_trim" 4 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/string_length_2.f90 b/gcc/testsuite/gfortran.dg/string_length_2.f90
new file mode 100644
index 0000000000..8ea76bfe3b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/string_length_2.f90
@@ -0,0 +1,32 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+! Test that all string length calculations are
+! optimized away.
+program main
+ character (len=999) :: c
+ character (len=5) :: unit
+ unit = ' '
+ read (unit=unit,fmt='(I5)') i ! Hide from optimizers
+ j = 7
+ c = '123456789'
+ if (len(c( 3 : 5 )) /= 3) call abort ! Case 1
+ if (len(c( i*(i+1) : (i+1)*i + 2 )) /= 3) call abort ! Case 2
+ if (len(c( i*(i+1) : 2 + (i+1)*i )) /= 3) call abort ! Case 3
+ if (len(c( i*(i+1) + 2 : (i+1)*i + 3 )) /= 2) call abort ! Case 4
+ if (len(c( 2 + i*(i+1) : (i+1)*i + 3 )) /= 2) call abort ! Case 5
+ if (len(c( i*(i+1) + 2 : 3 + (i+1)*i )) /= 2) call abort ! Case 6
+ if (len(c( 2 + i*(i+1) : 3 + (i+1)*i )) /= 2) call abort ! Case 7
+ if (len(c( i*(i+1) - 1 : (i+1)*i + 1 )) /= 3) call abort ! Case 8
+ if (len(c( i*(i+1) - 1 : 1 + (i+1)*i )) /= 3) call abort ! Case 9
+ if (len(c( i*(i+1) : (i+1)*i -(-1))) /= 2) call abort ! Case 10
+ if (len(c( i*(i+1) +(-2): (i+1)*i - 1 )) /= 2) call abort ! Case 11
+ if (len(c( i*(i+1) + 2 : (i+1)*i -(-4))) /= 3) call abort ! Case 12
+ if (len(c( i*(i+1) - 3 : (i+1)*i - 1 )) /= 3) call abort ! Case 13
+ if (len(c(13 - i*(i+1) :15 - (i+1)*i )) /= 3) call abort ! Case 14
+ if (len(c( i*(i+1) +(-1): (i+1)*i )) /= 2) call abort ! Case 15
+ if (len(c(-1 + i*(i+1) : (i+1)*i )) /= 2) call abort ! Case 16
+ if (len(c( i*(i+1) - 2 : (i+1)*i )) /= 3) call abort ! Case 17
+ if (len(c( (i-2)*(i-3) : (i-3)*(i-2) )) /= 1) call abort ! Case 18
+end program main
+! { dg-final { scan-tree-dump-times "_abort" 0 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/structure_constructor_10.f90 b/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
index eed7fa3a9d..3231571244 100644
--- a/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
+++ b/gcc/testsuite/gfortran.dg/structure_constructor_10.f90
@@ -23,6 +23,3 @@ SUBROUTINE cdf_beta()
IMPLICIT NONE
CALL check_complements(the_beta%name)
END SUBROUTINE cdf_beta
-
-! { dg-final { cleanup-modules "cdf_aux_mod" } }
-
diff --git a/gcc/testsuite/gfortran.dg/structure_constructor_11.f90 b/gcc/testsuite/gfortran.dg/structure_constructor_11.f90
new file mode 100644
index 0000000000..b1eb3cf520
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/structure_constructor_11.f90
@@ -0,0 +1,96 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/54603
+!
+! Contributed by Kacper Kowalik
+!
+module foo
+ implicit none
+
+ interface
+ subroutine cg_ext
+ implicit none
+ end subroutine cg_ext
+ end interface
+
+ type :: ext_ptr
+ procedure(cg_ext), nopass, pointer :: init
+ procedure(cg_ext), nopass, pointer :: cleanup
+ end type ext_ptr
+
+ type :: ext_ptr_array
+ type(ext_ptr) :: a
+ contains
+ procedure :: epa_init
+ end type ext_ptr_array
+
+ type(ext_ptr_array) :: bar
+
+contains
+ subroutine epa_init(this, init, cleanup)
+ implicit none
+ class(ext_ptr_array), intent(inout) :: this
+ procedure(cg_ext), pointer, intent(in) :: init
+ procedure(cg_ext), pointer, intent(in) :: cleanup
+
+ this%a = ext_ptr(null(), null()) ! Wrong code
+ this%a = ext_ptr(init, cleanup) ! Wrong code
+
+ this%a%init => init ! OK
+ this%a%cleanup => cleanup ! OK
+
+ this%a = ext_ptr(this%a%init,this%a%cleanup) ! ICE in fold_convert_loc
+ end subroutine epa_init
+
+end module foo
+
+program ala
+ use foo, only: bar
+ implicit none
+ integer :: count1, count2
+ count1 = 0
+ count2 = 0
+
+ call setme
+ call bar%a%cleanup()
+ call bar%a%init()
+
+ ! They should be called once
+ if (count1 /= 23 .or. count2 /= 42) call abort ()
+
+contains
+
+ subroutine dummy1
+ implicit none
+ !print *, 'dummy1'
+ count1 = 23
+ end subroutine dummy1
+
+ subroutine dummy2
+ implicit none
+ !print *, 'dummy2'
+ count2 = 42
+ end subroutine dummy2
+
+ subroutine setme
+ use foo, only: bar, cg_ext
+ implicit none
+ procedure(cg_ext), pointer :: a_init, a_clean
+
+ a_init => dummy1
+ a_clean => dummy2
+ call bar%epa_init(a_init, a_clean)
+ end subroutine setme
+
+end program ala
+
+! { dg-final { scan-tree-dump-times "ext_ptr.\[0-9\]+.init = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "ext_ptr.\[0-9\]+.cleanup = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "ext_ptr.1.init = \\*init;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "ext_ptr.1.cleanup = \\*cleanup;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "this->_data->a.init = \\*init;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "this->_data->a.cleanup = \\*cleanup;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "ext_ptr.\[0-9\]+.init = this->_data->a.init;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "ext_ptr.\[0-9\]+.cleanup = this->_data->a.cleanup;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/structure_constructor_8.f03 b/gcc/testsuite/gfortran.dg/structure_constructor_8.f03
index b86d0eccca..1c0ecd1c1a 100644
--- a/gcc/testsuite/gfortran.dg/structure_constructor_8.f03
+++ b/gcc/testsuite/gfortran.dg/structure_constructor_8.f03
@@ -58,4 +58,3 @@ PROGRAM test
WRITE (*,*) ispriv_t (5) ! { dg-error "has no IMPLICIT type" }
END PROGRAM test
-! { dg-final { cleanup-modules "privmod" } }
diff --git a/gcc/testsuite/gfortran.dg/substr_1.f90 b/gcc/testsuite/gfortran.dg/substr_1.f90
index a811d9688c..98164304b0 100644
--- a/gcc/testsuite/gfortran.dg/substr_1.f90
+++ b/gcc/testsuite/gfortran.dg/substr_1.f90
@@ -10,5 +10,3 @@ use m
character(4) :: b
b = a
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/substring_equivalence.f90 b/gcc/testsuite/gfortran.dg/substring_equivalence.f90
index 1d0c0cd842..1a01024bc1 100644
--- a/gcc/testsuite/gfortran.dg/substring_equivalence.f90
+++ b/gcc/testsuite/gfortran.dg/substring_equivalence.f90
@@ -6,5 +6,3 @@ module FLAGS
character :: at, dev
equivalence ( encodings(1:1),at ), ( encodings(2:2),dev)
end module FLAGS
-
-! { dg-final { cleanup-modules "flags" } }
diff --git a/gcc/testsuite/gfortran.dg/tab_continuation.f b/gcc/testsuite/gfortran.dg/tab_continuation.f
index 448cd20864..65cb7b4a31 100644
--- a/gcc/testsuite/gfortran.dg/tab_continuation.f
+++ b/gcc/testsuite/gfortran.dg/tab_continuation.f
@@ -9,7 +9,7 @@
INTEGER NAXIS(0:MAPMAX,LUMIN:LUMAX),NAXIS1(0:MAPMAX,LUMIN:LUMAX),
1NAXIS2(0:MAPMAX,LUMIN:LUMAX),NAXIS3(0:MAPMAX,LUMIN:LUMAX)
end
-! { dg-warning "Nonconforming tab character in column 1 of line 8" "Nonconforming tab" {target "*-*-*"} 0 }
-! { dg-warning "Nonconforming tab character in column 1 of line 9" "Nonconforming tab" {target "*-*-*"} 0 }
-! { dg-warning "Nonconforming tab character in column 1 of line 10" "Nonconforming tab" {target "*-*-*"} 0 }
-! { dg-warning "Nonconforming tab character in column 1 of line 11" "Nonconforming tab" {target "*-*-*"} 0 }
+! { dg-warning "Nonconforming tab character in column 1 of line 8" "Nonconforming tab" { target *-*-* } 0 }
+! { dg-warning "Nonconforming tab character in column 1 of line 9" "Nonconforming tab" { target *-*-* } 0 }
+! { dg-warning "Nonconforming tab character in column 1 of line 10" "Nonconforming tab" { target *-*-* } 0 }
+! { dg-warning "Nonconforming tab character in column 1 of line 11" "Nonconforming tab" { target *-*-* } 0 }
diff --git a/gcc/testsuite/gfortran.dg/test_com_block.f90 b/gcc/testsuite/gfortran.dg/test_com_block.f90
index 37175d2653..df3f643e72 100644
--- a/gcc/testsuite/gfortran.dg/test_com_block.f90
+++ b/gcc/testsuite/gfortran.dg/test_com_block.f90
@@ -30,5 +30,3 @@ program testComBlock
call abort()
endif
end program testComBlock
-
-! { dg-final { cleanup-modules "nonf03comblock" } }
diff --git a/gcc/testsuite/gfortran.dg/test_common_binding_labels.f03 b/gcc/testsuite/gfortran.dg/test_common_binding_labels.f03
index ea9a59a35e..8936fa87a8 100644
--- a/gcc/testsuite/gfortran.dg/test_common_binding_labels.f03
+++ b/gcc/testsuite/gfortran.dg/test_common_binding_labels.f03
@@ -1,9 +1,11 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
module x
use, intrinsic :: iso_c_binding, only: c_double
implicit none
- common /mycom/ r, s ! { dg-error "does not match" }
+ common /mycom/ r, s ! { dg-error "In Fortran 2003 COMMON 'mycom' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: my_common_block vs .blank.|In Fortran 2003 COMMON 'mycom' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: my_common_block_2 vs .blank." }
real(c_double) :: r
real(c_double) :: s
bind(c, name="my_common_block") :: /mycom/
@@ -13,12 +15,12 @@ module y
use, intrinsic :: iso_c_binding, only: c_double, c_int
implicit none
- common /mycom/ r, s
+ common /mycom/ r, s ! { dg-error "In Fortran 2003 COMMON 'mycom' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: my_common_block vs .blank." }
real(c_double) :: r
real(c_double) :: s
bind(c, name="my_common_block") :: /mycom/
- common /com2/ i ! { dg-error "does not match" }
+ common /com2/ i ! { dg-error " In Fortran 2003 COMMON 'com2' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: mycom2 vs .blank." }
integer(c_int) :: i
bind(c, name="") /com2/
end module y
@@ -27,16 +29,14 @@ module z
use, intrinsic :: iso_c_binding, only: c_double, c_int
implicit none
- common /mycom/ r, s ! { dg-error "does not match" }
+ common /mycom/ r, s ! { dg-error "In Fortran 2003 COMMON 'mycom' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: my_common_block_2 vs .blank." }
real(c_double) :: r
real(c_double) :: s
! this next line is an error; if a common block is bind(c), the binding label
! for it must match across all scoping units that declare it.
bind(c, name="my_common_block_2") :: /mycom/
- common /com2/ i ! { dg-error "does not match" }
+ common /com2/ i ! { dg-error " In Fortran 2003 COMMON 'com2' block at .1. is a global identifier and must thus have the same binding name as the same-named COMMON block at .2.: mycom2 vs .blank." }
integer(c_int) :: i
bind(c, name="mycom2") /com2/
end module z
-
-! { dg-final { cleanup-modules "x y" } }
diff --git a/gcc/testsuite/gfortran.dg/test_common_binding_labels_2.f03 b/gcc/testsuite/gfortran.dg/test_common_binding_labels_2.f03
index d14c9b1168..ad654b35db 100644
--- a/gcc/testsuite/gfortran.dg/test_common_binding_labels_2.f03
+++ b/gcc/testsuite/gfortran.dg/test_common_binding_labels_2.f03
@@ -12,4 +12,4 @@ module test_common_binding_labels_2
integer(c_int) :: i
bind(c, name="") /com2/
end module test_common_binding_labels_2
-
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/test_common_binding_labels_2_main.f03 b/gcc/testsuite/gfortran.dg/test_common_binding_labels_2_main.f03
index 1b4103ef4c..fb7778effa 100644
--- a/gcc/testsuite/gfortran.dg/test_common_binding_labels_2_main.f03
+++ b/gcc/testsuite/gfortran.dg/test_common_binding_labels_2_main.f03
@@ -1,25 +1,27 @@
! { dg-do compile }
+! { dg-options "-std=f2003" }
+!
+!
! This file depends on the module test_common_binding_labels_2. That module
! must be compiled first and not be removed until after this test.
module test_common_binding_labels_2_main
use, intrinsic :: iso_c_binding, only: c_double, c_int
implicit none
- common /mycom/ r, s ! { dg-error "does not match" }
+ common /mycom/ r, s ! { dg-error "same binding name" }
real(c_double) :: r
real(c_double) :: s
! this next line is an error; if a common block is bind(c), the binding label
! for it must match across all scoping units that declare it.
bind(c, name="my_common_block_2") :: /mycom/
- common /com2/ i ! { dg-error "does not match" }
+ common /com2/ i ! { dg-error "same binding name" }
integer(c_int) :: i
bind(c, name="mycom2") /com2/
end module test_common_binding_labels_2_main
program main
- use test_common_binding_labels_2 ! { dg-error "does not match" }
- use test_common_binding_labels_2_main
+ use test_common_binding_labels_2 ! { dg-error "same binding name" }
+ use test_common_binding_labels_2_main ! { dg-error "same binding name" }
end program main
-
-! { dg-final { cleanup-modules "test_common_binding_labels_2_main test_common_binding_labels_2" } }
+! { dg-final { cleanup-modules "test_common_binding_labels_2" } }
diff --git a/gcc/testsuite/gfortran.dg/test_common_binding_labels_3.f03 b/gcc/testsuite/gfortran.dg/test_common_binding_labels_3.f03
index 87d6c6b78f..d851b5e727 100644
--- a/gcc/testsuite/gfortran.dg/test_common_binding_labels_3.f03
+++ b/gcc/testsuite/gfortran.dg/test_common_binding_labels_3.f03
@@ -8,3 +8,4 @@ module test_common_binding_labels_3
real(c_double) :: s
bind(c, name="my_common_block") :: /mycom/
end module test_common_binding_labels_3
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/test_common_binding_labels_3_main.f03 b/gcc/testsuite/gfortran.dg/test_common_binding_labels_3_main.f03
index d2c67f6517..3ccab0c89f 100644
--- a/gcc/testsuite/gfortran.dg/test_common_binding_labels_3_main.f03
+++ b/gcc/testsuite/gfortran.dg/test_common_binding_labels_3_main.f03
@@ -3,12 +3,11 @@
! must be compiled first and not be removed until after this test.
module test_common_binding_labels_3_main
use, intrinsic :: iso_c_binding, only: c_int
- integer(c_int), bind(c, name="my_common_block") :: my_int ! { dg-error "collides" }
+ integer(c_int), bind(c, name="my_common_block") :: my_int ! { dg-error "COMMON block at .1. with binding label my_common_block uses the same global identifier as entity at .2." }
end module test_common_binding_labels_3_main
program main
use test_common_binding_labels_3_main
- use test_common_binding_labels_3 ! { dg-error "collides" }
+ use test_common_binding_labels_3 ! { dg-error "COMMON block at .1. with binding label my_common_block uses the same global identifier as entity at .2." }
end program main
-
-! { dg-final { cleanup-modules "test_common_binding_labels_3_main test_common_binding_labels_3" } }
+! { dg-final { cleanup-modules "test_common_binding_labels_3" } }
diff --git a/gcc/testsuite/gfortran.dg/test_only_clause.f90 b/gcc/testsuite/gfortran.dg/test_only_clause.f90
index a02a75922b..7c63e2be16 100644
--- a/gcc/testsuite/gfortran.dg/test_only_clause.f90
+++ b/gcc/testsuite/gfortran.dg/test_only_clause.f90
@@ -18,5 +18,3 @@ module testOnlyClause
endif
end subroutine testOnly
end module testOnlyClause
-
-! { dg-final { cleanup-modules "testonlyclause" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_assumed_size_1.f90 b/gcc/testsuite/gfortran.dg/transfer_assumed_size_1.f90
index 1b0e156716..c1485a65cf 100644
--- a/gcc/testsuite/gfortran.dg/transfer_assumed_size_1.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_assumed_size_1.f90
@@ -41,5 +41,3 @@ program main
call BytesToString( StringToBytes('Hi'), str )
if (trim(str) .ne. "Hi") call abort ()
end program
-! { dg-final { cleanup-modules "transferbug" } }
-
diff --git a/gcc/testsuite/gfortran.dg/transfer_check_4.f90 b/gcc/testsuite/gfortran.dg/transfer_check_4.f90
new file mode 100644
index 0000000000..030d345490
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_check_4.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+
+! PR 57022: [4.7/4.8/4.9 Regression] Inappropriate warning for use of TRANSFER with arrays
+! Contributed by William Clodius <wclodius@los-alamos.net>
+
+subroutine transfers (test)
+
+ use, intrinsic :: iso_fortran_env
+
+ integer, intent(in) :: test
+
+ integer(int8) :: test8(8) = 0
+ integer(int16) :: test16(4) = 0
+ integer(int32) :: test32(2) = 0
+ integer(int64) :: test64 = 0
+
+ select case(test)
+ case(0)
+ test64 = transfer(test8, test64)
+ case(1)
+ test64 = transfer(test16, test64)
+ case(2)
+ test64 = transfer(test32, test64)
+ case(3)
+ test8 = transfer(test64, test8, 8)
+ case(4)
+ test16 = transfer(test64, test16, 4)
+ case(5)
+ test32 = transfer(test64, test32, 2)
+ end select
+
+end subroutine
+
+
+! PR 53685: surprising warns about transfer with explicit character range
+! Contributed by Jos de Kloe <kloedej@knmi.nl>
+
+subroutine mytest(byte_array,val)
+ integer, parameter :: r8_ = Selected_Real_Kind(15,307) ! = real*8
+ character(len=1), dimension(16), intent(in) :: byte_array
+ real(r8_),intent(out) :: val
+ val = transfer(byte_array(1:8),val)
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/transfer_class_2.f90 b/gcc/testsuite/gfortran.dg/transfer_class_2.f90
new file mode 100644
index 0000000000..d75b640f10
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_class_2.f90
@@ -0,0 +1,45 @@
+! { dg-do run }
+!
+! PR 54917: [OOP] TRANSFER on polymorphic variable causes ICE
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m
+ implicit none
+ type test_type
+ integer :: i = 0
+ contains
+ procedure :: ass
+ generic :: assignment(=) => ass
+ end type
+contains
+ subroutine ass (a, b)
+ class(test_type), intent(out) :: a
+ class(test_type), intent(in) :: b
+ a%i = b%i
+ end subroutine
+end module
+
+
+program p
+ use m
+ implicit none
+
+ class(test_type), allocatable :: c
+ type(test_type) :: t
+
+ allocate(c)
+
+ ! (1) check CLASS-to-TYPE transfer
+ c%i=3
+ t = transfer(c, t)
+ if (t%i /= 3) call abort()
+
+ ! (2) check TYPE-to-CLASS transfer
+ t%i=4
+ c = transfer(t, c)
+ if (c%i /= 4) call abort()
+
+end
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90 b/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90
index f0b9b54687..d993da25d8 100644
--- a/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90
+++ b/gcc/testsuite/gfortran.dg/transfer_intrinsic_3.f90
@@ -35,4 +35,3 @@ end module m
end do
deallocate(qname)
end
-! { dg-final { cleanup-modules "m" } } \ No newline at end of file
diff --git a/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90 b/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90
new file mode 100644
index 0000000000..e76bc49aed
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_intrinsic_6.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR 58058: [4.7/4.8/4.9 Regression] Memory leak with transfer function
+!
+! Contributed by Thomas Jourdan <thomas.jourdan@orange.fr>
+
+ implicit none
+
+ integer, dimension(3) :: t1
+ character(len=64) :: str
+
+ t1 = (/1,2,3/)
+
+ str = transfer(t1,str)
+
+end
+
+! { dg-final { scan-tree-dump-times "__builtin_free" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/transfer_resolve_2.f90 b/gcc/testsuite/gfortran.dg/transfer_resolve_2.f90
new file mode 100644
index 0000000000..b6c5ddd347
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_resolve_2.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+!
+! PR fortran/56079
+!
+! Contributed by Thomas Koenig
+!
+program gar_nichts
+ use ISO_C_BINDING
+ use ISO_C_BINDING, only: C_PTR
+ use ISO_C_BINDING, only: abc => C_PTR
+ use ISO_C_BINDING, only: xyz => C_PTR
+ type(xyz) nada
+ nada = transfer(C_NULL_PTR,nada)
+end program gar_nichts
diff --git a/gcc/testsuite/gfortran.dg/transfer_resolve_3.f90 b/gcc/testsuite/gfortran.dg/transfer_resolve_3.f90
new file mode 100644
index 0000000000..f3a58e27be
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_resolve_3.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56079
+!
+use iso_c_binding
+implicit none
+type t
+ type(c_ptr) :: ptr = c_null_ptr
+end type t
+
+type(t), parameter :: para = t()
+integer(c_intptr_t) :: intg
+intg = transfer (para, intg)
+intg = transfer (para%ptr, intg)
+end
+
+! { dg-final { scan-tree-dump-times "intg = 0;" 2 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/transfer_resolve_4.f90 b/gcc/testsuite/gfortran.dg/transfer_resolve_4.f90
new file mode 100644
index 0000000000..2dad63c758
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transfer_resolve_4.f90
@@ -0,0 +1,12 @@
+! { dg-do compile }
+!
+! PR fortran/47034
+!
+! Contributed by James Van Buskirk
+!
+subroutine james
+ use iso_c_binding
+ type(C_PTR), parameter :: p1 = &
+ transfer(32512_C_INTPTR_T,C_NULL_PTR)
+ integer(C_INTPTR_T), parameter :: n1 = transfer(p1,0_C_INTPTR_T)
+end
diff --git a/gcc/testsuite/gfortran.dg/transpose_2.f90 b/gcc/testsuite/gfortran.dg/transpose_2.f90
index 4ab3bc4bb1..e509d3686b 100644
--- a/gcc/testsuite/gfortran.dg/transpose_2.f90
+++ b/gcc/testsuite/gfortran.dg/transpose_2.f90
@@ -15,5 +15,4 @@ program main
b = 2.1
b = transpose(a)
end program main
-! { dg-output "Fortran runtime error: Array bound mismatch for dimension 1 of
-! array 'b' (3/2)" }
+! { dg-output "Fortran runtime error: Array bound mismatch for dimension 1 of array 'b' \\(3/2\\)" }
diff --git a/gcc/testsuite/gfortran.dg/transpose_4.f90 b/gcc/testsuite/gfortran.dg/transpose_4.f90
new file mode 100644
index 0000000000..c4db1ffeba
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/transpose_4.f90
@@ -0,0 +1,78 @@
+! { dg-do run }
+!
+! PR fortran/60392
+! In the transposed case call to my_mul_cont, the compiler used to (wrongly)
+! reuse a transposed descriptor for an array that was not transposed as a result
+! of packing.
+!
+! Original test case from Alexander Vogt <a.vogt@fulguritus.com>.
+
+program test
+ implicit none
+
+ integer, dimension(2,2) :: A, R, RT
+ integer, dimension(2,2) :: B1, B2
+
+ !
+ ! A = [ 2 17 ]
+ ! [ 82 257 ]
+ !
+ ! matmul(a,a) = [ 1398 4403 ]
+ ! [ 21238 67443 ]
+ !
+ ! matmul(transpose(a), a) = [ 6728 21108 ]
+ ! [ 21108 66338 ]
+ A(1,1) = 2
+ A(1,2) = 17
+ A(2,1) = 82
+ A(2,2) = 257
+
+ R(1,1) = 1398
+ R(1,2) = 4403
+ R(2,1) = 21238
+ R(2,2) = 67443
+
+ RT(1,1) = 6728
+ RT(1,2) = 21108
+ RT(2,1) = 21108
+ RT(2,2) = 66338
+
+ ! Normal argument
+ B1 = 0
+ B2 = 0
+ B1 = my_mul(A,A)
+ B2 = my_mul_cont(A,A)
+! print *,'Normal: ',maxval(abs(B1-B2))
+! print *,B1
+! print *,B2
+ if (any(B1 /= R)) call abort
+ if (any(B2 /= R)) call abort
+
+ ! Transposed argument
+ B1 = 0
+ B2 = 0
+ B1 = my_mul(transpose(A),A)
+ B2 = my_mul_cont(transpose(A),A)
+! print *,'Transposed:',maxval(abs(B1-B2))
+! print *,B1
+! print *,B2
+ if (any(B1 /= RT)) call abort
+ if (any(B2 /= RT)) call abort
+
+contains
+
+ function my_mul(A,C) result (B)
+ use, intrinsic :: ISO_Fortran_env
+ integer, intent(in) :: A(2,2), C(2,2)
+ integer :: B(2,2)
+ B = matmul(A, C)
+ end function
+
+ function my_mul_cont(A,C) result (B)
+ use, intrinsic :: ISO_Fortran_env
+ integer, intent(in), contiguous :: A(:,:), C(:,:)
+ integer :: B(2,2)
+ B = matmul(A, C)
+ end function
+
+end program
diff --git a/gcc/testsuite/gfortran.dg/transpose_optimization_1.f90 b/gcc/testsuite/gfortran.dg/transpose_optimization_1.f90
index d0ba6c495c..885ff7c203 100644
--- a/gcc/testsuite/gfortran.dg/transpose_optimization_1.f90
+++ b/gcc/testsuite/gfortran.dg/transpose_optimization_1.f90
@@ -104,4 +104,3 @@ end module foo
! { dg-final { scan-tree-dump-times "struct\[^\\n\]*atmp" 4 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90 b/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90
index ba03374078..54ef8417eb 100644
--- a/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90
+++ b/gcc/testsuite/gfortran.dg/transpose_optimization_2.f90
@@ -63,4 +63,3 @@ end
! { dg-final { scan-tree-dump-times "parm" 66 "original" } }
! { dg-final { scan-tree-dump-times "atmp" 12 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/trim_optimize_2.f90 b/gcc/testsuite/gfortran.dg/trim_optimize_2.f90
index 46ae7fb88c..b7ae1e3e53 100644
--- a/gcc/testsuite/gfortran.dg/trim_optimize_2.f90
+++ b/gcc/testsuite/gfortran.dg/trim_optimize_2.f90
@@ -35,4 +35,3 @@ end program main
! { dg-final { scan-tree-dump-times "memmove" 4 "original" } }
! { dg-final { scan-tree-dump-times "string_trim" 0 "original" } }
! { dg-final { cleanup-tree-dump "original" } }
-! { dg-final { cleanup-modules "faz" } }
diff --git a/gcc/testsuite/gfortran.dg/trim_optimize_6.f90 b/gcc/testsuite/gfortran.dg/trim_optimize_6.f90
index 2be4a347bc..2303bb4ef7 100644
--- a/gcc/testsuite/gfortran.dg/trim_optimize_6.f90
+++ b/gcc/testsuite/gfortran.dg/trim_optimize_6.f90
@@ -23,5 +23,3 @@ program main
if (line /= "aX ") call abort
if (f() .ne. 2) call abort
end program main
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/type_decl_1.f90 b/gcc/testsuite/gfortran.dg/type_decl_1.f90
index 93928652a0..badb9aeaef 100644
--- a/gcc/testsuite/gfortran.dg/type_decl_1.f90
+++ b/gcc/testsuite/gfortran.dg/type_decl_1.f90
@@ -26,5 +26,3 @@ type(integer (kind=k4)) function f()
use m
f = 42
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_1.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_1.f03
index 359572b0a5..2d06097902 100644
--- a/gcc/testsuite/gfortran.dg/typebound_assignment_1.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_1.f03
@@ -31,5 +31,3 @@ contains
this%st = st
end subroutine init_comps
end module hydro_flow
-
-! { dg-final { cleanup-modules "hydro_state hydro_flow" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_2.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_2.f03
index 862535a865..ca994dd4db 100644
--- a/gcc/testsuite/gfortran.dg/typebound_assignment_2.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_2.f03
@@ -35,5 +35,3 @@ contains
this%gr = gr
end subroutine init_comps
end module hydro_flow
-
-! { dg-final { cleanup-modules "hydro_grid hydro_flow" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03
index 2001589a9c..9379570bda 100644
--- a/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_3.f03
@@ -26,5 +26,3 @@ end module
type (bar) :: foobar(2)
foobar = bar() ! There was a not-implemented error here
end
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_4.f90 b/gcc/testsuite/gfortran.dg/typebound_assignment_4.f90
new file mode 100644
index 0000000000..56f3b6eb0b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_4.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+!
+! PR fortran/54195
+! The compiler used to diagnose a duplicate entity in the assignment interface
+! because NC was resolved twice.
+!
+! Contributed by Andrew Benson <abenson@obs.carnegiescience.edu>
+
+module gn
+
+ implicit none
+
+ type :: nc
+ contains
+ procedure :: assign => nca
+ generic :: assignment(=) => assign
+ end type
+
+ type, extends(nc) :: ncb
+ contains
+ procedure , nopass :: tis => bf
+ end type
+
+contains
+
+ subroutine nca(to,from)
+ class(nc), intent(out) :: to
+ type(nc), intent(in) :: from
+ end subroutine
+
+ logical function bf()
+ bf=.false.
+ end function
+
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_5.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_5.f03
new file mode 100644
index 0000000000..3ee4848fc3
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_5.f03
@@ -0,0 +1,44 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/49074
+! ICE on defined assignment with class arrays.
+
+ module foo
+ type bar
+ integer :: i
+
+ contains
+
+ generic :: assignment (=) => assgn_bar
+ procedure, private :: assgn_bar
+ end type bar
+
+ contains
+
+ elemental subroutine assgn_bar (a, b)
+ class (bar), intent (inout) :: a
+ class (bar), intent (in) :: b
+
+ select type (b)
+ type is (bar)
+ a%i = b%i
+ end select
+
+ return
+ end subroutine assgn_bar
+ end module foo
+
+ program main
+ use foo
+
+ type (bar), allocatable :: foobar(:)
+
+ allocate (foobar(2))
+ foobar = [bar(1), bar(2)]
+ if (any(foobar%i /= [1, 2])) call abort
+ end program
+
+! { dg-final { scan-tree-dump-not "_gfortran_internal_pack" "original" } }
+! { dg-final { scan-tree-dump-not "_gfortran_internal_unpack" "original" } }
+! { dg-final { cleanup-tree-dump "original"} }
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_6.f03 b/gcc/testsuite/gfortran.dg/typebound_assignment_6.f03
new file mode 100644
index 0000000000..c17de3e3d7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_6.f03
@@ -0,0 +1,43 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/56136
+! ICE on defined assignment with class arrays.
+!
+! Original testcase by Alipasha <alipash.celeris@gmail.com>
+
+ MODULE A_TEST_M
+ TYPE :: A_TYPE
+ INTEGER :: I
+ CONTAINS
+ GENERIC :: ASSIGNMENT (=) => ASGN_A
+ PROCEDURE, PRIVATE :: ASGN_A
+ END TYPE
+
+ CONTAINS
+
+ ELEMENTAL SUBROUTINE ASGN_A (A, B)
+ CLASS (A_TYPE), INTENT (INOUT) :: A
+ CLASS (A_TYPE), INTENT (IN) :: B
+ A%I = B%I
+ END SUBROUTINE
+ END MODULE A_TEST_M
+
+ PROGRAM ASGN_REALLOC_TEST
+ USE A_TEST_M
+ TYPE (A_TYPE), ALLOCATABLE :: A(:)
+ INTEGER :: I, J
+
+ ALLOCATE (A(100))
+ A = (/ (A_TYPE(I), I=1,SIZE(A)) /)
+ A(1:50) = A(51:100)
+ IF (ANY(A%I /= (/ ((50+I, I=1,SIZE(A)/2), J=1,2) /))) CALL ABORT
+ A(::2) = A(1:50) ! pack/unpack
+ IF (ANY(A( ::2)%I /= (/ (50+I, I=1,SIZE(A)/2) /))) CALL ABORT
+ IF (ANY(A(2::2)%I /= (/ ((50+2*I, I=1,SIZE(A)/4), J=1,2) /))) CALL ABORT
+ END PROGRAM
+
+! { dg-final { scan-tree-dump-times "_gfortran_internal_pack" 1 "original" } }
+! { dg-final { scan-tree-dump-times "_gfortran_internal_unpack" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90 b/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90
new file mode 100644
index 0000000000..2c5b837d67
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_assignment_7.f90
@@ -0,0 +1,66 @@
+! { dg-do run }
+!
+! PR 57843: [OOP] Type-bound assignment is resolved to non-polymorphic procedure call
+!
+! Contributed by John <jwmwalrus@gmail.com>
+
+module mod1
+ implicit none
+ type :: itemType
+ contains
+ procedure :: the_assignment => assign_itemType
+ generic :: assignment(=) => the_assignment
+ end type
+contains
+ subroutine assign_itemType(left, right)
+ class(itemType), intent(OUT) :: left
+ class(itemType), intent(IN) :: right
+ end subroutine
+end module
+
+module mod2
+ use mod1
+ implicit none
+ type, extends(itemType) :: myItem
+ character(3) :: name = ''
+ contains
+ procedure :: the_assignment => assign_myItem
+ end type
+contains
+ subroutine assign_myItem(left, right)
+ class(myItem), intent(OUT) :: left
+ class(itemType), intent(IN) :: right
+ select type (right)
+ type is (myItem)
+ left%name = right%name
+ end select
+ end subroutine
+end module
+
+
+program test_assign
+
+ use mod2
+ implicit none
+
+ class(itemType), allocatable :: item1, item2
+
+ allocate (myItem :: item1)
+ select type (item1)
+ type is (myItem)
+ item1%name = 'abc'
+ end select
+
+ allocate (myItem :: item2)
+ item2 = item1
+
+ select type (item2)
+ type is (myItem)
+ if (item2%name /= 'abc') call abort()
+ class default
+ call abort()
+ end select
+
+end
+
+! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_1.f03 b/gcc/testsuite/gfortran.dg/typebound_call_1.f03
index d0da0ecd99..4e7797bdf5 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_1.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_1.f03
@@ -94,5 +94,3 @@ PROGRAM main
USE m, ONLY: test
CALL test ()
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_10.f03 b/gcc/testsuite/gfortran.dg/typebound_call_10.f03
index ca6038e45c..22a2a72ba6 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_10.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_10.f03
@@ -34,6 +34,3 @@ call t1%foo()
call t2%foo()
call t1%foo(t2)
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_11.f03 b/gcc/testsuite/gfortran.dg/typebound_call_11.f03
index 8d7b8f0617..fa3693e726 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_11.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_11.f03
@@ -44,5 +44,3 @@ contains
end function new_field3
end module
-
-! { dg-final { cleanup-modules "grid_module field_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_12.f03 b/gcc/testsuite/gfortran.dg/typebound_call_12.f03
index 5591dd9f19..f36b82689e 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_12.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_12.f03
@@ -33,4 +33,3 @@ PROGRAM ProgA
END DO
END PROGRAM ProgA
-! { dg-final { cleanup-modules "moda" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_13.f03 b/gcc/testsuite/gfortran.dg/typebound_call_13.f03
index 0800ba5052..db220787e5 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_13.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_13.f03
@@ -39,5 +39,3 @@ program test_optional
if (res /= 2) call abort()
end program
-
-! { dg-final { cleanup-modules "module_myobj" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_14.f03 b/gcc/testsuite/gfortran.dg/typebound_call_14.f03
index e8cbf846e5..e39b38d6ee 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_14.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_14.f03
@@ -25,5 +25,3 @@ contains
print *,ice_array(2)%next%ice_fun()
end subroutine
end module ice_module
-
-! { dg-final { cleanup-modules "ice_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_15.f03 b/gcc/testsuite/gfortran.dg/typebound_call_15.f03
index ac6a668cc4..843dff4aff 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_15.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_15.f03
@@ -22,4 +22,3 @@ contains
end subroutine
end module ice5
-! { dg-final { cleanup-modules "ice5" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_16.f03 b/gcc/testsuite/gfortran.dg/typebound_call_16.f03
index fdd60c603c..39831957aa 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_16.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_16.f03
@@ -31,5 +31,3 @@ end module base_mat_mod
m = a%get_nrows()
end
-
-! { dg-final { cleanup-modules "base_mat_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_17.f03 b/gcc/testsuite/gfortran.dg/typebound_call_17.f03
index 5bd054707e..5996857625 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_17.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_17.f03
@@ -53,5 +53,3 @@ program test_poly
call p1%add_poly()
end program test_poly
-
-! { dg-final { cleanup-modules "polynomial" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_18.f03 b/gcc/testsuite/gfortran.dg/typebound_call_18.f03
index bb94717ad3..e417ebf918 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_18.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_18.f03
@@ -63,5 +63,3 @@ program main
call g%assign (g_initial)
print *, "cg: after g%assign"
end program main
-
-! { dg-final { cleanup-modules "abstract_vector concrete_vector concrete_gradient" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_19.f03 b/gcc/testsuite/gfortran.dg/typebound_call_19.f03
index 95b272a80a..3c8b7684c6 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_19.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_19.f03
@@ -47,5 +47,3 @@ program test
this%x = this%find_x()
if (this%x%i /= 4) call abort()
end
-
-! { dg-final { cleanup-modules "class_t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_2.f03 b/gcc/testsuite/gfortran.dg/typebound_call_2.f03
index 5d70f7c17e..d0846f4149 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_2.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_2.f03
@@ -86,5 +86,3 @@ PROGRAM main
USE m, ONLY: test
CALL test ()
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_20.f03 b/gcc/testsuite/gfortran.dg/typebound_call_20.f03
index 61eee5ba00..8ee7302c54 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_20.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_20.f03
@@ -37,5 +37,3 @@ program p
y = this%find_y()
if (y/=3) call abort()
end
-
-! { dg-final { cleanup-modules "class_t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_21.f03 b/gcc/testsuite/gfortran.dg/typebound_call_21.f03
index 5f7d67283c..e31bd6de41 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_21.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_21.f03
@@ -34,6 +34,4 @@ end module m
end
! { dg-final { scan-tree-dump-times "_vptr->" 0 "original" } }
-
-! { dg-final { cleanup-modules "m" } }
! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_22.f03 b/gcc/testsuite/gfortran.dg/typebound_call_22.f03
index b5aa8eef78..31e5894372 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_22.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_22.f03
@@ -28,5 +28,3 @@ end program
! { dg-final { scan-tree-dump-times "base \\(\\);" 1 "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_23.f03 b/gcc/testsuite/gfortran.dg/typebound_call_23.f03
new file mode 100644
index 0000000000..5baa26179d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_call_23.f03
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR 52968: [OOP] Call to type-bound procedure wrongly rejected
+!
+! Contributed by Reuben Budiardja <reubendb@gmail.com>
+
+module SolverModule
+
+ type :: SolverType
+ class ( EquationTemplate ), pointer :: Equation
+ end type
+
+ type :: EquationTemplate
+ contains
+ procedure, nopass :: Evaluate
+ end type
+
+contains
+
+ subroutine Evaluate ()
+ end subroutine
+
+ subroutine Solve
+ type ( SolverType ) :: S
+ call S % Equation % Evaluate ()
+ end subroutine
+
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_24.f03 b/gcc/testsuite/gfortran.dg/typebound_call_24.f03
new file mode 100644
index 0000000000..48d63dc602
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_call_24.f03
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR 54243: [OOP] ICE (segfault) in gfc_type_compatible for invalid BT_CLASS
+!
+! Contributed by Sylwester Arabas <slayoo@staszic.waw.pl>
+
+module aqq_m
+ type :: aqq_t
+ contains
+ procedure :: aqq_init
+ end type
+ contains
+ subroutine aqq_init(this)
+ class(aqq_t) :: this
+ end subroutine
+end module
+
+program bug2
+ use aqq_m
+ class(aqq_t) :: aqq ! { dg-error "must be dummy, allocatable or pointer" }
+ call aqq%aqq_init
+end program
+
+! { dg-final { cleanup-modules "aqq_m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_25.f90 b/gcc/testsuite/gfortran.dg/typebound_call_25.f90
new file mode 100644
index 0000000000..df81c79e62
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_call_25.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+!
+! PR 57966: [OOP] Using a TBP to specify the shape of a dummy argument
+!
+! Contributed by Stefan Mauerberger <stefan.mauerberger@gmail.com>
+
+MODULE my_mod
+ IMPLICIT NONE
+
+ TYPE config_cls
+ CONTAINS
+ PROCEDURE, NOPASS :: my_size
+ PROCEDURE, NOPASS :: my_sub
+ GENERIC :: sz => my_size
+ GENERIC :: sub => my_sub
+ END TYPE
+
+ TYPE(config_cls) :: config
+
+CONTAINS
+
+ PURE INTEGER FUNCTION my_size()
+ my_size = 10
+ END FUNCTION
+
+ SUBROUTINE my_sub
+ END SUBROUTINE
+
+ SUBROUTINE test (field1, field2, field3, field4)
+ REAL :: field1 (config%my_size())
+ REAL :: field2 (config%sz())
+ REAL :: field3 (config%my_sub()) ! { dg-error "should be a FUNCTION" }
+ REAL :: field4 (config%sub()) ! { dg-error "should be a FUNCTION" }
+ END SUBROUTINE
+
+END MODULE
+
+! { dg-final { cleanup-modules "my_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_3.f03 b/gcc/testsuite/gfortran.dg/typebound_call_3.f03
index eabb28ef18..ba7188624f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_3.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_3.f03
@@ -44,5 +44,3 @@ PROGRAM main
CALL abort ()
END IF
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_4.f03 b/gcc/testsuite/gfortran.dg/typebound_call_4.f03
index 6cb5e69e3e..c56f22d880 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_4.f03
@@ -47,5 +47,3 @@ CONTAINS
END SUBROUTINE test
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_5.f03 b/gcc/testsuite/gfortran.dg/typebound_call_5.f03
index d9a845b073..3691292b54 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_5.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_5.f03
@@ -37,5 +37,3 @@ SUBROUTINE test2 ()
CALL obj%priv () ! { dg-error "PRIVATE" }
CALL obj%publ ()
END SUBROUTINE test2
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_6.f03 b/gcc/testsuite/gfortran.dg/typebound_call_6.f03
index 0ad510edae..fbecabd061 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_6.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_6.f03
@@ -41,5 +41,3 @@ PROGRAM main
CALL super%proc
CALL sub%proc
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_7.f03 b/gcc/testsuite/gfortran.dg/typebound_call_7.f03
index 03a1a51ccd..7e7209c198 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_7.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_7.f03
@@ -46,5 +46,3 @@ CONTAINS
END SUBROUTINE fill_gap
END MODULE touching
-
-! { dg-final { cleanup-modules "touching" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_8.f03 b/gcc/testsuite/gfortran.dg/typebound_call_8.f03
index 3f65846b3e..1784ccefa7 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_8.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_8.f03
@@ -28,5 +28,3 @@ CONTAINS
END SUBROUTINE fill_gap
END MODULE touching
-
-! { dg-final { cleanup-modules "touching" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_call_9.f03 b/gcc/testsuite/gfortran.dg/typebound_call_9.f03
index 4863f07eb5..c40850610e 100644
--- a/gcc/testsuite/gfortran.dg/typebound_call_9.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_call_9.f03
@@ -56,5 +56,3 @@ contains
End Subroutine foo_free
end module foo_mod
-
-! { dg-final { cleanup-modules "foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90 b/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90
new file mode 100644
index 0000000000..6e6dc52d0f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_deferred_1.f90
@@ -0,0 +1,23 @@
+! { dg-do compile }
+!
+! PR 46952: [OOP] Spurious "recursive call" error with type bound procedure
+!
+! Contributed by Ian Harvey <ian_harvey@bigpond.com>
+
+module m
+
+ type, abstract :: t
+ contains
+ procedure(inter), pass, deferred :: foo
+ end type
+
+contains
+
+ subroutine inter(this)
+ class(t) :: this
+ call this%foo()
+ end subroutine inter
+
+end module m
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_1.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_1.f03
index fb1dfaec66..f9c471ae96 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_1.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_1.f03
@@ -92,5 +92,3 @@ CONTAINS
END SUBROUTINE subr
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_10.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_10.f03
index 590fa5278a..56952e1b90 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_10.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_10.f03
@@ -28,5 +28,3 @@ contains
end subroutine b_subroutine
end module generic
-
-! { dg-final { cleanup-modules "generic" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_11.f90 b/gcc/testsuite/gfortran.dg/typebound_generic_11.f90
index eb89d0dfe2..c71f686330 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_11.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_11.f90
@@ -59,5 +59,3 @@ contains
res = ( t%i == i )
end function i_equal_t2
end module m_test2
-
-! { dg-final { cleanup-modules "m_test m_test2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_12.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
new file mode 100644
index 0000000000..061a41a07f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_12.f03
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR 53328: [OOP] Ambiguous check for type-bound GENERIC shall ignore PASSed arguments
+!
+! Contributed by Salvatore Filippone <filippone.salvatore@gmail.com>
+
+module m
+ type t
+ contains
+ procedure, pass(this) :: sub1
+ procedure, pass(this) :: sub2
+ generic :: gen => sub1, sub2 ! { dg-error "are ambiguous" }
+ end type t
+contains
+ subroutine sub1 (x, this)
+ integer :: i
+ class(t) :: this
+ end subroutine sub1
+
+ subroutine sub2 (this, y)
+ integer :: i
+ class(t) :: this
+ end subroutine sub2
+end module m
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_13.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_13.f03
new file mode 100644
index 0000000000..c2116e965a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_13.f03
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR 47710: [OOP] Improve ambiguity check for GENERIC TBP w/ PASS and NOPASS
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m
+
+ type base_t
+ contains
+ procedure, nopass :: baseproc_nopass => baseproc1
+ procedure, pass :: baseproc_pass => baseproc2
+ generic :: some_proc => baseproc_pass, baseproc_nopass ! { dg-error "are ambiguous" }
+ end type
+
+contains
+
+ subroutine baseproc1 (this)
+ class(base_t) :: this
+ end subroutine
+
+ subroutine baseproc2 (this, that)
+ class(base_t) :: this, that
+ end subroutine
+
+end module
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_14.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
new file mode 100644
index 0000000000..8515cf4378
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_14.f03
@@ -0,0 +1,27 @@
+! { dg-do compile }
+!
+! PR 54594: [OOP] Type-bound ASSIGNMENTs (elemental + array version) rejected as ambiguous
+!
+! Contributed by James van Buskirk
+
+module a_mod
+
+ type :: a
+ contains
+ procedure, NOPASS :: a_ass, a_ass_sv
+ generic :: ass => a_ass, a_ass_sv
+ end type
+
+contains
+
+ impure elemental subroutine a_ass (out)
+ class(a), intent(out) :: out
+ end subroutine
+
+ subroutine a_ass_sv (out)
+ class(a), intent(out) :: out(:)
+ end subroutine
+
+end module
+
+! { dg-final { cleanup-modules "a_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_15.f90 b/gcc/testsuite/gfortran.dg/typebound_generic_15.f90
new file mode 100644
index 0000000000..f71ffd9e8a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_15.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR 60231: [4.8/4.9 Regression] ICE on undefined generic
+!
+! Contributed by Antony Lewis <antony@cosmologist.info>
+
+module Objects
+
+ Type TObjectList
+ contains
+ procedure :: Add1 ! { dg-error "must be a module procedure" }
+ procedure :: Add2 ! { dg-error "must be a module procedure" }
+ generic :: Add => Add1, Add2 ! { dg-error "are ambiguous" }
+ end Type
+
+end module
+
+! { dg-final { cleanup-modules "Objects" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_2.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_2.f03
index c18b306b90..8094d863ff 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_2.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_2.f03
@@ -60,5 +60,3 @@ PROGRAM main
WRITE (*,*) myobj%sub (1) ! { dg-error "FUNCTION" }
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_3.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_3.f03
index d56f914897..6f7af2eafb 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_3.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_3.f03
@@ -59,4 +59,3 @@ PROGRAM main
END PROGRAM main
! { dg-output "Plain Integer(\n|\r\n|\r).*Plain Real(\n|\r\n|\r).*Passed Integer(\n|\r\n|\r).*Passed Real" }
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_4.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_4.f03
index ff5cd0582c..a74cdae750 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_4.f03
@@ -51,4 +51,3 @@ program foobar
end program foobar
! { dg-output "Vector.*Matrix" }
-! { dg-final { cleanup-modules "bar_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_5.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_5.f03
index 3fd94b154f..561fcce1c3 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_5.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_5.f03
@@ -51,5 +51,3 @@ PROGRAM main
CALL abort ()
END IF
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_6.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_6.f03
index 973e10a35e..d0a17567ab 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_6.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_6.f03
@@ -65,5 +65,3 @@ program testd15
if (afab%get() .ne. 3) call abort
end program testd15
-
-! { dg-final { cleanup-modules "foo_mod foo2_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_7.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_7.f03
index 2519ab0941..cb551b81bd 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_7.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_7.f03
@@ -24,5 +24,3 @@ contains
call x%do()
end subroutine
end
-
-! { dg-final { cleanup-modules "foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_8.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_8.f03
index 0ee6610e17..2c507e14c3 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_8.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_8.f03
@@ -25,5 +25,3 @@ contains
end subroutine do_something
end module ice6
-
-! { dg-final { cleanup-modules "ice6" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_generic_9.f03 b/gcc/testsuite/gfortran.dg/typebound_generic_9.f03
index f85bb38570..42be60219e 100644
--- a/gcc/testsuite/gfortran.dg/typebound_generic_9.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_generic_9.f03
@@ -58,6 +58,4 @@ program testd15
if (af2%get() .ne. 3) call abort
end program testd15
-
-! { dg-final { cleanup-modules "foo_mod foo2_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_1.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_1.f03
index f756a595b4..962c2bda8c 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_1.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_1.f03
@@ -45,5 +45,3 @@ CONTAINS
END SUBROUTINE assign_proc
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_10.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_10.f03
index 146eab0157..e8f9f1e2db 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_10.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_10.f03
@@ -26,4 +26,3 @@ program main
class(field) ,pointer :: u
u = (u)*2. ! { dg-error "check that there is a matching specific" }
end program
-! { dg-final { cleanup-modules "field_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_11.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_11.f90
index 1f5c19530d..b37e975211 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_11.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_11.f90
@@ -38,5 +38,3 @@ contains
x = x%t()*dt
end subroutine
end module
-
-! { dg-final { cleanup-modules "foo_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_12.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_12.f03
index 3496ed3863..4f729570b0 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_12.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_12.f03
@@ -41,5 +41,3 @@ program main
if (any (fireworks%position .ne. [6, 12, 18])) call abort
if (any (fireworks%velocity .ne. [24, 30, 36])) call abort
end program
-! { dg-final { cleanup-modules "soop_stars_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_13.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_13.f03
index e1371c8a81..4982894293 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_13.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_13.f03
@@ -55,5 +55,3 @@ program main
if (any (fireworks%position .ne. [6, 12, 18])) call abort
if (any (fireworks%velocity .ne. [24, 30, 36])) call abort
end program
-! { dg-final { cleanup-modules "soop_stars_class" } }
-
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_16.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_16.f03
new file mode 100644
index 0000000000..eff43ebe53
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_16.f03
@@ -0,0 +1,49 @@
+! { dg-do compile }
+!
+! PR 49591: [OOP] Multiple identical specific procedures in type-bound operator not detected
+!
+! This is interpretation request F03/0018:
+! http://www.j3-fortran.org/doc/meeting/195/11-214.txt
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module M1
+ type T
+ integer x
+ contains
+ procedure :: MyAdd_t => myadd
+ generic :: operator(+) => myAdd_t
+ end type T
+ type X
+ real q
+ contains
+ procedure, pass(b) :: MyAdd_x => myadd
+ generic :: operator(+) => myAdd_x ! { dg-error "is already present in the interface" }
+ end type X
+contains
+ integer function MyAdd ( A, B )
+ class(t), intent(in) :: A
+ class(x), intent(in) :: B
+ myadd = a%x + b%q
+ end function MyAdd
+end module
+
+module M2
+ interface operator(+)
+ procedure MyAdd
+ end interface
+ type T
+ integer x
+ contains
+ procedure :: MyAdd_t => myadd
+ generic :: operator(+) => myAdd_t ! { dg-error "is already present in the interface" }
+ end type T
+contains
+ integer function MyAdd ( A, B )
+ class(t), intent(in) :: A
+ real, intent(in) :: B
+ myadd = a%x + b
+ end function MyAdd
+end module
+
+! { dg-final { cleanup-modules "M1 M2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_17.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_17.f90
new file mode 100644
index 0000000000..4e58a7fa27
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_17.f90
@@ -0,0 +1,43 @@
+! { dg-do compile }
+!
+! PR 54832: [4.8 Regression] [OOP] Type-bound operator not picked up with RESULT variable
+!
+! Contributed by Damian Rouson <rouson@sandia.gov>
+
+ type, abstract :: integrand
+ contains
+ procedure(t_interface), deferred :: t
+ procedure(assign_interface), deferred :: assign
+ procedure(times_interface), deferred :: times
+ generic :: operator(*) => times
+ generic :: assignment(=) => assign
+ end type
+
+ abstract interface
+ function t_interface(this) result(dState_dt)
+ import :: integrand
+ class(integrand) ,intent(in) :: this
+ class(integrand) ,allocatable :: dState_dt
+ end function
+ function times_interface(lhs,rhs)
+ import :: integrand
+ class(integrand) ,intent(in) :: lhs
+ class(integrand) ,allocatable :: times_interface
+ real, intent(in) :: rhs
+ end function
+ subroutine assign_interface(lhs,rhs)
+ import :: integrand
+ class(integrand) ,intent(in) :: rhs
+ class(integrand) ,intent(inout) :: lhs
+ end subroutine
+ end interface
+
+contains
+
+ subroutine integrate(model,dt)
+ class(integrand) :: model
+ real dt
+ model = model%t()*dt
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_18.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_18.f90
new file mode 100644
index 0000000000..d5ac9e9753
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_18.f90
@@ -0,0 +1,25 @@
+! { dg-do compile }
+!
+! PR 55297: [4.8 Regression] [OOP] type-bound operator clashes with abstract interface
+!
+! Contributed by Damian Rouson <damian@rouson.net>
+
+module athlete_module
+ type athlete
+ contains
+ procedure :: negative
+ generic :: operator(-) => negative
+ end type
+ abstract interface
+ integer function sum_interface(this)
+ import athlete
+ class(athlete) this
+ end function
+ end interface
+contains
+ integer function negative(this)
+ class(athlete) ,intent(in) :: this
+ end function
+end module
+
+! { dg-final { cleanup-modules "athlete_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_19.f90 b/gcc/testsuite/gfortran.dg/typebound_operator_19.f90
new file mode 100644
index 0000000000..cf09379aff
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_19.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+!
+! PR fortran/54195
+! The compiler used to diagnose a duplicate entity in the assignment interface
+! because NC was resolved twice.
+!
+! Contributed by Damian Rouson <damian@rouson.net>
+
+module import_clashes_with_generic
+
+ type ,abstract :: foo
+ contains
+ procedure :: unary
+ generic :: operator(-) => unary
+ end type
+
+ abstract interface
+ integer function bar()
+ import :: foo
+ end function
+ end interface
+
+contains
+
+ integer function unary(rhs)
+ class(foo) ,intent(in) :: rhs
+ end function
+
+end module
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_2.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_2.f03
index cae2cdab71..67b6b5e032 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_2.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_2.f03
@@ -63,5 +63,3 @@ CONTAINS
END SUBROUTINE sub2
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_3.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_3.f03
index 51ad1d2f0f..c558dfda36 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_3.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_3.f03
@@ -121,5 +121,3 @@ PROGRAM main
IF (.GET. num1 /= 3.0) CALL abort ()
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
index 835ceb63ff..6ede14e878 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_4.f03
@@ -88,5 +88,3 @@ PROGRAM main
x = x + 42 ! { dg-error "Operands of" }
x = x .PLUS. 5 ! { dg-error "Unknown operator" }
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_5.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_5.f03
index 25a8c382d2..a6c9c2b5e4 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_5.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_5.f03
@@ -26,5 +26,3 @@ PROGRAM P
CLASS (NODE),POINTER :: A, B
PRINT *, A%PT .LT. B%PT
END
-
-! { dg-final { cleanup-modules "def1" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_6.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_6.f03
index 132b32b614..02bd01a948 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_6.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_6.f03
@@ -69,5 +69,3 @@ PROGRAM TEST
if (.NOT. NDA .LT. NDB) call abort()
END
-
-! { dg-final { cleanup-modules "dat_mod node_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_7.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_7.f03
index a7b0f81722..280072d0ff 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_7.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_7.f03
@@ -99,5 +99,3 @@ program main
type is (i_field); if (u%i .ne. 152064) call abort
end select
end program
-! { dg-final { cleanup-modules "field_module i_field_module" } }
-
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_8.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_8.f03
index a3726ba9f1..88d485d6a6 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_8.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_8.f03
@@ -97,4 +97,3 @@ program main
if (u%i .ne. 152064) call abort
end program
-! { dg-final { cleanup-modules "field_module i_field_module" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_operator_9.f03 b/gcc/testsuite/gfortran.dg/typebound_operator_9.f03
index 9fda1eb580..6e625262c3 100644
--- a/gcc/testsuite/gfortran.dg/typebound_operator_9.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_operator_9.f03
@@ -498,4 +498,3 @@ contains
end select
end subroutine
end program test_pde_solver
-! { dg-final { cleanup-modules "pde_specific define_pde_objects cartesian_2d_objects base_pde_objects" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_1.f90 b/gcc/testsuite/gfortran.dg/typebound_override_1.f90
index c2b71933ac..7eb685615f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_1.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_1.f90
@@ -19,11 +19,11 @@ module m
type, extends(t1) :: t2
contains
- procedure, nopass :: a => a2 ! { dg-error "Character length mismatch" }
- procedure, nopass :: b => b2 ! { dg-error "should have matching result types and ranks" }
- procedure, nopass :: c => c2 ! { dg-warning "Possible character length mismatch" }
+ procedure, nopass :: a => a2 ! { dg-error "Character length mismatch in function result" }
+ procedure, nopass :: b => b2 ! { dg-error "Rank mismatch in function result" }
+ procedure, nopass :: c => c2 ! FIXME: dg-warning "Possible character length mismatch"
procedure, nopass :: d => d2 ! valid, check for commutativity (+,*)
- procedure, nopass :: e => e2 ! { dg-error "Character length mismatch" }
+ procedure, nopass :: e => e2 ! { dg-error "Character length mismatch in function result" }
end type
contains
@@ -110,7 +110,7 @@ module w2
type, extends(tt1) :: tt2
contains
- procedure, nopass :: aa => aa2 ! { dg-warning "Possible character length mismatch" }
+ procedure, nopass :: aa => aa2 ! FIXME: dg-warning "Possible character length mismatch"
end type
contains
@@ -121,5 +121,3 @@ contains
end function
end module w2
-
-! { dg-final { cleanup-modules "m w1 w2" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_2.f90 b/gcc/testsuite/gfortran.dg/typebound_override_2.f90
index 98146b6814..375875e734 100644
--- a/gcc/testsuite/gfortran.dg/typebound_override_2.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_override_2.f90
@@ -28,5 +28,3 @@ contains
integer, intent(inout) :: j
end subroutine ext_bar
end module extfoo_mod
-
-! { dg-final { cleanup-modules "foo_mod extfoo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_3.f90 b/gcc/testsuite/gfortran.dg/typebound_override_3.f90
new file mode 100644
index 0000000000..36d84737e1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_override_3.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+!
+! PR 54134: [OOP] ICE overriding derived type bound function with allocatable character as result
+!
+! Contributed by <koen.poppe@cs.kuleuven.be>
+
+module dtAs
+ implicit none
+ type :: A
+ contains
+ procedure, nopass :: name => name_A
+ end type
+contains
+ function name_A() result( name )
+ character(:), allocatable :: name
+ name = "name_A"
+ end function
+end module
+
+module dtBs
+ use dtAs
+ implicit none
+ type, extends( A ) :: B
+ contains
+ procedure, nopass :: name => name_B
+ end type
+contains
+ function name_B() result( name )
+ character(:), allocatable :: name
+ name = "name_B"
+ end function
+end module
+
+! { dg-final { cleanup-modules "dtAs dtBs" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_4.f90 b/gcc/testsuite/gfortran.dg/typebound_override_4.f90
new file mode 100644
index 0000000000..95131dea3b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_override_4.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+!
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Salvatore Filippone <filippone.salvatore@gmail.com>
+
+module base_mod
+ implicit none
+ type base_type
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout)
+ class(base_type) :: map
+ class(base_type) :: mapout
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout)
+ class(r_type) :: map
+ class(r_type) :: mapout
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "base_mod r_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_5.f90 b/gcc/testsuite/gfortran.dg/typebound_override_5.f90
new file mode 100644
index 0000000000..565dd48d4f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_override_5.f90
@@ -0,0 +1,40 @@
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+!gcc$ attributes no_arg_check :: mapout
+ integer, intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "base_mod r_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_6.f90 b/gcc/testsuite/gfortran.dg/typebound_override_6.f90
new file mode 100644
index 0000000000..45720fd610
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_override_6.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Rank mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout(..)
+ integer :: info
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "base_mod r_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_override_7.f90 b/gcc/testsuite/gfortran.dg/typebound_override_7.f90
new file mode 100644
index 0000000000..0c7c48ad56
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_override_7.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+!
+! PR 54190: TYPE(*)/assumed-rank: Type/rank check too relaxed for dummy procedure
+! PR 57217: [4.7/4.8/4.9 Regression][OOP] Accepts invalid TBP overriding - lacking arguments check
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module base_mod
+ implicit none
+ type base_type
+ integer :: kind
+ contains
+ procedure, pass(map) :: clone => base_clone
+ end type
+contains
+ subroutine base_clone(map,mapout,info)
+ class(base_type), intent(inout) :: map
+ class(base_type), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+module r_mod
+ use base_mod
+ implicit none
+ type, extends(base_type) :: r_type
+ real :: dat
+ contains
+ procedure, pass(map) :: clone => r_clone ! { dg-error "Type mismatch in argument" }
+ end type
+contains
+ subroutine r_clone(map,mapout,info)
+ class(r_type), intent(inout) :: map
+ type(*), intent(inout) :: mapout
+ integer :: info
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "base_mod r_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_1.f08 b/gcc/testsuite/gfortran.dg/typebound_proc_1.f08
index 53868a4632..674d4e028f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_1.f08
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_1.f08
@@ -65,5 +65,3 @@ CONTAINS
END FUNCTION proc3
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_10.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_10.f03
index 3f372c815f..cbb61b6caa 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_10.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_10.f03
@@ -39,5 +39,3 @@ MODULE m2
END TYPE sub_type2
END MODULE m2
-
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_11.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_11.f03
index fafc149f57..6105b8ca2f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_11.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_11.f03
@@ -29,5 +29,3 @@ CONTAINS
END SUBROUTINE realproc
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_13.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_13.f03
index 62054b6fa3..98caac6924 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_13.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_13.f03
@@ -16,8 +16,7 @@ MODULE m
TYPE t2
CONTAINS
-! FIXME: uncomment and dejagnuify once class arrays are enabled
-! PROCEDURE, PASS :: nonscalar ! { "must be scalar" }
+ PROCEDURE, PASS :: nonscalar ! { dg-error "must be scalar" }
PROCEDURE, PASS :: is_pointer ! { dg-error "must not be POINTER" }
PROCEDURE, PASS :: is_allocatable ! { dg-error "must not be ALLOCATABLE" }
END TYPE t2
@@ -27,9 +26,9 @@ CONTAINS
SUBROUTINE myproc ()
END SUBROUTINE myproc
-! SUBROUTINE nonscalar (me)
-! CLASS(t2), INTENT(IN) :: me(:)
-! END SUBROUTINE nonscalar
+ SUBROUTINE nonscalar (me)
+ CLASS(t2), INTENT(IN) :: me(:)
+ END SUBROUTINE nonscalar
SUBROUTINE is_pointer (me)
CLASS(t2), POINTER, INTENT(IN) :: me
@@ -45,5 +44,3 @@ CONTAINS
END SUBROUTINE test
END MODULE m
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_14.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_14.f03
index 766a0ef66c..1f0d7de3b3 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_14.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_14.f03
@@ -29,5 +29,3 @@ contains
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_15.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_15.f03
index 37907b3f4d..31d10ca271 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_15.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_15.f03
@@ -30,5 +30,3 @@ contains
end subroutine
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_16.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_16.f03
index 828f510220..e43b3f8065 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_16.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_16.f03
@@ -54,5 +54,3 @@ MODULE rational_numbers
r%d = a%d*b%d
END FUNCTION
END
-
-! { dg-final { cleanup-modules "rational_numbers" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_17.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_17.f03
index 5c1a1c30c5..4bc177b17a 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_17.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_17.f03
@@ -21,6 +21,3 @@ function get_coeff(self) result(coeff)
end function get_coeff
end module array
-
-
-! { dg-final { cleanup-modules "array" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_18.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_18.f03
index 956c02e267..725cba6d64 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_18.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_18.f03
@@ -25,5 +25,3 @@ contains
end function Tree_Node_Get
end module Merger_Trees
-
-! { dg-final { cleanup-modules "merger_trees" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_19.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_19.f90
index be15bf09fc..b9068b65dd 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_19.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_19.f90
@@ -39,5 +39,3 @@ end subroutine test
call test()
end
-
-! { dg-final { cleanup-modules "mytypes" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_2.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
index 70ae2ca732..a34d935eb0 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_2.f90
@@ -29,6 +29,4 @@ CONTAINS
END FUNCTION proc2
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
! { dg-excess-errors "no IMPLICIT type" }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_20.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_20.f90
index 4fee2f3bab..47c131c5f2 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_20.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_20.f90
@@ -1,5 +1,4 @@
-! { dg-do compile }
-! TODO: make runtime testcase once bug is fixed
+! { dg-do run }
!
! PR fortran/47455
!
@@ -64,5 +63,3 @@ use class_t
type(t) :: x
call x%calc()
end
-
-! { dg-final { cleanup-modules "class_t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_21.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_21.f90
index 6c16d46ff2..382f6d8a8f 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_21.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_21.f90
@@ -23,5 +23,3 @@ contains
find_x => null()
end function find_x
end module class_t
-
-! { dg-final { cleanup-modules "class_t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_22.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_22.f90
index f7691c5f28..2d9f17c564 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_22.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_22.f90
@@ -45,5 +45,3 @@
bar = foo%getx() ! OK
bar = fooPriv%getxPriv() ! { dg-error " is PRIVATE " }
end program quicktest
-
-! { dg-final { cleanup-modules "qtest qtestpriv" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_23.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_23.f90
index ff682a41b3..0109c7478d 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_23.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_23.f90
@@ -28,5 +28,3 @@ if (it/=0) call abort()
call ice_sub(t)
if (it/=1) call abort()
end
-
-! { dg-final { cleanup-modules "ice" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_24.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_24.f03
index f200e0efbb..e8ed9186f4 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_24.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_24.f03
@@ -28,5 +28,3 @@ contains
end subroutine
end module
-
-! { dg-final { cleanup-modules "datetime_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_25.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_25.f90
index 4a68fb9db5..3646b65d91 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_25.f90
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_25.f90
@@ -106,5 +106,3 @@ end module
CALL factory%finalize() ! Destroy the object
END PROGRAM main
-
-! { dg-final { cleanup-modules "factory_pattern" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_26.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_26.f90
new file mode 100644
index 0000000000..0c4264ed13
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_26.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+!
+! PR 54147: [F03] Interface checks for PPCs & deferred TBPs
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+ interface gen
+ procedure gen
+ end interface
+
+ type, abstract :: t1
+ contains
+ procedure(gen),deferred,nopass :: p1
+ procedure(gen2),deferred,nopass :: p2 ! { dg-error "may not be generic" }
+ end type
+
+ type, abstract :: t2
+ contains
+ procedure(sf),deferred,nopass :: p3 ! { dg-error "may not be a statement function" }
+ end type
+
+ type, abstract :: t3
+ contains
+ procedure(char),deferred,nopass :: p4 ! { dg-error "Intrinsic procedure" }
+ end type
+
+ interface gen2
+ procedure gen
+ end interface
+
+ sf(x) = x**2 ! { dg-warning "Obsolescent feature" }
+
+contains
+
+ subroutine gen
+ end subroutine
+
+end
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_27.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_27.f03
new file mode 100644
index 0000000000..ce845a03b0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_27.f03
@@ -0,0 +1,92 @@
+! { dg-do run }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/47586
+! Missing deep copy for data pointer returning functions when the type
+! has allocatable components
+!
+! Original testcase by Thomas Henlich <thenlich@users.sourceforge.net>
+! Reduced by Tobias Burnus <burnus@net-b.de>
+!
+
+module m
+ type :: tx
+ integer, dimension(:), allocatable :: i
+ end type tx
+ type proc_t
+ procedure(find_x), nopass, pointer :: ppc => null()
+ contains
+ procedure, nopass :: tbp => find_x
+ end type proc_t
+
+contains
+
+ function find_x(that)
+ type(tx), target :: that
+ type(tx), pointer :: find_x
+ find_x => that
+ end function find_x
+
+end module m
+
+program prog
+
+ use m
+
+ block ! Start new scoping unit as PROGRAM implies SAVE
+ type(tx) :: this
+ type(tx), target :: that
+ type(tx), pointer :: p
+
+ type(proc_t) :: tab
+
+ allocate(that%i(2))
+ that%i = [3, 7]
+ p => that
+ this = that ! (1) direct assignment: works (deep copy)
+ that%i = [2, -5]
+ !print *,this%i
+ if(any (this%i /= [3, 7])) call abort()
+ this = p ! (2) using a pointer works as well
+ that%i = [10, 1]
+ !print *,this%i
+ if(any (this%i /= [2, -5])) call abort()
+ this = find_x(that) ! (3) pointer function: used to fail (deep copy missing)
+ that%i = [4, 6]
+ !print *,this%i
+ if(any (this%i /= [10, 1])) call abort()
+ this = tab%tbp(that) ! other case: typebound procedure
+ that%i = [8, 9]
+ !print *,this%i
+ if(any (this%i /= [4, 6])) call abort()
+ tab%ppc => find_x
+ this = tab%ppc(that) ! other case: procedure pointer component
+ that%i = [-1, 2]
+ !print *,this%i
+ if(any (this%i /= [8, 9])) call abort()
+
+ end block
+end program prog
+
+!
+! We add another check for deep copy by looking at the dump.
+! We use realloc on assignment here: if we do a deep copy for the assignment
+! to `this', we have a reallocation of `this%i'.
+! Thus, the total number of malloc calls should be the number of assignment to
+! `that%i' + the number of assignments to `this' + the number of allocate
+! statements.
+! It is assumed that if the number of allocate is right, the number of
+! deep copies is right too.
+! { dg-final { scan-tree-dump-times "__builtin_malloc" 12 "original" } }
+
+!
+! Realloc are only used for assignments to `that%i'. Don't know why.
+! { dg-final { scan-tree-dump-times "__builtin_realloc" 6 "original" } }
+!
+
+! No leak: Only assignments to `this' use malloc. Assignments to `that%i'
+! take the realloc path after the first assignment, so don't count as a malloc.
+! { dg-final { scan-tree-dump-times "__builtin_free" 7 "original" } }
+!
+! { dg-final { cleanup-tree-dump "original" } }
+
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_28.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_28.f03
new file mode 100644
index 0000000000..74199c343f
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_28.f03
@@ -0,0 +1,30 @@
+! { dg-do compile }
+!
+! PR 56266: [OOP] ICE on invalid in gfc_match_varspec
+!
+! Contributed by Andrew Benson <abensonca@gmail.com>
+
+module t
+
+ implicit none
+
+ type nc
+ contains
+ procedure :: encM => em
+ end type nc
+
+contains
+
+ double precision function em(self)
+ class(nc) :: self
+ em=0.
+ end function
+
+ double precision function cem(c)
+ type(nc) :: c
+ cem=c(i)%encM() ! { dg-error "Unclassifiable statement" }
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "t" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_29.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
new file mode 100644
index 0000000000..2650d14936
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_29.f90
@@ -0,0 +1,26 @@
+! { dg-do compile }
+!
+! PR 55959: [OOP] ICE in in gfc_simplify_expr, at fortran/expr.c:1920
+!
+! Contributed by Tilo Schwarz <tilo@tilo-schwarz.de>
+
+module pdfs
+ type :: pdf
+ contains
+ procedure, nopass :: getx
+ end type
+
+contains
+
+ real function getx()
+ end function
+
+end module
+
+program abstract
+ use pdfs
+ type(pdf) pp
+ print pp%getx() ! { dg-error "must be of type default-kind CHARACTER or of INTEGER" }
+end program
+
+! { dg-final { cleanup-modules "pdfs" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_3.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_3.f03
index 13b90c14f2..56cb9cfa82 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_3.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_3.f03
@@ -13,5 +13,3 @@ MODULE testmod
END TYPE t ! { dg-error "Fortran 2008" }
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_30.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_30.f90
new file mode 100644
index 0000000000..09b0726108
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_30.f90
@@ -0,0 +1,38 @@
+! { dg-do compile }
+!
+! PR 59143: [OOP] Bogus warning with array-valued type-bound procedure
+!
+! Contributed by Jürgen Reuter <juergen.reuter@desy.de>
+
+module phs_single
+
+ type :: phs_single_t
+ contains
+ procedure, nopass :: d1, d2
+ end type
+
+contains
+
+ subroutine evaluate (phs)
+ class(phs_single_t) :: phs
+ call func1 (phs%d1 ())
+ call func1 (phs%d2 (2))
+ end subroutine
+
+ subroutine func1 (p)
+ real :: p(2)
+ end subroutine
+
+ function d1 ()
+ real :: d1(2)
+ d1 = 1.
+ end function
+
+ function d2 (n)
+ real :: d2(n)
+ d2 = 1.
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "phs_single" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_31.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_31.f90
new file mode 100644
index 0000000000..d83a9cdb4d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_31.f90
@@ -0,0 +1,28 @@
+! { dg-do compile }
+!
+! PR 59450: [OOP] ICE for type-bound-procedure expression in module procedure interface
+!
+! Contributed by <bugs@miller-mohr.de>
+
+module classes
+
+ implicit none
+
+ type :: base_class
+ contains
+ procedure, nopass :: get_num
+ end type
+
+contains
+
+ pure integer function get_num()
+ end function
+
+ function get_array( this ) result(array)
+ class(base_class), intent(in) :: this
+ integer, dimension( this%get_num() ) :: array
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "classes" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_32.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_32.f90
new file mode 100644
index 0000000000..00ae9c7326
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_32.f90
@@ -0,0 +1,35 @@
+! { dg-do compile }
+!
+! PR 59547: [OOP] Problem with using tbp specification function in multiple class procedures
+!
+! Contributed by <bugs@miller-mohr.de>
+
+module classes
+
+ implicit none
+
+ type :: base_class
+ contains
+ procedure, nopass :: get_num
+ procedure :: get_array, get_array2
+ end type
+
+contains
+
+ pure integer function get_num()
+ get_num = 2
+ end function
+
+ function get_array( this ) result(array)
+ class(base_class), intent(in) :: this
+ integer, dimension( this%get_num() ) :: array
+ end function
+
+ function get_array2( this ) result(array)
+ class(base_class), intent(in) :: this
+ integer, dimension( this%get_num(), this%get_num() ) :: array
+ end function
+
+end module
+
+! { dg-final { cleanup-modules "classes" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_33.f90 b/gcc/testsuite/gfortran.dg/typebound_proc_33.f90
new file mode 100644
index 0000000000..68ea53fcd1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_33.f90
@@ -0,0 +1,39 @@
+! { dg-do compile }
+!
+! PR 60232: [OOP] The rank of the element in the structure constructor does not match that of the component
+!
+! Contributed by Antony Lewis <antony@cosmologist.info>
+
+module ObjectLists
+ implicit none
+
+ Type TObjectList
+ contains
+ procedure :: ArrayItem
+ end Type
+
+contains
+
+ function ArrayItem(L) result(P)
+ Class(TObjectList) :: L
+ Class(TObjectList), pointer :: P(:)
+ end function
+
+end module
+
+
+ use ObjectLists
+ implicit none
+
+ Type, extends(TObjectList):: TSampleList
+ end Type
+
+contains
+
+ subroutine TSampleList_ConfidVal(L)
+ Class(TSampleList) :: L
+ end subroutine
+
+end
+
+! { dg-final { cleanup-modules "ObjectLists" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_4.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
index 60aa728a40..9b7a4fa5dd 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_4.f03
@@ -35,5 +35,3 @@ MODULE testmod
CONTAINS
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_5.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_5.f03
index fdd15b388d..c80deed4ae 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_5.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_5.f03
@@ -115,5 +115,3 @@ CONTAINS
END SUBROUTINE proc_no_module
END PROGRAM main
-
-! { dg-final { cleanup-modules "othermod testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_6.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_6.f03
index 36dc9b1ca8..1e1d871c39 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_6.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_6.f03
@@ -72,7 +72,7 @@ MODULE testmod
PROCEDURE, NOPASS :: subroutine2 => proc_intfunc ! { dg-error "must also be a SUBROUTINE" }
PROCEDURE, NOPASS :: intfunction1 => proc_intfunc ! Ok, matching functions.
PROCEDURE, NOPASS :: intfunction2 => proc_sub ! { dg-error "must also be a FUNCTION" }
- PROCEDURE, NOPASS :: intfunction3 => proc_realfunc ! { dg-error "matching result types" }
+ PROCEDURE, NOPASS :: intfunction3 => proc_realfunc ! { dg-error "Type mismatch in function result" }
! For access-based checks.
PROCEDURE, NOPASS, PUBLIC :: priv => proc_sub ! Ok, increases visibility.
@@ -89,7 +89,7 @@ MODULE testmod
! For corresponding dummy arguments.
PROCEDURE, PASS :: corresp1 => proc_tmeint ! Ok.
PROCEDURE, PASS :: corresp2 => proc_tmeintx ! { dg-error "should be named 'a'" }
- PROCEDURE, PASS :: corresp3 => proc_tmereal ! { dg-error "Type/rank mismatch in argument 'a'" }
+ PROCEDURE, PASS :: corresp3 => proc_tmereal ! { dg-error "Type mismatch in argument 'a'" }
END TYPE t
@@ -176,5 +176,3 @@ CONTAINS
END SUBROUTINE proc_tmereal
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_7.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_7.f03
index ebf611e67e..ecde98f5dd 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_7.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_7.f03
@@ -28,5 +28,3 @@ CONTAINS
END SUBROUTINE proc_noarg
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_8.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_8.f03
index df7764d347..ed5e422b6c 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_8.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_8.f03
@@ -33,5 +33,3 @@ CONTAINS
END SUBROUTINE proc
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/typebound_proc_9.f03 b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
index 9106de6957..a6ca35bb01 100644
--- a/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
+++ b/gcc/testsuite/gfortran.dg/typebound_proc_9.f03
@@ -21,7 +21,7 @@ MODULE testmod
PROCEDURE, DEFERRED :: p2 ! { dg-error "Interface must be specified" }
PROCEDURE(intf), NOPASS :: p3 ! { dg-error "should be declared DEFERRED" }
PROCEDURE(intf), DEFERRED, NON_OVERRIDABLE :: p4 ! { dg-error "can't both" }
- PROCEDURE(unknown), DEFERRED :: p5 ! { dg-error "has no IMPLICIT|module procedure" }
+ PROCEDURE(unknown), DEFERRED :: p5 ! { dg-error "has no IMPLICIT|must be explicit" }
PROCEDURE(intf), DEFERRED, DEFERRED :: p6 ! { dg-error "Duplicate DEFERRED" }
PROCEDURE(intf), DEFERRED :: p6 => proc ! { dg-error "is invalid for DEFERRED" }
PROCEDURE(), DEFERRED :: p7 ! { dg-error "Interface-name expected" }
@@ -29,5 +29,3 @@ MODULE testmod
END TYPE abstract_type
END MODULE testmod
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03
new file mode 100644
index 0000000000..3ff1e551ee
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_1.f03
@@ -0,0 +1,211 @@
+! { dg-do run }
+!
+! Basic tests of functionality of unlimited polymorphism
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+!
+MODULE m
+ TYPE :: a
+ integer :: i
+ END TYPE
+
+contains
+ subroutine bar (arg, res)
+ class(*) :: arg
+ character(100) :: res
+ select type (w => arg)
+ type is (a)
+ write (res, '(a, I4)') "type(a)", w%i
+ type is (integer)
+ write (res, '(a, I4)') "integer", w
+ type is (real(4))
+ write (res, '(a, F4.1)') "real4", w
+ type is (real(8))
+ write (res, '(a, F4.1)') "real8", w
+ type is (character(*, kind = 4))
+ call abort
+ type is (character(*))
+ write (res, '(a, I2, a, a)') "char(", LEN(w), ")", trim(w)
+ end select
+ end subroutine
+
+ subroutine foo (arg, res)
+ class(*) :: arg (:)
+ character(100) :: res
+ select type (w => arg)
+ type is (a)
+ write (res,'(a, 10I4)') "type(a) array", w%i
+ type is (integer)
+ write (res,'(a, 10I4)') "integer array", w
+ type is (real)
+ write (res,'(a, 10F4.1)') "real array", w
+ type is (character(*))
+ write (res, '(a5, I2, a, I2, a1, 2(a))') &
+ "char(",len(w),",", size(w,1),") array ", w
+ end select
+ end subroutine
+END MODULE
+
+
+ USE m
+ TYPE(a), target :: obj1 = a(99)
+ TYPE(a), target :: obj2(3) = a(999)
+ integer, target :: obj3 = 999
+ real(4), target :: obj4(4) = [(real(i), i = 1, 4)]
+ integer, target :: obj5(3) = [(i*99, i = 1, 3)]
+ class(*), pointer :: u1
+ class(*), pointer :: u2(:)
+ class(*), allocatable :: u3
+ class(*), allocatable :: u4(:)
+ type(a), pointer :: aptr(:)
+ character(8) :: sun = "sunshine"
+ character(100) :: res
+
+ ! NULL without MOLD used to cause segfault
+ u2 => NULL()
+ u2 => NULL(aptr)
+
+! Test pointing to derived types.
+ u1 => obj1
+ if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) call abort
+ u2 => obj2
+ call bar (u1, res)
+ if (trim (res) .ne. "type(a) 99") call abort
+
+ call foo (u2, res)
+ if (trim (res) .ne. "type(a) array 999 999 999") call abort
+
+ if (SAME_TYPE_AS (obj1, u1) .neqv. .TRUE.) call abort
+
+! Check allocate with an array SOURCE.
+ allocate (u2(5), source = [(a(i), i = 1,5)])
+ if (SAME_TYPE_AS (u1, a(2)) .neqv. .TRUE.) call abort
+ call foo (u2, res)
+ if (trim (res) .ne. "type(a) array 1 2 3 4 5") call abort
+
+ deallocate (u2)
+
+! Point to intrinsic targets.
+ u1 => obj3
+ call bar (u1, res)
+ if (trim (res) .ne. "integer 999") call abort
+
+ u2 => obj4
+ call foo (u2, res)
+ if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") call abort
+
+ u2 => obj5
+ call foo (u2, res)
+ if (trim (res) .ne. "integer array 99 198 297") call abort
+
+! Test allocate with source.
+ allocate (u1, source = sun)
+ call bar (u1, res)
+ if (trim (res) .ne. "char( 8)sunshine") call abort
+ deallocate (u1)
+
+ allocate (u2(3), source = [7,8,9])
+ call foo (u2, res)
+ if (trim (res) .ne. "integer array 7 8 9") call abort
+
+ deallocate (u2)
+
+ if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) call abort
+
+ allocate (u2(3), source = [5.0,6.0,7.0])
+ call foo (u2, res)
+ if (trim (res) .ne. "real array 5.0 6.0 7.0") call abort
+
+ if (EXTENDS_TYPE_OF (obj1, u2) .neqv. .FALSE.) call abort
+ if (EXTENDS_TYPE_OF (u2, obj1) .neqv. .FALSE.) call abort
+ deallocate (u2)
+
+! Check allocate with a MOLD tag.
+ allocate (u2(3), mold = 8.0)
+ call foo (u2, res)
+ if (res(1:10) .ne. "real array") call abort
+ deallocate (u2)
+
+! Test passing an intrinsic type to a CLASS(*) formal.
+ call bar(1, res)
+ if (trim (res) .ne. "integer 1") call abort
+
+ call bar(2.0, res)
+ if (trim (res) .ne. "real4 2.0") call abort
+
+ call bar(2d0, res)
+ if (trim (res) .ne. "real8 2.0") call abort
+
+ call bar(a(3), res)
+ if (trim (res) .ne. "type(a) 3") call abort
+
+ call bar(sun, res)
+ if (trim (res) .ne. "char( 8)sunshine") call abort
+
+ call bar (obj3, res)
+ if (trim (res) .ne. "integer 999") call abort
+
+ call foo([4,5], res)
+ if (trim (res) .ne. "integer array 4 5") call abort
+
+ call foo([6.0,7.0], res)
+ if (trim (res) .ne. "real array 6.0 7.0") call abort
+
+ call foo([a(8),a(9)], res)
+ if (trim (res) .ne. "type(a) array 8 9") call abort
+
+ call foo([sun, " & rain"], res)
+ if (trim (res) .ne. "char( 8, 2)sunshine & rain") call abort
+
+ call foo([sun//" never happens", " & rain always happens"], res)
+ if (trim (res) .ne. "char(22, 2)sunshine never happens & rain always happens") call abort
+
+ call foo (obj4, res)
+ if (trim (res) .ne. "real array 1.0 2.0 3.0 4.0") call abort
+
+ call foo (obj5, res)
+ if (trim (res) .ne. "integer array 99 198 297") call abort
+
+! Allocatable entities
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) call abort
+
+ allocate (u3, source = 2.4)
+ call bar (u3, res)
+ if (trim (res) .ne. "real4 2.4") call abort
+
+ allocate (u4(2), source = [a(88), a(99)])
+ call foo (u4, res)
+ if (trim (res) .ne. "type(a) array 88 99") call abort
+
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .FALSE.) call abort
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort
+
+ deallocate (u3)
+ if (EXTENDS_TYPE_OF (obj1, u3) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u3, obj1) .neqv. .FALSE.) call abort
+
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .TRUE.) call abort
+ deallocate (u4)
+ if (EXTENDS_TYPE_OF (obj1, u4) .neqv. .TRUE.) call abort
+ if (EXTENDS_TYPE_OF (u4, obj1) .neqv. .FALSE.) call abort
+
+
+! Check assumed rank calls
+ call foobar (u3, 0)
+ call foobar (u4, 1)
+contains
+
+ subroutine foobar (arg, ranki)
+ class(*) :: arg (..)
+ integer :: ranki
+ integer i
+ i = rank (arg)
+ if (i .ne. ranki) call abort
+ end subroutine
+
+END
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_10.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_10.f90
new file mode 100644
index 0000000000..04518d6c94
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_10.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+!
+! PR fortran/58658
+!
+! Contributed by Vladimír Fuka
+!
+subroutine sub(a)
+ class(*),allocatable :: a
+ a => null() ! { dg-error "Non-POINTER in pointer association context \\(pointer assignment\\)" }
+end subroutine
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_11.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_11.f90
new file mode 100644
index 0000000000..5b73b3281d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_11.f90
@@ -0,0 +1,14 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/58652
+!
+! Contributed by Vladimir Fuka
+!
+ class(*),allocatable :: a
+ class(*),allocatable :: c
+ call move_alloc(a,c)
+end
+
+! { dg-final { scan-tree-dump "\\(struct __vtype__STAR \\*\\) c._vptr = \\(struct __vtype__STAR \\*\\) a._vptr;" "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_12.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_12.f90
new file mode 100644
index 0000000000..c583c6bbf5
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_12.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+!
+! PR fortran/58652
+!
+! Contributed by Vladimir Fuka
+!
+! The passing of a CLASS(*) to a CLASS(*) was reject before
+!
+module gen_lists
+ type list_node
+ class(*),allocatable :: item
+ contains
+ procedure :: move_alloc => list_move_alloc
+ end type
+
+ contains
+
+ subroutine list_move_alloc(self,item)
+ class(list_node),intent(inout) :: self
+ class(*),intent(inout),allocatable :: item
+
+ call move_alloc(item, self%item)
+ end subroutine
+end module
+
+module lists
+ use gen_lists, only: node => list_node
+end module lists
+
+
+module sexp
+ use lists
+contains
+ subroutine parse(ast)
+ class(*), allocatable, intent(out) :: ast
+ class(*), allocatable :: expr
+ integer :: ierr
+ allocate(node::ast)
+ select type (ast)
+ type is (node)
+ call ast%move_alloc(expr)
+ end select
+ end subroutine
+end module
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90
new file mode 100644
index 0000000000..8225738e74
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_13.f90
@@ -0,0 +1,73 @@
+! { dg-do run }
+!
+! PR fortran/58793
+!
+! Contributed by Vladimir Fuka
+!
+! Had the wrong value for the storage_size for complex
+!
+module m
+ use iso_fortran_env
+ implicit none
+ integer, parameter :: c1 = real_kinds(1)
+ integer, parameter :: c2 = real_kinds(2)
+ integer, parameter :: c3 = real_kinds(size(real_kinds)-1)
+ integer, parameter :: c4 = real_kinds(size(real_kinds))
+ real(c1) :: r1
+ real(c2) :: r2
+ real(c3) :: r3
+ real(c4) :: r4
+contains
+ subroutine s(o, k)
+ class(*) :: o
+ integer :: k
+ integer :: sz
+
+ sz = 0
+ select case (k)
+ case (4)
+ sz = storage_size(r1)*2
+ end select
+ select case (k)
+ case (8)
+ sz = storage_size(r2)*2
+ end select
+ select case (k)
+ case (real_kinds(size(real_kinds)-1))
+ sz = storage_size(r3)*2
+ end select
+ select case (k)
+ case (real_kinds(size(real_kinds)))
+ sz = storage_size(r4)*2
+ end select
+ if (sz .eq. 0) call abort()
+
+ if (storage_size(o) /= sz) call abort()
+
+! Break up the SELECT TYPE to pre-empt collisions in the value of 'cn'
+ select type (o)
+ type is (complex(c1))
+ if (storage_size(o) /= sz) call abort()
+ end select
+ select type (o)
+ type is (complex(c2))
+ if (storage_size(o) /= sz) call abort()
+ end select
+ select type (o)
+ type is (complex(c3))
+ if (storage_size(o) /= sz) call abort()
+ end select
+ select type (o)
+ type is (complex(c4))
+ if (storage_size(o) /= sz) call abort()
+ end select
+ end subroutine s
+end module m
+
+program p
+ use m
+ call s((1._c1, 2._c1), c1)
+ call s((1._c2, 2._c2), c2)
+ call s((1._c3, 2._c3), c3)
+ call s((1._c4, 2._c4), c4)
+end program p
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_14.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_14.f90
new file mode 100644
index 0000000000..215b03f64e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_14.f90
@@ -0,0 +1,26 @@
+! { dg-do run }
+!
+! Uncovered in fixing PR fortran/58793
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+! Barfed on the hollerith argument
+!
+program test
+ logical l
+ call up("abc", l)
+ if (l) call abort
+ call up(3habc, l) ! { dg-warning "Legacy Extension" }
+ if (.not. l) call abort
+contains
+ subroutine up(x, l)
+ class(*) :: x
+ logical l
+ select type(x)
+ type is (character(*))
+ l = .false.
+ class default
+ l = .true.
+ end select
+ end subroutine
+end program test
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f90
new file mode 100644
index 0000000000..1dfebdce3d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_15.f90
@@ -0,0 +1,17 @@
+! { dg-do compile }
+!
+! PR 59493: [OOP] ICE: Segfault on Class(*) pointer association
+!
+! Contributed by Hossein Talebi <talebi.hossein@gmail.com>
+
+ implicit none
+
+ type ty_mytype1
+ end type
+
+ class(ty_mytype1), allocatable, target:: cla1
+ class(*), pointer :: ptr
+
+ ptr => cla1
+
+end
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90
new file mode 100644
index 0000000000..99e186d5c1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_16.f90
@@ -0,0 +1,24 @@
+! { dg-do compile }
+!
+! PR 60359: [OOP] symbol `__io_MOD___copy_character_1' is already defined
+!
+! Contributed by Antony Lewis <antony@cosmologist.info>
+
+module IO
+implicit none
+
+contains
+
+ subroutine FWRite(S)
+ class(*) :: S
+ end subroutine
+
+ subroutine IO_OutputMargeStats()
+ character(len=128) tag
+ call FWrite(tag)
+ call FWrite(' '//tag)
+ end subroutine
+
+end module
+
+! { dg-final { cleanup-modules "IO" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90
new file mode 100644
index 0000000000..0fcff74b91
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_17.f90
@@ -0,0 +1,51 @@
+! { dg-do run }
+! Tests fix for PR60717 in which offsets in recursive calls below
+! were not being set correctly.
+!
+! Reported on comp.lang.fortran by Thomas Schnurrenberger
+!
+module m
+ implicit none
+ real :: chksum0 = 0, chksum1 = 0, chksum2 = 0
+contains
+ recursive subroutine show_real(a)
+ real, intent(in) :: a(:)
+ if (size (a) > 0) then
+ chksum0 = a(1) + chksum0
+ call show_real (a(2:))
+ end if
+ return
+ end subroutine show_real
+ recursive subroutine show_generic1(a)
+ class(*), intent(in) :: a(:)
+ if (size (a) > 0) then
+ select type (a)
+ type is (real)
+ chksum1 = a(1) + chksum1
+ end select
+ call show_generic1 (a(2:)) ! recursive call outside SELECT TYPE
+ end if
+ return
+ end subroutine show_generic1
+ recursive subroutine show_generic2(a)
+ class(*), intent(in) :: a(:)
+ if (size (a) > 0) then
+ select type (a)
+ type is (real)
+ chksum2 = a(1) + chksum2
+ call show_generic2 (a(2:)) ! recursive call inside SELECT TYPE
+ end select
+ end if
+ return
+ end subroutine show_generic2
+end module m
+program test
+ use :: m
+ implicit none
+ real :: array(1:6) = (/ 0, 1, 2, 3, 4, 5 /)
+ call show_real (array)
+ call show_generic1 (array)
+ call show_generic2 (array)
+ if (chksum0 .ne. chksum1) call abort
+ if (chksum0 .ne. chksum2) call abort
+end program test
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03
new file mode 100644
index 0000000000..8e80386f3d
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_2.f03
@@ -0,0 +1,80 @@
+! { dg-do compile }
+!
+! Test the most important constraints unlimited polymorphic entities
+!
+! Contributed by Paul Thomas <pault@gcc.gnu.org>
+! and Tobias Burnus <burnus@gcc.gnu.org>
+!
+ CHARACTER(:), allocatable, target :: chr ! { dg-error "TODO: Deferred character length variable" }
+! F2008: C5100
+ integer :: i(2)
+ logical :: flag
+ class(*), pointer :: u1, u2(:) ! { dg-error "cannot appear in COMMON" }
+ common u1
+ u1 => chr
+! F2003: C625
+ allocate (u1) ! { dg-error "requires either a type-spec or SOURCE tag" }
+ allocate (real :: u1)
+ Allocate (u1, source = 1.0)
+
+! F2008: C4106
+ u2 = [u1] ! { dg-error "shall not be unlimited polymorphic" }
+
+ i = u2 ! { dg-error "Can\\'t convert CLASS\\(\\*\\)" }
+
+! Repeats same_type_as_1.f03 for unlimited polymorphic u2
+ flag = same_type_as (i, u2) ! { dg-error "cannot be of type INTEGER" }
+ flag = extends_type_of (i, u2) ! { dg-error "cannot be of type INTEGER" }
+
+contains
+
+! C717 (R735) If data-target is unlimited polymorphic,
+! data-pointer-object shall be unlimited polymorphic, of a sequence
+! derived type, or of a type with the BIND attribute.
+!
+ subroutine bar
+
+ type sq
+ sequence
+ integer :: i
+ end type sq
+
+ type(sq), target :: x
+ class(*), pointer :: y
+ integer, pointer :: tgt
+
+ x%i = 42
+ y => x
+ call foo (y)
+
+ y => tgt ! This is OK, of course.
+ tgt => y ! { dg-error "must be unlimited polymorphic" }
+
+ select type (y) ! This is the correct way to accomplish the previous
+ type is (integer)
+ tgt => y
+ end select
+
+ end subroutine bar
+
+
+ subroutine foo(tgt)
+ class(*), pointer, intent(in) :: tgt
+ type t
+ sequence
+ integer :: k
+ end type t
+
+ type(t), pointer :: ptr
+
+ ptr => tgt ! C717 allows this.
+
+ select type (tgt)
+! F03:C815 or F08:C839
+ type is (t) ! { dg-error "shall not specify a sequence derived type" }
+ ptr => tgt ! { dg-error "Expected TYPE IS" }
+ end select
+
+ print *, ptr%k
+ end subroutine foo
+END
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_3.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_3.f03
new file mode 100644
index 0000000000..05a4b3f54e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_3.f03
@@ -0,0 +1,53 @@
+! { dg-do run }
+!
+! Check that pointer assignments allowed by F2003:C717
+! work and check null initialization of CLASS(*) pointers.
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+program main
+ interface
+ subroutine foo(z)
+ class(*), pointer, intent(in) :: z
+ end subroutine foo
+ end interface
+ type sq
+ sequence
+ integer :: i
+ end type sq
+ type(sq), target :: x
+ class(*), pointer :: y, z
+ x%i = 42
+ y => x
+ z => y ! unlimited => unlimited allowed
+ call foo (z)
+ call bar
+contains
+ subroutine bar
+ type t
+ end type t
+ type(t), pointer :: x
+ class(*), pointer :: ptr1 => null() ! pointer initialization
+ if (same_type_as (ptr1, x) .neqv. .FALSE.) call abort
+ end subroutine bar
+
+end program main
+
+
+subroutine foo(tgt)
+ use iso_c_binding
+ class(*), pointer, intent(in) :: tgt
+ type, bind(c) :: s
+ integer (c_int) :: k
+ end type s
+ type t
+ sequence
+ integer :: k
+ end type t
+ type(s), pointer :: ptr1
+ type(t), pointer :: ptr2
+ ptr1 => tgt ! bind(c) => unlimited allowed
+ if (ptr1%k .ne. 42) call abort
+ ptr2 => tgt ! sequence type => unlimited allowed
+ if (ptr2%k .ne. 42) call abort
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_4.f03 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_4.f03
new file mode 100644
index 0000000000..d289b69199
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_4.f03
@@ -0,0 +1,41 @@
+! { dg-do compile }
+!
+! Fix PR55763
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+!
+module mpi_f08_f
+ implicit none
+ abstract interface
+ subroutine user_function( inoutvec )
+ class(*), dimension(:), intent(inout) :: inoutvec
+ end subroutine user_function
+ end interface
+end module
+
+module mod_test1
+ use mpi_f08_f
+ implicit none
+contains
+ subroutine my_function( invec ) ! { dg-error "no IMPLICIT type" }
+ class(*), dimension(:), intent(inout) :: inoutvec ! { dg-error "not a DUMMY" }
+
+ select type (inoutvec)
+ type is (integer)
+ inoutvec = 2*inoutvec
+ end select
+ end subroutine my_function
+end module
+
+module mod_test2
+ use mpi_f08_f
+ implicit none
+contains
+ subroutine my_function( inoutvec ) ! Used to produce a BOGUS ERROR
+ class(*), dimension(:), intent(inout) :: inoutvec
+
+ select type (inoutvec)
+ type is (integer)
+ inoutvec = 2*inoutvec
+ end select
+ end subroutine my_function
+end module
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_5.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_5.f90
new file mode 100644
index 0000000000..12a3c4a562
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_5.f90
@@ -0,0 +1,41 @@
+! { dg-do run }
+!
+! PR fortran/55763
+!
+! Based on Reinhold Bader's test case
+!
+
+program mvall_03
+ implicit none
+ integer, parameter :: n1 = 100, n2 = 200
+ class(*), allocatable :: i1(:), i3(:)
+ integer, allocatable :: i2(:)
+
+ allocate(real :: i1(n1))
+ allocate(i2(n2))
+ i2 = 2
+ call move_alloc(i2, i1)
+ if (size(i1) /= n2 .or. allocated(i2)) then
+ call abort
+! write(*,*) 'FAIL'
+ else
+! write(*,*) 'OK'
+ end if
+
+ select type (i1)
+ type is (integer)
+ if (any (i1 /= 2)) call abort
+ class default
+ call abort()
+ end select
+ call move_alloc (i1, i3)
+ if (size(i3) /= n2 .or. allocated(i1)) then
+ call abort()
+ end if
+ select type (i3)
+ type is (integer)
+ if (any (i3 /= 2)) call abort
+ class default
+ call abort()
+ end select
+end program
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_6.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_6.f90
new file mode 100644
index 0000000000..a64f4e393e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_6.f90
@@ -0,0 +1,37 @@
+! { dg-do run }
+!
+! PR fortran/55763
+!
+! Contributed by Reinhold Bader
+!
+module mod_alloc_scalar_01
+contains
+ subroutine construct(this)
+ class(*), allocatable, intent(out) :: this
+ integer :: this_i
+ this_i = 4
+ allocate(this, source=this_i)
+ end subroutine
+end module
+
+program alloc_scalar_01
+ use mod_alloc_scalar_01
+ implicit none
+ class(*), allocatable :: mystuff
+
+ call construct(mystuff)
+ call construct(mystuff)
+
+ select type(mystuff)
+ type is (integer)
+ if (mystuff == 4) then
+! write(*,*) 'OK'
+ else
+ call abort()
+! write(*,*) 'FAIL 1'
+ end if
+ class default
+ call abort()
+! write(*,*) 'FAIL 2'
+ end select
+end program
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_7.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_7.f90
new file mode 100644
index 0000000000..3bd4d4d734
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_7.f90
@@ -0,0 +1,19 @@
+! { dg-do compile }
+!
+! PR fortran/55763
+!
+! Contributed by Harald Anlauf
+!
+
+module gfcbug121
+ implicit none
+ type myobj
+ class(*), allocatable :: x
+ contains
+ procedure :: print
+ end type myobj
+contains
+ subroutine print(this)
+ class(myobj) :: this
+ end subroutine print
+end module gfcbug121
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f90
new file mode 100644
index 0000000000..3b40e131ef
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_8.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+! { dg-options "-fdump-tree-original" }
+!
+! PR fortran/55854
+!
+! Contributed by Damian Rouson
+!
+
+ type foo
+ class(*), allocatable :: x
+ end type
+contains
+ subroutine bar(this)
+ type(foo), intent(out) :: this
+ end
+end
+
+! { dg-final { scan-tree-dump-times "foo.0.x._data = 0B;" 1 "original" } }
+! { dg-final { scan-tree-dump-times "foo.0.x._vptr = .* &__vtab__STAR;" 1 "original" } }
+! { dg-final { cleanup-tree-dump "original" } }
diff --git a/gcc/testsuite/gfortran.dg/unlimited_polymorphic_9.f90 b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_9.f90
new file mode 100644
index 0000000000..5b7fe92e9e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unlimited_polymorphic_9.f90
@@ -0,0 +1,20 @@
+! { dg-do compile }
+!
+! PR 57639: [OOP] ICE with polymorphism (and illegal code)
+!
+! Contributed by Walter Spector <w6ws@earthlink.net>
+
+ implicit none
+
+ class(*) :: t1, t2 ! { dg-error "must be dummy, allocatable or pointer" }
+
+ print *, 'main: compare = ', compare (t1, t2)
+ print *, SAME_TYPE_AS (t1, t2)
+
+contains
+
+ logical function compare (a, b)
+ class(*), intent(in), allocatable :: a, b
+ end function
+
+end
diff --git a/gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f90 b/gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f90
index b2fdd79cb6..1f36b2d12d 100644
--- a/gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f90
+++ b/gcc/testsuite/gfortran.dg/unreferenced_use_assoc_1.f90
@@ -37,4 +37,3 @@ program main
call DoSomethingWithBytes( UserTypeToBytes(user) )
end program
-! { dg-final { cleanup-modules "internalcompilererror" } }
diff --git a/gcc/testsuite/gfortran.dg/unresolved_fixup_1.f90 b/gcc/testsuite/gfortran.dg/unresolved_fixup_1.f90
new file mode 100644
index 0000000000..07fbce3d59
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unresolved_fixup_1.f90
@@ -0,0 +1,44 @@
+! { dg-do compile }
+!
+! PR fortran/58007
+! Unresolved fixup while loading a module.
+!
+! This tests that the specification expression A%MAX_DEGREE in module BSR is
+! correctly loaded and resolved in program MAIN.
+!
+! Original testcase from Daniel Shapiro <shapero@uw.edu>
+! Reduced by Tobias Burnus <burnus@net-b.de> and Janus Weil <janus@gcc.gnu.org>
+
+module matrix
+ type :: sparse_matrix
+ integer :: max_degree
+ end type
+contains
+ subroutine init_interface (A)
+ class(sparse_matrix), intent(in) :: A
+ end subroutine
+ real function get_value_interface()
+ end function
+end module
+
+module ellpack
+ use matrix
+end module
+
+module bsr
+ use matrix
+ type, extends(sparse_matrix) :: bsr_matrix
+ contains
+ procedure :: get_neighbors
+ end type
+contains
+ function get_neighbors (A)
+ class(bsr_matrix), intent(in) :: A
+ integer :: get_neighbors(A%max_degree)
+ end function
+end module
+
+program main
+ use ellpack
+ use bsr
+end
diff --git a/gcc/testsuite/gfortran.dg/unresolved_fixup_2.f90 b/gcc/testsuite/gfortran.dg/unresolved_fixup_2.f90
new file mode 100644
index 0000000000..ca0a05a629
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/unresolved_fixup_2.f90
@@ -0,0 +1,36 @@
+! { dg-do compile }
+!
+! PR fortran/58007
+! Unresolved fiixup while loading a module.
+!
+! This tests that the specification expression A%MAX_DEGREE in module BSR is
+! correctly loaded and resolved in program MAIN.
+!
+! Original testcase from Daniel Shapiro <shapero@uw.edu>
+
+module matrix
+ type :: sparse_matrix
+ integer :: max_degree
+ end type
+end module
+
+module bsr
+ use matrix
+
+ type, extends(sparse_matrix) :: bsr_matrix
+ end type
+
+ integer :: i1
+ integer :: i2
+ integer :: i3
+contains
+ function get_neighbors (A)
+ type(bsr_matrix), intent(in) :: A
+ integer :: get_neighbors(A%max_degree)
+ end function
+end module
+
+program main
+ use matrix
+ use bsr
+end
diff --git a/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90 b/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
index bfeceaf574..68ceee7af3 100644
--- a/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
+++ b/gcc/testsuite/gfortran.dg/unused_artificial_dummies_1.f90
@@ -47,4 +47,3 @@ contains
end function
end module foo
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/use_1.f90 b/gcc/testsuite/gfortran.dg/use_1.f90
index 2750d10d9b..46d8fa9ea2 100644
--- a/gcc/testsuite/gfortran.dg/use_1.f90
+++ b/gcc/testsuite/gfortran.dg/use_1.f90
@@ -6,4 +6,3 @@
subroutine bar1
usefoo
end
- ! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/use_10.f90 b/gcc/testsuite/gfortran.dg/use_10.f90
index 3c752ed038..e52fcff7e5 100644
--- a/gcc/testsuite/gfortran.dg/use_10.f90
+++ b/gcc/testsuite/gfortran.dg/use_10.f90
@@ -27,5 +27,3 @@ operator(.my.)=>operator(.op.),operator(.ops.)=>operator(.op.)
implicit none
if (.my.2 /= -2 .or. .op.3 /= -3 .or. .ops.7 /= -7) call abort()
end
-
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/use_11.f90 b/gcc/testsuite/gfortran.dg/use_11.f90
index ba7cf09950..1353099848 100644
--- a/gcc/testsuite/gfortran.dg/use_11.f90
+++ b/gcc/testsuite/gfortran.dg/use_11.f90
@@ -15,4 +15,3 @@ local1 = 5
local2 = 3
if (local1 .ne. local2) call abort ()
end
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/use_12.f90 b/gcc/testsuite/gfortran.dg/use_12.f90
index 7406dc4338..9a0c78c12c 100644
--- a/gcc/testsuite/gfortran.dg/use_12.f90
+++ b/gcc/testsuite/gfortran.dg/use_12.f90
@@ -23,4 +23,3 @@ program kmeans_driver
integer :: nfirst(3)
nfirst(1:numclusters) = get_nfirst( )
end program kmeans_driver
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/use_13.f90 b/gcc/testsuite/gfortran.dg/use_13.f90
index 1fe7b1eacf..2f6d4e7efc 100644
--- a/gcc/testsuite/gfortran.dg/use_13.f90
+++ b/gcc/testsuite/gfortran.dg/use_13.f90
@@ -42,4 +42,3 @@ end module m2
use m2
call test()
end
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/use_14.f90 b/gcc/testsuite/gfortran.dg/use_14.f90
index 4ea5aed760..63f3dff98b 100644
--- a/gcc/testsuite/gfortran.dg/use_14.f90
+++ b/gcc/testsuite/gfortran.dg/use_14.f90
@@ -17,5 +17,3 @@ subroutine my_sub (a)
end subroutine
END
-
-! { dg-final { cleanup-modules "test_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/use_15.f90 b/gcc/testsuite/gfortran.dg/use_15.f90
index 099588836e..bd5920aa03 100644
--- a/gcc/testsuite/gfortran.dg/use_15.f90
+++ b/gcc/testsuite/gfortran.dg/use_15.f90
@@ -35,5 +35,3 @@ subroutine my_sub3 (a)
end subroutine
END
-
-! { dg-final { cleanup-modules "test_mod test_mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/use_16.f90 b/gcc/testsuite/gfortran.dg/use_16.f90
index 35176deeda..7b22c41503 100644
--- a/gcc/testsuite/gfortran.dg/use_16.f90
+++ b/gcc/testsuite/gfortran.dg/use_16.f90
@@ -14,5 +14,3 @@ use a ! { dg-error "Symbol 'bar' at \\(1\\) conflicts with symbol from module 'a
implicit none
integer :: bar ! { dg-error "Symbol 'bar' at \\(1\\) conflicts with symbol from module 'a'" }
end
-
-! { dg-final { cleanup-modules "a" } }
diff --git a/gcc/testsuite/gfortran.dg/use_17.f90 b/gcc/testsuite/gfortran.dg/use_17.f90
index b1b002e631..d513920332 100644
--- a/gcc/testsuite/gfortran.dg/use_17.f90
+++ b/gcc/testsuite/gfortran.dg/use_17.f90
@@ -35,5 +35,3 @@ subroutine test1
integer :: c_double
integer, parameter :: p1 = c_int, p2 = c_double_orig
end subroutine test1
-
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/use_18.f90 b/gcc/testsuite/gfortran.dg/use_18.f90
index a46cdc4074..7975acd23e 100644
--- a/gcc/testsuite/gfortran.dg/use_18.f90
+++ b/gcc/testsuite/gfortran.dg/use_18.f90
@@ -47,5 +47,3 @@ type(t2) :: k = t2(1), l = t2(2)
print *, i*j
print *, k > l
end
-
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/use_19.f90 b/gcc/testsuite/gfortran.dg/use_19.f90
index 5ddc5d153b..83ef713ce5 100644
--- a/gcc/testsuite/gfortran.dg/use_19.f90
+++ b/gcc/testsuite/gfortran.dg/use_19.f90
@@ -7,5 +7,3 @@ end module m
use m, only: operator(/) ! { dg-error "Intrinsic operator '/' referenced at .1. not found in module 'm'" }
end
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/use_20.f90 b/gcc/testsuite/gfortran.dg/use_20.f90
index 61a15d9e40..86e750987b 100644
--- a/gcc/testsuite/gfortran.dg/use_20.f90
+++ b/gcc/testsuite/gfortran.dg/use_20.f90
@@ -45,5 +45,3 @@ module merry_ICE
use foo, only: foo_t ! <------ change order to prevent ICE
use bar, only: bar_t ! <------ change order to prevent ICE
end module merry_ICE
-
-! { dg-final { cleanup-modules "foo bar merry_ice" } }
diff --git a/gcc/testsuite/gfortran.dg/use_21.f90 b/gcc/testsuite/gfortran.dg/use_21.f90
index eba412d9d7..4ec17513ec 100644
--- a/gcc/testsuite/gfortran.dg/use_21.f90
+++ b/gcc/testsuite/gfortran.dg/use_21.f90
@@ -31,5 +31,3 @@ program ala
implicit none
call dom%init
end program ala
-
-! { dg-final { cleanup-modules "domain" } }
diff --git a/gcc/testsuite/gfortran.dg/use_28.f90 b/gcc/testsuite/gfortran.dg/use_28.f90
new file mode 100644
index 0000000000..4972bea4f7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/use_28.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+!
+! PR fortran/47203
+! The USE statement of a module was not rejected in a procedure with the same
+! name if the procedure was contained.
+!
+! Contributed by Tobias Burnus <burnus@net-b.de>
+
+module m
+end module m
+
+call m
+contains
+ subroutine m()
+ use m ! { dg-error "is also the name of the current program unit" }
+ end subroutine m
+end
+
diff --git a/gcc/testsuite/gfortran.dg/use_29.f90 b/gcc/testsuite/gfortran.dg/use_29.f90
new file mode 100644
index 0000000000..89dfe50931
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/use_29.f90
@@ -0,0 +1,15 @@
+! { dg-do compile }
+!
+! PR fortran/57435
+!
+! Contributed by Lorenz Hüdepohl
+!
+module precision
+end module precision
+ contains
+ use precision ! { dg-error "Unexpected USE statement in CONTAINS section" }
+module stressten_rt ! { dg-error "Unexpected MODULE statement in CONTAINS section" }
+ use precision ! { dg-error "Unexpected USE statement in CONTAINS section" }
+ implicit none ! { dg-error "Unexpected IMPLICIT NONE statement in CONTAINS section" }
+
+! { dg-error "Unexpected end of file" "" { target "*-*-*" } 0 }
diff --git a/gcc/testsuite/gfortran.dg/use_3.f90 b/gcc/testsuite/gfortran.dg/use_3.f90
index 54100d191d..1cfc71b2c2 100644
--- a/gcc/testsuite/gfortran.dg/use_3.f90
+++ b/gcc/testsuite/gfortran.dg/use_3.f90
@@ -9,4 +9,3 @@ end module foo
use, nonintrinsic :: iso_fortran_env ! { dg-error "shall be either INTRINSIC or NON_INTRINSIC" }
use, intrinsic :: iso_fortran_env
end
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/use_4.f90 b/gcc/testsuite/gfortran.dg/use_4.f90
index b7249b0f0d..a05689d377 100644
--- a/gcc/testsuite/gfortran.dg/use_4.f90
+++ b/gcc/testsuite/gfortran.dg/use_4.f90
@@ -31,4 +31,3 @@ program test_foo
use foo, only: i => foo! { dg-error "been used as an external module name" }
use foo, only: foo => i! { dg-error "been used as an external module name" }
end program
-! { dg-final { cleanup-modules "foo bar test test2 test3" } }
diff --git a/gcc/testsuite/gfortran.dg/use_5.f90 b/gcc/testsuite/gfortran.dg/use_5.f90
index 0554f394a3..44f5389a38 100644
--- a/gcc/testsuite/gfortran.dg/use_5.f90
+++ b/gcc/testsuite/gfortran.dg/use_5.f90
@@ -45,5 +45,3 @@ use z
if ((.my. i) /= 2+15) call abort ()
if ((.addfive. i) /= 2+5) call abort ()
end
-
-! { dg-final { cleanup-modules "x y z" } }
diff --git a/gcc/testsuite/gfortran.dg/use_6.f90 b/gcc/testsuite/gfortran.dg/use_6.f90
index 2be10b76bf..0579e830f7 100644
--- a/gcc/testsuite/gfortran.dg/use_6.f90
+++ b/gcc/testsuite/gfortran.dg/use_6.f90
@@ -41,5 +41,3 @@ use x, only : operator(.bar.) => operator(.addfive.) ! { dg-error "Fortran 2003:
use y, operator(.my.) => operator(.addfive.) ! { dg-error "Fortran 2003: Renaming operators in USE statements" }
use z
end
-
-! { dg-final { cleanup-modules "x y z" } }
diff --git a/gcc/testsuite/gfortran.dg/use_7.f90 b/gcc/testsuite/gfortran.dg/use_7.f90
index 7ebd1e2bf2..5e0b3c7c6c 100644
--- a/gcc/testsuite/gfortran.dg/use_7.f90
+++ b/gcc/testsuite/gfortran.dg/use_7.f90
@@ -45,5 +45,3 @@ use x, only : bar => operator(.addfive.) ! { dg-error "Syntax error in USE state
use y, operator(.my.) => sub ! { dg-error "Syntax error in USE statement" }
use y, operator(+) => operator(.addfive.) ! { dg-error "Syntax error in USE statement" }
end
-
-! { dg-final { cleanup-modules "x y z" } }
diff --git a/gcc/testsuite/gfortran.dg/use_9.f90 b/gcc/testsuite/gfortran.dg/use_9.f90
index 419ef47f92..588f29dec9 100644
--- a/gcc/testsuite/gfortran.dg/use_9.f90
+++ b/gcc/testsuite/gfortran.dg/use_9.f90
@@ -13,4 +13,3 @@ end module test
use test, only: operator(.func.) ! { dg-error "not found in module 'test'" }
end
-! { dg-final { cleanup-modules "test" } }
diff --git a/gcc/testsuite/gfortran.dg/use_allocated_1.f90 b/gcc/testsuite/gfortran.dg/use_allocated_1.f90
index e590f6a956..fb51502edc 100644
--- a/gcc/testsuite/gfortran.dg/use_allocated_1.f90
+++ b/gcc/testsuite/gfortran.dg/use_allocated_1.f90
@@ -16,5 +16,3 @@ subroutine init
use foo
if (.not.allocated(bar)) call abort
end subroutine init
-
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/use_iso_c_binding.f90 b/gcc/testsuite/gfortran.dg/use_iso_c_binding.f90
index 8a28490f7b..99323d6017 100644
--- a/gcc/testsuite/gfortran.dg/use_iso_c_binding.f90
+++ b/gcc/testsuite/gfortran.dg/use_iso_c_binding.f90
@@ -46,5 +46,3 @@ module use_stmt_7
! --Rickett, 09.13.06
use iso_c_binding, only: c_int, c_int
end module use_stmt_7
-
-! { dg-final { cleanup-modules "use_stmt_2 use_stmt_3 use_stmt_4 use_stmt_5 use_stmt_6 use_stmt_7" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_1.f90 b/gcc/testsuite/gfortran.dg/use_only_1.f90
index e013243841..c40e751c65 100644
--- a/gcc/testsuite/gfortran.dg/use_only_1.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_1.f90
@@ -89,4 +89,3 @@ contains
if (yfoobar (77) /= 77_4) call abort ()
end subroutine
END PROGRAM test2uses
-! { dg-final { cleanup-modules "xmod ymod" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_2.f90 b/gcc/testsuite/gfortran.dg/use_only_2.f90
index a2bfb30099..71db83cf7b 100644
--- a/gcc/testsuite/gfortran.dg/use_only_2.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_2.f90
@@ -27,4 +27,3 @@ end module MyMod3
module MyMod4
USE MyMod3, only: write_MyInt
end module MYMOD4
-! { dg-final { cleanup-modules "mymod1 mymod2 mymod3 mymod4" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_3.f90 b/gcc/testsuite/gfortran.dg/use_only_3.f90
index 509752a7ba..ebb39289fc 100644
--- a/gcc/testsuite/gfortran.dg/use_only_3.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_3.f90
@@ -32,7 +32,4 @@ subroutine dforceb(c0, i, betae, ipol, bec0, ctabin, gqq, gqqm, qmat, dq2, df)
& dq2, gmes
end subroutine dforceb
-! { dg-final { cleanup-modules "cell_base cvan gvecs kinds" } }
-! { dg-final { cleanup-modules "constants electrons_base gvecw parameters" } }
-! { dg-final { cleanup-modules "control_flags electrons_nose ions_base" } }
-
+! { dg-final { cleanup-modules "cell_base constants control_flags cvan electrons_base electrons_nose gvecs gvecw ions_base kinds parameters" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_4.f90 b/gcc/testsuite/gfortran.dg/use_only_4.f90
index a37db45ef7..6a6cb067af 100644
--- a/gcc/testsuite/gfortran.dg/use_only_4.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_4.f90
@@ -31,4 +31,3 @@ end module m2
use m2
call two
end
-! { dg-final { cleanup-modules "m1 m2" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_5.f90 b/gcc/testsuite/gfortran.dg/use_only_5.f90
index 56d33f4275..fb169810a4 100644
--- a/gcc/testsuite/gfortran.dg/use_only_5.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_5.f90
@@ -34,5 +34,3 @@ module m_common_namespaces
use m_common_attrs, only: dictionary_t
use m_common_attrs, only: get_prefix_by_index
end module m_common_namespaces
-
-! { dg-final { cleanup-modules "m_common_attrs m_common_namespaces" } }
diff --git a/gcc/testsuite/gfortran.dg/use_only_6.f90 b/gcc/testsuite/gfortran.dg/use_only_6.f90
index c2b3bfd9da..bc15fdb065 100644
--- a/gcc/testsuite/gfortran.dg/use_only_6.f90
+++ b/gcc/testsuite/gfortran.dg/use_only_6.f90
@@ -11,4 +11,3 @@ subroutine aa()
implicit none
a = 1
end subroutine aa
-! { dg-final { cleanup-modules "mm" } }
diff --git a/gcc/testsuite/gfortran.dg/use_rename_1.f90 b/gcc/testsuite/gfortran.dg/use_rename_1.f90
index 2e9a3c8652..5feda7ad40 100644
--- a/gcc/testsuite/gfortran.dg/use_rename_1.f90
+++ b/gcc/testsuite/gfortran.dg/use_rename_1.f90
@@ -24,4 +24,3 @@ subroutine read_initial_config_nml2()
integer :: nmoltype_phase
namelist /confNmoltypePhase/ nmoltype_phase
end subroutine read_initial_config_nml2
-! { dg-final { cleanup-modules "common_init_conf" } }
diff --git a/gcc/testsuite/gfortran.dg/use_rename_2.f90 b/gcc/testsuite/gfortran.dg/use_rename_2.f90
index 3ca6f698af..3688bc8fd3 100644
--- a/gcc/testsuite/gfortran.dg/use_rename_2.f90
+++ b/gcc/testsuite/gfortran.dg/use_rename_2.f90
@@ -22,5 +22,3 @@ contains
if (b .ne. 5) call abort ()
end subroutine test2
end
-
-! { dg-final { cleanup-modules "reduction5" } }
diff --git a/gcc/testsuite/gfortran.dg/use_rename_3.f90 b/gcc/testsuite/gfortran.dg/use_rename_3.f90
index 9f28e2ee70..33b21e59e1 100644
--- a/gcc/testsuite/gfortran.dg/use_rename_3.f90
+++ b/gcc/testsuite/gfortran.dg/use_rename_3.f90
@@ -32,4 +32,3 @@ program main
print *, 'Is flag'
endif
end program
-! { dg-final { cleanup-modules "funcinterfacemod secondmod" } }
diff --git a/gcc/testsuite/gfortran.dg/use_rename_4.f90 b/gcc/testsuite/gfortran.dg/use_rename_4.f90
index 4ce7104017..e0e83b8918 100644
--- a/gcc/testsuite/gfortran.dg/use_rename_4.f90
+++ b/gcc/testsuite/gfortran.dg/use_rename_4.f90
@@ -20,5 +20,3 @@ PROGRAM main
CALL abort ()
END IF
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/use_rename_5.f90 b/gcc/testsuite/gfortran.dg/use_rename_5.f90
index 09f87c4053..3d7839a0d1 100644
--- a/gcc/testsuite/gfortran.dg/use_rename_5.f90
+++ b/gcc/testsuite/gfortran.dg/use_rename_5.f90
@@ -15,5 +15,3 @@ PROGRAM main
i = 4 ! { dg-error "no IMPLICIT type" }
j = 5
END PROGRAM main
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/used_before_typed_3.f90 b/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
index ab1b2a91f0..5654d97688 100644
--- a/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
+++ b/gcc/testsuite/gfortran.dg/used_before_typed_3.f90
@@ -37,5 +37,3 @@ END FUNCTION test4
! Test an empty function works, too.
INTEGER FUNCTION test5 ()
END FUNCTION test5
-
-! { dg-final { cleanup-modules "testmod" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_1.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_1.f90
index 0cf01bb50e..30f3d4cdd1 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_1.f90
@@ -34,5 +34,3 @@ end module atest
call test (res)
if (res%a.ne.42) call abort
end
-
-! { dg-final { cleanup-modules "mtyp atest" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_2.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_2.f90
index a47cabc430..f12d2864d0 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_2.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_2.f90
@@ -30,5 +30,3 @@ contains
v = x%f2(:)
end subroutine foo
end module mod2
-
-! { dg-final { cleanup-modules "mod1 mod2" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_3.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_3.f90
index c7e373a046..5ff7608424 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_3.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_3.f90
@@ -33,5 +33,3 @@
TYPE(data_type) :: x
CALL TEST(x) ! { dg-error "Type mismatch in argument" }
END
-
-! { dg-final { cleanup-modules "t1 t2" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_4.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_4.f90
index fb36fa7bfb..9a627b82cc 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_4.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_4.f90
@@ -98,5 +98,3 @@ contains
y = seq_type3 (99)
end subroutine foo
END
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_5.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_5.f90
index 2000c3271f..10c90c4ca6 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_5.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_5.f90
@@ -82,5 +82,3 @@ contains
print *, x, y, z, dt2, st2, ns2, ns1
end subroutine foo
END
-
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_6.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_6.f90
index ea39051223..5b1c79765e 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_6.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_6.f90
@@ -43,5 +43,3 @@ MODULE P_POTENTIAL_ENERGY
USE ATOMS
USE CONSTRAINT, ONLY : ENERGY_CONSTRAINT
END MODULE P_POTENTIAL_ENERGY
-
-! { dg-final { cleanup-modules "atoms constraint potential_energy p_constraint p_potential_energy" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_7.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_7.f90
index b0acc51409..c3dea45c86 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_7.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_7.f90
@@ -42,4 +42,3 @@ INTERFACE
END SUBROUTINE
END INTERFACE
END MODULE
-! { dg-final { cleanup-modules "atom types list" } }
diff --git a/gcc/testsuite/gfortran.dg/used_dummy_types_8.f90 b/gcc/testsuite/gfortran.dg/used_dummy_types_8.f90
index 8a966a80a5..84233841c8 100644
--- a/gcc/testsuite/gfortran.dg/used_dummy_types_8.f90
+++ b/gcc/testsuite/gfortran.dg/used_dummy_types_8.f90
@@ -32,4 +32,3 @@ END MODULE M1
D1=T1(3)
write(6,*) E1(D1)
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/used_interface_ref.f90 b/gcc/testsuite/gfortran.dg/used_interface_ref.f90
index 10746c795c..1b241e976a 100644
--- a/gcc/testsuite/gfortran.dg/used_interface_ref.f90
+++ b/gcc/testsuite/gfortran.dg/used_interface_ref.f90
@@ -43,5 +43,3 @@
REAL :: solveCConvert(1:anzKomponenten)
solveCConvert = (/(real(i), i = 1, anzKomponenten)/)
END FUNCTION solveCConvert
-
-! { dg-final { cleanup-modules "module_conc module_thermocalc" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_1.f90 b/gcc/testsuite/gfortran.dg/used_types_1.f90
index 4fbd328910..61356ab2c5 100644
--- a/gcc/testsuite/gfortran.dg/used_types_1.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_1.f90
@@ -19,5 +19,3 @@ CONTAINS
mtpcar%coo='a' !ICE was here
END SUBROUTINE str_clan
END MODULE
-
-! { dg-final { cleanup-modules "testcase tp_trace" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_10.f90 b/gcc/testsuite/gfortran.dg/used_types_10.f90
index c35fb58e61..4fbdc8e68e 100644
--- a/gcc/testsuite/gfortran.dg/used_types_10.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_10.f90
@@ -69,4 +69,3 @@ contains
end subroutine foo_bar
-! { dg-final { cleanup-modules "derived_type_mod tools" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_11.f90 b/gcc/testsuite/gfortran.dg/used_types_11.f90
index 0cae5f1712..b3f4eaa56e 100644
--- a/gcc/testsuite/gfortran.dg/used_types_11.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_11.f90
@@ -35,4 +35,3 @@ end subroutine bar
x => foo ()
print *, associated (x)
end
-! { dg-final { cleanup-modules "a b" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_12.f90 b/gcc/testsuite/gfortran.dg/used_types_12.f90
index 21d0fe2177..cc9870fb25 100644
--- a/gcc/testsuite/gfortran.dg/used_types_12.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_12.f90
@@ -26,5 +26,3 @@ PROGRAM MAIN
TYPE(T1) :: BAZ
BAZ = BAR
END
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/used_types_13.f90 b/gcc/testsuite/gfortran.dg/used_types_13.f90
index 9208b59333..12804fb160 100644
--- a/gcc/testsuite/gfortran.dg/used_types_13.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_13.f90
@@ -24,5 +24,3 @@ subroutine plane ()
call point ( gp)
end subroutine plane
end module gfcbug44
-! { dg-final { cleanup-modules "geo gfcbug44" } }
-
diff --git a/gcc/testsuite/gfortran.dg/used_types_14.f90 b/gcc/testsuite/gfortran.dg/used_types_14.f90
index 3316b4ad02..bc166a8d55 100644
--- a/gcc/testsuite/gfortran.dg/used_types_14.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_14.f90
@@ -29,4 +29,3 @@ contains
end subroutine foo_ext
end module foo_mod
-! { dg-final { cleanup-modules "foo_type_mod foo_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_15.f90 b/gcc/testsuite/gfortran.dg/used_types_15.f90
index 7f7dbb8e13..885ecb1952 100644
--- a/gcc/testsuite/gfortran.dg/used_types_15.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_15.f90
@@ -32,4 +32,3 @@ CONTAINS
atom = dam%atoms%table(1)
END SUBROUTINE
END MODULE
-! { dg-final { cleanup-modules "class_dummy_atom_types test_class_intensity_private" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_16.f90 b/gcc/testsuite/gfortran.dg/used_types_16.f90
index b1ad779cff..f5c3108f25 100644
--- a/gcc/testsuite/gfortran.dg/used_types_16.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_16.f90
@@ -48,4 +48,3 @@ SUBROUTINE dummy_atom_list_init_copy(this, other)
this%table(1:this%nused) = other%table(1:other%nused)
END SUBROUTINE
-! { dg-final { cleanup-modules "class_dummy_atom_types class_dummy_atom_list" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_17.f90 b/gcc/testsuite/gfortran.dg/used_types_17.f90
index 964f371878..6cbfa6a4eb 100644
--- a/gcc/testsuite/gfortran.dg/used_types_17.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_17.f90
@@ -1,4 +1,4 @@
-! { dg do-compile }
+! { dg-do compile }
! Tests the fix for PR31630, in which the association of the argument
! of 'cmp' did not work.
!
@@ -46,5 +46,3 @@ contains
end subroutine boxarray_sort
end module boxarray_module
-
-! { dg-final { cleanup-modules "box_module sort_box_module boxarray_module" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_18.f90 b/gcc/testsuite/gfortran.dg/used_types_18.f90
index 0acebc4c83..8cb8dab6d3 100644
--- a/gcc/testsuite/gfortran.dg/used_types_18.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_18.f90
@@ -1,4 +1,4 @@
-! { dg do-compile }
+! { dg-do compile }
! { dg-options "-std=f2003" }
!
! Fortran 2003 allowes TYPE without components
diff --git a/gcc/testsuite/gfortran.dg/used_types_19.f90 b/gcc/testsuite/gfortran.dg/used_types_19.f90
index dbec8dc1c8..406e874c42 100644
--- a/gcc/testsuite/gfortran.dg/used_types_19.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_19.f90
@@ -23,4 +23,3 @@ program C
use A
type(A_type):: A_var
end program C
-! { dg-final { cleanup-modules "a b" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_2.f90 b/gcc/testsuite/gfortran.dg/used_types_2.f90
index b1870d12b5..c819f5e449 100644
--- a/gcc/testsuite/gfortran.dg/used_types_2.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_2.f90
@@ -30,5 +30,3 @@ LOGICAL FUNCTION foobar (x)
foobar = .FALSE.
c = bar (x)
END FUNCTION foobar
-! { dg-final { cleanup-modules "types foo" } }
-
diff --git a/gcc/testsuite/gfortran.dg/used_types_20.f90 b/gcc/testsuite/gfortran.dg/used_types_20.f90
index c08235c67f..272c0e8aac 100644
--- a/gcc/testsuite/gfortran.dg/used_types_20.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_20.f90
@@ -46,4 +46,3 @@ CONTAINS
TYPE(outer), INTENT(IN) :: a
END SUBROUTINE test3
END MODULE test
-! { dg-final { cleanup-modules "types mymod test" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_22.f90 b/gcc/testsuite/gfortran.dg/used_types_22.f90
index 2a5ae451a3..c1d9326ddb 100644
--- a/gcc/testsuite/gfortran.dg/used_types_22.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_22.f90
@@ -290,5 +290,3 @@ subroutine smooth_mesh
type(vector) :: new_pos ! the new vertex position, after smoothing
end subroutine smooth_mesh
-! { dg-final { cleanup-modules "class_vector class_dimensions tools_math" } }
-! { dg-final { cleanup-modules "class_motion class_bc_math class_bc tools_mesh_basics" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_23.f90 b/gcc/testsuite/gfortran.dg/used_types_23.f90
index 7374223693..71aefffaf7 100644
--- a/gcc/testsuite/gfortran.dg/used_types_23.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_23.f90
@@ -26,4 +26,3 @@ module smooth_mesh
type(vector ) :: new_pos ! { dg-error "used before it is defined" }
end module smooth_mesh
-! { dg-final { cleanup-modules "class_vector tools_math smooth_mesh" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_24.f90 b/gcc/testsuite/gfortran.dg/used_types_24.f90
index 44d2f5ec19..39eed6f2f0 100644
--- a/gcc/testsuite/gfortran.dg/used_types_24.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_24.f90
@@ -29,5 +29,3 @@ module test_mod
implicit none
end module test_mod
-
-! { dg-final { cleanup-modules "m1 m2 test_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_25.f90 b/gcc/testsuite/gfortran.dg/used_types_25.f90
index 35ac8c75b8..4d10813f6f 100644
--- a/gcc/testsuite/gfortran.dg/used_types_25.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_25.f90
@@ -12,6 +12,3 @@ use m
type t ! { dg-error "Derived type definition of 't' at .1. has already been defined" }
end type t ! { dg-error "Expecting END PROGRAM statement" }
end
-
-! { dg-final { cleanup-modules "m" } }
-
diff --git a/gcc/testsuite/gfortran.dg/used_types_26.f90 b/gcc/testsuite/gfortran.dg/used_types_26.f90
index 2c0437f63e..8051930b72 100644
--- a/gcc/testsuite/gfortran.dg/used_types_26.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_26.f90
@@ -18,5 +18,3 @@
use m2
type(t) :: x ! { dg-error "Type name 't' at .1. is ambiguous" }
end
-
-! { dg-final { cleanup-modules "m m2" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_3.f90 b/gcc/testsuite/gfortran.dg/used_types_3.f90
index 812db1133c..8273ee420e 100644
--- a/gcc/testsuite/gfortran.dg/used_types_3.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_3.f90
@@ -55,4 +55,3 @@ ofTypB => a%ofTypA
a%ofTypA(i,j) = ofTypB(k,j)
end subroutine buggy
end module modC
-! { dg-final { cleanup-modules "moda modb modc" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_4.f90 b/gcc/testsuite/gfortran.dg/used_types_4.f90
index 58877c6ab3..b8dc488a2d 100644
--- a/gcc/testsuite/gfortran.dg/used_types_4.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_4.f90
@@ -37,4 +37,3 @@ contains
call InitRECFAST(CP%omegab,CP%h0,CP%tcmb,CP%yhe)
end subroutine inithermo
end module ThermoData
-! { dg-final { cleanup-modules "precision modelparams timesteps thermodata" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_5.f90 b/gcc/testsuite/gfortran.dg/used_types_5.f90
index 427ede1efa..7f729b8204 100644
--- a/gcc/testsuite/gfortran.dg/used_types_5.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_5.f90
@@ -56,4 +56,3 @@ end module global
if (any (x .ne. (/42.0, 42.0, -42.0, -42.0/))) call abort ()
if (cam%i .ne. 99) call abort ()
end
-! { dg-final { cleanup-modules "types global" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_6.f90 b/gcc/testsuite/gfortran.dg/used_types_6.f90
index 52fa55460d..1811213b52 100644
--- a/gcc/testsuite/gfortran.dg/used_types_6.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_6.f90
@@ -34,4 +34,3 @@ CONTAINS
RETURN
END SUBROUTINE bar
END MODULE seg_mod
-! { dg-final { cleanup-modules "type_mod seg_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_7.f90 b/gcc/testsuite/gfortran.dg/used_types_7.f90
index 91354005d2..1557da54b7 100644
--- a/gcc/testsuite/gfortran.dg/used_types_7.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_7.f90
@@ -36,4 +36,3 @@ contains
clock%CurrTime = clock%CurrTime + clock%CurrTime
end subroutine ESMF_ClockAdvance
end module foo
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_8.f90 b/gcc/testsuite/gfortran.dg/used_types_8.f90
index 58d2084f36..256b83501e 100644
--- a/gcc/testsuite/gfortran.dg/used_types_8.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_8.f90
@@ -43,4 +43,3 @@ contains
clock%CurrTime = clock%CurrTime + clock%CurrTime
end subroutine ESMF_ClockAdvance
end module foo
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/used_types_9.f90 b/gcc/testsuite/gfortran.dg/used_types_9.f90
index fc09d155c0..960b0c6b21 100644
--- a/gcc/testsuite/gfortran.dg/used_types_9.f90
+++ b/gcc/testsuite/gfortran.dg/used_types_9.f90
@@ -33,4 +33,3 @@ contains
end interface
end subroutine integrate
end module foo
-! { dg-final { cleanup-modules "foo bar" } }
diff --git a/gcc/testsuite/gfortran.dg/userdef_operator_1.f90 b/gcc/testsuite/gfortran.dg/userdef_operator_1.f90
index e8af3720af..bf965e5f70 100644
--- a/gcc/testsuite/gfortran.dg/userdef_operator_1.f90
+++ b/gcc/testsuite/gfortran.dg/userdef_operator_1.f90
@@ -32,5 +32,3 @@ program opshape
a = dot_product (t(:,1), t(:,2) .cross. t(:,3))
end program opshape
-
-! { dg-final { cleanup-modules "geometry" } }
diff --git a/gcc/testsuite/gfortran.dg/userdef_operator_2.f90 b/gcc/testsuite/gfortran.dg/userdef_operator_2.f90
index 5b294c3eed..83392c6b6c 100644
--- a/gcc/testsuite/gfortran.dg/userdef_operator_2.f90
+++ b/gcc/testsuite/gfortran.dg/userdef_operator_2.f90
@@ -15,5 +15,3 @@ contains
print*, a .myop. b
end subroutine test_fn
end module test_mod
-
-! { dg-final { cleanup-modules "test_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/value_1.f90 b/gcc/testsuite/gfortran.dg/value_1.f90
index 526a028ec3..be459b0978 100644
--- a/gcc/testsuite/gfortran.dg/value_1.f90
+++ b/gcc/testsuite/gfortran.dg/value_1.f90
@@ -81,4 +81,3 @@ contains
end subroutine complex_foo
end program test_value
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/value_4.f90 b/gcc/testsuite/gfortran.dg/value_4.f90
index 718f9ae5cf..473c28182d 100644
--- a/gcc/testsuite/gfortran.dg/value_4.f90
+++ b/gcc/testsuite/gfortran.dg/value_4.f90
@@ -81,4 +81,3 @@ program value_4
v = c_to_c (u, w)
if (delta ((4.0 * u), v)) call abort ()
end program value_4
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/value_6.f03 b/gcc/testsuite/gfortran.dg/value_6.f03
index 0650d3295b..844960fe0e 100644
--- a/gcc/testsuite/gfortran.dg/value_6.f03
+++ b/gcc/testsuite/gfortran.dg/value_6.f03
@@ -22,4 +22,3 @@ program main
implicit none
call test('a')
end program main
-! { dg-final { cleanup-modules "pr32732" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
index 8f196a69ad..ad4c91aa45 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-mgrid-resid.f
@@ -1,7 +1,7 @@
! { dg-do compile { target i?86-*-* x86_64-*-* } }
! { dg-require-effective-target vect_double }
! { dg-require-effective-target sse2 }
-! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-optimized" }
+! { dg-options "-O3 -ffast-math -msse2 -fpredictive-commoning -ftree-vectorize -fdump-tree-pcom-details" }
******* RESID COMPUTES THE RESIDUAL: R = V - AU
@@ -39,8 +39,9 @@ C
RETURN
END
! we want to check that predictive commoning did something on the
-! vectorized loop, which means we have to have exactly 13 vector
-! additions.
-! { dg-final { scan-tree-dump-times "vect_var\[^\\n\]*\\+ " 13 "optimized" } }
+! vectorized loop.
+! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 1 "pcom" { target lp64 } } }
+! { dg-final { scan-tree-dump-times "Executing predictive commoning without unrolling" 2 "pcom" { target ia32 } } }
+! { dg-final { scan-tree-dump-times "Predictive commoning failed: no suitable chains" 0 "pcom" } }
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-tree-dump "optimized" } }
+! { dg-final { cleanup-tree-dump "pcom" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-pr37021.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-pr37021.f90
new file mode 100644
index 0000000000..b17ac9c327
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-pr37021.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-require-effective-target vect_double }
+
+subroutine to_product_of(self,a,b,a1,a2)
+ complex(kind=8) :: self (:)
+ complex(kind=8), intent(in) :: a(:,:)
+ complex(kind=8), intent(in) :: b(:)
+ integer a1,a2
+ self = ZERO
+ do i = 1,a1
+ do j = 1,a2
+ self(i) = self(i) + a(i,j)*b(j)
+ end do
+ end do
+end subroutine
+
+! { dg-final { scan-tree-dump "vectorized 1 loops" "vect" } }
+! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
index bfad470f1a..c0eb97e7ec 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-pr38968.f90
@@ -7,7 +7,7 @@
program mymatmul
implicit none
integer, parameter :: kp = 4
- integer, parameter :: n = 2000
+ integer, parameter :: n = 400
real(kp), dimension(n,n) :: rr, ri
complex(kp), dimension(n,n) :: a,b,c
real :: t1, t2
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-real8-pr40801.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-real8-pr40801.f90
index 2d4018049d..eb6330def6 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-real8-pr40801.f90
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-real8-pr40801.f90
@@ -35,4 +35,3 @@ ENDIF
END SUBROUTINE ACCONV
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-modules "yomphy0" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-rnflow-trs2a2.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-rnflow-trs2a2.f90
new file mode 100644
index 0000000000..1d13cea80e
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-rnflow-trs2a2.f90
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! { dg-require-effective-target vect_double }
+
+ function trs2a2 (j, k, u, d, m)
+! matrice de transition intermediaire, partant de k sans descendre
+! sous j. R = IjU(I-Ik)DIj, avec Ii = deltajj, j >= i.
+! alternative: trs2a2 = 0
+! trs2a2 (j:k-1, j:k-1) = matmul (utrsft (j:k-1,j:k-1),
+! dtrsft (j:k-1,j:k-1))
+!
+ real, dimension (1:m,1:m) :: trs2a2 ! resultat
+ real, dimension (1:m,1:m) :: u, d ! matrices utrsft, dtrsft
+ integer, intent (in) :: j, k, m ! niveaux vallee pic
+!
+!##### following line replaced by Prentice to make less system dependent
+! real (kind = kind (1.0d0)) :: dtmp
+ real (kind = selected_real_kind (10,50)) :: dtmp
+!
+ trs2a2 = 0.0
+ do iclw1 = j, k - 1
+ do iclw2 = j, k - 1
+ dtmp = 0.0d0
+ do iclww = j, k - 1
+ dtmp = dtmp + u (iclw1, iclww) * d (iclww, iclw2)
+ enddo
+ trs2a2 (iclw1, iclw2) = dtmp
+ enddo
+ enddo
+ return
+ end function trs2a2
+
+! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
+! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f90
index a5436b740a..26d850de96 100644
--- a/gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f90
+++ b/gcc/testsuite/gfortran.dg/vect/fast-math-vect-8.f90
@@ -92,4 +92,3 @@ end module solv_cap
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target vect_intfloat_cvt } } }
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-modules "solv_cap" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/pr32380.f b/gcc/testsuite/gfortran.dg/vect/pr32380.f
index 747f88ac68..eba76d98e8 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr32380.f
+++ b/gcc/testsuite/gfortran.dg/vect/pr32380.f
@@ -259,5 +259,7 @@ c
return
end
-! { dg-final { scan-tree-dump-times "vectorized 7 loops" 1 "vect" { xfail powerpc*-*-* ia64-*-*-* } } }
+! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { ! vect_element_align } } } }
+! { dg-final { scan-tree-dump-times "vectorized 5 loops" 1 "vect" { target { vect_element_align && { ! vect_call_sqrtf } } } } }
+! { dg-final { scan-tree-dump-times "vectorized 6 loops" 1 "vect" { target { vect_element_align && vect_call_sqrtf } } } }
! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/pr46213.f90 b/gcc/testsuite/gfortran.dg/vect/pr46213.f90
index 2eb12dd3ee..504d1a3cf8 100644
--- a/gcc/testsuite/gfortran.dg/vect/pr46213.f90
+++ b/gcc/testsuite/gfortran.dg/vect/pr46213.f90
@@ -23,4 +23,3 @@ contains
end program test
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-modules "foo" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-8.f90 b/gcc/testsuite/gfortran.dg/vect/vect-8.f90
index a3ce768cc2..c12cde19fa 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-8.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-8.f90
@@ -705,4 +705,3 @@ END SUBROUTINE kernel
! { dg-final { scan-tree-dump-times "vectorized 19 loops" 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-modules "lfk_prec" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90 b/gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90
new file mode 100644
index 0000000000..e62a9eb23a
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vect/vect-do-concurrent-1.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-require-effective-target vect_float }
+! { dg-additional-options "-O3 -fopt-info-vec-optimized" }
+
+subroutine test(n, a, b, c)
+ integer, value :: n
+ real, contiguous, pointer :: a(:), b(:), c(:)
+ integer :: i
+ do concurrent (i = 1:n)
+ a(i) = b(i) + c(i)
+ end do
+end subroutine test
+
+! { dg-message "loop vectorized" "" { target *-*-* } 0 }
+! { dg-bogus " version\[^\n\r]* alias" "" { target *-*-* } 0 }
+! { dg-final { cleanup-tree-dump "vect" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect-gems.f90 b/gcc/testsuite/gfortran.dg/vect/vect-gems.f90
index 66e878d3de..2f75355cb1 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect-gems.f90
+++ b/gcc/testsuite/gfortran.dg/vect/vect-gems.f90
@@ -5,9 +5,9 @@ MODULE UPML_mod
IMPLICIT NONE
-PUBLIC UPMLupdateE
-
-PRIVATE
+!PUBLIC UPMLupdateE
+!
+!PRIVATE
real(kind=8), dimension(:,:,:), allocatable :: Dx_ilow
@@ -55,4 +55,3 @@ END MODULE UPML_mod
! { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" } }
! { dg-final { cleanup-tree-dump "vect" } }
-! { dg-final { cleanup-modules "upml_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/vect/vect.exp b/gcc/testsuite/gfortran.dg/vect/vect.exp
index f00b257733..0827b3e2f2 100644
--- a/gcc/testsuite/gfortran.dg/vect/vect.exp
+++ b/gcc/testsuite/gfortran.dg/vect/vect.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2004, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +25,8 @@ global DEFAULT_VECTCFLAGS
set DEFAULT_VECTCFLAGS ""
# These flags are used for all targets.
-lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fno-vect-cost-model" \
- "-ftree-vectorizer-verbose=4" "-fdump-tree-vect-stats"
+lappend DEFAULT_VECTCFLAGS "-O2" "-ftree-vectorize" "-fvect-cost-model=unlimited" \
+ "-fdump-tree-vect-details"
# If the target system supports vector instructions, the default action
# for a test is 'run', otherwise it's 'compile'. Save current default.
@@ -68,7 +68,7 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/fast-math-real8*.\[fF\]{,90,
# -fvect-cost-model tests
set DEFAULT_VECTCFLAGS $SAVED_DEFAULT_VECTCFLAGS
-lappend DEFAULT_VECTCFLAGS "-fvect-cost-model"
+lappend DEFAULT_VECTCFLAGS "-fvect-cost-model=dynamic"
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/cost-model-*.\[fF\]{,90,95,03,08} ]] \
"" $DEFAULT_VECTCFLAGS
diff --git a/gcc/testsuite/gfortran.dg/vector_subscript_7.f90 b/gcc/testsuite/gfortran.dg/vector_subscript_7.f90
new file mode 100644
index 0000000000..ddc813904b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/vector_subscript_7.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! PR 58009 - If a vector subscript has two or more elements with the
+! same value, an array section with that vector subscript
+! shall not appear in a variable definition context.
+
+program main
+ real, dimension(4) :: a,b
+ real, dimension(1,4) :: c
+ read (*,*) a([1,2,3,2]),i ! { dg-error "Elements with the same value" }
+ read (*,*) c(1,[1,2,3,2]),i ! { dg-error "Elements with the same value" }
+ b([1+i,1,i+1,2]) = a ! { dg-error "Elements with the same value" }
+ c(1,[1+i,1,i+1,2]) = a ! { dg-error "Elements with the same value" }
+ call foo (a([4,2,1,1])) ! { dg-error "Elements with the same value" }
+ call foo (c(1,[4,2,1,1])) ! { dg-error "Elements with the same value" }
+ print *,a,b
+contains
+ subroutine foo(arg)
+ real, intent(inout) :: arg(:)
+ arg = arg + 1
+ end subroutine foo
+end program main
diff --git a/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90 b/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90
index 00e31f9595..f4328504f2 100644
--- a/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90
+++ b/gcc/testsuite/gfortran.dg/vector_subscript_bound_1.f90
@@ -17,5 +17,3 @@ CONTAINS
PRINT *, pw%cr(UBOUND(pw%cr))
END SUBROUTINE pw_write
END MODULE
-
-! { dg-final { cleanup-modules "pw_types" } }
diff --git a/gcc/testsuite/gfortran.dg/volatile10.f90 b/gcc/testsuite/gfortran.dg/volatile10.f90
index 2065b164ca..47356d9ba4 100644
--- a/gcc/testsuite/gfortran.dg/volatile10.f90
+++ b/gcc/testsuite/gfortran.dg/volatile10.f90
@@ -146,4 +146,3 @@ end program main
! TODO: dg-final { scan-tree-dump-not "main_test2_3" "optimized" }
! { dg-final { scan-tree-dump "main_test2_4" "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
-! { dg-final { cleanup-modules "impl one two" } }
diff --git a/gcc/testsuite/gfortran.dg/volatile5.f90 b/gcc/testsuite/gfortran.dg/volatile5.f90
index 42607a1e63..57a4c898eb 100644
--- a/gcc/testsuite/gfortran.dg/volatile5.f90
+++ b/gcc/testsuite/gfortran.dg/volatile5.f90
@@ -40,4 +40,3 @@ end program main
! { dg-final { scan-tree-dump-not "cPresent" "optimized" } }
! { dg-final { scan-tree-dump-not "cStillPresent" "optimized" } }
! { dg-final { cleanup-tree-dump "optimized" } }
-! { dg-final { cleanup-modules "volmod" } }
diff --git a/gcc/testsuite/gfortran.dg/volatile9.f90 b/gcc/testsuite/gfortran.dg/volatile9.f90
index e7cba6b072..41be085c54 100644
--- a/gcc/testsuite/gfortran.dg/volatile9.f90
+++ b/gcc/testsuite/gfortran.dg/volatile9.f90
@@ -40,5 +40,3 @@
implicit none
volatile :: v13
end subroutine s14
-
-! { dg-final { cleanup-modules "mod13 mod13a mod13b" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_alias.f90 b/gcc/testsuite/gfortran.dg/warn_alias.f90
new file mode 100644
index 0000000000..99b97a61a4
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_alias.f90
@@ -0,0 +1,33 @@
+! { dg-do compile }
+! { dg-options "-Waliasing" }
+!
+! PR fortran/57991
+!
+! Added check for OUT/OUT. IN/OUT and OUT/IN where already check
+! since GCC 4.0, but not being tested for.
+
+ Program q
+ integer :: x
+ x = 5
+ Call test1(x, x) ! { dg-warning "Same actual argument associated with INTENT.OUT. argument 'a' and INTENT.OUT. argument 'b'" }
+ Call test2(x, x) ! { dg-warning "Same actual argument associated with INTENT.IN. argument 'a' and INTENT.OUT. argument 'b'" }
+ Call test3(x, x) ! { dg-warning "Same actual argument associated with INTENT.OUT. argument 'a' and INTENT.IN. argument 'b'" }
+ Contains
+ Subroutine test1(a,b)
+ Integer, intent(out) :: a
+ Integer, intent(out) :: b
+ b = 5
+ a = 5
+ End Subroutine
+ Subroutine test2(a,b)
+ Integer, intent(in) :: a
+ Integer, intent(out) :: b
+ b = 5 + a
+ End Subroutine
+ Subroutine test3(a,b)
+ Integer, intent(out) :: a
+ Integer, intent(in) :: b
+ a = 5 + b
+ End Subroutine
+ End Program
+
diff --git a/gcc/testsuite/gfortran.dg/warn_conversion_4.f90 b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
new file mode 100644
index 0000000000..3d1b12582b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_conversion_4.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! { dg-options "-Wconversion" }
+!
+! PR fortran/54234
+!
+!
+module fft_mod
+ implicit none
+ integer, parameter :: dp=kind(0.0d0)
+contains
+ subroutine test
+ integer :: x
+ x = int (abs (cmplx(2.3,0.1)))
+ x = int (abs (cmplx(2.3_dp,0.1))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ x = int (abs (cmplx(2.3_dp,0.1_dp))) ! { dg-warning "Conversion from REAL.8. to default-kind COMPLEX.4. at .1. might lose precision, consider using the KIND argument" }
+ end subroutine test
+end module fft_mod
diff --git a/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90 b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
index 25fd0b73a7..64f6eb6875 100644
--- a/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
+++ b/gcc/testsuite/gfortran.dg/warn_function_without_result_2.f90
@@ -16,4 +16,3 @@ contains
k = 8
end function j
end module m
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f90 b/gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f90
index 8f21b60e9c..3f907c78d5 100644
--- a/gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f90
+++ b/gcc/testsuite/gfortran.dg/warn_implicit_procedure_1.f90
@@ -39,5 +39,3 @@ PROGRAM main
! Can't check undefined function, because it needs to be declared a type
! in any case (and the implicit type is enough to not trigger this warning).
END PROGRAM
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_intent_out_not_set.f90 b/gcc/testsuite/gfortran.dg/warn_intent_out_not_set.f90
index 76c62eaec3..22bef8ce7c 100644
--- a/gcc/testsuite/gfortran.dg/warn_intent_out_not_set.f90
+++ b/gcc/testsuite/gfortran.dg/warn_intent_out_not_set.f90
@@ -26,5 +26,3 @@ CONTAINS
type(t2), intent(out) :: x
END SUBROUTINE
END MODULE
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_1.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_1.f90
new file mode 100644
index 0000000000..fafa0f123b
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_1.f90
@@ -0,0 +1,47 @@
+! { dg-do compile }
+! { dg-options "-Wtarget-lifetime" }
+!
+! PR fortran/54301
+!
+function f () result (ptr)
+ integer, pointer :: ptr(:)
+ integer, allocatable, target :: a(:)
+ allocate(a(5))
+
+ ptr => a ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
+ a = [1,2,3,4,5]
+end function
+
+
+subroutine foo()
+ integer, pointer :: ptr(:)
+ call bar ()
+contains
+ subroutine bar ()
+ integer, target :: tgt(5)
+ ptr => tgt ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
+ end subroutine bar
+end subroutine foo
+
+function foo3(tgt)
+ integer, target :: tgt
+ integer, pointer :: foo3
+ foo3 => tgt
+end function
+
+subroutine sub()
+ implicit none
+ integer, pointer :: ptr
+ integer, target :: tgt
+ ptr => tgt
+
+ block
+ integer, pointer :: p2
+ integer, target :: tgt2
+ p2 => tgt2
+ p2 => tgt
+ ptr => p2
+ ptr => tgt
+ ptr => tgt2 ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
+ end block
+end subroutine sub
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_2.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_2.f90
new file mode 100644
index 0000000000..bfcb7aca47
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_2.f90
@@ -0,0 +1,10 @@
+! { dg-do compile }
+! { dg-options "-Wtarget-lifetime" }
+!
+! PR fortran/54301
+!
+function f()
+ integer, pointer :: f
+ integer, target :: t
+ f => t ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
+end
diff --git a/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90 b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
new file mode 100644
index 0000000000..9113a885fa
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_target_lifetime_3.f90
@@ -0,0 +1,29 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR fortran/55476
+!
+! Contribued by Janus Weil
+!
+subroutine test
+ integer, pointer :: p
+ integer, target :: t
+ p => t
+contains
+ subroutine sub()
+ if (p /= 0) return
+ end subroutine
+end subroutine
+
+module m
+ integer, pointer :: p2
+contains
+ subroutine test
+ integer, target :: t2
+ p2 => t2 ! { dg-warning "Pointer at .1. in pointer assignment might outlive the pointer target" }
+ contains
+ subroutine sub()
+ if (p2 /= 0) return
+ end subroutine
+ end subroutine
+end module m
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_4.f90 b/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_4.f90
new file mode 100644
index 0000000000..79e5fa1bf1
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_unused_dummy_argument_4.f90
@@ -0,0 +1,16 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! PR fortran/57469
+!
+! Contributed by Vladimir Fuka
+!
+! Don't warn for unused dummy arguments when they are used in namelists
+!
+ subroutine read_command_line(line,a,b)
+ character(*),intent(in) :: line
+ intent(inout) :: a,b
+ namelist /cmd/ a,b
+
+ read(line,nml = cmd)
+ end
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_function.f90 b/gcc/testsuite/gfortran.dg/warn_unused_function.f90
new file mode 100644
index 0000000000..4d0ed9abc9
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_unused_function.f90
@@ -0,0 +1,21 @@
+! { dg-do compile }
+! { dg-options "-Wunused-function" }
+!
+! PR 54224: [4.8 Regression] Bogus -Wunused-function warning with static function
+!
+! Contributed by Tobias Burnus <burnus@gcc.gnu.org>
+
+module mod_say_hello
+ private :: hello_integer
+contains
+ subroutine say_hello()
+ call hello_integer(123)
+ end subroutine
+
+ subroutine hello_integer( a )
+ integer, intent(in) :: a
+ print *, "Hello ", a, "!"
+ end subroutine
+end module
+
+! { dg-final { cleanup-modules "mod_say_hello" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90 b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
new file mode 100644
index 0000000000..8d65dabef8
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/warn_unused_function_2.f90
@@ -0,0 +1,34 @@
+! { dg-do compile }
+! { dg-options "-Wall" }
+!
+! [4.8 Regression] PR 54997: -Wunused-function gives false warnings
+!
+! Contributed by Janus Weil <janus@gcc.gnu.org>
+
+module m
+
+ implicit none
+ private :: s1,s2,s3
+
+contains
+
+ subroutine s1 ! { dg-warning "defined but not used" }
+ call s2(s3)
+ end subroutine
+
+ subroutine s2(dummy) ! { dg-warning "Unused dummy argument" }
+ procedure() :: dummy
+ end subroutine
+
+ subroutine s3()
+ end subroutine
+
+end module
+
+
+subroutine sub
+entry en
+end subroutine
+
+
+! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_var_2.f90 b/gcc/testsuite/gfortran.dg/warn_unused_var_2.f90
index 7eccc6e6c1..5dcf4991d2 100644
--- a/gcc/testsuite/gfortran.dg/warn_unused_var_2.f90
+++ b/gcc/testsuite/gfortran.dg/warn_unused_var_2.f90
@@ -15,5 +15,3 @@ program main
j = 1
print*,"j=",j
end program main
-
-! { dg-final { cleanup-modules "util_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/warn_unused_var_3.f90 b/gcc/testsuite/gfortran.dg/warn_unused_var_3.f90
index 86a888321f..9bc7f0ba39 100644
--- a/gcc/testsuite/gfortran.dg/warn_unused_var_3.f90
+++ b/gcc/testsuite/gfortran.dg/warn_unused_var_3.f90
@@ -11,5 +11,3 @@ program main
use util_mod, only: i ! { dg-warning "Unused parameter .i. which has been explicitly imported" }
integer, parameter :: j = 4 ! { dg-warning "Unused parameter .j. declared at" }
end program main
-
-! { dg-final { cleanup-modules "util_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/warning-directive-2.F90 b/gcc/testsuite/gfortran.dg/warning-directive-2.F90
index 7e4418530e..8846cd3225 100644
--- a/gcc/testsuite/gfortran.dg/warning-directive-2.F90
+++ b/gcc/testsuite/gfortran.dg/warning-directive-2.F90
@@ -1,5 +1,5 @@
! { dg-do preprocess }
! { dg-options "-std=f95 -fdiagnostics-show-option -Werror=cpp" }
-! { dg-message "some warnings being treated as errors" "" {target "*-*-*"} 0 }
+! { dg-message "some warnings being treated as errors" "" { target *-*-* } 0 }
#warning "Printed"
! { dg-error "\"Printed\" .-Werror=cpp." "" { target *-*-* } 4 }
diff --git a/gcc/testsuite/gfortran.dg/wdate-time.F90 b/gcc/testsuite/gfortran.dg/wdate-time.F90
new file mode 100644
index 0000000000..d84fd9abd7
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/wdate-time.F90
@@ -0,0 +1,6 @@
+! { dg-do compile }
+! { dg-options "-Wdate-time" }
+print *, __TIMESTAMP__ ! { dg-warning "might prevent reproducible builds" }
+print *, __TIME__ ! { dg-warning "might prevent reproducible builds" }
+print *, __DATE__ ! { dg-warning "might prevent reproducible builds" }
+end
diff --git a/gcc/testsuite/gfortran.dg/wextra_1.f b/gcc/testsuite/gfortran.dg/wextra_1.f
new file mode 100644
index 0000000000..94c8eddec0
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/wextra_1.f
@@ -0,0 +1,9 @@
+! { dg-do compile }
+! { dg-options "-Wextra" }
+ program main
+ integer, parameter :: x=3 ! { dg-warning "Unused parameter" }
+ real :: a
+ read (*,*) a
+ if (a .eq. 3.14) a=2. ! { dg-warning "Equality comparison" }
+ print *,a
+ end
diff --git a/gcc/testsuite/gfortran.dg/where_4.f90 b/gcc/testsuite/gfortran.dg/where_4.f90
new file mode 100644
index 0000000000..1ff2e4ca31
--- /dev/null
+++ b/gcc/testsuite/gfortran.dg/where_4.f90
@@ -0,0 +1,18 @@
+! { dg-do compile }
+! PR 60522 - this used to ICE.
+! Original test case Roger Ferrer Ibanez
+subroutine foo(a, b)
+ implicit none
+ integer, dimension(:), intent(inout) :: a
+ integer, dimension(:), intent(in) :: b
+
+ where (b(:) > 0)
+ where (b(:) > 100)
+ a(lbound(a, 1):ubound(a, 1)) = b(lbound(b, 1):ubound(b, 1)) * b(lbound(b, 1):ubound(b, 1)) - 100
+ elsewhere
+ a(lbound(a, 1):ubound(a, 1)) = b(lbound(b, 1):ubound(b, 1)) * b(lbound(b, 1):ubound(b, 1))
+ end where
+ elsewhere
+ a(lbound(a, 1):ubound(a, 1)) = - b(lbound(b, 1):ubound(b, 1)) * b(lbound(b, 1):ubound(b, 1))
+ end where
+end subroutine foo
diff --git a/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90 b/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90
index c2b4abf851..bc4790ae71 100644
--- a/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90
+++ b/gcc/testsuite/gfortran.dg/where_operator_assign_1.f90
@@ -104,5 +104,3 @@ CONTAINS
END FUNCTION iaef
END PROGRAM test_prog
-
-! { dg-final { cleanup-modules "kind_mod pointer_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90 b/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90
index 420103f197..52fbd276f6 100644
--- a/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90
+++ b/gcc/testsuite/gfortran.dg/where_operator_assign_2.f90
@@ -102,5 +102,3 @@ contains
endwhere
end subroutine test_where_4
end program test
-! { dg-final { cleanup-modules "global" } }
-
diff --git a/gcc/testsuite/gfortran.dg/where_operator_assign_3.f90 b/gcc/testsuite/gfortran.dg/where_operator_assign_3.f90
index eddbdfc00a..d1b5e37c8a 100644
--- a/gcc/testsuite/gfortran.dg/where_operator_assign_3.f90
+++ b/gcc/testsuite/gfortran.dg/where_operator_assign_3.f90
@@ -77,5 +77,3 @@ contains
endwhere
end subroutine test_where_char2
end program test
-! { dg-final { cleanup-modules "global" } }
-
diff --git a/gcc/testsuite/gfortran.dg/where_operator_assign_4.f90 b/gcc/testsuite/gfortran.dg/where_operator_assign_4.f90
index e1c479e5f9..74ce1ba6ad 100644
--- a/gcc/testsuite/gfortran.dg/where_operator_assign_4.f90
+++ b/gcc/testsuite/gfortran.dg/where_operator_assign_4.f90
@@ -28,4 +28,3 @@ END WHERE
WHERE (I(:)%I>0) J=I ! { dg-error "Non-ELEMENTAL user-defined assignment in WHERE" }
END
-! { dg-final { cleanup-modules "m1" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_11.f90 b/gcc/testsuite/gfortran.dg/whole_file_11.f90
index d50e481070..d01b2100c4 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_11.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_11.f90
@@ -35,5 +35,3 @@ FUNCTION foo_count()
USE module_foo, ONLY: foo
INTEGER :: foo_count
END FUNCTION
-
-! { dg-final { cleanup-modules "module_foo" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_14.f90 b/gcc/testsuite/gfortran.dg/whole_file_14.f90
index 65058960b9..030e8cd145 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_14.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_14.f90
@@ -25,4 +25,3 @@ contains
j%this => base !to one another
end subroutine check !take j out of scope
end program test_equi
-! { dg-final { cleanup-modules "global" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_15.f90 b/gcc/testsuite/gfortran.dg/whole_file_15.f90
index 08d6120445..9988757cb1 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_15.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_15.f90
@@ -29,4 +29,3 @@ CONTAINS
SUBROUTINE ep_force_release()
END SUBROUTINE ep_force_release
END MODULE ep_types
-! { dg-final { cleanup-modules "replica_types ep_types" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_16.f90 b/gcc/testsuite/gfortran.dg/whole_file_16.f90
index 048350f1d7..6c910f47a2 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_16.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_16.f90
@@ -5,7 +5,7 @@
!
program main
real, dimension(2) :: a
- call foo(a) ! { dg-error "must have an explicit interface" }
+ call foo(a) ! { dg-error "Explicit interface required" }
end program main
subroutine foo(a)
diff --git a/gcc/testsuite/gfortran.dg/whole_file_17.f90 b/gcc/testsuite/gfortran.dg/whole_file_17.f90
index 86272b848a..a2a9d15151 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_17.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_17.f90
@@ -1,5 +1,5 @@
! { dg-do compile }
-! { dg-options "-fwhole-file" }
+! { dg-options "-pedantic -fwhole-file" }
!
! PR fortran/30668
!
diff --git a/gcc/testsuite/gfortran.dg/whole_file_18.f90 b/gcc/testsuite/gfortran.dg/whole_file_18.f90
index f758408f81..c483c7da10 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_18.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_18.f90
@@ -5,7 +5,7 @@
!
PROGRAM MAIN
REAL A
- CALL SUB(A) ! { dg-error "requires an explicit interface" }
+ CALL SUB(A) ! { dg-error "Explicit interface required" }
END PROGRAM
SUBROUTINE SUB(A,I)
diff --git a/gcc/testsuite/gfortran.dg/whole_file_19.f90 b/gcc/testsuite/gfortran.dg/whole_file_19.f90
index 56f3cb69d8..cd69f92d42 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_19.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_19.f90
@@ -22,4 +22,3 @@ END MODULE
USE M
CALL b()
END
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_20.f03 b/gcc/testsuite/gfortran.dg/whole_file_20.f03
index 61e2a4df9d..b3f77e4610 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_20.f03
+++ b/gcc/testsuite/gfortran.dg/whole_file_20.f03
@@ -17,8 +17,8 @@ PROGRAM main
INTEGER :: coarr[*]
- CALL coarray(coarr) ! { dg-error " must have an explicit interface" }
- CALL polymorph(tt) ! { dg-error " must have an explicit interface" }
+ CALL coarray(coarr) ! { dg-error "Explicit interface required" }
+ CALL polymorph(tt) ! { dg-error "Explicit interface required" }
END PROGRAM
SUBROUTINE coarray(a)
@@ -29,5 +29,3 @@ SUBROUTINE polymorph(b)
USE classtype
CLASS(t) :: b
END SUBROUTINE
-
-! { dg-final { cleanup-modules "classtype" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_21.f90 b/gcc/testsuite/gfortran.dg/whole_file_21.f90
index ec9256a772..b1c1dacb2d 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_21.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_21.f90
@@ -23,5 +23,3 @@ CONTAINS
END SUBROUTINE four
END MODULE mod
END
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_22.f90 b/gcc/testsuite/gfortran.dg/whole_file_22.f90
index d833491f0d..69e8107d63 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_22.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_22.f90
@@ -35,5 +35,3 @@ subroutine test()
USE M
CALL b()
END
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_23.f90 b/gcc/testsuite/gfortran.dg/whole_file_23.f90
index c8f66e6cd6..3fd1051fe3 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_23.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_23.f90
@@ -45,5 +45,3 @@ program xjoin
character (len=5) :: words(2) = (/"two ","three"/)
write (*,"(1x,'words = ',a)") "'"//join (words, "&")//"'"
end program xjoin
-
-! { dg-final { cleanup-modules "util_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_24.f90 b/gcc/testsuite/gfortran.dg/whole_file_24.f90
index 4ac11cce2f..3ff6ca8570 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_24.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_24.f90
@@ -31,5 +31,3 @@ contains
end subroutine syntax_init_from_ifile
end module syntax_rules
end
-
-! { dg-final { cleanup-modules "iso_red ifiles syntax_rules" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_25.f90 b/gcc/testsuite/gfortran.dg/whole_file_25.f90
index d2cbd36ae1..8eaa5a5e4b 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_25.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_25.f90
@@ -17,5 +17,3 @@ end module ints
USE INTS
CALL NOZZLE ()
END program CORTESA
-
-! { dg-final { cleanup-modules "ints" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_26.f90 b/gcc/testsuite/gfortran.dg/whole_file_26.f90
index 8ce4510708..eec09453ba 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_26.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_26.f90
@@ -22,5 +22,3 @@ subroutine VALUE()
end subroutine VALUE
end
-
-! { dg-final { cleanup-modules "ints" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_27.f90 b/gcc/testsuite/gfortran.dg/whole_file_27.f90
index 4129547273..48362c6f0b 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_27.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_27.f90
@@ -206,5 +206,3 @@ program d_coo_err
stop
end program d_coo_err
-
-! { dg-final { cleanup-modules "base_mat_mod const_mod d_base_mat_mod" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_28.f90 b/gcc/testsuite/gfortran.dg/whole_file_28.f90
index 78c848e40e..ec9efb2d4d 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_28.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_28.f90
@@ -10,3 +10,4 @@ module iso_red
end type varying_string
end module iso_red
! DO NOT CLEAN UP THE MODULE FILE - whole_file_29.f90 does it.
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_29.f90 b/gcc/testsuite/gfortran.dg/whole_file_29.f90
index 2521dadac2..703754c649 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_29.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_29.f90
@@ -24,4 +24,4 @@ contains
end subroutine syntax_init_from_ifile
end module syntax_rules
end
-! { dg-final { cleanup-modules "syntax_rules ifiles iso_red" } }
+! { dg-final { cleanup-modules "iso_red" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_30.f90 b/gcc/testsuite/gfortran.dg/whole_file_30.f90
index 813ca06868..d8e401eeb2 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_30.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_30.f90
@@ -13,3 +13,4 @@ module system_defs_m
end type sysvector_t
end module system_defs_m
! DO NOT CLEAN UP THE MODULE FILE - whole_file_31.f90 does it.
+! { dg-final { keep-modules "" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_31.f90 b/gcc/testsuite/gfortran.dg/whole_file_31.f90
index 7ef0b9f676..eb77055b91 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_31.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_31.f90
@@ -18,4 +18,4 @@ program t
type(sysvector_t), target :: sol
solution => sol
end program t
-! { dg-final { cleanup-modules "system_defs_m convecreac_m" } }
+! { dg-final { cleanup-modules "system_defs_m" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_33.f90 b/gcc/testsuite/gfortran.dg/whole_file_33.f90
index 31faeaa099..4163b77a4b 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_33.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_33.f90
@@ -46,5 +46,3 @@ MODULE DENSEOP
x=x_o
END SUBROUTINE GEINV8
END MODULE DENSEOP
-
-! { dg-final { cleanup-modules "la_precision lapack90 denseop" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_35.f90 b/gcc/testsuite/gfortran.dg/whole_file_35.f90
index 46a8865514..e52a2c42dd 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_35.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_35.f90
@@ -24,5 +24,3 @@
use m
print *,ichar('~') ! must print "1"
end program p
-
-! { dg-final { cleanup-modules "m" } }
diff --git a/gcc/testsuite/gfortran.dg/whole_file_7.f90 b/gcc/testsuite/gfortran.dg/whole_file_7.f90
index 53fed228ae..3225304397 100644
--- a/gcc/testsuite/gfortran.dg/whole_file_7.f90
+++ b/gcc/testsuite/gfortran.dg/whole_file_7.f90
@@ -29,6 +29,6 @@ end function test
program arr ! The error was not picked up causing an ICE
real, dimension(2) :: res
- res = test(2) ! { dg-error "needs an explicit INTERFACE" }
+ res = test(2) ! { dg-error "Explicit interface required" }
print *, res
end program
diff --git a/gcc/testsuite/gfortran.dg/widechar_5.f90 b/gcc/testsuite/gfortran.dg/widechar_5.f90
index ed2f32fbd0..ece1e4d9cc 100644
--- a/gcc/testsuite/gfortran.dg/widechar_5.f90
+++ b/gcc/testsuite/gfortran.dg/widechar_5.f90
@@ -55,5 +55,3 @@ program test_modules
if (any (len_trim (outer4) /= [len(outer4), 3])) call abort
end program test_modules
-
-! { dg-final { cleanup-modules "kinds inner middle outer" } }
diff --git a/gcc/testsuite/gfortran.dg/widechar_6.f90 b/gcc/testsuite/gfortran.dg/widechar_6.f90
index 9151adba41..799db608bb 100644
--- a/gcc/testsuite/gfortran.dg/widechar_6.f90
+++ b/gcc/testsuite/gfortran.dg/widechar_6.f90
@@ -60,5 +60,3 @@ program test
if (len (cut(4_"12345")) /= 2 .or. cut(4_"45") /= 4_"") call abort
end program test
-
-! { dg-final { cleanup-modules "mod" } }
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp b/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
index 5c56ec3f52..1a6d1f0cbf 100644
--- a/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
+++ b/gcc/testsuite/gfortran.fortran-torture/compile/compile.exp
@@ -1,5 +1,5 @@
# Expect driver script for GCC Regression Tests
-# Copyright (C) 2003, 2007, 2008 Free Software Foundation
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,7 +28,7 @@ load_lib torture-options.exp
torture-init
set-torture-options [get-fortran-torture-options]
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
+foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
continue
@@ -36,67 +36,4 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
fortran-torture $testcase
}
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f90]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F90]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f95]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F95]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f03]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F03]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f08]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F08]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture $testcase
-}
-
torture-finish
diff --git a/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90 b/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90
new file mode 100644
index 0000000000..f32698aa3a
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/compile/pr57517.f90
@@ -0,0 +1,13 @@
+SUBROUTINE cal_helicity (uh, ph, phb, wavg, ims, ime, its, ite)
+ INTEGER, INTENT( IN ) :: ims, ime, its, ite
+ REAL, DIMENSION( ims:ime), INTENT( IN ) :: ph, phb, wavg
+ REAL, DIMENSION( ims:ime), INTENT( INOUT ) :: uh
+ INTEGER :: i
+ REAL :: zu
+ DO i = its, ite
+ zu = (ph(i ) + phb(i)) + (ph(i-1) + phb(i-1))
+ IF (wavg(i) .GT. 0) THEN
+ uh(i) = uh(i) + zu
+ ENDIF
+ END DO
+END SUBROUTINE cal_helicity
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp b/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
index 40b65f81cd..cd6fc45adc 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/execute.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -32,7 +32,7 @@ load_lib torture-options.exp
torture-init
set-torture-options [get-fortran-torture-options]
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
+foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.\[fF\]{,90,95,03,08} ]] {
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $testcase] then {
continue
@@ -40,67 +40,4 @@ foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f]] {
fortran-torture-execute $testcase
}
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f90]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F90]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f95]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F95]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f03]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F03]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.f08]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
-foreach testcase [lsort [glob -nocomplain $srcdir/$subdir/*.F08]] {
- if ![runtest_file_p $runtests $testcase] then {
- continue
- }
- fortran-torture-execute $testcase
-}
-
torture-finish
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_associated.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_associated.f90
index 586f766010..22ea6f0a62 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_associated.f90
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_associated.f90
@@ -121,7 +121,7 @@ subroutine associated_2 ()
interface
subroutine sub1 (a, ap)
integer, pointer :: ap(:, :)
- integer, target :: a(10, 1)
+ integer, target :: a(10, 10)
end
endinterface
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
index 2d2b6ee8e6..ec00f036c3 100644
--- a/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/intrinsic_nearest.x
@@ -2,5 +2,9 @@ if [istarget "spu-*-*"] {
# No Inf/NaN support on SPU.
return 1
}
+if [istarget "powerpc-ibm-aix*"] {
+ # z'7f7fffff' value not preserved by lfs instruction.
+ return 1
+}
add-ieee-options
return 0
diff --git a/gcc/testsuite/gfortran.fortran-torture/execute/pr57396.f90 b/gcc/testsuite/gfortran.fortran-torture/execute/pr57396.f90
new file mode 100644
index 0000000000..8ea92924ad
--- /dev/null
+++ b/gcc/testsuite/gfortran.fortran-torture/execute/pr57396.f90
@@ -0,0 +1,33 @@
+module testmod
+ implicit none
+
+ contains
+
+ subroutine foo(n)
+ integer, intent(in) :: n
+ real :: r(0:n,-n:n), a(0:n,-n:n), dj
+ integer :: k, j
+
+ ! initialize with some dummy values
+ do j = -n, n
+ a(:, j) = j
+ r(:,j) = j + 1
+ end do
+
+ ! here be dragons
+ do k = 0, n
+ dj = r(k, k - 2) * a(k, k - 2)
+ r(k,k) = a(k, k - 1) * dj
+ enddo
+
+ if (r(0,0) .ne. -2.) call abort
+
+ end subroutine
+
+end module
+
+program test
+ use testmod
+ implicit none
+ call foo(5)
+end program
diff --git a/gcc/testsuite/gnat.dg/aggr21.adb b/gcc/testsuite/gnat.dg/aggr21.adb
new file mode 100644
index 0000000000..3dd332705e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr21.adb
@@ -0,0 +1,14 @@
+-- { dg-do run }
+
+with Aggr21_Pkg; use Aggr21_Pkg;
+
+procedure Aggr21 is
+ V : Rec;
+begin
+ V.A := 12;
+ V.S (1 .. 10) := "Hello init";
+ V.N := 123;
+ Init (V);
+ -- Probably not reliable, but the compiler is supposed not to modify V.S
+ pragma Assert (V.s (1 .. 5) = "Hello");
+end;
diff --git a/gcc/testsuite/gnat.dg/aggr21_pkg.adb b/gcc/testsuite/gnat.dg/aggr21_pkg.adb
new file mode 100644
index 0000000000..5cdd089cf1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr21_pkg.adb
@@ -0,0 +1,8 @@
+package body Aggr21_Pkg is
+
+ procedure Init (R : out Rec) is
+ begin
+ R := (A => 5, S => <>, N => 7);
+ end;
+
+end Aggr21_Pkg;
diff --git a/gcc/testsuite/gnat.dg/aggr21_pkg.ads b/gcc/testsuite/gnat.dg/aggr21_pkg.ads
new file mode 100644
index 0000000000..3a14963b13
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/aggr21_pkg.ads
@@ -0,0 +1,11 @@
+package Aggr21_Pkg is
+
+ type Rec is record
+ A : Integer;
+ S : String (1 .. 120);
+ N : Natural;
+ end record;
+
+ procedure Init (R : out Rec);
+
+end Aggr21_Pkg;
diff --git a/gcc/testsuite/gnat.dg/aliasing1.adb b/gcc/testsuite/gnat.dg/aliasing1.adb
index b2b7d123b1..bffc4225b4 100644
--- a/gcc/testsuite/gnat.dg/aliasing1.adb
+++ b/gcc/testsuite/gnat.dg/aliasing1.adb
@@ -18,5 +18,5 @@ package body Aliasing1 is
end Aliasing1;
--- { dg-final { scan-tree-dump-not "__gnat_rcheck" "optimized" } }
+-- { dg-final { scan-tree-dump-not "gnat_rcheck" "optimized" } }
-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/array21.adb b/gcc/testsuite/gnat.dg/array21.adb
new file mode 100644
index 0000000000..c642afdd11
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array21.adb
@@ -0,0 +1,16 @@
+-- { dg-do run }
+
+with System;
+
+procedure Array21 is
+
+ type Index_T is mod System.Memory_Size;
+ type Arr
+ is array (Index_T range Index_T'Last/2-3 .. Index_T'Last/2+3) of Integer;
+ C : constant Arr := (1, others => 2);
+
+begin
+ if C /= (1, 2, 2, 2, 2, 2, 2) then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/array22.adb b/gcc/testsuite/gnat.dg/array22.adb
new file mode 100644
index 0000000000..c1725934a2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array22.adb
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+
+with System; use System;
+
+procedure Array22 is
+
+ type Integer_Address is mod Memory_Size;
+
+ type Memory is array (Integer_Address range <>) of Character;
+
+ type Chunk (First, Last : Integer_Address) is record
+ Mem : Memory (First .. Last);
+ end record;
+
+ C : Chunk (1, 8);
+ for C'Alignment use 8;
+ pragma Unreferenced (C);
+
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/array23.adb b/gcc/testsuite/gnat.dg/array23.adb
new file mode 100644
index 0000000000..2196ce5964
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array23.adb
@@ -0,0 +1,10 @@
+-- { dg-do link }
+
+with Array23_Pkg1;
+with Array23_Pkg2;
+
+procedure Array23 is
+ A : Array23_Pkg1.Arr;
+begin
+ A(Array23_Pkg2.One)(1) := 0;
+end;
diff --git a/gcc/testsuite/gnat.dg/array23_pkg1.ads b/gcc/testsuite/gnat.dg/array23_pkg1.ads
new file mode 100644
index 0000000000..d0bc136f96
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array23_pkg1.ads
@@ -0,0 +1,13 @@
+with Array23_Pkg2;
+
+package Array23_Pkg1 is
+
+ C2 : Natural := Array23_Pkg2.C1;
+
+ subtype Index is Natural range 0 .. C2;
+
+ type Inner is array (Index) of Natural;
+
+ type Arr is array (Array23_Pkg2.Index) of Inner;
+
+end Array23_Pkg1;
diff --git a/gcc/testsuite/gnat.dg/array23_pkg2.ads b/gcc/testsuite/gnat.dg/array23_pkg2.ads
new file mode 100644
index 0000000000..8993ffa1e5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array23_pkg2.ads
@@ -0,0 +1,11 @@
+with Array23_Pkg3;
+
+package Array23_Pkg2 is
+
+ C1 : Natural := Array23_Pkg3.C0;
+
+ type Enum is (Zero, One, Two);
+
+ subtype Index is Enum range One .. Enum'val(C1);
+
+end Array23_Pkg2;
diff --git a/gcc/testsuite/gnat.dg/array23_pkg3.ads b/gcc/testsuite/gnat.dg/array23_pkg3.ads
new file mode 100644
index 0000000000..1a6afa86f3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array23_pkg3.ads
@@ -0,0 +1,5 @@
+package Array23_Pkg3 is
+
+ C0 : Natural := 2;
+
+end Array23_Pkg3;
diff --git a/gcc/testsuite/gnat.dg/array_bounds_test2.adb b/gcc/testsuite/gnat.dg/array_bounds_test2.adb
new file mode 100644
index 0000000000..43e1ed3ced
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/array_bounds_test2.adb
@@ -0,0 +1,25 @@
+-- { dg-do run }
+
+with Ada.Unchecked_Deallocation;
+
+procedure Array_Bounds_Test2 is
+
+ type String_Ptr_T is access String;
+ procedure Free is new Ada.Unchecked_Deallocation (String, String_Ptr_T);
+ String_Data : String_Ptr_T := new String'("Hello World");
+
+ function Peek return String_Ptr_T is
+ begin
+ return String_Data;
+ end Peek;
+
+begin
+ declare
+ Corrupted_String : String := Peek.all;
+ begin
+ Free(String_Data);
+ if Corrupted_String'First /= 1 then
+ raise Program_Error;
+ end if;
+ end;
+end;
diff --git a/gcc/testsuite/gnat.dg/constant4.adb b/gcc/testsuite/gnat.dg/constant4.adb
new file mode 100644
index 0000000000..826823a624
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/constant4.adb
@@ -0,0 +1,12 @@
+-- { dg-do link }
+-- { dg-options "-gnat12" }
+
+with Constant4_Pkg; use Constant4_Pkg;
+
+procedure Constant4 is
+ Sum : Counter := 0;
+begin
+ for Count of Steals loop
+ Sum := Sum + Count;
+ end loop;
+end;
diff --git a/gcc/testsuite/gnat.dg/constant4_pkg.ads b/gcc/testsuite/gnat.dg/constant4_pkg.ads
new file mode 100644
index 0000000000..f0c6f8ffdc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/constant4_pkg.ads
@@ -0,0 +1,15 @@
+with Ada.Command_Line; use Ada.Command_Line;
+with System.Multiprocessors; use System.Multiprocessors;
+
+package Constant4_Pkg is
+
+ Max_CPUs : constant CPU := (if Argument_Count < 2 then Number_Of_CPUs
+ else CPU'Value (Argument (2)));
+
+ subtype Worker_Id is CPU range 1 .. Max_CPUs;
+
+ type Counter is range 0 .. 10**18;
+
+ Steals : array (Worker_Id) of Counter := (others => 0);
+
+end Constant4_Pkg;
diff --git a/gcc/testsuite/gnat.dg/deep_old.adb b/gcc/testsuite/gnat.dg/deep_old.adb
deleted file mode 100644
index d7818ff968..0000000000
--- a/gcc/testsuite/gnat.dg/deep_old.adb
+++ /dev/null
@@ -1,10 +0,0 @@
--- { dg-options "-gnatws" }
-
-procedure Deep_Old (X : Integer) is
-begin
- begin
- if X = X'Old then
- null;
- end if;
- end;
-end Deep_Old;
diff --git a/gcc/testsuite/gnat.dg/derived_type4.adb b/gcc/testsuite/gnat.dg/derived_type4.adb
new file mode 100644
index 0000000000..22c41ecc64
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/derived_type4.adb
@@ -0,0 +1,16 @@
+-- { dg-do compile }
+
+procedure Derived_Type4 is
+
+ type Root (D : Positive) is record
+ S : String (1 .. D);
+ end record;
+
+ subtype Short is Positive range 1 .. 10;
+ type Derived (N : Short := 1) is new Root (D => N);
+
+ Obj : Derived;
+
+begin
+ Obj := (N => 5, S => "Hello");
+end;
diff --git a/gcc/testsuite/gnat.dg/dg.exp b/gcc/testsuite/gnat.dg/dg.exp
index a764c0b00b..f7754cc769 100644
--- a/gcc/testsuite/gnat.dg/dg.exp
+++ b/gcc/testsuite/gnat.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gnat.dg/discr36.adb b/gcc/testsuite/gnat.dg/discr36.adb
new file mode 100644
index 0000000000..64d95558e8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr36.adb
@@ -0,0 +1,19 @@
+-- { dg-do compile }
+
+with Discr36_Pkg;
+
+package body Discr36 is
+
+ function N return Natural is begin return 0; end;
+
+ type Arr is array (1 .. N) of R;
+
+ function My_Func is new Discr36_Pkg.Func (Arr);
+
+ procedure Proc is
+ A : constant Arr := My_Func;
+ begin
+ null;
+ end;
+
+end Discr36;
diff --git a/gcc/testsuite/gnat.dg/discr36.ads b/gcc/testsuite/gnat.dg/discr36.ads
new file mode 100644
index 0000000000..586a9740dc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr36.ads
@@ -0,0 +1,12 @@
+package Discr36 is
+
+ type R (D : Boolean := True) is record
+ case D is
+ when True => I : Integer;
+ when False => null;
+ end case;
+ end record;
+
+ function N return Natural;
+
+end Discr36;
diff --git a/gcc/testsuite/gnat.dg/discr36_pkg.adb b/gcc/testsuite/gnat.dg/discr36_pkg.adb
new file mode 100644
index 0000000000..82f6f621ac
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr36_pkg.adb
@@ -0,0 +1,10 @@
+package body Discr36_Pkg is
+
+ function Func return T is
+ Ret : T;
+ pragma Warnings (Off, Ret);
+ begin
+ return Ret;
+ end;
+
+end Discr36_Pkg;
diff --git a/gcc/testsuite/gnat.dg/discr36_pkg.ads b/gcc/testsuite/gnat.dg/discr36_pkg.ads
new file mode 100644
index 0000000000..8d0adfc20e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr36_pkg.ads
@@ -0,0 +1,7 @@
+package Discr36_Pkg is
+
+ generic
+ type T is private;
+ function Func return T;
+
+end Discr36_Pkg;
diff --git a/gcc/testsuite/gnat.dg/discr38.adb b/gcc/testsuite/gnat.dg/discr38.adb
index 363d2c6f60..948493f74b 100644
--- a/gcc/testsuite/gnat.dg/discr38.adb
+++ b/gcc/testsuite/gnat.dg/discr38.adb
@@ -1,40 +1,40 @@
--- { dg-do compile }
-
-procedure Discr38 is
-
- type Enum is (OK,
- NOT_CONNECTED,
- DISCONNECTED,
- REQUEST_Q_EMPTY,
- SERVER_UNAVAILABLE,
- BUFFER_TOO_SMALL,
- NO_FREE_SLOT,
- RAISE_EXCEPTION,
- REQUEST_CANCELLED,
- REQUEST_IN_PROGRESS,
- SERVER_BUSY,
- BLOCK_ACKNOWLEDGE);
-
- type R (Status : Enum := OK) is record
- Status_Block : Integer;
- case Status is
- when RAISE_EXCEPTION =>
- I : Integer;
- when OK =>
- Length : Natural;
- Data : Integer;
- when others =>
- null;
- end case;
- end record;
- for R use record
- Status at 0 range 0 .. 7;
- Status_Block at 4 range 0 .. 31;
- Length at 8 range 0 .. 31;
- end record;
-
- Nil : constant R := (OK, 1, 0, 1);
-
-begin
- null;
-end;
+-- { dg-do compile }
+
+procedure Discr38 is
+
+ type Enum is (OK,
+ NOT_CONNECTED,
+ DISCONNECTED,
+ REQUEST_Q_EMPTY,
+ SERVER_UNAVAILABLE,
+ BUFFER_TOO_SMALL,
+ NO_FREE_SLOT,
+ RAISE_EXCEPTION,
+ REQUEST_CANCELLED,
+ REQUEST_IN_PROGRESS,
+ SERVER_BUSY,
+ BLOCK_ACKNOWLEDGE);
+
+ type R (Status : Enum := OK) is record
+ Status_Block : Integer;
+ case Status is
+ when RAISE_EXCEPTION =>
+ I : Integer;
+ when OK =>
+ Length : Natural;
+ Data : Integer;
+ when others =>
+ null;
+ end case;
+ end record;
+ for R use record
+ Status at 0 range 0 .. 7;
+ Status_Block at 4 range 0 .. 31;
+ Length at 8 range 0 .. 31;
+ end record;
+
+ Nil : constant R := (OK, 1, 0, 1);
+
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/discr39.adb b/gcc/testsuite/gnat.dg/discr39.adb
new file mode 100644
index 0000000000..1ffb972dc2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr39.adb
@@ -0,0 +1,22 @@
+-- { dg-do run }
+
+with System.Storage_Elements; use System.Storage_Elements;
+
+procedure Discr39 is
+
+ type Rec (Has_Src : Boolean) is record
+ case Has_Src is
+ when True => Src : aliased Integer;
+ when False => null;
+ end case;
+ end record;
+ pragma Pack(Rec);
+ for Rec'Alignment use Integer'Alignment;
+
+ R : Rec (Has_Src => True);
+
+begin
+ if R.Src'Address mod Integer'Alignment /= 0 then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/discr40.adb b/gcc/testsuite/gnat.dg/discr40.adb
new file mode 100644
index 0000000000..ea1b46aa76
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr40.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-gnat12 -gnata" }
+
+package body Discr40 is
+
+ procedure Push (S: in out Stack; E : Element) is
+ begin
+ S.Length := S.Length + 1;
+ S.Data(S.Length) := E;
+ end Push;
+
+end Discr40;
diff --git a/gcc/testsuite/gnat.dg/discr40.ads b/gcc/testsuite/gnat.dg/discr40.ads
new file mode 100644
index 0000000000..b4ec3ada8b
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr40.ads
@@ -0,0 +1,26 @@
+pragma Assertion_Policy(Check);
+
+package Discr40 is
+
+ subtype Element is Integer;
+
+ type Vector is array (Positive range <>) of Element;
+
+ type Stack (Max_Length : Natural) is
+ record
+ Length : Natural;
+ Data : Vector (1 .. Max_Length);
+ end record;
+
+ function Not_Full (S : Stack) return Boolean is
+ (S.Length < S.Max_Length);
+
+ procedure Push (S: in out Stack; E : Element)
+ with Pre => Not_Full(S), -- Precodition
+ Post => -- Postcondition
+ (S.Length = S'Old.Length + 1) and
+ (S.Data (S.Length) = E) and
+ (for all J in 1 .. S'Old.Length =>
+ S.Data(J) = S'Old.Data(J));
+
+end Discr40;
diff --git a/gcc/testsuite/gnat.dg/discr41.adb b/gcc/testsuite/gnat.dg/discr41.adb
new file mode 100644
index 0000000000..d5ace723b1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr41.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package body Discr41 is
+
+ function F return Rec is
+ Ret : Rec (0);
+ begin
+ return Ret;
+ end;
+
+end Discr41;
diff --git a/gcc/testsuite/gnat.dg/discr41.ads b/gcc/testsuite/gnat.dg/discr41.ads
new file mode 100644
index 0000000000..4af8f63853
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/discr41.ads
@@ -0,0 +1,20 @@
+package Discr41 is
+
+ type Vector is array (Positive range <>) of Long_Float;
+
+ type Date is record
+ LF : Long_Float := 0.0;
+ end record;
+
+ type Date_Vector is array (Positive range <>) of Date;
+
+ type Rec (D : Natural) is record
+ B1 : Boolean := False;
+ DL : Date_Vector (1 .. D);
+ VL : Vector (1 .. D) := (others => 0.0);
+ B2 : Boolean := True;
+ end record;
+
+ function F return Rec;
+
+end Discr41;
diff --git a/gcc/testsuite/gnat.dg/entry_queues2.adb b/gcc/testsuite/gnat.dg/entry_queues2.adb
new file mode 100644
index 0000000000..a1445cebdc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/entry_queues2.adb
@@ -0,0 +1,45 @@
+-- { dg-do compile }
+
+procedure Entry_Queues2 is
+
+ F1 : Integer := 17;
+
+ generic
+ type T is limited private;
+ procedure Check;
+
+ procedure Check is
+ begin
+ declare
+ type Poe is new T;
+ begin
+ declare
+ type Arr is array (1 .. 2) of Poe;
+ X : Arr;
+ pragma Unreferenced (X);
+ begin
+ null;
+ end;
+ end;
+ end;
+
+begin
+
+ declare
+ protected type Poe (D3 : Integer := F1) is
+ entry E (D3 .. F1); -- F1 evaluated
+ end Poe;
+ protected body Poe is
+ entry E (for I in D3 .. F1) when True is
+ begin
+ null;
+ end E;
+ end Poe;
+
+ procedure Chk is new Check (Poe);
+
+ begin
+ Chk;
+ end;
+
+end;
diff --git a/gcc/testsuite/gnat.dg/enum3.adb b/gcc/testsuite/gnat.dg/enum3.adb
new file mode 100644
index 0000000000..1cb6c4b564
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/enum3.adb
@@ -0,0 +1,23 @@
+-- { dg-do run }
+
+procedure Enum3 is
+ type Enum is (Aaa, Bbb, Ccc);
+ for Enum use (1,2,4);
+begin
+ for Lo in Enum loop
+ for Hi in Enum loop
+ declare
+ subtype S is Enum range Lo .. Hi;
+ type Vector is array (S) of Integer;
+ Vec : Vector;
+ begin
+ for I in S loop
+ Vec (I) := 0;
+ end loop;
+ if Vec /= (S => 0) then
+ raise Program_Error;
+ end if;
+ end;
+ end loop;
+ end loop;
+end;
diff --git a/gcc/testsuite/gnat.dg/fp_exception.adb b/gcc/testsuite/gnat.dg/fp_exception.adb
new file mode 100644
index 0000000000..a8bf62fa92
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/fp_exception.adb
@@ -0,0 +1,24 @@
+-- { dg-do run { target *-*-solaris2.* } }
+-- { dg-options "-ftrapping-math" }
+
+procedure FP_Exception is
+
+ type my_fixed is digits 15;
+ for my_fixed'size use 64;
+ fixed1 : my_fixed := 1.0;
+ fixed2 : my_fixed := -0.0;
+ mask_all : constant integer := 16#1F#;
+
+ procedure fpsetmask(mask : in integer);
+ pragma IMPORT (C, fpsetmask, "fpsetmask");
+
+begin
+
+ -- Mask all floating point exceptions so they can be trapped
+ fpsetmask (mask_all);
+
+ fixed1 := fixed1 / fixed2;
+
+exception
+ when others => null;
+end;
diff --git a/gcc/testsuite/gnat.dg/in_out_parameter4.adb b/gcc/testsuite/gnat.dg/in_out_parameter4.adb
new file mode 100644
index 0000000000..4f5cc21819
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/in_out_parameter4.adb
@@ -0,0 +1,30 @@
+-- { dg-do run }
+-- { dg-options "-gnat12 -gnatVa" }
+
+procedure In_Out_Parameter4 is
+
+ type Enum is (E_Undetermined, E_Down, E_Up);
+ subtype Status_T is Enum range E_Down .. E_Up;
+
+ function Recurse (Val : in out Integer) return Status_T is
+
+ Result : Status_T;
+
+ procedure Dummy (I : in out Integer) is begin null; end;
+
+ begin
+ if Val > 500 then
+ Val := Val - 1;
+ Result := Recurse (Val);
+ return Result;
+ else
+ return E_UP;
+ end if;
+ end;
+
+ Val : Integer := 501;
+ S : Status_T;
+
+begin
+ S := Recurse (Val);
+end;
diff --git a/gcc/testsuite/gnat.dg/incomplete3.adb b/gcc/testsuite/gnat.dg/incomplete3.adb
new file mode 100644
index 0000000000..6db500f00f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/incomplete3.adb
@@ -0,0 +1,15 @@
+-- { dg-do compile }
+
+package body Incomplete3 is
+
+ function Get_Tracer (This : access Output_T'Class) return Tracer_T'class is
+ begin
+ return Tracer_T'Class (Tracer_T'(Output => This));
+ end ;
+
+ function Get_Output (This : in Tracer_T) return access Output_T'Class is
+ begin
+ return This.Output;
+ end;
+
+end Incomplete3;
diff --git a/gcc/testsuite/gnat.dg/incomplete3.ads b/gcc/testsuite/gnat.dg/incomplete3.ads
new file mode 100644
index 0000000000..6f89374971
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/incomplete3.ads
@@ -0,0 +1,22 @@
+package Incomplete3 is
+
+ type Output_T;
+ type Output_T is abstract tagged private;
+
+ type Tracer_T is tagged private;
+
+ function Get_Tracer (This : access Output_T'Class) return Tracer_T'class;
+
+ function Get_Output (This : in Tracer_T) return access Output_T'Class;
+
+private
+
+ type Output_T is abstract tagged record
+ B : Boolean := True;
+ end record;
+
+ type Tracer_T is tagged record
+ Output : access Output_T'Class := null;
+ end record;
+
+end Incomplete3;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization11.adb b/gcc/testsuite/gnat.dg/loop_optimization11.adb
index e4e27d4881..435d466a9c 100644
--- a/gcc/testsuite/gnat.dg/loop_optimization11.adb
+++ b/gcc/testsuite/gnat.dg/loop_optimization11.adb
@@ -1,19 +1,19 @@
--- { dg-do compile }
--- { dg-options "-O" }
-
-with Loop_Optimization11_Pkg; use Loop_Optimization11_Pkg;
-
-procedure Loop_Optimization11 is
- Arr : array (Prot, Mem) of Integer := (others => (others => 0));
-begin
- Put_Line (Img (0) & " ");
- for I in Arr'Range (1) loop
- for J in Arr'Range (2) loop
- declare
- Elem : Integer renames Arr (I, J);
- begin
- Put_Line (Img (Elem));
- end;
- end loop;
- end loop;
-end;
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Loop_Optimization11_Pkg; use Loop_Optimization11_Pkg;
+
+procedure Loop_Optimization11 is
+ Arr : array (Prot, Mem) of Integer := (others => (others => 0));
+begin
+ Put_Line (Img (0) & " ");
+ for I in Arr'Range (1) loop
+ for J in Arr'Range (2) loop
+ declare
+ Elem : Integer renames Arr (I, J);
+ begin
+ Put_Line (Img (Elem));
+ end;
+ end loop;
+ end loop;
+end;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads
index f4248e5524..21dfde3807 100644
--- a/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads
+++ b/gcc/testsuite/gnat.dg/loop_optimization11_pkg.ads
@@ -1,11 +1,11 @@
-package Loop_Optimization11_Pkg is
-
- function Img (X : Integer) return String;
-
- procedure Put_Line (Data : String);
-
- type Prot is (Execute, Execute_Read, Execute_Read_Write);
-
- type Mem is (Mem_Image, Mem_Mapped, Mem_Private, Unknown);
-
-end Loop_Optimization11_Pkg;
+package Loop_Optimization11_Pkg is
+
+ function Img (X : Integer) return String;
+
+ procedure Put_Line (Data : String);
+
+ type Prot is (Execute, Execute_Read, Execute_Read_Write);
+
+ type Mem is (Mem_Image, Mem_Mapped, Mem_Private, Unknown);
+
+end Loop_Optimization11_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization12.adb b/gcc/testsuite/gnat.dg/loop_optimization12.adb
new file mode 100644
index 0000000000..240874654a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization12.adb
@@ -0,0 +1,22 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+package body Loop_Optimization12 is
+
+ procedure Reset (S : Rec_Ptr) is
+ begin
+ for I in Enum1 loop
+ S.F (I).all := (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others =>
+ (others => 0))))))))));
+ end loop;
+ end;
+
+end Loop_Optimization12;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization12.ads b/gcc/testsuite/gnat.dg/loop_optimization12.ads
new file mode 100644
index 0000000000..0ed4e8b4b2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization12.ads
@@ -0,0 +1,27 @@
+package Loop_Optimization12 is
+
+ type Enum1 is (A, B, C, D, E, F, G, H, I, J);
+
+ type Enum2 is (A, B, C);
+
+ type Enum3 is (A, B, C, D, E, F);
+
+ type Enum4 is (A, B, C, D);
+
+ type Enum5 is (A, B, C, D, E);
+
+ type Arr is array (Enum3, Enum4, Enum4, Enum5, Enum5, Enum3,
+ Enum2, Enum3, Enum5, Enum3) of Natural;
+
+ type Arr_Ptr is access Arr;
+ type Ext_Arr is array (Enum1) of Arr_Ptr;
+
+ type Rec is record
+ F : Ext_Arr;
+ end record;
+
+ type Rec_Ptr is access Rec;
+
+ procedure Reset (S : Rec_Ptr);
+
+end Loop_Optimization12;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization13.adb b/gcc/testsuite/gnat.dg/loop_optimization13.adb
new file mode 100644
index 0000000000..7000172e90
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization13.adb
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Loop_Optimization13_Pkg; use Loop_Optimization13_Pkg;
+
+package body Loop_Optimization13 is
+
+ function F (A : Rec) return Rec is
+ N : constant Integer := A.V'Length / L;
+ Res : Rec
+ := (True, new Complex_Vector' (0 .. A.V'Length / L - 1 => (0.0, 0.0)));
+ begin
+ for I in 0 .. L - 1 loop
+ for J in 0 .. N - 1 loop
+ Res.V (J) := Res.V (J) + A.V (I * N + J);
+ end loop;
+ end loop;
+ return Res;
+ end;
+
+end Loop_Optimization13;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization13.ads b/gcc/testsuite/gnat.dg/loop_optimization13.ads
new file mode 100644
index 0000000000..327dcaedcb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization13.ads
@@ -0,0 +1,17 @@
+with Ada.Numerics.Complex_Types; use Ada.Numerics.Complex_Types;
+
+package Loop_Optimization13 is
+
+ type Complex_Vector is array (Integer range <>) of Complex;
+ type Complex_Vector_Ptr is access Complex_Vector;
+
+ type Rec (Kind : Boolean := False) is record
+ case Kind is
+ when True => V : Complex_Vector_Ptr;
+ when False => null;
+ end case;
+ end record;
+
+ function F (A : Rec) return Rec;
+
+end Loop_Optimization13;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization13_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization13_pkg.ads
new file mode 100644
index 0000000000..8f98b6e1f1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization13_pkg.ads
@@ -0,0 +1,5 @@
+package Loop_Optimization13_Pkg is
+
+ L : Integer;
+
+end Loop_Optimization13_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization14.adb b/gcc/testsuite/gnat.dg/loop_optimization14.adb
new file mode 100644
index 0000000000..c53c4840a7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization14.adb
@@ -0,0 +1,29 @@
+-- PR middle-end/55321
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Loop_Optimization14_Pkg; use Loop_Optimization14_Pkg;
+
+package body Loop_Optimization14 is
+
+ procedure Finalize_Pool (Pool : in out Rec) is
+ Raised : Boolean := False;
+ begin
+ Pool.A := True;
+
+ while not Pool.B loop
+
+ begin
+ Proc (Pool.B);
+
+ exception
+ when others =>
+ if not Raised then
+ Raised := True;
+ end if;
+ end;
+ end loop;
+
+ end;
+
+end Loop_Optimization14;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization14.ads b/gcc/testsuite/gnat.dg/loop_optimization14.ads
new file mode 100644
index 0000000000..ee99405069
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization14.ads
@@ -0,0 +1,13 @@
+package Loop_Optimization14 is
+
+ type Rec is record
+ A : Boolean;
+ pragma Atomic (A);
+
+ B : Boolean;
+
+ end record;
+
+ procedure Finalize_Pool (Pool : in out Rec);
+
+end Loop_Optimization14;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads
new file mode 100644
index 0000000000..23b61eb555
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization14_pkg.ads
@@ -0,0 +1,5 @@
+package Loop_Optimization14_Pkg is
+
+ procedure Proc (B : in out Boolean);
+
+end Loop_Optimization14_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization15.adb b/gcc/testsuite/gnat.dg/loop_optimization15.adb
new file mode 100644
index 0000000000..ff53575ef9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization15.adb
@@ -0,0 +1,20 @@
+-- { dg-do compile }
+-- { dg-options "-O3" }
+
+package body Loop_Optimization15 is
+
+ type Integer_Array_T is array (B16_T range <>) of Integer;
+
+ Len : constant B16_T := 10;
+
+ Src : constant Integer_Array_T (1 .. Len) := (others => 0);
+ Dst : Integer_Array_T (1 .. Len);
+
+ procedure Proc (L : B16_T) is
+ begin
+ for I in 1 .. B16_T'Min (L, Len) loop
+ Dst (I) := Src (I);
+ end loop;
+ end;
+
+end Loop_Optimization15;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization15.ads b/gcc/testsuite/gnat.dg/loop_optimization15.ads
new file mode 100644
index 0000000000..d7d04e4d35
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization15.ads
@@ -0,0 +1,9 @@
+package Loop_Optimization15 is
+
+ type B16_T is mod 2 ** 16;
+ for B16_T'Size use 16;
+ for B16_T'Alignment use 1;
+
+ procedure Proc (L : B16_T);
+
+end Loop_Optimization15;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization16.adb b/gcc/testsuite/gnat.dg/loop_optimization16.adb
new file mode 100644
index 0000000000..b9f2b70bb4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization16.adb
@@ -0,0 +1,24 @@
+-- { dg-do run }
+
+with Loop_Optimization16_Pkg; use Loop_Optimization16_Pkg;
+
+procedure Loop_Optimization16 is
+
+ Counter : Natural := 0;
+
+ C : constant Natural := F;
+
+ subtype Index_T is Index_Base range 1 .. Index_Base (C);
+
+begin
+
+ for I in Index_T'First .. Index_T'Last loop
+ Counter := Counter + 1;
+ exit when Counter > 200;
+ end loop;
+
+ if Counter > 200 then
+ raise Program_Error;
+ end if;
+
+end Loop_Optimization16;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb b/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb
new file mode 100644
index 0000000000..e4142f6e6a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization16_pkg.adb
@@ -0,0 +1,8 @@
+package body Loop_Optimization16_Pkg is
+
+ function F return Natural is
+ begin
+ return Natural (Index_Base'Last);
+ end;
+
+end Loop_Optimization16_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads
new file mode 100644
index 0000000000..abeecfb646
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization16_pkg.ads
@@ -0,0 +1,7 @@
+package Loop_Optimization16_Pkg is
+
+ type Index_Base is range 0 .. 127;
+
+ function F return Natural;
+
+end Loop_Optimization16_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization17.adb b/gcc/testsuite/gnat.dg/loop_optimization17.adb
new file mode 100644
index 0000000000..2178b65bf1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization17.adb
@@ -0,0 +1,22 @@
+-- { dg-do run }
+-- { dg-options "-O" }
+
+with Loop_Optimization17_Pkg; use Loop_Optimization17_Pkg;
+
+procedure Loop_Optimization17 is
+
+ Data : Arr;
+
+begin
+
+ Data := (others => (I => 0,
+ V1 => (others => 0.0),
+ V2 => (others => 0.0),
+ S => 0.0));
+
+ for I in Index_T'Range loop
+ Object (I).V1 := F (Data (I).V1);
+ Object (I).V2 := F (Data (I).V2);
+ end loop;
+
+end;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization17_pkg.adb b/gcc/testsuite/gnat.dg/loop_optimization17_pkg.adb
new file mode 100644
index 0000000000..20815af477
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization17_pkg.adb
@@ -0,0 +1,5 @@
+package body Loop_Optimization17_Pkg is
+
+ function F (V : Vector) return Vector is begin return V; end;
+
+end Loop_Optimization17_Pkg;
diff --git a/gcc/testsuite/gnat.dg/loop_optimization17_pkg.ads b/gcc/testsuite/gnat.dg/loop_optimization17_pkg.ads
new file mode 100644
index 0000000000..5b650dfa88
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/loop_optimization17_pkg.ads
@@ -0,0 +1,29 @@
+package Loop_Optimization17_Pkg is
+
+ type vector is array (1..3) of Long_Float;
+
+ type Rec is
+ record
+ I : Integer;
+ V1, V2 : Vector;
+ S : Long_Float;
+ end record;
+
+ for Rec use
+ record
+ I at 0 range 0 .. 31;
+ V1 at 4 range 0 .. 191;
+ V2 at 28 range 0 .. 191;
+ S at 52 range 0 .. 63;
+ end record;
+ for Rec'Alignment use 4;
+ for Rec'Size use 480;
+
+ type Index_T is range 1 .. 5;
+ type Arr is array (Index_T) of Rec;
+
+ Object : Arr;
+
+ function F (V : Vector) return Vector;
+
+end Loop_Optimization17_Pkg;
diff --git a/gcc/testsuite/gnat.dg/misaligned_volatile.adb b/gcc/testsuite/gnat.dg/misaligned_volatile.adb
new file mode 100644
index 0000000000..c76975b3ec
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/misaligned_volatile.adb
@@ -0,0 +1,28 @@
+-- { dg-do run }
+-- { dg-options "-gnatp -fstrict-volatile-bitfields" }
+
+procedure Misaligned_Volatile is
+
+ type Byte is mod 2**8;
+
+ type Block is record
+ B : Boolean;
+ V : Byte;
+ end record;
+ pragma Volatile (Block);
+ pragma Pack (Block);
+ for Block'Alignment use 1;
+
+ type Pair is array (1 .. 2) of Block;
+
+ P : Pair;
+begin
+ for K in P'Range loop
+ P(K).V := 237;
+ end loop;
+ for K in P'Range loop
+ if P(K).V /= 237 then
+ raise Program_error;
+ end if;
+ end loop;
+end;
diff --git a/gcc/testsuite/gnat.dg/nested_generic1.adb b/gcc/testsuite/gnat.dg/nested_generic1.adb
new file mode 100644
index 0000000000..1a20cdf5d4
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/nested_generic1.adb
@@ -0,0 +1,12 @@
+-- PR ada/52735
+-- Reported by Per Sandberg <per.sandberg@bredband.net>
+
+-- { dg-do compile }
+
+with Nested_Generic1_Pkg;
+
+procedure Nested_Generic1 is
+ package P is new Nested_Generic1_Pkg;
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/nested_generic1_pkg.adb b/gcc/testsuite/gnat.dg/nested_generic1_pkg.adb
new file mode 100644
index 0000000000..1227626139
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/nested_generic1_pkg.adb
@@ -0,0 +1,11 @@
+package body Nested_Generic1_Pkg is
+
+ procedure Image_Generic
+ (Renderer : in not null Element_Renderer) is
+ begin
+ null;
+ end;
+
+ procedure Image_Standard_Instance is new Image_Generic;
+
+end Nested_Generic1_Pkg;
diff --git a/gcc/testsuite/gnat.dg/nested_generic1_pkg.ads b/gcc/testsuite/gnat.dg/nested_generic1_pkg.ads
new file mode 100644
index 0000000000..a783388a69
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/nested_generic1_pkg.ads
@@ -0,0 +1,8 @@
+generic
+package Nested_Generic1_Pkg is
+
+ type Element_Renderer is access procedure;
+
+ generic procedure Image_Generic (Renderer : in not null Element_Renderer);
+
+end Nested_Generic1_Pkg;
diff --git a/gcc/testsuite/gnat.dg/noinline2.adb b/gcc/testsuite/gnat.dg/noinline2.adb
new file mode 100644
index 0000000000..0c26edeab9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noinline2.adb
@@ -0,0 +1,22 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fdump-tree-optimized" }
+
+package body Noinline2 is
+
+ function Inner (A, B : Integer) return Integer;
+ pragma No_Inline (Inner);
+
+ function Inner (A, B : Integer) return Integer is
+ begin
+ return A + B;
+ end;
+
+ function F (A, B : Integer) return Integer is
+ begin
+ return Inner (A, B) + Inner (A, -B);
+ end;
+
+end Noinline2;
+
+-- { dg-final { scan-tree-dump-times "noinline2.inner" 2 "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/noinline2.ads b/gcc/testsuite/gnat.dg/noinline2.ads
new file mode 100644
index 0000000000..f0a18530a9
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noinline2.ads
@@ -0,0 +1,5 @@
+package Noinline2 is
+
+ function F (A, B : Integer) return Integer;
+
+end Noinline2;
diff --git a/gcc/testsuite/gnat.dg/noreturn4.adb b/gcc/testsuite/gnat.dg/noreturn4.adb
new file mode 100644
index 0000000000..7225f6cb4f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noreturn4.adb
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+
+with Noreturn4_Pkg; use Noreturn4_Pkg;
+
+package body Noreturn4 is
+
+ procedure P1 (Msg : String) is
+ begin
+ P1 (Msg, 0);
+ end;
+ procedure P1 (Msg : String; Val : Integer) is
+ begin
+ Fatal_Error (Value (It));
+ end;
+
+ procedure Fatal_Error (X : Integer) is
+ begin
+ raise PRogram_Error;
+ end;
+
+end Noreturn4;
diff --git a/gcc/testsuite/gnat.dg/noreturn4.ads b/gcc/testsuite/gnat.dg/noreturn4.ads
new file mode 100644
index 0000000000..d6216da336
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noreturn4.ads
@@ -0,0 +1,10 @@
+package Noreturn4 is
+
+ procedure P1 (Msg : String);
+ procedure P1 (Msg : String; Val : Integer);
+ pragma No_Return (P1);
+
+ procedure Fatal_Error (X : Integer);
+ pragma No_Return (Fatal_Error);
+
+end Noreturn4;
diff --git a/gcc/testsuite/gnat.dg/noreturn4_pkg.ads b/gcc/testsuite/gnat.dg/noreturn4_pkg.ads
new file mode 100644
index 0000000000..1d0029e325
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noreturn4_pkg.ads
@@ -0,0 +1,18 @@
+with Ada.Finalization; use Ada.Finalization;
+
+package Noreturn4_Pkg is
+
+ type Priv is private;
+ function It return Priv;
+ function Value (Obj : Priv) return Integer;
+ function OK (Obj : Priv) return Boolean;
+
+private
+ type Priv is new Controlled with record
+ Value : Integer := 15;
+ end record;
+
+ procedure Adjust (Obj : in out Priv);
+ procedure Finalize (Obj : in out Priv);
+
+end Noreturn4_Pkg;
diff --git a/gcc/testsuite/gnat.dg/noreturn5.adb b/gcc/testsuite/gnat.dg/noreturn5.adb
new file mode 100644
index 0000000000..59b05da92f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noreturn5.adb
@@ -0,0 +1,32 @@
+-- { dg-do compile }
+
+with Ada.Characters.Handling; use Ada.Characters.Handling;
+with GNAT.OS_Lib; use GNAT.OS_Lib;
+with Text_IO; use Text_IO;
+
+package body Noreturn5 is
+
+ procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean) is
+ begin
+ Put (To_String (Arg_Line));
+
+ if Keep_Going then
+ raise Constraint_Error;
+ else
+ OS_Exit (1);
+ end if;
+
+ exception
+ when Constraint_Error =>
+ raise;
+
+ when others =>
+ if Keep_Going then
+ raise Constraint_Error;
+ else
+ OS_Exit (1);
+ end if;
+
+ end;
+
+end Noreturn5;
diff --git a/gcc/testsuite/gnat.dg/noreturn5.ads b/gcc/testsuite/gnat.dg/noreturn5.ads
new file mode 100644
index 0000000000..433f0e63be
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/noreturn5.ads
@@ -0,0 +1,6 @@
+package Noreturn5 is
+
+ procedure Proc (Arg_Line : Wide_String; Keep_Going : Boolean);
+ pragma No_Return (Proc);
+
+end Noreturn5;
diff --git a/gcc/testsuite/gnat.dg/object_overflow.adb b/gcc/testsuite/gnat.dg/object_overflow.adb
deleted file mode 100644
index 41b6184fea..0000000000
--- a/gcc/testsuite/gnat.dg/object_overflow.adb
+++ /dev/null
@@ -1,13 +0,0 @@
--- { dg-do compile }
-
-procedure Object_Overflow is
-
- procedure Proc (x : Boolean) is begin null; end;
-
- type Arr is array(Long_Integer) of Boolean;
- Obj : Arr; -- { dg-warning "Storage_Error" }
-
-begin
- Obj(1) := True;
- Proc (Obj(1));
-end;
diff --git a/gcc/testsuite/gnat.dg/object_overflow1.adb b/gcc/testsuite/gnat.dg/object_overflow1.adb
new file mode 100644
index 0000000000..ba7f657e71
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/object_overflow1.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+
+procedure Object_Overflow1 is
+
+ procedure Proc (x : Boolean) is begin null; end;
+
+ type Arr is array(Long_Integer) of Boolean;
+ Obj : Arr; -- { dg-warning "Storage_Error" }
+
+begin
+ Obj(1) := True;
+ Proc (Obj(1));
+end;
diff --git a/gcc/testsuite/gnat.dg/object_overflow2.adb b/gcc/testsuite/gnat.dg/object_overflow2.adb
new file mode 100644
index 0000000000..9601c563b2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/object_overflow2.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+
+procedure Object_Overflow2 is
+
+ procedure Proc (x : Boolean) is begin null; end;
+
+ type Arr is array(0 .. Long_Integer'Last) of Boolean;
+ Obj : Arr; -- { dg-warning "Storage_Error" }
+
+begin
+ Obj(1) := True;
+ Proc (Obj(1));
+end;
diff --git a/gcc/testsuite/gnat.dg/object_overflow3.adb b/gcc/testsuite/gnat.dg/object_overflow3.adb
new file mode 100644
index 0000000000..5e27b4f0d8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/object_overflow3.adb
@@ -0,0 +1,19 @@
+-- { dg-do compile }
+
+procedure Object_Overflow3 is
+
+ procedure Proc (x : Boolean) is begin null; end;
+
+ type Arr is array(0 .. Long_Integer'Last) of Boolean;
+
+ type Rec is record
+ A : Arr;
+ B : Arr;
+ end record;
+
+ Obj : Rec; -- { dg-warning "Storage_Error" }
+
+begin
+ Obj.A(1) := True;
+ Proc (Obj.A(1));
+end;
diff --git a/gcc/testsuite/gnat.dg/object_overflow4.adb b/gcc/testsuite/gnat.dg/object_overflow4.adb
new file mode 100644
index 0000000000..643989d348
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/object_overflow4.adb
@@ -0,0 +1,20 @@
+-- { dg-do compile }
+
+procedure Object_Overflow4 is
+
+ procedure Proc (x : Integer) is begin null; end;
+
+ type Index is new Long_Integer range 0 .. Long_Integer'Last;
+
+ type Arr is array(Index range <>) of Integer;
+
+ type Rec (Size: Index := 6) is record -- { dg-warning "Storage_Error" }
+ A: Arr (0..Size);
+ end record;
+
+ Obj : Rec; -- { dg-warning "Storage_Error" }
+
+begin
+ Obj.A(1) := 0;
+ Proc (Obj.A(1));
+end;
diff --git a/gcc/testsuite/gnat.dg/old_errors.adb b/gcc/testsuite/gnat.dg/old_errors.adb
deleted file mode 100644
index a5e4d42177..0000000000
--- a/gcc/testsuite/gnat.dg/old_errors.adb
+++ /dev/null
@@ -1,47 +0,0 @@
--- { dg-do compile }
-package body Old_Errors is
-
- A : Integer;
-
- function F
- (X : Integer := A'Old) -- { dg-error "can only appear within subprogram" }
- return Integer is
- begin
- return X;
- end F;
-
- procedure P (I : in Integer; O : out Integer; IO : in out Integer) is
- Y : Integer := 0;
- function G
- (X : Integer := Y'Old) -- { dg-error "cannot refer to local variable" }
- return Integer is
- begin
- return X;
- end G;
-
- function H (X : Integer := A'Old) return Integer is -- OK
- begin
- return X;
- end H;
-
- begin
- Y := Y'Old; -- { dg-error "cannot refer to local variable" }
- declare
- Z : Integer := 0;
- procedure Inner is
- IL : Integer := 0;
- begin
- IL := IL'Old; -- { dg-error "cannot refer to local variable" }
- Z := Z'Old; -- OK
- end Inner;
- begin
- Y := Z'Old; -- { dg-error "cannot refer to local variable" }
- end;
- Y := I'Old; -- { dg-warning "Old applied to constant has no effect" }
- Y := O'Old; -- OK
- Y := IO'Old; -- OK
- Y := G; -- OK, error has been signalled at G declaration
- pragma Assert (G (3)'Old = Y); -- { dg-error "cannot refer to local variable" }
- end P;
-
-end Old_Errors;
diff --git a/gcc/testsuite/gnat.dg/opt27.adb b/gcc/testsuite/gnat.dg/opt27.adb
new file mode 100644
index 0000000000..be1980076a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt27.adb
@@ -0,0 +1,29 @@
+-- { dg-do run }
+-- { dg-options "-O" }
+
+with Opt27_Pkg;
+
+procedure Opt27 is
+
+ type Rec_T is record
+ A, B, C, D, E : Integer;
+ end record;
+
+ package List is new Opt27_Pkg (Rec_T);
+
+ My_List : List.List_T;
+
+ function Is_Match (Element : Rec_T; Template : Integer) return Boolean is
+ begin
+ return (Element.C = Template);
+ end;
+
+ function Find_Int is new List.Find_Elem (Integer, Is_Match);
+
+ Node : List.Node_T := Find_Int (10, My_List);
+
+begin
+ if not List.Is_Null (Node) then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt27_pkg.adb b/gcc/testsuite/gnat.dg/opt27_pkg.adb
new file mode 100644
index 0000000000..17ffb731db
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt27_pkg.adb
@@ -0,0 +1,32 @@
+package body Opt27_Pkg is
+
+ type Node_Rec_T is record
+ Element : Element_T;
+ Left : Node_T;
+ Right : Node_T;
+ end record;
+
+ function Is_Null (Node : in Node_T) return Boolean is
+ begin
+ return (Node = null);
+ end Is_Null;
+
+ function Find_Elem (Template : Template_T; List : List_T) return Node_T is
+ Element_Found : Boolean := False;
+ Node_Walker : Node_T := null;
+ begin
+ Node_Walker := List.First_Node;
+
+ while not Element_Found and (Node_Walker /= null) loop
+
+ if Is_Match (Node_Walker.Element, Template) then
+ Element_Found := True;
+ else
+ Node_Walker := Node_Walker.Right;
+ end if;
+ end loop;
+
+ return Node_Walker;
+ end;
+
+end Opt27_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt27_pkg.ads b/gcc/testsuite/gnat.dg/opt27_pkg.ads
new file mode 100644
index 0000000000..01b3a909c6
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt27_pkg.ads
@@ -0,0 +1,33 @@
+generic
+
+ type Element_T is private;
+
+package Opt27_Pkg is
+
+ type Node_T is private;
+
+ type List_T is private;
+
+ function Is_Null (Node : in Node_T) return Boolean;
+
+ generic
+
+ type Template_T is private;
+
+ with function Is_Match
+ (Element : in Element_T;
+ Template : in Template_T) return Boolean is <>;
+
+ function Find_Elem (Template : Template_T; List : List_T) return Node_T;
+
+private
+
+ type Node_Rec_T;
+ type Node_T is access Node_Rec_T;
+
+ type List_T is record
+ First_Node : Node_T := null;
+ Last_Node : Node_T := null;
+ end record;
+
+end Opt27_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt28.adb b/gcc/testsuite/gnat.dg/opt28.adb
new file mode 100644
index 0000000000..74a4c5c3be
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28.adb
@@ -0,0 +1,31 @@
+with Opt28_Pkg; use Opt28_Pkg;
+
+package body Opt28 is
+
+ function Full_Filename (Filename : String) return String is
+ Path : constant String := "PATH";
+ Posix_Path : constant Posix_String := To_Posix (Path);
+ begin
+
+ declare
+ M : constant Posix_String := Value_Of (Posix_Path);
+ N : constant Posix_String (1 .. M'Length) := M;
+ Var : constant String := To_String (Str => N);
+ Start_Pos : Natural := 1;
+ End_Pos : Natural := 1;
+ begin
+ while Start_Pos <= Var'Length loop
+ End_Pos := Position (Var (Start_Pos .. Var'Length));
+
+ if Is_File (To_Posix (Var (Start_Pos .. End_Pos - 1) & Filename)) then
+ return Var (Start_Pos .. End_Pos - 1) & Filename;
+ else
+ Start_Pos := End_Pos + 1;
+ end if;
+ end loop;
+ end;
+
+ return "";
+ end;
+
+end Opt28;
diff --git a/gcc/testsuite/gnat.dg/opt28.ads b/gcc/testsuite/gnat.dg/opt28.ads
new file mode 100644
index 0000000000..4887c21484
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28.ads
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+package Opt28 is
+
+ function Full_Filename (Filename : String) return String;
+
+end Opt28;
diff --git a/gcc/testsuite/gnat.dg/opt28_pkg.ads b/gcc/testsuite/gnat.dg/opt28_pkg.ads
new file mode 100644
index 0000000000..c3c32fe1c3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt28_pkg.ads
@@ -0,0 +1,11 @@
+package Opt28_Pkg is
+
+ type Posix_String is array (Positive range <>) of aliased Character;
+
+ function To_Posix (Str : String) return Posix_String;
+ function To_String (Str : Posix_String) return String;
+ function Is_File (Str : Posix_String) return Boolean;
+ function Value_Of (Name : Posix_String) return Posix_String;
+ function Position (In_Line : String) return Natural;
+
+end Opt28_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt29.adb b/gcc/testsuite/gnat.dg/opt29.adb
new file mode 100644
index 0000000000..64f2baef3d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt29.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+package body Opt29 is
+
+ procedure Proc (T : Rec) is
+ begin
+ if Derived2 (T.F2.all).Id = T.F1.Id then
+ raise Program_Error;
+ end if;
+ end;
+
+end Opt29;
diff --git a/gcc/testsuite/gnat.dg/opt29.ads b/gcc/testsuite/gnat.dg/opt29.ads
new file mode 100644
index 0000000000..c809b1c419
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt29.ads
@@ -0,0 +1,28 @@
+package Opt29 is
+
+ type Word is mod 2**16;
+
+ type PID is record
+ W1, W2: Word;
+ end record;
+
+ type Root1 is tagged record
+ Id: PID;
+ end record;
+ type Root1_Ptr is access all Root1'Class;
+
+ type Root2 is tagged null record;
+ type Root2_Ptr is access all Root2'class;
+
+ type Derived2 is new Root2 with record
+ Id: PID;
+ end record;
+
+ type Rec is record
+ F1: Root1_Ptr;
+ F2: Root2_Ptr;
+ end record;
+
+ procedure Proc (T : Rec);
+
+end Opt29;
diff --git a/gcc/testsuite/gnat.dg/opt30.adb b/gcc/testsuite/gnat.dg/opt30.adb
new file mode 100644
index 0000000000..12139c555c
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt30.adb
@@ -0,0 +1,20 @@
+-- { dg-do run }
+-- { dg-options "-O" }
+
+procedure Opt30 is
+
+ function Id_I (I : Integer) return Integer is
+ begin
+ return I;
+ end;
+
+ A : array (Integer range -4..4) of Integer;
+
+begin
+ A := (-ID_I(4), -ID_I(3), -ID_I(2), -ID_I(1), ID_I(100),
+ ID_I(1), ID_I(2), ID_I(3), ID_I(4));
+ A(-4..0) := A(0..4);
+ if A /= (100, 1, 2, 3, 4, 1, 2, 3, 4) then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt31.adb b/gcc/testsuite/gnat.dg/opt31.adb
new file mode 100644
index 0000000000..51aa3556ce
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt31.adb
@@ -0,0 +1,43 @@
+-- { dg-do run }
+-- { dg-options "-O" }
+
+with Interfaces; use Interfaces;
+with Unchecked_Conversion;
+
+procedure Opt31 is
+
+ type Unsigned_24 is new Unsigned_32 range 0 .. 2**24 - 1;
+ subtype Time_T is Unsigned_24 range 0 .. 24 * 60 * 60 * 128 - 1;
+
+ type Messages_T is array (Positive range <>) of Unsigned_8;
+ subtype T_3Bytes is Messages_T (1 .. 3);
+
+ type Rec1 is record
+ F : Time_T;
+ end record;
+ for Rec1 use record
+ F at 0 range 0 .. 23;
+ end record;
+ for Rec1'Size use 24;
+
+ type Rec2 is record
+ I1,I2,I3,I4 : Integer;
+ R1 : Rec1;
+ end record;
+
+ function Conv is new Unchecked_Conversion (T_3Bytes, Rec1);
+
+ procedure Decode (M : Messages_T) is
+ My_Rec2 : Rec2;
+ begin
+ My_Rec2.R1 := Conv (M (1 .. 3));
+ if not My_Rec2.R1.F'Valid then
+ raise Program_Error;
+ end if;
+ end;
+
+ Message : Messages_T (1 .. 4) := (16#18#, 16#0C#, 16#0C#, 16#18#);
+
+begin
+ Decode (Message);
+end;
diff --git a/gcc/testsuite/gnat.dg/opt32.adb b/gcc/testsuite/gnat.dg/opt32.adb
new file mode 100644
index 0000000000..93f31c2ca5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt32.adb
@@ -0,0 +1,37 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+with Ada.Containers; use Ada.Containers;
+with Ada.Containers.Vectors;
+
+function Opt32 return Natural is
+
+ package My_Vectors
+ is new Vectors (Index_Type => Natural, Element_Type => Integer);
+ use My_Vectors;
+
+ V : Vector;
+
+ function Sign_Changes return Natural is
+ Cur : Cursor := To_Cursor (V, 0);
+ R : Natural := 0;
+ Negative : Boolean;
+ begin
+ Negative := Element (Cur) < 0;
+
+ loop
+ Cur := Next (Cur);
+ exit when R > 100;
+
+ if (Element (Cur) < 0) /= Negative then
+ Negative := not Negative;
+ R := R + 1;
+ end if;
+ end loop;
+
+ return R;
+ end;
+
+begin
+ return Sign_Changes;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt33.adb b/gcc/testsuite/gnat.dg/opt33.adb
new file mode 100644
index 0000000000..e1ac27c31e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt33.adb
@@ -0,0 +1,41 @@
+-- { dg-do compile }
+-- { dg-options "-O" }
+
+with Ada.Containers.Ordered_Sets;
+with Ada.Strings.Unbounded;
+
+procedure Opt33 is
+
+ type Rec is record
+ Name : Ada.Strings.Unbounded.Unbounded_String;
+ end record;
+
+ function "<" (Left : Rec; Right : Rec) return Boolean;
+
+ package My_Ordered_Sets is new Ada.Containers.Ordered_Sets (Rec);
+
+ protected type Data is
+ procedure Do_It;
+ private
+ Set : My_Ordered_Sets.Set;
+ end Data;
+
+ function "<" (Left : Rec; Right : Rec) return Boolean is
+ begin
+ return False;
+ end "<";
+
+ protected body Data is
+ procedure Do_It is
+ procedure Dummy (Position : My_Ordered_Sets.Cursor) is
+ begin
+ null;
+ end;
+ begin
+ Set.Iterate (Dummy'Access);
+ end;
+ end Data;
+
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt38.adb b/gcc/testsuite/gnat.dg/opt38.adb
new file mode 100644
index 0000000000..143f4fade1
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt38.adb
@@ -0,0 +1,9 @@
+-- { dg-do run }
+-- { dg-options "-O2 -gnatn" }
+
+with Opt38_Pkg; use Opt38_Pkg;
+
+procedure Opt38 is
+begin
+ Test (-1);
+end;
diff --git a/gcc/testsuite/gnat.dg/opt38_pkg.adb b/gcc/testsuite/gnat.dg/opt38_pkg.adb
new file mode 100644
index 0000000000..7cbbeeab32
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt38_pkg.adb
@@ -0,0 +1,33 @@
+package body Opt38_Pkg is
+
+ procedure Proc (I : Integer);
+ pragma Inline (Proc);
+
+ procedure Proc (I : Integer) is
+
+ procedure Inner;
+ pragma No_Inline (Inner);
+
+ procedure Inner is
+ begin
+ if I /= 110 then
+ raise Program_Error;
+ end if;
+ end;
+
+ begin
+ if I > 0 then
+ Inner;
+ end if;
+ end;
+
+ procedure Test (I : Integer) is
+ begin
+ if I > -1 then
+ Proc (I);
+ else
+ Proc (I + 111);
+ end if;
+ end;
+
+end Opt38_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt38_pkg.ads b/gcc/testsuite/gnat.dg/opt38_pkg.ads
new file mode 100644
index 0000000000..b6cb4e6bc7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt38_pkg.ads
@@ -0,0 +1,5 @@
+package Opt38_Pkg is
+
+ procedure Test (I : Integer);
+
+end Opt38_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt39.adb b/gcc/testsuite/gnat.dg/opt39.adb
new file mode 100644
index 0000000000..a00cac75fb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt39.adb
@@ -0,0 +1,31 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fno-inline -fdump-tree-optimized" }
+
+procedure Opt39 (I : Integer) is
+
+ type Rec is record
+ I1 : Integer;
+ I2 : Integer;
+ I3 : Integer;
+ I4 : Integer;
+ I5 : Integer;
+ end record;
+
+ procedure Set (A : access Rec; I : Integer) is
+ Tmp : Rec := A.all;
+ begin
+ Tmp.I1 := I;
+ A.all := Tmp;
+ end;
+
+ R : aliased Rec;
+
+begin
+ Set (R'Access, I);
+ if R.I1 /= I then
+ raise Program_Error;
+ end if;
+end;
+
+-- { dg-final { scan-tree-dump-times "MEM" 1 "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/opt41.adb b/gcc/testsuite/gnat.dg/opt41.adb
new file mode 100644
index 0000000000..21660431c5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt41.adb
@@ -0,0 +1,15 @@
+-- { dg-do run }
+-- { dg-options "-Os" }
+
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+with Opt41_Pkg; use Opt41_Pkg;
+
+procedure Opt41 is
+ R : Rec := (Five, To_Unbounded_String ("CONFIG"));
+ SP : String_Access := new String'(To_String (Rec_Write (R)));
+ RP : Rec_Ptr := new Rec'(Rec_Read (SP));
+begin
+ if RP.D /= R.D then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/opt41_pkg.adb b/gcc/testsuite/gnat.dg/opt41_pkg.adb
new file mode 100644
index 0000000000..c43c1bfdf0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt41_pkg.adb
@@ -0,0 +1,53 @@
+with Ada.Streams; use Ada.Streams;
+
+package body Opt41_Pkg is
+
+ type Wstream is new Root_Stream_Type with record
+ S : Unbounded_String;
+ end record;
+
+ procedure Read (Stream : in out Wstream;
+ Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset) is null;
+
+ procedure Write (Stream : in out Wstream; Item : Stream_Element_Array) is
+ begin
+ for J in Item'Range loop
+ Append (Stream.S, Character'Val (Item (J)));
+ end loop;
+ end Write;
+
+ function Rec_Write (R : Rec) return Unbounded_String is
+ S : aliased Wstream;
+ begin
+ Rec'Output (S'Access, R);
+ return S.S;
+ end Rec_Write;
+
+ type Rstream is new Root_Stream_Type with record
+ S : String_Access;
+ Idx : Integer := 1;
+ end record;
+
+ procedure Write (Stream : in out Rstream; Item : Stream_Element_Array) is null;
+
+ procedure Read (Stream : in out Rstream;
+ Item : out Stream_Element_Array;
+ Last : out Stream_Element_Offset) is
+ begin
+ Last := Stream_Element_Offset'Min
+ (Item'Last, Item'First + Stream_Element_Offset (Stream.S'Last - Stream.Idx));
+ for I in Item'First .. Last loop
+ Item (I) := Stream_Element (Character'Pos (Stream.S (Stream.Idx)));
+ Stream.Idx := Stream.Idx + 1;
+ end loop;
+ end Read;
+
+ function Rec_Read (Str : String_Access) return Rec is
+ S : aliased Rstream;
+ begin
+ S.S := Str;
+ return Rec'Input (S'Access);
+ end Rec_Read;
+
+end Opt41_Pkg;
diff --git a/gcc/testsuite/gnat.dg/opt41_pkg.ads b/gcc/testsuite/gnat.dg/opt41_pkg.ads
new file mode 100644
index 0000000000..e73bc93192
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/opt41_pkg.ads
@@ -0,0 +1,28 @@
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+
+package Opt41_Pkg is
+
+ type Enum is (One, Two, Three, Four, Five, Six);
+
+ type Rec (D : Enum) is record
+ case D is
+ when One =>
+ I : Integer;
+ when Two | Five | Six =>
+ S : Unbounded_String;
+ case D is
+ when Two => B : Boolean;
+ when others => null;
+ end case;
+ when others =>
+ null;
+ end case;
+ end record;
+
+ type Rec_Ptr is access all Rec;
+
+ function Rec_Write (R : Rec) return Unbounded_String;
+
+ function Rec_Read (Str : String_Access) return Rec;
+
+end Opt41_Pkg;
diff --git a/gcc/testsuite/gnat.dg/overflow_fixed.adb b/gcc/testsuite/gnat.dg/overflow_fixed.adb
new file mode 100644
index 0000000000..6ece515233
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/overflow_fixed.adb
@@ -0,0 +1,19 @@
+-- { dg-do run }
+-- { dg-options "-gnato -O" }
+
+procedure Overflow_Fixed is
+
+ type Unsigned_8_Bit is mod 2**8;
+
+ procedure Fixed_To_Eight (Value : Duration) is
+ Item : Unsigned_8_Bit;
+ begin
+ Item := Unsigned_8_Bit(Value);
+ raise Program_Error;
+ exception
+ when Constraint_Error => null; -- expected case
+ end;
+
+begin
+ Fixed_To_Eight (-0.5);
+end;
diff --git a/gcc/testsuite/gnat.dg/pack18.adb b/gcc/testsuite/gnat.dg/pack18.adb
new file mode 100644
index 0000000000..857a6f9787
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack18.adb
@@ -0,0 +1,12 @@
+-- { dg-do run }
+
+with Pack18_Pkg; use Pack18_Pkg;
+
+procedure Pack18 is
+ use Pack18_Pkg.Attributes_Tables;
+ Table : Instance;
+begin
+ Init (Table);
+ Set_Last (Table, 1);
+ Table.Table (Last (Table)).N := 0;
+end;
diff --git a/gcc/testsuite/gnat.dg/pack18_pkg.ads b/gcc/testsuite/gnat.dg/pack18_pkg.ads
new file mode 100644
index 0000000000..2b63fbab06
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack18_pkg.ads
@@ -0,0 +1,21 @@
+with GNAT.Dynamic_Tables;
+
+package Pack18_Pkg is
+
+ type String_Access is access String;
+
+ type Rec is record
+ S : String_Access;
+ B : Boolean;
+ N : Natural;
+ end record;
+ pragma Pack (Rec);
+
+ package Attributes_Tables is new GNAT.Dynamic_Tables
+ (Table_Component_Type => Rec,
+ Table_Index_Type => Natural,
+ Table_Low_Bound => 1,
+ Table_Initial => 200,
+ Table_Increment => 200);
+
+end Pack18_Pkg;
diff --git a/gcc/testsuite/gnat.dg/pack19.adb b/gcc/testsuite/gnat.dg/pack19.adb
new file mode 100644
index 0000000000..601039ac0f
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack19.adb
@@ -0,0 +1,56 @@
+-- { dg-do run }
+
+procedure Pack19 is
+
+ subtype Always_False is Boolean range False .. False;
+
+ type Rec1 is record
+ B1 : Boolean;
+ B2 : Boolean;
+ B3 : Boolean;
+ B4 : Boolean;
+ B5 : Boolean;
+ B6 : Boolean;
+ B7 : Always_False;
+ B8 : Boolean;
+ end record;
+ pragma Pack (Rec1);
+
+ subtype Always_True is Boolean range True .. True;
+
+ type Rec2 is record
+ B1 : Boolean;
+ B2 : Boolean;
+ B3 : Boolean;
+ B4 : Boolean;
+ B5 : Boolean;
+ B6 : Boolean;
+ B7 : Always_True;
+ B8 : Boolean;
+ end record;
+ pragma Pack (Rec2);
+
+ R1 : Rec1 := (True, True, True, True, True, True, False, False);
+ R2 : Rec2 := (False, False, False, False, False, False, True, True);
+
+begin
+ R1.B8 := True;
+ if R1.B7 /= False then
+ raise Program_Error;
+ end if;
+
+ R1.B7 := False;
+ if R1.B7 /= False then
+ raise Program_Error;
+ end if;
+
+ R2.B8 := False;
+ if R2.B7 /= True then
+ raise Program_Error;
+ end if;
+
+ R2.B7 := True;
+ if R2.B7 /= True then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/pack20.adb b/gcc/testsuite/gnat.dg/pack20.adb
new file mode 100644
index 0000000000..5ec3e93a68
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack20.adb
@@ -0,0 +1,9 @@
+package body Pack20 is
+
+ procedure Proc (A : Rec) is
+ Local : Rec := A;
+ begin
+ Modify (Local.Fixed);
+ end;
+
+end Pack20;
diff --git a/gcc/testsuite/gnat.dg/pack20.ads b/gcc/testsuite/gnat.dg/pack20.ads
new file mode 100644
index 0000000000..ddfb9d8a4d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack20.ads
@@ -0,0 +1,15 @@
+-- { dg-do compile }
+
+with Pack20_Pkg; use Pack20_Pkg;
+
+package Pack20 is
+
+ type Rec is record
+ Simple_Type : Integer;
+ Fixed : String_Ptr;
+ end record;
+ pragma Pack (Rec);
+
+ procedure Proc (A : Rec);
+
+end Pack20;
diff --git a/gcc/testsuite/gnat.dg/pack20_pkg.ads b/gcc/testsuite/gnat.dg/pack20_pkg.ads
new file mode 100644
index 0000000000..8f3c554a30
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/pack20_pkg.ads
@@ -0,0 +1,7 @@
+package Pack20_Pkg is
+
+ type String_Ptr is access all String;
+
+ procedure Modify (Fixed : in out String_Ptr);
+
+end Pack20_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/aggr5.ads b/gcc/testsuite/gnat.dg/specs/aggr5.ads
new file mode 100644
index 0000000000..ba1e695bca
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/aggr5.ads
@@ -0,0 +1,19 @@
+-- { dg-do compile }
+
+pragma Restrictions (No_Elaboration_Code);
+
+package Aggr5 is
+
+ type R is record
+ C : Character;
+ F : Float;
+ end record;
+
+ for R use record
+ C at 0 range 0 .. 7;
+ F at 1 range 0 .. 31;
+ end record;
+
+ My_R : R := (C => 'A', F => 1.0);
+
+end Aggr5;
diff --git a/gcc/testsuite/gnat.dg/specs/aggr6.ads b/gcc/testsuite/gnat.dg/specs/aggr6.ads
new file mode 100644
index 0000000000..8144105a55
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/aggr6.ads
@@ -0,0 +1,25 @@
+-- { dg-do compile }
+
+package Aggr6 is
+
+ type B15_T is mod 2 ** 15;
+ for B15_T'Size use 15;
+ for B15_T'Alignment use 1;
+
+ type B17_T is mod 2 ** 17;
+ for B17_T'Size use 17;
+ for B17_T'Alignment use 1;
+
+ type Rec_T is record
+ A : B17_T;
+ B : B15_T;
+ end record;
+ for Rec_T use record
+ A at 0 range 0 .. 16;
+ B at 0 range 17 .. 31;
+ end record;
+ for Rec_T'Size use 32;
+
+ C : constant Rec_T := (A => 1, B => 0);
+
+end Aggr6;
diff --git a/gcc/testsuite/gnat.dg/specs/array1.ads b/gcc/testsuite/gnat.dg/specs/array1.ads
new file mode 100644
index 0000000000..1964f742ec
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/array1.ads
@@ -0,0 +1,10 @@
+-- { dg-do compile }
+
+pragma Restrictions (No_Elaboration_Code);
+
+package Array1 is
+
+ type Arr is array (Positive range <>) of Boolean;
+ A : Arr (1 .. 2 ** 29);
+
+end Array1;
diff --git a/gcc/testsuite/gnat.dg/specs/array2.ads b/gcc/testsuite/gnat.dg/specs/array2.ads
new file mode 100644
index 0000000000..73d4ea5b9b
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/array2.ads
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+pragma Restrictions (No_Elaboration_Code);
+
+package Array2 is
+
+ type Arr is array (Positive range <>) of Boolean;
+ A : Arr (1 .. 2 ** 2);
+ for A'Size use 16#1000_0000_0#;
+
+end Array2;
diff --git a/gcc/testsuite/gnat.dg/specs/array3.ads b/gcc/testsuite/gnat.dg/specs/array3.ads
new file mode 100644
index 0000000000..3ef39f38e7
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/array3.ads
@@ -0,0 +1,18 @@
+-- PR middle-end/56474
+-- Reported by Pavel Zhukov <pavel@zhukoff.net>
+
+-- { dg-do compile }
+
+with Ada.Streams;
+
+package Array3 is
+
+ use type Ada.Streams.Stream_Element_Offset;
+
+ type Vector (Size : Ada.Streams.Stream_Element_Offset) is record
+ Value : Ada.Streams.Stream_Element_Array (0 .. Size);
+ end record;
+
+ Empty_Vector : Vector (-1);
+
+end Array3;
diff --git a/gcc/testsuite/gnat.dg/specs/clause_on_volatile.ads b/gcc/testsuite/gnat.dg/specs/clause_on_volatile.ads
new file mode 100644
index 0000000000..4a046c15cb
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/clause_on_volatile.ads
@@ -0,0 +1,85 @@
+-- { dg-do compile }
+
+package Clause_On_Volatile is
+
+ type U8 is mod 2 ** 8;
+
+ type Word is record
+ A, B : U8;
+ end record;
+ For Word'Alignment use 4;
+
+ type Vword is new Word;
+ For Vword'Alignment use 4;
+ pragma Volatile (Vword);
+
+ type Aword is new Word;
+ For Aword'Alignment use 4;
+ pragma Atomic (Aword);
+
+ type R1 is record
+ W : Word;
+ end record;
+ for R1 use record
+ W at 0 range 0 .. 15; -- OK, packing regular
+ end record;
+
+ type A1 is record
+ AW : Aword;
+ end record;
+ For A1'Alignment use 4;
+ for A1 use record
+ AW at 0 range 0 .. 15; -- { dg-error "must be natural size" }
+ end record;
+
+ type A2 is record
+ B : U8;
+ AW : Aword;
+ end record;
+ For A2'Alignment use 4;
+ for A2 use record
+ B at 0 range 0 .. 7;
+ AW at 1 range 0 .. 31; -- { dg-error "must be multiple" }
+ end record;
+
+ type A3 is record
+ B : U8;
+ AW : Aword;
+ end record;
+ For A3'Alignment use 4;
+ for A3 use record
+ B at 0 range 0 .. 7;
+ AW at 1 range 0 .. 15; -- { dg-error "must be (multiple|natural size)" }
+ end record;
+
+ --
+
+ type V1 is record
+ VW : Vword;
+ end record;
+ For V1'Alignment use 4;
+ for V1 use record
+ VW at 0 range 0 .. 15; -- { dg-error "must be natural size" }
+ end record;
+
+ type V2 is record
+ B : U8;
+ VW : Vword;
+ end record;
+ For V2'Alignment use 4;
+ for V2 use record
+ B at 0 range 0 .. 7;
+ VW at 1 range 0 .. 31; -- { dg-error "must be multiple" }
+ end record;
+
+ type V3 is record
+ B : U8;
+ VW : Vword;
+ end record;
+ For V3'Alignment use 4;
+ for V3 use record
+ B at 0 range 0 .. 7;
+ VW at 1 range 0 .. 15; -- { dg-error "must be (multiple|natural size)" }
+ end record;
+
+end Clause_On_Volatile;
diff --git a/gcc/testsuite/gnat.dg/specs/last_bit.ads b/gcc/testsuite/gnat.dg/specs/last_bit.ads
new file mode 100644
index 0000000000..ecfc2540a8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/last_bit.ads
@@ -0,0 +1,19 @@
+-- { dg-do compile }
+
+package Last_Bit is
+
+ Max_Components : constant := 100;
+ type Count_Type is new Natural range 0 .. Max_Components;
+ subtype Index_Type is Count_Type range 1 .. Count_Type'Last;
+
+ type List_Type is array (Index_Type range <>) of Integer;
+
+ type Record_Type (Count : Count_Type := 0) is record
+ List : List_Type (1 .. Count);
+ end record;
+
+ Null_Record : Record_Type (Count => 0);
+
+ List_Last_Bit : Integer := Null_Record.List'Last_Bit;
+
+end Last_Bit;
diff --git a/gcc/testsuite/gnat.dg/specs/limited_with4.ads b/gcc/testsuite/gnat.dg/specs/limited_with4.ads
new file mode 100644
index 0000000000..e182571f33
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/limited_with4.ads
@@ -0,0 +1,23 @@
+-- { dg-do compile }
+-- { dg-options "-gnat12 -gnatct" }
+
+with Ada.Containers.Vectors;
+with Limited_With4_Pkg;
+
+package Limited_With4 is
+
+ type Object is tagged private;
+ type Object_Ref is access all Object;
+ type Class_Ref is access all Object'Class;
+
+ package Vec is new Ada.Containers.Vectors
+ (Positive, Limited_With4_Pkg.Object_Ref,Limited_With4_Pkg ."=");
+ subtype Vector is Vec.Vector;
+
+private
+
+ type Object is tagged record
+ V : Vector;
+ end record;
+
+end Limited_With4;
diff --git a/gcc/testsuite/gnat.dg/specs/limited_with4_pkg.ads b/gcc/testsuite/gnat.dg/specs/limited_with4_pkg.ads
new file mode 100644
index 0000000000..f69ab47bab
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/limited_with4_pkg.ads
@@ -0,0 +1,15 @@
+-- { dg-do compile }
+-- { dg-options "-gnat12 -gnatct" }
+
+limited with Limited_With4;
+
+package Limited_With4_Pkg is
+
+ type Object is tagged null record;
+ type Object_Ref is access all Object;
+ type Class_Ref is access all Object'Class;
+
+ function Func return Limited_With4.Class_Ref;
+ procedure Proc (Arg : Limited_With4.Class_Ref);
+
+end Limited_With4_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/linker_alias.ads b/gcc/testsuite/gnat.dg/specs/linker_alias.ads
new file mode 100644
index 0000000000..a4867fd695
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/linker_alias.ads
@@ -0,0 +1,10 @@
+-- { dg-do compile }
+-- { dg-skip-if "missing alias support" { *-*-darwin* hppa*-*-hpux* } }
+
+package Linker_Alias is
+
+ Var : Integer; -- { dg-error "aliased to undefined symbol" }
+ pragma Export (C, Var, "my_var");
+ pragma Linker_Alias (Var, "var2");
+
+end Linker_Alias;
diff --git a/gcc/testsuite/gnat.dg/specs/linker_section.ads b/gcc/testsuite/gnat.dg/specs/linker_section.ads
index 73e89aa48e..376bd751a7 100644
--- a/gcc/testsuite/gnat.dg/specs/linker_section.ads
+++ b/gcc/testsuite/gnat.dg/specs/linker_section.ads
@@ -3,7 +3,7 @@ package Linker_Section is
pragma Linker_Section (Entity => Data1,
Section => ".eeprom");
type EEPROM_String is new String;
- pragma Linker_Section (Entity => EEPROM_String, -- { dg-error "objects" }
+ pragma Linker_Section (Entity => EEPROM_String,
Section => ".eeprom");
Data2 : constant EEPROM_String := "12345678901234567";
package Inner is end;
diff --git a/gcc/testsuite/gnat.dg/specs/machine_attribute.ads b/gcc/testsuite/gnat.dg/specs/machine_attribute.ads
new file mode 100644
index 0000000000..b38ed643a2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/machine_attribute.ads
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+
+package Machine_Attribute is
+
+ type R is null record;
+ pragma Machine_Attribute (R, "may_alias");
+
+end Machine_Attribute;
diff --git a/gcc/testsuite/gnat.dg/specs/noinline1.ads b/gcc/testsuite/gnat.dg/specs/noinline1.ads
new file mode 100644
index 0000000000..c50ac18c74
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/noinline1.ads
@@ -0,0 +1,21 @@
+-- { dg-do compile }
+
+package Noinline1 is
+
+ procedure Proc1;
+ pragma Inline (Proc1);
+ pragma No_Inline (Proc1); -- { dg-warning "both specified" }
+
+ procedure Proc2;
+ pragma No_Inline (Proc2);
+ pragma Inline (Proc2); -- { dg-warning "both specified" }
+
+ procedure Proc3;
+ pragma Inline_Always (Proc3);
+ pragma No_Inline (Proc3); -- { dg-error "mutually exclusive" }
+
+ procedure Proc4;
+ pragma No_Inline (Proc4);
+ pragma Inline_Always (Proc4); -- { dg-error "mutually exclusive" }
+
+end Noinline1;
diff --git a/gcc/testsuite/gnat.dg/specs/noinline3.ads b/gcc/testsuite/gnat.dg/specs/noinline3.ads
new file mode 100644
index 0000000000..06a33fbc74
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/noinline3.ads
@@ -0,0 +1,9 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fdump-tree-optimized" }
+
+with Noinline3_Pkg;
+
+package Noinline3 is new Noinline3_Pkg (0);
+
+-- { dg-final { scan-tree-dump-times "noinline3.inner" 2 "optimized" } }
+-- { dg-final { cleanup-tree-dump "optimized" } }
diff --git a/gcc/testsuite/gnat.dg/specs/noinline3_pkg.adb b/gcc/testsuite/gnat.dg/specs/noinline3_pkg.adb
new file mode 100644
index 0000000000..f19826d635
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/noinline3_pkg.adb
@@ -0,0 +1,16 @@
+package body Noinline3_Pkg is
+
+ function Inner (A, B : Integer) return Integer;
+ pragma No_Inline (Inner);
+
+ function Inner (A, B : Integer) return Integer is
+ begin
+ return A + B;
+ end;
+
+ function F (A, B : Integer) return Integer is
+ begin
+ return Inner (A, B) + Inner (A, -B);
+ end;
+
+end Noinline3_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/noinline3_pkg.ads b/gcc/testsuite/gnat.dg/specs/noinline3_pkg.ads
new file mode 100644
index 0000000000..b1fa450b3b
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/noinline3_pkg.ads
@@ -0,0 +1,11 @@
+-- { dg-excess-errors "cannot generate code" }
+
+generic
+
+ I : Integer;
+
+package Noinline3_Pkg is
+
+ function F (A, B : Integer) return Integer;
+
+end Noinline3_Pkg;
diff --git a/gcc/testsuite/gnat.dg/specs/opt1.ads b/gcc/testsuite/gnat.dg/specs/opt1.ads
new file mode 100644
index 0000000000..89a405c345
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/opt1.ads
@@ -0,0 +1,28 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+with Ada.Strings.Unbounded; use Ada.Strings.Unbounded;
+
+package Opt1 is
+
+ type Ptr is access all Integer;
+
+ type R1 is record
+ I1 : Integer;
+ I2 : Integer := 0;
+ I3 : Integer;
+ end record;
+
+ type R2 is record
+ P : Ptr;
+ F1 : R1;
+ end record;
+
+ type R3 is record
+ S : Unbounded_String;
+ F1 : R2;
+ I : Integer := 0;
+ F2 : R2;
+ end record;
+
+end Opt1;
diff --git a/gcc/testsuite/gnat.dg/specs/pack9.ads b/gcc/testsuite/gnat.dg/specs/pack9.ads
new file mode 100644
index 0000000000..9d5e02764b
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/pack9.ads
@@ -0,0 +1,15 @@
+-- { dg-do compile }
+
+package Pack9 is
+
+ subtype Zero is Natural range 0 .. 0;
+
+ type Rec (D : Boolean) is record
+ case D is
+ when True => Z : Zero;
+ when False => null;
+ end case;
+ end record;
+ pragma Pack (Rec);
+
+end Pack9;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming1.ads b/gcc/testsuite/gnat.dg/specs/renaming1.ads
new file mode 100644
index 0000000000..b97605aa7d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming1.ads
@@ -0,0 +1,16 @@
+-- { dg-do compile }
+
+package Renaming1 is
+
+ package Inner is
+ procedure PI (X : Integer);
+ end Inner;
+
+ procedure P (X : Integer) renames Inner.PI;
+ procedure P (X : Float);
+ pragma Convention (C, P); -- { dg-error "non-local entity" }
+
+ procedure Q (X : Float);
+ procedure Q (X : Integer) renames Inner.PI;
+ pragma Convention (C, Q); -- { dg-error "non-local entity" }
+end Renaming1;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2.ads b/gcc/testsuite/gnat.dg/specs/renaming2.ads
new file mode 100644
index 0000000000..5f199c6134
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2.ads
@@ -0,0 +1,11 @@
+-- { dg-do compile }
+
+with Renaming2_Pkg1;
+
+package Renaming2 is
+
+ type T is null record;
+
+ package Iter is new Renaming2_Pkg1.GP.Inner (T);
+
+end Renaming2;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2_pkg1.ads b/gcc/testsuite/gnat.dg/specs/renaming2_pkg1.ads
new file mode 100644
index 0000000000..45d5436ffc
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2_pkg1.ads
@@ -0,0 +1,17 @@
+-- { dg-excess-errors "no code generated" }
+
+with Renaming2_Pkg2;
+with Renaming2_Pkg3;
+with Renaming2_Pkg4;
+
+package Renaming2_Pkg1 is
+
+ package Impl is new
+ Renaming2_Pkg3 (Base_Index_T => Positive, Value_T => Renaming2_Pkg2.Root);
+
+ use Impl;
+
+ package GP is new
+ Renaming2_Pkg4 (Length_T => Impl.Length_T, Value_T => Renaming2_Pkg2.Root);
+
+end Renaming2_Pkg1;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2_pkg2.ads b/gcc/testsuite/gnat.dg/specs/renaming2_pkg2.ads
new file mode 100644
index 0000000000..38e01898d5
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2_pkg2.ads
@@ -0,0 +1,14 @@
+package Renaming2_Pkg2 is
+
+ type Root is private;
+
+private
+
+ type Root (D : Boolean := False) is record
+ case D is
+ when True => N : Natural;
+ when False => null;
+ end case;
+ end record;
+
+end Renaming2_Pkg2;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2_pkg3.ads b/gcc/testsuite/gnat.dg/specs/renaming2_pkg3.ads
new file mode 100644
index 0000000000..93ec0dfcf3
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2_pkg3.ads
@@ -0,0 +1,25 @@
+-- { dg-excess-errors "no code generated" }
+
+generic
+
+ type Base_Index_T is range <>;
+
+ type Value_T is private;
+
+package Renaming2_Pkg3 is
+
+ type T is private;
+
+ subtype Length_T is Base_Index_T range 0 .. Base_Index_T'Last;
+
+ function Value (L : Length_T) return Value_T;
+
+ function Next return Length_T;
+
+private
+
+ type Obj_T is null record;
+
+ type T is access Obj_T;
+
+end Renaming2_Pkg3;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.adb b/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.adb
new file mode 100644
index 0000000000..50dd536477
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.adb
@@ -0,0 +1,12 @@
+package body Renaming2_Pkg4 is
+
+ package body Inner is
+
+ function Next_Value return Value_T is
+ Next_Value : Value_T renames Value (Next);
+ begin
+ return Next_Value;
+ end Next_Value;
+
+ end Inner;
+end Renaming2_Pkg4;
diff --git a/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.ads b/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.ads
new file mode 100644
index 0000000000..abeffcc7da
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/specs/renaming2_pkg4.ads
@@ -0,0 +1,25 @@
+-- { dg-excess-errors "no code generated" }
+
+generic
+
+ type Length_T is range <>;
+
+ with function Next return Length_T is <>;
+
+ type Value_T is private;
+
+ with function Value (L : Length_T) return Value_T is <>;
+
+package Renaming2_Pkg4 is
+
+ generic
+ type T is private;
+ package Inner is
+
+ type Slave_T is tagged null record;
+
+ function Next_Value return Value_T;
+
+ end Inner;
+
+end Renaming2_Pkg4;
diff --git a/gcc/testsuite/gnat.dg/specs/renamings.ads b/gcc/testsuite/gnat.dg/specs/renamings.ads
deleted file mode 100644
index 7457952998..0000000000
--- a/gcc/testsuite/gnat.dg/specs/renamings.ads
+++ /dev/null
@@ -1,14 +0,0 @@
-package Renamings is
-
- package Inner is
- procedure PI (X : Integer);
- end Inner;
-
- procedure P (X : Integer) renames Inner.PI;
- procedure P (X : Float);
- pragma Convention (C, P); -- { dg-error "non-local entity" }
-
- procedure Q (X : Float);
- procedure Q (X : Integer) renames Inner.PI;
- pragma Convention (C, Q); -- { dg-error "non-local entity" }
-end Renamings;
diff --git a/gcc/testsuite/gnat.dg/specs/specs.exp b/gcc/testsuite/gnat.dg/specs/specs.exp
index 91c5f6c4c0..dbece4e083 100644
--- a/gcc/testsuite/gnat.dg/specs/specs.exp
+++ b/gcc/testsuite/gnat.dg/specs/specs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/gnat.dg/stack_usage1b.adb b/gcc/testsuite/gnat.dg/stack_usage1b.adb
new file mode 100644
index 0000000000..4129c0d34a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/stack_usage1b.adb
@@ -0,0 +1,39 @@
+-- { dg-do compile }
+-- { dg-options "-O -fstack-usage" }
+
+with Stack_Usage1_Pkg; use Stack_Usage1_Pkg;
+
+procedure Stack_Usage1b is
+
+ A : Integer := Ident_Int (123);
+
+begin
+ case A is
+ when 0 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 1 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 2 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 3 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 4 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 5 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 6 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 7 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 8 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 9 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when others =>
+ null;
+ end case;
+
+end Stack_Usage1b;
+
+-- { dg-final { scan-stack-usage "\t\[0-9\]\[0-9\]\t" { target i?86-*-* x86_64-*-* } } }
+-- { dg-final { cleanup-stack-usage } }
diff --git a/gcc/testsuite/gnat.dg/stack_usage1c.adb b/gcc/testsuite/gnat.dg/stack_usage1c.adb
new file mode 100644
index 0000000000..41b7a60563
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/stack_usage1c.adb
@@ -0,0 +1,39 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fstack-usage" }
+
+with Stack_Usage1_Pkg; use Stack_Usage1_Pkg;
+
+procedure Stack_Usage1c is
+
+ A : Integer := Ident_Int (123);
+
+begin
+ case A is
+ when 0 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 1 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 2 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 3 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 4 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 5 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 6 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 7 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 8 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when 9 =>
+ My_Proc (R'(Ident_Int(0), Ident_Int(1), Ident_Int(2), Ident_Int(3), Ident_Int(4), Ident_Int(5), Ident_Int(6), Ident_Int(7), Ident_Int(8), Ident_Int(9)));
+ when others =>
+ null;
+ end case;
+
+end Stack_Usage1c;
+
+-- { dg-final { scan-stack-usage "\t\[0-9\]\[0-9\]\t" { target i?86-*-* x86_64-*-* } } }
+-- { dg-final { cleanup-stack-usage } }
diff --git a/gcc/testsuite/gnat.dg/stack_usage2.adb b/gcc/testsuite/gnat.dg/stack_usage2.adb
new file mode 100644
index 0000000000..d458a92903
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/stack_usage2.adb
@@ -0,0 +1,26 @@
+-- { dg-do compile }
+-- { dg-options "-O2 -fstack-usage" }
+
+with System;
+
+procedure Stack_Usage2 is
+
+ Sink : System.Address;
+ pragma Import (Ada, Sink);
+
+ procedure Transmit_Data (Branch : Integer) is
+ pragma No_Inline (Transmit_Data);
+ X : Integer;
+ begin
+ case Branch is
+ when 1 => Sink := X'Address;
+ when others => null;
+ end case;
+ end;
+
+begin
+ Transmit_Data (Branch => 1);
+end;
+
+-- { dg-final { scan-stack-usage-not ":Constprop" } }
+-- { dg-final { cleanup-stack-usage } }
diff --git a/gcc/testsuite/gnat.dg/style/style.exp b/gcc/testsuite/gnat.dg/style/style.exp
deleted file mode 100644
index a764c0b00b..0000000000
--- a/gcc/testsuite/gnat.dg/style/style.exp
+++ /dev/null
@@ -1,36 +0,0 @@
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3. If not see
-# <http://www.gnu.org/licenses/>.
-
-# GCC testsuite that uses the `dg.exp' driver.
-
-# Load support procs.
-load_lib gnat-dg.exp
-
-# If a testcase doesn't have special options, use these.
-global DEFAULT_CFLAGS
-if ![info exists DEFAULT_CFLAGS] then {
- set DEFAULT_CFLAGS ""
-}
-
-# Initialize `dg'.
-dg-init
-
-# Main loop.
-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.adb]] \
- "" $DEFAULT_CFLAGS
-
-# All done.
-dg-finish
diff --git a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
index 66db2232e7..8f928c5858 100644
--- a/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
+++ b/gcc/testsuite/gnat.dg/test_raise_from_pure.adb
@@ -1,4 +1,4 @@
--- { dg-do run { xfail arm*-*-* } }
+-- { dg-do run }
-- { dg-options "-O2" }
-- This is an optimization test and its failure is only a missed optimization.
diff --git a/gcc/testsuite/gnat.dg/unchecked_convert9.adb b/gcc/testsuite/gnat.dg/unchecked_convert9.adb
new file mode 100644
index 0000000000..133f3b94c6
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/unchecked_convert9.adb
@@ -0,0 +1,15 @@
+-- { dg-do compile }
+-- { dg-options "-O -fdump-rtl-final" }
+
+package body Unchecked_Convert9 is
+
+ procedure Proc is
+ L : Unsigned_32 := 16#55557777#;
+ begin
+ Var := Conv (L);
+ end;
+
+end Unchecked_Convert9;
+
+-- { dg-final { scan-rtl-dump-times "set \\(mem/v" 1 "final" } }
+-- { dg-final { cleanup-rtl-dump "final" } }
diff --git a/gcc/testsuite/gnat.dg/unchecked_convert9.ads b/gcc/testsuite/gnat.dg/unchecked_convert9.ads
new file mode 100644
index 0000000000..d4595f52a0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/unchecked_convert9.ads
@@ -0,0 +1,20 @@
+with System;
+with Ada.Unchecked_Conversion;
+with Interfaces; use Interfaces;
+
+package Unchecked_Convert9 is
+
+ type R is record
+ H : Unsigned_16;
+ L : Unsigned_16;
+ end record;
+
+ Var : R;
+ pragma Volatile (Var);
+
+ function Conv is new
+ Ada.Unchecked_Conversion (Source => Unsigned_32, Target => R);
+
+ procedure Proc;
+
+end Unchecked_Convert9;
diff --git a/gcc/testsuite/gnat.dg/uninit_array.adb b/gcc/testsuite/gnat.dg/uninit_array.adb
new file mode 100644
index 0000000000..910bdaf431
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/uninit_array.adb
@@ -0,0 +1,22 @@
+-- { dg-do compile }
+-- { dg-options "-gnatws" }
+
+with Uninit_Array_Pkg; use Uninit_Array_Pkg;
+
+package body Uninit_Array is
+
+ function F1 return Integer;
+ pragma Inline_Always (F1);
+
+ function F1 return Integer is
+ Var : Arr;
+ begin
+ return F (Var(Var'First(1)));
+ end;
+
+ function F2 return Integer is
+ begin
+ return F1;
+ end;
+
+end Uninit_Array;
diff --git a/gcc/testsuite/gnat.dg/uninit_array.ads b/gcc/testsuite/gnat.dg/uninit_array.ads
new file mode 100644
index 0000000000..72452213e0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/uninit_array.ads
@@ -0,0 +1,5 @@
+package Uninit_Array is
+
+ function F2 return Integer;
+
+end Uninit_Array;
diff --git a/gcc/testsuite/gnat.dg/uninit_array_pkg.ads b/gcc/testsuite/gnat.dg/uninit_array_pkg.ads
new file mode 100644
index 0000000000..566632a270
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/uninit_array_pkg.ads
@@ -0,0 +1,11 @@
+package Uninit_Array_Pkg Is
+
+ type Rec is record
+ B1, B2, B3, B4: Boolean;
+ end record;
+
+ type Arr is array (Boolean) of Rec;
+
+ function F (R : Rec) return Integer;
+
+end Uninit_Array_Pkg;
diff --git a/gcc/testsuite/gnat.dg/valued_proc.adb b/gcc/testsuite/gnat.dg/valued_proc.adb
new file mode 100644
index 0000000000..7030b43c45
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/valued_proc.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-gnatdm -gnatws" }
+
+with Valued_Proc_Pkg; use Valued_Proc_Pkg;
+with System; use System;
+
+procedure Valued_Proc is
+ Status : UNSIGNED_LONGWORD;
+ Length : POSITIVE;
+begin
+ GetMsg (Status, UNSIGNED_WORD(Length));
+end;
diff --git a/gcc/testsuite/gnat.dg/valued_proc_pkg.ads b/gcc/testsuite/gnat.dg/valued_proc_pkg.ads
new file mode 100644
index 0000000000..d5197abf4d
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/valued_proc_pkg.ads
@@ -0,0 +1,15 @@
+pragma Extend_System (Aux_DEC);
+with System; use System;
+
+package Valued_Proc_Pkg is
+
+ procedure GETMSG (STATUS : out UNSIGNED_LONGWORD;
+ MSGLEN : out UNSIGNED_WORD);
+
+ pragma Interface (EXTERNAL, GETMSG);
+
+ pragma IMPORT_VALUED_PROCEDURE (GETMSG, "SYS$GETMSG",
+ (UNSIGNED_LONGWORD, UNSIGNED_WORD),
+ (VALUE, REFERENCE));
+
+end Valued_Proc_Pkg;
diff --git a/gcc/testsuite/gnat.dg/vect10.adb b/gcc/testsuite/gnat.dg/vect10.adb
new file mode 100644
index 0000000000..62b9424eec
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect10.adb
@@ -0,0 +1,30 @@
+-- { dg-do compile }
+-- { dg-options "-w" }
+
+package body Vect10 is
+
+ procedure Add_Mul (X : in out Unit; Y, Z : in Unit) is
+ begin
+ X := X + Y * Z;
+ end;
+ pragma Inline_Always (Add_Mul);
+
+ procedure Proc
+ (F : in Rec_Vector;
+ First_Index : in Natural;
+ Last_Index : in Natural;
+ Result : out Unit)
+ is
+ begin
+ Result := (others => 0.0);
+
+ for I in First_Index + 1 .. Last_Index loop
+ declare
+ Local : Rec renames F (I);
+ begin
+ Add_Mul (Result, Local.Val, Local.Val);
+ end;
+ end loop;
+ end;
+
+end Vect10;
diff --git a/gcc/testsuite/gnat.dg/vect10.ads b/gcc/testsuite/gnat.dg/vect10.ads
new file mode 100644
index 0000000000..aa3aa34323
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect10.ads
@@ -0,0 +1,17 @@
+with Vect9_Pkg; use Vect9_Pkg;
+
+package Vect10 is
+
+ type Rec is record
+ Val : Unit;
+ end record;
+
+ type Rec_Vector is array (Positive range <>) of Rec;
+
+ procedure Proc
+ (F : in Rec_Vector;
+ First_Index : in Natural;
+ Last_Index : in Natural;
+ Result : out Unit);
+
+end Vect10;
diff --git a/gcc/testsuite/gnat.dg/vect7.adb b/gcc/testsuite/gnat.dg/vect7.adb
new file mode 100644
index 0000000000..7911cc812c
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect7.adb
@@ -0,0 +1,20 @@
+-- { dg-do compile }
+
+package body Vect7 is
+
+ procedure Assign is
+ v1 : constant v4sf := (-1.0, -2.0, -3.0, -4.0);
+ v2 : v4sf := v1;
+ v3 : v4sf;
+ begin
+ v3 := vzero;
+ v3 := vconst;
+ v3 := v1;
+ v3 := v2;
+ v3 := (1.0, -2.0, 3.0, -4.0);
+ v3 := (1.0, -2.0, 3.0, F);
+
+ v2 := vzero;
+ end;
+
+end Vect7;
diff --git a/gcc/testsuite/gnat.dg/vect7.ads b/gcc/testsuite/gnat.dg/vect7.ads
new file mode 100644
index 0000000000..faf01679e2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect7.ads
@@ -0,0 +1,15 @@
+package Vect7 is
+
+ type v4sf is array (1 .. 4) of Float;
+ for v4sf'Alignment use 16;
+ pragma Machine_Attribute (v4sf, "vector_type");
+
+ vzero : constant v4sf := (0.0, 0.0, 0.0, 0.0);
+ vconst : constant v4sf := (1.0, 2.0, 3.0, 4.0);
+ vvar : v4sf := vconst;
+
+ F : Float := 5.0;
+
+ procedure Assign;
+
+end Vect7;
diff --git a/gcc/testsuite/gnat.dg/vect9.adb b/gcc/testsuite/gnat.dg/vect9.adb
new file mode 100644
index 0000000000..85f19bd981
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect9.adb
@@ -0,0 +1,45 @@
+-- { dg-do compile }
+-- { dg-options "-O -w" }
+
+package body Vect9 is
+
+ function Cmove
+ (X : in Unit;
+ Y : in Unit;
+ If_True : in Unit;
+ If_False : in Unit)
+ return Unit
+ is
+ Res : Unit;
+ begin
+ for P in Unit'Range loop
+ if X (P) >= Y (P) then
+ Res (P) := If_True (P);
+ else
+ Res (P) := If_False (P);
+ end if;
+ end loop;
+
+ return Res;
+ end;
+ pragma Inline_Always (Cmove);
+
+ procedure Proc
+ (This : in Rec;
+ CV : in Unit_Vector;
+ Data : in out Unit_Vector)
+ is
+ begin
+ for Index in Data'Range loop
+ Data (Index) := Mul (Zero_Unit, Zero_Unit);
+ declare
+ Addend : constant Unit
+ := Cmove (CV (Index), Zero_Unit, Zero_Unit, Zero_Unit) ;
+ begin
+ Data (Index) := Data(Index) + Addend;
+ end;
+ This.Data (Index) := Data (Index);
+ end loop;
+ end;
+
+end Vect9;
diff --git a/gcc/testsuite/gnat.dg/vect9.ads b/gcc/testsuite/gnat.dg/vect9.ads
new file mode 100644
index 0000000000..38a0ae44b8
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect9.ads
@@ -0,0 +1,14 @@
+with Vect9_Pkg; use Vect9_Pkg;
+
+package Vect9 is
+
+ type Rec is record
+ Data : Vector_Access;
+ end record;
+
+ procedure Proc
+ (This : in Rec;
+ CV : in Unit_Vector;
+ Data : in out Unit_Vector);
+
+end Vect9;
diff --git a/gcc/testsuite/gnat.dg/vect9_pkg.ads b/gcc/testsuite/gnat.dg/vect9_pkg.ads
new file mode 100644
index 0000000000..973a87b5d0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/vect9_pkg.ads
@@ -0,0 +1,17 @@
+package Vect9_Pkg is
+
+ type Unit is array (1 .. 4) of Float;
+ for Unit'Alignment use 32;
+ pragma Machine_Attribute (Unit, "vector_type");
+ pragma Machine_Attribute (Unit, "may_alias");
+
+ Zero_Unit : constant Unit := (others => 0.0);
+
+ function Mul (X : in Unit; Y : in Unit) return Unit;
+ function "+"(Left, Right : Unit) return Unit;
+ function "*"(Left, Right : Unit) return Unit;
+
+ type Unit_Vector is array (Positive range <>) of Unit;
+ type Vector_Access is access all Unit_Vector;
+
+end Vect9_Pkg;
diff --git a/gcc/testsuite/gnat.dg/volatile11.adb b/gcc/testsuite/gnat.dg/volatile11.adb
new file mode 100644
index 0000000000..54031d975a
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/volatile11.adb
@@ -0,0 +1,41 @@
+-- { dg-do run }
+-- { dg-options "-O -gnatp" }
+
+with Volatile11_Pkg; use Volatile11_Pkg;
+
+procedure Volatile11 is
+
+ Value : Integer := 1;
+ Bit1 : Boolean := false;
+ pragma Volatile (Bit1);
+ Bit2 : Boolean := false;
+ pragma Volatile (Bit2);
+ Bit3 : Boolean := false;
+ pragma Volatile (Bit3);
+ Bit4 : Boolean := false;
+ pragma Volatile (Bit4);
+ Bit5 : Boolean := false;
+ pragma Volatile (Bit5);
+ Bit6 : Boolean := false;
+ pragma Volatile (Bit6);
+ Bit7 : Boolean := false;
+ pragma Volatile (Bit7);
+ Bit8 : Boolean := false;
+ pragma Volatile (Bit8);
+
+begin
+ Bit_Test(Input => Value,
+ Output1 => Bit1,
+ Output2 => Bit2,
+ Output3 => Bit3,
+ Output4 => Bit4,
+ Output5 => Bit5,
+ Output6 => Bit6,
+ Output7 => Bit7,
+ Output8 => F.all);
+
+ -- Check that F is invoked before Bit_Test
+ if B /= True then
+ raise Program_Error;
+ end if;
+end;
diff --git a/gcc/testsuite/gnat.dg/volatile11_pkg.adb b/gcc/testsuite/gnat.dg/volatile11_pkg.adb
new file mode 100644
index 0000000000..f82484036c
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/volatile11_pkg.adb
@@ -0,0 +1,25 @@
+package body Volatile11_Pkg is
+
+ procedure Bit_Test(Input : in Integer;
+ Output1 : out Boolean; Output2 : out Boolean;
+ Output3 : out Boolean; Output4 : out Boolean;
+ Output5 : out Boolean; Output6 : out Boolean;
+ Output7 : out Boolean; Output8 : out Boolean) is
+ begin
+ Output8 := B;
+ Output7 := Input = 7;
+ Output6 := Input = 6;
+ Output5 := Input = 5;
+ Output4 := Input = 4;
+ Output3 := Input = 3;
+ Output2 := Input = 2;
+ Output1 := Input = 1;
+ end Bit_Test;
+
+ function F return Ptr is
+ begin
+ B := True;
+ return B'Access;
+ end;
+
+end Volatile11_Pkg;
diff --git a/gcc/testsuite/gnat.dg/volatile11_pkg.ads b/gcc/testsuite/gnat.dg/volatile11_pkg.ads
new file mode 100644
index 0000000000..af6822d97e
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/volatile11_pkg.ads
@@ -0,0 +1,15 @@
+package Volatile11_Pkg is
+
+ procedure Bit_Test(Input : in Integer;
+ Output1 : out Boolean; Output2 : out Boolean;
+ Output3 : out Boolean; Output4 : out Boolean;
+ Output5 : out Boolean; Output6 : out Boolean;
+ Output7 : out Boolean; Output8 : out Boolean);
+
+ type Ptr is access all Boolean;
+
+ B : aliased Boolean := False;
+
+ function F return Ptr;
+
+end Volatile11_Pkg;
diff --git a/gcc/testsuite/gnat.dg/warn10.adb b/gcc/testsuite/gnat.dg/warn10.adb
new file mode 100644
index 0000000000..29b140d759
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10.adb
@@ -0,0 +1,12 @@
+-- { dg-do compile }
+-- { dg-options "-O3 -gnatn -Winline" }
+
+package body Warn10 is
+
+ procedure Do_Something(Driver : My_Driver) is
+ X : Float;
+ begin
+ X := Get_Input_Value( Driver, 1, 1);
+ end;
+
+end Warn10;
diff --git a/gcc/testsuite/gnat.dg/warn10.ads b/gcc/testsuite/gnat.dg/warn10.ads
new file mode 100644
index 0000000000..01aa1e4b58
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10.ads
@@ -0,0 +1,11 @@
+with Warn10_Pkg; use Warn10_Pkg;
+
+package Warn10 is
+
+ type My_Driver is new Root with record
+ Extra : Natural;
+ end record;
+
+ procedure Do_Something(Driver : My_Driver);
+
+end Warn10;
diff --git a/gcc/testsuite/gnat.dg/warn10_pkg.ads b/gcc/testsuite/gnat.dg/warn10_pkg.ads
new file mode 100644
index 0000000000..ac5b676777
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn10_pkg.ads
@@ -0,0 +1,12 @@
+package Warn10_Pkg is
+
+ Size : constant Natural := 100;
+ type My_Array is array(1..Size, 1..Size) of Float;
+
+ type Root is tagged record
+ Input_Values : My_Array;
+ end record;
+
+ function Get_Input_Value( Driver : Root; I, J : Natural) return Float;
+
+end Warn10_Pkg;
diff --git a/gcc/testsuite/gnat.dg/warn6.adb b/gcc/testsuite/gnat.dg/warn6.adb
new file mode 100644
index 0000000000..0a388f1484
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn6.adb
@@ -0,0 +1,13 @@
+-- { dg-do compile }
+-- { dg-options "-O2" }
+
+with Unchecked_Conversion;
+with System;
+
+package body Warn6 is
+
+ function Conv is new Unchecked_Conversion (System.Address, Q_T);
+
+ procedure Dummy is begin null; end;
+
+end Warn6;
diff --git a/gcc/testsuite/gnat.dg/warn6.ads b/gcc/testsuite/gnat.dg/warn6.ads
new file mode 100644
index 0000000000..e7495ead10
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn6.ads
@@ -0,0 +1,15 @@
+package Warn6 is
+
+ package Q is
+ type T is private; -- this is the trigger
+ private
+ type T is access Integer;
+ pragma No_Strict_Aliasing (T);
+
+ end Q;
+
+ subtype Q_T is Q.T;
+
+ procedure Dummy;
+
+end Warn6;
diff --git a/gcc/testsuite/gnat.dg/warn7.adb b/gcc/testsuite/gnat.dg/warn7.adb
new file mode 100644
index 0000000000..93c14f4f34
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn7.adb
@@ -0,0 +1,18 @@
+-- { dg-do compile }
+
+procedure Warn7 is
+
+ procedure Nested;
+ pragma No_Return (Nested);
+
+ procedure Nested is
+ begin
+ raise Constraint_Error;
+ exception
+ when Constraint_Error =>
+ raise;
+ end;
+
+begin
+ Nested;
+end;
diff --git a/gcc/testsuite/gnat.dg/warn8.adb b/gcc/testsuite/gnat.dg/warn8.adb
new file mode 100644
index 0000000000..8fddb6ffc2
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn8.adb
@@ -0,0 +1,8 @@
+-- { dg-do compile }
+
+pragma Optimize (Space); -- { dg-warning "must specify -Os" }
+
+procedure Warn8 is
+begin
+ null;
+end;
diff --git a/gcc/testsuite/gnat.dg/warn9.adb b/gcc/testsuite/gnat.dg/warn9.adb
new file mode 100644
index 0000000000..38f9d71e41
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/warn9.adb
@@ -0,0 +1,10 @@
+-- { dg-do compile }
+-- { dg-options "-Wuninitialized" }
+
+pragma Warnings (Off);
+
+function Warn9 return Integer is
+ I : Integer;
+begin
+ return I;
+end;
diff --git a/gcc/testsuite/gnat.dg/weak2.adb b/gcc/testsuite/gnat.dg/weak2.adb
new file mode 100644
index 0000000000..9e704b50c0
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/weak2.adb
@@ -0,0 +1,10 @@
+-- { dg-do compile }
+
+package body Weak2 is
+
+ function F return Integer is
+ begin
+ return Var;
+ end;
+
+end Weak2;
diff --git a/gcc/testsuite/gnat.dg/weak2.ads b/gcc/testsuite/gnat.dg/weak2.ads
new file mode 100644
index 0000000000..0a0011a6ec
--- /dev/null
+++ b/gcc/testsuite/gnat.dg/weak2.ads
@@ -0,0 +1,9 @@
+package Weak2 is
+
+ Var : Integer;
+ pragma Import (Ada, Var, "var_name");
+ pragma Weak_External (Var);
+
+ function F return Integer;
+
+end Weak2;
diff --git a/gcc/testsuite/go.dg/dg.exp b/gcc/testsuite/go.dg/dg.exp
index 62c8c06447..e1f3ee3e39 100644
--- a/gcc/testsuite/go.dg/dg.exp
+++ b/gcc/testsuite/go.dg/dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/go.go-torture/execute/execute.exp b/gcc/testsuite/go.go-torture/execute/execute.exp
index 350d751142..80757a37ea 100644
--- a/gcc/testsuite/go.go-torture/execute/execute.exp
+++ b/gcc/testsuite/go.go-torture/execute/execute.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp
index 943a7f1a1a..1bbbd8742e 100644
--- a/gcc/testsuite/go.test/go-test.exp
+++ b/gcc/testsuite/go.test/go-test.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# Written by Ian Lance Taylor <iant@google.com>.
# This program is free software; you can redistribute it and/or modify
@@ -26,6 +26,8 @@
# D The directory of the test.
#
# Typical command lines:
+# // compile
+# // run
# // $G $D/$F.go && $L $F.$A && ./$A.out
# // $G $D/$F.go && $L $F.$A || echo BUG: known to fail incorrectly
# // $G $D/$F.go && echo BUG: compilation succeeds incorrectly
@@ -88,6 +90,21 @@ proc errchk { test opts } {
puts $fdout $copy_line
continue
}
+
+ # Combine quoted strings in comments, so that
+ # // ERROR "first error" "second error"
+ # turns into
+ # // ERROR "first error|second error"
+ # This format is used by the master testsuite to recognize
+ # multiple errors on a single line. We don't require that all
+ # the errors be present, but we do want to accept any of them.
+ set changed ""
+ while { $changed != $copy_line } {
+ set changed $copy_line
+ regsub "\(// \[^\"\]*\"\[^\"\]*\)\" \"" $copy_line "\\1|" out_line
+ set copy_line $out_line
+ }
+
regsub "// \(GCCGO_\)?ERROR \"\(\[^\"\]*\)\".*$" $copy_line "// \{ dg-error \"\\2\" \}" out_line
if [string match "*dg-error*\\\[*" $out_line] {
set index [string first "dg-error" $out_line]
@@ -170,6 +187,9 @@ proc go-set-goarch { } {
global target_triplet
switch -glob $target_triplet {
+ "aarch64*-*-*" {
+ set goarch "arm64"
+ }
"alpha*-*-*" {
set goarch "alpha"
}
@@ -240,6 +260,42 @@ proc go-set-goarch { } {
setenv GOARCH $goarch
}
+# Take a list of files and return a lists of lists, where each list is
+# the set of files in the same package.
+proc go-find-packages { test name files } {
+ set packages [list]
+ foreach f $files {
+ set fd [open $f r]
+ while 1 {
+ if { [gets $fd line] < 0 } {
+ close $fd
+ clone_output "$test: could not read $f"
+ unresolved $name
+ return [list]
+ }
+
+ if { [regexp "^package (\\w+)" $line match package] } {
+ set len [llength $packages]
+ for { set i 0 } { $i < $len } { incr i } {
+ set p [lindex $packages $i]
+ if { [lindex $p 0] == $package } {
+ lappend p $f
+ lset packages $i $p
+ break
+ }
+ }
+ if { $i >= $len } {
+ lappend packages [list $package $f]
+ }
+
+ close $fd
+ break
+ }
+ }
+ }
+ return $packages
+}
+
proc go-gc-tests { } {
global srcdir subdir
global runtests
@@ -267,7 +323,7 @@ proc go-gc-tests { } {
# frontend ignores the standard options, it doesn't significantly
# improve testing.
set saved_torture_options $TORTURE_OPTIONS
- set TORTURE_OPTIONS [ list { -O2 -g }]
+ set TORTURE_OPTIONS [list { -O2 -g }]
set saved-dg-do-what-default ${dg-do-what-default}
@@ -284,12 +340,28 @@ proc go-gc-tests { } {
continue
}
+ # Skip the files in stress; they are not tests.
+ if [string match "*go.test/test/stress/*" $test] {
+ continue
+ }
+
+ # Skip the files in safe; gccgo does not support safe mode.
+ if [string match "*go.test/test/safe/*" $test] {
+ continue
+ }
+
# Skip files in sub-subdirectories: they are components of
# other tests.
if [string match "*go.test/test/*/*/*" $test] {
continue
}
+ # Skip files in *.dir subdirectories: they are components of
+ # other tests.
+ if [string match "*go.test/test/*.dir/*" $test] {
+ continue
+ }
+
set name [dg-trim-dirname $srcdir $test]
# Skip certain tests if target is RTEMS OS.
@@ -316,13 +388,6 @@ proc go-gc-tests { } {
}
}
- if { [string match "*bug347*" $test] \
- || [string match "*bug348*" $test] } {
- # These bugs rely on runtime.Caller which currently fails.
- untested $name
- continue
- }
-
if { [file tail $test] == "init1.go" } {
# This tests whether GC runs during init, which for gccgo
# it currently does not.
@@ -338,15 +403,30 @@ proc go-gc-tests { } {
}
if { ( [file tail $test] == "select2.go" \
- || [file tail $test] == "stack.go" ) \
+ || [file tail $test] == "stack.go" \
+ || [file tail $test] == "peano.go" ) \
&& ! [check_effective_target_split_stack] } {
- # chan/select2.go fails on targets without split stack,
- # because they allocate a large stack segment that blows
- # out the memory calculations.
+ # These tests fails on targets without split stack.
+ untested $name
+ continue
+ }
+
+ if [string match "*go.test/test/rotate\[0123\].go" $test] {
+ # These tests produces a temporary file that takes too long
+ # to compile--5 minutes on my laptop without optimization.
+ # When compiling without optimization it tests nothing
+ # useful, since the point of the test is to see whether
+ # the compiler generates rotate instructions.
untested $name
continue
}
+ if { [file tail $test] == "bug347.go" \
+ || [file tail $test] == "bug348.go" } {
+ # These tests don't work if the functions are inlined.
+ set TORTURE_OPTIONS [list { -O0 -g }]
+ }
+
set fd [open $test r]
set lines_ok 1
@@ -368,6 +448,21 @@ proc go-gc-tests { } {
continue
}
+ if { [ string match "// +build *" $test_line ] } {
+ if { [ string match "*[getenv GOARCH]*" $test_line ] } {
+ continue
+ }
+ if { [ string match "*linux*" $test_line ] } {
+ continue
+ }
+ if { [ string match "*!windows*" $test_line ] } {
+ continue
+ }
+ close $fd
+ unsupported $name
+ set lines_ok 0
+ }
+
break
}
@@ -396,7 +491,8 @@ proc go-gc-tests { } {
set go_compile_args ""
set go_execute_args ""
- if { [regexp ".*\\\$A.out (\[^|&>2\].*)\$" $test_line match progargs] } {
+ if { [regexp "// run (\[^|&>2\].*)\$" $test_line match progargs] \
+ && ! [string match "*.go*" "$progargs"] } {
set go_execute_args $progargs
verbose -log "$test: go_execute_args is $go_execute_args"
set index [string last " $progargs" $test_line]
@@ -424,14 +520,37 @@ proc go-gc-tests { } {
}
}
- if { $test_line == "// \$G \$D/\$F\.go && \$L \$F\.\$A && \./\$A\.out >tmp.go &&" \
- && $test_line2 == "// \$G tmp\.go && \$L tmp\.\$A && \./\$A\.out || echo BUG: 64bit" } {
- # 64bit.go is a special case.
+ if { $test_line == "// compile"
+ || $test_line == "// echo bug395 is broken # takes 90+ seconds to break" } {
+ # This is a vanilla compile test.
+ set dg-do-what-default "assemble"
+ go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
+ } elseif { $test_line == "// run"
+ || $test_line == "// \$G \$F.go && \$L \$F.\$A && ./\$A.out" } {
+ # This is a vanilla execution test.
+ go-torture-execute $test
+ file delete core [glob -nocomplain core.*]
+ } elseif { $test_line == "// build" } {
+ # This is a vanilla compile and link test.
+ set dg-do-what-default "link"
+ go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
+ } elseif { [string match "// runoutput*" $test_line] \
+ || ($test_line == "// \$G \$D/\$F.go && \$L \$F.\$A &&"
+ && $test_line2 == "// ./\$A.out >tmp.go && \$G tmp.go && \$L -o \$A.out1 tmp.\$A && ./\$A.out1") } {
+ # Run the test to get a .go program to run.
set go_execute_args ""
set hold_runtests $runtests
set runtests "go-test.exp"
+ set files [list]
+ if { [string match "// runoutput*" $test_line] } {
+ set args ""
+ regsub "// runoutput\(.*\)" $test_line "\\1" args
+ foreach f $args {
+ lappend files "[file dirname $test]/$f"
+ }
+ }
set dg-do-what-default "link"
- dg-test -keep-output $test "-O" "-w $DEFAULT_GOCFLAGS"
+ dg-test -keep-output $test "-O" "$files -w $DEFAULT_GOCFLAGS"
set output_file "./[file rootname [file tail $test]].exe"
set base "[file rootname [file tail $test]]"
if [isnative] {
@@ -440,42 +559,17 @@ proc go-gc-tests { } {
} else {
pass "$name execution"
file delete $base-out.x
- # Disable optimizations as this test takes a long time
- # to compile.
- set hold $TORTURE_OPTIONS
- set TORTURE_OPTIONS [ list { -O0 -g }]
+ # Disable optimizations as some of these tests
+ # take a long time to compile.
+ set TORTURE_OPTIONS [list { -O0 -g -fno-var-tracking-assignments }]
go-torture-execute "./$base-out.go"
- set TORTURE_OPTIONS $hold
}
file delete $base-out.go
}
file delete $output_file
set runtests $hold_runtests
- } elseif { $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out" \
- || $test_line == "// \$G \$F.go && \$L \$F.\$A && ./\$A.out" \
- || $test_line == "// \$G \$F.go && \$L \$F.\$A &&./\$A.out" \
- || $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A && \$A.out" \
- || [string match \
- "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out || echo BUG*" \
- $test_line]
- || [string match \
- "// \$G \$F.go && \$L \$F.\$A && (./\$A.out || echo BUG*" \
- $test_line]
- || [string match \
- "// \$G \$D/\$F.go && \$L \$F.\$A && (./\$A.out || echo BUG*" \
- $test_line]
- || [string match \
- "// \$G \$F.go && \$L \$F.\$A && GOMAXPROCS=* ./\$A.out" \
- $test_line]
- || [string match \
- "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out >* || echo BUG*" \
- $test_line] } {
- # This is a vanilla execution test.
- go-torture-execute $test
- file delete core [glob -nocomplain core.*]
- } elseif { $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out 2>&1 | cmp - \$D/\$F.out" \
- || $test_line == "// \$G \$F.go && \$L \$F.\$A && ./\$A.out 2>&1 | cmp - \$D/\$F.out" \
- || $test_line == "// (\$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out 2>&1 | cmp - \$D/\$F.out)" } {
+ } elseif { $test_line == "// cmpout" \
+ || $test_line == "// (\$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out 2>&1 | cmp - \$D/\$F.out)" } {
# This is an execution test for which we need to check the
# program output.
set hold_runtests $runtests
@@ -495,110 +589,146 @@ proc go-gc-tests { } {
regsub "\\.go$" $test ".out" expect
filecmp $expect $base.p "$name compare"
}
- #file delete $base.p
+ file delete $base.p
} else {
untested "$name execution"
untested "$name compare"
}
set runtests $hold_runtests
- } elseif { [string match \
- "// \$G \$D/\$F.go && \$L \$F.\$A || echo BUG*" \
- $test_line] \
- || [string match "// \$G \$F.go && \$L \$F.\$A #*" \
- $test_line]
- || $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A" } {
- # This is a vanilla compile and link test.
- set dg-do-what-default "link"
- go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
- } elseif { [string match "// \$G \$D/\$F.go" $test_line] \
- || [string match "// \$G \$D/\$F.go || echo BUG*" \
- $test_line] \
- || [string match "// \$G \$D/\$F.go || echo \"Bug*" \
- $test_line] \
- || [string match "// \$G \$D/\$F.go || echo \"Issue*" \
- $test_line] \
- || [string match "// \$G \$F.go || echo BUG*" \
- $test_line] \
- || [string match "// ! \$G \$D/\$F.go && echo BUG*" \
- $test_line] \
- || $test_line == "// echo bug395 is broken # takes 90+ seconds to break" } {
- # This is a vanilla compile test.
- set dg-do-what-default "assemble"
- go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
- } elseif { [string match "// \$G \$D/\$F.go && echo BUG*" \
- $test_line] \
- || $test_line == "// ! \$G \$D/\$F.go >/dev/null" \
- || $test_line == "// ! \$G \$D/\$F.go" \
- || $test_line == "// ! \$G \$F.go" \
- || [string match "// ! \$G \$D/\$F.go || echo BUG*" \
- $test_line] } {
- # This is a compile test which should fail.
- set dg-do-what-default "assemble"
- setup_xfail "*-*-*"
- go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
- } elseif { [string match "// \$G \$D/\$F.go && \$L \$F.\$A && ! ./\$A.out" \
- $test_line] \
- || [string match "// \$G \$D/\$F.go && \$L \$F.\$A && ! ./\$A.out || echo BUG: *" \
- $test_line] \
- || [string match "// \$G \$D/\$F.go && \$L \$F.\$A && (! ./\$A.out || echo BUG: *" \
- $test_line] \
- || ($test_line == "// \$G \$D/\$F.go && \$L \$F.\$A &&"
- && $test_line2 == "// ((! sh -c ./\$A.out) >/dev/null 2>&1 || echo BUG: should fail)") } {
+ } elseif { [string match "// \$G \$D/\$F.go && \$L \$F.\$A && ! ./\$A.out || echo BUG: *" \
+ $test_line] } {
go-execute-xfail $test
- } elseif { [string match "// errchk \$G \$F.go" $test_line] \
- || [string match "// errchk \$G -e \$F.go" $test_line] \
- || [string match "// errchk \$G \$D/\$F.go" $test_line] \
- || [string match "//errchk \$G \$D/\$F.go" $test_line] \
- || [string match "// errchk \$G -e \$D/\$F.go" \
- $test_line] \
- || [string match "// ! errchk \$G \$D/\$F.go" $test_line] \
- || [string match "// ! errchk \$G -e \$D/\$F.go" \
- $test_line] \
- || [string match "// errchk \$G \$F.go || true" \
- $test_line] \
- || [string match "// errchk \$G \$D/\$F.go || true" \
- $test_line] \
- || [string match "// errchk \$G -e \$D/\$F.go || true" \
- $test_line] \
- || [string match "// errchk \$G \$D/\$F.go || echo BUG*" \
- $test_line] } {
+ } elseif { $test_line == "// errorcheck" } {
errchk $test ""
- } elseif { [string match \
- "// \$G \$D/\$F.dir/bug0.go && \$G \$D/\$F.dir/bug1.go || echo BUG*" \
- $test_line] \
- || [string match \
- "// \$G \$D/\$F.dir/one.go && \$G \$D/\$F.dir/two.go" \
- $test_line] } {
- if { [string match \
- "// \$G \$D/\$F.dir/bug0.go && \$G \$D/\$F.dir/bug1.go || echo BUG*" \
- $test_line] } {
- set name1 "bug0.go"
- set name2 "bug1.go"
- } elseif { [string match \
- "// \$G \$D/\$F.dir/one.go && \$G \$D/\$F.dir/two.go" \
- $test_line] } {
- set name1 "one.go"
- set name2 "two.go"
+ } elseif { $test_line == "// errorcheckdir" } {
+ set hold_runtests $runtests
+ set runtests "go-test.exp"
+ set dir "[file rootname $test].dir"
+ set files [lsort [glob "$dir/*.go"]]
+ set packages [go-find-packages $test $name $files]
+ if { [llength $packages] > 0 } {
+ set dg-do-what-default "assemble"
+ set del [list]
+ set last [lindex $packages end]
+ set packages [lreplace $packages end end]
+ foreach p $packages {
+ dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+ lappend del "[file rootname [file tail [lindex $p 1]]].o"
+ }
+ errchk [lindex $last 1] "[lrange $last 2 end]"
+ foreach f $del {
+ file delete $f
+ }
}
+ set runtests $hold_runtests
+ } elseif { [string match "// errorcheckoutput*" $test_line] } {
+ # Run the test to get a .go program to error check.
+ set go_execute_args ""
+ set hold_runtests $runtests
+ set runtests "go-test.exp"
+ set files [list]
+ regsub "// errorcheckoutput\(.*\)" $test_line "\\1" args
+ foreach f $args {
+ lappend files "[file dirname $test]/$f"
+ }
+ set dg-do-what-default "link"
+ dg-test -keep-output $test "-O" "$files -w $DEFAULT_GOCFLAGS"
+ set output_file "./[file rootname [file tail $test]].exe"
+ set base "[file rootname [file tail $test]]"
+ if [isnative] {
+ if { [catch "exec $output_file >$base-out.go"] != 0 } {
+ fail "$name execution"
+ } else {
+ pass "$name execution"
+ errchk "$base-out.go" ""
+ }
+ file delete $base-out.go
+ }
+ file delete $output_file
+ set runtests $hold_runtests
+ } elseif { $test_line == "// compiledir" } {
set hold_runtests $runtests
set runtests "go-test.exp"
set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/$name1" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/$name2" file2
- dg-test $file2 "-O" "-w $DEFAULT_GOCFLAGS"
- file delete "[file rootname [file tail $file1]].o"
+ set dir "[file rootname $test].dir"
+ set del {}
+ foreach f [lsort [glob "$dir/*.go"]] {
+ dg-test -keep-output $f "-O" "-w $DEFAULT_GOCFLAGS"
+ lappend del "[file rootname [file tail $f]].o"
+ }
+ foreach f $del {
+ file delete $f
+ }
+ set runtests $hold_runtests
+ } elseif { $test_line == "// rundir" } {
+ set hold_runtests $runtests
+ set runtests "go-test.exp"
+ set dir "[file rootname $test].dir"
+ set files [lsort [glob "$dir/*.go"]]
+ set packages [go-find-packages $test $name $files]
+ if { [llength $packages] > 0 } {
+ set dg-do-what-default "assemble"
+ set del [list]
+ set last [lindex $packages end]
+ set packages [lreplace $packages end end]
+ foreach p $packages {
+ dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+ lappend del "[file rootname [file tail [lindex $p 1]]].o"
+ }
+ set dg-do-what-default "link"
+ set go_compile_args $del
+ go-torture-execute [lrange $last 1 end]
+ foreach f $del {
+ file delete $f
+ }
+ }
set runtests $hold_runtests
+ } elseif { $test_line == "// rundircmpout" } {
+ set hold_runtests $runtests
+ set runtests "go-test.exp"
+ set dir "[file rootname $test].dir"
+ set files [lsort [glob "$dir/*.go"]]
+ set packages [go-find-packages $test $name $files]
+ if { [llength $packages] > 0 } {
+ set dg-do-what-default "assemble"
+ set del [list]
+ set last [lindex $packages end]
+ set packages [lreplace $packages end end]
+ foreach p $packages {
+ dg-test -keep-output [lrange $p 1 end] "-O" "-w $DEFAULT_GOCFLAGS"
+ lappend del "[file rootname [file tail [lindex $p 1]]].o"
+ }
+ set dg-do-what-default "link"
+ dg-test -keep-output [lrange $last 1 end] "$del -O" "-w $DEFAULT_GOCFLAGS"
+ set base "[file rootname [file tail [lindex $last 1]]]"
+ set output_file "./$base.exe"
+ lappend del $output_file
+ if [isnative] {
+ verbose -log "$output_file >$base.p 2>&1"
+ if { [catch "exec $output_file 2>$base.p" catcherr] != 0 } {
+ verbose -log $catcherr
+ fail "$name execution"
+ untested "$name compare"
+ } else {
+ pass "$name execution"
+ regsub "\\.go$" "$test" ".out" expect
+ filecmp $expect $base.p "$name compare"
+ }
+ lappend del $base.p
+ }
+ foreach f $del {
+ file delete $f
+ }
+ }
+ set runtests $hold_runtests
+ } elseif { "$test_line" == ""
+ || [string match "// true*" $test_line]
+ || [string match "// skip*" $test_line] } {
+ # Not a real test, just ignore.
} elseif { [string match \
"// \$G \$D/\$F.dir/bug0.go && errchk \$G \$D/\$F.dir/bug1.go" \
$test_line] \
|| [string match \
- "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/p2.go" \
- $test_line] \
- || [string match \
- "// \$G \$D/\$F.dir/b.go && \$G \$D/\$F.dir/a.go" \
- $test_line] \
- || [string match \
"// \$G \$D/\$F.dir/io.go && errchk \$G -e \$D/\$F.dir/main.go" \
$test_line] } {
if { [string match \
@@ -607,16 +737,6 @@ proc go-gc-tests { } {
set name1 "bug0.go"
set name2 "bug1.go"
} elseif { [string match \
- "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/p2.go" \
- $test_line] } {
- set name1 "p1.go"
- set name2 "p2.go"
- } elseif { [string match \
- "// \$G \$D/\$F.dir/b.go && \$G \$D/\$F.dir/a.go" \
- $test_line] } {
- set name1 "b.go"
- set name2 "a.go"
- } elseif { [string match \
"// \$G \$D/\$F.dir/io.go && errchk \$G -e \$D/\$F.dir/main.go" \
$test_line] } {
set name1 "io.go"
@@ -643,35 +763,6 @@ proc go-gc-tests { } {
file delete "[file rootname [file tail $file1]].o"
set runtests $hold_runtests
} elseif { [string match \
- "// \$G \$D/\$F.dir/bug0.go && (! \$G \$D/\$F.dir/bug1.go || echo BUG*" \
- $test_line] } {
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/bug0.go" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/bug1.go" file2
- setup_xfail "*-*-*"
- dg-test $file2 "-O" "-w $DEFAULT_GOCFLAGS"
- file delete "[file rootname [file tail $file1]].o"
- set runtests $hold_runtests
- } elseif { [string match \
- "// \$G \$D/\$F.dir/bug0.go && \$G \$D/\$F.dir/bug1.go && (! \$G \$D/\$F.dir/bug2.go || echo BUG*" \
- $test_line] } {
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/bug0.go" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/bug1.go" file2
- dg-test -keep-output $file2 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/bug2.go" file3
- setup_xfail "*-*-*"
- dg-test $file3 "-O" "-w $DEFAULT_GOCFLAGS"
- file delete "[file rootname [file tail $file1]].o"
- file delete "[file rootname [file tail $file2]].o"
- set runtests $hold_runtests
- } elseif { [string match \
"// \$G \$D/\$F.dir/bug0.go && \$G \$D/\$F.dir/bug1.go && errchk \$G \$D/\$F.dir/bug2.go" \
$test_line] } {
set hold_runtests $runtests
@@ -691,7 +782,10 @@ proc go-gc-tests { } {
$test_line] \
|| [string match \
"// \$G \$D/\$F.dir/p.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ./\$A.out" \
- $test_line] } {
+ $test_line] \
+ || $test_line == "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ./\$A.out" \
+ || $test_line == "// \$G \$D/\$F.dir/lib.go && \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out" \
+ || $test_line == "// \$G \$D/method4a.go && \$G \$D/\$F.go && \$L \$F.\$A && ./$\A.out" } {
if { [string match \
"// \$G \$D/bug160.dir/x.go && \$G \$D/bug160.dir/y.go && \$L y.\$A && ./\$A.out" \
$test_line] } {
@@ -702,14 +796,29 @@ proc go-gc-tests { } {
$test_line] } {
set name1 "p.go"
set name2 "main.go"
+ } elseif { $test_line == "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ./\$A.out" } {
+ set name1 "p1.go"
+ set name2 "main.go"
+ } elseif { $test_line == "// \$G \$D/\$F.dir/lib.go && \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out" } {
+ set name1 "lib.go"
+ set name2 ""
+ } elseif { $test_line == "// \$G \$D/method4a.go && \$G \$D/\$F.go && \$L \$F.\$A && ./$\A.out" } {
+ set name1 "method4a.go"
+ set name2 ""
}
set hold_runtests $runtests
set runtests "go-test.exp"
set dg-do-what-default "assemble"
regsub "\\.go$" $test ".dir/$name1" file1
+ if { $name1 == "method4a.go" } {
+ set file1 "[file dirname $test]/method4a.go"
+ }
dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
set ofile1 "[file rootname [file tail $file1]].o"
regsub "\\.go$" $test ".dir/$name2" file2
+ if { $name2 == "" } {
+ set file2 $test
+ }
dg-test -keep-output $file2 "-O" "-w $DEFAULT_GOCFLAGS"
set ofile2 "[file rootname [file tail $file2]].o"
set dg-do-what-default "link"
@@ -723,31 +832,27 @@ proc go-gc-tests { } {
$status $name
file delete $ofile1 $ofile2 $output_file
set runtests $hold_runtests
- } elseif { [string match \
- "// \$G \$D/bug191.dir/a.go && \$G \$D/bug191.dir/b.go && \$G \$D/\$F.go && \$L \$F.\$A" \
- $test_line] } {
+ } elseif { $test_line == "// \$G \$D/\$F.dir/one.go && \$G \$D/\$F.dir/two.go && \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out" } {
set hold_runtests $runtests
set runtests "go-test.exp"
set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/a.go" file1
+ regsub "\\.go$" $test ".dir/one.go" file1
dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
set ofile1 "[file rootname [file tail $file1]].o"
- regsub "\\.go$" $test ".dir/b.go" file2
+ regsub "\\.go$" $test ".dir/two.go" file2
dg-test -keep-output $file2 "-O" "-w $DEFAULT_GOCFLAGS"
set ofile2 "[file rootname [file tail $file2]].o"
- dg-test -keep-output "$test" "-O" "-w $DEFAULT_GOCFLAGS"
+ dg-test -keep-output $test "-O" "-w $DEFAULT_GOCFLAGS"
set ofile3 "[file rootname [file tail $test]].o"
set dg-do-what-default "link"
set output_file "./[file rootname [file tail $test]].exe"
set comp_output [go_target_compile "$ofile1 $ofile2 $ofile3" \
$output_file "executable" "$options"]
set comp_output [go-dg-prune $target_triplet $comp_output]
- if [string match "" $comp_output] {
- pass $name
- } else {
- verbose -log $comp_output
- fail $name
- }
+ verbose -log $comp_output
+ set result [go_load "$output_file" "" ""]
+ set status [lindex $result 0]
+ $status $name
file delete $ofile1 $ofile2 $ofile3 $output_file
set runtests $hold_runtests
} elseif { [string match \
@@ -816,38 +921,6 @@ proc go-gc-tests { } {
}
file delete $ofile1 $ofile2 $output_file
set runtests $hold_runtests
- } elseif { [string match \
- "// \$G \$D/\$F.dir/chanbug.go && \$G -I. \$D/\$F.dir/chanbug2.go" \
- $test_line] } {
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/chanbug.go" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/chanbug2.go" file2
- dg-test $file2 "-O" "-w $DEFAULT_GOCFLAGS"
- file delete "[file rootname [file tail $file1]].o"
- set runtests $hold_runtests
- } elseif { [string match \
- "// (! \$G \$D/\$F.go) | grep 'initialization loop' *" \
- $test_line] } {
- set dg-do-what-default "assemble"
- setup_xfail "*-*-*"
- go-dg-runtest $test "-w $DEFAULT_GOCFLAGS"
- } elseif { [string match \
- "// \$G \$D/\$F.dir/x.go && errchk \$G \$D/\$F.dir/y.go" \
- $test_line] } {
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/x.go" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- regsub "\\.go$" $test ".dir/y.go" file2
- errchk $file2 ""
- file delete "[file rootname [file tail $file1]].o"
- set runtests $hold_runtests
- } elseif { "$test_line" == "" || [string match "// true*" $test_line] } {
- # Not a real test, just ignore.
} elseif { $test_line == "// \$G \$D/\$F.dir/bug0.go &&" \
&& $test_line2 == "// \$G \$D/\$F.dir/bug1.go &&" \
&& $test_line3 == "// \$G \$D/\$F.dir/bug2.go &&" \
@@ -921,7 +994,7 @@ proc go-gc-tests { } {
}
file delete $ofile1 $ofile2 $output_file
set runtests $hold_runtests
- } elseif { $test_line == "// \$G \$D/\$F.go \$D/cmplxdivide1.go && \$L \$D/\$F.\$A && ./\$A.out" } {
+ } elseif { $test_line == "// run cmplxdivide1.go" } {
regsub "/\[^/\]*$" $test "/cmplxdivide1.go" test2
set output_file "./[file rootname [file tail $test]].o"
set comp_output [go_target_compile "$test $test2" \
@@ -954,10 +1027,8 @@ proc go-gc-tests { } {
file delete tmp.x
# Disable optimizations as this test takes a long time
# to compile.
- set hold $TORTURE_OPTIONS
- set TORTURE_OPTIONS [ list { -O0 -g }]
+ set TORTURE_OPTIONS [list { -O0 -g -fno-var-tracking-assignments }]
go-torture-execute "./tmp.go"
- set TORTURE_OPTIONS $hold
}
if { [catch "exec $output_file -pass 1 >tmp.go"] != 0 } {
fail "$name execution 1"
@@ -994,70 +1065,13 @@ proc go-gc-tests { } {
}
file delete $output_file
set runtests $hold_runtests
- } elseif { [string match \
- "// \$G \$D/\$F.dir/p.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ! ./\$A.out || echo BUG*" \
- $test_line] } {
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "assemble"
- regsub "\\.go$" $test ".dir/p.go" file1
- dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
- set ofile1 "[file rootname [file tail $file1]].o"
- regsub "\\.go$" $test ".dir/main.go" file2
- dg-test -keep-output $file2 "-O" "-w $DEFAULT_GOCFLAGS"
- set ofile2 "[file rootname [file tail $file2]].o"
- set output_file "./[file rootname [file tail $test]].exe"
- set comp_output [go_target_compile "$ofile1 $ofile2" \
- $output_file "executable" "$options"]
- set comp_output [go-dg-prune $target_triplet $comp_output]
- if [string match "" $comp_output] {
- setup_xfail "*-*-*"
- set result [go_load "$output_file" "" ""]
- set status [lindex $result 0]
- $status $name
- } else {
- verbose -log $comp_output
- fail $name
- }
- file delete $ofile1 $ofile2 $output_file
- set runtests $hold_runtests
- } elseif { $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out >tmp.go &&"
- && $test_line2 == "// \$G tmp.go && \$L tmp.\$A && ./\$A.out || echo BUG: select5" } {
- set go_execute_args ""
- set hold_runtests $runtests
- set runtests "go-test.exp"
- set dg-do-what-default "link"
- dg-test -keep-output $test "-O" "-w $DEFAULT_GOCFLAGS"
- set output_file "./[file rootname [file tail $test]].exe"
- set base "[file rootname [file tail $test]]"
- if [isnative] {
- if { [catch "exec $output_file > $base-out.go"] != 0 } {
- fail "$name execution"
- } else {
- pass "$name execution"
- file delete $base-out.x
- # Disable optimizations as this test takes a long time
- # to compile.
- set hold $TORTURE_OPTIONS
- set TORTURE_OPTIONS [ list { -O0 -g }]
- go-torture-execute "./$base-out.go"
- set TORTURE_OPTIONS $hold
- }
- file delete $base-out.go
- }
- file delete $output_file
- set runtests $hold_runtests
} elseif { $test_line == "// errchk \$G -e \$D/\$F.dir/\[ab\].go" } {
regsub "\\.go$" $test ".dir/a.go" file1
regsub "\\.go$" $test ".dir/b.go" file2
errchk "$file1" "$file2"
- } elseif { $test_line == "// \$G \$D/\$F.go \$D/z*.go && \$L \$F.\$A && ./\$A.out" } {
- set dir [file dirname $test]
- set go_compile_args [glob $dir/z*.go]
- go-torture-execute $test
} elseif { $test_line == "// \$G -N -o slow.\$A \$D/bug369.dir/pkg.go &&" \
&& $test_line2 == "// \$G -o fast.\$A \$D/bug369.dir/pkg.go &&" \
- && $test_line3 == "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out" } {
+ && $test_line3 == "// run" } {
set hold_runtests $runtests
set runtests "go-test.exp"
set dg-do-what-default "assemble"
@@ -1094,30 +1108,19 @@ proc go-gc-tests { } {
dg-test $test "-O" "-w $DEFAULT_GOCFLAGS"
file delete "[file rootname [file tail $file1]].o"
set runtests $hold_runtests
- } elseif { $test_line == "// \$G \$D/\$F.go && \$L \$F.\$A && ./\$A.out >tmp.go &&"
- && $test_line2 == "// \$G tmp.go && \$L tmp.\$A && ./\$A.out" } {
- set go_execute_args ""
+ } elseif { [string match "// \$G \$D/\$F.dir/one.go && \$G \$D/\$F.dir/two.go || echo BUG*" \
+ $test_line ] } {
set hold_runtests $runtests
set runtests "go-test.exp"
- set dg-do-what-default "link"
- dg-test -keep-output $test "-O" "-w $DEFAULT_GOCFLAGS"
- set output_file "./[file rootname [file tail $test]].exe"
- set base "[file rootname [file tail $test]]"
- if [isnative] {
- if { [catch "exec $output_file >$base-out.go"] != 0 } {
- fail "$name execution"
- } else {
- pass "$name execution"
- file delete $base-out.x
- go-torture-execute "./$base-out.go"
- }
- file delete $base-out.go
- }
- file delete $output_file
+ set dg-do-what-default "assemble"
+ regsub "\\.go$" $test ".dir/one.go" file1
+ dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS"
+ set ofile1 "[file rootname [file tail $file1]].o"
+ regsub "\\.go$" $test ".dir/two.go" file2
+ dg-test $file2 "-O" "-w $DEFAULT_GOCFLAGS"
+ file delete $ofile1
set runtests $hold_runtests
- } elseif { $test_line == "// # generated by cmplxdivide.c" } {
- # Ignore.
- } elseif { $test_line == "// \$G \$D/bug302.dir/p.go && gopack grc pp.a p.\$A && \$G \$D/bug302.dir/main.go" \
+ } elseif { $test_line == "// \$G \$D/bug302.dir/p.go && pack grc pp.a p.\$A && \$G \$D/bug302.dir/main.go" \
|| $test_line == "// \$G \$D/empty.go && errchk \$G \$D/\$F.go" } {
# These tests import the same package under two different
# names, which gccgo does not support.
@@ -1127,14 +1130,26 @@ proc go-gc-tests { } {
# as an initializer will be generated for any code which
# has global variables which need to be registered as GC
# roots.
- } elseif { $test_line == "// errchk -0 \$G -m -l \$D/\$F.go" } {
+ } elseif { $test_line == "// errorcheck -0 -m"
+ || $test_line == "// errorcheck -0 -m -l" } {
# This tests debug output of the gc compiler, which is
# meaningless for gccgo.
- } elseif { $test_line == "// \[ \$O == 6 \] || errchk \$G -e \$D/\$F.go" \
- || $test_line == "// \[ \$O != 6 \] || errchk \$G -e \$D/\$F.go" } {
+ } elseif { $test_line == "// \[ \$A == 6 \] || errchk \$G -e \$D/\$F.go" \
+ || $test_line == "// \[ \$A != 6 \] || errchk \$G -e \$D/\$F.go" } {
# This tests specific handling of the gc compiler on types
# that are too large. It is target specific in a way I
# haven't bothered to check for here.
+ } elseif { $test_line == "// \$G \$D/\$F.go && \$L -X main.tbd hello \$F.\$A && ./\$A.out" } {
+ # This tests the gc ld -X option, which gccgo does not
+ # support.
+ } elseif { $test_line == "// \$G \$D/pkg.go && pack grc pkg.a pkg.\$A 2> /dev/null && rm pkg.\$A && errchk \$G -I. -u \$D/main.go"
+ || $test_line == "// \$G \$D/pkg.go && pack grcS pkg.a pkg.\$A 2> /dev/null && rm pkg.\$A && \$G -I. -u \$D/main.go" } {
+ # This tests the gc -u option, which gccgo does not
+ # support.
+ } elseif { $test_line == "// errorcheck -0 -N -d=nil" \
+ || $test_line == "// errorcheck -0 -d=nil" } {
+ # This tests gc nil pointer checks using -d=nil, which
+ # gccgo does not support.
} else {
clone_output "$name: unrecognized test line: $test_line"
unsupported $name
@@ -1142,6 +1157,7 @@ proc go-gc-tests { } {
set go_compile_args ""
set go_execute_args ""
+ set TORTURE_OPTIONS [list { -O2 -g }]
}
set dg-do-what-default ${saved-dg-do-what-default}
diff --git a/gcc/testsuite/go.test/test/235.go b/gcc/testsuite/go.test/test/235.go
index 03143a60d8..6745dde41a 100644
--- a/gcc/testsuite/go.test/test/235.go
+++ b/gcc/testsuite/go.test/test/235.go
@@ -1,9 +1,12 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Solve the 2,3,5 problem (print all numbers with 2, 3, or 5 as factor) using channels.
+// Test the solution, silently.
+
package main
type T chan uint64
diff --git a/gcc/testsuite/go.test/test/64bit.go b/gcc/testsuite/go.test/test/64bit.go
index 9e91a97fd5..d99d8e83f0 100644
--- a/gcc/testsuite/go.test/test/64bit.go
+++ b/gcc/testsuite/go.test/test/64bit.go
@@ -1,6 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go &&
-// $G tmp.go && $L tmp.$A && ./$A.out || echo BUG: 64bit
-// rm -f tmp.go
+// runoutput
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -596,6 +594,19 @@ const binaryConstR = "func test%vBinaryR%v(a, add, sub, mul, div, mod, and, or,
"}\n" +
"\n"
+const binaryConstR0 = "func test%vBinaryR%v(a, add, sub, mul, div, mod, and, or, xor, andnot %v, dodiv bool) {\n" +
+ " const b %v = %v;\n" +
+ " const typ = `%s`;\n" +
+ " if n, op, want := a + b, `+`, add; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a - b, `-`, sub; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a * b, `*`, mul; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a & b, `&`, and; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a | b, `|`, or; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a ^ b, `^`, xor; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ " if n, op, want := a &^ b, `&^`, andnot; n != want { ok=false; println(typ, `var`, a, op, `const`, b, `=`, n, `should be`, want); }\n" +
+ "}\n" +
+ "\n"
+
const shiftConstL = "func test%vShiftL%v(b uint64, left, right %v) {\n" +
" const a %v = %v;\n" +
" const typ = `%s`;\n" +
@@ -623,12 +634,20 @@ const shiftConstR = "func test%vShiftR%v(a, left, right %v) {\n" +
func constTests() {
for i, a := range int64Values {
fmt.Fprintf(bout, binaryConstL, "Int64", i, "int64", "int64", a, "int64")
- fmt.Fprintf(bout, binaryConstR, "Int64", i, "int64", "int64", a, "int64")
+ if a.hi == 0 && a.lo == 0 {
+ fmt.Fprintf(bout, binaryConstR0, "Int64", i, "int64", "int64", a, "int64")
+ } else {
+ fmt.Fprintf(bout, binaryConstR, "Int64", i, "int64", "int64", a, "int64")
+ }
fmt.Fprintf(bout, shiftConstL, "Int64", i, "int64", "int64", a, "int64")
}
for i, a := range uint64Values {
fmt.Fprintf(bout, binaryConstL, "Uint64", i, "uint64", "uint64", a, "uint64")
- fmt.Fprintf(bout, binaryConstR, "Uint64", i, "uint64", "uint64", a, "uint64")
+ if a.hi == 0 && a.lo == 0 {
+ fmt.Fprintf(bout, binaryConstR0, "Uint64", i, "uint64", "uint64", a, "uint64")
+ } else {
+ fmt.Fprintf(bout, binaryConstR, "Uint64", i, "uint64", "uint64", a, "uint64")
+ }
fmt.Fprintf(bout, shiftConstL, "Uint64", i, "uint64", "uint64", a, "uint64")
}
for i, a := range shiftValues {
diff --git a/gcc/testsuite/go.test/test/alias.go b/gcc/testsuite/go.test/test/alias.go
index 639a9cabbb..ec93a2d101 100644
--- a/gcc/testsuite/go.test/test/alias.go
+++ b/gcc/testsuite/go.test/test/alias.go
@@ -1,13 +1,14 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
-
// Test that error messages say what the source file says
// (uint8 vs byte, int32 vs. rune).
+// Does not compile.
+
+package main
import (
"fmt"
diff --git a/gcc/testsuite/go.test/test/alias1.go b/gcc/testsuite/go.test/test/alias1.go
index e8ef8a23f9..42cf693409 100644
--- a/gcc/testsuite/go.test/test/alias1.go
+++ b/gcc/testsuite/go.test/test/alias1.go
@@ -1,14 +1,14 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
-
// Test that dynamic interface checks treat byte=uint8
// and rune=int or rune=int32.
+package main
+
func main() {
var x interface{}
@@ -17,7 +17,7 @@ func main() {
case uint8:
// ok
default:
- println("byte != uint8")
+ panic("byte != uint8")
}
x = uint8(2)
@@ -25,7 +25,7 @@ func main() {
case byte:
// ok
default:
- println("uint8 != byte")
+ panic("uint8 != byte")
}
rune32 := false
@@ -37,7 +37,7 @@ func main() {
// must be new code
rune32 = true
default:
- println("rune != int and rune != int32")
+ panic("rune != int and rune != int32")
}
if rune32 {
@@ -49,6 +49,6 @@ func main() {
case rune:
// ok
default:
- println("int (or int32) != rune")
+ panic("int (or int32) != rune")
}
}
diff --git a/gcc/testsuite/go.test/test/append.go b/gcc/testsuite/go.test/test/append.go
index e178f46990..3f6251ee50 100644
--- a/gcc/testsuite/go.test/test/append.go
+++ b/gcc/testsuite/go.test/test/append.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Semi-exhaustive test for append()
+// Semi-exhaustive test for the append predeclared function.
package main
@@ -27,6 +27,7 @@ func main() {
}
verifyStruct()
verifyInterface()
+ verifyType()
}
@@ -230,3 +231,17 @@ func verifyInterface() {
verify("interface l", append(s), s)
verify("interface m", append(s, e...), r)
}
+
+type T1 []int
+type T2 []int
+
+func verifyType() {
+ // The second argument to append has type []E where E is the
+ // element type of the first argument. Test that the compiler
+ // accepts two slice types that meet that requirement but are
+ // not assignment compatible. The return type of append is
+ // the type of the first argument.
+ t1 := T1{1}
+ t2 := T2{2}
+ verify("T1", append(t1, t2...), T1{1, 2})
+}
diff --git a/gcc/testsuite/go.test/test/args.go b/gcc/testsuite/go.test/test/args.go
index ba9a377a6f..0ffe8101e9 100644
--- a/gcc/testsuite/go.test/test/args.go
+++ b/gcc/testsuite/go.test/test/args.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out arg1 arg2
+// run arg1 arg2
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test os.Args.
+
package main
import "os"
diff --git a/gcc/testsuite/go.test/test/assign.go b/gcc/testsuite/go.test/test/assign.go
index 2192f9ede0..da0192f838 100644
--- a/gcc/testsuite/go.test/test/assign.go
+++ b/gcc/testsuite/go.test/test/assign.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify simple assignment errors are caught by the compiler.
+// Does not compile.
+
package main
import "sync"
diff --git a/gcc/testsuite/go.test/test/assign1.go b/gcc/testsuite/go.test/test/assign1.go
index 71e5b40643..b9e0325ce8 100644
--- a/gcc/testsuite/go.test/test/assign1.go
+++ b/gcc/testsuite/go.test/test/assign1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify assignment rules are enforced by the compiler.
+// Does not compile.
+
package main
type (
diff --git a/gcc/testsuite/go.test/test/bench/garbage/Makefile b/gcc/testsuite/go.test/test/bench/garbage/Makefile
index 8002a2017b..98838453aa 100644
--- a/gcc/testsuite/go.test/test/bench/garbage/Makefile
+++ b/gcc/testsuite/go.test/test/bench/garbage/Makefile
@@ -2,27 +2,22 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-include ../../../src/Make.inc
-
ALL=\
parser\
peano\
tree\
tree2\
-all: $(addsuffix .out, $(ALL))
-
-%.$O: %.go stats.go
- $(GC) $(GCFLAGS) $(GCIMPORTS) $*.go stats.go
+all: $(ALL)
-%.out: %.$O
- $(LD) -o $@ $*.$O
+%: %.go
+ go build $*.go stats.go
-%.bench: %.out
- time ./$*.out
+%.bench: %
+ time ./$*
bench: $(addsuffix .bench, $(ALL))
clean:
- rm -f *.[$(OS)] $(addsuffix .out, $(ALL))
+ rm -f $(ALL)
diff --git a/gcc/testsuite/go.test/test/bench/garbage/parser.go b/gcc/testsuite/go.test/test/bench/garbage/parser.go
index 9e15f6c0f4..d85110b63d 100644
--- a/gcc/testsuite/go.test/test/bench/garbage/parser.go
+++ b/gcc/testsuite/go.test/test/bench/garbage/parser.go
@@ -73,7 +73,7 @@ func parseDir(dirpath string) map[string]*ast.Package {
}
func main() {
- st := &runtime.MemStats
+ st := new(runtime.MemStats)
packages = append(packages, packages...)
packages = append(packages, packages...)
n := flag.Int("n", 4, "iterations")
@@ -83,14 +83,17 @@ func main() {
var lastParsed []map[string]*ast.Package
var t0 time.Time
+ var numGC uint32
+ var pauseTotalNs uint64
pkgroot := runtime.GOROOT() + "/src/pkg/"
for pass := 0; pass < 2; pass++ {
// Once the heap is grown to full size, reset counters.
// This hides the start-up pauses, which are much smaller
// than the normal pauses and would otherwise make
// the average look much better than it actually is.
- st.NumGC = 0
- st.PauseTotalNs = 0
+ runtime.ReadMemStats(st)
+ numGC = st.NumGC
+ pauseTotalNs = st.PauseTotalNs
t0 = time.Now()
for i := 0; i < *n; i++ {
@@ -107,6 +110,9 @@ func main() {
}
t1 := time.Now()
+ runtime.ReadMemStats(st)
+ st.NumGC -= numGC
+ st.PauseTotalNs -= pauseTotalNs
fmt.Printf("Alloc=%d/%d Heap=%d Mallocs=%d PauseTime=%.3f/%d = %.3f\n",
st.Alloc, st.TotalAlloc,
st.Sys,
@@ -128,23 +134,32 @@ func main() {
}
}
+// find . -type d -not -path "./exp" -not -path "./exp/*" -printf "\t\"%p\",\n" | sort | sed "s/\.\///" | grep -v testdata
var packages = []string{
+ "archive",
"archive/tar",
- "encoding/asn1",
- "math/big",
+ "archive/zip",
"bufio",
+ "builtin",
"bytes",
- "math/cmplx",
+ "compress",
+ "compress/bzip2",
"compress/flate",
"compress/gzip",
+ "compress/lzw",
"compress/zlib",
+ "container",
"container/heap",
"container/list",
"container/ring",
+ "crypto",
"crypto/aes",
- "crypto/blowfish",
+ "crypto/cipher",
+ "crypto/des",
+ "crypto/dsa",
+ "crypto/ecdsa",
+ "crypto/elliptic",
"crypto/hmac",
- "crypto/md4",
"crypto/md5",
"crypto/rand",
"crypto/rc4",
@@ -155,70 +170,111 @@ var packages = []string{
"crypto/subtle",
"crypto/tls",
"crypto/x509",
- "crypto/xtea",
+ "crypto/x509/pkix",
+ "database",
+ "database/sql",
+ "database/sql/driver",
+ "debug",
"debug/dwarf",
- "debug/macho",
"debug/elf",
"debug/gosym",
- "exp/ebnf",
+ "debug/macho",
+ "debug/pe",
+ "encoding",
"encoding/ascii85",
+ "encoding/asn1",
+ "encoding/base32",
"encoding/base64",
"encoding/binary",
- "encoding/git85",
+ "encoding/csv",
+ "encoding/gob",
"encoding/hex",
+ "encoding/json",
"encoding/pem",
- "os/exec",
+ "encoding/xml",
+ "errors",
+ "expvar",
"flag",
"fmt",
+ "go",
"go/ast",
+ "go/build",
"go/doc",
+ "go/format",
"go/parser",
"go/printer",
"go/scanner",
"go/token",
- "encoding/gob",
"hash",
"hash/adler32",
"hash/crc32",
"hash/crc64",
- "net/http",
+ "hash/fnv",
+ "html",
+ "html/template",
"image",
+ "image/color",
+ "image/draw",
+ "image/gif",
"image/jpeg",
"image/png",
+ "index",
+ "index/suffixarray",
"io",
"io/ioutil",
- "encoding/json",
"log",
+ "log/syslog",
"math",
+ "math/big",
+ "math/cmplx",
+ "math/rand",
"mime",
+ "mime/multipart",
"net",
+ "net/http",
+ "net/http/cgi",
+ "net/http/cookiejar",
+ "net/http/fcgi",
+ "net/http/httptest",
+ "net/http/httputil",
+ "net/http/pprof",
+ "net/mail",
+ "net/rpc",
+ "net/rpc/jsonrpc",
+ "net/smtp",
+ "net/textproto",
+ "net/url",
"os",
+ "os/exec",
"os/signal",
- "patch",
+ "os/user",
"path",
- "math/rand",
+ "path/filepath",
"reflect",
"regexp",
- "net/rpc",
+ "regexp/syntax",
"runtime",
- "text/scanner",
+ "runtime/cgo",
+ "runtime/debug",
+ "runtime/pprof",
+ "runtime/race",
"sort",
- "net/smtp",
"strconv",
"strings",
"sync",
+ "sync/atomic",
"syscall",
- "log/syslog",
- "text/tabwriter",
- "text/template",
"testing",
"testing/iotest",
"testing/quick",
- "testing/script",
+ "text",
+ "text/scanner",
+ "text/tabwriter",
+ "text/template",
+ "text/template/parse",
"time",
"unicode",
- "unicode/utf8",
"unicode/utf16",
- "websocket",
- "encoding/xml",
+ "unicode/utf8",
+ "unsafe",
}
diff --git a/gcc/testsuite/go.test/test/bench/garbage/peano.go b/gcc/testsuite/go.test/test/bench/garbage/peano.go
index f1ad6ed699..6c7e523145 100644
--- a/gcc/testsuite/go.test/test/bench/garbage/peano.go
+++ b/gcc/testsuite/go.test/test/bench/garbage/peano.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/bench/garbage/stats.go b/gcc/testsuite/go.test/test/bench/garbage/stats.go
index 985e7eaf5d..6dc0aeb233 100644
--- a/gcc/testsuite/go.test/test/bench/garbage/stats.go
+++ b/gcc/testsuite/go.test/test/bench/garbage/stats.go
@@ -12,17 +12,23 @@ import (
)
func gcstats(name string, n int, t time.Duration) {
- st := &runtime.MemStats
- fmt.Printf("garbage.%sMem Alloc=%d/%d Heap=%d NextGC=%d Mallocs=%d\n", name, st.Alloc, st.TotalAlloc, st.Sys, st.NextGC, st.Mallocs)
- fmt.Printf("garbage.%s %d %d ns/op\n", name, n, t.Nanoseconds()/int64(n))
- fmt.Printf("garbage.%sLastPause 1 %d ns/op\n", name, st.PauseNs[(st.NumGC-1)%uint32(len(st.PauseNs))])
- fmt.Printf("garbage.%sPause %d %d ns/op\n", name, st.NumGC, int64(st.PauseTotalNs)/int64(st.NumGC))
+ st := new(runtime.MemStats)
+ runtime.ReadMemStats(st)
+ nprocs := runtime.GOMAXPROCS(-1)
+ cpus := ""
+ if nprocs != 1 {
+ cpus = fmt.Sprintf("-%d", nprocs)
+ }
+ fmt.Printf("garbage.%sMem%s Alloc=%d/%d Heap=%d NextGC=%d Mallocs=%d\n", name, cpus, st.Alloc, st.TotalAlloc, st.Sys, st.NextGC, st.Mallocs)
+ fmt.Printf("garbage.%s%s %d %d ns/op\n", name, cpus, n, t.Nanoseconds()/int64(n))
+ fmt.Printf("garbage.%sLastPause%s 1 %d ns/op\n", name, cpus, st.PauseNs[(st.NumGC-1)%uint32(len(st.PauseNs))])
+ fmt.Printf("garbage.%sPause%s %d %d ns/op\n", name, cpus, st.NumGC, int64(st.PauseTotalNs)/int64(st.NumGC))
nn := int(st.NumGC)
if nn >= len(st.PauseNs) {
nn = len(st.PauseNs)
}
t1, t2, t3, t4, t5 := tukey5(st.PauseNs[0:nn])
- fmt.Printf("garbage.%sPause5: %d %d %d %d %d\n", name, t1, t2, t3, t4, t5)
+ fmt.Printf("garbage.%sPause5%s: %d %d %d %d %d\n", name, cpus, t1, t2, t3, t4, t5)
// fmt.Printf("garbage.%sScan: %v\n", name, st.ScanDist)
}
diff --git a/gcc/testsuite/go.test/test/bench/garbage/tree2.go b/gcc/testsuite/go.test/test/bench/garbage/tree2.go
index 6d78f72c5b..a171c696bb 100644
--- a/gcc/testsuite/go.test/test/bench/garbage/tree2.go
+++ b/gcc/testsuite/go.test/test/bench/garbage/tree2.go
@@ -11,6 +11,7 @@ import (
"os"
"runtime"
"runtime/pprof"
+ "time"
"unsafe"
)
@@ -30,6 +31,7 @@ var (
heap *Object
calls [20]int
numobjects int64
+ memstats runtime.MemStats
)
func buildHeap() {
@@ -55,10 +57,10 @@ func buildTree(objsize, size float64, depth int) (*Object, float64) {
func gc() {
runtime.GC()
- runtime.UpdateMemStats()
- pause := runtime.MemStats.PauseTotalNs
- inuse := runtime.MemStats.Alloc
- free := runtime.MemStats.TotalAlloc - inuse
+ runtime.ReadMemStats(&memstats)
+ pause := memstats.PauseTotalNs
+ inuse := memstats.Alloc
+ free := memstats.TotalAlloc - inuse
fmt.Printf("gc pause: %8.3f ms; collect: %8.0f MB; heapsize: %8.0f MB\n",
float64(pause-lastPauseNs)/1e6,
float64(free-lastFree)/1048576,
@@ -71,9 +73,9 @@ func main() {
flag.Parse()
buildHeap()
runtime.GOMAXPROCS(*cpus)
- runtime.UpdateMemStats()
- lastPauseNs = runtime.MemStats.PauseTotalNs
- lastFree = runtime.MemStats.TotalAlloc - runtime.MemStats.Alloc
+ runtime.ReadMemStats(&memstats)
+ lastPauseNs = memstats.PauseTotalNs
+ lastFree = memstats.TotalAlloc - memstats.Alloc
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)
if err != nil {
@@ -82,7 +84,12 @@ func main() {
pprof.StartCPUProfile(f)
defer pprof.StopCPUProfile()
}
- for i := 0; i < 10; i++ {
+ const N = 10
+ var t0 time.Time
+ for i := 0; i < N; i++ {
+ t0 = time.Now()
gc()
}
+ // Standard gotest benchmark output, collected by build dashboard.
+ gcstats("BenchmarkTree2", N, time.Now().Sub(t0))
}
diff --git a/gcc/testsuite/go.test/test/bench/go1/Makefile b/gcc/testsuite/go.test/test/bench/go1/Makefile
deleted file mode 100644
index 94847438f9..0000000000
--- a/gcc/testsuite/go.test/test/bench/go1/Makefile
+++ /dev/null
@@ -1,7 +0,0 @@
-include $(GOROOT)/src/Make.inc
-
-TARG=go1
-GOFILES=\
- dummy.go\
-
-include $(GOROOT)/src/Make.pkg
diff --git a/gcc/testsuite/go.test/test/bench/go1/_testmain.go b/gcc/testsuite/go.test/test/bench/go1/_testmain.go
deleted file mode 100644
index bedc373a57..0000000000
--- a/gcc/testsuite/go.test/test/bench/go1/_testmain.go
+++ /dev/null
@@ -1,40 +0,0 @@
-package main
-
-import target "go1"
-import "testing"
-import "regexp"
-
-var tests = []testing.InternalTest{
-}
-
-var benchmarks = []testing.InternalBenchmark{
- {"go1.BenchmarkBinaryTree17", target.BenchmarkBinaryTree17},
- {"go1.BenchmarkFannkuch11", target.BenchmarkFannkuch11},
- {"go1.BenchmarkGobDecode", target.BenchmarkGobDecode},
- {"go1.BenchmarkGobEncode", target.BenchmarkGobEncode},
- {"go1.BenchmarkGzip", target.BenchmarkGzip},
- {"go1.BenchmarkGunzip", target.BenchmarkGunzip},
- {"go1.BenchmarkJSONEncode", target.BenchmarkJSONEncode},
- {"go1.BenchmarkJSONDecode", target.BenchmarkJSONDecode},
- {"go1.BenchmarkRevcomp25M", target.BenchmarkRevcomp25M},
- {"go1.BenchmarkTemplate", target.BenchmarkTemplate},
-}
-var examples = []testing.InternalExample{}
-
-var matchPat string
-var matchRe *regexp.Regexp
-
-func matchString(pat, str string) (result bool, err error) {
- if matchRe == nil || matchPat != pat {
- matchPat = pat
- matchRe, err = regexp.Compile(matchPat)
- if err != nil {
- return
- }
- }
- return matchRe.MatchString(str), nil
-}
-
-func main() {
- testing.Main(matchString, tests, benchmarks, examples)
-}
diff --git a/gcc/testsuite/go.test/test/bench/go1/dummy.go b/gcc/testsuite/go.test/test/bench/go1/dummy.go
deleted file mode 100644
index 4956bc7b79..0000000000
--- a/gcc/testsuite/go.test/test/bench/go1/dummy.go
+++ /dev/null
@@ -1,3 +0,0 @@
-package go1
-
-// Nothing to see here: everything is in the _test files.
diff --git a/gcc/testsuite/go.test/test/bench/go1/fasta_test.go b/gcc/testsuite/go.test/test/bench/go1/fasta_test.go
index dcb2d1055d..bff056fa90 100644
--- a/gcc/testsuite/go.test/test/bench/go1/fasta_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/fasta_test.go
@@ -4,9 +4,24 @@
package go1
+import "runtime"
+
// Not a benchmark; input for revcomp.
-var fasta25m = fasta(25e6)
+var fastabytes = makefasta()
+
+func makefasta() []byte {
+ var n int = 25e6
+ if runtime.GOARCH == "arm" {
+ // TODO(dfc) remove this limitation after precise gc.
+ // A value of 25e6 consumes 465mb of heap on 32bit
+ // platforms, which is too much for most ARM systems.
+ // A value of 25e5 produces a memory layout that
+ // confuses the gc on 32bit platforms. So 25e4 it is.
+ n = 25e4
+ }
+ return fasta(n)
+}
func fasta(n int) []byte {
out := make(fastaBuffer, 0, 11*n)
diff --git a/gcc/testsuite/go.test/test/bench/go1/fmt_test.go b/gcc/testsuite/go.test/test/bench/go1/fmt_test.go
new file mode 100644
index 0000000000..d3c695669c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/fmt_test.go
@@ -0,0 +1,68 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package go1
+
+// benchmark based on fmt/fmt_test.go
+
+import (
+ "bytes"
+ "fmt"
+ "testing"
+)
+
+func BenchmarkFmtFprintfEmpty(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ fmt.Fprintf(&buf, "")
+ }
+}
+
+func BenchmarkFmtFprintfString(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "%s", "hello")
+ }
+}
+
+func BenchmarkFmtFprintfInt(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "%d", 5)
+ }
+}
+
+func BenchmarkFmtFprintfIntInt(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "%d %d", 5, 6)
+ }
+}
+
+func BenchmarkFmtFprintfPrefixedInt(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "This is some meaningless prefix text that needs to be scanned %d", 6)
+ }
+}
+
+func BenchmarkFmtFprintfFloat(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "%g", 5.23184)
+ }
+}
+
+func BenchmarkFmtManyArgs(b *testing.B) {
+ var buf bytes.Buffer
+ for i := 0; i < b.N; i++ {
+ buf.Reset()
+ fmt.Fprintf(&buf, "%2d/%2d/%2d %d:%d:%d %s %s\n", 3, 4, 5, 11, 12, 13, "hello", "world")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/bench/go1/gob_test.go b/gcc/testsuite/go.test/test/bench/go1/gob_test.go
index 00eeed57a5..b172b805ad 100644
--- a/gcc/testsuite/go.test/test/bench/go1/gob_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/gob_test.go
@@ -21,9 +21,7 @@ var (
gobdata *JSONResponse
)
-func gobinit() {
- // gobinit is called after json's init,
- // because it uses jsondata.
+func init() {
gobdata = gobResponse(&jsondata)
var buf bytes.Buffer
diff --git a/gcc/testsuite/go.test/test/bench/go1/gzip_test.go b/gcc/testsuite/go.test/test/bench/go1/gzip_test.go
index c9eeb175f5..fe4c480eb8 100644
--- a/gcc/testsuite/go.test/test/bench/go1/gzip_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/gzip_test.go
@@ -21,20 +21,14 @@ var (
func init() {
var buf bytes.Buffer
- c, err := gz.NewWriter(&buf)
- if err != nil {
- panic(err)
- }
+ c := gz.NewWriter(&buf)
c.Write(jsongunz)
c.Close()
jsongz = buf.Bytes()
}
func gzip() {
- c, err := gz.NewWriter(ioutil.Discard)
- if err != nil {
- panic(err)
- }
+ c := gz.NewWriter(ioutil.Discard)
if _, err := c.Write(jsongunz); err != nil {
panic(err)
}
diff --git a/gcc/testsuite/go.test/test/bench/go1/http_test.go b/gcc/testsuite/go.test/test/bench/go1/http_test.go
new file mode 100644
index 0000000000..34e789f665
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/http_test.go
@@ -0,0 +1,45 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package go1
+
+import (
+ "bytes"
+ "io/ioutil"
+ "net/http"
+ "net/http/httptest"
+ "testing"
+)
+
+// BenchmarkHTTPClientServer benchmarks both the HTTP client and the HTTP server,
+// on small requests.
+func BenchmarkHTTPClientServer(b *testing.B) {
+ msg := []byte("Hello world.\n")
+ ts := httptest.NewServer(http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request) {
+ rw.Write(msg)
+ }))
+ defer ts.Close()
+
+ tr := &http.Transport{}
+ defer tr.CloseIdleConnections()
+ cl := &http.Client{
+ Transport: tr,
+ }
+
+ b.ResetTimer()
+
+ for i := 0; i < b.N; i++ {
+ res, err := cl.Get(ts.URL)
+ if err != nil {
+ b.Fatal("Get:", err)
+ }
+ all, err := ioutil.ReadAll(res.Body)
+ if err != nil {
+ b.Fatal("ReadAll:", err)
+ }
+ if !bytes.Equal(all, msg) {
+ b.Fatalf("Got body %q; want %q", all, msg)
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/bench/go1/json_test.go b/gcc/testsuite/go.test/test/bench/go1/json_test.go
index 5a3012167b..1d42619bde 100644
--- a/gcc/testsuite/go.test/test/bench/go1/json_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/json_test.go
@@ -7,35 +7,38 @@
package go1
import (
+ "bytes"
"compress/bzip2"
"encoding/base64"
"encoding/json"
"io"
"io/ioutil"
- "strings"
"testing"
)
var (
- jsonbytes []byte
- jsondata JSONResponse
+ jsonbytes = makeJsonBytes()
+ jsondata = makeJsonData()
)
-func init() {
+func makeJsonBytes() []byte {
var r io.Reader
- r = strings.NewReader(jsonbz2_base64)
+ r = bytes.NewReader(bytes.Replace(jsonbz2_base64, []byte{'\n'}, nil, -1))
r = base64.NewDecoder(base64.StdEncoding, r)
r = bzip2.NewReader(r)
b, err := ioutil.ReadAll(r)
if err != nil {
panic(err)
}
- jsonbytes = b
+ return b
+}
- if err := json.Unmarshal(jsonbytes, &jsondata); err != nil {
+func makeJsonData() JSONResponse {
+ var v JSONResponse
+ if err := json.Unmarshal(jsonbytes, &v); err != nil {
panic(err)
}
- gobinit()
+ return v
}
type JSONResponse struct {
diff --git a/gcc/testsuite/go.test/test/bench/go1/jsondata_test.go b/gcc/testsuite/go.test/test/bench/go1/jsondata_test.go
index 7d42c96657..cf0fac1480 100644
--- a/gcc/testsuite/go.test/test/bench/go1/jsondata_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/jsondata_test.go
@@ -13,1806 +13,1807 @@
package go1
-var jsonbz2_base64 = "QlpoOTFBWSZTWZ0H0LkG0bxfgFH8UAf/8D////q////6YSvJveAAAAAH3ddt7gAN" +
- "FrKppN9gw0gA++fGB9xKkUpX0YWTENCgqzUW1tlsyMB2w9nnvNSigNyS+3cui5zA" +
- "AAAAAAAAAI4kILu6ytuWTLBbaPXfc+A+PQEgNAG1ZMBYWnWwPoFrGjoBnYMumlUF" +
- "UKA7NVBQgut30zzu8eM2tsoapJ7u41djLsxZarplSoJouxrdfHrHPSiqAGgkAD6D" +
- "QfT0ABu7gG1qDtdVHVXp7vWuBoBk2wEOjKChQ5bvbh3riupXZycASbaiQEECRKib" +
- "ZFJFtqWjR7bsGoaa1lIFPRoKVQKoJFyqbWr5OB1Aie2pobm1EJKqVBU1EE2lCg6a" +
- "AUBV9hqL00q9btQ0J9hqu2zavWVdjI6aAusU22tNa+8m70GjRqarKRWtUDW2yFBI" +
- "1kBrrqrxeX3AyB9AD0wAAAeZ6weqV1rVu8UVICgAAABeDn2cAAd9gAACI+7DvjHo" +
- "j73u8X2dDXT2x6adeFOTNe7BvavozFezkV1xXtJzu8H0983QAHr5aPT42iem53fX" +
- "23IDr7YejQNtVVZr24gGgB0VQffPXH18g9DoaDW8vt729h9bt72XsKth0ANxgodG" +
- "iRxvYclAAAAAnpqRtgGvcbo9ABpy6aPQADRZ3aACjyox4NawKCqNdA6offa1WtPc" +
- "fdjQUPvauprcLoPe2oaplp2w7cnOHdlF27xvPY1QU67vc8goBRttLYKaHXkPAAAA" +
- "AAdyFFaYCVClAVSlCqVSilFUKEgoNT0CAQCBAk00g1T0jQNNPSbKADQxAJEBESIg" +
- "Seomk9EB6mjQ0NNGgAAAAkEgkiGk0CR6U9CNNNNNPQRo0ANAaAAk9UpEQmoNNRqe" +
- "U02o00AAADQABoACJEAlKamUCjZT9UGnqAAG1AGgAAAFRJCAQCBA0SYjTKbQmqea" +
- "p6YU2o09Q9TT00nAlwPEuSelCeXl28B3IYIQHEwXUMSCvlAYS5LkrZn+XhHHAXZz" +
- "FTJHAzrKZzYWC0pthA9SCmbkyVzoHbSUjhnAfBrYpwWYIB7GRjOjDQqokMbJENSO" +
- "SBCN0WhaRhQWpVuoOLN0NPRed7eO5eW2lv5L+X/jf7EpJkEUNMJKZREogmkjMgZJ" +
- "BiEEEliRIUKAoiaSEoDQZJBhKEZEQySQCAIIFNIMwCiSYRSYzKMkSSlI0xZMZKko" +
- "RKlRtkmWJIrNNIBEJEYiJBhGMMkWYxRqUsmjKJMmCFJMaSmiyDSaEJtBIJpANKMN" +
- "JEkpGQAYjLNETGUBRAlBKURgsC0wzKZhRmhiYIQZIsZCIIMiiNmFCCiSZNjI0khE" +
- "AYSEUkjTMSZskZKRQWJoRNBI2IojZmMhTIkQEgyREEMoomDSiYxAZMECFCSKIkGg" +
- "kIDIw2MNAlgyA0SmKWSSyIaRCSDDIkZmNGghgyAEoERokkWTA0xZBEQhmUSBGmaQ" +
- "aQBFmRJMokwxIyRSWbAkbCUFlAhgUISJIRkySYhAxoUARCSaIJMkyiZJNBMyGRIh" +
- "Y0komKImgMDI/038qLf/av/bWSNVEtmFRx/2aaDVmKkY0NkIRDGJEWoEGLf9g9MV" +
- "UJWGSu0pWVpSOdWDVjQJGRSChGBGDGhNNMYYwjEsaFISGPT3TbFXk873Xq8vPa9b" +
- "0dcco0UEPXIl/+em0IMHNYJaXBEsiKQh/7QwsC9gAauDvWtMEBWhGBIBAerIYlBU" +
- "SzPasze15BfAyGrr284QNjGNEmaUphiMxEMwCZjAYRpMiZBMpEMkkQzIwTDu5zru" +
- "Xd1xdQ6A6E7m7d03OLnXOxd3HBu50dl0JOhxS4HdHczuO647uuLu6650O67t3Duu" +
- "3DucukzRKIMhsUjSQQxDIzQJgxohEkYTYkZsAxSDGCJJERhpEAygoZRESSEjMpFE" +
- "0UpJlBkIYwoyQ7/2f9H/Py8roY3wEn8nr7+72ybZtybdqY06yp1tjGVmsmJvG48y" +
- "89EXnvy9F6OvX0vpBSIEiSRAmgSASYSkCGBkyc5J63pgiRBNsJW2xjGmmNsf9v7R" +
- "z1rueFmZcfXzw/zTGRYxsYm2NjbbfXD64GtivKx5t9eubzmsMTbf9rTfKRsYx7YR" +
- "jHWL7OoAJpsFBJgyAEzSJiLHxfJKWQgSlJjGduRqRxDIoETG4wj+VgUjnMt5PXnm" +
- "vEQwO7ojzu7lxu7uasg9T00zjrtcaG2RKIwyHx2vUcbjd0OXXvfNafFE3u3t7bu9" +
- "TpJ1t6SKh9vi13hQUX4d307pPHt553zxxHMGb4KrbbvJGTCcNs3WmOyG2fg5vsuZ" +
- "jMi+lacpNcvr0XeKDnafDcIvhyL7927rr7/Pzfj7qLVW5dFKIg8+fKpuxf+vfhB+" +
- "73vWXz3qCPPfw32Mn4c/9mtONctW/fc1sYad9JYn/D1DlDPoyyc7D5bSi3ncMPNH" +
- "bWmvm42eODHImqooiuXwn95XZlmKYKGK7KdA6lrgzZpEiUccypzKofPy4kbjq6Nh" +
- "o/ou++j5g2i5alDG/G3Cb0yaOY3lH7wd83fLG1uQ0nDG18UHnnOOsy+Y4u2Nv5Hl" +
- "jTCKmSJYyBhnB1Lbbafjgaat8zzctvDjPPy7e5IdyZHPSTxq/zkHjinrI5v0/nmG" +
- "Pp+JUz4odkc9b4/cze19oRNOjG2wb+PkWtt4RRjbBsfupHPO3Mmgc18az57U+TM7" +
- "gQsH90UPHJCZN4WsaY383qkbxxO20pI23JHbCr3ssnqkVFJG/lN5x6yQydwiaSA6" +
- "rcgBoSxEDRKIuS1slJsq1MtS6koA5+jFGb17XFu0owrTZZSqsjrkmLVo2tSN44ac" +
- "fvD3aWfOerth5lG/Jlkfp6bqUbOZs2FpVptDIwCuWVgqIgkgJMtDBFi+2FpRDhEI" +
- "JAKJtPXloMoKGWpU0YvH9h2nx/hxra8/8UoaoWbia9EeoTlN7Bd5PNdcCDKemn+L" +
- "cY2qMUXGibc0a33/wjqMN0s8PmTeeup76JA7aKr1nMbhIkn1aX4m5rTPH4aOBlTQ" +
- "I35HXHwtJ9z1XuF9EQDwDnCS3S9W358a/E4pTeTSVvyKGWTK/n4Xp7V4dB64Ua3Q" +
- "BIaDtzTsXpXV1k9E54ousxG/XtEhuaGmyCefTL/r3478anc78deNRjg9uchGVxVD" +
- "Fq6cMZqIdp0ihq0xoIf1zldyBS011SFzq08qfSxV8u0cT70dZgp8ebjk800pU8m2" +
- "s1kKdj+zvmBEEU+P0+FlzrhOf/ifG2tOsmrlp7B88bbCY9u1VFK7YavjSQ7xtE94" +
- "3aiJb59/et60wn2vrgeV/jeNd+O/Wt/fp6dNf7iJA5QICcGyiKgpFEFQiCjEGEQC" +
- "LBIioACSIqiCxSCqIxJIw1GQ0Ua1Vam2qYsmg1rVTbQlmjVbWbaGLbU1kWtlqWrN" +
- "LVNNaaQICZqIhD/QiASyQCUEBKiRKRAJSUiASySKRAJSD/zAgJUghMIgEojKiCf+" +
- "CIBP9wICfq+/889/0uxkuba/pJdybzbJvEsZ/CpEx89uGn3OONVtyYDHCGIxNyIx" +
- "JsYgJYbH+I5RK73DuMZminldjp3e8QpDJju1QToo7pQFEpABpEV4CLQo2QicBAbo" +
- "SEINjsMsDt9BO4nJzGstqAmgEJwhRyggJYoMJE0sJoa0zOdEgXdwiQssy4L3pzbM" +
- "CwOaLEYFDBQKzaJCjFh2yhQOHbgLVMHXFUf7jhKTXPWsNDuEPXRHfJuLlKqls5Tx" +
- "pCC1IgIHnTm5PeWkwwjobODcCdTCa0YoDvMlcZwvmQTkg8KC06oALrhzZqrQmQq6" +
- "E28rdrSUxBeLkBshIKRh04g4LDdsmTCpNKSszbu9lHOoAwkmTDrOKCmSqExdOsOV" +
- "D1XsAQpFVMukLCcGYGVFpAp4Bg0VnXFFjjdC8avBE6BepA3q6bOgot8LtHTiIlkb" +
- "ARVEcldJoYt4Pimls9rpBzDNzeMwOdNAdSkWo4CrsTZ065yPaODXMCkcZCarR0LU" +
- "voX1R3nDEsLtlyklMo3qrYHIguO1Ci7xRXFwJZjfTrtZfAyzUKhgJcLOIzeTvWjG" +
- "zDE27OYME6dM3Z2kVeKcV1I4jKga0x3vCKlcUmkjRE1Zzsmxsq7L3zOnQ8wzeGDZ" +
- "pQO0uN0NpZhcQSuVETbLL2zvKTzqjtBhwIXGaksi8rYKx2Wi6C1J3Ulb1dwqkjat" +
- "FU6mO1F5Ii+bGnOMaOlc5EKekFDaQ9tjCU1yqcE66xRVh1ndLcBt7ThNI8LbowKP" +
- "Md0AHRNhdYOJksYIQETYuK3ytX1UEkFHZLCghijoBdFzCgKJmlJSADdF5CnsMoIp" +
- "pMjeqUgBrXACCcshXWsqyAgenB7IMoT6ZghKl5ljwkJTUVQuhTp3YIWgQCl8eBO7" +
- "FTzwWGBEw8BDaLuSqMmM0wWE6QVsFIpRwmCRA128BCKpdaVunHbkyuScBsqeFjLJ" +
- "qAw0WUUIhMN3S5Keua7Wynjnew31G8jecPcVIYxGw3trGziGoCdTHKPOEpO5732V" +
- "4lnVA4VvKsc+R4OHHQz2JkHFdwSzeiDBUGBiQAJcznd7Z0oCmMykE5KjZuKCyKhd" +
- "5nTSBBtu1sj6s2JCiZBgpYdOIM4luy6evBlYUYldUQQZKOoAiZL4d7fe003l07CD" +
- "omKNzZgXiveIrzXjCZel4BcyY752rec3eRoT6jAGZAGEc3kkZQhLcVNCq+qVFSim" +
- "BuCKZeQr5FF85WTJZzIXXwto0cB2CpntlWr0xWTfLt1yrDg8503VJAdH0uqes4bJ" +
- "d5wsYFakMZlVS7lsEko6gj0LqyENh3rvG7qYJiQ9xoY33UthsUwRtEF6HUjtHWGA" +
- "1q5N1HNgiI7rFa5QiEzuCDZ03KzKswfM7185zaRUkRyiUUssQSPAwlc6CAaa2KwB" +
- "CwsOVTUrpamy4uS+mkF2pVMrpWpG7eYkYjcqSMY+pyDKhDILMmR5HGGc5ml4LJEa" +
- "A2sxQOlwRDZ0WyiDjMTFnLRKRw6sK02ph9cZnMe8fZrmsJ0710vNY0uY4QFbSrzd" +
- "WY7FvR2oW0ZI0zyUKMETaoJFAUTUyWuaSjAQt4DbxyqAYcj2ysQneAWKMQAWMoBB" +
- "hIT0HPY5ne8L49gqYBFQhCXlCmzuzQImhRcjCApqiwAmbWJbzsY5reBB1xT5l5T1" +
- "ybWy6V0tnJKrLM5WHNy+RpkM2cyZ5hebCcdg7aCc7IdY80lCFwSGCAXNmQXb2QRQ" +
- "x7k3NRDGXELYQ1gsQhhUDum3ZE72ughHRdRDe5Te6qw1u1LB7lbNrJow7QT1uAV3" +
- "LMgyxdGjCMORl8Gn2BQuwIUzm8BtHWJnZGBtieoICDTvKJbIMisQ2U1BCZoZlhQX" +
- "ygQBW0jtgQdslCYNcrXVNnBA+zLTmqmqYeS9YapA12zNGgCPsUFmdoio3ByWaNXs" +
- "7NrZuGMrSZWRJA0vOHdOWzMw8kjKrskdtyHLanDtiyJzpWVgjo+aaaAkqTKWLcdw" +
- "xANHQyoZ1XdCK2biAxFgjnDMsxEk4wrWTKgmoae5DQbpESptb1u3Dbpe6qOAZBKa" +
- "UBJKBZeiCwEJ0WgjFAInS4JGF6SCWBfA6F3ud3YtJTVontzKvsRDk5lipuE0+KVI" +
- "KnHbGmhhDdShYAZ20BJi8hNs22nd3MxNWKTyqlNVdr1vFs1kiRRBRoZYJt1SAw2W" +
- "IVY7gXmtBFNaclgFQFjwnNh/g2AZt0p2YbFHgZ1ZkUHIuCAEMTDITBEMBgx4Ecgg" +
- "OwyuETQ7GUQsGRFZENlWXORDAZBg5I2Qg0CU0NEcuCVhf8E4pyCmHivNaJAP8Dg6" +
- "HMU/BCCcRX/CAZi3FTsR+gqagg7gfXVQF3AFS45ig+iMnICOKROLlQG9QyjKyxqt" +
- "rL7DL2NWEoOARpsJENtjCQigyaiVbD8RcRpvD0dJYxh4KmINWGAOAshCD2ihhCBU" +
- "w7Rz2iEeFpgIN0kKqUcbsJC1I9OQR1ARqIJlDBA9OIaiEhhK4RqJxpaG4HNX26+L" +
- "L2uVbzYr6uxSpDYDItapRNSDSPMC40zShplaragEHVTTzmCYzRWDaG4boqxNVpQe" +
- "/U/8feVF+H1z3Iy2hnvDyeOt5n1QI23zarZHe9m7tUTEm75vIImeGztcNqf8/DK0" +
- "7AS3hyuujbWlvld0RqQIdaW8VAyyAqKpJUEU5BBqICLiixEH2fZwoinThP1ruaww" +
- "Wxs79RpIWIc1I6VkHrWTkb36HKsT8aCEdYQp8dyc8nHc5Tn1GZ9DqfXs+w6jU5vi" +
- "5KOwjHVB4s9RJbGxesXpEnueovCTuXRSXfPMqMjxq9le4We74avJg7nrh8fkY4r3" +
- "uTybuqrI5WCNRuBiLUVuMAR02HDRwNFmhVQC0wOxtAjoECQdIAuc+ZfaLo6O0IVM" +
- "EV4FEtlx4W2FCCd0Phvqkylm+T5VSzgZCqK7UNZc+X11LEfD369NnPNn684h236W" +
- "bTiIcgobiiYguzQoGj4YxXj++cs4Tz0qdHkwXXYuqOxh4RlKlgXcTb+ZT58LL54/" +
- "X5UkWd6UwSUtKWg8ezAgn3LlVGy99KvHea5jdcQUuTpOwzdqe2VOu9t12gz7+79S" +
- "tp9hZGnb9KZ0+UWVGOfa8PL8MePzZ2jpXPc6c8Sz56UZnuR7VyqryWOdve7uxH+f" +
- "7i9zTaJuakt23DIbPPKW3WvwvI5hyr5WOMzSpMgcRs3ZkcLrNrzmzOP/kkQSPs/c" +
- "fx/623+62xX7H7t/15ZmW2yT/C26fxC/1B/Nm/4vHf4Y/W83vZdxnDDNatLLf4zJ" +
- "2SOOSTXtmh6bgfkM/aUg/9rYz+ROs5f0f7Np83tXE0ON27ynOf4eduzHucnkr/bP" +
- "/xPo+Tm1N30cm7RXZ2cox/U5Js3cZ8ctGrXWkfP6/AuC4YHo+wmtGj+jDpRjOnhC" +
- "Rui6MS/oi+aX3Nt6cccYzh37RNxmjpw854P83H24dWtaabtnmK/F6q09XRzP6HOT" +
- "UEd6oETQUHmXUt2toYLMjFiMiAgDhaE2Dii0fPTcNGH7p5jf0kPg3fXkttKDMGej" +
- "3IKP2KJOlt/R+CT7PcY3AZxsoa+WREFD5vk4TdXR6uRq+MzKxSvDrq2ak+c2275m" +
- "d5ettnJp+4/Y+HV6qxudXLdedt6uSdTKGaMJP6jNbZZww68/M8PzplDqYusu8ZQB" +
- "AFQUJ8y9CB2DjMriYXiyEoiFRoNAmCWWSMuP4EvGSYUfk7ut8CD78n+j+iqqihWU" +
- "fmZb8RVjX9LiIokXhgfqc+hjbZR8xHTSG2NvltyeEkBoz+i+EBqwZMS3bqJsEaIa" +
- "GhUYwpTgGQIwCHFSPHf9PH5soVQwNtyu3LdB4H7h7qHvPtJPgw2vhhBmwPscrZ9i" +
- "B0ofZ8/K22LZTR+R6NBmMbWj+o8N5NK4btPxmPo3Yvl53M08zTwps2Ux8n29W7or" +
- "ecnOTH4LDyKfk9eenmurrptb6EDAylMSyCFoPt68A+P2W2rxpvgRO7eOTE06p78T" +
- "pM095szdT5dJNkqV9yvdk2KjRq7ZNv2M/zD1uISNH5LRt2dPbXxwgg+aSTdJarr4" +
- "+t4IO5+isaqdYSfl2IOJ0ntA756tsBY3I66SOBHlU+0+8bWUbHdtxa1P2y83z5Pv" +
- "NqJ29h6ymz5tztPN04yw5+OsUx767u+t4Wb68vvztvPsCb27OnbrgHffegij8Dbt" +
- "R+cpqFnrpoO2jCj+dtrCBfwtFtxfNrZd9ZcQzVPa9qbeq8duMYmVfF+2cTONb3u2" +
- "m+N7LwZwK24TMUPA/s1xS2PJ211vg1JfBUXQLO2tMacGtLJmttPE59YWnForCNrr" +
- "vbv4+/xy7+NG7BfXbnqKVTuo0DMuFW6c/DBvb4i5+crr56qLSmCHWi131w0DRNem" +
- "G8J8mWF6/BavOE5YJruAqh/e19oRd79a8j2xXHhVteYnEW9a1AvE2WHFHnr7Wf43" +
- "p9q/GjSGtZb51XBDR5fZe/afXwzt1jTi0aTqd5pQ9xPS9+tflc68V3+R30RS3anM" +
- "Z7/OYoK83au2vY962u/PmnmvWmcymeWxxPne1H49bc+va/KVHaqJxTgrqcN7zDZ2" +
- "TweudXvavlknvqpsg6zC6+IavvB2enbrx754TjNRir97rpG62S7VPnth+nn9KvmF" +
- "thTinXkTrfbYcr54eVPbFQRF11vTW9+CcB+4r3XRpMtsKWHnhn3dFDF7PYpQoLeU" +
- "zh639UyDF5ouhQerfW+FKROlO2lJwm+UDcwvkjwQ51nx2aQ+iINt/lkDDTrmb2vr" +
- "xryHii648Xu/tF6QHbUcIFxgYRp4+V7eaLG64b2su+ONNxKEDlYjMR1Fuhvauj8z" +
- "eus/aeYa2iB/Va1tuuH2zjOvxxxonwsbYInfrnTPNs504yedSRkJR0jeaBvNr5mG" +
- "nFr5TFHNub0FVE3034E+q7tfF5n54uuT4o+28bYpzjhtI6mfB4jbVMEd31VAR4vi" +
- "GN8Tu4umaeq9qLGLNUsvpQu/8faJd34UW2pXhjvaq0NFmKDNZ7UjVrNM4aXvd5pS" +
- "g7LW/5p7955Vtvf6tsMfFl9rs3VvkKnfvemaXnFPGd4je+Y3iU3nXv37xz8/Ot5b" +
- "nc6a2J+dPSXnLYpvqfBk7ZifA8RiUeNNauSKONwZWKpMDsKhPt+f5X25+dAjco/6" +
- "X52E/Ys3128FfCeI+sV1Ngs+8/j7+sqrWwKe/0ydfK2xlW+++7Sx8Nr09NQEOaq5" +
- "Z21TVe+3euawND9LPk1eaTWOD2M1bXSfq32fH5WrqCSRodPHmm85a3Gq8/ldR8zn" +
- "NtO6s/E5oRyyZ1pX09q7BTxk/n5j1O8Yr8nSj+qezJTO/bzuIo9vLwYbxnRYVVut" +
- "OL7dQJYPFNnRyNDLjWmONtQBd1AxDZA39o0QEps8eiBrSOQO+M2yN/b3A0Mr9bVG" +
- "5A42A3LcI0uBvqcxzal1tziFTfaXakSnUaaNpTxpS+3avWO1hvyyUtPUe+uu45yi" +
- "4aeNNM2GnS0nrucvjF/OGhoOnW1aB+Lxnmzq3GyztaXeuQpomp1FUXt7Rffavj8e" +
- "Jxqux8eyex3ftOU4rXxtxMYwPRqwXX3Rcbx8dn9s3YtPa1XrnZx3dqikI3E1b3fP" +
- "b83aGWPme0CcoGvA1o2PWLs1K+ceH4fTFuVHzrGWGpHci+dabeFi0V6m3aE68H73" +
- "Zw10nviGOyJI6DzqzFDysrN7Vt3elS/jFreqKx+UpRu/mfHbO2Jz7663zp9WvTov" +
- "vvvi14Hr7KrTbRduDN4R+UTmqrtsy2L5ZVHyb3Y6t0R06bVXuuJsOJpv5TdGqPBn" +
- "vjuRp2u8z2WyNdKcny5v9uOfk2vv7aaeetW8z7wtz15nB6WenehxSnftgbkj3tWd" +
- "Mah+7rRbrONx6m49l1arhpoQIQzabRKaTwFVPoKPOmlsaT9tWeFUp8/XrDuFrtXT" +
- "1Ap74Ub+kFY8KMkmQ4I7OOw17bYmTediZ0ZtqXZakoO7cey6d0rpPrCrpmfgHM/b" +
- "a7hjUcJ7c3OM2GCCHLLJ9KNHOb1c199tbZc8EKX0o9vETvYazOKX1tnTN9u/0fij" +
- "7WpVRTrmmb7c73x2zlpOsWq3PBNjMryyVim+k6qIHV8cZzrm1NNNtGG3WiU222+q" +
- "WvilXLVPDTtuujYqnq92HkjtPrnhn8wfFVRtPKbMlam+ja2nZNWzVGx40FOJoI1m" +
- "jzX8RMGuvpd/eu+lF81TFb00pDIz9nRKTd6RSnvt2s+s7+qqt/jhaRHwyffKQ/z0" +
- "/tG3K+dUXivrmu3jC03fjSsNvPfd9sob+3xr8iPBlBljpK63v6fnbHtxKpDNFNx4" +
- "fWXi+m1XLycVHAWwI7iooCKfX4XX8vjqgNOk/E9udJqie7fMu3gr4Snj7XtqUiPX" +
- "k/dmGsfHvAp85erxqS/xs1bwlgkOcUNz9VxavzsJ6RvKmczE3Qfa3x8N7dfP19fV" +
- "5zBafd0+t4Gv1r9dSf3T6+afWJ0nyP0YagjzqAokAsvA5HMvICycScGRH5DZSUA+" +
- "4yHCgQfxOdfUK0SiI3A5uCNvta9mxHytvJydnbe2vh3ekY7Rp0aKfJeTkcPDZ8Nm" +
- "PB3NTaen67W1s5nLDjLOzJpdra8zzbuJp5Pt6W7cnZU5vM2/Y6dMPz9e5Tcsdwed" +
- "g3dJ1jb2DdpxJIz0Z0kNPqBsn92/s4FF+N/glGnYgij0wPhQuH0EH5P7jwhh/JyC" +
- "zw+Z3IMdOXTp3K3ZOHCvyezHJs5atrTSjQcMZLMtxWHd4dXKNgxw4aZq3nzb+1vu" +
- "cjpvN/b6mqqpFQxWMPRn6H4LFK8ID7PD0s4SMs9KL0KMPT9CxUqLPxoSUfQf0KPy" +
- "Lhh9D1vz6H9jW/B0emjPs4eCR1R8HP7MbkZSDnGyW2fQzpoFHCz0g/k0/c8XzYzM" +
- "Xg5v2dmmnecnavJvG6+L5VVNPmrir5NP/86vZ5HJ8Nnbq3mj04tjyV4Y9nm2eh0f" +
- "qafNu7Pns6K05Gnm+zfa1ps3fD43tuO76Gt3pHDu2Z4fN0c3eclcM5W46KqvgrfL" +
- "ZZ8Ozk5zj2t+GJ1OZux01LfBLof2MVLIb+iTTw/Qko8MWFEI2oiP1WGGjYyKLrbb" +
- "fh6PuDD7yk3srttD0dPqECggsURwgcKHFYVt9Z+a1C4nm6Upa9L3uLtW7mx0YcK4" +
- "Kx0dfZa/Ltw8n9hXZ89reu1qDcLLcHUQNwHtoWoGtuURwwrIGERCPzCr0EbZJDNy" +
- "QYwp37N0hT9ZQ2foLh0PmQ4bKfLwekfRti0fBA/YfU4d3PrbbDZ6xtdCy8gjwLiJ" +
- "ERJhI2+1B1WIF0FdF1DCwjKkl0UI4z0M6fVMf6venWbllsbtgcPvILqxNlq6efK2" +
- "Sq6vRw6K51ebu01V9Z5ui4IUOJjUBhQUeqIhoDPBJAf0TLYPoToLip4WdGkzxt/Z" +
- "762yzA4Qhhh4oHIv3KIDT5KmZlTKwtaWOeREM8623/B6elo8Q1JxiWAgQncQECgM" +
- "LAiWAQRUxWNHd3dxdjkaybr2VslNjq7NlVT2j4cJ2ejho/Rk05YtfCzu1xat+Hdu" +
- "91cvNxDspIbRFIVURFCyHQYewlUKLjAgdUHOqqFXQdDAGooOZKIyENwSUKq4sEFR" +
- "yNRMUadp0PLpEZlE3GfqYaDKGQcHDf7nD8kmHDRh4fwWWYffjxw24caYWfk0mkeN" +
- "D4SFGhHiVFbu2EkgtHFezxIqaWnaEdzJFsqSNEFKpZXphid250aNmnZo7ZMVlx7m" +
- "zFVXDo03KvK3TTdqZZZ0j34LqeGyvh6K8ns4bdrequzHYrNt5jMmO7tq3Hk9GTU6" +
- "GMOGnzTTgbO08zq5PJjdy74zObhx6M8nJu5Vc+Lbm9uVj1ezk3q17t3D0exwYMKB" +
- "pTOURDWRGaXREECYuJhxzxhETUu8mXv9Vjp48d1lC0/f0WGgxkH1HjiPyUUeFBGO" +
- "am8bm7o07t3Vu5lah4OzS3020qqBK4ICgQPb8h8fj69n+3hleET5+1Kk1maNSlav" +
- "R9c8+++/Pnenwej1erxtb6HV2SCSSdrJHVYHikZUg1ZVkDtUEypDVQZTN8kDSwll" +
- "keMwS78akNOMiJQQc3dihLlKj+oCG7aEM7oG4kZW1NVLsxIVjJxmQMVBiUTaWsgY" +
- "DYxiQYyPuBXhdUKWrZb79D15ra7uMfLW1eW8dXOaiNhdxQslkuUzMFKgagC1Ehom" +
- "iOOZC4AyO5qNxXMVogEhIpqSNRe4grNtR7emHctEhpNtsXLSm9xOTBmOSDYeNILY" +
- "2DG2ibk3hUFnKtvTMXYBFsiI1xxoHjiBJg0ZhC2Vig602I1PKTNWvbUbYm/JAG0U" +
- "aUsNNFafJHs1SpG5rY8UsGwe7VRhp+PJFmpjr15ahtvTFpqhuKWCg24WKj7kpybZ" +
- "c6V5CsG96jMayx1GWUOgDVCIZKqhixI3lLuejpuwX0E8/UR6+vsvzdYqEqnmqYPr" +
- "ynyiMGXW2W+XV42wNasYmujHR/B20ne7B8uftj52a23ykGf0r2Fya3xEEDcibiTQ" +
- "0lZLgyC2ePfZkNiK8bqa+t/uN5kVHlxN3dckC7FJia9ve/Uugg2wm6UBkqXOGuys" +
- "qBJmITKhYQIImk5o5EECZQKpHrRxXGOTi2LXQmqWh6LhdyTi01SqSQ3VOEDXmHyx" +
- "eGS7oe6mzQZ5CDD00rOtqeKJjKBw+ee+cWoiUVDVLJ/FhK0iGh1VeKiES0TeYm9Y" +
- "aEWwQmDQoQiRwvF1pOMzCkqwS5CmptDqzik403jShJgqi2UaBbWZmCIlgrKzuoHE" +
- "I80UvVUMTR9bJIWy6iiIAxXukg2P4TDx8uds7uzmTTj2cu9+82j892bLO1fYjuV1" +
- "nOX+0ET1+9s/q59/SSQJI/0pffnnpk32yWNNLZIyLEInER1S3+6lv+L1te04VnqI" +
- "JI1eRIDos0ygqI/u84V/ySnvUfr5/o6avXhuP26/+dG413/yfDY/hOza/3m6353D" +
- "FQf4gPLyckmNf0/Z+79v75+CaSQkY8In6aqSH03WX6Z0X9VQB/vFWq6C5csRuvBZ" +
- "nX9ytV12MkIm7FR+DLJ9H6IBOuiLogQGQ/eRgyJJAx+aYLFFoFE+nXZEmdeEk51K" +
- "K8zR4ejlk1Rjyd9OlGOU1IHRC4Twt1lj8fuDSl+toyn7KlPBdN9GfhbdlfyOpi2j" +
- "7n1z3jf4hxzT5xvpenii/OQ9atPRJOV8YpWSsyBkCMSKpoqNVJ4qi6kbGS0oTp5U" +
- "Ze+1/H5LYmU6Uu362dTHpJsyInEO5DvTRhC0noXDbUrY0aAqh/N252CZJLYxRLww" +
- "eDIgJvhTpSsrEJ4SVDvd9S6BwlgfShNMd9KmGrWk3I52ZEqkIKJiiDZgpwVrTuGm" +
- "0Uo/ZLXM3bFdFTPSQCOxHSpDGrWnDhd5Y05Lm5qtLILG02ERoixRXRkaboZjM9Fm" +
- "XShtFC7OcoJwLVrbJ2vpmlco5wxxJm17X2pWtUowXbS88ViaVfl1mbDdKMZhHFFV" +
- "CHEiCc2ed3C08Xm0T2nd6Uv1K0yITQlBsslUGWxQP4OXJVEfYPWUXA+kdcuh/+HP" +
- "wWUH7diyuFPB1lyF6ZrDIprJE4SEZ7msK+k6P1h5hh3qskj4roZNzZTZjCbg2ePa" +
- "UWtQoyUuGzm+j26e5Sjd6d8bPnh8J/3oPU17aMyljAcLyiBhr8j7ZOg/Q3IF/0Ta" +
- "f6XwNY0RdbAzegLT47336Ne7qtUughSk2m77D7Kk/viknCAADCufnfnmfRa+PuZ8" +
- "GbDsi+jRFrzw3ixPHSw07DIXufXiw4eHq9LyQfWZnFx+S0TQXRM1QT6QbNSZJj8m" +
- "7UMbjp4V/ZPnp3lbJ4dvxkSfH+zJaG1+r41D+t7jCD0giVFEsaiSGe8yzuQcIPsg" +
- "7JTIOFnT68Mlm/XtHO4/DVboellFEFwpf9tkkmQRHs6yXoRCkuKPxU4Z4SueGdIi" +
- "CB3cE9RKuhrCdlwcyTChsiIXrJwrTvs9M61zkDIsOaTPnYckuRlvrVGxZx0zpzzt" +
- "8L7s4WtdLbRACW2FaHvN2uU7i5n0qt00Kgy9iK7Jba3/3pNiLNMrM1XhIIBPZHET" +
- "RypdGC5pZhk1rtje4i3zM6TWPeYQEE2ICad2RgNnBwoZOXY1T9NwigxKQAH9P9Hz" +
- "7gx+I7Cg/gWYSkB3Ml8YRVoO+7qZcd04606nOv7+wkB9/5D9dwJKJD9w/pOUxtmf" +
- "p+39YZxm/5BaSsnQxtYbRsXraiFwqdRNWIdK5L46DjXUSMMKSKJGX16puhl1MLFs" +
- "NjnoaUBMXnCJ+Kus2EV8F1F0KGG54HeshTQt8laFCKcUvV0VSQaPOy1KydMvj2Ez" +
- "AewDB4P7DzDchscafa/a6vq62dZRm3G2jIrBxhr3MevBrYhskfQQhIEa0BTQhzBU" +
- "xFWQUuAIPIiFQc+2IfQGI/BwLEPA90bT/w9O6Hlgj+ABZZYIk4UKMgIv5BFETg9o" +
- "QqCd/YV/CKsIEgWiK+Iqgr+QaKBHSWPIIpYAYOlqJTAzWgXcJAWQkSQfBkVzkTkt" +
- "EBuCK4412dduYOlRLbTkd6BOG9mJ3lkOMIivftOjRKpUQ1n8N8AXRv85sESi9I3B" +
- "wqNAL+SbEH87kA4Q0iLxfAXQzIiiJA+Dio0PfHBFET4KwoGEuhuF0X0+Od6iPDZB" +
- "vqe2ZbNmwwwQNnblG4ZREfEADnQldENc+vyD2hPFPDVaTmO6ErcB2CSrJHawjBeT" +
- "Lu1HHXecOXpfFifajXzf803to/li3IQraCMnXE7aNaF+UhNCJJ6bST1yCMSEkvrk" +
- "EZsiJnq9YnIRyfoE3qs1+5g4qCjgAB/d3LXII3r+NecgG/A/EBhNc2cEhOijxJO0" +
- "FJewHGBzK1YnNiLkAPBkUztU2GMpL0j31B6VEaAuiEtObw0ViA2Qo2CQrPgdgapv" +
- "FCGKU5zwAX48rSmSGfCh0sBAp5Vw+mHYBmgyfBvQ2gE9Qiw2eCK950Urem/KrOD7" +
- "tAApA2iLxtGRmFUGVZgNFMIQi7APICVtlUdVP5fqGLX9TEJBSYcWuJiEgyD+whr8" +
- "Qt4j0BCvhFy3AUJAHpE2ATCfY/XP0YM68EHwJaHTWChL8gPdCT9IoJW04ShPtj4h" +
- "rXUO1N+9eNBzh958PwJ3onum3eftLwTIIDagDw+o2Baej5qT77qlol7lfPlQODAr" +
- "7Qiue8ErGKQIVtOQ+yuebQ9jz0QHR0XSF1f1oB0wm+nhBsV5Dgxx5TjC7ifRJgWQ" +
- "JQKDKZ5QcF8aA+2FRB9siyFbQEtXEFsiyD1KeYp4vn1kdk65sBN3fx5t3nO/Y59A" +
- "R189AT77u6pOAXgcINOFPg0rAnT4ODvDpDvB+Q6AjhNjrJ2a9VBRzOAGZ6eDgd4b" +
- "NoM0UeBxPD5FreuGt6Dwo9RFdb8nAiAa2R1p49xif5Sm4cGGg5x+6ZreF2MUxiIK" +
- "+gryR/PfnDI6Q9Gn57KlMJ5766E3pkiWtHqD0EedIKlAC3QaBfbl/j82SCLdu7yW" +
- "v6Hmk/T9Y/qXglgiQ/aIREU3sfkhFsOhToBSbFaUQBrYeBo78wWrCIiT9D1wcVo4" +
- "GjuBz3joxqZU7bQDFwmjB5e74MBLoK0PA4QkclbwijNF7qEEoFkFRROi0IZfN0sI" +
- "zwihRtDz4T7ibJnxZdmKq4qOeIUAbh8KmERXb9nKQ+5QdzgDPcJjvxw6bZ3TBIWY" +
- "SSeN4U3EZkhKxct8oIiTDi7lqOt3Kvi/tFCQEsImhN98ZBnWjLEBK6dw+FxgB1I+" +
- "dDUAkMR8mm+NWReOPvBhDZjk4boMpjxoBGF5Lqkt7tL3kyTUNCK+PoZx3oUqB7h4" +
- "5wEXO/lduTg4NfIqAh8ZfJSAcG/jGkuHA8qr7Ro13OwIJLia9u+yBZ0dicUAxwCA" +
- "kEDreMjHsNGLghIQjFyrYc98oQaGSKediKrHfuebY7DkhSaKvv+X/oH7Ij+oKSLw" +
- "2kgfoPv0+vpfWeMjRqQk6L7QtAATi0oNZJzgYxP1w4HgU8+oYPhFESAjAyvt302e" +
- "CDaAWgGAh7Xub6oUY6dMeNnQh4yl+Nm1AA19panR4CYHnOGiidVdfdsdGvhv6Zx0" +
- "jjJBqQawcqukBR4Ux34pXobqCIL3lHdgOad5nLqYjUZgE4QvtAltbhvPRFES+goc" +
- "QfyAkiF/e4WiKYNUIFjKWJZA5fwJczRRibFGT6zCHofhgW8eydxvZ1UFHu97Toow" +
- "8FguNJpiKoCc0GQAn4ceHt3K0i1feYVcihrJaNBCZJgh3FO6ENqkEW9eLD7vi6wf" +
- "fT7OU2J7Zn4VPfXdnohaADg6HCzQSKlLKttUpsb9HGGYyM1kdbG3LRyKBaAlAEQi" +
- "6K3SwEpXNuY3BAQX+wSMOhQK6JuJ9BbiQxBRmAuim0FUeeYULAUKioFQBh8aR3Mo" +
- "71V1gxByA7oX2gGDQe8klFNQQNSjx5kWPD8XwbJrOHhrmPG1eVz2hyCeCzw70QRm" +
- "PBaXfmHpq4d6Cj30CwL4FmzRhVE1Z3PXGd4oUT3RT2fXIk3Tn6hAxuw6R4ZKzAfB" +
- "E2O4JIhAk0YDAlY3e4AHkEgAr74ycQwAnQW7rtlcpF6JZA7VNu66JrCcgjUCEFCE" +
- "RpghIiGj2TWA7EMd0aiCjpcIQOLL43hkAKrIRD57bdINOGQ01LwiQc32iwDYCMaA" +
- "kHwImA5vu3GtiupPVup02YPe4G+iICJJzomO2gryY5W3M5zx7DfU8YCDsEXiG6zV" +
- "+xuOJIG8KOYoQjJHHsGD13J0uAvNmGVfCbv+KJrzyu7cZk07DszWZjii34Z5Oq4J" +
- "YoGxovONSVdyqdDaiI5o1E9gZEO+MOknbKrd3vCGjWOSCrnI7Ux2qgrF1ozkJ12i" +
- "qiB+Qq2iQl6eKyIKevnnG4vy6vIfKJt1EpCX9n+P6PQpAeBRKJQ1sOYCWlkXAgV6" +
- "zM7YJl8sa21D2vb7geeO2SpmkzN+KTwlzt0iohA2AcDPLw1FWDBUJvFW9ggVk6Dx" +
- "nW8ShTWwRlT1sHHJyMsXFDhNL6q7kI6WJJzpELbUQNVIhmsRVy0ajWqqiK9NrXLa" +
- "rEhagikVJEOvbHSFh2axoim1j1bJkioWVpJnTIwotJdInhXvflf6SU/PPQX0bTPh" +
- "CdsP29ywEL0SWUfTCD7EJL6ETkKMZq+XfvOV9/V1w3yP6vw8Bs00Num+z8M7mbcc" +
- "Nyaf49zDIxUaQ2EvqlaeEBsxpWMXnJV3xw2Tk85CvjXKxcvj69eMUfMr8bW8bRbU" +
- "onKyW5YZYTLbI2sO+23t750Nk8klcxbgYLeIcQe/QCQJFkWj+oMfqaThzaIrMI2P" +
- "7OfFp/TvReP9gGjSGXxEeEVFAmDkEvv9VUZSkBPbMF8w/60D9GpeH1QCFw55QkLu" +
- "z9IAXDqKnNMEC9ziBCmelf4wfDqr8bOBhgIc0RJII4qPuV5Nz9AAJ6ARU+oPi6hT" +
- "+q8gwvYgoidW+M0fbI8rtLFtXO8iTUFlJvXeyFxmJtnkC7zuiaT8nGztzQSqBLOU" +
- "ovW3gp+vzfBxm7PhlVblQM2bd+/Rh4dPRBvEDSXngueiAwyDAY7g52aB58+eG+XC" +
- "rEW8lGS1QUeWOAT3cakjvwRHNevLrWRGxOBmTNeUHz5BNT4o+AkxZAgM8CgQuYt7" +
- "U5ikqOco13h+zN5A3dAfUbWApJdeQtkMkEkG1iAUlofiG95daxu0Xul4UwF56lZ8" +
- "3m8LyQBioWOMnxAZw8H19FHnTZSfCQ8UKukI6IKbgi2EROEVBFDkVQRmNCWiK5gK" +
- "gjqIqofRAygkWCEQQOEBE3AUBUywFE+iCoPxHKo4qQYSR0uWSDgsC3LBC2FUgIbA" +
- "gEIgr0IFBFEV2beEGgOV2VCEkasTeUI35YWoqjQQJBJsaVFsgnIIYIegAZiYinAC" +
- "KCHIB8L9aSU2jqpgHDRm0jioEdaHayC8iYiN6RSgqyRLYbpYJZUhzsQdYEVBA3EU" +
- "HoIwQQ3BFaiKBRPagNKp4YAbiYCICDIIOliTxeOOGnL2EcaOMNDMGJjKNGgchDj/" +
- "BKwYSZqRlgLQR7nzcAWpLACURHNK7oqAsUjajiiYMTUESEVX6ICF+TFgwSIL3tKF" +
- "+9aliQFdBBB/IK0AryCL37njuaj74l8yZNHN1lSjgfcTgmPsJRZVGcrSr8IEjldQ" +
- "KtmKapHX0QlsIki0IuSRcABgN0Gs+4HbDqPIFBxJiVh3OSukGiQvd5nogLDQRteh" +
- "2MyW2SI9oRhikH4T0jXdxNxJF2Xnskl3AVffHjA67x2y8y73Yo5mAE1DhsMmXJEc" +
- "XQigaZcogCwOAJSmvkK59/AZt5r6CHoKYtZF6XRWBxO/0HFiG/lmwBS0IXvAvwXw" +
- "uNK56cJCuiEUIhAnVsVC0oQ/LDomFtpZXfIu324pRnto5FdNUA7OBqemCvdxU76w" +
- "rnterFGPG+6Q45tXnD6WRacT+nbNIk1JCPpi9vz6KPo0aWTYVCFR78pPNQgpwlQo" +
- "7nZl96ldo0qhd6oAriD7PYX3YjYi6+KtyURx0Dh5o389ggNbU0B+KOiBJNO/YO34" +
- "6a7wfKK5PBjVqgozX5yrvYe4b+g/eQESyAJYADkx6QeCQZ6hHDToVxoz61c19ymI" +
- "QUB4ySSEGSTHhMs0Tr7Of7v5ZHrYzWRqmxy/D2PVnfrHr7nmk6vMiLt6Pfbbft76" +
- "NqFfrnncwD0EdL8qWqmCRcAGdrsAgwQV6XyemW3csQRzF17hRM8sNaA5u41TovvJ" +
- "lL6Jmj0Qdj3rXVUPYlIJEIbMcN6Qo+y6+Gy6V0pk2Gw6o2eXyfFnBOzAXCDYADzR" +
- "CSnRaQYZ+hwQZ0h7sXXIQK0DQwbFchiJ7Akq/buuqEJT+FvwSPhCs1JX34emWkc1" +
- "+0JlH7mgV6fdrze3n1BaU/HP0Ip6Az60FlmH0F+FDieRNSpsh3JnZieg899kMapx" +
- "A2AgedvbfYhjt7fwdfgTf5O/lUCeRAZEpJHwvsvi+d3wMBEna+Z6+GGGgCoek/BW" +
- "dQo/JYryYiLihedIULrmV2fAYIU15yOAfqwHuI8EwYI7aM8kO0X6aYygiiUvGaA5" +
- "AqKrb3bLK3Bu/ws6awNQMldRV/OihvSGeGuLuQ5zhdKQyvBbunGHiqbSVBLCBBR3" +
- "sJmkCunDAXHHd4eQxhEGRYdBzZu7UXXMiBb3M0jRVaMN1xw04qyJ8G6DCyAXnHwZ" +
- "RDcJFX32jyXoosS3eitAOfuZFfqdLyQBCCB3aIfY2OMhjfbVA5gUvI4NI0ulOm0b" +
- "1FDfrFHR10hZU+ODKMCViSStxuklLxyrOzBrvpkTD7nncH/YWN/xZ/cWB4MEWMjo" +
- "uNq+pDjINyCJIMft7GzDNPmQMmfKO8C3BCupq3ah8aC+3PLydaANlYxbybhnNhxC" +
- "RTyS5wfe8lJ5C60b3pGVdQBEF12XTIjMtk1B3sJLjW843JTV6tmmB3szzW8PCNWR" +
- "3yd28o27CnITe6LTd1rriEPv+r+W/Lr2jtO7uzN3c4O+Tfc02jcUkrJR8QctADA0" +
- "gXSiA676RwOkRHURdCHLXIqelq5LOSTVlo0mrcKsbgjhEjApzpaorkBLDgWikaMD" +
- "WBmkEQLF3ZzJGd55Vbo6iJbSXTzOm0HEagBiaN6SrGSjgMe8kJ1BRvIDKb2rTVuv" +
- "UjayCQnFgki2WkEJGRQCMRewEqK/x1GDBcgGSKNrCGtI59lyNKkdOrQ0UCJT/tYC" +
- "QsXuKTErgmB/L7qWQAgjObGxtYRpoNAhObSe0Yb86I/8koc5eNsi+mHWzWtVmg20" +
- "+QHoAlFmGJHkyHlQ13uGhptHj5jDJQi8LDIbkOBvKk72hX8sJ7ueW16GHGq4y9iI" +
- "j3yMYtSIbDhrWwlmqZXVJRCqouUAUhKKoGCwqjpq43WTfM2qub+jk2T4GKHeyOVj" +
- "tYdlk++2vs+/+x5NvlJOLPYmGRLWSHhDrPt8vLxjo69Xl+W2ESbJz6o+epO91qFW" +
- "HfEcnfU/36UAcqgbZ7xi7DdKjmP6OdAd8+vBt/QtBnxhQ5Y55yjps21VoCjTyYLL" +
- "1CSAQTQgB7K2FHCvBzdvNMXNbRQpcZKHabwUfuGc374PhwMYpCQXoDnJZi+6wEgi" +
- "AiX71dMRdTfvYRIwt14Tk5HPrJ9sRIYwCUOkZlDd4TvtfPdgHxB1w21pzT08CJyh" +
- "7Xc8oYd9ZaSpdBvqDRYUDhA4KO7b0HDw6Hwa7XttFLJvwUIDpRXAcDIRWHS+aUSz" +
- "xocp5qowJUFyIVcKHx7WHevE5XHZxO+4peTzkklyu0YuiXbLEIJQUcsg9pabkI/h" +
- "od3gISwZ4fwv1Xzc/OeFHgwtN7OIIX02fD0/FYKloiIWHTB7PYJwBsz1ERDlrZJE" +
- "YDEhYassKO0HhjnoW2l4pHuKoFBPAi0IHcnEsMNIUlBMw4wqCkAz69wRdbCpCqYV" +
- "IiZOnuCR9k4a5ZjWNKYUSxiFzpNQQUVwU0iIm9GbESmCr3RFQr1Uigjc4jisu4pJ" +
- "puPoO5yOeZt1LgztDDSQtUkU+DXS9idDpAhOhoTBeU7AAikkj6CLUxCIImIIc+BM" +
- "GVzqBtTlqMISI1Sc4AgyKiD4gcWAivyJqEowpHETkhIOIUiJAsq4g6inSDsxKRWg" +
- "Yt+3owIGgQI7FgKRip6JhDOMYUVRT0TqgKJELhtSrt5BLVIqtKhEQLggZJ4QhiQR" +
- "Gq0Cqrhtk6wQnTdrZdiQdLJbBMJNwoI5yOuHOpAbHCioJ0J6YhibSGY1HllCJmB4" +
- "jcrMaFD0ewXkW4ejjFIZTGKo4JHcpSBBPtd0Qxs1vmR1w4jyA/Q8IHSlHwHq+Ee/" +
- "WKYiGSG4HC6NiRUCLF32CGopcnwE7g8WC7D27ysTrEzHoRC9BQyGYAhkqhOQBwpF" +
- "wUlY3keYQrRXorRFPA+GhTj5pDpAE7BLgAlbrkDpk7XdBkMCe7aC56ythMcLyB5M" +
- "qB1IiizVK6jgSzmXFAgGIgqwIgA6EtEewNxEDMEKsvoUzTnlKA5iDnmtY0XrFdi7" +
- "oO1avSIz4+XbDYhpYNbXls12lualldWW6Rmvp3XiSn4tr7H2DBIdge2UHx5TmHNI" +
- "B0iD6NlFC9gO0A7Si+DLWvYUsE7DYKO6BRETeHLcg6SAFuaZ2hO+UAetihqZiOFA" +
- "GI9nCa1gvgaJXoNNThLNEDOVQpTOKJxUxb7ouRUN5KMOSuV3bdQuokVEdMKFDQPm" +
- "AmkMhmx1/f2bHBC8ijYJk50C6E0XqgwMJ6K9wOKaAATyGEoaSjjPogj2CyAOQRZk" +
- "JxFQViYRM0i+Ei8gAZiihW1WUkg7JgoKGBijbIMenRopoooFjRhdB5EbkD0B3K05" +
- "69Q6zqcbkOM1FpwnoGyJMqYsuqUojv8cZ1sKM4tO5+rCm9ZZJCE6fbttA7APREM1" +
- "9CSIPRp816UCN9JJBPsHGQVvYZdivqFy+EDnwVAwp4cGED2KJDVUXA7yrAlwDiMK" +
- "5xTOPCYrIplcSlucCUpqSpZoxggu32wzjnF2FlIidoAllPOFbJzD2SICWniGwEiA" +
- "3QNDcV1ngXIKepNW41sRWLhvPSg1vwFIhjFd0VnVLBR9WMhksUIIoiX6b6aI6gwm" +
- "eWGTazqFhRbYz6BwdaC+k9L6lESGVK0KgKYufORB0fYYzTnBemj4BH2gEaHaaIrv" +
- "fxwDWvTnqdY6WgKUpgSoZrcEXkiQwPFhy9jFIQUORTJpUAFrhENwKQV1OLa5FQdh" +
- "FEEkFVhFQCQVCRUlRhtibMFYg7DmjWQ0vBThVntDVh0KBEg8z0VFZ1dnlwvOxCyV" +
- "yFg6KORRzKtb9eVaU6PsPpQ6vqCxMQymmlu1MoOofNGJrbSJqCnCG0ZkU3SmgEqj" +
- "ljqxILxoC0NXXqMYPKZsTNGgseiQX1Um+tDnWCzEFM5KYaQwiK2hebBFtFvWbIKl" +
- "A0gySQIKEVUFY1qkKQisEBDEYcpVOMqLjVHCwFV4coAKcGYVaniPIi0IDFCEO6py" +
- "iK3Sb5QtwUTkeVRqSZvgtiPRiC9YmOGphARNmQ6kLF5Mm9RN5UknKirNlCkLBMDw" +
- "LZGwouEWmYel0VvPJk0f9vqDgB1OMRmKZKIzWahOGd6NWRFAnCIXEL6B0Uc2fl5P" +
- "sIeQC1FobsyuXXTiCpCs4yTW8WkdGVi02BNTSDmtnKPWeq9Y4twF4gEpDgiKRGKA" +
- "rATvQoMREzE7FMRAK9ixd+aTuQoIDMYQZSoQTcKEAaDgwLsSRHUTmeBlwAjqJW12" +
- "haMGnPdB7Rko8t7UYLQRAzDoHldEqn4zfIlR+ahTFDj40bkEs7N9ubb1r5Pkz4P7" +
- "KmacMbzsQ60kjr28eWZT5fOlM3PVqKOMRxDR3mUfp54ZLqzcSJorg+9hoxMGzVzk" +
- "E32DW2JtbU2qrPLpN5Xpxamjzu8wb1lW8jakUx6dIsLnCxQwpEzLzYbSCTWTEZrw" +
- "p0sG2G5EvMnZyhFFF5tTkG1AZohFJveaYcvskKd5SozIJ5nClUEHKNtLZSLNdA29" +
- "uDYo7sXxjC44bazLkkiHu8qrYzJnnJ2oQ08SqTZVlzXJN05fOLkVt9y4SAdhsUds" +
- "ETItUioA4xSCJRd2ihTicgxYcOnBhN2OXCLbNOTBhkqTgh2g0U4XAdMYmaJDRnHR" +
- "R4Lu3sBvFYojVUFkFCHnDpF0yh0wkgezuLUwW6maOnVNAne9DRbH+AAHETar2+Ft" +
- "41Wuaum2jm5bd3WKQkCQUMg9FB/ynAQTMVeIB8oh6CKP0EAQxoFOUgEEvm7+N6n5" +
- "WSrmuWdsdiR+nu8pv3szvUcbeXbM8Y2rYHrC4l+zyLjDfmIMYVsENPkK9m6v+lyT" +
- "5D1f3aEZuONmS117lX6NWkjPZo21sYFwu55fns3WZHrU9bIXYmXLdyesJJhtZsyP" +
- "8XuYeY2qPLzk8i2eMXprLlTUee8pZwCQX5F0LaW8MCu2YWI+FoVCAHBD2BOl9jQc" +
- "oGoiISmkexUTRuFCkqlW4ITOGyomsKYHBjZrY5wncn7k8ejM3ET0XYlJU8VglCrh" +
- "D1mEVbUgnLS6ENcMUAAwOwooznxlE7lPuAKOBPjKFlnYC6ADqLSrEfFWgZgi07lQ" +
- "JqzHsmsUg1ZBbG7lW9a5qOWxHURNRDgomOIhVc+e4RuBqAVWjExp9ZXgMJ2l+KEV" +
- "vOwwHQfplT6irimoKktr1mTvMn1AI6Nj8IOjnF6dHXSm3bQx3SNAEqFigcKwa6F/" +
- "BubLQ9vcq85KsS6AydGpaE6qtgkARpz1BKuNSoGBOgBQ5A1kBa73YHOdtULNUiHq" +
- "pDygDESZngsBXWfdQdUGGBnhtbsFzJEXO68eFC4N2M3gCnwhLjo2sgkKuQ/2GLWH" +
- "g0I67776B8O/3enHovnD5QgD5SX19KJhml4fQjZ7+0Q5JZrA6YidgWYyY4jl8xSV" +
- "sK0myHtg0AKidGTG7nAv1K6y5UVikEpJJeVcrzdb0hpFKVRzLlSn17KMaMkjCTLM" +
- "QQ0FPTr0SQkXhEVoyWhvoQ9yPsIB3yDPeHXPwPw9rkIoDOGz49jxbEtALl682Rhs" +
- "0JwxZeyKgGTMoB+YAhZz8Qa9iOMdcWRB55QGYQwryLwiXDkQLgYR9ATDOHVU8lId" +
- "eOvOCO8PhtQKPJPaSS5gH9u2h8QPjqFhzWX1iUDkBGGRdQFORGvidcljOQQDzVBl" +
- "TGG2UR07istKQkPDezFCw0PURkJVk1fFtUDEY3CtDUhqIFYmbk+TNC9bRLgC1B2Q" +
- "hmoGNNdEXHTlVNGEVIJL1zKJJcvOiDo0nuITwMO7aogoMQulp1Uzxq+a5SU07uZm" +
- "vE1CJnZZ70OyN16aWcbe7CfhB0W5dv9C6SR3sHAFMHzkGZVhljT9BtpAZFGb0IBh" +
- "iANn4yVtUWWNjZlODZOyQgvvs4J4XQtR3HQo1zIKaCGoA3MHDeDBQRyGSIusq+Iu" +
- "UOnPeNgBZsMVdUK/MA7M74eXN+cCMybrgKkJpI2AViGsH9t9NE2mTXEAH2u1lnrn" +
- "3EhxUTGqz2uqtiqAhUVEQ7IFAI05ncwTfKHWxRzwOqtWiKznM7zWPbVzw4j5iIaD" +
- "SHW84UBRM2Z3vmt3R7bnF9KAsRXK5MOIWdxy1IhO4yIpyYRjiTl6klPndDcCERED" +
- "fIAlT9GeQO/FHYQ4IvbAcQGRxYyPYeZewWBoEX3dzOxpl0F2A6Xk4RptVObwVYvR" +
- "JgUdJSoUBw0WAB93YAWGu4uiaiu2D0oQ6CQqYz2svjWxM5GLngT4hPu9PIny6IsR" +
- "ZwrtKctQEYHDXdoRqg5oQ2uSsX4bCJ3NGGNxFpY9K9jfyTMPt60P9tHlUE941bvY" +
- "0CWQSCsNUdyq41StOyY05v6ryYNfhWLruNAJjmG6yfUmfUshkQw5BAYqlskE4XZZ" +
- "0rCcTJIRvQcxBsbodFNqdCpMhmSYhrWBxkg7XIf371jehCbUwexm4dGgVDsU5gmy" +
- "ARYrMvjRHnRAjrEi0GYc5Y6OiwRdCNAUhDcJxjcBNIBhrUp2G6ndXbO7n1V1kivl" +
- "8XxGjFDj0HsLjFztVYhL2gQARiRjzTgeTHDnuVV3Z6EWdEVx3o6ECjQ5rCJk6KO7" +
- "JyyngW7FaBI8Q0m90Hkz6/HSOXw7wPcGEkM3MXsytQGxEqIOeR5s569+9oW4M1qt" +
- "CS6KKEewSrVVQ9Z2x1nmgZsV5A2G0sh3RXUp64xy5NrrMXvw/jH9rrG9Vbajixah" +
- "aXPO4PyEx5aentlmgg3UzPNcyQmn8jm7WpaxrIJeGcWmiyb2JVHMgUcgNYWQZ8qR" +
- "l9nHMTRw3MikGYWca2t3QhhaYddzCOLk1SxmG3vec1U7jhzaLKrbNpl7cveuJ4GT" +
- "VKmHNOGIKDJJCa1hZpVTd9ddzdqXynyK3LQF/1fvHvFwDEEAgG7s21nIU4+UAFqO" +
- "BOzZXxvafGAJlsTLa0vUiRYNbsqb6jMCVwky24SylLvbtzhy4U047dzRIGiqxGqI" +
- "kIjQID2qNEqudsyoALL7RxclL04W5tQJ5QDpK7RHXccMSIKzBREj6ROmSpdaVrt4" +
- "adqfw1EQX0QzEHsCa660tktLxhOLIkn2OyUnq6l1++dxH9/n3L2c8+25+V4ffTlL" +
- "WbIZ6mIoWFkymTGcEwjhh9wUdmPPecx/I04eIAX8Pfv3s8Jw7Rz+F57P356BfL1E" +
- "2R485lDJBs/Jx45HbNb+1znkLrlQVg2n3Z3ePSJuR7bhMxd8mt5Ml7Cna2v47Av2" +
- "ShobDchLus/dr8YRijOCfI/aoS1CEk62/SwaX0d+zqSS4TLcKBNHf3WDoO6NgvqD" +
- "AcAR82hL32rdu4FRZaPc4BSzInYiK90PsiBLMdwBZzGeZDD4g5u3gUBylQUbarAR" +
- "BUBIVnQqbgplEWh9veEZod7p4BlUkk5VEijGEoh0dAiX2FHNFOZcC5CaW4XLEDTI" +
- "SgogmLJAKIqAY78+xmDgxem8eRwYA+e+7Gs7BLa59uFG8ZoVeVgy9USRkUkhykQ2" +
- "gdhQBuNLAzEGQWz6uWiSqgkgPFhL1X2+0eYLcIcj3iZyxIJ5vmkDHss1UAY9Kwmu" +
- "cUvi7vEKuyu0GwhCTA/yoyJyKgfHT7x1mgrpxkN4KkOQXU5C2Mg4GpNJatXYSKiD" +
- "qMyBxJCb3pESGxB3ecBzpYGNW/OquelOkMMQhLMNvp2CszyQXClDLJFNasPABkrG" +
- "Mqh3NC4P2iBrGm2BOkclnvhVhaRISz3tcWC4e3pxcma792AaxCl7oESlxfjoIKJ7" +
- "a2FiDuAweHtnbwXS5c7GQzEPRFNwEFkCQFcwLhdUKEAz2x8RGVU4dMOHfKVIFIhm" +
- "2iWtGuVMhENpjLWFciSZlotHBr+3aNL0JXa8XgqPAEd6EVpKnkMUG11O6XJWr5Yd" +
- "e1Z9xlu5eR7mJ0wHvDupi0w9qHg0QgciAVh2IX6IXeOlrntOQTFZdBawzrREld3j" +
- "PlFqXVGJkUYTNlohLiPDOszjjML0boQtWicWm1LQfEJgpwVZEwVAf1rpwKDiWeW2" +
- "T44FofGx9X7FflnTv57B7RWfe+Ko/xh7BrfbW16MdhYNV5PvlOkBqBZnJhkCwWXb" +
- "ALoENInGVVyEpJHrMH1FM5yhFxZi6xvmHQaSOdy8vvLlDQ0cip0Q10A0glmjphjg" +
- "AtXhh5sC2DuE7wOi1ogHvNgoaKThOzB1lxriiGCeshTQvqL89HPQ+io6J1Omxss5" +
- "Zv6kfi67wFWe2dNZFCyzJZwresuVNd9sV2RTnE5N7GjnjtGhDOLCGejhEM4VqEAY" +
- "I4iKBkRFL4BZuzJlfc28UAYvBA0puE6ZecsRdO8V2w3M1t4YGKaBMQ9gzlCEQ22W" +
- "BSqbwKaRdjkQHC4ixmWzxGIaJQxyRAxHr6FlXRHCtOM7Ur2KSG17m5xIKQuaUIjp" +
- "KPU4oul3DGBPUe9XNE5SjJ7usYsvJroDQcDTaLFrKnCLS1aqHqo1vSGEySRhymq1" +
- "0Ub2JdLjui5Cg0OgAyFwRzuTtrLIETnek84awMtCp9ESClI6GC70L6VcHG5I5VRM" +
- "DxkDYaht0wnKaDRTpUruQQOhrJt5eU9zwnDZsQC8XLboLBCToaxiPIoixht299g1" +
- "eAN4RdbBM3PFsKrg6ERTws9wPEE53AHu9HnSjwnUOBSNrBA70oCmilLYPe+DGDgh" +
- "6AG94FT/EZfpoKj3EISVg8QpAngqM8vmA3SBJCvRSw6yhCJNdyVUolCjZPDeXsG9" +
- "6bxkCEDL4kgQb0NHSghSvjbgTCRImOgQX9g5YQnK1JnCHQir06levMFKVYkHy0hY" +
- "Iko0oj33Fl52C2vKsBIXYs0AwtC0BAVsqkEI2A51DCQ4czmzpfPFmm+b8ANnSoK6" +
- "NuBO5JsE9wB54ZFkSd6awB68gOzx6BZkU0W41kPJp0tdlQoNWMl5ouXnVwAAOBQV" +
- "QtmwACYSMN8JJSXDEpDDXCxMzIoc1vtUCyI83wsQowQmOdEQeu+6wUTUVTUZ6V0G" +
- "BjiUxQLwwVYDEAdoXZoZo9PK2kLxhW04FenMCowg8QhwJC6ISvJoZdAMI4RxmXl9" +
- "WGpq1m5QDogASIegEgDIpUXcDP6wOlBb2oB2J7FIYiZ3rGZXNIJf2atRcQbYVDkx" +
- "Cz1D0GsdMvIO8NzFYSwtpbyZ1nGAWozaQYNERCAeNIRK/KCxiAvTnMSeKBcSoITt" +
- "OIamG40xIsICd7QGYq7g5yMZSfYIBjSC8cIthVOmEmzl5cjRRQSFEKnIqSKUG2y0" +
- "d4pDaUQkJ5CMiAKrdvrMLFEIFbQrfWW0hD7GB2FrFcwCpSROwIDjxYYPX3mjKzEA" +
- "oiIESUYpR3ygcvabgvYb5JsUBDar6xA08yYdnJ3dmc8KkH6un9F+sESctLBFkQGm" +
- "Ta0bPig+sM/K4rcNlicUhXGvkeO2yqSZ5oKmK7mzQnIIpTd6txohrPWxC+w7O7Xd" +
- "9LQtO6uqZLhzsHZpRcxYOi1CFignFLhwDuxorIb1rsUMRBHkUkH9+wAqL2aiyPoA" +
- "lLwUclJO0yK/pNNLRBkAgxgRJDowL+MDbn7aFmDs3Zum7TMmpl6eNnnKXjW+cIZL" +
- "KTUDBhEK8ciqkQeV7o9nO+RdjYhyConjMQRTBWmeLu3GkKYbSDZ+NFythpRclB0u" +
- "+MM9hIPy379/P5JvRp9K7Hh8rACxIThkR9bC/mjT79r7kMrZfL3DsQq9dPzd80jy" +
- "omUQ0MGQccce3Fj7MWzP6VNxLUm/pBuxmmyioIE45y9suzCqg25nIpkvY49evNI1" +
- "vdkD9EHHY32D6/Wt95wXiY14QGHv6Tupr4QlovqZsUxN/gppAOiLCJKKRQoB3Tq7" +
- "wOD2KVRzt/RlCRyIOQHSOSr3uh4krxkmwT/BsrQ79YvUxmCBsaLPe3BE9rd44cRs" +
- "EtHttA6UiBxgHNHMBs2t3WoqicOUCJ/pdOhWwXx0xzvjx3O0KVN84or1DOx3VbmY" +
- "XBKjiLHHQ6cosigwdb8KKicNL3O90EPY3XkwoBs5FPf48Tw4m8Z4osEyHXmsb2fA" +
- "Ok4HFRdQRcU7OGXaHlQhmiCfcEzj2hQNDNA6MRu4t68O2Z1CjKZpojvIZ6gSyZPH" +
- "rL9rdnsgo9LEDXNXd1XbuepmStaOYiD4/r5zmElX0N6F0Tz3VCoRv4sIsFhYUIgI" +
- "numbH4pN2G+IcL7ABCaNu1mNj6QkUIMAhtoR0MMPiEUwHvdwMF50hG8QYCTnhfkt" +
- "UMX5FQVzDOdATVLQbTBOoetSGcCjNrjgN51GgITFdoNWnL64lJHbNklnJKcjAsED" +
- "6LlEuu3zlPY6SEcibIy1pLUAd0IHMRZuIwhRlzAXsU1wRK4F5NYIkTsbgaGKAOrk" +
- "3mDdrs9oHE5vbz3eO7IwqJxcJxDru7DPr5kZnfTpXLnLVEx7eQEex5Vc10EW/bNS" +
- "/UN3fOWkQhgOwHG8e4Yi8HiGe47HhLNWwnMlMsrBHoa5VyAyXB8ny2xOvMcOHDgH" +
- "b3EqkrzSChHUyZmLI+6hu7wISKUqFFKTFWDllLromzIiucDwBOQQ1kp6KGChwrGN" +
- "IdiidKkg6IolNojcrO0BeJ7r7kxA8TUb1OsJ0DwXlDQCiVkWTKjwgEQoLqhDMXRo" +
- "Qo9pGorE3XPYHlVcm/Fl0ZUNWuXAbPgxVowsObJtykwDZmd3Rs9kF7ovtgP9gQ+4" +
- "ImoCUYDVbTqWeNIfHhQ3fcGSykKPKGvzG0gw0ZETg97odgi+CtWJvpYu2qwoTAIs" +
- "E9R6CGlAcEl9tTTwETIhk6KNV2KAPhQLimtCFryG/Hiw3nYgO3u3TfEJHQuFVBHi" +
- "QGsiLqgzs4bdm1MO8CUwBqvDVp0jQlTrbg64FHW97NcVIgioHQCAjzim4h2byc6c" +
- "ANEWA7Wm3xWoYIRbEHeZqnzzDMAxmjmtCjoyJRko4E6qJSoabUiR5UHY4rwkhjGi" +
- "57nGCJQGyYa6EIE1ZkbQuFKKxvM0KGlAUTD2PCxzTTr3sa2oAwP2Ie5M1JRb4eh8" +
- "NazCTDn7w1nJjXI8EDCKsUADgQVYSIv0oS9b+UA6gPIs1SOiIhCIbAeri0sZgp2q" +
- "Cjt1qVoBinB93WUFd3i+GNTr0BMoqCtDIo66aNKIkZtiCtBFYTxRAkbRGHW4E2Qa" +
- "wGELRMBSlDORfaNHjJo8HetTIRdgB0R/fXAbO2dWJb6DfUEsipYiw5A0GnF8Ezhv" +
- "GlTxeCaEA4SjJdyifLMm9GUIqQiABhBNrSrnBJZwcLnsUPG8AVmRARIaJRIAl2Aq" +
- "vN8GsE1zgnAAG4OQm/dxkQHKoewTW3RsFeU7RIFDvSeKq6tmLIwK8gvYW2oipkRT" +
- "wRjRc2uNOhMZYE5yw8o4PRldld0CRW1Do6zyeWGLAfbpCqPTGDSqcoJXE1eKBT20" +
- "VES/Gir1g0EQCpg7m5ZtoK5GATGOZsXKcwCUdiYw78huOate6CDObwFxCKBgXHBB" +
- "V6vNFaO1koc5AG7nTRtcl9SatzUT+2esG3qOOQchoqjI0MZiYEGiTyVZp67hPaez" +
- "0Y0m6xKBzy6R5ZAO9vJiMqshjhrIky5HVSaeZ5qEyNVLWOJtWG+4jGMGDZuXubu+" +
- "1BVxAySGWyePnaGc7uXgXUFUo7J3BHWdzfN0ndx97DRHhMuD3FIbtcmDu9FIUiHM" +
- "wvJzV1rl7V3DAElvIjuzuAN5aVFegjAg8oRCh3gtOg4EUlSNQ+g+YCsNL0DFoWiB" +
- "8GhSYOOE2b5zZHnFEUAwcmIWCMHBxMSoJhWMWrtE4EJmAmGLhxoTvSHCijrgpjFw" +
- "YaJ00WnSJr+RmC5jFqtEbUiI3kQFaXgg7vKLYF/fBgwaV+EnRk9XQKQPOgkBdnA8" +
- "kKDUtNQ28kWcA2LCiCujWK5nSsg+u2au4siUCIIuFgTFpAqiDAnZW7L63Tx5sg/t" +
- "IR5eMo5HINaaOXDMrHyG8ytg+NvLtlHBkBo9kRnrKYt8/qyVqWjj5VEqVy3GpUqV" +
- "hixKBqJGzkfhHgoFl/X1yrlEscB5vLEAKPAYyGQRirBKEZm6RZfA9cJGIMRHO5ca" +
- "CEW/DnIynaC2XohJQkB3yhFrMFq3qxHJ4+QOtEUb2wG1dJBDDTr2sZrvJ4RcRMbT" +
- "qH2Jdooaxt0NjDiScucKju2YzYaBBzvUkkz7Rs5QxX2gwjkdYD4UtQubOAigAFmX" +
- "wNXZ4di59KNNkgtapzDO5Ze1RNDg3lGlzmLiBgSsl48e7xxrPEEVA8DigDOnCoWC" +
- "NyRTfSavpnxLQ91Rqpqq7DJKoyD2FuCLkgrmASASJuqhEdivR0jzeV9CZNSuy7ox" +
- "U34bo3ZBM43NBAmhDigDK71FQEKZjWNaenQQjAhUwtFmR3diUG9KvqSEILrtcrnK" +
- "JYMYsRyZAMUMhxGC3SmHeUddC8aQDaajNAGHbXfMJnKQ3Io5u809jIeOAiCmGwEc" +
- "SGxFf2Mh3Ck7Q8NmAQs8MQPGwLfoDFgfOCTl3U4o3sLxM3kkQktElpUOIQi8KGes" +
- "JJoQV1lFdBdVKBU8i65cXjg3ziOG1RVyGUA5EA1Bz2PdlZvXiVd3sCFzpi7ZkuuA" +
- "okzCH5e60sadzfeQCtFe9t3jHrFGwPRHJzHlWiIzEmgstR6IY+MDjh98XwynDQJ9" +
- "BcV2odeecqlvFnFC/t9u3NHjnIqGa7bYikVnM+yf5vO/or7fvUJSIr379aG/2n64" +
- "/p2BO0/o9sxrOt3vIpd9x5yvc+etFPveVHuePsUB3DIaidl4CxRx010k46whEN0I" +
- "g9O0ug506JYDlFzQbuZEuMBAWvO6IBV8LQl756E4B76UHCsGLzEOHBSd+XvXk9WI" +
- "YMbfg56ndwHELY0vRDPXRQ99d6bL5OdJIUUzbJDqWMfi11tQANmXKblIsgFamLRx" +
- "GwxzOeJQdSQi75cWKugYgDTZ3sYwfDRyoBTFJzhNZdKia3kOBcotQFEQCbS2nCSC" +
- "TtEiEuncq5ywL4jCuAjum3CYQzZnvAElVp2RRCOSGjCgOCgk5JdEY3YqtbGzSJKS" +
- "UdKYzo16eoPENGLo0phETPJZ6OIkAK9m+kPCOQTXKwGmFeO3Qo9mYJjmt47wpZ4n" +
- "OUCpkBXxs5+EADfPu0KwMIEgyIE6Rn15vJ9n2j32MTvEFNRG+O5FKG2lrAqyh+Tf" +
- "Rzh4eWFJaDwsQTEaSEdaoYgZ1LlWfjUAeC8q2dWnJ0LQ8IrFg6vYcrdprGOfYLx4" +
- "1uAB00NBrexzAOhxEV0hJgfdnNpAR2yetGXXTyUK7POeMFSwUcyK0k54TYZ3BFZc" +
- "82vsHiaF0rspFEpTTqjrGMohOJwo131kTcrGNoxl7VJWqRTYNtAAJC7V+xyyGxzg" +
- "D6IYN9WtIiQNBELyUK0RY7CBDsyDhV4eNdSOX7wMOkXgGQkRysCNmAEPpdYUaOma" +
- "XGtvRVaKBTpnHMGXsHRzNvcHtrkV4qMS3LQYC7AFDRgeIQXw4+CQaigKJZLolFEe" +
- "ynETG9VkDEWb3PCLQWZvtb1uyQ9OCb2ljqdYeYVQUVrlhSmZCCLoCzeq3qihdKlC" +
- "FCVu9GdtanaDaeoee8Gh0XfV746AG0mFR3grOkNaEV4oAxcwugi+5mLavDgNyeab" +
- "aPNUAdaRx6GueEE8UgBraaEPEBA90Hd0IoiYKzzLeyC+QP86S24oNGgPN7VEZLkc" +
- "3KKB9yaO3suM7dsqIyXBAyaPJIVawzuyNy8Uis1TN6MwDW+Sc8Jp63uyww2NEo+W" +
- "pXWbpGdzmc2qkqcY5CJNMqipmJnZ7lPXMBYk5A0CO8LEGgRCLCyFEGqDni6GFwh4" +
- "ISrK96I0lzDiiuVYcpktYea5V0fSBQQ4HLSCYxVJEIpIEG1ivgPWGQ9zRCT5pzks" +
- "lUdNyhMqyFLVbXZ+dbaAL5MolnGQ0f2Y0lbErTW9N9zvnf1PL7QhIQj5Qqg9+9Ze" +
- "cP2k9FIfAnPPeCQEemCDu+PpovnNLGt2xn12fm+7k++eYUe5zI3I85qKYoJjmjnl" +
- "nmGtQxhZ8OrjWLs29chu705lyXsj00pO0r01isVaNX6Hs8cRtAzPRBUpl8Xo2aUU" +
- "RMFSH1bMAjgAzlpfCL5AHePjDzgQW5sEzApAHGDajlxaEJMRENKpBhNAm92ON0Jo" +
- "cKOslyv1CmpWvaQTDp2e7sgwMWOxFETVedrRILOecthi4+kHbXO7UCGYShLGHMPL" +
- "BFyJnklnbddyTMMgm68FBsVzHACN16/QBHAADr0hyZ57ivEsZjdscOB4MukOoq75" +
- "3Sm6oznxvBWSoYDs0mM85hVF3AUJAQhIC+IAnAQ0nYeBojTtDDu9fb2ZgfOvvEtI" +
- "Ir4U3SSAbviqYgJSp4BnTGwbatDG9A3mGF9hEO+hcZwvmsmKw4IUUYSm04b969eJ" +
- "yhd9UFNe3iSa87znSZ8uMCA9unXVOthwgCtrI694ULz3RAeRPJ0dGGH4cQq8+E1k" +
- "N2XKOIV8b7t0k3pInQ2SYhUaCSxLkRMIbumyj4sTVz8/OCjnFqV6iuYCrEQETZhg" +
- "aTaO1M91eVU+0dN5lIKE0hY+6ZhdH8xPatSu9IGjiSBRxdlYhnVgx3DM3OmAAPUh" +
- "oivOGZEA50UKDKlBGKmuKZHM7ZnaIrey9kZzbWmTBux5hLriaXv3sCjh3RSQN2Km" +
- "seQirWUXffY2PUwR4ix73JkV2Xnrhe5wc7ATvBMNCGsQ9s1jt3XLtQAW0gIAsK7i" +
- "GYMN4XZoBFGRARR6qCjNIi9RgC+TuutUGw5urUrW9IBs3WmZh5j0JAQtReBHKKCw" +
- "Ao1BYPjdMlMyTuA3z3s5HrzxCD7DNUpI9NKK1QCbU3u6DYiKaA7sOUSYFvgSL2GV" +
- "56raInCNge3z1vokDQ4oBA7DVZChDpWQ6HOcrY+5Qi5tmkDUUFPEQNwVKiIBqChg" +
- "igm4JIiXEAJEBKiKBIihiUjIdguH3TxtEV8CLnCZZJXuZrns5yGzNcQqb5nRD8Kf" +
- "Ejj1uLimHfFsXzlUZzvk7zxYPeGzkRdgYzYoe7Nc34mq1NfS0+Tpc572vBToIi+h" +
- "NC8Ksk0wShGEgp3jOt0s2159erxfPx1eTb02DQXSuDB5AkTVTpTmMjNgcOdrKEzr" +
- "tc4aYgDJqgdKhmhE3HZulPmAHB7632oFlcTlmCvKgosDR7ft7TOgZfTYJwR7AXuW" +
- "/S8+gIFeKNjkv3u7oLzAyBFiIY4bJOh4OuYdqgOIWvESJAdRUwkRH0TBzeSHfdN6" +
- "Bz4E9oSSCWPhUXvDkFmbZ2uSLokHIEKenMqeTFXgg3poKBEk9zF2SbQhJap4uGJJ" +
- "FC6V1rXoCFhRw7YcnMjkezOEULe98ME6Ds0IYzERWbF33DHNcyL7qBnaeKKU8Wx9" +
- "AYMaYwHMmO44OFPK1nebx24PdpQEPFOIOCGGRgnfbPFFecB7CSMybA7NNoCJdWkq" +
- "A6uxgQHTSlzjN02jfYhsKEJKfK3grm8IX6/ZCr04RBTyJ2sbuCdybNeEICJ26MbJ" +
- "jeDS6wgqPaR9ormfdmFDLWdBF0bbY2212EiKqJfXchQkdNNXrLktUifqXfCq84+8" +
- "Z6VhYN5i5hktLGeDvDyUvWWAs27y4SHHMOtg0Rag4RHHJZJzJpVzqEypuBMu2xKI" +
- "MQEgIgDMNB440aFxBiGgVIhdjaNkyK8RRKsepNlmwLGE3pI5dmBEqgxMdV0KaHO8" +
- "HhyQ2xG2KGDGNoGzBt7biE+kQ6Bod7WXByC2xtI4zTaLsEoGd3XlmZdylWF1alnb" +
- "M69mJMgnkxqru4Oogy+Ri7zgqVzMxct3GGZgXGSdkzJjhyAuE2PZ723DJwTyMnjh" +
- "l3tHY5VDpUieCoJmSC8uhRWOsIvHrs3IcXRWXW5dAv7/778fUJpA9gUVtiDse9fX" +
- "eLqjFjg9tC9YHmeTlFWicKAUpOimCqgEtGlSNGcpe3u66YHC5aNSJLww2kUhcBCo" +
- "sQJBzkAYmK7l1EZTiK2JEzDnWILQWZzI5NHO5yHsQScKeLA3Y1UxANcWcBcAXTZC" +
- "nG3WEshvETCEE/bPauJ2LcYYpkGUUtAj4AMoK/tv6dyS4In1VQtIbiS0kHqwagwE" +
- "s2PM5itnuLiqWW680Rhkknpn2RxZA/NquFxL9qJ+MWTj/aqbZM1Eg28nmVVm5HKs" +
- "lPLjlU2yZl+lLy2b+bKSNUYSElldBP7yb+gMMPeIR9GJowRgkgRoYVdqHQlwIDLQ" +
- "aiI6H1XmnDYFAee304yulhRgMIl8rODvjPsYDh4FRB4lS0XTd85zYMBdO9uA1XQj" +
- "EQiIrzFbmDjy+83gvNdxScSEU2bnSmgAjjhZ0eHKQtVyg3vI5fSCEKUQLGWCcN64" +
- "SoBE1gka0aWw7IlYUoJeMdqQ5ytWEITjsqzKm8ZQESwE6E2CN4IIUSEnUYdM0vGl" +
- "bHppfLXOIXBTSfWIgFSl6IChy+B0e4/JZIPYtHBc8xqqNyEaYZAWKNvfjpvJ6pXN" +
- "iRCGxlbePrTJreU3HXYA2d8CBSRKa51BpHeF0vGi5yH3vMvA8hjcyHuijgTurUuj" +
- "QcspGgZqbDJsCwLljxYqwh0UedgzggA1oQPI1qSzDKyyTLBusjazKdKbN8Mpiiht" +
- "tahHCFFJFECD5lOaLBoYNnSA5Vo0uVRGun3s3jbMCD8MAOHpiyBtrvGjhr1I4Kam" +
- "hC90hDDgrxsCgbMgmSDrjyPJSVi0W46roi+Blde3oaM85BCOMlkvxXOBKzLEV9tx" +
- "jdKcCx5V102vHRvAEBovGic6QBeiErtETJWKgpIgxvYmMdZt+YQ8c1CsakICg2WZ" +
- "YJ1wKg5NIYcsHI7TKYIG9UiK5Dh3nMiYQyjsFTApEA2cmsjhUIqrYHeoS28gi1UT" +
- "O+eZXGRAHUG1Gwk33qXWInhbyo5dSTqBDuQtgRSK2UpGW9OB04oooTkj1I1XpEzE" +
- "sEzSF8gCdoVyiYDkYCLfSn0SyX2hCQQsiaxSyGKpCEVn+T+7ACroi7X8aJopBWVZ" +
- "ZWHIQaTx4SNUeLDFSxevebd+cHKoaR+Uldj4hZiyxAxiEJPs55pQEVzsqkE5E3EK" +
- "C8Zrl12Z6ZyL3XJIIiYtC1Axc5KDSj612cHXeoDiFrcpuKKB6LCLGCsgEWAcjIYi" +
- "7hqF7Haj4908uyiAKrcawQQ5bsgLte4FvgR3kPuHtlEgneUBi6RqG4DiDmJiBIgS" +
- "VKzW6RQTsDZDRB7vFB/Npbn3thjxnOfz03l8o4iPr5vcTXayIrevu4elRUVaMYKB" +
- "TVWh4hpU3OBfMUdpqaMvN5RfQRHEA5SRsCqgNvSaSWAjxg2Sce8tmpLwQTzaEJKY" +
- "a7vw4DMq4BBwDCYqTySZ5Y4qUEBqrTyjRBdDSeJIR3x93G24dW0Fsfb52b53LqcB" +
- "LxkrVu+jOgAOVeWKSAPYajZnWDo8DQrwVXMRLreCHM8HdKQ7MnILkIj3MoONh0TW" +
- "CXGY8bOCBgAXDflHcvJbxkD4icpcbMiA0ObDPeZMm9qh4TsxeYSrNdsERNogpnNA" +
- "iWcLBMk3AFNaaFs84CFDeDFXxodhl7a9MyVyMFFD0AIGiNGCvoSCLqpw0errcmtJ" +
- "ZMaVMLAkEC6A0HNHB9bcXzSDliqUfebISAiIRkyhvuGM41wC0GZ9e14N0k1dvH2j" +
- "IIzL0HDgOgo2Teq2QOrLViXLanCQRVQkcYimjkTcFagkgFwMQzjIhkESKoRYDARO" +
- "OUM3MEMWezt6GgSuFhS2HQXOveJgcUGzsH1FZhnVaE8D1kRDjrF+riAwE0VbuVvu" +
- "Wx0Vo0Ivo3snYbRflxgcfJwR3m0ICx85dsSDvT3cZ29Q4CWGBQLggyCKEiARitqr" +
- "sNm0fTrW3Krxa102dakYpVhqwhVCrC2SGOlkRk1UlqBaSVYVJYN7ERi1FAbW+G3z" +
- "51re5VjVbm5W5UlbmrUmM9t/6/T6vv9Po7vhq+xJDxqrZJCSN4A9ebXxyczXxmoN" +
- "33VoVPS3BLDLLHbi5spPNZK0uCZvZgZzc23MBvtLdad1ruTZJGVJwaelJw113fR8" +
- "rnExqR0PrSFjAyjjVUETBCGwkwwK3s287kNjE+yu0Hbm242i5VRLlk0STTSgxaFK" +
- "RQ77zTcyWsiGy8yIrLiHHJjtG1A2Yw3W9UlzdFd2HcNCqkQgyani4Bu3NroVFnYL" +
- "2HzDRFdvTmig2HcOnFxATrA0TnGma3YZz0ymbsQAYJGBFbqwZSEku3x21FBfCArF" +
- "0wi6MyRrQQhzxXZCortLApgcocDruDxkuASSjkkCRHHVa1oVlDu7SymYTanF4+3W" +
- "eROwxPvSBh9NNJ8ik1JAnwJivP2b/k6eXnnoQc+e3REtcmUhKCgg9oIgj3cO94cZ" +
- "1/yZZPYXmLsEVzL9wyayYqdoLf7u7cMaiHlnOXVcjK1tFvlVLZVUn6CtS/Dc2MGy" +
- "jQgfhC2Kdjr3P4oF82DpTA7dJI8fmoIQcC1skeRzKgLQfdKJKWsxDeDRAOkVD1Uj" +
- "6REe5pkkFtcBVDyBmsYcJiDPKL4QYIAKg3pFBYsEheQysfqhKb7Z5Wjm10jpNiZp" +
- "B5IyQBQMUV05k5WF025JblIlxOjYPTSQS14ht99a4g4RAIMEXBQ9VYdUOnAHboCb" +
- "AM8xBqUidwUIqCaNuDndlLcheCQRzyDZsza6jpcC8J5t93uI52DOCUmxyBWG6xjU" +
- "DfvcQN2R3loD2RQpUCyjb0Nnj8jM44gOI4HkYOhJNFBUaBwiiugHBtgmVWWcPJ2v" +
- "AGlYg8pB1knDeEQyYzoFW+nZieSuAOXHdpQnYHIIvsnV62gW62oGOQSq0ZHQmkz6" +
- "ve09eR6+As6PaDEAPBAjCRxHiizSKSWE3lI8fDOCDmGnmVpNbi8eUVoBcnjVYXJH" +
- "Wy5Y+Ig8gsiDUDTA6xDbTXjDHGKyNg20+8AoKRpUzjVgeIneyymHNIhlOlRveBNb" +
- "AyNu+YZy5q7JQKKSSPDgYkgOZ54N9vTDVhqc6UhuwvCADsV5z0KRpEITXj4+mgml" +
- "oIZg4a71Zlm7m0gkdp4U3zAnK2iHrqjsxi8S8sDdGDo9ucdGhjq81Jfa1MiJSKcB" +
- "A701FV6aw8Hp7V9EURNiZNADwG3dhrhp2xsMQdoNaPWpg17FE8O8dR1VHRzpUzs4" +
- "oW8uITBTDYPLynlwZDIItG+CIpXe2AKuCI7Qs1rnC94AEyGbMuhIPF1HgmbONCmS" +
- "5k7bSMjXhXQp1OCjmkAGTvLOmI0HOAt3YzBQRFgqFp2bepbOC2EIwJLOpBSCVEHI" +
- "kdNxHOkAQs0VIpgJl4XMHMjEgid0t3FO8MJhYYXY8sERIghdxq3vQKeC72BkdCeG" +
- "xRxAiGkDGK5LYsCK3AWW+AM5VQaWqrkJ3NiK8HR0Oyaird7M0013PrNY4oA67ZPe" +
- "zuDTrV0oZMsRpR7ZipzQ1jzg4Ut53oN2DS2qHRF3Qms17VFoJ5zQGLHnTQ1WhcBQ" +
- "uEUTQhQjEQUHI85hT5R2UYC3twsue/zOINAzYK9Mg24cwzR4rXfuB43f5g0wg+ma" +
- "n54RRErdutOia0EPZPBoCriZ3WIjYiAiY9ycBy8PvV0fdNCtr1kSkUTFpWjZQ33A" +
- "Gh0a7ep6g4nkWoASDIDjZq/BgHfve9jgEEhzWCeQR7Hli6A20uwCorkhnm7lK6hw" +
- "1GyiXCVzPlIK80MpCjwRAoagLZOVxmZA+eBSGhCIL9tBXabrpw47c5zKNaAKO4sL" +
- "7KvUaVGgeYA4XSjsTXG+b3fBFtoGLhoKvIHohI5zzHSwDMUyPCJ8Zjolsa6FJ1An" +
- "5EizYQKcpor6HHhk6GdulzXbHMekayul6RlzuOIXQHGhtCOsOrdgh5yBUI4QD6cJ" +
- "CNmU1QYJoXJADgxaZvbMMEEkHSPshs7OGaJOF613Nd0CBj2PIi+PXV5W90bvAECz" +
- "SV7CKiJiGUeZErQbfUGQNmjhny5vomzEBFviHjwiiJ0o1E52tFzGaXbdCZ4hwwYE" +
- "QPQQkQZFRB5oqVQlVfs5E1NSQq6LJmIhqJUJBkSTmKRwxxBG4hmGYgYhOlbgcIM3" +
- "Qhnd3c1BbjEYvIhbZzEQRGBE2cgI5W4RhHpgCsRsjcdWFMN0olQDA5nd4AckRPbG" +
- "2+i25y8WqkxW8Wupq+jB2ymQckBbjqGGJ2AtMuBuG4BrSNp5MsuWwgXbcCXcIAxo" +
- "J5BTSW05do8jzcwVXNZNxgxuimapGRGRMeE3YqpoRFQVEB1gVMQgYxo7G7bmRDES" +
- "u71hcZac1QBCRIHe0LZAbAbHxDwuLIhFlGQ311uRlODv9YkCQRH+Eh/r6Q/7bT83" +
- "9x/Fr+4/N+xjJ/ef+if6dubx/+uT/af5yl/qO7x5v6rVWuWZlZjM5eZ/VustitjY" +
- "3HC0dHExsx/qOenTOnMdJLi6X+gqTDD7MX/BpCpmFwf/C6fg79fommh7CkD5icKI" +
- "rVSTX/Uh8fGFGKs+lPgrQH+bz8pu235HwdPyPCs0aP60bPSYwmirZ/oP34xfQ1wP" +
- "pnDAX5KPS23/G6nZ/TKCJiCNS5oIRTN0GCKEmhG9kYgIrr/UH+fx/tEuBL+6UPJP" +
- "b3bTrJphJ0Vu8PmOnIeyvm4J8dKtpVV7Nxk1Ldm7r2f9z6VbD/lVr/jIa0/ZP2/6" +
- "fsPJ4euM7/l/w/Hbe2qPmk4Gye8+XFXSsxt8HE/hOObeMcPpNPb7slXdTm6OZ/v/" +
- "5dVzU58rFtJ4e3yv9l6buQsjiD1R2Np9hTyeTt6+038W47SRy6PY06E+P3JOgWaQ" +
- "hHAkkR/Xh/2ncXif2afyf4Svf5NvY3/UP3JXCqfaxkZRL/J3CPDzFxNGAzKcQTnd" +
- "cHPayzzbvLxDd1UnVvMbTw9BywcPDfsc2zm/nyMfDmf932T7p87KrxgyeFftQ+tf" +
- "Cfh7HZyeE2aj8Ld3bXw43xb83/u3I6WSftIeD/xbZE/8bwT5H1OjB9vDc2fr8Q+u" +
- "397X9Gf+PSdnVOzpP8PP+c7z52c3SP5Gtkn9kn/w7H1cp+5o+HrPZPv7uTykTn4t" +
- "qMW5ktlnN5X7r3/GJDMMmGVMJN7siu/yfnqffmvSXMu6ft6bOJlTaKqp/L3k/g2n" +
- "c/7fv5SH4e7wSNdHTnGSe7brKd9m2+rfs+75c1sWpbaXqOkkpTo6LvZVDoKaaPJd" +
- "rf6/wabfy//P+Ses/dNe1Wv4P05eaf0Xg/vluP7Okm/5eu4+LJMnvJ6vyfdiuNK0" +
- "Wbn2ZOW7k/O5dVV1S0twqcn6SMKzp/2y3c5D8U7EssiWcxtqybtlfi2p2J1xcn7G" +
- "nI/NwcrP+tfj8/scv7QZ8v3tjkfXsw7Hk28PhyNkcPY3e7To4dLZXs52SnOcp+0v" +
- "BzIaa0rMZV/r4j+X7dHd5OqeK/l2Ng6ZCf3R4MsiMaozClqv621/Cfwfp/G2c4GO" +
- "dLV9XSfLMq1YzWaxrDFXxLOJ3YfCa+Wpzeb8XWTm+JzP+IICf93/kNaqLaNrWSqi" +
- "ttajRqjbapmqtpS2qxVk1bUlWpNqLRWpZqtJNKo1U0ttRsy20zVJqrG2wBY1sVoL" +
- "FUWJs1ikLFTK0am2RVFYUrYNFpNtTCoNYjWpaFbG0TKLTDY1RrJSWwCVU1K0mkrG" +
- "yUpUbZDVikMW0bZkYotZMmZGLRsY0KIViLGjRsUWxtRUzFiTQaisJEzIaWTNYIjU" +
- "RhTZsyUWxsUUlY2oyRsm1G1k1MhLM2Q2gWRRMpDGE0zA0ktFBaZGyBETCCMgSEaj" +
- "EWjaJKU2NqZFooxiokSIyMMUIWEaiMhQoIiiqQmIYEkRhFpEhYqSGCLFCKEMEEGT" +
- "9mvzf2fuM6SFZC4Qd9fugRia8BBCIvlh/UPmUoYBieRgSMiPA/zM5kG80OwWXxVB" +
- "kDKCgX+vVRm/7UQIDInnOZ/vuDq/4D8+p51Kq1Jw/kWTzvI4d9a7SyLfWstuvCsR" +
- "8vO+Ve9WpNJv7s7+fuL8JV+dboUuDPzER7chJZ58smGb6bfHJ+/wytuIdr6d7a47" +
- "bq+tvU9ubKTxSujpWpbkOGArKSYHFiSSfHgG2RPcG5lSlkRGbrdlTVFVeA1pC41W" +
- "V8XE0QYWbMrorO7DWTBoBRpgyaqKdSFItuzQ+QpmRRpSUkgkAkgVhutQk5vCYVVC" +
- "2pCBtTYcnZA1HRmQ5KEKUJCjE441UykKrp04rW12EaksMjEqCmiOKKAiIoVAjHHG" +
- "4Oy2vMLFphr2skmltbAj2yHto+/C1qRSHQI0oYJy4xPAK0hBhkBkzKGIDKfqR5fu" +
- "9Rb6jriPwFfrT57/BORRUS2uxaWe/23vw/VDRJUNDKbcoql9hR1STaoUKFJAhAE0" +
- "AZZLjCTR5qxIgYLhyUQktqwQ0LakMUoDZaYvf1dL7/UTZGZSt/h0bF8bOrkShINm" +
- "UC5JVQoULQdWFmExZOwxx6b/nrJEIzcATXe9RX4uAjQuZbT7+8dvCcTe970nE51j" +
- "cmac2WktrRIBr8KKqmFiShChQWsTPnID4M0CSyZe7rltE0/bIvrM+YcPthAH85JJ" +
- "219mY5mjPQZhiZDYZA1DzBlAjUcjXvLL8BABMGVQh/A/vPwUfqX/5kl6UGGJn8FC" +
- "P2GG+QceVRTNvxzts75paBK7NzM7TzVVUzlIqqif8NJKRImR08cg2cHrQWxKYcNh" +
- "OjnHzz+YPyaL9PWNrPR37fFaHr23fpcy+YYGWlsuQf4q7bXFjzjZ66t5DEnZsqLU" +
- "ixYlKiy0ibZsjalZamaizKs1laSpmk2ratltZbWSta0bazUrFJs0ttalazaQUhKg" +
- "lSUAqyQoWSKtotVYtSmoyW220arUsoo1tpLaNtMsmtaaYsVTbS2UtJgram22rCkS" +
- "qQSxISyQS0FSSyM1KaS2laa0lhNFGhYWigRULZFiyykqoCxFBKRFSItCrIUWLKak" +
- "ppY2WbY2tps1pm2ymqbabbLNiZojaZkrFMKZrKzaWVptZtppijZNM2SzKmmxsRab" +
- "LZs2K1NVqWqEzMlJtmqVRjVNZWllSVLM0LNNZpalZokSlltLasJRUqopUpZIElIE" +
- "lkqrYjVi0aSNqWmLKpslJtFRBbSbbMy1KoplRspaNlNUrNUaaak2mpVFTZVGxk2a" +
- "GTSWmzaCpKbNJW2WqWqKMmNk1GkKUtk2ysrLNs2WwyrMqKpqZmmmKxtmqayKZlUk" +
- "qNltKlRSm2StUtbLWxTNUqlspo1ZtltNKRIqGm0tlRtNmmalNGZYybMozNNKkxpI" +
- "2i2ULJqUrGyyxJslNGpZmtNSsrNWZY222yttmrVNTbWZZMms2lllbKstpmrNMUmp" +
- "KqUtptKyaplKbRSbJbLNplZtqM1KKbabU1ZSUAmUaxpZjUkhUmyZmxbRSltNsrMq" +
- "qVbNtslSptEzVrMqaazNpmkqZsxExpJSk1itlWqay1KppYopMUkkkmbLNlMymsxS" +
- "0TKlNjKbA1TLLLU0lTWalTNMilKmys2ZY2mqViUVKSyksmapVNqSJRqxZSyylMlS" +
- "yLFSWRUliWKLJPR487tzxPbvpf6y887/zT6h9UmfSx2PLPXLE2t67TNb+d8616jt" +
- "tPkeNmjOnd2bULjnN/5x19I3dES+7KaAHB8sg9OaIHogcFmowcPkd56v4UKiqJhg" +
- "oAU9AHxYiJSboAuO2tYkauzYowUsXVGVlc0nYOpihEKtGCELstXcQR40ZwxcKms+" +
- "7pFjCoGnlWDFSsNDI2M37zbDfLv3avdlnZZ+BC52UzTjZKLth+XpejoaOcVlvLIp" +
- "Bt0bICZGx12W3MemDI+BEABpXP87P4rJiq/on3ucmKl3H2qkVoDOXeBVIHThRlRW" +
- "oIeneSsFb5P81QBgJOLBARAX3nH8/r/f8w3ilqIGYIs2ETpWjUrVBz3ap+abPKWH" +
- "pLM3ltPx/+N/Wbt1NbzHN6yn49NkVXLjHsi0YsxWYxt0mpP5liJ0D/BK861JPxVJ" +
- "KrrKd1DEsjkf2fd+E1sqc+0G02nKaZP3/wWYV/JKhVSKU/9f2kP+Es6z7k/gUksW" +
- "JYe1an/921pBsrUdXyfSH+6h3N4k/jE5ItS1VTkajSXnZgf5UtgpKk2jaxZibyd4" +
- "83LeR6x6+RPw/T0lWWVLOy4k54wllqVWtTTUvHd5G6VXZwcLVpZCyOySqT/VUqI2" +
- "a3OjB+BJ/c5vJ17xaYezrA2WTu8JipWJ34en5WSThOGGFkqslgxWw1Riyit2TjUk" +
- "4m2SJs+3WFSYNQcR9lN+j4j1noP93VyHCfI7cNMSZzH2ZNRThulseIk/yU5KdXt9" +
- "v7zmbk+gjtO690cSQSoFfmmeBxfI+vqGsirzNH5C+xTw2WGGHE0X+u176U0uLoPT" +
- "OEn+qsbDvaA4s+lX8EqpJzPrH0sloeXR1c9OiqmXer0zgSe5ZrT6ScTDZPxHCbPN" +
- "0R5uo6u07SaTyP+1LS2qfontI4sTqU/nOnq3gQE3PlZlmWZRJYUsqyJ2P6PJ+L5/" +
- "D8Jssqnh8+u+2ca0nxwRAJ32knCcvhmYySY8DlHwPRZOyxVSqrmc5yn+vVN35FkO" +
- "yvNZM/ORPMmjIkxNtLVRf1qQ3ksieqJL38h25PbeROj0cV6GFHWIPN2qxXorv7Oc" +
- "ifauTZXzYwjFM+LPNWr/a58p5xuD9uXn6b8HdXj7TiR9vZIw7HVkmGI8569eqqvk" +
- "P0vhi5cxU9euWvzV52lG6lLCSmYWK8coeiN0jxImMiT1bT9FffylTz7SRs5vwq1O" +
- "E1BPxdk4PSI/RJu9WoSzsTH6v0nJ8nrzi+ITko3SqSvxOJ2nukqKkpNLHec/hfS3" +
- "JEnzWJ39PoktklpWMyyPh/0Tc9E9Kdo5IemeY1NR+smI8T/dPNYrc5nXv9t9sHUa" +
- "mQsqCq1PemmmTVTeR5UqqSopSlKWFOYaL87JVmxycMd8wy5fM2Yw/RXl8vbb5SVb" +
- "u3zORyjjG3DhlMKM111l6sSk+BAMLpSjqdn8I5U+moXwXX5p0Z+Ev8Zh48/wLRnq" +
- "sVOvKupu7tEKFfaNwYH8/Ci1xHTYAbREOEoEoBMbtSSnI7QnHvPpNvIrSaUlVwno" +
- "cA2T6JPxOc9Hjj805OqKqKTKMtvz7PuSa/Ze7Y4TXj0keaMVJIBO6TUtNbu22/rK" +
- "Ik20pV+zX62sR+LTYvA/nP8S/x/z/y/t/m/n/s/ozh/TTT0zNN8l832eeZrP1ft7" +
- "l855ZP0+7P2fht+Mct5xlvGpyPw3YySSq45XU1bSyrab5ycrjjicbfT6o/FPun2h" +
- "kqLVQZw1OrdGyq/AmFG8iUYmGjHDOy2YstLLBnKVZJvoZpv/dskjgWfX0jmmn+XT" +
- "9EpEKhcAUlB/eYz+SbNu4qNSSEC7hItGyfhotsOAf9SwdHA8hOJqR/DyaGA0EVqI" +
- "SKD6AWMbIK+iFwiWZNpCAwgFlSy1TRu/m2NnOmMXFK6UuExRVkRZMoar/6uXRP9P" +
- "7ZP87LZwYx0FWaYU5vlVTqmnh1eev7szJOiq4leaII1cL9t51vM2+LzXlfVqKWyp" +
- "WvCVPQwScjU2St+kOba054lwkpIqTJm2mrtWuoYNioqjXh9ZCcg4fauRyifOQnf6" +
- "SGRSfxqdVrKlWU2qUzZplGsprUmLRsRajVG1FqI0mwhqNsVY0VqNYxgASIkzAhPb" +
- "KKjCrJLVvcYYOJOH+vt9D6MOVhCbzFWO4yRsEfXvzBp0P+0m6q/l61TUNMPwDbP4" +
- "A4ZborpXA29kUhELXpos8r3drnud3G50Si5VJtefj+9ZVvVRlXCz1Xg6KThMk4mm" +
- "/BxViVUbKrUw0nSUxVm8OjGchs/DpN495AGe5+K5OvXzvbUNNMVStZlSc5ucwd3W" +
- "l4u1dm3WlJobdG41bAbKyodIBU0lRgRgW0aw1kwVrIutSyFWNio1Fc3UKqqpRju5" +
- "Aadp5fl5udRTjI1JPdwpAh5+pEn8lE/gwPC4SP7yQ/wfmhzK6WLcLLBfzaejXg5N" +
- "ROtJbDGTLY1NWSMQ3kPP8tNlbsFLO0khJHEnOD8iIBLHY5E5Vaioqq6mHOzViRnO" +
- "TJDV5noj3lYCpbB/UKCPiSPRFBjGEsHZXWOmMUqqoqjVmVmoGFKNXF5UqRqditja" +
- "VqjRtTTJJCSNK2SIBLIlcoL93JoaGmSYppju7taVJZUVshVKnwaD0EH7hMmp/h+o" +
- "Pbiejj/LCXLxi+sY57t+Gq/cILqWSklksgVasVYdKi3aLGlcq4fh/b/0JI17/hz9" +
- "I5p2kpb6oqMezcw1GWkqUylkKqYsxkpUqrKj6ahmlf3ytR/QMwpaUHB8iNiv9K/z" +
- "0K6HAP93CkfDPEO0tLILS0pZtCxDEo+smm6SnpFqPN8mB8k84m6eFkLPr2/b9vvq" +
- "30sMxTJbKbV41vETNRjrYhAm0Kmypb2ozMJGlqo0oyt7s1+ZqRGE5GDhx9HdIoQm" +
- "hH5pdOT8GMwPVn9cd2LOKocJYqpE2fJibmxMRhVjdipjJLKxv8lUwhE3F+9vM/Z+" +
- "96zDku8juRY8ZkygVpQhCSGE5vWjeiSSO8ZFx43qYwI0q4xeFMojCEBoYwhDwpBe" +
- "iHCkNkSihsIJhUNuES4aChQwWFNLDYrSqqVumBhK0xiN2qw02aBvWoQRkbNJJAkj" +
- "HBk/f0jBi0Qj3trasZSWJAABGGhpyETY2mx2GGObpTObWrb351Vt6QURN7vvOMuZ" +
- "MryvV8esvd69S9JGxrTRiEw0k5hoCqjCFy3INRaqNJwakaGEikSrNSYRWTRj019T" +
- "4CORqY4ubfHfS36+r2c6tibQpT7uqxK5TMRXftJ83l0OEKb1aVXy8jZKtwphii1E" +
- "32XPN122+997zbb3qg2rFWEspycmx5fi63iHJ04NMLBsItv9IBqEOmT9g+SGvcbp" +
- "+/hdEfGRojRGhaIFKIYxkBlxKkgcNtjbaQ3UpIqYgYoKWc8GtGtpwV4rXQ74tWyW" +
- "WrSqxFk4NRFSeaScu5yP8VExZEm6XE4chWxqNGXXVJkYnR2cdHk8WdGYy2vCmNjq" +
- "ybrMN1FOOcToskqqI6hQJYpkEaNCNn6FTLldFQjIRVoB+utwbXmdbmWEDBprGCfA" +
- "JCZRpKqRYfq2e+7Cq5cNSfueE8nT0BAAmYe3/Q5/hbbwssFCXp+OE9EkGFrg00fG" +
- "yXabHiy3EqpTo/Z9bfo+ZtPrQAuNWcI9+eSwSa/nYd7oXFadmUYi1ukq/ac5AAQE" +
- "7du1t6q7K4YbOHkbtuq8NNGMZw/VibN2MKnJyZJzVzbk8nnizzY8nI5Pu2KrwXrL" +
- "dm6nQ57aXMY8TsVyIDC5bX0WfDw+jTpp6QuEj7W1TMvq8Zyu9vdXFD+nVQXfaj5R" +
- "BRz2fkfnvWnhDIyYKVitWiZZUs64DB3WmYY2xUAXs0Cakm2Wq5otBR1e9IE4xR6I" +
- "UQ1xETvEmN8IlSLEh0Um6u2FSoE1m8LDpW1Hm4TFaGovlKmdEOVumVxam7bCipxu" +
- "T6y5i4+SRHYrzydyzSvjm0vMKixJqmXoTSKKjLRTRkxS7yrSDPFa3nQXLkJi0PGz" +
- "Ue3b6kGdih7KjMMNAjQzQTDB/OKQ8KFuO0yGQmIsJJJLKKGQAQmMosKAsZY1R0kL" +
- "PhQaaKZWN45u7TtPs7uvVu7uqsd2mxpMjs4adWm7k2YxhWGOTRjkw3YppSco2dSD" +
- "nDT6F8LNCzhHRwSHThhZCw/JCkWC0Z4GlllmHQk0JGWItJaemBYmSUfC/CzGtdOZ" +
- "glpafCCzTTeNljGYrTsbK77srM0abuHRsdXENonRVgs/PvuqzvZPJURUwfRVTFTL" +
- "HP5c+u4dT7LGDtNFEMwhcRariKthqTD1vPM95zBVA62rlBLfaioIouD1obsxmY4/" +
- "SLbB1fe/WE5wvNs4XW/dM+pCuTReSLHk06DGF0WkGUHXGlrLY4aDxn3fHt8HuzrJ" +
- "2+aMDPlI78q6bHxj5uF2TCFwbZMGRZ9YDJhIWy5Kgdxy7a9+tDiflePrabvyHDj9" +
- "YiBjKMXYZIRdTNJHAOT6taIRRhwL6k4WH8MdqdOHDZ5XET0kKmF2Bk/gCivPTwLD" +
- "D6OnV3Btj6vA6NAoRYdIDZ/GwT5X5/HRth0F6JgMp8aAo/b8aP0dVD3bWzoGD9jA" +
- "IdGjWJpqFEIwOEjh+nBfY8Pv9ThAfIA+v1W1zDh98+IKpRNs2Kmxah79W223bEUj" +
- "8FgfYebzbUyGl4S8AJvIixBOhDSmA2GYKhWeUS6ADRDvpmoClc1nZxo2BcF8lMAq" +
- "GbIksqALJKpZprIel0G/UM0/NROWO2EHdl8baxjfvVc1Dz9VKlRqHhPwoX/hRooL" +
- "hYtcLETvFJPN1IgE2b15FDZI8kftKHm25vocSMiWe502fv/5wLI7POSTnpHiVNkn" +
- "KN0f5ylSllDaC8/EnNMn8bMOXdHDBEkioNT/Kpjl5T/FSNstpVTGKjCyZJilljk0" +
- "WCJtTbKttU1vQ16RREbZJVRVnrJY8VbpfQ4jCfGExUvOtzOch1jTc+c6fhbzdJ+T" +
- "ZjocHhp7tOTg0hqFHEdpzHf3mFU3tGUGnq9aOgRXwlMPc4oqofnnzkevPke8ocXV" +
- "cWn5KA/wBIoOBRh4tKPhq0owg6MZB0JF0/BAeEjICzw6dNpJCSLZwqAGV7MVmZlz" +
- "FW3GuSbWrY1tbz6cEBX5/031t5Xq26tD0eeTKPanZz5maen48Hmfm+rh8R/tsevt" +
- "95vOVW8muQ0/dwn6qkVSPxsTydUx6UtRVtlfoqMjse8kMZUj0SSye7/KVZXR81mz" +
- "STUJXk04fITUm7Y+EeH1SIBLCfsshViYpJybG/429HOeflhiyJoizZZJqnHAaUfl" +
- "IkvOJH3SKlVJFWbJPqT6ux9pskzdwrJy6NBxBPGkSiqK9nE/6yaHtOaOIlPR5ned" +
- "BwjqrLOVGfdvOzy8zy6OTpB8JJ5O35aTvUnmpOHOTST7q5Tt4SqsKqrKU8ZMLO59" +
- "VefKuttZmLKmGsVuzxJ4xtmOsbzj7jrHOnDaObg2tvZVLY2bG06W4xJ2PRXowWn6" +
- "Q2qskgjIGgwGL/Z/7+qho/gPTXh36jmR1w9demMo4Y8k1PnrL5bLq5qtlHMrhcTx" +
- "qkjHMqVQDGMFtMg0tkKYtmljaZTJIMj9NFIipt2BtNmmpK5MDFVUUwrJvjElbUrM" +
- "i23kbNn7H7hCiP4ZebpITlFV4hhqmRLE7Z94lSPPmM6+HR5PY6k0ntVq21Nlhixw" +
- "sJ52ZHpNNQajs6c9vfpv6ZntOE9LGPhh91dhtbjq2MjZvtil0zo6r+jL2H8eLj18" +
- "yGzWRNcm9I5GokcOjGnDG7SaaFYxVOitW1Wmzf9NOstsnBXsVhrLaczNWymFZQmR" +
- "BAR4hXFLIMn8tE0KNiGlQnWdm5TOjQdS2GXGiCBhAiR3+IuNtczrWRxLegSYOFQ8" +
- "aNwQ5pS1bOmZvMuM2Titbss3zVUdd41y8iQI3cC+BYszD3iyYZAxufkk+P8nXHL9" +
- "uAF6kyiw54eRvOBZOAlO2Jkks3WNzvOHZTF8wXjOnz157FNv8IdeqWn4QqxyMzjd" +
- "ovNzuHBnGNqB8UypLJspmo/PZrnERR2PqVzauvfqDryP7Z+vQD7IISU+56T4JDTE" +
- "q+pP9KlpI+PV4dT1ixJrec504hI0p0ainusxoch3Rf1aTnA9yf8ixfufD/nGTaR+" +
- "r9Yxn56qBqi9vX5hPpZKpLI37GNPZmMfbbfbh2nCcj2D8Z5XfTA5tD/UrkhsSybh" +
- "P3xy2n8vXr3+fHF+jbhrfffrgpMdwyKsEIABftZxWHn6eRPx3H4XyvkzMnSq9ves" +
- "52gWBe8WN0R5UW63ukJQWFQ4oKhAJyCJnQEqDppQlchLgECaszI1WAe5g4MUFyh0" +
- "anCQg4mSNdSo2xtqgYJ+eC6eYyu+bd9QOSufIb1aqsFPuqFWSpbKUpWlKojFKpSj" +
- "ujZZcdbOTOI0xFWRNkIpGoH4pGFJpP3gr/zxFkAWoqElVYP4Gt/X38U271ZrEysV" +
- "o23KuyJZatOZ0Kp4TXVYhqbvrZeRB/cPmRH1kRtuErUZW4UhQwwgBj0NR/V3kMY7" +
- "EobIBcOQukBiqbEGpMmJiq+WZWm2LXZ6qn6+3RY7yG3Jww0zZ0a0T9xZo9U2SMjs" +
- "PDENqfk7N482T5PLSV+d2a1f1eexrCMfZXsuIkyj/nLJDF6pYr8eHJ6TBVV87tmm" +
- "a7bz+ky6PN897u1CATUrOcfrYT7WLUnZUkfzoytVKsFSxI3TkSuWTSN9Jpp5QZrw" +
- "J9vP1+nTbT6eldk/oc3RMOhp4yJZ4IUQxBgmiHJjtlz2GvOHReN9+iGp4Jktksd2" +
- "Fk4SV2/JatrxIFOH9wap6FtHEfVGhB1sDwiGOwtcvTAgVkF6fh/XVVVUQaOqOQog" +
- "5PKIzrA2mJiXdzzLWRbIZCyUxgbN2zVNiK1HWZJuqUsH34W6Tk5MbyVmv9jI2aSL" +
- "I2VKRQpzmQyE8pC1C1EUiox5RWwS9UwZLy63VpJNJfEm63WubJNNHJJO5+RurZhi" +
- "qlWMUlah+7hqpN26aksmYnEl+2jDzy2sWVaxhxo0sy3GKzqg4dVFnqiH/Afo6ZOB" +
- "w6/25A/kKKi+ipEIiyL9rIz61tdfOz5b9tOLlSqe0SxNVPNTFk/XTHSxksktjnfv" +
- "TFaebEYVxUzjImU3vFMtuuFx2WDCnNvkJhZJpZDkrlXW3eZtcuKZcvAedJhwsO8s" +
- "JvKWfGcuMmSVOdMuPtO5iTO25qE9ntOJ7c8nKZfwxh1UZJbaturhTFgc4VklKumu" +
- "lWXlu5AcQCTBIkaKGFUrEV2UU/n8/HpxHWKqpiLFVxDTtu0ZLFI6kEKTsGEUPGDF" +
- "OyKFmi9fCJPgqu54sCIJ6uD6eDlOsdVOSppKzATwfi2t4CPHgfLsRZAITsgfqQ3S" +
- "VryjsJs6HWRGyuXSEjvQFceInojgi66B/Jn9YGev5OSROQPgpDM311czh5pv7QH1" +
- "mjYdG88T0Y6lKoky/ahYfzsf2FLP37iw0iHVc4G1T+qGtRbbYqpbLVXmWjUYsWtd" +
- "3blc3NcosbFotRq1lJaLZLMX+yeAaVGqxZhXrnN4O7p233eKV527HTl3dF67ngUT" +
- "DIWkYklBhCDIYMo0DsbYvZpkT5KZKN0lGEqTdkzEsUySxKGyAtr23/mYGEIYA2ic" +
- "NDzgWF6BTisD+sxSj0YjKCGUBhaU0dbAuSAVMAWdJKS0UVTIyJw03tpPFQtSP5Zb" +
- "pmLpJw4T+ko4c5H5d37d2YZYsw/VekqVFiu6LIkAnOUupHbpVuhXVTePKxVB0bps" +
- "xhwtW3SVTpJP4oliflH2jl+CLI6HIdidSOtEWxPwTYaOFsTDdMOO9lshLUSxbIu5" +
- "uldYJIE/CVEfQGnw3KR8rEXXfhMiZYN1TKw6ox209eLH1yz6Qd55slpUwKmJGhpV" +
- "YEWZi/Z/B+/mfovmdoZ+b+KH47xRdEr1MjJ+9ZGEk8zDzXfoia3VNrVu2HqivcwY" +
- "3Cn7tM3ujFGxSqYs/dy22jfJLV3mNSTmx6I9vwKifsrmelJXD6zmOk4e/y1x5u6N" +
- "kaNqieX17yTTwyGtH46H4Fak1c3Kk5z/ZZaK7PU4mLKJZX6ySfl593p1JU4nVzP4" +
- "uonn80Sf8PxBATaSfrZLZLbUFOifY8b/OQOkPKRJYuHzE80n8kWiVZVKKsiPyj7f" +
- "1czhH4I6GHur5ngfJsPHxaVDwbH4JEAnRdt8Mbc25sbc26WpK369rsq2Jk7ybJJ7" +
- "nc7O76eHpxPLzn7OkGqH8mmR+h6xJVRVTckP3rP/RST+xYn6JzHM8ErZP8IJf7oK" +
- "am6yrFq3COr+Gv1fkE1ZskzBUlfkrr8b8hzk8yxE2fNMfNrmi187J8z+Bmx2Wzuo" +
- "upumHT834f0K/hL3SkSzQ2U85TkrZYbKMVKVsprfbMMsmUWyWP1W3DVjWss1MNMa" +
- "H1WP6OTaGllrnZoiAS6ssfNp5sy3o6d+z1Phfsunc9WPbpmXPm3eqbeJ3nCllcoS" +
- "R9y0sQeiKPWxdMHSL5yAm6DOmnZx9/de80IwLgMAwP8AgoIErJWSGzBhMaRbyCyG" +
- "/KI3YnIr+zatN5zJm9iJx5FlEPllZszjniMMODP1NDhIdNGSUoDpyr2MFiNFAp7m" +
- "dhmsM3rn7xcKDPsQKdNOmEcqRWE10Vn0f5jdKeQdD+sX9BD/gPSY95PtG5r5T0HY" +
- "ruV86045uEMRVSihTsyZa8MesmkTJVlLKqkjBRhG+JG9NNZ4h9alqTnNfxllQNGA" +
- "0GINwKMDY0ZDqh5V+GFsqw2G6lfuxMZjyPPPVzVO+/y341ul3m+NvxltY2IqNsRY" +
- "1tTEiANRtZmKiypqJVJKtpSltTk/sPm7/O/dRNKm7YOQYxq6uWOcR7KE3fYnBOUc" +
- "rZ8tbxGpQnw+T1h+E9UnrJ+6E4e77/fdEqziI7b4QxqWvgPVY2JuUihvCTzqWzax" +
- "J8k0/ueZNn2cHv/723l7vkvl321HbIYegUM+f6eVz7iFR6+P17uMwF+AHuHwfOrG" +
- "7J7tnlJLoqxiJZp7OkanzOMm8/JPR9k3N9px0iV2kiN/2MZWOp+Dmehw93hD9FiR" +
- "9EvPnH5sfKX5VzOWREnZyUU+va6YuauVpl1jSzGGKqpqKIOVA2BEIIMpS3xoVbiJ" +
- "DZ+4+ep9reEaqbrqJ9X9jOrrvJSr+/C3LCqZIomMTTGl5droWwvUnqT7fVasJ7Q3" +
- "Vdshbp9jH8pBJ6bD2U+Cd/hZbX9ay6kU8KxTu8ttbZlm1Zpptjy1hjMVabYxkKUR" +
- "gyjKMrbFpVVpilVWFxd4lsXb8MOW7fVipDJxhwVyRmzTVLLxkzco2dz5NnmsjnxG" +
- "SQ0xLOUGItVGqYkjaPOd1ixXJ8pvAbHrxPhNAgJ168Kvepi5THZi1Orm5ld4ad8r" +
- "162e8Lnx2rLKuWUXYSACKn+0Q+UPkiWkUT/jy4+mbc//nw1tlzru26a16nw/ipmj" +
- "oukAwgMmggdSKdGbGU/Iprgvjn77Ct2WhTTOcy5KZMORZMZRWwQ6QquGZW1JTVlg" +
- "QmM8osKKGDGMJIGMIBsiwhShSkqxMPy+3NPLDrbgVBbDqzyCBgWZKJrEQiRzR54q" +
- "wia4gUepCJo2SzrcVXl3bH+sTOvr0qFHlmMYpGEQaiFZjEgQmdarIu7T2kdmRlAF" +
- "SkKsnConJTZVYwmzOAdnDjWUlQbpLqEmzOttyWq429ehDBlMRRpyaUji5o2uW/LZ" +
- "8wQgAFSMYB0Wdnuk9X8nH0naSH9JI+g9o2Gzu5nUVw9VrujeRN048OjNoP8LOjhS" +
- "uG/rTtFPk8g307qhpyc48W4wop6dLpbpG62VarE1XE8iOyVK9ztXvOYw0JoSwJZJ" +
- "Ftfft+V8JibSreNomUqaifeYC3fJ5fCnZQIMR8DDQUIxtbZGzGjKKNDyRspoqZqZ" +
- "ossZ6UUDMFZKUgwYwsMaaYqaYrCr66wtypjY2abpVSX/mXeSNkaJPqgQhw2mmMjH" +
- "EHymdzJLzYsvmuuvVbsqy6m7aYqyZnGoerqj3UePiyIVZIoqKthYOZ6vGFsYpWJz" +
- "5ns4SY/yi4BSSyktv0dXbf1b1fl9fp9+36YjGvdRRMDFkx6Pp9wzFt1H2f0Y5CMb" +
- "VjGyUszErxN3k9ks0S1Zk8IeitT1VrI3R37ye53Th502X+9254a+co8o7nMnWdCi" +
- "wosHYmvktSVSyC6P4FSTb4evj8e+aNQ/gr3by2tmlU3bI5CjjaesCuuOTInFMxR6" +
- "BGGiWW1NjQqsYxKUlU0qtak2QF9FdGkKOPTjiqoqd6H0PuA+KaOAwX65yfbt0Uu2" +
- "t+9+OvxwswtdK+Z6T46z9ur6JavYqrVySsYUxinbay2mTZRVK1bWMy8Hm/TRaetZ" +
- "W+L6HJ1GI7KbTEnokj3nzVNViyloqqryY4aU20msYtW5mTfBtWDH/fMFA6MUxGMR" +
- "NFAuSNrZk1GrtLMg2RpFCqVUaUsYRZMiN2Nim9bnyPI1L5d7amo7nk142ZMm73SJ" +
- "/eoPU902bpY5T5yQ6ffJkrLbKvs844reynK6fNsroOIGSOqTdhDZO0IlkpYiq6Oz" +
- "Fkc0U/fPTYvU9bxWXZeLi5F902sZZU2ysGSmlVu0qcXTGyX5KS21VKrYw87pVnOc" +
- "iN204sTwOM8R5cJLXpE8sT3gdCaTqejSJPFnanubqkqvQ5+EkEjrFki/syRPSKqx" +
- "ixHNf1x69+Xp6t6l5LGF8d0xI7umlRgxkIYgsKQGahBGMdwkbbIclCjg2oW00iZA" +
- "hDSVAoDGhqhIDTC4UGjDNVSwINaWT7/c+6B936RGV91beaH+tFpClUqVar6a57xS" +
- "1YsdOxwxj98iTq3teHw5yT2NnV6Ms+s+NR8b24bKw/NWKKqqZhiqnM8QftpfQb+C" +
- "Vs3lZLSSASqcfM7yVxGYledbnrN50XJBATYaCsBtFYJlZR2SKwb21+jqRiNFI0Sa" +
- "rSjgiATZnWelW7O0mbziCfju7ylzo7WSqylsYp0JpjJU0qaMlJUUVhGilWTZudCx" +
- "M+kc+l5uTSG84qLYv2ZJMli2qrILI2Tqln4cMqNhAj4gogAncslWOiwaV+BwnPnE" +
- "jdp7E6UlqPtYJYV9Tg3WI95FkO6beZO8nlbeyYVc7od2tLylZPKLTp1I35t2iLsk" +
- "ipSBQqtbUX19H2kWD8z2PyVPmh9rLUcrDSKQsTJIfukqY7Hl5DzdPLdUqq1+LJp5" +
- "emzvHWPLN9YtWeh+2WzylkbFNlTCyVWKZpKyQ4YwqnWq3kKzCwje4lWdzTuDbTZx" +
- "x4bJ8tzHGu7m3prWSakaVZncMwY02dcu7kznctvM5MknBXCmwVtKfU0xWphkowpi" +
- "VsxiVW7I2rWqtRhwpcXDoaZN1MN6tYlKrh3GpWUlJLvXd43OuslSWQ0fVcxqeL+B" +
- "Xv1rpQyBqdm7e1Ra8loulyubVzbXOGoNVpN1/mjcbxaAiUP6xnhT7z2IJaTCQVgt" +
- "DpQcGFJgWSBTA5batqKV5l3ruu7XC3NyZRFeT486vWm68lRqMyRNpSzSpsi1KyzL" +
- "GmTS2azSVMZqtq2bay1a0raVmmyq2yqikIVCwBSIqSpJJKsVBYgSKsBLSopRkS2t" +
- "tKmrVKmA1rSpZU2JTWWSGtUtmsrMWKVLLVRCkSkEqQS0GpKlKZllNtK0WFGTNpZY" +
- "2lmmZKZLbWbabW0ttZTSTFMklmzbbTaajUNZaVNKzWaipYqKmU2mMk2lilaVplhZ" +
- "MykpmlSwamzZsrUtUJCNs2xE2zWbLJpmmmlSyzaYzNqWpssspZTaqtm1VbJlmm01" +
- "kzUtDKks1LIK020pKUpNRlKTSlmUprKzRSmk1NTZZJrNhJIZMlSpNJDMktbNVDEs" +
- "mpKFKVJtllm0ps2WzabGsbM2aQtmsJaMkNaVJmssNbZtbMprNYqWVKlaTUapJmGz" +
- "RClCZhpmEmZpEympqWZmWbRs0SaY0lNTU2lqbLNtts1tsrNtKqSWmGWWW0tZrNiG" +
- "Uy2ylLU2jJWUySmlNmpspWFKJrTVkE1lJmakWTZmUtpS0rKyqpVsilmsNrWWbLMq" +
- "aVLFlNmazabZtNppoZJEkxlJIlplYbNUMaaVKhIUylmxaWkEslm2WoAZmYGmm02k" +
- "mZ9vNcym/zYZ1m/E+UySfg39LUVVWb+0CAnu+IVnzkTYexs7ufDm0VjDZ7mmLPDC" +
- "jvRkCK4NH4KYIPfTEsxAJVJTCY4MNNqKqTgrJkmjRkVkyN9MMuNskxW0mmjTSlSs" +
- "RiUzxDKZmvWVXm9Y8a6VLqbbWXtSMLsZGTNoSqYkyYjI2VEskoLRRUbRRsbWkqSt" +
- "Sau0WgopMsq6V0SZehQ82kyxbJsqq2k6xbaqqpy8chxElkKVybMPBqa1jIGLJqNa" +
- "WSNnw5w5rJRVJ8pXQahwWUzyp0wnz/U0hIEiEYfzEVFZGtr8GqLFqNUUa0pVZVFV" +
- "lLVsEy7VF1qILVeGEk2aS+WJki7F2pqD7InRyG/WjNbxTzY7E029eTdr/1ZJlhzx" +
- "xZEk7TYxZI2Vk4yI8WLZEUcfOpyzjm2I50sicpFjzHRZKelYLMxipnrpolbK2wP3" +
- "Gj5QrZ3mE7dW70dJN3aTWPvGzFnLOYscQkecNk/KdSbVattW/g8tatRJ9BbaVmTU" +
- "cNkbE5NiRgCjqJjBFYYMQEpXT39BIxlLWwvLhFGpGWUqKViqxkcZkznhqQLSNrGQ" +
- "hBUdGYxN2kbWNpAzdTVXSs46S3TNK5yd26mxXO7tXNdm0m6bRbSTJvK6rpKW2TFt" +
- "vPLvJbNaSixoxKyEmNk0kWK0SdjZs2NohYnAsejhFowruXCQlUVFqVGpE0UGZIZE" +
- "c3lktTo03a6N+EiflSdFScJJ0xKRxN5+ZDlCLZB9FWySZUtkhL9OWNS5Kx7HmGk3" +
- "Zm+vn/kuSquatyCwYtGGhIxpQKVBh9sws7qnJ2thu+NtlbJbljpdXFmFp6I0cN3V" +
- "hW7RqTNacWNJ80k/pbIVr82CR/iVzKp1fJPyjz7u0PGnOl53LbDvYakR0ZJD8qm5" +
- "9mWLpEWRzhu+1n9OUKT1kn8VOh3p4lv5ZjCqf3P82pWjKmxUzVvxpOH8eDZPhDwf" +
- "ii4JZZPcJ67Ts94+JJ8JN6n2RXJ/iPpDEN5uehqR3Yxju2bXbGDrRv6T0R5vdxJO" +
- "R2mD+4dUjVjZFQf6RFZJ8rFskqu7VMy3EjDuzE2K5wH1nnG971lZjE1GMMpMLzVo" +
- "tmMJoN2gv8yApnCpgihcVoiUFH+c9nnbz+momOTD2WTT5sRko0skZYttki1bLSVY" +
- "mmMY0wqhWnGhdSllSSW9z4amEW8VfPq+6qyaeu2jZNvXtEl6ptryvUoxwqtXN1Fm" +
- "Yqyc7Jqlsb2TXkulki/galjcAwqxIxJEkIZjxWvohjDLbjDg3VHCdKtlCUmTvHq1" +
- "g1bKsb1nufaqpD0uQWNon9Cdrrb3LTMlSbUTSbK0ohajIvgjH+99Bt8p3n6qleSV" +
- "ZE6o9h2eHZRzpwc3OYmK009E9R328jxMbJvFH6StQnM1NNmLDBWdD/DwdQc+bD7v" +
- "Uoz8D4pQaY3jgmo4UpCiqrGzZpNbC5h/TXGpNqn1Vaok4ZPk4KphiwyWJy5ZHRwf" +
- "oiZC34h6SrVlWif7FRHs1+Nuh+L5Hs6k7WWyNKyald2mpMaNp8+jr5z3H5HpDpU/" +
- "yqPXPAk91O6UFo2PK2u5jy7lWy35Kw+iPIqfOySOpNDJ1k4nqsilXhkeZbW8c56z" +
- "Rx1kbkR1nBpJ1VUPWotkR0rdsQsexSuL+5pk+Mk2l/i7Oi6XGwkvE5JyD6Ifc0l8" +
- "iIBO6c0DixXt8Wk0H6+6WxFliWWWhO5P1UUsfx/o/JZJ9iprtPkmjEsfWdqnbtat" +
- "q24OckqqqnQw+6k7EfBZHMentbUafUcOiqVVVYFUlFKKqejEY6Y+lfo+ubdLJdCu" +
- "RFXLgVQwrGW3GIYJWGCYwwtWWlUskYxZ+emKaZHyQfWMWTUkP9FV7wTx+WRVUrZI" +
- "0/KPlYWlUqaINRpIxmMlMfoeftr+7+JP2H69M/jD8xaKRKgSrdibLHI0VxjbdHGN" +
- "jQd0aMDA0QIQWEpTRDGZrq3R00OH8GFjuAD9iwhU2MP6wiGD+jp0Ymd06Ksv5piO" +
- "Uq1rMkwZkiw2SmZIUHD5pP5P1qcNmkgD9vum0hi+X4S/PJ3/mfi9rbspyye2Fk1Y" +
- "tSqo+5O33q0nAeTHbg7lc2zBxS2K2xjL/dLmkWZGHQNxp9NkyrGxuvp9akHp3+A3" +
- "ROSdXUb1air5yyvdI8km6PrIgEskaR1ceOmv5q4dpNp4dofKup3NzUTxsvxlZbZ/" +
- "V7KshwsVcSqwxapT6487uYnOE9IdPT5DshyR8GTg8yZIxO7D2Xoe8wbPD2vkrki1" +
- "J6oe6xXDYppjTbDezUkdjZXVjE75bVWXRUdldu05D4OvVbD8SxVZLZ009nJEkSTN" +
- "7Y8kpPWH5pUvT49iIMA9AfIDJEZQpYI0oY5HlZOHxMMSe9WuihVMpamSnEH4RE9Z" +
- "aWlkKsWrVSPdFT2zJGJOHBVlVUrpTJRywuMlV0T9myzARkClqiJX70kgpcYzsakR" +
- "kiRXw/k/H9sfrouz/j/oVDN7/u1hxCRIRZULOfq+KvHsxm1M2jkhY7WeUc1j/ARD" +
- "X9g55b0y0OAkCC5cP+IWkuBkJyInN3reK6uz5oJ3cmh5kk5SOROSWbV3cz6GtQbZ" +
- "KFKWuNFtiyrDpfLMzGSYWFVpVVZYebEEsBqBXBsjMbarG2x/fZQ+jLYbHHqNwzdK" +
- "EarMZjYxuuOPbI9sySN6HDIRKMbSRBlKUoJjSMbaV15eryvBqvJXDYi8l107GrKu" +
- "rrePql/G999PfuvQQNubc1orFGJnz9/3e/n38NvhXHdrlX0hVyULe2vF4tSELMby" +
- "nXaVdIyzVzptzbpG0kYyrYmUstRUilMV6qhiUaXUqU2t22sqVUgIrrtLQ1QdExSK" +
- "lSKNIKNDYBCEhONtcvec081daISsVrnNwhsmVFh9UnkeSpU/Ucu0cHJG1Tws6MbG" +
- "5/FVq2qhSlIpMbqkdPrfnJsRP5LJP3kl8j+YotqNDkj+2rYWxbJPER5OzzamSJYm" +
- "ofxdXtOqPt84dU9J+/4gPBe8BUHiJMP6uXrNpwqwttVSaxGF+jEifCpFfxSkr9mc" +
- "32c3S3Szbd2ZoiFIb5ZGYtnEkdJ+Try/CPL9Mi5mMdh+Ug/lZFsslk+ZJ6Es33Tm" +
- "ZHKzR+qo+jHqk0bPR7vVXJrn+XaeaslpRZLB6fWTy0fm4NJO9fzVkjpKW2+cmMea" +
- "KKivw3yNm0nsxo0qY/JPx9o926TeJg2Itr4mV3UibG6zyzGVVRZRZzUmJYrYjeJP" +
- "tG57vdmClZ7rv1y8228aKmVl6+qvZfKRcLOG6ldOqd/Vu6vnzdTvHSaWdJCUkjhk" +
- "kn7Gk+eiZHzRJjshqSwqyDyZ80X6SPqx722PQanWebyOhb9n7djstjZ4dY2OQxL8" +
- "hdS7hgfQ+5CDkj7o7K4g5yNpyOpPqRywlpQRSDKSubGQjFYyaHIAwiqRam0sMSLC" +
- "sJviL0yJ2OkeKEslhZYLLIdXuqTrJIqKaZP1acJCcH4eh1+kfB93b1WTnIpa+SDt" +
- "JnSUSfEhNliaKTnK6bk2NUtOpwxwxVUbNmx5x8lIqppySP7fkeJPkfA/GZNlaB85" +
- "U/xOGz7nG7VxLbFvOJRc267dY5TS32y82q967Sok5Aw3FStphVLMYoq5nJ05S7XG" +
- "3bTWXLtislaIjwcKpUlVZ5bNl3MjhW/1ibOUVX6bGO9ltr3qNM4ZOuTmdlJHaTrd" +
- "opbJmZI0WRqsr4Q/tfrZ3oi2RVBaIqi1MzEkmVJ0pnG2r43k6qGCL9Kkpczv4SeP" +
- "sFeTIEBc3DtAZcH6XxGW7Yaw+DznoSqyrouIMcMHbjD/FBny/X179rvtjikQCcgQ" +
- "E4HS222zVI+KD/aP1IS0pJSBYzn2USdPSTTu868arlGQodZ/tyxVyU5RrlBdEqjR" +
- "+4KCHQDi6aQjlScf+T5kjee1Xoxo/SOOyTCd1xDlX+YN/MVvtOj2tXZXckMqqZHZ" +
- "EKEQlkdnL7Jdydlgmev89uU78j5cSJ/l8dkmE7rhzD8qadHMH4jZj3nDGPdwajh7" +
- "sMdnVu5ujXXl+T1/u4LOHgw0+z8FGBY2M89iIokYQvh0gpDsMgXC5N6MMVWqIDKF" +
- "k7Bhi7LCa12ZnoYVi5gcGP9X5TyVn5jjpmK38e0H0yNy9sy6krJx2NyXEkufYjPY" +
- "35HJdzHaIWeWpGch1C2GpaeIIyAyJiVK/Gotmvs6vH4XixysdNfO67ZuafPse3Xt" +
- "czmeH1mHV6i2qvNHrsuyeFJj1OGjd4Zq4YLjGTExlUsVV/xcbG0nNuxlxTLllUUB" +
- "hE0vYrX0AxuvoyLWYktLUDBX8H5cYsLkOfeXyz9A4QbZ7J00FTnG94VNve5NkYen" +
- "LptnR61av5SHOPZVdEI2fk5/k3VxOX5PckzZv1ec8TchyRzOOqs5zOUkm0wWPJVW" +
- "TC1sxMVVTWOfpWxnsx/JmyBRsFWNsiIqoVUFReZrK80s5jqpOqvOS43zEuyOx1cp" +
- "0Y8OhOW7ME8lk6LCeFLjEsFSqpSyelXJhXAcdpsp0Y6/OqpWhUMVm2xjyTgU6nrw" +
- "6yszFUttktLZVtnXi3kuDRtDz/sJ5OxXV22LVZKMYxihA2Q/Dq/NjZ+535t7PF0a" +
- "3E6sM0t90PBzJHT5SRrz+MtSHquWXGSMc07ChTvJ7sjSm49U8JK0NlKrXIMbnnPC" +
- "0qUqjU5Jxyt7ynN5e/kM7y2YxjGrVeTE5xqbVT8LiY6bpo+ZdRG82/fr1m22xZSB" +
- "38PxIyNMShQiH6G9hXLOZK6w3N5+X72HFAxu5NSfRpW6afRXqo8VJGH9x5ObPuVJ" +
- "QLAiFlH6/u/FbMJ3EnnDq7T0En449m8JHNPxcyzXSV7BCP9JENSIjTahAiKfMpQX" +
- "fhvwg6xjTyfA09UakjGjZSMkcm0k69uDQkz5aTWCW2iz7hlcSciTjD3IoFZBYmNt" +
- "odoFMMIkDWQjASGk0NA76DcIySAGLYwAZPQkVbS9raOCXx0N4NPJAcpTE24YEIYy" +
- "g7CfLWmi2E1TDcjdkTMXE0qKsqvYI1Rc1zUWKjBt3dZMYLSc1V8teNrSwW867u67" +
- "u3XWz3uiTDJ7uup6aktGEa9d1hTNubvV2q883d3IoqVnZHRyRZT547K2nlbs57pm" +
- "7cLQoYwF2iZPBBH+5LQ7dYkkhI6u5sNK9nPxux2bnayrYrkTq+u7erJbBUNziMaP" +
- "rppVcY3SxyySyySfFXkjZSuA61FVMKi5jFHB+UxNKWOqcRzfOSQki42nkQs97JyK" +
- "5amm58SFk3LVSU0uj7SQfqwEfho1r92H6uG22K2lVz+Uf5sqP0dLN/GejmK0sxrP" +
- "xz1m2/05yx4ONjCbJH9A+8QkhIqoJKiRIQWkkRKAK20HGfR9lFGh2vmzMyyCig/w" +
- "mlAinByNccszHu826vNs08OjdXU3GzSpwG2/sZ6SHoyTSVw0slcGjSBnq4UMw08I" +
- "tvw4uHqDA/w6OSCRnyIh/MH46rxmTFxdHacVc+uD3HvflqHvL7RI7e5edJqb4ZU4" +
- "09uYztwe+W/IpAaOoyLcwQVPk3k69Fffn6zXZ3kION0cYOXDuS+3vzTOm/K7Mq6H" +
- "OlZUd7Pxxdl9t69NorsK6eU6442+am88vu73UsgRoV5Z211tTDr33RPyM6/XfL5U" +
- "EDhtlOMGIOhqVFDMLDExeDQGHON0fZdtpnTpZ6cD6JBkGJpUx0Y0WuppUjCvDGzH" +
- "Jsmjd0VyNNnRZ1Y1MNHaMbOGzcp3VttssZwsk0gsTGWj6gLXG8FJpoGGjp6NmZZI" +
- "mQYvcYoaIEFW2vkM2ui4SWaSMLtv6RnW2Q1A4FIHgMRpRK4eNjfwZ5oqGaaSMo5b" +
- "dknhw4SbOELPGyXLyqGoGSSqSomY1HBBVkQqys9MCWL1YjTEvrT/lW/HvnSpG2HG" +
- "W0YwPtoufZQEsPWkFdi4q6Bs3tkoppX5Eiaqo5JX1UtH2/gzrxnmXNzE5gfF8iGh" +
- "wMagId9OeGfjPxGKTtKHVVJ7vT6eMIaVB+wH3n3+jxV4Svh6l0hS2vo/Hxp46W8T" +
- "mStcsHMrio8lNypolKYqrT5AyFDChtZGHuINKBspBGKg7kJt6Bo8fNBswFHISJJt" +
- "PcLdHk1+NWshZCgqnMZITrDX2VnDFGhCe+9um2kaWy3BLFDrBte5ISqMa3whRNX2" +
- "hdsSnCgdmnJiwaaFmqxgEhoSkmS4W5nnc2pOkjMCi0Pn4WGjUumeTCfLJJ1jYrHx" +
- "jaFRrCj5qXWxkTinm7fk9Hu2JvELPk8MMVKpWKtKq1iVVKKUxXlx31G9Tw/vO6Mb" +
- "E80lYmSJp0FRrDJyLJ51U9ZI6GiLTUsTlnZqBqxHcOldSSip2iosJI2Ehx0kHxDZ" +
- "/AZNzYUGDTXrMplachkVuS1tsiYIYyt2mzZDErJJWTTEalrQplZC7YM+li2SUoxV" +
- "VZY0yZkycNIiDcCJMaGNe5kXBpN+8HIUgoKqYnY1JISR6tshCE6JhknVjg6cMhWn" +
- "JNlbSdppsotV9zG202HYjiEnmTz+E7xXhSrLv5ZtdazVbW2hjEYNKDGEBkJ9/vy+" +
- "vnrFURs1YvpvLuyE245w0VLL1kr7cOg/Ba/Qf0QM8JPxZLLOStL5KZ+faXr7LE9j" +
- "17oH4+OiR8orIu4h/RAagtxGICYpOWtBCN8eXMu7rl485VKQmKi+aU6rwbyfLXpr" +
- "161+qbettfqWN0pL88tJbgpKWur4a8ki2arIszGhZJVK03h6o84nieE+RSDA2EJn" +
- "ygppzrRHjjDHHjQ3oAGNIa0QIJjBiGd8s3glSnsMZSEY1I4BqCBOrFtgXZ7YoGff" +
- "5SOeYkWToVOR6a7/Dmyl7pPebOTUlLEYebR5Ikzr5O+azEJXRy731dGOXtcW5mTx" +
- "HG7GnHVxIbSbnuyUslYdMltVhpO7tytjo3Cx2IyGZDKmmWOxCaYRisSq0VhSVpit" +
- "JWkrS3VY0DcaigxKkRFVBNRkkg1UhOMurldw8knJjznZobpJOCnNMtmM9JI/gses" +
- "Dl0es/T0c4b+aSO5yy8it57PtER7yQ49svq6K2KoqVhjFUqmm02P9rP+enbyTaJy" +
- "k7zyB5VdEyRHyqE2jlT/N+4jPJHNVfOPajFtvo+bRIhxDIiAREIBEBHmAseJvCKp" +
- "aWSr3OREAnaST8LJp9TClbcGN022eOxs0mObY5x+f0+u0ck5RKKUopJrgB87bebv" +
- "yv5u7W3q/fvzQ+JGypskPUreRLIrmybatMsX0a/RksaxtIKIX8sn739qsebzOZiG" +
- "by7s3vdaJR6Dj2macG0WSRT7SDN9KC4xmGSRgRYwaf7MbwGIOPrP6Rb8N/DY1I1H" +
- "JIkrMaQbxJHdIbifDkh15l2d27BHRHVPKch+6RBzeUnBMtctc4pKUyuu2upJrlrq" +
- "667pW6+1t+6Vk20JkkpYV59A5unxbofu3vn21Ey/s+HYx9zasPu1JNm5an1x85Hp" +
- "GG1LFk0RAJ1kfSK+E9UPntJMsjrKWnc/YuFg5pe8Oyx5qIpZEbwKh7e7yTBhymws" +
- "JtGzb8PDzkfvPfLZJ5yR/o9pH2H9KqdtVVX7VbbWI2Nmr22lllliKehVTXVI09Cd" +
- "Z/Ou/e1aKs8lfvPiSD3/Bks8PeYcuVmGgTKW2WyVY/isZRxJN2T4vyfP0vRyfZZK" +
- "rbaZNZsTidKX8ofEcnunxzNEJWu9xbuQ3w1er3T4Y3g7/gteJ4WVbTtmn85O7lJ/" +
- "VEnkTJ9atqsYYYeujDUxIwoxR56sknNj7SbuGneRs8nq4fJO2cpuiWKioslVKlRS" +
- "pJZ/ULtdlKi0b+Z81+yixKtJIPDdvJ+LvDu0SyY/h7/w/FiNs+mias1cSpOznIPK" +
- "yrHt1CY942YTzH+yrZIoqhOEiZIT845d3T6Pps/6Ofl4bEm9vIZB/UJBbEtgRgyB" +
- "QrgTP96/o80lj8FrpZ3WuiX6brraSSqxRuxjTFUbWarrGGKMDbBcSioFSqf3ZLaC" +
- "XBlKqfB9CZLWcmutdlVXXxEzqHZVo2a5uZjrbE5X5CvSKi2WpbDaOR0OqaV2Vjxq" +
- "myEND13YGGgTBqRBqAkgipVktsk1bJm28lu2ll5dkUpklpVLKkqjThs7SaJqeWRG" +
- "VasWSxZLZu4aIgE5GtmzUkyWRexTG+WO1qi40I7X+GXLi6g1d5IU5Kydn5ZoeE4k" +
- "iNK7HJJHZ32hk/RzVTRzKwrOelrcXxZCb6V8ambb6i+3z7g8vV7o2qRK3bNfx+d9" +
- "az5ZypWyvNOJkq2zTDGW3I2kxsrRVg0qaU6NmxvJVssZPf5Ch3jJZiNskkJC5thW" +
- "jziKca5yYTlK0RAJy2l5f1mHrY2Dc6OkI2TTTy2TGVsRATPxGssjZRlnpIg3iSRi" +
- "xI5OR2SOZJPl5/ncvR8vln1Y/uaaeTGFSl5VO11Z1vnvja5W9Kw09ahkgtDDYyAY" +
- "Qw/WRKMp5aFVusKrZpjSKdZ3v58tazxmJb6NXQlD2AabBtG1MLD6P6xKQChW0XsB" +
- "77Y5z/JBkkMXpKgXiWquYcP3Pv6+I4oBI7HediIrxI/Ei95EsFOQPxkk78pP8rbI" +
- "tJ+v+lu6eiHk6+Kqz+L5PSR4npITj7fgsgl+q1VWGLPweJJjUnC/Grtc/J2G01ZT" +
- "LW5ObQ+bnkr8xJ/5P/vSSP+C1jG1YK0Y1sao1qoiqxtFbG1bFRtUa1sVo1trGrG1" +
- "RZKNo0UFSilTNtRtGjYIEClGbbBQhUJBpCDY1o0bFbGCxY1MoNG2zTaLUEKzFBMN" +
- "tUbFY2iqKIjEUlZKixqNsW0UY22i2g0agirFbYrFtJiNJbSao1sWMUUUUbWNslpL" +
- "WNjajFopFMhJGxRRttjbBtYNtoo0YrRqAKKLUkmqi2sSVY2oNFaNotsVoyQVaNGo" +
- "o2ooqxaNUUbFQoYQ1o1WLUG2xVgybYtGtFRgmVk1iqZFQlJrG1sbWTajRaLFaTUU" +
- "VRtSW0bVFWxasFWIsVosatiqii1GLaNaNGpINqg2jVoihmxFti2DGqiqNFrFslti" +
- "qMZJm2sYTbGLaiKiNYrRRGsbWLbQWoi0WNGo21irG2RMpRo1GK2Koo1ii1i22C1i" +
- "1RqA2o2jbRRjWi1jatG0lUBWzNUWo2xpRTRVG1G1Ftii2pLWTahQqKi1otitJqNU" +
- "lGjJNKqI0Rq2i2yaxjbRqMUVYjQaKwVRtFjWiCyFiKsRbUWiosmsaiqjY22iqLQb" +
- "X5/99f4p/uUf0tf5/9K/qseg/3/8O3Ejr31kY1gc5A1pvXCxCkNiwvOQZYLITeUx" +
- "5CNobGwqJ5o3bWtQ2oqajkZRrRj1prYW5TG2RkzhxibIud1zezbDrRBn8s2xsbHZ" +
- "Ilaaujw873Rttris4cJCx42DgiHZM67LEm5mczQU0zdbGxtvENm4RY8axrs0rvvB" +
- "2Lmhu9ZH1rnXlfnhQMwstTWMgZ24VXZJdzdKmphdlKOvHF5Ypc1co3WpPG5UchDH" +
- "HthGXu6jHcIFa8oQrWt53ErY2jQyDFGQGaaj15BbvaLTDPKU2xY9Mj2zrW2Hba2J" +
- "jEwZb1mshmPWcZdXPGGDOQ4hqWsZbxqyLQ6ysx+Pu9UmOHJEyavWvHjbPPnsX1XI" +
- "iq+W3w8Tu+Ry16Js2+QVNGKUjZLWwXGBxtiE2hFTSXGBGkBjMu6xtIYNFQM1yBbp" +
- "9u0ksTStorHkolJ3E5XN5tOFjhjhwmVcOxEtLHxyyr7N9lk1DJaN0qwpiCBpBAPG" +
- "3V0ccPvd0Avs82rSKmAnj7RQAdYSdYbzJjI4URnJfO3TT4xQ26ahpseRDUtS+MKb" +
- "aVjQ9wg3lnedmecmuQV2y44ptKaHyuZcF1u1JXKJlu6pRPSTudsbp5qixXfWcnpx" +
- "PboouIu6q3vjI6ci2PuVosvF0bH3kaaLyFWNsiaLGxxWqGnvHH4d8MyQpjfcyGZA" +
- "6+PHVbTd22SxshNhjBvMiBiocsG2M5zFRj1yyQh5C7vZX53zDy85X19hw6XAhSc4" +
- "4HRB2w2Jzqalk90qqeRM9JrLjIlc2+tvhMyT2eUuq4MdumMqyCenJRHTk1OZudfS" +
- "+VfKOcyA5HHezeQrJxq2piOM5vIJjY0fYvMt9eOLt3WsvDtG97S85zOs8DAjs7dX" +
- "vmFFxB5l4hvFFWKjG6TIUmyWmMme3cQzNyatha2CUx7UUluGUDYW7GzYGPvUZVUN" +
- "2QruGNDbQ2NtNsoEDGs5S4Sw7tuXObFDTJmQpdzuUSm7gDGi7IElwyNbNWUW5apw" +
- "r1xMC2oS5tUYZA2cHGiAzve7XardJ2IuYysvZR0Ku5Ck+2RL65bzSHlFlxDxNMK5" +
- "TWUzcfeFomjrOXGkuCogWNpZb5Tmyes2YdxqRBmU6GoIV0TPJNojDDaqLiTC92lI" +
- "44VORRdd7f/n2zez072fHsVc0lJBrBTJO0dTCCHBnnJ7l4TDb0xvuQrWjqhowcNm" +
- "KETZaeWn2MKO9JNMjipkZF31GWlSxcYpJydb5hSnINMGPuEOnRLL4UV1hvIPGKBl" +
- "ZvS4ydl0W3uRzvMAxgqY2gIYc5EjKevtHG5vkRZfTi704pm64VOlm9mnddnhX1d8" +
- "i11nlLfO43hvIUvkhnaDTed1UYzb4SQy8iOZJY0OXGtwdkbrl6UMLqQoOxj6wqcm" +
- "67PRzUcwOOdgLJgvlpWuyLe1MNGlSR9cdZItEm9xaWRy5l21raQcOMenbGPjUtId" +
- "5L5rfXWQr2NbGd5BXI6+tVcA2rcJgTsa6HJhyR9JZrTaSuTN7tG94c7fN54bJ5gK" +
- "AteSmybgHEB3lSGHTGcmecrPGjWNw+WA2uNR0erioM73usN6veTkgxmQtzC+7W1C" +
- "52SQlmXcODt80oUQQutphmedzHoa0Pb5uGiUik1kXE7ZGybH16ydOZNOpe5Sgesh" +
- "jsIhgWSTnObvd7JYyX1O5WwQQTtFWii2tYujUsWbw0ezmrTNw5aVPbIMBpLsctzL" +
- "3e82boiMG5yOnOmm8fMsldyWw025uHyFFYaQ8uhZTsWKiNp8JA35OM6ztkc5IRzb" +
- "yi5eshOO7RfQUENxDrF3qvnKutTq2OI2Axlgzi73va5to5kVtHbQ7Y32Dd1k3HCj" +
- "LIPSN73VuOclVLYXpmseBJzbNvLSDWByI7kReScm2jiac6ztXZGkbaiCAyO2QzIX" +
- "Td7J06xss3ieAXL4jMoKMHsszhnY2tu+PYncmERURzYjb7rVmXU5FSXuzzzvke8r" +
- "flq8UMwGzmKayKZkWIVa8gdUzJzlgqDkEC5XJt6MpysuebzMk5crS96OkqQR3Dkz" +
- "ElgmcLoCwfLTbkIR3GXy81m+S4PlrND69sIGpuN6O4g2ktmwgkuHKu9wyznIiYqH" +
- "xh287t87BEPFkERt85JvWK2OrjtJEX2u3Obs84debd0rw7zdeXMFzOZDJ3NvLmvO" +
- "W98l52eec8Ovx3URCkNEx+BY1uglDVhy3y0UPJcKyiDZjGbewQ+bM3Edm6FJOvzz" +
- "azuclkGaGMcYNlfJEmxcZb4M0d5vObBOO3PN5hD0onSZ5O7GGzFbRbOZzlE2Rhka" +
- "wphx0zrlixjRccimW65Ok1uZQ8tkA7rSLGbUGzJIZew32hAFkPnNVhE9MqWiOw47" +
- "zozjty6kNk1N83UI0ZAZmzwzHu5NUqQyQow0vktdqtUDtNuQOWVDBrlBzZMzs4tf" +
- "bbgLjvOVlw1POknTok9nX1y1i108eGb3lqIbyXdFm5ZQ1N1rdRtQsbwYcJmHBeXW" +
- "2qMDeacg55NcqOxlx5mVneeFYjRYeJ0ckbFCkO9HPGh6Uz0YirAec3cAaT2SN9TI" +
- "dhI4eu6xRjeuwlnHtcd9I6I7mnNQujxohaKtvuAQd6d17CIoMjnTcYTJ0gzDnLog" +
- "y87zLa4RIWrjb3QJV4OaRG3hmhxMjBaozkkzdTcUbRtJzGncsju30dDubirvs7xZ" +
- "JuXdqYd7zsWQFdt5eUcWbvOEb3hdO1zObnI7UeWd7m7t8zw5eWdMmpq9lvkl1O2s" +
- "33XNPfK3sTSyZwcbL7OVx6ZFd7y47nYjGcfOl5WUbFK6jGO85fdlu+Oj//MUFZJl" +
- "NZf1tARwa8BV+AQDgQB3/wP+ffir////pgsXwAAAAAAAAAAAADkAFvAB9CgCqKvh" +
- "wIIRClJBQGt931KcB7ue29fOM4xl8OCCgCOsAD4gAMCCqAgigO4wANPNs0ABQWrw" +
- "W94D7vhh57CBAWsPbK21bY1p2NSlc29vnvroj5VJCRUilcbPtq+nc7762bq+rYxo" +
- "GIRFFTW+199fPB8oqqVSlUqJfA6522q9YIUQr2e0dTolBEUApKpKdxdyiq9PcxXp" +
- "pT7XA1zw2DoUqJQtbhzOqiUFUEnrTwsJplFOzKlPLNubxmlvLabHh70vPbs9VSlU" +
- "C2aInZnWUtKa6kV06iV7xWDfctwDvZfbVSHSMzex1T1Xu3dbtgdcgV00eRqTtivM" +
- "xlkDWp3c5VXc0tLhitmrNiVChF12zldtJ3W27okKoCs8t8djvZ9jdAPWi0r3HoNJ" +
- "bs1XKl3dVs7jAPbHmZ03gFeUl02d2aYcR6bmqg6173G4GXhqegQBAgTQSUPUEGEP" +
- "UZGTAA1PCCSJVT9owqPVMeqfiQAIxGJkYAEmkSIQjRRphCT1GTygAPU9TTTEACT1" +
- "SkiFPIj1MSaNAAAAAAAApSICIoiTMqepgUaeyoaaAaMgBiBUSIIIgRoEJkmqaek2" +
- "po0BkZAPU+d9mfOtn2399/UaZITRTREBAJMILEUSZiSKkYAEmGm0IokQKAYlDGAS" +
- "ykCCmWJBQBpkaKQLBIiZhJpSzJEhDTRCEkUETEKMxQRSIxiaGQREwxpZEg0KYgAa" +
- "EkAGJGE0ilIIhQZFLKTCMSQMkBYoRIUkFIkmkQMZhGYyJkQwIUUkTQwJslEQk0IA" +
- "pAEEkJCIRQLAGUhJM0NCzNDKbFlk0QYEaSCihZRNABJhCZRFKJFkxIKRmDJEZZSi" +
- "mhJRNkEjGUIIIGFMpgaQMaSRjJEYTCYoGlEQpmzGZLISlRlCGEIIyYMaZKkpiCNI" +
- "jIURTTTGkmkaGUWKRNiEM1ERkZEjIyMxIQJRjBkKTBJiUyzM0BhkLMYkJEwQBQGh" +
- "pGWTRjKIE0SYCUjDSIhmGkyEZlMZjCAYYkpimEBMZlEghCUskyWQyUZiGYJlEmSz" +
- "MmKRiQMLMxTTBlJoiJphJImIigzIpSYzFIo2MUASSpKIRJiaBiFAGGmgIUlEgSMm" +
- "BGIZqYzQIwIpIljMJIKSZE0FmAxg2IjIaNLAaEhIsCyTEgyGYokNMEzTMUiNiMNg" +
- "jRMMYSSQQhMghBgAGCEoEY0SkZlCiRhRQSiZEQgKMGQFIkkGIySy0CZQEqIshpMx" +
- "jGSUUKGSQogUJJAMg0YhCooUJTKEgJoUopZCiYLEUsIkGESLIajJokJjEQJgDSli" +
- "QhGIaADEBsWJJAYmkoDQjIJNCNGUEwGZIEkqYjAsbMbGjBAZkgkBKRjQGUQQTKZg" +
- "ymhiQIhECNhhmMyEMgjBMYCJTZBEhSMpk0zGlEyZSjGFFRQpIykkjFCoJoxhpIQS" +
- "JoRZIZMRmiLJEMwSJgibCaJghRAEyggkQySTISQBSIJJMyjWKAQSQKQYKLDSDRFg" +
- "gaYDJhkRBqJiSBkSyBmQJhFNBESMWJkmpEwkjEQxQomI0wJiRijNKCQQNNhaYhlk" +
- "whhLKEYJKExEESAzLCSURhIAQIJEpiQklAmZ/txdd3XdcOzl3Oc4ca53bsdc53c7" +
- "k7runOugoiVLVlto221GpSpUtitttttEqtCirbVttrWLW0VsraQEkhMxSAMkmAyS" +
- "CjDSRDJCCJBly6RMJSkkEJIMhCAo0wEkgYIkQzrd2YCBRMZSmJTCjKhmJIEiTDJM" +
- "0SUsIxIEkkRTRMyEhJCSBIBsKBMmAohgwmJIkkCQaYkkCGSJkxCMCTruhzdNjaVq" +
- "NGI1qqn/H/D+f92/9N7/nf+x/T/BM7+j/3Df5s4H91tC/+oosD+/gYNHpnVNy5J2" +
- "alEaZU/66SB3/PXf/7//et/nu+/f9KKr9VSKdhIptIjKzARQZZiqimGUFLMlVWMj" +
- "MSUU2oif8IKKYIhlVIpkBgFFMIYCimSU/8VUimSiVoFFMUof/mCin/KqkU/1/2/7" +
- "ipn+uSn/P/jZ/qZLjiqHKWmltwNK6udN0mKLpTbnFbHSxf6h/6WePKShwUl1VbdK" +
- "GyqU5ooa/vt32BeA5cSpdlPaWguWZVUxZht422i4WJpNsWzjjnNrttYxBLESWBXA" +
- "to5UMFuThmsrEMqjbDpYOmG3M9440VM3kpxzZ0ZLjiqHSXODDEyJisUWWKaaZVEW" +
- "drHTWsbg1ZFVRmRGCMFFhITKNXhUhsLAnAXFVTa2xYZviazvp7z20VOkudsVqq3j" +
- "OeGtvWOVhDnvvuoOynI6VhVKbaPHLclddm+VRwsd9tpyhwG6KG0tNMuNM0w1YZC1" +
- "SUMAuLhnLQOupddA65UOXPDKoZRXMpLJUsrlyDY2utozHDrg6uimKZS0WgtDKos4" +
- "KnPMppbMLnNIaySc5TMHGbaxTuqd6qpHacO527Xh33/xUTIdWeKTmjbsg0PYKnmC" +
- "1lVSd88uqKGOW10E52BMkmKtkyldBFsScY1nFJZktZQvRzSd5S0O9PG43nhMOVRs" +
- "OXHDbwU5iQ1kkWZEeZGOqNqS6xHOJZZIhTExGkq6rcObBbGrBOaqc8OmmJTzI751" +
- "Vi7Tx0LbY0JUgoOEmzhjjnptxIKus546uBtXLO4JkyYP+eAcAAHOD6fr9j9V+RH2" +
- "S/L/QXTV3dz8SL/T8qH5noZQLPqGwlvR6dhx2TVtfs9W4cn6VF1Rfst5hq6EbM2q" +
- "dokF7YlT+AevC278qkbLKawmh4pJzRaPv9leNe26uHhSuwBuLK+a3xCu7uCt8ICc" +
- "hqAubTDuymwW6zBsaun77TDCZizuwBP7lwSttmpSykZaG/3IVw50MThjdLpDuH0k" +
- "DTDN0e2mvqqKkAmVy9EDwysGysaREKB2NormNHUwj0vgO6IiGsJpEuyQETJyWsUL" +
- "zZWvlFrieCawpUQgzlKTRwiZJXKyzbD3ulpxiGZ3uqqknBCteytK6wxraGufXo4j" +
- "6Ql84X68MHo9PTm7GxF43W97OVuPemu2nSInel9rnXmRB4ZmN2FaIWPHWBY1gskI" +
- "XduCgbTFmxaE5YSihkBIUBZk43EhJxOAqFTkTEgZg/58BOXSVo8zbqfJfApfLFzo" +
- "w/f/d25jXyxD+I/OeU0dcx/x/aRkaa7TXU9oVlOfGYMm7+LW4ifNnrp1XifHFxMu" +
- "5IbmiCprTZzImVSR0Qa8znKbkRuKQuyr1cokqPHOIDMit4yc4kkbdortTU60qgIp" +
- "BnSrVsKMeuZ4NPFFXo3ratpwLFLGtrbRUbc6dxjlHMt30iALUHtqu5g6R2+W8fwX" +
- "w/9tjnDISkwpFIFITGooZI4IpEG2wm2m2Gk22+NttNFNpstJJJJL4r7Fo9BaHfpy" +
- "dVdT9v6/JXtG67C17waENSlYvNK2F2WomFGFDQgRHIUKMGMIWE4Qp1LPYVOJ3ajX" +
- "ij0R2SiUikUutMpXscLDown53VRa5NdNBc3ojNNaETWjiHFD0SSCCSSSCDKT2PSI" +
- "aiwTiy0mbTO6iKbZNVIZ/GZuWsmDvZ2jyAcoTPVEi8HyYNj0fsH+BpVN61a8JAiY" +
- "SJvPsFnwgTI1HXbhbNF1FnpCTeho7rSi2EUjT83q/Cmc4nETmio0AIuw3CbLSbKx" +
- "plU6HxSnZ2X76jMxwG6zEfg/GT47sv4GvUeZiImjSpzqWhp1koVUQmYgZfQYMrIw" +
- "zgqXzPClmVSyPgXckhxZXzdVcKyu4Qi0aa7hpB4IJs6THDITGdymCiiMCFZjbbD1" +
- "Zs2RDWNrUlQ/P8x6SH7v7Pz/8fq/1tn9U3lWuTf1JnUUMBZ0zXwlfGtzjVdDGdNw" +
- "/Wb/TcYvZhOV0yvddt9942XK1inv3hKPY1yG22ftVJYGIHecMa1WHrVRdWNFu82a" +
- "cxAgPKsqap3SvCX1k9lfXPem9N6bX0uaUbPfM+K4StqpjulMkJsnYV74vTdMY1Ed" +
- "oFSIZ4/h6sOvXBROO5iA46Ydg4cPQkTnMmYnMTmTOZL0JQOVaKsWLsGxYqhdCCQM" +
- "UGxBBBEJ7+U3578j0euaooSZ6QPtSOwWKBXnFoZlecqTfq1/RtQ4OItiMpbHqNXS" +
- "LBpu9xQ9UiKIOt8lmoPPrrV81xoI5KWxvXhM3vY8pR7qqK4YLstYwxOVYstg0KRO" +
- "i1fLX6rgTrxlmqlbrkE9LEGeIed9k26rGnWed6Nh06p11O87aBEwmLoD3HcEEAkE" +
- "GRBBBBBEkFZVQUUkTHdrccRvm2/fthj1pS2KWAbKGFox0dOmXvOlr51nWKGJum43" +
- "BBBIJBq/KsYn0ippp9W01W5ZRjbTSfDNkM7isVOp5Wk82WrJNLTsbRZZzsMYDiQS" +
- "QQGRB573Pe988yZmZmaB0HgHcz7ZHJKFgkEgyIkiSS9eHnk2SvPDryK1aqqqmtW4" +
- "PSycD/w8sflE+v8v83/dyIplqpb1llszKa0Kl8tWXbMGzMy8XWnF0X937o/wO4fq" +
- "0+r7tk9qe2FJ6z3CkozLYqzEKiqUFDKGP7kqsHaWq1aDYcCQokp/eU+vt7uZp4fD" +
- "vw29FcKUSuratW2rX7I00/UcnqCIfPyP4ftqCVUyNaqZi2P7Lo2/nvtw1Ntxu2Ov" +
- "M1cLOMOjTdl/Jw/jqwjhrHX7ljvTS0Ng9YWklWliFUpZUiCjOKclNiKmjWdFMjuo" +
- "dSAo96JmslmGgyCeUmmjEtITqi4DqWXTg4318osVuX2Vfa63aYJNvvZpHIUVXXbr" +
- "pPMYqxKrXRvoXCGuFnXhSb4SVZtAm6ojtvuIBkdOcqdgEZ6lcZZFN1kPKhJJhRBr" +
- "WEQyIWkl1hnFU3uys63k4eJJlSIMlKqoErDI6G4EEUnpZfaOrlixLp9DvOUpB4Ta" +
- "n2/ZW/q+fvPhH07t9H4MT16XESiARMKUE/rVVU3KNwDooJ7dlAzgnD7EhScMIYxZ" +
- "/mOidHDestpVUIAEgC0t7/m9fLzzvPVb1fK+s+Y+f0Pon6xzJ9vzOD8R9GeLf1T5" +
- "3aq222kVRIqwftW1VyfHRO+89MPe5zaktbKQr49+/jZmajwxNu3Zk7fVWkSWG+K2" +
- "a1xZlKFOw5BlJpDTgyzEORiGVhmzt4tctufPV1DsnIxdsV3SbUdlXBrTgwnt41HJ" +
- "0263X9faPss1y+iNSMUfp/X6ff7/6/TW98cccp1bYjhzq/3uXPJj5bT8/7W+nhNo" +
- "/69v1+jGyfY/aaf9UV6T6SQPl1Bq30rH6H4yV69J/bdqqKoSHon4AEpmUtPAez+t" +
- "92Y5lOj2CJ7CYdkZxf0D3R/XfsuFMS/C43Nv5T9sfMZV4L/G9pvd03/3mq9yzlm2" +
- "xVJVkOV0LvETLzsJRx4cqu6dXdXXuPQcCHb7ePRk7He904sDcwdra7Nt9q7VFY9l" +
- "7jUQJW14xnuJPn7/TMw/3fPn4+Pj6o/Cx3cXKtqlrD9PRbmYZme3mP9E/y7G36I/" +
- "LH+Z9Pht8Afun7v7tJGbXiaeU0eH+Gn5fst6/K+NqmUrWijbu3DZSH3hD6nZ+o9S" +
- "qiIxVVjIQnk5/AzMrhcclKH4STg5bfDDGO33aTpJ0rlQeHwTE4GVRAlhOxMpdgNv" +
- "3ajAlCIVM6Qe6uKg9yOwUV9eRvl2dAWQKng+meXZoWhDqzCyCFDwHzqlW653rPFy" +
- "aXH00S9/SI7ZIaPaDOu/U2err6Wt0/RGxFCJ/FfXywJ+Z0NuUscckrzN2LlS+4To" +
- "ymv403aBj+06Tl0T6Xne5mhKZXrsbvOuKiXR7e6HiOm9CknWsik7Lmvsvrn08oTa" +
- "aD3VS6R5uebW2codGHht9KN5dWRYyrvSKCuOIvhyuzboi48y0eX0b1ZEk7XR2mzQ" +
- "lIxgob6yp54pmGTlmwZ30l56vdry8vuvXD4hdHdkDKTAhgiUo5KUmzxNmilIqOOR" +
- "j4IT356J9N4UeHHbOSSOyBPJ7lSGRJEjG2PX7P+mxdE4E9kZhSbrNHt+LR6oxuXC" +
- "xtS3UxPlEzA5XpdlqQj4iqskZZ3pmdTpI2hJsTma3b8RF/EoYxU2m5oFB5TT0rss" +
- "2w8zlr3Bw9jYwgtNtPCzmmpqJwmZzfsew9o+/u+NCiXjuaEvhdu9cDRPzPZbreMo" +
- "pkxCrlWTi29L4pZEMIlfLbK+xSL0Zqy7IjaLss0ZGYsGcMGrgagM+zilXFMbIldU" +
- "QarxUPisyxhSqeew68PlX96+Vn81ovsttNN7r2tOwJnj1OGZ6GmypFEL/OURjEXj" +
- "xamLJXj4pVTillprNqvk5OqCY8vVrvLm3qoKGDgxzLgEkqry6tOg257kmNzyTdlj" +
- "Q8tAmWAyU3697unetmwupGywUXVcTN9MqL1479u2I2tsRZbvyj68/LNRM01plhvS" +
- "bN5NcjrrccL8Htyj+BCrHefe9PVPN5zrUH+1Pb6rXdo22uWWd/EfwZZbUr34gOaZ" +
- "1MdLqLC9RP7u6RSO3a3RxXP8X0wBLkn9FRxLMv9CJEbYsiOpgpUSoa5GSlIQU0ym" +
- "1JJSRLorCY+OqjQVlihaqBciZcOS7lgmERMS0iZQTN2xVFERDdrxbKJtzCzbbXC5" +
- "bTm3j1zMs1uqI3AHShpYzQRbTYKYrZRILVpDLWCCHKKFK04Pz6l9+B8QwVBx3HZ3" +
- "pHj9L3wPqk8LV2RT9q1kZcelVkMztswvhMxRjp826SggOKFASfzLUZH+Trbl452C" +
- "rv71T9Wht51YV3hXG4QPJdqV3uZz13mwrzVZnjVLbVn+YVe62EzchMqtzShLkKPE" +
- "dMnTiMTvOqRJbzVhxDI1dd1rQhiTqmcLOhwiEgTPFVyLB/BYxVVJ0qTbe0X+E2NJ" +
- "5FQil9Im2yK4hAhROqTbaIFD7Kzyqk3ny25Hm6dGXKvdrsl+j9LTNJyMbczUREDG" +
- "XgVzlti/gxxcK9lmrQmuXy00nPZ1ZnYMCOztzV44ehTr4++n1Tt21RvA1/+natOd" +
- "+etlwD45o3FOGbqiF43Vsp2VA9kWCP6ERX78Jds3aZdJHuSiVaYad/n73gTnNOq8" +
- "bUvQV1ck9/tFEv8o/X7P+1ZhaugDmvV+7UkaQ/vHB7fX5WVgRokFFMNzV0S7rpL5" +
- "fPt5HpdvXdsa8XNCJ3dO64RjAXp5PJc5siQE7p10k7q5MlxQkHbwYYb37js+uXMr" +
- "XQD53nebkY+JEQ3Kr6j5LcbHtxRKez7rjvN74ZI/binYF32Tatmu8Be6TXLsrqtU" +
- "SyjpPtDkefbc/yap8EMZR59eNbE1KJt1yzjkr8IrBj8d5+WZHW1FCToyAsXOUEXr" +
- "Wtq1r5tZb+GoluBz2+U8FT3va2RkKc6WR3ZeNn4iq1okKrUThD2MqptNGqiTJ4M2" +
- "f9u45+/nwFAQyTz4I8lDKWkdQxJJEruEVFU6mHlMh/SyVffytduOEYY+qcVewuWR" +
- "7sCx2jKWaQSEq05Vh2otTsmLP8nxVuGAJlL6CQ0fXzP22Mn0O/dc+RzxqdnXq/N3" +
- "KIZUKGEwHCFgyKwJcqXSyY9+KkWLMIVwWZW84+AK/Bz5wnaLI44LmU90x/EkyBYo" +
- "YS1EJA9jWfE+/5tRUV1ipCoof2zsjgKQ8vpHUIwQU4hNNSOW4tYulfaqfz6P4wYH" +
- "GDM4DID3+NqN1ONUA/PfuPMRXS88tk7zKq/wt5RmaVy9WAxsjPw3pHVUomq01Y27" +
- "q1V1m7Yd2KfWl+O5Zq7729d9zZ0l0p3fEcrJ5YgfbvWje7O3f3xZrowIWRkq4O+T" +
- "FRyxJpiWo4lFPH3WrGdl4cvrRgQWOs7e+Rm7Fg5SGPs7K8wII3++tGhUMYuglST7" +
- "5KtdoyntNOHVVlYkvFyJtG6k2rcPNYnRazDvM0jtv9e0GxHtPw9lbsVHo999iMnW" +
- "ySQyREBBJkSLp6BsnvG/p9faVUKlPzdQ/ZVIRVFqLwVZA3bCzzChJo/VG3vBX5SF" +
- "rWK1RZmzbONI5WDQJSoSvFrWQPYWLVWpk4wJi851alamk1f8QZvBepyqUITCUW1M" +
- "PO3E+bYpbGJWorqrG+spHFPy6ovW+piPxPDpvMK9cLBMXT02D897907tO7q6Tqpw" +
- "mu19VLVj5w68m9aLxrh5pRd60Z1Y7OPlnWyT67h8VWsGO4nUUKiC8Pu5yxhCT898" +
- "xuvPfY+fhoRK5T5qvf5+ore9q8fDLTyk2u/mia2vXGhbTXwjpwro94vOKUYpdrNK" +
- "/ilIKJN59XedxQPPGvYqUmlTpq88kgneW7DHmiG23HMo7Zsh04+H7xMdo7xOJJtY" +
- "eizcYZdt7XbKVK6OL4vQLe/M+3jq86SgU5889oFKfPVuxF3wlFrkIun9efjz79d+" +
- "wYeN/C+u3m1rd0jFGq9X89KmLLXN2C5Po/veZd64ndf3MKIxsceKwWTeL7MD3i1L" +
- "FVj6xz2pzr8QKCFNCFKpIp+xTH6JnyBsNsPitQloYgqd1l5g4jhq6cPDUvHlmwrI" +
- "oOhRQkOJcJfIaDs0KhNWaJJhi4g5WXdYcDKbkpiy7o20IRRpRFyOFooQ42GI3+Su" +
- "oMuUwozR5RSK47UcIoQsIwhhRiAXHRoVM/c+S9/l9R47JC+j+m/Feaff6jz8TUQc" +
- "fBu36cbfXyrsgqiUIyVfLNwCKvgnlBRwKKm+brfbFcOClV8LfTPJElZDw+Yw7n3R" +
- "/39I96pWacn74akmCfZk9N7Hnbmfnm+G9N9IIVf233Vjv2K+dmOqXTgm/cpSxjx5" +
- "NoTM+aO9xtTisCE1pRXSdT2doOxqKdUb7MQGth/hkgx+xCAlvCV3TRG0Ce6IyQW7" +
- "O5ROkRaOiwj2YN2coi/fFuizw675bLOfJnWg2VO7rRIEXexnFH3XUPPfxRcRGzXs" +
- "xpAtbS7eu63smcY2W+6RTU1psvDNdHE51pxd+N1FlWJbYbvu4qRoHx0s6pEIRV8N" +
- "xbCsclUVRe1t0Tr9/qt689+zMRbOMBXqvBVD8KyFEO9HimPzqLzwaL5e+3ZBPN5Y" +
- "7c/Kfp4kQCKdTjmOa/v154+n3TBe7/D3+v6r+/voinkqWoitVotACCo664ufF4Po" +
- "3J6cfruz8fcQTLL13Kd1yNXLle7zzhNiNjuuwY3dvT6en4e/3/ffT7fX3eKmQXX0" +
- "/wDQj59+yNfHDLb2ngE11HTs1D00z1Rmnx+dfhwbhbzuLp0qd0QHMBspKuzzC3ON" +
- "dfyL9+3rQfBoYPjz4zsDVN+WG7vLnXx9Tr2sSvtE8MUa1li7Bpqrgl9mbKWWkUrS" +
- "xt51NbR1yPPlQlNbX2vpMO6OipAZVCnOzMdCcdMd8ANNA3fU9nxFkfotXt+qp9oP" +
- "k+AQUQa8iUvJUoSVIGwuzKjMpmM+3+Z0JJ9oAjV234RfrNBxtZMos3vCkrhlcmZX" +
- "JZqK1aqYUg1pqK4fwfD1WX0eSASEKQ/xP5j5X1rQTbnv3OI8ip3bm/IdSENUwIVV" +
- "CBlkpUlnZ2REw9p9/blysnsiOzjy+3xKhFfg6Y9VKDt267q3dT8u8J9NhYJotAkH" +
- "UBPU1WdVV2dPq97X2saP9b/I78+d+hJa9dsO8Dq7uuiXBGuVPDdiDl5sgMgCCkTR" +
- "ucudbu90qcSryhxzaniH091sPgD3KHqWgJEDwpMCgIuFF5DDtnI77sGMf+eGrB8U" +
- "CUkTW1qLEWR7RSwstGmUIlsNwAQgEqgykQQLO1knr6u1ttq21Hb6I+XSd9/RPL0/" +
- "pE9I8J/gr8OkY248frxb8ffHG2a4zitLxY9lPyn2k/bD85+59xlp+/KfS6jzTDGV" +
- "KlCSXUKDuGBA2GxzjS7K6hA7uoAgSlLYS2qL/6jhPn+y2y2u3o2Tt0/s8v7+lrl/" +
- "tPT9O/Fvbfdk0V+HtoX6P4/h5fh/Zzr65P+z5dyH9HPb4K1fuqT5PuQMhcP2210T" +
- "TD6Tx8InpqHwj333mVmPK+Lfw/Zy/VOHTmPh/Y4e230Y6cunLw2flSdvb90NP4n7" +
- "P7x+yfRP3enyjwH7P7Pb7p+s+0w6WTLFVJtJ7fRw+3jh93hw0r/PVq20NKhwUT+m" +
- "nppNp/lXTSUy24lK/p9p+x+7bhT5Y/39es1H9J9h/LTt/Ha6djhODEY0qtFflRyn" +
- "0FY5fsE/Dp0+HL/Lb9lnh6YcP0Ym32Y/Rwp+H3k/Kf3z7vTy8I+K+yj22wqny+Ps" +
- "dv3/tbwj0m1dOmO2g8Kfo4emjSqXi3tw+KtNzhy7Y8PwY/U/sn9o/l8PSD+utZcW" +
- "37Ph7krkPur4qw0fu31nGszW2itKPy7n5Y+v8W+vzZf2Onp4K8qjB+bb8v8tOH1H" +
- "B8o/l+O9+G0tG1pa21taN/eU7knnyMCjBUlf4T4Nvg4a8W9DpG34af0dOXz/L8Bt" +
- "/Lo8d/GXPh9HDFcPhj+ngr92if2dHMPk+xw0x+XptPtbdPTbXxbFcOvGltuZktu3" +
- "B29JpHD9/l+75T24fcjp/93tG58fLFy/Nc1mOE2PTw+O7a/KsP1dPKz1Ielp65m3" +
- "Lly5mZmOW2qiqrJOg0SUOpO/Ym4AUdn91ovgujOz4FB0MBZWJO4mPoNtb+7266rf" +
- "z9zM1txqittGlEv4/jbbCTioBO/q3CKi49u7fnvTo05uxVVX8Y0CiogUNx5JLet3" +
- "YPFu7NOEC+62c7AwsFCz2reusG9vMFWax1VlAwU1dUyIEhit6aC7Du7M7VdNstC1" +
- "lXlm7XRkSLM0jajTZqNBA9IW4mqEa7U3XwsODHDZVYjuyTqypLVdoZbqcyjdlRjo" +
- "dkyjWpGBmkajVWlJ1DzMPPfJIIJJJJPAQDIGiiFDI221bW79r+Dx4685zOUWtrbb" +
- "fyOzogfCvL38Olr2TVKbaW0vvu6QF5fnnbMxw4f2Y/dynRyqptyw2Smnj++v21rW" +
- "uHL/Sh6afEfd+rg7tq21/aO38mnw4SfDyY9KYm/9rcSPu/X7Jy8DtpVNp/s39X6P" +
- "xVjyn28Mf2culqrID0/Z9WNK9+LbXseXB+yp9IezTttsnsw0m2J9HPXrTWa1mZcr" +
- "Y5Fj9fX8f16/rtx/W/7ccT29K9P8fS2fRp+r4CerERJEebBr/HVX8Y2yv6ZK4N87" +
- "Oc3/UFSf54kQJDPt4hEQISiNsJ19vv6d5ePOXnLnKlVRMqnKJRN8HOc4eHnBzoIH" +
- "MpAZ5mOq2Kzf1XTznObSPHfYLFdt2e53f+MGA8zED54z4hfEg7rRJfbXkeq33bpR" +
- "ebgJAwUvLQPVZKKFSSDRYI4wwgQCBcqqHmqrcrro/+ISKcn/1pVyxUc+791ve+Gi" +
- "7f91U5/UtURLrEFwxif/K7mLJLLBmTJklllMbAuMlEryqfWitYksSyFR0c9WGSW2" +
- "NMjKZLbGmSTzVb7Jbba9lttvnPje29ykZaxopllRLYrTpUlc4iY8qqyI5d705MZv" +
- "u1ZllGstGZYT7z6Z6plQwqduumGQywMcHwrK86pav3RTHhW18XfjLFYyWbjorjna" +
- "TttpVOBUpg27Ou7MrMMyszLdHBzymitUJ4Tz0dVMpiyXRJDbskep0BN7JGO8mdHV" +
- "Pd1TStUzfsg4eXuWE9PVt2juEFWDZr24eiXW5DE7KjZzEOuNZG7I2ocWRlLYLVvF" +
- "GIucZOLIbpOKjLLUtRat4sjIGnHJoJtX59aGaxoZtSn3kjr/BfvvEueqYoavHjKx" +
- "lfTkQc9PwqlPyjh+1Tjaztea0tZo/XVFD512U2EDj9tVTpSLeu7zGstZacdMaS3H" +
- "LvcS+9fHUcNsArlVO3L8To+YZW3QdvX46+4ZlyqnDs2vzrkqcOL7lnnrnu8/OY54" +
- "O1Vp+VBoMO5sxa7ODUmwnEJvqyTdRq22yZN7KutPTVelXigrJvTW7bYeEeJUxwNk" +
- "NlWq21IcSHn3w6MTx68cHTacUEfeN4zPFzT3uFY7X3XTNafe0tNeKqbVU8s+c5mt" +
- "7E7erU+HTx2Su+OmvhpwPmcIeHwW7qx29oNMLvh0fHz44pNODegO6ZMEIgYczrCT" +
- "WdKk8MDFGSiuOOdBzS1zZzVoqio5kOTtbKzi7aNMZgoHKdbV9Dlq7N0h523x9+6i" +
- "49cdHhy5L3Kdee8uTrlo5JI8MkRs0xx3Jy2Vtbxbho8Fzs+RYy555fVjxRvjk17q" +
- "u+TeMhUNSCJxOGSaXOJIampROLhmaO2zc6CyY2kbd7PgiY9Mkmm76s3Tx7yp8fnf" +
- "E1+NlrW6nhoz1fPXb3ymeTtuRGa89uIgybYSRnch0uU2n5K6nymfCrxsnUc7yc9N" +
- "gY+UCpqeMhw3YTjNExOOB6OpwmBt07D27E2yOkgo92SedsjGFb5T4cKHWuV2M8cF" +
- "8zMy4FsuJXHLaRIdimuHBprXH3TZTtjDi8eLZ0dKHf427eFdKGF72HenvID6MMOn" +
- "bCLWNsgpUEoZZG/vyoPxPnHd+D3Y+H3rpjqclZUisODjFbL69xIOG+QclTpogxxw" +
- "qNO9m2ni+V9vD2uz1tpoxtt5t1PjrlVPhy7WwKnZHuC3ruTKRLY2yUlqGlKqWkiW" +
- "y9iHnhPZO0rN94N2brW8hut0yR51BrPKXs7JGxb5AnRiZTl2Xq1hpiXy8iczq1p0" +
- "4OUvW9g8WPrtcenxbXL58ic8LgbnL1I0m4MeNSM4zVJrWW9uI3DW3tqHzluUwxR9" +
- "+s0Vc0hpweORY4VOtNXbALUCyXLqNFcCR7xxw8jTkStO873DPfY017vHfEhE5xAu" +
- "lh+U9Pt+W9++O/u05zeb4c7pzjRaWurtlU91y/Pj38bnSo+8PfvF8I5SNJ62aL20" +
- "QZtJUXrrTO3rYPXw+NeuFWmevi1C41Gt1m2DMqHmySGsXd4XEMFkBpCUlZSTWAUm" +
- "a5gWmZLEQcLCwtjR0rZplkWrZuMqsNpWrMyvBJ5/Gff5lT3FTnKql0x9H4PU/DTX" +
- "OxAXime7qULq7DqoaFW7tVaVWymOAghDdEltpIwwyIooHivfPjSHoqKy0NCBIRpB" +
- "IGQK8fXhPBpMTMhc4OCJWMuxlIYammJ2sgEEXEs8oDopthFpLOUlVTJVAqKGFoiu" +
- "fFmCKtsq1oM33uOW59vV16cDSvt7p7+u80IySXnVy5lF3Mz5ZLDu9ZrDzoUPrekc" +
- "9Ie3XnPlekWLviZo7sWzm9WT4r4vmvd4+Mn1zI9eadvv8/FYv0fllb9OdHfmF98c" +
- "xiihhSVRBRSemqq32pgz4bzMD6OjNYamHHHp0WsLbYyKxZ3mLD52kY91zW6fPB9d" +
- "GObcd2fPPjX0d4du7bA4tvfmSzb6t9NouC2GU+LHHGJNXK4s3xiY6MfbxT4Z83cZ" +
- "UuZDLGk0mY/Z/iHrRxSY3S1SG9mvzS+bvxc44Th6JqNHLLC4ZR+p+NfpU+sMTeHg" +
- "a67ZI7LO0gsjRa278NqHpyOH+PRsdMcqF5x65vjp0KeJjqR4dknzo+Zsle+oZmSN" +
- "f8ttztuTWnh+4V2fpXP02u7ttibExiUsNhbdfPzh1+rQ09U+enFtXS5qQkjjxMd8" +
- "MkkY56cYwqZcb6vi222vU9cyYersXMh7cOOI2Y7Viz6BNspac/J9fjp3RQw/gqpU" +
- "1kIPpx1mbn6DEJI5wLjKElOj3z3XAvFr+HD+fSn8rhs166dJp1CBw82PeVw26dIv" +
- "7MUi/KQbLXXHt4nPh0fSOYs35zI1WtZGrbfqaOvlNp6VywnitCl7G/RjngwTGOXw" +
- "v3ThnnFFDb8PHJ2lL1vMzxiXS7Hci9P169PULTtp8MorSZB25VNA4Pw6X609+3Vz" +
- "WTVcyRy2dbt8H177mEWSRvh8M+vSerjnx/SZfuZ0beIXSUuzna/Om+czLbbbVfTz" +
- "54naAdd+pE26qa+jh4iOkG3g+U1FmjxmGX6Gj40+jLEntyrIn7/D+T8fy1+Pjjup" +
- "Bc3CtbNuXO2tRdulIu21ItGsL9ccDt6aEtrxfwXjqcDx58HqqhesQkkFR5Hw5s+Y" +
- "95rjxZ49Zxzzzs55zny5Y/Trf42ninShp2tC5MykPXPDq/HSuOcy/Hrg+uXOZjhw" +
- "qpi7evQ+G3aueLbIW2pPLBOXPB2k0qeWcvH8dPX3537NGVVjFVhhjKxliVkqkjay" +
- "ptqZq2S1WktJVZNtVJa0VtCm2mzbZsiNNZVVSy2ti1tS2Sq3md9hy4638z5PHNMz" +
- "Ix3IfMkD8jgU/hevg0z6O9vrhfx2u0pdXi4ooddn1WwLTt3u0dtfx13/DwegMQYQ" +
- "wdp85zgwAfA3hJq69eh7Lu7zLGHl5V6eivCu1elHunTwnjRy61p714uThUcOOcz8" +
- "O1cqxabWOunLt5Rw9iSJHt3F3y3WWZdtujHhx50iRPHtKachw2vnz8eK369x98Ov" +
- "hw2vztQt4JRlnK9QFCycOHEpchMB0Ym5SeIlIUMnPFcafA3klDSwWSTX9VVFP3k/" +
- "KQ0+nzF4rj5wtvArh604+dqCN3Qjz0VcqypVmrlXVlSVcqyiSeckRld1JlJlRlJB" +
- "zmlk1LS0RqoTfWN3vzzprfXjY+ZUWT9c+ednqsvvSSJCkAXphQSFpCgXIwRJFQeP" +
- "HfxpU2Op7pg4ZhX80D8P0HcE+tvtafe0PslS2h6bEUphB+Trt9zcMySlFfrXx8s6" +
- "aKGUneDdfjQ99/yYfX7l9meCDI/bvJDJAQgdu6SzNW3eZlBQykZoKrwo37d0TaW2" +
- "0DnfHOPJfg278PvnXg+re/l0U+vfj83QmJIyIhDN53JH5Px9XhPr2/DXcY+NzGJO" +
- "6t1p8J77+GH2+xfbwXyN7S7ySU8e36ZcY2cmX9ZqJVTbyyJ9LNd2Hy9pFJjOJx48" +
- "YJh9fxDDVU7nuPtjdzVxq4025elJxy5kTGLIXu3JDla90qnLmi/u/hOXSqnQu+mf" +
- "lpHZt8sRqH7saHSSEQXU251XwY4dOFRt18lS6cUnTgWreu+m18JO/RkmYWb9Oofm" +
- "aH1PPXk244ZeFEhws+fI7cknaR6D4fDdfBuITwr5+BweumnDtjA5GjvZpuOHS0si" +
- "Djw9vK9vVXw3M4takTts7RicqcARg31RQ03CvXwCPOWh+DxPrrPL04oI3S1HWXPL" +
- "V28NsefHEu5KGKEqe8NJPYLCCHQMJCQ7PR5y21rbPLh6zyKm7rpxn60/GG3l6l0b" +
- "Mqm2VCL8CsOWG2Qe5VVUemVS2xUlz8FNVTjEzB3gTsxNJ2NL8fkcfOEhUaCuYPW1" +
- "wuNRLHrVBHPnUBbfGqqnLbx2unVlEqcfFU674T6+c8eHON8cbcPxnVY79dPSQXrj" +
- "j02ctOXInljHDTacJEg5ZB5GNDvHrWNOquSOU5GHgGIrXB8Q3PTh49XFuZnMke3D" +
- "Pi349tnTc2x78ZbabfvzMff1Q00qpoqlPdKqaqUObw73hT5rm2u3Djb92qrt3QRw" +
- "acoV3xS8qpNypaaM8CBy9599F75+N8/OM7xre29w+OXpOnjtyeGSEgrypPNCAvLz" +
- "gjvv0nE4N8L06x27SNPjUeRJEjXk3zlzOGsVtiMq9O5Hkcp2VPh8K+XJ7XZx9Zvt" +
- "531nPHGb550jpsrvKpnZ7X182tPp4nB2m23Dj50a+PuHwWvHvJzCvWfD1elNOsfN" +
- "SEgw75bTbwkkc52410eGuLbzmZkZvvVmtPrz195lSMXTdO+GvWa25VN0UMpetNG+" +
- "NwU07IY+Tmk5PCX1drtxw6VwlEnsyq9FxYhCRtIhPTOT09a7ZutZpiLA6pDtYY3V" +
- "5igfFU4zU4brTy7ejat64Qejh0SJHTSTZ3u3h212EB3mgeekTleTDmSOOVnfrh6P" +
- "Y8ntJJ7Pr2KTqnMOYbga2JznETGW1bGqmrY4zLwt8niQD18xElWURb94FyqjnAZ3" +
- "z6YJ1iOcC2nMPuqLNVQhSiLLqoyCroXV+YwVxq9cddcOZJtS0iqScZGJbLQOBQXO" +
- "HE9q+9mbo5znrM8crxzyCVKhGIK9qoKpR4L0FF29epznKxmhKoosQGVDU2h3Ay47" +
- "SFIJE+nw88FX5l03vzu+JfbrzePF0kBSZvDVsr5KaIWZmJzqUoIpQrMhASe/z86c" +
- "6HyL3ZqezLvn2w0+aVZ7vTMRFUZPLRe7Rk+Uox4XrFfp8/Xz18+/jybiRw7VvURT" +
- "5MeVT3Td4+Ma5xHFTVt3xxqcror7cx5cZbWPo78+Fcp3j1jCSRIxTy4+XByxM192" +
- "To8aO6enDlp8Tpwnp5LwvE56l2zffqYlRPPQ4gQywiSLYYacvPXtw/DHocyrt2j0" +
- "e/enNm57m0qsB8YrRH1Lrhwgi85HTIViqnpHjX5odbWnqdJNpywNzy5F55CTpz3b" +
- "Offvji3GWujD788zPCvnTt/r5SH4mbMvVznmrtcufVxUd3tFD8H+XCVA9+aArHR5" +
- "t2MPNpfFspyylwe0mEjs5oJOvfjxfnnNXNbdJPJ5YcaYgXzEbNNe/DNpS95PXWbX" +
- "Lj5me++lriwkeI4ck6bca2nHauuzfPTyrxRXIm23TPacNjajfNUa97T754q3c0rP" +
- "IE5Nere/DaZzyBPTHL667M6YMUiwUw84c4W+5rlfVR6zxCzaeKly9x9x6DhaooPI" +
- "1CNpPHVtq129Z3bpzpOM14nhw8c8mvgVGdYiu3n1jtni6FPTxEt8uOLVAnqxzGvU" +
- "4XXlc09EDkrS68VHEuLovfh0kKjn16nx2624KnuSnHXYVkIprh8uKrXkxp5Z3aqc" +
- "aeE59GkSJ0a8drt6aX+06Y9W1WYqdPi+di9Pw6evm8zGnrTzvvv+GSuG79/XDiov" +
- "H0qepaxPYPTbhXBj1xR4w6Tg6NcOybV4+Om+3X41ItLvfGlU341TWO2R7tSuZO+O" +
- "3asyajzIENvnh5J4Xw8OuDlfBN8GUCx4420ZVU52z250coXTppy6fELl7Rjpy+nP" +
- "x28cG3ng7sNCRkisEe3Ltzt62dtbszTgXpLw27ePvRw+vlFcKR0ekbTaMSHDJB5e" +
- "nZ8vLbTt78dG25fCwkJ//etW1scxPdFsVVsi0tFqS177RsuXJMklSkhrEjSwORa5" +
- "3WlxTnZfjFJJ8qqYtJkGIYaQX+CRXd/3dKH8uAJ8Y9cu+OcSSPAL6Gs336Z468Zz" +
- "vNxQRIyXt3dm7s0SAwKIJ5wEk8AwcCHFznBwg8o1kzNO72t3vAPY+sfngZ9dFb0o" +
- "+X4H6XmWneYezTTiKIZ4CUUD4QEQCdPGmwTwkyTaXmJ2d+i8PAPAvDjERepd2Z2U" +
- "tFeZqfopOh7VAjAeQ8BPpenxxACAkEQhEExObQ9XlR+e37Iw1mN+ICD34z4TEzKK" +
- "dyQ5oUQnsRgHH1l1ker09IZ4KIqyrFUOLmqZbKLYUGaGAgOcGgdbwVvRho1lbYNU" +
- "cdPj1zU4ogY7l1TxfNNPT+zP92ta1Xu6TpY6QeISM9/hrny59kjOErh+Ht2BPj57" +
- "6L5BzgoCDQAx6HNqd9+Dyvbt27Lq3osAuFDt/Zv5zu78vxMXPz5rDDqp1z+Pi2nh" +
- "zxuQkFAnqvWm2HD09db9dvJvpZ775mY/Nd5n5du34vVU6F+N+jTb5SesToqJfaen" +
- "DXwdO+bu81I8knny2dLk+lPtFD493Hx70x8+ZnD/LrkygIFr4AcZGrTDQcMwVWSB" +
- "UIKC4cStoBZZEzt+9tptwYhbUixKXVLSo3XvhOmipnoTQ+XBJCdfHJ8r47yZmPlN" +
- "tp88W+HnzreZnj2dX2cPfT3zCQm3ifI8tvCeDfBNnl0nnzDynndrPNObjUhIM70k" +
- "+Phvzu5niebfbE8NY1HHuJBzqbt41px6TjT2wnuOfnskTlZwenlVTqj+HnLFtEu3" +
- "oQOnRi96VHqH1D1c+g/IZ9nQp1cZlfv1606UPjEUVw/C6dh+Pz4Dro+bIdOl2OTP" +
- "vLTZ5+7/XSX29Bv0PSCdHY28GJ5eY3ddXvTet3d8H187Yn31vrt8fNKu1D4+cOuX" +
- "InT13p65ql8fJv74217Pm/vXbqk3NtnkqrqnTkK7wpfdhA+r975xmcNIp7Twznji" +
- "evTlp74w9peduGxXiNdczaymNYnPSSSSFdH57db5cA+GzcQeEkOBjPVentzlrtHQ" +
- "fBtWJ18UIb3yjguww+BUcg8J5eHbljZU09Ja1euOjrmjp59ooZ2hzKN2Qay4mLA1" +
- "pTOLMipVkiB0k7w4rISoDm5vGxYTTI8ymFxmtm+OGuNY5ZPbcqyxJP8qLkqcrsuN" +
- "XvVCjgr1Q3zy6o5T0ZznGJlVeY1Td52qu2m5V2aq1GXbu10ddY3rOrpy0u3G0gaI" +
- "oCqoGaZwMADnKp1up7vrdzvSOe91CCUrW9pWJcngyfSVtIngw8zxCUFzpAJs+tb5" +
- "Zsn1j4Dp7628zYe6Rgm2wa9FYc1vkPNMB5NQ8Ic3l160dXv1c6zek8W9yRs1O1TS" +
- "z1rN1EhwklOMD2NGX6ryTXTqgq+B6Y+TGD0AgzsO3XvudNp0bcBy7fASeOUcunRo" +
- "167Ew2GNnFZG/O7eEsenI5SHrvvWZ2addPjD+TtfXdODuwvq5huPLaODCtE0ntOn" +
- "L4e8t7dJ5M07bNC1FSRtpsdzzppPfI7dxw1640x8bjJekxsa5Y8VNtjEcBtCWwcl" +
- "ZTbCJcD8HrfbHN5KHTo4Fp819fe92ONY4erddMSl2w76PG6tcHtZwrlPXKVGjFac" +
- "1j+rOTbp5jOXJwuP10ofsoU9Td33dv3n1t2cqdfj9Pvyqk2efPmZ48XTl0KlODvM" +
- "5h0nx+MfdEOnxtt86WaVU/eucz4+eu3ZVKY+v3r850xVTdadrjormihyN/evHXTl" +
- "OFR1cY65NTCcRp8FenYLLIlUW8sJOnpScPWt7tZIJtsSOmHB33atvt8eF2+HHiQg" +
- "NCRxrt5ejjpt8Lh0U4HvntHLtejv64WuYovx4cvjudsIfUUV5bOXl6xXKF8KXjpP" +
- "vQ+fOmXao1fF8OImWnu/i1atr4deV54zS60z0kRUkUeKm8HijJ0r4pFq7Fh+ZW0p" +
- "aNBfXr10NlfrR0278/Td06Kxn1/HSm+H8Kqdssebvr9V00fgPx9owrAzk/h42KL1" +
- "67fvfB4VPiUIfGBcH0P4etPoVyKa5fXxT68OOsAuVItPWj1w165dPPO3Prp1euH7" +
- "9fds6coXoqU5gR9Lj1cVXDfOfUFnHKJcn73553ve94fphI76boE5x5eZtBy+Ht3z" +
- "2NsO2PGCnbwrDt+Pq4KodNhA28Ozw9e3Tlac0vVRrljGXXjK74Z2eHlKbXHRrpJ2" +
- "M2gxJI5S8WzbWJB5fOzzK0ngIDK6THQVqb+66e221x72x9UW+rxDexdJ8d+/O9Zr" +
- "M1mXw8jyxjie+j29RJENvabZofCnhWL1wD3ljj4BcQ54OO0GkHSQe/IN7t4HfjuD" +
- "tPHLp3KlkOazq8sUy9Y3tjOLJlCzMmaWi4d78Kd+VQ0sVjFFisKSwqlNNSpaCyMY" +
- "JhUqbN41WLJEmRFsshFLI70wpzxVDVJQOGVDMCz+Yz50FeeCnxee+p0OKhjnr5nP" +
- "et8cb4wgYO5ud9c665eXro2ZltpaqQ2VAWc7xIg8F9WbmVmuss1wH46NPSq6o+75" +
- "r6ndGvN2auHmEkDx6GEenCEQjUVKH6S7o7nqeTy/VH1TrvmVfi24LBBw8xYwSNpE" +
- "8sJnV1c5fbaj7DwBMORMfPLNZvLOcobrd4s2vvkgcp4VXw0SckHZ8PbX4yw2pF80" +
- "01SGzT3e1kxTTTd04UOGN4uYNHi8W+3ItR+t5UkOHvho7WGOo9fXnnm5jU28kkcn" +
- "h8ar34DKQz8PS+0UNLpvX12vxVVT4FixZRLGVTCKg7d6NpMKY20fHFHbPHAd9cW8" +
- "W3B6uvHn1lut71682+3b0eekCcIhIfPBfemlNvtyBHAV/OuTYkcsZ7vxb3PCthAc" +
- "J5Tp8ErwsxlI0n3rzjvR4rr5meB17QHbhSBLIyHa1ZzsIKrDw6gTDhlwJiwFxV7C" +
- "TiTvjH4uOQLhBYpFs7g9iZz1eObpyecFTp09Ydve/h67KmyAMb5631VNtmzEgiaH" +
- "voEEA9jOcHBB6Y5jttTflN4ntsbyJB2kkiqnekzu324+Oz6u+mggPLyZ359BJ5B0" +
- "H75vv+O98cccbcv12976z0kU9dPnSF745HyYQ33cpPXoOXLOhUp0DfHblUbbed8u" +
- "lr64ejy5Ydw69Z2I9N+ed8a3ve9zh58tTm3kTpI2VpN8Mb84XPTbiYlSnHxsVKd7" +
- "5NOQ9jvhPHro9jznCFWeydPNaNzME08nR6LWss1Ouel7em2Jvht075zNukuFDuk1" +
- "adIWgfePGTgVKdrr4ziPTO8PPDtjuAh51atsnp486Ws04OcX3GrzMsVSx9Po989d" +
- "4u9uULJywb+G3r10Y9F054GPrm4+L04ZJJkqxvxw8zVtr078cZmaVPNF8eWOnzjt" +
- "m+Dzp6MOXKqbXT5aKmzzblVTg1w8Fy8+g7bfFrpVSnXPW1fHbb1XDGGpmJERNfAa" +
- "YbUdLIY1MzGDJvWaVJua1NSM8i0YiLdVbblrW5bVtO8YJSMqFKEhgmDmWUhjLJDM" +
- "DKMoiZY0CluHGm7ksuQolpmExItaAGFEt1JhFAmUBNrbKCiJTAyJZtArEMXRREHC" +
- "ZTHBRGRExxlmSkstEbmFe7IABXoWWFGHTOoGks2lkVQKlwsertIkulaYxU1YkYar" +
- "IugRakIpIA20qUYZmFcabhmNazfPjwNMIdbaUG3czeq/mv+/sp9452V9fRjeX3nA" +
- "+uetKRd6dGlzfHRVjgAwXV1frY5IFJFDJHyc4IKXOHll1l7lpW8epW5ML2nMCWfF" +
- "zdoNoJaHyyw0D1bEtW98yTVcnh6l4fNM870OjJT1pY+N9aOlHSOoPVAjvfOy6XY2" +
- "YjllLzgBwOAG54zy9JMd5d5Q8hgek7RpQ8GnkrxxqqbKdNcHfWnS55Ncmdbrjhq8" +
- "o7ZUGlvWBfCumh2vHI1+9s962fXxMfAcquYF86TrDOPl1vW8b/pXKecTuBeH0U+L" +
- "2fGp45XJw718Z9c+sP5PnLvB4ymlt2KlHLXaTto+Lz741xvN7za4jqJInjts1qe5" +
- "S8qL8mlDH49Q5+dZrXjzpsqcd5m9LldKpvtv4EDZ8DPrN/Putb32490+paWvg7pO" +
- "vrlKWmnnI72+pedYn31Y0duGm3a9uBOGOHp0h1SV29OedcZxres3mbt32npptw7E" +
- "xetpdUUOnblLt5m2eaqlyh4KfAeqHL66aztyzHfh69Zol/TfR5kRkieuPNq2+3lo" +
- "JODHljhPalUp+OsY+bVGsXp3+KNK9OtuXLOAJqZoZPU24tuyRwnGurXKohrzvvvN" +
- "a1ts2nXKnipqQDwxOu8bJI6ZfCCZCNw6XfbiBozK29Oz5zmLqvm1x9cipT7Klty8" +
- "pOF329uON9fPvbr1pzeMpPe+Hr3sIHq4+uc3mZ3PLvZO09OHTzESDs426htwdn3f" +
- "VRW3ZttTnnnM+rHbw7G+GlU7XPMqrzx1qcbOsdvGePMYn1vf33e97bkXTF7M1573" +
- "x3nTpy0frx3VKHxzqqHTh4ED3htxzp0rR7w7XpnFbjBaMsMAti2WdMGWWphmA3IG" +
- "ILJKMBLTKBQMAVWSsjIorJMWW8bZqzbphIxqPLNyrUqhpj+j5VOekvjvVUYBwAAa" +
- "KM8rSbnby5mMvMGZKspWru7uiVau7t3V3cu7uqaSIWAE8B4eAc8bruXXY8ta9Ryl" +
- "s10jpy+y++675d2EUSCjzzqZO093qYXV3T5vii7tdBPVdZIj3ygmbS4u+tw9U5gd" +
- "efWVrXZ6tawSHPWTXMsxnk4iq+i56tphw8+ToZ4O5ATgW0MkEcLw296lNsfrDk50" +
- "J1jPLRV90fWN0hz8XrpcPBenvXi8edeZs4mllq+utW458+TOnpnKJE+E9OPI7Lq6" +
- "OG1pjRt3w5fVc9jp+Ncu5Uh7FTth7vi3HHbwktHIvTl5d+3CHhU0LhwySh1NMXTX" +
- "faqcvPWZmV6OkmSyxFrWcJrWi1kksrvvgqr6xW9zj1ymeq4dcNajmbSDkR2mTlry" +
- "5AnE7fgk9Tk978Fs2pXhPvjltkl3AXoF93yfjrr84+98655556eaKe/TcvX8+tDp" +
- "+Pi1RQ8fdUu2pvFdMbdPAQGNN8ivU7S9Ryc166k8yJc5IdVFdb88+uu+/zeZveuG" +
- "j1wuL35UllCnrTCt7IYcNxThFFbQtqjNZgXr60baY2hffWp4+ubvM/NIWzW5Uj1D" +
- "p8eU+ZTg3naukLoZzl+a1n3vGta8samSFp7nvlKVuVxKevXTjTg2duJ3SfNK066b" +
- "lwcPF5xw2+0cZJzrx68c3veNZrGOHXbTSSRwPSDE242fCWz4vTsVKYqOF4bx775p" +
- "0xeOddrOpVXqcPaqqOW22WtV88c4xmZY7dL6ei956V67bbVtWu+nzM5fLQ6pS9sJ" +
- "RXrzSp0cNSpHqF1oswXg7xoeipTO2OO3gSMFkwqyWwWmzzmd5mSrkIb9W0R4V052" +
- "4SQ8m/L07yCFN+NEinDh32PHfHDzfDTYp2pF9vXXneZ84x6vcPRzRtDb1rS9KNoj" +
- "G3tt8trVSm4nKzy3R6xxhOMVR5krVhMyjGXOrVEkqjaow3ghlCSpZNWBcVaxL3Fc" +
- "Y9ZJpkrnJzlzh3m8wze+XP8uV2KlNuHovYPm99afPmu8VUqUJ47l3jmZl5eHCqbb" +
- "HO7xlEBFcBA5Jb3t32Zl9tPvd2smGycKE9uyfDQQPDS8Ltb4qBF9a8qnudmpDwX4" +
- "+wdtdWPrzp5ZJ51IafAcnZAsPkypcqpRFBAcxIYWs3vTR50fEtvnqdcUo/dUXwei" +
- "bTydGiJ4PFIOWjex8NM77ddunuIT3rfm5Wc23BHly1Kmmj152czh1j2qUpWYqJEq" +
- "vL10rcCedpLOreZEjlnPpzu3bt2Pe9pIbbhG5VdskX49R4c9PrbZr3tVMdOn17de" +
- "nw+aNedrTuVI+Pjo67O359n1jijiSSJ9jstJAwAWh6D6ObOekTEOeh3nAr2g7ynr" +
- "8xXTOMYFcwj5xiIpx8cwczh8LfyjzhSPBt74x6zvdzHlySLo8nCSRsk0eS6TRbxm" +
- "Z3wnmxmnHMkNhygxjtJKwkU83mOviqqNjty5d4e44KmUaw855t7i6cPI8nbp5Sqj" +
- "jbpFk2djdy3yk88pG+mJSHbOXfhw58IK24kkSC+DzcXXnNW612O4HXcPOwd+O0Fl" +
- "8PvuZjsCx5376uzwIG+WIPHLtDGueXTEg7dMzfR0JnnGHYm9idAqLLCyKsqxZVXx" +
- "lbdLKpppSUky2SmfGld42pFyh9d+861rCugePr6r6xOggdtdPr4hx457uTlQ/lju" +
- "vcrnltjnbtqu9rUk6cL7e+9cX1mt71d5mJrs2PD2zySR16d72kTx67dPB2rKOy76" +
- "78XpyWhUp8dXq0t/AX04768zWa18ejz5cuUnls27TZy4O2rxRtxcg11S6cfNoYO+" +
- "+madlcs6drb67VY8K3zSk4YqtLvupO/Da6JNXUsg3mJLapKtWFixTMIxiMYqYxW1" +
- "DMkpmVKMqXrbSzMt9/sqIqP+t/93+I/0n5Sn7T+QT8zf0X7f+TD+B4CttqUP4hlE" +
- "RRRTARIfupD+YUw/Q0KfxO/YVFVv5cOFw/8J24f+hMf6Mf+DF/3MXL//P7Nv+9/D" +
- "R8PD7NE/L5Y0/73/Q5TalV9v/fbLbfTY6Wd/hbKsn7vhvhcttfh9p/Rx9F7ThpoO" +
- "zo/of+imn7jnrLbavsef4r/UcA+RPuf3Q+f9UqkU/8ap/+MFIjMqlZkqslsVZsrV" +
- "JUlRZLa2yy2qaRaWWqRTKzaZooGCAwg+x/nV+FYg+fi2+gz8s/Z89W73ufUfZfMZ" +
- "rG5jSeX2+tXiLy5tM25ZFqjVUHVXHVO7t3Rjfk7WWV5Xd3zfCC7d74/Bsvzb8BBp" +
- "uu3U3zvXOnzxjyszB3F1Lpzy88Auvjt8OJfX88hg8tvPa23zrze8IBCEkACBACSe" +
- "svoy46IiKqqiKiKrmbpczNUAkJJCTVerLbqur773rXpy1c6c7tea+Z7XygAnXQEQ" +
- "RJmCo+i1VHsgGMnt6oTG4h52C6u8SvLrMP/waB4Bwc2A8sBaDwhBB/o7aeobMefe" +
- "uPi73vZt7rVet2rb0T0fQ/9rykNCbO/hd3LcnNv0nxbJpOOM9dbX3aauDKzP4RVk" +
- "8gGChiP3tin+2Ko0zGvv8rm997r3xV1pt67QJwiEFqEG2tbkdFH93DBwDjIPBfPi" +
- "1V5aFeIAHWiKoxX7fYcN7XsJzs2YByCqCB9JkFUVQVTA6PRvzz5effmf8/OC9PMp" +
- "C+ZtzACFV1K3GMDvG5p00Ri2rRwdRGfGJGZluZmRrhVWSvlPXhbVm0jUeerZfHWX" +
- "OyPb4dvG7fq7d2YuV64ePXrvx6mb41zvjnrfDiqrwFcQ9VbJCMKmIWYsyFKsKZAp" +
- "mGYZYsykKYZSrJYGZBVZVDChZKsAxJMKFRiFQZVKxBZKLJJhJTbbapSlmzRec3cV" +
- "XShD4BDzmq1wkRIYPpUFVy20DjqcYA1wAOHwq+O9r3vWre0sCbAG9xdKyeSrfivb" +
- "QO34ZArRrbCmGhJ6LPbla+t+POc5nw7qzbdSzdq7p0eJSUbVXZtq6NOrQouWy7TR" +
- "Es2HZNRu1Stu7Ysi26gMq7VS751zzvXPF5506HQJCRi6HLltz9uN8Xm7zDLmXMwz" +
- "p7a33LluY0zKuVZCe1T/O/Vl8LrrrqrrpOIUG2dJip/z1f+mv/K98HqwOlWunXPV" +
- "64nVSTpZbdoyVil8PHTcq/c4iSP+Kkth+WA/sxSm2JD/tMfEf8rSNT+n1kfxMmZY" +
- "y5UmMVMVJ8ZbwcyYSf/ThUxkMMoOz+R2qaP6HTarlv9RaiqxhI8PDkHT+8nW3ZOm" +
- "t1jbpR/acHDtXbA6Tww1EzKi2KTySO7N2ZTCkq7jYh702RpxAodJwef/IaXmsXK/" +
- "lMbLbeD/FpyuGQfEv6LSrGVZhmSxSSgoikttRbLU9uW0NrwxmKrwfsj9zZ07ekki" +
- "Ej2irVcqtMxjTEjVXdf6P9p/KOcsyr/syrMkfUEhI+3yT4fG7atVVren4qxU6V/T" +
- "taOFf5Mj/xYPqwPYq8bLlYHT7x9X86t2frOsP+5UnmbJUjANvKTCvZwkj4T2/Xbt" +
- "J9f3uJLlxpGGJJwQ+9LUNxUfu/pLKj7vl9RwfBGH822fqJ8ukk8mkR2V7eCdNCih" +
- "4rqR/FLZ4nb6xyNCn1IfeRyyRO0OnsT1CDQ+jZX2q4iaXcThcJadGG5K+NMY2w4X" +
- "V16pdJLb4bb6ykpDJjVVSiyDx2/Ppatf7fHfqTzbxrUmrdbU+rGg1FD5mI/V8tSf" +
- "V8o1D9E2nlH/Sfrsr/yHD/OP4SeoUU/V+sYwlSp/5mPQ/3D64aVkKRGlSewWP9VC" +
- "GFgUGZCQwsROn6CqH9BPpvLYlK20kmjUqRVZgh9aaGzdo/4oxbVDFP9/xGOTxP+x" +
- "g6H8uhV0ykMME8OXjcocLSqeqxYyhl2P6/5Hp5nNLf8IonRUqUNjY/DbO5llxWJF" +
- "SKUSsy3EiYhPJ+cGHd98MzE64M+DAkD4YiKRisRkTDMpmR+sxk9icopWw4WnC1/0" +
- "5aVMf79WMpaf9tje5Pm9MTeot7xUVJUoSR1ibG8TG+mE9pDBpFKsllWe3HKtI8x6" +
- "SfEmFttpJpEsCWDSlS/NdtwJ44ls8MVRi1bmLU08xzI4bQf8lyf3o/X58cfuZXke" +
- "jA9K/Wkv/oCpOX8AoptO3imxpWsWZVKaPlFYOn5ekY1bMWGWYopWjCWGKaLTIGkP" +
- "wFSZp1BRTc+o1ds/D/mY0uThaKlVSilOHlj2XFcG5JxLZUjayIhAAACEhJTX703r" +
- "bKxG0kYoRihhijZMYwxZWGEbWSBqVDlZMpZTZStskllbfWleql5taVJKGgnkxRrC" +
- "VSqptInylG2SrIwx+wwoppFCiU2sGh/NQbbQhTFWSmMltqpy9NIxK+lX6Y+UYTIb" +
- "ZDzMDN6G/c8HjdYsVEVWSZxbtU0dN3q1u3bFRfC4kqOpVSPLo0pZSIiQOFnZ0d4q" +
- "sQkz4Qqa1DlekfEJApicdLA4a9OMxhyvFegkCmuM2yHU5NScI25iY4U24jHLltts" +
- "7StNCk4frJzwu0Y6VjDDFk5RppNKqlRASOcpVq3MyVYiVt25mTCT+oTRDRPR2CKq" +
- "KWrVqlUrlqaNSrjDopxKbp6upXldb1PU9s4hJGJA1VbLTiRJ7eok2sM+UHLbthMQ" +
- "UFfLLbZVqqyVK+p1Equ3tpthzYl7KWLEMTEq4Ll3YoV5stLbid+m7alklmvcxMyY" +
- "aGFGVGL1wYwx7R6xjFy7cn0pouDotHyZkzo/hptTZOkPyO1emWMxhjZLl04IdDYK" +
- "mkh1kK4y2TMxcjHDmvtbZMWE+zDHXCnuD8yQLIjg4UlcKxjHr9gopzYxfuda1rEs" +
- "eHCK6OCQ6xT4Pju3n5/X9kkiEj6cN+/vl+uaZ5gYN/g5JlAUHSDiUhoOAhwMFMVB" +
- "c3DDHMN3DFulS0xrgWmW4W5cMuZhWta1rW21tbbRzrJVtBe+ulvYM/s8dPjcuY66" +
- "qqqisgnSPat2gVwbVEysKVgXdk1QJsk8RJCBD2v8tenlrnM3edFeqa8Zu7mq1raU" +
- "mEZP6xTGt6zMkdvq9uZwdp7PTR2nSvKidMcnTDZCbRQfLpsjVtrN222z1LI9jbbS" +
- "Yde7dtk6DgycBMmW9OTcaTFMfB8NtuYiTvVscobNGKRo6Wb4zDniY3e2mSmsjJQJ" +
- "4EQ2vqQkRVGM8qYh3v0q2rPteqmFz2k1KQNMUOrLk2hBsGYs7NRoFGZ5rKHrKVFW" +
- "Up3oJ4GS+bM2pvedTh2+z59qcemFaIM+lnMKY/XLM2leOJtTiZEVfbeon1+vwZOB" +
- "hQgviaCMyAjYhRqyLmywXa6sJtAjY0ekbBVdHErI5ucHJgQ4jsRIimS+VhHvLz2P" +
- "o9PoKp4fLy9uDHljDyKyG7cVtjlTlwPJ2wD56Xk02ttipijbGTs6TRK6R26babRK" +
- "3K25I5U6OTolR0fLt24J9HaeVeHM4svhpuNNlYp5eDRNLKaWrGQiqmZbs0Tlo8Bp" +
- "tppto4ThGn0cT6OnAeX+R8K25e3KOzaUpVttKUnlUhZWFTasOmERzfpmb6O47lt3" +
- "Whna6EmiB7nAKT0eA/sERTa2uhyCini85zJ/DpU/B/+m3fJ/wH9Y9AkiPcclOX2Y" +
- "n/g2elK/4y2ikYKwUzMZcuJVFe362bbaGluwykCmE8ysyzLFrmryuvj1Xz/S9/AA" +
- "AF15cn4TbNPgsRs7cOFV/dG3g0p+7T5dL60/tdkgpyzk/3v8imkP80cFiv6KUxX9" +
- "LGz9Vfy9n0NI+HBMGjFPGRfU20/oK/wT+7+V6CiR4ktktkvJP6O5j9KtpUGP1T4k" +
- "kf+7GZWMJ/d/NKP8Ksq/q7hRyh+q/vOT/iN1f/NGJt/f9yWf5H9z+wKWITjGZjP2" +
- "GmInSyTkRo2qVStSThT8HxX8MximI2dIqo04dIbQvxbWO2MVGkVTxHSI0R/h0eev" +
- "LpWSyT2p9GP8P1y2m2c1q8325VIvE485eDI9AlOHKGBw4JhDiv5HUmnSO00Q40Je" +
- "rcSSy5GXLGVUp2n0eDpFE6T4Y/r+er5YqJai+n4MphhmLSwD8QKQoGSRJ/o+6YvW" +
- "aSVmfLS2qpnMM9WmHTRzMJxy0qHVaVETOYZ1ScEwOJ9g0NPAmjGk0rStNtsbQ5MG" +
- "2BivKYNI9Fvbiqv8b+qqdv6PL9GI+O0lco7fpI4cEi8XLlw2kn5YnpWFTwgTabky" +
- "liH7Ax+fy+323r5BIEhez17ddXMxVVQFUOdlCkEiQJigNAR9MV9a+Xx16vk7dzgH" +
- "lDoGcCQ74xnfnz3rzzvXO4dlaYNK5NOUkh4fqSweoaJidvSK2eXFtkPPEfCh9Gkm" +
- "XRyk9PzmZVzMqjDGleXlHlJE5ZMZSrZt/Vu5MHK/2HZNP2ivmSPQ/6qw/Hu3mR+n" +
- "CmQgJH8fUlH/NlVMZjKHCWNsfyX3+p/53h/1MZA1UFrEx/2ManCu/BiYs5NIwfyV" +
- "9hsjSn/V9nhY5PhjI7Ullm1JVllLfJtZNrGVSVH0hBWtW0eniUKWCpQplb1tteSG" +
- "W0qTK02llaKdJIwk+rhGI29xHeDU7WszdtKrDKsoRP1Geg1MyhiYmBApJgHZ+sFf" +
- "yDkcXDK/ydg+VJSP5sSdLVsKtSHjkwmzZhbIuvbvTXnHN1BiMYylZk7k/LKCYDYH" +
- "X13JBDq8YZURZWoixpkaIyJuN7+dTwztXv57+nThHDDHBkYhVKpPSK0UGMMYTbsK" +
- "VqDzx4I8qh0+G90AAla9VKVWaW0s7IZmGGCsGJhhSnC6DSPacu07EkRI5jWcLUjw" +
- "/d2+p5LbfLw/ft4tspaVjDMYWjCpQqLBUhDSjgT+k9T8hNA7KVTkkn2GnDBRs4gq" +
- "HgJXCnB8vaJ5e0/l/WLbZbFLFUpVRJECIT7iSv69sHJkTAi1mJkzExpMsxUqaYaU" +
- "miWTRpNtI5UcttEXFPVdQaiwV/wNOFTaFSaL45y+41lrMYcvR0CijhslcNI/0x5X" +
- "Yo0kXy7cq/RMSNtOU8qn+U1IPp+mXMmZbhJ0PZ5BISOpVSySG3jR/pLeKmXKxwbv" +
- "w08D+N6WzGTJkSeyhTax4Km0mkp+2qVI0rFU2n8SvhDnkx7T+ba3mQuaiT5PhZj/" +
- "BPIPTKvh1If7V05H+Z/nVSKcn+SK/2dX9F/Uvj+tYktW6Y9SJs9U8H2+uGZNORKn" +
- "w6+2/Cqtq2vpfTblsuXEmsGzllqypVLFYDCVIQ9J3NuEfwGnxGlfyMeYjQf6WRG+" +
- "x+JPz9kl/QyP6sMY0xZf5xV/I/U5f+p6o7h0sRjp934eHA9K9T3ZcSNLGkno0CQk" +
- "YVp8JT0vFuFfq7kInwp9TyTE+k95/GX6qj9zhqP1y390T8OTsAJxZv0pBjS09ndu" +
- "/queeVeI9GunPNTJtIrybqni5552x0a9g4GMHRBAAhHYgg4OGOTGIx0md24x2cp1" +
- "ws56tnBhyqW7W22GlI2+w+z4NJHpLENNvsSMmLVcLMVj9GSBNLTXNtfwxi4U4bKw" +
- "MhtuWyY+2mWYp5ttKqpA6paj8vKRxEawvhY0NIfgfiH9z+yajt60n97P+eZ9rS0x" +
- "W0+VV/0sP8sevxzxZkupTbH8sPl/D6tcrSqnhp05PlHCOok2cFqHB+kTvuQ+xWMY" +
- "xjkg4SNqTWUt19K/fat9iuFW5XN8JyNMVvGVP7r82PqvjL7jtfwP8yYr+QqSfsJ/" +
- "jvt2zClUVYzM/e1n9tRN7Zd5buwMVVKqRKoVR2YxVWrU0/hHBU0sekk5eWPDSfeZ" +
- "dQOaqRT0r4rFtLHeZaEkiKs8vN+vcjw/CGRlxRVkq1SPDFexPt0FOvhPFuY6Tbab" +
- "lve6MycQ4l0tzYO2m5eZhoWcZUOk7NTTLtwdLblt25Jy6YaTDpixoPYKKYtMSx4V" +
- "/I+Nn+ZdTDBNJM+LfQOkttkfVOk7faSBw+y2ei5ZhaxgYP9nmnNi2FstI8cfri5j" +
- "4bHPFumZbbbybHMpMg5WROgw+Q29S8lhiiGULhSjSdtjNpsyIlsyhYqxbcJrYw+o" +
- "k8CH6HRjSvDSMVFQqqko0xiIclqrGrAw0hpi/ouV/i2foVy/oK1INsn/LKzEnZt0" +
- "0/TfY/WWsZMkwqJFKpVKpSGE5kJD5cnT5T6BPRj2k+rIH3fSdvy2kEdD9W0T4tsh" +
- "+40PbR+xRPpJN8azaR9OJJrfGcJHGHBw2OTGMmHPduPz+ryTH3/TGTMY0bTThPa/" +
- "xbhjyxUTFkr8JJwYmivf1xmZJq2ySlSoJPBIfK/rASBSF+cM/nZk213bMmBX5laT" +
- "Tg0VqrbakxFiRzCeLg1rQx4xf2Vq/pUjo01d0k/Vy7frMy3JIUqSKj8lG44ZP1xk" +
- "y5bcTEsHL9YMZLGF+0n1bjZ+MHj6OXau8pg6GVof9Cv/Y9BbWvn632UMYJoMElJr" +
- "W1JQhbfu5MliIQxxyxlFWYJJSo/lsdkj/9Utg244/f72xHsUqlRVMGPuJWipOBhj" +
- "qEkxqGNgop68j+4/mhRTtlWMEwwuUKKdDCxGGldP8X8NFUz85NW01rD7NpifMq2W" +
- "o7dpQsUxivU9S0/zYuHDin8gytmwSEj4WYqVwrKqFn2kfvYWyx06X1X93T+Vj5iv" +
- "X+C0fH6nAMNqMKFVXg8nuEYKKk2Rtat7V7zXsSJCUSSRT1tPuvGtNOFnGGB1Pnt/" +
- "MW1VDT4EQ56UUWLFFBZqjHB69cXANNLJbE0k2zdlNHR0OU056txtowmLOO1WSsa6" +
- "mpA1B7TlxdF+0uvItZVay3b0whrGdccXinUpEidgaTHSdubVUqqtqqabViKw14Em" +
- "JmDeVXXLyvKySljtLGMq1t/wTEMgWhujLDJRJgxkJlQy5UMlB40srBFeLlq7bpq9" +
- "ptq0rbSxohSrCmSRMyzLLLMSFMMqVksswFVkqTKplkqwklGCsCyqplQsWLGMZZmT" +
- "JwN3COMLWLVtt2fFUij5Hs/SR03sfZ5nglZWZjJSqn822RTBpyxvWHlVKjTbGVtS" +
- "KqskrbRpKaRWKlUqSk4VwY4cYMNTGkW1bk5Mk2jbg0RUmojT0wxxKQVYhbbLZbFB" +
- "oqok2slvxSlrqul/g7aXHwxix/68Toof7qkpOaD4wC2yq1EwXZiapV6/hsyJvBiy" +
- "EnDHppUrseSqqll+rGDc5R6WrvWH+G9by3kboLdJKq9H7sVW0OfMc6vWl01qZLMZ" +
- "GXXa6QEItcit7KxXTeedbF5N5WV5LJkt1ZLKLEMplYlj+iTA1EdNMJwtIUTETRhJ" +
- "/Shi7iTFIxhiMSWYFgxhilFclagZLPw+zk+h+o0bMSmKxOFfTOrm2TbWXbWV6uG2" +
- "zX+jEamLH9lX+6Yr/YLxH1w5c28qRqX++P6v9czJ/Bpq0wP7uyQ7eB+Vf7n/N/A4" +
- "I+n6Oyqaf8ybStl8Wgvg5aMWKcsqRmLCpH+JHY7+o/ZUcf8bQ0syoa0yWdpVOGka" +
- "ZNpjvIUVJ+ZH6qhX3fZFanSyHdkYpGWGxtjGKcNMNKwlSpDgp8KdD2cj9bMv9zY2" +
- "4SHDkmkf2xkDCf6LKQfCpoFaOJ9BoH5TDi2/9rCRhPqSKlR9EcmpFLro0rH4U5fo" +
- "dOMs3lzLMZaKYNommiU6RuIh0nD/kT7lH58Cz8XLMuKhGo2V06T/Rhf9p9apP5P0" +
- "/xq2rWqv1erT/PLMqx/K0O2Dg/csyqf8VH92myX+Z8BRTxbZHaYmgsP/J9QmCR+7" +
- "y/0+qv0fCnyiPJSHCaH4SEiYfT7Hsxa06QsXGmMqTClIxIpRFUn8jGqv7oxG3iH0" +
- "WUiCZpN8b6/n1+1fkq7ffeV5XQXGJARn3MyZKRCosJhcTJSYUEP9MYaSlQxKRSo4" +
- "T/usWhVI0Ps/HwzGMyRhR1q2WLastVljMZmYxjw3K6VX+qMduROGGFymqf4nekcJ" +
- "jClisYLIPl8mk0rZwHtB+viyyk+VPL1HuRApl/cZMDw+MZfZt7Tx7LCpLZS/LK6S" +
- "W2SkqS0scvTSTnLcGk28PRKVpMSUr4PizlmNNE8YGrZq/51JSfi7Ts2T+5Tuf5cL" +
- "UaX6LUnQaR5PlE+ZyTiUqVaOZTHx9XDIqqOjpwldJmO7TbfS5VtUwninQ/6Jhf1N" +
- "p/3sSnS7Y/q9Btj4/60tF5xmT9MwRXPy8PM4fiKUOh/FVVREYiiQhAhEa3qu3nv2" +
- "d7+q9S8O8rb0Bs06WlE0arExG4ZViJk4YG2Gl1NmRsyoMpaZV7PclFEkhkSN7T1+" +
- "jx5uV62pGsk5ajBRIogIzWpucxals3vLLZmGWmKYUqcpZRpGE2OC4rasjHDE4E3a" +
- "VkxkzLZJSckySoFD8JNDSmOGxNtM2uJgwFUYSjFFUqlFGExq2zQorAowoxy2rlV/" +
- "wdJPWk8RjHBV2lsFjhYX+gysyZkxh0f3RhVg/4UcJ6TuScH1VPy29yH5DloLCqpU" +
- "qInySSwxRKrl+50K0qqo24TykjydiqiUngn5KlPjr2zMmZmZlXDMt/QmnwPDD7q8" +
- "JHcLH4WjVHYxiwsKx8JjVH90Yz02rRwptHkY4fT6Ksmn8HZHweLk7kPRGKpyh/eq" +
- "bPRt8Jw9H0f9riJN29Ik05PjeYzM7a+qenD4QbH4OfJwfZMB9ytJtyhXEiMJiVNH" +
- "cUPwV4H6o7H3fBXSflFn+Sn3kdp9U/HhSqjtSP/YlJJT9D1KWFG1D7Gn2HR9iD60" +
- "4ZhiiTUjaPujNmxMUhRQMUxVYpiKFSJkVJXJrRuOpD+nmZJ/LmR07HlWk3VZMyK/" +
- "m/D6vP7Ztqy2BISPUCQkdu9bzXnqeuj9E79X9hjUSttuMzBuJcLcpmDmXFzLmW0a" +
- "Nra22stGjRo3xd71/j7CrbuqNuCV+Pn7RiTiM9JJIEgAeHxJdEfM80MFtPnBMxsr" +
- "AgcxJUHBQgNneHDhd46b0pvHTJccMlKYUIk+5RcOXp7Ryfl0Nnc0n5iTGzpiTkxo" +
- "FCf/H09mHBodkFJS2Z2cs427TqZEjg2XKgms0uWP9EwnyRTKCH4BWvY2oHETm/gw" +
- "zIiIJE4SQGl2Ck88xdoqynSIaAsnIZAHItqcqEkc5usa5371h9/ghm6wvaD++Ev8" +
- "O9O1aUzFPwkL4FbXvIfOvp571rp7GmKUGlYdK/70n+m237Stjy2V0w2w6YfZFPh9" +
- "Hg06PAx0ppwTTGGySp/LydK8/p8z7d2Zmabu+zmXHZJtVDh9axBEEQczHKc39VaV" +
- "T4x8bLS/TE/iYRwjwdM0rY+rUH8HTgw/pHI4Jporpt5nzbKmLJH82WyJNK5mnJ4D" +
- "eABtlKSyi0srSV+jHaGkaf0oL5Xqr49f2cO3KPHdVlOlxT2Lbotv5H7Pq5pfnuZz" +
- "/dmMfvq7Hqnxosaf5U5j9bbH6/WKPbcO7bK+EPh5IfmR4cj2lOqW0RIh+qOFlpQ4" +
- "QPJP14ba1ay0a5WMszhMV5f9J609T6PlI9nB/Z+ltJpZfELlyFYfUpiTUrTJy1Ra" +
- "mlkyy1arGFKjH1SmRptiNFKlHlOxTypVNuJAVJ4ErlpVbYWdnGukOx25SUDvhmkJ" +
- "SKvuGWZYZZExglQqFSfb9gSRHe26lLJVfZjBJ/oiPHr3rq/pJEQkegQkCw6m6pxf" +
- "vmXePsQvn9xLQI6KSRQIAG3bEGfh7NUKcK53UPq8OHUkcacJyvTMdOk6aVZtbeXD" +
- "JrDQwQRBjBWHXQ31cy5mBlRZ6IYlcEmEU04Y4cGEw43ZacPubU5VthDlicPuw5tq" +
- "27YxgrGOOrbLbUDHk2YqK5Y+iuHLp5DT4+JNH2/Z8HtbEa9pifS5hRZbRbRJLmJk" +
- "tJK4MBO+IfGu7xq/hYNWnTpGnT2zPJAB7pIdsgDnjwae+mHsZcy3KXSR8U8MMHx3" +
- "67L6cwtaVLbW0oONWeD2UwAhlkYAd9PyGVl2b951gXi5PVcb8QkPLMTq0gBWTz4K" +
- "b75X2bmGXKOkz4+PNebXzvhX0lvnW92FLBBb7Y5NtIVito4Viq+U3q3G5KxpPY05" +
- "fL8uNtqqVHwkaYHg7TTw5Y28GPVWo6bO3c2dGOmk5G3CG38p48S6HjlsNF2N5UG3" +
- "rhMMNpgtTb7iCOst5UUraeXaRgqdGFNmIlmjFNDbT2JT0+HDbb6fWUsvKq43XF85" +
- "mSaaDRzytq8wj6ofRCj5SpbawpLGJ941qyZFjLKFSaYxiaJLLaQhJJAkhvLrtqoC" +
- "ttttq21FiQaI9vwrDxA5e0qy21HycDgaRwSPs8Q8LbbbaEEqJAA+29r5V87e9va2" +
- "19Eb4CSiIivrXz3xYwYxlsMdqma+mXMuMrKWCsMVUFYvUsRaVppRgxw1JXOMb3mL" +
- "yozTBtdtNjDDApBMAoSHCRowphkwjDBucNtDaRKMMYKomhyNY0ck0nxv7WzTGIgK" +
- "aWfqbVi/VMlGxYTH9BkkfLWrfruDbbbdSUqaY2JUcG9pYR+O0/p+5jB/JZUMKxWI" +
- "qpUVIKVEVQxZMcum5tZISSZskAD4W+H59LNJklKlfGlrqabJQptdXKqVKsqlUqOA" +
- "aRSiVP6PeBAlSQJCTLBC22236NPq6ejHcSd2rZE7YfVPKyfUT4b7fr8WyefXfb6N" +
- "MyWzwG2mEp4bur6pan33d8BXGubpOl5ed4jcsltUaNEoRiM8GkA0MS2li5l+V2vw" +
- "4XIm74fHps8HR/jS/q+HQ8pSv0K84J8+flIn1SJ6+UsU+C0c9Aop1HStKsYGMDKx" +
- "VVbVX8PI4Q6YTdhxS2Nirbpbf9Rt6er8OQx00quK/pxvKLQgCMAPno3LmmAsuG5c" +
- "3ARCCJ9nkfLTE07UWQ+xE4dfZtP3VPs7YjtMjphyP+UhGz0R9z8FYVLWVdq/Htqr" +
- "8qLbe2t9wr6vumCB9f/1f4sdo/2GBgKKf9A+qrofyy5yaOmGMYh/zf7gpXixGz8L" +
- "+5/xfK/0YL8tv7GR+gqTsvxJ9Ht9VkkLIxYsKqMPDNH2Sv8q0SrVcBPlIf3fwNJ/" +
- "tUtJJygp7lJ+qPdeOJP8PnGm0/cbR/Cu1iq/DodIqyKlElfh9ROO50qsVPQ/KWck" +
- "mmleZE/KwjD935YnpOIH6pJJkrJ2Ojg/KkmBVi22RUNKkxWowxU7iMnlaqlgNpJ8" +
- "pj7iYnkVUWTvh03PCvJ5UwWAO+/U+8rwtQ/m/pYcu7dSLkkqlUIKb4AdxPxWQX6d" +
- "K8cR/srlNn5QkJHSlU6YlWNKsqyjRa1ZMrLLMYBj6NRJ0TlhNqV6ntwbHC0tcGIM" +
- "SikWx6q/J86IAjICaXDPuClJRcO8kmItQriaGCUlFzXDGSLiFQTqmfrNOzl03Ole" +
- "IMWrYKKbCrtOGYDoM00bf+1W6hV/xyoRH9H1kIxEKqEqwhOh0fbf3XzNt1ZIaQ/Z" +
- "Tcp8CVPCpx/rV4xb9LJRO2FfAhRPU75RFAhEnDwrLCvgVkHFpWj6sNJo0rweXtOp" +
- "yT+x5Tl0wTwqLD3pVXSJ+5+RtPl5TqEhVD+w7piTk2lwGKf1bfq5W39Vr75V8q/9" +
- "/wWTBGo2g0WqS2itFWqKtY1WosWrRVYrUaxWiqxasa220FtqxFVbQaNUaotGxFsb" +
- "axtbSaLbG2tYrRrVGoitRVEa2iitFFbRqi2xWxVtitrFaqNrRbGrVFWsVtrFqoBZ" +
- "kqzAMyJmCrMpSsxarGraooi2o1WxaqxYkirFkFgSQP+X9/8v5ZP6G0/tc4bk13k3" +
- "JrvDkTm8Quc3Qw/xo2mMqVokQel047gDu6KK9vXSItvS8kwSVIXbC5SCkWVJiFZg" +
- "hUtoVKxalLbdMKjlWErKlStSeOmTUeNgu7o2dzriub3bxvGBNRCbu64Y4kT37cPB" +
- "IVhFJFkUhs5l65OBc/xyiJn9pvMTp04GA55Yats2p3krH/20yE1IIqJ4GE72HU7u" +
- "YYM8Ubq87w0emUBOg4KzHejc5vnlBVjwWj2JDp78uxUmIZjGSSXv2+C+Vk2buCu5" +
- "waLzxxtCqTeYuYkzGRiwWkxWMbuiWxbDiVZW3Hey4sc9aW7DLDfXXvBO8UcMOrE6" +
- "ZHKIJJkSMuZM51ZhDeUpVpMillJZpvURzSaUu8TxmWyQ4sN1HLGJuVCyo1rGYzbr" +
- "G6nipyrXO7Z7vS43pcWFeb5bU4saY8yVux4640jFLmIWjVTaVtUu6xHFmprC7jGK" +
- "0oY3kblGmTI1k3ubEQo4klMaSc87iGrnc67p0dLLSaMM8WbgykoqxHuhUIiSVgcN" +
- "s4ReusZ2W9pwcOl7l6OFfAh11ZNRZnWh576MW2q1bFKxVnLe+3xhp5sO/llybe2u" +
- "6vZwQiJ63JuaKKNCGBLFFoua715rvMY1dJZyLBbrOZ5XV5qeIKQWC7JDCltJRnjc" +
- "MWVKILJ3QpiLVSjwUMweGw6NEzJrF1i1Fr4tLGZjFiWmbSyagjBTJHzlDjD4ecQ6" +
- "82snBkEBIfIt4B0kgWTyUekmpzCiQ5yh1wM4G8SeOG+NNwKdjDrIdZ3nnxc5azJS" +
- "gWIWMigBFTrbdrcC3d1FulyStyYtcJGJReZlFmTVNTS4yPGPG6m4mU4UpUnHfhrr" +
- "wWZWNdRvxxpo63XA16Gk8d9EE0Xhw0MmKiDFJNWV25mGqnfPHiSZDmy0tLVotC9m" +
- "E3s7B8efHiO2NasFiqCyLUrMVTLjOkidBUijvl11NMuFdid4Pnq556pj0CZeWiKi" +
- "RE4EFhe7nIB0MWSoVFVEKlEgdTKChKRIxmMBSnnMiG9dA90RI90p4oXnQyoVOzwO" +
- "XmFFm7kU1EJfOeLl7pwCnXR2AkONIgVXEixG8HO3zk2uUXZ4KDRPGOMQcFigu6MB" +
- "AynwUr5tMSp4Zm3S97lkYwrKbmYdS7N0thbaW8cMcuPGm2iNlkxeVSsrDdwwNvjm" +
- "OMsQWV0bYCzEe/EuduWNOYe4t4neTnLWQ7yaysyt7Nq5jW3w84tro7rFbxrm3ROc" +
- "yItTKia31oMVVVzMmKibuKkZYOb3Z3UnBYN1JxUtiasqwcnVw0qRd45sTvWJOrIZ" +
- "cp3W8pbyud6rMm8TWW/KOlHvrjW2vNJMEmW6wk8+aSBDqHZe3wLGK4+WYxQYao+a" +
- "FMLu3Zia4DJiYsHLW8vWVSaquNQVVUQ7dSGGWs7cgmMXdseVDzwzwgEvmRsCB5fB" +
- "QVQXq0Zj5wJrB6UFaTgUTjAXmHe6AjIdsFIpFIYZ5zPJpMFN97axjrOebjescSIe" +
- "OlxIjJYuYzMCWWMVihKxiTtW+9a1edTMrhldTnO8F0E1nhOr4yVONeDjTro3vk4e" +
- "VFXbfM/6MUFZJlNZZ+RMiADvEl+AAvwQB3/wP//fyr////pgQg94DwHe94+e89AU" +
- "H2NBDuwvr6eX3b72JJyiefd58+Vd8GQIqkiC6wJSbBm5uQAAAKq7u5JKoSaaqQKQ" +
- "l21VBRUlVJEKkqkqklKlVSiCooVFg+BcYAA+7T5I+gBL4hzdzp5AMgOtGq4ADa13" +
- "bYpbuB97AXvu0OR1329gffKPus6EiQIGhBMJE8hNE02U9Q0NDQGhp+qYgkgCIklT" +
- "0IaaZADQAAAAAAaeiIiUn6JqJgaI2hNGAA0Bk9QAmgk9VJJEyZJ6npNlNNBoZoTC" +
- "NDaTRkD1BiBEiAiKRKekw0mIBpo0aMTQZMjI00YIkiARpomQhkE1EfqnqNA02oAA" +
- "Bo53OJuRwkNrkuMUJOhNQiCKMocWFChEEQrUGVTGgg0sMW2bqgkJBgahUxttdb03" +
- "1poJEQAhSSeqS4RwucrgpgGDRopQUVIkNExkDQSGATIZGCmTCKIkUjZJZESZSaMx" +
- "BmaRQQFlNGJKRIQihnBz6Pqb1dXa7ucrjgmcuCGgbYNpgK8AKEFIr8o4gKQFwMGj" +
- "vveHmstx7CuEmmgYnRQhB3iu/mzlcrWdLQASIoDpmY0D1WpCxNppg6VoTStS8btY" +
- "ssBpPUaC7k8vu+aXzwycRqJj4XNyCaEL8W6PxaWpQ2NtCG2kMTE6TpoDCHUaLpoa" +
- "W1Dm0upHlZaDritXaTgmhQQNtsojjagMpMIthjtQ0xZUttPCv+T0I+nD/mkZQ8ZD" +
- "zjB4ZdHI+/AJQaEvDFvWEt9eecKhyJv73XRVYff5934ryHcPuxRvk/OTX8AQBAXI" +
- "YIooDEBEg2yTSZqtrWliJNFtWstQg22mzaljNU2WpmzNipNtVbdVtq9Gq1bKqplA" +
- "FijAQQWAEEEFi/vVAFgAq0IILEWRBPH+qAgv4VAEvYexHwNTvPzKQKnq9pQt7ith" +
- "SFQE3KoT92BcQS5rF1INoi0BQOEBIieUUBAgVIw0feYQlJIxilA5IyloT2iIDEdI" +
- "qoG946hlU0gdFhujgx6GOFTZJSSpDwQuVTcllZOqH4ZyZC0BlmkC4cCwsYRI2uGk" +
- "ouXauJiysgW2UY5iFJOlmzOCGH4iZGZYXJxDLdJ5I+okgLjdFcGyxGcTuXzC2QNL" +
- "MmgZDlHJwpxaWwzw0jjTdXZYSK7Qr5tMVE1KLGpqexpkXBFICAcNsKQUZzMFIgVm" +
- "knN2YKiGSuBbRzatIQgm+KaQZAS8uDHTnWrudlkM5iRrvStxKFwKKVWkrxS0Gc5b" +
- "46jB4beDQDNZhiAYwuRpE1mlIxJctXj6hyy5cxgiVA40kzeEpxsaUJjkvd5gjFhh" +
- "XMuSAhJw0YIxgxczl8mAJ0klHCWrkkchWY7a9j4Nu7SQ0sThJQxDvI40wEU4mYE8" +
- "5vWPNKDdBTZq8WAka53apCRSSNpCqgUBIEqkKIRCCLDdFlqlxAohLqDOd5oy51ju" +
- "LwUEYBLpqiqzTi6CEFgheJY6jhnYUa1qiwwzdN4qAkZJTTMxtG2YbaURoLQYUs8E" +
- "LNMt81O4S4MhIrqC8Y2RJqiBikskgX1Ls0fwJ4OCaGBlINkgmKE6hXECwCkyUOuw" +
- "dQqIBJJNGXYw2m6AgaYHhuJJJCxy4jkmrBKJZbYWNXa3ElQyVBKsZAmKeWFLmqL/" +
- "aqWV6VDzrw/jTfYq6/bw8pT5+4NHZ5DpJIDo3mpeN6SJGMka7izeeoko43C2Epfp" +
- "g4TpoXY3puxOTFNpHLlJkTMJ/cig8exbJ4wXM1wqI/cnSPX4zRN3hNeGDNBlDPCc" +
- "RjKdSlEXMcLYVo5zrESzdhn5oQgF7Vy7d/xXre3+0a929Re2659oOIpGmnWprpit" +
- "uWOpOh/bvzdU3UXeNVH5d/XiT9umGfzpTP5/9FU8nQ2l+WGPykDtzW8+x9V9eEZL" +
- "xXZrntkuw70ekWyrvMhHrucZm9KfynpN9pZTE+0MTHTPffeZ6Ne/Z488WceGj41e" +
- "xPJ4/IOaZmtZu7us13BA3KgkZGgZhXkEnmKKSCdMrtunVFC2hCzVzNmb4pa9MrfR" +
- "5L368R+A5cTbzcuFIBItqqa9ZJWrv440HQdtONRRNMqQLRvCoXjJsHsNjp3oqjTU" +
- "nuUk+tSSqY06SBeONJjOPZlitBWP2Y/a4myrWhja8Y48ITl3w70cPAUvOLu3N73x" +
- "oNCWxRXKJMZBOcsIiYNsbb6IqgA1MYWCyzFLX46tyDIsrZmBdV11KBpmbcG2jSmW" +
- "klZqbJwQmXHcfS+kqBbvzhoFYwQVevOaUWDtMkiQ4OL3wfiGhdLDJF2oWKWCGRKi" +
- "hQlR9vBWB8QPr7h+/XlnwgBkZ6IHoruquvYHPb3d2c9Vu1qFs4DoTfPOZy5eaTfG" +
- "EbeW2TVkZWcjbLyy5fXm3YKb4ufb/wb81JfR8qaTCaWBkN5OAgOisFhTR2+eXXkc" +
- "3pGtx5da9R7O60uzr4vD1ctQeFni4kxCBF61C2yR4amYWm6emxGhMsrBSNygglLJ" +
- "ju41nhlzS1oTvHIJ3iKAtp6aslyLp2Xz4u2mDjOOFZxL3c45xPx8u1djCMsttzHL" +
- "vlwW7OA48Dxvhzz0vTvl3lSnfgXC1bTvQOQPN9u0GMqUZDiUu+0SqNTncw4JrOJd" +
- "C5ae2h229JhHJcsamPYtGY2nqSYKK7ZkCWcOaeo6wnA5uE6UmOicOKSlx01thtO2" +
- "U5RWOvTw6+Fysmd8Kd83F6zpjTvnstmbnM78jhR6FmzlfenLa9NuMaGgsxrWUpGv" +
- "xczOq5bXKtNQPDHEHk5QkHLA7Ei3HDC6vuGTk25mxRUpKKkrlGpasCNz44/k+3tD" +
- "wDe5wjgdDHrPy8gsg2W5zWGfiMkjEJmgQcnm7BcPMOgmPy6pIvZOyXeDh5m5rpxh" +
- "u2O72A7GexroWfc4Pg/Hs7+FoQ8r9jIQtaxoXODg+TR8z0PRzeAOoeeRuMi7hdOS" +
- "81h4GqNyguIRmNhQKnFMJWaZLQzV+urXgFRWKiY8ZIxJo6GynpoUkgAnNj57hPkk" +
- "CiIEgKoYhUZF/EFX75QYsoLiXAfylQHsFzFbiMlVTCoUCVRu0SOlVOuaqN2WvP1c" +
- "77nObXJxriiMINSQogBTFkqqmEoC2VXvQXneIkUdJiMdJihT4fO2rWLdy1y9kXJW" +
- "wjNZBRy2pfGS/8Lwdy9Cmq8fh9iYjz/X4mvTlzXpX65f5J38LH6DNGfi2efIIvIZ" +
- "10n5NE1kN59vlWXnOfKiq7ER8fWpiWWAkhS+t+LrfbL2atTnX7FlB6UvlXavrdWX" +
- "HX4WKTvtWbyZlXdbue7pYypbJ5UnERU0llbaJ5ZvPfC98s8bTLO12ZXNItLa866P" +
- "2611pp3tR1vrwgjnvvzhWTmUw9oSQv1dZnBnZnRGfK8QzR5ObplZCCc5ujfT9R6v" +
- "JL1s8iD5lDfnIokmLJsX6RI1PafLCcKs/Tg4AkOMBDBIQit/raxnAKMUBAZBr9yq" +
- "s1/QXIbVpWgIAgmEILgYvh0yWOUmv3jAUfKBfkdBqK0fOeYVyHCSZHQ6VMFk2HIr" +
- "sD0RNdD7WUaPgRyIZcjoUkiB+YRfCWIeIcpVQPm6Q1BfgQaJofhQUEMgZOGDeJA9" +
- "IPcCCRV4AUgAYPdw6IdQASI4FnXKQHmcg2w6ALxIMpE3ZaAxxeCoTJ0HTJEbxQOz" +
- "vOl4O5xZ05zeiMkPQD3Jg7lQsvJS7KCkLTfpQmQlEPQs76EiGVGr9s8U7Q7yKUh6" +
- "XQJAgcEPOW6rmfKxk0kYB6NnWeroUq8BmBHowHKGqH4gESifAlozD0+eQ0j4kT02" +
- "LZ4WaPDW2w+IYtHZeImTcCWCRQLWBxyHfijRhjIpsF6jmAN08BB4SheIvMCQv3O9" +
- "IBxhPz0SkvgHt3FCKbZGAMBDgJArIhI9BSIY8gc5jHmj+E+p9S/UAPryP36WOYnx" +
- "34Ii7m5qkMm9mPRFNHfnTkYoj0GQr4OOeHrNeCzAYlhhc5B9Dx8dhsYr6Q8qgkWn" +
- "ZzILYoTDz4BIKReoEWCYEF+GtaVpIuJ9O+zUiaxtJE68pepgbqZg0bMuPgcmlPnY" +
- "g6RPUYjuCge0Uj8+CFpsWlfLghvvAgHOAUAaHOuBCwTEJ1iNdj0An37bTZlzLF7r" +
- "i8nzHeJWS8Y6zJjrLCcqH4JHhRMidIZSkw8EIub4C6LDowDzJO0NYq0kILgV0Xug" +
- "kCCZveXnig8iigRgdCLAPCpCoaA8AMX+M94icjIEiHwoKCEQhEX3HtmPnzHMo4T8" +
- "NPcs2WZJYUlDwPX7E5AKIDuKSJ5wxZlKKsPwLwU8KDrAPQyZ+Jla9ISK/IHBC8hL" +
- "AJi8KMiPQXfpqpK+sINQSQJGgioXVwYxvvIhV0sJEIsZpIely4rWA1B7CQPyZJLQ" +
- "OahcYOxhvMPiDui49WezMfDbrdT686aJ+EQ2kJErap94yg2ISh+eqqB0QQPpBERM" +
- "BBR+wkAAH2CA+KJEV+wAFcxBkBfIpkCZ2gULsgCIciHoB1hJQ9gIEguUgoVulKgg" +
- "ntUcGAJr0oJHR6UMgdYB4JHEEfADtXgvEGyLL8+ama2oQMkPuYKfH8tziwAEEz7M" +
- "qXYXsAoQHsjwQYik4/RunvQcfeEFs6nFYUjPo+WPguYCD9BY7j7j/PYGCWLpEvWu" +
- "7/IZokD080Zk5wSD1AVqPRbsHEFBSr0sXtjlDoV5UI6IgNFeEvHffv4n0LiGvfQ5" +
- "KFaH4Gqpz0Mxh9UDG/SNxy6H6DRQBcV+sBle8GiGx3QAXgqTMlrqSTAkr2SSQEFV" +
- "9QEYOxHymNgdkGXw8Y+fRsHrgXw0GR09kMpCq5MlDiZDzgGOLxJuHDgRqQOet5Kp" +
- "ezggkS1jSF0MO0JZ2yqQKSLF7UIgkEZK5OM/HYXOHJeOW9vBr8HHbkuWPxox6fms" +
- "GumVzMqBnqecSQsuBDogwNRVQM9eBnKY0b2gZRHesEG2rOE4hkmdWB6V5y1KgqA1" +
- "BGhikPMUQmrL7akye+mkvllmGuOkpMekkiTCSRACmrhLIlulAF9N5rthlpQ/XQkp" +
- "01zssYOxeeIYRSTWbG2KBe2SOKBXQ5DU55aOtIvBbCk+zYig+CBkc6wH3bQOiaPv" +
- "iscLEZjILNSSmX9OdgQXgna+HtgT0K4DwhmvgWOYSV0NSQuh8OHmg/ExtAoX4Pob" +
- "q+dVHoXJ7hVNiGlVA2bGEGEH1bRIRBDhCQDs2oQtWIbppQHsVDJEQ2qoEALIiIJh" +
- "iA5Ibr489zs18KLdIk2wVcpFRBx6+tiaCCj5EMxEzMCxQyTxJ8gAo5ZcS4gmZqKG" +
- "0IlJiAbs+AEAgERPIieEQN50HzB2KnFiLFTJR7Q0qNQ4QXyCtKqBvJY82LSiEDtD" +
- "SMDyDTVAlMx1KR0pMIRUiJ7YF7xSGDGU8MEIMgEjhWgojVGuXwHA5gtwUckHgZqo" +
- "ezI2FDLsfUAQ3ZjoWaTPcjarhqjpVVrhZIQ6SsgnCohVS0itMJYhS0GK7o0K+ky5" +
- "Y7gH3tCGO3xVQLLkMHlUMsfgQTLECRQxOLscliplNO4omhGOIJICZNgKF+kPDnyh" +
- "3ErwNoatDOLWiFE0bhwyOBJEYDfGHjaG8xFtMBoWYA6HNgFycuim5Q7p2qoGrMrZ" +
- "iV9I6DYoCVwCNjaBmh9VIACEQL8wi1kyAWKD09rwynBSL7BDbiUwABZHykpFUzkw" +
- "tIaZSwCn04GkNoQOlasfSOXAYa64AHCJyMVG81eg8guTY5JtM+Empxh2Tu34PTsv" +
- "KYzszJQ7oZY4pJ7Ci6JrOjEozq8F0gbgliwihrt8mJA2tda3aqkAfanxBmq2ZHU5" +
- "0MvBycGZje43sNn5CYiGYNwJBIRNj/EqmR34YYffKj41OKr74Ihj1OnAC82B5rJS" +
- "xuPCk5SnOICrQbAWFCMDZEMllsNkyUZkhMzrWJAiQm+4YC0K62MK0mlrmIc8DWIE" +
- "FjI4sXzhL8vpkYEZwSigrGArDcBGj0gGFAr4FqGFQ1SOjTvH0TulJ1XWHAIDBQFU" +
- "2BL7SBXa+99dSAvxCgIPnOIVhPMmTqqgYRFDUUEsUuxDfjmwMpaAek0+O9i+KyRp" +
- "AG8DGE3qEdlsT9H5BPmUugch5YLMiAwTAkdnj7Y3zvRe4V3q41uohGNQNXT1Czcw" +
- "ZOHoCYis+EOsTzziYOV5ZAwqoHrl2ATKFHnpRssDzmLdSlJDg7CCwocglqhuE+Eo" +
- "jpsHOFogASPtXBwKZ802h3flM1s1tZA8sM4cPDnAT6uS6umbSt9nww6rDoI6wdYP" +
- "ABwCkD4MpyWUDjtRIBzdU79HbBiX3vcZZGYTeQOlZsLH/hj78oFxFCAR3XQLAaGA" +
- "dDiPltBD5eyxp0sa6DUCQ9yB3omnTqYzNOQ7dGkZocqlwqH9pIRCGyUGWBqQyCxy" +
- "ehq7n/X63fbu3lvZivHbt2xc3MNMke2l6Uc4OiBRsMViTMcmSUZzTiouB0cMzMDc" +
- "MhAn5DyXqlkdoH6TOX/ia/RnX2fHg6KQTF18xSwHCgLERnIs7MqnDBCuu5uA3wgA" +
- "RixX8J05hR8PDApxlQIJmGtpRVjPTQ4WhDIBRyoZ5o1kdEjBho15A6uhLHeFCwXL" +
- "+9soCWWtfZsFJSQSLh/i4cADpq1VAz4GFTiJjhUbKosgl7B751ekmAW8qEBkjrpJ" +
- "Tsj2D0AkIBD0X4qoEMX0AA0zQzao5o5TTzd5LNDKrnPfRfO1p44OgI4xIzjnvqR2" +
- "Kz5Gwg+DJUL4dAjsyge+pYSePvEmKovgUXXilLjBfO4fT3oTYGwHVC0J2gKaO2qo" +
- "GfZ3ymu7AqTWofKKHc998pr01xD2hKFgCFCO1eIWDjYeGgvGgWPaFTjzJlNzf2GX" +
- "XyGuBywpbCI9aM6UO+tOtaQSqpWu2BesY5kXgwTFHTUPCg+y8oeXVwQ7yjsYrMak" +
- "XS4XXDAJlUBAhUGk7oKAYdKTLFPcGom1CBxTjSRRsoYbfcOs9iE2BKVx8w4aN9z7" +
- "7xds1BTpEnKyEY4TEIk3XeTS9hcaRANIX4k22qCDj84dwRJjo5YkxitJJAO9xXTk" +
- "OFA/MS7JYZDxNviHhoYrl0bDxFvhTQwSQimhAnQFiYoaaHrMgkYrCOGBtDa5Bmne" +
- "OFKwdG8DmOpCyvhqGYNRcB69KAlJSFA5hCUHKDE4GFcRwyRmEbfPPpveJJIDaQgw" +
- "rWJ/P78yCMO9svE7GZpvnPSWaCtoEgL2jLabbxBVKIsbSY3YtJJ+NjNh8b8AilDw" +
- "UPusGoZAu82EYImSRSk5GnwVIKWpSvFeBQnOAdAMuTV9DgEQgQgvrro7JHSHZZfM" +
- "JCKmTtQFOCceAYcT265PCAg2SE+XhMkKlPgHB9+HTOoLI8s4BJuk9F7wqDCjRw6y" +
- "D8yVeukRZ7qrFZYrAMMmhmgFDKEdZztkqFY4HuEkfuhz9pTsXzFtqqB5Tv5gsZ8h" +
- "mh8x8wAfZSHNyDX0vZDTySL94fOjqfD0KHsVflvrWX5ow8Q0QhFVMbcpmX80Ezgf" +
- "HYjMuA8wLy42E7Sz3rziuCIB2DsghxkkRy0Bzp6FVAA8MKcFvSjqknlxdHAT0wDn" +
- "07kBQcd9oLK7tKmnZYnZZrh6DrhvciJ0ss6vdzXdwMQKJMWT7tXSHPByoD9hWNqM" +
- "OwE85ypXmQLQwbXSkJWY6qxCwo6HFcFLCAk6bCVHFyYQc5H6Ezm+mNHD03wkk6j7" +
- "m480R07W+QkhCKSnJVvGUvBBlRzDZDeeaNvGwHd0PT2wTy2HnkWtuMhkklgK66LZ" +
- "BC6hKMJnOxOpo4YaB5V7rgiiWQXGCiJrYk4Y59qslhcA8/XJNJQLb+5tUzHJCBgj" +
- "Qx3GrzzHn6xmZ9A0PtV9dbezpCHExoEDwlrH8dllA4YEY1mhsA0dIPPsj4Mi73vz" +
- "nrsvJLs5YqABDfroHBg+ShQ0IgOs44NI4F8CIIsVXHQ6z3KS4MOhdxigYOImz2UG" +
- "gJAuBhpsgLrldXnhNQ4jLCUyTxyhrIrwuyYrqo6MJzQ2Wl3AdDzKOb3Cydryz5Do" +
- "pHBHMKBNdAOAdXJhYMgMb2s9Fp70MSClw9KpTbdzhHAuMGAtobHQJ2SURvgbbhyt" +
- "BecsuXl+2jKigzt7goBTjmpC8RowanZdxJOhWjwhwrm99FSiJ2OgLLnm8pnjT1Fc" +
- "CXCc0JaZijcmjpDACeVTrZneXxGRA+184I985kcHQIQIEFMgWfO635rg0SZSO/at" +
- "HtcUKa3TZ8OJoImYsgRoKAhiZKIBUsG7yTOFlDFncMU9EG4CMLUKMxbiCaMDYdhs" +
- "JSKdyLFJCQmviCCLgGuUz81ptojXx2oe4d2iHnAkVSdhzcfH2K2UnIQ9u0F30MHB" +
- "OBY0UHMYYjgCQTAWMbwXTZQXaOgnfjckJ+BO475Zyfo8/R0NlEMBq8c94sZJiNrn" +
- "yJ8OoMIDQPjt9uJK8Rk5aFDYbJfWSynwRhgIbQoB0+IsZPFGy4yADzZLYokaBywD" +
- "CRmTeH5tmhDzPmA2rD32gaqneqHMNqA3FgsMePDM9KB69ebN4HOAhc26eoGFI1QJ" +
- "m898wsO5qZxBxcWUgvtw5Q8AMEOOJJ8HEEk6B45ZyIoFaB5KW8FLb/M4KYSZIP/T" +
- "y/DoMk5Ami3wPAH8EyWhTaUsFlQ+g6AEFdgHlJWNLpOCvdk3q+hWdqbTJWRS1dey" +
- "wOAQwQUmsxpFozUQbFTRcPzhmHw0BxsEHFHdI2kUHjDkRPSGAp3SUo8BEdPPPTw4" +
- "44KbQ4SZsIKdYe3WCo1EtM7zKTu1VAoZ7hPFDfU88SlCY2aHVSnVAOBA5wzuGlcH" +
- "Rs8STcvGCu0xIzUFjkwcvlheRAzgRbJkzf/N0YjQwJYrJ16VzC1gueMTW4Rt5rYT" +
- "IRNwYQYtHOtSD6ShBHOQzP37jm+TT/gvnq0DgyDuezyZv7FGKF8j4kpFLwakHPsy" +
- "LSDphCyxQLl7xgnr+Pl8wbTsF8dx04kwB75wFRLdNRIBmhw2pH3UCbB9EgE9z5eI" +
- "BPN3vYxzTZ4nEgVR4qoGQtM+BuGwlgV1WoHG4EaoNASMhGBgXYFRVYIXlASg6LSg" +
- "GqeHmiyAsDilBBOqQsS4Og5rap1miKqAdUA6AdYTWmgTRQWeULDLBzlSEcEEDJbB" +
- "4nTaBTC2glnEXi2haNhLoJcdgCNAkhcqbCc44gFrBrre1RE7eydRrtb9wdNITgOo" +
- "j4QWulZiLl9z7V6DbnFmgcimAjOFhQs7UI75C551aKdXmUEHKSvEOCldH1YzE3wo" +
- "E42BxwHl9Xk7YSa0g1vV9CriIWOztgqD6DgKN3AvOkS3ODdnTdtll+abk1SRIIGv" +
- "fALBUOBR7ZFBZ4BUpBnSQ4hFHFEZ473Y3P+zY7O60Rs1LaWqHHIcwa8txlB4jJJE" +
- "w5YZFHWAZUEtKyoIGdMwDYlA+A9mFgSZbOw4M6OOSmPkMl1OYzvpRASmvvXmUjTp" +
- "8joGG1lR1cQpEEugzJBUyZnlygzInkeR9IZ+wHyATZQgPmd1ZmIUecB8pAzd6P0t" +
- "AUK45zvDzCusNxdKPDohseJeeAI6ZvadwEcFQCRCgsXNcDfG6wqIm732cGQgwkIA" +
- "SKEgydIjIZQ4a2thurU6wysrTQQglytZnEFtKoQOjdqfOmiDah274ym7EDxm9s9L" +
- "CegGgMopkIt4LQ1Xtb9yBS7B2LUpK7hUpgHQVCXmwmbMOQqGHhGVvfpgEjVDoew6" +
- "qNbwaB5vajnexW8pSBC73poOsSDMENqjGDoVUvvCS9M4jdfRrEmuQYwM5KDSHMK3" +
- "B64lqG9DhQ0JoNQHlDlAPccRKnfODi2TDOoYNSZAcBzrUAVglyHGRUI0bMziEWOU" +
- "JYnAOUMt6Rku3X2Za5l+nJIHiJXNq4xzccGdzaqu4qJJiDRBAN2TBKurol+bv9SB" +
- "CSAX8+8Hl/r7sZnxy9PYe6Z7cvs98YtZ/SwPrgMD9OXynBh/XzxwXwdWFeXp/iVD" +
- "kMgNriWpJDP1n5azCg6/xxxEvwpxkfhIP9s+2nQ/fn4vF9+jJ+ngfdWL4CPb5czf" +
- "UQwvVtZEuz7Om9iWrwP/ePX0KAP0+V9inRoSgybccCP6dPd+K+f24YnQ9YpYUGst" +
- "TKKFMYQdT2HL0fr+fbVW3qvv1NLVbRWSUrVJUxgSVjWktRaoqKNrFWmUUVMjUUmp" +
- "li0zKazDabQ0YKDYxZMGg1BpRpYUwpQCMhoC8nsJe4+Dy3Xr8S8ifkOz/vaP7ETx" +
- "FiYoqdkOeLbBtH+bHadmz2QGsccbGX7OU2D+LhZDxGPjMsOyV+DZO9PSeDPkEcZO" +
- "SS8UzBJ+ecnUZhlZ9ZyM/ad22YYrjBcAz/3V2B8/JiuT7ED9kw+rGGSGmqTbJiMm" +
- "LSysmTaS0aks2bSzWlZtg1EpSSYlNkqItCalNFstNttqaprSmpS0pqU1LNFgKpZV" +
- "srWWrM0lJM1bEW0qbEmiLVtRGZUbSprWbNaLUqaks021KtbS2RlllbMsywtspLGj" +
- "SaVEzMYk2NmzWptlrJWmSoRZSsptlZZLRGTaNKm2LJmmyUmSWRk0WpqlUZJJiWlp" +
- "tkjGjUy01TaUkrKzSlLTMzAbNg2KlpJMl63e7/d+ENF1fgGLHuf56NGdqOvg7hSN" +
- "iHHED5NKzQnm2yaAQJTIxieFJM3ij3X3qh5AHBhk2riuNRvBd1dJNK/o55W5e1NX" +
- "ks/nngBUDz7INtUfFdK0JrgNgbjAdgkJGRczQCngL6Zh4BT2UW6xEWOCC4FzQuaj" +
- "OxoBErUsV1z6K8cAICwJGRj6fB5iCC6h8QhiZB9qLr5NFyCenPzIPnc0WwotMInx" +
- "4sAoHfMU5HgU6hhRBkppj/FgHNLt0ubr4APQXPI06DXqSSyDZid8zuPuLwXKN4cj" +
- "jq/w8zETQQQXn+w0DiEJEiKh7fzQ5LMfgQXmXrdtA+sBzTIigGxVCwsOYhmJycnC" +
- "CGplhE8/sdAhQXcsIRJFJISEJE8flHQO6cgR0ZCoE/TcCd+BBP7orIml5zlZgw9K" +
- "QKKpGkiwgESxpnXK9pYwUAa89ij5sPoUYZjQ0lyAcxQc/xtRzIOJISJHL7Ny0JDw" +
- "BwZa4MDUFR8D5CCCwzTyVsZejnQapAVGYICC5dDXtXOsmZXMO7mFWN7P56mEGIAc" +
- "JHHBsharUAUcAp9UrviBIAxJ08i+RBO3Ah2QAgiK4kThwo8sDCf0aftxqENQKMTv" +
- "TZBCNMVoDJwdi4fVhYNQyMy4KjH6SlEAvexZaMCmxViqK0e1JpDA33Zg0xuGQl9E" +
- "hiQvQ2FHNA6XqGDe6CB3obIHAhBD+L/2H7JweCnNu3h8F/bQAgQghowH1UAW3ICg" +
- "LRMWh9MD3nL6B5zvW/rtbABAW7j9J/ubhTjE1Dh6fjPlrh4F1mHx9l6oKaKdL9MC" +
- "Czogscg9WEHR1P1lXLtPyv2av6+Uc38L73W4ynzSHQzT7n4a9fw9G0pHvHQQT3Ww" +
- "CpsYtnkcGJdhEoMqdwTQQQWf8H7l+Sm0erEmuPTqAC3f/RC5LqgrQdfyPN+J3eTy" +
- "V4GlQVzdO0KeqEArm/KUORmgILgIYcAUkDE9WuptiUObqmYfnmExHY8cNvsWx4o2" +
- "QtFrwFybGSaII/YzOu4hsM00VwmYOAJQ3KQY+rag56UiZKVHIpnxryUn41uF8d2K" +
- "fszLbyzAkMTuQc1BJQQHPuhBBej0s+yiFTpnRcrVGp26/SPoGgGLAjmBAhpnAPYi" +
- "hGHgg8hN+hAh0NObgHp2R/M6Jo+S9Uw80pUFedRU1bYFRVog6sTPEHADwMAG0oUe" +
- "ZTzCfk4pmd1M7BJIMNGsaaugBm+bdBpLDSNwIBiBVKx5dQgre1pCrhP2FD5vX9bb" +
- "a28/PP14155vN5a8GIiRRgLCSaKIJMBu9u1u/IdZNWhKp6tcoZGbueNNIlSQLYOV" +
- "guF/I1QEFvm6liJuQ/g648tjVjId/WMg6iEQnkcuhltYdGxoELryIDySIMiK9wD4" +
- "MbBiPihigLkeo0OhARBcol9jMSNhf2ITsgILYNseps5hodZnnUYfDxJFi4UQzXNx" +
- "EsQsWIsPUhf4XvqFHwQ+WPfTBIHct1LIZYv2+juqALF8D9dhxOkM18bdDBT3QEFx" +
- "IIWRNxv+UV8R+J/0R2XJbrEIOYHU+pkgRzsDEdIZEebTO4gQJeqofJbdkqra4esL" +
- "roGjHL6Gsy4rZI+PElgZlHIH1++YJmDEhF6psaR1U3IWVmpF3VwE9oiTMpi8Nzz+" +
- "aHRDUDwW+WIdt3zPNOewJzPCB9E6jmCYHFX8LoITudMz7/N1SyV8kTcL0XLh4A7N" +
- "JzfBgyjFkYbKgC8xPTQ2NEVHr3NX3I8oB8QLJn4JCrIRrrR5SSiELOBCqIlECSOq" +
- "AgtNF/5UYIUAbvmgBgPL1xIT9UkTRqqrX53ixpCNGKHEwP1PwJh+ma3ptrBwODbq" +
- "SORcDEiR6PVwOxokOUEsjBbkzcaucQzU4IBkiIQDSXJdCotjbIzzDs8lfNscXA3I" +
- "EjvBoCBmX1Xq+IE6m5+HREB7xUkefMhRTIUUVEoGUY2sxAvjsdB3GZnYoMTuuOZk" +
- "0IILqZh+sKgLQ1ULBUF4SYf1u+nDkki7SjNoBQWIGv3PuY3TIDM1QtuJ3SNep/DE" +
- "5GEdQMHhYWdISJCEh+RRD7S+bd8OK+sbha0qU3NES7e5JJCEsxa4lA5ucJdrboo7" +
- "v42uXj7XKXZXimppWTWQJDU2Uks0imZSWU2bLZWUpEzCgmWQzZKmlstNa2pqlKaa" +
- "aU0pppMDbLLVlqzSSa2lTEtKzZJmtWpNSkylFpqsptkZrNNSzS1S2bNoqllIpMmS" +
- "lmYDKLKzVm1LKVNkglKVKmyy0EstNixZmkjEiWms2xGFpVEWVNNKkSaWUpmMKLNQ" +
- "l1leHUD7BQQf0nxooh+rfDYdYFRbCkgUOlBI6EukdLgodLEh6iosAIZUDGcFIBnT" +
- "5PfxeXIybIEK3a2JhwXN4a5XZyCUN1QHKuKm53cudZGkYw+CUhgAg4jiFUxQcoWX" +
- "ZiDnC1kcAxisjx4FhBuB1RLpkW/L1JdQMQyPlqBhAGDxWuoWKaLLctSBSGSu4x/U" +
- "+UGMFxxCH7+CQBDUTBsMAfQX99QooSAcCZEiD6vqNtZoMtphkjx94b82mEcdDU6C" +
- "GIfhpBNHRGdiSEhKQ5wXmRP0FuHscjHIQQXE+/JA9QIe5u/rPZ7iGp3RjqDlESQZ" +
- "JCQm/LYfclj52MSyQjrCotj6Nhs9YNtpjG0eYiFHs4e+RkLZGv6lQVs25H8UcydI" +
- "dBwSSJWZ2GkMV5JBvs3IEHqRvh5VCbiosL1RQbNSevAFkgodQSGXyDwMAKI48pbY" +
- "nKYY5o3AkxfgcNu/2TS8/z4OpVwpwYLoslFDS0dpbVLklyLktcy0qrt1rkkVDQKa" +
- "U5mIfn7qbHUwB+pUzzDYgdOwHNMsQqIeAQgWJ7CdQLne/Uch/L74GbnkIeSHVY7B" +
- "6HzdzDBZDLh9FDDd7l51/E5mJCBgdFYeAu3YglszcA0yVJwA+V7zU+xXQdNIJq0w" +
- "kfMItgm3gj2uGRgGUX4BpO2ZVeDftfXE9vP1ve16wzwEEF4VAF3VrV67Ndd89m7O" +
- "GA6EokveXN9MfaQsQ3ZZKcK50mcwJlSsZTgk98c5KYw84IzEZbkvNTsNqzPLKyHo" +
- "Px0sFlfMO5q7Gy/RLjgGa3WwaF0oI5J5CEBrzAuFdT9Mc82Cdw1XLYdAocXnucxw" +
- "MDq4Gb5ImDg/Y1aNUuciSSLGs30w7o64wiPJkCOJGESEZEDZGBLmOHlrwGGQG1zj" +
- "MtuCoxq7RpQlgtQ/YQ5xHKBJJHiia0FHVsRLGQe6Aj+2KgIUQACACiJEFxCraZaP" +
- "BqeGpHqJ2lIlZ0RymyqrLMZVKEz6wYDwNnVwEvXcGMYxgkEpwJK03QsQ0IAGhJqy" +
- "CBkmqpjC2e6t4I+Zf0JUTC8cgiBBIMOpm5aNIYWCqlcG2GZjNkLK8i6B/LSEtoDR" +
- "RIJtyOGwPFu5CEb0Y2d1QVrHSAerk2mlwOR0esAyQ5waYkWyRMAgkNlX1WA43hGO" +
- "YdDY3OWXJQzDIuXC51atcCh9k/jjTxk4r31uGHUMNV7DyEEFu9aoidiNHFzHFW3k" +
- "pl23DYUqswRQLrmUK++C6OIeCEEGO4Oxqcy5rvYfEQIEszhUi+UBMa/NHV+bZCGB" +
- "BmDsfjN+oGAKjwgfAOjBz3eAT0JSBhgZHiXA7HejAOj31UJ0cC5soXLOxcOBUy41" +
- "LJM6Q8Jwpx4F2KjgcPvn3BRaXEe2Z4vPu2/yeP+aH5JvaiC4fKQAcndicHNDcD9b" +
- "ShgrZAQXSGTpCSlPzKD5gwnhsz+p8ujoewiFBY3pKLSeXXMDRxzJq44NJzlzG7rV" +
- "oWrj1/nLbhdUFc+SIUCENGZwNenyhKIbAqfWTOCRY+YUj3gzmpUR68AgUjUPy+0G" +
- "2hIxUaJCNpMRpoFYjY0WIzNmFoMaNFtEYklpFixGtGxg0UUVJoKiwYNaTRqTKQRU" +
- "G1Bo221i1VFhYBqNjRFIKqgpJIRS7/L9Xk8v315svJO9OR4u/ONn5FGPE3fMqdtS" +
- "xkZBu7kta5NbuU8MxyZMYMgmsNmMhnKfGmtyIG2LzBpqWYIbdmCYi0lYLJxwCFFa" +
- "zJE6zEudHD27ZzbOeSgpk/HnkQbT7twqaaJXNvUzMuUt1hyhU7ceZcph42+VTlXU" +
- "cZ9UZZJyYojLjaeJHfJU1UZUEmBfLumu8yW5skuyE9uh2BmVxJZi6KxaXBNwSolw" +
- "BqBcQLj3ucNZIYZLYtirLu3brW6UYgZgZJiDIGiwpsgg7g1AITkgM6FHITxDDnGt" +
- "4SDHzZbL5s8fec5PCq5DOzDRdWS+0h5Y2INZak1D29cpVyb2aVrV3Wlt7rQhLa3e" +
- "m3ZwPNcXywE2Qesk1XN24HvZ2Xa6nlm8Pf/xdyRThQkO1NjuAA=="
+var jsonbz2_base64 = []byte(`
+QlpoOTFBWSZTWZ0H0LkG0bxfgFH8UAf/8D////q////6YSvJveAAAAAH3ddt7gAN
+FrKppN9gw0gA++fGB9xKkUpX0YWTENCgqzUW1tlsyMB2w9nnvNSigNyS+3cui5zA
+AAAAAAAAAI4kILu6ytuWTLBbaPXfc+A+PQEgNAG1ZMBYWnWwPoFrGjoBnYMumlUF
+UKA7NVBQgut30zzu8eM2tsoapJ7u41djLsxZarplSoJouxrdfHrHPSiqAGgkAD6D
+QfT0ABu7gG1qDtdVHVXp7vWuBoBk2wEOjKChQ5bvbh3riupXZycASbaiQEECRKib
+ZFJFtqWjR7bsGoaa1lIFPRoKVQKoJFyqbWr5OB1Aie2pobm1EJKqVBU1EE2lCg6a
+AUBV9hqL00q9btQ0J9hqu2zavWVdjI6aAusU22tNa+8m70GjRqarKRWtUDW2yFBI
+1kBrrqrxeX3AyB9AD0wAAAeZ6weqV1rVu8UVICgAAABeDn2cAAd9gAACI+7DvjHo
+j73u8X2dDXT2x6adeFOTNe7BvavozFezkV1xXtJzu8H0983QAHr5aPT42iem53fX
+23IDr7YejQNtVVZr24gGgB0VQffPXH18g9DoaDW8vt729h9bt72XsKth0ANxgodG
+iRxvYclAAAAAnpqRtgGvcbo9ABpy6aPQADRZ3aACjyox4NawKCqNdA6offa1WtPc
+fdjQUPvauprcLoPe2oaplp2w7cnOHdlF27xvPY1QU67vc8goBRttLYKaHXkPAAAA
+AAdyFFaYCVClAVSlCqVSilFUKEgoNT0CAQCBAk00g1T0jQNNPSbKADQxAJEBESIg
+Seomk9EB6mjQ0NNGgAAAAkEgkiGk0CR6U9CNNNNNPQRo0ANAaAAk9UpEQmoNNRqe
+U02o00AAADQABoACJEAlKamUCjZT9UGnqAAG1AGgAAAFRJCAQCBA0SYjTKbQmqea
+p6YU2o09Q9TT00nAlwPEuSelCeXl28B3IYIQHEwXUMSCvlAYS5LkrZn+XhHHAXZz
+FTJHAzrKZzYWC0pthA9SCmbkyVzoHbSUjhnAfBrYpwWYIB7GRjOjDQqokMbJENSO
+SBCN0WhaRhQWpVuoOLN0NPRed7eO5eW2lv5L+X/jf7EpJkEUNMJKZREogmkjMgZJ
+BiEEEliRIUKAoiaSEoDQZJBhKEZEQySQCAIIFNIMwCiSYRSYzKMkSSlI0xZMZKko
+RKlRtkmWJIrNNIBEJEYiJBhGMMkWYxRqUsmjKJMmCFJMaSmiyDSaEJtBIJpANKMN
+JEkpGQAYjLNETGUBRAlBKURgsC0wzKZhRmhiYIQZIsZCIIMiiNmFCCiSZNjI0khE
+AYSEUkjTMSZskZKRQWJoRNBI2IojZmMhTIkQEgyREEMoomDSiYxAZMECFCSKIkGg
+kIDIw2MNAlgyA0SmKWSSyIaRCSDDIkZmNGghgyAEoERokkWTA0xZBEQhmUSBGmaQ
+aQBFmRJMokwxIyRSWbAkbCUFlAhgUISJIRkySYhAxoUARCSaIJMkyiZJNBMyGRIh
+Y0komKImgMDI/038qLf/av/bWSNVEtmFRx/2aaDVmKkY0NkIRDGJEWoEGLf9g9MV
+UJWGSu0pWVpSOdWDVjQJGRSChGBGDGhNNMYYwjEsaFISGPT3TbFXk873Xq8vPa9b
+0dcco0UEPXIl/+em0IMHNYJaXBEsiKQh/7QwsC9gAauDvWtMEBWhGBIBAerIYlBU
+SzPasze15BfAyGrr284QNjGNEmaUphiMxEMwCZjAYRpMiZBMpEMkkQzIwTDu5zru
+Xd1xdQ6A6E7m7d03OLnXOxd3HBu50dl0JOhxS4HdHczuO647uuLu6650O67t3Duu
+3DucukzRKIMhsUjSQQxDIzQJgxohEkYTYkZsAxSDGCJJERhpEAygoZRESSEjMpFE
+0UpJlBkIYwoyQ7/2f9H/Py8roY3wEn8nr7+72ybZtybdqY06yp1tjGVmsmJvG48y
+89EXnvy9F6OvX0vpBSIEiSRAmgSASYSkCGBkyc5J63pgiRBNsJW2xjGmmNsf9v7R
+z1rueFmZcfXzw/zTGRYxsYm2NjbbfXD64GtivKx5t9eubzmsMTbf9rTfKRsYx7YR
+jHWL7OoAJpsFBJgyAEzSJiLHxfJKWQgSlJjGduRqRxDIoETG4wj+VgUjnMt5PXnm
+vEQwO7ojzu7lxu7uasg9T00zjrtcaG2RKIwyHx2vUcbjd0OXXvfNafFE3u3t7bu9
+TpJ1t6SKh9vi13hQUX4d307pPHt553zxxHMGb4KrbbvJGTCcNs3WmOyG2fg5vsuZ
+jMi+lacpNcvr0XeKDnafDcIvhyL7927rr7/Pzfj7qLVW5dFKIg8+fKpuxf+vfhB+
+73vWXz3qCPPfw32Mn4c/9mtONctW/fc1sYad9JYn/D1DlDPoyyc7D5bSi3ncMPNH
+bWmvm42eODHImqooiuXwn95XZlmKYKGK7KdA6lrgzZpEiUccypzKofPy4kbjq6Nh
+o/ou++j5g2i5alDG/G3Cb0yaOY3lH7wd83fLG1uQ0nDG18UHnnOOsy+Y4u2Nv5Hl
+jTCKmSJYyBhnB1Lbbafjgaat8zzctvDjPPy7e5IdyZHPSTxq/zkHjinrI5v0/nmG
+Pp+JUz4odkc9b4/cze19oRNOjG2wb+PkWtt4RRjbBsfupHPO3Mmgc18az57U+TM7
+gQsH90UPHJCZN4WsaY383qkbxxO20pI23JHbCr3ssnqkVFJG/lN5x6yQydwiaSA6
+rcgBoSxEDRKIuS1slJsq1MtS6koA5+jFGb17XFu0owrTZZSqsjrkmLVo2tSN44ac
+fvD3aWfOerth5lG/Jlkfp6bqUbOZs2FpVptDIwCuWVgqIgkgJMtDBFi+2FpRDhEI
+JAKJtPXloMoKGWpU0YvH9h2nx/hxra8/8UoaoWbia9EeoTlN7Bd5PNdcCDKemn+L
+cY2qMUXGibc0a33/wjqMN0s8PmTeeup76JA7aKr1nMbhIkn1aX4m5rTPH4aOBlTQ
+I35HXHwtJ9z1XuF9EQDwDnCS3S9W358a/E4pTeTSVvyKGWTK/n4Xp7V4dB64Ua3Q
+BIaDtzTsXpXV1k9E54ousxG/XtEhuaGmyCefTL/r3478anc78deNRjg9uchGVxVD
+Fq6cMZqIdp0ihq0xoIf1zldyBS011SFzq08qfSxV8u0cT70dZgp8ebjk800pU8m2
+s1kKdj+zvmBEEU+P0+FlzrhOf/ifG2tOsmrlp7B88bbCY9u1VFK7YavjSQ7xtE94
+3aiJb59/et60wn2vrgeV/jeNd+O/Wt/fp6dNf7iJA5QICcGyiKgpFEFQiCjEGEQC
+LBIioACSIqiCxSCqIxJIw1GQ0Ua1Vam2qYsmg1rVTbQlmjVbWbaGLbU1kWtlqWrN
+LVNNaaQICZqIhD/QiASyQCUEBKiRKRAJSUiASySKRAJSD/zAgJUghMIgEojKiCf+
+CIBP9wICfq+/889/0uxkuba/pJdybzbJvEsZ/CpEx89uGn3OONVtyYDHCGIxNyIx
+JsYgJYbH+I5RK73DuMZminldjp3e8QpDJju1QToo7pQFEpABpEV4CLQo2QicBAbo
+SEINjsMsDt9BO4nJzGstqAmgEJwhRyggJYoMJE0sJoa0zOdEgXdwiQssy4L3pzbM
+CwOaLEYFDBQKzaJCjFh2yhQOHbgLVMHXFUf7jhKTXPWsNDuEPXRHfJuLlKqls5Tx
+pCC1IgIHnTm5PeWkwwjobODcCdTCa0YoDvMlcZwvmQTkg8KC06oALrhzZqrQmQq6
+E28rdrSUxBeLkBshIKRh04g4LDdsmTCpNKSszbu9lHOoAwkmTDrOKCmSqExdOsOV
+D1XsAQpFVMukLCcGYGVFpAp4Bg0VnXFFjjdC8avBE6BepA3q6bOgot8LtHTiIlkb
+ARVEcldJoYt4Pimls9rpBzDNzeMwOdNAdSkWo4CrsTZ065yPaODXMCkcZCarR0LU
+voX1R3nDEsLtlyklMo3qrYHIguO1Ci7xRXFwJZjfTrtZfAyzUKhgJcLOIzeTvWjG
+zDE27OYME6dM3Z2kVeKcV1I4jKga0x3vCKlcUmkjRE1Zzsmxsq7L3zOnQ8wzeGDZ
+pQO0uN0NpZhcQSuVETbLL2zvKTzqjtBhwIXGaksi8rYKx2Wi6C1J3Ulb1dwqkjat
+FU6mO1F5Ii+bGnOMaOlc5EKekFDaQ9tjCU1yqcE66xRVh1ndLcBt7ThNI8LbowKP
+Md0AHRNhdYOJksYIQETYuK3ytX1UEkFHZLCghijoBdFzCgKJmlJSADdF5CnsMoIp
+pMjeqUgBrXACCcshXWsqyAgenB7IMoT6ZghKl5ljwkJTUVQuhTp3YIWgQCl8eBO7
+FTzwWGBEw8BDaLuSqMmM0wWE6QVsFIpRwmCRA128BCKpdaVunHbkyuScBsqeFjLJ
+qAw0WUUIhMN3S5Keua7Wynjnew31G8jecPcVIYxGw3trGziGoCdTHKPOEpO5732V
+4lnVA4VvKsc+R4OHHQz2JkHFdwSzeiDBUGBiQAJcznd7Z0oCmMykE5KjZuKCyKhd
+5nTSBBtu1sj6s2JCiZBgpYdOIM4luy6evBlYUYldUQQZKOoAiZL4d7fe003l07CD
+omKNzZgXiveIrzXjCZel4BcyY752rec3eRoT6jAGZAGEc3kkZQhLcVNCq+qVFSim
+BuCKZeQr5FF85WTJZzIXXwto0cB2CpntlWr0xWTfLt1yrDg8503VJAdH0uqes4bJ
+d5wsYFakMZlVS7lsEko6gj0LqyENh3rvG7qYJiQ9xoY33UthsUwRtEF6HUjtHWGA
+1q5N1HNgiI7rFa5QiEzuCDZ03KzKswfM7185zaRUkRyiUUssQSPAwlc6CAaa2KwB
+CwsOVTUrpamy4uS+mkF2pVMrpWpG7eYkYjcqSMY+pyDKhDILMmR5HGGc5ml4LJEa
+A2sxQOlwRDZ0WyiDjMTFnLRKRw6sK02ph9cZnMe8fZrmsJ0710vNY0uY4QFbSrzd
+WY7FvR2oW0ZI0zyUKMETaoJFAUTUyWuaSjAQt4DbxyqAYcj2ysQneAWKMQAWMoBB
+hIT0HPY5ne8L49gqYBFQhCXlCmzuzQImhRcjCApqiwAmbWJbzsY5reBB1xT5l5T1
+ybWy6V0tnJKrLM5WHNy+RpkM2cyZ5hebCcdg7aCc7IdY80lCFwSGCAXNmQXb2QRQ
+x7k3NRDGXELYQ1gsQhhUDum3ZE72ughHRdRDe5Te6qw1u1LB7lbNrJow7QT1uAV3
+LMgyxdGjCMORl8Gn2BQuwIUzm8BtHWJnZGBtieoICDTvKJbIMisQ2U1BCZoZlhQX
+ygQBW0jtgQdslCYNcrXVNnBA+zLTmqmqYeS9YapA12zNGgCPsUFmdoio3ByWaNXs
+7NrZuGMrSZWRJA0vOHdOWzMw8kjKrskdtyHLanDtiyJzpWVgjo+aaaAkqTKWLcdw
+xANHQyoZ1XdCK2biAxFgjnDMsxEk4wrWTKgmoae5DQbpESptb1u3Dbpe6qOAZBKa
+UBJKBZeiCwEJ0WgjFAInS4JGF6SCWBfA6F3ud3YtJTVontzKvsRDk5lipuE0+KVI
+KnHbGmhhDdShYAZ20BJi8hNs22nd3MxNWKTyqlNVdr1vFs1kiRRBRoZYJt1SAw2W
+IVY7gXmtBFNaclgFQFjwnNh/g2AZt0p2YbFHgZ1ZkUHIuCAEMTDITBEMBgx4Ecgg
+OwyuETQ7GUQsGRFZENlWXORDAZBg5I2Qg0CU0NEcuCVhf8E4pyCmHivNaJAP8Dg6
+HMU/BCCcRX/CAZi3FTsR+gqagg7gfXVQF3AFS45ig+iMnICOKROLlQG9QyjKyxqt
+rL7DL2NWEoOARpsJENtjCQigyaiVbD8RcRpvD0dJYxh4KmINWGAOAshCD2ihhCBU
+w7Rz2iEeFpgIN0kKqUcbsJC1I9OQR1ARqIJlDBA9OIaiEhhK4RqJxpaG4HNX26+L
+L2uVbzYr6uxSpDYDItapRNSDSPMC40zShplaragEHVTTzmCYzRWDaG4boqxNVpQe
+/U/8feVF+H1z3Iy2hnvDyeOt5n1QI23zarZHe9m7tUTEm75vIImeGztcNqf8/DK0
+7AS3hyuujbWlvld0RqQIdaW8VAyyAqKpJUEU5BBqICLiixEH2fZwoinThP1ruaww
+Wxs79RpIWIc1I6VkHrWTkb36HKsT8aCEdYQp8dyc8nHc5Tn1GZ9DqfXs+w6jU5vi
+5KOwjHVB4s9RJbGxesXpEnueovCTuXRSXfPMqMjxq9le4We74avJg7nrh8fkY4r3
+uTybuqrI5WCNRuBiLUVuMAR02HDRwNFmhVQC0wOxtAjoECQdIAuc+ZfaLo6O0IVM
+EV4FEtlx4W2FCCd0Phvqkylm+T5VSzgZCqK7UNZc+X11LEfD369NnPNn684h236W
+bTiIcgobiiYguzQoGj4YxXj++cs4Tz0qdHkwXXYuqOxh4RlKlgXcTb+ZT58LL54/
+X5UkWd6UwSUtKWg8ezAgn3LlVGy99KvHea5jdcQUuTpOwzdqe2VOu9t12gz7+79S
+tp9hZGnb9KZ0+UWVGOfa8PL8MePzZ2jpXPc6c8Sz56UZnuR7VyqryWOdve7uxH+f
+7i9zTaJuakt23DIbPPKW3WvwvI5hyr5WOMzSpMgcRs3ZkcLrNrzmzOP/kkQSPs/c
+fx/623+62xX7H7t/15ZmW2yT/C26fxC/1B/Nm/4vHf4Y/W83vZdxnDDNatLLf4zJ
+2SOOSTXtmh6bgfkM/aUg/9rYz+ROs5f0f7Np83tXE0ON27ynOf4eduzHucnkr/bP
+/xPo+Tm1N30cm7RXZ2cox/U5Js3cZ8ctGrXWkfP6/AuC4YHo+wmtGj+jDpRjOnhC
+Rui6MS/oi+aX3Nt6cccYzh37RNxmjpw854P83H24dWtaabtnmK/F6q09XRzP6HOT
+UEd6oETQUHmXUt2toYLMjFiMiAgDhaE2Dii0fPTcNGH7p5jf0kPg3fXkttKDMGej
+3IKP2KJOlt/R+CT7PcY3AZxsoa+WREFD5vk4TdXR6uRq+MzKxSvDrq2ak+c2275m
+d5ettnJp+4/Y+HV6qxudXLdedt6uSdTKGaMJP6jNbZZww68/M8PzplDqYusu8ZQB
+AFQUJ8y9CB2DjMriYXiyEoiFRoNAmCWWSMuP4EvGSYUfk7ut8CD78n+j+iqqihWU
+fmZb8RVjX9LiIokXhgfqc+hjbZR8xHTSG2NvltyeEkBoz+i+EBqwZMS3bqJsEaIa
+GhUYwpTgGQIwCHFSPHf9PH5soVQwNtyu3LdB4H7h7qHvPtJPgw2vhhBmwPscrZ9i
+B0ofZ8/K22LZTR+R6NBmMbWj+o8N5NK4btPxmPo3Yvl53M08zTwps2Ux8n29W7or
+ecnOTH4LDyKfk9eenmurrptb6EDAylMSyCFoPt68A+P2W2rxpvgRO7eOTE06p78T
+pM095szdT5dJNkqV9yvdk2KjRq7ZNv2M/zD1uISNH5LRt2dPbXxwgg+aSTdJarr4
++t4IO5+isaqdYSfl2IOJ0ntA756tsBY3I66SOBHlU+0+8bWUbHdtxa1P2y83z5Pv
+NqJ29h6ymz5tztPN04yw5+OsUx767u+t4Wb68vvztvPsCb27OnbrgHffegij8Dbt
+R+cpqFnrpoO2jCj+dtrCBfwtFtxfNrZd9ZcQzVPa9qbeq8duMYmVfF+2cTONb3u2
+m+N7LwZwK24TMUPA/s1xS2PJ211vg1JfBUXQLO2tMacGtLJmttPE59YWnForCNrr
+vbv4+/xy7+NG7BfXbnqKVTuo0DMuFW6c/DBvb4i5+crr56qLSmCHWi131w0DRNem
+G8J8mWF6/BavOE5YJruAqh/e19oRd79a8j2xXHhVteYnEW9a1AvE2WHFHnr7Wf43
+p9q/GjSGtZb51XBDR5fZe/afXwzt1jTi0aTqd5pQ9xPS9+tflc68V3+R30RS3anM
+Z7/OYoK83au2vY962u/PmnmvWmcymeWxxPne1H49bc+va/KVHaqJxTgrqcN7zDZ2
+TweudXvavlknvqpsg6zC6+IavvB2enbrx754TjNRir97rpG62S7VPnth+nn9KvmF
+thTinXkTrfbYcr54eVPbFQRF11vTW9+CcB+4r3XRpMtsKWHnhn3dFDF7PYpQoLeU
+zh639UyDF5ouhQerfW+FKROlO2lJwm+UDcwvkjwQ51nx2aQ+iINt/lkDDTrmb2vr
+xryHii648Xu/tF6QHbUcIFxgYRp4+V7eaLG64b2su+ONNxKEDlYjMR1Fuhvauj8z
+eus/aeYa2iB/Va1tuuH2zjOvxxxonwsbYInfrnTPNs504yedSRkJR0jeaBvNr5mG
+nFr5TFHNub0FVE3034E+q7tfF5n54uuT4o+28bYpzjhtI6mfB4jbVMEd31VAR4vi
+GN8Tu4umaeq9qLGLNUsvpQu/8faJd34UW2pXhjvaq0NFmKDNZ7UjVrNM4aXvd5pS
+g7LW/5p7955Vtvf6tsMfFl9rs3VvkKnfvemaXnFPGd4je+Y3iU3nXv37xz8/Ot5b
+nc6a2J+dPSXnLYpvqfBk7ZifA8RiUeNNauSKONwZWKpMDsKhPt+f5X25+dAjco/6
+X52E/Ys3128FfCeI+sV1Ngs+8/j7+sqrWwKe/0ydfK2xlW+++7Sx8Nr09NQEOaq5
+Z21TVe+3euawND9LPk1eaTWOD2M1bXSfq32fH5WrqCSRodPHmm85a3Gq8/ldR8zn
+NtO6s/E5oRyyZ1pX09q7BTxk/n5j1O8Yr8nSj+qezJTO/bzuIo9vLwYbxnRYVVut
+OL7dQJYPFNnRyNDLjWmONtQBd1AxDZA39o0QEps8eiBrSOQO+M2yN/b3A0Mr9bVG
+5A42A3LcI0uBvqcxzal1tziFTfaXakSnUaaNpTxpS+3avWO1hvyyUtPUe+uu45yi
+4aeNNM2GnS0nrucvjF/OGhoOnW1aB+Lxnmzq3GyztaXeuQpomp1FUXt7Rffavj8e
+Jxqux8eyex3ftOU4rXxtxMYwPRqwXX3Rcbx8dn9s3YtPa1XrnZx3dqikI3E1b3fP
+b83aGWPme0CcoGvA1o2PWLs1K+ceH4fTFuVHzrGWGpHci+dabeFi0V6m3aE68H73
+Zw10nviGOyJI6DzqzFDysrN7Vt3elS/jFreqKx+UpRu/mfHbO2Jz7663zp9WvTov
+vvvi14Hr7KrTbRduDN4R+UTmqrtsy2L5ZVHyb3Y6t0R06bVXuuJsOJpv5TdGqPBn
+vjuRp2u8z2WyNdKcny5v9uOfk2vv7aaeetW8z7wtz15nB6WenehxSnftgbkj3tWd
+Mah+7rRbrONx6m49l1arhpoQIQzabRKaTwFVPoKPOmlsaT9tWeFUp8/XrDuFrtXT
+1Ap74Ub+kFY8KMkmQ4I7OOw17bYmTediZ0ZtqXZakoO7cey6d0rpPrCrpmfgHM/b
+a7hjUcJ7c3OM2GCCHLLJ9KNHOb1c199tbZc8EKX0o9vETvYazOKX1tnTN9u/0fij
+7WpVRTrmmb7c73x2zlpOsWq3PBNjMryyVim+k6qIHV8cZzrm1NNNtGG3WiU222+q
+WvilXLVPDTtuujYqnq92HkjtPrnhn8wfFVRtPKbMlam+ja2nZNWzVGx40FOJoI1m
+jzX8RMGuvpd/eu+lF81TFb00pDIz9nRKTd6RSnvt2s+s7+qqt/jhaRHwyffKQ/z0
+/tG3K+dUXivrmu3jC03fjSsNvPfd9sob+3xr8iPBlBljpK63v6fnbHtxKpDNFNx4
+fWXi+m1XLycVHAWwI7iooCKfX4XX8vjqgNOk/E9udJqie7fMu3gr4Snj7XtqUiPX
+k/dmGsfHvAp85erxqS/xs1bwlgkOcUNz9VxavzsJ6RvKmczE3Qfa3x8N7dfP19fV
+5zBafd0+t4Gv1r9dSf3T6+afWJ0nyP0YagjzqAokAsvA5HMvICycScGRH5DZSUA+
+4yHCgQfxOdfUK0SiI3A5uCNvta9mxHytvJydnbe2vh3ekY7Rp0aKfJeTkcPDZ8Nm
+PB3NTaen67W1s5nLDjLOzJpdra8zzbuJp5Pt6W7cnZU5vM2/Y6dMPz9e5Tcsdwed
+g3dJ1jb2DdpxJIz0Z0kNPqBsn92/s4FF+N/glGnYgij0wPhQuH0EH5P7jwhh/JyC
+zw+Z3IMdOXTp3K3ZOHCvyezHJs5atrTSjQcMZLMtxWHd4dXKNgxw4aZq3nzb+1vu
+cjpvN/b6mqqpFQxWMPRn6H4LFK8ID7PD0s4SMs9KL0KMPT9CxUqLPxoSUfQf0KPy
+Lhh9D1vz6H9jW/B0emjPs4eCR1R8HP7MbkZSDnGyW2fQzpoFHCz0g/k0/c8XzYzM
+Xg5v2dmmnecnavJvG6+L5VVNPmrir5NP/86vZ5HJ8Nnbq3mj04tjyV4Y9nm2eh0f
+qafNu7Pns6K05Gnm+zfa1ps3fD43tuO76Gt3pHDu2Z4fN0c3eclcM5W46KqvgrfL
+ZZ8Ozk5zj2t+GJ1OZux01LfBLof2MVLIb+iTTw/Qko8MWFEI2oiP1WGGjYyKLrbb
+fh6PuDD7yk3srttD0dPqECggsURwgcKHFYVt9Z+a1C4nm6Upa9L3uLtW7mx0YcK4
+Kx0dfZa/Ltw8n9hXZ89reu1qDcLLcHUQNwHtoWoGtuURwwrIGERCPzCr0EbZJDNy
+QYwp37N0hT9ZQ2foLh0PmQ4bKfLwekfRti0fBA/YfU4d3PrbbDZ6xtdCy8gjwLiJ
+ERJhI2+1B1WIF0FdF1DCwjKkl0UI4z0M6fVMf6venWbllsbtgcPvILqxNlq6efK2
+Sq6vRw6K51ebu01V9Z5ui4IUOJjUBhQUeqIhoDPBJAf0TLYPoToLip4WdGkzxt/Z
+762yzA4Qhhh4oHIv3KIDT5KmZlTKwtaWOeREM8623/B6elo8Q1JxiWAgQncQECgM
+LAiWAQRUxWNHd3dxdjkaybr2VslNjq7NlVT2j4cJ2ejho/Rk05YtfCzu1xat+Hdu
+91cvNxDspIbRFIVURFCyHQYewlUKLjAgdUHOqqFXQdDAGooOZKIyENwSUKq4sEFR
+yNRMUadp0PLpEZlE3GfqYaDKGQcHDf7nD8kmHDRh4fwWWYffjxw24caYWfk0mkeN
+D4SFGhHiVFbu2EkgtHFezxIqaWnaEdzJFsqSNEFKpZXphid250aNmnZo7ZMVlx7m
+zFVXDo03KvK3TTdqZZZ0j34LqeGyvh6K8ns4bdrequzHYrNt5jMmO7tq3Hk9GTU6
+GMOGnzTTgbO08zq5PJjdy74zObhx6M8nJu5Vc+Lbm9uVj1ezk3q17t3D0exwYMKB
+pTOURDWRGaXREECYuJhxzxhETUu8mXv9Vjp48d1lC0/f0WGgxkH1HjiPyUUeFBGO
+am8bm7o07t3Vu5lah4OzS3020qqBK4ICgQPb8h8fj69n+3hleET5+1Kk1maNSlav
+R9c8+++/Pnenwej1erxtb6HV2SCSSdrJHVYHikZUg1ZVkDtUEypDVQZTN8kDSwll
+keMwS78akNOMiJQQc3dihLlKj+oCG7aEM7oG4kZW1NVLsxIVjJxmQMVBiUTaWsgY
+DYxiQYyPuBXhdUKWrZb79D15ra7uMfLW1eW8dXOaiNhdxQslkuUzMFKgagC1Ehom
+iOOZC4AyO5qNxXMVogEhIpqSNRe4grNtR7emHctEhpNtsXLSm9xOTBmOSDYeNILY
+2DG2ibk3hUFnKtvTMXYBFsiI1xxoHjiBJg0ZhC2Vig602I1PKTNWvbUbYm/JAG0U
+aUsNNFafJHs1SpG5rY8UsGwe7VRhp+PJFmpjr15ahtvTFpqhuKWCg24WKj7kpybZ
+c6V5CsG96jMayx1GWUOgDVCIZKqhixI3lLuejpuwX0E8/UR6+vsvzdYqEqnmqYPr
+ynyiMGXW2W+XV42wNasYmujHR/B20ne7B8uftj52a23ykGf0r2Fya3xEEDcibiTQ
+0lZLgyC2ePfZkNiK8bqa+t/uN5kVHlxN3dckC7FJia9ve/Uugg2wm6UBkqXOGuys
+qBJmITKhYQIImk5o5EECZQKpHrRxXGOTi2LXQmqWh6LhdyTi01SqSQ3VOEDXmHyx
+eGS7oe6mzQZ5CDD00rOtqeKJjKBw+ee+cWoiUVDVLJ/FhK0iGh1VeKiES0TeYm9Y
+aEWwQmDQoQiRwvF1pOMzCkqwS5CmptDqzik403jShJgqi2UaBbWZmCIlgrKzuoHE
+I80UvVUMTR9bJIWy6iiIAxXukg2P4TDx8uds7uzmTTj2cu9+82j892bLO1fYjuV1
+nOX+0ET1+9s/q59/SSQJI/0pffnnpk32yWNNLZIyLEInER1S3+6lv+L1te04VnqI
+JI1eRIDos0ygqI/u84V/ySnvUfr5/o6avXhuP26/+dG413/yfDY/hOza/3m6353D
+FQf4gPLyckmNf0/Z+79v75+CaSQkY8In6aqSH03WX6Z0X9VQB/vFWq6C5csRuvBZ
+nX9ytV12MkIm7FR+DLJ9H6IBOuiLogQGQ/eRgyJJAx+aYLFFoFE+nXZEmdeEk51K
+K8zR4ejlk1Rjyd9OlGOU1IHRC4Twt1lj8fuDSl+toyn7KlPBdN9GfhbdlfyOpi2j
+7n1z3jf4hxzT5xvpenii/OQ9atPRJOV8YpWSsyBkCMSKpoqNVJ4qi6kbGS0oTp5U
+Ze+1/H5LYmU6Uu362dTHpJsyInEO5DvTRhC0noXDbUrY0aAqh/N252CZJLYxRLww
+eDIgJvhTpSsrEJ4SVDvd9S6BwlgfShNMd9KmGrWk3I52ZEqkIKJiiDZgpwVrTuGm
+0Uo/ZLXM3bFdFTPSQCOxHSpDGrWnDhd5Y05Lm5qtLILG02ERoixRXRkaboZjM9Fm
+XShtFC7OcoJwLVrbJ2vpmlco5wxxJm17X2pWtUowXbS88ViaVfl1mbDdKMZhHFFV
+CHEiCc2ed3C08Xm0T2nd6Uv1K0yITQlBsslUGWxQP4OXJVEfYPWUXA+kdcuh/+HP
+wWUH7diyuFPB1lyF6ZrDIprJE4SEZ7msK+k6P1h5hh3qskj4roZNzZTZjCbg2ePa
+UWtQoyUuGzm+j26e5Sjd6d8bPnh8J/3oPU17aMyljAcLyiBhr8j7ZOg/Q3IF/0Ta
+f6XwNY0RdbAzegLT47336Ne7qtUughSk2m77D7Kk/viknCAADCufnfnmfRa+PuZ8
+GbDsi+jRFrzw3ixPHSw07DIXufXiw4eHq9LyQfWZnFx+S0TQXRM1QT6QbNSZJj8m
+7UMbjp4V/ZPnp3lbJ4dvxkSfH+zJaG1+r41D+t7jCD0giVFEsaiSGe8yzuQcIPsg
+7JTIOFnT68Mlm/XtHO4/DVboellFEFwpf9tkkmQRHs6yXoRCkuKPxU4Z4SueGdIi
+CB3cE9RKuhrCdlwcyTChsiIXrJwrTvs9M61zkDIsOaTPnYckuRlvrVGxZx0zpzzt
+8L7s4WtdLbRACW2FaHvN2uU7i5n0qt00Kgy9iK7Jba3/3pNiLNMrM1XhIIBPZHET
+RypdGC5pZhk1rtje4i3zM6TWPeYQEE2ICad2RgNnBwoZOXY1T9NwigxKQAH9P9Hz
+7gx+I7Cg/gWYSkB3Ml8YRVoO+7qZcd04606nOv7+wkB9/5D9dwJKJD9w/pOUxtmf
+p+39YZxm/5BaSsnQxtYbRsXraiFwqdRNWIdK5L46DjXUSMMKSKJGX16puhl1MLFs
+NjnoaUBMXnCJ+Kus2EV8F1F0KGG54HeshTQt8laFCKcUvV0VSQaPOy1KydMvj2Ez
+AewDB4P7DzDchscafa/a6vq62dZRm3G2jIrBxhr3MevBrYhskfQQhIEa0BTQhzBU
+xFWQUuAIPIiFQc+2IfQGI/BwLEPA90bT/w9O6Hlgj+ABZZYIk4UKMgIv5BFETg9o
+QqCd/YV/CKsIEgWiK+Iqgr+QaKBHSWPIIpYAYOlqJTAzWgXcJAWQkSQfBkVzkTkt
+EBuCK4412dduYOlRLbTkd6BOG9mJ3lkOMIivftOjRKpUQ1n8N8AXRv85sESi9I3B
+wqNAL+SbEH87kA4Q0iLxfAXQzIiiJA+Dio0PfHBFET4KwoGEuhuF0X0+Od6iPDZB
+vqe2ZbNmwwwQNnblG4ZREfEADnQldENc+vyD2hPFPDVaTmO6ErcB2CSrJHawjBeT
+Lu1HHXecOXpfFifajXzf803to/li3IQraCMnXE7aNaF+UhNCJJ6bST1yCMSEkvrk
+EZsiJnq9YnIRyfoE3qs1+5g4qCjgAB/d3LXII3r+NecgG/A/EBhNc2cEhOijxJO0
+FJewHGBzK1YnNiLkAPBkUztU2GMpL0j31B6VEaAuiEtObw0ViA2Qo2CQrPgdgapv
+FCGKU5zwAX48rSmSGfCh0sBAp5Vw+mHYBmgyfBvQ2gE9Qiw2eCK950Urem/KrOD7
+tAApA2iLxtGRmFUGVZgNFMIQi7APICVtlUdVP5fqGLX9TEJBSYcWuJiEgyD+whr8
+Qt4j0BCvhFy3AUJAHpE2ATCfY/XP0YM68EHwJaHTWChL8gPdCT9IoJW04ShPtj4h
+rXUO1N+9eNBzh958PwJ3onum3eftLwTIIDagDw+o2Baej5qT77qlol7lfPlQODAr
+7Qiue8ErGKQIVtOQ+yuebQ9jz0QHR0XSF1f1oB0wm+nhBsV5Dgxx5TjC7ifRJgWQ
+JQKDKZ5QcF8aA+2FRB9siyFbQEtXEFsiyD1KeYp4vn1kdk65sBN3fx5t3nO/Y59A
+R189AT77u6pOAXgcINOFPg0rAnT4ODvDpDvB+Q6AjhNjrJ2a9VBRzOAGZ6eDgd4b
+NoM0UeBxPD5FreuGt6Dwo9RFdb8nAiAa2R1p49xif5Sm4cGGg5x+6ZreF2MUxiIK
++gryR/PfnDI6Q9Gn57KlMJ5766E3pkiWtHqD0EedIKlAC3QaBfbl/j82SCLdu7yW
+v6Hmk/T9Y/qXglgiQ/aIREU3sfkhFsOhToBSbFaUQBrYeBo78wWrCIiT9D1wcVo4
+GjuBz3joxqZU7bQDFwmjB5e74MBLoK0PA4QkclbwijNF7qEEoFkFRROi0IZfN0sI
+zwihRtDz4T7ibJnxZdmKq4qOeIUAbh8KmERXb9nKQ+5QdzgDPcJjvxw6bZ3TBIWY
+SSeN4U3EZkhKxct8oIiTDi7lqOt3Kvi/tFCQEsImhN98ZBnWjLEBK6dw+FxgB1I+
+dDUAkMR8mm+NWReOPvBhDZjk4boMpjxoBGF5Lqkt7tL3kyTUNCK+PoZx3oUqB7h4
+5wEXO/lduTg4NfIqAh8ZfJSAcG/jGkuHA8qr7Ro13OwIJLia9u+yBZ0dicUAxwCA
+kEDreMjHsNGLghIQjFyrYc98oQaGSKediKrHfuebY7DkhSaKvv+X/oH7Ij+oKSLw
+2kgfoPv0+vpfWeMjRqQk6L7QtAATi0oNZJzgYxP1w4HgU8+oYPhFESAjAyvt302e
+CDaAWgGAh7Xub6oUY6dMeNnQh4yl+Nm1AA19panR4CYHnOGiidVdfdsdGvhv6Zx0
+jjJBqQawcqukBR4Ux34pXobqCIL3lHdgOad5nLqYjUZgE4QvtAltbhvPRFES+goc
+QfyAkiF/e4WiKYNUIFjKWJZA5fwJczRRibFGT6zCHofhgW8eydxvZ1UFHu97Toow
+8FguNJpiKoCc0GQAn4ceHt3K0i1feYVcihrJaNBCZJgh3FO6ENqkEW9eLD7vi6wf
+fT7OU2J7Zn4VPfXdnohaADg6HCzQSKlLKttUpsb9HGGYyM1kdbG3LRyKBaAlAEQi
+6K3SwEpXNuY3BAQX+wSMOhQK6JuJ9BbiQxBRmAuim0FUeeYULAUKioFQBh8aR3Mo
+71V1gxByA7oX2gGDQe8klFNQQNSjx5kWPD8XwbJrOHhrmPG1eVz2hyCeCzw70QRm
+PBaXfmHpq4d6Cj30CwL4FmzRhVE1Z3PXGd4oUT3RT2fXIk3Tn6hAxuw6R4ZKzAfB
+E2O4JIhAk0YDAlY3e4AHkEgAr74ycQwAnQW7rtlcpF6JZA7VNu66JrCcgjUCEFCE
+RpghIiGj2TWA7EMd0aiCjpcIQOLL43hkAKrIRD57bdINOGQ01LwiQc32iwDYCMaA
+kHwImA5vu3GtiupPVup02YPe4G+iICJJzomO2gryY5W3M5zx7DfU8YCDsEXiG6zV
++xuOJIG8KOYoQjJHHsGD13J0uAvNmGVfCbv+KJrzyu7cZk07DszWZjii34Z5Oq4J
+YoGxovONSVdyqdDaiI5o1E9gZEO+MOknbKrd3vCGjWOSCrnI7Ux2qgrF1ozkJ12i
+qiB+Qq2iQl6eKyIKevnnG4vy6vIfKJt1EpCX9n+P6PQpAeBRKJQ1sOYCWlkXAgV6
+zM7YJl8sa21D2vb7geeO2SpmkzN+KTwlzt0iohA2AcDPLw1FWDBUJvFW9ggVk6Dx
+nW8ShTWwRlT1sHHJyMsXFDhNL6q7kI6WJJzpELbUQNVIhmsRVy0ajWqqiK9NrXLa
+rEhagikVJEOvbHSFh2axoim1j1bJkioWVpJnTIwotJdInhXvflf6SU/PPQX0bTPh
+CdsP29ywEL0SWUfTCD7EJL6ETkKMZq+XfvOV9/V1w3yP6vw8Bs00Num+z8M7mbcc
+Nyaf49zDIxUaQ2EvqlaeEBsxpWMXnJV3xw2Tk85CvjXKxcvj69eMUfMr8bW8bRbU
+onKyW5YZYTLbI2sO+23t750Nk8klcxbgYLeIcQe/QCQJFkWj+oMfqaThzaIrMI2P
+7OfFp/TvReP9gGjSGXxEeEVFAmDkEvv9VUZSkBPbMF8w/60D9GpeH1QCFw55QkLu
+z9IAXDqKnNMEC9ziBCmelf4wfDqr8bOBhgIc0RJII4qPuV5Nz9AAJ6ARU+oPi6hT
++q8gwvYgoidW+M0fbI8rtLFtXO8iTUFlJvXeyFxmJtnkC7zuiaT8nGztzQSqBLOU
+ovW3gp+vzfBxm7PhlVblQM2bd+/Rh4dPRBvEDSXngueiAwyDAY7g52aB58+eG+XC
+rEW8lGS1QUeWOAT3cakjvwRHNevLrWRGxOBmTNeUHz5BNT4o+AkxZAgM8CgQuYt7
+U5ikqOco13h+zN5A3dAfUbWApJdeQtkMkEkG1iAUlofiG95daxu0Xul4UwF56lZ8
+3m8LyQBioWOMnxAZw8H19FHnTZSfCQ8UKukI6IKbgi2EROEVBFDkVQRmNCWiK5gK
+gjqIqofRAygkWCEQQOEBE3AUBUywFE+iCoPxHKo4qQYSR0uWSDgsC3LBC2FUgIbA
+gEIgr0IFBFEV2beEGgOV2VCEkasTeUI35YWoqjQQJBJsaVFsgnIIYIegAZiYinAC
+KCHIB8L9aSU2jqpgHDRm0jioEdaHayC8iYiN6RSgqyRLYbpYJZUhzsQdYEVBA3EU
+HoIwQQ3BFaiKBRPagNKp4YAbiYCICDIIOliTxeOOGnL2EcaOMNDMGJjKNGgchDj/
+BKwYSZqRlgLQR7nzcAWpLACURHNK7oqAsUjajiiYMTUESEVX6ICF+TFgwSIL3tKF
++9aliQFdBBB/IK0AryCL37njuaj74l8yZNHN1lSjgfcTgmPsJRZVGcrSr8IEjldQ
+KtmKapHX0QlsIki0IuSRcABgN0Gs+4HbDqPIFBxJiVh3OSukGiQvd5nogLDQRteh
+2MyW2SI9oRhikH4T0jXdxNxJF2Xnskl3AVffHjA67x2y8y73Yo5mAE1DhsMmXJEc
+XQigaZcogCwOAJSmvkK59/AZt5r6CHoKYtZF6XRWBxO/0HFiG/lmwBS0IXvAvwXw
+uNK56cJCuiEUIhAnVsVC0oQ/LDomFtpZXfIu324pRnto5FdNUA7OBqemCvdxU76w
+rnterFGPG+6Q45tXnD6WRacT+nbNIk1JCPpi9vz6KPo0aWTYVCFR78pPNQgpwlQo
+7nZl96ldo0qhd6oAriD7PYX3YjYi6+KtyURx0Dh5o389ggNbU0B+KOiBJNO/YO34
+6a7wfKK5PBjVqgozX5yrvYe4b+g/eQESyAJYADkx6QeCQZ6hHDToVxoz61c19ymI
+QUB4ySSEGSTHhMs0Tr7Of7v5ZHrYzWRqmxy/D2PVnfrHr7nmk6vMiLt6Pfbbft76
+NqFfrnncwD0EdL8qWqmCRcAGdrsAgwQV6XyemW3csQRzF17hRM8sNaA5u41TovvJ
+lL6Jmj0Qdj3rXVUPYlIJEIbMcN6Qo+y6+Gy6V0pk2Gw6o2eXyfFnBOzAXCDYADzR
+CSnRaQYZ+hwQZ0h7sXXIQK0DQwbFchiJ7Akq/buuqEJT+FvwSPhCs1JX34emWkc1
++0JlH7mgV6fdrze3n1BaU/HP0Ip6Az60FlmH0F+FDieRNSpsh3JnZieg899kMapx
+A2AgedvbfYhjt7fwdfgTf5O/lUCeRAZEpJHwvsvi+d3wMBEna+Z6+GGGgCoek/BW
+dQo/JYryYiLihedIULrmV2fAYIU15yOAfqwHuI8EwYI7aM8kO0X6aYygiiUvGaA5
+AqKrb3bLK3Bu/ws6awNQMldRV/OihvSGeGuLuQ5zhdKQyvBbunGHiqbSVBLCBBR3
+sJmkCunDAXHHd4eQxhEGRYdBzZu7UXXMiBb3M0jRVaMN1xw04qyJ8G6DCyAXnHwZ
+RDcJFX32jyXoosS3eitAOfuZFfqdLyQBCCB3aIfY2OMhjfbVA5gUvI4NI0ulOm0b
+1FDfrFHR10hZU+ODKMCViSStxuklLxyrOzBrvpkTD7nncH/YWN/xZ/cWB4MEWMjo
+uNq+pDjINyCJIMft7GzDNPmQMmfKO8C3BCupq3ah8aC+3PLydaANlYxbybhnNhxC
+RTyS5wfe8lJ5C60b3pGVdQBEF12XTIjMtk1B3sJLjW843JTV6tmmB3szzW8PCNWR
+3yd28o27CnITe6LTd1rriEPv+r+W/Lr2jtO7uzN3c4O+Tfc02jcUkrJR8QctADA0
+gXSiA676RwOkRHURdCHLXIqelq5LOSTVlo0mrcKsbgjhEjApzpaorkBLDgWikaMD
+WBmkEQLF3ZzJGd55Vbo6iJbSXTzOm0HEagBiaN6SrGSjgMe8kJ1BRvIDKb2rTVuv
+UjayCQnFgki2WkEJGRQCMRewEqK/x1GDBcgGSKNrCGtI59lyNKkdOrQ0UCJT/tYC
+QsXuKTErgmB/L7qWQAgjObGxtYRpoNAhObSe0Yb86I/8koc5eNsi+mHWzWtVmg20
++QHoAlFmGJHkyHlQ13uGhptHj5jDJQi8LDIbkOBvKk72hX8sJ7ueW16GHGq4y9iI
+j3yMYtSIbDhrWwlmqZXVJRCqouUAUhKKoGCwqjpq43WTfM2qub+jk2T4GKHeyOVj
+tYdlk++2vs+/+x5NvlJOLPYmGRLWSHhDrPt8vLxjo69Xl+W2ESbJz6o+epO91qFW
+HfEcnfU/36UAcqgbZ7xi7DdKjmP6OdAd8+vBt/QtBnxhQ5Y55yjps21VoCjTyYLL
+1CSAQTQgB7K2FHCvBzdvNMXNbRQpcZKHabwUfuGc374PhwMYpCQXoDnJZi+6wEgi
+AiX71dMRdTfvYRIwt14Tk5HPrJ9sRIYwCUOkZlDd4TvtfPdgHxB1w21pzT08CJyh
+7Xc8oYd9ZaSpdBvqDRYUDhA4KO7b0HDw6Hwa7XttFLJvwUIDpRXAcDIRWHS+aUSz
+xocp5qowJUFyIVcKHx7WHevE5XHZxO+4peTzkklyu0YuiXbLEIJQUcsg9pabkI/h
+od3gISwZ4fwv1Xzc/OeFHgwtN7OIIX02fD0/FYKloiIWHTB7PYJwBsz1ERDlrZJE
+YDEhYassKO0HhjnoW2l4pHuKoFBPAi0IHcnEsMNIUlBMw4wqCkAz69wRdbCpCqYV
+IiZOnuCR9k4a5ZjWNKYUSxiFzpNQQUVwU0iIm9GbESmCr3RFQr1Uigjc4jisu4pJ
+puPoO5yOeZt1LgztDDSQtUkU+DXS9idDpAhOhoTBeU7AAikkj6CLUxCIImIIc+BM
+GVzqBtTlqMISI1Sc4AgyKiD4gcWAivyJqEowpHETkhIOIUiJAsq4g6inSDsxKRWg
+Yt+3owIGgQI7FgKRip6JhDOMYUVRT0TqgKJELhtSrt5BLVIqtKhEQLggZJ4QhiQR
+Gq0Cqrhtk6wQnTdrZdiQdLJbBMJNwoI5yOuHOpAbHCioJ0J6YhibSGY1HllCJmB4
+jcrMaFD0ewXkW4ejjFIZTGKo4JHcpSBBPtd0Qxs1vmR1w4jyA/Q8IHSlHwHq+Ee/
+WKYiGSG4HC6NiRUCLF32CGopcnwE7g8WC7D27ysTrEzHoRC9BQyGYAhkqhOQBwpF
+wUlY3keYQrRXorRFPA+GhTj5pDpAE7BLgAlbrkDpk7XdBkMCe7aC56ythMcLyB5M
+qB1IiizVK6jgSzmXFAgGIgqwIgA6EtEewNxEDMEKsvoUzTnlKA5iDnmtY0XrFdi7
+oO1avSIz4+XbDYhpYNbXls12lualldWW6Rmvp3XiSn4tr7H2DBIdge2UHx5TmHNI
+B0iD6NlFC9gO0A7Si+DLWvYUsE7DYKO6BRETeHLcg6SAFuaZ2hO+UAetihqZiOFA
+GI9nCa1gvgaJXoNNThLNEDOVQpTOKJxUxb7ouRUN5KMOSuV3bdQuokVEdMKFDQPm
+AmkMhmx1/f2bHBC8ijYJk50C6E0XqgwMJ6K9wOKaAATyGEoaSjjPogj2CyAOQRZk
+JxFQViYRM0i+Ei8gAZiihW1WUkg7JgoKGBijbIMenRopoooFjRhdB5EbkD0B3K05
+69Q6zqcbkOM1FpwnoGyJMqYsuqUojv8cZ1sKM4tO5+rCm9ZZJCE6fbttA7APREM1
+9CSIPRp816UCN9JJBPsHGQVvYZdivqFy+EDnwVAwp4cGED2KJDVUXA7yrAlwDiMK
+5xTOPCYrIplcSlucCUpqSpZoxggu32wzjnF2FlIidoAllPOFbJzD2SICWniGwEiA
+3QNDcV1ngXIKepNW41sRWLhvPSg1vwFIhjFd0VnVLBR9WMhksUIIoiX6b6aI6gwm
+eWGTazqFhRbYz6BwdaC+k9L6lESGVK0KgKYufORB0fYYzTnBemj4BH2gEaHaaIrv
+fxwDWvTnqdY6WgKUpgSoZrcEXkiQwPFhy9jFIQUORTJpUAFrhENwKQV1OLa5FQdh
+FEEkFVhFQCQVCRUlRhtibMFYg7DmjWQ0vBThVntDVh0KBEg8z0VFZ1dnlwvOxCyV
+yFg6KORRzKtb9eVaU6PsPpQ6vqCxMQymmlu1MoOofNGJrbSJqCnCG0ZkU3SmgEqj
+ljqxILxoC0NXXqMYPKZsTNGgseiQX1Um+tDnWCzEFM5KYaQwiK2hebBFtFvWbIKl
+A0gySQIKEVUFY1qkKQisEBDEYcpVOMqLjVHCwFV4coAKcGYVaniPIi0IDFCEO6py
+iK3Sb5QtwUTkeVRqSZvgtiPRiC9YmOGphARNmQ6kLF5Mm9RN5UknKirNlCkLBMDw
+LZGwouEWmYel0VvPJk0f9vqDgB1OMRmKZKIzWahOGd6NWRFAnCIXEL6B0Uc2fl5P
+sIeQC1FobsyuXXTiCpCs4yTW8WkdGVi02BNTSDmtnKPWeq9Y4twF4gEpDgiKRGKA
+rATvQoMREzE7FMRAK9ixd+aTuQoIDMYQZSoQTcKEAaDgwLsSRHUTmeBlwAjqJW12
+haMGnPdB7Rko8t7UYLQRAzDoHldEqn4zfIlR+ahTFDj40bkEs7N9ubb1r5Pkz4P7
+KmacMbzsQ60kjr28eWZT5fOlM3PVqKOMRxDR3mUfp54ZLqzcSJorg+9hoxMGzVzk
+E32DW2JtbU2qrPLpN5Xpxamjzu8wb1lW8jakUx6dIsLnCxQwpEzLzYbSCTWTEZrw
+p0sG2G5EvMnZyhFFF5tTkG1AZohFJveaYcvskKd5SozIJ5nClUEHKNtLZSLNdA29
+uDYo7sXxjC44bazLkkiHu8qrYzJnnJ2oQ08SqTZVlzXJN05fOLkVt9y4SAdhsUds
+ETItUioA4xSCJRd2ihTicgxYcOnBhN2OXCLbNOTBhkqTgh2g0U4XAdMYmaJDRnHR
+R4Lu3sBvFYojVUFkFCHnDpF0yh0wkgezuLUwW6maOnVNAne9DRbH+AAHETar2+Ft
+41Wuaum2jm5bd3WKQkCQUMg9FB/ynAQTMVeIB8oh6CKP0EAQxoFOUgEEvm7+N6n5
+WSrmuWdsdiR+nu8pv3szvUcbeXbM8Y2rYHrC4l+zyLjDfmIMYVsENPkK9m6v+lyT
+5D1f3aEZuONmS117lX6NWkjPZo21sYFwu55fns3WZHrU9bIXYmXLdyesJJhtZsyP
+8XuYeY2qPLzk8i2eMXprLlTUee8pZwCQX5F0LaW8MCu2YWI+FoVCAHBD2BOl9jQc
+oGoiISmkexUTRuFCkqlW4ITOGyomsKYHBjZrY5wncn7k8ejM3ET0XYlJU8VglCrh
+D1mEVbUgnLS6ENcMUAAwOwooznxlE7lPuAKOBPjKFlnYC6ADqLSrEfFWgZgi07lQ
+JqzHsmsUg1ZBbG7lW9a5qOWxHURNRDgomOIhVc+e4RuBqAVWjExp9ZXgMJ2l+KEV
+vOwwHQfplT6irimoKktr1mTvMn1AI6Nj8IOjnF6dHXSm3bQx3SNAEqFigcKwa6F/
+BubLQ9vcq85KsS6AydGpaE6qtgkARpz1BKuNSoGBOgBQ5A1kBa73YHOdtULNUiHq
+pDygDESZngsBXWfdQdUGGBnhtbsFzJEXO68eFC4N2M3gCnwhLjo2sgkKuQ/2GLWH
+g0I67776B8O/3enHovnD5QgD5SX19KJhml4fQjZ7+0Q5JZrA6YidgWYyY4jl8xSV
+sK0myHtg0AKidGTG7nAv1K6y5UVikEpJJeVcrzdb0hpFKVRzLlSn17KMaMkjCTLM
+QQ0FPTr0SQkXhEVoyWhvoQ9yPsIB3yDPeHXPwPw9rkIoDOGz49jxbEtALl682Rhs
+0JwxZeyKgGTMoB+YAhZz8Qa9iOMdcWRB55QGYQwryLwiXDkQLgYR9ATDOHVU8lId
+eOvOCO8PhtQKPJPaSS5gH9u2h8QPjqFhzWX1iUDkBGGRdQFORGvidcljOQQDzVBl
+TGG2UR07istKQkPDezFCw0PURkJVk1fFtUDEY3CtDUhqIFYmbk+TNC9bRLgC1B2Q
+hmoGNNdEXHTlVNGEVIJL1zKJJcvOiDo0nuITwMO7aogoMQulp1Uzxq+a5SU07uZm
+vE1CJnZZ70OyN16aWcbe7CfhB0W5dv9C6SR3sHAFMHzkGZVhljT9BtpAZFGb0IBh
+iANn4yVtUWWNjZlODZOyQgvvs4J4XQtR3HQo1zIKaCGoA3MHDeDBQRyGSIusq+Iu
+UOnPeNgBZsMVdUK/MA7M74eXN+cCMybrgKkJpI2AViGsH9t9NE2mTXEAH2u1lnrn
+3EhxUTGqz2uqtiqAhUVEQ7IFAI05ncwTfKHWxRzwOqtWiKznM7zWPbVzw4j5iIaD
+SHW84UBRM2Z3vmt3R7bnF9KAsRXK5MOIWdxy1IhO4yIpyYRjiTl6klPndDcCERED
+fIAlT9GeQO/FHYQ4IvbAcQGRxYyPYeZewWBoEX3dzOxpl0F2A6Xk4RptVObwVYvR
+JgUdJSoUBw0WAB93YAWGu4uiaiu2D0oQ6CQqYz2svjWxM5GLngT4hPu9PIny6IsR
+ZwrtKctQEYHDXdoRqg5oQ2uSsX4bCJ3NGGNxFpY9K9jfyTMPt60P9tHlUE941bvY
+0CWQSCsNUdyq41StOyY05v6ryYNfhWLruNAJjmG6yfUmfUshkQw5BAYqlskE4XZZ
+0rCcTJIRvQcxBsbodFNqdCpMhmSYhrWBxkg7XIf371jehCbUwexm4dGgVDsU5gmy
+ARYrMvjRHnRAjrEi0GYc5Y6OiwRdCNAUhDcJxjcBNIBhrUp2G6ndXbO7n1V1kivl
+8XxGjFDj0HsLjFztVYhL2gQARiRjzTgeTHDnuVV3Z6EWdEVx3o6ECjQ5rCJk6KO7
+JyyngW7FaBI8Q0m90Hkz6/HSOXw7wPcGEkM3MXsytQGxEqIOeR5s569+9oW4M1qt
+CS6KKEewSrVVQ9Z2x1nmgZsV5A2G0sh3RXUp64xy5NrrMXvw/jH9rrG9Vbajixah
+aXPO4PyEx5aentlmgg3UzPNcyQmn8jm7WpaxrIJeGcWmiyb2JVHMgUcgNYWQZ8qR
+l9nHMTRw3MikGYWca2t3QhhaYddzCOLk1SxmG3vec1U7jhzaLKrbNpl7cveuJ4GT
+VKmHNOGIKDJJCa1hZpVTd9ddzdqXynyK3LQF/1fvHvFwDEEAgG7s21nIU4+UAFqO
+BOzZXxvafGAJlsTLa0vUiRYNbsqb6jMCVwky24SylLvbtzhy4U047dzRIGiqxGqI
+kIjQID2qNEqudsyoALL7RxclL04W5tQJ5QDpK7RHXccMSIKzBREj6ROmSpdaVrt4
+adqfw1EQX0QzEHsCa660tktLxhOLIkn2OyUnq6l1++dxH9/n3L2c8+25+V4ffTlL
+WbIZ6mIoWFkymTGcEwjhh9wUdmPPecx/I04eIAX8Pfv3s8Jw7Rz+F57P356BfL1E
+2R485lDJBs/Jx45HbNb+1znkLrlQVg2n3Z3ePSJuR7bhMxd8mt5Ml7Cna2v47Av2
+ShobDchLus/dr8YRijOCfI/aoS1CEk62/SwaX0d+zqSS4TLcKBNHf3WDoO6NgvqD
+AcAR82hL32rdu4FRZaPc4BSzInYiK90PsiBLMdwBZzGeZDD4g5u3gUBylQUbarAR
+BUBIVnQqbgplEWh9veEZod7p4BlUkk5VEijGEoh0dAiX2FHNFOZcC5CaW4XLEDTI
+SgogmLJAKIqAY78+xmDgxem8eRwYA+e+7Gs7BLa59uFG8ZoVeVgy9USRkUkhykQ2
+gdhQBuNLAzEGQWz6uWiSqgkgPFhL1X2+0eYLcIcj3iZyxIJ5vmkDHss1UAY9Kwmu
+cUvi7vEKuyu0GwhCTA/yoyJyKgfHT7x1mgrpxkN4KkOQXU5C2Mg4GpNJatXYSKiD
+qMyBxJCb3pESGxB3ecBzpYGNW/OquelOkMMQhLMNvp2CszyQXClDLJFNasPABkrG
+Mqh3NC4P2iBrGm2BOkclnvhVhaRISz3tcWC4e3pxcma792AaxCl7oESlxfjoIKJ7
+a2FiDuAweHtnbwXS5c7GQzEPRFNwEFkCQFcwLhdUKEAz2x8RGVU4dMOHfKVIFIhm
+2iWtGuVMhENpjLWFciSZlotHBr+3aNL0JXa8XgqPAEd6EVpKnkMUG11O6XJWr5Yd
+e1Z9xlu5eR7mJ0wHvDupi0w9qHg0QgciAVh2IX6IXeOlrntOQTFZdBawzrREld3j
+PlFqXVGJkUYTNlohLiPDOszjjML0boQtWicWm1LQfEJgpwVZEwVAf1rpwKDiWeW2
+T44FofGx9X7FflnTv57B7RWfe+Ko/xh7BrfbW16MdhYNV5PvlOkBqBZnJhkCwWXb
+ALoENInGVVyEpJHrMH1FM5yhFxZi6xvmHQaSOdy8vvLlDQ0cip0Q10A0glmjphjg
+AtXhh5sC2DuE7wOi1ogHvNgoaKThOzB1lxriiGCeshTQvqL89HPQ+io6J1Omxss5
+Zv6kfi67wFWe2dNZFCyzJZwresuVNd9sV2RTnE5N7GjnjtGhDOLCGejhEM4VqEAY
+I4iKBkRFL4BZuzJlfc28UAYvBA0puE6ZecsRdO8V2w3M1t4YGKaBMQ9gzlCEQ22W
+BSqbwKaRdjkQHC4ixmWzxGIaJQxyRAxHr6FlXRHCtOM7Ur2KSG17m5xIKQuaUIjp
+KPU4oul3DGBPUe9XNE5SjJ7usYsvJroDQcDTaLFrKnCLS1aqHqo1vSGEySRhymq1
+0Ub2JdLjui5Cg0OgAyFwRzuTtrLIETnek84awMtCp9ESClI6GC70L6VcHG5I5VRM
+DxkDYaht0wnKaDRTpUruQQOhrJt5eU9zwnDZsQC8XLboLBCToaxiPIoixht299g1
+eAN4RdbBM3PFsKrg6ERTws9wPEE53AHu9HnSjwnUOBSNrBA70oCmilLYPe+DGDgh
+6AG94FT/EZfpoKj3EISVg8QpAngqM8vmA3SBJCvRSw6yhCJNdyVUolCjZPDeXsG9
+6bxkCEDL4kgQb0NHSghSvjbgTCRImOgQX9g5YQnK1JnCHQir06levMFKVYkHy0hY
+Iko0oj33Fl52C2vKsBIXYs0AwtC0BAVsqkEI2A51DCQ4czmzpfPFmm+b8ANnSoK6
+NuBO5JsE9wB54ZFkSd6awB68gOzx6BZkU0W41kPJp0tdlQoNWMl5ouXnVwAAOBQV
+QtmwACYSMN8JJSXDEpDDXCxMzIoc1vtUCyI83wsQowQmOdEQeu+6wUTUVTUZ6V0G
+BjiUxQLwwVYDEAdoXZoZo9PK2kLxhW04FenMCowg8QhwJC6ISvJoZdAMI4RxmXl9
+WGpq1m5QDogASIegEgDIpUXcDP6wOlBb2oB2J7FIYiZ3rGZXNIJf2atRcQbYVDkx
+Cz1D0GsdMvIO8NzFYSwtpbyZ1nGAWozaQYNERCAeNIRK/KCxiAvTnMSeKBcSoITt
+OIamG40xIsICd7QGYq7g5yMZSfYIBjSC8cIthVOmEmzl5cjRRQSFEKnIqSKUG2y0
+d4pDaUQkJ5CMiAKrdvrMLFEIFbQrfWW0hD7GB2FrFcwCpSROwIDjxYYPX3mjKzEA
+oiIESUYpR3ygcvabgvYb5JsUBDar6xA08yYdnJ3dmc8KkH6un9F+sESctLBFkQGm
+Ta0bPig+sM/K4rcNlicUhXGvkeO2yqSZ5oKmK7mzQnIIpTd6txohrPWxC+w7O7Xd
+9LQtO6uqZLhzsHZpRcxYOi1CFignFLhwDuxorIb1rsUMRBHkUkH9+wAqL2aiyPoA
+lLwUclJO0yK/pNNLRBkAgxgRJDowL+MDbn7aFmDs3Zum7TMmpl6eNnnKXjW+cIZL
+KTUDBhEK8ciqkQeV7o9nO+RdjYhyConjMQRTBWmeLu3GkKYbSDZ+NFythpRclB0u
++MM9hIPy379/P5JvRp9K7Hh8rACxIThkR9bC/mjT79r7kMrZfL3DsQq9dPzd80jy
+omUQ0MGQccce3Fj7MWzP6VNxLUm/pBuxmmyioIE45y9suzCqg25nIpkvY49evNI1
+vdkD9EHHY32D6/Wt95wXiY14QGHv6Tupr4QlovqZsUxN/gppAOiLCJKKRQoB3Tq7
+wOD2KVRzt/RlCRyIOQHSOSr3uh4krxkmwT/BsrQ79YvUxmCBsaLPe3BE9rd44cRs
+EtHttA6UiBxgHNHMBs2t3WoqicOUCJ/pdOhWwXx0xzvjx3O0KVN84or1DOx3VbmY
+XBKjiLHHQ6cosigwdb8KKicNL3O90EPY3XkwoBs5FPf48Tw4m8Z4osEyHXmsb2fA
+Ok4HFRdQRcU7OGXaHlQhmiCfcEzj2hQNDNA6MRu4t68O2Z1CjKZpojvIZ6gSyZPH
+rL9rdnsgo9LEDXNXd1XbuepmStaOYiD4/r5zmElX0N6F0Tz3VCoRv4sIsFhYUIgI
+numbH4pN2G+IcL7ABCaNu1mNj6QkUIMAhtoR0MMPiEUwHvdwMF50hG8QYCTnhfkt
+UMX5FQVzDOdATVLQbTBOoetSGcCjNrjgN51GgITFdoNWnL64lJHbNklnJKcjAsED
+6LlEuu3zlPY6SEcibIy1pLUAd0IHMRZuIwhRlzAXsU1wRK4F5NYIkTsbgaGKAOrk
+3mDdrs9oHE5vbz3eO7IwqJxcJxDru7DPr5kZnfTpXLnLVEx7eQEex5Vc10EW/bNS
+/UN3fOWkQhgOwHG8e4Yi8HiGe47HhLNWwnMlMsrBHoa5VyAyXB8ny2xOvMcOHDgH
+b3EqkrzSChHUyZmLI+6hu7wISKUqFFKTFWDllLromzIiucDwBOQQ1kp6KGChwrGN
+IdiidKkg6IolNojcrO0BeJ7r7kxA8TUb1OsJ0DwXlDQCiVkWTKjwgEQoLqhDMXRo
+Qo9pGorE3XPYHlVcm/Fl0ZUNWuXAbPgxVowsObJtykwDZmd3Rs9kF7ovtgP9gQ+4
+ImoCUYDVbTqWeNIfHhQ3fcGSykKPKGvzG0gw0ZETg97odgi+CtWJvpYu2qwoTAIs
+E9R6CGlAcEl9tTTwETIhk6KNV2KAPhQLimtCFryG/Hiw3nYgO3u3TfEJHQuFVBHi
+QGsiLqgzs4bdm1MO8CUwBqvDVp0jQlTrbg64FHW97NcVIgioHQCAjzim4h2byc6c
+ANEWA7Wm3xWoYIRbEHeZqnzzDMAxmjmtCjoyJRko4E6qJSoabUiR5UHY4rwkhjGi
+57nGCJQGyYa6EIE1ZkbQuFKKxvM0KGlAUTD2PCxzTTr3sa2oAwP2Ie5M1JRb4eh8
+NazCTDn7w1nJjXI8EDCKsUADgQVYSIv0oS9b+UA6gPIs1SOiIhCIbAeri0sZgp2q
+Cjt1qVoBinB93WUFd3i+GNTr0BMoqCtDIo66aNKIkZtiCtBFYTxRAkbRGHW4E2Qa
+wGELRMBSlDORfaNHjJo8HetTIRdgB0R/fXAbO2dWJb6DfUEsipYiw5A0GnF8Ezhv
+GlTxeCaEA4SjJdyifLMm9GUIqQiABhBNrSrnBJZwcLnsUPG8AVmRARIaJRIAl2Aq
+vN8GsE1zgnAAG4OQm/dxkQHKoewTW3RsFeU7RIFDvSeKq6tmLIwK8gvYW2oipkRT
+wRjRc2uNOhMZYE5yw8o4PRldld0CRW1Do6zyeWGLAfbpCqPTGDSqcoJXE1eKBT20
+VES/Gir1g0EQCpg7m5ZtoK5GATGOZsXKcwCUdiYw78huOate6CDObwFxCKBgXHBB
+V6vNFaO1koc5AG7nTRtcl9SatzUT+2esG3qOOQchoqjI0MZiYEGiTyVZp67hPaez
+0Y0m6xKBzy6R5ZAO9vJiMqshjhrIky5HVSaeZ5qEyNVLWOJtWG+4jGMGDZuXubu+
+1BVxAySGWyePnaGc7uXgXUFUo7J3BHWdzfN0ndx97DRHhMuD3FIbtcmDu9FIUiHM
+wvJzV1rl7V3DAElvIjuzuAN5aVFegjAg8oRCh3gtOg4EUlSNQ+g+YCsNL0DFoWiB
+8GhSYOOE2b5zZHnFEUAwcmIWCMHBxMSoJhWMWrtE4EJmAmGLhxoTvSHCijrgpjFw
+YaJ00WnSJr+RmC5jFqtEbUiI3kQFaXgg7vKLYF/fBgwaV+EnRk9XQKQPOgkBdnA8
+kKDUtNQ28kWcA2LCiCujWK5nSsg+u2au4siUCIIuFgTFpAqiDAnZW7L63Tx5sg/t
+IR5eMo5HINaaOXDMrHyG8ytg+NvLtlHBkBo9kRnrKYt8/qyVqWjj5VEqVy3GpUqV
+hixKBqJGzkfhHgoFl/X1yrlEscB5vLEAKPAYyGQRirBKEZm6RZfA9cJGIMRHO5ca
+CEW/DnIynaC2XohJQkB3yhFrMFq3qxHJ4+QOtEUb2wG1dJBDDTr2sZrvJ4RcRMbT
+qH2Jdooaxt0NjDiScucKju2YzYaBBzvUkkz7Rs5QxX2gwjkdYD4UtQubOAigAFmX
+wNXZ4di59KNNkgtapzDO5Ze1RNDg3lGlzmLiBgSsl48e7xxrPEEVA8DigDOnCoWC
+NyRTfSavpnxLQ91Rqpqq7DJKoyD2FuCLkgrmASASJuqhEdivR0jzeV9CZNSuy7ox
+U34bo3ZBM43NBAmhDigDK71FQEKZjWNaenQQjAhUwtFmR3diUG9KvqSEILrtcrnK
+JYMYsRyZAMUMhxGC3SmHeUddC8aQDaajNAGHbXfMJnKQ3Io5u809jIeOAiCmGwEc
+SGxFf2Mh3Ck7Q8NmAQs8MQPGwLfoDFgfOCTl3U4o3sLxM3kkQktElpUOIQi8KGes
+JJoQV1lFdBdVKBU8i65cXjg3ziOG1RVyGUA5EA1Bz2PdlZvXiVd3sCFzpi7ZkuuA
+okzCH5e60sadzfeQCtFe9t3jHrFGwPRHJzHlWiIzEmgstR6IY+MDjh98XwynDQJ9
+BcV2odeecqlvFnFC/t9u3NHjnIqGa7bYikVnM+yf5vO/or7fvUJSIr379aG/2n64
+/p2BO0/o9sxrOt3vIpd9x5yvc+etFPveVHuePsUB3DIaidl4CxRx010k46whEN0I
+g9O0ug506JYDlFzQbuZEuMBAWvO6IBV8LQl756E4B76UHCsGLzEOHBSd+XvXk9WI
+YMbfg56ndwHELY0vRDPXRQ99d6bL5OdJIUUzbJDqWMfi11tQANmXKblIsgFamLRx
+GwxzOeJQdSQi75cWKugYgDTZ3sYwfDRyoBTFJzhNZdKia3kOBcotQFEQCbS2nCSC
+TtEiEuncq5ywL4jCuAjum3CYQzZnvAElVp2RRCOSGjCgOCgk5JdEY3YqtbGzSJKS
+UdKYzo16eoPENGLo0phETPJZ6OIkAK9m+kPCOQTXKwGmFeO3Qo9mYJjmt47wpZ4n
+OUCpkBXxs5+EADfPu0KwMIEgyIE6Rn15vJ9n2j32MTvEFNRG+O5FKG2lrAqyh+Tf
+Rzh4eWFJaDwsQTEaSEdaoYgZ1LlWfjUAeC8q2dWnJ0LQ8IrFg6vYcrdprGOfYLx4
+1uAB00NBrexzAOhxEV0hJgfdnNpAR2yetGXXTyUK7POeMFSwUcyK0k54TYZ3BFZc
+82vsHiaF0rspFEpTTqjrGMohOJwo131kTcrGNoxl7VJWqRTYNtAAJC7V+xyyGxzg
+D6IYN9WtIiQNBELyUK0RY7CBDsyDhV4eNdSOX7wMOkXgGQkRysCNmAEPpdYUaOma
+XGtvRVaKBTpnHMGXsHRzNvcHtrkV4qMS3LQYC7AFDRgeIQXw4+CQaigKJZLolFEe
+ynETG9VkDEWb3PCLQWZvtb1uyQ9OCb2ljqdYeYVQUVrlhSmZCCLoCzeq3qihdKlC
+FCVu9GdtanaDaeoee8Gh0XfV746AG0mFR3grOkNaEV4oAxcwugi+5mLavDgNyeab
+aPNUAdaRx6GueEE8UgBraaEPEBA90Hd0IoiYKzzLeyC+QP86S24oNGgPN7VEZLkc
+3KKB9yaO3suM7dsqIyXBAyaPJIVawzuyNy8Uis1TN6MwDW+Sc8Jp63uyww2NEo+W
+pXWbpGdzmc2qkqcY5CJNMqipmJnZ7lPXMBYk5A0CO8LEGgRCLCyFEGqDni6GFwh4
+ISrK96I0lzDiiuVYcpktYea5V0fSBQQ4HLSCYxVJEIpIEG1ivgPWGQ9zRCT5pzks
+lUdNyhMqyFLVbXZ+dbaAL5MolnGQ0f2Y0lbErTW9N9zvnf1PL7QhIQj5Qqg9+9Ze
+cP2k9FIfAnPPeCQEemCDu+PpovnNLGt2xn12fm+7k++eYUe5zI3I85qKYoJjmjnl
+nmGtQxhZ8OrjWLs29chu705lyXsj00pO0r01isVaNX6Hs8cRtAzPRBUpl8Xo2aUU
+RMFSH1bMAjgAzlpfCL5AHePjDzgQW5sEzApAHGDajlxaEJMRENKpBhNAm92ON0Jo
+cKOslyv1CmpWvaQTDp2e7sgwMWOxFETVedrRILOecthi4+kHbXO7UCGYShLGHMPL
+BFyJnklnbddyTMMgm68FBsVzHACN16/QBHAADr0hyZ57ivEsZjdscOB4MukOoq75
+3Sm6oznxvBWSoYDs0mM85hVF3AUJAQhIC+IAnAQ0nYeBojTtDDu9fb2ZgfOvvEtI
+Ir4U3SSAbviqYgJSp4BnTGwbatDG9A3mGF9hEO+hcZwvmsmKw4IUUYSm04b969eJ
+yhd9UFNe3iSa87znSZ8uMCA9unXVOthwgCtrI694ULz3RAeRPJ0dGGH4cQq8+E1k
+N2XKOIV8b7t0k3pInQ2SYhUaCSxLkRMIbumyj4sTVz8/OCjnFqV6iuYCrEQETZhg
+aTaO1M91eVU+0dN5lIKE0hY+6ZhdH8xPatSu9IGjiSBRxdlYhnVgx3DM3OmAAPUh
+oivOGZEA50UKDKlBGKmuKZHM7ZnaIrey9kZzbWmTBux5hLriaXv3sCjh3RSQN2Km
+seQirWUXffY2PUwR4ix73JkV2Xnrhe5wc7ATvBMNCGsQ9s1jt3XLtQAW0gIAsK7i
+GYMN4XZoBFGRARR6qCjNIi9RgC+TuutUGw5urUrW9IBs3WmZh5j0JAQtReBHKKCw
+Ao1BYPjdMlMyTuA3z3s5HrzxCD7DNUpI9NKK1QCbU3u6DYiKaA7sOUSYFvgSL2GV
+56raInCNge3z1vokDQ4oBA7DVZChDpWQ6HOcrY+5Qi5tmkDUUFPEQNwVKiIBqChg
+igm4JIiXEAJEBKiKBIihiUjIdguH3TxtEV8CLnCZZJXuZrns5yGzNcQqb5nRD8Kf
+Ejj1uLimHfFsXzlUZzvk7zxYPeGzkRdgYzYoe7Nc34mq1NfS0+Tpc572vBToIi+h
+NC8Ksk0wShGEgp3jOt0s2159erxfPx1eTb02DQXSuDB5AkTVTpTmMjNgcOdrKEzr
+tc4aYgDJqgdKhmhE3HZulPmAHB7632oFlcTlmCvKgosDR7ft7TOgZfTYJwR7AXuW
+/S8+gIFeKNjkv3u7oLzAyBFiIY4bJOh4OuYdqgOIWvESJAdRUwkRH0TBzeSHfdN6
+Bz4E9oSSCWPhUXvDkFmbZ2uSLokHIEKenMqeTFXgg3poKBEk9zF2SbQhJap4uGJJ
+FC6V1rXoCFhRw7YcnMjkezOEULe98ME6Ds0IYzERWbF33DHNcyL7qBnaeKKU8Wx9
+AYMaYwHMmO44OFPK1nebx24PdpQEPFOIOCGGRgnfbPFFecB7CSMybA7NNoCJdWkq
+A6uxgQHTSlzjN02jfYhsKEJKfK3grm8IX6/ZCr04RBTyJ2sbuCdybNeEICJ26MbJ
+jeDS6wgqPaR9ormfdmFDLWdBF0bbY2212EiKqJfXchQkdNNXrLktUifqXfCq84+8
+Z6VhYN5i5hktLGeDvDyUvWWAs27y4SHHMOtg0Rag4RHHJZJzJpVzqEypuBMu2xKI
+MQEgIgDMNB440aFxBiGgVIhdjaNkyK8RRKsepNlmwLGE3pI5dmBEqgxMdV0KaHO8
+HhyQ2xG2KGDGNoGzBt7biE+kQ6Bod7WXByC2xtI4zTaLsEoGd3XlmZdylWF1alnb
+M69mJMgnkxqru4Oogy+Ri7zgqVzMxct3GGZgXGSdkzJjhyAuE2PZ723DJwTyMnjh
+l3tHY5VDpUieCoJmSC8uhRWOsIvHrs3IcXRWXW5dAv7/778fUJpA9gUVtiDse9fX
+eLqjFjg9tC9YHmeTlFWicKAUpOimCqgEtGlSNGcpe3u66YHC5aNSJLww2kUhcBCo
+sQJBzkAYmK7l1EZTiK2JEzDnWILQWZzI5NHO5yHsQScKeLA3Y1UxANcWcBcAXTZC
+nG3WEshvETCEE/bPauJ2LcYYpkGUUtAj4AMoK/tv6dyS4In1VQtIbiS0kHqwagwE
+s2PM5itnuLiqWW680Rhkknpn2RxZA/NquFxL9qJ+MWTj/aqbZM1Eg28nmVVm5HKs
+lPLjlU2yZl+lLy2b+bKSNUYSElldBP7yb+gMMPeIR9GJowRgkgRoYVdqHQlwIDLQ
+aiI6H1XmnDYFAee304yulhRgMIl8rODvjPsYDh4FRB4lS0XTd85zYMBdO9uA1XQj
+EQiIrzFbmDjy+83gvNdxScSEU2bnSmgAjjhZ0eHKQtVyg3vI5fSCEKUQLGWCcN64
+SoBE1gka0aWw7IlYUoJeMdqQ5ytWEITjsqzKm8ZQESwE6E2CN4IIUSEnUYdM0vGl
+bHppfLXOIXBTSfWIgFSl6IChy+B0e4/JZIPYtHBc8xqqNyEaYZAWKNvfjpvJ6pXN
+iRCGxlbePrTJreU3HXYA2d8CBSRKa51BpHeF0vGi5yH3vMvA8hjcyHuijgTurUuj
+QcspGgZqbDJsCwLljxYqwh0UedgzggA1oQPI1qSzDKyyTLBusjazKdKbN8Mpiiht
+tahHCFFJFECD5lOaLBoYNnSA5Vo0uVRGun3s3jbMCD8MAOHpiyBtrvGjhr1I4Kam
+hC90hDDgrxsCgbMgmSDrjyPJSVi0W46roi+Blde3oaM85BCOMlkvxXOBKzLEV9tx
+jdKcCx5V102vHRvAEBovGic6QBeiErtETJWKgpIgxvYmMdZt+YQ8c1CsakICg2WZ
+YJ1wKg5NIYcsHI7TKYIG9UiK5Dh3nMiYQyjsFTApEA2cmsjhUIqrYHeoS28gi1UT
+O+eZXGRAHUG1Gwk33qXWInhbyo5dSTqBDuQtgRSK2UpGW9OB04oooTkj1I1XpEzE
+sEzSF8gCdoVyiYDkYCLfSn0SyX2hCQQsiaxSyGKpCEVn+T+7ACroi7X8aJopBWVZ
+ZWHIQaTx4SNUeLDFSxevebd+cHKoaR+Uldj4hZiyxAxiEJPs55pQEVzsqkE5E3EK
+C8Zrl12Z6ZyL3XJIIiYtC1Axc5KDSj612cHXeoDiFrcpuKKB6LCLGCsgEWAcjIYi
+7hqF7Haj4908uyiAKrcawQQ5bsgLte4FvgR3kPuHtlEgneUBi6RqG4DiDmJiBIgS
+VKzW6RQTsDZDRB7vFB/Npbn3thjxnOfz03l8o4iPr5vcTXayIrevu4elRUVaMYKB
+TVWh4hpU3OBfMUdpqaMvN5RfQRHEA5SRsCqgNvSaSWAjxg2Sce8tmpLwQTzaEJKY
+a7vw4DMq4BBwDCYqTySZ5Y4qUEBqrTyjRBdDSeJIR3x93G24dW0Fsfb52b53LqcB
+LxkrVu+jOgAOVeWKSAPYajZnWDo8DQrwVXMRLreCHM8HdKQ7MnILkIj3MoONh0TW
+CXGY8bOCBgAXDflHcvJbxkD4icpcbMiA0ObDPeZMm9qh4TsxeYSrNdsERNogpnNA
+iWcLBMk3AFNaaFs84CFDeDFXxodhl7a9MyVyMFFD0AIGiNGCvoSCLqpw0errcmtJ
+ZMaVMLAkEC6A0HNHB9bcXzSDliqUfebISAiIRkyhvuGM41wC0GZ9e14N0k1dvH2j
+IIzL0HDgOgo2Teq2QOrLViXLanCQRVQkcYimjkTcFagkgFwMQzjIhkESKoRYDARO
+OUM3MEMWezt6GgSuFhS2HQXOveJgcUGzsH1FZhnVaE8D1kRDjrF+riAwE0VbuVvu
+Wx0Vo0Ivo3snYbRflxgcfJwR3m0ICx85dsSDvT3cZ29Q4CWGBQLggyCKEiARitqr
+sNm0fTrW3Krxa102dakYpVhqwhVCrC2SGOlkRk1UlqBaSVYVJYN7ERi1FAbW+G3z
+51re5VjVbm5W5UlbmrUmM9t/6/T6vv9Po7vhq+xJDxqrZJCSN4A9ebXxyczXxmoN
+33VoVPS3BLDLLHbi5spPNZK0uCZvZgZzc23MBvtLdad1ruTZJGVJwaelJw113fR8
+rnExqR0PrSFjAyjjVUETBCGwkwwK3s287kNjE+yu0Hbm242i5VRLlk0STTSgxaFK
+RQ77zTcyWsiGy8yIrLiHHJjtG1A2Yw3W9UlzdFd2HcNCqkQgyani4Bu3NroVFnYL
+2HzDRFdvTmig2HcOnFxATrA0TnGma3YZz0ymbsQAYJGBFbqwZSEku3x21FBfCArF
+0wi6MyRrQQhzxXZCortLApgcocDruDxkuASSjkkCRHHVa1oVlDu7SymYTanF4+3W
+eROwxPvSBh9NNJ8ik1JAnwJivP2b/k6eXnnoQc+e3REtcmUhKCgg9oIgj3cO94cZ
+1/yZZPYXmLsEVzL9wyayYqdoLf7u7cMaiHlnOXVcjK1tFvlVLZVUn6CtS/Dc2MGy
+jQgfhC2Kdjr3P4oF82DpTA7dJI8fmoIQcC1skeRzKgLQfdKJKWsxDeDRAOkVD1Uj
+6REe5pkkFtcBVDyBmsYcJiDPKL4QYIAKg3pFBYsEheQysfqhKb7Z5Wjm10jpNiZp
+B5IyQBQMUV05k5WF025JblIlxOjYPTSQS14ht99a4g4RAIMEXBQ9VYdUOnAHboCb
+AM8xBqUidwUIqCaNuDndlLcheCQRzyDZsza6jpcC8J5t93uI52DOCUmxyBWG6xjU
+DfvcQN2R3loD2RQpUCyjb0Nnj8jM44gOI4HkYOhJNFBUaBwiiugHBtgmVWWcPJ2v
+AGlYg8pB1knDeEQyYzoFW+nZieSuAOXHdpQnYHIIvsnV62gW62oGOQSq0ZHQmkz6
+ve09eR6+As6PaDEAPBAjCRxHiizSKSWE3lI8fDOCDmGnmVpNbi8eUVoBcnjVYXJH
+Wy5Y+Ig8gsiDUDTA6xDbTXjDHGKyNg20+8AoKRpUzjVgeIneyymHNIhlOlRveBNb
+AyNu+YZy5q7JQKKSSPDgYkgOZ54N9vTDVhqc6UhuwvCADsV5z0KRpEITXj4+mgml
+oIZg4a71Zlm7m0gkdp4U3zAnK2iHrqjsxi8S8sDdGDo9ucdGhjq81Jfa1MiJSKcB
+A701FV6aw8Hp7V9EURNiZNADwG3dhrhp2xsMQdoNaPWpg17FE8O8dR1VHRzpUzs4
+oW8uITBTDYPLynlwZDIItG+CIpXe2AKuCI7Qs1rnC94AEyGbMuhIPF1HgmbONCmS
+5k7bSMjXhXQp1OCjmkAGTvLOmI0HOAt3YzBQRFgqFp2bepbOC2EIwJLOpBSCVEHI
+kdNxHOkAQs0VIpgJl4XMHMjEgid0t3FO8MJhYYXY8sERIghdxq3vQKeC72BkdCeG
+xRxAiGkDGK5LYsCK3AWW+AM5VQaWqrkJ3NiK8HR0Oyaird7M0013PrNY4oA67ZPe
+zuDTrV0oZMsRpR7ZipzQ1jzg4Ut53oN2DS2qHRF3Qms17VFoJ5zQGLHnTQ1WhcBQ
+uEUTQhQjEQUHI85hT5R2UYC3twsue/zOINAzYK9Mg24cwzR4rXfuB43f5g0wg+ma
+n54RRErdutOia0EPZPBoCriZ3WIjYiAiY9ycBy8PvV0fdNCtr1kSkUTFpWjZQ33A
+Gh0a7ep6g4nkWoASDIDjZq/BgHfve9jgEEhzWCeQR7Hli6A20uwCorkhnm7lK6hw
+1GyiXCVzPlIK80MpCjwRAoagLZOVxmZA+eBSGhCIL9tBXabrpw47c5zKNaAKO4sL
+7KvUaVGgeYA4XSjsTXG+b3fBFtoGLhoKvIHohI5zzHSwDMUyPCJ8Zjolsa6FJ1An
+5EizYQKcpor6HHhk6GdulzXbHMekayul6RlzuOIXQHGhtCOsOrdgh5yBUI4QD6cJ
+CNmU1QYJoXJADgxaZvbMMEEkHSPshs7OGaJOF613Nd0CBj2PIi+PXV5W90bvAECz
+SV7CKiJiGUeZErQbfUGQNmjhny5vomzEBFviHjwiiJ0o1E52tFzGaXbdCZ4hwwYE
+QPQQkQZFRB5oqVQlVfs5E1NSQq6LJmIhqJUJBkSTmKRwxxBG4hmGYgYhOlbgcIM3
+Qhnd3c1BbjEYvIhbZzEQRGBE2cgI5W4RhHpgCsRsjcdWFMN0olQDA5nd4AckRPbG
+2+i25y8WqkxW8Wupq+jB2ymQckBbjqGGJ2AtMuBuG4BrSNp5MsuWwgXbcCXcIAxo
+J5BTSW05do8jzcwVXNZNxgxuimapGRGRMeE3YqpoRFQVEB1gVMQgYxo7G7bmRDES
+u71hcZac1QBCRIHe0LZAbAbHxDwuLIhFlGQ311uRlODv9YkCQRH+Eh/r6Q/7bT83
+9x/Fr+4/N+xjJ/ef+if6dubx/+uT/af5yl/qO7x5v6rVWuWZlZjM5eZ/VustitjY
+3HC0dHExsx/qOenTOnMdJLi6X+gqTDD7MX/BpCpmFwf/C6fg79fommh7CkD5icKI
+rVSTX/Uh8fGFGKs+lPgrQH+bz8pu235HwdPyPCs0aP60bPSYwmirZ/oP34xfQ1wP
+pnDAX5KPS23/G6nZ/TKCJiCNS5oIRTN0GCKEmhG9kYgIrr/UH+fx/tEuBL+6UPJP
+b3bTrJphJ0Vu8PmOnIeyvm4J8dKtpVV7Nxk1Ldm7r2f9z6VbD/lVr/jIa0/ZP2/6
+fsPJ4euM7/l/w/Hbe2qPmk4Gye8+XFXSsxt8HE/hOObeMcPpNPb7slXdTm6OZ/v/
+5dVzU58rFtJ4e3yv9l6buQsjiD1R2Np9hTyeTt6+038W47SRy6PY06E+P3JOgWaQ
+hHAkkR/Xh/2ncXif2afyf4Svf5NvY3/UP3JXCqfaxkZRL/J3CPDzFxNGAzKcQTnd
+cHPayzzbvLxDd1UnVvMbTw9BywcPDfsc2zm/nyMfDmf932T7p87KrxgyeFftQ+tf
+Cfh7HZyeE2aj8Ld3bXw43xb83/u3I6WSftIeD/xbZE/8bwT5H1OjB9vDc2fr8Q+u
+397X9Gf+PSdnVOzpP8PP+c7z52c3SP5Gtkn9kn/w7H1cp+5o+HrPZPv7uTykTn4t
+qMW5ktlnN5X7r3/GJDMMmGVMJN7siu/yfnqffmvSXMu6ft6bOJlTaKqp/L3k/g2n
+c/7fv5SH4e7wSNdHTnGSe7brKd9m2+rfs+75c1sWpbaXqOkkpTo6LvZVDoKaaPJd
+rf6/wabfy//P+Ses/dNe1Wv4P05eaf0Xg/vluP7Okm/5eu4+LJMnvJ6vyfdiuNK0
+Wbn2ZOW7k/O5dVV1S0twqcn6SMKzp/2y3c5D8U7EssiWcxtqybtlfi2p2J1xcn7G
+nI/NwcrP+tfj8/scv7QZ8v3tjkfXsw7Hk28PhyNkcPY3e7To4dLZXs52SnOcp+0v
+BzIaa0rMZV/r4j+X7dHd5OqeK/l2Ng6ZCf3R4MsiMaozClqv621/Cfwfp/G2c4GO
+dLV9XSfLMq1YzWaxrDFXxLOJ3YfCa+Wpzeb8XWTm+JzP+IICf93/kNaqLaNrWSqi
+ttajRqjbapmqtpS2qxVk1bUlWpNqLRWpZqtJNKo1U0ttRsy20zVJqrG2wBY1sVoL
+FUWJs1ikLFTK0am2RVFYUrYNFpNtTCoNYjWpaFbG0TKLTDY1RrJSWwCVU1K0mkrG
+yUpUbZDVikMW0bZkYotZMmZGLRsY0KIViLGjRsUWxtRUzFiTQaisJEzIaWTNYIjU
+RhTZsyUWxsUUlY2oyRsm1G1k1MhLM2Q2gWRRMpDGE0zA0ktFBaZGyBETCCMgSEaj
+EWjaJKU2NqZFooxiokSIyMMUIWEaiMhQoIiiqQmIYEkRhFpEhYqSGCLFCKEMEEGT
+9mvzf2fuM6SFZC4Qd9fugRia8BBCIvlh/UPmUoYBieRgSMiPA/zM5kG80OwWXxVB
+kDKCgX+vVRm/7UQIDInnOZ/vuDq/4D8+p51Kq1Jw/kWTzvI4d9a7SyLfWstuvCsR
+8vO+Ve9WpNJv7s7+fuL8JV+dboUuDPzER7chJZ58smGb6bfHJ+/wytuIdr6d7a47
+bq+tvU9ubKTxSujpWpbkOGArKSYHFiSSfHgG2RPcG5lSlkRGbrdlTVFVeA1pC41W
+V8XE0QYWbMrorO7DWTBoBRpgyaqKdSFItuzQ+QpmRRpSUkgkAkgVhutQk5vCYVVC
+2pCBtTYcnZA1HRmQ5KEKUJCjE441UykKrp04rW12EaksMjEqCmiOKKAiIoVAjHHG
+4Oy2vMLFphr2skmltbAj2yHto+/C1qRSHQI0oYJy4xPAK0hBhkBkzKGIDKfqR5fu
+9Rb6jriPwFfrT57/BORRUS2uxaWe/23vw/VDRJUNDKbcoql9hR1STaoUKFJAhAE0
+AZZLjCTR5qxIgYLhyUQktqwQ0LakMUoDZaYvf1dL7/UTZGZSt/h0bF8bOrkShINm
+UC5JVQoULQdWFmExZOwxx6b/nrJEIzcATXe9RX4uAjQuZbT7+8dvCcTe970nE51j
+cmac2WktrRIBr8KKqmFiShChQWsTPnID4M0CSyZe7rltE0/bIvrM+YcPthAH85JJ
+219mY5mjPQZhiZDYZA1DzBlAjUcjXvLL8BABMGVQh/A/vPwUfqX/5kl6UGGJn8FC
+P2GG+QceVRTNvxzts75paBK7NzM7TzVVUzlIqqif8NJKRImR08cg2cHrQWxKYcNh
+OjnHzz+YPyaL9PWNrPR37fFaHr23fpcy+YYGWlsuQf4q7bXFjzjZ66t5DEnZsqLU
+ixYlKiy0ibZsjalZamaizKs1laSpmk2ratltZbWSta0bazUrFJs0ttalazaQUhKg
+lSUAqyQoWSKtotVYtSmoyW220arUsoo1tpLaNtMsmtaaYsVTbS2UtJgram22rCkS
+qQSxISyQS0FSSyM1KaS2laa0lhNFGhYWigRULZFiyykqoCxFBKRFSItCrIUWLKak
+ppY2WbY2tps1pm2ymqbabbLNiZojaZkrFMKZrKzaWVptZtppijZNM2SzKmmxsRab
+LZs2K1NVqWqEzMlJtmqVRjVNZWllSVLM0LNNZpalZokSlltLasJRUqopUpZIElIE
+lkqrYjVi0aSNqWmLKpslJtFRBbSbbMy1KoplRspaNlNUrNUaaak2mpVFTZVGxk2a
+GTSWmzaCpKbNJW2WqWqKMmNk1GkKUtk2ysrLNs2WwyrMqKpqZmmmKxtmqayKZlUk
+qNltKlRSm2StUtbLWxTNUqlspo1ZtltNKRIqGm0tlRtNmmalNGZYybMozNNKkxpI
+2i2ULJqUrGyyxJslNGpZmtNSsrNWZY222yttmrVNTbWZZMms2lllbKstpmrNMUmp
+KqUtptKyaplKbRSbJbLNplZtqM1KKbabU1ZSUAmUaxpZjUkhUmyZmxbRSltNsrMq
+qVbNtslSptEzVrMqaazNpmkqZsxExpJSk1itlWqay1KppYopMUkkkmbLNlMymsxS
+0TKlNjKbA1TLLLU0lTWalTNMilKmys2ZY2mqViUVKSyksmapVNqSJRqxZSyylMlS
+yLFSWRUliWKLJPR487tzxPbvpf6y887/zT6h9UmfSx2PLPXLE2t67TNb+d8616jt
+tPkeNmjOnd2bULjnN/5x19I3dES+7KaAHB8sg9OaIHogcFmowcPkd56v4UKiqJhg
+oAU9AHxYiJSboAuO2tYkauzYowUsXVGVlc0nYOpihEKtGCELstXcQR40ZwxcKms+
+7pFjCoGnlWDFSsNDI2M37zbDfLv3avdlnZZ+BC52UzTjZKLth+XpejoaOcVlvLIp
+Bt0bICZGx12W3MemDI+BEABpXP87P4rJiq/on3ucmKl3H2qkVoDOXeBVIHThRlRW
+oIeneSsFb5P81QBgJOLBARAX3nH8/r/f8w3ilqIGYIs2ETpWjUrVBz3ap+abPKWH
+pLM3ltPx/+N/Wbt1NbzHN6yn49NkVXLjHsi0YsxWYxt0mpP5liJ0D/BK861JPxVJ
+KrrKd1DEsjkf2fd+E1sqc+0G02nKaZP3/wWYV/JKhVSKU/9f2kP+Es6z7k/gUksW
+JYe1an/921pBsrUdXyfSH+6h3N4k/jE5ItS1VTkajSXnZgf5UtgpKk2jaxZibyd4
+83LeR6x6+RPw/T0lWWVLOy4k54wllqVWtTTUvHd5G6VXZwcLVpZCyOySqT/VUqI2
+a3OjB+BJ/c5vJ17xaYezrA2WTu8JipWJ34en5WSThOGGFkqslgxWw1Riyit2TjUk
+4m2SJs+3WFSYNQcR9lN+j4j1noP93VyHCfI7cNMSZzH2ZNRThulseIk/yU5KdXt9
+v7zmbk+gjtO690cSQSoFfmmeBxfI+vqGsirzNH5C+xTw2WGGHE0X+u176U0uLoPT
+OEn+qsbDvaA4s+lX8EqpJzPrH0sloeXR1c9OiqmXer0zgSe5ZrT6ScTDZPxHCbPN
+0R5uo6u07SaTyP+1LS2qfontI4sTqU/nOnq3gQE3PlZlmWZRJYUsqyJ2P6PJ+L5/
+D8Jssqnh8+u+2ca0nxwRAJ32knCcvhmYySY8DlHwPRZOyxVSqrmc5yn+vVN35FkO
+yvNZM/ORPMmjIkxNtLVRf1qQ3ksieqJL38h25PbeROj0cV6GFHWIPN2qxXorv7Oc
+ifauTZXzYwjFM+LPNWr/a58p5xuD9uXn6b8HdXj7TiR9vZIw7HVkmGI8569eqqvk
+P0vhi5cxU9euWvzV52lG6lLCSmYWK8coeiN0jxImMiT1bT9FffylTz7SRs5vwq1O
+E1BPxdk4PSI/RJu9WoSzsTH6v0nJ8nrzi+ITko3SqSvxOJ2nukqKkpNLHec/hfS3
+JEnzWJ39PoktklpWMyyPh/0Tc9E9Kdo5IemeY1NR+smI8T/dPNYrc5nXv9t9sHUa
+mQsqCq1PemmmTVTeR5UqqSopSlKWFOYaL87JVmxycMd8wy5fM2Yw/RXl8vbb5SVb
+u3zORyjjG3DhlMKM111l6sSk+BAMLpSjqdn8I5U+moXwXX5p0Z+Ev8Zh48/wLRnq
+sVOvKupu7tEKFfaNwYH8/Ci1xHTYAbREOEoEoBMbtSSnI7QnHvPpNvIrSaUlVwno
+cA2T6JPxOc9Hjj805OqKqKTKMtvz7PuSa/Ze7Y4TXj0keaMVJIBO6TUtNbu22/rK
+Ik20pV+zX62sR+LTYvA/nP8S/x/z/y/t/m/n/s/ozh/TTT0zNN8l832eeZrP1ft7
+l855ZP0+7P2fht+Mct5xlvGpyPw3YySSq45XU1bSyrab5ycrjjicbfT6o/FPun2h
+kqLVQZw1OrdGyq/AmFG8iUYmGjHDOy2YstLLBnKVZJvoZpv/dskjgWfX0jmmn+XT
+9EpEKhcAUlB/eYz+SbNu4qNSSEC7hItGyfhotsOAf9SwdHA8hOJqR/DyaGA0EVqI
+SKD6AWMbIK+iFwiWZNpCAwgFlSy1TRu/m2NnOmMXFK6UuExRVkRZMoar/6uXRP9P
+7ZP87LZwYx0FWaYU5vlVTqmnh1eev7szJOiq4leaII1cL9t51vM2+LzXlfVqKWyp
+WvCVPQwScjU2St+kOba054lwkpIqTJm2mrtWuoYNioqjXh9ZCcg4fauRyifOQnf6
+SGRSfxqdVrKlWU2qUzZplGsprUmLRsRajVG1FqI0mwhqNsVY0VqNYxgASIkzAhPb
+KKjCrJLVvcYYOJOH+vt9D6MOVhCbzFWO4yRsEfXvzBp0P+0m6q/l61TUNMPwDbP4
+A4ZborpXA29kUhELXpos8r3drnud3G50Si5VJtefj+9ZVvVRlXCz1Xg6KThMk4mm
+/BxViVUbKrUw0nSUxVm8OjGchs/DpN495AGe5+K5OvXzvbUNNMVStZlSc5ucwd3W
+l4u1dm3WlJobdG41bAbKyodIBU0lRgRgW0aw1kwVrIutSyFWNio1Fc3UKqqpRju5
+Aadp5fl5udRTjI1JPdwpAh5+pEn8lE/gwPC4SP7yQ/wfmhzK6WLcLLBfzaejXg5N
+ROtJbDGTLY1NWSMQ3kPP8tNlbsFLO0khJHEnOD8iIBLHY5E5Vaioqq6mHOzViRnO
+TJDV5noj3lYCpbB/UKCPiSPRFBjGEsHZXWOmMUqqoqjVmVmoGFKNXF5UqRqditja
+VqjRtTTJJCSNK2SIBLIlcoL93JoaGmSYppju7taVJZUVshVKnwaD0EH7hMmp/h+o
+Pbiejj/LCXLxi+sY57t+Gq/cILqWSklksgVasVYdKi3aLGlcq4fh/b/0JI17/hz9
+I5p2kpb6oqMezcw1GWkqUylkKqYsxkpUqrKj6ahmlf3ytR/QMwpaUHB8iNiv9K/z
+0K6HAP93CkfDPEO0tLILS0pZtCxDEo+smm6SnpFqPN8mB8k84m6eFkLPr2/b9vvq
+30sMxTJbKbV41vETNRjrYhAm0Kmypb2ozMJGlqo0oyt7s1+ZqRGE5GDhx9HdIoQm
+hH5pdOT8GMwPVn9cd2LOKocJYqpE2fJibmxMRhVjdipjJLKxv8lUwhE3F+9vM/Z+
+96zDku8juRY8ZkygVpQhCSGE5vWjeiSSO8ZFx43qYwI0q4xeFMojCEBoYwhDwpBe
+iHCkNkSihsIJhUNuES4aChQwWFNLDYrSqqVumBhK0xiN2qw02aBvWoQRkbNJJAkj
+HBk/f0jBi0Qj3trasZSWJAABGGhpyETY2mx2GGObpTObWrb351Vt6QURN7vvOMuZ
+MryvV8esvd69S9JGxrTRiEw0k5hoCqjCFy3INRaqNJwakaGEikSrNSYRWTRj019T
+4CORqY4ubfHfS36+r2c6tibQpT7uqxK5TMRXftJ83l0OEKb1aVXy8jZKtwphii1E
+32XPN122+997zbb3qg2rFWEspycmx5fi63iHJ04NMLBsItv9IBqEOmT9g+SGvcbp
++/hdEfGRojRGhaIFKIYxkBlxKkgcNtjbaQ3UpIqYgYoKWc8GtGtpwV4rXQ74tWyW
+WrSqxFk4NRFSeaScu5yP8VExZEm6XE4chWxqNGXXVJkYnR2cdHk8WdGYy2vCmNjq
+ybrMN1FOOcToskqqI6hQJYpkEaNCNn6FTLldFQjIRVoB+utwbXmdbmWEDBprGCfA
+JCZRpKqRYfq2e+7Cq5cNSfueE8nT0BAAmYe3/Q5/hbbwssFCXp+OE9EkGFrg00fG
+yXabHiy3EqpTo/Z9bfo+ZtPrQAuNWcI9+eSwSa/nYd7oXFadmUYi1ukq/ac5AAQE
+7du1t6q7K4YbOHkbtuq8NNGMZw/VibN2MKnJyZJzVzbk8nnizzY8nI5Pu2KrwXrL
+dm6nQ57aXMY8TsVyIDC5bX0WfDw+jTpp6QuEj7W1TMvq8Zyu9vdXFD+nVQXfaj5R
+BRz2fkfnvWnhDIyYKVitWiZZUs64DB3WmYY2xUAXs0Cakm2Wq5otBR1e9IE4xR6I
+UQ1xETvEmN8IlSLEh0Um6u2FSoE1m8LDpW1Hm4TFaGovlKmdEOVumVxam7bCipxu
+T6y5i4+SRHYrzydyzSvjm0vMKixJqmXoTSKKjLRTRkxS7yrSDPFa3nQXLkJi0PGz
+Ue3b6kGdih7KjMMNAjQzQTDB/OKQ8KFuO0yGQmIsJJJLKKGQAQmMosKAsZY1R0kL
+PhQaaKZWN45u7TtPs7uvVu7uqsd2mxpMjs4adWm7k2YxhWGOTRjkw3YppSco2dSD
+nDT6F8LNCzhHRwSHThhZCw/JCkWC0Z4GlllmHQk0JGWItJaemBYmSUfC/CzGtdOZ
+glpafCCzTTeNljGYrTsbK77srM0abuHRsdXENonRVgs/PvuqzvZPJURUwfRVTFTL
+HP5c+u4dT7LGDtNFEMwhcRariKthqTD1vPM95zBVA62rlBLfaioIouD1obsxmY4/
+SLbB1fe/WE5wvNs4XW/dM+pCuTReSLHk06DGF0WkGUHXGlrLY4aDxn3fHt8HuzrJ
+2+aMDPlI78q6bHxj5uF2TCFwbZMGRZ9YDJhIWy5Kgdxy7a9+tDiflePrabvyHDj9
+YiBjKMXYZIRdTNJHAOT6taIRRhwL6k4WH8MdqdOHDZ5XET0kKmF2Bk/gCivPTwLD
+D6OnV3Btj6vA6NAoRYdIDZ/GwT5X5/HRth0F6JgMp8aAo/b8aP0dVD3bWzoGD9jA
+IdGjWJpqFEIwOEjh+nBfY8Pv9ThAfIA+v1W1zDh98+IKpRNs2Kmxah79W223bEUj
+8FgfYebzbUyGl4S8AJvIixBOhDSmA2GYKhWeUS6ADRDvpmoClc1nZxo2BcF8lMAq
+GbIksqALJKpZprIel0G/UM0/NROWO2EHdl8baxjfvVc1Dz9VKlRqHhPwoX/hRooL
+hYtcLETvFJPN1IgE2b15FDZI8kftKHm25vocSMiWe502fv/5wLI7POSTnpHiVNkn
+KN0f5ylSllDaC8/EnNMn8bMOXdHDBEkioNT/Kpjl5T/FSNstpVTGKjCyZJilljk0
+WCJtTbKttU1vQ16RREbZJVRVnrJY8VbpfQ4jCfGExUvOtzOch1jTc+c6fhbzdJ+T
+ZjocHhp7tOTg0hqFHEdpzHf3mFU3tGUGnq9aOgRXwlMPc4oqofnnzkevPke8ocXV
+cWn5KA/wBIoOBRh4tKPhq0owg6MZB0JF0/BAeEjICzw6dNpJCSLZwqAGV7MVmZlz
+FW3GuSbWrY1tbz6cEBX5/031t5Xq26tD0eeTKPanZz5maen48Hmfm+rh8R/tsevt
+95vOVW8muQ0/dwn6qkVSPxsTydUx6UtRVtlfoqMjse8kMZUj0SSye7/KVZXR81mz
+STUJXk04fITUm7Y+EeH1SIBLCfsshViYpJybG/429HOeflhiyJoizZZJqnHAaUfl
+IkvOJH3SKlVJFWbJPqT6ux9pskzdwrJy6NBxBPGkSiqK9nE/6yaHtOaOIlPR5ned
+BwjqrLOVGfdvOzy8zy6OTpB8JJ5O35aTvUnmpOHOTST7q5Tt4SqsKqrKU8ZMLO59
+VefKuttZmLKmGsVuzxJ4xtmOsbzj7jrHOnDaObg2tvZVLY2bG06W4xJ2PRXowWn6
+Q2qskgjIGgwGL/Z/7+qho/gPTXh36jmR1w9demMo4Y8k1PnrL5bLq5qtlHMrhcTx
+qkjHMqVQDGMFtMg0tkKYtmljaZTJIMj9NFIipt2BtNmmpK5MDFVUUwrJvjElbUrM
+i23kbNn7H7hCiP4ZebpITlFV4hhqmRLE7Z94lSPPmM6+HR5PY6k0ntVq21Nlhixw
+sJ52ZHpNNQajs6c9vfpv6ZntOE9LGPhh91dhtbjq2MjZvtil0zo6r+jL2H8eLj18
+yGzWRNcm9I5GokcOjGnDG7SaaFYxVOitW1Wmzf9NOstsnBXsVhrLaczNWymFZQmR
+BAR4hXFLIMn8tE0KNiGlQnWdm5TOjQdS2GXGiCBhAiR3+IuNtczrWRxLegSYOFQ8
+aNwQ5pS1bOmZvMuM2Titbss3zVUdd41y8iQI3cC+BYszD3iyYZAxufkk+P8nXHL9
+uAF6kyiw54eRvOBZOAlO2Jkks3WNzvOHZTF8wXjOnz157FNv8IdeqWn4QqxyMzjd
+ovNzuHBnGNqB8UypLJspmo/PZrnERR2PqVzauvfqDryP7Z+vQD7IISU+56T4JDTE
+q+pP9KlpI+PV4dT1ixJrec504hI0p0ainusxoch3Rf1aTnA9yf8ixfufD/nGTaR+
+r9Yxn56qBqi9vX5hPpZKpLI37GNPZmMfbbfbh2nCcj2D8Z5XfTA5tD/UrkhsSybh
+P3xy2n8vXr3+fHF+jbhrfffrgpMdwyKsEIABftZxWHn6eRPx3H4XyvkzMnSq9ves
+52gWBe8WN0R5UW63ukJQWFQ4oKhAJyCJnQEqDppQlchLgECaszI1WAe5g4MUFyh0
+anCQg4mSNdSo2xtqgYJ+eC6eYyu+bd9QOSufIb1aqsFPuqFWSpbKUpWlKojFKpSj
+ujZZcdbOTOI0xFWRNkIpGoH4pGFJpP3gr/zxFkAWoqElVYP4Gt/X38U271ZrEysV
+o23KuyJZatOZ0Kp4TXVYhqbvrZeRB/cPmRH1kRtuErUZW4UhQwwgBj0NR/V3kMY7
+EobIBcOQukBiqbEGpMmJiq+WZWm2LXZ6qn6+3RY7yG3Jww0zZ0a0T9xZo9U2SMjs
+PDENqfk7N482T5PLSV+d2a1f1eexrCMfZXsuIkyj/nLJDF6pYr8eHJ6TBVV87tmm
+a7bz+ky6PN897u1CATUrOcfrYT7WLUnZUkfzoytVKsFSxI3TkSuWTSN9Jpp5QZrw
+J9vP1+nTbT6eldk/oc3RMOhp4yJZ4IUQxBgmiHJjtlz2GvOHReN9+iGp4Jktksd2
+Fk4SV2/JatrxIFOH9wap6FtHEfVGhB1sDwiGOwtcvTAgVkF6fh/XVVVUQaOqOQog
+5PKIzrA2mJiXdzzLWRbIZCyUxgbN2zVNiK1HWZJuqUsH34W6Tk5MbyVmv9jI2aSL
+I2VKRQpzmQyE8pC1C1EUiox5RWwS9UwZLy63VpJNJfEm63WubJNNHJJO5+RurZhi
+qlWMUlah+7hqpN26aksmYnEl+2jDzy2sWVaxhxo0sy3GKzqg4dVFnqiH/Afo6ZOB
+w6/25A/kKKi+ipEIiyL9rIz61tdfOz5b9tOLlSqe0SxNVPNTFk/XTHSxksktjnfv
+TFaebEYVxUzjImU3vFMtuuFx2WDCnNvkJhZJpZDkrlXW3eZtcuKZcvAedJhwsO8s
+JvKWfGcuMmSVOdMuPtO5iTO25qE9ntOJ7c8nKZfwxh1UZJbaturhTFgc4VklKumu
+lWXlu5AcQCTBIkaKGFUrEV2UU/n8/HpxHWKqpiLFVxDTtu0ZLFI6kEKTsGEUPGDF
+OyKFmi9fCJPgqu54sCIJ6uD6eDlOsdVOSppKzATwfi2t4CPHgfLsRZAITsgfqQ3S
+VryjsJs6HWRGyuXSEjvQFceInojgi66B/Jn9YGev5OSROQPgpDM311czh5pv7QH1
+mjYdG88T0Y6lKoky/ahYfzsf2FLP37iw0iHVc4G1T+qGtRbbYqpbLVXmWjUYsWtd
+3blc3NcosbFotRq1lJaLZLMX+yeAaVGqxZhXrnN4O7p233eKV527HTl3dF67ngUT
+DIWkYklBhCDIYMo0DsbYvZpkT5KZKN0lGEqTdkzEsUySxKGyAtr23/mYGEIYA2ic
+NDzgWF6BTisD+sxSj0YjKCGUBhaU0dbAuSAVMAWdJKS0UVTIyJw03tpPFQtSP5Zb
+pmLpJw4T+ko4c5H5d37d2YZYsw/VekqVFiu6LIkAnOUupHbpVuhXVTePKxVB0bps
+xhwtW3SVTpJP4oliflH2jl+CLI6HIdidSOtEWxPwTYaOFsTDdMOO9lshLUSxbIu5
+uldYJIE/CVEfQGnw3KR8rEXXfhMiZYN1TKw6ox209eLH1yz6Qd55slpUwKmJGhpV
+YEWZi/Z/B+/mfovmdoZ+b+KH47xRdEr1MjJ+9ZGEk8zDzXfoia3VNrVu2HqivcwY
+3Cn7tM3ujFGxSqYs/dy22jfJLV3mNSTmx6I9vwKifsrmelJXD6zmOk4e/y1x5u6N
+kaNqieX17yTTwyGtH46H4Fak1c3Kk5z/ZZaK7PU4mLKJZX6ySfl593p1JU4nVzP4
+uonn80Sf8PxBATaSfrZLZLbUFOifY8b/OQOkPKRJYuHzE80n8kWiVZVKKsiPyj7f
+1czhH4I6GHur5ngfJsPHxaVDwbH4JEAnRdt8Mbc25sbc26WpK369rsq2Jk7ybJJ7
+nc7O76eHpxPLzn7OkGqH8mmR+h6xJVRVTckP3rP/RST+xYn6JzHM8ErZP8IJf7oK
+am6yrFq3COr+Gv1fkE1ZskzBUlfkrr8b8hzk8yxE2fNMfNrmi187J8z+Bmx2Wzuo
+upumHT834f0K/hL3SkSzQ2U85TkrZYbKMVKVsprfbMMsmUWyWP1W3DVjWss1MNMa
+H1WP6OTaGllrnZoiAS6ssfNp5sy3o6d+z1Phfsunc9WPbpmXPm3eqbeJ3nCllcoS
+R9y0sQeiKPWxdMHSL5yAm6DOmnZx9/de80IwLgMAwP8AgoIErJWSGzBhMaRbyCyG
+/KI3YnIr+zatN5zJm9iJx5FlEPllZszjniMMODP1NDhIdNGSUoDpyr2MFiNFAp7m
+dhmsM3rn7xcKDPsQKdNOmEcqRWE10Vn0f5jdKeQdD+sX9BD/gPSY95PtG5r5T0HY
+ruV86045uEMRVSihTsyZa8MesmkTJVlLKqkjBRhG+JG9NNZ4h9alqTnNfxllQNGA
+0GINwKMDY0ZDqh5V+GFsqw2G6lfuxMZjyPPPVzVO+/y341ul3m+NvxltY2IqNsRY
+1tTEiANRtZmKiypqJVJKtpSltTk/sPm7/O/dRNKm7YOQYxq6uWOcR7KE3fYnBOUc
+rZ8tbxGpQnw+T1h+E9UnrJ+6E4e77/fdEqziI7b4QxqWvgPVY2JuUihvCTzqWzax
+J8k0/ueZNn2cHv/723l7vkvl321HbIYegUM+f6eVz7iFR6+P17uMwF+AHuHwfOrG
+7J7tnlJLoqxiJZp7OkanzOMm8/JPR9k3N9px0iV2kiN/2MZWOp+Dmehw93hD9FiR
+9EvPnH5sfKX5VzOWREnZyUU+va6YuauVpl1jSzGGKqpqKIOVA2BEIIMpS3xoVbiJ
+DZ+4+ep9reEaqbrqJ9X9jOrrvJSr+/C3LCqZIomMTTGl5droWwvUnqT7fVasJ7Q3
+Vdshbp9jH8pBJ6bD2U+Cd/hZbX9ay6kU8KxTu8ttbZlm1Zpptjy1hjMVabYxkKUR
+gyjKMrbFpVVpilVWFxd4lsXb8MOW7fVipDJxhwVyRmzTVLLxkzco2dz5NnmsjnxG
+SQ0xLOUGItVGqYkjaPOd1ixXJ8pvAbHrxPhNAgJ168Kvepi5THZi1Orm5ld4ad8r
+162e8Lnx2rLKuWUXYSACKn+0Q+UPkiWkUT/jy4+mbc//nw1tlzru26a16nw/ipmj
+oukAwgMmggdSKdGbGU/Iprgvjn77Ct2WhTTOcy5KZMORZMZRWwQ6QquGZW1JTVlg
+QmM8osKKGDGMJIGMIBsiwhShSkqxMPy+3NPLDrbgVBbDqzyCBgWZKJrEQiRzR54q
+wia4gUepCJo2SzrcVXl3bH+sTOvr0qFHlmMYpGEQaiFZjEgQmdarIu7T2kdmRlAF
+SkKsnConJTZVYwmzOAdnDjWUlQbpLqEmzOttyWq429ehDBlMRRpyaUji5o2uW/LZ
+8wQgAFSMYB0Wdnuk9X8nH0naSH9JI+g9o2Gzu5nUVw9VrujeRN048OjNoP8LOjhS
+uG/rTtFPk8g307qhpyc48W4wop6dLpbpG62VarE1XE8iOyVK9ztXvOYw0JoSwJZJ
+Ftfft+V8JibSreNomUqaifeYC3fJ5fCnZQIMR8DDQUIxtbZGzGjKKNDyRspoqZqZ
+ossZ6UUDMFZKUgwYwsMaaYqaYrCr66wtypjY2abpVSX/mXeSNkaJPqgQhw2mmMjH
+EHymdzJLzYsvmuuvVbsqy6m7aYqyZnGoerqj3UePiyIVZIoqKthYOZ6vGFsYpWJz
+5ns4SY/yi4BSSyktv0dXbf1b1fl9fp9+36YjGvdRRMDFkx6Pp9wzFt1H2f0Y5CMb
+VjGyUszErxN3k9ks0S1Zk8IeitT1VrI3R37ye53Th502X+9254a+co8o7nMnWdCi
+wosHYmvktSVSyC6P4FSTb4evj8e+aNQ/gr3by2tmlU3bI5CjjaesCuuOTInFMxR6
+BGGiWW1NjQqsYxKUlU0qtak2QF9FdGkKOPTjiqoqd6H0PuA+KaOAwX65yfbt0Uu2
+t+9+OvxwswtdK+Z6T46z9ur6JavYqrVySsYUxinbay2mTZRVK1bWMy8Hm/TRaetZ
+W+L6HJ1GI7KbTEnokj3nzVNViyloqqryY4aU20msYtW5mTfBtWDH/fMFA6MUxGMR
+NFAuSNrZk1GrtLMg2RpFCqVUaUsYRZMiN2Nim9bnyPI1L5d7amo7nk142ZMm73SJ
+/eoPU902bpY5T5yQ6ffJkrLbKvs844reynK6fNsroOIGSOqTdhDZO0IlkpYiq6Oz
+Fkc0U/fPTYvU9bxWXZeLi5F902sZZU2ysGSmlVu0qcXTGyX5KS21VKrYw87pVnOc
+iN204sTwOM8R5cJLXpE8sT3gdCaTqejSJPFnanubqkqvQ5+EkEjrFki/syRPSKqx
+ixHNf1x69+Xp6t6l5LGF8d0xI7umlRgxkIYgsKQGahBGMdwkbbIclCjg2oW00iZA
+hDSVAoDGhqhIDTC4UGjDNVSwINaWT7/c+6B936RGV91beaH+tFpClUqVar6a57xS
+1YsdOxwxj98iTq3teHw5yT2NnV6Ms+s+NR8b24bKw/NWKKqqZhiqnM8QftpfQb+C
+Vs3lZLSSASqcfM7yVxGYledbnrN50XJBATYaCsBtFYJlZR2SKwb21+jqRiNFI0Sa
+rSjgiATZnWelW7O0mbziCfju7ylzo7WSqylsYp0JpjJU0qaMlJUUVhGilWTZudCx
+M+kc+l5uTSG84qLYv2ZJMli2qrILI2Tqln4cMqNhAj4gogAncslWOiwaV+BwnPnE
+jdp7E6UlqPtYJYV9Tg3WI95FkO6beZO8nlbeyYVc7od2tLylZPKLTp1I35t2iLsk
+ipSBQqtbUX19H2kWD8z2PyVPmh9rLUcrDSKQsTJIfukqY7Hl5DzdPLdUqq1+LJp5
+emzvHWPLN9YtWeh+2WzylkbFNlTCyVWKZpKyQ4YwqnWq3kKzCwje4lWdzTuDbTZx
+x4bJ8tzHGu7m3prWSakaVZncMwY02dcu7kznctvM5MknBXCmwVtKfU0xWphkowpi
+VsxiVW7I2rWqtRhwpcXDoaZN1MN6tYlKrh3GpWUlJLvXd43OuslSWQ0fVcxqeL+B
+Xv1rpQyBqdm7e1Ra8loulyubVzbXOGoNVpN1/mjcbxaAiUP6xnhT7z2IJaTCQVgt
+DpQcGFJgWSBTA5batqKV5l3ruu7XC3NyZRFeT486vWm68lRqMyRNpSzSpsi1KyzL
+GmTS2azSVMZqtq2bay1a0raVmmyq2yqikIVCwBSIqSpJJKsVBYgSKsBLSopRkS2t
+tKmrVKmA1rSpZU2JTWWSGtUtmsrMWKVLLVRCkSkEqQS0GpKlKZllNtK0WFGTNpZY
+2lmmZKZLbWbabW0ttZTSTFMklmzbbTaajUNZaVNKzWaipYqKmU2mMk2lilaVplhZ
+MykpmlSwamzZsrUtUJCNs2xE2zWbLJpmmmlSyzaYzNqWpssspZTaqtm1VbJlmm01
+kzUtDKks1LIK020pKUpNRlKTSlmUprKzRSmk1NTZZJrNhJIZMlSpNJDMktbNVDEs
+mpKFKVJtllm0ps2WzabGsbM2aQtmsJaMkNaVJmssNbZtbMprNYqWVKlaTUapJmGz
+RClCZhpmEmZpEympqWZmWbRs0SaY0lNTU2lqbLNtts1tsrNtKqSWmGWWW0tZrNiG
+Uy2ylLU2jJWUySmlNmpspWFKJrTVkE1lJmakWTZmUtpS0rKyqpVsilmsNrWWbLMq
+aVLFlNmazabZtNppoZJEkxlJIlplYbNUMaaVKhIUylmxaWkEslm2WoAZmYGmm02k
+mZ9vNcym/zYZ1m/E+UySfg39LUVVWb+0CAnu+IVnzkTYexs7ufDm0VjDZ7mmLPDC
+jvRkCK4NH4KYIPfTEsxAJVJTCY4MNNqKqTgrJkmjRkVkyN9MMuNskxW0mmjTSlSs
+RiUzxDKZmvWVXm9Y8a6VLqbbWXtSMLsZGTNoSqYkyYjI2VEskoLRRUbRRsbWkqSt
+Sau0WgopMsq6V0SZehQ82kyxbJsqq2k6xbaqqpy8chxElkKVybMPBqa1jIGLJqNa
+WSNnw5w5rJRVJ8pXQahwWUzyp0wnz/U0hIEiEYfzEVFZGtr8GqLFqNUUa0pVZVFV
+lLVsEy7VF1qILVeGEk2aS+WJki7F2pqD7InRyG/WjNbxTzY7E029eTdr/1ZJlhzx
+xZEk7TYxZI2Vk4yI8WLZEUcfOpyzjm2I50sicpFjzHRZKelYLMxipnrpolbK2wP3
+Gj5QrZ3mE7dW70dJN3aTWPvGzFnLOYscQkecNk/KdSbVattW/g8tatRJ9BbaVmTU
+cNkbE5NiRgCjqJjBFYYMQEpXT39BIxlLWwvLhFGpGWUqKViqxkcZkznhqQLSNrGQ
+hBUdGYxN2kbWNpAzdTVXSs46S3TNK5yd26mxXO7tXNdm0m6bRbSTJvK6rpKW2TFt
+vPLvJbNaSixoxKyEmNk0kWK0SdjZs2NohYnAsejhFowruXCQlUVFqVGpE0UGZIZE
+c3lktTo03a6N+EiflSdFScJJ0xKRxN5+ZDlCLZB9FWySZUtkhL9OWNS5Kx7HmGk3
+Zm+vn/kuSquatyCwYtGGhIxpQKVBh9sws7qnJ2thu+NtlbJbljpdXFmFp6I0cN3V
+hW7RqTNacWNJ80k/pbIVr82CR/iVzKp1fJPyjz7u0PGnOl53LbDvYakR0ZJD8qm5
+9mWLpEWRzhu+1n9OUKT1kn8VOh3p4lv5ZjCqf3P82pWjKmxUzVvxpOH8eDZPhDwf
+ii4JZZPcJ67Ts94+JJ8JN6n2RXJ/iPpDEN5uehqR3Yxju2bXbGDrRv6T0R5vdxJO
+R2mD+4dUjVjZFQf6RFZJ8rFskqu7VMy3EjDuzE2K5wH1nnG971lZjE1GMMpMLzVo
+tmMJoN2gv8yApnCpgihcVoiUFH+c9nnbz+momOTD2WTT5sRko0skZYttki1bLSVY
+mmMY0wqhWnGhdSllSSW9z4amEW8VfPq+6qyaeu2jZNvXtEl6ptryvUoxwqtXN1Fm
+Yqyc7Jqlsb2TXkulki/galjcAwqxIxJEkIZjxWvohjDLbjDg3VHCdKtlCUmTvHq1
+g1bKsb1nufaqpD0uQWNon9Cdrrb3LTMlSbUTSbK0ohajIvgjH+99Bt8p3n6qleSV
+ZE6o9h2eHZRzpwc3OYmK009E9R328jxMbJvFH6StQnM1NNmLDBWdD/DwdQc+bD7v
+Uoz8D4pQaY3jgmo4UpCiqrGzZpNbC5h/TXGpNqn1Vaok4ZPk4KphiwyWJy5ZHRwf
+oiZC34h6SrVlWif7FRHs1+Nuh+L5Hs6k7WWyNKyald2mpMaNp8+jr5z3H5HpDpU/
+yqPXPAk91O6UFo2PK2u5jy7lWy35Kw+iPIqfOySOpNDJ1k4nqsilXhkeZbW8c56z
+Rx1kbkR1nBpJ1VUPWotkR0rdsQsexSuL+5pk+Mk2l/i7Oi6XGwkvE5JyD6Ifc0l8
+iIBO6c0DixXt8Wk0H6+6WxFliWWWhO5P1UUsfx/o/JZJ9iprtPkmjEsfWdqnbtat
+q24OckqqqnQw+6k7EfBZHMentbUafUcOiqVVVYFUlFKKqejEY6Y+lfo+ubdLJdCu
+RFXLgVQwrGW3GIYJWGCYwwtWWlUskYxZ+emKaZHyQfWMWTUkP9FV7wTx+WRVUrZI
+0/KPlYWlUqaINRpIxmMlMfoeftr+7+JP2H69M/jD8xaKRKgSrdibLHI0VxjbdHGN
+jQd0aMDA0QIQWEpTRDGZrq3R00OH8GFjuAD9iwhU2MP6wiGD+jp0Ymd06Ksv5piO
+Uq1rMkwZkiw2SmZIUHD5pP5P1qcNmkgD9vum0hi+X4S/PJ3/mfi9rbspyye2Fk1Y
+tSqo+5O33q0nAeTHbg7lc2zBxS2K2xjL/dLmkWZGHQNxp9NkyrGxuvp9akHp3+A3
+ROSdXUb1air5yyvdI8km6PrIgEskaR1ceOmv5q4dpNp4dofKup3NzUTxsvxlZbZ/
+V7KshwsVcSqwxapT6487uYnOE9IdPT5DshyR8GTg8yZIxO7D2Xoe8wbPD2vkrki1
+J6oe6xXDYppjTbDezUkdjZXVjE75bVWXRUdldu05D4OvVbD8SxVZLZ009nJEkSTN
+7Y8kpPWH5pUvT49iIMA9AfIDJEZQpYI0oY5HlZOHxMMSe9WuihVMpamSnEH4RE9Z
+aWlkKsWrVSPdFT2zJGJOHBVlVUrpTJRywuMlV0T9myzARkClqiJX70kgpcYzsakR
+kiRXw/k/H9sfrouz/j/oVDN7/u1hxCRIRZULOfq+KvHsxm1M2jkhY7WeUc1j/ARD
+X9g55b0y0OAkCC5cP+IWkuBkJyInN3reK6uz5oJ3cmh5kk5SOROSWbV3cz6GtQbZ
+KFKWuNFtiyrDpfLMzGSYWFVpVVZYebEEsBqBXBsjMbarG2x/fZQ+jLYbHHqNwzdK
+EarMZjYxuuOPbI9sySN6HDIRKMbSRBlKUoJjSMbaV15eryvBqvJXDYi8l107GrKu
+rrePql/G999PfuvQQNubc1orFGJnz9/3e/n38NvhXHdrlX0hVyULe2vF4tSELMby
+nXaVdIyzVzptzbpG0kYyrYmUstRUilMV6qhiUaXUqU2t22sqVUgIrrtLQ1QdExSK
+lSKNIKNDYBCEhONtcvec081daISsVrnNwhsmVFh9UnkeSpU/Ucu0cHJG1Tws6MbG
+5/FVq2qhSlIpMbqkdPrfnJsRP5LJP3kl8j+YotqNDkj+2rYWxbJPER5OzzamSJYm
+ofxdXtOqPt84dU9J+/4gPBe8BUHiJMP6uXrNpwqwttVSaxGF+jEifCpFfxSkr9mc
+32c3S3Szbd2ZoiFIb5ZGYtnEkdJ+Try/CPL9Mi5mMdh+Ug/lZFsslk+ZJ6Es33Tm
+ZHKzR+qo+jHqk0bPR7vVXJrn+XaeaslpRZLB6fWTy0fm4NJO9fzVkjpKW2+cmMea
+KKivw3yNm0nsxo0qY/JPx9o926TeJg2Itr4mV3UibG6zyzGVVRZRZzUmJYrYjeJP
+tG57vdmClZ7rv1y8228aKmVl6+qvZfKRcLOG6ldOqd/Vu6vnzdTvHSaWdJCUkjhk
+kn7Gk+eiZHzRJjshqSwqyDyZ80X6SPqx722PQanWebyOhb9n7djstjZ4dY2OQxL8
+hdS7hgfQ+5CDkj7o7K4g5yNpyOpPqRywlpQRSDKSubGQjFYyaHIAwiqRam0sMSLC
+sJviL0yJ2OkeKEslhZYLLIdXuqTrJIqKaZP1acJCcH4eh1+kfB93b1WTnIpa+SDt
+JnSUSfEhNliaKTnK6bk2NUtOpwxwxVUbNmx5x8lIqppySP7fkeJPkfA/GZNlaB85
+U/xOGz7nG7VxLbFvOJRc267dY5TS32y82q967Sok5Aw3FStphVLMYoq5nJ05S7XG
+3bTWXLtislaIjwcKpUlVZ5bNl3MjhW/1ibOUVX6bGO9ltr3qNM4ZOuTmdlJHaTrd
+opbJmZI0WRqsr4Q/tfrZ3oi2RVBaIqi1MzEkmVJ0pnG2r43k6qGCL9Kkpczv4SeP
+sFeTIEBc3DtAZcH6XxGW7Yaw+DznoSqyrouIMcMHbjD/FBny/X179rvtjikQCcgQ
+E4HS222zVI+KD/aP1IS0pJSBYzn2USdPSTTu868arlGQodZ/tyxVyU5RrlBdEqjR
++4KCHQDi6aQjlScf+T5kjee1Xoxo/SOOyTCd1xDlX+YN/MVvtOj2tXZXckMqqZHZ
+EKEQlkdnL7Jdydlgmev89uU78j5cSJ/l8dkmE7rhzD8qadHMH4jZj3nDGPdwajh7
+sMdnVu5ujXXl+T1/u4LOHgw0+z8FGBY2M89iIokYQvh0gpDsMgXC5N6MMVWqIDKF
+k7Bhi7LCa12ZnoYVi5gcGP9X5TyVn5jjpmK38e0H0yNy9sy6krJx2NyXEkufYjPY
+35HJdzHaIWeWpGch1C2GpaeIIyAyJiVK/Gotmvs6vH4XixysdNfO67ZuafPse3Xt
+czmeH1mHV6i2qvNHrsuyeFJj1OGjd4Zq4YLjGTExlUsVV/xcbG0nNuxlxTLllUUB
+hE0vYrX0AxuvoyLWYktLUDBX8H5cYsLkOfeXyz9A4QbZ7J00FTnG94VNve5NkYen
+LptnR61av5SHOPZVdEI2fk5/k3VxOX5PckzZv1ec8TchyRzOOqs5zOUkm0wWPJVW
+TC1sxMVVTWOfpWxnsx/JmyBRsFWNsiIqoVUFReZrK80s5jqpOqvOS43zEuyOx1cp
+0Y8OhOW7ME8lk6LCeFLjEsFSqpSyelXJhXAcdpsp0Y6/OqpWhUMVm2xjyTgU6nrw
+6yszFUttktLZVtnXi3kuDRtDz/sJ5OxXV22LVZKMYxihA2Q/Dq/NjZ+535t7PF0a
+3E6sM0t90PBzJHT5SRrz+MtSHquWXGSMc07ChTvJ7sjSm49U8JK0NlKrXIMbnnPC
+0qUqjU5Jxyt7ynN5e/kM7y2YxjGrVeTE5xqbVT8LiY6bpo+ZdRG82/fr1m22xZSB
+38PxIyNMShQiH6G9hXLOZK6w3N5+X72HFAxu5NSfRpW6afRXqo8VJGH9x5ObPuVJ
+QLAiFlH6/u/FbMJ3EnnDq7T0En449m8JHNPxcyzXSV7BCP9JENSIjTahAiKfMpQX
+fhvwg6xjTyfA09UakjGjZSMkcm0k69uDQkz5aTWCW2iz7hlcSciTjD3IoFZBYmNt
+odoFMMIkDWQjASGk0NA76DcIySAGLYwAZPQkVbS9raOCXx0N4NPJAcpTE24YEIYy
+g7CfLWmi2E1TDcjdkTMXE0qKsqvYI1Rc1zUWKjBt3dZMYLSc1V8teNrSwW867u67
+u3XWz3uiTDJ7uup6aktGEa9d1hTNubvV2q883d3IoqVnZHRyRZT547K2nlbs57pm
+7cLQoYwF2iZPBBH+5LQ7dYkkhI6u5sNK9nPxux2bnayrYrkTq+u7erJbBUNziMaP
+rppVcY3SxyySyySfFXkjZSuA61FVMKi5jFHB+UxNKWOqcRzfOSQki42nkQs97JyK
+5amm58SFk3LVSU0uj7SQfqwEfho1r92H6uG22K2lVz+Uf5sqP0dLN/GejmK0sxrP
+xz1m2/05yx4ONjCbJH9A+8QkhIqoJKiRIQWkkRKAK20HGfR9lFGh2vmzMyyCig/w
+mlAinByNccszHu826vNs08OjdXU3GzSpwG2/sZ6SHoyTSVw0slcGjSBnq4UMw08I
+tvw4uHqDA/w6OSCRnyIh/MH46rxmTFxdHacVc+uD3HvflqHvL7RI7e5edJqb4ZU4
+09uYztwe+W/IpAaOoyLcwQVPk3k69Fffn6zXZ3kION0cYOXDuS+3vzTOm/K7Mq6H
+OlZUd7Pxxdl9t69NorsK6eU6442+am88vu73UsgRoV5Z211tTDr33RPyM6/XfL5U
+EDhtlOMGIOhqVFDMLDExeDQGHON0fZdtpnTpZ6cD6JBkGJpUx0Y0WuppUjCvDGzH
+Jsmjd0VyNNnRZ1Y1MNHaMbOGzcp3VttssZwsk0gsTGWj6gLXG8FJpoGGjp6NmZZI
+mQYvcYoaIEFW2vkM2ui4SWaSMLtv6RnW2Q1A4FIHgMRpRK4eNjfwZ5oqGaaSMo5b
+dknhw4SbOELPGyXLyqGoGSSqSomY1HBBVkQqys9MCWL1YjTEvrT/lW/HvnSpG2HG
+W0YwPtoufZQEsPWkFdi4q6Bs3tkoppX5Eiaqo5JX1UtH2/gzrxnmXNzE5gfF8iGh
+wMagId9OeGfjPxGKTtKHVVJ7vT6eMIaVB+wH3n3+jxV4Svh6l0hS2vo/Hxp46W8T
+mStcsHMrio8lNypolKYqrT5AyFDChtZGHuINKBspBGKg7kJt6Bo8fNBswFHISJJt
+PcLdHk1+NWshZCgqnMZITrDX2VnDFGhCe+9um2kaWy3BLFDrBte5ISqMa3whRNX2
+hdsSnCgdmnJiwaaFmqxgEhoSkmS4W5nnc2pOkjMCi0Pn4WGjUumeTCfLJJ1jYrHx
+jaFRrCj5qXWxkTinm7fk9Hu2JvELPk8MMVKpWKtKq1iVVKKUxXlx31G9Tw/vO6Mb
+E80lYmSJp0FRrDJyLJ51U9ZI6GiLTUsTlnZqBqxHcOldSSip2iosJI2Ehx0kHxDZ
+/AZNzYUGDTXrMplachkVuS1tsiYIYyt2mzZDErJJWTTEalrQplZC7YM+li2SUoxV
+VZY0yZkycNIiDcCJMaGNe5kXBpN+8HIUgoKqYnY1JISR6tshCE6JhknVjg6cMhWn
+JNlbSdppsotV9zG202HYjiEnmTz+E7xXhSrLv5ZtdazVbW2hjEYNKDGEBkJ9/vy+
+vnrFURs1YvpvLuyE245w0VLL1kr7cOg/Ba/Qf0QM8JPxZLLOStL5KZ+faXr7LE9j
+17oH4+OiR8orIu4h/RAagtxGICYpOWtBCN8eXMu7rl485VKQmKi+aU6rwbyfLXpr
+161+qbettfqWN0pL88tJbgpKWur4a8ki2arIszGhZJVK03h6o84nieE+RSDA2EJn
+ygppzrRHjjDHHjQ3oAGNIa0QIJjBiGd8s3glSnsMZSEY1I4BqCBOrFtgXZ7YoGff
+5SOeYkWToVOR6a7/Dmyl7pPebOTUlLEYebR5Ikzr5O+azEJXRy731dGOXtcW5mTx
+HG7GnHVxIbSbnuyUslYdMltVhpO7tytjo3Cx2IyGZDKmmWOxCaYRisSq0VhSVpit
+JWkrS3VY0DcaigxKkRFVBNRkkg1UhOMurldw8knJjznZobpJOCnNMtmM9JI/gses
+Dl0es/T0c4b+aSO5yy8it57PtER7yQ49svq6K2KoqVhjFUqmm02P9rP+enbyTaJy
+k7zyB5VdEyRHyqE2jlT/N+4jPJHNVfOPajFtvo+bRIhxDIiAREIBEBHmAseJvCKp
+aWSr3OREAnaST8LJp9TClbcGN022eOxs0mObY5x+f0+u0ck5RKKUopJrgB87bebv
+yv5u7W3q/fvzQ+JGypskPUreRLIrmybatMsX0a/RksaxtIKIX8sn739qsebzOZiG
+by7s3vdaJR6Dj2macG0WSRT7SDN9KC4xmGSRgRYwaf7MbwGIOPrP6Rb8N/DY1I1H
+JIkrMaQbxJHdIbifDkh15l2d27BHRHVPKch+6RBzeUnBMtctc4pKUyuu2upJrlrq
+667pW6+1t+6Vk20JkkpYV59A5unxbofu3vn21Ey/s+HYx9zasPu1JNm5an1x85Hp
+GG1LFk0RAJ1kfSK+E9UPntJMsjrKWnc/YuFg5pe8Oyx5qIpZEbwKh7e7yTBhymws
+JtGzb8PDzkfvPfLZJ5yR/o9pH2H9KqdtVVX7VbbWI2Nmr22lllliKehVTXVI09Cd
+Z/Ou/e1aKs8lfvPiSD3/Bks8PeYcuVmGgTKW2WyVY/isZRxJN2T4vyfP0vRyfZZK
+rbaZNZsTidKX8ofEcnunxzNEJWu9xbuQ3w1er3T4Y3g7/gteJ4WVbTtmn85O7lJ/
+VEnkTJ9atqsYYYeujDUxIwoxR56sknNj7SbuGneRs8nq4fJO2cpuiWKioslVKlRS
+pJZ/ULtdlKi0b+Z81+yixKtJIPDdvJ+LvDu0SyY/h7/w/FiNs+mias1cSpOznIPK
+yrHt1CY942YTzH+yrZIoqhOEiZIT845d3T6Pps/6Ofl4bEm9vIZB/UJBbEtgRgyB
+QrgTP96/o80lj8FrpZ3WuiX6brraSSqxRuxjTFUbWarrGGKMDbBcSioFSqf3ZLaC
+XBlKqfB9CZLWcmutdlVXXxEzqHZVo2a5uZjrbE5X5CvSKi2WpbDaOR0OqaV2Vjxq
+myEND13YGGgTBqRBqAkgipVktsk1bJm28lu2ll5dkUpklpVLKkqjThs7SaJqeWRG
+VasWSxZLZu4aIgE5GtmzUkyWRexTG+WO1qi40I7X+GXLi6g1d5IU5Kydn5ZoeE4k
+iNK7HJJHZ32hk/RzVTRzKwrOelrcXxZCb6V8ambb6i+3z7g8vV7o2qRK3bNfx+d9
+az5ZypWyvNOJkq2zTDGW3I2kxsrRVg0qaU6NmxvJVssZPf5Ch3jJZiNskkJC5thW
+jziKca5yYTlK0RAJy2l5f1mHrY2Dc6OkI2TTTy2TGVsRATPxGssjZRlnpIg3iSRi
+xI5OR2SOZJPl5/ncvR8vln1Y/uaaeTGFSl5VO11Z1vnvja5W9Kw09ahkgtDDYyAY
+Qw/WRKMp5aFVusKrZpjSKdZ3v58tazxmJb6NXQlD2AabBtG1MLD6P6xKQChW0XsB
+77Y5z/JBkkMXpKgXiWquYcP3Pv6+I4oBI7HediIrxI/Ei95EsFOQPxkk78pP8rbI
+tJ+v+lu6eiHk6+Kqz+L5PSR4npITj7fgsgl+q1VWGLPweJJjUnC/Grtc/J2G01ZT
+LW5ObQ+bnkr8xJ/5P/vSSP+C1jG1YK0Y1sao1qoiqxtFbG1bFRtUa1sVo1trGrG1
+RZKNo0UFSilTNtRtGjYIEClGbbBQhUJBpCDY1o0bFbGCxY1MoNG2zTaLUEKzFBMN
+tUbFY2iqKIjEUlZKixqNsW0UY22i2g0agirFbYrFtJiNJbSao1sWMUUUUbWNslpL
+WNjajFopFMhJGxRRttjbBtYNtoo0YrRqAKKLUkmqi2sSVY2oNFaNotsVoyQVaNGo
+o2ooqxaNUUbFQoYQ1o1WLUG2xVgybYtGtFRgmVk1iqZFQlJrG1sbWTajRaLFaTUU
+VRtSW0bVFWxasFWIsVosatiqii1GLaNaNGpINqg2jVoihmxFti2DGqiqNFrFslti
+qMZJm2sYTbGLaiKiNYrRRGsbWLbQWoi0WNGo21irG2RMpRo1GK2Koo1ii1i22C1i
+1RqA2o2jbRRjWi1jatG0lUBWzNUWo2xpRTRVG1G1Ftii2pLWTahQqKi1otitJqNU
+lGjJNKqI0Rq2i2yaxjbRqMUVYjQaKwVRtFjWiCyFiKsRbUWiosmsaiqjY22iqLQb
+X5/99f4p/uUf0tf5/9K/qseg/3/8O3Ejr31kY1gc5A1pvXCxCkNiwvOQZYLITeUx
+5CNobGwqJ5o3bWtQ2oqajkZRrRj1prYW5TG2RkzhxibIud1zezbDrRBn8s2xsbHZ
+Ilaaujw873Rttris4cJCx42DgiHZM67LEm5mczQU0zdbGxtvENm4RY8axrs0rvvB
+2Lmhu9ZH1rnXlfnhQMwstTWMgZ24VXZJdzdKmphdlKOvHF5Ypc1co3WpPG5UchDH
+HthGXu6jHcIFa8oQrWt53ErY2jQyDFGQGaaj15BbvaLTDPKU2xY9Mj2zrW2Hba2J
+jEwZb1mshmPWcZdXPGGDOQ4hqWsZbxqyLQ6ysx+Pu9UmOHJEyavWvHjbPPnsX1XI
+iq+W3w8Tu+Ry16Js2+QVNGKUjZLWwXGBxtiE2hFTSXGBGkBjMu6xtIYNFQM1yBbp
+9u0ksTStorHkolJ3E5XN5tOFjhjhwmVcOxEtLHxyyr7N9lk1DJaN0qwpiCBpBAPG
+3V0ccPvd0Avs82rSKmAnj7RQAdYSdYbzJjI4URnJfO3TT4xQ26ahpseRDUtS+MKb
+aVjQ9wg3lnedmecmuQV2y44ptKaHyuZcF1u1JXKJlu6pRPSTudsbp5qixXfWcnpx
+PboouIu6q3vjI6ci2PuVosvF0bH3kaaLyFWNsiaLGxxWqGnvHH4d8MyQpjfcyGZA
+6+PHVbTd22SxshNhjBvMiBiocsG2M5zFRj1yyQh5C7vZX53zDy85X19hw6XAhSc4
+4HRB2w2Jzqalk90qqeRM9JrLjIlc2+tvhMyT2eUuq4MdumMqyCenJRHTk1OZudfS
++VfKOcyA5HHezeQrJxq2piOM5vIJjY0fYvMt9eOLt3WsvDtG97S85zOs8DAjs7dX
+vmFFxB5l4hvFFWKjG6TIUmyWmMme3cQzNyatha2CUx7UUluGUDYW7GzYGPvUZVUN
+2QruGNDbQ2NtNsoEDGs5S4Sw7tuXObFDTJmQpdzuUSm7gDGi7IElwyNbNWUW5apw
+r1xMC2oS5tUYZA2cHGiAzve7XardJ2IuYysvZR0Ku5Ck+2RL65bzSHlFlxDxNMK5
+TWUzcfeFomjrOXGkuCogWNpZb5Tmyes2YdxqRBmU6GoIV0TPJNojDDaqLiTC92lI
+44VORRdd7f/n2zez072fHsVc0lJBrBTJO0dTCCHBnnJ7l4TDb0xvuQrWjqhowcNm
+KETZaeWn2MKO9JNMjipkZF31GWlSxcYpJydb5hSnINMGPuEOnRLL4UV1hvIPGKBl
+ZvS4ydl0W3uRzvMAxgqY2gIYc5EjKevtHG5vkRZfTi704pm64VOlm9mnddnhX1d8
+i11nlLfO43hvIUvkhnaDTed1UYzb4SQy8iOZJY0OXGtwdkbrl6UMLqQoOxj6wqcm
+67PRzUcwOOdgLJgvlpWuyLe1MNGlSR9cdZItEm9xaWRy5l21raQcOMenbGPjUtId
+5L5rfXWQr2NbGd5BXI6+tVcA2rcJgTsa6HJhyR9JZrTaSuTN7tG94c7fN54bJ5gK
+AteSmybgHEB3lSGHTGcmecrPGjWNw+WA2uNR0erioM73usN6veTkgxmQtzC+7W1C
+52SQlmXcODt80oUQQutphmedzHoa0Pb5uGiUik1kXE7ZGybH16ydOZNOpe5Sgesh
+jsIhgWSTnObvd7JYyX1O5WwQQTtFWii2tYujUsWbw0ezmrTNw5aVPbIMBpLsctzL
+3e82boiMG5yOnOmm8fMsldyWw025uHyFFYaQ8uhZTsWKiNp8JA35OM6ztkc5IRzb
+yi5eshOO7RfQUENxDrF3qvnKutTq2OI2Axlgzi73va5to5kVtHbQ7Y32Dd1k3HCj
+LIPSN73VuOclVLYXpmseBJzbNvLSDWByI7kReScm2jiac6ztXZGkbaiCAyO2QzIX
+Td7J06xss3ieAXL4jMoKMHsszhnY2tu+PYncmERURzYjb7rVmXU5FSXuzzzvke8r
+flq8UMwGzmKayKZkWIVa8gdUzJzlgqDkEC5XJt6MpysuebzMk5crS96OkqQR3Dkz
+ElgmcLoCwfLTbkIR3GXy81m+S4PlrND69sIGpuN6O4g2ktmwgkuHKu9wyznIiYqH
+xh287t87BEPFkERt85JvWK2OrjtJEX2u3Obs84debd0rw7zdeXMFzOZDJ3NvLmvO
+W98l52eec8Ovx3URCkNEx+BY1uglDVhy3y0UPJcKyiDZjGbewQ+bM3Edm6FJOvzz
+azuclkGaGMcYNlfJEmxcZb4M0d5vObBOO3PN5hD0onSZ5O7GGzFbRbOZzlE2Rhka
+wphx0zrlixjRccimW65Ok1uZQ8tkA7rSLGbUGzJIZew32hAFkPnNVhE9MqWiOw47
+zozjty6kNk1N83UI0ZAZmzwzHu5NUqQyQow0vktdqtUDtNuQOWVDBrlBzZMzs4tf
+bbgLjvOVlw1POknTok9nX1y1i108eGb3lqIbyXdFm5ZQ1N1rdRtQsbwYcJmHBeXW
+2qMDeacg55NcqOxlx5mVneeFYjRYeJ0ckbFCkO9HPGh6Uz0YirAec3cAaT2SN9TI
+dhI4eu6xRjeuwlnHtcd9I6I7mnNQujxohaKtvuAQd6d17CIoMjnTcYTJ0gzDnLog
+y87zLa4RIWrjb3QJV4OaRG3hmhxMjBaozkkzdTcUbRtJzGncsju30dDubirvs7xZ
+JuXdqYd7zsWQFdt5eUcWbvOEb3hdO1zObnI7UeWd7m7t8zw5eWdMmpq9lvkl1O2s
+33XNPfK3sTSyZwcbL7OVx6ZFd7y47nYjGcfOl5WUbFK6jGO85fdlu+Oj//MUFZJl
+NZf1tARwa8BV+AQDgQB3/wP+ffir////pgsXwAAAAAAAAAAAADkAFvAB9CgCqKvh
+wIIRClJBQGt931KcB7ue29fOM4xl8OCCgCOsAD4gAMCCqAgigO4wANPNs0ABQWrw
+W94D7vhh57CBAWsPbK21bY1p2NSlc29vnvroj5VJCRUilcbPtq+nc7762bq+rYxo
+GIRFFTW+199fPB8oqqVSlUqJfA6522q9YIUQr2e0dTolBEUApKpKdxdyiq9PcxXp
+pT7XA1zw2DoUqJQtbhzOqiUFUEnrTwsJplFOzKlPLNubxmlvLabHh70vPbs9VSlU
+C2aInZnWUtKa6kV06iV7xWDfctwDvZfbVSHSMzex1T1Xu3dbtgdcgV00eRqTtivM
+xlkDWp3c5VXc0tLhitmrNiVChF12zldtJ3W27okKoCs8t8djvZ9jdAPWi0r3HoNJ
+bs1XKl3dVs7jAPbHmZ03gFeUl02d2aYcR6bmqg6173G4GXhqegQBAgTQSUPUEGEP
+UZGTAA1PCCSJVT9owqPVMeqfiQAIxGJkYAEmkSIQjRRphCT1GTygAPU9TTTEACT1
+SkiFPIj1MSaNAAAAAAAApSICIoiTMqepgUaeyoaaAaMgBiBUSIIIgRoEJkmqaek2
+po0BkZAPU+d9mfOtn2399/UaZITRTREBAJMILEUSZiSKkYAEmGm0IokQKAYlDGAS
+ykCCmWJBQBpkaKQLBIiZhJpSzJEhDTRCEkUETEKMxQRSIxiaGQREwxpZEg0KYgAa
+EkAGJGE0ilIIhQZFLKTCMSQMkBYoRIUkFIkmkQMZhGYyJkQwIUUkTQwJslEQk0IA
+pAEEkJCIRQLAGUhJM0NCzNDKbFlk0QYEaSCihZRNABJhCZRFKJFkxIKRmDJEZZSi
+mhJRNkEjGUIIIGFMpgaQMaSRjJEYTCYoGlEQpmzGZLISlRlCGEIIyYMaZKkpiCNI
+jIURTTTGkmkaGUWKRNiEM1ERkZEjIyMxIQJRjBkKTBJiUyzM0BhkLMYkJEwQBQGh
+pGWTRjKIE0SYCUjDSIhmGkyEZlMZjCAYYkpimEBMZlEghCUskyWQyUZiGYJlEmSz
+MmKRiQMLMxTTBlJoiJphJImIigzIpSYzFIo2MUASSpKIRJiaBiFAGGmgIUlEgSMm
+BGIZqYzQIwIpIljMJIKSZE0FmAxg2IjIaNLAaEhIsCyTEgyGYokNMEzTMUiNiMNg
+jRMMYSSQQhMghBgAGCEoEY0SkZlCiRhRQSiZEQgKMGQFIkkGIySy0CZQEqIshpMx
+jGSUUKGSQogUJJAMg0YhCooUJTKEgJoUopZCiYLEUsIkGESLIajJokJjEQJgDSli
+QhGIaADEBsWJJAYmkoDQjIJNCNGUEwGZIEkqYjAsbMbGjBAZkgkBKRjQGUQQTKZg
+ymhiQIhECNhhmMyEMgjBMYCJTZBEhSMpk0zGlEyZSjGFFRQpIykkjFCoJoxhpIQS
+JoRZIZMRmiLJEMwSJgibCaJghRAEyggkQySTISQBSIJJMyjWKAQSQKQYKLDSDRFg
+gaYDJhkRBqJiSBkSyBmQJhFNBESMWJkmpEwkjEQxQomI0wJiRijNKCQQNNhaYhlk
+whhLKEYJKExEESAzLCSURhIAQIJEpiQklAmZ/txdd3XdcOzl3Oc4ca53bsdc53c7
+k7runOugoiVLVlto221GpSpUtitttttEqtCirbVttrWLW0VsraQEkhMxSAMkmAyS
+CjDSRDJCCJBly6RMJSkkEJIMhCAo0wEkgYIkQzrd2YCBRMZSmJTCjKhmJIEiTDJM
+0SUsIxIEkkRTRMyEhJCSBIBsKBMmAohgwmJIkkCQaYkkCGSJkxCMCTruhzdNjaVq
+NGI1qqn/H/D+f92/9N7/nf+x/T/BM7+j/3Df5s4H91tC/+oosD+/gYNHpnVNy5J2
+alEaZU/66SB3/PXf/7//et/nu+/f9KKr9VSKdhIptIjKzARQZZiqimGUFLMlVWMj
+MSUU2oif8IKKYIhlVIpkBgFFMIYCimSU/8VUimSiVoFFMUof/mCin/KqkU/1/2/7
+ipn+uSn/P/jZ/qZLjiqHKWmltwNK6udN0mKLpTbnFbHSxf6h/6WePKShwUl1VbdK
+GyqU5ooa/vt32BeA5cSpdlPaWguWZVUxZht422i4WJpNsWzjjnNrttYxBLESWBXA
+to5UMFuThmsrEMqjbDpYOmG3M9440VM3kpxzZ0ZLjiqHSXODDEyJisUWWKaaZVEW
+drHTWsbg1ZFVRmRGCMFFhITKNXhUhsLAnAXFVTa2xYZviazvp7z20VOkudsVqq3j
+OeGtvWOVhDnvvuoOynI6VhVKbaPHLclddm+VRwsd9tpyhwG6KG0tNMuNM0w1YZC1
+SUMAuLhnLQOupddA65UOXPDKoZRXMpLJUsrlyDY2utozHDrg6uimKZS0WgtDKos4
+KnPMppbMLnNIaySc5TMHGbaxTuqd6qpHacO527Xh33/xUTIdWeKTmjbsg0PYKnmC
+1lVSd88uqKGOW10E52BMkmKtkyldBFsScY1nFJZktZQvRzSd5S0O9PG43nhMOVRs
+OXHDbwU5iQ1kkWZEeZGOqNqS6xHOJZZIhTExGkq6rcObBbGrBOaqc8OmmJTzI751
+Vi7Tx0LbY0JUgoOEmzhjjnptxIKus546uBtXLO4JkyYP+eAcAAHOD6fr9j9V+RH2
+S/L/QXTV3dz8SL/T8qH5noZQLPqGwlvR6dhx2TVtfs9W4cn6VF1Rfst5hq6EbM2q
+dokF7YlT+AevC278qkbLKawmh4pJzRaPv9leNe26uHhSuwBuLK+a3xCu7uCt8ICc
+hqAubTDuymwW6zBsaun77TDCZizuwBP7lwSttmpSykZaG/3IVw50MThjdLpDuH0k
+DTDN0e2mvqqKkAmVy9EDwysGysaREKB2NormNHUwj0vgO6IiGsJpEuyQETJyWsUL
+zZWvlFrieCawpUQgzlKTRwiZJXKyzbD3ulpxiGZ3uqqknBCteytK6wxraGufXo4j
+6Ql84X68MHo9PTm7GxF43W97OVuPemu2nSInel9rnXmRB4ZmN2FaIWPHWBY1gskI
+XduCgbTFmxaE5YSihkBIUBZk43EhJxOAqFTkTEgZg/58BOXSVo8zbqfJfApfLFzo
+w/f/d25jXyxD+I/OeU0dcx/x/aRkaa7TXU9oVlOfGYMm7+LW4ifNnrp1XifHFxMu
+5IbmiCprTZzImVSR0Qa8znKbkRuKQuyr1cokqPHOIDMit4yc4kkbdortTU60qgIp
+BnSrVsKMeuZ4NPFFXo3ratpwLFLGtrbRUbc6dxjlHMt30iALUHtqu5g6R2+W8fwX
+w/9tjnDISkwpFIFITGooZI4IpEG2wm2m2Gk22+NttNFNpstJJJJL4r7Fo9BaHfpy
+dVdT9v6/JXtG67C17waENSlYvNK2F2WomFGFDQgRHIUKMGMIWE4Qp1LPYVOJ3ajX
+ij0R2SiUikUutMpXscLDown53VRa5NdNBc3ojNNaETWjiHFD0SSCCSSSCDKT2PSI
+aiwTiy0mbTO6iKbZNVIZ/GZuWsmDvZ2jyAcoTPVEi8HyYNj0fsH+BpVN61a8JAiY
+SJvPsFnwgTI1HXbhbNF1FnpCTeho7rSi2EUjT83q/Cmc4nETmio0AIuw3CbLSbKx
+plU6HxSnZ2X76jMxwG6zEfg/GT47sv4GvUeZiImjSpzqWhp1koVUQmYgZfQYMrIw
+zgqXzPClmVSyPgXckhxZXzdVcKyu4Qi0aa7hpB4IJs6THDITGdymCiiMCFZjbbD1
+Zs2RDWNrUlQ/P8x6SH7v7Pz/8fq/1tn9U3lWuTf1JnUUMBZ0zXwlfGtzjVdDGdNw
+/Wb/TcYvZhOV0yvddt9942XK1inv3hKPY1yG22ftVJYGIHecMa1WHrVRdWNFu82a
+cxAgPKsqap3SvCX1k9lfXPem9N6bX0uaUbPfM+K4StqpjulMkJsnYV74vTdMY1Ed
+oFSIZ4/h6sOvXBROO5iA46Ydg4cPQkTnMmYnMTmTOZL0JQOVaKsWLsGxYqhdCCQM
+UGxBBBEJ7+U3578j0euaooSZ6QPtSOwWKBXnFoZlecqTfq1/RtQ4OItiMpbHqNXS
+LBpu9xQ9UiKIOt8lmoPPrrV81xoI5KWxvXhM3vY8pR7qqK4YLstYwxOVYstg0KRO
+i1fLX6rgTrxlmqlbrkE9LEGeIed9k26rGnWed6Nh06p11O87aBEwmLoD3HcEEAkE
+GRBBBBBEkFZVQUUkTHdrccRvm2/fthj1pS2KWAbKGFox0dOmXvOlr51nWKGJum43
+BBBIJBq/KsYn0ippp9W01W5ZRjbTSfDNkM7isVOp5Wk82WrJNLTsbRZZzsMYDiQS
+QQGRB573Pe988yZmZmaB0HgHcz7ZHJKFgkEgyIkiSS9eHnk2SvPDryK1aqqqmtW4
+PSycD/w8sflE+v8v83/dyIplqpb1llszKa0Kl8tWXbMGzMy8XWnF0X937o/wO4fq
+0+r7tk9qe2FJ6z3CkozLYqzEKiqUFDKGP7kqsHaWq1aDYcCQokp/eU+vt7uZp4fD
+vw29FcKUSuratW2rX7I00/UcnqCIfPyP4ftqCVUyNaqZi2P7Lo2/nvtw1Ntxu2Ov
+M1cLOMOjTdl/Jw/jqwjhrHX7ljvTS0Ng9YWklWliFUpZUiCjOKclNiKmjWdFMjuo
+dSAo96JmslmGgyCeUmmjEtITqi4DqWXTg4318osVuX2Vfa63aYJNvvZpHIUVXXbr
+pPMYqxKrXRvoXCGuFnXhSb4SVZtAm6ojtvuIBkdOcqdgEZ6lcZZFN1kPKhJJhRBr
+WEQyIWkl1hnFU3uys63k4eJJlSIMlKqoErDI6G4EEUnpZfaOrlixLp9DvOUpB4Ta
+n2/ZW/q+fvPhH07t9H4MT16XESiARMKUE/rVVU3KNwDooJ7dlAzgnD7EhScMIYxZ
+/mOidHDestpVUIAEgC0t7/m9fLzzvPVb1fK+s+Y+f0Pon6xzJ9vzOD8R9GeLf1T5
+3aq222kVRIqwftW1VyfHRO+89MPe5zaktbKQr49+/jZmajwxNu3Zk7fVWkSWG+K2
+a1xZlKFOw5BlJpDTgyzEORiGVhmzt4tctufPV1DsnIxdsV3SbUdlXBrTgwnt41HJ
+0263X9faPss1y+iNSMUfp/X6ff7/6/TW98cccp1bYjhzq/3uXPJj5bT8/7W+nhNo
+/69v1+jGyfY/aaf9UV6T6SQPl1Bq30rH6H4yV69J/bdqqKoSHon4AEpmUtPAez+t
+92Y5lOj2CJ7CYdkZxf0D3R/XfsuFMS/C43Nv5T9sfMZV4L/G9pvd03/3mq9yzlm2
+xVJVkOV0LvETLzsJRx4cqu6dXdXXuPQcCHb7ePRk7He904sDcwdra7Nt9q7VFY9l
+7jUQJW14xnuJPn7/TMw/3fPn4+Pj6o/Cx3cXKtqlrD9PRbmYZme3mP9E/y7G36I/
+LH+Z9Pht8Afun7v7tJGbXiaeU0eH+Gn5fst6/K+NqmUrWijbu3DZSH3hD6nZ+o9S
+qiIxVVjIQnk5/AzMrhcclKH4STg5bfDDGO33aTpJ0rlQeHwTE4GVRAlhOxMpdgNv
+3ajAlCIVM6Qe6uKg9yOwUV9eRvl2dAWQKng+meXZoWhDqzCyCFDwHzqlW653rPFy
+aXH00S9/SI7ZIaPaDOu/U2err6Wt0/RGxFCJ/FfXywJ+Z0NuUscckrzN2LlS+4To
+ymv403aBj+06Tl0T6Xne5mhKZXrsbvOuKiXR7e6HiOm9CknWsik7Lmvsvrn08oTa
+aD3VS6R5uebW2codGHht9KN5dWRYyrvSKCuOIvhyuzboi48y0eX0b1ZEk7XR2mzQ
+lIxgob6yp54pmGTlmwZ30l56vdry8vuvXD4hdHdkDKTAhgiUo5KUmzxNmilIqOOR
+j4IT356J9N4UeHHbOSSOyBPJ7lSGRJEjG2PX7P+mxdE4E9kZhSbrNHt+LR6oxuXC
+xtS3UxPlEzA5XpdlqQj4iqskZZ3pmdTpI2hJsTma3b8RF/EoYxU2m5oFB5TT0rss
+2w8zlr3Bw9jYwgtNtPCzmmpqJwmZzfsew9o+/u+NCiXjuaEvhdu9cDRPzPZbreMo
+pkxCrlWTi29L4pZEMIlfLbK+xSL0Zqy7IjaLss0ZGYsGcMGrgagM+zilXFMbIldU
+QarxUPisyxhSqeew68PlX96+Vn81ovsttNN7r2tOwJnj1OGZ6GmypFEL/OURjEXj
+xamLJXj4pVTillprNqvk5OqCY8vVrvLm3qoKGDgxzLgEkqry6tOg257kmNzyTdlj
+Q8tAmWAyU3697unetmwupGywUXVcTN9MqL1479u2I2tsRZbvyj68/LNRM01plhvS
+bN5NcjrrccL8Htyj+BCrHefe9PVPN5zrUH+1Pb6rXdo22uWWd/EfwZZbUr34gOaZ
+1MdLqLC9RP7u6RSO3a3RxXP8X0wBLkn9FRxLMv9CJEbYsiOpgpUSoa5GSlIQU0ym
+1JJSRLorCY+OqjQVlihaqBciZcOS7lgmERMS0iZQTN2xVFERDdrxbKJtzCzbbXC5
+bTm3j1zMs1uqI3AHShpYzQRbTYKYrZRILVpDLWCCHKKFK04Pz6l9+B8QwVBx3HZ3
+pHj9L3wPqk8LV2RT9q1kZcelVkMztswvhMxRjp826SggOKFASfzLUZH+Trbl452C
+rv71T9Wht51YV3hXG4QPJdqV3uZz13mwrzVZnjVLbVn+YVe62EzchMqtzShLkKPE
+dMnTiMTvOqRJbzVhxDI1dd1rQhiTqmcLOhwiEgTPFVyLB/BYxVVJ0qTbe0X+E2NJ
+5FQil9Im2yK4hAhROqTbaIFD7Kzyqk3ny25Hm6dGXKvdrsl+j9LTNJyMbczUREDG
+XgVzlti/gxxcK9lmrQmuXy00nPZ1ZnYMCOztzV44ehTr4++n1Tt21RvA1/+natOd
++etlwD45o3FOGbqiF43Vsp2VA9kWCP6ERX78Jds3aZdJHuSiVaYad/n73gTnNOq8
+bUvQV1ck9/tFEv8o/X7P+1ZhaugDmvV+7UkaQ/vHB7fX5WVgRokFFMNzV0S7rpL5
+fPt5HpdvXdsa8XNCJ3dO64RjAXp5PJc5siQE7p10k7q5MlxQkHbwYYb37js+uXMr
+XQD53nebkY+JEQ3Kr6j5LcbHtxRKez7rjvN74ZI/binYF32Tatmu8Be6TXLsrqtU
+SyjpPtDkefbc/yap8EMZR59eNbE1KJt1yzjkr8IrBj8d5+WZHW1FCToyAsXOUEXr
+Wtq1r5tZb+GoluBz2+U8FT3va2RkKc6WR3ZeNn4iq1okKrUThD2MqptNGqiTJ4M2
+f9u45+/nwFAQyTz4I8lDKWkdQxJJEruEVFU6mHlMh/SyVffytduOEYY+qcVewuWR
+7sCx2jKWaQSEq05Vh2otTsmLP8nxVuGAJlL6CQ0fXzP22Mn0O/dc+RzxqdnXq/N3
+KIZUKGEwHCFgyKwJcqXSyY9+KkWLMIVwWZW84+AK/Bz5wnaLI44LmU90x/EkyBYo
+YS1EJA9jWfE+/5tRUV1ipCoof2zsjgKQ8vpHUIwQU4hNNSOW4tYulfaqfz6P4wYH
+GDM4DID3+NqN1ONUA/PfuPMRXS88tk7zKq/wt5RmaVy9WAxsjPw3pHVUomq01Y27
+q1V1m7Yd2KfWl+O5Zq7729d9zZ0l0p3fEcrJ5YgfbvWje7O3f3xZrowIWRkq4O+T
+FRyxJpiWo4lFPH3WrGdl4cvrRgQWOs7e+Rm7Fg5SGPs7K8wII3++tGhUMYuglST7
+5KtdoyntNOHVVlYkvFyJtG6k2rcPNYnRazDvM0jtv9e0GxHtPw9lbsVHo999iMnW
+ySQyREBBJkSLp6BsnvG/p9faVUKlPzdQ/ZVIRVFqLwVZA3bCzzChJo/VG3vBX5SF
+rWK1RZmzbONI5WDQJSoSvFrWQPYWLVWpk4wJi851alamk1f8QZvBepyqUITCUW1M
+PO3E+bYpbGJWorqrG+spHFPy6ovW+piPxPDpvMK9cLBMXT02D897907tO7q6Tqpw
+mu19VLVj5w68m9aLxrh5pRd60Z1Y7OPlnWyT67h8VWsGO4nUUKiC8Pu5yxhCT898
+xuvPfY+fhoRK5T5qvf5+ore9q8fDLTyk2u/mia2vXGhbTXwjpwro94vOKUYpdrNK
+/ilIKJN59XedxQPPGvYqUmlTpq88kgneW7DHmiG23HMo7Zsh04+H7xMdo7xOJJtY
+eizcYZdt7XbKVK6OL4vQLe/M+3jq86SgU5889oFKfPVuxF3wlFrkIun9efjz79d+
+wYeN/C+u3m1rd0jFGq9X89KmLLXN2C5Po/veZd64ndf3MKIxsceKwWTeL7MD3i1L
+FVj6xz2pzr8QKCFNCFKpIp+xTH6JnyBsNsPitQloYgqd1l5g4jhq6cPDUvHlmwrI
+oOhRQkOJcJfIaDs0KhNWaJJhi4g5WXdYcDKbkpiy7o20IRRpRFyOFooQ42GI3+Su
+oMuUwozR5RSK47UcIoQsIwhhRiAXHRoVM/c+S9/l9R47JC+j+m/Feaff6jz8TUQc
+fBu36cbfXyrsgqiUIyVfLNwCKvgnlBRwKKm+brfbFcOClV8LfTPJElZDw+Yw7n3R
+/39I96pWacn74akmCfZk9N7Hnbmfnm+G9N9IIVf233Vjv2K+dmOqXTgm/cpSxjx5
+NoTM+aO9xtTisCE1pRXSdT2doOxqKdUb7MQGth/hkgx+xCAlvCV3TRG0Ce6IyQW7
+O5ROkRaOiwj2YN2coi/fFuizw675bLOfJnWg2VO7rRIEXexnFH3XUPPfxRcRGzXs
+xpAtbS7eu63smcY2W+6RTU1psvDNdHE51pxd+N1FlWJbYbvu4qRoHx0s6pEIRV8N
+xbCsclUVRe1t0Tr9/qt689+zMRbOMBXqvBVD8KyFEO9HimPzqLzwaL5e+3ZBPN5Y
+7c/Kfp4kQCKdTjmOa/v154+n3TBe7/D3+v6r+/voinkqWoitVotACCo664ufF4Po
+3J6cfruz8fcQTLL13Kd1yNXLle7zzhNiNjuuwY3dvT6en4e/3/ffT7fX3eKmQXX0
+/wDQj59+yNfHDLb2ngE11HTs1D00z1Rmnx+dfhwbhbzuLp0qd0QHMBspKuzzC3ON
+dfyL9+3rQfBoYPjz4zsDVN+WG7vLnXx9Tr2sSvtE8MUa1li7Bpqrgl9mbKWWkUrS
+xt51NbR1yPPlQlNbX2vpMO6OipAZVCnOzMdCcdMd8ANNA3fU9nxFkfotXt+qp9oP
+k+AQUQa8iUvJUoSVIGwuzKjMpmM+3+Z0JJ9oAjV234RfrNBxtZMos3vCkrhlcmZX
+JZqK1aqYUg1pqK4fwfD1WX0eSASEKQ/xP5j5X1rQTbnv3OI8ip3bm/IdSENUwIVV
+CBlkpUlnZ2REw9p9/blysnsiOzjy+3xKhFfg6Y9VKDt267q3dT8u8J9NhYJotAkH
+UBPU1WdVV2dPq97X2saP9b/I78+d+hJa9dsO8Dq7uuiXBGuVPDdiDl5sgMgCCkTR
+ucudbu90qcSryhxzaniH091sPgD3KHqWgJEDwpMCgIuFF5DDtnI77sGMf+eGrB8U
+CUkTW1qLEWR7RSwstGmUIlsNwAQgEqgykQQLO1knr6u1ttq21Hb6I+XSd9/RPL0/
+pE9I8J/gr8OkY248frxb8ffHG2a4zitLxY9lPyn2k/bD85+59xlp+/KfS6jzTDGV
+KlCSXUKDuGBA2GxzjS7K6hA7uoAgSlLYS2qL/6jhPn+y2y2u3o2Tt0/s8v7+lrl/
+tPT9O/Fvbfdk0V+HtoX6P4/h5fh/Zzr65P+z5dyH9HPb4K1fuqT5PuQMhcP2210T
+TD6Tx8InpqHwj333mVmPK+Lfw/Zy/VOHTmPh/Y4e230Y6cunLw2flSdvb90NP4n7
+P7x+yfRP3enyjwH7P7Pb7p+s+0w6WTLFVJtJ7fRw+3jh93hw0r/PVq20NKhwUT+m
+nppNp/lXTSUy24lK/p9p+x+7bhT5Y/39es1H9J9h/LTt/Ha6djhODEY0qtFflRyn
+0FY5fsE/Dp0+HL/Lb9lnh6YcP0Ym32Y/Rwp+H3k/Kf3z7vTy8I+K+yj22wqny+Ps
+dv3/tbwj0m1dOmO2g8Kfo4emjSqXi3tw+KtNzhy7Y8PwY/U/sn9o/l8PSD+utZcW
+37Ph7krkPur4qw0fu31nGszW2itKPy7n5Y+v8W+vzZf2Onp4K8qjB+bb8v8tOH1H
+B8o/l+O9+G0tG1pa21taN/eU7knnyMCjBUlf4T4Nvg4a8W9DpG34af0dOXz/L8Bt
+/Lo8d/GXPh9HDFcPhj+ngr92if2dHMPk+xw0x+XptPtbdPTbXxbFcOvGltuZktu3
+B29JpHD9/l+75T24fcjp/93tG58fLFy/Nc1mOE2PTw+O7a/KsP1dPKz1Ielp65m3
+Lly5mZmOW2qiqrJOg0SUOpO/Ym4AUdn91ovgujOz4FB0MBZWJO4mPoNtb+7266rf
+z9zM1txqittGlEv4/jbbCTioBO/q3CKi49u7fnvTo05uxVVX8Y0CiogUNx5JLet3
+YPFu7NOEC+62c7AwsFCz2reusG9vMFWax1VlAwU1dUyIEhit6aC7Du7M7VdNstC1
+lXlm7XRkSLM0jajTZqNBA9IW4mqEa7U3XwsODHDZVYjuyTqypLVdoZbqcyjdlRjo
+dkyjWpGBmkajVWlJ1DzMPPfJIIJJJJPAQDIGiiFDI221bW79r+Dx4685zOUWtrbb
+fyOzogfCvL38Olr2TVKbaW0vvu6QF5fnnbMxw4f2Y/dynRyqptyw2Smnj++v21rW
+uHL/Sh6afEfd+rg7tq21/aO38mnw4SfDyY9KYm/9rcSPu/X7Jy8DtpVNp/s39X6P
+xVjyn28Mf2culqrID0/Z9WNK9+LbXseXB+yp9IezTttsnsw0m2J9HPXrTWa1mZcr
+Y5Fj9fX8f16/rtx/W/7ccT29K9P8fS2fRp+r4CerERJEebBr/HVX8Y2yv6ZK4N87
+Oc3/UFSf54kQJDPt4hEQISiNsJ19vv6d5ePOXnLnKlVRMqnKJRN8HOc4eHnBzoIH
+MpAZ5mOq2Kzf1XTznObSPHfYLFdt2e53f+MGA8zED54z4hfEg7rRJfbXkeq33bpR
+ebgJAwUvLQPVZKKFSSDRYI4wwgQCBcqqHmqrcrro/+ISKcn/1pVyxUc+791ve+Gi
+7f91U5/UtURLrEFwxif/K7mLJLLBmTJklllMbAuMlEryqfWitYksSyFR0c9WGSW2
+NMjKZLbGmSTzVb7Jbba9lttvnPje29ykZaxopllRLYrTpUlc4iY8qqyI5d705MZv
+u1ZllGstGZYT7z6Z6plQwqduumGQywMcHwrK86pav3RTHhW18XfjLFYyWbjorjna
+TttpVOBUpg27Ou7MrMMyszLdHBzymitUJ4Tz0dVMpiyXRJDbskep0BN7JGO8mdHV
+Pd1TStUzfsg4eXuWE9PVt2juEFWDZr24eiXW5DE7KjZzEOuNZG7I2ocWRlLYLVvF
+GIucZOLIbpOKjLLUtRat4sjIGnHJoJtX59aGaxoZtSn3kjr/BfvvEueqYoavHjKx
+lfTkQc9PwqlPyjh+1Tjaztea0tZo/XVFD512U2EDj9tVTpSLeu7zGstZacdMaS3H
+LvcS+9fHUcNsArlVO3L8To+YZW3QdvX46+4ZlyqnDs2vzrkqcOL7lnnrnu8/OY54
+O1Vp+VBoMO5sxa7ODUmwnEJvqyTdRq22yZN7KutPTVelXigrJvTW7bYeEeJUxwNk
+NlWq21IcSHn3w6MTx68cHTacUEfeN4zPFzT3uFY7X3XTNafe0tNeKqbVU8s+c5mt
+7E7erU+HTx2Su+OmvhpwPmcIeHwW7qx29oNMLvh0fHz44pNODegO6ZMEIgYczrCT
+WdKk8MDFGSiuOOdBzS1zZzVoqio5kOTtbKzi7aNMZgoHKdbV9Dlq7N0h523x9+6i
+49cdHhy5L3Kdee8uTrlo5JI8MkRs0xx3Jy2Vtbxbho8Fzs+RYy555fVjxRvjk17q
+u+TeMhUNSCJxOGSaXOJIampROLhmaO2zc6CyY2kbd7PgiY9Mkmm76s3Tx7yp8fnf
+E1+NlrW6nhoz1fPXb3ymeTtuRGa89uIgybYSRnch0uU2n5K6nymfCrxsnUc7yc9N
+gY+UCpqeMhw3YTjNExOOB6OpwmBt07D27E2yOkgo92SedsjGFb5T4cKHWuV2M8cF
+8zMy4FsuJXHLaRIdimuHBprXH3TZTtjDi8eLZ0dKHf427eFdKGF72HenvID6MMOn
+bCLWNsgpUEoZZG/vyoPxPnHd+D3Y+H3rpjqclZUisODjFbL69xIOG+QclTpogxxw
+qNO9m2ni+V9vD2uz1tpoxtt5t1PjrlVPhy7WwKnZHuC3ruTKRLY2yUlqGlKqWkiW
+y9iHnhPZO0rN94N2brW8hut0yR51BrPKXs7JGxb5AnRiZTl2Xq1hpiXy8iczq1p0
+4OUvW9g8WPrtcenxbXL58ic8LgbnL1I0m4MeNSM4zVJrWW9uI3DW3tqHzluUwxR9
++s0Vc0hpweORY4VOtNXbALUCyXLqNFcCR7xxw8jTkStO873DPfY017vHfEhE5xAu
+lh+U9Pt+W9++O/u05zeb4c7pzjRaWurtlU91y/Pj38bnSo+8PfvF8I5SNJ62aL20
+QZtJUXrrTO3rYPXw+NeuFWmevi1C41Gt1m2DMqHmySGsXd4XEMFkBpCUlZSTWAUm
+a5gWmZLEQcLCwtjR0rZplkWrZuMqsNpWrMyvBJ5/Gff5lT3FTnKql0x9H4PU/DTX
+OxAXime7qULq7DqoaFW7tVaVWymOAghDdEltpIwwyIooHivfPjSHoqKy0NCBIRpB
+IGQK8fXhPBpMTMhc4OCJWMuxlIYammJ2sgEEXEs8oDopthFpLOUlVTJVAqKGFoiu
+fFmCKtsq1oM33uOW59vV16cDSvt7p7+u80IySXnVy5lF3Mz5ZLDu9ZrDzoUPrekc
+9Ie3XnPlekWLviZo7sWzm9WT4r4vmvd4+Mn1zI9eadvv8/FYv0fllb9OdHfmF98c
+xiihhSVRBRSemqq32pgz4bzMD6OjNYamHHHp0WsLbYyKxZ3mLD52kY91zW6fPB9d
+GObcd2fPPjX0d4du7bA4tvfmSzb6t9NouC2GU+LHHGJNXK4s3xiY6MfbxT4Z83cZ
+UuZDLGk0mY/Z/iHrRxSY3S1SG9mvzS+bvxc44Th6JqNHLLC4ZR+p+NfpU+sMTeHg
+a67ZI7LO0gsjRa278NqHpyOH+PRsdMcqF5x65vjp0KeJjqR4dknzo+Zsle+oZmSN
+f8ttztuTWnh+4V2fpXP02u7ttibExiUsNhbdfPzh1+rQ09U+enFtXS5qQkjjxMd8
+MkkY56cYwqZcb6vi222vU9cyYersXMh7cOOI2Y7Viz6BNspac/J9fjp3RQw/gqpU
+1kIPpx1mbn6DEJI5wLjKElOj3z3XAvFr+HD+fSn8rhs166dJp1CBw82PeVw26dIv
+7MUi/KQbLXXHt4nPh0fSOYs35zI1WtZGrbfqaOvlNp6VywnitCl7G/RjngwTGOXw
+v3ThnnFFDb8PHJ2lL1vMzxiXS7Hci9P169PULTtp8MorSZB25VNA4Pw6X609+3Vz
+WTVcyRy2dbt8H177mEWSRvh8M+vSerjnx/SZfuZ0beIXSUuzna/Om+czLbbbVfTz
+54naAdd+pE26qa+jh4iOkG3g+U1FmjxmGX6Gj40+jLEntyrIn7/D+T8fy1+Pjjup
+Bc3CtbNuXO2tRdulIu21ItGsL9ccDt6aEtrxfwXjqcDx58HqqhesQkkFR5Hw5s+Y
+95rjxZ49Zxzzzs55zny5Y/Trf42ninShp2tC5MykPXPDq/HSuOcy/Hrg+uXOZjhw
+qpi7evQ+G3aueLbIW2pPLBOXPB2k0qeWcvH8dPX3537NGVVjFVhhjKxliVkqkjay
+ptqZq2S1WktJVZNtVJa0VtCm2mzbZsiNNZVVSy2ti1tS2Sq3md9hy4638z5PHNMz
+Ix3IfMkD8jgU/hevg0z6O9vrhfx2u0pdXi4ooddn1WwLTt3u0dtfx13/DwegMQYQ
+wdp85zgwAfA3hJq69eh7Lu7zLGHl5V6eivCu1elHunTwnjRy61p714uThUcOOcz8
+O1cqxabWOunLt5Rw9iSJHt3F3y3WWZdtujHhx50iRPHtKachw2vnz8eK369x98Ov
+hw2vztQt4JRlnK9QFCycOHEpchMB0Ym5SeIlIUMnPFcafA3klDSwWSTX9VVFP3k/
+KQ0+nzF4rj5wtvArh604+dqCN3Qjz0VcqypVmrlXVlSVcqyiSeckRld1JlJlRlJB
+zmlk1LS0RqoTfWN3vzzprfXjY+ZUWT9c+ednqsvvSSJCkAXphQSFpCgXIwRJFQeP
+HfxpU2Op7pg4ZhX80D8P0HcE+tvtafe0PslS2h6bEUphB+Trt9zcMySlFfrXx8s6
+aKGUneDdfjQ99/yYfX7l9meCDI/bvJDJAQgdu6SzNW3eZlBQykZoKrwo37d0TaW2
+0DnfHOPJfg278PvnXg+re/l0U+vfj83QmJIyIhDN53JH5Px9XhPr2/DXcY+NzGJO
+6t1p8J77+GH2+xfbwXyN7S7ySU8e36ZcY2cmX9ZqJVTbyyJ9LNd2Hy9pFJjOJx48
+YJh9fxDDVU7nuPtjdzVxq4025elJxy5kTGLIXu3JDla90qnLmi/u/hOXSqnQu+mf
+lpHZt8sRqH7saHSSEQXU251XwY4dOFRt18lS6cUnTgWreu+m18JO/RkmYWb9Oofm
+aH1PPXk244ZeFEhws+fI7cknaR6D4fDdfBuITwr5+BweumnDtjA5GjvZpuOHS0si
+Djw9vK9vVXw3M4takTts7RicqcARg31RQ03CvXwCPOWh+DxPrrPL04oI3S1HWXPL
+V28NsefHEu5KGKEqe8NJPYLCCHQMJCQ7PR5y21rbPLh6zyKm7rpxn60/GG3l6l0b
+Mqm2VCL8CsOWG2Qe5VVUemVS2xUlz8FNVTjEzB3gTsxNJ2NL8fkcfOEhUaCuYPW1
+wuNRLHrVBHPnUBbfGqqnLbx2unVlEqcfFU674T6+c8eHON8cbcPxnVY79dPSQXrj
+j02ctOXInljHDTacJEg5ZB5GNDvHrWNOquSOU5GHgGIrXB8Q3PTh49XFuZnMke3D
+Pi349tnTc2x78ZbabfvzMff1Q00qpoqlPdKqaqUObw73hT5rm2u3Djb92qrt3QRw
+acoV3xS8qpNypaaM8CBy9599F75+N8/OM7xre29w+OXpOnjtyeGSEgrypPNCAvLz
+gjvv0nE4N8L06x27SNPjUeRJEjXk3zlzOGsVtiMq9O5Hkcp2VPh8K+XJ7XZx9Zvt
+531nPHGb550jpsrvKpnZ7X182tPp4nB2m23Dj50a+PuHwWvHvJzCvWfD1elNOsfN
+SEgw75bTbwkkc52410eGuLbzmZkZvvVmtPrz195lSMXTdO+GvWa25VN0UMpetNG+
+NwU07IY+Tmk5PCX1drtxw6VwlEnsyq9FxYhCRtIhPTOT09a7ZutZpiLA6pDtYY3V
+5igfFU4zU4brTy7ejat64Qejh0SJHTSTZ3u3h212EB3mgeekTleTDmSOOVnfrh6P
+Y8ntJJ7Pr2KTqnMOYbga2JznETGW1bGqmrY4zLwt8niQD18xElWURb94FyqjnAZ3
+z6YJ1iOcC2nMPuqLNVQhSiLLqoyCroXV+YwVxq9cddcOZJtS0iqScZGJbLQOBQXO
+HE9q+9mbo5znrM8crxzyCVKhGIK9qoKpR4L0FF29epznKxmhKoosQGVDU2h3Ay47
+SFIJE+nw88FX5l03vzu+JfbrzePF0kBSZvDVsr5KaIWZmJzqUoIpQrMhASe/z86c
+6HyL3ZqezLvn2w0+aVZ7vTMRFUZPLRe7Rk+Uox4XrFfp8/Xz18+/jybiRw7VvURT
+5MeVT3Td4+Ma5xHFTVt3xxqcror7cx5cZbWPo78+Fcp3j1jCSRIxTy4+XByxM192
+To8aO6enDlp8Tpwnp5LwvE56l2zffqYlRPPQ4gQywiSLYYacvPXtw/DHocyrt2j0
+e/enNm57m0qsB8YrRH1Lrhwgi85HTIViqnpHjX5odbWnqdJNpywNzy5F55CTpz3b
+Offvji3GWujD788zPCvnTt/r5SH4mbMvVznmrtcufVxUd3tFD8H+XCVA9+aArHR5
+t2MPNpfFspyylwe0mEjs5oJOvfjxfnnNXNbdJPJ5YcaYgXzEbNNe/DNpS95PXWbX
+Lj5me++lriwkeI4ck6bca2nHauuzfPTyrxRXIm23TPacNjajfNUa97T754q3c0rP
+IE5Nere/DaZzyBPTHL667M6YMUiwUw84c4W+5rlfVR6zxCzaeKly9x9x6DhaooPI
+1CNpPHVtq129Z3bpzpOM14nhw8c8mvgVGdYiu3n1jtni6FPTxEt8uOLVAnqxzGvU
+4XXlc09EDkrS68VHEuLovfh0kKjn16nx2624KnuSnHXYVkIprh8uKrXkxp5Z3aqc
+aeE59GkSJ0a8drt6aX+06Y9W1WYqdPi+di9Pw6evm8zGnrTzvvv+GSuG79/XDiov
+H0qepaxPYPTbhXBj1xR4w6Tg6NcOybV4+Om+3X41ItLvfGlU341TWO2R7tSuZO+O
+3asyajzIENvnh5J4Xw8OuDlfBN8GUCx4420ZVU52z250coXTppy6fELl7Rjpy+nP
+x28cG3ng7sNCRkisEe3Ltzt62dtbszTgXpLw27ePvRw+vlFcKR0ekbTaMSHDJB5e
+nZ8vLbTt78dG25fCwkJ//etW1scxPdFsVVsi0tFqS177RsuXJMklSkhrEjSwORa5
+3WlxTnZfjFJJ8qqYtJkGIYaQX+CRXd/3dKH8uAJ8Y9cu+OcSSPAL6Gs336Z468Zz
+vNxQRIyXt3dm7s0SAwKIJ5wEk8AwcCHFznBwg8o1kzNO72t3vAPY+sfngZ9dFb0o
++X4H6XmWneYezTTiKIZ4CUUD4QEQCdPGmwTwkyTaXmJ2d+i8PAPAvDjERepd2Z2U
+tFeZqfopOh7VAjAeQ8BPpenxxACAkEQhEExObQ9XlR+e37Iw1mN+ICD34z4TEzKK
+dyQ5oUQnsRgHH1l1ker09IZ4KIqyrFUOLmqZbKLYUGaGAgOcGgdbwVvRho1lbYNU
+cdPj1zU4ogY7l1TxfNNPT+zP92ta1Xu6TpY6QeISM9/hrny59kjOErh+Ht2BPj57
+6L5BzgoCDQAx6HNqd9+Dyvbt27Lq3osAuFDt/Zv5zu78vxMXPz5rDDqp1z+Pi2nh
+zxuQkFAnqvWm2HD09db9dvJvpZ775mY/Nd5n5du34vVU6F+N+jTb5SesToqJfaen
+DXwdO+bu81I8knny2dLk+lPtFD493Hx70x8+ZnD/LrkygIFr4AcZGrTDQcMwVWSB
+UIKC4cStoBZZEzt+9tptwYhbUixKXVLSo3XvhOmipnoTQ+XBJCdfHJ8r47yZmPlN
+tp88W+HnzreZnj2dX2cPfT3zCQm3ifI8tvCeDfBNnl0nnzDynndrPNObjUhIM70k
++Phvzu5niebfbE8NY1HHuJBzqbt41px6TjT2wnuOfnskTlZwenlVTqj+HnLFtEu3
+oQOnRi96VHqH1D1c+g/IZ9nQp1cZlfv1606UPjEUVw/C6dh+Pz4Dro+bIdOl2OTP
+vLTZ5+7/XSX29Bv0PSCdHY28GJ5eY3ddXvTet3d8H187Yn31vrt8fNKu1D4+cOuX
+InT13p65ql8fJv74217Pm/vXbqk3NtnkqrqnTkK7wpfdhA+r975xmcNIp7Twznji
+evTlp74w9peduGxXiNdczaymNYnPSSSSFdH57db5cA+GzcQeEkOBjPVentzlrtHQ
+fBtWJ18UIb3yjguww+BUcg8J5eHbljZU09Ja1euOjrmjp59ooZ2hzKN2Qay4mLA1
+pTOLMipVkiB0k7w4rISoDm5vGxYTTI8ymFxmtm+OGuNY5ZPbcqyxJP8qLkqcrsuN
+XvVCjgr1Q3zy6o5T0ZznGJlVeY1Td52qu2m5V2aq1GXbu10ddY3rOrpy0u3G0gaI
+oCqoGaZwMADnKp1up7vrdzvSOe91CCUrW9pWJcngyfSVtIngw8zxCUFzpAJs+tb5
+Zsn1j4Dp7628zYe6Rgm2wa9FYc1vkPNMB5NQ8Ic3l160dXv1c6zek8W9yRs1O1TS
+z1rN1EhwklOMD2NGX6ryTXTqgq+B6Y+TGD0AgzsO3XvudNp0bcBy7fASeOUcunRo
+167Ew2GNnFZG/O7eEsenI5SHrvvWZ2addPjD+TtfXdODuwvq5huPLaODCtE0ntOn
+L4e8t7dJ5M07bNC1FSRtpsdzzppPfI7dxw1640x8bjJekxsa5Y8VNtjEcBtCWwcl
+ZTbCJcD8HrfbHN5KHTo4Fp819fe92ONY4erddMSl2w76PG6tcHtZwrlPXKVGjFac
+1j+rOTbp5jOXJwuP10ofsoU9Td33dv3n1t2cqdfj9Pvyqk2efPmZ48XTl0KlODvM
+5h0nx+MfdEOnxtt86WaVU/eucz4+eu3ZVKY+v3r850xVTdadrjormihyN/evHXTl
+OFR1cY65NTCcRp8FenYLLIlUW8sJOnpScPWt7tZIJtsSOmHB33atvt8eF2+HHiQg
+NCRxrt5ejjpt8Lh0U4HvntHLtejv64WuYovx4cvjudsIfUUV5bOXl6xXKF8KXjpP
+vQ+fOmXao1fF8OImWnu/i1atr4deV54zS60z0kRUkUeKm8HijJ0r4pFq7Fh+ZW0p
+aNBfXr10NlfrR0278/Td06Kxn1/HSm+H8Kqdssebvr9V00fgPx9owrAzk/h42KL1
+67fvfB4VPiUIfGBcH0P4etPoVyKa5fXxT68OOsAuVItPWj1w165dPPO3Prp1euH7
+9fds6coXoqU5gR9Lj1cVXDfOfUFnHKJcn73553ve94fphI76boE5x5eZtBy+Ht3z
+2NsO2PGCnbwrDt+Pq4KodNhA28Ozw9e3Tlac0vVRrljGXXjK74Z2eHlKbXHRrpJ2
+M2gxJI5S8WzbWJB5fOzzK0ngIDK6THQVqb+66e221x72x9UW+rxDexdJ8d+/O9Zr
+M1mXw8jyxjie+j29RJENvabZofCnhWL1wD3ljj4BcQ54OO0GkHSQe/IN7t4HfjuD
+tPHLp3KlkOazq8sUy9Y3tjOLJlCzMmaWi4d78Kd+VQ0sVjFFisKSwqlNNSpaCyMY
+JhUqbN41WLJEmRFsshFLI70wpzxVDVJQOGVDMCz+Yz50FeeCnxee+p0OKhjnr5nP
+et8cb4wgYO5ud9c665eXro2ZltpaqQ2VAWc7xIg8F9WbmVmuss1wH46NPSq6o+75
+r6ndGvN2auHmEkDx6GEenCEQjUVKH6S7o7nqeTy/VH1TrvmVfi24LBBw8xYwSNpE
+8sJnV1c5fbaj7DwBMORMfPLNZvLOcobrd4s2vvkgcp4VXw0SckHZ8PbX4yw2pF80
+01SGzT3e1kxTTTd04UOGN4uYNHi8W+3ItR+t5UkOHvho7WGOo9fXnnm5jU28kkcn
+h8ar34DKQz8PS+0UNLpvX12vxVVT4FixZRLGVTCKg7d6NpMKY20fHFHbPHAd9cW8
+W3B6uvHn1lut71682+3b0eekCcIhIfPBfemlNvtyBHAV/OuTYkcsZ7vxb3PCthAc
+J5Tp8ErwsxlI0n3rzjvR4rr5meB17QHbhSBLIyHa1ZzsIKrDw6gTDhlwJiwFxV7C
+TiTvjH4uOQLhBYpFs7g9iZz1eObpyecFTp09Ydve/h67KmyAMb5631VNtmzEgiaH
+voEEA9jOcHBB6Y5jttTflN4ntsbyJB2kkiqnekzu324+Oz6u+mggPLyZ359BJ5B0
+H75vv+O98cccbcv12976z0kU9dPnSF745HyYQ33cpPXoOXLOhUp0DfHblUbbed8u
+lr64ejy5Ydw69Z2I9N+ed8a3ve9zh58tTm3kTpI2VpN8Mb84XPTbiYlSnHxsVKd7
+5NOQ9jvhPHro9jznCFWeydPNaNzME08nR6LWss1Ouel7em2Jvht075zNukuFDuk1
+adIWgfePGTgVKdrr4ziPTO8PPDtjuAh51atsnp486Ws04OcX3GrzMsVSx9Po989d
+4u9uULJywb+G3r10Y9F054GPrm4+L04ZJJkqxvxw8zVtr078cZmaVPNF8eWOnzjt
+m+Dzp6MOXKqbXT5aKmzzblVTg1w8Fy8+g7bfFrpVSnXPW1fHbb1XDGGpmJERNfAa
+YbUdLIY1MzGDJvWaVJua1NSM8i0YiLdVbblrW5bVtO8YJSMqFKEhgmDmWUhjLJDM
+DKMoiZY0CluHGm7ksuQolpmExItaAGFEt1JhFAmUBNrbKCiJTAyJZtArEMXRREHC
+ZTHBRGRExxlmSkstEbmFe7IABXoWWFGHTOoGks2lkVQKlwsertIkulaYxU1YkYar
+IugRakIpIA20qUYZmFcabhmNazfPjwNMIdbaUG3czeq/mv+/sp9452V9fRjeX3nA
++uetKRd6dGlzfHRVjgAwXV1frY5IFJFDJHyc4IKXOHll1l7lpW8epW5ML2nMCWfF
+zdoNoJaHyyw0D1bEtW98yTVcnh6l4fNM870OjJT1pY+N9aOlHSOoPVAjvfOy6XY2
+YjllLzgBwOAG54zy9JMd5d5Q8hgek7RpQ8GnkrxxqqbKdNcHfWnS55Ncmdbrjhq8
+o7ZUGlvWBfCumh2vHI1+9s962fXxMfAcquYF86TrDOPl1vW8b/pXKecTuBeH0U+L
+2fGp45XJw718Z9c+sP5PnLvB4ymlt2KlHLXaTto+Lz741xvN7za4jqJInjts1qe5
+S8qL8mlDH49Q5+dZrXjzpsqcd5m9LldKpvtv4EDZ8DPrN/Putb32490+paWvg7pO
+vrlKWmnnI72+pedYn31Y0duGm3a9uBOGOHp0h1SV29OedcZxres3mbt32npptw7E
+xetpdUUOnblLt5m2eaqlyh4KfAeqHL66aztyzHfh69Zol/TfR5kRkieuPNq2+3lo
+JODHljhPalUp+OsY+bVGsXp3+KNK9OtuXLOAJqZoZPU24tuyRwnGurXKohrzvvvN
+a1ts2nXKnipqQDwxOu8bJI6ZfCCZCNw6XfbiBozK29Oz5zmLqvm1x9cipT7Klty8
+pOF329uON9fPvbr1pzeMpPe+Hr3sIHq4+uc3mZ3PLvZO09OHTzESDs426htwdn3f
+VRW3ZttTnnnM+rHbw7G+GlU7XPMqrzx1qcbOsdvGePMYn1vf33e97bkXTF7M1573
+x3nTpy0frx3VKHxzqqHTh4ED3htxzp0rR7w7XpnFbjBaMsMAti2WdMGWWphmA3IG
+ILJKMBLTKBQMAVWSsjIorJMWW8bZqzbphIxqPLNyrUqhpj+j5VOekvjvVUYBwAAa
+KM8rSbnby5mMvMGZKspWru7uiVau7t3V3cu7uqaSIWAE8B4eAc8bruXXY8ta9Ryl
+s10jpy+y++675d2EUSCjzzqZO093qYXV3T5vii7tdBPVdZIj3ygmbS4u+tw9U5gd
+efWVrXZ6tawSHPWTXMsxnk4iq+i56tphw8+ToZ4O5ATgW0MkEcLw296lNsfrDk50
+J1jPLRV90fWN0hz8XrpcPBenvXi8edeZs4mllq+utW458+TOnpnKJE+E9OPI7Lq6
+OG1pjRt3w5fVc9jp+Ncu5Uh7FTth7vi3HHbwktHIvTl5d+3CHhU0LhwySh1NMXTX
+faqcvPWZmV6OkmSyxFrWcJrWi1kksrvvgqr6xW9zj1ymeq4dcNajmbSDkR2mTlry
+5AnE7fgk9Tk978Fs2pXhPvjltkl3AXoF93yfjrr84+98655556eaKe/TcvX8+tDp
++Pi1RQ8fdUu2pvFdMbdPAQGNN8ivU7S9Ryc166k8yJc5IdVFdb88+uu+/zeZveuG
+j1wuL35UllCnrTCt7IYcNxThFFbQtqjNZgXr60baY2hffWp4+ubvM/NIWzW5Uj1D
+p8eU+ZTg3naukLoZzl+a1n3vGta8samSFp7nvlKVuVxKevXTjTg2duJ3SfNK066b
+lwcPF5xw2+0cZJzrx68c3veNZrGOHXbTSSRwPSDE242fCWz4vTsVKYqOF4bx775p
+0xeOddrOpVXqcPaqqOW22WtV88c4xmZY7dL6ei956V67bbVtWu+nzM5fLQ6pS9sJ
+RXrzSp0cNSpHqF1oswXg7xoeipTO2OO3gSMFkwqyWwWmzzmd5mSrkIb9W0R4V052
+4SQ8m/L07yCFN+NEinDh32PHfHDzfDTYp2pF9vXXneZ84x6vcPRzRtDb1rS9KNoj
+G3tt8trVSm4nKzy3R6xxhOMVR5krVhMyjGXOrVEkqjaow3ghlCSpZNWBcVaxL3Fc
+Y9ZJpkrnJzlzh3m8wze+XP8uV2KlNuHovYPm99afPmu8VUqUJ47l3jmZl5eHCqbb
+HO7xlEBFcBA5Jb3t32Zl9tPvd2smGycKE9uyfDQQPDS8Ltb4qBF9a8qnudmpDwX4
++wdtdWPrzp5ZJ51IafAcnZAsPkypcqpRFBAcxIYWs3vTR50fEtvnqdcUo/dUXwei
+bTydGiJ4PFIOWjex8NM77ddunuIT3rfm5Wc23BHly1Kmmj152czh1j2qUpWYqJEq
+vL10rcCedpLOreZEjlnPpzu3bt2Pe9pIbbhG5VdskX49R4c9PrbZr3tVMdOn17de
+nw+aNedrTuVI+Pjo67O359n1jijiSSJ9jstJAwAWh6D6ObOekTEOeh3nAr2g7ynr
+8xXTOMYFcwj5xiIpx8cwczh8LfyjzhSPBt74x6zvdzHlySLo8nCSRsk0eS6TRbxm
+Z3wnmxmnHMkNhygxjtJKwkU83mOviqqNjty5d4e44KmUaw855t7i6cPI8nbp5Sqj
+jbpFk2djdy3yk88pG+mJSHbOXfhw58IK24kkSC+DzcXXnNW612O4HXcPOwd+O0Fl
+8PvuZjsCx5376uzwIG+WIPHLtDGueXTEg7dMzfR0JnnGHYm9idAqLLCyKsqxZVXx
+lbdLKpppSUky2SmfGld42pFyh9d+861rCugePr6r6xOggdtdPr4hx457uTlQ/lju
+vcrnltjnbtqu9rUk6cL7e+9cX1mt71d5mJrs2PD2zySR16d72kTx67dPB2rKOy76
+78XpyWhUp8dXq0t/AX04768zWa18ejz5cuUnls27TZy4O2rxRtxcg11S6cfNoYO+
++madlcs6drb67VY8K3zSk4YqtLvupO/Da6JNXUsg3mJLapKtWFixTMIxiMYqYxW1
+DMkpmVKMqXrbSzMt9/sqIqP+t/93+I/0n5Sn7T+QT8zf0X7f+TD+B4CttqUP4hlE
+RRRTARIfupD+YUw/Q0KfxO/YVFVv5cOFw/8J24f+hMf6Mf+DF/3MXL//P7Nv+9/D
+R8PD7NE/L5Y0/73/Q5TalV9v/fbLbfTY6Wd/hbKsn7vhvhcttfh9p/Rx9F7ThpoO
+zo/of+imn7jnrLbavsef4r/UcA+RPuf3Q+f9UqkU/8ap/+MFIjMqlZkqslsVZsrV
+JUlRZLa2yy2qaRaWWqRTKzaZooGCAwg+x/nV+FYg+fi2+gz8s/Z89W73ufUfZfMZ
+rG5jSeX2+tXiLy5tM25ZFqjVUHVXHVO7t3Rjfk7WWV5Xd3zfCC7d74/Bsvzb8BBp
+uu3U3zvXOnzxjyszB3F1Lpzy88Auvjt8OJfX88hg8tvPa23zrze8IBCEkACBACSe
+svoy46IiKqqiKiKrmbpczNUAkJJCTVerLbqur773rXpy1c6c7tea+Z7XygAnXQEQ
+RJmCo+i1VHsgGMnt6oTG4h52C6u8SvLrMP/waB4Bwc2A8sBaDwhBB/o7aeobMefe
+uPi73vZt7rVet2rb0T0fQ/9rykNCbO/hd3LcnNv0nxbJpOOM9dbX3aauDKzP4RVk
+8gGChiP3tin+2Ko0zGvv8rm997r3xV1pt67QJwiEFqEG2tbkdFH93DBwDjIPBfPi
+1V5aFeIAHWiKoxX7fYcN7XsJzs2YByCqCB9JkFUVQVTA6PRvzz5effmf8/OC9PMp
+C+ZtzACFV1K3GMDvG5p00Ri2rRwdRGfGJGZluZmRrhVWSvlPXhbVm0jUeerZfHWX
+OyPb4dvG7fq7d2YuV64ePXrvx6mb41zvjnrfDiqrwFcQ9VbJCMKmIWYsyFKsKZAp
+mGYZYsykKYZSrJYGZBVZVDChZKsAxJMKFRiFQZVKxBZKLJJhJTbbapSlmzRec3cV
+XShD4BDzmq1wkRIYPpUFVy20DjqcYA1wAOHwq+O9r3vWre0sCbAG9xdKyeSrfivb
+QO34ZArRrbCmGhJ6LPbla+t+POc5nw7qzbdSzdq7p0eJSUbVXZtq6NOrQouWy7TR
+Es2HZNRu1Stu7Ysi26gMq7VS751zzvXPF5506HQJCRi6HLltz9uN8Xm7zDLmXMwz
+p7a33LluY0zKuVZCe1T/O/Vl8LrrrqrrpOIUG2dJip/z1f+mv/K98HqwOlWunXPV
+64nVSTpZbdoyVil8PHTcq/c4iSP+Kkth+WA/sxSm2JD/tMfEf8rSNT+n1kfxMmZY
+y5UmMVMVJ8ZbwcyYSf/ThUxkMMoOz+R2qaP6HTarlv9RaiqxhI8PDkHT+8nW3ZOm
+t1jbpR/acHDtXbA6Tww1EzKi2KTySO7N2ZTCkq7jYh702RpxAodJwef/IaXmsXK/
+lMbLbeD/FpyuGQfEv6LSrGVZhmSxSSgoikttRbLU9uW0NrwxmKrwfsj9zZ07ekki
+Ej2irVcqtMxjTEjVXdf6P9p/KOcsyr/syrMkfUEhI+3yT4fG7atVVren4qxU6V/T
+taOFf5Mj/xYPqwPYq8bLlYHT7x9X86t2frOsP+5UnmbJUjANvKTCvZwkj4T2/Xbt
+J9f3uJLlxpGGJJwQ+9LUNxUfu/pLKj7vl9RwfBGH822fqJ8ukk8mkR2V7eCdNCih
+4rqR/FLZ4nb6xyNCn1IfeRyyRO0OnsT1CDQ+jZX2q4iaXcThcJadGG5K+NMY2w4X
+V16pdJLb4bb6ykpDJjVVSiyDx2/Ppatf7fHfqTzbxrUmrdbU+rGg1FD5mI/V8tSf
+V8o1D9E2nlH/Sfrsr/yHD/OP4SeoUU/V+sYwlSp/5mPQ/3D64aVkKRGlSewWP9VC
+GFgUGZCQwsROn6CqH9BPpvLYlK20kmjUqRVZgh9aaGzdo/4oxbVDFP9/xGOTxP+x
+g6H8uhV0ykMME8OXjcocLSqeqxYyhl2P6/5Hp5nNLf8IonRUqUNjY/DbO5llxWJF
+SKUSsy3EiYhPJ+cGHd98MzE64M+DAkD4YiKRisRkTDMpmR+sxk9icopWw4WnC1/0
+5aVMf79WMpaf9tje5Pm9MTeot7xUVJUoSR1ibG8TG+mE9pDBpFKsllWe3HKtI8x6
+SfEmFttpJpEsCWDSlS/NdtwJ44ls8MVRi1bmLU08xzI4bQf8lyf3o/X58cfuZXke
+jA9K/Wkv/oCpOX8AoptO3imxpWsWZVKaPlFYOn5ekY1bMWGWYopWjCWGKaLTIGkP
+wFSZp1BRTc+o1ds/D/mY0uThaKlVSilOHlj2XFcG5JxLZUjayIhAAACEhJTX703r
+bKxG0kYoRihhijZMYwxZWGEbWSBqVDlZMpZTZStskllbfWleql5taVJKGgnkxRrC
+VSqptInylG2SrIwx+wwoppFCiU2sGh/NQbbQhTFWSmMltqpy9NIxK+lX6Y+UYTIb
+ZDzMDN6G/c8HjdYsVEVWSZxbtU0dN3q1u3bFRfC4kqOpVSPLo0pZSIiQOFnZ0d4q
+sQkz4Qqa1DlekfEJApicdLA4a9OMxhyvFegkCmuM2yHU5NScI25iY4U24jHLltts
+7StNCk4frJzwu0Y6VjDDFk5RppNKqlRASOcpVq3MyVYiVt25mTCT+oTRDRPR2CKq
+KWrVqlUrlqaNSrjDopxKbp6upXldb1PU9s4hJGJA1VbLTiRJ7eok2sM+UHLbthMQ
+UFfLLbZVqqyVK+p1Equ3tpthzYl7KWLEMTEq4Ll3YoV5stLbid+m7alklmvcxMyY
+aGFGVGL1wYwx7R6xjFy7cn0pouDotHyZkzo/hptTZOkPyO1emWMxhjZLl04IdDYK
+mkh1kK4y2TMxcjHDmvtbZMWE+zDHXCnuD8yQLIjg4UlcKxjHr9gopzYxfuda1rEs
+eHCK6OCQ6xT4Pju3n5/X9kkiEj6cN+/vl+uaZ5gYN/g5JlAUHSDiUhoOAhwMFMVB
+c3DDHMN3DFulS0xrgWmW4W5cMuZhWta1rW21tbbRzrJVtBe+ulvYM/s8dPjcuY66
+qqqisgnSPat2gVwbVEysKVgXdk1QJsk8RJCBD2v8tenlrnM3edFeqa8Zu7mq1raU
+mEZP6xTGt6zMkdvq9uZwdp7PTR2nSvKidMcnTDZCbRQfLpsjVtrN222z1LI9jbbS
+Yde7dtk6DgycBMmW9OTcaTFMfB8NtuYiTvVscobNGKRo6Wb4zDniY3e2mSmsjJQJ
+4EQ2vqQkRVGM8qYh3v0q2rPteqmFz2k1KQNMUOrLk2hBsGYs7NRoFGZ5rKHrKVFW
+Up3oJ4GS+bM2pvedTh2+z59qcemFaIM+lnMKY/XLM2leOJtTiZEVfbeon1+vwZOB
+hQgviaCMyAjYhRqyLmywXa6sJtAjY0ekbBVdHErI5ucHJgQ4jsRIimS+VhHvLz2P
+o9PoKp4fLy9uDHljDyKyG7cVtjlTlwPJ2wD56Xk02ttipijbGTs6TRK6R26babRK
+3K25I5U6OTolR0fLt24J9HaeVeHM4svhpuNNlYp5eDRNLKaWrGQiqmZbs0Tlo8Bp
+tppto4ThGn0cT6OnAeX+R8K25e3KOzaUpVttKUnlUhZWFTasOmERzfpmb6O47lt3
+Whna6EmiB7nAKT0eA/sERTa2uhyCini85zJ/DpU/B/+m3fJ/wH9Y9AkiPcclOX2Y
+n/g2elK/4y2ikYKwUzMZcuJVFe362bbaGluwykCmE8ysyzLFrmryuvj1Xz/S9/AA
+AF15cn4TbNPgsRs7cOFV/dG3g0p+7T5dL60/tdkgpyzk/3v8imkP80cFiv6KUxX9
+LGz9Vfy9n0NI+HBMGjFPGRfU20/oK/wT+7+V6CiR4ktktkvJP6O5j9KtpUGP1T4k
+kf+7GZWMJ/d/NKP8Ksq/q7hRyh+q/vOT/iN1f/NGJt/f9yWf5H9z+wKWITjGZjP2
+GmInSyTkRo2qVStSThT8HxX8MximI2dIqo04dIbQvxbWO2MVGkVTxHSI0R/h0eev
+LpWSyT2p9GP8P1y2m2c1q8325VIvE485eDI9AlOHKGBw4JhDiv5HUmnSO00Q40Je
+rcSSy5GXLGVUp2n0eDpFE6T4Y/r+er5YqJai+n4MphhmLSwD8QKQoGSRJ/o+6YvW
+aSVmfLS2qpnMM9WmHTRzMJxy0qHVaVETOYZ1ScEwOJ9g0NPAmjGk0rStNtsbQ5MG
+2BivKYNI9Fvbiqv8b+qqdv6PL9GI+O0lco7fpI4cEi8XLlw2kn5YnpWFTwgTabky
+liH7Ax+fy+323r5BIEhez17ddXMxVVQFUOdlCkEiQJigNAR9MV9a+Xx16vk7dzgH
+lDoGcCQ74xnfnz3rzzvXO4dlaYNK5NOUkh4fqSweoaJidvSK2eXFtkPPEfCh9Gkm
+XRyk9PzmZVzMqjDGleXlHlJE5ZMZSrZt/Vu5MHK/2HZNP2ivmSPQ/6qw/Hu3mR+n
+CmQgJH8fUlH/NlVMZjKHCWNsfyX3+p/53h/1MZA1UFrEx/2ManCu/BiYs5NIwfyV
+9hsjSn/V9nhY5PhjI7Ullm1JVllLfJtZNrGVSVH0hBWtW0eniUKWCpQplb1tteSG
+W0qTK02llaKdJIwk+rhGI29xHeDU7WszdtKrDKsoRP1Geg1MyhiYmBApJgHZ+sFf
+yDkcXDK/ydg+VJSP5sSdLVsKtSHjkwmzZhbIuvbvTXnHN1BiMYylZk7k/LKCYDYH
+X13JBDq8YZURZWoixpkaIyJuN7+dTwztXv57+nThHDDHBkYhVKpPSK0UGMMYTbsK
+VqDzx4I8qh0+G90AAla9VKVWaW0s7IZmGGCsGJhhSnC6DSPacu07EkRI5jWcLUjw
+/d2+p5LbfLw/ft4tspaVjDMYWjCpQqLBUhDSjgT+k9T8hNA7KVTkkn2GnDBRs4gq
+HgJXCnB8vaJ5e0/l/WLbZbFLFUpVRJECIT7iSv69sHJkTAi1mJkzExpMsxUqaYaU
+miWTRpNtI5UcttEXFPVdQaiwV/wNOFTaFSaL45y+41lrMYcvR0CijhslcNI/0x5X
+Yo0kXy7cq/RMSNtOU8qn+U1IPp+mXMmZbhJ0PZ5BISOpVSySG3jR/pLeKmXKxwbv
+w08D+N6WzGTJkSeyhTax4Km0mkp+2qVI0rFU2n8SvhDnkx7T+ba3mQuaiT5PhZj/
+BPIPTKvh1If7V05H+Z/nVSKcn+SK/2dX9F/Uvj+tYktW6Y9SJs9U8H2+uGZNORKn
+w6+2/Cqtq2vpfTblsuXEmsGzllqypVLFYDCVIQ9J3NuEfwGnxGlfyMeYjQf6WRG+
+x+JPz9kl/QyP6sMY0xZf5xV/I/U5f+p6o7h0sRjp934eHA9K9T3ZcSNLGkno0CQk
+YVp8JT0vFuFfq7kInwp9TyTE+k95/GX6qj9zhqP1y390T8OTsAJxZv0pBjS09ndu
+/queeVeI9GunPNTJtIrybqni5552x0a9g4GMHRBAAhHYgg4OGOTGIx0md24x2cp1
+ws56tnBhyqW7W22GlI2+w+z4NJHpLENNvsSMmLVcLMVj9GSBNLTXNtfwxi4U4bKw
+MhtuWyY+2mWYp5ttKqpA6paj8vKRxEawvhY0NIfgfiH9z+yajt60n97P+eZ9rS0x
+W0+VV/0sP8sevxzxZkupTbH8sPl/D6tcrSqnhp05PlHCOok2cFqHB+kTvuQ+xWMY
+xjkg4SNqTWUt19K/fat9iuFW5XN8JyNMVvGVP7r82PqvjL7jtfwP8yYr+QqSfsJ/
+jvt2zClUVYzM/e1n9tRN7Zd5buwMVVKqRKoVR2YxVWrU0/hHBU0sekk5eWPDSfeZ
+dQOaqRT0r4rFtLHeZaEkiKs8vN+vcjw/CGRlxRVkq1SPDFexPt0FOvhPFuY6Tbab
+lve6MycQ4l0tzYO2m5eZhoWcZUOk7NTTLtwdLblt25Jy6YaTDpixoPYKKYtMSx4V
+/I+Nn+ZdTDBNJM+LfQOkttkfVOk7faSBw+y2ei5ZhaxgYP9nmnNi2FstI8cfri5j
+4bHPFumZbbbybHMpMg5WROgw+Q29S8lhiiGULhSjSdtjNpsyIlsyhYqxbcJrYw+o
+k8CH6HRjSvDSMVFQqqko0xiIclqrGrAw0hpi/ouV/i2foVy/oK1INsn/LKzEnZt0
+0/TfY/WWsZMkwqJFKpVKpSGE5kJD5cnT5T6BPRj2k+rIH3fSdvy2kEdD9W0T4tsh
++40PbR+xRPpJN8azaR9OJJrfGcJHGHBw2OTGMmHPduPz+ryTH3/TGTMY0bTThPa/
+xbhjyxUTFkr8JJwYmivf1xmZJq2ySlSoJPBIfK/rASBSF+cM/nZk213bMmBX5laT
+Tg0VqrbakxFiRzCeLg1rQx4xf2Vq/pUjo01d0k/Vy7frMy3JIUqSKj8lG44ZP1xk
+y5bcTEsHL9YMZLGF+0n1bjZ+MHj6OXau8pg6GVof9Cv/Y9BbWvn632UMYJoMElJr
+W1JQhbfu5MliIQxxyxlFWYJJSo/lsdkj/9Utg244/f72xHsUqlRVMGPuJWipOBhj
+qEkxqGNgop68j+4/mhRTtlWMEwwuUKKdDCxGGldP8X8NFUz85NW01rD7NpifMq2W
+o7dpQsUxivU9S0/zYuHDin8gytmwSEj4WYqVwrKqFn2kfvYWyx06X1X93T+Vj5iv
+X+C0fH6nAMNqMKFVXg8nuEYKKk2Rtat7V7zXsSJCUSSRT1tPuvGtNOFnGGB1Pnt/
+MW1VDT4EQ56UUWLFFBZqjHB69cXANNLJbE0k2zdlNHR0OU056txtowmLOO1WSsa6
+mpA1B7TlxdF+0uvItZVay3b0whrGdccXinUpEidgaTHSdubVUqqtqqabViKw14Em
+JmDeVXXLyvKySljtLGMq1t/wTEMgWhujLDJRJgxkJlQy5UMlB40srBFeLlq7bpq9
+ptq0rbSxohSrCmSRMyzLLLMSFMMqVksswFVkqTKplkqwklGCsCyqplQsWLGMZZmT
+JwN3COMLWLVtt2fFUij5Hs/SR03sfZ5nglZWZjJSqn822RTBpyxvWHlVKjTbGVtS
+KqskrbRpKaRWKlUqSk4VwY4cYMNTGkW1bk5Mk2jbg0RUmojT0wxxKQVYhbbLZbFB
+oqok2slvxSlrqul/g7aXHwxix/68Toof7qkpOaD4wC2yq1EwXZiapV6/hsyJvBiy
+EnDHppUrseSqqll+rGDc5R6WrvWH+G9by3kboLdJKq9H7sVW0OfMc6vWl01qZLMZ
+GXXa6QEItcit7KxXTeedbF5N5WV5LJkt1ZLKLEMplYlj+iTA1EdNMJwtIUTETRhJ
+/Shi7iTFIxhiMSWYFgxhilFclagZLPw+zk+h+o0bMSmKxOFfTOrm2TbWXbWV6uG2
+zX+jEamLH9lX+6Yr/YLxH1w5c28qRqX++P6v9czJ/Bpq0wP7uyQ7eB+Vf7n/N/A4
+I+n6Oyqaf8ybStl8Wgvg5aMWKcsqRmLCpH+JHY7+o/ZUcf8bQ0syoa0yWdpVOGka
+ZNpjvIUVJ+ZH6qhX3fZFanSyHdkYpGWGxtjGKcNMNKwlSpDgp8KdD2cj9bMv9zY2
+4SHDkmkf2xkDCf6LKQfCpoFaOJ9BoH5TDi2/9rCRhPqSKlR9EcmpFLro0rH4U5fo
+dOMs3lzLMZaKYNommiU6RuIh0nD/kT7lH58Cz8XLMuKhGo2V06T/Rhf9p9apP5P0
+/xq2rWqv1erT/PLMqx/K0O2Dg/csyqf8VH92myX+Z8BRTxbZHaYmgsP/J9QmCR+7
+y/0+qv0fCnyiPJSHCaH4SEiYfT7Hsxa06QsXGmMqTClIxIpRFUn8jGqv7oxG3iH0
+WUiCZpN8b6/n1+1fkq7ffeV5XQXGJARn3MyZKRCosJhcTJSYUEP9MYaSlQxKRSo4
+T/usWhVI0Ps/HwzGMyRhR1q2WLastVljMZmYxjw3K6VX+qMduROGGFymqf4nekcJ
+jClisYLIPl8mk0rZwHtB+viyyk+VPL1HuRApl/cZMDw+MZfZt7Tx7LCpLZS/LK6S
+W2SkqS0scvTSTnLcGk28PRKVpMSUr4PizlmNNE8YGrZq/51JSfi7Ts2T+5Tuf5cL
+UaX6LUnQaR5PlE+ZyTiUqVaOZTHx9XDIqqOjpwldJmO7TbfS5VtUwninQ/6Jhf1N
+p/3sSnS7Y/q9Btj4/60tF5xmT9MwRXPy8PM4fiKUOh/FVVREYiiQhAhEa3qu3nv2
+d7+q9S8O8rb0Bs06WlE0arExG4ZViJk4YG2Gl1NmRsyoMpaZV7PclFEkhkSN7T1+
+jx5uV62pGsk5ajBRIogIzWpucxals3vLLZmGWmKYUqcpZRpGE2OC4rasjHDE4E3a
+VkxkzLZJSckySoFD8JNDSmOGxNtM2uJgwFUYSjFFUqlFGExq2zQorAowoxy2rlV/
+wdJPWk8RjHBV2lsFjhYX+gysyZkxh0f3RhVg/4UcJ6TuScH1VPy29yH5DloLCqpU
+qInySSwxRKrl+50K0qqo24TykjydiqiUngn5KlPjr2zMmZmZlXDMt/QmnwPDD7q8
+JHcLH4WjVHYxiwsKx8JjVH90Yz02rRwptHkY4fT6Ksmn8HZHweLk7kPRGKpyh/eq
+bPRt8Jw9H0f9riJN29Ik05PjeYzM7a+qenD4QbH4OfJwfZMB9ytJtyhXEiMJiVNH
+cUPwV4H6o7H3fBXSflFn+Sn3kdp9U/HhSqjtSP/YlJJT9D1KWFG1D7Gn2HR9iD60
+4ZhiiTUjaPujNmxMUhRQMUxVYpiKFSJkVJXJrRuOpD+nmZJ/LmR07HlWk3VZMyK/
+m/D6vP7Ztqy2BISPUCQkdu9bzXnqeuj9E79X9hjUSttuMzBuJcLcpmDmXFzLmW0a
+Nra22stGjRo3xd71/j7CrbuqNuCV+Pn7RiTiM9JJIEgAeHxJdEfM80MFtPnBMxsr
+AgcxJUHBQgNneHDhd46b0pvHTJccMlKYUIk+5RcOXp7Ryfl0Nnc0n5iTGzpiTkxo
+FCf/H09mHBodkFJS2Z2cs427TqZEjg2XKgms0uWP9EwnyRTKCH4BWvY2oHETm/gw
+zIiIJE4SQGl2Ck88xdoqynSIaAsnIZAHItqcqEkc5usa5371h9/ghm6wvaD++Ev8
+O9O1aUzFPwkL4FbXvIfOvp571rp7GmKUGlYdK/70n+m237Stjy2V0w2w6YfZFPh9
+Hg06PAx0ppwTTGGySp/LydK8/p8z7d2Zmabu+zmXHZJtVDh9axBEEQczHKc39VaV
+T4x8bLS/TE/iYRwjwdM0rY+rUH8HTgw/pHI4Jporpt5nzbKmLJH82WyJNK5mnJ4D
+eABtlKSyi0srSV+jHaGkaf0oL5Xqr49f2cO3KPHdVlOlxT2Lbotv5H7Pq5pfnuZz
+/dmMfvq7Hqnxosaf5U5j9bbH6/WKPbcO7bK+EPh5IfmR4cj2lOqW0RIh+qOFlpQ4
+QPJP14ba1ay0a5WMszhMV5f9J609T6PlI9nB/Z+ltJpZfELlyFYfUpiTUrTJy1Ra
+mlkyy1arGFKjH1SmRptiNFKlHlOxTypVNuJAVJ4ErlpVbYWdnGukOx25SUDvhmkJ
+SKvuGWZYZZExglQqFSfb9gSRHe26lLJVfZjBJ/oiPHr3rq/pJEQkegQkCw6m6pxf
+vmXePsQvn9xLQI6KSRQIAG3bEGfh7NUKcK53UPq8OHUkcacJyvTMdOk6aVZtbeXD
+JrDQwQRBjBWHXQ31cy5mBlRZ6IYlcEmEU04Y4cGEw43ZacPubU5VthDlicPuw5tq
+27YxgrGOOrbLbUDHk2YqK5Y+iuHLp5DT4+JNH2/Z8HtbEa9pifS5hRZbRbRJLmJk
+tJK4MBO+IfGu7xq/hYNWnTpGnT2zPJAB7pIdsgDnjwae+mHsZcy3KXSR8U8MMHx3
+67L6cwtaVLbW0oONWeD2UwAhlkYAd9PyGVl2b951gXi5PVcb8QkPLMTq0gBWTz4K
+b75X2bmGXKOkz4+PNebXzvhX0lvnW92FLBBb7Y5NtIVito4Viq+U3q3G5KxpPY05
+fL8uNtqqVHwkaYHg7TTw5Y28GPVWo6bO3c2dGOmk5G3CG38p48S6HjlsNF2N5UG3
+rhMMNpgtTb7iCOst5UUraeXaRgqdGFNmIlmjFNDbT2JT0+HDbb6fWUsvKq43XF85
+mSaaDRzytq8wj6ofRCj5SpbawpLGJ941qyZFjLKFSaYxiaJLLaQhJJAkhvLrtqoC
+ttttq21FiQaI9vwrDxA5e0qy21HycDgaRwSPs8Q8LbbbaEEqJAA+29r5V87e9va2
+19Eb4CSiIivrXz3xYwYxlsMdqma+mXMuMrKWCsMVUFYvUsRaVppRgxw1JXOMb3mL
+yozTBtdtNjDDApBMAoSHCRowphkwjDBucNtDaRKMMYKomhyNY0ck0nxv7WzTGIgK
+aWfqbVi/VMlGxYTH9BkkfLWrfruDbbbdSUqaY2JUcG9pYR+O0/p+5jB/JZUMKxWI
+qpUVIKVEVQxZMcum5tZISSZskAD4W+H59LNJklKlfGlrqabJQptdXKqVKsqlUqOA
+aRSiVP6PeBAlSQJCTLBC22236NPq6ejHcSd2rZE7YfVPKyfUT4b7fr8WyefXfb6N
+MyWzwG2mEp4bur6pan33d8BXGubpOl5ed4jcsltUaNEoRiM8GkA0MS2li5l+V2vw
+4XIm74fHps8HR/jS/q+HQ8pSv0K84J8+flIn1SJ6+UsU+C0c9Aop1HStKsYGMDKx
+VVbVX8PI4Q6YTdhxS2Nirbpbf9Rt6er8OQx00quK/pxvKLQgCMAPno3LmmAsuG5c
+3ARCCJ9nkfLTE07UWQ+xE4dfZtP3VPs7YjtMjphyP+UhGz0R9z8FYVLWVdq/Htqr
+8qLbe2t9wr6vumCB9f/1f4sdo/2GBgKKf9A+qrofyy5yaOmGMYh/zf7gpXixGz8L
++5/xfK/0YL8tv7GR+gqTsvxJ9Ht9VkkLIxYsKqMPDNH2Sv8q0SrVcBPlIf3fwNJ/
+tUtJJygp7lJ+qPdeOJP8PnGm0/cbR/Cu1iq/DodIqyKlElfh9ROO50qsVPQ/KWck
+mmleZE/KwjD935YnpOIH6pJJkrJ2Ojg/KkmBVi22RUNKkxWowxU7iMnlaqlgNpJ8
+pj7iYnkVUWTvh03PCvJ5UwWAO+/U+8rwtQ/m/pYcu7dSLkkqlUIKb4AdxPxWQX6d
+K8cR/srlNn5QkJHSlU6YlWNKsqyjRa1ZMrLLMYBj6NRJ0TlhNqV6ntwbHC0tcGIM
+SikWx6q/J86IAjICaXDPuClJRcO8kmItQriaGCUlFzXDGSLiFQTqmfrNOzl03Ole
+IMWrYKKbCrtOGYDoM00bf+1W6hV/xyoRH9H1kIxEKqEqwhOh0fbf3XzNt1ZIaQ/Z
+Tcp8CVPCpx/rV4xb9LJRO2FfAhRPU75RFAhEnDwrLCvgVkHFpWj6sNJo0rweXtOp
+yT+x5Tl0wTwqLD3pVXSJ+5+RtPl5TqEhVD+w7piTk2lwGKf1bfq5W39Vr75V8q/9
+/wWTBGo2g0WqS2itFWqKtY1WosWrRVYrUaxWiqxasa220FtqxFVbQaNUaotGxFsb
+axtbSaLbG2tYrRrVGoitRVEa2iitFFbRqi2xWxVtitrFaqNrRbGrVFWsVtrFqoBZ
+kqzAMyJmCrMpSsxarGraooi2o1WxaqxYkirFkFgSQP+X9/8v5ZP6G0/tc4bk13k3
+JrvDkTm8Quc3Qw/xo2mMqVokQel047gDu6KK9vXSItvS8kwSVIXbC5SCkWVJiFZg
+hUtoVKxalLbdMKjlWErKlStSeOmTUeNgu7o2dzriub3bxvGBNRCbu64Y4kT37cPB
+IVhFJFkUhs5l65OBc/xyiJn9pvMTp04GA55Yats2p3krH/20yE1IIqJ4GE72HU7u
+YYM8Ubq87w0emUBOg4KzHejc5vnlBVjwWj2JDp78uxUmIZjGSSXv2+C+Vk2buCu5
+waLzxxtCqTeYuYkzGRiwWkxWMbuiWxbDiVZW3Hey4sc9aW7DLDfXXvBO8UcMOrE6
+ZHKIJJkSMuZM51ZhDeUpVpMillJZpvURzSaUu8TxmWyQ4sN1HLGJuVCyo1rGYzbr
+G6nipyrXO7Z7vS43pcWFeb5bU4saY8yVux4640jFLmIWjVTaVtUu6xHFmprC7jGK
+0oY3kblGmTI1k3ubEQo4klMaSc87iGrnc67p0dLLSaMM8WbgykoqxHuhUIiSVgcN
+s4ReusZ2W9pwcOl7l6OFfAh11ZNRZnWh576MW2q1bFKxVnLe+3xhp5sO/llybe2u
+6vZwQiJ63JuaKKNCGBLFFoua715rvMY1dJZyLBbrOZ5XV5qeIKQWC7JDCltJRnjc
+MWVKILJ3QpiLVSjwUMweGw6NEzJrF1i1Fr4tLGZjFiWmbSyagjBTJHzlDjD4ecQ6
+82snBkEBIfIt4B0kgWTyUekmpzCiQ5yh1wM4G8SeOG+NNwKdjDrIdZ3nnxc5azJS
+gWIWMigBFTrbdrcC3d1FulyStyYtcJGJReZlFmTVNTS4yPGPG6m4mU4UpUnHfhrr
+wWZWNdRvxxpo63XA16Gk8d9EE0Xhw0MmKiDFJNWV25mGqnfPHiSZDmy0tLVotC9m
+E3s7B8efHiO2NasFiqCyLUrMVTLjOkidBUijvl11NMuFdid4Pnq556pj0CZeWiKi
+RE4EFhe7nIB0MWSoVFVEKlEgdTKChKRIxmMBSnnMiG9dA90RI90p4oXnQyoVOzwO
+XmFFm7kU1EJfOeLl7pwCnXR2AkONIgVXEixG8HO3zk2uUXZ4KDRPGOMQcFigu6MB
+AynwUr5tMSp4Zm3S97lkYwrKbmYdS7N0thbaW8cMcuPGm2iNlkxeVSsrDdwwNvjm
+OMsQWV0bYCzEe/EuduWNOYe4t4neTnLWQ7yaysyt7Nq5jW3w84tro7rFbxrm3ROc
+yItTKia31oMVVVzMmKibuKkZYOb3Z3UnBYN1JxUtiasqwcnVw0qRd45sTvWJOrIZ
+cp3W8pbyud6rMm8TWW/KOlHvrjW2vNJMEmW6wk8+aSBDqHZe3wLGK4+WYxQYao+a
+FMLu3Zia4DJiYsHLW8vWVSaquNQVVUQ7dSGGWs7cgmMXdseVDzwzwgEvmRsCB5fB
+QVQXq0Zj5wJrB6UFaTgUTjAXmHe6AjIdsFIpFIYZ5zPJpMFN97axjrOebjescSIe
+OlxIjJYuYzMCWWMVihKxiTtW+9a1edTMrhldTnO8F0E1nhOr4yVONeDjTro3vk4e
+VFXbfM/6MUFZJlNZZ+RMiADvEl+AAvwQB3/wP//fyr////pgQg94DwHe94+e89AU
+H2NBDuwvr6eX3b72JJyiefd58+Vd8GQIqkiC6wJSbBm5uQAAAKq7u5JKoSaaqQKQ
+l21VBRUlVJEKkqkqklKlVSiCooVFg+BcYAA+7T5I+gBL4hzdzp5AMgOtGq4ADa13
+bYpbuB97AXvu0OR1329gffKPus6EiQIGhBMJE8hNE02U9Q0NDQGhp+qYgkgCIklT
+0IaaZADQAAAAAAaeiIiUn6JqJgaI2hNGAA0Bk9QAmgk9VJJEyZJ6npNlNNBoZoTC
+NDaTRkD1BiBEiAiKRKekw0mIBpo0aMTQZMjI00YIkiARpomQhkE1EfqnqNA02oAA
+Bo53OJuRwkNrkuMUJOhNQiCKMocWFChEEQrUGVTGgg0sMW2bqgkJBgahUxttdb03
+1poJEQAhSSeqS4RwucrgpgGDRopQUVIkNExkDQSGATIZGCmTCKIkUjZJZESZSaMx
+BmaRQQFlNGJKRIQihnBz6Pqb1dXa7ucrjgmcuCGgbYNpgK8AKEFIr8o4gKQFwMGj
+vveHmstx7CuEmmgYnRQhB3iu/mzlcrWdLQASIoDpmY0D1WpCxNppg6VoTStS8btY
+ssBpPUaC7k8vu+aXzwycRqJj4XNyCaEL8W6PxaWpQ2NtCG2kMTE6TpoDCHUaLpoa
+W1Dm0upHlZaDritXaTgmhQQNtsojjagMpMIthjtQ0xZUttPCv+T0I+nD/mkZQ8ZD
+zjB4ZdHI+/AJQaEvDFvWEt9eecKhyJv73XRVYff5934ryHcPuxRvk/OTX8AQBAXI
+YIooDEBEg2yTSZqtrWliJNFtWstQg22mzaljNU2WpmzNipNtVbdVtq9Gq1bKqplA
+FijAQQWAEEEFi/vVAFgAq0IILEWRBPH+qAgv4VAEvYexHwNTvPzKQKnq9pQt7ith
+SFQE3KoT92BcQS5rF1INoi0BQOEBIieUUBAgVIw0feYQlJIxilA5IyloT2iIDEdI
+qoG946hlU0gdFhujgx6GOFTZJSSpDwQuVTcllZOqH4ZyZC0BlmkC4cCwsYRI2uGk
+ouXauJiysgW2UY5iFJOlmzOCGH4iZGZYXJxDLdJ5I+okgLjdFcGyxGcTuXzC2QNL
+MmgZDlHJwpxaWwzw0jjTdXZYSK7Qr5tMVE1KLGpqexpkXBFICAcNsKQUZzMFIgVm
+knN2YKiGSuBbRzatIQgm+KaQZAS8uDHTnWrudlkM5iRrvStxKFwKKVWkrxS0Gc5b
+46jB4beDQDNZhiAYwuRpE1mlIxJctXj6hyy5cxgiVA40kzeEpxsaUJjkvd5gjFhh
+XMuSAhJw0YIxgxczl8mAJ0klHCWrkkchWY7a9j4Nu7SQ0sThJQxDvI40wEU4mYE8
+5vWPNKDdBTZq8WAka53apCRSSNpCqgUBIEqkKIRCCLDdFlqlxAohLqDOd5oy51ju
+LwUEYBLpqiqzTi6CEFgheJY6jhnYUa1qiwwzdN4qAkZJTTMxtG2YbaURoLQYUs8E
+LNMt81O4S4MhIrqC8Y2RJqiBikskgX1Ls0fwJ4OCaGBlINkgmKE6hXECwCkyUOuw
+dQqIBJJNGXYw2m6AgaYHhuJJJCxy4jkmrBKJZbYWNXa3ElQyVBKsZAmKeWFLmqL/
+aqWV6VDzrw/jTfYq6/bw8pT5+4NHZ5DpJIDo3mpeN6SJGMka7izeeoko43C2Epfp
+g4TpoXY3puxOTFNpHLlJkTMJ/cig8exbJ4wXM1wqI/cnSPX4zRN3hNeGDNBlDPCc
+RjKdSlEXMcLYVo5zrESzdhn5oQgF7Vy7d/xXre3+0a929Re2659oOIpGmnWprpit
+uWOpOh/bvzdU3UXeNVH5d/XiT9umGfzpTP5/9FU8nQ2l+WGPykDtzW8+x9V9eEZL
+xXZrntkuw70ekWyrvMhHrucZm9KfynpN9pZTE+0MTHTPffeZ6Ne/Z488WceGj41e
+xPJ4/IOaZmtZu7us13BA3KgkZGgZhXkEnmKKSCdMrtunVFC2hCzVzNmb4pa9MrfR
+5L368R+A5cTbzcuFIBItqqa9ZJWrv440HQdtONRRNMqQLRvCoXjJsHsNjp3oqjTU
+nuUk+tSSqY06SBeONJjOPZlitBWP2Y/a4myrWhja8Y48ITl3w70cPAUvOLu3N73x
+oNCWxRXKJMZBOcsIiYNsbb6IqgA1MYWCyzFLX46tyDIsrZmBdV11KBpmbcG2jSmW
+klZqbJwQmXHcfS+kqBbvzhoFYwQVevOaUWDtMkiQ4OL3wfiGhdLDJF2oWKWCGRKi
+hQlR9vBWB8QPr7h+/XlnwgBkZ6IHoruquvYHPb3d2c9Vu1qFs4DoTfPOZy5eaTfG
+EbeW2TVkZWcjbLyy5fXm3YKb4ufb/wb81JfR8qaTCaWBkN5OAgOisFhTR2+eXXkc
+3pGtx5da9R7O60uzr4vD1ctQeFni4kxCBF61C2yR4amYWm6emxGhMsrBSNygglLJ
+ju41nhlzS1oTvHIJ3iKAtp6aslyLp2Xz4u2mDjOOFZxL3c45xPx8u1djCMsttzHL
+vlwW7OA48Dxvhzz0vTvl3lSnfgXC1bTvQOQPN9u0GMqUZDiUu+0SqNTncw4JrOJd
+C5ae2h229JhHJcsamPYtGY2nqSYKK7ZkCWcOaeo6wnA5uE6UmOicOKSlx01thtO2
+U5RWOvTw6+Fysmd8Kd83F6zpjTvnstmbnM78jhR6FmzlfenLa9NuMaGgsxrWUpGv
+xczOq5bXKtNQPDHEHk5QkHLA7Ei3HDC6vuGTk25mxRUpKKkrlGpasCNz44/k+3tD
+wDe5wjgdDHrPy8gsg2W5zWGfiMkjEJmgQcnm7BcPMOgmPy6pIvZOyXeDh5m5rpxh
+u2O72A7GexroWfc4Pg/Hs7+FoQ8r9jIQtaxoXODg+TR8z0PRzeAOoeeRuMi7hdOS
+81h4GqNyguIRmNhQKnFMJWaZLQzV+urXgFRWKiY8ZIxJo6GynpoUkgAnNj57hPkk
+CiIEgKoYhUZF/EFX75QYsoLiXAfylQHsFzFbiMlVTCoUCVRu0SOlVOuaqN2WvP1c
+77nObXJxriiMINSQogBTFkqqmEoC2VXvQXneIkUdJiMdJihT4fO2rWLdy1y9kXJW
+wjNZBRy2pfGS/8Lwdy9Cmq8fh9iYjz/X4mvTlzXpX65f5J38LH6DNGfi2efIIvIZ
+10n5NE1kN59vlWXnOfKiq7ER8fWpiWWAkhS+t+LrfbL2atTnX7FlB6UvlXavrdWX
+HX4WKTvtWbyZlXdbue7pYypbJ5UnERU0llbaJ5ZvPfC98s8bTLO12ZXNItLa866P
+2611pp3tR1vrwgjnvvzhWTmUw9oSQv1dZnBnZnRGfK8QzR5ObplZCCc5ujfT9R6v
+JL1s8iD5lDfnIokmLJsX6RI1PafLCcKs/Tg4AkOMBDBIQit/raxnAKMUBAZBr9yq
+s1/QXIbVpWgIAgmEILgYvh0yWOUmv3jAUfKBfkdBqK0fOeYVyHCSZHQ6VMFk2HIr
+sD0RNdD7WUaPgRyIZcjoUkiB+YRfCWIeIcpVQPm6Q1BfgQaJofhQUEMgZOGDeJA9
+IPcCCRV4AUgAYPdw6IdQASI4FnXKQHmcg2w6ALxIMpE3ZaAxxeCoTJ0HTJEbxQOz
+vOl4O5xZ05zeiMkPQD3Jg7lQsvJS7KCkLTfpQmQlEPQs76EiGVGr9s8U7Q7yKUh6
+XQJAgcEPOW6rmfKxk0kYB6NnWeroUq8BmBHowHKGqH4gESifAlozD0+eQ0j4kT02
+LZ4WaPDW2w+IYtHZeImTcCWCRQLWBxyHfijRhjIpsF6jmAN08BB4SheIvMCQv3O9
+IBxhPz0SkvgHt3FCKbZGAMBDgJArIhI9BSIY8gc5jHmj+E+p9S/UAPryP36WOYnx
+34Ii7m5qkMm9mPRFNHfnTkYoj0GQr4OOeHrNeCzAYlhhc5B9Dx8dhsYr6Q8qgkWn
+ZzILYoTDz4BIKReoEWCYEF+GtaVpIuJ9O+zUiaxtJE68pepgbqZg0bMuPgcmlPnY
+g6RPUYjuCge0Uj8+CFpsWlfLghvvAgHOAUAaHOuBCwTEJ1iNdj0An37bTZlzLF7r
+i8nzHeJWS8Y6zJjrLCcqH4JHhRMidIZSkw8EIub4C6LDowDzJO0NYq0kILgV0Xug
+kCCZveXnig8iigRgdCLAPCpCoaA8AMX+M94icjIEiHwoKCEQhEX3HtmPnzHMo4T8
+NPcs2WZJYUlDwPX7E5AKIDuKSJ5wxZlKKsPwLwU8KDrAPQyZ+Jla9ISK/IHBC8hL
+AJi8KMiPQXfpqpK+sINQSQJGgioXVwYxvvIhV0sJEIsZpIely4rWA1B7CQPyZJLQ
+OahcYOxhvMPiDui49WezMfDbrdT686aJ+EQ2kJErap94yg2ISh+eqqB0QQPpBERM
+BBR+wkAAH2CA+KJEV+wAFcxBkBfIpkCZ2gULsgCIciHoB1hJQ9gIEguUgoVulKgg
+ntUcGAJr0oJHR6UMgdYB4JHEEfADtXgvEGyLL8+ama2oQMkPuYKfH8tziwAEEz7M
+qXYXsAoQHsjwQYik4/RunvQcfeEFs6nFYUjPo+WPguYCD9BY7j7j/PYGCWLpEvWu
+7/IZokD080Zk5wSD1AVqPRbsHEFBSr0sXtjlDoV5UI6IgNFeEvHffv4n0LiGvfQ5
+KFaH4Gqpz0Mxh9UDG/SNxy6H6DRQBcV+sBle8GiGx3QAXgqTMlrqSTAkr2SSQEFV
+9QEYOxHymNgdkGXw8Y+fRsHrgXw0GR09kMpCq5MlDiZDzgGOLxJuHDgRqQOet5Kp
+ezggkS1jSF0MO0JZ2yqQKSLF7UIgkEZK5OM/HYXOHJeOW9vBr8HHbkuWPxox6fms
+GumVzMqBnqecSQsuBDogwNRVQM9eBnKY0b2gZRHesEG2rOE4hkmdWB6V5y1KgqA1
+BGhikPMUQmrL7akye+mkvllmGuOkpMekkiTCSRACmrhLIlulAF9N5rthlpQ/XQkp
+01zssYOxeeIYRSTWbG2KBe2SOKBXQ5DU55aOtIvBbCk+zYig+CBkc6wH3bQOiaPv
+iscLEZjILNSSmX9OdgQXgna+HtgT0K4DwhmvgWOYSV0NSQuh8OHmg/ExtAoX4Pob
+q+dVHoXJ7hVNiGlVA2bGEGEH1bRIRBDhCQDs2oQtWIbppQHsVDJEQ2qoEALIiIJh
+iA5Ibr489zs18KLdIk2wVcpFRBx6+tiaCCj5EMxEzMCxQyTxJ8gAo5ZcS4gmZqKG
+0IlJiAbs+AEAgERPIieEQN50HzB2KnFiLFTJR7Q0qNQ4QXyCtKqBvJY82LSiEDtD
+SMDyDTVAlMx1KR0pMIRUiJ7YF7xSGDGU8MEIMgEjhWgojVGuXwHA5gtwUckHgZqo
+ezI2FDLsfUAQ3ZjoWaTPcjarhqjpVVrhZIQ6SsgnCohVS0itMJYhS0GK7o0K+ky5
+Y7gH3tCGO3xVQLLkMHlUMsfgQTLECRQxOLscliplNO4omhGOIJICZNgKF+kPDnyh
+3ErwNoatDOLWiFE0bhwyOBJEYDfGHjaG8xFtMBoWYA6HNgFycuim5Q7p2qoGrMrZ
+iV9I6DYoCVwCNjaBmh9VIACEQL8wi1kyAWKD09rwynBSL7BDbiUwABZHykpFUzkw
+tIaZSwCn04GkNoQOlasfSOXAYa64AHCJyMVG81eg8guTY5JtM+Empxh2Tu34PTsv
+KYzszJQ7oZY4pJ7Ci6JrOjEozq8F0gbgliwihrt8mJA2tda3aqkAfanxBmq2ZHU5
+0MvBycGZje43sNn5CYiGYNwJBIRNj/EqmR34YYffKj41OKr74Ihj1OnAC82B5rJS
+xuPCk5SnOICrQbAWFCMDZEMllsNkyUZkhMzrWJAiQm+4YC0K62MK0mlrmIc8DWIE
+FjI4sXzhL8vpkYEZwSigrGArDcBGj0gGFAr4FqGFQ1SOjTvH0TulJ1XWHAIDBQFU
+2BL7SBXa+99dSAvxCgIPnOIVhPMmTqqgYRFDUUEsUuxDfjmwMpaAek0+O9i+KyRp
+AG8DGE3qEdlsT9H5BPmUugch5YLMiAwTAkdnj7Y3zvRe4V3q41uohGNQNXT1Czcw
+ZOHoCYis+EOsTzziYOV5ZAwqoHrl2ATKFHnpRssDzmLdSlJDg7CCwocglqhuE+Eo
+jpsHOFogASPtXBwKZ802h3flM1s1tZA8sM4cPDnAT6uS6umbSt9nww6rDoI6wdYP
+ABwCkD4MpyWUDjtRIBzdU79HbBiX3vcZZGYTeQOlZsLH/hj78oFxFCAR3XQLAaGA
+dDiPltBD5eyxp0sa6DUCQ9yB3omnTqYzNOQ7dGkZocqlwqH9pIRCGyUGWBqQyCxy
+ehq7n/X63fbu3lvZivHbt2xc3MNMke2l6Uc4OiBRsMViTMcmSUZzTiouB0cMzMDc
+MhAn5DyXqlkdoH6TOX/ia/RnX2fHg6KQTF18xSwHCgLERnIs7MqnDBCuu5uA3wgA
+RixX8J05hR8PDApxlQIJmGtpRVjPTQ4WhDIBRyoZ5o1kdEjBho15A6uhLHeFCwXL
++9soCWWtfZsFJSQSLh/i4cADpq1VAz4GFTiJjhUbKosgl7B751ekmAW8qEBkjrpJ
+Tsj2D0AkIBD0X4qoEMX0AA0zQzao5o5TTzd5LNDKrnPfRfO1p44OgI4xIzjnvqR2
+Kz5Gwg+DJUL4dAjsyge+pYSePvEmKovgUXXilLjBfO4fT3oTYGwHVC0J2gKaO2qo
+GfZ3ymu7AqTWofKKHc998pr01xD2hKFgCFCO1eIWDjYeGgvGgWPaFTjzJlNzf2GX
+XyGuBywpbCI9aM6UO+tOtaQSqpWu2BesY5kXgwTFHTUPCg+y8oeXVwQ7yjsYrMak
+XS4XXDAJlUBAhUGk7oKAYdKTLFPcGom1CBxTjSRRsoYbfcOs9iE2BKVx8w4aN9z7
+7xds1BTpEnKyEY4TEIk3XeTS9hcaRANIX4k22qCDj84dwRJjo5YkxitJJAO9xXTk
+OFA/MS7JYZDxNviHhoYrl0bDxFvhTQwSQimhAnQFiYoaaHrMgkYrCOGBtDa5Bmne
+OFKwdG8DmOpCyvhqGYNRcB69KAlJSFA5hCUHKDE4GFcRwyRmEbfPPpveJJIDaQgw
+rWJ/P78yCMO9svE7GZpvnPSWaCtoEgL2jLabbxBVKIsbSY3YtJJ+NjNh8b8AilDw
+UPusGoZAu82EYImSRSk5GnwVIKWpSvFeBQnOAdAMuTV9DgEQgQgvrro7JHSHZZfM
+JCKmTtQFOCceAYcT265PCAg2SE+XhMkKlPgHB9+HTOoLI8s4BJuk9F7wqDCjRw6y
+D8yVeukRZ7qrFZYrAMMmhmgFDKEdZztkqFY4HuEkfuhz9pTsXzFtqqB5Tv5gsZ8h
+mh8x8wAfZSHNyDX0vZDTySL94fOjqfD0KHsVflvrWX5ow8Q0QhFVMbcpmX80Ezgf
+HYjMuA8wLy42E7Sz3rziuCIB2DsghxkkRy0Bzp6FVAA8MKcFvSjqknlxdHAT0wDn
+07kBQcd9oLK7tKmnZYnZZrh6DrhvciJ0ss6vdzXdwMQKJMWT7tXSHPByoD9hWNqM
+OwE85ypXmQLQwbXSkJWY6qxCwo6HFcFLCAk6bCVHFyYQc5H6Ezm+mNHD03wkk6j7
+m480R07W+QkhCKSnJVvGUvBBlRzDZDeeaNvGwHd0PT2wTy2HnkWtuMhkklgK66LZ
+BC6hKMJnOxOpo4YaB5V7rgiiWQXGCiJrYk4Y59qslhcA8/XJNJQLb+5tUzHJCBgj
+Qx3GrzzHn6xmZ9A0PtV9dbezpCHExoEDwlrH8dllA4YEY1mhsA0dIPPsj4Mi73vz
+nrsvJLs5YqABDfroHBg+ShQ0IgOs44NI4F8CIIsVXHQ6z3KS4MOhdxigYOImz2UG
+gJAuBhpsgLrldXnhNQ4jLCUyTxyhrIrwuyYrqo6MJzQ2Wl3AdDzKOb3Cydryz5Do
+pHBHMKBNdAOAdXJhYMgMb2s9Fp70MSClw9KpTbdzhHAuMGAtobHQJ2SURvgbbhyt
+BecsuXl+2jKigzt7goBTjmpC8RowanZdxJOhWjwhwrm99FSiJ2OgLLnm8pnjT1Fc
+CXCc0JaZijcmjpDACeVTrZneXxGRA+184I985kcHQIQIEFMgWfO635rg0SZSO/at
+HtcUKa3TZ8OJoImYsgRoKAhiZKIBUsG7yTOFlDFncMU9EG4CMLUKMxbiCaMDYdhs
+JSKdyLFJCQmviCCLgGuUz81ptojXx2oe4d2iHnAkVSdhzcfH2K2UnIQ9u0F30MHB
+OBY0UHMYYjgCQTAWMbwXTZQXaOgnfjckJ+BO475Zyfo8/R0NlEMBq8c94sZJiNrn
+yJ8OoMIDQPjt9uJK8Rk5aFDYbJfWSynwRhgIbQoB0+IsZPFGy4yADzZLYokaBywD
+CRmTeH5tmhDzPmA2rD32gaqneqHMNqA3FgsMePDM9KB69ebN4HOAhc26eoGFI1QJ
+m898wsO5qZxBxcWUgvtw5Q8AMEOOJJ8HEEk6B45ZyIoFaB5KW8FLb/M4KYSZIP/T
+y/DoMk5Ami3wPAH8EyWhTaUsFlQ+g6AEFdgHlJWNLpOCvdk3q+hWdqbTJWRS1dey
+wOAQwQUmsxpFozUQbFTRcPzhmHw0BxsEHFHdI2kUHjDkRPSGAp3SUo8BEdPPPTw4
+44KbQ4SZsIKdYe3WCo1EtM7zKTu1VAoZ7hPFDfU88SlCY2aHVSnVAOBA5wzuGlcH
+Rs8STcvGCu0xIzUFjkwcvlheRAzgRbJkzf/N0YjQwJYrJ16VzC1gueMTW4Rt5rYT
+IRNwYQYtHOtSD6ShBHOQzP37jm+TT/gvnq0DgyDuezyZv7FGKF8j4kpFLwakHPsy
+LSDphCyxQLl7xgnr+Pl8wbTsF8dx04kwB75wFRLdNRIBmhw2pH3UCbB9EgE9z5eI
+BPN3vYxzTZ4nEgVR4qoGQtM+BuGwlgV1WoHG4EaoNASMhGBgXYFRVYIXlASg6LSg
+GqeHmiyAsDilBBOqQsS4Og5rap1miKqAdUA6AdYTWmgTRQWeULDLBzlSEcEEDJbB
+4nTaBTC2glnEXi2haNhLoJcdgCNAkhcqbCc44gFrBrre1RE7eydRrtb9wdNITgOo
+j4QWulZiLl9z7V6DbnFmgcimAjOFhQs7UI75C551aKdXmUEHKSvEOCldH1YzE3wo
+E42BxwHl9Xk7YSa0g1vV9CriIWOztgqD6DgKN3AvOkS3ODdnTdtll+abk1SRIIGv
+fALBUOBR7ZFBZ4BUpBnSQ4hFHFEZ473Y3P+zY7O60Rs1LaWqHHIcwa8txlB4jJJE
+w5YZFHWAZUEtKyoIGdMwDYlA+A9mFgSZbOw4M6OOSmPkMl1OYzvpRASmvvXmUjTp
+8joGG1lR1cQpEEugzJBUyZnlygzInkeR9IZ+wHyATZQgPmd1ZmIUecB8pAzd6P0t
+AUK45zvDzCusNxdKPDohseJeeAI6ZvadwEcFQCRCgsXNcDfG6wqIm732cGQgwkIA
+SKEgydIjIZQ4a2thurU6wysrTQQglytZnEFtKoQOjdqfOmiDah274ym7EDxm9s9L
+CegGgMopkIt4LQ1Xtb9yBS7B2LUpK7hUpgHQVCXmwmbMOQqGHhGVvfpgEjVDoew6
+qNbwaB5vajnexW8pSBC73poOsSDMENqjGDoVUvvCS9M4jdfRrEmuQYwM5KDSHMK3
+B64lqG9DhQ0JoNQHlDlAPccRKnfODi2TDOoYNSZAcBzrUAVglyHGRUI0bMziEWOU
+JYnAOUMt6Rku3X2Za5l+nJIHiJXNq4xzccGdzaqu4qJJiDRBAN2TBKurol+bv9SB
+CSAX8+8Hl/r7sZnxy9PYe6Z7cvs98YtZ/SwPrgMD9OXynBh/XzxwXwdWFeXp/iVD
+kMgNriWpJDP1n5azCg6/xxxEvwpxkfhIP9s+2nQ/fn4vF9+jJ+ngfdWL4CPb5czf
+UQwvVtZEuz7Om9iWrwP/ePX0KAP0+V9inRoSgybccCP6dPd+K+f24YnQ9YpYUGst
+TKKFMYQdT2HL0fr+fbVW3qvv1NLVbRWSUrVJUxgSVjWktRaoqKNrFWmUUVMjUUmp
+li0zKazDabQ0YKDYxZMGg1BpRpYUwpQCMhoC8nsJe4+Dy3Xr8S8ifkOz/vaP7ETx
+FiYoqdkOeLbBtH+bHadmz2QGsccbGX7OU2D+LhZDxGPjMsOyV+DZO9PSeDPkEcZO
+SS8UzBJ+ecnUZhlZ9ZyM/ad22YYrjBcAz/3V2B8/JiuT7ED9kw+rGGSGmqTbJiMm
+LSysmTaS0aks2bSzWlZtg1EpSSYlNkqItCalNFstNttqaprSmpS0pqU1LNFgKpZV
+srWWrM0lJM1bEW0qbEmiLVtRGZUbSprWbNaLUqaks021KtbS2RlllbMsywtspLGj
+SaVEzMYk2NmzWptlrJWmSoRZSsptlZZLRGTaNKm2LJmmyUmSWRk0WpqlUZJJiWlp
+tkjGjUy01TaUkrKzSlLTMzAbNg2KlpJMl63e7/d+ENF1fgGLHuf56NGdqOvg7hSN
+iHHED5NKzQnm2yaAQJTIxieFJM3ij3X3qh5AHBhk2riuNRvBd1dJNK/o55W5e1NX
+ks/nngBUDz7INtUfFdK0JrgNgbjAdgkJGRczQCngL6Zh4BT2UW6xEWOCC4FzQuaj
+OxoBErUsV1z6K8cAICwJGRj6fB5iCC6h8QhiZB9qLr5NFyCenPzIPnc0WwotMInx
+4sAoHfMU5HgU6hhRBkppj/FgHNLt0ubr4APQXPI06DXqSSyDZid8zuPuLwXKN4cj
+jq/w8zETQQQXn+w0DiEJEiKh7fzQ5LMfgQXmXrdtA+sBzTIigGxVCwsOYhmJycnC
+CGplhE8/sdAhQXcsIRJFJISEJE8flHQO6cgR0ZCoE/TcCd+BBP7orIml5zlZgw9K
+QKKpGkiwgESxpnXK9pYwUAa89ij5sPoUYZjQ0lyAcxQc/xtRzIOJISJHL7Ny0JDw
+BwZa4MDUFR8D5CCCwzTyVsZejnQapAVGYICC5dDXtXOsmZXMO7mFWN7P56mEGIAc
+JHHBsharUAUcAp9UrviBIAxJ08i+RBO3Ah2QAgiK4kThwo8sDCf0aftxqENQKMTv
+TZBCNMVoDJwdi4fVhYNQyMy4KjH6SlEAvexZaMCmxViqK0e1JpDA33Zg0xuGQl9E
+hiQvQ2FHNA6XqGDe6CB3obIHAhBD+L/2H7JweCnNu3h8F/bQAgQghowH1UAW3ICg
+LRMWh9MD3nL6B5zvW/rtbABAW7j9J/ubhTjE1Dh6fjPlrh4F1mHx9l6oKaKdL9MC
+Czogscg9WEHR1P1lXLtPyv2av6+Uc38L73W4ynzSHQzT7n4a9fw9G0pHvHQQT3Ww
+CpsYtnkcGJdhEoMqdwTQQQWf8H7l+Sm0erEmuPTqAC3f/RC5LqgrQdfyPN+J3eTy
+V4GlQVzdO0KeqEArm/KUORmgILgIYcAUkDE9WuptiUObqmYfnmExHY8cNvsWx4o2
+QtFrwFybGSaII/YzOu4hsM00VwmYOAJQ3KQY+rag56UiZKVHIpnxryUn41uF8d2K
+fszLbyzAkMTuQc1BJQQHPuhBBej0s+yiFTpnRcrVGp26/SPoGgGLAjmBAhpnAPYi
+hGHgg8hN+hAh0NObgHp2R/M6Jo+S9Uw80pUFedRU1bYFRVog6sTPEHADwMAG0oUe
+ZTzCfk4pmd1M7BJIMNGsaaugBm+bdBpLDSNwIBiBVKx5dQgre1pCrhP2FD5vX9bb
+a28/PP14155vN5a8GIiRRgLCSaKIJMBu9u1u/IdZNWhKp6tcoZGbueNNIlSQLYOV
+guF/I1QEFvm6liJuQ/g648tjVjId/WMg6iEQnkcuhltYdGxoELryIDySIMiK9wD4
+MbBiPihigLkeo0OhARBcol9jMSNhf2ITsgILYNseps5hodZnnUYfDxJFi4UQzXNx
+EsQsWIsPUhf4XvqFHwQ+WPfTBIHct1LIZYv2+juqALF8D9dhxOkM18bdDBT3QEFx
+IIWRNxv+UV8R+J/0R2XJbrEIOYHU+pkgRzsDEdIZEebTO4gQJeqofJbdkqra4esL
+roGjHL6Gsy4rZI+PElgZlHIH1++YJmDEhF6psaR1U3IWVmpF3VwE9oiTMpi8Nzz+
+aHRDUDwW+WIdt3zPNOewJzPCB9E6jmCYHFX8LoITudMz7/N1SyV8kTcL0XLh4A7N
+JzfBgyjFkYbKgC8xPTQ2NEVHr3NX3I8oB8QLJn4JCrIRrrR5SSiELOBCqIlECSOq
+AgtNF/5UYIUAbvmgBgPL1xIT9UkTRqqrX53ixpCNGKHEwP1PwJh+ma3ptrBwODbq
+SORcDEiR6PVwOxokOUEsjBbkzcaucQzU4IBkiIQDSXJdCotjbIzzDs8lfNscXA3I
+EjvBoCBmX1Xq+IE6m5+HREB7xUkefMhRTIUUVEoGUY2sxAvjsdB3GZnYoMTuuOZk
+0IILqZh+sKgLQ1ULBUF4SYf1u+nDkki7SjNoBQWIGv3PuY3TIDM1QtuJ3SNep/DE
+5GEdQMHhYWdISJCEh+RRD7S+bd8OK+sbha0qU3NES7e5JJCEsxa4lA5ucJdrboo7
+v42uXj7XKXZXimppWTWQJDU2Uks0imZSWU2bLZWUpEzCgmWQzZKmlstNa2pqlKaa
+aU0pppMDbLLVlqzSSa2lTEtKzZJmtWpNSkylFpqsptkZrNNSzS1S2bNoqllIpMmS
+lmYDKLKzVm1LKVNkglKVKmyy0EstNixZmkjEiWms2xGFpVEWVNNKkSaWUpmMKLNQ
+l1leHUD7BQQf0nxooh+rfDYdYFRbCkgUOlBI6EukdLgodLEh6iosAIZUDGcFIBnT
+5PfxeXIybIEK3a2JhwXN4a5XZyCUN1QHKuKm53cudZGkYw+CUhgAg4jiFUxQcoWX
+ZiDnC1kcAxisjx4FhBuB1RLpkW/L1JdQMQyPlqBhAGDxWuoWKaLLctSBSGSu4x/U
++UGMFxxCH7+CQBDUTBsMAfQX99QooSAcCZEiD6vqNtZoMtphkjx94b82mEcdDU6C
+GIfhpBNHRGdiSEhKQ5wXmRP0FuHscjHIQQXE+/JA9QIe5u/rPZ7iGp3RjqDlESQZ
+JCQm/LYfclj52MSyQjrCotj6Nhs9YNtpjG0eYiFHs4e+RkLZGv6lQVs25H8UcydI
+dBwSSJWZ2GkMV5JBvs3IEHqRvh5VCbiosL1RQbNSevAFkgodQSGXyDwMAKI48pbY
+nKYY5o3AkxfgcNu/2TS8/z4OpVwpwYLoslFDS0dpbVLklyLktcy0qrt1rkkVDQKa
+U5mIfn7qbHUwB+pUzzDYgdOwHNMsQqIeAQgWJ7CdQLne/Uch/L74GbnkIeSHVY7B
+6HzdzDBZDLh9FDDd7l51/E5mJCBgdFYeAu3YglszcA0yVJwA+V7zU+xXQdNIJq0w
+kfMItgm3gj2uGRgGUX4BpO2ZVeDftfXE9vP1ve16wzwEEF4VAF3VrV67Ndd89m7O
+GA6EokveXN9MfaQsQ3ZZKcK50mcwJlSsZTgk98c5KYw84IzEZbkvNTsNqzPLKyHo
+Px0sFlfMO5q7Gy/RLjgGa3WwaF0oI5J5CEBrzAuFdT9Mc82Cdw1XLYdAocXnucxw
+MDq4Gb5ImDg/Y1aNUuciSSLGs30w7o64wiPJkCOJGESEZEDZGBLmOHlrwGGQG1zj
+MtuCoxq7RpQlgtQ/YQ5xHKBJJHiia0FHVsRLGQe6Aj+2KgIUQACACiJEFxCraZaP
+BqeGpHqJ2lIlZ0RymyqrLMZVKEz6wYDwNnVwEvXcGMYxgkEpwJK03QsQ0IAGhJqy
+CBkmqpjC2e6t4I+Zf0JUTC8cgiBBIMOpm5aNIYWCqlcG2GZjNkLK8i6B/LSEtoDR
+RIJtyOGwPFu5CEb0Y2d1QVrHSAerk2mlwOR0esAyQ5waYkWyRMAgkNlX1WA43hGO
+YdDY3OWXJQzDIuXC51atcCh9k/jjTxk4r31uGHUMNV7DyEEFu9aoidiNHFzHFW3k
+pl23DYUqswRQLrmUK++C6OIeCEEGO4Oxqcy5rvYfEQIEszhUi+UBMa/NHV+bZCGB
+BmDsfjN+oGAKjwgfAOjBz3eAT0JSBhgZHiXA7HejAOj31UJ0cC5soXLOxcOBUy41
+LJM6Q8Jwpx4F2KjgcPvn3BRaXEe2Z4vPu2/yeP+aH5JvaiC4fKQAcndicHNDcD9b
+ShgrZAQXSGTpCSlPzKD5gwnhsz+p8ujoewiFBY3pKLSeXXMDRxzJq44NJzlzG7rV
+oWrj1/nLbhdUFc+SIUCENGZwNenyhKIbAqfWTOCRY+YUj3gzmpUR68AgUjUPy+0G
+2hIxUaJCNpMRpoFYjY0WIzNmFoMaNFtEYklpFixGtGxg0UUVJoKiwYNaTRqTKQRU
+G1Bo221i1VFhYBqNjRFIKqgpJIRS7/L9Xk8v315svJO9OR4u/ONn5FGPE3fMqdtS
+xkZBu7kta5NbuU8MxyZMYMgmsNmMhnKfGmtyIG2LzBpqWYIbdmCYi0lYLJxwCFFa
+zJE6zEudHD27ZzbOeSgpk/HnkQbT7twqaaJXNvUzMuUt1hyhU7ceZcph42+VTlXU
+cZ9UZZJyYojLjaeJHfJU1UZUEmBfLumu8yW5skuyE9uh2BmVxJZi6KxaXBNwSolw
+BqBcQLj3ucNZIYZLYtirLu3brW6UYgZgZJiDIGiwpsgg7g1AITkgM6FHITxDDnGt
+4SDHzZbL5s8fec5PCq5DOzDRdWS+0h5Y2INZak1D29cpVyb2aVrV3Wlt7rQhLa3e
+m3ZwPNcXywE2Qesk1XN24HvZ2Xa6nlm8Pf/xdyRThQkO1NjuAA== `)
diff --git a/gcc/testsuite/go.test/test/bench/go1/mandel_test.go b/gcc/testsuite/go.test/test/bench/go1/mandel_test.go
new file mode 100644
index 0000000000..888c5e4ea8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/mandel_test.go
@@ -0,0 +1,41 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This benchmark, taken from the shootuot, tests floating point performance.
+
+package go1
+
+import "testing"
+
+func mandelbrot(n int) int {
+ const Iter = 50
+ const Zero float64 = 0
+ const Limit = 2.0
+ ok := 0
+ for y := 0; y < n; y++ {
+ for x := 0; x < n; x++ {
+ Zr, Zi, Tr, Ti := Zero, Zero, Zero, Zero
+ Cr := (2*float64(x)/float64(n) - 1.5)
+ Ci := (2*float64(y)/float64(n) - 1.0)
+
+ for i := 0; i < Iter && (Tr+Ti <= Limit*Limit); i++ {
+ Zi = 2*Zr*Zi + Ci
+ Zr = Tr - Ti + Cr
+ Tr = Zr * Zr
+ Ti = Zi * Zi
+ }
+
+ if Tr+Ti <= Limit*Limit {
+ ok++
+ }
+ }
+ }
+ return ok
+}
+
+func BenchmarkMandelbrot200(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ mandelbrot(200)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/bench/go1/parser_test.go b/gcc/testsuite/go.test/test/bench/go1/parser_test.go
new file mode 100644
index 0000000000..7848cadd22
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/parser_test.go
@@ -0,0 +1,43 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package go1
+
+// go parser benchmark based on go/parser/performance_test.go
+
+import (
+ "compress/bzip2"
+ "encoding/base64"
+ "go/parser"
+ "go/token"
+ "io"
+ "io/ioutil"
+ "strings"
+ "testing"
+)
+
+var (
+ parserbytes = makeParserBytes()
+)
+
+func makeParserBytes() []byte {
+ var r io.Reader
+ r = strings.NewReader(parserbz2_base64)
+ r = base64.NewDecoder(base64.StdEncoding, r)
+ r = bzip2.NewReader(r)
+ b, err := ioutil.ReadAll(r)
+ if err != nil {
+ panic(err)
+ }
+ return b
+}
+
+func BenchmarkGoParse(b *testing.B) {
+ b.SetBytes(int64(len(parserbytes)))
+ for i := 0; i < b.N; i++ {
+ if _, err := parser.ParseFile(token.NewFileSet(), "", parserbytes, parser.ParseComments); err != nil {
+ b.Fatalf("benchmark failed due to parse error: %s", err)
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/bench/go1/parserdata_test.go b/gcc/testsuite/go.test/test/bench/go1/parserdata_test.go
new file mode 100644
index 0000000000..113e5e3e38
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/parserdata_test.go
@@ -0,0 +1,245 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Input for parser benchmark.
+// This was generated by starting with a the contents of
+// src/pkg/go/parser/parser.go at rev 9b455eb64690, then
+// compressing with bzip2 -9, then encoding to base64.
+// We compile the data into the binary so that the benchmark is
+// a stand-alone binary that can be copied easily from machine to
+// machine. parser_test.go decodes this during init.
+
+package go1
+
+var parserbz2_base64 = "QlpoOTFBWSZTWd3QmOEAIYdfgHwwf//6P7/v/+/////+YEhcAAAB7hwvVWWaZT1X0dt999296z5B" +
+ "3mcQqlBVVVB7hnASWJoFGq9jlHvZHRbdfIB0Hz6fW+jrz4dueD73be6c33tG7la1O9d154ntzzk7" +
+ "jnU+O50zayubCulvgBm7rou5jleOe730dzX2sUbWj1u215X2PBXY17GB3Y3NznVW7ubOuu5a5wHc" +
+ "d9h69Xtatru8+D21uj7bM3lBKdRzPul3bt3GUtvN7z1PfCU0QIAmppkxQYg0Ap5NQZTxR6myJp6m" +
+ "T1D1NMgYSmgQggmiajIZKep5R6mh6jyh6RoA0BoGmg9RoCTSREEEAnqnpqbKp+alNk0ajR+qeiNB" +
+ "k9TanpMhtQDQBJ6pSkSTyPVPU/VP1PShkepoaGTTDSBoaAAyANDQMIkRE0lPTaZBTyYlRp/ok1Pa" +
+ "Rkm09Gk1PaptQAaDR6gPUESRAmQQ0Cnqm9NNBNMlPyj0iPQyQaBp6gAaaB8HrtSFgsiaNsTLSbZS" +
+ "paVaq+DW1qDTQ1FEYixSRiwlmJFRJrBmbIYoNEYoylREClbZLFikJKNRBFApgUQ1GShKjaSyRCCG" +
+ "UixqTabS2lLZiEgaKDZLMoxFY1o2LULILGDEJsWwMhbMzWlpbZm0bCaSS0NlmDGZIiRWIoxorEiG" +
+ "IxTJIyIGU22xsKzSqlMUUmjYE0bTGWaalWxLIlMQqECLEliKYskmLSSjKTKRYGRZmUZpARUKYttm" +
+ "ajIMrKGY0UUglEiWbM0tJsbGyzIk2myi0ZVYlsNRhGlFhJVKmwxloaVklNFBtDIZTQkyhowI0Qxp" +
+ "JTJsyVRUijUs1e9rpIS0kNLGYkko0WswwxrCAwJFBiLERYpFI14/l8d//VUo/f2Ofl/4/PMmROiP" +
+ "+X86qHV/m2eKhwgQcW/w+YWCErVRZu5/WnEVaZnt7Tfo5OP8TQ/6bme17VqPoaBMhDbuEqkuzjiW" +
+ "z4vygpH+2bkcU5nBikvEzgwxXZ804V1e1KpfovBAJKnhrcaHdoN4aEJHqHLUlmyGcSUjUdCvTYRP" +
+ "65aIz4POFpBLH+m+1Lbs7kPa+GjGbi6lF6kRnzeuKKJqJcsR2+EnuemMS9kr4tXWry3r+bgQMkhI" +
+ "ZkgILVvncoXREIltDqJkTlIBmQtrNEYdUFfdE6C6Uevosypd0519H9t17FtHW8FHImhH595l8V5y" +
+ "Dy7pYjFXqJ5ud+fYaJuGUNoK/3zpKZs3XTCeRxe50nakx0WoD9OZ5fgiko2ifKT2JRWE470vIn9q" +
+ "YqZeDApYKszMZ8Mp+S+W5s96YNXPi2dlO/D+1qHRSrLkH4VE7L5oPiWGXTwos+dnwniXQoVKJu+K" +
+ "Y9bmXzt/02qIskOq0b5TG05twenXqbgV7hVAkTElgmqsqORvcte/dakNMsd39HphWvVaeJ3rcihv" +
+ "cJ044ShoPW1kUxBbyYXSVcHhwcPSlRcSVjjMnnOumoi8tmS0XNbV8t7YwYi/pxq8j4IDzF6Gjjac" +
+ "8IstxcUEu4RJ7FipOLfio4rt9s7lfyvvwluT97uTcrpUBmf+k4nmsClh3fSIXpUhCQj0vMkt3PMf" +
+ "iudzHKBAPMXLy7ghISaEuIIZU7ueq2srC6YYkS+GIpVA78WOscuCQLNvB3uP5O/z7mxPA5zkIjIv" +
+ "KdUOFSCIx8N/Dub3Ur4WwQSti9vd16B9/Bzk1g28aiXYmRHTrN0J4cW8xmekkkaIMQXypKnBPZeW" +
+ "OTnpXqdzrz3NXv88RyB3SuMMy9e+YJ0LfvtfRletL4X4fU0YyG2EurWAFBlGvZ9Lzc161b0vZR3B" +
+ "lL54b52XxrzvXeyu0qCh3+Nv1LgzQhtksL1Oay/Q6uVSRCofJ3ZjFUiG7BtUBQ3ZQrIHZJxdYAou" +
+ "EFtGQkRJCQq1JlE0w7e/NTTmJ5ifsE62XbIaTAca2fb4+p0d8L19KX8vFwTin/n8OvB6c+3w6PlS" +
+ "2goNsUIjAKysBZEGKrGSj9cuNPj5nrOYVHPsxLdGaeVHWXgKPR3anI5fKwnR8SM4fFetyzwPhxw0" +
+ "0lGM5Y02qqy7YY3+xFTHU9QtR7daZLEhpvsY3iDlipq2XAQehwfn9cm34kA9P19rUJ+RB7funX6O" +
+ "rB5/xJ4dxpknnVZFXSwLq0tDC4Oze4TN2dOHZ+HL8OJ6n/L8WuPeXeMpMQqItn4ZQfO+L6Ptnu6u" +
+ "udDLKkBnS6yOVFVGKAsixPT+D24mcn109jn27PhPK6x803RI7pvAz3Q/nYYY74mSvWccNSVVSvyz" +
+ "c5IPV1UejZKjmnB3wuXPfG8LTTGrMkIz6mh9EbgSSBOQqmfzXu/57PRZlKcl6buNSiCdgf939gq+" +
+ "zhn356ZdFGoGUfVHCdBp4HXcfZpWfVbdNxh1rxI/RvAK/e4fAR+AkS75mGZTvK5T2ob4g+HlN+LU" +
+ "ednbpvXKTzu+BgxnhWG7i9otZECZps3pIIspDTLQ0P+o0Ryw/UOpt+F7zIKwg3cxA7UQX8rxDUxI" +
+ "Ub/+uw6Qh0xwieVzEaeQKh8s5uI1o+buyWpo8kZVwjBN8JdsHV4lj5tdUIiOuIqskenyFpkcNGgK" +
+ "cV1ohgEbXdcF1bm2LHZwKinccZZqRh4EXGbbqNuTSUTM06DGbwI3IfZcrrVlRlyGvUPnKeM2tG+p" +
+ "U5Nk1fWcKXovwi7Bpm85156nFylux70tJGHWaxNqGt02UGzMM04bJc6GHl57m9PfjBeQ+vlgtDBA" +
+ "KJkoKJEjXjnqvAmY6RkaCUoeo1mVlVA+uUmbbBqU8dYZIxiwRH3Pxc3bOD9uB5Jlka6An6c9B9km" +
+ "OnDL+FHQTYNwgH8mavZz0iOu+Ut8/J5ZwyoIamzhyxBs8262E1X8Xfhle9iE4rVPPFLG0iTioWAU" +
+ "d3xVBGn0oRJqbxtUaxhpdln5NtolGMj59U8pg0/RSY4z7US2Ms+4/ppi54Z8T9x34FrNnEaNTupy" +
+ "0wwbD4jnv7F8vm1WllYykpcbxM8YVxcrK1o0GGUBvVUGqDpjwLUr17oxmaKusyyrqV4yu76rlNga" +
+ "TtCAVGwYMvm+SLMenn6P375gmvYRlpqskpNDxFJcfbkZ8bux2QkkYKLPJlJSlbCOPNDfSULNSdHM" +
+ "12MvGjz5tYTNEbhq9fk6J0QCf04np5cuTvdC7SzdPmMDWTDxiD5exXpVi41UM6eV+926tnWjqo1q" +
+ "KZvLp3rjuvrmxbB648TaJlIjEgjUx2qKW6HRaInEGHsXUxFRTPPAsGXwgtoi1905O44+FkV9ctb8" +
+ "7pZtlllncqNGbJqP2LVNqa9WBOlqMdkm1w8mO+Ln3BLUvtWWl/CjfABpSq7mjGtMdPHs3a9OeOVw" +
+ "FHvW2fQeG243Jl69jvgx4jbSeVZ39VcNZNO5EiPRfOTlBHsZXX27TyO0b+abrFZ3Bwdx+c+uRVo/" +
+ "TEFzLJ4uXS1FoXdJblwzfjW0rcGlZ5Jqs3Gb4iESyfmdVpU6i2DtBPBtsn+nlb95Y0pWMDBM3ZBZ" +
+ "pyIEncddO3bafpssEObXLaLNvraGuJMzgiNF3+t2uZC633wwUji1sLoiU6X4kuZkEjKHnqmi1zXF" +
+ "+dM6MTtO9N5yDve47yIt/CkoVoTbWfc9E1Gs8e19PLxPS0i18ldi6xjw2bsWfjR9Dp21w5ImY6xr" +
+ "3J+BF35JgmZMT8PbEXlDThrTfEMkkrCcD1u+XbyIkkjGCc6Vc2Vr5X53XPuwfOuM31yem0tXg9uZ" +
+ "1kj2P4Hx03wa13qdX0xDFNlPCYxkY+xVhq2lCzma5tkZ/FD3755LyZbdshsWTGsbInzJ39+zd/Ly" +
+ "PMkJ079dteGN01Roys7oKtfDIa/N26YWY4Poq35WHTCM1DF7S5me2r5ahhiLl0ch545YQ+r57a4+" +
+ "Ls9VjY5Pswwk2x9S45uMQ770ssfjbRB1U2hF/DV8nak751LqONvJs28E0JmDcmEwIr4sB1uClx2b" +
+ "PpWuRnAWq7oEmSBKbowbbW2lGqi1nh35psMxUZ4d+FxK4uHVZNA7vU5qm0rUs1IoT9jPLkrzJ83e" +
+ "t1ZM+BwItwHrFPb5jtL228eV0ZUpLZphfFKj2DCkzbKiv1ODiobghZh44PzyoxgKV5SnP3VUGTRN" +
+ "h9Nr5MyMQvBNTHpiwN1N4241qJaQRhUVtKiMhjJjCNoYkMErArCTYOiM3SF88PVh9B9XSdDzTkqF" +
+ "hbUSnyoH1EwYMUaOhcqJmWVqsWHxhPCckWK3GaoqMmowMyzTBWal1P5eL2sVtZ+drjsx40brxVOg" +
+ "xhzdgFm5kg3UcZubj4zvW6QQgvvcd3x612pOT21AWT5bhwppdXYsSL7GRd0DB39io1hcZp98dpdP" +
+ "I7tjczPaDZBPL3EuO1nUrIw7csHF06ZNzmmUd+3TFNPvpr63hVjYTlSF4RbMRaymDlUJwWzYoxO+" +
+ "Ig6OY5Pjo2li+/s0+z4u+7OhBI5khOnopHj9a8efW8cp+r7kZeu8s3bbvYS+DWbWy1roJ0p1AeY2" +
+ "X+fziwq7PTod5KluzFOwS5vjjtukunB1xtG3rkji+868nZBbnTAgkLNN9Ezlg98Zlxha5827EPn0" +
+ "5OW6tutYMa9O+U5TiKz0ggzo3G2J1u6vrY40j3UfBNuDg2ONsRwUmNyZMREtEUZK8Ifne0GcxmXx" +
+ "L3F7fRIQk3RU2t4jbit2VdddKuMkXMTSERChLhN68Hj0bbJ7JYxZ8evJ8+Y5Lg119jsTYSQ6dxXs" +
+ "VKvg4DSyNLKMC2MsbYLARKFWKlCw5wzKlkQYWgttGacw160+Qze+GHCZbC2hGlGVjaX3h5YYzj3f" +
+ "DFYvzyl4YkBZrrrZtfQbVtkyqYQ+rtBBDGBnuPOcHrLOPXfllLstfKRrywI0ctF5F0qltBsNN9Rh" +
+ "msY8es8xjHtcrxnobZe4k3Nuc51d2e2RHRpNSdoNbT25KkUrQtDy69Wxwnnyc1tdraRFtHagZVH9" +
+ "q2swXNQyLCahLQC4szGKaGZKqLSiD3FjPm/7PL5ZHq/XmHmEJ77utU9tZ2zp/ODPCfhI7MvpP+fy" +
+ "16rtvaad6gz2zk1d2YaqMavtFjzK6opMh34RTf/flWMJ0d7tOtpgM0vJ8dPn/rfB5LrZc+fPfnI5" +
+ "rc/tsb5rm3jyV0qOxk6ObY8ZOaTIvk1eLm6lLtZNvtx1laKDXauwgE+92StvSXJZab2zM2l3uYmi" +
+ "IVzSVvVOIE4TEEKad3HGSKygKpCaSo7ct+/dUzPu1tE3+lX/Z7WAD7kwJdnl+r5V6jq7Plwv+rjb" +
+ "GTGL+z9mNjB3cVT+p/DcR60xRs/IsnzfdPSZMlJLJOVkTvp0jO+LfL4X27EcdvPDw3v6OjWSz+TJ" +
+ "Z5l8HIoiquZXPPLqmEUOm39RGa3IwsOfguiZmZqIF2DsDpJJiTapSFYKFGDTr79fD/h/Z/kw1/A/" +
+ "zxQAZAP48GZxmZj/BHm7jPl4tco2zu/RSCM1VNCZI5cwWyltz3GeHlL+w1PK7o8fDTfJUfwq7AqK" +
+ "ElR/1UhrVBdYNUW0LBlGoIo+JbBiaGwNIKCvd/VrVuIOVY+HGZJzZzhRE6ckuA8ticpZOPpOuuXa" +
+ "KImu3UyMxO1amcSxC8mbshm5/lIYjo5kHcND4/kn8sbsRwh++dFinScFgHcTjpweH3aAkjJ7NZJh" +
+ "ddL2dOl6oL1jLNaYM1MgGs52V9cDhBLMwwtZ5YpSzsDNuTpQts24pU5iwhxqgIHKpU1yJCBXnBEJ" +
+ "mSqlV5u7exQh/p1mcnW7JmCri2y1MbKmcokR2TAXipUQkC6CwwQ12Gjnm44X1tVZUp3wlIdJOO5m" +
+ "wrczzu+aFaUilZUS7dnOxbWfWcQeSZ0hL7XHvhkbDzwo37Y5ckj7LmXmHin4QLlw9Ec5/JGyztRG" +
+ "X77Pgow2DsQ6pFw8CK6PUTSTZrWK6ms1J4xnhI0q8I+Ssvmmx/P/r7qE2bRAJB9mf25A5z30NtnL" +
+ "6Pmqft54xt9X3KrN/NSEF1a4R938Ou1vHaOqTRyvO2h+ZZqd1LGaryhzy460Fwfoi7DtiepNdA+V" +
+ "zXPjwfHd+wQOyGMkj0raTGF7VnkvOqpmpZThtUdNn0VJPsKqbdOUAo16juWVKpvxIwUefdTGVI2W" +
+ "xt5rY2t2viki9JK9xd3SJIkOhySAxWJLCGZb4LrTCT3qPu7MoTJE10zkYWgeyawo1blLhbkKGHiZ" +
+ "SLONHph0Zmnz1cYA3RqHbyrB/NqTf4rxWClAjux9sybomMloiRMm9QlnP6Jj5HvtjsYF7il7l0jX" +
+ "MtL9sUMBEpx91hbl+/jW3jqZXfdEZMIOccK6re+rHGqfbGxjYnnDOe8T4OziLqEn8cDo8U3uZNI9" +
+ "+rZY/1+m9aZrGv2EaunZM0m5cU7X1POp5guRbRg2tot/g+/jYyTAipiYd30IhHmjxz8Zc2rQjdcb" +
+ "5CZdXH3fH4T9H42O/j68ZVXgty63afB3lwUIheY9TdWksCKNItEw8L7kwgGaLvc85h6mRaQPm7YI" +
+ "mYnovikrbjd2eGmWNRN588bS0s7T3WjL59IZlW4eJhSFGPW6EDovZLjfDVL74o92s5lyAyQ4INyq" +
+ "gVzWv/j4aw+H6buyxIjRdfRDyZb+NHWrsD23UhRwlyzY42awYWc6lfzag5F55eStTf9rRhuzVROE" +
+ "jAmYZ2bWlICbSehLazA+NNsC7SnKNbXXUMrObZXU0bFu+phdvVja6/DNCQkzS4XqDWlrDytvLVIO" +
+ "fd2Xj0O24X1z453ylFk/j9ve4lz+B8utfOXokeilpTm1L/zvXc5+pNcY/uLmvZPpsezuc4Z+g7I8" +
+ "lVPy/Et9eH+Y3vZIZe+aB/CTMODCDJOMeDdsmKt29WEjDc9AfZ4u1pPukz03zhZ+vzRdmsXjjreU" +
+ "wgzctKJSRVDe5xLLIZmbgWLsFfHqm+F1I9+nyKo9edkYW3R9Ipo983Z02KIfdeHBkMHHn8DW4nz1" +
+ "+5mgdApk5IURBIgEE7boPGAFYAPquEaBic/Rwmnq20EA1FiEVQjBjJBIBfYUfkDwGbkAZUUtZlor" +
+ "CGHFFIkqUrRhxgMJB68bJedguTa7L1cmjNiwpEjFYmlAFEANGhRu+FBdJgUlb+itYpLhS9e+sqou" +
+ "8GwAGRQBD6gRE4/rD9x71IXGomMpBwzAxWCKQqUBQqNKgqXLiV3bppW8JdCriy8WRjlL/y1ldMRN" +
+ "K2pRQFbRHHIpqmjKgqoiL/dcyukplgqt/fhMTEmmVy2jHGg399Na2lx0mApifu28Z7LB3WyX7mAd" +
+ "D99Hq/Cj0hGInwCg7T8PY/TDUMet3DA3yc4aFiKkE/pSz+ovbPD+L8fxI+cfp22n9HmdfqF67pXR" +
+ "+uPpkTj7JuUM554R0uKFZo0uwL/244GOE/tg+zWdJ3fbGmaQg1dnHTLH4+KPnFDj9Vq1ZNL/eozL" +
+ "Oipce/ukJE/6vGGCvqFnbZvqQ34x9B/Cr02eF0o6TvQP8Djg+slju2sLO0IOiOv32aRo+4034LLE" +
+ "svPHM1XAdlzu7umNN0T+MWQPqHjxOSv6tjrUsed7MxDZ6lscn38Yw1ZDHN27SuxtezttN+ryiaRO" +
+ "XO4cZxK4nG9Sxll+s7P2/WoC06HgAniO1M0rO00euOEpcOtyWHtwG/d+iPxcl+LSkORcLIsRkQRY" +
+ "xZkpLTK1Uf7q5MMuiLCRIiIxg39+YMUrdMoqnzK8S9SZNNjS6vRlVG0vLrmmBkmElFkgUhqSZUoy" +
+ "UmokxRtubunYNSN3r7eVeSuxCvS8sVJUbTZpialZgpN5eSOUARUHSKXmk/EfaD1QAkB/R97g+n6D" +
+ "26vxDEMzIsfuDQBwA+SQf6mQD7t/2mqYNm7/n+41MP0TCXIP/o8z8QRjGRgqxFWaMY9g2K3/ibbn" +
+ "CVQUGLt/a2uMYK9wdkaT/RV/f+lsNgbDUGDIrtjJIGxuLmjHdRBiSlIeBRA55x/gJCZKPkGhb5gI" +
+ "JJWoXgE/xQxRGsG8zgwNRkv6s1qmrMuJy7kvcz9XJcvrH/OQ/BrAHAYpIjVX6fsgUoh9SE5Nnd3g" +
+ "zZ5U311/Jt21rX2reXWLDTZ/Plt2iTpC7o2wIXi1ZXpMuC6o8jl5NNK1ufiCI4QYZ8zRkXIHc+o2" +
+ "dz09LIeRrw6SiggEnXNekIZCX/GNh80mkAv64zdnUUYI0HBAe+mYJ+Nr1mrcgsto/JjUU7aG0HJw" +
+ "+mYzx3Gbozde2ufknoISciz5pzjP/aWwB0x5a9CZA/D50hrXtw0a0Z74AjpLgzVltLPpLeL6iG0q" +
+ "eT0iGQ45tex4C64YGHHmL7H5CevzIRfV6WbHr9aOqNxCD9C+CUGRTi4P7HgYpJAYcQYpUDlYDyTZ" +
+ "uEAOmsMCvAloH931YhIqh4pM4neZHlDC7ge0QXGq3/NLHebo/hoKeLx0j4W6vYfxgmqONk1Z7due" +
+ "evpJXmdZdgqUfrP4SJAw0cwobQOPhxgmZKfQ6vLuWksVK01CgzfuOkOo9dB+BxE22TtpuR0dZtWx" +
+ "5D1mSnijyQwYG81v3lFp1zqdJyCT3oUR+eWUtlMov3JgIyU0IgUjij0OEElhAMjJ+KcAgKEwiian" +
+ "dEBke53FPGUpTUCivh9BPQ6TeB4ItgkHv95D5ja/YbE5Kcso/Ah83Gd1SfgrmWZa+wPapwe4uj0T" +
+ "jpLP0z5aD7gqh2N4eknQHYyEYxifBLfE73Xh6/iQvh0EgZswbko0hjTQy+okSCPz/dRWAhP5wpqw" +
+ "140Z3KDUno9Mj1DVf4gJcEhAuAxueaRvE3g3ECbMUAsVZTVzNPYDHEzgiCIDpOcyoJLlCUYWcet4" +
+ "7ePfQZgnwEPNsoYMlyTqz+j5vpktwW0r+fzEMVLJS375MNcESaVLotl3VcK3PHTjsVVFJ3ImDNmM" +
+ "xZAMde2fScG8uc8ZcMpgfnzNJbcHJ2tm5zhDJDGicfN9dMfMjVUO1RR+3bf0eOIquh8+LnG2HusW" +
+ "sWYE+LoxjDBuDur0G2LibFPEDPZ4d2LsHxCzY+kya2SyDctcxxMbhDQmjhzXanEHsHH8Xxb+M/5d" +
+ "lqVPIKkHerSdSSUu9nMGRBMD0tkxGAww5uHB3dbnIY8H4jKEJt549/JdtanPlOc7z8dWrmousQIS" +
+ "QPL3dohW47oSBtCNlmbWOTkS4SZCy3G4kR8IhnaNmh5eqaUO9Tu3ljXXoe56jpfcnek/iH+H1vTx" +
+ "ToHonOg8Gwcx7QnNg24NQkJjgF94VHeqSTLUDqap8BMXW7Rgihk0fA15wQ+fmff999UT+MVilpVv" +
+ "9/P9iHQYfglcQJx1eTrPcf1s/YP0/8f1/u/caT99S5oXWNyhVBcMwDsM/jFSrOPBDwI70ki97A8P" +
+ "h7POfVftueN7/4bc3zV3EfGmj4EVKYLiCEiDYLHGYX9qm0SEAiRIEDuA8Z+YiYA/PUEkFF+MAKiR" +
+ "P2QpOQQdhjIkDIH1yFmsx7DTsealkpikVJonTCoxIp16sK8zzCRJJCfB+vkaptsMEMjbzVE6/9CC" +
+ "XslEEkDiZnPqb7xvvLWb6EBuGSpbCWJbOzPPIekhGTrDqCgCRGXg7wE/WCI+xZbbCVCIkySVhDU6" +
+ "iSHwoqKSnM9om4Z+VKwjShuINg52K8xiMgTwcy+gB5aaaOlIdh6ltZRzk3GM2E1j3QVv0JgtFBEi" +
+ "B9KFkiEEIztjqiVuhtcVgDgDMCQEiQclOBoAb8j0kNzmZqMgqIQiZyBxTqm6JIyIan6NinYhxYSG" +
+ "JyxBA7ymhR8re9Z0wbHbWDFwvUz+H2n2RjBgBMwyhQIayPV9Z14rzyRErRFjaGPLy67W6iyXl3Bi" +
+ "baZCCO67rXs83l5nOutKxBdZDJhhgR1o0apYxhmB4jBgRjEkIT4M9v1zp/I+fbCK8HnO575lkn/x" +
+ "DEhI1lUimGCeYmY5MEkeC/y8HN0fCoDIwZ9/3pzHcanVKpKQPfBNYgf8IpQ06r+VWJIT5W9+InZH" +
+ "GBcbENwEEToXgsIRM0+tLJYkbNix6sWTPLym4icYJ6NsCHrhCHEKRg49maIIwxhSFlsVLRgmJqBb" +
+ "AumFgMpAs0VWMksRvTYghmJ9oesSkwRgrCKDMOdW2onug6Y0rN142vIQBbkKICtRkQq6UsiWaIXf" +
+ "c4N2bAwue2bqKYCGpIiOjrJ9ILIqidEw1MsBF6lIgwsIUJQClSjJAxAJoD8OKwGYB+kzQbYCMTnC" +
+ "nptKOOJa5ZHsK0mYAYNjHHrhFUh+gdf22ft4lhwoht/4iB7pvf74yUstSpWW2BpaTEzMUNDT3+Xx" +
+ "tPZn5va3v7uWsyKsGANWqXAuyIX15bBzAkZcp8ThuDWjZkp7muszHKImsbggb0fmTRp3aoY0BZww" +
+ "qBtlHwvDMYcNnFUOcLBBiqRETh5a8C65MWUeQ3hMEGJA4axRgXCw3LeXMtTZrYS7gOPxqwk/9yho" +
+ "kEN2xaGzpqw0Sx7DP2Rx5OAjGC2nhkCp8eZ7Pcl6KjB7Y1OtCDUXvxr/fIo5Y61MRMo4QBdOORqc" +
+ "H7TSFEUZGRhWkgiiS2Vg2yEsAtkkoqEBBMU6tPGHlxJyOznTetzfbDkQQst0/e/824wA3uKb+eks" +
+ "8KhidRlsSMJBJEDAGfzk7/5Zwkpr3THH5M4PBEx5n17Ub0qggdJM6LfZGplTeD7d7M4RbsaW+zIh" +
+ "bbHrVtBWQYhgTBtzG8s+zmYYfbLM0FtOXg3zdMTnLhLwVII2G07inYX08zDn46f98SfttMDc7tdq" +
+ "tR1vJxHXPFvm56Di3fbb7CB5oO2a2Qkju78J+mXaTrL884tikdO2h9ScaToWOhUMzwO0W+zHSZ3r" +
+ "gy5mzHTPHYxsYRs8BGEQ+z4iyuKoWDUuxuuUwlwHdjD1w7IqRDSnYXEtsIFvacd43TY41gWmzczS" +
+ "imfZnvZw6hxrbbgziJaIZmveTeQXOoZsrON81oli52q8qR91ydprp136HHBswDP06BnoTlbpY3Bp" +
+ "hxKurWoC0sheZ0mG1NnXPK+WlJUMluUhjBkEb5UN5eLeEtxZkYYDTjx3XXn15raUWGBjKdQ2iYzq" +
+ "u80wb8DmFyWsdxFmhLGIyYgd3WU0Pd8HW9zvOpFDiJdh5QzUuMvN1MXW8Xc3O0TnOCSjDNYZY0OO" +
+ "1l7JZqnMMugzQwuoDOzTRBiDjHcGRGNUQQ2DOnKqECwRXKd7FCkOgWFiBxOkpCHZANAzRcxiCQYb" +
+ "TJBF6CLIoRQDtP4fLn9Peg4WBtZDpZ5UAwYLAEQURCfyfn6S47noxNAXMzYSQFhCCyECABAmB0Kz" +
+ "sw98wXf6rwgt4pBiQBukIhpoDiPT1PZtXMNxjvUQ4/qymZQ5rMw2BooMJn8SQkzvzpPgv1xtKu2M" +
+ "bMMfIRhYQNysAjqwTTY7i2ZqmOtw3gIc0oq6OqHWU39P0my8MNYbESokIP1kAOhFL2GQCw5GcPsj" +
+ "5BJdoBvGEeRzM8J2Jyx6nk5l6oJCrEGKvhCHMTXB1hYG1fP3a1n2ZA7vGrcbs+3KApFTBlZS2mMh" +
+ "JDECQxtcC34jSXUwOnsNeEHhiI8GWOiMInnEM6+bYdZ4z4ezEWCLEioyDEjAFmk+g8b2NRvRdMbj" +
+ "ZSNjM2KKmb6Ha6hS2zWlBqPh9L2eW2vVXy+veMsGVCKUsUCSoPWmmGMsjWUJLl8YlplnIPSBobnz" +
+ "ppHclkdYC2eWr5gqG0KcDtgoe2Bm1EVjFJ0rBCCqWhOGR00mSNBFDeJuA8I+jSGykN9il6Shmj1k" +
+ "D88BYgyLCe6lM1XjJDIY5DwVNmny26pmRqq5hxN0770E37hPulwMJkrjLS3TImIOLamTjAFEyWKm" +
+ "xQFKMhxOvYsr5MAgQ3/OJ4QOYm5WQP0hXg5AA5xQYME7fFCoBIJEOPM32CAfqQ2oO5cPfF8JERhB" +
+ "SU0J+SCWAXFy9RupRaY/bh9QdwQP3sZJHx6EPIQ+J8mOUvp8vfAfZP4sJgRGLbKMUgxAKRkKrCEi" +
+ "viWV+jrJIglYLIRqj0ko6QxcWWHtEoXyCSQbiZMgAicn6GG+0YcTCSFz0sVIOk4Sfnequ1CyymVQ" +
+ "LQ3mt2q9FRkJa3zVEkFgJjEzOjuygElBVCB2m2ZUnPzGrmfRqfDs8KSCiCMVjGD5EPW8dBEnA/dZ" +
+ "26RHQB3mI9AGQ0dG8Yez3OW9Uo2lBBthKkbYWuYUzxyEODR/OB+Mw09HWNPsDiBdsvpDYtitRVJQ" +
+ "bURSAxT1TiElh9RIO5SqWwOMh79GtpJXuRhkfidxAn0IIP0sULRYwRhbbbZVw8w3Dx69lZ8oQtn+" +
+ "wP+h0JOY/eeT4y/Y+mynVjc5IYJQb0t3QkHIPqgQ4JxJmb5W/6+t16TV6Q+by3Xlmv0stEbJZYrP" +
+ "3Vpoa9J+LBhGBGAPEoVOegvTxtQgwZRI2goEUkkG2VKwlJ0nh0HWKmRzfwpOI/YkTF/JwVzgiceK" +
+ "QIjIE8TnxOv173TUwNt4te2B1fU15wGEE6oPpez8o+JryMT3HvDXaF3ii9ywJEDh29LbRHw35sTZ" +
+ "HTbm0Dz3w6O+XOshot1XKs5Lyq9XgmgGRMLOl2h0wOL4dK8nS97r4YhKE+/uuOPkGz7ENQzrDqaK" +
+ "eCCxggisgKqJQkgGoosJGYdV6vjqW6etE4h8zj2jpuIA8yMkgoSDUix+cZAYrLAfWAwz41REqpH0" +
+ "nyD7fFGk2pLUWmZq0jVTaV87gpTimFoMk6CG0MKU9N2JZqGZMCzUFNQKXCFie2Bk6NFkN2iahqd0" +
+ "TUL0PoBd0Z290I/cUoEZ4MYRRbKLTp6ZNhloaSFsqo0paokUEGQjIQIiRYC/pNEC6IqiF8Dkeyqn" +
+ "JJo/j+AEzeusxpCBHZbt3Z3nEOiGpTDhSLd02YNlpvN3JN2biuIUTWVJkqlpZm2SadzIymtOoIwm" +
+ "9Cm4MSGFJl3fXvWwqG8TZUw4NAZGMJrJOfufKAya+i0Gw7zE2PDQVPZippYfkBJIblusI7LkQF4w" +
+ "TieqM1Q391XtVi1ECRGwuacU3RoM+hiBIFBRIZW/vXKsjEOMVmhRmGZaE7y9THsnwzG4vjKAkhGc" +
+ "wJ1qQdFgniU0EqNFctIja5vRKLqjOiKgxZIk7lAoBg22zgmZRQssDPaAyL90EObLBA6eghCMQhdt" +
+ "CL5/ses39Q/Kjqia4HvV7wOFvEaShymnHiMeJQ0SYBGE8aFnxalICkMPOw0qOUl3Nwgckkj8w0L4" +
+ "9fVrVNZNOPnwdJycD9FNJ9886azUp5tqGY+EAYeKTfvgnWyMDoYgZGLDNSmJnCqaAMIBkGdDc8rR" +
+ "RIpCpUktoRdFzBodMKjG1K865pNFr0q+DTbT9cKuI6noLmhbcIUQFHS5v377BVJTsRM38/k7bjVQ" +
+ "/QsGFAWOwy4omnhwaQ4dir9UBWLBQtxIJqOc0kd+1gLNFJRamnepDQhCb0D22mGERkybwyhxbkvG" +
+ "DfXrYw0hu4GOIYTDa3IR130b1DVq4FlBjTdyZZILa5cMBJorNMsfJKzYbIZibbkDp9eD+qcSCJ+Z" +
+ "Aw6J6JiTwaKiMsCRrPJo/VKomqUUaNX77+KQwCQBk8d+WuyGzDeB+XezzxcuJGLIhkMpMD6P173X" +
+ "LtobHIhvI8zl/jzAYzfP15Vtfno0bRSr3OiMZIyCc76lEhkyY6kJdFFExO7MSLFNET9zDMoTSfEm" +
+ "FECcF1Y5N4ToR0aUA3GSzFkiICKKM2wagnNB58ypLSPqzEaq0TxVGQloCZoMHKnM4RsYCB3sjADF" +
+ "0ulOqQx3OhD3kXkllMGDo+iI0e2gNQihIWnefq7k8HyQBTwO6HqOTDBbhLDMeBmE3d2ry1uaxUlV" +
+ "9WZLWNc18Mua2SNpqTx2umteedVqW9zIWW4rAboajE0SBhAcQLS6xZdoLE5myiDDRCnAer5IeqVC" +
+ "p4fZ8tnsnIL0sMgb0WgFSV2D9yOEDOg9ScQ8SeBT9Fu13qH0Ia/TilDH0r7/kCRPayBFqjiF41Pn" +
+ "B+IRYJBzdlB68ANn839DLohhGQB64qMgHpYhQyLpQVEYEQUCwmtEiprwfikV8whevoRXFAgbsEuM" +
+ "IAGJosjS1IzJmtC2QVIJ85D3MhplhRsD2JLlKgZlCBGRTx7OIFoaJDWV1p6ZY2MA3mTkVuTCLvkY" +
+ "B9GQuA5JGEEkAIzNyD7XtQedjp3G16IAZoIFHukAm/wpuNsrbW9+RESIe+yorMlloVIl62QMxK0l" +
+ "JIsGBZaSASHuIqUkoOtNsqdiQ01oDA3qvbA9AFEWBFXviyRgWqSxkWs2irRtSWyo4XBSwbCYjsF0" +
+ "JyEDqA876sc4VAoO4NNd5wAlkHoPthseqcSMzdXvnnuMNy9LCQ76CTonH2SJtAO7mFUwWlkEafWW" +
+ "UJgaipGBIwwcBTZozNJTWvxlhY6P1jTHN1r7qs+a63NG80pJo1FGpCgpWmW9G07U7LmClLJRMtIH" +
+ "+XRZByw0WARSKtIlpEEa++lAsGIXNYJSOdY0GZbMFERKblrWECLFCWULJbSgFSpXyNoOytD3YL90" +
+ "xYSQhlD1QLJLQI0He9BzCEnVUSqicw+8My4R9hISYkJGYIxj8ruAhMajQwXdcJGBSBFRYiEzLDQs" +
+ "CajBMxmCr9tr+pNttLXxe3r5N7djRszWjJLEZs1mapMmmTJTQTNpSqUZsNU0JRlqNljWTbV+p7df" +
+ "Lo0rUkVjdV+CKMDKORHjOxLhIwk9G21jFEYFD4XjWjw8wvyPogFPIeTDwiBloHASYHMk8xALgXwl" +
+ "ATRqLTEQYWQsVkWQUKaMBwo7AQKQfAF3fSVyBBLobqUc9N30Yhd9lPGGxI9LQNomLwZp5ZZsMZkl" +
+ "oF2Byvel2w26lwkZCYQKHFs8KDgeFO2+29nFIKMOG7yWYijLbKDKNtLaksQtZVRtZBGNkVAxCiCA" +
+ "Y0LYLJWyyolpYoiIlGrAkS1LLY5k3YQxlKvO3TdNkNSU2Rdd21cyEIcUog9BsnPOQYJDHgyjFjMY" +
+ "rbgvBfJuwtEhGMMokttuSiYYRmQzSrobTNZGFRBRJ0D9I/mJERaCCLCgGiqRrIBlFPnSl5lPE51v" +
+ "mPyjjESFnwAxWlkO96k1MjkQjxldSypErtlBcLC2xJa5YIMOc9hTxTkPSHujC48AnAicrbndNoPO" +
+ "N74pxoN1p5k0VDQyShtPkmhEPSBIBwWmSBAhFI4ntAwUbinCB4hQIFQWEEWCWrvE3qfzQrTTT7si" +
+ "6zQ8MvTyensgBuMEix6adydCOBCBUjFYG+R5YCfYgcfe3KBA528A6ViECYJgPJNB3nSTyDyPKUoB" +
+ "/mQIKxFDYbNYIYrQNbnFO2rWmvkt5vFGebcxXGlIkCiBwVLS2QolREpXmBd2Q8XDpAVtaSkE0BTO" +
+ "nujaCkO9awitnCKKcMnFFHh6fqiPxztdZntuRCeDzyIgwh826nhMzIM2TOwEXW01STLWw5saZe6L" +
+ "ZJoHfoIya3HY79edGjjYfToLT9W+yIpw8X2hhlKhzNjppSbn3t5mBXnyGl+qT7uQbI5+TV6rtb5z" +
+ "y+41+l5LWFxPpRlQGUYQndmJEQkgvWI4R/1s40rG2dyJDQtbruUVR5sPluFVcb5o5DQrT35OfHg6" +
+ "nXsdDhJ4Nkg6D223DHsUoizm1yj4XOdaoIMlVhMBJZJmCIHqgC0gfgz7LGB9HflZG54HCcBh4375" +
+ "6X1dGN+X5axnNu8vqiV7DyNFDXakMyESZcSBwet+6o/TaDQ2yz52GvPcN8lqBxN23CHsR/XQBTJC" +
+ "lBxVhYJyjcQgQvEU1rk+6HSk9vKX+aSBPeAzRGEsBBisD2+XwrWjbRJaEliHqYvlo00yzvSnv9dM" +
+ "IE4khSVKE0W3I2lkgwSAHIhNIEKQQELu+sjBqOm7Ur2wecZHEVHbQYRG+frxWHNZz8VZk4Em5sHZ" +
+ "45CsKUcCifEbXdlIxssZqYYyRUVA+UgcJuAeJwptCkVnJypDkksFFCXJaUuMU2A9AwjZg0nU3GQF" +
+ "qrx3zaKJS3bl733s0xg0apuNuDStMwxlcQVMQQKVQSCZvRLTcU76R4xLMmc45p69aBkD9poNHIAd" +
+ "IFnQkWRDo32AsplDEwLMsMJsGweqY8JPrmunefNpeK8/dLFIqiYhNYz0QzOmhJGEB4LqASPQy9S8" +
+ "obyytQSt66RgQTZZrWZKxiBqQEicBaQPIO6uPfxPFVgzwxzWUbAkltjaNVbTLUj8W+oEtzaWw8tn" +
+ "JhMw+KeonmDEPs9ppd82wYnDsFIVXJTYejCLMRdxe17QzSmWWQ5F4rbErEQhMxuQb6n4lrW+BF4V" +
+ "MbVfZ4moMOjGHVTmNx+DkrbHWs9JZwe2dbvDNDJnT1xJDMtVDIDNVn28eMDhnCKVCs4SsDGI3JRC" +
+ "4FRQycOmGmzVtDCswMNYHQutmo1uWyqAiLp4YmEIKcdLMpQRYzDRcy/Gryi4zHhmO2DrMlwtiFxs" +
+ "y2URYJEW2gl9WQpkJcLLPWevecJ17XXby7blWRRB4c6cgYhEYsM8wsNyABYwJtUgZTpNybGcdonJ" +
+ "jJYb3nicBcbBxDZzEMgiSIY4IkvGEhqJZLjBsFwzJlyJGR+DaLlt2SkuN17TCLhcW8YTBMwUziQJ" +
+ "n52sYOp21W0RM8UC+fKzk0bnoqBHWMxnAW7wCKc/x7rcjpmWhpRANpXlDKoBjEXS35bNSwzddkdA" +
+ "OajcSPD5WSQxnM63z99hzqciJVGxghWs2lipUVyOSjj0zMZ8aVDnmx9pb2tWoKtfFa3u2xrTKS1N" +
+ "7OFeumgtBKKaR+2UJzieUMYBjAIR0WTWmbctjckr7N3VPOru7XMVNk3dt2WIqK02ZudmLFCQkCqp" +
+ "qCyBjGVEdTfF1r7+h+B4O7cou29BYbMh0BFODClliYY5AfJs4+D71Yp7UjPhZjgi333MsPyptUte" +
+ "pFqLJSVa3K525vVziUCCba1HiWF6EI0alvjIt9W7XktfUWvmlum4Kk1aPtoT6dBkB9UaFZ5QZbHG" +
+ "W9Hx/keXtc/nnahU1Y7RoJIXYWFhEDWKe07iby+65oodgnCkf5NWkMTu19eoiz4tB2FkEbAkZFkC" +
+ "QJE2Av9uxj+i4HbYr0Tvi1I5100j8WCciL7h7fGgQTpfTgkJBFPsDsIMZBj5Wy+oD9j+QeOzkqpU" +
+ "q/oD+P02H4E8UHwsrFH7aSsGVsBMw62mEXoSkQ84lgDk6QPTQSKJ6IDuMet75Q5MuoXGTnYascmB" +
+ "kZYOrLA4yQwFTEheZ+Y+BIKiIshoD3MOAx7LfBLUJvRj7KCQhCEoyU2M7LULDIge6lGgjgY1GgVP" +
+ "1KiERIjIAqighIyEC+Xs59Werg1dzsxTVbdmPUHCsMCzELDJzLSojrMVCiDFw8Wmp7p8Vfz5LJrI" +
+ "SQcTIJk0em8ShhFjDJtzeGIl0lZ35N7yVChV+qBCJAjIDCMsy22FjGaitTTZRNUXvy4bk3m7YZ2P" +
+ "WRoBNMYUgOEQMeLhWFF1FeiKoHKwXDHI4GF4EzoogSYlFYVPFwyzgyUiM/HtTQzSwY3/935P/pVS" +
+ "I5ztPxjuSv4UbQOH7cbKdMD1cq9uVWjVUZovZM7cZLxSrw2eWrDGsDgVWAPhYSdXl3xfH0oaTwfb" +
+ "21zqsFhC8NIHdIQSGZveMwM7oSy4ZzP7nD3WnjXGmq73mP93ldP8PvgOpMwbfV1RvR+V/DOnF9rK" +
+ "v9hdyRThQkN3QmOE"
diff --git a/gcc/testsuite/go.test/test/bench/go1/regexp_test.go b/gcc/testsuite/go.test/test/bench/go1/regexp_test.go
new file mode 100644
index 0000000000..3ce9f3a2c6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/regexp_test.go
@@ -0,0 +1,59 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package go1
+
+import (
+ "math/rand"
+ "regexp"
+ "testing"
+)
+
+// benchmark based on regexp/exec_test.go
+
+var regexpText []byte
+
+func makeRegexpText(n int) []byte {
+ rand.Seed(0) // For reproducibility.
+ if len(regexpText) >= n {
+ return regexpText[:n]
+ }
+ regexpText = make([]byte, n)
+ for i := range regexpText {
+ if rand.Intn(30) == 0 {
+ regexpText[i] = '\n'
+ } else {
+ regexpText[i] = byte(rand.Intn(0x7E+1-0x20) + 0x20)
+ }
+ }
+ return regexpText
+}
+
+func benchmark(b *testing.B, re string, n int) {
+ r := regexp.MustCompile(re)
+ t := makeRegexpText(n)
+ b.ResetTimer()
+ b.SetBytes(int64(n))
+ for i := 0; i < b.N; i++ {
+ if r.Match(t) {
+ b.Fatal("match!")
+ }
+ }
+}
+
+const (
+ easy0 = "ABCDEFGHIJKLMNOPQRSTUVWXYZ$"
+ easy1 = "A[AB]B[BC]C[CD]D[DE]E[EF]F[FG]G[GH]H[HI]I[IJ]J$"
+ medium = "[XYZ]ABCDEFGHIJKLMNOPQRSTUVWXYZ$"
+ hard = "[ -~]*ABCDEFGHIJKLMNOPQRSTUVWXYZ$"
+)
+
+func BenchmarkRegexpMatchEasy0_32(b *testing.B) { benchmark(b, easy0, 32<<0) }
+func BenchmarkRegexpMatchEasy0_1K(b *testing.B) { benchmark(b, easy0, 1<<10) }
+func BenchmarkRegexpMatchEasy1_32(b *testing.B) { benchmark(b, easy1, 32<<0) }
+func BenchmarkRegexpMatchEasy1_1K(b *testing.B) { benchmark(b, easy1, 1<<10) }
+func BenchmarkRegexpMatchMedium_32(b *testing.B) { benchmark(b, medium, 1<<0) }
+func BenchmarkRegexpMatchMedium_1K(b *testing.B) { benchmark(b, medium, 1<<10) }
+func BenchmarkRegexpMatchHard_32(b *testing.B) { benchmark(b, hard, 32<<0) }
+func BenchmarkRegexpMatchHard_1K(b *testing.B) { benchmark(b, hard, 1<<10) }
diff --git a/gcc/testsuite/go.test/test/bench/go1/revcomp_test.go b/gcc/testsuite/go.test/test/bench/go1/revcomp_test.go
index 9256164d76..6b6c1e5772 100644
--- a/gcc/testsuite/go.test/test/bench/go1/revcomp_test.go
+++ b/gcc/testsuite/go.test/test/bench/go1/revcomp_test.go
@@ -77,9 +77,9 @@ func revcomp(data []byte) {
}
}
-func BenchmarkRevcomp25M(b *testing.B) {
- b.SetBytes(int64(len(fasta25m)))
+func BenchmarkRevcomp(b *testing.B) {
+ b.SetBytes(int64(len(fastabytes)))
for i := 0; i < b.N; i++ {
- revcomp(fasta25m)
+ revcomp(fastabytes)
}
}
diff --git a/gcc/testsuite/go.test/test/bench/go1/time_test.go b/gcc/testsuite/go.test/test/bench/go1/time_test.go
new file mode 100644
index 0000000000..4687de31c1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bench/go1/time_test.go
@@ -0,0 +1,25 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package go1
+
+// benchmark based on time/time_test.go
+
+import (
+ "testing"
+ "time"
+)
+
+func BenchmarkTimeParse(b *testing.B) {
+ for i := 0; i < b.N; i++ {
+ time.Parse(time.ANSIC, "Mon Jan 2 15:04:05 2006")
+ }
+}
+
+func BenchmarkTimeFormat(b *testing.B) {
+ t := time.Unix(1265346057, 0)
+ for i := 0; i < b.N; i++ {
+ t.Format("Mon Jan 2 15:04:05 2006")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/bench/shootout/Makefile b/gcc/testsuite/go.test/test/bench/shootout/Makefile
deleted file mode 100644
index e1c9b7b80e..0000000000
--- a/gcc/testsuite/go.test/test/bench/shootout/Makefile
+++ /dev/null
@@ -1,14 +0,0 @@
-# Copyright 2011 The Go Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style
-# license that can be found in the LICENSE file.
-
-include ../../../src/Make.inc
-
-all:
- @echo "make clean or timing"
-
-timing:
- ./timing.sh
-
-clean:
- rm -f [568].out *.[568]
diff --git a/gcc/testsuite/go.test/test/bench/shootout/binary-tree.c b/gcc/testsuite/go.test/test/bench/shootout/binary-tree.c
index 1b4070406f..9c35ac52a9 100644
--- a/gcc/testsuite/go.test/test/bench/shootout/binary-tree.c
+++ b/gcc/testsuite/go.test/test/bench/shootout/binary-tree.c
@@ -36,7 +36,6 @@ POSSIBILITY OF SUCH DAMAGE.
icc -O3 -ip -unroll -static binary-trees.c -lm
*/
-#include <malloc.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
diff --git a/gcc/testsuite/go.test/test/bench/shootout/k-nucleotide.c b/gcc/testsuite/go.test/test/bench/shootout/k-nucleotide.c
index 3bace391c4..9c30620209 100644
--- a/gcc/testsuite/go.test/test/bench/shootout/k-nucleotide.c
+++ b/gcc/testsuite/go.test/test/bench/shootout/k-nucleotide.c
@@ -221,7 +221,7 @@ main ()
free(s);
- g_ptr_array_foreach(roots, free, NULL);
+ g_ptr_array_foreach(roots, (GFunc)free, NULL);
g_ptr_array_free(roots, TRUE);
return 0;
diff --git a/gcc/testsuite/go.test/test/bench/shootout/mandelbrot.go b/gcc/testsuite/go.test/test/bench/shootout/mandelbrot.go
index 1f9fbfd3d4..df60343c24 100644
--- a/gcc/testsuite/go.test/test/bench/shootout/mandelbrot.go
+++ b/gcc/testsuite/go.test/test/bench/shootout/mandelbrot.go
@@ -50,21 +50,21 @@ func main() {
out := bufio.NewWriter(os.Stdout)
defer out.Flush()
- w := *n
- h := *n
+ w := float64(*n)
+ h := float64(*n)
bit_num := 0
byte_acc := byte(0)
const Iter = 50
const Zero float64 = 0
const Limit = 2.0
- fmt.Fprintf(out, "P4\n%d %d\n", w, h)
+ fmt.Fprintf(out, "P4\n%d %d\n", *n, *n)
- for y := 0; y < h; y++ {
- for x := 0; x < w; x++ {
+ for y := 0.0; y < h; y++ {
+ for x := 0.0; x < w; x++ {
Zr, Zi, Tr, Ti := Zero, Zero, Zero, Zero
- Cr := (2*float64(x)/float64(w) - 1.5)
- Ci := (2*float64(y)/float64(h) - 1.0)
+ Cr := (2*x/w - 1.5)
+ Ci := (2*y/h - 1.0)
for i := 0; i < Iter && (Tr+Ti <= Limit*Limit); i++ {
Zi = 2*Zr*Zi + Ci
@@ -85,7 +85,7 @@ func main() {
byte_acc = 0
bit_num = 0
} else if x == w-1 {
- byte_acc <<= uint(8 - w%8)
+ byte_acc <<= uint(8 - uint(*n)%8)
out.WriteByte(byte_acc)
byte_acc = 0
bit_num = 0
diff --git a/gcc/testsuite/go.test/test/bench/shootout/threadring.c b/gcc/testsuite/go.test/test/bench/shootout/threadring.c
index 2c4fb77515..a518134ba6 100644
--- a/gcc/testsuite/go.test/test/bench/shootout/threadring.c
+++ b/gcc/testsuite/go.test/test/bench/shootout/threadring.c
@@ -34,6 +34,7 @@ POSSIBILITY OF SUCH DAMAGE.
* contributed by Premysl Hruby
*/
+#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
@@ -57,7 +58,7 @@ static struct stack stacks[THREADS];
static void* thread(void *num)
{
- int l = (int)num;
+ int l = (int)(uintptr_t)num;
int r = (l+1) % THREADS;
int token;
@@ -94,7 +95,7 @@ int main(int argc, char **argv)
pthread_mutex_lock(mutex + i);
pthread_attr_setstack(&stack_attr, &stacks[i], sizeof(struct stack));
- pthread_create(&cthread, &stack_attr, thread, (void*)i);
+ pthread_create(&cthread, &stack_attr, thread, (void*)(uintptr_t)i);
}
pthread_mutex_unlock(mutex + 0);
diff --git a/gcc/testsuite/go.test/test/bench/shootout/timing.log b/gcc/testsuite/go.test/test/bench/shootout/timing.log
index 2541a766b7..4e7d17a11b 100644
--- a/gcc/testsuite/go.test/test/bench/shootout/timing.log
+++ b/gcc/testsuite/go.test/test/bench/shootout/timing.log
@@ -900,3 +900,355 @@ threadring 50000000
chameneos 6000000
gc chameneosredux 7.41u 0.00s 7.42r # -3%
+
+# A complete run at the Go 1 release.
+# Significant changes:
+# - gccgo is now enabled for all tests (goroutines are cheap enough)
+# - threadring and chameneos are 14% faster, probably due to runtime changes
+# - regex-dna 36% faster
+# - fannkuch-parallel (only) slowed down 40%
+# - gccgo on binary-tree-freelist is still optimized to nothing
+# Other changes are modest.
+
+fasta -n 25000000
+ gcc -O2 fasta.c 1.45u 0.02s 1.48r
+ gccgo -O2 fasta.go 1.46u 0.00s 1.47r
+ gc fasta 1.99u 0.01s 2.00r
+ gc_B fasta 1.99u 0.01s 2.01r
+
+reverse-complement < output-of-fasta-25000000
+ gcc -O2 reverse-complement.c 0.95u 0.48s 4.99r
+ gccgo -O2 reverse-complement.go 0.93u 0.16s 1.09r
+ gc reverse-complement 1.20u 0.19s 1.39r
+ gc_B reverse-complement 1.04u 0.16s 1.20r
+
+nbody -n 50000000
+ gcc -O2 -lm nbody.c 13.02u 0.00s 13.05r
+ gccgo -O2 nbody.go 14.46u 0.00s 14.49r
+ gc nbody 21.79u 0.00s 21.84r
+ gc_B nbody 21.74u 0.00s 21.79r
+
+binary-tree 15 # too slow to use 20
+ gcc -O2 binary-tree.c -lm 0.60u 0.01s 0.61r
+ gccgo -O2 binary-tree.go 1.30u 0.01s 1.32r
+ gccgo -O2 binary-tree-freelist.go 0.00u 0.00s 0.00r
+ gc binary-tree 1.84u 0.01s 1.86r
+ gc binary-tree-freelist 0.33u 0.00s 0.33r
+
+fannkuch 12
+ gcc -O2 fannkuch.c 45.24u 0.00s 45.34r
+ gccgo -O2 fannkuch.go 59.76u 0.01s 59.90r
+ gccgo -O2 fannkuch-parallel.go 218.20u 0.01s 61.60r
+ gc fannkuch 103.92u 0.00s 104.16r
+ gc fannkuch-parallel 221.61u 0.00s 60.49r
+ gc_B fannkuch 53.17u 0.00s 53.30r
+
+regex-dna 100000
+ gcc -O2 regex-dna.c -lpcre 0.47u 0.00s 0.48r
+ gccgo -O2 regex-dna.go 6.52u 0.00s 6.54r
+ gccgo -O2 regex-dna-parallel.go 14.40u 0.73s 4.35r
+ gc regex-dna 2.63u 0.02s 2.66r # -36%
+ gc regex-dna-parallel 2.87u 0.01s 1.11r
+ gc_B regex-dna 2.65u 0.00s 2.66r
+
+spectral-norm 5500
+ gcc -O2 spectral-norm.c -lm 15.78u 0.00s 15.82r
+ gccgo -O2 spectral-norm.go 15.79u 0.00s 15.83r
+ gc spectral-norm 19.76u 0.00s 19.80r
+ gc_B spectral-norm 19.73u 0.01s 19.78r
+
+k-nucleotide 1000000
+ gcc -O2 k-nucleotide.c 5.59u 0.03s 5.63r
+ gccgo -O2 k-nucleotide.go 4.09u 0.03s 4.13r
+ gccgo -O2 k-nucleotide-parallel.go 4.50u 0.06s 1.63r
+ gc k-nucleotide 9.23u 0.02s 9.27r
+ gc k-nucleotide-parallel 9.87u 0.03s 3.55r
+ gc_B k-nucleotide 9.20u 0.00s 9.22r
+
+mandelbrot 16000
+ gcc -O2 mandelbrot.c 36.09u 0.00s 36.18r
+ gccgo -O2 mandelbrot.go 41.69u 0.01s 41.80r
+ gc mandelbrot 60.91u 0.02s 61.07r
+ gc_B mandelbrot 60.90u 0.00s 61.04r
+
+meteor 2098
+ gcc -O2 meteor-contest.c 0.09u 0.00s 0.09r
+ gccgo -O2 meteor-contest.go 0.09u 0.00s 0.09r
+ gc meteor-contest 0.14u 0.00s 0.15r
+ gc_B meteor-contest 0.14u 0.00s 0.14r
+
+pidigits 10000
+ gcc -O2 pidigits.c -lgmp 2.27u 0.00s 2.27r
+ gccgo -O2 pidigits.go 8.65u 0.00s 8.67r
+ gc pidigits 3.70u 0.04s 3.75r
+ gc_B pidigits 3.72u 0.02s 3.75r
+
+threadring 50000000
+ gcc -O2 threadring.c 40.91u 369.85s 323.31r
+ gccgo -O2 threadring.go 26.97u 30.82s 57.93r
+ gc threadring 12.81u 0.01s 12.85r # -13%
+
+chameneos 6000000
+ gcc -O2 chameneosredux.c -lpthread 9.44u 72.90s 12.65r
+ gccgo -O2 chameneosredux.go 7.73u 7.53s 15.30r
+ gc chameneosredux 6.51u 0.00s 6.53r # - 14%
+
+# After http://codereview.appspot.com/6248049, moving panicindex
+# calls out of line (putting the likely code into a single path and shortening
+# loops). Significant changes since the last run (note: some are slower for
+# unrelated and as yet undiagnosed reasons):
+
+nbody -n 50000000
+ gc nbody 19.10u 0.01s 19.19r # -12%
+ gc_B nbody 19.19u 0.00s 19.23r # -12%
+
+binary-tree 15 # too slow to use 20
+ gc binary-tree 1.49u 0.01s 1.51r # -19%
+
+fannkuch 12
+ gc fannkuch 60.79u 0.00s 60.92r # -41%
+ gc fannkuch-parallel 183.51u 0.01s 51.75r # -14%
+ gc_B fannkuch 51.68u 0.00s 51.79r # -3%
+
+k-nucleotide 1000000
+ gc k-nucleotide 9.74u 0.04s 9.80r # +6%
+ gc k-nucleotide-parallel 9.89u 0.05s 3.59r # +1%
+ gc_B k-nucleotide 9.39u 0.02s 9.43r # +2%
+
+mandelbrot (much slower, due to unrelated http://codereview.appspot.com/6209077)
+ gc mandelbrot 100.98u 0.00s 101.20r # +65%
+ gc_B mandelbrot 100.90u 0.01s 101.17r # +65%
+
+meteor 2098
+ gc meteor-contest 0.13u 0.00s 0.13r # -13%
+ gc_B meteor-contest 0.13u 0.00s 0.13r # -7%
+
+# May 30, 2012.
+# After http://codereview.appspot.com/6261051, restoring old code generated
+# for floating-point constants. Mandelbrot is back to its previous numbers.
+
+mandelbrot 16000
+ gcc -O2 mandelbrot.c 36.07u 0.00s 36.16r
+ gccgo -O2 mandelbrot.go 41.72u 0.01s 41.90r
+ gc mandelbrot 60.62u 0.00s 60.76r
+ gc_B mandelbrot 60.68u 0.00s 60.82r
+
+# May 30, 2012.
+# After http://codereview.appspot.com/6248068, better FP code
+# by avoiding MOVSD between registers.
+# Plus some other timing changes that have crept in from other speedups,
+# from garbage collection to Printf.
+
+fasta -n 25000000
+ gc fasta 1.76u 0.00s 1.76r # -12%
+ gc_B fasta 1.71u 0.00s 1.72r # -12%
+
+nbody -n 50000000
+ gc nbody 17.56u 0.00s 17.60r # -8%
+ gc_B nbody 17.30u 0.00s 17.34r # -10%
+
+fannkuch 12
+ gc fannkuch-parallel 155.92u 0.01s 44.05r # -15%
+
+k-nucleotide 1000000
+ gc k-nucleotide 9.22u 0.01s 9.26r # -5%
+ gc k-nucleotide-parallel 9.23u 0.03s 3.26r # -9%
+ gc_B k-nucleotide 9.22u 0.03s 9.28r # -2%
+
+mandelbrot 16000
+ gc mandelbrot 44.80u 0.00s 44.90r # -27%
+ gc_B mandelbrot 44.81u 0.00s 44.92r # -26%
+
+pidigits 10000
+ gc pidigits 3.51u 0.00s 3.52r # -6%
+ gc_B pidigits 3.51u 0.00s 3.52r # -6%
+
+# Aug 28, 2012
+# After some assembler work in package big.
+pidigits 10000
+ gc pidigits 2.85u 0.02s 2.88r # -22%
+ gc_B pidigits 2.88u 0.01s 2.90r # -21%
+
+# Sep 26, 2012
+# 64-bit ints, plus significantly better floating-point code.
+# Interesting details:
+# Generally something in the 0-10% slower range, some (binary tree) more
+# Floating-point noticeably faster:
+# nbody -25%
+# mandelbrot -37% relative to Go 1.
+# Other:
+# regex-dna +47%
+fasta -n 25000000
+ gcc -O2 fasta.c 1.43u 0.03s 1.46r
+ gccgo -O2 fasta.go 1.47u 0.00s 1.47r
+ gc fasta 1.78u 0.01s 1.80r
+ gc_B fasta 1.76u 0.00s 1.76r
+
+reverse-complement < output-of-fasta-25000000
+ gcc -O2 reverse-complement.c 1.14u 0.39s 11.19r
+ gccgo -O2 reverse-complement.go 0.91u 0.17s 1.09r
+ gc reverse-complement 1.12u 0.18s 1.31r
+ gc_B reverse-complement 1.12u 0.15s 1.28r
+
+nbody -n 50000000
+ gcc -O2 nbody.c -lm 13.02u 0.00s 13.05r
+ gccgo -O2 nbody.go 13.90u 0.00s 13.93r
+ gc nbody 17.05u 0.00s 17.09r
+ gc_B nbody 16.30u 0.00s 16.34r
+
+binary-tree 15 # too slow to use 20
+ gcc -O2 binary-tree.c -lm 0.61u 0.00s 0.61r
+ gccgo -O2 binary-tree.go 1.24u 0.04s 1.29r
+ gccgo -O2 binary-tree-freelist.go 0.21u 0.01s 0.22r
+ gc binary-tree 1.93u 0.02s 1.96r
+ gc binary-tree-freelist 0.32u 0.00s 0.33r
+
+fannkuch 12
+ gcc -O2 fannkuch.c 45.19u 0.00s 45.29r
+ gccgo -O2 fannkuch.go 60.32u 0.00s 60.45r
+ gccgo -O2 fannkuch-parallel.go 185.59u 0.00s 59.49r
+ gc fannkuch 72.14u 0.00s 72.30r
+ gc fannkuch-parallel 172.54u 0.00s 43.59r
+ gc_B fannkuch 53.55u 0.00s 53.67r
+
+regex-dna 100000
+ gcc -O2 regex-dna.c -lpcre 0.47u 0.00s 0.47r
+ gccgo -O2 regex-dna.go 6.49u 0.05s 6.56r
+ gccgo -O2 regex-dna-parallel.go 14.60u 0.67s 4.42r
+ gc regex-dna 3.91u 0.00s 3.92r
+ gc regex-dna-parallel 4.01u 0.03s 1.56r
+ gc_B regex-dna 3.91u 0.00s 3.92r
+
+spectral-norm 5500
+ gcc -O2 spectral-norm.c -lm 15.85u 0.00s 15.89r
+ gccgo -O2 spectral-norm.go 15.86u 0.00s 15.89r
+ gc spectral-norm 19.72u 0.00s 19.76r
+ gc_B spectral-norm 19.68u 0.01s 19.74r
+
+k-nucleotide 1000000
+ gcc -O2 k-nucleotide.c -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -lglib-2.0 4.90u 0.01s 4.93r
+ gccgo -O2 k-nucleotide.go 4.78u 0.01s 4.80r
+ gccgo -O2 k-nucleotide-parallel.go 6.49u 0.02s 2.18r
+ gc k-nucleotide 9.05u 0.02s 9.09r
+ gc k-nucleotide-parallel 9.27u 0.01s 3.29r
+ gc_B k-nucleotide 8.95u 0.03s 9.00r
+
+mandelbrot 16000
+ gcc -O2 mandelbrot.c 36.11u 0.00s 36.19r
+ gccgo -O2 mandelbrot.go 43.67u 0.00s 43.77r
+ gc mandelbrot 38.57u 0.00s 38.66r
+ gc_B mandelbrot 38.59u 0.00s 38.68r
+
+meteor 2098
+ gcc -O2 meteor-contest.c 0.09u 0.00s 0.09r
+ gccgo -O2 meteor-contest.go 0.09u 0.00s 0.09r
+ gc meteor-contest 0.13u 0.00s 0.14r
+ gc_B meteor-contest 0.12u 0.00s 0.13r
+
+pidigits 10000
+ gcc -O2 pidigits.c -lgmp 2.26u 0.00s 2.27r
+ gccgo -O2 pidigits.go 9.05u 0.00s 9.07r
+ gc pidigits 2.88u 0.02s 2.90r
+ gc_B pidigits 2.89u 0.00s 2.90r
+
+threadring 50000000
+ gcc -O2 threadring.c -lpthread 37.30u 327.81s 289.28r
+ gccgo -O2 threadring.go 42.83u 26.15s 69.14r
+ gc threadring 13.00u 0.00s 13.03r
+
+chameneos 6000000
+ gcc -O2 chameneosredux.c -lpthread 8.80u 71.67s 12.19r
+ gccgo -O2 chameneosredux.go 11.28u 6.68s 18.00r
+ gc chameneosredux 6.94u 0.00s 6.96r
+
+# May 23, 2013
+# Go 1.1, which includes precise GC, new scheduler, faster maps.
+# 20%-ish speedups across many benchmarks.
+# gccgo showing significant improvement (even though it's not yet up to Go 1.1)
+#
+# Standouts:
+# fannkuch, regex-dna, k-nucleotide, threadring, chameneos
+
+fasta -n 25000000
+ gcc -m64 -O2 fasta.c 1.54u 0.01s 1.55r
+ gccgo -O2 fasta.go 1.42u 0.00s 1.43r
+ gc fasta 1.50u 0.01s 1.52r # -16%
+ gc_B fasta 1.46u 0.00s 1.46r # -17%
+
+reverse-complement < output-of-fasta-25000000
+ gcc -m64 -O2 reverse-complement.c 0.87u 0.37s 4.36r
+ gccgo -O2 reverse-complement.go 0.77u 0.15s 0.93r # -15%
+ gc reverse-complement 0.99u 0.12s 1.12r # -15%
+ gc_B reverse-complement 0.85u 0.17s 1.02r # -21%
+
+nbody -n 50000000
+ gcc -m64 -O2 nbody.c -lm 13.50u 0.00s 13.53r
+ gccgo -O2 nbody.go 13.98u 0.01s 14.02r
+ gc nbody 16.63u 0.01s 16.67r
+ gc_B nbody 15.74u 0.00s 15.76r
+
+binary-tree 15 # too slow to use 20
+ gcc -m64 -O2 binary-tree.c -lm 0.61u 0.00s 0.61r
+ gccgo -O2 binary-tree.go 1.11u 0.01s 1.12r # -13%
+ gccgo -O2 binary-tree-freelist.go 0.22u 0.01s 0.23r
+ gc binary-tree 1.83u 0.02s 1.83r # -7%
+ gc binary-tree-freelist 0.32u 0.00s 0.32r
+
+fannkuch 12
+ gcc -m64 -O2 fannkuch.c 45.56u 0.00s 45.67r
+ gccgo -O2 fannkuch.go 57.71u 0.00s 57.85r # -4%
+ gccgo -O2 fannkuch-parallel.go 146.31u 0.00s 37.50r #-37%
+ gc fannkuch 70.06u 0.03s 70.17r # -3%
+ gc fannkuch-parallel 131.88u 0.06s 33.59r # -23%
+ gc_B fannkuch 45.55u 0.02s 45.63r # -15%
+
+regex-dna 100000
+ gcc -m64 -O2 regex-dna.c -lpcre 0.44u 0.01s 0.45r
+ gccgo -O2 regex-dna.go 5.59u 0.00s 5.61r # -14%
+ gccgo -O2 regex-dna-parallel.go 10.85u 0.30s 3.34r # -24%
+ gc regex-dna 2.23u 0.01s 2.25r # -43%
+ gc regex-dna-parallel 2.35u 0.00s 0.93r # -40%
+ gc_B regex-dna 2.24u 0.01s 2.25r # -43%
+
+spectral-norm 5500
+ gcc -m64 -O2 spectral-norm.c -lm 14.84u 0.00s 14.88r
+ gccgo -O2 spectral-norm.go 15.33u 0.00s 15.37r
+ gc spectral-norm 16.75u 0.02s 16.79r # -15%
+ gc_B spectral-norm 16.77u 0.01s 16.79r # -15%
+
+k-nucleotide 1000000
+ gcc -O2 k-nucleotide.c -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -lglib-2.0 4.50u 0.00s 4.52r
+ gccgo -O2 k-nucleotide.go 3.72u 0.04s 3.77r # -21%
+ gccgo -O2 k-nucleotide-parallel.go 3.88u 0.03s 1.42r # -35%
+ gc k-nucleotide 6.32u 0.01s 6.33r # -31%
+ gc k-nucleotide-parallel 6.47u 0.05s 2.13r # -33%
+ gc_B k-nucleotide 6.45u 0.01s 6.47r # - 28%
+
+mandelbrot 16000
+ gcc -m64 -O2 mandelbrot.c 36.03u 0.00s 36.11r
+ gccgo -O2 mandelbrot.go 37.61u 0.00s 37.74r # -14%
+ gc mandelbrot 38.19u 0.05s 38.29r
+ gc_B mandelbrot 38.19u 0.03s 38.26r
+
+meteor 2098
+ gcc -m64 -O2 meteor-contest.c 0.08u 0.00s 0.08r
+ gccgo -O2 meteor-contest.go 0.09u 0.01s 0.10r
+ gc meteor-contest 0.12u 0.00s 0.12r # -15% although perhaps just noise
+ gc_B meteor-contest 0.11u 0.00s 0.12r # -8% although perhaps just noise
+
+pidigits 10000
+ gcc -m64 -O2 pidigits.c -lgmp 2.27u 0.00s 2.28r
+ gccgo -O2 pidigits.go 8.95u 0.02s 8.99r
+ gc pidigits 2.88u 0.14s 2.91r
+ gc_B pidigits 2.92u 0.10s 2.91r
+
+threadring 50000000
+ gcc -m64 -O2 threadring.c -lpthread 14.75u 167.88s 212.23r
+ gccgo -O2 threadring.go 36.72u 12.08s 48.91r # -29%
+ gc threadring 10.93u 0.01s 10.95r # -16%
+
+chameneos 6000000
+ gcc -m64 -O2 chameneosredux.c -lpthread 8.89u 56.62s 9.75r
+ gccgo -O2 chameneosredux.go 9.48u 2.48s 11.99r # -33%
+ gc chameneosredux 5.80u 0.00s 5.81r # -16%
+
diff --git a/gcc/testsuite/go.test/test/bench/shootout/timing.sh b/gcc/testsuite/go.test/test/bench/shootout/timing.sh
index 3e190e15c8..2db895c263 100755
--- a/gcc/testsuite/go.test/test/bench/shootout/timing.sh
+++ b/gcc/testsuite/go.test/test/bench/shootout/timing.sh
@@ -5,7 +5,19 @@
set -e
-eval $(gomake --no-print-directory -f ../../../src/Make.inc go-env)
+eval $(go tool dist env)
+O=$GOCHAR
+GC="go tool ${O}g"
+LD="go tool ${O}l"
+
+gccm=""
+case "$O" in
+8)
+ gccm=-m32;;
+6)
+ gccm=-m64;;
+esac
+
PATH=.:$PATH
havegccgo=false
@@ -74,7 +86,7 @@ run() {
fasta() {
runonly echo 'fasta -n 25000000'
- run 'gcc -O2 fasta.c' a.out 25000000
+ run "gcc $gccm -O2 fasta.c" a.out 25000000
run 'gccgo -O2 fasta.go' a.out -n 25000000 #commented out until WriteString is in bufio
run 'gc fasta' $O.out -n 25000000
run 'gc_B fasta' $O.out -n 25000000
@@ -84,7 +96,7 @@ revcomp() {
runonly gcc -O2 fasta.c
runonly a.out 25000000 > x
runonly echo 'reverse-complement < output-of-fasta-25000000'
- run 'gcc -O2 reverse-complement.c' a.out < x
+ run "gcc $gccm -O2 reverse-complement.c" a.out < x
run 'gccgo -O2 reverse-complement.go' a.out < x
run 'gc reverse-complement' $O.out < x
run 'gc_B reverse-complement' $O.out < x
@@ -93,7 +105,7 @@ revcomp() {
nbody() {
runonly echo 'nbody -n 50000000'
- run 'gcc -O2 -lm nbody.c' a.out 50000000
+ run "gcc $gccm -O2 nbody.c -lm" a.out 50000000
run 'gccgo -O2 nbody.go' a.out -n 50000000
run 'gc nbody' $O.out -n 50000000
run 'gc_B nbody' $O.out -n 50000000
@@ -101,16 +113,16 @@ nbody() {
binarytree() {
runonly echo 'binary-tree 15 # too slow to use 20'
- run 'gcc -O2 binary-tree.c -lm' a.out 15
+ run "gcc $gccm -O2 binary-tree.c -lm" a.out 15
run 'gccgo -O2 binary-tree.go' a.out -n 15
- run 'gccgo -O2 binary-tree-freelist.go' $O.out -n 15
+ run 'gccgo -O2 binary-tree-freelist.go' a.out -n 15
run 'gc binary-tree' $O.out -n 15
run 'gc binary-tree-freelist' $O.out -n 15
}
fannkuch() {
runonly echo 'fannkuch 12'
- run 'gcc -O2 fannkuch.c' a.out 12
+ run "gcc $gccm -O2 fannkuch.c" a.out 12
run 'gccgo -O2 fannkuch.go' a.out -n 12
run 'gccgo -O2 fannkuch-parallel.go' a.out -n 12
run 'gc fannkuch' $O.out -n 12
@@ -122,7 +134,7 @@ regexdna() {
runonly gcc -O2 fasta.c
runonly a.out 100000 > x
runonly echo 'regex-dna 100000'
- run 'gcc -O2 regex-dna.c -lpcre' a.out <x
+ run "gcc $gccm -O2 regex-dna.c -lpcre" a.out <x
run 'gccgo -O2 regex-dna.go' a.out <x
run 'gccgo -O2 regex-dna-parallel.go' a.out <x
run 'gc regex-dna' $O.out <x
@@ -133,7 +145,7 @@ regexdna() {
spectralnorm() {
runonly echo 'spectral-norm 5500'
- run 'gcc -O2 spectral-norm.c -lm' a.out 5500
+ run "gcc $gccm -O2 spectral-norm.c -lm" a.out 5500
run 'gccgo -O2 spectral-norm.go' a.out -n 5500
run 'gc spectral-norm' $O.out -n 5500
run 'gc_B spectral-norm' $O.out -n 5500
@@ -143,7 +155,9 @@ knucleotide() {
runonly gcc -O2 fasta.c
runonly a.out 1000000 > x # should be using 25000000
runonly echo 'k-nucleotide 1000000'
- run 'gcc -O2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include k-nucleotide.c -lglib-2.0' a.out <x
+ if [ $mode = run ]; then
+ run "gcc -O2 k-nucleotide.c $(pkg-config glib-2.0 --cflags --libs)" a.out <x
+ fi
run 'gccgo -O2 k-nucleotide.go' a.out <x
run 'gccgo -O2 k-nucleotide-parallel.go' a.out <x
run 'gc k-nucleotide' $O.out <x
@@ -154,7 +168,7 @@ knucleotide() {
mandelbrot() {
runonly echo 'mandelbrot 16000'
- run 'gcc -O2 mandelbrot.c' a.out 16000
+ run "gcc $gccm -O2 mandelbrot.c" a.out 16000
run 'gccgo -O2 mandelbrot.go' a.out -n 16000
run 'gc mandelbrot' $O.out -n 16000
run 'gc_B mandelbrot' $O.out -n 16000
@@ -162,7 +176,7 @@ mandelbrot() {
meteor() {
runonly echo 'meteor 2098'
- run 'gcc -O2 meteor-contest.c' a.out 2098
+ run "gcc $gccm -O2 meteor-contest.c" a.out 2098
run 'gccgo -O2 meteor-contest.go' a.out -n 2098
run 'gc meteor-contest' $O.out -n 2098
run 'gc_B meteor-contest' $O.out -n 2098
@@ -170,7 +184,7 @@ meteor() {
pidigits() {
runonly echo 'pidigits 10000'
- run 'gcc -O2 pidigits.c -lgmp' a.out 10000
+ run "gcc $gccm -O2 pidigits.c -lgmp" a.out 10000
run 'gccgo -O2 pidigits.go' a.out -n 10000
run 'gc pidigits' $O.out -n 10000
run 'gc_B pidigits' $O.out -n 10000
@@ -178,14 +192,14 @@ pidigits() {
threadring() {
runonly echo 'threadring 50000000'
- run 'gcc -O2 threadring.c -lpthread' a.out 50000000
+ run "gcc $gccm -O2 threadring.c -lpthread" a.out 50000000
run 'gccgo -O2 threadring.go' a.out -n 50000000
run 'gc threadring' $O.out -n 50000000
}
chameneos() {
runonly echo 'chameneos 6000000'
- run 'gcc -O2 chameneosredux.c -lpthread' a.out 6000000
+ run "gcc $gccm -O2 chameneosredux.c -lpthread" a.out 6000000
run 'gccgo -O2 chameneosredux.go' a.out 6000000
run 'gc chameneosredux' $O.out 6000000
}
diff --git a/gcc/testsuite/go.test/test/bigalg.go b/gcc/testsuite/go.test/test/bigalg.go
index 902ba84107..60e822942e 100644
--- a/gcc/testsuite/go.test/test/bigalg.go
+++ b/gcc/testsuite/go.test/test/bigalg.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the internal "algorithms" for objects larger than a word: hashing, equality etc.
+
package main
type T struct {
@@ -13,18 +15,21 @@ type T struct {
d byte
}
-var a = []int{ 1, 2, 3 }
+var a = []int{1, 2, 3}
var NIL []int
func arraycmptest() {
if NIL != nil {
println("fail1:", NIL, "!= nil")
+ panic("bigalg")
}
if nil != NIL {
println("fail2: nil !=", NIL)
+ panic("bigalg")
}
if a == nil || nil == a {
println("fail3:", a, "== nil")
+ panic("bigalg")
}
}
@@ -47,12 +52,14 @@ func maptest() {
t1 := mt[0]
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("fail: map val struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
ma[1] = a
a1 := ma[1]
if !SameArray(a, a1) {
println("fail: map val array", a, a1)
+ panic("bigalg")
}
}
@@ -70,15 +77,18 @@ func chantest() {
t1 := <-ct
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("fail: map val struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
a1 := <-ca
if !SameArray(a, a1) {
println("fail: map val array", a, a1)
+ panic("bigalg")
}
}
-type E struct { }
+type E struct{}
+
var e E
func interfacetest() {
@@ -88,6 +98,7 @@ func interfacetest() {
a1 := i.([]int)
if !SameArray(a, a1) {
println("interface <-> []int", a, a1)
+ panic("bigalg")
}
pa := new([]int)
*pa = a
@@ -95,12 +106,14 @@ func interfacetest() {
a1 = *i.(*[]int)
if !SameArray(a, a1) {
println("interface <-> *[]int", a, a1)
+ panic("bigalg")
}
i = t
t1 := i.(T)
if t1.a != t.a || t1.b != t.b || t1.c != t.c || t1.d != t.d {
println("interface <-> struct", t1.a, t1.b, t1.c, t1.d)
+ panic("bigalg")
}
i = e
diff --git a/gcc/testsuite/go.test/test/bigmap.go b/gcc/testsuite/go.test/test/bigmap.go
index 843a151741..c5e4f91e11 100644
--- a/gcc/testsuite/go.test/test/bigmap.go
+++ b/gcc/testsuite/go.test/test/bigmap.go
@@ -1,9 +1,13 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Internally a map holds elements in up to 255 bytes of key+value.
+// When key or value or both are too large, it uses pointers to key+value
+// instead. Test all the combinations.
+
package main
func seq(x, y int) [1000]byte {
@@ -31,4 +35,105 @@ func main() {
cmp(m[1], seq(11, 13))
cmp(m[2], seq(2, 9))
cmp(m[3], seq(3, 17))
+
+
+ {
+ type T [1]byte
+ type V [1]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [100]byte
+ type V [1]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [1]byte
+ type V [100]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [1000]byte
+ type V [1]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [1]byte
+ type V [1000]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [1000]byte
+ type V [1000]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [200]byte
+ type V [1]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [1]byte
+ type V [200]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
+ {
+ type T [200]byte
+ type V [200]byte
+ m := make(map[T]V)
+ m[T{}] = V{1}
+ m[T{1}] = V{2}
+ if x, y := m[T{}][0], m[T{1}][0]; x != 1 || y != 2 {
+ println(x, y)
+ panic("bad map")
+ }
+ }
}
diff --git a/gcc/testsuite/go.test/test/blank.go b/gcc/testsuite/go.test/test/blank.go
index d6c9e79c60..0539debb1f 100644
--- a/gcc/testsuite/go.test/test/blank.go
+++ b/gcc/testsuite/go.test/test/blank.go
@@ -1,11 +1,18 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test behavior of the blank identifier (_).
+
package main
+import (
+ "os"
+ "unsafe"
+)
+
import _ "fmt"
var call string
@@ -20,6 +27,10 @@ func (T) _() {
func (T) _() {
}
+type U struct {
+ _ struct{ a, b, c int }
+}
+
const (
c0 = iota
_
@@ -100,8 +111,25 @@ func main() {
panic(sum)
}
+ // go.tools/ssa/interp cannot support unsafe.Pointer.
+ if os.Getenv("GOSSAINTERP") == "" {
+ type T1 struct{ x, y, z int }
+ t1 := *(*T)(unsafe.Pointer(&T1{1, 2, 3}))
+ t2 := *(*T)(unsafe.Pointer(&T1{4, 5, 6}))
+ if t1 != t2 {
+ panic("T{} != T{}")
+ }
+
+ var u1, u2 interface{}
+ u1 = *(*U)(unsafe.Pointer(&T1{1, 2, 3}))
+ u2 = *(*U)(unsafe.Pointer(&T1{4, 5, 6}))
+ if u1 != u2 {
+ panic("U{} != U{}")
+ }
+ }
+
h(a, b)
-
+
m()
}
@@ -111,7 +139,7 @@ type I interface {
type TI struct{}
-func (TI) M(x int, y int) {
+func (_ TI) M(x int, y int) {
if x != y {
println("invalid M call:", x, y)
panic("bad M")
@@ -131,14 +159,13 @@ func fp1(x, y int) {
}
}
-
func m() {
var i I
-
+
i = TI{}
i.M(1, 1)
i.M(2, 2)
-
+
fp(1, 1)
fp(2, 2)
}
@@ -160,4 +187,3 @@ func _() {
func ff() {
var _ int = 1
}
-
diff --git a/gcc/testsuite/go.test/test/blank1.go b/gcc/testsuite/go.test/test/blank1.go
index bcc78466dc..54a72976b7 100644
--- a/gcc/testsuite/go.test/test/blank1.go
+++ b/gcc/testsuite/go.test/test/blank1.go
@@ -1,13 +1,28 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that incorrect uses of the blank identifer are caught.
+// Does not compile.
+
package _ // ERROR "invalid package name _"
+var t struct {
+ _ int
+}
+
+type T struct {
+ _ []int
+}
+
func main() {
_() // ERROR "cannot use _ as value"
x := _+1 // ERROR "cannot use _ as value"
_ = x
+ _ = t._ // ERROR "cannot refer to blank field|invalid use of"
+
+ var v1, v2 T
+ _ = v1 == v2 // ERROR "cannot be compared|non-comparable"
}
diff --git a/gcc/testsuite/go.test/test/bom.go b/gcc/testsuite/go.test/test/bom.go
new file mode 100644
index 0000000000..37f73bc5d2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bom.go
@@ -0,0 +1,26 @@
+// runoutput
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test source file beginning with a byte order mark.
+
+package main
+
+import (
+ "fmt"
+ "strings"
+)
+
+func main() {
+ prog = strings.Replace(prog, "BOM", "\uFEFF", -1)
+ fmt.Print(prog)
+}
+
+var prog = `BOM
+package main
+
+func main() {
+}
+`
diff --git a/gcc/testsuite/go.test/test/bombad.go b/gcc/testsuite/go.test/test/bombad.go
new file mode 100644
index 0000000000..b894d9ba9f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bombad.go
@@ -0,0 +1,18 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Here for reference, but hard to test automatically
+// because the BOM muddles the
+// processing done by ../run.
+
+package main
+
+func main() {
+ // There's a bom here. // ERROR "BOM"
+ // And here. // ERROR "BOM"
+ /* And here.*/ // ERROR "BOM"
+ println("hi there") // and here // ERROR "BOM"
+}
diff --git a/gcc/testsuite/go.test/test/bounds.go b/gcc/testsuite/go.test/test/bounds.go
new file mode 100644
index 0000000000..50f7ad7419
--- /dev/null
+++ b/gcc/testsuite/go.test/test/bounds.go
@@ -0,0 +1,270 @@
+// errorcheck -0 -m -l
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test, using compiler diagnostic flags, that bounds check elimination
+// is eliminating the correct checks.
+
+package foo
+
+var (
+ s []int
+
+ a1 [1]int
+ a1k [1000]int
+ a100k [100000]int
+
+ p1 *[1]int
+ p1k *[1000]int
+ p100k *[100000]int
+
+ i int
+ ui uint
+ i8 int8
+ ui8 uint8
+ i16 int16
+ ui16 uint16
+ i32 int32
+ ui32 uint32
+ i64 int64
+ ui64 uint64
+)
+
+func main() {
+ // Most things need checks.
+ use(s[i])
+ use(a1[i])
+ use(a1k[i])
+ use(a100k[i])
+ use(p1[i])
+ use(p1k[i])
+ use(p100k[i])
+
+ use(s[ui])
+ use(a1[ui])
+ use(a1k[ui])
+ use(a100k[ui])
+ use(p1[ui])
+ use(p1k[ui])
+ use(p100k[ui])
+
+ use(s[i8])
+ use(a1[i8])
+ use(a1k[i8])
+ use(a100k[i8])
+ use(p1[i8])
+ use(p1k[i8])
+ use(p100k[i8])
+
+ // Unsigned 8-bit numbers don't need checks for len >= 2â¸.
+ use(s[ui8])
+ use(a1[ui8])
+ use(a1k[ui8]) // ERROR "index bounds check elided"
+ use(a100k[ui8]) // ERROR "index bounds check elided"
+ use(p1[ui8])
+ use(p1k[ui8]) // ERROR "index bounds check elided"
+ use(p100k[ui8]) // ERROR "index bounds check elided"
+
+ use(s[i16])
+ use(a1[i16])
+ use(a1k[i16])
+ use(a100k[i16])
+ use(p1[i16])
+ use(p1k[i16])
+ use(p100k[i16])
+
+ // Unsigned 16-bit numbers don't need checks for len >= 2¹â¶.
+ use(s[ui16])
+ use(a1[ui16])
+ use(a1k[ui16])
+ use(a100k[ui16]) // ERROR "index bounds check elided"
+ use(p1[ui16])
+ use(p1k[ui16])
+ use(p100k[ui16]) // ERROR "index bounds check elided"
+
+ use(s[i32])
+ use(a1[i32])
+ use(a1k[i32])
+ use(a100k[i32])
+ use(p1[i32])
+ use(p1k[i32])
+ use(p100k[i32])
+
+ use(s[ui32])
+ use(a1[ui32])
+ use(a1k[ui32])
+ use(a100k[ui32])
+ use(p1[ui32])
+ use(p1k[ui32])
+ use(p100k[ui32])
+
+ use(s[i64])
+ use(a1[i64])
+ use(a1k[i64])
+ use(a100k[i64])
+ use(p1[i64])
+ use(p1k[i64])
+ use(p100k[i64])
+
+ use(s[ui64])
+ use(a1[ui64])
+ use(a1k[ui64])
+ use(a100k[ui64])
+ use(p1[ui64])
+ use(p1k[ui64])
+ use(p100k[ui64])
+
+ // Mod truncates the maximum value to one less than the argument,
+ // but signed mod can be negative, so only unsigned mod counts.
+ use(s[i%999])
+ use(a1[i%999])
+ use(a1k[i%999])
+ use(a100k[i%999])
+ use(p1[i%999])
+ use(p1k[i%999])
+ use(p100k[i%999])
+
+ use(s[ui%999])
+ use(a1[ui%999])
+ use(a1k[ui%999]) // ERROR "index bounds check elided"
+ use(a100k[ui%999]) // ERROR "index bounds check elided"
+ use(p1[ui%999])
+ use(p1k[ui%999]) // ERROR "index bounds check elided"
+ use(p100k[ui%999]) // ERROR "index bounds check elided"
+
+ use(s[i%1000])
+ use(a1[i%1000])
+ use(a1k[i%1000])
+ use(a100k[i%1000])
+ use(p1[i%1000])
+ use(p1k[i%1000])
+ use(p100k[i%1000])
+
+ use(s[ui%1000])
+ use(a1[ui%1000])
+ use(a1k[ui%1000]) // ERROR "index bounds check elided"
+ use(a100k[ui%1000]) // ERROR "index bounds check elided"
+ use(p1[ui%1000])
+ use(p1k[ui%1000]) // ERROR "index bounds check elided"
+ use(p100k[ui%1000]) // ERROR "index bounds check elided"
+
+ use(s[i%1001])
+ use(a1[i%1001])
+ use(a1k[i%1001])
+ use(a100k[i%1001])
+ use(p1[i%1001])
+ use(p1k[i%1001])
+ use(p100k[i%1001])
+
+ use(s[ui%1001])
+ use(a1[ui%1001])
+ use(a1k[ui%1001])
+ use(a100k[ui%1001]) // ERROR "index bounds check elided"
+ use(p1[ui%1001])
+ use(p1k[ui%1001])
+ use(p100k[ui%1001]) // ERROR "index bounds check elided"
+
+ // Bitwise and truncates the maximum value to the mask value.
+ // The result (for a positive mask) cannot be negative, so elision
+ // applies to both signed and unsigned indexes.
+ use(s[i&999])
+ use(a1[i&999])
+ use(a1k[i&999]) // ERROR "index bounds check elided"
+ use(a100k[i&999]) // ERROR "index bounds check elided"
+ use(p1[i&999])
+ use(p1k[i&999]) // ERROR "index bounds check elided"
+ use(p100k[i&999]) // ERROR "index bounds check elided"
+
+ use(s[ui&999])
+ use(a1[ui&999])
+ use(a1k[ui&999]) // ERROR "index bounds check elided"
+ use(a100k[ui&999]) // ERROR "index bounds check elided"
+ use(p1[ui&999])
+ use(p1k[ui&999]) // ERROR "index bounds check elided"
+ use(p100k[ui&999]) // ERROR "index bounds check elided"
+
+ use(s[i&1000])
+ use(a1[i&1000])
+ use(a1k[i&1000])
+ use(a100k[i&1000]) // ERROR "index bounds check elided"
+ use(p1[i&1000])
+ use(p1k[i&1000])
+ use(p100k[i&1000]) // ERROR "index bounds check elided"
+
+ use(s[ui&1000])
+ use(a1[ui&1000])
+ use(a1k[ui&1000])
+ use(a100k[ui&1000]) // ERROR "index bounds check elided"
+ use(p1[ui&1000])
+ use(p1k[ui&1000])
+ use(p100k[ui&1000]) // ERROR "index bounds check elided"
+
+ // Right shift cuts the effective number of bits in the index,
+ // but only for unsigned (signed stays negative).
+ use(s[i32>>22])
+ use(a1[i32>>22])
+ use(a1k[i32>>22])
+ use(a100k[i32>>22])
+ use(p1[i32>>22])
+ use(p1k[i32>>22])
+ use(p100k[i32>>22])
+
+ use(s[ui32>>22])
+ use(a1[ui32>>22])
+ use(a1k[ui32>>22])
+ use(a100k[ui32>>22]) // ERROR "index bounds check elided"
+ use(p1[ui32>>22])
+ use(p1k[ui32>>22])
+ use(p100k[ui32>>22]) // ERROR "index bounds check elided"
+
+ use(s[i32>>23])
+ use(a1[i32>>23])
+ use(a1k[i32>>23])
+ use(a100k[i32>>23])
+ use(p1[i32>>23])
+ use(p1k[i32>>23])
+ use(p100k[i32>>23])
+
+ use(s[ui32>>23])
+ use(a1[ui32>>23])
+ use(a1k[ui32>>23]) // ERROR "index bounds check elided"
+ use(a100k[ui32>>23]) // ERROR "index bounds check elided"
+ use(p1[ui32>>23])
+ use(p1k[ui32>>23]) // ERROR "index bounds check elided"
+ use(p100k[ui32>>23]) // ERROR "index bounds check elided"
+
+ // Division cuts the range like right shift does.
+ use(s[i/1e6])
+ use(a1[i/1e6])
+ use(a1k[i/1e6])
+ use(a100k[i/1e6])
+ use(p1[i/1e6])
+ use(p1k[i/1e6])
+ use(p100k[i/1e6])
+
+ use(s[ui/1e6])
+ use(a1[ui/1e6])
+ use(a1k[ui/1e6])
+ use(p1[ui/1e6])
+ use(p1k[ui/1e6])
+
+ use(s[i/1e7])
+ use(a1[i/1e7])
+ use(a1k[i/1e7])
+ use(a100k[i/1e7])
+ use(p1[i/1e7])
+ use(p1k[i/1e7])
+ use(p100k[i/1e7])
+
+ use(s[ui/1e7])
+ use(a1[ui/1e7])
+ use(p1[ui/1e7])
+}
+
+var sum int
+
+func use(x int) {
+ sum += x
+}
diff --git a/gcc/testsuite/go.test/test/bugs/bug395.go b/gcc/testsuite/go.test/test/bugs/bug395.go
index adf74497cd..4632dcd0f7 100644
--- a/gcc/testsuite/go.test/test/bugs/bug395.go
+++ b/gcc/testsuite/go.test/test/bugs/bug395.go
@@ -1,6 +1,9 @@
// echo bug395 is broken # takes 90+ seconds to break
// # $G $D/$F.go || echo bug395
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/gcc/testsuite/go.test/test/chan/doubleselect.go b/gcc/testsuite/go.test/test/chan/doubleselect.go
index f8d50c90c0..6be3faf55a 100644
--- a/gcc/testsuite/go.test/test/chan/doubleselect.go
+++ b/gcc/testsuite/go.test/test/chan/doubleselect.go
@@ -1,11 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// This test is designed to flush out the case where two cases of a select can
+// Test the situation in which two cases of a select can
// both end up running. See http://codereview.appspot.com/180068.
+
package main
import (
@@ -35,7 +36,7 @@ func sender(n int, c1, c2, c3, c4 chan<- int) {
}
// mux receives the values from sender and forwards them onto another channel.
-// It would be simplier to just have sender's four cases all be the same
+// It would be simpler to just have sender's four cases all be the same
// channel, but this doesn't actually trigger the bug.
func mux(out chan<- int, in <-chan int, done chan<- bool) {
for v := range in {
diff --git a/gcc/testsuite/go.test/test/chan/fifo.go b/gcc/testsuite/go.test/test/chan/fifo.go
index 0dddfcaa0b..70d20b31f0 100644
--- a/gcc/testsuite/go.test/test/chan/fifo.go
+++ b/gcc/testsuite/go.test/test/chan/fifo.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Verify that unbuffered channels act as pure fifos.
+// Test that unbuffered channels act as pure fifos.
package main
diff --git a/gcc/testsuite/go.test/test/chan/goroutines.go b/gcc/testsuite/go.test/test/chan/goroutines.go
index 371a173876..6ffae7df65 100644
--- a/gcc/testsuite/go.test/test/chan/goroutines.go
+++ b/gcc/testsuite/go.test/test/chan/goroutines.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// make a lot of goroutines, threaded together.
-// tear them down cleanly.
+// Torture test for goroutines.
+// Make a lot of goroutines, threaded together, and tear them down cleanly.
package main
diff --git a/gcc/testsuite/go.test/test/chan/nonblock.go b/gcc/testsuite/go.test/test/chan/nonblock.go
index 9addf12e99..7e3c0c74da 100644
--- a/gcc/testsuite/go.test/test/chan/nonblock.go
+++ b/gcc/testsuite/go.test/test/chan/nonblock.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Verify channel operations that test for blocking
-// Use several sizes and types of operands
+// Test channel operations that test for blocking.
+// Use several sizes and types of operands.
package main
diff --git a/gcc/testsuite/go.test/test/chan/perm.go b/gcc/testsuite/go.test/test/chan/perm.go
index a43df19821..7e152c5eb5 100644
--- a/gcc/testsuite/go.test/test/chan/perm.go
+++ b/gcc/testsuite/go.test/test/chan/perm.go
@@ -1,9 +1,13 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test various correct and incorrect permutations of send-only,
+// receive-only, and bidirectional channels.
+// Does not compile.
+
package main
var (
diff --git a/gcc/testsuite/go.test/test/chan/powser1.go b/gcc/testsuite/go.test/test/chan/powser1.go
index dc4ff53255..6bf2a91115 100644
--- a/gcc/testsuite/go.test/test/chan/powser1.go
+++ b/gcc/testsuite/go.test/test/chan/powser1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: power series.
+
// Power series package
// A power series is a channel, along which flow rational
// coefficients. A denominator of zero signifies the end.
diff --git a/gcc/testsuite/go.test/test/chan/powser2.go b/gcc/testsuite/go.test/test/chan/powser2.go
index bc329270db..33abd5c53f 100644
--- a/gcc/testsuite/go.test/test/chan/powser2.go
+++ b/gcc/testsuite/go.test/test/chan/powser2.go
@@ -1,18 +1,21 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: power series.
+
+// Like powser1.go but uses channels of interfaces.
+// Has not been cleaned up as much as powser1.go, to keep
+// it distinct and therefore a different test.
+
// Power series package
// A power series is a channel, along which flow rational
// coefficients. A denominator of zero signifies the end.
// Original code in Newsqueak by Doug McIlroy.
// See Squinting at Power Series by Doug McIlroy,
// http://www.cs.bell-labs.com/who/rsc/thread/squint.pdf
-// Like powser1.go but uses channels of interfaces.
-// Has not been cleaned up as much as powser1.go, to keep
-// it distinct and therefore a different test.
package main
diff --git a/gcc/testsuite/go.test/test/chan/select.go b/gcc/testsuite/go.test/test/chan/select.go
index be4eb3f42d..38fa7e1e3f 100644
--- a/gcc/testsuite/go.test/test/chan/select.go
+++ b/gcc/testsuite/go.test/test/chan/select.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple select.
+
package main
var counter uint
diff --git a/gcc/testsuite/go.test/test/chan/select2.go b/gcc/testsuite/go.test/test/chan/select2.go
index 2cbb86ec62..ccf9dab81b 100644
--- a/gcc/testsuite/go.test/test/chan/select2.go
+++ b/gcc/testsuite/go.test/test/chan/select2.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that selects do not consume undue memory.
+
package main
import "runtime"
@@ -45,7 +47,8 @@ func main() {
runtime.GC()
runtime.ReadMemStats(memstats)
- if memstats.Alloc-alloc > 1e5 {
+ // Be careful to avoid wraparound.
+ if memstats.Alloc > alloc && memstats.Alloc-alloc > 1.1e5 {
println("BUG: too much memory for 100,000 selects:", memstats.Alloc-alloc)
}
}
diff --git a/gcc/testsuite/go.test/test/chan/select3.go b/gcc/testsuite/go.test/test/chan/select3.go
index d919de3e0d..847d8ed37e 100644
--- a/gcc/testsuite/go.test/test/chan/select3.go
+++ b/gcc/testsuite/go.test/test/chan/select3.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Tests verifying the semantics of the select statement
+// Test the semantics of the select statement
// for basic empty/non-empty cases.
package main
@@ -197,13 +197,13 @@ func main() {
})
testBlock(never, func() {
select {
- case x := <-closedch:
+ case x := (<-closedch):
_ = x
}
})
testBlock(never, func() {
select {
- case x, ok := <-closedch:
+ case x, ok := (<-closedch):
_, _ = x, ok
}
})
diff --git a/gcc/testsuite/go.test/test/chan/select4.go b/gcc/testsuite/go.test/test/chan/select4.go
index 46618ac881..5003640385 100644
--- a/gcc/testsuite/go.test/test/chan/select4.go
+++ b/gcc/testsuite/go.test/test/chan/select4.go
@@ -1,4 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
+// Test that a select statement proceeds when a value is ready.
package main
diff --git a/gcc/testsuite/go.test/test/chan/select5.go b/gcc/testsuite/go.test/test/chan/select5.go
index cc2cc71000..f72cfe4b46 100644
--- a/gcc/testsuite/go.test/test/chan/select5.go
+++ b/gcc/testsuite/go.test/test/chan/select5.go
@@ -1,13 +1,14 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go &&
-// $G tmp.go && $L tmp.$A && ./$A.out || echo BUG: select5
-// rm -f tmp.go
+// runoutput
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Generate test of channel operations and simple selects.
-// Only doing one real send or receive at a time, but phrased
+// The output of this program is compiled and run to do the
+// actual test.
+
+// Each test does only one real send or receive at a time, but phrased
// in various ways that the compiler may or may not rewrite
// into simpler expressions.
diff --git a/gcc/testsuite/go.test/test/chan/select6.go b/gcc/testsuite/go.test/test/chan/select6.go
index 2ba6810ac3..af470a0d0d 100644
--- a/gcc/testsuite/go.test/test/chan/select6.go
+++ b/gcc/testsuite/go.test/test/chan/select6.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Issue 2075
+// Test for select: Issue 2075
// A bug in select corrupts channel queues of failed cases
// if there are multiple waiters on those channels and the
// select is the last in the queue. If further waits are made
diff --git a/gcc/testsuite/go.test/test/chan/select7.go b/gcc/testsuite/go.test/test/chan/select7.go
index 5fed6cbd42..20456a9d62 100644
--- a/gcc/testsuite/go.test/test/chan/select7.go
+++ b/gcc/testsuite/go.test/test/chan/select7.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/chan/sendstmt.go b/gcc/testsuite/go.test/test/chan/sendstmt.go
index ee6f765cf8..a92c4f63a7 100644
--- a/gcc/testsuite/go.test/test/chan/sendstmt.go
+++ b/gcc/testsuite/go.test/test/chan/sendstmt.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/chan/sieve1.go b/gcc/testsuite/go.test/test/chan/sieve1.go
index 55076c9253..acc310f6c7 100644
--- a/gcc/testsuite/go.test/test/chan/sieve1.go
+++ b/gcc/testsuite/go.test/test/chan/sieve1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: classical inefficient concurrent prime sieve.
+
// Generate primes up to 100 using channels, checking the results.
// This sieve consists of a linear chain of divisibility filters,
// equivalent to trial-dividing each n by all primes p ≤ n.
diff --git a/gcc/testsuite/go.test/test/chan/sieve2.go b/gcc/testsuite/go.test/test/chan/sieve2.go
index 9a7ab15406..09e5c527b6 100644
--- a/gcc/testsuite/go.test/test/chan/sieve2.go
+++ b/gcc/testsuite/go.test/test/chan/sieve2.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test concurrency primitives: prime sieve of Eratosthenes.
+
// Generate primes up to 100 using channels, checking the results.
// This sieve is Eratosthenesque and only considers odd candidates.
// See discussion at <http://blog.onideas.ws/eratosthenes.go>.
diff --git a/gcc/testsuite/go.test/test/chan/zerosize.go b/gcc/testsuite/go.test/test/chan/zerosize.go
index 617c9dab34..50aca857cb 100644
--- a/gcc/testsuite/go.test/test/chan/zerosize.go
+++ b/gcc/testsuite/go.test/test/chan/zerosize.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Making channels of a zero-sized type should not panic.
+// Test making channels of a zero-sized type.
package main
diff --git a/gcc/testsuite/go.test/test/chancap.go b/gcc/testsuite/go.test/test/chancap.go
index 3f3789fbcc..b3e40233f5 100644
--- a/gcc/testsuite/go.test/test/chancap.go
+++ b/gcc/testsuite/go.test/test/chancap.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the cap predeclared function applied to channels.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/char_lit.go b/gcc/testsuite/go.test/test/char_lit.go
index 99be77a570..836c3c1a2d 100644
--- a/gcc/testsuite/go.test/test/char_lit.go
+++ b/gcc/testsuite/go.test/test/char_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A &&./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test character literal syntax.
+
package main
import "os"
diff --git a/gcc/testsuite/go.test/test/char_lit1.go b/gcc/testsuite/go.test/test/char_lit1.go
index dc5385291d..489744b6e9 100644
--- a/gcc/testsuite/go.test/test/char_lit1.go
+++ b/gcc/testsuite/go.test/test/char_lit1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal character literals are detected.
+// Does not compile.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/closedchan.go b/gcc/testsuite/go.test/test/closedchan.go
index c2bbec59d9..043a92d388 100644
--- a/gcc/testsuite/go.test/test/closedchan.go
+++ b/gcc/testsuite/go.test/test/closedchan.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/closure.go b/gcc/testsuite/go.test/test/closure.go
index 97da1dd230..c4a312464b 100644
--- a/gcc/testsuite/go.test/test/closure.go
+++ b/gcc/testsuite/go.test/test/closure.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the behavior of closures.
+
package main
import "runtime"
@@ -79,6 +81,7 @@ func h() {
func newfunc() func(int) int { return func(x int) int { return x } }
func main() {
+ runtime.GOMAXPROCS(1)
var fail bool
go f()
@@ -92,8 +95,9 @@ func main() {
go h()
check([]int{100, 200, 101, 201, 500, 101, 201, 500})
- runtime.UpdateMemStats()
- n0 := runtime.MemStats.Mallocs
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ n0 := memstats.Mallocs
x, y := newfunc(), newfunc()
if x(1) != 1 || y(2) != 2 {
@@ -101,8 +105,8 @@ func main() {
fail = true
}
- runtime.UpdateMemStats()
- if n0 != runtime.MemStats.Mallocs {
+ runtime.ReadMemStats(memstats)
+ if n0 != memstats.Mallocs {
println("newfunc allocated unexpectedly")
fail = true
}
@@ -110,7 +114,7 @@ func main() {
ff(1)
if fail {
- panic("fail")
+ panic("fail")
}
}
diff --git a/gcc/testsuite/go.test/test/cmp.go b/gcc/testsuite/go.test/test/cmp.go
index d51a11aa24..73de502f39 100644
--- a/gcc/testsuite/go.test/test/cmp.go
+++ b/gcc/testsuite/go.test/test/cmp.go
@@ -1,14 +1,20 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test equality and inequality operations.
+
package main
-import "unsafe"
+import (
+ "os"
+ "unsafe"
+)
var global bool
+
func use(b bool) { global = b }
func stringptr(s string) uintptr { return *(*uintptr)(unsafe.Pointer(&s)) }
@@ -36,8 +42,12 @@ func main() {
var c string = "hello"
var d string = "hel" // try to get different pointer
d = d + "lo"
- if stringptr(c) == stringptr(d) {
- panic("compiler too smart -- got same string")
+
+ // go.tools/ssa/interp can't handle unsafe.Pointer.
+ if os.Getenv("GOSSAINTERP") == "" {
+ if stringptr(c) == stringptr(d) {
+ panic("compiler too smart -- got same string")
+ }
}
var e = make(chan int)
@@ -282,6 +292,25 @@ func main() {
isfalse(iz != x)
}
+ // structs with _ fields
+ {
+ var x = struct {
+ x int
+ _ string
+ y float64
+ _ float64
+ z int
+ }{
+ x: 1, y: 2, z: 3,
+ }
+ var ix interface{} = x
+
+ istrue(x == x)
+ istrue(x == ix)
+ istrue(ix == x)
+ istrue(ix == ix)
+ }
+
// arrays
{
var x = [2]string{"1", "hi"}
diff --git a/gcc/testsuite/go.test/test/cmp6.go b/gcc/testsuite/go.test/test/cmp6.go
index 0113a69ddb..839c274bcc 100644
--- a/gcc/testsuite/go.test/test/cmp6.go
+++ b/gcc/testsuite/go.test/test/cmp6.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that incorrect comparisons are detected.
+// Does not compile.
+
package main
func use(bool) {}
@@ -15,6 +18,10 @@ type T3 struct{ z []int }
var t3 T3
+type T4 struct { _ []int; a float64 }
+
+var t4 T4
+
func main() {
// Arguments to comparison must be
// assignable one to the other (or vice versa)
@@ -46,6 +53,7 @@ func main() {
// Comparison of structs should have a good message
use(t3 == t3) // ERROR "struct|expected"
+ use(t4 == t4) // ERROR "cannot be compared|non-comparable"
// Slices, functions, and maps too.
var x []int
diff --git a/gcc/testsuite/go.test/test/cmplx.go b/gcc/testsuite/go.test/test/cmplx.go
index d5a77d684a..2d8a6229d6 100644
--- a/gcc/testsuite/go.test/test/cmplx.go
+++ b/gcc/testsuite/go.test/test/cmplx.go
@@ -1,17 +1,31 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that incorrect invocations of the complex predeclared function are detected.
+// Does not compile.
+
package main
+type (
+ Float32 float32
+ Float64 float64
+ Complex64 complex64
+ Complex128 complex128
+)
+
var (
f32 float32
f64 float64
+ F32 Float32
+ F64 Float64
c64 complex64
c128 complex128
+ C64 Complex64
+ C128 Complex128
)
func main() {
@@ -22,4 +36,19 @@ func main() {
_ = complex128(0) // ok
_ = complex(f32, f64) // ERROR "complex"
_ = complex(f64, f32) // ERROR "complex"
+ _ = complex(f32, F32) // ERROR "complex"
+ _ = complex(F32, f32) // ERROR "complex"
+ _ = complex(f64, F64) // ERROR "complex"
+ _ = complex(F64, f64) // ERROR "complex"
+
+ c128 = complex(f32, f32) // ERROR "cannot use"
+ c64 = complex(f64, f64) // ERROR "cannot use"
+
+ c64 = complex(1.0, 2.0) // ok, constant is untyped
+ c128 = complex(1.0, 2.0)
+ C64 = complex(1.0, 2.0)
+ C128 = complex(1.0, 2.0)
+
+ C64 = complex(f32, f32) // ERROR "cannot use"
+ C128 = complex(f64, f64) // ERROR "cannot use"
}
diff --git a/gcc/testsuite/go.test/test/cmplxdivide.c b/gcc/testsuite/go.test/test/cmplxdivide.c
index b340f04d88..12dc4f1c0c 100644
--- a/gcc/testsuite/go.test/test/cmplxdivide.c
+++ b/gcc/testsuite/go.test/test/cmplxdivide.c
@@ -51,6 +51,7 @@ main(void)
int i, j, k, l;
double complex n, d, q;
+ printf("// skip\n");
printf("// # generated by cmplxdivide.c\n");
printf("\n");
printf("package main\n");
diff --git a/gcc/testsuite/go.test/test/cmplxdivide.go b/gcc/testsuite/go.test/test/cmplxdivide.go
index 461ee9796e..40c84486da 100644
--- a/gcc/testsuite/go.test/test/cmplxdivide.go
+++ b/gcc/testsuite/go.test/test/cmplxdivide.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go $D/cmplxdivide1.go && $L $D/$F.$A && ./$A.out
+// run cmplxdivide1.go
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -45,4 +45,7 @@ func main() {
fmt.Printf("%v/%v: expected %v error; got %v\n", t.f, t.g, t.out, x)
}
}
+ if bad {
+ panic("cmplxdivide failed.")
+ }
}
diff --git a/gcc/testsuite/go.test/test/cmplxdivide1.go b/gcc/testsuite/go.test/test/cmplxdivide1.go
index 6a1dee9fe7..e9031dd151 100644
--- a/gcc/testsuite/go.test/test/cmplxdivide1.go
+++ b/gcc/testsuite/go.test/test/cmplxdivide1.go
@@ -1,3 +1,4 @@
+// skip
// # generated by cmplxdivide.c
package main
diff --git a/gcc/testsuite/go.test/test/complit.go b/gcc/testsuite/go.test/test/complit.go
index 8dfc71dcb4..649be6d4d3 100644
--- a/gcc/testsuite/go.test/test/complit.go
+++ b/gcc/testsuite/go.test/test/complit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test composite literals.
+
package main
type T struct {
diff --git a/gcc/testsuite/go.test/test/complit1.go b/gcc/testsuite/go.test/test/complit1.go
index cd543930ee..521401d739 100644
--- a/gcc/testsuite/go.test/test/complit1.go
+++ b/gcc/testsuite/go.test/test/complit1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal composite literals are detected.
+// Does not compile.
+
package main
var m map[int][3]int
diff --git a/gcc/testsuite/go.test/test/compos.go b/gcc/testsuite/go.test/test/compos.go
index 70f90f3794..de688b39bb 100644
--- a/gcc/testsuite/go.test/test/compos.go
+++ b/gcc/testsuite/go.test/test/compos.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: compos
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that returning &T{} from a function causes an allocation.
+
package main
type T struct {
diff --git a/gcc/testsuite/go.test/test/const.go b/gcc/testsuite/go.test/test/const.go
index a55e13a40d..d583659c6c 100644
--- a/gcc/testsuite/go.test/test/const.go
+++ b/gcc/testsuite/go.test/test/const.go
@@ -1,32 +1,36 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple boolean and numeric constants.
+
package main
+import "os"
+
const (
- c0 = 0
- cm1 = -1
- chuge = 1 << 100
+ c0 = 0
+ cm1 = -1
+ chuge = 1 << 100
chuge_1 = chuge - 1
- c1 = chuge >> 100
- c3div2 = 3/2
- c1e3 = 1e3
+ c1 = chuge >> 100
+ c3div2 = 3 / 2
+ c1e3 = 1e3
- ctrue = true
+ ctrue = true
cfalse = !ctrue
)
const (
- f0 = 0.0
- fm1 = -1.
- fhuge float64 = 1 << 100
+ f0 = 0.0
+ fm1 = -1.
+ fhuge float64 = 1 << 100
fhuge_1 float64 = chuge - 1
- f1 float64 = chuge >> 100
- f3div2 = 3./2.
- f1e3 float64 = 1e3
+ f1 float64 = chuge >> 100
+ f3div2 = 3. / 2.
+ f1e3 float64 = 1e3
)
func assert(t bool, s string) {
@@ -39,8 +43,8 @@ func ints() {
assert(c0 == 0, "c0")
assert(c1 == 1, "c1")
assert(chuge > chuge_1, "chuge")
- assert(chuge_1 + 1 == chuge, "chuge 1")
- assert(chuge + cm1 +1 == chuge, "cm1")
+ assert(chuge_1+1 == chuge, "chuge 1")
+ assert(chuge+cm1+1 == chuge, "cm1")
assert(c3div2 == 1, "3/2")
assert(c1e3 == 1000, "c1e3 int")
assert(c1e3 == 1e3, "c1e3 float")
@@ -79,9 +83,12 @@ func ints() {
func floats() {
assert(f0 == c0, "f0")
assert(f1 == c1, "f1")
- assert(fhuge == fhuge_1, "fhuge") // float64 can't distinguish fhuge, fhuge_1.
- assert(fhuge_1 + 1 == fhuge, "fhuge 1")
- assert(fhuge + fm1 +1 == fhuge, "fm1")
+ // TODO(gri): exp/ssa/interp constant folding is incorrect.
+ if os.Getenv("GOSSAINTERP") == "" {
+ assert(fhuge == fhuge_1, "fhuge") // float64 can't distinguish fhuge, fhuge_1.
+ }
+ assert(fhuge_1+1 == fhuge, "fhuge 1")
+ assert(fhuge+fm1+1 == fhuge, "fm1")
assert(f3div2 == 1.5, "3./2.")
assert(f1e3 == 1000, "f1e3 int")
assert(f1e3 == 1.e3, "f1e3 float")
diff --git a/gcc/testsuite/go.test/test/const1.go b/gcc/testsuite/go.test/test/const1.go
index 67f36e4fdc..58bddee7e0 100644
--- a/gcc/testsuite/go.test/test/const1.go
+++ b/gcc/testsuite/go.test/test/const1.go
@@ -1,11 +1,16 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify overflow is detected when using numeric constants.
+// Does not compile.
+
package main
+import "unsafe"
+
type I interface{}
const (
@@ -13,11 +18,11 @@ const (
Int8 int8 = 101
Minus1 int8 = -1
Uint8 uint8 = 102
- Const = 103
+ Const = 103
Float32 float32 = 104.5
Float64 float64 = 105.5
- ConstFloat = 106.5
+ ConstFloat = 106.5
Big float64 = 1e300
String = "abc"
@@ -35,32 +40,35 @@ var (
a8 = Int8 * Const / 100 // ERROR "overflow"
a9 = Int8 * (Const / 100) // OK
- b1 = Uint8 * Uint8 // ERROR "overflow"
- b2 = Uint8 * -1 // ERROR "overflow"
- b3 = Uint8 - Uint8 // OK
- b4 = Uint8 - Uint8 - Uint8 // ERROR "overflow"
- b5 = uint8(^0) // ERROR "overflow"
- b6 = ^uint8(0) // OK
- b7 = uint8(Minus1) // ERROR "overflow"
- b8 = uint8(int8(-1)) // ERROR "overflow"
- b8a = uint8(-1) // ERROR "overflow"
- b9 byte = (1 << 10) >> 8 // OK
- b10 byte = (1 << 10) // ERROR "overflow"
- b11 byte = (byte(1) << 10) >> 8 // ERROR "overflow"
- b12 byte = 1000 // ERROR "overflow"
- b13 byte = byte(1000) // ERROR "overflow"
- b14 byte = byte(100) * byte(100) // ERROR "overflow"
- b15 byte = byte(100) * 100 // ERROR "overflow"
- b16 byte = byte(0) * 1000 // ERROR "overflow"
- b16a byte = 0 * 1000 // OK
- b17 byte = byte(0) * byte(1000) // ERROR "overflow"
- b18 byte = Uint8 / 0 // ERROR "division by zero"
+ b1 = Uint8 * Uint8 // ERROR "overflow"
+ b2 = Uint8 * -1 // ERROR "overflow"
+ b3 = Uint8 - Uint8 // OK
+ b4 = Uint8 - Uint8 - Uint8 // ERROR "overflow"
+ b5 = uint8(^0) // ERROR "overflow"
+ b5a = int64(^0) // OK
+ b6 = ^uint8(0) // OK
+ b6a = ^int64(0) // OK
+ b7 = uint8(Minus1) // ERROR "overflow"
+ b8 = uint8(int8(-1)) // ERROR "overflow"
+ b8a = uint8(-1) // ERROR "overflow"
+ b9 byte = (1 << 10) >> 8 // OK
+ b10 byte = (1 << 10) // ERROR "overflow"
+ b11 byte = (byte(1) << 10) >> 8 // ERROR "overflow"
+ b12 byte = 1000 // ERROR "overflow"
+ b13 byte = byte(1000) // ERROR "overflow"
+ b14 byte = byte(100) * byte(100) // ERROR "overflow"
+ b15 byte = byte(100) * 100 // ERROR "overflow"
+ b16 byte = byte(0) * 1000 // ERROR "overflow"
+ b16a byte = 0 * 1000 // OK
+ b17 byte = byte(0) * byte(1000) // ERROR "overflow"
+ b18 byte = Uint8 / 0 // ERROR "division by zero"
- c1 float64 = Big
- c2 float64 = Big * Big // ERROR "overflow"
- c3 float64 = float64(Big) * Big // ERROR "overflow"
- c4 = Big * Big // ERROR "overflow"
- c5 = Big / 0 // ERROR "division by zero"
+ c1 float64 = Big
+ c2 float64 = Big * Big // ERROR "overflow"
+ c3 float64 = float64(Big) * Big // ERROR "overflow"
+ c4 = Big * Big // ERROR "overflow"
+ c5 = Big / 0 // ERROR "division by zero"
+ c6 = 1000 % 1e3 // ERROR "floating-point % operation|expected integer type"
)
func f(int)
@@ -80,3 +88,7 @@ func main() {
}
const ptr = nil // ERROR "const.*nil"
+const _ = string([]byte(nil)) // ERROR "is not a? ?constant"
+const _ = uintptr(unsafe.Pointer((*int)(nil))) // ERROR "is not a? ?constant"
+const _ = unsafe.Pointer((*int)(nil)) // ERROR "cannot be nil|invalid constant type"
+const _ = (*int)(nil) // ERROR "cannot be nil|invalid constant type"
diff --git a/gcc/testsuite/go.test/test/const2.go b/gcc/testsuite/go.test/test/const2.go
index bea1b99125..048d0cb9f3 100644
--- a/gcc/testsuite/go.test/test/const2.go
+++ b/gcc/testsuite/go.test/test/const2.go
@@ -1,12 +1,21 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that large integer constant expressions cause overflow.
+// Does not compile.
+
package main
const (
A int = 1
B byte; // ERROR "type without expr|expected .=."
)
+
+const LargeA = 1000000000000000000
+const LargeB = LargeA * LargeA * LargeA
+const LargeC = LargeB * LargeB * LargeB // GC_ERROR "constant multiplication overflow"
+
+const AlsoLargeA = LargeA << 400 << 400 >> 400 >> 400 // GC_ERROR "constant shift overflow"
diff --git a/gcc/testsuite/go.test/test/const3.go b/gcc/testsuite/go.test/test/const3.go
index 9bba6ced0b..3f4e3d1ae6 100644
--- a/gcc/testsuite/go.test/test/const3.go
+++ b/gcc/testsuite/go.test/test/const3.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test typed integer constants.
+
package main
import "fmt"
diff --git a/gcc/testsuite/go.test/test/const4.go b/gcc/testsuite/go.test/test/const4.go
new file mode 100644
index 0000000000..2fb2d0664e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/const4.go
@@ -0,0 +1,82 @@
+// run
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test len constants and non-constants, http://golang.org/issue/3244.
+
+package main
+
+var b struct {
+ a [10]int
+}
+
+var m map[string][20]int
+
+var s [][30]int
+
+const (
+ n1 = len(b.a)
+ n2 = len(m[""])
+ n3 = len(s[10])
+)
+
+// Non-constants (see also const5.go).
+var (
+ n4 = len(f())
+ n5 = len(<-c)
+ n6 = cap(g())
+ n7 = cap(<-c1)
+)
+
+var calledF = false
+
+func f() *[40]int {
+ calledF = true
+ return nil
+}
+
+var c = func() chan *[50]int {
+ c := make(chan *[50]int, 2)
+ c <- nil
+ c <- new([50]int)
+ return c
+}()
+
+var calledG = false
+
+func g() *[60]int {
+ calledG = true
+ return nil
+}
+
+var c1 = func() chan *[70]int {
+ c := make(chan *[70]int, 2)
+ c <- nil
+ c <- new([70]int)
+ return c
+}()
+
+func main() {
+ if n1 != 10 || n2 != 20 || n3 != 30 || n4 != 40 || n5 != 50 || n6 != 60 || n7 != 70 {
+ println("BUG:", n1, n2, n3, n4, n5, n6, n7)
+ panic("fail")
+ }
+ if !calledF {
+ println("BUG: did not call f")
+ panic("fail")
+ }
+ if <-c == nil {
+ println("BUG: did not receive from c")
+ panic("fail")
+ }
+ if !calledG {
+ println("BUG: did not call g")
+ panic("fail")
+ }
+ if <-c1 == nil {
+ println("BUG: did not receive from c1")
+ panic("fail")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/const5.go b/gcc/testsuite/go.test/test/const5.go
new file mode 100644
index 0000000000..87fe33a385
--- /dev/null
+++ b/gcc/testsuite/go.test/test/const5.go
@@ -0,0 +1,33 @@
+// errorcheck
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that len non-constants are not constants, http://golang.org/issue/3244.
+
+package p
+
+var b struct {
+ a[10]int
+}
+
+var m map[string][20]int
+
+var s [][30]int
+
+func f() *[40]int
+var c chan *[50]int
+
+const (
+ n1 = len(b.a)
+ n2 = len(m[""])
+ n3 = len(s[10])
+
+ n4 = len(f()) // ERROR "is not a constant|is not constant"
+ n5 = len(<-c) // ERROR "is not a constant|is not constant"
+
+ n6 = cap(f()) // ERROR "is not a constant|is not constant"
+ n7 = cap(<-c) // ERROR "is not a constant|is not constant"
+)
+
diff --git a/gcc/testsuite/go.test/test/const6.go b/gcc/testsuite/go.test/test/const6.go
new file mode 100644
index 0000000000..c005ac3696
--- /dev/null
+++ b/gcc/testsuite/go.test/test/const6.go
@@ -0,0 +1,30 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Ideal vs non-ideal bool. See issue 3915, 3923.
+
+package p
+
+type mybool bool
+type mybool1 bool
+
+var (
+ x, y int = 1, 2
+ c1 bool = x < y
+ c2 mybool = x < y
+ c3 mybool = c2 == (x < y)
+ c4 mybool = c2 == (1 < 2)
+ c5 mybool = 1 < 2
+ c6 mybool1 = x < y
+ c7 = c1 == c2 // ERROR "mismatched types|incompatible types"
+ c8 = c2 == c6 // ERROR "mismatched types|incompatible types"
+ c9 = c1 == c6 // ERROR "mismatched types|incompatible types"
+ _ = c2 && (x < y)
+ _ = c2 && (1 < 2)
+ _ = c1 && c2 // ERROR "mismatched types|incompatible types"
+ _ = c2 && c6 // ERROR "mismatched types|incompatible types"
+ _ = c1 && c6 // ERROR "mismatched types|incompatible types"
+)
diff --git a/gcc/testsuite/go.test/test/convT2X.go b/gcc/testsuite/go.test/test/convT2X.go
new file mode 100644
index 0000000000..7e27f06b0c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/convT2X.go
@@ -0,0 +1,195 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test conversion from non-interface types to the empty interface.
+
+package main
+
+type J interface {
+ Method()
+}
+
+type (
+ U16 uint16
+ U32 uint32
+ U64 uint64
+ U128 [2]uint64
+ F32 float32
+ F64 float64
+ C128 complex128
+ S string
+ B []byte
+ M map[int]int
+ C chan int
+ Z struct{}
+)
+
+func (U16) Method() {}
+func (U32) Method() {}
+func (U64) Method() {}
+func (U128) Method() {}
+func (F32) Method() {}
+func (F64) Method() {}
+func (C128) Method() {}
+func (S) Method() {}
+func (B) Method() {}
+func (M) Method() {}
+func (C) Method() {}
+func (Z) Method() {}
+
+var (
+ u16 = U16(1)
+ u32 = U32(2)
+ u64 = U64(3)
+ u128 = U128{4, 5}
+ f32 = F32(6)
+ f64 = F64(7)
+ c128 = C128(8 + 9i)
+ s = S("10")
+ b = B("11")
+ m = M{12: 13}
+ c = make(C, 14)
+ z = Z{}
+ p = &z
+ pp = &p
+)
+
+var (
+ iu16 interface{} = u16
+ iu32 interface{} = u32
+ iu64 interface{} = u64
+ iu128 interface{} = u128
+ if32 interface{} = f32
+ if64 interface{} = f64
+ ic128 interface{} = c128
+ is interface{} = s
+ ib interface{} = b
+ im interface{} = m
+ ic interface{} = c
+ iz interface{} = z
+ ip interface{} = p
+ ipp interface{} = pp
+
+ ju16 J = u16
+ ju32 J = u32
+ ju64 J = u64
+ ju128 J = u128
+ jf32 J = f32
+ jf64 J = f64
+ jc128 J = c128
+ js J = s
+ jb J = b
+ jm J = m
+ jc J = c
+ jz J = z
+ jp J = p // The method set for *T contains the methods for T.
+ // pp does not implement error.
+)
+
+func second(a ...interface{}) interface{} {
+ return a[1]
+}
+
+func main() {
+ // Test equality.
+ if u16 != iu16 {
+ panic("u16 != iu16")
+ }
+ if u16 != ju16 {
+ panic("u16 != ju16")
+ }
+ if u32 != iu32 {
+ panic("u32 != iu32")
+ }
+ if u32 != ju32 {
+ panic("u32 != ju32")
+ }
+ if u64 != iu64 {
+ panic("u64 != iu64")
+ }
+ if u64 != ju64 {
+ panic("u64 != ju64")
+ }
+ if u128 != iu128 {
+ panic("u128 != iu128")
+ }
+ if u128 != ju128 {
+ panic("u128 != ju128")
+ }
+ if f32 != if32 {
+ panic("f32 != if32")
+ }
+ if f32 != jf32 {
+ panic("f32 != jf32")
+ }
+ if f64 != if64 {
+ panic("f64 != if64")
+ }
+ if f64 != jf64 {
+ panic("f64 != jf64")
+ }
+ if c128 != ic128 {
+ panic("c128 != ic128")
+ }
+ if c128 != jc128 {
+ panic("c128 != jc128")
+ }
+ if s != is {
+ panic("s != is")
+ }
+ if s != js {
+ panic("s != js")
+ }
+ if c != ic {
+ panic("c != ic")
+ }
+ if c != jc {
+ panic("c != jc")
+ }
+ // There are no tests for b and m, as slices and maps are not comparable by ==.
+ if z != iz {
+ panic("z != iz")
+ }
+ if z != jz {
+ panic("z != jz")
+ }
+ if p != ip {
+ panic("p != ip")
+ }
+ if p != jp {
+ panic("p != jp")
+ }
+ if pp != ipp {
+ panic("pp != ipp")
+ }
+ // pp does not implement J.
+
+ // Test that non-interface types can be used as ...interface{} arguments.
+ if got := second(z, p, pp, u16, u32, u64, u128, f32, f64, c128, s, b, m, c); got != ip {
+ println("second: got", got, "want", ip)
+ panic("fail")
+ }
+
+ // Test that non-interface types can be sent on a chan interface{}.
+ const n = 100
+ uc := make(chan interface{})
+ go func() {
+ for i := 0; i < n; i++ {
+ select {
+ case uc <- nil:
+ case uc <- u32:
+ case uc <- u64:
+ case uc <- u128:
+ }
+ }
+ }()
+ for i := 0; i < n; i++ {
+ if got := <-uc; got != nil && got != u32 && got != u64 && got != u128 {
+ println("recv: i", i, "got", got)
+ panic("fail")
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/convert.go b/gcc/testsuite/go.test/test/convert.go
index 0a75663d06..7280edf333 100644
--- a/gcc/testsuite/go.test/test/convert.go
+++ b/gcc/testsuite/go.test/test/convert.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test types of constant expressions, using reflect.
+
package main
import "reflect"
diff --git a/gcc/testsuite/go.test/test/convert1.go b/gcc/testsuite/go.test/test/convert1.go
index bbd0c5f2b0..0f417a3380 100644
--- a/gcc/testsuite/go.test/test/convert1.go
+++ b/gcc/testsuite/go.test/test/convert1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal conversions involving strings are detected.
+// Does not compile.
+
package main
type Tbyte []byte
diff --git a/gcc/testsuite/go.test/test/convert3.go b/gcc/testsuite/go.test/test/convert3.go
index be68c95b36..143aff04f6 100644
--- a/gcc/testsuite/go.test/test/convert3.go
+++ b/gcc/testsuite/go.test/test/convert3.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify allowed and disallowed conversions.
+// Does not compile.
+
package main
// everything here is legal except the ERROR line
diff --git a/gcc/testsuite/go.test/test/convlit.go b/gcc/testsuite/go.test/test/convlit.go
index 1e82d1f2f5..8a6145d2a0 100644
--- a/gcc/testsuite/go.test/test/convlit.go
+++ b/gcc/testsuite/go.test/test/convlit.go
@@ -1,14 +1,15 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal assignments with both explicit and implicit conversions of literals are detected.
+// Does not compile.
+
package main
-// explicit conversion of constants is work in progress.
-// the ERRORs in this block are debatable, but they're what
-// the language spec says for now.
+// explicit conversion of constants
var x1 = string(1)
var x2 string = string(1)
var x3 = int(1.5) // ERROR "convert|truncate"
diff --git a/gcc/testsuite/go.test/test/convlit1.go b/gcc/testsuite/go.test/test/convlit1.go
index 1e6673cb64..c06bd74438 100644
--- a/gcc/testsuite/go.test/test/convlit1.go
+++ b/gcc/testsuite/go.test/test/convlit1.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal uses of composite literals are detected.
+// Does not compile.
+
package main
var a = []int { "a" }; // ERROR "conver|incompatible|cannot"
diff --git a/gcc/testsuite/go.test/test/copy.go b/gcc/testsuite/go.test/test/copy.go
index 0b5bddbed5..e6108d905d 100644
--- a/gcc/testsuite/go.test/test/copy.go
+++ b/gcc/testsuite/go.test/test/copy.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Semi-exhaustive test for copy()
+// Semi-exhaustive test for the copy predeclared function.
package main
@@ -132,6 +132,7 @@ func verify8(length, in, out, m int) {
n := ncopied(length, in, out)
if m != n {
fmt.Printf("count bad(%d %d %d): %d not %d\n", length, in, out, m, n)
+ os.Exit(1)
return
}
// before
@@ -172,6 +173,7 @@ func verifyS(length, in, out, m int) {
n := ncopied(length, in, out)
if m != n {
fmt.Printf("count bad(%d %d %d): %d not %d\n", length, in, out, m, n)
+ os.Exit(1)
return
}
// before
@@ -212,6 +214,7 @@ func verify16(length, in, out, m int) {
n := ncopied(length, in, out)
if m != n {
fmt.Printf("count bad(%d %d %d): %d not %d\n", length, in, out, m, n)
+ os.Exit(1)
return
}
// before
@@ -252,6 +255,7 @@ func verify32(length, in, out, m int) {
n := ncopied(length, in, out)
if m != n {
fmt.Printf("count bad(%d %d %d): %d not %d\n", length, in, out, m, n)
+ os.Exit(1)
return
}
// before
@@ -292,6 +296,7 @@ func verify64(length, in, out, m int) {
n := ncopied(length, in, out)
if m != n {
fmt.Printf("count bad(%d %d %d): %d not %d\n", length, in, out, m, n)
+ os.Exit(1)
return
}
// before
diff --git a/gcc/testsuite/go.test/test/crlf.go b/gcc/testsuite/go.test/test/crlf.go
index 292b63bf4b..2d56889b03 100644
--- a/gcc/testsuite/go.test/test/crlf.go
+++ b/gcc/testsuite/go.test/test/crlf.go
@@ -1,6 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go &&
-// $G tmp.go && $L tmp.$A && ./$A.out
-// rm -f tmp.go
+// runoutput
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/ddd.go b/gcc/testsuite/go.test/test/ddd.go
index b95d6e883f..01768b89f3 100644
--- a/gcc/testsuite/go.test/test/ddd.go
+++ b/gcc/testsuite/go.test/test/ddd.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test variadic functions and calls (dot-dot-dot).
+
package main
func sum(args ...int) int {
@@ -58,6 +60,10 @@ type U struct {
*T
}
+type I interface {
+ Sum(...int) int
+}
+
func main() {
if x := sum(1, 2, 3); x != 6 {
println("sum 6", x)
@@ -205,7 +211,14 @@ func main() {
println("i(=u).Sum", x)
panic("fail")
}
- /* TODO(rsc): Enable once nested method expressions work.
+ var s struct {
+ I
+ }
+ s.I = &u
+ if x := s.Sum(2, 3, 5, 8); x != 18 {
+ println("s{&u}.Sum", x)
+ panic("fail")
+ }
if x := (*U).Sum(&U{}, 1, 3, 5, 2); x != 11 {
println("(*U).Sum", x)
panic("fail")
@@ -214,5 +227,4 @@ func main() {
println("U.Sum", x)
panic("fail")
}
- */
}
diff --git a/gcc/testsuite/go.test/test/ddd1.go b/gcc/testsuite/go.test/test/ddd1.go
index 6d84248e5e..07981af126 100644
--- a/gcc/testsuite/go.test/test/ddd1.go
+++ b/gcc/testsuite/go.test/test/ddd1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal uses of ... are detected.
+// Does not compile.
+
package main
import "unsafe"
@@ -19,6 +22,16 @@ var (
_ = sum([]int{1}) // ERROR "\[\]int literal.*as type int|incompatible"
)
+func sum3(int, int, int) int { return 0 }
+func tuple() (int, int, int) { return 1, 2, 3 }
+
+var (
+ _ = sum(tuple())
+ _ = sum(tuple()...) // ERROR "multiple-value|[.][.][.]"
+ _ = sum3(tuple())
+ _ = sum3(tuple()...) // ERROR "multiple-value|[.][.][.]" "not enough"
+)
+
type T []T
func funny(args ...T) int { return 0 }
diff --git a/gcc/testsuite/go.test/test/ddd2.dir/ddd2.go b/gcc/testsuite/go.test/test/ddd2.dir/ddd2.go
new file mode 100644
index 0000000000..c9a2675926
--- /dev/null
+++ b/gcc/testsuite/go.test/test/ddd2.dir/ddd2.go
@@ -0,0 +1,16 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This file is compiled and then imported by ddd3.go.
+
+package ddd
+
+func Sum(args ...int) int {
+ s := 0
+ for _, v := range args {
+ s += v
+ }
+ return s
+}
+
diff --git a/gcc/testsuite/go.test/test/ddd2.dir/ddd3.go b/gcc/testsuite/go.test/test/ddd2.dir/ddd3.go
new file mode 100644
index 0000000000..5486fe8a04
--- /dev/null
+++ b/gcc/testsuite/go.test/test/ddd2.dir/ddd3.go
@@ -0,0 +1,28 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that variadic functions work across package boundaries.
+
+package main
+
+import "./ddd2"
+
+func main() {
+ if x := ddd.Sum(1, 2, 3); x != 6 {
+ println("ddd.Sum 6", x)
+ panic("fail")
+ }
+ if x := ddd.Sum(); x != 0 {
+ println("ddd.Sum 0", x)
+ panic("fail")
+ }
+ if x := ddd.Sum(10); x != 10 {
+ println("ddd.Sum 10", x)
+ panic("fail")
+ }
+ if x := ddd.Sum(1, 8); x != 9 {
+ println("ddd.Sum 9", x)
+ panic("fail")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/ddd2.go b/gcc/testsuite/go.test/test/ddd2.go
index a06af0c065..0d9f634ab6 100644
--- a/gcc/testsuite/go.test/test/ddd2.go
+++ b/gcc/testsuite/go.test/test/ddd2.go
@@ -1,16 +1,9 @@
-// true
+// rundir
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package ddd
-
-func Sum(args ...int) int {
- s := 0
- for _, v := range args {
- s += v
- }
- return s
-}
+// Test that variadic functions work across package boundaries.
+package ignored
diff --git a/gcc/testsuite/go.test/test/ddd3.go b/gcc/testsuite/go.test/test/ddd3.go
deleted file mode 100644
index 5d5ebdf0fa..0000000000
--- a/gcc/testsuite/go.test/test/ddd3.go
+++ /dev/null
@@ -1,28 +0,0 @@
-// $G $D/ddd2.go && $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "./ddd2"
-
-func main() {
- if x := ddd.Sum(1, 2, 3); x != 6 {
- println("ddd.Sum 6", x)
- panic("fail")
- }
- if x := ddd.Sum(); x != 0 {
- println("ddd.Sum 0", x)
- panic("fail")
- }
- if x := ddd.Sum(10); x != 10 {
- println("ddd.Sum 10", x)
- panic("fail")
- }
- if x := ddd.Sum(1, 8); x != 9 {
- println("ddd.Sum 9", x)
- panic("fail")
- }
-}
diff --git a/gcc/testsuite/go.test/test/decl.go b/gcc/testsuite/go.test/test/decl.go
index 95b6346c3e..e2f126adb2 100644
--- a/gcc/testsuite/go.test/test/decl.go
+++ b/gcc/testsuite/go.test/test/decl.go
@@ -1,10 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Correct short declarations and redeclarations.
+// Test correct short declarations and redeclarations.
package main
@@ -33,8 +33,9 @@ func main() {
m, h, s := f3()
_, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h
}
- if x() != "3" {
- println("x() failed")
+ if y := x(); y != "3" {
+ println("x() failed", y)
+ panic("fail")
}
_, _, _, _, _, _, _, _, _ = i, f, s, j, k, m, g, s, h
}
diff --git a/gcc/testsuite/go.test/test/declbad.go b/gcc/testsuite/go.test/test/declbad.go
index 09f1dfb576..728eceb7f1 100644
--- a/gcc/testsuite/go.test/test/declbad.go
+++ b/gcc/testsuite/go.test/test/declbad.go
@@ -1,10 +1,11 @@
-// errchk $G -e $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Incorrect short declarations and redeclarations.
+// Test that incorrect short declarations and redeclarations are detected.
+// Does not compile.
package main
@@ -38,6 +39,14 @@ func main() {
_, _, _ = i, f, s
}
{
+ // multiline no new variables
+ i := f1
+ i := func() int { // ERROR "redeclared|no new|incompatible"
+ return 0
+ }
+ _ = i
+ }
+ {
// single redeclaration
i, f, s := f3()
i := 1 // ERROR "redeclared|no new|incompatible"
diff --git a/gcc/testsuite/go.test/test/defer.go b/gcc/testsuite/go.test/test/defer.go
index bef8fbe26a..6731ab7ee8 100644
--- a/gcc/testsuite/go.test/test/defer.go
+++ b/gcc/testsuite/go.test/test/defer.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test defer.
+
package main
import "fmt"
@@ -23,6 +25,7 @@ func test1() {
test1helper()
if result != "9876543210" {
fmt.Printf("test1: bad defer result (should be 9876543210): %q\n", result)
+ panic("defer")
}
}
@@ -39,6 +42,7 @@ func test2() {
test2helper()
if result != "9876543210" {
fmt.Printf("test2: bad defer result (should be 9876543210): %q\n", result)
+ panic("defer")
}
}
diff --git a/gcc/testsuite/go.test/test/deferfin.go b/gcc/testsuite/go.test/test/deferfin.go
new file mode 100644
index 0000000000..fa5a93354d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/deferfin.go
@@ -0,0 +1,63 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that defers do not prevent garbage collection.
+
+package main
+
+import (
+ "runtime"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+var sink func()
+
+func main() {
+ // Does not work on 32-bits due to partially conservative GC.
+ // Try to enable when we have fully precise GC.
+ if runtime.GOARCH != "amd64" {
+ return
+ }
+ // Likewise for gccgo.
+ if runtime.Compiler == "gccgo" {
+ return
+ }
+ N := 10
+ count := int32(N)
+ var wg sync.WaitGroup
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go func() {
+ defer wg.Done()
+ v := new(int)
+ f := func() {
+ if *v != 0 {
+ panic("oops")
+ }
+ }
+ if *v != 0 {
+ // let the compiler think f escapes
+ sink = f
+ }
+ runtime.SetFinalizer(v, func(p *int) {
+ atomic.AddInt32(&count, -1)
+ })
+ defer f()
+ }()
+ }
+ wg.Wait()
+ for i := 0; i < 3; i++ {
+ time.Sleep(10 * time.Millisecond)
+ runtime.GC()
+ }
+ if count != 0 {
+ println(count, "out of", N, "finalizer are not called")
+ panic("not all finalizers are called")
+ }
+}
+
diff --git a/gcc/testsuite/go.test/test/deferprint.go b/gcc/testsuite/go.test/test/deferprint.go
index 0e0c618216..72c98b19fc 100644
--- a/gcc/testsuite/go.test/test/deferprint.go
+++ b/gcc/testsuite/go.test/test/deferprint.go
@@ -1,14 +1,17 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that we can defer the predeclared functions print and println.
+
package main
func main() {
defer println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
defer println(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20)
-// defer panic("dead")
+ // Disabled so the test doesn't crash but left here for reference.
+ // defer panic("dead")
defer print("printing: ")
}
diff --git a/gcc/testsuite/go.test/test/divide.go b/gcc/testsuite/go.test/test/divide.go
index 5c0f45059a..b20f1062f6 100644
--- a/gcc/testsuite/go.test/test/divide.go
+++ b/gcc/testsuite/go.test/test/divide.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// divide corner cases
+// Test divide corner cases.
package main
@@ -13,36 +13,44 @@ import "fmt"
func f8(x, y, q, r int8) {
if t := x / y; t != q {
fmt.Printf("%d/%d = %d, want %d\n", x, y, t, q)
+ panic("divide")
}
if t := x % y; t != r {
fmt.Printf("%d%%%d = %d, want %d\n", x, y, t, r)
+ panic("divide")
}
}
func f16(x, y, q, r int16) {
if t := x / y; t != q {
fmt.Printf("%d/%d = %d, want %d\n", x, y, t, q)
+ panic("divide")
}
if t := x % y; t != r {
fmt.Printf("%d%%%d = %d, want %d\n", x, y, t, r)
+ panic("divide")
}
}
func f32(x, y, q, r int32) {
if t := x / y; t != q {
fmt.Printf("%d/%d = %d, want %d\n", x, y, t, q)
+ panic("divide")
}
if t := x % y; t != r {
fmt.Printf("%d%%%d = %d, want %d\n", x, y, t, r)
+ panic("divide")
}
}
func f64(x, y, q, r int64) {
if t := x / y; t != q {
fmt.Printf("%d/%d = %d, want %d\n", x, y, t, q)
+ panic("divide")
}
if t := x % y; t != r {
fmt.Printf("%d%%%d = %d, want %d\n", x, y, t, r)
+ panic("divide")
}
}
diff --git a/gcc/testsuite/go.test/test/divmod.go b/gcc/testsuite/go.test/test/divmod.go
new file mode 100644
index 0000000000..49fed0222c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/divmod.go
@@ -0,0 +1,460 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test division of variables. Generate many test cases,
+// compute correct answer using shift and subtract,
+// and then compare against results from divison and
+// modulus operators.
+//
+// Primarily useful for testing software div/mod.
+
+package main
+
+const long = false
+
+func main() {
+ if long {
+ // About 3e9 test cases (calls to checkdiv3).
+ // Too long for everyday testing.
+ gen2(3, 64, 2, 64, checkdiv1)
+ println(ntest)
+ } else {
+ // About 4e6 test cases (calls to checkdiv3).
+ // Runs for 8 seconds on ARM chromebook, much faster elsewhere.
+ gen2(2, 64, 1, 64, checkdiv1)
+ }
+}
+
+// generate all uint64 values x where x has at most n bits set in the low w
+// and call f(x) for each.
+func gen1(n, w int, f func(uint64)) {
+ gen(0, 0, n, w-1, f)
+}
+
+func gen(val uint64, nbits, maxbits, pos int, f func(uint64)) {
+ if pos < 0 {
+ f(val)
+ return
+ }
+ gen(val, nbits, maxbits, pos-1, f)
+ if nbits < maxbits {
+ gen(val|1<<uint(pos), nbits+1, maxbits, pos-1, f)
+ }
+}
+
+// generate all uint64 values x, y where x has at most n1 bits set in the low w1
+// and y has at most n2 bits set in the low w2 and call f(x, y) for each.
+func gen2(n1, w1, n2, w2 int, f func(uint64, uint64)) {
+ gen1(n1, w1, func(x uint64) {
+ gen1(n2, w2, func(y uint64) {
+ f(x, y)
+ })
+ })
+}
+
+// x and y are uint64s with at most 2 bits set.
+// Check those values and values above and below,
+// along with bitwise inversions of the same (done in checkdiv2).
+func checkdiv1(x, y uint64) {
+ checkdiv2(x, y)
+ // If the low bit is set in x or y, adding or subtracting 1
+ // produces a number that checkdiv1 is going to be called
+ // with anyway, so don't duplicate effort.
+ if x&1 == 0 {
+ checkdiv2(x+1, y)
+ checkdiv2(x-1, y)
+ }
+ if y&1 == 0 {
+ checkdiv2(x, y-1)
+ checkdiv2(x, y+1)
+ if x&1 == 0 {
+ checkdiv2(x+1, y-1)
+ checkdiv2(x-1, y-1)
+ checkdiv2(x-1, y+1)
+ checkdiv2(x+1, y+1)
+ }
+ }
+}
+
+func checkdiv2(x, y uint64) {
+ checkdiv3(x, y)
+ checkdiv3(^x, y)
+ checkdiv3(x, ^y)
+ checkdiv3(^x, ^y)
+}
+
+var ntest int64 = 0
+
+func checkdiv3(x, y uint64) {
+ ntest++
+ if ntest&(ntest-1) == 0 && long {
+ println(ntest, "...")
+ }
+ checkuint64(x, y)
+ if (uint64(uint32(x)) == x || uint64(uint32(^x)) == ^x) && (uint64(uint32(y)) == y || uint64(uint32(^y)) == ^y) {
+ checkuint32(uint32(x), uint32(y))
+ }
+ if (uint64(uint16(x)) == x || uint64(uint16(^x)) == ^x) && (uint64(uint16(y)) == y || uint64(uint16(^y)) == ^y) {
+ checkuint16(uint16(x), uint16(y))
+ }
+ if (uint64(uint8(x)) == x || uint64(uint8(^x)) == ^x) && (uint64(uint8(y)) == y || uint64(uint8(^y)) == ^y) {
+ checkuint8(uint8(x), uint8(y))
+ }
+
+
+ sx := int64(x)
+ sy := int64(y)
+ checkint64(sx, sy)
+ if (int64(int32(sx)) == sx || int64(int32(^sx)) == ^sx) && (int64(int32(sy)) == sy || int64(int32(^sy)) == ^sy) {
+ checkint32(int32(sx), int32(sy))
+ }
+ if (int64(int16(sx)) == sx || int64(int16(^sx)) == ^sx) && (int64(int16(sy)) == sy || int64(int16(^sy)) == ^sy) {
+ checkint16(int16(sx), int16(sy))
+ }
+ if (int64(int8(sx)) == sx || int64(int8(^sx)) == ^sx) && (int64(int8(sy)) == sy || int64(int8(^sy)) == ^sy) {
+ checkint8(int8(sx), int8(sy))
+ }
+}
+
+// Check result of x/y, x%y for various types.
+
+func checkuint(x, y uint) {
+ if y == 0 {
+ divzerouint(x, y)
+ modzerouint(x, y)
+ return
+ }
+ q, r := udiv(uint64(x), uint64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != uint(q) {
+ print("uint(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != uint(r) {
+ print("uint(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkuint64(x, y uint64) {
+ if y == 0 {
+ divzerouint64(x, y)
+ modzerouint64(x, y)
+ return
+ }
+ q, r := udiv(x, y)
+ q1 := x/y
+ r1 := x%y
+ if q1 != q {
+ print("uint64(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != r {
+ print("uint64(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkuint32(x, y uint32) {
+ if y == 0 {
+ divzerouint32(x, y)
+ modzerouint32(x, y)
+ return
+ }
+ q, r := udiv(uint64(x), uint64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != uint32(q) {
+ print("uint32(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != uint32(r) {
+ print("uint32(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkuint16(x, y uint16) {
+ if y == 0 {
+ divzerouint16(x, y)
+ modzerouint16(x, y)
+ return
+ }
+ q, r := udiv(uint64(x), uint64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != uint16(q) {
+ print("uint16(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != uint16(r) {
+ print("uint16(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkuint8(x, y uint8) {
+ if y == 0 {
+ divzerouint8(x, y)
+ modzerouint8(x, y)
+ return
+ }
+ q, r := udiv(uint64(x), uint64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != uint8(q) {
+ print("uint8(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != uint8(r) {
+ print("uint8(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkint(x, y int) {
+ if y == 0 {
+ divzeroint(x, y)
+ modzeroint(x, y)
+ return
+ }
+ q, r := idiv(int64(x), int64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != int(q) {
+ print("int(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != int(r) {
+ print("int(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkint64(x, y int64) {
+ if y == 0 {
+ divzeroint64(x, y)
+ modzeroint64(x, y)
+ return
+ }
+ q, r := idiv(x, y)
+ q1 := x/y
+ r1 := x%y
+ if q1 != q {
+ print("int64(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != r {
+ print("int64(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkint32(x, y int32) {
+ if y == 0 {
+ divzeroint32(x, y)
+ modzeroint32(x, y)
+ return
+ }
+ q, r := idiv(int64(x), int64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != int32(q) {
+ print("int32(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != int32(r) {
+ print("int32(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkint16(x, y int16) {
+ if y == 0 {
+ divzeroint16(x, y)
+ modzeroint16(x, y)
+ return
+ }
+ q, r := idiv(int64(x), int64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != int16(q) {
+ print("int16(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != int16(r) {
+ print("int16(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func checkint8(x, y int8) {
+ if y == 0 {
+ divzeroint8(x, y)
+ modzeroint8(x, y)
+ return
+ }
+ q, r := idiv(int64(x), int64(y))
+ q1 := x/y
+ r1 := x%y
+ if q1 != int8(q) {
+ print("int8(", x, "/", y, ") = ", q1, ", want ", q, "\n")
+ }
+ if r1 != int8(r) {
+ print("int8(", x, "%", y, ") = ", r1, ", want ", r, "\n")
+ }
+}
+
+func divzerouint(x, y uint) uint {
+ defer checkudivzero("uint", uint64(x))
+ return x / y
+}
+
+func divzerouint64(x, y uint64) uint64 {
+ defer checkudivzero("uint64", uint64(x))
+ return x / y
+}
+
+func divzerouint32(x, y uint32) uint32 {
+ defer checkudivzero("uint32", uint64(x))
+ return x / y
+}
+
+func divzerouint16(x, y uint16) uint16 {
+ defer checkudivzero("uint16", uint64(x))
+ return x / y
+}
+
+func divzerouint8(x, y uint8) uint8 {
+ defer checkudivzero("uint8", uint64(x))
+ return x / y
+}
+
+func checkudivzero(typ string, x uint64) {
+ if recover() == nil {
+ print(typ, "(", x, " / 0) did not panic")
+ }
+}
+
+func divzeroint(x, y int) int {
+ defer checkdivzero("int", int64(x))
+ return x / y
+}
+
+func divzeroint64(x, y int64) int64 {
+ defer checkdivzero("int64", int64(x))
+ return x / y
+}
+
+func divzeroint32(x, y int32) int32 {
+ defer checkdivzero("int32", int64(x))
+ return x / y
+}
+
+func divzeroint16(x, y int16) int16 {
+ defer checkdivzero("int16", int64(x))
+ return x / y
+}
+
+func divzeroint8(x, y int8) int8 {
+ defer checkdivzero("int8", int64(x))
+ return x / y
+}
+
+func checkdivzero(typ string, x int64) {
+ if recover() == nil {
+ print(typ, "(", x, " / 0) did not panic")
+ }
+}
+
+func modzerouint(x, y uint) uint {
+ defer checkumodzero("uint", uint64(x))
+ return x % y
+}
+
+func modzerouint64(x, y uint64) uint64 {
+ defer checkumodzero("uint64", uint64(x))
+ return x % y
+}
+
+func modzerouint32(x, y uint32) uint32 {
+ defer checkumodzero("uint32", uint64(x))
+ return x % y
+}
+
+func modzerouint16(x, y uint16) uint16 {
+ defer checkumodzero("uint16", uint64(x))
+ return x % y
+}
+
+func modzerouint8(x, y uint8) uint8 {
+ defer checkumodzero("uint8", uint64(x))
+ return x % y
+}
+
+func checkumodzero(typ string, x uint64) {
+ if recover() == nil {
+ print(typ, "(", x, " % 0) did not panic")
+ }
+}
+
+func modzeroint(x, y int) int {
+ defer checkmodzero("int", int64(x))
+ return x % y
+}
+
+func modzeroint64(x, y int64) int64 {
+ defer checkmodzero("int64", int64(x))
+ return x % y
+}
+
+func modzeroint32(x, y int32) int32 {
+ defer checkmodzero("int32", int64(x))
+ return x % y
+}
+
+func modzeroint16(x, y int16) int16 {
+ defer checkmodzero("int16", int64(x))
+ return x % y
+}
+
+func modzeroint8(x, y int8) int8 {
+ defer checkmodzero("int8", int64(x))
+ return x % y
+}
+
+func checkmodzero(typ string, x int64) {
+ if recover() == nil {
+ print(typ, "(", x, " % 0) did not panic")
+ }
+}
+
+// unsigned divide and mod using shift and subtract.
+func udiv(x, y uint64) (q, r uint64) {
+ sh := 0
+ for y+y > y && y+y <= x {
+ sh++
+ y <<= 1
+ }
+ for ; sh >= 0; sh-- {
+ q <<= 1
+ if x >= y {
+ x -= y
+ q |= 1
+ }
+ y >>= 1
+ }
+ return q, x
+}
+
+// signed divide and mod: do unsigned and adjust signs.
+func idiv(x, y int64) (q, r int64) {
+ // special case for minint / -1 = minint
+ if x-1 > x && y == -1 {
+ return x, 0
+ }
+ ux := uint64(x)
+ uy := uint64(y)
+ if x < 0 {
+ ux = -ux
+ }
+ if y < 0 {
+ uy = -uy
+ }
+ uq, ur := udiv(ux, uy)
+ q = int64(uq)
+ r = int64(ur)
+ if x < 0 {
+ r = -r
+ }
+ if (x < 0) != (y < 0) {
+ q = -q
+ }
+ return q, r
+}
diff --git a/gcc/testsuite/go.test/test/dwarf/dwarf.dir/main.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/main.go
new file mode 100644
index 0000000000..175a09c779
--- /dev/null
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/main.go
@@ -0,0 +1,32 @@
+// $G $D/$F.go $D/z*.go && $L $F.$A && ./$A.out
+
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+func main() {
+F1()
+F2()
+F3()
+F4()
+F5()
+F6()
+F7()
+F8()
+F9()
+F10()
+F11()
+F12()
+F13()
+F14()
+F15()
+F16()
+F17()
+F18()
+F19()
+F20()
+}
diff --git a/gcc/testsuite/go.test/test/dwarf/z1.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z1.go
index 7f163e9a1d..7f163e9a1d 100644
--- a/gcc/testsuite/go.test/test/dwarf/z1.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z1.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z10.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z10.go
index 19c70020e0..19c70020e0 100644
--- a/gcc/testsuite/go.test/test/dwarf/z10.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z10.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z11.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z11.go
index c1d2f9180f..c1d2f9180f 100644
--- a/gcc/testsuite/go.test/test/dwarf/z11.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z11.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z12.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z12.go
index 7455f18946..7455f18946 100644
--- a/gcc/testsuite/go.test/test/dwarf/z12.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z12.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z13.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z13.go
index ecb3c4c8c7..ecb3c4c8c7 100644
--- a/gcc/testsuite/go.test/test/dwarf/z13.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z13.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z14.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z14.go
index 134b39b64e..134b39b64e 100644
--- a/gcc/testsuite/go.test/test/dwarf/z14.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z14.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z15.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z15.go
index d73819b443..d73819b443 100644
--- a/gcc/testsuite/go.test/test/dwarf/z15.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z15.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z16.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z16.go
index 6c31651baa..6c31651baa 100644
--- a/gcc/testsuite/go.test/test/dwarf/z16.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z16.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z17.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z17.go
index b742d16726..b742d16726 100644
--- a/gcc/testsuite/go.test/test/dwarf/z17.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z17.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z18.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z18.go
index 84150ff0a3..84150ff0a3 100644
--- a/gcc/testsuite/go.test/test/dwarf/z18.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z18.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z19.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z19.go
index bb2e296841..bb2e296841 100644
--- a/gcc/testsuite/go.test/test/dwarf/z19.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z19.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z2.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z2.go
index 68bd58257d..68bd58257d 100644
--- a/gcc/testsuite/go.test/test/dwarf/z2.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z2.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z20.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z20.go
index 03111e1845..03111e1845 100644
--- a/gcc/testsuite/go.test/test/dwarf/z20.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z20.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z3.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z3.go
index 5e4ad3ae25..5e4ad3ae25 100644
--- a/gcc/testsuite/go.test/test/dwarf/z3.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z3.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z4.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z4.go
index 1f28465c57..1f28465c57 100644
--- a/gcc/testsuite/go.test/test/dwarf/z4.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z4.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z5.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z5.go
index 7f4eeb419a..7f4eeb419a 100644
--- a/gcc/testsuite/go.test/test/dwarf/z5.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z5.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z6.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z6.go
index 241791dff2..241791dff2 100644
--- a/gcc/testsuite/go.test/test/dwarf/z6.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z6.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z7.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z7.go
index 68c1ad0c24..68c1ad0c24 100644
--- a/gcc/testsuite/go.test/test/dwarf/z7.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z7.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z8.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z8.go
index 16eed32a28..16eed32a28 100644
--- a/gcc/testsuite/go.test/test/dwarf/z8.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z8.go
diff --git a/gcc/testsuite/go.test/test/dwarf/z9.go b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z9.go
index cbb94b4d2b..cbb94b4d2b 100644
--- a/gcc/testsuite/go.test/test/dwarf/z9.go
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.dir/z9.go
diff --git a/gcc/testsuite/go.test/test/dwarf/dwarf.go b/gcc/testsuite/go.test/test/dwarf/dwarf.go
new file mode 100644
index 0000000000..32dd7d3d57
--- /dev/null
+++ b/gcc/testsuite/go.test/test/dwarf/dwarf.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// See issue 2241 and issue 1878: dwarf include stack size
+// issues in linker.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/dwarf/linedirectives.go b/gcc/testsuite/go.test/test/dwarf/linedirectives.go
index 68434f0ab5..cc4ffb000f 100644
--- a/gcc/testsuite/go.test/test/dwarf/linedirectives.go
+++ b/gcc/testsuite/go.test/test/dwarf/linedirectives.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/dwarf/main.go b/gcc/testsuite/go.test/test/dwarf/main.go
deleted file mode 100644
index 7f2ec4c00a..0000000000
--- a/gcc/testsuite/go.test/test/dwarf/main.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// $G $D/$F.go $D/z*.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-func main() {
-F1()
-F2()
-F3()
-F4()
-F5()
-F6()
-F7()
-F8()
-F9()
-F10()
-F11()
-F12()
-F13()
-F14()
-F15()
-F16()
-F17()
-F18()
-F19()
-F20()
-}
diff --git a/gcc/testsuite/go.test/test/empty.go b/gcc/testsuite/go.test/test/empty.go
index fa10d6931d..92a79a4e0d 100644
--- a/gcc/testsuite/go.test/test/empty.go
+++ b/gcc/testsuite/go.test/test/empty.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that top-level parenthesized declarations can be empty.
+// Compiles but does not run.
+
package P
import ( )
diff --git a/gcc/testsuite/go.test/test/env.go b/gcc/testsuite/go.test/test/env.go
index 3c8e423283..972374679a 100644
--- a/gcc/testsuite/go.test/test/env.go
+++ b/gcc/testsuite/go.test/test/env.go
@@ -1,4 +1,4 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/eof.go b/gcc/testsuite/go.test/test/eof.go
index 81f9fd028f..06c779046b 100644
--- a/gcc/testsuite/go.test/test/eof.go
+++ b/gcc/testsuite/go.test/test/eof.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test a source file does not need a final newline.
+// Compiles but does not run.
+
// No newline at the end of this file.
package main \ No newline at end of file
diff --git a/gcc/testsuite/go.test/test/eof1.go b/gcc/testsuite/go.test/test/eof1.go
index c39a3cfdb1..2105b89080 100644
--- a/gcc/testsuite/go.test/test/eof1.go
+++ b/gcc/testsuite/go.test/test/eof1.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+// Test that a comment ending a source file does not need a final newline.
+// Compiles but does not run.
+
+package eof1
// No newline at the end of this comment. \ No newline at end of file
diff --git a/gcc/testsuite/go.test/test/errchk b/gcc/testsuite/go.test/test/errchk
index 6b00570bde..de0c4fd2f8 100755
--- a/gcc/testsuite/go.test/test/errchk
+++ b/gcc/testsuite/go.test/test/errchk
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!/usr/bin/env perl
# Copyright 2009 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
@@ -31,7 +31,7 @@ if(@ARGV < 1) {
# Grab SOURCEFILES
foreach(reverse 0 .. @ARGV-1) {
- unless($ARGV[$_] =~ /\.go$/) {
+ unless($ARGV[$_] =~ /\.(go|s)$/) {
@file = @ARGV[$_+1 .. @ARGV-1];
last;
}
diff --git a/gcc/testsuite/go.test/test/escape.go b/gcc/testsuite/go.test/test/escape.go
index d4d844704e..252a1e59cc 100644
--- a/gcc/testsuite/go.test/test/escape.go
+++ b/gcc/testsuite/go.test/test/escape.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,8 +6,8 @@
package main
-// check for correct heap-moving of escaped variables.
-// it is hard to check for the allocations, but it is easy
+// Test for correct heap-moving of escaped variables.
+// It is hard to check for the allocations, but it is easy
// to check that if you call the function twice at the
// same stack level, the pointers returned should be
// different.
@@ -18,15 +18,15 @@ var allptr = make([]*int, 0, 100)
func noalias(p, q *int, s string) {
n := len(allptr)
- *p = -(n+1)
- *q = -(n+2)
- allptr = allptr[0:n+2]
+ *p = -(n + 1)
+ *q = -(n + 2)
+ allptr = allptr[0 : n+2]
allptr[n] = p
allptr[n+1] = q
n += 2
for i := 0; i < n; i++ {
if allptr[i] != nil && *allptr[i] != -(i+1) {
- println("aliased pointers", -(i+1), *allptr[i], "after", s)
+ println("aliased pointers", -(i + 1), *allptr[i], "after", s)
allptr[i] = nil
bad = true
}
@@ -52,9 +52,11 @@ func chk(p, q *int, v int, s string) {
func chkalias(p, q *int, v int, s string) {
if p != q {
println("want aliased pointers but got different after", s)
+ bad = true
}
if *q != v+1 {
println("wrong value want", v+1, "got", *q, "after", s)
+ bad = true
}
}
@@ -141,15 +143,27 @@ func for_escapes2(x int, y int) (*int, *int) {
return p[0], p[1]
}
+func for_escapes3(x int, y int) (*int, *int) {
+ var f [2]func() *int
+ n := 0
+ for i := x; n < 2; i = y {
+ p := new(int)
+ *p = i
+ f[n] = func() *int { return p }
+ n++
+ }
+ return f[0](), f[1]()
+}
+
func out_escapes(i int) (x int, p *int) {
x = i
- p = &x // ERROR "address of out parameter"
+ p = &x // ERROR "address of out parameter"
return
}
func out_escapes_2(i int) (x int, p *int) {
x = i
- return x, &x // ERROR "address of out parameter"
+ return x, &x // ERROR "address of out parameter"
}
func defer1(i int) (x int) {
@@ -187,6 +201,9 @@ func main() {
p, q = for_escapes2(103, 104)
chkalias(p, q, 103, "for_escapes2")
+ p, q = for_escapes3(105, 106)
+ chk(p, q, 105, "for_escapes3")
+
_, p = out_escapes(15)
_, q = out_escapes(16)
chk(p, q, 15, "out_escapes")
diff --git a/gcc/testsuite/go.test/test/escape2.go b/gcc/testsuite/go.test/test/escape2.go
index 73b2a7e589..be89c2d840 100644
--- a/gcc/testsuite/go.test/test/escape2.go
+++ b/gcc/testsuite/go.test/test/escape2.go
@@ -1,9 +1,12 @@
-// errchk -0 $G -m -l $D/$F.go
+// errorcheck -0 -m -l
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test, using compiler diagnostic flags, that the escape analysis is working.
+// Compiles but does not run. Inlining is disabled.
+
package foo
import (
@@ -77,7 +80,9 @@ func foo12(yyy **int) { // ERROR "leaking param: yyy"
xxx = yyy
}
-func foo13(yyy **int) { // ERROR "yyy does not escape"
+// Must treat yyy as leaking because *yyy leaks, and the escape analysis
+// summaries in exported metadata do not distinguish these two cases.
+func foo13(yyy **int) { // ERROR "leaking param: yyy"
*xxx = *yyy
}
@@ -139,13 +144,13 @@ func (b Bar) AlsoLeak() *int { // ERROR "leaking param: b"
}
func (b Bar) LeaksToo() *int { // ERROR "leaking param: b"
- v := 0 // ERROR "moved to heap: v"
+ v := 0 // ERROR "moved to heap: v"
b.ii = &v // ERROR "&v escapes"
return b.ii
}
func (b *Bar) LeaksABit() *int { // ERROR "b does not escape"
- v := 0 // ERROR "moved to heap: v"
+ v := 0 // ERROR "moved to heap: v"
b.ii = &v // ERROR "&v escapes"
return b.ii
}
@@ -296,7 +301,8 @@ func (f *Foo) foo45() { // ERROR "f does not escape"
F.x = f.x
}
-func (f *Foo) foo46() { // ERROR "f does not escape"
+// See foo13 above for explanation of why f leaks.
+func (f *Foo) foo46() { // ERROR "leaking param: f"
F.xx = f.xx
}
@@ -537,6 +543,19 @@ func foo74() {
}
}
+// issue 3975
+func foo74b() {
+ var array [3]func()
+ s := []int{3, 2, 1} // ERROR "\[\]int literal does not escape"
+ for i, v := range s {
+ vv := v // ERROR "moved to heap: vv"
+ // actually just escapes its scope
+ array[i] = func() { // ERROR "func literal escapes to heap"
+ println(vv) // ERROR "&vv escapes to heap"
+ }
+ }
+}
+
func myprint(y *int, x ...interface{}) *int { // ERROR "x does not escape" "leaking param: y"
return y
}
@@ -545,12 +564,21 @@ func myprint1(y *int, x ...interface{}) *interface{} { // ERROR "y does not esca
return &x[0] // ERROR "&x.0. escapes to heap"
}
-func foo75(z *int) { // ERROR "leaking param: z"
+func foo75(z *int) { // ERROR "z does not escape"
myprint(z, 1, 2, 3) // ERROR "[.][.][.] argument does not escape"
}
func foo75a(z *int) { // ERROR "z does not escape"
- myprint1(z, 1, 2, 3) // ERROR "[.][.][.] argument escapes to heap"
+ myprint1(z, 1, 2, 3) // ERROR "[.][.][.] argument does not escape"
+}
+
+func foo75esc(z *int) { // ERROR "leaking param: z"
+ gxx = myprint(z, 1, 2, 3) // ERROR "[.][.][.] argument does not escape"
+}
+
+func foo75aesc(z *int) { // ERROR "z does not escape"
+ var ppi **interface{} // assignments to pointer dereferences lose track
+ *ppi = myprint1(z, 1, 2, 3) // ERROR "[.][.][.] argument escapes to heap"
}
func foo76(z *int) { // ERROR "leaking param: z"
@@ -558,7 +586,7 @@ func foo76(z *int) { // ERROR "leaking param: z"
}
func foo76a(z *int) { // ERROR "leaking param: z"
- myprint1(nil, z) // ERROR "[.][.][.] argument escapes to heap"
+ myprint1(nil, z) // ERROR "[.][.][.] argument does not escape"
}
func foo76b() {
@@ -566,7 +594,7 @@ func foo76b() {
}
func foo76c() {
- myprint1(nil, 1, 2, 3) // ERROR "[.][.][.] argument escapes to heap"
+ myprint1(nil, 1, 2, 3) // ERROR "[.][.][.] argument does not escape"
}
func foo76d() {
@@ -574,7 +602,7 @@ func foo76d() {
}
func foo76e() {
- defer myprint1(nil, 1, 2, 3) // ERROR "[.][.][.] argument escapes to heap"
+ defer myprint1(nil, 1, 2, 3) // ERROR "[.][.][.] argument does not escape"
}
func foo76f() {
@@ -594,10 +622,15 @@ func foo77(z []interface{}) { // ERROR "z does not escape"
myprint(nil, z...) // z does not escape
}
-func foo77a(z []interface{}) { // ERROR "leaking param: z"
+func foo77a(z []interface{}) { // ERROR "z does not escape"
myprint1(nil, z...)
}
+func foo77b(z []interface{}) { // ERROR "leaking param: z"
+ var ppi **interface{}
+ *ppi = myprint1(nil, z...)
+}
+
func foo78(z int) *int { // ERROR "moved to heap: z"
return &z // ERROR "&z escapes to heap"
}
@@ -630,6 +663,21 @@ func foo81() *int {
return nil
}
+func tee(p *int) (x, y *int) { return p, p } // ERROR "leaking param"
+
+func noop(x, y *int) {} // ERROR "does not escape"
+
+func foo82() {
+ var x, y, z int // ERROR "moved to heap"
+ go noop(tee(&z)) // ERROR "&z escapes to heap"
+ go noop(&x, &y) // ERROR "escapes to heap"
+ for {
+ var u, v, w int // ERROR "moved to heap"
+ defer noop(tee(&u)) // ERROR "&u escapes to heap"
+ defer noop(&v, &w) // ERROR "escapes to heap"
+ }
+}
+
type Fooer interface {
Foo()
}
@@ -1048,7 +1096,7 @@ func foo122() {
goto L1
L1:
- i = new(int) // ERROR "does not escape"
+ i = new(int) // ERROR "new.int. does not escape"
_ = i
}
@@ -1057,8 +1105,255 @@ func foo123() {
var i *int
L1:
- i = new(int) // ERROR "escapes"
+ i = new(int) // ERROR "new.int. escapes to heap"
goto L1
_ = i
}
+
+func foo124(x **int) { // ERROR "x does not escape"
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes"
+ func() { // ERROR "func literal does not escape"
+ *x = p // ERROR "leaking closure reference p"
+ }()
+}
+
+func foo125(ch chan *int) { // ERROR "does not escape"
+ var i int // ERROR "moved to heap"
+ p := &i // ERROR "&i escapes to heap"
+ func() { // ERROR "func literal does not escape"
+ ch <- p // ERROR "leaking closure reference p"
+ }()
+}
+
+func foo126() {
+ var px *int // loopdepth 0
+ for {
+ // loopdepth 1
+ var i int // ERROR "moved to heap"
+ func() { // ERROR "func literal does not escape"
+ px = &i // ERROR "&i escapes"
+ }()
+ }
+ _ = px
+}
+
+var px *int
+
+func foo127() {
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes to heap"
+ q := p
+ px = q
+}
+
+func foo128() {
+ var i int
+ p := &i // ERROR "&i does not escape"
+ q := p
+ _ = q
+}
+
+func foo129() {
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes to heap"
+ func() { // ERROR "func literal does not escape"
+ q := p // ERROR "leaking closure reference p"
+ func() { // ERROR "func literal does not escape"
+ r := q // ERROR "leaking closure reference q"
+ px = r
+ }()
+ }()
+}
+
+func foo130() {
+ for {
+ var i int // ERROR "moved to heap"
+ func() { // ERROR "func literal does not escape"
+ px = &i // ERROR "&i escapes" "leaking closure reference i"
+ }()
+ }
+}
+
+func foo131() {
+ var i int // ERROR "moved to heap"
+ func() { // ERROR "func literal does not escape"
+ px = &i // ERROR "&i escapes" "leaking closure reference i"
+ }()
+}
+
+func foo132() {
+ var i int // ERROR "moved to heap"
+ go func() { // ERROR "func literal escapes to heap"
+ px = &i // ERROR "&i escapes" "leaking closure reference i"
+ }()
+}
+
+func foo133() {
+ var i int // ERROR "moved to heap"
+ defer func() { // ERROR "func literal does not escape"
+ px = &i // ERROR "&i escapes" "leaking closure reference i"
+ }()
+}
+
+func foo134() {
+ var i int
+ p := &i // ERROR "&i does not escape"
+ func() { // ERROR "func literal does not escape"
+ q := p
+ func() { // ERROR "func literal does not escape"
+ r := q
+ _ = r
+ }()
+ }()
+}
+
+func foo135() {
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes to heap" "moved to heap: p"
+ go func() { // ERROR "func literal escapes to heap"
+ q := p // ERROR "&p escapes to heap"
+ func() { // ERROR "func literal does not escape"
+ r := q
+ _ = r
+ }()
+ }()
+}
+
+func foo136() {
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes to heap" "moved to heap: p"
+ go func() { // ERROR "func literal escapes to heap"
+ q := p // ERROR "&p escapes to heap" "leaking closure reference p"
+ func() { // ERROR "func literal does not escape"
+ r := q // ERROR "leaking closure reference q"
+ px = r
+ }()
+ }()
+}
+
+func foo137() {
+ var i int // ERROR "moved to heap: i"
+ p := &i // ERROR "&i escapes to heap"
+ func() { // ERROR "func literal does not escape"
+ q := p // ERROR "leaking closure reference p" "moved to heap: q"
+ go func() { // ERROR "func literal escapes to heap"
+ r := q // ERROR "&q escapes to heap"
+ _ = r
+ }()
+ }()
+}
+
+func foo138() *byte {
+ type T struct {
+ x [1]byte
+ }
+ t := new(T) // ERROR "new.T. escapes to heap"
+ return &t.x[0] // ERROR "&t.x.0. escapes to heap"
+}
+
+func foo139() *byte {
+ type T struct {
+ x struct {
+ y byte
+ }
+ }
+ t := new(T) // ERROR "new.T. escapes to heap"
+ return &t.x.y // ERROR "&t.x.y escapes to heap"
+}
+
+// issue 4751
+func foo140() interface{} {
+ type T struct {
+ X string
+ }
+ type U struct {
+ X string
+ T *T
+ }
+ t := &T{} // ERROR "&T literal escapes to heap"
+ return U{
+ X: t.X,
+ T: t,
+ }
+}
+
+//go:noescape
+
+func F1([]byte)
+
+func F2([]byte)
+
+//go:noescape
+
+func F3(x []byte) // ERROR "F3 x does not escape"
+
+func F4(x []byte)
+
+func G() {
+ var buf1 [10]byte
+ F1(buf1[:]) // ERROR "buf1 does not escape"
+
+ var buf2 [10]byte // ERROR "moved to heap: buf2"
+ F2(buf2[:]) // ERROR "buf2 escapes to heap"
+
+ var buf3 [10]byte
+ F3(buf3[:]) // ERROR "buf3 does not escape"
+
+ var buf4 [10]byte // ERROR "moved to heap: buf4"
+ F4(buf4[:]) // ERROR "buf4 escapes to heap"
+}
+
+type Tm struct {
+ x int
+}
+
+func (t *Tm) M() { // ERROR "t does not escape"
+}
+
+func foo141() {
+ var f func()
+
+ t := new(Tm) // ERROR "escapes to heap"
+ f = t.M // ERROR "t.M does not escape"
+ _ = f
+}
+
+var gf func()
+
+func foo142() {
+ t := new(Tm) // ERROR "escapes to heap"
+ gf = t.M // ERROR "t.M escapes to heap"
+}
+
+// issue 3888.
+func foo143() {
+ for i := 0; i < 1000; i++ {
+ func() { // ERROR "func literal does not escape"
+ for i := 0; i < 1; i++ {
+ var t Tm
+ t.M() // ERROR "t does not escape"
+ }
+ }()
+ }
+}
+
+// issue 5773
+// Check that annotations take effect regardless of whether they
+// are before or after the use in the source code.
+
+//go:noescape
+
+func foo144a(*int)
+
+func foo144() {
+ var x int
+ foo144a(&x) // ERROR "&x does not escape"
+ var y int
+ foo144b(&y) // ERROR "&y does not escape"
+}
+
+//go:noescape
+
+func foo144b(*int)
diff --git a/gcc/testsuite/go.test/test/escape3.go b/gcc/testsuite/go.test/test/escape3.go
index fc2d6ebbe4..4c19891514 100644
--- a/gcc/testsuite/go.test/test/escape3.go
+++ b/gcc/testsuite/go.test/test/escape3.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Test run-time behavior of escape analysis-related optimizations.
+// Test the run-time behavior of escape analysis-related optimizations.
package main
diff --git a/gcc/testsuite/go.test/test/escape4.go b/gcc/testsuite/go.test/test/escape4.go
new file mode 100644
index 0000000000..83bc8eb123
--- /dev/null
+++ b/gcc/testsuite/go.test/test/escape4.go
@@ -0,0 +1,57 @@
+// errorcheck -0 -m
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test, using compiler diagnostic flags, that the escape analysis is working.
+// Compiles but does not run. Inlining is enabled.
+
+package foo
+
+var p *int
+
+func alloc(x int) *int { // ERROR "can inline alloc" "moved to heap: x"
+ return &x // ERROR "&x escapes to heap"
+}
+
+var f func()
+
+func f1() {
+ p = alloc(2) // ERROR "inlining call to alloc" "&x escapes to heap" "moved to heap: x"
+
+ // Escape analysis used to miss inlined code in closures.
+
+ func() { // ERROR "func literal does not escape"
+ p = alloc(3) // ERROR "inlining call to alloc" "&x escapes to heap" "moved to heap: x"
+ }()
+
+ f = func() { // ERROR "func literal escapes to heap"
+ p = alloc(3) // ERROR "inlining call to alloc" "&x escapes to heap" "moved to heap: x"
+ }
+ f()
+}
+
+func f2() {} // ERROR "can inline f2"
+
+// No inline for panic, recover.
+func f3() { panic(1) }
+func f4() { recover() }
+
+func f5() *byte {
+ type T struct {
+ x [1]byte
+ }
+ t := new(T) // ERROR "new.T. escapes to heap"
+ return &t.x[0] // ERROR "&t.x.0. escapes to heap"
+}
+
+func f6() *byte {
+ type T struct {
+ x struct {
+ y byte
+ }
+ }
+ t := new(T) // ERROR "new.T. escapes to heap"
+ return &t.x.y // ERROR "&t.x.y escapes to heap"
+}
diff --git a/gcc/testsuite/go.test/test/escape5.go b/gcc/testsuite/go.test/test/escape5.go
new file mode 100644
index 0000000000..c9646872d5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/escape5.go
@@ -0,0 +1,151 @@
+// errorcheck -0 -m -l
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test, using compiler diagnostic flags, that the escape analysis is working.
+// Compiles but does not run. Inlining is disabled.
+
+package foo
+
+func noleak(p *int) int { // ERROR "p does not escape"
+ return *p
+}
+
+func leaktoret(p *int) *int { // ERROR "leaking param: p to result"
+ return p
+}
+
+func leaktoret2(p *int) (*int, *int) { // ERROR "leaking param: p to result .anon1" "leaking param: p to result .anon2"
+ return p, p
+}
+
+func leaktoret22(p, q *int) (*int, *int) { // ERROR "leaking param: p to result .anon2" "leaking param: q to result .anon3"
+ return p, q
+}
+
+func leaktoret22b(p, q *int) (*int, *int) { // ERROR "leaking param: p to result .anon3" "leaking param: q to result .anon2"
+ return leaktoret22(q, p)
+}
+
+func leaktoret22c(p, q *int) (*int, *int) { // ERROR "leaking param: p to result .anon3" "leaking param: q to result .anon2"
+ r, s := leaktoret22(q, p)
+ return r, s
+}
+
+func leaktoret22d(p, q *int) (r, s *int) { // ERROR "leaking param: p to result s" "leaking param: q to result r"
+ r, s = leaktoret22(q, p)
+ return
+}
+
+func leaktoret22e(p, q *int) (r, s *int) { // ERROR "leaking param: p to result s" "leaking param: q to result r"
+ r, s = leaktoret22(q, p)
+ return r, s
+}
+
+func leaktoret22f(p, q *int) (r, s *int) { // ERROR "leaking param: p to result s" "leaking param: q to result r"
+ rr, ss := leaktoret22(q, p)
+ return rr, ss
+}
+
+var gp *int
+
+func leaktosink(p *int) *int { // ERROR "leaking param: p"
+ gp = p
+ return p
+}
+
+func f1() {
+ var x int
+ p := noleak(&x) // ERROR "&x does not escape"
+ _ = p
+}
+
+func f2() {
+ var x int
+ p := leaktoret(&x) // ERROR "&x does not escape"
+ _ = p
+}
+
+func f3() {
+ var x int // ERROR "moved to heap: x"
+ p := leaktoret(&x) // ERROR "&x escapes to heap"
+ gp = p
+}
+
+func f4() {
+ var x int // ERROR "moved to heap: x"
+ p, q := leaktoret2(&x) // ERROR "&x escapes to heap"
+ gp = p
+ gp = q
+}
+
+func f5() {
+ var x int
+ leaktoret22(leaktoret2(&x)) // ERROR "&x does not escape"
+}
+
+func f6() {
+ var x int // ERROR "moved to heap: x"
+ px1, px2 := leaktoret22(leaktoret2(&x)) // ERROR "&x escapes to heap"
+ gp = px1
+ _ = px2
+}
+
+type T struct{ x int }
+
+func (t *T) Foo(u int) (*T, bool) { // ERROR "leaking param: t to result"
+ t.x += u
+ return t, true
+}
+
+func f7() *T {
+ r, _ := new(T).Foo(42) // ERROR "new.T. escapes to heap"
+ return r
+}
+
+func leakrecursive1(p, q *int) (*int, *int) { // ERROR "leaking param: p" "leaking param: q"
+ return leakrecursive2(q, p)
+}
+
+func leakrecursive2(p, q *int) (*int, *int) { // ERROR "leaking param: p" "leaking param: q"
+ if *p > *q {
+ return leakrecursive1(q, p)
+ }
+ // without this, leakrecursive? are safe for p and q, b/c in fact their graph does not have leaking edges.
+ return p, q
+}
+
+
+var global interface{}
+
+type T1 struct {
+ X *int
+}
+
+type T2 struct {
+ Y *T1
+}
+
+func f8(p *T1) (k T2) { // ERROR "leaking param: p to result k" "leaking param: p"
+ if p == nil {
+ k = T2{}
+ return
+ }
+
+ global = p // should make p leak always
+ return T2{p}
+}
+
+func f9() {
+ var j T1 // ERROR "moved to heap: j"
+ f8(&j) // ERROR "&j escapes to heap"
+}
+
+func f10() {
+ // These don't escape but are too big for the stack
+ var x [1<<30]byte // ERROR "moved to heap: x"
+ var y = make([]byte, 1<<30) // ERROR "does not escape"
+ _ = x[0] + y[0]
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug000.go b/gcc/testsuite/go.test/test/fixedbugs/bug000.go
index ccb24e8e9b..9104a57aaf 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug000.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug000.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug002.go b/gcc/testsuite/go.test/test/fixedbugs/bug002.go
index 230841974f..3493426d37 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug002.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug002.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug003.go b/gcc/testsuite/go.test/test/fixedbugs/bug003.go
index e45975be41..7165d9d209 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug003.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug003.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug004.go b/gcc/testsuite/go.test/test/fixedbugs/bug004.go
index 20f467a5f4..fb207e9bc8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug004.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug004.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug005.go b/gcc/testsuite/go.test/test/fixedbugs/bug005.go
index 3bd2fe815e..3798f8321a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug005.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug005.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug006.go b/gcc/testsuite/go.test/test/fixedbugs/bug006.go
index 43b5dfb129..6761682b39 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug006.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug006.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug007.go b/gcc/testsuite/go.test/test/fixedbugs/bug007.go
index d65f6da450..3d9fcb9e01 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug007.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug007.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug008.go b/gcc/testsuite/go.test/test/fixedbugs/bug008.go
index 2baead11e3..48f74a52d9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug008.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug008.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug009.go b/gcc/testsuite/go.test/test/fixedbugs/bug009.go
index ef8263bb24..0467b297a2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug009.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug009.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug010.go b/gcc/testsuite/go.test/test/fixedbugs/bug010.go
index 7d96988d43..f54b1d54a8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug010.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug010.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug011.go b/gcc/testsuite/go.test/test/fixedbugs/bug011.go
index ce627472c4..519c3585f0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug011.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug011.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug012.go b/gcc/testsuite/go.test/test/fixedbugs/bug012.go
index ffd5b55706..38efb6d979 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug012.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug012.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug013.go b/gcc/testsuite/go.test/test/fixedbugs/bug013.go
index 4b106775c2..045786bf7a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug013.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug013.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug014.go b/gcc/testsuite/go.test/test/fixedbugs/bug014.go
index 38a6e51abc..a20f0310e7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug014.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug014.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug015.go b/gcc/testsuite/go.test/test/fixedbugs/bug015.go
index 9178f626fc..d3a9f22ed0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug015.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug015.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug016.go b/gcc/testsuite/go.test/test/fixedbugs/bug016.go
index 4fbfd48fd9..18fac78f34 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug016.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug016.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug017.go b/gcc/testsuite/go.test/test/fixedbugs/bug017.go
index fdc986d9de..2f5960d104 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug017.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug017.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug020.go b/gcc/testsuite/go.test/test/fixedbugs/bug020.go
index 896bf5707c..cde3f8679b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug020.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug020.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug021.go b/gcc/testsuite/go.test/test/fixedbugs/bug021.go
index 201fa5f039..bf936e875c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug021.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug021.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug022.go b/gcc/testsuite/go.test/test/fixedbugs/bug022.go
index f94a585693..65a8bfe9a1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug022.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug022.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug023.go b/gcc/testsuite/go.test/test/fixedbugs/bug023.go
index b3d3d4a3c1..9b211cd54f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug023.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug023.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug024.go b/gcc/testsuite/go.test/test/fixedbugs/bug024.go
index c7b17b7c09..2e235b7b46 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug024.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug024.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug026.go b/gcc/testsuite/go.test/test/fixedbugs/bug026.go
index eacea37459..bfd03cc955 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug026.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug026.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug027.go b/gcc/testsuite/go.test/test/fixedbugs/bug027.go
index cf2daaecf0..874b47e7ad 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug027.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug027.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug028.go b/gcc/testsuite/go.test/test/fixedbugs/bug028.go
index 0488ad2cba..2edf5a9106 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug028.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug028.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug030.go b/gcc/testsuite/go.test/test/fixedbugs/bug030.go
index 7efde9b445..ffd29e057a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug030.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug030.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug031.go b/gcc/testsuite/go.test/test/fixedbugs/bug031.go
index acb4741e9f..529e5ce84c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug031.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug031.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug035.go b/gcc/testsuite/go.test/test/fixedbugs/bug035.go
index bd2a633f29..ae41a17953 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug035.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug035.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug036.go b/gcc/testsuite/go.test/test/fixedbugs/bug036.go
deleted file mode 100644
index cc20516ce8..0000000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug036.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
- s := float(0);
- s := float(0); // BUG redeclaration
-}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug037.go b/gcc/testsuite/go.test/test/fixedbugs/bug037.go
index ff7d28710a..f17fb3fd74 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug037.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug037.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug038.go b/gcc/testsuite/go.test/test/fixedbugs/bug038.go
deleted file mode 100644
index 7585376a36..0000000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug038.go
+++ /dev/null
@@ -1,13 +0,0 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-func main() {
- var z [3]byte;
- z := new([3]byte); // BUG redeclaration
-}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug039.go b/gcc/testsuite/go.test/test/fixedbugs/bug039.go
index 7ac02ceeb2..d34f5e62e4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug039.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug039.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug040.go b/gcc/testsuite/go.test/test/fixedbugs/bug040.go
index 912316cb6f..d2cf88afcb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug040.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug040.go
@@ -1,5 +1,4 @@
-// ! $G $D/$F.go >/dev/null
-// # ignoring error messages...
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,5 +6,6 @@
package main
-func main (x, x int) { // BUG redeclaration error
+func f (x, // GCCGO_ERROR "previous"
+ x int) { // ERROR "duplicate argument|redefinition"
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug045.go b/gcc/testsuite/go.test/test/fixedbugs/bug045.go
index 94888c40e2..c66a2411a8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug045.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug045.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug046.go b/gcc/testsuite/go.test/test/fixedbugs/bug046.go
index 8a9b797074..219e91d537 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug046.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug046.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug047.go b/gcc/testsuite/go.test/test/fixedbugs/bug047.go
index 5a776abce8..7619ae73c6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug047.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug047.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug048.go b/gcc/testsuite/go.test/test/fixedbugs/bug048.go
index b9fee7899c..48ad751e2c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug048.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug048.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug049.go b/gcc/testsuite/go.test/test/fixedbugs/bug049.go
index 8fd67ccd51..51990f2dfb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug049.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug049.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug050.go b/gcc/testsuite/go.test/test/fixedbugs/bug050.go
index 585c446237..aba68b1dcb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug050.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug050.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug051.go b/gcc/testsuite/go.test/test/fixedbugs/bug051.go
index dd1662306d..c4ba2eff67 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug051.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug051.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug052.go b/gcc/testsuite/go.test/test/fixedbugs/bug052.go
index d2c1b50617..440a00ebeb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug052.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug052.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug053.go b/gcc/testsuite/go.test/test/fixedbugs/bug053.go
index c981403edc..00625fd7c3 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug053.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug053.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug054.go b/gcc/testsuite/go.test/test/fixedbugs/bug054.go
index c8a2272c23..01590585c5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug054.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug054.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug055.go b/gcc/testsuite/go.test/test/fixedbugs/bug055.go
index 8617396109..c3073cc1ea 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug055.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug055.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug056.go b/gcc/testsuite/go.test/test/fixedbugs/bug056.go
index 050a4a5c5d..13eac29204 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug056.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug056.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug057.go b/gcc/testsuite/go.test/test/fixedbugs/bug057.go
index d5d0f1d620..19b8651a54 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug057.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug057.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug058.go b/gcc/testsuite/go.test/test/fixedbugs/bug058.go
index e2b4a241a6..2b97dbf7c0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug058.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug058.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug059.go b/gcc/testsuite/go.test/test/fixedbugs/bug059.go
index 6a77367d67..6f64b9e0b1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug059.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug059.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug060.go b/gcc/testsuite/go.test/test/fixedbugs/bug060.go
index 82778b8386..8260729056 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug060.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug060.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug061.go b/gcc/testsuite/go.test/test/fixedbugs/bug061.go
index aedcf70fef..ae99b186d8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug061.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug061.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug062.go b/gcc/testsuite/go.test/test/fixedbugs/bug062.go
index 8ee5c84cb9..1cc5003655 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug062.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug062.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug063.go b/gcc/testsuite/go.test/test/fixedbugs/bug063.go
index 543e0b7260..a3ae3f0962 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug063.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug063.go
@@ -1,8 +1,8 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug063
const c = 0 ^ 0
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug064.go b/gcc/testsuite/go.test/test/fixedbugs/bug064.go
index 92d2154236..d8b3bea9a6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug064.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug064.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: compilation should succeed
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug065.go b/gcc/testsuite/go.test/test/fixedbugs/bug065.go
index a5d1bedddb..a1e3b08bba 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug065.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug065.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug066.go b/gcc/testsuite/go.test/test/fixedbugs/bug066.go
index 2fa5048f1b..db3d7f8602 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug066.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug066.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug066
type Scope struct {
entries map[string] *Object;
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug067.go b/gcc/testsuite/go.test/test/fixedbugs/bug067.go
index 328d191bb4..aaeefb0ba1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug067.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug067.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug068.go b/gcc/testsuite/go.test/test/fixedbugs/bug068.go
index a7cf4239c4..2cb10ab3a1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug068.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug068.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug069.go b/gcc/testsuite/go.test/test/fixedbugs/bug069.go
index 9038387ac8..7b07b773d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug069.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug069.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug070.go b/gcc/testsuite/go.test/test/fixedbugs/bug070.go
index 24ac779888..3f3ffcf615 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug070.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug070.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug071.go b/gcc/testsuite/go.test/test/fixedbugs/bug071.go
index a5003ffb97..ec38f7a979 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug071.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug071.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: compiler crashes
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug071
type rat struct {
den int;
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug072.go b/gcc/testsuite/go.test/test/fixedbugs/bug072.go
index efe5626db5..05ad93dac2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug072.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug072.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug073.go b/gcc/testsuite/go.test/test/fixedbugs/bug073.go
index 99e7cd19ee..49b47ae464 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug073.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug073.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug074.go b/gcc/testsuite/go.test/test/fixedbugs/bug074.go
index 7b6d14e7e6..fb789cb4c1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug074.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug074.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug075.go b/gcc/testsuite/go.test/test/fixedbugs/bug075.go
index 7aed13089d..d0b7d14e71 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug075.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug075.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug076.go b/gcc/testsuite/go.test/test/fixedbugs/bug076.go
index 2ca518d76d..60aaa97608 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug076.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug076.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug077.go b/gcc/testsuite/go.test/test/fixedbugs/bug077.go
index 2cbf96d98f..80581a8a3b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug077.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug077.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug078.go b/gcc/testsuite/go.test/test/fixedbugs/bug078.go
index ddd3faeba4..1041b858c8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug078.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug078.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug080.go b/gcc/testsuite/go.test/test/fixedbugs/bug080.go
index bae16cdb2e..32b2c53b9e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug080.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug080.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug081.go b/gcc/testsuite/go.test/test/fixedbugs/bug081.go
index 026ce8002f..c25d288370 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug081.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug081.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug082.go b/gcc/testsuite/go.test/test/fixedbugs/bug082.go
index 8353ec200e..e184ef1930 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug082.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug082.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug083.go b/gcc/testsuite/go.test/test/fixedbugs/bug083.go
index 984969d47f..54a17423a0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug083.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug083.go
@@ -1,7 +1,7 @@
-// $G $D/$F.dir/bug0.go && errchk $G $D/$F.dir/bug1.go
+// errorcheckdir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-ignored
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug084.go b/gcc/testsuite/go.test/test/fixedbugs/bug084.go
index c1054e550c..700a674339 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug084.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug084.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug085.go b/gcc/testsuite/go.test/test/fixedbugs/bug085.go
index 02be717534..dae83f8a49 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug085.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug085.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -20,7 +20,7 @@ Bus error
/* expected scope hierarchy (outermost to innermost)
-universe scope (contains predeclared identifiers int, float, int32, len, etc.)
+universe scope (contains predeclared identifiers int, float32, int32, len, etc.)
"solar" scope (just holds the package name P so it can be found but doesn't conflict)
global scope (the package global scope)
local scopes (function scopes)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug086.go b/gcc/testsuite/go.test/test/fixedbugs/bug086.go
index f96472fbb3..40d2362066 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug086.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug086.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,12 +6,12 @@
package main
-func f() int { // ERROR "return|control"
+func f() int {
if false {
return 0;
}
// we should not be able to return successfully w/o a return statement
-}
+} // ERROR "return"
func main() {
print(f(), "\n");
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug087.go b/gcc/testsuite/go.test/test/fixedbugs/bug087.go
index 4af8d976f8..67e7210cdb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug087.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug087.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug088.go b/gcc/testsuite/go.test/test/fixedbugs/bug088.go
index 9715a703cb..3b99da84d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug088.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug088.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go || echo BUG: fails incorrectly
+// compiledir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug089.go b/gcc/testsuite/go.test/test/fixedbugs/bug089.go
index fd3dff3ec9..e88f17babb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug089.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug089.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug090.go b/gcc/testsuite/go.test/test/fixedbugs/bug090.go
index 8318ab9c0c..320bd57f5c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug090.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug090.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug091.go b/gcc/testsuite/go.test/test/fixedbugs/bug091.go
index c2ede7153c..dbb1287a15 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug091.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug091.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug092.go b/gcc/testsuite/go.test/test/fixedbugs/bug092.go
index 8f05c478f5..8027d941ea 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug092.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug092.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug093.go b/gcc/testsuite/go.test/test/fixedbugs/bug093.go
index 52d92c7e3d..acd94466f5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug093.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug093.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: fails incorrectly
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug094.go b/gcc/testsuite/go.test/test/fixedbugs/bug094.go
index 2953eb28d3..3ef11da3d3 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug094.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug094.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: fails incorrectly
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug096.go b/gcc/testsuite/go.test/test/fixedbugs/bug096.go
index 9be687a7bb..411ba74e0c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug096.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug096.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug097.go b/gcc/testsuite/go.test/test/fixedbugs/bug097.go
index ec3c21543d..a067e0f57a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug097.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug097.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG wrong result
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug098.go b/gcc/testsuite/go.test/test/fixedbugs/bug098.go
index 1dad4d502a..eb4ee4de03 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug098.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug098.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug099.go b/gcc/testsuite/go.test/test/fixedbugs/bug099.go
index f76f0e873c..03a5c454b0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug099.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug099.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should not crash
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug101.go b/gcc/testsuite/go.test/test/fixedbugs/bug101.go
index 92487deaac..82e496a8a6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug101.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug101.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug102.go b/gcc/testsuite/go.test/test/fixedbugs/bug102.go
index 1d97eb4a8d..f1c2324b78 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug102.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug102.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not crash
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug103.go b/gcc/testsuite/go.test/test/fixedbugs/bug103.go
index b789be1c45..1cb710e368 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug103.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug103.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug104.go b/gcc/testsuite/go.test/test/fixedbugs/bug104.go
index dd4bb5834f..f0c19a8aa7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug104.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug104.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug106.go b/gcc/testsuite/go.test/test/fixedbugs/bug106.go
index 1874b20449..3b99da84d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug106.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug106.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go || echo BUG: failed to compile
+// compiledir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug107.go b/gcc/testsuite/go.test/test/fixedbugs/bug107.go
index 0554bbc8b8..dcd8e9d113 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug107.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug107.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug108.go b/gcc/testsuite/go.test/test/fixedbugs/bug108.go
index 10e406de6e..9f2a27ebd9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug108.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug108.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug109.go b/gcc/testsuite/go.test/test/fixedbugs/bug109.go
index 7666577230..556dc34dde 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug109.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug109.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug109
func f(a float64) float64 {
e := 1.0
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug110.go b/gcc/testsuite/go.test/test/fixedbugs/bug110.go
index 4e43d1c01b..5528ba3f16 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug110.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug110.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: const bug
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug111.go b/gcc/testsuite/go.test/test/fixedbugs/bug111.go
index e72b343ae3..d977bd54fb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug111.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug111.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should compile and run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug112.go b/gcc/testsuite/go.test/test/fixedbugs/bug112.go
index 3c932843c7..e2ed5c0d41 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug112.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug112.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug113.go b/gcc/testsuite/go.test/test/fixedbugs/bug113.go
index 4ca07dc65a..a1e61cb36f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug113.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug113.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug114.go b/gcc/testsuite/go.test/test/fixedbugs/bug114.go
index 974b7cf26e..99e66a2ddc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug114.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug114.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && (./$A.out || echo BUG: bug114 failed)
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug115.go b/gcc/testsuite/go.test/test/fixedbugs/bug115.go
index 16b22d7079..7cc3dc40a6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug115.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug115.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug115 should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug116.go b/gcc/testsuite/go.test/test/fixedbugs/bug116.go
index 42ca803432..5d8e520315 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug116.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug116.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug116
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug117.go b/gcc/testsuite/go.test/test/fixedbugs/bug117.go
index ad89ebf52a..038826cbce 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug117.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug117.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug118.go b/gcc/testsuite/go.test/test/fixedbugs/bug118.go
index 1271f5b0cb..198b8ff280 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug118.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug118.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug118
func Send(c chan int) int {
select {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug119.go b/gcc/testsuite/go.test/test/fixedbugs/bug119.go
index 750507891c..6f2514c24e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug119.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug119.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not fail
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug120.go b/gcc/testsuite/go.test/test/fixedbugs/bug120.go
index bf401bf304..58355e53de 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug120.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug120.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug120
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug121.go b/gcc/testsuite/go.test/test/fixedbugs/bug121.go
index 15c8451da9..5adf9827fa 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug121.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug121.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug122.go b/gcc/testsuite/go.test/test/fixedbugs/bug122.go
index 72bf38a833..fb4eb9f3ad 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug122.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug122.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug123.go b/gcc/testsuite/go.test/test/fixedbugs/bug123.go
index bdac67417f..f38551a914 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug123.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug123.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug126.go b/gcc/testsuite/go.test/test/fixedbugs/bug126.go
index a8d56e1221..f5d9763412 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug126.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug126.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug127.go b/gcc/testsuite/go.test/test/fixedbugs/bug127.go
index 25b48114d6..f8ea99470c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug127.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug127.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug128.go b/gcc/testsuite/go.test/test/fixedbugs/bug128.go
index 3fd647c004..e8cbea079f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug128.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug128.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should compile
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug129.go b/gcc/testsuite/go.test/test/fixedbugs/bug129.go
index d1e2d8b563..157ce78ff7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug129.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug129.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG129
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug130.go b/gcc/testsuite/go.test/test/fixedbugs/bug130.go
index 855c7072bc..16b029af34 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug130.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug130.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug131.go b/gcc/testsuite/go.test/test/fixedbugs/bug131.go
index e5d4ca07d7..0ebbd26069 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug131.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug131.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug132.go b/gcc/testsuite/go.test/test/fixedbugs/bug132.go
index bab8996f19..e334566c79 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug132.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug132.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug133.go b/gcc/testsuite/go.test/test/fixedbugs/bug133.go
index 2beeb074f5..54a17423a0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug133.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug133.go
@@ -1,7 +1,7 @@
-// $G $D/$F.dir/bug0.go && $G $D/$F.dir/bug1.go && errchk $G $D/$F.dir/bug2.go
+// errorcheckdir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-ignored
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug135.go b/gcc/testsuite/go.test/test/fixedbugs/bug135.go
index 470135ed43..34d234e224 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug135.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug135.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug136.go b/gcc/testsuite/go.test/test/fixedbugs/bug136.go
index 7491b65d88..bea9bac083 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug136.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug136.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug137.go b/gcc/testsuite/go.test/test/fixedbugs/bug137.go
index 9d43f431be..48368177a2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug137.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug137.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug139.go b/gcc/testsuite/go.test/test/fixedbugs/bug139.go
index 2bdbef1c0f..095e5c93cc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug139.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug139.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug140.go b/gcc/testsuite/go.test/test/fixedbugs/bug140.go
index 441c57a485..8caf1d7d9f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug140.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug140.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug141.go b/gcc/testsuite/go.test/test/fixedbugs/bug141.go
index 1b125e5d1e..81ba6f1b56 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug141.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug141.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug142.go b/gcc/testsuite/go.test/test/fixedbugs/bug142.go
index e54458baf4..e28d889a93 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug142.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug142.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug142
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug143.go b/gcc/testsuite/go.test/test/fixedbugs/bug143.go
index 2f575fcfed..a43e406676 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug143.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug143.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug144.go b/gcc/testsuite/go.test/test/fixedbugs/bug144.go
index bab9a44029..9f8ec7667c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug144.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug144.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug145.go b/gcc/testsuite/go.test/test/fixedbugs/bug145.go
index c59bcebd6e..602fe7426d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug145.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug145.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug146.go b/gcc/testsuite/go.test/test/fixedbugs/bug146.go
index 16324c741a..e29f910ba5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug146.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug146.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug147.go b/gcc/testsuite/go.test/test/fixedbugs/bug147.go
index a16630b871..e8b3d24394 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug147.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug147.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug147
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug148.go b/gcc/testsuite/go.test/test/fixedbugs/bug148.go
index 251020c96f..b67870b12a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug148.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug148.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug149.go b/gcc/testsuite/go.test/test/fixedbugs/bug149.go
index a40403b7d7..78b687e971 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug149.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug149.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug150.go b/gcc/testsuite/go.test/test/fixedbugs/bug150.go
index fc25444b65..b565ef73dd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug150.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug150.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug150
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug150
type T int
func (t T) M()
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug151.go b/gcc/testsuite/go.test/test/fixedbugs/bug151.go
index 46546dfe1e..d9f5e021c9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug151.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug151.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug151
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug151
type S string
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug1515.go b/gcc/testsuite/go.test/test/fixedbugs/bug1515.go
index 7402525164..a4baccda77 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug1515.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug1515.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug152.go b/gcc/testsuite/go.test/test/fixedbugs/bug152.go
index 30c3cac91f..45b9b3d530 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug152.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug152.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug154.go b/gcc/testsuite/go.test/test/fixedbugs/bug154.go
index 4371cc5ce9..a2cfd4accd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug154.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug154.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: should not panic
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug155.go b/gcc/testsuite/go.test/test/fixedbugs/bug155.go
index 312c8e6a96..8872e978da 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug155.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug155.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: bug155
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug156.go b/gcc/testsuite/go.test/test/fixedbugs/bug156.go
index 0b77a72d91..f26658729f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug156.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug156.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug156
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug157.go b/gcc/testsuite/go.test/test/fixedbugs/bug157.go
index 9bf68f7a47..1072d7df49 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug157.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug157.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug158.go b/gcc/testsuite/go.test/test/fixedbugs/bug158.go
index cdf3195feb..496d7e0db0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug158.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug158.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug159.go b/gcc/testsuite/go.test/test/fixedbugs/bug159.go
index 1aa64433a7..92d5345635 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug159.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug159.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug159
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug160.go b/gcc/testsuite/go.test/test/fixedbugs/bug160.go
index 8fd53ea079..fde797bfcd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug160.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug160.go
@@ -1,7 +1,7 @@
-// $G $D/bug160.dir/x.go && $G $D/bug160.dir/y.go && $L y.$A && ./$A.out
+// rundir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-nothing to see here
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug161.go b/gcc/testsuite/go.test/test/fixedbugs/bug161.go
index e5f25f746d..aab58ee895 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug161.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug161.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug163.go b/gcc/testsuite/go.test/test/fixedbugs/bug163.go
index 919298e6f7..d69f6bef03 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug163.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug163.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug164.go b/gcc/testsuite/go.test/test/fixedbugs/bug164.go
index 746f631aeb..888b495eec 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug164.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug164.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug165.go b/gcc/testsuite/go.test/test/fixedbugs/bug165.go
index 8ce67a46db..f8d50af13f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug165.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug165.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug167.go b/gcc/testsuite/go.test/test/fixedbugs/bug167.go
index 33eb3cb1a9..3a50e6ff0c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug167.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug167.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A || echo BUG: bug167
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug168.go b/gcc/testsuite/go.test/test/fixedbugs/bug168.go
index e25eb56b0b..53301fa81e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug168.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug168.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug168
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug169.go b/gcc/testsuite/go.test/test/fixedbugs/bug169.go
index c42727f389..f63c2f3e1a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug169.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug169.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug170.go b/gcc/testsuite/go.test/test/fixedbugs/bug170.go
index e7f1c5120d..11ff5ff3c7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug170.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug170.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug171.go b/gcc/testsuite/go.test/test/fixedbugs/bug171.go
index 5357b2adc6..49bbb3b892 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug171.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug171.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug172.go b/gcc/testsuite/go.test/test/fixedbugs/bug172.go
index 1837a1158a..4dbe7930f9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug172.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug172.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug173.go b/gcc/testsuite/go.test/test/fixedbugs/bug173.go
index 898b8400ba..6479bb2531 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug173.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug173.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug173
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug174.go b/gcc/testsuite/go.test/test/fixedbugs/bug174.go
index 7ff8655132..448f630867 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug174.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug174.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug174
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug175.go b/gcc/testsuite/go.test/test/fixedbugs/bug175.go
index 1ca1415076..5fca4b22bc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug175.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug175.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug176.go b/gcc/testsuite/go.test/test/fixedbugs/bug176.go
index 5820df3084..82f8dba0ad 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug176.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug176.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug177.go b/gcc/testsuite/go.test/test/fixedbugs/bug177.go
index a120ad0abf..9f2c1ea52f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug177.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug177.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug178.go b/gcc/testsuite/go.test/test/fixedbugs/bug178.go
index a7ff09daee..2bae5a1c56 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug178.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug178.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug179.go b/gcc/testsuite/go.test/test/fixedbugs/bug179.go
index 3347613d8d..dea82fe0a0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug179.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug179.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug180.go b/gcc/testsuite/go.test/test/fixedbugs/bug180.go
index 96823fb3a5..cfdcfab267 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug180.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug180.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug181.go b/gcc/testsuite/go.test/test/fixedbugs/bug181.go
index f87bc9d4ee..4827e9cf03 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug181.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug181.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug182.go b/gcc/testsuite/go.test/test/fixedbugs/bug182.go
index 81df2ca13c..e02dc59f86 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug182.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug182.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug183.go b/gcc/testsuite/go.test/test/fixedbugs/bug183.go
index 7fd6e4942f..dc9f5356e0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug183.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug183.go
@@ -1,4 +1,4 @@
-//errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug184.go b/gcc/testsuite/go.test/test/fixedbugs/bug184.go
index 3cc9845356..c084ea5cf5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug184.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug184.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug185.go b/gcc/testsuite/go.test/test/fixedbugs/bug185.go
index acae174f4b..890900600f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug185.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug185.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug186.go b/gcc/testsuite/go.test/test/fixedbugs/bug186.go
index dde794a5d7..5aefd7e5cf 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug186.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug186.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug187.go b/gcc/testsuite/go.test/test/fixedbugs/bug187.go
index 66aa5f024b..5c3c2bb1e1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug187.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug187.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug188.go b/gcc/testsuite/go.test/test/fixedbugs/bug188.go
index e1cbce05dc..5506147894 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug188.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug188.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug189.go b/gcc/testsuite/go.test/test/fixedbugs/bug189.go
index ce338305cd..9e412c66d8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug189.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug189.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug190.go b/gcc/testsuite/go.test/test/fixedbugs/bug190.go
index da0bfde0fc..bb2d81cbb9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug190.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug190.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/a.go
index b87ad6f4fe..139a8a3a23 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/a.go
@@ -4,8 +4,10 @@
package a
+var A int
+
func init() {
- println("a");
+ A = 1
}
type T int;
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/b.go
index 3e780ac0dd..36770f6fc9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/b.go
@@ -4,8 +4,10 @@
package b
+var B int
+
func init() {
- println("b");
+ B = 2
}
type V int;
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/main.go
new file mode 100644
index 0000000000..2d24dd12d5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug191.dir/main.go
@@ -0,0 +1,17 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import . "./a"
+import . "./b"
+
+var _ T
+var _ V
+
+func main() {
+ if A != 1 || B != 2 {
+ panic("wrong vars")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug191.go b/gcc/testsuite/go.test/test/fixedbugs/bug191.go
index 44fcccfc00..248e23edfc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug191.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug191.go
@@ -1,16 +1,9 @@
-// $G $D/bug191.dir/a.go && $G $D/bug191.dir/b.go && $G $D/$F.go && $L $F.$A
+// rundir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+// Tests bug with dot imports.
-import . "./a"
-import . "./b"
-
-var _ T
-var _ V
-
-func main() {
-}
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug192.go b/gcc/testsuite/go.test/test/fixedbugs/bug192.go
index 282ed30d36..679aaed1f2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug192.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug192.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug193.go b/gcc/testsuite/go.test/test/fixedbugs/bug193.go
index 5ef02b1c1d..64e06da897 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug193.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug193.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug194.go b/gcc/testsuite/go.test/test/fixedbugs/bug194.go
index dcd633ddef..2976529031 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug194.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug194.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should compile and run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug195.go b/gcc/testsuite/go.test/test/fixedbugs/bug195.go
index d8e112a3a6..85367cb888 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug195.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug195.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug196.go b/gcc/testsuite/go.test/test/fixedbugs/bug196.go
index ea8ab0dc19..5255de1892 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug196.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug196.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug196
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug197.go b/gcc/testsuite/go.test/test/fixedbugs/bug197.go
index c205c5bcaa..4a9f103ea0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug197.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug197.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug198.go b/gcc/testsuite/go.test/test/fixedbugs/bug198.go
index ea71fad58e..73bb64688a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug198.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug198.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug199.go b/gcc/testsuite/go.test/test/fixedbugs/bug199.go
index 71226290f1..f69f23b591 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug199.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug199.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug200.go b/gcc/testsuite/go.test/test/fixedbugs/bug200.go
index 63b8633bd9..da628faf5d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug200.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug200.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug201.go b/gcc/testsuite/go.test/test/fixedbugs/bug201.go
index f7db62fc99..59248231ae 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug201.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug201.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug202.go b/gcc/testsuite/go.test/test/fixedbugs/bug202.go
index 2fc91b5208..49871e3e06 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug202.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug202.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG should run
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug203.go b/gcc/testsuite/go.test/test/fixedbugs/bug203.go
index bf86ee912b..2fb084bd65 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug203.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug203.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug204.go b/gcc/testsuite/go.test/test/fixedbugs/bug204.go
index adf0aafd6b..8810a5f921 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug204.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug204.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug205.go b/gcc/testsuite/go.test/test/fixedbugs/bug205.go
index e12be72f92..1e0d9d1f34 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug205.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug205.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -11,8 +11,8 @@ var s string;
var m map[string]int;
func main() {
- println(t["hi"]); // ERROR "integer"
- println(s["hi"]); // ERROR "integer" "to type uint"
- println(m[0]); // ERROR "map index"
+ println(t["hi"]); // ERROR "non-integer slice index|must be integer"
+ println(s["hi"]); // ERROR "non-integer string index|must be integer"
+ println(m[0]); // ERROR "cannot use.*as type string"
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug206.go b/gcc/testsuite/go.test/test/fixedbugs/bug206.go
index 7efc0b14af..c2382acf13 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug206.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug206.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out >/dev/null 2>&1 || echo BUG: bug206
+// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug206.out b/gcc/testsuite/go.test/test/fixedbugs/bug206.out
new file mode 100644
index 0000000000..aa47d0d46d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug206.out
@@ -0,0 +1,2 @@
+0
+0
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug207.go b/gcc/testsuite/go.test/test/fixedbugs/bug207.go
index 5810d66901..50923df1c2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug207.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug207.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug208.go b/gcc/testsuite/go.test/test/fixedbugs/bug208.go
index 13b0400848..09ec0afbed 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug208.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug208.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug209.go b/gcc/testsuite/go.test/test/fixedbugs/bug209.go
index ae6f10f603..52faf1fb92 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug209.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug209.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug211.go b/gcc/testsuite/go.test/test/fixedbugs/bug211.go
index 69aeeeeac5..b150479276 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug211.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug211.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug212.go b/gcc/testsuite/go.test/test/fixedbugs/bug212.go
index 51df9b8ae8..4e58b91ec0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug212.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug212.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug213.go b/gcc/testsuite/go.test/test/fixedbugs/bug213.go
index 4d81dbb4de..7f4786b52b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug213.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug213.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug214.go b/gcc/testsuite/go.test/test/fixedbugs/bug214.go
index 502e69826a..5420058c46 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug214.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug214.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug214
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug215.go b/gcc/testsuite/go.test/test/fixedbugs/bug215.go
index 8f7fb2d3c2..08ed662c65 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug215.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug215.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug216.go b/gcc/testsuite/go.test/test/fixedbugs/bug216.go
index 76f85464af..c83a522bf9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug216.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug216.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug216
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug217.go b/gcc/testsuite/go.test/test/fixedbugs/bug217.go
index 98334c4ce1..ec93c25d91 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug217.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug217.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug218.go b/gcc/testsuite/go.test/test/fixedbugs/bug218.go
index b2c9ede750..0e008db17f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug218.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug218.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug218
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug219.go b/gcc/testsuite/go.test/test/fixedbugs/bug219.go
index 966d3fcf31..290c691eab 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug219.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug219.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug219
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug219
func f(func()) int { return 0 }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug221.go b/gcc/testsuite/go.test/test/fixedbugs/bug221.go
index b64583114f..86fda20351 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug221.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug221.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug.go b/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug.go
index 9194927b57..16920246e0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug.go
@@ -1,3 +1,7 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package chanbug
var C chan<- (chan int)
var D chan<- func()
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug2.go b/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug2.go
index 73e16678e9..109581dc30 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug2.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug222.dir/chanbug2.go
@@ -1,2 +1,6 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package Bar
import _ "chanbug"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug222.go b/gcc/testsuite/go.test/test/fixedbugs/bug222.go
index 5c23a533d1..3b99da84d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug222.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug222.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/chanbug.go && $G -I. $D/$F.dir/chanbug2.go
+// compiledir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug223.go b/gcc/testsuite/go.test/test/fixedbugs/bug223.go
index 80f9cae819..29ae53cb71 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug223.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug223.go
@@ -1,4 +1,4 @@
-// (! $G $D/$F.go) | grep 'initialization loop' >/dev/null || echo BUG: bug223
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -18,4 +18,4 @@ func f() {
}
}
-var m = map[string]F{"f": f}
+var m = map[string]F{"f": f} // ERROR "initialization loop|depends upon itself"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug224.go b/gcc/testsuite/go.test/test/fixedbugs/bug224.go
index 11ee57ecfa..d2fd67cf32 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug224.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug224.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug225.go b/gcc/testsuite/go.test/test/fixedbugs/bug225.go
index 8acf66c4e4..1bda9ab4b6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug225.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug225.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug227.go b/gcc/testsuite/go.test/test/fixedbugs/bug227.go
index a60866044d..ea8d02d10c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug227.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug227.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug228.go b/gcc/testsuite/go.test/test/fixedbugs/bug228.go
index da335dbc05..3fccd17288 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug228.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug228.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,11 +8,11 @@ package main
func f(x int, y ...int) // ok
-func g(x int, y float) (...) // ERROR "[.][.][.]" "final argument"
+func g(x int, y float32) (...) // ERROR "[.][.][.]" "final argument"
func h(x, y ...int) // ERROR "[.][.][.]"
-func i(x int, y ...int, z float) // ERROR "[.][.][.]"
+func i(x int, y ...int, z float32) // ERROR "[.][.][.]"
var x ...int; // ERROR "[.][.][.]|syntax|type"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug229.go b/gcc/testsuite/go.test/test/fixedbugs/bug229.go
index a70a926da1..19776881d1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug229.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug229.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug230.go b/gcc/testsuite/go.test/test/fixedbugs/bug230.go
index c7ad1a3660..210acc4307 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug230.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug230.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug231.go b/gcc/testsuite/go.test/test/fixedbugs/bug231.go
index 9500e582bb..a9d409b7d5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug231.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug231.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug232.go b/gcc/testsuite/go.test/test/fixedbugs/bug232.go
index 99bd02ff69..d18727e907 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug232.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug232.go
@@ -1,8 +1,8 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug232
type I interface { X(...int) }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug233.go b/gcc/testsuite/go.test/test/fixedbugs/bug233.go
index 31bb673ebd..63f8ee2e9e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug233.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug233.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug233
import p "fmt"
var _ = p.Print
var fmt = 10
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug234.go b/gcc/testsuite/go.test/test/fixedbugs/bug234.go
index 562109a058..9f503f04a0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug234.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug234.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug235.go b/gcc/testsuite/go.test/test/fixedbugs/bug235.go
index 8cecd9d047..d12d9e7368 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug235.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug235.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// used to crash the compiler
-package main
+package bug235
type T struct {
x [4]byte
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug236.go b/gcc/testsuite/go.test/test/fixedbugs/bug236.go
index 895f82a232..6c245565f2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug236.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug236.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug237.go b/gcc/testsuite/go.test/test/fixedbugs/bug237.go
index 55cc86acea..58996cadc0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug237.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug237.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug238.go b/gcc/testsuite/go.test/test/fixedbugs/bug238.go
index 4d5a905f05..cc47189e16 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug238.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug238.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug239.go b/gcc/testsuite/go.test/test/fixedbugs/bug239.go
index 32c3d7e1c1..e4902527db 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug239.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug239.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug239
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug240.go b/gcc/testsuite/go.test/test/fixedbugs/bug240.go
index 6cba9c8b1e..478b5b2eaf 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug240.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug240.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug241.go b/gcc/testsuite/go.test/test/fixedbugs/bug241.go
index 172b3742e5..1f4440147b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug241.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug241.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug242.go b/gcc/testsuite/go.test/test/fixedbugs/bug242.go
index d80ae76a21..4791ae485f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug242.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug242.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: tuple evaluation order
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug243.go b/gcc/testsuite/go.test/test/fixedbugs/bug243.go
index e3ddf0e774..4870c3614c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug243.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug243.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug244.go b/gcc/testsuite/go.test/test/fixedbugs/bug244.go
index 915c3fcd09..29bf0d58b9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug244.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug244.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug245.go b/gcc/testsuite/go.test/test/fixedbugs/bug245.go
index 6e5a8b344f..c607a6dc33 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug245.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug245.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug245
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug246.go b/gcc/testsuite/go.test/test/fixedbugs/bug246.go
index 12041eb1d4..e506f8c0dc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug246.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug246.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug246
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug247.go b/gcc/testsuite/go.test/test/fixedbugs/bug247.go
index 2f56b88d47..b6851e1bca 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug247.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug247.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug247
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug0.go b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug0.go
index 7fc7401c5a..78433f504d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug0.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug0.go
@@ -1,3 +1,7 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package p
type T struct {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug1.go b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug1.go
index 7fc7401c5a..78433f504d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug1.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug1.go
@@ -1,3 +1,7 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package p
type T struct {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug2.go b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug2.go
index adce366770..ba547d64a1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug2.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug2.go
@@ -1,3 +1,7 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package main
import (
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug3.go b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug3.go
index e5a2449557..4a56c5cc81 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug3.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug248.dir/bug3.go
@@ -1,3 +1,7 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package main
import (
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug248.go b/gcc/testsuite/go.test/test/fixedbugs/bug248.go
index 055bf1fd7e..98cda35c49 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug248.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug248.go
@@ -5,6 +5,9 @@
// $L bug2.$A &&
// ./$A.out || echo BUG: failed to compile
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug249.go b/gcc/testsuite/go.test/test/fixedbugs/bug249.go
index c85708fd8e..dc922455e3 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug249.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug249.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug250.go b/gcc/testsuite/go.test/test/fixedbugs/bug250.go
index cd28642bfc..5140f3e29d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug250.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug250.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG: bug250
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug250
type I1 interface {
m() I2
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug251.go b/gcc/testsuite/go.test/test/fixedbugs/bug251.go
index fb7b98a016..43d9d526fd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug251.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug251.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -16,6 +16,6 @@ type I2 interface {
}
-var i1 I1 = i2 // GC_ERROR "missing m method|need type assertion"
+var i1 I1 = i2
var i2 I2
var i2a I2 = i1
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug252.go b/gcc/testsuite/go.test/test/fixedbugs/bug252.go
index a2c1dab9d3..6f007fb771 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug252.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug252.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug253.go b/gcc/testsuite/go.test/test/fixedbugs/bug253.go
index bb5b770f51..f6ab712ef2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug253.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug253.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug253
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug254.go b/gcc/testsuite/go.test/test/fixedbugs/bug254.go
index c0c7f249ed..9b1c81911b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug254.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug254.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug254
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug255.go b/gcc/testsuite/go.test/test/fixedbugs/bug255.go
index 44427cfdb4..acf4f23910 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug255.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug255.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -12,4 +12,4 @@ var c [1.5]int // ERROR "truncated"
var d ["abc"]int // ERROR "invalid array bound|not numeric"
var e [nil]int // ERROR "invalid array bound|not numeric"
var f [e]int // ERROR "invalid array bound|not constant"
-var g [1<<65]int // ERROR "overflows"
+var g [1<<65]int // ERROR "array bound is too large|overflows"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug256.go b/gcc/testsuite/go.test/test/fixedbugs/bug256.go
index 37fa5f5c80..0498a40d54 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug256.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug256.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug257.go b/gcc/testsuite/go.test/test/fixedbugs/bug257.go
index 1b32475003..003f3ff94d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug257.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug257.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bugxxx
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug258.go b/gcc/testsuite/go.test/test/fixedbugs/bug258.go
index 8984df592d..d362e5a697 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug258.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug258.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug259.go b/gcc/testsuite/go.test/test/fixedbugs/bug259.go
index d148fb3a0c..e4dcaeb2fe 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug259.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug259.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug260.go b/gcc/testsuite/go.test/test/fixedbugs/bug260.go
index 91dc89f77a..6211c4885a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug260.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug260.go
@@ -1,4 +1,8 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug260 failed
+// run
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
// Test that structures pack densely, according to the alignment of the largest field.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug261.go b/gcc/testsuite/go.test/test/fixedbugs/bug261.go
index 8c3fda1e71..f7879b04c1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug261.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug261.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug262.go b/gcc/testsuite/go.test/test/fixedbugs/bug262.go
index ebca7905f9..6cf248a181 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug262.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug262.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug263.go b/gcc/testsuite/go.test/test/fixedbugs/bug263.go
index cab986ad59..f1cf9010d1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug263.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug263.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug264.go b/gcc/testsuite/go.test/test/fixedbugs/bug264.go
index 6d86c6fe5b..fcf373cce9 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug264.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug264.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug265.go b/gcc/testsuite/go.test/test/fixedbugs/bug265.go
index 55f32ececc..7f06fced60 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug265.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug265.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug266.go b/gcc/testsuite/go.test/test/fixedbugs/bug266.go
index 25c246f7df..d4da891d31 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug266.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug266.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug266
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug267.go b/gcc/testsuite/go.test/test/fixedbugs/bug267.go
index 9646142f2a..cf8bf841f8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug267.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug267.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go || echo BUG
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+package bug267
type T []int
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug269.go b/gcc/testsuite/go.test/test/fixedbugs/bug269.go
index 4cc0408c37..c13eb26ce4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug269.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug269.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug271.go b/gcc/testsuite/go.test/test/fixedbugs/bug271.go
index ba93d93ed2..88add7040a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug271.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug271.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug272.go b/gcc/testsuite/go.test/test/fixedbugs/bug272.go
index 3b7c466748..c27f7ee446 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug272.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug272.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug273.go b/gcc/testsuite/go.test/test/fixedbugs/bug273.go
index dd5aaa7b8a..aabb912b91 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug273.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug273.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,14 +8,15 @@
package main
-import "unsafe"
-
var bug = false
var minus1 = -1
+var five = 5
var big int64 = 10 | 1<<32
-var g1 []int
+type block [1<<19]byte
+
+var g1 []block
func shouldfail(f func(), desc string) {
defer func() { recover() }()
@@ -28,55 +29,47 @@ func shouldfail(f func(), desc string) {
}
func badlen() {
- g1 = make([]int, minus1)
+ g1 = make([]block, minus1)
}
func biglen() {
- g1 = make([]int, big)
+ g1 = make([]block, big)
}
func badcap() {
- g1 = make([]int, 10, minus1)
+ g1 = make([]block, 10, minus1)
}
func badcap1() {
- g1 = make([]int, 10, 5)
+ g1 = make([]block, 10, five)
}
func bigcap() {
- g1 = make([]int, 10, big)
+ g1 = make([]block, 10, big)
}
-var g3 map[int]int
+var g3 map[block]block
func badmapcap() {
- g3 = make(map[int]int, minus1)
+ g3 = make(map[block]block, minus1)
}
func bigmapcap() {
- g3 = make(map[int]int, big)
+ g3 = make(map[block]block, big)
}
-var g4 chan int
+type cblock [1<<16-1]byte
+
+var g4 chan cblock
func badchancap() {
- g4 = make(chan int, minus1)
+ g4 = make(chan cblock, minus1)
}
func bigchancap() {
- g4 = make(chan int, big)
+ g4 = make(chan cblock, big)
}
-const addrBits = unsafe.Sizeof((*byte)(nil))
-
-var g5 chan [1<<15]byte
func overflowchan() {
- if addrBits == 32 {
- g5 = make(chan [1<<15]byte, 1<<20)
- } else {
- // cannot overflow on 64-bit, because
- // int is 32 bits and max chan value size
- // in the implementation is 64 kB.
- panic(1)
- }
+ g4 = make(chan cblock, 1<<30)
}
func main() {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug274.go b/gcc/testsuite/go.test/test/fixedbugs/bug274.go
index 198544c3f5..beb2d61acc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug274.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug274.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug275.go b/gcc/testsuite/go.test/test/fixedbugs/bug275.go
index 2bbc807c59..f5f6b14f01 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug275.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug275.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug276.go b/gcc/testsuite/go.test/test/fixedbugs/bug276.go
index 844a6b2382..dc2308ea6b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug276.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug276.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG code should run
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug277.go b/gcc/testsuite/go.test/test/fixedbugs/bug277.go
index 22b2908c98..207556493e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug277.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug277.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug278.go b/gcc/testsuite/go.test/test/fixedbugs/bug278.go
index 3699b9a141..68a3d811c7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug278.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug278.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug279.go b/gcc/testsuite/go.test/test/fixedbugs/bug279.go
index af8e056d97..e5ec5943c0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug279.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug279.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug280.go b/gcc/testsuite/go.test/test/fixedbugs/bug280.go
index 869d446268..ba594a2c48 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug280.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug280.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug281.go b/gcc/testsuite/go.test/test/fixedbugs/bug281.go
index 821b028255..24d6fdce8c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug281.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug281.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug282.go b/gcc/testsuite/go.test/test/fixedbugs/bug282.go
index 463f21e941..3b99da84d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug282.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug282.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/p1.go && $G $D/$F.dir/p2.go
+// compiledir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug283.go b/gcc/testsuite/go.test/test/fixedbugs/bug283.go
index 45ee9082f0..eefed0334b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug283.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug283.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// http://code.google.com/p/go/issues/detail?id=806
// triggered out of registers on 8g
-package main
+package bug283
type Point struct {
x int
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug284.go b/gcc/testsuite/go.test/test/fixedbugs/bug284.go
index bcf161e3de..68208085fa 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug284.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug284.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug285.go b/gcc/testsuite/go.test/test/fixedbugs/bug285.go
index 7eed8fb7ab..0a8a0f09e6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug285.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug285.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug285
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug286.go b/gcc/testsuite/go.test/test/fixedbugs/bug286.go
index eb67838561..44f05153f4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug286.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug286.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug286 failed
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug287.go b/gcc/testsuite/go.test/test/fixedbugs/bug287.go
index a4a08eedc4..2ed81c593d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug287.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug287.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug288.go b/gcc/testsuite/go.test/test/fixedbugs/bug288.go
index 0105159d13..d2461e6a9f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug288.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug288.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug289.go b/gcc/testsuite/go.test/test/fixedbugs/bug289.go
index f7180ff04c..3c6b68767a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug289.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug289.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug290.go b/gcc/testsuite/go.test/test/fixedbugs/bug290.go
index 80437c7f85..c8ff0bc45d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug290.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug290.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug291.go b/gcc/testsuite/go.test/test/fixedbugs/bug291.go
index 09334c9211..17a5483ef5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug291.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug291.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug292.go b/gcc/testsuite/go.test/test/fixedbugs/bug292.go
index 05852cd46d..07051dd3fb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug292.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug292.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug293.go b/gcc/testsuite/go.test/test/fixedbugs/bug293.go
index ca9b71a3ac..bf926f5a4d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug293.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug293.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug294.go b/gcc/testsuite/go.test/test/fixedbugs/bug294.go
index 18f45931c4..0f3e38098c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug294.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug294.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug295.go b/gcc/testsuite/go.test/test/fixedbugs/bug295.go
index fec2351f31..63a12a3a74 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug295.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug295.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,9 @@
package main
-import . "testing" // defines top-level T
+import . "testing" // defines file-level T
+
+type _ B // make use of package "testing" (but don't refer to T)
type S struct {
T int
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug296.go b/gcc/testsuite/go.test/test/fixedbugs/bug296.go
index 46d8dbcfe4..a7c4e0c464 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug296.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug296.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug297.go b/gcc/testsuite/go.test/test/fixedbugs/bug297.go
index 8767cdfea5..ee2ff92437 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug297.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug297.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -11,5 +11,5 @@ package main
type ByteSize float64
const (
_ = iota; // ignore first value by assigning to blank identifier
- KB ByteSize = 1<<(10*X) // ERROR "undefined" "as type ByteSize"
+ KB ByteSize = 1<<(10*X) // ERROR "undefined" "is not a constant|as type ByteSize"
)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug298.go b/gcc/testsuite/go.test/test/fixedbugs/bug298.go
index c16c3f98af..bd362ace2d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug298.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug298.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug299.go b/gcc/testsuite/go.test/test/fixedbugs/bug299.go
index 1c7adb5f5b..9646723bfd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug299.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug299.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug300.go b/gcc/testsuite/go.test/test/fixedbugs/bug300.go
index 09ee3ab697..1ef43a0ad0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug300.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug300.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug301.go b/gcc/testsuite/go.test/test/fixedbugs/bug301.go
index a58f4e13b1..572668f191 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug301.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug301.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug301.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug302.go b/gcc/testsuite/go.test/test/fixedbugs/bug302.go
index e9edb94ac8..dc7637fe52 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug302.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug302.go
@@ -1,4 +1,7 @@
-// $G $D/bug302.dir/p.go && gopack grc pp.a p.$A && $G $D/bug302.dir/main.go
+// $G $D/bug302.dir/p.go && pack grc pp.a p.$A && $G $D/bug302.dir/main.go
+
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug303.go b/gcc/testsuite/go.test/test/fixedbugs/bug303.go
index 3bd790f136..94ca07e702 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug303.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug303.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug304.go b/gcc/testsuite/go.test/test/fixedbugs/bug304.go
index adcf08a355..ad71b20f38 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug304.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug304.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug305.go b/gcc/testsuite/go.test/test/fixedbugs/bug305.go
index 758fee2698..d0a4b24b87 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug305.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug305.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug306.go b/gcc/testsuite/go.test/test/fixedbugs/bug306.go
index a0a43507dc..e8967c25dd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug306.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug306.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/p1.go && $G $D/$F.dir/p2.go
+// compiledir
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug307.go b/gcc/testsuite/go.test/test/fixedbugs/bug307.go
index 1b42c09ab1..6445125297 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug307.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug307.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug308.go b/gcc/testsuite/go.test/test/fixedbugs/bug308.go
index c2845f0421..5bea5175b1 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug308.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug308.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug309.go b/gcc/testsuite/go.test/test/fixedbugs/bug309.go
index d893916cd9..948ca5c796 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug309.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug309.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// issue 1016
-package main
+package bug309
func foo(t interface{}, c chan int) {
switch v := t.(type) {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug311.go b/gcc/testsuite/go.test/test/fixedbugs/bug311.go
index ed937a6747..edcd975963 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug311.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug311.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug312.go b/gcc/testsuite/go.test/test/fixedbugs/bug312.go
index 70888dd410..c7c17e1011 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug312.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug312.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug313.go b/gcc/testsuite/go.test/test/fixedbugs/bug313.go
index eb2a0223b6..a7c1d3627b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug313.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug313.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.dir/[ab].go
+// errorcheckdir
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug314.go b/gcc/testsuite/go.test/test/fixedbugs/bug314.go
index 95d81d7951..6e26d14e1f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug314.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug314.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug314
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug315.go b/gcc/testsuite/go.test/test/fixedbugs/bug315.go
index c59ef29e6c..7b8a9e5701 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug315.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug315.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug315
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug316.go b/gcc/testsuite/go.test/test/fixedbugs/bug316.go
index 2146408a1e..e1374122d4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug316.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug316.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug316
+// compile
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug317.go b/gcc/testsuite/go.test/test/fixedbugs/bug317.go
index 0cb26c29ba..3ff4dc4657 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug317.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug317.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug317
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug318.go b/gcc/testsuite/go.test/test/fixedbugs/bug318.go
index 9c46a04269..93de2d8471 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug318.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug318.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug319.go b/gcc/testsuite/go.test/test/fixedbugs/bug319.go
index f60eee4fb2..f8e959a318 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug319.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug319.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug320.go b/gcc/testsuite/go.test/test/fixedbugs/bug320.go
index 06d41f2ed8..c2dd31b813 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug320.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug320.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug321.go b/gcc/testsuite/go.test/test/fixedbugs/bug321.go
index d0595ff59b..7d018271fc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug321.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug321.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug321
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug322.go b/gcc/testsuite/go.test/test/fixedbugs/bug322.go
index ad0e62dc8c..21efbb5593 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug322.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug322.go
@@ -1,8 +1,8 @@
-// $G $D/$F.dir/lib.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: fails incorrectly
+// rundir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Test case for issue 1402.
-ignored
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug323.go b/gcc/testsuite/go.test/test/fixedbugs/bug323.go
index 23e2be6603..9730ae5c8c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug323.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug323.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug324.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug324.dir/prog.go
index 3ab61f3eb5..3ab61f3eb5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug324.dir/main.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug324.dir/prog.go
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug324.go b/gcc/testsuite/go.test/test/fixedbugs/bug324.go
index 3da75630ac..36b8b56d12 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug324.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug324.go
@@ -1,8 +1,10 @@
-// $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out
+// rundir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Test case for issue 1550
-ignored
+// Test case for issue 1550: a type cannot implement an interface
+// from another package with a private method, and type assertions
+// should fail.
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug325.go b/gcc/testsuite/go.test/test/fixedbugs/bug325.go
index b86740fff9..6ccd0e3c82 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug325.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug325.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug326.go b/gcc/testsuite/go.test/test/fixedbugs/bug326.go
index 7e123e3a39..57f6471dc8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug326.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug326.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug327.go b/gcc/testsuite/go.test/test/fixedbugs/bug327.go
index 4ba5f6072e..0598d95d68 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug327.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug327.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug328.go b/gcc/testsuite/go.test/test/fixedbugs/bug328.go
index 825298371f..73ab46d459 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug328.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug328.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug329.go b/gcc/testsuite/go.test/test/fixedbugs/bug329.go
index 0b7074d62b..74fc78198b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug329.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug329.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug330.go b/gcc/testsuite/go.test/test/fixedbugs/bug330.go
index 114492aff8..ef6a0777fe 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug330.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug330.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug331.go b/gcc/testsuite/go.test/test/fixedbugs/bug331.go
index 6c5acd1f4d..fac0e36289 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug331.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug331.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug331
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug332.go b/gcc/testsuite/go.test/test/fixedbugs/bug332.go
index be79286b81..702779ba67 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug332.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug332.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug333.go b/gcc/testsuite/go.test/test/fixedbugs/bug333.go
index 515c1f3fab..bb690f0e5b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug333.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug333.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug334.go b/gcc/testsuite/go.test/test/fixedbugs/bug334.go
index 870c9ae24f..bd671696ba 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug334.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug334.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug334
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/a.go
index 5a8112a9de..256c110d70 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/a.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/a.go
@@ -4,6 +4,8 @@
package a
-import "./b"
+type T interface{}
-var Bar = b.Foo
+func f() T { return nil }
+
+var Foo T = f()
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/b.go
index 7428c2a918..1474470d4c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/b.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug335.dir/b.go
@@ -4,8 +4,6 @@
package b
-type T interface{}
+import "./a"
-func f() T { return nil }
-
-var Foo T = f()
+var Bar = a.Foo
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug335.go b/gcc/testsuite/go.test/test/fixedbugs/bug335.go
index 915b746578..37c97d7b5e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug335.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug335.go
@@ -1,5 +1,4 @@
-// $G $D/$F.dir/b.go && $G $D/$F.dir/a.go
-// rm -f a.$A b.$A
+// compiledir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,4 +6,4 @@
// Issue 1705.
-unused (see script at top of file)
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug336.go b/gcc/testsuite/go.test/test/fixedbugs/bug336.go
index 8de36898f8..fbf23207c2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug336.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug336.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug337.go b/gcc/testsuite/go.test/test/fixedbugs/bug337.go
index ca9b4b4536..38dc665fa6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug337.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug337.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug338.go b/gcc/testsuite/go.test/test/fixedbugs/bug338.go
index c368a7fadc..c2193fcc25 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug338.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug338.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug339.go b/gcc/testsuite/go.test/test/fixedbugs/bug339.go
index eac7c5ee62..59921d41ca 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug339.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug339.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug340.go b/gcc/testsuite/go.test/test/fixedbugs/bug340.go
index 34cc013151..d996ab64cd 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug340.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug340.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug341.go b/gcc/testsuite/go.test/test/fixedbugs/bug341.go
index 8ee52e1ef0..db1af3eaa3 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug341.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug341.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug341
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug342.go b/gcc/testsuite/go.test/test/fixedbugs/bug342.go
index 0852cdd348..ffcb668116 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug342.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug342.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -9,11 +9,7 @@
package p
type a interface {
- foo(x int) (x int) // ERROR "redeclared|redefinition"
-}
-
-var b interface {
- bar(y int) (y int) // ERROR "redeclared|redefinition"
+ foo(x int) (x int) // ERROR "duplicate argument|redefinition"
}
/*
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug343.go b/gcc/testsuite/go.test/test/fixedbugs/bug343.go
index efc87e3d7a..82201088b2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug343.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug343.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug343
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug344.go b/gcc/testsuite/go.test/test/fixedbugs/bug344.go
index ce953f7f2f..4a92624c76 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug344.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug344.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug345.go b/gcc/testsuite/go.test/test/fixedbugs/bug345.go
index 874710ce88..e3705f6c18 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug345.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug345.go
@@ -1,5 +1,8 @@
// $G $D/$F.dir/io.go && errchk $G -e $D/$F.dir/main.go
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug346.go b/gcc/testsuite/go.test/test/fixedbugs/bug346.go
index 31284c31a1..d9203aa435 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug346.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug346.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: issue2056
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug347.go b/gcc/testsuite/go.test/test/fixedbugs/bug347.go
index 5532cee831..08edf0f4ff 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug347.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug347.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug348.go b/gcc/testsuite/go.test/test/fixedbugs/bug348.go
index 1a539aa3e4..54a289a8de 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug348.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug348.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug349.go b/gcc/testsuite/go.test/test/fixedbugs/bug349.go
index e7612edb77..a3e6bd1619 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug349.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug349.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug350.go b/gcc/testsuite/go.test/test/fixedbugs/bug350.go
index f8df3f58b9..5ce8996ffa 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug350.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug350.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug351.go b/gcc/testsuite/go.test/test/fixedbugs/bug351.go
index 9625c6a501..4c5c7c3278 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug351.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug351.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug352.go b/gcc/testsuite/go.test/test/fixedbugs/bug352.go
index 62fd006c42..1ae2d6139b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug352.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug352.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug352
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug353.go b/gcc/testsuite/go.test/test/fixedbugs/bug353.go
index b59d97f338..2a532c4911 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug353.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug353.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug354.go b/gcc/testsuite/go.test/test/fixedbugs/bug354.go
index a95256e272..1245d91f5f 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug354.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug354.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug354
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// issue 2086
// was calling makeclosure twice on the closure
-package main
+package bug354
type Inner struct {
F func() error
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug355.go b/gcc/testsuite/go.test/test/fixedbugs/bug355.go
index a9cf0161b0..fcf859b7fc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug355.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug355.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug356.go b/gcc/testsuite/go.test/test/fixedbugs/bug356.go
index d21f0cfac6..273c5b8efc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug356.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug356.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug344
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug357.go b/gcc/testsuite/go.test/test/fixedbugs/bug357.go
index 448d982637..ceb2009be5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug357.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug357.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -15,7 +15,7 @@ func bla1() bool {
func bla5() bool {
_ = 1
- false // ERROR "false not used|value computed is not used"
+ false // ERROR "false evaluated but not used|value computed is not used"
_ = 2
return false
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug358.go b/gcc/testsuite/go.test/test/fixedbugs/bug358.go
index 82fbf7f815..063c2e0bf8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug358.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug358.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -12,7 +12,7 @@ package main
import (
"io/ioutil" // GCCGO_ERROR "imported and not used"
"net/http"
- "os"
+ "os" // GCCGO_ERROR "imported and not used"
)
func makeHandler(fn func(http.ResponseWriter, *http.Request, string)) http.HandlerFunc {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug361.go b/gcc/testsuite/go.test/test/fixedbugs/bug361.go
index d2a64bcef4..3e3b7c1818 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug361.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug361.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug360
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug362.go b/gcc/testsuite/go.test/test/fixedbugs/bug362.go
index f38572c0d0..b888ccb448 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug362.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug362.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug363.go b/gcc/testsuite/go.test/test/fixedbugs/bug363.go
index 9347ec28b6..615c66865c 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug363.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug363.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug364.go b/gcc/testsuite/go.test/test/fixedbugs/bug364.go
index a93312107e..64120d1643 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug364.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug364.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug365.go b/gcc/testsuite/go.test/test/fixedbugs/bug365.go
index bc8c2c5e62..795323bb3d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug365.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug365.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug366.go b/gcc/testsuite/go.test/test/fixedbugs/bug366.go
index 8c000f50a9..33a1a5a7eb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug366.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug366.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go
deleted file mode 100644
index 21e9a5002c..0000000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/main.go
+++ /dev/null
@@ -1,24 +0,0 @@
-package main
-
-import (
- "./p"
-)
-
-type T struct{ *p.S }
-type I interface {
- get()
-}
-
-func main() {
- var t T
- p.F(t)
- var x interface{} = t
- _, ok := x.(I)
- if ok {
- panic("should not satisfy main.I")
- }
- _, ok = x.(p.I)
- if !ok {
- panic("should satisfy p.I")
- }
-}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/p.go b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/p.go
index c8772d2d05..2028f740cc 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/p.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/p.go
@@ -1,3 +1,7 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package p
type T struct{ x int }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/prog.go
new file mode 100644
index 0000000000..c278e4dd95
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug367.dir/prog.go
@@ -0,0 +1,28 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
+package main
+
+import (
+ "./p"
+)
+
+type T struct{ *p.S }
+type I interface {
+ get()
+}
+
+func main() {
+ var t T
+ p.F(t)
+ var x interface{} = t
+ _, ok := x.(I)
+ if ok {
+ panic("should not satisfy main.I")
+ }
+ _, ok = x.(p.I)
+ if !ok {
+ panic("should satisfy p.I")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug367.go b/gcc/testsuite/go.test/test/fixedbugs/bug367.go
index 25d11a1531..05252cd9a6 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug367.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug367.go
@@ -1,7 +1,10 @@
-// $G $D/$F.dir/p.go && $G $D/$F.dir/main.go && $L main.$A && ./$A.out || echo BUG: should not fail
+// rundir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Issue 1536: bug when handling imported interfaces with
+// private methods.
+
package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug368.go b/gcc/testsuite/go.test/test/fixedbugs/bug368.go
index 8d94f531c9..c38cc7fad7 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug368.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug368.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug369.go b/gcc/testsuite/go.test/test/fixedbugs/bug369.go
index 8eb23eecf1..6d526228b8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug369.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug369.go
@@ -1,6 +1,9 @@
// $G -N -o slow.$A $D/bug369.dir/pkg.go &&
// $G -o fast.$A $D/bug369.dir/pkg.go &&
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
+
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -35,9 +38,9 @@ func BenchmarkSlowNonASCII(b *testing.B) {
}
func main() {
- os.Args = []string{os.Args[0], "-test.benchtime=0.1"}
+ os.Args = []string{os.Args[0], "-test.benchtime=100ms"}
flag.Parse()
-
+
rslow := testing.Benchmark(BenchmarkSlowNonASCII)
rfast := testing.Benchmark(BenchmarkFastNonASCII)
tslow := rslow.NsPerOp()
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug370.go b/gcc/testsuite/go.test/test/fixedbugs/bug370.go
index 9cb45f6e0d..246bc7c4e5 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug370.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug370.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug371.go b/gcc/testsuite/go.test/test/fixedbugs/bug371.go
index bf993df068..6329e9635a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug371.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug371.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug372.go b/gcc/testsuite/go.test/test/fixedbugs/bug372.go
index a6f7208bbd..34578565af 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug372.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug372.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug372
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug373.go b/gcc/testsuite/go.test/test/fixedbugs/bug373.go
index 934a6c7328..e91f26d6ed 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug373.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug373.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug374.go b/gcc/testsuite/go.test/test/fixedbugs/bug374.go
index b55c5df456..4f0b721f24 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug374.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug374.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug375.go b/gcc/testsuite/go.test/test/fixedbugs/bug375.go
index 5273585263..cb159b0d6b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug375.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug375.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug375
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug376.go b/gcc/testsuite/go.test/test/fixedbugs/bug376.go
index 1efbeecf21..5fbbc9cd44 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug376.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug376.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/one.go
index c9060756b1..e29b813a48 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/one.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/one.go
@@ -1,3 +1,7 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package one
func Foo() (n int64, _ *int) {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/two.go
index 8a5346ab72..2a10812d56 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/two.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug377.dir/two.go
@@ -1,3 +1,7 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
package two
import _ "./one"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug377.go b/gcc/testsuite/go.test/test/fixedbugs/bug377.go
index e905e34d68..22df005b2a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug377.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug377.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+// compiledir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug378.go b/gcc/testsuite/go.test/test/fixedbugs/bug378.go
index b393b3dc1e..f3346c648d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug378.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug378.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: bug378
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug379.go b/gcc/testsuite/go.test/test/fixedbugs/bug379.go
index 3dd3d2983b..14abe469be 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug379.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug379.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -14,5 +14,5 @@
package main
func main() {
- 1 + 2 // ERROR "1 \+ 2 not used|value computed is not used"
+ 1 + 2 // ERROR "1 \+ 2 evaluated but not used|value computed is not used"
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug380.go b/gcc/testsuite/go.test/test/fixedbugs/bug380.go
index 75b58064f5..96e1edecac 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug380.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug380.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug381.go b/gcc/testsuite/go.test/test/fixedbugs/bug381.go
index 3f3232bf12..0253e1446b 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug381.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug381.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,14 +7,25 @@
// Issue 2276.
// Check that the error messages says
-// bug378.go:19: unsafe.Alignof(0) not used
+// bug381.go:29: unsafe.Alignof(0) not used
// and not
-// bug378.go:19: 4 not used
+// bug381.go:29: 4 not used
+
+// Issue 2768: previously got
+// bug381.go:30: cannot use 3 (type time.Weekday) as type int in function argument
+// want
+// bug381.go:30: cannot use time.Wednesday (type time.Weekday) as type int in function argument
package main
-import "unsafe"
+import (
+ "time"
+ "unsafe"
+)
+
+func f(int)
func main() {
unsafe.Alignof(0) // ERROR "unsafe\.Alignof|value computed is not used"
+ f(time.Wednesday) // ERROR "time.Wednesday|incompatible type"
}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug382.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/bug382.dir/prog.go
new file mode 100644
index 0000000000..b74a82d824
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug382.dir/prog.go
@@ -0,0 +1,13 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
+
+// Issue 2529
+
+package main
+
+import "./pkg"
+
+var x = pkg.E
+
+var fo = struct{ F pkg.T }{F: x}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug382.go b/gcc/testsuite/go.test/test/fixedbugs/bug382.go
index 6212fbf507..6039939eeb 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug382.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug382.go
@@ -1,10 +1,9 @@
-// $G $D/$F.dir/pkg.go && $G $D/$F.go || echo "Bug 382"
+// compiledir
-// Issue 2529
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file
-package main
-import "./pkg"
+// Issue 2529.
-var x = pkg.E
-
-var fo = struct {F pkg.T}{F: x}
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug383.go b/gcc/testsuite/go.test/test/fixedbugs/bug383.go
index 181a897b63..503779c377 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug383.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug383.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug384.go b/gcc/testsuite/go.test/test/fixedbugs/bug384.go
index b3d6466882..0233c197c4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug384.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug384.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug385_32.go b/gcc/testsuite/go.test/test/fixedbugs/bug385_32.go
index a009f664e0..4c3cad7798 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug385_32.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug385_32.go
@@ -1,4 +1,5 @@
-// [ $O == 6 ] || errchk $G -e $D/$F.go
+// +build 386 arm
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,7 +9,7 @@
package main
func main() {
- var arr [1000200030]int // ERROR "type .* too large"
+ var arr [1000200030]int // GC_ERROR "type .* too large"
arr_bkup := arr
_ = arr_bkup
-} \ No newline at end of file
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug385_64.go b/gcc/testsuite/go.test/test/fixedbugs/bug385_64.go
index 701be0d09a..6789c0abf0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug385_64.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug385_64.go
@@ -1,15 +1,223 @@
-// [ $O != 6 ] || errchk $G -e $D/$F.go
+// +build amd64
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Issue 2444
+// Issue 4666: issue with arrays of exactly 4GB.
package main
-func main() { // ERROR "stack frame too large"
- var arr [1000200030]int
- arr_bkup := arr
- _ = arr_bkup
-}
+var z [10<<20]byte
+
+func main() { // GC_ERROR "stack frame too large"
+ // seq 1 206 | sed 's/.*/ var x& [10<<20]byte; z = x&/'
+ var x1 [10<<20]byte; z = x1
+ var x2 [10<<20]byte; z = x2
+ var x3 [10<<20]byte; z = x3
+ var x4 [10<<20]byte; z = x4
+ var x5 [10<<20]byte; z = x5
+ var x6 [10<<20]byte; z = x6
+ var x7 [10<<20]byte; z = x7
+ var x8 [10<<20]byte; z = x8
+ var x9 [10<<20]byte; z = x9
+ var x10 [10<<20]byte; z = x10
+ var x11 [10<<20]byte; z = x11
+ var x12 [10<<20]byte; z = x12
+ var x13 [10<<20]byte; z = x13
+ var x14 [10<<20]byte; z = x14
+ var x15 [10<<20]byte; z = x15
+ var x16 [10<<20]byte; z = x16
+ var x17 [10<<20]byte; z = x17
+ var x18 [10<<20]byte; z = x18
+ var x19 [10<<20]byte; z = x19
+ var x20 [10<<20]byte; z = x20
+ var x21 [10<<20]byte; z = x21
+ var x22 [10<<20]byte; z = x22
+ var x23 [10<<20]byte; z = x23
+ var x24 [10<<20]byte; z = x24
+ var x25 [10<<20]byte; z = x25
+ var x26 [10<<20]byte; z = x26
+ var x27 [10<<20]byte; z = x27
+ var x28 [10<<20]byte; z = x28
+ var x29 [10<<20]byte; z = x29
+ var x30 [10<<20]byte; z = x30
+ var x31 [10<<20]byte; z = x31
+ var x32 [10<<20]byte; z = x32
+ var x33 [10<<20]byte; z = x33
+ var x34 [10<<20]byte; z = x34
+ var x35 [10<<20]byte; z = x35
+ var x36 [10<<20]byte; z = x36
+ var x37 [10<<20]byte; z = x37
+ var x38 [10<<20]byte; z = x38
+ var x39 [10<<20]byte; z = x39
+ var x40 [10<<20]byte; z = x40
+ var x41 [10<<20]byte; z = x41
+ var x42 [10<<20]byte; z = x42
+ var x43 [10<<20]byte; z = x43
+ var x44 [10<<20]byte; z = x44
+ var x45 [10<<20]byte; z = x45
+ var x46 [10<<20]byte; z = x46
+ var x47 [10<<20]byte; z = x47
+ var x48 [10<<20]byte; z = x48
+ var x49 [10<<20]byte; z = x49
+ var x50 [10<<20]byte; z = x50
+ var x51 [10<<20]byte; z = x51
+ var x52 [10<<20]byte; z = x52
+ var x53 [10<<20]byte; z = x53
+ var x54 [10<<20]byte; z = x54
+ var x55 [10<<20]byte; z = x55
+ var x56 [10<<20]byte; z = x56
+ var x57 [10<<20]byte; z = x57
+ var x58 [10<<20]byte; z = x58
+ var x59 [10<<20]byte; z = x59
+ var x60 [10<<20]byte; z = x60
+ var x61 [10<<20]byte; z = x61
+ var x62 [10<<20]byte; z = x62
+ var x63 [10<<20]byte; z = x63
+ var x64 [10<<20]byte; z = x64
+ var x65 [10<<20]byte; z = x65
+ var x66 [10<<20]byte; z = x66
+ var x67 [10<<20]byte; z = x67
+ var x68 [10<<20]byte; z = x68
+ var x69 [10<<20]byte; z = x69
+ var x70 [10<<20]byte; z = x70
+ var x71 [10<<20]byte; z = x71
+ var x72 [10<<20]byte; z = x72
+ var x73 [10<<20]byte; z = x73
+ var x74 [10<<20]byte; z = x74
+ var x75 [10<<20]byte; z = x75
+ var x76 [10<<20]byte; z = x76
+ var x77 [10<<20]byte; z = x77
+ var x78 [10<<20]byte; z = x78
+ var x79 [10<<20]byte; z = x79
+ var x80 [10<<20]byte; z = x80
+ var x81 [10<<20]byte; z = x81
+ var x82 [10<<20]byte; z = x82
+ var x83 [10<<20]byte; z = x83
+ var x84 [10<<20]byte; z = x84
+ var x85 [10<<20]byte; z = x85
+ var x86 [10<<20]byte; z = x86
+ var x87 [10<<20]byte; z = x87
+ var x88 [10<<20]byte; z = x88
+ var x89 [10<<20]byte; z = x89
+ var x90 [10<<20]byte; z = x90
+ var x91 [10<<20]byte; z = x91
+ var x92 [10<<20]byte; z = x92
+ var x93 [10<<20]byte; z = x93
+ var x94 [10<<20]byte; z = x94
+ var x95 [10<<20]byte; z = x95
+ var x96 [10<<20]byte; z = x96
+ var x97 [10<<20]byte; z = x97
+ var x98 [10<<20]byte; z = x98
+ var x99 [10<<20]byte; z = x99
+ var x100 [10<<20]byte; z = x100
+ var x101 [10<<20]byte; z = x101
+ var x102 [10<<20]byte; z = x102
+ var x103 [10<<20]byte; z = x103
+ var x104 [10<<20]byte; z = x104
+ var x105 [10<<20]byte; z = x105
+ var x106 [10<<20]byte; z = x106
+ var x107 [10<<20]byte; z = x107
+ var x108 [10<<20]byte; z = x108
+ var x109 [10<<20]byte; z = x109
+ var x110 [10<<20]byte; z = x110
+ var x111 [10<<20]byte; z = x111
+ var x112 [10<<20]byte; z = x112
+ var x113 [10<<20]byte; z = x113
+ var x114 [10<<20]byte; z = x114
+ var x115 [10<<20]byte; z = x115
+ var x116 [10<<20]byte; z = x116
+ var x117 [10<<20]byte; z = x117
+ var x118 [10<<20]byte; z = x118
+ var x119 [10<<20]byte; z = x119
+ var x120 [10<<20]byte; z = x120
+ var x121 [10<<20]byte; z = x121
+ var x122 [10<<20]byte; z = x122
+ var x123 [10<<20]byte; z = x123
+ var x124 [10<<20]byte; z = x124
+ var x125 [10<<20]byte; z = x125
+ var x126 [10<<20]byte; z = x126
+ var x127 [10<<20]byte; z = x127
+ var x128 [10<<20]byte; z = x128
+ var x129 [10<<20]byte; z = x129
+ var x130 [10<<20]byte; z = x130
+ var x131 [10<<20]byte; z = x131
+ var x132 [10<<20]byte; z = x132
+ var x133 [10<<20]byte; z = x133
+ var x134 [10<<20]byte; z = x134
+ var x135 [10<<20]byte; z = x135
+ var x136 [10<<20]byte; z = x136
+ var x137 [10<<20]byte; z = x137
+ var x138 [10<<20]byte; z = x138
+ var x139 [10<<20]byte; z = x139
+ var x140 [10<<20]byte; z = x140
+ var x141 [10<<20]byte; z = x141
+ var x142 [10<<20]byte; z = x142
+ var x143 [10<<20]byte; z = x143
+ var x144 [10<<20]byte; z = x144
+ var x145 [10<<20]byte; z = x145
+ var x146 [10<<20]byte; z = x146
+ var x147 [10<<20]byte; z = x147
+ var x148 [10<<20]byte; z = x148
+ var x149 [10<<20]byte; z = x149
+ var x150 [10<<20]byte; z = x150
+ var x151 [10<<20]byte; z = x151
+ var x152 [10<<20]byte; z = x152
+ var x153 [10<<20]byte; z = x153
+ var x154 [10<<20]byte; z = x154
+ var x155 [10<<20]byte; z = x155
+ var x156 [10<<20]byte; z = x156
+ var x157 [10<<20]byte; z = x157
+ var x158 [10<<20]byte; z = x158
+ var x159 [10<<20]byte; z = x159
+ var x160 [10<<20]byte; z = x160
+ var x161 [10<<20]byte; z = x161
+ var x162 [10<<20]byte; z = x162
+ var x163 [10<<20]byte; z = x163
+ var x164 [10<<20]byte; z = x164
+ var x165 [10<<20]byte; z = x165
+ var x166 [10<<20]byte; z = x166
+ var x167 [10<<20]byte; z = x167
+ var x168 [10<<20]byte; z = x168
+ var x169 [10<<20]byte; z = x169
+ var x170 [10<<20]byte; z = x170
+ var x171 [10<<20]byte; z = x171
+ var x172 [10<<20]byte; z = x172
+ var x173 [10<<20]byte; z = x173
+ var x174 [10<<20]byte; z = x174
+ var x175 [10<<20]byte; z = x175
+ var x176 [10<<20]byte; z = x176
+ var x177 [10<<20]byte; z = x177
+ var x178 [10<<20]byte; z = x178
+ var x179 [10<<20]byte; z = x179
+ var x180 [10<<20]byte; z = x180
+ var x181 [10<<20]byte; z = x181
+ var x182 [10<<20]byte; z = x182
+ var x183 [10<<20]byte; z = x183
+ var x184 [10<<20]byte; z = x184
+ var x185 [10<<20]byte; z = x185
+ var x186 [10<<20]byte; z = x186
+ var x187 [10<<20]byte; z = x187
+ var x188 [10<<20]byte; z = x188
+ var x189 [10<<20]byte; z = x189
+ var x190 [10<<20]byte; z = x190
+ var x191 [10<<20]byte; z = x191
+ var x192 [10<<20]byte; z = x192
+ var x193 [10<<20]byte; z = x193
+ var x194 [10<<20]byte; z = x194
+ var x195 [10<<20]byte; z = x195
+ var x196 [10<<20]byte; z = x196
+ var x197 [10<<20]byte; z = x197
+ var x198 [10<<20]byte; z = x198
+ var x199 [10<<20]byte; z = x199
+ var x200 [10<<20]byte; z = x200
+ var x201 [10<<20]byte; z = x201
+ var x202 [10<<20]byte; z = x202
+ var x203 [10<<20]byte; z = x203
+ var x204 [10<<20]byte; z = x204
+ var x205 [10<<20]byte; z = x205
+ var x206 [10<<20]byte; z = x206
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug386.go b/gcc/testsuite/go.test/test/fixedbugs/bug386.go
index b42c07073b..ec358bd36e 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug386.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug386.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug387.go b/gcc/testsuite/go.test/test/fixedbugs/bug387.go
index c9db4aea89..59d5ef9038 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug387.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug387.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo "Bug387"
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug388.go b/gcc/testsuite/go.test/test/fixedbugs/bug388.go
index c17fd7ca23..d41f9ea543 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug388.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug388.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug389.go b/gcc/testsuite/go.test/test/fixedbugs/bug389.go
index ecbbbdd585..55a02e05c0 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug389.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug389.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug390.go b/gcc/testsuite/go.test/test/fixedbugs/bug390.go
index 31c4dd40ba..7ce9e13703 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug390.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug390.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug391.go b/gcc/testsuite/go.test/test/fixedbugs/bug391.go
index 81507188b2..07d129ddc4 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug391.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug391.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo "Issue2576"
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/one.go
index a7017255e5..8242f28462 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/one.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/one.go
@@ -20,3 +20,24 @@ func F3() (ret []int) { return append(ret, 1) }
// Call of inlined method with blank receiver.
func (_ *T) M() int { return 1 }
func (t *T) MM() int { return t.M() }
+
+
+// One more like issue 2678
+type S struct { x, y int }
+type U []S
+
+func F4(S int) U { return U{{S,S}} }
+
+func F5() []*S {
+ return []*S{ {1,2}, { 3, 4} }
+}
+
+func F6(S int) *U {
+ return &U{{S,S}}
+}
+
+// Bug in the fix.
+
+type PB struct { x int }
+
+func (t *PB) Reset() { *t = PB{} }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg2.go b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg2.go
new file mode 100644
index 0000000000..8320b2fffa
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg2.go
@@ -0,0 +1,25 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in one.go so that the inlined
+// forms get type-checked.
+
+package pkg2
+
+import "./one"
+
+func use() {
+ one.F1(nil)
+ one.F2(nil)
+ one.F3()
+ one.F4(1)
+
+ var t *one.T
+ t.M()
+ t.MM()
+}
+
+var V = []one.PB{{}, {}}
+
+func F() *one.PB
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg3.go b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg3.go
new file mode 100644
index 0000000000..402c3b083f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/pkg3.go
@@ -0,0 +1,13 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in pkg2.go so that the inlined
+// forms get type-checked.
+
+package pkg3
+
+import "./pkg2"
+
+var x = pkg2.F()
+var v = pkg2.V
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/two.go
deleted file mode 100644
index b0ce26d39a..0000000000
--- a/gcc/testsuite/go.test/test/fixedbugs/bug392.dir/two.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Use the functions in one.go so that the inlined
-// forms get type-checked.
-
-package two
-
-import "./one"
-
-func use() {
- one.F1(nil)
- one.F2(nil)
- one.F3()
-
- var t *one.T
- t.M()
- t.MM()
-}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug392.go b/gcc/testsuite/go.test/test/fixedbugs/bug392.go
index 50af6006fb..48b79e01b8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug392.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug392.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+// compiledir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug393.go b/gcc/testsuite/go.test/test/fixedbugs/bug393.go
index e21b9c4a41..f8a9c65781 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug393.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug393.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: bug393
+// compile
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
// issue 2672
// was trying binary search with an interface type
-package main
+package bug393
func f(x interface{}) int {
switch x {
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug394.go b/gcc/testsuite/go.test/test/fixedbugs/bug394.go
index 42c20e7a91..2d77156c1a 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug394.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug394.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug396.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug396.dir/one.go
index 7902a07d53..96a1dd7dc2 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug396.dir/one.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug396.dir/one.go
@@ -4,6 +4,7 @@
package one
+// Issue 2687
type T struct { int }
func New(i int) T { return T{i} }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug396.go b/gcc/testsuite/go.test/test/fixedbugs/bug396.go
index 50af6006fb..48b79e01b8 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug396.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug396.go
@@ -1,4 +1,4 @@
-// $G $D/$F.dir/one.go && $G $D/$F.dir/two.go
+// compiledir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug397.go b/gcc/testsuite/go.test/test/fixedbugs/bug397.go
index 0395701302..56cc7cdd4d 100644
--- a/gcc/testsuite/go.test/test/fixedbugs/bug397.go
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug397.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug398.go b/gcc/testsuite/go.test/test/fixedbugs/bug398.go
new file mode 100644
index 0000000000..1dd3fa4213
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug398.go
@@ -0,0 +1,24 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to crash compiler in interface type equality check.
+
+package p
+
+type I1 interface {
+ F() interface{I1}
+}
+
+type I2 interface {
+ F() interface{I2}
+}
+
+var v1 I1
+var v2 I2
+
+func f() bool {
+ return v1 == v2
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug399.go b/gcc/testsuite/go.test/test/fixedbugs/bug399.go
new file mode 100644
index 0000000000..94852c9ee5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug399.go
@@ -0,0 +1,15 @@
+// compile
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2674
+
+package main
+const dow = "\000\003"
+
+func main() {
+ println(int(dow[1]))
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug401.go b/gcc/testsuite/go.test/test/fixedbugs/bug401.go
new file mode 100644
index 0000000000..5589b5b1bb
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug401.go
@@ -0,0 +1,46 @@
+// run
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2582
+package main
+
+type T struct{}
+
+func (T) cplx() complex128 {
+ for false {
+ } // avoid inlining
+ return complex(1, 0)
+}
+
+func (T) cplx2() complex128 {
+ return complex(0, 1)
+}
+
+type I interface {
+ cplx() complex128
+}
+
+func main() {
+
+ var t T
+
+ if v := real(t.cplx()); v != 1 {
+ panic("not-inlined complex call failed")
+ }
+ _ = imag(t.cplx())
+
+ _ = real(t.cplx2())
+ if v := imag(t.cplx2()); v != 1 {
+ panic("potentially inlined complex call failed")
+ }
+
+ var i I
+ i = t
+ if v := real(i.cplx()); v != 1 {
+ panic("potentially inlined complex call failed")
+ }
+ _ = imag(i.cplx())
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug402.go b/gcc/testsuite/go.test/test/fixedbugs/bug402.go
new file mode 100644
index 0000000000..db3f3da448
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug402.go
@@ -0,0 +1,31 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+
+var a = []int64{
+ 0.0005 * 1e9,
+ 0.001 * 1e9,
+ 0.005 * 1e9,
+ 0.01 * 1e9,
+ 0.05 * 1e9,
+ 0.1 * 1e9,
+ 0.5 * 1e9,
+ 1 * 1e9,
+ 5 * 1e9,
+}
+
+func main() {
+ s := ""
+ for _, v := range a {
+ s += fmt.Sprint(v) + " "
+ }
+ if s != "500000 1000000 5000000 10000000 50000000 100000000 500000000 1000000000 5000000000 " {
+ panic(s)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug403.go b/gcc/testsuite/go.test/test/fixedbugs/bug403.go
new file mode 100644
index 0000000000..ed7b49aea2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug403.go
@@ -0,0 +1,23 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Crashed gccgo.
+
+package p
+
+type S struct {
+ f interface{}
+}
+
+func F(p *S) bool {
+ v := p.f
+ switch a := v.(type) {
+ case nil:
+ _ = a
+ return true
+ }
+ return true
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/one.go
new file mode 100644
index 0000000000..2024eb007c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/one.go
@@ -0,0 +1,19 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+type T1 int
+type T2 []T1
+type T3 T2
+
+func F1(T2) {
+}
+
+func (p *T1) M1() T3 {
+ return nil
+}
+
+func (p T3) M2() {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/two.go
new file mode 100644
index 0000000000..162eae7124
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug404.dir/two.go
@@ -0,0 +1,12 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The gccgo compiler would fail on the import statement.
+// two.go:10:13: error: use of undefined type ‘one.T2’
+
+package two
+
+import "./one"
+
+var V one.T3
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug404.go b/gcc/testsuite/go.test/test/fixedbugs/bug404.go
new file mode 100644
index 0000000000..481acda328
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug404.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug405.go b/gcc/testsuite/go.test/test/fixedbugs/bug405.go
new file mode 100644
index 0000000000..e8ecc4d034
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug405.go
@@ -0,0 +1,24 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test using _ receiver. Failed with gccgo.
+
+package main
+
+type S struct {}
+
+func (_ S) F(i int) int {
+ return i
+}
+
+func main() {
+ s := S{}
+ const c = 123
+ i := s.F(c)
+ if i != c {
+ panic(i)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug406.go b/gcc/testsuite/go.test/test/fixedbugs/bug406.go
new file mode 100644
index 0000000000..c6f8534c9b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug406.go
@@ -0,0 +1,25 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2821
+package main
+
+type matrix struct {
+ e []int
+}
+
+func (a matrix) equal() bool {
+ for _ = range a.e {
+ }
+ return true
+}
+
+func main() {
+ var a matrix
+ var i interface{}
+ i = true && a.equal()
+ _ = i
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/one.go
new file mode 100644
index 0000000000..a91d904333
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/one.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+// Issue 2877
+type T struct {
+ f func(t *T, arg int)
+ g func(t T, arg int)
+}
+
+func (t *T) foo(arg int) {}
+func (t T) goo(arg int) {}
+
+func (t *T) F() { t.f = (*T).foo }
+func (t *T) G() { t.g = T.goo }
+
+
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go
new file mode 100644
index 0000000000..67e1852ea0
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug407.dir/two.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in one.go so that the inlined
+// forms get type-checked.
+
+package two
+
+import "./one"
+
+func use() {
+ var r one.T
+ r.F()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug407.go b/gcc/testsuite/go.test/test/fixedbugs/bug407.go
new file mode 100644
index 0000000000..48b79e01b8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug407.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug409.go b/gcc/testsuite/go.test/test/fixedbugs/bug409.go
new file mode 100644
index 0000000000..1dca43b7ae
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug409.go
@@ -0,0 +1,20 @@
+// cmpout
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Multiple inlined calls to a function that causes
+// redundant address loads.
+
+package main
+
+func F(v [2]float64) [2]float64 {
+ return [2]float64{v[0], v[1]}
+}
+
+func main() {
+ a := F([2]float64{1, 2})
+ b := F([2]float64{3, 4})
+ println(a[0], a[1], b[0], b[1])
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug409.out b/gcc/testsuite/go.test/test/fixedbugs/bug409.out
new file mode 100644
index 0000000000..3cb40ed59a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug409.out
@@ -0,0 +1 @@
++1.000000e+000 +2.000000e+000 +3.000000e+000 +4.000000e+000
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug410.go b/gcc/testsuite/go.test/test/fixedbugs/bug410.go
new file mode 100644
index 0000000000..430ddcbb52
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug410.go
@@ -0,0 +1,24 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to run 6g out of registers. Issue 2669.
+
+package p
+
+type y struct {
+ num int
+}
+
+func zzz () {
+ k := make([]byte, 10)
+ arr := make ([]*y, 0)
+ for s := range arr {
+ x := make([]byte, 10)
+ for i := 0; i < 100 ; i++ {
+ x[i] ^= k[i-arr[s].num%3]
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug411.go b/gcc/testsuite/go.test/test/fixedbugs/bug411.go
new file mode 100644
index 0000000000..3b90db88d6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug411.go
@@ -0,0 +1,19 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2588. Used to trigger internal compiler error on 8g,
+// because the compiler tried to registerize the int64 being
+// used as a memory operand of a int64->float64 move.
+
+package p
+
+func f1(a int64) {
+ f2(float64(a), float64(a))
+}
+
+func f2(a,b float64) {
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug412.go b/gcc/testsuite/go.test/test/fixedbugs/bug412.go
new file mode 100644
index 0000000000..c7ddc0cac8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug412.go
@@ -0,0 +1,16 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type t struct {
+ x int // GCCGO_ERROR "duplicate field name .x."
+ x int // GC_ERROR "duplicate field x"
+}
+
+func f(t *t) int {
+ return t.x // GC_ERROR "ambiguous selector t.x"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug413.go b/gcc/testsuite/go.test/test/fixedbugs/bug413.go
new file mode 100644
index 0000000000..ba80464907
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug413.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func f(i int) int { return i }
+
+var i = func() int {a := f(i); return a}() // ERROR "initialization loop|depends upon itself"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/p1.go
new file mode 100644
index 0000000000..2463834843
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/p1.go
@@ -0,0 +1,21 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+import "fmt"
+
+type Fer interface {
+ f() string
+}
+
+type Object struct{}
+
+func (this *Object) f() string {
+ return "Object.f"
+}
+
+func PrintFer(fer Fer) {
+ fmt.Sprintln(fer.f())
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/prog.go
new file mode 100644
index 0000000000..f55d946968
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug414.dir/prog.go
@@ -0,0 +1,18 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./p1"
+
+type MyObject struct {
+ p1.Fer
+}
+
+func main() {
+ var b p1.Fer = &p1.Object{}
+ p1.PrintFer(b)
+ var c p1.Fer = &MyObject{b}
+ p1.PrintFer(c)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug414.go b/gcc/testsuite/go.test/test/fixedbugs/bug414.go
new file mode 100644
index 0000000000..35e19be38e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug414.go
@@ -0,0 +1,9 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1743: test embedding of imported types with private methods.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/p.go b/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/p.go
new file mode 100644
index 0000000000..b4152d63a7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/p.go
@@ -0,0 +1,14 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type A struct {
+ s struct{int}
+}
+
+func (a *A) f() {
+ a.s = struct{int}{0}
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/prog.go
new file mode 100644
index 0000000000..b894453fc3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug415.dir/prog.go
@@ -0,0 +1,9 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+import "./p"
+func main() {}
+var _ p.A
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug415.go b/gcc/testsuite/go.test/test/fixedbugs/bug415.go
new file mode 100644
index 0000000000..8cd4c49f24
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug415.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2716. Export metadata error made main.go not compile.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug416.go b/gcc/testsuite/go.test/test/fixedbugs/bug416.go
new file mode 100644
index 0000000000..1d24fa935d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug416.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type T struct {
+ X int
+}
+
+func (t *T) X() {} // ERROR "type T has both field and method named X|redeclares struct field name"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug417.go b/gcc/testsuite/go.test/test/fixedbugs/bug417.go
new file mode 100644
index 0000000000..a9acb42386
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug417.go
@@ -0,0 +1,32 @@
+// compile
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Some indirect uses of types crashed gccgo, because it assumed that
+// the size of the type was known before it had been computed.
+
+package p
+
+type S1 struct {
+ p *[1]S3
+ s [][1]S3
+ m map[int][1]S3
+ c chan [1]S3
+ i interface { f([1]S3) [1]S3 }
+ f func([1]S3) [1]S3
+}
+
+type S2 struct {
+ p *struct { F S3 }
+ s []struct { F S3 }
+ m map[int]struct { F S3 }
+ c chan struct { F S3 }
+ i interface { f(struct { F S3 }) struct { F S3 } }
+ f func(struct { F S3 } ) struct { F S3 }
+}
+
+type S3 struct {
+ I int
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug418.go b/gcc/testsuite/go.test/test/fixedbugs/bug418.go
new file mode 100644
index 0000000000..64d86b3400
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug418.go
@@ -0,0 +1,22 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3044.
+// Multiple valued expressions in return lists.
+
+package p
+
+func Two() (a, b int)
+
+// F used to compile.
+func F() (x interface{}, y int) {
+ return Two(), 0 // ERROR "single-value context"
+}
+
+// Recursive used to trigger an internal compiler error.
+func Recursive() (x interface{}, y int) {
+ return Recursive(), 0 // ERROR "single-value context"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug419.go b/gcc/testsuite/go.test/test/fixedbugs/bug419.go
new file mode 100644
index 0000000000..cfab404eb3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug419.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1811.
+// gccgo failed to compile this.
+
+package p
+
+type E interface{}
+
+type I interface {
+ E
+ E
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug420.go b/gcc/testsuite/go.test/test/fixedbugs/bug420.go
new file mode 100644
index 0000000000..02b4349d80
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug420.go
@@ -0,0 +1,14 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1757.
+// gccgo failed to compile this.
+
+package main
+
+func main() {
+ (_) = 0
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug421.go b/gcc/testsuite/go.test/test/fixedbugs/bug421.go
new file mode 100644
index 0000000000..1fe02375ab
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug421.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 1927.
+// gccgo failed to issue the first error below.
+
+package main
+
+func main() {
+ println(int(1) == uint(1)) // ERROR "types"
+ var x int = 1
+ var y uint = 1
+ println(x == y) // ERROR "types"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug422.go b/gcc/testsuite/go.test/test/fixedbugs/bug422.go
new file mode 100644
index 0000000000..6865fe4b63
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug422.go
@@ -0,0 +1,11 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo crashed compiling this file.
+
+package p
+
+var V = "a" > "b"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug423.go b/gcc/testsuite/go.test/test/fixedbugs/bug423.go
new file mode 100644
index 0000000000..7268912454
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug423.go
@@ -0,0 +1,277 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gc used to overflow a counter when a variable was
+// mentioned 256 times, and generate stack corruption.
+
+package main
+
+func main() {
+ F(1)
+}
+
+func F(arg int) {
+ var X interface{}
+ _ = X // used once
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 32 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 64 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 96 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 128 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 200 times
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0
+ X = 0 // used 256 times
+ if arg != 1 {
+ panic("argument was changed")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/lib.go b/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/lib.go
new file mode 100644
index 0000000000..97054da3a3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/lib.go
@@ -0,0 +1,16 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package lib
+
+type I interface {
+ m() string
+}
+
+type T struct{}
+
+// m is not accessible from outside this package.
+func (t *T) m() string {
+ return "lib.T.m"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/main.go
new file mode 100644
index 0000000000..c2fe1463cd
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug424.dir/main.go
@@ -0,0 +1,97 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests that method calls through an interface always
+// call the locally defined method localT.m independent
+// at which embedding level it is and in which order
+// embedding is done.
+
+package main
+
+import "./lib"
+import "reflect"
+import "fmt"
+
+type localI interface {
+ m() string
+}
+
+type localT struct{}
+
+func (t *localT) m() string {
+ return "main.localT.m"
+}
+
+type myT1 struct {
+ localT
+}
+
+type myT2 struct {
+ localT
+ lib.T
+}
+
+type myT3 struct {
+ lib.T
+ localT
+}
+
+func main() {
+ var i localI
+
+ i = new(localT)
+ if i.m() != "main.localT.m" {
+ println("BUG: localT:", i.m(), "called")
+ }
+
+ i = new(myT1)
+ if i.m() != "main.localT.m" {
+ println("BUG: myT1:", i.m(), "called")
+ }
+
+ i = new(myT2)
+ if i.m() != "main.localT.m" {
+ println("BUG: myT2:", i.m(), "called")
+ }
+
+ t3 := new(myT3)
+ if t3.m() != "main.localT.m" {
+ println("BUG: t3:", t3.m(), "called")
+ }
+
+ i = new(myT3)
+ if i.m() != "main.localT.m" {
+ t := reflect.TypeOf(i)
+ n := t.NumMethod()
+ for j := 0; j < n; j++ {
+ m := t.Method(j)
+ fmt.Printf("#%d: %s.%s %s\n", j, m.PkgPath, m.Name, m.Type)
+ }
+ println("BUG: myT3:", i.m(), "called")
+ }
+
+ var t4 struct {
+ localT
+ lib.T
+ }
+ if t4.m() != "main.localT.m" {
+ println("BUG: t4:", t4.m(), "called")
+ }
+ i = &t4
+ if i.m() != "main.localT.m" {
+ println("BUG: myT4:", i.m(), "called")
+ }
+
+ var t5 struct {
+ lib.T
+ localT
+ }
+ if t5.m() != "main.localT.m" {
+ println("BUG: t5:", t5.m(), "called")
+ }
+ i = &t5
+ if i.m() != "main.localT.m" {
+ println("BUG: myT5:", i.m(), "called")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug424.go b/gcc/testsuite/go.test/test/fixedbugs/bug424.go
new file mode 100644
index 0000000000..59c2cd35c4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug424.go
@@ -0,0 +1,13 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Tests that method calls through an interface always
+// call the locally defined method localT.m independent
+// at which embedding level it is and in which order
+// embedding is done.
+
+package ignored
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug425.go b/gcc/testsuite/go.test/test/fixedbugs/bug425.go
new file mode 100644
index 0000000000..5546bd96ba
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug425.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// http://code.google.com/p/go/issues/detail?id=3119
+
+package main
+
+import "fmt"
+
+func main() {
+ s := "hello"
+ fmt.Println(s == "")
+ fmt.Println(s + "world" == "world")
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug426.go b/gcc/testsuite/go.test/test/fixedbugs/bug426.go
new file mode 100644
index 0000000000..a1af3cf997
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug426.go
@@ -0,0 +1,15 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo crashed compiling this.
+
+package p
+
+type T *T
+
+func f(t T) {
+ println(t, *t)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug427.go b/gcc/testsuite/go.test/test/fixedbugs/bug427.go
new file mode 100644
index 0000000000..1239e7a332
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug427.go
@@ -0,0 +1,39 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// http://code.google.com/p/go/issues/detail?id=3351
+
+package main
+
+// struct with four fields of basic type
+type S struct {a, b, c, d int}
+
+// struct with five fields of basic type
+type T struct {a, b, c, d, e int}
+
+// array with four elements
+type A [4]int
+
+// array with five elements
+type B [5]int
+
+func main() {
+ var i interface{}
+
+ var s1, s2 S
+ i = s1 == s2
+
+ var t1, t2 T
+ i = t1 == t2
+
+ var a1, a2 A
+ i = a1 == a2
+
+ var b1, b2 B
+ i = b1 == b2
+
+ _ = i
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug428.go b/gcc/testsuite/go.test/test/fixedbugs/bug428.go
new file mode 100644
index 0000000000..298c455183
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug428.go
@@ -0,0 +1,19 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that when the compiler expands append inline it does not
+// overwrite a value before it needs it (issue 3369).
+
+package main
+
+func main() {
+ s := make([]byte, 5, 6)
+ copy(s, "12346")
+ s = append(s[:len(s)-1], '5', s[len(s)-1])
+ if string(s) != "123456" {
+ panic(s)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug429.go b/gcc/testsuite/go.test/test/fixedbugs/bug429.go
new file mode 100644
index 0000000000..794d293db2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug429.go
@@ -0,0 +1,16 @@
+// $G $D/$F.go && $L $F.$A && ! ./$A.out || echo BUG: bug429
+
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Should print deadlock message, not hang.
+
+package main
+
+func main() {
+ select {}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug430.go b/gcc/testsuite/go.test/test/fixedbugs/bug430.go
new file mode 100644
index 0000000000..93d5cf2d5b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug430.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo crashed compiling this.
+
+package main
+
+type S struct {
+ f [2][]int
+}
+
+func F() (r [2][]int) {
+ return
+}
+
+func main() {
+ var a []S
+ a[0].f = F()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug431.go b/gcc/testsuite/go.test/test/fixedbugs/bug431.go
new file mode 100644
index 0000000000..1057dadcc2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug431.go
@@ -0,0 +1,18 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo gave an invalid error ("floating point constant truncated to
+// integer") compiling this.
+
+package p
+
+const C = 1<<63 - 1
+
+func F(i int64) int64 {
+ return i
+}
+
+var V = F(int64(C) / 1e6)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug432.go b/gcc/testsuite/go.test/test/fixedbugs/bug432.go
new file mode 100644
index 0000000000..0c1a914610
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug432.go
@@ -0,0 +1,13 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// gccgo crashed compiling this.
+
+package p
+
+var v struct{ I }
+
+type I interface{}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug433.go b/gcc/testsuite/go.test/test/fixedbugs/bug433.go
new file mode 100644
index 0000000000..1139dfa008
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug433.go
@@ -0,0 +1,39 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that initializing struct fields out of order still runs
+// functions in the right order. This failed with gccgo.
+
+package main
+
+type S struct {
+ i1, i2, i3 int
+}
+
+var G int
+
+func v(i int) int {
+ if i != G {
+ panic(i)
+ }
+ G = i + 1
+ return G
+}
+
+func F() S {
+ return S{
+ i1: v(0),
+ i3: v(1),
+ i2: v(2),
+ }
+}
+
+func main() {
+ s := F()
+ if s != (S{1, 3, 2}) {
+ panic(s)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug434.go b/gcc/testsuite/go.test/test/fixedbugs/bug434.go
new file mode 100644
index 0000000000..5abb567b43
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug434.go
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that typed and untyped negative zero floating point constants
+// are treated as equivalent to zero constants.
+
+package main
+
+import "math"
+
+const zero = 0.0
+
+func main() {
+ x := -zero
+ b := math.Float64bits(x)
+ if b != 0 {
+ panic(b)
+ }
+ x = -float64(zero)
+ b = math.Float64bits(x)
+ if b != 0 {
+ panic(b)
+ }
+ v := x
+ b = math.Float64bits(-v)
+ if b != 0x8000000000000000 {
+ panic(b)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug435.go b/gcc/testsuite/go.test/test/fixedbugs/bug435.go
new file mode 100644
index 0000000000..45323d8eed
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug435.go
@@ -0,0 +1,15 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that a syntax error caused by an unexpected EOF
+// gives an error message with the correct line number.
+//
+// https://code.google.com/p/go/issues/detail?id=3392
+
+package main
+
+func foo() {
+ bar(1, // ERROR "unexpected|missing|undefined" \ No newline at end of file
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug436.go b/gcc/testsuite/go.test/test/fixedbugs/bug436.go
new file mode 100644
index 0000000000..e848eaeba2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug436.go
@@ -0,0 +1,32 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Gccgo used to crash compiling this.
+
+package main
+
+func foo() (int, int) {
+ return 1, 2
+}
+
+var c = b
+var a, b = foo()
+var d = b + 1
+
+func main() {
+ if a != 1 {
+ panic(a)
+ }
+ if b != 2 {
+ panic(b)
+ }
+ if c != 2 {
+ panic(c)
+ }
+ if d != 3 {
+ panic(d)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/one.go
new file mode 100644
index 0000000000..8d3caadae1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/one.go
@@ -0,0 +1,18 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+type I1 interface {
+ f()
+}
+
+type S1 struct {
+}
+
+func (s S1) f() {
+}
+
+func F1(i1 I1) {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/two.go
new file mode 100644
index 0000000000..406dd5903e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/two.go
@@ -0,0 +1,11 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package two
+
+import "./one"
+
+type S2 struct {
+ one.S1
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/x.go b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/x.go
new file mode 100644
index 0000000000..364d017afa
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug437.dir/x.go
@@ -0,0 +1,25 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test converting a type defined in a different package to an
+// interface defined in a third package, where the interface has a
+// hidden method. This used to cause a link error with gccgo.
+
+package main
+
+import (
+ "./one"
+ "./two"
+)
+
+func F(i1 one.I1) {
+ switch v := i1.(type) {
+ case two.S2:
+ one.F1(v)
+ }
+}
+
+func main() {
+ F(nil)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug437.go b/gcc/testsuite/go.test/test/fixedbugs/bug437.go
new file mode 100644
index 0000000000..5c4a2ad0dc
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug437.go
@@ -0,0 +1,11 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test converting a type defined in a different package to an
+// interface defined in a third package, where the interface has a
+// hidden method. This used to cause a link error with gccgo.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug438.go b/gcc/testsuite/go.test/test/fixedbugs/bug438.go
new file mode 100644
index 0000000000..15d3fdab89
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug438.go
@@ -0,0 +1,16 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Gccgo used to incorrectly give an error when compiling this.
+
+package p
+
+func F() (i int) {
+ for first := true; first; first = false {
+ i++
+ }
+ return
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug439.go b/gcc/testsuite/go.test/test/fixedbugs/bug439.go
new file mode 100644
index 0000000000..87d4ae0373
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug439.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Gccgo used to crash compiling this.
+
+package p
+
+type E int
+
+func (e E) P() *E { return &e }
+
+const (
+ C1 E = 0
+ C2 = C1
+)
+
+func F() *E {
+ return C2.P()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug440_32.go b/gcc/testsuite/go.test/test/fixedbugs/bug440_32.go
new file mode 100644
index 0000000000..2d26fbb90a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug440_32.go
@@ -0,0 +1,21 @@
+// run
+
+// Test for 8g register move bug. The optimizer gets confused
+// about 16- vs 32-bit moves during splitContractIndex.
+
+// Issue 3910.
+
+package main
+
+func main() {
+ const c = 0x12345678
+ index, n, offset := splitContractIndex(c)
+ if index != int((c&0xffff)>>5) || n != int(c&(1<<5-1)) || offset != (c>>16)&(1<<14-1) {
+ println("BUG", index, n, offset)
+ }
+}
+
+func splitContractIndex(ce uint32) (index, n, offset int) {
+ h := uint16(ce)
+ return int(h >> 5), int(h & (1<<5 - 1)), int(ce>>16) & (1<<14 - 1)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug440_64.go b/gcc/testsuite/go.test/test/fixedbugs/bug440_64.go
new file mode 100644
index 0000000000..3ab3e565da
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug440_64.go
@@ -0,0 +1,21 @@
+// run
+
+// Test for 6g register move bug. The optimizer gets confused
+// about 32- vs 64-bit moves during splitContractIndex.
+
+// Issue 3918.
+
+package main
+
+func main() {
+ const c = 0x123400005678
+ index, offset := splitContractIndex(c)
+ if index != (c&0xffffffff)>>5 || offset != c+1 {
+ println("BUG", index, offset)
+ }
+}
+
+func splitContractIndex(ce uint64) (index uint32, offset uint64) {
+ h := uint32(ce)
+ return h >> 5, ce + 1
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug441.go b/gcc/testsuite/go.test/test/fixedbugs/bug441.go
new file mode 100644
index 0000000000..8562bfeef8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug441.go
@@ -0,0 +1,36 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Was discarding function calls made for arguments named _
+// in inlined functions. Issue 3593.
+
+package main
+
+var did int
+
+func main() {
+ foo(side())
+ foo2(side(), side())
+ foo3(side(), side())
+ T.m1(T(side()))
+ T(1).m2(side())
+ const want = 7
+ if did != want {
+ println("BUG: missing", want-did, "calls")
+ }
+}
+
+func foo(_ int) {}
+func foo2(_, _ int) {}
+func foo3(int, int) {}
+type T int
+func (_ T) m1() {}
+func (t T) m2(_ int) {}
+
+func side() int {
+ did++
+ return 1
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug442.go b/gcc/testsuite/go.test/test/fixedbugs/bug442.go
new file mode 100644
index 0000000000..1d1a948161
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug442.go
@@ -0,0 +1,27 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to crash generating hash and == functions for struct
+// with leading _ field. Issue 3607.
+
+package main
+
+type T struct {
+ _ int
+ X interface{}
+ _ string
+ Y float64
+}
+
+func main() {
+ m := map[T]int{}
+ m[T{X: 1, Y: 2}] = 1
+ m[T{X: 2, Y: 3}] = 2
+ m[T{X: 1, Y: 2}] = 3 // overwrites first entry
+ if len(m) != 2 {
+ println("BUG")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug443.go b/gcc/testsuite/go.test/test/fixedbugs/bug443.go
new file mode 100644
index 0000000000..b67bd8cb87
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug443.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Was failing to compile with 'invalid receiver' due to
+// incomplete type definition evaluation. Issue 3709.
+
+package p
+
+type T1 struct { F *T2 }
+type T2 T1
+
+type T3 T2
+func (*T3) M() // was invalid receiver
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug444.go b/gcc/testsuite/go.test/test/fixedbugs/bug444.go
new file mode 100644
index 0000000000..b54fb4f581
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug444.go
@@ -0,0 +1,36 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The no-op conversion here used to confuse the compiler
+// into doing a load-effective-address of nil.
+// See issue 3670.
+
+package main
+
+import "reflect"
+
+type T interface {}
+
+var x bool
+
+func main() {
+ reflect.TypeOf(nil)
+ reflect.TypeOf(T(nil)) // used to miscompile
+ shouldPanic()
+}
+
+func f() byte {
+ return []byte(nil)[0] // used to miscompile
+}
+
+func shouldPanic() {
+ defer func() {
+ if recover() == nil {
+ panic("not panicking")
+ }
+ }()
+ f()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug445.go b/gcc/testsuite/go.test/test/fixedbugs/bug445.go
new file mode 100644
index 0000000000..497ecd3aba
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug445.go
@@ -0,0 +1,14 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3765
+
+package main
+
+func f(x uint) uint {
+ m := ^(1 << x)
+ return uint(m)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug446.go b/gcc/testsuite/go.test/test/fixedbugs/bug446.go
new file mode 100644
index 0000000000..1e435e1109
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug446.go
@@ -0,0 +1,36 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3824.
+// Method calls are ignored when deciding initialization
+// order.
+
+package main
+
+type T int
+
+func (r T) Method1() int { return a }
+func (r T) Method2() int { return b }
+
+// dummy1 and dummy2 must be initialized after a and b.
+var dummy1 = T(0).Method1()
+var dummy2 = T.Method2(0)
+
+// Use a function call to force generating code.
+var a = identity(1)
+var b = identity(2)
+
+func identity(a int) int { return a }
+
+func main() {
+ if dummy1 != 1 {
+ panic("dummy1 != 1")
+ }
+ if dummy2 != 2 {
+ panic("dummy2 != 2")
+ }
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug447.go b/gcc/testsuite/go.test/test/fixedbugs/bug447.go
new file mode 100644
index 0000000000..a4c871bdbf
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug447.go
@@ -0,0 +1,105 @@
+// runoutput
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3804
+// test all possible float -> integer conversions
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "strings"
+)
+
+var (
+ intWidths = []int{8, 16, 32, 64} // int%d and uint%d
+ floatWidths = []int{32, 64} // float%d
+)
+
+func main() {
+
+ var names, funcs bytes.Buffer
+
+ for _, iWidth := range intWidths {
+ for _, typ := range []string{"int", "uint"} {
+ var segs bytes.Buffer
+ itype := fmt.Sprintf("%s%d", typ, iWidth)
+ names.WriteString("\ttest" + itype + ",\n")
+ for _, fWidth := range floatWidths {
+ ftype := fmt.Sprintf("float%d", fWidth)
+ seg := strings.Replace(testSegment, "$F", ftype, -1)
+ seg = strings.Replace(seg, "$I", itype, -1)
+ segs.WriteString(seg)
+ }
+ body := strings.Replace(testFunc, "$I", itype, -1)
+ if typ[0] == 'u' {
+ body = strings.Replace(body, "$TEST", " || i < 0", 1)
+ } else {
+ body = strings.Replace(body, "$TEST", "", 1)
+ }
+ body = strings.Replace(body, "$TESTSEGMENTS", segs.String(), 1)
+ funcs.WriteString(body)
+ }
+ }
+
+ program = strings.Replace(program, "$NAMES", names.String(), 1)
+ program = strings.Replace(program, "$FUNCS", funcs.String(), 1)
+ fmt.Print(program)
+}
+
+const testSegment = `
+ f$F := $F(f)
+ if math.Abs(float64(f$F) - f) < 0.05 {
+ if v := $I(f$F); v != $I(i) {
+ fmt.Printf("$I($F(%f)) = %v, expected %v\n", f, v, i)
+ }
+ }`
+
+const testFunc =
+`func test$I(f float64, i int64) {
+ if i != int64($I(i))$TEST {
+ return
+ }
+$TESTSEGMENTS
+}
+`
+
+var program =
+`package main
+
+import (
+ "fmt"
+ "math"
+)
+
+var tests = []struct {
+ f float64
+ i int64
+}{
+ {39.7, 39},
+ {-39.7, -39},
+ {258.6, 258},
+ {-258.6, -258},
+ {65538.9, 65538},
+ {-65538.9, -65538},
+ {4294967298.8, 4294967298},
+ {-4294967298.8, -4294967298},
+}
+
+var funcs = []func(float64, int64){
+$NAMES
+}
+
+$FUNCS
+func main() {
+ for _, t := range tests {
+ for _, f := range funcs {
+ f(t.f, t.i)
+ }
+ }
+}
+`
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg1.go b/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg1.go
new file mode 100644
index 0000000000..032e5d9de3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg1.go
@@ -0,0 +1,11 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package pkg1
+
+var x = make(chan interface{})
+
+func Do() int {
+ return (<-x).(int)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg2.go b/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg2.go
new file mode 100644
index 0000000000..5c78c7d2f3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug448.dir/pkg2.go
@@ -0,0 +1,14 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3843: inlining bug due to wrong receive operator precedence.
+
+package pkg2
+
+import "./pkg1"
+
+func F() {
+ pkg1.Do()
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug448.go b/gcc/testsuite/go.test/test/fixedbugs/bug448.go
new file mode 100644
index 0000000000..242f5999e8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug448.go
@@ -0,0 +1,7 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug449.go b/gcc/testsuite/go.test/test/fixedbugs/bug449.go
new file mode 100644
index 0000000000..a9650f4c6f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug449.go
@@ -0,0 +1,69 @@
+// runoutput
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3866
+// runtime.equal failed to take padding between arguments and
+// return values into account, so in certain cases gc-generated
+// code will read a random bool from the stack as the result of
+// the comparison.
+// This program generates a lot of equality tests and hopes to
+// catch this.
+// NOTE: this program assumes comparing instance of T and T's
+// underlying []byte will make gc emit calls to runtime.equal,
+// and if gc optimizes this case, then the test will no longer
+// be correct (in the sense that it no longer tests runtime.equal).
+
+package main
+
+import (
+ "bytes"
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+const ntest = 1024
+
+func main() {
+ var decls, calls bytes.Buffer
+
+ for i := 1; i <= ntest; i++ {
+ s := strconv.Itoa(i)
+ decls.WriteString(strings.Replace(decl, "$", s, -1))
+ calls.WriteString(strings.Replace("call(test$)\n\t", "$", s, -1))
+ }
+
+ program = strings.Replace(program, "$DECLS", decls.String(), 1)
+ program = strings.Replace(program, "$CALLS", calls.String(), 1)
+ fmt.Print(program)
+}
+
+var program = `package main
+
+var count int
+
+func call(f func() bool) {
+ if f() {
+ count++
+ }
+}
+
+$DECLS
+
+func main() {
+ $CALLS
+ if count != 0 {
+ println("failed", count, "case(s)")
+ }
+}
+`
+
+const decl = `
+type T$ [$]uint8
+func test$() bool {
+ v := T${1}
+ return v == [$]uint8{2} || v != [$]uint8{1}
+}`
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug450.go b/gcc/testsuite/go.test/test/fixedbugs/bug450.go
new file mode 100644
index 0000000000..3f13de16ce
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug450.go
@@ -0,0 +1,28 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3899: 8g incorrectly thinks a variable is
+// "set but not used" and elides an assignment, causing
+// variables to end up with wrong data.
+//
+// The reason is a miscalculation of variable width.
+
+package main
+
+func bar(f func()) {
+ f()
+}
+
+func foo() {
+ f := func() {}
+ if f == nil {
+ }
+ bar(f)
+}
+
+func main() {
+ foo()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug451.go b/gcc/testsuite/go.test/test/fixedbugs/bug451.go
new file mode 100644
index 0000000000..75ce97490e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug451.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type T x.T // ERROR "undefined|expected package"
+
+// bogus "invalid recursive type"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug452.go b/gcc/testsuite/go.test/test/fixedbugs/bug452.go
new file mode 100644
index 0000000000..d2e4a0b44a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug452.go
@@ -0,0 +1,38 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3835: 8g tries to optimize arithmetic involving integer
+// constants, but can run out of registers in the process.
+
+package main
+
+var a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z, A, B, C, D, E, F, G int
+
+func foo() int {
+ return a + 1 + b + 2 + c + 3 + d + 4 + e + 5 + f + 6 + g + 7 + h + 8 + i + 9 + j + 10 +
+ k + 1 + l + 2 + m + 3 + n + 4 + o + 5 + p + 6 + q + 7 + r + 8 + s + 9 + t + 10 +
+ u + 1 + v + 2 + w + 3 + x + 4 + y + 5 + z + 6 + A + 7 + B + 8 + C + 9 + D + 10 +
+ E + 1 + F + 2 + G + 3
+}
+
+func bar() int8 {
+ var (
+ W int16
+ X int32
+ Y int32
+ Z int32
+ )
+ return int8(W+int16(X+3)+3) * int8(Y+3+Z*3)
+}
+
+func main() {
+ if foo() == 0 {
+ panic("foo")
+ }
+ if bar() == 0 {
+ panic("bar")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug453.go b/gcc/testsuite/go.test/test/fixedbugs/bug453.go
new file mode 100644
index 0000000000..136abefb7d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug453.go
@@ -0,0 +1,39 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4138: bug in floating-point registers numbering.
+// Makes 6g unable to use more than 11 registers.
+
+package main
+
+func formula() float32 {
+ mA := [1]float32{1.0}
+ det1 := mA[0]
+ det2 := mA[0]
+ det3 := mA[0]
+ det4 := mA[0]
+ det5 := mA[0]
+ det6 := mA[0]
+ det7 := mA[0]
+ det8 := mA[0]
+ det9 := mA[0]
+ det10 := mA[0]
+ det11 := mA[0]
+ det12 := mA[0]
+
+ return det1 + det2*det3 +
+ det4*det5 + det6*det7 +
+ det8*det9 + det10*det11 +
+ det12
+}
+
+func main() {
+ x := formula()
+ if x != 7.0 {
+ println(x, 7.0)
+ panic("x != 7.0")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug454.go b/gcc/testsuite/go.test/test/fixedbugs/bug454.go
new file mode 100644
index 0000000000..a10abba8b2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug454.go
@@ -0,0 +1,21 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4173
+
+package main
+
+func main() {
+ var arr *[10]int
+ s := 0
+ for i, _ := range arr {
+ // used to panic trying to access arr[i]
+ s += i
+ }
+ if s != 45 {
+ println("BUG")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug455.go b/gcc/testsuite/go.test/test/fixedbugs/bug455.go
new file mode 100644
index 0000000000..8e3c7701be
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug455.go
@@ -0,0 +1,54 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4156: out of fixed registers when chaining method calls.
+// Used to happen with 6g.
+
+package main
+
+type test_i interface {
+ Test() test_i
+ Result() bool
+}
+
+type test_t struct {
+}
+
+func newTest() *test_t {
+ return &test_t{}
+}
+
+type testFn func(string) testFn
+
+func main() {
+ test := newTest()
+
+ switch {
+ case test.
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Test().
+ Result():
+ // case worked
+ default:
+ panic("Result returned false unexpectedly")
+ }
+}
+
+func (t *test_t) Test() test_i {
+ return t
+}
+
+func (t *test_t) Result() bool {
+ return true
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug456.go b/gcc/testsuite/go.test/test/fixedbugs/bug456.go
new file mode 100644
index 0000000000..064e1aa028
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug456.go
@@ -0,0 +1,26 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3907: out of fixed registers in nested byte multiply.
+// Used to happen with both 6g and 8g.
+
+package main
+
+func F(a, b, c, d uint8) uint8 {
+ return a * (b * (c * (d *
+ (a * (b * (c * (d *
+ (a * (b * (c * (d *
+ a * (b * (c * d)))))))))))))
+}
+
+func main() {
+ var a, b, c, d uint8 = 1, 1, 1, 1
+ x := F(a, b, c, d)
+ if x != 1 {
+ println(x)
+ panic("x != 1")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug457.go b/gcc/testsuite/go.test/test/fixedbugs/bug457.go
new file mode 100644
index 0000000000..ee7048972a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug457.go
@@ -0,0 +1,15 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4197: growing a slice of zero-width elements
+// panics on a division by zero.
+
+package main
+
+func main() {
+ var x []struct{}
+ x = append(x, struct{}{})
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug458.go b/gcc/testsuite/go.test/test/fixedbugs/bug458.go
new file mode 100644
index 0000000000..ddc97bdb0c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug458.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4200: 6g crashes when a type is larger than 4GB.
+
+package main
+
+import "unsafe"
+
+// N=16 on 32-bit arches, 256 on 64-bit arches.
+// On 32-bit arches we don't want to test types
+// that are over 4GB large.
+const N = 1 << unsafe.Sizeof(uintptr(0))
+
+type T [N][10][10][10][10][3]byte
+
+func F(t *T) byte {
+ return t[0][0][0][0][0][0]
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug459.go b/gcc/testsuite/go.test/test/fixedbugs/bug459.go
new file mode 100644
index 0000000000..014f2ef01f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug459.go
@@ -0,0 +1,35 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3890: missing detection of init loop involving
+// method calls in function bodies.
+
+package flag
+
+var commandLine = NewFlagSet() // ERROR "loop|depends upon itself"
+
+type FlagSet struct {
+}
+
+func (f *FlagSet) failf(format string, a ...interface{}) {
+ f.usage()
+}
+
+func (f *FlagSet) usage() {
+ if f == commandLine {
+ panic(3)
+ }
+}
+
+func NewFlagSet() *FlagSet {
+ f := &FlagSet{}
+ f.setErrorHandling(true)
+ return f
+}
+
+func (f *FlagSet) setErrorHandling(b bool) {
+ f.failf("DIE")
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/a.go
new file mode 100644
index 0000000000..29049d9aae
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/a.go
@@ -0,0 +1,13 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type Foo struct {
+ int
+ int8
+ error
+ rune
+ byte
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/b.go
new file mode 100644
index 0000000000..5c0a0c47e3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug460.dir/b.go
@@ -0,0 +1,17 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+var x a.Foo
+
+func main() {
+ x.int = 20 // ERROR "unexported field"
+ x.int8 = 20 // ERROR "unexported field"
+ x.error = nil // ERROR "unexported field"
+ x.rune = 'a' // ERROR "unexported field"
+ x.byte = 20 // ERROR "unexported field"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug460.go b/gcc/testsuite/go.test/test/fixedbugs/bug460.go
new file mode 100644
index 0000000000..79234a3b96
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug460.go
@@ -0,0 +1,10 @@
+// errorcheckdir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// part one of issue 4124. Make sure that the compiler rejects access attempts.
+
+package ignored
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug461.go b/gcc/testsuite/go.test/test/fixedbugs/bug461.go
new file mode 100644
index 0000000000..f0f7b0e69b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug461.go
@@ -0,0 +1,23 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// part two of issue 4124. Make sure reflect doesn't mark the field as exported.
+
+package main
+
+import "reflect"
+
+var T struct {
+ int
+}
+
+func main() {
+ v := reflect.ValueOf(&T)
+ v = v.Elem().Field(0)
+ if v.CanSet() {
+ panic("int should be unexported")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug462.go b/gcc/testsuite/go.test/test/fixedbugs/bug462.go
new file mode 100644
index 0000000000..1a23ad064d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug462.go
@@ -0,0 +1,19 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "os"
+
+type T struct {
+ File int
+}
+
+func main() {
+ _ = T {
+ os.File: 1, // ERROR "unknown T? ?field"
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug463.go b/gcc/testsuite/go.test/test/fixedbugs/bug463.go
new file mode 100644
index 0000000000..3e7a184827
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug463.go
@@ -0,0 +1,22 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3757: unhelpful typechecking loop message
+// for constants that refer to themselves.
+
+package main
+
+const a = a // ERROR "refers to itself|definition loop"
+
+const (
+ X = A
+ A = B // ERROR "refers to itself|definition loop"
+ B = D
+ C, D = 1, A
+)
+
+func main() {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug464.go b/gcc/testsuite/go.test/test/fixedbugs/bug464.go
new file mode 100644
index 0000000000..582193997a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug464.go
@@ -0,0 +1,12 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3937: unhelpful typechecking loop message
+// for identifiers wrongly used as types.
+
+package main
+
+func foo(x foo) {} // ERROR "expected type|not a type"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/a.go
new file mode 100644
index 0000000000..a9a8614bb3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/a.go
@@ -0,0 +1,76 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type T struct{ A, B int }
+
+type A []int
+
+type M map[int]int
+
+func F1() int {
+ if (T{1, 2}) == (T{3, 4}) {
+ return 1
+ }
+ return 0
+}
+
+func F2() int {
+ if (M{1: 2}) == nil {
+ return 1
+ }
+ return 0
+}
+
+func F3() int {
+ if nil == (A{}) {
+ return 1
+ }
+ return 0
+}
+
+func F4() int {
+ if a := (A{}); a == nil {
+ return 1
+ }
+ return 0
+}
+
+func F5() int {
+ for k, v := range (M{1: 2}) {
+ return v - k
+ }
+ return 0
+}
+
+func F6() int {
+ switch a := (T{1, 1}); a == (T{1, 2}) {
+ default:
+ return 1
+ }
+ return 0
+}
+
+func F7() int {
+ for m := (M{}); len(m) < (T{1, 2}).A; m[1] = (A{1})[0] {
+ return 1
+ }
+ return 0
+}
+
+func F8() int {
+ if a := (&T{1, 1}); a != nil {
+ return 1
+ }
+ return 0
+}
+
+func F9() int {
+ var a *T
+ if a = (&T{1, 1}); a != nil {
+ return 1
+ }
+ return 0
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/b.go
new file mode 100644
index 0000000000..c84c6836d6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug465.dir/b.go
@@ -0,0 +1,17 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func main() {
+ for _, f := range []func() int{
+ a.F1, a.F2, a.F3, a.F4,
+ a.F5, a.F6, a.F7, a.F8, a.F9} {
+ if f() > 1 {
+ panic("f() > 1")
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug465.go b/gcc/testsuite/go.test/test/fixedbugs/bug465.go
new file mode 100644
index 0000000000..a6ef5876ab
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug465.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4230: inlining bug for composite literal in
+// if, for, switch statements.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/a.go
new file mode 100644
index 0000000000..b9de63edab
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/a.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+const N = 2+3i
+
+func Func() []complex128 {
+ return []complex128{1, complex(2, 3), complex(4, 5)}
+}
+
+func Mul(z complex128) complex128 {
+ return z * (3 + 4i)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/b.go
new file mode 100644
index 0000000000..82d66eacef
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug466.dir/b.go
@@ -0,0 +1,30 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func main() {
+ s := a.Func()
+ if s[0] != 1 {
+ println(s[0])
+ panic("s[0] != 1")
+ }
+ if s[1] != 2+3i {
+ println(s[1])
+ panic("s[1] != 2+3i")
+ }
+ if s[2] != 4+5i {
+ println(s[2])
+ panic("s[2] != 4+5i")
+ }
+
+ x := 1 + 2i
+ y := a.Mul(x)
+ if y != (1+2i)*(3+4i) {
+ println(y)
+ panic("y != (1+2i)*(3+4i)")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug466.go b/gcc/testsuite/go.test/test/fixedbugs/bug466.go
new file mode 100644
index 0000000000..6b65b33b0a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug466.go
@@ -0,0 +1,11 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4159: exported inlinable functions squash
+// complex literals "a+bi" to "a+b".
+
+package ignored
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p1.go
new file mode 100644
index 0000000000..538b554f8e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p1.go
@@ -0,0 +1,5 @@
+package p1
+
+type SockaddrUnix int
+
+func (s SockaddrUnix) Error() string { return "blah" }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p2.go b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p2.go
new file mode 100644
index 0000000000..d80d3a30b1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p2.go
@@ -0,0 +1,5 @@
+package p2
+
+import "./p1"
+
+func SockUnix() error { var s *p1.SockaddrUnix; return s }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p3.go b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p3.go
new file mode 100644
index 0000000000..c795646472
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug467.dir/p3.go
@@ -0,0 +1,7 @@
+package main
+
+import "./p2"
+
+func main() {
+ _ = p2.SockUnix()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug467.go b/gcc/testsuite/go.test/test/fixedbugs/bug467.go
new file mode 100644
index 0000000000..d73adbadff
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug467.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Exported data for inlining could forget types of
+// local variables declared in inlinable bodies.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p1.go
new file mode 100644
index 0000000000..ca175770fc
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p1.go
@@ -0,0 +1,7 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+type S struct { X, Y int }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p2.go b/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p2.go
new file mode 100644
index 0000000000..1793c0e534
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug468.dir/p2.go
@@ -0,0 +1,25 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "reflect"
+
+ "./p1"
+)
+
+func main() {
+ var v1 = p1.S{1, 2}
+ var v2 = struct { X, Y int }{1, 2}
+ v1 = v2
+ t1 := reflect.TypeOf(v1)
+ t2 := reflect.TypeOf(v2)
+ if !t1.AssignableTo(t2) {
+ panic(0)
+ }
+ if !t2.AssignableTo(t1) {
+ panic(1)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug468.go b/gcc/testsuite/go.test/test/fixedbugs/bug468.go
new file mode 100644
index 0000000000..12e4997d36
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug468.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The reflect package was not correctly checking field names
+// when checking for struct assignability.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug470.go b/gcc/testsuite/go.test/test/fixedbugs/bug470.go
new file mode 100644
index 0000000000..0a359184c6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug470.go
@@ -0,0 +1,26 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Converting constants between types must introduce rounding.
+
+package main
+
+import "fmt"
+
+const (
+ F32 = 0.00999999977648258209228515625
+ F64 = 0.01000000000000000020816681711721685132943093776702880859375
+)
+
+var F = float64(float32(0.01))
+
+func main() {
+ // 0.01 rounded to float32 then to float64 is F32.
+ // 0.01 represented directly in float64 is F64.
+ if F != F32 {
+ panic(fmt.Sprintf("F=%.1000g, want %.1000g", F, F32))
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug471.go b/gcc/testsuite/go.test/test/fixedbugs/bug471.go
new file mode 100644
index 0000000000..e4542596e9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug471.go
@@ -0,0 +1,18 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Caused an internal compiler error in gccgo.
+
+package p
+
+type C chan struct{}
+
+func (c C) F() {
+ select {
+ case c <- struct{}{}:
+ default:
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p1.go
new file mode 100644
index 0000000000..9d47fd84a7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p1.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+import "runtime"
+
+func E() func() int { return runtime.NumCPU }
+
+func F() func() { return runtime.Gosched }
+
+func G() func() string { return runtime.GOROOT }
+
+func H() func() { return runtime.GC }
+
+func I() func() string { return runtime.Version }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p2.go b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p2.go
new file mode 100644
index 0000000000..34a3f0487a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/p2.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p2
+
+import "runtime"
+
+func E() func() int { return runtime.NumCPU }
+
+func F() func() { return runtime.GC }
+
+func G() func() string { return runtime.GOROOT }
+
+func H() func() { return runtime.Gosched }
+
+func I() func() string { return runtime.Version }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/z.go b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/z.go
new file mode 100644
index 0000000000..6c29dd08c6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug472.dir/z.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ _ "./p1"
+ _ "./p2"
+)
+
+func main() {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug472.go b/gcc/testsuite/go.test/test/fixedbugs/bug472.go
new file mode 100644
index 0000000000..c79c64ca1f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug472.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Linker would incorrectly parse export data and think
+// definitions are inconsistent.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug473.go b/gcc/testsuite/go.test/test/fixedbugs/bug473.go
new file mode 100644
index 0000000000..49ce7d7379
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug473.go
@@ -0,0 +1,69 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to be miscompiled by gccgo, due to a bug in handling
+// initialization ordering.
+
+package main
+
+func F(a ...interface{}) interface{} {
+ s := 0
+ for _, v := range a {
+ s += v.(int)
+ }
+ return s
+}
+
+var V1 = F(V10, V4, V3, V11)
+
+var V2 = F(V1)
+
+var V3 = F(1)
+
+var V4 = F(2)
+
+var V5 = F(3)
+
+var V6 = F(4)
+
+var V7 = F(5)
+
+var V8 = F(V14, V7, V3, V6, V5)
+
+var V9 = F(V4, F(V12))
+
+var V10 = F(V4, V9)
+
+var V11 = F(6)
+
+var V12 = F(V5, V3, V8)
+
+var V13 = F(7)
+
+var V14 = F(8)
+
+func expect(name string, a interface{}, b int) {
+ if a.(int) != b {
+ panic(name)
+ }
+}
+
+func main() {
+ expect("V1", V1, 38)
+ expect("V2", V2, 38)
+ expect("V3", V3, 1)
+ expect("V4", V4, 2)
+ expect("V5", V5, 3)
+ expect("V6", V6, 4)
+ expect("V7", V7, 5)
+ expect("V8", V8, 21)
+ expect("V9", V9, 27)
+ expect("V10", V10, 29)
+ expect("V11", V11, 6)
+ expect("V12", V12, 25)
+ expect("V13", V13, 7)
+ expect("V14", V14, 8)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug474.go b/gcc/testsuite/go.test/test/fixedbugs/bug474.go
new file mode 100644
index 0000000000..b8264872a9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug474.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Bug in method values: escape analysis was off.
+
+package main
+
+import "sync"
+
+var called = false
+
+type T struct {
+ once sync.Once
+}
+
+func (t *T) M() {
+ called = true
+}
+
+func main() {
+ var t T
+ t.once.Do(t.M)
+ if !called {
+ panic("not called")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug475.go b/gcc/testsuite/go.test/test/fixedbugs/bug475.go
new file mode 100644
index 0000000000..1bd6fa35ce
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug475.go
@@ -0,0 +1,22 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Variable in enclosing function with same name as field in struct
+// composite literal confused gccgo.
+
+package p
+
+type s1 struct {
+ f *s1
+}
+
+func F() {
+ var f *s1
+ _ = func() {
+ _ = s1{f: nil}
+ }
+ _ = f
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug476.go b/gcc/testsuite/go.test/test/fixedbugs/bug476.go
new file mode 100644
index 0000000000..4ea2174048
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug476.go
@@ -0,0 +1,23 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Logical operation on named boolean type returns the same type,
+// supporting an implicit convertion to an interface type. This used
+// to crash gccgo.
+
+package p
+
+type B bool
+
+func (b B) M() {}
+
+type I interface {
+ M()
+}
+
+func F(a, b B) I {
+ return a && b
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug477.go b/gcc/testsuite/go.test/test/fixedbugs/bug477.go
new file mode 100644
index 0000000000..86289afa6d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug477.go
@@ -0,0 +1,34 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test multiple identical unnamed structs with methods. This caused
+// a compilation error with gccgo.
+
+package p
+
+type S1 struct{}
+
+func (s S1) M() {}
+
+type S2 struct {
+ F1 struct {
+ S1
+ }
+ F2 struct {
+ S1
+ }
+}
+
+type I interface {
+ M()
+}
+
+func F() {
+ var s2 S2
+ var i1 I = s2.F1
+ var i2 I = s2.F2
+ _, _ = i1, i2
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/a.go
new file mode 100644
index 0000000000..a40e454f9b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/a.go
@@ -0,0 +1,9 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+type S1 struct{}
+
+func (s S1) f() {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/b.go
new file mode 100644
index 0000000000..c0fdf1127b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug478.dir/b.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p2
+
+import "./a"
+
+type S2 struct {
+ p1.S1
+}
+
+func (s S2) f() {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug478.go b/gcc/testsuite/go.test/test/fixedbugs/bug478.go
new file mode 100644
index 0000000000..5e339e801d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug478.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Using the same unexported name for a method as a method on an
+// imported embedded type caused a gccgo compilation failure.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/a.go
new file mode 100644
index 0000000000..5ff3bef1d1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/a.go
@@ -0,0 +1,15 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import "unsafe"
+
+type S2 struct {}
+
+const C = unsafe.Sizeof(S2{})
+
+type S1 struct {
+ S2
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/b.go
new file mode 100644
index 0000000000..a1b27b3326
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug479.dir/b.go
@@ -0,0 +1,16 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+type S3 struct {
+ p.S1
+}
+
+func main() {
+ var i interface{} = S3{}
+ _ = i
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug479.go b/gcc/testsuite/go.test/test/fixedbugs/bug479.go
new file mode 100644
index 0000000000..f8a0f93c73
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug479.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Gccgo was not consistent in deciding how to compare a struct type
+// for equality, leading to an undefined symbol at link time.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/a.go
new file mode 100644
index 0000000000..6dff51586b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/a.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type S interface{
+ F() T
+}
+
+type T struct {
+ S
+}
+
+type U struct {
+ error
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/b.go
new file mode 100644
index 0000000000..620736540a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug480.dir/b.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+var t a.T
+
+func F() error {
+ return a.U{}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug480.go b/gcc/testsuite/go.test/test/fixedbugs/bug480.go
new file mode 100644
index 0000000000..5b44af4308
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug480.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Gccgo mishandled an import of a forward declared type.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug481.go b/gcc/testsuite/go.test/test/fixedbugs/bug481.go
new file mode 100644
index 0000000000..d0922a5a4f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug481.go
@@ -0,0 +1,18 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Returning an index into a conversion from string to slice caused a
+// compilation error when using gccgo.
+
+package p
+
+func F1(s string) byte {
+ return []byte(s)[0]
+}
+
+func F2(s string) rune {
+ return []rune(s)[0]
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug482.go b/gcc/testsuite/go.test/test/fixedbugs/bug482.go
new file mode 100644
index 0000000000..10c48287d3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/bug482.go
@@ -0,0 +1,20 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Using the same name for a field in a composite literal and for a
+// global variable that depends on the variable being initialized
+// caused gccgo to erroneously report "variable initializer refers to
+// itself".
+
+package p
+
+type S struct {
+ F int
+}
+
+var V = S{F: 1}
+
+var F = V.F
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue2615.go b/gcc/testsuite/go.test/test/fixedbugs/issue2615.go
new file mode 100644
index 0000000000..686e1e1ada
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue2615.go
@@ -0,0 +1,547 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 2615: a long chain of else if's causes an overflow
+// in the parser stack.
+
+package main
+
+// test returns the index of the lowest set bit in a 256-bit vector.
+func test(x [4]uint64) int {
+ if x[0]&(1<<0) != 0 {
+ return 0
+ } else if x[0]&(1<<1) != 0 {
+ return 1
+ } else if x[0]&(1<<2) != 0 {
+ return 2
+ } else if x[0]&(1<<3) != 0 {
+ return 3
+ } else if x[0]&(1<<4) != 0 {
+ return 4
+ } else if x[0]&(1<<5) != 0 {
+ return 5
+ } else if x[0]&(1<<6) != 0 {
+ return 6
+ } else if x[0]&(1<<7) != 0 {
+ return 7
+ } else if x[0]&(1<<8) != 0 {
+ return 8
+ } else if x[0]&(1<<9) != 0 {
+ return 9
+ } else if x[0]&(1<<10) != 0 {
+ return 10
+ } else if x[0]&(1<<11) != 0 {
+ return 11
+ } else if x[0]&(1<<12) != 0 {
+ return 12
+ } else if x[0]&(1<<13) != 0 {
+ return 13
+ } else if x[0]&(1<<14) != 0 {
+ return 14
+ } else if x[0]&(1<<15) != 0 {
+ return 15
+ } else if x[0]&(1<<16) != 0 {
+ return 16
+ } else if x[0]&(1<<17) != 0 {
+ return 17
+ } else if x[0]&(1<<18) != 0 {
+ return 18
+ } else if x[0]&(1<<19) != 0 {
+ return 19
+ } else if x[0]&(1<<20) != 0 {
+ return 20
+ } else if x[0]&(1<<21) != 0 {
+ return 21
+ } else if x[0]&(1<<22) != 0 {
+ return 22
+ } else if x[0]&(1<<23) != 0 {
+ return 23
+ } else if x[0]&(1<<24) != 0 {
+ return 24
+ } else if x[0]&(1<<25) != 0 {
+ return 25
+ } else if x[0]&(1<<26) != 0 {
+ return 26
+ } else if x[0]&(1<<27) != 0 {
+ return 27
+ } else if x[0]&(1<<28) != 0 {
+ return 28
+ } else if x[0]&(1<<29) != 0 {
+ return 29
+ } else if x[0]&(1<<30) != 0 {
+ return 30
+ } else if x[0]&(1<<31) != 0 {
+ return 31
+ } else if x[0]&(1<<32) != 0 {
+ return 32
+ } else if x[0]&(1<<33) != 0 {
+ return 33
+ } else if x[0]&(1<<34) != 0 {
+ return 34
+ } else if x[0]&(1<<35) != 0 {
+ return 35
+ } else if x[0]&(1<<36) != 0 {
+ return 36
+ } else if x[0]&(1<<37) != 0 {
+ return 37
+ } else if x[0]&(1<<38) != 0 {
+ return 38
+ } else if x[0]&(1<<39) != 0 {
+ return 39
+ } else if x[0]&(1<<40) != 0 {
+ return 40
+ } else if x[0]&(1<<41) != 0 {
+ return 41
+ } else if x[0]&(1<<42) != 0 {
+ return 42
+ } else if x[0]&(1<<43) != 0 {
+ return 43
+ } else if x[0]&(1<<44) != 0 {
+ return 44
+ } else if x[0]&(1<<45) != 0 {
+ return 45
+ } else if x[0]&(1<<46) != 0 {
+ return 46
+ } else if x[0]&(1<<47) != 0 {
+ return 47
+ } else if x[0]&(1<<48) != 0 {
+ return 48
+ } else if x[0]&(1<<49) != 0 {
+ return 49
+ } else if x[0]&(1<<50) != 0 {
+ return 50
+ } else if x[0]&(1<<51) != 0 {
+ return 51
+ } else if x[0]&(1<<52) != 0 {
+ return 52
+ } else if x[0]&(1<<53) != 0 {
+ return 53
+ } else if x[0]&(1<<54) != 0 {
+ return 54
+ } else if x[0]&(1<<55) != 0 {
+ return 55
+ } else if x[0]&(1<<56) != 0 {
+ return 56
+ } else if x[0]&(1<<57) != 0 {
+ return 57
+ } else if x[0]&(1<<58) != 0 {
+ return 58
+ } else if x[0]&(1<<59) != 0 {
+ return 59
+ } else if x[0]&(1<<60) != 0 {
+ return 60
+ } else if x[0]&(1<<61) != 0 {
+ return 61
+ } else if x[0]&(1<<62) != 0 {
+ return 62
+ } else if x[0]&(1<<63) != 0 {
+ return 63
+ } else if x[1]&(1<<0) != 0 {
+ return 64
+ } else if x[1]&(1<<1) != 0 {
+ return 65
+ } else if x[1]&(1<<2) != 0 {
+ return 66
+ } else if x[1]&(1<<3) != 0 {
+ return 67
+ } else if x[1]&(1<<4) != 0 {
+ return 68
+ } else if x[1]&(1<<5) != 0 {
+ return 69
+ } else if x[1]&(1<<6) != 0 {
+ return 70
+ } else if x[1]&(1<<7) != 0 {
+ return 71
+ } else if x[1]&(1<<8) != 0 {
+ return 72
+ } else if x[1]&(1<<9) != 0 {
+ return 73
+ } else if x[1]&(1<<10) != 0 {
+ return 74
+ } else if x[1]&(1<<11) != 0 {
+ return 75
+ } else if x[1]&(1<<12) != 0 {
+ return 76
+ } else if x[1]&(1<<13) != 0 {
+ return 77
+ } else if x[1]&(1<<14) != 0 {
+ return 78
+ } else if x[1]&(1<<15) != 0 {
+ return 79
+ } else if x[1]&(1<<16) != 0 {
+ return 80
+ } else if x[1]&(1<<17) != 0 {
+ return 81
+ } else if x[1]&(1<<18) != 0 {
+ return 82
+ } else if x[1]&(1<<19) != 0 {
+ return 83
+ } else if x[1]&(1<<20) != 0 {
+ return 84
+ } else if x[1]&(1<<21) != 0 {
+ return 85
+ } else if x[1]&(1<<22) != 0 {
+ return 86
+ } else if x[1]&(1<<23) != 0 {
+ return 87
+ } else if x[1]&(1<<24) != 0 {
+ return 88
+ } else if x[1]&(1<<25) != 0 {
+ return 89
+ } else if x[1]&(1<<26) != 0 {
+ return 90
+ } else if x[1]&(1<<27) != 0 {
+ return 91
+ } else if x[1]&(1<<28) != 0 {
+ return 92
+ } else if x[1]&(1<<29) != 0 {
+ return 93
+ } else if x[1]&(1<<30) != 0 {
+ return 94
+ } else if x[1]&(1<<31) != 0 {
+ return 95
+ } else if x[1]&(1<<32) != 0 {
+ return 96
+ } else if x[1]&(1<<33) != 0 {
+ return 97
+ } else if x[1]&(1<<34) != 0 {
+ return 98
+ } else if x[1]&(1<<35) != 0 {
+ return 99
+ } else if x[1]&(1<<36) != 0 {
+ return 100
+ } else if x[1]&(1<<37) != 0 {
+ return 101
+ } else if x[1]&(1<<38) != 0 {
+ return 102
+ } else if x[1]&(1<<39) != 0 {
+ return 103
+ } else if x[1]&(1<<40) != 0 {
+ return 104
+ } else if x[1]&(1<<41) != 0 {
+ return 105
+ } else if x[1]&(1<<42) != 0 {
+ return 106
+ } else if x[1]&(1<<43) != 0 {
+ return 107
+ } else if x[1]&(1<<44) != 0 {
+ return 108
+ } else if x[1]&(1<<45) != 0 {
+ return 109
+ } else if x[1]&(1<<46) != 0 {
+ return 110
+ } else if x[1]&(1<<47) != 0 {
+ return 111
+ } else if x[1]&(1<<48) != 0 {
+ return 112
+ } else if x[1]&(1<<49) != 0 {
+ return 113
+ } else if x[1]&(1<<50) != 0 {
+ return 114
+ } else if x[1]&(1<<51) != 0 {
+ return 115
+ } else if x[1]&(1<<52) != 0 {
+ return 116
+ } else if x[1]&(1<<53) != 0 {
+ return 117
+ } else if x[1]&(1<<54) != 0 {
+ return 118
+ } else if x[1]&(1<<55) != 0 {
+ return 119
+ } else if x[1]&(1<<56) != 0 {
+ return 120
+ } else if x[1]&(1<<57) != 0 {
+ return 121
+ } else if x[1]&(1<<58) != 0 {
+ return 122
+ } else if x[1]&(1<<59) != 0 {
+ return 123
+ } else if x[1]&(1<<60) != 0 {
+ return 124
+ } else if x[1]&(1<<61) != 0 {
+ return 125
+ } else if x[1]&(1<<62) != 0 {
+ return 126
+ } else if x[1]&(1<<63) != 0 {
+ return 127
+ } else if x[2]&(1<<0) != 0 {
+ return 128
+ } else if x[2]&(1<<1) != 0 {
+ return 129
+ } else if x[2]&(1<<2) != 0 {
+ return 130
+ } else if x[2]&(1<<3) != 0 {
+ return 131
+ } else if x[2]&(1<<4) != 0 {
+ return 132
+ } else if x[2]&(1<<5) != 0 {
+ return 133
+ } else if x[2]&(1<<6) != 0 {
+ return 134
+ } else if x[2]&(1<<7) != 0 {
+ return 135
+ } else if x[2]&(1<<8) != 0 {
+ return 136
+ } else if x[2]&(1<<9) != 0 {
+ return 137
+ } else if x[2]&(1<<10) != 0 {
+ return 138
+ } else if x[2]&(1<<11) != 0 {
+ return 139
+ } else if x[2]&(1<<12) != 0 {
+ return 140
+ } else if x[2]&(1<<13) != 0 {
+ return 141
+ } else if x[2]&(1<<14) != 0 {
+ return 142
+ } else if x[2]&(1<<15) != 0 {
+ return 143
+ } else if x[2]&(1<<16) != 0 {
+ return 144
+ } else if x[2]&(1<<17) != 0 {
+ return 145
+ } else if x[2]&(1<<18) != 0 {
+ return 146
+ } else if x[2]&(1<<19) != 0 {
+ return 147
+ } else if x[2]&(1<<20) != 0 {
+ return 148
+ } else if x[2]&(1<<21) != 0 {
+ return 149
+ } else if x[2]&(1<<22) != 0 {
+ return 150
+ } else if x[2]&(1<<23) != 0 {
+ return 151
+ } else if x[2]&(1<<24) != 0 {
+ return 152
+ } else if x[2]&(1<<25) != 0 {
+ return 153
+ } else if x[2]&(1<<26) != 0 {
+ return 154
+ } else if x[2]&(1<<27) != 0 {
+ return 155
+ } else if x[2]&(1<<28) != 0 {
+ return 156
+ } else if x[2]&(1<<29) != 0 {
+ return 157
+ } else if x[2]&(1<<30) != 0 {
+ return 158
+ } else if x[2]&(1<<31) != 0 {
+ return 159
+ } else if x[2]&(1<<32) != 0 {
+ return 160
+ } else if x[2]&(1<<33) != 0 {
+ return 161
+ } else if x[2]&(1<<34) != 0 {
+ return 162
+ } else if x[2]&(1<<35) != 0 {
+ return 163
+ } else if x[2]&(1<<36) != 0 {
+ return 164
+ } else if x[2]&(1<<37) != 0 {
+ return 165
+ } else if x[2]&(1<<38) != 0 {
+ return 166
+ } else if x[2]&(1<<39) != 0 {
+ return 167
+ } else if x[2]&(1<<40) != 0 {
+ return 168
+ } else if x[2]&(1<<41) != 0 {
+ return 169
+ } else if x[2]&(1<<42) != 0 {
+ return 170
+ } else if x[2]&(1<<43) != 0 {
+ return 171
+ } else if x[2]&(1<<44) != 0 {
+ return 172
+ } else if x[2]&(1<<45) != 0 {
+ return 173
+ } else if x[2]&(1<<46) != 0 {
+ return 174
+ } else if x[2]&(1<<47) != 0 {
+ return 175
+ } else if x[2]&(1<<48) != 0 {
+ return 176
+ } else if x[2]&(1<<49) != 0 {
+ return 177
+ } else if x[2]&(1<<50) != 0 {
+ return 178
+ } else if x[2]&(1<<51) != 0 {
+ return 179
+ } else if x[2]&(1<<52) != 0 {
+ return 180
+ } else if x[2]&(1<<53) != 0 {
+ return 181
+ } else if x[2]&(1<<54) != 0 {
+ return 182
+ } else if x[2]&(1<<55) != 0 {
+ return 183
+ } else if x[2]&(1<<56) != 0 {
+ return 184
+ } else if x[2]&(1<<57) != 0 {
+ return 185
+ } else if x[2]&(1<<58) != 0 {
+ return 186
+ } else if x[2]&(1<<59) != 0 {
+ return 187
+ } else if x[2]&(1<<60) != 0 {
+ return 188
+ } else if x[2]&(1<<61) != 0 {
+ return 189
+ } else if x[2]&(1<<62) != 0 {
+ return 190
+ } else if x[2]&(1<<63) != 0 {
+ return 191
+ } else if x[3]&(1<<0) != 0 {
+ return 192
+ } else if x[3]&(1<<1) != 0 {
+ return 193
+ } else if x[3]&(1<<2) != 0 {
+ return 194
+ } else if x[3]&(1<<3) != 0 {
+ return 195
+ } else if x[3]&(1<<4) != 0 {
+ return 196
+ } else if x[3]&(1<<5) != 0 {
+ return 197
+ } else if x[3]&(1<<6) != 0 {
+ return 198
+ } else if x[3]&(1<<7) != 0 {
+ return 199
+ } else if x[3]&(1<<8) != 0 {
+ return 200
+ } else if x[3]&(1<<9) != 0 {
+ return 201
+ } else if x[3]&(1<<10) != 0 {
+ return 202
+ } else if x[3]&(1<<11) != 0 {
+ return 203
+ } else if x[3]&(1<<12) != 0 {
+ return 204
+ } else if x[3]&(1<<13) != 0 {
+ return 205
+ } else if x[3]&(1<<14) != 0 {
+ return 206
+ } else if x[3]&(1<<15) != 0 {
+ return 207
+ } else if x[3]&(1<<16) != 0 {
+ return 208
+ } else if x[3]&(1<<17) != 0 {
+ return 209
+ } else if x[3]&(1<<18) != 0 {
+ return 210
+ } else if x[3]&(1<<19) != 0 {
+ return 211
+ } else if x[3]&(1<<20) != 0 {
+ return 212
+ } else if x[3]&(1<<21) != 0 {
+ return 213
+ } else if x[3]&(1<<22) != 0 {
+ return 214
+ } else if x[3]&(1<<23) != 0 {
+ return 215
+ } else if x[3]&(1<<24) != 0 {
+ return 216
+ } else if x[3]&(1<<25) != 0 {
+ return 217
+ } else if x[3]&(1<<26) != 0 {
+ return 218
+ } else if x[3]&(1<<27) != 0 {
+ return 219
+ } else if x[3]&(1<<28) != 0 {
+ return 220
+ } else if x[3]&(1<<29) != 0 {
+ return 221
+ } else if x[3]&(1<<30) != 0 {
+ return 222
+ } else if x[3]&(1<<31) != 0 {
+ return 223
+ } else if x[3]&(1<<32) != 0 {
+ return 224
+ } else if x[3]&(1<<33) != 0 {
+ return 225
+ } else if x[3]&(1<<34) != 0 {
+ return 226
+ } else if x[3]&(1<<35) != 0 {
+ return 227
+ } else if x[3]&(1<<36) != 0 {
+ return 228
+ } else if x[3]&(1<<37) != 0 {
+ return 229
+ } else if x[3]&(1<<38) != 0 {
+ return 230
+ } else if x[3]&(1<<39) != 0 {
+ return 231
+ } else if x[3]&(1<<40) != 0 {
+ return 232
+ } else if x[3]&(1<<41) != 0 {
+ return 233
+ } else if x[3]&(1<<42) != 0 {
+ return 234
+ } else if x[3]&(1<<43) != 0 {
+ return 235
+ } else if x[3]&(1<<44) != 0 {
+ return 236
+ } else if x[3]&(1<<45) != 0 {
+ return 237
+ } else if x[3]&(1<<46) != 0 {
+ return 238
+ } else if x[3]&(1<<47) != 0 {
+ return 239
+ } else if x[3]&(1<<48) != 0 {
+ return 240
+ } else if x[3]&(1<<49) != 0 {
+ return 241
+ } else if x[3]&(1<<50) != 0 {
+ return 242
+ } else if x[3]&(1<<51) != 0 {
+ return 243
+ } else if x[3]&(1<<52) != 0 {
+ return 244
+ } else if x[3]&(1<<53) != 0 {
+ return 245
+ } else if x[3]&(1<<54) != 0 {
+ return 246
+ } else if x[3]&(1<<55) != 0 {
+ return 247
+ } else if x[3]&(1<<56) != 0 {
+ return 248
+ } else if x[3]&(1<<57) != 0 {
+ return 249
+ } else if x[3]&(1<<58) != 0 {
+ return 250
+ } else if x[3]&(1<<59) != 0 {
+ return 251
+ } else if x[3]&(1<<60) != 0 {
+ return 252
+ } else if x[3]&(1<<61) != 0 {
+ return 253
+ } else if x[3]&(1<<62) != 0 {
+ return 254
+ } else if x[3]&(1<<63) != 0 {
+ return 255
+ }
+ return -1
+}
+
+func main() {
+ const ones = ^uint64(0)
+ for i := 0; i < 256; i++ {
+ bits := [4]uint64{ones, ones, ones, ones}
+
+ // clear bottom i bits
+ bits[i/64] ^= 1<<(uint(i)&63) - 1
+ for j := i/64 - 1; j >= 0; j-- {
+ bits[j] = 0
+ }
+
+ k := test(bits)
+ if k != i {
+ print("test(bits)=", k, " want ", i, "\n")
+ panic("failed")
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/one.go b/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/one.go
new file mode 100644
index 0000000000..491ada1d9c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/one.go
@@ -0,0 +1,28 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package one
+
+// Issue 3552
+
+type T struct { int }
+
+func (t T) F() int { return t.int }
+
+type U struct { int int }
+
+func (u U) F() int { return u.int }
+
+type lint int
+
+type V struct { lint }
+
+func (v V) F() int { return int(v.lint) }
+
+type W struct { lint lint }
+
+func (w W) F() int { return int(w.lint) }
+
+
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/two.go b/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/two.go
new file mode 100644
index 0000000000..1366d244d3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3552.dir/two.go
@@ -0,0 +1,22 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Use the functions in one.go so that the inlined
+// forms get type-checked.
+
+package two
+
+import "./one"
+
+func use() {
+ var t one.T
+ var u one.U
+ var v one.V
+ var w one.W
+
+ _ = t.F()
+ _ = u.F()
+ _ = v.F()
+ _ = w.F()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3552.go b/gcc/testsuite/go.test/test/fixedbugs/issue3552.go
new file mode 100644
index 0000000000..a198dbe971
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3552.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3552: cross-package inlining misbehaves when
+// referencing embedded builtins.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3705.go b/gcc/testsuite/go.test/test/fixedbugs/issue3705.go
new file mode 100644
index 0000000000..64ef38b10d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3705.go
@@ -0,0 +1,9 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func init() // ERROR "missing function body|cannot declare init"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3783.go b/gcc/testsuite/go.test/test/fixedbugs/issue3783.go
new file mode 100644
index 0000000000..d7a4a2e8f3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3783.go
@@ -0,0 +1,12 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package foo
+
+var i int
+
+func (*i) bar() // ERROR "not a type|expected type"
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3924.go b/gcc/testsuite/go.test/test/fixedbugs/issue3924.go
new file mode 100644
index 0000000000..d4739b21c9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3924.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package foo
+
+type mybool bool
+
+var x, y = 1, 2
+var _ mybool = x < y && x < y // ERROR "cannot use"
+var _ mybool = x < y || x < y // ERROR "cannot use"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue3925.go b/gcc/testsuite/go.test/test/fixedbugs/issue3925.go
new file mode 100644
index 0000000000..a62d4392e6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue3925.go
@@ -0,0 +1,23 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 3925: wrong line number for error message "missing key in map literal"
+
+// also a test for correct line number in other malformed composite literals.
+
+package foo
+
+var _ = map[string]string{
+ "1": "2",
+ "3", "4", // ERROR "missing key|must have keys"
+}
+
+var _ = []string{
+ "foo",
+ "bar",
+ 20, // ERROR "cannot use|incompatible type"
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4066.go b/gcc/testsuite/go.test/test/fixedbugs/issue4066.go
new file mode 100644
index 0000000000..19cfe6651a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4066.go
@@ -0,0 +1,37 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 4066: return values not being spilled eagerly enough
+
+package main
+
+func main() {
+ n := foo()
+ if n != 2 {
+ println(n)
+ panic("wrong return value")
+ }
+}
+
+type terr struct{}
+
+func foo() (val int) {
+ val = 0
+ defer func() {
+ if x := recover(); x != nil {
+ _ = x.(terr)
+ }
+ }()
+ for {
+ val = 2
+ foo1()
+ }
+ panic("unreachable")
+}
+
+func foo1() {
+ panic(terr{})
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4085a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4085a.go
new file mode 100644
index 0000000000..089637d86b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4085a.go
@@ -0,0 +1,18 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type T []int
+
+func main() {
+ _ = make(T, -1) // ERROR "negative"
+ _ = make(T, 0.5) // ERROR "constant 0.5 truncated to integer|non-integer len argument"
+ _ = make(T, 1.0) // ok
+ _ = make(T, 1<<63) // ERROR "len argument too large"
+ _ = make(T, 0, -1) // ERROR "negative cap"
+ _ = make(T, 10, 0) // ERROR "len larger than cap"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go
new file mode 100644
index 0000000000..63aca2378e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4085b.go
@@ -0,0 +1,49 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "strings"
+ "unsafe"
+)
+
+type T []int
+
+func main() {
+ n := -1
+ shouldPanic("len out of range", func() {_ = make(T, n)})
+ shouldPanic("cap out of range", func() {_ = make(T, 0, n)})
+ var t *byte
+ if unsafe.Sizeof(t) == 8 {
+ n = 1<<20
+ n <<= 20
+ shouldPanic("len out of range", func() {_ = make(T, n)})
+ shouldPanic("cap out of range", func() {_ = make(T, 0, n)})
+ n <<= 20
+ shouldPanic("len out of range", func() {_ = make(T, n)})
+ shouldPanic("cap out of range", func() {_ = make(T, 0, n)})
+ } else {
+ n = 1<<31 - 1
+ shouldPanic("len out of range", func() {_ = make(T, n)})
+ shouldPanic("cap out of range", func() {_ = make(T, 0, n)})
+ }
+}
+
+func shouldPanic(str string, f func()) {
+ defer func() {
+ err := recover()
+ if err == nil {
+ panic("did not panic")
+ }
+ s := err.(error).Error()
+ if !strings.Contains(s, str) {
+ panic("got panic " + s + ", want " + str)
+ }
+ }()
+
+ f()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4097.go b/gcc/testsuite/go.test/test/fixedbugs/issue4097.go
new file mode 100644
index 0000000000..c2b7d9b4fb
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4097.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package foo
+
+var s [][10]int
+const m = len(s[len(s)-1]) // ERROR "is not a constant|is not constant"
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4099.go b/gcc/testsuite/go.test/test/fixedbugs/issue4099.go
new file mode 100644
index 0000000000..89392bfff1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4099.go
@@ -0,0 +1,26 @@
+// errorcheck -0 -m
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Check go:noescape annotations.
+
+package p
+
+// The noescape comment only applies to the next func,
+// which must not have a body.
+
+//go:noescape
+
+func F1([]byte)
+
+func F2([]byte)
+
+func G() {
+ var buf1 [10]byte
+ F1(buf1[:]) // ERROR "buf1 does not escape"
+
+ var buf2 [10]byte // ERROR "moved to heap: buf2"
+ F2(buf2[:]) // ERROR "buf2 escapes to heap"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4162.go b/gcc/testsuite/go.test/test/fixedbugs/issue4162.go
new file mode 100644
index 0000000000..c2a8338c70
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4162.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4162. Trailing commas now allowed in conversions.
+
+package p
+
+// All these are valid now.
+var (
+ _ = int(1.0,) // comma was always permitted (like function call)
+ _ = []byte("foo",) // was syntax error: unexpected comma
+ _ = chan int(nil,) // was syntax error: unexpected comma
+ _ = (func())(nil,) // was syntax error: unexpected comma
+)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4167.go b/gcc/testsuite/go.test/test/fixedbugs/issue4167.go
new file mode 100644
index 0000000000..4e353312b8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4167.go
@@ -0,0 +1,50 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4167: inlining of a (*T).Method expression taking
+// its arguments from a multiple return breaks the compiler.
+
+package main
+
+type pa []int
+
+type p int
+
+func (this *pa) func1() (v *p, c int) {
+ for _ = range *this {
+ c++
+ }
+ v = (*p)(&c)
+ return
+}
+
+func (this *pa) func2() p {
+ return (*p).func3(this.func1())
+}
+
+func (this *p) func3(f int) p {
+ return *this
+}
+
+func (this *pa) func2dots() p {
+ return (*p).func3(this.func1())
+}
+
+func (this *p) func3dots(f ...int) p {
+ return *this
+}
+
+func main() {
+ arr := make(pa, 13)
+ length := arr.func2()
+ if int(length) != len(arr) {
+ panic("length != len(arr)")
+ }
+ length = arr.func2dots()
+ if int(length) != len(arr) {
+ panic("length != len(arr)")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4232.go b/gcc/testsuite/go.test/test/fixedbugs/issue4232.go
new file mode 100644
index 0000000000..e5daa65623
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4232.go
@@ -0,0 +1,33 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func f() {
+ var a [10]int
+ _ = a[-1] // ERROR "invalid array index -1|index out of bounds"
+ _ = a[-1:] // ERROR "invalid slice index -1|index out of bounds"
+ _ = a[:-1] // ERROR "invalid slice index -1|index out of bounds"
+ _ = a[10] // ERROR "invalid array index 10|index out of bounds"
+
+ var s []int
+ _ = s[-1] // ERROR "invalid slice index -1|index out of bounds"
+ _ = s[-1:] // ERROR "invalid slice index -1|index out of bounds"
+ _ = s[:-1] // ERROR "invalid slice index -1|index out of bounds"
+ _ = s[10]
+
+ const c = "foo"
+ _ = c[-1] // ERROR "invalid string index -1|index out of bounds"
+ _ = c[-1:] // ERROR "invalid slice index -1|index out of bounds"
+ _ = c[:-1] // ERROR "invalid slice index -1|index out of bounds"
+ _ = c[3] // ERROR "invalid string index 3|index out of bounds"
+
+ var t string
+ _ = t[-1] // ERROR "invalid string index -1|index out of bounds"
+ _ = t[-1:] // ERROR "invalid slice index -1|index out of bounds"
+ _ = t[:-1] // ERROR "invalid slice index -1|index out of bounds"
+ _ = t[3]
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4251.go b/gcc/testsuite/go.test/test/fixedbugs/issue4251.go
new file mode 100644
index 0000000000..3668d4c89a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4251.go
@@ -0,0 +1,21 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4251: slice with inverted range is an error.
+
+package p
+
+func F1(s []byte) []byte {
+ return s[2:1] // ERROR "invalid slice index|inverted slice range"
+}
+
+func F2(a [10]byte) []byte {
+ return a[2:1] // ERROR "invalid slice index|inverted slice range"
+}
+
+func F3(s string) string {
+ return s[2:1] // ERROR "invalid slice index|inverted slice range"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/a.go
new file mode 100644
index 0000000000..089b6f20f4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/a.go
@@ -0,0 +1,35 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// A package that redeclares common builtin names.
+package a
+
+var true = 0 == 1
+var false = 0 == 0
+var nil = 1
+
+const append = 42
+
+type error bool
+type int interface{}
+
+func len(interface{}) int32 { return 42 }
+
+func Test() {
+ var array [append]int
+ if true {
+ panic("unexpected builtin true instead of redeclared one")
+ }
+ if !false {
+ panic("unexpected builtin false instead of redeclared one")
+ }
+ if len(array) != 42 {
+ println(len(array))
+ panic("unexpected call of builtin len")
+ }
+}
+
+func InlinedFakeTrue() error { return error(true) }
+func InlinedFakeFalse() error { return error(false) }
+func InlinedFakeNil() int { return nil }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/main.go
new file mode 100644
index 0000000000..28e4342247
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4252.dir/main.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func main() {
+ if a.InlinedFakeTrue() {
+ panic("returned true was the real one")
+ }
+ if !a.InlinedFakeFalse() {
+ panic("returned false was the real one")
+ }
+ if a.InlinedFakeNil() == nil {
+ panic("returned nil was the real one")
+ }
+ a.Test()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4252.go b/gcc/testsuite/go.test/test/fixedbugs/issue4252.go
new file mode 100644
index 0000000000..1b0e5b2028
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4252.go
@@ -0,0 +1,11 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4252: tests that fixing the issue still allow
+// builtins to be redeclared and are not corrupted
+// in export data.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4264.go b/gcc/testsuite/go.test/test/fixedbugs/issue4264.go
new file mode 100644
index 0000000000..627393211e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4264.go
@@ -0,0 +1,19 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 4264: reject int division by const 0
+
+package main
+
+func main() {
+ var x int
+ var y float64
+ var z complex128
+
+ println(x/0) // ERROR "division by zero"
+ println(y/0)
+ println(z/0)
+} \ No newline at end of file
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4283.go b/gcc/testsuite/go.test/test/fixedbugs/issue4283.go
new file mode 100644
index 0000000000..128c87231a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4283.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4283: nil == nil can't be done as the type is unknown.
+
+package p
+
+func F1() bool {
+ return nil == nil // ERROR "invalid"
+}
+
+func F2() bool {
+ return nil != nil // ERROR "invalid"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4313.go b/gcc/testsuite/go.test/test/fixedbugs/issue4313.go
new file mode 100644
index 0000000000..b2f69dbfa4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4313.go
@@ -0,0 +1,28 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Order of operations in select.
+
+package main
+
+func main() {
+ c := make(chan int, 1)
+ x := 0
+ select {
+ case c <- x: // should see x = 0, not x = 42 (after makec)
+ case <-makec(&x): // should be evaluated only after c and x on previous line
+ }
+ y := <-c
+ if y != 0 {
+ panic(y)
+ }
+}
+
+func makec(px *int) chan bool {
+ if false { for {} }
+ *px = 42
+ return make(chan bool, 0)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4316.go b/gcc/testsuite/go.test/test/fixedbugs/issue4316.go
new file mode 100644
index 0000000000..bb18a08962
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4316.go
@@ -0,0 +1,64 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4316: the stack overflow check in the linker
+// is confused when it encounters a split-stack function
+// that needs 0 bytes of stack space.
+
+package main
+
+type Peano *Peano
+
+func makePeano(n int) *Peano {
+ if n == 0 {
+ return nil
+ }
+ p := Peano(makePeano(n - 1))
+ return &p
+}
+
+var countArg Peano
+var countResult int
+
+func countPeano() {
+ if countArg == nil {
+ countResult = 0
+ return
+ }
+ countArg = *countArg
+ countPeano()
+ countResult++
+}
+
+var s = "(())"
+var pT = 0
+
+func p() {
+ if pT >= len(s) {
+ return
+ }
+ if s[pT] == '(' {
+ pT += 1
+ p()
+ if pT < len(s) && s[pT] == ')' {
+ pT += 1
+ } else {
+ return
+ }
+ p()
+ }
+}
+
+func main() {
+ countArg = makePeano(4096)
+ countPeano()
+ if countResult != 4096 {
+ println("countResult =", countResult)
+ panic("countResult != 4096")
+ }
+
+ p()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4323.go b/gcc/testsuite/go.test/test/fixedbugs/issue4323.go
new file mode 100644
index 0000000000..6bb78f43cf
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4323.go
@@ -0,0 +1,31 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4323: inlining of functions with local variables
+// forgets to typecheck the declarations in the inlined copy.
+
+package main
+
+type reader struct {
+ C chan T
+}
+
+type T struct{ C chan []byte }
+
+var r = newReader()
+
+func newReader() *reader { return new(reader) }
+
+func (r *reader) Read(n int) ([]byte, error) {
+ req := T{C: make(chan []byte)}
+ r.C <- req
+ return <-req.C, nil
+}
+
+func main() {
+ s, err := r.Read(1)
+ _, _ = s, err
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p1.go
new file mode 100644
index 0000000000..ab214befb4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p1.go
@@ -0,0 +1,12 @@
+package p1
+
+type O map[string]map[string]string
+
+func (opts O) RemoveOption(sect, opt string) bool {
+ if _, ok := opts[sect]; !ok {
+ return false
+ }
+ _, ok := opts[sect][opt]
+ delete(opts[sect], opt)
+ return ok
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p2.go
new file mode 100644
index 0000000000..8e86266dd8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/p2.go
@@ -0,0 +1,5 @@
+package p2
+
+import "./p1"
+
+func NewO() p1.O { return nil }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q1.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q1.go
new file mode 100644
index 0000000000..f118eb0925
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q1.go
@@ -0,0 +1,8 @@
+package q1
+
+func Deref(typ interface{}) interface{} {
+ if typ, ok := typ.(*int); ok {
+ return *typ
+ }
+ return typ
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q2.go
new file mode 100644
index 0000000000..075e2b21e7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/q2.go
@@ -0,0 +1,11 @@
+package main
+
+import "./q1"
+
+func main() {
+ x := 1
+ y := q1.Deref(&x)
+ if y != 1 {
+ panic("y != 1")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/z.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/z.go
new file mode 100644
index 0000000000..9b222e8b40
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.dir/z.go
@@ -0,0 +1,7 @@
+package z
+
+import "./p2"
+
+func main() {
+ p2.NewO().RemoveOption("hello", "world")
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4326.go b/gcc/testsuite/go.test/test/fixedbugs/issue4326.go
new file mode 100644
index 0000000000..5ce2eea266
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4326.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Printing local variables in inliner shadows global names.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4348.go b/gcc/testsuite/go.test/test/fixedbugs/issue4348.go
new file mode 100644
index 0000000000..3dac8f7685
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4348.go
@@ -0,0 +1,29 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4348. After switch to 64-bit ints the compiler generates
+// illegal instructions when using large array bounds or indexes.
+
+package main
+
+// 1<<32 on a 64-bit machine, 1 otherwise.
+const LARGE = ^uint(0)>>32 + 1
+
+func A() int {
+ var a []int
+ return a[LARGE]
+}
+
+var b [LARGE]int
+
+func B(i int) int {
+ return b[i]
+}
+
+func main() {
+ n := A()
+ B(n)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4353.go b/gcc/testsuite/go.test/test/fixedbugs/issue4353.go
new file mode 100644
index 0000000000..defe7c324c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4353.go
@@ -0,0 +1,19 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4353. An optimizer bug in 8g triggers a runtime fault
+// instead of an out of bounds panic.
+
+package main
+
+var aib [100000]int
+var paib *[100000]int = &aib
+var i64 int64 = 100023
+
+func main() {
+ defer func() { recover() }()
+ _ = paib[i64]
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4359.go b/gcc/testsuite/go.test/test/fixedbugs/issue4359.go
new file mode 100644
index 0000000000..b5adb4010b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4359.go
@@ -0,0 +1,19 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4359: wrong handling of broken struct fields
+// causes "internal compiler error: lookdot badwidth".
+
+package main
+
+type T struct {
+ x T1 // ERROR "undefined"
+}
+
+func f() {
+ var t *T
+ _ = t.x
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p1.go b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p1.go
new file mode 100644
index 0000000000..d732c8b363
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p1.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p1
+
+type Magic int
+
+type T struct {
+ x interface{}
+}
+
+func (t *T) M() bool {
+ _, ok := t.x.(Magic)
+ return ok
+}
+
+func F(t *T) {
+ println(t)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p2.go
new file mode 100644
index 0000000000..33370d07a4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p2.go
@@ -0,0 +1,16 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p2
+
+import "./p1"
+
+type T struct {
+ p1.T
+}
+
+func F() {
+ var t T
+ p1.F(&t.T)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p3.go b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p3.go
new file mode 100644
index 0000000000..13c996bc22
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4370.dir/p3.go
@@ -0,0 +1,13 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p3
+
+import "./p2"
+
+func F() {
+ p2.F()
+ var t p2.T
+ println(t.T.M())
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4370.go b/gcc/testsuite/go.test/test/fixedbugs/issue4370.go
new file mode 100644
index 0000000000..76b47e1a6d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4370.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Re-exporting inlined function bodies missed types in x, ok := v.(Type)
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4396a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4396a.go
new file mode 100644
index 0000000000..11ae1f7c6c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4396a.go
@@ -0,0 +1,27 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4396. Arrays of bytes are not required to be
+// word aligned. 5g should use MOVB to load the address
+// of s.g[0] for its nil check.
+//
+// This test _may_ fail on arm, but requires the host to
+// trap unaligned loads. This is generally done with
+//
+// echo "4" > /proc/cpu/alignment
+
+package main
+
+var s = struct {
+ // based on lzw.decoder
+ a, b, c, d, e uint16
+ f [4096]uint8
+ g [4096]uint8
+}{}
+
+func main() {
+ s.g[0] = 1
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4396b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4396b.go
new file mode 100644
index 0000000000..d0bf28fac2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4396b.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// This test _may_ fail on arm, but requires the host to
+// trap unaligned loads. This is generally done with
+//
+// echo "4" > /proc/cpu/alignment
+
+package main
+
+type T struct {
+ U uint16
+ V T2
+}
+
+type T2 struct {
+ pad [4096]byte
+ A, B byte
+}
+
+var s, t = new(T), new(T)
+
+func main() {
+ var u, v *T2 = &s.V, &t.V
+ u.B = v.B
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4399.go b/gcc/testsuite/go.test/test/fixedbugs/issue4399.go
new file mode 100644
index 0000000000..6674db9ec3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4399.go
@@ -0,0 +1,15 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4399: 8g would print "gins LEAQ nil *A".
+
+package main
+
+type A struct{ a int }
+
+func main() {
+ println(((*A)(nil)).a)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4405.go b/gcc/testsuite/go.test/test/fixedbugs/issue4405.go
new file mode 100644
index 0000000000..b8458d7764
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4405.go
@@ -0,0 +1,15 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+const (
+ _ = iota
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
+ _ // ERROR "illegal character|invalid character"
+)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4429.go b/gcc/testsuite/go.test/test/fixedbugs/issue4429.go
new file mode 100644
index 0000000000..6822760ef8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4429.go
@@ -0,0 +1,16 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type a struct {
+ a int
+}
+
+func main() {
+ av := a{};
+ _ = *a(av); // ERROR "invalid indirect|expected pointer"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4448.go b/gcc/testsuite/go.test/test/fixedbugs/issue4448.go
new file mode 100644
index 0000000000..fa1d9fe49d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4448.go
@@ -0,0 +1,37 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4448: 64-bit indices that are statically known
+// to be bounded make 5g and 8g generate a dangling branch.
+
+package main
+
+const b26 uint64 = 0x022fdd63cc95386d
+
+var bitPos [64]int
+
+func init() {
+ for p := uint(0); p < 64; p++ {
+ bitPos[b26<<p>>58] = int(p)
+ }
+}
+
+func MinPos(w uint64) int {
+ if w == 0 {
+ panic("bit: MinPos(0) undefined")
+ }
+ return bitPos[((w&-w)*b26)>>58]
+}
+
+func main() {
+ const one = uint64(1)
+ for i := 0; i < 64; i++ {
+ if MinPos(1<<uint(i)) != i {
+ println("i =", i)
+ panic("MinPos(1<<uint(i)) != i")
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4452.go b/gcc/testsuite/go.test/test/fixedbugs/issue4452.go
new file mode 100644
index 0000000000..54dd214d69
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4452.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4452. Used to print many errors, now just one.
+
+package main
+
+func main() {
+ _ = [...]int(4) // ERROR "\[\.\.\.\].*outside of array literal"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4458.go b/gcc/testsuite/go.test/test/fixedbugs/issue4458.go
new file mode 100644
index 0000000000..820f18cb8d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4458.go
@@ -0,0 +1,20 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4458: gc accepts invalid method expressions
+// like (**T).Method.
+
+package main
+
+type T struct{}
+
+func (T) foo() {}
+
+func main() {
+ av := T{}
+ pav := &av
+ (**T).foo(&pav) // ERROR "no method foo|requires named type or pointer to named"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4463.go b/gcc/testsuite/go.test/test/fixedbugs/issue4463.go
new file mode 100644
index 0000000000..70977ceb78
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4463.go
@@ -0,0 +1,87 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4463: test builtin functions in statement context and in
+// go/defer functions.
+
+package p
+
+import "unsafe"
+
+func F() {
+ var a []int
+ var c chan int
+ var m map[int]int
+ var s struct{ f int }
+
+ append(a, 0) // ERROR "not used"
+ cap(a) // ERROR "not used"
+ complex(1, 2) // ERROR "not used"
+ imag(1i) // ERROR "not used"
+ len(a) // ERROR "not used"
+ make([]int, 10) // ERROR "not used"
+ new(int) // ERROR "not used"
+ real(1i) // ERROR "not used"
+ unsafe.Alignof(a) // ERROR "not used"
+ unsafe.Offsetof(s.f) // ERROR "not used"
+ unsafe.Sizeof(a) // ERROR "not used"
+
+ close(c)
+ copy(a, a)
+ delete(m, 0)
+ panic(0)
+ print("foo")
+ println("bar")
+ recover()
+
+ (close(c))
+ (copy(a, a))
+ (delete(m, 0))
+ (panic(0))
+ (print("foo"))
+ (println("bar"))
+ (recover())
+
+ go append(a, 0) // ERROR "not used|discards result"
+ go cap(a) // ERROR "not used|discards result"
+ go complex(1, 2) // ERROR "not used|discards result"
+ go imag(1i) // ERROR "not used|discards result"
+ go len(a) // ERROR "not used|discards result"
+ go make([]int, 10) // ERROR "not used|discards result"
+ go new(int) // ERROR "not used|discards result"
+ go real(1i) // ERROR "not used|discards result"
+ go unsafe.Alignof(a) // ERROR "not used|discards result"
+ go unsafe.Offsetof(s.f) // ERROR "not used|discards result"
+ go unsafe.Sizeof(a) // ERROR "not used|discards result"
+
+ go close(c)
+ go copy(a, a)
+ go delete(m, 0)
+ go panic(0)
+ go print("foo")
+ go println("bar")
+ go recover()
+
+ defer append(a, 0) // ERROR "not used|discards result"
+ defer cap(a) // ERROR "not used|discards result"
+ defer complex(1, 2) // ERROR "not used|discards result"
+ defer imag(1i) // ERROR "not used|discards result"
+ defer len(a) // ERROR "not used|discards result"
+ defer make([]int, 10) // ERROR "not used|discards result"
+ defer new(int) // ERROR "not used|discards result"
+ defer real(1i) // ERROR "not used|discards result"
+ defer unsafe.Alignof(a) // ERROR "not used|discards result"
+ defer unsafe.Offsetof(s.f) // ERROR "not used|discards result"
+ defer unsafe.Sizeof(a) // ERROR "not used|discards result"
+
+ defer close(c)
+ defer copy(a, a)
+ defer delete(m, 0)
+ defer panic(0)
+ defer print("foo")
+ defer println("bar")
+ defer recover()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4468.go b/gcc/testsuite/go.test/test/fixedbugs/issue4468.go
new file mode 100644
index 0000000000..ef0b46bcf6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4468.go
@@ -0,0 +1,28 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4468: go/defer calls may not be parenthesized.
+
+package p
+
+type T int
+
+func (t *T) F() T {
+ return *t
+}
+
+type S struct {
+ t T
+}
+
+func F() {
+ go (F()) // ERROR "must be function call"
+ defer (F()) // ERROR "must be function call"
+ var s S
+ (&s.t).F()
+ go (&s.t).F()
+ defer (&s.t).F()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4470.go b/gcc/testsuite/go.test/test/fixedbugs/issue4470.go
new file mode 100644
index 0000000000..5ed09ca554
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4470.go
@@ -0,0 +1,16 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4470: parens are not allowed around .(type) "expressions"
+
+package main
+
+func main() {
+ var i interface{}
+ switch (i.(type)) { // ERROR "outside type switch"
+ default:
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4495.go b/gcc/testsuite/go.test/test/fixedbugs/issue4495.go
new file mode 100644
index 0000000000..7ec1134d7b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4495.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type I interface {
+ m() int
+}
+
+type T struct{}
+
+func (T) m() int {
+ return 3
+}
+
+var t T
+
+var ret = I.m(t)
+
+func main() {
+ if ret != 3 {
+ println("ret = ", ret)
+ panic("ret != 3")
+ }
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f1.go b/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f1.go
new file mode 100644
index 0000000000..7e2cffa5dd
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f1.go
@@ -0,0 +1,9 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import "fmt" // ERROR "fmt redeclared|imported"
+
+var _ = fmt.Printf
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f2.go
new file mode 100644
index 0000000000..895fc342ba
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4510.dir/f2.go
@@ -0,0 +1,7 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+func fmt() {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4510.go b/gcc/testsuite/go.test/test/fixedbugs/issue4510.go
new file mode 100644
index 0000000000..003f9e8e16
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4510.go
@@ -0,0 +1,7 @@
+// errorcheckdir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4517a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4517a.go
new file mode 100644
index 0000000000..a1b6b57e97
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4517a.go
@@ -0,0 +1,9 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+var init = 1 // ERROR "cannot declare init - must be func"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4517b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4517b.go
new file mode 100644
index 0000000000..f04103ff5b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4517b.go
@@ -0,0 +1,9 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+const init = 1 // ERROR "cannot declare init - must be func"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4517c.go b/gcc/testsuite/go.test/test/fixedbugs/issue4517c.go
new file mode 100644
index 0000000000..47b21cf408
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4517c.go
@@ -0,0 +1,9 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type init byte // ERROR "cannot declare init - must be func"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4517d.go b/gcc/testsuite/go.test/test/fixedbugs/issue4517d.go
new file mode 100644
index 0000000000..3d727d433e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4517d.go
@@ -0,0 +1,9 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+import init "fmt" // ERROR "cannot import package as init"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4518.go b/gcc/testsuite/go.test/test/fixedbugs/issue4518.go
new file mode 100644
index 0000000000..e64b069bb9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4518.go
@@ -0,0 +1,67 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4518. In some circumstances "return F(...)"
+// where F has multiple returns is miscompiled by 6g due to
+// bold assumptions in componentgen.
+
+package main
+
+func DontInline() {}
+
+func F(e interface{}) (int, int) {
+ DontInline()
+ return 3, 7
+}
+
+func G() (int, int) {
+ DontInline()
+ return 3, 7
+}
+
+func bogus1(d interface{}) (int, int) {
+ switch {
+ default:
+ return F(d)
+ }
+ return 0, 0
+}
+
+func bogus2() (int, int) {
+ switch {
+ default:
+ return F(3)
+ }
+ return 0, 0
+}
+
+func bogus3(d interface{}) (int, int) {
+ switch {
+ default:
+ return G()
+ }
+ return 0, 0
+}
+
+func bogus4() (int, int) {
+ switch {
+ default:
+ return G()
+ }
+ return 0, 0
+}
+
+func check(a, b int) {
+ if a != 3 || b != 7 {
+ println(a, b)
+ panic("a != 3 || b != 7")
+ }
+}
+
+func main() {
+ check(bogus1(42))
+ check(bogus2())
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4529.go b/gcc/testsuite/go.test/test/fixedbugs/issue4529.go
new file mode 100644
index 0000000000..4f37e7c36b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4529.go
@@ -0,0 +1,33 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4529: escape analysis crashes on "go f(g())"
+// when g has multiple returns.
+
+package main
+
+type M interface{}
+
+type A struct {
+ a string
+ b chan M
+}
+
+func (a *A) I() (b <-chan M, c chan<- M) {
+ a.b, c = make(chan M), make(chan M)
+ b = a.b
+
+ return
+}
+
+func Init(a string, b *A, c interface {
+ I() (<-chan M, chan<- M)
+}) {
+ b.a = a
+ go b.c(c.I())
+}
+
+func (a *A) c(b <-chan M, _ chan<- M) {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4545.go b/gcc/testsuite/go.test/test/fixedbugs/issue4545.go
new file mode 100644
index 0000000000..c37ccef7cb
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4545.go
@@ -0,0 +1,19 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4545: untyped constants are incorrectly coerced
+// to concrete types when used in interface{} context.
+
+package main
+
+import "fmt"
+
+func main() {
+ var s uint
+ fmt.Println(1.0 + 1<<s) // ERROR "invalid operation|non-integer type|incompatible type"
+ x := 1.0 + 1<<s // ERROR "invalid operation|non-integer type"
+ _ = x
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4562.go b/gcc/testsuite/go.test/test/fixedbugs/issue4562.go
new file mode 100644
index 0000000000..29d98b0283
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4562.go
@@ -0,0 +1,49 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "runtime"
+ "strings"
+)
+
+type T struct {
+ val int
+}
+
+func main() {
+ defer expectError(22)
+ var pT *T
+ switch pT.val { // error should be here - line 22
+ case 0:
+ fmt.Println("0")
+ case 1: // used to show up here instead
+ fmt.Println("1")
+ case 2:
+ fmt.Println("2")
+ }
+ fmt.Println("finished")
+}
+
+func expectError(expectLine int) {
+ if recover() == nil {
+ panic("did not crash")
+ }
+ for i := 1;; i++ {
+ _, file, line, ok := runtime.Caller(i)
+ if !ok {
+ panic("cannot find issue4562.go on stack")
+ }
+ if strings.HasSuffix(file, "issue4562.go") {
+ if line != expectLine {
+ panic(fmt.Sprintf("crashed at line %d, wanted line %d", line, expectLine))
+ }
+ break
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4585.go b/gcc/testsuite/go.test/test/fixedbugs/issue4585.go
new file mode 100644
index 0000000000..ad1242d1e5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4585.go
@@ -0,0 +1,151 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4585: comparisons and hashes process blank
+// fields and padding in structs.
+
+package main
+
+import "unsafe"
+
+// T is a structure with padding.
+type T struct {
+ A int16
+ B int64
+ C int16
+ D int64
+ Dummy [64]byte
+}
+
+// U is a structure with a blank field
+type U struct {
+ A, _, B int
+ Dummy [64]byte
+}
+
+// USmall is like U but the frontend will inline comparison
+// instead of calling the generated eq function.
+type USmall struct {
+ A, _, B int32
+}
+
+// V has padding but not on the first field.
+type V struct {
+ A1, A2, A3 int32
+ B int16
+ C int32
+}
+
+// W has padding at the end.
+type W struct {
+ A1, A2, A3 int32
+ B int32
+ C int8
+}
+
+func test1() {
+ var a, b U
+ m := make(map[U]int)
+ copy((*[16]byte)(unsafe.Pointer(&a))[:], "hello world!")
+ a.A, a.B = 1, 2
+ b.A, b.B = 1, 2
+ if a != b {
+ panic("broken equality: a != b")
+ }
+
+ m[a] = 1
+ m[b] = 2
+ if len(m) == 2 {
+ panic("broken hash: len(m) == 2")
+ }
+ if m[a] != 2 {
+ panic("m[a] != 2")
+ }
+}
+
+func test2() {
+ var a, b T
+ m := make(map[T]int)
+
+ copy((*[16]byte)(unsafe.Pointer(&a))[:], "hello world!")
+ a.A, a.B, a.C, a.D = 1, 2, 3, 4
+ b.A, b.B, b.C, b.D = 1, 2, 3, 4
+
+ if a != b {
+ panic("broken equality: a != b")
+ }
+
+ m[a] = 1
+ m[b] = 2
+ if len(m) == 2 {
+ panic("broken hash: len(m) == 2")
+ }
+ if m[a] != 2 {
+ panic("m[a] != 2")
+ }
+}
+
+func test3() {
+ var a, b USmall
+ copy((*[12]byte)(unsafe.Pointer(&a))[:], "hello world!")
+ a.A, a.B = 1, 2
+ b.A, b.B = 1, 2
+ if a != b {
+ panic("broken equality: a != b")
+ }
+}
+
+func test4() {
+ var a, b V
+ m := make(map[V]int)
+
+ copy((*[20]byte)(unsafe.Pointer(&a))[:], "Hello World, Gopher!")
+ a.A1, a.A2, a.A3, a.B, a.C = 1, 2, 3, 4, 5
+ b.A1, b.A2, b.A3, b.B, b.C = 1, 2, 3, 4, 5
+
+ if a != b {
+ panic("broken equality: a != b")
+ }
+
+ m[a] = 1
+ m[b] = 2
+ if len(m) == 2 {
+ panic("broken hash: len(m) == 2")
+ }
+ if m[a] != 2 {
+ panic("m[a] != 2")
+ }
+}
+
+func test5() {
+ var a, b W
+ m := make(map[W]int)
+
+ copy((*[20]byte)(unsafe.Pointer(&a))[:], "Hello World, Gopher!")
+ a.A1, a.A2, a.A3, a.B, a.C = 1, 2, 3, 4, 5
+ b.A1, b.A2, b.A3, b.B, b.C = 1, 2, 3, 4, 5
+
+ if a != b {
+ panic("broken equality: a != b")
+ }
+
+ m[a] = 1
+ m[b] = 2
+ if len(m) == 2 {
+ panic("broken hash: len(m) == 2")
+ }
+ if m[a] != 2 {
+ panic("m[a] != 2")
+ }
+}
+
+func main() {
+ test1()
+ test2()
+ test3()
+ test4()
+ test5()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg1.go b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg1.go
new file mode 100644
index 0000000000..c447371c1a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg1.go
@@ -0,0 +1,26 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package pkg1
+
+type A interface {
+ Write() error
+}
+
+type B interface {
+ Hello()
+ world()
+}
+
+type C struct{}
+
+func (c C) Write() error { return nil }
+
+var T = struct{ A }{nil}
+var U = struct{ B }{nil}
+var V A = struct{ *C }{nil}
+var W = interface {
+ Write() error
+ Hello()
+}(nil)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg2.go
new file mode 100644
index 0000000000..61c01d7aec
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/pkg2.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package pkg2
+
+import "./pkg1"
+
+var T = struct{ pkg1.A }{nil}
+var U = struct{ pkg1.B }{nil}
+var V pkg1.A = struct{ *pkg1.C }{nil}
+var W = interface {
+ Write() error
+ Hello()
+}(nil)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/prog.go
new file mode 100644
index 0000000000..3220e85d3a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4590.dir/prog.go
@@ -0,0 +1,25 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "./pkg1"
+ "./pkg2"
+)
+
+func main() {
+ if pkg1.T != pkg2.T {
+ panic("pkg1.T != pkg2.T")
+ }
+ if pkg1.U != pkg2.U {
+ panic("pkg1.U != pkg2.U")
+ }
+ if pkg1.V != pkg2.V {
+ panic("pkg1.V != pkg2.V")
+ }
+ if pkg1.W != pkg2.W {
+ panic("pkg1.W != pkg2.W")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4590.go b/gcc/testsuite/go.test/test/fixedbugs/issue4590.go
new file mode 100644
index 0000000000..faeb1adef2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4590.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4590: linker fails on multiple imports of
+// an anonymous struct with methods.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4610.go b/gcc/testsuite/go.test/test/fixedbugs/issue4610.go
new file mode 100644
index 0000000000..d56c6d3e8c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4610.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+type bar struct {
+ x int
+}
+
+func main() {
+ var foo bar
+ _ = &foo{} // ERROR "is not a type|expected .;."
+} // GCCGO_ERROR "expected declaration"
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4614.go b/gcc/testsuite/go.test/test/fixedbugs/issue4614.go
new file mode 100644
index 0000000000..1aa318c2b2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4614.go
@@ -0,0 +1,20 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4614: slicing of nil slices confuses the compiler
+// with a uintptr(nil) node.
+
+package p
+
+import "unsafe"
+
+var n int
+
+var _ = []int(nil)[1:]
+var _ = []int(nil)[n:]
+
+var _ = uintptr(unsafe.Pointer(nil))
+var _ = unsafe.Pointer(uintptr(0))
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4618.go b/gcc/testsuite/go.test/test/fixedbugs/issue4618.go
new file mode 100644
index 0000000000..ff91ae7067
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4618.go
@@ -0,0 +1,41 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "runtime"
+ "testing"
+)
+
+type T struct { int }
+
+var globl *T
+
+func F() {
+ t := &T{}
+ globl = t
+}
+
+func G() {
+ t := &T{}
+ _ = t
+}
+
+func main() {
+ nf := testing.AllocsPerRun(100, F)
+ ng := testing.AllocsPerRun(100, G)
+ if int(nf) != 1 {
+ fmt.Printf("AllocsPerRun(100, F) = %v, want 1\n", nf)
+ os.Exit(1)
+ }
+ if int(ng) != 0 && (runtime.Compiler != "gccgo" || int(ng) != 1) {
+ fmt.Printf("AllocsPerRun(100, G) = %v, want 0\n", ng)
+ os.Exit(1)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4620.go b/gcc/testsuite/go.test/test/fixedbugs/issue4620.go
new file mode 100644
index 0000000000..7b4ebf944d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4620.go
@@ -0,0 +1,21 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4620: map indexes are not evaluated before assignment of other elements
+
+package main
+
+import "fmt"
+
+func main() {
+ m := map[int]int{0:1}
+ i := 0
+ i, m[i] = 1, 2
+ if m[0] != 2 {
+ fmt.Println(m)
+ panic("m[i] != 2")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4654.go b/gcc/testsuite/go.test/test/fixedbugs/issue4654.go
new file mode 100644
index 0000000000..d3f582b20c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4654.go
@@ -0,0 +1,71 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4654.
+// Check error for conversion and 'not used' in defer/go.
+
+package p
+
+import "unsafe"
+
+func f() {
+ defer int(0) // ERROR "defer requires function call, not conversion|is not used"
+ go string([]byte("abc")) // ERROR "go requires function call, not conversion|is not used"
+
+ var c complex128
+ var f float64
+ var t struct {X int}
+
+ var x []int
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer cap(x) // ERROR "defer discards result of cap|is not used"
+ defer complex(1, 2) // ERROR "defer discards result of complex|is not used"
+ defer complex(f, 1) // ERROR "defer discards result of complex|is not used"
+ defer imag(1i) // ERROR "defer discards result of imag|is not used"
+ defer imag(c) // ERROR "defer discards result of imag|is not used"
+ defer len(x) // ERROR "defer discards result of len|is not used"
+ defer make([]int, 1) // ERROR "defer discards result of make|is not used"
+ defer make(chan bool) // ERROR "defer discards result of make|is not used"
+ defer make(map[string]int) // ERROR "defer discards result of make|is not used"
+ defer new(int) // ERROR "defer discards result of new|is not used"
+ defer real(1i) // ERROR "defer discards result of real|is not used"
+ defer real(c) // ERROR "defer discards result of real|is not used"
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer append(x, 1) // ERROR "defer discards result of append|is not used"
+ defer unsafe.Alignof(t.X) // ERROR "defer discards result of unsafe.Alignof|is not used"
+ defer unsafe.Offsetof(t.X) // ERROR "defer discards result of unsafe.Offsetof|is not used"
+ defer unsafe.Sizeof(t) // ERROR "defer discards result of unsafe.Sizeof|is not used"
+
+ defer copy(x, x) // ok
+ m := make(map[int]int)
+ defer delete(m, 1) // ok
+ defer panic(1) // ok
+ defer print(1) // ok
+ defer println(1) // ok
+ defer recover() // ok
+
+ int(0) // ERROR "int\(0\) evaluated but not used|is not used"
+ string([]byte("abc")) // ERROR "string\(.*\) evaluated but not used|is not used"
+
+ append(x, 1) // ERROR "not used"
+ cap(x) // ERROR "not used"
+ complex(1, 2) // ERROR "not used"
+ complex(f, 1) // ERROR "not used"
+ imag(1i) // ERROR "not used"
+ imag(c) // ERROR "not used"
+ len(x) // ERROR "not used"
+ make([]int, 1) // ERROR "not used"
+ make(chan bool) // ERROR "not used"
+ make(map[string]int) // ERROR "not used"
+ new(int) // ERROR "not used"
+ real(1i) // ERROR "not used"
+ real(c) // ERROR "not used"
+ append(x, 1) // ERROR "not used"
+ append(x, 1) // ERROR "not used"
+ unsafe.Alignof(t.X) // ERROR "not used"
+ unsafe.Offsetof(t.X) // ERROR "not used"
+ unsafe.Sizeof(t) // ERROR "not used"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4663.go b/gcc/testsuite/go.test/test/fixedbugs/issue4663.go
new file mode 100644
index 0000000000..edaee93c5b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4663.go
@@ -0,0 +1,15 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4663.
+// Make sure 'not used' message is placed correctly.
+
+package main
+
+func a(b int) int64 {
+ b // ERROR "not used"
+ return 0
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4667.go b/gcc/testsuite/go.test/test/fixedbugs/issue4667.go
new file mode 100644
index 0000000000..3a00a31952
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4667.go
@@ -0,0 +1,37 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "testing"
+)
+
+var globl *int
+
+func G() {
+ F()
+}
+
+func F() {
+ var x int
+ globl = &x
+}
+
+func main() {
+ nf := testing.AllocsPerRun(100, F)
+ ng := testing.AllocsPerRun(100, G)
+ if int(nf) != 1 {
+ fmt.Printf("AllocsPerRun(100, F) = %v, want 1\n", nf)
+ os.Exit(1)
+ }
+ if int(ng) != 1 {
+ fmt.Printf("AllocsPerRun(100, G) = %v, want 1\n", ng)
+ os.Exit(1)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4734.go b/gcc/testsuite/go.test/test/fixedbugs/issue4734.go
new file mode 100644
index 0000000000..69f66f2129
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4734.go
@@ -0,0 +1,21 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Caused gccgo to emit multiple definitions of the same symbol.
+
+package p
+
+type S1 struct{}
+
+func (s *S1) M() {}
+
+type S2 struct {
+ F struct{ *S1 }
+}
+
+func F() {
+ _ = struct{ *S1 }{}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4748.go b/gcc/testsuite/go.test/test/fixedbugs/issue4748.go
new file mode 100644
index 0000000000..73c75393cf
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4748.go
@@ -0,0 +1,20 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4748.
+// This program used to complain because inlining created two exit labels.
+
+package main
+
+func jump() {
+ goto exit
+exit:
+ return
+}
+func main() {
+ jump()
+ jump()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4752.go b/gcc/testsuite/go.test/test/fixedbugs/issue4752.go
new file mode 100644
index 0000000000..d6781e39a2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4752.go
@@ -0,0 +1,26 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func F(xi, yi interface{}) uint64 {
+ x, y := xi.(uint64), yi.(uint64)
+ return x &^ y
+}
+
+func G(xi, yi interface{}) uint64 {
+ return xi.(uint64) &^ yi.(uint64) // generates incorrect code
+}
+
+func main() {
+ var x, y uint64 = 0, 1 << 63
+ f := F(x, y)
+ g := G(x, y)
+ if f != 0 || g != 0 {
+ println("F", f, "G", g)
+ panic("bad")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4776.go b/gcc/testsuite/go.test/test/fixedbugs/issue4776.go
new file mode 100644
index 0000000000..13781af1f3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4776.go
@@ -0,0 +1,10 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4776: missing package declaration error should be fatal.
+
+type MyInt int32 // ERROR "package statement must be first|package clause"
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4785.go b/gcc/testsuite/go.test/test/fixedbugs/issue4785.go
new file mode 100644
index 0000000000..c3dd6297d8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4785.go
@@ -0,0 +1,20 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 4785: used to fail to compile
+
+package main
+
+func t(x, y interface{}) interface{} {
+ return x.(float64) > y.(float64)
+}
+
+func main() {
+ v := t(1.0, 2.0)
+ if v != false {
+ panic("bad comparison")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4813.go b/gcc/testsuite/go.test/test/fixedbugs/issue4813.go
new file mode 100644
index 0000000000..f560b2fac9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4813.go
@@ -0,0 +1,52 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4813: use of constant floats as indices.
+
+package main
+
+var A [3]int
+var S []int
+var T string
+
+const (
+ i = 1
+ f = 2.0
+ f2 = 2.1
+ c = complex(2, 0)
+ c2 = complex(2, 1)
+)
+
+var (
+ vf = f
+ vc = c
+)
+
+var (
+ a1 = A[i]
+ a2 = A[f]
+ a3 = A[f2] // ERROR "truncated|must be integer"
+ a4 = A[c]
+ a5 = A[c2] // ERROR "truncated|must be integer"
+ a6 = A[vf] // ERROR "non-integer|must be integer"
+ a7 = A[vc] // ERROR "non-integer|must be integer"
+
+ s1 = S[i]
+ s2 = S[f]
+ s3 = S[f2] // ERROR "truncated|must be integer"
+ s4 = S[c]
+ s5 = S[c2] // ERROR "truncated|must be integer"
+ s6 = S[vf] // ERROR "non-integer|must be integer"
+ s7 = S[vc] // ERROR "non-integer|must be integer"
+
+ t1 = T[i]
+ t2 = T[f]
+ t3 = T[f2] // ERROR "truncated|must be integer"
+ t4 = T[c]
+ t5 = T[c2] // ERROR "truncated|must be integer"
+ t6 = T[vf] // ERROR "non-integer|must be integer"
+ t7 = T[vc] // ERROR "non-integer|must be integer"
+)
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4847.go b/gcc/testsuite/go.test/test/fixedbugs/issue4847.go
new file mode 100644
index 0000000000..91a6568f27
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4847.go
@@ -0,0 +1,24 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4847: initialization loop is not detected.
+
+package p
+
+type (
+ E int
+ S int
+)
+
+type matcher func(s *S) E
+
+func matchList(s *S) E { return matcher(matchAnyFn)(s) }
+
+var foo = matcher(matchList)
+
+var matchAny = matcher(matchList) // ERROR "initialization loop|depends upon itself"
+
+func matchAnyFn(s *S) (err E) { return matchAny(s) }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/a.go
new file mode 100644
index 0000000000..7ee7c48604
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/a.go
@@ -0,0 +1,33 @@
+package a
+
+import (
+ "unsafe"
+)
+
+type Collection struct {
+ root unsafe.Pointer
+}
+
+type nodeLoc struct{}
+
+type slice []int
+
+type maptype map[int]int
+
+func MakePrivateCollection() *Collection {
+ return &Collection{
+ root: unsafe.Pointer(&nodeLoc{}),
+ }
+}
+
+func MakePrivateCollection2() *Collection {
+ return &Collection{
+ root: unsafe.Pointer(&slice{}),
+ }
+}
+func MakePrivateCollection3() *Collection {
+ return &Collection{
+ root: unsafe.Pointer(&maptype{}),
+ }
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/b.go
new file mode 100644
index 0000000000..d8fb5693db
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4879.dir/b.go
@@ -0,0 +1,9 @@
+package b
+
+import "./a"
+
+func F() {
+ a.MakePrivateCollection()
+ a.MakePrivateCollection2()
+ a.MakePrivateCollection3()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4879.go b/gcc/testsuite/go.test/test/fixedbugs/issue4879.go
new file mode 100644
index 0000000000..842c8117ff
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4879.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4879: export data misses the '&' for some
+// composite literals in inlined bodies.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4909a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4909a.go
new file mode 100644
index 0000000000..aefe2d6455
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4909a.go
@@ -0,0 +1,35 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4909: compiler incorrectly accepts unsafe.Offsetof(t.x)
+// where x is a field of an embedded pointer field.
+
+package p
+
+import (
+ "unsafe"
+)
+
+type T struct {
+ A int
+ *B
+}
+
+func (t T) Method() {}
+
+type B struct {
+ X, Y int
+}
+
+var t T
+var p *T
+
+const N1 = unsafe.Offsetof(t.X) // ERROR "indirection"
+const N2 = unsafe.Offsetof(p.X) // ERROR "indirection"
+const N3 = unsafe.Offsetof(t.B.X) // valid
+const N4 = unsafe.Offsetof(p.B.X) // valid
+const N5 = unsafe.Offsetof(t.Method) // ERROR "method value"
+const N6 = unsafe.Offsetof(p.Method) // ERROR "method value"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4909b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4909b.go
new file mode 100644
index 0000000000..0f594e3db6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4909b.go
@@ -0,0 +1,80 @@
+// errorcheckoutput
+
+package main
+
+import "fmt"
+
+// We are going to define 256 types T(n),
+// such that T(n) embeds T(2n) and *T(2n+1).
+
+func main() {
+ fmt.Printf("// errorcheck\n\n")
+ fmt.Printf("package p\n\n")
+ fmt.Println(`import "unsafe"`)
+
+ // Dump types.
+ for n := 1; n < 256; n++ {
+ writeStruct(n)
+ }
+ // Dump leaves
+ for n := 256; n < 512; n++ {
+ fmt.Printf("type T%d int\n", n)
+ }
+
+ fmt.Printf("var t T1\n")
+ fmt.Printf("var p *T1\n")
+
+ // Simple selectors
+ for n := 2; n < 256; n++ {
+ writeDot(n)
+ }
+
+ // Double selectors
+ for n := 128; n < 256; n++ {
+ writeDot(n/16, n)
+ }
+
+ // Triple selectors
+ for n := 128; n < 256; n++ {
+ writeDot(n/64, n/8, n)
+ }
+}
+
+const structTpl = `
+type T%d struct {
+ A%d int
+ T%d
+ *T%d
+}
+`
+
+func writeStruct(n int) {
+ fmt.Printf(structTpl, n, n, 2*n, 2*n+1)
+}
+
+func writeDot(ns ...int) {
+ for _, root := range []string{"t", "p"} {
+ fmt.Printf("const _ = unsafe.Offsetof(%s", root)
+ for _, n := range ns {
+ fmt.Printf(".T%d", n)
+ }
+ // Does it involve an indirection?
+ nlast := ns[len(ns)-1]
+ nprev := 1
+ if len(ns) > 1 {
+ nprev = ns[len(ns)-2]
+ }
+ isIndirect := false
+ for n := nlast / 2; n > nprev; n /= 2 {
+ if n%2 == 1 {
+ isIndirect = true
+ break
+ }
+ }
+ fmt.Print(")")
+ if isIndirect {
+ fmt.Print(` // ERROR "indirection"`)
+ }
+ fmt.Print("\n")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/foo.go b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/foo.go
new file mode 100644
index 0000000000..19b73a0e03
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/foo.go
@@ -0,0 +1,7 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package foo
+
+type Op struct{}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state.go b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state.go
new file mode 100644
index 0000000000..c017b9649d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state.go
@@ -0,0 +1,28 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package state
+
+import "./foo"
+
+func Public() {
+ var s Settings
+ s.op()
+}
+
+type State struct{}
+
+func (s *State) x(*Settings) {}
+
+type Settings struct{}
+
+func (c *Settings) x() {
+ run([]foo.Op{{}})
+}
+
+func run([]foo.Op) {}
+
+func (s *Settings) op() foo.Op {
+ return foo.Op{}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state2.go b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state2.go
new file mode 100644
index 0000000000..50f75db2ce
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4932.dir/state2.go
@@ -0,0 +1,9 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package state2
+
+import "./state"
+
+type Foo *state.State
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4932.go b/gcc/testsuite/go.test/test/fixedbugs/issue4932.go
new file mode 100644
index 0000000000..2a6bc699f0
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4932.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4932: regression in export of composite literals.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/a.go
new file mode 100644
index 0000000000..2b9e44e351
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/a.go
@@ -0,0 +1,27 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+var global, global2 *int
+
+type T struct {
+ Pointer *int
+}
+
+func dontinline() {}
+
+func Store(t *T) {
+ global = t.Pointer
+ dontinline()
+}
+
+func Store2(t *T) {
+ global2 = t.Pointer
+ dontinline()
+}
+
+func Get() *int {
+ return global
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/b.go
new file mode 100644
index 0000000000..42a6f1d761
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4964.dir/b.go
@@ -0,0 +1,34 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func F() {
+ // store 1 in a.global
+ x, y := 1, 2
+ t := a.T{Pointer: &x}
+ a.Store(&t)
+ _ = y
+}
+
+func G() {
+ // store 4 in a.global2
+ x, y := 3, 4
+ t := a.T{Pointer: &y}
+ a.Store2(&t)
+ _ = x
+}
+
+func main() {
+ F()
+ G()
+ p := a.Get()
+ n := *p
+ if n != 1 {
+ println(n, "!= 1")
+ panic("n != 1")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue4964.go b/gcc/testsuite/go.test/test/fixedbugs/issue4964.go
new file mode 100644
index 0000000000..8291d1bb97
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue4964.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 4964: exported escape analysis result is not enough
+// for cross package analysis.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5002.go b/gcc/testsuite/go.test/test/fixedbugs/issue5002.go
new file mode 100644
index 0000000000..1e74fa1a1f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5002.go
@@ -0,0 +1,16 @@
+// build
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5002: 8g produces invalid CMPL $0, $0.
+// Used to fail at link time.
+
+package main
+
+func main() {
+ var y int64
+ if y%1 == 0 {
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5056.go b/gcc/testsuite/go.test/test/fixedbugs/issue5056.go
new file mode 100644
index 0000000000..a2cde2a501
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5056.go
@@ -0,0 +1,34 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5056: escape analysis not applied to wrapper functions
+
+package main
+
+type Foo int16
+
+func (f Foo) Esc() *int{
+ x := int(f)
+ return &x
+}
+
+type iface interface {
+ Esc() *int
+}
+
+var bar, foobar *int
+
+func main() {
+ var quux iface
+ var x Foo
+
+ quux = x
+ bar = quux.Esc()
+ foobar = quux.Esc()
+ if bar == foobar {
+ panic("bar == foobar")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5089.go b/gcc/testsuite/go.test/test/fixedbugs/issue5089.go
new file mode 100644
index 0000000000..81b9f0521f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5089.go
@@ -0,0 +1,15 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5089: gc allows methods on non-locals if symbol already exists
+
+package p
+
+import "bufio" // GCCGO_ERROR "previous"
+
+func (b *bufio.Reader) Buffered() int { // ERROR "non-local|redefinition"
+ return -1
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/a.go
new file mode 100644
index 0000000000..f20abb98bf
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/a.go
@@ -0,0 +1,7 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+var A = [2]string{"hello", "world"}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/b.go
new file mode 100644
index 0000000000..b12e739e33
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5105.dir/b.go
@@ -0,0 +1,15 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+var B = [2]string{"world", "hello"}
+
+func main() {
+ if a.A[0] != B[1] {
+ panic("bad hello")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5105.go b/gcc/testsuite/go.test/test/fixedbugs/issue5105.go
new file mode 100644
index 0000000000..e3e5e5caa4
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5105.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5105: linker segfaults on duplicate definition
+// of a type..hash.* function.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/bug.go b/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/bug.go
new file mode 100644
index 0000000000..2fdf0f9bb8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/bug.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bug
+
+type Node interface {
+ Eval(s *Scene)
+}
+
+type plug struct {
+ node Node
+}
+
+type Scene struct {
+ changed map[plug]bool
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/main.go
new file mode 100644
index 0000000000..47acdeba8a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5125.dir/main.go
@@ -0,0 +1,10 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import _ "./bug"
+
+func main() {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5125.go b/gcc/testsuite/go.test/test/fixedbugs/issue5125.go
new file mode 100644
index 0000000000..c049df3e2f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5125.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5125: cyclic dependencies between types confuse
+// the hashability test during import.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5162.go b/gcc/testsuite/go.test/test/fixedbugs/issue5162.go
new file mode 100644
index 0000000000..b14eae7863
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5162.go
@@ -0,0 +1,88 @@
+// runoutput
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5162: bad array equality when multiple comparisons
+// happen in the same expression.
+
+package main
+
+import (
+ "fmt"
+ "strings"
+)
+
+const template = `
+func CheckEqNNN_TTT() {
+ onesA := [NNN]ttt{ONES}
+ onesB := [NNN]ttt{ONES}
+ twos := [NNN]ttt{TWOS}
+ if onesA != onesB {
+ println("onesA != onesB in CheckEqNNN_TTT")
+ }
+ if onesA == twos {
+ println("onesA == twos in CheckEqNNN_TTT")
+ }
+ if onesB == twos {
+ println("onesB == twos in CheckEqNNN_TTT")
+ }
+ if s := fmt.Sprint(onesA == onesB, onesA != twos, onesB != twos); s != "true true true" {
+ println("fail in CheckEqNNN_TTT:", s)
+ }
+}
+
+func CheckEqNNN_TTTExtraVar() {
+ onesA := [NNN]ttt{ONES}
+ onesB := [NNN]ttt{ONES}
+ twos := [NNN]ttt{TWOS}
+ onesX := onesA
+ if onesA != onesB {
+ println("onesA != onesB in CheckEqNNN_TTTExtraVar")
+ }
+ if onesA == twos {
+ println("onesA == twos in CheckEqNNN_TTTExtraVar")
+ }
+ if onesB == twos {
+ println("onesB == twos in CheckEqNNN_TTTExtraVar")
+ }
+ if s := fmt.Sprint(onesA == onesB, onesA != twos, onesB != twos); s != "true true true" {
+ println("fail in CheckEqNNN_TTTExtraVar:", s)
+ }
+ if s := fmt.Sprint(onesB == onesX); s != "true" {
+ println("extra var fail in CheckEqNNN_TTTExtraVar")
+ }
+}
+`
+
+func main() {
+ fmt.Print("// run\n\n")
+ fmt.Print("// THIS FILE IS AUTO-GENERATED\n\n")
+ fmt.Print("package main\n\n")
+ fmt.Println(`import "fmt"`)
+
+ types := []string{
+ "int", "int8", "int16", "int32", "int64",
+ "uint", "uint8", "uint16", "uint32", "uint64",
+ "float32", "float64"}
+ tocall := make([]string, 0, 32*len(types))
+ for i := 1; i <= 32; i++ {
+ for _, typ := range types {
+ src := template
+ src = strings.Replace(src, "NNN", fmt.Sprint(i), -1)
+ src = strings.Replace(src, "TTT", strings.Title(typ), -1)
+ src = strings.Replace(src, "ttt", typ, -1)
+ src = strings.Replace(src, "ONES", "1"+strings.Repeat(", 1", i-1), -1)
+ src = strings.Replace(src, "TWOS", "2"+strings.Repeat(", 2", i-1), -1)
+ fmt.Print(src)
+ tocall = append(tocall, fmt.Sprintf("CheckEq%d_%s", i, strings.Title(typ)))
+ }
+ }
+ fmt.Println("func main() {")
+ for _, fun := range tocall {
+ fmt.Printf("\t%s()\n", fun)
+ fmt.Printf("\t%sExtraVar()\n", fun)
+ }
+ fmt.Println("}")
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5172.go b/gcc/testsuite/go.test/test/fixedbugs/issue5172.go
new file mode 100644
index 0000000000..a6acbd3db7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5172.go
@@ -0,0 +1,19 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5172: spurious warn about type conversion on broken type inside go and defer
+
+package main
+
+type foo struct {
+ x bar // ERROR "undefined"
+}
+
+func main() {
+ var f foo
+ go f.bar() // GCCGO_ERROR "undefined"
+ defer f.bar() // GCCGO_ERROR "undefined"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5231.go b/gcc/testsuite/go.test/test/fixedbugs/issue5231.go
new file mode 100644
index 0000000000..4039913dc9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5231.go
@@ -0,0 +1,45 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5231: method values lose their variadic property.
+
+package p
+
+type T int
+
+func (t T) NotVariadic(s []int) int {
+ return int(t) + s[0]
+}
+
+func (t T) Variadic(s ...int) int {
+ return int(t) + s[0]
+}
+
+type I interface {
+ NotVariadic(s []int) int
+ Variadic(s ...int) int
+}
+
+func F() {
+ var t T
+ var p *T = &t
+ var i I = p
+
+ nv := t.NotVariadic
+ nv = p.NotVariadic
+ nv = i.NotVariadic
+ var s int = nv([]int{1, 2, 3})
+
+ v := t.Variadic
+ v = p.Variadic
+ v = i.Variadic
+ s = v(1, 2, 3)
+
+ var f1 func([]int) int = nv
+ var f2 func(...int) int = v
+
+ _, _, _ = f1, f2, s
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5244.go b/gcc/testsuite/go.test/test/fixedbugs/issue5244.go
new file mode 100644
index 0000000000..e26c7b8c45
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5244.go
@@ -0,0 +1,18 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5244: the init order computation uses the wrong
+// order for top-level blank identifier assignments.
+// The example used to panic because it tries calling a
+// nil function instead of assigning to f before.
+
+package main
+
+var f = func() int { return 1 }
+var _ = f() + g()
+var g = func() int { return 2 }
+
+func main() {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/bug.go b/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/bug.go
new file mode 100644
index 0000000000..8512461686
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/bug.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package bug
+
+type S struct {
+ F func()
+}
+
+type X interface {
+ Bar()
+}
+
+func Foo(x X) *S {
+ return &S{F: x.Bar}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/main.go
new file mode 100644
index 0000000000..ad1da78f5f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5259.dir/main.go
@@ -0,0 +1,16 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./bug"
+
+type foo int
+
+func (f *foo) Bar() {
+}
+
+func main() {
+ bug.Foo(new(foo))
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5259.go b/gcc/testsuite/go.test/test/fixedbugs/issue5259.go
new file mode 100644
index 0000000000..00fe19ff94
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5259.go
@@ -0,0 +1,9 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5259: Inlining of method value causes internal compiler error
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/a.go
new file mode 100644
index 0000000000..5a2c99f65c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/a.go
@@ -0,0 +1,7 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+const BOM = "\uFEFF"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/b.go
new file mode 100644
index 0000000000..299b75e4a7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5260.dir/b.go
@@ -0,0 +1,11 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func main() {
+ _ = a.BOM
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5260.go b/gcc/testsuite/go.test/test/fixedbugs/issue5260.go
new file mode 100644
index 0000000000..11fd5d0481
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5260.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5260: Unicode BOM in exported string constant
+// cannot be read back during package import.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/pkg1.go b/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/pkg1.go
new file mode 100644
index 0000000000..b1c893ac83
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/pkg1.go
@@ -0,0 +1,34 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package pkg1
+
+import (
+ "runtime"
+)
+
+type T2 *[]string
+
+type Data struct {
+ T1 *[]T2
+}
+
+func CrashCall() (err error) {
+ var d Data
+
+ for count := 0; count < 10; count++ {
+ runtime.GC()
+
+ len := 2 // crash when >=2
+ x := make([]T2, len)
+
+ d = Data{T1: &x}
+
+ for j := 0; j < len; j++ {
+ y := make([]string, 1)
+ (*d.T1)[j] = &y
+ }
+ }
+ return nil
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/prog.go b/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/prog.go
new file mode 100644
index 0000000000..8301091bd8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5291.dir/prog.go
@@ -0,0 +1,17 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "./pkg1"
+)
+
+type message struct { // Presence of this creates a crash
+ data pkg1.Data
+}
+
+func main() {
+ pkg1.CrashCall()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5291.go b/gcc/testsuite/go.test/test/fixedbugs/issue5291.go
new file mode 100644
index 0000000000..00d2ada4cc
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5291.go
@@ -0,0 +1,9 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5291: GC crash
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5358.go b/gcc/testsuite/go.test/test/fixedbugs/issue5358.go
new file mode 100644
index 0000000000..c2b1da9e0e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5358.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5358: incorrect error message when using f(g()) form on ... args.
+
+package main
+
+func f(x int, y ...int) {}
+
+func g() (int, []int)
+
+func main() {
+ f(g()) // ERROR "as type int in|incompatible type"
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/a.go
new file mode 100644
index 0000000000..302822d238
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/a.go
@@ -0,0 +1,27 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type Foo interface {
+ Hi() string
+}
+
+func Test1() Foo { return make(tst1) }
+
+type tst1 map[string]bool
+
+func (r tst1) Hi() string { return "Hi!" }
+
+func Test2() Foo { return make(tst2, 0) }
+
+type tst2 []string
+
+func (r tst2) Hi() string { return "Hi!" }
+
+func Test3() Foo { return make(tst3) }
+
+type tst3 chan string
+
+func (r tst3) Hi() string { return "Hi!" }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/b.go
new file mode 100644
index 0000000000..0801c149cf
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5470.dir/b.go
@@ -0,0 +1,13 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+func main() {
+ a.Test1()
+ a.Test2()
+ a.Test3()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5470.go b/gcc/testsuite/go.test/test/fixedbugs/issue5470.go
new file mode 100644
index 0000000000..6123c0983a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5470.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5470: exported data for inlining may miss
+// the type argument of make.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5493.go b/gcc/testsuite/go.test/test/fixedbugs/issue5493.go
new file mode 100644
index 0000000000..2ee0398af2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5493.go
@@ -0,0 +1,59 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "runtime"
+ "sync"
+ "sync/atomic"
+ "time"
+)
+
+const N = 10
+var count int64
+
+func run() error {
+ f1 := func() {}
+ f2 := func() {
+ func() {
+ f1()
+ }()
+ }
+ runtime.SetFinalizer(&f1, func(f *func()) {
+ atomic.AddInt64(&count, -1)
+ })
+ go f2()
+ return nil
+}
+
+func main() {
+ // Does not work on 32-bits, or with gccgo, due to partially
+ // conservative GC.
+ // Try to enable when we have fully precise GC.
+ if runtime.GOARCH != "amd64" || runtime.Compiler == "gccgo" {
+ return
+ }
+ count = N
+ var wg sync.WaitGroup
+ wg.Add(N)
+ for i := 0; i < N; i++ {
+ go func() {
+ run()
+ wg.Done()
+ }()
+ }
+ wg.Wait()
+ for i := 0; i < 2*N; i++ {
+ time.Sleep(10 * time.Millisecond)
+ runtime.GC()
+ }
+ if count != 0 {
+ println(count, "out of", N, "finalizer are not called")
+ panic("not all finalizers are called")
+ }
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5515.go b/gcc/testsuite/go.test/test/fixedbugs/issue5515.go
new file mode 100644
index 0000000000..053abf6f7c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5515.go
@@ -0,0 +1,34 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5515: miscompilation doing inlining in generated method wrapper
+
+package main
+
+type T uint32
+
+func main() {
+ b := make([]T, 8)
+ b[0] = 0xdeadbeef
+ rs := Slice(b)
+ sort(rs)
+}
+
+type Slice []T
+
+func (s Slice) Swap(i, j int) {
+ tmp := s[i]
+ s[i] = s[j]
+ s[j] = tmp
+}
+
+type Interface interface {
+ Swap(i, j int)
+}
+
+func sort(data Interface) {
+ data.Swap(0, 4)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5581.go b/gcc/testsuite/go.test/test/fixedbugs/issue5581.go
new file mode 100644
index 0000000000..36a4ad671d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5581.go
@@ -0,0 +1,34 @@
+// errorcheck
+
+// Used to emit a spurious "invalid recursive type" error.
+// See golang.org/issue/5581.
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "fmt"
+
+func NewBar() *Bar { return nil }
+
+func (x *Foo) Method() (int, error) {
+ for y := range x.m {
+ _ = y.A
+ }
+ return 0, nil
+}
+
+type Foo struct {
+ m map[*Bar]int
+}
+
+type Bar struct {
+ A *Foo
+ B chan Blah // ERROR "undefined.*Blah"
+}
+
+func main() {
+ fmt.Println("Hello, playground")
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5607.go b/gcc/testsuite/go.test/test/fixedbugs/issue5607.go
new file mode 100644
index 0000000000..785be7a2c7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5607.go
@@ -0,0 +1,36 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5607: generation of init() function incorrectly
+// uses initializers of blank variables inside closures.
+
+package main
+
+var Test = func() {
+ var mymap = map[string]string{"a": "b"}
+
+ var innerTest = func() {
+ // Used to crash trying to compile this line as
+ // part of init() (funcdepth mismatch).
+ var _, x = mymap["a"]
+ println(x)
+ }
+ innerTest()
+}
+
+var Test2 = func() {
+ // The following initializer should not be part of init()
+ // The compiler used to generate a call to Panic() in init().
+ var _, x = Panic()
+ _ = x
+}
+
+func Panic() (int, int) {
+ panic("omg")
+ return 1, 2
+}
+
+func main() {}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5609.go b/gcc/testsuite/go.test/test/fixedbugs/issue5609.go
new file mode 100644
index 0000000000..ea770b4865
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5609.go
@@ -0,0 +1,13 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5609: overflow when calculating array size
+
+package pkg
+
+const Large uint64 = 18446744073709551615
+
+var foo [Large]uint64 // ERROR "array bound is too large|array bound overflows"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/rethinkgo.go b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/rethinkgo.go
new file mode 100644
index 0000000000..4ae66d679e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/rethinkgo.go
@@ -0,0 +1,16 @@
+package rethinkgo
+
+type Session struct {
+}
+
+func (s *Session) Run(query Exp) *int { return nil }
+
+type List []interface{}
+
+type Exp struct {
+ args []interface{}
+}
+
+func (e Exp) UseOutdated(useOutdated bool) Exp {
+ return Exp{args: List{e, useOutdated}}
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/x.go b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/x.go
new file mode 100644
index 0000000000..7e4f3a7e6b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/x.go
@@ -0,0 +1,7 @@
+package x
+
+import "./rethinkgo"
+
+var S *rethinkgo.Session
+
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/y.go b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/y.go
new file mode 100644
index 0000000000..97cc93a79d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5614.dir/y.go
@@ -0,0 +1,5 @@
+package y
+
+import "./x"
+
+var T = x.S
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5614.go b/gcc/testsuite/go.test/test/fixedbugs/issue5614.go
new file mode 100644
index 0000000000..f2518d2a0c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5614.go
@@ -0,0 +1,11 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5614: exported data for inlining may miss
+// named types when used in implicit conversion to
+// their underlying type.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5698.go b/gcc/testsuite/go.test/test/fixedbugs/issue5698.go
new file mode 100644
index 0000000000..035bbd35d2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5698.go
@@ -0,0 +1,18 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5698: can define a key type with slices.
+
+package main
+
+type Key struct {
+ a int16 // the compiler was confused by the padding.
+ b []int
+}
+
+type Val struct{}
+
+type Map map[Key]Val // ERROR "invalid map key type"
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5704.go b/gcc/testsuite/go.test/test/fixedbugs/issue5704.go
new file mode 100644
index 0000000000..1dfa072143
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5704.go
@@ -0,0 +1,46 @@
+// run
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5704: Conversions of empty strings to byte
+// or rune slices return empty but non-nil slices.
+
+package main
+
+type (
+ mystring string
+ mybytes []byte
+ myrunes []rune
+)
+
+func checkBytes(s []byte, arg string) {
+ if len(s) != 0 {
+ panic("len(" + arg + ") != 0")
+ }
+ if s == nil {
+ panic(arg + " == nil")
+ }
+}
+
+func checkRunes(s []rune, arg string) {
+ if len(s) != 0 {
+ panic("len(" + arg + ") != 0")
+ }
+ if s == nil {
+ panic(arg + " == nil")
+ }
+}
+
+func main() {
+ checkBytes([]byte(""), `[]byte("")`)
+ checkBytes([]byte(mystring("")), `[]byte(mystring(""))`)
+ checkBytes(mybytes(""), `mybytes("")`)
+ checkBytes(mybytes(mystring("")), `mybytes(mystring(""))`)
+
+ checkRunes([]rune(""), `[]rune("")`)
+ checkRunes([]rune(mystring("")), `[]rune(mystring(""))`)
+ checkRunes(myrunes(""), `myrunes("")`)
+ checkRunes(myrunes(mystring("")), `myrunes(mystring(""))`)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5753.go b/gcc/testsuite/go.test/test/fixedbugs/issue5753.go
new file mode 100644
index 0000000000..230a1e8c3b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5753.go
@@ -0,0 +1,29 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5753: bad typecheck info causes escape analysis to
+// not run on method thunks.
+
+package main
+
+type Thing struct{}
+
+func (t *Thing) broken(s string) []string {
+ foo := [1]string{s}
+ return foo[:]
+}
+
+func main() {
+ t := &Thing{}
+
+ f := t.broken
+ s := f("foo")
+ _ = f("bar")
+ if s[0] != "foo" {
+ panic(`s[0] != "foo"`)
+ }
+
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/a.go
new file mode 100644
index 0000000000..aa398e82b2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/a.go
@@ -0,0 +1,60 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type I interface {
+ F()
+}
+
+type foo1 []byte
+type foo2 []rune
+type foo3 []uint8
+type foo4 []int32
+type foo5 string
+type foo6 string
+type foo7 string
+type foo8 string
+type foo9 string
+
+func (f foo1) F() { return }
+func (f foo2) F() { return }
+func (f foo3) F() { return }
+func (f foo4) F() { return }
+func (f foo5) F() { return }
+func (f foo6) F() { return }
+func (f foo7) F() { return }
+func (f foo8) F() { return }
+func (f foo9) F() { return }
+
+func Test1(s string) I { return foo1(s) }
+func Test2(s string) I { return foo2(s) }
+func Test3(s string) I { return foo3(s) }
+func Test4(s string) I { return foo4(s) }
+func Test5(s []byte) I { return foo5(s) }
+func Test6(s []rune) I { return foo6(s) }
+func Test7(s []uint8) I { return foo7(s) }
+func Test8(s []int32) I { return foo8(s) }
+func Test9(s int) I { return foo9(s) }
+
+type bar map[int]int
+
+func (b bar) F() { return }
+
+func TestBar() I { return bar{1: 2} }
+
+type baz int
+
+func IsBaz(x interface{}) bool { _, ok := x.(baz); return ok }
+
+type baz2 int
+
+func IsBaz2(x interface{}) bool {
+ switch x.(type) {
+ case baz2:
+ return true
+ default:
+ return false
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/main.go
new file mode 100644
index 0000000000..6d515f26a6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5755.dir/main.go
@@ -0,0 +1,23 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+func main() {
+ a.Test1("frumious")
+ a.Test2("frumious")
+ a.Test3("frumious")
+ a.Test4("frumious")
+
+ a.Test5(nil)
+ a.Test6(nil)
+ a.Test7(nil)
+ a.Test8(nil)
+ a.Test9(0)
+
+ a.TestBar()
+ a.IsBaz(nil)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5755.go b/gcc/testsuite/go.test/test/fixedbugs/issue5755.go
new file mode 100644
index 0000000000..fa7ea4d204
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5755.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5755: exported data for inlining may miss
+// named types when used in string conversions.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5809.go b/gcc/testsuite/go.test/test/fixedbugs/issue5809.go
new file mode 100644
index 0000000000..ca060b55de
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5809.go
@@ -0,0 +1,27 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5809: 6g and 8g attempted to constant propagate indexed LEA
+
+package main
+
+import "fmt"
+
+func main() {
+ const d16 = "0123456789ABCDEF"
+ k := 0x1234
+ var x [4]byte
+
+ x[0] = d16[k>>12&0xf]
+ x[1] = d16[k>>8&0xf]
+ x[2] = d16[k>>4&0xf]
+ x[3] = d16[k&0xf]
+
+ if x != [4]byte{'1','2','3','4'} {
+ fmt.Println(x)
+ panic("x != [4]byte{'1','2','3','4'}")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5820.go b/gcc/testsuite/go.test/test/fixedbugs/issue5820.go
new file mode 100644
index 0000000000..94de06d57d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5820.go
@@ -0,0 +1,18 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 5820: register clobber when clearfat and 64 bit arithmetic is interleaved.
+
+package main
+
+func main() {
+ array := make([][]int, 2)
+ index := uint64(1)
+ array[index] = nil
+ if array[1] != nil {
+ panic("array[1] != nil")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5841.go b/gcc/testsuite/go.test/test/fixedbugs/issue5841.go
new file mode 100644
index 0000000000..cfc4a504c5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5841.go
@@ -0,0 +1,16 @@
+// build
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5841: 8g produces invalid CMPL $0, $0.
+// Similar to issue 5002, used to fail at link time.
+
+package main
+
+func main() {
+ var y int
+ if y%1 == 0 {
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5856.go b/gcc/testsuite/go.test/test/fixedbugs/issue5856.go
new file mode 100644
index 0000000000..35cadf8c9e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5856.go
@@ -0,0 +1,38 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "fmt"
+ "os"
+ "runtime"
+ "strings"
+)
+
+func main() {
+ f()
+ panic("deferred function not run")
+}
+
+var x = 1
+
+func f() {
+ if x == 0 {
+ return
+ }
+ defer g()
+ panic("panic")
+}
+
+func g() {
+ _, file, line, _ := runtime.Caller(2)
+ if !strings.HasSuffix(file, "issue5856.go") || line != 28 {
+ fmt.Printf("BUG: defer called from %s:%d, want issue5856.go:28\n", file, line)
+ os.Exit(1)
+ }
+ os.Exit(0)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/a.go
new file mode 100644
index 0000000000..b236c15c7d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/a.go
@@ -0,0 +1,22 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type Package struct {
+ name string
+}
+
+type Future struct {
+ result chan struct {
+ *Package
+ error
+ }
+}
+
+func (t *Future) Result() (*Package, error) {
+ result := <-t.result
+ t.result <- result
+ return result.Package, result.error
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/main.go
new file mode 100644
index 0000000000..c5d42ea098
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5910.dir/main.go
@@ -0,0 +1,12 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "a"
+
+func main() {
+ f := new(a.Future)
+ f.Result()
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5910.go b/gcc/testsuite/go.test/test/fixedbugs/issue5910.go
new file mode 100644
index 0000000000..54e74bac8d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5910.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 5910: parsing of unnamed struct types
+// in inlined bodies was broken.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/a.go
new file mode 100644
index 0000000000..7411d5fcd5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/a.go
@@ -0,0 +1,3 @@
+package surprise
+
+var X int
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/b.go
new file mode 100644
index 0000000000..9bc561b9ce
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/b.go
@@ -0,0 +1,2 @@
+package surprise2
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
new file mode 100644
index 0000000000..a1781d4d40
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5957.dir/c.go
@@ -0,0 +1,12 @@
+package p
+
+import (
+ "./a" // ERROR "imported and not used: \x22a\x22 as surprise|imported and not used: surprise"
+ "./b" // GC_ERROR "imported and not used: \x22b\x22 as surprise2|imported and not used: surprise2"
+ b "./b" // ERROR "imported and not used: \x22b\x22$|imported and not used: surprise2"
+ foo "math" // ERROR "imported and not used: \x22math\x22 as foo|imported and not used: math"
+ "fmt" // actually used
+ "strings" // ERROR "imported and not used: \x22strings\x22|imported and not used: strings"
+)
+
+var _ = fmt.Printf
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5957.go b/gcc/testsuite/go.test/test/fixedbugs/issue5957.go
new file mode 100644
index 0000000000..891d8e6d2e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5957.go
@@ -0,0 +1,7 @@
+// errorcheckdir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue5963.go b/gcc/testsuite/go.test/test/fixedbugs/issue5963.go
new file mode 100644
index 0000000000..190e8f4564
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue5963.go
@@ -0,0 +1,50 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to die in runtime due to init goroutine exiting while
+// locked to main thread.
+
+package main
+
+import (
+ "os"
+ "runtime"
+)
+
+func init() {
+ c := make(chan int, 1)
+ defer func() {
+ c <- 0
+ }()
+ go func() {
+ os.Exit(<-c)
+ }()
+ runtime.Goexit()
+}
+
+func main() {
+}
+
+/* Before fix:
+
+invalid m->locked = 2
+fatal error: internal lockOSThread error
+
+goroutine 2 [runnable]:
+runtime.MHeap_Scavenger()
+ /Users/rsc/g/go/src/pkg/runtime/mheap.c:438
+runtime.goexit()
+ /Users/rsc/g/go/src/pkg/runtime/proc.c:1313
+created by runtime.main
+ /Users/rsc/g/go/src/pkg/runtime/proc.c:165
+
+goroutine 3 [runnable]:
+main.func·002()
+ /Users/rsc/g/go/test/fixedbugs/issue5963.go:22
+created by main.init·1
+ /Users/rsc/g/go/test/fixedbugs/issue5963.go:24 +0xb9
+exit status 2
+*/
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6004.go b/gcc/testsuite/go.test/test/fixedbugs/issue6004.go
new file mode 100644
index 0000000000..45aaffd2c9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6004.go
@@ -0,0 +1,15 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ _ = nil // ERROR "use of untyped nil"
+ _, _ = nil, 1 // ERROR "use of untyped nil"
+ _, _ = 1, nil // ERROR "use of untyped nil"
+ _ = append(nil, 1, 2, 3) // ERROR "untyped nil"
+}
+
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6036.go b/gcc/testsuite/go.test/test/fixedbugs/issue6036.go
new file mode 100644
index 0000000000..5f787c5690
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6036.go
@@ -0,0 +1,44 @@
+// +build amd64
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6036: 6g's backend generates OINDREG with
+// offsets larger than 32-bit.
+
+package main
+
+type T struct {
+ Large [1 << 31]byte
+ A int
+ B int
+}
+
+func F(t *T) {
+ t.B = t.A
+}
+
+type T2 [1<<31 + 2]byte
+
+func F2(t *T2) {
+ t[1<<31+1] = 42
+}
+
+type T3 [1<<15 + 1][1<<15 + 1]int
+
+func F3(t *T3) {
+ t[1<<15][1<<15] = 42
+}
+
+type S struct {
+ A int32
+ B int32
+}
+
+type T4 [1<<29 + 1]S
+
+func F4(t *T4) {
+ t[1<<29].B = 42
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6055.go b/gcc/testsuite/go.test/test/fixedbugs/issue6055.go
new file mode 100644
index 0000000000..698f62ac95
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6055.go
@@ -0,0 +1,35 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "runtime"
+
+type Closer interface {
+ Close()
+}
+
+func nilInterfaceDeferCall() {
+ defer func() {
+ // make sure a traceback happens with jmpdefer on the stack
+ runtime.GC()
+ }()
+ var x Closer
+ defer x.Close()
+}
+
+func shouldPanic(f func()) {
+ defer func() {
+ if recover() == nil {
+ panic("did not panic")
+ }
+ }()
+ f()
+}
+
+func main() {
+ shouldPanic(nilInterfaceDeferCall)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6131.go b/gcc/testsuite/go.test/test/fixedbugs/issue6131.go
new file mode 100644
index 0000000000..817e4a877c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6131.go
@@ -0,0 +1,20 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6131: missing typecheck after reducing
+// n%1 == 0 to a constant value.
+
+package main
+
+func isGood(n int) bool {
+ return n%1 == 0
+}
+
+func main() {
+ if !isGood(256) {
+ panic("!isGood")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6140.go b/gcc/testsuite/go.test/test/fixedbugs/issue6140.go
new file mode 100644
index 0000000000..d494933b2e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6140.go
@@ -0,0 +1,31 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6140: compiler incorrectly rejects method values
+// whose receiver has an unnamed interface type.
+
+package p
+
+type T *interface {
+ m() int
+}
+
+var x T
+
+var _ = (*x).m
+
+var y interface {
+ m() int
+}
+
+var _ = y.m
+
+type I interface {
+ String() string
+}
+
+var z *struct{ I }
+var _ = z.String
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6247.go b/gcc/testsuite/go.test/test/fixedbugs/issue6247.go
new file mode 100644
index 0000000000..eea8f9c878
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6247.go
@@ -0,0 +1,17 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6247: 5g used to be confused by the numbering
+// of floating-point registers.
+
+package main
+
+var p map[string]interface{}
+var v interface{}
+
+func F() {
+ p["hello"] = v.(complex128) * v.(complex128)
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6269.go b/gcc/testsuite/go.test/test/fixedbugs/issue6269.go
new file mode 100644
index 0000000000..af5feb7286
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6269.go
@@ -0,0 +1,39 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// issue 6269: name collision on method names for function local types.
+
+package main
+
+type foo struct{}
+
+func (foo) Error() string {
+ return "ok"
+}
+
+type bar struct{}
+
+func (bar) Error() string {
+ return "fail"
+}
+
+func unused() {
+ type collision struct {
+ bar
+ }
+ _ = collision{}
+}
+
+func main() {
+ type collision struct {
+ foo
+ }
+ s := error(collision{})
+ if str := s.Error(); str != "ok" {
+ println("s.Error() ==", str)
+ panic(`s.Error() != "ok"`)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6298.go b/gcc/testsuite/go.test/test/fixedbugs/issue6298.go
new file mode 100644
index 0000000000..6303dbe5b0
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6298.go
@@ -0,0 +1,15 @@
+// compile
+
+// golang.org/issue/6298.
+// Used to cause "internal error: typename ideal bool"
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ var x interface{} = "abc"[0] == 'a'
+ _ = x
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6399.go b/gcc/testsuite/go.test/test/fixedbugs/issue6399.go
new file mode 100644
index 0000000000..b3d1c855b2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6399.go
@@ -0,0 +1,27 @@
+// compile
+
+package main
+
+type Foo interface {
+ Print()
+}
+
+type Bar struct{}
+
+func (b Bar) Print() {}
+
+func main() {
+ b := make([]Bar, 20)
+ f := make([]Foo, 20)
+ for i := range f {
+ f[i] = b[i]
+ }
+ T(f)
+ _ = make([]struct{}, 1)
+}
+
+func T(f []Foo) {
+ for i := range f {
+ f[i].Print()
+ }
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/a.go
new file mode 100644
index 0000000000..da90ca377b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/a.go
@@ -0,0 +1,7 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type T struct{ int }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/b.go
new file mode 100644
index 0000000000..3b35b2d324
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/b.go
@@ -0,0 +1,9 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package b
+
+import "./a"
+
+type U struct{ a.T }
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/main.go
new file mode 100644
index 0000000000..f09b727482
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6513.dir/main.go
@@ -0,0 +1,16 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "./a"
+ "./b"
+)
+
+func main() {
+ var t a.T
+ var u b.U
+ _, _ = t, u
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6513.go b/gcc/testsuite/go.test/test/fixedbugs/issue6513.go
new file mode 100644
index 0000000000..b32e0c5614
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6513.go
@@ -0,0 +1,10 @@
+// compiledir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6513: embedded builtins may get incorrect qualified
+// field name during import.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/a.go b/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/a.go
new file mode 100644
index 0000000000..9c90e0740c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/a.go
@@ -0,0 +1,14 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package a
+
+type unexported struct {
+ a int
+ b bool
+}
+
+type Struct struct {
+ unexported
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/b.go b/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/b.go
new file mode 100644
index 0000000000..b6a6fc317f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6789.dir/b.go
@@ -0,0 +1,12 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "./a"
+
+type s a.Struct
+
+func main() {
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6789.go b/gcc/testsuite/go.test/test/fixedbugs/issue6789.go
new file mode 100644
index 0000000000..e3a2c3320e
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6789.go
@@ -0,0 +1,10 @@
+// rundir
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Issue 6789: gccgo failed to find the hash function for an
+// unexported struct embedded in an exported struct.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6899.go b/gcc/testsuite/go.test/test/fixedbugs/issue6899.go
new file mode 100644
index 0000000000..a693bf2850
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6899.go
@@ -0,0 +1,13 @@
+// cmpout
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import "math"
+
+func main() {
+ println(math.Copysign(0, -1))
+}
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue6899.out b/gcc/testsuite/go.test/test/fixedbugs/issue6899.out
new file mode 100644
index 0000000000..e2375f0776
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue6899.out
@@ -0,0 +1 @@
+-0.000000e+000
diff --git a/gcc/testsuite/go.test/test/fixedbugs/issue887.go b/gcc/testsuite/go.test/test/fixedbugs/issue887.go
new file mode 100644
index 0000000000..5bc193bf96
--- /dev/null
+++ b/gcc/testsuite/go.test/test/fixedbugs/issue887.go
@@ -0,0 +1,36 @@
+// compile
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Used to leak registers on 8g.
+
+package p
+
+func f(x byte, y uint64) {
+ var r byte
+ switch y {
+ case 1:
+ r = x << y // '>>' triggers it too
+ case 2:
+ r = x << y
+ case 3:
+ r = x << y
+ case 4:
+ r = x << y
+ case 5:
+ r = x << y
+ case 6:
+ r = x << y
+ case 7:
+ r = x << y
+ case 8:
+ r = x << y
+ case 9:
+ r = x << y
+ case 10:
+ r = x << y
+ }
+ _ = r
+}
diff --git a/gcc/testsuite/go.test/test/float_lit.go b/gcc/testsuite/go.test/test/float_lit.go
index 7b91d88e51..4efae2362d 100644
--- a/gcc/testsuite/go.test/test/float_lit.go
+++ b/gcc/testsuite/go.test/test/float_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test floating-point literal syntax.
+
package main
var bad bool
@@ -194,4 +196,8 @@ func main() {
if !close(-210.012e19, -210012, 1000, 19) {
print("-210.012e19 is ", -210.012e19, "\n")
}
+
+ if bad {
+ panic("float_lit")
+ }
}
diff --git a/gcc/testsuite/go.test/test/floatcmp.go b/gcc/testsuite/go.test/test/floatcmp.go
index f51cbc2777..6c424ccd90 100644
--- a/gcc/testsuite/go.test/test/floatcmp.go
+++ b/gcc/testsuite/go.test/test/floatcmp.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test floating-point comparison involving NaN.
+
package main
import "math"
@@ -85,4 +87,7 @@ func main() {
println(t.name, "=", t.expr, "want", t.want)
}
}
+ if bad {
+ panic("floatcmp failed")
+ }
}
diff --git a/gcc/testsuite/go.test/test/for.go b/gcc/testsuite/go.test/test/for.go
index 36ad15709b..8a50090657 100644
--- a/gcc/testsuite/go.test/test/for.go
+++ b/gcc/testsuite/go.test/test/for.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test for loops.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/gcc/testsuite/go.test/test/func.go b/gcc/testsuite/go.test/test/func.go
index e8ed928bcd..246cb56fd9 100644
--- a/gcc/testsuite/go.test/test/func.go
+++ b/gcc/testsuite/go.test/test/func.go
@@ -1,9 +1,10 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple functions.
package main
diff --git a/gcc/testsuite/go.test/test/func1.go b/gcc/testsuite/go.test/test/func1.go
index 056ff9877d..fb6f56184f 100644
--- a/gcc/testsuite/go.test/test/func1.go
+++ b/gcc/testsuite/go.test/test/func1.go
@@ -1,18 +1,19 @@
-// errchk $G $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// does not compile and should not compile
+// Test that result parameters are in the same scope as regular parameters.
+// Does not compile.
package main
-func f1(a int) (int, float32) { // BUG (not caught by compiler): multiple return values must have names
+func f1(a int) (int, float32) {
return 7, 7.0
}
-func f2(a int) (a int, b float32) { // ERROR "redeclared|definition"
+func f2(a int) (a int, b float32) { // ERROR "duplicate argument a|definition"
return 8, 8.0
}
diff --git a/gcc/testsuite/go.test/test/func2.go b/gcc/testsuite/go.test/test/func2.go
index 87e78194ef..b5966a91f6 100644
--- a/gcc/testsuite/go.test/test/func2.go
+++ b/gcc/testsuite/go.test/test/func2.go
@@ -1,9 +1,12 @@
-// $G $F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test function signatures.
+// Compiled but not run.
+
package main
type t1 int
diff --git a/gcc/testsuite/go.test/test/func3.go b/gcc/testsuite/go.test/test/func3.go
index 110b0ef1c4..6be3bf0184 100644
--- a/gcc/testsuite/go.test/test/func3.go
+++ b/gcc/testsuite/go.test/test/func3.go
@@ -1,9 +1,12 @@
-// errchk $G $F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal function signatures are detected.
+// Does not compile.
+
package main
type t1 int
diff --git a/gcc/testsuite/go.test/test/func4.go b/gcc/testsuite/go.test/test/func4.go
index 2a1a932de9..85f1e4b81e 100644
--- a/gcc/testsuite/go.test/test/func4.go
+++ b/gcc/testsuite/go.test/test/func4.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that it is illegal to take the address of a function.
+// Does not compile.
+
package main
var notmain func()
diff --git a/gcc/testsuite/go.test/test/func5.go b/gcc/testsuite/go.test/test/func5.go
index e27825c2b2..2e058be7e6 100644
--- a/gcc/testsuite/go.test/test/func5.go
+++ b/gcc/testsuite/go.test/test/func5.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test functions and goroutines.
+
package main
func caller(f func(int, int) int, a, b int, c chan int) {
diff --git a/gcc/testsuite/go.test/test/func6.go b/gcc/testsuite/go.test/test/func6.go
index 1356b6aa8b..456cb49f09 100644
--- a/gcc/testsuite/go.test/test/func6.go
+++ b/gcc/testsuite/go.test/test/func6.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test closures in if conditions.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/func7.go b/gcc/testsuite/go.test/test/func7.go
index e38b008cc0..2d646b6786 100644
--- a/gcc/testsuite/go.test/test/func7.go
+++ b/gcc/testsuite/go.test/test/func7.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test evaluation order in if condition.
+
package main
var calledf = false
@@ -15,7 +17,7 @@ func f() int {
func g() int {
if !calledf {
- println("BUG: func7 - called g before f")
+ panic("BUG: func7 - called g before f")
}
return 0
}
@@ -26,4 +28,3 @@ func main() {
panic("wrong answer")
}
}
-
diff --git a/gcc/testsuite/go.test/test/func8.go b/gcc/testsuite/go.test/test/func8.go
new file mode 100644
index 0000000000..13051802ec
--- /dev/null
+++ b/gcc/testsuite/go.test/test/func8.go
@@ -0,0 +1,49 @@
+// run
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test evaluation order.
+
+package main
+
+var calledf int
+
+func f() int {
+ calledf++
+ return 0
+}
+
+func g() int {
+ return calledf
+}
+
+var xy string
+
+func x() bool {
+ for false {
+ } // no inlining
+ xy += "x"
+ return false
+}
+
+func y() string {
+ for false {
+ } // no inlining
+ xy += "y"
+ return "abc"
+}
+
+func main() {
+ if f() == g() {
+ panic("wrong f,g order")
+ }
+
+ if x() == (y() == "abc") {
+ panic("wrong compare")
+ }
+ if xy != "xy" {
+ panic("wrong x,y order")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/funcdup.go b/gcc/testsuite/go.test/test/funcdup.go
new file mode 100644
index 0000000000..d15d685792
--- /dev/null
+++ b/gcc/testsuite/go.test/test/funcdup.go
@@ -0,0 +1,27 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+type T interface {
+ F1(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+ F2(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+ F3() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
+}
+
+type T1 func(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+type T2 func(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+type T3 func() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
+
+type R struct{}
+
+func (i *R) F1(i int) {} // ERROR "duplicate argument i|redefinition|previous"
+func (i *R) F2() (i int) {return 0} // ERROR "duplicate argument i|redefinition|previous"
+func (i *R) F3(j int) (j int) {return 0} // ERROR "duplicate argument j|redefinition|previous"
+
+func F1(i, i int) {} // ERROR "duplicate argument i|redefinition|previous"
+func F2(i int) (i int) {return 0} // ERROR "duplicate argument i|redefinition|previous"
+func F3() (i, i int) {return 0, 0} // ERROR "duplicate argument i|redefinition|previous"
diff --git a/gcc/testsuite/go.test/test/funcdup2.go b/gcc/testsuite/go.test/test/funcdup2.go
new file mode 100644
index 0000000000..1db1a396b2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/funcdup2.go
@@ -0,0 +1,17 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+var T interface {
+ F1(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+ F2(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+ F3() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
+}
+
+var T1 func(i, i int) // ERROR "duplicate argument i|redefinition|previous"
+var T2 func(i int) (i int) // ERROR "duplicate argument i|redefinition|previous"
+var T3 func() (i, i int) // ERROR "duplicate argument i|redefinition|previous"
diff --git a/gcc/testsuite/go.test/test/gc.go b/gcc/testsuite/go.test/test/gc.go
index 3aab8fac95..6688f9fbdd 100644
--- a/gcc/testsuite/go.test/test/gc.go
+++ b/gcc/testsuite/go.test/test/gc.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Simple test of the garbage collector.
+
package main
import "runtime"
diff --git a/gcc/testsuite/go.test/test/gc1.go b/gcc/testsuite/go.test/test/gc1.go
index 84034e7cea..6049ea14e9 100644
--- a/gcc/testsuite/go.test/test/gc1.go
+++ b/gcc/testsuite/go.test/test/gc1.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// A simple test of the garbage collector.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/gc2.go b/gcc/testsuite/go.test/test/gc2.go
index 772f9810da..de52a4fbf2 100644
--- a/gcc/testsuite/go.test/test/gc2.go
+++ b/gcc/testsuite/go.test/test/gc2.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that buffered channels are garbage collected properly.
+// Test that buffered channels are garbage collected properly.
// An interesting case because they have finalizers and used to
// have self loops that kept them from being collected.
// (Cyclic data with finalizers is never finalized, nor collected.)
diff --git a/gcc/testsuite/go.test/test/golden.out b/gcc/testsuite/go.test/test/golden.out
index e0b4cf6e2a..742a5d3f63 100644
--- a/gcc/testsuite/go.test/test/golden.out
+++ b/gcc/testsuite/go.test/test/golden.out
@@ -11,8 +11,13 @@
== dwarf/
+== safe/
+
== fixedbugs/
+=========== fixedbugs/bug429.go
+fatal error: all goroutines are asleep - deadlock!
+
== bugs/
=========== bugs/bug395.go
diff --git a/gcc/testsuite/go.test/test/goprint.go b/gcc/testsuite/go.test/test/goprint.go
index 53ed055a07..cdaccf4f79 100644
--- a/gcc/testsuite/go.test/test/goprint.go
+++ b/gcc/testsuite/go.test/test/goprint.go
@@ -1,14 +1,16 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that println can be the target of a go statement.
+
package main
import "time"
func main() {
go println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255))
- time.Sleep(1e6)
+ time.Sleep(100*time.Millisecond)
}
diff --git a/gcc/testsuite/go.test/test/goto.go b/gcc/testsuite/go.test/test/goto.go
index 1fccb314c8..ca477b3d0c 100644
--- a/gcc/testsuite/go.test/test/goto.go
+++ b/gcc/testsuite/go.test/test/goto.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify goto semantics.
+// Does not compile.
+//
// Each test is in a separate function just so that if the
// compiler stops processing after one error, we don't
// lose other ones.
diff --git a/gcc/testsuite/go.test/test/hashmap.go b/gcc/testsuite/go.test/test/hashmap.go
deleted file mode 100755
index 0a4d7ab61e..0000000000
--- a/gcc/testsuite/go.test/test/hashmap.go
+++ /dev/null
@@ -1,181 +0,0 @@
-// $G $F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-// ----------------------------------------------------------------------------
-// Helper functions
-
-func ASSERT(p bool) {
- if !p {
- // panic 0
- }
-}
-
-
-// ----------------------------------------------------------------------------
-// Implementation of the HashMap
-
-type KeyType interface {
- Hash() uint32
- Match(other KeyType) bool
-}
-
-
-type ValueType interface {
- // empty interface
-}
-
-
-type Entry struct {
- key KeyType
- value ValueType
-}
-
-
-type Array [1024]Entry
-
-type HashMap struct {
- map_ *Array
- log2_capacity_ uint32
- occupancy_ uint32
-}
-
-
-func (m *HashMap) capacity() uint32 {
- return 1 << m.log2_capacity_
-}
-
-
-func (m *HashMap) Clear() {
- // Mark all entries as empty.
- var i uint32 = m.capacity() - 1
- for i > 0 {
- m.map_[i].key = nil
- i = i - 1
- }
- m.occupancy_ = 0
-}
-
-
-func (m *HashMap) Initialize (initial_log2_capacity uint32) {
- m.log2_capacity_ = initial_log2_capacity
- m.map_ = new(Array)
- m.Clear()
-}
-
-
-func (m *HashMap) Probe (key KeyType) *Entry {
- ASSERT(key != nil)
-
- var i uint32 = key.Hash() % m.capacity()
- ASSERT(0 <= i && i < m.capacity())
-
- ASSERT(m.occupancy_ < m.capacity()) // guarantees loop termination
- for m.map_[i].key != nil && !m.map_[i].key.Match(key) {
- i++
- if i >= m.capacity() {
- i = 0
- }
- }
-
- return &m.map_[i]
-}
-
-
-func (m *HashMap) Lookup (key KeyType, insert bool) *Entry {
- // Find a matching entry.
- var p *Entry = m.Probe(key)
- if p.key != nil {
- return p
- }
-
- // No entry found; insert one if necessary.
- if insert {
- p.key = key
- p.value = nil
- m.occupancy_++
-
- // Grow the map if we reached >= 80% occupancy.
- if m.occupancy_ + m.occupancy_/4 >= m.capacity() {
- m.Resize()
- p = m.Probe(key)
- }
-
- return p
- }
-
- // No entry found and none inserted.
- return nil
-}
-
-
-func (m *HashMap) Resize() {
- var hmap *Array = m.map_
- var n uint32 = m.occupancy_
-
- // Allocate a new map of twice the current size.
- m.Initialize(m.log2_capacity_ << 1)
-
- // Rehash all current entries.
- var i uint32 = 0
- for n > 0 {
- if hmap[i].key != nil {
- m.Lookup(hmap[i].key, true).value = hmap[i].value
- n = n - 1
- }
- i++
- }
-}
-
-
-// ----------------------------------------------------------------------------
-// Test code
-
-type Number struct {
- x uint32
-}
-
-
-func (n *Number) Hash() uint32 {
- return n.x * 23
-}
-
-
-func (n *Number) Match(other KeyType) bool {
- // var y *Number = other
- // return n.x == y.x
- return false
-}
-
-
-func MakeNumber (x uint32) *Number {
- var n *Number = new(Number)
- n.x = x
- return n
-}
-
-
-func main() {
- // func (n int) int { return n + 1; }(1)
-
- //print "HashMap - gri 2/8/2008\n"
-
- var hmap *HashMap = new(HashMap)
- hmap.Initialize(0)
-
- var x1 *Number = MakeNumber(1001)
- var x2 *Number = MakeNumber(2002)
- var x3 *Number = MakeNumber(3003)
- _, _, _ = x1, x2, x3
-
- // this doesn't work I think...
- //hmap.Lookup(x1, true)
- //hmap.Lookup(x2, true)
- //hmap.Lookup(x3, true)
-
- //print "done\n"
-}
diff --git a/gcc/testsuite/go.test/test/helloworld.go b/gcc/testsuite/go.test/test/helloworld.go
index 16c95f0068..5025ec9bb3 100644
--- a/gcc/testsuite/go.test/test/helloworld.go
+++ b/gcc/testsuite/go.test/test/helloworld.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that we can do page 1 of the C book.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/if.go b/gcc/testsuite/go.test/test/if.go
index 18a6715d7e..25cc141648 100644
--- a/gcc/testsuite/go.test/test/if.go
+++ b/gcc/testsuite/go.test/test/if.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test if statements in various forms.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/gcc/testsuite/go.test/test/import.go b/gcc/testsuite/go.test/test/import.go
index bd83dc3bdd..d135cd2845 100644
--- a/gcc/testsuite/go.test/test/import.go
+++ b/gcc/testsuite/go.test/test/import.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// check that when import gives multiple names
-// to a type, they're still all the same type
+// Test that when import gives multiple names
+// to a single type, they still all refer to the same type.
package main
diff --git a/gcc/testsuite/go.test/test/import1.go b/gcc/testsuite/go.test/test/import1.go
index ebd704ef99..2433b5f2ad 100644
--- a/gcc/testsuite/go.test/test/import1.go
+++ b/gcc/testsuite/go.test/test/import1.go
@@ -1,10 +1,11 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// check for import conflicts
+// Verify that import conflicts are detected by the compiler.
+// Does not compile.
package main
@@ -13,5 +14,6 @@ import bufio "os" // ERROR "redeclared|redefinition|incompatible" "imported and
import (
"fmt" // GCCGO_ERROR "previous|not used"
- fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used"
+ fmt "math" // ERROR "redeclared|redefinition|incompatible" "imported and not used: \x22math\x22 as fmt"
+ . "math" // GC_ERROR "imported and not used: \x22math\x22$"
)
diff --git a/gcc/testsuite/go.test/test/import2.dir/import2.go b/gcc/testsuite/go.test/test/import2.dir/import2.go
new file mode 100644
index 0000000000..8bb1eb9191
--- /dev/null
+++ b/gcc/testsuite/go.test/test/import2.dir/import2.go
@@ -0,0 +1,42 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Various declarations of exported variables and functions.
+
+package p
+
+var C1 chan <- chan int = (chan<- (chan int))(nil)
+var C2 chan (<- chan int) = (chan (<-chan int))(nil)
+var C3 <- chan chan int = (<-chan (chan int))(nil)
+var C4 chan chan <- int = (chan (chan<- int))(nil)
+
+var C5 <- chan <- chan int = (<-chan (<-chan int))(nil)
+var C6 chan <- <- chan int = (chan<- (<-chan int))(nil)
+var C7 chan <- chan <- int = (chan<- (chan<- int))(nil)
+
+var C8 <- chan <- chan chan int = (<-chan (<-chan (chan int)))(nil)
+var C9 <- chan chan <- chan int = (<-chan (chan<- (chan int)))(nil)
+var C10 chan <- <- chan chan int = (chan<- (<-chan (chan int)))(nil)
+var C11 chan <- chan <- chan int = (chan<- (chan<- (chan int)))(nil)
+var C12 chan chan <- <- chan int = (chan (chan<- (<-chan int)))(nil)
+var C13 chan chan <- chan <- int = (chan (chan<- (chan<- int)))(nil)
+
+var R1 chan<- (chan int) = (chan <- chan int)(nil)
+var R3 <-chan (chan int) = (<- chan chan int)(nil)
+var R4 chan (chan<- int) = (chan chan <- int)(nil)
+
+var R5 <-chan (<-chan int) = (<- chan <- chan int)(nil)
+var R6 chan<- (<-chan int) = (chan <- <- chan int)(nil)
+var R7 chan<- (chan<- int) = (chan <- chan <- int)(nil)
+
+var R8 <-chan (<-chan (chan int)) = (<- chan <- chan chan int)(nil)
+var R9 <-chan (chan<- (chan int)) = (<- chan chan <- chan int)(nil)
+var R10 chan<- (<-chan (chan int)) = (chan <- <- chan chan int)(nil)
+var R11 chan<- (chan<- (chan int)) = (chan <- chan <- chan int)(nil)
+var R12 chan (chan<- (<-chan int)) = (chan chan <- <- chan int)(nil)
+var R13 chan (chan<- (chan<- int)) = (chan chan <- chan <- int)(nil)
+
+var F1 func() func() int
+func F2() func() func() int
+func F3(func() func() int)
diff --git a/gcc/testsuite/go.test/test/import2.dir/import3.go b/gcc/testsuite/go.test/test/import2.dir/import3.go
new file mode 100644
index 0000000000..d7fe37b199
--- /dev/null
+++ b/gcc/testsuite/go.test/test/import2.dir/import3.go
@@ -0,0 +1,52 @@
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that all the types from import2.go made it
+// intact and with the same meaning, by assigning to or using them.
+
+package main
+
+import "./import2"
+
+func f3(func() func() int)
+
+func main() {
+ p.F3(p.F1)
+ p.F3(p.F2())
+ f3(p.F1)
+ f3(p.F2())
+
+ p.C1 = (chan<- (chan int))(nil)
+ p.C2 = (chan (<-chan int))(nil)
+ p.C3 = (<-chan (chan int))(nil)
+ p.C4 = (chan (chan<- int))(nil)
+
+ p.C5 = (<-chan (<-chan int))(nil)
+ p.C6 = (chan<- (<-chan int))(nil)
+ p.C7 = (chan<- (chan<- int))(nil)
+
+ p.C8 = (<-chan (<-chan (chan int)))(nil)
+ p.C9 = (<-chan (chan<- (chan int)))(nil)
+ p.C10 = (chan<- (<-chan (chan int)))(nil)
+ p.C11 = (chan<- (chan<- (chan int)))(nil)
+ p.C12 = (chan (chan<- (<-chan int)))(nil)
+ p.C13 = (chan (chan<- (chan<- int)))(nil)
+
+ p.R1 = (chan <- chan int)(nil)
+ p.R3 = (<- chan chan int)(nil)
+ p.R4 = (chan chan <- int)(nil)
+
+ p.R5 = (<- chan <- chan int)(nil)
+ p.R6 = (chan <- <- chan int)(nil)
+ p.R7 = (chan <- chan <- int)(nil)
+
+ p.R8 = (<- chan <- chan chan int)(nil)
+ p.R9 = (<- chan chan <- chan int)(nil)
+ p.R10 = (chan <- <- chan chan int)(nil)
+ p.R11 = (chan <- chan <- chan int)(nil)
+ p.R12 = (chan chan <- <- chan int)(nil)
+ p.R13 = (chan chan <- chan <- int)(nil)
+
+}
+
diff --git a/gcc/testsuite/go.test/test/import2.go b/gcc/testsuite/go.test/test/import2.go
index 0efc285fac..f8d0b0a0fd 100644
--- a/gcc/testsuite/go.test/test/import2.go
+++ b/gcc/testsuite/go.test/test/import2.go
@@ -1,42 +1,8 @@
-// true # used by import3
+// compiledir
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package p
-
-var C1 chan <- chan int = (chan<- (chan int))(nil)
-var C2 chan (<- chan int) = (chan (<-chan int))(nil)
-var C3 <- chan chan int = (<-chan (chan int))(nil)
-var C4 chan chan <- int = (chan (chan<- int))(nil)
-
-var C5 <- chan <- chan int = (<-chan (<-chan int))(nil)
-var C6 chan <- <- chan int = (chan<- (<-chan int))(nil)
-var C7 chan <- chan <- int = (chan<- (chan<- int))(nil)
-
-var C8 <- chan <- chan chan int = (<-chan (<-chan (chan int)))(nil)
-var C9 <- chan chan <- chan int = (<-chan (chan<- (chan int)))(nil)
-var C10 chan <- <- chan chan int = (chan<- (<-chan (chan int)))(nil)
-var C11 chan <- chan <- chan int = (chan<- (chan<- (chan int)))(nil)
-var C12 chan chan <- <- chan int = (chan (chan<- (<-chan int)))(nil)
-var C13 chan chan <- chan <- int = (chan (chan<- (chan<- int)))(nil)
-
-var R1 chan<- (chan int) = (chan <- chan int)(nil)
-var R3 <-chan (chan int) = (<- chan chan int)(nil)
-var R4 chan (chan<- int) = (chan chan <- int)(nil)
-
-var R5 <-chan (<-chan int) = (<- chan <- chan int)(nil)
-var R6 chan<- (<-chan int) = (chan <- <- chan int)(nil)
-var R7 chan<- (chan<- int) = (chan <- chan <- int)(nil)
-
-var R8 <-chan (<-chan (chan int)) = (<- chan <- chan chan int)(nil)
-var R9 <-chan (chan<- (chan int)) = (<- chan chan <- chan int)(nil)
-var R10 chan<- (<-chan (chan int)) = (chan <- <- chan chan int)(nil)
-var R11 chan<- (chan<- (chan int)) = (chan <- chan <- chan int)(nil)
-var R12 chan (chan<- (<-chan int)) = (chan chan <- <- chan int)(nil)
-var R13 chan (chan<- (chan<- int)) = (chan chan <- chan <- int)(nil)
-
-var F1 func() func() int
-func F2() func() func() int
-func F3(func() func() int)
+// Tests that export data does not corrupt type syntax.
+package ignored
diff --git a/gcc/testsuite/go.test/test/import3.go b/gcc/testsuite/go.test/test/import3.go
deleted file mode 100644
index e4900b93dd..0000000000
--- a/gcc/testsuite/go.test/test/import3.go
+++ /dev/null
@@ -1,54 +0,0 @@
-// $G $D/import2.go && $G $D/$F.go
-
-// Copyright 2010 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that all the types from import2.go made it
-// intact and with the same meaning, by assigning to or using them.
-
-package main
-
-import "./import2"
-
-func f3(func() func() int)
-
-func main() {
- p.F3(p.F1)
- p.F3(p.F2())
- f3(p.F1)
- f3(p.F2())
-
- p.C1 = (chan<- (chan int))(nil)
- p.C2 = (chan (<-chan int))(nil)
- p.C3 = (<-chan (chan int))(nil)
- p.C4 = (chan (chan<- int))(nil)
-
- p.C5 = (<-chan (<-chan int))(nil)
- p.C6 = (chan<- (<-chan int))(nil)
- p.C7 = (chan<- (chan<- int))(nil)
-
- p.C8 = (<-chan (<-chan (chan int)))(nil)
- p.C9 = (<-chan (chan<- (chan int)))(nil)
- p.C10 = (chan<- (<-chan (chan int)))(nil)
- p.C11 = (chan<- (chan<- (chan int)))(nil)
- p.C12 = (chan (chan<- (<-chan int)))(nil)
- p.C13 = (chan (chan<- (chan<- int)))(nil)
-
- p.R1 = (chan <- chan int)(nil)
- p.R3 = (<- chan chan int)(nil)
- p.R4 = (chan chan <- int)(nil)
-
- p.R5 = (<- chan <- chan int)(nil)
- p.R6 = (chan <- <- chan int)(nil)
- p.R7 = (chan <- chan <- int)(nil)
-
- p.R8 = (<- chan <- chan chan int)(nil)
- p.R9 = (<- chan chan <- chan int)(nil)
- p.R10 = (chan <- <- chan chan int)(nil)
- p.R11 = (chan <- chan <- chan int)(nil)
- p.R12 = (chan chan <- <- chan int)(nil)
- p.R13 = (chan chan <- chan <- int)(nil)
-
-}
-
diff --git a/gcc/testsuite/go.test/test/import4.dir/empty.go b/gcc/testsuite/go.test/test/import4.dir/empty.go
new file mode 100644
index 0000000000..1dffa170df
--- /dev/null
+++ b/gcc/testsuite/go.test/test/import4.dir/empty.go
@@ -0,0 +1,10 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package empty
+
+import ( )
+const ( )
+var ( )
+type ( )
diff --git a/gcc/testsuite/go.test/test/import4.dir/import4.go b/gcc/testsuite/go.test/test/import4.dir/import4.go
new file mode 100644
index 0000000000..f92c663d04
--- /dev/null
+++ b/gcc/testsuite/go.test/test/import4.dir/import4.go
@@ -0,0 +1,24 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Verify that various kinds of "imported and not used"
+// errors are caught by the compiler.
+// Does not compile.
+
+package main
+
+// standard
+import "fmt" // ERROR "imported and not used.*fmt"
+
+// renamed
+import X "math" // ERROR "imported and not used.*math"
+
+// import dot
+import . "bufio" // ERROR "imported and not used.*bufio"
+
+// again, package without anything in it
+import "./empty" // GC_ERROR "imported and not used.*empty"
+import Z "./empty" // GC_ERROR "imported and not used.*empty"
+import . "./empty" // ERROR "imported and not used.*empty"
+
diff --git a/gcc/testsuite/go.test/test/import4.go b/gcc/testsuite/go.test/test/import4.go
index 1ae1d0e4ad..875bf89430 100644
--- a/gcc/testsuite/go.test/test/import4.go
+++ b/gcc/testsuite/go.test/test/import4.go
@@ -1,24 +1,11 @@
-// $G $D/empty.go && errchk $G $D/$F.go
+// errorcheckdir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
-
-// various kinds of imported and not used
-
-// standard
-import "fmt" // ERROR "imported and not used.*fmt"
-
-// renamed
-import X "math" // ERROR "imported and not used.*math"
-
-// import dot
-import . "bufio" // ERROR "imported and not used.*bufio"
-
-// again, package without anything in it
-import "./empty" // ERROR "imported and not used.*empty"
-import Z "./empty" // ERROR "imported and not used.*empty"
-import . "./empty" // ERROR "imported and not used.*empty"
+// Verify that various kinds of "imported and not used"
+// errors are caught by the compiler.
+// Does not compile.
+package ignored
diff --git a/gcc/testsuite/go.test/test/import5.go b/gcc/testsuite/go.test/test/import5.go
new file mode 100644
index 0000000000..6480acff92
--- /dev/null
+++ b/gcc/testsuite/go.test/test/import5.go
@@ -0,0 +1,55 @@
+// errorcheck
+
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Verify that invalid imports are rejected by the compiler.
+// Does not compile.
+
+package main
+
+// Correct import paths.
+import _ "fmt"
+import _ `time`
+import _ "m\x61th"
+import _ "go/parser"
+
+// Correct import paths, but the packages don't exist.
+// Don't test.
+//import "a.b"
+//import "greek/αβ"
+
+// Import paths must be strings.
+import 42 // ERROR "import statement"
+import 'a' // ERROR "import statement"
+import 3.14 // ERROR "import statement"
+import 0.25i // ERROR "import statement"
+
+// Each of these pairs tests both `` vs "" strings
+// and also use of invalid characters spelled out as
+// escape sequences and written directly.
+// For example `"\x00"` tests import "\x00"
+// while "`\x00`" tests import `<actual-NUL-byte>`.
+import "" // ERROR "import path"
+import `` // ERROR "import path"
+import "\x00" // ERROR "import path"
+import `\x00` // ERROR "import path"
+import "\x7f" // ERROR "import path"
+import `\x7f` // ERROR "import path"
+import "a!" // ERROR "import path"
+import `a!` // ERROR "import path"
+import "a b" // ERROR "import path"
+import `a b` // ERROR "import path"
+import "a\\b" // ERROR "import path"
+import `a\\b` // ERROR "import path"
+import "\"`a`\"" // ERROR "import path"
+import `\"a\"` // ERROR "import path"
+import "\x80\x80" // ERROR "import path"
+import `\x80\x80` // ERROR "import path"
+import "\xFFFD" // ERROR "import path"
+import `\xFFFD` // ERROR "import path"
+
+// Invalid local imports.
+import "/foo" // ERROR "import path cannot be absolute path"
+import "c:/foo" // ERROR "import path contains invalid character"
diff --git a/gcc/testsuite/go.test/test/index.go b/gcc/testsuite/go.test/test/index.go
index 38aa33dd30..a8c471bb3b 100644
--- a/gcc/testsuite/go.test/test/index.go
+++ b/gcc/testsuite/go.test/test/index.go
@@ -1,22 +1,19 @@
-// $G $D/$F.go && $L $F.$A &&
-// ./$A.out -pass 0 >tmp.go && $G tmp.go && $L -o $A.out1 tmp.$A && ./$A.out1 &&
-// ./$A.out -pass 1 >tmp.go && errchk $G -e tmp.go &&
-// ./$A.out -pass 2 >tmp.go && errchk $G -e tmp.go
-// rm -f tmp.go $A.out1
+// skip
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Generate test of index and slice bounds checks.
+// The actual tests are index0.go, index1.go, index2.go.
package main
import (
"bufio"
- "flag"
"fmt"
"os"
+ "unsafe"
)
const prolog = `
@@ -30,38 +27,54 @@ import (
type quad struct { x, y, z, w int }
const (
- cj = 11
- ci int = 12
- ci32 int32 = 13
- ci64 int64 = 14
+ cj = 100011
+ ci int = 100012
+ ci8 int8 = 115
+ ci16 int16 = 10016
+ ci32 int32 = 100013
+ ci64 int64 = 100014
ci64big int64 = 1<<31
ci64bigger int64 = 1<<32
chuge = 1<<100
+ cfgood = 2.0
+ cfbad = 2.1
cnj = -2
cni int = -3
+ cni8 int8 = -6
+ cni16 int16 = -7
cni32 int32 = -4
cni64 int64 = -5
cni64big int64 = -1<<31
cni64bigger int64 = -1<<32
cnhuge = -1<<100
+ cnfgood = -2.0
+ cnfbad = -2.1
)
-var j int = 20
-var i int = 21
-var i32 int32 = 22
-var i64 int64 = 23
+var j int = 100020
+var i int = 100021
+var i8 int8 = 126
+var i16 int16 = 10025
+var i32 int32 = 100022
+var i64 int64 = 100023
var i64big int64 = 1<<31
var i64bigger int64 = 1<<32
var huge uint64 = 1<<64 - 1
+var fgood float64 = 2.0
+var fbad float64 = 2.1
var nj int = -10
var ni int = -11
+var ni8 int8 = -14
+var ni16 int16 = -15
var ni32 int32 = -12
var ni64 int64 = -13
var ni64big int64 = -1<<31
var ni64bigger int64 = -1<<32
var nhuge int64 = -1<<63
+var nfgood float64 = -2.0
+var nfbad float64 = -2.1
var si []int = make([]int, 10)
var ai [10]int
@@ -71,6 +84,14 @@ var sq []quad = make([]quad, 10)
var aq [10]quad
var paq *[10]quad = &aq
+var sib []int = make([]int, 100000)
+var aib [100000]int
+var paib *[100000]int = &aib
+
+var sqb []quad = make([]quad, 100000)
+var aqb [100000]quad
+var paqb *[100000]quad = &aqb
+
type T struct {
si []int
ai [10]int
@@ -78,11 +99,18 @@ type T struct {
sq []quad
aq [10]quad
paq *[10]quad
+
+ sib []int
+ aib [100000]int
+ paib *[100000]int
+ sqb []quad
+ aqb [100000]quad
+ paqb *[100000]quad
}
-var t = T{si, ai, pai, sq, aq, paq}
+var t = T{si, ai, pai, sq, aq, paq, sib, aib, paib, sqb, aqb, paqb}
-var pt = &T{si, ai, pai, sq, aq, paq}
+var pt = &T{si, ai, pai, sq, aq, paq, sib, aib, paib, sqb, aqb, paqb}
// test that f panics
func test(f func(), s string) {
@@ -91,11 +119,25 @@ func test(f func(), s string) {
_, file, line, _ := runtime.Caller(2)
bug()
print(file, ":", line, ": ", s, " did not panic\n")
+ } else if !contains(err.(error).Error(), "out of range") {
+ _, file, line, _ := runtime.Caller(2)
+ bug()
+ print(file, ":", line, ": ", s, " unexpected panic: ", err.(error).Error(), "\n")
}
}()
f()
}
+func contains(x, y string) bool {
+ for i := 0; i+len(y) <= len(x); i++ {
+ if x[i:i+len(y)] == y {
+ return true
+ }
+ }
+ return false
+}
+
+
var X interface{}
func use(y interface{}) {
X = y
@@ -113,37 +155,34 @@ func bug() {
func main() {
`
-// Passes:
+// pass variable set in index[012].go
// 0 - dynamic checks
// 1 - static checks of invalid constants (cannot assign to types)
// 2 - static checks of array bounds
-var pass = flag.Int("pass", 0, "which test (0,1,2)")
func testExpr(b *bufio.Writer, expr string) {
- if *pass == 0 {
+ if pass == 0 {
fmt.Fprintf(b, "\ttest(func(){use(%s)}, %q)\n", expr, expr)
} else {
- fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow\"\n", expr)
+ fmt.Fprintf(b, "\tuse(%s) // ERROR \"index|overflow|truncated|must be integer\"\n", expr)
}
}
func main() {
b := bufio.NewWriter(os.Stdout)
- flag.Parse()
-
- if *pass == 0 {
- fmt.Fprint(b, "// $G $D/$F.go && $L $F.$A && ./$A.out\n\n")
+ if pass == 0 {
+ fmt.Fprint(b, "// run\n\n")
} else {
- fmt.Fprint(b, "// errchk $G -e $D/$F.go\n\n")
+ fmt.Fprint(b, "// errorcheck\n\n")
}
fmt.Fprint(b, prolog)
-
+
var choices = [][]string{
// Direct value, fetch from struct, fetch from struct pointer.
// The last two cases get us to oindex_const_sudo in gsubr.c.
[]string{"", "t.", "pt."},
-
+
// Array, pointer to array, slice.
[]string{"a", "pa", "s"},
@@ -151,6 +190,9 @@ func main() {
// This controls whether we end up in gsubr.c (i) or cgen.c (q).
[]string{"i", "q"},
+ // Small or big len.
+ []string{"", "b"},
+
// Variable or constant.
[]string{"", "c"},
@@ -158,11 +200,11 @@ func main() {
[]string{"", "n"},
// Size of index.
- []string{"j", "i", "i32", "i64", "i64big", "i64bigger", "huge"},
+ []string{"j", "i", "i8", "i16", "i32", "i64", "i64big", "i64bigger", "huge", "fgood", "fbad"},
}
-
+
forall(choices, func(x []string) {
- p, a, e, c, n, i := x[0], x[1], x[2], x[3], x[4], x[5]
+ p, a, e, big, c, n, i := x[0], x[1], x[2], x[3], x[4], x[5], x[6]
// Pass: dynamic=0, static=1, 2.
// Which cases should be caught statically?
@@ -172,7 +214,7 @@ func main() {
// negative constant
// large constant
thisPass := 0
- if c == "c" && (a == "a" || a == "pa" || n == "n" || i == "i64big" || i == "i64bigger" || i == "huge") {
+ if c == "c" && (a == "a" || a == "pa" || n == "n" || i == "i64big" || i == "i64bigger" || i == "huge" || i == "fbad") {
if i == "huge" {
// Due to a detail of 6g's internals,
// the huge constant errors happen in an
@@ -180,26 +222,59 @@ func main() {
// the next pass from running.
// So run it as a separate check.
thisPass = 1
+ } else if a == "s" && n == "" && (i == "i64big" || i == "i64bigger") && unsafe.Sizeof(int(0)) > 4 {
+ // If int is 64 bits, these huge
+ // numbers do fit in an int, so they
+ // are not rejected at compile time.
+ thisPass = 0
} else {
thisPass = 2
}
}
+ pae := p + a + e + big
+ cni := c + n + i
+
+ // If we're using the big-len data, positive int8 and int16 cannot overflow.
+ if big == "b" && n == "" && (i == "i8" || i == "i16") {
+ if pass == 0 {
+ fmt.Fprintf(b, "\tuse(%s[%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[0:%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[1:%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[%s:])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[%s:%s])\n", pae, cni, cni)
+ }
+ return
+ }
+
+ // Float variables cannot be used as indices.
+ if c == "" && (i == "fgood" || i == "fbad") {
+ return
+ }
+ // Integral float constat is ok.
+ if c == "c" && n == "" && i == "fgood" {
+ if pass == 0 {
+ fmt.Fprintf(b, "\tuse(%s[%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[0:%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[1:%s])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[%s:])\n", pae, cni)
+ fmt.Fprintf(b, "\tuse(%s[%s:%s])\n", pae, cni, cni)
+ }
+ return
+ }
+
// Only print the test case if it is appropriate for this pass.
- if thisPass == *pass {
- pae := p+a+e
- cni := c+n+i
-
+ if thisPass == pass {
// Index operation
- testExpr(b, pae + "[" + cni + "]")
-
+ testExpr(b, pae+"["+cni+"]")
+
// Slice operation.
// Low index 0 is a special case in ggen.c
// so test both 0 and 1.
- testExpr(b, pae + "[0:" + cni + "]")
- testExpr(b, pae + "[1:" + cni + "]")
- testExpr(b, pae + "[" + cni + ":]")
- testExpr(b, pae + "[" + cni + ":" + cni + "]")
+ testExpr(b, pae+"[0:"+cni+"]")
+ testExpr(b, pae+"[1:"+cni+"]")
+ testExpr(b, pae+"["+cni+":]")
+ testExpr(b, pae+"["+cni+":"+cni+"]")
}
})
@@ -209,7 +284,7 @@ func main() {
func forall(choices [][]string, f func([]string)) {
x := make([]string, len(choices))
-
+
var recurse func(d int)
recurse = func(d int) {
if d >= len(choices) {
@@ -217,7 +292,7 @@ func forall(choices [][]string, f func([]string)) {
return
}
for _, x[d] = range choices[d] {
- recurse(d+1)
+ recurse(d + 1)
}
}
recurse(0)
diff --git a/gcc/testsuite/go.test/test/index0.go b/gcc/testsuite/go.test/test/index0.go
new file mode 100644
index 0000000000..04a16198d2
--- /dev/null
+++ b/gcc/testsuite/go.test/test/index0.go
@@ -0,0 +1,12 @@
+// runoutput ./index.go
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of index and slice bounds checks.
+// The output is compiled and run.
+
+package main
+
+const pass = 0
diff --git a/gcc/testsuite/go.test/test/index1.go b/gcc/testsuite/go.test/test/index1.go
new file mode 100644
index 0000000000..e28efa35f1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/index1.go
@@ -0,0 +1,12 @@
+// errorcheckoutput ./index.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of index and slice bounds checks.
+// The output is error checked.
+
+package main
+
+const pass = 1
diff --git a/gcc/testsuite/go.test/test/index2.go b/gcc/testsuite/go.test/test/index2.go
new file mode 100644
index 0000000000..a7107cc051
--- /dev/null
+++ b/gcc/testsuite/go.test/test/index2.go
@@ -0,0 +1,12 @@
+// errorcheckoutput ./index.go
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of index and slice bounds checks.
+// The output is error checked.
+
+package main
+
+const pass = 2
diff --git a/gcc/testsuite/go.test/test/indirect.go b/gcc/testsuite/go.test/test/indirect.go
index cfddde9ce2..bb20f3009b 100644
--- a/gcc/testsuite/go.test/test/indirect.go
+++ b/gcc/testsuite/go.test/test/indirect.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG indirect
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test various safe uses of indirection.
+
package main
var m0 map[string]int
diff --git a/gcc/testsuite/go.test/test/indirect1.go b/gcc/testsuite/go.test/test/indirect1.go
index ecb4f138ac..51da4cc7c4 100644
--- a/gcc/testsuite/go.test/test/indirect1.go
+++ b/gcc/testsuite/go.test/test/indirect1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that illegal uses of indirection are caught by the compiler.
+// Does not compile.
+
package main
var m0 map[string]int
diff --git a/gcc/testsuite/go.test/test/init.go b/gcc/testsuite/go.test/test/init.go
index 74c2d5c261..f4689443cf 100644
--- a/gcc/testsuite/go.test/test/init.go
+++ b/gcc/testsuite/go.test/test/init.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that erroneous use of init is detected.
+// Does not compile.
+
package main
import "runtime"
diff --git a/gcc/testsuite/go.test/test/init1.go b/gcc/testsuite/go.test/test/init1.go
index 9ce3c12ee6..f6eda6edfe 100644
--- a/gcc/testsuite/go.test/test/init1.go
+++ b/gcc/testsuite/go.test/test/init1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -16,10 +16,11 @@ func init() {
c := make(chan int)
go send(c)
<-c
-
- const chunk = 1<<20
- runtime.UpdateMemStats()
- sys := runtime.MemStats.Sys
+
+ const chunk = 1 << 20
+ memstats := new(runtime.MemStats)
+ runtime.ReadMemStats(memstats)
+ sys := memstats.Sys
b := make([]byte, chunk)
for i := range b {
b[i] = byte(i%10 + '0')
@@ -28,10 +29,11 @@ func init() {
for i := 0; i < 1000; i++ {
x = []byte(s)
}
- runtime.UpdateMemStats()
- sys1 := runtime.MemStats.Sys
+ runtime.ReadMemStats(memstats)
+ sys1 := memstats.Sys
if sys1-sys > chunk*50 {
println("allocated 1000 chunks of", chunk, "and used ", sys1-sys, "memory")
+ panic("init1")
}
}
@@ -41,4 +43,3 @@ func send(c chan int) {
func main() {
}
-
diff --git a/gcc/testsuite/go.test/test/initcomma.go b/gcc/testsuite/go.test/test/initcomma.go
index 195d4575f7..a54fce4280 100644
--- a/gcc/testsuite/go.test/test/initcomma.go
+++ b/gcc/testsuite/go.test/test/initcomma.go
@@ -1,15 +1,17 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test trailing commas. DO NOT gofmt THIS FILE.
+
package main
-var a = []int{1, 2}
-var b = [5]int{1, 2, 3}
-var c = []int{1}
-var d = [...]int{1, 2, 3}
+var a = []int{1, 2, }
+var b = [5]int{1, 2, 3, }
+var c = []int{1, }
+var d = [...]int{1, 2, 3, }
func main() {
if len(a) != 2 {
diff --git a/gcc/testsuite/go.test/test/initialize.go b/gcc/testsuite/go.test/test/initialize.go
index 6dd7d67dc3..1307e02096 100644
--- a/gcc/testsuite/go.test/test/initialize.go
+++ b/gcc/testsuite/go.test/test/initialize.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test initialization of package-level variables.
+
package main
import "fmt"
diff --git a/gcc/testsuite/go.test/test/initializerr.go b/gcc/testsuite/go.test/test/initializerr.go
index e7f8b0e92f..ca05414554 100644
--- a/gcc/testsuite/go.test/test/initializerr.go
+++ b/gcc/testsuite/go.test/test/initializerr.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that erroneous initialization expressions are caught by the compiler
+// Does not compile.
+
package main
type S struct {
@@ -23,3 +26,15 @@ var a5 = []byte { x: 2 } // ERROR "index"
var ok1 = S { } // should be ok
var ok2 = T { S: ok1 } // should be ok
+
+// These keys can be computed at compile time but they are
+// not constants as defined by the spec, so they do not trigger
+// compile-time errors about duplicate key values.
+// See issue 4555.
+
+type Key struct {X, Y int}
+
+var _ = map[Key]string{
+ Key{1,2}: "hello",
+ Key{1,2}: "world",
+}
diff --git a/gcc/testsuite/go.test/test/initsyscall.go b/gcc/testsuite/go.test/test/initsyscall.go
deleted file mode 100644
index d0c26d2a83..0000000000
--- a/gcc/testsuite/go.test/test/initsyscall.go
+++ /dev/null
@@ -1,26 +0,0 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// This used to crash because the scheduler
-// tried to kick off a new scheduling thread for f
-// when time.Nanoseconds went into the system call.
-// It's not okay to schedule new goroutines
-// until main has started.
-
-package main
-
-import "time"
-
-func f() {
-}
-
-func init() {
- go f()
- time.Now()
-}
-
-func main() {
-}
diff --git a/gcc/testsuite/go.test/test/int_lit.go b/gcc/testsuite/go.test/test/int_lit.go
index 2644e17b57..78deaea130 100644
--- a/gcc/testsuite/go.test/test/int_lit.go
+++ b/gcc/testsuite/go.test/test/int_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test integer literal syntax.
+
package main
import "os"
diff --git a/gcc/testsuite/go.test/test/intcvt.go b/gcc/testsuite/go.test/test/intcvt.go
index 407bcfd9ba..3920528a40 100644
--- a/gcc/testsuite/go.test/test/intcvt.go
+++ b/gcc/testsuite/go.test/test/intcvt.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test implicit and explicit conversions of constants.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/interface/bigdata.go b/gcc/testsuite/go.test/test/interface/bigdata.go
index 44f6ab127e..0f2e9a990e 100644
--- a/gcc/testsuite/go.test/test/interface/bigdata.go
+++ b/gcc/testsuite/go.test/test/interface/bigdata.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// check that big vs small, pointer vs not
-// interface methods work.
+// Test big vs. small, pointer vs. value interface methods.
package main
diff --git a/gcc/testsuite/go.test/test/interface/convert.go b/gcc/testsuite/go.test/test/interface/convert.go
index 7f429f7031..eb6fd1d554 100644
--- a/gcc/testsuite/go.test/test/interface/convert.go
+++ b/gcc/testsuite/go.test/test/interface/convert.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check uses of all the different interface
-// conversion runtime functions.
+// Test all the different interface conversion runtime functions.
package main
diff --git a/gcc/testsuite/go.test/test/interface/convert1.go b/gcc/testsuite/go.test/test/interface/convert1.go
index 658b1a92fa..4a3ec8a375 100644
--- a/gcc/testsuite/go.test/test/interface/convert1.go
+++ b/gcc/testsuite/go.test/test/interface/convert1.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that static interface conversion of
-// interface value nil succeeds.
+// Test static interface conversion of interface value nil.
package main
diff --git a/gcc/testsuite/go.test/test/interface/convert2.go b/gcc/testsuite/go.test/test/interface/convert2.go
index 658b1a92fa..4a3ec8a375 100644
--- a/gcc/testsuite/go.test/test/interface/convert2.go
+++ b/gcc/testsuite/go.test/test/interface/convert2.go
@@ -1,11 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that static interface conversion of
-// interface value nil succeeds.
+// Test static interface conversion of interface value nil.
package main
diff --git a/gcc/testsuite/go.test/test/interface/embed.go b/gcc/testsuite/go.test/test/interface/embed.go
index 2fddee1905..5c52ac0232 100644
--- a/gcc/testsuite/go.test/test/interface/embed.go
+++ b/gcc/testsuite/go.test/test/interface/embed.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods derived from embedded interface values.
+// Test methods derived from embedded interface values.
package main
diff --git a/gcc/testsuite/go.test/test/interface/embed0.go b/gcc/testsuite/go.test/test/interface/embed0.go
deleted file mode 100644
index bbd81e7603..0000000000
--- a/gcc/testsuite/go.test/test/interface/embed0.go
+++ /dev/null
@@ -1,29 +0,0 @@
-// true # used by embed1.go
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that embedded interface types can have local methods.
-
-package p
-
-type T int
-func (t T) m() {}
-
-type I interface { m() }
-type J interface { I }
-
-func main() {
- var i I
- var j J
- var t T
- i = t
- j = t
- _ = i
- _ = j
- i = j
- _ = i
- j = i
- _ = j
-}
diff --git a/gcc/testsuite/go.test/test/interface/embed1.dir/embed0.go b/gcc/testsuite/go.test/test/interface/embed1.dir/embed0.go
new file mode 100644
index 0000000000..728bec74e8
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/embed1.dir/embed0.go
@@ -0,0 +1,27 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that embedded interface types can have local methods.
+
+package p
+
+type T int
+func (t T) m() {}
+
+type I interface { m() }
+type J interface { I }
+
+func main() {
+ var i I
+ var j J
+ var t T
+ i = t
+ j = t
+ _ = i
+ _ = j
+ i = j
+ _ = i
+ j = i
+ _ = j
+}
diff --git a/gcc/testsuite/go.test/test/interface/embed1.dir/embed1.go b/gcc/testsuite/go.test/test/interface/embed1.dir/embed1.go
new file mode 100644
index 0000000000..7dfb1dbc0a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/embed1.dir/embed1.go
@@ -0,0 +1,43 @@
+// Copyright 2009 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that embedded interface types can have local methods.
+
+package main
+
+import "./embed0"
+
+type T int
+func (t T) m() {}
+
+type I interface { m() }
+type J interface { I }
+
+type PI interface { p.I }
+type PJ interface { p.J }
+
+func main() {
+ var i I
+ var j J
+ var t T
+ i = t
+ j = t
+ _ = i
+ _ = j
+ i = j
+ _ = i
+ j = i
+ _ = j
+ var pi PI
+ var pj PJ
+ var pt p.T
+ pi = pt
+ pj = pt
+ _ = pi
+ _ = pj
+ pi = pj
+ _ = pi
+ pj = pi
+ _ = pj
+}
diff --git a/gcc/testsuite/go.test/test/interface/embed1.go b/gcc/testsuite/go.test/test/interface/embed1.go
index 24e50471f2..784b82bb07 100644
--- a/gcc/testsuite/go.test/test/interface/embed1.go
+++ b/gcc/testsuite/go.test/test/interface/embed1.go
@@ -1,45 +1,9 @@
-// $G $D/embed0.go && $G $D/$F.go && $L $F.$A && ./$A.out
+// rundir
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that embedded interface types can have local methods.
+// Test that embedded interface types can have local methods.
-package main
-
-import "./embed0"
-
-type T int
-func (t T) m() {}
-
-type I interface { m() }
-type J interface { I }
-
-type PI interface { p.I }
-type PJ interface { p.J }
-
-func main() {
- var i I
- var j J
- var t T
- i = t
- j = t
- _ = i
- _ = j
- i = j
- _ = i
- j = i
- _ = j
- var pi PI
- var pj PJ
- var pt p.T
- pi = pt
- pj = pt
- _ = pi
- _ = pj
- pi = pj
- _ = pi
- pj = pi
- _ = pj
-}
+package ignored
diff --git a/gcc/testsuite/go.test/test/interface/embed2.go b/gcc/testsuite/go.test/test/interface/embed2.go
index c18a1fecec..1636db78eb 100644
--- a/gcc/testsuite/go.test/test/interface/embed2.go
+++ b/gcc/testsuite/go.test/test/interface/embed2.go
@@ -1,10 +1,10 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods derived from embedded interface and *interface values.
+// Test methods derived from embedded interface and *interface values.
package main
diff --git a/gcc/testsuite/go.test/test/interface/explicit.go b/gcc/testsuite/go.test/test/interface/explicit.go
index daae59b361..36fa1a4224 100644
--- a/gcc/testsuite/go.test/test/interface/explicit.go
+++ b/gcc/testsuite/go.test/test/interface/explicit.go
@@ -1,10 +1,11 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Static error messages about interface conversions.
+// Verify compiler messages about erroneous static interface conversions.
+// Does not compile.
package main
@@ -14,6 +15,10 @@ type T struct {
var t *T
+type X int
+
+func (x *X) M() {}
+
type I interface {
M()
}
@@ -39,7 +44,7 @@ func main() {
// because i has an extra method
// that t does not, so i cannot contain a t.
i = t // ERROR "incompatible|missing M method"
- t = i // ERROR "incompatible|need type assertion"
+ t = i // ERROR "incompatible|assignment$"
i = i2 // ok
i2 = i // ERROR "incompatible|missing N method"
@@ -65,6 +70,8 @@ func (Int) M(float64) {}
var _ = m.(Int) // ERROR "impossible type assertion"
+var _ = m.(X) // ERROR "pointer receiver"
+
var ii int
var jj Int
@@ -73,3 +80,22 @@ var m2 M = jj // ERROR "incompatible|wrong type for M method"
var m3 = M(ii) // ERROR "invalid|missing"
var m4 = M(jj) // ERROR "invalid|wrong type for M method"
+
+
+type B1 interface {
+ _()
+}
+
+type B2 interface {
+ M()
+ _()
+}
+
+type T2 struct{}
+
+func (t *T2) M() {}
+func (t *T2) _() {}
+
+// Check that nothing satisfies an interface with blank methods.
+var b1 B1 = &T2{} // ERROR "incompatible|missing _ method"
+var b2 B2 = &T2{} // ERROR "incompatible|missing _ method"
diff --git a/gcc/testsuite/go.test/test/interface/fail.go b/gcc/testsuite/go.test/test/interface/fail.go
index 0c20bcf756..81eb6cb3c1 100644
--- a/gcc/testsuite/go.test/test/interface/fail.go
+++ b/gcc/testsuite/go.test/test/interface/fail.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that interface conversion fails when method is missing.
+// Test that interface conversion fails when method is missing.
package main
@@ -14,18 +14,33 @@ type I interface {
func main() {
shouldPanic(p1)
+ shouldPanic(p2)
}
func p1() {
var s *S
var i I
- var e interface {}
+ var e interface{}
e = s
i = e.(I)
_ = i
}
-type S struct {
+type S struct{}
+
+func (s *S) _() {}
+
+type B interface {
+ _()
+}
+
+func p2() {
+ var s *S
+ var b B
+ var e interface{}
+ e = s
+ b = e.(B)
+ _ = b
}
func shouldPanic(f func()) {
diff --git a/gcc/testsuite/go.test/test/interface/fake.go b/gcc/testsuite/go.test/test/interface/fake.go
index ddb8325427..861a640842 100644
--- a/gcc/testsuite/go.test/test/interface/fake.go
+++ b/gcc/testsuite/go.test/test/interface/fake.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface comparisons using types hidden
+// Test interface comparisons using types hidden
// inside reflected-on structs.
package main
diff --git a/gcc/testsuite/go.test/test/interface/noeq.go b/gcc/testsuite/go.test/test/interface/noeq.go
index 3c2ea5975a..1c5166eded 100644
--- a/gcc/testsuite/go.test/test/interface/noeq.go
+++ b/gcc/testsuite/go.test/test/interface/noeq.go
@@ -1,10 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG: interface/noeq
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface values containing types that cannot be compared for equality.
+// Test run-time error detection for interface values containing types
+// that cannot be compared for equality.
package main
diff --git a/gcc/testsuite/go.test/test/interface/pointer.go b/gcc/testsuite/go.test/test/interface/pointer.go
index f1e363cbff..2927050669 100644
--- a/gcc/testsuite/go.test/test/interface/pointer.go
+++ b/gcc/testsuite/go.test/test/interface/pointer.go
@@ -1,10 +1,11 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check that interface{M()} = *interface{M()} produces a compiler error.
+// Test that interface{M()} = *interface{M()} produces a compiler error.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/interface/private.dir/private1.go b/gcc/testsuite/go.test/test/interface/private.dir/private1.go
new file mode 100644
index 0000000000..75eee51f5a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/private.dir/private1.go
@@ -0,0 +1,18 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Imported by private.go, which should not be able to see the private method.
+
+package p
+
+type Exported interface {
+ private()
+}
+
+type Implementation struct{}
+
+func (p *Implementation) private() {}
+
+var X = new(Implementation)
+
diff --git a/gcc/testsuite/go.test/test/interface/private.dir/prog.go b/gcc/testsuite/go.test/test/interface/private.dir/prog.go
new file mode 100644
index 0000000000..abea7d625c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/private.dir/prog.go
@@ -0,0 +1,33 @@
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that unexported methods are not visible outside the package.
+// Does not compile.
+
+package main
+
+import "./private1"
+
+type Exported interface {
+ private()
+}
+
+type Implementation struct{}
+
+func (p *Implementation) private() {}
+
+func main() {
+ var x Exported
+ x = new(Implementation)
+ x.private()
+
+ var px p.Exported
+ px = p.X
+
+ px.private() // ERROR "private"
+
+ px = new(Implementation) // ERROR "private"
+
+ x = px // ERROR "private"
+}
diff --git a/gcc/testsuite/go.test/test/interface/private.go b/gcc/testsuite/go.test/test/interface/private.go
index 37890c923a..a0da249c92 100644
--- a/gcc/testsuite/go.test/test/interface/private.go
+++ b/gcc/testsuite/go.test/test/interface/private.go
@@ -1,32 +1,10 @@
-// $G $D/${F}1.go && errchk $G $D/$F.go
+// errorcheckdir
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+// Test that unexported methods are not visible outside the package.
+// Does not compile.
-import "./private1"
-
-type Exported interface {
- private()
-}
-
-type Implementation struct{}
-
-func (p *Implementation) private() {}
-
-func main() {
- var x Exported
- x = new(Implementation)
- x.private()
-
- var px p.Exported
- px = p.X
-
- px.private() // ERROR "private"
-
- px = new(Implementation) // ERROR "private"
-
- x = px // ERROR "private"
-}
+package ignored
diff --git a/gcc/testsuite/go.test/test/interface/private1.go b/gcc/testsuite/go.test/test/interface/private1.go
deleted file mode 100644
index 3173fbef41..0000000000
--- a/gcc/testsuite/go.test/test/interface/private1.go
+++ /dev/null
@@ -1,18 +0,0 @@
-// true # used by private.go
-
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package p
-
-type Exported interface {
- private()
-}
-
-type Implementation struct{}
-
-func (p *Implementation) private() {}
-
-var X = new(Implementation)
-
diff --git a/gcc/testsuite/go.test/test/interface/receiver.go b/gcc/testsuite/go.test/test/interface/receiver.go
index f53daf8dab..4511ab3b47 100644
--- a/gcc/testsuite/go.test/test/interface/receiver.go
+++ b/gcc/testsuite/go.test/test/interface/receiver.go
@@ -1,11 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Implicit methods for embedded types.
-// Mixed pointer and non-pointer receivers.
+// Test Implicit methods for embedded types and
+// mixed pointer and non-pointer receivers.
package main
diff --git a/gcc/testsuite/go.test/test/interface/receiver1.go b/gcc/testsuite/go.test/test/interface/receiver1.go
index 51312d0002..2b7ccdc1a7 100644
--- a/gcc/testsuite/go.test/test/interface/receiver1.go
+++ b/gcc/testsuite/go.test/test/interface/receiver1.go
@@ -1,10 +1,11 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Error messages about missing implicit methods.
+// Verify compiler complains about missing implicit methods.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/interface/recursive.go b/gcc/testsuite/go.test/test/interface/recursive.go
index 1eb56e9767..fcc88331e0 100644
--- a/gcc/testsuite/go.test/test/interface/recursive.go
+++ b/gcc/testsuite/go.test/test/interface/recursive.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go || echo BUG: should compile
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,7 +6,7 @@
// Check mutually recursive interfaces
-package main
+package recursive
type I1 interface {
foo() I2
diff --git a/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive1.go b/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive1.go
new file mode 100644
index 0000000000..441f0ecaa5
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive1.go
@@ -0,0 +1,15 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Mutually recursive type definitions imported and used by recursive1.go.
+
+package p
+
+type I1 interface {
+ F() I2
+}
+
+type I2 interface {
+ I1
+}
diff --git a/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive2.go b/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive2.go
new file mode 100644
index 0000000000..e8048c672b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/interface/recursive1.dir/recursive2.go
@@ -0,0 +1,20 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that the mutually recursive types in recursive1.go made it
+// intact and with the same meaning, by assigning to or using them.
+
+package main
+
+import "./recursive1"
+
+func main() {
+ var i1 p.I1
+ var i2 p.I2
+ i1 = i2
+ i2 = i1
+ i1 = i2.F()
+ i2 = i1.F()
+ _, _ = i1, i2
+}
diff --git a/gcc/testsuite/go.test/test/interface/recursive1.go b/gcc/testsuite/go.test/test/interface/recursive1.go
index 2c93a28363..62f6108844 100644
--- a/gcc/testsuite/go.test/test/interface/recursive1.go
+++ b/gcc/testsuite/go.test/test/interface/recursive1.go
@@ -1,15 +1,9 @@
-// true # used by recursive2
+// compiledir
// Copyright 2012 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package p
+// Mutually recursive type definitions imported and used by recursive1.go.
-type I1 interface {
- F() I2
-}
-
-type I2 interface {
- I1
-}
+package ignored
diff --git a/gcc/testsuite/go.test/test/interface/recursive2.go b/gcc/testsuite/go.test/test/interface/recursive2.go
deleted file mode 100644
index a7f9ab5dbd..0000000000
--- a/gcc/testsuite/go.test/test/interface/recursive2.go
+++ /dev/null
@@ -1,22 +0,0 @@
-// $G $D/recursive1.go && $G $D/$F.go
-
-// Copyright 2012 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Check that the mutually recursive types in recursive1.go made it
-// intact and with the same meaning, by assigning to or using them.
-
-package main
-
-import "./recursive1"
-
-func main() {
- var i1 p.I1
- var i2 p.I2
- i1 = i2
- i2 = i1
- i1 = i2.F()
- i2 = i1.F()
- _, _ = i1, i2
-}
diff --git a/gcc/testsuite/go.test/test/interface/returntype.go b/gcc/testsuite/go.test/test/interface/returntype.go
index 5cf0836178..4d86f39184 100644
--- a/gcc/testsuite/go.test/test/interface/returntype.go
+++ b/gcc/testsuite/go.test/test/interface/returntype.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check methods with different return types.
+// Test interface methods with different return types are distinct.
package main
diff --git a/gcc/testsuite/go.test/test/interface/struct.go b/gcc/testsuite/go.test/test/interface/struct.go
index 40b7f4f910..f60819ca81 100644
--- a/gcc/testsuite/go.test/test/interface/struct.go
+++ b/gcc/testsuite/go.test/test/interface/struct.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG interface6
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Interface values containing structures.
+// Test interface values containing structures.
package main
diff --git a/gcc/testsuite/go.test/test/iota.go b/gcc/testsuite/go.test/test/iota.go
index c40ca1f382..7187dbe335 100644
--- a/gcc/testsuite/go.test/test/iota.go
+++ b/gcc/testsuite/go.test/test/iota.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test iota.
+
package main
func assert(cond bool, msg string) {
diff --git a/gcc/testsuite/go.test/test/ken/array.go b/gcc/testsuite/go.test/test/ken/array.go
index 40209f5da3..9412e3502d 100644
--- a/gcc/testsuite/go.test/test/ken/array.go
+++ b/gcc/testsuite/go.test/test/ken/array.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test arrays and slices.
+
package main
func setpd(a []int) {
@@ -68,6 +70,9 @@ func testpdpd() {
a = a[5:25]
res(sumpd(a), 5, 25)
+
+ a = a[30:95]
+ res(sumpd(a), 35, 100)
}
// call ptr fixed with ptr fixed
diff --git a/gcc/testsuite/go.test/test/ken/chan.go b/gcc/testsuite/go.test/test/ken/chan.go
index ef75b044d7..36b18f80ea 100644
--- a/gcc/testsuite/go.test/test/ken/chan.go
+++ b/gcc/testsuite/go.test/test/ken/chan.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test communication operations including select.
+
package main
import "os"
diff --git a/gcc/testsuite/go.test/test/ken/chan1.go b/gcc/testsuite/go.test/test/ken/chan1.go
index e5fc033f3d..cbd21a3d69 100644
--- a/gcc/testsuite/go.test/test/ken/chan1.go
+++ b/gcc/testsuite/go.test/test/ken/chan1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test communication with multiple simultaneous goroutines.
+
package main
import "runtime"
diff --git a/gcc/testsuite/go.test/test/ken/complit.go b/gcc/testsuite/go.test/test/ken/complit.go
index da0a84a043..bc50bbe224 100644
--- a/gcc/testsuite/go.test/test/ken/complit.go
+++ b/gcc/testsuite/go.test/test/ken/complit.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test composite literals.
+
package main
type M map[int]int
diff --git a/gcc/testsuite/go.test/test/ken/convert.go b/gcc/testsuite/go.test/test/ken/convert.go
index 3780ec886a..33acbd8cd2 100644
--- a/gcc/testsuite/go.test/test/ken/convert.go
+++ b/gcc/testsuite/go.test/test/ken/convert.go
@@ -1,10 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// near-exhaustive test of converting numbers between types.
+// Test, near-exhaustive, of converting numbers between types.
+// No complex numbers though.
package main
diff --git a/gcc/testsuite/go.test/test/ken/cplx0.go b/gcc/testsuite/go.test/test/ken/cplx0.go
index f38ce5b65d..665e52a5f3 100644
--- a/gcc/testsuite/go.test/test/ken/cplx0.go
+++ b/gcc/testsuite/go.test/test/ken/cplx0.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test trivial, bootstrap-level complex numbers, including printing.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/ken/cplx1.go b/gcc/testsuite/go.test/test/ken/cplx1.go
index 8ec7d40f5e..78240a5639 100644
--- a/gcc/testsuite/go.test/test/ken/cplx1.go
+++ b/gcc/testsuite/go.test/test/ken/cplx1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple arithmetic and assignment for complex numbers.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/ken/cplx2.go b/gcc/testsuite/go.test/test/ken/cplx2.go
index 89f4a04181..eb1da7b8c0 100644
--- a/gcc/testsuite/go.test/test/ken/cplx2.go
+++ b/gcc/testsuite/go.test/test/ken/cplx2.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test arithmetic on complex numbers, including multiplication and division.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/ken/cplx3.go b/gcc/testsuite/go.test/test/ken/cplx3.go
index 048c93eef6..be0b8646ab 100644
--- a/gcc/testsuite/go.test/test/ken/cplx3.go
+++ b/gcc/testsuite/go.test/test/ken/cplx3.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test composition, decomposition, and reflection on complex numbers.
+
package main
import "unsafe"
diff --git a/gcc/testsuite/go.test/test/ken/cplx4.go b/gcc/testsuite/go.test/test/ken/cplx4.go
index 738afcd2ca..97d5d16f4a 100644
--- a/gcc/testsuite/go.test/test/ken/cplx4.go
+++ b/gcc/testsuite/go.test/test/ken/cplx4.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test complex numbers,including fmt support.
+// Used to crash.
+
package main
import "fmt"
diff --git a/gcc/testsuite/go.test/test/ken/cplx5.go b/gcc/testsuite/go.test/test/ken/cplx5.go
index e6696674b0..4e8f4433d3 100644
--- a/gcc/testsuite/go.test/test/ken/cplx5.go
+++ b/gcc/testsuite/go.test/test/ken/cplx5.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test compound types made of complex numbers.
+
package main
var a [12]complex128
diff --git a/gcc/testsuite/go.test/test/ken/divconst.go b/gcc/testsuite/go.test/test/ken/divconst.go
index 5a64d16b49..670e07417a 100644
--- a/gcc/testsuite/go.test/test/ken/divconst.go
+++ b/gcc/testsuite/go.test/test/ken/divconst.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test integer division by constants.
+
package main
import "math/rand"
diff --git a/gcc/testsuite/go.test/test/ken/divmod.go b/gcc/testsuite/go.test/test/ken/divmod.go
index dc44ea245b..f1bd56ec66 100644
--- a/gcc/testsuite/go.test/test/ken/divmod.go
+++ b/gcc/testsuite/go.test/test/ken/divmod.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test integer division and modulus.
+
package main
const (
diff --git a/gcc/testsuite/go.test/test/ken/embed.go b/gcc/testsuite/go.test/test/ken/embed.go
index 9805e479bb..9b35c56acf 100644
--- a/gcc/testsuite/go.test/test/ken/embed.go
+++ b/gcc/testsuite/go.test/test/ken/embed.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test embedded fields of structs, including methods.
+
package main
diff --git a/gcc/testsuite/go.test/test/ken/for.go b/gcc/testsuite/go.test/test/ken/for.go
index 176ecd7493..db35548db8 100644
--- a/gcc/testsuite/go.test/test/ken/for.go
+++ b/gcc/testsuite/go.test/test/ken/for.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple for loop.
package main
diff --git a/gcc/testsuite/go.test/test/ken/interbasic.go b/gcc/testsuite/go.test/test/ken/interbasic.go
index 9bb50886a4..d8fbb95a31 100644
--- a/gcc/testsuite/go.test/test/ken/interbasic.go
+++ b/gcc/testsuite/go.test/test/ken/interbasic.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test interfaces on basic types.
+
package main
type myint int
diff --git a/gcc/testsuite/go.test/test/ken/interfun.go b/gcc/testsuite/go.test/test/ken/interfun.go
index 94bc7eaada..9432181df2 100644
--- a/gcc/testsuite/go.test/test/ken/interfun.go
+++ b/gcc/testsuite/go.test/test/ken/interfun.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test interfaces and methods.
+
package main
type S struct {
diff --git a/gcc/testsuite/go.test/test/ken/intervar.go b/gcc/testsuite/go.test/test/ken/intervar.go
index 73d1b0660b..8a2fca0d4b 100644
--- a/gcc/testsuite/go.test/test/ken/intervar.go
+++ b/gcc/testsuite/go.test/test/ken/intervar.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test interface assignment.
+
package main
type Iputs interface {
diff --git a/gcc/testsuite/go.test/test/ken/label.go b/gcc/testsuite/go.test/test/ken/label.go
index 7a509f0484..fcb3e611d9 100644
--- a/gcc/testsuite/go.test/test/ken/label.go
+++ b/gcc/testsuite/go.test/test/ken/label.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test goto and labels.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/ken/litfun.go b/gcc/testsuite/go.test/test/ken/litfun.go
index bac2bc17cc..e241d4edb7 100644
--- a/gcc/testsuite/go.test/test/ken/litfun.go
+++ b/gcc/testsuite/go.test/test/ken/litfun.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple function literals.
package main
diff --git a/gcc/testsuite/go.test/test/ken/mfunc.go b/gcc/testsuite/go.test/test/ken/mfunc.go
index ae0bc0c58a..ef2499194f 100644
--- a/gcc/testsuite/go.test/test/ken/mfunc.go
+++ b/gcc/testsuite/go.test/test/ken/mfunc.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple multi-argument multi-valued function.
+
package main
func
diff --git a/gcc/testsuite/go.test/test/ken/modconst.go b/gcc/testsuite/go.test/test/ken/modconst.go
index c2603a0a09..d88cf10032 100644
--- a/gcc/testsuite/go.test/test/ken/modconst.go
+++ b/gcc/testsuite/go.test/test/ken/modconst.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test integer modulus by contstants.
+
package main
import "math/rand"
diff --git a/gcc/testsuite/go.test/test/ken/ptrfun.go b/gcc/testsuite/go.test/test/ken/ptrfun.go
index 6739ba33ae..af806cfd92 100644
--- a/gcc/testsuite/go.test/test/ken/ptrfun.go
+++ b/gcc/testsuite/go.test/test/ken/ptrfun.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test method invocation with pointer receivers and function-valued fields.
package main
diff --git a/gcc/testsuite/go.test/test/ken/ptrvar.go b/gcc/testsuite/go.test/test/ken/ptrvar.go
index e2ddde6292..d78170c9d2 100644
--- a/gcc/testsuite/go.test/test/ken/ptrvar.go
+++ b/gcc/testsuite/go.test/test/ken/ptrvar.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test pointers and the . (selector) operator on structs.
package main
diff --git a/gcc/testsuite/go.test/test/ken/range.go b/gcc/testsuite/go.test/test/ken/range.go
index 9535fd497d..89c14e5c35 100644
--- a/gcc/testsuite/go.test/test/ken/range.go
+++ b/gcc/testsuite/go.test/test/ken/range.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test 'for range' on arrays, slices, and maps.
+
package main
const size = 16
diff --git a/gcc/testsuite/go.test/test/ken/rob1.go b/gcc/testsuite/go.test/test/ken/rob1.go
index a5854b93e2..3042a671bf 100644
--- a/gcc/testsuite/go.test/test/ken/rob1.go
+++ b/gcc/testsuite/go.test/test/ken/rob1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test general operation using a list implementation.
+
package main
type Item interface {
diff --git a/gcc/testsuite/go.test/test/ken/rob2.go b/gcc/testsuite/go.test/test/ken/rob2.go
index d13e2441d4..4b4410ee85 100644
--- a/gcc/testsuite/go.test/test/ken/rob2.go
+++ b/gcc/testsuite/go.test/test/ken/rob2.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test general operation using s-list.
+// First Go program ever run (although not in this exact form).
+
package main
import "fmt"
diff --git a/gcc/testsuite/go.test/test/ken/robfor.go b/gcc/testsuite/go.test/test/ken/robfor.go
index 05188a4723..c6a420b39d 100644
--- a/gcc/testsuite/go.test/test/ken/robfor.go
+++ b/gcc/testsuite/go.test/test/ken/robfor.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test for loops of many forms.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/gcc/testsuite/go.test/test/ken/robfunc.go b/gcc/testsuite/go.test/test/ken/robfunc.go
index 6b3d4b2e46..885267e30c 100644
--- a/gcc/testsuite/go.test/test/ken/robfunc.go
+++ b/gcc/testsuite/go.test/test/ken/robfunc.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test functions of many signatures.
+
package main
func assertequal(is, shouldbe int, msg string) {
diff --git a/gcc/testsuite/go.test/test/ken/shift.go b/gcc/testsuite/go.test/test/ken/shift.go
index 157a07aec5..af8789615e 100644
--- a/gcc/testsuite/go.test/test/ken/shift.go
+++ b/gcc/testsuite/go.test/test/ken/shift.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test shift.
+
package main
var ians [18]int;
diff --git a/gcc/testsuite/go.test/test/ken/simparray.go b/gcc/testsuite/go.test/test/ken/simparray.go
index 1b6f245eea..0e81a341b8 100644
--- a/gcc/testsuite/go.test/test/ken/simparray.go
+++ b/gcc/testsuite/go.test/test/ken/simparray.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple operations on arrays.
+
package main
var b[10] float32;
diff --git a/gcc/testsuite/go.test/test/ken/simpbool.go b/gcc/testsuite/go.test/test/ken/simpbool.go
index dbd9c8d8bc..ab2ecc21aa 100644
--- a/gcc/testsuite/go.test/test/ken/simpbool.go
+++ b/gcc/testsuite/go.test/test/ken/simpbool.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test basic operations on bool.
+
package main
type s struct {
diff --git a/gcc/testsuite/go.test/test/ken/simpconv.go b/gcc/testsuite/go.test/test/ken/simpconv.go
index feb85d2999..22cad2ad0e 100644
--- a/gcc/testsuite/go.test/test/ken/simpconv.go
+++ b/gcc/testsuite/go.test/test/ken/simpconv.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple arithmetic conversion.
+
package main
type vlong int64
diff --git a/gcc/testsuite/go.test/test/ken/simpfun.go b/gcc/testsuite/go.test/test/ken/simpfun.go
index ba9ce6f7bc..e5dc2b2495 100644
--- a/gcc/testsuite/go.test/test/ken/simpfun.go
+++ b/gcc/testsuite/go.test/test/ken/simpfun.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple functions.
package main
diff --git a/gcc/testsuite/go.test/test/ken/simpswitch.go b/gcc/testsuite/go.test/test/ken/simpswitch.go
index 710af2e08c..b28250b1d3 100644
--- a/gcc/testsuite/go.test/test/ken/simpswitch.go
+++ b/gcc/testsuite/go.test/test/ken/simpswitch.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple switch.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/ken/simpvar.go b/gcc/testsuite/go.test/test/ken/simpvar.go
index fd060b0e2e..c6eefbb5ad 100644
--- a/gcc/testsuite/go.test/test/ken/simpvar.go
+++ b/gcc/testsuite/go.test/test/ken/simpvar.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test scoping of variables.
+
package main
diff --git a/gcc/testsuite/go.test/test/ken/slicearray.go b/gcc/testsuite/go.test/test/ken/slicearray.go
index 5c31270fcd..6cf676c588 100644
--- a/gcc/testsuite/go.test/test/ken/slicearray.go
+++ b/gcc/testsuite/go.test/test/ken/slicearray.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test basic operations of slices and arrays.
+
package main
var bx [10]byte
diff --git a/gcc/testsuite/go.test/test/ken/sliceslice.go b/gcc/testsuite/go.test/test/ken/sliceslice.go
index 6390421287..c07c591252 100644
--- a/gcc/testsuite/go.test/test/ken/sliceslice.go
+++ b/gcc/testsuite/go.test/test/ken/sliceslice.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test slicing and re-slicing.
+
package main
var bx []byte
diff --git a/gcc/testsuite/go.test/test/ken/string.go b/gcc/testsuite/go.test/test/ken/string.go
index e051082429..6df8dc4ddf 100644
--- a/gcc/testsuite/go.test/test/ken/string.go
+++ b/gcc/testsuite/go.test/test/ken/string.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test string operations including printing.
package main
diff --git a/gcc/testsuite/go.test/test/ken/strvar.go b/gcc/testsuite/go.test/test/ken/strvar.go
index dfaaf12131..4d511fe673 100644
--- a/gcc/testsuite/go.test/test/ken/strvar.go
+++ b/gcc/testsuite/go.test/test/ken/strvar.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test struct-valued variables (not pointers).
package main
diff --git a/gcc/testsuite/go.test/test/label.go b/gcc/testsuite/go.test/test/label.go
index e3d853266e..b30c27ec44 100644
--- a/gcc/testsuite/go.test/test/label.go
+++ b/gcc/testsuite/go.test/test/label.go
@@ -1,10 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Pass 1 label errors.
+// Verify that erroneous labels are caught by the compiler.
+// This set is caught by pass 1.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/label1.go b/gcc/testsuite/go.test/test/label1.go
index 656daaeea5..f923a18820 100644
--- a/gcc/testsuite/go.test/test/label1.go
+++ b/gcc/testsuite/go.test/test/label1.go
@@ -1,10 +1,13 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Pass 2 label errors.
+
+// Verify that erroneous labels are caught by the compiler.
+// This set is caught by pass 2. That's why this file is label1.go.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/linkx.go b/gcc/testsuite/go.test/test/linkx.go
new file mode 100644
index 0000000000..12d446ffc1
--- /dev/null
+++ b/gcc/testsuite/go.test/test/linkx.go
@@ -0,0 +1,20 @@
+// $G $D/$F.go && $L -X main.tbd hello $F.$A && ./$A.out
+
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test the -X facility of the gc linker (6l etc.).
+
+package main
+
+var tbd string
+
+func main() {
+ if tbd != "hello" {
+ println("BUG: test/linkx", len(tbd), tbd)
+ }
+}
diff --git a/gcc/testsuite/go.test/test/literal.go b/gcc/testsuite/go.test/test/literal.go
index bf05388127..c3d6bc123a 100644
--- a/gcc/testsuite/go.test/test/literal.go
+++ b/gcc/testsuite/go.test/test/literal.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test literal syntax for basic types.
+
package main
var nbad int
@@ -22,7 +24,6 @@ func equal(a, b float32) bool {
return a == b
}
-
func main() {
// bool
var t bool = true
@@ -223,6 +224,6 @@ func main() {
assert(sj0 == sj3, "sj3")
if nbad > 0 {
- println()
+ panic("literal failed")
}
}
diff --git a/gcc/testsuite/go.test/test/mallocfin.go b/gcc/testsuite/go.test/test/mallocfin.go
index ff62392473..be6d79b2b8 100644
--- a/gcc/testsuite/go.test/test/mallocfin.go
+++ b/gcc/testsuite/go.test/test/mallocfin.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// trivial finalizer test
+// Test basic operation of finalizers.
package main
diff --git a/gcc/testsuite/go.test/test/map.go b/gcc/testsuite/go.test/test/map.go
index c3963499bc..485e743fe4 100644
--- a/gcc/testsuite/go.test/test/map.go
+++ b/gcc/testsuite/go.test/test/map.go
@@ -1,13 +1,17 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test maps, almost exhaustively.
+// NaN complexity test is in mapnan.go.
+
package main
import (
"fmt"
+ "math"
"strconv"
)
@@ -26,12 +30,18 @@ func P(a []string) string {
}
func main() {
+ testbasic()
+ testfloat()
+ testnan()
+}
+
+func testbasic() {
// Test a map literal.
mlit := map[string]int{"0": 0, "1": 1, "2": 2, "3": 3, "4": 4}
for i := 0; i < len(mlit); i++ {
s := string([]byte{byte(i) + '0'})
if mlit[s] != i {
- fmt.Printf("mlit[%s] = %d\n", s, mlit[s])
+ panic(fmt.Sprintf("mlit[%s] = %d\n", s, mlit[s]))
}
}
@@ -92,46 +102,46 @@ func main() {
// test len
if len(mib) != count {
- fmt.Printf("len(mib) = %d\n", len(mib))
+ panic(fmt.Sprintf("len(mib) = %d\n", len(mib)))
}
if len(mii) != count {
- fmt.Printf("len(mii) = %d\n", len(mii))
+ panic(fmt.Sprintf("len(mii) = %d\n", len(mii)))
}
if len(mfi) != count {
- fmt.Printf("len(mfi) = %d\n", len(mfi))
+ panic(fmt.Sprintf("len(mfi) = %d\n", len(mfi)))
}
if len(mif) != count {
- fmt.Printf("len(mif) = %d\n", len(mif))
+ panic(fmt.Sprintf("len(mif) = %d\n", len(mif)))
}
if len(msi) != count {
- fmt.Printf("len(msi) = %d\n", len(msi))
+ panic(fmt.Sprintf("len(msi) = %d\n", len(msi)))
}
if len(mis) != count {
- fmt.Printf("len(mis) = %d\n", len(mis))
+ panic(fmt.Sprintf("len(mis) = %d\n", len(mis)))
}
if len(mss) != count {
- fmt.Printf("len(mss) = %d\n", len(mss))
+ panic(fmt.Sprintf("len(mss) = %d\n", len(mss)))
}
if len(mspa) != count {
- fmt.Printf("len(mspa) = %d\n", len(mspa))
+ panic(fmt.Sprintf("len(mspa) = %d\n", len(mspa)))
}
if len(mipT) != count {
- fmt.Printf("len(mipT) = %d\n", len(mipT))
+ panic(fmt.Sprintf("len(mipT) = %d\n", len(mipT)))
}
if len(mpTi) != count {
- fmt.Printf("len(mpTi) = %d\n", len(mpTi))
+ panic(fmt.Sprintf("len(mpTi) = %d\n", len(mpTi)))
}
// if len(mti) != count {
- // fmt.Printf("len(mti) = %d\n", len(mti))
+ // panic(fmt.Sprintf("len(mti) = %d\n", len(mti)))
// }
if len(mipM) != count {
- fmt.Printf("len(mipM) = %d\n", len(mipM))
+ panic(fmt.Sprintf("len(mipM) = %d\n", len(mipM)))
}
// if len(mti) != count {
- // fmt.Printf("len(mti) = %d\n", len(mti))
+ // panic(fmt.Sprintf("len(mti) = %d\n", len(mti)))
// }
if len(mit) != count {
- fmt.Printf("len(mit) = %d\n", len(mit))
+ panic(fmt.Sprintf("len(mit) = %d\n", len(mit)))
}
// test construction directly
@@ -141,48 +151,48 @@ func main() {
f := float32(i)
// BUG m := M(i, i+1)
if mib[i] != (i != 0) {
- fmt.Printf("mib[%d] = %t\n", i, mib[i])
+ panic(fmt.Sprintf("mib[%d] = %t\n", i, mib[i]))
}
if mii[i] != 10*i {
- fmt.Printf("mii[%d] = %d\n", i, mii[i])
+ panic(fmt.Sprintf("mii[%d] = %d\n", i, mii[i]))
}
if mfi[f] != 10*i {
- fmt.Printf("mfi[%d] = %d\n", i, mfi[f])
+ panic(fmt.Sprintf("mfi[%d] = %d\n", i, mfi[f]))
}
if mif[i] != 10.0*f {
- fmt.Printf("mif[%d] = %g\n", i, mif[i])
+ panic(fmt.Sprintf("mif[%d] = %g\n", i, mif[i]))
}
if mis[i] != s {
- fmt.Printf("mis[%d] = %s\n", i, mis[i])
+ panic(fmt.Sprintf("mis[%d] = %s\n", i, mis[i]))
}
if msi[s] != i {
- fmt.Printf("msi[%s] = %d\n", s, msi[s])
+ panic(fmt.Sprintf("msi[%s] = %d\n", s, msi[s]))
}
if mss[s] != s10 {
- fmt.Printf("mss[%s] = %g\n", s, mss[s])
+ panic(fmt.Sprintf("mss[%s] = %g\n", s, mss[s]))
}
for j := 0; j < len(mspa[s]); j++ {
if mspa[s][j] != s10 {
- fmt.Printf("mspa[%s][%d] = %s\n", s, j, mspa[s][j])
+ panic(fmt.Sprintf("mspa[%s][%d] = %s\n", s, j, mspa[s][j]))
}
}
if mipT[i].i != int64(i) || mipT[i].f != f {
- fmt.Printf("mipT[%d] = %v\n", i, mipT[i])
+ panic(fmt.Sprintf("mipT[%d] = %v\n", i, mipT[i]))
}
if mpTi[apT[i]] != i {
- fmt.Printf("mpTi[apT[%d]] = %d\n", i, mpTi[apT[i]])
+ panic(fmt.Sprintf("mpTi[apT[%d]] = %d\n", i, mpTi[apT[i]]))
}
// if(mti[t] != i) {
- // fmt.Printf("mti[%s] = %s\n", s, mti[t])
+ // panic(fmt.Sprintf("mti[%s] = %s\n", s, mti[t]))
// }
if mipM[i][i] != i+1 {
- fmt.Printf("mipM[%d][%d] = %d\n", i, i, mipM[i][i])
+ panic(fmt.Sprintf("mipM[%d][%d] = %d\n", i, i, mipM[i][i]))
}
// if(mti[t] != i) {
- // fmt.Printf("mti[%v] = %d\n", t, mti[t])
+ // panic(fmt.Sprintf("mti[%v] = %d\n", t, mti[t]))
// }
if mit[i].i != int64(i) || mit[i].f != f {
- fmt.Printf("mit[%d] = {%d %g}\n", i, mit[i].i, mit[i].f)
+ panic(fmt.Sprintf("mit[%d] = {%d %g}\n", i, mit[i].i, mit[i].f))
}
}
@@ -194,131 +204,131 @@ func main() {
{
_, b := mib[i]
if !b {
- fmt.Printf("tuple existence decl: mib[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mib[%d]\n", i))
}
_, b = mib[i]
if !b {
- fmt.Printf("tuple existence assign: mib[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mib[%d]\n", i))
}
}
{
_, b := mii[i]
if !b {
- fmt.Printf("tuple existence decl: mii[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mii[%d]\n", i))
}
_, b = mii[i]
if !b {
- fmt.Printf("tuple existence assign: mii[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mii[%d]\n", i))
}
}
{
_, b := mfi[f]
if !b {
- fmt.Printf("tuple existence decl: mfi[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mfi[%d]\n", i))
}
_, b = mfi[f]
if !b {
- fmt.Printf("tuple existence assign: mfi[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mfi[%d]\n", i))
}
}
{
_, b := mif[i]
if !b {
- fmt.Printf("tuple existence decl: mif[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mif[%d]\n", i))
}
_, b = mif[i]
if !b {
- fmt.Printf("tuple existence assign: mif[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mif[%d]\n", i))
}
}
{
_, b := mis[i]
if !b {
- fmt.Printf("tuple existence decl: mis[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mis[%d]\n", i))
}
_, b = mis[i]
if !b {
- fmt.Printf("tuple existence assign: mis[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mis[%d]\n", i))
}
}
{
_, b := msi[s]
if !b {
- fmt.Printf("tuple existence decl: msi[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: msi[%d]\n", i))
}
_, b = msi[s]
if !b {
- fmt.Printf("tuple existence assign: msi[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: msi[%d]\n", i))
}
}
{
_, b := mss[s]
if !b {
- fmt.Printf("tuple existence decl: mss[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mss[%d]\n", i))
}
_, b = mss[s]
if !b {
- fmt.Printf("tuple existence assign: mss[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mss[%d]\n", i))
}
}
{
_, b := mspa[s]
if !b {
- fmt.Printf("tuple existence decl: mspa[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mspa[%d]\n", i))
}
_, b = mspa[s]
if !b {
- fmt.Printf("tuple existence assign: mspa[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mspa[%d]\n", i))
}
}
{
_, b := mipT[i]
if !b {
- fmt.Printf("tuple existence decl: mipT[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mipT[%d]\n", i))
}
_, b = mipT[i]
if !b {
- fmt.Printf("tuple existence assign: mipT[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mipT[%d]\n", i))
}
}
{
_, b := mpTi[apT[i]]
if !b {
- fmt.Printf("tuple existence decl: mpTi[apT[%d]]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mpTi[apT[%d]]\n", i))
}
_, b = mpTi[apT[i]]
if !b {
- fmt.Printf("tuple existence assign: mpTi[apT[%d]]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mpTi[apT[%d]]\n", i))
}
}
{
_, b := mipM[i]
if !b {
- fmt.Printf("tuple existence decl: mipM[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mipM[%d]\n", i))
}
_, b = mipM[i]
if !b {
- fmt.Printf("tuple existence assign: mipM[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mipM[%d]\n", i))
}
}
{
_, b := mit[i]
if !b {
- fmt.Printf("tuple existence decl: mit[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence decl: mit[%d]\n", i))
}
_, b = mit[i]
if !b {
- fmt.Printf("tuple existence assign: mit[%d]\n", i)
+ panic(fmt.Sprintf("tuple existence assign: mit[%d]\n", i))
}
}
// {
// _, b := mti[t]
// if !b {
- // fmt.Printf("tuple existence decl: mti[%d]\n", i)
+ // panic(fmt.Sprintf("tuple existence decl: mti[%d]\n", i))
// }
// _, b = mti[t]
// if !b {
- // fmt.Printf("tuple existence assign: mti[%d]\n", i)
+ // panic(fmt.Sprintf("tuple existence assign: mti[%d]\n", i))
// }
// }
}
@@ -331,131 +341,131 @@ func main() {
{
_, b := mib[i]
if b {
- fmt.Printf("tuple nonexistence decl: mib[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mib[%d]", i))
}
_, b = mib[i]
if b {
- fmt.Printf("tuple nonexistence assign: mib[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mib[%d]", i))
}
}
{
_, b := mii[i]
if b {
- fmt.Printf("tuple nonexistence decl: mii[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mii[%d]", i))
}
_, b = mii[i]
if b {
- fmt.Printf("tuple nonexistence assign: mii[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mii[%d]", i))
}
}
{
_, b := mfi[f]
if b {
- fmt.Printf("tuple nonexistence decl: mfi[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mfi[%d]", i))
}
_, b = mfi[f]
if b {
- fmt.Printf("tuple nonexistence assign: mfi[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mfi[%d]", i))
}
}
{
_, b := mif[i]
if b {
- fmt.Printf("tuple nonexistence decl: mif[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mif[%d]", i))
}
_, b = mif[i]
if b {
- fmt.Printf("tuple nonexistence assign: mif[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mif[%d]", i))
}
}
{
_, b := mis[i]
if b {
- fmt.Printf("tuple nonexistence decl: mis[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mis[%d]", i))
}
_, b = mis[i]
if b {
- fmt.Printf("tuple nonexistence assign: mis[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mis[%d]", i))
}
}
{
_, b := msi[s]
if b {
- fmt.Printf("tuple nonexistence decl: msi[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: msi[%d]", i))
}
_, b = msi[s]
if b {
- fmt.Printf("tuple nonexistence assign: msi[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: msi[%d]", i))
}
}
{
_, b := mss[s]
if b {
- fmt.Printf("tuple nonexistence decl: mss[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mss[%d]", i))
}
_, b = mss[s]
if b {
- fmt.Printf("tuple nonexistence assign: mss[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mss[%d]", i))
}
}
{
_, b := mspa[s]
if b {
- fmt.Printf("tuple nonexistence decl: mspa[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mspa[%d]", i))
}
_, b = mspa[s]
if b {
- fmt.Printf("tuple nonexistence assign: mspa[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mspa[%d]", i))
}
}
{
_, b := mipT[i]
if b {
- fmt.Printf("tuple nonexistence decl: mipT[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mipT[%d]", i))
}
_, b = mipT[i]
if b {
- fmt.Printf("tuple nonexistence assign: mipT[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mipT[%d]", i))
}
}
{
_, b := mpTi[apT[i]]
if b {
- fmt.Printf("tuple nonexistence decl: mpTi[apt[%d]]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mpTi[apt[%d]]", i))
}
_, b = mpTi[apT[i]]
if b {
- fmt.Printf("tuple nonexistence assign: mpTi[apT[%d]]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mpTi[apT[%d]]", i))
}
}
{
_, b := mipM[i]
if b {
- fmt.Printf("tuple nonexistence decl: mipM[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mipM[%d]", i))
}
_, b = mipM[i]
if b {
- fmt.Printf("tuple nonexistence assign: mipM[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mipM[%d]", i))
}
}
// {
// _, b := mti[t]
// if b {
- // fmt.Printf("tuple nonexistence decl: mti[%d]", i)
+ // panic(fmt.Sprintf("tuple nonexistence decl: mti[%d]", i))
// }
// _, b = mti[t]
// if b {
- // fmt.Printf("tuple nonexistence assign: mti[%d]", i)
+ // panic(fmt.Sprintf("tuple nonexistence assign: mti[%d]", i))
// }
// }
{
_, b := mit[i]
if b {
- fmt.Printf("tuple nonexistence decl: mit[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence decl: mit[%d]", i))
}
_, b = mit[i]
if b {
- fmt.Printf("tuple nonexistence assign: mit[%d]", i)
+ panic(fmt.Sprintf("tuple nonexistence assign: mit[%d]", i))
}
}
}
@@ -465,21 +475,25 @@ func main() {
s := strconv.Itoa(i)
mspa[s][i%2] = "deleted"
if mspa[s][i%2] != "deleted" {
- fmt.Printf("update mspa[%s][%d] = %s\n", s, i%2, mspa[s][i%2])
+ panic(fmt.Sprintf("update mspa[%s][%d] = %s\n", s, i%2, mspa[s][i%2]))
+
}
mipT[i].i += 1
if mipT[i].i != int64(i)+1 {
- fmt.Printf("update mipT[%d].i = %d\n", i, mipT[i].i)
+ panic(fmt.Sprintf("update mipT[%d].i = %d\n", i, mipT[i].i))
+
}
mipT[i].f = float32(i + 1)
if mipT[i].f != float32(i+1) {
- fmt.Printf("update mipT[%d].f = %g\n", i, mipT[i].f)
+ panic(fmt.Sprintf("update mipT[%d].f = %g\n", i, mipT[i].f))
+
}
mipM[i][i]++
if mipM[i][i] != (i+1)+1 {
- fmt.Printf("update mipM[%d][%d] = %i\n", i, i, mipM[i][i])
+ panic(fmt.Sprintf("update mipM[%d][%d] = %d\n", i, i, mipM[i][i]))
+
}
}
@@ -489,3 +503,182 @@ func main() {
panic("range mnil")
}
}
+
+func testfloat() {
+ // Test floating point numbers in maps.
+ // Two map keys refer to the same entry if the keys are ==.
+ // The special cases, then, are that +0 == -0 and that NaN != NaN.
+
+ {
+ var (
+ pz = float32(0)
+ nz = math.Float32frombits(1 << 31)
+ nana = float32(math.NaN())
+ nanb = math.Float32frombits(math.Float32bits(nana) ^ 2)
+ )
+
+ m := map[float32]string{
+ pz: "+0",
+ nana: "NaN",
+ nanb: "NaN",
+ }
+ if m[pz] != "+0" {
+ panic(fmt.Sprintln("float32 map cannot read back m[+0]:", m[pz]))
+ }
+ if m[nz] != "+0" {
+ fmt.Sprintln("float32 map does not treat", pz, "and", nz, "as equal for read")
+ panic(fmt.Sprintln("float32 map does not treat -0 and +0 as equal for read"))
+ }
+ m[nz] = "-0"
+ if m[pz] != "-0" {
+ panic(fmt.Sprintln("float32 map does not treat -0 and +0 as equal for write"))
+ }
+ if _, ok := m[nana]; ok {
+ panic(fmt.Sprintln("float32 map allows NaN lookup (a)"))
+ }
+ if _, ok := m[nanb]; ok {
+ panic(fmt.Sprintln("float32 map allows NaN lookup (b)"))
+ }
+ if len(m) != 3 {
+ panic(fmt.Sprintln("float32 map should have 3 entries:", m))
+ }
+ m[nana] = "NaN"
+ m[nanb] = "NaN"
+ if len(m) != 5 {
+ panic(fmt.Sprintln("float32 map should have 5 entries:", m))
+ }
+ }
+
+ {
+ var (
+ pz = float64(0)
+ nz = math.Float64frombits(1 << 63)
+ nana = float64(math.NaN())
+ nanb = math.Float64frombits(math.Float64bits(nana) ^ 2)
+ )
+
+ m := map[float64]string{
+ pz: "+0",
+ nana: "NaN",
+ nanb: "NaN",
+ }
+ if m[nz] != "+0" {
+ panic(fmt.Sprintln("float64 map does not treat -0 and +0 as equal for read"))
+ }
+ m[nz] = "-0"
+ if m[pz] != "-0" {
+ panic(fmt.Sprintln("float64 map does not treat -0 and +0 as equal for write"))
+ }
+ if _, ok := m[nana]; ok {
+ panic(fmt.Sprintln("float64 map allows NaN lookup (a)"))
+ }
+ if _, ok := m[nanb]; ok {
+ panic(fmt.Sprintln("float64 map allows NaN lookup (b)"))
+ }
+ if len(m) != 3 {
+ panic(fmt.Sprintln("float64 map should have 3 entries:", m))
+ }
+ m[nana] = "NaN"
+ m[nanb] = "NaN"
+ if len(m) != 5 {
+ panic(fmt.Sprintln("float64 map should have 5 entries:", m))
+ }
+ }
+
+ {
+ var (
+ pz = complex64(0)
+ nz = complex(0, math.Float32frombits(1<<31))
+ nana = complex(5, float32(math.NaN()))
+ nanb = complex(5, math.Float32frombits(math.Float32bits(float32(math.NaN()))^2))
+ )
+
+ m := map[complex64]string{
+ pz: "+0",
+ nana: "NaN",
+ nanb: "NaN",
+ }
+ if m[nz] != "+0" {
+ panic(fmt.Sprintln("complex64 map does not treat -0 and +0 as equal for read"))
+ }
+ m[nz] = "-0"
+ if m[pz] != "-0" {
+ panic(fmt.Sprintln("complex64 map does not treat -0 and +0 as equal for write"))
+ }
+ if _, ok := m[nana]; ok {
+ panic(fmt.Sprintln("complex64 map allows NaN lookup (a)"))
+ }
+ if _, ok := m[nanb]; ok {
+ panic(fmt.Sprintln("complex64 map allows NaN lookup (b)"))
+ }
+ if len(m) != 3 {
+ panic(fmt.Sprintln("complex64 map should have 3 entries:", m))
+ }
+ m[nana] = "NaN"
+ m[nanb] = "NaN"
+ if len(m) != 5 {
+ panic(fmt.Sprintln("complex64 map should have 5 entries:", m))
+ }
+ }
+
+ {
+ var (
+ pz = complex128(0)
+ nz = complex(0, math.Float64frombits(1<<63))
+ nana = complex(5, float64(math.NaN()))
+ nanb = complex(5, math.Float64frombits(math.Float64bits(float64(math.NaN()))^2))
+ )
+
+ m := map[complex128]string{
+ pz: "+0",
+ nana: "NaN",
+ nanb: "NaN",
+ }
+ if m[nz] != "+0" {
+ panic(fmt.Sprintln("complex128 map does not treat -0 and +0 as equal for read"))
+ }
+ m[nz] = "-0"
+ if m[pz] != "-0" {
+ panic(fmt.Sprintln("complex128 map does not treat -0 and +0 as equal for write"))
+ }
+ if _, ok := m[nana]; ok {
+ panic(fmt.Sprintln("complex128 map allows NaN lookup (a)"))
+ }
+ if _, ok := m[nanb]; ok {
+ panic(fmt.Sprintln("complex128 map allows NaN lookup (b)"))
+ }
+ if len(m) != 3 {
+ panic(fmt.Sprintln("complex128 map should have 3 entries:", m))
+ }
+ m[nana] = "NaN"
+ m[nanb] = "NaN"
+ if len(m) != 5 {
+ panic(fmt.Sprintln("complex128 map should have 5 entries:", m))
+ }
+ }
+}
+
+func testnan() {
+ n := 500
+ m := map[float64]int{}
+ nan := math.NaN()
+ for i := 0; i < n; i++ {
+ m[nan] = 1
+ }
+ if len(m) != n {
+ panic("wrong size map after nan insertion")
+ }
+ iters := 0
+ for k, v := range m {
+ iters++
+ if !math.IsNaN(k) {
+ panic("not NaN")
+ }
+ if v != 1 {
+ panic("wrong value")
+ }
+ }
+ if iters != n {
+ panic("wrong number of nan range iters")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/map1.go b/gcc/testsuite/go.test/test/map1.go
index 6af10565cd..6f1a1c8ac0 100644
--- a/gcc/testsuite/go.test/test/map1.go
+++ b/gcc/testsuite/go.test/test/map1.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test map declarations of many types, including erroneous ones.
+// Does not compile.
+
package main
func main() {}
@@ -38,4 +41,22 @@ var (
_ map[[]int]v // ERROR "invalid map key"
_ map[func()]v // ERROR "invalid map key"
_ map[map[int]int]v // ERROR "invalid map key"
+ _ map[T1]v // ERROR "invalid map key"
+ _ map[T2]v // ERROR "invalid map key"
+ _ map[T3]v // ERROR "invalid map key"
+ _ map[T4]v // ERROR "invalid map key"
+ _ map[T5]v
+ _ map[T6]v
+ _ map[T7]v
+ _ map[T8]v
)
+
+type T1 []int
+type T2 struct { F T1 }
+type T3 []T4
+type T4 struct { F T3 }
+
+type T5 *int
+type T6 struct { F T5 }
+type T7 *T4
+type T8 struct { F *T7 }
diff --git a/gcc/testsuite/go.test/test/mapnan.go b/gcc/testsuite/go.test/test/mapnan.go
new file mode 100644
index 0000000000..f081cab01d
--- /dev/null
+++ b/gcc/testsuite/go.test/test/mapnan.go
@@ -0,0 +1,56 @@
+// +build darwin linux
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that NaNs in maps don't go quadratic.
+
+package main
+
+import (
+ "fmt"
+ "math"
+ "time"
+)
+
+func main() {
+
+ // Test that NaNs in maps don't go quadratic.
+ t := func(n int) time.Duration {
+ t1 := time.Now()
+ m := map[float64]int{}
+ nan := math.NaN()
+ for i := 0; i < n; i++ {
+ m[nan] = 1
+ }
+ if len(m) != n {
+ panic("wrong size map after nan insertion")
+ }
+ return time.Since(t1)
+ }
+
+ // Depending on the machine and OS, this test might be too fast
+ // to measure with accurate enough granularity. On failure,
+ // make it run longer, hoping that the timing granularity
+ // is eventually sufficient.
+
+ n := 30000 // ~8ms user time on a Mid 2011 MacBook Air (1.8 GHz Core i7)
+ fails := 0
+ for {
+ t1 := t(n)
+ t2 := t(2 * n)
+ // should be 2x (linear); allow up to 3x
+ if t2 < 3*t1 {
+ return
+ }
+ fails++
+ if fails == 6 {
+ panic(fmt.Sprintf("too slow: %d inserts: %v; %d inserts: %v\n", n, t1, 2*n, t2))
+ }
+ if fails < 4 {
+ n *= 2
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/method.go b/gcc/testsuite/go.test/test/method.go
index b5a02c6873..d97bc4a7d0 100644
--- a/gcc/testsuite/go.test/test/method.go
+++ b/gcc/testsuite/go.test/test/method.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple methods of various types, with pointer and
+// value receivers.
+
package main
type S string
@@ -91,27 +94,27 @@ func main() {
}
if val(s) != 1 {
- println("s.val:", val(s))
+ println("val(s):", val(s))
panic("fail")
}
if val(ps) != 2 {
- println("ps.val:", val(ps))
+ println("val(ps):", val(ps))
panic("fail")
}
if val(i) != 3 {
- println("i.val:", val(i))
+ println("val(i):", val(i))
panic("fail")
}
if val(pi) != 4 {
- println("pi.val:", val(pi))
+ println("val(pi):", val(pi))
panic("fail")
}
if val(t) != 7 {
- println("t.val:", val(t))
+ println("val(t):", val(t))
panic("fail")
}
if val(pt) != 8 {
- println("pt.val:", val(pt))
+ println("val(pt):", val(pt))
panic("fail")
}
@@ -124,4 +127,181 @@ func main() {
println("Val.val(v):", Val.val(v))
panic("fail")
}
+
+ var zs struct{ S }
+ var zps struct{ *S1 }
+ var zi struct{ I }
+ var zpi struct{ *I1 }
+ var zpt struct{ *T1 }
+ var zt struct{ T }
+ var zv struct{ Val }
+
+ if zs.val() != 1 {
+ println("zs.val:", zs.val())
+ panic("fail")
+ }
+ if zps.val() != 2 {
+ println("zps.val:", zps.val())
+ panic("fail")
+ }
+ if zi.val() != 3 {
+ println("zi.val:", zi.val())
+ panic("fail")
+ }
+ if zpi.val() != 4 {
+ println("zpi.val:", zpi.val())
+ panic("fail")
+ }
+ if zt.val() != 7 {
+ println("zt.val:", zt.val())
+ panic("fail")
+ }
+ if zpt.val() != 8 {
+ println("zpt.val:", zpt.val())
+ panic("fail")
+ }
+
+ if val(zs) != 1 {
+ println("val(zs):", val(zs))
+ panic("fail")
+ }
+ if val(zps) != 2 {
+ println("val(zps):", val(zps))
+ panic("fail")
+ }
+ if val(zi) != 3 {
+ println("val(zi):", val(zi))
+ panic("fail")
+ }
+ if val(zpi) != 4 {
+ println("val(zpi):", val(zpi))
+ panic("fail")
+ }
+ if val(zt) != 7 {
+ println("val(zt):", val(zt))
+ panic("fail")
+ }
+ if val(zpt) != 8 {
+ println("val(zpt):", val(zpt))
+ panic("fail")
+ }
+
+ zv.Val = zi
+ if zv.val() != 3 {
+ println("zv.val():", zv.val())
+ panic("fail")
+ }
+
+ if (&zs).val() != 1 {
+ println("(&zs).val:", (&zs).val())
+ panic("fail")
+ }
+ if (&zps).val() != 2 {
+ println("(&zps).val:", (&zps).val())
+ panic("fail")
+ }
+ if (&zi).val() != 3 {
+ println("(&zi).val:", (&zi).val())
+ panic("fail")
+ }
+ if (&zpi).val() != 4 {
+ println("(&zpi).val:", (&zpi).val())
+ panic("fail")
+ }
+ if (&zt).val() != 7 {
+ println("(&zt).val:", (&zt).val())
+ panic("fail")
+ }
+ if (&zpt).val() != 8 {
+ println("(&zpt).val:", (&zpt).val())
+ panic("fail")
+ }
+
+ if val(&zs) != 1 {
+ println("val(&zs):", val(&zs))
+ panic("fail")
+ }
+ if val(&zps) != 2 {
+ println("val(&zps):", val(&zps))
+ panic("fail")
+ }
+ if val(&zi) != 3 {
+ println("val(&zi):", val(&zi))
+ panic("fail")
+ }
+ if val(&zpi) != 4 {
+ println("val(&zpi):", val(&zpi))
+ panic("fail")
+ }
+ if val(&zt) != 7 {
+ println("val(&zt):", val(&zt))
+ panic("fail")
+ }
+ if val(&zpt) != 8 {
+ println("val(&zpt):", val(&zpt))
+ panic("fail")
+ }
+
+ zv.Val = &zi
+ if zv.val() != 3 {
+ println("zv.val():", zv.val())
+ panic("fail")
+ }
+
+ promotion()
+}
+
+type A struct{ B }
+type B struct {
+ C
+ *D
+}
+type C int
+
+func (C) f() {} // value receiver, direct field of A
+func (*C) g() {} // pointer receiver
+
+type D int
+
+func (D) h() {} // value receiver, indirect field of A
+func (*D) i() {} // pointer receiver
+
+func expectPanic() {
+ if r := recover(); r == nil {
+ panic("expected nil dereference")
+ }
+}
+
+func promotion() {
+ var a A
+ // Addressable value receiver.
+ a.f()
+ a.g()
+ func() {
+ defer expectPanic()
+ a.h() // dynamic error: nil dereference in a.B.D->f()
+ }()
+ a.i()
+
+ // Non-addressable value receiver.
+ A(a).f()
+ // A(a).g() // static error: cannot call pointer method on A literal.B.C
+ func() {
+ defer expectPanic()
+ A(a).h() // dynamic error: nil dereference in A().B.D->f()
+ }()
+ A(a).i()
+
+ // Pointer receiver.
+ (&a).f()
+ (&a).g()
+ func() {
+ defer expectPanic()
+ (&a).h() // dynamic error: nil deref: nil dereference in (&a).B.D->f()
+ }()
+ (&a).i()
+
+ c := new(C)
+ c.f() // makes a copy
+ c.g()
}
diff --git a/gcc/testsuite/go.test/test/method1.go b/gcc/testsuite/go.test/test/method1.go
index ec14ef9e4f..365b8ca553 100644
--- a/gcc/testsuite/go.test/test/method1.go
+++ b/gcc/testsuite/go.test/test/method1.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that method redeclarations are caught by the compiler.
+// Does not compile.
+
package main
type T struct { }
diff --git a/gcc/testsuite/go.test/test/method2.go b/gcc/testsuite/go.test/test/method2.go
index 039779efbe..aaa850e719 100644
--- a/gcc/testsuite/go.test/test/method2.go
+++ b/gcc/testsuite/go.test/test/method2.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that pointers and interface types cannot be method receivers.
+// Does not compile.
+
package main
type T struct {
@@ -18,7 +21,7 @@ func (p *P1) val() int { return 1 } // ERROR "receiver.* pointer|invalid pointer
type I interface{}
type I1 interface{}
-func (p I) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
+func (p I) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
func (p *I1) val() int { return 1 } // ERROR "receiver.*interface|invalid pointer or interface receiver"
type Val interface {
@@ -30,4 +33,5 @@ var _ = (*Val).val // ERROR "method"
var v Val
var pv = &v
-var _ = pv.val() // ERROR "method"
+var _ = pv.val() // ERROR "method"
+var _ = pv.val // ERROR "method"
diff --git a/gcc/testsuite/go.test/test/method3.go b/gcc/testsuite/go.test/test/method3.go
index 7946a87502..fd64771527 100644
--- a/gcc/testsuite/go.test/test/method3.go
+++ b/gcc/testsuite/go.test/test/method3.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG method3
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// test that methods on slices work
+// Test methods on slices.
package main
diff --git a/gcc/testsuite/go.test/test/method4.dir/method4a.go b/gcc/testsuite/go.test/test/method4.dir/method4a.go
new file mode 100644
index 0000000000..a7df04cec3
--- /dev/null
+++ b/gcc/testsuite/go.test/test/method4.dir/method4a.go
@@ -0,0 +1,37 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test method expressions with arguments.
+
+package method4a
+
+type T1 int
+
+type T2 struct {
+ F int
+}
+
+type I1 interface {
+ Sum([]int, int) int
+}
+
+type I2 interface {
+ Sum(a []int, b int) int
+}
+
+func (i T1) Sum(a []int, b int) int {
+ r := int(i) + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func (p *T2) Sum(a []int, b int) int {
+ r := p.F + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
diff --git a/gcc/testsuite/go.test/test/method4.dir/prog.go b/gcc/testsuite/go.test/test/method4.dir/prog.go
new file mode 100644
index 0000000000..77d580cffc
--- /dev/null
+++ b/gcc/testsuite/go.test/test/method4.dir/prog.go
@@ -0,0 +1,104 @@
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test method expressions with arguments.
+
+package main
+
+import "./method4a"
+
+type T1 int
+
+type T2 struct {
+ f int
+}
+
+type I1 interface {
+ Sum([]int, int) int
+}
+
+type I2 interface {
+ Sum(a []int, b int) int
+}
+
+func (i T1) Sum(a []int, b int) int {
+ r := int(i) + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func (p *T2) Sum(a []int, b int) int {
+ r := p.f + b
+ for _, v := range a {
+ r += v
+ }
+ return r
+}
+
+func eq(v1, v2 int) {
+ if v1 != v2 {
+ panic(0)
+ }
+}
+
+func main() {
+ a := []int{1, 2, 3}
+ t1 := T1(4)
+ t2 := &T2{4}
+
+ eq(t1.Sum(a, 5), 15)
+ eq(t2.Sum(a, 6), 16)
+
+ eq(T1.Sum(t1, a, 7), 17)
+ eq((*T2).Sum(t2, a, 8), 18)
+
+ f1 := T1.Sum
+ eq(f1(t1, a, 9), 19)
+ f2 := (*T2).Sum
+ eq(f2(t2, a, 10), 20)
+
+ eq(I1.Sum(t1, a, 11), 21)
+ eq(I1.Sum(t2, a, 12), 22)
+
+ f3 := I1.Sum
+ eq(f3(t1, a, 13), 23)
+ eq(f3(t2, a, 14), 24)
+
+ eq(I2.Sum(t1, a, 15), 25)
+ eq(I2.Sum(t2, a, 16), 26)
+
+ f4 := I2.Sum
+ eq(f4(t1, a, 17), 27)
+ eq(f4(t2, a, 18), 28)
+
+ mt1 := method4a.T1(4)
+ mt2 := &method4a.T2{4}
+
+ eq(mt1.Sum(a, 30), 40)
+ eq(mt2.Sum(a, 31), 41)
+
+ eq(method4a.T1.Sum(mt1, a, 32), 42)
+ eq((*method4a.T2).Sum(mt2, a, 33), 43)
+
+ g1 := method4a.T1.Sum
+ eq(g1(mt1, a, 34), 44)
+ g2 := (*method4a.T2).Sum
+ eq(g2(mt2, a, 35), 45)
+
+ eq(method4a.I1.Sum(mt1, a, 36), 46)
+ eq(method4a.I1.Sum(mt2, a, 37), 47)
+
+ g3 := method4a.I1.Sum
+ eq(g3(mt1, a, 38), 48)
+ eq(g3(mt2, a, 39), 49)
+
+ eq(method4a.I2.Sum(mt1, a, 40), 50)
+ eq(method4a.I2.Sum(mt2, a, 41), 51)
+
+ g4 := method4a.I2.Sum
+ eq(g4(mt1, a, 42), 52)
+ eq(g4(mt2, a, 43), 53)
+}
diff --git a/gcc/testsuite/go.test/test/method4.go b/gcc/testsuite/go.test/test/method4.go
new file mode 100644
index 0000000000..813892bc83
--- /dev/null
+++ b/gcc/testsuite/go.test/test/method4.go
@@ -0,0 +1,8 @@
+// rundir
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test method expressions with arguments.
+package ignored
diff --git a/gcc/testsuite/go.test/test/method5.go b/gcc/testsuite/go.test/test/method5.go
new file mode 100644
index 0000000000..36508f2e76
--- /dev/null
+++ b/gcc/testsuite/go.test/test/method5.go
@@ -0,0 +1,297 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+// Concrete types implementing M method.
+// Smaller than a word, word-sized, larger than a word.
+// Value and pointer receivers.
+
+type Tinter interface {
+ M(int, byte) (byte, int)
+}
+
+type Tsmallv byte
+
+func (v Tsmallv) M(x int, b byte) (byte, int) { return b, x+int(v) }
+
+type Tsmallp byte
+
+func (p *Tsmallp) M(x int, b byte) (byte, int) { return b, x+int(*p) }
+
+type Twordv uintptr
+
+func (v Twordv) M(x int, b byte) (byte, int) { return b, x+int(v) }
+
+type Twordp uintptr
+
+func (p *Twordp) M(x int, b byte) (byte, int) { return b, x+int(*p) }
+
+type Tbigv [2]uintptr
+
+func (v Tbigv) M(x int, b byte) (byte, int) { return b, x+int(v[0])+int(v[1]) }
+
+type Tbigp [2]uintptr
+
+func (p *Tbigp) M(x int, b byte) (byte, int) { return b, x+int(p[0])+int(p[1]) }
+
+// Again, with an unexported method.
+
+type tsmallv byte
+
+func (v tsmallv) m(x int, b byte) (byte, int) { return b, x+int(v) }
+
+type tsmallp byte
+
+func (p *tsmallp) m(x int, b byte) (byte, int) { return b, x+int(*p) }
+
+type twordv uintptr
+
+func (v twordv) m(x int, b byte) (byte, int) { return b, x+int(v) }
+
+type twordp uintptr
+
+func (p *twordp) m(x int, b byte) (byte, int) { return b, x+int(*p) }
+
+type tbigv [2]uintptr
+
+func (v tbigv) m(x int, b byte) (byte, int) { return b, x+int(v[0])+int(v[1]) }
+
+type tbigp [2]uintptr
+
+func (p *tbigp) m(x int, b byte) (byte, int) { return b, x+int(p[0])+int(p[1]) }
+
+type tinter interface {
+ m(int, byte) (byte, int)
+}
+
+// Embedding via pointer.
+
+type T1 struct {
+ T2
+}
+
+type T2 struct {
+ *T3
+}
+
+type T3 struct {
+ *T4
+}
+
+type T4 struct {
+}
+
+func (t4 T4) M(x int, b byte) (byte, int) { return b, x+40 }
+
+var failed = false
+
+func CheckI(name string, i Tinter, inc int) {
+ b, x := i.M(1000, 99)
+ if b != 99 || x != 1000+inc {
+ failed = true
+ print(name, ".M(1000, 99) = ", b, ", ", x, " want 99, ", 1000+inc, "\n")
+ }
+
+ CheckF("(i="+name+")", i.M, inc)
+}
+
+func CheckF(name string, f func(int, byte) (byte, int), inc int) {
+ b, x := f(1000, 99)
+ if b != 99 || x != 1000+inc {
+ failed = true
+ print(name, "(1000, 99) = ", b, ", ", x, " want 99, ", 1000+inc, "\n")
+ }
+}
+
+func checkI(name string, i tinter, inc int) {
+ b, x := i.m(1000, 99)
+ if b != 99 || x != 1000+inc {
+ failed = true
+ print(name, ".m(1000, 99) = ", b, ", ", x, " want 99, ", 1000+inc, "\n")
+ }
+
+ checkF("(i="+name+")", i.m, inc)
+}
+
+func checkF(name string, f func(int, byte) (byte, int), inc int) {
+ b, x := f(1000, 99)
+ if b != 99 || x != 1000+inc {
+ failed = true
+ print(name, "(1000, 99) = ", b, ", ", x, " want 99, ", 1000+inc, "\n")
+ }
+}
+
+func shouldPanic(f func()) {
+ defer func() {
+ if recover() == nil {
+ panic("not panicking")
+ }
+ }()
+ f()
+}
+
+func shouldNotPanic(f func()) {
+ f()
+}
+
+func main() {
+ sv := Tsmallv(1)
+ CheckI("sv", sv, 1)
+ CheckF("sv.M", sv.M, 1)
+ CheckF("(&sv).M", (&sv).M, 1)
+ psv := &sv
+ CheckI("psv", psv, 1)
+ CheckF("psv.M", psv.M, 1)
+ CheckF("(*psv).M", (*psv).M, 1)
+
+ sp := Tsmallp(2)
+ CheckI("&sp", &sp, 2)
+ CheckF("sp.M", sp.M, 2)
+ CheckF("(&sp).M", (&sp).M, 2)
+ psp := &sp
+ CheckI("psp", psp, 2)
+ CheckF("psp.M", psp.M, 2)
+ CheckF("(*psp).M", (*psp).M, 2)
+
+ wv := Twordv(3)
+ CheckI("wv", wv, 3)
+ CheckF("wv.M", wv.M, 3)
+ CheckF("(&wv).M", (&wv).M, 3)
+ pwv := &wv
+ CheckI("pwv", pwv, 3)
+ CheckF("pwv.M", pwv.M, 3)
+ CheckF("(*pwv).M", (*pwv).M, 3)
+
+ wp := Twordp(4)
+ CheckI("&wp", &wp, 4)
+ CheckF("wp.M", wp.M, 4)
+ CheckF("(&wp).M", (&wp).M, 4)
+ pwp := &wp
+ CheckI("pwp", pwp, 4)
+ CheckF("pwp.M", pwp.M, 4)
+ CheckF("(*pwp).M", (*pwp).M, 4)
+
+ bv := Tbigv([2]uintptr{5, 6})
+ pbv := &bv
+ CheckI("bv", bv, 11)
+ CheckF("bv.M", bv.M, 11)
+ CheckF("(&bv).M", (&bv).M, 11)
+ CheckI("pbv", pbv, 11)
+ CheckF("pbv.M", pbv.M, 11)
+ CheckF("(*pbv).M", (*pbv).M, 11)
+
+ bp := Tbigp([2]uintptr{7,8})
+ CheckI("&bp", &bp, 15)
+ CheckF("bp.M", bp.M, 15)
+ CheckF("(&bp).M", (&bp).M, 15)
+ pbp := &bp
+ CheckI("pbp", pbp, 15)
+ CheckF("pbp.M", pbp.M, 15)
+ CheckF("(*pbp).M", (*pbp).M, 15)
+
+ _sv := tsmallv(1)
+ checkI("_sv", _sv, 1)
+ checkF("_sv.m", _sv.m, 1)
+ checkF("(&_sv).m", (&_sv).m, 1)
+ _psv := &_sv
+ checkI("_psv", _psv, 1)
+ checkF("_psv.m", _psv.m, 1)
+ checkF("(*_psv).m", (*_psv).m, 1)
+
+ _sp := tsmallp(2)
+ checkI("&_sp", &_sp, 2)
+ checkF("_sp.m", _sp.m, 2)
+ checkF("(&_sp).m", (&_sp).m, 2)
+ _psp := &_sp
+ checkI("_psp", _psp, 2)
+ checkF("_psp.m", _psp.m, 2)
+ checkF("(*_psp).m", (*_psp).m, 2)
+
+ _wv := twordv(3)
+ checkI("_wv", _wv, 3)
+ checkF("_wv.m", _wv.m, 3)
+ checkF("(&_wv).m", (&_wv).m, 3)
+ _pwv := &_wv
+ checkI("_pwv", _pwv, 3)
+ checkF("_pwv.m", _pwv.m, 3)
+ checkF("(*_pwv).m", (*_pwv).m, 3)
+
+ _wp := twordp(4)
+ checkI("&_wp", &_wp, 4)
+ checkF("_wp.m", _wp.m, 4)
+ checkF("(&_wp).m", (&_wp).m, 4)
+ _pwp := &_wp
+ checkI("_pwp", _pwp, 4)
+ checkF("_pwp.m", _pwp.m, 4)
+ checkF("(*_pwp).m", (*_pwp).m, 4)
+
+ _bv := tbigv([2]uintptr{5, 6})
+ _pbv := &_bv
+ checkI("_bv", _bv, 11)
+ checkF("_bv.m", _bv.m, 11)
+ checkF("(&_bv).m", (&_bv).m, 11)
+ checkI("_pbv", _pbv, 11)
+ checkF("_pbv.m", _pbv.m, 11)
+ checkF("(*_pbv).m", (*_pbv).m, 11)
+
+ _bp := tbigp([2]uintptr{7,8})
+ checkI("&_bp", &_bp, 15)
+ checkF("_bp.m", _bp.m, 15)
+ checkF("(&_bp).m", (&_bp).m, 15)
+ _pbp := &_bp
+ checkI("_pbp", _pbp, 15)
+ checkF("_pbp.m", _pbp.m, 15)
+ checkF("(*_pbp).m", (*_pbp).m, 15)
+
+ t4 := T4{}
+ t3 := T3{&t4}
+ t2 := T2{&t3}
+ t1 := T1{t2}
+ CheckI("t4", t4, 40)
+ CheckI("&t4", &t4, 40)
+ CheckI("t3", t3, 40)
+ CheckI("&t3", &t3, 40)
+ CheckI("t2", t2, 40)
+ CheckI("&t2", &t2, 40)
+ CheckI("t1", t1, 40)
+ CheckI("&t1", &t1, 40)
+
+ // x.M panics if x is an interface type and is nil,
+ // or if x.M expands to (*x).M where x is nil,
+ // or if x.M expands to x.y.z.w.M where something
+ // along the evaluation of x.y.z.w is nil.
+ var f func(int, byte) (byte, int)
+ shouldPanic(func() { psv = nil; f = psv.M })
+ shouldPanic(func() { pwv = nil; f = pwv.M })
+ shouldPanic(func() { pbv = nil; f = pbv.M })
+ shouldPanic(func() { var i Tinter; f = i.M })
+ shouldPanic(func() { _psv = nil; f = _psv.m })
+ shouldPanic(func() { _pwv = nil; f = _pwv.m })
+ shouldPanic(func() { _pbv = nil; f = _pbv.m })
+ shouldPanic(func() { var _i tinter; f = _i.m })
+ shouldPanic(func() { var t1 T1; f = t1.M })
+ shouldPanic(func() { var t2 T2; f = t2.M })
+ shouldPanic(func() { var t3 *T3; f = t3.M })
+ shouldPanic(func() { var t3 T3; f = t3.M })
+
+ if f != nil {
+ panic("something set f")
+ }
+
+ // x.M does not panic if x is a nil pointer and
+ // M is a method with a pointer receiver.
+ shouldNotPanic(func() { psp = nil; f = psp.M })
+ shouldNotPanic(func() { pwp = nil; f = pwp.M })
+ shouldNotPanic(func() { pbp = nil; f = pbp.M })
+ shouldNotPanic(func() { _psp = nil; f = _psp.m })
+ shouldNotPanic(func() { _pwp = nil; f = _pwp.m })
+ shouldNotPanic(func() { _pbp = nil; f = _pbp.m })
+ shouldNotPanic(func() { var t4 T4; f = t4.M })
+ if f == nil {
+ panic("nothing set f")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/named.go b/gcc/testsuite/go.test/test/named.go
index 5b6bb81fe3..d0330ab238 100644
--- a/gcc/testsuite/go.test/test/named.go
+++ b/gcc/testsuite/go.test/test/named.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/named1.go b/gcc/testsuite/go.test/test/named1.go
index 561d84a43d..62b874c5cb 100644
--- a/gcc/testsuite/go.test/test/named1.go
+++ b/gcc/testsuite/go.test/test/named1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -6,6 +6,7 @@
// Test that basic operations on named types are valid
// and preserve the type.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/nil.go b/gcc/testsuite/go.test/test/nil.go
index efcf4f7822..f8300bf56a 100644
--- a/gcc/testsuite/go.test/test/nil.go
+++ b/gcc/testsuite/go.test/test/nil.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test nil.
+
package main
import (
@@ -113,7 +115,7 @@ func chantest() {
})
shouldBlock(func() {
x, ok := <-ch
- println(x, ok)
+ println(x, ok) // unreachable
})
if len(ch) != 0 {
@@ -145,13 +147,13 @@ func maptest() {
panic(v)
}
+ // can delete (non-existent) entries
+ delete(m, 2)
+
// but cannot be written to
shouldPanic(func() {
m[2] = 3
})
- shouldPanic(func() {
- delete(m, 2)
- })
}
// nil slice
diff --git a/gcc/testsuite/go.test/test/nilcheck.go b/gcc/testsuite/go.test/test/nilcheck.go
new file mode 100644
index 0000000000..fe05d05c92
--- /dev/null
+++ b/gcc/testsuite/go.test/test/nilcheck.go
@@ -0,0 +1,184 @@
+// errorcheck -0 -N -d=nil
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that nil checks are inserted.
+// Optimization is disabled, so redundant checks are not removed.
+
+package p
+
+type Struct struct {
+ X int
+ Y float64
+}
+
+type BigStruct struct {
+ X int
+ Y float64
+ A [1<<20]int
+ Z string
+}
+
+type Empty struct {
+}
+
+type Empty1 struct {
+ Empty
+}
+
+var (
+ intp *int
+ arrayp *[10]int
+ array0p *[0]int
+ bigarrayp *[1<<26]int
+ structp *Struct
+ bigstructp *BigStruct
+ emptyp *Empty
+ empty1p *Empty1
+)
+
+func f1() {
+ _ = *intp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+ _ = *array0p // ERROR "nil check"
+ _ = *array0p // ERROR "nil check"
+ _ = *intp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+ _ = *structp // ERROR "nil check"
+ _ = *emptyp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+}
+
+func f2() {
+ var (
+ intp *int
+ arrayp *[10]int
+ array0p *[0]int
+ bigarrayp *[1<<20]int
+ structp *Struct
+ bigstructp *BigStruct
+ emptyp *Empty
+ empty1p *Empty1
+ )
+
+ _ = *intp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+ _ = *array0p // ERROR "nil check"
+ _ = *array0p // ERROR "nil check"
+ _ = *intp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+ _ = *structp // ERROR "nil check"
+ _ = *emptyp // ERROR "nil check"
+ _ = *arrayp // ERROR "nil check"
+ _ = *bigarrayp // ERROR "nil check"
+ _ = *bigstructp // ERROR "nil check"
+ _ = *empty1p // ERROR "nil check"
+}
+
+func fx10k() *[10000]int
+var b bool
+
+
+func f3(x *[10000]int) {
+ // Using a huge type and huge offsets so the compiler
+ // does not expect the memory hardware to fault.
+ _ = x[9999] // ERROR "nil check"
+
+ for {
+ if x[9999] != 0 { // ERROR "nil check"
+ break
+ }
+ }
+
+ x = fx10k()
+ _ = x[9999] // ERROR "nil check"
+ if b {
+ _ = x[9999] // ERROR "nil check"
+ } else {
+ _ = x[9999] // ERROR "nil check"
+ }
+ _ = x[9999] // ERROR "nil check"
+
+ x = fx10k()
+ if b {
+ _ = x[9999] // ERROR "nil check"
+ } else {
+ _ = x[9999] // ERROR "nil check"
+ }
+ _ = x[9999] // ERROR "nil check"
+
+ fx10k()
+ // This one is a bit redundant, if we figured out that
+ // x wasn't going to change across the function call.
+ // But it's a little complex to do and in practice doesn't
+ // matter enough.
+ _ = x[9999] // ERROR "nil check"
+}
+
+func f3a() {
+ x := fx10k()
+ y := fx10k()
+ z := fx10k()
+ _ = &x[9] // ERROR "nil check"
+ y = z
+ _ = &x[9] // ERROR "nil check"
+ x = y
+ _ = &x[9] // ERROR "nil check"
+}
+
+func f3b() {
+ x := fx10k()
+ y := fx10k()
+ _ = &x[9] // ERROR "nil check"
+ y = x
+ _ = &x[9] // ERROR "nil check"
+ x = y
+ _ = &x[9] // ERROR "nil check"
+}
+
+func fx10() *[10]int
+
+func f4(x *[10]int) {
+ // Most of these have no checks because a real memory reference follows,
+ // and the offset is small enough that if x is nil, the address will still be
+ // in the first unmapped page of memory.
+
+ _ = x[9] // ERROR "nil check"
+
+ for {
+ if x[9] != 0 { // ERROR "nil check"
+ break
+ }
+ }
+
+ x = fx10()
+ _ = x[9] // ERROR "nil check"
+ if b {
+ _ = x[9] // ERROR "nil check"
+ } else {
+ _ = x[9] // ERROR "nil check"
+ }
+ _ = x[9] // ERROR "nil check"
+
+ x = fx10()
+ if b {
+ _ = x[9] // ERROR "nil check"
+ } else {
+ _ = &x[9] // ERROR "nil check"
+ }
+ _ = x[9] // ERROR "nil check"
+
+ fx10()
+ _ = x[9] // ERROR "nil check"
+
+ x = fx10()
+ y := fx10()
+ _ = &x[9] // ERROR "nil check"
+ y = x
+ _ = &x[9] // ERROR "nil check"
+ x = y
+ _ = &x[9] // ERROR "nil check"
+}
+
diff --git a/gcc/testsuite/go.test/test/nilptr.go b/gcc/testsuite/go.test/test/nilptr.go
index b0c1df2d95..9631d1618b 100644
--- a/gcc/testsuite/go.test/test/nilptr.go
+++ b/gcc/testsuite/go.test/test/nilptr.go
@@ -1,9 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that the implementation catches nil ptr indirection
+// in a large address space.
+
package main
import "unsafe"
@@ -35,6 +38,12 @@ func main() {
shouldPanic(p8)
shouldPanic(p9)
shouldPanic(p10)
+ shouldPanic(p11)
+ shouldPanic(p12)
+ shouldPanic(p13)
+ shouldPanic(p14)
+ shouldPanic(p15)
+ shouldPanic(p16)
}
func shouldPanic(f func()) {
@@ -127,3 +136,47 @@ func p10() {
var t *T
println(t.i) // should crash
}
+
+type T1 struct {
+ T
+}
+
+type T2 struct {
+ *T1
+}
+
+func p11() {
+ t := &T2{}
+ p := &t.i
+ println(*p)
+}
+
+// ADDR(DOT(IND(p))) needs a check also
+func p12() {
+ var p *T = nil
+ println(*(&((*p).i)))
+}
+
+// Tests suggested in golang.org/issue/6080.
+
+func p13() {
+ var x *[10]int
+ y := x[:]
+ _ = y
+}
+
+func p14() {
+ println((*[1]int)(nil)[:])
+}
+
+func p15() {
+ for i := range (*[1]int)(nil)[:] {
+ _ = i
+ }
+}
+
+func p16() {
+ for i, v := range (*[1]int)(nil)[:] {
+ _ = i + v
+ }
+}
diff --git a/gcc/testsuite/go.test/test/nilptr2.go b/gcc/testsuite/go.test/test/nilptr2.go
new file mode 100644
index 0000000000..57a5f8068f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/nilptr2.go
@@ -0,0 +1,128 @@
+// run
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+func main() {
+ ok := true
+ for _, tt := range tests {
+ func() {
+ defer func() {
+ if err := recover(); err == nil {
+ println(tt.name, "did not panic")
+ ok = false
+ }
+ }()
+ tt.fn()
+ }()
+ }
+ if !ok {
+ println("BUG")
+ }
+}
+
+var intp *int
+var slicep *[]byte
+var a10p *[10]int
+var a10Mp *[1<<20]int
+var structp *Struct
+var bigstructp *BigStruct
+var i int
+var m *M
+var m1 *M1
+var m2 *M2
+
+func use(interface{}) {
+}
+
+var tests = []struct{
+ name string
+ fn func()
+}{
+ // Edit .+1,/^}/s/^[^ ].+/ {"&", func() { println(&) }},\n {"\&&", func() { println(\&&) }},/g
+ {"*intp", func() { println(*intp) }},
+ {"&*intp", func() { println(&*intp) }},
+ {"*slicep", func() { println(*slicep) }},
+ {"&*slicep", func() { println(&*slicep) }},
+ {"(*slicep)[0]", func() { println((*slicep)[0]) }},
+ {"&(*slicep)[0]", func() { println(&(*slicep)[0]) }},
+ {"(*slicep)[i]", func() { println((*slicep)[i]) }},
+ {"&(*slicep)[i]", func() { println(&(*slicep)[i]) }},
+ {"*a10p", func() { use(*a10p) }},
+ {"&*a10p", func() { println(&*a10p) }},
+ {"a10p[0]", func() { println(a10p[0]) }},
+ {"&a10p[0]", func() { println(&a10p[0]) }},
+ {"a10p[i]", func() { println(a10p[i]) }},
+ {"&a10p[i]", func() { println(&a10p[i]) }},
+ {"*structp", func() { use(*structp) }},
+ {"&*structp", func() { println(&*structp) }},
+ {"structp.i", func() { println(structp.i) }},
+ {"&structp.i", func() { println(&structp.i) }},
+ {"structp.j", func() { println(structp.j) }},
+ {"&structp.j", func() { println(&structp.j) }},
+ {"structp.k", func() { println(structp.k) }},
+ {"&structp.k", func() { println(&structp.k) }},
+ {"structp.x[0]", func() { println(structp.x[0]) }},
+ {"&structp.x[0]", func() { println(&structp.x[0]) }},
+ {"structp.x[i]", func() { println(structp.x[i]) }},
+ {"&structp.x[i]", func() { println(&structp.x[i]) }},
+ {"structp.x[9]", func() { println(structp.x[9]) }},
+ {"&structp.x[9]", func() { println(&structp.x[9]) }},
+ {"structp.l", func() { println(structp.l) }},
+ {"&structp.l", func() { println(&structp.l) }},
+ {"*bigstructp", func() { use(*bigstructp) }},
+ {"&*bigstructp", func() { println(&*bigstructp) }},
+ {"bigstructp.i", func() { println(bigstructp.i) }},
+ {"&bigstructp.i", func() { println(&bigstructp.i) }},
+ {"bigstructp.j", func() { println(bigstructp.j) }},
+ {"&bigstructp.j", func() { println(&bigstructp.j) }},
+ {"bigstructp.k", func() { println(bigstructp.k) }},
+ {"&bigstructp.k", func() { println(&bigstructp.k) }},
+ {"bigstructp.x[0]", func() { println(bigstructp.x[0]) }},
+ {"&bigstructp.x[0]", func() { println(&bigstructp.x[0]) }},
+ {"bigstructp.x[i]", func() { println(bigstructp.x[i]) }},
+ {"&bigstructp.x[i]", func() { println(&bigstructp.x[i]) }},
+ {"bigstructp.x[9]", func() { println(bigstructp.x[9]) }},
+ {"&bigstructp.x[9]", func() { println(&bigstructp.x[9]) }},
+ {"bigstructp.x[100<<20]", func() { println(bigstructp.x[100<<20]) }},
+ {"&bigstructp.x[100<<20]", func() { println(&bigstructp.x[100<<20]) }},
+ {"bigstructp.l", func() { println(bigstructp.l) }},
+ {"&bigstructp.l", func() { println(&bigstructp.l) }},
+ {"m1.F()", func() { println(m1.F()) }},
+ {"m1.M.F()", func() { println(m1.M.F()) }},
+ {"m2.F()", func() { println(m2.F()) }},
+ {"m2.M.F()", func() { println(m2.M.F()) }},
+}
+
+type Struct struct {
+ i int
+ j float64
+ k string
+ x [10]int
+ l []byte
+}
+
+type BigStruct struct {
+ i int
+ j float64
+ k string
+ x [128<<20]byte
+ l []byte
+}
+
+type M struct {
+}
+
+func (m *M) F() int {return 0}
+
+type M1 struct {
+ M
+}
+
+type M2 struct {
+ x int
+ M
+}
diff --git a/gcc/testsuite/go.test/test/nilptr3.go b/gcc/testsuite/go.test/test/nilptr3.go
new file mode 100644
index 0000000000..08597a02d9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/nilptr3.go
@@ -0,0 +1,191 @@
+// errorcheck -0 -d=nil
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test that nil checks are removed.
+// Optimization is enabled.
+
+package p
+
+type Struct struct {
+ X int
+ Y float64
+}
+
+type BigStruct struct {
+ X int
+ Y float64
+ A [1<<20]int
+ Z string
+}
+
+type Empty struct {
+}
+
+type Empty1 struct {
+ Empty
+}
+
+var (
+ intp *int
+ arrayp *[10]int
+ array0p *[0]int
+ bigarrayp *[1<<26]int
+ structp *Struct
+ bigstructp *BigStruct
+ emptyp *Empty
+ empty1p *Empty1
+)
+
+func f1() {
+ _ = *intp // ERROR "generated nil check"
+
+ // This one should be removed but the block copy needs
+ // to be turned into its own pseudo-op in order to see
+ // the indirect.
+ _ = *arrayp // ERROR "generated nil check"
+
+ // 0-byte indirect doesn't suffice
+ _ = *array0p // ERROR "generated nil check"
+ _ = *array0p // ERROR "removed repeated nil check" 386
+
+ _ = *intp // ERROR "removed repeated nil check"
+ _ = *arrayp // ERROR "removed repeated nil check"
+ _ = *structp // ERROR "generated nil check"
+ _ = *emptyp // ERROR "generated nil check"
+ _ = *arrayp // ERROR "removed repeated nil check"
+}
+
+func f2() {
+ var (
+ intp *int
+ arrayp *[10]int
+ array0p *[0]int
+ bigarrayp *[1<<20]int
+ structp *Struct
+ bigstructp *BigStruct
+ emptyp *Empty
+ empty1p *Empty1
+ )
+
+ _ = *intp // ERROR "generated nil check"
+ _ = *arrayp // ERROR "generated nil check"
+ _ = *array0p // ERROR "generated nil check"
+ _ = *array0p // ERROR "removed repeated nil check"
+ _ = *intp // ERROR "removed repeated nil check"
+ _ = *arrayp // ERROR "removed repeated nil check"
+ _ = *structp // ERROR "generated nil check"
+ _ = *emptyp // ERROR "generated nil check"
+ _ = *arrayp // ERROR "removed repeated nil check"
+ _ = *bigarrayp // ERROR "generated nil check" ARM removed nil check before indirect!!
+ _ = *bigstructp // ERROR "generated nil check"
+ _ = *empty1p // ERROR "generated nil check"
+}
+
+func fx10k() *[10000]int
+var b bool
+
+
+func f3(x *[10000]int) {
+ // Using a huge type and huge offsets so the compiler
+ // does not expect the memory hardware to fault.
+ _ = x[9999] // ERROR "generated nil check"
+
+ for {
+ if x[9999] != 0 { // ERROR "generated nil check"
+ break
+ }
+ }
+
+ x = fx10k()
+ _ = x[9999] // ERROR "generated nil check"
+ if b {
+ _ = x[9999] // ERROR "removed repeated nil check"
+ } else {
+ _ = x[9999] // ERROR "removed repeated nil check"
+ }
+ _ = x[9999] // ERROR "generated nil check"
+
+ x = fx10k()
+ if b {
+ _ = x[9999] // ERROR "generated nil check"
+ } else {
+ _ = x[9999] // ERROR "generated nil check"
+ }
+ _ = x[9999] // ERROR "generated nil check"
+
+ fx10k()
+ // This one is a bit redundant, if we figured out that
+ // x wasn't going to change across the function call.
+ // But it's a little complex to do and in practice doesn't
+ // matter enough.
+ _ = x[9999] // ERROR "generated nil check"
+}
+
+func f3a() {
+ x := fx10k()
+ y := fx10k()
+ z := fx10k()
+ _ = &x[9] // ERROR "generated nil check"
+ y = z
+ _ = &x[9] // ERROR "removed repeated nil check"
+ x = y
+ _ = &x[9] // ERROR "generated nil check"
+}
+
+func f3b() {
+ x := fx10k()
+ y := fx10k()
+ _ = &x[9] // ERROR "generated nil check"
+ y = x
+ _ = &x[9] // ERROR "removed repeated nil check"
+ x = y
+ _ = &x[9] // ERROR "removed repeated nil check"
+}
+
+func fx10() *[10]int
+
+func f4(x *[10]int) {
+ // Most of these have no checks because a real memory reference follows,
+ // and the offset is small enough that if x is nil, the address will still be
+ // in the first unmapped page of memory.
+
+ _ = x[9] // ERROR "removed nil check before indirect"
+
+ for {
+ if x[9] != 0 { // ERROR "removed nil check before indirect"
+ break
+ }
+ }
+
+ x = fx10()
+ _ = x[9] // ERROR "removed nil check before indirect"
+ if b {
+ _ = x[9] // ERROR "removed nil check before indirect"
+ } else {
+ _ = x[9] // ERROR "removed nil check before indirect"
+ }
+ _ = x[9] // ERROR "removed nil check before indirect"
+
+ x = fx10()
+ if b {
+ _ = x[9] // ERROR "removed nil check before indirect"
+ } else {
+ _ = &x[9] // ERROR "generated nil check"
+ }
+ _ = x[9] // ERROR "removed nil check before indirect"
+
+ fx10()
+ _ = x[9] // ERROR "removed nil check before indirect"
+
+ x = fx10()
+ y := fx10()
+ _ = &x[9] // ERROR "generated nil check"
+ y = x
+ _ = &x[9] // ERROR "removed repeated nil check"
+ x = y
+ _ = &x[9] // ERROR "removed repeated nil check"
+}
+
diff --git a/gcc/testsuite/go.test/test/nul1.go b/gcc/testsuite/go.test/test/nul1.go
index 142d4deb1f..20426b4fa0 100644
--- a/gcc/testsuite/go.test/test/nul1.go
+++ b/gcc/testsuite/go.test/test/nul1.go
@@ -1,7 +1,4 @@
-// [ "$GORUN" == "" ] || exit 0 # Android runner gets confused by the NUL output
-// $G $D/$F.go && $L $F.$A && ./$A.out >tmp.go &&
-// errchk $G -e tmp.go
-// rm -f tmp.go
+// errorcheckoutput
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/parentype.go b/gcc/testsuite/go.test/test/parentype.go
index 1872cd0ebc..eafa076481 100644
--- a/gcc/testsuite/go.test/test/parentype.go
+++ b/gcc/testsuite/go.test/test/parentype.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go
+// compile
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that types can be parenthesized.
+
package main
func f(interface{})
diff --git a/gcc/testsuite/go.test/test/peano.go b/gcc/testsuite/go.test/test/peano.go
index dd4c36e0b4..745f5153f6 100644
--- a/gcc/testsuite/go.test/test/peano.go
+++ b/gcc/testsuite/go.test/test/peano.go
@@ -1,9 +1,12 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that heavy recursion works. Simple torture test for
+// segmented stacks: do math in unary by recursion.
+
package main
type Number *Number
diff --git a/gcc/testsuite/go.test/test/printbig.go b/gcc/testsuite/go.test/test/printbig.go
index d867bdc646..5693c58d4f 100644
--- a/gcc/testsuite/go.test/test/printbig.go
+++ b/gcc/testsuite/go.test/test/printbig.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that big numbers work as constants and print can print them.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/range.go b/gcc/testsuite/go.test/test/range.go
index 84119450b2..8effbe9c53 100644
--- a/gcc/testsuite/go.test/test/range.go
+++ b/gcc/testsuite/go.test/test/range.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test the 'for range' construct.
+
package main
// test range over channels
@@ -53,7 +55,18 @@ func testslice() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makeslice")
+ println("wrong sum ranging over makeslice", s)
+ panic("fail")
+ }
+
+ x := []int{10, 20}
+ y := []int{99}
+ i := 1
+ for i, x[i] = range y {
+ break
+ }
+ if i != 0 || x[0] != 10 || x[1] != 99 {
+ println("wrong parallel assignment", i, x[0], x[1])
panic("fail")
}
}
@@ -69,7 +82,7 @@ func testslice1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makeslice")
+ println("wrong sum ranging over makeslice", s)
panic("fail")
}
}
@@ -93,7 +106,7 @@ func testarray() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makearray")
+ println("wrong sum ranging over makearray", s)
panic("fail")
}
}
@@ -109,7 +122,7 @@ func testarray1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makearray")
+ println("wrong sum ranging over makearray", s)
panic("fail")
}
}
@@ -142,7 +155,7 @@ func testarrayptr() {
panic("fail")
}
if s != 15 {
- println("wrong sum ranging over makearrayptr")
+ println("wrong sum ranging over makearrayptr", s)
panic("fail")
}
}
@@ -158,7 +171,7 @@ func testarrayptr1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makearrayptr")
+ println("wrong sum ranging over makearrayptr", s)
panic("fail")
}
}
@@ -182,7 +195,7 @@ func teststring() {
panic("fail")
}
if s != 'a'+'b'+'c'+'d'+'☺' {
- println("wrong sum ranging over makestring")
+ println("wrong sum ranging over makestring", s)
panic("fail")
}
}
@@ -198,7 +211,7 @@ func teststring1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makestring")
+ println("wrong sum ranging over makestring", s)
panic("fail")
}
}
@@ -222,7 +235,7 @@ func testmap() {
panic("fail")
}
if s != 'a'+'b'+'c'+'d'+'☺' {
- println("wrong sum ranging over makemap")
+ println("wrong sum ranging over makemap", s)
panic("fail")
}
}
@@ -238,7 +251,7 @@ func testmap1() {
panic("fail")
}
if s != 10 {
- println("wrong sum ranging over makemap")
+ println("wrong sum ranging over makemap", s)
panic("fail")
}
}
diff --git a/gcc/testsuite/go.test/test/recover.go b/gcc/testsuite/go.test/test/recover.go
index ca6f072886..071be6667a 100644
--- a/gcc/testsuite/go.test/test/recover.go
+++ b/gcc/testsuite/go.test/test/recover.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,27 +8,74 @@
package main
-import "runtime"
+import (
+ "os"
+ "reflect"
+ "runtime"
+)
func main() {
+ // go.tools/ssa/interp still has:
+ // - some lesser bugs in recover()
+ // - incomplete support for reflection
+ interp := os.Getenv("GOSSAINTERP") != ""
+
test1()
test1WithClosures()
test2()
test3()
- test4()
+ if !interp {
+ test4()
+ }
test5()
test6()
test6WithClosures()
test7()
+ test8()
+ test9()
+ if !interp {
+ test9reflect1()
+ test9reflect2()
+ }
+ test10()
+ if !interp {
+ test10reflect1()
+ test10reflect2()
+ }
+ test11()
+ if !interp {
+ test11reflect1()
+ test11reflect2()
+ }
+ test12()
+ if !interp {
+ test12reflect1()
+ test12reflect2()
+ }
+ test13()
+ if !interp {
+ test13reflect1()
+ test13reflect2()
+ }
+ test14()
+ if !interp {
+ test14reflect1()
+ test14reflect2()
+ test15()
+ }
}
func die() {
runtime.Breakpoint() // can't depend on panic
}
-func mustRecover(x interface{}) {
- mustNotRecover() // because it's not a defer call
- v := recover()
+func mustRecoverBody(v1, v2, v3, x interface{}) {
+ v := v1
+ if v != nil {
+ println("spurious recover", v)
+ die()
+ }
+ v = v2
if v == nil {
println("missing recover")
die() // panic is useless here
@@ -39,13 +86,21 @@ func mustRecover(x interface{}) {
}
// the value should be gone now regardless
- v = recover()
+ v = v3
if v != nil {
println("recover didn't recover")
die()
}
}
+func doubleRecover() interface{} {
+ return recover()
+}
+
+func mustRecover(x interface{}) {
+ mustRecoverBody(doubleRecover(), recover(), recover(), x)
+}
+
func mustNotRecover() {
v := recover()
if v != nil {
@@ -244,3 +299,207 @@ func test7() {
die()
}
}
+
+func varargs(s *int, a ...int) {
+ *s = 0
+ for _, v := range a {
+ *s += v
+ }
+ if recover() != nil {
+ *s += 100
+ }
+}
+
+func test8a() (r int) {
+ defer varargs(&r, 1, 2, 3)
+ panic(0)
+}
+
+func test8b() (r int) {
+ defer varargs(&r, 4, 5, 6)
+ return
+}
+
+func test8() {
+ if test8a() != 106 || test8b() != 15 {
+ println("wrong value")
+ die()
+ }
+}
+
+type I interface {
+ M()
+}
+
+// pointer receiver, so no wrapper in i.M()
+type T1 struct{}
+
+func (*T1) M() {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 9)
+}
+
+func test9() {
+ var i I = &T1{}
+ defer i.M()
+ panic(9)
+}
+
+func test9reflect1() {
+ f := reflect.ValueOf(&T1{}).Method(0).Interface().(func())
+ defer f()
+ panic(9)
+}
+
+func test9reflect2() {
+ f := reflect.TypeOf(&T1{}).Method(0).Func.Interface().(func(*T1))
+ defer f(&T1{})
+ panic(9)
+}
+
+// word-sized value receiver, so no wrapper in i.M()
+type T2 uintptr
+
+func (T2) M() {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 10)
+}
+
+func test10() {
+ var i I = T2(0)
+ defer i.M()
+ panic(10)
+}
+
+func test10reflect1() {
+ f := reflect.ValueOf(T2(0)).Method(0).Interface().(func())
+ defer f()
+ panic(10)
+}
+
+func test10reflect2() {
+ f := reflect.TypeOf(T2(0)).Method(0).Func.Interface().(func(T2))
+ defer f(T2(0))
+ panic(10)
+}
+
+// tiny receiver, so basic wrapper in i.M()
+type T3 struct{}
+
+func (T3) M() {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 11)
+}
+
+func test11() {
+ var i I = T3{}
+ defer i.M()
+ panic(11)
+}
+
+func test11reflect1() {
+ f := reflect.ValueOf(T3{}).Method(0).Interface().(func())
+ defer f()
+ panic(11)
+}
+
+func test11reflect2() {
+ f := reflect.TypeOf(T3{}).Method(0).Func.Interface().(func(T3))
+ defer f(T3{})
+ panic(11)
+}
+
+// large receiver, so basic wrapper in i.M()
+type T4 [2]string
+
+func (T4) M() {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 12)
+}
+
+func test12() {
+ var i I = T4{}
+ defer i.M()
+ panic(12)
+}
+
+func test12reflect1() {
+ f := reflect.ValueOf(T4{}).Method(0).Interface().(func())
+ defer f()
+ panic(12)
+}
+
+func test12reflect2() {
+ f := reflect.TypeOf(T4{}).Method(0).Func.Interface().(func(T4))
+ defer f(T4{})
+ panic(12)
+}
+
+// enormous receiver, so wrapper splits stack to call M
+type T5 [8192]byte
+
+func (T5) M() {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 13)
+}
+
+func test13() {
+ var i I = T5{}
+ defer i.M()
+ panic(13)
+}
+
+func test13reflect1() {
+ f := reflect.ValueOf(T5{}).Method(0).Interface().(func())
+ defer f()
+ panic(13)
+}
+
+func test13reflect2() {
+ f := reflect.TypeOf(T5{}).Method(0).Func.Interface().(func(T5))
+ defer f(T5{})
+ panic(13)
+}
+
+// enormous receiver + enormous method frame, so wrapper splits stack to call M,
+// and then M splits stack to allocate its frame.
+// recover must look back two frames to find the panic.
+type T6 [8192]byte
+
+var global byte
+
+func (T6) M() {
+ var x [8192]byte
+ x[0] = 1
+ x[1] = 2
+ for i := range x {
+ global += x[i]
+ }
+ mustRecoverBody(doubleRecover(), recover(), recover(), 14)
+}
+
+func test14() {
+ var i I = T6{}
+ defer i.M()
+ panic(14)
+}
+
+func test14reflect1() {
+ f := reflect.ValueOf(T6{}).Method(0).Interface().(func())
+ defer f()
+ panic(14)
+}
+
+func test14reflect2() {
+ f := reflect.TypeOf(T6{}).Method(0).Func.Interface().(func(T6))
+ defer f(T6{})
+ panic(14)
+}
+
+// function created by reflect.MakeFunc
+
+func reflectFunc(args []reflect.Value) (results []reflect.Value) {
+ mustRecoverBody(doubleRecover(), recover(), recover(), 15)
+ return nil
+}
+
+func test15() {
+ f := reflect.MakeFunc(reflect.TypeOf((func())(nil)), reflectFunc).Interface().(func())
+ defer f()
+ panic(15)
+}
diff --git a/gcc/testsuite/go.test/test/recover1.go b/gcc/testsuite/go.test/test/recover1.go
index db584738bb..b763a10741 100644
--- a/gcc/testsuite/go.test/test/recover1.go
+++ b/gcc/testsuite/go.test/test/recover1.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/recover2.go b/gcc/testsuite/go.test/test/recover2.go
index b5db6f0d1c..946d05ae63 100644
--- a/gcc/testsuite/go.test/test/recover2.go
+++ b/gcc/testsuite/go.test/test/recover2.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/recover3.go b/gcc/testsuite/go.test/test/recover3.go
index 60ade9b61c..e17bfb3f6a 100644
--- a/gcc/testsuite/go.test/test/recover3.go
+++ b/gcc/testsuite/go.test/test/recover3.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test recovering from runtime errors.
+
package main
import (
@@ -62,13 +64,18 @@ func main() {
i = 99999
var sl []int
- check("array-bounds", func() { println(p[i]) }, "index out of range")
+ p1 := new([10]int)
+ check("array-bounds", func() { println(p1[i]) }, "index out of range")
check("slice-bounds", func() { println(sl[i]) }, "index out of range")
var inter interface{}
inter = 1
check("type-concrete", func() { println(inter.(string)) }, "int, not string")
check("type-interface", func() { println(inter.(m)) }, "missing method m")
+
+ if didbug {
+ panic("recover3")
+ }
}
type m interface {
diff --git a/gcc/testsuite/go.test/test/rename.go b/gcc/testsuite/go.test/test/rename.go
index f21ef015b2..dc4341718d 100644
--- a/gcc/testsuite/go.test/test/rename.go
+++ b/gcc/testsuite/go.test/test/rename.go
@@ -1,73 +1,103 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that predeclared names can be redeclared by the user.
+
package main
-import "fmt"
+import (
+ "fmt"
+ "runtime"
+)
func main() {
n :=
- bool +
+ append +
+ bool +
byte +
- float +
+ complex +
+ complex64 +
+ complex128 +
+ cap +
+ close +
+ delete +
+ error +
+ false +
float32 +
float64 +
+ imag +
int +
int8 +
int16 +
int32 +
int64 +
+ len +
+ make +
+ new +
+ nil +
+ panic +
+ print +
+ println +
+ real +
+ recover +
+ rune +
+ string +
+ true +
uint +
uint8 +
uint16 +
uint32 +
uint64 +
uintptr +
- true +
- false +
- iota +
- nil +
- cap +
- len +
- make +
- new +
- panic +
- print +
- println
- if n != 27*28/2 {
- fmt.Println("BUG: wrong n", n, 27*28/2)
+ iota
+ if n != NUM*(NUM-1)/2 {
+ fmt.Println("BUG: wrong n", n, NUM*(NUM-1)/2)
+ runtime.Breakpoint() // panic is inaccessible
}
}
const (
- bool = 1
- byte = 2
- float = 3
- float32 = 4
- float64 = 5
- int = 6
- int8 = 7
- int16 = 8
- int32 = 9
- int64 = 10
- uint = 11
- uint8 = 12
- uint16 = 13
- uint32 = 14
- uint64 = 15
- uintptr = 16
- true = 17
- false = 18
- iota = 19
- nil = 20
- cap = 21
- len = 22
- make = 23
- new = 24
- panic = 25
- print = 26
- println = 27
+ // cannot use iota here, because iota = 38 below
+ append = 1
+ bool = 2
+ byte = 3
+ complex = 4
+ complex64 = 5
+ complex128 = 6
+ cap = 7
+ close = 8
+ delete = 9
+ error = 10
+ false = 11
+ float32 = 12
+ float64 = 13
+ imag = 14
+ int = 15
+ int8 = 16
+ int16 = 17
+ int32 = 18
+ int64 = 19
+ len = 20
+ make = 21
+ new = 22
+ nil = 23
+ panic = 24
+ print = 25
+ println = 26
+ real = 27
+ recover = 28
+ rune = 29
+ string = 30
+ true = 31
+ uint = 32
+ uint8 = 33
+ uint16 = 34
+ uint32 = 35
+ uint64 = 36
+ uintptr = 37
+ iota = 38
+ NUM = 39
)
diff --git a/gcc/testsuite/go.test/test/rename1.go b/gcc/testsuite/go.test/test/rename1.go
index 3e78bfca0b..53db68de16 100644
--- a/gcc/testsuite/go.test/test/rename1.go
+++ b/gcc/testsuite/go.test/test/rename1.go
@@ -1,14 +1,17 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that renamed identifiers no longer have their old meaning.
+// Does not compile.
+
package main
func main() {
var n byte // ERROR "not a type|expected type"
- var y = float(0) // ERROR "cannot call|expected function"
+ var y = float32(0) // ERROR "cannot call|expected function"
const (
a = 1 + iota // ERROR "string|incompatible types" "convert iota"
)
@@ -16,31 +19,42 @@ func main() {
}
const (
- bool = 1
- byte = 2
- float = 3
- float32 = 4
- float64 = 5
- int = 6
- int8 = 7
- int16 = 8
- int32 = 9
- int64 = 10
- uint = 11
- uint8 = 12
- uint16 = 13
- uint32 = 14
- uint64 = 15
- uintptr = 16
- true = 17
- false = 18
- iota = "abc"
- nil = 20
- cap = 21
- len = 22
- make = 23
- new = 24
- panic = 25
- print = 26
- println = 27
+ append = 1
+ bool = 2
+ byte = 3
+ complex = 4
+ complex64 = 5
+ complex128 = 6
+ cap = 7
+ close = 8
+ delete = 9
+ error = 10
+ false = 11
+ float32 = 12
+ float64 = 13
+ imag = 14
+ int = 15
+ int8 = 16
+ int16 = 17
+ int32 = 18
+ int64 = 19
+ len = 20
+ make = 21
+ new = 22
+ nil = 23
+ panic = 24
+ print = 25
+ println = 26
+ real = 27
+ recover = 28
+ rune = 29
+ string = 30
+ true = 31
+ uint = 32
+ uint8 = 33
+ uint16 = 34
+ uint32 = 35
+ uint64 = 36
+ uintptr = 37
+ iota = "38"
)
diff --git a/gcc/testsuite/go.test/test/reorder.go b/gcc/testsuite/go.test/test/reorder.go
index 67d07523b4..8fd623c1c7 100644
--- a/gcc/testsuite/go.test/test/reorder.go
+++ b/gcc/testsuite/go.test/test/reorder.go
@@ -1,10 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check reordering of assignments.
+// Test reordering of assignments.
package main
@@ -42,7 +42,7 @@ func check3(x, y, z, xx, yy, zz int) {
}
func p1() {
- x := []int{1,2,3}
+ x := []int{1, 2, 3}
i := 0
i, x[i] = 1, 100
_ = i
@@ -50,7 +50,7 @@ func p1() {
}
func p2() {
- x := []int{1,2,3}
+ x := []int{1, 2, 3}
i := 0
x[i], i = 100, 1
_ = i
@@ -58,7 +58,7 @@ func p2() {
}
func p3() {
- x := []int{1,2,3}
+ x := []int{1, 2, 3}
y := x
gx = x
x[1], y[0] = f(0), f(1)
@@ -66,7 +66,7 @@ func p3() {
}
func p4() {
- x := []int{1,2,3}
+ x := []int{1, 2, 3}
y := x
gx = x
x[1], y[0] = gx[0], gx[1]
@@ -74,7 +74,7 @@ func p4() {
}
func p5() {
- x := []int{1,2,3}
+ x := []int{1, 2, 3}
y := x
p := &x[0]
q := &x[1]
@@ -89,7 +89,7 @@ func p6() {
px := &x
py := &y
*px, *py = y, x
- check3(x, y, z, 2, 1, 3)
+ check3(x, y, z, 2, 1, 3)
}
func f1(x, y, z int) (xx, yy, zz int) {
@@ -106,16 +106,9 @@ func p7() {
}
func p8() {
- x := []int{1,2,3}
-
- defer func() {
- err := recover()
- if err == nil {
- panic("not panicking")
- }
- check(x, 100, 2, 3)
- }()
-
- i := 0
- i, x[i], x[5] = 1, 100, 500
+ m := make(map[int]int)
+ m[0] = len(m)
+ if m[0] != 0 {
+ panic(m[0])
+ }
}
diff --git a/gcc/testsuite/go.test/test/reorder2.go b/gcc/testsuite/go.test/test/reorder2.go
new file mode 100644
index 0000000000..d91f1d8953
--- /dev/null
+++ b/gcc/testsuite/go.test/test/reorder2.go
@@ -0,0 +1,174 @@
+// run
+
+// Copyright 2010 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test reorderings; derived from fixedbugs/bug294.go.
+
+package main
+
+var log string
+
+type TT int
+
+func (t TT) a(s string) TT {
+ log += "a(" + s + ")"
+ return t
+}
+
+func (TT) b(s string) string {
+ log += "b(" + s + ")"
+ return s
+}
+
+type F func(s string) F
+
+func a(s string) F {
+ log += "a(" + s + ")"
+ return F(a)
+}
+
+func b(s string) string {
+ log += "b(" + s + ")"
+ return s
+}
+
+type I interface {
+ a(s string) I
+ b(s string) string
+}
+
+type T1 int
+
+func (t T1) a(s string) I {
+ log += "a(" + s + ")"
+ return t
+}
+
+func (T1) b(s string) string {
+ log += "b(" + s + ")"
+ return s
+}
+
+// f(g(), h()) where g is not inlinable but h is will have the same problem.
+// As will x := g() + h() (same conditions).
+// And g() <- h().
+func f(x, y string) {
+ log += "f(" + x + ", " + y + ")"
+}
+
+func ff(x, y string) {
+ for false {
+ } // prevent inl
+ log += "ff(" + x + ", " + y + ")"
+}
+
+func h(x string) string {
+ log += "h(" + x + ")"
+ return x
+}
+
+func g(x string) string {
+ for false {
+ } // prevent inl
+ log += "g(" + x + ")"
+ return x
+}
+
+func main() {
+ err := 0
+ var t TT
+ if a("1")("2")("3"); log != "a(1)a(2)a(3)" {
+ println("expecting a(1)a(2)a(3) , got ", log)
+ err++
+ }
+ log = ""
+
+ if t.a("1").a(t.b("2")); log != "a(1)b(2)a(2)" {
+ println("expecting a(1)b(2)a(2), got ", log)
+ err++
+ }
+ log = ""
+ if a("3")(b("4"))(b("5")); log != "a(3)b(4)a(4)b(5)a(5)" {
+ println("expecting a(3)b(4)a(4)b(5)a(5), got ", log)
+ err++
+ }
+ log = ""
+ var i I = T1(0)
+ if i.a("6").a(i.b("7")).a(i.b("8")).a(i.b("9")); log != "a(6)b(7)a(7)b(8)a(8)b(9)a(9)" {
+ println("expecting a(6)ba(7)ba(8)ba(9), got", log)
+ err++
+ }
+ log = ""
+
+ if s := t.a("1").b("3"); log != "a(1)b(3)" || s != "3" {
+ println("expecting a(1)b(3) and 3, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if s := t.a("1").a(t.b("2")).b("3") + t.a("4").b("5"); log != "a(1)b(2)a(2)b(3)a(4)b(5)" || s != "35" {
+ println("expecting a(1)b(2)a(2)b(3)a(4)b(5) and 35, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if s := t.a("4").b("5") + t.a("1").a(t.b("2")).b("3"); log != "a(4)b(5)a(1)b(2)a(2)b(3)" || s != "53" {
+ println("expecting a(4)b(5)a(1)b(2)a(2)b(3) and 35, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if ff(g("1"), g("2")); log != "g(1)g(2)ff(1, 2)" {
+ println("expecting g(1)g(2)ff..., got ", log)
+ err++
+ }
+ log = ""
+
+ if ff(g("1"), h("2")); log != "g(1)h(2)ff(1, 2)" {
+ println("expecting g(1)h(2)ff..., got ", log)
+ err++
+ }
+ log = ""
+
+ if ff(h("1"), g("2")); log != "h(1)g(2)ff(1, 2)" {
+ println("expecting h(1)g(2)ff..., got ", log)
+ err++
+ }
+ log = ""
+
+ if ff(h("1"), h("2")); log != "h(1)h(2)ff(1, 2)" {
+ println("expecting h(1)h(2)ff..., got ", log)
+ err++
+ }
+ log = ""
+
+ if s := g("1") + g("2"); log != "g(1)g(2)" || s != "12" {
+ println("expecting g1g2 and 12, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if s := g("1") + h("2"); log != "g(1)h(2)" || s != "12" {
+ println("expecting g1h2 and 12, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if s := h("1") + g("2"); log != "h(1)g(2)" || s != "12" {
+ println("expecting h1g2 and 12, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if s := h("1") + h("2"); log != "h(1)h(2)" || s != "12" {
+ println("expecting h1h2 and 12, got ", log, " and ", s)
+ err++
+ }
+ log = ""
+
+ if err > 0 {
+ panic("fail")
+ }
+}
diff --git a/gcc/testsuite/go.test/test/return.go b/gcc/testsuite/go.test/test/return.go
new file mode 100644
index 0000000000..482f22bd5f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/return.go
@@ -0,0 +1,2821 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test compiler diagnosis of function missing return statements.
+// See issue 65 and golang.org/s/go11return.
+
+package p
+
+type T int
+
+var x interface{}
+var c chan int
+
+func external() int // ok
+
+func _() int {
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+} // ERROR "missing return"
+
+// return is okay
+func _() int {
+ print(1)
+ return 2
+}
+
+// goto is okay
+func _() int {
+L:
+ print(1)
+ goto L
+}
+
+// panic is okay
+func _() int {
+ print(1)
+ panic(2)
+}
+
+// but only builtin panic
+func _() int {
+ var panic = func(int) {}
+ print(1)
+ panic(2)
+} // ERROR "missing return"
+
+// block ending in terminating statement is okay
+func _() int {
+ {
+ print(1)
+ return 2
+ }
+}
+
+// block ending in terminating statement is okay
+func _() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+}
+
+// block ending in terminating statement is okay
+func _() int {
+ print(1)
+ {
+ panic(2)
+ }
+}
+
+// adding more code - even though it is dead - now requires a return
+
+func _() int {
+ print(1)
+ return 2
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+L:
+ print(1)
+ goto L
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ panic(2)
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ {
+ print(1)
+ return 2
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ print(1)
+ goto L
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ {
+ panic(2)
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ print(1)
+ return 2
+ }
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ {
+ panic(2)
+ }
+ print(3)
+} // ERROR "missing return"
+
+// even an empty dead block triggers the message, because it
+// becomes the final statement.
+
+func _() int {
+ print(1)
+ return 2
+ {}
+} // ERROR "missing return"
+
+func _() int {
+L:
+ print(1)
+ goto L
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ panic(2)
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ {
+ print(1)
+ return 2
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ print(1)
+ goto L
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ {
+ panic(2)
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ print(1)
+ return 2
+ }
+ {}
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ {
+ panic(2)
+ }
+ {}
+} // ERROR "missing return"
+
+// if-else chain with final else and all terminating is okay
+
+func _() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else {
+ panic(3)
+ }
+}
+
+func _() int {
+L:
+ print(1)
+ if x == nil {
+ panic(2)
+ } else {
+ goto L
+ }
+}
+
+func _() int {
+L:
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 2 {
+ panic(3)
+ } else {
+ goto L
+ }
+}
+
+// if-else chain missing final else is not okay, even if the
+// conditions cover every possible case.
+
+func _() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x != nil {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 1 {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+
+// for { loops that never break are okay.
+
+func _() int {
+ print(1)
+ for {}
+}
+
+func _() int {
+ for {
+ for {
+ break
+ }
+ }
+}
+
+func _() int {
+ for {
+ L:
+ for {
+ break L
+ }
+ }
+}
+
+// for { loops that break are not okay.
+
+func _() int {
+ print(1)
+ for { break }
+} // ERROR "missing return"
+
+func _() int {
+ for {
+ for {
+ }
+ break
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ for {
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// if there's a condition - even "true" - the loops are no longer syntactically terminating
+
+func _() int {
+ print(1)
+ for x == nil {}
+} // ERROR "missing return"
+
+func _() int {
+ for x == nil {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ for x == nil {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ for true {}
+} // ERROR "missing return"
+
+func _() int {
+ for true {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ for true {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// select in which all cases terminate and none break are okay.
+
+func _() int {
+ print(1)
+ select{}
+}
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ }
+}
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ for{}
+ }
+}
+
+func _() int {
+L:
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ goto L
+ }
+}
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ select{}
+ }
+}
+
+// if any cases don't terminate, the select isn't okay anymore
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ goto L
+ case c <- 1:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+// if any breaks refer to the select, the select isn't okay anymore, even if they're dead
+
+func _() int {
+ print(1)
+ select{ default: break }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ break
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+L:
+ select {
+ case <-c:
+ print(2)
+ for{ break L }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ break L
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ select {
+ case <-c:
+ print(1)
+ panic("abc")
+ default:
+ select{}
+ break
+ }
+} // ERROR "missing return"
+
+// switch with default in which all cases terminate is okay
+
+func _() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+func _() int {
+ print(1)
+ switch x {
+ default:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+}
+
+func _() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ default:
+ return 4
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+func _() int {
+ print(1)
+ switch {
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x {
+ case 2:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+func _() int {
+ print(1)
+L:
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x {
+ default:
+ return 4
+ break
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+L:
+ switch x {
+ case 1:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// type switch with default in which all cases terminate is okay
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ default:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+func _() int {
+ print(1)
+ switch {
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ case float64:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ case float64:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+func _() int {
+ print(1)
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+ switch x.(type) {
+ default:
+ return 4
+ break
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ print(1)
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// again, but without the leading print(1).
+// testing that everything works when the terminating statement is first.
+
+func _() int {
+} // ERROR "missing return"
+
+// return is okay
+func _() int {
+ return 2
+}
+
+// goto is okay
+func _() int {
+L:
+ goto L
+}
+
+// panic is okay
+func _() int {
+ panic(2)
+}
+
+// but only builtin panic
+func _() int {
+ var panic = func(int) {}
+ panic(2)
+} // ERROR "missing return"
+
+// block ending in terminating statement is okay
+func _() int {
+ {
+ return 2
+ }
+}
+
+// block ending in terminating statement is okay
+func _() int {
+L:
+ {
+ goto L
+ }
+}
+
+// block ending in terminating statement is okay
+func _() int {
+ {
+ panic(2)
+ }
+}
+
+// adding more code - even though it is dead - now requires a return
+
+func _() int {
+ return 2
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+L:
+ goto L
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ panic(2)
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ {
+ return 2
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ goto L
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ panic(2)
+ print(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ return 2
+ }
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ goto L
+ }
+ print(3)
+} // ERROR "missing return"
+
+func _() int {
+ {
+ panic(2)
+ }
+ print(3)
+} // ERROR "missing return"
+
+// even an empty dead block triggers the message, because it
+// becomes the final statement.
+
+func _() int {
+ return 2
+ {}
+} // ERROR "missing return"
+
+func _() int {
+L:
+ goto L
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ panic(2)
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ {
+ return 2
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ goto L
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ panic(2)
+ {}
+ }
+} // ERROR "missing return"
+
+func _() int {
+ {
+ return 2
+ }
+ {}
+} // ERROR "missing return"
+
+func _() int {
+L:
+ {
+ goto L
+ }
+ {}
+} // ERROR "missing return"
+
+func _() int {
+ {
+ panic(2)
+ }
+ {}
+} // ERROR "missing return"
+
+// if-else chain with final else and all terminating is okay
+
+func _() int {
+ if x == nil {
+ panic(2)
+ } else {
+ panic(3)
+ }
+}
+
+func _() int {
+L:
+ if x == nil {
+ panic(2)
+ } else {
+ goto L
+ }
+}
+
+func _() int {
+L:
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 2 {
+ panic(3)
+ } else {
+ goto L
+ }
+}
+
+// if-else chain missing final else is not okay, even if the
+// conditions cover every possible case.
+
+func _() int {
+ if x == nil {
+ panic(2)
+ } else if x != nil {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ if x == nil {
+ panic(2)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 1 {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+
+// for { loops that never break are okay.
+
+func _() int {
+ for {}
+}
+
+func _() int {
+ for {
+ for {
+ break
+ }
+ }
+}
+
+func _() int {
+ for {
+ L:
+ for {
+ break L
+ }
+ }
+}
+
+// for { loops that break are not okay.
+
+func _() int {
+ for { break }
+} // ERROR "missing return"
+
+func _() int {
+ for {
+ for {
+ }
+ break
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ for {
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// if there's a condition - even "true" - the loops are no longer syntactically terminating
+
+func _() int {
+ for x == nil {}
+} // ERROR "missing return"
+
+func _() int {
+ for x == nil {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ for x == nil {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ for true {}
+} // ERROR "missing return"
+
+func _() int {
+ for true {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+func _() int {
+ for true {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// select in which all cases terminate and none break are okay.
+
+func _() int {
+ select{}
+}
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ }
+}
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ for{}
+ }
+}
+
+func _() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ goto L
+ }
+}
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ select{}
+ }
+}
+
+// if any cases don't terminate, the select isn't okay anymore
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ goto L
+ case c <- 1:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+// if any breaks refer to the select, the select isn't okay anymore, even if they're dead
+
+func _() int {
+ select{ default: break }
+} // ERROR "missing return"
+
+func _() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ break
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ for{ break L }
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ break L
+ }
+} // ERROR "missing return"
+
+func _() int {
+ select {
+ case <-c:
+ panic("abc")
+ default:
+ select{}
+ break
+ }
+} // ERROR "missing return"
+
+// switch with default in which all cases terminate is okay
+
+func _() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+func _() int {
+ switch x {
+ default:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+}
+
+func _() int {
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ default:
+ return 4
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+func _() int {
+ switch {
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x {
+ case 2:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+func _() int {
+L:
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x {
+ default:
+ return 4
+ break
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ switch x {
+ case 1:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// type switch with default in which all cases terminate is okay
+
+func _() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+func _() int {
+ switch x.(type) {
+ default:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+func _() int {
+ switch {
+ }
+} // ERROR "missing return"
+
+
+func _() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ case float64:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x.(type) {
+ case float64:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+func _() int {
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x.(type) {
+ default:
+ return 4
+ break
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+func _() int {
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+func _() int {
+ switch x.(type) {
+ default:
+ return 4
+ case int, float64:
+ print(2)
+ panic(3)
+ }
+}
+
+// again, with func literals
+
+var _ = func() int {
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+} // ERROR "missing return"
+
+// return is okay
+var _ = func() int {
+ print(1)
+ return 2
+}
+
+// goto is okay
+var _ = func() int {
+L:
+ print(1)
+ goto L
+}
+
+// panic is okay
+var _ = func() int {
+ print(1)
+ panic(2)
+}
+
+// but only builtin panic
+var _ = func() int {
+ var panic = func(int) {}
+ print(1)
+ panic(2)
+} // ERROR "missing return"
+
+// block ending in terminating statement is okay
+var _ = func() int {
+ {
+ print(1)
+ return 2
+ }
+}
+
+// block ending in terminating statement is okay
+var _ = func() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+}
+
+// block ending in terminating statement is okay
+var _ = func() int {
+ print(1)
+ {
+ panic(2)
+ }
+}
+
+// adding more code - even though it is dead - now requires a return
+
+var _ = func() int {
+ print(1)
+ return 2
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ print(1)
+ goto L
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ panic(2)
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ print(1)
+ return 2
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ print(1)
+ goto L
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ {
+ panic(2)
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ print(1)
+ return 2
+ }
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ {
+ panic(2)
+ }
+ print(3)
+} // ERROR "missing return"
+
+// even an empty dead block triggers the message, because it
+// becomes the final statement.
+
+var _ = func() int {
+ print(1)
+ return 2
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ print(1)
+ goto L
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ panic(2)
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ print(1)
+ return 2
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ print(1)
+ goto L
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ {
+ panic(2)
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ print(1)
+ return 2
+ }
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ print(1)
+ goto L
+ }
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ {
+ panic(2)
+ }
+ {}
+} // ERROR "missing return"
+
+// if-else chain with final else and all terminating is okay
+
+var _ = func() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else {
+ panic(3)
+ }
+}
+
+var _ = func() int {
+L:
+ print(1)
+ if x == nil {
+ panic(2)
+ } else {
+ goto L
+ }
+}
+
+var _ = func() int {
+L:
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 2 {
+ panic(3)
+ } else {
+ goto L
+ }
+}
+
+// if-else chain missing final else is not okay, even if the
+// conditions cover every possible case.
+
+var _ = func() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x != nil {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 1 {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+
+// for { loops that never break are okay.
+
+var _ = func() int {
+ print(1)
+ for {}
+}
+
+var _ = func() int {
+ for {
+ for {
+ break
+ }
+ }
+}
+
+var _ = func() int {
+ for {
+ L:
+ for {
+ break L
+ }
+ }
+}
+
+// for { loops that break are not okay.
+
+var _ = func() int {
+ print(1)
+ for { break }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for {
+ for {
+ }
+ break
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ for {
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// if there's a condition - even "true" - the loops are no longer syntactically terminating
+
+var _ = func() int {
+ print(1)
+ for x == nil {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ for x == nil {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for x == nil {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ for true {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ for true {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for true {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// select in which all cases terminate and none break are okay.
+
+var _ = func() int {
+ print(1)
+ select{}
+}
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ }
+}
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ for{}
+ }
+}
+
+var _ = func() int {
+L:
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ goto L
+ }
+}
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ select{}
+ }
+}
+
+// if any cases don't terminate, the select isn't okay anymore
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ goto L
+ case c <- 1:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+// if any breaks refer to the select, the select isn't okay anymore, even if they're dead
+
+var _ = func() int {
+ print(1)
+ select{ default: break }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ break
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+L:
+ select {
+ case <-c:
+ print(2)
+ for{ break L }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ break L
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ select {
+ case <-c:
+ print(1)
+ panic("abc")
+ default:
+ select{}
+ break
+ }
+} // ERROR "missing return"
+
+// switch with default in which all cases terminate is okay
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+var _ = func() int {
+ print(1)
+ switch x {
+ default:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+}
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ default:
+ return 4
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+var _ = func() int {
+ print(1)
+ switch {
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 2:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+var _ = func() int {
+ print(1)
+L:
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x {
+ default:
+ return 4
+ break
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+L:
+ switch x {
+ case 1:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// type switch with default in which all cases terminate is okay
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ default:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+var _ = func() int {
+ print(1)
+ switch {
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ case float64:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ case float64:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+var _ = func() int {
+ print(1)
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+ switch x.(type) {
+ default:
+ return 4
+ break
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ print(1)
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// again, but without the leading print(1).
+// testing that everything works when the terminating statement is first.
+
+var _ = func() int {
+} // ERROR "missing return"
+
+// return is okay
+var _ = func() int {
+ return 2
+}
+
+// goto is okay
+var _ = func() int {
+L:
+ goto L
+}
+
+// panic is okay
+var _ = func() int {
+ panic(2)
+}
+
+// but only builtin panic
+var _ = func() int {
+ var panic = func(int) {}
+ panic(2)
+} // ERROR "missing return"
+
+// block ending in terminating statement is okay
+var _ = func() int {
+ {
+ return 2
+ }
+}
+
+// block ending in terminating statement is okay
+var _ = func() int {
+L:
+ {
+ goto L
+ }
+}
+
+// block ending in terminating statement is okay
+var _ = func() int {
+ {
+ panic(2)
+ }
+}
+
+// adding more code - even though it is dead - now requires a return
+
+var _ = func() int {
+ return 2
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ goto L
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ panic(2)
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ return 2
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ goto L
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ panic(2)
+ print(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ return 2
+ }
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ goto L
+ }
+ print(3)
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ panic(2)
+ }
+ print(3)
+} // ERROR "missing return"
+
+// even an empty dead block triggers the message, because it
+// becomes the final statement.
+
+var _ = func() int {
+ return 2
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ goto L
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ panic(2)
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ return 2
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ goto L
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ panic(2)
+ {}
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ return 2
+ }
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ {
+ goto L
+ }
+ {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ {
+ panic(2)
+ }
+ {}
+} // ERROR "missing return"
+
+// if-else chain with final else and all terminating is okay
+
+var _ = func() int {
+ if x == nil {
+ panic(2)
+ } else {
+ panic(3)
+ }
+}
+
+var _ = func() int {
+L:
+ if x == nil {
+ panic(2)
+ } else {
+ goto L
+ }
+}
+
+var _ = func() int {
+L:
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 2 {
+ panic(3)
+ } else {
+ goto L
+ }
+}
+
+// if-else chain missing final else is not okay, even if the
+// conditions cover every possible case.
+
+var _ = func() int {
+ if x == nil {
+ panic(2)
+ } else if x != nil {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ if x == nil {
+ panic(2)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ if x == nil {
+ panic(2)
+ } else if x == 1 {
+ return 0
+ } else if x != 1 {
+ panic(3)
+ }
+} // ERROR "missing return"
+
+
+// for { loops that never break are okay.
+
+var _ = func() int {
+ for {}
+}
+
+var _ = func() int {
+ for {
+ for {
+ break
+ }
+ }
+}
+
+var _ = func() int {
+ for {
+ L:
+ for {
+ break L
+ }
+ }
+}
+
+// for { loops that break are not okay.
+
+var _ = func() int {
+ for { break }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for {
+ for {
+ }
+ break
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ for {
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// if there's a condition - even "true" - the loops are no longer syntactically terminating
+
+var _ = func() int {
+ for x == nil {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ for x == nil {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for x == nil {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for true {}
+} // ERROR "missing return"
+
+var _ = func() int {
+ for true {
+ for {
+ break
+ }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ for true {
+ L:
+ for {
+ break L
+ }
+ }
+} // ERROR "missing return"
+
+// select in which all cases terminate and none break are okay.
+
+var _ = func() int {
+ select{}
+}
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ }
+}
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ for{}
+ }
+}
+
+var _ = func() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ goto L
+ }
+}
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ select{}
+ }
+}
+
+// if any cases don't terminate, the select isn't okay anymore
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ goto L
+ case c <- 1:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ default:
+ print(2)
+ }
+} // ERROR "missing return"
+
+
+// if any breaks refer to the select, the select isn't okay anymore, even if they're dead
+
+var _ = func() int {
+ select{ default: break }
+} // ERROR "missing return"
+
+var _ = func() int {
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ break
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ for{ break L }
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ select {
+ case <-c:
+ print(2)
+ panic("abc")
+ case c <- 1:
+ print(2)
+ break L
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ select {
+ case <-c:
+ panic("abc")
+ default:
+ select{}
+ break
+ }
+} // ERROR "missing return"
+
+// switch with default in which all cases terminate is okay
+
+var _ = func() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+var _ = func() int {
+ switch x {
+ default:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+}
+
+var _ = func() int {
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ default:
+ return 4
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+var _ = func() int {
+ switch {
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x {
+ case 2:
+ return 4
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x {
+ case 1:
+ print(2)
+ fallthrough
+ case 2:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+var _ = func() int {
+L:
+ switch x {
+ case 1:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x {
+ default:
+ return 4
+ break
+ case 1:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ switch x {
+ case 1:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+// type switch with default in which all cases terminate is okay
+
+var _ = func() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ default:
+ return 4
+ }
+}
+
+var _ = func() int {
+ switch x.(type) {
+ default:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+}
+
+// if no default or some case doesn't terminate, switch is no longer okay
+
+var _ = func() int {
+ switch {
+ }
+} // ERROR "missing return"
+
+
+var _ = func() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ case float64:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x.(type) {
+ case float64:
+ return 4
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+// if any breaks refer to the switch, switch is no longer okay
+
+var _ = func() int {
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ panic(3)
+ break L
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x.(type) {
+ default:
+ return 4
+ break
+ case int:
+ print(2)
+ panic(3)
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+L:
+ switch x.(type) {
+ case int:
+ print(2)
+ for {
+ break L
+ }
+ default:
+ return 4
+ }
+} // ERROR "missing return"
+
+var _ = func() int {
+ switch x.(type) {
+ default:
+ return 4
+ case int, float64:
+ print(2)
+ panic(3)
+ }
+}
+
+/**/
diff --git a/gcc/testsuite/go.test/test/rotate.go b/gcc/testsuite/go.test/test/rotate.go
new file mode 100644
index 0000000000..1d7149702a
--- /dev/null
+++ b/gcc/testsuite/go.test/test/rotate.go
@@ -0,0 +1,166 @@
+// skip
+
+// NOTE: the actual tests to run are rotate[0123].go
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of shift and rotate by constants.
+// The output is compiled and run.
+//
+// The integer type depends on the value of mode (rotate direction,
+// signedness).
+
+package main
+
+import (
+ "bufio"
+ "flag"
+ "fmt"
+ "os"
+ "strings"
+)
+
+func main() {
+ flag.Parse()
+
+ b := bufio.NewWriter(os.Stdout)
+ defer b.Flush()
+
+ fmt.Fprintf(b, "%s\n", prolog)
+
+ for logBits := uint(3); logBits <= 6; logBits++ {
+ typ := fmt.Sprintf("int%d", 1<<logBits)
+ fmt.Fprint(b, strings.Replace(checkFunc, "XXX", typ, -1))
+ fmt.Fprint(b, strings.Replace(checkFunc, "XXX", "u"+typ, -1))
+ gentest(b, 1<<logBits, mode&1 != 0, mode&2 != 0)
+ }
+}
+
+const prolog = `
+
+package main
+
+import (
+ "fmt"
+ "os"
+)
+
+var (
+ i8 int8 = 0x12
+ i16 int16 = 0x1234
+ i32 int32 = 0x12345678
+ i64 int64 = 0x123456789abcdef0
+ ui8 uint8 = 0x12
+ ui16 uint16 = 0x1234
+ ui32 uint32 = 0x12345678
+ ui64 uint64 = 0x123456789abcdef0
+
+ ni8 = ^i8
+ ni16 = ^i16
+ ni32 = ^i32
+ ni64 = ^i64
+ nui8 = ^ui8
+ nui16 = ^ui16
+ nui32 = ^ui32
+ nui64 = ^ui64
+)
+
+var nfail = 0
+
+func main() {
+ if nfail > 0 {
+ fmt.Printf("BUG\n")
+ }
+}
+
+`
+
+const checkFunc = `
+func check_XXX(desc string, have, want XXX) {
+ if have != want {
+ nfail++
+ fmt.Printf("%s = %T(%#x), want %T(%#x)\n", desc, have, have, want, want)
+ if nfail >= 100 {
+ fmt.Printf("BUG: stopping after 100 failures\n")
+ os.Exit(0)
+ }
+ }
+}
+`
+
+var (
+ uop = [2]func(x, y uint64) uint64{
+ func(x, y uint64) uint64 {
+ return x | y
+ },
+ func(x, y uint64) uint64 {
+ return x ^ y
+ },
+ }
+ iop = [2]func(x, y int64) int64{
+ func(x, y int64) int64 {
+ return x | y
+ },
+ func(x, y int64) int64 {
+ return x ^ y
+ },
+ }
+ cop = [2]byte{'|', '^'}
+)
+
+func gentest(b *bufio.Writer, bits uint, unsigned, inverted bool) {
+ fmt.Fprintf(b, "func init() {\n")
+ defer fmt.Fprintf(b, "}\n")
+ n := 0
+
+ // Generate tests for left/right and right/left.
+ for l := uint(0); l <= bits; l++ {
+ for r := uint(0); r <= bits; r++ {
+ for o, op := range cop {
+ typ := fmt.Sprintf("int%d", bits)
+ v := fmt.Sprintf("i%d", bits)
+ if unsigned {
+ typ = "u" + typ
+ v = "u" + v
+ }
+ v0 := int64(0x123456789abcdef0)
+ if inverted {
+ v = "n" + v
+ v0 = ^v0
+ }
+ expr1 := fmt.Sprintf("%s<<%d %c %s>>%d", v, l, op, v, r)
+ expr2 := fmt.Sprintf("%s>>%d %c %s<<%d", v, r, op, v, l)
+
+ var result string
+ if unsigned {
+ v := uint64(v0) >> (64 - bits)
+ v = uop[o](v<<l, v>>r)
+ v <<= 64 - bits
+ v >>= 64 - bits
+ result = fmt.Sprintf("%#x", v)
+ } else {
+ v := int64(v0) >> (64 - bits)
+ v = iop[o](v<<l, v>>r)
+ v <<= 64 - bits
+ v >>= 64 - bits
+ result = fmt.Sprintf("%#x", v)
+ }
+
+ fmt.Fprintf(b, "\tcheck_%s(%q, %s, %s(%s))\n", typ, expr1, expr1, typ, result)
+ fmt.Fprintf(b, "\tcheck_%s(%q, %s, %s(%s))\n", typ, expr2, expr2, typ, result)
+
+ // Chop test into multiple functions so that there's not one
+ // enormous function to compile/link.
+ // All the functions are named init so we don't have to do
+ // anything special to call them. ☺
+ if n++; n >= 50 {
+ fmt.Fprintf(b, "}\n")
+ fmt.Fprintf(b, "func init() {\n")
+ n = 0
+ }
+ }
+ }
+ }
+}
diff --git a/gcc/testsuite/go.test/test/rotate0.go b/gcc/testsuite/go.test/test/rotate0.go
new file mode 100644
index 0000000000..400b225cf7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/rotate0.go
@@ -0,0 +1,12 @@
+// runoutput ./rotate.go
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of bit rotations.
+// The output is compiled and run.
+
+package main
+
+const mode = 0
diff --git a/gcc/testsuite/go.test/test/rotate1.go b/gcc/testsuite/go.test/test/rotate1.go
new file mode 100644
index 0000000000..98b0b1c849
--- /dev/null
+++ b/gcc/testsuite/go.test/test/rotate1.go
@@ -0,0 +1,12 @@
+// runoutput ./rotate.go
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of bit rotations.
+// The output is compiled and run.
+
+package main
+
+const mode = 1
diff --git a/gcc/testsuite/go.test/test/rotate2.go b/gcc/testsuite/go.test/test/rotate2.go
new file mode 100644
index 0000000000..c50f8ce73b
--- /dev/null
+++ b/gcc/testsuite/go.test/test/rotate2.go
@@ -0,0 +1,12 @@
+// runoutput ./rotate.go
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of bit rotations.
+// The output is compiled and run.
+
+package main
+
+const mode = 2
diff --git a/gcc/testsuite/go.test/test/rotate3.go b/gcc/testsuite/go.test/test/rotate3.go
new file mode 100644
index 0000000000..73d47d8524
--- /dev/null
+++ b/gcc/testsuite/go.test/test/rotate3.go
@@ -0,0 +1,12 @@
+// runoutput ./rotate.go
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Generate test of bit rotations.
+// The output is compiled and run.
+
+package main
+
+const mode = 3
diff --git a/gcc/testsuite/go.test/test/run b/gcc/testsuite/go.test/test/run
index 03c91ee30e..d206312a29 100755
--- a/gcc/testsuite/go.test/test/run
+++ b/gcc/testsuite/go.test/test/run
@@ -3,8 +3,8 @@
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
-eval $(gomake --no-print-directory -f ../src/Make.inc go-env)
-
+eval $(go tool dist env)
+export GOARCH GOOS GOROOT
export E=
case X"$GOARCH" in
@@ -29,13 +29,18 @@ export GOTRACEBACK=0
export LANG=C
unset GREP_OPTIONS # in case user has a non-standard set
+unset GOROOT_FINAL # breaks ./ imports
+
failed=0
PATH=${GOBIN:-$GOROOT/bin}:`pwd`:/bin:/usr/bin:/usr/local/bin
-RUNFILE="/tmp/gorun-$$-$USER"
-TMP1FILE="/tmp/gotest1-$$-$USER"
-TMP2FILE="/tmp/gotest2-$$-$USER"
+# TODO: We add the tool directory to the PATH to avoid thinking about a better way.
+PATH="$GOTOOLDIR:$PATH"
+
+RUNFILE="${TMPDIR:-/tmp}/gorun-$$-$USER"
+TMP1FILE="${TMPDIR:-/tmp}/gotest1-$$-$USER"
+TMP2FILE="${TMPDIR:-/tmp}/gotest2-$$-$USER"
# don't run the machine out of memory: limit individual processes to 4GB.
# on thresher, 3GB suffices to run the tests; with 2GB, peano fails.
@@ -49,11 +54,13 @@ true >pass.out >times.out
exclude=false # exclude nothing
golden=golden.out
+rm -f tmp.go # generated by some tests, left behind if interrupted
+
filterout() {
grep '^'"$2"'$' $1 >/dev/null
}
-for dir in . ken chan interface syntax dwarf fixedbugs bugs
+for dir in . ken chan interface syntax dwarf safe fixedbugs bugs
do
echo
echo '==' $dir'/'
@@ -64,7 +71,8 @@ do
fi
export F=$(basename $i .go)
export D=$dir
- sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|g' >"$RUNFILE"
+ echo '. ./testlib' >"$RUNFILE"
+ sed '/^\/\//!q' $i | sed 's@//@@; $d' |sed 's|./\$A.out|$E &|g' >>"$RUNFILE"
if ! { time -p bash -c "bash '$RUNFILE' >'$TMP1FILE' 2>&1" ; } 2>"$TMP2FILE"
then
echo
@@ -94,7 +102,7 @@ do
echo $i >>pass.out
fi
echo $(awk 'NR==1{print $2}' "$TMP2FILE") $D/$F >>times.out
- rm -f $F.$A $A.out
+ rm -f $F.$A $A.out tmp.go
) done
done | # clean up some stack noise
egrep -v '^(r[0-9a-z]+|[cfg]s) +0x' |
diff --git a/gcc/testsuite/go.test/test/run.go b/gcc/testsuite/go.test/test/run.go
new file mode 100644
index 0000000000..5c94de6400
--- /dev/null
+++ b/gcc/testsuite/go.test/test/run.go
@@ -0,0 +1,916 @@
+// skip
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Run runs tests in the test directory.
+//
+// TODO(bradfitz): docs of some sort, once we figure out how we're changing
+// headers of files
+package main
+
+import (
+ "bytes"
+ "errors"
+ "flag"
+ "fmt"
+ "go/build"
+ "io/ioutil"
+ "log"
+ "os"
+ "os/exec"
+ "path"
+ "path/filepath"
+ "regexp"
+ "runtime"
+ "sort"
+ "strconv"
+ "strings"
+ "time"
+ "unicode"
+)
+
+var (
+ verbose = flag.Bool("v", false, "verbose. if set, parallelism is set to 1.")
+ numParallel = flag.Int("n", runtime.NumCPU(), "number of parallel tests to run")
+ summary = flag.Bool("summary", false, "show summary of results")
+ showSkips = flag.Bool("show_skips", false, "show skipped tests")
+ runoutputLimit = flag.Int("l", defaultRunOutputLimit(), "number of parallel runoutput tests to run")
+)
+
+var (
+ // gc and ld are [568][gl].
+ gc, ld string
+
+ // letter is the build.ArchChar
+ letter string
+
+ // dirs are the directories to look for *.go files in.
+ // TODO(bradfitz): just use all directories?
+ dirs = []string{".", "ken", "chan", "interface", "syntax", "dwarf", "fixedbugs", "bugs"}
+
+ // ratec controls the max number of tests running at a time.
+ ratec chan bool
+
+ // toRun is the channel of tests to run.
+ // It is nil until the first test is started.
+ toRun chan *test
+
+ // rungatec controls the max number of runoutput tests
+ // executed in parallel as they can each consume a lot of memory.
+ rungatec chan bool
+)
+
+// maxTests is an upper bound on the total number of tests.
+// It is used as a channel buffer size to make sure sends don't block.
+const maxTests = 5000
+
+func main() {
+ flag.Parse()
+
+ // Disable parallelism if printing
+ if *verbose {
+ *numParallel = 1
+ }
+
+ ratec = make(chan bool, *numParallel)
+ rungatec = make(chan bool, *runoutputLimit)
+ var err error
+ letter, err = build.ArchChar(build.Default.GOARCH)
+ check(err)
+ gc = letter + "g"
+ ld = letter + "l"
+
+ var tests []*test
+ if flag.NArg() > 0 {
+ for _, arg := range flag.Args() {
+ if arg == "-" || arg == "--" {
+ // Permit running:
+ // $ go run run.go - env.go
+ // $ go run run.go -- env.go
+ // $ go run run.go - ./fixedbugs
+ // $ go run run.go -- ./fixedbugs
+ continue
+ }
+ if fi, err := os.Stat(arg); err == nil && fi.IsDir() {
+ for _, baseGoFile := range goFiles(arg) {
+ tests = append(tests, startTest(arg, baseGoFile))
+ }
+ } else if strings.HasSuffix(arg, ".go") {
+ dir, file := filepath.Split(arg)
+ tests = append(tests, startTest(dir, file))
+ } else {
+ log.Fatalf("can't yet deal with non-directory and non-go file %q", arg)
+ }
+ }
+ } else {
+ for _, dir := range dirs {
+ for _, baseGoFile := range goFiles(dir) {
+ tests = append(tests, startTest(dir, baseGoFile))
+ }
+ }
+ }
+
+ failed := false
+ resCount := map[string]int{}
+ for _, test := range tests {
+ <-test.donec
+ status := "ok "
+ errStr := ""
+ if _, isSkip := test.err.(skipError); isSkip {
+ status = "skip"
+ test.err = nil
+ if !skipOkay[path.Join(test.dir, test.gofile)] {
+ errStr = "unexpected skip for " + path.Join(test.dir, test.gofile) + ": " + errStr
+ status = "FAIL"
+ }
+ }
+ if test.err != nil {
+ status = "FAIL"
+ errStr = test.err.Error()
+ }
+ if status == "FAIL" {
+ failed = true
+ }
+ resCount[status]++
+ if status == "skip" && !*verbose && !*showSkips {
+ continue
+ }
+ dt := fmt.Sprintf("%.3fs", test.dt.Seconds())
+ if status == "FAIL" {
+ fmt.Printf("# go run run.go -- %s\n%s\nFAIL\t%s\t%s\n",
+ path.Join(test.dir, test.gofile),
+ errStr, test.goFileName(), dt)
+ continue
+ }
+ if !*verbose {
+ continue
+ }
+ fmt.Printf("%s\t%s\t%s\n", status, test.goFileName(), dt)
+ }
+
+ if *summary {
+ for k, v := range resCount {
+ fmt.Printf("%5d %s\n", v, k)
+ }
+ }
+
+ if failed {
+ os.Exit(1)
+ }
+}
+
+func toolPath(name string) string {
+ p := filepath.Join(os.Getenv("GOROOT"), "bin", "tool", name)
+ if _, err := os.Stat(p); err != nil {
+ log.Fatalf("didn't find binary at %s", p)
+ }
+ return p
+}
+
+func goFiles(dir string) []string {
+ f, err := os.Open(dir)
+ check(err)
+ dirnames, err := f.Readdirnames(-1)
+ check(err)
+ names := []string{}
+ for _, name := range dirnames {
+ if !strings.HasPrefix(name, ".") && strings.HasSuffix(name, ".go") {
+ names = append(names, name)
+ }
+ }
+ sort.Strings(names)
+ return names
+}
+
+type runCmd func(...string) ([]byte, error)
+
+func compileFile(runcmd runCmd, longname string) (out []byte, err error) {
+ return runcmd("go", "tool", gc, "-e", longname)
+}
+
+func compileInDir(runcmd runCmd, dir string, names ...string) (out []byte, err error) {
+ cmd := []string{"go", "tool", gc, "-e", "-D", ".", "-I", "."}
+ for _, name := range names {
+ cmd = append(cmd, filepath.Join(dir, name))
+ }
+ return runcmd(cmd...)
+}
+
+func linkFile(runcmd runCmd, goname string) (err error) {
+ pfile := strings.Replace(goname, ".go", "."+letter, -1)
+ _, err = runcmd("go", "tool", ld, "-o", "a.exe", "-L", ".", pfile)
+ return
+}
+
+// skipError describes why a test was skipped.
+type skipError string
+
+func (s skipError) Error() string { return string(s) }
+
+func check(err error) {
+ if err != nil {
+ log.Fatal(err)
+ }
+}
+
+// test holds the state of a test.
+type test struct {
+ dir, gofile string
+ donec chan bool // closed when done
+ dt time.Duration
+
+ src string
+ action string // "compile", "build", etc.
+
+ tempDir string
+ err error
+}
+
+// startTest
+func startTest(dir, gofile string) *test {
+ t := &test{
+ dir: dir,
+ gofile: gofile,
+ donec: make(chan bool, 1),
+ }
+ if toRun == nil {
+ toRun = make(chan *test, maxTests)
+ go runTests()
+ }
+ select {
+ case toRun <- t:
+ default:
+ panic("toRun buffer size (maxTests) is too small")
+ }
+ return t
+}
+
+// runTests runs tests in parallel, but respecting the order they
+// were enqueued on the toRun channel.
+func runTests() {
+ for {
+ ratec <- true
+ t := <-toRun
+ go func() {
+ t.run()
+ <-ratec
+ }()
+ }
+}
+
+var cwd, _ = os.Getwd()
+
+func (t *test) goFileName() string {
+ return filepath.Join(t.dir, t.gofile)
+}
+
+func (t *test) goDirName() string {
+ return filepath.Join(t.dir, strings.Replace(t.gofile, ".go", ".dir", -1))
+}
+
+func goDirFiles(longdir string) (filter []os.FileInfo, err error) {
+ files, dirErr := ioutil.ReadDir(longdir)
+ if dirErr != nil {
+ return nil, dirErr
+ }
+ for _, gofile := range files {
+ if filepath.Ext(gofile.Name()) == ".go" {
+ filter = append(filter, gofile)
+ }
+ }
+ return
+}
+
+var packageRE = regexp.MustCompile(`(?m)^package (\w+)`)
+
+func goDirPackages(longdir string) ([][]string, error) {
+ files, err := goDirFiles(longdir)
+ if err != nil {
+ return nil, err
+ }
+ var pkgs [][]string
+ m := make(map[string]int)
+ for _, file := range files {
+ name := file.Name()
+ data, err := ioutil.ReadFile(filepath.Join(longdir, name))
+ if err != nil {
+ return nil, err
+ }
+ pkgname := packageRE.FindStringSubmatch(string(data))
+ if pkgname == nil {
+ return nil, fmt.Errorf("cannot find package name in %s", name)
+ }
+ i, ok := m[pkgname[1]]
+ if !ok {
+ i = len(pkgs)
+ pkgs = append(pkgs, nil)
+ m[pkgname[1]] = i
+ }
+ pkgs[i] = append(pkgs[i], name)
+ }
+ return pkgs, nil
+}
+
+type context struct {
+ GOOS string
+ GOARCH string
+}
+
+// shouldTest looks for build tags in a source file and returns
+// whether the file should be used according to the tags.
+func shouldTest(src string, goos, goarch string) (ok bool, whyNot string) {
+ if idx := strings.Index(src, "\npackage"); idx >= 0 {
+ src = src[:idx]
+ }
+ for _, line := range strings.Split(src, "\n") {
+ line = strings.TrimSpace(line)
+ if strings.HasPrefix(line, "//") {
+ line = line[2:]
+ } else {
+ continue
+ }
+ line = strings.TrimSpace(line)
+ if len(line) == 0 || line[0] != '+' {
+ continue
+ }
+ ctxt := &context{
+ GOOS: goos,
+ GOARCH: goarch,
+ }
+ words := strings.Fields(line)
+ if words[0] == "+build" {
+ ok := false
+ for _, word := range words[1:] {
+ if ctxt.match(word) {
+ ok = true
+ break
+ }
+ }
+ if !ok {
+ // no matching tag found.
+ return false, line
+ }
+ }
+ }
+ // no build tags
+ return true, ""
+}
+
+func (ctxt *context) match(name string) bool {
+ if name == "" {
+ return false
+ }
+ if i := strings.Index(name, ","); i >= 0 {
+ // comma-separated list
+ return ctxt.match(name[:i]) && ctxt.match(name[i+1:])
+ }
+ if strings.HasPrefix(name, "!!") { // bad syntax, reject always
+ return false
+ }
+ if strings.HasPrefix(name, "!") { // negation
+ return len(name) > 1 && !ctxt.match(name[1:])
+ }
+
+ // Tags must be letters, digits, underscores or dots.
+ // Unlike in Go identifiers, all digits are fine (e.g., "386").
+ for _, c := range name {
+ if !unicode.IsLetter(c) && !unicode.IsDigit(c) && c != '_' && c != '.' {
+ return false
+ }
+ }
+
+ if name == ctxt.GOOS || name == ctxt.GOARCH {
+ return true
+ }
+
+ return false
+}
+
+func init() { checkShouldTest() }
+
+// run runs a test.
+func (t *test) run() {
+ start := time.Now()
+ defer func() {
+ t.dt = time.Since(start)
+ close(t.donec)
+ }()
+
+ srcBytes, err := ioutil.ReadFile(t.goFileName())
+ if err != nil {
+ t.err = err
+ return
+ }
+ t.src = string(srcBytes)
+ if t.src[0] == '\n' {
+ t.err = skipError("starts with newline")
+ return
+ }
+ pos := strings.Index(t.src, "\n\n")
+ if pos == -1 {
+ t.err = errors.New("double newline not found")
+ return
+ }
+ if ok, why := shouldTest(t.src, runtime.GOOS, runtime.GOARCH); !ok {
+ t.action = "skip"
+ if *showSkips {
+ fmt.Printf("%-20s %-20s: %s\n", t.action, t.goFileName(), why)
+ }
+ return
+ }
+ action := t.src[:pos]
+ if nl := strings.Index(action, "\n"); nl >= 0 && strings.Contains(action[:nl], "+build") {
+ // skip first line
+ action = action[nl+1:]
+ }
+ if strings.HasPrefix(action, "//") {
+ action = action[2:]
+ }
+
+ var args, flags []string
+ wantError := false
+ f := strings.Fields(action)
+ if len(f) > 0 {
+ action = f[0]
+ args = f[1:]
+ }
+
+ switch action {
+ case "rundircmpout":
+ action = "rundir"
+ t.action = "rundir"
+ case "cmpout":
+ action = "run" // the run case already looks for <dir>/<test>.out files
+ fallthrough
+ case "compile", "compiledir", "build", "run", "runoutput", "rundir":
+ t.action = action
+ case "errorcheck", "errorcheckdir", "errorcheckoutput":
+ t.action = action
+ wantError = true
+ for len(args) > 0 && strings.HasPrefix(args[0], "-") {
+ if args[0] == "-0" {
+ wantError = false
+ } else {
+ flags = append(flags, args[0])
+ }
+ args = args[1:]
+ }
+ case "skip":
+ t.action = "skip"
+ return
+ default:
+ t.err = skipError("skipped; unknown pattern: " + action)
+ t.action = "??"
+ return
+ }
+
+ t.makeTempDir()
+ defer os.RemoveAll(t.tempDir)
+
+ err = ioutil.WriteFile(filepath.Join(t.tempDir, t.gofile), srcBytes, 0644)
+ check(err)
+
+ // A few tests (of things like the environment) require these to be set.
+ os.Setenv("GOOS", runtime.GOOS)
+ os.Setenv("GOARCH", runtime.GOARCH)
+
+ useTmp := true
+ runcmd := func(args ...string) ([]byte, error) {
+ cmd := exec.Command(args[0], args[1:]...)
+ var buf bytes.Buffer
+ cmd.Stdout = &buf
+ cmd.Stderr = &buf
+ if useTmp {
+ cmd.Dir = t.tempDir
+ cmd.Env = envForDir(cmd.Dir)
+ }
+ err := cmd.Run()
+ if err != nil {
+ err = fmt.Errorf("%s\n%s", err, buf.Bytes())
+ }
+ return buf.Bytes(), err
+ }
+
+ long := filepath.Join(cwd, t.goFileName())
+ switch action {
+ default:
+ t.err = fmt.Errorf("unimplemented action %q", action)
+
+ case "errorcheck":
+ cmdline := []string{"go", "tool", gc, "-e", "-o", "a." + letter}
+ cmdline = append(cmdline, flags...)
+ cmdline = append(cmdline, long)
+ out, err := runcmd(cmdline...)
+ if wantError {
+ if err == nil {
+ t.err = fmt.Errorf("compilation succeeded unexpectedly\n%s", out)
+ return
+ }
+ } else {
+ if err != nil {
+ t.err = err
+ return
+ }
+ }
+ t.err = t.errorCheck(string(out), long, t.gofile)
+ return
+
+ case "compile":
+ _, t.err = compileFile(runcmd, long)
+
+ case "compiledir":
+ // Compile all files in the directory in lexicographic order.
+ longdir := filepath.Join(cwd, t.goDirName())
+ pkgs, err := goDirPackages(longdir)
+ if err != nil {
+ t.err = err
+ return
+ }
+ for _, gofiles := range pkgs {
+ _, t.err = compileInDir(runcmd, longdir, gofiles...)
+ if t.err != nil {
+ return
+ }
+ }
+
+ case "errorcheckdir":
+ // errorcheck all files in lexicographic order
+ // useful for finding importing errors
+ longdir := filepath.Join(cwd, t.goDirName())
+ pkgs, err := goDirPackages(longdir)
+ if err != nil {
+ t.err = err
+ return
+ }
+ for i, gofiles := range pkgs {
+ out, err := compileInDir(runcmd, longdir, gofiles...)
+ if i == len(pkgs)-1 {
+ if wantError && err == nil {
+ t.err = fmt.Errorf("compilation succeeded unexpectedly\n%s", out)
+ return
+ } else if !wantError && err != nil {
+ t.err = err
+ return
+ }
+ } else if err != nil {
+ t.err = err
+ return
+ }
+ var fullshort []string
+ for _, name := range gofiles {
+ fullshort = append(fullshort, filepath.Join(longdir, name), name)
+ }
+ t.err = t.errorCheck(string(out), fullshort...)
+ if t.err != nil {
+ break
+ }
+ }
+
+ case "rundir":
+ // Compile all files in the directory in lexicographic order.
+ // then link as if the last file is the main package and run it
+ longdir := filepath.Join(cwd, t.goDirName())
+ pkgs, err := goDirPackages(longdir)
+ if err != nil {
+ t.err = err
+ return
+ }
+ for i, gofiles := range pkgs {
+ _, err := compileInDir(runcmd, longdir, gofiles...)
+ if err != nil {
+ t.err = err
+ return
+ }
+ if i == len(pkgs)-1 {
+ err = linkFile(runcmd, gofiles[0])
+ if err != nil {
+ t.err = err
+ return
+ }
+ out, err := runcmd(append([]string{filepath.Join(t.tempDir, "a.exe")}, args...)...)
+ if err != nil {
+ t.err = err
+ return
+ }
+ if strings.Replace(string(out), "\r\n", "\n", -1) != t.expectedOutput() {
+ t.err = fmt.Errorf("incorrect output\n%s", out)
+ }
+ }
+ }
+
+ case "build":
+ _, err := runcmd("go", "build", "-o", "a.exe", long)
+ if err != nil {
+ t.err = err
+ }
+
+ case "run":
+ useTmp = false
+ out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
+ if err != nil {
+ t.err = err
+ }
+ if strings.Replace(string(out), "\r\n", "\n", -1) != t.expectedOutput() {
+ t.err = fmt.Errorf("incorrect output\n%s", out)
+ }
+
+ case "runoutput":
+ rungatec <- true
+ defer func() {
+ <-rungatec
+ }()
+ useTmp = false
+ out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
+ if err != nil {
+ t.err = err
+ }
+ tfile := filepath.Join(t.tempDir, "tmp__.go")
+ if err := ioutil.WriteFile(tfile, out, 0666); err != nil {
+ t.err = fmt.Errorf("write tempfile:%s", err)
+ return
+ }
+ out, err = runcmd("go", "run", tfile)
+ if err != nil {
+ t.err = err
+ }
+ if string(out) != t.expectedOutput() {
+ t.err = fmt.Errorf("incorrect output\n%s", out)
+ }
+
+ case "errorcheckoutput":
+ useTmp = false
+ out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
+ if err != nil {
+ t.err = err
+ }
+ tfile := filepath.Join(t.tempDir, "tmp__.go")
+ err = ioutil.WriteFile(tfile, out, 0666)
+ if err != nil {
+ t.err = fmt.Errorf("write tempfile:%s", err)
+ return
+ }
+ cmdline := []string{"go", "tool", gc, "-e", "-o", "a." + letter}
+ cmdline = append(cmdline, flags...)
+ cmdline = append(cmdline, tfile)
+ out, err = runcmd(cmdline...)
+ if wantError {
+ if err == nil {
+ t.err = fmt.Errorf("compilation succeeded unexpectedly\n%s", out)
+ return
+ }
+ } else {
+ if err != nil {
+ t.err = err
+ return
+ }
+ }
+ t.err = t.errorCheck(string(out), tfile, "tmp__.go")
+ return
+ }
+}
+
+func (t *test) String() string {
+ return filepath.Join(t.dir, t.gofile)
+}
+
+func (t *test) makeTempDir() {
+ var err error
+ t.tempDir, err = ioutil.TempDir("", "")
+ check(err)
+}
+
+func (t *test) expectedOutput() string {
+ filename := filepath.Join(t.dir, t.gofile)
+ filename = filename[:len(filename)-len(".go")]
+ filename += ".out"
+ b, _ := ioutil.ReadFile(filename)
+ return string(b)
+}
+
+func (t *test) errorCheck(outStr string, fullshort ...string) (err error) {
+ defer func() {
+ if *verbose && err != nil {
+ log.Printf("%s gc output:\n%s", t, outStr)
+ }
+ }()
+ var errs []error
+
+ var out []string
+ // 6g error messages continue onto additional lines with leading tabs.
+ // Split the output at the beginning of each line that doesn't begin with a tab.
+ for _, line := range strings.Split(outStr, "\n") {
+ if strings.HasSuffix(line, "\r") { // remove '\r', output by compiler on windows
+ line = line[:len(line)-1]
+ }
+ if strings.HasPrefix(line, "\t") {
+ out[len(out)-1] += "\n" + line
+ } else if strings.HasPrefix(line, "go tool") {
+ continue
+ } else if strings.TrimSpace(line) != "" {
+ out = append(out, line)
+ }
+ }
+
+ // Cut directory name.
+ for i := range out {
+ for j := 0; j < len(fullshort); j += 2 {
+ full, short := fullshort[j], fullshort[j+1]
+ out[i] = strings.Replace(out[i], full, short, -1)
+ }
+ }
+
+ var want []wantedError
+ for j := 0; j < len(fullshort); j += 2 {
+ full, short := fullshort[j], fullshort[j+1]
+ want = append(want, t.wantedErrors(full, short)...)
+ }
+
+ for _, we := range want {
+ var errmsgs []string
+ errmsgs, out = partitionStrings(we.filterRe, out)
+ if len(errmsgs) == 0 {
+ errs = append(errs, fmt.Errorf("%s:%d: missing error %q", we.file, we.lineNum, we.reStr))
+ continue
+ }
+ matched := false
+ n := len(out)
+ for _, errmsg := range errmsgs {
+ if we.re.MatchString(errmsg) {
+ matched = true
+ } else {
+ out = append(out, errmsg)
+ }
+ }
+ if !matched {
+ errs = append(errs, fmt.Errorf("%s:%d: no match for %#q in:\n\t%s", we.file, we.lineNum, we.reStr, strings.Join(out[n:], "\n\t")))
+ continue
+ }
+ }
+
+ if len(out) > 0 {
+ errs = append(errs, fmt.Errorf("Unmatched Errors:"))
+ for _, errLine := range out {
+ errs = append(errs, fmt.Errorf("%s", errLine))
+ }
+ }
+
+ if len(errs) == 0 {
+ return nil
+ }
+ if len(errs) == 1 {
+ return errs[0]
+ }
+ var buf bytes.Buffer
+ fmt.Fprintf(&buf, "\n")
+ for _, err := range errs {
+ fmt.Fprintf(&buf, "%s\n", err.Error())
+ }
+ return errors.New(buf.String())
+
+}
+
+func partitionStrings(rx *regexp.Regexp, strs []string) (matched, unmatched []string) {
+ for _, s := range strs {
+ if rx.MatchString(s) {
+ matched = append(matched, s)
+ } else {
+ unmatched = append(unmatched, s)
+ }
+ }
+ return
+}
+
+type wantedError struct {
+ reStr string
+ re *regexp.Regexp
+ lineNum int
+ file string
+ filterRe *regexp.Regexp // /^file:linenum\b/m
+}
+
+var (
+ errRx = regexp.MustCompile(`// (?:GC_)?ERROR (.*)`)
+ errQuotesRx = regexp.MustCompile(`"([^"]*)"`)
+ lineRx = regexp.MustCompile(`LINE(([+-])([0-9]+))?`)
+)
+
+func (t *test) wantedErrors(file, short string) (errs []wantedError) {
+ src, _ := ioutil.ReadFile(file)
+ for i, line := range strings.Split(string(src), "\n") {
+ lineNum := i + 1
+ if strings.Contains(line, "////") {
+ // double comment disables ERROR
+ continue
+ }
+ m := errRx.FindStringSubmatch(line)
+ if m == nil {
+ continue
+ }
+ all := m[1]
+ mm := errQuotesRx.FindAllStringSubmatch(all, -1)
+ if mm == nil {
+ log.Fatalf("%s:%d: invalid errchk line: %s", t.goFileName(), lineNum, line)
+ }
+ for _, m := range mm {
+ rx := lineRx.ReplaceAllStringFunc(m[1], func(m string) string {
+ n := lineNum
+ if strings.HasPrefix(m, "LINE+") {
+ delta, _ := strconv.Atoi(m[5:])
+ n += delta
+ } else if strings.HasPrefix(m, "LINE-") {
+ delta, _ := strconv.Atoi(m[5:])
+ n -= delta
+ }
+ return fmt.Sprintf("%s:%d", short, n)
+ })
+ re, err := regexp.Compile(rx)
+ if err != nil {
+ log.Fatalf("%s:%d: invalid regexp in ERROR line: %v", t.goFileName(), lineNum, err)
+ }
+ filterPattern := fmt.Sprintf(`^(\w+/)?%s:%d[:[]`, regexp.QuoteMeta(short), lineNum)
+ errs = append(errs, wantedError{
+ reStr: rx,
+ re: re,
+ filterRe: regexp.MustCompile(filterPattern),
+ lineNum: lineNum,
+ file: short,
+ })
+ }
+ }
+
+ return
+}
+
+var skipOkay = map[string]bool{
+ "linkx.go": true, // like "run" but wants linker flags
+ "sinit.go": true,
+ "fixedbugs/bug248.go": true, // combines errorcheckdir and rundir in the same dir.
+ "fixedbugs/bug302.go": true, // tests both .$O and .a imports.
+ "fixedbugs/bug345.go": true, // needs the appropriate flags in gc invocation.
+ "fixedbugs/bug369.go": true, // needs compiler flags.
+ "fixedbugs/bug429.go": true, // like "run" but program should fail
+ "bugs/bug395.go": true,
+}
+
+// defaultRunOutputLimit returns the number of runoutput tests that
+// can be executed in parallel.
+func defaultRunOutputLimit() int {
+ const maxArmCPU = 2
+
+ cpu := runtime.NumCPU()
+ if runtime.GOARCH == "arm" && cpu > maxArmCPU {
+ cpu = maxArmCPU
+ }
+ return cpu
+}
+
+// checkShouldTest runs sanity checks on the shouldTest function.
+func checkShouldTest() {
+ assert := func(ok bool, _ string) {
+ if !ok {
+ panic("fail")
+ }
+ }
+ assertNot := func(ok bool, _ string) { assert(!ok, "") }
+
+ // Simple tests.
+ assert(shouldTest("// +build linux", "linux", "arm"))
+ assert(shouldTest("// +build !windows", "linux", "arm"))
+ assertNot(shouldTest("// +build !windows", "windows", "amd64"))
+
+ // A file with no build tags will always be tested.
+ assert(shouldTest("// This is a test.", "os", "arch"))
+
+ // Build tags separated by a space are OR-ed together.
+ assertNot(shouldTest("// +build arm 386", "linux", "amd64"))
+
+ // Build tags seperated by a comma are AND-ed together.
+ assertNot(shouldTest("// +build !windows,!plan9", "windows", "amd64"))
+ assertNot(shouldTest("// +build !windows,!plan9", "plan9", "386"))
+
+ // Build tags on multiple lines are AND-ed together.
+ assert(shouldTest("// +build !windows\n// +build amd64", "linux", "amd64"))
+ assertNot(shouldTest("// +build !windows\n// +build amd64", "windows", "amd64"))
+
+ // Test that (!a OR !b) matches anything.
+ assert(shouldTest("// +build !windows !plan9", "windows", "amd64"))
+}
+
+// envForDir returns a copy of the environment
+// suitable for running in the given directory.
+// The environment is the current process's environment
+// but with an updated $PWD, so that an os.Getwd in the
+// child will be faster.
+func envForDir(dir string) []string {
+ env := os.Environ()
+ for i, kv := range env {
+ if strings.HasPrefix(kv, "PWD=") {
+ env[i] = "PWD=" + dir
+ return env
+ }
+ }
+ env = append(env, "PWD="+dir)
+ return env
+}
diff --git a/gcc/testsuite/go.test/test/rune.go b/gcc/testsuite/go.test/test/rune.go
index 3386972b6d..c013c471d3 100644
--- a/gcc/testsuite/go.test/test/rune.go
+++ b/gcc/testsuite/go.test/test/rune.go
@@ -1,10 +1,13 @@
-// $G $D/$F.go
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-package main
+// Test rune constants, expressions and types.
+// Compiles but does not run.
+
+package rune
var (
r0 = 'a'
diff --git a/gcc/testsuite/go.test/test/runtime.go b/gcc/testsuite/go.test/test/runtime.go
index 4be1d055b5..89f59e3edb 100644
--- a/gcc/testsuite/go.test/test/runtime.go
+++ b/gcc/testsuite/go.test/test/runtime.go
@@ -1,15 +1,16 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// make sure that even if a file imports runtime,
+// Test that even if a file imports runtime,
// it cannot get at the low-level runtime definitions
-// known to the compiler. for normal packages
+// known to the compiler. For normal packages
// the compiler doesn't even record the lower case
// functions in its symbol table, but some functions
// in runtime are hard-coded into the compiler.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/safe/main.go b/gcc/testsuite/go.test/test/safe/main.go
new file mode 100644
index 0000000000..d173ed9266
--- /dev/null
+++ b/gcc/testsuite/go.test/test/safe/main.go
@@ -0,0 +1,14 @@
+// true
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+// can't use local path with -u, use -I. instead
+import "pkg" // ERROR "import unsafe package"
+
+func main() {
+ print(pkg.Float32bits(1.0))
+}
diff --git a/gcc/testsuite/go.test/test/safe/nousesafe.go b/gcc/testsuite/go.test/test/safe/nousesafe.go
new file mode 100644
index 0000000000..fcd25af315
--- /dev/null
+++ b/gcc/testsuite/go.test/test/safe/nousesafe.go
@@ -0,0 +1,8 @@
+// $G $D/pkg.go && pack grc pkg.a pkg.$A 2> /dev/null && rm pkg.$A && errchk $G -I . -u $D/main.go
+// rm -f pkg.a
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/safe/pkg.go b/gcc/testsuite/go.test/test/safe/pkg.go
new file mode 100644
index 0000000000..bebc43a214
--- /dev/null
+++ b/gcc/testsuite/go.test/test/safe/pkg.go
@@ -0,0 +1,16 @@
+// true
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// a package that uses unsafe on the inside but not in it's api
+
+package pkg
+
+import "unsafe"
+
+// this should be inlinable
+func Float32bits(f float32) uint32 {
+ return *(*uint32)(unsafe.Pointer(&f))
+} \ No newline at end of file
diff --git a/gcc/testsuite/go.test/test/safe/usesafe.go b/gcc/testsuite/go.test/test/safe/usesafe.go
new file mode 100644
index 0000000000..5d0829e290
--- /dev/null
+++ b/gcc/testsuite/go.test/test/safe/usesafe.go
@@ -0,0 +1,8 @@
+// $G $D/pkg.go && pack grcS pkg.a pkg.$A 2> /dev/null && rm pkg.$A && $G -I . -u $D/main.go
+// rm -f pkg.a
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package ignored
diff --git a/gcc/testsuite/go.test/test/shift1.go b/gcc/testsuite/go.test/test/shift1.go
index c197eef66e..44a3792c4f 100644
--- a/gcc/testsuite/go.test/test/shift1.go
+++ b/gcc/testsuite/go.test/test/shift1.go
@@ -1,10 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test illegal shifts.
// Issue 1708, illegal cases.
+// Does not compile.
package p
@@ -21,7 +23,7 @@ var (
// non-constant shift expressions
var (
- e1 = g(2.0 << s) // ERROR "invalid" "as type interface"
+ e1 = g(2.0 << s) // ERROR "invalid|shift of non-integer operand" "as type interface"
f1 = h(2 << s) // ERROR "invalid" "as type float64"
g1 int64 = 1.1 << s // ERROR "truncated"
)
@@ -34,3 +36,206 @@ var (
b2 = 1.0 << c // ERROR "overflow"
d2 = f(1.0 << c) // ERROR "overflow"
)
+
+var (
+ // issues 4882, 4936.
+ a3 = 1.0<<s + 0 // ERROR "invalid|shift of non-integer operand"
+ // issue 4937
+ b3 = 1<<s + 1 + 1.0 // ERROR "invalid|shift of non-integer operand"
+ // issue 5014
+ c3 = complex(1<<s, 0) // ERROR "invalid|shift of type float64"
+ d3 int = complex(1<<s, 3) // ERROR "non-integer|cannot use.*as type int" "shift of type float64"
+ e3 = real(1 << s) // ERROR "invalid"
+ f3 = imag(1 << s) // ERROR "invalid"
+)
+
+// from the spec
+func _() {
+ var (
+ s uint = 33
+ i = 1 << s // 1 has type int
+ j int32 = 1 << s // 1 has type int32; j == 0
+ k = uint64(1 << s) // 1 has type uint64; k == 1<<33
+ m int = 1.0 << s // 1.0 has type int
+ n = 1.0<<s != i // 1.0 has type int; n == false if ints are 32bits in size
+ o = 1<<s == 2<<s // 1 and 2 have type int; o == true if ints are 32bits in size
+ // next test only fails on 32bit systems
+ // p = 1<<s == 1<<33 // illegal if ints are 32bits in size: 1 has type int, but 1<<33 overflows int
+ u = 1.0 << s // ERROR "non-integer|float64"
+ u1 = 1.0<<s != 0 // ERROR "non-integer|float64"
+ u2 = 1<<s != 1.0 // ERROR "non-integer|float64"
+ v float32 = 1 << s // ERROR "non-integer|float32"
+ w int64 = 1.0 << 33 // 1.0<<33 is a constant shift expression
+ _, _, _, _, _, _, _, _, _, _ = j, k, m, n, o, u, u1, u2, v, w
+ )
+}
+
+// shifts in comparisons w/ untyped operands
+var (
+ _ = 1<<s == 1
+ _ = 1<<s == 1. // ERROR "invalid|shift of type float64"
+ _ = 1.<<s == 1 // ERROR "invalid|shift of type float64"
+ _ = 1.<<s == 1. // ERROR "invalid|non-integer|shift of type float64"
+
+ _ = 1<<s+1 == 1
+ _ = 1<<s+1 == 1. // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1. == 1 // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1. == 1. // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1 == 1 // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1 == 1. // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1. == 1 // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1. == 1. // ERROR "invalid|non-integer|shift of type float64"
+
+ _ = 1<<s == 1<<s
+ _ = 1<<s == 1.<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s == 1<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s == 1.<<s // ERROR "invalid|non-integer|shift of type float64"
+
+ _ = 1<<s+1<<s == 1
+ _ = 1<<s+1<<s == 1. // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1 // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1. // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1<<s == 1 // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1<<s == 1. // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1.<<s == 1 // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1.<<s == 1. // ERROR "invalid|non-integer|shift of type float64"
+
+ _ = 1<<s+1<<s == 1<<s+1<<s
+ _ = 1<<s+1<<s == 1<<s+1.<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1<<s == 1.<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1<<s == 1.<<s+1.<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1<<s+1.<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1.<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1<<s+1.<<s == 1.<<s+1.<<s // ERROR "invalid|non-integer|shift of type float64"
+ _ = 1.<<s+1<<s == 1<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1<<s == 1<<s+1.<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1<<s == 1.<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1<<s == 1.<<s+1.<<s // ERROR "invalid|non-integer|shift of type float64"
+ _ = 1.<<s+1.<<s == 1<<s+1<<s // ERROR "invalid|shift of type float64"
+ _ = 1.<<s+1.<<s == 1<<s+1.<<s // ERROR "invalid|non-integer|shift of type float64"
+ _ = 1.<<s+1.<<s == 1.<<s+1<<s // ERROR "invalid|non-integer|shift of type float64"
+ _ = 1.<<s+1.<<s == 1.<<s+1.<<s // ERROR "invalid|non-integer|shift of type float64"
+)
+
+// shifts in comparisons w/ typed operands
+var (
+ x int
+ _ = 1<<s == x
+ _ = 1.<<s == x
+ _ = 1.1<<s == x // ERROR "truncated"
+
+ _ = 1<<s+x == 1
+ _ = 1<<s+x == 1.
+ _ = 1<<s+x == 1.1 // ERROR "truncated"
+ _ = 1.<<s+x == 1
+ _ = 1.<<s+x == 1.
+ _ = 1.<<s+x == 1.1 // ERROR "truncated"
+ _ = 1.1<<s+x == 1 // ERROR "truncated"
+ _ = 1.1<<s+x == 1. // ERROR "truncated"
+ _ = 1.1<<s+x == 1.1 // ERROR "truncated"
+
+ _ = 1<<s == x<<s
+ _ = 1.<<s == x<<s
+ _ = 1.1<<s == x<<s // ERROR "truncated"
+)
+
+// shifts as operands in non-arithmetic operations and as arguments
+func _() {
+ var s uint
+ var a []int
+ _ = a[1<<s]
+ _ = a[1.]
+ // For now, the spec disallows these. We may revisit past Go 1.1.
+ _ = a[1.<<s] // ERROR "integer|shift of type float64"
+ _ = a[1.1<<s] // ERROR "integer|shift of type float64"
+
+ _ = make([]int, 1)
+ _ = make([]int, 1.)
+ _ = make([]int, 1.<<s)
+ _ = make([]int, 1.1<<s) // ERROR "non-integer|truncated"
+
+ _ = float32(1)
+ _ = float32(1 << s) // ERROR "non-integer|shift of type float32"
+ _ = float32(1.)
+ _ = float32(1. << s) // ERROR "non-integer|shift of type float32"
+ _ = float32(1.1 << s) // ERROR "non-integer|shift of type float32"
+
+ _ = append(a, 1<<s)
+ _ = append(a, 1.<<s)
+ _ = append(a, 1.1<<s) // ERROR "truncated"
+
+ var b []float32
+ _ = append(b, 1<<s) // ERROR "non-integer|type float32"
+ _ = append(b, 1.<<s) // ERROR "non-integer|type float32"
+ _ = append(b, 1.1<<s) // ERROR "non-integer|type float32"
+
+ _ = complex(1.<<s, 0) // ERROR "non-integer|shift of type float64"
+ _ = complex(1.1<<s, 0) // ERROR "non-integer|shift of type float64"
+ _ = complex(0, 1.<<s) // ERROR "non-integer|shift of type float64"
+ _ = complex(0, 1.1<<s) // ERROR "non-integer|shift of type float64"
+
+ var a4 float64
+ var b4 int
+ _ = complex(1<<s, a4) // ERROR "non-integer|shift of type float64"
+ _ = complex(1<<s, b4) // ERROR "invalid|non-integer|"
+
+ var m1 map[int]string
+ delete(m1, 1<<s)
+ delete(m1, 1.<<s)
+ delete(m1, 1.1<<s) // ERROR "truncated|shift of type float64"
+
+ var m2 map[float32]string
+ delete(m2, 1<<s) // ERROR "invalid|cannot use 1 << s as type float32"
+ delete(m2, 1.<<s) // ERROR "invalid|cannot use 1 << s as type float32"
+ delete(m2, 1.1<<s) // ERROR "invalid|cannot use 1.1 << s as type float32"
+}
+
+// shifts of shifts
+func _() {
+ var s uint
+ _ = 1 << (1 << s)
+ _ = 1 << (1. << s)
+ _ = 1 << (1.1 << s) // ERROR "non-integer|truncated"
+ _ = 1. << (1 << s) // ERROR "non-integer|shift of type float64"
+ _ = 1. << (1. << s) // ERROR "non-integer|shift of type float64"
+ _ = 1.1 << (1.1 << s) // ERROR "invalid|non-integer|truncated"
+
+ _ = (1 << s) << (1 << s)
+ _ = (1 << s) << (1. << s)
+ _ = (1 << s) << (1.1 << s) // ERROR "truncated"
+ _ = (1. << s) << (1 << s) // ERROR "non-integer|shift of type float64"
+ _ = (1. << s) << (1. << s) // ERROR "non-integer|shift of type float64"
+ _ = (1.1 << s) << (1.1 << s) // ERROR "invalid|non-integer|truncated"
+
+ var x int
+ x = 1 << (1 << s)
+ x = 1 << (1. << s)
+ x = 1 << (1.1 << s) // ERROR "truncated"
+ x = 1. << (1 << s)
+ x = 1. << (1. << s)
+ x = 1.1 << (1.1 << s) // ERROR "truncated"
+
+ x = (1 << s) << (1 << s)
+ x = (1 << s) << (1. << s)
+ x = (1 << s) << (1.1 << s) // ERROR "truncated"
+ x = (1. << s) << (1 << s)
+ x = (1. << s) << (1. << s)
+ x = (1.1 << s) << (1.1 << s) // ERROR "truncated"
+
+ var y float32
+ y = 1 << (1 << s) // ERROR "non-integer|type float32"
+ y = 1 << (1. << s) // ERROR "non-integer|type float32"
+ y = 1 << (1.1 << s) // ERROR "invalid|truncated|float32"
+ y = 1. << (1 << s) // ERROR "non-integer|type float32"
+ y = 1. << (1. << s) // ERROR "non-integer|type float32"
+ y = 1.1 << (1.1 << s) // ERROR "invalid|truncated|float32"
+
+ var z complex128
+ z = (1 << s) << (1 << s) // ERROR "non-integer|type complex128"
+ z = (1 << s) << (1. << s) // ERROR "non-integer|type complex128"
+ z = (1 << s) << (1.1 << s) // ERROR "invalid|truncated|complex128"
+ z = (1. << s) << (1 << s) // ERROR "non-integer|type complex128"
+ z = (1. << s) << (1. << s) // ERROR "non-integer|type complex128"
+ z = (1.1 << s) << (1.1 << s) // ERROR "invalid|truncated|complex128"
+}
diff --git a/gcc/testsuite/go.test/test/shift2.go b/gcc/testsuite/go.test/test/shift2.go
index ec4c7addc2..80e6bbc190 100644
--- a/gcc/testsuite/go.test/test/shift2.go
+++ b/gcc/testsuite/go.test/test/shift2.go
@@ -1,10 +1,12 @@
-// $G $D/$F.go || echo BUG: shift2
+// compile
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test legal shifts.
// Issue 1708, legal cases.
+// Compiles but does not run.
package p
@@ -18,6 +20,7 @@ var (
i = 1 << s // 1 has type int
j int32 = 1 << s // 1 has type int32; j == 0
k = uint64(1 << s) // 1 has type uint64; k == 1<<33
+ l = g(1 << s) // 1 has type int
m int = 1.0 << s // legal: 1.0 has type int
w int64 = 1.0 << 33 // legal: 1.0<<33 is a constant shift expression
)
diff --git a/gcc/testsuite/go.test/test/sieve.go b/gcc/testsuite/go.test/test/sieve.go
index 4fa1115824..0cd120c548 100644
--- a/gcc/testsuite/go.test/test/sieve.go
+++ b/gcc/testsuite/go.test/test/sieve.go
@@ -1,9 +1,12 @@
-// $G $F.go && $L $F.$A # don't run it - goes forever
+// build
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test basic concurrency: the classic prime sieve.
+// Do not run - loops forever.
+
package main
// Send the sequence 2, 3, 4, ... to channel 'ch'.
diff --git a/gcc/testsuite/go.test/test/sigchld.go b/gcc/testsuite/go.test/test/sigchld.go
index e7c3d5abb4..a60d28deaa 100644
--- a/gcc/testsuite/go.test/test/sigchld.go
+++ b/gcc/testsuite/go.test/test/sigchld.go
@@ -1,10 +1,12 @@
-// [ "$GOOS" == windows ] ||
-// ($G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out)
+// +build !windows
+// cmpout
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that a program can survive SIGCHLD.
+
package main
import "syscall"
diff --git a/gcc/testsuite/go.test/test/simassign.go b/gcc/testsuite/go.test/test/simassign.go
index 28408abc23..6ba5c783e9 100644
--- a/gcc/testsuite/go.test/test/simassign.go
+++ b/gcc/testsuite/go.test/test/simassign.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simultaneous assignment.
+
package main
var a, b, c, d, e, f, g, h, i int
diff --git a/gcc/testsuite/go.test/test/sinit.go b/gcc/testsuite/go.test/test/sinit.go
index 5cd3a4567b..5e50e1100a 100644
--- a/gcc/testsuite/go.test/test/sinit.go
+++ b/gcc/testsuite/go.test/test/sinit.go
@@ -1,9 +1,15 @@
// $G -S $D/$F.go | egrep initdone >/dev/null && echo BUG sinit || true
+// NOTE: This test is not run by 'run.go' and so not run by all.bash.
+// To run this test you must use the ./run shell script.
+
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that many initializations can be done at link time and
+// generate no executable init functions.
+
package p
// Should be no init func in the assembly.
@@ -253,3 +259,13 @@ var copy_pt0a = pt0a
var copy_pt0b = pt0b
var copy_pt1 = pt1
var copy_pt1a = pt1a
+
+var _ interface{} = 1
+
+type T1 int
+
+func (t *T1) M() {}
+
+type Mer interface { M() }
+
+var _ Mer = (*T1)(nil)
diff --git a/gcc/testsuite/go.test/test/sizeof.go b/gcc/testsuite/go.test/test/sizeof.go
index 544e4c52c1..c3db1e5c3a 100644
--- a/gcc/testsuite/go.test/test/sizeof.go
+++ b/gcc/testsuite/go.test/test/sizeof.go
@@ -1,4 +1,4 @@
-// $G $D/$F.go
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -16,8 +16,143 @@ var t T
func isUintptr(uintptr) {}
+type T2 struct {
+ A int32
+ U2
+}
+
+type U2 struct {
+ B int32
+ C int32
+}
+
+var t2 T2
+var p2 *T2
+
func main() {
+ // Test unsafe.Sizeof, unsafe.Alignof, and unsafe.Offsetof all return uintptr.
isUintptr(unsafe.Sizeof(t))
isUintptr(unsafe.Alignof(t))
isUintptr(unsafe.Offsetof(t.X))
+
+ // Test correctness of Offsetof with respect to embedded fields (issue 4909).
+ if unsafe.Offsetof(t2.C) != 8 {
+ println(unsafe.Offsetof(t2.C), "!= 8")
+ panic("unsafe.Offsetof(t2.C) != 8")
+ }
+ if unsafe.Offsetof(p2.C) != 8 {
+ println(unsafe.Offsetof(p2.C), "!= 8")
+ panic("unsafe.Offsetof(p2.C) != 8")
+ }
+ if unsafe.Offsetof(t2.U2.C) != 4 {
+ println(unsafe.Offsetof(t2.U2.C), "!= 4")
+ panic("unsafe.Offsetof(t2.U2.C) != 4")
+ }
+ if unsafe.Offsetof(p2.U2.C) != 4 {
+ println(unsafe.Offsetof(p2.U2.C), "!= 4")
+ panic("unsafe.Offsetof(p2.U2.C) != 4")
+ }
+ testDeep()
+ testNotEmbedded()
+}
+
+type (
+ S1 struct {
+ A int64
+ S2
+ }
+ S2 struct {
+ B int64
+ S3
+ }
+ S3 struct {
+ C int64
+ S4
+ }
+ S4 struct {
+ D int64
+ S5
+ }
+ S5 struct {
+ E int64
+ S6
+ }
+ S6 struct {
+ F int64
+ S7
+ }
+ S7 struct {
+ G int64
+ S8
+ }
+ S8 struct {
+ H int64
+ *S1
+ }
+)
+
+func testDeep() {
+ var s1 S1
+ switch {
+ case unsafe.Offsetof(s1.A) != 0:
+ panic("unsafe.Offsetof(s1.A) != 0")
+ case unsafe.Offsetof(s1.B) != 8:
+ panic("unsafe.Offsetof(s1.B) != 8")
+ case unsafe.Offsetof(s1.C) != 16:
+ panic("unsafe.Offsetof(s1.C) != 16")
+ case unsafe.Offsetof(s1.D) != 24:
+ panic("unsafe.Offsetof(s1.D) != 24")
+ case unsafe.Offsetof(s1.E) != 32:
+ panic("unsafe.Offsetof(s1.E) != 32")
+ case unsafe.Offsetof(s1.F) != 40:
+ panic("unsafe.Offsetof(s1.F) != 40")
+ case unsafe.Offsetof(s1.G) != 48:
+ panic("unsafe.Offsetof(s1.G) != 48")
+ case unsafe.Offsetof(s1.H) != 56:
+ panic("unsafe.Offsetof(s1.H) != 56")
+ case unsafe.Offsetof(s1.S1) != 64:
+ panic("unsafe.Offsetof(s1.S1) != 64")
+ case unsafe.Offsetof(s1.S1.S2.S3.S4.S5.S6.S7.S8.S1.S2) != 8:
+ panic("unsafe.Offsetof(s1.S1.S2.S3.S4.S5.S6.S7.S8.S1.S2) != 8")
+ }
+}
+
+func testNotEmbedded() {
+ type T2 struct {
+ B int32
+ C int32
+ }
+ type T1 struct {
+ A int32
+ T2
+ }
+ type T struct {
+ Dummy int32
+ F T1
+ P *T1
+ }
+
+ var t T
+ var p *T
+ switch {
+ case unsafe.Offsetof(t.F.B) != 4:
+ panic("unsafe.Offsetof(t.F.B) != 4")
+ case unsafe.Offsetof(t.F.C) != 8:
+ panic("unsafe.Offsetof(t.F.C) != 8")
+
+ case unsafe.Offsetof(t.P.B) != 4:
+ panic("unsafe.Offsetof(t.P.B) != 4")
+ case unsafe.Offsetof(t.P.C) != 8:
+ panic("unsafe.Offsetof(t.P.C) != 8")
+
+ case unsafe.Offsetof(p.F.B) != 4:
+ panic("unsafe.Offsetof(p.F.B) != 4")
+ case unsafe.Offsetof(p.F.C) != 8:
+ panic("unsafe.Offsetof(p.F.C) != 8")
+
+ case unsafe.Offsetof(p.P.B) != 4:
+ panic("unsafe.Offsetof(p.P.B) != 4")
+ case unsafe.Offsetof(p.P.C) != 8:
+ panic("unsafe.Offsetof(p.P.C) != 8")
+ }
}
diff --git a/gcc/testsuite/go.test/test/slice3.go b/gcc/testsuite/go.test/test/slice3.go
new file mode 100644
index 0000000000..3cf34b57e7
--- /dev/null
+++ b/gcc/testsuite/go.test/test/slice3.go
@@ -0,0 +1,156 @@
+// runoutput
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Test run-time behavior of 3-index slice expressions.
+
+package main
+
+import (
+ "bufio"
+ "fmt"
+ "os"
+ "strconv"
+)
+
+var bout *bufio.Writer
+
+func main() {
+ bout = bufio.NewWriter(os.Stdout)
+
+ fmt.Fprintf(bout, "%s", programTop)
+ fmt.Fprintf(bout, "func main() {\n")
+
+ index := []string{
+ "0",
+ "1",
+ "2",
+ "3",
+ "10",
+ "20",
+ "vminus1",
+ "v0",
+ "v1",
+ "v2",
+ "v3",
+ "v10",
+ "v20",
+ }
+
+ parse := func(s string) (n int, isconst bool) {
+ if s == "vminus1" {
+ return -1, false
+ }
+ isconst = true
+ if s[0] == 'v' {
+ isconst = false
+ s = s[1:]
+ }
+ n, _ = strconv.Atoi(s)
+ return n, isconst
+ }
+
+ const Cap = 10 // cap of slice, array
+
+ for _, base := range []string{"array", "slice"} {
+ for _, i := range index {
+ iv, iconst := parse(i)
+ for _, j := range index {
+ jv, jconst := parse(j)
+ for _, k := range index {
+ kv, kconst := parse(k)
+ // Avoid errors that would make the program not compile.
+ // Those are tested by slice3err.go.
+ switch {
+ case iconst && jconst && iv > jv,
+ jconst && kconst && jv > kv,
+ iconst && kconst && iv > kv,
+ iconst && base == "array" && iv > Cap,
+ jconst && base == "array" && jv > Cap,
+ kconst && base == "array" && kv > Cap:
+ continue
+ }
+
+ expr := base + "[" + i + ":" + j + ":" + k + "]"
+ var xbase, xlen, xcap int
+ if iv > jv || jv > kv || kv > Cap || iv < 0 || jv < 0 || kv < 0 {
+ xbase, xlen, xcap = -1, -1, -1
+ } else {
+ xbase = iv
+ xlen = jv - iv
+ xcap = kv - iv
+ }
+ fmt.Fprintf(bout, "\tcheckSlice(%q, func() []byte { return %s }, %d, %d, %d)\n", expr, expr, xbase, xlen, xcap)
+ }
+ }
+ }
+ }
+
+ fmt.Fprintf(bout, "\tif !ok { os.Exit(1) }\n")
+ fmt.Fprintf(bout, "}\n")
+ bout.Flush()
+}
+
+var programTop = `
+package main
+
+import (
+ "fmt"
+ "os"
+ "unsafe"
+)
+
+var ok = true
+
+var (
+ array = new([10]byte)
+ slice = array[:]
+
+ vminus1 = -1
+ v0 = 0
+ v1 = 1
+ v2 = 2
+ v3 = 3
+ v4 = 4
+ v5 = 5
+ v10 = 10
+ v20 = 20
+)
+
+func notOK() {
+ if ok {
+ println("BUG:")
+ ok = false
+ }
+}
+
+func checkSlice(desc string, f func() []byte, xbase, xlen, xcap int) {
+ defer func() {
+ if err := recover(); err != nil {
+ if xbase >= 0 {
+ notOK()
+ println(desc, " unexpected panic: ", fmt.Sprint(err))
+ }
+ }
+ // "no panic" is checked below
+ }()
+
+ x := f()
+
+ arrayBase := uintptr(unsafe.Pointer(array))
+ raw := *(*[3]uintptr)(unsafe.Pointer(&x))
+ base, len, cap := raw[0] - arrayBase, raw[1], raw[2]
+ if xbase < 0 {
+ notOK()
+ println(desc, "=", base, len, cap, "want panic")
+ return
+ }
+ if base != uintptr(xbase) || len != uintptr(xlen) || cap != uintptr(xcap) {
+ notOK()
+ println(desc, "=", base, len, cap, "want", xbase, xlen, xcap)
+ }
+}
+
+`
diff --git a/gcc/testsuite/go.test/test/slice3err.go b/gcc/testsuite/go.test/test/slice3err.go
new file mode 100644
index 0000000000..83fb39be4c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/slice3err.go
@@ -0,0 +1,121 @@
+// errorcheck
+
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package p
+
+var array *[10]int
+var slice []int
+var str string
+var i, j, k int
+
+func f() {
+ // check what missing arguments are allowed
+ _ = array[:]
+ _ = array[i:]
+ _ = array[:j]
+ _ = array[i:j]
+ _ = array[::] // ERROR "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = array[i::] // ERROR "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = array[:j:] // ERROR "final index required in 3-index slice"
+ _ = array[i:j:] // ERROR "final index required in 3-index slice"
+ _ = array[::k] // ERROR "middle index required in 3-index slice"
+ _ = array[i::k] // ERROR "middle index required in 3-index slice"
+ _ = array[:j:k]
+ _ = array[i:j:k]
+
+ _ = slice[:]
+ _ = slice[i:]
+ _ = slice[:j]
+ _ = slice[i:j]
+ _ = slice[::] // ERROR "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = slice[i::] // ERROR "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = slice[:j:] // ERROR "final index required in 3-index slice"
+ _ = slice[i:j:] // ERROR "final index required in 3-index slice"
+ _ = slice[::k] // ERROR "middle index required in 3-index slice"
+ _ = slice[i::k] // ERROR "middle index required in 3-index slice"
+ _ = slice[:j:k]
+ _ = slice[i:j:k]
+
+ _ = str[:]
+ _ = str[i:]
+ _ = str[:j]
+ _ = str[i:j]
+ _ = str[::] // ERROR "3-index slice of string" "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = str[i::] // ERROR "3-index slice of string" "middle index required in 3-index slice" "final index required in 3-index slice"
+ _ = str[:j:] // ERROR "3-index slice of string" "final index required in 3-index slice"
+ _ = str[i:j:] // ERROR "3-index slice of string" "final index required in 3-index slice"
+ _ = str[::k] // ERROR "3-index slice of string" "middle index required in 3-index slice"
+ _ = str[i::k] // ERROR "3-index slice of string" "middle index required in 3-index slice"
+ _ = str[:j:k] // ERROR "3-index slice of string"
+ _ = str[i:j:k] // ERROR "3-index slice of string"
+
+ // check invalid indices
+ _ = array[1:2]
+ _ = array[2:1] // ERROR "invalid slice index|inverted slice"
+ _ = array[2:2]
+ _ = array[i:1]
+ _ = array[1:j]
+ _ = array[1:2:3]
+ _ = array[1:3:2] // ERROR "invalid slice index|inverted slice"
+ _ = array[2:1:3] // ERROR "invalid slice index|inverted slice"
+ _ = array[2:3:1] // ERROR "invalid slice index|inverted slice"
+ _ = array[3:1:2] // ERROR "invalid slice index|inverted slice"
+ _ = array[3:2:1] // ERROR "invalid slice index|inverted slice"
+ _ = array[i:1:2]
+ _ = array[i:2:1] // ERROR "invalid slice index|inverted slice"
+ _ = array[1:j:2]
+ _ = array[2:j:1] // ERROR "invalid slice index"
+ _ = array[1:2:k]
+ _ = array[2:1:k] // ERROR "invalid slice index|inverted slice"
+
+ _ = slice[1:2]
+ _ = slice[2:1] // ERROR "invalid slice index|inverted slice"
+ _ = slice[2:2]
+ _ = slice[i:1]
+ _ = slice[1:j]
+ _ = slice[1:2:3]
+ _ = slice[1:3:2] // ERROR "invalid slice index|inverted slice"
+ _ = slice[2:1:3] // ERROR "invalid slice index|inverted slice"
+ _ = slice[2:3:1] // ERROR "invalid slice index|inverted slice"
+ _ = slice[3:1:2] // ERROR "invalid slice index|inverted slice"
+ _ = slice[3:2:1] // ERROR "invalid slice index|inverted slice"
+ _ = slice[i:1:2]
+ _ = slice[i:2:1] // ERROR "invalid slice index|inverted slice"
+ _ = slice[1:j:2]
+ _ = slice[2:j:1] // ERROR "invalid slice index"
+ _ = slice[1:2:k]
+ _ = slice[2:1:k] // ERROR "invalid slice index|inverted slice"
+
+ _ = str[1:2]
+ _ = str[2:1] // ERROR "invalid slice index|inverted slice"
+ _ = str[2:2]
+ _ = str[i:1]
+ _ = str[1:j]
+
+ // check out of bounds indices on array
+ _ = array[11:11] // ERROR "out of bounds"
+ _ = array[11:12] // ERROR "out of bounds"
+ _ = array[11:] // ERROR "out of bounds"
+ _ = array[:11] // ERROR "out of bounds"
+ _ = array[1:11] // ERROR "out of bounds"
+ _ = array[1:11:12] // ERROR "out of bounds"
+ _ = array[1:2:11] // ERROR "out of bounds"
+ _ = array[1:11:3] // ERROR "out of bounds|invalid slice index"
+ _ = array[11:2:3] // ERROR "out of bounds|inverted slice|invalid slice index"
+ _ = array[11:12:13] // ERROR "out of bounds"
+
+ // slice bounds not checked
+ _ = slice[11:11]
+ _ = slice[11:12]
+ _ = slice[11:]
+ _ = slice[:11]
+ _ = slice[1:11]
+ _ = slice[1:11:12]
+ _ = slice[1:2:11]
+ _ = slice[1:11:3] // ERROR "invalid slice index"
+ _ = slice[11:2:3] // ERROR "invalid slice index|inverted slice"
+ _ = slice[11:12:13]
+}
diff --git a/gcc/testsuite/go.test/test/solitaire.go b/gcc/testsuite/go.test/test/solitaire.go
index 473a1d12d7..ac54cec0ac 100644
--- a/gcc/testsuite/go.test/test/solitaire.go
+++ b/gcc/testsuite/go.test/test/solitaire.go
@@ -1,9 +1,13 @@
-// $G $F.go && $L $F.$A # don't run it - produces too much output
+// build
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test general operation by solving a peg solitaire game.
+// A version of this is in the Go playground.
+// Don't run it - produces too much output.
+
// This program solves the (English) peg solitaire board game.
// See also: http://en.wikipedia.org/wiki/Peg_solitaire
diff --git a/gcc/testsuite/go.test/test/stack.go b/gcc/testsuite/go.test/test/stack.go
index 1fd57161ff..b62febd48d 100644
--- a/gcc/testsuite/go.test/test/stack.go
+++ b/gcc/testsuite/go.test/test/stack.go
@@ -1,9 +1,10 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test stack splitting code.
// Try to tickle stack splitting bugs by doing
// go, defer, and closure calls at different stack depths.
diff --git a/gcc/testsuite/go.test/test/stress/maps.go b/gcc/testsuite/go.test/test/stress/maps.go
new file mode 100644
index 0000000000..d022e19ade
--- /dev/null
+++ b/gcc/testsuite/go.test/test/stress/maps.go
@@ -0,0 +1,111 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "math/rand"
+ "runtime"
+ "sync"
+)
+
+func mapTypes() []MapType {
+ // TODO(bradfitz): bunch more map types of all different key and value types.
+ // Use reflect.MapOf and a program to generate lots of types & struct types.
+ // For now, just one:
+ return []MapType{intMapType{}}
+}
+
+type MapType interface {
+ NewMap() Map
+}
+
+type Map interface {
+ AddItem()
+ DelItem()
+ Len() int
+ GetItem()
+ RangeAll()
+}
+
+func stressMapType(mt MapType, done func()) {
+ defer done()
+ m := mt.NewMap()
+ for m.Len() < 10000 {
+ Println("map at ", m.Len())
+ if m.Len()%100 == 0 {
+ runtime.Gosched()
+ }
+ m.AddItem()
+ m.AddItem()
+ m.DelItem()
+ var wg sync.WaitGroup
+ const numGets = 10
+ wg.Add(numGets)
+ for i := 0; i < numGets; i++ {
+ go func(i int) {
+ if i&1 == 0 {
+ m.GetItem()
+ } else {
+ m.RangeAll()
+ }
+ wg.Done()
+ }(i)
+ }
+ wg.Wait()
+ }
+ for m.Len() > 0 {
+ m.DelItem()
+ }
+}
+
+type intMapType struct{}
+
+func (intMapType) NewMap() Map {
+ return make(intMap)
+}
+
+var deadcafe = []byte("\xDE\xAD\xCA\xFE")
+
+type intMap map[int][]byte
+
+func (m intMap) AddItem() {
+ s0 := len(m)
+ for len(m) == s0 {
+ key := rand.Intn(s0 + 1)
+ m[key] = make([]byte, rand.Intn(64<<10))
+ }
+}
+
+func (m intMap) DelItem() {
+ for k := range m {
+ delete(m, k)
+ return
+ }
+}
+
+func (m intMap) GetItem() {
+ key := rand.Intn(len(m))
+ if s, ok := m[key]; ok {
+ copy(s, deadcafe)
+ }
+}
+
+func (m intMap) Len() int { return len(m) }
+
+func (m intMap) RangeAll() {
+ for _ = range m {
+ }
+}
+
+func stressMaps() {
+ for {
+ var wg sync.WaitGroup
+ for _, mt := range mapTypes() {
+ wg.Add(1)
+ go stressMapType(mt, wg.Done)
+ }
+ wg.Wait()
+ }
+}
diff --git a/gcc/testsuite/go.test/test/stress/parsego.go b/gcc/testsuite/go.test/test/stress/parsego.go
new file mode 100644
index 0000000000..a781f19937
--- /dev/null
+++ b/gcc/testsuite/go.test/test/stress/parsego.go
@@ -0,0 +1,220 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+import (
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "os"
+ "path"
+ "runtime"
+ "strings"
+)
+
+func isGoFile(dir os.FileInfo) bool {
+ return !dir.IsDir() &&
+ !strings.HasPrefix(dir.Name(), ".") && // ignore .files
+ path.Ext(dir.Name()) == ".go"
+}
+
+func isPkgFile(dir os.FileInfo) bool {
+ return isGoFile(dir) &&
+ !strings.HasSuffix(dir.Name(), "_test.go") // ignore test files
+}
+
+func pkgName(filename string) string {
+ file, err := parser.ParseFile(token.NewFileSet(), filename, nil, parser.PackageClauseOnly)
+ if err != nil || file == nil {
+ return ""
+ }
+ return file.Name.Name
+}
+
+func parseDir(dirpath string) map[string]*ast.Package {
+ // the package name is the directory name within its parent.
+ // (use dirname instead of path because dirname is clean; it
+ // has no trailing '/')
+ _, pkgname := path.Split(dirpath)
+
+ // filter function to select the desired .go files
+ filter := func(d os.FileInfo) bool {
+ if isPkgFile(d) {
+ // Some directories contain main packages: Only accept
+ // files that belong to the expected package so that
+ // parser.ParsePackage doesn't return "multiple packages
+ // found" errors.
+ // Additionally, accept the special package name
+ // fakePkgName if we are looking at cmd documentation.
+ name := pkgName(dirpath + "/" + d.Name())
+ return name == pkgname
+ }
+ return false
+ }
+
+ // get package AST
+ pkgs, err := parser.ParseDir(token.NewFileSet(), dirpath, filter, parser.ParseComments)
+ if err != nil {
+ println("parse", dirpath, err.Error())
+ panic("go ParseDir fail: " + err.Error())
+ }
+ return pkgs
+}
+
+func stressParseGo() {
+ pkgroot := runtime.GOROOT() + "/src/pkg/"
+ for {
+ m := make(map[string]map[string]*ast.Package)
+ for _, pkg := range packages {
+ m[pkg] = parseDir(pkgroot + pkg)
+ Println("parsed go package", pkg)
+ }
+ }
+}
+
+// find . -type d -not -path "./exp" -not -path "./exp/*" -printf "\t\"%p\",\n" | sort | sed "s/\.\///" | grep -v testdata
+var packages = []string{
+ "archive",
+ "archive/tar",
+ "archive/zip",
+ "bufio",
+ "builtin",
+ "bytes",
+ "compress",
+ "compress/bzip2",
+ "compress/flate",
+ "compress/gzip",
+ "compress/lzw",
+ "compress/zlib",
+ "container",
+ "container/heap",
+ "container/list",
+ "container/ring",
+ "crypto",
+ "crypto/aes",
+ "crypto/cipher",
+ "crypto/des",
+ "crypto/dsa",
+ "crypto/ecdsa",
+ "crypto/elliptic",
+ "crypto/hmac",
+ "crypto/md5",
+ "crypto/rand",
+ "crypto/rc4",
+ "crypto/rsa",
+ "crypto/sha1",
+ "crypto/sha256",
+ "crypto/sha512",
+ "crypto/subtle",
+ "crypto/tls",
+ "crypto/x509",
+ "crypto/x509/pkix",
+ "database",
+ "database/sql",
+ "database/sql/driver",
+ "debug",
+ "debug/dwarf",
+ "debug/elf",
+ "debug/gosym",
+ "debug/macho",
+ "debug/pe",
+ "encoding",
+ "encoding/ascii85",
+ "encoding/asn1",
+ "encoding/base32",
+ "encoding/base64",
+ "encoding/binary",
+ "encoding/csv",
+ "encoding/gob",
+ "encoding/hex",
+ "encoding/json",
+ "encoding/pem",
+ "encoding/xml",
+ "errors",
+ "expvar",
+ "flag",
+ "fmt",
+ "go",
+ "go/ast",
+ "go/build",
+ "go/doc",
+ "go/format",
+ "go/parser",
+ "go/printer",
+ "go/scanner",
+ "go/token",
+ "hash",
+ "hash/adler32",
+ "hash/crc32",
+ "hash/crc64",
+ "hash/fnv",
+ "html",
+ "html/template",
+ "image",
+ "image/color",
+ "image/draw",
+ "image/gif",
+ "image/jpeg",
+ "image/png",
+ "index",
+ "index/suffixarray",
+ "io",
+ "io/ioutil",
+ "log",
+ "log/syslog",
+ "math",
+ "math/big",
+ "math/cmplx",
+ "math/rand",
+ "mime",
+ "mime/multipart",
+ "net",
+ "net/http",
+ "net/http/cgi",
+ "net/http/cookiejar",
+ "net/http/fcgi",
+ "net/http/httptest",
+ "net/http/httputil",
+ "net/http/pprof",
+ "net/mail",
+ "net/rpc",
+ "net/rpc/jsonrpc",
+ "net/smtp",
+ "net/textproto",
+ "net/url",
+ "os",
+ "os/exec",
+ "os/signal",
+ "os/user",
+ "path",
+ "path/filepath",
+ "reflect",
+ "regexp",
+ "regexp/syntax",
+ "runtime",
+ "runtime/cgo",
+ "runtime/debug",
+ "runtime/pprof",
+ "runtime/race",
+ "sort",
+ "strconv",
+ "strings",
+ "sync",
+ "sync/atomic",
+ "syscall",
+ "testing",
+ "testing/iotest",
+ "testing/quick",
+ "text",
+ "text/scanner",
+ "text/tabwriter",
+ "text/template",
+ "text/template/parse",
+ "time",
+ "unicode",
+ "unicode/utf16",
+ "unicode/utf8",
+ "unsafe",
+}
diff --git a/gcc/testsuite/go.test/test/stress/runstress.go b/gcc/testsuite/go.test/test/stress/runstress.go
new file mode 100644
index 0000000000..76ab2a8b4f
--- /dev/null
+++ b/gcc/testsuite/go.test/test/stress/runstress.go
@@ -0,0 +1,169 @@
+// Copyright 2013 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// The runstress tool stresses the runtime.
+//
+// It runs forever and should never fail. It tries to stress the garbage collector,
+// maps, channels, the network, and everything else provided by the runtime.
+package main
+
+import (
+ "flag"
+ "fmt"
+ "io"
+ "io/ioutil"
+ "log"
+ "math/rand"
+ "net"
+ "net/http"
+ "net/http/httptest"
+ "os/exec"
+ "strconv"
+ "time"
+)
+
+var (
+ v = flag.Bool("v", false, "verbose")
+ doMaps = flag.Bool("maps", true, "stress maps")
+ doExec = flag.Bool("exec", true, "stress exec")
+ doChan = flag.Bool("chan", true, "stress channels")
+ doNet = flag.Bool("net", true, "stress networking")
+ doParseGo = flag.Bool("parsego", true, "stress parsing Go (generates garbage)")
+)
+
+func Println(a ...interface{}) {
+ if *v {
+ log.Println(a...)
+ }
+}
+
+func dialStress(a net.Addr) {
+ for {
+ d := net.Dialer{Timeout: time.Duration(rand.Intn(1e9))}
+ c, err := d.Dial("tcp", a.String())
+ if err == nil {
+ Println("did dial")
+ go func() {
+ time.Sleep(time.Duration(rand.Intn(500)) * time.Millisecond)
+ c.Close()
+ Println("closed dial")
+ }()
+ }
+ // Don't run out of ephermeral ports too quickly:
+ time.Sleep(250 * time.Millisecond)
+ }
+}
+
+func stressNet() {
+ ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
+ size, _ := strconv.Atoi(r.FormValue("size"))
+ w.Write(make([]byte, size))
+ }))
+ go dialStress(ts.Listener.Addr())
+ for {
+ size := rand.Intn(128 << 10)
+ res, err := http.Get(fmt.Sprintf("%s/?size=%d", ts.URL, size))
+ if err != nil {
+ log.Fatalf("stressNet: http Get error: %v", err)
+ }
+ if res.StatusCode != 200 {
+ log.Fatalf("stressNet: Status code = %d", res.StatusCode)
+ }
+ n, err := io.Copy(ioutil.Discard, res.Body)
+ if err != nil {
+ log.Fatalf("stressNet: io.Copy: %v", err)
+ }
+ if n != int64(size) {
+ log.Fatalf("stressNet: copied = %d; want %d", n, size)
+ }
+ res.Body.Close()
+ Println("did http", size)
+ }
+}
+
+func doAnExec() {
+ exit := rand.Intn(2)
+ wantOutput := fmt.Sprintf("output-%d", rand.Intn(1e9))
+ cmd := exec.Command("/bin/sh", "-c", fmt.Sprintf("echo %s; exit %d", wantOutput, exit))
+ out, err := cmd.CombinedOutput()
+ if exit == 1 {
+ if err == nil {
+ log.Fatal("stressExec: unexpected exec success")
+ }
+ return
+ }
+ if err != nil {
+ log.Fatalf("stressExec: exec failure: %v: %s", err, out)
+ }
+ wantOutput += "\n"
+ if string(out) != wantOutput {
+ log.Fatalf("stressExec: exec output = %q; want %q", out, wantOutput)
+ }
+ Println("did exec")
+}
+
+func stressExec() {
+ gate := make(chan bool, 10) // max execs at once
+ for {
+ gate <- true
+ go func() {
+ doAnExec()
+ <-gate
+ }()
+ }
+}
+
+func ringf(in <-chan int, out chan<- int, donec chan bool) {
+ for {
+ var n int
+ select {
+ case <-donec:
+ return
+ case n = <-in:
+ }
+ if n == 0 {
+ close(donec)
+ return
+ }
+ out <- n - 1
+ }
+}
+
+func threadRing(bufsize int) {
+ const N = 100
+ donec := make(chan bool)
+ one := make(chan int, bufsize) // will be input to thread 1
+ var in, out chan int = nil, one
+ for i := 1; i <= N-1; i++ {
+ in, out = out, make(chan int, bufsize)
+ go ringf(in, out, donec)
+ }
+ go ringf(out, one, donec)
+ one <- N
+ <-donec
+ Println("did threadring of", bufsize)
+}
+
+func stressChannels() {
+ for {
+ threadRing(0)
+ threadRing(1)
+ }
+}
+
+func main() {
+ flag.Parse()
+ for want, f := range map[*bool]func(){
+ doMaps: stressMaps,
+ doNet: stressNet,
+ doExec: stressExec,
+ doChan: stressChannels,
+ doParseGo: stressParseGo,
+ } {
+ if *want {
+ go f()
+ }
+ }
+ select {}
+}
diff --git a/gcc/testsuite/go.test/test/string_lit.go b/gcc/testsuite/go.test/test/string_lit.go
index c702a05e91..4751b82ccf 100644
--- a/gcc/testsuite/go.test/test/string_lit.go
+++ b/gcc/testsuite/go.test/test/string_lit.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test string literal syntax.
+
package main
import "os"
@@ -31,6 +33,7 @@ func assert(a, b, c string) {
print("\ta[", i, "] = ", ac, "; b[", i, "] =", bc, "\n")
}
}
+ panic("string_lit")
}
}
@@ -91,7 +94,7 @@ func main() {
"backslashes 2 (backquote)")
assert("\\x\\u\\U\\", `\x\u\U\`, "backslash 3 (backquote)")
- // test large runes. perhaps not the most logical place for this test.
+ // test large and surrogate-half runes. perhaps not the most logical place for these tests.
var r int32
r = 0x10ffff // largest rune value
s = string(r)
@@ -99,6 +102,33 @@ func main() {
r = 0x10ffff + 1
s = string(r)
assert(s, "\xef\xbf\xbd", "too-large rune")
+ r = 0xD800
+ s = string(r)
+ assert(s, "\xef\xbf\xbd", "surrogate rune min")
+ r = 0xDFFF
+ s = string(r)
+ assert(s, "\xef\xbf\xbd", "surrogate rune max")
+ r = -1
+ s = string(r)
+ assert(s, "\xef\xbf\xbd", "negative rune")
+
+ // the large rune tests again, this time using constants instead of a variable.
+ // these conversions will be done at compile time.
+ s = string(0x10ffff) // largest rune value
+ assert(s, "\xf4\x8f\xbf\xbf", "largest rune constant")
+ s = string(0x10ffff + 1)
+ assert(s, "\xef\xbf\xbd", "too-large rune constant")
+ s = string(0xD800)
+ assert(s, "\xef\xbf\xbd", "surrogate rune min constant")
+ s = string(0xDFFF)
+ assert(s, "\xef\xbf\xbd", "surrogate rune max constant")
+ s = string(-1)
+ assert(s, "\xef\xbf\xbd", "negative rune")
+
+ // the large rune tests yet again, with a slice.
+ rs := []rune{0x10ffff, 0x10ffff + 1, 0xD800, 0xDFFF, -1}
+ s = string(rs)
+ assert(s, "\xf4\x8f\xbf\xbf\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd\xef\xbf\xbd", "large rune slice")
assert(string(gr1), gx1, "global ->[]rune")
assert(string(gr2), gx2fix, "global invalid ->[]rune")
diff --git a/gcc/testsuite/go.test/test/stringrange.go b/gcc/testsuite/go.test/test/stringrange.go
index 6a7063e239..99e5edb5a4 100644
--- a/gcc/testsuite/go.test/test/stringrange.go
+++ b/gcc/testsuite/go.test/test/stringrange.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test range over strings.
+
package main
import (
@@ -55,6 +57,13 @@ func main() {
ok = false
}
+ for _, c := range "a\xed\xa0\x80a" {
+ if c != 'a' && c != utf8.RuneError {
+ fmt.Printf("surrogate UTF-8 does not error: %U\n", c)
+ ok = false
+ }
+ }
+
if !ok {
fmt.Println("BUG: stringrange")
os.Exit(1)
diff --git a/gcc/testsuite/go.test/test/struct0.go b/gcc/testsuite/go.test/test/struct0.go
index 2398c4117d..e29eb30f54 100644
--- a/gcc/testsuite/go.test/test/struct0.go
+++ b/gcc/testsuite/go.test/test/struct0.go
@@ -1,12 +1,12 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// zero length structs.
-// used to not be evaluated.
-// issue 2232.
+// Test zero length structs.
+// Used to not be evaluated.
+// Issue 2232.
package main
diff --git a/gcc/testsuite/go.test/test/switch.go b/gcc/testsuite/go.test/test/switch.go
index bed027ce85..5e1d85bb68 100644
--- a/gcc/testsuite/go.test/test/switch.go
+++ b/gcc/testsuite/go.test/test/switch.go
@@ -1,11 +1,15 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test switch statements.
+
package main
+import "os"
+
func assert(cond bool, msg string) {
if !cond {
print("assertion fail: ", msg, "\n")
@@ -279,4 +283,121 @@ func main() {
assert(false, "m should not be nil")
default:
}
+
+ // switch on interface.
+ switch i := interface{}("hello"); i {
+ case 42:
+ assert(false, `i should be "hello"`)
+ case "hello":
+ assert(true, "hello")
+ default:
+ assert(false, `i should be "hello"`)
+ }
+
+ // switch on implicit bool converted to interface
+ // was broken: see issue 3980
+ switch i := interface{}(true); {
+ case i:
+ assert(true, "true")
+ case false:
+ assert(false, "i should be true")
+ default:
+ assert(false, "i should be true")
+ }
+
+ // switch on interface with constant cases differing by type.
+ // was rejected by compiler: see issue 4781
+ type T int
+ type B bool
+ type F float64
+ type S string
+ switch i := interface{}(float64(1.0)); i {
+ case nil:
+ assert(false, "i should be float64(1.0)")
+ case (*int)(nil):
+ assert(false, "i should be float64(1.0)")
+ case 1:
+ assert(false, "i should be float64(1.0)")
+ case T(1):
+ assert(false, "i should be float64(1.0)")
+ case F(1.0):
+ assert(false, "i should be float64(1.0)")
+ case 1.0:
+ assert(true, "true")
+ case "hello":
+ assert(false, "i should be float64(1.0)")
+ case S("hello"):
+ assert(false, "i should be float64(1.0)")
+ case true, B(false):
+ assert(false, "i should be float64(1.0)")
+ case false, B(true):
+ assert(false, "i should be float64(1.0)")
+ }
+
+ // switch on array.
+ switch ar := [3]int{1, 2, 3}; ar {
+ case [3]int{1, 2, 3}:
+ assert(true, "[1 2 3]")
+ case [3]int{4, 5, 6}:
+ assert(false, "ar should be [1 2 3]")
+ default:
+ assert(false, "ar should be [1 2 3]")
+ }
+
+ // switch on channel
+ switch c1, c2 := make(chan int), make(chan int); c1 {
+ case nil:
+ assert(false, "c1 did not match itself")
+ case c2:
+ assert(false, "c1 did not match itself")
+ case c1:
+ assert(true, "chan")
+ default:
+ assert(false, "c1 did not match itself")
+ }
+
+ // empty switch
+ switch {
+ }
+
+ // empty switch with default case.
+ fired = false
+ switch {
+ default:
+ fired = true
+ }
+ assert(fired, "fail")
+
+ // Default and fallthrough.
+ count = 0
+ switch {
+ default:
+ count++
+ fallthrough
+ case false:
+ count++
+ }
+ assert(count == 2, "fail")
+
+ // fallthrough to default, which is not at end.
+ count = 0
+ switch i5 {
+ case 5:
+ count++
+ fallthrough
+ default:
+ count++
+ case 6:
+ count++
+ }
+ assert(count == 2, "fail")
+
+ i := 0
+ switch x := 5; {
+ case i < x:
+ os.Exit(0)
+ case i == x:
+ case i > x:
+ os.Exit(1)
+ }
}
diff --git a/gcc/testsuite/go.test/test/switch1.go b/gcc/testsuite/go.test/test/switch1.go
deleted file mode 100644
index 5bd9d7c5d0..0000000000
--- a/gcc/testsuite/go.test/test/switch1.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// $G $F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-import "os"
-
-func main() {
- i := 0
- switch x := 5; {
- case i < x:
- os.Exit(0)
- case i == x:
- case i > x:
- os.Exit(1)
- }
-}
diff --git a/gcc/testsuite/go.test/test/switch3.go b/gcc/testsuite/go.test/test/switch3.go
index 6c9ebfe6d4..28705e464e 100644
--- a/gcc/testsuite/go.test/test/switch3.go
+++ b/gcc/testsuite/go.test/test/switch3.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that erroneous switch statements are detected by the compiler.
+// Does not compile.
+
package main
type I interface {
@@ -42,6 +45,17 @@ func bad() {
case f1: // ERROR "can only compare func f to nil|func can only be compared to nil"
default:
}
+
+ var ar, ar1 [4]func()
+ switch ar { // ERROR "cannot switch on"
+ case ar1:
+ default:
+ }
+
+ var st, st1 struct{ f func() }
+ switch st { // ERROR "cannot switch on"
+ case st1:
+ }
}
func good() {
diff --git a/gcc/testsuite/go.test/test/switch4.go b/gcc/testsuite/go.test/test/switch4.go
new file mode 100644
index 0000000000..f38efe68c6
--- /dev/null
+++ b/gcc/testsuite/go.test/test/switch4.go
@@ -0,0 +1,36 @@
+// errorcheck
+
+// Copyright 2011 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Verify that erroneous switch statements are detected by the compiler.
+// Does not compile.
+
+package main
+
+type I interface {
+ M()
+}
+
+func bad() {
+
+ i5 := 5
+ switch i5 {
+ case 5:
+ fallthrough // ERROR "cannot fallthrough final case in switch"
+ }
+}
+
+func good() {
+ var i interface{}
+ var s string
+
+ switch i {
+ case s:
+ }
+
+ switch s {
+ case i:
+ }
+}
diff --git a/gcc/testsuite/go.test/test/syntax/chan.go b/gcc/testsuite/go.test/test/syntax/chan.go
index ff3577502f..3b68bda35f 100644
--- a/gcc/testsuite/go.test/test/syntax/chan.go
+++ b/gcc/testsuite/go.test/test/syntax/chan.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/chan1.go b/gcc/testsuite/go.test/test/syntax/chan1.go
index 9c12e5e6fe..4860422ad8 100644
--- a/gcc/testsuite/go.test/test/syntax/chan1.go
+++ b/gcc/testsuite/go.test/test/syntax/chan1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -10,8 +10,8 @@ var c chan int
var v int
func main() {
- if c <- v { // ERROR "send statement.*value.*select"
+ if c <- v { // ERROR "used as value"
}
}
-var _ = c <- v // ERROR "send statement.*value.*select"
+var _ = c <- v // ERROR "used as value"
diff --git a/gcc/testsuite/go.test/test/syntax/composite.go b/gcc/testsuite/go.test/test/syntax/composite.go
new file mode 100644
index 0000000000..6565334935
--- /dev/null
+++ b/gcc/testsuite/go.test/test/syntax/composite.go
@@ -0,0 +1,11 @@
+// errorcheck
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+package main
+
+var a = []int{
+ 3 // ERROR "need trailing comma before newline in composite literal"
+}
diff --git a/gcc/testsuite/go.test/test/syntax/else.go b/gcc/testsuite/go.test/test/syntax/else.go
index 99595254fd..e985a9c09c 100644
--- a/gcc/testsuite/go.test/test/syntax/else.go
+++ b/gcc/testsuite/go.test/test/syntax/else.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/forvar.go b/gcc/testsuite/go.test/test/syntax/forvar.go
index f12ce55cae..dc592d2b64 100644
--- a/gcc/testsuite/go.test/test/syntax/forvar.go
+++ b/gcc/testsuite/go.test/test/syntax/forvar.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/if.go b/gcc/testsuite/go.test/test/syntax/if.go
index a3b51f0c07..b2a65f9a59 100644
--- a/gcc/testsuite/go.test/test/syntax/if.go
+++ b/gcc/testsuite/go.test/test/syntax/if.go
@@ -1,4 +1,4 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/import.go b/gcc/testsuite/go.test/test/syntax/import.go
index dd1f261344..f0a7921262 100644
--- a/gcc/testsuite/go.test/test/syntax/import.go
+++ b/gcc/testsuite/go.test/test/syntax/import.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/interface.go b/gcc/testsuite/go.test/test/syntax/interface.go
index a7f43533a2..0b76b5416f 100644
--- a/gcc/testsuite/go.test/test/syntax/interface.go
+++ b/gcc/testsuite/go.test/test/syntax/interface.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/semi1.go b/gcc/testsuite/go.test/test/syntax/semi1.go
index 547d9bf799..6e0428121f 100644
--- a/gcc/testsuite/go.test/test/syntax/semi1.go
+++ b/gcc/testsuite/go.test/test/syntax/semi1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
package main
func main() {
- if x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined"
+ if x; y // ERROR "missing .*{.* after if clause|undefined"
{
z // GCCGO_ERROR "undefined"
diff --git a/gcc/testsuite/go.test/test/syntax/semi2.go b/gcc/testsuite/go.test/test/syntax/semi2.go
index 28d1d3906d..23d7bd0ee8 100644
--- a/gcc/testsuite/go.test/test/syntax/semi2.go
+++ b/gcc/testsuite/go.test/test/syntax/semi2.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
package main
func main() {
- switch x; y // ERROR "unexpected semicolon or newline before .?{.?|undefined"
+ switch x; y // ERROR "missing .*{.* after switch clause|undefined"
{
z
diff --git a/gcc/testsuite/go.test/test/syntax/semi3.go b/gcc/testsuite/go.test/test/syntax/semi3.go
index ab5941bda5..ca070d8a57 100644
--- a/gcc/testsuite/go.test/test/syntax/semi3.go
+++ b/gcc/testsuite/go.test/test/syntax/semi3.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -7,7 +7,7 @@
package main
func main() {
- for x; y; z // ERROR "unexpected semicolon or newline before .?{.?|undefined"
+ for x; y; z // ERROR "missing .*{.* after for clause|undefined"
{
z // GCCGO_ERROR "undefined"
diff --git a/gcc/testsuite/go.test/test/syntax/semi4.go b/gcc/testsuite/go.test/test/syntax/semi4.go
index 7a9c2956e7..99c2d22561 100644
--- a/gcc/testsuite/go.test/test/syntax/semi4.go
+++ b/gcc/testsuite/go.test/test/syntax/semi4.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
@@ -8,7 +8,7 @@ package main
func main() {
for x // GCCGO_ERROR "undefined"
- { // ERROR "unexpected semicolon or newline before .?{.?"
+ { // ERROR "missing .*{.* after for clause"
z // GCCGO_ERROR "undefined"
diff --git a/gcc/testsuite/go.test/test/syntax/semi5.go b/gcc/testsuite/go.test/test/syntax/semi5.go
index 5f8ccc688f..cf690f0840 100644
--- a/gcc/testsuite/go.test/test/syntax/semi5.go
+++ b/gcc/testsuite/go.test/test/syntax/semi5.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/semi6.go b/gcc/testsuite/go.test/test/syntax/semi6.go
index b6279ed307..c1e1cc363a 100644
--- a/gcc/testsuite/go.test/test/syntax/semi6.go
+++ b/gcc/testsuite/go.test/test/syntax/semi6.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/semi7.go b/gcc/testsuite/go.test/test/syntax/semi7.go
index 5a7b3ff4cc..6c9ade8bc2 100644
--- a/gcc/testsuite/go.test/test/syntax/semi7.go
+++ b/gcc/testsuite/go.test/test/syntax/semi7.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/topexpr.go b/gcc/testsuite/go.test/test/syntax/topexpr.go
index 93d86fbe95..c5958f5dd2 100644
--- a/gcc/testsuite/go.test/test/syntax/topexpr.go
+++ b/gcc/testsuite/go.test/test/syntax/topexpr.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/typesw.go b/gcc/testsuite/go.test/test/syntax/typesw.go
index 47f683cdf2..cd8cf35236 100644
--- a/gcc/testsuite/go.test/test/syntax/typesw.go
+++ b/gcc/testsuite/go.test/test/syntax/typesw.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/vareq.go b/gcc/testsuite/go.test/test/syntax/vareq.go
index 8525be8cf5..f08955e91b 100644
--- a/gcc/testsuite/go.test/test/syntax/vareq.go
+++ b/gcc/testsuite/go.test/test/syntax/vareq.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/syntax/vareq1.go b/gcc/testsuite/go.test/test/syntax/vareq1.go
index 9d70bea39f..e900eabebe 100644
--- a/gcc/testsuite/go.test/test/syntax/vareq1.go
+++ b/gcc/testsuite/go.test/test/syntax/vareq1.go
@@ -1,4 +1,4 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
diff --git a/gcc/testsuite/go.test/test/test0.go b/gcc/testsuite/go.test/test/test0.go
deleted file mode 100644
index d8d86c4279..0000000000
--- a/gcc/testsuite/go.test/test/test0.go
+++ /dev/null
@@ -1,92 +0,0 @@
-// $G $F.go && $L $F.$A && ./$A.out
-
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package main
-
-const a_const = 0
-
-const (
- pi = /* the usual */ 3.14159265358979323
- e = 2.718281828
- mask1 int = 1 << iota
- mask2 = 1 << iota
- mask3 = 1 << iota
- mask4 = 1 << iota
-)
-
-type (
- Empty interface{}
- Point struct {
- x, y int
- }
- Point2 Point
-)
-
-func (p *Point) Initialize(x, y int) *Point {
- p.x, p.y = x, y
- return p
-}
-
-func (p *Point) Distance() int {
- return p.x*p.x + p.y*p.y
-}
-
-var (
- x1 int
- x2 int
- u, v, w float32
-)
-
-func foo() {}
-
-func min(x, y int) int {
- if x < y {
- return x
- }
- return y
-}
-
-func swap(x, y int) (u, v int) {
- u = y
- v = x
- return
-}
-
-func control_structs() {
- var p *Point = new(Point).Initialize(2, 3)
- i := p.Distance()
- var f float32 = 0.3
- _ = f
- for {
- }
- for {
- }
- for j := 0; j < i; j++ {
- if i == 0 {
- } else {
- i = 0
- }
- var x float32
- _ = x
- }
-foo: // a label
- var j int
- switch y := 0; true {
- case i < y:
- fallthrough
- case i < j:
- case i == 0, i == 1, i == j:
- i++
- i++
- goto foo
- default:
- i = -+-+i
- break
- }
-}
-
-func main() {
-}
diff --git a/gcc/testsuite/go.test/test/testlib b/gcc/testsuite/go.test/test/testlib
new file mode 100644
index 0000000000..4a17f4feb9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/testlib
@@ -0,0 +1,170 @@
+# Copyright 2012 The Go Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style
+# license that can be found in the LICENSE file.
+
+# These function names are also known to
+# (and are the plan for transitioning to) run.go.
+
+# helper (not known to run.go)
+# group file list by packages and return list of packages
+# each package is a comma-separated list of go files.
+pkgs() {
+ pkglist=$(grep -h '^package ' $* | awk '{print $2}' | sort -u)
+ for p in $pkglist
+ do
+ echo $(grep -l "^package $p\$" $*) | tr ' ' ,
+ done | sort
+}
+
+_match() {
+ case $1 in
+ *,*)
+ #echo >&2 "match comma separated $1"
+ first=$(echo $1 | sed 's/,.*//')
+ rest=$(echo $1 | sed 's/[^,]*,//')
+ if _match $first && _match $rest; then
+ return 0
+ fi
+ return 1
+ ;;
+ '!'*)
+ #echo >&2 "match negation $1"
+ neg=$(echo $1 | sed 's/^!//')
+ if _match $neg; then
+ return 1
+ fi
+ return 0
+ ;;
+ $GOARCH|$GOOS)
+ #echo >&2 "match GOARCH or GOOS $1"
+ return 0
+ ;;
+ esac
+ return 1
+}
+
+# +build aborts execution if the supplied tags don't match,
+# i.e. none of the tags (x or !x) matches GOARCH or GOOS.
++build() {
+ if (( $# == 0 )); then
+ return
+ fi
+ m=0
+ for tag; do
+ if _match $tag; then
+ m=1
+ fi
+ done
+ if [ $m = 0 ]; then
+ #echo >&2 no match
+ exit 0
+ fi
+ unset m
+}
+
+compile() {
+ $G $D/$F.go
+}
+
+compiledir() {
+ for pkg in $(pkgs $D/$F.dir/*.go)
+ do
+ $G -I . $(echo $pkg | tr , ' ') || return 1
+ done
+}
+
+errorcheckdir() {
+ lastzero=""
+ if [ "$1" = "-0" ]; then
+ lastzero="-0"
+ fi
+ pkgs=$(pkgs $D/$F.dir/*.go)
+ for pkg in $pkgs.last
+ do
+ zero="-0"
+ case $pkg in
+ *.last)
+ pkg=$(echo $pkg |sed 's/\.last$//')
+ zero=$lastzero
+ esac
+ errchk $zero $G -D . -I . -e $(echo $pkg | tr , ' ')
+ done
+}
+
+rundir() {
+ lastfile=""
+ for pkg in $(pkgs $D/$F.dir/*.go)
+ do
+ name=$(echo $pkg | sed 's/\.go.*//; s/.*\///')
+ $G -D . -I . -e $(echo $pkg | tr , ' ') || return 1
+ lastfile=$name
+ done
+ $L -o $A.out -L . $lastfile.$A
+ ./$A.out
+}
+
+rundircmpout() {
+ lastfile=""
+ for pkg in $(pkgs $D/$F.dir/*.go)
+ do
+ name=$(echo $pkg | sed 's/\.go.*//; s/.*\///')
+ $G -D . -I . -e $(echo $pkg | tr , ' ') || return 1
+ lastfile=$name
+ done
+ $L -o $A.out -L . $lastfile.$A
+ ./$A.out 2>&1 | cmp - $D/$F.out
+}
+
+build() {
+ $G $D/$F.go && $L $F.$A
+}
+
+runoutput() {
+ go run "$D/$F.go" "$@" > tmp.go
+ go run tmp.go
+}
+
+run() {
+ gofiles=""
+ ingo=true
+ while $ingo; do
+ case "$1" in
+ *.go)
+ gofiles="$gofiles $1"
+ shift
+ ;;
+ *)
+ ingo=false
+ ;;
+ esac
+ done
+
+ $G $D/$F.go $gofiles && $L $F.$A && ./$A.out "$@"
+}
+
+cmpout() {
+ $G $D/$F.go && $L $F.$A && ./$A.out 2>&1 | cmp - $D/$F.out
+}
+
+errorcheck() {
+ zero=""
+ if [ "$1" = "-0" ]; then
+ zero="-0"
+ shift
+ fi
+ errchk $zero $G -e $* $D/$F.go
+}
+
+errorcheckoutput() {
+ zero=""
+ if [ "$1" = "-0" ]; then
+ zero="-0"
+ shift
+ fi
+ go run "$D/$F.go" "$@" > tmp.go
+ errchk $zero $G -e tmp.go
+}
+
+skip() {
+ true
+}
diff --git a/gcc/testsuite/go.test/test/times.out b/gcc/testsuite/go.test/test/times.out
deleted file mode 100644
index 841fab9ef2..0000000000
--- a/gcc/testsuite/go.test/test/times.out
+++ /dev/null
@@ -1,632 +0,0 @@
-0.04 ./235
-1.72 ./64bit
-0.03 ./alias
-0.03 ./alias1
-0.30 ./append
-0.07 ./args
-0.02 ./assign
-0.04 ./assign1
-0.04 ./bigalg
-0.03 ./bigmap
-0.14 ./blank
-0.03 ./blank1
-0.03 ./chancap
-0.07 ./char_lit
-0.03 ./char_lit1
-0.09 ./closedchan
-0.05 ./closure
-0.06 ./cmp
-0.02 ./cmp6
-0.03 ./cmplx
-0.60 ./cmplxdivide
-0.00 ./cmplxdivide1
-0.04 ./complit
-0.02 ./complit1
-0.03 ./compos
-0.04 ./const
-0.03 ./const1
-0.03 ./const2
-0.13 ./const3
-0.08 ./convert
-0.03 ./convert1
-0.02 ./convert3
-0.04 ./convlit
-0.02 ./convlit1
-0.34 ./copy
-0.27 ./crlf
-0.05 ./ddd
-0.02 ./ddd1
-0.00 ./ddd2
-0.04 ./ddd3
-0.03 ./decl
-0.03 ./declbad
-0.14 ./defer
-0.03 ./deferprint
-0.14 ./divide
-0.00 ./empty
-0.08 ./env
-0.00 ./eof
-0.00 ./eof1
-0.04 ./escape
-0.12 ./escape2
-0.03 ./escape3
-0.05 ./float_lit
-0.14 ./floatcmp
-0.03 ./for
-0.04 ./func
-0.03 ./func1
-0.00 ./func2
-0.03 ./func3
-0.03 ./func4
-0.03 ./func5
-0.00 ./func6
-0.04 ./func7
-0.03 ./gc
-0.04 ./gc1
-0.26 ./gc2
-0.06 ./goprint
-0.04 ./goto
-0.04 ./hashmap
-0.03 ./helloworld
-0.03 ./if
-0.02 ./import
-0.15 ./import1
-0.00 ./import2
-0.01 ./import3
-0.14 ./import4
-1.70 ./index
-0.03 ./indirect
-0.02 ./indirect1
-0.02 ./init
-0.25 ./init1
-0.03 ./initcomma
-0.15 ./initialize
-0.02 ./initializerr
-0.06 ./initsyscall
-0.07 ./int_lit
-0.03 ./intcvt
-0.03 ./iota
-0.03 ./label
-0.03 ./label1
-0.04 ./literal
-0.15 ./malloc1
-0.06 ./mallocfin
-0.19 ./mallocrand
-0.21 ./mallocrep
-0.52 ./mallocrep1
-0.17 ./map
-0.02 ./map1
-0.05 ./method
-0.02 ./method1
-0.03 ./method2
-0.04 ./method3
-0.06 ./named
-0.03 ./named1
-0.18 ./nil
-0.15 ./nilptr
-0.16 ./nul1
-0.00 ./parentype
-0.11 ./peano
-0.02 ./printbig
-0.05 ./range
-0.04 ./recover
-0.04 ./recover1
-0.08 ./recover2
-0.06 ./recover3
-0.14 ./rename
-0.02 ./rename1
-0.16 ./reorder
-0.00 ./rune
-0.03 ./runtime
-0.03 ./shift1
-0.01 ./shift2
-0.03 ./sieve
-0.06 ./sigchld
-0.03 ./simassign
-0.02 ./sinit
-0.00 ./sizeof
-0.03 ./solitaire
-0.06 ./stack
-0.08 ./string_lit
-0.14 ./stringrange
-0.04 ./struct0
-0.04 ./switch
-0.08 ./switch1
-0.02 ./switch3
-0.04 ./test0
-0.03 ./turing
-0.07 ./typeswitch
-0.15 ./typeswitch1
-0.02 ./typeswitch2
-0.03 ./typeswitch3
-0.02 ./undef
-0.04 ./utf
-0.03 ./varerr
-0.03 ./varinit
-0.26 ./zerodivide
-0.04 ken/array
-0.11 ken/chan
-0.04 ken/chan1
-0.04 ken/complit
-0.07 ken/convert
-0.03 ken/cplx0
-0.02 ken/cplx1
-0.06 ken/cplx2
-0.09 ken/cplx3
-0.14 ken/cplx4
-0.03 ken/cplx5
-0.31 ken/divconst
-0.05 ken/divmod
-0.04 ken/embed
-0.03 ken/for
-0.04 ken/interbasic
-0.03 ken/interfun
-0.04 ken/intervar
-0.03 ken/label
-0.03 ken/litfun
-0.03 ken/mfunc
-0.34 ken/modconst
-0.03 ken/ptrfun
-0.03 ken/ptrvar
-0.04 ken/range
-0.03 ken/rob1
-0.18 ken/rob2
-0.04 ken/robfor
-0.04 ken/robfunc
-0.03 ken/shift
-0.03 ken/simparray
-0.04 ken/simpbool
-0.03 ken/simpconv
-0.03 ken/simpfun
-0.03 ken/simpswitch
-0.03 ken/simpvar
-0.02 ken/slicearray
-0.03 ken/sliceslice
-0.03 ken/string
-0.03 ken/strvar
-0.32 chan/doubleselect
-0.06 chan/fifo
-0.12 chan/goroutines
-0.07 chan/nonblock
-0.02 chan/perm
-0.10 chan/powser1
-0.09 chan/powser2
-0.03 chan/select
-0.15 chan/select2
-0.97 chan/select3
-0.03 chan/select4
-0.72 chan/select5
-0.03 chan/select6
-0.04 chan/select7
-0.03 chan/sendstmt
-0.03 chan/sieve1
-0.04 chan/sieve2
-0.02 chan/zerosize
-0.04 interface/bigdata
-0.04 interface/convert
-0.03 interface/convert1
-0.03 interface/convert2
-0.09 interface/embed
-0.00 interface/embed0
-0.03 interface/embed1
-0.02 interface/embed2
-0.02 interface/explicit
-0.03 interface/fail
-0.09 interface/fake
-0.03 interface/noeq
-0.03 interface/pointer
-0.03 interface/private
-0.00 interface/private1
-0.04 interface/receiver
-0.03 interface/receiver1
-0.00 interface/recursive
-0.03 interface/returntype
-0.09 interface/struct
-0.02 syntax/chan
-0.03 syntax/chan1
-0.02 syntax/else
-0.02 syntax/forvar
-0.03 syntax/if
-0.03 syntax/import
-0.03 syntax/interface
-0.03 syntax/semi1
-0.02 syntax/semi2
-0.03 syntax/semi3
-0.03 syntax/semi4
-0.02 syntax/semi5
-0.03 syntax/semi6
-0.02 syntax/semi7
-0.02 syntax/topexpr
-0.03 syntax/typesw
-0.02 syntax/vareq
-0.03 syntax/vareq1
-0.04 dwarf/linedirectives
-0.05 dwarf/main
-0.00 dwarf/z1
-0.00 dwarf/z10
-0.00 dwarf/z11
-0.00 dwarf/z12
-0.00 dwarf/z13
-0.00 dwarf/z14
-0.00 dwarf/z15
-0.00 dwarf/z16
-0.00 dwarf/z17
-0.00 dwarf/z18
-0.00 dwarf/z19
-0.00 dwarf/z2
-0.00 dwarf/z20
-0.00 dwarf/z3
-0.00 dwarf/z4
-0.00 dwarf/z5
-0.00 dwarf/z6
-0.00 dwarf/z7
-0.00 dwarf/z8
-0.00 dwarf/z9
-0.03 fixedbugs/bug000
-0.03 fixedbugs/bug002
-0.03 fixedbugs/bug003
-0.03 fixedbugs/bug004
-0.04 fixedbugs/bug005
-0.08 fixedbugs/bug006
-0.03 fixedbugs/bug007
-0.03 fixedbugs/bug008
-0.02 fixedbugs/bug009
-0.03 fixedbugs/bug010
-0.03 fixedbugs/bug011
-0.03 fixedbugs/bug012
-0.03 fixedbugs/bug013
-0.03 fixedbugs/bug014
-0.02 fixedbugs/bug015
-0.02 fixedbugs/bug016
-0.03 fixedbugs/bug017
-0.00 fixedbugs/bug020
-0.03 fixedbugs/bug021
-0.02 fixedbugs/bug022
-0.03 fixedbugs/bug023
-0.03 fixedbugs/bug024
-0.03 fixedbugs/bug026
-0.14 fixedbugs/bug027
-0.03 fixedbugs/bug028
-0.02 fixedbugs/bug030
-0.03 fixedbugs/bug031
-0.02 fixedbugs/bug035
-0.00 fixedbugs/bug036
-0.02 fixedbugs/bug037
-0.00 fixedbugs/bug038
-0.03 fixedbugs/bug039
-0.00 fixedbugs/bug040
-0.03 fixedbugs/bug045
-0.03 fixedbugs/bug046
-0.03 fixedbugs/bug047
-0.02 fixedbugs/bug048
-0.03 fixedbugs/bug049
-0.03 fixedbugs/bug050
-0.02 fixedbugs/bug051
-0.03 fixedbugs/bug052
-0.03 fixedbugs/bug053
-0.03 fixedbugs/bug054
-0.03 fixedbugs/bug055
-0.03 fixedbugs/bug056
-0.00 fixedbugs/bug057
-0.04 fixedbugs/bug058
-0.08 fixedbugs/bug059
-0.08 fixedbugs/bug060
-0.03 fixedbugs/bug061
-0.03 fixedbugs/bug062
-0.00 fixedbugs/bug063
-0.00 fixedbugs/bug064
-0.03 fixedbugs/bug065
-0.00 fixedbugs/bug066
-0.03 fixedbugs/bug067
-0.03 fixedbugs/bug068
-0.00 fixedbugs/bug069
-0.15 fixedbugs/bug070
-0.00 fixedbugs/bug071
-0.03 fixedbugs/bug072
-0.03 fixedbugs/bug073
-0.03 fixedbugs/bug074
-0.03 fixedbugs/bug075
-0.03 fixedbugs/bug076
-0.00 fixedbugs/bug077
-0.03 fixedbugs/bug078
-0.00 fixedbugs/bug080
-0.02 fixedbugs/bug081
-0.03 fixedbugs/bug082
-0.03 fixedbugs/bug083
-0.04 fixedbugs/bug084
-0.02 fixedbugs/bug085
-0.03 fixedbugs/bug086
-0.00 fixedbugs/bug087
-0.01 fixedbugs/bug088
-0.00 fixedbugs/bug089
-0.03 fixedbugs/bug090
-0.02 fixedbugs/bug091
-0.03 fixedbugs/bug092
-0.03 fixedbugs/bug093
-0.00 fixedbugs/bug094
-0.00 fixedbugs/bug096
-0.03 fixedbugs/bug097
-0.00 fixedbugs/bug098
-0.03 fixedbugs/bug099
-0.03 fixedbugs/bug101
-0.03 fixedbugs/bug102
-0.02 fixedbugs/bug103
-0.03 fixedbugs/bug104
-0.01 fixedbugs/bug106
-0.03 fixedbugs/bug107
-0.03 fixedbugs/bug108
-0.00 fixedbugs/bug109
-0.03 fixedbugs/bug110
-0.03 fixedbugs/bug111
-0.00 fixedbugs/bug112
-0.03 fixedbugs/bug113
-0.03 fixedbugs/bug114
-0.00 fixedbugs/bug115
-0.03 fixedbugs/bug116
-0.02 fixedbugs/bug117
-0.00 fixedbugs/bug118
-0.03 fixedbugs/bug119
-0.11 fixedbugs/bug120
-0.02 fixedbugs/bug121
-0.03 fixedbugs/bug122
-0.03 fixedbugs/bug123
-0.02 fixedbugs/bug126
-0.02 fixedbugs/bug127
-0.03 fixedbugs/bug128
-0.01 fixedbugs/bug129
-0.08 fixedbugs/bug130
-0.02 fixedbugs/bug131
-0.02 fixedbugs/bug132
-0.03 fixedbugs/bug133
-0.00 fixedbugs/bug135
-0.02 fixedbugs/bug136
-0.00 fixedbugs/bug137
-0.00 fixedbugs/bug139
-0.00 fixedbugs/bug140
-0.07 fixedbugs/bug141
-0.03 fixedbugs/bug142
-0.00 fixedbugs/bug143
-0.00 fixedbugs/bug144
-0.00 fixedbugs/bug145
-0.03 fixedbugs/bug146
-0.06 fixedbugs/bug147
-0.03 fixedbugs/bug148
-0.00 fixedbugs/bug149
-0.00 fixedbugs/bug150
-0.00 fixedbugs/bug151
-0.03 fixedbugs/bug1515
-0.03 fixedbugs/bug152
-0.14 fixedbugs/bug154
-0.03 fixedbugs/bug155
-0.00 fixedbugs/bug156
-0.00 fixedbugs/bug157
-0.00 fixedbugs/bug158
-0.07 fixedbugs/bug159
-0.09 fixedbugs/bug160
-0.00 fixedbugs/bug161
-0.02 fixedbugs/bug163
-0.00 fixedbugs/bug164
-0.03 fixedbugs/bug165
-0.03 fixedbugs/bug167
-0.03 fixedbugs/bug168
-0.02 fixedbugs/bug169
-0.03 fixedbugs/bug170
-0.03 fixedbugs/bug171
-0.02 fixedbugs/bug172
-0.00 fixedbugs/bug173
-0.00 fixedbugs/bug174
-0.03 fixedbugs/bug175
-0.03 fixedbugs/bug176
-0.09 fixedbugs/bug177
-0.03 fixedbugs/bug178
-0.03 fixedbugs/bug179
-0.03 fixedbugs/bug180
-0.03 fixedbugs/bug181
-0.02 fixedbugs/bug182
-0.03 fixedbugs/bug183
-0.15 fixedbugs/bug184
-0.04 fixedbugs/bug185
-0.02 fixedbugs/bug186
-0.08 fixedbugs/bug187
-0.03 fixedbugs/bug188
-0.03 fixedbugs/bug189
-0.00 fixedbugs/bug190
-0.04 fixedbugs/bug191
-0.03 fixedbugs/bug192
-0.03 fixedbugs/bug193
-0.03 fixedbugs/bug194
-0.02 fixedbugs/bug195
-0.04 fixedbugs/bug196
-0.02 fixedbugs/bug197
-0.03 fixedbugs/bug198
-0.03 fixedbugs/bug199
-0.03 fixedbugs/bug200
-0.03 fixedbugs/bug201
-0.03 fixedbugs/bug202
-0.03 fixedbugs/bug203
-0.03 fixedbugs/bug204
-0.02 fixedbugs/bug205
-0.21 fixedbugs/bug206
-0.14 fixedbugs/bug207
-0.02 fixedbugs/bug208
-0.02 fixedbugs/bug209
-0.03 fixedbugs/bug211
-0.03 fixedbugs/bug212
-0.03 fixedbugs/bug213
-0.00 fixedbugs/bug214
-0.02 fixedbugs/bug215
-0.00 fixedbugs/bug216
-0.03 fixedbugs/bug217
-0.00 fixedbugs/bug218
-0.00 fixedbugs/bug219
-0.04 fixedbugs/bug221
-0.01 fixedbugs/bug222
-0.00 fixedbugs/bug223
-0.03 fixedbugs/bug224
-0.03 fixedbugs/bug225
-0.03 fixedbugs/bug227
-0.03 fixedbugs/bug228
-0.03 fixedbugs/bug229
-0.03 fixedbugs/bug230
-0.02 fixedbugs/bug231
-0.00 fixedbugs/bug232
-0.01 fixedbugs/bug233
-0.04 fixedbugs/bug234
-0.00 fixedbugs/bug235
-0.04 fixedbugs/bug236
-0.15 fixedbugs/bug237
-0.03 fixedbugs/bug238
-0.00 fixedbugs/bug239
-0.03 fixedbugs/bug240
-0.03 fixedbugs/bug241
-0.04 fixedbugs/bug242
-0.04 fixedbugs/bug243
-0.03 fixedbugs/bug244
-0.00 fixedbugs/bug245
-0.03 fixedbugs/bug246
-0.03 fixedbugs/bug247
-0.11 fixedbugs/bug248
-0.03 fixedbugs/bug249
-0.00 fixedbugs/bug250
-0.03 fixedbugs/bug251
-0.03 fixedbugs/bug252
-0.03 fixedbugs/bug253
-0.03 fixedbugs/bug254
-0.03 fixedbugs/bug255
-0.03 fixedbugs/bug256
-0.47 fixedbugs/bug257
-0.14 fixedbugs/bug258
-0.16 fixedbugs/bug259
-0.16 fixedbugs/bug260
-0.03 fixedbugs/bug261
-0.10 fixedbugs/bug262
-0.03 fixedbugs/bug263
-0.03 fixedbugs/bug264
-0.07 fixedbugs/bug265
-0.03 fixedbugs/bug266
-0.00 fixedbugs/bug267
-0.03 fixedbugs/bug269
-0.13 fixedbugs/bug271
-0.02 fixedbugs/bug272
-0.04 fixedbugs/bug273
-0.02 fixedbugs/bug274
-0.00 fixedbugs/bug275
-0.03 fixedbugs/bug276
-0.00 fixedbugs/bug277
-0.03 fixedbugs/bug278
-0.04 fixedbugs/bug279
-0.02 fixedbugs/bug280
-0.04 fixedbugs/bug281
-0.00 fixedbugs/bug282
-0.00 fixedbugs/bug283
-0.03 fixedbugs/bug284
-0.05 fixedbugs/bug285
-0.04 fixedbugs/bug286
-0.02 fixedbugs/bug287
-0.00 fixedbugs/bug288
-0.02 fixedbugs/bug289
-0.04 fixedbugs/bug290
-0.04 fixedbugs/bug291
-0.03 fixedbugs/bug292
-0.04 fixedbugs/bug293
-0.03 fixedbugs/bug294
-0.16 fixedbugs/bug295
-0.04 fixedbugs/bug296
-0.03 fixedbugs/bug297
-0.03 fixedbugs/bug298
-0.03 fixedbugs/bug299
-0.03 fixedbugs/bug300
-0.00 fixedbugs/bug301
-0.04 fixedbugs/bug302
-0.05 fixedbugs/bug303
-0.00 fixedbugs/bug304
-0.03 fixedbugs/bug305
-0.01 fixedbugs/bug306
-0.00 fixedbugs/bug307
-0.01 fixedbugs/bug308
-0.00 fixedbugs/bug309
-0.04 fixedbugs/bug311
-0.03 fixedbugs/bug312
-0.04 fixedbugs/bug313
-0.04 fixedbugs/bug314
-0.00 fixedbugs/bug315
-0.00 fixedbugs/bug316
-0.03 fixedbugs/bug317
-0.03 fixedbugs/bug318
-0.00 fixedbugs/bug319
-0.03 fixedbugs/bug320
-0.14 fixedbugs/bug321
-0.04 fixedbugs/bug322
-0.03 fixedbugs/bug323
-0.04 fixedbugs/bug324
-0.03 fixedbugs/bug325
-0.02 fixedbugs/bug326
-0.04 fixedbugs/bug327
-0.03 fixedbugs/bug328
-0.04 fixedbugs/bug329
-0.02 fixedbugs/bug330
-0.04 fixedbugs/bug331
-0.02 fixedbugs/bug332
-0.03 fixedbugs/bug333
-0.01 fixedbugs/bug334
-0.01 fixedbugs/bug335
-0.04 fixedbugs/bug336
-0.03 fixedbugs/bug337
-0.00 fixedbugs/bug338
-0.03 fixedbugs/bug339
-0.02 fixedbugs/bug340
-0.03 fixedbugs/bug341
-0.02 fixedbugs/bug342
-0.04 fixedbugs/bug343
-0.02 fixedbugs/bug344
-0.03 fixedbugs/bug345
-0.08 fixedbugs/bug346
-0.04 fixedbugs/bug347
-0.06 fixedbugs/bug348
-0.03 fixedbugs/bug349
-0.03 fixedbugs/bug350
-0.02 fixedbugs/bug351
-0.03 fixedbugs/bug352
-0.03 fixedbugs/bug353
-0.00 fixedbugs/bug354
-0.03 fixedbugs/bug355
-0.03 fixedbugs/bug356
-0.02 fixedbugs/bug357
-0.04 fixedbugs/bug358
-0.00 fixedbugs/bug361
-0.03 fixedbugs/bug362
-0.03 fixedbugs/bug363
-0.15 fixedbugs/bug364
-0.02 fixedbugs/bug365
-0.03 fixedbugs/bug366
-0.03 fixedbugs/bug367
-0.03 fixedbugs/bug368
-0.51 fixedbugs/bug369
-0.03 fixedbugs/bug370
-0.02 fixedbugs/bug371
-0.03 fixedbugs/bug372
-0.03 fixedbugs/bug373
-0.03 fixedbugs/bug374
-0.03 fixedbugs/bug375
-0.03 fixedbugs/bug376
-0.01 fixedbugs/bug377
-0.03 fixedbugs/bug378
-0.02 fixedbugs/bug379
-0.00 fixedbugs/bug380
-0.03 fixedbugs/bug381
-0.01 fixedbugs/bug382
-0.03 fixedbugs/bug383
-0.03 fixedbugs/bug384
-0.00 fixedbugs/bug385_32
-0.03 fixedbugs/bug385_64
-0.03 fixedbugs/bug386
-0.01 fixedbugs/bug387
-0.02 fixedbugs/bug388
-0.03 fixedbugs/bug389
-0.03 fixedbugs/bug390
-0.00 fixedbugs/bug391
-0.01 fixedbugs/bug392
-0.00 fixedbugs/bug393
-0.03 fixedbugs/bug394
-0.00 fixedbugs/bug395
-0.01 fixedbugs/bug396
diff --git a/gcc/testsuite/go.test/test/torture.go b/gcc/testsuite/go.test/test/torture.go
new file mode 100644
index 0000000000..bbf6d347d9
--- /dev/null
+++ b/gcc/testsuite/go.test/test/torture.go
@@ -0,0 +1,339 @@
+// compile
+
+// Copyright 2012 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+// Various tests for expressions with high complexity.
+
+package main
+
+// Concatenate 16 4-bit integers into a 64-bit number.
+func concat(s *[16]byte) uint64 {
+ r := (((((((((((((((uint64(s[0])<<4|
+ uint64(s[1]))<<4|
+ uint64(s[2]))<<4|
+ uint64(s[3]))<<4|
+ uint64(s[4]))<<4|
+ uint64(s[5]))<<4|
+ uint64(s[6]))<<4|
+ uint64(s[7]))<<4|
+ uint64(s[8]))<<4|
+ uint64(s[9]))<<4|
+ uint64(s[10]))<<4|
+ uint64(s[11]))<<4|
+ uint64(s[12]))<<4|
+ uint64(s[13]))<<4|
+ uint64(s[14]))<<4 |
+ uint64(s[15]))
+ return r
+}
+
+// Compute the determinant of a 4x4-matrix by the sum
+// over all index permutations.
+func determinant(m [4][4]float64) float64 {
+ return m[0][0]*m[1][1]*m[2][2]*m[3][3] -
+ m[0][0]*m[1][1]*m[2][3]*m[3][2] -
+ m[0][0]*m[1][2]*m[2][1]*m[3][3] +
+ m[0][0]*m[1][2]*m[2][3]*m[3][1] +
+ m[0][0]*m[1][3]*m[2][1]*m[3][2] -
+ m[0][0]*m[1][3]*m[2][2]*m[3][1] -
+ m[0][1]*m[1][0]*m[2][2]*m[3][3] +
+ m[0][1]*m[1][0]*m[2][3]*m[3][2] +
+ m[0][1]*m[1][2]*m[2][0]*m[3][3] -
+ m[0][1]*m[1][2]*m[2][3]*m[3][0] -
+ m[0][1]*m[1][3]*m[2][0]*m[3][2] +
+ m[0][1]*m[1][3]*m[2][2]*m[3][0] +
+ m[0][2]*m[1][0]*m[2][1]*m[3][3] -
+ m[0][2]*m[1][0]*m[2][3]*m[3][1] -
+ m[0][2]*m[1][1]*m[2][0]*m[3][3] +
+ m[0][2]*m[1][1]*m[2][3]*m[3][0] +
+ m[0][2]*m[1][3]*m[2][0]*m[3][1] -
+ m[0][2]*m[1][3]*m[2][1]*m[3][0] -
+ m[0][3]*m[1][0]*m[2][1]*m[3][2] +
+ m[0][3]*m[1][0]*m[2][2]*m[3][1] +
+ m[0][3]*m[1][1]*m[2][0]*m[3][2] -
+ m[0][3]*m[1][1]*m[2][2]*m[3][0] -
+ m[0][3]*m[1][2]*m[2][0]*m[3][1] +
+ m[0][3]*m[1][2]*m[2][1]*m[3][0]
+}
+
+// Compute the determinant of a 4x4-matrix by the sum
+// over all index permutations.
+func determinantInt(m [4][4]int) int {
+ return m[0][0]*m[1][1]*m[2][2]*m[3][3] -
+ m[0][0]*m[1][1]*m[2][3]*m[3][2] -
+ m[0][0]*m[1][2]*m[2][1]*m[3][3] +
+ m[0][0]*m[1][2]*m[2][3]*m[3][1] +
+ m[0][0]*m[1][3]*m[2][1]*m[3][2] -
+ m[0][0]*m[1][3]*m[2][2]*m[3][1] -
+ m[0][1]*m[1][0]*m[2][2]*m[3][3] +
+ m[0][1]*m[1][0]*m[2][3]*m[3][2] +
+ m[0][1]*m[1][2]*m[2][0]*m[3][3] -
+ m[0][1]*m[1][2]*m[2][3]*m[3][0] -
+ m[0][1]*m[1][3]*m[2][0]*m[3][2] +
+ m[0][1]*m[1][3]*m[2][2]*m[3][0] +
+ m[0][2]*m[1][0]*m[2][1]*m[3][3] -
+ m[0][2]*m[1][0]*m[2][3]*m[3][1] -
+ m[0][2]*m[1][1]*m[2][0]*m[3][3] +
+ m[0][2]*m[1][1]*m[2][3]*m[3][0] +
+ m[0][2]*m[1][3]*m[2][0]*m[3][1] -
+ m[0][2]*m[1][3]*m[2][1]*m[3][0] -
+ m[0][3]*m[1][0]*m[2][1]*m[3][2] +
+ m[0][3]*m[1][0]*m[2][2]*m[3][1] +
+ m[0][3]*m[1][1]*m[2][0]*m[3][2] -
+ m[0][3]*m[1][1]*m[2][2]*m[3][0] -
+ m[0][3]*m[1][2]*m[2][0]*m[3][1] +
+ m[0][3]*m[1][2]*m[2][1]*m[3][0]
+}
+
+// Compute the determinant of a 4x4-matrix by the sum
+// over all index permutations.
+func determinantByte(m [4][4]byte) byte {
+ return m[0][0]*m[1][1]*m[2][2]*m[3][3] -
+ m[0][0]*m[1][1]*m[2][3]*m[3][2] -
+ m[0][0]*m[1][2]*m[2][1]*m[3][3] +
+ m[0][0]*m[1][2]*m[2][3]*m[3][1] +
+ m[0][0]*m[1][3]*m[2][1]*m[3][2] -
+ m[0][0]*m[1][3]*m[2][2]*m[3][1] -
+ m[0][1]*m[1][0]*m[2][2]*m[3][3] +
+ m[0][1]*m[1][0]*m[2][3]*m[3][2] +
+ m[0][1]*m[1][2]*m[2][0]*m[3][3] -
+ m[0][1]*m[1][2]*m[2][3]*m[3][0] -
+ m[0][1]*m[1][3]*m[2][0]*m[3][2] +
+ m[0][1]*m[1][3]*m[2][2]*m[3][0] +
+ m[0][2]*m[1][0]*m[2][1]*m[3][3] -
+ m[0][2]*m[1][0]*m[2][3]*m[3][1] -
+ m[0][2]*m[1][1]*m[2][0]*m[3][3] +
+ m[0][2]*m[1][1]*m[2][3]*m[3][0] +
+ m[0][2]*m[1][3]*m[2][0]*m[3][1] -
+ m[0][2]*m[1][3]*m[2][1]*m[3][0] -
+ m[0][3]*m[1][0]*m[2][1]*m[3][2] +
+ m[0][3]*m[1][0]*m[2][2]*m[3][1] +
+ m[0][3]*m[1][1]*m[2][0]*m[3][2] -
+ m[0][3]*m[1][1]*m[2][2]*m[3][0] -
+ m[0][3]*m[1][2]*m[2][0]*m[3][1] +
+ m[0][3]*m[1][2]*m[2][1]*m[3][0]
+}
+
+type A []A
+
+// A sequence of constant indexings.
+func IndexChain1(s A) A {
+ return s[0][0][0][0][0][0][0][0][0][0][0][0][0][0][0][0]
+}
+
+// A sequence of non-constant indexings.
+func IndexChain2(s A, i int) A {
+ return s[i][i][i][i][i][i][i][i][i][i][i][i][i][i][i][i]
+}
+
+// Another sequence of indexings.
+func IndexChain3(s []int) int {
+ return s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[s[0]]]]]]]]]]]]]]]]]]]]]
+}
+
+// A right-leaning tree of byte multiplications.
+func righttree(a, b, c, d uint8) uint8 {
+ return a * (b * (c * (d *
+ (a * (b * (c * (d *
+ (a * (b * (c * (d *
+ (a * (b * (c * (d *
+ (a * (b * (c * (d *
+ a * (b * (c * d)))))))))))))))))))))
+
+}
+
+// A left-leaning tree of byte multiplications.
+func lefttree(a, b, c, d uint8) uint8 {
+ return ((((((((((((((((((a * b) * c) * d *
+ a) * b) * c) * d *
+ a) * b) * c) * d *
+ a) * b) * c) * d *
+ a) * b) * c) * d *
+ a) * b) * c) * d)
+}
+
+type T struct {
+ Next I
+}
+
+type I interface{}
+
+// A chains of type assertions.
+func ChainT(t *T) *T {
+ return t.
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T).
+ Next.(*T)
+}
+
+type U struct {
+ Children []J
+}
+
+func (u *U) Child(n int) J { return u.Children[n] }
+
+type J interface {
+ Child(n int) J
+}
+
+func ChainUAssert(u *U) *U {
+ return u.Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U).
+ Child(0).(*U)
+}
+
+func ChainUNoAssert(u *U) *U {
+ return u.Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).
+ Child(0).(*U)
+}
+
+// Type assertions and slice indexing. See issue 4207.
+func ChainAssertIndex(u *U) J {
+ return u.
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0].(*U).
+ Children[0]
+}
+
+type UArr struct {
+ Children [2]J
+}
+
+func (u *UArr) Child(n int) J { return u.Children[n] }
+
+func ChainAssertArrayIndex(u *UArr) J {
+ return u.
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0].(*UArr).
+ Children[0]
+}
+
+type UArrPtr struct {
+ Children *[2]J
+}
+
+func (u *UArrPtr) Child(n int) J { return u.Children[n] }
+
+func ChainAssertArrayptrIndex(u *UArrPtr) J {
+ return u.
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0].(*UArrPtr).
+ Children[0]
+}
+
+// Chains of divisions. See issue 4201.
+
+func ChainDiv(a, b int) int {
+ return a / b / a / b / a / b / a / b /
+ a / b / a / b / a / b / a / b /
+ a / b / a / b / a / b / a / b
+}
+
+func ChainDivRight(a, b int) int {
+ return a / (b / (a / (b /
+ (a / (b / (a / (b /
+ (a / (b / (a / (b /
+ (a / (b / (a / (b /
+ (a / (b / (a / b))))))))))))))))))
+}
+
+func ChainDivConst(a int) int {
+ return a / 17 / 17 / 17 /
+ 17 / 17 / 17 / 17 /
+ 17 / 17 / 17 / 17
+}
+
+func ChainMulBytes(a, b, c byte) byte {
+ return a*(a*(a*(a*(a*(a*(a*(a*(a*b+c)+c)+c)+c)+c)+c)+c)+c) + c
+}
diff --git a/gcc/testsuite/go.test/test/turing.go b/gcc/testsuite/go.test/test/turing.go
index 366982e67f..acbe85b646 100644
--- a/gcc/testsuite/go.test/test/turing.go
+++ b/gcc/testsuite/go.test/test/turing.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simulating a Turing machine, sort of.
+
package main
// brainfuck
diff --git a/gcc/testsuite/go.test/test/typecheck.go b/gcc/testsuite/go.test/test/typecheck.go
new file mode 100644
index 0000000000..a2ad91ff4c
--- /dev/null
+++ b/gcc/testsuite/go.test/test/typecheck.go
@@ -0,0 +1,18 @@
+// errorcheck
+
+// Verify that the Go compiler will not
+// die after running into an undefined
+// type in the argument list for a
+// function.
+// Does not compile.
+
+package main
+
+func mine(int b) int { // ERROR "undefined.*b"
+ return b + 2 // ERROR "undefined.*b"
+}
+
+func main() {
+ mine() // GCCGO_ERROR "not enough arguments"
+ c = mine() // ERROR "undefined.*c|not enough arguments" "cannot assign to c"
+}
diff --git a/gcc/testsuite/go.test/test/typeswitch.go b/gcc/testsuite/go.test/test/typeswitch.go
index aa911f9b62..30a4b4975f 100644
--- a/gcc/testsuite/go.test/test/typeswitch.go
+++ b/gcc/testsuite/go.test/test/typeswitch.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple type switches, including chans, maps etc.
+
package main
import "os"
diff --git a/gcc/testsuite/go.test/test/typeswitch1.go b/gcc/testsuite/go.test/test/typeswitch1.go
index 9613b166f1..a980ce4c07 100644
--- a/gcc/testsuite/go.test/test/typeswitch1.go
+++ b/gcc/testsuite/go.test/test/typeswitch1.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test simple type switches on basic types.
+
package main
import "fmt"
diff --git a/gcc/testsuite/go.test/test/typeswitch2.go b/gcc/testsuite/go.test/test/typeswitch2.go
index 3e3acdae37..6c703076a6 100644
--- a/gcc/testsuite/go.test/test/typeswitch2.go
+++ b/gcc/testsuite/go.test/test/typeswitch2.go
@@ -1,9 +1,12 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that various erroneous type switches are caught be the compiler.
+// Does not compile.
+
package main
import "io"
diff --git a/gcc/testsuite/go.test/test/typeswitch3.go b/gcc/testsuite/go.test/test/typeswitch3.go
index 99d08a20f7..287e32e71e 100644
--- a/gcc/testsuite/go.test/test/typeswitch3.go
+++ b/gcc/testsuite/go.test/test/typeswitch3.go
@@ -1,20 +1,43 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that erroneous type switches are caught be the compiler.
+// Issue 2700, among other things.
+// Does not compile.
+
package main
+import (
+ "io"
+)
type I interface {
- M()
+ M()
}
func main(){
- var x I
- switch x.(type) {
- case string: // ERROR "impossible"
- println("FAIL")
- }
+ var x I
+ switch x.(type) {
+ case string: // ERROR "impossible"
+ println("FAIL")
+ }
+
+ // Issue 2700: if the case type is an interface, nothing is impossible
+
+ var r io.Reader
+
+ _, _ = r.(io.Writer)
+
+ switch r.(type) {
+ case io.Writer:
+ }
+
+ // Issue 2827.
+ switch _ := r.(type) { // ERROR "invalid variable name _|no new variables"
+ }
}
+
+
diff --git a/gcc/testsuite/go.test/test/undef.go b/gcc/testsuite/go.test/test/undef.go
index 7ef07882aa..0a77e59370 100644
--- a/gcc/testsuite/go.test/test/undef.go
+++ b/gcc/testsuite/go.test/test/undef.go
@@ -1,10 +1,11 @@
-// errchk $G -e $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-// Check line numbers in error messages.
+// Test line numbers in error messages.
+// Does not compile.
package main
diff --git a/gcc/testsuite/go.test/test/utf.go b/gcc/testsuite/go.test/test/utf.go
index 9fba58156b..3ac79447e6 100644
--- a/gcc/testsuite/go.test/test/utf.go
+++ b/gcc/testsuite/go.test/test/utf.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test UTF-8 in strings and character constants.
+
package main
import "unicode/utf8"
diff --git a/gcc/testsuite/go.test/test/varerr.go b/gcc/testsuite/go.test/test/varerr.go
index ddd718f5b8..22aa9324f9 100644
--- a/gcc/testsuite/go.test/test/varerr.go
+++ b/gcc/testsuite/go.test/test/varerr.go
@@ -1,9 +1,12 @@
-// errchk $G $D/$F.go
+// errorcheck
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Verify that a couple of illegal variable declarations are caught by the compiler.
+// Does not compile.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/varinit.go b/gcc/testsuite/go.test/test/varinit.go
index c768777932..84a4a1aa55 100644
--- a/gcc/testsuite/go.test/test/varinit.go
+++ b/gcc/testsuite/go.test/test/varinit.go
@@ -1,9 +1,11 @@
-// $G $D/$F.go && $L $F.$A && ./$A.out || echo BUG wrong result
+// run
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test var x = x + 1 works.
+
package main
func main() {
diff --git a/gcc/testsuite/go.test/test/zerodivide.go b/gcc/testsuite/go.test/test/zerodivide.go
index 3b08e774cc..9ab2713535 100644
--- a/gcc/testsuite/go.test/test/zerodivide.go
+++ b/gcc/testsuite/go.test/test/zerodivide.go
@@ -1,9 +1,11 @@
-// $G $F.go && $L $F.$A && ./$A.out
+// run
// Copyright 2010 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// Test that zero division causes a panic.
+
package main
import (
@@ -235,4 +237,7 @@ func main() {
fmt.Printf("%v/%v: expected %g error; got %g\n", t.f, t.g, t.out, x)
}
}
+ if bad {
+ panic("zerodivide")
+ }
}
diff --git a/gcc/testsuite/lib/asan-dg.exp b/gcc/testsuite/lib/asan-dg.exp
new file mode 100644
index 0000000000..7a12160bb1
--- /dev/null
+++ b/gcc/testsuite/lib/asan-dg.exp
@@ -0,0 +1,327 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Return 1 if compilation with -fsanitize=address is error-free for trivial
+# code, 0 otherwise.
+
+proc check_effective_target_faddress_sanitizer {} {
+ return [check_no_compiler_messages faddress_sanitizer object {
+ void foo (void) { }
+ } "-fsanitize=address"]
+}
+
+proc asan_include_flags {} {
+ global srcdir
+ global TESTING_IN_BUILD_TREE
+
+ set flags ""
+
+ if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
+ return "${flags}"
+ }
+
+ set flags "-I$srcdir/../../libsanitizer/include"
+
+ return "$flags"
+}
+
+#
+# asan_link_flags -- compute library path and flags to find libasan.
+# (originally from g++.exp)
+#
+
+proc asan_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libsanitizer/asan/.libs/libasan.a"]
+ || [file exists "${gccpath}/libsanitizer/asan/.libs/libasan.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libsanitizer/ "
+ append flags " -B${gccpath}/libsanitizer/asan/ "
+ append flags " -L${gccpath}/libsanitizer/asan/.libs "
+ append ld_library_path ":${gccpath}/libsanitizer/asan/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libasan [lookfor_file ${tool_root_dir} libasan]
+ if { $libasan != "" } {
+ append flags "-L${libasan} "
+ append ld_library_path ":${libasan}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ return "$flags"
+}
+
+#
+# asan_init -- called at the start of each subdir of tests
+#
+
+proc asan_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global asan_saved_TEST_ALWAYS_FLAGS
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[asan_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[asan_link_flags [get_multilibs]]"
+ }
+ }
+
+ set include_flags "[asan_include_flags]"
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set asan_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ set ALWAYS_CXXFLAGS [concat "{additional_flags=-fsanitize=address -g $include_flags}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=address -g $include_flags $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags -fsanitize=address -g $include_flags"
+ }
+ }
+ if { $link_flags != "" } {
+ return 1
+ }
+ return 0
+}
+
+#
+# asan_finish -- called at the start of each subdir of tests
+#
+
+proc asan_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global asan_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists asan_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $asan_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
+
+# Symbolize lines like
+# #2 0xdeadbeef (/some/path/libsanitizer.so.0.0.0+0xbeef)
+# in $output using addr2line to
+# #2 0xdeadbeef in foobar file:123
+proc asan_symbolize { output } {
+ set addresses [regexp -inline -all -line "^ *#\[0-9\]+ 0x\[0-9a-f\]+ \[(\](\[^)\]+)\[+\](0x\[0-9a-f\]+)\[)\]$" "$output"]
+ if { [llength $addresses] > 0 } {
+ set addr2line_name [find_binutils_prog addr2line]
+ set idx 1
+ while { $idx < [llength $addresses] } {
+ set key [regsub -all "\[\]\[\]" [lindex $addresses $idx] "\\\\&"]
+ set val [lindex $addresses [expr $idx + 1]]
+ lappend arr($key) $val
+ set idx [expr $idx + 3]
+ }
+ foreach key [array names arr] {
+ set args "-f -e $key $arr($key)"
+ set status [remote_exec host "$addr2line_name" "$args"]
+ if { [lindex $status 0] > 0 } continue
+ regsub -all "\r\n" [lindex $status 1] "\n" addr2line_output
+ regsub -all "\[\n\r\]BFD: \[^\n\r\]*" $addr2line_output "" addr2line_output
+ regsub -all "^BFD: \[^\n\r\]*\[\n\r\]" $addr2line_output "" addr2line_output
+ set addr2line_output [regexp -inline -all -line "^\[^\n\r]*" $addr2line_output]
+ set idx 0
+ foreach val $arr($key) {
+ if { [expr $idx + 1] < [llength $addr2line_output] } {
+ set fnname [lindex $addr2line_output $idx]
+ set fileline [lindex $addr2line_output [expr $idx + 1]]
+ if { "$fnname" != "??" } {
+ set newkey "$key+$val"
+ set repl($newkey) "$fnname $fileline"
+ }
+ set idx [expr $idx + 2]
+ }
+ }
+ }
+ set idx 0
+ set new_output ""
+ while {[regexp -start $idx -indices " #\[0-9\]+ 0x\[0-9a-f\]+ \[(\](\[^)\]+\[+\]0x\[0-9a-f\]+)\[)\]" "$output" -> addr] > 0} {
+ set low [lindex $addr 0]
+ set high [lindex $addr 1]
+ set val [string range "$output" $low $high]
+ append new_output [string range "$output" $idx [expr $low - 2]]
+ if [info exists repl($val)] {
+ append new_output "in $repl($val)"
+ } else {
+ append new_output "($val)"
+ }
+ set idx [expr $high + 2]
+ }
+ append new_output [string range "$output" $idx [string length "$output"]]
+ return "$new_output"
+ }
+ return "$output"
+}
+
+# Return a list of gtest tests, printed in the form
+# DEJAGNU_GTEST_TEST AddressSanitizer_SimpleDeathTest
+# DEJAGNU_GTEST_TEST AddressSanitizer_VariousMallocsTest
+proc asan_get_gtest_test_list { output } {
+ set idx 0
+ set ret ""
+ while {[regexp -start $idx -indices "DEJAGNU_GTEST_TEST (\[^\n\r\]*)(\r\n|\n|\r)" "$output" -> testname] > 0} {
+ set low [lindex $testname 0]
+ set high [lindex $testname 1]
+ set val [string range "$output" $low $high]
+ lappend ret $val
+ set idx [expr $high + 1]
+ }
+ return $ret
+}
+
+# Return a list of gtest EXPECT_DEATH tests, printed in the form
+# DEJAGNU_GTEST_EXPECT_DEATH1 statement DEJAGNU_GTEST_EXPECT_DEATH1 regexp DEJAGNU_GTEST_EXPECT_DEATH1
+# DEJAGNU_GTEST_EXPECT_DEATH2 other statement DEJAGNU_GTEST_EXPECT_DEATH2 other regexp DEJAGNU_GTEST_EXPECT_DEATH2
+proc asan_get_gtest_expect_death_list { output } {
+ set idx 0
+ set ret ""
+ while {[regexp -start $idx -indices "DEJAGNU_GTEST_EXPECT_DEATH(\[0-9\]*)" "$output" -> id ] > 0} {
+ set low [lindex $id 0]
+ set high [lindex $id 1]
+ set val_id [string range "$output" $low $high]
+ if {[regexp -start $low -indices "$val_id (.*) DEJAGNU_GTEST_EXPECT_DEATH$val_id (.*) DEJAGNU_GTEST_EXPECT_DEATH$val_id\[\n\r\]" "$output" whole statement regexpr ] == 0} { break }
+ set low [lindex $statement 0]
+ set high [lindex $statement 1]
+ set val_statement [string range "$output" $low $high]
+ set low [lindex $regexpr 0]
+ set high [lindex $regexpr 1]
+ set val_regexpr [string range "$output" $low $high]
+ lappend ret [list "$val_id" "$val_statement" "$val_regexpr"]
+ set idx [lindex $whole 1]
+ }
+ return $ret
+}
+
+# Replace ${tool}_load with a wrapper so that we can symbolize the output.
+if { [info procs ${tool}_load] != [list] \
+ && [info procs saved_asan_${tool}_load] == [list] } {
+ rename ${tool}_load saved_asan_${tool}_load
+
+ proc ${tool}_load { program args } {
+ global tool
+ global asan_last_gtest_test_list
+ global asan_last_gtest_expect_death_list
+ set result [eval [list saved_asan_${tool}_load $program] $args]
+ set output [lindex $result 1]
+ set symbolized_output [asan_symbolize "$output"]
+ set asan_last_gtest_test_list [asan_get_gtest_test_list "$output"]
+ set asan_last_gtest_expect_death_list [asan_get_gtest_expect_death_list "$output"]
+ set result [list [lindex $result 0] $symbolized_output]
+ return $result
+ }
+}
+
+# Utility for running gtest asan emulation under dejagnu, invoked via dg-final.
+# Call pass if variable has the desired value, otherwise fail.
+#
+# Argument 0 handles expected failures and the like
+proc asan-gtest { args } {
+ global tool
+ global asan_last_gtest_test_list
+ global asan_last_gtest_expect_death_list
+
+ if { ![info exists asan_last_gtest_test_list] } { return }
+ if { [llength $asan_last_gtest_test_list] == 0 } { return }
+ if { ![isnative] || [is_remote target] } { return }
+
+ set gtest_test_list $asan_last_gtest_test_list
+ unset asan_last_gtest_test_list
+
+ if { [llength $args] >= 1 } {
+ switch [dg-process-target [lindex $args 0]] {
+ "S" { }
+ "N" { return }
+ "F" { setup_xfail "*-*-*" }
+ "P" { }
+ }
+ }
+
+ # This assumes that we are three frames down from dg-test, and that
+ # it still stores the filename of the testcase in a local variable "name".
+ # A cleaner solution would require a new DejaGnu release.
+ upvar 2 name testcase
+ upvar 2 prog prog
+
+ set output_file "[file rootname [file tail $prog]].exe"
+
+ foreach gtest $gtest_test_list {
+ set testname "$testcase $gtest"
+ set status -1
+
+ setenv DEJAGNU_GTEST_ARG "$gtest"
+ set result [${tool}_load ./$output_file $gtest]
+ unsetenv DEJAGNU_GTEST_ARG
+ set status [lindex $result 0]
+ set output [lindex $result 1]
+ if { "$status" == "pass" } {
+ pass "$testname execution test"
+ if { [info exists asan_last_gtest_expect_death_list] } {
+ set gtest_expect_death_list $asan_last_gtest_expect_death_list
+ foreach gtest_death $gtest_expect_death_list {
+ set id [lindex $gtest_death 0]
+ set testname "$testcase $gtest [lindex $gtest_death 1]"
+ set regexpr [lindex $gtest_death 2]
+ set status -1
+
+ setenv DEJAGNU_GTEST_ARG "$gtest:$id"
+ set result [${tool}_load ./$output_file "$gtest:$id"]
+ unsetenv DEJAGNU_GTEST_ARG
+ set status [lindex $result 0]
+ set output [lindex $result 1]
+ if { "$status" == "fail" } {
+ pass "$testname execution test"
+ if { ![regexp $regexpr ${output}] } {
+ fail "$testname output pattern test"
+ send_log "Output should match: $regexpr\n"
+ } else {
+ pass "$testname output pattern test"
+ }
+ } elseif { "$status" == "pass" } {
+ fail "$testname execution test"
+ } else {
+ $status "$testname execution test"
+ }
+ }
+ }
+ } else {
+ $status "$testname execution test"
+ }
+ unset asan_last_gtest_expect_death_list
+ }
+
+ return
+}
diff --git a/gcc/testsuite/lib/atomic-dg.exp b/gcc/testsuite/lib/atomic-dg.exp
new file mode 100644
index 0000000000..ee31a7a7a6
--- /dev/null
+++ b/gcc/testsuite/lib/atomic-dg.exp
@@ -0,0 +1,104 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+#
+# atomic_link_flags -- compute library path and flags to find libatomic.
+# (originally from g++.exp)
+#
+
+proc atomic_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libatomic/.libs/libatomic.a"]
+ || [file exists "${gccpath}/libatomic/.libs/libatomic.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libatomic/ "
+ append flags " -L${gccpath}/libatomic/.libs"
+ append ld_library_path ":${gccpath}/libatomic/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libatomic [lookfor_file ${tool_root_dir} libatomic]
+ if { $libatomic != "" } {
+ append flags "-L${libatomic} "
+ append ld_library_path ":${libatomic}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ append flags " -latomic "
+ return "$flags"
+}
+
+#
+# atomic_init -- called at the start of each subdir of tests
+#
+
+proc atomic_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global atomic_saved_TEST_ALWAYS_FLAGS
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[atomic_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[atomic_link_flags [get_multilibs]]"
+ }
+ }
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set atomic_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags"
+ }
+ }
+ return [check_no_compiler_messages_nocache libatomic_available executable {
+ int main (void) { return 0; }
+ }]
+}
+
+#
+# atomic_finish -- called at the end of each subdir of tests
+#
+
+proc atomic_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global atomic_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists atomic_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $atomic_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
diff --git a/gcc/testsuite/lib/c-compat.exp b/gcc/testsuite/lib/c-compat.exp
index ddbdd2d455..95a1fb9d71 100644
--- a/gcc/testsuite/lib/c-compat.exp
+++ b/gcc/testsuite/lib/c-compat.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,12 +34,19 @@ load_lib target-supports.exp
#
proc compat-use-alt-compiler { } {
global GCC_UNDER_TEST ALT_CC_UNDER_TEST
- global compat_same_alt
+ global compat_same_alt compat_alt_caret compat_alt_color
+ global TEST_ALWAYS_FLAGS
# We don't need to do this if the alternate compiler is actually
# the same as the compiler under test.
if { $compat_same_alt == 0 } then {
set GCC_UNDER_TEST $ALT_CC_UNDER_TEST
+ if { $compat_alt_caret == 0 } then {
+ regsub -- "-fno-diagnostics-show-caret" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+ }
+ if { $compat_alt_color == 0 } then {
+ regsub -- "-fdiagnostics-color=never" $TEST_ALWAYS_FLAGS "" TEST_ALWAYS_FLAGS
+ }
}
}
@@ -50,12 +56,14 @@ proc compat-use-alt-compiler { } {
proc compat-use-tst-compiler { } {
global GCC_UNDER_TEST compat_save_gcc_under_test
global compat_same_alt
+ global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
# We don't need to do this if the alternate compiler is actually
# the same as the compiler under test.
if { $compat_same_alt == 0 } then {
set GCC_UNDER_TEST $compat_save_gcc_under_test
+ set TEST_ALWAYS_FLAGS $compat_save_TEST_ALWAYS_FLAGS
}
}
@@ -64,6 +72,13 @@ proc compat_setup_dfp { } {
global compat_use_alt
global compat_same_alt
global compat_have_dfp
+ global compat_alt_caret
+ global compat_alt_color
+ global TEST_ALWAYS_FLAGS compat_save_TEST_ALWAYS_FLAGS
+
+ set compat_alt_caret 0
+ set compat_alt_color 0
+ set compat_save_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
verbose "compat_setup_dfp: $compat_use_alt $compat_same_alt" 2
@@ -72,6 +87,19 @@ proc compat_setup_dfp { } {
set compat_have_dfp [check_effective_target_dfprt_nocache]
verbose "compat_have_dfp for tst compiler: $compat_have_dfp" 2
+ if { $compat_use_alt == 1 && $compat_same_alt == 0 } {
+ compat-use-alt-compiler
+ if { [check_no_compiler_messages_nocache compat_alt_has_caret object {
+ int dummy; } "-fno-diagnostics-show-caret"] != 0 } {
+ set compat_alt_caret 1
+ }
+ if { [check_no_compiler_messages_nocache compat_alt_has_color object {
+ int dummy; } "-fdiagnostics-color=never"] != 0 } {
+ set compat_alt_color 1
+ }
+ compat-use-tst-compiler
+ }
+
# If there is an alternate compiler, does it support decimal float types?
if { $compat_have_dfp == 1 && $compat_use_alt == 1 && $compat_same_alt == 0 } {
compat-use-alt-compiler
diff --git a/gcc/testsuite/lib/c-torture.exp b/gcc/testsuite/lib/c-torture.exp
index bb92871937..fde76fde89 100644
--- a/gcc/testsuite/lib/c-torture.exp
+++ b/gcc/testsuite/lib/c-torture.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,7 +41,8 @@ if [info exists TORTURE_OPTIONS] {
{ -O3 -fomit-frame-pointer -funroll-loops } \
{ -O3 -fomit-frame-pointer -funroll-all-loops -finline-functions } \
{ -O3 -g } \
- { -Os } ]
+ { -Os } \
+ { -Og -g } ]
}
if [info exists ADDITIONAL_TORTURE_OPTIONS] {
diff --git a/gcc/testsuite/lib/cilk-plus-dg.exp b/gcc/testsuite/lib/cilk-plus-dg.exp
new file mode 100644
index 0000000000..bfb4b71de4
--- /dev/null
+++ b/gcc/testsuite/lib/cilk-plus-dg.exp
@@ -0,0 +1,104 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+#
+# cilkplus_link_flags -- compute library path and flags to find libcilkrts.
+# (originally from g++.exp)
+#
+
+proc cilkplus_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libcilkrts/.libs/libcilkrts.a"]
+ || [file exists "${gccpath}/libcilkrts/.libs/libcilkrts.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libcilkrts/ "
+ append flags " -L${gccpath}/libcilkrts/.libs"
+ append ld_library_path ":${gccpath}/libcilkrts/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libcilkrts [lookfor_file ${tool_root_dir} libcilkrts]
+ if { $libcilkrts != "" } {
+ append flags "-L${libcilkrts} "
+ append ld_library_path ":${libcilkrts}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ return "$flags"
+}
+
+#
+# cilkplus_init -- called at the start of each subdir of tests
+#
+
+proc cilkplus_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global cilkplus_saved_TEST_ALWAYS_FLAGS
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[cilkplus_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[cilkplus_link_flags [get_multilibs]]"
+ }
+ }
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set cilkplus_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags"
+ }
+ }
+ if { $link_flags != "" } {
+ return 1
+ }
+ return 0
+}
+
+#
+# cilkplus_finish -- called at the end of each subdir of tests
+#
+
+proc cilkplus_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global cilkplus_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists cilkplus_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $cilkplus_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
diff --git a/gcc/testsuite/lib/clearcap.exp b/gcc/testsuite/lib/clearcap.exp
new file mode 100644
index 0000000000..044881fbd3
--- /dev/null
+++ b/gcc/testsuite/lib/clearcap.exp
@@ -0,0 +1,58 @@
+# Copyright (C) 2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Clear hardware capabilities on Solaris.
+if [istarget *-*-solaris2*] {
+ set clearcap_ldflags "-mclear-hwcap"
+}
+
+#
+# clearcap-init -- called at the start of each subdir of tests
+#
+
+proc clearcap-init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global clearcap_saved_TEST_ALWAYS_FLAGS
+ global clearcap_ldflags
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set clearcap_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists clearcap_ldflags] {
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$clearcap_ldflags}" $ALWAYS_CXXFLAGS]
+ } else {
+ append TEST_ALWAYS_FLAGS " $clearcap_ldflags"
+ }
+ }
+ return 0
+}
+
+#
+# clearcap-finish -- called at the start of each subdir of tests
+#
+
+proc clearcap-finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global clearcap_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists clearcap_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $clearcap_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
diff --git a/gcc/testsuite/lib/compat.exp b/gcc/testsuite/lib/compat.exp
index d686631c03..7ab85aafe5 100644
--- a/gcc/testsuite/lib/compat.exp
+++ b/gcc/testsuite/lib/compat.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2002, 2003, 2004, 2005, 2007, 2008, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/copy-file.exp b/gcc/testsuite/lib/copy-file.exp
index bceee76ed4..aa80d0bbf7 100644
--- a/gcc/testsuite/lib/copy-file.exp
+++ b/gcc/testsuite/lib/copy-file.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/dejapatches.exp b/gcc/testsuite/lib/dejapatches.exp
index aa3bc2b613..e83c32f713 100644
--- a/gcc/testsuite/lib/dejapatches.exp
+++ b/gcc/testsuite/lib/dejapatches.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/dg-pch.exp b/gcc/testsuite/lib/dg-pch.exp
index b1fadabaaf..7efbdb50e7 100644
--- a/gcc/testsuite/lib/dg-pch.exp
+++ b/gcc/testsuite/lib/dg-pch.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,13 +16,60 @@
load_lib copy-file.exp
+proc pch-init { args } {
+ global pch_unsupported_debug pch_unsupported
+
+ if [info exists pch_unsupported_debug] {
+ error "pch-init: pch_unsupported_debug is not empty as expected"
+ }
+ if [info exists pch_unsupported] {
+ error "pch-init: pch_unsupported is not empty as expected"
+ }
+
+ set result [check_compile pchtest object "int i;" "-g -x c-header"]
+ set pch_unsupported_debug \
+ [regexp "debug format cannot be used with pre-compiled headers" \
+ [lindex $result 0]]
+
+ set pch_unsupported 0
+ if { $pch_unsupported_debug } {
+ verbose -log "pch is unsupported with the debug info format"
+
+ set result [check_compile pchtest object "int i;" "-x c-header"]
+ set pch_unsupported \
+ [regexp "debug format cannot be used with pre-compiled headers" \
+ [lindex $result 0]]
+ }
+}
+
+proc pch-finish { args } {
+ global pch_unsupported_debug pch_unsupported
+ unset pch_unsupported_debug
+ unset pch_unsupported
+}
+
+proc check_effective_target_pch_supported_debug { } {
+ global pch_unsupported_debug
+ if { $pch_unsupported_debug } {
+ return 0
+ }
+ return 1
+}
+
proc dg-flags-pch { subdir test otherflags options suffix } {
global runtests dg-do-what-default
+ global pch_unsupported_debug pch_unsupported
# If we're only testing specific files and this isn't one of them, skip it.
if ![runtest_file_p $runtests $test] {
return
}
+
+ if { [istarget "powerpc-ibm-aix*"] } {
+ set torture_execute_xfail "powerpc-ibm-aix*"
+ return
+ }
+
set nshort "$subdir/[file tail $test]"
set bname "[file rootname [file tail $nshort]]"
@@ -35,6 +82,13 @@ proc dg-flags-pch { subdir test otherflags options suffix } {
foreach flags $options {
verbose "Testing $nshort, $otherflags $flags" 1
+ if { $pch_unsupported != 0 \
+ || ( $pch_unsupported_debug != 0 && [regexp " -g" " $flags"] ) } {
+ verbose -log "$nshort unsupported because debug format conflicts with PCH"
+ unsupported "$nshort $flags"
+ continue
+ }
+
# For the header files, the default is to precompile.
set dg-do-what-default precompile
catch { file_on_host delete "$bname$suffix" }
@@ -78,7 +132,8 @@ proc dg-flags-pch { subdir test otherflags options suffix } {
fail "$nshort $flags assembly comparison"
}
}
- } else {
+ } elseif { $pch_unsupported_debug == 0 \
+ || [llength [grep $test "{\[ \t\]\+dg-require-effective-target\[ \t\]\+pch_supported_debug\[ \t\]\+.*\[ \t\]\+}"]] > 0 } {
verbose -log "pch file '$bname$suffix.gch' missing"
fail "$nshort $flags"
if { !$have_errs } {
diff --git a/gcc/testsuite/lib/file-format.exp b/gcc/testsuite/lib/file-format.exp
index 92437c4ef6..70263bf0a8 100644
--- a/gcc/testsuite/lib/file-format.exp
+++ b/gcc/testsuite/lib/file-format.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1999, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -38,6 +38,9 @@ proc gcc_target_object_format { } {
} else {
set gcc_target_object_format_saved som
}
+ } elseif { [istarget *-*-aix*] } {
+ # AIX doesn't necessarily have objdump, so hand-code it.
+ set gcc_target_object_format_saved coff
} else {
set objdump_name [find_binutils_prog objdump]
set open_file [open objfmtst.c w]
diff --git a/gcc/testsuite/lib/fortran-modules.exp b/gcc/testsuite/lib/fortran-modules.exp
new file mode 100644
index 0000000000..eb880f4bf0
--- /dev/null
+++ b/gcc/testsuite/lib/fortran-modules.exp
@@ -0,0 +1,98 @@
+# Copyright (C) 2012-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# helper to deal with fortran modules
+
+# Remove files for specified Fortran modules.
+proc cleanup-modules { modlist } {
+ global clean
+ foreach mod [concat $modlist $clean] {
+ set m [string tolower $mod].mod
+ verbose "cleanup-module `$m'" 2
+ if [is_remote host] {
+ remote_file host delete $m
+ }
+ remote_file build delete $m
+ }
+}
+
+proc keep-modules { modlist } {
+ global clean
+ # if the modlist is empty, keep everything
+ if {[llength $modlist] < 1} {
+ set clean {}
+ } else {
+ set cleansed {}
+ foreach cl $clean {
+ if {[lsearch $cl $modlist] < 0} {
+ lappend cleansed $cl
+ }
+ }
+ if {[llength $clean] == [llength $cleansed]} {
+ warning "keep-modules had no effect?! Possible typo in module name."
+ }
+ set clean $cleansed
+ }
+}
+
+# collect all module names from a source-file
+proc list-module-names { files } {
+ global clean
+ set clean {}
+ foreach file $files {
+ foreach mod [list-module-names-1 $file] {
+ if {[lsearch $clean $mod] < 0} {
+ lappend clean $mod
+ }
+ }
+ }
+ return [join $clean " "]
+}
+
+proc list-module-names-1 { file } {
+ set result {}
+ set tmp [grep $file "^\[ \t\]*((#)?\[ \t\]*include|\[mM\]\[oO\]\[dD\]\[uU\]\[lL\]\[eE\](?!\[ \t\]+\[pP\]\[rR\]\[oO\]\[cC\]\[eE\]\[dD\]\[uU\]\[rR\]\[eE\]\[ \t\]+))\[ \t\]+.*" line]
+ if {![string match "" $tmp]} {
+ foreach i $tmp {
+ regexp "(\[0-9\]+)\[ \t\]+(?:(?:#)?\[ \t\]*include\[ \t\]+)\[\"\](\[^\"\]*)\[\"\]" $i dummy lineno include_file
+ if {[info exists include_file]} {
+ set dir [file dirname $file]
+ set inc "$dir/$include_file"
+ unset include_file
+ if {![file readable $inc]} {
+ # We do not currently use include path search logic, punt
+ continue
+ }
+ verbose "Line $lineno includes `$inc'" 3
+ foreach mod [list-module-names-1 $inc] {
+ if {[lsearch $result $mod] < 0} {
+ lappend result $mod
+ }
+ }
+ continue
+ }
+ regexp "(\[0-9\]+)\[ \t\]+(?:(\[mM\]\[oO\]\[dD\]\[uU\]\[lL\]\[eE\]\[ \t\]+(?!\[pP\]\[rR\]\[oO\]\[cC\]\[eE\]\[dD\]\[uU\]\[rR\]\[eE\]\[ \t\]+)))(\[^ \t;\]*)" $i i lineno keyword mod
+ if {![info exists lineno]} {
+ continue
+ }
+ verbose "Line $lineno mentions module `$mod'" 3
+ if {[lsearch $result $mod] < 0} {
+ lappend result $mod
+ }
+ }
+ }
+ return $result
+}
diff --git a/gcc/testsuite/lib/fortran-torture.exp b/gcc/testsuite/lib/fortran-torture.exp
index 8d6e2ddd81..e7abac8158 100644
--- a/gcc/testsuite/lib/fortran-torture.exp
+++ b/gcc/testsuite/lib/fortran-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,6 +21,7 @@
# based on f-torture.exp, which was written by Rob Savoye.
load_lib target-supports.exp
+load_lib fortran-modules.exp
# Return the list of options to use for fortran torture tests.
# The default option list can be overridden by
@@ -218,6 +219,7 @@ proc fortran-torture-execute { src } {
if [string match "/*" $testcase] {
set testcase "[file tail [file dirname $src]]/[file tail $src]"
}
+ list-module-names $src
# Walk the list of options and copmile and run the testcase for all
# options that are not explicitly disabled by the .x script (if present).
@@ -332,6 +334,7 @@ proc fortran-torture-execute { src } {
}
$status "$testcase execution, $option"
}
+ cleanup-modules ""
}
@@ -390,7 +393,8 @@ proc fortran-torture { args } {
return
}
}
-
+ list-module-names $src
+
# loop through all the options
set option_list $torture_with_loops
foreach option $option_list {
@@ -406,6 +410,7 @@ proc fortran-torture { args } {
}
fortran-torture-compile $src "$option $options"
+ cleanup-modules ""
}
}
diff --git a/gcc/testsuite/lib/g++-dg.exp b/gcc/testsuite/lib/g++-dg.exp
index e6ef74b5ef..24542c8017 100644
--- a/gcc/testsuite/lib/g++-dg.exp
+++ b/gcc/testsuite/lib/g++-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -43,9 +43,9 @@ proc g++-dg-runtest { testcases default-extra-flags } {
# if there's a dg-options line.
if ![search_for $test "-std=*++"] {
if [search_for $test "dg-options"] {
- set option_list { -std=gnu++98 -std=gnu++11 }
+ set option_list { -std=gnu++98 -std=gnu++11 -std=gnu++1y }
} else {
- set option_list { -std=c++98 -std=c++11 }
+ set option_list { -std=c++98 -std=c++11 -std=c++1y }
}
} else {
set option_list { "" }
diff --git a/gcc/testsuite/lib/g++.exp b/gcc/testsuite/lib/g++.exp
index ff111253f1..751e27bc99 100644
--- a/gcc/testsuite/lib/g++.exp
+++ b/gcc/testsuite/lib/g++.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 2000, 2001, 2002, 2003,
-# 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -210,7 +209,7 @@ proc g++_init { args } {
if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
set GXX_UNDER_TEST [transform c++]
} else {
- set GXX_UNDER_TEST [findfile $base_dir/../../g++ "$base_dir/../../g++ -B$base_dir/../../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
+ set GXX_UNDER_TEST [findfile $base_dir/../../xg++ "$base_dir/../../xg++ -B$base_dir/../../" [findfile $base_dir/xg++ "$base_dir/xg++ -B$base_dir/" [transform c++]]]
}
}
}
@@ -295,6 +294,11 @@ proc g++_target_compile { source dest type options } {
lappend options "ldflags=${wrap_flags}"
}
+ global TEST_EXTRA_LIBS
+ if [info exists TEST_EXTRA_LIBS] {
+ lappend options "ldflags=$TEST_EXTRA_LIBS"
+ }
+
lappend options "additional_flags=[libio_include_flags]"
lappend options "compiler=$GXX_UNDER_TEST"
lappend options "timeout=[timeout_value]"
diff --git a/gcc/testsuite/lib/gcc-defs.exp b/gcc/testsuite/lib/gcc-defs.exp
index 0dbb088314..69a597162b 100644
--- a/gcc/testsuite/lib/gcc-defs.exp
+++ b/gcc/testsuite/lib/gcc-defs.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2003, 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -245,7 +245,7 @@ proc dg-additional-files-options { options source } {
set additional_sources ""
}
if { $additional_files != "" } then {
- regsub -all " " $additional_files " [file dirname $source]/" additional_files
+ regsub -all "^| " $additional_files " [file dirname $source]/" additional_files
set to_download [concat $to_download $additional_files]
set additional_files ""
}
diff --git a/gcc/testsuite/lib/gcc-dg.exp b/gcc/testsuite/lib/gcc-dg.exp
index 8d8c538706..a758d4740f 100644
--- a/gcc/testsuite/lib/gcc-dg.exp
+++ b/gcc/testsuite/lib/gcc-dg.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2008, 2009,
-# 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,6 +28,7 @@ load_lib prune.exp
load_lib libgloss.exp
load_lib target-libpath.exp
load_lib torture-options.exp
+load_lib fortran-modules.exp
# We set LC_ALL and LANG to C so that we get the same error messages as expected.
setenv LC_ALL C
@@ -181,6 +181,7 @@ proc gcc-dg-test-1 { target_compile prog do_what extra_tool_flags } {
lappend options "additional_flags=$extra_tool_flags"
}
+ verbose "$target_compile $prog $output_file $compile_type $options" 4
set comp_output [$target_compile "$prog" "$output_file" "$compile_type" $options]
# Look for an internal compiler error, which sometimes masks the fact
@@ -253,7 +254,21 @@ if { [info procs ${tool}_load] != [list] \
proc ${tool}_load { program args } {
global tool
global shouldfail
+ global set_target_env_var
+
+ set saved_target_env_var [list]
+ if { [info exists set_target_env_var] \
+ && [llength $set_target_env_var] != 0 } {
+ if { [is_remote target] } {
+ return [list "unsupported" ""]
+ }
+ set-target-env-var
+ }
set result [eval [list saved_${tool}_load $program] $args]
+ if { [info exists set_target_env_var] \
+ && [llength $set_target_env_var] != 0 } {
+ restore-target-env-var
+ }
if { $shouldfail != 0 } {
switch [lindex $result 0] {
"pass" { set status "fail" }
@@ -265,6 +280,44 @@ if { [info procs ${tool}_load] != [list] \
}
}
+proc dg-set-target-env-var { args } {
+ global set_target_env_var
+ if { [llength $args] != 3 } {
+ error "dg-set-target-env-var: need two arguments"
+ return
+ }
+ lappend set_target_env_var [list [lindex $args 1] [lindex $args 2]]
+}
+
+proc set-target-env-var { } {
+ global set_target_env_var
+ upvar 1 saved_target_env_var saved_target_env_var
+ foreach env_var $set_target_env_var {
+ set var [lindex $env_var 0]
+ set value [lindex $env_var 1]
+ if [info exists env($var)] {
+ lappend saved_target_env_var [list $var 1 $env($var)]
+ } else {
+ lappend saved_target_env_var [list $var 0]
+ }
+ setenv $var $value
+ }
+}
+
+proc restore-target-env-var { } {
+ upvar 1 saved_target_env_var saved_target_env_var
+ for { set env_vari [llength $saved_target_env_var] } {
+ [incr env_vari -1] >= 0 } {} {
+ set env_var [lindex $saved_target_env_var $env_vari]
+ set var [lindex $env_var 0]
+ if [lindex $env_var 1] {
+ setenv $var [lindex $env_var 2]
+ } else {
+ unsetenv $var
+ }
+ }
+}
+
# Utility routines.
#
@@ -502,6 +555,19 @@ proc cleanup-stack-usage { } {
}
}
+# Remove an Ada spec file for the current test.
+proc cleanup-ada-spec { } {
+ set testcase [testname-for-summary]
+ remove-build-file "[get_ada_spec_filename $testcase]"
+
+ # Clean up files for additional source files.
+ if [info exists additional_sources] {
+ foreach srcfile $additional_sources {
+ remove-build-file "[get_ada_spec_filename $srcfile]"
+ }
+ }
+}
+
# Remove all dump files with the provided suffix.
proc cleanup-dump { suffix } {
set testcase [testname-for-summary]
@@ -535,7 +601,7 @@ proc cleanup-saved-temps { args } {
set suffixes {}
# add the to-be-kept suffixes
- foreach suffix {".ii" ".i" ".s" ".o" ".gkd"} {
+ foreach suffix {".mii" ".ii" ".i" ".s" ".o" ".gkd" ".res" ".ltrans.out"} {
if {[lsearch $args $suffix] < 0} {
lappend suffixes $suffix
}
@@ -546,6 +612,8 @@ proc cleanup-saved-temps { args } {
set testcase [lindex $testcase 0]
foreach suffix $suffixes {
remove-build-file "[file rootname [file tail $testcase]]$suffix"
+ remove-build-file "[file rootname [file tail $testcase]].exe$suffix"
+ remove-build-file "[file rootname [file tail $testcase]].exe.ltrans\[0-9\]*$suffix"
# -fcompare-debug dumps
remove-build-file "[file rootname [file tail $testcase]].gk$suffix"
}
@@ -555,6 +623,9 @@ proc cleanup-saved-temps { args } {
foreach srcfile $additional_sources {
foreach suffix $suffixes {
remove-build-file "[file rootname [file tail $srcfile]]$suffix"
+ remove-build-file "[file rootname [file tail $srcfile]].exe$suffix"
+ remove-build-file "[file rootname [file tail $srcfile]].exe.ltrans\[0-9\]*$suffix"
+
# -fcompare-debug dumps
remove-build-file "[file rootname [file tail $srcfile]].gk$suffix"
}
@@ -562,20 +633,13 @@ proc cleanup-saved-temps { args } {
}
}
-# Remove files for specified Fortran modules.
-proc cleanup-modules { modlist } {
- foreach modname $modlist {
- remove-build-file [string tolower $modname].mod
- }
-}
-
# Scan Fortran modules for a given regexp.
#
# Argument 0 is the module name
# Argument 1 is the regexp to match
proc scan-module { args } {
set modfilename [string tolower [lindex $args 0]].mod
- set fd [open $modfilename r]
+ set fd [open [list | gzip -dc $modfilename] r]
set text [read $fd]
close $fd
@@ -593,7 +657,7 @@ proc scan-module { args } {
# Argument 1 is the regexp to match
proc scan-module-absence { args } {
set modfilename [string tolower [lindex $args 0]].mod
- set fd [open $modfilename r]
+ set fd [open [list | gzip -dc $modfilename] r]
set text [read $fd]
close $fd
@@ -670,13 +734,13 @@ if { [info procs saved-dg-test] == [list] } {
global compiler_conditional_xfail_data
global shouldfail
global testname_with_flags
+ global set_target_env_var
if { [ catch { eval saved-dg-test $args } errmsg ] } {
set saved_info $errorInfo
set additional_files ""
set additional_sources ""
set additional_prunes ""
- set dg_runtest_extra_prunes ""
set shouldfail 0
if [info exists compiler_conditional_xfail_data] {
unset compiler_conditional_xfail_data
@@ -691,6 +755,9 @@ if { [info procs saved-dg-test] == [list] } {
set additional_sources ""
set additional_prunes ""
set shouldfail 0
+ if [info exists set_target_env_var] {
+ unset set_target_env_var
+ }
unset_timeout_vars
if [info exists compiler_conditional_xfail_data] {
unset compiler_conditional_xfail_data
diff --git a/gcc/testsuite/lib/gcc-gdb-test.exp b/gcc/testsuite/lib/gcc-gdb-test.exp
index 2f593ab2ed..d182d88fa5 100644
--- a/gcc/testsuite/lib/gcc-gdb-test.exp
+++ b/gcc/testsuite/lib/gcc-gdb-test.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -74,7 +74,9 @@ proc gdb-test { args } {
if { $first == $second } {
pass "$testname"
} else {
- send_log "$first != $second\n"
+ # We need the -- to disambiguate $first from an option,
+ # as it may be negative.
+ send_log -- "$first != $second\n"
fail "$testname"
}
remote_close target
diff --git a/gcc/testsuite/lib/gcc-simulate-thread.exp b/gcc/testsuite/lib/gcc-simulate-thread.exp
index 0b36947d51..100462458e 100644
--- a/gcc/testsuite/lib/gcc-simulate-thread.exp
+++ b/gcc/testsuite/lib/gcc-simulate-thread.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/gcc.exp b/gcc/testsuite/lib/gcc.exp
index bb1763ad34..49394b08eb 100644
--- a/gcc/testsuite/lib/gcc.exp
+++ b/gcc/testsuite/lib/gcc.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2003, 2004,
-# 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -135,6 +134,11 @@ proc gcc_target_compile { source dest type options } {
lappend options "ldflags=$wrap_flags"
}
+ global TEST_EXTRA_LIBS
+ if [info exists TEST_EXTRA_LIBS] {
+ lappend options "ldflags=$TEST_EXTRA_LIBS"
+ }
+
if [target_info exists gcc,stack_size] {
lappend options "additional_flags=-DSTACK_SIZE=[target_info gcc,stack_size]"
}
diff --git a/gcc/testsuite/lib/gcov.exp b/gcc/testsuite/lib/gcov.exp
index 1cf93a718a..7e4ed6937c 100644
--- a/gcc/testsuite/lib/gcov.exp
+++ b/gcc/testsuite/lib/gcov.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2001, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,6 +70,61 @@ proc verify-lines { testname testcase file } {
return $failed
}
+
+#
+# verify-intermediate -- check that intermediate file has certain lines
+#
+# TESTNAME is the name of the test, including unique flags.
+# TESTCASE is the name of the test.
+# FILE is the name of the gcov output file.
+#
+# Checks are very loose, they are based on certain tags being present
+# in the output. They do not check for exact expected execution
+# counts. For that the regular gcov format should be checked.
+#
+proc verify-intermediate { testname testcase file } {
+ set failed 0
+ set srcfile 0
+ set function 0
+ set lcount 0
+ set branch 0
+ set fd [open $file r]
+ while { [gets $fd line] >= 0 } {
+ if [regexp "^file:" $line] {
+ incr srcfile
+ }
+ if [regexp "^function:(\[0-9\]+),(\[0-9\]+),.*" $line] {
+ incr function
+ }
+ if [regexp "^lcount:(\[0-9\]+),(\[0-9\]+)" $line] {
+ incr lcount
+ }
+ if [regexp "^branch:(\[0-9\]+),(taken|nottaken|notexec)" $line] {
+ incr branch
+ }
+ }
+
+ # We should see at least one tag of each type
+ if {$srcfile == 0} {
+ fail "$testname expected 'file:' tag not found"
+ incr failed
+ }
+ if {$function == 0} {
+ fail "$testname expected 'function:' tag not found"
+ incr failed
+ }
+ if {$lcount == 0} {
+ fail "$testname expected 'lcount:' tag not found"
+ incr failed
+ }
+ if {$branch == 0} {
+ fail "$testname expected 'branch:' tag not found"
+ incr failed
+ }
+ return $failed
+}
+
+
#
# verify-branches -- check that branch percentages are as expected
#
@@ -248,6 +303,8 @@ proc run-gcov { args } {
set gcov_args ""
set gcov_verify_calls 0
set gcov_verify_branches 0
+ set gcov_verify_lines 1
+ set gcov_verify_intermediate 0
set xfailed 0
foreach a $args {
@@ -255,6 +312,11 @@ proc run-gcov { args } {
set gcov_verify_calls 1
} elseif { $a == "branches" } {
set gcov_verify_branches 1
+ } elseif { $a == "intermediate" } {
+ set gcov_verify_intermediate 1
+ set gcov_verify_calls 0
+ set gcov_verify_branches 0
+ set gcov_verify_lines 0
} elseif { $gcov_args == "" } {
set gcov_args $a
} else {
@@ -295,7 +357,12 @@ proc run-gcov { args } {
remote_upload host $testcase.gcov $testcase.gcov
# Check that line execution counts are as expected.
- set lfailed [verify-lines $testname $testcase $testcase.gcov]
+ if { $gcov_verify_lines } {
+ # Check that line execution counts are as expected.
+ set lfailed [verify-lines $testname $testcase $testcase.gcov]
+ } else {
+ set lfailed 0
+ }
# If requested via the .x file, check that branch and call information
# is correct.
@@ -309,15 +376,21 @@ proc run-gcov { args } {
} else {
set cfailed 0
}
+ if { $gcov_verify_intermediate } {
+ # Check that intermediate format has the expected format
+ set ifailed [verify-intermediate $testname $testcase $testcase.gcov]
+ } else {
+ set ifailed 0
+ }
# Report whether the gcov test passed or failed. If there were
# multiple failures then the message is a summary.
- set tfailed [expr $lfailed + $bfailed + $cfailed]
+ set tfailed [expr $lfailed + $bfailed + $cfailed + $ifailed]
if { $xfailed } {
setup_xfail "*-*-*"
}
if { $tfailed > 0 } {
- fail "$testname gcov: $lfailed failures in line counts, $bfailed in branch percentages, $cfailed in return percentages"
+ fail "$testname gcov: $lfailed failures in line counts, $bfailed in branch percentages, $cfailed in return percentages, $ifailed in intermediate format"
} else {
pass "$testname gcov"
clean-gcov $testcase
diff --git a/gcc/testsuite/lib/gfortran-dg.exp b/gcc/testsuite/lib/gfortran-dg.exp
index 0fd96b395c..f6a1dbe5a7 100644
--- a/gcc/testsuite/lib/gfortran-dg.exp
+++ b/gcc/testsuite/lib/gfortran-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -111,10 +111,12 @@ proc gfortran-dg-runtest { testcases default-extra-flags } {
}
set nshort [file tail [file dirname $test]]/[file tail $test]
+ list-module-names $test
foreach flags $option_list {
verbose "Testing $nshort, $flags" 1
dg-test $test $flags ${default-extra-flags}
+ cleanup-modules ""
}
}
@@ -171,6 +173,7 @@ proc gfortran-dg-debug-runtest { target_compile trivial opt_opts testcases } {
}
set nshort [file tail [file dirname $test]]/[file tail $test]
+ list-module-names $test
foreach flags $DEBUG_TORTURE_OPTIONS {
set doit 1
@@ -179,6 +182,7 @@ proc gfortran-dg-debug-runtest { target_compile trivial opt_opts testcases } {
if { $doit } {
verbose -log "Testing $nshort, $flags" 1
dg-test $test $flags ""
+ cleanup-modules ""
}
}
}
diff --git a/gcc/testsuite/lib/gfortran.exp b/gcc/testsuite/lib/gfortran.exp
index d9934fc07a..c9b5d648b8 100644
--- a/gcc/testsuite/lib/gfortran.exp
+++ b/gcc/testsuite/lib/gfortran.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 2003-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/gnat-dg.exp b/gcc/testsuite/lib/gnat-dg.exp
index e6fe07ed14..24fb475c9e 100644
--- a/gcc/testsuite/lib/gnat-dg.exp
+++ b/gcc/testsuite/lib/gnat-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007, 2010, 2011 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/gnat.exp b/gcc/testsuite/lib/gnat.exp
index 21cfce4315..e82f7311a4 100644
--- a/gcc/testsuite/lib/gnat.exp
+++ b/gcc/testsuite/lib/gnat.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/go-dg.exp b/gcc/testsuite/lib/go-dg.exp
index 16bf12df69..71b6ab8be2 100644
--- a/gcc/testsuite/lib/go-dg.exp
+++ b/gcc/testsuite/lib/go-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/go-torture.exp b/gcc/testsuite/lib/go-torture.exp
index 209b8f8d67..d37d475874 100644
--- a/gcc/testsuite/lib/go-torture.exp
+++ b/gcc/testsuite/lib/go-torture.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/go.exp b/gcc/testsuite/lib/go.exp
index 8c908a5ced..d674f488cf 100644
--- a/gcc/testsuite/lib/go.exp
+++ b/gcc/testsuite/lib/go.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,6 +19,7 @@
#
load_lib prune.exp
load_lib gcc-defs.exp
+load_lib timeout.exp
load_lib target-libpath.exp
#
diff --git a/gcc/testsuite/lib/lto.exp b/gcc/testsuite/lib/lto.exp
index 4e5d4437db..997d5a38d1 100644
--- a/gcc/testsuite/lib/lto.exp
+++ b/gcc/testsuite/lib/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -413,7 +413,8 @@ proc lto-execute { src1 sid } {
global dg-suppress-ld-options
global LTO_OPTIONS
global dg-final-code
-
+ global testname_with_flags
+
# Get extra flags for this test from the primary source file, and
# process other dg-* options that this suite supports. Warn about
# unsupported flags.
@@ -499,7 +500,10 @@ proc lto-execute { src1 sid } {
verbose "$testcase not supported on this target, skipping it" 3
return
}
-
+ # Should be safe for non-fortran too but be paranoid..
+ if {$sid eq "f_lto"} {
+ list-module-names $src_list
+ }
regsub "_0.*" $testcase "" testcase
# Set up the base name of executable files so they'll be unique.
@@ -556,11 +560,11 @@ proc lto-execute { src1 sid } {
verbose "Running dg-final tests." 3
verbose "dg-final-proc:\n[info body dg-final-proc]" 4
if [catch "dg-final-proc $src1" errmsg] {
- perror "$name: error executing dg-final: $errmsg"
+ perror "$src1: error executing dg-final: $errmsg"
# ??? The call to unresolved here is necessary to clear
# `errcnt'. What we really need is a proc like perror that
# doesn't set errcnt. It should also set exit_status to 1.
- unresolved "$name: error executing dg-final: $errmsg"
+ unresolved "$src1: error executing dg-final: $errmsg"
}
}
@@ -574,10 +578,30 @@ proc lto-execute { src1 sid } {
}
}
+ # Clean up after -save-temps. The LTO tests don't use dg-test, so
+ # testname-for-summary needs to be defined explicitly for each
+ # file that needs to be removed.
+ set testname_with_flags $execname
+
+ eval "cleanup-saved-temps"
+
+ for {set i 0} {$i < $num_srcs} {incr i} {
+ set testname_with_flags "${base}_${i}"
+ eval "cleanup-saved-temps"
+ set testname_with_flags "${sid}_${base}_${i}"
+ eval "cleanup-saved-temps"
+ }
+
+ unset testname_with_flags
+
if { ![string compare "run" $compile_type] \
|| ![string compare "link" $compile_type] } {
file_on_host delete $execname
}
+ # Should be safe for non-fortran too but be paranoid..
+ if {$sid eq "f_lto"} {
+ cleanup-modules ""
+ }
}
}
diff --git a/gcc/testsuite/lib/mike-g++.exp b/gcc/testsuite/lib/mike-g++.exp
index 21639020c4..d5f31a8ecd 100644
--- a/gcc/testsuite/lib/mike-g++.exp
+++ b/gcc/testsuite/lib/mike-g++.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1988, 90, 91, 92, 95, 96, 1997, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 1988-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/mike-gcc.exp b/gcc/testsuite/lib/mike-gcc.exp
index 9e85fefcff..68cca239b0 100644
--- a/gcc/testsuite/lib/mike-gcc.exp
+++ b/gcc/testsuite/lib/mike-gcc.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1988, 90, 91, 92, 95, 96, 1997, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 1988-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/obj-c++-dg.exp b/gcc/testsuite/lib/obj-c++-dg.exp
index f1f6d23ead..3b26342f52 100644
--- a/gcc/testsuite/lib/obj-c++-dg.exp
+++ b/gcc/testsuite/lib/obj-c++-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/obj-c++.exp b/gcc/testsuite/lib/obj-c++.exp
index 8c190cd2f5..93c7ff6b19 100644
--- a/gcc/testsuite/lib/obj-c++.exp
+++ b/gcc/testsuite/lib/obj-c++.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -221,7 +221,7 @@ proc obj-c++_init { args } {
if { [is_remote host] || ! [info exists TESTING_IN_BUILD_TREE] } {
set OBJCXX_UNDER_TEST [transform c++]
} else {
- set OBJCXX_UNDER_TEST [findfile $base_dir/../../g++ "$base_dir/../../g++ -B$base_dir/../../" [findfile $base_dir/g++ "$base_dir/g++ -B$base_dir/" [transform c++]]]
+ set OBJCXX_UNDER_TEST [findfile $base_dir/../../xg++ "$base_dir/../../xg++ -B$base_dir/../../" [findfile $base_dir/xg++ "$base_dir/xg++ -B$base_dir/" [transform c++]]]
}
}
}
diff --git a/gcc/testsuite/lib/objc-dg.exp b/gcc/testsuite/lib/objc-dg.exp
index b8246d95b3..aeb9e9e379 100644
--- a/gcc/testsuite/lib/objc-dg.exp
+++ b/gcc/testsuite/lib/objc-dg.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2007, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/objc-torture.exp b/gcc/testsuite/lib/objc-torture.exp
index 357ab76398..f606065376 100644
--- a/gcc/testsuite/lib/objc-torture.exp
+++ b/gcc/testsuite/lib/objc-torture.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1992-1998, 1999, 2000, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/objc.exp b/gcc/testsuite/lib/objc.exp
index 8cff974602..5ecefa92f9 100644
--- a/gcc/testsuite/lib/objc.exp
+++ b/gcc/testsuite/lib/objc.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1992, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2004, 2005,
-# 2007, 2008, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1992-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/options.exp b/gcc/testsuite/lib/options.exp
index ab4819343f..d420ad9306 100644
--- a/gcc/testsuite/lib/options.exp
+++ b/gcc/testsuite/lib/options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/plugin-support.exp b/gcc/testsuite/lib/plugin-support.exp
index 7d04bf17fc..9be919b713 100644
--- a/gcc/testsuite/lib/plugin-support.exp
+++ b/gcc/testsuite/lib/plugin-support.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2009-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,7 +70,8 @@ proc plugin-test-execute { plugin_src plugin_tests } {
set base [file rootname $basename]
set plugin_lib $base.so
- verbose "Test the plugin $basename" 1
+ set testcase [dg-trim-dirname $srcdir $plugin_src]
+ verbose "Test the plugin $testcase" 1
# Build the plugin itself
set extra_flags [plugin-get-options $plugin_src]
@@ -100,10 +101,10 @@ proc plugin-test-execute { plugin_src plugin_tests } {
set optstr [concat $optstr " $op"]
}
}
- set optstr [concat $optstr "-DIN_GCC -fPIC -shared -undefined dynamic_lookup"]
+ set optstr [concat $optstr "-DIN_GCC -fPIC -shared -fno-rtti -undefined dynamic_lookup"]
} else {
set plug_cflags $PLUGINCFLAGS
- set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared"
+ set optstr "$includes $extra_flags -DIN_GCC -fPIC -shared -fno-rtti"
}
# Temporarily switch to the environment for the plugin compiler.
@@ -113,8 +114,12 @@ proc plugin-test-execute { plugin_src plugin_tests } {
set_ld_library_path_env_vars
if { $status != 0 } then {
- unresolved "$basename compilation, $optstr"
+ fail "$testcase compilation"
+ # Strictly, this is wrong: the tests compiled with the plugin should
+ # become unresolved instead.
return
+ } else {
+ pass "$testcase compilation"
}
# Compile the input source files with the plugin
diff --git a/gcc/testsuite/lib/profopt.exp b/gcc/testsuite/lib/profopt.exp
index b74b7cae1e..cb6a350dd1 100644
--- a/gcc/testsuite/lib/profopt.exp
+++ b/gcc/testsuite/lib/profopt.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2001, 2004, 2005, 2007, 2008, 2010, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 2001-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -278,7 +277,7 @@ proc profopt-execute { src } {
set dg-do-what [list "run" "" P]
set extra_flags [profopt-get-options $src]
if { [lindex ${dg-do-what} 1 ] == "N" } {
- unsupported "$src"
+ unsupported "$testcase"
unset testname_with_flags
verbose "$src not supported on this target, skipping it" 3
return
diff --git a/gcc/testsuite/lib/prune.exp b/gcc/testsuite/lib/prune.exp
index 09d2581110..679d894e26 100644
--- a/gcc/testsuite/lib/prune.exp
+++ b/gcc/testsuite/lib/prune.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2002, 2004, 2007, 2008, 2010, 2011
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,6 +16,11 @@
# Prune messages from gcc that aren't useful.
+if ![info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS ""
+}
+set TEST_ALWAYS_FLAGS "-fno-diagnostics-show-caret -fdiagnostics-color=never $TEST_ALWAYS_FLAGS"
+
proc prune_gcc_output { text } {
#send_user "Before:$text\n"
@@ -42,9 +46,6 @@ proc prune_gcc_output { text } {
regsub -all "(^|\n)\[^\n\]*: Additional NOP may be necessary to workaround Itanium processor A/B step errata" $text "" text
regsub -all "(^|\n)\[^\n*\]*: Assembler messages:\[^\n\]*" $text "" text
- # Ignore second line of IRIX 6 linker multiline message.
- regsub -all "(^|\n)\[ \t\]*that might degrade performance on an older version \\(rev. 2.2\\) R4000 processor.\[^\n\]*" $text "" text
-
# Ignore harmless VTA note.
regsub -all "(^|\n)\[^\n\]*: note: variable tracking size limit exceeded with -fvar-tracking-assignments, retrying without\[^\n\]*" $text "" text
@@ -58,7 +59,7 @@ proc prune_gcc_output { text } {
# Ignore harmless warnings from Xcode 3.2.x.
regsub -all "(^|\n)\[^\n\]*ld: warning: can't add line info to anonymous symbol\[^\n\]*" $text "" text
- regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*_bound\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
+ regsub -all "(^|\n)\[^\n\]*warning: DWARFDebugInfoEntry::AppendDependants\[^\n\]*AT_\[^\n\]*FORM_ref4\[^\n\]*" $text "" text
regsub -all "(^|\n)\[^\n\]*warning:\[^\n\]*TAG_variable: AT_location\[^\n\]*didn't have valid function low pc\[^\n\]*" $text "" text
# Ignore harmless warnings from Xcode 4.0.
diff --git a/gcc/testsuite/lib/scanasm.exp b/gcc/testsuite/lib/scanasm.exp
index 51c19d3ade..6e3e9d8fb6 100644
--- a/gcc/testsuite/lib/scanasm.exp
+++ b/gcc/testsuite/lib/scanasm.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2000, 2002, 2003, 2007, 2008, 2010, 2011, 2012
-# Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -83,10 +82,7 @@ proc scan-assembler { args } {
dg-scan "scan-assembler" 1 $testcase $output_file $args
}
-proc scan-assembler_required_options { args } {
- global gcc_force_conventional_output
- return $gcc_force_conventional_output
-}
+force_conventional_output_for scan-assembler
# Check that a pattern is not present in the .s file produced by the
# compiler. See dg-scan for details.
@@ -98,10 +94,7 @@ proc scan-assembler-not { args } {
dg-scan "scan-assembler-not" 0 $testcase $output_file $args
}
-proc scan-assembler-not_required_options { args } {
- global gcc_force_conventional_output
- return $gcc_force_conventional_output
-}
+force_conventional_output_for scan-assembler-not
# Return the scan for the assembly for hidden visibility.
@@ -184,6 +177,38 @@ proc scan-stack-usage-not { args } {
dg-scan "scan-file-not" 0 $testcase $output_file $args
}
+# Return the filename of the Ada spec corresponding to the argument.
+
+proc get_ada_spec_filename { testcase } {
+ # The name might include a list of options; extract the file name.
+ set filename [lindex $testcase 0]
+ set tailname [file tail $filename]
+ set extension [string trimleft [file extension $tailname] {.}]
+ regsub -all {\-} [file rootname $tailname] {_} rootname
+
+ return [string tolower "${rootname}_${extension}.ads"]
+}
+
+# Look for a pattern in the .ads file produced by the compiler. See
+# dg-scan for details.
+
+proc scan-ada-spec { args } {
+ set testcase [testname-for-summary]
+ set output_file "[get_ada_spec_filename $testcase]"
+
+ dg-scan "scan-file" 1 $testcase $output_file $args
+}
+
+# Check that a pattern is not present in the .ads file produced by the
+# compiler. See dg-scan for details.
+
+proc scan-ada-spec-not { args } {
+ set testcase [testname-for-summary]
+ set output_file "[get_ada_spec_filename $testcase]"
+
+ dg-scan "scan-file-not" 0 $testcase $output_file $args
+}
+
# Call pass if pattern is present given number of times, otherwise fail.
proc scan-assembler-times { args } {
if { [llength $args] < 2 } {
@@ -228,6 +253,8 @@ proc scan-assembler-times { args } {
}
}
+force_conventional_output_for scan-assembler-times
+
# Utility for scanning demangled compiler result, invoked via dg-final.
# Call pass if pattern is present, otherwise fail.
proc scan-assembler-dem { args } {
@@ -457,7 +484,7 @@ proc dg-function-on-line { args } {
set pattern [format {\t;[^:]+:%d\n(\t[^\t]+\n)+%s:\n\t.PROC} \
$line $symbol]
} elseif { [istarget mips*-*-*] } {
- set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n(\t.cfi_startproc[^\t]*\n)*\t\.set\t(no)?mips16\n\t\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
+ set pattern [format {\t\.loc [0-9]+ %d 0( [^\n]*)?\n(\t.cfi_startproc[^\t]*\n)*\t\.set\t(no)?mips16\n\t(\.set\t(no)?micromips\n\t)?\.ent\t%s\n\t\.type\t%s, @function\n%s:\n} \
$line $symbol $symbol $symbol]
} else {
set pattern [format {%s:[^\t]*(\t.(fnstart|frame|mask|file)[^\t]*)*\t[^:]+:%d\n} \
diff --git a/gcc/testsuite/lib/scandump.exp b/gcc/testsuite/lib/scandump.exp
index b3bf2a9358..b1524d4438 100644
--- a/gcc/testsuite/lib/scandump.exp
+++ b/gcc/testsuite/lib/scandump.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2000, 2002, 2003, 2005, 2007, 2008
-# Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/scanipa.exp b/gcc/testsuite/lib/scanipa.exp
index 113e453f72..47d56bf64e 100644
--- a/gcc/testsuite/lib/scanipa.exp
+++ b/gcc/testsuite/lib/scanipa.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2000, 2002, 2003, 2005, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/scanrtl.exp b/gcc/testsuite/lib/scanrtl.exp
index e33328bb7f..0507cc9138 100644
--- a/gcc/testsuite/lib/scanrtl.exp
+++ b/gcc/testsuite/lib/scanrtl.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2006-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -42,6 +42,8 @@ proc scan-rtl-dump { args } {
}
}
+force_conventional_output_for scan-rtl-dump
+
# Call pass if pattern is present given number of times, otherwise fail.
# Argument 0 is the regexp to match
# Argument 1 is number of times the regexp must be found
@@ -66,6 +68,8 @@ proc scan-rtl-dump-times { args } {
}
}
+force_conventional_output_for scan-rtl-dump-times
+
# Call pass if pattern is not present, otherwise fail.
#
# Argument 0 is the regexp to match
@@ -90,6 +94,8 @@ proc scan-rtl-dump-not { args } {
}
}
+force_conventional_output_for scan-rtl-dump-not
+
# Utility for scanning demangled compiler result, invoked via dg-final.
# Call pass if pattern is present, otherwise fail.
#
@@ -115,6 +121,8 @@ proc scan-rtl-dump-dem { args } {
}
}
+force_conventional_output_for scan-rtl-dump-dem
+
# Call pass if demangled pattern is not present, otherwise fail.
#
# Argument 0 is the regexp to match
@@ -139,3 +147,5 @@ proc scan-rtl-dump-dem-not { args } {
"\[0-9\]\[0-9\]\[0-9\]r.[lindex $args 1]"
}
}
+
+force_conventional_output_for scan-rtl-dump-dem-not
diff --git a/gcc/testsuite/lib/scantree.exp b/gcc/testsuite/lib/scantree.exp
index 7b9aca3da1..147c65f338 100644
--- a/gcc/testsuite/lib/scantree.exp
+++ b/gcc/testsuite/lib/scantree.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 2000, 2002, 2003, 2005, 2006, 2007
-# Free Software Foundation, Inc.
+# Copyright (C) 2000-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/target-libpath.exp b/gcc/testsuite/lib/target-libpath.exp
index d3d743810f..1891088c44 100644
--- a/gcc/testsuite/lib/target-libpath.exp
+++ b/gcc/testsuite/lib/target-libpath.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,8 +20,6 @@ set orig_environment_saved 0
set orig_ld_library_path_saved 0
set orig_ld_run_path_saved 0
set orig_shlib_path_saved 0
-set orig_ld_libraryn32_path_saved 0
-set orig_ld_library64_path_saved 0
set orig_ld_library_path_32_saved 0
set orig_ld_library_path_64_saved 0
set orig_dyld_library_path_saved 0
@@ -39,8 +37,6 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path_saved
global orig_ld_run_path_saved
global orig_shlib_path_saved
- global orig_ld_libraryn32_path_saved
- global orig_ld_library64_path_saved
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
@@ -49,8 +45,6 @@ proc set_ld_library_path_env_vars { } {
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
- global orig_ld_libraryn32_path
- global orig_ld_library64_path
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
@@ -94,14 +88,6 @@ proc set_ld_library_path_env_vars { } {
set orig_shlib_path "$env(SHLIB_PATH)"
set orig_shlib_path_saved 1
}
- if [info exists env(LD_LIBRARYN32_PATH)] {
- set orig_ld_libraryn32_path "$env(LD_LIBRARYN32_PATH)"
- set orig_ld_libraryn32_path_saved 1
- }
- if [info exists env(LD_LIBRARY64_PATH)] {
- set orig_ld_library64_path "$env(LD_LIBRARY64_PATH)"
- set orig_ld_library64_path_saved 1
- }
if [info exists env(LD_LIBRARY_PATH_32)] {
set orig_ld_library_path_32 "$env(LD_LIBRARY_PATH_32)"
set orig_ld_library_path_32_saved 1
@@ -121,12 +107,11 @@ proc set_ld_library_path_env_vars { } {
# It only sets SHLIB_PATH and LD_LIBRARY_PATH when it executes a
# program. We also need the environment set for compilations, etc.
#
- # On IRIX 6, we have to set variables akin to LD_LIBRARY_PATH, but
- # called LD_LIBRARYN32_PATH (for the N32 ABI) and LD_LIBRARY64_PATH
- # (for the 64-bit ABI). The same applies to Darwin (DYLD_LIBRARY_PATH),
- # Solaris 32 bit (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64),
- # and HP-UX (SHLIB_PATH). In some cases, the variables are independent
- # of LD_LIBRARY_PATH, and in other cases LD_LIBRARY_PATH is used if the
+ # On Darwin, we have to set variables akin to LD_LIBRARY_PATH, but called
+ # DYLD_LIBRARY_PATH. The same applies to Solaris 32 bit
+ # (LD_LIBRARY_PATH_32), Solaris 64 bit (LD_LIBRARY_PATH_64), and HP-UX
+ # (SHLIB_PATH). In some cases, the variables are independent of
+ # LD_LIBRARY_PATH, and in other cases LD_LIBRARY_PATH is used if the
# variable is not defined.
#
# Doing this is somewhat of a hack as ld_library_path gets repeated in
@@ -150,20 +135,6 @@ proc set_ld_library_path_env_vars { } {
} else {
setenv SHLIB_PATH "$ld_library_path"
}
- if { $orig_ld_libraryn32_path_saved } {
- setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_libraryn32_path"
- } elseif { $orig_ld_library_path_saved } {
- setenv LD_LIBRARYN32_PATH "$ld_library_path:$orig_ld_library_path"
- } else {
- setenv LD_LIBRARYN32_PATH "$ld_library_path"
- }
- if { $orig_ld_library64_path_saved } {
- setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library64_path"
- } elseif { $orig_ld_library_path_saved } {
- setenv LD_LIBRARY64_PATH "$ld_library_path:$orig_ld_library_path"
- } else {
- setenv LD_LIBRARY64_PATH "$ld_library_path"
- }
if { $orig_ld_library_path_32_saved } {
setenv LD_LIBRARY_PATH_32 "$ld_library_path:$orig_ld_library_path_32"
} elseif { $orig_ld_library_path_saved } {
@@ -184,7 +155,12 @@ proc set_ld_library_path_env_vars { } {
setenv DYLD_LIBRARY_PATH "$ld_library_path"
}
- verbose -log "set_ld_library_path_env_vars: ld_library_path=$ld_library_path"
+ verbose -log "LD_LIBRARY_PATH=[getenv LD_LIBRARY_PATH]"
+ verbose -log "LD_RUN_PATH=[getenv LD_RUN_PATH]"
+ verbose -log "SHLIB_PATH=[getenv SHLIB_PATH]"
+ verbose -log "LD_LIBRARY_PATH_32=[getenv LD_LIBRARY_PATH_32]"
+ verbose -log "LD_LIBRARY_PATH_64=[getenv LD_LIBRARY_PATH_64]"
+ verbose -log "DYLD_LIBRARY_PATH=[getenv DYLD_LIBRARY_PATH]"
}
#######################################
@@ -196,8 +172,6 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path_saved
global orig_ld_run_path_saved
global orig_shlib_path_saved
- global orig_ld_libraryn32_path_saved
- global orig_ld_library64_path_saved
global orig_ld_library_path_32_saved
global orig_ld_library_path_64_saved
global orig_dyld_library_path_saved
@@ -205,8 +179,6 @@ proc restore_ld_library_path_env_vars { } {
global orig_ld_library_path
global orig_ld_run_path
global orig_shlib_path
- global orig_ld_libraryn32_path
- global orig_ld_library64_path
global orig_ld_library_path_32
global orig_ld_library_path_64
global orig_dyld_library_path
@@ -238,16 +210,6 @@ proc restore_ld_library_path_env_vars { } {
} elseif [info exists env(SHLIB_PATH)] {
unsetenv SHLIB_PATH
}
- if { $orig_ld_libraryn32_path_saved } {
- setenv LD_LIBRARYN32_PATH "$orig_ld_libraryn32_path"
- } elseif [info exists env(LD_LIBRARYN32_PATH)] {
- unsetenv LD_LIBRARYN32_PATH
- }
- if { $orig_ld_library64_path_saved } {
- setenv LD_LIBRARY64_PATH "$orig_ld_library64_path"
- } elseif [info exists env(LD_LIBRARY64_PATH)] {
- unsetenv LD_LIBRARY64_PATH
- }
if { $orig_ld_library_path_32_saved } {
setenv LD_LIBRARY_PATH_32 "$orig_ld_library_path_32"
} elseif [info exists env(LD_LIBRARY_PATH_32)] {
diff --git a/gcc/testsuite/lib/target-supports-dg.exp b/gcc/testsuite/lib/target-supports-dg.exp
index 2f6c4c2ce8..171dc1b470 100644
--- a/gcc/testsuite/lib/target-supports-dg.exp
+++ b/gcc/testsuite/lib/target-supports-dg.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 1999, 2000, 2003, 2004, 2005, 2007, 2008, 2009, 2010,
-# 2011 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -208,7 +207,7 @@ proc dg-require-effective-target { args } {
# Evaluate selector if present.
if { [llength $args] == 2 } {
- switch [dg-process-target [lindex $args 1]] {
+ switch [dg-process-target-1 [lindex $args 1]] {
"S" { }
"N" { return }
}
@@ -304,6 +303,9 @@ proc check-flags { args } {
# If running a subset of the test suite, $TEST_ALWAYS_FLAGS may not exist.
catch {append compiler_flags " $TEST_ALWAYS_FLAGS "}
set dest [target_info name]
+ if [board_info $dest exists cflags] {
+ append compiler_flags "[board_info $dest cflags] "
+ }
if [board_info $dest exists multilib_flags] {
append compiler_flags "[board_info $dest multilib_flags] "
}
@@ -359,7 +361,7 @@ proc dg-skip-if { args } {
}
set selector [list target [lindex $args 1]]
- if { [dg-process-target $selector] == "S" } {
+ if { [dg-process-target-1 $selector] == "S" } {
if [check-flags $args] {
upvar dg-do-what dg-do-what
set dg-do-what [list [lindex ${dg-do-what} 0] "N" "P"]
@@ -383,7 +385,7 @@ proc dg-xfail-if { args } {
}
set selector [list target [lindex $args 1]]
- if { [dg-process-target $selector] == "S" } {
+ if { [dg-process-target-1 $selector] == "S" } {
global compiler_conditional_xfail_data
# The target list might be an effective-target keyword. Replace
@@ -418,7 +420,7 @@ proc dg-xfail-run-if { args } {
}
set selector [list target [lindex $args 1]]
- if { [dg-process-target $selector] == "S" } {
+ if { [dg-process-target-1 $selector] == "S" } {
if [check-flags $args] {
upvar dg-do-what dg-do-what
set dg-do-what [list [lindex ${dg-do-what} 0] "S" "F"]
@@ -442,7 +444,7 @@ proc dg-shouldfail { args } {
set args [lreplace $args 0 0]
if { [llength $args] > 1 } {
set selector [list target [lindex $args 1]]
- if { [dg-process-target $selector] == "S" } {
+ if { [dg-process-target-1 $selector] == "S" } {
# The target matches, now check the flags.
if [check-flags $args] {
set shouldfail 1
@@ -457,16 +459,19 @@ proc dg-shouldfail { args } {
# support use of an effective-target keyword in place of a list of
# target triplets to xfail or skip a test.
#
-# selector is one of:
-# xfail target-triplet-1 ...
-# xfail effective-target-keyword
-# xfail selector-expression
-# target target-triplet-1 ...
-# target effective-target-keyword
-# target selector-expression
+# The argument to dg-process-target is the keyword "target" or "xfail"
+# followed by a selector:
+# target-triplet-1 ...
+# effective-target-keyword
+# selector-expression
#
# For a target list the result is "S" if the target is selected, "N" otherwise.
# For an xfail list the result is "F" if the target is affected, "P" otherwise.
+
+# In contexts that allow either "target" or "xfail" the argument can be
+# target selector1 xfail selector2
+# which returns "N" if selector1 is not selected, otherwise the result of
+# "xfail selector2".
#
# A selector expression appears within curly braces and uses a single logical
# operator: !, &&, or ||. An operand is another selector expression, an
@@ -526,9 +531,11 @@ if { [info procs saved-dg-process-target] == [list] } {
return $answer
}
- proc dg-process-target { args } {
- verbose "replacement dg-process-target: `$args'" 2
-
+ # Evaluate "target selector" or "xfail selector".
+
+ proc dg-process-target-1 { args } {
+ verbose "dg-process-target-1: `$args'" 2
+
# Extract the 'what' keyword from the argument list.
set selector [string trim [lindex $args 0]]
if [regexp "^xfail " $selector] {
@@ -564,4 +571,29 @@ if { [info procs saved-dg-process-target] == [list] } {
# the list of target triplets.
return [saved-dg-process-target $selector]
}
+
+ # Intercept calls to the DejaGnu function. In addition to
+ # processing "target selector" or "xfail selector", handle
+ # "target selector1 xfail selector2".
+
+ proc dg-process-target { args } {
+ verbose "replacement dg-process-target: `$args'" 2
+
+ set selector [string trim [lindex $args 0]]
+
+ # If the argument list contains both 'target' and 'xfail',
+ # process 'target' and, if that succeeds, process 'xfail'.
+ if [regexp "^target .* xfail .*" $selector] {
+ set xfail_index [string first "xfail" $selector]
+ set xfail_selector [string range $selector $xfail_index end]
+ set target_selector [string range $selector 0 [expr $xfail_index-1]]
+ set target_selector [string trim $target_selector]
+ if { [dg-process-target-1 $target_selector] == "N" } {
+ return "N"
+ }
+ return [dg-process-target-1 $xfail_selector]
+
+ }
+ return [dg-process-target-1 $selector]
+ }
}
diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
index d3898d6014..52ec684fb6 100644
--- a/gcc/testsuite/lib/target-supports.exp
+++ b/gcc/testsuite/lib/target-supports.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1999, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
-# 2011, 2012 Free Software Foundation, Inc.
+# Copyright (C) 1999-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -227,16 +226,16 @@ proc check_weak_available { } {
return 1
}
- # All solaris2 targets should support it
+ # All AIX targets should support it
- if { [istarget *-*-solaris2*] } {
+ if { [istarget *-*-aix*] } {
return 1
}
- # DEC OSF/1/Digital UNIX/Tru64 UNIX supports it
+ # All solaris2 targets should support it
- if { [istarget alpha*-dec-osf*] } {
- return 1
+ if { [istarget *-*-solaris2*] } {
+ return 1
}
# Windows targets Cygwin and MingW32 support it
@@ -361,6 +360,16 @@ proc check_alias_available { } {
return $alias_available_saved
}
+# Returns 1 if the target toolchain supports strong aliases, 0 otherwise.
+
+proc check_effective_target_alias { } {
+ if { [check_alias_available] < 2 } {
+ return 0
+ } else {
+ return 1
+ }
+}
+
# Returns 1 if the target toolchain supports ifunc, 0 otherwise.
proc check_ifunc_available { } {
@@ -426,9 +435,10 @@ proc check_effective_target_trampolines { } {
return 0
}
if { [istarget avr-*-*]
+ || [istarget msp430-*-*]
|| [istarget hppa2.0w-hp-hpux11.23]
- || [istarget hppa64-hp-hpux11.23] } {
- return 0;
+ || [istarget hppa64-hp-hpux11.23] } {
+ return 0;
}
return 1
}
@@ -472,15 +482,6 @@ proc check_profiling_available { test_what } {
return 0
}
- # Support for -p on irix relies on libprof1.a which doesn't appear to
- # exist on any irix6 system currently posting testsuite results.
- # Support for -pg on irix relies on gcrt1.o which doesn't exist yet.
- # See: http://gcc.gnu.org/ml/gcc/2002-10/msg00169.html
- if { [istarget mips*-*-irix*]
- && ($test_what == "-p" || $test_what == "-pg") } {
- return 0
- }
-
# We don't yet support profiling for MIPS16.
if { [istarget mips*-*-*]
&& ![check_effective_target_nomips16]
@@ -508,7 +509,8 @@ proc check_profiling_available { test_what } {
if {![info exists profiling_available_saved]} {
# Some targets don't have any implementation of __bb_init_func or are
# missing other needed machinery.
- if { [istarget am3*-*-linux*]
+ if { [istarget aarch64*-*-elf]
+ || [istarget am3*-*-linux*]
|| [istarget arm*-*-eabi*]
|| [istarget arm*-*-elf]
|| [istarget arm*-*-symbianelf*]
@@ -527,6 +529,9 @@ proc check_profiling_available { test_what } {
|| [istarget mmix-*-*]
|| [istarget mn10300-*-elf*]
|| [istarget moxie-*-elf*]
+ || [istarget msp430-*-*]
+ || [istarget nds32*-*-elf]
+ || [istarget nios2-*-elf]
|| [istarget picochip-*-*]
|| [istarget powerpc-*-eabi*]
|| [istarget powerpc-*-elf]
@@ -584,16 +589,11 @@ proc check_effective_target_pcc_bitfield_type_matters { } {
# Add to FLAGS all the target-specific flags needed to use thread-local storage.
proc add_options_for_tls { flags } {
- # Tru64 UNIX uses emutls, which relies on a couple of pthread functions
- # which only live in libpthread, so always pass -pthread for TLS.
- if { [istarget alpha*-dec-osf*] } {
- return "$flags -pthread"
- }
- # On Solaris 8 and 9, __tls_get_addr/___tls_get_addr only lives in
- # libthread, so always pass -pthread for native TLS.
+ # On Solaris 9, __tls_get_addr/___tls_get_addr only lives in
+ # libthread, so always pass -pthread for native TLS. Same for AIX.
# Need to duplicate native TLS check from
# check_effective_target_tls_native to avoid recursion.
- if { [istarget *-*-solaris2.\[89\]*] &&
+ if { ([istarget *-*-solaris2.9*] || [istarget powerpc-ibm-aix*]) &&
[check_no_messages_and_pattern tls_native "!emutls" assembly {
__thread int i;
int f (void) { return i; }
@@ -649,6 +649,11 @@ proc check_effective_target_tls_emulated {} {
# Return 1 if TLS executables can run correctly, 0 otherwise.
proc check_effective_target_tls_runtime {} {
+ # MSP430 runtime does not have TLS support, but just
+ # running the test below is insufficient to show this.
+ if { [istarget msp430-*-*] } {
+ return 0
+ }
return [check_runtime tls_runtime {
__thread int thr = 0;
int main (void) { return thr; }
@@ -698,6 +703,14 @@ proc check_effective_target_scheduling {} {
} "-fschedule-insns"]
}
+# Return 1 if trapping arithmetic is available, 0 otherwise.
+
+proc check_effective_target_trapping {} {
+ return [check_no_compiler_messages scheduling object {
+ add (int a, int b) { return a + b; }
+ } "-ftrapv"]
+}
+
# Return 1 if compilation with -fgraphite is error-free for trivial
# code, 0 otherwise.
@@ -731,6 +744,44 @@ proc check_effective_target_mmap {} {
return [check_function_available "mmap"]
}
+# Return 1 if the target supports dlopen, 0 otherwise.
+proc check_effective_target_dlopen {} {
+ return [check_no_compiler_messages dlopen executable {
+ #include <dlfcn.h>
+ int main(void) { dlopen ("dummy.so", RTLD_NOW); }
+ } [add_options_for_dlopen ""]]
+}
+
+proc add_options_for_dlopen { flags } {
+ return "$flags -ldl"
+}
+
+# Return 1 if the target supports clone, 0 otherwise.
+proc check_effective_target_clone {} {
+ return [check_function_available "clone"]
+}
+
+# Return 1 if the target supports setrlimit, 0 otherwise.
+proc check_effective_target_setrlimit {} {
+ # Darwin has non-posix compliant RLIMIT_AS
+ if { [istarget *-*-darwin*] } {
+ return 0
+ }
+ return [check_function_available "setrlimit"]
+}
+
+# Return 1 if the target supports swapcontext, 0 otherwise.
+proc check_effective_target_swapcontext {} {
+ return [check_no_compiler_messages swapcontext executable {
+ #include <ucontext.h>
+ int main (void)
+ {
+ ucontext_t orig_context,child_context;
+ if (swapcontext(&child_context, &orig_context) < 0) { }
+ }
+ }]
+}
+
# Return 1 if compilation with -pthread is error-free for trivial
# code, 0 otherwise.
@@ -794,11 +845,25 @@ proc check_effective_target_fpic { } {
return 0
}
+# Return 1 if -shared is supported, as in no warnings or errors
+# emitted, 0 otherwise.
+
+proc check_effective_target_shared { } {
+ # Note that M68K has a multilib that supports -fpic but not
+ # -fPIC, so we need to check both. We test with a program that
+ # requires GOT references.
+ return [check_no_compiler_messages shared executable {
+ extern int foo (void); extern int bar;
+ int baz (void) { return foo () + bar; }
+ } "-shared -fpic"]
+}
+
# Return 1 if -pie, -fpie and -fPIE are supported, 0 otherwise.
proc check_effective_target_pie { } {
if { [istarget *-*-darwin\[912\]*]
- || [istarget *-*-linux*] } {
+ || [istarget *-*-linux*]
+ || [istarget *-*-gnu*] } {
return 1;
}
return 0
@@ -990,15 +1055,24 @@ proc check_iconv_available { test_what } {
}] $libiconv]
}
+# Return true if Cilk Library is supported on the target.
+proc check_libcilkrts_available { } {
+ return [ check_no_compiler_messages_nocache libcilkrts_available executable {
+ #ifdef __cplusplus
+ extern "C"
+ #endif
+ int __cilkrts_set_param (const char *, const char *);
+ int main (void) {
+ int x = __cilkrts_set_param ("nworkers", "0");
+ return x;
+ }
+ } "-fcilkplus -lcilkrts" ]
+}
+
# Return 1 if an ASCII locale is supported on this host, 0 otherwise.
proc check_ascii_locale_available { } {
- if { ([ishost alpha*-dec-osf*] || [ishost mips-sgi-irix*]) } {
- # Neither Tru64 UNIX nor IRIX support an ASCII locale.
- return 0
- } else {
- return 1
- }
+ return 1
}
# Return true if named sections are supported on this target.
@@ -1009,6 +1083,14 @@ proc check_named_sections_available { } {
}]
}
+# Return true if the "naked" function attribute is supported on this target.
+
+proc check_effective_target_naked_functions { } {
+ return [check_no_compiler_messages naked_functions assembly {
+ void f() __attribute__((naked));
+ }]
+}
+
# Return 1 if the target supports Fortran real kinds larger than real(8),
# 0 otherwise.
#
@@ -1100,6 +1182,24 @@ proc check_effective_target_static_libgfortran { } {
} "-static"]
}
+# Return 1 if cilk-plus is supported by the target, 0 otherwise.
+
+proc check_effective_target_cilkplus { } {
+ # Skip cilk-plus tests on int16 and size16 targets for now.
+ # The cilk-plus tests are not generic enough to cover these
+ # cases and would throw hundreds of FAILs.
+ if { [check_effective_target_int16]
+ || ![check_effective_target_size32plus] } {
+ return 0;
+ }
+
+ # Skip AVR, its RAM is too small and too many tests would fail.
+ if { [istarget avr-*-*] } {
+ return 0;
+ }
+ return 1
+}
+
proc check_linker_plugin_available { } {
return [check_no_compiler_messages_nocache linker_plugin executable {
int main() { return 0; }
@@ -1280,6 +1380,32 @@ proc check_effective_target_avx_runtime { } {
return 0
}
+# Return 1 if the target supports executing power8 vector instructions, 0
+# otherwise. Cache the result.
+
+proc check_p8vector_hw_available { } {
+ return [check_cached_effective_target p8vector_hw_available {
+ # Some simulators are known to not support VSX/power8 instructions.
+ # For now, disable on Darwin
+ if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} {
+ expr 0
+ } else {
+ set options "-mpower8-vector"
+ check_runtime_nocache p8vector_hw_available {
+ int main()
+ {
+ #ifdef __MACH__
+ asm volatile ("xxlorc vs0,vs0,vs0");
+ #else
+ asm volatile ("xxlorc 0,0,0");
+ #endif
+ return 0;
+ }
+ } $options
+ }
+ }]
+}
+
# Return 1 if the target supports executing VSX instructions, 0
# otherwise. Cache the result.
@@ -1647,6 +1773,15 @@ proc check_effective_target_x32 { } {
}]
}
+# Return 1 if we're generating 32-bit integers using default
+# options, 0 otherwise.
+
+proc check_effective_target_int32 { } {
+ return [check_no_compiler_messages int32 object {
+ int dummy[sizeof (int) == 4 ? 1 : -1];
+ }]
+}
+
# Return 1 if we're generating 32-bit or larger integers using default
# options, 0 otherwise.
@@ -1660,6 +1795,13 @@ proc check_effective_target_int32plus { } {
# options, 0 otherwise.
proc check_effective_target_ptr32plus { } {
+ # The msp430 has 16-bit or 20-bit pointers. The 20-bit pointer is stored
+ # in a 32-bit slot when in memory, so sizeof(void *) returns 4, but it
+ # cannot really hold a 32-bit address, so we always return false here.
+ if { [istarget msp430-*-*] } {
+ return 0
+ }
+
return [check_no_compiler_messages ptr32plus object {
int dummy[sizeof (void *) >= 4 ? 1 : -1];
}]
@@ -1706,6 +1848,15 @@ proc check_effective_target_llp64 { } {
}]
}
+# Return 1 if long and int have different sizes,
+# 0 otherwise.
+
+proc check_effective_target_long_neq_int { } {
+ return [check_no_compiler_messages long_ne_int object {
+ int dummy[sizeof (int) != sizeof (long) ? 1 : -1];
+ }]
+}
+
# Return 1 if the target supports long double larger than double,
# 0 otherwise.
@@ -1724,6 +1875,15 @@ proc check_effective_target_large_double { } {
}]
}
+# Return 1 if the target supports long double of 128 bits,
+# 0 otherwise.
+
+proc check_effective_target_longdouble128 { } {
+ return [check_no_compiler_messages longdouble128 object {
+ int dummy[sizeof(long double) == 16 ? 1 : -1];
+ }]
+}
+
# Return 1 if the target supports double of 64 bits,
# 0 otherwise.
@@ -1742,6 +1902,31 @@ proc check_effective_target_double64plus { } {
}]
}
+# Return 1 if the target supports 'w' suffix on floating constant
+# 0 otherwise.
+
+proc check_effective_target_has_w_floating_suffix { } {
+ set opts ""
+ if [check_effective_target_c++] {
+ append opts "-std=gnu++03"
+ }
+ return [check_no_compiler_messages w_fp_suffix object {
+ float dummy = 1.0w;
+ } "$opts"]
+}
+
+# Return 1 if the target supports 'q' suffix on floating constant
+# 0 otherwise.
+
+proc check_effective_target_has_q_floating_suffix { } {
+ set opts ""
+ if [check_effective_target_c++] {
+ append opts "-std=gnu++03"
+ }
+ return [check_no_compiler_messages q_fp_suffix object {
+ float dummy = 1.0q;
+ } "$opts"]
+}
# Return 1 if the target supports compiling fixed-point,
# 0 otherwise.
@@ -1793,6 +1978,32 @@ proc check_effective_target_dfprt { } {
}]
}
+# Return 1 if the target supports executing DFP hardware instructions,
+# 0 otherwise. Cache the result.
+
+proc check_dfp_hw_available { } {
+ return [check_cached_effective_target dfp_hw_available {
+ # For now, disable on Darwin
+ if { [istarget powerpc-*-eabi] || [istarget powerpc*-*-eabispe] || [istarget *-*-darwin*]} {
+ expr 0
+ } else {
+ check_runtime_nocache dfp_hw_available {
+ volatile _Decimal64 r;
+ volatile _Decimal64 a = 4.0DD;
+ volatile _Decimal64 b = 2.0DD;
+ int main()
+ {
+ asm volatile ("dadd %0,%1,%2" : "=d" (r) : "d" (a), "d" (b));
+ asm volatile ("dsub %0,%1,%2" : "=d" (r) : "d" (a), "d" (b));
+ asm volatile ("dmul %0,%1,%2" : "=d" (r) : "d" (a), "d" (b));
+ asm volatile ("ddiv %0,%1,%2" : "=d" (r) : "d" (a), "d" (b));
+ return 0;
+ }
+ } "-mcpu=power6 -mhard-float"
+ }
+ }]
+}
+
# Return 1 if the target supports compiling and assembling UCN, 0 otherwise.
proc check_effective_target_ucn_nocache { } {
@@ -1855,7 +2066,8 @@ proc check_effective_target_vect_cmdline_needed { } {
|| [check_effective_target_powerpc_altivec]))
|| ([istarget sparc*-*-*] && [check_effective_target_sparc_vis])
|| [istarget spu-*-*]
- || ([istarget arm*-*-*] && [check_effective_target_arm_neon]) } {
+ || ([istarget arm*-*-*] && [check_effective_target_arm_neon])
+ || [istarget aarch64*-*-*] } {
set et_vect_cmdline_needed_saved 0
}
}
@@ -1883,6 +2095,7 @@ proc check_effective_target_vect_int { } {
|| [istarget sparc*-*-*]
|| [istarget alpha*-*-*]
|| [istarget ia64-*-*]
+ || [istarget aarch64*-*-*]
|| [check_effective_target_arm32]
|| ([istarget mips*-*-*]
&& [check_effective_target_mips_loongson]) } {
@@ -1946,6 +2159,7 @@ proc check_effective_target_vect_uintfloat_cvt { } {
|| ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget x86_64-*-*]
+ || [istarget aarch64*-*-*]
|| ([istarget arm*-*-*]
&& [check_effective_target_arm_neon_ok])} {
set et_vect_uintfloat_cvt_saved 1
@@ -2003,6 +2217,50 @@ proc check_effective_target_vect_floatuint_cvt { } {
return $et_vect_floatuint_cvt_saved
}
+# Return 1 if the target supports #pragma omp declare simd, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_simd_clones { } {
+ global et_vect_simd_clones_saved
+
+ if [info exists et_vect_simd_clones_saved] {
+ verbose "check_effective_target_vect_simd_clones: using cached result" 2
+ } else {
+ set et_vect_simd_clones_saved 0
+ if { [istarget i?86-*-*] || [istarget x86_64-*-*] } {
+ # On i?86/x86_64 #pragma omp declare simd builds a sse2, avx and
+ # avx2 clone. Only the right clone for the specified arch will be
+ # chosen, but still we need to at least be able to assemble
+ # avx2.
+ if { [check_effective_target_avx2] } {
+ set et_vect_simd_clones_saved 1
+ }
+ }
+ }
+
+ verbose "check_effective_target_vect_simd_clones: returning $et_vect_simd_clones_saved" 2
+ return $et_vect_simd_clones_saved
+}
+
+# Return 1 if this is a AArch64 target supporting big endian
+proc check_effective_target_aarch64_big_endian { } {
+ return [check_no_compiler_messages aarch64_big_endian assembly {
+ #if !defined(__aarch64__) || !defined(__AARCH64EB__)
+ #error FOO
+ #endif
+ }]
+}
+
+# Return 1 if this is a AArch64 target supporting little endian
+proc check_effective_target_aarch64_little_endian { } {
+ return [check_no_compiler_messages aarch64_little_endian assembly {
+ #if !defined(__aarch64__) || defined(__AARCH64EB__)
+ #error FOO
+ #endif
+ }]
+}
+
# Return 1 is this is an arm target using 32-bit instructions
proc check_effective_target_arm32 { } {
return [check_no_compiler_messages arm32 assembly {
@@ -2056,6 +2314,35 @@ proc check_effective_target_arm_vfp_ok { } {
}
}
+# Return 1 if this is an ARM target supporting -mfpu=vfp3
+# -mfloat-abi=softfp.
+
+proc check_effective_target_arm_vfp3_ok { } {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_vfp3_ok object {
+ int dummy;
+ } "-mfpu=vfp3 -mfloat-abi=softfp"]
+ } else {
+ return 0
+ }
+}
+
+# Return 1 if this is an ARM target supporting -mfpu=fp-armv8
+# -mfloat-abi=softfp.
+proc check_effective_target_arm_v8_vfp_ok {} {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_v8_vfp_ok object {
+ int foo (void)
+ {
+ __asm__ volatile ("vrinta.f32.f32 s0, s0");
+ return 0;
+ }
+ } "-mfpu=fp-armv8 -mfloat-abi=softfp"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is an ARM target supporting -mfpu=vfp
# -mfloat-abi=hard. Some multilibs may be incompatible with these
# options.
@@ -2095,6 +2382,49 @@ proc check_effective_target_arm_unaligned { } {
}]
}
+# Return 1 if this is an ARM target supporting -mfpu=crypto-neon-fp-armv8
+# -mfloat-abi=softfp or equivalent options. Some multilibs may be
+# incompatible with these options. Also set et_arm_crypto_flags to the
+# best options to add.
+
+proc check_effective_target_arm_crypto_ok_nocache { } {
+ global et_arm_crypto_flags
+ set et_arm_crypto_flags ""
+ if { [check_effective_target_arm32] } {
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=crypto-neon-fp-armv8" "-mfpu=crypto-neon-fp-armv8 -mfloat-abi=softfp"} {
+ if { [check_no_compiler_messages_nocache arm_crypto_ok object {
+ #include "arm_neon.h"
+ uint8x16_t
+ foo (uint8x16_t a, uint8x16_t b)
+ {
+ return vaeseq_u8 (a, b);
+ }
+ } "$flags"] } {
+ set et_arm_crypto_flags $flags
+ return 1
+ }
+ }
+ }
+
+ return 0
+}
+
+# Return 1 if this is an ARM target supporting -mfpu=crypto-neon-fp-armv8
+
+proc check_effective_target_arm_crypto_ok { } {
+ return [check_cached_effective_target arm_crypto_ok \
+ check_effective_target_arm_crypto_ok_nocache]
+}
+
+# Add options for crypto extensions.
+proc add_options_for_arm_crypto { flags } {
+ if { ! [check_effective_target_arm_crypto_ok] } {
+ return "$flags"
+ }
+ global et_arm_crypto_flags
+ return "$flags $et_arm_crypto_flags"
+}
+
# Add the options needed for NEON. We need either -mfloat-abi=softfp
# or -mfloat-abi=hard, but if one is already specified by the
# multilib, use it. Similarly, if a -mfpu option already enables
@@ -2108,6 +2438,50 @@ proc add_options_for_arm_neon { flags } {
return "$flags $et_arm_neon_flags"
}
+proc add_options_for_arm_v8_vfp { flags } {
+ if { ! [check_effective_target_arm_v8_vfp_ok] } {
+ return "$flags"
+ }
+ return "$flags -mfpu=fp-armv8 -mfloat-abi=softfp"
+}
+
+proc add_options_for_arm_v8_neon { flags } {
+ if { ! [check_effective_target_arm_v8_neon_ok] } {
+ return "$flags"
+ }
+ global et_arm_v8_neon_flags
+ return "$flags $et_arm_v8_neon_flags -march=armv8-a"
+}
+
+proc add_options_for_arm_crc { flags } {
+ if { ! [check_effective_target_arm_crc_ok] } {
+ return "$flags"
+ }
+ global et_arm_crc_flags
+ return "$flags $et_arm_crc_flags"
+}
+
+# Add the options needed for NEON. We need either -mfloat-abi=softfp
+# or -mfloat-abi=hard, but if one is already specified by the
+# multilib, use it. Similarly, if a -mfpu option already enables
+# NEON, do not add -mfpu=neon.
+
+proc add_options_for_arm_neonv2 { flags } {
+ if { ! [check_effective_target_arm_neonv2_ok] } {
+ return "$flags"
+ }
+ global et_arm_neonv2_flags
+ return "$flags $et_arm_neonv2_flags"
+}
+
+# Add the options needed for vfp3.
+proc add_options_for_arm_vfp3 { flags } {
+ if { ! [check_effective_target_arm_vfp3_ok] } {
+ return "$flags"
+ }
+ return "$flags -mfpu=vfp3 -mfloat-abi=softfp"
+}
+
# Return 1 if this is an ARM target supporting -mfpu=neon
# -mfloat-abi=softfp or equivalent options. Some multilibs may be
# incompatible with these options. Also set et_arm_neon_flags to the
@@ -2136,6 +2510,129 @@ proc check_effective_target_arm_neon_ok { } {
check_effective_target_arm_neon_ok_nocache]
}
+proc check_effective_target_arm_crc_ok_nocache { } {
+ global et_arm_crc_flags
+ set et_arm_crc_flags "-march=armv8-a+crc"
+ return [check_no_compiler_messages_nocache arm_crc_ok object {
+ #if !defined (__ARM_FEATURE_CRC32)
+ #error FOO
+ #endif
+ } "$et_arm_crc_flags"]
+}
+
+proc check_effective_target_arm_crc_ok { } {
+ return [check_cached_effective_target arm_crc_ok \
+ check_effective_target_arm_crc_ok_nocache]
+}
+
+# Return 1 if this is an ARM target supporting -mfpu=neon-fp16
+# -mfloat-abi=softfp or equivalent options. Some multilibs may be
+# incompatible with these options. Also set et_arm_neon_flags to the
+# best options to add.
+
+proc check_effective_target_arm_neon_fp16_ok_nocache { } {
+ global et_arm_neon_fp16_flags
+ set et_arm_neon_fp16_flags ""
+ if { [check_effective_target_arm32] } {
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp16"
+ "-mfpu=neon-fp16 -mfloat-abi=softfp"} {
+ if { [check_no_compiler_messages_nocache arm_neon_fp_16_ok object {
+ #include "arm_neon.h"
+ float16x4_t
+ foo (float32x4_t arg)
+ {
+ return vcvt_f16_f32 (arg);
+ }
+ } "$flags"] } {
+ set et_arm_neon_fp16_flags $flags
+ return 1
+ }
+ }
+ }
+
+ return 0
+}
+
+proc check_effective_target_arm_neon_fp16_ok { } {
+ return [check_cached_effective_target arm_neon_fp16_ok \
+ check_effective_target_arm_neon_fp16_ok_nocache]
+}
+
+proc add_options_for_arm_neon_fp16 { flags } {
+ if { ! [check_effective_target_arm_neon_fp16_ok] } {
+ return "$flags"
+ }
+ global et_arm_neon_fp16_flags
+ return "$flags $et_arm_neon_fp16_flags"
+}
+
+# Return 1 if this is an ARM target supporting -mfpu=neon-fp-armv8
+# -mfloat-abi=softfp or equivalent options. Some multilibs may be
+# incompatible with these options. Also set et_arm_v8_neon_flags to the
+# best options to add.
+
+proc check_effective_target_arm_v8_neon_ok_nocache { } {
+ global et_arm_v8_neon_flags
+ set et_arm_v8_neon_flags ""
+ if { [check_effective_target_arm32] } {
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-fp-armv8" "-mfpu=neon-fp-armv8 -mfloat-abi=softfp"} {
+ if { [check_no_compiler_messages_nocache arm_v8_neon_ok object {
+ #if __ARM_ARCH < 8
+ #error not armv8 or later
+ #endif
+ #include "arm_neon.h"
+ void
+ foo ()
+ {
+ __asm__ volatile ("vrintn.f32 q0, q0");
+ }
+ } "$flags -march=armv8-a"] } {
+ set et_arm_v8_neon_flags $flags
+ return 1
+ }
+ }
+ }
+
+ return 0
+}
+
+proc check_effective_target_arm_v8_neon_ok { } {
+ return [check_cached_effective_target arm_v8_neon_ok \
+ check_effective_target_arm_v8_neon_ok_nocache]
+}
+
+# Return 1 if this is an ARM target supporting -mfpu=neon-vfpv4
+# -mfloat-abi=softfp or equivalent options. Some multilibs may be
+# incompatible with these options. Also set et_arm_neonv2_flags to the
+# best options to add.
+
+proc check_effective_target_arm_neonv2_ok_nocache { } {
+ global et_arm_neonv2_flags
+ set et_arm_neonv2_flags ""
+ if { [check_effective_target_arm32] } {
+ foreach flags {"" "-mfloat-abi=softfp" "-mfpu=neon-vfpv4" "-mfpu=neon-vfpv4 -mfloat-abi=softfp"} {
+ if { [check_no_compiler_messages_nocache arm_neonv2_ok object {
+ #include "arm_neon.h"
+ float32x2_t
+ foo (float32x2_t a, float32x2_t b, float32x2_t c)
+ {
+ return vfma_f32 (a, b, c);
+ }
+ } "$flags"] } {
+ set et_arm_neonv2_flags $flags
+ return 1
+ }
+ }
+ }
+
+ return 0
+}
+
+proc check_effective_target_arm_neonv2_ok { } {
+ return [check_cached_effective_target arm_neonv2_ok \
+ check_effective_target_arm_neonv2_ok_nocache]
+}
+
# Add the options needed for NEON. We need either -mfloat-abi=softfp
# or -mfloat-abi=hard, but if one is already specified by the
# multilib, use it.
@@ -2166,6 +2663,11 @@ proc check_effective_target_arm_fp16_ok_nocache { } {
# Must generate floating-point instructions.
return 0
}
+ if [check_effective_target_arm_hf_eabi] {
+ # Use existing float-abi and force an fpu which supports fp16
+ set et_arm_fp16_flags "-mfpu=vfpv4"
+ return 1;
+ }
if [check-flags [list "" { *-*-* } { "-mfpu=*" } { "" } ]] {
# The existing -mfpu value is OK; use it, but add softfp.
set et_arm_fp16_flags "-mfloat-abi=softfp"
@@ -2195,10 +2697,23 @@ proc check_effective_target_arm_fp16_ok { } {
# (Thumb in particular - but others may be added in the future)
# Usage: /* { dg-require-effective-target arm_arch_v5_ok } */
# /* { dg-add-options arm_arch_v5 } */
-foreach { armfunc armflag armdef } { v5 "-march=armv5 -marm" __ARM_ARCH_5__
+# /* { dg-require-effective-target arm_arch_v5_multilib } */
+foreach { armfunc armflag armdef } { v4 "-march=armv4 -marm" __ARM_ARCH_4__
+ v4t "-march=armv4t" __ARM_ARCH_4T__
+ v5 "-march=armv5 -marm" __ARM_ARCH_5__
+ v5t "-march=armv5t" __ARM_ARCH_5T__
+ v5te "-march=armv5te" __ARM_ARCH_5TE__
v6 "-march=armv6" __ARM_ARCH_6__
v6k "-march=armv6k" __ARM_ARCH_6K__
- v7a "-march=armv7-a" __ARM_ARCH_7A__ } {
+ v6t2 "-march=armv6t2" __ARM_ARCH_6T2__
+ v6z "-march=armv6z" __ARM_ARCH_6Z__
+ v6m "-march=armv6-m -mthumb" __ARM_ARCH_6M__
+ v7a "-march=armv7-a" __ARM_ARCH_7A__
+ v7ve "-march=armv7ve" __ARM_ARCH_7A__
+ v7r "-march=armv7-r" __ARM_ARCH_7R__
+ v7m "-march=armv7-m -mthumb" __ARM_ARCH_7M__
+ v7em "-march=armv7e-m -mthumb" __ARM_ARCH_7EM__
+ v8a "-march=armv8-a" __ARM_ARCH_8A__ } {
eval [string map [list FUNC $armfunc FLAG $armflag DEF $armdef ] {
proc check_effective_target_arm_arch_FUNC_ok { } {
if { [ string match "*-marm*" "FLAG" ] &&
@@ -2215,6 +2730,16 @@ foreach { armfunc armflag armdef } { v5 "-march=armv5 -marm" __ARM_ARCH_5__
proc add_options_for_arm_arch_FUNC { flags } {
return "$flags FLAG"
}
+
+ proc check_effective_target_arm_arch_FUNC_multilib { } {
+ return [check_runtime arm_arch_FUNC_multilib {
+ int
+ main (void)
+ {
+ return 0;
+ }
+ } [add_options_for_arm_arch_FUNC ""]]
+ }
}]
}
@@ -2238,6 +2763,7 @@ proc check_effective_target_arm_thumb1_ok { } {
#if !defined(__arm__) || !defined(__thumb__) || defined(__thumb2__)
#error FOO
#endif
+ int foo (int i) { return i; }
} "-mthumb"]
}
@@ -2249,6 +2775,7 @@ proc check_effective_target_arm_thumb2_ok { } {
#if !defined(__thumb2__)
#error FOO
#endif
+ int foo (int i) { return i; }
} "-mthumb"]
}
@@ -2276,6 +2803,17 @@ proc check_effective_target_arm_thumb2 { } {
} ""]
}
+# Return 1 if this is an ARM target where conditional execution is available.
+
+proc check_effective_target_arm_cond_exec { } {
+ return [check_no_compiler_messages arm_cond_exec assembly {
+ #if defined(__arm__) && defined(__thumb__) && !defined(__thumb2__)
+ #error FOO
+ #endif
+ int i;
+ } ""]
+}
+
# Return 1 if this is an ARM cortex-M profile cpu
proc check_effective_target_arm_cortex_m { } {
@@ -2306,6 +2844,39 @@ proc check_effective_target_arm_neon_hw { } {
} [add_options_for_arm_neon ""]]
}
+proc check_effective_target_arm_neonv2_hw { } {
+ return [check_runtime arm_neon_hwv2_available {
+ #include "arm_neon.h"
+ int
+ main (void)
+ {
+ float32x2_t a, b, c;
+ asm ("vfma.f32 %P0, %P1, %P2"
+ : "=w" (a)
+ : "w" (b), "w" (c));
+ return 0;
+ }
+ } [add_options_for_arm_neonv2 ""]]
+}
+
+# Return 1 if the target supports executing ARMv8 NEON instructions, 0
+# otherwise.
+
+proc check_effective_target_arm_v8_neon_hw { } {
+ return [check_runtime arm_v8_neon_hw_available {
+ #include "arm_neon.h"
+ int
+ main (void)
+ {
+ float32x2_t a;
+ asm ("vrinta.f32 %P0, %P1"
+ : "=w" (a)
+ : "0" (a));
+ return 0;
+ }
+ } [add_options_for_arm_v8_neon ""]]
+}
+
# Return 1 if this is a ARM target with NEON enabled.
proc check_effective_target_arm_neon { } {
@@ -2322,6 +2893,24 @@ proc check_effective_target_arm_neon { } {
}
}
+proc check_effective_target_arm_neonv2 { } {
+ if { [check_effective_target_arm32] } {
+ return [check_no_compiler_messages arm_neon object {
+ #ifndef __ARM_NEON__
+ #error not NEON
+ #else
+ #ifndef __ARM_FEATURE_FMA
+ #error not NEONv2
+ #else
+ int dummy;
+ #endif
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this a Loongson-2E or -2F target using an ABI that supports
# the Loongson vector modes.
@@ -2346,6 +2935,19 @@ proc check_effective_target_arm_eabi { } {
}]
}
+# Return 1 if this is an ARM target that adheres to the hard-float variant of
+# the ABI for the ARM Architecture (e.g. -mfloat-abi=hard).
+
+proc check_effective_target_arm_hf_eabi { } {
+ return [check_no_compiler_messages arm_hf_eabi object {
+ #if !defined(__ARM_EABI__) || !defined(__ARM_PCS_VFP)
+ #error not hard-float EABI
+ #else
+ int dummy;
+ #endif
+ }]
+}
+
# Return 1 if this is an ARM target supporting -mcpu=iwmmxt.
# Some multilibs may be incompatible with this option.
@@ -2359,6 +2961,30 @@ proc check_effective_target_arm_iwmmxt_ok { } {
}
}
+# Return true if LDRD/STRD instructions are prefered over LDM/STM instructions
+# for an ARM target.
+proc check_effective_target_arm_prefer_ldrd_strd { } {
+ if { ![check_effective_target_arm32] } {
+ return 0;
+ }
+
+ return [check_no_messages_and_pattern arm_prefer_ldrd_strd "strd\tr" assembly {
+ void foo (int *p) { p[0] = 1; p[1] = 0;}
+ } "-O2 -mthumb" ]
+}
+
+# Return 1 if this is a PowerPC target supporting -meabi.
+
+proc check_effective_target_powerpc_eabi_ok { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_no_compiler_messages powerpc_eabi_ok object {
+ int dummy;
+ } "-meabi"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is a PowerPC target with floating-point registers.
proc check_effective_target_powerpc_fprs { } {
@@ -2414,9 +3040,9 @@ proc check_effective_target_powerpc_altivec_ok { } {
}
}
-# Return 1 if this is a PowerPC target supporting -mvsx
+# Return 1 if this is a PowerPC target supporting -mpower8-vector
-proc check_effective_target_powerpc_vsx_ok { } {
+proc check_effective_target_powerpc_p8vector_ok { } {
if { ([istarget powerpc*-*-*]
&& ![istarget powerpc-*-linux*paired*])
|| [istarget rs6000-*-*] } {
@@ -2426,6 +3052,33 @@ proc check_effective_target_powerpc_vsx_ok { } {
|| [istarget powerpc*-*-aix5.2*] } {
return 0
}
+ return [check_no_compiler_messages powerpc_p8vector_ok object {
+ int main (void) {
+#ifdef __MACH__
+ asm volatile ("xxlorc vs0,vs0,vs0");
+#else
+ asm volatile ("xxlorc 0,0,0");
+#endif
+ return 0;
+ }
+ } "-mpower8-vector"]
+ } else {
+ return 0
+ }
+}
+
+# Return 1 if this is a PowerPC target supporting -mvsx
+
+proc check_effective_target_powerpc_vsx_ok { } {
+ if { ([istarget powerpc*-*-*]
+ && ![istarget powerpc-*-linux*paired*])
+ || [istarget rs6000-*-*] } {
+ # VSX is not supported on AIX before 7.1.
+ if { [istarget powerpc*-*-aix4*]
+ || [istarget powerpc*-*-aix5*]
+ || [istarget powerpc*-*-aix6*] } {
+ return 0
+ }
return [check_no_compiler_messages powerpc_vsx_ok object {
int main (void) {
#ifdef __MACH__
@@ -2441,6 +3094,27 @@ proc check_effective_target_powerpc_vsx_ok { } {
}
}
+# Return 1 if this is a PowerPC target supporting -mhtm
+
+proc check_effective_target_powerpc_htm_ok { } {
+ if { ([istarget powerpc*-*-*]
+ && ![istarget powerpc-*-linux*paired*])
+ || [istarget rs6000-*-*] } {
+ # HTM is not supported on AIX yet.
+ if { [istarget powerpc*-*-aix*] } {
+ return 0
+ }
+ return [check_no_compiler_messages powerpc_htm_ok object {
+ int main (void) {
+ asm volatile ("tbegin. 0");
+ return 0;
+ }
+ } "-mhtm"]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is a PowerPC target supporting -mcpu=cell.
proc check_effective_target_powerpc_ppu_ok { } {
@@ -2536,6 +3210,22 @@ proc check_effective_target_powerpc_405_nocache { } {
}
}
+# Return 1 if this is a PowerPC target using the ELFv2 ABI.
+
+proc check_effective_target_powerpc_elfv2 { } {
+ if { [istarget powerpc*-*-*] } {
+ return [check_no_compiler_messages powerpc_elfv2 object {
+ #if _CALL_ELF != 2
+ #error not ELF v2 ABI
+ #else
+ int dummy;
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
# Return 1 if this is a SPU target with a toolchain that
# supports automatic overlay generation.
@@ -2622,6 +3312,7 @@ proc check_effective_target_vect_shift { } {
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
+ || [istarget aarch64*-*-*]
|| [check_effective_target_arm32]
|| ([istarget mips*-*-*]
&& [check_effective_target_mips_loongson]) } {
@@ -2688,9 +3379,11 @@ proc check_effective_target_vect_float { } {
if { [istarget i?86-*-*]
|| [istarget powerpc*-*-*]
|| [istarget spu-*-*]
+ || [istarget mips-sde-elf]
|| [istarget mipsisa64*-*-*]
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*]
+ || [istarget aarch64*-*-*]
|| [check_effective_target_arm32] } {
set et_vect_float_saved 1
}
@@ -2712,6 +3405,7 @@ proc check_effective_target_vect_double { } {
} else {
set et_vect_double_saved 0
if { [istarget i?86-*-*]
+ || [istarget aarch64*-*-*]
|| [istarget x86_64-*-*] } {
if { [check_no_compiler_messages vect_double assembly {
#ifdef __tune_atom__
@@ -2828,6 +3522,8 @@ proc check_effective_target_vect_perm { } {
} else {
set et_vect_perm_saved 0
if { [is-effective-target arm_neon_ok]
+ || ([istarget aarch64*-*-*]
+ && [is-effective-target aarch64_little_endian])
|| [istarget powerpc*-*-*]
|| [istarget spu-*-*]
|| [istarget i?86-*-*]
@@ -2853,7 +3549,10 @@ proc check_effective_target_vect_perm_byte { } {
verbose "check_effective_target_vect_perm_byte: using cached result" 2
} else {
set et_vect_perm_byte_saved 0
- if { [is-effective-target arm_neon_ok]
+ if { ([is-effective-target arm_neon_ok]
+ && [is-effective-target arm_little_endian])
+ || ([istarget aarch64*-*-*]
+ && [is-effective-target aarch64_little_endian])
|| [istarget powerpc*-*-*]
|| [istarget spu-*-*] } {
set et_vect_perm_byte_saved 1
@@ -2875,7 +3574,10 @@ proc check_effective_target_vect_perm_short { } {
verbose "check_effective_target_vect_perm_short: using cached result" 2
} else {
set et_vect_perm_short_saved 0
- if { [is-effective-target arm_neon_ok]
+ if { ([is-effective-target arm_neon_ok]
+ && [is-effective-target arm_little_endian])
+ || ([istarget aarch64*-*-*]
+ && [is-effective-target aarch64_little_endian])
|| [istarget powerpc*-*-*]
|| [istarget spu-*-*] } {
set et_vect_perm_short_saved 1
@@ -2944,6 +3646,7 @@ proc check_effective_target_vect_widen_sum_qi_to_hi { } {
} else {
set et_vect_widen_sum_qi_to_hi_saved 0
if { [check_effective_target_vect_unpack]
+ || [check_effective_target_arm_neon_ok]
|| [istarget ia64-*-*] } {
set et_vect_widen_sum_qi_to_hi_saved 1
}
@@ -2994,6 +3697,7 @@ proc check_effective_target_vect_widen_mult_qi_to_hi { } {
set et_vect_widen_mult_qi_to_hi_saved 0
}
if { [istarget powerpc*-*-*]
+ || [istarget aarch64*-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
set et_vect_widen_mult_qi_to_hi_saved 1
}
@@ -3026,6 +3730,7 @@ proc check_effective_target_vect_widen_mult_hi_to_si { } {
if { [istarget powerpc*-*-*]
|| [istarget spu-*-*]
|| [istarget ia64-*-*]
+ || [istarget aarch64*-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
@@ -3049,7 +3754,9 @@ proc check_effective_target_vect_widen_mult_qi_to_hi_pattern { } {
} else {
set et_vect_widen_mult_qi_to_hi_pattern_saved 0
if { [istarget powerpc*-*-*]
- || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
+ || ([istarget arm*-*-*]
+ && [check_effective_target_arm_neon_ok]
+ && [check_effective_target_arm_little_endian]) } {
set et_vect_widen_mult_qi_to_hi_pattern_saved 1
}
}
@@ -3074,7 +3781,9 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } {
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
- || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
+ || ([istarget arm*-*-*]
+ && [check_effective_target_arm_neon_ok]
+ && [check_effective_target_arm_little_endian]) } {
set et_vect_widen_mult_hi_to_si_pattern_saved 1
}
}
@@ -3083,6 +3792,28 @@ proc check_effective_target_vect_widen_mult_hi_to_si_pattern { } {
}
# Return 1 if the target plus current options supports a vector
+# widening multiplication of *int* args into *long* result, 0 otherwise.
+#
+# This won't change for different subtargets so cache the result.
+
+proc check_effective_target_vect_widen_mult_si_to_di_pattern { } {
+ global et_vect_widen_mult_si_to_di_pattern
+
+ if [info exists et_vect_widen_mult_si_to_di_pattern_saved] {
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: using cached result" 2
+ } else {
+ set et_vect_widen_mult_si_to_di_pattern_saved 0
+ if {[istarget ia64-*-*]
+ || [istarget i?86-*-*]
+ || [istarget x86_64-*-*] } {
+ set et_vect_widen_mult_si_to_di_pattern_saved 1
+ }
+ }
+ verbose "check_effective_target_vect_widen_mult_si_to_di_pattern: returning $et_vect_widen_mult_si_to_di_pattern_saved" 2
+ return $et_vect_widen_mult_si_to_di_pattern_saved
+}
+
+# Return 1 if the target plus current options supports a vector
# widening shift, 0 otherwise.
#
# This won't change for different subtargets so cache the result.
@@ -3203,6 +3934,7 @@ proc check_effective_target_vect_pack_trunc { } {
if { ([istarget powerpc*-*-*] && ![istarget powerpc-*-linux*paired*])
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
+ || [istarget aarch64*-*-*]
|| [istarget spu-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
&& [check_effective_target_arm_little_endian]) } {
@@ -3230,6 +3962,7 @@ proc check_effective_target_vect_unpack { } {
|| [istarget x86_64-*-*]
|| [istarget spu-*-*]
|| [istarget ia64-*-*]
+ || [istarget aarch64*-*-*]
|| ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]
&& [check_effective_target_arm_little_endian]) } {
set et_vect_unpack_saved 1
@@ -3269,6 +4002,7 @@ proc check_effective_target_vect_no_align { } {
} else {
set et_vect_no_align_saved 0
if { [istarget mipsisa64*-*-*]
+ || [istarget mips-sde-elf]
|| [istarget sparc*-*-*]
|| [istarget ia64-*-*]
|| [check_effective_target_arm_vect_no_misalign]
@@ -3293,6 +4027,7 @@ proc check_effective_target_vect_hw_misalign { } {
} else {
set et_vect_hw_misalign_saved 0
if { ([istarget x86_64-*-*]
+ || [istarget aarch64*-*-*]
|| [istarget i?86-*-*]) } {
set et_vect_hw_misalign_saved 1
}
@@ -3462,7 +4197,8 @@ proc check_effective_target_vect_condition { } {
verbose "check_effective_target_vect_cond: using cached result" 2
} else {
set et_vect_cond_saved 0
- if { [istarget powerpc*-*-*]
+ if { [istarget aarch64*-*-*]
+ || [istarget powerpc*-*-*]
|| [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget spu-*-*]
@@ -3506,9 +4242,11 @@ proc check_effective_target_vect_char_mult { } {
verbose "check_effective_target_vect_char_mult: using cached result" 2
} else {
set et_vect_char_mult_saved 0
- if { [istarget ia64-*-*]
+ if { [istarget aarch64*-*-*]
+ || [istarget ia64-*-*]
|| [istarget i?86-*-*]
- || [istarget x86_64-*-*] } {
+ || [istarget x86_64-*-*]
+ || [check_effective_target_arm32] } {
set et_vect_char_mult_saved 1
}
}
@@ -3531,6 +4269,7 @@ proc check_effective_target_vect_short_mult { } {
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget powerpc*-*-*]
+ || [istarget aarch64*-*-*]
|| [check_effective_target_arm32]
|| ([istarget mips*-*-*]
&& [check_effective_target_mips_loongson]) } {
@@ -3556,6 +4295,7 @@ proc check_effective_target_vect_int_mult { } {
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*]
+ || [istarget aarch64*-*-*]
|| [check_effective_target_arm32] } {
set et_vect_int_mult_saved 1
}
@@ -3574,8 +4314,9 @@ proc check_effective_target_vect_extract_even_odd { } {
verbose "check_effective_target_vect_extract_even_odd: using cached result" 2
} else {
set et_vect_extract_even_odd_saved 0
- if { [istarget powerpc*-*-*]
- || [is-effective-target arm_neon_ok]
+ if { [istarget aarch64*-*-*]
+ || [istarget powerpc*-*-*]
+ || [is-effective-target arm_neon_ok]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*]
@@ -3599,8 +4340,9 @@ proc check_effective_target_vect_interleave { } {
verbose "check_effective_target_vect_interleave: using cached result" 2
} else {
set et_vect_interleave_saved 0
- if { [istarget powerpc*-*-*]
- || [is-effective-target arm_neon_ok]
+ if { [istarget aarch64*-*-*]
+ || [istarget powerpc*-*-*]
+ || [is-effective-target arm_neon_ok]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget ia64-*-*]
@@ -3630,7 +4372,8 @@ foreach N {2 3 4 8} {
&& [check_effective_target_vect_extract_even_odd] } {
set et_vect_stridedN_saved 1
}
- if { [istarget arm*-*-*] && N >= 2 && N <= 4 } {
+ if { ([istarget arm*-*-*]
+ || [istarget aarch64*-*-*]) && N >= 2 && N <= 4 } {
set et_vect_stridedN_saved 1
}
}
@@ -3647,7 +4390,8 @@ proc check_effective_target_vect_multiple_sizes { } {
global et_vect_multiple_sizes_saved
set et_vect_multiple_sizes_saved 0
- if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
+ if { ([istarget aarch64*-*-*]
+ || ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok])) } {
set et_vect_multiple_sizes_saved 1
}
if { ([istarget x86_64-*-*] || [istarget i?86-*-*]) } {
@@ -3669,7 +4413,9 @@ proc check_effective_target_vect64 { } {
verbose "check_effective_target_vect64: using cached result" 2
} else {
set et_vect64_saved 0
- if { ([istarget arm*-*-*] && [check_effective_target_arm_neon_ok]) } {
+ if { ([istarget arm*-*-*]
+ && [check_effective_target_arm_neon_ok]
+ && [check_effective_target_arm_little_endian]) } {
set et_vect64_saved 1
}
}
@@ -3707,7 +4453,8 @@ proc check_effective_target_vect_call_sqrtf { } {
verbose "check_effective_target_vect_call_sqrtf: using cached result" 2
} else {
set et_vect_call_sqrtf_saved 0
- if { [istarget i?86-*-*]
+ if { [istarget aarch64*-*-*]
+ || [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| ([istarget powerpc*-*-*] && [check_vsx_hw_available]) } {
set et_vect_call_sqrtf_saved 1
@@ -3730,6 +4477,222 @@ proc check_effective_target_vect_call_lrint { } {
return $et_vect_call_lrint
}
+# Return 1 if the target supports vector btrunc calls.
+
+proc check_effective_target_vect_call_btrunc { } {
+ global et_vect_call_btrunc_saved
+
+ if [info exists et_vect_call_btrunc_saved] {
+ verbose "check_effective_target_vect_call_btrunc: using cached result" 2
+ } else {
+ set et_vect_call_btrunc_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_btrunc_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_btrunc: returning $et_vect_call_btrunc_saved" 2
+ return $et_vect_call_btrunc_saved
+}
+
+# Return 1 if the target supports vector btruncf calls.
+
+proc check_effective_target_vect_call_btruncf { } {
+ global et_vect_call_btruncf_saved
+
+ if [info exists et_vect_call_btruncf_saved] {
+ verbose "check_effective_target_vect_call_btruncf: using cached result" 2
+ } else {
+ set et_vect_call_btruncf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_btruncf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_btruncf: returning $et_vect_call_btruncf_saved" 2
+ return $et_vect_call_btruncf_saved
+}
+
+# Return 1 if the target supports vector ceil calls.
+
+proc check_effective_target_vect_call_ceil { } {
+ global et_vect_call_ceil_saved
+
+ if [info exists et_vect_call_ceil_saved] {
+ verbose "check_effective_target_vect_call_ceil: using cached result" 2
+ } else {
+ set et_vect_call_ceil_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_ceil_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_ceil: returning $et_vect_call_ceil_saved" 2
+ return $et_vect_call_ceil_saved
+}
+
+# Return 1 if the target supports vector ceilf calls.
+
+proc check_effective_target_vect_call_ceilf { } {
+ global et_vect_call_ceilf_saved
+
+ if [info exists et_vect_call_ceilf_saved] {
+ verbose "check_effective_target_vect_call_ceilf: using cached result" 2
+ } else {
+ set et_vect_call_ceilf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_ceilf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_ceilf: returning $et_vect_call_ceilf_saved" 2
+ return $et_vect_call_ceilf_saved
+}
+
+# Return 1 if the target supports vector floor calls.
+
+proc check_effective_target_vect_call_floor { } {
+ global et_vect_call_floor_saved
+
+ if [info exists et_vect_call_floor_saved] {
+ verbose "check_effective_target_vect_call_floor: using cached result" 2
+ } else {
+ set et_vect_call_floor_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_floor_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_floor: returning $et_vect_call_floor_saved" 2
+ return $et_vect_call_floor_saved
+}
+
+# Return 1 if the target supports vector floorf calls.
+
+proc check_effective_target_vect_call_floorf { } {
+ global et_vect_call_floorf_saved
+
+ if [info exists et_vect_call_floorf_saved] {
+ verbose "check_effective_target_vect_call_floorf: using cached result" 2
+ } else {
+ set et_vect_call_floorf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_floorf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_floorf: returning $et_vect_call_floorf_saved" 2
+ return $et_vect_call_floorf_saved
+}
+
+# Return 1 if the target supports vector lceil calls.
+
+proc check_effective_target_vect_call_lceil { } {
+ global et_vect_call_lceil_saved
+
+ if [info exists et_vect_call_lceil_saved] {
+ verbose "check_effective_target_vect_call_lceil: using cached result" 2
+ } else {
+ set et_vect_call_lceil_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_lceil_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_lceil: returning $et_vect_call_lceil_saved" 2
+ return $et_vect_call_lceil_saved
+}
+
+# Return 1 if the target supports vector lfloor calls.
+
+proc check_effective_target_vect_call_lfloor { } {
+ global et_vect_call_lfloor_saved
+
+ if [info exists et_vect_call_lfloor_saved] {
+ verbose "check_effective_target_vect_call_lfloor: using cached result" 2
+ } else {
+ set et_vect_call_lfloor_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_lfloor_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_lfloor: returning $et_vect_call_lfloor_saved" 2
+ return $et_vect_call_lfloor_saved
+}
+
+# Return 1 if the target supports vector nearbyint calls.
+
+proc check_effective_target_vect_call_nearbyint { } {
+ global et_vect_call_nearbyint_saved
+
+ if [info exists et_vect_call_nearbyint_saved] {
+ verbose "check_effective_target_vect_call_nearbyint: using cached result" 2
+ } else {
+ set et_vect_call_nearbyint_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_nearbyint_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_nearbyint: returning $et_vect_call_nearbyint_saved" 2
+ return $et_vect_call_nearbyint_saved
+}
+
+# Return 1 if the target supports vector nearbyintf calls.
+
+proc check_effective_target_vect_call_nearbyintf { } {
+ global et_vect_call_nearbyintf_saved
+
+ if [info exists et_vect_call_nearbyintf_saved] {
+ verbose "check_effective_target_vect_call_nearbyintf: using cached result" 2
+ } else {
+ set et_vect_call_nearbyintf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_nearbyintf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_nearbyintf: returning $et_vect_call_nearbyintf_saved" 2
+ return $et_vect_call_nearbyintf_saved
+}
+
+# Return 1 if the target supports vector round calls.
+
+proc check_effective_target_vect_call_round { } {
+ global et_vect_call_round_saved
+
+ if [info exists et_vect_call_round_saved] {
+ verbose "check_effective_target_vect_call_round: using cached result" 2
+ } else {
+ set et_vect_call_round_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_round_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_round: returning $et_vect_call_round_saved" 2
+ return $et_vect_call_round_saved
+}
+
+# Return 1 if the target supports vector roundf calls.
+
+proc check_effective_target_vect_call_roundf { } {
+ global et_vect_call_roundf_saved
+
+ if [info exists et_vect_call_roundf_saved] {
+ verbose "check_effective_target_vect_call_roundf: using cached result" 2
+ } else {
+ set et_vect_call_roundf_saved 0
+ if { [istarget aarch64*-*-*] } {
+ set et_vect_call_roundf_saved 1
+ }
+ }
+
+ verbose "check_effective_target_vect_call_roundf: returning $et_vect_call_roundf_saved" 2
+ return $et_vect_call_roundf_saved
+}
+
# Return 1 if the target supports section-anchors
proc check_effective_target_section_anchors { } {
@@ -3790,6 +4753,7 @@ proc check_effective_target_sync_int_128_runtime { } {
proc check_effective_target_sync_long_long { } {
if { [istarget x86_64-*-*]
|| [istarget i?86-*-*])
+ || [istarget aarch64*-*-*]
|| [istarget arm*-*-*]
|| [istarget alpha*-*-*]
|| ([istarget sparc*-*-*] && [check_effective_target_lp64]) } {
@@ -3819,7 +4783,9 @@ proc check_effective_target_sync_long_long_runtime { } {
}
} ""
}]
- } elseif { [istarget arm*-*-linux-gnueabi*] } {
+ } elseif { [istarget aarch64*-*-*] } {
+ return 1
+ } elseif { [istarget arm*-*-linux-*] } {
return [check_runtime sync_longlong_runtime {
#include <stdlib.h>
int main ()
@@ -3841,6 +4807,8 @@ proc check_effective_target_sync_long_long_runtime { } {
&& [check_effective_target_lp64]
&& [check_effective_target_ultrasparc_hw]) } {
return 1
+ } elseif { [istarget powerpc*-*-*] && [check_effective_target_lp64] } {
+ return 1
} else {
return 0
}
@@ -3860,12 +4828,14 @@ proc check_effective_target_sync_int_long { } {
if { [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
+ || [istarget aarch64*-*-*]
|| [istarget alpha*-*-*]
- || [istarget arm*-*-linux-gnueabi*]
+ || [istarget arm*-*-linux-*]
|| [istarget bfin*-*linux*]
|| [istarget hppa*-*linux*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
+ || [istarget crisv32-*-*] || [istarget cris-*-*]
|| ([istarget sparc*-*-*] && [check_effective_target_sparc_v9])
|| [check_effective_target_mips_llsc] } {
set et_sync_int_long_saved 1
@@ -3887,14 +4857,16 @@ proc check_effective_target_sync_char_short { } {
set et_sync_char_short_saved 0
# This is intentionally powerpc but not rs6000, rs6000 doesn't have the
# load-reserved/store-conditional instructions.
- if { [istarget ia64-*-*]
+ if { [istarget aarch64*-*-*]
+ || [istarget ia64-*-*]
|| [istarget i?86-*-*]
|| [istarget x86_64-*-*]
|| [istarget alpha*-*-*]
- || [istarget arm*-*-linux-gnueabi*]
+ || [istarget arm*-*-linux-*]
|| [istarget hppa*-*linux*]
|| [istarget s390*-*-*]
|| [istarget powerpc*-*-*]
+ || [istarget crisv32-*-*] || [istarget cris-*-*]
|| ([istarget sparc*-*-*] && [check_effective_target_sparc_v9])
|| [check_effective_target_mips_llsc] } {
set et_sync_char_short_saved 1
@@ -3946,6 +4918,17 @@ proc check_effective_target_newlib {} {
}]
}
+# Return true if this is NOT a Bionic target.
+
+proc check_effective_target_non_bionic {} {
+ return [check_no_compiler_messages non_bionic object {
+ #include <ctype.h>
+ #if defined (__BIONIC__)
+ #error FOO
+ #endif
+ }]
+}
+
# Return 1 if
# (a) an error of a few ULP is expected in string to floating-point
# conversion functions; and
@@ -3987,7 +4970,9 @@ proc is-effective-target { arg } {
switch $arg {
"vmx_hw" { set selected [check_vmx_hw_available] }
"vsx_hw" { set selected [check_vsx_hw_available] }
+ "p8vector_hw" { set selected [check_p8vector_hw_available] }
"ppc_recip_hw" { set selected [check_ppc_recip_hw_available] }
+ "dfp_hw" { set selected [check_dfp_hw_available] }
"named_sections" { set selected [check_named_sections_available] }
"gc_sections" { set selected [check_gc_sections_available] }
"cxa_atexit" { set selected [check_cxa_atexit_available] }
@@ -4008,7 +4993,9 @@ proc is-effective-target-keyword { arg } {
switch $arg {
"vmx_hw" { return 1 }
"vsx_hw" { return 1 }
+ "p8vector_hw" { return 1 }
"ppc_recip_hw" { return 1 }
+ "dfp_hw" { return 1 }
"named_sections" { return 1 }
"gc_sections" { return 1 }
"cxa_atexit" { return 1 }
@@ -4079,6 +5066,33 @@ proc check_effective_target_simulator { } {
return 0
}
+# Return 1 if programs are intended to be run on hardware rather than
+# on a simulator
+
+proc check_effective_target_hw { } {
+
+ # All "src/sim" simulators set this one.
+ if [board_info target exists is_simulator] {
+ if [board_info target is_simulator] {
+ return 0
+ } else {
+ return 1
+ }
+ }
+
+ # The "sid" simulators don't set that one, but at least they set
+ # this one.
+ if [board_info target exists slow_simulator] {
+ if [board_info target slow_simulator] {
+ return 0
+ } else {
+ return 1
+ }
+ }
+
+ return 1
+}
+
# Return 1 if the target is a VxWorks kernel.
proc check_effective_target_vxworks_kernel { } {
@@ -4172,9 +5186,6 @@ proc add_options_for_c99_runtime { flags } {
if { [istarget *-*-solaris2*] } {
return "$flags -std=c99"
}
- if { [istarget mips-sgi-irix6.5*] } {
- return "$flags -std=c99"
- }
if { [istarget powerpc-*-darwin*] } {
return "$flags -mmacosx-version-min=10.3"
}
@@ -4301,6 +5312,19 @@ proc check_prefer_avx128 { } {
}
+# Return 1 if avx512f instructions can be compiled.
+
+proc check_effective_target_avx512f { } {
+ return [check_no_compiler_messages avx512f object {
+ typedef double __m512d __attribute__ ((__vector_size__ (64)));
+
+ __m512d _mm512_add (__m512d a)
+ {
+ return __builtin_ia32_addpd512_mask (a, a, a, 1, 4);
+ }
+ } "-O2 -mavx512f" ]
+}
+
# Return 1 if avx instructions can be compiled.
proc check_effective_target_avx { } {
@@ -4312,6 +5336,18 @@ proc check_effective_target_avx { } {
} "-O2 -mavx" ]
}
+# Return 1 if avx2 instructions can be compiled.
+proc check_effective_target_avx2 { } {
+ return [check_no_compiler_messages avx2 object {
+ typedef long long __v4di __attribute__ ((__vector_size__ (32)));
+ __v4di
+ mm256_is32_andnotsi256 (__v4di __X, __v4di __Y)
+ {
+ return __builtin_ia32_andnotsi256 (__X, __Y);
+ }
+ } "-O0 -mavx2" ]
+}
+
# Return 1 if sse instructions can be compiled.
proc check_effective_target_sse { } {
return [check_no_compiler_messages sse object {
@@ -4458,6 +5494,14 @@ proc check_effective_target_lto { } {
return [info exists ENABLE_LTO]
}
+# Return 1 if -mx32 -maddress-mode=short can compile, 0 otherwise.
+
+proc check_effective_target_maybe_x32 { } {
+ return [check_no_compiler_messages maybe_x32 object {
+ void foo (void) {}
+ } "-mx32 -maddress-mode=short"]
+}
+
# Return 1 if this target supports the -fsplit-stack option, 0
# otherwise.
@@ -4467,6 +5511,15 @@ proc check_effective_target_split_stack {} {
} "-fsplit-stack"]
}
+# Return 1 if this target supports the -masm=intel option, 0
+# otherwise
+
+proc check_effective_target_masm_intel {} {
+ return [check_no_compiler_messages masm_intel object {
+ extern void abort (void);
+ } "-masm=intel"]
+}
+
# Return 1 if the language for the compiler under test is C.
proc check_effective_target_c { } {
@@ -4487,22 +5540,44 @@ proc check_effective_target_c++ { } {
return 0
}
-# Check which language standard is active by checking for the presence of
-# one of the C++11 -std flags. This assumes that the default for the
-# compiler is C++98, and that there will never be multiple -std= arguments
-# on the command line.
-proc check_effective_target_c++11 { } {
+# Check whether the current active language standard supports the features
+# of C++11/C++1y by checking for the presence of one of the -std
+# flags. This assumes that the default for the compiler is C++98, and that
+# there will never be multiple -std= arguments on the command line.
+proc check_effective_target_c++11_only { } {
if ![check_effective_target_c++] {
return 0
}
return [check-flags { { } { } { -std=c++0x -std=gnu++0x -std=c++11 -std=gnu++11 } }]
}
+proc check_effective_target_c++11 { } {
+ if [check_effective_target_c++11_only] {
+ return 1
+ }
+ return [check_effective_target_c++1y]
+}
+proc check_effective_target_c++11_down { } {
+ if ![check_effective_target_c++] {
+ return 0
+ }
+ return ![check_effective_target_c++1y]
+}
-proc check_effective_target_c++98 { } {
+proc check_effective_target_c++1y_only { } {
if ![check_effective_target_c++] {
return 0
}
- return [check-flags { { } { } { } { -std=c++0x -std=gnu++0x -std=c++11 -std=gnu++11 } }]
+ return [check-flags { { } { } { -std=c++1y -std=gnu++1y -std=c++14 -std=gnu++14 } }]
+}
+proc check_effective_target_c++1y { } {
+ return [check_effective_target_c++1y_only]
+}
+
+proc check_effective_target_c++98_only { } {
+ if ![check_effective_target_c++] {
+ return 0
+ }
+ return ![check_effective_target_c++11]
}
# Return 1 if expensive testcases should be run.
@@ -4544,7 +5619,9 @@ proc check_vect_support_and_set_flags { } {
}
lappend DEFAULT_VECTCFLAGS "-maltivec"
- if [check_vsx_hw_available] {
+ if [check_p8vector_hw_available] {
+ lappend DEFAULT_VECTCFLAGS "-mpower8-vector" "-mno-allow-movmisalign"
+ } elseif [check_vsx_hw_available] {
lappend DEFAULT_VECTCFLAGS "-mvsx" "-mno-allow-movmisalign"
}
@@ -4607,6 +5684,8 @@ proc check_vect_support_and_set_flags { } {
} else {
set dg-do-what-default compile
}
+ } elseif [istarget "aarch64*-*-*"] {
+ set dg-do-what-default run
} else {
return 0
}
@@ -4630,3 +5709,110 @@ proc check_effective_target_ucontext_h { } {
#include <ucontext.h>
}]
}
+
+proc check_effective_target_aarch64_tiny { } {
+ if { [istarget aarch64*-*-*] } {
+ return [check_no_compiler_messages aarch64_tiny object {
+ #ifdef __AARCH64_CMODEL_TINY__
+ int dummy;
+ #else
+ #error target not AArch64 tiny code model
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
+proc check_effective_target_aarch64_small { } {
+ if { [istarget aarch64*-*-*] } {
+ return [check_no_compiler_messages aarch64_small object {
+ #ifdef __AARCH64_CMODEL_SMALL__
+ int dummy;
+ #else
+ #error target not AArch64 small code model
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
+proc check_effective_target_aarch64_large { } {
+ if { [istarget aarch64*-*-*] } {
+ return [check_no_compiler_messages aarch64_large object {
+ #ifdef __AARCH64_CMODEL_LARGE__
+ int dummy;
+ #else
+ #error target not AArch64 large code model
+ #endif
+ }]
+ } else {
+ return 0
+ }
+}
+
+# Return 1 if <fenv.h> is available with all the standard IEEE
+# exceptions and floating-point exceptions are raised by arithmetic
+# operations. (If the target requires special options for "inexact"
+# exceptions, those need to be specified in the testcases.)
+
+proc check_effective_target_fenv_exceptions {} {
+ return [check_runtime fenv_exceptions {
+ #include <fenv.h>
+ #include <stdlib.h>
+ #ifndef FE_DIVBYZERO
+ # error Missing FE_DIVBYZERO
+ #endif
+ #ifndef FE_INEXACT
+ # error Missing FE_INEXACT
+ #endif
+ #ifndef FE_INVALID
+ # error Missing FE_INVALID
+ #endif
+ #ifndef FE_OVERFLOW
+ # error Missing FE_OVERFLOW
+ #endif
+ #ifndef FE_UNDERFLOW
+ # error Missing FE_UNDERFLOW
+ #endif
+ volatile float a = 0.0f, r;
+ int
+ main (void)
+ {
+ r = a / a;
+ if (fetestexcept (FE_INVALID))
+ exit (0);
+ else
+ abort ();
+ }
+ } "-std=gnu99"]
+}
+
+# Return 1 if LOGICAL_OP_NON_SHORT_CIRCUIT is set to 0 for the current target.
+
+proc check_effective_target_logical_op_short_circuit {} {
+ if { [istarget mips*-*-*]
+ || [istarget arc*-*-*]
+ || [istarget avr*-*-*]
+ || [istarget crisv32-*-*] || [istarget cris-*-*]
+ || [istarget s390*-*-*]
+ || [check_effective_target_arm_cortex_m] } {
+ return 1
+ }
+ return 0
+}
+
+# Record that dg-final test TEST requires convential compilation.
+
+proc force_conventional_output_for { test } {
+ if { [info proc $test] == "" } {
+ perror "$test does not exist"
+ exit 1
+ }
+ proc ${test}_required_options {} {
+ global gcc_force_conventional_output
+ return $gcc_force_conventional_output
+ }
+}
+
diff --git a/gcc/testsuite/lib/timeout-dg.exp b/gcc/testsuite/lib/timeout-dg.exp
index 45de9041cc..97cec143b7 100644
--- a/gcc/testsuite/lib/timeout-dg.exp
+++ b/gcc/testsuite/lib/timeout-dg.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/timeout.exp b/gcc/testsuite/lib/timeout.exp
index c8cb09fddc..1a2e215e1c 100644
--- a/gcc/testsuite/lib/timeout.exp
+++ b/gcc/testsuite/lib/timeout.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/torture-options.exp b/gcc/testsuite/lib/torture-options.exp
index f3b3e22948..fd7f21a905 100644
--- a/gcc/testsuite/lib/torture-options.exp
+++ b/gcc/testsuite/lib/torture-options.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/lib/tsan-dg.exp b/gcc/testsuite/lib/tsan-dg.exp
new file mode 100644
index 0000000000..f313123aaa
--- /dev/null
+++ b/gcc/testsuite/lib/tsan-dg.exp
@@ -0,0 +1,138 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+# Return 1 if compilation with -fsanitize=thread is error-free for trivial
+# code, 0 otherwise.
+
+proc check_effective_target_fthread_sanitizer {} {
+ return [check_no_compiler_messages faddress_sanitizer object {
+ void foo (void) { }
+ } "-fPIE -pie -fsanitize=thread"]
+}
+
+#
+# tsan_link_flags -- compute library path and flags to find libtsan.
+# (originally from g++.exp)
+#
+
+proc tsan_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libsanitizer/tsan/.libs/libtsan.a"]
+ || [file exists "${gccpath}/libsanitizer/tsan/.libs/libtsan.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libsanitizer/tsan/ "
+ append flags " -L${gccpath}/libsanitizer/tsan/.libs "
+ append ld_library_path ":${gccpath}/libsanitizer/tsan/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libtsan [lookfor_file ${tool_root_dir} libtsan]
+ if { $libtsan != "" } {
+ append flags "-L${libtsan} "
+ append ld_library_path ":${libtsan}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ return "$flags"
+}
+
+#
+# tsan_init -- called at the start of each subdir of tests
+#
+
+proc tsan_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global tsan_saved_TEST_ALWAYS_FLAGS
+ global dg-do-what-default
+ global tsan_saved_dg-do-what-default
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[tsan_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[tsan_link_flags [get_multilibs]]"
+ }
+ }
+
+ if [info exists dg-do-what-default] {
+ set tsan_saved_dg-do-what-default ${dg-do-what-default}
+ }
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set tsan_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ set ALWAYS_CXXFLAGS [concat "{additional_flags=-fPIE -pie -fsanitize=thread -g}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags -fPIE -pie -fsanitize=thread -g $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags -fPIE -pie -fsanitize=thread -g"
+ }
+ }
+ if { $link_flags != "" } {
+ global individual_timeout
+
+ # Lower timeout value in case test does not terminate properly.
+ set individual_timeout 20
+ if [check_runtime_nocache tsan_works {
+ int main () { return 0; }
+ } "-fPIE -pie -fsanitize=thread -g"] {
+ set dg-do-what-default run
+ } else {
+ set dg-do-what-default compile
+ }
+ unset individual_timeout
+ return 1
+ }
+ return 0
+}
+
+#
+# tsan_finish -- called at the end of each subdir of tests
+#
+
+proc tsan_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global tsan_saved_TEST_ALWAYS_FLAGS
+ global dg-do-what-default
+ global tsan_saved_dg-do-what-default
+
+ if [info exists tsan_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $tsan_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+ if [info exists tsan_saved_dg-do-what-default] {
+ set dg-do-what-default ${tsan_saved_dg-do-what-default}
+ } else {
+ unset dg-do-what-default
+ }
+}
diff --git a/gcc/testsuite/lib/ubsan-dg.exp b/gcc/testsuite/lib/ubsan-dg.exp
new file mode 100644
index 0000000000..fecce7bf00
--- /dev/null
+++ b/gcc/testsuite/lib/ubsan-dg.exp
@@ -0,0 +1,105 @@
+# Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GCC; see the file COPYING3. If not see
+# <http://www.gnu.org/licenses/>.
+
+#
+# ubsan_link_flags -- compute library path and flags to find libubsan.
+# (originally from g++.exp)
+#
+
+proc ubsan_link_flags { paths } {
+ global srcdir
+ global ld_library_path
+ global shlib_ext
+
+ set gccpath ${paths}
+ set flags ""
+
+ set shlib_ext [get_shlib_extension]
+
+ if { $gccpath != "" } {
+ if { [file exists "${gccpath}/libsanitizer/ubsan/.libs/libubsan.a"]
+ || [file exists "${gccpath}/libsanitizer/ubsan/.libs/libubsan.${shlib_ext}"] } {
+ append flags " -B${gccpath}/libsanitizer/ "
+ append flags " -B${gccpath}/libsanitizer/ubsan/ "
+ append flags " -L${gccpath}/libsanitizer/ubsan/.libs"
+ append ld_library_path ":${gccpath}/libsanitizer/ubsan/.libs"
+ }
+ } else {
+ global tool_root_dir
+
+ set libubsan [lookfor_file ${tool_root_dir} libubsan]
+ if { $libubsan != "" } {
+ append flags "-L${libubsan} "
+ append ld_library_path ":${libubsan}"
+ }
+ }
+
+ set_ld_library_path_env_vars
+
+ return "$flags"
+}
+
+#
+# ubsan_init -- called at the start of each subdir of tests
+#
+
+proc ubsan_init { args } {
+ global TEST_ALWAYS_FLAGS
+ global ALWAYS_CXXFLAGS
+ global TOOL_OPTIONS
+ global ubsan_saved_TEST_ALWAYS_FLAGS
+
+ set link_flags ""
+ if ![is_remote host] {
+ if [info exists TOOL_OPTIONS] {
+ set link_flags "[ubsan_link_flags [get_multilibs ${TOOL_OPTIONS}]]"
+ } else {
+ set link_flags "[ubsan_link_flags [get_multilibs]]"
+ }
+ }
+
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set ubsan_saved_TEST_ALWAYS_FLAGS $TEST_ALWAYS_FLAGS
+ }
+ if [info exists ALWAYS_CXXFLAGS] {
+ set ALWAYS_CXXFLAGS [concat "{ldflags=$link_flags}" $ALWAYS_CXXFLAGS]
+ } else {
+ if [info exists TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS "$link_flags $TEST_ALWAYS_FLAGS"
+ } else {
+ set TEST_ALWAYS_FLAGS "$link_flags"
+ }
+ }
+ if { $link_flags != "" } {
+ return 1
+ }
+ return 0
+}
+
+#
+# ubsan_finish -- called at the end of each subdir of tests
+#
+
+proc ubsan_finish { args } {
+ global TEST_ALWAYS_FLAGS
+ global ubsan_saved_TEST_ALWAYS_FLAGS
+
+ if [info exists ubsan_saved_TEST_ALWAYS_FLAGS] {
+ set TEST_ALWAYS_FLAGS $ubsan_saved_TEST_ALWAYS_FLAGS
+ } else {
+ unset TEST_ALWAYS_FLAGS
+ }
+}
diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp
index b7f7773aac..1291c11309 100644
--- a/gcc/testsuite/lib/wrapper.exp
+++ b/gcc/testsuite/lib/wrapper.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/obj-c++.dg/attributes/attributes.exp b/gcc/testsuite/obj-c++.dg/attributes/attributes.exp
index 1d4cae4ef2..6b5b299779 100644
--- a/gcc/testsuite/obj-c++.dg/attributes/attributes.exp
+++ b/gcc/testsuite/obj-c++.dg/attributes/attributes.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm
index e94e6ec57a..0098349cbc 100644
--- a/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm
+++ b/gcc/testsuite/obj-c++.dg/cxx-ivars-3.mm
@@ -2,12 +2,15 @@
// { dg-do run { target *-*-darwin* } }
// { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } }
-// { dg-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4" }
+// { dg-additional-options "-fobjc-call-cxx-cdtors -mmacosx-version-min=10.4 -framework Foundation" }
// This test has no equivalent or meaning for m64/ABI V2
// { dg-xfail-run-if "No Test Avail" { *-*-darwin* && lp64 } { "-fnext-runtime" } { "" } }
#include <objc/objc-runtime.h>
#include <stdlib.h>
+#include <Foundation/NSObject.h>
+
+//extern "C" { int printf(const char *,...); }
#define CHECK_IF(expr) if(!(expr)) abort()
#ifndef CLS_HAS_CXX_STRUCTORS
@@ -19,7 +22,7 @@ struct cxx_struct {
cxx_struct (void) { a = b = 55; }
};
-@interface Foo {
+@interface Foo: NSObject {
int c;
cxx_struct s;
}
@@ -42,9 +45,11 @@ int main (void)
Class cls;
cls = objc_getClass("Foo");
- CHECK_IF(cls->info & CLS_HAS_CXX_STRUCTORS);
+// printf((const char *)"Foo info %lx\n",cls->info);
+ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) != 0);
cls = objc_getClass("Bar");
- CHECK_IF(!(cls->info & CLS_HAS_CXX_STRUCTORS));
+// printf((const char *)"Bar info %lx\n",cls->info);
+ CHECK_IF((cls->info & CLS_HAS_CXX_STRUCTORS) == 0);
#else
/* No test needed or available. */
diff --git a/gcc/testsuite/obj-c++.dg/dg.exp b/gcc/testsuite/obj-c++.dg/dg.exp
index fb809b4844..0581b49edb 100644
--- a/gcc/testsuite/obj-c++.dg/dg.exp
+++ b/gcc/testsuite/obj-c++.dg/dg.exp
@@ -1,5 +1,5 @@
# GCC Objective-C++ testsuite that uses the `dg.exp' driver.
-# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/obj-c++.dg/dwarf-2.mm b/gcc/testsuite/obj-c++.dg/dwarf-2.mm
index f936b6baef..3720a8871e 100644
--- a/gcc/testsuite/obj-c++.dg/dwarf-2.mm
+++ b/gcc/testsuite/obj-c++.dg/dwarf-2.mm
@@ -1,4 +1,4 @@
/* { dg-options "-gdwarf-2 -dA" } */
-/* { dg-skip-if "No Dwarf" { { alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
+/* { dg-skip-if "No Dwarf" { { hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
/* { dg-final { scan-assembler "0x11\[^0-9a-f\].*DW_AT_language" } } */
int x;
diff --git a/gcc/testsuite/obj-c++.dg/invalid-method-2.mm b/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
index 48f03599c1..e3a8ed1ff1 100644
--- a/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
+++ b/gcc/testsuite/obj-c++.dg/invalid-method-2.mm
@@ -7,11 +7,11 @@
@end
@implementation MyClass
-- (x) method /* { dg-error "expected" } */
+- (x) method /* { dg-error "expected|type" } */
{
return 0;
}
-- (id) method2: (x)argument /* { dg-error "expected" } */
+- (id) method2: (x)argument /* { dg-error "expected|type" } */
{
return 0;
}
diff --git a/gcc/testsuite/obj-c++.dg/lto/lto.exp b/gcc/testsuite/obj-c++.dg/lto/lto.exp
index 4ae08c1727..19cf510365 100644
--- a/gcc/testsuite/obj-c++.dg/lto/lto.exp
+++ b/gcc/testsuite/obj-c++.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/obj-c++.dg/method-12.mm b/gcc/testsuite/obj-c++.dg/method-12.mm
index c1f2a39dfa..6cdb0f9c81 100644
--- a/gcc/testsuite/obj-c++.dg/method-12.mm
+++ b/gcc/testsuite/obj-c++.dg/method-12.mm
@@ -2,6 +2,7 @@
/* Author: Ziemowit Laski <zlaski@apple.com> */
/* { dg-options "-Wstrict-selector-match" } */
/* { dg-do compile } */
+/* { dg-skip-if "Object interface removed" { *-*-darwin[1-2]* && { lp64 } } { "-fnext-runtime" } { "" } } */
#include <objc/Protocol.h>
@@ -19,13 +20,13 @@ void foo(void) {
Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 9 } */
- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 14 } */
+ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */
+ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 25 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 25 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 25 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}
diff --git a/gcc/testsuite/obj-c++.dg/method-8.mm b/gcc/testsuite/obj-c++.dg/method-8.mm
index 9857c63ffe..cde1bc2746 100644
--- a/gcc/testsuite/obj-c++.dg/method-8.mm
+++ b/gcc/testsuite/obj-c++.dg/method-8.mm
@@ -16,7 +16,7 @@
@end
@implementation class3
-- (int) meth1 { return 0; } /* { dg-error "previously defined here" } */
+- (int) meth1 { return 0; } /* { dg-message "previously defined here" } */
- (int) meth1 { return 0; } /* { dg-error "redefinition of" } */
@end
@@ -25,6 +25,6 @@
@end
@implementation class4
-+ (void) meth1 {} /* { dg-error "previously defined here" } */
++ (void) meth1 {} /* { dg-message "previously defined here" } */
+ (void) meth1 {} /* { dg-error "redefinition of" } */
@end
diff --git a/gcc/testsuite/obj-c++.dg/property/dotsyntax-4.mm b/gcc/testsuite/obj-c++.dg/property/dotsyntax-4.mm
index 2e918d2821..f3292ecf39 100644
--- a/gcc/testsuite/obj-c++.dg/property/dotsyntax-4.mm
+++ b/gcc/testsuite/obj-c++.dg/property/dotsyntax-4.mm
@@ -35,7 +35,7 @@ int main (void)
abort ();
MyRootClass.int; /* { dg-error "expected identifier" } */
- /* { dg-error "expected" "" { target *-*-* } 37 } */
+
if (MyRootClass.int) /* { dg-error "expected identifier" } */
/* { dg-error "expected" "" { target *-*-* } 39 } */
abort ();
diff --git a/gcc/testsuite/obj-c++.dg/property/property.exp b/gcc/testsuite/obj-c++.dg/property/property.exp
index 468e34b37d..e9b57f169a 100644
--- a/gcc/testsuite/obj-c++.dg/property/property.exp
+++ b/gcc/testsuite/obj-c++.dg/property/property.exp
@@ -1,5 +1,5 @@
# GCC Objective-C++ testsuite that uses the `dg.exp' driver.
-# Copyright (C) 2004, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2004-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm b/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm
index b7746d7a14..b32cfd8a0d 100644
--- a/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm
+++ b/gcc/testsuite/obj-c++.dg/proto-lossage-7.mm
@@ -1,12 +1,19 @@
/* Check that typedefs of ObjC classes preserve
any @protocol qualifiers. */
/* { dg-do compile } */
+
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
@protocol CanDoStuff;
-typedef Object<CanDoStuff> CanDoStuffType;
-typedef Object<CanDoStuff> *CanDoStuffTypePtr;
+typedef OBJECT<CanDoStuff> CanDoStuffType;
+typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr;
@protocol CanDoStuff
- (int) dostuff;
diff --git a/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm b/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm
index 14ae68c6c5..b4fc9e6ed4 100644
--- a/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm
+++ b/gcc/testsuite/obj-c++.dg/strings/const-cfstring-2.mm
@@ -6,7 +6,7 @@
/* So far, CFString is darwin-only. */
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
-/* { dg-options "-mconstant-cfstrings -Wnonportable-cfstrings" } */
+/* { dg-options "-ftrack-macro-expansion=0 -mconstant-cfstrings -Wnonportable-cfstrings" } */
#import <Foundation/NSString.h>
#import <CoreFoundation/CFString.h>
diff --git a/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm b/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm
index 13cb789577..98bb7c5bdd 100644
--- a/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm
+++ b/gcc/testsuite/obj-c++.dg/strings/const-cfstring-5.mm
@@ -6,16 +6,16 @@
/* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mconstant-cfstrings" } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
-@interface Foo: Object {
+@interface Foo: NSObject {
char *cString;
unsigned int len;
}
+ (Foo *)description;
@end
-@interface Bar: Object
+@interface Bar: NSObject
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm b/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
index 430ab5db2d..d0dfb668ea 100644
--- a/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
+++ b/gcc/testsuite/obj-c++.dg/strings/const-str-12.mm
@@ -5,17 +5,23 @@
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
-@interface Foo: Object {
+@interface Foo: OBJECT {
char *cString;
unsigned int len;
}
+ (id)description;
@end
-@interface Bar: Object
+@interface Bar: OBJECT
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/obj-c++.dg/strings/strings.exp b/gcc/testsuite/obj-c++.dg/strings/strings.exp
index 82cd925bb2..96e2c69acf 100644
--- a/gcc/testsuite/obj-c++.dg/strings/strings.exp
+++ b/gcc/testsuite/obj-c++.dg/strings/strings.exp
@@ -1,6 +1,6 @@
# String tests that only need to run at default optimization.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/obj-c++.dg/syntax-error-1.mm b/gcc/testsuite/obj-c++.dg/syntax-error-1.mm
index 13f3c275cc..1fe9ca3c4b 100644
--- a/gcc/testsuite/obj-c++.dg/syntax-error-1.mm
+++ b/gcc/testsuite/obj-c++.dg/syntax-error-1.mm
@@ -1,7 +1,13 @@
/* Graceful handling of a syntax error. */
/* { dg-do compile } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
class foo {
public:
@@ -12,7 +18,7 @@ class foo {
extern void NXLog(const char *, ...);
-@interface Test2 : Object {
+@interface Test2 : OBJECT {
}
- (void) foo2;
@end
@@ -23,4 +29,4 @@ extern void NXLog(const char *, ...);
} /* { dg-error "stray .\}. between Objective\\-C\\+\\+ methods" } */
@end
-/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 22 } */
+/* { dg-error "expected constructor, destructor, or type conversion before" "" { target *-*-* } 28 } */
diff --git a/gcc/testsuite/obj-c++.dg/tls/diag-3.mm b/gcc/testsuite/obj-c++.dg/tls/diag-3.mm
index 0a597b20f8..22c2395ab9 100644
--- a/gcc/testsuite/obj-c++.dg/tls/diag-3.mm
+++ b/gcc/testsuite/obj-c++.dg/tls/diag-3.mm
@@ -1,10 +1,10 @@
/* Report invalid extern and __thread combinations. */
/* { dg-require-effective-target tls } */
-extern int j; /* { dg-error "previously declared here" } */
+extern int j; /* { dg-message "previously declared here" } */
__thread int j; /* { dg-error "follows non-thread-local" } */
-extern __thread int i; /* { dg-error "previously declared here" } */
+extern __thread int i; /* { dg-message "previously declared here" } */
int i; /* { dg-error "follows thread-local" } */
extern __thread int k; /* This is fine. */
diff --git a/gcc/testsuite/obj-c++.dg/tls/init-2.mm b/gcc/testsuite/obj-c++.dg/tls/init-2.mm
index dc886ba010..327c309e98 100644
--- a/gcc/testsuite/obj-c++.dg/tls/init-2.mm
+++ b/gcc/testsuite/obj-c++.dg/tls/init-2.mm
@@ -2,13 +2,13 @@
/* { dg-require-effective-target tls } */
extern __thread int i;
-__thread int *p = &i; /* { dg-error "dynamically initialized" } */
+__thread int *p = &i; /* { dg-error "dynamic initialization" } */
extern int f();
-__thread int j = f(); /* { dg-error "dynamically initialized" } */
+__thread int j = f(); /* { dg-error "dynamic initialization" } */
struct S
{
S();
};
-__thread S s; /* { dg-error "" } two errors here */
+__thread S s; /* { dg-error "dynamic initialization" } */
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
index cba188b70e..f2e912beb0 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-10.mm
@@ -6,10 +6,10 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface NSString: Object
+@interface NSString: NSObject
@end
@interface NSSimpleCString : NSString {
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
index c54f89bd8c..7e5d9b61e7 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-11.mm
@@ -7,10 +7,10 @@
/* { dg-options "-fconstant-string-class=XStr" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface XString: Object {
+@interface XString: NSObject {
@protected
char *bytes;
}
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
index b4f15fdcdd..d78dc73f93 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/const-str-9.mm
@@ -5,10 +5,10 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface NSConstantString: Object {
+@interface NSConstantString: NSObject {
char *cString;
unsigned int len;
}
diff --git a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
index 180401c3b7..87d47bb867 100644
--- a/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
+++ b/gcc/testsuite/obj-c++.dg/torture/strings/strings.exp
@@ -1,6 +1,6 @@
# String tests that should be run at all optimization levels.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/obj-c++.dg/try-catch-13.mm b/gcc/testsuite/obj-c++.dg/try-catch-13.mm
index 905702fde4..776d57bed6 100644
--- a/gcc/testsuite/obj-c++.dg/try-catch-13.mm
+++ b/gcc/testsuite/obj-c++.dg/try-catch-13.mm
@@ -22,7 +22,7 @@ extern void some_func (int *);
typeof(q) k = 66;
some_func (&j);
/* { dg-error "invalid conversion" "" { target *-*-* } 23 } */
-/* { dg-error "initializing argument" "" { target *-*-* } 12 } */
+/* { dg-message "initializing argument" "" { target *-*-* } 12 } */
some_func (&k);
}
@catch (id exc) {
@@ -39,7 +39,7 @@ extern void some_func (int *);
/* { dg-error "invalid conversion" "" { target *-*-* } 38 } */
/* The following is disabled as it is already checked above and the testsuites seems
to count multiple different identical errors on the same line only once */
-/* dg-error "initializing argument" "" { target *-*-* } 12 */
+/* dg-message "initializing argument" "" { target *-*-* } 12 */
}
@catch (id exc) {
@throw;
@@ -54,7 +54,7 @@ extern void some_func (int *);
/* { dg-error "invalid conversion" "" { target *-*-* } 53 } */
/* The following is disabled as it is already checked above and the testsuites seems
to count multiple different identical errors on the same line only once */
-/* dg-error "initializing argument" "" { target *-*-* } 12 */
+/* dg-message "initializing argument" "" { target *-*-* } 12 */
some_func (&k);
}
@catch (id exc) {
diff --git a/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m b/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m
index 2068a91643..c54f545564 100644
--- a/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m
+++ b/gcc/testsuite/objc-obj-c++-shared/TestsuiteObject.m
@@ -1,5 +1,5 @@
/* Very simple root class for writing testcases.
- Copyright (C) 2011 Free Software Foundation, Inc.
+ Copyright (C) 2011-2014 Free Software Foundation, Inc.
Contributed by Nicola Pero
This file is part of GCC.
diff --git a/gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h b/gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h
index 5508eddd75..24e5ebab75 100644
--- a/gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h
+++ b/gcc/testsuite/objc-obj-c++-shared/objc-test-suite-next-encode-assist-impl.h
@@ -529,7 +529,7 @@ objc_get_type_qualifiers (const char *type)
These functions are used by objc_sizeof_type and objc_alignof_type
functions to compute the size and alignment of structures. The
previous method of computing the size and alignment of a structure
- was not working on some architectures, particulary on AIX, and in
+ was not working on some architectures, particularly on AIX, and in
the presence of bitfields inside the structure. */
void
objc_layout_structure (const char *type,
diff --git a/gcc/testsuite/objc.dg/attributes/attributes.exp b/gcc/testsuite/objc.dg/attributes/attributes.exp
index cb11216c5b..23a8462b8a 100644
--- a/gcc/testsuite/objc.dg/attributes/attributes.exp
+++ b/gcc/testsuite/objc.dg/attributes/attributes.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/objc.dg/dg.exp b/gcc/testsuite/objc.dg/dg.exp
index 350c4b8339..3fcef7588d 100644
--- a/gcc/testsuite/objc.dg/dg.exp
+++ b/gcc/testsuite/objc.dg/dg.exp
@@ -1,5 +1,5 @@
# GCC Objective-C testsuite that uses the `dg.exp' driver.
-# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/dwarf-1.m b/gcc/testsuite/objc.dg/dwarf-1.m
index c04b613502..3bfabbae47 100644
--- a/gcc/testsuite/objc.dg/dwarf-1.m
+++ b/gcc/testsuite/objc.dg/dwarf-1.m
@@ -1,6 +1,6 @@
/* { dg-options "-gdwarf-2 -dA" } */
/* { dg-final { scan-assembler "\"id.0\".*DW_AT_name" } } */
-/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
+/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
@interface foo
id x;
@end
diff --git a/gcc/testsuite/objc.dg/dwarf-2.m b/gcc/testsuite/objc.dg/dwarf-2.m
index bedc520a65..967f515901 100644
--- a/gcc/testsuite/objc.dg/dwarf-2.m
+++ b/gcc/testsuite/objc.dg/dwarf-2.m
@@ -1,4 +1,4 @@
/* { dg-options "-gdwarf-2 -dA -gno-strict-dwarf" } */
/* { dg-final { scan-assembler "0x10\[^0-9a-f\].*DW_AT_language" } } */
-/* { dg-skip-if "No Dwarf" { { *-*-aix* alpha*-dec-osf* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
+/* { dg-skip-if "No Dwarf" { { *-*-aix* hppa*-*-hpux* } && { ! hppa*64*-*-* } } { "*" } { "" } } */
int x;
diff --git a/gcc/testsuite/objc.dg/encode-7-next-64bit.m b/gcc/testsuite/objc.dg/encode-7-next-64bit.m
index 20cd400df5..4a418fc92b 100644
--- a/gcc/testsuite/objc.dg/encode-7-next-64bit.m
+++ b/gcc/testsuite/objc.dg/encode-7-next-64bit.m
@@ -4,24 +4,25 @@
/* { dg-require-effective-target lp64 } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-framework Foundation" } */
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../objc-obj-c++-shared/runtime.h"
-#define CHECK_IF(E) if (!(E)) abort ()
+extern int printf(char *,...);
+void CHECK_IF(const char *s1, const char *s2)
+{
+ if (strcmp(s1,s2) != 0) {
+ printf ("'%s'\n'%s'\n",s1,s2);
+ abort ();
+ }
+}
@class NSDictionary, NSFont, NSError, _NSATSTypesetterGuts, NSString, NSMenu, NSArray;
-typedef unsigned char UInt8;
-typedef const signed long OSStatus;
-typedef unsigned long CFIndex;
-typedef unsigned int UInt32;
-typedef UInt32 FourCharCode;
-typedef FourCharCode OSType;
-
struct FSRef {
UInt8 hidden[80];
};
@@ -99,10 +100,10 @@ typedef struct {
unsigned int parameterMask;
} NSErrorUserInfoFormatter;
-typedef Object MyObj;
-typedef Object *MyPtr;
+typedef NSObject MyObj;
+typedef NSObject *MyPtr;
-@interface Foo: Object {
+@interface Foo: NSObject {
NSATSGlyphStorageRun r;
}
- (NSError *)_errorWithOSStatus:(OSStatus)inOSStatus ref1:(const FSRef *)inRef1 ref2:(const struct FSRef *)inRef2
@@ -114,7 +115,7 @@ typedef Object *MyPtr;
- (id)str1:(const char *)str1 str2:(char *)str2 str3:(char *const)str3 str4:(const char *const)str4;
- (oneway void)foo1:(Foo *)foo1 foo2:(const Foo *)foo2 foo3:(Foo *const)foo3 foo4:(const Foo *const)foo4;
- (in const char *)sel1:(const SEL)sel1 id1:(const id)id1;
-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3;
+- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3;
+ (ComponentInstance)_defaultScriptingComponent;
- (NSString *)_formatCocoaErrorString:(NSString *)formatString parameters:(const char *)parameters
applicableFormatters:(NSErrorUserInfoFormatter **)formatters count:(int)numFormatters;
@@ -156,7 +157,7 @@ NSRange globalRange;
- (in const char *)sel1:(const SEL)sel1 id1:(const id)id1 {
return "Hello";
}
-- (inout id)obj1:(const MyPtr)obj1 obj2:(Object *const)obj2 obj3:(MyObj *const)obj3 {
+- (inout id)obj1:(const MyPtr)obj1 obj2:(NSObject *const)obj2 obj3:(MyObj *const)obj3 {
return self;
}
+ (ComponentInstance)_defaultScriptingComponent {
@@ -191,6 +192,8 @@ NSRange globalRange;
}
@end
+/* FIXME: we produce different output c.f. the system compiler on OSX10.6+ */
+
int main(void) {
Class fooClass = objc_getClass ("Foo");
Method meth;
@@ -199,72 +202,76 @@ int main(void) {
Ivar ivar;
meth = class_getInstanceMethod (fooClass, @selector(_errorWithOSStatus:ref1:ref2:reading:));
- CHECK_IF (!strcmp (method_getTypeEncoding(meth), "@44@0:8q16r^{FSRef=[80C]}24r^{FSRef=[80C]}32c40"));
+ CHECK_IF (method_getTypeEncoding(meth), "@40@0:8i16r^{FSRef=[80C]}20r^{FSRef=[80C]}28c36");
meth = class_getInstanceMethod (fooClass, @selector(_attributeRunForCharacterAtIndex:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r^{?=@@QQ^Qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8Q16"));
+ CHECK_IF (method_getTypeEncoding (meth), "r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@:::****{?=b1b1b1b1b1b27}}24@0:8q16");
+/* clang produces: r^{?=@@qq^qffff{_NSRect={_NSPoint=ff}{_NSSize=ff}}q^qQ^Q@@@::^{objc_selector}****{?=b1b1b1b1b1b27}}24@0:8q16 */
meth = class_getInstanceMethod (fooClass, @selector(_getATSTypesetterGuts:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@24@0:8r:16"));
+ CHECK_IF (method_getTypeEncoding (meth), "r@24@0:8r:16");
+/* "@24@0:8r^{objc_selector=}16" */
meth = class_getInstanceMethod (fooClass, @selector(resumeWithSuspensionID:and:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^Q24"));
+ CHECK_IF (method_getTypeEncoding (meth), "v32@0:8^{__NSAppleEventManagerSuspension=}16r^q24");
meth = class_getInstanceMethod (fooClass, @selector(anotherMeth:and:and:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32"));
+ CHECK_IF (method_getTypeEncoding (meth), "r@40@0:8r:16r@24r@32");
meth = class_getInstanceMethod (fooClass, @selector(str1:str2:str3:str4:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40"));
+ CHECK_IF (method_getTypeEncoding (meth), "@48@0:8r*16*24*32r*40");
meth = class_getInstanceMethod (fooClass, @selector(foo1:foo2:foo3:foo4:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40"));
+ CHECK_IF (method_getTypeEncoding (meth), "Vv48@0:8@16r@24@32r@40");
meth = class_getInstanceMethod (fooClass, @selector(sel1:id1:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24"));
+ CHECK_IF (method_getTypeEncoding (meth), "rn*32@0:8r:16r@24");
meth = class_getInstanceMethod (fooClass, @selector(obj1:obj2:obj3:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{Object=#}32"));
+ CHECK_IF (method_getTypeEncoding (meth), "N@40@0:8r@16@24^{NSObject=#}32");
meth = class_getClassMethod (fooClass, @selector(_defaultScriptingComponent));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8"));
+ CHECK_IF (method_getTypeEncoding (meth), "^{ComponentInstanceRecord=[1q]}16@0:8");
meth = class_getInstanceMethod (fooClass, @selector(_formatCocoaErrorString:parameters:applicableFormatters:count:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40"));
+ CHECK_IF (method_getTypeEncoding (meth), "@44@0:8@16r*24^^{?}32i40");
meth = class_getInstanceMethod (fooClass, @selector(formatter_func:run:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24"));
+ CHECK_IF (method_getTypeEncoding (meth), "^{?=^?@I}32@0:8@16r^^{?}24");
meth = class_getInstanceMethod (fooClass, @selector(_forgetWord:inDictionary:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24"));
+ CHECK_IF (method_getTypeEncoding (meth), "c32@0:8nO@16nO@24");
meth = class_getInstanceMethod (fooClass, @selector(_registerServicesMenu:withSendTypes:andReturnTypes:addToList:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40"));
+ CHECK_IF (method_getTypeEncoding (meth), "v44@0:8@16r^*24r^*32c40");
meth = class_getClassMethod (fooClass, @selector(_proxySharePointer));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8"));
+ CHECK_IF (method_getTypeEncoding (meth), "^^{__CFSet}16@0:8");
meth = class_getInstanceMethod (fooClass, @selector(_checkGrammarInString:language:details:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32"));
+ CHECK_IF (method_getTypeEncoding (meth), "{_NSRange=II}40@0:8n@16nO@24oO^@32");
meth = class_getInstanceMethod (fooClass, @selector(_resolvePositionalStakeGlyphsForLineFragment:lineFragmentRect:minPosition:maxPosition:maxLineFragmentWidth:breakHint:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^Q52"));
+ CHECK_IF (method_getTypeEncoding (meth), "B60@0:8^{__CTLine=}16{_NSRect={_NSPoint=ff}{_NSSize=ff}}24f40f44f48^q52");
meth = class_getClassMethod (fooClass, @selector(findVoiceByIdentifier:returningCreator:returningID:));
- CHECK_IF (!strcmp (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32"));
+ CHECK_IF (method_getTypeEncoding (meth), "c40@0:8@16^I24^I32");
ivars = class_copyIvarList (fooClass, &ivar_count);
- CHECK_IF (ivar_count == 1);
+ if (ivar_count != 1) {
+ abort ();
+ }
ivar = ivars[0];
- CHECK_IF (!strcmp (ivar_getName(ivar), "r"));
- CHECK_IF (!strcmp (ivar_getTypeEncoding(ivar),
+ CHECK_IF (ivar_getName(ivar), "r");
+ CHECK_IF (ivar_getTypeEncoding(ivar),
"{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\""
- "Q\"_nominalGlyphLocation\"Q\"p\"^Q\"_defaultLineHeight\"f\"_defaultBaselineOffset\""
+ "q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\""
"f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\""
"{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\""
"Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\":\"str1\"*\"str2\"*\"str3\"*\"str4\""
"*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\""
- "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"));
-
+ "b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}");
+/*"{?=\"_attributes\"@\"NSDictionary\"\"_font\"@\"NSFont\"\"_characterLength\"q\"_nominalGlyphLocation\"q\"p\"^q\"_defaultLineHeight\"f\"_defaultBaselineOffset\"f\"_horizExpansion\"f\"_baselineDelta\"f\"_attachmentBBox\"{_NSRect=\"origin\"{_NSPoint=\"x\"f\"y\"f}\"size\"{_NSSize=\"width\"f\"height\"f}}\"ll\"q\"llp\"^q\"ull\"Q\"ullp\"^Q\"a\"@\"a1\"@\"a2\"@\"b\":\"b1\":\"b2\"^{objc_selector}\"str1\"*\"str2\"*\"str3\"*\"str4\"*\"_rFlags\"{?=\"_isAttachmentRun\"b1\"_hasPositionalStake\"b1\"_isDefaultFace\"b1\"_hasCombiningMarks\"b1\"_isScreenFont\"b1\"_reserved\"b27}}"*/
return 0;
}
diff --git a/gcc/testsuite/objc.dg/foreach-7.m b/gcc/testsuite/objc.dg/foreach-7.m
index c56521172d..a82869223b 100644
--- a/gcc/testsuite/objc.dg/foreach-7.m
+++ b/gcc/testsuite/objc.dg/foreach-7.m
@@ -1,5 +1,8 @@
/* Test basic Objective-C foreach syntax. This tests warnings and errors. */
-/* { dg-do compile } */
+/*
+ { dg-options "-ftrack-macro-expansion=0" }
+ { dg-do compile }
+*/
#import "../objc-obj-c++-shared/TestsuiteObject.h"
#import <objc/objc.h>
@@ -37,10 +40,10 @@ int main (void)
id object = nil;
for (typedef int my_typedef in array) /* { dg-error "declaration of non-variable" } */
- ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 39 } */
+ ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 42 } */
for (function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
- ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 42 } */
+ ; /* { dg-error "iterating variable in fast enumeration is not an object" "" { target *-*-* } 45 } */
for (object_function () in nil) /* { dg-error "invalid iterating variable in fast enumeration" } */
;
diff --git a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
index b137b751ae..d833f92546 100644
--- a/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
+++ b/gcc/testsuite/objc.dg/gnu-encoding/gnu-encoding.exp
@@ -1,5 +1,5 @@
# GCC Objective-C testsuite that uses the `dg.exp' driver.
-# Copyright (C) 1997, 2001, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/image-info.m b/gcc/testsuite/objc.dg/image-info.m
index 194d3664f0..09329130a7 100644
--- a/gcc/testsuite/objc.dg/image-info.m
+++ b/gcc/testsuite/objc.dg/image-info.m
@@ -7,20 +7,19 @@
/* { dg-skip-if "NeXT-only" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-freplace-objc-classes" } */
-#include <objc/objc.h>
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();
-@interface Object (TEST_SUITE_C1)
+@interface NSObject (TEST_SUITE_C1)
- init;
@end
-@implementation Object (TEST_SUITE_C1)
+@implementation NSObject (TEST_SUITE_C1)
- init {return self;}
@end
-@interface Base: Object {
+@interface Base: NSObject {
@public
int a;
float b;
diff --git a/gcc/testsuite/objc.dg/lto/lto.exp b/gcc/testsuite/objc.dg/lto/lto.exp
index f567cd93e2..7b052c437e 100644
--- a/gcc/testsuite/objc.dg/lto/lto.exp
+++ b/gcc/testsuite/objc.dg/lto/lto.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/method-6.m b/gcc/testsuite/objc.dg/method-6.m
index 8d868d13cc..a14c14d6d5 100644
--- a/gcc/testsuite/objc.dg/method-6.m
+++ b/gcc/testsuite/objc.dg/method-6.m
@@ -4,14 +4,21 @@
/* { dg-do compile } */
/* { dg-options "-Wstrict-selector-match" } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
+#include <objc/Object.h>
#include <objc/Protocol.h>
+#define OBJECT Object
+#endif
@interface Base
- (unsigned)port;
@end
@interface Derived: Base
-- (Object *)port;
+- (OBJECT *)port;
+ (Protocol *)port;
- (id)starboard;
@end
@@ -20,13 +27,13 @@ void foo(void) {
Class receiver;
[receiver port]; /* { dg-warning "multiple methods named .\\+port. found" } */
- /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 10 } */
- /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 15 } */
+ /* { dg-message "using .\\-\\(unsigned( int)?\\)port." "" { target *-*-* } 17 } */
+ /* { dg-message "also found .\\+\\(Protocol \\*\\)port." "" { target *-*-* } 22 } */
[receiver starboard]; /* { dg-warning "no .\\+starboard. method found" } */
- /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 26 } */
- /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 26 } */
- /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 26 } */
+ /* { dg-warning "Messages without a matching method signature" "" { target *-*-* } 33 } */
+ /* { dg-warning "will be assumed to return .id. and accept" "" { target *-*-* } 33 } */
+ /* { dg-warning ".\.\.\.. as arguments" "" { target *-*-* } 33 } */
[Class port]; /* { dg-error ".Class. is not an Objective\\-C class name or alias" } */
}
diff --git a/gcc/testsuite/objc.dg/no-extra-load.m b/gcc/testsuite/objc.dg/no-extra-load.m
index 7503535792..f5e1d74563 100644
--- a/gcc/testsuite/objc.dg/no-extra-load.m
+++ b/gcc/testsuite/objc.dg/no-extra-load.m
@@ -1,7 +1,7 @@
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-#import <Foundation/Foundation.h>
+#include <Foundation/NSObject.h>
main() { [NSObject new]; }
/* { dg-final { scan-assembler-not "L_objc_msgSend\\\$non_lazy_ptr" } } */
diff --git a/gcc/testsuite/objc.dg/objc-foreach-4.m b/gcc/testsuite/objc.dg/objc-foreach-4.m
index 292a908850..4d902f5588 100644
--- a/gcc/testsuite/objc.dg/objc-foreach-4.m
+++ b/gcc/testsuite/objc.dg/objc-foreach-4.m
@@ -1,17 +1,13 @@
/* Test for valid objc objects used in a for-each statement. */
/* FIXME: Run this test with the GNU runtime as well. */
-/* { dg-do compile { target *-*-darwin* } } */
+/* { dg-do run { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */
-#include <objc/objc-api.h>
-#include <Foundation/Foundation.h>
-
-#if defined (__NEXT_RUNTIME__) && defined (__LP64__)
-/* Fudge the class reference until we implement the compiler-side
- const strings. */
-extern void *_NSConstantStringClassReference;
-#endif
+#include <Foundation/NSString.h>
+#include <Foundation/NSAutoreleasePool.h>
+#include <Foundation/NSArray.h>
// gcc -o foo foo.m -framework Foundation
diff --git a/gcc/testsuite/objc.dg/objc-foreach-5.m b/gcc/testsuite/objc.dg/objc-foreach-5.m
index cb15781997..7113a7ac26 100644
--- a/gcc/testsuite/objc.dg/objc-foreach-5.m
+++ b/gcc/testsuite/objc.dg/objc-foreach-5.m
@@ -2,8 +2,10 @@
/* { dg-do compile { target *-*-darwin* } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-skip-if "No NeXT fast enum. pre-Darwin9" { *-*-darwin[5-8]* } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */
-#import <Foundation/Foundation.h>
+#include <Foundation/NSArray.h>
+#include <Foundation/NSAutoreleasePool.h>
NSArray * createTestVictim(unsigned capacity) {
NSMutableArray * arr = [[NSMutableArray alloc] initWithCapacity:capacity];
diff --git a/gcc/testsuite/objc.dg/pch/pch.exp b/gcc/testsuite/objc.dg/pch/pch.exp
index 0fca64125e..bf1517980f 100644
--- a/gcc/testsuite/objc.dg/pch/pch.exp
+++ b/gcc/testsuite/objc.dg/pch/pch.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1997, 2002, 2003, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -25,8 +24,8 @@ load_lib torture-options.exp
# Initialize `dg'.
dg-init
-
torture-init
+pch-init
set-torture-options $DG_TORTURE_OPTIONS
@@ -60,5 +59,6 @@ if [istarget "*-*-darwin*" ] {
set dg-do-what-default "$old_dg_do_what_default"
# All done.
+pch-finish
torture-finish
dg-finish
diff --git a/gcc/testsuite/objc.dg/pr23214.m b/gcc/testsuite/objc.dg/pr23214.m
index cf2631c956..341a2837da 100644
--- a/gcc/testsuite/objc.dg/pr23214.m
+++ b/gcc/testsuite/objc.dg/pr23214.m
@@ -3,14 +3,24 @@
/* { dg-do run } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+/* { dg-additional-options "-framework Foundation" { target { { *-*-darwin* } && objc2 } } } */
+#if defined (__NEXT_RUNTIME__) && defined(__OBJC2__) \
+ && defined(__ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__) \
+ && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ >= 1070
#include <objc/Protocol.h>
-
-@interface Object (TS_CAT)
+#define OBJECT NSObject
+#else
+#include <objc/Object.h>
+#define OBJECT Object
+#include <objc/Protocol.h>
+#endif
+
+@interface OBJECT (TS_CAT)
- test;
@end
-@implementation Object (TS_CAT)
+@implementation OBJECT (TS_CAT)
- test { return self; }
@end
@@ -20,7 +30,7 @@
@protocol B
@end
-@interface Dummy : Object <B>
+@interface Dummy : OBJECT <B>
@end
int main ()
diff --git a/gcc/testsuite/objc.dg/property/property.exp b/gcc/testsuite/objc.dg/property/property.exp
index e877301884..48e83e3916 100644
--- a/gcc/testsuite/objc.dg/property/property.exp
+++ b/gcc/testsuite/objc.dg/property/property.exp
@@ -1,5 +1,5 @@
# GCC Objective-C testsuite that uses the `dg.exp' driver.
-# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/proto-lossage-7.m b/gcc/testsuite/objc.dg/proto-lossage-7.m
index b7746d7a14..b32cfd8a0d 100644
--- a/gcc/testsuite/objc.dg/proto-lossage-7.m
+++ b/gcc/testsuite/objc.dg/proto-lossage-7.m
@@ -1,12 +1,19 @@
/* Check that typedefs of ObjC classes preserve
any @protocol qualifiers. */
/* { dg-do compile } */
+
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
@protocol CanDoStuff;
-typedef Object<CanDoStuff> CanDoStuffType;
-typedef Object<CanDoStuff> *CanDoStuffTypePtr;
+typedef OBJECT<CanDoStuff> CanDoStuffType;
+typedef OBJECT<CanDoStuff> *CanDoStuffTypePtr;
@protocol CanDoStuff
- (int) dostuff;
diff --git a/gcc/testsuite/objc.dg/special/special.exp b/gcc/testsuite/objc.dg/special/special.exp
index bab6798d97..fb9bd0bec3 100644
--- a/gcc/testsuite/objc.dg/special/special.exp
+++ b/gcc/testsuite/objc.dg/special/special.exp
@@ -1,5 +1,5 @@
# GCC Objective-C testsuite that uses the `dg.exp' driver.
-# Copyright (C) 1997, 2001, 2007, 2010 Free Software Foundation, Inc.
+# Copyright (C) 1997-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/stabs-1.m b/gcc/testsuite/objc.dg/stabs-1.m
index 79609a2b84..e43f7d84aa 100644
--- a/gcc/testsuite/objc.dg/stabs-1.m
+++ b/gcc/testsuite/objc.dg/stabs-1.m
@@ -16,4 +16,4 @@
@end
/* See PR target/52152 for the xfail. */
-/* { dg-final { scan-assembler "(.SUBSPA.*\[\$\]CODE\[\$\]|.text\"?)\n\t.stabs.*100,0,0,(\[\.\$\])?L?L\[\$\]?etext\[0-9\]*\n(\[\.\$\])?L?L\[\$\]?etext" { xfail mips*-*-elf* mips-sgi-irix6.5 } } } */
+/* { dg-final { scan-assembler "(.SUBSPA.*\[\$\]CODE\[\$\]|.text\"?)\n\t.stabs.*100,0,0,(\[\.\$\])?L?L\[\$\]?etext\[0-9\]*\n(\[\.\$\])?L?L\[\$\]?etext" { xfail mips*-*-elf* } } } */
diff --git a/gcc/testsuite/objc.dg/strings/const-cfstring-5.m b/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
index 13cb789577..98bb7c5bdd 100644
--- a/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
+++ b/gcc/testsuite/objc.dg/strings/const-cfstring-5.m
@@ -6,16 +6,16 @@
/* { dg-skip-if "NeXT only" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mconstant-cfstrings" } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
-@interface Foo: Object {
+@interface Foo: NSObject {
char *cString;
unsigned int len;
}
+ (Foo *)description;
@end
-@interface Bar: Object
+@interface Bar: NSObject
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/objc.dg/strings/const-str-12b.m b/gcc/testsuite/objc.dg/strings/const-str-12b.m
index 430ab5db2d..d0dfb668ea 100644
--- a/gcc/testsuite/objc.dg/strings/const-str-12b.m
+++ b/gcc/testsuite/objc.dg/strings/const-str-12b.m
@@ -5,17 +5,23 @@
/* { dg-options "-fconstant-string-class=Foo" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=Foo" { target *-*-darwin* } } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#define OBJECT Object
+#endif
#include "../../objc-obj-c++-shared/objc-test-suite-types.h"
-@interface Foo: Object {
+@interface Foo: OBJECT {
char *cString;
unsigned int len;
}
+ (id)description;
@end
-@interface Bar: Object
+@interface Bar: OBJECT
+ (Foo *) getString: (int) which;
@end
diff --git a/gcc/testsuite/objc.dg/strings/strings.exp b/gcc/testsuite/objc.dg/strings/strings.exp
index 823c2871a5..f38e6a35b8 100644
--- a/gcc/testsuite/objc.dg/strings/strings.exp
+++ b/gcc/testsuite/objc.dg/strings/strings.exp
@@ -1,6 +1,6 @@
# String tests that only need to run at default optimization.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
#
# This file is part of GCC.
#
diff --git a/gcc/testsuite/objc.dg/symtab-1.m b/gcc/testsuite/objc.dg/symtab-1.m
index 936f8d494c..04d747dbce 100644
--- a/gcc/testsuite/objc.dg/symtab-1.m
+++ b/gcc/testsuite/objc.dg/symtab-1.m
@@ -4,9 +4,9 @@
/* { dg-do compile { target { *-*-darwin* } } } */
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
-@interface Base: Object
+@interface Base: NSObject
- (void)setValues;
@end
diff --git a/gcc/testsuite/objc.dg/tls/diag-2.m b/gcc/testsuite/objc.dg/tls/diag-2.m
index 4f22281eb9..58cca01494 100644
--- a/gcc/testsuite/objc.dg/tls/diag-2.m
+++ b/gcc/testsuite/objc.dg/tls/diag-2.m
@@ -3,7 +3,7 @@
__thread extern int g1; /* { dg-error "'__thread' before 'extern'" } */
__thread static int g2; /* { dg-error "'__thread' before 'static'" } */
-__thread __thread int g3; /* { dg-error "duplicate '__thread'" } */
+__thread __thread int g3; /* { dg-error "duplicate" } */
typedef __thread int g4; /* { dg-error " '__thread' used with 'typedef'" } */
void foo()
diff --git a/gcc/testsuite/objc.dg/torture/strings/const-str-10.m b/gcc/testsuite/objc.dg/torture/strings/const-str-10.m
index e35b83bdc3..120bcd94c7 100644
--- a/gcc/testsuite/objc.dg/torture/strings/const-str-10.m
+++ b/gcc/testsuite/objc.dg/torture/strings/const-str-10.m
@@ -6,10 +6,10 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface NSString: Object
+@interface NSString: NSObject
@end
@interface NSSimpleCString : NSString {
diff --git a/gcc/testsuite/objc.dg/torture/strings/const-str-11.m b/gcc/testsuite/objc.dg/torture/strings/const-str-11.m
index 765f6489fb..4c3f9eac89 100644
--- a/gcc/testsuite/objc.dg/torture/strings/const-str-11.m
+++ b/gcc/testsuite/objc.dg/torture/strings/const-str-11.m
@@ -7,10 +7,10 @@
/* { dg-options "-fconstant-string-class=XStr" } */
/* { dg-options "-mno-constant-cfstrings -fconstant-string-class=XStr" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface XString: Object {
+@interface XString: NSObject {
@protected
char *bytes;
}
diff --git a/gcc/testsuite/objc.dg/torture/strings/const-str-9.m b/gcc/testsuite/objc.dg/torture/strings/const-str-9.m
index e69fb01807..d65aa01c04 100644
--- a/gcc/testsuite/objc.dg/torture/strings/const-str-9.m
+++ b/gcc/testsuite/objc.dg/torture/strings/const-str-9.m
@@ -5,10 +5,10 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-mno-constant-cfstrings" { target *-*-darwin* } } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
#include "../../../objc-obj-c++-shared/runtime.h" /* For NEXT_OBJC_USE_NEW_INTERFACE. */
-@interface NSConstantString: Object {
+@interface NSConstantString: NSObject {
char *cString;
unsigned int len;
}
diff --git a/gcc/testsuite/objc.dg/torture/strings/strings.exp b/gcc/testsuite/objc.dg/torture/strings/strings.exp
index e309186136..85c48c5859 100644
--- a/gcc/testsuite/objc.dg/torture/strings/strings.exp
+++ b/gcc/testsuite/objc.dg/torture/strings/strings.exp
@@ -1,6 +1,6 @@
# String tests that should be run at all optimization levels.
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc.dg/zero-link-1.m b/gcc/testsuite/objc.dg/zero-link-1.m
index 4917495aff..812267bc37 100644
--- a/gcc/testsuite/objc.dg/zero-link-1.m
+++ b/gcc/testsuite/objc.dg/zero-link-1.m
@@ -5,13 +5,12 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-fzero-link" } */
-#include <objc/Object.h>
-#include <objc/objc.h>
+#include <Foundation/NSObject.h>
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();
-@interface Base: Object
+@interface Base: NSObject
+ (int) getValue;
@end
diff --git a/gcc/testsuite/objc.dg/zero-link-2.m b/gcc/testsuite/objc.dg/zero-link-2.m
index ff82e5ed6d..3bfe84d021 100644
--- a/gcc/testsuite/objc.dg/zero-link-2.m
+++ b/gcc/testsuite/objc.dg/zero-link-2.m
@@ -5,12 +5,12 @@
/* { dg-skip-if "" { *-*-* } { "-fgnu-runtime" } { "" } } */
/* { dg-options "-fno-zero-link" } */
-#include <objc/Object.h>
+#include <Foundation/NSObject.h>
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();
-@interface Base: Object
+@interface Base: NSObject
+ (int) getValue;
@end
diff --git a/gcc/testsuite/objc.dg/zero-link-3.m b/gcc/testsuite/objc.dg/zero-link-3.m
index 5da7422b8e..18f21db4e6 100644
--- a/gcc/testsuite/objc.dg/zero-link-3.m
+++ b/gcc/testsuite/objc.dg/zero-link-3.m
@@ -2,15 +2,23 @@
/* Contributed by Ziemowit Laski <zlaski@apple.com>. */
/* { dg-do run { target *-*-darwin* } } */
-/* { dg-options "-fzero-link" } */
+/* { dg-additional-options "-fzero-link" } */
+/* { dg-additional-options "-framework Foundation" { target { *-*-darwin* } } } */
/* { dg-xfail-run-if "Needs OBJC2 ABI" { *-*-darwin* && { lp64 && { ! objc2 } } } { "-fnext-runtime" } { "" } } */
+#ifdef __NEXT_RUNTIME__
+#include <Foundation/NSObject.h>
+#define OBJECT NSObject
+#else
#include <objc/Object.h>
+#include <objc/Protocol.h>
+#define OBJECT Object
+#endif
extern void abort(void);
#define CHECK_IF(expr) if(!(expr)) abort();
-@interface Base: Object
+@interface Base: OBJECT
+ (int) getValue;
@end
diff --git a/gcc/testsuite/objc/compile/compile.exp b/gcc/testsuite/objc/compile/compile.exp
index afc2343017..4bf24a42e5 100644
--- a/gcc/testsuite/objc/compile/compile.exp
+++ b/gcc/testsuite/objc/compile/compile.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2001, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc/execute/exceptions/exceptions.exp b/gcc/testsuite/objc/execute/exceptions/exceptions.exp
index 0443ca130e..1c60ce7d5b 100644
--- a/gcc/testsuite/objc/execute/exceptions/exceptions.exp
+++ b/gcc/testsuite/objc/execute/exceptions/exceptions.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gcc/testsuite/objc/execute/execute.exp b/gcc/testsuite/objc/execute/execute.exp
index 40ca40b61d..320be125c3 100644
--- a/gcc/testsuite/objc/execute/execute.exp
+++ b/gcc/testsuite/objc/execute/execute.exp
@@ -1,5 +1,4 @@
-# Copyright (C) 1991, 1992, 1993, 1995, 1997, 2007, 2008, 2010
-# Free Software Foundation, Inc.
+# Copyright (C) 1991-2014 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by